Questions tagged [qlibrary]

QLibrary is a class from the Qt Toolkit which loads shared libraries at runtime.

Documentation can be found here (Qt4) and here (Qt5).

24 questions
0
votes
0 answers

How to specify the working directory for the loaded QLibrary lib?

The problem is: I have a Qt application that dynamically loads a library and executes one function from this library (see code example) ... QLibrary library( "d:/Libs/MyLib.dll" ); if ( !library.load( ) ) qDebug( ) << library.errorString( ); if…
0
votes
0 answers

QT cannot load dynamic link library(.dll) using QLibrary class

My friend and I are working on a project. He gave me a .dll file which can activate web camera and stream the view. He also gave me a small example project written in VS2013 MFC that demos the function. typedef int(*ExtportFuncA)(void); typedef…
APU
  • 239
  • 2
  • 17
0
votes
0 answers

QLibrary cannot resolve a function in shared library

I'm trying to include functions dynamically from shared library created with Qt. I use the QLibrary to do it. But I have the following problem: when I try to call the QLibrary::resolve() method, it always returns 0. This is header file…
Daniel D
  • 87
  • 2
  • 4
  • 13
0
votes
2 answers

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

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 #include #include #include using namespace…
whipsnap
  • 3
  • 1
  • 2
0
votes
1 answer

Qt shell32.dll ShellExecuteA strange behavior. How Can I display a file?

I have some code defined as follows: typedef long (*ShellExecFunct)(long, const char*, const char*, long, long, long); void some_funct() { QLibrary shell32(QString("shell32.dll")); ShellExecFunct viewfile = (ShellExecFunct)…
San Jacinto
  • 8,774
  • 5
  • 43
  • 58
0
votes
1 answer

c++ Qt: catching a segfault from dll

I'm loading an external dll with QLibrary. In some cases the dll just crashes (seg. fault). The DLL does not throw exceptions. What is the best way to handle this? I read that I need to run in a separate process/thread. Is this the only…
miro
  • 809
  • 10
  • 25
0
votes
1 answer

QLibray segmentation fault

I try to use external library. When i call function from this library it is work correct. But then i try call this function in the loop i have Segmentation fault. Code for example: char *snam = (char*) new char; QLibrary…
0
votes
0 answers

Node.js structure and flow of the application

I've just completed writing my first Node application. It's working well but as I read more from the community and absorb details I've come to the conclusion that my app is a bit different from the examples I'm reading. So I dug deeper into finding…
pilotguy
  • 543
  • 1
  • 5
  • 18
-1
votes
1 answer

Accessing C++ class member functions of a DLL in Qt

I am able to create the instance of the class in Qt main.cpp but my application is crashing on trying to access class member function of the DLL. How do I do it? If this is my dll.h #ifndef DIVFIXTURE_H #define…
Rachitha
  • 33
  • 7
1
2