Desktop Functions: Smart Device Functions:
|
WINERROR (Constants)
Important Note about .NET and Win32 error-code reading:It is documented that you should NOT use the pinvoke GetLastError() due to the fact that the runtime makes it's own API calls without any notification to the application at all. And since most user-API calls are made through a call setup with DllImportAttribute, the .NET framework has made available a method that will record your call's ErrorCode until such time as you need to get it (although, most times, subsequent calls to other API's that you make will overwrite the previous - read ahead to find out why). Use Marshal.GetLastWin32Error() to get the last ErrorCode recorded by your most recent API call. You will also need to make sure you change SetLastError=true when you define your Pinvoke signature, unless you purposely don't want it or don't care or need the lasterror preserved. If you have questions on this remit to: http://www.paradisim.net in the FAQ forums or gabriel@paradisim.net. With this said, you can still use the following code to identify the errorcode:
/******************************************************************************/ Please edit this page!Do you have...
Select "Edit This Page" on the right hand toolbar and edit it! |
|