示例#1
0
        public static int set_last_error(int errorCode)
        {
            int old_errno = NativeFunctions.GetLastError();

            NativeFunctions.SetLastError(errorCode);
            return(old_errno);
        }
示例#2
0
        public static int get_last_error()
        {
            if (Environment.OSVersion.Platform == PlatformID.Win32NT)
            {
                return(NativeFunctions.GetLastError());
            }

            throw PythonOps.NameError("get_last_error");
        }
示例#3
0
 public static int set_last_error(int errorCode)
 {
     if (Environment.OSVersion.Platform == PlatformID.Win32NT)
     {
         int old_errno = NativeFunctions.GetLastError();
         NativeFunctions.SetLastError(errorCode);
         return(old_errno);
     }
     throw PythonOps.NameError("set_last_error");
 }