Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting .dll error while extracting files
#1
Hi All,

We have created macro to unzip file.

Find below code

str sw
str zf="E:\CTM\CTM.zip"
zip- zf "E:\CTM\Test" 0 sw
out "Done"

It is working fine on my system, but if we execute it on production server we are getting below error message

"Unable to load qmzip.dll"

Please let us know the exact problem.

Thanks in advance.

Regards,
Manoj
#2
The macro is compiled to .exe?
#3
I am seeing this error with a project that was recently recompiled into an exe.
Do you know what causes the qmzip error? It happens during the zip- operation.
#4
Most of QM zip/unzip code is in file qmzip.dll. It is in QM folder. Problem in exe: QM is not installed on most computers where exe runs.
To solve this, QM adds qmzip.dll to exe resources. Problem 2: dlls cannot be loaded directly from resources or memory.
To solve this, when exe runs and executes zip, it extracts the dll from exe resources, saves in the temp folder and loads the temporary dll file.

This macro shows the path of the temporary file, and 1 if it exists, 0 if not.
Macro Macro2566
Code:
Copy      Help
str tempFile=F"$temp qm$\ver 0x{QMVER}\qmzip.dll"
tempFile.expandpath
out tempFile
out FileExists(tempFile)

Why this could fail? One of reasons - a security software does not allow to create or load dll files in temp folder, especially for unknown programs. Another - there is something wrong in temp folder security settings. Some software may change temp folder security settings (eg Adobe acrobat XI, see http://www.tomshardware.co.uk/forum/338 ... ion-itself).

zip/zip- uses code like this. You can try to execute it in exe on that computer. If fails, it may show the reason.
Macro Macro2567
Code:
Copy      Help
if(0) zip- "c:\z.zip" "c:" ;;this just makes to add qmzip.dll to exe

str tempFile=F"$temp qm$\ver 0x{QMVER}\qmzip.dll"
int hm=ExeExtractFile(11 tempFile 0x101 252)
if(!hm) mes- F"ExeExtractFile failed.[]{GetLastError} {_s.dllerror}"
FreeLibrary hm


Forum Jump:


Users browsing this thread: 1 Guest(s)