H
heihei_76
Unregistered / Unconfirmed
GUEST, unregistred user!
如何执行外部程序[并一直等到它结束]
我找到一个例子:
var
pWindowsList: pointer;
hActiveWindow: HWnd;
hExeHandle: THandle;
begin
pWindowsList := DisableTaskWindows(0);
hActiveWindow := GetActiveWindow;
try
hExeHandle := WinExec('arj.exe -x c:/temp/temp1/ITEM.ARJ c:/temp/temp2/QYJSCX.mdb',SW_SHOWNORMAL);
while GetModuleUsage(hExeHandle) <> 0 do
Application.ProcessMessages;
finally
EnableTaskWindows(pWindowsList);
SetActiveWindow(hActiveWindow);
但是我不知道GetModuleUsage要use哪个pas文件
请问还要别的解决方法吗?谢谢
我找到一个例子:
var
pWindowsList: pointer;
hActiveWindow: HWnd;
hExeHandle: THandle;
begin
pWindowsList := DisableTaskWindows(0);
hActiveWindow := GetActiveWindow;
try
hExeHandle := WinExec('arj.exe -x c:/temp/temp1/ITEM.ARJ c:/temp/temp2/QYJSCX.mdb',SW_SHOWNORMAL);
while GetModuleUsage(hExeHandle) <> 0 do
Application.ProcessMessages;
finally
EnableTaskWindows(pWindowsList);
SetActiveWindow(hActiveWindow);
但是我不知道GetModuleUsage要use哪个pas文件
请问还要别的解决方法吗?谢谢