Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Out of memory
Message
From
29/12/2005 15:43:25
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01081364
Message ID:
01081829
Views:
12
Are you really Mohammed in disguise?



>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
>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform