I have a DLL file named, Test2.dll which loads fine in anything but wireshark, but when I try to open it within my wireshark dissector it fails to load, this is how I am loading it:
The .h file for the DLL is thus:
Any ideas as to why this wouldn’t work? The DLL is compiled in VC++ 2005 (No option there) and the dissector is compiled with VC++ 2010 EE. Thank you for your time, Brandon asked 25 Jul ‘11, 11:56 officialhopsof edited 25 Jul ‘11, 17:57 helloworld |
One Answer:
Bug: You're passing a single-char string as a wide-char string to Fix: Use from:
to:
answered 25 Jul '11, 17:55 helloworld That did the trick! I also really liked how you included the example! Thanks! Brandon (26 Jul '11, 07:06) officialhopsof Good spot, I missed the cast. More portably you could define the string literal as a wide character e.g. L"\path\to\your\dll". No need to use Windows generic types then. (26 Jul '11, 10:00) grahamb ♦ Using (26 Jul '11, 11:24) bstn |
What is the error returned from the LoadLibrary call? To get extended error info call GetLastError() as per the MSDN page for LoadLibrary.
ERROR_MOD_NOT_FOUND
126 (0x7E)
is the error I get, so this points to a path issue? Is that possible since I am using an absolute path?