0

I registered dll file in window and included at QT in pro, with this code

INCLUDEPATH += $$PWD/(folder name)
DEPENDPATH  += $$PWD/(folder name)
LIBS += -L$$PWD/laser/-l(dll file name)

and when i run qmake, it is working.

from now, how to call the function in dll file at cpp or header file? there is no header file for dll file.

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
  • `registered dll file in window` What exactly do you mean by that? – dxiv Nov 24 '20 at 04:24
  • by device documents, i registered the dll file using promft command regasm. – Bean_noodle Nov 24 '20 at 04:29
  • `regasm` means the DLL is a managed .NET assembly. That doesn't come with a C++ header, and you don't call the functions directly. See [How do I call a .NET assembly from C/C++?](https://stackoverflow.com/questions/106033/how-do-i-call-a-net-assembly-from-c-c) for some pointers. – dxiv Nov 24 '20 at 04:36
  • thanks a lot. i am so wandering as i am actually noob in programming... i made tlb file, but i cant go on from here... – Bean_noodle Nov 24 '20 at 06:40
  • You'd then have to `regasm /tlb /codebase` the assembly, and use it from C++ via the COM interfaces, perhaps using `#import` if compiling with Visual Studio. Honestly, though, this is not the best, easiest way to get acquainted with C++ and COM in Windows. – dxiv Nov 24 '20 at 07:09

0 Answers0