Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/combase/combase.spec | 4 +++ dlls/combase/usrmarshal.c | 1 + dlls/ole32/ole32.spec | 8 ++--- dlls/ole32/usrmarshal.c | 74 --------------------------------------- 4 files changed, 9 insertions(+), 78 deletions(-)
diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec index 614b33148f8..0cd1bf29ae7 100644 --- a/dlls/combase/combase.spec +++ b/dlls/combase/combase.spec @@ -185,6 +185,10 @@ @ stdcall GetHGlobalFromStream(ptr ptr) ole32.GetHGlobalFromStream @ stub GetHookInterface @ stdcall GetRestrictedErrorInfo(ptr) +@ stdcall HACCEL_UserFree(ptr ptr) +@ stdcall HACCEL_UserMarshal(ptr ptr ptr) +@ stdcall HACCEL_UserSize(ptr long ptr) +@ stdcall HACCEL_UserUnmarshal(ptr ptr ptr) @ stdcall HBITMAP_UserFree(ptr ptr) @ stdcall HBITMAP_UserMarshal(ptr ptr ptr) @ stdcall HBITMAP_UserSize(ptr long ptr) diff --git a/dlls/combase/usrmarshal.c b/dlls/combase/usrmarshal.c index 54fecf8a235..d4629a6bd76 100644 --- a/dlls/combase/usrmarshal.c +++ b/dlls/combase/usrmarshal.c @@ -139,6 +139,7 @@ static void handle_UserFree(ULONG *pFlags, HANDLE *handle) handle_UserFree(pFlags, (HANDLE *)handle); \ }
+IMPL_WIREM_HANDLE(HACCEL) IMPL_WIREM_HANDLE(HBRUSH) IMPL_WIREM_HANDLE(HDC) IMPL_WIREM_HANDLE(HICON) diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec index cbb90660199..dbc31cb9604 100644 --- a/dlls/ole32/ole32.spec +++ b/dlls/ole32/ole32.spec @@ -123,10 +123,10 @@ @ stdcall GetHGlobalFromStream(ptr ptr) @ stub GetHookInterface @ stdcall GetRunningObjectTable(long ptr) -@ stdcall HACCEL_UserFree(ptr ptr) -@ stdcall HACCEL_UserMarshal(ptr ptr ptr) -@ stdcall HACCEL_UserSize(ptr long ptr) -@ stdcall HACCEL_UserUnmarshal(ptr ptr ptr) +@ stdcall HACCEL_UserFree(ptr ptr) combase.HACCEL_UserFree +@ stdcall HACCEL_UserMarshal(ptr ptr ptr) combase.HACCEL_UserMarshal +@ stdcall HACCEL_UserSize(ptr long ptr) combase.HACCEL_UserSize +@ stdcall HACCEL_UserUnmarshal(ptr ptr ptr) combase.HACCEL_UserUnmarshal @ stdcall HBITMAP_UserFree(ptr ptr) combase.HBITMAP_UserFree @ stdcall HBITMAP_UserMarshal(ptr ptr ptr) combase.HBITMAP_UserMarshal @ stdcall HBITMAP_UserSize(ptr long ptr) combase.HBITMAP_UserSize diff --git a/dlls/ole32/usrmarshal.c b/dlls/ole32/usrmarshal.c index 80cfde15949..a2aee9d6942 100644 --- a/dlls/ole32/usrmarshal.c +++ b/dlls/ole32/usrmarshal.c @@ -86,80 +86,6 @@ static const char* debugstr_user_flags(ULONG *pFlags) return wine_dbg_sprintf("MAKELONG(%s, 0x%04x)", loword, HIWORD(*pFlags)); }
-static ULONG handle_UserSize(ULONG *pFlags, ULONG StartingSize, HANDLE *handle) -{ - if (LOWORD(*pFlags) == MSHCTX_DIFFERENTMACHINE) - { - ERR("can't remote a local handle\n"); - RaiseException(RPC_S_INVALID_TAG, 0, 0, NULL); - return StartingSize; - } - - ALIGN_LENGTH(StartingSize, 3); - return StartingSize + sizeof(RemotableHandle); -} - -static unsigned char * handle_UserMarshal(ULONG *pFlags, unsigned char *pBuffer, HANDLE *handle) -{ - RemotableHandle *remhandle; - if (LOWORD(*pFlags) == MSHCTX_DIFFERENTMACHINE) - { - ERR("can't remote a local handle\n"); - RaiseException(RPC_S_INVALID_TAG, 0, 0, NULL); - return pBuffer; - } - - ALIGN_POINTER(pBuffer, 3); - remhandle = (RemotableHandle *)pBuffer; - remhandle->fContext = WDT_INPROC_CALL; - remhandle->u.hInproc = (LONG_PTR)*handle; - return pBuffer + sizeof(RemotableHandle); -} - -static unsigned char * handle_UserUnmarshal(ULONG *pFlags, unsigned char *pBuffer, HANDLE *handle) -{ - RemotableHandle *remhandle; - - ALIGN_POINTER(pBuffer, 3); - remhandle = (RemotableHandle *)pBuffer; - if (remhandle->fContext != WDT_INPROC_CALL) - RaiseException(RPC_X_BAD_STUB_DATA, 0, 0, NULL); - *handle = (HANDLE)(LONG_PTR)remhandle->u.hInproc; - return pBuffer + sizeof(RemotableHandle); -} - -static void handle_UserFree(ULONG *pFlags, HANDLE *handle) -{ - /* nothing to do */ -} - -#define IMPL_WIREM_HANDLE(type) \ - ULONG __RPC_USER type##_UserSize(ULONG *pFlags, ULONG StartingSize, type *handle) \ - { \ - TRACE("(%s, %d, %p\n", debugstr_user_flags(pFlags), StartingSize, handle); \ - return handle_UserSize(pFlags, StartingSize, (HANDLE *)handle); \ - } \ - \ - unsigned char * __RPC_USER type##_UserMarshal(ULONG *pFlags, unsigned char *pBuffer, type *handle) \ - { \ - TRACE("(%s, %p, &%p\n", debugstr_user_flags(pFlags), pBuffer, *handle); \ - return handle_UserMarshal(pFlags, pBuffer, (HANDLE *)handle); \ - } \ - \ - unsigned char * __RPC_USER type##_UserUnmarshal(ULONG *pFlags, unsigned char *pBuffer, type *handle) \ - { \ - TRACE("(%s, %p, %p\n", debugstr_user_flags(pFlags), pBuffer, handle); \ - return handle_UserUnmarshal(pFlags, pBuffer, (HANDLE *)handle); \ - } \ - \ - void __RPC_USER type##_UserFree(ULONG *pFlags, type *handle) \ - { \ - TRACE("(%s, &%p\n", debugstr_user_flags(pFlags), *handle); \ - handle_UserFree(pFlags, (HANDLE *)handle); \ - } - -IMPL_WIREM_HANDLE(HACCEL) - /****************************************************************************** * HENHMETAFILE_UserSize [OLE32.@] *