Click or drag to resize

NativeFileIOWin32Try Method

Overload List
  NameDescription
Public methodStatic memberWin32Try(Boolean)
Encapsulates call to a Win32 API function that returns a BOOL value indicating success or failure and where an error value is available through a call to GetLastError() in case of failure. If value True is passed to this method it does nothing. If False is passed, it calls GetLastError(), converts error code to a HRESULT value and throws a managed exception for that HRESULT.
Public methodStatic memberWin32TryT(T)
Encapsulates call to a Win32 API function that returns a value where failure is indicated as a NULL return and GetLastError() returns an error code. If non-zero value is passed to this method it just returns that value. If zero value is passed, it calls GetLastError() and throws a managed exception for that error code.
Top
See Also