10-03-2010, 04:21 AM
dll in qm folder - good.
dll in System - not good. Possible problems with different versions.
dll in exe - good.
Function LoadQmGridDllFromExe
dll in System - not good. Possible problems with different versions.
dll in exe - good.
Function LoadQmGridDllFromExe
;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