VB4 16bit Shell 
Author Message
 VB4 16bit Shell

My problem is I have shelled out to zip up a file(pkzip is in the path
for sure) and have some code that waits for the shell to finish, but it
will not zip the files so it just stays in a loop!

Here is the code to see if it has finished zipping the files..... Got it
off MS Home page
'Add the following code to the general declarations section of Form1:
Private Declare Function GetModuleUsage% Lib "Kernel" _
(ByVal hModule%)

              lRet& = Shell("NOTEPAD.EXE")       ' Modify the path as
necessary.
               x% = TestFunc(lRet&)
               While GetModuleUsage(x%) > 0    ' Has Shelled program
finished?
                  z% = DoEvents()              ' If not, yield to
Windows.
               Wend
               MsgBox "Shelled application just terminated", 64

This works fine from within vb, but I compiled it and installed it to
another computor and it just sits there and will not zip the files.

Any Ideas????

Kenny



Sun, 14 Jan 2001 03:00:00 GMT  
 VB4 16bit Shell


Quote:
>My problem is I have shelled out to zip up a file(pkzip is in the path
>for sure) and have some code that waits for the shell to finish, but it
>will not zip the files so it just stays in a loop!
>'Add the following code to the general declarations section of Form1:
>Private Declare Function GetModuleUsage% Lib "Kernel" _
>(ByVal hModule%)

  Dim a As Long
  Dim b As String

  b = "pkzip.exe " & InputBox("Enter pkzip parameters")
  a = Shell(b)
  While GetModuleUsage(a) > 0
      DoEvents
  Wend
  MsgBox "Shelled application just terminated", 64

-sm



Tue, 23 Jan 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. VB4 16bit Shell

2. Overflow with SHELL function in VB4-16bit

3. Know problem with VB4-16bit / Win95 / Shell / and certain OCX's

4. VB4 - 16BIT Sheridan Calendar Widgets (16bit OCX)

5. 16bit SourceSafe problems w/VB4.0-16bit - too many file handles open

6. VB3 16bit to VB4 16bit

7. VB4-16bit or VB4-32 bit Floating Thin Toolbar

8. Upgrade Problems: VB4.0/16Bit to VB4.0/32Bit

9. VB4 16bit Vs. VB4 32bit???

10. Shell from 16bit to 32bit apps

11. Use Shell to execute a 16bit app in separate memory

12. Q: 16bit-declaration for Registry-functions (shell.dll)

 

 
Powered by phpBB® Forum Software