Shell command and rc with GetModuleUsage
Posted on 1998-08-26
Early with VB3 I had a program within I start a shell function and wait for the termination of the shell to continue within the function with the following code:
Private Declare Function GetModuleUsage Lib "Kernel32" (ByVal hModule As Integer) As Integer
comm = "xcopy " & fwininp & fwinout & " /e /s"
X = Shell(comm, 1)
While GetModuleUsage(X) > 0
z = DoEvents()
If GetModuleUsage(X) < 0 Then
MsgBox ("shell < 0 ")
Now with VB5, GetModuleUsage isn't found in any library I search !
Where can I found this function or by what can I replace it.
Is it another way to stay in my program while the shell is'nt terminated.
Thanks in advance.