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.
wrote on 12 Mar 2019, 09:52 last edited by CP71 3 Dec 2019, 10:54@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 -
@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 wrongwrote on 12 Mar 2019, 18:13 last edited by Kent-Dorfman 3 Dec 2019, 18:13@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
-
wrote on 13 Mar 2019, 01:44 last edited by
-
@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 wrongwrote on 13 Mar 2019, 05:12 last edited by@CP71 I checked, the file exists and the path is correct.
-
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
wrote on 13 Mar 2019, 05:15 last edited by@aha_1980 I thought about this issue before, so the dll path i am using is actually where the wireshark is installed, all the dll files are there. If some dlls are missing, wouldn't wireshark fail to start ?
-
@CP71 I checked, the file exists and the path is correct.
@lee64456546 According to this https://www.wireshark.org/docs/wsdg_html_chunked/ChIntroAutomated.html Visual Studio 2013 is used.
-
@aha_1980 I thought about this issue before, so the dll path i am using is actually where the wireshark is installed, all the dll files are there. If some dlls are missing, wouldn't wireshark fail to start ?
wrote on 13 Mar 2019, 08:36 last edited by@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.
-
@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 "\".
wrote on 13 Mar 2019, 12:05 last edited by@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 According to this https://www.wireshark.org/docs/wsdg_html_chunked/ChIntroAutomated.html Visual Studio 2013 is used.
wrote on 15 Mar 2019, 07:04 last edited by@jsulm maybe msvc2013 can help ?
-
@jsulm maybe msvc2013 can help ?
wrote on 15 Mar 2019, 09:33 last edited by@lee64456546
Hi,
I have tried your code and have same problem.
I think is a dependencies problem. -
@jsulm maybe msvc2013 can help ?
wrote on 15 Mar 2019, 09:48 last edited by@lee64456546
I have found out this link, it is old but maybe is current yet:
17/21