[Solved] Error messages while using dll



  • Hi *,

    I have some trouble integrating a dll which I was given to use. The integration went quite smoothly, I use these lines in my .pro file:

    @
    win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../DataSennheiser/Projekte/Wennebostel/DevTool_0.4.3/sRx_Tools/sennheiser_msg_api/ -lsennheiser_msg_api
    else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../DataSennheiser/Projekte/Wennebostel/DevTool_0.4.3/sRx_Tools/sennheiser_msg_api/ -lsennheiser_msg_apid

    INCLUDEPATH += $$PWD/../../../DataSennheiser/Projekte/Wennebostel/DevTool_0.4.3/sRx_Tools/sennheiser_msg_api
    DEPENDPATH += $$PWD/../../../DataSennheiser/Projekte/Wennebostel/DevTool_0.4.3/sRx_Tools/sennheiser_msg_api
    @

    I have already tried to get rid of overhead, see if I can streamline this and as I don't have a debug version of it, I already cutted it down to something like this:

    @
    LIBS += -L$$PWD/../../../DataSennheiser/Projekte/Wennebostel/DevTool_0.4.3/sRx_Tools/sennheiser_msg_api/ -lsennheiser_msg_api

    INCLUDEPATH += $$PWD/../../../DataSennheiser/Projekte/Wennebostel/DevTool_0.4.3/sRx_Tools/sennheiser_msg_api
    DEPENDPATH += $$PWD/../../../DataSennheiser/Projekte/Wennebostel/DevTool_0.4.3/sRx_Tools/sennheiser_msg_api
    @

    I have included the delivered header file which compiles fine after I have adjusted the types (WORD to unsigned short int and so on). The call to the first function of the library in the cpp file reads like this:

    @
    msgApiVersion = senn_msg_version();
    @

    Which corresponds to the prototype in the header file:

    @
    DECLDIR unsigned int senn_msg_version( void );
    @

    Apparently the application itself works fine in general, but I get about 8000(!) lines like these:

    @
    select( ) failed (err = 10022) in line 2208!
    select( ) failed (err = 10022) in line 2054!
    @

    Actually, the err is ALWAYS 10022 and the line number in ALWAYS EITHER 2208 or 2054. Then the Qt Creator 3.1.1 freezes for a while or doesn't come back responsive at all, that seems to depend a little bit on the duration of how long I left the application open to loock for the reason...

    Can anyone point me to the right direction of where about the error could be located? I am wondering why the result is coming back properly from the function, but the framework is affected by the external library so badly? Any ideas and hints are appreciated - by the way, please include also the newbie hints of which you may think that I have sorted these out already, because I am pretty much a beginner with Qt. :o)

    Thanks a lot in advance,
    Stephan


  • Moderators

    I'd say that 8000 lines of debug messages can badly affect any IDE, so that's more likely a symptom of the problem and not a problem itself.

    Do you build the library yourself i.e. compile it to produce the library? Or do you just have a .dll, .lib and .h file from somewhere? If it's the second then modifying the header in any way is not a good idea. If it depends on things like WORD you should rather include <windows.h> or other dependencies and not mess with the header.
    If the error line comes from the library then you should rather ask the library maintainers/users what it means and if it can be fixed/suppressed.



  • Hi Chris,

    thanks for the reply! It was actually my motivation to mess as little as possible with the header file as possible. But as it uses WORD, BOOLEAN, DWORD, etc, I had to do something. So I thougth some plain definitions would fiddle the least with it. Now I have also tried to remove those again and use the <windows.h> as you recommended. Apparently it does not really make a difference.... :-(

    However, due to your hint I came across to find something else:
    When I switch the firewall (FSecure Client Security, Company policy) OFF, I get the 8000 error lines as described initially.
    When I switch the firewall ACTIVE, I get these both error lines only:
    @
    Error 10013 occured during initializing Sennheiser Message API stack.Der Zugriff auf einen Socket war aufgrund der Zugriffsrechte des Sockets unzulässig.
    Error 10013 occured during initializing Sennheiser Message API stack.Der Zugriff auf einen Socket war aufgrund der Zugriffsrechte des Sockets unzulässig.
    @

    In both cases the function call works and returns properly. I must admit that I haven't started to use the network function of the library which is the main purpose of it...

    Stephan



  • Thanks for your help, I was able to sort it out. Indeed it is a problem in the dll where I had expected the problem to be in the software programmed by a newbie (that would be me ;) ).

    Have a nice weekend,
    Stephan


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.