Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with RAS 32 API in Win2K
Message
 
 
To
04/07/2001 21:09:42
Peter Wagner
Point Informática Ltda.
Limeira, Brazil
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00526774
Message ID:
00527008
Views:
21
>Win95/98 nResult value is 0
>Win2000-Pro nResult value is 621

Peter,

Add following code to get error message
lnResult = .....

? Apierr()	

..............

RETURN  

*******************************************************************
FUNCTION Apierr

	Declare Integer GetLastError In kernel32.dll as GetLastError


	Declare Integer FormatMessageA In kernel32.dll as FormatMessage ;
		Integer dwFlags, ;
		String @lpSource, ;
		Integer dwMessageId, ;
		Integer dwLanguageId, ;
		String @lpBuffer, ;
		Integer nSize, ;
		Integer Arguments

Local lcErrBuffer, lcErrorMess, liNewErr 
lcErrBuffer = REPL(CHR(0),1000)

liNewErr = FormatMessage(0x1000;
 	,.NULL., getlasterror(), 0, @lcErrBuffer,500,0)
 	 *? getlasterror() 			

lcErrorMess = LEFT(lcErrBuffer, AT(CHR(0),lcErrBuffer)- 1 )

RETURN lcErrorMess
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform