简体   繁体   English

VB6(已编译)7Zip 命令行导致错误 10(“阵列已固定或暂时锁定”)

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

The following line works perfect in the interpreter environment:以下行在解释器环境中完美运行:

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

When I compile my program and run the.exe, i get the error 10.当我编译我的程序并运行 .exe 时,我收到错误 10。

Been banging my head trying to figure this one out.一直在敲我的头,试图弄清楚这一点。

Software environment is Windows 7 32 Bit (needed for an industrial environment).软件环境为 Windows 7 32 位(工业环境所需)。

Thoughts??想法??

Thanks much.非常感谢。

It turned out not to be shelling to 7z.exe being the problem.事实证明,7z.exe 并不是问题所在。 It was an error generated from GPIB, via GLOBMGR.DLL, that VB could not handle.这是 GPIB 通过 GLOBMGR.DLL 生成的错误,VB 无法处理。 Any exit from any subfolder (ie, EXIT SUB, EXIT FUNCTION), caused the compiled program to lock up.任何子文件夹的任何退出(即 EXIT SUB、EXIT FUNCTION)都会导致编译的程序锁定。

err.clear did not work. err.clear 没有用。
on error goto 0 did not work错误转到 0 不起作用

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.程序在开发环境中运行良好,但如果在 GPIB 总线上发生超时错误,则会锁定在编译模式。

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.我发现了一种很棒的新方法,可以通过 GPIB 总线从 tek scope 中检索图像,该方法速度更快并且不会产生任何超时错误。

Other errors did not cause a problem.其他错误没有引起问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM