Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QM_Grid in exe
#1
Gintaras,

In an exe that uses QM_Grid I have to have qmgrid.dll in the same directory as the exe to get the dialog to open.

What would be the best method for running an exe using QM_Grid on a machine that does not have QM on it?

Can the exe have the qmgrid.dll file in it? Can it be moved to the system32 folder and run from that.

Thanks,
Jim
#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
#3
That works. I did a variation of the same solution as dll in exe per instruction in the help file. It did not work as good as yours. It had some strange results where the grid would reload every a new cell was focused.

I figured I didn't include the file correctly or something.

This will really help. The QM_Grid is very handy. I am using it more and more.

Thanks,
Jim


Forum Jump:


Users browsing this thread: 1 Guest(s)