VB6 (Compiled) 7Zip Command Line causing Error 10 ("The Array is Fixed or Temporarily Locked")

Viewed 38

The following line works perfect in the interpreter environment:

ShellExecute Me.hWnd, "open", "7z.exe", " -o" & PNG_Folder & " -y e " & PathFileName2 & Ext & ".gz", "C:\Program Files\7-Zip", vbNormalFocus

When I compile my program and run the .exe, i get the error 10.

Been banging my head trying to figure this one out.

Software environment is Windows 7 32 Bit (needed for an industrial environment).

1 Answers

It turned out not to be shelling to 7z.exe being the problem. It was an error generated from GPIB, via GLOBMGR.DLL, that VB could not handle. Any exit from any subfolder (i.e., EXIT SUB, EXIT FUNCTION), caused the compiled program to lock up.

err.clear did not work.
on error goto 0 did not work

Nothing I tried worked. Program worked great in the development environment but locked-up in compiled mode if a timeout error occurred on the GPIB bus.

I found a great new method of retrieving an image from a tek scope via the GPIB bus that is much faster and does not generate any timeout errors.

Other errors did not cause a problem.

Related