Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/combase/combase.spec | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec index c2342cc9f88..115a5ecc568 100644 --- a/dlls/combase/combase.spec +++ b/dlls/combase/combase.spec @@ -194,13 +194,13 @@ @ stdcall HMENU_UserSize(ptr long ptr) @ stdcall HMENU_UserUnmarshal(ptr ptr ptr) @ stub HSTRING_UserFree -@ stub HSTRING_UserFree64 +@ stub -arch=win64 HSTRING_UserFree64 @ stub HSTRING_UserMarshal -@ stub HSTRING_UserMarshal64 +@ stub -arch=win64 HSTRING_UserMarshal64 @ stub HSTRING_UserSize -@ stub HSTRING_UserSize64 +@ stub -arch=win64 HSTRING_UserSize64 @ stub HSTRING_UserUnmarshal -@ stub HSTRING_UserUnmarshal64 +@ stub -arch=win64 HSTRING_UserUnmarshal64 @ stdcall HWND_UserFree(ptr ptr) @ stdcall HWND_UserMarshal(ptr ptr ptr) @ stdcall HWND_UserSize(ptr long ptr) @@ -298,13 +298,13 @@ @ stdcall StringFromIID(ptr ptr) ole32.StringFromIID @ stub UpdateDCOMSettings @ stdcall WdtpInterfacePointer_UserFree(ptr) -@ stub WdtpInterfacePointer_UserFree64 +@ stub -arch=win64 WdtpInterfacePointer_UserFree64 @ stdcall WdtpInterfacePointer_UserMarshal(ptr long ptr ptr ptr) -@ stub WdtpInterfacePointer_UserMarshal64 +@ stub -arch=win64 WdtpInterfacePointer_UserMarshal64 @ stdcall WdtpInterfacePointer_UserSize(ptr long long ptr ptr) -@ stub WdtpInterfacePointer_UserSize64 +@ stub -arch=win64 WdtpInterfacePointer_UserSize64 @ stdcall WdtpInterfacePointer_UserUnmarshal(ptr ptr ptr ptr) -@ stub WdtpInterfacePointer_UserUnmarshal64 +@ stub -arch=win64 WdtpInterfacePointer_UserUnmarshal64 @ stdcall WindowsCompareStringOrdinal(ptr ptr ptr) @ stdcall WindowsConcatString(ptr ptr ptr) @ stdcall WindowsCreateString(wstr long ptr)
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 | 1 - 4 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec index 115a5ecc568..c005782a81e 100644 --- a/dlls/combase/combase.spec +++ b/dlls/combase/combase.spec @@ -181,6 +181,10 @@ @ stdcall GetHGlobalFromStream(ptr ptr) ole32.GetHGlobalFromStream @ stub GetHookInterface @ stdcall GetRestrictedErrorInfo(ptr) +@ stdcall HBRUSH_UserFree(ptr ptr) +@ stdcall HBRUSH_UserMarshal(ptr ptr ptr) +@ stdcall HBRUSH_UserSize(ptr long ptr) +@ stdcall HBRUSH_UserUnmarshal(ptr ptr ptr) @ stdcall HDC_UserFree(ptr ptr) @ stdcall HDC_UserMarshal(ptr ptr ptr) @ stdcall HDC_UserSize(ptr long ptr) diff --git a/dlls/combase/usrmarshal.c b/dlls/combase/usrmarshal.c index 08328cc673f..ef5228a513e 100644 --- a/dlls/combase/usrmarshal.c +++ b/dlls/combase/usrmarshal.c @@ -134,6 +134,7 @@ static void handle_UserFree(ULONG *pFlags, HANDLE *handle) handle_UserFree(pFlags, (HANDLE *)handle); \ }
+IMPL_WIREM_HANDLE(HBRUSH) IMPL_WIREM_HANDLE(HDC) IMPL_WIREM_HANDLE(HICON) IMPL_WIREM_HANDLE(HMENU) diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec index 03697c3e8de..3d56a8bcbf7 100644 --- a/dlls/ole32/ole32.spec +++ b/dlls/ole32/ole32.spec @@ -131,10 +131,10 @@ @ stdcall HBITMAP_UserMarshal(ptr ptr ptr) @ stdcall HBITMAP_UserSize(ptr long ptr) @ stdcall HBITMAP_UserUnmarshal(ptr ptr ptr) -@ stdcall HBRUSH_UserFree(ptr ptr) -@ stdcall HBRUSH_UserMarshal(ptr ptr ptr) -@ stdcall HBRUSH_UserSize(ptr long ptr) -@ stdcall HBRUSH_UserUnmarshal(ptr ptr ptr) +@ stdcall HBRUSH_UserFree(ptr ptr) combase.HBRUSH_UserFree +@ stdcall HBRUSH_UserMarshal(ptr ptr ptr) combase.HBRUSH_UserMarshal +@ stdcall HBRUSH_UserSize(ptr long ptr) combase.HBRUSH_UserSize +@ stdcall HBRUSH_UserUnmarshal(ptr ptr ptr) combase.HBRUSH_UserUnmarshal @ stdcall HDC_UserFree(ptr ptr) combase.HDC_UserFree @ stdcall HDC_UserMarshal(ptr ptr ptr) combase.HDC_UserMarshal @ stdcall HDC_UserSize(ptr long ptr) combase.HDC_UserSize diff --git a/dlls/ole32/usrmarshal.c b/dlls/ole32/usrmarshal.c index 6898517568b..8456bd20ee9 100644 --- a/dlls/ole32/usrmarshal.c +++ b/dlls/ole32/usrmarshal.c @@ -355,7 +355,6 @@ static void handle_UserFree(ULONG *pFlags, HANDLE *handle) }
IMPL_WIREM_HANDLE(HACCEL) -IMPL_WIREM_HANDLE(HBRUSH)
/****************************************************************************** * HGLOBAL_UserSize [OLE32.@]
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=76422
Your paranoid android.
=== debiant (32 bit Chinese:China report) ===
ole32: clipboard.c:1013: Test failed: failed to set clipboard to complex data, hr = 0x800401d0 clipboard.c:882: Test failed: IDataObject_GetData failed with error 0x800401d0 clipboard.c:887: Test failed: IDataObject_GetData failed with error 0x800401d0 clipboard.c:892: Test failed: IDataObject_GetData failed with error 0x800401d0 clipboard.c:897: Test failed: IDataObject_GetData failed with error 0x80040064 clipboard.c:900: Test failed: DataObjectImpl_GetData called 5 times instead of 0 times clipboard.c:864: Test failed: didn't find cf_dataobject clipboard.c:865: Test failed: didn't find cf_ole_priv_data clipboard.c:660: Test failed: 0: got 00000000 clipboard.c:673: Test failed: got 00000001 clipboard.c:675: Test failed: got 00000001 clipboard.c:677: Test failed: got 00000001 clipboard.c:682: Test failed: got 00000001 clipboard.c:687: Test failed: got 00000001 clipboard.c:688: Test failed: formats don't match clipboard.c:690: Test failed: got 00000001 clipboard.c:691: Test failed: formats don't match
Signed-off-by: Huw Davies huw@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/combase/Makefile.in | 2 +- dlls/combase/combase.spec | 4 + dlls/combase/usrmarshal.c | 200 ++++++++++++++++++++++++++++++++++++++ dlls/ole32/ole32.spec | 8 +- dlls/ole32/usrmarshal.c | 200 -------------------------------------- 5 files changed, 209 insertions(+), 205 deletions(-)
diff --git a/dlls/combase/Makefile.in b/dlls/combase/Makefile.in index eedcbd8e1c2..f91f6bffc36 100644 --- a/dlls/combase/Makefile.in +++ b/dlls/combase/Makefile.in @@ -1,6 +1,6 @@ MODULE = combase.dll IMPORTLIB = combase -IMPORTS = advapi32 ole32 uuid +IMPORTS = advapi32 ole32 user32 uuid
EXTRADLLFLAGS = -mno-cygwin
diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec index c005782a81e..10356b414d8 100644 --- a/dlls/combase/combase.spec +++ b/dlls/combase/combase.spec @@ -62,6 +62,10 @@ @ stub RoFailFastWithErrorContextInternal2 @ stub RoFailFastWithErrorContextInternal @ stub UpdateProcessTracing +@ stdcall CLIPFORMAT_UserFree(ptr ptr) +@ stdcall CLIPFORMAT_UserMarshal(ptr ptr ptr) +@ stdcall CLIPFORMAT_UserSize(ptr long ptr) +@ stdcall CLIPFORMAT_UserUnmarshal(ptr ptr ptr) @ stub CLSIDFromOle1Class @ stdcall CLSIDFromProgID(wstr ptr) ole32.CLSIDFromProgID @ stdcall CLSIDFromString(wstr ptr) ole32.CLSIDFromString diff --git a/dlls/combase/usrmarshal.c b/dlls/combase/usrmarshal.c index ef5228a513e..59198ccf3f3 100644 --- a/dlls/combase/usrmarshal.c +++ b/dlls/combase/usrmarshal.c @@ -140,6 +140,206 @@ IMPL_WIREM_HANDLE(HICON) IMPL_WIREM_HANDLE(HMENU) IMPL_WIREM_HANDLE(HWND)
+/****************************************************************************** + * CLIPFORMAT_UserSize (combase.@) + * + * Calculates the buffer size required to marshal a clip format. + * + * PARAMS + * pFlags [I] Flags. See notes. + * StartingSize [I] Starting size of the buffer. This value is added on to + * the buffer size required for the clip format. + * pCF [I] Clip format to size. + * + * RETURNS + * The buffer size required to marshal a clip format plus the starting size. + * + * NOTES + * Even though the function is documented to take a pointer to an unsigned + * long in pFlags, it actually takes a pointer to a USER_MARSHAL_CB structure, of which + * the first parameter is an unsigned long. + * This function is only intended to be called by the RPC runtime. + */ +ULONG __RPC_USER CLIPFORMAT_UserSize(ULONG *pFlags, ULONG size, CLIPFORMAT *pCF) +{ + TRACE("%s, %u, %p.n", debugstr_user_flags(pFlags), size, pCF); + + ALIGN_LENGTH(size, 3); + + size += 8; + + /* only need to marshal the name if it is not a pre-defined type and + * we are going remote */ + if ((*pCF >= 0xc000) && (LOWORD(*pFlags) == MSHCTX_DIFFERENTMACHINE)) + { + WCHAR format[255]; + INT ret; + size += 3 * sizeof(UINT); + /* urg! this function is badly designed because it won't tell us how + * much space is needed without doing a dummy run of storing the + * name into a buffer */ + ret = GetClipboardFormatNameW(*pCF, format, ARRAY_SIZE(format)-1); + if (!ret) + RaiseException(DV_E_CLIPFORMAT, 0, 0, NULL); + size += (ret + 1) * sizeof(WCHAR); + } + return size; +} + +/****************************************************************************** + * CLIPFORMAT_UserMarshal (combase.@) + * + * Marshals a clip format into a buffer. + * + * PARAMS + * pFlags [I] Flags. See notes. + * pBuffer [I] Buffer to marshal the clip format into. + * pCF [I] Clip format to marshal. + * + * RETURNS + * The end of the marshaled data in the buffer. + * + * NOTES + * Even though the function is documented to take a pointer to an unsigned + * long in pFlags, it actually takes a pointer to a USER_MARSHAL_CB structure, of which + * the first parameter is an unsigned long. + * This function is only intended to be called by the RPC runtime. + */ +unsigned char * __RPC_USER CLIPFORMAT_UserMarshal(ULONG *pFlags, unsigned char *pBuffer, CLIPFORMAT *pCF) +{ + TRACE("%s, %p, &0x%04x.\n", debugstr_user_flags(pFlags), pBuffer, *pCF); + + ALIGN_POINTER(pBuffer, 3); + + /* only need to marshal the name if it is not a pre-defined type and + * we are going remote */ + if ((*pCF >= 0xc000) && (LOWORD(*pFlags) == MSHCTX_DIFFERENTMACHINE)) + { + WCHAR format[255]; + UINT len; + + *(DWORD *)pBuffer = WDT_REMOTE_CALL; + pBuffer += 4; + *(DWORD *)pBuffer = *pCF; + pBuffer += 4; + + len = GetClipboardFormatNameW(*pCF, format, ARRAY_SIZE(format)-1); + if (!len) + RaiseException(DV_E_CLIPFORMAT, 0, 0, NULL); + len += 1; + *(UINT *)pBuffer = len; + pBuffer += sizeof(UINT); + *(UINT *)pBuffer = 0; + pBuffer += sizeof(UINT); + *(UINT *)pBuffer = len; + pBuffer += sizeof(UINT); + TRACE("marshaling format name %s\n", debugstr_w(format)); + memcpy(pBuffer, format, len * sizeof(WCHAR)); + pBuffer += len * sizeof(WCHAR); + } + else + { + *(DWORD *)pBuffer = WDT_INPROC_CALL; + pBuffer += 4; + *(DWORD *)pBuffer = *pCF; + pBuffer += 4; + } + + return pBuffer; +} + +/****************************************************************************** + * CLIPFORMAT_UserUnmarshal (combase.@) + * + * Unmarshals a clip format from a buffer. + * + * PARAMS + * pFlags [I] Flags. See notes. + * pBuffer [I] Buffer to marshal the clip format from. + * pCF [O] Address that receive the unmarshaled clip format. + * + * RETURNS + * The end of the marshaled data in the buffer. + * + * NOTES + * Even though the function is documented to take a pointer to an unsigned + * long in pFlags, it actually takes a pointer to a USER_MARSHAL_CB structure, of which + * the first parameter is an unsigned long. + * This function is only intended to be called by the RPC runtime. + */ +unsigned char * __RPC_USER CLIPFORMAT_UserUnmarshal(ULONG *pFlags, unsigned char *pBuffer, CLIPFORMAT *pCF) +{ + LONG fContext; + + TRACE("%s, %p, %p.\n", debugstr_user_flags(pFlags), pBuffer, pCF); + + ALIGN_POINTER(pBuffer, 3); + + fContext = *(DWORD *)pBuffer; + pBuffer += 4; + + if (fContext == WDT_INPROC_CALL) + { + *pCF = *(CLIPFORMAT *)pBuffer; + pBuffer += 4; + } + else if (fContext == WDT_REMOTE_CALL) + { + CLIPFORMAT cf; + UINT len; + + /* pointer ID for registered clip format string */ + if (*(DWORD *)pBuffer == 0) + RaiseException(RPC_S_INVALID_BOUND, 0, 0, NULL); + pBuffer += 4; + + len = *(UINT *)pBuffer; + pBuffer += sizeof(UINT); + if (*(UINT *)pBuffer != 0) + RaiseException(RPC_S_INVALID_BOUND, 0, 0, NULL); + pBuffer += sizeof(UINT); + if (*(UINT *)pBuffer != len) + RaiseException(RPC_S_INVALID_BOUND, 0, 0, NULL); + pBuffer += sizeof(UINT); + if (((WCHAR *)pBuffer)[len - 1] != '\0') + RaiseException(RPC_S_INVALID_BOUND, 0, 0, NULL); + TRACE("unmarshaling clip format %s\n", debugstr_w((LPCWSTR)pBuffer)); + cf = RegisterClipboardFormatW((LPCWSTR)pBuffer); + pBuffer += len * sizeof(WCHAR); + if (!cf) + RaiseException(DV_E_CLIPFORMAT, 0, 0, NULL); + *pCF = cf; + } + else + /* code not really appropriate, but nearest I can find */ + RaiseException(RPC_S_INVALID_TAG, 0, 0, NULL); + return pBuffer; +} + +/****************************************************************************** + * CLIPFORMAT_UserFree (combase.@) + * + * Frees an unmarshaled clip format. + * + * PARAMS + * pFlags [I] Flags. See notes. + * pCF [I] Clip format to free. + * + * RETURNS + * The end of the marshaled data in the buffer. + * + * NOTES + * Even though the function is documented to take a pointer to an unsigned + * long in pFlags, it actually takes a pointer to a USER_MARSHAL_CB + * structure, of which the first parameter is an unsigned long. + * This function is only intended to be called by the RPC runtime. + */ +void __RPC_USER CLIPFORMAT_UserFree(ULONG *pFlags, CLIPFORMAT *pCF) +{ + /* there is no inverse of the RegisterClipboardFormat function, + * so nothing to do */ +} + /****************************************************************************** * WdtpInterfacePointer_UserSize (combase.@) * diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec index 3d56a8bcbf7..c58a406d278 100644 --- a/dlls/ole32/ole32.spec +++ b/dlls/ole32/ole32.spec @@ -1,8 +1,8 @@ @ stdcall BindMoniker(ptr long ptr ptr) -@ stdcall CLIPFORMAT_UserFree(ptr ptr) -@ stdcall CLIPFORMAT_UserMarshal(ptr ptr ptr) -@ stdcall CLIPFORMAT_UserSize(ptr long ptr) -@ stdcall CLIPFORMAT_UserUnmarshal(ptr ptr ptr) +@ stdcall CLIPFORMAT_UserFree(ptr ptr) combase.CLIPFORMAT_UserFree +@ stdcall CLIPFORMAT_UserMarshal(ptr ptr ptr) combase.CLIPFORMAT_UserMarshal +@ stdcall CLIPFORMAT_UserSize(ptr long ptr) combase.CLIPFORMAT_UserSize +@ stdcall CLIPFORMAT_UserUnmarshal(ptr ptr ptr) combase.CLIPFORMAT_UserUnmarshal @ stdcall CLSIDFromProgID(wstr ptr) @ stdcall CLSIDFromProgIDEx(wstr ptr) @ stdcall CLSIDFromString(wstr ptr) diff --git a/dlls/ole32/usrmarshal.c b/dlls/ole32/usrmarshal.c index 8456bd20ee9..b7cacf7f620 100644 --- a/dlls/ole32/usrmarshal.c +++ b/dlls/ole32/usrmarshal.c @@ -82,206 +82,6 @@ static const char* debugstr_user_flags(ULONG *pFlags) return wine_dbg_sprintf("MAKELONG(%s, 0x%04x)", loword, HIWORD(*pFlags)); }
-/****************************************************************************** - * CLIPFORMAT_UserSize [OLE32.@] - * - * Calculates the buffer size required to marshal a clip format. - * - * PARAMS - * pFlags [I] Flags. See notes. - * StartingSize [I] Starting size of the buffer. This value is added on to - * the buffer size required for the clip format. - * pCF [I] Clip format to size. - * - * RETURNS - * The buffer size required to marshal a clip format plus the starting size. - * - * NOTES - * Even though the function is documented to take a pointer to an unsigned - * long in pFlags, it actually takes a pointer to a USER_MARSHAL_CB structure, of which - * the first parameter is an unsigned long. - * This function is only intended to be called by the RPC runtime. - */ -ULONG __RPC_USER CLIPFORMAT_UserSize(ULONG *pFlags, ULONG size, CLIPFORMAT *pCF) -{ - TRACE("(%s, %d, %p\n", debugstr_user_flags(pFlags), size, pCF); - - ALIGN_LENGTH(size, 3); - - size += 8; - - /* only need to marshal the name if it is not a pre-defined type and - * we are going remote */ - if ((*pCF >= 0xc000) && (LOWORD(*pFlags) == MSHCTX_DIFFERENTMACHINE)) - { - WCHAR format[255]; - INT ret; - size += 3 * sizeof(UINT); - /* urg! this function is badly designed because it won't tell us how - * much space is needed without doing a dummy run of storing the - * name into a buffer */ - ret = GetClipboardFormatNameW(*pCF, format, ARRAY_SIZE(format)-1); - if (!ret) - RaiseException(DV_E_CLIPFORMAT, 0, 0, NULL); - size += (ret + 1) * sizeof(WCHAR); - } - return size; -} - -/****************************************************************************** - * CLIPFORMAT_UserMarshal [OLE32.@] - * - * Marshals a clip format into a buffer. - * - * PARAMS - * pFlags [I] Flags. See notes. - * pBuffer [I] Buffer to marshal the clip format into. - * pCF [I] Clip format to marshal. - * - * RETURNS - * The end of the marshaled data in the buffer. - * - * NOTES - * Even though the function is documented to take a pointer to an unsigned - * long in pFlags, it actually takes a pointer to a USER_MARSHAL_CB structure, of which - * the first parameter is an unsigned long. - * This function is only intended to be called by the RPC runtime. - */ -unsigned char * __RPC_USER CLIPFORMAT_UserMarshal(ULONG *pFlags, unsigned char *pBuffer, CLIPFORMAT *pCF) -{ - TRACE("(%s, %p, &0x%04x\n", debugstr_user_flags(pFlags), pBuffer, *pCF); - - ALIGN_POINTER(pBuffer, 3); - - /* only need to marshal the name if it is not a pre-defined type and - * we are going remote */ - if ((*pCF >= 0xc000) && (LOWORD(*pFlags) == MSHCTX_DIFFERENTMACHINE)) - { - WCHAR format[255]; - UINT len; - - *(DWORD *)pBuffer = WDT_REMOTE_CALL; - pBuffer += 4; - *(DWORD *)pBuffer = *pCF; - pBuffer += 4; - - len = GetClipboardFormatNameW(*pCF, format, ARRAY_SIZE(format)-1); - if (!len) - RaiseException(DV_E_CLIPFORMAT, 0, 0, NULL); - len += 1; - *(UINT *)pBuffer = len; - pBuffer += sizeof(UINT); - *(UINT *)pBuffer = 0; - pBuffer += sizeof(UINT); - *(UINT *)pBuffer = len; - pBuffer += sizeof(UINT); - TRACE("marshaling format name %s\n", debugstr_w(format)); - memcpy(pBuffer, format, len * sizeof(WCHAR)); - pBuffer += len * sizeof(WCHAR); - } - else - { - *(DWORD *)pBuffer = WDT_INPROC_CALL; - pBuffer += 4; - *(DWORD *)pBuffer = *pCF; - pBuffer += 4; - } - - return pBuffer; -} - -/****************************************************************************** - * CLIPFORMAT_UserUnmarshal [OLE32.@] - * - * Unmarshals a clip format from a buffer. - * - * PARAMS - * pFlags [I] Flags. See notes. - * pBuffer [I] Buffer to marshal the clip format from. - * pCF [O] Address that receive the unmarshaled clip format. - * - * RETURNS - * The end of the marshaled data in the buffer. - * - * NOTES - * Even though the function is documented to take a pointer to an unsigned - * long in pFlags, it actually takes a pointer to a USER_MARSHAL_CB structure, of which - * the first parameter is an unsigned long. - * This function is only intended to be called by the RPC runtime. - */ -unsigned char * __RPC_USER CLIPFORMAT_UserUnmarshal(ULONG *pFlags, unsigned char *pBuffer, CLIPFORMAT *pCF) -{ - LONG fContext; - - TRACE("(%s, %p, %p\n", debugstr_user_flags(pFlags), pBuffer, pCF); - - ALIGN_POINTER(pBuffer, 3); - - fContext = *(DWORD *)pBuffer; - pBuffer += 4; - - if (fContext == WDT_INPROC_CALL) - { - *pCF = *(CLIPFORMAT *)pBuffer; - pBuffer += 4; - } - else if (fContext == WDT_REMOTE_CALL) - { - CLIPFORMAT cf; - UINT len; - - /* pointer ID for registered clip format string */ - if (*(DWORD *)pBuffer == 0) - RaiseException(RPC_S_INVALID_BOUND, 0, 0, NULL); - pBuffer += 4; - - len = *(UINT *)pBuffer; - pBuffer += sizeof(UINT); - if (*(UINT *)pBuffer != 0) - RaiseException(RPC_S_INVALID_BOUND, 0, 0, NULL); - pBuffer += sizeof(UINT); - if (*(UINT *)pBuffer != len) - RaiseException(RPC_S_INVALID_BOUND, 0, 0, NULL); - pBuffer += sizeof(UINT); - if (((WCHAR *)pBuffer)[len - 1] != '\0') - RaiseException(RPC_S_INVALID_BOUND, 0, 0, NULL); - TRACE("unmarshaling clip format %s\n", debugstr_w((LPCWSTR)pBuffer)); - cf = RegisterClipboardFormatW((LPCWSTR)pBuffer); - pBuffer += len * sizeof(WCHAR); - if (!cf) - RaiseException(DV_E_CLIPFORMAT, 0, 0, NULL); - *pCF = cf; - } - else - /* code not really appropriate, but nearest I can find */ - RaiseException(RPC_S_INVALID_TAG, 0, 0, NULL); - return pBuffer; -} - -/****************************************************************************** - * CLIPFORMAT_UserFree [OLE32.@] - * - * Frees an unmarshaled clip format. - * - * PARAMS - * pFlags [I] Flags. See notes. - * pCF [I] Clip format to free. - * - * RETURNS - * The end of the marshaled data in the buffer. - * - * NOTES - * Even though the function is documented to take a pointer to an unsigned - * long in pFlags, it actually takes a pointer to a USER_MARSHAL_CB - * structure, of which the first parameter is an unsigned long. - * This function is only intended to be called by the RPC runtime. - */ -void __RPC_USER CLIPFORMAT_UserFree(ULONG *pFlags, CLIPFORMAT *pCF) -{ - /* there is no inverse of the RegisterClipboardFormat function, - * so nothing to do */ -} - static ULONG handle_UserSize(ULONG *pFlags, ULONG StartingSize, HANDLE *handle) { if (LOWORD(*pFlags) == MSHCTX_DIFFERENTMACHINE)
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=76423
Your paranoid android.
=== debiant (32 bit WoW report) ===
ole32: clipboard.c:1051: Test failed: OleIsCurrentClipboard returned 0 clipboard.c:1119: Test failed: 1 WM_DRAWCLIPBOARD received
Signed-off-by: Huw Davies huw@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/combase/Makefile.in | 2 +- dlls/combase/combase.spec | 4 + dlls/combase/usrmarshal.c | 201 ++++++++++++++++++++++++++++++++++++++ dlls/ole32/ole32.spec | 8 +- dlls/ole32/usrmarshal.c | 201 -------------------------------------- 5 files changed, 210 insertions(+), 206 deletions(-)
diff --git a/dlls/combase/Makefile.in b/dlls/combase/Makefile.in index f91f6bffc36..954dc629973 100644 --- a/dlls/combase/Makefile.in +++ b/dlls/combase/Makefile.in @@ -1,6 +1,6 @@ MODULE = combase.dll IMPORTLIB = combase -IMPORTS = advapi32 ole32 user32 uuid +IMPORTS = advapi32 ole32 user32 gdi32 uuid
EXTRADLLFLAGS = -mno-cygwin
diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec index 10356b414d8..a612d250d18 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 HBITMAP_UserFree(ptr ptr) +@ stdcall HBITMAP_UserMarshal(ptr ptr ptr) +@ stdcall HBITMAP_UserSize(ptr long ptr) +@ stdcall HBITMAP_UserUnmarshal(ptr ptr ptr) @ stdcall HBRUSH_UserFree(ptr ptr) @ stdcall HBRUSH_UserMarshal(ptr ptr ptr) @ stdcall HBRUSH_UserSize(ptr long ptr) diff --git a/dlls/combase/usrmarshal.c b/dlls/combase/usrmarshal.c index 59198ccf3f3..5b3062f0c2c 100644 --- a/dlls/combase/usrmarshal.c +++ b/dlls/combase/usrmarshal.c @@ -340,6 +340,207 @@ void __RPC_USER CLIPFORMAT_UserFree(ULONG *pFlags, CLIPFORMAT *pCF) * so nothing to do */ }
+/****************************************************************************** + * HBITMAP_UserSize (combase.@) + * + * Calculates the buffer size required to marshal a bitmap. + * + * PARAMS + * pFlags [I] Flags. See notes. + * StartingSize [I] Starting size of the buffer. This value is added on to + * the buffer size required for the clip format. + * phBmp [I] Bitmap to size. + * + * RETURNS + * The buffer size required to marshal an bitmap plus the starting size. + * + * NOTES + * Even though the function is documented to take a pointer to a ULONG in + * pFlags, it actually takes a pointer to a USER_MARSHAL_CB structure, of which + * the first parameter is a ULONG. + * This function is only intended to be called by the RPC runtime. + */ +ULONG __RPC_USER HBITMAP_UserSize(ULONG *flags, ULONG size, HBITMAP *bmp) +{ + TRACE("(%s, %d, %p)\n", debugstr_user_flags(flags), size, *bmp); + + ALIGN_LENGTH(size, 3); + + size += sizeof(ULONG); + if (LOWORD(*flags) == MSHCTX_INPROC) + size += sizeof(ULONG); + else + { + size += sizeof(ULONG); + + if (*bmp) + { + size += sizeof(ULONG); + size += FIELD_OFFSET(userBITMAP, cbSize); + size += GetBitmapBits(*bmp, 0, NULL); + } + } + + return size; +} + +/****************************************************************************** +* HBITMAP_UserMarshal (combase.@) +* +* Marshals a bitmap into a buffer. +* +* PARAMS +* pFlags [I] Flags. See notes. +* pBuffer [I] Buffer to marshal the clip format into. +* phBmp [I] Bitmap to marshal. +* +* RETURNS +* The end of the marshaled data in the buffer. +* +* NOTES +* Even though the function is documented to take a pointer to a ULONG in +* pFlags, it actually takes a pointer to a USER_MARSHAL_CB structure, of which +* the first parameter is a ULONG. +* This function is only intended to be called by the RPC runtime. +*/ +unsigned char * __RPC_USER HBITMAP_UserMarshal(ULONG *flags, unsigned char *buffer, HBITMAP *bmp) +{ + TRACE("(%s, %p, %p)\n", debugstr_user_flags(flags), buffer, *bmp); + + ALIGN_POINTER(buffer, 3); + + if (LOWORD(*flags) == MSHCTX_INPROC) + { + *(ULONG *)buffer = WDT_INPROC_CALL; + buffer += sizeof(ULONG); + *(ULONG *)buffer = (ULONG)(ULONG_PTR)*bmp; + buffer += sizeof(ULONG); + } + else + { + *(ULONG *)buffer = WDT_REMOTE_CALL; + buffer += sizeof(ULONG); + *(ULONG *)buffer = (ULONG)(ULONG_PTR)*bmp; + buffer += sizeof(ULONG); + + if (*bmp) + { + static const ULONG header_size = FIELD_OFFSET(userBITMAP, cbSize); + BITMAP bitmap; + ULONG bitmap_size; + + bitmap_size = GetBitmapBits(*bmp, 0, NULL); + *(ULONG *)buffer = bitmap_size; + buffer += sizeof(ULONG); + + GetObjectW(*bmp, sizeof(BITMAP), &bitmap); + memcpy(buffer, &bitmap, header_size); + buffer += header_size; + + GetBitmapBits(*bmp, bitmap_size, buffer); + buffer += bitmap_size; + } + } + return buffer; +} + +/****************************************************************************** + * HBITMAP_UserUnmarshal (combase.@) + * + * Unmarshals a bitmap from a buffer. + * + * PARAMS + * pFlags [I] Flags. See notes. + * pBuffer [I] Buffer to marshal the clip format from. + * phBmp [O] Address that receive the unmarshaled bitmap. + * + * RETURNS + * The end of the marshaled data in the buffer. + * + * NOTES + * Even though the function is documented to take a pointer to an ULONG in + * pFlags, it actually takes a pointer to a USER_MARSHAL_CB structure, of which + * the first parameter is an ULONG. + * This function is only intended to be called by the RPC runtime. + */ +unsigned char * __RPC_USER HBITMAP_UserUnmarshal(ULONG *flags, unsigned char *buffer, HBITMAP *bmp) +{ + ULONG context; + + TRACE("(%s, %p, %p)\n", debugstr_user_flags(flags), buffer, bmp); + + ALIGN_POINTER(buffer, 3); + + context = *(ULONG *)buffer; + buffer += sizeof(ULONG); + + if (context == WDT_INPROC_CALL) + { + *bmp = *(HBITMAP *)buffer; + buffer += sizeof(*bmp); + } + else if (context == WDT_REMOTE_CALL) + { + ULONG handle = *(ULONG *)buffer; + buffer += sizeof(ULONG); + + if (handle) + { + static const ULONG header_size = FIELD_OFFSET(userBITMAP, cbSize); + BITMAP bitmap; + ULONG bitmap_size; + unsigned char *bits; + + bitmap_size = *(ULONG *)buffer; + buffer += sizeof(ULONG); + bits = HeapAlloc(GetProcessHeap(), 0, bitmap_size); + + memcpy(&bitmap, buffer, header_size); + buffer += header_size; + + memcpy(bits, buffer, bitmap_size); + buffer += bitmap_size; + + bitmap.bmBits = bits; + *bmp = CreateBitmapIndirect(&bitmap); + + HeapFree(GetProcessHeap(), 0, bits); + } + else + *bmp = NULL; + } + else + RaiseException(RPC_S_INVALID_TAG, 0, 0, NULL); + + return buffer; +} + +/****************************************************************************** + * HBITMAP_UserFree (combase.@) + * + * Frees an unmarshaled bitmap. + * + * PARAMS + * pFlags [I] Flags. See notes. + * phBmp [I] Bitmap to free. + * + * RETURNS + * The end of the marshaled data in the buffer. + * + * NOTES + * Even though the function is documented to take a pointer to a ULONG in + * pFlags, it actually takes a pointer to a USER_MARSHAL_CB structure, of + * which the first parameter is a ULONG. + * This function is only intended to be called by the RPC runtime. + */ +void __RPC_USER HBITMAP_UserFree(ULONG *flags, HBITMAP *bmp) +{ + TRACE("(%s, %p)\n", debugstr_user_flags(flags), *bmp); + + if (LOWORD(*flags) != MSHCTX_INPROC) + DeleteObject(*bmp); +} + /****************************************************************************** * WdtpInterfacePointer_UserSize (combase.@) * diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec index c58a406d278..9f13f123272 100644 --- a/dlls/ole32/ole32.spec +++ b/dlls/ole32/ole32.spec @@ -127,10 +127,10 @@ @ 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) -@ stdcall HBITMAP_UserUnmarshal(ptr ptr ptr) +@ 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 +@ stdcall HBITMAP_UserUnmarshal(ptr ptr ptr) combase.HBITMAP_UserUnmarshal @ stdcall HBRUSH_UserFree(ptr ptr) combase.HBRUSH_UserFree @ stdcall HBRUSH_UserMarshal(ptr ptr ptr) combase.HBRUSH_UserMarshal @ stdcall HBRUSH_UserSize(ptr long ptr) combase.HBRUSH_UserSize diff --git a/dlls/ole32/usrmarshal.c b/dlls/ole32/usrmarshal.c index b7cacf7f620..d12f81f504f 100644 --- a/dlls/ole32/usrmarshal.c +++ b/dlls/ole32/usrmarshal.c @@ -375,207 +375,6 @@ void __RPC_USER HGLOBAL_UserFree(ULONG *pFlags, HGLOBAL *phGlobal) GlobalFree(*phGlobal); }
-/****************************************************************************** - * HBITMAP_UserSize [OLE32.@] - * - * Calculates the buffer size required to marshal a bitmap. - * - * PARAMS - * pFlags [I] Flags. See notes. - * StartingSize [I] Starting size of the buffer. This value is added on to - * the buffer size required for the clip format. - * phBmp [I] Bitmap to size. - * - * RETURNS - * The buffer size required to marshal an bitmap plus the starting size. - * - * NOTES - * Even though the function is documented to take a pointer to a ULONG in - * pFlags, it actually takes a pointer to a USER_MARSHAL_CB structure, of which - * the first parameter is a ULONG. - * This function is only intended to be called by the RPC runtime. - */ -ULONG __RPC_USER HBITMAP_UserSize(ULONG *flags, ULONG size, HBITMAP *bmp) -{ - TRACE("(%s, %d, %p)\n", debugstr_user_flags(flags), size, *bmp); - - ALIGN_LENGTH(size, 3); - - size += sizeof(ULONG); - if (LOWORD(*flags) == MSHCTX_INPROC) - size += sizeof(ULONG); - else - { - size += sizeof(ULONG); - - if (*bmp) - { - size += sizeof(ULONG); - size += FIELD_OFFSET(userBITMAP, cbSize); - size += GetBitmapBits(*bmp, 0, NULL); - } - } - - return size; -} - -/****************************************************************************** -* HBITMAP_UserMarshal [OLE32.@] -* -* Marshals a bitmap into a buffer. -* -* PARAMS -* pFlags [I] Flags. See notes. -* pBuffer [I] Buffer to marshal the clip format into. -* phBmp [I] Bitmap to marshal. -* -* RETURNS -* The end of the marshaled data in the buffer. -* -* NOTES -* Even though the function is documented to take a pointer to a ULONG in -* pFlags, it actually takes a pointer to a USER_MARSHAL_CB structure, of which -* the first parameter is a ULONG. -* This function is only intended to be called by the RPC runtime. -*/ -unsigned char * __RPC_USER HBITMAP_UserMarshal(ULONG *flags, unsigned char *buffer, HBITMAP *bmp) -{ - TRACE("(%s, %p, %p)\n", debugstr_user_flags(flags), buffer, *bmp); - - ALIGN_POINTER(buffer, 3); - - if (LOWORD(*flags) == MSHCTX_INPROC) - { - *(ULONG *)buffer = WDT_INPROC_CALL; - buffer += sizeof(ULONG); - *(ULONG *)buffer = (ULONG)(ULONG_PTR)*bmp; - buffer += sizeof(ULONG); - } - else - { - *(ULONG *)buffer = WDT_REMOTE_CALL; - buffer += sizeof(ULONG); - *(ULONG *)buffer = (ULONG)(ULONG_PTR)*bmp; - buffer += sizeof(ULONG); - - if (*bmp) - { - static const ULONG header_size = FIELD_OFFSET(userBITMAP, cbSize); - BITMAP bitmap; - ULONG bitmap_size; - - bitmap_size = GetBitmapBits(*bmp, 0, NULL); - *(ULONG *)buffer = bitmap_size; - buffer += sizeof(ULONG); - - GetObjectW(*bmp, sizeof(BITMAP), &bitmap); - memcpy(buffer, &bitmap, header_size); - buffer += header_size; - - GetBitmapBits(*bmp, bitmap_size, buffer); - buffer += bitmap_size; - } - } - return buffer; -} - -/****************************************************************************** - * HBITMAP_UserUnmarshal [OLE32.@] - * - * Unmarshals a bitmap from a buffer. - * - * PARAMS - * pFlags [I] Flags. See notes. - * pBuffer [I] Buffer to marshal the clip format from. - * phBmp [O] Address that receive the unmarshaled bitmap. - * - * RETURNS - * The end of the marshaled data in the buffer. - * - * NOTES - * Even though the function is documented to take a pointer to an ULONG in - * pFlags, it actually takes a pointer to a USER_MARSHAL_CB structure, of which - * the first parameter is an ULONG. - * This function is only intended to be called by the RPC runtime. - */ -unsigned char * __RPC_USER HBITMAP_UserUnmarshal(ULONG *flags, unsigned char *buffer, HBITMAP *bmp) -{ - ULONG context; - - TRACE("(%s, %p, %p)\n", debugstr_user_flags(flags), buffer, bmp); - - ALIGN_POINTER(buffer, 3); - - context = *(ULONG *)buffer; - buffer += sizeof(ULONG); - - if (context == WDT_INPROC_CALL) - { - *bmp = *(HBITMAP *)buffer; - buffer += sizeof(*bmp); - } - else if (context == WDT_REMOTE_CALL) - { - ULONG handle = *(ULONG *)buffer; - buffer += sizeof(ULONG); - - if (handle) - { - static const ULONG header_size = FIELD_OFFSET(userBITMAP, cbSize); - BITMAP bitmap; - ULONG bitmap_size; - unsigned char *bits; - - bitmap_size = *(ULONG *)buffer; - buffer += sizeof(ULONG); - bits = HeapAlloc(GetProcessHeap(), 0, bitmap_size); - - memcpy(&bitmap, buffer, header_size); - buffer += header_size; - - memcpy(bits, buffer, bitmap_size); - buffer += bitmap_size; - - bitmap.bmBits = bits; - *bmp = CreateBitmapIndirect(&bitmap); - - HeapFree(GetProcessHeap(), 0, bits); - } - else - *bmp = NULL; - } - else - RaiseException(RPC_S_INVALID_TAG, 0, 0, NULL); - - return buffer; -} - -/****************************************************************************** - * HBITMAP_UserFree [OLE32.@] - * - * Frees an unmarshaled bitmap. - * - * PARAMS - * pFlags [I] Flags. See notes. - * phBmp [I] Bitmap to free. - * - * RETURNS - * The end of the marshaled data in the buffer. - * - * NOTES - * Even though the function is documented to take a pointer to a ULONG in - * pFlags, it actually takes a pointer to a USER_MARSHAL_CB structure, of - * which the first parameter is a ULONG. - * This function is only intended to be called by the RPC runtime. - */ -void __RPC_USER HBITMAP_UserFree(ULONG *flags, HBITMAP *bmp) -{ - TRACE("(%s, %p)\n", debugstr_user_flags(flags), *bmp); - - if (LOWORD(*flags) != MSHCTX_INPROC) - DeleteObject(*bmp); -} - /****************************************************************************** * HPALETTE_UserSize [OLE32.@] *
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=76424
Your paranoid android.
=== debiant (64 bit WoW report) ===
ole32: clipboard.c:1159: Test failed: got 800401d0 clipboard.c:1175: Test failed: got 800401d0 clipboard.c:1182: Test failed: data objects match clipboard.c:1185: Test failed: Failed to clear clipboard, hr 0x800401d0. clipboard.c:1190: Test failed: data objects match clipboard.c:1191: Test failed: data objects match clipboard.c:1201: Test failed: got 800401d0 clipboard.c:1213: Test failed: got 800401d0 clipboard.c:1214: Test failed: GetData not called clipboard.c:1217: Test failed: 1 1 clipboard.c:1224: Test failed: GetData not called clipboard.c:1228: Test failed: 1
Signed-off-by: Huw Davies huw@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/combase/combase.spec | 4 ++ dlls/combase/usrmarshal.c | 99 +++++++++++++++++++++++++++++++++++++ dlls/ole32/ole32.spec | 8 +-- dlls/ole32/usrmarshal.c | 100 -------------------------------------- 4 files changed, 107 insertions(+), 104 deletions(-)
diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec index a612d250d18..9d0bad29f0d 100644 --- a/dlls/combase/combase.spec +++ b/dlls/combase/combase.spec @@ -205,6 +205,10 @@ @ stdcall HMENU_UserMarshal(ptr ptr ptr) @ stdcall HMENU_UserSize(ptr long ptr) @ stdcall HMENU_UserUnmarshal(ptr ptr ptr) +@ stdcall HPALETTE_UserFree(ptr ptr) +@ stdcall HPALETTE_UserMarshal(ptr ptr ptr) +@ stdcall HPALETTE_UserSize(ptr long ptr) +@ stdcall HPALETTE_UserUnmarshal(ptr ptr ptr) @ stub HSTRING_UserFree @ stub -arch=win64 HSTRING_UserFree64 @ stub HSTRING_UserMarshal diff --git a/dlls/combase/usrmarshal.c b/dlls/combase/usrmarshal.c index 5b3062f0c2c..c88e8c57cd0 100644 --- a/dlls/combase/usrmarshal.c +++ b/dlls/combase/usrmarshal.c @@ -541,6 +541,105 @@ void __RPC_USER HBITMAP_UserFree(ULONG *flags, HBITMAP *bmp) DeleteObject(*bmp); }
+/****************************************************************************** + * HPALETTE_UserSize (combase.@) + * + * Calculates the buffer size required to marshal a palette. + * + * PARAMS + * pFlags [I] Flags. See notes. + * StartingSize [I] Starting size of the buffer. This value is added on to + * the buffer size required for the clip format. + * phPal [I] Palette to size. + * + * RETURNS + * The buffer size required to marshal a palette plus the starting size. + * + * NOTES + * Even though the function is documented to take a pointer to a ULONG in + * pFlags, it actually takes a pointer to a USER_MARSHAL_CB structure, of which + * the first parameter is a ULONG. + * This function is only intended to be called by the RPC runtime. + */ +ULONG __RPC_USER HPALETTE_UserSize(ULONG *pFlags, ULONG StartingSize, HPALETTE *phPal) +{ + FIXME(":stub\n"); + return StartingSize; +} + +/****************************************************************************** + * HPALETTE_UserMarshal (combase.@) + * + * Marshals a palette into a buffer. + * + * PARAMS + * pFlags [I] Flags. See notes. + * pBuffer [I] Buffer to marshal the clip format into. + * phPal [I] Palette to marshal. + * + * RETURNS + * The end of the marshaled data in the buffer. + * + * NOTES + * Even though the function is documented to take a pointer to a ULONG in + * pFlags, it actually takes a pointer to a USER_MARSHAL_CB structure, of which + * the first parameter is a ULONG. + * This function is only intended to be called by the RPC runtime. + */ +unsigned char * __RPC_USER HPALETTE_UserMarshal(ULONG *pFlags, unsigned char *pBuffer, HPALETTE *phPal) +{ + FIXME(":stub\n"); + return pBuffer; +} + +/****************************************************************************** + * HPALETTE_UserUnmarshal (combase.@) + * + * Unmarshals a palette from a buffer. + * + * PARAMS + * pFlags [I] Flags. See notes. + * pBuffer [I] Buffer to marshal the clip format from. + * phPal [O] Address that receive the unmarshaled palette. + * + * RETURNS + * The end of the marshaled data in the buffer. + * + * NOTES + * Even though the function is documented to take a pointer to an ULONG in + * pFlags, it actually takes a pointer to a USER_MARSHAL_CB structure, of which + * the first parameter is an ULONG. + * This function is only intended to be called by the RPC runtime. + */ +unsigned char * __RPC_USER HPALETTE_UserUnmarshal(ULONG *pFlags, unsigned char *pBuffer, HPALETTE *phPal) +{ + FIXME(":stub\n"); + return pBuffer; +} + +/****************************************************************************** + * HPALETTE_UserFree (combase.@) + * + * Frees an unmarshaled palette. + * + * PARAMS + * pFlags [I] Flags. See notes. + * phPal [I] Palette to free. + * + * RETURNS + * The end of the marshaled data in the buffer. + * + * NOTES + * Even though the function is documented to take a pointer to a ULONG in + * pFlags, it actually takes a pointer to a USER_MARSHAL_CB structure, of + * which the first parameter is a ULONG. + * This function is only intended to be called by the RPC runtime. + */ +void __RPC_USER HPALETTE_UserFree(ULONG *pFlags, HPALETTE *phPal) +{ + FIXME(":stub\n"); +} + /****************************************************************************** * WdtpInterfacePointer_UserSize (combase.@) * diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec index 9f13f123272..97618e08935 100644 --- a/dlls/ole32/ole32.spec +++ b/dlls/ole32/ole32.spec @@ -163,10 +163,10 @@ @ stdcall HMETAFILE_UserMarshal(ptr ptr ptr) @ stdcall HMETAFILE_UserSize(ptr long ptr) @ stdcall HMETAFILE_UserUnmarshal(ptr ptr ptr) -@ stdcall HPALETTE_UserFree(ptr ptr) -@ stdcall HPALETTE_UserMarshal(ptr ptr ptr) -@ stdcall HPALETTE_UserSize(ptr long ptr) -@ stdcall HPALETTE_UserUnmarshal(ptr ptr ptr) +@ stdcall HPALETTE_UserFree(ptr ptr) combase.HPALETTE_UserFree +@ stdcall HPALETTE_UserMarshal(ptr ptr ptr) combase.HPALETTE_UserMarshal +@ stdcall HPALETTE_UserSize(ptr long ptr) combase.HPALETTE_UserSize +@ stdcall HPALETTE_UserUnmarshal(ptr ptr ptr) combase.HPALETTE_UserUnmarshal @ stdcall HWND_UserFree(ptr ptr) combase.HWND_UserFree @ stdcall HWND_UserMarshal(ptr ptr ptr) combase.HWND_UserMarshal @ stdcall HWND_UserSize(ptr long ptr) combase.HWND_UserSize diff --git a/dlls/ole32/usrmarshal.c b/dlls/ole32/usrmarshal.c index d12f81f504f..694ef60764f 100644 --- a/dlls/ole32/usrmarshal.c +++ b/dlls/ole32/usrmarshal.c @@ -375,106 +375,6 @@ void __RPC_USER HGLOBAL_UserFree(ULONG *pFlags, HGLOBAL *phGlobal) GlobalFree(*phGlobal); }
-/****************************************************************************** - * HPALETTE_UserSize [OLE32.@] - * - * Calculates the buffer size required to marshal a palette. - * - * PARAMS - * pFlags [I] Flags. See notes. - * StartingSize [I] Starting size of the buffer. This value is added on to - * the buffer size required for the clip format. - * phPal [I] Palette to size. - * - * RETURNS - * The buffer size required to marshal a palette plus the starting size. - * - * NOTES - * Even though the function is documented to take a pointer to a ULONG in - * pFlags, it actually takes a pointer to a USER_MARSHAL_CB structure, of which - * the first parameter is a ULONG. - * This function is only intended to be called by the RPC runtime. - */ -ULONG __RPC_USER HPALETTE_UserSize(ULONG *pFlags, ULONG StartingSize, HPALETTE *phPal) -{ - FIXME(":stub\n"); - return StartingSize; -} - -/****************************************************************************** - * HPALETTE_UserMarshal [OLE32.@] - * - * Marshals a palette into a buffer. - * - * PARAMS - * pFlags [I] Flags. See notes. - * pBuffer [I] Buffer to marshal the clip format into. - * phPal [I] Palette to marshal. - * - * RETURNS - * The end of the marshaled data in the buffer. - * - * NOTES - * Even though the function is documented to take a pointer to a ULONG in - * pFlags, it actually takes a pointer to a USER_MARSHAL_CB structure, of which - * the first parameter is a ULONG. - * This function is only intended to be called by the RPC runtime. - */ -unsigned char * __RPC_USER HPALETTE_UserMarshal(ULONG *pFlags, unsigned char *pBuffer, HPALETTE *phPal) -{ - FIXME(":stub\n"); - return pBuffer; -} - -/****************************************************************************** - * HPALETTE_UserUnmarshal [OLE32.@] - * - * Unmarshals a palette from a buffer. - * - * PARAMS - * pFlags [I] Flags. See notes. - * pBuffer [I] Buffer to marshal the clip format from. - * phPal [O] Address that receive the unmarshaled palette. - * - * RETURNS - * The end of the marshaled data in the buffer. - * - * NOTES - * Even though the function is documented to take a pointer to an ULONG in - * pFlags, it actually takes a pointer to a USER_MARSHAL_CB structure, of which - * the first parameter is an ULONG. - * This function is only intended to be called by the RPC runtime. - */ -unsigned char * __RPC_USER HPALETTE_UserUnmarshal(ULONG *pFlags, unsigned char *pBuffer, HPALETTE *phPal) -{ - FIXME(":stub\n"); - return pBuffer; -} - -/****************************************************************************** - * HPALETTE_UserFree [OLE32.@] - * - * Frees an unmarshaled palette. - * - * PARAMS - * pFlags [I] Flags. See notes. - * phPal [I] Palette to free. - * - * RETURNS - * The end of the marshaled data in the buffer. - * - * NOTES - * Even though the function is documented to take a pointer to a ULONG in - * pFlags, it actually takes a pointer to a USER_MARSHAL_CB structure, of - * which the first parameter is a ULONG. - * This function is only intended to be called by the RPC runtime. - */ -void __RPC_USER HPALETTE_UserFree(ULONG *pFlags, HPALETTE *phPal) -{ - FIXME(":stub\n"); -} - - /****************************************************************************** * HMETAFILE_UserSize [OLE32.@] *
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=76425
Your paranoid android.
=== debiant (32 bit WoW report) ===
ole32: clipboard.c:1051: Test failed: OleIsCurrentClipboard returned 0 clipboard.c:1119: Test failed: 1 WM_DRAWCLIPBOARD received
Signed-off-by: Huw Davies huw@codeweavers.com