Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
January 2022
- 86 participants
- 2418 messages
[PATCH 05/14] dlls/devenum: use correct integral type
by Eric Pouech
Note: I voluntarly used 'unsigned long' and not ULONG as SDK and MSDN
state that unsigned long is the type to be used in the API.
Even if Wine's headers declare the prototype with ULONG instead.
Wine's headers are potentially to be fixed accordingly.
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/devenum/mediacatenum.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/devenum/mediacatenum.c b/dlls/devenum/mediacatenum.c
index 9d8069a3aa2..b1f81ec8476 100644
--- a/dlls/devenum/mediacatenum.c
+++ b/dlls/devenum/mediacatenum.c
@@ -137,7 +137,8 @@ static HRESULT WINAPI property_bag_Read(IPropertyBag *iface,
}
else if (!wcscmp(name, L"FilterData"))
{
- unsigned int count = 1, input_count, output_count, i;
+ unsigned int count = 1, i;
+ unsigned long input_count, output_count;
DMO_PARTIAL_MEDIATYPE *types = NULL, *new_array;
REGFILTERPINS2 reg_pins[2] = {{0}};
REGFILTER2 reg_filter = {0};
Jan. 31, 2022
[PATCH 04/14] dlls/dbgeng: use correct integral type
by Eric Pouech
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/dbgeng/dbgeng.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/dbgeng/dbgeng.c b/dlls/dbgeng/dbgeng.c
index 014f723981b..5ffde0e3c80 100644
--- a/dlls/dbgeng/dbgeng.c
+++ b/dlls/dbgeng/dbgeng.c
@@ -81,7 +81,7 @@ static struct target_process *debug_client_get_target(struct debug_client *debug
}
static HRESULT debug_target_return_string(const char *str, char *buffer, unsigned int buffer_size,
- unsigned int *size)
+ ULONG *size)
{
unsigned int len = strlen(str), dst_len;
@@ -1877,7 +1877,8 @@ static HRESULT STDMETHODCALLTYPE debugsymbols_GetModuleVersionInformation(IDebug
struct target_process *target;
void *version_info, *ptr;
HRESULT hr = E_FAIL;
- DWORD handle, size;
+ DWORD handle;
+ UINT size;
TRACE("%p, %u, %s, %s, %p, %u, %p.\n", iface, index, wine_dbgstr_longlong(base), debugstr_a(item), buffer,
buffer_size, info_size);
Jan. 31, 2022
[PATCH 03/14] programs/winedbg: use correct integral type
by Eric Pouech
(* as width or precision specifier in printf requires an int not a long)
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
programs/winedbg/debugger.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/programs/winedbg/debugger.h b/programs/winedbg/debugger.h
index b676bc8d955..0cc2f8b7a6c 100644
--- a/programs/winedbg/debugger.h
+++ b/programs/winedbg/debugger.h
@@ -39,7 +39,7 @@
#include "oaidl.h"
#include <wine/list.h>
-#define ADDRSIZE (dbg_curr_process ? dbg_curr_process->be_cpu->pointer_size : (int)sizeof(void*))
+#define ADDRSIZE ((int)(dbg_curr_process ? dbg_curr_process->be_cpu->pointer_size : sizeof(void*)))
#define ADDRWIDTH (ADDRSIZE * 2)
/* the debugger uses these exceptions for its internal use */
Jan. 31, 2022
[PATCH 02/14] include/basestd.h: define HandleToU?Long return a long (as SDK does)
by Eric Pouech
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
include/basetsd.h | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/include/basetsd.h b/include/basetsd.h
index a46172403ef..329db66c8f0 100644
--- a/include/basetsd.h
+++ b/include/basetsd.h
@@ -153,16 +153,32 @@ typedef unsigned int UHALF_PTR, *PUHALF_PTR;
#if !defined(__midl) && !defined(__WIDL__)
-static inline ULONG32 HandleToULong(const void *h)
+#if !defined(__LP64__) && !defined(WINE_NO_LONG_TYPES)
+
+static inline unsigned long HandleToULong(const void *h)
+{
+ return (unsigned long)(ULONG_PTR)h;
+}
+
+static inline long HandleToLong(const void *h)
+{
+ return (long)(LONG_PTR)h;
+}
+
+#else
+
+static inline unsigned HandleToULong(const void *h)
{
- return (ULONG32)(ULONG_PTR)h;
+ return (unsigned)(ULONG_PTR)h;
}
-static inline LONG32 HandleToLong(const void *h)
+static inline int HandleToLong(const void *h)
{
- return (LONG32)(LONG_PTR)h;
+ return (int)(LONG_PTR)h;
}
+#endif /* !defined(__LP64__) && !defined(WINE_NO_LONG_TYPES) */
+
static inline void *ULongToHandle(ULONG32 ul)
{
return (void *)(ULONG_PTR)ul;
Jan. 31, 2022
[PATCH 01/14] include/msvcrt: add attribute((format)) to printf and scanf -like APIs
by Eric Pouech
fix a bunch of warnings generated by this patch and the migration of
GUID.Data1 to long in ae2693e2c4079edcc719c08abed5ad58ba7aace7
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/compobj.dll16/compobj.c | 2 -
dlls/crypt32/sip.c | 2 -
dlls/iphlpapi/iphlpapi_main.c | 2 -
dlls/iphlpapi/tests/iphlpapi.c | 4 +-
dlls/msdmo/tests/msdmo.c | 2 -
dlls/mshtml/main.c | 2 -
dlls/oleaut32/oleaut.c | 2 -
dlls/oleaut32/typelib.c | 2 -
dlls/rpcrt4/rpcrt4_main.c | 4 +-
dlls/shell32/classes.c | 2 -
dlls/shell32/debughlp.c | 2 -
dlls/shell32/shfldr.h | 2 -
dlls/shlwapi/ordinal.c | 2 -
dlls/typelib.dll16/typelib.c | 2 -
dlls/webservices/writer.c | 4 +-
include/msvcrt/corecrt.h | 8 ++++
include/msvcrt/crtdbg.h | 2 -
include/msvcrt/stdio.h | 90 +++++++++++++++++++++++++++-------------
programs/winetest/main.c | 2 -
19 files changed, 88 insertions(+), 50 deletions(-)
diff --git a/dlls/compobj.dll16/compobj.c b/dlls/compobj.dll16/compobj.c
index a634ebe6374..831d62d25ee 100644
--- a/dlls/compobj.dll16/compobj.c
+++ b/dlls/compobj.dll16/compobj.c
@@ -657,7 +657,7 @@ HRESULT WINAPI CLSIDFromProgID16(LPCOLESTR16 progid, LPCLSID riid)
*/
INT16 WINAPI StringFromGUID216(REFGUID id, char *str, INT16 cmax)
{
- static const char format[] = "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}";
+ static const char format[] = "{%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}";
if (!id || cmax < CHARS_IN_GUID) return 0;
sprintf( str, format, id->Data1, id->Data2, id->Data3,
id->Data4[0], id->Data4[1], id->Data4[2], id->Data4[3],
diff --git a/dlls/crypt32/sip.c b/dlls/crypt32/sip.c
index 3642e94e799..82eb87c16bf 100644
--- a/dlls/crypt32/sip.c
+++ b/dlls/crypt32/sip.c
@@ -40,7 +40,7 @@ static void CRYPT_guid2wstr( const GUID *guid, LPWSTR wstr )
{
char str[40];
- sprintf(str, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
+ sprintf(str, "{%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
guid->Data1, guid->Data2, guid->Data3,
guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3],
guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7] );
diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c
index 387589cc03d..f96a5dc5fd1 100644
--- a/dlls/iphlpapi/iphlpapi_main.c
+++ b/dlls/iphlpapi/iphlpapi_main.c
@@ -59,7 +59,7 @@ static const NPI_MODULEID *ip_module_id( USHORT family )
DWORD WINAPI ConvertGuidToStringA( const GUID *guid, char *str, DWORD len )
{
if (len < CHARS_IN_GUID) return ERROR_INSUFFICIENT_BUFFER;
- sprintf( str, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
+ sprintf( str, "{%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
guid->Data1, guid->Data2, guid->Data3, guid->Data4[0], guid->Data4[1], guid->Data4[2],
guid->Data4[3], guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7] );
return ERROR_SUCCESS;
diff --git a/dlls/iphlpapi/tests/iphlpapi.c b/dlls/iphlpapi/tests/iphlpapi.c
index c725730c063..be50cc0b476 100644
--- a/dlls/iphlpapi/tests/iphlpapi.c
+++ b/dlls/iphlpapi/tests/iphlpapi.c
@@ -1409,7 +1409,7 @@ static void testGetAdaptersInfo(void)
GetIfEntry( &row );
ConvertInterfaceIndexToLuid( ptr->Index, &luid );
ConvertInterfaceLuidToGuid( &luid, &guid );
- sprintf( name, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
+ sprintf( name, "{%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
guid.Data1, guid.Data2, guid.Data3, guid.Data4[0], guid.Data4[1],
guid.Data4[2], guid.Data4[3], guid.Data4[4], guid.Data4[5],
guid.Data4[6], guid.Data4[7] );
@@ -1671,7 +1671,7 @@ static void test_GetAdaptersAddresses(void)
status = ConvertInterfaceLuidToGuid(&aa->Luid, &guid);
ok(!status, "got %u\n", status);
- sprintf(buf, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
+ sprintf(buf, "{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
guid.Data1, guid.Data2, guid.Data3, guid.Data4[0], guid.Data4[1],
guid.Data4[2], guid.Data4[3], guid.Data4[4], guid.Data4[5],
guid.Data4[6], guid.Data4[7]);
diff --git a/dlls/msdmo/tests/msdmo.c b/dlls/msdmo/tests/msdmo.c
index 41e6d57d2eb..9b261d369fc 100644
--- a/dlls/msdmo/tests/msdmo.c
+++ b/dlls/msdmo/tests/msdmo.c
@@ -31,7 +31,7 @@ static const GUID GUID_wmp1 = {0x13a7995e,0x7d8f,0x45b4,{0x9c,0x77,0x81,0x92,0x6
static const char *guid_to_string(const GUID *guid)
{
static char buffer[50];
- sprintf(buffer, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
+ sprintf(buffer, "%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
guid->Data1, guid->Data2, guid->Data3,
guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3],
guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7]);
diff --git a/dlls/mshtml/main.c b/dlls/mshtml/main.c
index 959d2d66214..f2a255d265a 100644
--- a/dlls/mshtml/main.c
+++ b/dlls/mshtml/main.c
@@ -627,7 +627,7 @@ static HRESULT register_server(BOOL do_register)
for(i=0; i < ARRAY_SIZE(pse); i++) {
pse[i].pszValue = heap_alloc(39);
- sprintf(pse[i].pszValue, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
+ sprintf(pse[i].pszValue, "{%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
clsids[i]->Data1, clsids[i]->Data2, clsids[i]->Data3, clsids[i]->Data4[0],
clsids[i]->Data4[1], clsids[i]->Data4[2], clsids[i]->Data4[3], clsids[i]->Data4[4],
clsids[i]->Data4[5], clsids[i]->Data4[6], clsids[i]->Data4[7]);
diff --git a/dlls/oleaut32/oleaut.c b/dlls/oleaut32/oleaut.c
index 043face3459..c29e64a4091 100644
--- a/dlls/oleaut32/oleaut.c
+++ b/dlls/oleaut32/oleaut.c
@@ -832,7 +832,7 @@ static HRESULT reg_get_typelib_module(REFIID iid, WCHAR *module, DWORD len)
BOOL is_wow64;
HKEY ikey;
- sprintf( interfacekey, "Interface\\{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\\Typelib",
+ sprintf( interfacekey, "Interface\\{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\\Typelib",
iid->Data1, iid->Data2, iid->Data3,
iid->Data4[0], iid->Data4[1], iid->Data4[2], iid->Data4[3],
iid->Data4[4], iid->Data4[5], iid->Data4[6], iid->Data4[7]
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index 97b6786feff..7dcc8d815a3 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -3660,7 +3660,7 @@ static BOOL TLB_GUIDFromString(const char *str, GUID *guid)
int i;
short s;
- if(sscanf(str, "%x-%hx-%hx-%hx", &guid->Data1, &guid->Data2, &guid->Data3, &s) != 4) {
+ if(sscanf(str, "%lx-%hx-%hx-%hx", &guid->Data1, &guid->Data2, &guid->Data3, &s) != 4) {
FIXME("Can't parse guid %s\n", debugstr_guid(guid));
return FALSE;
}
diff --git a/dlls/rpcrt4/rpcrt4_main.c b/dlls/rpcrt4/rpcrt4_main.c
index d5ba8c82c05..a1848ef28e5 100644
--- a/dlls/rpcrt4/rpcrt4_main.c
+++ b/dlls/rpcrt4/rpcrt4_main.c
@@ -543,7 +543,7 @@ RPC_STATUS WINAPI UuidToStringA(UUID *Uuid, RPC_CSTR* StringUuid)
if (!Uuid) Uuid = &uuid_nil;
- sprintf( (char*)*StringUuid, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
+ sprintf( (char*)*StringUuid, "%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
Uuid->Data1, Uuid->Data2, Uuid->Data3,
Uuid->Data4[0], Uuid->Data4[1], Uuid->Data4[2],
Uuid->Data4[3], Uuid->Data4[4], Uuid->Data4[5],
@@ -566,7 +566,7 @@ RPC_STATUS WINAPI UuidToStringW(UUID *Uuid, RPC_WSTR* StringUuid)
if (!Uuid) Uuid = &uuid_nil;
- sprintf(buf, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
+ sprintf(buf, "%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
Uuid->Data1, Uuid->Data2, Uuid->Data3,
Uuid->Data4[0], Uuid->Data4[1], Uuid->Data4[2],
Uuid->Data4[3], Uuid->Data4[4], Uuid->Data4[5],
diff --git a/dlls/shell32/classes.c b/dlls/shell32/classes.c
index 84784733853..10870b70ab9 100644
--- a/dlls/shell32/classes.c
+++ b/dlls/shell32/classes.c
@@ -200,7 +200,7 @@ BOOL HCR_GetExecuteCommandW( HKEY hkeyClass, LPCWSTR szClass, LPCWSTR szVerb, LP
static BOOL HCR_RegOpenClassIDKey(REFIID riid, HKEY *hkey)
{
char xriid[50];
- sprintf( xriid, "CLSID\\{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
+ sprintf( xriid, "CLSID\\{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
riid->Data1, riid->Data2, riid->Data3,
riid->Data4[0], riid->Data4[1], riid->Data4[2], riid->Data4[3],
riid->Data4[4], riid->Data4[5], riid->Data4[6], riid->Data4[7] );
diff --git a/dlls/shell32/debughlp.c b/dlls/shell32/debughlp.c
index a7ae616923a..c988bab481b 100644
--- a/dlls/shell32/debughlp.c
+++ b/dlls/shell32/debughlp.c
@@ -247,7 +247,7 @@ void _dbg_ILSimpleGetText (LPCITEMIDLIST pidl, LPSTR szOut, UINT uOutSize)
else if (( riid = _dbg_ILGetGUIDPointer(pidl) ))
{
if (szOut)
- sprintf( szOut, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
+ sprintf( szOut, "{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
riid->Data1, riid->Data2, riid->Data3,
riid->Data4[0], riid->Data4[1], riid->Data4[2], riid->Data4[3],
riid->Data4[4], riid->Data4[5], riid->Data4[6], riid->Data4[7] );
diff --git a/dlls/shell32/shfldr.h b/dlls/shell32/shfldr.h
index e176d82de2f..163bf0517d3 100644
--- a/dlls/shell32/shfldr.h
+++ b/dlls/shell32/shfldr.h
@@ -61,7 +61,7 @@ BOOL trash_file( const WCHAR *path ) DECLSPEC_HIDDEN;
static inline int SHELL32_GUIDToStringA (REFGUID guid, LPSTR str)
{
- return sprintf(str, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
+ return sprintf(str, "{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
guid->Data1, guid->Data2, guid->Data3,
guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3],
guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7]);
diff --git a/dlls/shlwapi/ordinal.c b/dlls/shlwapi/ordinal.c
index bdd9da0c67b..e35ecd77644 100644
--- a/dlls/shlwapi/ordinal.c
+++ b/dlls/shlwapi/ordinal.c
@@ -461,7 +461,7 @@ INT WINAPI SHStringFromGUIDA(REFGUID guid, LPSTR lpszDest, INT cchMax)
TRACE("(%s,%p,%d)\n", debugstr_guid(guid), lpszDest, cchMax);
- sprintf(xguid, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
+ sprintf(xguid, "{%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
guid->Data1, guid->Data2, guid->Data3,
guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3],
guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7]);
diff --git a/dlls/typelib.dll16/typelib.c b/dlls/typelib.dll16/typelib.c
index 50354a51de2..4787010354c 100644
--- a/dlls/typelib.dll16/typelib.c
+++ b/dlls/typelib.dll16/typelib.c
@@ -82,7 +82,7 @@ QueryPathOfRegTypeLib16(
TRACE("\n");
if (HIWORD(guid)) {
- sprintf( typelibkey, "SOFTWARE\\Classes\\Typelib\\{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\\%d.%d\\%x\\win16",
+ sprintf( typelibkey, "SOFTWARE\\Classes\\Typelib\\{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\\%d.%d\\%x\\win16",
guid->Data1, guid->Data2, guid->Data3,
guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3],
guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7],
diff --git a/dlls/webservices/writer.c b/dlls/webservices/writer.c
index c9e443b0e80..044351f6094 100644
--- a/dlls/webservices/writer.c
+++ b/dlls/webservices/writer.c
@@ -1041,7 +1041,7 @@ static ULONG format_datetime( const WS_DATETIME *ptr, unsigned char *buf )
static ULONG format_guid( const GUID *ptr, unsigned char *buf )
{
- static const char fmt[] = "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x";
+ static const char fmt[] = "%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x";
return sprintf( (char *)buf, fmt, ptr->Data1, ptr->Data2, ptr->Data3,
ptr->Data4[0], ptr->Data4[1], ptr->Data4[2], ptr->Data4[3],
ptr->Data4[4], ptr->Data4[5], ptr->Data4[6], ptr->Data4[7] );
@@ -1049,7 +1049,7 @@ static ULONG format_guid( const GUID *ptr, unsigned char *buf )
static ULONG format_urn( const GUID *ptr, unsigned char *buf )
{
- static const char fmt[] = "urn:uuid:%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x";
+ static const char fmt[] = "urn:uuid:%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x";
return sprintf( (char *)buf, fmt, ptr->Data1, ptr->Data2, ptr->Data3,
ptr->Data4[0], ptr->Data4[1], ptr->Data4[2], ptr->Data4[3],
ptr->Data4[4], ptr->Data4[5], ptr->Data4[6], ptr->Data4[7] );
diff --git a/include/msvcrt/corecrt.h b/include/msvcrt/corecrt.h
index e61a22dccd7..aba9bc9422e 100644
--- a/include/msvcrt/corecrt.h
+++ b/include/msvcrt/corecrt.h
@@ -334,4 +334,12 @@ typedef struct threadlocaleinfostruct {
#define _THREADLOCALEINFO
#endif
+#if !defined(__WINE_USE_MSVCRT) || defined(__MINGW32__)
+#define __WINE_CRT_PRINTF_ATTR(fmt,args) __attribute__((format (printf,fmt,args)))
+#define __WINE_CRT_SCANF_ATTR(fmt,args) __attribute__((format (scanf,fmt,args)))
+#else
+#define __WINE_CRT_PRINTF_ATTR(fmt,args)
+#define __WINE_CRT_SCANF_ATTR(fmt,args)
+#endif
+
#endif /* __WINE_CORECRT_H */
diff --git a/include/msvcrt/crtdbg.h b/include/msvcrt/crtdbg.h
index dc56eb883f5..a8cf739cc53 100644
--- a/include/msvcrt/crtdbg.h
+++ b/include/msvcrt/crtdbg.h
@@ -88,7 +88,7 @@ extern int _crtDbgFlag;
_ACRTIMP int __cdecl _CrtCheckMemory(void);
_ACRTIMP int WINAPIV _CrtDbgReport(int reportType, const char *filename, int linenumber,
- const char *moduleName, const char *format, ...);
+ const char *moduleName, const char *format, ...) __WINE_CRT_PRINTF_ATTR(5, 6);
_ACRTIMP int __cdecl _CrtDumpMemoryLeaks(void);
_ACRTIMP int __cdecl _CrtSetBreakAlloc(int);
_ACRTIMP int __cdecl _CrtSetDbgFlag(int);
diff --git a/include/msvcrt/stdio.h b/include/msvcrt/stdio.h
index daefcd03a74..e53929b94bc 100644
--- a/include/msvcrt/stdio.h
+++ b/include/msvcrt/stdio.h
@@ -161,6 +161,7 @@ _ACRTIMP int __cdecl __stdio_common_vsscanf(unsigned __int64,char const*,size_t,
#if defined(_UCRT) && !defined(_NO_CRT_STDIO_INLINE)
+static inline int __cdecl vsnprintf(char *buffer, size_t size, const char *format, va_list args) __WINE_CRT_PRINTF_ATTR(3, 0);
static inline int __cdecl vsnprintf(char *buffer, size_t size, const char *format, va_list args)
{
int ret = __stdio_common_vsprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR,
@@ -168,6 +169,7 @@ static inline int __cdecl vsnprintf(char *buffer, size_t size, const char *forma
return ret < 0 ? -1 : ret;
}
+static inline int __cdecl _vsnprintf(char *buffer, size_t size, const char *format, va_list args) __WINE_CRT_PRINTF_ATTR(3, 0);
static inline int __cdecl _vsnprintf(char *buffer, size_t size, const char *format, va_list args)
{
int ret = __stdio_common_vsprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION,
@@ -175,12 +177,14 @@ static inline int __cdecl _vsnprintf(char *buffer, size_t size, const char *form
return ret < 0 ? -1 : ret;
}
+static inline int __cdecl _vsnprintf_s(char *buffer, size_t size, size_t count, const char *format, va_list args) __WINE_CRT_PRINTF_ATTR(4, 0);
static inline int __cdecl _vsnprintf_s(char *buffer, size_t size, size_t count, const char *format, va_list args)
{
int ret = __stdio_common_vsnprintf_s(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, buffer, size, count, format, NULL, args);
return ret < 0 ? -1 : ret;
}
+static inline int WINAPIV _snprintf_s(char *buffer, size_t size, size_t count, const char *format, ...) __WINE_CRT_PRINTF_ATTR(4, 5);
static inline int WINAPIV _snprintf_s(char *buffer, size_t size, size_t count, const char *format, ...)
{
int ret;
@@ -192,6 +196,7 @@ static inline int WINAPIV _snprintf_s(char *buffer, size_t size, size_t count, c
return ret;
}
+static inline int __cdecl _vscprintf(const char *format, va_list args) __WINE_CRT_PRINTF_ATTR(1, 0);
static inline int __cdecl _vscprintf(const char *format, va_list args)
{
int ret = __stdio_common_vsprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR,
@@ -199,6 +204,7 @@ static inline int __cdecl _vscprintf(const char *format, va_list args)
return ret < 0 ? -1 : ret;
}
+static inline int WINAPIV _scprintf(const char *format, ...) __WINE_CRT_PRINTF_ATTR(1, 2);
static inline int WINAPIV _scprintf(const char *format, ...)
{
int ret;
@@ -211,6 +217,7 @@ static inline int WINAPIV _scprintf(const char *format, ...)
return ret;
}
+static inline int __cdecl vsprintf(char *buffer, const char *format, va_list args) __WINE_CRT_PRINTF_ATTR(2, 0);
static inline int __cdecl vsprintf(char *buffer, const char *format, va_list args)
{
int ret = __stdio_common_vsprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION,
@@ -218,12 +225,14 @@ static inline int __cdecl vsprintf(char *buffer, const char *format, va_list arg
return ret < 0 ? -1 : ret;
}
+static inline int __cdecl vsprintf_s(char *buffer, size_t size, const char *format, va_list args) __WINE_CRT_PRINTF_ATTR(3, 0);
static inline int __cdecl vsprintf_s(char *buffer, size_t size, const char *format, va_list args)
{
int ret = __stdio_common_vsprintf_s(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, buffer, size, format, NULL, args);
return ret < 0 ? -1 : ret;
}
+static inline int WINAPIV sprintf_s(char *buffer, size_t size, const char *format, ...) __WINE_CRT_PRINTF_ATTR(3, 4);
static inline int WINAPIV sprintf_s(char *buffer, size_t size, const char *format, ...)
{
int ret;
@@ -235,17 +244,20 @@ static inline int WINAPIV sprintf_s(char *buffer, size_t size, const char *forma
return ret;
}
+static inline int __cdecl _vsprintf_p_l(char *buffer, size_t size, const char *format, _locale_t locale, va_list args) __WINE_CRT_PRINTF_ATTR(3, 0);
static inline int __cdecl _vsprintf_p_l(char *buffer, size_t size, const char *format, _locale_t locale, va_list args)
{
int ret = __stdio_common_vsprintf_p(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, buffer, size, format, locale, args);
return ret < 0 ? -1 : ret;
}
+static inline int __cdecl vfprintf(FILE *file, const char *format, va_list args) __WINE_CRT_PRINTF_ATTR(2, 0);
static inline int __cdecl vfprintf(FILE *file, const char *format, va_list args)
{
return __stdio_common_vfprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, file, format, NULL, args);
}
+static inline int WINAPIV fprintf(FILE *file, const char *format, ...) __WINE_CRT_PRINTF_ATTR(2, 3);
static inline int WINAPIV fprintf(FILE *file, const char *format, ...)
{
int ret;
@@ -257,11 +269,13 @@ static inline int WINAPIV fprintf(FILE *file, const char *format, ...)
return ret;
}
+static inline int __cdecl vfprintf_s(FILE *file, const char *format, va_list args) __WINE_CRT_PRINTF_ATTR(2, 0);
static inline int __cdecl vfprintf_s(FILE *file, const char *format, va_list args)
{
return __stdio_common_vfprintf_s(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, file, format, NULL, args);
}
+static inline int WINAPIV fprintf_s(FILE *file, const char *format, ...) __WINE_CRT_PRINTF_ATTR(2, 3);
static inline int WINAPIV fprintf_s(FILE *file, const char *format, ...)
{
int ret;
@@ -273,11 +287,13 @@ static inline int WINAPIV fprintf_s(FILE *file, const char *format, ...)
return ret;
}
+static inline int vprintf(const char *format, va_list args) __WINE_CRT_PRINTF_ATTR(1, 0);
static inline int vprintf(const char *format, va_list args)
{
return __stdio_common_vfprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, stdout, format, NULL, args);
}
+static inline int WINAPIV printf(const char *format, ...) __WINE_CRT_PRINTF_ATTR(1, 2);
static inline int WINAPIV printf(const char *format, ...)
{
int ret;
@@ -289,11 +305,13 @@ static inline int WINAPIV printf(const char *format, ...)
return ret;
}
+static inline int vprintf_s(const char *format, va_list args) __WINE_CRT_PRINTF_ATTR(1, 0);
static inline int vprintf_s(const char *format, va_list args)
{
return __stdio_common_vfprintf_s(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, stdout, format, NULL, args);
}
+static inline int WINAPIV printf_s(const char *format, ...) __WINE_CRT_PRINTF_ATTR(1, 2);
static inline int WINAPIV printf_s(const char *format, ...)
{
int ret;
@@ -305,6 +323,7 @@ static inline int WINAPIV printf_s(const char *format, ...)
return ret;
}
+static inline int WINAPIV sscanf(const char *buffer, const char *format, ...) __WINE_CRT_SCANF_ATTR(2, 3);
static inline int WINAPIV sscanf(const char *buffer, const char *format, ...)
{
int ret;
@@ -316,6 +335,7 @@ static inline int WINAPIV sscanf(const char *buffer, const char *format, ...)
return ret;
}
+static inline int WINAPIV sscanf_s(const char *buffer, const char *format, ...) __WINE_CRT_SCANF_ATTR(2, 3);
static inline int WINAPIV sscanf_s(const char *buffer, const char *format, ...)
{
int ret;
@@ -327,6 +347,7 @@ static inline int WINAPIV sscanf_s(const char *buffer, const char *format, ...)
return ret;
}
+static inline int WINAPIV _snscanf_l(const char *buffer, size_t size, const char *format, _locale_t locale, ...) __WINE_CRT_SCANF_ATTR(3, 5);
static inline int WINAPIV _snscanf_l(const char *buffer, size_t size, const char *format, _locale_t locale, ...)
{
int ret;
@@ -338,6 +359,7 @@ static inline int WINAPIV _snscanf_l(const char *buffer, size_t size, const char
return ret;
}
+static inline int WINAPIV fscanf(FILE *file, const char *format, ...) __WINE_CRT_SCANF_ATTR(2, 3);
static inline int WINAPIV fscanf(FILE *file, const char *format, ...)
{
int ret;
@@ -349,6 +371,7 @@ static inline int WINAPIV fscanf(FILE *file, const char *format, ...)
return ret;
}
+static inline int WINAPIV fscanf_s(FILE *file, const char *format, ...) __WINE_CRT_SCANF_ATTR(2, 3);
static inline int WINAPIV fscanf_s(FILE *file, const char *format, ...)
{
int ret;
@@ -360,6 +383,7 @@ static inline int WINAPIV fscanf_s(FILE *file, const char *format, ...)
return ret;
}
+static inline int WINAPIV scanf(const char *format, ...) __WINE_CRT_SCANF_ATTR(1, 2);
static inline int WINAPIV scanf(const char *format, ...)
{
int ret;
@@ -371,6 +395,7 @@ static inline int WINAPIV scanf(const char *format, ...)
return ret;
}
+static inline int WINAPIV scanf_s(const char *format, ...) __WINE_CRT_SCANF_ATTR(1, 2);
static inline int WINAPIV scanf_s(const char *format, ...)
{
int ret;
@@ -384,33 +409,35 @@ static inline int WINAPIV scanf_s(const char *format, ...)
#else /* _UCRT && !_NO_CRT_STDIO_INLINE */
-_ACRTIMP int WINAPIV _scprintf(const char *,...);
-_ACRTIMP int WINAPIV _snprintf_s(char*,size_t,size_t,const char*,...);
-_ACRTIMP int __cdecl _vscprintf(const char*,va_list);
-_ACRTIMP int __cdecl _vsnprintf_s(char*,size_t,size_t,const char*,va_list);
-_ACRTIMP int __cdecl _vsprintf_p_l(char*,size_t,const char*,_locale_t,va_list);
-_ACRTIMP int WINAPIV fprintf(FILE*,const char*,...);
-_ACRTIMP int WINAPIV fprintf_s(FILE*,const char*,...);
-_ACRTIMP int WINAPIV printf(const char*,...);
-_ACRTIMP int WINAPIV printf_s(const char*,...);
-_ACRTIMP int WINAPIV sprintf_s(char*,size_t,const char*,...);
-_ACRTIMP int __cdecl vfprintf(FILE*,const char*,va_list);
-_ACRTIMP int __cdecl vfprintf_s(FILE*,const char*,va_list);
-_ACRTIMP int __cdecl vprintf(const char*,va_list);
-_ACRTIMP int __cdecl vprintf_s(const char*,va_list);
-_ACRTIMP int __cdecl vsprintf(char*,const char*,va_list);
-_ACRTIMP int __cdecl vsprintf_s(char*,size_t,const char*,va_list);
-
-_ACRTIMP int __cdecl _vsnprintf(char*,size_t,const char*,va_list);
-static inline int vsnprintf(char *buffer, size_t size, const char *format, va_list args) { return _vsnprintf(buffer,size,format,args); }
-
-_ACRTIMP int WINAPIV _snscanf_l(const char*,size_t,const char*,_locale_t,...);
-_ACRTIMP int WINAPIV fscanf(FILE*,const char*,...);
-_ACRTIMP int WINAPIV fscanf_s(FILE*,const char*,...);
-_ACRTIMP int WINAPIV scanf(const char*,...);
-_ACRTIMP int WINAPIV scanf_s(const char*,...);
-_ACRTIMP int WINAPIV sscanf(const char*,const char*,...);
-_ACRTIMP int WINAPIV sscanf_s(const char*,const char*,...);
+_ACRTIMP int WINAPIV _scprintf(const char *,...) __WINE_CRT_PRINTF_ATTR(1, 2);
+_ACRTIMP int WINAPIV _snprintf_s(char*,size_t,size_t,const char*,...) __WINE_CRT_PRINTF_ATTR(4, 5);
+_ACRTIMP int __cdecl _vscprintf(const char*,va_list) __WINE_CRT_PRINTF_ATTR(1, 0);
+_ACRTIMP int __cdecl _vsnprintf_s(char*,size_t,size_t,const char*,va_list) __WINE_CRT_PRINTF_ATTR(4, 0);
+_ACRTIMP int __cdecl _vsprintf_p_l(char*,size_t,const char*,_locale_t,va_list) __WINE_CRT_PRINTF_ATTR(3, 0);
+_ACRTIMP int WINAPIV fprintf(FILE*,const char*,...) __WINE_CRT_PRINTF_ATTR(2, 3);
+_ACRTIMP int WINAPIV fprintf_s(FILE*,const char*,...) __WINE_CRT_PRINTF_ATTR(2, 3);
+_ACRTIMP int WINAPIV printf(const char*,...) __WINE_CRT_PRINTF_ATTR(1, 2);
+_ACRTIMP int WINAPIV printf_s(const char*,...) __WINE_CRT_PRINTF_ATTR(1, 2);
+_ACRTIMP int WINAPIV sprintf_s(char*,size_t,const char*,...) __WINE_CRT_PRINTF_ATTR(3, 4);
+_ACRTIMP int __cdecl vfprintf(FILE*,const char*,va_list) __WINE_CRT_PRINTF_ATTR(2, 0);
+_ACRTIMP int __cdecl vfprintf_s(FILE*,const char*,va_list) __WINE_CRT_PRINTF_ATTR(2, 0);
+_ACRTIMP int __cdecl vprintf(const char*,va_list) __WINE_CRT_PRINTF_ATTR(1, 0);
+_ACRTIMP int __cdecl vprintf_s(const char*,va_list) __WINE_CRT_PRINTF_ATTR(1, 0);
+_ACRTIMP int __cdecl vsprintf(char*,const char*,va_list) __WINE_CRT_PRINTF_ATTR(2, 0);
+_ACRTIMP int __cdecl vsprintf_s(char*,size_t,const char*,va_list) __WINE_CRT_PRINTF_ATTR(3, 0);
+
+_ACRTIMP int __cdecl _vsnprintf(char*,size_t,const char*,va_list) __WINE_CRT_PRINTF_ATTR(3, 0);
+static inline int vsnprintf(char *buffer, size_t size, const char *format, va_list args) __WINE_CRT_PRINTF_ATTR(3, 0);
+static inline int vsnprintf(char *buffer, size_t size, const char *format, va_list args)
+{ return _vsnprintf(buffer,size,format,args); }
+
+_ACRTIMP int WINAPIV _snscanf_l(const char*,size_t,const char*,_locale_t,...) __WINE_CRT_SCANF_ATTR(3, 5);
+_ACRTIMP int WINAPIV fscanf(FILE*,const char*,...) __WINE_CRT_SCANF_ATTR(2, 3);
+_ACRTIMP int WINAPIV fscanf_s(FILE*,const char*,...) __WINE_CRT_SCANF_ATTR(2, 3);
+_ACRTIMP int WINAPIV scanf(const char*,...) __WINE_CRT_SCANF_ATTR(1, 2);
+_ACRTIMP int WINAPIV scanf_s(const char*,...) __WINE_CRT_SCANF_ATTR(1, 2);
+_ACRTIMP int WINAPIV sscanf(const char*,const char*,...) __WINE_CRT_SCANF_ATTR(2, 3);
+_ACRTIMP int WINAPIV sscanf_s(const char*,const char*,...) __WINE_CRT_SCANF_ATTR(2, 3);
#endif /* _UCRT && !_NO_CRT_STDIO_INLINE */
@@ -435,6 +462,7 @@ static inline int unlink(const char* path) { return _unlink(path); }
#if !defined(_NO_CRT_STDIO_INLINE)
+static inline int WINAPIV snprintf(char *buffer, size_t size, const char *format, ...) __WINE_CRT_PRINTF_ATTR(3, 4);
static inline int WINAPIV snprintf(char *buffer, size_t size, const char *format, ...)
{
int ret;
@@ -446,6 +474,7 @@ static inline int WINAPIV snprintf(char *buffer, size_t size, const char *format
return ret;
}
+static inline int WINAPIV _snprintf(char *buffer, size_t size, const char *format, ...) __WINE_CRT_PRINTF_ATTR(3, 4);
static inline int WINAPIV _snprintf(char *buffer, size_t size, const char *format, ...)
{
int ret;
@@ -457,6 +486,7 @@ static inline int WINAPIV _snprintf(char *buffer, size_t size, const char *forma
return ret;
}
+static inline int WINAPIV sprintf(char *buffer, const char *format, ...) __WINE_CRT_PRINTF_ATTR(2, 3);
static inline int WINAPIV sprintf(char *buffer, const char *format, ...)
{
int ret;
@@ -470,9 +500,9 @@ static inline int WINAPIV sprintf(char *buffer, const char *format, ...)
#else /* !_NO_CRT_STDIO_INLINE */
-_ACRTIMP int WINAPIV snprintf(char*,size_t,const char*,...);
-_ACRTIMP int WINAPIV _snprintf(char*,size_t,const char*,...);
-_ACRTIMP int WINAPIV sprintf(char*,const char*,...);
+_ACRTIMP int WINAPIV snprintf(char*,size_t,const char*,...) __WINE_CRT_PRINTF_ATTR(3, 4);
+_ACRTIMP int WINAPIV _snprintf(char*,size_t,const char*,...) __WINE_CRT_PRINTF_ATTR(3, 4);
+_ACRTIMP int WINAPIV sprintf(char*,const char*,...) __WINE_CRT_PRINTF_ATTR(2, 3);
#endif /* !_NO_CRT_STDIO_INLINE */
diff --git a/programs/winetest/main.c b/programs/winetest/main.c
index 3ed514f73e2..3ffb0185052 100644
--- a/programs/winetest/main.c
+++ b/programs/winetest/main.c
@@ -865,7 +865,7 @@ static HMODULE load_com_dll(const char *name, char **path, char *filename)
if(!get_main_clsid(name, &clsid)) return NULL;
- sprintf(keyname, "CLSID\\{%08x-%04x-%04x-%02x%2x-%02x%2x%02x%2x%02x%2x}\\InprocServer32",
+ sprintf(keyname, "CLSID\\{%08lx-%04x-%04x-%02x%2x-%02x%2x%02x%2x%02x%2x}\\InprocServer32",
clsid.Data1, clsid.Data2, clsid.Data3, clsid.Data4[0], clsid.Data4[1],
clsid.Data4[2], clsid.Data4[3], clsid.Data4[4], clsid.Data4[5],
clsid.Data4[6], clsid.Data4[7]);
Jan. 31, 2022
[PATCH 00/14] Migration to long types
by Eric Pouech
The first two patches are not per se migration patches.
The first one adds -Wformat warnings for Wine's stdio APIs (printf & scanf
families), while the second fixes HandleToU?Long to return long.
The rest of the patches fixes int/long mismatch across some modules.
A+
---
Eric Pouech (14):
include/msvcrt: add attribute((format)) to printf and scanf -like APIs
include/basestd.h: define HandleToU?Long return a long (as SDK does)
programs/winedbg: use correct integral type
dlls/dbgeng: use correct integral type
dlls/devenum: use correct integral type
dlls/dsound: use correct integral type
dlls/dwrite: use correct integral type
dlls/evr: use correct integral type
dlls/gdi32: use correct integral type
dlls/gdiplus: use correct integral type
dlls/itss: use correct integral type
dlls/joy.cpl: use correct integral type
dlls/msxml3: use correct integral type
dlls/ntdll: use correct integral type
dlls/compobj.dll16/compobj.c | 2 +-
dlls/crypt32/sip.c | 2 +-
dlls/dbgeng/dbgeng.c | 5 +-
dlls/devenum/mediacatenum.c | 3 +-
dlls/dsound/mixer.c | 3 +-
dlls/dwrite/font.c | 2 +-
dlls/dwrite/main.c | 3 +-
dlls/dwrite/opentype.c | 5 +-
dlls/dwrite/shape.c | 4 +-
dlls/evr/mixer.c | 5 +-
dlls/evr/presenter.c | 8 +--
dlls/gdi32/dc.c | 8 +--
dlls/gdiplus/image.c | 21 ++++----
dlls/iphlpapi/iphlpapi_main.c | 2 +-
dlls/iphlpapi/tests/iphlpapi.c | 4 +-
dlls/itss/chm_lib.c | 6 +--
dlls/joy.cpl/main.c | 2 +-
dlls/msdmo/tests/msdmo.c | 2 +-
dlls/mshtml/main.c | 2 +-
dlls/msxml3/httprequest.c | 2 +-
dlls/msxml3/mxwriter.c | 2 +-
dlls/ntdll/actctx.c | 2 +-
dlls/ntdll/loader.c | 8 +--
dlls/ntdll/sync.c | 12 ++---
dlls/oleaut32/oleaut.c | 2 +-
dlls/oleaut32/typelib.c | 2 +-
dlls/rpcrt4/rpcrt4_main.c | 4 +-
dlls/shell32/classes.c | 2 +-
dlls/shell32/debughlp.c | 2 +-
dlls/shell32/shfldr.h | 2 +-
dlls/shlwapi/ordinal.c | 2 +-
dlls/typelib.dll16/typelib.c | 2 +-
dlls/webservices/writer.c | 4 +-
include/basetsd.h | 24 +++++++--
include/msvcrt/corecrt.h | 8 +++
include/msvcrt/crtdbg.h | 2 +-
include/msvcrt/stdio.h | 90 ++++++++++++++++++++++------------
programs/winedbg/debugger.h | 2 +-
programs/winetest/main.c | 2 +-
39 files changed, 164 insertions(+), 101 deletions(-)
Jan. 31, 2022
[PATCH v2 5/5] include: Add windows.media.speechrecognition.idl.
by Bernhard Kölbl
And add ISpeechRecognitionConstraint together with
it's dependencies.
Signed-off-by: Bernhard Kölbl <besentv(a)gmail.com>
---
v2: Only add ISpeechRecognitionConstraint + dependencies.
---
include/Makefile.in | 1 +
include/windows.media.speechrecognition.idl | 88 +++++++++++++++++++++
2 files changed, 89 insertions(+)
create mode 100644 include/windows.media.speechrecognition.idl
diff --git a/include/Makefile.in b/include/Makefile.in
index 7fcf5f0ba7b..613c0bd0b37 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -783,6 +783,7 @@ SOURCES = \
windows.h \
windows.media.devices.idl \
windows.media.idl \
+ windows.media.speechrecognition.idl \
windows.media.speechsynthesis.idl \
windows.storage.streams.idl \
windows.system.idl \
diff --git a/include/windows.media.speechrecognition.idl b/include/windows.media.speechrecognition.idl
new file mode 100644
index 00000000000..65c9d5ef8da
--- /dev/null
+++ b/include/windows.media.speechrecognition.idl
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2022 Bernhard Kölbl
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifdef __WIDL__
+#pragma winrt ns_prefix
+#endif
+
+import "inspectable.idl";
+import "asyncinfo.idl";
+import "eventtoken.idl";
+import "windowscontracts.idl";
+import "windows.foundation.idl";
+import "windows.globalization.idl";
+/*import "windows.phone.idl";*/
+/*import "windows.storage.idl";*/
+
+namespace Windows {
+ namespace Media {
+ namespace SpeechRecognition {
+ typedef enum SpeechRecognitionConstraintProbability SpeechRecognitionConstraintProbability;
+ typedef enum SpeechRecognitionConstraintType SpeechRecognitionConstraintType;
+ interface ISpeechRecognitionConstraint;
+ }
+ }
+}
+
+namespace Windows {
+ namespace Media {
+ namespace SpeechRecognition {
+ declare {
+ }
+ }
+ }
+}
+
+namespace Windows {
+ namespace Media {
+ namespace SpeechRecognition {
+
+ [contract(Windows.Foundation.UniversalApiContract, 1.0)]
+ enum SpeechRecognitionConstraintProbability
+ {
+ Default = 0,
+ Min = 1,
+ Max = 2,
+ };
+
+ [contract(Windows.Foundation.UniversalApiContract, 1.0)]
+ enum SpeechRecognitionConstraintType
+ {
+ Topic = 0,
+ List = 1,
+ Grammar = 2,
+ VoiceCommandDefinition = 3,
+ };
+
+ [
+ contract(Windows.Foundation.UniversalApiContract, 1.0),
+ uuid(79ac1628-4d68-43c4-8911-40dc4101b55b)
+ ]
+ interface ISpeechRecognitionConstraint : IInspectable
+ {
+ [propget] HRESULT IsEnabled([out, retval] boolean *value);
+ [propput] HRESULT IsEnabled([in] boolean value);
+ [propget] HRESULT Tag([out, retval] HSTRING *value);
+ [propput] HRESULT Tag([in] HSTRING value);
+ [propget] HRESULT Type([out, retval] Windows.Media.SpeechRecognition.SpeechRecognitionConstraintType *value);
+ [propget] HRESULT Probability([out, retval] Windows.Media.SpeechRecognition.SpeechRecognitionConstraintProbability *value);
+ [propput] HRESULT Probability([in] Windows.Media.SpeechRecognition.SpeechRecognitionConstraintProbability value);
+ }
+ }
+ }
+}
--
2.34.1
Jan. 31, 2022
[PATCH v2 4/5] include/windows.globalization.idl: Add Language class and interfaces.
by Bernhard Kölbl
Signed-off-by: Bernhard Kölbl <besentv(a)gmail.com>
---
v2: Fully work out the previous stubs.
---
include/windows.globalization.idl | 132 ++++++++++++++++++++++++++++++
1 file changed, 132 insertions(+)
diff --git a/include/windows.globalization.idl b/include/windows.globalization.idl
index c08f7bd27d9..03c44703b7e 100644
--- a/include/windows.globalization.idl
+++ b/include/windows.globalization.idl
@@ -29,9 +29,31 @@ import "windows.foundation.idl";
namespace Windows {
namespace Globalization {
typedef enum DayOfWeek DayOfWeek;
+ typedef enum LanguageLayoutDirection LanguageLayoutDirection;
+ interface ILanguage;
+ interface ILanguage2;
+ interface ILanguage3;
+ interface ILanguageExtensionSubtags;
+ interface ILanguageFactory;
+ interface ILanguageStatics;
+ interface ILanguageStatics2;
+ interface ILanguageStatics3;
+ runtimeclass Language;
}
}
+namespace Windows {
+ namespace Globalization {
+ declare{
+ interface Windows.Foundation.Collections.IIterable<Windows.Globalization.Language*>;
+ interface Windows.Foundation.Collections.IIterator<Windows.Globalization.Language*>;
+ interface Windows.Foundation.Collections.IVectorView<Windows.Globalization.Language*>;
+ interface Windows.Foundation.Collections.IVector<Windows.Globalization.Language*>;
+ }
+ }
+}
+
+
namespace Windows {
namespace Globalization {
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
@@ -45,5 +67,115 @@ namespace Windows {
Friday = 5,
Saturday = 6
};
+
+ [contract(Windows.Foundation.UniversalApiContract, 6.0)]
+ enum LanguageLayoutDirection
+ {
+ Ltr = 0,
+ Rtl = 1,
+ TtbLtr = 2,
+ TtbRtl = 3,
+ };
+
+ [
+ contract(Windows.Foundation.UniversalApiContract, 1.0),
+ exclusiveto(Windows.Globalization.Language),
+ uuid(ea79a752-f7c2-4265-b1bd-c4dec4e4f080)
+ ]
+ interface ILanguage : IInspectable
+ {
+ [propget] HRESULT LanguageTag([out, retval] HSTRING *value);
+ [propget] HRESULT DisplayName([out, retval] HSTRING *value);
+ [propget] HRESULT NativeName([out, retval] HSTRING *value);
+ [propget] HRESULT Script([out, retval] HSTRING *value);
+ }
+
+ [
+ contract(Windows.Foundation.UniversalApiContract, 6.0),
+ exclusiveto(Windows.Globalization.Language),
+ uuid(6a47e5b5-d94d-4886-a404-a5a5b9d5b494)
+ ]
+ interface ILanguage2 : IInspectable
+ {
+ [propget] HRESULT LayoutDirection([out, retval] Windows.Globalization.LanguageLayoutDirection *value);
+ }
+
+ [
+ contract(Windows.Foundation.UniversalApiContract, 10.0),
+ exclusiveto(Windows.Globalization.Language),
+ uuid(c6af3d10-641a-5ba4-bb43-5e12aed75954)
+ ]
+ interface ILanguage3 : IInspectable
+ {
+ [propget] HRESULT AbbreviatedName([out, retval] HSTRING *value);
+ }
+
+ [
+ contract(Windows.Foundation.UniversalApiContract, 1.0),
+ exclusiveto(Windows.Globalization.Language),
+ uuid(7d7daf45-368d-4364-852b-dec927037b85)
+ ]
+ interface ILanguageExtensionSubtags : IInspectable
+ {
+ HRESULT GetExtensionSubtags([in] HSTRING tag, [out, retval] Windows.Foundation.Collections.IVectorView<HSTRING> **value);
+ }
+
+ [
+ contract(Windows.Foundation.UniversalApiContract, 1.0),
+ exclusiveto(Windows.Globalization.Language),
+ uuid(9b0252ac-0c27-44f8-b792-9793fb66c63e)
+ ]
+ interface ILanguageFactory : IInspectable
+ {
+ HRESULT CreateLanguage([in] HSTRING tag, [out, retval] Windows.Globalization.Language **value);
+ }
+
+ [
+ contract(Windows.Foundation.UniversalApiContract, 1.0),
+ exclusiveto(Windows.Globalization.Language),
+ uuid(b23cd557-0865-46d4-89b8-d59be8990f0d)
+ ]
+ interface ILanguageStatics : IInspectable
+ {
+ HRESULT IsWellFormed([in] HSTRING tag, [out, retval] BOOLEAN *result);
+ [propget] HRESULT CurrentInputMethodLanguageTag([out, retval] HSTRING *value);
+ }
+
+ [
+ contract(Windows.Foundation.UniversalApiContract, 1.0),
+ exclusiveto(Windows.Globalization.Language),
+ uuid(30199f6e-914b-4b2a-9d6e-e3b0e27dbe4f)
+ ]
+ interface ILanguageStatics2 : IInspectable
+ {
+ HRESULT TrySetInputMethodLanguageTag([in] HSTRING tag, [out, retval] BOOLEAN *result);
+ }
+
+ [
+ contract(Windows.Foundation.UniversalApiContract, 10.0),
+ exclusiveto(Windows.Globalization.Language),
+ uuid(d15ecb5a-71de-5752-9542-fac5b4f27261)
+ ]
+ interface ILanguageStatics3 : IInspectable
+ {
+ HRESULT GetMuiCompatibleLanguageListFromLanguageTags([in] Windows.Foundation.Collections.IIterable<HSTRING> *tags, [out, retval] Windows.Foundation.Collections.IVector<HSTRING> **result);
+ }
+
+ [
+ activatable(Windows.Globalization.ILanguageFactory, Windows.Foundation.UniversalApiContract, 1.0),
+ contract(Windows.Foundation.UniversalApiContract, 1.0),
+ marshaling_behavior(agile),
+ static(Windows.Globalization.ILanguageStatics, Windows.Foundation.UniversalApiContract, 1.0),
+ static(Windows.Globalization.ILanguageStatics2, Windows.Foundation.UniversalApiContract, 1.0),
+ static(Windows.Globalization.ILanguageStatics3, Windows.Foundation.UniversalApiContract, 10.0),
+ threading(both)
+ ]
+ runtimeclass Language
+ {
+ [contract(Windows.Foundation.UniversalApiContract, 1.0), default] interface Windows.Globalization.ILanguage;
+ [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Globalization.ILanguageExtensionSubtags;
+ [contract(Windows.Foundation.UniversalApiContract, 6.0)] interface Windows.Globalization.ILanguage2;
+ [contract(Windows.Foundation.UniversalApiContract, 10.0)] interface Windows.Globalization.ILanguage3;
+ }
}
}
--
2.34.1
Jan. 31, 2022
[PATCH v2 3/5] include/windows.foundation.idl: Add more declares.
by Bernhard Kölbl
Signed-off-by: Bernhard Kölbl <besentv(a)gmail.com>
---
Required for other idl files.
---
include/windows.foundation.idl | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/include/windows.foundation.idl b/include/windows.foundation.idl
index a4ee7303ddb..400e8661b04 100644
--- a/include/windows.foundation.idl
+++ b/include/windows.foundation.idl
@@ -158,9 +158,13 @@ namespace Windows {
namespace Windows {
namespace Foundation {
declare {
+ interface Windows.Foundation.Collections.IIterable<HSTRING>;
+ interface Windows.Foundation.Collections.IIterator<HSTRING>;
+ interface Windows.Foundation.Collections.IVectorView<HSTRING>;
+ interface Windows.Foundation.Collections.IVector<HSTRING>;
+ interface Windows.Foundation.Collections.IMapView<HSTRING, Windows.Foundation.Collections.IVectorView<HSTRING>*>;
interface Windows.Foundation.AsyncOperationCompletedHandler<boolean>;
interface Windows.Foundation.IAsyncOperation<boolean>;
- interface Windows.Foundation.Collections.IVectorView<HSTRING>;
}
}
-}
+}
\ No newline at end of file
--
2.34.1
Jan. 31, 2022
[PATCH v2 2/5] include/windows.foundation.idl: Add IAsyncAction interface.
by Bernhard Kölbl
Signed-off-by: Bernhard Kölbl <besentv(a)gmail.com>
---
v2: Add missing required interface.
---
include/windows.foundation.idl | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/include/windows.foundation.idl b/include/windows.foundation.idl
index 292522f2c49..a4ee7303ddb 100644
--- a/include/windows.foundation.idl
+++ b/include/windows.foundation.idl
@@ -27,6 +27,12 @@ import "windowscontracts.idl";
/* import "ivectorchangedeventargs.idl"; */
import "windows.foundation.collections.idl";
+namespace Windows {
+ namespace Foundation {
+ interface IAsyncAction;
+ }
+}
+
namespace Windows {
namespace Foundation {
typedef enum PropertyType PropertyType;
@@ -36,6 +42,12 @@ namespace Windows {
typedef struct DateTime DateTime;
typedef struct TimeSpan TimeSpan;
+ [
+ contract(Windows.Foundation.FoundationContract, 1.0),
+ uuid(a4ed5c81-76c9-40bd-8be6-b1d90fb20ae7)
+ ]
+ delegate HRESULT AsyncActionCompletedHandler([in] Windows.Foundation.IAsyncAction *action, [in] AsyncStatus status);
+
[contract(Windows.Foundation.FoundationContract, 1.0)]
enum PropertyType {
Empty = 0,
@@ -128,6 +140,18 @@ namespace Windows {
{
HRESULT Close();
}
+
+ [
+ contract(Windows.Foundation.FoundationContract, 1.0),
+ uuid(5a648006-843a-4da9-865b-9d26e5dfad7b)
+ ]
+ interface IAsyncAction : IInspectable
+ requires IAsyncInfo
+ {
+ [propput] HRESULT Completed([in] Windows.Foundation.AsyncActionCompletedHandler *handler);
+ [propget] HRESULT Completed([out, retval] Windows.Foundation.AsyncActionCompletedHandler **handler);
+ HRESULT GetResults();
+ }
}
}
--
2.34.1
Jan. 31, 2022