Wine-Devel
Threads by month
- ----- 2026 -----
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- 10 participants
- 84519 discussions
32 bit compilation has been broken by 8db1662d749991a77b8945c752ab024d2d6b1244
(failing on C_ASSERT)
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/wldap32/libldap.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/dlls/wldap32/libldap.c b/dlls/wldap32/libldap.c
index 8872421dabc..03b71f3db87 100644
--- a/dlls/wldap32/libldap.c
+++ b/dlls/wldap32/libldap.c
@@ -53,7 +53,14 @@ C_ASSERT( sizeof(LDAPSortKeyU) == sizeof(LDAPSortKey) );
C_ASSERT( sizeof(LDAPVLVInfoU) == sizeof(LDAPVLVInfo) );
C_ASSERT( sizeof(LDAPAPIInfoU) == sizeof(LDAPAPIInfo) );
C_ASSERT( sizeof(LDAPAPIFeatureInfoU) == sizeof(LDAPAPIFeatureInfo) );
-C_ASSERT( sizeof(struct timevalU) == sizeof(struct timeval) );
+
+static struct timeval *cconvert_timeval(const struct timevalU *tvu, struct timeval *tv)
+{
+ if (!tvu) return NULL;
+ tv->tv_sec = tvu->tv_sec;
+ tv->tv_usec = tvu->tv_usec;
+ return tv;
+}
#define WLDAP32_LBER_ERROR (~0l)
@@ -488,8 +495,9 @@ static NTSTATUS wrap_ldap_rename_s( void *args )
static NTSTATUS wrap_ldap_result( void *args )
{
struct ldap_result_params *params = args;
+ struct timeval tv;
return ldap_result( params->ld, params->msgid, params->all,
- (struct timeval *)params->timeout, (LDAPMessage **)params->result );
+ convert_timeval(params->timeout, &tv), (LDAPMessage **)params->result );
}
static NTSTATUS wrap_ldap_sasl_bind( void *args )
@@ -555,18 +563,20 @@ static NTSTATUS wrap_ldap_sasl_interactive_bind_s( void *args )
static NTSTATUS wrap_ldap_search_ext( void *args )
{
struct ldap_search_ext_params *params = args;
+ struct timeval tv;
return ldap_search_ext( params->ld, params->base, params->scope, params->filter, params->attrs,
params->attrsonly, (LDAPControl **)params->serverctrls,
- (LDAPControl **)params->clientctrls, (struct timeval *)params->timeout,
+ (LDAPControl **)params->clientctrls, convert_timeval(params->timeout, &tv),
params->sizelimit, (int *)params->msg );
}
static NTSTATUS wrap_ldap_search_ext_s( void *args )
{
struct ldap_search_ext_s_params *params = args;
+ struct timeval tv;
return ldap_search_ext_s( params->ld, params->base, params->scope, params->filter, params->attrs,
params->attrsonly, (LDAPControl **)params->serverctrls,
- (LDAPControl **)params->clientctrls, (struct timeval *)params->timeout,
+ (LDAPControl **)params->clientctrls, convert_timeval(params->timeout, &tv),
params->sizelimit, (LDAPMessage **)params->result );
}
4
4
Feb. 4, 2022
A bunch of them... nothing fancy
A+
---
Eric Pouech (19):
programs/attrib: enable compilation with long types
programs/cabarc: enable compilation with long types
programs/chcp.com: enable compilation with long types
programs/conhost: enable compilation with long types
programs/[cw]script: enable compilation with long types
programs/dxdiag: enable compilation with long types
programs/eject: enable compilation with long types
programs/explorer: enable compilation with long types
programs/fsutil: enable compilation with long types
programs/msiexec: enable compilation with long types
programs/net: enable compilation with long types
programs/netstat: enable compilation with long types
programs/ping: enable compilation with long types
programs/plugplay: enable compilation with long types
programs/presentationfontcache: enable compilation with long types
programs/regedit: enable compilation with long types
programs/reg: enable compilation with long types
programs/regsvr32: enable compilation with long types
programs/rpcss: enable compilation with long types
programs/attrib/Makefile.in | 1 -
programs/attrib/attrib.c | 6 +--
programs/cabarc/Makefile.in | 1 -
programs/cabarc/cabarc.c | 2 +-
programs/chcp.com/Makefile.in | 1 -
programs/chcp.com/main.c | 4 +-
programs/conhost/Makefile.in | 1 -
programs/conhost/conhost.c | 18 ++++----
programs/conhost/window.c | 10 ++---
programs/cscript/Makefile.in | 2 +-
programs/dxdiag/Makefile.in | 1 -
programs/dxdiag/information.c | 2 +-
programs/dxdiag/output.c | 6 +--
programs/eject/Makefile.in | 1 -
programs/eject/eject.c | 6 +--
programs/explorer/Makefile.in | 1 -
programs/explorer/appbar.c | 2 +-
programs/explorer/desktop.c | 52 +++++++++++-----------
programs/explorer/explorer.c | 4 +-
programs/explorer/systray.c | 2 +-
programs/fsutil/Makefile.in | 1 -
programs/fsutil/main.c | 2 +-
programs/msiexec/Makefile.in | 1 -
programs/msiexec/msiexec.c | 12 ++---
programs/msiexec/service.c | 4 +-
programs/net/Makefile.in | 1 -
programs/net/net.c | 4 +-
programs/netstat/Makefile.in | 1 -
programs/netstat/netstat.c | 2 +-
programs/ping/Makefile.in | 1 -
programs/ping/ping_main.c | 2 +-
programs/plugplay/Makefile.in | 1 -
programs/plugplay/main.c | 8 ++--
programs/presentationfontcache/Makefile.in | 1 -
programs/presentationfontcache/main.c | 2 +-
programs/reg/Makefile.in | 1 -
programs/reg/import.c | 2 +-
programs/reg/reg.c | 4 +-
programs/regedit/Makefile.in | 1 -
programs/regedit/edit.c | 2 +-
programs/regedit/framewnd.c | 2 +-
programs/regedit/main.c | 2 +-
programs/regedit/regedit.c | 6 +--
programs/regsvr32/Makefile.in | 1 -
programs/regsvr32/regsvr32.c | 6 +--
programs/rpcss/Makefile.in | 1 -
programs/rpcss/epmp.c | 10 ++---
programs/rpcss/irotp.c | 8 ++--
programs/rpcss/rpcss_main.c | 4 +-
programs/wscript/Makefile.in | 1 -
programs/wscript/arguments.c | 8 ++--
programs/wscript/host.c | 10 ++---
programs/wscript/main.c | 6 +--
53 files changed, 111 insertions(+), 130 deletions(-)
1
19
1
0
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/dxva2/Makefile.in | 1 -
dlls/dxva2/main.c | 38 +++++++++++++++++++-------------------
2 files changed, 19 insertions(+), 20 deletions(-)
diff --git a/dlls/dxva2/Makefile.in b/dlls/dxva2/Makefile.in
index 66add06535b..8f7a62bb902 100644
--- a/dlls/dxva2/Makefile.in
+++ b/dlls/dxva2/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = dxva2.dll
IMPORTS = uuid ole32
IMPORTLIB = dxva2
diff --git a/dlls/dxva2/main.c b/dlls/dxva2/main.c
index 5beac4164a6..b262990e0f7 100644
--- a/dlls/dxva2/main.c
+++ b/dlls/dxva2/main.c
@@ -163,7 +163,7 @@ static ULONG WINAPI video_processor_AddRef(IDirectXVideoProcessor *iface)
struct video_processor *processor = impl_from_IDirectXVideoProcessor(iface);
ULONG refcount = InterlockedIncrement(&processor->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -173,7 +173,7 @@ static ULONG WINAPI video_processor_Release(IDirectXVideoProcessor *iface)
struct video_processor *processor = impl_from_IDirectXVideoProcessor(iface);
ULONG refcount = InterlockedDecrement(&processor->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -314,7 +314,7 @@ static HRESULT WINAPI video_processor_VideoProcessBlt(IDirectXVideoProcessor *if
if (FAILED(hr = IDirect3DSurface9_GetDevice(rt, &device)))
{
- WARN("Failed to get surface device, hr %#x.\n", hr);
+ WARN("Failed to get surface device, hr %#lx.\n", hr);
return hr;
}
@@ -330,7 +330,7 @@ static HRESULT WINAPI video_processor_VideoProcessBlt(IDirectXVideoProcessor *if
if (FAILED(hr = IDirect3DDevice9_StretchRect(device, samples[i].SrcSurface, &samples[i].SrcRect,
rt, &dst_rect, D3DTEXF_POINT)))
{
- WARN("Failed to copy sample %u, hr %#x.\n", i, hr);
+ WARN("Failed to copy sample %u, hr %#lx.\n", i, hr);
}
}
@@ -398,7 +398,7 @@ static HRESULT WINAPI device_manager_processor_service_CreateSurface(IDirectXVid
unsigned int i, j;
HRESULT hr;
- TRACE("%p, %u, %u, %u, %u, %u, %u, %u, %p, %p.\n", iface, width, height, backbuffers, format, pool, usage, dxvaType,
+ TRACE("%p, %u, %u, %u, %u, %u, %lu, %lu, %p, %p.\n", iface, width, height, backbuffers, format, pool, usage, dxvaType,
surfaces, shared_handle);
if (backbuffers >= UINT_MAX)
@@ -679,7 +679,7 @@ static HRESULT WINAPI device_manager_decoder_service_CreateSurface(IDirectXVideo
UINT width, UINT height, UINT backbuffers, D3DFORMAT format, D3DPOOL pool, DWORD usage, DWORD dxvaType,
IDirect3DSurface9 **surfaces, HANDLE *shared_handle)
{
- FIXME("%p, %u, %u, %u, %#x, %d, %d, %d, %p, %p.\n", iface, width, height, backbuffers, format, pool, usage,
+ FIXME("%p, %u, %u, %u, %#x, %d, %ld, %ld, %p, %p.\n", iface, width, height, backbuffers, format, pool, usage,
dxvaType, surfaces, shared_handle);
return E_NOTIMPL;
@@ -753,7 +753,7 @@ static ULONG WINAPI device_manager_AddRef(IDirect3DDeviceManager9 *iface)
struct device_manager *manager = impl_from_IDirect3DDeviceManager9(iface);
ULONG refcount = InterlockedIncrement(&manager->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -764,7 +764,7 @@ static ULONG WINAPI device_manager_Release(IDirect3DDeviceManager9 *iface)
ULONG refcount = InterlockedDecrement(&manager->refcount);
size_t i;
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -1037,7 +1037,7 @@ static const IDirect3DDeviceManager9Vtbl device_manager_vtbl =
BOOL WINAPI CapabilitiesRequestAndCapabilitiesReply( HMONITOR monitor, LPSTR buffer, DWORD length )
{
- FIXME("(%p, %p, %d): stub\n", monitor, buffer, length);
+ FIXME("%p, %p, %ld: stub.\n", monitor, buffer, length);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
@@ -1113,7 +1113,7 @@ BOOL WINAPI DestroyPhysicalMonitor( HMONITOR monitor )
BOOL WINAPI DestroyPhysicalMonitors( DWORD arraySize, LPPHYSICAL_MONITOR array )
{
- FIXME("(0x%x, %p): stub\n", arraySize, array);
+ FIXME("%lu, %p: stub.\n", arraySize, array);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
@@ -1221,7 +1221,7 @@ HRESULT WINAPI GetNumberOfPhysicalMonitorsFromIDirect3DDevice9( IDirect3DDevice9
BOOL WINAPI GetPhysicalMonitorsFromHMONITOR( HMONITOR monitor, DWORD arraySize, LPPHYSICAL_MONITOR array )
{
- FIXME("(%p, 0x%x, %p): stub\n", monitor, arraySize, array);
+ FIXME("%p, %lu, %p: stub.\n", monitor, arraySize, array);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
@@ -1229,7 +1229,7 @@ BOOL WINAPI GetPhysicalMonitorsFromHMONITOR( HMONITOR monitor, DWORD arraySize,
HRESULT WINAPI GetPhysicalMonitorsFromIDirect3DDevice9( IDirect3DDevice9 *device, DWORD arraySize, LPPHYSICAL_MONITOR array )
{
- FIXME("(%p, 0x%x, %p): stub\n", device, arraySize, array);
+ FIXME("%p, %lu, %p: stub.\n", device, arraySize, array);
return E_NOTIMPL;
}
@@ -1301,7 +1301,7 @@ BOOL WINAPI SaveCurrentSettings( HMONITOR monitor )
BOOL WINAPI SetMonitorBrightness( HMONITOR monitor, DWORD brightness )
{
- FIXME("(%p, 0x%x): stub\n", monitor, brightness);
+ FIXME("%p, %#lx: stub.\n", monitor, brightness);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
@@ -1317,7 +1317,7 @@ BOOL WINAPI SetMonitorColorTemperature( HMONITOR monitor, MC_COLOR_TEMPERATURE t
BOOL WINAPI SetMonitorContrast( HMONITOR monitor, DWORD contrast )
{
- FIXME("(%p, 0x%x): stub\n", monitor, contrast);
+ FIXME("%p, %#lx: stub.\n", monitor, contrast);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
@@ -1325,7 +1325,7 @@ BOOL WINAPI SetMonitorContrast( HMONITOR monitor, DWORD contrast )
BOOL WINAPI SetMonitorDisplayAreaPosition( HMONITOR monitor, MC_POSITION_TYPE type, DWORD position )
{
- FIXME("(%p, 0x%x, 0x%x): stub\n", monitor, type, position);
+ FIXME("%p, 0x%x, %#lx: stub.\n", monitor, type, position);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
@@ -1333,7 +1333,7 @@ BOOL WINAPI SetMonitorDisplayAreaPosition( HMONITOR monitor, MC_POSITION_TYPE ty
BOOL WINAPI SetMonitorDisplayAreaSize( HMONITOR monitor, MC_SIZE_TYPE type, DWORD size )
{
- FIXME("(%p, 0x%x, 0x%x): stub\n", monitor, type, size);
+ FIXME("%p, 0x%x, %#lx: stub.\n", monitor, type, size);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
@@ -1341,7 +1341,7 @@ BOOL WINAPI SetMonitorDisplayAreaSize( HMONITOR monitor, MC_SIZE_TYPE type, DWOR
BOOL WINAPI SetMonitorRedGreenOrBlueDrive( HMONITOR monitor, MC_DRIVE_TYPE type, DWORD drive )
{
- FIXME("(%p, 0x%x, 0x%x): stub\n", monitor, type, drive);
+ FIXME("%p, 0x%x, %#lx: stub.\n", monitor, type, drive);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
@@ -1349,7 +1349,7 @@ BOOL WINAPI SetMonitorRedGreenOrBlueDrive( HMONITOR monitor, MC_DRIVE_TYPE type,
BOOL WINAPI SetMonitorRedGreenOrBlueGain( HMONITOR monitor, MC_GAIN_TYPE type, DWORD gain )
{
- FIXME("(%p, 0x%x, 0x%x): stub\n", monitor, type, gain);
+ FIXME("%p, 0x%x, %#lx: stub.\n", monitor, type, gain);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
@@ -1357,7 +1357,7 @@ BOOL WINAPI SetMonitorRedGreenOrBlueGain( HMONITOR monitor, MC_GAIN_TYPE type, D
BOOL WINAPI SetVCPFeature( HMONITOR monitor, BYTE vcpCode, DWORD value )
{
- FIXME("(%p, 0x%02x, 0x%x): stub\n", monitor, vcpCode, value);
+ FIXME("%p, 0x%02x, %#lx: stub.\n", monitor, vcpCode, value);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
--
2.34.1
1
0
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46284
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/d3dx9_24/d3dx9_24.spec | 2 +-
dlls/d3dx9_25/d3dx9_25.spec | 2 +-
dlls/d3dx9_26/d3dx9_26.spec | 2 +-
dlls/d3dx9_27/d3dx9_27.spec | 2 +-
dlls/d3dx9_28/d3dx9_28.spec | 2 +-
dlls/d3dx9_29/d3dx9_29.spec | 2 +-
dlls/d3dx9_30/d3dx9_30.spec | 2 +-
dlls/d3dx9_31/d3dx9_31.spec | 2 +-
dlls/d3dx9_32/d3dx9_32.spec | 2 +-
dlls/d3dx9_33/d3dx9_33.spec | 2 +-
dlls/d3dx9_34/d3dx9_34.spec | 2 +-
dlls/d3dx9_35/d3dx9_35.spec | 2 +-
dlls/d3dx9_36/d3dx9_36.spec | 2 +-
dlls/d3dx9_36/d3dx9_private.h | 2 +
dlls/d3dx9_36/math.c | 143 ++++++++++++++++++++++++
dlls/d3dx9_36/surface.c | 2 +-
dlls/d3dx9_36/tests/math.c | 199 ++++++++++++++++++++++++++++++++++
dlls/d3dx9_37/d3dx9_37.spec | 2 +-
dlls/d3dx9_38/d3dx9_38.spec | 2 +-
dlls/d3dx9_39/d3dx9_39.spec | 2 +-
dlls/d3dx9_40/d3dx9_40.spec | 2 +-
dlls/d3dx9_41/d3dx9_41.spec | 2 +-
dlls/d3dx9_42/d3dx9_42.spec | 2 +-
dlls/d3dx9_43/d3dx9_43.spec | 2 +-
include/d3dx9math.h | 1 +
25 files changed, 366 insertions(+), 21 deletions(-)
diff --git a/dlls/d3dx9_24/d3dx9_24.spec b/dlls/d3dx9_24/d3dx9_24.spec
index d617d766f85..8791e4ec044 100644
--- a/dlls/d3dx9_24/d3dx9_24.spec
+++ b/dlls/d3dx9_24/d3dx9_24.spec
@@ -256,7 +256,7 @@
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_25/d3dx9_25.spec b/dlls/d3dx9_25/d3dx9_25.spec
index f13923dcb3a..0431a9f7f75 100644
--- a/dlls/d3dx9_25/d3dx9_25.spec
+++ b/dlls/d3dx9_25/d3dx9_25.spec
@@ -256,7 +256,7 @@
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_26/d3dx9_26.spec b/dlls/d3dx9_26/d3dx9_26.spec
index 286a9a094a0..5ab0a1d9fea 100644
--- a/dlls/d3dx9_26/d3dx9_26.spec
+++ b/dlls/d3dx9_26/d3dx9_26.spec
@@ -260,7 +260,7 @@
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_27/d3dx9_27.spec b/dlls/d3dx9_27/d3dx9_27.spec
index 286a9a094a0..5ab0a1d9fea 100644
--- a/dlls/d3dx9_27/d3dx9_27.spec
+++ b/dlls/d3dx9_27/d3dx9_27.spec
@@ -260,7 +260,7 @@
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_28/d3dx9_28.spec b/dlls/d3dx9_28/d3dx9_28.spec
index 06ced20df61..af5b6077202 100644
--- a/dlls/d3dx9_28/d3dx9_28.spec
+++ b/dlls/d3dx9_28/d3dx9_28.spec
@@ -265,7 +265,7 @@
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_29/d3dx9_29.spec b/dlls/d3dx9_29/d3dx9_29.spec
index 06ced20df61..af5b6077202 100644
--- a/dlls/d3dx9_29/d3dx9_29.spec
+++ b/dlls/d3dx9_29/d3dx9_29.spec
@@ -265,7 +265,7 @@
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_30/d3dx9_30.spec b/dlls/d3dx9_30/d3dx9_30.spec
index 06ced20df61..af5b6077202 100644
--- a/dlls/d3dx9_30/d3dx9_30.spec
+++ b/dlls/d3dx9_30/d3dx9_30.spec
@@ -265,7 +265,7 @@
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_31/d3dx9_31.spec b/dlls/d3dx9_31/d3dx9_31.spec
index c9aca309a35..8f77dc666a2 100644
--- a/dlls/d3dx9_31/d3dx9_31.spec
+++ b/dlls/d3dx9_31/d3dx9_31.spec
@@ -262,7 +262,7 @@
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_32/d3dx9_32.spec b/dlls/d3dx9_32/d3dx9_32.spec
index f541f6f2ef1..2fdd2a00615 100644
--- a/dlls/d3dx9_32/d3dx9_32.spec
+++ b/dlls/d3dx9_32/d3dx9_32.spec
@@ -267,7 +267,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_33/d3dx9_33.spec b/dlls/d3dx9_33/d3dx9_33.spec
index f541f6f2ef1..2fdd2a00615 100644
--- a/dlls/d3dx9_33/d3dx9_33.spec
+++ b/dlls/d3dx9_33/d3dx9_33.spec
@@ -267,7 +267,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_34/d3dx9_34.spec b/dlls/d3dx9_34/d3dx9_34.spec
index f541f6f2ef1..2fdd2a00615 100644
--- a/dlls/d3dx9_34/d3dx9_34.spec
+++ b/dlls/d3dx9_34/d3dx9_34.spec
@@ -267,7 +267,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_35/d3dx9_35.spec b/dlls/d3dx9_35/d3dx9_35.spec
index f541f6f2ef1..2fdd2a00615 100644
--- a/dlls/d3dx9_35/d3dx9_35.spec
+++ b/dlls/d3dx9_35/d3dx9_35.spec
@@ -267,7 +267,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec
index e1f44261610..5b7070145de 100644
--- a/dlls/d3dx9_36/d3dx9_36.spec
+++ b/dlls/d3dx9_36/d3dx9_36.spec
@@ -269,7 +269,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_36/d3dx9_private.h b/dlls/d3dx9_36/d3dx9_private.h
index c3308b04d44..2d286b04694 100644
--- a/dlls/d3dx9_36/d3dx9_private.h
+++ b/dlls/d3dx9_36/d3dx9_private.h
@@ -100,6 +100,8 @@ HRESULT write_buffer_to_file(const WCHAR *filename, ID3DXBuffer *buffer) DECLSPE
const struct pixel_format_desc *get_format_info(D3DFORMAT format) DECLSPEC_HIDDEN;
const struct pixel_format_desc *get_format_info_idx(int idx) DECLSPEC_HIDDEN;
+void format_to_vec4(const struct pixel_format_desc *format, const BYTE *src, struct vec4 *dst);
+
void copy_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slice_pitch,
BYTE *dst, UINT dst_row_pitch, UINT dst_slice_pitch, const struct volume *size,
const struct pixel_format_desc *format) DECLSPEC_HIDDEN;
diff --git a/dlls/d3dx9_36/math.c b/dlls/d3dx9_36/math.c
index a7b0a018680..0dde552d45f 100644
--- a/dlls/d3dx9_36/math.c
+++ b/dlls/d3dx9_36/math.c
@@ -2969,6 +2969,149 @@ static void rotate_X(FLOAT *out, UINT order, FLOAT a, FLOAT *in)
out[35] = 0.9057110548f * in[31] - 0.4192627370f * in[33] + 0.0624999329f * in[35];
}
+static void set_vec3(D3DXVECTOR3 *v, float x, float y, float z)
+{
+ v->x = x;
+ v->y = y;
+ v->z = z;
+}
+
+/*
+ * The following implementation of D3DXSHProjectCubeMap is based on the
+ * SHProjectCubeMap() implementation from Microsoft's DirectXMath library,
+ * covered under the following copyright:
+ *
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ */
+HRESULT WINAPI D3DXSHProjectCubeMap(unsigned int order, IDirect3DCubeTexture9 *texture, float *red, float *green, float *blue)
+{
+ const unsigned int order_square = order * order;
+ const struct pixel_format_desc *format;
+ unsigned int x, y, i, face;
+ float B, S, proj_normal;
+ D3DSURFACE_DESC desc;
+ float Wt = 0.0f;
+ float *temp;
+ HRESULT hr;
+
+ TRACE("order %u, texture %p, red %p, green %p, blue %p.\n", order, texture, red, green, blue);
+
+ if (!texture || !red || order < D3DXSH_MINORDER || order > D3DXSH_MAXORDER)
+ return D3DERR_INVALIDCALL;
+
+ memset(red, 0, order_square * sizeof(float));
+ if (green)
+ memset(green, 0, order_square * sizeof(float));
+ if (blue)
+ memset(blue, 0, order_square * sizeof(float));
+
+ if (FAILED(hr = IDirect3DCubeTexture9_GetLevelDesc(texture, 0, &desc)))
+ {
+ ERR("Failed to get level desc, hr %#x.\n", hr);
+ return hr;
+ }
+
+ format = get_format_info(desc.Format);
+ if (format->type != FORMAT_ARGB && format->type != FORMAT_ARGBF16 && format->type != FORMAT_ARGBF)
+ {
+ FIXME("Unsupported texture format %#x.\n", desc.Format);
+ return D3DERR_INVALIDCALL;
+ }
+
+ if (!(temp = malloc(order_square * sizeof(*temp))))
+ return E_OUTOFMEMORY;
+
+ B = -1.0f + 1.0f / desc.Width;
+ if (desc.Width > 1)
+ S = 2.0f * (1.0f - 1.0f / desc.Width) / (desc.Width - 1.0f);
+ else
+ S = 0.0f;
+
+ for (face = 0; face < 6; ++face)
+ {
+ D3DLOCKED_RECT map_desc;
+
+ if (FAILED(hr = IDirect3DCubeTexture9_LockRect(texture, face, 0, &map_desc, NULL, D3DLOCK_READONLY)))
+ {
+ ERR("Failed to map texture, hr %#x.\n", hr);
+ return hr;
+ }
+
+ for (y = 0; y < desc.Height; ++y)
+ {
+ const BYTE *row = (const BYTE *)map_desc.pBits + y * map_desc.Pitch;
+
+ for (x = 0; x < desc.Width; ++x)
+ {
+ float diff_solid, x_3d, y_3d;
+ const float u = x * S + B;
+ const float v = y * S + B;
+ struct vec4 colour;
+ D3DXVECTOR3 dir;
+
+ x_3d = (x * 2.0f + 1.0f) / desc.Width - 1.0f;
+ y_3d = (y * 2.0f + 1.0f) / desc.Width - 1.0f;
+
+ switch (face)
+ {
+ case D3DCUBEMAP_FACE_POSITIVE_X:
+ set_vec3(&dir, 1.0f, -y_3d, -x_3d);
+ break;
+
+ case D3DCUBEMAP_FACE_NEGATIVE_X:
+ set_vec3(&dir, -1.0f, -y_3d, x_3d);
+ break;
+
+ case D3DCUBEMAP_FACE_POSITIVE_Y:
+ set_vec3(&dir, x_3d, 1.0f, y_3d);
+ break;
+
+ case D3DCUBEMAP_FACE_NEGATIVE_Y:
+ set_vec3(&dir, x_3d, -1.0f, -y_3d);
+ break;
+
+ case D3DCUBEMAP_FACE_POSITIVE_Z:
+ set_vec3(&dir, x_3d, -y_3d, 1.0f);
+ break;
+
+ case D3DCUBEMAP_FACE_NEGATIVE_Z:
+ set_vec3(&dir, -x_3d, -y_3d, -1.0f);
+ break;
+ }
+
+ diff_solid = 4.0f / ((1.0f + u * u + v * v) * sqrtf(1.0f + u * u + v * v));
+ Wt += diff_solid;
+
+ D3DXVec3Normalize(&dir, &dir);
+ D3DXSHEvalDirection(temp, order, &dir);
+
+ format_to_vec4(format, &row[x * format->block_byte_count], &colour);
+
+ for (i = 0; i < order_square; ++i)
+ {
+ red[i] += temp[i] * colour.x * diff_solid;
+ if (green)
+ green[i] += temp[i] * colour.y * diff_solid;
+ if (blue)
+ blue[i] += temp[i] * colour.z * diff_solid;
+ }
+ }
+ }
+
+ IDirect3DCubeTexture9_UnlockRect(texture, face, 0);
+ }
+
+ proj_normal = (4.0f * M_PI) / Wt;
+ D3DXSHScale(red, order, red, proj_normal);
+ if (green)
+ D3DXSHScale(green, order, green, proj_normal);
+ if (blue)
+ D3DXSHScale(blue, order, blue, proj_normal);
+
+ return D3D_OK;
+}
+
FLOAT* WINAPI D3DXSHRotate(FLOAT *out, UINT order, const D3DXMATRIX *matrix, const FLOAT *in)
{
FLOAT alpha, beta, gamma, sinb, temp[36], temp1[36];
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
index c3f9f84a789..2ca6f093b55 100644
--- a/dlls/d3dx9_36/surface.c
+++ b/dlls/d3dx9_36/surface.c
@@ -1564,7 +1564,7 @@ static DWORD make_argb_color(const struct argb_conversion_info *info, const DWOR
}
/* It doesn't work for components bigger than 32 bits (or somewhat smaller but unaligned). */
-static void format_to_vec4(const struct pixel_format_desc *format, const BYTE *src, struct vec4 *dst)
+void format_to_vec4(const struct pixel_format_desc *format, const BYTE *src, struct vec4 *dst)
{
DWORD mask, tmp;
unsigned int c;
diff --git a/dlls/d3dx9_36/tests/math.c b/dlls/d3dx9_36/tests/math.c
index 6f64e25d200..40193f50fcc 100644
--- a/dlls/d3dx9_36/tests/math.c
+++ b/dlls/d3dx9_36/tests/math.c
@@ -22,6 +22,7 @@
#include "wine/test.h"
#include "d3dx9.h"
#include <math.h>
+#include <stdint.h>
static BOOL compare_float(float f, float g, unsigned int ulps)
{
@@ -205,6 +206,53 @@ static void set_matrix(D3DXMATRIX* mat,
U(mat)->m[3][0] = m30; U(mat)->m[3][1] = m31; U(mat)->m[3][2] = m32; U(mat)->m[3][3] = m33;
}
+static HWND create_window(void)
+{
+ RECT r = {0, 0, 640, 480};
+
+ AdjustWindowRect(&r, WS_OVERLAPPEDWINDOW | WS_VISIBLE, FALSE);
+
+ return CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
+ 0, 0, r.right - r.left, r.bottom - r.top, NULL, NULL, NULL, NULL);
+}
+
+static IDirect3DDevice9 *create_device(IDirect3D9 *d3d9, HWND focus_window)
+{
+ D3DPRESENT_PARAMETERS present_parameters = {0};
+ unsigned int adapter_ordinal;
+ IDirect3DDevice9 *device;
+ DWORD behavior_flags = D3DCREATE_HARDWARE_VERTEXPROCESSING;
+
+ adapter_ordinal = D3DADAPTER_DEFAULT;
+ present_parameters.BackBufferWidth = 640;
+ present_parameters.BackBufferHeight = 480;
+ present_parameters.BackBufferFormat = D3DFMT_A8R8G8B8;
+ present_parameters.SwapEffect = D3DSWAPEFFECT_DISCARD;
+ present_parameters.hDeviceWindow = focus_window;
+ present_parameters.Windowed = TRUE;
+ present_parameters.EnableAutoDepthStencil = TRUE;
+ present_parameters.AutoDepthStencilFormat = D3DFMT_D24S8;
+
+ if (SUCCEEDED(IDirect3D9_CreateDevice(d3d9, adapter_ordinal, D3DDEVTYPE_HAL, focus_window,
+ behavior_flags, &present_parameters, &device)))
+ return device;
+
+ present_parameters.AutoDepthStencilFormat = D3DFMT_D16;
+ if (SUCCEEDED(IDirect3D9_CreateDevice(d3d9, adapter_ordinal, D3DDEVTYPE_HAL, focus_window,
+ behavior_flags, &present_parameters, &device)))
+ return device;
+
+ behavior_flags = (behavior_flags
+ & ~(D3DCREATE_MIXED_VERTEXPROCESSING | D3DCREATE_SOFTWARE_VERTEXPROCESSING))
+ | D3DCREATE_HARDWARE_VERTEXPROCESSING;
+
+ if (SUCCEEDED(IDirect3D9_CreateDevice(d3d9, adapter_ordinal, D3DDEVTYPE_HAL, focus_window,
+ behavior_flags, &present_parameters, &device)))
+ return device;
+
+ return NULL;
+}
+
static void D3DXColorTest(void)
{
D3DXCOLOR color, color1, color2, expected, got;
@@ -4364,6 +4412,156 @@ static void test_D3DXSHScale(void)
}
}
+static void test_D3DXSHProjectCubeMap(void)
+{
+ float red[4], green[4], blue[4];
+ IDirect3DCubeTexture9 *texture;
+ unsigned int i, j, face, x, y;
+ IDirect3DDevice9 *device;
+ D3DLOCKED_RECT map_desc;
+ IDirect3D9 *d3d;
+ ULONG refcount;
+ HWND window;
+ HRESULT hr;
+
+ static const struct
+ {
+ D3DFORMAT format;
+ float red[4];
+ float green[4];
+ float blue[4];
+ }
+ tests[] =
+ {
+ {D3DFMT_A8R8G8B8,
+ {1.77656245f, -1.11197047e-2f, 2.08763797e-2f, -2.10229922e-2f},
+ {1.75811982f, -4.82511893e-2f, 1.67397819e-2f, -1.71497762e-2f},
+ {1.75515056f, -4.07523997e-2f, 1.05397226e-2f, -2.46812664e-2f}},
+ {D3DFMT_X8R8G8B8,
+ {1.77656245f, -1.11197047e-2f, 2.08763797e-2f, -2.10229922e-2f},
+ {1.75811982f, -4.82511893e-2f, 1.67397819e-2f, -1.71497762e-2f},
+ {1.75515056f, -4.07523997e-2f, 1.05397226e-2f, -2.46812664e-2f}},
+ {D3DFMT_A8B8G8R8,
+ {1.75515056f, -4.07523997e-2f, 1.05397226e-2f, -2.46812664e-2f},
+ {1.75811982f, -4.82511893e-2f, 1.67397819e-2f, -1.71497762e-2f},
+ {1.77656245f, -1.11197047e-2f, 2.08763797e-2f, -2.10229922e-2f}},
+ {D3DFMT_R5G6B5,
+ {1.77099848f, -3.88867334e-2f, 6.73775524e-2f, -1.26888147e-2f},
+ {1.77244151f, -5.64723741e-4f, -2.77878426e-4f, -9.10691451e-3f},
+ {1.78902030f, 2.79005636e-2f, 1.62461456e-2f, 2.21668324e-3f}},
+ {D3DFMT_A1R5G5B5,
+ {1.78022826f, 1.46923587e-2f, 3.58058624e-2f, 2.51076911e-2f},
+ {1.77233493f, -7.58088892e-4f, -2.03727093e-3f, -1.34809706e-2f},
+ {1.78902030f, 2.79005636e-2f, 1.62461456e-2f, 2.21668324e-3f}},
+ {D3DFMT_X1R5G5B5,
+ {1.78022826f, 1.46923587e-2f, 3.58058624e-2f, 2.51076911e-2f},
+ {1.77233493f, -7.58088892e-4f, -2.03727093e-3f, -1.34809706e-2f},
+ {1.78902030f, 2.79005636e-2f, 1.62461456e-2f, 2.21668324e-3f}},
+ {D3DFMT_A2R10G10B10,
+ {1.79359019f, -7.74506712e-4f, 8.65613017e-3f, 5.75336441e-3f},
+ {1.77067971f, 6.42523961e-3f, 1.35379164e-2f, 2.24088971e-3f},
+ {1.76601243f, -4.94002625e-2f, 1.28124524e-2f, -7.69229094e-3f}},
+ {D3DFMT_A2B10G10R10,
+ {1.76601243f, -4.94002625e-2f, 1.28124524e-2f, -7.69229094e-3f},
+ {1.77067971f, 6.42523961e-3f, 1.35379164e-2f, 2.24088971e-3f},
+ {1.79359019f, -7.74506712e-4f, 8.65613017e-3f, 5.75336441e-3f}},
+ {D3DFMT_A16B16G16R16,
+ {1.75979614f, 1.44450525e-2f, -3.25212209e-3f, 2.98178056e-3f},
+ {1.78080165f, -2.63770130e-2f, 6.31967233e-3f, 3.66022950e-3f},
+ {1.77588308f, -1.93727610e-3f, -3.22831096e-3f, -6.18841546e-3f}},
+ {D3DFMT_A16B16G16R16F,
+ { 5.17193642e+1f, -3.41681671e+2f, -8.82221741e+2f, 7.77049316e+2f},
+ {-2.08198950e+3f, 5.24323584e+3f, -3.42663379e+3f, 3.80999243e+3f},
+ {-1.10743945e+3f, -9.43649292e+2f, 5.48424316e+2f, 1.65352710e+3f}},
+ };
+
+ window = create_window();
+ d3d = Direct3DCreate9(D3D_SDK_VERSION);
+ ok(!!d3d, "Failed to create a D3D object.\n");
+ if (!(device = create_device(d3d, window)))
+ {
+ skip("Failed to create a D3D device, skipping tests.\n");
+ IDirect3D9_Release(d3d);
+ DestroyWindow(window);
+ return;
+ }
+
+ for (i = 0; i < ARRAY_SIZE(tests); ++i)
+ {
+ winetest_push_context("Format %#x", tests[i].format);
+
+ hr = IDirect3DDevice9_CreateCubeTexture(device, 8, 1, D3DUSAGE_DYNAMIC,
+ tests[i].format, D3DPOOL_DEFAULT, &texture, NULL);
+ if (FAILED(hr))
+ {
+ skip("Failed to create cube texture.\n");
+ winetest_pop_context();
+ continue;
+ }
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
+
+ for (face = 0; face < 6; ++face)
+ {
+ hr = IDirect3DCubeTexture9_LockRect(texture, face, 0, &map_desc, NULL, 0);
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
+
+ for (y = 0; y < 8; ++y)
+ {
+ uint8_t *row = (uint8_t *)map_desc.pBits + y * map_desc.Pitch;
+
+ for (x = 0; x < map_desc.Pitch; ++x)
+ row[x] = face * 111 + y * 39 + x * 7;
+ }
+
+ hr = IDirect3DCubeTexture9_UnlockRect(texture, face, 0);
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
+ }
+
+ hr = D3DXSHProjectCubeMap(1, texture, red, green, blue);
+ ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
+
+ hr = D3DXSHProjectCubeMap(7, texture, red, green, blue);
+ ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
+
+ hr = D3DXSHProjectCubeMap(2, NULL, red, green, blue);
+ ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
+
+ memset(red, 0, sizeof(red));
+ memset(green, 0, sizeof(green));
+ memset(blue, 0, sizeof(blue));
+ hr = D3DXSHProjectCubeMap(2, texture, red, green, blue);
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
+
+ for (j = 0; j < 4; ++j)
+ {
+ ok(compare_float(red[j], tests[i].red[j], 1024),
+ "Got unexpected value %.8e for red coefficient %u.\n", red[j], j);
+ ok(compare_float(green[j], tests[i].green[j], 1024),
+ "Got unexpected value %.8e for green coefficient %u.\n", green[j], j);
+ ok(compare_float(blue[j], tests[i].blue[j], 1024),
+ "Got unexpected value %.8e for blue coefficient %u.\n", blue[j], j);
+ }
+
+ hr = D3DXSHProjectCubeMap(2, texture, red, NULL, NULL);
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
+
+ hr = D3DXSHProjectCubeMap(2, texture, NULL, green, NULL);
+ ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
+
+ hr = D3DXSHProjectCubeMap(2, texture, NULL, NULL, blue);
+ ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
+
+ IDirect3DCubeTexture9_Release(texture);
+
+ winetest_pop_context();
+ }
+
+ refcount = IDirect3DDevice9_Release(device);
+ ok(!refcount, "Device has %u references left.\n", refcount);
+ IDirect3D9_Release(d3d);
+ DestroyWindow(window);
+}
+
START_TEST(math)
{
D3DXColorTest();
@@ -4393,4 +4591,5 @@ START_TEST(math)
test_D3DXSHRotate();
test_D3DXSHRotateZ();
test_D3DXSHScale();
+ test_D3DXSHProjectCubeMap();
}
diff --git a/dlls/d3dx9_37/d3dx9_37.spec b/dlls/d3dx9_37/d3dx9_37.spec
index e1f44261610..5b7070145de 100644
--- a/dlls/d3dx9_37/d3dx9_37.spec
+++ b/dlls/d3dx9_37/d3dx9_37.spec
@@ -269,7 +269,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_38/d3dx9_38.spec b/dlls/d3dx9_38/d3dx9_38.spec
index e1f44261610..5b7070145de 100644
--- a/dlls/d3dx9_38/d3dx9_38.spec
+++ b/dlls/d3dx9_38/d3dx9_38.spec
@@ -269,7 +269,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_39/d3dx9_39.spec b/dlls/d3dx9_39/d3dx9_39.spec
index e1f44261610..5b7070145de 100644
--- a/dlls/d3dx9_39/d3dx9_39.spec
+++ b/dlls/d3dx9_39/d3dx9_39.spec
@@ -269,7 +269,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_40/d3dx9_40.spec b/dlls/d3dx9_40/d3dx9_40.spec
index e1f44261610..5b7070145de 100644
--- a/dlls/d3dx9_40/d3dx9_40.spec
+++ b/dlls/d3dx9_40/d3dx9_40.spec
@@ -269,7 +269,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_41/d3dx9_41.spec b/dlls/d3dx9_41/d3dx9_41.spec
index e1f44261610..5b7070145de 100644
--- a/dlls/d3dx9_41/d3dx9_41.spec
+++ b/dlls/d3dx9_41/d3dx9_41.spec
@@ -269,7 +269,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_42/d3dx9_42.spec b/dlls/d3dx9_42/d3dx9_42.spec
index 0851945d36b..4a418d1508a 100644
--- a/dlls/d3dx9_42/d3dx9_42.spec
+++ b/dlls/d3dx9_42/d3dx9_42.spec
@@ -262,7 +262,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/dlls/d3dx9_43/d3dx9_43.spec b/dlls/d3dx9_43/d3dx9_43.spec
index 0851945d36b..4a418d1508a 100644
--- a/dlls/d3dx9_43/d3dx9_43.spec
+++ b/dlls/d3dx9_43/d3dx9_43.spec
@@ -262,7 +262,7 @@
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr)
@ stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr)
-@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
+@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
@ stdcall D3DXSHRotate(ptr long ptr ptr)
@ stdcall D3DXSHRotateZ(ptr long float ptr)
@ stdcall D3DXSHScale(ptr long ptr float)
diff --git a/include/d3dx9math.h b/include/d3dx9math.h
index bf03ca3abaa..32d894f9fed 100644
--- a/include/d3dx9math.h
+++ b/include/d3dx9math.h
@@ -396,6 +396,7 @@ HRESULT WINAPI D3DXSHEvalSphericalLight(UINT order, const D3DXVECTOR3 *dir, FLOA
FLOAT* WINAPI D3DXSHMultiply2(FLOAT *out, const FLOAT *a, const FLOAT *b);
FLOAT* WINAPI D3DXSHMultiply3(FLOAT *out, const FLOAT *a, const FLOAT *b);
FLOAT* WINAPI D3DXSHMultiply4(FLOAT *out, const FLOAT *a, const FLOAT *b);
+HRESULT WINAPI D3DXSHProjectCubeMap(UINT order, IDirect3DCubeTexture9 *texture, FLOAT *red, FLOAT *green, FLOAT *blue);
FLOAT* WINAPI D3DXSHRotate(FLOAT *out, UINT order, const D3DXMATRIX *matrix, const FLOAT *in);
FLOAT* WINAPI D3DXSHRotateZ(FLOAT *out, UINT order, FLOAT angle, const FLOAT *in);
FLOAT* WINAPI D3DXSHScale(FLOAT *out, UINT order, const FLOAT *a, const FLOAT scale);
--
2.34.1
2
2
[PATCH 1/3] shlwapi: Use the public definition of shared shell memory allocation functions.
by Zebediah Figura Feb. 4, 2022
by Zebediah Figura Feb. 4, 2022
Feb. 4, 2022
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/shell32/changenotify.c | 1 +
dlls/shell32/shellord.c | 2 +-
dlls/shell32/undocshell.h | 24 ------------------------
include/shlwapi.h | 7 ++++++-
4 files changed, 8 insertions(+), 26 deletions(-)
diff --git a/dlls/shell32/changenotify.c b/dlls/shell32/changenotify.c
index 40ccb891589..35c090ceb67 100644
--- a/dlls/shell32/changenotify.c
+++ b/dlls/shell32/changenotify.c
@@ -27,6 +27,7 @@
#include "wine/debug.h"
#include "shell32_main.h"
#include "pidl.h"
+#include "shlwapi.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
diff --git a/dlls/shell32/shellord.c b/dlls/shell32/shellord.c
index 57308e1c988..af00f125662 100644
--- a/dlls/shell32/shellord.c
+++ b/dlls/shell32/shellord.c
@@ -1353,7 +1353,7 @@ BOOL WINAPI IsUserAnAdmin(VOID)
*
* See shlwapi.SHAllocShared
*/
-HANDLE WINAPI SHAllocShared(LPVOID lpvData, DWORD dwSize, DWORD dwProcId)
+HANDLE WINAPI SHAllocShared(const void *lpvData, DWORD dwSize, DWORD dwProcId)
{
GET_FUNC(pSHAllocShared, shlwapi, (char*)7, NULL);
return pSHAllocShared(lpvData, dwSize, dwProcId);
diff --git a/dlls/shell32/undocshell.h b/dlls/shell32/undocshell.h
index 61c2ff4069f..f5c5ed8d43a 100644
--- a/dlls/shell32/undocshell.h
+++ b/dlls/shell32/undocshell.h
@@ -31,30 +31,6 @@
extern "C" {
#endif /* defined(__cplusplus) */
-/****************************************************************************
- * Memory Routines
- */
-
-/* The Platform SDK's shlobj.h header defines similar functions with a
- * leading underscore. However those are unusable because of the leading
- * underscore, because they have an incorrect calling convention, and
- * because these functions are not exported by name anyway.
- */
-HANDLE WINAPI SHAllocShared(
- LPVOID pv,
- ULONG cb,
- DWORD pid);
-
-BOOL WINAPI SHFreeShared(
- HANDLE hMem,
- DWORD pid);
-
-LPVOID WINAPI SHLockShared(
- HANDLE hMem,
- DWORD pid);
-
-BOOL WINAPI SHUnlockShared(LPVOID pv);
-
/****************************************************************************
* System Imagelist Routines
*/
diff --git a/include/shlwapi.h b/include/shlwapi.h
index ca15bd20777..07ca0fac837 100644
--- a/include/shlwapi.h
+++ b/include/shlwapi.h
@@ -1171,7 +1171,12 @@ HRESULT WINAPI SHGetViewStatePropertyBag(PCIDLIST_ABSOLUTE pidl, PCWSTR bagname,
BOOL WINAPI SHIsLowMemoryMachine(DWORD type);
-#include <poppack.h>
+#include <poppack.h>
+
+HANDLE WINAPI SHAllocShared(const void *data, DWORD size, DWORD pid);
+BOOL WINAPI SHFreeShared(HANDLE handle, DWORD pid);
+void * WINAPI SHLockShared(HANDLE handle, DWORD pid);
+BOOL WINAPI SHUnlockShared(void *data);
#ifdef __cplusplus
} /* extern "C" */
--
2.34.1
1
2
Feb. 4, 2022
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/winegstreamer/Makefile.in | 1 -
dlls/winegstreamer/audioconvert.c | 44 ++++-----
dlls/winegstreamer/media_source.c | 60 ++++++-------
dlls/winegstreamer/mfplat.c | 34 +++----
dlls/winegstreamer/quartz_parser.c | 36 ++++----
dlls/winegstreamer/wm_asyncreader.c | 133 +++++++++++++++++-----------
dlls/winegstreamer/wm_reader.c | 74 ++++++++--------
dlls/winegstreamer/wm_syncreader.c | 24 ++---
dlls/winegstreamer/wma_decoder.c | 72 +++++++--------
9 files changed, 253 insertions(+), 225 deletions(-)
diff --git a/dlls/winegstreamer/Makefile.in b/dlls/winegstreamer/Makefile.in
index 1706effbd20..c53e914e246 100644
--- a/dlls/winegstreamer/Makefile.in
+++ b/dlls/winegstreamer/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = winegstreamer.dll
UNIXLIB = winegstreamer.so
IMPORTLIB = winegstreamer
diff --git a/dlls/winegstreamer/audioconvert.c b/dlls/winegstreamer/audioconvert.c
index 33350fb3566..d5723cdf58f 100644
--- a/dlls/winegstreamer/audioconvert.c
+++ b/dlls/winegstreamer/audioconvert.c
@@ -64,7 +64,7 @@ static ULONG WINAPI audio_converter_AddRef(IMFTransform *iface)
struct audio_converter *transform = impl_audio_converter_from_IMFTransform(iface);
ULONG refcount = InterlockedIncrement(&transform->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -74,7 +74,7 @@ static ULONG WINAPI audio_converter_Release(IMFTransform *iface)
struct audio_converter *transform = impl_audio_converter_from_IMFTransform(iface);
ULONG refcount = InterlockedDecrement(&transform->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -108,21 +108,21 @@ static HRESULT WINAPI audio_converter_GetStreamCount(IMFTransform *iface, DWORD
static HRESULT WINAPI audio_converter_GetStreamIDs(IMFTransform *iface, DWORD input_size, DWORD *inputs,
DWORD output_size, DWORD *outputs)
{
- TRACE("%p %u %p %u %p.\n", iface, input_size, inputs, output_size, outputs);
+ TRACE("%p, %lu, %p, %lu, %p.\n", iface, input_size, inputs, output_size, outputs);
return E_NOTIMPL;
}
static HRESULT WINAPI audio_converter_GetInputStreamInfo(IMFTransform *iface, DWORD id, MFT_INPUT_STREAM_INFO *info)
{
- FIXME("%p %u %p.\n", iface, id, info);
+ FIXME("%p, %lu, %p.\n", iface, id, info);
return E_NOTIMPL;
}
static HRESULT WINAPI audio_converter_GetOutputStreamInfo(IMFTransform *iface, DWORD id, MFT_OUTPUT_STREAM_INFO *info)
{
- FIXME("%p %u %p.\n", iface, id, info);
+ FIXME("%p. %lu, %p.\n", iface, id, info);
return E_NOTIMPL;
}
@@ -137,7 +137,7 @@ static HRESULT WINAPI audio_converter_GetAttributes(IMFTransform *iface, IMFAttr
static HRESULT WINAPI audio_converter_GetInputStreamAttributes(IMFTransform *iface, DWORD id,
IMFAttributes **attributes)
{
- FIXME("%p, %u, %p.\n", iface, id, attributes);
+ FIXME("%p, %lu, %p.\n", iface, id, attributes);
return E_NOTIMPL;
}
@@ -145,21 +145,21 @@ static HRESULT WINAPI audio_converter_GetInputStreamAttributes(IMFTransform *ifa
static HRESULT WINAPI audio_converter_GetOutputStreamAttributes(IMFTransform *iface, DWORD id,
IMFAttributes **attributes)
{
- FIXME("%p, %u, %p.\n", iface, id, attributes);
+ FIXME("%p, %lu, %p.\n", iface, id, attributes);
return E_NOTIMPL;
}
static HRESULT WINAPI audio_converter_DeleteInputStream(IMFTransform *iface, DWORD id)
{
- TRACE("%p, %u.\n", iface, id);
+ TRACE("%p, %lu.\n", iface, id);
return E_NOTIMPL;
}
static HRESULT WINAPI audio_converter_AddInputStreams(IMFTransform *iface, DWORD streams, DWORD *ids)
{
- TRACE("%p, %u, %p.\n", iface, streams, ids);
+ TRACE("%p, %lu, %p.\n", iface, streams, ids);
return E_NOTIMPL;
}
@@ -170,7 +170,7 @@ static HRESULT WINAPI audio_converter_GetInputAvailableType(IMFTransform *iface,
IMFMediaType *ret;
HRESULT hr;
- TRACE("%p, %u, %u, %p.\n", iface, id, index, type);
+ TRACE("%p, %lu, %lu, %p.\n", iface, id, index, type);
if (id != 0)
return MF_E_INVALIDSTREAMNUMBER;
@@ -222,7 +222,7 @@ static HRESULT WINAPI audio_converter_GetOutputAvailableType(IMFTransform *iface
const GUID *subtype;
DWORD rate, channels, bps;
- TRACE("%p, %u, %u, %p.\n", iface, id, index, type);
+ TRACE("%p, %lu, %lu, %p.\n", iface, id, index, type);
if (id != 0)
return MF_E_INVALIDSTREAMNUMBER;
@@ -272,12 +272,12 @@ fail:
static HRESULT WINAPI audio_converter_SetInputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags)
{
GUID major_type, subtype;
- DWORD unused;
+ UINT32 unused;
HRESULT hr;
struct audio_converter *converter = impl_audio_converter_from_IMFTransform(iface);
- TRACE("%p, %u, %p, %#x.\n", iface, id, type, flags);
+ TRACE("%p, %lu, %p, %#lx.\n", iface, id, type, flags);
if (id != 0)
return MF_E_INVALIDSTREAMNUMBER;
@@ -345,10 +345,10 @@ static HRESULT WINAPI audio_converter_SetOutputType(IMFTransform *iface, DWORD i
{
struct audio_converter *converter = impl_audio_converter_from_IMFTransform(iface);
GUID major_type, subtype;
- DWORD unused;
+ UINT32 unused;
HRESULT hr;
- TRACE("%p, %u, %p, %#x.\n", iface, id, type, flags);
+ TRACE("%p, %lu, %p, %#lx.\n", iface, id, type, flags);
if (id != 0)
return MF_E_INVALIDSTREAMNUMBER;
@@ -421,7 +421,7 @@ static HRESULT WINAPI audio_converter_GetInputCurrentType(IMFTransform *iface, D
IMFMediaType *ret;
HRESULT hr;
- TRACE("%p, %u, %p.\n", converter, id, type);
+ TRACE("%p, %lu, %p.\n", converter, id, type);
if (id != 0)
return MF_E_INVALIDSTREAMNUMBER;
@@ -452,7 +452,7 @@ static HRESULT WINAPI audio_converter_GetOutputCurrentType(IMFTransform *iface,
IMFMediaType *ret;
HRESULT hr;
- TRACE("%p, %u, %p.\n", converter, id, type);
+ TRACE("%p, %lu, %p.\n", converter, id, type);
if (id != 0)
return MF_E_INVALIDSTREAMNUMBER;
@@ -479,7 +479,7 @@ static HRESULT WINAPI audio_converter_GetOutputCurrentType(IMFTransform *iface,
static HRESULT WINAPI audio_converter_GetInputStatus(IMFTransform *iface, DWORD id, DWORD *flags)
{
- FIXME("%p, %u, %p.\n", iface, id, flags);
+ FIXME("%p, %lu, %p.\n", iface, id, flags);
return E_NOTIMPL;
}
@@ -500,14 +500,14 @@ static HRESULT WINAPI audio_converter_SetOutputBounds(IMFTransform *iface, LONGL
static HRESULT WINAPI audio_converter_ProcessEvent(IMFTransform *iface, DWORD id, IMFMediaEvent *event)
{
- TRACE("%p, %u, %p.\n", iface, id, event);
+ TRACE("%p, %lu, %p.\n", iface, id, event);
return E_NOTIMPL;
}
static HRESULT WINAPI audio_converter_ProcessMessage(IMFTransform *iface, MFT_MESSAGE_TYPE message, ULONG_PTR param)
{
- TRACE("%p, %u %lu.\n", iface, message, param);
+ TRACE("%p, %u, %Iu.\n", iface, message, param);
switch(message)
{
@@ -521,7 +521,7 @@ static HRESULT WINAPI audio_converter_ProcessMessage(IMFTransform *iface, MFT_ME
static HRESULT WINAPI audio_converter_ProcessInput(IMFTransform *iface, DWORD id, IMFSample *sample, DWORD flags)
{
- FIXME("%p, %u, %p, %#x.\n", iface, id, sample, flags);
+ FIXME("%p, %lu, %p, %#lx.\n", iface, id, sample, flags);
return E_NOTIMPL;
}
@@ -529,7 +529,7 @@ static HRESULT WINAPI audio_converter_ProcessInput(IMFTransform *iface, DWORD id
static HRESULT WINAPI audio_converter_ProcessOutput(IMFTransform *iface, DWORD flags, DWORD count,
MFT_OUTPUT_DATA_BUFFER *samples, DWORD *status)
{
- FIXME("%p, %#x, %u, %p, %p.\n", iface, flags, count, samples, status);
+ FIXME("%p, %#lx, %lu, %p, %p.\n", iface, flags, count, samples, status);
return E_NOTIMPL;
}
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
index 6ecd345cb73..85ec31d2498 100644
--- a/dlls/winegstreamer/media_source.c
+++ b/dlls/winegstreamer/media_source.c
@@ -304,7 +304,7 @@ static void flush_token_queue(struct media_stream *stream, BOOL send)
&stream->parent_source->async_commands_callback, &command->IUnknown_iface);
}
if (FAILED(hr))
- WARN("Could not enqueue sample request, hr %#x\n", hr);
+ WARN("Could not enqueue sample request, hr %#lx\n", hr);
}
else if (stream->token_queue[i])
IUnknown_Release(stream->token_queue[i]);
@@ -461,32 +461,32 @@ static void send_buffer(struct media_stream *stream, const struct wg_parser_even
if (FAILED(hr = MFCreateSample(&sample)))
{
- ERR("Failed to create sample, hr %#x.\n", hr);
+ ERR("Failed to create sample, hr %#lx.\n", hr);
return;
}
if (FAILED(hr = MFCreateMemoryBuffer(event->u.buffer.size, &buffer)))
{
- ERR("Failed to create buffer, hr %#x.\n", hr);
+ ERR("Failed to create buffer, hr %#lx.\n", hr);
IMFSample_Release(sample);
return;
}
if (FAILED(hr = IMFSample_AddBuffer(sample, buffer)))
{
- ERR("Failed to add buffer, hr %#x.\n", hr);
+ ERR("Failed to add buffer, hr %#lx.\n", hr);
goto out;
}
if (FAILED(hr = IMFMediaBuffer_SetCurrentLength(buffer, event->u.buffer.size)))
{
- ERR("Failed to set size, hr %#x.\n", hr);
+ ERR("Failed to set size, hr %#lx.\n", hr);
goto out;
}
if (FAILED(hr = IMFMediaBuffer_Lock(buffer, &data, NULL, NULL)))
{
- ERR("Failed to lock buffer, hr %#x.\n", hr);
+ ERR("Failed to lock buffer, hr %#lx.\n", hr);
goto out;
}
@@ -500,19 +500,19 @@ static void send_buffer(struct media_stream *stream, const struct wg_parser_even
if (FAILED(hr = IMFMediaBuffer_Unlock(buffer)))
{
- ERR("Failed to unlock buffer, hr %#x.\n", hr);
+ ERR("Failed to unlock buffer, hr %#lx.\n", hr);
goto out;
}
if (FAILED(hr = IMFSample_SetSampleTime(sample, event->u.buffer.pts)))
{
- ERR("Failed to set sample time, hr %#x.\n", hr);
+ ERR("Failed to set sample time, hr %#lx.\n", hr);
goto out;
}
if (FAILED(hr = IMFSample_SetSampleDuration(sample, event->u.buffer.duration)))
{
- ERR("Failed to set sample duration, hr %#x.\n", hr);
+ ERR("Failed to set sample duration, hr %#lx.\n", hr);
goto out;
}
@@ -658,9 +658,9 @@ static DWORD CALLBACK read_thread(void *arg)
if (SUCCEEDED(hr = IMFByteStream_SetCurrentPosition(byte_stream, offset)))
hr = IMFByteStream_Read(byte_stream, data, size, &ret_size);
if (FAILED(hr))
- ERR("Failed to read %u bytes at offset %I64u, hr %#x.\n", size, offset, hr);
+ ERR("Failed to read %u bytes at offset %I64u, hr %#lx.\n", size, offset, hr);
else if (ret_size != size)
- ERR("Unexpected short read: requested %u bytes, got %u.\n", size, ret_size);
+ ERR("Unexpected short read: requested %u bytes, got %lu.\n", size, ret_size);
wg_parser_push_data(source->wg_parser, SUCCEEDED(hr) ? data : NULL, ret_size);
}
@@ -697,7 +697,7 @@ static ULONG WINAPI media_stream_AddRef(IMFMediaStream *iface)
struct media_stream *stream = impl_from_IMFMediaStream(iface);
ULONG ref = InterlockedIncrement(&stream->ref);
- TRACE("%p, refcount %u.\n", iface, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
@@ -707,7 +707,7 @@ static ULONG WINAPI media_stream_Release(IMFMediaStream *iface)
struct media_stream *stream = impl_from_IMFMediaStream(iface);
ULONG ref = InterlockedDecrement(&stream->ref);
- TRACE("%p, refcount %u.\n", iface, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
if (!ref)
{
@@ -724,7 +724,7 @@ static HRESULT WINAPI media_stream_GetEvent(IMFMediaStream *iface, DWORD flags,
{
struct media_stream *stream = impl_from_IMFMediaStream(iface);
- TRACE("%p, %#x, %p.\n", iface, flags, event);
+ TRACE("%p, %#lx, %p.\n", iface, flags, event);
return IMFMediaEventQueue_GetEvent(stream->event_queue, flags, event);
}
@@ -752,7 +752,7 @@ static HRESULT WINAPI media_stream_QueueEvent(IMFMediaStream *iface, MediaEventT
{
struct media_stream *stream = impl_from_IMFMediaStream(iface);
- TRACE("%p, %d, %s, %#x, %p.\n", iface, event_type, debugstr_guid(ext_type), hr, value);
+ TRACE("%p, %lu, %s, %#lx, %p.\n", iface, event_type, debugstr_guid(ext_type), hr, value);
return IMFMediaEventQueue_QueueEventParamVar(stream->event_queue, event_type, ext_type, hr, value);
}
@@ -843,7 +843,7 @@ static HRESULT new_media_stream(struct media_source *source,
struct media_stream *object = calloc(1, sizeof(*object));
HRESULT hr;
- TRACE("source %p, wg_stream %p, stream_id %u.\n", source, wg_stream, stream_id);
+ TRACE("source %p, wg_stream %p, stream_id %lu.\n", source, wg_stream, stream_id);
object->IMFMediaStream_iface.lpVtbl = &media_stream_vtbl;
object->ref = 1;
@@ -1176,7 +1176,7 @@ static ULONG WINAPI media_source_AddRef(IMFMediaSource *iface)
struct media_source *source = impl_from_IMFMediaSource(iface);
ULONG ref = InterlockedIncrement(&source->ref);
- TRACE("%p, refcount %u.\n", iface, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
@@ -1186,7 +1186,7 @@ static ULONG WINAPI media_source_Release(IMFMediaSource *iface)
struct media_source *source = impl_from_IMFMediaSource(iface);
ULONG ref = InterlockedDecrement(&source->ref);
- TRACE("%p, refcount %u.\n", iface, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
if (!ref)
{
@@ -1202,7 +1202,7 @@ static HRESULT WINAPI media_source_GetEvent(IMFMediaSource *iface, DWORD flags,
{
struct media_source *source = impl_from_IMFMediaSource(iface);
- TRACE("%p, %#x, %p.\n", iface, flags, event);
+ TRACE("%p, %#lx, %p.\n", iface, flags, event);
return IMFMediaEventQueue_GetEvent(source->event_queue, flags, event);
}
@@ -1230,7 +1230,7 @@ static HRESULT WINAPI media_source_QueueEvent(IMFMediaSource *iface, MediaEventT
{
struct media_source *source = impl_from_IMFMediaSource(iface);
- TRACE("%p, %d, %s, %#x, %p.\n", iface, event_type, debugstr_guid(ext_type), hr, value);
+ TRACE("%p, %lu, %s, %#lx, %p.\n", iface, event_type, debugstr_guid(ext_type), hr, value);
return IMFMediaEventQueue_QueueEventParamVar(source->event_queue, event_type, ext_type, hr, value);
}
@@ -1410,7 +1410,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
if (FAILED(hr = IMFByteStream_GetLength(bytestream, &file_size)))
{
- FIXME("Failed to get byte stream length, hr %#x.\n", hr);
+ FIXME("Failed to get byte stream length, hr %#lx.\n", hr);
return hr;
}
@@ -1467,7 +1467,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
if (FAILED(hr = media_stream_init_desc(object->streams[i])))
{
- ERR("Failed to finish initialization of media stream %p, hr %x.\n", object->streams[i], hr);
+ ERR("Failed to finish initialization of media stream %p, hr %#lx.\n", object->streams[i], hr);
IMFMediaSource_Release(&object->streams[i]->parent_source->IMFMediaSource_iface);
IMFMediaEventQueue_Release(object->streams[i]->event_queue);
free(object->streams[i]);
@@ -1509,7 +1509,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
return S_OK;
fail:
- WARN("Failed to construct MFMediaSource, hr %#x.\n", hr);
+ WARN("Failed to construct MFMediaSource, hr %#lx.\n", hr);
if (descriptors)
{
@@ -1596,7 +1596,7 @@ static ULONG WINAPI winegstreamer_stream_handler_AddRef(IMFByteStreamHandler *if
struct winegstreamer_stream_handler *handler = impl_from_IMFByteStreamHandler(iface);
ULONG refcount = InterlockedIncrement(&handler->refcount);
- TRACE("%p, refcount %u.\n", handler, refcount);
+ TRACE("%p, refcount %lu.\n", handler, refcount);
return refcount;
}
@@ -1607,7 +1607,7 @@ static ULONG WINAPI winegstreamer_stream_handler_Release(IMFByteStreamHandler *i
ULONG refcount = InterlockedDecrement(&handler->refcount);
struct winegstreamer_stream_handler_result *result, *next;
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -1663,7 +1663,7 @@ static ULONG WINAPI create_object_context_AddRef(IUnknown *iface)
struct create_object_context *context = impl_from_IUnknown(iface);
ULONG refcount = InterlockedIncrement(&context->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -1673,7 +1673,7 @@ static ULONG WINAPI create_object_context_Release(IUnknown *iface)
struct create_object_context *context = impl_from_IUnknown(iface);
ULONG refcount = InterlockedDecrement(&context->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -1703,7 +1703,7 @@ static HRESULT WINAPI winegstreamer_stream_handler_BeginCreateObject(IMFByteStre
IMFAsyncResult *caller, *item;
HRESULT hr;
- TRACE("%p, %s, %#x, %p, %p, %p, %p.\n", iface, debugstr_w(url), flags, props, cancel_cookie, callback, state);
+ TRACE("%p, %s, %#lx, %p, %p, %p, %p.\n", iface, debugstr_w(url), flags, props, cancel_cookie, callback, state);
if (cancel_cookie)
*cancel_cookie = NULL;
@@ -1880,7 +1880,7 @@ static HRESULT WINAPI winegstreamer_stream_handler_callback_GetParameters(IMFAsy
static HRESULT winegstreamer_stream_handler_create_object(struct winegstreamer_stream_handler *This, WCHAR *url, IMFByteStream *stream, DWORD flags,
IPropertyStore *props, IUnknown **out_object, MF_OBJECT_TYPE *out_obj_type)
{
- TRACE("%p, %s, %p, %u, %p, %p, %p.\n", This, debugstr_w(url), stream, flags, props, out_object, out_obj_type);
+ TRACE("%p, %s, %p, %#lx, %p, %p, %p.\n", This, debugstr_w(url), stream, flags, props, out_object, out_obj_type);
if (flags & MF_RESOLUTION_MEDIASOURCE)
{
@@ -1899,7 +1899,7 @@ static HRESULT winegstreamer_stream_handler_create_object(struct winegstreamer_s
}
else
{
- FIXME("flags = %08x\n", flags);
+ FIXME("Unhandled flags %#lx.\n", flags);
return E_NOTIMPL;
}
}
diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c
index 6a58f444204..aa5e60ec116 100644
--- a/dlls/winegstreamer/mfplat.c
+++ b/dlls/winegstreamer/mfplat.c
@@ -64,7 +64,7 @@ static ULONG WINAPI video_processor_AddRef(IMFTransform *iface)
struct video_processor *transform = impl_video_processor_from_IMFTransform(iface);
ULONG refcount = InterlockedIncrement(&transform->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -74,7 +74,7 @@ static ULONG WINAPI video_processor_Release(IMFTransform *iface)
struct video_processor *transform = impl_video_processor_from_IMFTransform(iface);
ULONG refcount = InterlockedDecrement(&transform->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -146,7 +146,7 @@ static HRESULT WINAPI video_processor_GetOutputStreamAttributes(IMFTransform *if
{
struct video_processor *transform = impl_video_processor_from_IMFTransform(iface);
- TRACE("%p, %u, %p.\n", iface, id, attributes);
+ TRACE("%p, %lu, %p.\n", iface, id, attributes);
*attributes = transform->output_attributes;
IMFAttributes_AddRef(*attributes);
@@ -156,14 +156,14 @@ static HRESULT WINAPI video_processor_GetOutputStreamAttributes(IMFTransform *if
static HRESULT WINAPI video_processor_DeleteInputStream(IMFTransform *iface, DWORD id)
{
- TRACE("%p, %u.\n", iface, id);
+ TRACE("%p, %lu.\n", iface, id);
return E_NOTIMPL;
}
static HRESULT WINAPI video_processor_AddInputStreams(IMFTransform *iface, DWORD streams, DWORD *ids)
{
- TRACE("%p, %u, %p.\n", iface, streams, ids);
+ TRACE("%p, %lu, %p.\n", iface, streams, ids);
return E_NOTIMPL;
}
@@ -171,7 +171,7 @@ static HRESULT WINAPI video_processor_AddInputStreams(IMFTransform *iface, DWORD
static HRESULT WINAPI video_processor_GetInputAvailableType(IMFTransform *iface, DWORD id, DWORD index,
IMFMediaType **type)
{
- FIXME("%p, %u, %u, %p.\n", iface, id, index, type);
+ FIXME("%p, %lu, %lu, %p.\n", iface, id, index, type);
return E_NOTIMPL;
}
@@ -179,42 +179,42 @@ static HRESULT WINAPI video_processor_GetInputAvailableType(IMFTransform *iface,
static HRESULT WINAPI video_processor_GetOutputAvailableType(IMFTransform *iface, DWORD id, DWORD index,
IMFMediaType **type)
{
- FIXME("%p, %u, %u, %p.\n", iface, id, index, type);
+ FIXME("%p, %lu, %lu, %p.\n", iface, id, index, type);
return E_NOTIMPL;
}
static HRESULT WINAPI video_processor_SetInputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags)
{
- FIXME("%p, %u, %p, %#x.\n", iface, id, type, flags);
+ FIXME("%p, %lu, %p, %#lx.\n", iface, id, type, flags);
return E_NOTIMPL;
}
static HRESULT WINAPI video_processor_SetOutputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags)
{
- FIXME("%p, %u, %p, %#x.\n", iface, id, type, flags);
+ FIXME("%p, %lu, %p, %#lx.\n", iface, id, type, flags);
return E_NOTIMPL;
}
static HRESULT WINAPI video_processor_GetInputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type)
{
- FIXME("%p, %u, %p.\n", iface, id, type);
+ FIXME("%p, %lu, %p.\n", iface, id, type);
return E_NOTIMPL;
}
static HRESULT WINAPI video_processor_GetOutputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type)
{
- FIXME("%p, %u, %p.\n", iface, id, type);
+ FIXME("%p, %lu, %p.\n", iface, id, type);
return E_NOTIMPL;
}
static HRESULT WINAPI video_processor_GetInputStatus(IMFTransform *iface, DWORD id, DWORD *flags)
{
- FIXME("%p, %u, %p.\n", iface, id, flags);
+ FIXME("%p, %lu, %p.\n", iface, id, flags);
return E_NOTIMPL;
}
@@ -235,21 +235,21 @@ static HRESULT WINAPI video_processor_SetOutputBounds(IMFTransform *iface, LONGL
static HRESULT WINAPI video_processor_ProcessEvent(IMFTransform *iface, DWORD id, IMFMediaEvent *event)
{
- TRACE("%p, %u, %p.\n", iface, id, event);
+ TRACE("%p, %lu, %p.\n", iface, id, event);
return E_NOTIMPL;
}
static HRESULT WINAPI video_processor_ProcessMessage(IMFTransform *iface, MFT_MESSAGE_TYPE message, ULONG_PTR param)
{
- FIXME("%p, %u.\n", iface, message);
+ FIXME("%p, %u, %#Ix.\n", iface, message, param);
return E_NOTIMPL;
}
static HRESULT WINAPI video_processor_ProcessInput(IMFTransform *iface, DWORD id, IMFSample *sample, DWORD flags)
{
- FIXME("%p, %u, %p, %#x.\n", iface, id, sample, flags);
+ FIXME("%p, %lu, %p, %#lx.\n", iface, id, sample, flags);
return E_NOTIMPL;
}
@@ -257,7 +257,7 @@ static HRESULT WINAPI video_processor_ProcessInput(IMFTransform *iface, DWORD id
static HRESULT WINAPI video_processor_ProcessOutput(IMFTransform *iface, DWORD flags, DWORD count,
MFT_OUTPUT_DATA_BUFFER *samples, DWORD *status)
{
- FIXME("%p, %#x, %u, %p, %p.\n", iface, flags, count, samples, status);
+ FIXME("%p, %#lx, %lu, %p, %p.\n", iface, flags, count, samples, status);
return E_NOTIMPL;
}
@@ -521,7 +521,7 @@ HRESULT mfplat_DllRegisterServer(void)
if (FAILED(hr))
{
- FIXME("Failed to register MFT, hr %#x\n", hr);
+ FIXME("Failed to register MFT, hr %#lx.\n", hr);
return hr;
}
}
diff --git a/dlls/winegstreamer/quartz_parser.c b/dlls/winegstreamer/quartz_parser.c
index e8d56d54785..331bc9a888a 100644
--- a/dlls/winegstreamer/quartz_parser.c
+++ b/dlls/winegstreamer/quartz_parser.c
@@ -452,7 +452,7 @@ static bool amt_to_wg_format_audio(const AM_MEDIA_TYPE *mt, struct wg_format *fo
}
if (mt->cbFormat < sizeof(WAVEFORMATEX) || !mt->pbFormat)
{
- ERR("Unexpected format size %u.\n", mt->cbFormat);
+ ERR("Unexpected format size %lu.\n", mt->cbFormat);
return false;
}
@@ -504,7 +504,7 @@ static bool amt_to_wg_format_audio_mpeg1(const AM_MEDIA_TYPE *mt, struct wg_form
}
if (mt->cbFormat < sizeof(*audio_format) || !mt->pbFormat)
{
- ERR("Unexpected format size %u.\n", mt->cbFormat);
+ ERR("Unexpected format size %lu.\n", mt->cbFormat);
return false;
}
@@ -533,7 +533,7 @@ static bool amt_to_wg_format_audio_mpeg1_layer3(const AM_MEDIA_TYPE *mt, struct
}
if (mt->cbFormat < sizeof(*audio_format) || !mt->pbFormat)
{
- ERR("Unexpected format size %u.\n", mt->cbFormat);
+ ERR("Unexpected format size %lu.\n", mt->cbFormat);
return false;
}
@@ -578,7 +578,7 @@ static bool amt_to_wg_format_video(const AM_MEDIA_TYPE *mt, struct wg_format *fo
}
if (mt->cbFormat < sizeof(VIDEOINFOHEADER) || !mt->pbFormat)
{
- ERR("Unexpected format size %u.\n", mt->cbFormat);
+ ERR("Unexpected format size %lu.\n", mt->cbFormat);
return false;
}
@@ -674,11 +674,11 @@ static HRESULT send_sample(struct parser_source *pin, IMediaSample *sample,
HRESULT hr;
BYTE *ptr = NULL;
- TRACE("offset %u, size %u, sample size %u\n", offset, size, IMediaSample_GetSize(sample));
+ TRACE("offset %u, size %u, sample size %lu.\n", offset, size, IMediaSample_GetSize(sample));
hr = IMediaSample_SetActualDataLength(sample, size);
if(FAILED(hr)){
- WARN("SetActualDataLength failed: %08x\n", hr);
+ ERR("Failed to set sample size, hr %#lx.\n", hr);
return hr;
}
@@ -728,12 +728,10 @@ static HRESULT send_sample(struct parser_source *pin, IMediaSample *sample,
IMediaSample_SetSyncPoint(sample, !event->u.buffer.delta);
if (!pin->pin.pin.peer)
- hr = VFW_E_NOT_CONNECTED;
- else
- hr = IMemInputPin_Receive(pin->pin.pMemInputPin, sample);
-
- TRACE("sending sample returned: %08x\n", hr);
+ return VFW_E_NOT_CONNECTED;
+ hr = IMemInputPin_Receive(pin->pin.pMemInputPin, sample);
+ TRACE("Receive() returned hr %#lx.\n", hr);
return hr;
}
@@ -760,7 +758,7 @@ static void send_buffer(struct parser_source *pin, const struct wg_parser_event
if (FAILED(hr))
{
if (hr != VFW_E_NOT_CONNECTED)
- ERR("Could not get a delivery buffer (%x), returning GST_FLOW_FLUSHING\n", hr);
+ ERR("Failed to get a sample, hr %#lx.\n", hr);
break;
}
@@ -783,7 +781,7 @@ static void send_buffer(struct parser_source *pin, const struct wg_parser_event
if (FAILED(hr))
{
if (hr != VFW_E_NOT_CONNECTED)
- ERR("Could not get a delivery buffer (%x), returning GST_FLOW_FLUSHING\n", hr);
+ ERR("Failed to get a sample, hr %#lx.\n", hr);
}
else
{
@@ -879,7 +877,7 @@ static DWORD CALLBACK read_thread(void *arg)
hr = IAsyncReader_SyncRead(filter->reader, offset, size, data);
if (FAILED(hr))
- ERR("Failed to read %u bytes at offset %I64u, hr %#x.\n", size, offset, hr);
+ ERR("Failed to read %u bytes at offset %I64u, hr %#lx.\n", size, offset, hr);
wg_parser_push_data(filter->wg_parser, SUCCEEDED(hr) ? data : NULL, size);
}
@@ -970,7 +968,7 @@ static HRESULT parser_init_stream(struct strmbase_filter *iface)
continue;
if (FAILED(hr = IMemAllocator_Commit(filter->sources[i]->pin.pAllocator)))
- ERR("Failed to commit allocator, hr %#x.\n", hr);
+ ERR("Failed to commit allocator, hr %#lx.\n", hr);
filter->sources[i]->thread = CreateThread(NULL, 0, stream_thread, filter->sources[i], 0, NULL);
}
@@ -1230,14 +1228,14 @@ static HRESULT WINAPI stream_select_Info(IAMStreamSelect *iface, LONG index,
AM_MEDIA_TYPE **mt, DWORD *flags, LCID *lcid, DWORD *group, WCHAR **name,
IUnknown **object, IUnknown **unknown)
{
- FIXME("iface %p, index %d, mt %p, flags %p, lcid %p, group %p, name %p, object %p, unknown %p, stub!\n",
+ FIXME("iface %p, index %ld, mt %p, flags %p, lcid %p, group %p, name %p, object %p, unknown %p, stub!\n",
iface, index, mt, flags, lcid, group, name, object, unknown);
return E_NOTIMPL;
}
static HRESULT WINAPI stream_select_Enable(IAMStreamSelect *iface, LONG index, DWORD flags)
{
- FIXME("iface %p, index %d, flags %#x, stub!\n", iface, index, flags);
+ FIXME("iface %p, index %ld, flags %#lx, stub!\n", iface, index, flags);
return E_NOTIMPL;
}
@@ -1299,7 +1297,7 @@ static HRESULT WINAPI GST_Seeking_SetPositions(IMediaSeeking *iface,
struct parser *filter = impl_from_strmbase_filter(pin->pin.pin.filter);
int i;
- TRACE("pin %p, current %s, current_flags %#x, stop %s, stop_flags %#x.\n",
+ TRACE("pin %p, current %s, current_flags %#lx, stop %s, stop_flags %#lx.\n",
pin, current ? debugstr_time(*current) : "<null>", current_flags,
stop ? debugstr_time(*stop) : "<null>", stop_flags);
@@ -1419,7 +1417,7 @@ static HRESULT WINAPI GST_QualityControl_Notify(IQualityControl *iface, IBaseFil
uint64_t timestamp;
int64_t diff;
- TRACE("pin %p, sender %p, type %s, proportion %u, late %s, timestamp %s.\n",
+ TRACE("pin %p, sender %p, type %s, proportion %ld, late %s, timestamp %s.\n",
pin, sender, q.Type == Famine ? "Famine" : "Flood", q.Proportion,
debugstr_time(q.Late), debugstr_time(q.TimeStamp));
diff --git a/dlls/winegstreamer/wm_asyncreader.c b/dlls/winegstreamer/wm_asyncreader.c
index aa15a5a77f9..fc919ef2c49 100644
--- a/dlls/winegstreamer/wm_asyncreader.c
+++ b/dlls/winegstreamer/wm_asyncreader.c
@@ -66,7 +66,7 @@ static void open_stream(struct async_reader *reader, IWMReaderCallback *callback
if (FAILED(hr = IWMReaderCallback_QueryInterface(callback,
&IID_IWMReaderCallbackAdvanced, (void **)&reader->reader.callback_advanced)))
reader->reader.callback_advanced = NULL;
- TRACE("Querying for IWMReaderCallbackAdvanced returned %#x.\n", hr);
+ TRACE("Querying for IWMReaderCallbackAdvanced returned %#lx.\n", hr);
}
static DWORD WINAPI stream_thread(void *arg)
@@ -139,13 +139,13 @@ static DWORD WINAPI stream_thread(void *arg)
else
hr = IWMReaderCallback_OnSample(callback, i, pts, duration,
flags, sample, reader->context);
- TRACE("Callback returned %#x.\n", hr);
+ TRACE("Callback returned %#lx.\n", hr);
INSSBuffer_Release(sample);
all_eos = false;
}
else if (hr != NS_E_NO_MORE_SAMPLES)
{
- ERR("Failed to get sample, hr %#x.\n", hr);
+ ERR("Failed to get sample, hr %#lx.\n", hr);
return 0;
}
}
@@ -279,7 +279,7 @@ static HRESULT WINAPI WMReader_GetOutputProps(IWMReader *iface, DWORD output, IW
{
struct async_reader *reader = impl_from_IWMReader(iface);
- TRACE("reader %p, output %u, props %p.\n", reader, output, props);
+ TRACE("reader %p, output %lu, props %p.\n", reader, output, props);
return wm_reader_get_output_props(&reader->reader, output, props);
}
@@ -288,7 +288,7 @@ static HRESULT WINAPI WMReader_SetOutputProps(IWMReader *iface, DWORD output, IW
{
struct async_reader *reader = impl_from_IWMReader(iface);
- TRACE("reader %p, output %u, props %p.\n", reader, output, props);
+ TRACE("reader %p, output %lu, props %p.\n", reader, output, props);
return wm_reader_set_output_props(&reader->reader, output, props);
}
@@ -297,7 +297,7 @@ static HRESULT WINAPI WMReader_GetOutputFormatCount(IWMReader *iface, DWORD outp
{
struct async_reader *reader = impl_from_IWMReader(iface);
- TRACE("reader %p, output %u, count %p.\n", reader, output, count);
+ TRACE("reader %p, output %lu, count %p.\n", reader, output, count);
return wm_reader_get_output_format_count(&reader->reader, output, count);
}
@@ -307,7 +307,7 @@ static HRESULT WINAPI WMReader_GetOutputFormat(IWMReader *iface, DWORD output,
{
struct async_reader *reader = impl_from_IWMReader(iface);
- TRACE("reader %p, output %u, index %u, props %p.\n", reader, output, index, props);
+ TRACE("reader %p, output %lu, index %lu, props %p.\n", reader, output, index, props);
return wm_reader_get_output_format(&reader->reader, output, index, props);
}
@@ -538,15 +538,17 @@ static HRESULT WINAPI WMReaderAdvanced_SetAllocateForOutput(IWMReaderAdvanced6 *
{
struct async_reader *reader = impl_from_IWMReaderAdvanced6(iface);
- TRACE("reader %p, output %u, allocate %d.\n", reader, output, allocate);
+ TRACE("reader %p, output %lu, allocate %d.\n", reader, output, allocate);
return wm_reader_set_allocate_for_output(&reader->reader, output, allocate);
}
static HRESULT WINAPI WMReaderAdvanced_GetAllocateForOutput(IWMReaderAdvanced6 *iface, DWORD output_num, BOOL *allocate)
{
- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
- FIXME("(%p)->(%d %p)\n", This, output_num, allocate);
+ struct async_reader *reader = impl_from_IWMReaderAdvanced6(iface);
+
+ FIXME("reader %p, output %lu, allocate %p, stub!\n", reader, output_num, allocate);
+
return E_NOTIMPL;
}
@@ -584,7 +586,7 @@ static HRESULT WINAPI WMReaderAdvanced_SetClientInfo(IWMReaderAdvanced6 *iface,
static HRESULT WINAPI WMReaderAdvanced_GetMaxOutputSampleSize(IWMReaderAdvanced6 *iface, DWORD output, DWORD *max)
{
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
- FIXME("(%p)->(%d %p)\n", This, output, max);
+ FIXME("(%p)->(%lu %p)\n", This, output, max);
return E_NOTIMPL;
}
@@ -667,7 +669,7 @@ static HRESULT WINAPI WMReaderAdvanced2_GetOutputSetting(IWMReaderAdvanced6 *ifa
const WCHAR *name, WMT_ATTR_DATATYPE *type, BYTE *value, WORD *length)
{
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
- FIXME("(%p)->(%d %s %p %p %p)\n", This, output_num, debugstr_w(name), type, value, length);
+ FIXME("(%p)->(%lu %s %p %p %p)\n", This, output_num, debugstr_w(name), type, value, length);
return E_NOTIMPL;
}
@@ -675,7 +677,7 @@ static HRESULT WINAPI WMReaderAdvanced2_SetOutputSetting(IWMReaderAdvanced6 *ifa
const WCHAR *name, WMT_ATTR_DATATYPE type, const BYTE *value, WORD length)
{
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
- FIXME("(%p)->(%d %s %d %p %d)\n", This, output_num, debugstr_w(name), type, value, length);
+ FIXME("(%p)->(%lu %s %#x %p %u)\n", This, output_num, debugstr_w(name), type, value, length);
return E_NOTIMPL;
}
@@ -742,15 +744,18 @@ static HRESULT WINAPI WMReaderAdvanced3_StartAtPosition(IWMReaderAdvanced6 *ifac
static HRESULT WINAPI WMReaderAdvanced4_GetLanguageCount(IWMReaderAdvanced6 *iface, DWORD output_num, WORD *language_count)
{
struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
- FIXME("(%p)->(%d %p)\n", This, output_num, language_count);
+ FIXME("(%p)->(%lu %p)\n", This, output_num, language_count);
return E_NOTIMPL;
}
static HRESULT WINAPI WMReaderAdvanced4_GetLanguage(IWMReaderAdvanced6 *iface, DWORD output_num,
WORD language, WCHAR *language_string, WORD *language_string_len)
{
- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
- FIXME("(%p)->(%d %x %p %p)\n", This, output_num, language, language_string, language_string_len);
+ struct async_reader *reader = impl_from_IWMReaderAdvanced6(iface);
+
+ FIXME("reader %p, output %lu, language %#x, language_string %p, language_string_len %p, stub!\n",
+ reader, output_num, language, language_string, language_string_len);
+
return E_NOTIMPL;
}
@@ -806,17 +811,21 @@ static HRESULT WINAPI WMReaderAdvanced4_GetURL(IWMReaderAdvanced6 *iface, WCHAR
static HRESULT WINAPI WMReaderAdvanced5_SetPlayerHook(IWMReaderAdvanced6 *iface, DWORD output_num, IWMPlayerHook *hook)
{
- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
- FIXME("(%p)->(%d %p)\n", This, output_num, hook);
+ struct async_reader *reader = impl_from_IWMReaderAdvanced6(iface);
+
+ FIXME("reader %p, output %lu, hook %p, stub!\n", reader, output_num, hook);
+
return E_NOTIMPL;
}
static HRESULT WINAPI WMReaderAdvanced6_SetProtectStreamSamples(IWMReaderAdvanced6 *iface, BYTE *cert,
DWORD cert_size, DWORD cert_type, DWORD flags, BYTE *initialization_vector, DWORD *initialization_vector_size)
{
- struct async_reader *This = impl_from_IWMReaderAdvanced6(iface);
- FIXME("(%p)->(%p %d %d %x %p %p)\n", This, cert, cert_size, cert_type, flags, initialization_vector,
- initialization_vector_size);
+ struct async_reader *reader = impl_from_IWMReaderAdvanced6(iface);
+
+ FIXME("reader %p, cert %p, cert_size %lu, cert_type %#lx, flags %#lx, vector %p, vector_size %p, stub!\n",
+ reader, cert, cert_size, cert_type, flags, initialization_vector, initialization_vector_size);
+
return E_NOTIMPL;
}
@@ -899,18 +908,18 @@ static ULONG WINAPI reader_accl_Release(IWMReaderAccelerator *iface)
static HRESULT WINAPI reader_accl_GetCodecInterface(IWMReaderAccelerator *iface, DWORD output, REFIID riid, void **codec)
{
- struct async_reader *This = impl_from_IWMReaderAccelerator(iface);
+ struct async_reader *reader = impl_from_IWMReaderAccelerator(iface);
- FIXME("%p, %d, %s, %p\n", This, output, debugstr_guid(riid), codec);
+ FIXME("reader %p, output %lu, iid %s, codec %p, stub!\n", reader, output, debugstr_guid(riid), codec);
return E_NOTIMPL;
}
static HRESULT WINAPI reader_accl_Notify(IWMReaderAccelerator *iface, DWORD output, WM_MEDIA_TYPE *subtype)
{
- struct async_reader *This = impl_from_IWMReaderAccelerator(iface);
+ struct async_reader *reader = impl_from_IWMReaderAccelerator(iface);
- FIXME("%p, %d, %p\n", This, output, subtype);
+ FIXME("reader %p, output %lu, subtype %p, stub!\n", reader, output, subtype);
return E_NOTIMPL;
}
@@ -968,11 +977,13 @@ static HRESULT WINAPI networkconfig_GetUDPPortRanges(IWMReaderNetworkConfig2 *if
return E_NOTIMPL;
}
-static HRESULT WINAPI networkconfig_SetUDPPortRanges(IWMReaderNetworkConfig2 *iface, WM_PORT_NUMBER_RANGE *array,
- DWORD ranges)
+static HRESULT WINAPI networkconfig_SetUDPPortRanges(IWMReaderNetworkConfig2 *iface,
+ WM_PORT_NUMBER_RANGE *ranges, DWORD count)
{
- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
- FIXME("%p, %p, %u\n", This, array, ranges);
+ struct async_reader *reader = impl_from_IWMReaderNetworkConfig2(iface);
+
+ FIXME("reader %p, ranges %p, count %lu.\n", reader, ranges, count);
+
return E_NOTIMPL;
}
@@ -1019,8 +1030,10 @@ static HRESULT WINAPI networkconfig_GetProxyPort(IWMReaderNetworkConfig2 *iface,
static HRESULT WINAPI networkconfig_SetProxyPort(IWMReaderNetworkConfig2 *iface, const WCHAR *protocol,
DWORD port)
{
- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
- FIXME("%p, %s, %u\n", This, debugstr_w(protocol), port);
+ struct async_reader *reader = impl_from_IWMReaderNetworkConfig2(iface);
+
+ FIXME("reader %p, protocol %s, port %lu, stub!\n", reader, debugstr_w(protocol), port);
+
return E_NOTIMPL;
}
@@ -1144,8 +1157,10 @@ static HRESULT WINAPI networkconfig_GetConnectionBandwidth(IWMReaderNetworkConfi
static HRESULT WINAPI networkconfig_SetConnectionBandwidth(IWMReaderNetworkConfig2 *iface, DWORD bandwidth)
{
- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
- FIXME("%p, %u\n", This, bandwidth);
+ struct async_reader *reader = impl_from_IWMReaderNetworkConfig2(iface);
+
+ FIXME("reader %p, bandwidth %lu, stub!\n", reader, bandwidth);
+
return E_NOTIMPL;
}
@@ -1159,8 +1174,10 @@ static HRESULT WINAPI networkconfig_GetNumProtocolsSupported(IWMReaderNetworkCon
static HRESULT WINAPI networkconfig_GetSupportedProtocolName(IWMReaderNetworkConfig2 *iface, DWORD protocol_num,
WCHAR *protocol, DWORD *size)
{
- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
- FIXME("%p, %u, %p %p\n", This, protocol_num, protocol, size);
+ struct async_reader *reader = impl_from_IWMReaderNetworkConfig2(iface);
+
+ FIXME("reader %p, index %lu, protocol %p, size %p, stub!\n", reader, protocol_num, protocol, size);
+
return E_NOTIMPL;
}
@@ -1174,8 +1191,10 @@ static HRESULT WINAPI networkconfig_AddLoggingUrl(IWMReaderNetworkConfig2 *iface
static HRESULT WINAPI networkconfig_GetLoggingUrl(IWMReaderNetworkConfig2 *iface, DWORD index, WCHAR *url,
DWORD *size)
{
- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
- FIXME("%p, %u, %p, %p\n", This, index, url, size);
+ struct async_reader *reader = impl_from_IWMReaderNetworkConfig2(iface);
+
+ FIXME("reader %p, index %lu, url %p, size %p, stub!\n", reader, index, url, size);
+
return E_NOTIMPL;
}
@@ -1246,8 +1265,10 @@ static HRESULT WINAPI networkconfig_GetAutoReconnectLimit(IWMReaderNetworkConfig
static HRESULT WINAPI networkconfig_SetAutoReconnectLimit(IWMReaderNetworkConfig2 *iface, DWORD limit)
{
- struct async_reader *This = impl_from_IWMReaderNetworkConfig2(iface);
- FIXME("%p, %u\n", This, limit);
+ struct async_reader *reader = impl_from_IWMReaderNetworkConfig2(iface);
+
+ FIXME("reader %p, limit %lu, stub!\n", reader, limit);
+
return E_NOTIMPL;
}
@@ -1378,8 +1399,10 @@ static HRESULT WINAPI readclock_SetTimer(IWMReaderStreamClock *iface, QWORD when
static HRESULT WINAPI readclock_KillTimer(IWMReaderStreamClock *iface, DWORD id)
{
- struct async_reader *This = impl_from_IWMReaderStreamClock(iface);
- FIXME("%p, %d\n", This, id);
+ struct async_reader *reader = impl_from_IWMReaderStreamClock(iface);
+
+ FIXME("reader %p, id %lu, stub!\n", reader, id);
+
return E_NOTIMPL;
}
@@ -1418,8 +1441,10 @@ static ULONG WINAPI negotiation_Release(IWMReaderTypeNegotiation *iface)
static HRESULT WINAPI negotiation_TryOutputProps(IWMReaderTypeNegotiation *iface, DWORD output, IWMOutputMediaProps *props)
{
- struct async_reader *This = impl_from_IWMReaderTypeNegotiation(iface);
- FIXME("%p, %d, %p\n", This, output, props);
+ struct async_reader *reader = impl_from_IWMReaderTypeNegotiation(iface);
+
+ FIXME("reader %p, output %lu, props %p, stub!\n", reader, output, props);
+
return E_NOTIMPL;
}
@@ -1464,25 +1489,31 @@ static HRESULT WINAPI refclock_GetTime(IReferenceClock *iface, REFERENCE_TIME *t
static HRESULT WINAPI refclock_AdviseTime(IReferenceClock *iface, REFERENCE_TIME basetime,
REFERENCE_TIME streamtime, HEVENT event, DWORD_PTR *cookie)
{
- struct async_reader *This = impl_from_IReferenceClock(iface);
- FIXME("%p, %s, %s, %lu, %p\n", This, wine_dbgstr_longlong(basetime),
- wine_dbgstr_longlong(streamtime), event, cookie);
+ struct async_reader *reader = impl_from_IReferenceClock(iface);
+
+ FIXME("reader %p, basetime %s, streamtime %s, event %#Ix, cookie %p, stub!\n",
+ reader, debugstr_time(basetime), debugstr_time(streamtime), event, cookie);
+
return E_NOTIMPL;
}
static HRESULT WINAPI refclock_AdvisePeriodic(IReferenceClock *iface, REFERENCE_TIME starttime,
REFERENCE_TIME period, HSEMAPHORE semaphore, DWORD_PTR *cookie)
{
- struct async_reader *This = impl_from_IReferenceClock(iface);
- FIXME("%p, %s, %s, %lu, %p\n", This, wine_dbgstr_longlong(starttime),
- wine_dbgstr_longlong(period), semaphore, cookie);
+ struct async_reader *reader = impl_from_IReferenceClock(iface);
+
+ FIXME("reader %p, starttime %s, period %s, semaphore %#Ix, cookie %p, stub!\n",
+ reader, debugstr_time(starttime), debugstr_time(period), semaphore, cookie);
+
return E_NOTIMPL;
}
static HRESULT WINAPI refclock_Unadvise(IReferenceClock *iface, DWORD_PTR cookie)
{
- struct async_reader *This = impl_from_IReferenceClock(iface);
- FIXME("%p, %lu\n", This, cookie);
+ struct async_reader *reader = impl_from_IReferenceClock(iface);
+
+ FIXME("reader %p, cookie %Iu, stub!\n", reader, cookie);
+
return E_NOTIMPL;
}
diff --git a/dlls/winegstreamer/wm_reader.c b/dlls/winegstreamer/wm_reader.c
index 1a2b8d7614b..d6dddc177eb 100644
--- a/dlls/winegstreamer/wm_reader.c
+++ b/dlls/winegstreamer/wm_reader.c
@@ -24,7 +24,7 @@ static struct wm_stream *get_stream_by_output_number(struct wm_reader *reader, D
{
if (output < reader->stream_count)
return &reader->streams[output];
- WARN("Invalid output number %u.\n", output);
+ WARN("Invalid output number %lu.\n", output);
return NULL;
}
@@ -65,7 +65,7 @@ static ULONG WINAPI output_props_AddRef(IWMOutputMediaProps *iface)
struct output_props *props = impl_from_IWMOutputMediaProps(iface);
ULONG refcount = InterlockedIncrement(&props->refcount);
- TRACE("%p increasing refcount to %u.\n", props, refcount);
+ TRACE("%p increasing refcount to %lu.\n", props, refcount);
return refcount;
}
@@ -75,7 +75,7 @@ static ULONG WINAPI output_props_Release(IWMOutputMediaProps *iface)
struct output_props *props = impl_from_IWMOutputMediaProps(iface);
ULONG refcount = InterlockedDecrement(&props->refcount);
- TRACE("%p decreasing refcount to %u.\n", props, refcount);
+ TRACE("%p decreasing refcount to %lu.\n", props, refcount);
if (!refcount)
free(props);
@@ -209,7 +209,7 @@ static ULONG WINAPI buffer_AddRef(INSSBuffer *iface)
struct buffer *buffer = impl_from_INSSBuffer(iface);
ULONG refcount = InterlockedIncrement(&buffer->refcount);
- TRACE("%p increasing refcount to %u.\n", buffer, refcount);
+ TRACE("%p increasing refcount to %lu.\n", buffer, refcount);
return refcount;
}
@@ -219,7 +219,7 @@ static ULONG WINAPI buffer_Release(INSSBuffer *iface)
struct buffer *buffer = impl_from_INSSBuffer(iface);
ULONG refcount = InterlockedDecrement(&buffer->refcount);
- TRACE("%p decreasing refcount to %u.\n", buffer, refcount);
+ TRACE("%p decreasing refcount to %lu.\n", buffer, refcount);
if (!refcount)
free(buffer);
@@ -237,7 +237,7 @@ static HRESULT WINAPI buffer_SetLength(INSSBuffer *iface, DWORD size)
{
struct buffer *buffer = impl_from_INSSBuffer(iface);
- TRACE("iface %p, size %u.\n", buffer, size);
+ TRACE("iface %p, size %lu.\n", buffer, size);
if (size > buffer->capacity)
return E_INVALIDARG;
@@ -329,7 +329,7 @@ static ULONG WINAPI stream_config_AddRef(IWMStreamConfig *iface)
struct stream_config *config = impl_from_IWMStreamConfig(iface);
ULONG refcount = InterlockedIncrement(&config->refcount);
- TRACE("%p increasing refcount to %u.\n", config, refcount);
+ TRACE("%p increasing refcount to %lu.\n", config, refcount);
return refcount;
}
@@ -339,7 +339,7 @@ static ULONG WINAPI stream_config_Release(IWMStreamConfig *iface)
struct stream_config *config = impl_from_IWMStreamConfig(iface);
ULONG refcount = InterlockedDecrement(&config->refcount);
- TRACE("%p decreasing refcount to %u.\n", config, refcount);
+ TRACE("%p decreasing refcount to %lu.\n", config, refcount);
if (!refcount)
{
@@ -422,7 +422,7 @@ static HRESULT WINAPI stream_config_GetBitrate(IWMStreamConfig *iface, DWORD *bi
static HRESULT WINAPI stream_config_SetBitrate(IWMStreamConfig *iface, DWORD bitrate)
{
- FIXME("iface %p, bitrate %u, stub!\n", iface, bitrate);
+ FIXME("iface %p, bitrate %lu, stub!\n", iface, bitrate);
return E_NOTIMPL;
}
@@ -434,7 +434,7 @@ static HRESULT WINAPI stream_config_GetBufferWindow(IWMStreamConfig *iface, DWOR
static HRESULT WINAPI stream_config_SetBufferWindow(IWMStreamConfig *iface, DWORD window)
{
- FIXME("iface %p, window %u, stub!\n", iface, window);
+ FIXME("iface %p, window %lu, stub!\n", iface, window);
return E_NOTIMPL;
}
@@ -591,7 +591,7 @@ static DWORD CALLBACK read_thread(void *arg)
if (!SetFilePointerEx(file, large_offset, NULL, FILE_BEGIN)
|| !ReadFile(file, data, size, &ret_size, NULL))
{
- ERR("Failed to read %u bytes at offset %I64u, error %u.\n", size, offset, GetLastError());
+ ERR("Failed to read %u bytes at offset %I64u, error %lu.\n", size, offset, GetLastError());
wg_parser_push_data(reader->wg_parser, NULL, 0);
continue;
}
@@ -602,14 +602,14 @@ static DWORD CALLBACK read_thread(void *arg)
hr = IStream_Read(stream, data, size, &ret_size);
if (FAILED(hr))
{
- ERR("Failed to read %u bytes at offset %I64u, hr %#x.\n", size, offset, hr);
+ ERR("Failed to read %u bytes at offset %I64u, hr %#lx.\n", size, offset, hr);
wg_parser_push_data(reader->wg_parser, NULL, 0);
continue;
}
}
if (ret_size != size)
- ERR("Unexpected short read: requested %u bytes, got %u.\n", size, ret_size);
+ ERR("Unexpected short read: requested %u bytes, got %lu.\n", size, ret_size);
wg_parser_push_data(reader->wg_parser, data, ret_size);
}
@@ -674,7 +674,7 @@ static ULONG WINAPI profile_AddRef(IWMProfile3 *iface)
struct wm_reader *reader = impl_from_IWMProfile3(iface);
ULONG refcount = InterlockedIncrement(&reader->refcount);
- TRACE("%p increasing refcount to %u.\n", reader, refcount);
+ TRACE("%p increasing refcount to %lu.\n", reader, refcount);
return refcount;
}
@@ -684,7 +684,7 @@ static ULONG WINAPI profile_Release(IWMProfile3 *iface)
struct wm_reader *reader = impl_from_IWMProfile3(iface);
ULONG refcount = InterlockedDecrement(&reader->refcount);
- TRACE("%p decreasing refcount to %u.\n", reader, refcount);
+ TRACE("%p decreasing refcount to %lu.\n", reader, refcount);
if (!refcount)
reader->ops->destroy(reader);
@@ -742,14 +742,14 @@ static HRESULT WINAPI profile_GetStream(IWMProfile3 *iface, DWORD index, IWMStre
struct wm_reader *reader = impl_from_IWMProfile3(iface);
struct stream_config *object;
- TRACE("reader %p, index %u, config %p.\n", reader, index, config);
+ TRACE("reader %p, index %lu, config %p.\n", reader, index, config);
EnterCriticalSection(&reader->cs);
if (index >= reader->stream_count)
{
LeaveCriticalSection(&reader->cs);
- WARN("Index %u exceeds stream count %u; returning E_INVALIDARG.\n", index, reader->stream_count);
+ WARN("Index %lu exceeds stream count %u; returning E_INVALIDARG.\n", index, reader->stream_count);
return E_INVALIDARG;
}
@@ -816,7 +816,7 @@ static HRESULT WINAPI profile_GetMutualExclusionCount(IWMProfile3 *iface, DWORD
static HRESULT WINAPI profile_GetMutualExclusion(IWMProfile3 *iface, DWORD index, IWMMutualExclusion **excl)
{
- FIXME("iface %p, index %u, excl %p, stub!\n", iface, index, excl);
+ FIXME("iface %p, index %lu, excl %p, stub!\n", iface, index, excl);
return E_NOTIMPL;
}
@@ -864,7 +864,7 @@ static HRESULT WINAPI profile_GetBandwidthSharingCount(IWMProfile3 *iface, DWORD
static HRESULT WINAPI profile_GetBandwidthSharing(IWMProfile3 *iface, DWORD index, IWMBandwidthSharing **sharing)
{
- FIXME("iface %p, index %d, sharing %p, stub!\n", iface, index, sharing);
+ FIXME("iface %p, index %lu, sharing %p, stub!\n", iface, index, sharing);
return E_NOTIMPL;
}
@@ -1131,7 +1131,7 @@ static HRESULT WINAPI header_info_GetCodecInfoCount(IWMHeaderInfo3 *iface, DWORD
static HRESULT WINAPI header_info_GetCodecInfo(IWMHeaderInfo3 *iface, DWORD index, WORD *name_len,
WCHAR *name, WORD *desc_len, WCHAR *desc, WMT_CODEC_INFO_TYPE *type, WORD *size, BYTE *info)
{
- FIXME("iface %p, index %u, name_len %p, name %p, desc_len %p, desc %p, type %p, size %p, info %p, stub!\n",
+ FIXME("iface %p, index %lu, name_len %p, name %p, desc_len %p, desc %p, type %p, size %p, info %p, stub!\n",
iface, index, name_len, name, desc_len, desc, type, size, info);
return E_NOTIMPL;
}
@@ -1163,7 +1163,7 @@ static HRESULT WINAPI header_info_GetAttributeByIndexEx(IWMHeaderInfo3 *iface,
static HRESULT WINAPI header_info_ModifyAttribute(IWMHeaderInfo3 *iface, WORD stream_number,
WORD index, WMT_ATTR_DATATYPE type, WORD lang_index, const BYTE *value, DWORD size)
{
- FIXME("iface %p, stream_number %u, index %u, type %#x, lang_index %u, value %p, size %u, stub!\n",
+ FIXME("iface %p, stream_number %u, index %u, type %#x, lang_index %u, value %p, size %lu, stub!\n",
iface, stream_number, index, type, lang_index, value, size);
return E_NOTIMPL;
}
@@ -1172,7 +1172,7 @@ static HRESULT WINAPI header_info_AddAttribute(IWMHeaderInfo3 *iface,
WORD stream_number, const WCHAR *name, WORD *index,
WMT_ATTR_DATATYPE type, WORD lang_index, const BYTE *value, DWORD size)
{
- FIXME("iface %p, stream_number %u, name %s, index %p, type %#x, lang_index %u, value %p, size %u, stub!\n",
+ FIXME("iface %p, stream_number %u, name %s, index %p, type %#x, lang_index %u, value %p, size %lu, stub!\n",
iface, stream_number, debugstr_w(name), index, type, lang_index, value, size);
return E_NOTIMPL;
}
@@ -1309,7 +1309,7 @@ static HRESULT WINAPI packet_size_GetMaxPacketSize(IWMPacketSize2 *iface, DWORD
static HRESULT WINAPI packet_size_SetMaxPacketSize(IWMPacketSize2 *iface, DWORD size)
{
- FIXME("iface %p, size %u, stub!\n", iface, size);
+ FIXME("iface %p, size %lu, stub!\n", iface, size);
return E_NOTIMPL;
}
@@ -1321,7 +1321,7 @@ static HRESULT WINAPI packet_size_GetMinPacketSize(IWMPacketSize2 *iface, DWORD
static HRESULT WINAPI packet_size_SetMinPacketSize(IWMPacketSize2 *iface, DWORD size)
{
- FIXME("iface %p, size %u, stub!\n", iface, size);
+ FIXME("iface %p, size %lu, stub!\n", iface, size);
return E_NOTIMPL;
}
@@ -1365,14 +1365,14 @@ static ULONG WINAPI playlist_Release(IWMReaderPlaylistBurn *iface)
static HRESULT WINAPI playlist_InitPlaylistBurn(IWMReaderPlaylistBurn *iface, DWORD count,
const WCHAR **filenames, IWMStatusCallback *callback, void *context)
{
- FIXME("iface %p, count %u, filenames %p, callback %p, context %p, stub!\n",
+ FIXME("iface %p, count %lu, filenames %p, callback %p, context %p, stub!\n",
iface, count, filenames, callback, context);
return E_NOTIMPL;
}
static HRESULT WINAPI playlist_GetInitResults(IWMReaderPlaylistBurn *iface, DWORD count, HRESULT *hrs)
{
- FIXME("iface %p, count %u, hrs %p, stub!\n", iface, count, hrs);
+ FIXME("iface %p, count %lu, hrs %p, stub!\n", iface, count, hrs);
return E_NOTIMPL;
}
@@ -1384,7 +1384,7 @@ static HRESULT WINAPI playlist_Cancel(IWMReaderPlaylistBurn *iface)
static HRESULT WINAPI playlist_EndPlaylistBurn(IWMReaderPlaylistBurn *iface, HRESULT hr)
{
- FIXME("iface %p, hr %#x, stub!\n", iface, hr);
+ FIXME("iface %p, hr %#lx, stub!\n", iface, hr);
return E_NOTIMPL;
}
@@ -1468,7 +1468,7 @@ static HRESULT init_stream(struct wm_reader *reader, QWORD file_size)
if (FAILED(hr = wg_parser_connect(reader->wg_parser, file_size)))
{
- ERR("Failed to connect parser, hr %#x.\n", hr);
+ ERR("Failed to connect parser, hr %#lx.\n", hr);
goto out_shutdown_thread;
}
@@ -1543,7 +1543,7 @@ HRESULT wm_reader_open_stream(struct wm_reader *reader, IStream *stream)
if (FAILED(hr = IStream_Stat(stream, &stat, STATFLAG_NONAME)))
{
- ERR("Failed to stat stream, hr %#x.\n", hr);
+ ERR("Failed to stat stream, hr %#lx.\n", hr);
return hr;
}
@@ -1569,13 +1569,13 @@ HRESULT wm_reader_open_file(struct wm_reader *reader, const WCHAR *filename)
if ((file = CreateFileW(filename, GENERIC_READ, FILE_SHARE_READ, NULL,
OPEN_EXISTING, 0, NULL)) == INVALID_HANDLE_VALUE)
{
- ERR("Failed to open %s, error %u.\n", debugstr_w(filename), GetLastError());
+ ERR("Failed to open %s, error %lu.\n", debugstr_w(filename), GetLastError());
return HRESULT_FROM_WIN32(GetLastError());
}
if (!GetFileSizeEx(file, &size))
{
- ERR("Failed to get the size of %s, error %u.\n", debugstr_w(filename), GetLastError());
+ ERR("Failed to get the size of %s, error %lu.\n", debugstr_w(filename), GetLastError());
CloseHandle(file);
return HRESULT_FROM_WIN32(GetLastError());
}
@@ -1851,7 +1851,7 @@ HRESULT wm_reader_get_stream_sample(struct wm_stream *stream,
if (FAILED(hr = IWMReaderCallbackAdvanced_AllocateForStream(callback_advanced,
stream->index + 1, event.u.buffer.size, &sample, NULL)))
{
- ERR("Failed to allocate stream sample of %u bytes, hr %#x.\n", event.u.buffer.size, hr);
+ ERR("Failed to allocate stream sample of %u bytes, hr %#lx.\n", event.u.buffer.size, hr);
wg_parser_stream_release_buffer(wg_stream);
return hr;
}
@@ -1861,7 +1861,7 @@ HRESULT wm_reader_get_stream_sample(struct wm_stream *stream,
if (FAILED(hr = IWMReaderCallbackAdvanced_AllocateForOutput(callback_advanced,
stream->index, event.u.buffer.size, &sample, NULL)))
{
- ERR("Failed to allocate output sample of %u bytes, hr %#x.\n", event.u.buffer.size, hr);
+ ERR("Failed to allocate output sample of %u bytes, hr %#lx.\n", event.u.buffer.size, hr);
wg_parser_stream_release_buffer(wg_stream);
return hr;
}
@@ -1886,11 +1886,11 @@ HRESULT wm_reader_get_stream_sample(struct wm_stream *stream,
}
if (FAILED(hr = INSSBuffer_GetBufferAndLength(sample, &data, &size)))
- ERR("Failed to get data pointer, hr %#x.\n", hr);
+ ERR("Failed to get data pointer, hr %#lx.\n", hr);
if (FAILED(hr = INSSBuffer_GetMaxLength(sample, &capacity)))
- ERR("Failed to get capacity, hr %#x.\n", hr);
+ ERR("Failed to get capacity, hr %#lx.\n", hr);
if (event.u.buffer.size > capacity)
- ERR("Returned capacity %u is less than requested capacity %u.\n",
+ ERR("Returned capacity %lu is less than requested capacity %u.\n",
capacity, event.u.buffer.size);
if (!wg_parser_stream_copy_buffer(wg_stream, data, 0, event.u.buffer.size))
@@ -1901,7 +1901,7 @@ HRESULT wm_reader_get_stream_sample(struct wm_stream *stream,
}
if (FAILED(hr = INSSBuffer_SetLength(sample, event.u.buffer.size)))
- ERR("Failed to set size %u, hr %#x.\n", event.u.buffer.size, hr);
+ ERR("Failed to set size %u, hr %#lx.\n", event.u.buffer.size, hr);
wg_parser_stream_release_buffer(wg_stream);
diff --git a/dlls/winegstreamer/wm_syncreader.c b/dlls/winegstreamer/wm_syncreader.c
index 96754d107de..e86645a207a 100644
--- a/dlls/winegstreamer/wm_syncreader.c
+++ b/dlls/winegstreamer/wm_syncreader.c
@@ -67,7 +67,7 @@ static HRESULT WINAPI WMSyncReader_Close(IWMSyncReader2 *iface)
static HRESULT WINAPI WMSyncReader_GetMaxOutputSampleSize(IWMSyncReader2 *iface, DWORD output, DWORD *max)
{
struct sync_reader *This = impl_from_IWMSyncReader2(iface);
- FIXME("(%p)->(%d %p): stub!\n", This, output, max);
+ FIXME("(%p)->(%lu %p): stub!\n", This, output, max);
return E_NOTIMPL;
}
@@ -160,7 +160,7 @@ static HRESULT WINAPI WMSyncReader_GetOutputFormat(IWMSyncReader2 *iface,
{
struct sync_reader *reader = impl_from_IWMSyncReader2(iface);
- TRACE("reader %p, output %u, index %u, props %p.\n", reader, output, index, props);
+ TRACE("reader %p, output %lu, index %lu, props %p.\n", reader, output, index, props);
return wm_reader_get_output_format(&reader->reader, output, index, props);
}
@@ -169,7 +169,7 @@ static HRESULT WINAPI WMSyncReader_GetOutputFormatCount(IWMSyncReader2 *iface, D
{
struct sync_reader *reader = impl_from_IWMSyncReader2(iface);
- TRACE("reader %p, output %u, count %p.\n", reader, output, count);
+ TRACE("reader %p, output %lu, count %p.\n", reader, output, count);
return wm_reader_get_output_format_count(&reader->reader, output, count);
}
@@ -190,7 +190,7 @@ static HRESULT WINAPI WMSyncReader_GetOutputProps(IWMSyncReader2 *iface,
{
struct sync_reader *reader = impl_from_IWMSyncReader2(iface);
- TRACE("reader %p, output %u, props %p.\n", reader, output, props);
+ TRACE("reader %p, output %lu, props %p.\n", reader, output, props);
return wm_reader_get_output_props(&reader->reader, output, props);
}
@@ -199,7 +199,7 @@ static HRESULT WINAPI WMSyncReader_GetOutputSetting(IWMSyncReader2 *iface, DWORD
WMT_ATTR_DATATYPE *type, BYTE *value, WORD *length)
{
struct sync_reader *This = impl_from_IWMSyncReader2(iface);
- FIXME("(%p)->(%u %s %p %p %p): stub!\n", This, output_num, debugstr_w(name), type, value, length);
+ FIXME("(%p)->(%lu %s %p %p %p): stub!\n", This, output_num, debugstr_w(name), type, value, length);
return E_NOTIMPL;
}
@@ -215,7 +215,7 @@ static HRESULT WINAPI WMSyncReader_GetStreamNumberForOutput(IWMSyncReader2 *ifac
{
struct sync_reader *reader = impl_from_IWMSyncReader2(iface);
- TRACE("reader %p, output %u, stream_number %p.\n", reader, output, stream_number);
+ TRACE("reader %p, output %lu, stream_number %p.\n", reader, output, stream_number);
*stream_number = output + 1;
return S_OK;
@@ -253,7 +253,7 @@ static HRESULT WINAPI WMSyncReader_SetOutputProps(IWMSyncReader2 *iface, DWORD o
{
struct sync_reader *reader = impl_from_IWMSyncReader2(iface);
- TRACE("reader %p, output %u, props %p.\n", reader, output, props);
+ TRACE("reader %p, output %lu, props %p.\n", reader, output, props);
return wm_reader_set_output_props(&reader->reader, output, props);
}
@@ -263,7 +263,7 @@ static HRESULT WINAPI WMSyncReader_SetOutputSetting(IWMSyncReader2 *iface, DWORD
{
struct sync_reader *reader = impl_from_IWMSyncReader2(iface);
- TRACE("reader %p, output %u, name %s, type %#x, value %p, size %u.\n",
+ TRACE("reader %p, output %lu, name %s, type %#x, value %p, size %u.\n",
reader, output, debugstr_w(name), type, value, size);
if (!wcscmp(name, L"VideoSampleDurations"))
@@ -336,28 +336,28 @@ static HRESULT WINAPI WMSyncReader2_SetRangeByFrameEx(IWMSyncReader2 *iface, WOR
static HRESULT WINAPI WMSyncReader2_SetAllocateForOutput(IWMSyncReader2 *iface, DWORD output_num, IWMReaderAllocatorEx *allocator)
{
struct sync_reader *This = impl_from_IWMSyncReader2(iface);
- FIXME("(%p)->(%d %p): stub!\n", This, output_num, allocator);
+ FIXME("(%p)->(%lu %p): stub!\n", This, output_num, allocator);
return E_NOTIMPL;
}
static HRESULT WINAPI WMSyncReader2_GetAllocateForOutput(IWMSyncReader2 *iface, DWORD output_num, IWMReaderAllocatorEx **allocator)
{
struct sync_reader *This = impl_from_IWMSyncReader2(iface);
- FIXME("(%p)->(%d %p): stub!\n", This, output_num, allocator);
+ FIXME("(%p)->(%lu %p): stub!\n", This, output_num, allocator);
return E_NOTIMPL;
}
static HRESULT WINAPI WMSyncReader2_SetAllocateForStream(IWMSyncReader2 *iface, DWORD stream_num, IWMReaderAllocatorEx *allocator)
{
struct sync_reader *This = impl_from_IWMSyncReader2(iface);
- FIXME("(%p)->(%d %p): stub!\n", This, stream_num, allocator);
+ FIXME("(%p)->(%lu %p): stub!\n", This, stream_num, allocator);
return E_NOTIMPL;
}
static HRESULT WINAPI WMSyncReader2_GetAllocateForStream(IWMSyncReader2 *iface, DWORD stream_num, IWMReaderAllocatorEx **allocator)
{
struct sync_reader *This = impl_from_IWMSyncReader2(iface);
- FIXME("(%p)->(%d %p): stub!\n", This, stream_num, allocator);
+ FIXME("(%p)->(%lu %p): stub!\n", This, stream_num, allocator);
return E_NOTIMPL;
}
diff --git a/dlls/winegstreamer/wma_decoder.c b/dlls/winegstreamer/wma_decoder.c
index a6fdbf27724..945390f44db 100644
--- a/dlls/winegstreamer/wma_decoder.c
+++ b/dlls/winegstreamer/wma_decoder.c
@@ -90,7 +90,7 @@ static ULONG WINAPI unknown_AddRef(IUnknown *iface)
struct wma_decoder *decoder = impl_from_IUnknown(iface);
ULONG refcount = InterlockedIncrement(&decoder->refcount);
- TRACE("iface %p increasing refcount to %u.\n", decoder, refcount);
+ TRACE("iface %p increasing refcount to %lu.\n", decoder, refcount);
return refcount;
}
@@ -100,7 +100,7 @@ static ULONG WINAPI unknown_Release(IUnknown *iface)
struct wma_decoder *decoder = impl_from_IUnknown(iface);
ULONG refcount = InterlockedDecrement(&decoder->refcount);
- TRACE("iface %p decreasing refcount to %u.\n", decoder, refcount);
+ TRACE("iface %p decreasing refcount to %lu.\n", decoder, refcount);
if (!refcount)
{
@@ -161,7 +161,7 @@ static HRESULT WINAPI transform_GetStreamCount(IMFTransform *iface, DWORD *input
static HRESULT WINAPI transform_GetStreamIDs(IMFTransform *iface, DWORD input_size, DWORD *inputs,
DWORD output_size, DWORD *outputs)
{
- FIXME("iface %p, input_size %u, inputs %p, output_size %u, outputs %p stub!\n", iface,
+ FIXME("iface %p, input_size %lu, inputs %p, output_size %lu, outputs %p stub!\n", iface,
input_size, inputs, output_size, outputs);
return E_NOTIMPL;
}
@@ -172,7 +172,7 @@ static HRESULT WINAPI transform_GetInputStreamInfo(IMFTransform *iface, DWORD id
UINT32 block_alignment;
HRESULT hr;
- TRACE("iface %p, id %u, info %p.\n", iface, id, info);
+ TRACE("iface %p, id %lu, info %p.\n", iface, id, info);
if (!decoder->input_type || !decoder->output_type)
return MF_E_TRANSFORM_TYPE_NOT_SET;
@@ -195,7 +195,7 @@ static HRESULT WINAPI transform_GetOutputStreamInfo(IMFTransform *iface, DWORD i
UINT32 channel_count, block_alignment;
HRESULT hr;
- TRACE("iface %p, id %u, info %p.\n", iface, id, info);
+ TRACE("iface %p, id %lu, info %p.\n", iface, id, info);
if (!decoder->input_type || !decoder->output_type)
return MF_E_TRANSFORM_TYPE_NOT_SET;
@@ -220,32 +220,32 @@ static HRESULT WINAPI transform_GetAttributes(IMFTransform *iface, IMFAttributes
static HRESULT WINAPI transform_GetInputStreamAttributes(IMFTransform *iface, DWORD id, IMFAttributes **attributes)
{
- FIXME("iface %p, id %u, attributes %p stub!\n", iface, id, attributes);
+ FIXME("iface %p, id %lu, attributes %p stub!\n", iface, id, attributes);
return E_NOTIMPL;
}
static HRESULT WINAPI transform_GetOutputStreamAttributes(IMFTransform *iface, DWORD id, IMFAttributes **attributes)
{
- FIXME("iface %p, id %u, attributes %p stub!\n", iface, id, attributes);
+ FIXME("iface %p, id %lu, attributes %p stub!\n", iface, id, attributes);
return E_NOTIMPL;
}
static HRESULT WINAPI transform_DeleteInputStream(IMFTransform *iface, DWORD id)
{
- FIXME("iface %p, id %u stub!\n", iface, id);
+ FIXME("iface %p, id %lu stub!\n", iface, id);
return E_NOTIMPL;
}
static HRESULT WINAPI transform_AddInputStreams(IMFTransform *iface, DWORD streams, DWORD *ids)
{
- FIXME("iface %p, streams %u, ids %p stub!\n", iface, streams, ids);
+ FIXME("iface %p, streams %lu, ids %p stub!\n", iface, streams, ids);
return E_NOTIMPL;
}
static HRESULT WINAPI transform_GetInputAvailableType(IMFTransform *iface, DWORD id, DWORD index,
IMFMediaType **type)
{
- FIXME("iface %p, id %u, index %u, type %p stub!\n", iface, id, index, type);
+ FIXME("iface %p, id %lu, index %lu, type %p stub!\n", iface, id, index, type);
return E_NOTIMPL;
}
@@ -258,7 +258,7 @@ static HRESULT WINAPI transform_GetOutputAvailableType(IMFTransform *iface, DWOR
const GUID *output_type;
HRESULT hr;
- TRACE("iface %p, id %u, index %u, type %p.\n", iface, id, index, type);
+ TRACE("iface %p, id %lu, index %lu, type %p.\n", iface, id, index, type);
if (!decoder->input_type)
return MF_E_TRANSFORM_TYPE_NOT_SET;
@@ -330,7 +330,7 @@ static HRESULT WINAPI transform_SetInputType(IMFTransform *iface, DWORD id, IMFM
HRESULT hr;
ULONG i;
- TRACE("iface %p, id %u, type %p, flags %#x.\n", iface, id, type, flags);
+ TRACE("iface %p, id %lu, type %p, flags %#lx.\n", iface, id, type, flags);
if (FAILED(hr = IMFMediaType_GetGUID(type, &MF_MT_MAJOR_TYPE, &major)) ||
FAILED(hr = IMFMediaType_GetGUID(type, &MF_MT_SUBTYPE, &subtype)))
@@ -384,7 +384,7 @@ static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMF
GUID major, subtype;
HRESULT hr;
- TRACE("iface %p, id %u, type %p, flags %#x.\n", iface, id, type, flags);
+ TRACE("iface %p, id %lu, type %p, flags %#lx.\n", iface, id, type, flags);
if (!decoder->input_type)
return MF_E_TRANSFORM_TYPE_NOT_SET;
@@ -448,19 +448,19 @@ failed:
static HRESULT WINAPI transform_GetInputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type)
{
- FIXME("iface %p, id %u, type %p stub!\n", iface, id, type);
+ FIXME("iface %p, id %lu, type %p stub!\n", iface, id, type);
return E_NOTIMPL;
}
static HRESULT WINAPI transform_GetOutputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type)
{
- FIXME("iface %p, id %u, type %p stub!\n", iface, id, type);
+ FIXME("iface %p, id %lu, type %p stub!\n", iface, id, type);
return E_NOTIMPL;
}
static HRESULT WINAPI transform_GetInputStatus(IMFTransform *iface, DWORD id, DWORD *flags)
{
- FIXME("iface %p, id %u, flags %p stub!\n", iface, id, flags);
+ FIXME("iface %p, id %lu, flags %p stub!\n", iface, id, flags);
return E_NOTIMPL;
}
@@ -479,7 +479,7 @@ static HRESULT WINAPI transform_SetOutputBounds(IMFTransform *iface, LONGLONG lo
static HRESULT WINAPI transform_ProcessEvent(IMFTransform *iface, DWORD id, IMFMediaEvent *event)
{
- FIXME("iface %p, id %u, event %p stub!\n", iface, id, event);
+ FIXME("iface %p, id %lu, event %p stub!\n", iface, id, event);
return E_NOTIMPL;
}
@@ -491,14 +491,14 @@ static HRESULT WINAPI transform_ProcessMessage(IMFTransform *iface, MFT_MESSAGE_
static HRESULT WINAPI transform_ProcessInput(IMFTransform *iface, DWORD id, IMFSample *sample, DWORD flags)
{
- FIXME("iface %p, id %u, sample %p, flags %#x stub!\n", iface, id, sample, flags);
+ FIXME("iface %p, id %lu, sample %p, flags %#lx stub!\n", iface, id, sample, flags);
return E_NOTIMPL;
}
static HRESULT WINAPI transform_ProcessOutput(IMFTransform *iface, DWORD flags, DWORD count,
MFT_OUTPUT_DATA_BUFFER *samples, DWORD *status)
{
- FIXME("iface %p, flags %#x, count %u, samples %p, status %p stub!\n", iface, flags, count, samples, status);
+ FIXME("iface %p, flags %#lx, count %lu, samples %p, status %p stub!\n", iface, flags, count, samples, status);
return E_NOTIMPL;
}
@@ -564,79 +564,79 @@ static HRESULT WINAPI media_object_GetStreamCount(IMediaObject *iface, DWORD *in
static HRESULT WINAPI media_object_GetInputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags)
{
- FIXME("iface %p, index %u, flags %p stub!\n", iface, index, flags);
+ FIXME("iface %p, index %lu, flags %p stub!\n", iface, index, flags);
return E_NOTIMPL;
}
static HRESULT WINAPI media_object_GetOutputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags)
{
- FIXME("iface %p, index %u, flags %p stub!\n", iface, index, flags);
+ FIXME("iface %p, index %lu, flags %p stub!\n", iface, index, flags);
return E_NOTIMPL;
}
static HRESULT WINAPI media_object_GetInputType(IMediaObject *iface, DWORD index, DWORD type_index,
DMO_MEDIA_TYPE *type)
{
- FIXME("iface %p, index %u, type_index %u, type %p stub!\n", iface, index, type_index, type);
+ FIXME("iface %p, index %lu, type_index %lu, type %p stub!\n", iface, index, type_index, type);
return E_NOTIMPL;
}
static HRESULT WINAPI media_object_GetOutputType(IMediaObject *iface, DWORD index, DWORD type_index,
DMO_MEDIA_TYPE *type)
{
- FIXME("iface %p, index %u, type_index %u, type %p stub!\n", iface, index, type_index, type);
+ FIXME("iface %p, index %lu, type_index %lu, type %p stub!\n", iface, index, type_index, type);
return E_NOTIMPL;
}
static HRESULT WINAPI media_object_SetInputType(IMediaObject *iface, DWORD index,
const DMO_MEDIA_TYPE *type, DWORD flags)
{
- FIXME("iface %p, index %u, type %p, flags %#x stub!\n", iface, index, type, flags);
+ FIXME("iface %p, index %lu, type %p, flags %#lx stub!\n", iface, index, type, flags);
return E_NOTIMPL;
}
static HRESULT WINAPI media_object_SetOutputType(IMediaObject *iface, DWORD index,
const DMO_MEDIA_TYPE *type, DWORD flags)
{
- FIXME("iface %p, index %u, type %p, flags %#x stub!\n", iface, index, type, flags);
+ FIXME("iface %p, index %lu, type %p, flags %#lx stub!\n", iface, index, type, flags);
return E_NOTIMPL;
}
static HRESULT WINAPI media_object_GetInputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *type)
{
- FIXME("iface %p, index %u, type %p stub!\n", iface, index, type);
+ FIXME("iface %p, index %lu, type %p stub!\n", iface, index, type);
return E_NOTIMPL;
}
static HRESULT WINAPI media_object_GetOutputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *type)
{
- FIXME("iface %p, index %u, type %p stub!\n", iface, index, type);
+ FIXME("iface %p, index %lu, type %p stub!\n", iface, index, type);
return E_NOTIMPL;
}
static HRESULT WINAPI media_object_GetInputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size,
DWORD *lookahead, DWORD *alignment)
{
- FIXME("iface %p, index %u, size %p, lookahead %p, alignment %p stub!\n", iface, index, size,
+ FIXME("iface %p, index %lu, size %p, lookahead %p, alignment %p stub!\n", iface, index, size,
lookahead, alignment);
return E_NOTIMPL;
}
static HRESULT WINAPI media_object_GetOutputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *alignment)
{
- FIXME("iface %p, index %u, size %p, alignment %p stub!\n", iface, index, size, alignment);
+ FIXME("iface %p, index %lu, size %p, alignment %p stub!\n", iface, index, size, alignment);
return E_NOTIMPL;
}
static HRESULT WINAPI media_object_GetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME *latency)
{
- FIXME("iface %p, index %u, latency %p stub!\n", iface, index, latency);
+ FIXME("iface %p, index %lu, latency %p stub!\n", iface, index, latency);
return E_NOTIMPL;
}
static HRESULT WINAPI media_object_SetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME latency)
{
- FIXME("iface %p, index %u, latency %s stub!\n", iface, index, wine_dbgstr_longlong(latency));
+ FIXME("iface %p, index %lu, latency %s stub!\n", iface, index, wine_dbgstr_longlong(latency));
return E_NOTIMPL;
}
@@ -648,7 +648,7 @@ static HRESULT WINAPI media_object_Flush(IMediaObject *iface)
static HRESULT WINAPI media_object_Discontinuity(IMediaObject *iface, DWORD index)
{
- FIXME("iface %p, index %u stub!\n", iface, index);
+ FIXME("iface %p, index %lu stub!\n", iface, index);
return E_NOTIMPL;
}
@@ -666,14 +666,14 @@ static HRESULT WINAPI media_object_FreeStreamingResources(IMediaObject *iface)
static HRESULT WINAPI media_object_GetInputStatus(IMediaObject *iface, DWORD index, DWORD *flags)
{
- FIXME("iface %p, index %u, flags %p stub!\n", iface, index, flags);
+ FIXME("iface %p, index %lu, flags %p stub!\n", iface, index, flags);
return E_NOTIMPL;
}
static HRESULT WINAPI media_object_ProcessInput(IMediaObject *iface, DWORD index,
IMediaBuffer *buffer, DWORD flags, REFERENCE_TIME timestamp, REFERENCE_TIME timelength)
{
- FIXME("iface %p, index %u, buffer %p, flags %#x, timestamp %s, timelength %s stub!\n", iface,
+ FIXME("iface %p, index %lu, buffer %p, flags %#lx, timestamp %s, timelength %s stub!\n", iface,
index, buffer, flags, wine_dbgstr_longlong(timestamp), wine_dbgstr_longlong(timelength));
return E_NOTIMPL;
}
@@ -681,13 +681,13 @@ static HRESULT WINAPI media_object_ProcessInput(IMediaObject *iface, DWORD index
static HRESULT WINAPI media_object_ProcessOutput(IMediaObject *iface, DWORD flags, DWORD count,
DMO_OUTPUT_DATA_BUFFER *buffers, DWORD *status)
{
- FIXME("iface %p, flags %#x, count %u, buffers %p, status %p stub!\n", iface, flags, count, buffers, status);
+ FIXME("iface %p, flags %#lx, count %lu, buffers %p, status %p stub!\n", iface, flags, count, buffers, status);
return E_NOTIMPL;
}
static HRESULT WINAPI media_object_Lock(IMediaObject *iface, LONG lock)
{
- FIXME("iface %p, lock %d stub!\n", iface, lock);
+ FIXME("iface %p, lock %ld stub!\n", iface, lock);
return E_NOTIMPL;
}
--
2.34.1
1
1
[PATCH v5] ws2_32: Fix setsockopt(TCP_NODELAY) when optlen is less than 4.
by Bastien Orivel Feb. 3, 2022
by Bastien Orivel Feb. 3, 2022
Feb. 3, 2022
According to MSDN [1], the `TCP_NODELAY` parameter should be of type
`BOOL` which is 4 bytes. Due to a bug [2] in rustc passing a byte
instead of an int, any program written in rust that tries to set that
option on a socket will fail with a "Invalid parameter supplied" error.
Turns out that setsockopt on linux does not want optlen to be less than
4 bytes [3].
Windows' behavior is the following:
- For optlen <= 0, return SOCKET_ERROR and set last error to WSAEFAULT
- For optlen > 0, ignore the optlen value and set the TCP_NODELAY value
to one if the first byte of the given optvalue is not 0.
This will fix any rust program using the hyper library to do HTTP
requests.
[1]: https://docs.microsoft.com/en-us/windows/win32/winsock/ipproto-tcp-socket-o…
[2]: https://github.com/rust-lang/rust/blob/44593aeb1387b1be355aeaf0040d5927bd80…
[3]: https://github.com/torvalds/linux/blob/d58071a8a76d779eedab38033ae4c821c302…
Signed-off-by: Bastien Orivel <eijebong(a)bananium.fr>
---
dlls/ws2_32/socket.c | 10 +++++--
dlls/ws2_32/tests/sock.c | 63 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 71 insertions(+), 2 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index a75aaee68be..4b3ca3c2507 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -2903,8 +2903,14 @@ int WINAPI setsockopt( SOCKET s, int level, int optname, const char *optval, int
switch(optname)
{
case TCP_NODELAY:
- return server_setsockopt( s, IOCTL_AFD_WINE_SET_TCP_NODELAY, optval, optlen );
-
+ {
+ INT nodelay = *optval;
+ if (optlen <= 0) {
+ SetLastError(WSAEFAULT);
+ return SOCKET_ERROR;
+ }
+ return server_setsockopt( s, IOCTL_AFD_WINE_SET_TCP_NODELAY, (char*)&nodelay, sizeof(nodelay) );
+ }
default:
FIXME("Unknown IPPROTO_TCP optname 0x%08x\n", optname);
SetLastError(WSAENOPROTOOPT);
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index b38357954b7..d208c17e43f 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -1259,6 +1259,69 @@ static void test_set_getsockopt(void)
ok(err == SOCKET_ERROR && WSAGetLastError() == WSAEFAULT,
"got %d with %d (expected SOCKET_ERROR with WSAEFAULT)\n", err, WSAGetLastError());
+ /* TCP_NODELAY: optlen doesn't matter on windows, it should work with any positive value */
+ size = sizeof(value);
+
+ value = 1;
+ err = setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&value, 1);
+ ok (!err, "setsockopt TCP_NODELAY failed with optlen == 1\n");
+ value = 0xff;
+ err = getsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&value, &size);
+ ok(!err, "getsockopt TCP_NODELAY failed\n");
+ ok(value == 1, "TCP_NODELAY should be 1\n");
+ value = 0;
+ err = setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&value, sizeof(value));
+ ok(!err, "Failed to reset TCP_NODELAY to 0\n");
+
+ value = 1;
+ err = setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&value, 4);
+ ok (!err, "setsockopt TCP_NODELAY failed with optlen == 4\n");
+ value = 0xff;
+ err = getsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&value, &size);
+ ok(!err, "getsockopt TCP_NODELAY failed\n");
+ ok(value == 1, "TCP_NODELAY should be 1\n");
+ value = 0;
+ err = setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&value, sizeof(value));
+ ok(!err, "Failed to reset TCP_NODELAY to 0\n");
+
+ value = 1;
+ err = setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&value, 42);
+ ok (!err, "setsockopt TCP_NODELAY failed with optlen == 42\n");
+ value = 0xff;
+ err = getsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&value, &size);
+ ok(!err, "getsockopt TCP_NODELAY failed\n");
+ ok(value == 1, "TCP_NODELAY should be 1\n");
+ value = 0;
+ err = setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&value, sizeof(value));
+ ok(!err, "Failed to reset TCP_NODELAY to 0\n");
+
+ value = 1;
+ err = setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&value, 0);
+ ok(err == SOCKET_ERROR && WSAGetLastError() == WSAEFAULT,
+ "got %d with %d (expected SOCKET_ERROR with WSAEFAULT)\n", err, WSAGetLastError());
+ value = 0xff;
+ err = getsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&value, &size);
+ ok(!err, "getsockopt TCP_NODELAY failed\n");
+ ok(!value, "TCP_NODELAY should be 0\n");
+
+ value = 1;
+ err = setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&value, -1);
+ /* On win 10 pro, this sets the error to WSAENOBUFS instead of WSAEFAULT */
+ ok(err == SOCKET_ERROR && (WSAGetLastError() == WSAEFAULT || WSAGetLastError() == WSAENOBUFS),
+ "got %d with %d (expected SOCKET_ERROR with either WSAEFAULT or WSAENOBUFS)\n", err, WSAGetLastError());
+ value = 0xff;
+ err = getsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&value, &size);
+ ok(!err, "getsockopt TCP_NODELAY failed\n");
+ ok(!value, "TCP_NODELAY should be 0\n");
+
+ value = 0x100;
+ err = setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&value, 4);
+ ok (!err, "setsockopt TCP_NODELAY failed with optlen == 4 and optvalue = 0x100\n");
+ value = 0xff;
+ err = getsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&value, &size);
+ ok(!err, "getsockopt TCP_NODELAY failed\n");
+ ok(!value, "TCP_NODELAY should be 0\n");
+
/* Test for erroneously passing a value instead of a pointer as optval */
size = sizeof(char);
err = setsockopt(s, SOL_SOCKET, SO_DONTROUTE, (char *)1, size);
--
2.34.1
2
1
Feb. 3, 2022
Signed-off-by: Derek Lesho <dlesho(a)codeweavers.com>
---
dlls/userenv/tests/userenv.c | 17 ++++++++++++++++-
dlls/userenv/userenv_main.c | 3 +++
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/dlls/userenv/tests/userenv.c b/dlls/userenv/tests/userenv.c
index a91edeef260..c7a6791e2be 100644
--- a/dlls/userenv/tests/userenv.c
+++ b/dlls/userenv/tests/userenv.c
@@ -78,7 +78,7 @@ static void test_create_env(void)
BOOL r, is_wow64 = FALSE;
HANDLE htok;
WCHAR * env[4];
- char * st, systemroot[100];
+ char * st, systemroot[100], programdata[100];
int i, j;
static const struct profile_item common_vars[] = {
@@ -96,6 +96,7 @@ static void test_create_env(void)
};
static const struct profile_item common_post_nt4_vars[] = {
{ "ALLUSERSPROFILE" },
+ { "ProgramData" },
{ "TEMP" },
{ "TMP" },
{ "CommonProgramFiles" },
@@ -119,6 +120,12 @@ static void test_create_env(void)
r = SetEnvironmentVariableA("SystemRoot", "overwrite");
expect(TRUE, r);
+ r = GetEnvironmentVariableA("ProgramData", programdata, sizeof(programdata));
+ ok(r != 0, "GetEnvironmentVariable failed (%d)\n", GetLastError());
+
+ r = SetEnvironmentVariableA("ProgramData", "overwrite");
+ expect(TRUE, r);
+
if (0)
{
/* Crashes on NT4 */
@@ -151,12 +158,20 @@ static void test_create_env(void)
r = SetEnvironmentVariableA("SystemRoot", systemroot);
expect(TRUE, r);
+ r = SetEnvironmentVariableA("ProgramData", programdata);
+ expect(TRUE, r);
+
for(i=0; i<4; i++)
{
r = get_env(env[i], "SystemRoot", &st);
ok(!strcmp(st, "SystemRoot=overwrite"), "%s\n", st);
expect(TRUE, r);
HeapFree(GetProcessHeap(), 0, st);
+
+ r = get_env(env[i], "ProgramData", &st);
+ ok(strcmp(st, "ProgramData=overwrite"), "%s\n", st);
+ expect(TRUE, r);
+ HeapFree(GetProcessHeap(), 0, st);
}
/* Test for common environment variables (NT4 and higher) */
diff --git a/dlls/userenv/userenv_main.c b/dlls/userenv/userenv_main.c
index 87ace7d5c11..08dede60d35 100644
--- a/dlls/userenv/userenv_main.c
+++ b/dlls/userenv/userenv_main.c
@@ -243,7 +243,10 @@ BOOL WINAPI CreateEnvironmentBlock( LPVOID* lpEnvironment,
}
if (get_reg_value(env, hkey, L"Public", buf, UNICODE_STRING_MAX_CHARS))
+ {
set_env_var(&env, L"ALLUSERSPROFILE", buf);
+ set_env_var(&env, L"ProgramData", buf);
+ }
}
else
{
--
2.34.1
1
0
[PATCH v2] winegcc: --out-implib needs to propagate -m32/-m64 to winebuild
by Kevin Puetz Feb. 3, 2022
by Kevin Puetz Feb. 3, 2022
Feb. 3, 2022
This was already passed through for linking, and for spec.o files,
but was overlooked when implementing -Wl,--out-implib
Signed-off-by: Kevin Puetz <PuetzKevinA(a)JohnDeere.com>
--
This version will also send -m32/-m64 to subcommands that don't care
e.g. winebuild --fixup-constructors peeks at the ELF magic number instead,
and winebuld --builtin just modifies an existing PE header in-place.
But that's harmless; winebuild will always parse and accept -m16/32/64,
and it does interact with --target, so it's reasonable to always pass
them together just to have fewer details to think about.
---
tools/winegcc/winegcc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
index 0aafca1271a..44d86fb130a 100644
--- a/tools/winegcc/winegcc.c
+++ b/tools/winegcc/winegcc.c
@@ -897,6 +897,8 @@ static struct strarray get_winebuild_args(struct options *opts)
strarray_add( &spec_args, "--target" );
strarray_add( &spec_args, opts->target_alias );
}
+ if (opts->force_pointer_size)
+ strarray_add(&spec_args, strmake("-m%u", 8 * opts->force_pointer_size ));
for (i = 0; i < opts->prefix.count; i++)
strarray_add( &spec_args, strmake( "-B%s", opts->prefix.str[i] ));
strarray_addall( &spec_args, opts->winebuild_args );
@@ -1025,8 +1027,6 @@ static const char *build_spec_obj( struct options *opts, const char *spec_file,
}
spec_o_name = get_temp_file(output_name, ".spec.o");
- if (opts->force_pointer_size)
- strarray_add(&spec_args, strmake("-m%u", 8 * opts->force_pointer_size ));
if (opts->pic && !is_pe) strarray_add(&spec_args, "-fPIC");
strarray_add(&spec_args, opts->shared ? "--dll" : "--exe");
if (opts->fake_module)
--
2.34.1
1
0