Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. libwireshark.dll load problem
Qt 6.11 is out! See what's new in the release blog

libwireshark.dll load problem

Scheduled Pinned Locked Moved Unsolved General and Desktop
21 Posts 7 Posters 5.6k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • jsulmJ jsulm

    @lee64456546 Is your app 32bit or 64bit?
    Do you use same compiler which was used to build the DLL?

    L Offline
    L Offline
    lee64456546
    wrote on last edited by
    #4

    @jsulm and yes, my app is 32bit.

    jsulmJ 1 Reply Last reply
    0
    • L lee64456546

      @jsulm and yes, my app is 32bit.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by jsulm
      #5

      @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?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      L 2 Replies Last reply
      2
      • jsulmJ jsulm

        @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?

        L Offline
        L Offline
        lee64456546
        wrote on last edited by
        #6

        @jsulm I use msvc2010 to compile my project, but i don't know which compiler was used to build the dll.

        1 Reply Last reply
        0
        • jsulmJ jsulm

          @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?

          L Offline
          L Offline
          lee64456546
          wrote on last edited by
          #7

          @jsulm is there a way i can find out which compiler the wireshark used ?

          1 Reply Last reply
          0
          • L lee64456546

            I am using qt to load libwireshark.dll (32 bit), but i always load failed. The failure info is
            0_1552378458598_2d46b507-31ec-40f2-bfac-b4d466d45ada-image.png

            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.

            CP71C Offline
            CP71C Offline
            CP71
            wrote on last edited by CP71
            #8

            @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

            Kent-DorfmanK L 2 Replies Last reply
            0
            • CP71C CP71

              @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

              Kent-DorfmanK Offline
              Kent-DorfmanK Offline
              Kent-Dorfman
              wrote on last edited by Kent-Dorfman
              #9

              @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 "\".

              The dystopian literature that served as a warning in my youth has become an instruction manual in my elder years.

              CP71C 1 Reply Last reply
              1
              • Christian EhrlicherC Online
                Christian EhrlicherC Online
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote on last edited by
                #10

                @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.

                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                Visit the Qt Academy at https://academy.qt.io/catalog

                1 Reply Last reply
                3
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #11

                  Hi,

                  What version of Wireshark did you download ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  L 1 Reply Last reply
                  0
                  • aha_1980A Offline
                    aha_1980A Offline
                    aha_1980
                    Lifetime Qt Champion
                    wrote on last edited by
                    #12

                    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

                    Qt has to stay free or it will die.

                    L 1 Reply Last reply
                    2
                    • SGaistS SGaist

                      Hi,

                      What version of Wireshark did you download ?

                      L Offline
                      L Offline
                      lee64456546
                      wrote on last edited by
                      #13

                      @SGaist 0_1552441474568_e9dd422a-3669-457b-a509-2294344d0551-image.png

                      1 Reply Last reply
                      0
                      • CP71C CP71

                        @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

                        L Offline
                        L Offline
                        lee64456546
                        wrote on last edited by
                        #14

                        @CP71 I checked, the file exists and the path is correct.

                        jsulmJ 1 Reply Last reply
                        1
                        • aha_1980A aha_1980

                          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

                          L Offline
                          L Offline
                          lee64456546
                          wrote on last edited by
                          #15

                          @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 ?

                          CP71C 1 Reply Last reply
                          0
                          • L lee64456546

                            @CP71 I checked, the file exists and the path is correct.

                            jsulmJ Offline
                            jsulmJ Offline
                            jsulm
                            Lifetime Qt Champion
                            wrote on last edited by
                            #16

                            @lee64456546 According to this https://www.wireshark.org/docs/wsdg_html_chunked/ChIntroAutomated.html Visual Studio 2013 is used.

                            https://forum.qt.io/topic/113070/qt-code-of-conduct

                            L 1 Reply Last reply
                            1
                            • L lee64456546

                              @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 ?

                              CP71C Offline
                              CP71C Offline
                              CP71
                              wrote on last edited by
                              #17

                              @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.

                              1 Reply Last reply
                              1
                              • Kent-DorfmanK Kent-Dorfman

                                @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 "\".

                                CP71C Offline
                                CP71C Offline
                                CP71
                                wrote on last edited by
                                #18

                                @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.

                                1 Reply Last reply
                                1
                                • jsulmJ jsulm

                                  @lee64456546 According to this https://www.wireshark.org/docs/wsdg_html_chunked/ChIntroAutomated.html Visual Studio 2013 is used.

                                  L Offline
                                  L Offline
                                  lee64456546
                                  wrote on last edited by
                                  #19

                                  @jsulm maybe msvc2013 can help ?

                                  CP71C 2 Replies Last reply
                                  0
                                  • L lee64456546

                                    @jsulm maybe msvc2013 can help ?

                                    CP71C Offline
                                    CP71C Offline
                                    CP71
                                    wrote on last edited by
                                    #20

                                    @lee64456546
                                    Hi,
                                    I have tried your code and have same problem.
                                    I think is a dependencies problem.

                                    0_1552642378888_408eace4-3bbe-494f-a94a-01bbb485a466-image.png

                                    1 Reply Last reply
                                    0
                                    • L lee64456546

                                      @jsulm maybe msvc2013 can help ?

                                      CP71C Offline
                                      CP71C Offline
                                      CP71
                                      wrote on last edited by
                                      #21

                                      @lee64456546
                                      I have found out this link, it is old but maybe is current yet:

                                      https://wireshark-dev.wireshark.narkive.com/eKc7x7DR/problem-loading-custom-dll-with-standard-wireshark-distribution

                                      1 Reply Last reply
                                      2

                                      • Login

                                      • Login or register to search.
                                      • First post
                                        Last post
                                      0
                                      • Categories
                                      • Recent
                                      • Tags
                                      • Popular
                                      • Users
                                      • Groups
                                      • Search
                                      • Get Qt Extensions
                                      • Unsolved