Shell Access 2.0 vs Access 97 
Author Message
 Shell Access 2.0 vs Access 97

In Access 2.0 I could shell to run a dos app and then use GetModuleUsage to
check if it was still running.

'This shells out to run a DOS program and waits till it is done before
'returning. This uses the Win API GetModuleUsage
Function WaitShell(AppName As String) As Integer ''
   On Error GoTo WaitShell_err
   Dim hMod As Integer                   'task id
   hMod = Shell(AppName, 6)
   If (Abs(hMod) > 32) Then
       While (GetModuleUsage(hMod))
           DoEvents
       Wend
       WaitShell = 0
   Else
       WaitShell = 1
   End If
Exit Function
WaitShell_err:
    MsgBox Error$
    Exit Function
    Resume
End Function

This does not work under Access97. I can not figure how to check to see if a
task is still running.
The shell function returns a task id but GetModuleUsage does not work in
WIN32 world
Any help/suggestions appreciated.

Bill Wilkie
Pacific Cash Register
San Francisco, Ca.



Fri, 27 Apr 2001 03:00:00 GMT  
 Shell Access 2.0 vs Access 97
You can find several ways of doing it under Win32 at Randy Birch's
fabulous VBNet site (http://www.mvps.org/vbnet/)

(There's also a solution in the API section at Dev's site:
http://home.att.net/~dashish/)

Quote:

> In Access 2.0 I could shell to run a dos app and then use GetModuleUsage to
> check if it was still running.

> 'This shells out to run a DOS program and waits till it is done before
> 'returning. This uses the Win API GetModuleUsage
> Function WaitShell(AppName As String) As Integer ''
>    On Error GoTo WaitShell_err
>    Dim hMod As Integer                   'task id
>    hMod = Shell(AppName, 6)
>    If (Abs(hMod) > 32) Then
>        While (GetModuleUsage(hMod))
>            DoEvents
>        Wend
>        WaitShell = 0
>    Else
>        WaitShell = 1
>    End If
> Exit Function
> WaitShell_err:
>     MsgBox Error$
>     Exit Function
>     Resume
> End Function

> This does not work under Access97. I can not figure how to check to see if a
> task is still running.
> The shell function returns a task id but GetModuleUsage does not work in
> WIN32 world
> Any help/suggestions appreciated.

> Bill Wilkie
> Pacific Cash Register
> San Francisco, Ca.


--

Beer, Wine and Database Programming.  What could be better?
Visit "Doug Steele's Beer and Programming Emporium"
http://webhome.idirect.com/~djsteele/



Fri, 27 Apr 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Converting Access 2.0 to Access 97/2002

2. Converting Access 2.0 to Access 97

3. Converting Access 2.0 modules to Access 97

4. Access 2.0 to Access 97 conversion

5. Upgrade from Access 2.0 to Access 97

6. Convert Access 2.0 Dbf-file to Access 97 Dbf-file

7. Convert Access 2.0 database into Access 97

8. access 2.0 to access 97 date conversion bug

9. Help: convert access 2.0 to access 97 using VB 5.0

10. Access 2.0 and Access 97 on same machine

11. Access 2.0 to Access 97

12. Converting Access 2.0 DB to Access 97 DB in VB code

 

 
Powered by phpBB® Forum Software