Hi, I am trying to load an external dll using HINSTANCE hInstLib = LoadLibrary(LIBRARYLOCATION); where LIBRARYLOCATION is the path to my dll. However, the LoadLibrary returns NULL and checked the error message using GetLastErrorMessage(). The error number is 193 (ERROR_BAD_EXE_FORMAT). I have compiled my wireshark code using MSVC_VARIANT=MSVC2010 and my sample dll is also built with Visual studio 2010. I have experimented a lot and end up with NO solution. Can anybody please help me what's wrong I am doing and what could be the solution? Thanks in Advance!! |
This error probably means that you are trying to load a 32bit DLL from a 64 bit version of Wireshark, or the opposite (64bit DLL and 32bit Wireshark). You must ensure that the DLL has the same format as Wireshark binary. |