libwireshark.dll load problem
-
I am using qt to load libwireshark.dll (32 bit), but i always load failed. The failure info is
I use these codes to load the dll file.
//load dll
QLibrary hdll(DLL_NAME);
if(hdll.load())
{
qDebug() << "Load dll success";
}
else
{
QMessageBox::warning(this, "Dll Error", hdll.errorString());
}Can anyone help? Thanks.
-
@lee64456546 Is your app 32bit or 64bit?
Do you use same compiler which was used to build the DLL? -
@lee64456546 "the dll is the one provided by Wireshark.exe" - that's clear.
You need to find out which compiler was used to build this DLL.
What compiler do you use? -
@lee64456546
HI.
I know, it will seem a stupid question, did you check file exists and path is correct?
"The specific module could not be found" seems file is not exist or directory is wrong -
@CP71 Also, along those lines, I see forward slashes in the directory path. I don't remember if Qt is smart enough to handle UNIX path separators on windoze...I only ever code in NIX so it's not something I ever run into. The OP didn't post where he initializes the name of the dll. He may have used "/" instead of "\".
-
@Kent-Dorfman said in libwireshark.dll load problem:
He may have used "/" instead of "".
This does not matter as long as Qt functions are used... this is what's Qt is made for.
-
Hi,
What version of Wireshark did you download ?
-
to add to my mates, this error can also mean, that a dependency of the DLL you want to load is missing. Please check with Dependency Walker.
Regards
-
@lee64456546 According to this https://www.wireshark.org/docs/wsdg_html_chunked/ChIntroAutomated.html Visual Studio 2013 is used.
-
@lee64456546 I don’t know libwireshark.dll, but if it only is a modulo for external tools and Wireshark doesn't use it is possible Wireshark runs well, even though dependency is missed.
-
@Kent-Dorfman
I can confirm Qt works well if you use / in folder name in Windows, but I'm being honest, I hasn’t never loaded a library with Qt. -
@lee64456546
Hi,
I have tried your code and have same problem.
I think is a dependencies problem.