Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 694 Bytes

sample_058.md

File metadata and controls

25 lines (17 loc) · 694 Bytes

Home

Setting the last-error code for the FoxPro

Code:

DECLARE INTEGER GetLastError IN kernel32
	DECLARE SetLastError IN kernel32 INTEGER dwErrCode

	* setting 54=ERROR_NETWORK_BUSY: the network is busy
	= SetLastError (54)
	? GetLastError()	&& testing the result  

Listed functions:

GetLastError
SetLastError

Comment:

The SetlastError is intended primarily for dynamic-link libraries (DLL). Calling this function after an error occurs lets the DLL emulate the behavior of the Win32 API