Of course I prefer to do it in managed code, but if it necessary, I can use native C.Use the headers or all flag and its the first file header listed.
Open the Visual Studio Command Prompt and type corflags your assembly. Im aware of the corflags utility but it doesnt work on native assemblies. Now instead of 32BIT it has 32BITREQUIRED and 32BITPREFERRED. See description in CorHdr.h located C:Program Files (x86)Windows Kits8.0IncludeumCorHdr.h. From what I can tell 32BITREQUIRED replaces 32BIT. Dll Tool 64 Bit 94Fbr Dll Is 32The following character defines if the dll is 32 or 64 bits. Its been a while since I posted this answer, yet I still see that it gets a few upvotes now and again so I figured it was worth updating. I wrote a way to get the architecture of a Portable Executable image, which also checks to see if it was compiled as AnyCPU. Unfortunately the answer is in C, but it shouldnt be too hard to port to C if you have a few minutes to look up the structures in WinNT.h. If people are interested Ill write a port in C, but unless people actually want it I wont spend much time stressing about it. LPVOID GetOffsetFromRva(IMAGEDOSHEADER pDos, IMAGENTHEADERS pNt, DWORD rva). ![]() MSIL 32 bit pref platform:anycpu32bitpreferred PE32 x86 ILONLY 32BITREQUIRED 32BITPREFERRED. You open the DLL in an editor and check the first characters after the PE sequence. The corflags.exe utility is able to show you whether or not it targets x64. Provide details and share your research But avoid Asking for help, clarification, or responding to other answers. Making statements based on opinion; back them up with references or personal experience. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |