[ros-diffs] [hyperion] 38620: modified dll/win32/advapi32/sec/lsa.c modified dll/win32/advapi32/service/eventlog.c modified dll/win32/advapi32/service/scm.c modified dll/win32/advapi32/service/sctrl.c modified dll/win32/setupapi/cfgmgr.c Use RPC exception handling macros consistently

hyperion at svn.reactos.org hyperion at svn.reactos.org
Wed Jan 7 10:44:22 CET 2009


Author: hyperion
Date: Wed Jan  7 03:44:21 2009
New Revision: 38620

URL: http://svn.reactos.org/svn/reactos?rev=38620&view=rev
Log:
modified   dll/win32/advapi32/sec/lsa.c
modified   dll/win32/advapi32/service/eventlog.c
modified   dll/win32/advapi32/service/scm.c
modified   dll/win32/advapi32/service/sctrl.c
modified   dll/win32/setupapi/cfgmgr.c
   Use RPC exception handling macros consistently

Modified:
    trunk/reactos/dll/win32/advapi32/sec/lsa.c
    trunk/reactos/dll/win32/advapi32/service/eventlog.c
    trunk/reactos/dll/win32/advapi32/service/scm.c
    trunk/reactos/dll/win32/advapi32/service/sctrl.c
    trunk/reactos/dll/win32/setupapi/cfgmgr.c

Modified: trunk/reactos/dll/win32/advapi32/sec/lsa.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/sec/lsa.c?rev=38620&r1=38619&r2=38620&view=diff
==============================================================================
--- trunk/reactos/dll/win32/advapi32/sec/lsa.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/sec/lsa.c [iso-8859-1] Wed Jan  7 03:44:21 2009
@@ -82,15 +82,15 @@
 
     TRACE("LsaClose(0x%p) called\n", ObjectHandle);
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         Status = LsarClose((PLSAPR_HANDLE)&ObjectHandle);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         Status = I_RpcMapWin32Status(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     return Status;
 }
@@ -106,15 +106,15 @@
 
     TRACE("LsaDelete(0x%p) called\n", ObjectHandle);
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         Status = LsarDelete((LSAPR_HANDLE)ObjectHandle);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         Status = I_RpcMapWin32Status(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     return Status;
 }
@@ -391,7 +391,7 @@
           SystemName?debugstr_w(SystemName->Buffer):"(null)",
           ObjectAttributes, DesiredAccess, PolicyHandle);
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         *PolicyHandle = NULL;
 
@@ -400,11 +400,11 @@
                                 DesiredAccess,
                                 PolicyHandle);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         Status = I_RpcMapWin32Status(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     TRACE("LsaOpenPolicy() done (Status: 0x%08lx)\n", Status);
 

Modified: trunk/reactos/dll/win32/advapi32/service/eventlog.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/service/eventlog.c?rev=38620&r1=38619&r2=38620&view=diff
==============================================================================
--- trunk/reactos/dll/win32/advapi32/service/eventlog.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/service/eventlog.c [iso-8859-1] Wed Jan  7 03:44:21 2009
@@ -155,16 +155,16 @@
     BackupFileName.Length = BackupFileName.MaximumLength =
         lpBackupFileName ? strlen(lpBackupFileName) : 0;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         Status = ElfrBackupELFA(hEventLog,
                                 &BackupFileName);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        Status = I_RpcMapWin32Status(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        Status = I_RpcMapWin32Status(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (!NT_SUCCESS(Status))
     {
@@ -195,16 +195,16 @@
     BackupFileName.Length = BackupFileName.MaximumLength =
         lpBackupFileName ? wcslen(lpBackupFileName) * sizeof(WCHAR) : 0;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         Status = ElfrBackupELFW(hEventLog,
                                 &BackupFileName);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        Status = I_RpcMapWin32Status(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        Status = I_RpcMapWin32Status(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (!NT_SUCCESS(Status))
     {
@@ -232,16 +232,16 @@
     BackupFileName.Length = BackupFileName.MaximumLength =
         lpBackupFileName ? strlen(lpBackupFileName) : 0;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         Status = ElfrClearELFA(hEventLog,
                                &BackupFileName);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        Status = I_RpcMapWin32Status(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        Status = I_RpcMapWin32Status(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (!NT_SUCCESS(Status))
     {
@@ -269,16 +269,16 @@
     BackupFileName.Length = BackupFileName.MaximumLength =
         lpBackupFileName ? wcslen(lpBackupFileName) * sizeof(WCHAR) : 0;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         Status = ElfrClearELFW(hEventLog,
                                &BackupFileName);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        Status = I_RpcMapWin32Status(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        Status = I_RpcMapWin32Status(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (!NT_SUCCESS(Status))
     {
@@ -300,15 +300,15 @@
 
     TRACE("%p\n", hEventLog);
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         Status = ElfrCloseEL(&hEventLog);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        Status = I_RpcMapWin32Status(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        Status = I_RpcMapWin32Status(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (!NT_SUCCESS(Status))
     {
@@ -336,15 +336,15 @@
 
     TRACE("%p\n", hEventLog);
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         Status = ElfrDeregisterEventSource(&hEventLog);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        Status = I_RpcMapWin32Status(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        Status = I_RpcMapWin32Status(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (!NT_SUCCESS(Status))
     {
@@ -372,16 +372,16 @@
 
     TRACE("%p, %p\n", hEventLog, NumberOfRecords);
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         Status = ElfrNumberOfRecords(hEventLog,
                                      &Records);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        Status = I_RpcMapWin32Status(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        Status = I_RpcMapWin32Status(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (!NT_SUCCESS(Status))
     {
@@ -411,16 +411,16 @@
 
     TRACE("%p, %p\n", hEventLog, OldestRecord);
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         Status = ElfrOldestRecord(hEventLog,
                                   &Oldest);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        Status = I_RpcMapWin32Status(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        Status = I_RpcMapWin32Status(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (!NT_SUCCESS(Status))
     {
@@ -509,7 +509,7 @@
     FileName.Length = FileName.MaximumLength =
         lpFileName ? wcslen(lpFileName) * sizeof(WCHAR) : 0;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         Status = ElfrOpenBELW((LPWSTR)lpUNCServerName,
                               &FileName,
@@ -517,11 +517,11 @@
                               0,
                               &LogHandle);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        Status = I_RpcMapWin32Status(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        Status = I_RpcMapWin32Status(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (!NT_SUCCESS(Status))
     {
@@ -588,7 +588,7 @@
     SourceName.Length = SourceName.MaximumLength =
         lpSourceName ? wcslen(lpSourceName) * sizeof(WCHAR) : 0;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         Status = ElfrOpenELW((LPWSTR)lpUNCServerName,
                              &SourceName,
@@ -597,11 +597,11 @@
                              0,
                              &LogHandle);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        Status = I_RpcMapWin32Status(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        Status = I_RpcMapWin32Status(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (!NT_SUCCESS(Status))
     {
@@ -632,7 +632,7 @@
         hEventLog, dwReadFlags, dwRecordOffset, lpBuffer,
         nNumberOfBytesToRead, pnBytesRead, pnMinNumberOfBytesNeeded);
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         Status = ElfrReadELA(hEventLog,
                              dwReadFlags,
@@ -642,11 +642,11 @@
                              &bytesRead,
                              &minNumberOfBytesNeeded);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        Status = I_RpcMapWin32Status(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        Status = I_RpcMapWin32Status(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (!NT_SUCCESS(Status))
     {
@@ -689,7 +689,7 @@
         hEventLog, dwReadFlags, dwRecordOffset, lpBuffer,
         nNumberOfBytesToRead, pnBytesRead, pnMinNumberOfBytesNeeded);
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         Status = ElfrReadELW(hEventLog,
                              dwReadFlags,
@@ -699,11 +699,11 @@
                              &bytesRead,
                              &minNumberOfBytesNeeded);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        Status = I_RpcMapWin32Status(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        Status = I_RpcMapWin32Status(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (!NT_SUCCESS(Status))
     {
@@ -780,7 +780,7 @@
     SourceName.Length = SourceName.MaximumLength =
         lpSourceName ? wcslen(lpSourceName) * sizeof(WCHAR) : 0;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         Status = ElfrRegisterEventSourceW((LPWSTR)lpUNCServerName,
                                           &SourceName,
@@ -789,11 +789,11 @@
                                           0,
                                           &LogHandle);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        Status = I_RpcMapWin32Status(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        Status = I_RpcMapWin32Status(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (!NT_SUCCESS(Status))
     {
@@ -926,7 +926,7 @@
     /*FIXME: ComputerName */
     RtlInitEmptyUnicodeString(&ComputerName, NULL, 0);
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         Status = ElfrReportEventW(hEventLog,
                                   0, /* FIXME: Time */
@@ -943,11 +943,11 @@
                                   NULL,
                                   NULL);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        Status = I_RpcMapWin32Status(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        Status = I_RpcMapWin32Status(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     HeapFree(GetProcessHeap(), 0, Strings);
 

Modified: trunk/reactos/dll/win32/advapi32/service/scm.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/service/scm.c?rev=38620&r1=38619&r2=38620&view=diff
==============================================================================
--- trunk/reactos/dll/win32/advapi32/service/scm.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/service/scm.c [iso-8859-1] Wed Jan  7 03:44:21 2009
@@ -244,16 +244,16 @@
     if (lpInfo == NULL)
         return TRUE;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         dwError = RChangeServiceConfig2A((SC_RPC_HANDLE)hService,
                                          Info);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {
@@ -304,16 +304,16 @@
     if (lpInfo == NULL)
         return TRUE;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         dwError = RChangeServiceConfig2W((SC_RPC_HANDLE)hService,
                                          Info);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {
@@ -366,7 +366,7 @@
 
     /* FIXME: Encrypt the password */
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         /* Call to services.exe using RPC */
         dwError = RChangeServiceConfigA((SC_RPC_HANDLE)hService,
@@ -383,11 +383,11 @@
                                         0,                 /* FIXME: dwPasswordLength */
                                         (LPSTR)lpDisplayName);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {
@@ -440,7 +440,7 @@
 
     /* FIXME: Encrypt the password */
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         /* Call to services.exe using RPC */
         dwError = RChangeServiceConfigW((SC_RPC_HANDLE)hService,
@@ -457,11 +457,11 @@
                                         0,                 /* FIXME: dwPasswordLength */
                                         (LPWSTR)lpDisplayName);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {
@@ -486,16 +486,16 @@
 
     TRACE("CloseServiceHandle() called\n");
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         /* Call to services.exe using RPC */
         dwError = RCloseServiceHandle((LPSC_RPC_HANDLE)&hSCObject);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError)
     {
@@ -525,18 +525,18 @@
     TRACE("ControlService(%x, %x, %p)\n",
            hService, dwControl, lpServiceStatus);
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         /* Call to services.exe using RPC */
         dwError = RControlService((SC_RPC_HANDLE)hService,
                                   dwControl,
                                   lpServiceStatus);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {
@@ -781,7 +781,7 @@
 
     /* FIXME: Encrypt the password */
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         /* Call to services.exe using RPC */
         dwError = RCreateServiceW((SC_RPC_HANDLE)hSCManager,
@@ -801,11 +801,11 @@
                                   0,                 /* FIXME: dwPasswordLength */
                                   (SC_RPC_HANDLE *)&hService);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {
@@ -830,16 +830,16 @@
 
     TRACE("DeleteService(%x)\n", hService);
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         /* Call to services.exe using RPC */
         dwError = RDeleteService((SC_RPC_HANDLE)hService);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {
@@ -871,7 +871,7 @@
 
     TRACE("EnumServicesStatusA() called\n");
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         dwError = REnumDependentServicesA((SC_RPC_HANDLE)hService,
                                           dwServiceState,
@@ -880,11 +880,11 @@
                                           pcbBytesNeeded,
                                           lpServicesReturned);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {
@@ -932,7 +932,7 @@
 
     TRACE("EnumServicesStatusW() called\n");
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         dwError = REnumDependentServicesW((SC_RPC_HANDLE)hService,
                                           dwServiceState,
@@ -941,11 +941,11 @@
                                           pcbBytesNeeded,
                                           lpServicesReturned);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {
@@ -1019,7 +1019,7 @@
 
     TRACE("EnumServicesStatusA() called\n");
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         dwError = REnumServicesStatusA((SC_RPC_HANDLE)hSCManager,
                                        dwServiceType,
@@ -1030,11 +1030,11 @@
                                        lpServicesReturned,
                                        lpResumeHandle);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {
@@ -1084,7 +1084,7 @@
 
     TRACE("EnumServicesStatusW() called\n");
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         dwError = REnumServicesStatusW((SC_RPC_HANDLE)hSCManager,
                                        dwServiceType,
@@ -1095,11 +1095,11 @@
                                        lpServicesReturned,
                                        lpResumeHandle);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {
@@ -1151,7 +1151,7 @@
 
     TRACE("EnumServicesStatusExA() called\n");
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         dwError = REnumServicesStatusExA((SC_RPC_HANDLE)hSCManager,
                                          InfoLevel,
@@ -1164,11 +1164,11 @@
                                          lpResumeHandle,
                                          (LPSTR)pszGroupName);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError == ERROR_MORE_DATA)
     {
@@ -1228,7 +1228,7 @@
 
     TRACE("EnumServicesStatusExW() called\n");
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         dwError = REnumServicesStatusExW((SC_RPC_HANDLE)hSCManager,
                                          InfoLevel,
@@ -1241,11 +1241,11 @@
                                          lpResumeHandle,
                                          (LPWSTR)pszGroupName);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError == ERROR_MORE_DATA)
     {
@@ -1302,21 +1302,21 @@
     if (!lpDisplayName)
         *lpcchBuffer = 0;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         dwError = RGetServiceDisplayNameA((SC_RPC_HANDLE)hSCManager,
                                           lpServiceName,
                                           lpDisplayName,
                                           lpcchBuffer);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         /* HACK: because of a problem with rpcrt4, rpcserver is hacked to return 6 for ERROR_SERVICE_DOES_NOT_EXIST */
         dwError = ScmRpcStatusToWinError(RpcExceptionCode());
     }
 
 
-    _SEH2_END;
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {
@@ -1347,18 +1347,18 @@
     if (!lpDisplayName)
         *lpcchBuffer = 0;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         dwError = RGetServiceDisplayNameW((SC_RPC_HANDLE)hSCManager,
                                           lpServiceName,
                                           lpDisplayName,
                                           lpcchBuffer);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {
@@ -1389,18 +1389,18 @@
     if (!lpServiceName)
         *lpcchBuffer = 0;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         dwError = RGetServiceKeyNameA((SC_RPC_HANDLE)hSCManager,
                                       lpDisplayName,
                                       lpServiceName,
                                       lpcchBuffer);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {
@@ -1431,18 +1431,18 @@
     if (!lpDisplayName)
         *lpcchBuffer = 0;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         dwError = RGetServiceKeyNameW((SC_RPC_HANDLE)hSCManager,
                                       lpDisplayName,
                                       lpServiceName,
                                       lpcchBuffer);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {
@@ -1468,17 +1468,17 @@
 
     TRACE("LockServiceDatabase(%x)\n", hSCManager);
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         /* Call to services.exe using RPC */
         dwError = RLockServiceDatabase((SC_RPC_HANDLE)hSCManager,
                                        (SC_RPC_LOCK *)&hLock);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {
@@ -1551,7 +1551,7 @@
 
     WaitForSCManager();
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         /* Call to services.exe using RPC */
         dwError = ROpenSCManagerA((LPSTR)lpMachineName,
@@ -1559,11 +1559,11 @@
                                   dwDesiredAccess,
                                   (SC_RPC_HANDLE *)&hScm);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {
@@ -1596,7 +1596,7 @@
 
     WaitForSCManager();
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         /* Call to services.exe using RPC */
         dwError = ROpenSCManagerW((LPWSTR)lpMachineName,
@@ -1604,11 +1604,11 @@
                                   dwDesiredAccess,
                                   (SC_RPC_HANDLE *)&hScm);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {
@@ -1639,7 +1639,7 @@
     TRACE("OpenServiceA(%p, %s, %lx)\n",
            hSCManager, lpServiceName, dwDesiredAccess);
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         /* Call to services.exe using RPC */
         dwError = ROpenServiceA((SC_RPC_HANDLE)hSCManager,
@@ -1647,11 +1647,11 @@
                                 dwDesiredAccess,
                                 (SC_RPC_HANDLE *)&hService);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {
@@ -1682,7 +1682,7 @@
     TRACE("OpenServiceW(%p, %S, %lx)\n",
            hSCManager, lpServiceName, dwDesiredAccess);
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         /* Call to services.exe using RPC */
         dwError = ROpenServiceW((SC_RPC_HANDLE)hSCManager,
@@ -1690,11 +1690,11 @@
                                 dwDesiredAccess,
                                 (SC_RPC_HANDLE *)&hService);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {
@@ -1728,7 +1728,7 @@
     TRACE("QueryServiceConfigA(%p, %p, %lu, %p)\n",
            hService, lpServiceConfig, cbBufSize, pcbBytesNeeded);
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         /* Call to services.exe using RPC */
         dwError = RQueryServiceConfigA((SC_RPC_HANDLE)hService,
@@ -1736,11 +1736,11 @@
                                        cbBufSize,
                                        pcbBytesNeeded);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {
@@ -1797,7 +1797,7 @@
     TRACE("QueryServiceConfigW(%p, %p, %lu, %p)\n",
            hService, lpServiceConfig, cbBufSize, pcbBytesNeeded);
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         /* Call to services.exe using RPC */
         dwError = RQueryServiceConfigW((SC_RPC_HANDLE)hService,
@@ -1805,11 +1805,11 @@
                                        cbBufSize,
                                        pcbBytesNeeded);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {
@@ -1884,7 +1884,7 @@
         return FALSE;
     }
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         /* Call to services.exe using RPC */
         dwError = RQueryServiceConfig2A((SC_RPC_HANDLE)hService,
@@ -1893,11 +1893,11 @@
                                         cbBufSize,
                                         pcbBytesNeeded);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {
@@ -1979,7 +1979,7 @@
         return FALSE;
     }
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         /* Call to services.exe using RPC */
         dwError = RQueryServiceConfig2W((SC_RPC_HANDLE)hService,
@@ -1988,11 +1988,11 @@
                                         cbBufSize,
                                         pcbBytesNeeded);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {
@@ -2058,7 +2058,7 @@
 
     TRACE("QueryServiceLockStatusA() called\n");
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         /* Call to services.exe using RPC */
         dwError = RQueryServiceLockStatusA((SC_RPC_HANDLE)hSCManager,
@@ -2066,11 +2066,11 @@
                                            cbBufSize,
                                            pcbBytesNeeded);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {
@@ -2106,7 +2106,7 @@
 
     TRACE("QueryServiceLockStatusW() called\n");
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         /* Call to services.exe using RPC */
         dwError = RQueryServiceLockStatusW((SC_RPC_HANDLE)hSCManager,
@@ -2114,11 +2114,11 @@
                                            cbBufSize,
                                            pcbBytesNeeded);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {
@@ -2156,7 +2156,7 @@
     TRACE("QueryServiceObjectSecurity(%p, %lu, %p)\n",
            hService, dwSecurityInformation, lpSecurityDescriptor);
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         /* Call to services.exe using RPC */
         dwError = RQueryServiceObjectSecurity((SC_RPC_HANDLE)hService,
@@ -2165,11 +2165,11 @@
                                               cbBufSize,
                                               pcbBytesNeeded);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {
@@ -2223,7 +2223,7 @@
         return FALSE;
     }
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         /* Call to services.exe using RPC */
         dwError = RSetServiceObjectSecurity((SC_RPC_HANDLE)hService,
@@ -2231,11 +2231,11 @@
                                             (LPBYTE)SelfRelativeSD,
                                             Length);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     HeapFree(GetProcessHeap(), 0, SelfRelativeSD);
 
@@ -2264,17 +2264,17 @@
     TRACE("QueryServiceStatus(%p, %p)\n",
            hService, lpServiceStatus);
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         /* Call to services.exe using RPC */
         dwError = RQueryServiceStatus((SC_RPC_HANDLE)hService,
                                       lpServiceStatus);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {
@@ -2303,7 +2303,7 @@
 
     TRACE("QueryServiceStatusEx() called\n");
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         /* Call to services.exe using RPC */
         dwError = RQueryServiceStatusEx((SC_RPC_HANDLE)hService,
@@ -2312,11 +2312,11 @@
                                         cbBufSize,
                                         pcbBytesNeeded);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {
@@ -2341,17 +2341,17 @@
 {
     DWORD dwError;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         dwError = RStartServiceA((SC_RPC_HANDLE)hService,
                                  dwNumServiceArgs,
                                  (LPSTRING_PTRSA)lpServiceArgVectors);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {
@@ -2376,17 +2376,17 @@
 {
     DWORD dwError;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         dwError = RStartServiceW((SC_RPC_HANDLE)hService,
                                  dwNumServiceArgs,
                                  (LPSTRING_PTRSW)lpServiceArgVectors);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {
@@ -2411,16 +2411,16 @@
 
     TRACE("UnlockServiceDatabase(%x)\n", ScLock);
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         /* Call to services.exe using RPC */
         dwError = RUnlockServiceDatabase((LPSC_RPC_LOCK)&ScLock);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {
@@ -2445,17 +2445,17 @@
 
     TRACE("NotifyBootConfigStatus()\n");
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         /* Call to services.exe using RPC */
         dwError = RNotifyBootConfigStatus(NULL,
                                           BootAcceptable);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-    {
-        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
-    }
-    _SEH2_END;
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+    }
+    RpcEndExcept;
 
     if (dwError != ERROR_SUCCESS)
     {

Modified: trunk/reactos/dll/win32/advapi32/service/sctrl.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/service/sctrl.c?rev=38620&r1=38619&r2=38620&view=diff
==============================================================================
--- trunk/reactos/dll/win32/advapi32/service/sctrl.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/service/sctrl.c [iso-8859-1] Wed Jan  7 03:44:21 2009
@@ -541,7 +541,7 @@
 {
     BOOL bResult;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         /* Call to services.exe using RPC */
         bResult = RI_ScSetServiceBitsA((RPC_SERVICE_STATUS_HANDLE)hServiceStatus,
@@ -550,12 +550,12 @@
                                        bUpdateImmediately,
                                        lpString);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         SetLastError(ScmRpcStatusToWinError(RpcExceptionCode()));
         bResult = FALSE;
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     return bResult;
 }
@@ -577,7 +577,7 @@
 {
     BOOL bResult;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         /* Call to services.exe using RPC */
         bResult = RI_ScSetServiceBitsW((RPC_SERVICE_STATUS_HANDLE)hServiceStatus,
@@ -586,12 +586,12 @@
                                        bUpdateImmediately,
                                        lpString);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         SetLastError(ScmRpcStatusToWinError(RpcExceptionCode()));
         bResult = FALSE;
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     return bResult;
 }

Modified: trunk/reactos/dll/win32/setupapi/cfgmgr.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/cfgmgr.c?rev=38620&r1=38619&r2=38620&view=diff
==============================================================================
--- trunk/reactos/dll/win32/setupapi/cfgmgr.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/setupapi/cfgmgr.c [iso-8859-1] Wed Jan  7 03:44:21 2009
@@ -119,15 +119,15 @@
     if (!PnpGetLocalHandles(&BindingHandle, NULL))
         return CR_FAILURE;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_InitDetection(BindingHandle);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     return ret;
 }
@@ -157,17 +157,17 @@
 
     for (i = 0; i < 30; i++)
     {
-        _SEH2_TRY
+        RpcTryExcept
         {
             ret = PNP_ReportLogOn(BindingHandle,
                                   bAdmin,
                                   dwProcessId);
         }
-        _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+        RpcExcept(EXCEPTION_EXECUTE_HANDLER)
         {
             ret = RpcStatusToCmStatus(RpcExceptionCode());
         }
-        _SEH2_END;
+        RpcEndExcept;
 
         if (ret == CR_SUCCESS)
             break;
@@ -244,16 +244,16 @@
     if (lpDevInst == NULL)
         return CR_INVALID_DEVNODE;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_AddEmptyLogConf(BindingHandle, lpDevInst, Priority,
                                   &ulLogConfTag, ulFlags);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     if (ret == CR_SUCCESS)
     {
@@ -368,18 +368,18 @@
     if (lpDevInst == NULL)
         return CR_INVALID_DEVNODE;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_AddID(BindingHandle,
                         lpDevInst,
                         pszID,
                         ulFlags);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     return ret;
 }
@@ -578,7 +578,7 @@
     if (lpParentDevInst == NULL)
         return CR_INVALID_DEVNODE;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_CreateDevInst(BindingHandle,
                                 pDeviceID,
@@ -586,11 +586,11 @@
                                 MAX_DEVICE_ID_LEN,
                                 ulFlags);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     if (ret == CR_SUCCESS)
     {
@@ -647,17 +647,17 @@
             return CR_FAILURE;
     }
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_DeleteClassKey(BindingHandle,
                                  szGuidString,
                                  ulFlags);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     return ret;
 }
@@ -742,7 +742,7 @@
     if (lpDevInst == NULL)
         return CR_INVALID_DEVNODE;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_DeviceInstanceAction(BindingHandle,
                                        5,
@@ -750,11 +750,11 @@
                                        lpDevInst,
                                        NULL);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     return ret;
 }
@@ -841,7 +841,7 @@
     if (lpDevInst == NULL)
         return CR_INVALID_DEVNODE;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_DeviceInstanceAction(BindingHandle,
                                        4,
@@ -849,11 +849,11 @@
                                        lpDevInst,
                                        NULL);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     return ret;
 }
@@ -901,7 +901,7 @@
             return CR_FAILURE;
     }
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_EnumerateSubKeys(BindingHandle,
                                    PNP_CLASS_SUBKEYS,
@@ -911,11 +911,11 @@
                                    &ulLength,
                                    ulFlags);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     if (ret == CR_SUCCESS)
     {
@@ -1034,7 +1034,7 @@
             return CR_FAILURE;
     }
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_EnumerateSubKeys(BindingHandle,
                                    PNP_ENUMERATOR_SUBKEYS,
@@ -1044,11 +1044,11 @@
                                    pulLength,
                                    ulFlags);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     return ret;
 }
@@ -1109,16 +1109,16 @@
     if (lpDevInst == NULL)
         return CR_INVALID_DEVNODE;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_FreeLogConf(BindingHandle, lpDevInst, pLogConfInfo->ulFlags,
                               pLogConfInfo->ulTag, 0);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     return ret;
 }
@@ -1201,7 +1201,7 @@
     if (lpDevInst == NULL)
         return CR_INVALID_DEVNODE;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_GetRelatedDeviceInstance(BindingHandle,
                                            PNP_GET_CHILD_DEVICE_INSTANCE,
@@ -1210,11 +1210,11 @@
                                            &dwLength,
                                            0);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     if (ret != CR_SUCCESS)
         return ret;
@@ -1436,7 +1436,7 @@
             return CR_FAILURE;
     }
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_GetClassName(BindingHandle,
                                szGuidString,
@@ -1444,11 +1444,11 @@
                                pulLength,
                                ulFlags);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     return ret;
 }
@@ -1508,18 +1508,18 @@
     if (lpDevInst == NULL)
         return CR_INVALID_DEVNODE;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_GetDepth(BindingHandle,
                            lpDevInst,
                            pulDepth,
                            ulFlags);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     return ret;
 }
@@ -1687,7 +1687,7 @@
 
     ulTransferLength = *pulLength;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_GetDeviceRegProp(BindingHandle,
                                    lpDevInst,
@@ -1698,11 +1698,11 @@
                                    pulLength,
                                    ulFlags);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     if (ret == CR_SUCCESS)
     {
@@ -1773,7 +1773,7 @@
     if (lpDevInst == NULL)
         return CR_INVALID_DEVNODE;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_GetDeviceStatus(BindingHandle,
                                   lpDevInst,
@@ -1781,11 +1781,11 @@
                                   pulProblemNumber,
                                   ulFlags);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     return ret;
 }
@@ -2082,18 +2082,18 @@
 
     *pulLen = 0;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_GetDeviceListSize(BindingHandle,
                                     (LPWSTR)pszFilter,
                                     pulLen,
                                     ulFlags);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     return ret;
 }
@@ -2210,7 +2210,7 @@
     if (lpDevInst == NULL)
         return CR_INVALID_DEVNODE;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_GetFirstLogConf(BindingHandle,
                                   lpDevInst,
@@ -2218,11 +2218,11 @@
                                   &ulTag,
                                   ulFlags);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     if (ret != CR_SUCCESS)
         return ret;
@@ -2282,15 +2282,15 @@
             return CR_FAILURE;
     }
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_GetGlobalState(BindingHandle, pulState, ulFlags);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     return ret;
 }
@@ -2388,16 +2388,16 @@
             return CR_FAILURE;
     }
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_HwProfFlags(BindingHandle, PNP_GET_HWPROFFLAGS, szDevInstName,
                               ulHardwareProfile, pulValue, NULL, NULL, 0, 0);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     return ret;
 }
@@ -2459,7 +2459,7 @@
     if (lpDevInst == NULL)
         return CR_INVALID_DEVNODE;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_GetLogConfPriority(BindingHandle,
                                      lpDevInst,
@@ -2468,11 +2468,11 @@
                                      pPriority,
                                      0);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     return ret;
 }
@@ -2536,7 +2536,7 @@
     if (lpDevInst == NULL)
         return CR_INVALID_DEVNODE;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_GetNextLogConf(BindingHandle,
                                  lpDevInst,
@@ -2545,11 +2545,11 @@
                                  &ulNewTag,
                                  0);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     if (ret != CR_SUCCESS)
         return ret;
@@ -2629,7 +2629,7 @@
     if (lpDevInst == NULL)
         return CR_INVALID_DEVNODE;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_GetRelatedDeviceInstance(BindingHandle,
                                            PNP_GET_PARENT_DEVICE_INSTANCE,
@@ -2638,11 +2638,11 @@
                                            &dwLength,
                                            0);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     if (ret != CR_SUCCESS)
         return ret;
@@ -2716,7 +2716,7 @@
     if (lpDevInst == NULL)
         return CR_INVALID_DEVNODE;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_GetRelatedDeviceInstance(BindingHandle,
                                            PNP_GET_SIBLING_DEVICE_INSTANCE,
@@ -2725,11 +2725,11 @@
                                            &dwLength,
                                            0);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     if (ret != CR_SUCCESS)
         return ret;
@@ -2779,15 +2779,15 @@
             return CR_FAILURE;
     }
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_GetVersion(BindingHandle, &Version);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     if (ret != CR_SUCCESS)
         return 0;
@@ -2835,16 +2835,16 @@
             return CR_FAILURE;
     }
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_IsDockStationPresent(BindingHandle,
                                        pbPresent);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     return ret;
 }
@@ -2939,36 +2939,36 @@
     }
     else
     {
-        _SEH2_TRY
+        RpcTryExcept
         {
             /* Get the root device ID */
             ret = PNP_GetRootDeviceInstance(BindingHandle,
                                             DeviceIdBuffer,
                                             MAX_DEVICE_ID_LEN);
         }
-        _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+        RpcExcept(EXCEPTION_EXECUTE_HANDLER)
         {
             ret = RpcStatusToCmStatus(RpcExceptionCode());
         }
-        _SEH2_END;
+        RpcEndExcept;
 
         if (ret != CR_SUCCESS)
             return CR_FAILURE;
     }
     TRACE("DeviceIdBuffer: %s\n", debugstr_w(DeviceIdBuffer));
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         /* Validate the device ID */
         ret = PNP_ValidateDeviceInstance(BindingHandle,
                                          DeviceIdBuffer,
                                          ulFlags);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     if (ret == CR_SUCCESS)
     {
@@ -3041,7 +3041,7 @@
     if (lpToDevInst == NULL)
         return CR_INVALID_DEVNODE;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_DeviceInstanceAction(BindingHandle,
                                        2,
@@ -3049,11 +3049,11 @@
                                        lpFromDevInst,
                                        lpToDevInst);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     return ret;
 }
@@ -3298,7 +3298,7 @@
     if (lpDevInst == NULL)
         return CR_INVALID_DEVNODE;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_DeviceInstanceAction(BindingHandle,
                                        7,
@@ -3306,11 +3306,11 @@
                                        lpDevInst,
                                        NULL);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     return ret;
 }
@@ -3349,15 +3349,15 @@
             return CR_FAILURE;
     }
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_RequestEjectPC(BindingHandle);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     return ret;
 }
@@ -3403,16 +3403,16 @@
             return CR_FAILURE;
     }
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_RunDetection(BindingHandle,
                                ulFlags);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     return ret;
 }
@@ -3468,18 +3468,18 @@
     if (lpDevInst == NULL)
         return CR_INVALID_DEVNODE;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_SetDeviceProblem(BindingHandle,
                                    lpDevInst,
                                    ulProblem,
                                    ulFlags);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     return ret;
 }
@@ -3754,7 +3754,7 @@
             return CR_INVALID_PROPERTY;
     }
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_SetDeviceRegProp(BindingHandle,
                                    lpDevInst,
@@ -3764,11 +3764,11 @@
                                    ulLength,
                                    ulFlags);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     return ret;
 }
@@ -3864,16 +3864,16 @@
             return CR_FAILURE;
     }
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_HwProfFlags(BindingHandle, PNP_SET_HWPROFFLAGS, szDevInstName,
                               ulConfig, &ulValue, NULL, NULL, 0, 0);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     return ret;
 }
@@ -3932,7 +3932,7 @@
     if (lpDevInst == NULL)
         return CR_INVALID_DEVNODE;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_DeviceInstanceAction(BindingHandle,
                                        3,
@@ -3940,11 +3940,11 @@
                                        lpDevInst,
                                        NULL);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
+    RpcEndExcept;
 
     return ret;
 }
@@ -4000,17 +4000,17 @@
     if (lpDevInst == NULL)
         return CR_INVALID_DEVNODE;
 
-    _SEH2_TRY
+    RpcTryExcept
     {
         ret = PNP_UninstallDevInst(BindingHandle,
                                    lpDevInst,
                                    ulFlags);
     }
-    _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
     {
         ret = RpcStatusToCmStatus(RpcExceptionCode());
     }
-    _SEH2_END;
-
-    return ret;
-}
+    RpcEndExcept;
+
+    return ret;
+}



More information about the Ros-diffs mailing list