Memory leaks using shell from VBA with winAPI kernel32 
Author Message
 Memory leaks using shell from VBA with winAPI kernel32

I am trying to run bat file that calls pgp, waits to
ensure that the bat file has finished and then continues
unless a response isn't received. I picked the following
code up from a book and adapted it. I am finding though
that the number of handles and total commit charge of
memory increase after each call and do not get released
until I exit from Access. Any ideas? I've tried issuing a
CloseHandle call at the end of the routine but it didn't
seem to do anything.

hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, 1, _
Shell(strCommand, vbMinimizedNoFocus))

' *** Process runs asynchronously - produce error if it
times out

lngStartTime = timeGetTime
booTimeOut = False
Do
   GetExitCodeProcess hProcess, retval
   DoEvents
   lngNow = timeGetTime
   If (lngNow - lngStartTime) / 1000 > intPgpTimeout Then
       booTimeOut = True
   End If
Loop While retval = STILL_ACTIVE And Not booTimeOut



Mon, 07 Nov 2005 22:50:06 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Excel VBA macro memory leak

2. VBA memory leak in Vantive CRM

3. Memory Leak in Project VBA?

4. VBA:Excel memory leak ?

5. Memory Leaks/Resource Leaks

6. Using Kernel32 functions from VBA

7. How can I read&write memory using Winapi in VB5.0

8. how can I read&write memory using winapi in vb5.0

9. memory leak using VBA6 and file access

10. Possible Memory Leak When Using ADO/DAO with VB6

11. Memory leak using VB4 and Sybase?

12. Memory leak using VB4 and Sybase?

 

 
Powered by phpBB® Forum Software