When p/invoking a native method from managed code, it's not ok to call
GetLastError to check for an error, because internally the .Net engine can call other API native methods who might override the last error you actually want from the method you invoke. The solutions is
Marshall.GetLastWin32Error.
No comments:
Post a Comment