Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Access to dll function (stdcall *)??



  • Hi,

    I have a dll with a header file that defines quite a few functions, for example this (simple) one:

    extern const char* (__stdcall *PtRepsGetServerVersion)(void);

    Extern and the return type is clear, __stdcall in general is also, but what about the "*" that usually dereferences? What does it do in this definition context? And how can I execute this function?

    Thanks a lot,
    Stephan



  • Ok, about the reference I figured it out. Apparently it wasn't that difficult, so sorry for the dumb question. ;)

    But I still have trouble with the calling structure. I tried these:

    data2 = PtRepsGetClientDllVersion();

    data2 = (*PtRepsGetServerVersion)();

    The strange thing is not, that the application crashes, but that it does without execution of the above posted lines. These are in slots that are not called (yet). I could press a button, but the application crashes at STARTUP! Even it compiles now without complaints in that area.

    Any ideas?

    Stephan


Log in to reply