Author: greatlrd
Date: Sat Jun 30 04:33:38 2007
New Revision: 27342
URL:
http://svn.reactos.org/svn/reactos?rev=27342&view=rev
Log:
part 7 of 7
at last removing wine hack, that disable seh in rpc.h
we have now seh activate in rpcrt4 and some other idl stuff as well,
they where complete hacked to be offline, in wine header, I reworte the
header and move some prototype to right header.
Modified:
trunk/reactos/dll/win32/advapi32/advapi32.rbuild
trunk/reactos/dll/win32/lsasrv/lsasrv.rbuild
trunk/reactos/dll/win32/oleaut32/oleaut32.rbuild
trunk/reactos/dll/win32/setupapi/setupapi.rbuild
trunk/reactos/drivers/video/videoprt/dispatch.c
trunk/reactos/include/psdk/rpc.h
trunk/reactos/include/psdk/rpcdce.h
trunk/reactos/include/psdk/rpcndr.h
trunk/reactos/include/reactos/idl/eventlogrpc.idl
trunk/reactos/include/reactos/idl/idl.rbuild
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 (original)
+++ trunk/reactos/dll/win32/advapi32/advapi32.rbuild Sat Jun 30 04:33:38 2007
@@ -1,4 +1,5 @@
-<module name="advapi32" type="win32dll"
baseaddress="${BASEADDRESS_ADVAPI32}" installbase="system32"
installname="advapi32.dll">
+<module name="advapi32" type="win32dll"
baseaddress="${BASEADDRESS_ADVAPI32}" installbase="system32"
installname="advapi32.dll" allowwarnings ="true">
+
<importlibrary definition="advapi32.def" />
<include base="advapi32">.</include>
<include base="scm_client">.</include>
@@ -15,6 +16,7 @@
<library>rpcrt4</library>
<library>wine</library>
<library>kernel32</library>
+ <library>pseh</library>
<pch>advapi32.h</pch>
<directory name="crypt">
<file>crypt.c</file>
Modified: trunk/reactos/dll/win32/lsasrv/lsasrv.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/lsasrv/lsasrv.rb…
==============================================================================
--- trunk/reactos/dll/win32/lsasrv/lsasrv.rbuild (original)
+++ trunk/reactos/dll/win32/lsasrv/lsasrv.rbuild Sat Jun 30 04:33:38 2007
@@ -13,6 +13,7 @@
<library>ntdll</library>
<library>kernel32</library>
<library>rpcrt4</library>
+ <library>pseh</library>
<file>lsarpc.c</file>
<file>lsasrv.c</file>
<file>lsasrv.rc</file>
Modified: trunk/reactos/dll/win32/oleaut32/oleaut32.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/oleaut3…
==============================================================================
--- trunk/reactos/dll/win32/oleaut32/oleaut32.rbuild (original)
+++ trunk/reactos/dll/win32/oleaut32/oleaut32.rbuild Sat Jun 30 04:33:38 2007
@@ -20,6 +20,7 @@
<library>comctl32</library>
<library>urlmon</library>
<library>uuid</library>
+ <library>pseh</library>
<file>connpt.c</file>
<file>dispatch.c</file>
<file>hash.c</file>
Modified: trunk/reactos/dll/win32/setupapi/setupapi.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/setupap…
==============================================================================
--- trunk/reactos/dll/win32/setupapi/setupapi.rbuild (original)
+++ trunk/reactos/dll/win32/setupapi/setupapi.rbuild Sat Jun 30 04:33:38 2007
@@ -24,6 +24,7 @@
<library>rpcrt4</library>
<library>version</library>
<library>shell32</library>
+ <library>pseh</library>
<file>cfgmgr.c</file>
<file>devclass.c</file>
<file>devinst.c</file>
Modified: trunk/reactos/drivers/video/videoprt/dispatch.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/dis…
==============================================================================
--- trunk/reactos/drivers/video/videoprt/dispatch.c (original)
+++ trunk/reactos/drivers/video/videoprt/dispatch.c Sat Jun 30 04:33:38 2007
@@ -110,6 +110,8 @@
PVIDEO_PORT_DRIVER_EXTENSION DriverExtension;
DPRINT("IntVideoPortDispatchOpen\n");
+
+ ASSERT(Irp != NULL);
if (CsrssInitialized == FALSE)
{
Modified: trunk/reactos/include/psdk/rpc.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/rpc.h?rev=273…
==============================================================================
--- trunk/reactos/include/psdk/rpc.h (original)
+++ trunk/reactos/include/psdk/rpc.h Sat Jun 30 04:33:38 2007
@@ -1,74 +1,173 @@
-/*
- * RPC interface
- *
- * Copyright (C) the Wine project
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-#ifndef RPC_NO_WINDOWS_H
-# ifdef __WINESRC__
-# include <windef.h>
-# else
-# include <windows.h>
-# endif
+#if !defined( RPC_NO_WINDOWS_H ) && !defined( MAC ) && !defined( _MAC )
+#include <windows.h>
#endif
-#ifndef __WINE_RPC_H
-#define __WINE_RPC_H
+#ifdef __GNUC__
+ #ifndef _SEH_NO_NATIVE_NLG
+ /* FIXME ReactOS SEH support, we need remove this when gcc support native seh */
+ #include <libs/pseh/pseh.h>
+ #endif
+#endif
-#if defined(__powerpc__) || defined(_MAC) /* ? */
-# define __RPC_MAC__
- /* Also define __RPC_WIN32__ to ensure compatibility */
-# define __RPC_WIN32__
-#elif defined(_WIN64)
-# define __RPC_WIN64__
-#else
-# define __RPC_WIN32__
+#ifndef __RPC_H__
+#define __RPC_H__
+
+#if _MSC_VER > 1000
+#pragma once
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined( MAC ) || defined( _MAC ) || defined(__powerpc__)
+ #define __RPC_MAC__
+ #define __RPC_WIN32__
+ #include <pshpack2.h>
+
+#else
+ #if defined(_M_IA64) || defined(_M_AMD64) || defined(_WIN64)
+ #define __RPC_WIN64__
+ #else
+ #define __RPC_WIN32__
+ #endif
#endif
#include <basetsd.h>
+#if defined(__RPC_WIN64__)
+ #include <pshpack8.h>
+#endif
+
+#ifndef __MIDL_USER_DEFINED
+ #define midl_user_allocate MIDL_user_allocate
+ #define midl_user_free MIDL_user_free
+ #define __MIDL_USER_DEFINED
+#endif
+
+
+typedef void * I_RPC_HANDLE;
+typedef long RPC_STATUS;
#define __RPC_FAR
-#define __RPC_API __stdcall
-#define __RPC_USER __stdcall
-#define __RPC_STUB __stdcall
-#define RPC_ENTRY __stdcall
-#define RPCRTAPI
-typedef long RPC_STATUS;
-typedef void* I_RPC_HANDLE;
+#if defined(__RPC_WIN32__) || defined(__RPC_WIN64__)
+ #define RPC_UNICODE_SUPPORTED
+#endif
-#include <rpcdce.h>
-/* #include <rpcnsi.h> */
-#include <rpcnterr.h>
-#include <excpt.h>
-#include <winerror.h>
-/* ignore exception handling for now */
-#define RpcTryExcept if (1) {
-#define RpcExcept(expr) } else {
-#define RpcEndExcept }
-#define RpcTryFinally
-#define RpcFinally
-#define RpcEndFinally
-#define RpcExceptionCode() 0
-/* #define RpcAbnormalTermination() abort() */
+#if !defined(__RPC_MAC__)
+ #define __RPC_API __stdcall
+ #define __RPC_USER __stdcall
+ #define __RPC_STUB __stdcall
+ #define RPC_ENTRY __stdcall
+#else
+ #define __RPC_API
+ #define __RPC_USER
+ #define __RPC_STUB
+ #define RPC_ENTRY
+#endif
-RPC_STATUS RPC_ENTRY RpcImpersonateClient(RPC_BINDING_HANDLE);
-RPC_STATUS RPC_ENTRY RpcRevertToSelf(void);
-DWORD WINAPI I_RpcMapWin32Status(RPC_STATUS status);
-#endif /*__WINE_RPC_H */
+#ifndef __GNUC__
+ #if !defined(DECLSPEC_IMPORT)
+ #define DECLSPEC_IMPORT
+ #endif
+
+ #if !defined(_RPCRT4_)
+ #define RPCRTAPI DECLSPEC_IMPORT
+ #else
+ #define RPCRTAPI
+ #endif
+
+ #if !defined(_RPCNS4_)
+ #define RPCNSAPI DECLSPEC_IMPORT
+ #else
+ #define RPCNSAPI
+ #endif
+#else
+ #define RPCRTAPI
+ #define RPCNSAPI
+#endif
+
+
+#ifdef __RPC_MAC__
+ #include <setjmp.h>
+ #define RPCXCWORD (sizeof(jmp_buf)/sizeof(int))
+
+ #pragma warning(push)
+ #pragma warning( disable: 4005 )
+ #include <rpcdce.h>
+ #include <rpcnsi.h>
+ #include <rpcerr.h>
+ #include <rpcmac.h>
+ #pragma warning(pop)
+
+ typedef void (RPC_ENTRY *MACYIELDCALLBACK)(short *) ;
+ RPC_STATUS RPC_ENTRY
+ RpcMacSetYieldInfo(MACYIELDCALLBACK pfnCallback) ;
+
+ #if !defined(UNALIGNED)
+ #define UNALIGNED
+ #endif
+
+ #include <poppack.h>
+#else
+ #include <rpcdce.h>
+ /* #include <rpcnsi.h> */
+ #include <rpcnterr.h>
+ #include <excpt.h>
+ #include <winerror.h>
+
+ #ifndef __GNUC__
+ #define RpcTryExcept __try {
+ #define RpcExcept(expr) } __except (expr) {
+ #define RpcEndExcept }
+ #define RpcTryFinally __try {
+ #define RpcFinally } __finally {
+ #define RpcEndFinally }
+ #define RpcExceptionCode() GetExceptionCode()
+ #define RpcAbnormalTermination() AbnormalTermination()
+ #else
+ /* FIXME ReactOS SEH support, we need remove this when gcc support native seh */
+
+ #ifdef _SEH_NO_NATIVE_NLG
+ /* hack for _SEH_NO_NATIVE_NLG */
+ #define RpcTryExcept if (1) {
+ #define RpcExcept(expr) } else {
+ #define RpcEndExcept }
+ #define RpcTryFinally
+ #define RpcFinally
+ #define RpcEndFinally
+ #define RpcExceptionCode() 0
+ #else
+ #define RpcTryExcept _SEH_TRY {
+ #define RpcExcept(expr) } _SEH_HANDLE { \
+ if (expr) \
+ {
+ #define RpcEndExcept } \
+ } \
+ _SEH_END;
+
+ #define RpcTryFinally _SEH_TRY {
+ #define RpcFinally } _SEH_HANDLE {
+ #define RpcEndFinally } _SEH_END;
+ #define RpcExceptionCode() _SEH_GetExceptionCode()
+
+ /* #define RpcAbnormalTermination() abort() */
+ #endif
+ #endif
+#endif
+
+#if defined(__RPC_WIN64__)
+ #include <poppack.h>
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
Modified: trunk/reactos/include/psdk/rpcdce.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/rpcdce.h?rev=…
==============================================================================
--- trunk/reactos/include/psdk/rpcdce.h (original)
+++ trunk/reactos/include/psdk/rpcdce.h Sat Jun 30 04:33:38 2007
@@ -504,6 +504,13 @@
RPCRTAPI int RPC_ENTRY
UuidIsNil( UUID* Uuid, RPC_STATUS* Status_ );
+
+RPCRTAPI RPC_STATUS RPC_ENTRY
+RpcImpersonateClient (IN RPC_BINDING_HANDLE BindingHandle OPTIONAL);
+
+RPCRTAPI RPC_STATUS RPC_ENTRY
+RpcRevertToSelf ();
+
#ifdef __cplusplus
}
#endif
Modified: trunk/reactos/include/psdk/rpcndr.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/rpcndr.h?rev=…
==============================================================================
--- trunk/reactos/include/psdk/rpcndr.h (original)
+++ trunk/reactos/include/psdk/rpcndr.h Sat Jun 30 04:33:38 2007
@@ -651,6 +651,13 @@
RPCRTAPI void RPC_ENTRY
NdrRpcSsDefaultFree( void *NodeToFree );
+
+#define RPC_BAD_STUB_DATA_EXCEPTION_FILTER \
+ ( (RpcExceptionCode() == STATUS_ACCESS_VIOLATION) || \
+ (RpcExceptionCode() == STATUS_DATATYPE_MISALIGNMENT) || \
+ (RpcExceptionCode() == RPC_X_BAD_STUB_DATA) || \
+ (RpcExceptionCode() == RPC_S_INVALID_BOUND) )
+
#ifdef __cplusplus
}
#endif
Modified: trunk/reactos/include/reactos/idl/eventlogrpc.idl
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/idl/eventl…
==============================================================================
--- trunk/reactos/include/reactos/idl/eventlogrpc.idl (original)
+++ trunk/reactos/include/reactos/idl/eventlogrpc.idl Sat Jun 30 04:33:38 2007
@@ -16,6 +16,8 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+
+
#ifdef __midl
[
@@ -26,6 +28,12 @@
interface eventlog
{
+ cpp_quote("#ifdef __GNUC__")
+ cpp_quote("/* FIXME ReactOS SEH support, we need remove this when gcc support
native seh */")
+ cpp_quote("#include <pseh/pseh.h>")
+ cpp_quote("#endif")
+
+
cpp_quote("#define RPC_ENABLED")
cpp_quote("#if 0")
typedef [handle, unique] wchar_t *LPWSTR;
@@ -221,7 +229,10 @@
}
#else
-
+ cpp_quote("#ifdef __GNUC__")
+ cpp_quote("/* FIXME ReactOS SEH support, we need remove this when gcc support
native seh */")
+ cpp_quote("#include <pseh/pseh.h>")
+ cpp_quote("#endif")
[
uuid(82273FDC-E32A-18C3-3F78-827929DC23EA),
Modified: trunk/reactos/include/reactos/idl/idl.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/idl/idl.rb…
==============================================================================
--- trunk/reactos/include/reactos/idl/idl.rbuild (original)
+++ trunk/reactos/include/reactos/idl/idl.rbuild Sat Jun 30 04:33:38 2007
@@ -1,23 +1,23 @@
<group>
-<module name="pnp_server" type="rpcserver">
+<module name="pnp_server" type="rpcserver" allowwarnings
="true">
<include base="ReactOS">.</include>
<include base="ReactOS">w32api/include</include>
<define name="_X86_" />
<file>pnp.idl</file>
</module>
-<module name="pnp_client" type="rpcclient">
+<module name="pnp_client" type="rpcclient" allowwarnings
="true">
<include base="ReactOS">.</include>
<include base="ReactOS">w32api/include</include>
<define name="_X86_" />
<file>pnp.idl</file>
</module>
-<module name="scm_server" type="rpcserver">
+<module name="scm_server" type="rpcserver" allowwarnings
="true">
<include base="ReactOS">.</include>
<include base="ReactOS">w32api/include</include>
<define name="_X86_" />
<file switches="--oldnames">svcctl.idl</file>
</module>
-<module name="scm_client" type="rpcclient">
+<module name="scm_client" type="rpcclient" allowwarnings
="true">
<include base="ReactOS">.</include>
<include base="ReactOS">w32api/include</include>
<define name="_X86_" />
@@ -29,19 +29,19 @@
<define name="_X86_" />
<file switches="--oldnames">eventlogrpc.idl</file>
</module>
-<module name="eventlog_client" type="rpcclient">
+<module name="eventlog_client" type="rpcclient" >
<include base="ReactOS">.</include>
<include base="ReactOS">w32api/include</include>
<define name="_X86_" />
<file switches="--oldnames">eventlogrpc.idl</file>
</module>
-<module name="lsa_server" type="rpcserver">
+<module name="lsa_server" type="rpcserver" allowwarnings
="true">
<include base="ReactOS">.</include>
<include base="ReactOS">w32api/include</include>
<define name="_X86_" />
<file switches="--oldnames">lsa.idl</file>
</module>
-<module name="lsa_client" type="rpcclient">
+<module name="lsa_client" type="rpcclient" allowwarnings
="true">
<include base="ReactOS">.</include>
<include base="ReactOS">w32api/include</include>
<define name="_X86_" />