Results 1 to 2 of 2

Thread: QT use DLL from VC6

  1. #1
    Join Date
    Jul 2015
    Posts
    7
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default QT use DLL from VC6

    I got DLL build by vc6 ,here is the function inside:
    #ifndef DLL_API
    #define DLL_API extern "C" __declspec(dllimport)
    #endif

    #define WIN_API __stdcall

    ....................
    DLL_API void WINAPI HTDrawTopPentagon(HDC hDC,int nCenterX,int nCenterY,COLORREF clr);
    ...................
    in QT I want to use these funtions.
    will it work if I program a QT project like this:
    "
    QLibrary myLib("dll_name");

    typedef int (MyPrototype)(QPixmap ,int,int,QColor);
    MyPrototype myFunction = (MyPrototype) myLib.resolve("HTDrawTopPentagon");
    myFunction test;
    will test work?
    or should i typedef int (*MyPrototype)(HDC ,int,int,COLORREF);in QT?

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QT use DLL from VC6

    Any specific reason that you want to load the DLL at runtime?
    Is it optional so that you can't link it at build time?

    Cheers,
    _

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.