semajnosnibor
17th January 2012, 20:01
In regards to ActiveQT, is there a way of making a QVariant that would be the equivalent of the following VARIANT:
VARIANT v;
v.vt = VT_ERROR;
v.scode = DISP_E_PARAMNOTFOUND;
I've tried to convert the VARIANT to QVariant, using: VARIANTToQVariant(), however I can not compile the code. Specifically to use VARIANT I included "windows.h" (or "qt_windows.h") and to get the VARIANTToQVariant() I included "qaxtypes.h". As soon as I have both of those, I get the following compile errors:
c:\Qt\2010.05\qt\lib/libqaxserver.a(qaxservermain.o):qaxservermain.cpp: (.text+0x478): multiple definition of `WinMain@16'
c:\Qt\2010.05\qt\lib/libqtmaind.a(qtmain_win.o):C:\qt-greenhouse\Trolltech\Code_less_create_more\Trollte ch\Code_less_create_more\Troll\4.6\qt\src\winmain/../../include/QtCore/../../src/corelib/global/qglobal.h:1381: first defined here
c:\Qt\2010.05\qt\lib/libqaxserver.a(qaxserver.o):qaxserver.cpp:(.text+0 xe01): undefined reference to `qax_instantiate()'
Added after 1 19 minutes:
Further info:
Tried creating an invalid QVariant() and putting the value (DISP_E_PARAMNOTFOUND) in. From looking at QAx code that seems to be the way to go, however, QAxObject still throws up an error when this QVariant is used.
VARIANT v;
v.vt = VT_ERROR;
v.scode = DISP_E_PARAMNOTFOUND;
I've tried to convert the VARIANT to QVariant, using: VARIANTToQVariant(), however I can not compile the code. Specifically to use VARIANT I included "windows.h" (or "qt_windows.h") and to get the VARIANTToQVariant() I included "qaxtypes.h". As soon as I have both of those, I get the following compile errors:
c:\Qt\2010.05\qt\lib/libqaxserver.a(qaxservermain.o):qaxservermain.cpp: (.text+0x478): multiple definition of `WinMain@16'
c:\Qt\2010.05\qt\lib/libqtmaind.a(qtmain_win.o):C:\qt-greenhouse\Trolltech\Code_less_create_more\Trollte ch\Code_less_create_more\Troll\4.6\qt\src\winmain/../../include/QtCore/../../src/corelib/global/qglobal.h:1381: first defined here
c:\Qt\2010.05\qt\lib/libqaxserver.a(qaxserver.o):qaxserver.cpp:(.text+0 xe01): undefined reference to `qax_instantiate()'
Added after 1 19 minutes:
Further info:
Tried creating an invalid QVariant() and putting the value (DISP_E_PARAMNOTFOUND) in. From looking at QAx code that seems to be the way to go, however, QAxObject still throws up an error when this QVariant is used.