This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

problem with loading external dll from a dissector

0

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!!

asked 09 Jul '14, 13:45

julia's gravatar image

julia
11114
accept rate: 0%


One Answer:

1

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.

answered 09 Jul '14, 14:23

Pascal%20Quantin's gravatar image

Pascal Quantin
5.5k1060
accept rate: 30%