Hi Jeff,
If you want to set an error code within a procedure and read it later -- the following code always works:
DECLARE INTEGER GetLastError IN kernel32
DECLARE SetLastError IN kernel32 LONG
= SetLastError(13) && ERROR_INVALID_DATA
? GetLastError()
* * *
If you are trying to retrieve an error code after an unsuccessful Win32 call -- this time you should not have a problem either, e.g.:
...
lnResult = AlphaBlend (hDC, lnX,lnY, lnWidth,lnHeight,;
hMemDC, 0,0, lnWidth,lnHeight,;
lnAlphaBlend)
IF lnResult = 0
* 6 = The handle is invalid
* 87 = The parameter is incorrect
? "Error:", GetLastError()
ENDIF
...
* * *
If I am still missing your point, please give more details.
Regards!
Anatoliy Mogylevets
http://www.news2news.com/vfp