Wine-Devel
Threads by month
- ----- 2026 -----
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- 11 participants
- 84520 discussions
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/msi/tests/action.c | 20 +++++++++----------
dlls/msi/tests/automation.c | 20 +++++++++----------
dlls/msi/tests/db.c | 9 ++++-----
dlls/msi/tests/format.c | 5 ++---
dlls/msi/tests/install.c | 28 +++++++++++++-------------
dlls/msi/tests/msi.c | 29 +++++++++++++--------------
dlls/msi/tests/package.c | 39 +++++++++++++++++--------------------
dlls/msi/tests/patch.c | 8 ++++----
dlls/msi/tests/source.c | 10 +++++-----
9 files changed, 79 insertions(+), 89 deletions(-)
diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c
index 52ac63dc61b..203fd5e47e4 100644
--- a/dlls/msi/tests/action.c
+++ b/dlls/msi/tests/action.c
@@ -2409,10 +2409,10 @@ static char *get_user_sid(void)
OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token);
GetTokenInformation(token, TokenUser, NULL, size, &size);
- user = HeapAlloc(GetProcessHeap(), 0, size);
+ user = malloc(size);
GetTokenInformation(token, TokenUser, user, size, &size);
ConvertSidToStringSidA(user->User.Sid, &usersid);
- HeapFree(GetProcessHeap(), 0, user);
+ free(user);
CloseHandle(token);
return usersid;
@@ -3022,7 +3022,7 @@ error:
DeleteFileA(msifile);
DeleteFileA("msitest\\maximus");
RemoveDirectoryA("msitest");
- HeapFree(GetProcessHeap(), 0, usersid);
+ free(usersid);
}
static void test_publish_product(void)
@@ -3259,7 +3259,7 @@ error:
DeleteFileA(msifile);
DeleteFileA("msitest\\maximus");
RemoveDirectoryA("msitest");
- HeapFree(GetProcessHeap(), 0, usersid);
+ free(usersid);
}
static void test_publish_features(void)
@@ -3384,7 +3384,7 @@ error:
DeleteFileA(msifile);
DeleteFileA("msitest\\maximus");
RemoveDirectoryA("msitest");
- HeapFree(GetProcessHeap(), 0, usersid);
+ free(usersid);
}
static LPSTR reg_get_val_str(HKEY hkey, LPCSTR name)
@@ -3398,7 +3398,7 @@ static LPSTR reg_get_val_str(HKEY hkey, LPCSTR name)
return NULL;
len += sizeof (WCHAR);
- val = HeapAlloc(GetProcessHeap(), 0, len);
+ val = malloc(len);
if (!val) return NULL;
val[0] = 0;
RegQueryValueExA(hkey, name, NULL, NULL, (LPBYTE)val, &len);
@@ -3538,8 +3538,8 @@ static void test_register_user(void)
delete_key(HKEY_LOCAL_MACHINE, keypath, access);
error:
- HeapFree(GetProcessHeap(), 0, company);
- HeapFree(GetProcessHeap(), 0, owner);
+ free(company);
+ free(owner);
DeleteFileA(msifile);
DeleteFileA("msitest\\maximus");
@@ -5781,7 +5781,7 @@ static void test_publish_components(void)
res = RegQueryValueExA(key, "english.txt", NULL, NULL, NULL, &size);
ok(res == ERROR_SUCCESS, "value not found %d\n", res);
- data = HeapAlloc(GetProcessHeap(), 0, size);
+ data = malloc(size);
res = RegQueryValueExA(key, "english.txt", NULL, NULL, data, &size);
ok(res == ERROR_SUCCESS, "value not found %d\n", res);
RegCloseKey(key);
@@ -5812,7 +5812,7 @@ static void test_publish_components(void)
res = RegSetValueExA(key, "english.txt", 0, REG_MULTI_SZ, data, size);
ok(res == ERROR_SUCCESS, "RegSetValueEx failed %d\n", res);
- HeapFree(GetProcessHeap(), 0, data);
+ free(data);
RegCloseKey(key);
r = MsiInstallProductA(msifile, "REMOVE=ALL");
diff --git a/dlls/msi/tests/automation.c b/dlls/msi/tests/automation.c
index 42c41dcd731..5d0126e6ac4 100644
--- a/dlls/msi/tests/automation.c
+++ b/dlls/msi/tests/automation.c
@@ -306,7 +306,7 @@ static void create_database(const CHAR *name, const msi_table *tables, int num_t
int j, len;
len = MultiByteToWideChar( CP_ACP, 0, name, -1, NULL, 0 );
- if (!(nameW = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) return;
+ if (!(nameW = malloc( len * sizeof(WCHAR) ))) return;
MultiByteToWideChar( CP_ACP, 0, name, -1, nameW, len );
r = MsiOpenDatabaseW(nameW, MSIDBOPEN_CREATE, &db);
@@ -331,7 +331,7 @@ static void create_database(const CHAR *name, const msi_table *tables, int num_t
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
MsiCloseHandle(db);
- HeapFree( GetProcessHeap(), 0, nameW );
+ free( nameW );
}
static BOOL create_package(LPWSTR path)
@@ -502,12 +502,12 @@ static DISPID get_dispid( IDispatch *disp, const char *name )
HRESULT r;
len = MultiByteToWideChar(CP_ACP, 0, name, -1, NULL, 0 );
- str = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR) );
+ str = malloc( len * sizeof(WCHAR) );
if (str)
{
MultiByteToWideChar(CP_ACP, 0, name, -1, str, len );
r = IDispatch_GetIDsOfNames( disp, &IID_NULL, &str, 1, 0, &id );
- HeapFree(GetProcessHeap(), 0, str);
+ free( str );
if (r != S_OK)
return -1;
}
@@ -845,11 +845,11 @@ static HRESULT invoke(IDispatch *pDispatch, LPCSTR szName, WORD wFlags, DISPPARA
VariantInit(pVarResult);
len = MultiByteToWideChar(CP_ACP, 0, szName, -1, NULL, 0 );
- name = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR) );
+ name = malloc(len * sizeof(WCHAR));
if (!name) return E_FAIL;
MultiByteToWideChar(CP_ACP, 0, szName, -1, name, len );
hr = IDispatch_GetIDsOfNames(pDispatch, &IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &dispid);
- HeapFree(GetProcessHeap(), 0, name);
+ free(name);
ok(hr == S_OK, "IDispatch::GetIDsOfNames returned 0x%08x\n", hr);
if (hr != S_OK) return hr;
@@ -2329,13 +2329,13 @@ static UINT delete_registry_key(HKEY hkeyParent, LPCSTR subkey, REGSAM access)
if (ret != ERROR_SUCCESS) return ret;
ret = RegQueryInfoKeyA(hkey, NULL, NULL, NULL, NULL, &dwSize, NULL, NULL, NULL, NULL, NULL, NULL);
if (ret != ERROR_SUCCESS) return ret;
- if (!(string = HeapAlloc(GetProcessHeap(), 0, ++dwSize))) return ERROR_NOT_ENOUGH_MEMORY;
+ if (!(string = malloc(++dwSize))) return ERROR_NOT_ENOUGH_MEMORY;
while (RegEnumKeyA(hkey, 0, string, dwSize) == ERROR_SUCCESS)
delete_registry_key(hkey, string, access);
RegCloseKey(hkey);
- HeapFree(GetProcessHeap(), 0, string);
+ free(string);
delete_key_portable(hkeyParent, subkey, access);
return ERROR_SUCCESS;
}
@@ -2356,7 +2356,7 @@ static UINT find_registry_key(HKEY hkeyParent, LPCSTR subkey, LPCSTR findkey, RE
if (ret != ERROR_SUCCESS) return ret;
ret = RegQueryInfoKeyA(hkey, NULL, NULL, NULL, NULL, &dwSize, NULL, NULL, NULL, NULL, NULL, NULL);
if (ret != ERROR_SUCCESS) return ret;
- if (!(string = HeapAlloc(GetProcessHeap(), 0, ++dwSize))) return ERROR_NOT_ENOUGH_MEMORY;
+ if (!(string = malloc(++dwSize))) return ERROR_NOT_ENOUGH_MEMORY;
while (!found &&
RegEnumKeyA(hkey, idx++, string, dwSize) == ERROR_SUCCESS)
@@ -2370,7 +2370,7 @@ static UINT find_registry_key(HKEY hkeyParent, LPCSTR subkey, LPCSTR findkey, RE
}
if (*phkey != hkey) RegCloseKey(hkey);
- HeapFree(GetProcessHeap(), 0, string);
+ free(string);
return (found ? ERROR_SUCCESS : ERROR_FILE_NOT_FOUND);
}
diff --git a/dlls/msi/tests/db.c b/dlls/msi/tests/db.c
index b75e5f7a4b5..b2a60f5b304 100644
--- a/dlls/msi/tests/db.c
+++ b/dlls/msi/tests/db.c
@@ -323,10 +323,10 @@ static inline UINT add_entry(const char *file, int line, const char *type, MSIHA
UINT sz, r;
sz = strlen(values) + strlen(insert) + 1;
- query = HeapAlloc(GetProcessHeap(), 0, sz);
+ query = malloc(sz);
sprintf(query, insert, values);
r = run_query(hdb, 0, query);
- HeapFree(GetProcessHeap(), 0, query);
+ free(query);
ok_(file, line)(r == ERROR_SUCCESS, "failed to insert into %s table: %u\n", type, r);
return r;
}
@@ -1465,15 +1465,14 @@ static void test_longstrings(void)
ok(r == ERROR_SUCCESS, "query failed\n");
/* try to insert a very long string */
- str = HeapAlloc(GetProcessHeap(), 0, STRING_LENGTH+sizeof insert_query);
+ str = malloc(STRING_LENGTH + sizeof insert_query);
len = strchr(insert_query, 'Z') - insert_query;
strcpy(str, insert_query);
memset(str+len, 'Z', STRING_LENGTH);
strcpy(str+len+STRING_LENGTH, insert_query+len+1);
r = try_query( hdb, str );
ok(r == ERROR_SUCCESS, "MsiDatabaseOpenView failed\n");
-
- HeapFree(GetProcessHeap(), 0, str);
+ free(str);
r = MsiDatabaseCommit(hdb);
ok(r == ERROR_SUCCESS, "MsiDatabaseCommit failed\n");
diff --git a/dlls/msi/tests/format.c b/dlls/msi/tests/format.c
index 88d8180a50c..06f901fb84c 100644
--- a/dlls/msi/tests/format.c
+++ b/dlls/msi/tests/format.c
@@ -61,13 +61,12 @@ static UINT helper_createpackage( const char *szName, MSIHANDLE *handle )
DeleteFileA(szName);
len = MultiByteToWideChar( CP_ACP, 0, szName, -1, NULL, 0 );
- if (!(nameW = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) )))
- return ERROR_OUTOFMEMORY;
+ if (!(nameW = malloc( len * sizeof(WCHAR) ))) return ERROR_OUTOFMEMORY;
MultiByteToWideChar( CP_ACP, 0, szName, -1, nameW, len );
/* create an empty database */
res = MsiOpenDatabaseW( nameW, MSIDBOPEN_CREATEDIRECT, &hdb );
- HeapFree( GetProcessHeap(), 0, nameW );
+ free( nameW );
ok( res == ERROR_SUCCESS , "Failed to create database %u\n", res );
if (res != ERROR_SUCCESS)
return res;
diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c
index ce650b84d61..ae5b03e248c 100644
--- a/dlls/msi/tests/install.c
+++ b/dlls/msi/tests/install.c
@@ -2125,12 +2125,12 @@ static const msi_table sr_tables[] =
static void * CDECL mem_alloc(ULONG cb)
{
- return HeapAlloc(GetProcessHeap(), 0, cb);
+ return malloc(cb);
}
static void CDECL mem_free(void *memory)
{
- HeapFree(GetProcessHeap(), 0, memory);
+ free(memory);
}
static BOOL CDECL get_next_cabinet(PCCAB pccab, ULONG cbPrevCab, void *pv)
@@ -2302,18 +2302,17 @@ static BOOL CDECL get_temp_file(char *pszTempName, int cbTempName, void *pv)
{
LPSTR tempname;
- tempname = HeapAlloc(GetProcessHeap(), 0, MAX_PATH);
+ tempname = malloc(MAX_PATH);
GetTempFileNameA(".", "xx", 0, tempname);
if (tempname && (strlen(tempname) < (unsigned)cbTempName))
{
lstrcpyA(pszTempName, tempname);
- HeapFree(GetProcessHeap(), 0, tempname);
+ free(tempname);
return TRUE;
}
- HeapFree(GetProcessHeap(), 0, tempname);
-
+ free(tempname);
return FALSE;
}
@@ -2551,12 +2550,11 @@ static BOOL compare_pf_data(const char *filename, const char *data, DWORD size)
lstrcatA(path, filename);
handle = CreateFileA(path, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
- buffer = HeapAlloc(GetProcessHeap(), 0, size);
- if (buffer)
+ if ((buffer = malloc(size)))
{
ReadFile(handle, buffer, size, &read, NULL);
if (read == size && !memcmp(data, buffer, size)) ret = TRUE;
- HeapFree(GetProcessHeap(), 0, buffer);
+ free(buffer);
}
CloseHandle(handle);
return ret;
@@ -2707,7 +2705,7 @@ void create_database_wordcount(const CHAR *name, const msi_table *tables, int nu
int j, len;
len = MultiByteToWideChar( CP_ACP, 0, name, -1, NULL, 0 );
- if (!(nameW = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) return;
+ if (!(nameW = malloc( len * sizeof(WCHAR) ))) return;
MultiByteToWideChar( CP_ACP, 0, name, -1, nameW, len );
r = MsiOpenDatabaseW(nameW, MSIDBOPEN_CREATE, &db);
@@ -2733,7 +2731,7 @@ void create_database_wordcount(const CHAR *name, const msi_table *tables, int nu
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
MsiCloseHandle(db);
- HeapFree( GetProcessHeap(), 0, nameW );
+ free( nameW );
}
static BOOL notify_system_change(DWORD event_type, STATEMGRSTATUS *status)
@@ -5266,8 +5264,8 @@ static void process_pending_renames(HKEY hkey)
ret = RegQueryValueExA(hkey, rename_ops, NULL, NULL, NULL, &size);
ok(!ret, "RegQueryValueExA failed %d\n", ret);
- buf = HeapAlloc(GetProcessHeap(), 0, size + 1);
- buf2ptr = buf2 = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size + 1);
+ buf = malloc(size + 1);
+ buf2ptr = buf2 = calloc(1, size + 1);
ret = RegQueryValueExA(hkey, rename_ops, NULL, NULL, (LPBYTE)buf, &size);
buf[size] = 0;
@@ -5318,8 +5316,8 @@ static void process_pending_renames(HKEY hkey)
else
RegDeleteValueA(hkey, rename_ops);
- HeapFree(GetProcessHeap(), 0, buf);
- HeapFree(GetProcessHeap(), 0, buf2);
+ free(buf);
+ free(buf2);
}
static BOOL file_matches_data(LPCSTR file, LPCSTR data)
diff --git a/dlls/msi/tests/msi.c b/dlls/msi/tests/msi.c
index 5e0fa680c89..7bfddee4e4e 100644
--- a/dlls/msi/tests/msi.c
+++ b/dlls/msi/tests/msi.c
@@ -966,9 +966,7 @@ static void test_null(void)
ok ( r == ERROR_SUCCESS || r == ERROR_FILE_NOT_FOUND, "wrong error %d\n", r);
if ( r == ERROR_SUCCESS )
{
- lpData = HeapAlloc(GetProcessHeap(), 0, cbData);
- if (!lpData)
- skip("Out of memory\n");
+ if (!(lpData = malloc(cbData))) skip("Out of memory\n");
else
{
r = RegQueryValueExA(hkey, NULL, 0, &dwType, lpData, &cbData);
@@ -980,7 +978,7 @@ static void test_null(void)
if (r == ERROR_ACCESS_DENIED)
{
skip("Not enough rights to perform tests\n");
- HeapFree(GetProcessHeap(), 0, lpData);
+ free(lpData);
RegCloseKey(hkey);
return;
}
@@ -993,8 +991,7 @@ static void test_null(void)
{
r = RegSetValueExA(hkey, NULL, 0, dwType, lpData, cbData);
ok ( r == ERROR_SUCCESS, "wrong error %d\n", r);
-
- HeapFree(GetProcessHeap(), 0, lpData);
+ free(lpData);
}
else
{
@@ -1257,10 +1254,10 @@ static char *get_user_sid(void)
OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token);
GetTokenInformation(token, TokenUser, NULL, size, &size);
- user = HeapAlloc(GetProcessHeap(), 0, size);
+ user = malloc(size);
GetTokenInformation(token, TokenUser, user, size, &size);
ConvertSidToStringSidA(user->User.Sid, &usersid);
- HeapFree(GetProcessHeap(), 0, user);
+ free(user);
CloseHandle(token);
return usersid;
@@ -4087,22 +4084,22 @@ static void get_version_info(LPSTR path, LPSTR *vercheck, LPDWORD verchecksz,
DWORD size = GetFileVersionInfoSizeA(path, NULL);
USHORT *lang;
- version = HeapAlloc(GetProcessHeap(), 0, size);
+ version = malloc(size);
GetFileVersionInfoA(path, 0, size, version);
VerQueryValueA(version, "\\", (LPVOID *)&ffi, &size);
- *vercheck = HeapAlloc(GetProcessHeap(), 0, MAX_PATH);
+ *vercheck = malloc(MAX_PATH);
sprintf(*vercheck, "%d.%d.%d.%d", HIWORD(ffi->dwFileVersionMS),
LOWORD(ffi->dwFileVersionMS), HIWORD(ffi->dwFileVersionLS),
LOWORD(ffi->dwFileVersionLS));
*verchecksz = lstrlenA(*vercheck);
VerQueryValueA(version, "\\VarFileInfo\\Translation", (void **)&lang, &size);
- *langcheck = HeapAlloc(GetProcessHeap(), 0, MAX_PATH);
+ *langcheck = malloc(MAX_PATH);
sprintf(*langcheck, "%d", *lang);
*langchecksz = lstrlenA(*langcheck);
- HeapFree(GetProcessHeap(), 0, version);
+ free(version);
}
static void test_MsiGetFileVersion(void)
@@ -4286,8 +4283,8 @@ static void test_MsiGetFileVersion(void)
if (langchecksz && !langsz)
{
win_skip("broken MsiGetFileVersionA detected\n");
- HeapFree(GetProcessHeap(), 0, vercheck);
- HeapFree(GetProcessHeap(), 0, langcheck);
+ free(vercheck);
+ free(langcheck);
return;
}
ok(versz == verchecksz, "Expected %d, got %d\n", verchecksz, versz);
@@ -4372,8 +4369,8 @@ static void test_MsiGetFileVersion(void)
r = MsiGetFileVersionA(path, NULL, NULL, NULL, NULL);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- HeapFree(GetProcessHeap(), 0, vercheck);
- HeapFree(GetProcessHeap(), 0, langcheck);
+ free(vercheck);
+ free(langcheck);
}
static void test_MsiGetProductInfo(void)
diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c
index 3b98d9ef111..556bc016997 100644
--- a/dlls/msi/tests/package.c
+++ b/dlls/msi/tests/package.c
@@ -133,10 +133,10 @@ static char *get_user_sid(void)
OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token);
GetTokenInformation(token, TokenUser, NULL, size, &size);
- user = HeapAlloc(GetProcessHeap(), 0, size);
+ user = malloc(size);
GetTokenInformation(token, TokenUser, user, size, &size);
ConvertSidToStringSidA(user->User.Sid, &usersid);
- HeapFree(GetProcessHeap(), 0, user);
+ free(user);
CloseHandle(token);
return usersid;
@@ -167,7 +167,7 @@ static LSTATUS package_RegDeleteTreeW(HKEY hKey, LPCWSTR lpszSubKey, REGSAM acce
if (dwMaxLen > ARRAY_SIZE(szNameBuf))
{
/* Name too big: alloc a buffer for it */
- if (!(lpszName = HeapAlloc( GetProcessHeap(), 0, dwMaxLen*sizeof(WCHAR))))
+ if (!(lpszName = malloc(dwMaxLen * sizeof(WCHAR))))
{
ret = ERROR_NOT_ENOUGH_MEMORY;
goto cleanup;
@@ -204,10 +204,8 @@ static LSTATUS package_RegDeleteTreeW(HKEY hKey, LPCWSTR lpszSubKey, REGSAM acce
}
cleanup:
- if (lpszName != szNameBuf)
- HeapFree(GetProcessHeap(), 0, lpszName);
- if(lpszSubKey)
- RegCloseKey(hSubKey);
+ if (lpszName != szNameBuf) free(lpszName);
+ if (lpszSubKey) RegCloseKey(hSubKey);
return ret;
}
@@ -750,10 +748,10 @@ static inline UINT add_entry(const char *file, int line, const char *type, MSIHA
UINT sz, r;
sz = strlen(values) + strlen(insert) + 1;
- query = HeapAlloc(GetProcessHeap(), 0, sz);
+ query = malloc(sz);
sprintf(query, insert, values);
r = run_query(hdb, query);
- HeapFree(GetProcessHeap(), 0, query);
+ free(query);
ok_(file, line)(r == ERROR_SUCCESS, "failed to insert into %s table: %u\n", type, r);
return r;
}
@@ -867,10 +865,10 @@ static UINT add_reglocator_entry( MSIHANDLE hdb, const char *sig, UINT root, con
UINT sz, r;
sz = strlen( sig ) + 10 + strlen( path ) + strlen( name ) + 10 + sizeof( insert );
- query = HeapAlloc( GetProcessHeap(), 0, sz );
+ query = malloc( sz );
sprintf( query, insert, sig, root, path, name, type );
r = run_query( hdb, query );
- HeapFree( GetProcessHeap(), 0, query );
+ free( query );
ok(r == ERROR_SUCCESS, "failed to insert into reglocator table: %u\n", r); \
return r;
}
@@ -1028,7 +1026,7 @@ static BOOL create_file_with_version(const CHAR *name, LONG ms, LONG ls)
CopyFileA(path, name, FALSE);
size = GetFileVersionInfoSizeA(path, &handle);
- buffer = HeapAlloc(GetProcessHeap(), 0, size);
+ buffer = malloc(size);
GetFileVersionInfoA(path, 0, size, buffer);
@@ -1055,7 +1053,7 @@ static BOOL create_file_with_version(const CHAR *name, LONG ms, LONG ls)
ret = TRUE;
done:
- HeapFree(GetProcessHeap(), 0, buffer);
+ free(buffer);
return ret;
}
@@ -4722,21 +4720,21 @@ static void test_appsearch_reglocator(void)
if (S(U(si)).wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL)
{
size = ExpandEnvironmentStringsA("%PATH%", NULL, 0);
- pathvar = HeapAlloc(GetProcessHeap(), 0, size);
+ pathvar = malloc(size);
ExpandEnvironmentStringsA("%PATH%", pathvar, size);
size = 0;
r = MsiGetPropertyA(hpkg, "SIGPROP4", NULL, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- pathdata = HeapAlloc(GetProcessHeap(), 0, ++size);
+ pathdata = malloc(++size);
r = MsiGetPropertyA(hpkg, "SIGPROP4", pathdata, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!lstrcmpA(pathdata, pathvar),
"Expected \"%s\", got \"%s\"\n", pathvar, pathdata);
- HeapFree(GetProcessHeap(), 0, pathvar);
- HeapFree(GetProcessHeap(), 0, pathdata);
+ free(pathvar);
+ free(pathdata);
}
size = MAX_PATH;
@@ -8802,22 +8800,21 @@ static void add_message(const struct externalui_message *msg)
if (!sequence)
{
sequence_size = 10;
- sequence = HeapAlloc(GetProcessHeap(), 0, sequence_size * sizeof(*sequence));
+ sequence = malloc(sequence_size * sizeof(*sequence));
}
if (sequence_count == sequence_size)
{
sequence_size *= 2;
- sequence = HeapReAlloc(GetProcessHeap(), 0, sequence, sequence_size * sizeof(*sequence));
+ sequence = realloc(sequence, sequence_size * sizeof(*sequence));
}
assert(sequence);
-
sequence[sequence_count++] = *msg;
}
static void flush_sequence(void)
{
- HeapFree(GetProcessHeap(), 0, sequence);
+ free(sequence);
sequence = NULL;
sequence_count = sequence_size = 0;
}
diff --git a/dlls/msi/tests/patch.c b/dlls/msi/tests/patch.c
index 65b3a5f1d48..8e8bd356e71 100644
--- a/dlls/msi/tests/patch.c
+++ b/dlls/msi/tests/patch.c
@@ -321,7 +321,7 @@ static void create_database( const char *filename, const struct msi_table *table
int len;
len = MultiByteToWideChar( CP_ACP, 0, filename, -1, NULL, 0 );
- if (!(filenameW = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) return;
+ if (!(filenameW = malloc( len * sizeof(WCHAR) ))) return;
MultiByteToWideChar( CP_ACP, 0, filename, -1, filenameW, len );
r = MsiOpenDatabaseW( filenameW, MSIDBOPEN_CREATE, &hdb );
@@ -345,7 +345,7 @@ static void create_database( const char *filename, const struct msi_table *table
MsiCloseHandle( hdb );
set_suminfo( filenameW );
- HeapFree( GetProcessHeap(), 0, filenameW );
+ free( filenameW );
}
/* data for generating a patch */
@@ -704,11 +704,11 @@ static void create_patch( const char *filename )
const CLSID CLSID_MsiTransform = {0xc1082, 0, 0, {0xc0, 0, 0, 0, 0, 0, 0, 0x46}};
len = MultiByteToWideChar( CP_ACP, 0, filename, -1, NULL, 0 );
- filenameW = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
+ filenameW = malloc( len * sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, filename, -1, filenameW, len );
r = StgCreateDocfile( filenameW, mode, 0, &stg );
- HeapFree( GetProcessHeap(), 0, filenameW );
+ free( filenameW );
ok( r == S_OK, "failed to create storage 0x%08x\n", r );
if (!stg)
return;
diff --git a/dlls/msi/tests/source.c b/dlls/msi/tests/source.c
index 32b5621e3bf..d141307e0ba 100644
--- a/dlls/msi/tests/source.c
+++ b/dlls/msi/tests/source.c
@@ -144,10 +144,10 @@ static char *get_user_sid(void)
OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token);
GetTokenInformation(token, TokenUser, NULL, size, &size);
- user = HeapAlloc(GetProcessHeap(), 0, size);
+ user = malloc(size);
GetTokenInformation(token, TokenUser, user, size, &size);
ConvertSidToStringSidA(user->User.Sid, &usersid);
- HeapFree(GetProcessHeap(), 0, user);
+ free(user);
CloseHandle(token);
return usersid;
@@ -188,7 +188,7 @@ static inline WCHAR *strdupAW( const char *str )
int len;
WCHAR *ret;
len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0 );
- if (!(ret = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) return NULL;
+ if (!(ret = malloc( len * sizeof(WCHAR) ))) return NULL;
MultiByteToWideChar( CP_ACP, 0, str, -1, ret, len );
return ret;
}
@@ -448,8 +448,8 @@ static void test_MsiSourceListGetInfo(void)
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(!valueW[0], "Expected \"\"");
ok(size == 0, "Expected 0, got %d\n", size);
- HeapFree(GetProcessHeap(), 0, usersidW);
- HeapFree(GetProcessHeap(), 0, prodcodeW);
+ free(usersidW);
+ free(prodcodeW);
data = "";
res = RegSetValueExA(hkey, "LastUsedSource", 0, REG_SZ,
--
2.30.2
2
1
Signed-off-by: Esme Povirk <esme(a)codeweavers.com>
---
dlls/mscoree/corruntimehost.c | 6 +++---
dlls/mscoree/mscoree_private.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/mscoree/corruntimehost.c b/dlls/mscoree/corruntimehost.c
index afb5a104ca7..923680a931e 100644
--- a/dlls/mscoree/corruntimehost.c
+++ b/dlls/mscoree/corruntimehost.c
@@ -1716,7 +1716,7 @@ end:
#define CHARS_IN_GUID 39
-HRESULT create_monodata(REFIID riid, LPVOID *ppObj )
+HRESULT create_monodata(REFCLSID clsid, LPVOID *ppObj)
{
static const WCHAR wszFileSlash[] = L"file:///";
static const WCHAR wszCLSIDSlash[] = L"CLSID\\";
@@ -1739,7 +1739,7 @@ HRESULT create_monodata(REFIID riid, LPVOID *ppObj )
DWORD dwBufLen = 350;
lstrcpyW(path, wszCLSIDSlash);
- StringFromGUID2(riid, path + lstrlenW(wszCLSIDSlash), CHARS_IN_GUID);
+ StringFromGUID2(clsid, path + lstrlenW(wszCLSIDSlash), CHARS_IN_GUID);
lstrcatW(path, wszInprocServer32);
TRACE("Registry key: %s\n", debugstr_w(path));
@@ -1832,7 +1832,7 @@ HRESULT create_monodata(REFIID riid, LPVOID *ppObj )
}
else
{
- if (!try_create_registration_free_com(riid, classname, ARRAY_SIZE(classname), filename, ARRAY_SIZE(filename)))
+ if (!try_create_registration_free_com(clsid, classname, ARRAY_SIZE(classname), filename, ARRAY_SIZE(filename)))
return CLASS_E_CLASSNOTAVAILABLE;
TRACE("classname (%s)\n", debugstr_w(classname));
diff --git a/dlls/mscoree/mscoree_private.h b/dlls/mscoree/mscoree_private.h
index 2e72ea5370b..67b37482c5a 100644
--- a/dlls/mscoree/mscoree_private.h
+++ b/dlls/mscoree/mscoree_private.h
@@ -212,7 +212,7 @@ HRESULT WINAPI CLRMetaHost_GetRuntime(ICLRMetaHost* iface, LPCWSTR pwzVersion, R
extern HRESULT CorDebug_Create(ICLRRuntimeHost *runtimehost, IUnknown** ppUnk) DECLSPEC_HIDDEN;
-extern HRESULT create_monodata(REFIID riid, LPVOID *ppObj) DECLSPEC_HIDDEN;
+extern HRESULT create_monodata(REFCLSID clsid, LPVOID *ppObj) DECLSPEC_HIDDEN;
extern HRESULT get_file_from_strongname(WCHAR* stringnameW, WCHAR* assemblies_path, int path_length) DECLSPEC_HIDDEN;
--
2.30.2
1
4
[PATCH] ntdll: Use .seh handler instead of __TRY in RtlUserThreadStart() on x64.
by Paul Gofman Feb. 1, 2022
by Paul Gofman Feb. 1, 2022
Feb. 1, 2022
Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com>
---
Mortal Kombat 11 manually switches stacks and that interferes badly with the TIB handlers workaround.
The condition for calling TIB handler gets satisified when it should not. It is possible to workaround
that particular place by checking that the frame pointer is inside the stack but things get more convoluted
when we are to pop frames while the game may switch back to original stack. The RtlUserThreadStart() stack
handler is the only one it hits.
While there are much more places which use __TRY / __CATCH blocks most of those don't call app functions
and thus are much less likely to place a long living handler which will get invalid if the app switches the
stack. RtlUserThreadStart()'s handler is always there for any thread so maybe avoiding the TIB handlers
workaround for this function only will cover the majority of such cases.
dlls/ntdll/thread.c | 36 +++++++++++++++++++++++++++++++++++-
include/wine/asm.h | 1 +
2 files changed, 36 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 37dc7c8ab37..c42221c1ae0 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -231,7 +231,41 @@ void DECLSPEC_HIDDEN call_thread_func( PRTL_THREAD_START_ROUTINE entry, void *ar
__ENDTRY
}
-#else /* __i386__ */
+#elif /* __i386__ */ defined(__x86_64__) && defined(__ASM_SEH_SUPPORTED)
+EXCEPTION_DISPOSITION WINAPI call_thread_func_handler( EXCEPTION_RECORD *rec, ULONG64 frame,
+ CONTEXT *context, DISPATCHER_CONTEXT *dispatch )
+{
+ EXCEPTION_POINTERS ep = { rec, context };
+
+ WARN( "Unhandled exception, calling filter.\n" );
+
+ switch (call_unhandled_exception_filter( &ep ))
+ {
+ case EXCEPTION_CONTINUE_SEARCH:
+ return ExceptionContinueSearch;
+ case EXCEPTION_CONTINUE_EXECUTION:
+ return ExceptionContinueExecution;
+ case EXCEPTION_EXECUTE_HANDLER:
+ break;
+ }
+ NtTerminateProcess( GetCurrentProcess(), rec->ExceptionCode );
+ return ExceptionContinueExecution;
+}
+
+extern void WINAPI RtlUserThreadStart( PRTL_THREAD_START_ROUTINE entry, void *arg );
+__ASM_GLOBAL_FUNC( RtlUserThreadStart,
+ "subq $0x28, %rsp\n\t"
+ __ASM_SEH(".seh_stackalloc 0x28\n\t")
+ __ASM_SEH(".seh_endprologue\n\t")
+ "movq %rdx,%r8\n\t"
+ "movq %rcx,%rdx\n\t"
+ "xorq %rcx,%rcx\n\t"
+ "movq pBaseThreadInitThunk(%rip),%r9\n\t"
+ "call *%r9\n\t"
+ "int3\n\t"
+ __ASM_SEH(".seh_handler call_thread_func_handler, @except\n\t") )
+
+#else /* defined(__x86_64__) && defined(__ASM_SEH_SUPPORTED) */
void WINAPI RtlUserThreadStart( PRTL_THREAD_START_ROUTINE entry, void *arg )
{
diff --git a/include/wine/asm.h b/include/wine/asm.h
index 0547ee94b19..9200491afd0 100644
--- a/include/wine/asm.h
+++ b/include/wine/asm.h
@@ -50,6 +50,7 @@
# define __ASM_SEH(str)
# else
# define __ASM_SEH(str) str
+# define __ASM_SEH_SUPPORTED
# endif
#else
# define __ASM_SEH(str)
--
2.34.1
1
0
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/t2embed/Makefile.in | 1 -
dlls/t2embed/main.c | 8 ++++----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/dlls/t2embed/Makefile.in b/dlls/t2embed/Makefile.in
index d9fc7e97bf6..afda2511913 100644
--- a/dlls/t2embed/Makefile.in
+++ b/dlls/t2embed/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = t2embed.dll
IMPORTLIB = t2embed
IMPORTS = gdi32 advapi32
diff --git a/dlls/t2embed/main.c b/dlls/t2embed/main.c
index f79d4d69eb5..c4ceec13e7a 100644
--- a/dlls/t2embed/main.c
+++ b/dlls/t2embed/main.c
@@ -34,7 +34,7 @@ LONG WINAPI TTLoadEmbeddedFont(HANDLE *phFontReference, ULONG ulFlags,
LPVOID lpvReadStream, LPWSTR szWinFamilyName,
LPSTR szMacFamilyName, TTLOADINFO *pTTLoadInfo)
{
- FIXME("(%p 0x%08x %p 0x%08x %p %p %p %s %s %p) stub\n", phFontReference,
+ FIXME("%p, %#lx, %p, %lu, %p, %p, %p, %s, %s, %p stub\n", phFontReference,
ulFlags, pulPrivStatus, ulPrivs, pulStatus, lpfnReadFromStream,
lpvReadStream, debugstr_w(szWinFamilyName), szMacFamilyName,
pTTLoadInfo);
@@ -47,7 +47,7 @@ LONG WINAPI TTEmbedFont(HDC hDC, ULONG ulFlags, ULONG ulCharSet, ULONG *pulPrivS
USHORT *pusCharCodeSet, USHORT usCharCodeCount, USHORT usLanguage,
TTEMBEDINFO *pTTEmbedInfo)
{
- FIXME("(%p 0x%08x 0x%08x %p %p %p %p %p %u %u %p) stub\n", hDC,
+ FIXME("%p, %#lx, %lu, %p, %p, %p, %p, %p, %u, %u, %p stub\n", hDC,
ulFlags, ulCharSet, pulPrivStatus, pulStatus, lpfnWriteToStream,
lpvWriteStream, pusCharCodeSet, usCharCodeCount, usLanguage,
pTTEmbedInfo);
@@ -87,7 +87,7 @@ LONG WINAPI TTGetEmbeddingType(HDC hDC, ULONG *status)
*status = EMBED_INSTALLABLE;
}
- TRACE("fsType 0x%04x, status %u\n", fsType, *status);
+ TRACE("fsType 0x%04x, status %lu\n", fsType, *status);
return E_NONE;
}
@@ -163,6 +163,6 @@ LONG WINAPI TTIsEmbeddingEnabled(HDC hDC, BOOL *enabled)
LONG WINAPI TTDeleteEmbeddedFont(HANDLE hFontReference, ULONG flags, ULONG *status)
{
- FIXME("(%p 0x%08x %p) stub\n", hFontReference, flags, status);
+ FIXME("%p, %#lx, %p stub\n", hFontReference, flags, status);
return E_API_NOTIMPL;
}
--
2.34.1
1
0
[PATCH v2 1/2] server: Use normal key path handling also for the '\Registry' prefix.
by Dmitry Timoshkov Feb. 1, 2022
by Dmitry Timoshkov Feb. 1, 2022
Feb. 1, 2022
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/ntdll/tests/reg.c | 3 ---
server/registry.c | 50 ++++++++++++------------------------------
2 files changed, 14 insertions(+), 39 deletions(-)
diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c
index 91b752ac069..445c05a02e1 100644
--- a/dlls/ntdll/tests/reg.c
+++ b/dlls/ntdll/tests/reg.c
@@ -386,7 +386,6 @@ todo_wine
key = (HANDLE)0xdeadbeef;
status = pNtOpenKey(&key, KEY_READ, &attr);
todo_wine ok(status == STATUS_OBJECT_PATH_SYNTAX_BAD, "NtOpenKey Failed: 0x%08x\n", status);
-todo_wine
ok(!key, "key = %p\n", key);
pRtlFreeUnicodeString( &str );
@@ -417,7 +416,6 @@ todo_wine
pRtlCreateUnicodeStringFromAsciiz( &str, "\\Registry" );
status = pNtOpenKey(&key, KEY_READ, &attr);
- todo_wine
ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08x\n", status );
pNtClose( key );
pRtlFreeUnicodeString( &str );
@@ -569,7 +567,6 @@ static void test_NtCreateKey(void)
pRtlCreateUnicodeStringFromAsciiz( &str, "\\Registry" );
status = pNtCreateKey( &subkey, am, &attr, 0, 0, 0, 0 );
- todo_wine
ok( status == STATUS_SUCCESS || status == STATUS_ACCESS_DENIED,
"NtCreateKey failed: 0x%08x\n", status );
if (!status) pNtClose( subkey );
diff --git a/server/registry.c b/server/registry.c
index 93e8a309593..ebf8795432b 100644
--- a/server/registry.c
+++ b/server/registry.c
@@ -127,7 +127,7 @@ static const timeout_t save_period = 30 * -TICKS_PER_SEC; /* delay between peri
static struct timeout_user *save_timeout_user; /* saving timer */
static enum prefix_type { PREFIX_UNKNOWN, PREFIX_32BIT, PREFIX_64BIT } prefix_type;
-static const WCHAR root_name[] = { '\\','R','e','g','i','s','t','r','y','\\' };
+static const WCHAR root_name[] = { '\\','R','e','g','i','s','t','r','y' };
static const WCHAR wow6432node[] = {'W','o','w','6','4','3','2','N','o','d','e'};
static const WCHAR symlink_value[] = {'S','y','m','b','o','l','i','c','L','i','n','k','V','a','l','u','e'};
static const struct unicode_str symlink_str = { symlink_value, sizeof(symlink_value) };
@@ -403,7 +403,7 @@ static WCHAR *key_get_full_name( struct object *obj, data_size_t *ret_len )
{
static const WCHAR backslash = '\\';
struct key *key = (struct key *) obj;
- data_size_t len = sizeof(root_name) - sizeof(WCHAR);
+ data_size_t len = 0;
char *ret;
if (key->flags & KEY_DELETED)
@@ -423,7 +423,6 @@ static WCHAR *key_get_full_name( struct object *obj, data_size_t *ret_len )
len -= key->namelen + sizeof(WCHAR);
memcpy( ret + len, &backslash, sizeof(WCHAR) );
}
- memcpy( ret, root_name, sizeof(root_name) - sizeof(WCHAR) );
return (WCHAR *)ret;
}
@@ -466,16 +465,10 @@ static void key_destroy( struct object *obj )
}
/* get the request vararg as registry path */
-static inline void get_req_path( struct unicode_str *str, int skip_root )
+static inline void get_req_path( struct unicode_str *str )
{
str->str = get_req_data();
str->len = (get_req_data_size() / sizeof(WCHAR)) * sizeof(WCHAR);
-
- if (skip_root && str->len >= sizeof(root_name) && !memicmp_strW( str->str, root_name, sizeof(root_name) ))
- {
- str->str += ARRAY_SIZE( root_name );
- str->len -= sizeof(root_name);
- }
}
/* return the next token in a given path */
@@ -486,19 +479,22 @@ static struct unicode_str *get_path_token( const struct unicode_str *path, struc
if (!token->str) /* first time */
{
- /* path cannot start with a backslash */
+ /* if path starts with a backslash it must be the Registry root */
if (len && path->str[0] == '\\')
{
- set_error( STATUS_OBJECT_PATH_INVALID );
- return NULL;
+ if (path->len < sizeof(root_name) || memicmp_strW( path->str, root_name, sizeof(root_name) ))
+ {
+ set_error( STATUS_OBJECT_PATH_INVALID );
+ return NULL;
+ }
}
}
else
{
i = token->str - path->str;
i += token->len / sizeof(WCHAR);
- while (i < len && path->str[i] == '\\') i++;
}
+ while (i < len && path->str[i] == '\\') i++;
token->str = path->str + i;
while (i < len && path->str[i] != '\\') i++;
token->len = (path->str + i - token->str) * sizeof(WCHAR);
@@ -722,10 +718,6 @@ static struct key *follow_symlink( struct key *key, int iteration )
path.str = value->data;
path.len = (value->len / sizeof(WCHAR)) * sizeof(WCHAR);
- if (path.len <= sizeof(root_name)) return NULL;
- if (memicmp_strW( path.str, root_name, sizeof(root_name) )) return NULL;
- path.str += ARRAY_SIZE( root_name );
- path.len -= sizeof(root_name);
key = root_key;
token.str = NULL;
@@ -1834,8 +1826,8 @@ static void init_supported_machines(void)
/* registry initialisation */
void init_registry(void)
{
- static const WCHAR HKLM[] = { 'M','a','c','h','i','n','e' };
- static const WCHAR HKU_default[] = { 'U','s','e','r','\\','.','D','e','f','a','u','l','t' };
+ static const WCHAR HKLM[] = { '\\','R','e','g','i','s','t','r','y','\\','M','a','c','h','i','n','e' };
+ static const WCHAR HKU_default[] = { '\\','R','e','g','i','s','t','r','y','\\','U','s','e','r','\\','.','D','e','f','a','u','l','t' };
static const WCHAR classes_i386[] = {'S','o','f','t','w','a','r','e','\\',
'C','l','a','s','s','e','s','\\',
'W','o','w','6','4','3','2','N','o','d','e'};
@@ -2143,13 +2135,6 @@ DECL_HANDLER(create_key)
class.str = get_req_data_after_objattr( objattr, &class.len );
class.len = (class.len / sizeof(WCHAR)) * sizeof(WCHAR);
- if (!objattr->rootdir && name.len >= sizeof(root_name) &&
- !memicmp_strW( name.str, root_name, sizeof(root_name) ))
- {
- name.str += ARRAY_SIZE( root_name );
- name.len -= sizeof(root_name);
- }
-
/* NOTE: no access rights are required from the parent handle to create a key */
if ((parent = get_parent_hkey_obj( objattr->rootdir )))
{
@@ -2176,7 +2161,7 @@ DECL_HANDLER(open_key)
/* NOTE: no access rights are required to open the parent key, only the child key */
if ((parent = get_parent_hkey_obj( req->parent )))
{
- get_req_path( &name, !req->parent );
+ get_req_path( &name );
if ((key = open_key( parent, &name, access, req->attributes )))
{
reply->hkey = alloc_handle( current->process, key, access, req->attributes );
@@ -2301,13 +2286,6 @@ DECL_HANDLER(load_registry)
return;
}
- if (!objattr->rootdir && name.len >= sizeof(root_name) &&
- !memicmp_strW( name.str, root_name, sizeof(root_name) ))
- {
- name.str += ARRAY_SIZE( root_name );
- name.len -= sizeof(root_name);
- }
-
if ((parent = get_parent_hkey_obj( objattr->rootdir )))
{
int dummy;
@@ -2336,7 +2314,7 @@ DECL_HANDLER(unload_registry)
if ((parent = get_parent_hkey_obj( req->parent )))
{
- get_req_path( &name, !req->parent );
+ get_req_path( &name );
if ((key = open_key( parent, &name, access, req->attributes )))
{
if (key->obj.handle_count)
--
2.34.1
1
1
[PATCH v2 2/2] user32: DefWindowProc(WM_NCCALCSIZE) should return 0. (Resend)
by Dmitry Timoshkov Feb. 1, 2022
by Dmitry Timoshkov Feb. 1, 2022
Feb. 1, 2022
v2: Remove remaining todo_wine statements.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=37609
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/user32/defwnd.c | 3 ++-
dlls/user32/tests/win.c | 4 ----
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/dlls/user32/defwnd.c b/dlls/user32/defwnd.c
index 8cd9047f02b..1b28232b551 100644
--- a/dlls/user32/defwnd.c
+++ b/dlls/user32/defwnd.c
@@ -265,7 +265,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/tests/win.c b/dlls/user32/tests/win.c
index b93839e40b5..87a6a837070 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -12372,25 +12372,21 @@ static void test_WM_NCCALCSIZE(void)
params.lppos = &winpos;
ret = SendMessageW(hwnd, WM_NCCALCSIZE, TRUE, (LPARAM)¶ms);
-todo_wine
ok(!ret, "got %08x\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 %08x\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 %08x\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 %08x\n", ret);
ok(EqualRect(&window_rect, &client_rect), "got %s\n", wine_dbgstr_rect(&window_rect));
--
2.34.1
2
2
Signed-off-by: Jinoh Kang <jinoh.kang.kr(a)gmail.com>
---
include/netioapi.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/netioapi.h b/include/netioapi.h
index 6005e58e216..832f350b861 100644
--- a/include/netioapi.h
+++ b/include/netioapi.h
@@ -250,6 +250,7 @@ DWORD WINAPI ConvertInterfaceNameToLuidA(const char*,NET_LUID*);
DWORD WINAPI ConvertInterfaceNameToLuidW(const WCHAR*,NET_LUID*);
DWORD WINAPI ConvertLengthToIpv4Mask(ULONG,ULONG*);
void WINAPI FreeMibTable(void*);
+DWORD WINAPI GetBestRoute2(NET_LUID*,NET_IFINDEX,const SOCKADDR_INET*,const SOCKADDR_INET*,ULONG,PMIB_IPFORWARD_ROW2,SOCKADDR_INET*);
DWORD WINAPI GetIfEntry2(MIB_IF_ROW2*);
DWORD WINAPI GetIfEntry2Ex(MIB_IF_TABLE_LEVEL,MIB_IF_ROW2*);
DWORD WINAPI GetIfTable2(MIB_IF_TABLE2**);
--
2.34.1
1
2
From: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/d3d10_1/Makefile.in | 1 -
dlls/d3d10_1/d3d10_1_main.c | 22 +++++++++++-----------
2 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/dlls/d3d10_1/Makefile.in b/dlls/d3d10_1/Makefile.in
index a3bb6a183bb..50ae0383b92 100644
--- a/dlls/d3d10_1/Makefile.in
+++ b/dlls/d3d10_1/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = d3d10_1.dll
IMPORTLIB = d3d10_1
IMPORTS = dxguid d3d10core dxgi
diff --git a/dlls/d3d10_1/d3d10_1_main.c b/dlls/d3d10_1/d3d10_1_main.c
index f4fb1126ef2..c7cde0fcef9 100644
--- a/dlls/d3d10_1/d3d10_1_main.c
+++ b/dlls/d3d10_1/d3d10_1_main.c
@@ -89,7 +89,7 @@ static HRESULT d3d10_create_device1(IDXGIAdapter *adapter, D3D10_DRIVER_TYPE dri
IDXGIAdapter_AddRef(adapter);
if (FAILED(hr = IDXGIAdapter_GetParent(adapter, &IID_IDXGIFactory, (void **)&factory)))
{
- WARN("Failed to get dxgi factory, hr %#x.\n", hr);
+ WARN("Failed to get dxgi factory, hr %#lx.\n", hr);
return hr;
}
}
@@ -97,7 +97,7 @@ static HRESULT d3d10_create_device1(IDXGIAdapter *adapter, D3D10_DRIVER_TYPE dri
{
if (FAILED(hr = CreateDXGIFactory(&IID_IDXGIFactory, (void **)&factory)))
{
- WARN("Failed to create dxgi factory, hr %#x.\n", hr);
+ WARN("Failed to create dxgi factory, hr %#lx.\n", hr);
return hr;
}
@@ -109,7 +109,7 @@ static HRESULT d3d10_create_device1(IDXGIAdapter *adapter, D3D10_DRIVER_TYPE dri
{
if (FAILED(hr = IDXGIFactory_EnumAdapters(factory, 0, &adapter)))
{
- WARN("No adapters found, hr %#x.\n", hr);
+ WARN("No adapters found, hr %#lx.\n", hr);
IDXGIFactory_Release(factory);
return hr;
}
@@ -133,7 +133,7 @@ static HRESULT d3d10_create_device1(IDXGIAdapter *adapter, D3D10_DRIVER_TYPE dri
FreeLibrary(refrast);
if (FAILED(hr))
{
- WARN("Failed to create a software adapter, hr %#x.\n", hr);
+ WARN("Failed to create a software adapter, hr %#lx.\n", hr);
IDXGIFactory_Release(factory);
return hr;
}
@@ -150,7 +150,7 @@ static HRESULT d3d10_create_device1(IDXGIAdapter *adapter, D3D10_DRIVER_TYPE dri
}
if (FAILED(hr = IDXGIFactory_CreateSoftwareAdapter(factory, swrast, &adapter)))
{
- WARN("Failed to create a software adapter, hr %#x.\n", hr);
+ WARN("Failed to create a software adapter, hr %#lx.\n", hr);
IDXGIFactory_Release(factory);
return hr;
}
@@ -170,7 +170,7 @@ static HRESULT d3d10_create_device1(IDXGIAdapter *adapter, D3D10_DRIVER_TYPE dri
IDXGIFactory_Release(factory);
if (FAILED(hr))
{
- WARN("Failed to create a device, hr %#x.\n", hr);
+ WARN("Failed to create a device, hr %#lx.\n", hr);
return hr;
}
@@ -208,7 +208,7 @@ HRESULT WINAPI D3D10CreateDeviceAndSwapChain1(IDXGIAdapter *adapter, D3D10_DRIVE
* hooking these entry-points. */
if (FAILED(hr = d3d10_create_device1(adapter, driver_type, swrast, flags, feature_level, sdk_version, device)))
{
- WARN("Failed to create a device, returning %#x.\n", hr);
+ WARN("Failed to create a device, returning %#lx.\n", hr);
*device = NULL;
return hr;
}
@@ -217,7 +217,7 @@ HRESULT WINAPI D3D10CreateDeviceAndSwapChain1(IDXGIAdapter *adapter, D3D10_DRIVE
{
if (FAILED(hr = ID3D10Device1_QueryInterface(*device, &IID_IDXGIDevice, (void **)&dxgi_device)))
{
- ERR("Failed to get a dxgi device from the d3d10 device, returning %#x.\n", hr);
+ ERR("Failed to get a dxgi device from the d3d10 device, returning %#lx.\n", hr);
goto cleanup;
}
@@ -225,7 +225,7 @@ HRESULT WINAPI D3D10CreateDeviceAndSwapChain1(IDXGIAdapter *adapter, D3D10_DRIVE
IDXGIDevice_Release(dxgi_device);
if (FAILED(hr))
{
- ERR("Failed to get the device adapter, returning %#x.\n", hr);
+ ERR("Failed to get the device adapter, returning %#lx.\n", hr);
goto cleanup;
}
@@ -233,7 +233,7 @@ HRESULT WINAPI D3D10CreateDeviceAndSwapChain1(IDXGIAdapter *adapter, D3D10_DRIVE
IDXGIAdapter_Release(adapter);
if (FAILED(hr))
{
- ERR("Failed to get the adapter factory, returning %#x.\n", hr);
+ ERR("Failed to get the adapter factory, returning %#lx.\n", hr);
goto cleanup;
}
@@ -241,7 +241,7 @@ HRESULT WINAPI D3D10CreateDeviceAndSwapChain1(IDXGIAdapter *adapter, D3D10_DRIVE
IDXGIFactory_Release(factory);
if (FAILED(hr))
{
- WARN("Failed to create a swapchain, returning %#x.\n", hr);
+ WARN("Failed to create a swapchain, returning %#lx.\n", hr);
goto cleanup;
}
--
2.30.2
1
0
From: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/d2d1/Makefile.in | 1 -
dlls/d2d1/bitmap.c | 18 ++--
dlls/d2d1/bitmap_render_target.c | 10 +--
dlls/d2d1/brush.c | 26 +++---
dlls/d2d1/dc_render_target.c | 16 ++--
dlls/d2d1/device.c | 144 +++++++++++++++----------------
dlls/d2d1/effect.c | 4 +-
dlls/d2d1/factory.c | 28 +++---
dlls/d2d1/geometry.c | 24 +++---
dlls/d2d1/hwnd_render_target.c | 28 +++---
dlls/d2d1/layer.c | 4 +-
dlls/d2d1/mesh.c | 4 +-
dlls/d2d1/state_block.c | 4 +-
dlls/d2d1/stroke.c | 4 +-
dlls/d2d1/wic_render_target.c | 32 +++----
15 files changed, 173 insertions(+), 174 deletions(-)
diff --git a/dlls/d2d1/Makefile.in b/dlls/d2d1/Makefile.in
index bb9e44caba0..413571338ba 100644
--- a/dlls/d2d1/Makefile.in
+++ b/dlls/d2d1/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = d2d1.dll
IMPORTLIB = d2d1
IMPORTS = d3d10_1 dxguid uuid gdi32 user32 advapi32
diff --git a/dlls/d2d1/bitmap.c b/dlls/d2d1/bitmap.c
index 470724e96a9..50744836b13 100644
--- a/dlls/d2d1/bitmap.c
+++ b/dlls/d2d1/bitmap.c
@@ -52,7 +52,7 @@ static ULONG STDMETHODCALLTYPE d2d_bitmap_AddRef(ID2D1Bitmap1 *iface)
struct d2d_bitmap *bitmap = impl_from_ID2D1Bitmap1(iface);
ULONG refcount = InterlockedIncrement(&bitmap->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount);
+ TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount;
}
@@ -62,7 +62,7 @@ static ULONG STDMETHODCALLTYPE d2d_bitmap_Release(ID2D1Bitmap1 *iface)
struct d2d_bitmap *bitmap = impl_from_ID2D1Bitmap1(iface);
ULONG refcount = InterlockedDecrement(&bitmap->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount);
+ TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount)
{
@@ -295,13 +295,13 @@ static void d2d_bitmap_init(struct d2d_bitmap *bitmap, struct d2d_device_context
if (bitmap->options & D2D1_BITMAP_OPTIONS_TARGET)
{
if (FAILED(hr = ID3D11Device_CreateRenderTargetView(d3d_device, resource, NULL, &bitmap->rtv)))
- WARN("Failed to create RTV, hr %#x.\n", hr);
+ WARN("Failed to create RTV, hr %#lx.\n", hr);
}
if (!(bitmap->options & D2D1_BITMAP_OPTIONS_CANNOT_DRAW))
{
if (FAILED(hr = ID3D11Device_CreateShaderResourceView(d3d_device, resource, NULL, &bitmap->srv)))
- WARN("Failed to create SRV, hr %#x.\n", hr);
+ WARN("Failed to create SRV, hr %#lx.\n", hr);
}
ID3D11Device_Release(d3d_device);
@@ -366,7 +366,7 @@ HRESULT d2d_bitmap_create(struct d2d_device_context *context, D2D1_SIZE_U size,
if (FAILED(hr = ID3D11Device1_CreateTexture2D(context->d3d_device, &texture_desc,
src_data ? &resource_data : NULL, &texture)))
{
- ERR("Failed to create texture, hr %#x.\n", hr);
+ ERR("Failed to create texture, hr %#lx.\n", hr);
return hr;
}
@@ -468,7 +468,7 @@ HRESULT d2d_bitmap_create_shared(struct d2d_device_context *context, REFIID iid,
if (FAILED(hr = IDXGISurface_GetDesc(surface, &surface_desc)))
{
- WARN("Failed to get surface desc, hr %#x.\n", hr);
+ WARN("Failed to get surface desc, hr %#lx.\n", hr);
ID3D11Resource_Release(resource);
return hr;
}
@@ -536,7 +536,7 @@ HRESULT d2d_bitmap_create_from_wic_bitmap(struct d2d_device_context *context, IW
if (FAILED(hr = IWICBitmapSource_GetSize(bitmap_source, &size.width, &size.height)))
{
- WARN("Failed to get bitmap size, hr %#x.\n", hr);
+ WARN("Failed to get bitmap size, hr %#lx.\n", hr);
return hr;
}
@@ -556,7 +556,7 @@ HRESULT d2d_bitmap_create_from_wic_bitmap(struct d2d_device_context *context, IW
if (FAILED(hr = IWICBitmapSource_GetPixelFormat(bitmap_source, &wic_format)))
{
- WARN("Failed to get bitmap format, hr %#x.\n", hr);
+ WARN("Failed to get bitmap format, hr %#lx.\n", hr);
return hr;
}
@@ -605,7 +605,7 @@ HRESULT d2d_bitmap_create_from_wic_bitmap(struct d2d_device_context *context, IW
rect.Height = size.height;
if (FAILED(hr = IWICBitmapSource_CopyPixels(bitmap_source, &rect, pitch, data_size, data)))
{
- WARN("Failed to copy bitmap pixels, hr %#x.\n", hr);
+ WARN("Failed to copy bitmap pixels, hr %#lx.\n", hr);
heap_free(data);
return hr;
}
diff --git a/dlls/d2d1/bitmap_render_target.c b/dlls/d2d1/bitmap_render_target.c
index 373c3735664..833ee125bac 100644
--- a/dlls/d2d1/bitmap_render_target.c
+++ b/dlls/d2d1/bitmap_render_target.c
@@ -51,7 +51,7 @@ static ULONG STDMETHODCALLTYPE d2d_bitmap_render_target_AddRef(ID2D1BitmapRender
struct d2d_bitmap_render_target *render_target = impl_from_ID2D1BitmapRenderTarget(iface);
ULONG refcount = InterlockedIncrement(&render_target->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount);
+ TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount;
}
@@ -61,7 +61,7 @@ static ULONG STDMETHODCALLTYPE d2d_bitmap_render_target_Release(ID2D1BitmapRende
struct d2d_bitmap_render_target *render_target = impl_from_ID2D1BitmapRenderTarget(iface);
ULONG refcount = InterlockedDecrement(&render_target->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount);
+ TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount)
{
@@ -787,7 +787,7 @@ HRESULT d2d_bitmap_render_target_init(struct d2d_bitmap_render_target *render_ta
parent_target->ops ? &d2d_bitmap_render_target_ops : NULL,
&dxgi_rt_desc, (void **)&render_target->dxgi_inner)))
{
- WARN("Failed to create DXGI surface render target, hr %#x.\n", hr);
+ WARN("Failed to create DXGI surface render target, hr %#lx.\n", hr);
return hr;
}
@@ -798,7 +798,7 @@ HRESULT d2d_bitmap_render_target_init(struct d2d_bitmap_render_target *render_ta
if (FAILED(hr = IUnknown_QueryInterface(render_target->dxgi_inner,
&IID_ID2D1RenderTarget, (void **)&render_target->dxgi_target)))
{
- WARN("Failed to retrieve ID2D1RenderTarget interface, hr %#x.\n", hr);
+ WARN("Failed to retrieve ID2D1RenderTarget interface, hr %#lx.\n", hr);
IUnknown_Release(render_target->dxgi_inner);
return hr;
}
@@ -816,7 +816,7 @@ HRESULT d2d_bitmap_render_target_init(struct d2d_bitmap_render_target *render_ta
ID2D1DeviceContext_Release(context);
if (FAILED(hr))
{
- WARN("Failed to create target bitmap, hr %#x.\n", hr);
+ WARN("Failed to create target bitmap, hr %#lx.\n", hr);
IUnknown_Release(render_target->dxgi_inner);
return hr;
}
diff --git a/dlls/d2d1/brush.c b/dlls/d2d1/brush.c
index 38afbe83752..14d9cb54e92 100644
--- a/dlls/d2d1/brush.c
+++ b/dlls/d2d1/brush.c
@@ -50,7 +50,7 @@ static ULONG STDMETHODCALLTYPE d2d_gradient_AddRef(ID2D1GradientStopCollection *
struct d2d_gradient *gradient = impl_from_ID2D1GradientStopCollection(iface);
ULONG refcount = InterlockedIncrement(&gradient->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount);
+ TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount;
}
@@ -60,7 +60,7 @@ static ULONG STDMETHODCALLTYPE d2d_gradient_Release(ID2D1GradientStopCollection
struct d2d_gradient *gradient = impl_from_ID2D1GradientStopCollection(iface);
ULONG refcount = InterlockedDecrement(&gradient->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount);
+ TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount)
{
@@ -170,7 +170,7 @@ HRESULT d2d_gradient_create(ID2D1Factory *factory, ID3D11Device1 *device, const
heap_free(data);
if (FAILED(hr))
{
- ERR("Failed to create buffer, hr %#x.\n", hr);
+ ERR("Failed to create buffer, hr %#lx.\n", hr);
return hr;
}
@@ -183,7 +183,7 @@ HRESULT d2d_gradient_create(ID2D1Factory *factory, ID3D11Device1 *device, const
ID3D11Buffer_Release(buffer);
if (FAILED(hr))
{
- ERR("Failed to create view, hr %#x.\n", hr);
+ ERR("Failed to create view, hr %#lx.\n", hr);
return hr;
}
@@ -288,7 +288,7 @@ static ULONG STDMETHODCALLTYPE d2d_solid_color_brush_AddRef(ID2D1SolidColorBrush
struct d2d_brush *brush = impl_from_ID2D1SolidColorBrush(iface);
ULONG refcount = InterlockedIncrement(&brush->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount);
+ TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount;
}
@@ -298,7 +298,7 @@ static ULONG STDMETHODCALLTYPE d2d_solid_color_brush_Release(ID2D1SolidColorBrus
struct d2d_brush *brush = impl_from_ID2D1SolidColorBrush(iface);
ULONG refcount = InterlockedDecrement(&brush->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount);
+ TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount)
d2d_brush_destroy(brush);
@@ -431,7 +431,7 @@ static ULONG STDMETHODCALLTYPE d2d_linear_gradient_brush_AddRef(ID2D1LinearGradi
struct d2d_brush *brush = impl_from_ID2D1LinearGradientBrush(iface);
ULONG refcount = InterlockedIncrement(&brush->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount);
+ TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount;
}
@@ -441,7 +441,7 @@ static ULONG STDMETHODCALLTYPE d2d_linear_gradient_brush_Release(ID2D1LinearGrad
struct d2d_brush *brush = impl_from_ID2D1LinearGradientBrush(iface);
ULONG refcount = InterlockedDecrement(&brush->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount);
+ TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount)
{
@@ -618,7 +618,7 @@ static ULONG STDMETHODCALLTYPE d2d_radial_gradient_brush_AddRef(ID2D1RadialGradi
struct d2d_brush *brush = impl_from_ID2D1RadialGradientBrush(iface);
ULONG refcount = InterlockedIncrement(&brush->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount);
+ TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount;
}
@@ -628,7 +628,7 @@ static ULONG STDMETHODCALLTYPE d2d_radial_gradient_brush_Release(ID2D1RadialGrad
struct d2d_brush *brush = impl_from_ID2D1RadialGradientBrush(iface);
ULONG refcount = InterlockedDecrement(&brush->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount);
+ TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount)
{
@@ -851,7 +851,7 @@ static ULONG STDMETHODCALLTYPE d2d_bitmap_brush_AddRef(ID2D1BitmapBrush1 *iface)
struct d2d_brush *brush = impl_from_ID2D1BitmapBrush1(iface);
ULONG refcount = InterlockedIncrement(&brush->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount);
+ TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount;
}
@@ -861,7 +861,7 @@ static ULONG STDMETHODCALLTYPE d2d_bitmap_brush_Release(ID2D1BitmapBrush1 *iface
struct d2d_brush *brush = impl_from_ID2D1BitmapBrush1(iface);
ULONG refcount = InterlockedDecrement(&brush->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount);
+ TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount)
{
@@ -1281,7 +1281,7 @@ static void d2d_brush_bind_bitmap(struct d2d_brush *brush, struct d2d_device_con
sampler_desc.MaxLOD = 0.0f;
if (FAILED(hr = ID3D11Device1_CreateSamplerState(context->d3d_device, &sampler_desc, sampler_state)))
- ERR("Failed to create sampler state, hr %#x.\n", hr);
+ ERR("Failed to create sampler state, hr %#lx.\n", hr);
}
ID3D11DeviceContext_PSSetSamplers(d3d_context, brush_idx, 1, sampler_state);
diff --git a/dlls/d2d1/dc_render_target.c b/dlls/d2d1/dc_render_target.c
index 099e3b0a3a2..e7e0fa57ed7 100644
--- a/dlls/d2d1/dc_render_target.c
+++ b/dlls/d2d1/dc_render_target.c
@@ -39,7 +39,7 @@ static HRESULT d2d_dc_render_target_present(IUnknown *outer_unknown)
if (FAILED(hr = IDXGISurface1_GetDC(render_target->dxgi_surface, FALSE, &src_hdc)))
{
- WARN("GetDC() failed, %#x.\n", hr);
+ WARN("GetDC() failed, %#lx.\n", hr);
return S_OK;
}
@@ -81,7 +81,7 @@ static ULONG STDMETHODCALLTYPE d2d_dc_render_target_AddRef(ID2D1DCRenderTarget *
struct d2d_dc_render_target *render_target = impl_from_ID2D1DCRenderTarget(iface);
ULONG refcount = InterlockedIncrement(&render_target->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount);
+ TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount;
}
@@ -91,7 +91,7 @@ static ULONG STDMETHODCALLTYPE d2d_dc_render_target_Release(ID2D1DCRenderTarget
struct d2d_dc_render_target *render_target = impl_from_ID2D1DCRenderTarget(iface);
ULONG refcount = InterlockedDecrement(&render_target->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount);
+ TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount)
{
@@ -709,7 +709,7 @@ static HRESULT STDMETHODCALLTYPE d2d_dc_render_target_BindDC(ID2D1DCRenderTarget
if (FAILED(hr = ID2D1DeviceContext_CreateBitmap(context, bitmap_size, NULL, 0, &bitmap_desc,
(ID2D1Bitmap1 **)&bitmap)))
{
- WARN("Failed to create target bitmap, hr %#x.\n", hr);
+ WARN("Failed to create target bitmap, hr %#lx.\n", hr);
ID2D1DeviceContext_Release(context);
return hr;
}
@@ -826,7 +826,7 @@ HRESULT d2d_dc_render_target_init(struct d2d_dc_render_target *render_target, ID
if (FAILED(hr = ID3D10Device1_QueryInterface(d3d_device, &IID_IDXGIDevice, (void **)&dxgi_device)))
{
- WARN("Failed to get DXGI device interface, hr %#x.\n", hr);
+ WARN("Failed to get DXGI device interface, hr %#lx.\n", hr);
return hr;
}
@@ -834,7 +834,7 @@ HRESULT d2d_dc_render_target_init(struct d2d_dc_render_target *render_target, ID
IDXGIDevice_Release(dxgi_device);
if (FAILED(hr))
{
- WARN("Failed to create D2D device, hr %#x.\n", hr);
+ WARN("Failed to create D2D device, hr %#lx.\n", hr);
return hr;
}
@@ -843,14 +843,14 @@ HRESULT d2d_dc_render_target_init(struct d2d_dc_render_target *render_target, ID
ID2D1Device_Release(device);
if (FAILED(hr))
{
- WARN("Failed to create DXGI surface render target, hr %#x.\n", hr);
+ WARN("Failed to create DXGI surface render target, hr %#lx.\n", hr);
return hr;
}
if (FAILED(hr = IUnknown_QueryInterface(render_target->dxgi_inner,
&IID_ID2D1RenderTarget, (void **)&render_target->dxgi_target)))
{
- WARN("Failed to retrieve ID2D1RenderTarget interface, hr %#x.\n", hr);
+ WARN("Failed to retrieve ID2D1RenderTarget interface, hr %#lx.\n", hr);
IUnknown_Release(render_target->dxgi_inner);
return hr;
}
diff --git a/dlls/d2d1/device.c b/dlls/d2d1/device.c
index e6b6f9efbea..ce74d7c1582 100644
--- a/dlls/d2d1/device.c
+++ b/dlls/d2d1/device.c
@@ -242,7 +242,7 @@ static ULONG STDMETHODCALLTYPE d2d_device_context_inner_AddRef(IUnknown *iface)
struct d2d_device_context *context = impl_from_IUnknown(iface);
ULONG refcount = InterlockedIncrement(&context->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount);
+ TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount;
}
@@ -252,7 +252,7 @@ static ULONG STDMETHODCALLTYPE d2d_device_context_inner_Release(IUnknown *iface)
struct d2d_device_context *context = impl_from_IUnknown(iface);
ULONG refcount = InterlockedDecrement(&context->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount);
+ TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount)
{
@@ -519,7 +519,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateCompatibleRenderTarget
if (FAILED(hr = d2d_bitmap_render_target_init(object, render_target, size, pixel_size,
format, options)))
{
- WARN("Failed to initialize render target, hr %#x.\n", hr);
+ WARN("Failed to initialise render target, hr %#lx.\n", hr);
heap_free(object);
return hr;
}
@@ -572,13 +572,13 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawLine(ID2D1DeviceContext *if
if (FAILED(hr = ID2D1Factory_CreatePathGeometry(render_target->factory, &geometry)))
{
- WARN("Failed to create path geometry, %#x.\n", hr);
+ WARN("Failed to create path geometry, hr %#lx.\n", hr);
return;
}
if (FAILED(hr = ID2D1PathGeometry_Open(geometry, &sink)))
{
- WARN("Open() failed, %#x.\n", hr);
+ WARN("Failed to open geometry sink, hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
return;
}
@@ -587,7 +587,7 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawLine(ID2D1DeviceContext *if
ID2D1GeometrySink_AddLine(sink, p1);
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_OPEN);
if (FAILED(hr = ID2D1GeometrySink_Close(sink)))
- WARN("Close() failed, %#x.\n", hr);
+ WARN("Failed to close geometry sink, hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
ID2D1DeviceContext_DrawGeometry(iface, (ID2D1Geometry *)geometry, brush, stroke_width, stroke_style);
@@ -606,7 +606,7 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawRectangle(ID2D1DeviceContex
if (FAILED(hr = ID2D1Factory_CreateRectangleGeometry(render_target->factory, rect, &geometry)))
{
- ERR("Failed to create geometry, hr %#x.\n", hr);
+ ERR("Failed to create geometry, hr %#lx.\n", hr);
return;
}
@@ -625,7 +625,7 @@ static void STDMETHODCALLTYPE d2d_device_context_FillRectangle(ID2D1DeviceContex
if (FAILED(hr = ID2D1Factory_CreateRectangleGeometry(render_target->factory, rect, &geometry)))
{
- ERR("Failed to create geometry, hr %#x.\n", hr);
+ ERR("Failed to create geometry, hr %#lx.\n", hr);
return;
}
@@ -645,7 +645,7 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawRoundedRectangle(ID2D1Devic
if (FAILED(hr = ID2D1Factory_CreateRoundedRectangleGeometry(render_target->factory, rect, &geometry)))
{
- ERR("Failed to create geometry, hr %#x.\n", hr);
+ ERR("Failed to create geometry, hr %#lx.\n", hr);
return;
}
@@ -664,7 +664,7 @@ static void STDMETHODCALLTYPE d2d_device_context_FillRoundedRectangle(ID2D1Devic
if (FAILED(hr = ID2D1Factory_CreateRoundedRectangleGeometry(render_target->factory, rect, &geometry)))
{
- ERR("Failed to create geometry, hr %#x.\n", hr);
+ ERR("Failed to create geometry, hr %#lx.\n", hr);
return;
}
@@ -684,7 +684,7 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawEllipse(ID2D1DeviceContext
if (FAILED(hr = ID2D1Factory_CreateEllipseGeometry(render_target->factory, ellipse, &geometry)))
{
- ERR("Failed to create geometry, hr %#x.\n", hr);
+ ERR("Failed to create geometry, hr %#lx.\n", hr);
return;
}
@@ -703,7 +703,7 @@ static void STDMETHODCALLTYPE d2d_device_context_FillEllipse(ID2D1DeviceContext
if (FAILED(hr = ID2D1Factory_CreateEllipseGeometry(render_target->factory, ellipse, &geometry)))
{
- ERR("Failed to create geometry, hr %#x.\n", hr);
+ ERR("Failed to create geometry, hr %#lx.\n", hr);
return;
}
@@ -724,7 +724,7 @@ static HRESULT d2d_device_context_update_ps_cb(struct d2d_device_context *contex
if (FAILED(hr = ID3D11DeviceContext_Map(d3d_context, (ID3D11Resource *)context->ps_cb,
0, D3D11_MAP_WRITE_DISCARD, 0, &map_desc)))
{
- WARN("Failed to map constant buffer, hr %#x.\n", hr);
+ WARN("Failed to map constant buffer, hr %#lx.\n", hr);
ID3D11DeviceContext_Release(d3d_context);
return hr;
}
@@ -760,7 +760,7 @@ static HRESULT d2d_device_context_update_vs_cb(struct d2d_device_context *contex
if (FAILED(hr = ID3D11DeviceContext_Map(d3d_context, (ID3D11Resource *)context->vs_cb,
0, D3D11_MAP_WRITE_DISCARD, 0, &map_desc)))
{
- WARN("Failed to map constant buffer, hr %#x.\n", hr);
+ WARN("Failed to map constant buffer, hr %#lx.\n", hr);
ID3D11DeviceContext_Release(d3d_context);
return hr;
}
@@ -805,13 +805,13 @@ static void d2d_device_context_draw_geometry(struct d2d_device_context *render_t
if (FAILED(hr = d2d_device_context_update_vs_cb(render_target, &geometry->transform, stroke_width)))
{
- WARN("Failed to update vs constant buffer, hr %#x.\n", hr);
+ WARN("Failed to update vs constant buffer, hr %#lx.\n", hr);
return;
}
if (FAILED(hr = d2d_device_context_update_ps_cb(render_target, brush, NULL, TRUE, FALSE)))
{
- WARN("Failed to update ps constant buffer, hr %#x.\n", hr);
+ WARN("Failed to update ps constant buffer, hr %#lx.\n", hr);
return;
}
@@ -830,7 +830,7 @@ static void d2d_device_context_draw_geometry(struct d2d_device_context *render_t
if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, &buffer_data, &ib)))
{
- WARN("Failed to create index buffer, hr %#x.\n", hr);
+ WARN("Failed to create index buffer, hr %#lx.\n", hr);
return;
}
@@ -840,7 +840,7 @@ static void d2d_device_context_draw_geometry(struct d2d_device_context *render_t
if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, &buffer_data, &vb)))
{
- ERR("Failed to create vertex buffer, hr %#x.\n", hr);
+ ERR("Failed to create vertex buffer, hr %#lx.\n", hr);
ID3D11Buffer_Release(ib);
return;
}
@@ -860,7 +860,7 @@ static void d2d_device_context_draw_geometry(struct d2d_device_context *render_t
if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, &buffer_data, &ib)))
{
- WARN("Failed to create beziers index buffer, hr %#x.\n", hr);
+ WARN("Failed to create curves index buffer, hr %#lx.\n", hr);
return;
}
@@ -870,7 +870,7 @@ static void d2d_device_context_draw_geometry(struct d2d_device_context *render_t
if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, &buffer_data, &vb)))
{
- ERR("Failed to create beziers vertex buffer, hr %#x.\n", hr);
+ ERR("Failed to create curves vertex buffer, hr %#lx.\n", hr);
ID3D11Buffer_Release(ib);
return;
}
@@ -891,7 +891,7 @@ static void d2d_device_context_draw_geometry(struct d2d_device_context *render_t
if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, &buffer_data, &ib)))
{
- WARN("Failed to create arcs index buffer, hr %#x.\n", hr);
+ WARN("Failed to create arcs index buffer, hr %#lx.\n", hr);
return;
}
@@ -901,7 +901,7 @@ static void d2d_device_context_draw_geometry(struct d2d_device_context *render_t
if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, &buffer_data, &vb)))
{
- ERR("Failed to create arcs vertex buffer, hr %#x.\n", hr);
+ ERR("Failed to create arcs vertex buffer, hr %#lx.\n", hr);
ID3D11Buffer_Release(ib);
return;
}
@@ -949,13 +949,13 @@ static void d2d_device_context_fill_geometry(struct d2d_device_context *render_t
if (FAILED(hr = d2d_device_context_update_vs_cb(render_target, &geometry->transform, 0.0f)))
{
- WARN("Failed to update vs constant buffer, hr %#x.\n", hr);
+ WARN("Failed to update vs constant buffer, hr %#lx.\n", hr);
return;
}
if (FAILED(hr = d2d_device_context_update_ps_cb(render_target, brush, opacity_brush, FALSE, FALSE)))
{
- WARN("Failed to update ps constant buffer, hr %#x.\n", hr);
+ WARN("Failed to update ps constant buffer, hr %#lx.\n", hr);
return;
}
@@ -967,7 +967,7 @@ static void d2d_device_context_fill_geometry(struct d2d_device_context *render_t
if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, &buffer_data, &ib)))
{
- WARN("Failed to create index buffer, hr %#x.\n", hr);
+ WARN("Failed to create index buffer, hr %#lx.\n", hr);
return;
}
@@ -977,7 +977,7 @@ static void d2d_device_context_fill_geometry(struct d2d_device_context *render_t
if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, &buffer_data, &vb)))
{
- ERR("Failed to create vertex buffer, hr %#x.\n", hr);
+ ERR("Failed to create vertex buffer, hr %#lx.\n", hr);
ID3D11Buffer_Release(ib);
return;
}
@@ -997,7 +997,7 @@ static void d2d_device_context_fill_geometry(struct d2d_device_context *render_t
if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, &buffer_data, &vb)))
{
- ERR("Failed to create beziers vertex buffer, hr %#x.\n", hr);
+ ERR("Failed to create curves vertex buffer, hr %#lx.\n", hr);
return;
}
@@ -1015,7 +1015,7 @@ static void d2d_device_context_fill_geometry(struct d2d_device_context *render_t
if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, &buffer_data, &vb)))
{
- ERR("Failed to create arc vertex buffer, hr %#x.\n", hr);
+ ERR("Failed to create arc vertex buffer, hr %#lx.\n", hr);
return;
}
@@ -1123,7 +1123,7 @@ static void d2d_device_context_draw_bitmap(struct d2d_device_context *context, I
if (FAILED(hr = d2d_bitmap_brush_create(context->factory, bitmap, &bitmap_brush_desc, &brush_desc, &brush)))
{
- ERR("Failed to create bitmap brush, hr %#x.\n", hr);
+ ERR("Failed to create bitmap brush, hr %#lx.\n", hr);
return;
}
@@ -1170,7 +1170,7 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawText(ID2D1DeviceContext *if
if (FAILED(hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED,
&IID_IDWriteFactory, (IUnknown **)&dwrite_factory)))
{
- ERR("Failed to create dwrite factory, hr %#x.\n", hr);
+ ERR("Failed to create dwrite factory, hr %#lx.\n", hr);
return;
}
@@ -1186,7 +1186,7 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawText(ID2D1DeviceContext *if
IDWriteFactory_Release(dwrite_factory);
if (FAILED(hr))
{
- ERR("Failed to create text layout, hr %#x.\n", hr);
+ ERR("Failed to create text layout, hr %#lx.\n", hr);
return;
}
@@ -1210,7 +1210,7 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawTextLayout(ID2D1DeviceConte
if (FAILED(hr = IDWriteTextLayout_Draw(layout,
&ctx, &render_target->IDWriteTextRenderer_iface, origin.x, origin.y)))
- FIXME("Failed to draw text layout, hr %#x.\n", hr);
+ FIXME("Failed to draw text layout, hr %#lx.\n", hr);
}
static D2D1_ANTIALIAS_MODE d2d_device_context_set_aa_mode_from_text_aa_mode(struct d2d_device_context *rt)
@@ -1232,13 +1232,13 @@ static void d2d_device_context_draw_glyph_run_outline(struct d2d_device_context
if (FAILED(hr = ID2D1Factory_CreatePathGeometry(render_target->factory, &geometry)))
{
- ERR("Failed to create geometry, hr %#x.\n", hr);
+ ERR("Failed to create geometry, hr %#lx.\n", hr);
return;
}
if (FAILED(hr = ID2D1PathGeometry_Open(geometry, &sink)))
{
- ERR("Failed to open geometry sink, hr %#x.\n", hr);
+ ERR("Failed to open geometry sink, hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
return;
}
@@ -1247,14 +1247,14 @@ static void d2d_device_context_draw_glyph_run_outline(struct d2d_device_context
glyph_run->glyphIndices, glyph_run->glyphAdvances, glyph_run->glyphOffsets, glyph_run->glyphCount,
glyph_run->isSideways, glyph_run->bidiLevel & 1, (IDWriteGeometrySink *)sink)))
{
- ERR("Failed to get glyph run outline, hr %#x.\n", hr);
+ ERR("Failed to get glyph run outline, hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
ID2D1PathGeometry_Release(geometry);
return;
}
if (FAILED(hr = ID2D1GeometrySink_Close(sink)))
- ERR("Failed to close geometry sink, hr %#x.\n", hr);
+ ERR("Failed to close geometry sink, hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
transform = &render_target->drawing_state.transform;
@@ -1295,7 +1295,7 @@ static void d2d_device_context_draw_glyph_run_bitmap(struct d2d_device_context *
if (FAILED(hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED,
&IID_IDWriteFactory2, (IUnknown **)&dwrite_factory)))
{
- ERR("Failed to create dwrite factory, hr %#x.\n", hr);
+ ERR("Failed to create dwrite factory, hr %#lx.\n", hr);
return;
}
@@ -1317,7 +1317,7 @@ static void d2d_device_context_draw_glyph_run_bitmap(struct d2d_device_context *
IDWriteFactory2_Release(dwrite_factory);
if (FAILED(hr))
{
- ERR("Failed to create glyph run analysis, hr %#x.\n", hr);
+ ERR("Failed to create glyph run analysis, hr %#lx.\n", hr);
return;
}
@@ -1328,7 +1328,7 @@ static void d2d_device_context_draw_glyph_run_bitmap(struct d2d_device_context *
if (FAILED(hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, texture_type, &bounds)))
{
- ERR("Failed to get alpha texture bounds, hr %#x.\n", hr);
+ ERR("Failed to get alpha texture bounds, hr %#lx.\n", hr);
goto done;
}
@@ -1351,7 +1351,7 @@ static void d2d_device_context_draw_glyph_run_bitmap(struct d2d_device_context *
if (FAILED(hr = IDWriteGlyphRunAnalysis_CreateAlphaTexture(analysis,
texture_type, &bounds, opacity_values, opacity_values_size)))
{
- ERR("Failed to create alpha texture, hr %#x.\n", hr);
+ ERR("Failed to create alpha texture, hr %#lx.\n", hr);
goto done;
}
@@ -1364,7 +1364,7 @@ static void d2d_device_context_draw_glyph_run_bitmap(struct d2d_device_context *
if (FAILED(hr = d2d_device_context_CreateBitmap(&render_target->ID2D1DeviceContext_iface,
bitmap_size, opacity_values, bitmap_size.width, &bitmap_desc, &opacity_bitmap)))
{
- ERR("Failed to create opacity bitmap, hr %#x.\n", hr);
+ ERR("Failed to create opacity bitmap, hr %#lx.\n", hr);
goto done;
}
@@ -1381,13 +1381,13 @@ static void d2d_device_context_draw_glyph_run_bitmap(struct d2d_device_context *
if (FAILED(hr = d2d_device_context_CreateBitmapBrush(&render_target->ID2D1DeviceContext_iface,
opacity_bitmap, NULL, &brush_desc, &opacity_brush)))
{
- ERR("Failed to create opacity bitmap brush, hr %#x.\n", hr);
+ ERR("Failed to create opacity bitmap brush, hr %#lx.\n", hr);
goto done;
}
if (FAILED(hr = ID2D1Factory_CreateRectangleGeometry(render_target->factory, &run_rect, &geometry)))
{
- ERR("Failed to create geometry, hr %#x.\n", hr);
+ ERR("Failed to create geometry, hr %#lx.\n", hr);
goto done;
}
@@ -1634,7 +1634,7 @@ static void STDMETHODCALLTYPE d2d_device_context_Clear(ID2D1DeviceContext *iface
if (FAILED(hr = ID3D11DeviceContext_Map(d3d_context, (ID3D11Resource *)render_target->vs_cb,
0, D3D11_MAP_WRITE_DISCARD, 0, &map_desc)))
{
- WARN("Failed to map vs constant buffer, hr %#x.\n", hr);
+ WARN("Failed to map vs constant buffer, hr %#lx.\n", hr);
ID3D11DeviceContext_Release(d3d_context);
return;
}
@@ -1662,7 +1662,7 @@ static void STDMETHODCALLTYPE d2d_device_context_Clear(ID2D1DeviceContext *iface
if (FAILED(hr = ID3D11DeviceContext_Map(d3d_context, (ID3D11Resource *)render_target->ps_cb,
0, D3D11_MAP_WRITE_DISCARD, 0, &map_desc)))
{
- WARN("Failed to map ps constant buffer, hr %#x.\n", hr);
+ WARN("Failed to map ps constant buffer, hr %#lx.\n", hr);
ID3D11DeviceContext_Release(d3d_context);
return;
}
@@ -1869,7 +1869,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateBitmapFromDxgiSurface(
if (FAILED(hr = IDXGISurface_GetDesc(surface, &surface_desc)))
{
- WARN("Failed to get surface desc, hr %#x.\n", hr);
+ WARN("Failed to get surface desc, hr %#lx.\n", hr);
return hr;
}
@@ -1900,7 +1900,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateEffect(ID2D1DeviceCont
if (FAILED(hr = d2d_effect_init(object, context->factory, effect_id)))
{
- WARN("Failed to initialize effect, hr %#x.\n", hr);
+ WARN("Failed to initialise effect, hr %#lx.\n", hr);
heap_free(object);
return hr;
}
@@ -2081,7 +2081,7 @@ static void STDMETHODCALLTYPE d2d_device_context_SetTarget(ID2D1DeviceContext *i
blend_desc.RenderTarget[0].BlendOpAlpha = D3D11_BLEND_OP_ADD;
blend_desc.RenderTarget[0].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL;
if (FAILED(hr = ID3D11Device1_CreateBlendState(context->d3d_device, &blend_desc, &context->bs)))
- WARN("Failed to create blend state, hr %#x.\n", hr);
+ WARN("Failed to create blend state, hr %#lx.\n", hr);
}
static void STDMETHODCALLTYPE d2d_device_context_GetTarget(ID2D1DeviceContext *iface, ID2D1Image **target)
@@ -2207,7 +2207,7 @@ static void STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_DrawGlyphRun
max(context->desc.dpiX, context->desc.dpiY) / 96.0f,
measuring_mode, rendering_params, &rendering_mode)))
{
- ERR("Failed to get recommended rendering mode, hr %#x.\n", hr);
+ ERR("Failed to get recommended rendering mode, hr %#lx.\n", hr);
rendering_mode = DWRITE_RENDERING_MODE_OUTLINE;
}
}
@@ -2533,7 +2533,7 @@ static HRESULT STDMETHODCALLTYPE d2d_text_renderer_DrawGlyphRun(IDWriteTextRende
if (FAILED(hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, &IID_IDWriteFactory2,
(IUnknown **)&dwrite_factory)))
{
- ERR("Failed to create dwrite factory, hr %#x.\n", hr);
+ ERR("Failed to create dwrite factory, hr %#lx.\n", hr);
ID2D1Brush_Release(brush);
return hr;
}
@@ -2543,7 +2543,7 @@ static HRESULT STDMETHODCALLTYPE d2d_text_renderer_DrawGlyphRun(IDWriteTextRende
IDWriteFactory2_Release(dwrite_factory);
if (FAILED(hr))
{
- ERR("Failed to create color glyph run enumerator, hr %#x.\n", hr);
+ ERR("Failed to create colour glyph run enumerator, hr %#lx.\n", hr);
ID2D1Brush_Release(brush);
return hr;
}
@@ -2557,7 +2557,7 @@ static HRESULT STDMETHODCALLTYPE d2d_text_renderer_DrawGlyphRun(IDWriteTextRende
if (FAILED(hr = IDWriteColorGlyphRunEnumerator_MoveNext(layers, &has_run)))
{
- ERR("Failed to switch color glyph layer, hr %#x.\n", hr);
+ ERR("Failed to switch colour glyph layer, hr %#lx.\n", hr);
break;
}
@@ -2566,7 +2566,7 @@ static HRESULT STDMETHODCALLTYPE d2d_text_renderer_DrawGlyphRun(IDWriteTextRende
if (FAILED(hr = IDWriteColorGlyphRunEnumerator_GetCurrentRun(layers, &color_run)))
{
- ERR("Failed to get current color run, hr %#x.\n", hr);
+ ERR("Failed to get current colour run, hr %#lx.\n", hr);
break;
}
@@ -2577,7 +2577,7 @@ static HRESULT STDMETHODCALLTYPE d2d_text_renderer_DrawGlyphRun(IDWriteTextRende
if (FAILED(hr = d2d_device_context_CreateSolidColorBrush(&render_target->ID2D1DeviceContext_iface,
&color_run->runColor, NULL, (ID2D1SolidColorBrush **)&color_brush)))
{
- ERR("Failed to create solid color brush, hr %#x.\n", hr);
+ ERR("Failed to create solid colour brush, hr %#lx.\n", hr);
break;
}
}
@@ -2751,7 +2751,7 @@ static HRESULT d2d_device_context_get_surface(struct d2d_device_context *render_
if (FAILED(hr))
{
*surface = NULL;
- WARN("Failed to get DXGI surface, %#x.\n", hr);
+ WARN("Failed to get DXGI surface, %#lx.\n", hr);
return hr;
}
@@ -3881,7 +3881,7 @@ static HRESULT d2d_device_context_init(struct d2d_device_context *render_target,
if (FAILED(hr = IDXGIDevice_QueryInterface(device_impl->dxgi_device,
&IID_ID3D11Device1, (void **)&render_target->d3d_device)))
{
- WARN("Failed to query ID3D11Device1 interface, hr %#x.\n", hr);
+ WARN("Failed to query ID3D11Device1 interface, hr %#lx.\n", hr);
goto err;
}
@@ -3889,7 +3889,7 @@ static HRESULT d2d_device_context_init(struct d2d_device_context *render_target,
0, &feature_levels, 1, D3D11_SDK_VERSION, &IID_ID3D11Device1, NULL,
&render_target->d3d_state)))
{
- WARN("Failed to create device context state, hr %#x.\n", hr);
+ WARN("Failed to create device context state, hr %#lx.\n", hr);
goto err;
}
@@ -3900,14 +3900,14 @@ static HRESULT d2d_device_context_init(struct d2d_device_context *render_target,
if (FAILED(hr = ID3D11Device1_CreateInputLayout(render_target->d3d_device, si->il_desc, si->il_element_count,
si->vs_code, si->vs_code_size, &render_target->shape_resources[si->shape_type].il)))
{
- WARN("Failed to create input layout for shape type %#x, hr %#x.\n", si->shape_type, hr);
+ WARN("Failed to create input layout for shape type %#x, hr %#lx.\n", si->shape_type, hr);
goto err;
}
if (FAILED(hr = ID3D11Device1_CreateVertexShader(render_target->d3d_device, si->vs_code,
si->vs_code_size, NULL, &render_target->shape_resources[si->shape_type].vs)))
{
- WARN("Failed to create vertex shader for shape type %#x, hr %#x.\n", si->shape_type, hr);
+ WARN("Failed to create vertex shader for shape type %#x, hr %#lx.\n", si->shape_type, hr);
goto err;
}
@@ -3922,14 +3922,14 @@ static HRESULT d2d_device_context_init(struct d2d_device_context *render_target,
if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, NULL,
&render_target->vs_cb)))
{
- WARN("Failed to create constant buffer, hr %#x.\n", hr);
+ WARN("Failed to create constant buffer, hr %#lx.\n", hr);
goto err;
}
if (FAILED(hr = ID3D11Device1_CreatePixelShader(render_target->d3d_device,
ps_code, sizeof(ps_code), NULL, &render_target->ps)))
{
- WARN("Failed to create pixel shader, hr %#x.\n", hr);
+ WARN("Failed to create pixel shader, hr %#lx.\n", hr);
goto err;
}
@@ -3942,7 +3942,7 @@ static HRESULT d2d_device_context_init(struct d2d_device_context *render_target,
if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device, &buffer_desc, NULL,
&render_target->ps_cb)))
{
- WARN("Failed to create constant buffer, hr %#x.\n", hr);
+ WARN("Failed to create constant buffer, hr %#lx.\n", hr);
goto err;
}
@@ -3959,7 +3959,7 @@ static HRESULT d2d_device_context_init(struct d2d_device_context *render_target,
if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device,
&buffer_desc, &buffer_data, &render_target->ib)))
{
- WARN("Failed to create clear index buffer, hr %#x.\n", hr);
+ WARN("Failed to create clear index buffer, hr %#lx.\n", hr);
goto err;
}
@@ -3971,7 +3971,7 @@ static HRESULT d2d_device_context_init(struct d2d_device_context *render_target,
if (FAILED(hr = ID3D11Device1_CreateBuffer(render_target->d3d_device,
&buffer_desc, &buffer_data, &render_target->vb)))
{
- WARN("Failed to create clear vertex buffer, hr %#x.\n", hr);
+ WARN("Failed to create clear vertex buffer, hr %#lx.\n", hr);
goto err;
}
@@ -3987,14 +3987,14 @@ static HRESULT d2d_device_context_init(struct d2d_device_context *render_target,
rs_desc.AntialiasedLineEnable = FALSE;
if (FAILED(hr = ID3D11Device1_CreateRasterizerState(render_target->d3d_device, &rs_desc, &render_target->rs)))
{
- WARN("Failed to create clear rasterizer state, hr %#x.\n", hr);
+ WARN("Failed to create clear rasteriser state, hr %#lx.\n", hr);
goto err;
}
if (FAILED(hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED,
&IID_IDWriteFactory, (IUnknown **)&dwrite_factory)))
{
- ERR("Failed to create dwrite factory, hr %#x.\n", hr);
+ ERR("Failed to create dwrite factory, hr %#lx.\n", hr);
goto err;
}
@@ -4002,7 +4002,7 @@ static HRESULT d2d_device_context_init(struct d2d_device_context *render_target,
IDWriteFactory_Release(dwrite_factory);
if (FAILED(hr))
{
- ERR("Failed to create default text rendering parameters, hr %#x.\n", hr);
+ ERR("Failed to create default text rendering parameters, hr %#lx.\n", hr);
goto err;
}
@@ -4082,7 +4082,7 @@ HRESULT d2d_d3d_create_render_target(ID2D1Device *device, IDXGISurface *surface,
if (FAILED(hr = d2d_device_context_init(object, device, outer_unknown, ops)))
{
- WARN("Failed to initialize render target, hr %#x.\n", hr);
+ WARN("Failed to initialise render target, hr %#lx.\n", hr);
heap_free(object);
return hr;
}
@@ -4098,7 +4098,7 @@ HRESULT d2d_d3d_create_render_target(ID2D1Device *device, IDXGISurface *surface,
if (FAILED(hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(&object->ID2D1DeviceContext_iface,
surface, &bitmap_desc, &bitmap)))
{
- WARN("Failed to create target bitmap, hr %#x.\n", hr);
+ WARN("Failed to create target bitmap, hr %#lx.\n", hr);
IUnknown_Release(&object->IUnknown_iface);
heap_free(object);
return hr;
@@ -4140,7 +4140,7 @@ static ULONG WINAPI d2d_device_AddRef(ID2D1Device *iface)
struct d2d_device *device = impl_from_ID2D1Device(iface);
ULONG refcount = InterlockedIncrement(&device->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount);
+ TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount;
}
@@ -4150,7 +4150,7 @@ static ULONG WINAPI d2d_device_Release(ID2D1Device *iface)
struct d2d_device *device = impl_from_ID2D1Device(iface);
ULONG refcount = InterlockedDecrement(&device->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount);
+ TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount)
{
@@ -4188,7 +4188,7 @@ static HRESULT WINAPI d2d_device_CreateDeviceContext(ID2D1Device *iface, D2D1_DE
if (FAILED(hr = d2d_device_context_init(object, iface, NULL, NULL)))
{
- WARN("Failed to initialize device context, hr %#x.\n", hr);
+ WARN("Failed to initialise device context, hr %#lx.\n", hr);
heap_free(object);
return hr;
}
diff --git a/dlls/d2d1/effect.c b/dlls/d2d1/effect.c
index 0c33f956826..2f1949c073c 100644
--- a/dlls/d2d1/effect.c
+++ b/dlls/d2d1/effect.c
@@ -79,7 +79,7 @@ static ULONG STDMETHODCALLTYPE d2d_effect_AddRef(ID2D1Effect *iface)
struct d2d_effect *effect = impl_from_ID2D1Effect(iface);
ULONG refcount = InterlockedIncrement(&effect->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount);
+ TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount;
}
@@ -89,7 +89,7 @@ static ULONG STDMETHODCALLTYPE d2d_effect_Release(ID2D1Effect *iface)
struct d2d_effect *effect = impl_from_ID2D1Effect(iface);
ULONG refcount = InterlockedDecrement(&effect->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount);
+ TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount)
{
diff --git a/dlls/d2d1/factory.c b/dlls/d2d1/factory.c
index 1f8b3f5848b..737864df69c 100644
--- a/dlls/d2d1/factory.c
+++ b/dlls/d2d1/factory.c
@@ -102,7 +102,7 @@ static ULONG STDMETHODCALLTYPE d2d_factory_AddRef(ID2D1Factory2 *iface)
struct d2d_factory *factory = impl_from_ID2D1Factory2(iface);
ULONG refcount = InterlockedIncrement(&factory->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount);
+ TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount;
}
@@ -112,7 +112,7 @@ static ULONG STDMETHODCALLTYPE d2d_factory_Release(ID2D1Factory2 *iface)
struct d2d_factory *factory = impl_from_ID2D1Factory2(iface);
ULONG refcount = InterlockedDecrement(&factory->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount);
+ TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount)
{
@@ -157,7 +157,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateRectangleGeometry(ID2D1Factor
if (FAILED(hr = d2d_rectangle_geometry_init(object, (ID2D1Factory *)iface, rect)))
{
- WARN("Failed to initialize rectangle geometry, hr %#x.\n", hr);
+ WARN("Failed to initialise rectangle geometry, hr %#lx.\n", hr);
heap_free(object);
return hr;
}
@@ -181,7 +181,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateRoundedRectangleGeometry(ID2D
if (FAILED(hr = d2d_rounded_rectangle_geometry_init(object, (ID2D1Factory *)iface, rounded_rect)))
{
- WARN("Failed to initialize rounded rectangle geometry, hr %#x.\n", hr);
+ WARN("Failed to initialise rounded rectangle geometry, hr %#lx.\n", hr);
heap_free(object);
return hr;
}
@@ -205,7 +205,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateEllipseGeometry(ID2D1Factory2
if (FAILED(hr = d2d_ellipse_geometry_init(object, (ID2D1Factory *)iface, ellipse)))
{
- WARN("Failed to initialize ellipse geometry, hr %#x.\n", hr);
+ WARN("Failed to initialise ellipse geometry, hr %#lx.\n", hr);
heap_free(object);
return hr;
}
@@ -230,7 +230,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateGeometryGroup(ID2D1Factory2 *
if (FAILED(hr = d2d_geometry_group_init(object, (ID2D1Factory *)iface, fill_mode, geometries, geometry_count)))
{
- WARN("Failed to initialize geometry group, hr %#x.\n", hr);
+ WARN("Failed to initialise geometry group, hr %#lx.\n", hr);
heap_free(object);
return hr;
}
@@ -303,7 +303,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateStrokeStyle(ID2D1Factory2 *if
if (FAILED(hr = d2d_stroke_style_init(object, (ID2D1Factory *)iface, &desc1, dashes, dash_count)))
{
- WARN("Failed to initialize stroke style, hr %#x.\n", hr);
+ WARN("Failed to initialise stroke style, hr %#lx.\n", hr);
heap_free(object);
return hr;
}
@@ -348,7 +348,7 @@ static HRESULT d2d_factory_get_device(struct d2d_factory *factory, ID3D10Device1
if (!factory->device && FAILED(hr = D3D10CreateDevice1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, D3D10_CREATE_DEVICE_BGRA_SUPPORT,
D3D10_FEATURE_LEVEL_10_0, D3D10_1_SDK_VERSION, &factory->device)))
- WARN("Failed to create device, hr %#x.\n", hr);
+ WARN("Failed to create device, hr %#lx.\n", hr);
*device = factory->device;
return hr;
@@ -375,7 +375,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateWicBitmapRenderTarget(ID2D1Fa
if (FAILED(hr = d2d_wic_render_target_init(object, (ID2D1Factory1 *)iface, device, target, desc)))
{
- WARN("Failed to initialize render target, hr %#x.\n", hr);
+ WARN("Failed to initialise render target, hr %#lx.\n", hr);
heap_free(object);
return hr;
}
@@ -405,7 +405,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateHwndRenderTarget(ID2D1Factory
if (FAILED(hr = d2d_hwnd_render_target_init(object, (ID2D1Factory1 *)iface, device, desc, hwnd_rt_desc)))
{
- WARN("Failed to initialize render target, hr %#x.\n", hr);
+ WARN("Failed to initialise render target, hr %#lx.\n", hr);
heap_free(object);
return hr;
}
@@ -427,7 +427,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDxgiSurfaceRenderTarget(ID2D1
if (FAILED(hr = IDXGISurface_GetDevice(surface, &IID_IDXGIDevice, (void **)&dxgi_device)))
{
- WARN("Failed to get DXGI device, hr %#x.\n", hr);
+ WARN("Failed to get DXGI device, hr %#lx.\n", hr);
return hr;
}
@@ -435,7 +435,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDxgiSurfaceRenderTarget(ID2D1
IDXGIDevice_Release(dxgi_device);
if (FAILED(hr))
{
- WARN("Failed to create D2D device, hr %#x.\n", hr);
+ WARN("Failed to create D2D device, hr %#lx.\n", hr);
return hr;
}
@@ -462,7 +462,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDCRenderTarget(ID2D1Factory2
if (FAILED(hr = d2d_dc_render_target_init(object, (ID2D1Factory1 *)iface, device, desc)))
{
- WARN("Failed to initialize render target, hr %#x.\n", hr);
+ WARN("Failed to initialise render target, hr %#lx.\n", hr);
heap_free(object);
return hr;
}
@@ -507,7 +507,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateStrokeStyle1(ID2D1Factory2 *i
if (FAILED(hr = d2d_stroke_style_init(object, (ID2D1Factory *)iface,
desc, dashes, dash_count)))
{
- WARN("Failed to initialize stroke style, hr %#x.\n", hr);
+ WARN("Failed to initialise stroke style, hr %#lx.\n", hr);
heap_free(object);
return hr;
}
diff --git a/dlls/d2d1/geometry.c b/dlls/d2d1/geometry.c
index 46bfd488a7b..7f02a63f284 100644
--- a/dlls/d2d1/geometry.c
+++ b/dlls/d2d1/geometry.c
@@ -3384,7 +3384,7 @@ static ULONG STDMETHODCALLTYPE d2d_path_geometry_AddRef(ID2D1PathGeometry *iface
struct d2d_geometry *geometry = impl_from_ID2D1PathGeometry(iface);
ULONG refcount = InterlockedIncrement(&geometry->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount);
+ TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount;
}
@@ -3394,7 +3394,7 @@ static ULONG STDMETHODCALLTYPE d2d_path_geometry_Release(ID2D1PathGeometry *ifac
struct d2d_geometry *geometry = impl_from_ID2D1PathGeometry(iface);
ULONG refcount = InterlockedDecrement(&geometry->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount);
+ TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount)
{
@@ -3974,7 +3974,7 @@ static ULONG STDMETHODCALLTYPE d2d_ellipse_geometry_AddRef(ID2D1EllipseGeometry
struct d2d_geometry *geometry = impl_from_ID2D1EllipseGeometry(iface);
ULONG refcount = InterlockedIncrement(&geometry->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount);
+ TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount;
}
@@ -3984,7 +3984,7 @@ static ULONG STDMETHODCALLTYPE d2d_ellipse_geometry_Release(ID2D1EllipseGeometry
struct d2d_geometry *geometry = impl_from_ID2D1EllipseGeometry(iface);
ULONG refcount = InterlockedDecrement(&geometry->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount);
+ TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount)
{
@@ -4246,7 +4246,7 @@ static ULONG STDMETHODCALLTYPE d2d_rectangle_geometry_AddRef(ID2D1RectangleGeome
struct d2d_geometry *geometry = impl_from_ID2D1RectangleGeometry(iface);
ULONG refcount = InterlockedIncrement(&geometry->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount);
+ TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount;
}
@@ -4256,7 +4256,7 @@ static ULONG STDMETHODCALLTYPE d2d_rectangle_geometry_Release(ID2D1RectangleGeom
struct d2d_geometry *geometry = impl_from_ID2D1RectangleGeometry(iface);
ULONG refcount = InterlockedDecrement(&geometry->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount);
+ TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount)
{
@@ -4662,7 +4662,7 @@ static ULONG STDMETHODCALLTYPE d2d_rounded_rectangle_geometry_AddRef(ID2D1Rounde
struct d2d_geometry *geometry = impl_from_ID2D1RoundedRectangleGeometry(iface);
ULONG refcount = InterlockedIncrement(&geometry->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount);
+ TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount;
}
@@ -4672,7 +4672,7 @@ static ULONG STDMETHODCALLTYPE d2d_rounded_rectangle_geometry_Release(ID2D1Round
struct d2d_geometry *geometry = impl_from_ID2D1RoundedRectangleGeometry(iface);
ULONG refcount = InterlockedDecrement(&geometry->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount);
+ TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount)
{
@@ -4958,7 +4958,7 @@ static ULONG STDMETHODCALLTYPE d2d_transformed_geometry_AddRef(ID2D1TransformedG
struct d2d_geometry *geometry = impl_from_ID2D1TransformedGeometry(iface);
ULONG refcount = InterlockedIncrement(&geometry->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount);
+ TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount;
}
@@ -4968,7 +4968,7 @@ static ULONG STDMETHODCALLTYPE d2d_transformed_geometry_Release(ID2D1Transformed
struct d2d_geometry *geometry = impl_from_ID2D1TransformedGeometry(iface);
ULONG refcount = InterlockedDecrement(&geometry->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount);
+ TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount)
{
@@ -5238,7 +5238,7 @@ static ULONG STDMETHODCALLTYPE d2d_geometry_group_AddRef(ID2D1GeometryGroup *ifa
struct d2d_geometry *geometry = impl_from_ID2D1GeometryGroup(iface);
ULONG refcount = InterlockedIncrement(&geometry->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount);
+ TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount;
}
@@ -5249,7 +5249,7 @@ static ULONG STDMETHODCALLTYPE d2d_geometry_group_Release(ID2D1GeometryGroup *if
ULONG refcount = InterlockedDecrement(&geometry->refcount);
unsigned int i;
- TRACE("%p decreasing refcount to %u.\n", iface, refcount);
+ TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount)
{
diff --git a/dlls/d2d1/hwnd_render_target.c b/dlls/d2d1/hwnd_render_target.c
index 625f101eaa7..4ce220bf433 100644
--- a/dlls/d2d1/hwnd_render_target.c
+++ b/dlls/d2d1/hwnd_render_target.c
@@ -32,7 +32,7 @@ static HRESULT d2d_hwnd_render_target_present(IUnknown *outer_unknown)
HRESULT hr;
if (FAILED(hr = IDXGISwapChain_Present(render_target->swapchain, render_target->sync_interval, 0)))
- WARN("Present failed, %#x.\n", hr);
+ WARN("Present failed, %#lx.\n", hr);
return S_OK;
}
@@ -67,7 +67,7 @@ static ULONG STDMETHODCALLTYPE d2d_hwnd_render_target_AddRef(ID2D1HwndRenderTarg
struct d2d_hwnd_render_target *render_target = impl_from_ID2D1HwndRenderTarget(iface);
ULONG refcount = InterlockedIncrement(&render_target->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount);
+ TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount;
}
@@ -77,7 +77,7 @@ static ULONG STDMETHODCALLTYPE d2d_hwnd_render_target_Release(ID2D1HwndRenderTar
struct d2d_hwnd_render_target *render_target = impl_from_ID2D1HwndRenderTarget(iface);
ULONG refcount = InterlockedDecrement(&render_target->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount);
+ TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount)
{
@@ -687,7 +687,7 @@ static HRESULT STDMETHODCALLTYPE d2d_hwnd_render_target_Resize(ID2D1HwndRenderTa
if (FAILED(hr = IDXGISwapChain_GetBuffer(render_target->swapchain, 0, &IID_IDXGISurface1,
(void **)&dxgi_surface)))
{
- WARN("Failed to get buffer, hr %#x.\n", hr);
+ WARN("Failed to get buffer, hr %#lx.\n", hr);
ID2D1DeviceContext_Release(context);
return hr;
}
@@ -696,7 +696,7 @@ static HRESULT STDMETHODCALLTYPE d2d_hwnd_render_target_Resize(ID2D1HwndRenderTa
IDXGISurface1_Release(dxgi_surface);
if (FAILED(hr))
{
- WARN("Failed to create target bitmap, hr %#x.\n", hr);
+ WARN("Failed to create target bitmap, hr %#lx.\n", hr);
ID2D1DeviceContext_Release(context);
return hr;
}
@@ -810,7 +810,7 @@ HRESULT d2d_hwnd_render_target_init(struct d2d_hwnd_render_target *render_target
if (FAILED(hr = ID3D10Device1_QueryInterface(d3d_device, &IID_IDXGIDevice, (void **)&dxgi_device)))
{
- WARN("Failed to get IDXGIDevice interface, hr %#x.\n", hr);
+ WARN("Failed to get IDXGIDevice interface, hr %#lx.\n", hr);
return hr;
}
@@ -818,7 +818,7 @@ HRESULT d2d_hwnd_render_target_init(struct d2d_hwnd_render_target *render_target
IDXGIDevice_Release(dxgi_device);
if (FAILED(hr))
{
- WARN("Failed to get IDXGIAdapter interface, hr %#x.\n", hr);
+ WARN("Failed to get IDXGIAdapter interface, hr %#lx.\n", hr);
return hr;
}
@@ -826,7 +826,7 @@ HRESULT d2d_hwnd_render_target_init(struct d2d_hwnd_render_target *render_target
IDXGIAdapter_Release(dxgi_adapter);
if (FAILED(hr))
{
- WARN("Failed to get IDXGIFactory interface, hr %#x.\n", hr);
+ WARN("Failed to get IDXGIFactory interface, hr %#lx.\n", hr);
return hr;
}
@@ -861,13 +861,13 @@ HRESULT d2d_hwnd_render_target_init(struct d2d_hwnd_render_target *render_target
IDXGIFactory_Release(dxgi_factory);
if (FAILED(hr))
{
- WARN("Failed to create a swapchain, hr %#x.\n", hr);
+ WARN("Failed to create a swapchain, hr %#lx.\n", hr);
return hr;
}
if (FAILED(hr = IDXGISwapChain_GetBuffer(render_target->swapchain, 0, &IID_IDXGISurface, (void **)&dxgi_surface)))
{
- WARN("Failed to get buffer, hr %#x.\n", hr);
+ WARN("Failed to get buffer, hr %#lx.\n", hr);
IDXGISwapChain_Release(render_target->swapchain);
return hr;
}
@@ -876,7 +876,7 @@ HRESULT d2d_hwnd_render_target_init(struct d2d_hwnd_render_target *render_target
if (FAILED(hr = IDXGISurface_GetDevice(dxgi_surface, &IID_IDXGIDevice, (void **)&dxgi_device)))
{
- WARN("Failed to get DXGI device, hr %#X.\n", hr);
+ WARN("Failed to get DXGI device, hr %#lx.\n", hr);
IDXGISurface_Release(dxgi_surface);
IDXGISwapChain_Release(render_target->swapchain);
return hr;
@@ -886,7 +886,7 @@ HRESULT d2d_hwnd_render_target_init(struct d2d_hwnd_render_target *render_target
IDXGIDevice_Release(dxgi_device);
if (FAILED(hr))
{
- WARN("Failed to create D2D device, hr %#X.\n", hr);
+ WARN("Failed to create D2D device, hr %#lx.\n", hr);
IDXGISurface_Release(dxgi_surface);
IDXGISwapChain_Release(render_target->swapchain);
return hr;
@@ -899,7 +899,7 @@ HRESULT d2d_hwnd_render_target_init(struct d2d_hwnd_render_target *render_target
ID2D1Device_Release(device);
if (FAILED(hr))
{
- WARN("Failed to create DXGI surface render target, hr %#x.\n", hr);
+ WARN("Failed to create DXGI surface render target, hr %#lx.\n", hr);
IDXGISwapChain_Release(render_target->swapchain);
return hr;
}
@@ -907,7 +907,7 @@ HRESULT d2d_hwnd_render_target_init(struct d2d_hwnd_render_target *render_target
if (FAILED(hr = IUnknown_QueryInterface(render_target->dxgi_inner,
&IID_ID2D1RenderTarget, (void **)&render_target->dxgi_target)))
{
- WARN("Failed to retrieve ID2D1RenderTarget interface, hr %#x.\n", hr);
+ WARN("Failed to retrieve ID2D1RenderTarget interface, hr %#lx.\n", hr);
IUnknown_Release(render_target->dxgi_inner);
IDXGISwapChain_Release(render_target->swapchain);
return hr;
diff --git a/dlls/d2d1/layer.c b/dlls/d2d1/layer.c
index 3eb2f3695d3..a7d7877dbb8 100644
--- a/dlls/d2d1/layer.c
+++ b/dlls/d2d1/layer.c
@@ -49,7 +49,7 @@ static ULONG STDMETHODCALLTYPE d2d_layer_AddRef(ID2D1Layer *iface)
struct d2d_layer *layer = impl_from_ID2D1Layer(iface);
ULONG refcount = InterlockedIncrement(&layer->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount);
+ TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount;
}
@@ -59,7 +59,7 @@ static ULONG STDMETHODCALLTYPE d2d_layer_Release(ID2D1Layer *iface)
struct d2d_layer *layer = impl_from_ID2D1Layer(iface);
ULONG refcount = InterlockedDecrement(&layer->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount);
+ TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount)
{
diff --git a/dlls/d2d1/mesh.c b/dlls/d2d1/mesh.c
index 1e64a0ea165..4108399ad5b 100644
--- a/dlls/d2d1/mesh.c
+++ b/dlls/d2d1/mesh.c
@@ -49,7 +49,7 @@ static ULONG STDMETHODCALLTYPE d2d_mesh_AddRef(ID2D1Mesh *iface)
struct d2d_mesh *mesh = impl_from_ID2D1Mesh(iface);
ULONG refcount = InterlockedIncrement(&mesh->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount);
+ TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount;
}
@@ -59,7 +59,7 @@ static ULONG STDMETHODCALLTYPE d2d_mesh_Release(ID2D1Mesh *iface)
struct d2d_mesh *mesh = impl_from_ID2D1Mesh(iface);
ULONG refcount = InterlockedDecrement(&mesh->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount);
+ TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount)
{
diff --git a/dlls/d2d1/state_block.c b/dlls/d2d1/state_block.c
index 501d94ae3ee..114a3efd883 100644
--- a/dlls/d2d1/state_block.c
+++ b/dlls/d2d1/state_block.c
@@ -50,7 +50,7 @@ static ULONG STDMETHODCALLTYPE d2d_state_block_AddRef(ID2D1DrawingStateBlock1 *i
struct d2d_state_block *state_block = impl_from_ID2D1DrawingStateBlock1(iface);
ULONG refcount = InterlockedIncrement(&state_block->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount);
+ TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount;
}
@@ -60,7 +60,7 @@ static ULONG STDMETHODCALLTYPE d2d_state_block_Release(ID2D1DrawingStateBlock1 *
struct d2d_state_block *state_block = impl_from_ID2D1DrawingStateBlock1(iface);
ULONG refcount = InterlockedDecrement(&state_block->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount);
+ TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount)
{
diff --git a/dlls/d2d1/stroke.c b/dlls/d2d1/stroke.c
index da412540753..30ce2bf5660 100644
--- a/dlls/d2d1/stroke.c
+++ b/dlls/d2d1/stroke.c
@@ -49,7 +49,7 @@ static ULONG STDMETHODCALLTYPE d2d_stroke_style_AddRef(ID2D1StrokeStyle1 *iface)
struct d2d_stroke_style *style = impl_from_ID2D1StrokeStyle1(iface);
ULONG refcount = InterlockedIncrement(&style->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount);
+ TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount;
}
@@ -59,7 +59,7 @@ static ULONG STDMETHODCALLTYPE d2d_stroke_style_Release(ID2D1StrokeStyle1 *iface
struct d2d_stroke_style *style = impl_from_ID2D1StrokeStyle1(iface);
ULONG refcount = InterlockedDecrement(&style->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount);
+ TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount)
{
diff --git a/dlls/d2d1/wic_render_target.c b/dlls/d2d1/wic_render_target.c
index 9b57a5d2c34..f750a58a647 100644
--- a/dlls/d2d1/wic_render_target.c
+++ b/dlls/d2d1/wic_render_target.c
@@ -43,7 +43,7 @@ static HRESULT d2d_wic_render_target_present(IUnknown *outer_unknown)
if (FAILED(hr = IDXGISurface_QueryInterface(render_target->dxgi_surface,
&IID_ID3D10Resource, (void **)&src_resource)))
{
- ERR("Failed to get source resource interface, hr %#x.\n", hr);
+ ERR("Failed to get source resource interface, hr %#lx.\n", hr);
goto end;
}
@@ -58,27 +58,27 @@ static HRESULT d2d_wic_render_target_present(IUnknown *outer_unknown)
dst_rect.Height = render_target->height;
if (FAILED(hr = IWICBitmap_Lock(render_target->bitmap, &dst_rect, WICBitmapLockWrite, &bitmap_lock)))
{
- ERR("Failed to lock destination bitmap, hr %#x.\n", hr);
+ ERR("Failed to lock destination bitmap, hr %#lx.\n", hr);
goto end;
}
if (FAILED(hr = IWICBitmapLock_GetDataPointer(bitmap_lock, &dst_size, &dst)))
{
- ERR("Failed to get data pointer, hr %#x.\n", hr);
+ ERR("Failed to get data pointer, hr %#lx.\n", hr);
IWICBitmapLock_Release(bitmap_lock);
goto end;
}
if (FAILED(hr = IWICBitmapLock_GetStride(bitmap_lock, &dst_pitch)))
{
- ERR("Failed to get stride, hr %#x.\n", hr);
+ ERR("Failed to get stride, hr %#lx.\n", hr);
IWICBitmapLock_Release(bitmap_lock);
goto end;
}
if (FAILED(hr = ID3D10Texture2D_Map(render_target->readback_texture, 0, D3D10_MAP_READ, 0, &mapped_texture)))
{
- ERR("Failed to map readback texture, hr %#x.\n", hr);
+ ERR("Failed to map readback texture, hr %#lx.\n", hr);
IWICBitmapLock_Release(bitmap_lock);
goto end;
}
@@ -113,7 +113,7 @@ static ULONG STDMETHODCALLTYPE d2d_wic_render_target_AddRef(IUnknown *iface)
struct d2d_wic_render_target *render_target = impl_from_IUnknown(iface);
ULONG refcount = InterlockedIncrement(&render_target->refcount);
- TRACE("%p increasing refcount to %u.\n", iface, refcount);
+ TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount;
}
@@ -123,7 +123,7 @@ static ULONG STDMETHODCALLTYPE d2d_wic_render_target_Release(IUnknown *iface)
struct d2d_wic_render_target *render_target = impl_from_IUnknown(iface);
ULONG refcount = InterlockedDecrement(&render_target->refcount);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount);
+ TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount)
{
@@ -162,7 +162,7 @@ HRESULT d2d_wic_render_target_init(struct d2d_wic_render_target *render_target,
if (FAILED(hr = IWICBitmap_GetSize(bitmap, &render_target->width, &render_target->height)))
{
- WARN("Failed to get bitmap dimensions, hr %#x.\n", hr);
+ WARN("Failed to get bitmap dimensions, hr %#lx.\n", hr);
return hr;
}
@@ -178,7 +178,7 @@ HRESULT d2d_wic_render_target_init(struct d2d_wic_render_target *render_target,
if (FAILED(hr = IWICBitmap_GetPixelFormat(bitmap, &bitmap_format)))
{
- WARN("Failed to get bitmap format, hr %#x.\n", hr);
+ WARN("Failed to get bitmap format, hr %#lx.\n", hr);
return hr;
}
@@ -215,7 +215,7 @@ HRESULT d2d_wic_render_target_init(struct d2d_wic_render_target *render_target,
if (FAILED(hr = ID3D10Device1_CreateTexture2D(d3d_device, &texture_desc, NULL, &texture)))
{
- WARN("Failed to create texture, hr %#x.\n", hr);
+ WARN("Failed to create texture, hr %#lx.\n", hr);
return hr;
}
@@ -223,7 +223,7 @@ HRESULT d2d_wic_render_target_init(struct d2d_wic_render_target *render_target,
ID3D10Texture2D_Release(texture);
if (FAILED(hr))
{
- WARN("Failed to get DXGI surface interface, hr %#x.\n", hr);
+ WARN("Failed to get DXGI surface interface, hr %#lx.\n", hr);
return hr;
}
@@ -234,14 +234,14 @@ HRESULT d2d_wic_render_target_init(struct d2d_wic_render_target *render_target,
if (FAILED(hr = ID3D10Device1_CreateTexture2D(d3d_device, &texture_desc, NULL, &render_target->readback_texture)))
{
- WARN("Failed to create readback texture, hr %#x.\n", hr);
+ WARN("Failed to create readback texture, hr %#lx.\n", hr);
IDXGISurface_Release(render_target->dxgi_surface);
return hr;
}
if (FAILED(hr = ID3D10Device1_QueryInterface(d3d_device, &IID_IDXGIDevice, (void **)&dxgi_device)))
{
- WARN("Failed to get DXGI device, hr %#x.\n", hr);
+ WARN("Failed to get DXGI device, hr %#lx.\n", hr);
IDXGISurface_Release(render_target->dxgi_surface);
return hr;
}
@@ -250,7 +250,7 @@ HRESULT d2d_wic_render_target_init(struct d2d_wic_render_target *render_target,
IDXGIDevice_Release(dxgi_device);
if (FAILED(hr))
{
- WARN("Failed to create D2D device, hr %#x.\n", hr);
+ WARN("Failed to create D2D device, hr %#lx.\n", hr);
IDXGISurface_Release(render_target->dxgi_surface);
return hr;
}
@@ -260,7 +260,7 @@ HRESULT d2d_wic_render_target_init(struct d2d_wic_render_target *render_target,
ID2D1Device_Release(device);
if (FAILED(hr))
{
- WARN("Failed to create DXGI surface render target, hr %#x.\n", hr);
+ WARN("Failed to create DXGI surface render target, hr %#lx.\n", hr);
ID3D10Texture2D_Release(render_target->readback_texture);
IDXGISurface_Release(render_target->dxgi_surface);
return hr;
@@ -269,7 +269,7 @@ HRESULT d2d_wic_render_target_init(struct d2d_wic_render_target *render_target,
if (FAILED(hr = IUnknown_QueryInterface(render_target->dxgi_inner,
&IID_ID2D1RenderTarget, (void **)&render_target->dxgi_target)))
{
- WARN("Failed to retrieve ID2D1RenderTarget interface, hr %#x.\n", hr);
+ WARN("Failed to retrieve ID2D1RenderTarget interface, hr %#lx.\n", hr);
IUnknown_Release(render_target->dxgi_inner);
ID3D10Texture2D_Release(render_target->readback_texture);
IDXGISurface_Release(render_target->dxgi_surface);
--
2.30.2
1
0
Feb. 1, 2022
To allow building without -DWINE_NO_LONG_TYPES.
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/d2d1/d2d1_private.h | 2 ++
dlls/d2d1/factory.c | 11 ++++++-----
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/dlls/d2d1/d2d1_private.h b/dlls/d2d1/d2d1_private.h
index de5e986f7f2..aaf6d045c73 100644
--- a/dlls/d2d1/d2d1_private.h
+++ b/dlls/d2d1/d2d1_private.h
@@ -24,6 +24,8 @@
#include <assert.h>
#include <limits.h>
+#include <stdint.h>
+#include <stdbool.h>
#include <math.h>
#define COBJMACROS
#include "d2d1_2.h"
diff --git a/dlls/d2d1/factory.c b/dlls/d2d1/factory.c
index 7ddd6bbc87c..1f8b3f5848b 100644
--- a/dlls/d2d1/factory.c
+++ b/dlls/d2d1/factory.c
@@ -937,9 +937,10 @@ D2D1_COLOR_F WINAPI D2D1ConvertColorSpace(D2D1_COLOR_SPACE src_colour_space,
return ret;
}
-static BOOL get_config_key_dword(HKEY default_key, HKEY application_key, const char *name, DWORD *value)
+static bool get_config_key_u32(HKEY default_key, HKEY application_key, const char *name, uint32_t *value)
{
- DWORD type, data, size;
+ DWORD type, size;
+ uint32_t data;
size = sizeof(data);
if (application_key && !RegQueryValueExA(application_key,
@@ -951,11 +952,11 @@ static BOOL get_config_key_dword(HKEY default_key, HKEY application_key, const c
name, 0, &type, (BYTE *)&data, &size) && type == REG_DWORD)
goto success;
- return FALSE;
+ return false;
success:
*value = data;
- return TRUE;
+ return true;
}
static void d2d_settings_init(void)
@@ -989,7 +990,7 @@ static void d2d_settings_init(void)
if (!default_key && !application_key)
return;
- if (get_config_key_dword(default_key, application_key, "max_version_factory", &d2d_settings.max_version_factory))
+ if (get_config_key_u32(default_key, application_key, "max_version_factory", &d2d_settings.max_version_factory))
ERR_(winediag)("Limiting maximum Direct2D factory version to %#x.\n", d2d_settings.max_version_factory);
if (application_key)
--
2.30.2
1
0