Method LogLastNativeError
LogLastNativeError(string)
Logs the last Win32 error that occurred, along with the name of the function where the error occurred.
public static void LogLastNativeError(string function)
Parameters
functionstringThe name of the function where the error occurred. This is included in the log message to provide context.
Remarks
This method retrieves the last Win32 error using GetLastWin32Error() and logs the error number and its corresponding message. The log message is written to the debug output using WriteLine(string).