Search Results

Search found 3 results on 1 pages for 'qlibrary'.

Page 1/1 | 1 

  • Proper QUuid usage in Qt ? (7-Zip DLL usage problems (QLibrary, QUuid GUID conversion, interfaces))

    - by whipsnap
    Hi, I'm trying to write a program that would use 7-Zip DLL for reading files from inside archive files (7z, zip etc). Here's where I'm so far: #include QtCore/QCoreApplication #include QLibrary #include QUuid #include iostream using namespace std; #include "7z910/CPP/7zip/Archive/IArchive.h" #include "7z910/CPP/7zip/IStream.h" #include "MyCom.h" // {23170F69-40C1-278A-1000-000110070000} QUuid CLSID_CFormat7z(0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x07, 0x00, 0x00); typedef int (*CreateObjectFunc)( const GUID *clsID, const GUID *interfaceID, void **outObject); void readFileInArchive() { QLibrary myLib("7z.dll"); CreateObjectFunc myFunction = (CreateObjectFunc)myLib.resolve("CreateObject"); if (myFunction == 0) { cout outArchive; myFunction(&CLSID_CFormat7z, &IID_IOutArchive, (void **)&outArchive); } int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); readFileInArchive(); return a.exec(); } Trying to build that in Qt Creator will lead to following error: cannot convert 'QUuid*' to 'const GUID*' in argument passing How should QUuid be correctly used in this context? Also, being a C++ and Qt newbie I haven't yet quite grasped templates or interfaces, so overall I'm having trouble getting through these first steps. If someone could give tips or even example code on how for example an image file could be extracted from ZIP file (to be shown in Qt GUI later on*), I would highly appreciate that. My main goal at the moment is to write a program with GUI for selecting archive files containing image files (PNG, JPG etc) and displaying those files one at a time in the GUI. A Qt based CDisplayEx in short.

    Read the article

  • How to export C++ function as a dll that throws exception?

    - by ShaChris23
    When I try to export the following function as a dll: extern "C" __declspec(dllexport) void some_func() { throw std::runtime_error("test throwing exception"); } Visual C++ 2008 gives me the following warning: 1>.\SampleTrainer.cpp(11) : warning C4297: 'some_func' : function assumed not to throw an exception but does 1> The function is extern "C" and /EHc was specified I need to extern "C" because I use Qt QLibrary to load the dll and resolve the function name. Without extern "C" it can't find the some_func() function.

    Read the article

  • dumpbin equivalent in Qt

    - by de costo
    Is there any utility similar to dumpbin(Visual Studio) in Qt that allows me to check the functions that are exposed in a Qt-Creator compiled dll ?? I need to know what methods are exposed in a given dll so that I can load the method dynamically at runtime using QLibrary. Thanks, De Costo

    Read the article

1