Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QM_Grid in exe
#2
dll in qm folder - good.

dll in System - not good. Possible problems with different versions.

dll in exe - good.

Function LoadQmGridDllFromExe
Code:
Copy      Help
;Use this function in exe if you want to add qmgrid.dll to it.
;When making exe, this function adds qmgrid.dll to exe.
;When exe runs, this function extracts the dll to temp folder, and loads.

;EXAMPLE
;LoadQmGridDllFromExe ;;somewhere at the beginning of exe code


#if EXE
#exe addfile "$qm$\qmgrid.dll" 10 ;;add dll to exe (when making exe)
if !GetModuleHandle("qmgrid.dll")
,str sDir.expandpath(F"$temp$\qm\0x{QMVER}") sDll.from(sDir "\qmgrid.dll")
,if !dir(sDll) ;;if qmgrid.dll of this QM version is not already there
,,if(!ExeExtractFile(10 sDll)) ret ;;extract dll from exe; also creates folders.
,if(!LoadLibrary(sDll)) ret ;;load explicitly
#endif


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)