How Windows CRT Checks For Managed Module
While debugging an issue I came across an interesting piece of code in Windows CRT source. So far I have been using the code below to determine if an executable is managed or native. Basically I am just checking for the presence of IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR Data Directory entry in PE headers. int CheckCLRHeader(PBYTE pbFile) { PIMAGE_DOS_HEADER […]