Wine-Devel
By message
wine-devel@list.winehq.org
By month
Threads by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- 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
February 2022
- 87 participants
- 926 discussions
Feb. 3, 2022
From: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/d3dx11_42/tests/Makefile.in | 1 -
dlls/d3dx11_43/tests/Makefile.in | 1 -
dlls/d3dx11_43/tests/d3dx11.c | 145 ++++++++++++++++---------------
3 files changed, 73 insertions(+), 74 deletions(-)
diff --git a/dlls/d3dx11_42/tests/Makefile.in b/dlls/d3dx11_42/tests/Makefile.in
index a4ea6f1a0277..660f6d947cce 100644
--- a/dlls/d3dx11_42/tests/Makefile.in
+++ b/dlls/d3dx11_42/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = d3dx11_42.dll
IMPORTS = d3dx11_42
PARENTSRC = ../../d3dx11_43/tests
diff --git a/dlls/d3dx11_43/tests/Makefile.in b/dlls/d3dx11_43/tests/Makefile.in
index 11bb7763a01b..6e522df66fb9 100644
--- a/dlls/d3dx11_43/tests/Makefile.in
+++ b/dlls/d3dx11_43/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = d3dx11_43.dll
IMPORTS = d3dx11
diff --git a/dlls/d3dx11_43/tests/d3dx11.c b/dlls/d3dx11_43/tests/d3dx11.c
index fe33089a5414..89fc0721c922 100644
--- a/dlls/d3dx11_43/tests/d3dx11.c
+++ b/dlls/d3dx11_43/tests/d3dx11.c
@@ -316,42 +316,42 @@ static void test_D3DX11CreateAsyncMemoryLoader(void)
void *ptr;
hr = D3DX11CreateAsyncMemoryLoader(NULL, 0, NULL);
- ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr);
hr = D3DX11CreateAsyncMemoryLoader(NULL, 0, &loader);
- ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr);
hr = D3DX11CreateAsyncMemoryLoader(&data, 0, &loader);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
size = 100;
hr = ID3DX11DataLoader_Decompress(loader, &ptr, &size);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(ptr == &data, "Got data pointer %p, original %p.\n", ptr, &data);
ok(!size, "Got unexpected data size.\n");
/* Load() is no-op. */
hr = ID3DX11DataLoader_Load(loader);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3DX11DataLoader_Destroy(loader);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
data = 0;
hr = D3DX11CreateAsyncMemoryLoader(&data, sizeof(data), &loader);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Load() is no-op. */
hr = ID3DX11DataLoader_Load(loader);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3DX11DataLoader_Decompress(loader, &ptr, &size);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(ptr == &data, "Got data pointer %p, original %p.\n", ptr, &data);
ok(size == sizeof(data), "Got unexpected data size.\n");
hr = ID3DX11DataLoader_Destroy(loader);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
}
static void create_testfile(WCHAR *path, const void *data, int data_len)
@@ -364,7 +364,7 @@ static void create_testfile(WCHAR *path, const void *data, int data_len)
lstrcatW(path, L"asyncloader.data");
file = CreateFileW(path, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0);
- ok(file != INVALID_HANDLE_VALUE, "Test file creation failed, at %s, error %d.\n",
+ ok(file != INVALID_HANDLE_VALUE, "Test file creation failed, at %s, error %ld.\n",
wine_dbgstr_w(path), GetLastError());
ret = WriteFile(file, data, data_len, &written, NULL);
@@ -385,59 +385,59 @@ static void test_D3DX11CreateAsyncFileLoader(void)
BOOL ret;
hr = D3DX11CreateAsyncFileLoaderA(NULL, NULL);
- ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr);
hr = D3DX11CreateAsyncFileLoaderA(NULL, &loader);
- ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr);
hr = D3DX11CreateAsyncFileLoaderA("nonexistentfilename", &loader);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3DX11DataLoader_Decompress(loader, &ptr, &size);
- ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr);
hr = ID3DX11DataLoader_Load(loader);
- ok(hr == D3D11_ERROR_FILE_NOT_FOUND, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D3D11_ERROR_FILE_NOT_FOUND, "Got unexpected hr %#lx.\n", hr);
hr = ID3DX11DataLoader_Decompress(loader, &ptr, &size);
- ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr);
hr = ID3DX11DataLoader_Destroy(loader);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Test file sharing using dummy empty file. */
create_testfile(path, test_data1, sizeof(test_data1));
hr = D3DX11CreateAsyncFileLoaderW(path, &loader);
- ok(SUCCEEDED(hr), "Failed to create file loader, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ret = DeleteFileW(path);
- ok(ret, "DeleteFile() failed, ret %d, error %d.\n", ret, GetLastError());
+ ok(ret, "Got unexpected ret %#x, error %ld.\n", ret, GetLastError());
/* File was removed before Load(). */
hr = ID3DX11DataLoader_Load(loader);
- ok(hr == D3D11_ERROR_FILE_NOT_FOUND, "Load() returned unexpected result, hr %#x.\n", hr);
+ ok(hr == D3D11_ERROR_FILE_NOT_FOUND, "Got unexpected hr %#lx.\n", hr);
/* Create it again. */
create_testfile(path, test_data1, sizeof(test_data1));
hr = ID3DX11DataLoader_Load(loader);
- ok(SUCCEEDED(hr), "Load() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Already loaded. */
hr = ID3DX11DataLoader_Load(loader);
- ok(SUCCEEDED(hr), "Load() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ret = DeleteFileW(path);
- ok(ret, "DeleteFile() failed, ret %d, error %d.\n", ret, GetLastError());
+ ok(ret, "Got unexpected ret %#x, error %ld.\n", ret, GetLastError());
/* Already loaded, file removed. */
hr = ID3DX11DataLoader_Load(loader);
- ok(hr == D3D11_ERROR_FILE_NOT_FOUND, "Load() returned unexpected result, hr %#x.\n", hr);
+ ok(hr == D3D11_ERROR_FILE_NOT_FOUND, "Got unexpected hr %#lx.\n", hr);
/* Decompress still works. */
ptr = NULL;
hr = ID3DX11DataLoader_Decompress(loader, &ptr, &size);
- ok(SUCCEEDED(hr), "Decompress() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(ptr != NULL, "Got unexpected ptr %p.\n", ptr);
ok(size == sizeof(test_data1), "Got unexpected decompressed size.\n");
if (size == sizeof(test_data1))
@@ -447,21 +447,21 @@ static void test_D3DX11CreateAsyncFileLoader(void)
create_testfile(path, test_data2, sizeof(test_data2));
hr = ID3DX11DataLoader_Load(loader);
- ok(SUCCEEDED(hr), "Load() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ptr = NULL;
hr = ID3DX11DataLoader_Decompress(loader, &ptr, &size);
- ok(SUCCEEDED(hr), "Decompress() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(ptr != NULL, "Got unexpected ptr %p.\n", ptr);
ok(size == sizeof(test_data2), "Got unexpected decompressed size.\n");
if (size == sizeof(test_data2))
ok(!memcmp(ptr, test_data2, size), "Got unexpected file data.\n");
hr = ID3DX11DataLoader_Destroy(loader);
- ok(SUCCEEDED(hr), "Destroy() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ret = DeleteFileW(path);
- ok(ret, "DeleteFile() failed, ret %d, error %d.\n", ret, GetLastError());
+ ok(ret, "Got unexpected ret %#x, error %ld.\n", ret, GetLastError());
}
static void test_D3DX11CreateAsyncResourceLoader(void)
@@ -470,22 +470,22 @@ static void test_D3DX11CreateAsyncResourceLoader(void)
HRESULT hr;
hr = D3DX11CreateAsyncResourceLoaderA(NULL, NULL, NULL);
- ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr);
hr = D3DX11CreateAsyncResourceLoaderA(NULL, NULL, &loader);
- ok(hr == D3DX11_ERR_INVALID_DATA, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D3DX11_ERR_INVALID_DATA, "Got unexpected hr %#lx.\n", hr);
hr = D3DX11CreateAsyncResourceLoaderA(NULL, "noname", &loader);
- ok(hr == D3DX11_ERR_INVALID_DATA, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D3DX11_ERR_INVALID_DATA, "Got unexpected hr %#lx.\n", hr);
hr = D3DX11CreateAsyncResourceLoaderW(NULL, NULL, NULL);
- ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr);
hr = D3DX11CreateAsyncResourceLoaderW(NULL, NULL, &loader);
- ok(hr == D3DX11_ERR_INVALID_DATA, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D3DX11_ERR_INVALID_DATA, "Got unexpected hr %#lx.\n", hr);
hr = D3DX11CreateAsyncResourceLoaderW(NULL, L"noname", &loader);
- ok(hr == D3DX11_ERR_INVALID_DATA, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D3DX11_ERR_INVALID_DATA, "Got unexpected hr %#lx.\n", hr);
}
static HRESULT WINAPI test_d3dinclude_open(ID3DInclude *iface, D3D_INCLUDE_TYPE include_type,
@@ -574,8 +574,9 @@ static void test_D3DX11CompileFromFile(void)
create_file(L"include1.h", include1, strlen(include1), NULL);
create_file(L"include\\include2.h", include2, strlen(include2), NULL);
- hr = D3DX11CompileFromFileW(filename, NULL, &include.ID3DInclude_iface, "main", "ps_2_0", 0, 0, NULL, &blob, &errors, &result);
- todo_wine ok(hr == S_OK && hr == result, "Got hr %#x, result %#x.\n", hr, result);
+ hr = D3DX11CompileFromFileW(filename, NULL, &include.ID3DInclude_iface,
+ "main", "ps_2_0", 0, 0, NULL, &blob, &errors, &result);
+ todo_wine ok(hr == S_OK && hr == result, "Got unexpected hr %#lx, result %#lx.\n", hr, result);
todo_wine ok(!!blob, "Got unexpected blob.\n");
ok(!errors, "Got unexpected errors.\n");
if (blob)
@@ -588,7 +589,7 @@ static void test_D3DX11CompileFromFile(void)
* instead of using the immediate parent, as it would be the case for
* standard C preprocessor includes. */
hr = D3DX11CompileFromFileW(filename, NULL, NULL, "main", "ps_2_0", 0, 0, NULL, &blob, &errors, &result);
- todo_wine ok(hr == S_OK && hr == result, "Got hr %#x, result %#x.\n", hr, result);
+ todo_wine ok(hr == S_OK && hr == result, "Got unexpected hr %#lx, result %#lx.\n", hr, result);
todo_wine ok(!!blob, "Got unexpected blob.\n");
ok(!errors, "Got unexpected errors.\n");
if (blob)
@@ -600,7 +601,7 @@ static void test_D3DX11CompileFromFile(void)
len = WideCharToMultiByte(CP_ACP, 0, filename, -1, NULL, 0, NULL, NULL);
WideCharToMultiByte(CP_ACP, 0, filename, -1, filename_a, len, NULL, NULL);
hr = D3DX11CompileFromFileA(filename_a, NULL, NULL, "main", "ps_2_0", 0, 0, NULL, &blob, &errors, &result);
- todo_wine ok(hr == S_OK && hr == result, "Got hr %#x, result %#x.\n", hr, result);
+ todo_wine ok(hr == S_OK && hr == result, "Got unexpected hr %#lx, result %#lx.\n", hr, result);
todo_wine ok(!!blob, "Got unexpected blob.\n");
ok(!errors, "Got unexpected errors.\n");
if (blob)
@@ -613,7 +614,7 @@ static void test_D3DX11CompileFromFile(void)
SetCurrentDirectoryW(temp_dir);
hr = D3DX11CompileFromFileW(L"source.ps", NULL, NULL, "main", "ps_2_0", 0, 0, NULL, &blob, &errors, &result);
- todo_wine ok(hr == S_OK && hr == result, "Got hr %#x, result %#x.\n", hr, result);
+ todo_wine ok(hr == S_OK && hr == result, "Got unexpected hr %#lx, result %#lx.\n", hr, result);
todo_wine ok(!!blob, "Got unexpected blob.\n");
ok(!errors, "Got unexpected errors.\n");
if (blob)
@@ -730,7 +731,7 @@ static void check_dds_pixel_format_(unsigned int line, DWORD flags, DWORD fourcc
memset(dds.data, 0, sizeof(dds.data));
hr = D3DX11GetImageInfoFromMemory(&dds, sizeof(dds), NULL, &info, NULL);
- ok_(__FILE__, line)(hr == S_OK, "Unexpected hr %#x for pixel format %#x.\n", hr, expected_format);
+ ok_(__FILE__, line)(hr == S_OK, "Got unexpected hr %#lx for pixel format %#x.\n", hr, expected_format);
if (SUCCEEDED(hr))
{
ok_(__FILE__, line)(info.Format == expected_format, "Unexpected format %#x, expected %#x\n",
@@ -750,50 +751,50 @@ static void test_D3DX11GetImageInfoFromMemory(void)
}
hr = D3DX11GetImageInfoFromMemory(bmp_1bpp, sizeof(bmp_1bpp), NULL, &info, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(bmp_1bpp, sizeof(bmp_1bpp) + 5, NULL, &info, NULL); /* too large size */
- ok(hr == S_OK, "Unexpected hr %#x.", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(noimage, sizeof(noimage), NULL, NULL, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(noimage, sizeof(noimage), NULL, &info, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(bmp_1bpp, sizeof(bmp_1bpp) - 1, NULL, &info, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(bmp_1bpp + 1, sizeof(bmp_1bpp) - 1, NULL, &info, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(bmp_1bpp, 0, NULL, &info, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(bmp_1bpp, 0, NULL, NULL, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(noimage, 0, NULL, &info, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(noimage, 0, NULL, NULL, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(noimage, 0, NULL, &info, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(NULL, 4, NULL, NULL, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(NULL, 4, NULL, &info, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(NULL, 0, NULL, NULL, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
/* test BMP support */
hr = D3DX11GetImageInfoFromMemory(bmp_1bpp, sizeof(bmp_1bpp), NULL, &info, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.", hr);
ok(info.Width == 1, "Unexpected width %u.\n", info.Width);
ok(info.Height == 1, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -805,10 +806,10 @@ static void test_D3DX11GetImageInfoFromMemory(void)
ok(info.ImageFileFormat == D3DX11_IFF_BMP, "Unexpected image file format %#x.\n", info.ImageFileFormat);
hr = D3DX11GetImageInfoFromMemory(bmp_2bpp, sizeof(bmp_2bpp), NULL, &info, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(bmp_4bpp, sizeof(bmp_4bpp), NULL, &info, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 1, "Unexpected width %u.\n", info.Width);
ok(info.Height == 1, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -820,7 +821,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
ok(info.ImageFileFormat == D3DX11_IFF_BMP, "Unexpected image file format %#x.\n", info.ImageFileFormat);
hr = D3DX11GetImageInfoFromMemory(bmp_8bpp, sizeof(bmp_8bpp), NULL, &info, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 1, "Unexpected width %u.\n", info.Width);
ok(info.Height == 1, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -832,7 +833,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
ok(info.ImageFileFormat == D3DX11_IFF_BMP, "Unexpected image file format %#x.\n", info.ImageFileFormat);
hr = D3DX11GetImageInfoFromMemory(bmp_32bpp_xrgb, sizeof(bmp_32bpp_xrgb), NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 2, "Unexpected width %u.\n", info.Width);
ok(info.Height == 2, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -844,7 +845,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
ok(info.ImageFileFormat == D3DX11_IFF_BMP, "Unexpected image file format %#x.\n", info.ImageFileFormat);
hr = D3DX11GetImageInfoFromMemory(bmp_32bpp_argb, sizeof(bmp_32bpp_argb), NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 2, "Unexpected width %u.\n", info.Width);
ok(info.Height == 2, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -857,7 +858,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
/* Grayscale PNG */
hr = D3DX11GetImageInfoFromMemory(png_grayscale, sizeof(png_grayscale), NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 1, "Unexpected width %u.\n", info.Width);
ok(info.Height == 1, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -870,7 +871,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
/* test DDS support */
hr = D3DX11GetImageInfoFromMemory(dds_24bit, sizeof(dds_24bit), NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 2, "Unexpected width %u.\n", info.Width);
ok(info.Height == 2, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -881,7 +882,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
ok(info.ImageFileFormat == D3DX11_IFF_DDS, "Unexpected image file format %#x.\n", info.ImageFileFormat);
hr = D3DX11GetImageInfoFromMemory(dds_24bit, sizeof(dds_24bit) - 1, NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 2, "Unexpected width %u.\n", info.Width);
ok(info.Height == 2, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -892,7 +893,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
ok(info.ImageFileFormat == D3DX11_IFF_DDS, "Unexpected image file format %#x.\n", info.ImageFileFormat);
hr = D3DX11GetImageInfoFromMemory(dds_16bit, sizeof(dds_16bit), NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 2, "Unexpected width %u.\n", info.Width);
ok(info.Height == 2, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -904,7 +905,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
memset(&info, 0, sizeof(info));
hr = D3DX11GetImageInfoFromMemory(dds_16bit, sizeof(dds_16bit) - 1, NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 2, "Unexpected width %u.\n", info.Width);
ok(info.Height == 2, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -916,7 +917,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
memset(&info, 0, sizeof(info));
hr = D3DX11GetImageInfoFromMemory(dds_8bit, sizeof(dds_8bit), NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 16, "Unexpected width %u.\n", info.Width);
ok(info.Height == 4, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -927,7 +928,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
ok(info.ImageFileFormat == D3DX11_IFF_DDS, "Unexpected image file format %#x.\n", info.ImageFileFormat);
hr = D3DX11GetImageInfoFromMemory(dds_cube_map, sizeof(dds_cube_map), NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 4, "Unexpected width %u.\n", info.Width);
ok(info.Height == 4, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -938,7 +939,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
ok(info.ImageFileFormat == D3DX11_IFF_DDS, "Unexpected image file format %#x.\n", info.ImageFileFormat);
hr = D3DX11GetImageInfoFromMemory(dds_cube_map, sizeof(dds_cube_map) - 1, NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 4, "Unexpected width %u.\n", info.Width);
ok(info.Height == 4, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -949,7 +950,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
ok(info.ImageFileFormat == D3DX11_IFF_DDS, "Unexpected image file format %#x.\n", info.ImageFileFormat);
hr = D3DX11GetImageInfoFromMemory(dds_volume_map, sizeof(dds_volume_map), NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 4, "Unexpected width %u.\n", info.Width);
ok(info.Height == 4, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 2, "Unexpected depth %u.\n", info.Depth);
@@ -960,7 +961,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
ok(info.ImageFileFormat == D3DX11_IFF_DDS, "Unexpected image file format %#x.\n", info.ImageFileFormat);
hr = D3DX11GetImageInfoFromMemory(dds_volume_map, sizeof(dds_volume_map) - 1, NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 4, "Unexpected width %u.\n", info.Width);
ok(info.Height == 4, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 2, "Unexpected depth %u.\n", info.Depth);
--
2.30.2
1
0
[PATCH v3 2/2] user32: DefWindowProc(WM_NCCALCSIZE) should return 0.
by Dmitry Timoshkov Feb. 3, 2022
by Dmitry Timoshkov Feb. 3, 2022
Feb. 3, 2022
v3: As suggested by Alexandre changed NC_HandleNCCalcSize to not return a value.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=37609
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/user32/controls.h | 2 +-
dlls/user32/defwnd.c | 3 ++-
dlls/user32/nonclient.c | 9 ++-------
dlls/user32/tests/win.c | 6 ------
4 files changed, 5 insertions(+), 15 deletions(-)
diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h
index ce14d13171f..52584748768 100644
--- a/dlls/user32/controls.h
+++ b/dlls/user32/controls.h
@@ -168,7 +168,7 @@ extern void MENU_EndMenu(HWND) DECLSPEC_HIDDEN;
/* nonclient area */
extern LRESULT NC_HandleNCPaint( HWND hwnd , HRGN clip) DECLSPEC_HIDDEN;
extern LRESULT NC_HandleNCActivate( HWND hwnd, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN;
-extern LRESULT NC_HandleNCCalcSize( HWND hwnd, WPARAM wParam, RECT *winRect ) DECLSPEC_HIDDEN;
+extern void NC_HandleNCCalcSize( HWND hwnd, WPARAM wParam, RECT *winRect ) DECLSPEC_HIDDEN;
extern LRESULT NC_HandleNCHitTest( HWND hwnd, POINT pt ) DECLSPEC_HIDDEN;
extern LRESULT NC_HandleNCLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN;
extern LRESULT NC_HandleNCMouseMove( HWND hwnd, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN;
diff --git a/dlls/user32/defwnd.c b/dlls/user32/defwnd.c
index abb73e73ca8..a8978c2d847 100644
--- a/dlls/user32/defwnd.c
+++ b/dlls/user32/defwnd.c
@@ -260,7 +260,8 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
}
case WM_NCCALCSIZE:
- return NC_HandleNCCalcSize( hwnd, wParam, (RECT *)lParam );
+ NC_HandleNCCalcSize( hwnd, wParam, (RECT *)lParam );
+ break;
case WM_WINDOWPOSCHANGING:
return WINPOS_HandleWindowPosChanging( hwnd, (WINDOWPOS *)lParam );
diff --git a/dlls/user32/nonclient.c b/dlls/user32/nonclient.c
index 639cca707fb..f944ed568a4 100644
--- a/dlls/user32/nonclient.c
+++ b/dlls/user32/nonclient.c
@@ -346,19 +346,15 @@ BOOL WINAPI DECLSPEC_HOTPATCH AdjustWindowRectExForDpi( LPRECT rect, DWORD style
*
* Handle a WM_NCCALCSIZE message. Called from DefWindowProc().
*/
-LRESULT NC_HandleNCCalcSize( HWND hwnd, WPARAM wparam, RECT *winRect )
+void NC_HandleNCCalcSize( HWND hwnd, WPARAM wparam, RECT *winRect )
{
RECT tmpRect = { 0, 0, 0, 0 };
- LRESULT result = 0;
LONG cls_style = GetClassLongW(hwnd, GCL_STYLE);
LONG style = GetWindowLongW( hwnd, GWL_STYLE );
LONG exStyle = GetWindowLongW( hwnd, GWL_EXSTYLE );
if (winRect == NULL)
- return 0;
-
- if (cls_style & CS_VREDRAW) result |= WVR_VREDRAW;
- if (cls_style & CS_HREDRAW) result |= WVR_HREDRAW;
+ return;
if (!(style & WS_MINIMIZE))
{
@@ -413,7 +409,6 @@ LRESULT NC_HandleNCCalcSize( HWND hwnd, WPARAM wparam, RECT *winRect )
winRect->right = winRect->left;
winRect->bottom = winRect->top;
}
- return result;
}
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index 4aeb3816db2..847093710a5 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -1236,7 +1236,6 @@ static void test_nonclient_area(HWND hwnd)
rc = rc_window;
ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc);
-todo_wine_if(ret != 0)
ok(!ret, "got %08lx\n", ret);
MapWindowPoints(0, hwnd, (LPPOINT)&rc, 2);
ok(EqualRect(&rc, &rc_client),
@@ -1255,7 +1254,6 @@ todo_wine_if(ret != 0)
rc = rc_window;
ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc);
-todo_wine_if(ret != 0)
ok(!ret, "got %08lx\n", ret);
MapWindowPoints(0, hwnd, (LPPOINT)&rc, 2);
ok(EqualRect(&rc, &rc_client),
@@ -12673,25 +12671,21 @@ static void test_WM_NCCALCSIZE(void)
params.lppos = &winpos;
ret = SendMessageW(hwnd, WM_NCCALCSIZE, TRUE, (LPARAM)¶ms);
-todo_wine
ok(!ret, "got %08lx\n", ret);
ok(EqualRect(¶ms.rgrc[0], &client_rect), "got %s\n", wine_dbgstr_rect(¶ms.rgrc[0]));
params.rgrc[0] = window_rect;
ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, TRUE, (LPARAM)¶ms);
-todo_wine
ok(!ret, "got %08lx\n", ret);
ok(EqualRect(¶ms.rgrc[0], &client_rect), "got %s\n", wine_dbgstr_rect(¶ms.rgrc[0]));
GetWindowRect(hwnd, &window_rect);
ret = SendMessageW(hwnd, WM_NCCALCSIZE, FALSE, (LPARAM)&window_rect);
-todo_wine
ok(!ret, "got %08lx\n", ret);
ok(EqualRect(&window_rect, &client_rect), "got %s\n", wine_dbgstr_rect(&window_rect));
GetWindowRect(hwnd, &window_rect);
ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, FALSE, (LPARAM)&window_rect);
-todo_wine
ok(!ret, "got %08lx\n", ret);
ok(EqualRect(&window_rect, &client_rect), "got %s\n", wine_dbgstr_rect(&window_rect));
--
2.34.1
2
2
This simplifies getting a connection to the TestAgent server with
elevated privileges.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
testbot/bin/LibvirtTool.pl | 60 ++++++++++++++++++++------------------
1 file changed, 32 insertions(+), 28 deletions(-)
diff --git a/testbot/bin/LibvirtTool.pl b/testbot/bin/LibvirtTool.pl
index b186e19c39..51ed8e73e8 100755
--- a/testbot/bin/LibvirtTool.pl
+++ b/testbot/bin/LibvirtTool.pl
@@ -257,6 +257,28 @@ sub ChangeStatus($$;$)
return 0;
}
+=pod
+=over 12
+
+=item C<GetPrivilegedTA()>
+
+Returns a connection to a TestAgent server with elevated privileges.
+
+If the server running on the regular port does not have elevated privileges
+this assumes that the one on the alternate port will. It is up to the caller
+to report an error if that's not the case.
+
+=back
+=cut
+
+sub GetPrivilegedTA($)
+{
+ my ($TA) = @_;
+
+ # Use SetTime() to detect if privileged operations are allowed.
+ return $TA->SetTime() ? $TA : $VM->GetAgent(1);
+}
+
sub ShutDown()
{
my $Domain = $VM->GetDomain();
@@ -270,30 +292,15 @@ sub ShutDown()
Debug(Elapsed($Start), " Performing a clean shutdown of $VMKey $CurrentSnapshot\n");
LogMsg "Performing a clean shutdown of $VMKey $CurrentSnapshot\n";
- # Use SetTime() to detect if privileged operations are allowed.
- my $TA = $VM->GetAgent();
- if (!$TA->SetTime())
- {
- # Not a fatal error. Try the next port in case the VM runs a privileged
- # TestAgentd daemon there.
- $TA->Disconnect();
- $TA = $VM->GetAgent(1);
- if (!$TA->SetTime())
- {
- Error "Unable to get a privileged TestAgent: ". $TA->GetLastError() ."\n";
- $TA->Disconnect();
- return 0;
- }
- }
-
my $Success = 1;
my $Cmd = $VM->Type =~ /^win(?:32|64)$/ ?
["shutdown.exe", "/p", "/d", "00:00"] :
["/sbin/shutdown", "--poweroff", "now"];
Debug(Elapsed($Start), " Running @$Cmd\n");
- if (!$TA->Run($Cmd, 0))
+ my $PTA = GetPrivilegedTA($VM->GetAgent());
+ if (!$PTA->Run($Cmd, 0))
{
- Error "Could not run @$Cmd: ". $TA->GetLastError() ."\n";
+ Error "Could not run @$Cmd: ". $PTA->GetLastError() ."\n";
$Success = 0;
}
else
@@ -311,7 +318,8 @@ sub ShutDown()
sleep(1);
}
}
- $TA->Disconnect();
+ $PTA->Disconnect();
+
Debug(Elapsed($Start), " Successfully shut down $VMKey\n");
LogMsg "Successfully shut down $VMKey\n";
return $Success;
@@ -496,16 +504,11 @@ sub SetupTestAgentd($$$$)
# This is needed not only for the tests (date is important when checking
# HTTPS certificates), but also for the build (if the time moves forward
# during the build some ccache versions will return a compilation error).
- if (!$TA->SetTime())
+ my $PTA = GetPrivilegedTA($TA);
+ FatalError("Cannot set the VM system time\n") if (!$PTA);
+ if (!$PTA->SetTime())
{
- # Not a fatal error. Try the next port in case the VM runs a privileged
- # TestAgentd daemon there.
- my $PrivilegedTA = $VM->GetAgent(1);
- if (!$PrivilegedTA->SetTime())
- {
- FatalError("Unable to set the VM system time: ". $PrivilegedTA->GetLastError() ."\n");
- }
- $PrivilegedTA->Disconnect();
+ FatalError("Setting the VM system time failed: ". $PTA->GetLastError() ."\n");
}
if ($Booting and $VM->Type eq "wine")
@@ -543,6 +546,7 @@ sub SetupTestAgentd($$$$)
FatalError("The VM has been rebooted too many times: start.count=$Count > 1");
}
}
+ $PTA->Disconnect();
$TA->Disconnect();
}
--
2.30.2
1
0
Feb. 3, 2022
The special 'mx-MX' locale sets all locale settings to different values
in order to detect when the Wine tests use the wrong locale API.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
testbot/bin/SetWinLocale | 40 +++++++++++++++++++++++++++++-----------
1 file changed, 29 insertions(+), 11 deletions(-)
diff --git a/testbot/bin/SetWinLocale b/testbot/bin/SetWinLocale
index 0d4c305ceb..df0d6f7031 100755
--- a/testbot/bin/SetWinLocale
+++ b/testbot/bin/SetWinLocale
@@ -416,7 +416,7 @@ while (@ARGV)
}
# Check and untaint parameters
-my $CountryId;
+my ($Keyboard, $CountryId);
if (!defined $Usage)
{
if (!defined $OptHostName)
@@ -437,11 +437,31 @@ if (!defined $Usage)
$OptLocale ||= $OptDefault;
$OptSystem ||= $OptDefault;
$OptMUI ||= $OptDefault;
-
+ $Keyboard = $OptKeyboard || $OptDefault;
if (!$OptCountry and ($OptDefault || "") =~ /-([A-Z]{2})$/)
{
$OptCountry = $1;
}
+
+ # The "mixed" locale is used to make sure the tests each use the right
+ # locale API. To do so set each locale setting to a different value, each
+ # producing different results (e.g. different date format, decimal separator,
+ # etc).
+ my $MXStr = "";
+ sub SetMX($$$)
+ {
+ my ($Value, $Option, $MXValue) = @_;
+ return $Value if (!$Value or $Value !~ /^(?:mx-|MX$)/);
+ $MXStr .= " $Option $MXValue";
+ return $MXValue;
+ }
+ $OptLocale = SetMX($OptLocale, "--locale", "fr-FR");
+ $OptCountry = SetMX($OptCountry, "--country", "TO");
+ $OptSystem = SetMX($OptSystem, "--system", "ja-JP");
+ $OptMUI = SetMX($OptMUI, "--mui", "ko-KR");
+ $Keyboard = SetMX($Keyboard, "--keyboard", "es-ES");
+ Info("using$MXStr\n") if ($MXStr);
+
if ($OptCountry)
{
$CountryId = $Countries{$OptCountry};
@@ -453,8 +473,7 @@ if (!defined $Usage)
}
if (!$OptLocale and !$OptCountry and !$OptSystem and !$OptUTF8 and
- !$OptMUI and !$OptKeyboard and !defined $OptSysCopy and
- !defined $OptDefCopy)
+ !$OptMUI and !$Keyboard and !defined $OptSysCopy and !defined $OptDefCopy)
{
if (!$OptShow)
{
@@ -468,7 +487,7 @@ if (!defined $Usage)
}
}
if ($OptShow and ($OptLocale or $OptCountry or $OptSystem or $OptUTF8 or
- $OptMUI or $OptKeyboard or defined $OptSysCopy or
+ $OptMUI or $Keyboard or defined $OptSysCopy or
defined $OptDefCopy or defined $OptUseIntl or
defined $OptReboot))
{
@@ -822,8 +841,8 @@ sub GetKeyboardIds($)
my $LCIDLocale = GetLCID($OptLocale);
my $LCIDSystem = GetLCID($OptSystem);
-my $KeyboardIds = GetKeyboardIds($OptKeyboard || $OptDefault);
-if (!$KeyboardIds and ($OptKeyboard or $OptDefault))
+my $KeyboardIds = GetKeyboardIds($Keyboard);
+if (!$KeyboardIds and $Keyboard)
{
if ($OptKeyboard)
{
@@ -832,9 +851,8 @@ if (!$KeyboardIds and ($OptKeyboard or $OptDefault))
# intl.cpl automatically pick the appropriate keyboard but, unlike
# for Windows' initial installation, it does not make it the
# default since the system has a keyboard already.
- Warning("no known keyboard for the $OptDefault locale. Letting intl.cpl use its default.\n");
+ Warning("no known keyboard for the $Keyboard locale. Letting intl.cpl use its default.\n");
}
-$OptKeyboard ||= $OptDefault;
#
@@ -1001,7 +1019,7 @@ if ($OptMUI)
}
if ($KeyboardIds)
{
- CheckSetting($Settings, "InputMethod", $KeyboardIds->[0], "for --keyboard $OptKeyboard", 1);
+ CheckSetting($Settings, "InputMethod", $KeyboardIds->[0], "for --keyboard $Keyboard", 1);
}
if ($OptSysCopy)
@@ -1022,7 +1040,7 @@ if ($OptSysCopy)
}
if ($KeyboardIds)
{
- CheckSetting($Settings, "DefInputMethod", $KeyboardIds->[0], "for --keyboard $OptKeyboard", 1);
+ CheckSetting($Settings, "DefInputMethod", $KeyboardIds->[0], "for --keyboard $Keyboard", 1);
}
}
if (!$OptReboot and ($OptSystem or $OptMUI))
--
2.30.2
1
0
Feb. 3, 2022
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/user32/tests/win.c | 164 +++++++++++++++++++++++++++++++++++++---
1 file changed, 154 insertions(+), 10 deletions(-)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index 5ce7eb02f1c..4aeb3816db2 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -764,6 +764,7 @@ static LRESULT WINAPI main_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPAR
}
case WM_WINDOWPOSCHANGED:
{
+ LRESULT ret;
RECT rc1, rc2;
WINDOWPOS *winpos = (WINDOWPOS *)lparam;
ok(winpos->x >= -32768 && winpos->x <= 32767, "bad winpos->x %d\n", winpos->x);
@@ -784,7 +785,8 @@ static LRESULT WINAPI main_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPAR
wine_dbgstr_rect(&rc2));
GetClientRect(hwnd, &rc2);
- DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc1);
+ ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc1);
+ ok(!ret, "got %08lx\n", ret);
MapWindowPoints(0, hwnd, (LPPOINT)&rc1, 2);
ok(EqualRect(&rc1, &rc2), "rects do not match %s / %s\n", wine_dbgstr_rect(&rc1),
wine_dbgstr_rect(&rc2));
@@ -837,6 +839,13 @@ static LRESULT WINAPI main_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPAR
break;
case WM_MOUSEACTIVATE:
return MA_ACTIVATE;
+
+ case WM_NCCALCSIZE:
+ {
+ LRESULT ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, wparam, lparam);
+ ok(!ret, "got %08lx (%08lx %08lx)\n", ret, wparam, lparam);
+ return ret;
+ }
}
return DefWindowProcA(hwnd, msg, wparam, lparam);
@@ -867,6 +876,13 @@ static LRESULT WINAPI main_window_procW(HWND hwnd, UINT msg, WPARAM wparam, LPAR
return 0;
}
break;
+
+ case WM_NCCALCSIZE:
+ {
+ LRESULT ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, wparam, lparam);
+ ok(!ret, "got %08lx (%08lx %08lx)\n", ret, wparam, lparam);
+ return ret;
+ }
}
return DefWindowProcA(hwnd, msg, wparam, lparam);
@@ -892,6 +908,13 @@ static LRESULT WINAPI tool_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPAR
ok(!got_getminmaxinfo, "tool: WM_GETMINMAXINFO should NOT have been received before WM_NCCREATE\n");
break;
}
+
+ case WM_NCCALCSIZE:
+ {
+ LRESULT ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, wparam, lparam);
+ ok(!ret, "got %08lx (%08lx %08lx)\n", ret, wparam, lparam);
+ return ret;
+ }
}
return DefWindowProcA(hwnd, msg, wparam, lparam);
@@ -1156,6 +1179,14 @@ static LRESULT CALLBACK test_standard_scrollbar_proc(HWND hwnd, UINT msg, WPARAM
DeleteObject(region);
return 0;
}
+
+ case WM_NCCALCSIZE:
+ {
+ LRESULT ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, wp, lp);
+ ok(!ret, "got %08lx (%08lx %08lx)\n", ret, wp, lp);
+ return ret;
+ }
+
default:
return DefWindowProcA(hwnd, msg, wp, lp);
}
@@ -1204,7 +1235,9 @@ static void test_nonclient_area(HWND hwnd)
rc = rc_window;
- DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc);
+ ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc);
+todo_wine_if(ret != 0)
+ ok(!ret, "got %08lx\n", ret);
MapWindowPoints(0, hwnd, (LPPOINT)&rc, 2);
ok(EqualRect(&rc, &rc_client),
"client rect does not match: style:exstyle=0x%08x:0x%08x, menu=%d client=%s, calc=%s\n",
@@ -1221,7 +1254,9 @@ static void test_nonclient_area(HWND hwnd)
FixedAdjustWindowRectEx(&rc_window, style, menu, exstyle);
rc = rc_window;
- DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc);
+ ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc);
+todo_wine_if(ret != 0)
+ ok(!ret, "got %08lx\n", ret);
MapWindowPoints(0, hwnd, (LPPOINT)&rc, 2);
ok(EqualRect(&rc, &rc_client),
"synthetic rect does not match: style:exstyle=0x%08x:0x%08x, menu=%d, client=%s, calc=%s\n",
@@ -2114,6 +2149,7 @@ static LRESULT WINAPI mdi_child_wnd_proc_2(HWND hwnd, UINT msg, WPARAM wparam, L
case WM_WINDOWPOSCHANGED:
{
+ LRESULT ret;
WINDOWPOS *winpos = (WINDOWPOS *)lparam;
RECT rc1, rc2;
@@ -2125,7 +2161,8 @@ static LRESULT WINAPI mdi_child_wnd_proc_2(HWND hwnd, UINT msg, WPARAM wparam, L
wine_dbgstr_rect(&rc1), wine_dbgstr_rect(&rc2));
GetWindowRect(hwnd, &rc1);
GetClientRect(hwnd, &rc2);
- DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc1);
+ ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc1);
+ ok(!ret, "got %08lx\n", ret);
MapWindowPoints(0, hwnd, (LPPOINT)&rc1, 2);
ok(EqualRect(&rc1, &rc2), "rects do not match, window=%s client=%s\n",
wine_dbgstr_rect(&rc1), wine_dbgstr_rect(&rc2));
@@ -2151,7 +2188,15 @@ static LRESULT WINAPI mdi_child_wnd_proc_2(HWND hwnd, UINT msg, WPARAM wparam, L
return 1;
}
+
+ case WM_NCCALCSIZE:
+ {
+ LRESULT ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, wparam, lparam);
+ ok(!ret, "got %08lx (%08lx %08lx)\n", ret, wparam, lparam);
+ return ret;
+ }
}
+
return DefWindowProcA(hwnd, msg, wparam, lparam);
}
@@ -2207,6 +2252,13 @@ static LRESULT WINAPI mdi_main_wnd_procA(HWND hwnd, UINT msg, WPARAM wparam, LPA
return 1;
}
+ case WM_NCCALCSIZE:
+ {
+ LRESULT ret = DefFrameProcA(hwnd, mdi_client, WM_NCCALCSIZE, wparam, lparam);
+ ok(!ret, "got %08lx (%08lx %08lx)\n", ret, wparam, lparam);
+ return ret;
+ }
+
case WM_CLOSE:
PostQuitMessage(0);
break;
@@ -4418,11 +4470,13 @@ static void test_validatergn(HWND hwnd)
static void nccalchelper(HWND hwnd, INT x, INT y, RECT *prc)
{
+ LRESULT ret;
RECT rc;
MoveWindow( hwnd, 0, 0, x, y, 0);
GetWindowRect( hwnd, prc);
rc = *prc;
- DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)prc);
+ ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)prc);
+ ok(!ret, "got %08lx\n", ret);
if (winetest_debug > 1)
trace("window rect is %s, nccalc rect is %s\n", wine_dbgstr_rect(&rc), wine_dbgstr_rect(prc));
}
@@ -6314,11 +6368,14 @@ static LRESULT CALLBACK winsizes_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM
}
case WM_NCCALCSIZE:
{
+ LRESULT ret;
RECT rect, *r = (RECT *)lp;
GetWindowRect( hwnd, &rect );
ok( EqualRect( &rect, r ), "passed rect %s doesn't match window rect %s\n",
wine_dbgstr_rect( r ), wine_dbgstr_rect( &rect ));
- return DefWindowProcA(hwnd, msg, wp, lp);
+ ret = DefWindowProcA(hwnd, msg, wp, lp);
+ ok(!ret, "got %08lx\n", ret);
+ return ret;
}
default:
return DefWindowProcA(hwnd, msg, wp, lp);
@@ -7228,7 +7285,8 @@ static void test_ShowWindow(void)
/* test NC area */
GetWindowRect(hwnd, &rc);
SetRect(&rcNonClient, rc.left, rc.top, rc.left, rc.top);
- DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc);
+ ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc);
+ ok(!ret, "got %08lx\n", ret);
ok(EqualRect(&rc, &rcNonClient), "expected %s, got %s\n",
wine_dbgstr_rect(&rcNonClient), wine_dbgstr_rect(&rc));
@@ -7516,7 +7574,8 @@ static void test_ShowWindow_owned(HWND hwndMain)
/* test NC area */
GetWindowRect(hwnd, &rect);
SetRect(&nc, rect.left, rect.top, rect.left, rect.top);
- DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rect);
+ ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rect);
+ ok(!ret, "got %08lx\n", ret);
ok(EqualRect(&rect, &nc), "expected %s, got %s\n",
wine_dbgstr_rect(&nc), wine_dbgstr_rect(&rect));
@@ -7648,7 +7707,8 @@ static void test_ShowWindow_child(HWND hwndMain)
/* test NC area */
GetWindowRect(hwnd, &rect);
SetRect(&nc, rect.left, rect.top, rect.left, rect.top);
- DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rect);
+ ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rect);
+ ok(!ret, "got %08lx\n", ret);
ok(EqualRect(&rect, &nc), "expected %s, got %s\n",
wine_dbgstr_rect(&nc), wine_dbgstr_rect(&rect));
@@ -7776,7 +7836,8 @@ static void test_ShowWindow_mdichild(HWND hwndMain)
/* test NC area */
GetWindowRect(hwnd, &rect);
SetRect(&nc, rect.left, rect.top, rect.left, rect.top);
- DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rect);
+ ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rect);
+ ok(!ret, "got %08lx\n", ret);
ok(EqualRect(&rect, &nc), "expected %s, got %s\n",
wine_dbgstr_rect(&nc), wine_dbgstr_rect(&rect));
@@ -8810,6 +8871,12 @@ static LRESULT CALLBACK fullscreen_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPAR
ok(minmax->ptMaxSize.y >= mi.rcMonitor.bottom, "%d >= %d\n", minmax->ptMaxSize.y, mi.rcMonitor.bottom);
break;
}
+ case WM_NCCALCSIZE:
+ {
+ LRESULT ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, wp, lp);
+ ok(!ret, "got %08lx (%08lx %08lx)\n", ret, wp, lp);
+ return ret;
+ }
}
return DefWindowProcA(hwnd, msg, wp, lp);
}
@@ -9069,6 +9136,13 @@ static LRESULT WINAPI test_thick_child_size_winproc(HWND hwnd, UINT msg, WPARAM
break;
}
+
+ case WM_NCCALCSIZE:
+ {
+ LRESULT ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, wparam, lparam);
+ ok(!ret, "got %08lx (%08lx %08lx)\n", ret, wparam, lparam);
+ return ret;
+ }
}
return DefWindowProcA(hwnd, msg, wparam, lparam);
@@ -12555,6 +12629,75 @@ static void test_DragDetect(void)
ok(!(GetKeyState( VK_LBUTTON ) & 0x8000), "got VK_LBUTTON\n");
}
+static void test_WM_NCCALCSIZE(void)
+{
+ WNDCLASSA cls;
+ HWND hwnd;
+ NCCALCSIZE_PARAMS params;
+ WINDOWPOS winpos;
+ RECT client_rect, window_rect;
+ LRESULT ret;
+
+ cls.style = CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW;
+ cls.lpfnWndProc = DefWindowProcA;
+ cls.cbClsExtra = 0;
+ cls.cbWndExtra = 0;
+ cls.hInstance = GetModuleHandleA(0);
+ cls.hIcon = 0;
+ cls.hCursor = LoadCursorA(0, (LPCSTR)IDC_ARROW);
+ cls.hbrBackground = GetStockObject(WHITE_BRUSH);
+ cls.lpszMenuName = NULL;
+ cls.lpszClassName = "dummy_window_class";
+ ret = RegisterClassA(&cls);
+ ok(ret, "RegisterClass error %u\n", GetLastError());
+
+ hwnd = CreateWindowExA(0, "dummy_window_class", NULL,
+ WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP,
+ 100, 100, 200, 200, 0, 0, GetModuleHandleA(NULL), NULL);
+ ok(hwnd != 0, "CreateWindowEx error %u\n", GetLastError());
+
+ GetWindowRect(hwnd, &window_rect);
+ params.rgrc[0] = window_rect;
+ params.rgrc[1] = window_rect;
+ GetClientRect(hwnd, &client_rect);
+ MapWindowPoints(hwnd, 0, (POINT *)&client_rect, 2);
+ params.rgrc[2] = client_rect;
+
+ winpos.hwnd = hwnd;
+ winpos.hwndInsertAfter = HWND_TOP;
+ winpos.x = window_rect.left;
+ winpos.y = window_rect.top;
+ winpos.cx = window_rect.right - window_rect.left;
+ winpos.cy = window_rect.bottom - window_rect.top;
+ winpos.flags = SWP_NOMOVE;
+ params.lppos = &winpos;
+
+ ret = SendMessageW(hwnd, WM_NCCALCSIZE, TRUE, (LPARAM)¶ms);
+todo_wine
+ ok(!ret, "got %08lx\n", ret);
+ ok(EqualRect(¶ms.rgrc[0], &client_rect), "got %s\n", wine_dbgstr_rect(¶ms.rgrc[0]));
+
+ params.rgrc[0] = window_rect;
+ ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, TRUE, (LPARAM)¶ms);
+todo_wine
+ ok(!ret, "got %08lx\n", ret);
+ ok(EqualRect(¶ms.rgrc[0], &client_rect), "got %s\n", wine_dbgstr_rect(¶ms.rgrc[0]));
+
+ GetWindowRect(hwnd, &window_rect);
+ ret = SendMessageW(hwnd, WM_NCCALCSIZE, FALSE, (LPARAM)&window_rect);
+todo_wine
+ ok(!ret, "got %08lx\n", ret);
+ ok(EqualRect(&window_rect, &client_rect), "got %s\n", wine_dbgstr_rect(&window_rect));
+
+ GetWindowRect(hwnd, &window_rect);
+ ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, FALSE, (LPARAM)&window_rect);
+todo_wine
+ ok(!ret, "got %08lx\n", ret);
+ ok(EqualRect(&window_rect, &client_rect), "got %s\n", wine_dbgstr_rect(&window_rect));
+
+ DestroyWindow(hwnd);
+}
+
START_TEST(win)
{
char **argv;
@@ -12731,6 +12874,7 @@ START_TEST(win)
test_SC_SIZE();
test_cancel_mode();
test_DragDetect();
+ test_WM_NCCALCSIZE();
/* add the tests above this line */
if (hhook) UnhookWindowsHookEx(hhook);
--
2.34.1
2
2
Feb. 3, 2022
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/user32/tests/win.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index 847093710a5..0c308861a4b 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -7288,7 +7288,7 @@ static void test_ShowWindow(void)
ok(EqualRect(&rc, &rcNonClient), "expected %s, got %s\n",
wine_dbgstr_rect(&rcNonClient), wine_dbgstr_rect(&rc));
- ShowWindow(hwnd, SW_RESTORE);
+ ret = ShowWindow(hwnd, SW_RESTORE);
ok(ret, "not expected ret: %lu\n", ret);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(!(style & WS_DISABLED), "window should not be disabled\n");
@@ -7302,7 +7302,7 @@ static void test_ShowWindow(void)
ok(EqualRect(&rcClient, &rc), "expected %s, got %s\n",
wine_dbgstr_rect(&rcClient), wine_dbgstr_rect(&rc));
- ShowWindow(hwnd, SW_MAXIMIZE);
+ ret = ShowWindow(hwnd, SW_MAXIMIZE);
ok(ret, "not expected ret: %lu\n", ret);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(!(style & WS_DISABLED), "window should not be disabled\n");
@@ -7320,7 +7320,7 @@ static void test_ShowWindow(void)
ok(EqualRect(&rcResized, &rc), "expected %s, got %s\n",
wine_dbgstr_rect(&rcResized), wine_dbgstr_rect(&rc));
- ShowWindow(hwnd, SW_RESTORE);
+ ret = ShowWindow(hwnd, SW_RESTORE);
ok(ret, "not expected ret: %lu\n", ret);
style = GetWindowLongA(hwnd, GWL_STYLE);
ok(!(style & WS_DISABLED), "window should not be disabled\n");
--
2.34.1
1
0
Feb. 3, 2022
A+
---
Eric Pouech (9):
programs/conhost/tests: enable compilation with long types
programs/find/tests: enable compilation with long types
programs/fsutil/tests: enable compilation with long types
programs/regedit/tests: enable compilation with long types
programs/reg/tests: enable compilation with long types
programs/schtasks/tests: enable compilation with long types
programs/services/tests: enable compilation with long types
programs/wscript/tests: enable compilation with long types
programs/xcopy/tests: enable compilation with long types
programs/conhost/tests/Makefile.in | 1 -
programs/conhost/tests/tty.c | 128 ++---
programs/find/tests/Makefile.in | 1 -
programs/find/tests/find.c | 2 +-
programs/fsutil/tests/Makefile.in | 1 -
programs/fsutil/tests/fsutil.c | 6 +-
programs/reg/tests/Makefile.in | 1 -
programs/reg/tests/add.c | 302 +++++-----
programs/reg/tests/copy.c | 192 +++----
programs/reg/tests/delete.c | 114 ++--
programs/reg/tests/export.c | 98 ++--
programs/reg/tests/import.c | 816 ++++++++++++++--------------
programs/reg/tests/query.c | 94 ++--
programs/regedit/tests/Makefile.in | 1 -
programs/regedit/tests/regedit.c | 80 +--
programs/schtasks/tests/Makefile.in | 1 -
programs/schtasks/tests/schtasks.c | 42 +-
programs/services/tests/Makefile.in | 1 -
programs/services/tests/service.c | 150 ++---
programs/wscript/tests/Makefile.in | 1 -
programs/wscript/tests/run.c | 14 +-
programs/xcopy/tests/Makefile.in | 1 -
programs/xcopy/tests/xcopy.c | 14 +-
23 files changed, 1026 insertions(+), 1035 deletions(-)
2
11
Feb. 3, 2022
A wine installation should not be divided across multiple prefixes,
and one shouldn't mix components from multiple installations.
winegcc should therefore select a single viable get_inc_dir
(as was with get_lib_dir) and add (only) its
${includedir}/wine/msvcrt and ${includedir}/wine/windows,
not offer gcc multiple (potentially nonexistent or unrelated)
paths to search for wine headers
Signed-off-by: Kevin Puetz <PuetzKevinA(a)JohnDeere.com>
--
e.g. for a wine built with --prefix /opt/wine-6
it's potentially the case that /usr/include/wine/* may also exist
(perhaps from a distro package), but we don't really want
winegcc adding both -I/opt/wine-6/include/windows -I/usr/include/wine/windows
get_inc_dir is identical in all winegcc/widl/wrc tools, and thus seems
like a good candidate to move into tools.h. However, its interactions
with init_argv0_dir (includedir global variable, INCLUDDIR macro, etc)
made that not really work out.
---
tools/widl/widl.c | 39 ++++++++++++++++++++++------------
tools/winegcc/winegcc.c | 47 ++++++++++++++++++++++++-----------------
tools/wrc/wrc.c | 39 ++++++++++++++++++++++------------
3 files changed, 80 insertions(+), 45 deletions(-)
diff --git a/tools/widl/widl.c b/tools/widl/widl.c
index 7686594b7d3..8150d6158e4 100644
--- a/tools/widl/widl.c
+++ b/tools/widl/widl.c
@@ -256,6 +256,29 @@ static void add_widl_version_define(void)
wpp_add_cmdline_define(version_str);
}
+static const char *get_inc_dir(const char *sysroot)
+{
+ const char *stdincpath[] = { includedir, INCLUDEDIR, "/usr/include", "/usr/local/include" };
+ const char *root = sysroot ? sysroot : "";
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE(stdincpath); i++)
+ {
+ const char *root = (sysroot && i) ? sysroot : "";
+ char *path;
+ struct stat statbuf;
+
+ if (!stdincpath[i]) continue;
+ path = strmake( "%s%s/%s",root, stdincpath[i], "wine");
+ if (!stat(path,&statbuf) && S_ISDIR(statbuf.st_mode))
+ {
+ return strmake( "%s%s",root,stdincpath[i]);
+ }
+ }
+
+ return strmake( "%s%s", root, INCLUDEDIR );
+}
+
/* clean things up when aborting on a signal */
static void exit_on_signal( int sig )
{
@@ -733,19 +756,9 @@ int main(int argc,char *argv[])
if (stdinc)
{
- static const char *incl_dirs[] = { INCLUDEDIR, "/usr/include", "/usr/local/include" };
-
- if (includedir)
- {
- wpp_add_include_path( strmake( "%s/wine/msvcrt", includedir ));
- wpp_add_include_path( strmake( "%s/wine/windows", includedir ));
- }
- for (i = 0; i < ARRAY_SIZE(incl_dirs); i++)
- {
- if (i && !strcmp( incl_dirs[i], incl_dirs[0] )) continue;
- wpp_add_include_path( strmake( "%s%s/wine/msvcrt", sysroot, incl_dirs[i] ));
- wpp_add_include_path( strmake( "%s%s/wine/windows", sysroot, incl_dirs[i] ));
- }
+ const char *inc_dir = get_inc_dir(sysroot);
+ wpp_add_include_path( strmake( "%s/wine/msvcrt", inc_dir));
+ wpp_add_include_path( strmake( "%s/wine/windows", inc_dir));
}
if (pointer_size)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
index 8644afe7535..6e701a5c08b 100644
--- a/tools/winegcc/winegcc.c
+++ b/tools/winegcc/winegcc.c
@@ -647,6 +647,29 @@ static char *get_lib_dir( struct options *opts )
return strmake( "%s%s", root, LIBDIR );
}
+static const char *get_inc_dir(const char *sysroot)
+{
+ const char *stdincpath[] = { includedir, INCLUDEDIR, "/usr/include", "/usr/local/include" };
+ const char *root = sysroot ? sysroot : "";
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE(stdincpath); i++)
+ {
+ const char *root = (sysroot && i) ? sysroot : "";
+ char *path;
+ struct stat statbuf;
+
+ if (!stdincpath[i]) continue;
+ path = strmake( "%s%s/%s",root, stdincpath[i], "wine");
+ if (!stat(path,&statbuf) && S_ISDIR(statbuf.st_mode))
+ {
+ return strmake( "%s%s",root,stdincpath[i]);
+ }
+ }
+
+ return strmake( "%s%s", root, INCLUDEDIR );
+}
+
static void init_argv0_dir( const char *argv0 )
{
#ifndef _WIN32
@@ -813,32 +836,18 @@ no_compat_defines:
/* standard includes come last in the include search path */
if (!opts->wine_objdir && !opts->nostdinc)
{
- const char *incl_dirs[] = { INCLUDEDIR, "/usr/include", "/usr/local/include" };
- const char *root = opts->isysroot ? opts->isysroot : opts->sysroot ? opts->sysroot : "";
+ const char *inc_sysroot = opts->isysroot ? opts->isysroot : opts->sysroot;
+ const char *inc_dir = get_inc_dir(inc_sysroot);
const char *isystem = gcc_defs ? "-isystem" : "-I";
const char *idirafter = gcc_defs ? "-idirafter" : "-I";
if (opts->use_msvcrt)
{
- if (includedir) strarray_add( &comp_args, strmake( "%s%s/wine/msvcrt", isystem, includedir ));
- for (j = 0; j < ARRAY_SIZE(incl_dirs); j++)
- {
- if (j && !strcmp( incl_dirs[0], incl_dirs[j] )) continue;
- strarray_add(&comp_args, strmake( "%s%s%s/wine/msvcrt", isystem, root, incl_dirs[j] ));
- }
+ strarray_add(&comp_args, strmake( "%s%s/wine/msvcrt", isystem, inc_dir ));
strarray_add(&comp_args, "-D__MSVCRT__");
}
- if (includedir)
- {
- strarray_add( &comp_args, strmake( "%s%s/wine/windows", isystem, includedir ));
- strarray_add( &comp_args, strmake( "%s%s", idirafter, includedir ));
- }
- for (j = 0; j < ARRAY_SIZE(incl_dirs); j++)
- {
- if (j && !strcmp( incl_dirs[0], incl_dirs[j] )) continue;
- strarray_add(&comp_args, strmake( "%s%s%s/wine/windows", isystem, root, incl_dirs[j] ));
- strarray_add(&comp_args, strmake( "%s%s%s", idirafter, root, incl_dirs[j] ));
- }
+ strarray_add(&comp_args, strmake( "%s%s/wine/windows", isystem, inc_dir ));
+ strarray_add(&comp_args, strmake( "%s%s", idirafter, inc_dir));
}
else if (opts->wine_objdir)
strarray_add(&comp_args, strmake("-I%s/include", opts->wine_objdir) );
diff --git a/tools/wrc/wrc.c b/tools/wrc/wrc.c
index 41207120237..3b38629c71b 100644
--- a/tools/wrc/wrc.c
+++ b/tools/wrc/wrc.c
@@ -225,6 +225,29 @@ static void set_version_defines(void)
free( version );
}
+static const char *get_inc_dir(const char *sysroot)
+{
+ const char *stdincpath[] = { includedir, INCLUDEDIR, "/usr/include", "/usr/local/include" };
+ const char *root = sysroot ? sysroot : "";
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE(stdincpath); i++)
+ {
+ const char *root = (sysroot && i) ? sysroot : "";
+ char *path;
+ struct stat statbuf;
+
+ if (!stdincpath[i]) continue;
+ path = strmake( "%s%s/%s",root, stdincpath[i], "wine");
+ if (!stat(path,&statbuf) && S_ISDIR(statbuf.st_mode))
+ {
+ return strmake( "%s%s",root,stdincpath[i]);
+ }
+ }
+
+ return strmake( "%s%s", root, INCLUDEDIR );
+}
+
/* clean things up when aborting on a signal */
static void exit_on_signal( int sig )
{
@@ -453,19 +476,9 @@ int main(int argc,char *argv[])
/* If we do need to search standard includes, add them to the path */
if (stdinc)
{
- static const char *incl_dirs[] = { INCLUDEDIR, "/usr/include", "/usr/local/include" };
-
- if (includedir)
- {
- wpp_add_include_path( strmake( "%s/wine/msvcrt", includedir ));
- wpp_add_include_path( strmake( "%s/wine/windows", includedir ));
- }
- for (i = 0; i < ARRAY_SIZE(incl_dirs); i++)
- {
- if (i && !strcmp( incl_dirs[i], incl_dirs[0] )) continue;
- wpp_add_include_path( strmake( "%s%s/wine/msvcrt", sysroot, incl_dirs[i] ));
- wpp_add_include_path( strmake( "%s%s/wine/windows", sysroot, incl_dirs[i] ));
- }
+ const char *inc_dir = get_inc_dir(sysroot);
+ wpp_add_include_path( strmake( "%s/wine/msvcrt", inc_dir));
+ wpp_add_include_path( strmake( "%s/wine/windows", inc_dir));
}
/* Kill io buffering when some kind of debuglevel is enabled */
--
2.34.1
1
1
[PATCH 1/4] hnetcfg: Don't use _GetValue() if text element is missing in get_xml_elements().
by Paul Gofman Feb. 3, 2022
by Paul Gofman Feb. 3, 2022
Feb. 3, 2022
Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com>
---
dlls/hnetcfg/port.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/hnetcfg/port.c b/dlls/hnetcfg/port.c
index def77621764..611a652ce5e 100644
--- a/dlls/hnetcfg/port.c
+++ b/dlls/hnetcfg/port.c
@@ -265,7 +265,10 @@ static BOOL get_xml_elements( const char *desc_xml, struct xml_value_desc *value
if (node_type == XmlNodeType_EndElement) value = L"";
else goto done;
}
- if (FAILED(IXmlReader_GetValue( reader, &value, NULL ))) goto done;
+ else
+ {
+ if (FAILED(IXmlReader_GetValue( reader, &value, NULL ))) goto done;
+ }
if (values[i].value)
{
WARN( "Duplicate value %s.\n", debugstr_w(values[i].name) );
--
2.34.1
1
3
Feb. 3, 2022
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/wbemprox/Makefile.in | 1 -
dlls/wbemprox/builtin.c | 8 ++++----
dlls/wbemprox/class.c | 44 ++++++++++++++++++++++---------------------
dlls/wbemprox/process.c | 10 +++++-----
dlls/wbemprox/qualifier.c | 16 ++++++++--------
dlls/wbemprox/query.c | 4 ++--
dlls/wbemprox/reg.c | 2 +-
dlls/wbemprox/service.c | 2 +-
dlls/wbemprox/services.c | 34 +++++++++++++++++----------------
dlls/wbemprox/table.c | 4 ++--
dlls/wbemprox/wbemlocator.c | 2 +-
11 files changed, 63 insertions(+), 64 deletions(-)
diff --git a/dlls/wbemprox/Makefile.in b/dlls/wbemprox/Makefile.in
index 89c209ab183..48a43646491 100644
--- a/dlls/wbemprox/Makefile.in
+++ b/dlls/wbemprox/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = wbemprox.dll
IMPORTS = winspool version iphlpapi dxgi oleaut32 ole32 advapi32 user32 gdi32 ws2_32 rpcrt4 setupapi
diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c
index 050e9462a4c..2de3479a699 100644
--- a/dlls/wbemprox/builtin.c
+++ b/dlls/wbemprox/builtin.c
@@ -3167,7 +3167,7 @@ static enum fill_status fill_printer( struct table *table, const struct expr *co
offset += sizeof(*rec);
num_rows++;
}
- TRACE("created %u rows\n", num_rows);
+ TRACE("created %lu rows\n", num_rows);
table->num_rows = num_rows;
free( info );
@@ -3656,7 +3656,7 @@ static const WCHAR *get_service_type( DWORD type )
else if (type & SERVICE_FILE_SYSTEM_DRIVER) return L"File System Driver";
else if (type & SERVICE_WIN32_OWN_PROCESS) return L"Own Process";
else if (type & SERVICE_WIN32_SHARE_PROCESS) return L"Share Process";
- else ERR("unhandled type 0x%08x\n", type);
+ else ERR("unhandled type 0x%08lx\n", type);
return NULL;
}
static const WCHAR *get_service_state( DWORD state )
@@ -3668,7 +3668,7 @@ static const WCHAR *get_service_state( DWORD state )
case SERVICE_STOP_PENDING: return L"Stop Pending";
case SERVICE_RUNNING: return L"Running";
default:
- ERR("unknown state %u\n", state);
+ ERR("unknown state %lu\n", state);
return L"Unknown";
}
}
@@ -3682,7 +3682,7 @@ static const WCHAR *get_service_startmode( DWORD mode )
case SERVICE_DEMAND_START: return L"Manual";
case SERVICE_DISABLED: return L"Disabled";
default:
- ERR("unknown mode 0x%x\n", mode);
+ ERR("unknown mode 0x%lx\n", mode);
return L"Unknown";
}
}
diff --git a/dlls/wbemprox/class.c b/dlls/wbemprox/class.c
index 6f93c58a0df..7ca691164c6 100644
--- a/dlls/wbemprox/class.c
+++ b/dlls/wbemprox/class.c
@@ -119,7 +119,7 @@ static HRESULT WINAPI enum_class_object_Next(
HRESULT hr;
ULONG i, j;
- TRACE("%p, %d, %u, %p, %p\n", iface, lTimeout, uCount, apObjects, puReturned);
+ TRACE("%p, %ld, %lu, %p, %p\n", iface, lTimeout, uCount, apObjects, puReturned);
if (!apObjects || !puReturned) return WBEM_E_INVALID_PARAMETER;
if (lTimeout != WBEM_INFINITE && !once++) FIXME("timeout not supported\n");
@@ -148,7 +148,7 @@ static HRESULT WINAPI enum_class_object_NextAsync(
ULONG uCount,
IWbemObjectSink *pSink )
{
- FIXME("%p, %u, %p\n", iface, uCount, pSink);
+ FIXME("%p, %lu, %p\n", iface, uCount, pSink);
return E_NOTIMPL;
}
@@ -172,7 +172,7 @@ static HRESULT WINAPI enum_class_object_Skip(
struct view *view = ec->query->view;
static int once = 0;
- TRACE("%p, %d, %u\n", iface, lTimeout, nCount);
+ TRACE("%p, %ld, %lu\n", iface, lTimeout, nCount);
if (lTimeout != WBEM_INFINITE && !once++) FIXME("timeout not supported\n");
@@ -396,7 +396,7 @@ static HRESULT WINAPI class_object_Get(
struct class_object *co = impl_from_IWbemClassObject( iface );
struct enum_class_object *ec = impl_from_IEnumWbemClassObject( co->iter );
- TRACE("%p, %s, %08x, %p, %p, %p\n", iface, debugstr_w(wszName), lFlags, pVal, pType, plFlavor);
+ TRACE("%p, %s, %08lx, %p, %p, %p\n", iface, debugstr_w(wszName), lFlags, pVal, pType, plFlavor);
if (co->record)
{
@@ -437,7 +437,7 @@ static HRESULT record_set_value( struct record *record, UINT index, VARIANT *var
record->fields[index].u.ival = val;
return S_OK;
default:
- FIXME("unhandled type %u\n", type);
+ FIXME("unhandled type %lu\n", type);
break;
}
return WBEM_E_INVALID_PARAMETER;
@@ -453,7 +453,7 @@ static HRESULT WINAPI class_object_Put(
struct class_object *co = impl_from_IWbemClassObject( iface );
struct enum_class_object *ec = impl_from_IEnumWbemClassObject( co->iter );
- TRACE("%p, %s, %08x, %p, %u\n", iface, debugstr_w(wszName), lFlags, pVal, Type);
+ TRACE("%p, %s, %08lx, %p, %lu\n", iface, debugstr_w(wszName), lFlags, pVal, Type);
if (co->record)
{
@@ -487,7 +487,7 @@ static HRESULT WINAPI class_object_GetNames(
struct class_object *co = impl_from_IWbemClassObject( iface );
struct enum_class_object *ec = impl_from_IEnumWbemClassObject( co->iter );
- TRACE("%p, %s, %08x, %s, %p\n", iface, debugstr_w(wszQualifierName), lFlags,
+ TRACE("%p, %s, %08lx, %s, %p\n", iface, debugstr_w(wszQualifierName), lFlags,
debugstr_variant(pQualifierVal), pNames);
if (!pNames)
@@ -501,7 +501,7 @@ static HRESULT WINAPI class_object_GetNames(
lFlags != WBEM_FLAG_NONSYSTEM_ONLY &&
lFlags != WBEM_FLAG_SYSTEM_ONLY))
{
- FIXME("flags %08x not supported\n", lFlags);
+ FIXME("flags %08lx not supported\n", lFlags);
return E_NOTIMPL;
}
@@ -517,9 +517,9 @@ static HRESULT WINAPI class_object_BeginEnumeration(
{
struct class_object *co = impl_from_IWbemClassObject( iface );
- TRACE("%p, %08x\n", iface, lEnumFlags);
+ TRACE("%p, %08lx\n", iface, lEnumFlags);
- if (lEnumFlags) FIXME("flags 0x%08x not supported\n", lEnumFlags);
+ if (lEnumFlags) FIXME("flags 0x%08lx not supported\n", lEnumFlags);
co->index_property = 0;
return S_OK;
@@ -541,7 +541,7 @@ static HRESULT WINAPI class_object_Next(
HRESULT hr;
UINT i;
- TRACE("%p, %08x, %p, %p, %p, %p\n", iface, lFlags, strName, pVal, pType, plFlavor);
+ TRACE("%p, %08lx, %p, %p, %p, %p\n", iface, lFlags, strName, pVal, pType, plFlavor);
for (i = obj->index_property; i < table->num_cols; i++)
{
@@ -661,9 +661,9 @@ static HRESULT WINAPI class_object_GetObjectText(
struct view *view = ec->query->view;
BSTR text;
- TRACE("%p, %08x, %p\n", iface, lFlags, pstrObjectText);
+ TRACE("%p, %08lx, %p\n", iface, lFlags, pstrObjectText);
- if (lFlags) FIXME("flags %08x not implemented\n", lFlags);
+ if (lFlags) FIXME("flags %08lx not implemented\n", lFlags);
if (!(text = get_object_text( view, co->index ))) return E_OUTOFMEMORY;
*pstrObjectText = text;
@@ -675,7 +675,7 @@ static HRESULT WINAPI class_object_SpawnDerivedClass(
LONG lFlags,
IWbemClassObject **ppNewClass )
{
- FIXME("%p, %08x, %p\n", iface, lFlags, ppNewClass);
+ FIXME("%p, %08lx, %p\n", iface, lFlags, ppNewClass);
return E_NOTIMPL;
}
@@ -691,7 +691,7 @@ static HRESULT WINAPI class_object_SpawnInstance(
struct record *record;
HRESULT hr;
- TRACE("%p, %08x, %p\n", iface, lFlags, ppNewInstance);
+ TRACE("%p, %08lx, %p\n", iface, lFlags, ppNewInstance);
if (!(record = create_record( table ))) return E_OUTOFMEMORY;
if (FAILED(hr = IEnumWbemClassObject_Clone( co->iter, &iter )))
@@ -709,7 +709,7 @@ static HRESULT WINAPI class_object_CompareTo(
LONG lFlags,
IWbemClassObject *pCompareTo )
{
- FIXME("%p, %08x, %p\n", iface, lFlags, pCompareTo);
+ FIXME("%p, %08lx, %p\n", iface, lFlags, pCompareTo);
return E_NOTIMPL;
}
@@ -755,7 +755,7 @@ static void set_default_value( CIMTYPE type, UINT val, BYTE *ptr )
*(UINT32 *)ptr = val;
break;
default:
- FIXME("unhandled type %u\n", type);
+ FIXME("unhandled type %lu\n", type);
break;
}
}
@@ -892,7 +892,7 @@ static HRESULT WINAPI class_object_GetMethod(
unsigned int i;
HRESULT hr;
- TRACE("%p, %s, %08x, %p, %p\n", iface, debugstr_w(wszName), lFlags, ppInSignature, ppOutSignature);
+ TRACE("%p, %s, %08lx, %p, %p\n", iface, debugstr_w(wszName), lFlags, ppInSignature, ppOutSignature);
if (ppInSignature) *ppInSignature = NULL;
if (ppOutSignature) *ppOutSignature = NULL;
@@ -931,7 +931,7 @@ static HRESULT WINAPI class_object_PutMethod(
IWbemClassObject *pInSignature,
IWbemClassObject *pOutSignature )
{
- FIXME("%p, %s, %08x, %p, %p\n", iface, debugstr_w(wszName), lFlags, pInSignature, pOutSignature);
+ FIXME("%p, %s, %08lx, %p, %p\n", iface, debugstr_w(wszName), lFlags, pInSignature, pOutSignature);
return E_NOTIMPL;
}
@@ -949,9 +949,9 @@ static HRESULT WINAPI class_object_BeginMethodEnumeration(
{
struct class_object *co = impl_from_IWbemClassObject( iface );
- TRACE("%p, %08x\n", iface, lEnumFlags);
+ TRACE("%p, %08lx\n", iface, lEnumFlags);
- if (lEnumFlags) FIXME("flags 0x%08x not supported\n", lEnumFlags);
+ if (lEnumFlags) FIXME("flags 0x%08lx not supported\n", lEnumFlags);
co->index_method = 0;
return S_OK;
@@ -968,7 +968,7 @@ static HRESULT WINAPI class_object_NextMethod(
BSTR method;
HRESULT hr;
- TRACE("%p, %08x, %p, %p, %p\n", iface, lFlags, pstrName, ppInSignature, ppOutSignature);
+ TRACE("%p, %08lx, %p, %p, %p\n", iface, lFlags, pstrName, ppInSignature, ppOutSignature);
if (!(method = get_method_name( co->ns, co->name, co->index_method ))) return WBEM_S_NO_MORE_DATA;
diff --git a/dlls/wbemprox/process.c b/dlls/wbemprox/process.c
index 93136e9aefc..6f0901d1711 100644
--- a/dlls/wbemprox/process.c
+++ b/dlls/wbemprox/process.c
@@ -135,19 +135,19 @@ HRESULT process_create( IWbemClassObject *obj, IWbemContext *context, IWbemClass
if (FAILED(hr = IWbemClassObject_Get( in, L"CommandLine", 0, &command_line, &type, NULL ))
|| V_VT( &command_line ) != VT_BSTR)
- WARN( "Invalid CommandLine, hr %#x, type %u.\n", hr, V_VT( &command_line ));
+ WARN( "Invalid CommandLine, hr %#lx, type %u.\n", hr, V_VT( &command_line ));
else
TRACE( "CommandLine %s.\n", debugstr_w( V_BSTR( &command_line )));
if (FAILED(hr = IWbemClassObject_Get( in, L"CurrentDirectory", 0, ¤t_directory, &type, NULL ))
|| V_VT( ¤t_directory ) != VT_BSTR)
- WARN("Invalid CurrentDirectory, hr %#x, type %u.\n", hr, V_VT( ¤t_directory ));
+ WARN("Invalid CurrentDirectory, hr %#lx, type %u.\n", hr, V_VT( ¤t_directory ));
else
TRACE( "CurrentDirectory %s.\n", debugstr_w( V_BSTR( ¤t_directory )));
if (SUCCEEDED(IWbemClassObject_Get( in, L"ProcessStartupInformation", 0, &startup_info, &type, NULL ))
&& V_VT( &startup_info ) == VT_UNKNOWN && V_UNKNOWN( &startup_info ))
- FIXME( "ProcessStartupInformation is not implemented, vt_type %u, type %u, val %p.\n",
+ FIXME( "ProcessStartupInformation is not implemented, vt_type %u, type %lu, val %p.\n",
V_VT( &startup_info ), type, V_UNKNOWN( &startup_info ));
if (out && (hr = IWbemClassObject_SpawnInstance( sig, 0, &out_params )))
@@ -164,7 +164,7 @@ HRESULT process_create( IWbemClassObject *obj, IWbemContext *context, IWbemClass
bret = CreateProcessW( NULL, V_BSTR( &command_line ), NULL, NULL, FALSE, 0L,
V_VT( ¤t_directory ) == VT_BSTR ? V_BSTR( ¤t_directory ) : NULL,
NULL, &si, &pi );
- TRACE( "CreateProcessW ret %#x, GetLastError() %u.\n", bret, GetLastError() );
+ TRACE( "CreateProcessW ret %#x, GetLastError() %lu.\n", bret, GetLastError() );
if (bret)
{
CloseHandle( pi.hThread );
@@ -217,6 +217,6 @@ done:
VariantClear( &command_line );
VariantClear( ¤t_directory );
VariantClear( &startup_info );
- TRACE( "ret %#x.\n", ret );
+ TRACE( "ret %#lx.\n", ret );
return ret;
}
diff --git a/dlls/wbemprox/qualifier.c b/dlls/wbemprox/qualifier.c
index aa032388759..a71f6cd1a9e 100644
--- a/dlls/wbemprox/qualifier.c
+++ b/dlls/wbemprox/qualifier.c
@@ -159,7 +159,7 @@ static HRESULT get_qualifier_value( enum wbm_namespace ns, const WCHAR *class, c
hr = IWbemClassObject_Get( obj, L"BoolValue", 0, val, NULL, NULL );
break;
default:
- ERR("unhandled type %u\n", V_UI4( &var ));
+ ERR("unhandled type %lu\n", V_UI4( &var ));
break;
}
@@ -177,10 +177,10 @@ static HRESULT WINAPI qualifier_set_Get(
{
struct qualifier_set *set = impl_from_IWbemQualifierSet( iface );
- TRACE("%p, %s, %08x, %p, %p\n", iface, debugstr_w(wszName), lFlags, pVal, plFlavor);
+ TRACE("%p, %s, %08lx, %p, %p\n", iface, debugstr_w(wszName), lFlags, pVal, plFlavor);
if (lFlags)
{
- FIXME("flags %08x not supported\n", lFlags);
+ FIXME("flags %08lx not supported\n", lFlags);
return E_NOTIMPL;
}
return get_qualifier_value( set->ns, set->class, set->member, wszName, pVal, plFlavor );
@@ -192,7 +192,7 @@ static HRESULT WINAPI qualifier_set_Put(
VARIANT *pVal,
LONG lFlavor )
{
- FIXME("%p, %s, %p, %d\n", iface, debugstr_w(wszName), pVal, lFlavor);
+ FIXME("%p, %s, %p, %ld\n", iface, debugstr_w(wszName), pVal, lFlavor);
return E_NOTIMPL;
}
@@ -214,10 +214,10 @@ static HRESULT WINAPI qualifier_set_GetNames(
IWbemClassObject *obj;
HRESULT hr;
- TRACE("%p, %08x, %p\n", iface, lFlags, pNames);
+ TRACE("%p, %08lx, %p\n", iface, lFlags, pNames);
if (lFlags)
{
- FIXME("flags %08x not supported\n", lFlags);
+ FIXME("flags %08lx not supported\n", lFlags);
return E_NOTIMPL;
}
@@ -237,7 +237,7 @@ static HRESULT WINAPI qualifier_set_BeginEnumeration(
IWbemQualifierSet *iface,
LONG lFlags )
{
- FIXME("%p, %08x\n", iface, lFlags);
+ FIXME("%p, %08lx\n", iface, lFlags);
return E_NOTIMPL;
}
@@ -248,7 +248,7 @@ static HRESULT WINAPI qualifier_set_Next(
VARIANT *pVal,
LONG *plFlavor )
{
- FIXME("%p, %08x, %p, %p, %p\n", iface, lFlags, pstrName, pVal, plFlavor);
+ FIXME("%p, %08lx, %p, %p, %p\n", iface, lFlags, pstrName, pVal, plFlavor);
return E_NOTIMPL;
}
diff --git a/dlls/wbemprox/query.c b/dlls/wbemprox/query.c
index 56631cbca9e..dfda0b34ea2 100644
--- a/dlls/wbemprox/query.c
+++ b/dlls/wbemprox/query.c
@@ -300,7 +300,7 @@ static const WCHAR *format_int( WCHAR *buf, UINT len, CIMTYPE type, LONGLONG val
return buf;
default:
- ERR( "unhandled type %u\n", type );
+ ERR( "unhandled type %lu\n", type );
return NULL;
}
}
@@ -1047,7 +1047,7 @@ VARTYPE to_vartype( CIMTYPE type )
case CIM_REAL32: return VT_R4;
default:
- ERR("unhandled type %u\n", type);
+ ERR("unhandled type %lu\n", type);
break;
}
return 0;
diff --git a/dlls/wbemprox/reg.c b/dlls/wbemprox/reg.c
index eaa1db8bdde..51c11aaddfa 100644
--- a/dlls/wbemprox/reg.c
+++ b/dlls/wbemprox/reg.c
@@ -569,7 +569,7 @@ static void set_dwordvalue( HKEY root, const WCHAR *subkey, const WCHAR *name, D
HKEY hkey;
LONG res;
- TRACE("%p, %s, %s, %#x\n", root, debugstr_w(subkey), debugstr_w(name), value);
+ TRACE("%p, %s, %s, %#lx\n", root, debugstr_w(subkey), debugstr_w(name), value);
if ((res = RegOpenKeyExW( root, subkey, 0, KEY_SET_VALUE | reg_get_access_mask( context ), &hkey )))
{
diff --git a/dlls/wbemprox/service.c b/dlls/wbemprox/service.c
index b0b7bce0872..08dc104fd3d 100644
--- a/dlls/wbemprox/service.c
+++ b/dlls/wbemprox/service.c
@@ -45,7 +45,7 @@ static UINT map_error( DWORD error )
case ERROR_SERVICE_REQUEST_TIMEOUT: return 7;
case ERROR_SERVICE_ALREADY_RUNNING: return 10;
default:
- WARN("unknown error %u\n", error);
+ WARN("unknown error %lu\n", error);
break;
}
return 8;
diff --git a/dlls/wbemprox/services.c b/dlls/wbemprox/services.c
index 5184bf4a4fa..1fd24b878d1 100644
--- a/dlls/wbemprox/services.c
+++ b/dlls/wbemprox/services.c
@@ -122,7 +122,7 @@ static HRESULT WINAPI client_security_SetBlanket(
const OLECHAR *princname = (pServerPrincName == COLE_DEFAULT_PRINCIPAL) ?
L"<COLE_DEFAULT_PRINCIPAL>" : pServerPrincName;
- FIXME("%p, %p, %u, %u, %s, %u, %u, %p, 0x%08x\n", iface, pProxy, AuthnSvc, AuthzSvc,
+ FIXME("%p, %p, %lu, %lu, %s, %lu, %lu, %p, 0x%08lx\n", iface, pProxy, AuthnSvc, AuthzSvc,
debugstr_w(princname), AuthnLevel, ImpLevel, pAuthInfo, Capabilities);
return WBEM_NO_ERROR;
}
@@ -290,7 +290,7 @@ static HRESULT WINAPI wbem_services_OpenNamespace(
{
struct wbem_services *ws = impl_from_IWbemServices( iface );
- TRACE("%p, %s, 0x%08x, %p, %p, %p\n", iface, debugstr_w(strNamespace), lFlags,
+ TRACE("%p, %s, 0x%08lx, %p, %p, %p\n", iface, debugstr_w(strNamespace), lFlags,
pCtx, ppWorkingNamespace, ppResult);
if (ws->ns != WBEMPROX_NAMESPACE_LAST || !strNamespace)
@@ -502,10 +502,10 @@ static HRESULT WINAPI wbem_services_GetObject(
{
struct wbem_services *services = impl_from_IWbemServices( iface );
- TRACE("%p, %s, 0x%08x, %p, %p, %p\n", iface, debugstr_w(strObjectPath), lFlags,
+ TRACE("%p, %s, 0x%08lx, %p, %p, %p\n", iface, debugstr_w(strObjectPath), lFlags,
pCtx, ppObject, ppCallResult);
- if (lFlags) FIXME("unsupported flags 0x%08x\n", lFlags);
+ if (lFlags) FIXME("unsupported flags 0x%08lx\n", lFlags);
if (!strObjectPath || !strObjectPath[0])
return create_class_object( services->ns, NULL, NULL, 0, NULL, ppObject );
@@ -645,9 +645,9 @@ static HRESULT WINAPI wbem_services_CreateInstanceEnum(
struct path *path;
HRESULT hr;
- TRACE("%p, %s, 0%08x, %p, %p\n", iface, debugstr_w(strClass), lFlags, pCtx, ppEnum);
+ TRACE("%p, %s, 0%08lx, %p, %p\n", iface, debugstr_w(strClass), lFlags, pCtx, ppEnum);
- if (lFlags) FIXME("unsupported flags 0x%08x\n", lFlags);
+ if (lFlags) FIXME("unsupported flags 0x%08lx\n", lFlags);
hr = parse_path( strClass, &path );
if (hr != S_OK) return hr;
@@ -678,7 +678,7 @@ static HRESULT WINAPI wbem_services_ExecQuery(
{
struct wbem_services *services = impl_from_IWbemServices( iface );
- TRACE("%p, %s, %s, 0x%08x, %p, %p\n", iface, debugstr_w(strQueryLanguage),
+ TRACE("%p, %s, %s, 0x%08lx, %p, %p\n", iface, debugstr_w(strQueryLanguage),
debugstr_w(strQuery), lFlags, pCtx, ppEnum);
if (!strQueryLanguage || !strQuery || !strQuery[0]) return WBEM_E_INVALID_PARAMETER;
@@ -724,7 +724,7 @@ static HRESULT WINAPI wbem_services_ExecQueryAsync(
struct async_header *async;
struct async_query *query;
- TRACE("%p, %s, %s, 0x%08x, %p, %p\n", iface, debugstr_w(strQueryLanguage), debugstr_w(strQuery),
+ TRACE("%p, %s, %s, 0x%08lx, %p, %p\n", iface, debugstr_w(strQueryLanguage), debugstr_w(strQuery),
lFlags, pCtx, pResponseHandler);
if (!pResponseHandler) return WBEM_E_INVALID_PARAMETER;
@@ -794,7 +794,7 @@ static HRESULT WINAPI wbem_services_ExecNotificationQueryAsync(
struct async_header *async;
struct async_query *query;
- TRACE("%p, %s, %s, 0x%08x, %p, %p\n", iface, debugstr_w(strQueryLanguage), debugstr_w(strQuery),
+ TRACE("%p, %s, %s, 0x%08lx, %p, %p\n", iface, debugstr_w(strQueryLanguage), debugstr_w(strQuery),
lFlags, pCtx, pResponseHandler);
if (!pResponseHandler) return WBEM_E_INVALID_PARAMETER;
@@ -857,10 +857,10 @@ static HRESULT WINAPI wbem_services_ExecMethod(
struct table *table;
HRESULT hr;
- TRACE("%p, %s, %s, %08x, %p, %p, %p, %p\n", iface, debugstr_w(strObjectPath),
+ TRACE("%p, %s, %s, %08lx, %p, %p, %p, %p\n", iface, debugstr_w(strObjectPath),
debugstr_w(strMethodName), lFlags, context, pInParams, ppOutParams, ppCallResult);
- if (lFlags) FIXME("flags %08x not supported\n", lFlags);
+ if (lFlags) FIXME("flags %08lx not supported\n", lFlags);
if ((hr = parse_path( strObjectPath, &path )) != S_OK) return hr;
if (!(str = query_from_path( path )))
@@ -1084,7 +1084,7 @@ static HRESULT WINAPI wbem_context_GetNames(
LONG flags,
SAFEARRAY **names )
{
- FIXME("%p, %#x, %p\n", iface, flags, names);
+ FIXME("%p, %#lx, %p\n", iface, flags, names);
return E_NOTIMPL;
}
@@ -1093,7 +1093,7 @@ static HRESULT WINAPI wbem_context_BeginEnumeration(
IWbemContext *iface,
LONG flags )
{
- FIXME("%p, %#x\n", iface, flags);
+ FIXME("%p, %#lx\n", iface, flags);
return E_NOTIMPL;
}
@@ -1104,7 +1104,7 @@ static HRESULT WINAPI wbem_context_Next(
BSTR *name,
VARIANT *value )
{
- FIXME("%p, %#x, %p, %p\n", iface, flags, name, value);
+ FIXME("%p, %#lx, %p, %p\n", iface, flags, name, value);
return E_NOTIMPL;
}
@@ -1139,7 +1139,7 @@ static HRESULT WINAPI wbem_context_SetValue(
struct wbem_context_value *value;
HRESULT hr;
- TRACE("%p, %s, %#x, %s\n", iface, debugstr_w(name), flags, debugstr_variant(var));
+ TRACE("%p, %s, %#lx, %s\n", iface, debugstr_w(name), flags, debugstr_variant(var));
if (!name || !var)
return WBEM_E_INVALID_PARAMETER;
@@ -1179,7 +1179,7 @@ static HRESULT WINAPI wbem_context_GetValue(
struct wbem_context *context = impl_from_IWbemContext( iface );
struct wbem_context_value *value;
- TRACE("%p, %s, %#x, %p\n", iface, debugstr_w(name), flags, var);
+ TRACE("%p, %s, %#lx, %p\n", iface, debugstr_w(name), flags, var);
if (!name || !var)
return WBEM_E_INVALID_PARAMETER;
@@ -1196,7 +1196,7 @@ static HRESULT WINAPI wbem_context_DeleteValue(
LPCWSTR name,
LONG flags )
{
- FIXME("%p, %s, %#x\n", iface, debugstr_w(name), flags);
+ FIXME("%p, %s, %#lx\n", iface, debugstr_w(name), flags);
return E_NOTIMPL;
}
diff --git a/dlls/wbemprox/table.c b/dlls/wbemprox/table.c
index d08646a1c50..e0f908d7f0f 100644
--- a/dlls/wbemprox/table.c
+++ b/dlls/wbemprox/table.c
@@ -70,7 +70,7 @@ UINT get_type_size( CIMTYPE type )
case CIM_REAL32:
return sizeof(FLOAT);
default:
- ERR("unhandled type %u\n", type);
+ ERR("unhandled type %lu\n", type);
break;
}
return sizeof(LONGLONG);
@@ -250,7 +250,7 @@ HRESULT set_value( const struct table *table, UINT row, UINT column, LONGLONG va
*(UINT64 *)ptr = val;
break;
default:
- FIXME("unhandled column type %u\n", type);
+ FIXME("unhandled column type %lu\n", type);
return WBEM_E_FAILED;
}
return S_OK;
diff --git a/dlls/wbemprox/wbemlocator.c b/dlls/wbemprox/wbemlocator.c
index 58cb4a86991..6456407bba9 100644
--- a/dlls/wbemprox/wbemlocator.c
+++ b/dlls/wbemprox/wbemlocator.c
@@ -165,7 +165,7 @@ static HRESULT WINAPI wbem_locator_ConnectServer(
HRESULT hr;
WCHAR *server, *namespace;
- TRACE("%p, %s, %s, %s, %s, 0x%08x, %s, %p, %p)\n", iface, debugstr_w(NetworkResource), debugstr_w(User),
+ TRACE("%p, %s, %s, %s, %s, 0x%08lx, %s, %p, %p)\n", iface, debugstr_w(NetworkResource), debugstr_w(User),
debugstr_w(Password), debugstr_w(Locale), SecurityFlags, debugstr_w(Authority), context, ppNamespace);
hr = parse_resource( NetworkResource, &server, &namespace );
2
1
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/msxml3/Makefile.in | 1 -
dlls/msxml3/attribute.c | 8 +--
dlls/msxml3/bsc.c | 33 ++++++------
dlls/msxml3/cdata.c | 40 +++++++--------
dlls/msxml3/comment.c | 40 +++++++--------
dlls/msxml3/dispex.c | 54 ++++++++------------
dlls/msxml3/docfrag.c | 25 +++++----
dlls/msxml3/doctype.c | 25 +++++----
dlls/msxml3/domdoc.c | 42 +++++++--------
dlls/msxml3/domimpl.c | 23 ++++-----
dlls/msxml3/element.c | 29 +++++------
dlls/msxml3/entityref.c | 7 +--
dlls/msxml3/factory.c | 20 ++++----
dlls/msxml3/httprequest.c | 104 ++++++++++++++++----------------------
dlls/msxml3/main.c | 2 +-
dlls/msxml3/mxnamespace.c | 18 +++----
dlls/msxml3/mxwriter.c | 52 ++++++++-----------
dlls/msxml3/node.c | 30 ++++-------
dlls/msxml3/nodelist.c | 13 ++---
dlls/msxml3/nodemap.c | 17 ++++---
dlls/msxml3/parseerror.c | 7 +--
dlls/msxml3/pi.c | 8 +--
dlls/msxml3/saxreader.c | 34 +++++--------
dlls/msxml3/schema.c | 14 ++---
dlls/msxml3/selection.c | 20 ++++----
dlls/msxml3/stylesheet.c | 10 ++--
dlls/msxml3/text.c | 18 +++----
dlls/msxml3/xmldoc.c | 17 +++----
dlls/msxml3/xmlelem.c | 31 ++++--------
dlls/msxml3/xmlparser.c | 26 +++-------
dlls/msxml3/xmlview.c | 84 +++++++++++++-----------------
31 files changed, 373 insertions(+), 479 deletions(-)
diff --git a/dlls/msxml3/Makefile.in b/dlls/msxml3/Makefile.in
index 7e3eccc0139..2bf789732da 100644
--- a/dlls/msxml3/Makefile.in
+++ b/dlls/msxml3/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = msxml3.dll
IMPORTS = $(XSLT_PE_LIBS) $(XML2_PE_LIBS) uuid urlmon shlwapi oleaut32 ole32 user32 advapi32
EXTRAINCL = $(XSLT_PE_CFLAGS) $(XML2_PE_CFLAGS)
diff --git a/dlls/msxml3/attribute.c b/dlls/msxml3/attribute.c
index cbb70daa4a2..89a1f630021 100644
--- a/dlls/msxml3/attribute.c
+++ b/dlls/msxml3/attribute.c
@@ -95,9 +95,9 @@ static HRESULT WINAPI domattr_QueryInterface(
static ULONG WINAPI domattr_AddRef(
IXMLDOMAttribute *iface )
{
- domattr *This = impl_from_IXMLDOMAttribute( iface );
- ULONG ref = InterlockedIncrement( &This->ref );
- TRACE("(%p)->(%d)\n", This, ref);
+ domattr *attr = impl_from_IXMLDOMAttribute( iface );
+ ULONG ref = InterlockedIncrement( &attr->ref );
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
@@ -107,7 +107,7 @@ static ULONG WINAPI domattr_Release(
domattr *This = impl_from_IXMLDOMAttribute( iface );
ULONG ref = InterlockedDecrement( &This->ref );
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
if ( ref == 0 )
{
destroy_xmlnode(&This->node);
diff --git a/dlls/msxml3/bsc.c b/dlls/msxml3/bsc.c
index 3455fd675aa..5e3b60d92b5 100644
--- a/dlls/msxml3/bsc.c
+++ b/dlls/msxml3/bsc.c
@@ -76,10 +76,10 @@ static HRESULT WINAPI bsc_QueryInterface(
static ULONG WINAPI bsc_AddRef(
IBindStatusCallback *iface )
{
- bsc_t *This = impl_from_IBindStatusCallback(iface);
- LONG ref = InterlockedIncrement(&This->ref);
+ bsc_t *bsc = impl_from_IBindStatusCallback(iface);
+ LONG ref = InterlockedIncrement(&bsc->ref);
- TRACE("(%p) ref=%d\n", This, ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
return ref;
}
@@ -87,15 +87,18 @@ static ULONG WINAPI bsc_AddRef(
static ULONG WINAPI bsc_Release(
IBindStatusCallback *iface )
{
- bsc_t *This = impl_from_IBindStatusCallback(iface);
- LONG ref = InterlockedDecrement(&This->ref);
+ bsc_t *bsc = impl_from_IBindStatusCallback(iface);
+ LONG ref = InterlockedDecrement(&bsc->ref);
- TRACE("(%p) ref=%d\n", This, ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
- if(!ref) {
- if (This->binding) IBinding_Release(This->binding);
- if (This->memstream) IStream_Release(This->memstream);
- heap_free(This);
+ if (!ref)
+ {
+ if (bsc->binding)
+ IBinding_Release(bsc->binding);
+ if (bsc->memstream)
+ IStream_Release(bsc->memstream);
+ heap_free(bsc);
}
return ref;
@@ -109,7 +112,7 @@ static HRESULT WINAPI bsc_OnStartBinding(
bsc_t *This = impl_from_IBindStatusCallback(iface);
HRESULT hr;
- TRACE("(%p)->(%x %p)\n", This, dwReserved, pib);
+ TRACE("%p, %lx, %p.\n", iface, dwReserved, pib);
This->binding = pib;
IBinding_AddRef(pib);
@@ -153,7 +156,7 @@ static HRESULT WINAPI bsc_OnStopBinding(
bsc_t *This = impl_from_IBindStatusCallback(iface);
HRESULT hr = S_OK;
- TRACE("(%p)->(%08x %s)\n", This, hresult, debugstr_w(szError));
+ TRACE("%p, %#lx, %s.\n", iface, hresult, debugstr_w(szError));
if(This->binding) {
IBinding_Release(This->binding);
@@ -194,12 +197,12 @@ static HRESULT WINAPI bsc_OnDataAvailable(
FORMATETC* pformatetc,
STGMEDIUM* pstgmed)
{
- bsc_t *This = impl_from_IBindStatusCallback(iface);
+ bsc_t *bsc = impl_from_IBindStatusCallback(iface);
BYTE buf[4096];
DWORD read, written;
HRESULT hr;
- TRACE("(%p)->(%x %d %p %p)\n", This, grfBSCF, dwSize, pformatetc, pstgmed);
+ TRACE("%p, %lx, %lu, %p, %p.\n", iface, grfBSCF, dwSize, pformatetc, pstgmed);
do
{
@@ -207,7 +210,7 @@ static HRESULT WINAPI bsc_OnDataAvailable(
if(FAILED(hr))
break;
- hr = IStream_Write(This->memstream, buf, read, &written);
+ hr = IStream_Write(bsc->memstream, buf, read, &written);
} while(SUCCEEDED(hr) && written != 0 && read != 0);
return S_OK;
diff --git a/dlls/msxml3/cdata.c b/dlls/msxml3/cdata.c
index fa8856ece5f..9994a508c54 100644
--- a/dlls/msxml3/cdata.c
+++ b/dlls/msxml3/cdata.c
@@ -89,26 +89,25 @@ static HRESULT WINAPI domcdata_QueryInterface(
return S_OK;
}
-static ULONG WINAPI domcdata_AddRef(
- IXMLDOMCDATASection *iface )
+static ULONG WINAPI domcdata_AddRef(IXMLDOMCDATASection *iface)
{
- domcdata *This = impl_from_IXMLDOMCDATASection( iface );
- ULONG ref = InterlockedIncrement( &This->ref );
- TRACE("(%p)->(%d)\n", This, ref);
+ domcdata *cdata = impl_from_IXMLDOMCDATASection(iface);
+ ULONG ref = InterlockedIncrement(&cdata->ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
-static ULONG WINAPI domcdata_Release(
- IXMLDOMCDATASection *iface )
+static ULONG WINAPI domcdata_Release(IXMLDOMCDATASection *iface)
{
- domcdata *This = impl_from_IXMLDOMCDATASection( iface );
- ULONG ref = InterlockedDecrement( &This->ref );
+ domcdata *cdata = impl_from_IXMLDOMCDATASection(iface);
+ ULONG ref = InterlockedDecrement(&cdata->ref);
- TRACE("(%p)->(%d)\n", This, ref);
- if ( ref == 0 )
+ TRACE("%p, refcount %lu.\n", iface, ref);
+
+ if (!ref)
{
- destroy_xmlnode(&This->node);
- heap_free( This );
+ destroy_xmlnode(&cdata->node);
+ heap_free(cdata);
}
return ref;
@@ -577,11 +576,10 @@ static HRESULT WINAPI domcdata_substringData(
IXMLDOMCDATASection *iface,
LONG offset, LONG count, BSTR *p)
{
- domcdata *This = impl_from_IXMLDOMCDATASection( iface );
HRESULT hr;
BSTR data;
- TRACE("(%p)->(%d %d %p)\n", This, offset, count, p);
+ TRACE("%p, %ld, %ld, %p.\n", iface, offset, count, p);
if(!p)
return E_INVALIDARG;
@@ -651,12 +649,11 @@ static HRESULT WINAPI domcdata_insertData(
IXMLDOMCDATASection *iface,
LONG offset, BSTR p)
{
- domcdata *This = impl_from_IXMLDOMCDATASection( iface );
HRESULT hr;
BSTR data;
LONG p_len;
- TRACE("(%p)->(%d %s)\n", This, offset, debugstr_w(p));
+ TRACE("%p, %ld, %s.\n", iface, offset, debugstr_w(p));
/* If have a NULL or empty string, don't do anything. */
if((p_len = SysStringLen(p)) == 0)
@@ -699,12 +696,11 @@ static HRESULT WINAPI domcdata_deleteData(
IXMLDOMCDATASection *iface,
LONG offset, LONG count)
{
- domcdata *This = impl_from_IXMLDOMCDATASection( iface );
HRESULT hr;
LONG len = -1;
BSTR str;
- TRACE("(%p)->(%d %d)\n", This, offset, count);
+ TRACE("%p, %ld, %ld.\n", iface, offset, count);
hr = IXMLDOMCDATASection_get_length(iface, &len);
if(hr != S_OK) return hr;
@@ -747,10 +743,9 @@ static HRESULT WINAPI domcdata_replaceData(
IXMLDOMCDATASection *iface,
LONG offset, LONG count, BSTR p)
{
- domcdata *This = impl_from_IXMLDOMCDATASection( iface );
HRESULT hr;
- TRACE("(%p)->(%d %d %s)\n", This, offset, count, debugstr_w(p));
+ TRACE("%p, %ld, %ld, %s.\n", iface, offset, count, debugstr_w(p));
hr = IXMLDOMCDATASection_deleteData(iface, offset, count);
@@ -764,12 +759,11 @@ static HRESULT WINAPI domcdata_splitText(
IXMLDOMCDATASection *iface,
LONG offset, IXMLDOMText **txtNode)
{
- domcdata *This = impl_from_IXMLDOMCDATASection( iface );
IXMLDOMDocument *doc;
LONG length = 0;
HRESULT hr;
- TRACE("(%p)->(%d %p)\n", This, offset, txtNode);
+ TRACE("%p, %ld, %p.\n", iface, offset, txtNode);
if (!txtNode || offset < 0) return E_INVALIDARG;
diff --git a/dlls/msxml3/comment.c b/dlls/msxml3/comment.c
index 561cc570b03..3ac7ed604ea 100644
--- a/dlls/msxml3/comment.c
+++ b/dlls/msxml3/comment.c
@@ -89,26 +89,25 @@ static HRESULT WINAPI domcomment_QueryInterface(
return S_OK;
}
-static ULONG WINAPI domcomment_AddRef(
- IXMLDOMComment *iface )
+static ULONG WINAPI domcomment_AddRef(IXMLDOMComment *iface)
{
- domcomment *This = impl_from_IXMLDOMComment( iface );
- ULONG ref = InterlockedIncrement( &This->ref );
- TRACE("(%p)->(%d)\n", This, ref);
+ domcomment *comment = impl_from_IXMLDOMComment(iface);
+ ULONG ref = InterlockedIncrement(&comment->ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
-static ULONG WINAPI domcomment_Release(
- IXMLDOMComment *iface )
+static ULONG WINAPI domcomment_Release(IXMLDOMComment *iface)
{
- domcomment *This = impl_from_IXMLDOMComment( iface );
- ULONG ref = InterlockedDecrement( &This->ref );
+ domcomment *comment = impl_from_IXMLDOMComment(iface);
+ ULONG ref = InterlockedDecrement(&comment->ref);
- TRACE("(%p)->(%d)\n", This, ref);
- if ( ref == 0 )
+ TRACE("%p, refcount %lu.\n", iface, ref);
+
+ if (!ref)
{
- destroy_xmlnode(&This->node);
- heap_free( This );
+ destroy_xmlnode(&comment->node);
+ heap_free(comment);
}
return ref;
@@ -575,15 +574,12 @@ static HRESULT WINAPI domcomment_get_length(
return hr;
}
-static HRESULT WINAPI domcomment_substringData(
- IXMLDOMComment *iface,
- LONG offset, LONG count, BSTR *p)
+static HRESULT WINAPI domcomment_substringData(IXMLDOMComment *iface, LONG offset, LONG count, BSTR *p)
{
- domcomment *This = impl_from_IXMLDOMComment( iface );
HRESULT hr;
BSTR data;
- TRACE("(%p)->(%d %d %p)\n", This, offset, count, p);
+ TRACE("%p, %ld, %ld, %p.\n", iface, offset, count, p);
if(!p)
return E_INVALIDARG;
@@ -653,12 +649,11 @@ static HRESULT WINAPI domcomment_insertData(
IXMLDOMComment *iface,
LONG offset, BSTR p)
{
- domcomment *This = impl_from_IXMLDOMComment( iface );
HRESULT hr;
BSTR data;
LONG p_len;
- TRACE("(%p)->(%d %s)\n", This, offset, debugstr_w(p));
+ TRACE("%p, %ld, %s.\n", iface, offset, debugstr_w(p));
/* If have a NULL or empty string, don't do anything. */
if((p_len = SysStringLen(p)) == 0)
@@ -705,7 +700,7 @@ static HRESULT WINAPI domcomment_deleteData(
LONG len = -1;
BSTR str;
- TRACE("(%p)->(%d %d)\n", iface, offset, count);
+ TRACE("%p, %ld, %ld.\n", iface, offset, count);
hr = IXMLDOMComment_get_length(iface, &len);
if(hr != S_OK) return hr;
@@ -748,10 +743,9 @@ static HRESULT WINAPI domcomment_replaceData(
IXMLDOMComment *iface,
LONG offset, LONG count, BSTR p)
{
- domcomment *This = impl_from_IXMLDOMComment( iface );
HRESULT hr;
- TRACE("(%p)->(%d %d %s)\n", This, offset, count, debugstr_w(p));
+ TRACE("%p, %ld, %ld, %s.\n", iface, offset, count, debugstr_w(p));
hr = IXMLDOMComment_deleteData(iface, offset, count);
diff --git a/dlls/msxml3/dispex.c b/dlls/msxml3/dispex.c
index 7f57f080516..cd7c2820133 100644
--- a/dlls/msxml3/dispex.c
+++ b/dlls/msxml3/dispex.c
@@ -142,7 +142,7 @@ static HRESULT get_typelib(unsigned lib, ITypeLib **tl)
if(!typelib[lib]) {
hres = LoadRegTypeLib(lib_ids[lib].iid, lib_ids[lib].major, 0, LOCALE_SYSTEM_DEFAULT, tl);
if(FAILED(hres)) {
- ERR("LoadRegTypeLib failed: %08x\n", hres);
+ ERR("LoadRegTypeLib failed, hr %#lx.\n", hres);
return hres;
}
@@ -173,7 +173,7 @@ HRESULT get_typeinfo(enum tid_t tid, ITypeInfo **typeinfo)
return hres;
hres = ITypeLib_GetTypeInfoOfGuid(typelib, get_riid_from_tid(tid), &ti);
if(FAILED(hres)) {
- ERR("GetTypeInfoOfGuid failed: %08x\n", hres);
+ ERR("GetTypeInfoOfGuid failed, hr %#lx.\n", hres);
return hres;
}
}
@@ -259,7 +259,7 @@ static dispex_data_t *preprocess_dispex_data(DispatchEx *This)
hres = get_typeinfo(This->data->disp_tid, &dti);
if(FAILED(hres)) {
- ERR("Could not get disp type info: %08x\n", hres);
+ ERR("Could not get disp type info, hr %#lx.\n", hres);
return NULL;
}
@@ -363,26 +363,25 @@ static HRESULT WINAPI DispatchEx_GetTypeInfoCount(IDispatchEx *iface, UINT *pcti
static HRESULT WINAPI DispatchEx_GetTypeInfo(IDispatchEx *iface, UINT iTInfo,
LCID lcid, ITypeInfo **ppTInfo)
{
- DispatchEx *This = impl_from_IDispatchEx(iface);
+ DispatchEx *dispex = impl_from_IDispatchEx(iface);
- TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
+ TRACE("%p, %u, %lx, %p.\n", iface, iTInfo, lcid, ppTInfo);
- return get_typeinfo(This->data->disp_tid, ppTInfo);
+ return get_typeinfo(dispex->data->disp_tid, ppTInfo);
}
static HRESULT WINAPI DispatchEx_GetIDsOfNames(IDispatchEx *iface, REFIID riid,
LPOLESTR *rgszNames, UINT cNames,
LCID lcid, DISPID *rgDispId)
{
- DispatchEx *This = impl_from_IDispatchEx(iface);
UINT i;
HRESULT hres;
- TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
+ TRACE("%p, %s, %p, %u, %lx, %p.\n", iface, debugstr_guid(riid), rgszNames, cNames,
lcid, rgDispId);
for(i=0; i < cNames; i++) {
- hres = IDispatchEx_GetDispID(&This->IDispatchEx_iface, rgszNames[i], 0, rgDispId+i);
+ hres = IDispatchEx_GetDispID(iface, rgszNames[i], 0, rgDispId+i);
if(FAILED(hres))
return hres;
}
@@ -394,13 +393,10 @@ static HRESULT WINAPI DispatchEx_Invoke(IDispatchEx *iface, DISPID dispIdMember,
REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
- DispatchEx *This = impl_from_IDispatchEx(iface);
-
- TRACE("(%p)->(%x %s %x %x %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
+ TRACE("%p, %ld, %s, %lx, %x, %p, %p, %p, %p.\n", iface, dispIdMember, debugstr_guid(riid),
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
- return IDispatchEx_InvokeEx(&This->IDispatchEx_iface, dispIdMember, lcid, wFlags,
- pDispParams, pVarResult, pExcepInfo, NULL);
+ return IDispatchEx_InvokeEx(iface, dispIdMember, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, NULL);
}
static HRESULT WINAPI DispatchEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid)
@@ -409,10 +405,10 @@ static HRESULT WINAPI DispatchEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DW
dispex_data_t *data;
int min, max, n, c;
- TRACE("(%p)->(%s %x %p)\n", This, debugstr_w(bstrName), grfdex, pid);
+ TRACE("%p, %s, %lx, %p.\n", iface, debugstr_w(bstrName), grfdex, pid);
if(grfdex & ~(fdexNameCaseSensitive|fdexNameEnsure|fdexNameImplicit))
- FIXME("Unsupported grfdex %x\n", grfdex);
+ FIXME("Unsupported grfdex %lx.\n", grfdex);
data = get_dispex_data(This);
if(!data)
@@ -486,7 +482,7 @@ static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc
int min, max, n;
HRESULT hres;
- TRACE("(%p)->(%x %x %x %p %p %p %p)\n", This, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller);
+ TRACE("%p, %ld, %lx, %x, %p, %p, %p, %p.\n", iface, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller);
if(This->data->vtbl && This->data->vtbl->invoke) {
hres = This->data->vtbl->invoke(This->outer, id, lcid, wFlags, pdp, pvarRes, pei);
@@ -518,19 +514,19 @@ static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc
}
if(min > max) {
- WARN("invalid id %x\n", id);
+ WARN("invalid id %lx.\n", id);
return DISP_E_UNKNOWNNAME;
}
hres = get_typeinfo(data->funcs[n].tid, &ti);
if(FAILED(hres)) {
- ERR("Could not get type info: %08x\n", hres);
+ ERR("Could not get type info, hr %#lx.\n", hres);
return hres;
}
hres = IUnknown_QueryInterface(This->outer, get_riid_from_tid(data->funcs[n].tid), (void**)&unk);
if(FAILED(hres)) {
- ERR("Could not get iface: %08x\n", hres);
+ ERR("Could not get interface, hr %#lx.\n", hres);
ITypeInfo_Release(ti);
return E_FAIL;
}
@@ -546,43 +542,37 @@ static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc
static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex)
{
- DispatchEx *This = impl_from_IDispatchEx(iface);
- TRACE("Not implemented in native msxml3 (%p)->(%s %x)\n", This, debugstr_w(bstrName), grfdex);
+ TRACE("%p, %s, %lx.\n", iface, debugstr_w(bstrName), grfdex);
return E_NOTIMPL;
}
static HRESULT WINAPI DispatchEx_DeleteMemberByDispID(IDispatchEx *iface, DISPID id)
{
- DispatchEx *This = impl_from_IDispatchEx(iface);
- TRACE("Not implemented in native msxml3 (%p)->(%x)\n", This, id);
+ TRACE("%p, %ld.\n", iface, id);
return E_NOTIMPL;
}
static HRESULT WINAPI DispatchEx_GetMemberProperties(IDispatchEx *iface, DISPID id, DWORD grfdexFetch, DWORD *pgrfdex)
{
- DispatchEx *This = impl_from_IDispatchEx(iface);
- TRACE("Not implemented in native msxml3 (%p)->(%x %x %p)\n", This, id, grfdexFetch, pgrfdex);
+ TRACE("%p, %ld, %lx, %p.\n", iface, id, grfdexFetch, pgrfdex);
return E_NOTIMPL;
}
static HRESULT WINAPI DispatchEx_GetMemberName(IDispatchEx *iface, DISPID id, BSTR *pbstrName)
{
- DispatchEx *This = impl_from_IDispatchEx(iface);
- TRACE("Not implemented in native msxml3 (%p)->(%x %p)\n", This, id, pbstrName);
+ TRACE("%p, %ld, %p.\n", iface, id, pbstrName);
return E_NOTIMPL;
}
static HRESULT WINAPI DispatchEx_GetNextDispID(IDispatchEx *iface, DWORD grfdex, DISPID id, DISPID *pid)
{
- DispatchEx *This = impl_from_IDispatchEx(iface);
- TRACE(" Not implemented in native msxml3 (%p)->(%x %x %p)\n", This, grfdex, id, pid);
+ TRACE("%p, %lx, %ld, %p.\n", iface, grfdex, id, pid);
return E_NOTIMPL;
}
static HRESULT WINAPI DispatchEx_GetNameSpaceParent(IDispatchEx *iface, IUnknown **ppunk)
{
- DispatchEx *This = impl_from_IDispatchEx(iface);
- TRACE("Not implemented in native msxml3 (%p)->(%p)\n", This, ppunk);
+ TRACE("%p, %p.\n", iface, ppunk);
return E_NOTIMPL;
}
diff --git a/dlls/msxml3/docfrag.c b/dlls/msxml3/docfrag.c
index 88456001464..595f9775272 100644
--- a/dlls/msxml3/docfrag.c
+++ b/dlls/msxml3/docfrag.c
@@ -88,26 +88,25 @@ static HRESULT WINAPI domfrag_QueryInterface(
return S_OK;
}
-static ULONG WINAPI domfrag_AddRef(
- IXMLDOMDocumentFragment *iface )
+static ULONG WINAPI domfrag_AddRef(IXMLDOMDocumentFragment *iface)
{
- domfrag *This = impl_from_IXMLDOMDocumentFragment( iface );
- ULONG ref = InterlockedIncrement( &This->ref );
- TRACE("(%p)->(%d)\n", This, ref);
+ domfrag *domfrag = impl_from_IXMLDOMDocumentFragment(iface);
+ ULONG ref = InterlockedIncrement(&domfrag->ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
-static ULONG WINAPI domfrag_Release(
- IXMLDOMDocumentFragment *iface )
+static ULONG WINAPI domfrag_Release(IXMLDOMDocumentFragment *iface)
{
- domfrag *This = impl_from_IXMLDOMDocumentFragment( iface );
- ULONG ref = InterlockedDecrement( &This->ref );
+ domfrag *domfrag = impl_from_IXMLDOMDocumentFragment(iface);
+ ULONG ref = InterlockedDecrement(&domfrag->ref);
+
+ TRACE("%p, refcount %lu.\n", iface, ref);
- TRACE("(%p)->(%d)\n", This, ref);
- if ( ref == 0 )
+ if (!ref)
{
- destroy_xmlnode(&This->node);
- heap_free( This );
+ destroy_xmlnode(&domfrag->node);
+ heap_free(domfrag);
}
return ref;
diff --git a/dlls/msxml3/doctype.c b/dlls/msxml3/doctype.c
index 9010481bb4e..50871b26a21 100644
--- a/dlls/msxml3/doctype.c
+++ b/dlls/msxml3/doctype.c
@@ -80,26 +80,25 @@ static HRESULT WINAPI domdoctype_QueryInterface(
return S_OK;
}
-static ULONG WINAPI domdoctype_AddRef(
- IXMLDOMDocumentType *iface )
+static ULONG WINAPI domdoctype_AddRef(IXMLDOMDocumentType *iface)
{
- domdoctype *This = impl_from_IXMLDOMDocumentType( iface );
- LONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ domdoctype *doctype = impl_from_IXMLDOMDocumentType(iface);
+ LONG ref = InterlockedIncrement(&doctype->ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
return ref;
}
-static ULONG WINAPI domdoctype_Release(
- IXMLDOMDocumentType *iface )
+static ULONG WINAPI domdoctype_Release(IXMLDOMDocumentType *iface)
{
- domdoctype *This = impl_from_IXMLDOMDocumentType( iface );
- ULONG ref = InterlockedDecrement(&This->ref);
+ domdoctype *doctype = impl_from_IXMLDOMDocumentType(iface);
+ ULONG ref = InterlockedDecrement(&doctype->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
- if(!ref) {
- destroy_xmlnode(&This->node);
- heap_free(This);
+ if (!ref)
+ {
+ destroy_xmlnode(&doctype->node);
+ heap_free(doctype);
}
return ref;
diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c
index 082d7950f8d..f0420a517ea 100644
--- a/dlls/msxml3/domdoc.c
+++ b/dlls/msxml3/domdoc.c
@@ -349,7 +349,7 @@ static domdoc_properties * properties_add_ref(domdoc_properties *properties)
if (!properties) return NULL;
ref = InterlockedIncrement(&properties->refs);
- TRACE("%p, %d.\n", properties, ref);
+ TRACE("%p, %ld.\n", properties, ref);
return properties;
}
@@ -361,7 +361,7 @@ static void properties_release(domdoc_properties *properties)
ref = InterlockedDecrement(&properties->refs);
- TRACE("%p, %d.\n", properties, ref);
+ TRACE("%p, %ld.\n", properties, ref);
if (ref < 0)
WARN("negative refcount, expect troubles\n");
@@ -613,7 +613,7 @@ void xmldoc_init(xmlDocPtr doc, MSXML_VERSION version)
LONG xmldoc_add_refs(xmlDocPtr doc, LONG refs)
{
LONG ref = InterlockedExchangeAdd(&priv_from_xmlDocPtr(doc)->refs, refs) + refs;
- TRACE("(%p)->(%d)\n", doc, ref);
+ TRACE("%p, refcount %ld.\n", doc, ref);
return ref;
}
@@ -626,7 +626,8 @@ LONG xmldoc_release_refs(xmlDocPtr doc, LONG refs)
{
xmldoc_priv *priv = priv_from_xmlDocPtr(doc);
LONG ref = InterlockedExchangeAdd(&priv->refs, -refs) - refs;
- TRACE("(%p)->(%d)\n", doc, ref);
+
+ TRACE("%p, refcount %ld.\n", doc, ref);
if (ref < 0)
WARN("negative refcount, expect troubles\n");
@@ -818,7 +819,7 @@ static HRESULT domdoc_load_from_stream(domdoc *doc, ISequentialStream *stream)
if (FAILED(hr))
{
- ERR("failed to copy stream 0x%08x\n", hr);
+ ERR("failed to copy stream, hr %#lx.\n", hr);
IStream_Release(hstream);
return hr;
}
@@ -878,7 +879,7 @@ static HRESULT WINAPI PersistStreamInit_Save(
SysFreeString(xmlString);
}
- TRACE("ret 0x%08x\n", hr);
+ TRACE("hr %#lx.\n", hr);
return hr;
}
@@ -977,9 +978,9 @@ static HRESULT WINAPI domdoc_QueryInterface( IXMLDOMDocument3 *iface, REFIID rii
static ULONG WINAPI domdoc_AddRef( IXMLDOMDocument3 *iface )
{
- domdoc *This = impl_from_IXMLDOMDocument3( iface );
- ULONG ref = InterlockedIncrement( &This->ref );
- TRACE("(%p)->(%d)\n", This, ref );
+ domdoc *doc = impl_from_IXMLDOMDocument3(iface);
+ ULONG ref = InterlockedIncrement(&doc->ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
return ref;
}
@@ -988,9 +989,9 @@ static ULONG WINAPI domdoc_Release( IXMLDOMDocument3 *iface )
domdoc *This = impl_from_IXMLDOMDocument3( iface );
LONG ref = InterlockedDecrement( &This->ref );
- TRACE("(%p)->(%d)\n", This, ref );
+ TRACE("%p, refcount %ld.\n", iface, ref);
- if ( ref == 0 )
+ if (!ref)
{
int eid;
@@ -2249,7 +2250,7 @@ static HRESULT WINAPI domdoc_load(
if (FAILED(hr))
{
This->error = hr;
- WARN("failed to access array data, 0x%08x\n", hr);
+ WARN("failed to access array data, hr %#lx.\n", hr);
break;
}
SafeArrayGetUBound(psa, 1, &len);
@@ -2318,7 +2319,7 @@ static HRESULT WINAPI domdoc_load(
return hr;
}
- FIXME("unsupported IUnknown type (0x%08x) (%p)\n", hr, V_UNKNOWN(&source)->lpVtbl);
+ FIXME("unsupported IUnknown type (%#lx) (%p)\n", hr, V_UNKNOWN(&source)->lpVtbl);
break;
}
default:
@@ -2368,7 +2369,7 @@ static HRESULT WINAPI domdoc_load(
hr = S_FALSE;
}
- TRACE("ret (%d)\n", hr);
+ TRACE("hr %#lx.\n", hr);
return hr;
}
@@ -2533,10 +2534,10 @@ static int XMLCALL domdoc_stream_save_writecallback(void *ctx, const char *buffe
HRESULT hr;
hr = IStream_Write((IStream*)ctx, buffer, len, &written);
- TRACE("0x%08x %p %d %u\n", hr, buffer, len, written);
+ TRACE("hr %#lx, %p, %d, %lu.\n", hr, buffer, len, written);
if (hr != S_OK)
{
- WARN("stream write error: 0x%08x\n", hr);
+ WARN("stream write error, hr %#lx.\n", hr);
return -1;
}
else
@@ -3532,7 +3533,7 @@ static HRESULT WINAPI ConnectionPoint_Unadvise(IConnectionPoint *iface, DWORD co
{
ConnectionPoint *This = impl_from_IConnectionPoint(iface);
- TRACE("(%p)->(%d)\n", This, cookie);
+ TRACE("%p, %ld.\n", iface, cookie);
if (cookie == 0 || cookie > This->sinks_size || !This->sinks[cookie-1].unk)
return CONNECT_E_NOCONNECTION;
@@ -3690,13 +3691,14 @@ static HRESULT WINAPI domdoc_Safety_GetInterfaceSafetyOptions(IObjectSafety *ifa
static HRESULT WINAPI domdoc_Safety_SetInterfaceSafetyOptions(IObjectSafety *iface, REFIID riid,
DWORD mask, DWORD enabled)
{
- domdoc *This = impl_from_IObjectSafety(iface);
- TRACE("(%p)->(%s %x %x)\n", This, debugstr_guid(riid), mask, enabled);
+ domdoc *doc = impl_from_IObjectSafety(iface);
+
+ TRACE("%p, %s, %lx, %lx.\n", iface, debugstr_guid(riid), mask, enabled);
if ((mask & ~SAFETY_SUPPORTED_OPTIONS) != 0)
return E_FAIL;
- This->safeopt = (This->safeopt & ~mask) | (mask & enabled);
+ doc->safeopt = (doc->safeopt & ~mask) | (mask & enabled);
return S_OK;
}
diff --git a/dlls/msxml3/domimpl.c b/dlls/msxml3/domimpl.c
index 3e5b912efd2..77a30e775ff 100644
--- a/dlls/msxml3/domimpl.c
+++ b/dlls/msxml3/domimpl.c
@@ -76,24 +76,23 @@ static HRESULT WINAPI domimpl_QueryInterface(
return S_OK;
}
-static ULONG WINAPI domimpl_AddRef(
- IXMLDOMImplementation *iface )
+static ULONG WINAPI domimpl_AddRef(IXMLDOMImplementation *iface)
{
- domimpl *This = impl_from_IXMLDOMImplementation( iface );
- ULONG ref = InterlockedIncrement( &This->ref );
- TRACE("(%p)->(%d)\n", This, ref);
+ domimpl *domimpl = impl_from_IXMLDOMImplementation(iface);
+ ULONG ref = InterlockedIncrement(&domimpl->ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
-static ULONG WINAPI domimpl_Release(
- IXMLDOMImplementation *iface )
+static ULONG WINAPI domimpl_Release(IXMLDOMImplementation *iface)
{
- domimpl *This = impl_from_IXMLDOMImplementation( iface );
- ULONG ref = InterlockedDecrement( &This->ref );
+ domimpl *domimpl = impl_from_IXMLDOMImplementation(iface);
+ ULONG ref = InterlockedDecrement(&domimpl->ref);
+
+ TRACE("%p, refcount %lu.\n", iface, ref);
- TRACE("(%p)->(%d)\n", This, ref);
- if ( ref == 0 )
- heap_free( This );
+ if (!ref)
+ heap_free(domimpl);
return ref;
}
diff --git a/dlls/msxml3/element.c b/dlls/msxml3/element.c
index e1462c47d88..7f5b91b0f39 100644
--- a/dlls/msxml3/element.c
+++ b/dlls/msxml3/element.c
@@ -100,28 +100,27 @@ static HRESULT WINAPI domelem_QueryInterface(
return S_OK;
}
-static ULONG WINAPI domelem_AddRef(
- IXMLDOMElement *iface )
+static ULONG WINAPI domelem_AddRef(IXMLDOMElement *iface)
{
- domelem *This = impl_from_IXMLDOMElement( iface );
- LONG ref = InterlockedIncrement(&This->ref);
+ domelem *element = impl_from_IXMLDOMElement(iface);
+ LONG ref = InterlockedIncrement(&element->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
return ref;
}
-static ULONG WINAPI domelem_Release(
- IXMLDOMElement *iface )
+static ULONG WINAPI domelem_Release(IXMLDOMElement *iface)
{
- domelem *This = impl_from_IXMLDOMElement( iface );
- ULONG ref = InterlockedDecrement(&This->ref);
+ domelem *element = impl_from_IXMLDOMElement(iface);
+ ULONG ref = InterlockedDecrement(&element->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
- if(!ref) {
- destroy_xmlnode(&This->node);
- heap_free(This);
+ if (!ref)
+ {
+ destroy_xmlnode(&element->node);
+ heap_free(element);
}
return ref;
@@ -1792,7 +1791,7 @@ static HRESULT domelem_get_item(const xmlNodePtr node, LONG index, IXMLDOMNode *
IUnknown *unk;
HRESULT hr;
- TRACE("(%p)->(%d %p)\n", node, index, item);
+ TRACE("%p, %ld, %p.\n", node, index, item);
*item = NULL;
@@ -1879,7 +1878,7 @@ static HRESULT domelem_next_node(const xmlNodePtr node, LONG *iter, IXMLDOMNode
xmlAttrPtr curr;
LONG i;
- TRACE("(%p)->(%d: %p)\n", node, *iter, nextNode);
+ TRACE("%p, %ld, %p.\n", node, *iter, nextNode);
*nextNode = NULL;
diff --git a/dlls/msxml3/entityref.c b/dlls/msxml3/entityref.c
index a9e8d085c34..5a446b3271d 100644
--- a/dlls/msxml3/entityref.c
+++ b/dlls/msxml3/entityref.c
@@ -93,7 +93,7 @@ static ULONG WINAPI entityref_AddRef(
{
entityref *This = impl_from_IXMLDOMEntityReference( iface );
ULONG ref = InterlockedIncrement( &This->ref );
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
@@ -103,8 +103,9 @@ static ULONG WINAPI entityref_Release(
entityref *This = impl_from_IXMLDOMEntityReference( iface );
ULONG ref = InterlockedDecrement( &This->ref );
- TRACE("(%p)->(%d)\n", This, ref);
- if ( ref == 0 )
+ TRACE("%p, refcount %lu.\n", iface, ref);
+
+ if (!ref)
{
destroy_xmlnode(&This->node);
heap_free( This );
diff --git a/dlls/msxml3/factory.c b/dlls/msxml3/factory.c
index b8c8281063a..c2d3cd30c60 100644
--- a/dlls/msxml3/factory.c
+++ b/dlls/msxml3/factory.c
@@ -195,20 +195,22 @@ static inline DOMFactory *DOMFactory_from_IClassFactory(IClassFactory *iface)
static ULONG WINAPI DOMClassFactory_AddRef(IClassFactory *iface )
{
- DOMFactory *This = DOMFactory_from_IClassFactory(iface);
- ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p) ref = %u\n", This, ref);
+ DOMFactory *factory = DOMFactory_from_IClassFactory(iface);
+ ULONG ref = InterlockedIncrement(&factory->ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
static ULONG WINAPI DOMClassFactory_Release(IClassFactory *iface )
{
- DOMFactory *This = DOMFactory_from_IClassFactory(iface);
- ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p) ref = %u\n", This, ref);
- if(!ref) {
- heap_free(This);
- }
+ DOMFactory *factory = DOMFactory_from_IClassFactory(iface);
+ ULONG ref = InterlockedDecrement(&factory->ref);
+
+ TRACE("%p, refcount %lu.\n", iface, ref);
+
+ if (!ref)
+ heap_free(factory);
+
return ref;
}
diff --git a/dlls/msxml3/httprequest.c b/dlls/msxml3/httprequest.c
index 86e569f5dd8..cc384a380e5 100644
--- a/dlls/msxml3/httprequest.c
+++ b/dlls/msxml3/httprequest.c
@@ -274,7 +274,7 @@ static ULONG WINAPI BindStatusCallback_AddRef(IBindStatusCallback *iface)
BindStatusCallback *This = impl_from_IBindStatusCallback(iface);
LONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p) ref = %d\n", This, ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
return ref;
}
@@ -284,7 +284,7 @@ static ULONG WINAPI BindStatusCallback_Release(IBindStatusCallback *iface)
BindStatusCallback *This = impl_from_IBindStatusCallback(iface);
LONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p) ref = %d\n", This, ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
if (!ref)
{
@@ -302,7 +302,7 @@ static HRESULT WINAPI BindStatusCallback_OnStartBinding(IBindStatusCallback *ifa
{
BindStatusCallback *This = impl_from_IBindStatusCallback(iface);
- TRACE("(%p)->(%d %p)\n", This, reserved, pbind);
+ TRACE("%p, %ld, %p.\n", iface, reserved, pbind);
if (!pbind) return E_INVALIDARG;
@@ -325,9 +325,7 @@ static HRESULT WINAPI BindStatusCallback_GetPriority(IBindStatusCallback *iface,
static HRESULT WINAPI BindStatusCallback_OnLowResource(IBindStatusCallback *iface, DWORD reserved)
{
- BindStatusCallback *This = impl_from_IBindStatusCallback(iface);
-
- TRACE("(%p)->(%d)\n", This, reserved);
+ TRACE("%p, %ld.\n", iface, reserved);
return E_NOTIMPL;
}
@@ -335,9 +333,7 @@ static HRESULT WINAPI BindStatusCallback_OnLowResource(IBindStatusCallback *ifac
static HRESULT WINAPI BindStatusCallback_OnProgress(IBindStatusCallback *iface, ULONG ulProgress,
ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText)
{
- BindStatusCallback *This = impl_from_IBindStatusCallback(iface);
-
- TRACE("(%p)->(%u %u %u %s)\n", This, ulProgress, ulProgressMax, ulStatusCode,
+ TRACE("%p, %lu, %lu, %lu, %s.\n", iface, ulProgress, ulProgressMax, ulStatusCode,
debugstr_w(szStatusText));
return S_OK;
@@ -348,7 +344,7 @@ static HRESULT WINAPI BindStatusCallback_OnStopBinding(IBindStatusCallback *ifac
{
BindStatusCallback *This = impl_from_IBindStatusCallback(iface);
- TRACE("(%p)->(0x%08x %s)\n", This, hr, debugstr_w(error));
+ TRACE("%p, %#lx, %s.\n", iface, hr, debugstr_w(error));
if (This->binding)
{
@@ -403,7 +399,7 @@ static HRESULT WINAPI BindStatusCallback_OnDataAvailable(IBindStatusCallback *if
BYTE buf[4096];
HRESULT hr;
- TRACE("(%p)->(%08x %d %p %p)\n", This, flags, size, format, stgmed);
+ TRACE("%p, %#lx, %lu, %p, %p.\n", iface, flags, size, format, stgmed);
do
{
@@ -474,7 +470,7 @@ static HRESULT WINAPI BSCHttpNegotiate_BeginningTransaction(IHttpNegotiate *ifac
WCHAR *buff, *ptr;
int size = 0;
- TRACE("(%p)->(%s %s %d %p)\n", This, debugstr_w(url), debugstr_w(headers), reserved, add_headers);
+ TRACE("%p, %s, %s, %ld, %p.\n", iface, debugstr_w(url), debugstr_w(headers), reserved, add_headers);
*add_headers = NULL;
@@ -576,7 +572,7 @@ static HRESULT WINAPI BSCHttpNegotiate_OnResponse(IHttpNegotiate *iface, DWORD c
{
BindStatusCallback *This = impl_from_IHttpNegotiate(iface);
- TRACE("(%p)->(%d %s %s %p)\n", This, code, debugstr_w(resp_headers),
+ TRACE("%p, %ld, %s, %s, %p.\n", iface, code, debugstr_w(resp_headers),
debugstr_w(req_headers), add_reqheaders);
This->request->status = code;
@@ -931,7 +927,7 @@ static HRESULT httprequest_open(httprequest *This, BSTR method, BSTR url,
else
hr = CreateUri(url, 0, 0, &uri);
if(FAILED(hr)) {
- WARN("Could not create IUri object: %08x\n", hr);
+ WARN("Could not create IUri object, hr %#lx.\n", hr);
return hr;
}
@@ -970,11 +966,11 @@ static HRESULT httprequest_open(httprequest *This, BSTR method, BSTR url,
uri = full_uri;
}
else
- WARN("failed to create modified uri, 0x%08x\n", hr);
+ WARN("failed to create modified uri, hr %#lx.\n", hr);
IUriBuilder_Release(builder);
}
else
- WARN("IUriBuilder creation failed, 0x%08x\n", hr);
+ WARN("IUriBuilder creation failed, hr %#lx.\n", hr);
}
This->uri = uri;
@@ -1396,23 +1392,23 @@ static HRESULT WINAPI XMLHTTPRequest_QueryInterface(IXMLHTTPRequest *iface, REFI
static ULONG WINAPI XMLHTTPRequest_AddRef(IXMLHTTPRequest *iface)
{
- httprequest *This = impl_from_IXMLHTTPRequest( iface );
- ULONG ref = InterlockedIncrement( &This->ref );
- TRACE("(%p)->(%u)\n", This, ref );
+ httprequest *request = impl_from_IXMLHTTPRequest(iface);
+ ULONG ref = InterlockedIncrement(&request->ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
static ULONG WINAPI XMLHTTPRequest_Release(IXMLHTTPRequest *iface)
{
- httprequest *This = impl_from_IXMLHTTPRequest( iface );
- ULONG ref = InterlockedDecrement( &This->ref );
+ httprequest *request = impl_from_IXMLHTTPRequest(iface);
+ ULONG ref = InterlockedDecrement(&request->ref);
- TRACE("(%p)->(%u)\n", This, ref );
+ TRACE("%p, refcount %lu.\n", iface, ref);
- if ( ref == 0 )
+ if (!ref)
{
- httprequest_release( This );
- heap_free( This );
+ httprequest_release(request);
+ heap_free(request);
}
return ref;
@@ -1420,9 +1416,7 @@ static ULONG WINAPI XMLHTTPRequest_Release(IXMLHTTPRequest *iface)
static HRESULT WINAPI XMLHTTPRequest_GetTypeInfoCount(IXMLHTTPRequest *iface, UINT *pctinfo)
{
- httprequest *This = impl_from_IXMLHTTPRequest( iface );
-
- TRACE("(%p)->(%p)\n", This, pctinfo);
+ TRACE("%p, %p.\n", iface, pctinfo);
*pctinfo = 1;
@@ -1432,9 +1426,7 @@ static HRESULT WINAPI XMLHTTPRequest_GetTypeInfoCount(IXMLHTTPRequest *iface, UI
static HRESULT WINAPI XMLHTTPRequest_GetTypeInfo(IXMLHTTPRequest *iface, UINT iTInfo,
LCID lcid, ITypeInfo **ppTInfo)
{
- httprequest *This = impl_from_IXMLHTTPRequest( iface );
-
- TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
+ TRACE("%p, %u, %lx,%p.\n", iface, iTInfo, lcid, ppTInfo);
return get_typeinfo(IXMLHTTPRequest_tid, ppTInfo);
}
@@ -1442,11 +1434,10 @@ static HRESULT WINAPI XMLHTTPRequest_GetTypeInfo(IXMLHTTPRequest *iface, UINT iT
static HRESULT WINAPI XMLHTTPRequest_GetIDsOfNames(IXMLHTTPRequest *iface, REFIID riid,
LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
{
- httprequest *This = impl_from_IXMLHTTPRequest( iface );
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
+ TRACE("%p, %s, %p, %u, %lx, %p.\n", iface, debugstr_guid(riid), rgszNames, cNames,
lcid, rgDispId);
if(!rgszNames || cNames == 0 || !rgDispId)
@@ -1466,18 +1457,16 @@ static HRESULT WINAPI XMLHTTPRequest_Invoke(IXMLHTTPRequest *iface, DISPID dispI
LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult,
EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
- httprequest *This = impl_from_IXMLHTTPRequest( iface );
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
+ TRACE("%p, %ld, %s, %lx, %d, %p, %p, %p, %p.\n", iface, dispIdMember, debugstr_guid(riid),
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
hr = get_typeinfo(IXMLHTTPRequest_tid, &typeinfo);
if(SUCCEEDED(hr))
{
- hr = ITypeInfo_Invoke(typeinfo, &This->IXMLHTTPRequest_iface, dispIdMember, wFlags,
- pDispParams, pVarResult, pExcepInfo, puArgErr);
+ hr = ITypeInfo_Invoke(typeinfo, iface, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
ITypeInfo_Release(typeinfo);
}
@@ -1743,13 +1732,14 @@ static HRESULT WINAPI httprequest_Safety_GetInterfaceSafetyOptions(IObjectSafety
static HRESULT WINAPI httprequest_Safety_SetInterfaceSafetyOptions(IObjectSafety *iface, REFIID riid,
DWORD mask, DWORD enabled)
{
- httprequest *This = impl_from_IObjectSafety(iface);
- TRACE("(%p)->(%s %x %x)\n", This, debugstr_guid(riid), mask, enabled);
+ httprequest *request = impl_from_IObjectSafety(iface);
+
+ TRACE("%p, %s, %lx, %lx.\n", iface, debugstr_guid(riid), mask, enabled);
if ((mask & ~safety_supported_options))
return E_FAIL;
- This->safeopt = (This->safeopt & ~mask) | (mask & enabled);
+ request->safeopt = (request->safeopt & ~mask) | (mask & enabled);
return S_OK;
}
@@ -1829,23 +1819,23 @@ static HRESULT WINAPI ServerXMLHTTPRequest_QueryInterface(IServerXMLHTTPRequest
static ULONG WINAPI ServerXMLHTTPRequest_AddRef(IServerXMLHTTPRequest *iface)
{
- serverhttp *This = impl_from_IServerXMLHTTPRequest( iface );
- ULONG ref = InterlockedIncrement( &This->req.ref );
- TRACE("(%p)->(%u)\n", This, ref );
+ serverhttp *request = impl_from_IServerXMLHTTPRequest(iface);
+ ULONG ref = InterlockedIncrement(&request->req.ref);
+ TRACE("%p, refcount %lu.\n", iface, ref );
return ref;
}
static ULONG WINAPI ServerXMLHTTPRequest_Release(IServerXMLHTTPRequest *iface)
{
- serverhttp *This = impl_from_IServerXMLHTTPRequest( iface );
- ULONG ref = InterlockedDecrement( &This->req.ref );
+ serverhttp *request = impl_from_IServerXMLHTTPRequest(iface);
+ ULONG ref = InterlockedDecrement(&request->req.ref);
- TRACE("(%p)->(%u)\n", This, ref );
+ TRACE("%p, refcount %lu.\n", iface, ref );
- if ( ref == 0 )
+ if (!ref)
{
- httprequest_release( &This->req );
- heap_free( This );
+ httprequest_release(&request->req);
+ heap_free(request);
}
return ref;
@@ -1864,9 +1854,7 @@ static HRESULT WINAPI ServerXMLHTTPRequest_GetTypeInfoCount(IServerXMLHTTPReques
static HRESULT WINAPI ServerXMLHTTPRequest_GetTypeInfo(IServerXMLHTTPRequest *iface, UINT iTInfo,
LCID lcid, ITypeInfo **ppTInfo)
{
- serverhttp *This = impl_from_IServerXMLHTTPRequest( iface );
-
- TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
+ TRACE("%p, %u, %lx, %p.\n", iface, iTInfo, lcid, ppTInfo);
return get_typeinfo(IServerXMLHTTPRequest_tid, ppTInfo);
}
@@ -1874,11 +1862,10 @@ static HRESULT WINAPI ServerXMLHTTPRequest_GetTypeInfo(IServerXMLHTTPRequest *if
static HRESULT WINAPI ServerXMLHTTPRequest_GetIDsOfNames(IServerXMLHTTPRequest *iface, REFIID riid,
LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
{
- serverhttp *This = impl_from_IServerXMLHTTPRequest( iface );
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
+ TRACE("%p, %s, %p, %u, %lx, %p.\n", iface, debugstr_guid(riid), rgszNames, cNames,
lcid, rgDispId);
if(!rgszNames || cNames == 0 || !rgDispId)
@@ -1898,18 +1885,16 @@ static HRESULT WINAPI ServerXMLHTTPRequest_Invoke(IServerXMLHTTPRequest *iface,
LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult,
EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
- serverhttp *This = impl_from_IServerXMLHTTPRequest( iface );
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
+ TRACE("%p, %ld, %s %lx, %d, %p, %p, %p, %p.\n", iface, dispIdMember, debugstr_guid(riid),
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
hr = get_typeinfo(IServerXMLHTTPRequest_tid, &typeinfo);
if(SUCCEEDED(hr))
{
- hr = ITypeInfo_Invoke(typeinfo, &This->IServerXMLHTTPRequest_iface, dispIdMember, wFlags,
- pDispParams, pVarResult, pExcepInfo, puArgErr);
+ hr = ITypeInfo_Invoke(typeinfo, iface, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
ITypeInfo_Release(typeinfo);
}
@@ -2019,8 +2004,7 @@ static HRESULT WINAPI ServerXMLHTTPRequest_put_onreadystatechange(IServerXMLHTTP
static HRESULT WINAPI ServerXMLHTTPRequest_setTimeouts(IServerXMLHTTPRequest *iface, LONG resolveTimeout, LONG connectTimeout,
LONG sendTimeout, LONG receiveTimeout)
{
- serverhttp *This = impl_from_IServerXMLHTTPRequest( iface );
- FIXME("(%p)->(%d %d %d %d): stub\n", This, resolveTimeout, connectTimeout, sendTimeout, receiveTimeout);
+ FIXME("%p, %ld, %ld, %ld, %ld: stub\n", iface, resolveTimeout, connectTimeout, sendTimeout, receiveTimeout);
return S_OK;
}
diff --git a/dlls/msxml3/main.c b/dlls/msxml3/main.c
index 2a97f2637f1..552c6943e24 100644
--- a/dlls/msxml3/main.c
+++ b/dlls/msxml3/main.c
@@ -142,7 +142,7 @@ static int wineXmlReadCallback(void * context, char * buffer, int len)
return -1;
}
- TRACE("Read %d\n", dwBytesRead);
+ TRACE("Read %ld bytes.\n", dwBytesRead);
return dwBytesRead;
}
diff --git a/dlls/msxml3/mxnamespace.c b/dlls/msxml3/mxnamespace.c
index fa9194743b6..518897af8e9 100644
--- a/dlls/msxml3/mxnamespace.c
+++ b/dlls/msxml3/mxnamespace.c
@@ -293,7 +293,7 @@ static HRESULT WINAPI namespacemanager_getDeclaredPrefix(IMXNamespaceManager *if
HRESULT hr;
BSTR prfx;
- TRACE("(%p)->(%d %p %p)\n", This, index, prefix, prefix_len);
+ TRACE("%p, %ld, %p, %p.\n", This, index, prefix, prefix_len);
if (!prefix_len) return E_POINTER;
@@ -315,15 +315,15 @@ static HRESULT WINAPI namespacemanager_getDeclaredPrefix(IMXNamespaceManager *if
static HRESULT WINAPI namespacemanager_getPrefix(IMXNamespaceManager *iface,
const WCHAR *uri, LONG index, WCHAR *prefix, int *prefix_len)
{
- namespacemanager *This = impl_from_IMXNamespaceManager( iface );
+ namespacemanager *manager = impl_from_IMXNamespaceManager(iface);
HRESULT hr;
BSTR prfx;
- TRACE("(%p)->(%s %d %p %p)\n", This, debugstr_w(uri), index, prefix, prefix_len);
+ TRACE("%p, %s, %ld, %p, %p.\n", iface, debugstr_w(uri), index, prefix, prefix_len);
if (!uri || !*uri || !prefix_len) return E_INVALIDARG;
- hr = get_declared_prefix_uri(&This->ctxts, uri, &prfx);
+ hr = get_declared_prefix_uri(&manager->ctxts, uri, &prfx);
if (hr == S_OK)
{
/* TODO: figure out what index argument is for */
@@ -429,9 +429,9 @@ static HRESULT WINAPI vbnamespacemanager_QueryInterface(IVBMXNamespaceManager *i
static ULONG WINAPI vbnamespacemanager_AddRef(IVBMXNamespaceManager *iface)
{
- namespacemanager *This = impl_from_IVBMXNamespaceManager( iface );
- ULONG ref = InterlockedIncrement( &This->ref );
- TRACE("(%p)->(%u)\n", This, ref );
+ namespacemanager *manager = impl_from_IVBMXNamespaceManager(iface);
+ ULONG ref = InterlockedIncrement(&manager->ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
@@ -440,9 +440,9 @@ static ULONG WINAPI vbnamespacemanager_Release(IVBMXNamespaceManager *iface)
namespacemanager *This = impl_from_IVBMXNamespaceManager( iface );
ULONG ref = InterlockedDecrement( &This->ref );
- TRACE("(%p)->(%u)\n", This, ref );
+ TRACE("%p, refcount %lu.\n", iface, ref);
- if ( ref == 0 )
+ if (!ref)
{
struct nscontext *ctxt, *ctxt2;
diff --git a/dlls/msxml3/mxwriter.c b/dlls/msxml3/mxwriter.c
index 084324797c7..4a2844bcf08 100644
--- a/dlls/msxml3/mxwriter.c
+++ b/dlls/msxml3/mxwriter.c
@@ -828,10 +828,10 @@ static HRESULT WINAPI mxwriter_QueryInterface(IMXWriter *iface, REFIID riid, voi
static ULONG WINAPI mxwriter_AddRef(IMXWriter *iface)
{
- mxwriter *This = impl_from_IMXWriter( iface );
- LONG ref = InterlockedIncrement(&This->ref);
+ mxwriter *writer = impl_from_IMXWriter(iface);
+ LONG ref = InterlockedIncrement(&writer->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
@@ -841,9 +841,9 @@ static ULONG WINAPI mxwriter_Release(IMXWriter *iface)
mxwriter *This = impl_from_IMXWriter( iface );
ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
- if(!ref)
+ if (!ref)
{
/* Windows flushes the buffer when the interface is destroyed. */
flush_output_buffer(This);
@@ -2468,9 +2468,7 @@ static ULONG WINAPI SAXErrorHandler_Release(ISAXErrorHandler *iface)
static HRESULT WINAPI SAXErrorHandler_error(ISAXErrorHandler *iface,
ISAXLocator *locator, const WCHAR *message, HRESULT hr)
{
- mxwriter *This = impl_from_ISAXErrorHandler( iface );
-
- FIXME("(%p)->(%p %s 0x%08x)\n", This, locator, debugstr_w(message), hr);
+ FIXME("%p, %p, %s, %#lx.\n", iface, locator, debugstr_w(message), hr);
return E_NOTIMPL;
}
@@ -2478,9 +2476,7 @@ static HRESULT WINAPI SAXErrorHandler_error(ISAXErrorHandler *iface,
static HRESULT WINAPI SAXErrorHandler_fatalError(ISAXErrorHandler *iface,
ISAXLocator *locator, const WCHAR *message, HRESULT hr)
{
- mxwriter *This = impl_from_ISAXErrorHandler( iface );
-
- FIXME("(%p)->(%p %s 0x%08x)\n", This, locator, debugstr_w(message), hr);
+ FIXME("%p, %p, %s, %#lx.\n", iface, locator, debugstr_w(message), hr);
return E_NOTIMPL;
}
@@ -2488,9 +2484,7 @@ static HRESULT WINAPI SAXErrorHandler_fatalError(ISAXErrorHandler *iface,
static HRESULT WINAPI SAXErrorHandler_ignorableWarning(ISAXErrorHandler *iface,
ISAXLocator *locator, const WCHAR *message, HRESULT hr)
{
- mxwriter *This = impl_from_ISAXErrorHandler( iface );
-
- FIXME("(%p)->(%p %s 0x%08x)\n", This, locator, debugstr_w(message), hr);
+ FIXME("%p, %p, %s, %#lx.\n", iface, locator, debugstr_w(message), hr);
return E_NOTIMPL;
}
@@ -2552,22 +2546,19 @@ static HRESULT WINAPI VBSAXErrorHandler_Invoke(IVBSAXErrorHandler *iface, DISPID
static HRESULT WINAPI VBSAXErrorHandler_error(IVBSAXErrorHandler *iface, IVBSAXLocator *locator, BSTR *message, LONG code)
{
- mxwriter *This = impl_from_IVBSAXErrorHandler( iface );
- FIXME("(%p)->(%p %p %x): stub\n", This, locator, message, code);
+ FIXME("%p, %p, %p, %lx: stub\n", iface, locator, message, code);
return E_NOTIMPL;
}
static HRESULT WINAPI VBSAXErrorHandler_fatalError(IVBSAXErrorHandler *iface, IVBSAXLocator *locator, BSTR *message, LONG code)
{
- mxwriter *This = impl_from_IVBSAXErrorHandler( iface );
- FIXME("(%p)->(%p %p %x): stub\n", This, locator, message, code);
+ FIXME("%p, %p, %p, %lx: stub\n", iface, locator, message, code);
return E_NOTIMPL;
}
static HRESULT WINAPI VBSAXErrorHandler_ignorableWarning(IVBSAXErrorHandler *iface, IVBSAXLocator *locator, BSTR *message, LONG code)
{
- mxwriter *This = impl_from_IVBSAXErrorHandler( iface );
- FIXME("(%p)->(%p %p %x): stub\n", This, locator, message, code);
+ FIXME("%p, %p, %p, %lx: stub\n", iface, locator, message, code);
return E_NOTIMPL;
}
@@ -2698,18 +2689,18 @@ static ULONG WINAPI MXAttributes_AddRef(IMXAttributes *iface)
{
mxattributes *This = impl_from_IMXAttributes( iface );
ULONG ref = InterlockedIncrement( &This->ref );
- TRACE("(%p)->(%d)\n", This, ref );
+ TRACE("%p, refcount %lu.\n", iface, ref );
return ref;
}
static ULONG WINAPI MXAttributes_Release(IMXAttributes *iface)
{
mxattributes *This = impl_from_IMXAttributes( iface );
- LONG ref = InterlockedDecrement( &This->ref );
+ ULONG ref = InterlockedDecrement( &This->ref );
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
- if (ref == 0)
+ if (!ref)
{
int i;
@@ -3261,8 +3252,8 @@ static HRESULT WINAPI VBSAXAttributes_GetTypeInfo(
IVBSAXAttributes *iface,
UINT iTInfo, LCID lcid, ITypeInfo** ppTInfo )
{
- mxattributes *This = impl_from_IVBSAXAttributes( iface );
- TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
+ TRACE("%p, %u, %lx, %p.\n", iface, iTInfo, lcid, ppTInfo);
+
return get_typeinfo(IVBSAXAttributes_tid, ppTInfo);
}
@@ -3274,11 +3265,10 @@ static HRESULT WINAPI VBSAXAttributes_GetIDsOfNames(
LCID lcid,
DISPID* rgDispId)
{
- mxattributes *This = impl_from_IVBSAXAttributes( iface );
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
+ TRACE("%p, %s, %p, %u, %lx, %p.\n", iface, debugstr_guid(riid), rgszNames, cNames,
lcid, rgDispId);
if(!rgszNames || cNames == 0 || !rgDispId)
@@ -3305,18 +3295,16 @@ static HRESULT WINAPI VBSAXAttributes_Invoke(
EXCEPINFO* pExcepInfo,
UINT* puArgErr)
{
- mxattributes *This = impl_from_IVBSAXAttributes( iface );
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
+ TRACE("%p, %ld, %s, %lx, %d, %p, %p, %p, %p.\n", iface, dispIdMember, debugstr_guid(riid),
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
hr = get_typeinfo(IVBSAXAttributes_tid, &typeinfo);
if(SUCCEEDED(hr))
{
- hr = ITypeInfo_Invoke(typeinfo, &This->IVBSAXAttributes_iface, dispIdMember, wFlags,
- pDispParams, pVarResult, pExcepInfo, puArgErr);
+ hr = ITypeInfo_Invoke(typeinfo, iface, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
ITypeInfo_Release(typeinfo);
}
diff --git a/dlls/msxml3/node.c b/dlls/msxml3/node.c
index 272e438e773..339504477ac 100644
--- a/dlls/msxml3/node.c
+++ b/dlls/msxml3/node.c
@@ -107,7 +107,7 @@ static ULONG WINAPI SupportErrorInfo_AddRef(ISupportErrorInfo *iface)
{
SupportErrorInfo *This = impl_from_ISupportErrorInfo(iface);
ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref );
+ TRACE("%p, refcount %ld.\n", iface, ref );
return ref;
}
@@ -116,9 +116,9 @@ static ULONG WINAPI SupportErrorInfo_Release(ISupportErrorInfo *iface)
SupportErrorInfo *This = impl_from_ISupportErrorInfo(iface);
LONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
- if (ref == 0)
+ if (!ref)
heap_free(This);
return ref;
@@ -1350,7 +1350,7 @@ static HRESULT xslt_doc_get_uri(const xmlChar *uri, void *_ctxt, xsltLoadType ty
SysFreeString(uriW);
if (FAILED(hr))
{
- WARN("Failed to create href uri, %#x.\n", hr);
+ WARN("Failed to create href uri, %#lx.\n", hr);
return hr;
}
@@ -1364,14 +1364,14 @@ static HRESULT xslt_doc_get_uri(const xmlChar *uri, void *_ctxt, xsltLoadType ty
SysFreeString(baseuriW);
if (FAILED(hr))
{
- WARN("Failed to create base uri, %#x.\n", hr);
+ WARN("Failed to create base uri, %#lx.\n", hr);
return hr;
}
hr = CoInternetCombineIUri(base_uri, href_uri, 0, doc_uri, 0);
IUri_Release(base_uri);
if (FAILED(hr))
- WARN("Failed to combine uris, %#x.\n", hr);
+ WARN("Failed to combine uris, hr %#lx.\n", hr);
}
else
{
@@ -1717,14 +1717,9 @@ static HRESULT WINAPI unknode_GetTypeInfo(
LCID lcid,
ITypeInfo** ppTInfo )
{
- unknode *This = unknode_from_IXMLDOMNode( iface );
- HRESULT hr;
-
- TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
-
- hr = get_typeinfo(IXMLDOMNode_tid, ppTInfo);
+ TRACE("%p, %u, %lx, %p.\n", iface, iTInfo, lcid, ppTInfo);
- return hr;
+ return get_typeinfo(IXMLDOMNode_tid, ppTInfo);
}
static HRESULT WINAPI unknode_GetIDsOfNames(
@@ -1735,12 +1730,10 @@ static HRESULT WINAPI unknode_GetIDsOfNames(
LCID lcid,
DISPID* rgDispId )
{
- unknode *This = unknode_from_IXMLDOMNode( iface );
-
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
+ TRACE("%p, %s, %p, %u, %lx, %p.\n", iface, debugstr_guid(riid), rgszNames, cNames,
lcid, rgDispId);
if(!rgszNames || cNames == 0 || !rgDispId)
@@ -1767,17 +1760,16 @@ static HRESULT WINAPI unknode_Invoke(
EXCEPINFO* pExcepInfo,
UINT* puArgErr )
{
- unknode *This = unknode_from_IXMLDOMNode( iface );
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
+ TRACE("%p, %ld, %s, %lx, %d, %p, %p, %p, %p.\n", iface, dispIdMember, debugstr_guid(riid),
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
hr = get_typeinfo(IXMLDOMNode_tid, &typeinfo);
if(SUCCEEDED(hr))
{
- hr = ITypeInfo_Invoke(typeinfo, &This->IXMLDOMNode_iface, dispIdMember, wFlags, pDispParams,
+ hr = ITypeInfo_Invoke(typeinfo, iface, dispIdMember, wFlags, pDispParams,
pVarResult, pExcepInfo, puArgErr);
ITypeInfo_Release(typeinfo);
}
diff --git a/dlls/msxml3/nodelist.c b/dlls/msxml3/nodelist.c
index 8ffd2dbd316..fd3d30a2e02 100644
--- a/dlls/msxml3/nodelist.c
+++ b/dlls/msxml3/nodelist.c
@@ -118,7 +118,7 @@ static ULONG WINAPI xmlnodelist_AddRef(
{
xmlnodelist *This = impl_from_IXMLDOMNodeList( iface );
ULONG ref = InterlockedIncrement( &This->ref );
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
@@ -128,8 +128,9 @@ static ULONG WINAPI xmlnodelist_Release(
xmlnodelist *This = impl_from_IXMLDOMNodeList( iface );
ULONG ref = InterlockedDecrement( &This->ref );
- TRACE("(%p)->(%d)\n", This, ref);
- if ( ref == 0 )
+ TRACE("%p, refcount %lu.\n", iface, ref);
+
+ if (!ref)
{
xmldoc_release( This->parent->doc );
if (This->enumvariant) IEnumVARIANT_Release(This->enumvariant);
@@ -196,7 +197,7 @@ static HRESULT WINAPI xmlnodelist_get_item(
xmlNodePtr curr;
LONG nodeIndex = 0;
- TRACE("(%p)->(%d %p)\n", This, index, listItem);
+ TRACE("%p, %ld, %p.\n", iface, index, listItem);
if(!listItem)
return E_INVALIDARG;
@@ -312,7 +313,7 @@ static HRESULT xmlnodelist_get_dispid(IUnknown *iface, BSTR name, DWORD flags, D
return DISP_E_UNKNOWNNAME;
*dispid = DISPID_DOM_COLLECTION_BASE + idx;
- TRACE("ret %x\n", *dispid);
+ TRACE("ret %lx\n", *dispid);
return S_OK;
}
@@ -321,7 +322,7 @@ static HRESULT xmlnodelist_invoke(IUnknown *iface, DISPID id, LCID lcid, WORD fl
{
xmlnodelist *This = impl_from_IXMLDOMNodeList( (IXMLDOMNodeList*)iface );
- TRACE("(%p)->(%x %x %x %p %p %p)\n", This, id, lcid, flags, params, res, ei);
+ TRACE("%p, %ld, %lx, %x, %p, %p, %p.\n", iface, id, lcid, flags, params, res, ei);
if (id >= DISPID_DOM_COLLECTION_BASE && id <= DISPID_DOM_COLLECTION_MAX)
{
diff --git a/dlls/msxml3/nodemap.c b/dlls/msxml3/nodemap.c
index afe7065dfd9..c90d46136a8 100644
--- a/dlls/msxml3/nodemap.c
+++ b/dlls/msxml3/nodemap.c
@@ -121,7 +121,7 @@ static ULONG WINAPI xmlnodemap_AddRef(
{
xmlnodemap *This = impl_from_IXMLDOMNamedNodeMap( iface );
ULONG ref = InterlockedIncrement( &This->ref );
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
@@ -131,8 +131,9 @@ static ULONG WINAPI xmlnodemap_Release(
xmlnodemap *This = impl_from_IXMLDOMNamedNodeMap( iface );
ULONG ref = InterlockedDecrement( &This->ref );
- TRACE("(%p)->(%d)\n", This, ref);
- if ( ref == 0 )
+ TRACE("%p, refcount %lu.\n", iface, ref);
+
+ if (!ref)
{
xmlnode_release( This->node );
xmldoc_release( This->node->doc );
@@ -225,7 +226,7 @@ static HRESULT WINAPI xmlnodemap_get_item(
{
xmlnodemap *This = impl_from_IXMLDOMNamedNodeMap( iface );
- TRACE("(%p)->(%d %p)\n", This, index, item);
+ TRACE("%p, %ld, %p.\n", iface, index, item);
return This->funcs->get_item(This->node, index, item);
}
@@ -273,7 +274,7 @@ static HRESULT WINAPI xmlnodemap_nextNode(
{
xmlnodemap *This = impl_from_IXMLDOMNamedNodeMap( iface );
- TRACE("(%p)->(%p: %d)\n", This, nextItem, This->iterator);
+ TRACE("%p, %p, %ld.\n", iface, nextItem, This->iterator);
return This->funcs->next_node(This->node, &This->iterator, nextItem);
}
@@ -283,7 +284,7 @@ static HRESULT WINAPI xmlnodemap_reset(
{
xmlnodemap *This = impl_from_IXMLDOMNamedNodeMap( iface );
- TRACE("(%p)->(%d)\n", This, This->iterator);
+ TRACE("%p, %ld.\n", iface, This->iterator);
This->iterator = 0;
@@ -371,7 +372,7 @@ static HRESULT xmlnodemap_get_dispid(IUnknown *iface, BSTR name, DWORD flags, DI
return DISP_E_UNKNOWNNAME;
*dispid = DISPID_DOM_COLLECTION_BASE + idx;
- TRACE("ret %x\n", *dispid);
+ TRACE("ret %lx\n", *dispid);
return S_OK;
}
@@ -380,7 +381,7 @@ static HRESULT xmlnodemap_invoke(IUnknown *iface, DISPID id, LCID lcid, WORD fla
{
xmlnodemap *This = impl_from_IXMLDOMNamedNodeMap( (IXMLDOMNamedNodeMap*)iface );
- TRACE("(%p)->(%x %x %x %p %p %p)\n", This, id, lcid, flags, params, res, ei);
+ TRACE("%p, %ld, %lx, %x, %p, %p, %p.\n", iface, id, lcid, flags, params, res, ei);
V_VT(res) = VT_DISPATCH;
V_DISPATCH(res) = NULL;
diff --git a/dlls/msxml3/parseerror.c b/dlls/msxml3/parseerror.c
index 9fb3ceca9c3..4f32eb0596b 100644
--- a/dlls/msxml3/parseerror.c
+++ b/dlls/msxml3/parseerror.c
@@ -83,7 +83,7 @@ static ULONG WINAPI parseError_AddRef(
{
parse_error_t *This = impl_from_IXMLDOMParseError2( iface );
ULONG ref = InterlockedIncrement( &This->ref );
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
@@ -93,8 +93,9 @@ static ULONG WINAPI parseError_Release(
parse_error_t *This = impl_from_IXMLDOMParseError2( iface );
ULONG ref = InterlockedDecrement( &This->ref );
- TRACE("(%p)->(%d)\n", This, ref);
- if ( ref == 0 )
+ TRACE("%p, refcount %lu.\n", iface, ref);
+
+ if (!ref)
{
SysFreeString(This->url);
SysFreeString(This->reason);
diff --git a/dlls/msxml3/pi.c b/dlls/msxml3/pi.c
index 4c5c6b12c68..719222bd9ad 100644
--- a/dlls/msxml3/pi.c
+++ b/dlls/msxml3/pi.c
@@ -96,7 +96,7 @@ static ULONG WINAPI dom_pi_AddRef(
{
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
ULONG ref = InterlockedIncrement( &This->ref );
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
@@ -106,7 +106,7 @@ static ULONG WINAPI dom_pi_Release(
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
ULONG ref = InterlockedDecrement( &This->ref );
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
if ( ref == 0 )
{
destroy_xmlnode(&This->node);
@@ -900,7 +900,7 @@ static HRESULT dom_pi_remove_named_item(xmlNodePtr node, BSTR name, IXMLDOMNode
static HRESULT dom_pi_get_item(const xmlNodePtr node, LONG index, IXMLDOMNode **item)
{
- FIXME("(%p)->(%d %p): stub\n", node, index, item);
+ FIXME("%p, %ld, %p: stub\n", node, index, item);
return E_NOTIMPL;
}
@@ -914,7 +914,7 @@ static HRESULT dom_pi_get_length(const xmlNodePtr node, LONG *length)
static HRESULT dom_pi_next_node(const xmlNodePtr node, LONG *iter, IXMLDOMNode **nextNode)
{
- FIXME("(%p)->(%d %p): stub\n", node, *iter, nextNode);
+ FIXME("%p, %ld, %p: stub\n", node, *iter, nextNode);
return E_NOTIMPL;
}
diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c
index 8c202bddccd..8d58ed1d94b 100644
--- a/dlls/msxml3/saxreader.c
+++ b/dlls/msxml3/saxreader.c
@@ -749,9 +749,7 @@ static HRESULT WINAPI ivbsaxattributes_GetTypeInfo(
IVBSAXAttributes *iface,
UINT iTInfo, LCID lcid, ITypeInfo** ppTInfo )
{
- saxlocator *This = impl_from_IVBSAXAttributes( iface );
-
- TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
+ TRACE("%p, %u, %lx, %p.\n", iface, iTInfo, lcid, ppTInfo);
return get_typeinfo(IVBSAXAttributes_tid, ppTInfo);
}
@@ -764,11 +762,10 @@ static HRESULT WINAPI ivbsaxattributes_GetIDsOfNames(
LCID lcid,
DISPID* rgDispId)
{
- saxlocator *This = impl_from_IVBSAXAttributes( iface );
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
+ TRACE("%p, %s, %p, %u, %lx %p.\n", iface, debugstr_guid(riid), rgszNames, cNames,
lcid, rgDispId);
if(!rgszNames || cNames == 0 || !rgDispId)
@@ -795,18 +792,16 @@ static HRESULT WINAPI ivbsaxattributes_Invoke(
EXCEPINFO* pExcepInfo,
UINT* puArgErr)
{
- saxlocator *This = impl_from_IVBSAXAttributes( iface );
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
+ TRACE("%p, %ld, %s, %lx, %d, %p, %p, %p, %p.\n", iface, dispIdMember, debugstr_guid(riid),
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
hr = get_typeinfo(IVBSAXAttributes_tid, &typeinfo);
if(SUCCEEDED(hr))
{
- hr = ITypeInfo_Invoke(typeinfo, &This->IVBSAXAttributes_iface, dispIdMember, wFlags,
- pDispParams, pVarResult, pExcepInfo, puArgErr);
+ hr = ITypeInfo_Invoke(typeinfo, iface, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
ITypeInfo_Release(typeinfo);
}
@@ -2150,9 +2145,7 @@ static HRESULT WINAPI ivbsaxlocator_GetTypeInfo(
IVBSAXLocator *iface,
UINT iTInfo, LCID lcid, ITypeInfo** ppTInfo )
{
- saxlocator *This = impl_from_IVBSAXLocator( iface );
-
- TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
+ TRACE("%p, %u, %lx, %p.\n", iface, iTInfo, lcid, ppTInfo);
return get_typeinfo(IVBSAXLocator_tid, ppTInfo);
}
@@ -2165,11 +2158,10 @@ static HRESULT WINAPI ivbsaxlocator_GetIDsOfNames(
LCID lcid,
DISPID* rgDispId)
{
- saxlocator *This = impl_from_IVBSAXLocator( iface );
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
+ TRACE("%p, %s, %p, %u, %lx, %p.\n", iface, debugstr_guid(riid), rgszNames, cNames,
lcid, rgDispId);
if(!rgszNames || cNames == 0 || !rgDispId)
@@ -2196,18 +2188,16 @@ static HRESULT WINAPI ivbsaxlocator_Invoke(
EXCEPINFO* pExcepInfo,
UINT* puArgErr)
{
- saxlocator *This = impl_from_IVBSAXLocator( iface );
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
+ TRACE("%p, %ld, %s, %lx, %d, %p, %p, %p, %p.\n", iface, dispIdMember, debugstr_guid(riid),
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
hr = get_typeinfo(IVBSAXLocator_tid, &typeinfo);
if(SUCCEEDED(hr))
{
- hr = ITypeInfo_Invoke(typeinfo, &This->IVBSAXLocator_iface, dispIdMember, wFlags,
- pDispParams, pVarResult, pExcepInfo, puArgErr);
+ hr = ITypeInfo_Invoke(typeinfo, iface, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
ITypeInfo_Release(typeinfo);
}
@@ -2318,7 +2308,7 @@ static ULONG WINAPI isaxlocator_AddRef(ISAXLocator* iface)
{
saxlocator *This = impl_from_ISAXLocator( iface );
ULONG ref = InterlockedIncrement( &This->ref );
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
@@ -2326,11 +2316,11 @@ static ULONG WINAPI isaxlocator_Release(
ISAXLocator* iface)
{
saxlocator *This = impl_from_ISAXLocator( iface );
- LONG ref = InterlockedDecrement( &This->ref );
+ ULONG ref = InterlockedDecrement( &This->ref );
- TRACE("(%p)->(%d)\n", This, ref );
+ TRACE("%p, refcount %ld.\n", iface, ref );
- if (ref == 0)
+ if (!ref)
{
element_entry *element, *element2;
int index;
diff --git a/dlls/msxml3/schema.c b/dlls/msxml3/schema.c
index b74399542ba..3760019ce2e 100644
--- a/dlls/msxml3/schema.c
+++ b/dlls/msxml3/schema.c
@@ -755,14 +755,14 @@ void schemasCleanup(void)
static LONG cache_entry_add_ref(cache_entry* entry)
{
LONG ref = InterlockedIncrement(&entry->ref);
- TRACE("(%p)->(%d)\n", entry, ref);
+ TRACE("%p, refcount %ld.\n", entry, ref);
return ref;
}
static LONG cache_entry_release(cache_entry* entry)
{
LONG ref = InterlockedDecrement(&entry->ref);
- TRACE("(%p)->(%d)\n", entry, ref);
+ TRACE("%p, refcount %ld.\n", entry, ref);
if (ref == 0)
{
@@ -936,7 +936,7 @@ static cache_entry* cache_entry_from_url(VARIANT url, xmlChar const* nsURI, MSXM
hr = IXMLDOMDocument3_load(domdoc, url, &b);
if (hr != S_OK)
{
- ERR("IXMLDOMDocument3_load() returned 0x%08x\n", hr);
+ ERR("load() returned %#lx.\n", hr);
if (b != VARIANT_TRUE)
{
FIXME("Failed to load doc at %s\n", debugstr_w(V_BSTR(&url)));
@@ -1126,7 +1126,7 @@ static ULONG WINAPI schema_cache_AddRef(IXMLDOMSchemaCollection2* iface)
{
schema_cache* This = impl_from_IXMLDOMSchemaCollection2(iface);
LONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
return ref;
}
@@ -1134,9 +1134,9 @@ static ULONG WINAPI schema_cache_Release(IXMLDOMSchemaCollection2* iface)
{
schema_cache* This = impl_from_IXMLDOMSchemaCollection2(iface);
LONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
- if (ref == 0)
+ if (!ref)
{
int i;
@@ -1367,7 +1367,7 @@ static HRESULT WINAPI schema_cache_get_namespaceURI(IXMLDOMSchemaCollection2* if
{
schema_cache* This = impl_from_IXMLDOMSchemaCollection2(iface);
- TRACE("(%p)->(%i %p)\n", This, index, uri);
+ TRACE("%p, %ld, %p.\n", iface, index, uri);
if (!uri)
return E_POINTER;
diff --git a/dlls/msxml3/selection.c b/dlls/msxml3/selection.c
index 82be1c6604b..e7c63c7a2b2 100644
--- a/dlls/msxml3/selection.c
+++ b/dlls/msxml3/selection.c
@@ -155,7 +155,7 @@ static ULONG WINAPI domselection_AddRef(
{
domselection *This = impl_from_IXMLDOMSelection( iface );
ULONG ref = InterlockedIncrement( &This->ref );
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
@@ -165,7 +165,7 @@ static ULONG WINAPI domselection_Release(
domselection *This = impl_from_IXMLDOMSelection( iface );
ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
if ( ref == 0 )
{
xmlXPathFreeObject(This->result);
@@ -232,7 +232,7 @@ static HRESULT WINAPI domselection_get_item(
{
domselection *This = impl_from_IXMLDOMSelection( iface );
- TRACE("(%p)->(%d %p)\n", This, index, listItem);
+ TRACE("%p, %ld, %p.\n", iface, index, listItem);
if(!listItem)
return E_INVALIDARG;
@@ -468,7 +468,7 @@ static ULONG WINAPI enumvariant_AddRef(IEnumVARIANT *iface )
{
enumvariant *This = impl_from_IEnumVARIANT( iface );
ULONG ref = InterlockedIncrement( &This->ref );
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
@@ -477,7 +477,7 @@ static ULONG WINAPI enumvariant_Release(IEnumVARIANT *iface )
enumvariant *This = impl_from_IEnumVARIANT( iface );
ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
if ( ref == 0 )
{
if (This->own) IUnknown_Release(This->outer);
@@ -496,7 +496,7 @@ static HRESULT WINAPI enumvariant_Next(
enumvariant *This = impl_from_IEnumVARIANT( iface );
ULONG ret_count = 0;
- TRACE("(%p)->(%u %p %p)\n", This, celt, var, fetched);
+ TRACE("%p, %lu, %p, %p.\n", iface, celt, var, fetched);
if (fetched) *fetched = 0;
@@ -529,8 +529,8 @@ static HRESULT WINAPI enumvariant_Skip(
IEnumVARIANT *iface,
ULONG celt)
{
- enumvariant *This = impl_from_IEnumVARIANT( iface );
- FIXME("(%p)->(%u): stub\n", This, celt);
+ FIXME("%p, %lu: stub\n", iface, celt);
+
return E_NOTIMPL;
}
@@ -595,7 +595,7 @@ static HRESULT domselection_get_dispid(IUnknown *iface, BSTR name, DWORD flags,
return DISP_E_UNKNOWNNAME;
*dispid = DISPID_DOM_COLLECTION_BASE + idx;
- TRACE("ret %x\n", *dispid);
+ TRACE("ret %lx\n", *dispid);
return S_OK;
}
@@ -604,7 +604,7 @@ static HRESULT domselection_invoke(IUnknown *iface, DISPID id, LCID lcid, WORD f
{
domselection *This = impl_from_IXMLDOMSelection( (IXMLDOMSelection*)iface );
- TRACE("(%p)->(%x %x %x %p %p %p)\n", This, id, lcid, flags, params, res, ei);
+ TRACE("%p, %ld, %lx, %x, %p, %p, %p.\n", iface, id, lcid, flags, params, res, ei);
V_VT(res) = VT_DISPATCH;
V_DISPATCH(res) = NULL;
diff --git a/dlls/msxml3/stylesheet.c b/dlls/msxml3/stylesheet.c
index eab2c96d667..6dfa2a77f9c 100644
--- a/dlls/msxml3/stylesheet.c
+++ b/dlls/msxml3/stylesheet.c
@@ -139,7 +139,7 @@ static ULONG WINAPI xsltemplate_AddRef( IXSLTemplate *iface )
{
xsltemplate *This = impl_from_IXSLTemplate( iface );
ULONG ref = InterlockedIncrement( &This->ref );
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
@@ -148,7 +148,7 @@ static ULONG WINAPI xsltemplate_Release( IXSLTemplate *iface )
xsltemplate *This = impl_from_IXSLTemplate( iface );
ULONG ref = InterlockedDecrement( &This->ref );
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
if ( ref == 0 )
{
if (This->node) IXMLDOMNode_Release( This->node );
@@ -317,7 +317,7 @@ static ULONG WINAPI xslprocessor_AddRef( IXSLProcessor *iface )
{
xslprocessor *This = impl_from_IXSLProcessor( iface );
ULONG ref = InterlockedIncrement( &This->ref );
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
@@ -326,7 +326,7 @@ static ULONG WINAPI xslprocessor_Release( IXSLProcessor *iface )
xslprocessor *This = impl_from_IXSLProcessor( iface );
ULONG ref = InterlockedDecrement( &This->ref );
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
if ( ref == 0 )
{
struct xslprocessor_par *par, *par2;
@@ -509,7 +509,7 @@ static HRESULT WINAPI xslprocessor_put_output(
if (FAILED(hr))
{
output_type = PROCESSOR_OUTPUT_NOT_SET;
- WARN("failed to get output interface, 0x%08x\n", hr);
+ WARN("failed to get output interface, hr %#lx.\n", hr);
}
break;
default:
diff --git a/dlls/msxml3/text.c b/dlls/msxml3/text.c
index eb0f130ed03..7631c8595aa 100644
--- a/dlls/msxml3/text.c
+++ b/dlls/msxml3/text.c
@@ -91,7 +91,7 @@ static ULONG WINAPI domtext_AddRef(
{
domtext *This = impl_from_IXMLDOMText( iface );
ULONG ref = InterlockedIncrement( &This->ref );
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
@@ -101,7 +101,7 @@ static ULONG WINAPI domtext_Release(
domtext *This = impl_from_IXMLDOMText( iface );
ULONG ref = InterlockedDecrement( &This->ref );
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
if ( ref == 0 )
{
destroy_xmlnode(&This->node);
@@ -668,11 +668,10 @@ static HRESULT WINAPI domtext_substringData(
IXMLDOMText *iface,
LONG offset, LONG count, BSTR *p)
{
- domtext *This = impl_from_IXMLDOMText( iface );
HRESULT hr;
BSTR data;
- TRACE("(%p)->(%d %d %p)\n", This, offset, count, p);
+ TRACE("%p, %ld, %ld, %p.\n", iface, offset, count, p);
if(!p)
return E_INVALIDARG;
@@ -742,12 +741,11 @@ static HRESULT WINAPI domtext_insertData(
IXMLDOMText *iface,
LONG offset, BSTR p)
{
- domtext *This = impl_from_IXMLDOMText( iface );
HRESULT hr;
BSTR data;
LONG p_len;
- TRACE("(%p)->(%d %s)\n", This, offset, debugstr_w(p));
+ TRACE("%p, %ld, %s.\n", iface, offset, debugstr_w(p));
/* If have a NULL or empty string, don't do anything. */
if((p_len = SysStringLen(p)) == 0)
@@ -794,7 +792,7 @@ static HRESULT WINAPI domtext_deleteData(
LONG len = -1;
BSTR str;
- TRACE("(%p)->(%d %d)\n", iface, offset, count);
+ TRACE("%p, %ld, %ld.\n", iface, offset, count);
hr = IXMLDOMText_get_length(iface, &len);
if(hr != S_OK) return hr;
@@ -837,10 +835,9 @@ static HRESULT WINAPI domtext_replaceData(
IXMLDOMText *iface,
LONG offset, LONG count, BSTR p)
{
- domtext *This = impl_from_IXMLDOMText( iface );
HRESULT hr;
- TRACE("(%p)->(%d %d %s)\n", This, offset, count, debugstr_w(p));
+ TRACE("%p, %ld, %ld, %s.\n", iface, offset, count, debugstr_w(p));
hr = IXMLDOMText_deleteData(iface, offset, count);
@@ -854,10 +851,9 @@ static HRESULT WINAPI domtext_splitText(
IXMLDOMText *iface,
LONG offset, IXMLDOMText **txtNode)
{
- domtext *This = impl_from_IXMLDOMText( iface );
LONG length = 0;
- TRACE("(%p)->(%d %p)\n", This, offset, txtNode);
+ TRACE("%p, %ld, %p.\n", iface, offset, txtNode);
if (!txtNode || offset < 0) return E_INVALIDARG;
diff --git a/dlls/msxml3/xmldoc.c b/dlls/msxml3/xmldoc.c
index 8e07b0516f7..f588f17496c 100644
--- a/dlls/msxml3/xmldoc.c
+++ b/dlls/msxml3/xmldoc.c
@@ -102,7 +102,7 @@ static ULONG WINAPI xmldoc_AddRef(IXMLDocument *iface)
{
xmldoc *This = impl_from_IXMLDocument(iface);
ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
return ref;
}
@@ -111,7 +111,7 @@ static ULONG WINAPI xmldoc_Release(IXMLDocument *iface)
xmldoc *This = impl_from_IXMLDocument(iface);
LONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
if (ref == 0)
{
@@ -137,9 +137,7 @@ static HRESULT WINAPI xmldoc_GetTypeInfoCount(IXMLDocument *iface, UINT* pctinfo
static HRESULT WINAPI xmldoc_GetTypeInfo(IXMLDocument *iface, UINT iTInfo,
LCID lcid, ITypeInfo** ppTInfo)
{
- xmldoc *This = impl_from_IXMLDocument(iface);
-
- TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
+ TRACE("%p, %u, %lx, %p.\n", iface, iTInfo, lcid, ppTInfo);
return get_typeinfo(IXMLDocument_tid, ppTInfo);
}
@@ -148,11 +146,10 @@ static HRESULT WINAPI xmldoc_GetIDsOfNames(IXMLDocument *iface, REFIID riid,
LPOLESTR* rgszNames, UINT cNames,
LCID lcid, DISPID* rgDispId)
{
- xmldoc *This = impl_from_IXMLDocument(iface);
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
+ TRACE("%p, %s, %p, %u, %lx, %p.\n", iface, debugstr_guid(riid), rgszNames, cNames,
lcid, rgDispId);
if(!rgszNames || cNames == 0 || !rgDispId)
@@ -173,18 +170,16 @@ static HRESULT WINAPI xmldoc_Invoke(IXMLDocument *iface, DISPID dispIdMember,
DISPPARAMS* pDispParams, VARIANT* pVarResult,
EXCEPINFO* pExcepInfo, UINT* puArgErr)
{
- xmldoc *This = impl_from_IXMLDocument(iface);
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
+ TRACE("%p, %ld, %s, %lx, %d, %p, %p, %p, %p.\n", iface, dispIdMember, debugstr_guid(riid),
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
hr = get_typeinfo(IXMLDocument_tid, &typeinfo);
if(SUCCEEDED(hr))
{
- hr = ITypeInfo_Invoke(typeinfo, &This->IXMLDocument_iface, dispIdMember, wFlags,
- pDispParams, pVarResult, pExcepInfo, puArgErr);
+ hr = ITypeInfo_Invoke(typeinfo, iface, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
ITypeInfo_Release(typeinfo);
}
diff --git a/dlls/msxml3/xmlelem.c b/dlls/msxml3/xmlelem.c
index ec9094dae7d..f50bfa6e4ff 100644
--- a/dlls/msxml3/xmlelem.c
+++ b/dlls/msxml3/xmlelem.c
@@ -117,25 +117,19 @@ static HRESULT WINAPI xmlelem_GetTypeInfoCount(IXMLElement *iface, UINT* pctinfo
static HRESULT WINAPI xmlelem_GetTypeInfo(IXMLElement *iface, UINT iTInfo,
LCID lcid, ITypeInfo** ppTInfo)
{
- xmlelem *This = impl_from_IXMLElement(iface);
- HRESULT hr;
-
- TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
+ TRACE("%p, %u, %lx, %p.\n", iface, iTInfo, lcid, ppTInfo);
- hr = get_typeinfo(IXMLElement_tid, ppTInfo);
-
- return hr;
+ return get_typeinfo(IXMLElement_tid, ppTInfo);
}
static HRESULT WINAPI xmlelem_GetIDsOfNames(IXMLElement *iface, REFIID riid,
LPOLESTR* rgszNames, UINT cNames,
LCID lcid, DISPID* rgDispId)
{
- xmlelem *This = impl_from_IXMLElement(iface);
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
+ TRACE("%p, %s, %p, %u, %lx, %p.\n", iface, debugstr_guid(riid), rgszNames, cNames,
lcid, rgDispId);
if(!rgszNames || cNames == 0 || !rgDispId)
@@ -156,18 +150,16 @@ static HRESULT WINAPI xmlelem_Invoke(IXMLElement *iface, DISPID dispIdMember,
DISPPARAMS* pDispParams, VARIANT* pVarResult,
EXCEPINFO* pExcepInfo, UINT* puArgErr)
{
- xmlelem *This = impl_from_IXMLElement(iface);
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
+ TRACE("%p, %ld, %s, %lx, %d, %p, %p, %p, %p.\n", iface, dispIdMember, debugstr_guid(riid),
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
hr = get_typeinfo(IXMLElement_tid, &typeinfo);
if(SUCCEEDED(hr))
{
- hr = ITypeInfo_Invoke(typeinfo, &This->IXMLElement_iface, dispIdMember, wFlags, pDispParams,
- pVarResult, pExcepInfo, puArgErr);
+ hr = ITypeInfo_Invoke(typeinfo, iface, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
ITypeInfo_Release(typeinfo);
}
@@ -380,7 +372,7 @@ static HRESULT WINAPI xmlelem_get_type(IXMLElement *iface, LONG *p)
return E_INVALIDARG;
*p = type_libxml_to_msxml(This->node->type);
- TRACE("returning %d\n", *p);
+ TRACE("returning %ld\n", *p);
return S_OK;
}
@@ -428,7 +420,7 @@ static HRESULT WINAPI xmlelem_addChild(IXMLElement *iface, IXMLElement *pChildEl
xmlelem *childElem = impl_from_IXMLElement(pChildElem);
xmlNodePtr child;
- TRACE("(%p)->(%p %d %d)\n", This, pChildElem, lIndex, lreserved);
+ TRACE("%p, %p, %ld, %ld.\n", iface, pChildElem, lIndex, lreserved);
if (lIndex == 0)
child = xmlAddChild(This->node, childElem->node);
@@ -631,8 +623,8 @@ static HRESULT WINAPI xmlelem_collection_Invoke(IXMLElementCollection *iface, DI
static HRESULT WINAPI xmlelem_collection_put_length(IXMLElementCollection *iface, LONG v)
{
- xmlelem_collection *This = impl_from_IXMLElementCollection(iface);
- TRACE("(%p)->(%d)\n", This, v);
+ TRACE("%p, %ld.\n", iface, v);
+
return E_FAIL;
}
@@ -749,7 +741,7 @@ static HRESULT WINAPI xmlelem_collection_IEnumVARIANT_Next(
xmlelem_collection *This = impl_from_IEnumVARIANT(iface);
HRESULT hr;
- TRACE("(%p)->(%d %p %p)\n", This, celt, rgVar, fetched);
+ TRACE("%p, %lu, %p, %p.\n", iface, celt, rgVar, fetched);
if (!rgVar)
return E_INVALIDARG;
@@ -780,8 +772,7 @@ static HRESULT WINAPI xmlelem_collection_IEnumVARIANT_Next(
static HRESULT WINAPI xmlelem_collection_IEnumVARIANT_Skip(
IEnumVARIANT *iface, ULONG celt)
{
- xmlelem_collection *This = impl_from_IEnumVARIANT(iface);
- FIXME("(%p)->(%d): stub\n", This, celt);
+ FIXME("%p, %lu: stub\n", iface, celt);
return E_NOTIMPL;
}
diff --git a/dlls/msxml3/xmlparser.c b/dlls/msxml3/xmlparser.c
index 0fcb9e34340..59263d043da 100644
--- a/dlls/msxml3/xmlparser.c
+++ b/dlls/msxml3/xmlparser.c
@@ -74,7 +74,7 @@ static ULONG WINAPI xmlparser_AddRef(IXMLParser* iface)
{
xmlparser *This = impl_from_IXMLParser( iface );
ULONG ref = InterlockedIncrement( &This->ref );
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
@@ -83,7 +83,7 @@ static ULONG WINAPI xmlparser_Release(IXMLParser* iface)
xmlparser *This = impl_from_IXMLParser( iface );
ULONG ref = InterlockedDecrement( &This->ref );
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
if ( ref == 0 )
{
if(This->input)
@@ -228,9 +228,7 @@ static HRESULT WINAPI xmlparser_SetURL(IXMLParser *iface,const WCHAR *pszBaseUrl
static HRESULT WINAPI xmlparser_Load(IXMLParser *iface, BOOL bFullyAvailable,
IMoniker *pMon, LPBC pBC, DWORD dwMode)
{
- xmlparser *This = impl_from_IXMLParser( iface );
-
- FIXME("(%p %d %p %p %d)\n", This, bFullyAvailable, pMon, pBC, dwMode);
+ FIXME("%p, %d, %p, %p, %ld.\n", iface, bFullyAvailable, pMon, pBC, dwMode);
return E_NOTIMPL;
}
@@ -256,9 +254,7 @@ static HRESULT WINAPI xmlparser_SetInput(IXMLParser *iface, IUnknown *pStm)
static HRESULT WINAPI xmlparser_PushData(IXMLParser *iface, const char *pData,
ULONG nChars, BOOL fLastBuffer)
{
- xmlparser *This = impl_from_IXMLParser( iface );
-
- FIXME("(%p %s %d %d)\n", This, debugstr_a(pData), nChars, fLastBuffer);
+ FIXME("%p, %s, %lu, %d.\n", iface, debugstr_a(pData), nChars, fLastBuffer);
return E_NOTIMPL;
}
@@ -286,9 +282,7 @@ static HRESULT WINAPI xmlparser_LoadEntity(IXMLParser *iface, const WCHAR *baseU
static HRESULT WINAPI xmlparser_ParseEntity(IXMLParser *iface, const WCHAR *text,
ULONG len, BOOL fpe)
{
- xmlparser *This = impl_from_IXMLParser( iface );
-
- FIXME("(%p %s %d %d)\n", This, debugstr_w(text), len, fpe);
+ FIXME("%p, %s, %lu, %d.\n", iface, debugstr_w(text), len, fpe);
return E_NOTIMPL;
}
@@ -296,9 +290,7 @@ static HRESULT WINAPI xmlparser_ParseEntity(IXMLParser *iface, const WCHAR *text
static HRESULT WINAPI xmlparser_ExpandEntity(IXMLParser *iface, const WCHAR *text,
ULONG len)
{
- xmlparser *This = impl_from_IXMLParser( iface );
-
- FIXME("(%p %s %d)\n", This, debugstr_w(text), len);
+ FIXME("%p, %s, %ld.\n", iface, debugstr_w(text), len);
return E_NOTIMPL;
}
@@ -323,9 +315,7 @@ static HRESULT WINAPI xmlparser_GetRoot( IXMLParser *iface, PVOID *ppRoot)
static HRESULT WINAPI xmlparser_Run(IXMLParser *iface, LONG chars)
{
- xmlparser *This = impl_from_IXMLParser( iface );
-
- FIXME("(%p %d)\n", This, chars);
+ FIXME("%p, %ld.\n", iface, chars);
return E_NOTIMPL;
}
@@ -361,7 +351,7 @@ static HRESULT WINAPI xmlparser_SetFlags(IXMLParser *iface, ULONG flags)
{
xmlparser *This = impl_from_IXMLParser( iface );
- TRACE("(%p %d)\n", This, flags);
+ TRACE("%p, %lx.\n", iface, flags);
This->flags = flags;
diff --git a/dlls/msxml3/xmlview.c b/dlls/msxml3/xmlview.c
index ff561503673..91f3ecf4805 100644
--- a/dlls/msxml3/xmlview.c
+++ b/dlls/msxml3/xmlview.c
@@ -100,9 +100,9 @@ static HRESULT WINAPI XMLView_Binding_QueryInterface(
static ULONG WINAPI XMLView_Binding_AddRef(IBinding *iface)
{
Binding *This = impl_from_IBinding(iface);
- LONG ref = InterlockedIncrement(&This->ref);
+ ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
@@ -112,7 +112,7 @@ static ULONG WINAPI XMLView_Binding_Release(IBinding *iface)
Binding *This = impl_from_IBinding(iface);
ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
if(!ref) {
IBinding_Release(This->binding);
@@ -147,7 +147,7 @@ static HRESULT WINAPI XMLView_Binding_SetPriority(
IBinding *iface, LONG nPriority)
{
Binding *This = impl_from_IBinding(iface);
- TRACE("(%p)->(%d)\n", This, nPriority);
+ TRACE("%p, %ld.\n", iface, nPriority);
return IBinding_SetPriority(This->binding, nPriority);
}
@@ -229,9 +229,9 @@ static ULONG WINAPI XMLView_BindStatusCallback_AddRef(
IBindStatusCallback *iface)
{
BindStatusCallback *This = impl_from_IBindStatusCallback(iface);
- LONG ref = InterlockedIncrement(&This->ref);
+ ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
@@ -242,7 +242,7 @@ static ULONG WINAPI XMLView_BindStatusCallback_Release(
BindStatusCallback *This = impl_from_IBindStatusCallback(iface);
ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
if(!ref) {
if(This->stream)
@@ -261,7 +261,7 @@ static HRESULT WINAPI XMLView_BindStatusCallback_OnStartBinding(
IBinding *binding;
HRESULT hres;
- TRACE("(%p)->(%x %p)\n", This, dwReserved, pib);
+ TRACE("%p, %lx, %p.\n", iface, dwReserved, pib);
hres = XMLView_Binding_Create(pib, &binding);
if(FAILED(hres)) {
@@ -290,8 +290,7 @@ static HRESULT WINAPI XMLView_BindStatusCallback_GetPriority(
static HRESULT WINAPI XMLView_BindStatusCallback_OnLowResource(
IBindStatusCallback *iface, DWORD reserved)
{
- BindStatusCallback *This = impl_from_IBindStatusCallback(iface);
- FIXME("(%p)->(%x)\n", This, reserved);
+ FIXME("%p, %lx.\n", iface, reserved);
return E_NOTIMPL;
}
@@ -300,7 +299,7 @@ static HRESULT WINAPI XMLView_BindStatusCallback_OnProgress(
ULONG ulStatusCode, LPCWSTR szStatusText)
{
BindStatusCallback *This = impl_from_IBindStatusCallback(iface);
- TRACE("(%p)->(%d %d %x %s)\n", This, ulProgress, ulProgressMax,
+ TRACE("%p, %lu, %lu, %lu, %s.\n", iface, ulProgress, ulProgressMax,
ulStatusCode, debugstr_w(szStatusText));
switch(ulStatusCode) {
@@ -310,7 +309,7 @@ static HRESULT WINAPI XMLView_BindStatusCallback_OnProgress(
case BINDSTATUS_MIMETYPEAVAILABLE:
return S_OK;
default:
- FIXME("ulStatusCode: %d\n", ulStatusCode);
+ FIXME("ulStatusCode: %lu\n", ulStatusCode);
return E_NOTIMPL;
}
}
@@ -319,7 +318,7 @@ static HRESULT WINAPI XMLView_BindStatusCallback_OnStopBinding(
IBindStatusCallback *iface, HRESULT hresult, LPCWSTR szError)
{
BindStatusCallback *This = impl_from_IBindStatusCallback(iface);
- TRACE("(%p)->(%x %s)\n", This, hresult, debugstr_w(szError));
+ TRACE("%p, %#lx, %s.\n", iface, hresult, debugstr_w(szError));
return IBindStatusCallback_OnStopBinding(This->bsc, hresult, szError);
}
@@ -513,7 +512,7 @@ static HRESULT WINAPI XMLView_BindStatusCallback_OnDataAvailable(
DWORD size;
HRESULT hres;
- TRACE("(%p)->(%x %d %p %p)\n", This, grfBSCF, dwSize, pformatetc, pstgmed);
+ TRACE("%p, %lx, %ld, %p, %p.\n", iface, grfBSCF, dwSize, pformatetc, pstgmed);
if(!This->stream)
return E_FAIL;
@@ -604,7 +603,7 @@ static ULONG WINAPI XMLView_Moniker_AddRef(IMoniker *iface)
Moniker *This = impl_from_IMoniker(iface);
LONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
@@ -614,7 +613,7 @@ static ULONG WINAPI XMLView_Moniker_Release(IMoniker *iface)
Moniker *This = impl_from_IMoniker(iface);
ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
if(!ref) {
IMoniker_Release(This->mon);
@@ -691,8 +690,7 @@ static HRESULT WINAPI XMLView_Moniker_BindToStorage(IMoniker *iface, IBindCtx *p
static HRESULT WINAPI XMLView_Moniker_Reduce(IMoniker *iface, IBindCtx *pbc,
DWORD dwReduceHowFar, IMoniker **ppmkToLeft, IMoniker **ppmkReduced)
{
- Moniker *This = impl_from_IMoniker(iface);
- FIXME("(%p)->(%p %d %p %p)\n", This, pbc, dwReduceHowFar, ppmkToLeft, ppmkReduced);
+ FIXME("%p, %p, %ld, %p, %p.\n", iface, pbc, dwReduceHowFar, ppmkToLeft, ppmkReduced);
return E_NOTIMPL;
}
@@ -870,9 +868,9 @@ static HRESULT WINAPI XMLView_PersistMoniker_QueryInterface(
static ULONG WINAPI XMLView_PersistMoniker_AddRef(IPersistMoniker *iface)
{
XMLView *This = impl_from_IPersistMoniker(iface);
- LONG ref = InterlockedIncrement(&This->ref);
+ ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
@@ -882,7 +880,7 @@ static ULONG WINAPI XMLView_PersistMoniker_Release(IPersistMoniker *iface)
XMLView *This = impl_from_IPersistMoniker(iface);
ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
if(!ref) {
if(This->mon)
@@ -926,7 +924,7 @@ static HRESULT WINAPI XMLView_PersistMoniker_Load(IPersistMoniker *iface,
IUnknown *unk;
HRESULT hres;
- TRACE("(%p)->(%x %p %p %x)\n", This, fFullyAvailable, pimkName, pibc, grfMode);
+ TRACE("%p, %x, %p, %p, %lx.\n", iface, fFullyAvailable, pimkName, pibc, grfMode);
hres = IBindCtx_GetObjectParam(pibc, (LPOLESTR)XSLParametersW, &unk);
if(SUCCEEDED(hres)) {
@@ -1125,8 +1123,7 @@ static HRESULT WINAPI XMLView_PersistHistory_SaveHistory(
static HRESULT WINAPI XMLView_PersistHistory_SetPositionCookie(
IPersistHistory *iface, DWORD dwPositioncookie)
{
- XMLView *This = impl_from_IPersistHistory(iface);
- FIXME("(%p)->(%d)\n", This, dwPositioncookie);
+ FIXME("%p, %ld.\n", iface, dwPositioncookie);
return E_NOTIMPL;
}
@@ -1176,8 +1173,7 @@ static ULONG WINAPI XMLView_OleCommandTarget_Release(IOleCommandTarget *iface)
static HRESULT WINAPI XMLView_OleCommandTarget_QueryStatus(IOleCommandTarget *iface,
const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText)
{
- XMLView *This = impl_from_IOleCommandTarget(iface);
- FIXME("(%p)->(%p %x %p %p)\n", This, pguidCmdGroup, cCmds, prgCmds, pCmdText);
+ FIXME("%p, %p, %lu, %p, %p.\n", iface, pguidCmdGroup, cCmds, prgCmds, pCmdText);
return E_NOTIMPL;
}
@@ -1185,8 +1181,7 @@ static HRESULT WINAPI XMLView_OleCommandTarget_Exec(IOleCommandTarget *iface,
const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt,
VARIANT *pvaIn, VARIANT *pvaOut)
{
- XMLView *This = impl_from_IOleCommandTarget(iface);
- FIXME("(%p)->(%p %d %x %p %p)\n", This, pguidCmdGroup,
+ FIXME("%p, %p, %ld, %lx, %p, %p.\n", iface, pguidCmdGroup,
nCmdID, nCmdexecopt, pvaIn, pvaOut);
return E_NOTIMPL;
}
@@ -1249,40 +1244,35 @@ static HRESULT WINAPI XMLView_OleObject_SetHostNames(IOleObject *iface,
static HRESULT WINAPI XMLView_OleObject_Close(IOleObject *iface, DWORD dwSaveOption)
{
- XMLView *This = impl_from_IOleObject(iface);
- FIXME("(%p)->(%x)\n", This, dwSaveOption);
+ FIXME("%p, %lx.\n", iface, dwSaveOption);
return E_NOTIMPL;
}
static HRESULT WINAPI XMLView_OleObject_SetMoniker(IOleObject *iface,
DWORD dwWhichMoniker, IMoniker *pmk)
{
- XMLView *This = impl_from_IOleObject(iface);
- FIXME("(%p)->(%x %p)\n", This, dwWhichMoniker, pmk);
+ FIXME("%p, %lx, %p.\n", iface, dwWhichMoniker, pmk);
return E_NOTIMPL;
}
static HRESULT WINAPI XMLView_OleObject_GetMoniker(IOleObject *iface,
DWORD dwAssign, DWORD dwWhichMoniker, IMoniker **ppmk)
{
- XMLView *This = impl_from_IOleObject(iface);
- FIXME("(%p)->(%x %x %p)\n", This, dwAssign, dwWhichMoniker, ppmk);
+ FIXME("%p, %lx, %lx, %p.\n", iface, dwAssign, dwWhichMoniker, ppmk);
return E_NOTIMPL;
}
static HRESULT WINAPI XMLView_OleObject_InitFromData(IOleObject *iface,
IDataObject *pDataObject, BOOL fCreation, DWORD dwReserved)
{
- XMLView *This = impl_from_IOleObject(iface);
- FIXME("(%p)->(%p %x %x)\n", This, pDataObject, fCreation, dwReserved);
+ FIXME("%p, %p, %x, %lx.\n", iface, pDataObject, fCreation, dwReserved);
return E_NOTIMPL;
}
static HRESULT WINAPI XMLView_OleObject_GetClipboardData(IOleObject *iface,
DWORD dwReserved, IDataObject **ppDataObject)
{
- XMLView *This = impl_from_IOleObject(iface);
- FIXME("(%p)->(%x %p)\n", This, dwReserved, ppDataObject);
+ FIXME("%p, %lx, %p.\n", iface, dwReserved, ppDataObject);
return E_NOTIMPL;
}
@@ -1290,8 +1280,7 @@ static HRESULT WINAPI XMLView_OleObject_DoVerb(IOleObject *iface,
LONG iVerb, LPMSG lpmsg, IOleClientSite *pActiveSite,
LONG lindex, HWND hwndParent, LPCRECT lprcPosRect)
{
- XMLView *This = impl_from_IOleObject(iface);
- FIXME("(%p)->(%d %p %p %d %p %p)\n", This, iVerb, lpmsg,
+ FIXME("%p, %ld, %p, %p, %ld, %p, %p.\n", iface, iVerb, lpmsg,
pActiveSite, lindex, hwndParent, lprcPosRect);
return E_NOTIMPL;
}
@@ -1328,24 +1317,21 @@ static HRESULT WINAPI XMLView_OleObject_GetUserClassID(IOleObject *iface, CLSID
static HRESULT WINAPI XMLView_OleObject_GetUserType(IOleObject *iface,
DWORD dwFormOfType, LPOLESTR *pszUserType)
{
- XMLView *This = impl_from_IOleObject(iface);
- FIXME("(%p)->(%x %p)\n", This, dwFormOfType, pszUserType);
+ FIXME("%p, %lx, %p.\n", iface, dwFormOfType, pszUserType);
return E_NOTIMPL;
}
static HRESULT WINAPI XMLView_OleObject_SetExtent(IOleObject *iface,
DWORD dwDrawAspect, SIZEL *psizel)
{
- XMLView *This = impl_from_IOleObject(iface);
- FIXME("(%p)->(%x %p)\n", This, dwDrawAspect, psizel);
+ FIXME("%p, %lx, %p.\n", iface, dwDrawAspect, psizel);
return E_NOTIMPL;
}
static HRESULT WINAPI XMLView_OleObject_GetExtent(IOleObject *iface,
DWORD dwDrawAspect, SIZEL *psizel)
{
- XMLView *This = impl_from_IOleObject(iface);
- FIXME("(%p)->(%x %p)\n", This, dwDrawAspect, psizel);
+ FIXME("%p, %lx, %p.\n", iface, dwDrawAspect, psizel);
return E_NOTIMPL;
}
@@ -1360,8 +1346,7 @@ static HRESULT WINAPI XMLView_OleObject_Advise(IOleObject *iface,
static HRESULT WINAPI XMLView_OleObject_Unadvise(
IOleObject *iface, DWORD dwConnection)
{
- XMLView *This = impl_from_IOleObject(iface);
- FIXME("(%p)->(%d)\n", This, dwConnection);
+ FIXME("%p, %ld.\n", iface, dwConnection);
return E_NOTIMPL;
}
@@ -1376,8 +1361,7 @@ static HRESULT WINAPI XMLView_OleObject_EnumAdvise(
static HRESULT WINAPI XMLView_OleObject_GetMiscStatus(
IOleObject *iface, DWORD dwAspect, DWORD *pdwStatus)
{
- XMLView *This = impl_from_IOleObject(iface);
- FIXME("(%p)->(%d %p)\n", This, dwAspect, pdwStatus);
+ FIXME("%p, %ld, %p.\n", iface, dwAspect, pdwStatus);
return E_NOTIMPL;
}
--
2.34.1
1
0
Otherwise .c files with #pragma makedep implib will not be built
--
I think that compilation should not need to occur during `make install`;
it should just be copying files (and maybe stripping) files into DESTDIR,
without any need to modify the build folder.
assuming (of course) that `make all` was up-to-date beforehand.
---
tools/makedep.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/makedep.c b/tools/makedep.c
index 0bb77ce56df..a4fc08e184a 100644
--- a/tools/makedep.c
+++ b/tools/makedep.c
@@ -3262,6 +3262,7 @@ static void output_import_lib( struct makefile *make )
output_filename( spec_file );
output_filenames_obj_dir( make, make->implib_files );
output( "\n" );
+ strarray_add( &make->all_targets, strmake( "lib%s.a", make->importlib ));
add_install_rule( make, make->importlib,
strmake( "lib%s.a", make->importlib ),
strmake( "d%s/lib%s.a", so_dir, make->importlib ));
@@ -3285,6 +3286,7 @@ static void output_import_lib( struct makefile *make )
output_filename( spec_file );
output_filenames_obj_dir( make, make->crossimplib_files );
output( "\n" );
+ strarray_add( &make->all_targets, strmake( "lib%s.cross.a", make->importlib ));
add_install_rule( make, make->importlib,
strmake( "lib%s.cross.a", make->importlib ),
strmake( "d%s/lib%s.a", pe_dir, make->importlib ));
@@ -3362,6 +3364,7 @@ static void output_static_lib( struct makefile *make )
output_filenames_obj_dir( make, make->object_files );
output_filenames_obj_dir( make, make->unixobj_files );
output( "\n" );
+ strarray_add( &make->all_targets, make->staticlib );
add_install_rule( make, make->staticlib, make->staticlib,
strmake( "d%s/%s", so_dir, make->staticlib ));
}
@@ -3378,8 +3381,11 @@ static void output_static_lib( struct makefile *make )
output_filenames_obj_dir( make, make->crossobj_files );
output( "\n" );
if (!make->extlib)
+ {
+ strarray_add( &make->all_targets, name );
add_install_rule( make, make->staticlib, name,
strmake( "d%s/%s", pe_dir, make->staticlib ));
+ }
}
}
--
2.34.1
2
4
Feb. 3, 2022
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
---
dlls/dplayx/Makefile.in | 1 -
dlls/dplayx/dplay.c | 198 +++++++++++++++++-----------------
dlls/dplayx/dplaysp.c | 34 +++---
dlls/dplayx/dplayx_global.c | 24 ++---
dlls/dplayx/dplayx_main.c | 2 +-
dlls/dplayx/dplayx_messages.c | 18 ++--
dlls/dplayx/dplobby.c | 68 ++++++------
dlls/dplayx/lobbysp.c | 4 +-
8 files changed, 174 insertions(+), 175 deletions(-)
diff --git a/dlls/dplayx/Makefile.in b/dlls/dplayx/Makefile.in
index 1a8f6c0bd8f..8d41fdbad9e 100644
--- a/dlls/dplayx/Makefile.in
+++ b/dlls/dplayx/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = dplayx.dll
IMPORTLIB = dplayx
IMPORTS = dxguid uuid winmm ole32 user32 advapi32
diff --git a/dlls/dplayx/dplay.c b/dlls/dplayx/dplay.c
index 7a796735ce8..ae929a558b2 100644
--- a/dlls/dplayx/dplay.c
+++ b/dlls/dplayx/dplay.c
@@ -271,7 +271,7 @@ HRESULT DP_HandleMessage( IDirectPlayImpl *This, const void *lpcMessageBody,
DWORD dwMessageBodySize, const void *lpcMessageHeader, WORD wCommandId, WORD wVersion,
void **lplpReply, DWORD *lpdwMsgSize )
{
- TRACE( "(%p)->(%p,0x%08x,%p,%u,%u)\n",
+ TRACE( "(%p)->(%p,0x%08lx,%p,%u,%u)\n",
This, lpcMessageBody, dwMessageBodySize, lpcMessageHeader, wCommandId,
wVersion );
@@ -302,7 +302,7 @@ HRESULT DP_HandleMessage( IDirectPlayImpl *This, const void *lpcMessageBody,
*lplpReply = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, *lpdwMsgSize );
- FIXME( "Ignoring dwFlags 0x%08x in request msg\n",
+ FIXME( "Ignoring dwFlags 0x%08lx in request msg\n",
lpcMsg->dwFlags );
/* Setup the reply */
@@ -315,7 +315,7 @@ HRESULT DP_HandleMessage( IDirectPlayImpl *This, const void *lpcMessageBody,
lpReply->dpidNewPlayerId = DP_NextObjectId();
- TRACE( "Allocating new playerid 0x%08x from remote request\n",
+ TRACE( "Allocating new playerid 0x%08lx from remote request\n",
lpReply->dpidNewPlayerId );
break;
}
@@ -326,7 +326,7 @@ HRESULT DP_HandleMessage( IDirectPlayImpl *This, const void *lpcMessageBody,
break;
case DPMSGCMD_JUSTENVELOPE:
- TRACE( "GOT THE SELF MESSAGE: %p -> 0x%08x\n", lpcMessageHeader, ((const DWORD *)lpcMessageHeader)[1] );
+ TRACE( "GOT THE SELF MESSAGE: %p -> 0x%08lx\n", lpcMessageHeader, ((const DWORD *)lpcMessageHeader)[1] );
NS_SetLocalAddr( This->dp2->lpNameServerData, lpcMessageHeader, 20 );
DP_MSG_ReplyReceived( This, wCommandId, lpcMessageBody, dwMessageBodySize );
@@ -362,7 +362,7 @@ static ULONG WINAPI IDirectPlayImpl_AddRef( IDirectPlay *iface )
IDirectPlayImpl *This = impl_from_IDirectPlay( iface );
ULONG ref = InterlockedIncrement( &This->ref );
- TRACE( "(%p) ref=%d\n", This, ref );
+ TRACE( "(%p) ref=%ld\n", This, ref );
if ( ref == 1 )
InterlockedIncrement( &This->numIfaces );
@@ -375,7 +375,7 @@ static ULONG WINAPI IDirectPlayImpl_Release( IDirectPlay *iface )
IDirectPlayImpl *This = impl_from_IDirectPlay( iface );
ULONG ref = InterlockedDecrement( &This->ref );
- TRACE( "(%p) ref=%d\n", This, ref );
+ TRACE( "(%p) ref=%ld\n", This, ref );
if ( !ref && !InterlockedDecrement( &This->numIfaces ) )
dplay_destroy( This );
@@ -387,7 +387,7 @@ static HRESULT WINAPI IDirectPlayImpl_AddPlayerToGroup( IDirectPlay *iface, DPID
DPID player )
{
IDirectPlayImpl *This = impl_from_IDirectPlay( iface );
- FIXME( "(%p)->(0x%08x,0x%08x): stub\n", This, group, player );
+ FIXME( "(%p)->(0x%08lx,0x%08lx): stub\n", This, group, player );
return E_NOTIMPL;
}
@@ -419,21 +419,21 @@ static HRESULT WINAPI IDirectPlayImpl_DeletePlayerFromGroup( IDirectPlay *iface,
DPID player )
{
IDirectPlayImpl *This = impl_from_IDirectPlay( iface );
- FIXME( "(%p)->(0x%08x,0x%08x): stub\n", This, group, player );
+ FIXME( "(%p)->(0x%08lx,0x%08lx): stub\n", This, group, player );
return E_NOTIMPL;
}
static HRESULT WINAPI IDirectPlayImpl_DestroyPlayer( IDirectPlay *iface, DPID player )
{
IDirectPlayImpl *This = impl_from_IDirectPlay( iface );
- FIXME( "(%p)->(0x%08x): stub\n", This, player );
+ FIXME( "(%p)->(0x%08lx): stub\n", This, player );
return E_NOTIMPL;
}
static HRESULT WINAPI IDirectPlayImpl_DestroyGroup( IDirectPlay *iface, DPID group )
{
IDirectPlayImpl *This = impl_from_IDirectPlay( iface );
- FIXME( "(%p)->(0x%08x): stub\n", This, group );
+ FIXME( "(%p)->(0x%08lx): stub\n", This, group );
return E_NOTIMPL;
}
@@ -448,7 +448,7 @@ static HRESULT WINAPI IDirectPlayImpl_EnumGroupPlayers( IDirectPlay *iface, DPID
LPDPENUMPLAYERSCALLBACK enumplayercb, void *context, DWORD flags )
{
IDirectPlayImpl *This = impl_from_IDirectPlay( iface );
- FIXME( "(%p)->(0x%08x,%p,%p,0x%08x): stub\n", This, group, enumplayercb, context, flags );
+ FIXME( "(%p)->(0x%08lx,%p,%p,0x%08lx): stub\n", This, group, enumplayercb, context, flags );
return E_NOTIMPL;
}
@@ -456,7 +456,7 @@ static HRESULT WINAPI IDirectPlayImpl_EnumGroups( IDirectPlay *iface, DWORD sess
LPDPENUMPLAYERSCALLBACK enumplayercb, void *context, DWORD flags )
{
IDirectPlayImpl *This = impl_from_IDirectPlay( iface );
- FIXME( "(%p)->(0x%08x,%p,%p,0x%08x): stub\n", This, session, enumplayercb, context, flags );
+ FIXME( "(%p)->(0x%08lx,%p,%p,0x%08lx): stub\n", This, session, enumplayercb, context, flags );
return E_NOTIMPL;
}
@@ -464,7 +464,7 @@ static HRESULT WINAPI IDirectPlayImpl_EnumPlayers( IDirectPlay *iface, DWORD ses
LPDPENUMPLAYERSCALLBACK enumplayercb, void *context, DWORD flags )
{
IDirectPlayImpl *This = impl_from_IDirectPlay( iface );
- FIXME( "(%p)->(0x%08x,%p,%p,0x%08x): stub\n", This, session, enumplayercb, context, flags );
+ FIXME( "(%p)->(0x%08lx,%p,%p,0x%08lx): stub\n", This, session, enumplayercb, context, flags );
return E_NOTIMPL;
}
@@ -472,7 +472,7 @@ static HRESULT WINAPI IDirectPlayImpl_EnumSessions( IDirectPlay *iface, DPSESSIO
DWORD timeout, LPDPENUMSESSIONSCALLBACK enumsessioncb, void *context, DWORD flags )
{
IDirectPlayImpl *This = impl_from_IDirectPlay( iface );
- FIXME( "(%p)->(%p,%u,%p,%p,0x%08x): stub\n", This, sdesc, timeout, enumsessioncb, context,
+ FIXME( "(%p)->(%p,%lu,%p,%p,0x%08lx): stub\n", This, sdesc, timeout, enumsessioncb, context,
flags );
return E_NOTIMPL;
}
@@ -488,14 +488,14 @@ static HRESULT WINAPI IDirectPlayImpl_GetMessageCount( IDirectPlay *iface, DPID
DWORD *count )
{
IDirectPlayImpl *This = impl_from_IDirectPlay( iface );
- FIXME( "(%p)->(0x%08x,%p): stub\n", This, player, count );
+ FIXME( "(%p)->(0x%08lx,%p): stub\n", This, player, count );
return E_NOTIMPL;
}
static HRESULT WINAPI IDirectPlayImpl_GetPlayerCaps( IDirectPlay *iface, DPID player, DPCAPS *caps )
{
IDirectPlayImpl *This = impl_from_IDirectPlay( iface );
- FIXME( "(%p)->(0x%08x,%p): stub\n", This, player, caps );
+ FIXME( "(%p)->(0x%08lx,%p): stub\n", This, player, caps );
return E_NOTIMPL;
}
@@ -503,7 +503,7 @@ static HRESULT WINAPI IDirectPlayImpl_GetPlayerName( IDirectPlay *iface, DPID pl
DWORD *size_name, LPSTR fullname, DWORD *size_fullname )
{
IDirectPlayImpl *This = impl_from_IDirectPlay( iface );
- FIXME( "(%p)->(0x%08x,%p,%p,%p,%p): stub\n", This, player, name, size_name, fullname,
+ FIXME( "(%p)->(0x%08lx,%p,%p,%p,%p): stub\n", This, player, name, size_name, fullname,
size_fullname );
return E_NOTIMPL;
}
@@ -526,7 +526,7 @@ static HRESULT WINAPI IDirectPlayImpl_Receive( IDirectPlay *iface, DPID *from, D
DWORD flags, void *data, DWORD *size )
{
IDirectPlayImpl *This = impl_from_IDirectPlay( iface );
- FIXME( "(%p)->(%p,%p,0x%08x,%p,%p): stub\n", This, from, to, flags, data, size );
+ FIXME( "(%p)->(%p,%p,0x%08lx,%p,%p): stub\n", This, from, to, flags, data, size );
return E_NOTIMPL;
}
@@ -541,7 +541,7 @@ static HRESULT WINAPI IDirectPlayImpl_Send( IDirectPlay *iface, DPID from, DPID
void *data, DWORD size )
{
IDirectPlayImpl *This = impl_from_IDirectPlay( iface );
- FIXME( "(%p)->(0x%08x,0x%08x,0x%08x,%p,%u): stub\n", This, from, to, flags, data, size );
+ FIXME( "(%p)->(0x%08lx,0x%08lx,0x%08lx,%p,%lu): stub\n", This, from, to, flags, data, size );
return E_NOTIMPL;
}
@@ -549,7 +549,7 @@ static HRESULT WINAPI IDirectPlayImpl_SetPlayerName( IDirectPlay *iface, DPID pl
LPSTR fullname )
{
IDirectPlayImpl *This = impl_from_IDirectPlay( iface );
- FIXME( "(%p)->(0x%08x,%s,%s): stub\n", This, player, debugstr_a( name ),
+ FIXME( "(%p)->(0x%08lx,%s,%s): stub\n", This, player, debugstr_a( name ),
debugstr_a ( fullname ) );
return E_NOTIMPL;
}
@@ -680,7 +680,7 @@ static ULONG WINAPI IDirectPlay2AImpl_AddRef( IDirectPlay2A *iface )
IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface );
ULONG ref = InterlockedIncrement( &This->ref2A );
- TRACE( "(%p) ref2A=%d\n", This, ref );
+ TRACE( "(%p) ref2A=%ld\n", This, ref );
if ( ref == 1 )
InterlockedIncrement( &This->numIfaces );
@@ -693,7 +693,7 @@ static ULONG WINAPI IDirectPlay2Impl_AddRef( IDirectPlay2 *iface )
IDirectPlayImpl *This = impl_from_IDirectPlay2( iface );
ULONG ref = InterlockedIncrement( &This->ref2 );
- TRACE( "(%p) ref2=%d\n", This, ref );
+ TRACE( "(%p) ref2=%ld\n", This, ref );
if ( ref == 1 )
InterlockedIncrement( &This->numIfaces );
@@ -706,7 +706,7 @@ static ULONG WINAPI IDirectPlay3AImpl_AddRef( IDirectPlay3A *iface )
IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface );
ULONG ref = InterlockedIncrement( &This->ref3A );
- TRACE( "(%p) ref3A=%d\n", This, ref );
+ TRACE( "(%p) ref3A=%ld\n", This, ref );
if ( ref == 1 )
InterlockedIncrement( &This->numIfaces );
@@ -719,7 +719,7 @@ static ULONG WINAPI IDirectPlay3Impl_AddRef( IDirectPlay3 *iface )
IDirectPlayImpl *This = impl_from_IDirectPlay3( iface );
ULONG ref = InterlockedIncrement( &This->ref3 );
- TRACE( "(%p) ref3=%d\n", This, ref );
+ TRACE( "(%p) ref3=%ld\n", This, ref );
if ( ref == 1 )
InterlockedIncrement( &This->numIfaces );
@@ -732,7 +732,7 @@ static ULONG WINAPI IDirectPlay4AImpl_AddRef(IDirectPlay4A *iface)
IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface );
ULONG ref = InterlockedIncrement( &This->ref4A );
- TRACE( "(%p) ref4A=%d\n", This, ref );
+ TRACE( "(%p) ref4A=%ld\n", This, ref );
if ( ref == 1 )
InterlockedIncrement( &This->numIfaces );
@@ -745,7 +745,7 @@ static ULONG WINAPI IDirectPlay4Impl_AddRef(IDirectPlay4 *iface)
IDirectPlayImpl *This = impl_from_IDirectPlay4( iface );
ULONG ref = InterlockedIncrement( &This->ref4 );
- TRACE( "(%p) ref4=%d\n", This, ref );
+ TRACE( "(%p) ref4=%ld\n", This, ref );
if ( ref == 1 )
InterlockedIncrement( &This->numIfaces );
@@ -758,7 +758,7 @@ static ULONG WINAPI IDirectPlay2AImpl_Release( IDirectPlay2A *iface )
IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface );
ULONG ref = InterlockedDecrement( &This->ref2A );
- TRACE( "(%p) ref2A=%d\n", This, ref );
+ TRACE( "(%p) ref2A=%ld\n", This, ref );
if ( !ref && !InterlockedDecrement( &This->numIfaces ) )
dplay_destroy( This );
@@ -771,7 +771,7 @@ static ULONG WINAPI IDirectPlay2Impl_Release( IDirectPlay2 *iface )
IDirectPlayImpl *This = impl_from_IDirectPlay2( iface );
ULONG ref = InterlockedDecrement( &This->ref2 );
- TRACE( "(%p) ref2=%d\n", This, ref );
+ TRACE( "(%p) ref2=%ld\n", This, ref );
if ( !ref && !InterlockedDecrement( &This->numIfaces ) )
dplay_destroy( This );
@@ -784,7 +784,7 @@ static ULONG WINAPI IDirectPlay3AImpl_Release( IDirectPlay3A *iface )
IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface );
ULONG ref = InterlockedDecrement( &This->ref3A );
- TRACE( "(%p) ref3A=%d\n", This, ref );
+ TRACE( "(%p) ref3A=%ld\n", This, ref );
if ( !ref && !InterlockedDecrement( &This->numIfaces ) )
dplay_destroy( This );
@@ -797,7 +797,7 @@ static ULONG WINAPI IDirectPlay3Impl_Release( IDirectPlay3 *iface )
IDirectPlayImpl *This = impl_from_IDirectPlay3( iface );
ULONG ref = InterlockedDecrement( &This->ref3 );
- TRACE( "(%p) ref3=%d\n", This, ref );
+ TRACE( "(%p) ref3=%ld\n", This, ref );
if ( !ref && !InterlockedDecrement( &This->numIfaces ) )
dplay_destroy( This );
@@ -810,7 +810,7 @@ static ULONG WINAPI IDirectPlay4AImpl_Release(IDirectPlay4A *iface)
IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface );
ULONG ref = InterlockedDecrement( &This->ref4A );
- TRACE( "(%p) ref4A=%d\n", This, ref );
+ TRACE( "(%p) ref4A=%ld\n", This, ref );
if ( !ref && !InterlockedDecrement( &This->numIfaces ) )
dplay_destroy( This );
@@ -823,7 +823,7 @@ static ULONG WINAPI IDirectPlay4Impl_Release(IDirectPlay4 *iface)
IDirectPlayImpl *This = impl_from_IDirectPlay4( iface );
ULONG ref = InterlockedDecrement( &This->ref4 );
- TRACE( "(%p) ref4=%d\n", This, ref );
+ TRACE( "(%p) ref4=%ld\n", This, ref );
if ( !ref && !InterlockedDecrement( &This->numIfaces ) )
dplay_destroy( This );
@@ -874,7 +874,7 @@ static HRESULT WINAPI IDirectPlay4Impl_AddPlayerToGroup( IDirectPlay4 *iface, DP
lpPlayerList plist;
lpPlayerList newplist;
- TRACE( "(%p)->(0x%08x,0x%08x)\n", This, group, player );
+ TRACE( "(%p)->(0x%08lx,0x%08lx)\n", This, group, player );
if ( This->dp2->connectionInitialized == NO_PROVIDER )
return DPERR_UNINITIALIZED;
@@ -1023,7 +1023,7 @@ static lpGroupData DP_CreateGroup( IDirectPlayImpl *This, const DPID *lpid, cons
/* FIXME: Should we validate the dwFlags? */
lpGData->dwFlags = dwFlags;
- TRACE( "Created group id 0x%08x\n", *lpid );
+ TRACE( "Created group id 0x%08lx\n", *lpid );
return lpGData;
}
@@ -1033,13 +1033,13 @@ static void DP_DeleteGroup( IDirectPlayImpl *This, DPID dpid )
{
lpGroupList lpGList;
- TRACE( "(%p)->(0x%08x)\n", This, dpid );
+ TRACE( "(%p)->(0x%08lx)\n", This, dpid );
DPQ_REMOVE_ENTRY( This->dp2->lpSysGroup->groups, groups, lpGData->dpid, ==, dpid, lpGList );
if( lpGList == NULL )
{
- ERR( "DPID 0x%08x not found\n", dpid );
+ ERR( "DPID 0x%08lx not found\n", dpid );
return;
}
@@ -1062,7 +1062,7 @@ static lpGroupData DP_FindAnyGroup( IDirectPlayImpl *This, DPID dpid )
{
lpGroupList lpGroups;
- TRACE( "(%p)->(0x%08x)\n", This, dpid );
+ TRACE( "(%p)->(0x%08lx)\n", This, dpid );
if( dpid == DPID_SYSTEM_GROUP )
{
@@ -1086,7 +1086,7 @@ static HRESULT DP_IF_CreateGroup( IDirectPlayImpl *This, void *lpMsgHdr, DPID *l
{
lpGroupData lpGData;
- TRACE( "(%p)->(%p,%p,%p,%p,0x%08x,0x%08x,%u)\n",
+ TRACE( "(%p)->(%p,%p,%p,%p,0x%08lx,0x%08lx,%u)\n",
This, lpMsgHdr, lpidGroup, lpGroupName, lpData, dwDataSize,
dwFlags, bAnsi );
@@ -1333,7 +1333,7 @@ static lpPlayerData DP_CreatePlayer( IDirectPlayImpl *This, DPID *lpid, DPNAME *
/* Initialize the SP data section */
lpPData->lpSPPlayerData = DPSP_CreateSPPlayerData();
- TRACE( "Created player id 0x%08x\n", *lpid );
+ TRACE( "Created player id 0x%08lx\n", *lpid );
if( ~dwFlags & DPLAYI_PLAYER_SYSPLAYER )
This->dp2->lpSessionDesc->dwCurrentPlayers++;
@@ -1354,13 +1354,13 @@ static void DP_DeletePlayer( IDirectPlayImpl *This, DPID dpid )
{
lpPlayerList lpPList;
- TRACE( "(%p)->(0x%08x)\n", This, dpid );
+ TRACE( "(%p)->(0x%08lx)\n", This, dpid );
DPQ_REMOVE_ENTRY( This->dp2->lpSysGroup->players, players, lpPData->dpid, ==, dpid, lpPList );
if( lpPList == NULL )
{
- ERR( "DPID 0x%08x not found\n", dpid );
+ ERR( "DPID 0x%08lx not found\n", dpid );
return;
}
@@ -1385,7 +1385,7 @@ static lpPlayerList DP_FindPlayer( IDirectPlayImpl *This, DPID dpid )
{
lpPlayerList lpPlayers;
- TRACE( "(%p)->(0x%08x)\n", This, dpid );
+ TRACE( "(%p)->(0x%08lx)\n", This, dpid );
if(This->dp2->lpSysGroup == NULL)
return NULL;
@@ -1504,7 +1504,7 @@ static HRESULT DP_IF_CreatePlayer( IDirectPlayImpl *This, void *lpMsgHdr, DPID *
lpPlayerList lpPList;
DWORD dwCreateFlags = 0;
- TRACE( "(%p)->(%p,%p,%p,%p,0x%08x,0x%08x,%u)\n",
+ TRACE( "(%p)->(%p,%p,%p,%p,0x%08lx,0x%08lx,%u)\n",
This, lpidPlayer, lpPlayerName, hEvent, lpData,
dwDataSize, dwFlags, bAnsi );
if( This->dp2->connectionInitialized == NO_PROVIDER )
@@ -1558,7 +1558,7 @@ static HRESULT DP_IF_CreatePlayer( IDirectPlayImpl *This, void *lpMsgHdr, DPID *
)
{
/* Assume non fatal failure */
- ERR( "unknown dwFlags = 0x%08x\n", dwFlags );
+ ERR( "unknown dwFlags = 0x%08lx\n", dwFlags );
}
/* If the name is not specified, we must provide one */
@@ -1619,7 +1619,7 @@ static HRESULT DP_IF_CreatePlayer( IDirectPlayImpl *This, void *lpMsgHdr, DPID *
data.lpSPMessageHeader = lpMsgHdr;
data.lpISP = This->dp2->spData.lpISP;
- TRACE( "Calling SP CreatePlayer 0x%08x: dwFlags: 0x%08x lpMsgHdr: %p\n",
+ TRACE( "Calling SP CreatePlayer 0x%08lx: dwFlags: 0x%08lx lpMsgHdr: %p\n",
*lpidPlayer, data.dwFlags, data.lpSPMessageHeader );
hr = (*This->dp2->spData.lpCB->CreatePlayer)( &data );
@@ -1829,7 +1829,7 @@ static HRESULT WINAPI IDirectPlay4Impl_DeletePlayerFromGroup( IDirectPlay4 *ifac
lpGroupData gdata;
lpPlayerList plist;
- TRACE( "(%p)->(0x%08x,0x%08x)\n", This, group, player );
+ TRACE( "(%p)->(0x%08lx,0x%08lx)\n", This, group, player );
/* Find the group */
if ( ( gdata = DP_FindAnyGroup( This, group ) ) == NULL )
@@ -1886,18 +1886,18 @@ cbRemoveGroupOrPlayer(
{
lpDPRGOPContext lpCtxt = (lpDPRGOPContext)lpContext;
- TRACE( "Removing element:0x%08x (type:0x%08x) from element:0x%08x\n",
+ TRACE( "Removing element:0x%08lx (type:0x%08lx) from element:0x%08lx\n",
dpId, dwPlayerType, lpCtxt->idGroup );
if( dwPlayerType == DPPLAYERTYPE_GROUP )
{
if ( FAILED( IDirectPlayX_DeleteGroupFromGroup( &lpCtxt->This->IDirectPlay4_iface,
lpCtxt->idGroup, dpId ) ) )
- ERR( "Unable to delete group 0x%08x from group 0x%08x\n", dpId, lpCtxt->idGroup );
+ ERR( "Unable to delete group 0x%08lx from group 0x%08lx\n", dpId, lpCtxt->idGroup );
}
else if ( FAILED( IDirectPlayX_DeletePlayerFromGroup( &lpCtxt->This->IDirectPlay4_iface,
lpCtxt->idGroup, dpId ) ) )
- ERR( "Unable to delete player 0x%08x from grp 0x%08x\n", dpId, lpCtxt->idGroup );
+ ERR( "Unable to delete player 0x%08lx from grp 0x%08lx\n", dpId, lpCtxt->idGroup );
return TRUE; /* Continue enumeration */
}
@@ -1907,7 +1907,7 @@ static HRESULT DP_IF_DestroyGroup( IDirectPlayImpl *This, void *lpMsgHdr, DPID i
lpGroupData lpGData;
DPRGOPContext context;
- FIXME( "(%p)->(%p,0x%08x,%u): semi stub\n",
+ FIXME( "(%p)->(%p,0x%08lx,%u): semi stub\n",
This, lpMsgHdr, idGroup, bAnsi );
/* Find the group */
@@ -2002,7 +2002,7 @@ static HRESULT DP_IF_DestroyPlayer( IDirectPlayImpl *This, void *lpMsgHdr, DPID
{
DPFAGContext cbContext;
- FIXME( "(%p)->(%p,0x%08x,%u): semi stub\n",
+ FIXME( "(%p)->(%p,0x%08lx,%u): semi stub\n",
This, lpMsgHdr, idPlayer, bAnsi );
if( This->dp2->connectionInitialized == NO_PROVIDER )
@@ -2071,7 +2071,7 @@ cbDeletePlayerFromAllGroups(
}
else
{
- ERR( "Group callback has dwPlayerType = 0x%08x\n", dwPlayerType );
+ ERR( "Group callback has dwPlayerType = 0x%08lx\n", dwPlayerType );
}
return TRUE;
@@ -2160,7 +2160,7 @@ static HRESULT WINAPI IDirectPlay4Impl_EnumGroupPlayers( IDirectPlay4 *iface, DP
lpGroupData gdata;
lpPlayerList plist;
- FIXME( "(%p)->(0x%08x,%p,%p,%p,0x%08x): semi stub\n", This, group, instance, enumplayercb,
+ FIXME( "(%p)->(0x%08lx,%p,%p,%p,0x%08lx): semi stub\n", This, group, instance, enumplayercb,
context, flags );
if ( This->dp2->connectionInitialized == NO_PROVIDER )
@@ -2327,7 +2327,7 @@ static DWORD CALLBACK DP_EnumSessionsSendAsyncRequestThread( LPVOID lpContext )
HANDLE hSuicideRequest = data->hSuicideRequest;
DWORD dwTimeout = data->dwTimeout;
- TRACE( "Thread started with timeout = 0x%08x\n", dwTimeout );
+ TRACE( "Thread started with timeout = 0x%08lx\n", dwTimeout );
for( ;; )
{
@@ -2436,7 +2436,7 @@ static HRESULT WINAPI IDirectPlay4Impl_EnumSessions( IDirectPlay4 *iface, DPSESS
DWORD size;
HRESULT hr = DP_OK;
- TRACE( "(%p)->(%p,0x%08x,%p,%p,0x%08x)\n", This, sdesc, timeout, enumsessioncb,
+ TRACE( "(%p)->(%p,0x%08lx,%p,%p,0x%08lx)\n", This, sdesc, timeout, enumsessioncb,
context, flags );
if ( This->dp2->connectionInitialized == NO_PROVIDER )
@@ -2629,7 +2629,7 @@ static HRESULT WINAPI IDirectPlay4Impl_GetGroupData( IDirectPlay4 *iface, DPID g
DWORD bufsize;
void *src;
- TRACE( "(%p)->(0x%08x,%p,%p,0x%08x)\n", This, group, data, size, flags );
+ TRACE( "(%p)->(0x%08lx,%p,%p,0x%08lx)\n", This, group, data, size, flags );
if ( ( gdata = DP_FindAnyGroup( This, group ) ) == NULL )
return DPERR_INVALIDGROUP;
@@ -2665,7 +2665,7 @@ static HRESULT DP_IF_GetGroupName( IDirectPlayImpl *This, DPID idGroup, void *lp
LPDPNAME lpName = lpData;
DWORD dwRequiredDataSize;
- FIXME("(%p)->(0x%08x,%p,%p,%u) ANSI ignored\n",
+ FIXME("(%p)->(0x%08lx,%p,%p,%u) ANSI ignored\n",
This, idGroup, lpData, lpdwDataSize, bAnsi );
if( ( lpGData = DP_FindAnyGroup( This, idGroup ) ) == NULL )
@@ -2833,7 +2833,7 @@ static HRESULT WINAPI IDirectPlay4AImpl_GetPlayerAddress( IDirectPlay4A *iface,
void *data, DWORD *size )
{
IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface );
- FIXME("(%p)->(0x%08x,%p,%p): stub\n", This, player, data, size );
+ FIXME("(%p)->(0x%08lx,%p,%p): stub\n", This, player, data, size );
return DP_OK;
}
@@ -2841,7 +2841,7 @@ static HRESULT WINAPI IDirectPlay4Impl_GetPlayerAddress( IDirectPlay4 *iface, DP
void *data, DWORD *size )
{
IDirectPlayImpl *This = impl_from_IDirectPlay4( iface );
- FIXME( "(%p)->(0x%08x,%p,%p): stub\n", This, player, data, size );
+ FIXME( "(%p)->(0x%08lx,%p,%p): stub\n", This, player, data, size );
return DP_OK;
}
@@ -2886,7 +2886,7 @@ static HRESULT WINAPI IDirectPlay4Impl_GetPlayerCaps( IDirectPlay4 *iface, DPID
IDirectPlayImpl *This = impl_from_IDirectPlay4( iface );
DPSP_GETCAPSDATA data;
- TRACE( "(%p)->(0x%08x,%p,0x%08x)\n", This, player, caps, flags);
+ TRACE( "(%p)->(0x%08lx,%p,0x%08lx)\n", This, player, caps, flags);
if ( !caps )
return DPERR_INVALIDPARAMS;
@@ -2949,7 +2949,7 @@ static HRESULT WINAPI IDirectPlay4Impl_GetPlayerData( IDirectPlay4 *iface, DPID
DWORD bufsize;
void *src;
- TRACE( "(%p)->(0x%08x,%p,%p,0x%08x)\n", This, player, data, size, flags );
+ TRACE( "(%p)->(0x%08lx,%p,%p,0x%08lx)\n", This, player, data, size, flags );
if ( This->dp2->connectionInitialized == NO_PROVIDER )
return DPERR_UNINITIALIZED;
@@ -2987,7 +2987,7 @@ static HRESULT DP_IF_GetPlayerName( IDirectPlayImpl *This, DPID idPlayer, void *
LPDPNAME lpName = lpData;
DWORD dwRequiredDataSize;
- FIXME( "(%p)->(0x%08x,%p,%p,%u): ANSI\n",
+ FIXME( "(%p)->(0x%08lx,%p,%p,%u): ANSI\n",
This, idPlayer, lpData, lpdwDataSize, bAnsi );
if( This->dp2->connectionInitialized == NO_PROVIDER )
@@ -3208,7 +3208,7 @@ static HRESULT DP_SecureOpen( IDirectPlayImpl *This, const DPSESSIONDESC2 *lpsd,
{
HRESULT hr = DP_OK;
- FIXME( "(%p)->(%p,0x%08x,%p,%p): partial stub\n",
+ FIXME( "(%p)->(%p,0x%08lx,%p,%p): partial stub\n",
This, lpsd, dwFlags, lpSecurity, lpCredentials );
if( This->dp2->connectionInitialized == NO_PROVIDER )
@@ -3218,7 +3218,7 @@ static HRESULT DP_SecureOpen( IDirectPlayImpl *This, const DPSESSIONDESC2 *lpsd,
if( lpsd->dwSize != sizeof(DPSESSIONDESC2) )
{
- TRACE( ": rejecting invalid dpsd size (%d).\n", lpsd->dwSize );
+ TRACE( ": rejecting invalid dpsd size (%ld).\n", lpsd->dwSize );
return DPERR_INVALIDPARAMS;
}
@@ -3358,7 +3358,7 @@ static HRESULT DP_IF_Receive( IDirectPlayImpl *This, DPID *lpidFrom, DPID *lpidT
{
LPDPMSG lpMsg = NULL;
- FIXME( "(%p)->(%p,%p,0x%08x,%p,%p,%u): stub\n",
+ FIXME( "(%p)->(%p,%p,0x%08lx,%p,%p,%u): stub\n",
This, lpidFrom, lpidTo, dwFlags, lpData, lpdwDataSize, bAnsi );
if( This->dp2->connectionInitialized == NO_PROVIDER )
@@ -3392,11 +3392,11 @@ static HRESULT DP_IF_Receive( IDirectPlayImpl *This, DPID *lpidFrom, DPID *lpidT
( dwFlags & DPRECEIVE_FROMPLAYER )
)
{
- FIXME( "Find matching message 0x%08x\n", dwFlags );
+ FIXME( "Find matching message 0x%08lx\n", dwFlags );
}
else
{
- ERR( "Hmmm..dwFlags 0x%08x\n", dwFlags );
+ ERR( "Hmmm..dwFlags 0x%08lx\n", dwFlags );
}
if( lpMsg == NULL )
@@ -3533,7 +3533,7 @@ static HRESULT WINAPI IDirectPlay4Impl_SetGroupData( IDirectPlay4 *iface, DPID g
IDirectPlayImpl *This = impl_from_IDirectPlay4( iface );
lpGroupData gdata;
- TRACE( "(%p)->(0x%08x,%p,0x%08x,0x%08x)\n", This, group, data, size, flags );
+ TRACE( "(%p)->(0x%08lx,%p,0x%08lx,0x%08lx)\n", This, group, data, size, flags );
/* Parameter check */
if ( !data && size )
@@ -3567,7 +3567,7 @@ static HRESULT DP_IF_SetGroupName( IDirectPlayImpl *This, DPID idGroup, DPNAME *
{
lpGroupData lpGData;
- TRACE( "(%p)->(0x%08x,%p,0x%08x,%u)\n", This, idGroup,
+ TRACE( "(%p)->(0x%08lx,%p,0x%08lx,%u)\n", This, idGroup,
lpGroupName, dwFlags, bAnsi );
if( ( lpGData = DP_FindAnyGroup( This, idGroup ) ) == NULL )
@@ -3666,7 +3666,7 @@ static HRESULT WINAPI IDirectPlay4Impl_SetPlayerData( IDirectPlay4 *iface, DPID
IDirectPlayImpl *This = impl_from_IDirectPlay4( iface );
lpPlayerList plist;
- TRACE( "(%p)->(0x%08x,%p,0x%08x,0x%08x)\n", This, player, data, size, flags );
+ TRACE( "(%p)->(0x%08lx,%p,0x%08lx,0x%08lx)\n", This, player, data, size, flags );
if ( This->dp2->connectionInitialized == NO_PROVIDER )
return DPERR_UNINITIALIZED;
@@ -3700,7 +3700,7 @@ static HRESULT DP_IF_SetPlayerName( IDirectPlayImpl *This, DPID idPlayer, DPNAME
{
lpPlayerList lpPList;
- TRACE( "(%p)->(0x%08x,%p,0x%08x,%u)\n",
+ TRACE( "(%p)->(0x%08lx,%p,0x%08lx,%u)\n",
This, idPlayer, lpPlayerName, dwFlags, bAnsi );
if( This->dp2->connectionInitialized == NO_PROVIDER )
@@ -3769,7 +3769,7 @@ static HRESULT DP_SetSessionDesc( IDirectPlayImpl *This, const DPSESSIONDESC2 *l
DWORD dwRequiredSize;
LPDPSESSIONDESC2 lpTempSessDesc;
- TRACE( "(%p)->(%p,0x%08x,%u,%u)\n",
+ TRACE( "(%p)->(%p,0x%08lx,%u,%u)\n",
This, lpSessDesc, dwFlags, bInitial, bAnsi );
if( This->dp2->connectionInitialized == NO_PROVIDER )
@@ -3988,7 +3988,7 @@ static HRESULT WINAPI IDirectPlay4Impl_AddGroupToGroup( IDirectPlay4 *iface, DPI
lpGroupData gdata;
lpGroupList glist;
- TRACE( "(%p)->(0x%08x,0x%08x)\n", This, parent, group );
+ TRACE( "(%p)->(0x%08lx,0x%08lx)\n", This, parent, group );
if ( This->dp2->connectionInitialized == NO_PROVIDER )
return DPERR_UNINITIALIZED;
@@ -4025,7 +4025,7 @@ static HRESULT DP_IF_CreateGroupInGroup( IDirectPlayImpl *This, void *lpMsgHdr,
lpGroupList lpGList;
lpGroupData lpGData;
- TRACE( "(%p)->(0x%08x,%p,%p,%p,0x%08x,0x%08x,%u)\n",
+ TRACE( "(%p)->(0x%08lx,%p,%p,%p,0x%08lx,0x%08lx,%u)\n",
This, idParentGroup, lpidGroup, lpGroupName, lpData,
dwDataSize, dwFlags, bAnsi );
@@ -4171,7 +4171,7 @@ static HRESULT WINAPI IDirectPlay4Impl_DeleteGroupFromGroup( IDirectPlay4 *iface
lpGroupList glist;
lpGroupData parentdata;
- TRACE("(%p)->(0x%08x,0x%08x)\n", This, parent, group );
+ TRACE("(%p)->(0x%08lx,0x%08lx)\n", This, parent, group );
/* Is the parent group valid? */
if ( ( parentdata = DP_FindAnyGroup(This, parent ) ) == NULL )
@@ -4253,7 +4253,7 @@ static HRESULT WINAPI IDirectPlay4AImpl_EnumConnections( IDirectPlay4A *iface,
DWORD dwFlags )
{
IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface );
- TRACE("(%p)->(%p,%p,%p,0x%08x)\n", This, lpguidApplication, lpEnumCallback, lpContext, dwFlags );
+ TRACE("(%p)->(%p,%p,%p,0x%08lx)\n", This, lpguidApplication, lpEnumCallback, lpContext, dwFlags );
/* A default dwFlags (0) is backwards compatible -- DPCONNECTION_DIRECTPLAY */
if( dwFlags == 0 )
@@ -4522,7 +4522,7 @@ static HRESULT WINAPI IDirectPlay4Impl_EnumGroupsInGroup( IDirectPlay4 *iface, D
lpGroupList glist;
lpGroupData gdata;
- FIXME( "(%p)->(0x%08x,%p,%p,%p,0x%08x): semi stub\n", This, group, instance, enumplayercb,
+ FIXME( "(%p)->(0x%08lx,%p,%p,%p,0x%08lx): semi stub\n", This, group, instance, enumplayercb,
context, flags );
if ( This->dp2->connectionInitialized == NO_PROVIDER )
@@ -4569,7 +4569,7 @@ static HRESULT WINAPI IDirectPlay4AImpl_GetGroupConnectionSettings( IDirectPlay4
DWORD flags, DPID group, void *data, DWORD *size )
{
IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface );
- FIXME("(%p)->(0x%08x,0x%08x,%p,%p): stub\n", This, flags, group, data, size );
+ FIXME("(%p)->(0x%08lx,0x%08lx,%p,%p): stub\n", This, flags, group, data, size );
return DP_OK;
}
@@ -4577,7 +4577,7 @@ static HRESULT WINAPI IDirectPlay4Impl_GetGroupConnectionSettings( IDirectPlay4
DPID group, void *data, DWORD *size )
{
IDirectPlayImpl *This = impl_from_IDirectPlay4( iface );
- FIXME( "(%p)->(0x%08x,0x%08x,%p,%p): stub\n", This, flags, group, data, size );
+ FIXME( "(%p)->(0x%08lx,0x%08lx,%p,%p): stub\n", This, flags, group, data, size );
return DP_OK;
}
@@ -4592,12 +4592,12 @@ static BOOL CALLBACK DP_GetSpLpGuidFromCompoundAddress(
( IsEqualGUID( guidDataType, &DPAID_LobbyProvider ) )
)
{
- TRACE( "Found SP/LP (%s) %s (data size = 0x%08x)\n",
+ TRACE( "Found SP/LP (%s) %s (data size = 0x%08lx)\n",
debugstr_guid( guidDataType ), debugstr_guid( lpData ), dwDataSize );
if( dwDataSize != sizeof( GUID ) )
{
- ERR( "Invalid sp/lp guid size 0x%08x\n", dwDataSize );
+ ERR( "Invalid sp/lp guid size 0x%08lx\n", dwDataSize );
}
memcpy( lpContext, lpData, dwDataSize );
@@ -4731,7 +4731,7 @@ static HMODULE DP_LoadSP( LPCGUID lpcGuid, LPSPINITDATA lpSpData, LPBOOL lpbIsDp
NULL, NULL, (LPBYTE)returnBuffer,
&sizeOfReturnBuffer ) ) != ERROR_SUCCESS )
{
- ERR(": missing PATH registry data members: 0x%08x\n", dwTemp );
+ ERR(": missing PATH registry data members: 0x%08lx\n", dwTemp );
continue;
}
@@ -4853,7 +4853,7 @@ static HRESULT WINAPI IDirectPlay4Impl_InitializeConnection( IDirectPlay4 *iface
BOOL is_dp_sp; /* TRUE if Direct Play SP, FALSE if Direct Play Lobby SP */
HRESULT hr;
- TRACE( "(%p)->(%p,0x%08x)\n", This, connection, flags );
+ TRACE( "(%p)->(%p,0x%08lx)\n", This, connection, flags );
if ( !connection )
return DPERR_INVALIDPARAMS;
@@ -4956,7 +4956,7 @@ static HRESULT WINAPI IDirectPlay4AImpl_SendChatMessage( IDirectPlay4A *iface, D
DPID to, DWORD flags, DPCHAT *chatmsg )
{
IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface );
- FIXME("(%p)->(0x%08x,0x%08x,0x%08x,%p): stub\n", This, from, to, flags, chatmsg );
+ FIXME("(%p)->(0x%08lx,0x%08lx,0x%08lx,%p): stub\n", This, from, to, flags, chatmsg );
return DP_OK;
}
@@ -4964,7 +4964,7 @@ static HRESULT WINAPI IDirectPlay4Impl_SendChatMessage( IDirectPlay4 *iface, DPI
DWORD flags, DPCHAT *chatmsg )
{
IDirectPlayImpl *This = impl_from_IDirectPlay4( iface );
- FIXME( "(%p)->(0x%08x,0x%08x,0x%08x,%p): stub\n", This, from, to, flags, chatmsg );
+ FIXME( "(%p)->(0x%08lx,0x%08lx,0x%08lx,%p): stub\n", This, from, to, flags, chatmsg );
return DP_OK;
}
@@ -4988,7 +4988,7 @@ static HRESULT WINAPI IDirectPlay4AImpl_SetGroupConnectionSettings( IDirectPlay4
DWORD flags, DPID group, DPLCONNECTION *connection )
{
IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface );
- FIXME("(%p)->(0x%08x,0x%08x,%p): stub\n", This, flags, group, connection );
+ FIXME("(%p)->(0x%08lx,0x%08lx,%p): stub\n", This, flags, group, connection );
return DP_OK;
}
@@ -4996,7 +4996,7 @@ static HRESULT WINAPI IDirectPlay4Impl_SetGroupConnectionSettings( IDirectPlay4
DPID group, DPLCONNECTION *connection )
{
IDirectPlayImpl *This = impl_from_IDirectPlay4( iface );
- FIXME( "(%p)->(0x%08x,0x%08x,%p): stub\n", This, flags, group, connection );
+ FIXME( "(%p)->(0x%08lx,0x%08lx,%p): stub\n", This, flags, group, connection );
return DP_OK;
}
@@ -5024,7 +5024,7 @@ static HRESULT WINAPI IDirectPlay4AImpl_StartSession( IDirectPlay4A *iface, DWOR
static HRESULT WINAPI IDirectPlay4Impl_StartSession( IDirectPlay4 *iface, DWORD flags, DPID group )
{
IDirectPlayImpl *This = impl_from_IDirectPlay4( iface );
- FIXME( "(%p)->(0x%08x,0x%08x): stub\n", This, flags, group );
+ FIXME( "(%p)->(0x%08lx,0x%08lx): stub\n", This, flags, group );
return DP_OK;
}
@@ -5053,7 +5053,7 @@ static HRESULT WINAPI IDirectPlay4Impl_GetGroupFlags( IDirectPlay4 *iface, DPID
DWORD *flags )
{
IDirectPlayImpl *This = impl_from_IDirectPlay4( iface );
- FIXME( "(%p)->(0x%08x,%p): stub\n", This, group, flags );
+ FIXME( "(%p)->(0x%08lx,%p): stub\n", This, group, flags );
return DP_OK;
}
@@ -5084,7 +5084,7 @@ static HRESULT WINAPI IDirectPlay4Impl_GetGroupParent( IDirectPlay4 *iface, DPID
IDirectPlayImpl *This = impl_from_IDirectPlay4( iface );
lpGroupData gdata;
- TRACE( "(%p)->(0x%08x,%p)\n", This, group, parent );
+ TRACE( "(%p)->(0x%08lx,%p)\n", This, group, parent );
if ( ( gdata = DP_FindAnyGroup( This, group ) ) == NULL )
return DPERR_INVALIDGROUP;
@@ -5112,7 +5112,7 @@ static HRESULT WINAPI IDirectPlay4AImpl_GetPlayerAccount( IDirectPlay4A *iface,
DWORD flags, void *data, DWORD *size )
{
IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface );
- FIXME("(%p)->(0x%08x,0x%08x,%p,%p): stub\n", This, player, flags, data, size );
+ FIXME("(%p)->(0x%08lx,0x%08lx,%p,%p): stub\n", This, player, flags, data, size );
return DP_OK;
}
@@ -5120,7 +5120,7 @@ static HRESULT WINAPI IDirectPlay4Impl_GetPlayerAccount( IDirectPlay4 *iface, DP
DWORD flags, void *data, DWORD *size )
{
IDirectPlayImpl *This = impl_from_IDirectPlay4( iface );
- FIXME( "(%p)->(0x%08x,0x%08x,%p,%p): stub\n", This, player, flags, data, size );
+ FIXME( "(%p)->(0x%08lx,0x%08lx,%p,%p): stub\n", This, player, flags, data, size );
return DP_OK;
}
@@ -5149,7 +5149,7 @@ static HRESULT WINAPI IDirectPlay4Impl_GetPlayerFlags( IDirectPlay4 *iface, DPID
DWORD *flags )
{
IDirectPlayImpl *This = impl_from_IDirectPlay4( iface );
- FIXME( "(%p)->(0x%08x,%p): stub\n", This, player, flags );
+ FIXME( "(%p)->(0x%08lx,%p): stub\n", This, player, flags );
return DP_OK;
}
@@ -5164,7 +5164,7 @@ static HRESULT WINAPI IDirectPlay4Impl_GetGroupOwner( IDirectPlay4 *iface, DPID
DPID *owner )
{
IDirectPlayImpl *This = impl_from_IDirectPlay4( iface );
- FIXME( "(%p)->(0x%08x,%p): stub\n", This, group, owner );
+ FIXME( "(%p)->(0x%08lx,%p): stub\n", This, group, owner );
return DP_OK;
}
@@ -5179,7 +5179,7 @@ static HRESULT WINAPI IDirectPlay4Impl_SetGroupOwner( IDirectPlay4 *iface, DPID
DPID owner )
{
IDirectPlayImpl *This = impl_from_IDirectPlay4( iface );
- FIXME( "(%p)->(0x%08x,0x%08x): stub\n", This, group, owner );
+ FIXME( "(%p)->(0x%08lx,0x%08lx): stub\n", This, group, owner );
return DP_OK;
}
@@ -5198,7 +5198,7 @@ static HRESULT WINAPI IDirectPlay4Impl_SendEx( IDirectPlay4 *iface, DPID from, D
{
IDirectPlayImpl *This = impl_from_IDirectPlay4( iface );
- FIXME( "(%p)->(0x%08x,0x%08x,0x%08x,%p,0x%08x,0x%08x,0x%08x,%p,%p): semi-stub\n",
+ FIXME( "(%p)->(0x%08lx,0x%08lx,0x%08lx,%p,0x%08lx,0x%08lx,0x%08lx,%p,%p): semi-stub\n",
This, from, to, flags, data, size, priority, timeout, context, msgid );
if ( This->dp2->connectionInitialized == NO_PROVIDER )
@@ -5216,7 +5216,7 @@ static HRESULT WINAPI IDirectPlay4Impl_SendEx( IDirectPlay4 *iface, DPID from, D
*/
if ( from != DPID_UNKNOWN && !DP_FindPlayer( This, from ) )
{
- WARN( "INFO: Invalid from player 0x%08x\n", from );
+ WARN( "INFO: Invalid from player 0x%08lx\n", from );
return DPERR_INVALIDPLAYER;
}
@@ -5290,7 +5290,7 @@ static HRESULT WINAPI IDirectPlay4Impl_GetMessageQueue( IDirectPlay4 *iface, DPI
IDirectPlayImpl *This = impl_from_IDirectPlay4( iface );
HRESULT hr = DP_OK;
- FIXME( "(%p)->(0x%08x,0x%08x,0x%08x,%p,%p): semi-stub\n", This, from, to, flags, msgs, bytes );
+ FIXME( "(%p)->(0x%08lx,0x%08lx,0x%08lx,%p,%p): semi-stub\n", This, from, to, flags, msgs, bytes );
/* FIXME: Do we need to do from and to sanity checking here? */
/* FIXME: What about sends which are not immediate? */
@@ -5322,7 +5322,7 @@ static HRESULT dplay_cancelmsg ( IDirectPlayImpl* This, DWORD msgid, DWORD flags
{
HRESULT hr = DP_OK;
- FIXME( "(%p)->(0x%08x,0x%08x): semi stub\n", This, msgid, flags );
+ FIXME( "(%p)->(0x%08lx,0x%08lx): semi stub\n", This, msgid, flags );
if ( This->dp2->spData.lpCB->Cancel )
{
diff --git a/dlls/dplayx/dplaysp.c b/dlls/dplayx/dplaysp.c
index 53be88e0648..b3bdc04d153 100644
--- a/dlls/dplayx/dplaysp.c
+++ b/dlls/dplayx/dplaysp.c
@@ -82,7 +82,7 @@ static ULONG WINAPI IDirectPlaySPImpl_AddRef( IDirectPlaySP *iface )
IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface );
ULONG ref = InterlockedIncrement( &This->ref );
- TRACE( "(%p) ref=%d\n", This, ref );
+ TRACE( "(%p) ref=%ld\n", This, ref );
return ref;
}
@@ -92,7 +92,7 @@ static ULONG WINAPI IDirectPlaySPImpl_Release( IDirectPlaySP *iface )
IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface );
ULONG ref = InterlockedDecrement( &This->ref );
- TRACE( "(%p) ref=%d\n", This, ref );
+ TRACE( "(%p) ref=%ld\n", This, ref );
if( !ref )
{
@@ -111,7 +111,7 @@ static HRESULT WINAPI IDirectPlaySPImpl_AddMRUEntry( IDirectPlaySP *iface, LPCWS
/* Should be able to call the comctl32 undocumented MRU routines.
I suspect that the interface works appropriately */
- FIXME( "(%p)->(%p,%p%p,0x%08x,0x%08x): stub\n",
+ FIXME( "(%p)->(%p,%p%p,0x%08lx,0x%08lx): stub\n",
This, lpSection, lpKey, lpData, dwDataSize, dwMaxEntries );
return DP_OK;
@@ -123,7 +123,7 @@ static HRESULT WINAPI IDirectPlaySPImpl_CreateAddress( IDirectPlaySP *iface, REF
{
IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface );
- FIXME( "(%p)->(%s,%s,%p,0x%08x,%p,%p): stub\n",
+ FIXME( "(%p)->(%s,%s,%p,0x%08lx,%p,%p): stub\n",
This, debugstr_guid(guidSP), debugstr_guid(guidDataType),
lpData, dwDataSize, lpAddress, lpdwAddressSize );
@@ -136,7 +136,7 @@ static HRESULT WINAPI IDirectPlaySPImpl_EnumAddress( IDirectPlaySP *iface,
{
IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface );
- TRACE( "(%p)->(%p,%p,0x%08x,%p)\n",
+ TRACE( "(%p)->(%p,%p,0x%08lx,%p)\n",
This, lpEnumAddressCallback, lpAddress, dwAddressSize, lpContext );
DPL_EnumAddress( lpEnumAddressCallback, lpAddress, dwAddressSize, lpContext );
@@ -162,7 +162,7 @@ static HRESULT WINAPI IDirectPlaySPImpl_GetPlayerFlags( IDirectPlaySP *iface, DP
{
IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface );
- FIXME( "(%p)->(0x%08x,%p): stub\n",
+ FIXME( "(%p)->(0x%08lx,%p): stub\n",
This, idPlayer, lpdwPlayerFlags );
return DP_OK;
@@ -175,7 +175,7 @@ static HRESULT WINAPI IDirectPlaySPImpl_GetSPPlayerData( IDirectPlaySP *iface, D
HRESULT hr;
LPDP_SPPLAYERDATA lpPlayerData;
- TRACE( "(%p)->(0x%08x,%p,%p,0x%08x)\n",
+ TRACE( "(%p)->(0x%08lx,%p,%p,0x%08lx)\n",
This, idPlayer, lplpData, lpdwDataSize, dwFlags );
hr = DP_GetSPPlayerData( This->dplay, idPlayer, (void**)&lpPlayerData );
@@ -216,18 +216,18 @@ static HRESULT WINAPI IDirectPlaySPImpl_HandleMessage( IDirectPlaySP *iface, voi
WORD wVersion;
DPSP_REPLYDATA data;
- FIXME( "(%p)->(%p,0x%08x,%p): mostly stub\n",
+ FIXME( "(%p)->(%p,0x%08lx,%p): mostly stub\n",
This, lpMessageBody, dwMessageBodySize, lpMessageHeader );
wCommandId = lpMsg->wCommandId;
wVersion = lpMsg->wVersion;
- TRACE( "Incoming message has envelope of 0x%08x, %u, %u\n",
+ TRACE( "Incoming message has envelope of 0x%08lx, %u, %u\n",
lpMsg->dwMagic, wCommandId, wVersion );
if( lpMsg->dwMagic != DPMSGMAGIC_DPLAYMSG )
{
- ERR( "Unknown magic 0x%08x!\n", lpMsg->dwMagic );
+ ERR( "Unknown magic 0x%08lx!\n", lpMsg->dwMagic );
return DPERR_GENERIC;
}
@@ -522,7 +522,7 @@ static HRESULT WINAPI IDirectPlaySPImpl_SetSPPlayerData( IDirectPlaySP *iface, D
LPDP_SPPLAYERDATA lpPlayerEntry;
LPVOID lpPlayerData;
- TRACE( "(%p)->(0x%08x,%p,0x%08x,0x%08x)\n", This, idPlayer, lpData, dwDataSize, dwFlags );
+ TRACE( "(%p)->(0x%08lx,%p,0x%08lx,0x%08lx)\n", This, idPlayer, lpData, dwDataSize, dwFlags );
hr = DP_GetSPPlayerData( This->dplay, idPlayer, (void**)&lpPlayerEntry );
if( FAILED(hr) )
@@ -556,7 +556,7 @@ static HRESULT WINAPI IDirectPlaySPImpl_CreateCompoundAddress( IDirectPlaySP *if
{
IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface );
- FIXME( "(%p)->(%p,0x%08x,%p,%p): stub\n",
+ FIXME( "(%p)->(%p,0x%08lx,%p,%p): stub\n",
This, lpElements, dwElementCount, lpAddress, lpdwAddressSize );
return DP_OK;
@@ -568,7 +568,7 @@ static HRESULT WINAPI IDirectPlaySPImpl_GetSPData( IDirectPlaySP *iface, void **
IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface );
HRESULT hr = DP_OK;
- TRACE( "(%p)->(%p,%p,0x%08x)\n", This, lplpData, lpdwDataSize, dwFlags );
+ TRACE( "(%p)->(%p,%p,0x%08lx)\n", This, lplpData, lpdwDataSize, dwFlags );
#if 0
/* This is what the documentation says... */
@@ -583,7 +583,7 @@ static HRESULT WINAPI IDirectPlaySPImpl_GetSPData( IDirectPlaySP *iface, void **
*/
if( dwFlags != DPSET_REMOTE )
{
- TRACE( "Undocumented dwFlags 0x%08x used\n", dwFlags );
+ TRACE( "Undocumented dwFlags 0x%08lx used\n", dwFlags );
}
#endif
@@ -616,7 +616,7 @@ static HRESULT WINAPI IDirectPlaySPImpl_SetSPData( IDirectPlaySP *iface, void *l
IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface );
LPVOID lpSpData;
- TRACE( "(%p)->(%p,0x%08x,0x%08x)\n", This, lpData, dwDataSize, dwFlags );
+ TRACE( "(%p)->(%p,0x%08lx,0x%08lx)\n", This, lpData, dwDataSize, dwFlags );
#if 0
/* This is what the documentation says... */
@@ -631,7 +631,7 @@ static HRESULT WINAPI IDirectPlaySPImpl_SetSPData( IDirectPlaySP *iface, void *l
*/
if( dwFlags != DPSET_REMOTE )
{
- TRACE( "Undocumented dwFlags 0x%08x used\n", dwFlags );
+ TRACE( "Undocumented dwFlags 0x%08lx used\n", dwFlags );
}
#endif
@@ -660,7 +660,7 @@ static void WINAPI IDirectPlaySPImpl_SendComplete( IDirectPlaySP *iface, void *u
{
IDirectPlaySPImpl *This = impl_from_IDirectPlaySP( iface );
- FIXME( "(%p)->(%p,0x%08x): stub\n",
+ FIXME( "(%p)->(%p,0x%08lx): stub\n",
This, unknownA, unknownB );
}
diff --git a/dlls/dplayx/dplayx_global.c b/dlls/dplayx/dplayx_global.c
index 957f7cf46f5..ec62d273cb4 100644
--- a/dlls/dplayx/dplayx_global.c
+++ b/dlls/dplayx/dplayx_global.c
@@ -113,7 +113,7 @@ static LPVOID DPLAYX_PrivHeapAlloc( DWORD flags, DWORD size )
if( size > (dwBlockSize - sizeof(BOOL)) )
{
- FIXME( "Size exceeded. Request of 0x%08x\n", size );
+ FIXME( "Size exceeded. Request of 0x%08lx\n", size );
size = dwBlockSize - sizeof(BOOL);
}
@@ -193,7 +193,7 @@ static BOOL DPLAYX_IsAppIdLobbied( DWORD dwAppID, LPDPLAYX_LOBBYDATA* lplpDplDat
if( dwAppID == 0 )
{
dwAppID = GetCurrentProcessId();
- TRACE( "Translated dwAppID == 0 into 0x%08x\n", dwAppID );
+ TRACE( "Translated dwAppID == 0 into 0x%08lx\n", dwAppID );
}
for( i=0; i < numSupportedLobbies; i++ )
@@ -201,7 +201,7 @@ static BOOL DPLAYX_IsAppIdLobbied( DWORD dwAppID, LPDPLAYX_LOBBYDATA* lplpDplDat
if( lobbyData[ i ].dwAppID == dwAppID )
{
/* This process is lobbied */
- TRACE( "Found 0x%08x @ %u\n", dwAppID, i );
+ TRACE( "Found 0x%08lx @ %u\n", dwAppID, i );
*lplpDplData = &lobbyData[ i ];
return TRUE;
}
@@ -229,7 +229,7 @@ BOOL DPLAYX_CreateLobbyApplication( DWORD dwAppID )
if( lobbyData[ i ].dwAppID == 0 )
{
/* This process is now lobbied */
- TRACE( "Setting lobbyData[%u] for (0x%08x,0x%08x)\n",
+ TRACE( "Setting lobbyData[%u] for (0x%08lx,0x%08lx)\n",
i, dwAppID, GetCurrentProcessId() );
lobbyData[ i ].dwAppID = dwAppID;
@@ -386,7 +386,7 @@ BOOL DPLAYX_ConstructData(void)
}
else
{
- ERR( ": semaphore error %d\n", GetLastError() );
+ ERR( ": semaphore error %ld\n", GetLastError() );
return FALSE;
}
@@ -409,7 +409,7 @@ BOOL DPLAYX_ConstructData(void)
}
else
{
- ERR( ": unable to create shared memory (%d)\n", GetLastError() );
+ ERR( ": unable to create shared memory (%ld)\n", GetLastError() );
DPLAYX_ReleaseSemaphore();
return FALSE;
}
@@ -429,7 +429,7 @@ BOOL DPLAYX_ConstructData(void)
if( lpSharedStaticData == NULL )
{
- ERR( ": unable to map static data into process memory space (%d)\n",
+ ERR( ": unable to map static data into process memory space (%ld)\n",
GetLastError() );
DPLAYX_ReleaseSemaphore();
return FALSE;
@@ -795,7 +795,7 @@ HRESULT DPLAYX_GetConnectionSettingsA
{
DPLAYX_ReleaseSemaphore();
- TRACE( "Application 0x%08x is not lobbied\n", dwAppID );
+ TRACE( "Application 0x%08lx is not lobbied\n", dwAppID );
return DPERR_NOTLOBBIED;
}
@@ -911,7 +911,7 @@ HRESULT DPLAYX_SetConnectionSettingsA
/* Store information */
if( lpConn->dwSize != sizeof(DPLCONNECTION) )
{
- ERR(": old/new DPLCONNECTION type? Size=%08x\n", lpConn->dwSize );
+ ERR(": old/new DPLCONNECTION type? Size=%08lx\n", lpConn->dwSize );
return DPERR_INVALIDPARAMS;
}
@@ -931,7 +931,7 @@ HRESULT DPLAYX_SetConnectionSettingsA
{
DPLAYX_ReleaseSemaphore();
- ERR("DPSESSIONDESC passed in? Size=%u\n",
+ ERR("DPSESSIONDESC passed in? Size=%lu\n",
lpConn->lpSessionDesc?lpConn->lpSessionDesc->dwSize:0 );
return DPERR_INVALIDPARAMS;
@@ -974,7 +974,7 @@ HRESULT DPLAYX_SetConnectionSettingsW
/* Store information */
if( lpConn->dwSize != sizeof(DPLCONNECTION) )
{
- ERR(": old/new DPLCONNECTION type? Size=%u\n", lpConn->dwSize );
+ ERR(": old/new DPLCONNECTION type? Size=%lu\n", lpConn->dwSize );
return DPERR_INVALIDPARAMS;
}
@@ -1208,7 +1208,7 @@ LPCSTR DPLAYX_HresultToString(HRESULT hr)
default:
/* For errors not in the list, return HRESULT as a string
This part is not thread safe */
- WARN( "Unknown error 0x%08x\n", hr );
+ WARN( "Unknown error 0x%08lx\n", hr );
wsprintfA( szTempStr, "0x%08x", hr );
return szTempStr;
}
diff --git a/dlls/dplayx/dplayx_main.c b/dlls/dplayx/dplayx_main.c
index 768294c5e21..c8c2778501a 100644
--- a/dlls/dplayx/dplayx_main.c
+++ b/dlls/dplayx/dplayx_main.c
@@ -75,7 +75,7 @@ DWORD gdwDPlaySPRefCount = 0;
BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved )
{
- TRACE( "(%p,%d,%p)\n", hinstDLL, fdwReason, lpvReserved );
+ TRACE( "(%p,%ld,%p)\n", hinstDLL, fdwReason, lpvReserved );
switch ( fdwReason )
{
diff --git a/dlls/dplayx/dplayx_messages.c b/dlls/dplayx/dplayx_messages.c
index 6f6636c4b95..e30c5e644df 100644
--- a/dlls/dplayx/dplayx_messages.c
+++ b/dlls/dplayx/dplayx_messages.c
@@ -118,7 +118,7 @@ static DWORD CALLBACK DPL_MSG_ThreadMain( LPVOID lpContext )
dwWaitResult = WaitForSingleObject( lpThreadInfo->hStart, 10000 /* 10 sec */ );
if( dwWaitResult == WAIT_TIMEOUT )
{
- FIXME( "Should signal app/wait creation failure (0x%08x)\n", dwWaitResult );
+ FIXME( "Should signal app/wait creation failure (0x%08lx)\n", dwWaitResult );
goto end_of_thread;
}
@@ -130,7 +130,7 @@ static DWORD CALLBACK DPL_MSG_ThreadMain( LPVOID lpContext )
dwWaitResult = WaitForSingleObject( lpThreadInfo->hSettingRead, INFINITE );
if( dwWaitResult == WAIT_TIMEOUT )
{
- ERR( "App Read connection setting timeout fail (0x%08x)\n", dwWaitResult );
+ ERR( "App Read connection setting timeout fail (0x%08lx)\n", dwWaitResult );
}
/* Close this handle as it's not needed anymore */
@@ -215,7 +215,7 @@ HRESULT DP_MSG_SendRequestPlayerId( IDirectPlayImpl *This, DWORD dwFlags, DPID *
data.bSystemMessage = TRUE; /* Allow reply to be sent */
data.lpISP = This->dp2->spData.lpISP;
- TRACE( "Asking for player id w/ dwFlags 0x%08x\n",
+ TRACE( "Asking for player id w/ dwFlags 0x%08lx\n",
lpMsgBody->dwFlags );
DP_MSG_ExpectReply( This, &data, DPMSG_DEFAULT_WAIT_TIME, DPMSGCMD_NEWPLAYERIDREPLY,
@@ -231,7 +231,7 @@ HRESULT DP_MSG_SendRequestPlayerId( IDirectPlayImpl *This, DWORD dwFlags, DPID *
*lpdpidAllocatedId = lpcReply->dpidNewPlayerId;
- TRACE( "Received reply for id = 0x%08x\n", lpcReply->dpidNewPlayerId );
+ TRACE( "Received reply for id = 0x%08lx\n", lpcReply->dpidNewPlayerId );
/* FIXME: I think that the rest of the message has something to do
* with remote data for the player that perhaps I need to setup.
@@ -313,14 +313,14 @@ HRESULT DP_MSG_ForwardPlayerCreation( IDirectPlayImpl *This, DPID dpidServer )
lpMsgBody->unknown4[3] = NS_GetNsMagic( This->dp2->lpNameServerData ) -
0x02000000;
- TRACE( "Setting first magic to 0x%08x\n", lpMsgBody->unknown4[3] );
+ TRACE( "Setting first magic to 0x%08lx\n", lpMsgBody->unknown4[3] );
lpMsgBody->unknown4[4] = 0x0;
lpMsgBody->unknown4[5] = 0x0;
lpMsgBody->unknown4[6] = 0x0;
lpMsgBody->unknown4[7] = NS_GetNsMagic( This->dp2->lpNameServerData );
- TRACE( "Setting second magic to 0x%08x\n", lpMsgBody->unknown4[7] );
+ TRACE( "Setting second magic to 0x%08lx\n", lpMsgBody->unknown4[7] );
lpMsgBody->unknown4[8] = 0x0;
lpMsgBody->unknown4[9] = 0x0;
@@ -342,7 +342,7 @@ HRESULT DP_MSG_ForwardPlayerCreation( IDirectPlayImpl *This, DPID dpidServer )
data.bSystemMessage = TRUE; /* Allow reply to be sent */
data.lpISP = This->dp2->spData.lpISP;
- TRACE( "Sending forward player request with 0x%08x\n", dpidServer );
+ TRACE( "Sending forward player request with 0x%08lx\n", dpidServer );
lpMsg = DP_MSG_ExpectReply( This, &data,
DPMSG_WAIT_60_SECS,
@@ -377,7 +377,7 @@ static void *DP_MSG_ExpectReply( IDirectPlayImpl *This, DPSP_SENDDATA *lpData, D
hMsgReceipt = DP_MSG_BuildAndLinkReplyStruct( This, &replyStructList,
wReplyCommandId );
- TRACE( "Sending msg and expecting cmd %u in reply within %u ticks\n",
+ TRACE( "Sending msg and expecting cmd %u in reply within %lu ticks\n",
wReplyCommandId, dwWaitTime );
hr = (*This->dp2->spData.lpCB->Send)( lpData );
@@ -393,7 +393,7 @@ static void *DP_MSG_ExpectReply( IDirectPlayImpl *This, DPSP_SENDDATA *lpData, D
dwWaitReturn = WaitForSingleObject( hMsgReceipt, dwWaitTime );
if( dwWaitReturn != WAIT_OBJECT_0 )
{
- ERR( "Wait failed 0x%08x\n", dwWaitReturn );
+ ERR( "Wait failed 0x%08lx\n", dwWaitReturn );
return NULL;
}
diff --git a/dlls/dplayx/dplobby.c b/dlls/dplayx/dplobby.c
index 30d76aa16d1..52b5618b98f 100644
--- a/dlls/dplayx/dplobby.c
+++ b/dlls/dplayx/dplobby.c
@@ -211,7 +211,7 @@ static ULONG WINAPI IDirectPlayLobbyAImpl_AddRef( IDirectPlayLobbyA *iface )
IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobbyA( iface );
ULONG ref = InterlockedIncrement( &This->refA );
- TRACE( "(%p) refA=%d\n", This, ref );
+ TRACE( "(%p) refA=%ld\n", This, ref );
if ( ref == 1 )
InterlockedIncrement( &This->numIfaces );
@@ -224,7 +224,7 @@ static ULONG WINAPI IDirectPlayLobbyImpl_AddRef( IDirectPlayLobby *iface )
IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby( iface );
ULONG ref = InterlockedIncrement( &This->ref );
- TRACE( "(%p) ref=%d\n", This, ref );
+ TRACE( "(%p) ref=%ld\n", This, ref );
if ( ref == 1 )
InterlockedIncrement( &This->numIfaces );
@@ -237,7 +237,7 @@ static ULONG WINAPI IDirectPlayLobby2AImpl_AddRef(IDirectPlayLobby2A *iface)
IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2A( iface );
ULONG ref = InterlockedIncrement( &This->ref2A );
- TRACE( "(%p) ref2A=%d\n", This, ref );
+ TRACE( "(%p) ref2A=%ld\n", This, ref );
if ( ref == 1 )
InterlockedIncrement( &This->numIfaces );
@@ -250,7 +250,7 @@ static ULONG WINAPI IDirectPlayLobby2Impl_AddRef(IDirectPlayLobby2 *iface)
IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2( iface );
ULONG ref = InterlockedIncrement( &This->ref2 );
- TRACE( "(%p) ref2=%d\n", This, ref );
+ TRACE( "(%p) ref2=%ld\n", This, ref );
if ( ref == 1 )
InterlockedIncrement( &This->numIfaces );
@@ -263,7 +263,7 @@ static ULONG WINAPI IDirectPlayLobby3AImpl_AddRef(IDirectPlayLobby3A *iface)
IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3A( iface );
ULONG ref = InterlockedIncrement( &This->ref3A );
- TRACE( "(%p) ref3A=%d\n", This, ref );
+ TRACE( "(%p) ref3A=%ld\n", This, ref );
if ( ref == 1 )
InterlockedIncrement( &This->numIfaces );
@@ -276,7 +276,7 @@ static ULONG WINAPI IDirectPlayLobby3Impl_AddRef(IDirectPlayLobby3 *iface)
IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3( iface );
ULONG ref = InterlockedIncrement( &This->ref3 );
- TRACE( "(%p) ref3=%d\n", This, ref );
+ TRACE( "(%p) ref3=%ld\n", This, ref );
if ( ref == 1 )
InterlockedIncrement( &This->numIfaces );
@@ -289,7 +289,7 @@ static ULONG WINAPI IDirectPlayLobbyAImpl_Release( IDirectPlayLobbyA *iface )
IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobbyA( iface );
ULONG ref = InterlockedDecrement( &This->refA );
- TRACE( "(%p) refA=%d\n", This, ref );
+ TRACE( "(%p) refA=%ld\n", This, ref );
if ( !ref && !InterlockedDecrement( &This->numIfaces ) )
dplobby_destroy( This );
@@ -302,7 +302,7 @@ static ULONG WINAPI IDirectPlayLobbyImpl_Release( IDirectPlayLobby *iface )
IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby( iface );
ULONG ref = InterlockedDecrement( &This->ref );
- TRACE( "(%p) ref=%d\n", This, ref );
+ TRACE( "(%p) ref=%ld\n", This, ref );
if ( !ref && !InterlockedDecrement( &This->numIfaces ) )
dplobby_destroy( This );
@@ -315,7 +315,7 @@ static ULONG WINAPI IDirectPlayLobby2AImpl_Release(IDirectPlayLobby2A *iface)
IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2A( iface );
ULONG ref = InterlockedDecrement( &This->ref2A );
- TRACE( "(%p) ref2A=%d\n", This, ref );
+ TRACE( "(%p) ref2A=%ld\n", This, ref );
if ( !ref && !InterlockedDecrement( &This->numIfaces ) )
dplobby_destroy( This );
@@ -328,7 +328,7 @@ static ULONG WINAPI IDirectPlayLobby2Impl_Release(IDirectPlayLobby2 *iface)
IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2( iface );
ULONG ref = InterlockedDecrement( &This->ref2 );
- TRACE( "(%p) ref2=%d\n", This, ref );
+ TRACE( "(%p) ref2=%ld\n", This, ref );
if ( !ref && !InterlockedDecrement( &This->numIfaces ) )
dplobby_destroy( This );
@@ -341,7 +341,7 @@ static ULONG WINAPI IDirectPlayLobby3AImpl_Release(IDirectPlayLobby3A *iface)
IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3A( iface );
ULONG ref = InterlockedDecrement( &This->ref3A );
- TRACE( "(%p) ref3A=%d\n", This, ref );
+ TRACE( "(%p) ref3A=%ld\n", This, ref );
if ( !ref && !InterlockedDecrement( &This->numIfaces ) )
dplobby_destroy( This );
@@ -354,7 +354,7 @@ static ULONG WINAPI IDirectPlayLobby3Impl_Release(IDirectPlayLobby3 *iface)
IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3( iface );
ULONG ref = InterlockedDecrement( &This->ref3 );
- TRACE( "(%p) ref3=%d\n", This, ref );
+ TRACE( "(%p) ref3=%ld\n", This, ref );
if ( !ref && !InterlockedDecrement( &This->numIfaces ) )
dplobby_destroy( This );
@@ -379,7 +379,7 @@ static HRESULT DPL_ConnectEx( IDirectPlayLobbyImpl *This, DWORD dwFlags, REFIID
DWORD dwConnSize = 0;
LPDPLCONNECTION lpConn;
- FIXME("(%p)->(0x%08x,%p,%p): semi stub\n", This, dwFlags, lplpDP, pUnk );
+ FIXME("(%p)->(0x%08lx,%p,%p): semi stub\n", This, dwFlags, lplpDP, pUnk );
if( pUnk )
{
@@ -560,7 +560,7 @@ static HRESULT DPL_CreateAddress(
const DWORD dwNumAddElements = 2; /* Service Provide & address data type */
DPCOMPOUNDADDRESSELEMENT addressElements[ 2 /* dwNumAddElements */ ];
- TRACE( "(%p)->(%p,%p,0x%08x,%p,%p,%d)\n", guidSP, guidDataType, lpData, dwDataSize,
+ TRACE( "(%p)->(%p,%p,0x%08lx,%p,%p,%d)\n", guidSP, guidDataType, lpData, dwDataSize,
lpAddress, lpdwAddressSize, bAnsiInterface );
addressElements[ 0 ].guidDataType = DPAID_ServiceProvider;
@@ -623,7 +623,7 @@ static HRESULT WINAPI IDirectPlayLobby3AImpl_EnumAddress( IDirectPlayLobby3A *if
{
IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3A( iface );
- TRACE("(%p)->(%p,%p,0x%08x,%p)\n", This, lpEnumAddressCallback, lpAddress,
+ TRACE("(%p)->(%p,%p,0x%08lx,%p)\n", This, lpEnumAddressCallback, lpAddress,
dwAddressSize, lpContext );
return DPL_EnumAddress( lpEnumAddressCallback, lpAddress, dwAddressSize, lpContext );
@@ -635,7 +635,7 @@ static HRESULT WINAPI IDirectPlayLobby3Impl_EnumAddress( IDirectPlayLobby3 *ifac
{
IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3( iface );
- TRACE("(%p)->(%p,%p,0x%08x,%p)\n", This, lpEnumAddressCallback, lpAddress,
+ TRACE("(%p)->(%p,%p,0x%08lx,%p)\n", This, lpEnumAddressCallback, lpAddress,
dwAddressSize, lpContext );
return DPL_EnumAddress( lpEnumAddressCallback, lpAddress, dwAddressSize, lpContext );
@@ -720,7 +720,7 @@ static HRESULT WINAPI IDirectPlayLobby3AImpl_EnumAddressTypes( IDirectPlayLobby3
char subKeyName[51];
FILETIME filetime;
- TRACE(" (%p)->(%p,%p,%p,0x%08x)\n", This, lpEnumAddressTypeCallback, guidSP, lpContext, dwFlags );
+ TRACE(" (%p)->(%p,%p,%p,0x%08lx)\n", This, lpEnumAddressTypeCallback, guidSP, lpContext, dwFlags );
if( dwFlags != 0 )
{
@@ -848,7 +848,7 @@ static HRESULT WINAPI IDirectPlayLobby3Impl_EnumLocalApplications( IDirectPlayLo
{
IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3( iface );
- FIXME("(%p)->(%p,%p,0x%08x):stub\n", This, lpEnumLocalAppCallback, lpContext, dwFlags );
+ FIXME("(%p)->(%p,%p,0x%08lx):stub\n", This, lpEnumLocalAppCallback, lpContext, dwFlags );
return DPERR_OUTOFMEMORY;
}
@@ -897,7 +897,7 @@ static HRESULT WINAPI IDirectPlayLobby3AImpl_EnumLocalApplications( IDirectPlayL
char subKeyName[51];
FILETIME filetime;
- TRACE("(%p)->(%p,%p,0x%08x)\n", This, lpEnumLocalAppCallback, lpContext, dwFlags );
+ TRACE("(%p)->(%p,%p,0x%08lx)\n", This, lpEnumLocalAppCallback, lpContext, dwFlags );
if( dwFlags != 0 )
{
@@ -1022,7 +1022,7 @@ static HRESULT WINAPI IDirectPlayLobby3AImpl_GetConnectionSettings( IDirectPlayL
IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3A( iface );
HRESULT hr;
- TRACE("(%p)->(0x%08x,%p,%p)\n", This, dwAppID, lpData, lpdwDataSize );
+ TRACE("(%p)->(0x%08lx,%p,%p)\n", This, dwAppID, lpData, lpdwDataSize );
EnterCriticalSection( &This->lock );
@@ -1042,7 +1042,7 @@ static HRESULT WINAPI IDirectPlayLobby3Impl_GetConnectionSettings( IDirectPlayLo
IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3( iface );
HRESULT hr;
- TRACE("(%p)->(0x%08x,%p,%p)\n", This, dwAppID, lpData, lpdwDataSize );
+ TRACE("(%p)->(0x%08lx,%p,%p)\n", This, dwAppID, lpData, lpdwDataSize );
EnterCriticalSection( &This->lock );
@@ -1099,7 +1099,7 @@ static HRESULT WINAPI IDirectPlayLobby3AImpl_ReceiveLobbyMessage( IDirectPlayLob
DWORD *lpdwDataSize )
{
IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3A( iface );
- FIXME(":stub %p %08x %08x %p %p %p\n", This, dwFlags, dwAppID, lpdwMessageFlags, lpData,
+ FIXME(":stub %p %08lx %08lx %p %p %p\n", This, dwFlags, dwAppID, lpdwMessageFlags, lpData,
lpdwDataSize );
return DPERR_OUTOFMEMORY;
}
@@ -1109,7 +1109,7 @@ static HRESULT WINAPI IDirectPlayLobby3Impl_ReceiveLobbyMessage( IDirectPlayLobb
DWORD *lpdwDataSize )
{
IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3( iface );
- FIXME(":stub %p %08x %08x %p %p %p\n", This, dwFlags, dwAppID, lpdwMessageFlags, lpData,
+ FIXME(":stub %p %08lx %08lx %p %p %p\n", This, dwFlags, dwAppID, lpdwMessageFlags, lpData,
lpdwDataSize );
return DPERR_OUTOFMEMORY;
}
@@ -1304,7 +1304,7 @@ static HRESULT WINAPI IDirectPlayLobby3AImpl_RunApplication( IDirectPlayLobby3A
DWORD dwSuspendCount;
HANDLE hStart, hDeath, hSettingRead;
- TRACE( "(%p)->(0x%08x,%p,%p,%p)\n",
+ TRACE( "(%p)->(0x%08lx,%p,%p,%p)\n",
This, dwFlags, lpdwAppID, lpConn, hReceiveEvent );
if( dwFlags != 0 )
@@ -1379,7 +1379,7 @@ static HRESULT WINAPI IDirectPlayLobby3AImpl_RunApplication( IDirectPlayLobby3A
/* Reserve this global application id! */
if( !DPLAYX_CreateLobbyApplication( newProcessInfo.dwProcessId ) )
{
- ERR( "Unable to create global application data for 0x%08x\n",
+ ERR( "Unable to create global application data for 0x%08lx\n",
newProcessInfo.dwProcessId );
}
@@ -1410,7 +1410,7 @@ static HRESULT WINAPI IDirectPlayLobby3AImpl_RunApplication( IDirectPlayLobby3A
/* Unsuspend the process - should return the prev suspension count */
if( ( dwSuspendCount = ResumeThread( newProcessInfo.hThread ) ) != 1 )
{
- ERR( "ResumeThread failed with 0x%08x\n", dwSuspendCount );
+ ERR( "ResumeThread failed with 0x%08lx\n", dwSuspendCount );
}
return DP_OK;
@@ -1420,7 +1420,7 @@ static HRESULT WINAPI IDirectPlayLobby3Impl_RunApplication( IDirectPlayLobby3 *i
DWORD *lpdwAppID, DPLCONNECTION *lpConn, HANDLE hReceiveEvent )
{
IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3( iface );
- FIXME( "(%p)->(0x%08x,%p,%p,%p):stub\n", This, dwFlags, lpdwAppID, lpConn, hReceiveEvent );
+ FIXME( "(%p)->(0x%08lx,%p,%p,%p):stub\n", This, dwFlags, lpdwAppID, lpConn, hReceiveEvent );
return DPERR_OUTOFMEMORY;
}
@@ -1488,7 +1488,7 @@ static HRESULT WINAPI IDirectPlayLobby3Impl_SetConnectionSettings( IDirectPlayLo
IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3( iface );
HRESULT hr;
- TRACE("(%p)->(0x%08x,0x%08x,%p)\n", This, dwFlags, dwAppID, lpConn );
+ TRACE("(%p)->(0x%08lx,0x%08lx,%p)\n", This, dwFlags, dwAppID, lpConn );
EnterCriticalSection( &This->lock );
@@ -1551,7 +1551,7 @@ static HRESULT WINAPI IDirectPlayLobby3AImpl_SetConnectionSettings( IDirectPlayL
IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3A( iface );
HRESULT hr;
- TRACE("(%p)->(0x%08x,0x%08x,%p)\n", This, dwFlags, dwAppID, lpConn );
+ TRACE("(%p)->(0x%08lx,0x%08lx,%p)\n", This, dwFlags, dwAppID, lpConn );
EnterCriticalSection( &This->lock );
@@ -1667,7 +1667,7 @@ HRESULT DPL_CreateCompoundAddress
DWORD dwElements;
LPCDPCOMPOUNDADDRESSELEMENT lpOrigElements = lpElements;
- TRACE("(%p,0x%08x,%p,%p)\n", lpElements, dwElementCount, lpAddress, lpdwAddressSize );
+ TRACE("(%p,0x%08lx,%p,%p)\n", lpElements, dwElementCount, lpAddress, lpdwAddressSize );
/* Parameter check */
if( ( lpElements == NULL ) ||
@@ -1875,7 +1875,7 @@ static HRESULT WINAPI IDirectPlayLobby3Impl_WaitForConnectionSettings( IDirectPl
HRESULT hr = DP_OK;
BOOL bStartWait = !(dwFlags & DPLWAIT_CANCEL);
- TRACE( "(%p)->(0x%08x)\n", iface, dwFlags );
+ TRACE( "(%p)->(0x%08lx)\n", iface, dwFlags );
if( DPLAYX_WaitForConnectionSettings( bStartWait ) )
{
@@ -1892,7 +1892,7 @@ static HRESULT WINAPI IDirectPlayLobby3AImpl_WaitForConnectionSettings( IDirectP
HRESULT hr = DP_OK;
BOOL bStartWait = !(dwFlags & DPLWAIT_CANCEL);
- TRACE( "(%p)->(0x%08x)\n", iface, dwFlags );
+ TRACE( "(%p)->(0x%08lx)\n", iface, dwFlags );
if( DPLAYX_WaitForConnectionSettings( bStartWait ) )
{
@@ -2069,7 +2069,7 @@ HRESULT dplobby_create( REFIID riid, void **ppv )
HRESULT WINAPI DirectPlayLobbyCreateA( GUID *lpGUIDDSP, IDirectPlayLobbyA **lplpDPL,
IUnknown *lpUnk, void *lpData, DWORD dwDataSize )
{
- TRACE("lpGUIDDSP=%p lplpDPL=%p lpUnk=%p lpData=%p dwDataSize=%08x\n",
+ TRACE("lpGUIDDSP=%p lplpDPL=%p lpUnk=%p lpData=%p dwDataSize=%08lx\n",
lpGUIDDSP,lplpDPL,lpUnk,lpData,dwDataSize);
/* Parameter Check: lpGUIDSP, lpUnk & lpData must be NULL. dwDataSize must
@@ -2098,7 +2098,7 @@ HRESULT WINAPI DirectPlayLobbyCreateA( GUID *lpGUIDDSP, IDirectPlayLobbyA **lplp
HRESULT WINAPI DirectPlayLobbyCreateW( GUID *lpGUIDDSP, IDirectPlayLobby **lplpDPL,
IUnknown *lpUnk, void *lpData, DWORD dwDataSize )
{
- TRACE("lpGUIDDSP=%p lplpDPL=%p lpUnk=%p lpData=%p dwDataSize=%08x\n",
+ TRACE("lpGUIDDSP=%p lplpDPL=%p lpUnk=%p lpData=%p dwDataSize=%08lx\n",
lpGUIDDSP,lplpDPL,lpUnk,lpData,dwDataSize);
/* Parameter Check: lpGUIDSP, lpUnk & lpData must be NULL. dwDataSize must
diff --git a/dlls/dplayx/lobbysp.c b/dlls/dplayx/lobbysp.c
index 3528f94e345..ad4ca891587 100644
--- a/dlls/dplayx/lobbysp.c
+++ b/dlls/dplayx/lobbysp.c
@@ -60,7 +60,7 @@ static ULONG WINAPI IDPLobbySPImpl_AddRef( IDPLobbySP *iface )
IDPLobbySPImpl *This = impl_from_IDPLobbySP( iface );
ULONG ref = InterlockedIncrement( &This->ref );
- TRACE( "(%p) ref=%d\n", This, ref );
+ TRACE( "(%p) ref=%ld\n", This, ref );
return ref;
}
@@ -70,7 +70,7 @@ static ULONG WINAPI IDPLobbySPImpl_Release( IDPLobbySP *iface )
IDPLobbySPImpl *This = impl_from_IDPLobbySP( iface );
ULONG ref = InterlockedDecrement( &This->ref );
- TRACE( "(%p) ref=%d\n", This, ref );
+ TRACE( "(%p) ref=%ld\n", This, ref );
if( !ref )
HeapFree( GetProcessHeap(), 0, This );
--
2.34.1
1
0
[PATCH v2] winhttp: Use lock when attempting to send frame synchronously().
by Paul Gofman Feb. 3, 2022
by Paul Gofman Feb. 3, 2022
Feb. 3, 2022
Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com>
---
Supersedes 225419.
While web socket sends are not actually supposed to be queued before the previous one completed, send for pongs
or socket shutdown may be called in parallel. Only the first call will go for synchronous send attempt but the
next queued call have a chance of hitting socket_send() before the first sync one returns.
The sync outside of send_frame() (which is needed if the send wasn't completed synchronously) is provided by
the queueing logic around pending_sends counter.
v2:
- lock before incrementing and checking pending_sends, unlock after pending_sends is finalized
(but before sending app callback).
This way we are guaranteed that:
- sync send is never attempted if async is queued;
- attempt to execute next send will come to pending_sends increment only if the concurring send is
complete or queued (so in the latter case that next send will be queued as well).
dlls/winhttp/request.c | 15 +++++++++++----
dlls/winhttp/winhttp_private.h | 1 +
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c
index 728b1895ba7..a3a6389a938 100644
--- a/dlls/winhttp/request.c
+++ b/dlls/winhttp/request.c
@@ -3111,6 +3111,7 @@ HINTERNET WINAPI WinHttpWebSocketCompleteUpgrade( HINTERNET hrequest, DWORD_PTR
socket->hdr.callback = request->hdr.callback;
socket->hdr.notify_mask = request->hdr.notify_mask;
socket->hdr.context = context;
+ InitializeSRWLock( &socket->send_lock );
addref_object( &request->hdr );
socket->request = request;
@@ -3391,6 +3392,7 @@ DWORD WINAPI WinHttpWebSocketSend( HINTERNET hsocket, WINHTTP_WEB_SOCKET_BUFFER_
return ERROR_OUTOFMEMORY;
}
+ AcquireSRWLockExclusive( &socket->send_lock );
async_send = InterlockedIncrement( &socket->hdr.pending_sends ) > 1 || socket->hdr.recursion_count >= 3;
if (!async_send)
{
@@ -3419,10 +3421,11 @@ DWORD WINAPI WinHttpWebSocketSend( HINTERNET hsocket, WINHTTP_WEB_SOCKET_BUFFER_
free( s );
}
}
- else
+ else InterlockedDecrement( &socket->hdr.pending_sends );
+ ReleaseSRWLockExclusive( &socket->send_lock );
+ if (!async_send)
{
TRACE("sent sync.\n");
- InterlockedDecrement( &socket->hdr.pending_sends );
free( s );
socket_send_complete( socket, ret, type, len );
ret = ERROR_SUCCESS;
@@ -3535,6 +3538,7 @@ static DWORD socket_send_pong( struct socket *socket )
if (!(s = malloc( sizeof(*s) ))) return ERROR_OUTOFMEMORY;
+ AcquireSRWLockExclusive( &socket->send_lock );
async_send = InterlockedIncrement( &socket->hdr.pending_sends ) > 1;
if (!async_send)
{
@@ -3563,6 +3567,7 @@ static DWORD socket_send_pong( struct socket *socket )
InterlockedDecrement( &socket->hdr.pending_sends );
free( s );
}
+ ReleaseSRWLockExclusive( &socket->send_lock );
return ret;
}
return send_frame( socket, SOCKET_OPCODE_PONG, 0, NULL, 0, TRUE, NULL );
@@ -3817,6 +3822,7 @@ static DWORD send_socket_shutdown( struct socket *socket, USHORT status, const v
if (!(s = malloc( sizeof(*s) ))) return FALSE;
+ AcquireSRWLockExclusive( &socket->send_lock );
async_send = InterlockedIncrement( &socket->hdr.pending_sends ) > 1 || socket->hdr.recursion_count >= 3;
if (!async_send)
{
@@ -3845,9 +3851,10 @@ static DWORD send_socket_shutdown( struct socket *socket, USHORT status, const v
free( s );
}
}
- else
+ else InterlockedDecrement( &socket->hdr.pending_sends );
+ ReleaseSRWLockExclusive( &socket->send_lock );
+ if (!async_send)
{
- InterlockedDecrement( &socket->hdr.pending_sends );
free( s );
if (send_callback)
{
diff --git a/dlls/winhttp/winhttp_private.h b/dlls/winhttp/winhttp_private.h
index 3e4e1eb298d..732f0afaa88 100644
--- a/dlls/winhttp/winhttp_private.h
+++ b/dlls/winhttp/winhttp_private.h
@@ -259,6 +259,7 @@ struct socket
unsigned int send_remaining_size;
unsigned int bytes_in_send_frame_buffer;
unsigned int client_buffer_offset;
+ SRWLOCK send_lock;
};
struct send_request
--
2.34.1
2
1
From: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/mfplat/buffer.c | 7 ++++---
dlls/mfplat/main.c | 8 +++++---
dlls/mfplat/mediatype.c | 26 +++++++++++++++-----------
3 files changed, 24 insertions(+), 17 deletions(-)
diff --git a/dlls/mfplat/buffer.c b/dlls/mfplat/buffer.c
index 9081dc39eab..f161bb29d80 100644
--- a/dlls/mfplat/buffer.c
+++ b/dlls/mfplat/buffer.c
@@ -49,7 +49,7 @@ struct buffer
struct
{
BYTE *linear_buffer;
- unsigned int plane_size;
+ DWORD plane_size;
BYTE *scanline0;
unsigned int width;
@@ -1306,9 +1306,10 @@ static p_copy_image_func get_2d_buffer_copy_func(DWORD fourcc)
static HRESULT create_2d_buffer(DWORD width, DWORD height, DWORD fourcc, BOOL bottom_up, IMFMediaBuffer **buffer)
{
- unsigned int stride, max_length, plane_size;
- struct buffer *object;
+ unsigned int stride, max_length;
unsigned int row_alignment;
+ struct buffer *object;
+ DWORD plane_size;
GUID subtype;
BOOL is_yuv;
HRESULT hr;
diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c
index e2f892ed91d..e79f59d41dd 100644
--- a/dlls/mfplat/main.c
+++ b/dlls/mfplat/main.c
@@ -702,9 +702,10 @@ static HRESULT register_transform(const CLSID *clsid, const WCHAR *name, UINT32
HRESULT hr = S_OK;
HKEY hclsid = 0;
WCHAR buffer[64];
- DWORD size, ret;
WCHAR str[250];
UINT8 *blob;
+ UINT32 size;
+ DWORD ret;
guid_to_string(buffer, clsid);
swprintf(str, ARRAY_SIZE(str), L"%s\\%s", transform_keyW, buffer);
@@ -6094,8 +6095,9 @@ static const IRtwqAsyncCallbackVtbl source_resolver_callback_url_vtbl =
static HRESULT resolver_create_registered_handler(HKEY hkey, REFIID riid, void **handler)
{
- unsigned int j = 0, name_length, type;
+ DWORD name_length, type;
HRESULT hr = E_FAIL;
+ unsigned int j = 0;
WCHAR clsidW[39];
CLSID clsid;
@@ -9207,7 +9209,7 @@ static ULONGLONG lldiv128(ULARGE_INTEGER c1, ULARGE_INTEGER c0, LONGLONG denom)
{
ULARGE_INTEGER q1, q0, rhat;
ULARGE_INTEGER v, cmp1, cmp2;
- unsigned int s = 0;
+ DWORD s = 0;
v.QuadPart = llabs(denom);
diff --git a/dlls/mfplat/mediatype.c b/dlls/mfplat/mediatype.c
index 4f24ccbd237..41dbda572d5 100644
--- a/dlls/mfplat/mediatype.c
+++ b/dlls/mfplat/mediatype.c
@@ -2926,8 +2926,10 @@ HRESULT WINAPI MFCreateWaveFormatExFromMFMediaType(IMFMediaType *mediatype, WAVE
if (SUCCEEDED(IMFMediaType_GetUINT32(mediatype, &MF_MT_AUDIO_NUM_CHANNELS, &value)))
format->nChannels = value;
- IMFMediaType_GetUINT32(mediatype, &MF_MT_AUDIO_SAMPLES_PER_SECOND, &format->nSamplesPerSec);
- IMFMediaType_GetUINT32(mediatype, &MF_MT_AUDIO_AVG_BYTES_PER_SECOND, &format->nAvgBytesPerSec);
+ if (SUCCEEDED(IMFMediaType_GetUINT32(mediatype, &MF_MT_AUDIO_SAMPLES_PER_SECOND, &value)))
+ format->nSamplesPerSec = value;
+ if (SUCCEEDED(IMFMediaType_GetUINT32(mediatype, &MF_MT_AUDIO_AVG_BYTES_PER_SECOND, &value)))
+ format->nAvgBytesPerSec = value;
if (SUCCEEDED(IMFMediaType_GetUINT32(mediatype, &MF_MT_AUDIO_BLOCK_ALIGNMENT, &value)))
format->nBlockAlign = value;
if (SUCCEEDED(IMFMediaType_GetUINT32(mediatype, &MF_MT_AUDIO_BITS_PER_SAMPLE, &value)))
@@ -2939,7 +2941,8 @@ HRESULT WINAPI MFCreateWaveFormatExFromMFMediaType(IMFMediaType *mediatype, WAVE
if (SUCCEEDED(IMFMediaType_GetUINT32(mediatype, &MF_MT_AUDIO_VALID_BITS_PER_SAMPLE, &value)))
format_ext->Samples.wSamplesPerBlock = value;
- IMFMediaType_GetUINT32(mediatype, &MF_MT_AUDIO_CHANNEL_MASK, &format_ext->dwChannelMask);
+ if (SUCCEEDED(IMFMediaType_GetUINT32(mediatype, &MF_MT_AUDIO_CHANNEL_MASK, &value)))
+ format_ext->dwChannelMask = value;
memcpy(&format_ext->SubFormat, &KSDATAFORMAT_SUBTYPE_PCM, sizeof(format_ext->SubFormat));
}
@@ -3085,8 +3088,8 @@ HRESULT WINAPI MFCreateAudioMediaType(const WAVEFORMATEX *format, IMFAudioMediaT
return S_OK;
}
-static void media_type_get_ratio(IMFMediaType *media_type, const GUID *attr, UINT32 *numerator,
- UINT32 *denominator)
+static void media_type_get_ratio(IMFMediaType *media_type, const GUID *attr, DWORD *numerator,
+ DWORD *denominator)
{
UINT64 value;
@@ -3102,7 +3105,7 @@ static void media_type_get_ratio(IMFMediaType *media_type, const GUID *attr, UIN
*/
HRESULT WINAPI MFCreateMFVideoFormatFromMFMediaType(IMFMediaType *media_type, MFVIDEOFORMAT **video_format, UINT32 *size)
{
- UINT32 flags, palette_size = 0, avgrate;
+ UINT32 flags, palette_size = 0, value;
MFVIDEOFORMAT *format;
INT32 stride;
GUID guid;
@@ -3162,11 +3165,12 @@ HRESULT WINAPI MFCreateMFVideoFormatFromMFMediaType(IMFMediaType *media_type, MF
if (SUCCEEDED(IMFMediaType_GetUINT32(media_type, &MF_MT_DEFAULT_STRIDE, (UINT32 *)&stride)) && stride < 0)
format->videoInfo.VideoFlags |= MFVideoFlag_BottomUpLinearRep;
- if (SUCCEEDED(IMFMediaType_GetUINT32(media_type, &MF_MT_AVG_BITRATE, &avgrate)))
- format->compressedInfo.AvgBitrate = avgrate;
- if (SUCCEEDED(IMFMediaType_GetUINT32(media_type, &MF_MT_AVG_BIT_ERROR_RATE, &avgrate)))
- format->compressedInfo.AvgBitErrorRate = avgrate;
- IMFMediaType_GetUINT32(media_type, &MF_MT_MAX_KEYFRAME_SPACING, &format->compressedInfo.MaxKeyFrameSpacing);
+ if (SUCCEEDED(IMFMediaType_GetUINT32(media_type, &MF_MT_AVG_BITRATE, &value)))
+ format->compressedInfo.AvgBitrate = value;
+ if (SUCCEEDED(IMFMediaType_GetUINT32(media_type, &MF_MT_AVG_BIT_ERROR_RATE, &value)))
+ format->compressedInfo.AvgBitErrorRate = value;
+ if (SUCCEEDED(IMFMediaType_GetUINT32(media_type, &MF_MT_MAX_KEYFRAME_SPACING, &value)))
+ format->compressedInfo.MaxKeyFrameSpacing = value;
/* Palette. */
if (palette_size)
--
2.34.1
1
0
[PATCH 1/5] shell32: Move SHWaitForFileToOpen() flags to shellord.c.
by Zebediah Figura Feb. 3, 2022
by Zebediah Figura Feb. 3, 2022
Feb. 3, 2022
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/shell32/shellord.c | 5 +++++
dlls/shell32/undocshell.h | 10 ----------
2 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/dlls/shell32/shellord.c b/dlls/shell32/shellord.c
index 2c73ce18940..a138f381a92 100644
--- a/dlls/shell32/shellord.c
+++ b/dlls/shell32/shellord.c
@@ -50,6 +50,11 @@
WINE_DEFAULT_DEBUG_CHANNEL(shell);
WINE_DECLARE_DEBUG_CHANNEL(pidl);
+/* SHWaitForFileToOpen flags */
+#define SHWFF_ADD 0x01
+#define SHWFF_REMOVE 0x02
+#define SHWFF_WAIT 0x04
+
/* FIXME: !!! move CREATEMRULIST and flags to header file !!! */
/* !!! it is in both here and comctl32undoc.c !!! */
typedef struct tagCREATEMRULIST
diff --git a/dlls/shell32/undocshell.h b/dlls/shell32/undocshell.h
index 5ed8d25f234..459c51c8454 100644
--- a/dlls/shell32/undocshell.h
+++ b/dlls/shell32/undocshell.h
@@ -208,16 +208,6 @@ BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID *sOtherDirs);
* Misc Stuff
*/
-/* SHWaitForFileToOpen flags */
-#define SHWFF_ADD 0x01
-#define SHWFF_REMOVE 0x02
-#define SHWFF_WAIT 0x04
-
-BOOL WINAPI SHWaitForFileToOpen(
- LPCITEMIDLIST pidl,
- DWORD dwFlags,
- DWORD dwTimeout);
-
WORD WINAPI ArrangeWindows(HWND hwndParent, DWORD dwReserved, const RECT *lpRect,
WORD cKids, const HWND *lpKids);
--
2.34.1
2
6
[PATCH 1/4] quartz/tests: Test more interfaces exposed by the filter graph.
by Zebediah Figura Feb. 3, 2022
by Zebediah Figura Feb. 3, 2022
Feb. 3, 2022
From: Zebediah Figura <z.figura12(a)gmail.com>
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/quartz/tests/filtergraph.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c
index bd086445a3b..98f7b30717d 100644
--- a/dlls/quartz/tests/filtergraph.c
+++ b/dlls/quartz/tests/filtergraph.c
@@ -98,23 +98,30 @@ static void test_interfaces(void)
IFilterGraph2 *graph = create_graph();
check_interface(graph, &IID_IBasicAudio, TRUE);
+ check_interface(graph, &IID_IBasicVideo, TRUE);
check_interface(graph, &IID_IBasicVideo2, TRUE);
+ check_interface(graph, &IID_IFilterGraph, TRUE);
check_interface(graph, &IID_IFilterGraph2, TRUE);
check_interface(graph, &IID_IFilterMapper, TRUE);
+ check_interface(graph, &IID_IFilterMapper2, TRUE);
check_interface(graph, &IID_IFilterMapper3, TRUE);
+ check_interface(graph, &IID_IGraphBuilder, TRUE);
check_interface(graph, &IID_IGraphConfig, TRUE);
check_interface(graph, &IID_IGraphVersion, TRUE);
check_interface(graph, &IID_IMediaControl, TRUE);
check_interface(graph, &IID_IMediaEvent, TRUE);
- check_interface(graph, &IID_IMediaFilter, TRUE);
+ check_interface(graph, &IID_IMediaEventEx, TRUE);
check_interface(graph, &IID_IMediaEventSink, TRUE);
+ check_interface(graph, &IID_IMediaFilter, TRUE);
check_interface(graph, &IID_IMediaPosition, TRUE);
check_interface(graph, &IID_IMediaSeeking, TRUE);
check_interface(graph, &IID_IObjectWithSite, TRUE);
check_interface(graph, &IID_IVideoFrameStep, TRUE);
check_interface(graph, &IID_IVideoWindow, TRUE);
+ check_interface(graph, &IID_IUnknown, TRUE);
check_interface(graph, &IID_IBaseFilter, FALSE);
+ check_interface(graph, &IID_IDispatch, FALSE);
IFilterGraph2_Release(graph);
}
--
2.34.1
2
4
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com>
---
dlls/sane.ds/ui.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/sane.ds/ui.c b/dlls/sane.ds/ui.c
index 8be7ed42b70..e66526a088e 100644
--- a/dlls/sane.ds/ui.c
+++ b/dlls/sane.ds/ui.c
@@ -318,6 +318,7 @@ static int create_item(HDC hdc, const struct option_descriptor *opt,
if (trail_edit)
*count+=1;
+ free(trail_edit);
return leading_len + local_len + padding + padding2 + trail_len;
}
--
2.35.1
2
3
From: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/mf/copier.c | 4 ++--
dlls/mf/evr.c | 4 ++--
dlls/mf/main.c | 3 ++-
dlls/mf/sar.c | 7 ++++---
dlls/mf/session.c | 31 +++++++++++++++++--------------
dlls/mf/topology.c | 11 ++++++-----
6 files changed, 33 insertions(+), 27 deletions(-)
diff --git a/dlls/mf/copier.c b/dlls/mf/copier.c
index b05ae3383ab..fe5664ee4c7 100644
--- a/dlls/mf/copier.c
+++ b/dlls/mf/copier.c
@@ -247,7 +247,7 @@ static HRESULT WINAPI sample_copier_transform_GetOutputAvailableType(IMFTransfor
return hr;
}
-static HRESULT sample_copier_get_buffer_size(IMFMediaType *type, DWORD *size)
+static HRESULT sample_copier_get_buffer_size(IMFMediaType *type, UINT32 *size)
{
GUID major, subtype;
UINT64 frame_size;
@@ -281,7 +281,7 @@ static HRESULT sample_copier_get_buffer_size(IMFMediaType *type, DWORD *size)
static HRESULT sample_copier_set_media_type(struct sample_copier *transform, BOOL input, DWORD id, IMFMediaType *type,
DWORD flags)
{
- DWORD buffer_size;
+ UINT32 buffer_size;
HRESULT hr = S_OK;
if (id)
diff --git a/dlls/mf/evr.c b/dlls/mf/evr.c
index 9552990006d..5e8b559af04 100644
--- a/dlls/mf/evr.c
+++ b/dlls/mf/evr.c
@@ -1633,8 +1633,8 @@ static HRESULT video_renderer_configure_mixer(struct video_renderer *renderer)
if (SUCCEEDED(hr))
{
- unsigned int input_count, output_count;
- unsigned int *ids, *oids;
+ DWORD input_count, output_count;
+ DWORD *ids, *oids;
size_t i;
/* Create stream sinks for inputs that mixer already has by default. */
diff --git a/dlls/mf/main.c b/dlls/mf/main.c
index acbb8377e52..50451170275 100644
--- a/dlls/mf/main.c
+++ b/dlls/mf/main.c
@@ -1072,10 +1072,11 @@ static int __cdecl qsort_string_compare(const void *a, const void *b)
static HRESULT mf_get_handler_strings(const WCHAR *path, WCHAR filter, unsigned int maxlen, PROPVARIANT *dst)
{
static const HKEY hkey_roots[2] = { HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE };
- unsigned int capacity = 0, count, size;
+ unsigned int capacity = 0, count;
HRESULT hr = S_OK;
int i, index;
WCHAR *buffW;
+ DWORD size;
if (!(buffW = calloc(maxlen, sizeof(*buffW))))
return E_OUTOFMEMORY;
diff --git a/dlls/mf/sar.c b/dlls/mf/sar.c
index f6f2b32dd2d..3c9bac90c9f 100644
--- a/dlls/mf/sar.c
+++ b/dlls/mf/sar.c
@@ -1493,7 +1493,7 @@ static HRESULT WINAPI audio_renderer_stream_type_handler_IsMediaTypeSupported(IM
IMFMediaType *in_type, IMFMediaType **out_type)
{
struct audio_renderer *renderer = impl_from_IMFMediaTypeHandler(iface);
- unsigned int flags;
+ DWORD flags;
HRESULT hr;
TRACE("%p, %p, %p.\n", iface, in_type, out_type);
@@ -1618,8 +1618,8 @@ static HRESULT WINAPI audio_renderer_stream_type_handler_SetCurrentMediaType(IMF
struct audio_renderer *renderer = impl_from_IMFMediaTypeHandler(iface);
const unsigned int test_flags = MF_MEDIATYPE_EQUAL_MAJOR_TYPES | MF_MEDIATYPE_EQUAL_FORMAT_TYPES;
BOOL compare_result;
- unsigned int flags;
HRESULT hr = S_OK;
+ DWORD flags;
TRACE("%p, %p.\n", iface, media_type);
@@ -1777,11 +1777,12 @@ static HRESULT WINAPI audio_renderer_render_callback_GetParameters(IMFAsyncCallb
static void audio_renderer_render(struct audio_renderer *renderer, IMFAsyncResult *result)
{
- unsigned int src_frames, dst_frames, max_frames, pad_frames, src_len;
+ unsigned int src_frames, dst_frames, max_frames, pad_frames;
struct queued_object *obj, *obj2;
BOOL keep_sample = FALSE;
IMFMediaBuffer *buffer;
BYTE *dst, *src;
+ DWORD src_len;
HRESULT hr;
LIST_FOR_EACH_ENTRY_SAFE(obj, obj2, &renderer->queue, struct queued_object, entry)
diff --git a/dlls/mf/session.c b/dlls/mf/session.c
index 66009b1fff2..756ef381373 100644
--- a/dlls/mf/session.c
+++ b/dlls/mf/session.c
@@ -185,7 +185,7 @@ struct topo_node
struct
{
IMFMediaSource *source;
- unsigned int stream_id;
+ DWORD stream_id;
} source;
struct
{
@@ -197,11 +197,11 @@ struct topo_node
struct
{
struct transform_stream *inputs;
- unsigned int *input_map;
+ DWORD *input_map;
unsigned int input_count;
struct transform_stream *outputs;
- unsigned int *output_map;
+ DWORD *output_map;
unsigned int output_count;
} transform;
} u;
@@ -867,8 +867,9 @@ static void session_start(struct media_session *session, const GUID *time_format
static void session_set_started(struct media_session *session)
{
struct media_source *source;
- unsigned int caps, flags;
IMFMediaEvent *event;
+ unsigned int caps;
+ DWORD flags;
session->state = SESSION_STATE_STARTED;
@@ -1181,17 +1182,18 @@ static HRESULT session_add_media_sink(struct media_session *session, IMFTopology
return S_OK;
}
-static unsigned int transform_node_get_stream_id(struct topo_node *node, BOOL output, unsigned int index)
+static DWORD transform_node_get_stream_id(struct topo_node *node, BOOL output, unsigned int index)
{
- unsigned int *map = output ? node->u.transform.output_map : node->u.transform.input_map;
+ DWORD *map = output ? node->u.transform.output_map : node->u.transform.input_map;
return map ? map[index] : index;
}
static HRESULT session_set_transform_stream_info(struct topo_node *node)
{
- unsigned int *input_map = NULL, *output_map = NULL;
- unsigned int i, input_count, output_count, block_alignment;
+ DWORD *input_map = NULL, *output_map = NULL;
+ DWORD i, input_count, output_count;
struct transform_stream *streams;
+ unsigned int block_alignment;
IMFMediaType *media_type;
GUID major = { 0 };
HRESULT hr;
@@ -2132,7 +2134,7 @@ static HRESULT WINAPI session_commands_callback_Invoke(IMFAsyncCallback *iface,
struct media_session *session = impl_from_commands_callback_IMFAsyncCallback(iface);
struct topo_node *topo_node;
IMFTopologyNode *upstream_node;
- unsigned int upstream_output;
+ DWORD upstream_output;
EnterCriticalSection(&session->cs);
@@ -2462,8 +2464,8 @@ static void session_set_source_object_state(struct media_session *session, IUnkn
struct media_sink *sink;
enum object_state state;
struct topo_node *node;
- unsigned int i, count;
BOOL changed = FALSE;
+ DWORD i, count;
HRESULT hr;
if ((state = session_get_object_state_for_event(event_type)) == OBJ_STATE_INVALID)
@@ -2668,10 +2670,11 @@ static struct sample *transform_create_sample(IMFSample *sample)
static HRESULT transform_get_external_output_sample(const struct media_session *session, struct topo_node *transform,
unsigned int output_index, const MFT_OUTPUT_STREAM_INFO *stream_info, IMFSample **sample)
{
- unsigned int buffer_size, downstream_input;
IMFTopologyNode *downstream_node;
IMFMediaBuffer *buffer = NULL;
struct topo_node *topo_node;
+ unsigned int buffer_size;
+ DWORD downstream_input;
TOPOID node_id;
HRESULT hr;
@@ -2713,9 +2716,9 @@ static HRESULT transform_node_pull_samples(const struct media_session *session,
MFT_OUTPUT_STREAM_INFO stream_info;
MFT_OUTPUT_DATA_BUFFER *buffers;
struct sample *queued_sample;
+ HRESULT hr = E_UNEXPECTED;
DWORD status = 0;
unsigned int i;
- HRESULT hr = E_UNEXPECTED;
if (!(buffers = calloc(node->u.transform.output_count, sizeof(*buffers))))
return E_OUTOFMEMORY;
@@ -2888,7 +2891,7 @@ static void session_deliver_sample_to_node(struct media_session *session, IMFTop
static HRESULT session_request_sample_from_node(struct media_session *session, IMFTopologyNode *node, DWORD output)
{
IMFTopologyNode *downstream_node, *upstream_node;
- unsigned int downstream_input, upstream_output;
+ DWORD downstream_input, upstream_output;
struct topo_node *topo_node;
MF_TOPOLOGY_TYPE node_type;
struct sample *sample;
@@ -3537,8 +3540,8 @@ static HRESULT session_is_presentation_rate_supported(struct media_session *sess
struct media_source *source;
struct media_sink *sink;
float value = 0.0f, tmp;
- unsigned int flags;
HRESULT hr = S_OK;
+ DWORD flags;
if (!nearest_rate) nearest_rate = &tmp;
diff --git a/dlls/mf/topology.c b/dlls/mf/topology.c
index f97c0cc75d3..8eb1b763e64 100644
--- a/dlls/mf/topology.c
+++ b/dlls/mf/topology.c
@@ -2381,8 +2381,9 @@ static HRESULT topology_loader_resolve_branch(struct topoloader_context *context
static HRESULT topology_loader_resolve_nodes(struct topoloader_context *context, unsigned int *layer_size)
{
IMFTopologyNode *downstream_node, *node, *orig_node;
- unsigned int input_index, size = 0;
MF_TOPOLOGY_TYPE node_type;
+ unsigned int size = 0;
+ DWORD input_index;
HRESULT hr = S_OK;
TOPOID id;
@@ -2444,7 +2445,7 @@ static BOOL topology_loader_is_node_d3d_aware(IMFTopologyNode *node)
return !!d3d_aware;
}
-static HRESULT topology_loader_create_copier(IMFTopologyNode *upstream_node, unsigned int upstream_output,
+static HRESULT topology_loader_create_copier(IMFTopologyNode *upstream_node, DWORD upstream_output,
IMFTopologyNode *downstream_node, unsigned int downstream_input, IMFTransform **copier)
{
IMFMediaType *input_type = NULL, *output_type = NULL;
@@ -2483,7 +2484,7 @@ static HRESULT topology_loader_create_copier(IMFTopologyNode *upstream_node, uns
}
static HRESULT topology_loader_connect_copier(struct topoloader_context *context, IMFTopologyNode *upstream_node,
- unsigned int upstream_output, IMFTopologyNode *downstream_node, unsigned int downstream_input, IMFTransform *copier)
+ DWORD upstream_output, IMFTopologyNode *downstream_node, DWORD downstream_input, IMFTransform *copier)
{
IMFTopologyNode *copier_node;
HRESULT hr;
@@ -2506,9 +2507,9 @@ static HRESULT topology_loader_connect_d3d_aware_input(struct topoloader_context
IMFTopologyNode *node)
{
IMFTopologyNode *upstream_node;
- unsigned int upstream_output;
- IMFStreamSink *stream_sink;
IMFTransform *copier = NULL;
+ IMFStreamSink *stream_sink;
+ DWORD upstream_output;
HRESULT hr;
if (FAILED(hr = topology_node_get_object(node, &IID_IMFStreamSink, (void **)&stream_sink)))
--
2.34.1
1
0
Feb. 3, 2022
A wine installation should not be divided across multiple prefixes,
and one shouldn't mix components from multiple installations.
winegcc should therefore select a single viable get_inc_dir
(as was with get_lib_dir) and add (only) its
${includedir}/wine/msvcrt and ${includedir}/wine/windows,
not offer gcc multiple (potentially nonexistent or unrelated)
paths to search for wine headers
Signed-off-by: Kevin Puetz <PuetzKevinA(a)JohnDeere.com>
--
e.g. for a wine built with --prefix /opt/wine-6
it's potentially the case that /usr/include/wine/* may also exist
(perhaps from a distro package), but we don't really want
winegcc adding both -I/opt/wine-6/include/windows -I/usr/include/wine/windows
get_inc_dir is identical in all winegcc/widl/wrc tools, and thus seems
like a good candidate to move into tools.h. However, its interactions
with init_argv0_dir (includedir global variable, INCLUDDIR macro, etc)
made that not really work out.
---
tools/widl/widl.c | 39 ++++++++++++++++++++++------------
tools/winegcc/winegcc.c | 47 ++++++++++++++++++++++++-----------------
tools/wrc/wrc.c | 39 ++++++++++++++++++++++------------
3 files changed, 80 insertions(+), 45 deletions(-)
diff --git a/tools/widl/widl.c b/tools/widl/widl.c
index 7686594b7d3..8150d6158e4 100644
--- a/tools/widl/widl.c
+++ b/tools/widl/widl.c
@@ -256,6 +256,29 @@ static void add_widl_version_define(void)
wpp_add_cmdline_define(version_str);
}
+static const char *get_inc_dir(const char *sysroot)
+{
+ const char *stdincpath[] = { includedir, INCLUDEDIR, "/usr/include", "/usr/local/include" };
+ const char *root = sysroot ? sysroot : "";
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE(stdincpath); i++)
+ {
+ const char *root = (sysroot && i) ? sysroot : "";
+ char *path;
+ struct stat statbuf;
+
+ if (!stdincpath[i]) continue;
+ path = strmake( "%s%s/%s",root, stdincpath[i], "wine");
+ if (!stat(path,&statbuf) && S_ISDIR(statbuf.st_mode))
+ {
+ return strmake( "%s%s",root,stdincpath[i]);
+ }
+ }
+
+ return strmake( "%s%s", root, INCLUDEDIR );
+}
+
/* clean things up when aborting on a signal */
static void exit_on_signal( int sig )
{
@@ -733,19 +756,9 @@ int main(int argc,char *argv[])
if (stdinc)
{
- static const char *incl_dirs[] = { INCLUDEDIR, "/usr/include", "/usr/local/include" };
-
- if (includedir)
- {
- wpp_add_include_path( strmake( "%s/wine/msvcrt", includedir ));
- wpp_add_include_path( strmake( "%s/wine/windows", includedir ));
- }
- for (i = 0; i < ARRAY_SIZE(incl_dirs); i++)
- {
- if (i && !strcmp( incl_dirs[i], incl_dirs[0] )) continue;
- wpp_add_include_path( strmake( "%s%s/wine/msvcrt", sysroot, incl_dirs[i] ));
- wpp_add_include_path( strmake( "%s%s/wine/windows", sysroot, incl_dirs[i] ));
- }
+ const char *inc_dir = get_inc_dir(sysroot);
+ wpp_add_include_path( strmake( "%s/wine/msvcrt", inc_dir));
+ wpp_add_include_path( strmake( "%s/wine/windows", inc_dir));
}
if (pointer_size)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
index 8644afe7535..6e701a5c08b 100644
--- a/tools/winegcc/winegcc.c
+++ b/tools/winegcc/winegcc.c
@@ -647,6 +647,29 @@ static char *get_lib_dir( struct options *opts )
return strmake( "%s%s", root, LIBDIR );
}
+static const char *get_inc_dir(const char *sysroot)
+{
+ const char *stdincpath[] = { includedir, INCLUDEDIR, "/usr/include", "/usr/local/include" };
+ const char *root = sysroot ? sysroot : "";
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE(stdincpath); i++)
+ {
+ const char *root = (sysroot && i) ? sysroot : "";
+ char *path;
+ struct stat statbuf;
+
+ if (!stdincpath[i]) continue;
+ path = strmake( "%s%s/%s",root, stdincpath[i], "wine");
+ if (!stat(path,&statbuf) && S_ISDIR(statbuf.st_mode))
+ {
+ return strmake( "%s%s",root,stdincpath[i]);
+ }
+ }
+
+ return strmake( "%s%s", root, INCLUDEDIR );
+}
+
static void init_argv0_dir( const char *argv0 )
{
#ifndef _WIN32
@@ -813,32 +836,18 @@ no_compat_defines:
/* standard includes come last in the include search path */
if (!opts->wine_objdir && !opts->nostdinc)
{
- const char *incl_dirs[] = { INCLUDEDIR, "/usr/include", "/usr/local/include" };
- const char *root = opts->isysroot ? opts->isysroot : opts->sysroot ? opts->sysroot : "";
+ const char *inc_sysroot = opts->isysroot ? opts->isysroot : opts->sysroot;
+ const char *inc_dir = get_inc_dir(inc_sysroot);
const char *isystem = gcc_defs ? "-isystem" : "-I";
const char *idirafter = gcc_defs ? "-idirafter" : "-I";
if (opts->use_msvcrt)
{
- if (includedir) strarray_add( &comp_args, strmake( "%s%s/wine/msvcrt", isystem, includedir ));
- for (j = 0; j < ARRAY_SIZE(incl_dirs); j++)
- {
- if (j && !strcmp( incl_dirs[0], incl_dirs[j] )) continue;
- strarray_add(&comp_args, strmake( "%s%s%s/wine/msvcrt", isystem, root, incl_dirs[j] ));
- }
+ strarray_add(&comp_args, strmake( "%s%s/wine/msvcrt", isystem, inc_dir ));
strarray_add(&comp_args, "-D__MSVCRT__");
}
- if (includedir)
- {
- strarray_add( &comp_args, strmake( "%s%s/wine/windows", isystem, includedir ));
- strarray_add( &comp_args, strmake( "%s%s", idirafter, includedir ));
- }
- for (j = 0; j < ARRAY_SIZE(incl_dirs); j++)
- {
- if (j && !strcmp( incl_dirs[0], incl_dirs[j] )) continue;
- strarray_add(&comp_args, strmake( "%s%s%s/wine/windows", isystem, root, incl_dirs[j] ));
- strarray_add(&comp_args, strmake( "%s%s%s", idirafter, root, incl_dirs[j] ));
- }
+ strarray_add(&comp_args, strmake( "%s%s/wine/windows", isystem, inc_dir ));
+ strarray_add(&comp_args, strmake( "%s%s", idirafter, inc_dir));
}
else if (opts->wine_objdir)
strarray_add(&comp_args, strmake("-I%s/include", opts->wine_objdir) );
diff --git a/tools/wrc/wrc.c b/tools/wrc/wrc.c
index 41207120237..3b38629c71b 100644
--- a/tools/wrc/wrc.c
+++ b/tools/wrc/wrc.c
@@ -225,6 +225,29 @@ static void set_version_defines(void)
free( version );
}
+static const char *get_inc_dir(const char *sysroot)
+{
+ const char *stdincpath[] = { includedir, INCLUDEDIR, "/usr/include", "/usr/local/include" };
+ const char *root = sysroot ? sysroot : "";
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE(stdincpath); i++)
+ {
+ const char *root = (sysroot && i) ? sysroot : "";
+ char *path;
+ struct stat statbuf;
+
+ if (!stdincpath[i]) continue;
+ path = strmake( "%s%s/%s",root, stdincpath[i], "wine");
+ if (!stat(path,&statbuf) && S_ISDIR(statbuf.st_mode))
+ {
+ return strmake( "%s%s",root,stdincpath[i]);
+ }
+ }
+
+ return strmake( "%s%s", root, INCLUDEDIR );
+}
+
/* clean things up when aborting on a signal */
static void exit_on_signal( int sig )
{
@@ -453,19 +476,9 @@ int main(int argc,char *argv[])
/* If we do need to search standard includes, add them to the path */
if (stdinc)
{
- static const char *incl_dirs[] = { INCLUDEDIR, "/usr/include", "/usr/local/include" };
-
- if (includedir)
- {
- wpp_add_include_path( strmake( "%s/wine/msvcrt", includedir ));
- wpp_add_include_path( strmake( "%s/wine/windows", includedir ));
- }
- for (i = 0; i < ARRAY_SIZE(incl_dirs); i++)
- {
- if (i && !strcmp( incl_dirs[i], incl_dirs[0] )) continue;
- wpp_add_include_path( strmake( "%s%s/wine/msvcrt", sysroot, incl_dirs[i] ));
- wpp_add_include_path( strmake( "%s%s/wine/windows", sysroot, incl_dirs[i] ));
- }
+ const char *inc_dir = get_inc_dir(sysroot);
+ wpp_add_include_path( strmake( "%s/wine/msvcrt", inc_dir));
+ wpp_add_include_path( strmake( "%s/wine/windows", inc_dir));
}
/* Kill io buffering when some kind of debuglevel is enabled */
--
2.34.1
2
2
Feb. 3, 2022
this breaks here
<<<< config.log
configure:13562: result: /lib/cpp
configure:13576: /lib/cpp conftest.c
In file included from /usr/include/features.h:392,
from /usr/include/bits/libc-header-start.h:33,
from /usr/include/limits.h:26,
from
/usr/lib/gcc/x86_64-redhat-linux/11/include/limits.h:203,
from
/usr/lib/gcc/x86_64-redhat-linux/11/include/syslimits.h:7,
from
/usr/lib/gcc/x86_64-redhat-linux/11/include/limits.h:34,
from conftest.c:97:
/usr/include/features-time64.h:26:5: error: #error "_TIME_BITS=64 is
allowed only with _FILE_OFFSET_BITS=64"
26 | # error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
| ^~~~~
Module: wine
Branch: master
Commit: 2211ca9fa57640b4c19c0a6aa57fda94328c53c5
URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2211ca9fa57640b4c19c0a6a…
Author: Alexandre Julliard <julliard(a)winehq.org>
Date: Wed Feb 2 13:23:21 2022 +0100
configure: Enable 64-bit time_t on Linux.
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
1
0
Revision 24b26f8bd6a49c855eec417a6585d44c9458e3ec changed FreeBSD
(and DragonFly) not to use /proc any longer. Hence we also do not
need the exe_link variable on those two platforms, either. Avoid
declaring it there.
(Spotted by GCC 12.)
Signed-off-by: Gerald Pfeifer <gerald(a)pfeifer.com>
---
libs/wine/config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/wine/config.c b/libs/wine/config.c
index 23c76fda128..69a783967df 100644
--- a/libs/wine/config.c
+++ b/libs/wine/config.c
@@ -60,7 +60,7 @@ static void fatal_error( const char *err, ... ) __attribute__((noreturn,format(
#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
static const char exe_link[] = "/proc/self/exe";
-#else
+#elseif ! defined (__FreeBSD__) && ! defined(__DragonFly__)
static const char exe_link[] = "";
#endif
--
2.34.1
2
1
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
---
dlls/xactengine2_0/Makefile.in | 2 +-
dlls/xactengine2_4/Makefile.in | 2 +-
dlls/xactengine2_7/Makefile.in | 2 +-
dlls/xactengine2_9/Makefile.in | 2 +-
dlls/xactengine3_0/Makefile.in | 2 +-
dlls/xactengine3_1/Makefile.in | 2 +-
dlls/xactengine3_2/Makefile.in | 2 +-
dlls/xactengine3_3/Makefile.in | 2 +-
dlls/xactengine3_4/Makefile.in | 2 +-
dlls/xactengine3_5/Makefile.in | 2 +-
dlls/xactengine3_6/Makefile.in | 2 +-
dlls/xactengine3_7/Makefile.in | 2 +-
dlls/xactengine3_7/xact_dll.c | 44 +++++++++++++++++-----------------
13 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/dlls/xactengine2_0/Makefile.in b/dlls/xactengine2_0/Makefile.in
index 1fe077c95a3..5c4b635b060 100644
--- a/dlls/xactengine2_0/Makefile.in
+++ b/dlls/xactengine2_0/Makefile.in
@@ -1,7 +1,7 @@
MODULE = xactengine2_0.dll
IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid
EXTRAINCL = $(FAUDIO_PE_CFLAGS)
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DXACT3_VER=0x0200
+EXTRADEFS = -DXACT3_VER=0x0200
PARENTSRC = ../xactengine3_7
C_SRCS = \
diff --git a/dlls/xactengine2_4/Makefile.in b/dlls/xactengine2_4/Makefile.in
index 78e78146311..2b5fd547b61 100644
--- a/dlls/xactengine2_4/Makefile.in
+++ b/dlls/xactengine2_4/Makefile.in
@@ -1,7 +1,7 @@
MODULE = xactengine2_4.dll
IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid
EXTRAINCL = $(FAUDIO_PE_CFLAGS)
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DXACT3_VER=0x0204
+EXTRADEFS = -DXACT3_VER=0x0204
PARENTSRC = ../xactengine3_7
C_SRCS = \
diff --git a/dlls/xactengine2_7/Makefile.in b/dlls/xactengine2_7/Makefile.in
index 445ba17f6ae..6861555b23b 100644
--- a/dlls/xactengine2_7/Makefile.in
+++ b/dlls/xactengine2_7/Makefile.in
@@ -1,7 +1,7 @@
MODULE = xactengine2_7.dll
IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid
EXTRAINCL = $(FAUDIO_PE_CFLAGS)
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DXACT3_VER=0x0207
+EXTRADEFS = -DXACT3_VER=0x0207
PARENTSRC = ../xactengine3_7
C_SRCS = \
diff --git a/dlls/xactengine2_9/Makefile.in b/dlls/xactengine2_9/Makefile.in
index 0f8e137ffba..e5f8c83e962 100644
--- a/dlls/xactengine2_9/Makefile.in
+++ b/dlls/xactengine2_9/Makefile.in
@@ -1,7 +1,7 @@
MODULE = xactengine2_9.dll
IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid
EXTRAINCL = $(FAUDIO_PE_CFLAGS)
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DXACT3_VER=0x0209
+EXTRADEFS = -DXACT3_VER=0x0209
PARENTSRC = ../xactengine3_7
C_SRCS = \
diff --git a/dlls/xactengine3_0/Makefile.in b/dlls/xactengine3_0/Makefile.in
index 60673ff8101..10259e44ee0 100644
--- a/dlls/xactengine3_0/Makefile.in
+++ b/dlls/xactengine3_0/Makefile.in
@@ -1,7 +1,7 @@
MODULE = xactengine3_0.dll
IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid
EXTRAINCL = $(FAUDIO_PE_CFLAGS)
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DXACT3_VER=0x0300
+EXTRADEFS = -DXACT3_VER=0x0300
PARENTSRC = ../xactengine3_7
C_SRCS = \
diff --git a/dlls/xactengine3_1/Makefile.in b/dlls/xactengine3_1/Makefile.in
index f812bea5c9b..3105c3443bd 100644
--- a/dlls/xactengine3_1/Makefile.in
+++ b/dlls/xactengine3_1/Makefile.in
@@ -1,7 +1,7 @@
MODULE = xactengine3_1.dll
IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid
EXTRAINCL = $(FAUDIO_PE_CFLAGS)
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DXACT3_VER=0x0301
+EXTRADEFS = -DXACT3_VER=0x0301
PARENTSRC = ../xactengine3_7
C_SRCS = \
diff --git a/dlls/xactengine3_2/Makefile.in b/dlls/xactengine3_2/Makefile.in
index bde069efe30..92481ba1e26 100644
--- a/dlls/xactengine3_2/Makefile.in
+++ b/dlls/xactengine3_2/Makefile.in
@@ -1,7 +1,7 @@
MODULE = xactengine3_2.dll
IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid
EXTRAINCL = $(FAUDIO_PE_CFLAGS)
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DXACT3_VER=0x0302
+EXTRADEFS = -DXACT3_VER=0x0302
PARENTSRC = ../xactengine3_7
C_SRCS = \
diff --git a/dlls/xactengine3_3/Makefile.in b/dlls/xactengine3_3/Makefile.in
index 1bdfc72b1b7..1963f033557 100644
--- a/dlls/xactengine3_3/Makefile.in
+++ b/dlls/xactengine3_3/Makefile.in
@@ -1,7 +1,7 @@
MODULE = xactengine3_3.dll
IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid
EXTRAINCL = $(FAUDIO_PE_CFLAGS)
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DXACT3_VER=0x0303
+EXTRADEFS = -DXACT3_VER=0x0303
PARENTSRC = ../xactengine3_7
C_SRCS = \
diff --git a/dlls/xactengine3_4/Makefile.in b/dlls/xactengine3_4/Makefile.in
index 5987dc0df78..5d639c4e7ad 100644
--- a/dlls/xactengine3_4/Makefile.in
+++ b/dlls/xactengine3_4/Makefile.in
@@ -1,7 +1,7 @@
MODULE = xactengine3_4.dll
IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid
EXTRAINCL = $(FAUDIO_PE_CFLAGS)
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DXACT3_VER=0x0304
+EXTRADEFS = -DXACT3_VER=0x0304
PARENTSRC = ../xactengine3_7
C_SRCS = \
diff --git a/dlls/xactengine3_5/Makefile.in b/dlls/xactengine3_5/Makefile.in
index 5a95ceb9e30..47731dd7017 100644
--- a/dlls/xactengine3_5/Makefile.in
+++ b/dlls/xactengine3_5/Makefile.in
@@ -1,7 +1,7 @@
MODULE = xactengine3_5.dll
IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid
EXTRAINCL = $(FAUDIO_PE_CFLAGS)
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DXACT3_VER=0x0305
+EXTRADEFS = -DXACT3_VER=0x0305
PARENTSRC = ../xactengine3_7
C_SRCS = \
diff --git a/dlls/xactengine3_6/Makefile.in b/dlls/xactengine3_6/Makefile.in
index dfca6ac31d4..b0e235ecd08 100644
--- a/dlls/xactengine3_6/Makefile.in
+++ b/dlls/xactengine3_6/Makefile.in
@@ -1,7 +1,7 @@
MODULE = xactengine3_6.dll
IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid
EXTRAINCL = $(FAUDIO_PE_CFLAGS)
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DXACT3_VER=0x0306
+EXTRADEFS = -DXACT3_VER=0x0306
PARENTSRC = ../xactengine3_7
C_SRCS = \
diff --git a/dlls/xactengine3_7/Makefile.in b/dlls/xactengine3_7/Makefile.in
index 18ef2a683e8..128a41cf59a 100644
--- a/dlls/xactengine3_7/Makefile.in
+++ b/dlls/xactengine3_7/Makefile.in
@@ -1,7 +1,7 @@
MODULE = xactengine3_7.dll
IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid
EXTRAINCL = $(FAUDIO_PE_CFLAGS)
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DXACT3_VER=0x0307
+EXTRADEFS = -DXACT3_VER=0x0307
C_SRCS = \
xact_dll.c
diff --git a/dlls/xactengine3_7/xact_dll.c b/dlls/xactengine3_7/xact_dll.c
index 18608037ffb..98c3cf8f076 100644
--- a/dlls/xactengine3_7/xact_dll.c
+++ b/dlls/xactengine3_7/xact_dll.c
@@ -75,7 +75,7 @@ static HRESULT WINAPI IXACT3CueImpl_Stop(IXACT3Cue *iface, DWORD dwFlags)
{
XACT3CueImpl *This = impl_from_IXACT3Cue(iface);
- TRACE("(%p)->(%u)\n", iface, dwFlags);
+ TRACE("(%p)->(%lu)\n", iface, dwFlags);
return FACTCue_Stop(This->fact_cue, dwFlags);
}
@@ -86,7 +86,7 @@ static HRESULT WINAPI IXACT3CueImpl_GetState(IXACT3Cue *iface, DWORD *pdwState)
TRACE("(%p)->(%p)\n", iface, pdwState);
- return FACTCue_GetState(This->fact_cue, pdwState);
+ return FACTCue_GetState(This->fact_cue, (uint32_t *)pdwState);
}
static HRESULT WINAPI IXACT3CueImpl_Destroy(IXACT3Cue *iface)
@@ -108,7 +108,7 @@ static HRESULT WINAPI IXACT3CueImpl_Destroy(IXACT3Cue *iface)
static HRESULT WINAPI IXACT3CueImpl_GetChannelMap(IXACT3Cue *iface,
XACTCHANNELMAP *map, DWORD size, DWORD *needed_size)
{
- FIXME("(%p)->(%p, %u, %p)\n", iface, map, size, needed_size);
+ FIXME("(%p)->(%p, %lu, %p)\n", iface, map, size, needed_size);
return E_NOTIMPL;
}
@@ -306,7 +306,7 @@ static HRESULT WINAPI IXACT3SoundBankImpl_Prepare(IXACT3SoundBank *iface,
FACTCue *fcue;
UINT ret;
- TRACE("(%p)->(%u, 0x%x, %u, %p)\n", This, nCueIndex, dwFlags, timeOffset,
+ TRACE("(%p)->(%u, 0x%lx, %lu, %p)\n", This, nCueIndex, dwFlags, timeOffset,
ppCue);
ret = FACTSoundBank_Prepare(This->fact_soundbank, nCueIndex, dwFlags,
@@ -343,7 +343,7 @@ static HRESULT WINAPI IXACT3SoundBankImpl_Play(IXACT3SoundBank *iface,
FACTCue *fcue;
HRESULT hr;
- TRACE("(%p)->(%u, 0x%x, %u, %p)\n", This, nCueIndex, dwFlags, timeOffset,
+ TRACE("(%p)->(%u, 0x%lx, %lu, %p)\n", This, nCueIndex, dwFlags, timeOffset,
ppCue);
/* If the application doesn't want a handle, don't generate one at all.
@@ -380,7 +380,7 @@ static HRESULT WINAPI IXACT3SoundBankImpl_Stop(IXACT3SoundBank *iface,
{
XACT3SoundBankImpl *This = impl_from_IXACT3SoundBank(iface);
- TRACE("(%p)->(%u)\n", This, dwFlags);
+ TRACE("(%p)->(%lu)\n", This, dwFlags);
return FACTSoundBank_Stop(This->fact_soundbank, nCueIndex, dwFlags);
}
@@ -404,7 +404,7 @@ static HRESULT WINAPI IXACT3SoundBankImpl_GetState(IXACT3SoundBank *iface,
TRACE("(%p)->(%p)\n", This, pdwState);
- return FACTSoundBank_GetState(This->fact_soundbank, pdwState);
+ return FACTSoundBank_GetState(This->fact_soundbank, (uint32_t *)pdwState);
}
static const IXACT3SoundBankVtbl XACT3SoundBank_Vtbl =
@@ -459,7 +459,7 @@ static HRESULT WINAPI IXACT3WaveImpl_Stop(IXACT3Wave *iface, DWORD dwFlags)
{
XACT3WaveImpl *This = impl_from_IXACT3Wave(iface);
- TRACE("(%p)->(0x%x)\n", This, dwFlags);
+ TRACE("(%p)->(0x%lx)\n", This, dwFlags);
return FACTWave_Stop(This->fact_wave, dwFlags);
}
@@ -479,7 +479,7 @@ static HRESULT WINAPI IXACT3WaveImpl_GetState(IXACT3Wave *iface, DWORD *pdwState
TRACE("(%p)->(%p)\n", This, pdwState);
- return FACTWave_GetState(This->fact_wave, pdwState);
+ return FACTWave_GetState(This->fact_wave, (uint32_t *)pdwState);
}
static HRESULT WINAPI IXACT3WaveImpl_SetPitch(IXACT3Wave *iface, XACTPITCH pitch)
@@ -604,7 +604,7 @@ static HRESULT WINAPI IXACT3WaveBankImpl_Prepare(IXACT3WaveBank *iface,
FACTWave *fwave;
UINT ret;
- TRACE("(%p)->(0x%x, %u, 0x%x, %u, %p)\n", This, nWaveIndex, dwFlags,
+ TRACE("(%p)->(0x%x, %lu, 0x%lx, %u, %p)\n", This, nWaveIndex, dwFlags,
dwPlayOffset, nLoopCount, ppWave);
ret = FACTWaveBank_Prepare(This->fact_wavebank, nWaveIndex, dwFlags,
@@ -641,7 +641,7 @@ static HRESULT WINAPI IXACT3WaveBankImpl_Play(IXACT3WaveBank *iface,
FACTWave *fwave;
HRESULT hr;
- TRACE("(%p)->(0x%x, %u, 0x%x, %u, %p)\n", This, nWaveIndex, dwFlags, dwPlayOffset,
+ TRACE("(%p)->(0x%x, %lu, 0x%lx, %u, %p)\n", This, nWaveIndex, dwFlags, dwPlayOffset,
nLoopCount, ppWave);
/* If the application doesn't want a handle, don't generate one at all.
@@ -678,7 +678,7 @@ static HRESULT WINAPI IXACT3WaveBankImpl_Stop(IXACT3WaveBank *iface,
{
XACT3WaveBankImpl *This = impl_from_IXACT3WaveBank(iface);
- TRACE("(%p)->(%u, %u)\n", This, nWaveIndex, dwFlags);
+ TRACE("(%p)->(%u, %lu)\n", This, nWaveIndex, dwFlags);
return FACTWaveBank_Stop(This->fact_wavebank, nWaveIndex, dwFlags);
}
@@ -692,7 +692,7 @@ static HRESULT WINAPI IXACT3WaveBankImpl_GetState(IXACT3WaveBank *iface,
TRACE("(%p)->(%p)\n", This, pdwState);
- return FACTWaveBank_GetState(This->fact_wavebank, pdwState);
+ return FACTWaveBank_GetState(This->fact_wavebank, (uint32_t *)pdwState);
}
static const IXACT3WaveBankVtbl XACT3WaveBank_Vtbl =
@@ -733,7 +733,7 @@ static int32_t FACTCALL wrap_readfile(
{
wrap_readfile_struct *wrap = (wrap_readfile_struct*) hFile;
return wrap->engine->pReadFile(wrap->file, lpBuffer, nNumberOfBytesRead,
- lpNumberOfBytesRead, (LPOVERLAPPED)lpOverlapped);
+ (DWORD *)lpNumberOfBytesRead, (LPOVERLAPPED)lpOverlapped);
}
static int32_t FACTCALL wrap_getoverlappedresult(
@@ -744,7 +744,7 @@ static int32_t FACTCALL wrap_getoverlappedresult(
{
wrap_readfile_struct *wrap = (wrap_readfile_struct*) hFile;
return wrap->engine->pGetOverlappedResult(wrap->file, (LPOVERLAPPED)lpOverlapped,
- lpNumberOfBytesTransferred, bWait);
+ (DWORD *)lpNumberOfBytesTransferred, bWait);
}
static inline XACT3EngineImpl *impl_from_IXACT3Engine(IXACT3Engine *iface)
@@ -780,7 +780,7 @@ static ULONG WINAPI IXACT3EngineImpl_AddRef(IXACT3Engine *iface)
{
XACT3EngineImpl *This = impl_from_IXACT3Engine(iface);
ULONG ref = FACTAudioEngine_AddRef(This->fact_engine);
- TRACE("(%p)->(): Refcount now %u\n", This, ref);
+ TRACE("(%p)->(): Refcount now %lu\n", This, ref);
return ref;
}
@@ -789,7 +789,7 @@ static ULONG WINAPI IXACT3EngineImpl_Release(IXACT3Engine *iface)
XACT3EngineImpl *This = impl_from_IXACT3Engine(iface);
ULONG ref = FACTAudioEngine_Release(This->fact_engine);
- TRACE("(%p)->(): Refcount now %u\n", This, ref);
+ TRACE("(%p)->(): Refcount now %lu\n", This, ref);
if (!ref)
HeapFree(GetProcessHeap(), 0, This);
@@ -936,7 +936,7 @@ static HRESULT WINAPI IXACT3EngineImpl_CreateSoundBank(IXACT3Engine *iface,
FACTSoundBank *fsb;
UINT ret;
- TRACE("(%p)->(%p, %u, 0x%x, 0x%x, %p): stub!\n", This, pvBuffer, dwSize, dwFlags,
+ TRACE("(%p)->(%p, %lu, 0x%lx, 0x%lx, %p): stub!\n", This, pvBuffer, dwSize, dwFlags,
dwAllocAttributes, ppSoundBank);
ret = FACTAudioEngine_CreateSoundBank(This->fact_engine, pvBuffer, dwSize,
@@ -973,7 +973,7 @@ static HRESULT WINAPI IXACT3EngineImpl_CreateInMemoryWaveBank(IXACT3Engine *ifac
FACTWaveBank *fwb;
UINT ret;
- TRACE("(%p)->(%p, %u, 0x%x, 0x%x, %p)\n", This, pvBuffer, dwSize, dwFlags,
+ TRACE("(%p)->(%p, %lu, 0x%lx, 0x%lx, %p)\n", This, pvBuffer, dwSize, dwFlags,
dwAllocAttributes, ppWaveBank);
ret = FACTAudioEngine_CreateInMemoryWaveBank(This->fact_engine, pvBuffer,
@@ -1082,7 +1082,7 @@ static HRESULT WINAPI IXACT3EngineImpl_PrepareWave(IXACT3Engine *iface,
FACTWave *fwave = NULL;
UINT ret;
- TRACE("(%p)->(0x%08x, %s, %d, %d, %d, %d, %p)\n", This, dwFlags, debugstr_a(szWavePath),
+ TRACE("(%p)->(0x%08lx, %s, %d, %ld, %ld, %d, %p)\n", This, dwFlags, debugstr_a(szWavePath),
wStreamingPacketSize, dwAlignment, dwPlayOffset, nLoopCount, ppWave);
ret = FACTAudioEngine_PrepareWave(This->fact_engine, dwFlags, szWavePath, wStreamingPacketSize,
@@ -1278,7 +1278,7 @@ static HRESULT WINAPI IXACT3EngineImpl_Stop(IXACT3Engine *iface,
{
XACT3EngineImpl *This = impl_from_IXACT3Engine(iface);
- TRACE("(%p)->(%u, 0x%x)\n", This, nCategory, dwFlags);
+ TRACE("(%p)->(%u, 0x%lx)\n", This, nCategory, dwFlags);
return FACTAudioEngine_Stop(This->fact_engine, nCategory, dwFlags);
}
@@ -1460,7 +1460,7 @@ static IClassFactory XACTFactory = { &XACT3CF_Vtbl };
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, void *pReserved)
{
- TRACE("(%p, %d, %p)\n", hinstDLL, reason, pReserved);
+ TRACE("(%p, %ld, %p)\n", hinstDLL, reason, pReserved);
switch (reason)
{
--
2.34.1
2
1
[PATCH 1/6] winegstreamer: Stub implement WMA decoder DMO / MF transform.
by Rémi Bernon Feb. 2, 2022
by Rémi Bernon Feb. 2, 2022
Feb. 2, 2022
Final Fantasy XIV intro videos require media_object_GetStreamCount and
property_bag_Write to return S_OK in order to not get stuck. This could
be done in a separate commit but would cause a temporary regression.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51931
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52391
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
dlls/mf/tests/mf.c | 1 -
dlls/winegstreamer/Makefile.in | 5 +-
dlls/winegstreamer/gst_private.h | 1 +
dlls/winegstreamer/main.c | 26 +
dlls/winegstreamer/mfplat.c | 28 +-
dlls/winegstreamer/quartz_parser.c | 2 +-
dlls/winegstreamer/winegstreamer_classes.idl | 6 +
dlls/winegstreamer/wma_decoder.c | 553 +++++++++++++++++++
dlls/wmadmod/tests/wmadmod.c | 5 -
9 files changed, 617 insertions(+), 10 deletions(-)
create mode 100644 dlls/winegstreamer/wma_decoder.c
diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c
index 8ba93656a7d..0bf81e0c878 100644
--- a/dlls/mf/tests/mf.c
+++ b/dlls/mf/tests/mf.c
@@ -5743,7 +5743,6 @@ static void test_wma_decoder(void)
&transform, &class_id))
goto failed;
- todo_wine
check_interface(transform, &IID_IMediaObject, TRUE);
/* check default media types */
diff --git a/dlls/winegstreamer/Makefile.in b/dlls/winegstreamer/Makefile.in
index 062fe57bdbb..1706effbd20 100644
--- a/dlls/winegstreamer/Makefile.in
+++ b/dlls/winegstreamer/Makefile.in
@@ -2,7 +2,7 @@ EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = winegstreamer.dll
UNIXLIB = winegstreamer.so
IMPORTLIB = winegstreamer
-IMPORTS = strmbase ole32
+IMPORTS = strmbase ole32 msdmo
DELAYIMPORTS = mfplat
EXTRAINCL = $(GSTREAMER_CFLAGS)
EXTRALIBS = $(GSTREAMER_LIBS) $(PTHREAD_LIBS)
@@ -16,7 +16,8 @@ C_SRCS = \
wg_parser.c \
wm_asyncreader.c \
wm_reader.c \
- wm_syncreader.c
+ wm_syncreader.c \
+ wma_decoder.c
IDL_SRCS = \
winegstreamer_classes.idl
diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h
index 9e1d67417d4..222bce3b2c7 100644
--- a/dlls/winegstreamer/gst_private.h
+++ b/dlls/winegstreamer/gst_private.h
@@ -102,6 +102,7 @@ HRESULT avi_splitter_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
HRESULT decodebin_parser_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
HRESULT mpeg_splitter_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
HRESULT wave_parser_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
+HRESULT wma_decoder_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
bool amt_from_wg_format(AM_MEDIA_TYPE *mt, const struct wg_format *format, bool wm);
bool amt_to_wg_format(const AM_MEDIA_TYPE *mt, struct wg_format *format);
diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c
index ac9a3201792..260dd208e2f 100644
--- a/dlls/winegstreamer/main.c
+++ b/dlls/winegstreamer/main.c
@@ -25,7 +25,9 @@
#include "gst_private.h"
#include "winternl.h"
#include "rpcproxy.h"
+#include "dmoreg.h"
#include "gst_guids.h"
+#include "wmcodecdsp.h"
static unixlib_handle_t unix_handle;
@@ -339,6 +341,7 @@ static struct class_factory avi_splitter_cf = {{&class_factory_vtbl}, avi_splitt
static struct class_factory decodebin_parser_cf = {{&class_factory_vtbl}, decodebin_parser_create};
static struct class_factory mpeg_splitter_cf = {{&class_factory_vtbl}, mpeg_splitter_create};
static struct class_factory wave_parser_cf = {{&class_factory_vtbl}, wave_parser_create};
+static struct class_factory wma_decoder_cf = {{&class_factory_vtbl}, wma_decoder_create};
HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out)
{
@@ -361,6 +364,8 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out)
factory = &mpeg_splitter_cf;
else if (IsEqualGUID(clsid, &CLSID_WAVEParser))
factory = &wave_parser_cf;
+ else if (IsEqualGUID(clsid, &CLSID_WMADecMediaObject))
+ factory = &wma_decoder_cf;
else
{
FIXME("%s not implemented, returning CLASS_E_CLASSNOTAVAILABLE.\n", debugstr_guid(clsid));
@@ -522,6 +527,19 @@ static const REGFILTER2 reg_decodebin_parser =
HRESULT WINAPI DllRegisterServer(void)
{
+ DMO_PARTIAL_MEDIATYPE wma_decoder_output[2] =
+ {
+ {.type = MEDIATYPE_Audio, .subtype = MEDIASUBTYPE_PCM},
+ {.type = MEDIATYPE_Audio, .subtype = MEDIASUBTYPE_IEEE_FLOAT},
+ };
+ DMO_PARTIAL_MEDIATYPE wma_decoder_input[4] =
+ {
+ {.type = MEDIATYPE_Audio, .subtype = MEDIASUBTYPE_MSAUDIO1},
+ {.type = MEDIATYPE_Audio, .subtype = MEDIASUBTYPE_WMAUDIO2},
+ {.type = MEDIATYPE_Audio, .subtype = MEDIASUBTYPE_WMAUDIO3},
+ {.type = MEDIATYPE_Audio, .subtype = MEDIASUBTYPE_WMAUDIO_LOSSLESS},
+ };
+
IFilterMapper2 *mapper;
HRESULT hr;
@@ -543,6 +561,10 @@ HRESULT WINAPI DllRegisterServer(void)
IFilterMapper2_Release(mapper);
+ if (FAILED(hr = DMORegister(L"WMA Decoder DMO", &CLSID_WMADecMediaObject, &DMOCATEGORY_AUDIO_DECODER,
+ 0, ARRAY_SIZE(wma_decoder_input), wma_decoder_input, ARRAY_SIZE(wma_decoder_output), wma_decoder_output)))
+ return hr;
+
return mfplat_DllRegisterServer();
}
@@ -566,5 +588,9 @@ HRESULT WINAPI DllUnregisterServer(void)
IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_WAVEParser);
IFilterMapper2_Release(mapper);
+
+ if (FAILED(hr = DMOUnregister(&CLSID_WMADecMediaObject, &DMOCATEGORY_AUDIO_DECODER)))
+ return hr;
+
return S_OK;
}
diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c
index 5404728ba83..6a58f444204 100644
--- a/dlls/winegstreamer/mfplat.c
+++ b/dlls/winegstreamer/mfplat.c
@@ -21,6 +21,7 @@
#include "ks.h"
#include "ksmedia.h"
+#include "wmcodecdsp.h"
#include "initguid.h"
#include "mfapi.h"
@@ -442,6 +443,20 @@ static const GUID *audio_converter_supported_types[] =
&MFAudioFormat_Float,
};
+static WCHAR wma_decoderW[] = L"WMAudio Decoder MFT";
+static const GUID *wma_decoder_input_types[] =
+{
+ &MEDIASUBTYPE_MSAUDIO1,
+ &MFAudioFormat_WMAudioV8,
+ &MFAudioFormat_WMAudioV9,
+ &MFAudioFormat_WMAudio_Lossless,
+};
+static const GUID *wma_decoder_output_types[] =
+{
+ &MFAudioFormat_PCM,
+ &MFAudioFormat_Float,
+};
+
static const struct mft
{
const GUID *clsid;
@@ -467,13 +482,24 @@ mfts[] =
ARRAY_SIZE(audio_converter_supported_types),
audio_converter_supported_types,
},
+ {
+ &CLSID_WMADecMediaObject,
+ &MFT_CATEGORY_AUDIO_DECODER,
+ wma_decoderW,
+ MFT_ENUM_FLAG_SYNCMFT,
+ &MFMediaType_Audio,
+ ARRAY_SIZE(wma_decoder_input_types),
+ wma_decoder_input_types,
+ ARRAY_SIZE(wma_decoder_output_types),
+ wma_decoder_output_types,
+ },
};
HRESULT mfplat_DllRegisterServer(void)
{
unsigned int i, j;
HRESULT hr;
- MFT_REGISTER_TYPE_INFO input_types[2], output_types[2];
+ MFT_REGISTER_TYPE_INFO input_types[4], output_types[2];
for (i = 0; i < ARRAY_SIZE(mfts); i++)
{
diff --git a/dlls/winegstreamer/quartz_parser.c b/dlls/winegstreamer/quartz_parser.c
index 8532fc1af8b..e8d56d54785 100644
--- a/dlls/winegstreamer/quartz_parser.c
+++ b/dlls/winegstreamer/quartz_parser.c
@@ -29,8 +29,8 @@
#include "dvdmedia.h"
#include "mmreg.h"
#include "ks.h"
-#include "initguid.h"
#include "wmcodecdsp.h"
+#include "initguid.h"
#include "ksmedia.h"
WINE_DEFAULT_DEBUG_CHANNEL(quartz);
diff --git a/dlls/winegstreamer/winegstreamer_classes.idl b/dlls/winegstreamer/winegstreamer_classes.idl
index 072ec90eea4..90dc1dc839b 100644
--- a/dlls/winegstreamer/winegstreamer_classes.idl
+++ b/dlls/winegstreamer/winegstreamer_classes.idl
@@ -67,3 +67,9 @@ coclass GStreamerByteStreamHandler {}
uuid(6a170414-aad9-4693-b806-3a0c47c570d6)
]
coclass WINEAudioConverter { }
+
+[
+ threading(both),
+ uuid(2eeb4adf-4578-4d10-bca7-bb955f56320a)
+]
+coclass CWMADecMediaObject {};
diff --git a/dlls/winegstreamer/wma_decoder.c b/dlls/winegstreamer/wma_decoder.c
new file mode 100644
index 00000000000..f034c34395e
--- /dev/null
+++ b/dlls/winegstreamer/wma_decoder.c
@@ -0,0 +1,553 @@
+/* WMA Decoder DMO / MF Transform
+ *
+ * Copyright 2022 Rémi Bernon for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "gst_private.h"
+
+#include "mfapi.h"
+#include "mferror.h"
+#include "mfobjects.h"
+#include "mftransform.h"
+#include "wmcodecdsp.h"
+
+#include "wine/debug.h"
+#include "wine/heap.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(wmadec);
+
+struct wma_decoder
+{
+ IUnknown IUnknown_inner;
+ IMFTransform IMFTransform_iface;
+ IMediaObject IMediaObject_iface;
+ IPropertyBag IPropertyBag_iface;
+ IUnknown *outer;
+ LONG refcount;
+};
+
+static inline struct wma_decoder *impl_from_IUnknown(IUnknown *iface)
+{
+ return CONTAINING_RECORD(iface, struct wma_decoder, IUnknown_inner);
+}
+
+static HRESULT WINAPI unknown_QueryInterface(IUnknown *iface, REFIID iid, void **out)
+{
+ struct wma_decoder *decoder = impl_from_IUnknown(iface);
+
+ TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
+
+ if (IsEqualGUID(iid, &IID_IUnknown))
+ *out = &decoder->IUnknown_inner;
+ else if (IsEqualGUID(iid, &IID_IMFTransform))
+ *out = &decoder->IMFTransform_iface;
+ else if (IsEqualGUID(iid, &IID_IMediaObject))
+ *out = &decoder->IMediaObject_iface;
+ else if (IsEqualIID(iid, &IID_IPropertyBag))
+ *out = &decoder->IPropertyBag_iface;
+ else
+ {
+ *out = NULL;
+ WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
+ return E_NOINTERFACE;
+ }
+
+ IUnknown_AddRef((IUnknown *)*out);
+ return S_OK;
+}
+
+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);
+
+ return refcount;
+}
+
+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);
+
+ if (!refcount)
+ free(decoder);
+
+ return refcount;
+}
+
+static const IUnknownVtbl unknown_vtbl =
+{
+ unknown_QueryInterface,
+ unknown_AddRef,
+ unknown_Release,
+};
+
+static struct wma_decoder *impl_from_IMFTransform(IMFTransform *iface)
+{
+ return CONTAINING_RECORD(iface, struct wma_decoder, IMFTransform_iface);
+}
+
+static HRESULT WINAPI transform_QueryInterface(IMFTransform *iface, REFIID iid, void **out)
+{
+ struct wma_decoder *decoder = impl_from_IMFTransform(iface);
+ return IUnknown_QueryInterface(decoder->outer, iid, out);
+}
+
+static ULONG WINAPI transform_AddRef(IMFTransform *iface)
+{
+ struct wma_decoder *decoder = impl_from_IMFTransform(iface);
+ return IUnknown_AddRef(decoder->outer);
+}
+
+static ULONG WINAPI transform_Release(IMFTransform *iface)
+{
+ struct wma_decoder *decoder = impl_from_IMFTransform(iface);
+ return IUnknown_Release(decoder->outer);
+}
+
+static HRESULT WINAPI transform_GetStreamLimits(IMFTransform *iface, DWORD *input_minimum,
+ DWORD *input_maximum, DWORD *output_minimum, DWORD *output_maximum)
+{
+ FIXME("iface %p, input_minimum %p, input_maximum %p, output_minimum %p, output_maximum %p stub!\n",
+ iface, input_minimum, input_maximum, output_minimum, output_maximum);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetStreamCount(IMFTransform *iface, DWORD *inputs, DWORD *outputs)
+{
+ FIXME("iface %p, inputs %p, outputs %p stub!\n", iface, inputs, outputs);
+ return E_NOTIMPL;
+}
+
+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,
+ input_size, inputs, output_size, outputs);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetInputStreamInfo(IMFTransform *iface, DWORD id, MFT_INPUT_STREAM_INFO *info)
+{
+ FIXME("iface %p, id %u, info %p stub!\n", iface, id, info);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetOutputStreamInfo(IMFTransform *iface, DWORD id, MFT_OUTPUT_STREAM_INFO *info)
+{
+ FIXME("iface %p, id %u, info %p stub!\n", iface, id, info);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetAttributes(IMFTransform *iface, IMFAttributes **attributes)
+{
+ FIXME("iface %p, attributes %p stub!\n", iface, attributes);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetInputStreamAttributes(IMFTransform *iface, DWORD id, IMFAttributes **attributes)
+{
+ FIXME("iface %p, id %u, 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);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_DeleteInputStream(IMFTransform *iface, DWORD id)
+{
+ FIXME("iface %p, id %u 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);
+ 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);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetOutputAvailableType(IMFTransform *iface, DWORD id, DWORD index,
+ IMFMediaType **type)
+{
+ FIXME("iface %p, id %u, index %u, type %p stub!\n", iface, id, index, type);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_SetInputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags)
+{
+ FIXME("iface %p, id %u, type %p, flags %#x stub!\n", iface, id, type, flags);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags)
+{
+ FIXME("iface %p, id %u, type %p, flags %#x stub!\n", iface, id, type, flags);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetInputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type)
+{
+ FIXME("iface %p, id %u, 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);
+ 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);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetOutputStatus(IMFTransform *iface, DWORD *flags)
+{
+ FIXME("iface %p, flags %p stub!\n", iface, flags);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_SetOutputBounds(IMFTransform *iface, LONGLONG lower, LONGLONG upper)
+{
+ FIXME("iface %p, lower %s, upper %s stub!\n", iface, wine_dbgstr_longlong(lower),
+ wine_dbgstr_longlong(upper));
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_ProcessEvent(IMFTransform *iface, DWORD id, IMFMediaEvent *event)
+{
+ FIXME("iface %p, id %u, event %p stub!\n", iface, id, event);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_ProcessMessage(IMFTransform *iface, MFT_MESSAGE_TYPE message, ULONG_PTR param)
+{
+ FIXME("iface %p, message %#x, param %p stub!\n", iface, message, (void *)param);
+ return E_NOTIMPL;
+}
+
+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);
+ 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);
+ return E_NOTIMPL;
+}
+
+static const IMFTransformVtbl transform_vtbl =
+{
+ transform_QueryInterface,
+ transform_AddRef,
+ transform_Release,
+ transform_GetStreamLimits,
+ transform_GetStreamCount,
+ transform_GetStreamIDs,
+ transform_GetInputStreamInfo,
+ transform_GetOutputStreamInfo,
+ transform_GetAttributes,
+ transform_GetInputStreamAttributes,
+ transform_GetOutputStreamAttributes,
+ transform_DeleteInputStream,
+ transform_AddInputStreams,
+ transform_GetInputAvailableType,
+ transform_GetOutputAvailableType,
+ transform_SetInputType,
+ transform_SetOutputType,
+ transform_GetInputCurrentType,
+ transform_GetOutputCurrentType,
+ transform_GetInputStatus,
+ transform_GetOutputStatus,
+ transform_SetOutputBounds,
+ transform_ProcessEvent,
+ transform_ProcessMessage,
+ transform_ProcessInput,
+ transform_ProcessOutput,
+};
+
+static inline struct wma_decoder *impl_from_IMediaObject(IMediaObject *iface)
+{
+ return CONTAINING_RECORD(iface, struct wma_decoder, IMediaObject_iface);
+}
+
+static HRESULT WINAPI media_object_QueryInterface(IMediaObject *iface, REFIID iid, void **obj)
+{
+ struct wma_decoder *decoder = impl_from_IMediaObject(iface);
+ return IUnknown_QueryInterface(decoder->outer, iid, obj);
+}
+
+static ULONG WINAPI media_object_AddRef(IMediaObject *iface)
+{
+ struct wma_decoder *decoder = impl_from_IMediaObject(iface);
+ return IUnknown_AddRef(decoder->outer);
+}
+
+static ULONG WINAPI media_object_Release(IMediaObject *iface)
+{
+ struct wma_decoder *decoder = impl_from_IMediaObject(iface);
+ return IUnknown_Release(decoder->outer);
+}
+
+static HRESULT WINAPI media_object_GetStreamCount(IMediaObject *iface, DWORD *input, DWORD *output)
+{
+ FIXME("iface %p, input %p, output %p semi-stub!\n", iface, input, output);
+ *input = *output = 1;
+ return S_OK;
+}
+
+static HRESULT WINAPI media_object_GetInputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags)
+{
+ FIXME("iface %p, index %u, 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);
+ 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);
+ 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);
+ 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);
+ 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);
+ 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);
+ 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);
+ 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,
+ 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);
+ 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);
+ 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));
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_Flush(IMediaObject *iface)
+{
+ FIXME("iface %p stub!\n", iface);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_Discontinuity(IMediaObject *iface, DWORD index)
+{
+ FIXME("iface %p, index %u stub!\n", iface, index);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_AllocateStreamingResources(IMediaObject *iface)
+{
+ FIXME("iface %p stub!\n", iface);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_FreeStreamingResources(IMediaObject *iface)
+{
+ FIXME("iface %p stub!\n", iface);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_GetInputStatus(IMediaObject *iface, DWORD index, DWORD *flags)
+{
+ FIXME("iface %p, index %u, 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,
+ index, buffer, flags, wine_dbgstr_longlong(timestamp), wine_dbgstr_longlong(timelength));
+ return E_NOTIMPL;
+}
+
+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);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_Lock(IMediaObject *iface, LONG lock)
+{
+ FIXME("iface %p, lock %d stub!\n", iface, lock);
+ return E_NOTIMPL;
+}
+
+static const IMediaObjectVtbl media_object_vtbl =
+{
+ media_object_QueryInterface,
+ media_object_AddRef,
+ media_object_Release,
+ media_object_GetStreamCount,
+ media_object_GetInputStreamInfo,
+ media_object_GetOutputStreamInfo,
+ media_object_GetInputType,
+ media_object_GetOutputType,
+ media_object_SetInputType,
+ media_object_SetOutputType,
+ media_object_GetInputCurrentType,
+ media_object_GetOutputCurrentType,
+ media_object_GetInputSizeInfo,
+ media_object_GetOutputSizeInfo,
+ media_object_GetInputMaxLatency,
+ media_object_SetInputMaxLatency,
+ media_object_Flush,
+ media_object_Discontinuity,
+ media_object_AllocateStreamingResources,
+ media_object_FreeStreamingResources,
+ media_object_GetInputStatus,
+ media_object_ProcessInput,
+ media_object_ProcessOutput,
+ media_object_Lock,
+};
+
+static inline struct wma_decoder *impl_from_IPropertyBag(IPropertyBag *iface)
+{
+ return CONTAINING_RECORD(iface, struct wma_decoder, IPropertyBag_iface);
+}
+
+static HRESULT WINAPI property_bag_QueryInterface(IPropertyBag *iface, REFIID iid, void **out)
+{
+ struct wma_decoder *filter = impl_from_IPropertyBag(iface);
+ return IUnknown_QueryInterface(filter->outer, iid, out);
+}
+
+static ULONG WINAPI property_bag_AddRef(IPropertyBag *iface)
+{
+ struct wma_decoder *filter = impl_from_IPropertyBag(iface);
+ return IUnknown_AddRef(filter->outer);
+}
+
+static ULONG WINAPI property_bag_Release(IPropertyBag *iface)
+{
+ struct wma_decoder *filter = impl_from_IPropertyBag(iface);
+ return IUnknown_Release(filter->outer);
+}
+
+static HRESULT WINAPI property_bag_Read(IPropertyBag *iface, const WCHAR *prop_name, VARIANT *value,
+ IErrorLog *error_log)
+{
+ FIXME("iface %p, prop_name %s, value %p, error_log %p stub!\n", iface, debugstr_w(prop_name), value, error_log);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI property_bag_Write(IPropertyBag *iface, const WCHAR *prop_name, VARIANT *value)
+{
+ FIXME("iface %p, prop_name %s, value %p stub!\n", iface, debugstr_w(prop_name), value);
+ return S_OK;
+}
+
+static const IPropertyBagVtbl property_bag_vtbl =
+{
+ property_bag_QueryInterface,
+ property_bag_AddRef,
+ property_bag_Release,
+ property_bag_Read,
+ property_bag_Write,
+};
+
+HRESULT wma_decoder_create(IUnknown *outer, IUnknown **out)
+{
+ struct wma_decoder *decoder;
+
+ TRACE("outer %p, out %p.\n", outer, out);
+
+ if (!(decoder = calloc(1, sizeof(*decoder))))
+ return E_OUTOFMEMORY;
+
+ decoder->IUnknown_inner.lpVtbl = &unknown_vtbl;
+ decoder->IMFTransform_iface.lpVtbl = &transform_vtbl;
+ decoder->IMediaObject_iface.lpVtbl = &media_object_vtbl;
+ decoder->IPropertyBag_iface.lpVtbl = &property_bag_vtbl;
+ decoder->refcount = 1;
+ decoder->outer = outer ? outer : &decoder->IUnknown_inner;
+
+ *out = &decoder->IUnknown_inner;
+ TRACE("Created decoder %p\n", *out);
+ return S_OK;
+}
diff --git a/dlls/wmadmod/tests/wmadmod.c b/dlls/wmadmod/tests/wmadmod.c
index e95e297eaca..b49b609dac3 100644
--- a/dlls/wmadmod/tests/wmadmod.c
+++ b/dlls/wmadmod/tests/wmadmod.c
@@ -52,11 +52,8 @@ static void test_DMOGetTypes(void)
hr = DMOGetTypes( &CLSID_CWMADecMediaObject, ARRAY_SIZE(input), &input_count, input,
ARRAY_SIZE(output), &output_count, output );
- todo_wine
ok( hr == S_OK, "DMOGetTypes returned %#lx\n", hr );
- todo_wine
ok( input_count == ARRAY_SIZE(expect_input), "got input_count %lu\n", input_count );
- todo_wine
ok( output_count == ARRAY_SIZE(expect_output), "got output_count %lu\n", output_count );
for (i = 0; i < input_count; ++i)
@@ -135,9 +132,7 @@ static void test_interfaces(void)
hr = CoCreateInstance( &CLSID_CWMADecMediaObject, &outer, CLSCTX_INPROC_SERVER, &IID_IUnknown,
(void **)&unknown );
- todo_wine
ok( hr == S_OK, "CoCreateInstance returned %#lx\n", hr );
- if (FAILED(hr)) return;
hr = IUnknown_QueryInterface( unknown, &IID_IMFTransform, (void **)&transform );
ok( hr == S_OK, "QueryInterface returned %#lx\n", hr );
hr = IUnknown_QueryInterface( unknown, &IID_IMediaObject, (void **)&media_object );
--
2.34.1
2
13
Feb. 2, 2022
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/dmsynth/tests/Makefile.in | 1 -
dlls/dmsynth/tests/dmsynth.c | 104 ++++++++++++++++-----------------
2 files changed, 52 insertions(+), 53 deletions(-)
diff --git a/dlls/dmsynth/tests/Makefile.in b/dlls/dmsynth/tests/Makefile.in
index b082aa5dcc5..5f2fce7b8b1 100644
--- a/dlls/dmsynth/tests/Makefile.in
+++ b/dlls/dmsynth/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = dmsynth.dll
IMPORTS = oleaut32 ole32 uuid
diff --git a/dlls/dmsynth/tests/dmsynth.c b/dlls/dmsynth/tests/dmsynth.c
index 59ced1f0f21..5f2e9e95364 100644
--- a/dlls/dmsynth/tests/dmsynth.c
+++ b/dlls/dmsynth/tests/dmsynth.c
@@ -67,81 +67,81 @@ static void test_dmsynth(void)
DMUS_PORTCAPS caps;
hr = CoCreateInstance(&CLSID_DirectMusicSynth, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicSynth, (LPVOID*)&dmsynth);
- ok(hr == S_OK, "CoCreateInstance returned: %x\n", hr);
+ ok(hr == S_OK, "CoCreateInstance returned: %#lx\n", hr);
hr = CoCreateInstance(&CLSID_DirectMusicSynthSink, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicSynthSink,
(void **)&dmsynth_sink);
- ok(hr == S_OK, "CoCreateInstance returned: %x\n", hr);
+ ok(hr == S_OK, "CoCreateInstance returned: %#lx\n", hr);
hr = CoCreateInstance(&CLSID_DirectMusicSynthSink, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicSynthSink,
(void **)&dmsynth_sink2);
- ok(hr == S_OK, "CoCreateInstance returned: %x\n", hr);
+ ok(hr == S_OK, "CoCreateInstance returned: %#lx\n", hr);
hr = IDirectMusicSynth_QueryInterface(dmsynth, &IID_IKsControl, (LPVOID*)&control_synth);
- ok(hr == S_OK, "IDirectMusicSynth_QueryInterface returned: %x\n", hr);
+ ok(hr == S_OK, "IDirectMusicSynth_QueryInterface returned: %#lx\n", hr);
S(U(property)).Id = 0;
S(U(property)).Flags = KSPROPERTY_TYPE_GET;
S(U(property)).Set = GUID_DMUS_PROP_INSTRUMENT2;
hr = IKsControl_KsProperty(control_synth, &property, sizeof(property), &value, sizeof(value), &bytes);
- ok(hr == S_OK, "IKsControl_KsProperty returned: %x\n", hr);
- ok(bytes == sizeof(DWORD), "Returned bytes: %u, should be 4\n", bytes);
- ok(value == TRUE, "Return value: %u, should be 1\n", value);
+ ok(hr == S_OK, "IKsControl_KsProperty returned: %#lx\n", hr);
+ ok(bytes == sizeof(DWORD), "Returned bytes: %lu, should be 4\n", bytes);
+ ok(value == TRUE, "Return value: %lu, should be 1\n", value);
S(U(property)).Set = GUID_DMUS_PROP_DLS2;
hr = IKsControl_KsProperty(control_synth, &property, sizeof(property), &value, sizeof(value), &bytes);
- ok(hr == S_OK, "IKsControl_KsProperty returned: %x\n", hr);
- ok(bytes == sizeof(DWORD), "Returned bytes: %u, should be 4\n", bytes);
- ok(value == TRUE, "Return value: %u, should be 1\n", value);
+ ok(hr == S_OK, "IKsControl_KsProperty returned: %#lx\n", hr);
+ ok(bytes == sizeof(DWORD), "Returned bytes: %lu, should be 4\n", bytes);
+ ok(value == TRUE, "Return value: %lu, should be 1\n", value);
S(U(property)).Set = GUID_DMUS_PROP_GM_Hardware;
hr = IKsControl_KsProperty(control_synth, &property, sizeof(property), &value, sizeof(value), &bytes);
- ok(hr == S_OK, "IKsControl_KsProperty returned: %x\n", hr);
- ok(bytes == sizeof(DWORD), "Returned bytes: %u, should be 4\n", bytes);
- ok(value == FALSE, "Return value: %u, should be 0\n", value);
+ ok(hr == S_OK, "IKsControl_KsProperty returned: %#lx\n", hr);
+ ok(bytes == sizeof(DWORD), "Returned bytes: %lu, should be 4\n", bytes);
+ ok(value == FALSE, "Return value: %lu, should be 0\n", value);
S(U(property)).Set = GUID_DMUS_PROP_GS_Hardware;
hr = IKsControl_KsProperty(control_synth, &property, sizeof(property), &value, sizeof(value), &bytes);
- ok(hr == S_OK, "IKsControl_KsProperty returned: %x\n", hr);
- ok(bytes == sizeof(DWORD), "Returned bytes: %u, should be 4\n", bytes);
- ok(value == FALSE, "Return value: %u, should be 0\n", value);
+ ok(hr == S_OK, "IKsControl_KsProperty returned: %#lx\n", hr);
+ ok(bytes == sizeof(DWORD), "Returned bytes: %lu, should be 4\n", bytes);
+ ok(value == FALSE, "Return value: %lu, should be 0\n", value);
S(U(property)).Set = GUID_DMUS_PROP_XG_Hardware;
hr = IKsControl_KsProperty(control_synth, &property, sizeof(property), &value, sizeof(value), &bytes);
- ok(hr == S_OK, "IKsControl_KsProperty returned: %x\n", hr);
- ok(bytes == sizeof(DWORD), "Returned bytes: %u, should be 4\n", bytes);
- ok(value == FALSE, "Return value: %u, should be 0\n", value);
+ ok(hr == S_OK, "IKsControl_KsProperty returned: %#lx\n", hr);
+ ok(bytes == sizeof(DWORD), "Returned bytes: %lu, should be 4\n", bytes);
+ ok(value == FALSE, "Return value: %lu, should be 0\n", value);
hr = IDirectMusicSynthSink_QueryInterface(dmsynth_sink, &IID_IKsControl, (LPVOID*)&control_sink);
- ok(hr == S_OK, "IDirectMusicSynthSink_QueryInterface returned: %x\n", hr);
+ ok(hr == S_OK, "IDirectMusicSynthSink_QueryInterface returned: %#lx\n", hr);
S(U(property)).Set = GUID_DMUS_PROP_SinkUsesDSound;
hr = IKsControl_KsProperty(control_sink, &property, sizeof(property), &value, sizeof(value), &bytes);
- ok(hr == S_OK, "IKsControl_KsProperty returned: %x\n", hr);
- ok(bytes == sizeof(DWORD), "Returned bytes: %u, should be 4\n", bytes);
- ok(value == TRUE, "Return value: %u, should be 1\n", value);
+ ok(hr == S_OK, "IKsControl_KsProperty returned: %#lx\n", hr);
+ ok(bytes == sizeof(DWORD), "Returned bytes: %lu, should be 4\n", bytes);
+ ok(value == TRUE, "Return value: %lu, should be 1\n", value);
/* Synth isn't fully initialized yet */
hr = IDirectMusicSynth_Activate(dmsynth, TRUE);
- ok(hr == DMUS_E_NOSYNTHSINK, "IDirectMusicSynth_Activate returned: %x\n", hr);
+ ok(hr == DMUS_E_NOSYNTHSINK, "IDirectMusicSynth_Activate returned: %#lx\n", hr);
/* Synth has no default clock */
hr = IDirectMusicSynth_GetLatencyClock(dmsynth, &clock_synth);
- ok(hr == DMUS_E_NOSYNTHSINK, "IDirectMusicSynth_GetLatencyClock returned: %x\n", hr);
+ ok(hr == DMUS_E_NOSYNTHSINK, "IDirectMusicSynth_GetLatencyClock returned: %#lx\n", hr);
/* SynthSink has a default clock */
hr = IDirectMusicSynthSink_GetLatencyClock(dmsynth_sink, &clock_sink);
- ok(hr == S_OK, "IDirectMusicSynth_GetLatencyClock returned: %x\n", hr);
+ ok(hr == S_OK, "IDirectMusicSynth_GetLatencyClock returned: %#lx\n", hr);
ok(clock_sink != NULL, "No clock returned\n");
ref_clock_sink = get_refcount(clock_sink);
/* This will Init() the SynthSink and finish initializing the Synth */
hr = IDirectMusicSynthSink_Init(dmsynth_sink2, NULL);
- ok(hr == S_OK, "IDirectMusicSynthSink_Init returned: %x\n", hr);
+ ok(hr == S_OK, "IDirectMusicSynthSink_Init returned: %#lx\n", hr);
hr = IDirectMusicSynth_SetSynthSink(dmsynth, dmsynth_sink2);
- ok(hr == S_OK, "IDirectMusicSynth_SetSynthSink returned: %x\n", hr);
+ ok(hr == S_OK, "IDirectMusicSynth_SetSynthSink returned: %#lx\n", hr);
hr = IDirectMusicSynth_SetSynthSink(dmsynth, dmsynth_sink);
- ok(hr == S_OK, "IDirectMusicSynth_SetSynthSink returned: %x\n", hr);
+ ok(hr == S_OK, "IDirectMusicSynth_SetSynthSink returned: %#lx\n", hr);
/* Check clocks are the same */
hr = IDirectMusicSynth_GetLatencyClock(dmsynth, &clock_synth);
- ok(hr == S_OK, "IDirectMusicSynth_GetLatencyClock returned: %x\n", hr);
+ ok(hr == S_OK, "IDirectMusicSynth_GetLatencyClock returned: %#lx\n", hr);
ok(clock_synth != NULL, "No clock returned\n");
ok(clock_synth == clock_sink, "Synth and SynthSink clocks are not the same\n");
ref_clock_synth = get_refcount(clock_synth);
@@ -149,13 +149,13 @@ static void test_dmsynth(void)
/* GetPortCaps */
hr = IDirectMusicSynth_GetPortCaps(dmsynth, NULL);
- ok(hr == E_INVALIDARG, "GetPortCaps failed: %#x\n", hr);
+ ok(hr == E_INVALIDARG, "GetPortCaps failed: %#lx\n", hr);
memset(&caps, 0, sizeof(caps));
hr = IDirectMusicSynth_GetPortCaps(dmsynth, &caps);
- ok(hr == E_INVALIDARG, "GetPortCaps failed: %#x\n", hr);
+ ok(hr == E_INVALIDARG, "GetPortCaps failed: %#lx\n", hr);
caps.dwSize = sizeof(caps) + 1;
hr = IDirectMusicSynth_GetPortCaps(dmsynth, &caps);
- ok(hr == S_OK, "GetPortCaps failed: %#x\n", hr);
+ ok(hr == S_OK, "GetPortCaps failed: %#lx\n", hr);
if (control_synth)
IDirectMusicSynth_Release(control_synth);
@@ -184,38 +184,38 @@ static void test_COM(void)
hr = CoCreateInstance(&CLSID_DirectMusicSynth, (IUnknown *)0xdeadbeef, CLSCTX_INPROC_SERVER,
&IID_IUnknown, (void**)&dms8);
ok(hr == CLASS_E_NOAGGREGATION,
- "DirectMusicSynth create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr);
+ "DirectMusicSynth create failed: %#lx, expected CLASS_E_NOAGGREGATION\n", hr);
ok(!dms8, "dms8 = %p\n", dms8);
/* Invalid RIID */
hr = CoCreateInstance(&CLSID_DirectMusicSynth, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicObject, (void**)&dms8);
- ok(hr == E_NOINTERFACE, "DirectMusicSynth create failed: %08x, expected E_NOINTERFACE\n", hr);
+ ok(hr == E_NOINTERFACE, "DirectMusicSynth create failed: %#lx, expected E_NOINTERFACE\n", hr);
/* Same refcount for all DirectMusicSynth interfaces */
hr = CoCreateInstance(&CLSID_DirectMusicSynth, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicSynth8, (void**)&dms8);
- ok(hr == S_OK, "DirectMusicSynth create failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "DirectMusicSynth create failed: %#lx, expected S_OK\n", hr);
refcount = IDirectMusicSynth8_AddRef(dms8);
- ok(refcount == 2, "refcount == %u, expected 2\n", refcount);
+ ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectMusicSynth8_QueryInterface(dms8, &IID_IKsControl, (void**)&iksc);
- ok(hr == S_OK, "QueryInterface for IID_IKsControl failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IKsControl failed: %#lx\n", hr);
refcount = IKsControl_AddRef(iksc);
- ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
+ ok(refcount == 4, "refcount == %lu, expected 4\n", refcount);
IKsControl_Release(iksc);
hr = IDirectMusicSynth8_QueryInterface(dms8, &IID_IUnknown, (void**)&unk);
- ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %#lx\n", hr);
refcount = IUnknown_AddRef(unk);
- ok(refcount == 5, "refcount == %u, expected 5\n", refcount);
+ ok(refcount == 5, "refcount == %lu, expected 5\n", refcount);
IUnknown_Release(unk);
/* Unsupported interfaces */
hr = IDirectMusicSynth8_QueryInterface(dms8, &IID_IDirectMusicSynthSink, (void**)&unk);
- ok(hr == E_NOINTERFACE, "QueryInterface for IID_IDirectMusicSynthSink failed: %08x\n", hr);
+ ok(hr == E_NOINTERFACE, "QueryInterface for IID_IDirectMusicSynthSink failed: %#lx\n", hr);
hr = IDirectMusicSynth8_QueryInterface(dms8, &IID_IReferenceClock, (void**)&unk);
- ok(hr == E_NOINTERFACE, "QueryInterface for IID_IReferenceClock failed: %08x\n", hr);
+ ok(hr == E_NOINTERFACE, "QueryInterface for IID_IReferenceClock failed: %#lx\n", hr);
while (IDirectMusicSynth8_Release(dms8));
}
@@ -232,36 +232,36 @@ static void test_COM_synthsink(void)
hr = CoCreateInstance(&CLSID_DirectMusicSynthSink, (IUnknown *)0xdeadbeef, CLSCTX_INPROC_SERVER,
&IID_IUnknown, (void**)&dmss);
ok(hr == CLASS_E_NOAGGREGATION,
- "DirectMusicSynthSink create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr);
+ "DirectMusicSynthSink create failed: %#lx, expected CLASS_E_NOAGGREGATION\n", hr);
ok(!dmss, "dmss = %p\n", dmss);
/* Invalid RIID */
hr = CoCreateInstance(&CLSID_DirectMusicSynthSink, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicObject, (void**)&dmss);
- ok(hr == E_NOINTERFACE, "DirectMusicSynthSink create failed: %08x, expected E_NOINTERFACE\n", hr);
+ ok(hr == E_NOINTERFACE, "DirectMusicSynthSink create failed: %#lx, expected E_NOINTERFACE\n", hr);
/* Same refcount for all DirectMusicSynthSink interfaces */
hr = CoCreateInstance(&CLSID_DirectMusicSynthSink, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicSynthSink, (void**)&dmss);
- ok(hr == S_OK, "DirectMusicSynthSink create failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "DirectMusicSynthSink create failed: %#lx, expected S_OK\n", hr);
refcount = IDirectMusicSynthSink_AddRef(dmss);
- ok(refcount == 2, "refcount == %u, expected 2\n", refcount);
+ ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectMusicSynthSink_QueryInterface(dmss, &IID_IKsControl, (void**)&iksc);
- ok(hr == S_OK, "QueryInterface for IID_IKsControl failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IKsControl failed: %#lx\n", hr);
refcount = IKsControl_AddRef(iksc);
- ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
+ ok(refcount == 4, "refcount == %lu, expected 4\n", refcount);
IKsControl_Release(iksc);
hr = IDirectMusicSynthSink_QueryInterface(dmss, &IID_IUnknown, (void**)&unk);
- ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %#lx\n", hr);
refcount = IUnknown_AddRef(unk);
- ok(refcount == 5, "refcount == %u, expected 5\n", refcount);
+ ok(refcount == 5, "refcount == %lu, expected 5\n", refcount);
IUnknown_Release(unk);
/* Unsupported interfaces */
hr = IDirectMusicSynthSink_QueryInterface(dmss, &IID_IReferenceClock, (void**)&unk);
- ok(hr == E_NOINTERFACE, "QueryInterface for IID_IReferenceClock failed: %08x\n", hr);
+ ok(hr == E_NOINTERFACE, "QueryInterface for IID_IReferenceClock failed: %#lx\n", hr);
while (IDirectMusicSynthSink_Release(dmss));
}
--
2.34.1
1
0