Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Out of memory
Message
 
 
À
29/12/2005 14:10:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01081364
Message ID:
01081807
Vues:
10
Hi Herman,

I think you may be hitting it right. I never questioned the code myself. I'm going to apply your changes and I'm sure it would resolve this problem.

Thanks a million again.

>Hi Naomi,
>
>I'm not sure this will help, but I think there are several mistake here. And most important thing is you have to close the handle
>
>*   nStartedProcessHandle = (((asc(subst(cProcessInfo,4,1))*256) + ;
>*	asc(subst(cProcessInfo,3,1)))*256 + ;
>*	asc(subst(cProcessInfo,2,1)))*256 + ;
>*	asc(left(cProcessInfo,1))
>
>   ** should be this
>   nStartedProcessHandle = (((asc(subst(cProcessInfo,4,1))*256^3) + ;
>	asc(subst(cProcessInfo,3,1)))*256^2 + ;
>	asc(subst(cProcessInfo,2,1)))*256 + ;
>	asc(left(cProcessInfo,1))
>
>    ** Get Thread handle also
>    ** Both handles must then be close using CloseHandle() API
>    hThread = (((asc(subst(cProcessInfo,8,1))*256^3) + ;
>	asc(subst(cProcessInfo,7,1)))*256^2 + ;
>	asc(subst(cProcessInfo,6,1)))*256 + ;
>	asc(left(cProcessInfo,5))
>
>*   =WaitInpIdle(GetCurrProc(),cnINFINITE)
>
>    * Wait for the idle of the new/child process not the idle of the current process
>    WaitInpIdle( nStartedProcessHandle, cnINFINITE )
>
>	do while WaitOnAppExit(nStartedProcessHandle, cnHalfASecond) = cnTimedOut
>
>*	Give us an out in case the other app hangs - lets the user quit via
>		if inkey() = 27
>*	Still running but we aren't waiting - return a -1 as a warning
>			uResult = -1
>			exit
>		endif
>
>	enddo
>
>    ** Process & Thread Handles must be close
>    ** or else it will remains in the system
>    Declare Long CloseHandle in Kernel32 Long hObject
>
>    If (nStartedProcessHandle != 0)
>       CloseHandle( nStartedProcessHandle )
>    endif
>
>    If (hThread != 0)
>       CloseHandle( hThread )
>    endif
>
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform