Author: mjmartin
Date: Wed Nov 26 04:45:42 2008
New Revision: 37656
URL:
http://svn.reactos.org/svn/reactos?rev=37656&view=rev
Log:
- Migrate advapi32 to PSEH 2.0.
Modified:
trunk/reactos/dll/win32/advapi32/advapi32.rbuild
trunk/reactos/dll/win32/advapi32/service/eventlog.c
trunk/reactos/dll/win32/advapi32/service/scm.c
trunk/reactos/dll/win32/advapi32/service/sctrl.c
Modified: trunk/reactos/dll/win32/advapi32/advapi32.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/advapi3…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/advapi32.rbuild [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/advapi32.rbuild [iso-8859-1] Wed Nov 26 04:45:42
2008
@@ -60,4 +60,5 @@
<file>token.c</file>
</directory>
<file>advapi32.rc</file>
+ <compilerflag>-fno-unit-at-a-time</compilerflag>
</module>
Modified: trunk/reactos/dll/win32/advapi32/service/eventlog.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/service…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/service/eventlog.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/service/eventlog.c [iso-8859-1] Wed Nov 26 04:45:42
2008
@@ -155,16 +155,16 @@
BackupFileName.Length = BackupFileName.MaximumLength =
lpBackupFileName ? strlen(lpBackupFileName) : 0;
- _SEH_TRY
+ _SEH2_TRY
{
Status = ElfrBackupELFA(hEventLog,
&BackupFileName);
}
- _SEH_HANDLE
- {
- Status = I_RpcMapWin32Status(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ Status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ _SEH2_END;
if (!NT_SUCCESS(Status))
{
@@ -195,16 +195,16 @@
BackupFileName.Length = BackupFileName.MaximumLength =
lpBackupFileName ? wcslen(lpBackupFileName) * sizeof(WCHAR) : 0;
- _SEH_TRY
+ _SEH2_TRY
{
Status = ElfrBackupELFW(hEventLog,
&BackupFileName);
}
- _SEH_HANDLE
- {
- Status = I_RpcMapWin32Status(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ Status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ _SEH2_END;
if (!NT_SUCCESS(Status))
{
@@ -232,16 +232,16 @@
BackupFileName.Length = BackupFileName.MaximumLength =
lpBackupFileName ? strlen(lpBackupFileName) : 0;
- _SEH_TRY
+ _SEH2_TRY
{
Status = ElfrClearELFA(hEventLog,
&BackupFileName);
}
- _SEH_HANDLE
- {
- Status = I_RpcMapWin32Status(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ Status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ _SEH2_END;
if (!NT_SUCCESS(Status))
{
@@ -269,16 +269,16 @@
BackupFileName.Length = BackupFileName.MaximumLength =
lpBackupFileName ? wcslen(lpBackupFileName) * sizeof(WCHAR) : 0;
- _SEH_TRY
+ _SEH2_TRY
{
Status = ElfrClearELFW(hEventLog,
&BackupFileName);
}
- _SEH_HANDLE
- {
- Status = I_RpcMapWin32Status(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ Status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ _SEH2_END;
if (!NT_SUCCESS(Status))
{
@@ -300,15 +300,15 @@
TRACE("%p\n", hEventLog);
- _SEH_TRY
+ _SEH2_TRY
{
Status = ElfrCloseEL(&hEventLog);
}
- _SEH_HANDLE
- {
- Status = I_RpcMapWin32Status(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ Status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ _SEH2_END;
if (!NT_SUCCESS(Status))
{
@@ -336,15 +336,15 @@
TRACE("%p\n", hEventLog);
- _SEH_TRY
+ _SEH2_TRY
{
Status = ElfrDeregisterEventSource(&hEventLog);
}
- _SEH_HANDLE
- {
- Status = I_RpcMapWin32Status(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ Status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ _SEH2_END;
if (!NT_SUCCESS(Status))
{
@@ -372,16 +372,16 @@
TRACE("%p, %p\n", hEventLog, NumberOfRecords);
- _SEH_TRY
+ _SEH2_TRY
{
Status = ElfrNumberOfRecords(hEventLog,
&Records);
}
- _SEH_HANDLE
- {
- Status = I_RpcMapWin32Status(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ Status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ _SEH2_END;
if (!NT_SUCCESS(Status))
{
@@ -411,16 +411,16 @@
TRACE("%p, %p\n", hEventLog, OldestRecord);
- _SEH_TRY
+ _SEH2_TRY
{
Status = ElfrOldestRecord(hEventLog,
&Oldest);
}
- _SEH_HANDLE
- {
- Status = I_RpcMapWin32Status(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ Status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ _SEH2_END;
if (!NT_SUCCESS(Status))
{
@@ -509,7 +509,7 @@
FileName.Length = FileName.MaximumLength =
lpFileName ? wcslen(lpFileName) * sizeof(WCHAR) : 0;
- _SEH_TRY
+ _SEH2_TRY
{
Status = ElfrOpenBELW((LPWSTR)lpUNCServerName,
&FileName,
@@ -517,11 +517,11 @@
0,
&LogHandle);
}
- _SEH_HANDLE
- {
- Status = I_RpcMapWin32Status(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ Status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ _SEH2_END;
if (!NT_SUCCESS(Status))
{
@@ -588,7 +588,7 @@
SourceName.Length = SourceName.MaximumLength =
lpSourceName ? wcslen(lpSourceName) * sizeof(WCHAR) : 0;
- _SEH_TRY
+ _SEH2_TRY
{
Status = ElfrOpenELW((LPWSTR)lpUNCServerName,
&SourceName,
@@ -597,11 +597,11 @@
0,
&LogHandle);
}
- _SEH_HANDLE
- {
- Status = I_RpcMapWin32Status(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ Status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ _SEH2_END;
if (!NT_SUCCESS(Status))
{
@@ -632,7 +632,7 @@
hEventLog, dwReadFlags, dwRecordOffset, lpBuffer,
nNumberOfBytesToRead, pnBytesRead, pnMinNumberOfBytesNeeded);
- _SEH_TRY
+ _SEH2_TRY
{
Status = ElfrReadELA(hEventLog,
dwReadFlags,
@@ -642,11 +642,11 @@
&bytesRead,
&minNumberOfBytesNeeded);
}
- _SEH_HANDLE
- {
- Status = I_RpcMapWin32Status(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ Status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ _SEH2_END;
if (!NT_SUCCESS(Status))
{
@@ -689,7 +689,7 @@
hEventLog, dwReadFlags, dwRecordOffset, lpBuffer,
nNumberOfBytesToRead, pnBytesRead, pnMinNumberOfBytesNeeded);
- _SEH_TRY
+ _SEH2_TRY
{
Status = ElfrReadELW(hEventLog,
dwReadFlags,
@@ -699,11 +699,11 @@
&bytesRead,
&minNumberOfBytesNeeded);
}
- _SEH_HANDLE
- {
- Status = I_RpcMapWin32Status(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ Status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ _SEH2_END;
if (!NT_SUCCESS(Status))
{
@@ -780,7 +780,7 @@
SourceName.Length = SourceName.MaximumLength =
lpSourceName ? wcslen(lpSourceName) * sizeof(WCHAR) : 0;
- _SEH_TRY
+ _SEH2_TRY
{
Status = ElfrRegisterEventSourceW((LPWSTR)lpUNCServerName,
&SourceName,
@@ -789,11 +789,11 @@
0,
&LogHandle);
}
- _SEH_HANDLE
- {
- Status = I_RpcMapWin32Status(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ Status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ _SEH2_END;
if (!NT_SUCCESS(Status))
{
@@ -926,7 +926,7 @@
/*FIXME: ComputerName */
RtlInitEmptyUnicodeString(&ComputerName, NULL, 0);
- _SEH_TRY
+ _SEH2_TRY
{
Status = ElfrReportEventW(hEventLog,
0, /* FIXME: Time */
@@ -943,11 +943,11 @@
NULL,
NULL);
}
- _SEH_HANDLE
- {
- Status = I_RpcMapWin32Status(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ Status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ _SEH2_END;
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…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/service/scm.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/service/scm.c [iso-8859-1] Wed Nov 26 04:45:42 2008
@@ -242,16 +242,16 @@
if (lpInfo == NULL)
return TRUE;
- _SEH_TRY
+ _SEH2_TRY
{
dwError = RChangeServiceConfig2A((SC_RPC_HANDLE)hService,
Info);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError != ERROR_SUCCESS)
{
@@ -302,16 +302,16 @@
if (lpInfo == NULL)
return TRUE;
- _SEH_TRY
+ _SEH2_TRY
{
dwError = RChangeServiceConfig2W((SC_RPC_HANDLE)hService,
Info);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError != ERROR_SUCCESS)
{
@@ -364,7 +364,7 @@
/* FIXME: Encrypt the password */
- _SEH_TRY
+ _SEH2_TRY
{
/* Call to services.exe using RPC */
dwError = RChangeServiceConfigA((SC_RPC_HANDLE)hService,
@@ -381,11 +381,11 @@
0, /* FIXME: dwPasswordLength */
(LPSTR)lpDisplayName);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError != ERROR_SUCCESS)
{
@@ -438,7 +438,7 @@
/* FIXME: Encrypt the password */
- _SEH_TRY
+ _SEH2_TRY
{
/* Call to services.exe using RPC */
dwError = RChangeServiceConfigW((SC_RPC_HANDLE)hService,
@@ -455,11 +455,11 @@
0, /* FIXME: dwPasswordLength */
(LPWSTR)lpDisplayName);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError != ERROR_SUCCESS)
{
@@ -484,16 +484,16 @@
TRACE("CloseServiceHandle() called\n");
- _SEH_TRY
+ _SEH2_TRY
{
/* Call to services.exe using RPC */
dwError = RCloseServiceHandle((LPSC_RPC_HANDLE)&hSCObject);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError)
{
@@ -523,18 +523,18 @@
TRACE("ControlService(%x, %x, %p)\n",
hService, dwControl, lpServiceStatus);
- _SEH_TRY
+ _SEH2_TRY
{
/* Call to services.exe using RPC */
dwError = RControlService((SC_RPC_HANDLE)hService,
dwControl,
lpServiceStatus);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError != ERROR_SUCCESS)
{
@@ -777,7 +777,7 @@
/* FIXME: Encrypt the password */
- _SEH_TRY
+ _SEH2_TRY
{
/* Call to services.exe using RPC */
dwError = RCreateServiceW((SC_RPC_HANDLE)hSCManager,
@@ -797,11 +797,11 @@
0, /* FIXME: dwPasswordLength */
(SC_RPC_HANDLE *)&hService);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError != ERROR_SUCCESS)
{
@@ -826,16 +826,16 @@
TRACE("DeleteService(%x)\n", hService);
- _SEH_TRY
+ _SEH2_TRY
{
/* Call to services.exe using RPC */
dwError = RDeleteService((SC_RPC_HANDLE)hService);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError != ERROR_SUCCESS)
{
@@ -867,7 +867,7 @@
TRACE("EnumServicesStatusA() called\n");
- _SEH_TRY
+ _SEH2_TRY
{
dwError = REnumDependentServicesA((SC_RPC_HANDLE)hService,
dwServiceState,
@@ -876,11 +876,11 @@
pcbBytesNeeded,
lpServicesReturned);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError != ERROR_SUCCESS)
{
@@ -928,7 +928,7 @@
TRACE("EnumServicesStatusW() called\n");
- _SEH_TRY
+ _SEH2_TRY
{
dwError = REnumDependentServicesW((SC_RPC_HANDLE)hService,
dwServiceState,
@@ -937,11 +937,11 @@
pcbBytesNeeded,
lpServicesReturned);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError != ERROR_SUCCESS)
{
@@ -1015,7 +1015,7 @@
TRACE("EnumServicesStatusA() called\n");
- _SEH_TRY
+ _SEH2_TRY
{
dwError = REnumServicesStatusA((SC_RPC_HANDLE)hSCManager,
dwServiceType,
@@ -1026,11 +1026,11 @@
lpServicesReturned,
lpResumeHandle);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError != ERROR_SUCCESS)
{
@@ -1080,7 +1080,7 @@
TRACE("EnumServicesStatusW() called\n");
- _SEH_TRY
+ _SEH2_TRY
{
dwError = REnumServicesStatusW((SC_RPC_HANDLE)hSCManager,
dwServiceType,
@@ -1091,11 +1091,11 @@
lpServicesReturned,
lpResumeHandle);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError != ERROR_SUCCESS)
{
@@ -1147,7 +1147,7 @@
TRACE("EnumServicesStatusExA() called\n");
- _SEH_TRY
+ _SEH2_TRY
{
dwError = REnumServicesStatusExA((SC_RPC_HANDLE)hSCManager,
InfoLevel,
@@ -1160,11 +1160,11 @@
lpResumeHandle,
(LPSTR)pszGroupName);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError == ERROR_MORE_DATA)
{
@@ -1224,7 +1224,7 @@
TRACE("EnumServicesStatusExW() called\n");
- _SEH_TRY
+ _SEH2_TRY
{
dwError = REnumServicesStatusExW((SC_RPC_HANDLE)hSCManager,
InfoLevel,
@@ -1237,11 +1237,11 @@
lpResumeHandle,
(LPWSTR)pszGroupName);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError == ERROR_MORE_DATA)
{
@@ -1296,21 +1296,21 @@
if (!lpDisplayName)
*lpcchBuffer = 0;
- _SEH_TRY
+ _SEH2_TRY
{
dwError = RGetServiceDisplayNameA((SC_RPC_HANDLE)hSCManager,
(LPSTR)lpServiceName,
lpDisplayName,
lpcchBuffer);
}
- _SEH_HANDLE
+ _SEH2_EXCEPT(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());
}
- _SEH_END;
+ _SEH2_END;
if (dwError != ERROR_SUCCESS)
{
@@ -1341,18 +1341,18 @@
if (!lpDisplayName)
*lpcchBuffer = 0;
- _SEH_TRY
+ _SEH2_TRY
{
dwError = RGetServiceDisplayNameW((SC_RPC_HANDLE)hSCManager,
(LPWSTR)lpServiceName,
lpDisplayName,
lpcchBuffer);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError != ERROR_SUCCESS)
{
@@ -1383,18 +1383,18 @@
if (!lpServiceName)
*lpcchBuffer = 0;
- _SEH_TRY
+ _SEH2_TRY
{
dwError = RGetServiceKeyNameA((SC_RPC_HANDLE)hSCManager,
(LPSTR)lpDisplayName,
lpServiceName,
lpcchBuffer);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError != ERROR_SUCCESS)
{
@@ -1425,18 +1425,18 @@
if (!lpDisplayName)
*lpcchBuffer = 0;
- _SEH_TRY
+ _SEH2_TRY
{
dwError = RGetServiceKeyNameW((SC_RPC_HANDLE)hSCManager,
(LPWSTR)lpDisplayName,
lpServiceName,
lpcchBuffer);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError != ERROR_SUCCESS)
{
@@ -1462,17 +1462,17 @@
TRACE("LockServiceDatabase(%x)\n", hSCManager);
- _SEH_TRY
+ _SEH2_TRY
{
/* Call to services.exe using RPC */
dwError = RLockServiceDatabase((SC_RPC_HANDLE)hSCManager,
(SC_RPC_LOCK *)&hLock);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError != ERROR_SUCCESS)
{
@@ -1545,7 +1545,7 @@
WaitForSCManager();
- _SEH_TRY
+ _SEH2_TRY
{
/* Call to services.exe using RPC */
dwError = ROpenSCManagerA((LPSTR)lpMachineName,
@@ -1553,11 +1553,11 @@
dwDesiredAccess,
(SC_RPC_HANDLE *)&hScm);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError != ERROR_SUCCESS)
{
@@ -1590,7 +1590,7 @@
WaitForSCManager();
- _SEH_TRY
+ _SEH2_TRY
{
/* Call to services.exe using RPC */
dwError = ROpenSCManagerW((LPWSTR)lpMachineName,
@@ -1598,11 +1598,11 @@
dwDesiredAccess,
(SC_RPC_HANDLE *)&hScm);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError != ERROR_SUCCESS)
{
@@ -1633,7 +1633,7 @@
TRACE("OpenServiceA(%p, %s, %lx)\n",
hSCManager, lpServiceName, dwDesiredAccess);
- _SEH_TRY
+ _SEH2_TRY
{
/* Call to services.exe using RPC */
dwError = ROpenServiceA((SC_RPC_HANDLE)hSCManager,
@@ -1641,11 +1641,11 @@
dwDesiredAccess,
(SC_RPC_HANDLE *)&hService);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError != ERROR_SUCCESS)
{
@@ -1676,7 +1676,7 @@
TRACE("OpenServiceW(%p, %S, %lx)\n",
hSCManager, lpServiceName, dwDesiredAccess);
- _SEH_TRY
+ _SEH2_TRY
{
/* Call to services.exe using RPC */
dwError = ROpenServiceW((SC_RPC_HANDLE)hSCManager,
@@ -1684,11 +1684,11 @@
dwDesiredAccess,
(SC_RPC_HANDLE *)&hService);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError != ERROR_SUCCESS)
{
@@ -1722,7 +1722,7 @@
TRACE("QueryServiceConfigA(%p, %p, %lu, %p)\n",
hService, lpServiceConfig, cbBufSize, pcbBytesNeeded);
- _SEH_TRY
+ _SEH2_TRY
{
/* Call to services.exe using RPC */
dwError = RQueryServiceConfigA((SC_RPC_HANDLE)hService,
@@ -1730,11 +1730,11 @@
cbBufSize,
pcbBytesNeeded);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError != ERROR_SUCCESS)
{
@@ -1791,7 +1791,7 @@
TRACE("QueryServiceConfigW(%p, %p, %lu, %p)\n",
hService, lpServiceConfig, cbBufSize, pcbBytesNeeded);
- _SEH_TRY
+ _SEH2_TRY
{
/* Call to services.exe using RPC */
dwError = RQueryServiceConfigW((SC_RPC_HANDLE)hService,
@@ -1799,11 +1799,11 @@
cbBufSize,
pcbBytesNeeded);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError != ERROR_SUCCESS)
{
@@ -1878,7 +1878,7 @@
return FALSE;
}
- _SEH_TRY
+ _SEH2_TRY
{
/* Call to services.exe using RPC */
dwError = RQueryServiceConfig2A((SC_RPC_HANDLE)hService,
@@ -1887,11 +1887,11 @@
cbBufSize,
pcbBytesNeeded);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError != ERROR_SUCCESS)
{
@@ -1973,7 +1973,7 @@
return FALSE;
}
- _SEH_TRY
+ _SEH2_TRY
{
/* Call to services.exe using RPC */
dwError = RQueryServiceConfig2W((SC_RPC_HANDLE)hService,
@@ -1982,11 +1982,11 @@
cbBufSize,
pcbBytesNeeded);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError != ERROR_SUCCESS)
{
@@ -2052,7 +2052,7 @@
TRACE("QueryServiceLockStatusA() called\n");
- _SEH_TRY
+ _SEH2_TRY
{
/* Call to services.exe using RPC */
dwError = RQueryServiceLockStatusA((SC_RPC_HANDLE)hSCManager,
@@ -2060,11 +2060,11 @@
cbBufSize,
pcbBytesNeeded);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError != ERROR_SUCCESS)
{
@@ -2100,7 +2100,7 @@
TRACE("QueryServiceLockStatusW() called\n");
- _SEH_TRY
+ _SEH2_TRY
{
/* Call to services.exe using RPC */
dwError = RQueryServiceLockStatusW((SC_RPC_HANDLE)hSCManager,
@@ -2108,11 +2108,11 @@
cbBufSize,
pcbBytesNeeded);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError != ERROR_SUCCESS)
{
@@ -2150,7 +2150,7 @@
TRACE("QueryServiceObjectSecurity(%p, %lu, %p)\n",
hService, dwSecurityInformation, lpSecurityDescriptor);
- _SEH_TRY
+ _SEH2_TRY
{
/* Call to services.exe using RPC */
dwError = RQueryServiceObjectSecurity((SC_RPC_HANDLE)hService,
@@ -2159,11 +2159,11 @@
cbBufSize,
pcbBytesNeeded);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError != ERROR_SUCCESS)
{
@@ -2217,7 +2217,7 @@
return FALSE;
}
- _SEH_TRY
+ _SEH2_TRY
{
/* Call to services.exe using RPC */
dwError = RSetServiceObjectSecurity((SC_RPC_HANDLE)hService,
@@ -2225,11 +2225,11 @@
(LPBYTE)SelfRelativeSD,
Length);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
HeapFree(GetProcessHeap(), 0, SelfRelativeSD);
@@ -2258,17 +2258,17 @@
TRACE("QueryServiceStatus(%p, %p)\n",
hService, lpServiceStatus);
- _SEH_TRY
+ _SEH2_TRY
{
/* Call to services.exe using RPC */
dwError = RQueryServiceStatus((SC_RPC_HANDLE)hService,
lpServiceStatus);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError != ERROR_SUCCESS)
{
@@ -2297,7 +2297,7 @@
TRACE("QueryServiceStatusEx() called\n");
- _SEH_TRY
+ _SEH2_TRY
{
/* Call to services.exe using RPC */
dwError = RQueryServiceStatusEx((SC_RPC_HANDLE)hService,
@@ -2306,11 +2306,11 @@
cbBufSize,
pcbBytesNeeded);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError != ERROR_SUCCESS)
{
@@ -2335,17 +2335,17 @@
{
DWORD dwError;
- _SEH_TRY
+ _SEH2_TRY
{
dwError = RStartServiceA((SC_RPC_HANDLE)hService,
dwNumServiceArgs,
(LPSTRING_PTRSA)lpServiceArgVectors);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError != ERROR_SUCCESS)
{
@@ -2370,17 +2370,17 @@
{
DWORD dwError;
- _SEH_TRY
+ _SEH2_TRY
{
dwError = RStartServiceW((SC_RPC_HANDLE)hService,
dwNumServiceArgs,
(LPSTRING_PTRSW)lpServiceArgVectors);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError != ERROR_SUCCESS)
{
@@ -2405,16 +2405,16 @@
TRACE("UnlockServiceDatabase(%x)\n", ScLock);
- _SEH_TRY
+ _SEH2_TRY
{
/* Call to services.exe using RPC */
dwError = RUnlockServiceDatabase((LPSC_RPC_LOCK)&ScLock);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
if (dwError != ERROR_SUCCESS)
{
@@ -2439,17 +2439,17 @@
TRACE("NotifyBootConfigStatus()\n");
- _SEH_TRY
+ _SEH2_TRY
{
/* Call to services.exe using RPC */
dwError = RNotifyBootConfigStatus(NULL,
BootAcceptable);
}
- _SEH_HANDLE
- {
- dwError = ScmRpcStatusToWinError(RpcExceptionCode());
- }
- _SEH_END;
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwError = ScmRpcStatusToWinError(RpcExceptionCode());
+ }
+ _SEH2_END;
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…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/service/sctrl.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/service/sctrl.c [iso-8859-1] Wed Nov 26 04:45:42
2008
@@ -541,7 +541,7 @@
{
BOOL bResult;
- _SEH_TRY
+ _SEH2_TRY
{
/* Call to services.exe using RPC */
bResult = RI_ScSetServiceBitsA((RPC_SERVICE_STATUS_HANDLE)hServiceStatus,
@@ -550,12 +550,12 @@
bUpdateImmediately,
lpString);
}
- _SEH_HANDLE
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
SetLastError(ScmRpcStatusToWinError(RpcExceptionCode()));
bResult = FALSE;
}
- _SEH_END;
+ _SEH2_END;
return bResult;
}
@@ -577,7 +577,7 @@
{
BOOL bResult;
- _SEH_TRY
+ _SEH2_TRY
{
/* Call to services.exe using RPC */
bResult = RI_ScSetServiceBitsW((RPC_SERVICE_STATUS_HANDLE)hServiceStatus,
@@ -586,12 +586,12 @@
bUpdateImmediately,
lpString);
}
- _SEH_HANDLE
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
SetLastError(ScmRpcStatusToWinError(RpcExceptionCode()));
bResult = FALSE;
}
- _SEH_END;
+ _SEH2_END;
return bResult;
}