Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
RenardDev committed Apr 11, 2024
1 parent 637dc96 commit 9019ce1
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions Detours.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,27 +415,12 @@ namespace Detours {
return false;
}

memset(pLinkData, 0, sizeof(LINK_DATA));

auto pDTE = FindModuleDataTableEntry(pBaseAddress);
if (!pDTE) {
return false;
}

pLinkData->m_pDTE = pDTE;
pLinkData->m_pSavedInLoadOrderLinks = pDTE->InLoadOrderLinks.Blink->Flink;
pLinkData->m_pSavedInInitializationOrderLinks = pDTE->InInitializationOrderLinks.Blink->Flink;
pLinkData->m_pSavedInMemoryOrderLinks = pDTE->InMemoryOrderLinks.Blink->Flink;
pLinkData->m_pSavedHashLinks = pDTE->HashLinks.Blink->Flink;
pLinkData->m_pSavedNodeModuleLink = pDTE->NodeModuleLink.Blink->Flink;

UnLinkEntry(&pDTE->InLoadOrderLinks);
UnLinkEntry(&pDTE->InInitializationOrderLinks);
UnLinkEntry(&pDTE->InMemoryOrderLinks);
UnLinkEntry(&pDTE->HashLinks);
UnLinkEntry(&pDTE->NodeModuleLink);

return true;
return UnLinkModule(pDTE, pLinkData);
}

bool UnLinkModule(HMODULE hModule, PLINK_DATA pLinkData) {
Expand Down

0 comments on commit 9019ce1

Please sign in to comment.