This could return success/failure and optionally return the value of GetLastError - GetLastError.
Or, what might be nicer, would be to wrap the windows error codes in a python object/string/exception and surface that. So clients won't need to look up what error code int values mean. (https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes)