Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Information Job Object
Message
 
To
23/04/2007 18:42:11
Antonio Caldeira
Capta Tecnologia Ind.E Com.Ltda.
São Paulo, Brazil
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Miscellaneous
Thread ID:
01219128
Message ID:
01219156
Views:
8
DECLARE INTEGER QueryInformationJobObject IN kernel32;
	INTEGER hJob, INTEGER JobObjectInfoClass,;
	STRING @lpJobObjectInfo, INTEGER cbJobObjectInfoLength,;
	INTEGER @lpReturnLength
The following code complements code sample available at http://www.news2news.com/vfp/?example=491
PROCEDURE QueryInfo
	LOCAL nResult, cBuffer, nBufsize
	cBuffer = REPLICATE(CHR(0), 48) && JOBOBJECT_BASIC_ACCOUNTING_INFORMATION
	nBufsize=0
	nResult = QueryInformationJobObject(THIS.hJob,;
		1, @cBuffer, LEN(cBuffer), @nBufsize)

	IF nResult = 0
	* 24=ERROR_BAD_LENGTH
		nResult = GetLastError()
		= MESSAGEBOX("QueryInformationJobObject call failed: " +;
			TRANSFORM(nResult))
	ELSE
	* parse cBuffer, which is 
	* JOBOBJECT_BASIC_ACCOUNTING_INFORMATION structure
	ENDIF
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform