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

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%


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.

permanent link

answered 09 Jul '14, 14:23

Pascal%20Quantin's gravatar image

Pascal Quantin
5.5k1060
accept rate: 30%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×637
×21
×9
×8
×4

question asked: 09 Jul '14, 13:45

question was seen: 1,881 times

last updated: 09 Jul '14, 14:23

p​o​w​e​r​e​d by O​S​Q​A