Wine-devel
Threads by month
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
February 2022
- 87 participants
- 926 discussions
[PATCH] winegstreamer: Do not block forever if EOS races with command queue.
by Giovanni Mascellani 09 Feb '22
by Giovanni Mascellani 09 Feb '22
09 Feb '22
Currently, the winegstreamer media source checks for EOS when
RequestSample() is called, but doesn't handle the cases when EOS
is detected between the RequestSample() call and the moment when
the request is popped from the command queue and serviced. This
can result in the media source waiting forever for a sample and
get stuck.
This commit fixes the bug by adding a check for EOS in
wg_parser_stream_get_event().
This commit fixes Medieval Dynasty hanging on developer logos on
the Steam Deck.
Signed-off-by: Giovanni Mascellani <gmascellani(a)codeweavers.com>
---
dlls/winegstreamer/media_source.c | 13 ++++++++++---
dlls/winegstreamer/wg_parser.c | 15 ++++++++++++---
2 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
index 85ec31d2498..5393835b696 100644
--- a/dlls/winegstreamer/media_source.c
+++ b/dlls/winegstreamer/media_source.c
@@ -548,9 +548,16 @@ static void wait_on_sample(struct media_stream *stream, IUnknown *token)
return;
case WG_PARSER_EVENT_EOS:
- stream->eos = TRUE;
- IMFMediaEventQueue_QueueEventParamVar(stream->event_queue, MEEndOfStream, &GUID_NULL, S_OK, &empty_var);
- dispatch_end_of_presentation(stream->parent_source);
+ if (stream->eos)
+ {
+ IMFMediaEventQueue_QueueEventParamVar(stream->event_queue, MEError, &GUID_NULL, MF_E_END_OF_STREAM, &empty_var);
+ }
+ else
+ {
+ stream->eos = TRUE;
+ IMFMediaEventQueue_QueueEventParamVar(stream->event_queue, MEEndOfStream, &GUID_NULL, S_OK, &empty_var);
+ dispatch_end_of_presentation(stream->parent_source);
+ }
return;
case WG_PARSER_EVENT_SEGMENT:
diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c
index 013566b25e9..beb4d92bf5b 100644
--- a/dlls/winegstreamer/wg_parser.c
+++ b/dlls/winegstreamer/wg_parser.c
@@ -106,7 +106,7 @@ struct wg_parser_stream
GstBuffer *buffer;
GstMapInfo map_info;
- bool flushing, eos, enabled, has_caps;
+ bool flushing, eos, processed_eos, enabled, has_caps;
uint64_t duration;
};
@@ -681,7 +681,7 @@ static NTSTATUS wg_parser_stream_get_event(void *args)
pthread_mutex_lock(&parser->mutex);
- while (!parser->flushing && stream->event.type == WG_PARSER_EVENT_NONE)
+ while (!parser->flushing && !stream->processed_eos && stream->event.type == WG_PARSER_EVENT_NONE)
pthread_cond_wait(&stream->event_cond, &parser->mutex);
if (parser->flushing)
@@ -691,7 +691,16 @@ static NTSTATUS wg_parser_stream_get_event(void *args)
return VFW_E_WRONG_STATE;
}
- *params->event = stream->event;
+ if (stream->processed_eos)
+ params->event->type = WG_PARSER_EVENT_EOS;
+ else
+ *params->event = stream->event;
+
+ if (stream->event.type == WG_PARSER_EVENT_EOS && !stream->processed_eos)
+ {
+ stream->processed_eos = true;
+ pthread_cond_signal(&stream->event_cond);
+ }
if (stream->event.type != WG_PARSER_EVENT_BUFFER)
{
--
2.34.1
3
8
[PATCH v2] kernelbase: Implement GetFileInformationByHandleEx(FileFullDirectoryInfo).
by Paul Gofman 09 Feb '22
by Paul Gofman 09 Feb '22
09 Feb '22
Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com>
---
v2:
- fix test failures on Win7.
dlls/kernel32/tests/file.c | 75 ++++++++++++++++++++++++++++++++++----
dlls/kernelbase/file.c | 12 +++++-
include/winbase.h | 15 ++++++++
3 files changed, 93 insertions(+), 9 deletions(-)
diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c
index f8e49491a7d..1f905cd59f8 100644
--- a/dlls/kernel32/tests/file.c
+++ b/dlls/kernel32/tests/file.c
@@ -4181,11 +4181,13 @@ todo_wine_if (i == 1)
static void test_GetFileInformationByHandleEx(void)
{
int i;
- char tempPath[MAX_PATH], tempFileName[MAX_PATH], buffer[1024], *strPtr;
- BOOL ret;
+ char tempPath[MAX_PATH], tempFileName[MAX_PATH], buffer[1024], buffer2[1024], *strPtr;
+ BOOL first, ret;
DWORD ret2, written;
+ unsigned int count, count2, size;
HANDLE directory, file;
FILE_ID_BOTH_DIR_INFO *bothDirInfo;
+ FILE_FULL_DIR_INFO *full_dir_info;
FILE_BASIC_INFO *basicInfo;
FILE_STANDARD_INFO *standardInfo;
FILE_NAME_INFO *nameInfo;
@@ -4195,17 +4197,26 @@ static void test_GetFileInformationByHandleEx(void)
FILE_DISPOSITION_INFO dispinfo;
FILE_END_OF_FILE_INFO eofinfo;
FILE_RENAME_INFO renameinfo;
+ BOOL full_dir_info_supported;
- struct {
+ struct
+ {
FILE_INFO_BY_HANDLE_CLASS handleClass;
void *ptr;
DWORD size;
DWORD errorCode;
- } checks[] = {
+ BOOL not_always_supported;
+ }
+ checks[] =
+ {
{0xdeadbeef, NULL, 0, ERROR_INVALID_PARAMETER},
{FileIdBothDirectoryInfo, NULL, 0, ERROR_BAD_LENGTH},
{FileIdBothDirectoryInfo, NULL, sizeof(buffer), ERROR_NOACCESS},
- {FileIdBothDirectoryInfo, buffer, 0, ERROR_BAD_LENGTH}};
+ {FileIdBothDirectoryInfo, buffer, 0, ERROR_BAD_LENGTH},
+ {FileFullDirectoryInfo, NULL, 0, ERROR_BAD_LENGTH, TRUE},
+ {FileFullDirectoryInfo, NULL, sizeof(buffer), ERROR_NOACCESS},
+ {FileFullDirectoryInfo, buffer, 0, ERROR_BAD_LENGTH},
+ };
if (!pGetFileInformationByHandleEx)
{
@@ -4232,10 +4243,17 @@ static void test_GetFileInformationByHandleEx(void)
{
SetLastError(0xdeadbeef);
ret = pGetFileInformationByHandleEx(directory, checks[i].handleClass, checks[i].ptr, checks[i].size);
+ if (checks[i].not_always_supported && !ret && GetLastError() == ERROR_INVALID_PARAMETER)
+ {
+ win_skip("class %u is not supported, skipping the rest.\n", checks[i].handleClass);
+ break;
+ }
ok(!ret && GetLastError() == checks[i].errorCode, "GetFileInformationByHandleEx: expected error %u, "
"got %u.\n", checks[i].errorCode, GetLastError());
}
+ full_dir_info_supported = (i == ARRAY_SIZE(checks));
+ first = TRUE;
while (TRUE)
{
memset(buffer, 0xff, sizeof(buffer));
@@ -4243,8 +4261,51 @@ static void test_GetFileInformationByHandleEx(void)
if (!ret && GetLastError() == ERROR_NO_MORE_FILES)
break;
ok(ret, "GetFileInformationByHandleEx: failed to query for FileIdBothDirectoryInfo, got error %u.\n", GetLastError());
- if (!ret)
- break;
+
+ if (full_dir_info_supported && first)
+ {
+ count = 1;
+ bothDirInfo = (FILE_ID_BOTH_DIR_INFO *)buffer;
+ while (bothDirInfo->NextEntryOffset)
+ {
+ ++count;
+ size = offsetof(FILE_ID_BOTH_DIR_INFO, FileName[bothDirInfo->FileNameLength / 2]);
+ size = (size + 7) & ~7;
+ ok(bothDirInfo->NextEntryOffset == size,
+ "Got unexpected structure size, NextEntryOffset %u (%u).\n", bothDirInfo->NextEntryOffset,
+ size);
+ bothDirInfo = (FILE_ID_BOTH_DIR_INFO *)(((char *)bothDirInfo) + bothDirInfo->NextEntryOffset);
+ }
+ size = offsetof(FILE_FULL_DIR_INFO, FileName[bothDirInfo->FileNameLength / 2]);
+ ret = pGetFileInformationByHandleEx(directory, FileFullDirectoryRestartInfo, buffer2, sizeof(buffer2));
+ ok(ret, "failed to query for FileFullDirectoryInfo, got error %u.\n", GetLastError());
+
+ count2 = 0;
+ bothDirInfo = (FILE_ID_BOTH_DIR_INFO *)buffer;
+ full_dir_info = (FILE_FULL_DIR_INFO *)buffer2;
+ while (1)
+ {
+ ++count2;
+ ok(bothDirInfo->FileNameLength == full_dir_info->FileNameLength,
+ "FileNameLength does not match, count2 %u.\n", count2);
+ ok(!memcmp(bothDirInfo->FileName, full_dir_info->FileName, full_dir_info->FileNameLength),
+ "FileName does not match, count %u.\n", count2);
+
+ if (!full_dir_info->NextEntryOffset || !bothDirInfo->NextEntryOffset)
+ break;
+
+ size = offsetof(FILE_FULL_DIR_INFO, FileName[full_dir_info->FileNameLength / 2]);
+ size = (size + 7) & ~7;
+ ok(full_dir_info->NextEntryOffset == size,
+ "Got unexpected structure size, NextEntryOffset %u (%u).\n", bothDirInfo->NextEntryOffset,
+ size);
+ full_dir_info = (FILE_FULL_DIR_INFO *)(((char *)full_dir_info) + full_dir_info->NextEntryOffset);
+ bothDirInfo = (FILE_ID_BOTH_DIR_INFO *)(((char *)bothDirInfo) + bothDirInfo->NextEntryOffset);
+ }
+ ok(count2 == count, "Got unexpected count2 %u, count %u.\n", count2, count);
+ first = FALSE;
+ }
+
bothDirInfo = (FILE_ID_BOTH_DIR_INFO *)buffer;
while (TRUE)
{
diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c
index 576e03eb62b..c1d9401f5c2 100644
--- a/dlls/kernelbase/file.c
+++ b/dlls/kernelbase/file.c
@@ -2954,13 +2954,13 @@ BOOL WINAPI DECLSPEC_HOTPATCH GetFileInformationByHandleEx( HANDLE handle, FILE_
NTSTATUS status;
IO_STATUS_BLOCK io;
+ TRACE( "%p, %u, %p, %u.\n", handle, class, info, size );
+
switch (class)
{
case FileStreamInfo:
case FileCompressionInfo:
case FileRemoteProtocolInfo:
- case FileFullDirectoryInfo:
- case FileFullDirectoryRestartInfo:
case FileStorageInfo:
case FileAlignmentInfo:
case FileIdExtdDirectoryInfo:
@@ -2969,6 +2969,13 @@ BOOL WINAPI DECLSPEC_HOTPATCH GetFileInformationByHandleEx( HANDLE handle, FILE_
SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
return FALSE;
+ case FileFullDirectoryRestartInfo:
+ case FileFullDirectoryInfo:
+ status = NtQueryDirectoryFile( handle, NULL, NULL, NULL, &io, info, size,
+ FileFullDirectoryInformation, FALSE, NULL,
+ (class == FileFullDirectoryRestartInfo) );
+ break;
+
case FileAttributeTagInfo:
status = NtQueryInformationFile( handle, &io, info, size, FileAttributeTagInformation );
break;
@@ -3002,6 +3009,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH GetFileInformationByHandleEx( HANDLE handle, FILE_
case FileIoPriorityHintInfo:
case FileEndOfFileInfo:
default:
+ WARN( "class %u is not supported.\n", class );
SetLastError( ERROR_INVALID_PARAMETER );
return FALSE;
}
diff --git a/include/winbase.h b/include/winbase.h
index 0a0bfde9d10..b2d5ca68d42 100644
--- a/include/winbase.h
+++ b/include/winbase.h
@@ -823,6 +823,21 @@ typedef struct _FILE_ID_BOTH_DIR_INFO {
WCHAR FileName[1];
} FILE_ID_BOTH_DIR_INFO, *PFILE_ID_BOTH_DIR_INFO;
+typedef struct _FILE_FULL_DIR_INFO {
+ ULONG NextEntryOffset;
+ ULONG FileIndex;
+ LARGE_INTEGER CreationTime;
+ LARGE_INTEGER LastAccessTime;
+ LARGE_INTEGER LastWriteTime;
+ LARGE_INTEGER ChangeTime;
+ LARGE_INTEGER EndOfFile;
+ LARGE_INTEGER AllocationSize;
+ ULONG FileAttributes;
+ ULONG FileNameLength;
+ ULONG EaSize;
+ WCHAR FileName[1];
+} FILE_FULL_DIR_INFO, *PFILE_FULL_DIR_INFO;
+
typedef struct _FILE_BASIC_INFO {
LARGE_INTEGER CreationTime;
LARGE_INTEGER LastAccessTime;
--
2.34.1
1
0
09 Feb '22
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/concrt140/Makefile.in | 1 -
dlls/crtdll/Makefile.in | 2 +-
dlls/msvcirt/Makefile.in | 2 +-
dlls/msvcirt/msvcirt.c | 30 +++++++++++++--------------
dlls/msvcp100/Makefile.in | 2 +-
dlls/msvcp110/Makefile.in | 2 +-
dlls/msvcp120/Makefile.in | 2 +-
dlls/msvcp140/Makefile.in | 2 +-
dlls/msvcp60/Makefile.in | 2 +-
dlls/msvcp60/main.c | 2 +-
dlls/msvcp70/Makefile.in | 2 +-
dlls/msvcp71/Makefile.in | 2 +-
dlls/msvcp80/Makefile.in | 2 +-
dlls/msvcp90/Makefile.in | 2 +-
dlls/msvcp90/locale.c | 20 +++++++++---------
dlls/msvcp90/misc.c | 18 ++++++++--------
dlls/msvcp90/msvcp_main.c | 2 +-
dlls/msvcr100/Makefile.in | 2 +-
dlls/msvcr110/Makefile.in | 2 +-
dlls/msvcr120/Makefile.in | 2 +-
dlls/msvcr70/Makefile.in | 2 +-
dlls/msvcr71/Makefile.in | 2 +-
dlls/msvcr80/Makefile.in | 2 +-
dlls/msvcr90/Makefile.in | 2 +-
dlls/msvcrt/Makefile.in | 2 +-
dlls/msvcrt/concurrency.c | 4 ++--
dlls/msvcrt/console.c | 2 +-
dlls/msvcrt/except.c | 2 +-
dlls/msvcrt/except_i386.c | 18 ++++++++--------
dlls/msvcrt/except_x86_64.c | 12 +++++------
dlls/msvcrt/file.c | 48 ++++++++++++++++++++++---------------------
dlls/msvcrt/locale.c | 14 ++++++-------
dlls/msvcrt/main.c | 2 +-
dlls/msvcrt/math.c | 2 +-
dlls/msvcrt/mbcs.c | 4 ++--
dlls/msvcrt/misc.c | 6 +++--
dlls/msvcrt/thread.c | 4 ++--
dlls/msvcrtd/Makefile.in | 2 +-
dlls/ucrtbase/Makefile.in | 2 +-
39 files changed, 116 insertions(+), 117 deletions(-)
diff --git a/dlls/concrt140/Makefile.in b/dlls/concrt140/Makefile.in
index 3b74c2e5b4b..aac1ed7b34a 100644
--- a/dlls/concrt140/Makefile.in
+++ b/dlls/concrt140/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = concrt140.dll
PARENTSRC = ../msvcrt
diff --git a/dlls/crtdll/Makefile.in b/dlls/crtdll/Makefile.in
index 619fd59c5c4..ffdbb2ab7a1 100644
--- a/dlls/crtdll/Makefile.in
+++ b/dlls/crtdll/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES -D_CRTDLL -D_CRTIMP=
+EXTRADEFS = -D_CRTDLL -D_CRTIMP=
MODULE = crtdll.dll
IMPORTS = ntdll
DELAYIMPORTS = advapi32 user32
diff --git a/dlls/msvcirt/Makefile.in b/dlls/msvcirt/Makefile.in
index 995d890493b..2e3e3edc9ea 100644
--- a/dlls/msvcirt/Makefile.in
+++ b/dlls/msvcirt/Makefile.in
@@ -1,5 +1,5 @@
MODULE = msvcirt.dll
-EXTRADEFS = -DWINE_NO_LONG_TYPES -D_MSVCIRT
+EXTRADEFS = -D_MSVCIRT
PARENTSRC = ../msvcp90
IMPORTS = msvcrt
diff --git a/dlls/msvcirt/msvcirt.c b/dlls/msvcirt/msvcirt.c
index 1103ea309a0..35f532425d3 100644
--- a/dlls/msvcirt/msvcirt.c
+++ b/dlls/msvcirt/msvcirt.c
@@ -634,7 +634,7 @@ DEFINE_THISCALL_WRAPPER(streambuf_seekoff, 16)
#define call_streambuf_seekoff(this, off, dir, mode) CALL_VTBL_FUNC(this, 12, streampos, (streambuf*, streamoff, ios_seek_dir, int), (this, off, dir, mode))
streampos __thiscall streambuf_seekoff(streambuf *this, streamoff offset, ios_seek_dir dir, int mode)
{
- TRACE("(%p %d %d %d)\n", this, offset, dir, mode);
+ TRACE("(%p %ld %d %d)\n", this, offset, dir, mode);
return EOF;
}
@@ -643,7 +643,7 @@ streampos __thiscall streambuf_seekoff(streambuf *this, streamoff offset, ios_se
DEFINE_THISCALL_WRAPPER(streambuf_seekpos, 12)
streampos __thiscall streambuf_seekpos(streambuf *this, streampos pos, int mode)
{
- TRACE("(%p %d %d)\n", this, pos, mode);
+ TRACE("(%p %ld %d)\n", this, pos, mode);
return call_streambuf_seekoff(this, pos, SEEKDIR_beg, mode);
}
@@ -1181,7 +1181,7 @@ int __thiscall filebuf_overflow(filebuf *this, int c)
DEFINE_THISCALL_WRAPPER(filebuf_seekoff, 16)
streampos __thiscall filebuf_seekoff(filebuf *this, streamoff offset, ios_seek_dir dir, int mode)
{
- TRACE("(%p %d %d %d)\n", this, offset, dir, mode);
+ TRACE("(%p %ld %d %d)\n", this, offset, dir, mode);
if (call_streambuf_sync(&this->base) == EOF)
return EOF;
return _lseek(this->fd, offset, dir);
@@ -1520,7 +1520,7 @@ streampos __thiscall strstreambuf_seekoff(strstreambuf *this, streamoff offset,
{
char *base[3];
- TRACE("(%p %d %d %d)\n", this, offset, dir, mode);
+ TRACE("(%p %ld %d %d)\n", this, offset, dir, mode);
if ((unsigned int)dir > SEEKDIR_end || !(mode & (OPENMODE_in|OPENMODE_out)))
return EOF;
@@ -1720,7 +1720,7 @@ int __thiscall stdiobuf_pbackfail(stdiobuf *this, int c)
DEFINE_THISCALL_WRAPPER(stdiobuf_seekoff, 16)
streampos __thiscall stdiobuf_seekoff(stdiobuf *this, streamoff offset, ios_seek_dir dir, int mode)
{
- TRACE("(%p %d %d %d)\n", this, offset, dir, mode);
+ TRACE("(%p %ld %d %d)\n", this, offset, dir, mode);
call_streambuf_overflow(&this->base, EOF);
if (fseek(this->file, offset, dir))
return EOF;
@@ -2070,7 +2070,7 @@ LONG __thiscall ios_flags_set(ios *this, LONG flags)
{
LONG prev = this->flags;
- TRACE("(%p %x)\n", this, flags);
+ TRACE("(%p %lx)\n", this, flags);
this->flags = flags;
return prev;
@@ -2225,7 +2225,7 @@ LONG __thiscall ios_setf(ios *this, LONG flags)
{
LONG prev = this->flags;
- TRACE("(%p %x)\n", this, flags);
+ TRACE("(%p %lx)\n", this, flags);
ios_lock(this);
this->flags |= flags;
@@ -2240,7 +2240,7 @@ LONG __thiscall ios_setf_mask(ios *this, LONG flags, LONG mask)
{
LONG prev = this->flags;
- TRACE("(%p %x %x)\n", this, flags, mask);
+ TRACE("(%p %lx %lx)\n", this, flags, mask);
ios_lock(this);
this->flags = (this->flags & (~mask)) | (flags & mask);
@@ -2311,7 +2311,7 @@ LONG __thiscall ios_unsetf(ios *this, LONG flags)
{
LONG prev = this->flags;
- TRACE("(%p %x)\n", this, flags);
+ TRACE("(%p %lx)\n", this, flags);
ios_lock(this);
this->flags &= ~flags;
@@ -2607,7 +2607,7 @@ ostream* __thiscall ostream_seekp(ostream *this, streampos pos)
{
ios *base = ostream_get_ios(this);
- TRACE("(%p %d)\n", this, pos);
+ TRACE("(%p %ld)\n", this, pos);
ios_lockbuf(base);
if (streambuf_seekpos(base->sb, pos, OPENMODE_out) == EOF)
@@ -2623,7 +2623,7 @@ ostream* __thiscall ostream_seekp_offset(ostream *this, streamoff off, ios_seek_
{
ios *base = ostream_get_ios(this);
- TRACE("(%p %d %d)\n", this, off, dir);
+ TRACE("(%p %ld %d)\n", this, off, dir);
ios_lockbuf(base);
if (call_streambuf_seekoff(base->sb, off, dir, OPENMODE_out) == EOF)
@@ -3749,7 +3749,7 @@ istream* __thiscall istream_seekg(istream *this, streampos pos)
{
ios *base = istream_get_ios(this);
- TRACE("(%p %d)\n", this, pos);
+ TRACE("(%p %ld)\n", this, pos);
ios_lockbuf(base);
if (streambuf_seekpos(base->sb, pos, OPENMODE_in) == EOF)
@@ -3765,7 +3765,7 @@ istream* __thiscall istream_seekg_offset(istream *this, streamoff off, ios_seek_
{
ios *base = istream_get_ios(this);
- TRACE("(%p %d %d)\n", this, off, dir);
+ TRACE("(%p %ld %d)\n", this, off, dir);
ios_lockbuf(base);
if (call_streambuf_seekoff(base->sb, off, dir, OPENMODE_in) == EOF)
@@ -4010,7 +4010,7 @@ static LONG istream_internal_read_integer(istream *this, LONG min_value, LONG ma
int num_base;
LONG ret;
- TRACE("(%p %d %d %d)\n", this, min_value, max_value, set_flag);
+ TRACE("(%p %ld %ld %d)\n", this, min_value, max_value, set_flag);
num_base = istream_getint(this, buffer);
errno = 0;
@@ -4035,7 +4035,7 @@ static ULONG istream_internal_read_unsigned_integer(istream *this, LONG min_valu
int num_base;
ULONG ret;
- TRACE("(%p %d %u)\n", this, min_value, max_value);
+ TRACE("(%p %ld %lu)\n", this, min_value, max_value);
num_base = istream_getint(this, buffer);
errno = 0;
diff --git a/dlls/msvcp100/Makefile.in b/dlls/msvcp100/Makefile.in
index 35602aa4096..43416c92ad2 100644
--- a/dlls/msvcp100/Makefile.in
+++ b/dlls/msvcp100/Makefile.in
@@ -1,6 +1,6 @@
MODULE = msvcp100.dll
IMPORTS = msvcr100
-EXTRADEFS = -DWINE_NO_LONG_TYPES -D_MSVCP_VER=100
+EXTRADEFS = -D_MSVCP_VER=100
PARENTSRC = ../msvcp90
C_SRCS = \
diff --git a/dlls/msvcp110/Makefile.in b/dlls/msvcp110/Makefile.in
index 8046916629d..b2814b35cc3 100644
--- a/dlls/msvcp110/Makefile.in
+++ b/dlls/msvcp110/Makefile.in
@@ -1,6 +1,6 @@
MODULE = msvcp110.dll
IMPORTS = msvcr110
-EXTRADEFS = -DWINE_NO_LONG_TYPES -D_MSVCP_VER=110
+EXTRADEFS = -D_MSVCP_VER=110
PARENTSRC = ../msvcp90
C_SRCS = \
diff --git a/dlls/msvcp120/Makefile.in b/dlls/msvcp120/Makefile.in
index 896efa40f18..605dcfe4988 100644
--- a/dlls/msvcp120/Makefile.in
+++ b/dlls/msvcp120/Makefile.in
@@ -1,6 +1,6 @@
MODULE = msvcp120.dll
IMPORTS = msvcr120
-EXTRADEFS = -DWINE_NO_LONG_TYPES -D_MSVCP_VER=120
+EXTRADEFS = -D_MSVCP_VER=120
PARENTSRC = ../msvcp90
C_SRCS = \
diff --git a/dlls/msvcp140/Makefile.in b/dlls/msvcp140/Makefile.in
index d26db254d76..eb0c8c3ef39 100644
--- a/dlls/msvcp140/Makefile.in
+++ b/dlls/msvcp140/Makefile.in
@@ -1,5 +1,5 @@
MODULE = msvcp140.dll
-EXTRADEFS = -DWINE_NO_LONG_TYPES -D_MSVCP_VER=140
+EXTRADEFS = -D_MSVCP_VER=140
PARENTSRC = ../msvcp90
IMPORTLIB = msvcp140
diff --git a/dlls/msvcp60/Makefile.in b/dlls/msvcp60/Makefile.in
index 6c3626ee470..90dc3c03ff1 100644
--- a/dlls/msvcp60/Makefile.in
+++ b/dlls/msvcp60/Makefile.in
@@ -1,5 +1,5 @@
MODULE = msvcp60.dll
-EXTRADEFS = -DWINE_NO_LONG_TYPES -D_MSVCP_VER=60
+EXTRADEFS = -D_MSVCP_VER=60
PARENTSRC = ../msvcp90
IMPORTS = msvcrt
diff --git a/dlls/msvcp60/main.c b/dlls/msvcp60/main.c
index cecea919bed..5d1894cb073 100644
--- a/dlls/msvcp60/main.c
+++ b/dlls/msvcp60/main.c
@@ -94,7 +94,7 @@ static void init_cxx_funcs(void)
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
- TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
+ TRACE("(0x%p, %ld, %p)\n", hinstDLL, fdwReason, lpvReserved);
switch (fdwReason)
{
diff --git a/dlls/msvcp70/Makefile.in b/dlls/msvcp70/Makefile.in
index 0f402323581..36ba70b761b 100644
--- a/dlls/msvcp70/Makefile.in
+++ b/dlls/msvcp70/Makefile.in
@@ -1,6 +1,6 @@
MODULE = msvcp70.dll
IMPORTS = msvcr70
-EXTRADEFS = -DWINE_NO_LONG_TYPES -D_MSVCP_VER=70
+EXTRADEFS = -D_MSVCP_VER=70
PARENTSRC = ../msvcp90
C_SRCS = \
diff --git a/dlls/msvcp71/Makefile.in b/dlls/msvcp71/Makefile.in
index d84b2c1c24d..dfa0a2b23d5 100644
--- a/dlls/msvcp71/Makefile.in
+++ b/dlls/msvcp71/Makefile.in
@@ -1,6 +1,6 @@
MODULE = msvcp71.dll
IMPORTS = msvcr71
-EXTRADEFS = -DWINE_NO_LONG_TYPES -D_MSVCP_VER=71
+EXTRADEFS = -D_MSVCP_VER=71
PARENTSRC = ../msvcp90
C_SRCS = \
diff --git a/dlls/msvcp80/Makefile.in b/dlls/msvcp80/Makefile.in
index 1cc21b853ab..c541c1b0d11 100644
--- a/dlls/msvcp80/Makefile.in
+++ b/dlls/msvcp80/Makefile.in
@@ -1,6 +1,6 @@
MODULE = msvcp80.dll
IMPORTS = msvcr80
-EXTRADEFS = -DWINE_NO_LONG_TYPES -D_MSVCP_VER=80
+EXTRADEFS = -D_MSVCP_VER=80
PARENTSRC = ../msvcp90
C_SRCS = \
diff --git a/dlls/msvcp90/Makefile.in b/dlls/msvcp90/Makefile.in
index 0d06a710d29..5d812db58d9 100644
--- a/dlls/msvcp90/Makefile.in
+++ b/dlls/msvcp90/Makefile.in
@@ -1,6 +1,6 @@
MODULE = msvcp90.dll
IMPORTS = msvcr90
-EXTRADEFS = -DWINE_NO_LONG_TYPES -D_MSVCP_VER=90
+EXTRADEFS = -D_MSVCP_VER=90
C_SRCS = \
details.c \
diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c
index dd7fea203eb..6be2bad1a38 100644
--- a/dlls/msvcp90/locale.c
+++ b/dlls/msvcp90/locale.c
@@ -7476,7 +7476,7 @@ ostreambuf_iterator_char* __thiscall num_put_char_do_put_long(const num_put *thi
char tmp[48]; /* 22(8^22>2^64)*2(separators between every digit) + 3(strlen("+0x"))+1 */
char fmt[7]; /* strlen("%+#lld")+1 */
- TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v);
+ TRACE("(%p %p %p %d %ld)\n", this, ret, base, fill, v);
return num_put_char__Iput(this, ret, dest, base, fill, tmp,
sprintf(tmp, num_put_char__Ifmt(this, fmt, "ld", base->fmtfl), v));
@@ -7492,7 +7492,7 @@ DEFINE_THISCALL_WRAPPER(num_put_char_put_long, 32)
ostreambuf_iterator_char* __thiscall num_put_char_put_long(const num_put *this, ostreambuf_iterator_char *ret,
ostreambuf_iterator_char dest, ios_base *base, char fill, LONG v)
{
- TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v);
+ TRACE("(%p %p %p %d %ld)\n", this, ret, base, fill, v);
return call_num_put_char_do_put_long(this, ret, dest, base, fill, v);
}
@@ -7518,7 +7518,7 @@ ostreambuf_iterator_char* __thiscall num_put_char_do_put_ulong(const num_put *th
char tmp[48]; /* 22(8^22>2^64)*2(separators between every digit) + 3(strlen("+0x"))+1 */
char fmt[7]; /* strlen("%+#lld")+1 */
- TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v);
+ TRACE("(%p %p %p %d %ld)\n", this, ret, base, fill, v);
return num_put_char__Iput(this, ret, dest, base, fill, tmp,
sprintf(tmp, num_put_char__Ifmt(this, fmt, "lu", base->fmtfl), v));
@@ -7534,7 +7534,7 @@ DEFINE_THISCALL_WRAPPER(num_put_char_put_ulong, 32)
ostreambuf_iterator_char* __thiscall num_put_char_put_ulong(const num_put *this, ostreambuf_iterator_char *ret,
ostreambuf_iterator_char dest, ios_base *base, char fill, ULONG v)
{
- TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v);
+ TRACE("(%p %p %p %d %ld)\n", this, ret, base, fill, v);
return call_num_put_char_do_put_ulong(this, ret, dest, base, fill, v);
}
@@ -8375,7 +8375,7 @@ ostreambuf_iterator_wchar* __thiscall num_put_wchar_do_put_long(const num_put *t
char tmp[48]; /* 22(8^22>2^64)*2(separators between every digit) + 3(strlen("+0x"))+1 */
char fmt[7]; /* strlen("%+#lld")+1 */
- TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v);
+ TRACE("(%p %p %p %d %ld)\n", this, ret, base, fill, v);
return num_put_wchar__Iput(this, ret, dest, base, fill, tmp,
sprintf(tmp, num_put_wchar__Ifmt(this, fmt, "ld", base->fmtfl), v));
@@ -8394,7 +8394,7 @@ ostreambuf_iterator_wchar* __thiscall num_put_short_do_put_long(const num_put *t
char tmp[48]; /* 22(8^22>2^64)*2(separators between every digit) + 3(strlen("+0x"))+1 */
char fmt[7]; /* strlen("%+#lld")+1 */
- TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v);
+ TRACE("(%p %p %p %d %ld)\n", this, ret, base, fill, v);
return num_put_short__Iput(this, ret, dest, base, fill, tmp,
sprintf(tmp, num_put_wchar__Ifmt(this, fmt, "ld", base->fmtfl), v));
@@ -8412,7 +8412,7 @@ DEFINE_THISCALL_WRAPPER(num_put_wchar_put_long, 32)
ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_long(const num_put *this, ostreambuf_iterator_wchar *ret,
ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, LONG v)
{
- TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v);
+ TRACE("(%p %p %p %d %ld)\n", this, ret, base, fill, v);
return call_num_put_wchar_do_put_long(this, ret, dest, base, fill, v);
}
@@ -8438,7 +8438,7 @@ ostreambuf_iterator_wchar* __thiscall num_put_wchar_do_put_ulong(const num_put *
char tmp[48]; /* 22(8^22>2^64)*2(separators between every digit) + 3(strlen("+0x"))+1 */
char fmt[7]; /* strlen("%+#lld")+1 */
- TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v);
+ TRACE("(%p %p %p %d %ld)\n", this, ret, base, fill, v);
return num_put_wchar__Iput(this, ret, dest, base, fill, tmp,
sprintf(tmp, num_put_wchar__Ifmt(this, fmt, "lu", base->fmtfl), v));
@@ -8457,7 +8457,7 @@ ostreambuf_iterator_wchar* __thiscall num_put_short_do_put_ulong(const num_put *
char tmp[48]; /* 22(8^22>2^64)*2(separators between every digit) + 3(strlen("+0x"))+1 */
char fmt[7]; /* strlen("%+#lld")+1 */
- TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v);
+ TRACE("(%p %p %p %d %ld)\n", this, ret, base, fill, v);
return num_put_short__Iput(this, ret, dest, base, fill, tmp,
sprintf(tmp, num_put_wchar__Ifmt(this, fmt, "lu", base->fmtfl), v));
@@ -8475,7 +8475,7 @@ DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ulong, 32)
ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_ulong(const num_put *this, ostreambuf_iterator_wchar *ret,
ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, ULONG v)
{
- TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v);
+ TRACE("(%p %p %p %d %ld)\n", this, ret, base, fill, v);
return call_num_put_wchar_do_put_ulong(this, ret, dest, base, fill, v);
}
diff --git a/dlls/msvcp90/misc.c b/dlls/msvcp90/misc.c
index 2d309911f10..c7856e0e33d 100644
--- a/dlls/msvcp90/misc.c
+++ b/dlls/msvcp90/misc.c
@@ -1224,13 +1224,13 @@ typedef int (__cdecl *_Thrd_start_t)(void*);
int __cdecl _Thrd_equal(_Thrd_t a, _Thrd_t b)
{
- TRACE("(%p %u %p %u)\n", a.hnd, a.id, b.hnd, b.id);
+ TRACE("(%p %lu %p %lu)\n", a.hnd, a.id, b.hnd, b.id);
return a.id == b.id;
}
int __cdecl _Thrd_lt(_Thrd_t a, _Thrd_t b)
{
- TRACE("(%p %u %p %u)\n", a.hnd, a.id, b.hnd, b.id);
+ TRACE("(%p %lu %p %lu)\n", a.hnd, a.id, b.hnd, b.id);
return a.id < b.id;
}
@@ -1258,7 +1258,7 @@ static _Thrd_t thread_current(void)
}
ret.id = GetCurrentThreadId();
- TRACE("(%p %u)\n", ret.hnd, ret.id);
+ TRACE("(%p %lu)\n", ret.hnd, ret.id);
return ret;
}
@@ -1284,7 +1284,7 @@ ULONGLONG __cdecl _Thrd_current(void)
int __cdecl _Thrd_join(_Thrd_t thr, int *code)
{
- TRACE("(%p %u %p)\n", thr.hnd, thr.id, code);
+ TRACE("(%p %lu %p)\n", thr.hnd, thr.id, code);
if (WaitForSingleObject(thr.hnd, INFINITE))
return _THRD_ERROR;
@@ -1469,7 +1469,7 @@ void __thiscall _Pad__Release(_Pad *this)
BOOL CDECL MSVCP__crtInitializeCriticalSectionEx(
CRITICAL_SECTION *cs, DWORD spin_count, DWORD flags)
{
- TRACE("(%p %x %x)\n", cs, spin_count, flags);
+ TRACE("(%p %lx %lx)\n", cs, spin_count, flags);
return InitializeCriticalSectionEx(cs, spin_count, flags);
}
@@ -1479,7 +1479,7 @@ BOOL CDECL MSVCP__crtInitializeCriticalSectionEx(
HANDLE CDECL MSVCP__crtCreateEventExW(
SECURITY_ATTRIBUTES *attribs, LPCWSTR name, DWORD flags, DWORD access)
{
- TRACE("(%p %s 0x%08x 0x%08x)\n", attribs, debugstr_w(name), flags, access);
+ TRACE("(%p %s 0x%08lx 0x%08lx)\n", attribs, debugstr_w(name), flags, access);
return CreateEventExW(attribs, name, flags, access);
}
@@ -1514,7 +1514,7 @@ HANDLE CDECL MSVCP__crtCreateSemaphoreExW(
SECURITY_ATTRIBUTES *attribs, LONG initial_count, LONG max_count, LPCWSTR name,
DWORD flags, DWORD access)
{
- TRACE("(%p %d %d %s 0x%08x 0x%08x)\n", attribs, initial_count, max_count, debugstr_w(name),
+ TRACE("(%p %ld %ld %s 0x%08lx 0x%08lx)\n", attribs, initial_count, max_count, debugstr_w(name),
flags, access);
return CreateSemaphoreExW(attribs, initial_count, max_count, name, flags, access);
}
@@ -1544,7 +1544,7 @@ VOID CDECL MSVCP__crtCloseThreadpoolTimer(TP_TIMER *timer)
VOID CDECL MSVCP__crtSetThreadpoolTimer(TP_TIMER *timer,
FILETIME *due_time, DWORD period, DWORD window_length)
{
- TRACE("(%p %p 0x%08x 0x%08x)\n", timer, due_time, period, window_length);
+ TRACE("(%p %p 0x%08lx 0x%08lx)\n", timer, due_time, period, window_length);
return SetThreadpoolTimer(timer, due_time, period, window_length);
}
@@ -1699,7 +1699,7 @@ const char* __cdecl _Syserror_map(int err)
/* ?_Winerror_message(a)std@@YAKKPEADK(a)Z */
ULONG __cdecl _Winerror_message(ULONG err, char *buf, ULONG size)
{
- TRACE("(%u %p %u)\n", err, buf, size);
+ TRACE("(%lu %p %lu)\n", err, buf, size);
return FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, err, 0, buf, size, NULL);
diff --git a/dlls/msvcp90/msvcp_main.c b/dlls/msvcp90/msvcp_main.c
index 7f61f59a078..cf37631da0e 100644
--- a/dlls/msvcp90/msvcp_main.c
+++ b/dlls/msvcp90/msvcp_main.c
@@ -189,7 +189,7 @@ static void init_cxx_funcs(void)
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
- TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
+ TRACE("(0x%p, %ld, %p)\n", hinstDLL, fdwReason, lpvReserved);
switch (fdwReason)
{
diff --git a/dlls/msvcr100/Makefile.in b/dlls/msvcr100/Makefile.in
index 94962b962f3..a48ae314257 100644
--- a/dlls/msvcr100/Makefile.in
+++ b/dlls/msvcr100/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES -D_CRTIMP=
+EXTRADEFS = -D_CRTIMP=
MODULE = msvcr100.dll
IMPORTLIB = msvcr100
IMPORTS = ntdll
diff --git a/dlls/msvcr110/Makefile.in b/dlls/msvcr110/Makefile.in
index 7d5ec65444a..26db1d46f7a 100644
--- a/dlls/msvcr110/Makefile.in
+++ b/dlls/msvcr110/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES -D_CRTIMP=
+EXTRADEFS = -D_CRTIMP=
MODULE = msvcr110.dll
IMPORTLIB = msvcr110
IMPORTS = ntdll
diff --git a/dlls/msvcr120/Makefile.in b/dlls/msvcr120/Makefile.in
index c4cbb9ab5c2..d2957c2f1d3 100644
--- a/dlls/msvcr120/Makefile.in
+++ b/dlls/msvcr120/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES -D_CRTIMP=
+EXTRADEFS = -D_CRTIMP=
MODULE = msvcr120.dll
IMPORTLIB = msvcr120
IMPORTS = ntdll
diff --git a/dlls/msvcr70/Makefile.in b/dlls/msvcr70/Makefile.in
index ac08107c04e..4383c5ccb87 100644
--- a/dlls/msvcr70/Makefile.in
+++ b/dlls/msvcr70/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES -D_CRTIMP=
+EXTRADEFS = -D_CRTIMP=
MODULE = msvcr70.dll
IMPORTLIB = msvcr70
IMPORTS = ntdll
diff --git a/dlls/msvcr71/Makefile.in b/dlls/msvcr71/Makefile.in
index d0d265ef344..5a83c81c547 100644
--- a/dlls/msvcr71/Makefile.in
+++ b/dlls/msvcr71/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES -D_CRTIMP=
+EXTRADEFS = -D_CRTIMP=
MODULE = msvcr71.dll
IMPORTLIB = msvcr71
IMPORTS = ntdll
diff --git a/dlls/msvcr80/Makefile.in b/dlls/msvcr80/Makefile.in
index b9cb3fd88d8..2153949b41e 100644
--- a/dlls/msvcr80/Makefile.in
+++ b/dlls/msvcr80/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES -D_CRTIMP=
+EXTRADEFS = -D_CRTIMP=
MODULE = msvcr80.dll
IMPORTLIB = msvcr80
IMPORTS = ntdll
diff --git a/dlls/msvcr90/Makefile.in b/dlls/msvcr90/Makefile.in
index 876553d6c02..96176a12553 100644
--- a/dlls/msvcr90/Makefile.in
+++ b/dlls/msvcr90/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES -D_CRTIMP=
+EXTRADEFS = -D_CRTIMP=
MODULE = msvcr90.dll
IMPORTLIB = msvcr90
IMPORTS = ntdll
diff --git a/dlls/msvcrt/Makefile.in b/dlls/msvcrt/Makefile.in
index d6aa44dd7ce..e8a510d9937 100644
--- a/dlls/msvcrt/Makefile.in
+++ b/dlls/msvcrt/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES -D_CRTIMP=
+EXTRADEFS = -D_CRTIMP=
MODULE = msvcrt.dll
IMPORTLIB = msvcrt
IMPORTS = ntdll
diff --git a/dlls/msvcrt/concurrency.c b/dlls/msvcrt/concurrency.c
index 6afe6e81489..e5a24f13855 100644
--- a/dlls/msvcrt/concurrency.c
+++ b/dlls/msvcrt/concurrency.c
@@ -527,7 +527,7 @@ DEFINE_THISCALL_WRAPPER(scheduler_resource_allocation_error_ctor_name, 12)
scheduler_resource_allocation_error* __thiscall scheduler_resource_allocation_error_ctor_name(
scheduler_resource_allocation_error *this, const char *name, HRESULT hr)
{
- TRACE("(%p %s %x)\n", this, wine_dbgstr_a(name), hr);
+ TRACE("(%p %s %lx)\n", this, wine_dbgstr_a(name), hr);
__exception_ctor(&this->e, name, &scheduler_resource_allocation_error_vtable);
this->hr = hr;
return this;
@@ -1101,7 +1101,7 @@ static void ThreadScheduler_dtor(ThreadScheduler *this)
{
int i;
- if(this->ref != 0) WARN("ref = %d\n", this->ref);
+ if(this->ref != 0) WARN("ref = %ld\n", this->ref);
SchedulerPolicy_dtor(&this->policy);
for(i=0; i<this->shutdown_count; i++)
diff --git a/dlls/msvcrt/console.c b/dlls/msvcrt/console.c
index 3e41887e88e..2c549c1e7a5 100644
--- a/dlls/msvcrt/console.c
+++ b/dlls/msvcrt/console.c
@@ -153,7 +153,7 @@ static BOOL handle_enhanced_keys(INPUT_RECORD *ir, unsigned char *ch1, unsigned
}
}
- WARN("Unmapped char keyState=%x vk=%x\n",
+ WARN("Unmapped char keyState=%lx vk=%x\n",
ir->Event.KeyEvent.dwControlKeyState, ir->Event.KeyEvent.wVirtualScanCode);
return FALSE;
}
diff --git a/dlls/msvcrt/except.c b/dlls/msvcrt/except.c
index ac0bb50f0fb..a7140a9011f 100644
--- a/dlls/msvcrt/except.c
+++ b/dlls/msvcrt/except.c
@@ -272,7 +272,7 @@ int CDECL raise(int sig)
*/
int CDECL _XcptFilter(NTSTATUS ex, PEXCEPTION_POINTERS ptr)
{
- TRACE("(%08x,%p)\n", ex, ptr);
+ TRACE("(%08lx,%p)\n", ex, ptr);
/* I assume ptr->ExceptionRecord->ExceptionCode is the same as ex */
return msvcrt_exception_filter(ptr);
}
diff --git a/dlls/msvcrt/except_i386.c b/dlls/msvcrt/except_i386.c
index 23a027368ba..eb41af36d7e 100644
--- a/dlls/msvcrt/except_i386.c
+++ b/dlls/msvcrt/except_i386.c
@@ -368,7 +368,7 @@ static DWORD catch_function_nested_handler( EXCEPTION_RECORD *rec, EXCEPTION_REG
*rec = *prev_rec;
rec->ExceptionFlags &= ~EH_UNWINDING;
if(TRACE_ON(seh)) {
- TRACE("detect rethrow: exception code: %x\n", rec->ExceptionCode);
+ TRACE("detect rethrow: exception code: %lx\n", rec->ExceptionCode);
if(rec->ExceptionCode == CXX_EXCEPTION)
TRACE("re-propagate: obj: %lx, type: %lx\n",
rec->ExceptionInformation[1], rec->ExceptionInformation[2]);
@@ -538,7 +538,7 @@ static LONG CALLBACK se_translation_filter( EXCEPTION_POINTERS *ep, void *c )
if (rec->ExceptionCode != CXX_EXCEPTION)
{
- TRACE( "non-c++ exception thrown in SEH handler: %x\n", rec->ExceptionCode );
+ TRACE( "non-c++ exception thrown in SEH handler: %lx\n", rec->ExceptionCode );
terminate();
}
@@ -601,7 +601,7 @@ DWORD CDECL cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame
*rec = *msvcrt_get_thread_data()->exc_record;
rec->ExceptionFlags &= ~EH_UNWINDING;
if(TRACE_ON(seh)) {
- TRACE("detect rethrow: exception code: %x\n", rec->ExceptionCode);
+ TRACE("detect rethrow: exception code: %lx\n", rec->ExceptionCode);
if(rec->ExceptionCode == CXX_EXCEPTION)
TRACE("re-propagate: obj: %lx, type: %lx\n",
rec->ExceptionInformation[1], rec->ExceptionInformation[2]);
@@ -633,7 +633,7 @@ DWORD CDECL cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame
thread_data_t *data = msvcrt_get_thread_data();
exc_type = NULL;
- TRACE("handling C exception code %x rec %p frame %p trylevel %d descr %p nested_frame %p\n",
+ TRACE("handling C exception code %lx rec %p frame %p trylevel %d descr %p nested_frame %p\n",
rec->ExceptionCode, rec, frame, frame->trylevel, descr, nested_frame );
if (data->se_translator) {
@@ -866,7 +866,7 @@ int CDECL _except_handler2(PEXCEPTION_RECORD rec,
PCONTEXT context,
EXCEPTION_REGISTRATION_RECORD** dispatcher)
{
- FIXME("exception %x flags=%x at %p handler=%p %p %p stub\n",
+ FIXME("exception %lx flags=%lx at %p handler=%p %p %p stub\n",
rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionAddress,
frame->Handler, context, dispatcher);
return ExceptionContinueSearch;
@@ -883,7 +883,7 @@ int CDECL _except_handler3(PEXCEPTION_RECORD rec,
EXCEPTION_POINTERS exceptPtrs;
PSCOPETABLE pScopeTable;
- TRACE("exception %x flags=%x at %p handler=%p %p %p semi-stub\n",
+ TRACE("exception %lx flags=%lx at %p handler=%p %p %p semi-stub\n",
rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionAddress,
frame->handler, context, dispatcher);
@@ -952,7 +952,7 @@ int CDECL _except_handler4_common( ULONG *cookie, void (*check_cookie)(void),
EXCEPTION_POINTERS exceptPtrs;
const SCOPETABLE_V4 *scope_table = get_scopetable_v4( frame, *cookie );
- TRACE( "exception %x flags=%x at %p handler=%p %p %p cookie=%x scope table=%p cookies=%d/%x,%d/%x\n",
+ TRACE( "exception %lx flags=%lx at %p handler=%p %p %p cookie=%lx scope table=%p cookies=%d/%lx,%d/%lx\n",
rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionAddress,
frame->handler, context, dispatcher, *cookie, scope_table,
scope_table->gs_cookie_offset, scope_table->gs_cookie_xor,
@@ -1187,7 +1187,7 @@ int __cdecl _fpieee_flt(__msvcrt_ulong exception_code, EXCEPTION_POINTERS *ep,
rec.Cause.Underflow = rec.Enable.Underflow & rec.Status.Underflow;
rec.Cause.Inexact = rec.Enable.Inexact & rec.Status.Inexact;
- TRACE("opcode: %x\n", *(ULONG*)ep->ContextRecord->FloatSave.ErrorOffset);
+ TRACE("opcode: %lx\n", *(ULONG*)ep->ContextRecord->FloatSave.ErrorOffset);
if(*(WORD*)ctx->ErrorOffset == 0x35dc) { /* fdiv m64fp */
if(exception_code==STATUS_FLOAT_DIVIDE_BY_ZERO || exception_code==STATUS_FLOAT_INVALID_OPERATION) {
@@ -1213,7 +1213,7 @@ int __cdecl _fpieee_flt(__msvcrt_ulong exception_code, EXCEPTION_POINTERS *ep,
return ret;
}
- FIXME("unsupported opcode: %x\n", *(ULONG*)ep->ContextRecord->FloatSave.ErrorOffset);
+ FIXME("unsupported opcode: %lx\n", *(ULONG*)ep->ContextRecord->FloatSave.ErrorOffset);
return EXCEPTION_CONTINUE_SEARCH;
}
diff --git a/dlls/msvcrt/except_x86_64.c b/dlls/msvcrt/except_x86_64.c
index 7cbffc0d837..4ef143100d6 100644
--- a/dlls/msvcrt/except_x86_64.c
+++ b/dlls/msvcrt/except_x86_64.c
@@ -350,7 +350,7 @@ static void* WINAPI call_catch_block(EXCEPTION_RECORD *rec)
}
__EXCEPT_CTX(cxx_rethrow_filter, &ctx)
{
- TRACE("detect rethrow: exception code: %x\n", prev_rec->ExceptionCode);
+ TRACE("detect rethrow: exception code: %lx\n", prev_rec->ExceptionCode);
ctx.rethrow = TRUE;
if (untrans_rec)
@@ -486,7 +486,7 @@ static LONG CALLBACK se_translation_filter(EXCEPTION_POINTERS *ep, void *c)
if (rec->ExceptionCode != CXX_EXCEPTION)
{
- TRACE("non-c++ exception thrown in SEH handler: %x\n", rec->ExceptionCode);
+ TRACE("non-c++ exception thrown in SEH handler: %lx\n", rec->ExceptionCode);
terminate();
}
@@ -558,7 +558,7 @@ static DWORD cxx_frame_handler(EXCEPTION_RECORD *rec, ULONG64 frame,
TRACE("nested exception detected\n");
unwindlevel = tryblock->end_level;
orig_frame = *(ULONG64*)rva_to_ptr(catchblock->frame, frame);
- TRACE("setting orig_frame to %lx\n", orig_frame);
+ TRACE("setting orig_frame to %Ix\n", orig_frame);
}
}
}
@@ -591,7 +591,7 @@ static DWORD cxx_frame_handler(EXCEPTION_RECORD *rec, ULONG64 frame,
if (TRACE_ON(seh))
{
- TRACE("handling C++ exception rec %p frame %lx descr %p\n", rec, frame, descr);
+ TRACE("handling C++ exception rec %p frame %Ix descr %p\n", rec, frame, descr);
dump_exception_type(exc_type, rec->ExceptionInformation[3]);
dump_function_descr(descr, dispatch->ImageBase);
}
@@ -601,7 +601,7 @@ static DWORD cxx_frame_handler(EXCEPTION_RECORD *rec, ULONG64 frame,
thread_data_t *data = msvcrt_get_thread_data();
exc_type = NULL;
- TRACE("handling C exception code %x rec %p frame %lx descr %p\n",
+ TRACE("handling C exception code %lx rec %p frame %Ix descr %p\n",
rec->ExceptionCode, rec, frame, descr);
if (data->se_translator) {
@@ -647,7 +647,7 @@ int CDECL __CxxExceptionFilter( PEXCEPTION_POINTERS ptrs,
EXCEPTION_DISPOSITION CDECL __CxxFrameHandler( EXCEPTION_RECORD *rec, ULONG64 frame,
CONTEXT *context, DISPATCHER_CONTEXT *dispatch )
{
- TRACE( "%p %lx %p %p\n", rec, frame, context, dispatch );
+ TRACE( "%p %Ix %p %p\n", rec, frame, context, dispatch );
return cxx_frame_handler( rec, frame, context, dispatch,
rva_to_ptr(*(UINT*)dispatch->HandlerData, dispatch->ImageBase) );
}
diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c
index 2666492956c..6ae16cd496a 100644
--- a/dlls/msvcrt/file.c
+++ b/dlls/msvcrt/file.c
@@ -822,7 +822,7 @@ int CDECL _access(const char *filename, int mode)
{
DWORD attr = GetFileAttributesA(filename);
- TRACE("(%s,%d) %d\n",filename,mode,attr);
+ TRACE("(%s,%d) %ld\n",filename,mode,attr);
if (!filename || attr == INVALID_FILE_ATTRIBUTES)
{
@@ -857,7 +857,7 @@ int CDECL _waccess(const wchar_t *filename, int mode)
{
DWORD attr = GetFileAttributesW(filename);
- TRACE("(%s,%d) %d\n",debugstr_w(filename),mode,attr);
+ TRACE("(%s,%d) %ld\n",debugstr_w(filename),mode,attr);
if (!filename || attr == INVALID_FILE_ATTRIBUTES)
{
@@ -931,7 +931,7 @@ int CDECL _unlink(const char *path)
TRACE("%s\n",debugstr_a(path));
if(DeleteFileA(path))
return 0;
- TRACE("failed (%d)\n",GetLastError());
+ TRACE("failed (%ld)\n",GetLastError());
msvcrt_set_errno(GetLastError());
return -1;
}
@@ -944,7 +944,7 @@ int CDECL _wunlink(const wchar_t *path)
TRACE("(%s)\n",debugstr_w(path));
if(DeleteFileW(path))
return 0;
- TRACE("failed (%d)\n",GetLastError());
+ TRACE("failed (%ld)\n",GetLastError());
msvcrt_set_errno(GetLastError());
return -1;
}
@@ -972,7 +972,7 @@ int CDECL _commit(int fd)
}
else
{
- TRACE(":failed-last error (%d)\n",GetLastError());
+ TRACE(":failed-last error (%ld)\n",GetLastError());
msvcrt_set_errno(GetLastError());
ret = -1;
}
@@ -1083,7 +1083,7 @@ int CDECL _close(int fd)
ret = CloseHandle(info->handle) ? 0 : -1;
msvcrt_free_fd(fd);
if (ret) {
- WARN(":failed-last error (%d)\n",GetLastError());
+ WARN(":failed-last error (%ld)\n",GetLastError());
msvcrt_set_errno(GetLastError());
}
}
@@ -1309,7 +1309,7 @@ __int64 CDECL _lseeki64(int fd, __int64 offset, int whence)
return ofs.QuadPart;
}
release_ioinfo(info);
- TRACE(":error-last error (%d)\n",GetLastError());
+ TRACE(":error-last error (%ld)\n",GetLastError());
msvcrt_set_errno(GetLastError());
return -1;
}
@@ -1369,7 +1369,7 @@ int CDECL _locking(int fd, int mode, __msvcrt_long nbytes)
return -1;
}
- TRACE(":fd (%d) by 0x%08Ix mode %s\n",
+ TRACE(":fd (%d) by 0x0%lx mode %s\n",
fd,nbytes,(mode==_LK_UNLCK)?"_LK_UNLCK":
(mode==_LK_LOCK)?"_LK_LOCK":
(mode==_LK_NBLCK)?"_LK_NBLCK":
@@ -1802,7 +1802,7 @@ int CDECL _fstat64(int fd, struct _stat64* buf)
if ((status = NtQueryInformationFile( info->handle, &io, &basic_info, sizeof(basic_info), FileBasicInformation )) ||
(status = NtQueryInformationFile( info->handle, &io, &std_info, sizeof(std_info), FileStandardInformation )))
{
- WARN(":failed-error %x\n",status);
+ WARN(":failed-error %lx\n",status);
msvcrt_set_errno(ERROR_INVALID_PARAMETER);
release_ioinfo(info);
return -1;
@@ -1816,7 +1816,7 @@ int CDECL _fstat64(int fd, struct _stat64* buf)
RtlTimeToSecondsSince1970((LARGE_INTEGER *)&basic_info.LastWriteTime, &dw);
buf->st_mtime = buf->st_ctime = dw;
buf->st_nlink = std_info.NumberOfLinks;
- TRACE(":dwFileAttributes = 0x%x, mode set to 0x%x\n",basic_info.FileAttributes, buf->st_mode);
+ TRACE(":dwFileAttributes = 0x%lx, mode set to 0x%x\n",basic_info.FileAttributes, buf->st_mode);
}
release_ioinfo(info);
return 0;
@@ -2303,7 +2303,7 @@ int CDECL _wsopen_dispatch( const wchar_t* path, int oflags, int shflags, int pm
hand = CreateFileW(path, access, sharing, &sa, creation, attrib, 0);
if (hand == INVALID_HANDLE_VALUE) {
- WARN(":failed-last error (%d)\n",GetLastError());
+ WARN(":failed-last error (%ld)\n",GetLastError());
msvcrt_set_errno(GetLastError());
return *_errno();
}
@@ -2547,7 +2547,7 @@ int CDECL _open_osfhandle(intptr_t handle, int oflags)
flags |= split_oflags(oflags);
fd = msvcrt_alloc_fd((HANDLE)handle, flags);
- TRACE(":handle (%Iu) fd (%d) flags 0x%08x\n", handle, fd, flags);
+ TRACE(":handle (%Iu) fd (%d) flags 0x%08lx\n", handle, fd, flags);
return fd;
}
@@ -2913,14 +2913,14 @@ static int read_i(int fd, ioinfo *fdinfo, void *buf, unsigned int count)
}
else
{
- TRACE(":failed-last error (%d)\n",GetLastError());
+ TRACE(":failed-last error (%ld)\n",GetLastError());
msvcrt_set_errno(GetLastError());
return -1;
}
}
if (count > 4)
- TRACE("(%u), %s\n",num_read,debugstr_an(buf, num_read));
+ TRACE("(%lu), %s\n",num_read,debugstr_an(buf, num_read));
return num_read;
}
@@ -3016,7 +3016,7 @@ int CDECL _stat64(const char* path, struct _stat64 * buf)
if (!GetFileAttributesExA(path, GetFileExInfoStandard, &hfi))
{
- TRACE("failed (%d)\n",GetLastError());
+ TRACE("failed (%ld)\n",GetLastError());
*_errno() = ENOENT;
return -1;
}
@@ -3172,7 +3172,7 @@ int CDECL _wstat64(const wchar_t* path, struct _stat64 * buf)
if (!GetFileAttributesExW(path, GetFileExInfoStandard, &hfi))
{
- TRACE("failed (%d)\n",GetLastError());
+ TRACE("failed (%ld)\n",GetLastError());
*_errno() = ENOENT;
return -1;
}
@@ -3323,7 +3323,7 @@ char * CDECL _tempnam(const char *dir, const char *prefix)
DeleteFileA(tmpbuf);
return _strdup(tmpbuf);
}
- TRACE("failed (%d)\n",GetLastError());
+ TRACE("failed (%ld)\n",GetLastError());
return NULL;
}
@@ -3344,7 +3344,7 @@ wchar_t * CDECL _wtempnam(const wchar_t *dir, const wchar_t *prefix)
DeleteFileW(tmpbuf);
return _wcsdup(tmpbuf);
}
- TRACE("failed (%d)\n",GetLastError());
+ TRACE("failed (%ld)\n",GetLastError());
return NULL;
}
@@ -3456,7 +3456,7 @@ int CDECL _write(int fd, const void* buf, unsigned int count)
if (!WriteFile(hand, buf, count, &num_written, NULL)
|| num_written != count)
{
- TRACE("WriteFile (fd %d, hand %p) failed-last error (%d)\n", fd,
+ TRACE("WriteFile (fd %d, hand %p) failed-last error (%ld)\n", fd,
hand, GetLastError());
msvcrt_set_errno(GetLastError());
num_written = -1;
@@ -3584,7 +3584,7 @@ int CDECL _write(int fd, const void* buf, unsigned int count)
if (num_written != j)
{
- TRACE("WriteFile/WriteConsoleW (fd %d, hand %p) failed-last error (%d)\n", fd,
+ TRACE("WriteFile/WriteConsoleW (fd %d, hand %p) failed-last error (%ld)\n", fd,
hand, GetLastError());
msvcrt_set_errno(GetLastError());
release_ioinfo(info);
@@ -4843,7 +4843,7 @@ int CDECL remove(const char *path)
TRACE("(%s)\n",path);
if (DeleteFileA(path))
return 0;
- TRACE(":failed (%d)\n",GetLastError());
+ TRACE(":failed (%ld)\n",GetLastError());
msvcrt_set_errno(GetLastError());
return -1;
}
@@ -4856,7 +4856,7 @@ int CDECL _wremove(const wchar_t *path)
TRACE("(%s)\n",debugstr_w(path));
if (DeleteFileW(path))
return 0;
- TRACE(":failed (%d)\n",GetLastError());
+ TRACE(":failed (%ld)\n",GetLastError());
msvcrt_set_errno(GetLastError());
return -1;
}
@@ -4869,7 +4869,7 @@ int CDECL rename(const char *oldpath,const char *newpath)
TRACE(":from %s to %s\n",oldpath,newpath);
if (MoveFileExA(oldpath, newpath, MOVEFILE_COPY_ALLOWED))
return 0;
- TRACE(":failed (%d)\n",GetLastError());
+ TRACE(":failed (%ld)\n",GetLastError());
msvcrt_set_errno(GetLastError());
return -1;
}
@@ -4882,7 +4882,7 @@ int CDECL _wrename(const wchar_t *oldpath,const wchar_t *newpath)
TRACE(":from %s to %s\n",debugstr_w(oldpath),debugstr_w(newpath));
if (MoveFileExW(oldpath, newpath, MOVEFILE_COPY_ALLOWED))
return 0;
- TRACE(":failed (%d)\n",GetLastError());
+ TRACE(":failed (%ld)\n",GetLastError());
msvcrt_set_errno(GetLastError());
return -1;
}
diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c
index 3b3d027f466..924671e7047 100644
--- a/dlls/msvcrt/locale.c
+++ b/dlls/msvcrt/locale.c
@@ -854,7 +854,7 @@ int CDECL __crtLCMapStringA(
WCHAR buf_out[32], *out = buf_out;
int in_len, out_len, r;
- TRACE("(lcid %x, flags %x, %s(%d), %p(%d), %x, %d), partial stub!\n",
+ TRACE("(lcid %lx, flags %lx, %s(%d), %p(%d), %x, %d), partial stub!\n",
lcid, mapflags, src, srclen, dst, dstlen, codepage, xflag);
in_len = MultiByteToWideChar(codepage, MB_ERR_INVALID_CHARS, src, srclen, NULL, 0);
@@ -904,7 +904,7 @@ done:
int CDECL __crtLCMapStringW(LCID lcid, DWORD mapflags, const wchar_t *src,
int srclen, wchar_t *dst, int dstlen, unsigned int codepage, int xflag)
{
- FIXME("(lcid %x, flags %x, %s(%d), %p(%d), %x, %d), partial stub!\n",
+ FIXME("(lcid %lx, flags %lx, %s(%d), %p(%d), %x, %d), partial stub!\n",
lcid, mapflags, debugstr_w(src), srclen, dst, dstlen, codepage, xflag);
return LCMapStringW(lcid, mapflags, src, srclen, dst, dstlen);
@@ -916,7 +916,7 @@ int CDECL __crtLCMapStringW(LCID lcid, DWORD mapflags, const wchar_t *src,
int CDECL __crtCompareStringA( LCID lcid, DWORD flags, const char *src1, int len1,
const char *src2, int len2 )
{
- FIXME("(lcid %x, flags %x, %s(%d), %s(%d), partial stub\n",
+ FIXME("(lcid %lx, flags %lx, %s(%d), %s(%d), partial stub\n",
lcid, flags, debugstr_a(src1), len1, debugstr_a(src2), len2 );
/* FIXME: probably not entirely right */
return CompareStringA( lcid, flags, src1, len1, src2, len2 );
@@ -928,7 +928,7 @@ int CDECL __crtCompareStringA( LCID lcid, DWORD flags, const char *src1, int len
int CDECL __crtCompareStringW( LCID lcid, DWORD flags, const wchar_t *src1, int len1,
const wchar_t *src2, int len2 )
{
- FIXME("(lcid %x, flags %x, %s(%d), %s(%d), partial stub\n",
+ FIXME("(lcid %lx, flags %lx, %s(%d), %s(%d), partial stub\n",
lcid, flags, debugstr_w(src1), len1, debugstr_w(src2), len2 );
/* FIXME: probably not entirely right */
return CompareStringW( lcid, flags, src1, len1, src2, len2 );
@@ -939,7 +939,7 @@ int CDECL __crtCompareStringW( LCID lcid, DWORD flags, const wchar_t *src1, int
*/
int CDECL __crtGetLocaleInfoW( LCID lcid, LCTYPE type, wchar_t *buffer, int len )
{
- FIXME("(lcid %x, type %x, %p(%d), partial stub\n", lcid, type, buffer, len );
+ FIXME("(lcid %lx, type %lx, %p(%d), partial stub\n", lcid, type, buffer, len );
/* FIXME: probably not entirely right */
return GetLocaleInfoW( lcid, type, buffer, len );
}
@@ -950,7 +950,7 @@ int CDECL __crtGetLocaleInfoW( LCID lcid, LCTYPE type, wchar_t *buffer, int len
*/
int CDECL __crtGetLocaleInfoEx( const WCHAR *locale, LCTYPE type, wchar_t *buffer, int len )
{
- TRACE("(%s, %x, %p, %d)\n", debugstr_w(locale), type, buffer, len);
+ TRACE("(%s, %lx, %p, %d)\n", debugstr_w(locale), type, buffer, len);
return GetLocaleInfoEx(locale, type, buffer, len);
}
#endif
@@ -964,7 +964,7 @@ int CDECL __crtGetLocaleInfoEx( const WCHAR *locale, LCTYPE type, wchar_t *buffe
BOOL CDECL __crtGetStringTypeW(DWORD unk, DWORD type,
wchar_t *buffer, int len, WORD *out)
{
- FIXME("(unk %x, type %x, wstr %p(%d), %p) partial stub\n",
+ FIXME("(unk %lx, type %lx, wstr %p(%d), %p) partial stub\n",
unk, type, buffer, len, out);
return GetStringTypeW(type, buffer, len, out);
diff --git a/dlls/msvcrt/main.c b/dlls/msvcrt/main.c
index 23dfb24ac5d..db8554668ad 100644
--- a/dlls/msvcrt/main.c
+++ b/dlls/msvcrt/main.c
@@ -89,7 +89,7 @@ static inline void msvcrt_free_tls_mem(void)
*/
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
- TRACE("(%p, %s, %p) pid(%x), tid(%x), tls(%u)\n",
+ TRACE("(%p, %s, %p) pid(%lx), tid(%lx), tls(%lu)\n",
hinstDLL, msvcrt_get_reason(fdwReason), lpvReserved,
GetCurrentProcessId(), GetCurrentThreadId(),
msvcrt_tls_index);
diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c
index 33afe8d1d90..854403a71bf 100644
--- a/dlls/msvcrt/math.c
+++ b/dlls/msvcrt/math.c
@@ -10318,7 +10318,7 @@ double CDECL _except1(DWORD fpe, _FP_OPERATION_CODE op, double arg, double res,
WORD operation;
int raise = 0;
- TRACE("(%x %x %lf %lf %x %p)\n", fpe, op, arg, res, cw, unk);
+ TRACE("(%lx %x %lf %lf %lx %p)\n", fpe, op, arg, res, cw, unk);
#ifdef _WIN64
cw = ((cw >> 7) & 0x3f) | ((cw >> 3) & 0xc00);
diff --git a/dlls/msvcrt/mbcs.c b/dlls/msvcrt/mbcs.c
index 03af50d8b01..9758f354b89 100644
--- a/dlls/msvcrt/mbcs.c
+++ b/dlls/msvcrt/mbcs.c
@@ -325,7 +325,7 @@ threadmbcinfo* create_mbcinfo(int cp, LCID lcid, threadmbcinfo *old_mbcinfo)
ret = MultiByteToWideChar(newcp, 0, bufA, charcount, bufW, charcount);
if (ret != charcount)
- ERR("MultiByteToWideChar of chars failed for cp %d, ret=%d (exp %d), error=%d\n", newcp, ret, charcount, GetLastError());
+ ERR("MultiByteToWideChar of chars failed for cp %d, ret=%d (exp %d), error=%ld\n", newcp, ret, charcount, GetLastError());
GetStringTypeW(CT_CTYPE1, bufW, charcount, chartypes);
LCMapStringW(lcid, LCMAP_LOWERCASE, bufW, charcount, lowW, charcount);
@@ -350,7 +350,7 @@ threadmbcinfo* create_mbcinfo(int cp, LCID lcid, threadmbcinfo *old_mbcinfo)
ret = WideCharToMultiByte(newcp, 0, bufW, charcount, bufA, charcount, NULL, NULL);
if (ret != charcount)
- ERR("WideCharToMultiByte failed for cp %d, ret=%d (exp %d), error=%d\n", newcp, ret, charcount, GetLastError());
+ ERR("WideCharToMultiByte failed for cp %d, ret=%d (exp %d), error=%ld\n", newcp, ret, charcount, GetLastError());
charcount = 0;
for (i = 0; i < 256; i++)
diff --git a/dlls/msvcrt/misc.c b/dlls/msvcrt/misc.c
index 73fadfcbb74..16188394b98 100644
--- a/dlls/msvcrt/misc.c
+++ b/dlls/msvcrt/misc.c
@@ -516,7 +516,7 @@ int CDECL __crtGetShowWindowMode(void)
STARTUPINFOW si;
GetStartupInfoW(&si);
- TRACE("flags=%x window=%d\n", si.dwFlags, si.wShowWindow);
+ TRACE("flags=%lx window=%d\n", si.dwFlags, si.wShowWindow);
return si.dwFlags & STARTF_USESHOWWINDOW ? si.wShowWindow : SW_SHOWDEFAULT;
}
@@ -526,7 +526,7 @@ int CDECL __crtGetShowWindowMode(void)
BOOL CDECL __crtInitializeCriticalSectionEx(
CRITICAL_SECTION *cs, DWORD spin_count, DWORD flags)
{
- TRACE("(%p %x %x)\n", cs, spin_count, flags);
+ TRACE("(%p %lx %lx)\n", cs, spin_count, flags);
return InitializeCriticalSectionEx(cs, spin_count, flags);
}
@@ -570,7 +570,7 @@ LONG CDECL __crtUnhandledException(EXCEPTION_POINTERS *ep)
*/
void CDECL __crtSleep(DWORD timeout)
{
- TRACE("(%u)\n", timeout);
+ TRACE("(%lu)\n", timeout);
Sleep(timeout);
}
diff --git a/dlls/msvcrt/thread.c b/dlls/msvcrt/thread.c
index e71b949a6d5..6aad9a22d47 100644
--- a/dlls/msvcrt/thread.c
+++ b/dlls/msvcrt/thread.c
@@ -164,7 +164,7 @@ uintptr_t CDECL _beginthread(
(void*)start_address, &trampoline->module))
{
trampoline->module = NULL;
- WARN("failed to get module for the start_address: %d\n", GetLastError());
+ WARN("failed to get module for the start_address: %lu\n", GetLastError());
}
#endif
@@ -230,7 +230,7 @@ uintptr_t CDECL _beginthreadex(
(void*)start_address, &trampoline->module))
{
trampoline->module = NULL;
- WARN("failed to get module for the start_address: %d\n", GetLastError());
+ WARN("failed to get module for the start_address: %lu\n", GetLastError());
}
#endif
diff --git a/dlls/msvcrtd/Makefile.in b/dlls/msvcrtd/Makefile.in
index 7f9151d4c3a..bd4f78729d0 100644
--- a/dlls/msvcrtd/Makefile.in
+++ b/dlls/msvcrtd/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES -D_CRTIMP=
+EXTRADEFS = -D_CRTIMP=
MODULE = msvcrtd.dll
IMPORTLIB = msvcrtd
IMPORTS = ntdll
diff --git a/dlls/ucrtbase/Makefile.in b/dlls/ucrtbase/Makefile.in
index e7d9951575e..bf7f62ada8a 100644
--- a/dlls/ucrtbase/Makefile.in
+++ b/dlls/ucrtbase/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES -D_CRTIMP=
+EXTRADEFS = -D_CRTIMP=
MODULE = ucrtbase.dll
IMPORTLIB = ucrtbase
IMPORTS = ntdll
2
17
[PATCH 1/2] winealsa: Remove the ability to read additional devices from the registry.
by Huw Davies 09 Feb '22
by Huw Davies 09 Feb '22
09 Feb '22
If necessary, this could be re-written using the NT registry api in
the unixlib.
Signed-off-by: Huw Davies <huw(a)codeweavers.com>
---
dlls/winealsa.drv/mmdevdrv.c | 53 ------------------------------------
1 file changed, 53 deletions(-)
diff --git a/dlls/winealsa.drv/mmdevdrv.c b/dlls/winealsa.drv/mmdevdrv.c
index 5aa1b4aab63..8713b6153ce 100644
--- a/dlls/winealsa.drv/mmdevdrv.c
+++ b/dlls/winealsa.drv/mmdevdrv.c
@@ -165,9 +165,6 @@ static struct list g_sessions = LIST_INIT(g_sessions);
static const WCHAR defaultW[] = {'d','e','f','a','u','l','t',0};
static const char defname[] = "default";
-static const WCHAR drv_keyW[] = {'S','o','f','t','w','a','r','e','\\',
- 'W','i','n','e','\\','D','r','i','v','e','r','s','\\',
- 'w','i','n','e','a','l','s','a','.','d','r','v',0};
static const WCHAR drv_key_devicesW[] = {'S','o','f','t','w','a','r','e','\\',
'W','i','n','e','\\','D','r','i','v','e','r','s','\\',
'w','i','n','e','a','l','s','a','.','d','r','v','\\','d','e','v','i','c','e','s',0};
@@ -474,54 +471,6 @@ static HRESULT alsa_get_card_devices(EDataFlow flow, snd_pcm_stream_t stream,
return S_OK;
}
-static void get_reg_devices(EDataFlow flow, snd_pcm_stream_t stream, WCHAR ***ids,
- GUID **guids, UINT *num)
-{
- static const WCHAR ALSAOutputDevices[] = {'A','L','S','A','O','u','t','p','u','t','D','e','v','i','c','e','s',0};
- static const WCHAR ALSAInputDevices[] = {'A','L','S','A','I','n','p','u','t','D','e','v','i','c','e','s',0};
- HKEY key;
- WCHAR reg_devices[256];
- DWORD size = sizeof(reg_devices), type;
- const WCHAR *value_name = (stream == SND_PCM_STREAM_PLAYBACK) ? ALSAOutputDevices : ALSAInputDevices;
-
- /* @@ Wine registry key: HKCU\Software\Wine\Drivers\winealsa.drv */
- if(RegOpenKeyW(HKEY_CURRENT_USER, drv_keyW, &key) == ERROR_SUCCESS){
- if(RegQueryValueExW(key, value_name, 0, &type,
- (BYTE*)reg_devices, &size) == ERROR_SUCCESS){
- WCHAR *p = reg_devices;
-
- if(type != REG_MULTI_SZ){
- ERR("Registry ALSA device list value type must be REG_MULTI_SZ\n");
- RegCloseKey(key);
- return;
- }
-
- while(*p){
- char devname[64];
-
- WideCharToMultiByte(CP_UNIXCP, 0, p, -1, devname, sizeof(devname), NULL, NULL);
-
- if(alsa_try_open(devname, stream)){
- if(*num){
- *ids = HeapReAlloc(GetProcessHeap(), 0, *ids, sizeof(WCHAR *) * (*num + 1));
- *guids = HeapReAlloc(GetProcessHeap(), 0, *guids, sizeof(GUID) * (*num + 1));
- }else{
- *ids = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR *));
- *guids = HeapAlloc(GetProcessHeap(), 0, sizeof(GUID));
- }
- (*ids)[*num] = construct_device_id(flow, p, NULL);
- get_device_guid(flow, devname, &(*guids)[*num]);
- ++*num;
- }
-
- p += lstrlenW(p) + 1;
- }
- }
-
- RegCloseKey(key);
- }
-}
-
struct card_type {
struct list entry;
int first_card_number;
@@ -570,8 +519,6 @@ static HRESULT alsa_enum_devices(EDataFlow flow, WCHAR ***ids, GUID **guids,
++*num;
}
- get_reg_devices(flow, stream, ids, guids, num);
-
for(err = snd_card_next(&card); card != -1 && err >= 0;
err = snd_card_next(&card)){
char cardpath[64];
--
2.25.1
2
1
From: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/mf/Makefile.in | 1 -
dlls/mf/clock.c | 16 ++++----
dlls/mf/copier.c | 38 +++++++++---------
dlls/mf/evr.c | 36 ++++++++---------
dlls/mf/main.c | 20 +++++-----
dlls/mf/quality.c | 8 ++--
dlls/mf/samplegrabber.c | 26 ++++++-------
dlls/mf/sar.c | 58 +++++++++++++--------------
dlls/mf/session.c | 86 ++++++++++++++++++++---------------------
dlls/mf/topology.c | 58 +++++++++++++--------------
10 files changed, 173 insertions(+), 174 deletions(-)
diff --git a/dlls/mf/Makefile.in b/dlls/mf/Makefile.in
index cbb41fb8d74..36727d4d4e3 100644
--- a/dlls/mf/Makefile.in
+++ b/dlls/mf/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = mf.dll
IMPORTLIB = mf
IMPORTS = advapi32 mfplat ole32 uuid mfuuid strmiids
diff --git a/dlls/mf/clock.c b/dlls/mf/clock.c
index 4a3ad7ec7c1..e9877533a5a 100644
--- a/dlls/mf/clock.c
+++ b/dlls/mf/clock.c
@@ -158,7 +158,7 @@ static ULONG WINAPI sink_notification_AddRef(IUnknown *iface)
struct sink_notification *notification = impl_sink_notification_from_IUnknown(iface);
ULONG refcount = InterlockedIncrement(¬ification->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -168,7 +168,7 @@ static ULONG WINAPI sink_notification_Release(IUnknown *iface)
struct sink_notification *notification = impl_sink_notification_from_IUnknown(iface);
ULONG refcount = InterlockedDecrement(¬ification->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -253,7 +253,7 @@ static ULONG WINAPI present_clock_AddRef(IMFPresentationClock *iface)
struct presentation_clock *clock = impl_from_IMFPresentationClock(iface);
ULONG refcount = InterlockedIncrement(&clock->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -265,7 +265,7 @@ static ULONG WINAPI present_clock_Release(IMFPresentationClock *iface)
struct clock_timer *timer, *timer2;
struct clock_sink *sink, *sink2;
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -312,7 +312,7 @@ static HRESULT WINAPI present_clock_GetCorrelatedTime(IMFPresentationClock *ifac
struct presentation_clock *clock = impl_from_IMFPresentationClock(iface);
HRESULT hr = MF_E_CLOCK_NO_TIME_SOURCE;
- TRACE("%p, %#x, %p, %p.\n", iface, reserved, clock_time, system_time);
+ TRACE("%p, %#lx, %p, %p.\n", iface, reserved, clock_time, system_time);
EnterCriticalSection(&clock->cs);
if (clock->time_source)
@@ -335,7 +335,7 @@ static HRESULT WINAPI present_clock_GetState(IMFPresentationClock *iface, DWORD
{
struct presentation_clock *clock = impl_from_IMFPresentationClock(iface);
- TRACE("%p, %#x, %p.\n", iface, reserved, state);
+ TRACE("%p, %#lx, %p.\n", iface, reserved, state);
EnterCriticalSection(&clock->cs);
*state = clock->state;
@@ -816,7 +816,7 @@ static HRESULT present_clock_schedule_timer(struct presentation_clock *clock, DW
{
if (FAILED(hr = IMFPresentationTimeSource_GetCorrelatedTime(clock->time_source, 0, &clocktime, &systime)))
{
- WARN("Failed to get clock time, hr %#x.\n", hr);
+ WARN("Failed to get clock time, hr %#lx.\n", hr);
return hr;
}
time -= clocktime;
@@ -885,7 +885,7 @@ static HRESULT WINAPI present_clock_timer_SetTimer(IMFTimer *iface, DWORD flags,
struct clock_timer *clock_timer;
HRESULT hr;
- TRACE("%p, %#x, %s, %p, %p, %p.\n", iface, flags, debugstr_time(time), callback, state, cancel_key);
+ TRACE("%p, %#lx, %s, %p, %p, %p.\n", iface, flags, debugstr_time(time), callback, state, cancel_key);
if (!(clock_timer = calloc(1, sizeof(*clock_timer))))
return E_OUTOFMEMORY;
diff --git a/dlls/mf/copier.c b/dlls/mf/copier.c
index fe5664ee4c7..ab995fb98db 100644
--- a/dlls/mf/copier.c
+++ b/dlls/mf/copier.c
@@ -72,7 +72,7 @@ static ULONG WINAPI sample_copier_transform_AddRef(IMFTransform *iface)
struct sample_copier *transform = impl_from_IMFTransform(iface);
ULONG refcount = InterlockedIncrement(&transform->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -82,7 +82,7 @@ static ULONG WINAPI sample_copier_transform_Release(IMFTransform *iface)
struct sample_copier *transform = impl_from_IMFTransform(iface);
ULONG refcount = InterlockedDecrement(&transform->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -120,7 +120,7 @@ static HRESULT WINAPI sample_copier_transform_GetStreamCount(IMFTransform *iface
static HRESULT WINAPI sample_copier_transform_GetStreamIDs(IMFTransform *iface, DWORD input_size, DWORD *inputs,
DWORD output_size, DWORD *outputs)
{
- TRACE("%p, %u, %p, %u, %p.\n", iface, input_size, inputs, output_size, outputs);
+ TRACE("%p, %lu, %p, %lu, %p.\n", iface, input_size, inputs, output_size, outputs);
return E_NOTIMPL;
}
@@ -129,7 +129,7 @@ static HRESULT WINAPI sample_copier_transform_GetInputStreamInfo(IMFTransform *i
{
struct sample_copier *transform = impl_from_IMFTransform(iface);
- TRACE("%p, %u, %p.\n", iface, id, info);
+ TRACE("%p, %lu, %p.\n", iface, id, info);
memset(info, 0, sizeof(*info));
@@ -145,7 +145,7 @@ static HRESULT WINAPI sample_copier_transform_GetOutputStreamInfo(IMFTransform *
{
struct sample_copier *transform = impl_from_IMFTransform(iface);
- TRACE("%p, %u, %p.\n", iface, id, info);
+ TRACE("%p, %lu, %p.\n", iface, id, info);
memset(info, 0, sizeof(*info));
@@ -171,7 +171,7 @@ static HRESULT WINAPI sample_copier_transform_GetAttributes(IMFTransform *iface,
static HRESULT WINAPI sample_copier_transform_GetInputStreamAttributes(IMFTransform *iface, DWORD id,
IMFAttributes **attributes)
{
- TRACE("%p, %u, %p.\n", iface, id, attributes);
+ TRACE("%p, %lu, %p.\n", iface, id, attributes);
return E_NOTIMPL;
}
@@ -179,21 +179,21 @@ static HRESULT WINAPI sample_copier_transform_GetInputStreamAttributes(IMFTransf
static HRESULT WINAPI sample_copier_transform_GetOutputStreamAttributes(IMFTransform *iface, DWORD id,
IMFAttributes **attributes)
{
- TRACE("%p, %u, %p.\n", iface, id, attributes);
+ TRACE("%p, %lu, %p.\n", iface, id, attributes);
return E_NOTIMPL;
}
static HRESULT WINAPI sample_copier_transform_DeleteInputStream(IMFTransform *iface, DWORD id)
{
- TRACE("%p, %u.\n", iface, id);
+ TRACE("%p, %lu.\n", iface, id);
return E_NOTIMPL;
}
static HRESULT WINAPI sample_copier_transform_AddInputStreams(IMFTransform *iface, DWORD streams, DWORD *ids)
{
- TRACE("%p, %u, %p.\n", iface, streams, ids);
+ TRACE("%p, %lu, %p.\n", iface, streams, ids);
return E_NOTIMPL;
}
@@ -204,7 +204,7 @@ static HRESULT WINAPI sample_copier_transform_GetInputAvailableType(IMFTransform
static const GUID *types[] = { &MFMediaType_Video, &MFMediaType_Audio };
HRESULT hr;
- TRACE("%p, %u, %u, %p.\n", iface, id, index, type);
+ TRACE("%p, %lu, %lu, %p.\n", iface, id, index, type);
if (id)
return MF_E_INVALIDSTREAMNUMBER;
@@ -225,7 +225,7 @@ static HRESULT WINAPI sample_copier_transform_GetOutputAvailableType(IMFTransfor
IMFMediaType *cloned_type = NULL;
HRESULT hr = S_OK;
- TRACE("%p, %u, %u, %p.\n", iface, id, index, type);
+ TRACE("%p, %lu, %lu, %p.\n", iface, id, index, type);
EnterCriticalSection(&transform->cs);
if (transform->buffer_type)
@@ -326,7 +326,7 @@ static HRESULT WINAPI sample_copier_transform_SetInputType(IMFTransform *iface,
{
struct sample_copier *transform = impl_from_IMFTransform(iface);
- TRACE("%p, %u, %p, %#x.\n", iface, id, type, flags);
+ TRACE("%p, %lu, %p, %#lx.\n", iface, id, type, flags);
return sample_copier_set_media_type(transform, TRUE, id, type, flags);
}
@@ -335,7 +335,7 @@ static HRESULT WINAPI sample_copier_transform_SetOutputType(IMFTransform *iface,
{
struct sample_copier *transform = impl_from_IMFTransform(iface);
- TRACE("%p, %u, %p, %#x.\n", iface, id, type, flags);
+ TRACE("%p, %lu, %p, %#lx.\n", iface, id, type, flags);
return sample_copier_set_media_type(transform, FALSE, id, type, flags);
}
@@ -371,7 +371,7 @@ static HRESULT WINAPI sample_copier_transform_GetInputCurrentType(IMFTransform *
{
struct sample_copier *transform = impl_from_IMFTransform(iface);
- TRACE("%p, %u, %p.\n", iface, id, type);
+ TRACE("%p, %lu, %p.\n", iface, id, type);
return sample_copier_get_current_type(transform, id, SAMPLE_COPIER_INPUT_TYPE_SET, type);
}
@@ -380,7 +380,7 @@ static HRESULT WINAPI sample_copier_transform_GetOutputCurrentType(IMFTransform
{
struct sample_copier *transform = impl_from_IMFTransform(iface);
- TRACE("%p, %u, %p.\n", iface, id, type);
+ TRACE("%p, %lu, %p.\n", iface, id, type);
return sample_copier_get_current_type(transform, id, SAMPLE_COPIER_OUTPUT_TYPE_SET, type);
}
@@ -390,7 +390,7 @@ static HRESULT WINAPI sample_copier_transform_GetInputStatus(IMFTransform *iface
struct sample_copier *transform = impl_from_IMFTransform(iface);
HRESULT hr = S_OK;
- TRACE("%p, %u, %p.\n", iface, id, flags);
+ TRACE("%p, %lu, %p.\n", iface, id, flags);
if (id)
return MF_E_INVALIDSTREAMNUMBER;
@@ -431,7 +431,7 @@ static HRESULT WINAPI sample_copier_transform_SetOutputBounds(IMFTransform *ifac
static HRESULT WINAPI sample_copier_transform_ProcessEvent(IMFTransform *iface, DWORD id, IMFMediaEvent *event)
{
- FIXME("%p, %u, %p.\n", iface, id, event);
+ FIXME("%p, %lu, %p.\n", iface, id, event);
return E_NOTIMPL;
}
@@ -463,7 +463,7 @@ static HRESULT WINAPI sample_copier_transform_ProcessInput(IMFTransform *iface,
struct sample_copier *transform = impl_from_IMFTransform(iface);
HRESULT hr = S_OK;
- TRACE("%p, %u, %p, %#x.\n", iface, id, sample, flags);
+ TRACE("%p, %lu, %p, %#lx.\n", iface, id, sample, flags);
if (id)
return MF_E_INVALIDSTREAMNUMBER;
@@ -492,7 +492,7 @@ static HRESULT WINAPI sample_copier_transform_ProcessOutput(IMFTransform *iface,
HRESULT hr = S_OK;
LONGLONG time;
- TRACE("%p, %#x, %u, %p, %p.\n", iface, flags, count, buffers, status);
+ TRACE("%p, %#lx, %lu, %p, %p.\n", iface, flags, count, buffers, status);
EnterCriticalSection(&transform->cs);
if (!(transform->flags & SAMPLE_COPIER_OUTPUT_TYPE_SET))
diff --git a/dlls/mf/evr.c b/dlls/mf/evr.c
index 5e8b559af04..eae8338df7a 100644
--- a/dlls/mf/evr.c
+++ b/dlls/mf/evr.c
@@ -267,7 +267,7 @@ static ULONG WINAPI video_stream_sink_AddRef(IMFStreamSink *iface)
struct video_stream *stream = impl_from_IMFStreamSink(iface);
ULONG refcount = InterlockedIncrement(&stream->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -296,7 +296,7 @@ static HRESULT WINAPI video_stream_sink_GetEvent(IMFStreamSink *iface, DWORD fla
{
struct video_stream *stream = impl_from_IMFStreamSink(iface);
- TRACE("%p, %#x, %p.\n", iface, flags, event);
+ TRACE("%p, %#lx, %p.\n", iface, flags, event);
return IMFMediaEventQueue_GetEvent(stream->event_queue, flags, event);
}
@@ -325,7 +325,7 @@ static HRESULT WINAPI video_stream_sink_QueueEvent(IMFStreamSink *iface, MediaEv
{
struct video_stream *stream = impl_from_IMFStreamSink(iface);
- TRACE("%p, %d, %s, %#x, %p.\n", iface, event_type, debugstr_guid(ext_type), hr, value);
+ TRACE("%p, %ld, %s, %#lx, %p.\n", iface, event_type, debugstr_guid(ext_type), hr, value);
return IMFMediaEventQueue_QueueEventParamVar(stream->event_queue, event_type, ext_type, hr, value);
}
@@ -403,7 +403,7 @@ static HRESULT WINAPI video_stream_sink_ProcessSample(IMFStreamSink *iface, IMFS
hr = MF_E_NO_CLOCK;
else if (FAILED(hr = IMFSample_GetSampleTime(sample, ×tamp)))
{
- WARN("No sample timestamp, hr %#x.\n", hr);
+ WARN("No sample timestamp, hr %#lx.\n", hr);
}
else if (stream->parent->state == EVR_STATE_RUNNING || stream->flags & EVR_STREAM_PREROLLING)
{
@@ -551,7 +551,7 @@ static HRESULT WINAPI video_stream_typehandler_GetMediaTypeCount(IMFMediaTypeHan
static HRESULT WINAPI video_stream_typehandler_GetMediaTypeByIndex(IMFMediaTypeHandler *iface, DWORD index,
IMFMediaType **type)
{
- TRACE("%p, %u, %p.\n", iface, index, type);
+ TRACE("%p, %lu, %p.\n", iface, index, type);
return MF_E_NO_MORE_TYPES;
}
@@ -1153,7 +1153,7 @@ static ULONG WINAPI video_renderer_sink_AddRef(IMFMediaSink *iface)
{
struct video_renderer *renderer = impl_from_IMFMediaSink(iface);
ULONG refcount = InterlockedIncrement(&renderer->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -1162,7 +1162,7 @@ static ULONG WINAPI video_renderer_sink_Release(IMFMediaSink *iface)
struct video_renderer *renderer = impl_from_IMFMediaSink(iface);
ULONG refcount = InterlockedDecrement(&renderer->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -1230,7 +1230,7 @@ static HRESULT WINAPI video_renderer_sink_AddStreamSink(IMFMediaSink *iface, DWO
struct video_renderer *renderer = impl_from_IMFMediaSink(iface);
HRESULT hr;
- TRACE("%p, %#x, %p, %p.\n", iface, id, media_type, stream_sink);
+ TRACE("%p, %#lx, %p, %p.\n", iface, id, media_type, stream_sink);
/* Rely on mixer for stream id validation. */
@@ -1254,7 +1254,7 @@ static HRESULT WINAPI video_renderer_sink_RemoveStreamSink(IMFMediaSink *iface,
HRESULT hr;
size_t i;
- TRACE("%p, %#x.\n", iface, id);
+ TRACE("%p, %#lx.\n", iface, id);
/* Rely on mixer for stream id validation. */
@@ -1309,7 +1309,7 @@ static HRESULT WINAPI video_renderer_sink_GetStreamSinkByIndex(IMFMediaSink *ifa
struct video_renderer *renderer = impl_from_IMFMediaSink(iface);
HRESULT hr = S_OK;
- TRACE("%p, %u, %p.\n", iface, index, stream);
+ TRACE("%p, %lu, %p.\n", iface, index, stream);
EnterCriticalSection(&renderer->cs);
if (renderer->flags & EVR_SHUT_DOWN)
@@ -1335,7 +1335,7 @@ static HRESULT WINAPI video_renderer_sink_GetStreamSinkById(IMFMediaSink *iface,
HRESULT hr = S_OK;
size_t i;
- TRACE("%p, %#x, %p.\n", iface, id, stream);
+ TRACE("%p, %#lx, %p.\n", iface, id, stream);
EnterCriticalSection(&renderer->cs);
if (renderer->flags & EVR_SHUT_DOWN)
@@ -1747,7 +1747,7 @@ static HRESULT WINAPI video_renderer_InitializeRenderer(IMFVideoRenderer *iface,
IMFTransform_AddRef(mixer);
else if (FAILED(hr = video_renderer_create_mixer(NULL, &mixer)))
{
- WARN("Failed to create default mixer object, hr %#x.\n", hr);
+ WARN("Failed to create default mixer object, hr %#lx.\n", hr);
return hr;
}
@@ -1755,7 +1755,7 @@ static HRESULT WINAPI video_renderer_InitializeRenderer(IMFVideoRenderer *iface,
IMFVideoPresenter_AddRef(presenter);
else if (FAILED(hr = video_renderer_create_presenter(renderer, NULL, &presenter)))
{
- WARN("Failed to create default presenter, hr %#x.\n", hr);
+ WARN("Failed to create default presenter, hr %#lx.\n", hr);
IMFTransform_Release(mixer);
return hr;
}
@@ -1810,7 +1810,7 @@ static HRESULT WINAPI video_renderer_events_GetEvent(IMFMediaEventGenerator *ifa
{
struct video_renderer *renderer = impl_from_IMFMediaEventGenerator(iface);
- TRACE("%p, %#x, %p.\n", iface, flags, event);
+ TRACE("%p, %#lx, %p.\n", iface, flags, event);
return IMFMediaEventQueue_GetEvent(renderer->event_queue, flags, event);
}
@@ -1840,7 +1840,7 @@ static HRESULT WINAPI video_renderer_events_QueueEvent(IMFMediaEventGenerator *i
{
struct video_renderer *renderer = impl_from_IMFMediaEventGenerator(iface);
- TRACE("%p, %u, %s, %#x, %p.\n", iface, event_type, debugstr_guid(ext_type), hr, value);
+ TRACE("%p, %lu, %s, %#lx, %p.\n", iface, event_type, debugstr_guid(ext_type), hr, value);
return IMFMediaEventQueue_QueueEventParamVar(renderer->event_queue, event_type, ext_type, hr, value);
}
@@ -2143,7 +2143,7 @@ static HRESULT WINAPI video_renderer_service_lookup_LookupService(IMFTopologySer
struct video_renderer *renderer = impl_from_IMFTopologyServiceLookup(iface);
HRESULT hr = S_OK;
- TRACE("%p, %u, %u, %s, %s, %p, %p.\n", iface, lookup_type, index, debugstr_guid(service), debugstr_guid(riid),
+ TRACE("%p, %u, %lu, %s, %s, %p, %p.\n", iface, lookup_type, index, debugstr_guid(service), debugstr_guid(riid),
objects, num_objects);
EnterCriticalSection(&renderer->cs);
@@ -2237,7 +2237,7 @@ static HRESULT WINAPI video_renderer_event_sink_Notify(IMediaEventSink *iface, L
HRESULT hr = S_OK;
unsigned int idx;
- TRACE("%p, %d, %ld, %ld.\n", iface, event, param1, param2);
+ TRACE("%p, %ld, %Id, %Id.\n", iface, event, param1, param2);
EnterCriticalSection(&renderer->cs);
@@ -2275,7 +2275,7 @@ static HRESULT WINAPI video_renderer_event_sink_Notify(IMediaEventSink *iface, L
}
else
{
- WARN("Unhandled event %d.\n", event);
+ WARN("Unhandled event %ld.\n", event);
hr = MF_E_UNEXPECTED;
}
diff --git a/dlls/mf/main.c b/dlls/mf/main.c
index 50451170275..6b1d9293c8a 100644
--- a/dlls/mf/main.c
+++ b/dlls/mf/main.c
@@ -73,7 +73,7 @@ static ULONG WINAPI activate_object_AddRef(IMFActivate *iface)
struct activate_object *activate = impl_from_IMFActivate(iface);
ULONG refcount = InterlockedIncrement(&activate->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -83,7 +83,7 @@ static ULONG WINAPI activate_object_Release(IMFActivate *iface)
struct activate_object *activate = impl_from_IMFActivate(iface);
ULONG refcount = InterlockedDecrement(&activate->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -597,7 +597,7 @@ static ULONG WINAPI file_scheme_handler_AddRef(IMFSchemeHandler *iface)
struct file_scheme_handler *handler = impl_from_IMFSchemeHandler(iface);
ULONG refcount = InterlockedIncrement(&handler->refcount);
- TRACE("%p, refcount %u.\n", handler, refcount);
+ TRACE("%p, refcount %lu.\n", handler, refcount);
return refcount;
}
@@ -608,7 +608,7 @@ static ULONG WINAPI file_scheme_handler_Release(IMFSchemeHandler *iface)
ULONG refcount = InterlockedDecrement(&handler->refcount);
struct file_scheme_handler_result *result, *next;
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -665,7 +665,7 @@ static ULONG WINAPI create_object_context_AddRef(IUnknown *iface)
struct create_object_context *context = impl_from_IUnknown(iface);
ULONG refcount = InterlockedIncrement(&context->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -675,7 +675,7 @@ static ULONG WINAPI create_object_context_Release(IUnknown *iface)
struct create_object_context *context = impl_from_IUnknown(iface);
ULONG refcount = InterlockedDecrement(&context->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -703,7 +703,7 @@ static HRESULT WINAPI file_scheme_handler_BeginCreateObject(IMFSchemeHandler *if
IMFAsyncResult *caller, *item;
HRESULT hr;
- TRACE("%p, %s, %#x, %p, %p, %p, %p.\n", iface, debugstr_w(url), flags, props, cancel_cookie, callback, state);
+ TRACE("%p, %s, %#lx, %p, %p, %p, %p.\n", iface, debugstr_w(url), flags, props, cancel_cookie, callback, state);
if (cancel_cookie)
*cancel_cookie = NULL;
@@ -1238,7 +1238,7 @@ static ULONG WINAPI simple_type_handler_AddRef(IMFMediaTypeHandler *iface)
struct simple_type_handler *handler = impl_from_IMFMediaTypeHandler(iface);
ULONG refcount = InterlockedIncrement(&handler->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -1248,7 +1248,7 @@ static ULONG WINAPI simple_type_handler_Release(IMFMediaTypeHandler *iface)
struct simple_type_handler *handler = impl_from_IMFMediaTypeHandler(iface);
ULONG refcount = InterlockedDecrement(&handler->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -1304,7 +1304,7 @@ static HRESULT WINAPI simple_type_handler_GetMediaTypeByIndex(IMFMediaTypeHandle
{
struct simple_type_handler *handler = impl_from_IMFMediaTypeHandler(iface);
- TRACE("%p, %u, %p.\n", iface, index, type);
+ TRACE("%p, %lu, %p.\n", iface, index, type);
if (index > 0)
return MF_E_NO_MORE_TYPES;
diff --git a/dlls/mf/quality.c b/dlls/mf/quality.c
index 6c71a5a71c6..a611d6fdaed 100644
--- a/dlls/mf/quality.c
+++ b/dlls/mf/quality.c
@@ -86,7 +86,7 @@ static ULONG WINAPI standard_quality_manager_AddRef(IMFQualityManager *iface)
struct quality_manager *manager = impl_from_IMFQualityManager(iface);
ULONG refcount = InterlockedIncrement(&manager->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -96,7 +96,7 @@ static ULONG WINAPI standard_quality_manager_Release(IMFQualityManager *iface)
struct quality_manager *manager = impl_from_IMFQualityManager(iface);
ULONG refcount = InterlockedDecrement(&manager->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -178,7 +178,7 @@ static HRESULT WINAPI standard_quality_manager_NotifyPresentationClock(IMFQualit
static HRESULT WINAPI standard_quality_manager_NotifyProcessInput(IMFQualityManager *iface, IMFTopologyNode *node,
LONG input_index, IMFSample *sample)
{
- TRACE("%p, %p, %d, %p stub.\n", iface, node, input_index, sample);
+ TRACE("%p, %p, %ld, %p stub.\n", iface, node, input_index, sample);
return E_NOTIMPL;
}
@@ -186,7 +186,7 @@ static HRESULT WINAPI standard_quality_manager_NotifyProcessInput(IMFQualityMana
static HRESULT WINAPI standard_quality_manager_NotifyProcessOutput(IMFQualityManager *iface, IMFTopologyNode *node,
LONG output_index, IMFSample *sample)
{
- TRACE("%p, %p, %d, %p stub.\n", iface, node, output_index, sample);
+ TRACE("%p, %p, %ld, %p stub.\n", iface, node, output_index, sample);
return E_NOTIMPL;
}
diff --git a/dlls/mf/samplegrabber.c b/dlls/mf/samplegrabber.c
index e7d3be68df3..f711f6d8c44 100644
--- a/dlls/mf/samplegrabber.c
+++ b/dlls/mf/samplegrabber.c
@@ -206,7 +206,7 @@ static HRESULT WINAPI sample_grabber_stream_GetEvent(IMFStreamSink *iface, DWORD
{
struct sample_grabber *grabber = impl_from_IMFStreamSink(iface);
- TRACE("%p, %#x, %p.\n", iface, flags, event);
+ TRACE("%p, %#lx, %p.\n", iface, flags, event);
if (grabber->is_shut_down)
return MF_E_STREAMSINK_REMOVED;
@@ -245,7 +245,7 @@ static HRESULT WINAPI sample_grabber_stream_QueueEvent(IMFStreamSink *iface, Med
{
struct sample_grabber *grabber = impl_from_IMFStreamSink(iface);
- TRACE("%p, %u, %s, %#x, %p.\n", iface, event_type, debugstr_guid(ext_type), hr, value);
+ TRACE("%p, %lu, %s, %#lx, %p.\n", iface, event_type, debugstr_guid(ext_type), hr, value);
if (grabber->is_shut_down)
return MF_E_STREAMSINK_REMOVED;
@@ -614,7 +614,7 @@ static HRESULT WINAPI sample_grabber_stream_type_handler_GetMediaTypeCount(IMFMe
static HRESULT WINAPI sample_grabber_stream_type_handler_GetMediaTypeByIndex(IMFMediaTypeHandler *iface, DWORD index,
IMFMediaType **media_type)
{
- TRACE("%p, %u, %p.\n", iface, index, media_type);
+ TRACE("%p, %lu, %p.\n", iface, index, media_type);
if (!media_type)
return E_POINTER;
@@ -741,14 +741,14 @@ static HRESULT WINAPI sample_grabber_stream_timer_callback_Invoke(IMFAsyncCallba
if (!sample_reported)
{
if (FAILED(hr = sample_grabber_report_sample(grabber, item->u.sample, &sample_delivered)))
- WARN("Failed to report a sample, hr %#x.\n", hr);
+ WARN("Failed to report a sample, hr %#lx.\n", hr);
stream_release_pending_item(item);
sample_reported = TRUE;
}
else
{
if (FAILED(hr = stream_schedule_sample(grabber, item)))
- WARN("Failed to schedule a sample, hr %#x.\n", hr);
+ WARN("Failed to schedule a sample, hr %#lx.\n", hr);
break;
}
}
@@ -814,7 +814,7 @@ static ULONG WINAPI sample_grabber_sink_AddRef(IMFMediaSink *iface)
struct sample_grabber *grabber = impl_from_IMFMediaSink(iface);
ULONG refcount = InterlockedIncrement(&grabber->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -834,7 +834,7 @@ static ULONG WINAPI sample_grabber_sink_Release(IMFMediaSink *iface)
struct sample_grabber *grabber = impl_from_IMFMediaSink(iface);
ULONG refcount = InterlockedDecrement(&grabber->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -888,7 +888,7 @@ static HRESULT WINAPI sample_grabber_sink_AddStreamSink(IMFMediaSink *iface, DWO
{
struct sample_grabber *grabber = impl_from_IMFMediaSink(iface);
- TRACE("%p, %#x, %p, %p.\n", iface, stream_sink_id, media_type, stream_sink);
+ TRACE("%p, %#lx, %p, %p.\n", iface, stream_sink_id, media_type, stream_sink);
return grabber->is_shut_down ? MF_E_SHUTDOWN : MF_E_STREAMSINKS_FIXED;
}
@@ -897,7 +897,7 @@ static HRESULT WINAPI sample_grabber_sink_RemoveStreamSink(IMFMediaSink *iface,
{
struct sample_grabber *grabber = impl_from_IMFMediaSink(iface);
- TRACE("%p, %#x.\n", iface, stream_sink_id);
+ TRACE("%p, %#lx.\n", iface, stream_sink_id);
return grabber->is_shut_down ? MF_E_SHUTDOWN : MF_E_STREAMSINKS_FIXED;
}
@@ -922,7 +922,7 @@ static HRESULT WINAPI sample_grabber_sink_GetStreamSinkByIndex(IMFMediaSink *ifa
struct sample_grabber *grabber = impl_from_IMFMediaSink(iface);
HRESULT hr = S_OK;
- TRACE("%p, %u, %p.\n", iface, index, stream);
+ TRACE("%p, %lu, %p.\n", iface, index, stream);
if (grabber->is_shut_down)
return MF_E_SHUTDOWN;
@@ -950,7 +950,7 @@ static HRESULT WINAPI sample_grabber_sink_GetStreamSinkById(IMFMediaSink *iface,
struct sample_grabber *grabber = impl_from_IMFMediaSink(iface);
HRESULT hr = S_OK;
- TRACE("%p, %#x, %p.\n", iface, stream_sink_id, stream);
+ TRACE("%p, %#lx, %p.\n", iface, stream_sink_id, stream);
EnterCriticalSection(&grabber->cs);
@@ -1233,7 +1233,7 @@ static HRESULT WINAPI sample_grabber_events_GetEvent(IMFMediaEventGenerator *ifa
{
struct sample_grabber *grabber = impl_from_IMFMediaEventGenerator(iface);
- TRACE("%p, %#x, %p.\n", iface, flags, event);
+ TRACE("%p, %#lx, %p.\n", iface, flags, event);
return IMFMediaEventQueue_GetEvent(grabber->event_queue, flags, event);
}
@@ -1263,7 +1263,7 @@ static HRESULT WINAPI sample_grabber_events_QueueEvent(IMFMediaEventGenerator *i
{
struct sample_grabber *grabber = impl_from_IMFMediaEventGenerator(iface);
- TRACE("%p, %u, %s, %#x, %p.\n", iface, event_type, debugstr_guid(ext_type), hr, value);
+ TRACE("%p, %lu, %s, %#lx, %p.\n", iface, event_type, debugstr_guid(ext_type), hr, value);
return IMFMediaEventQueue_QueueEventParamVar(grabber->event_queue, event_type, ext_type, hr, value);
}
diff --git a/dlls/mf/sar.c b/dlls/mf/sar.c
index 3c9bac90c9f..33040be3ed0 100644
--- a/dlls/mf/sar.c
+++ b/dlls/mf/sar.c
@@ -223,7 +223,7 @@ static ULONG WINAPI audio_renderer_sink_AddRef(IMFMediaSink *iface)
{
struct audio_renderer *renderer = impl_from_IMFMediaSink(iface);
ULONG refcount = InterlockedIncrement(&renderer->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -262,7 +262,7 @@ static ULONG WINAPI audio_renderer_sink_Release(IMFMediaSink *iface)
struct audio_renderer *renderer = impl_from_IMFMediaSink(iface);
ULONG refcount = InterlockedDecrement(&renderer->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -306,7 +306,7 @@ static HRESULT WINAPI audio_renderer_sink_AddStreamSink(IMFMediaSink *iface, DWO
{
struct audio_renderer *renderer = impl_from_IMFMediaSink(iface);
- TRACE("%p, %#x, %p, %p.\n", iface, stream_sink_id, media_type, stream_sink);
+ TRACE("%p, %#lx, %p, %p.\n", iface, stream_sink_id, media_type, stream_sink);
return renderer->flags & SAR_SHUT_DOWN ? MF_E_SHUTDOWN : MF_E_STREAMSINKS_FIXED;
}
@@ -315,7 +315,7 @@ static HRESULT WINAPI audio_renderer_sink_RemoveStreamSink(IMFMediaSink *iface,
{
struct audio_renderer *renderer = impl_from_IMFMediaSink(iface);
- TRACE("%p, %#x.\n", iface, stream_sink_id);
+ TRACE("%p, %#lx.\n", iface, stream_sink_id);
return renderer->flags & SAR_SHUT_DOWN ? MF_E_SHUTDOWN : MF_E_STREAMSINKS_FIXED;
}
@@ -343,7 +343,7 @@ static HRESULT WINAPI audio_renderer_sink_GetStreamSinkByIndex(IMFMediaSink *ifa
struct audio_renderer *renderer = impl_from_IMFMediaSink(iface);
HRESULT hr = S_OK;
- TRACE("%p, %u, %p.\n", iface, index, stream);
+ TRACE("%p, %lu, %p.\n", iface, index, stream);
EnterCriticalSection(&renderer->cs);
@@ -368,7 +368,7 @@ static HRESULT WINAPI audio_renderer_sink_GetStreamSinkById(IMFMediaSink *iface,
struct audio_renderer *renderer = impl_from_IMFMediaSink(iface);
HRESULT hr = S_OK;
- TRACE("%p, %#x, %p.\n", iface, stream_sink_id, stream);
+ TRACE("%p, %#lx, %p.\n", iface, stream_sink_id, stream);
EnterCriticalSection(&renderer->cs);
@@ -557,7 +557,7 @@ static HRESULT WINAPI audio_renderer_events_GetEvent(IMFMediaEventGenerator *ifa
{
struct audio_renderer *renderer = impl_from_IMFMediaEventGenerator(iface);
- TRACE("%p, %#x, %p.\n", iface, flags, event);
+ TRACE("%p, %#lx, %p.\n", iface, flags, event);
return IMFMediaEventQueue_GetEvent(renderer->event_queue, flags, event);
}
@@ -587,7 +587,7 @@ static HRESULT WINAPI audio_renderer_events_QueueEvent(IMFMediaEventGenerator *i
{
struct audio_renderer *renderer = impl_from_IMFMediaEventGenerator(iface);
- TRACE("%p, %u, %s, %#x, %p.\n", iface, event_type, debugstr_guid(ext_type), hr, value);
+ TRACE("%p, %lu, %s, %#lx, %p.\n", iface, event_type, debugstr_guid(ext_type), hr, value);
return IMFMediaEventQueue_QueueEventParamVar(renderer->event_queue, event_type, ext_type, hr, value);
}
@@ -634,7 +634,7 @@ static HRESULT WINAPI audio_renderer_clock_sink_OnClockStart(IMFClockStateSink *
if (renderer->state == STREAM_STATE_STOPPED)
{
if (FAILED(hr = IAudioClient_Start(renderer->audio_client)))
- WARN("Failed to start audio client, hr %#x.\n", hr);
+ WARN("Failed to start audio client, hr %#lx.\n", hr);
renderer->state = STREAM_STATE_RUNNING;
}
}
@@ -664,10 +664,10 @@ static HRESULT WINAPI audio_renderer_clock_sink_OnClockStop(IMFClockStateSink *i
if (SUCCEEDED(hr = IAudioClient_Stop(renderer->audio_client)))
{
if (FAILED(hr = IAudioClient_Reset(renderer->audio_client)))
- WARN("Failed to reset audio client, hr %#x.\n", hr);
+ WARN("Failed to reset audio client, hr %#lx.\n", hr);
}
else
- WARN("Failed to stop audio client, hr %#x.\n", hr);
+ WARN("Failed to stop audio client, hr %#lx.\n", hr);
renderer->state = STREAM_STATE_STOPPED;
renderer->flags &= ~SAR_PREROLLED;
}
@@ -694,7 +694,7 @@ static HRESULT WINAPI audio_renderer_clock_sink_OnClockPause(IMFClockStateSink *
if (renderer->audio_client)
{
if (FAILED(hr = IAudioClient_Stop(renderer->audio_client)))
- WARN("Failed to stop audio client, hr %#x.\n", hr);
+ WARN("Failed to stop audio client, hr %#lx.\n", hr);
renderer->state = STREAM_STATE_PAUSED;
}
else
@@ -723,7 +723,7 @@ static HRESULT WINAPI audio_renderer_clock_sink_OnClockRestart(IMFClockStateSink
if ((preroll = (renderer->state != STREAM_STATE_RUNNING)))
{
if (FAILED(hr = IAudioClient_Start(renderer->audio_client)))
- WARN("Failed to start audio client, hr %#x.\n", hr);
+ WARN("Failed to start audio client, hr %#lx.\n", hr);
renderer->state = STREAM_STATE_RUNNING;
}
}
@@ -1236,7 +1236,7 @@ static HRESULT WINAPI audio_renderer_stream_GetEvent(IMFStreamSink *iface, DWORD
{
struct audio_renderer *renderer = impl_from_IMFStreamSink(iface);
- TRACE("%p, %#x, %p.\n", iface, flags, event);
+ TRACE("%p, %#lx, %p.\n", iface, flags, event);
if (renderer->flags & SAR_SHUT_DOWN)
return MF_E_STREAMSINK_REMOVED;
@@ -1275,7 +1275,7 @@ static HRESULT WINAPI audio_renderer_stream_QueueEvent(IMFStreamSink *iface, Med
{
struct audio_renderer *renderer = impl_from_IMFStreamSink(iface);
- TRACE("%p, %u, %s, %#x, %p.\n", iface, event_type, debugstr_guid(ext_type), hr, value);
+ TRACE("%p, %lu, %s, %#lx, %p.\n", iface, event_type, debugstr_guid(ext_type), hr, value);
if (renderer->flags & SAR_SHUT_DOWN)
return MF_E_STREAMSINK_REMOVED;
@@ -1519,7 +1519,7 @@ static HRESULT WINAPI audio_renderer_stream_type_handler_GetMediaTypeByIndex(IMF
{
struct audio_renderer *renderer = impl_from_IMFMediaTypeHandler(iface);
- TRACE("%p, %u, %p.\n", iface, index, media_type);
+ TRACE("%p, %lu, %p.\n", iface, index, media_type);
if (index == 0)
{
@@ -1543,14 +1543,14 @@ static HRESULT audio_renderer_create_audio_client(struct audio_renderer *rendere
(void **)&renderer->audio_client);
if (FAILED(hr))
{
- WARN("Failed to create audio client, hr %#x.\n", hr);
+ WARN("Failed to create audio client, hr %#lx.\n", hr);
return hr;
}
/* FIXME: for now always use default format. */
if (FAILED(hr = IAudioClient_GetMixFormat(renderer->audio_client, &wfx)))
{
- WARN("Failed to get audio format, hr %#x.\n", hr);
+ WARN("Failed to get audio format, hr %#lx.\n", hr);
return hr;
}
@@ -1566,46 +1566,46 @@ static HRESULT audio_renderer_create_audio_client(struct audio_renderer *rendere
CoTaskMemFree(wfx);
if (FAILED(hr))
{
- WARN("Failed to initialize audio client, hr %#x.\n", hr);
+ WARN("Failed to initialize audio client, hr %#lx.\n", hr);
return hr;
}
if (FAILED(hr = IAudioClient_GetService(renderer->audio_client, &IID_IAudioStreamVolume,
(void **)&renderer->stream_volume)))
{
- WARN("Failed to get stream volume control, hr %#x.\n", hr);
+ WARN("Failed to get stream volume control, hr %#lx.\n", hr);
return hr;
}
if (FAILED(hr = IAudioClient_GetService(renderer->audio_client, &IID_ISimpleAudioVolume, (void **)&renderer->audio_volume)))
{
- WARN("Failed to get audio volume control, hr %#x.\n", hr);
+ WARN("Failed to get audio volume control, hr %#lx.\n", hr);
return hr;
}
if (FAILED(hr = IAudioClient_GetService(renderer->audio_client, &IID_IAudioRenderClient,
(void **)&renderer->audio_render_client)))
{
- WARN("Failed to get audio render client, hr %#x.\n", hr);
+ WARN("Failed to get audio render client, hr %#lx.\n", hr);
return hr;
}
if (FAILED(hr = IAudioClient_SetEventHandle(renderer->audio_client, renderer->buffer_ready_event)))
{
- WARN("Failed to set event handle, hr %#x.\n", hr);
+ WARN("Failed to set event handle, hr %#lx.\n", hr);
return hr;
}
if (FAILED(hr = IAudioClient_GetBufferSize(renderer->audio_client, &renderer->max_frames)))
{
- WARN("Failed to get buffer size, hr %#x.\n", hr);
+ WARN("Failed to get buffer size, hr %#lx.\n", hr);
return hr;
}
if (SUCCEEDED(hr = MFCreateAsyncResult(NULL, &renderer->render_callback, NULL, &result)))
{
if (FAILED(hr = MFPutWaitingWorkItem(renderer->buffer_ready_event, 0, result, &renderer->buffer_ready_key)))
- WARN("Failed to submit wait item, hr %#x.\n", hr);
+ WARN("Failed to submit wait item, hr %#lx.\n", hr);
IMFAsyncResult_Release(result);
}
@@ -1714,7 +1714,7 @@ static HRESULT audio_renderer_collect_supported_types(struct audio_renderer *ren
hr = IMMDevice_Activate(renderer->device, &IID_IAudioClient, CLSCTX_INPROC_SERVER, NULL, (void **)&client);
if (FAILED(hr))
{
- WARN("Failed to create audio client, hr %#x.\n", hr);
+ WARN("Failed to create audio client, hr %#lx.\n", hr);
return hr;
}
@@ -1724,7 +1724,7 @@ static HRESULT audio_renderer_collect_supported_types(struct audio_renderer *ren
IAudioClient_Release(client);
if (FAILED(hr))
{
- WARN("Failed to get device audio format, hr %#x.\n", hr);
+ WARN("Failed to get device audio format, hr %#lx.\n", hr);
return hr;
}
@@ -1732,7 +1732,7 @@ static HRESULT audio_renderer_collect_supported_types(struct audio_renderer *ren
CoTaskMemFree(format);
if (FAILED(hr))
{
- WARN("Failed to initialize media type, hr %#x.\n", hr);
+ WARN("Failed to initialize media type, hr %#lx.\n", hr);
return hr;
}
@@ -1843,7 +1843,7 @@ static void audio_renderer_render(struct audio_renderer *renderer, IMFAsyncResul
}
if (FAILED(hr = MFPutWaitingWorkItem(renderer->buffer_ready_event, 0, result, &renderer->buffer_ready_key)))
- WARN("Failed to submit wait item, hr %#x.\n", hr);
+ WARN("Failed to submit wait item, hr %#lx.\n", hr);
}
static HRESULT WINAPI audio_renderer_render_callback_Invoke(IMFAsyncCallback *iface, IMFAsyncResult *result)
diff --git a/dlls/mf/session.c b/dlls/mf/session.c
index e6c21332d20..05b7af81df7 100644
--- a/dlls/mf/session.c
+++ b/dlls/mf/session.c
@@ -338,7 +338,7 @@ static HRESULT WINAPI local_mft_registration_RegisterMFTs(IMFLocalMFTRegistratio
HRESULT hr = S_OK;
DWORD i;
- TRACE("%p, %p, %u.\n", iface, info, count);
+ TRACE("%p, %p, %lu.\n", iface, info, count);
for (i = 0; i < count; ++i)
{
@@ -380,7 +380,7 @@ static ULONG WINAPI session_op_AddRef(IUnknown *iface)
struct session_op *op = impl_op_from_IUnknown(iface);
ULONG refcount = InterlockedIncrement(&op->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -390,7 +390,7 @@ static ULONG WINAPI session_op_Release(IUnknown *iface)
struct session_op *op = impl_op_from_IUnknown(iface);
ULONG refcount = InterlockedDecrement(&op->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -701,7 +701,7 @@ static void session_shutdown_current_topology(struct media_session *session)
(void **)&activate)))
{
if (FAILED(hr = IMFActivate_ShutdownObject(activate)))
- WARN("Failed to shut down activation object for the sink, hr %#x.\n", hr);
+ WARN("Failed to shut down activation object for the sink, hr %#lx.\n", hr);
IMFActivate_Release(activate);
}
else if (SUCCEEDED(topology_node_get_object(node, &IID_IMFStreamSink, (void **)&stream_sink)))
@@ -843,12 +843,12 @@ static void session_start(struct media_session *session, const GUID *time_format
if (FAILED(hr = IMFMediaSource_BeginGetEvent(source->source, &session->events_callback,
source->object)))
{
- WARN("Failed to subscribe to source events, hr %#x.\n", hr);
+ WARN("Failed to subscribe to source events, hr %#lx.\n", hr);
}
}
if (FAILED(hr = IMFMediaSource_Start(source->source, source->pd, &GUID_NULL, start_position)))
- WARN("Failed to start media source %p, hr %#x.\n", source->source, hr);
+ WARN("Failed to start media source %p, hr %#lx.\n", source->source, hr);
}
session->presentation.flags |= SESSION_FLAG_SOURCES_SUBSCRIBED;
@@ -1335,7 +1335,7 @@ static HRESULT session_append_node(struct media_session *session, IMFTopologyNod
if (FAILED(hr = topology_node_get_object(node, &IID_IMFStreamSink, (void **)&topo_node->object.object)))
{
- WARN("Failed to get stream sink interface, hr %#x.\n", hr);
+ WARN("Failed to get stream sink interface, hr %#lx.\n", hr);
break;
}
@@ -1352,7 +1352,7 @@ static HRESULT session_append_node(struct media_session *session, IMFTopologyNod
if (FAILED(hr = IMFVideoSampleAllocator_InitializeSampleAllocator(topo_node->u.sink.allocator,
2, media_type)))
{
- WARN("Failed to initialize sample allocator for the stream, hr %#x.\n", hr);
+ WARN("Failed to initialize sample allocator for the stream, hr %#lx.\n", hr);
}
IMFVideoSampleAllocator_QueryInterface(topo_node->u.sink.allocator,
&IID_IMFVideoSampleAllocatorCallback, (void **)&topo_node->u.sink.allocator_cb);
@@ -1369,7 +1369,7 @@ static HRESULT session_append_node(struct media_session *session, IMFTopologyNod
if (FAILED(IMFTopologyNode_GetUnknown(node, &MF_TOPONODE_SOURCE, &IID_IMFMediaSource,
(void **)&topo_node->u.source.source)))
{
- WARN("Missing MF_TOPONODE_SOURCE, hr %#x.\n", hr);
+ WARN("Missing MF_TOPONODE_SOURCE, hr %#lx.\n", hr);
break;
}
@@ -1379,7 +1379,7 @@ static HRESULT session_append_node(struct media_session *session, IMFTopologyNod
if (FAILED(hr = IMFTopologyNode_GetUnknown(node, &MF_TOPONODE_STREAM_DESCRIPTOR,
&IID_IMFStreamDescriptor, (void **)&sd)))
{
- WARN("Missing MF_TOPONODE_STREAM_DESCRIPTOR, hr %#x.\n", hr);
+ WARN("Missing MF_TOPONODE_STREAM_DESCRIPTOR, hr %#lx.\n", hr);
break;
}
@@ -1394,7 +1394,7 @@ static HRESULT session_append_node(struct media_session *session, IMFTopologyNod
hr = session_set_transform_stream_info(topo_node);
}
else
- WARN("Failed to get IMFTransform for MFT node, hr %#x.\n", hr);
+ WARN("Failed to get IMFTransform for MFT node, hr %#lx.\n", hr);
break;
case MF_TOPOLOGY_TEE_NODE:
@@ -1469,7 +1469,7 @@ static HRESULT session_set_current_topology(struct media_session *session, IMFTo
if (FAILED(hr = IMFTopology_CloneFrom(session->presentation.current_topology, topology)))
{
- WARN("Failed to clone topology, hr %#x.\n", hr);
+ WARN("Failed to clone topology, hr %#lx.\n", hr);
return hr;
}
@@ -1647,7 +1647,7 @@ static ULONG WINAPI mfsession_AddRef(IMFMediaSession *iface)
struct media_session *session = impl_from_IMFMediaSession(iface);
ULONG refcount = InterlockedIncrement(&session->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -1657,7 +1657,7 @@ static ULONG WINAPI mfsession_Release(IMFMediaSession *iface)
struct media_session *session = impl_from_IMFMediaSession(iface);
ULONG refcount = InterlockedDecrement(&session->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -1689,7 +1689,7 @@ static HRESULT WINAPI mfsession_GetEvent(IMFMediaSession *iface, DWORD flags, IM
{
struct media_session *session = impl_from_IMFMediaSession(iface);
- TRACE("%p, %#x, %p.\n", iface, flags, event);
+ TRACE("%p, %#lx, %p.\n", iface, flags, event);
return IMFMediaEventQueue_GetEvent(session->event_queue, flags, event);
}
@@ -1717,7 +1717,7 @@ static HRESULT WINAPI mfsession_QueueEvent(IMFMediaSession *iface, MediaEventTyp
{
struct media_session *session = impl_from_IMFMediaSession(iface);
- TRACE("%p, %d, %s, %#x, %p.\n", iface, event_type, debugstr_guid(ext_type), hr, value);
+ TRACE("%p, %ld, %s, %#lx, %p.\n", iface, event_type, debugstr_guid(ext_type), hr, value);
return IMFMediaEventQueue_QueueEventParamVar(session->event_queue, event_type, ext_type, hr, value);
}
@@ -1729,7 +1729,7 @@ static HRESULT WINAPI mfsession_SetTopology(IMFMediaSession *iface, DWORD flags,
WORD node_count = 0;
HRESULT hr;
- TRACE("%p, %#x, %p.\n", iface, flags, topology);
+ TRACE("%p, %#lx, %p.\n", iface, flags, topology);
if (topology)
{
@@ -1879,7 +1879,7 @@ static HRESULT WINAPI mfsession_GetFullTopology(IMFMediaSession *iface, DWORD fl
TOPOID topo_id;
HRESULT hr;
- TRACE("%p, %#x, %s, %p.\n", iface, flags, wine_dbgstr_longlong(id), topology);
+ TRACE("%p, %#lx, %s, %p.\n", iface, flags, wine_dbgstr_longlong(id), topology);
*topology = NULL;
@@ -1998,7 +1998,7 @@ static HRESULT session_get_renderer_node_service(struct media_session *session,
if (node_test_func(sink))
{
if (FAILED(hr = MFGetService((IUnknown *)sink, service, riid, obj)))
- WARN("Failed to get service from renderer node, %#x.\n", hr);
+ WARN("Failed to get service from renderer node, %#lx.\n", hr);
}
}
IMFStreamSink_Release(stream_sink);
@@ -2358,7 +2358,7 @@ static void session_set_presentation_clock(struct media_session *session)
hr = IMFPresentationClock_SetTimeSource(session->clock, session->system_time_source);
if (FAILED(hr))
- WARN("Failed to set time source, hr %#x.\n", hr);
+ WARN("Failed to set time source, hr %#lx.\n", hr);
LIST_FOR_EACH_ENTRY(node, &session->presentation.nodes, struct topo_node, entry)
{
@@ -2368,7 +2368,7 @@ static void session_set_presentation_clock(struct media_session *session)
if (FAILED(hr = IMFStreamSink_BeginGetEvent(node->object.sink_stream, &session->events_callback,
node->object.object)))
{
- WARN("Failed to subscribe to stream sink events, hr %#x.\n", hr);
+ WARN("Failed to subscribe to stream sink events, hr %#lx.\n", hr);
}
}
@@ -2383,11 +2383,11 @@ static void session_set_presentation_clock(struct media_session *session)
if (sink->event_generator && FAILED(hr = IMFMediaEventGenerator_BeginGetEvent(sink->event_generator,
&session->events_callback, (IUnknown *)sink->event_generator)))
{
- WARN("Failed to subscribe to sink events, hr %#x.\n", hr);
+ WARN("Failed to subscribe to sink events, hr %#lx.\n", hr);
}
if (FAILED(hr = IMFMediaSink_SetPresentationClock(sink->sink, session->clock)))
- WARN("Failed to set presentation clock for the sink, hr %#x.\n", hr);
+ WARN("Failed to set presentation clock for the sink, hr %#lx.\n", hr);
}
LIST_FOR_EACH_ENTRY(node, &session->presentation.nodes, struct topo_node, entry)
@@ -2420,7 +2420,7 @@ static HRESULT session_start_clock(struct media_session *session)
FIXME("Unhandled time format %s.\n", debugstr_guid(&session->presentation.time_format));
if (FAILED(hr = IMFPresentationClock_Start(session->clock, start_offset)))
- WARN("Failed to start session clock, hr %#x.\n", hr);
+ WARN("Failed to start session clock, hr %#lx.\n", hr);
return hr;
}
@@ -2521,7 +2521,7 @@ static void session_set_source_object_state(struct media_session *session, IUnkn
{
/* FIXME: abort and enter error state on failure. */
if (FAILED(hr = IMFMediaSinkPreroll_NotifyPreroll(sink->preroll, preroll_time)))
- WARN("Preroll notification failed, hr %#x.\n", hr);
+ WARN("Preroll notification failed, hr %#lx.\n", hr);
}
else
{
@@ -2795,14 +2795,14 @@ static void session_deliver_sample_to_node(struct media_session *session, IMFTop
if (topo_node->u.sink.requests)
{
if (FAILED(hr = IMFStreamSink_ProcessSample(topo_node->object.sink_stream, sample)))
- WARN("Stream sink failed to process sample, hr %#x.\n", hr);
+ WARN("Stream sink failed to process sample, hr %#lx.\n", hr);
topo_node->u.sink.requests--;
}
}
else if (FAILED(hr = IMFStreamSink_PlaceMarker(topo_node->object.sink_stream, MFSTREAMSINK_MARKER_ENDOFSEGMENT,
NULL, NULL)))
{
- WARN("Failed to place sink marker, hr %#x.\n", hr);
+ WARN("Failed to place sink marker, hr %#lx.\n", hr);
}
break;
case MF_TOPOLOGY_TRANSFORM_NODE:
@@ -2824,7 +2824,7 @@ static void session_deliver_sample_to_node(struct media_session *session, IMFTop
sample_entry->sample, 0)) == MF_E_NOTACCEPTING)
break;
if (FAILED(hr))
- WARN("Failed to process input for stream %u/%u, hr %#x.\n", i, stream_id, hr);
+ WARN("Failed to process input for stream %u/%lu, hr %#lx.\n", i, stream_id, hr);
transform_release_sample(sample_entry);
}
else
@@ -2838,7 +2838,7 @@ static void session_deliver_sample_to_node(struct media_session *session, IMFTop
if (drain)
{
if (FAILED(hr = IMFTransform_ProcessMessage(topo_node->object.transform, MFT_MESSAGE_COMMAND_DRAIN, 0)))
- WARN("Drain command failed for transform, hr %#x.\n", hr);
+ WARN("Drain command failed for transform, hr %#lx.\n", hr);
}
transform_node_pull_samples(session, topo_node);
@@ -2905,7 +2905,7 @@ static HRESULT session_request_sample_from_node(struct media_session *session, I
{
case MF_TOPOLOGY_SOURCESTREAM_NODE:
if (FAILED(hr = IMFMediaStream_RequestSample(topo_node->object.source_stream, NULL)))
- WARN("Sample request failed, hr %#x.\n", hr);
+ WARN("Sample request failed, hr %#lx.\n", hr);
break;
case MF_TOPOLOGY_TRANSFORM_NODE:
@@ -2961,7 +2961,7 @@ static void session_request_sample(struct media_session *session, IMFStreamSink
if (FAILED(hr = IMFTopologyNode_GetInput(sink_node->node, 0, &upstream_node, &upstream_output)))
{
- WARN("Failed to get upstream node connection, hr %#x.\n", hr);
+ WARN("Failed to get upstream node connection, hr %#lx.\n", hr);
return;
}
@@ -3000,7 +3000,7 @@ static void session_deliver_sample(struct media_session *session, IMFMediaStream
if (FAILED(hr = IMFTopologyNode_GetOutput(source_node->node, 0, &downstream_node, &downstream_input)))
{
- WARN("Failed to get downstream node connection, hr %#x.\n", hr);
+ WARN("Failed to get downstream node connection, hr %#lx.\n", hr);
return;
}
@@ -3028,7 +3028,7 @@ static void session_sink_invalidated(struct media_session *session, IMFMediaEven
if (!event)
{
if (FAILED(hr = MFCreateMediaEvent(MESinkInvalidated, &GUID_NULL, S_OK, NULL, &event)))
- WARN("Failed to create event, hr %#x.\n", hr);
+ WARN("Failed to create event, hr %#lx.\n", hr);
}
if (!event)
@@ -3153,20 +3153,20 @@ static HRESULT WINAPI session_events_callback_Invoke(IMFAsyncCallback *iface, IM
if (FAILED(hr = IMFMediaEventGenerator_EndGetEvent(event_source, result, &event)))
{
- WARN("Failed to get event from %p, hr %#x.\n", event_source, hr);
+ WARN("Failed to get event from %p, hr %#lx.\n", event_source, hr);
goto failed;
}
if (FAILED(hr = IMFMediaEvent_GetType(event, &event_type)))
{
- WARN("Failed to get event type, hr %#x.\n", hr);
+ WARN("Failed to get event type, hr %#lx.\n", hr);
goto failed;
}
value.vt = VT_EMPTY;
if (FAILED(hr = IMFMediaEvent_GetValue(event, &value)))
{
- WARN("Failed to get event value, hr %#x.\n", hr);
+ WARN("Failed to get event value, hr %#lx.\n", hr);
goto failed;
}
@@ -3333,7 +3333,7 @@ failed:
IMFMediaEvent_Release(event);
if (FAILED(hr = IMFMediaEventGenerator_BeginGetEvent(event_source, iface, (IUnknown *)event_source)))
- WARN("Failed to re-subscribe, hr %#x.\n", hr);
+ WARN("Failed to re-subscribe, hr %#lx.\n", hr);
IMFMediaEventGenerator_Release(event_source);
@@ -3400,7 +3400,7 @@ static HRESULT WINAPI session_sink_finalizer_callback_Invoke(IMFAsyncCallback *i
if (state == sink->object)
{
if (FAILED(hr = IMFMediaSink_QueryInterface(sink->sink, &IID_IMFFinalizableMediaSink, (void **)&fin_sink)))
- WARN("Unexpected, missing IMFFinalizableMediaSink, hr %#x.\n", hr);
+ WARN("Unexpected, missing IMFFinalizableMediaSink, hr %#lx.\n", hr);
}
else
{
@@ -3564,7 +3564,7 @@ static HRESULT session_is_presentation_rate_supported(struct media_session *sess
value = rate;
if (FAILED(hr = IMFRateSupport_IsRateSupported(rate_support, thin, rate, &value)))
- WARN("Source does not support rate %f, hr %#x.\n", rate, hr);
+ WARN("Source does not support rate %f, hr %#lx.\n", rate, hr);
IMFRateSupport_Release(rate_support);
/* Only "first" source is considered. */
@@ -3591,7 +3591,7 @@ static HRESULT session_is_presentation_rate_supported(struct media_session *sess
IMFRateSupport_Release(rate_support);
if (FAILED(hr))
{
- WARN("Sink %p does not support rate %f, hr %#x.\n", sink->sink, rate, hr);
+ WARN("Sink %p does not support rate %f, hr %#lx.\n", sink->sink, rate, hr);
break;
}
}
@@ -3721,7 +3721,7 @@ static ULONG WINAPI node_attribute_editor_Release(IMFTopologyNodeAttributeEditor
static HRESULT WINAPI node_attribute_editor_UpdateNodeAttributes(IMFTopologyNodeAttributeEditor *iface,
TOPOID id, DWORD count, MFTOPONODE_ATTRIBUTE_UPDATE *updates)
{
- FIXME("%p, %s, %u, %p.\n", iface, wine_dbgstr_longlong(id), count, updates);
+ FIXME("%p, %s, %lu, %p.\n", iface, wine_dbgstr_longlong(id), count, updates);
return E_NOTIMPL;
}
@@ -3791,7 +3791,7 @@ HRESULT WINAPI MFCreateMediaSession(IMFAttributes *config, IMFMediaSession **ses
if (FAILED(hr = CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IMFTopoLoader,
(void **)&object->topo_loader)))
{
- WARN("Failed to create custom topology loader, hr %#x.\n", hr);
+ WARN("Failed to create custom topology loader, hr %#lx.\n", hr);
}
}
@@ -3802,7 +3802,7 @@ HRESULT WINAPI MFCreateMediaSession(IMFAttributes *config, IMFMediaSession **ses
if (FAILED(hr = CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IMFQualityManager,
(void **)&object->quality_manager)))
{
- WARN("Failed to create custom quality manager, hr %#x.\n", hr);
+ WARN("Failed to create custom quality manager, hr %#lx.\n", hr);
}
}
}
diff --git a/dlls/mf/topology.c b/dlls/mf/topology.c
index 8eb1b763e64..ff90bc2c8af 100644
--- a/dlls/mf/topology.c
+++ b/dlls/mf/topology.c
@@ -174,7 +174,7 @@ static ULONG WINAPI topology_AddRef(IMFTopology *iface)
struct topology *topology = impl_from_IMFTopology(iface);
ULONG refcount = InterlockedIncrement(&topology->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -267,7 +267,7 @@ static ULONG WINAPI topology_Release(IMFTopology *iface)
struct topology *topology = impl_from_IMFTopology(iface);
ULONG refcount = InterlockedDecrement(&topology->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -702,7 +702,7 @@ static HRESULT WINAPI topology_CloneFrom(IMFTopology *iface, IMFTopology *src)
{
if (FAILED(hr = create_topology_node(src_topology->nodes.nodes[i]->node_type, &node)))
{
- WARN("Failed to create a node, hr %#x.\n", hr);
+ WARN("Failed to create a node, hr %#lx.\n", hr);
break;
}
@@ -931,7 +931,7 @@ static ULONG WINAPI topology_node_AddRef(IMFTopologyNode *iface)
struct topology_node *node = impl_from_IMFTopologyNode(iface);
ULONG refcount = InterlockedIncrement(&node->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -942,7 +942,7 @@ static ULONG WINAPI topology_node_Release(IMFTopologyNode *iface)
ULONG refcount = InterlockedDecrement(&node->refcount);
unsigned int i;
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -1441,7 +1441,7 @@ static HRESULT WINAPI topology_node_ConnectOutput(IMFTopologyNode *iface, DWORD
struct topology_node *node = impl_from_IMFTopologyNode(iface);
struct topology_node *connection = unsafe_impl_from_IMFTopologyNode(peer);
- TRACE("%p, %u, %p, %u.\n", iface, output_index, peer, input_index);
+ TRACE("%p, %lu, %p, %lu.\n", iface, output_index, peer, input_index);
if (!connection)
{
@@ -1456,7 +1456,7 @@ static HRESULT WINAPI topology_node_DisconnectOutput(IMFTopologyNode *iface, DWO
{
struct topology_node *node = impl_from_IMFTopologyNode(iface);
- TRACE("%p, %u.\n", iface, output_index);
+ TRACE("%p, %lu.\n", iface, output_index);
return topology_node_disconnect_output(node, output_index);
}
@@ -1467,7 +1467,7 @@ static HRESULT WINAPI topology_node_GetInput(IMFTopologyNode *iface, DWORD input
struct topology_node *node = impl_from_IMFTopologyNode(iface);
HRESULT hr = S_OK;
- TRACE("%p, %u, %p, %p.\n", iface, input_index, ret, output_index);
+ TRACE("%p, %lu, %p, %p.\n", iface, input_index, ret, output_index);
EnterCriticalSection(&node->cs);
@@ -1498,7 +1498,7 @@ static HRESULT WINAPI topology_node_GetOutput(IMFTopologyNode *iface, DWORD outp
struct topology_node *node = impl_from_IMFTopologyNode(iface);
HRESULT hr = S_OK;
- TRACE("%p, %u, %p, %p.\n", iface, output_index, ret, input_index);
+ TRACE("%p, %lu, %p, %p.\n", iface, output_index, ret, input_index);
EnterCriticalSection(&node->cs);
@@ -1528,7 +1528,7 @@ static HRESULT WINAPI topology_node_SetOutputPrefType(IMFTopologyNode *iface, DW
struct topology_node *node = impl_from_IMFTopologyNode(iface);
HRESULT hr = S_OK;
- TRACE("%p, %u, %p.\n", iface, index, mediatype);
+ TRACE("%p, %lu, %p.\n", iface, index, mediatype);
EnterCriticalSection(&node->cs);
@@ -1562,7 +1562,7 @@ static HRESULT WINAPI topology_node_GetOutputPrefType(IMFTopologyNode *iface, DW
struct topology_node *node = impl_from_IMFTopologyNode(iface);
HRESULT hr = S_OK;
- TRACE("%p, %u, %p.\n", iface, index, mediatype);
+ TRACE("%p, %lu, %p.\n", iface, index, mediatype);
EnterCriticalSection(&node->cs);
@@ -1581,7 +1581,7 @@ static HRESULT WINAPI topology_node_SetInputPrefType(IMFTopologyNode *iface, DWO
struct topology_node *node = impl_from_IMFTopologyNode(iface);
HRESULT hr = S_OK;
- TRACE("%p, %u, %p.\n", iface, index, mediatype);
+ TRACE("%p, %lu, %p.\n", iface, index, mediatype);
EnterCriticalSection(&node->cs);
@@ -1622,7 +1622,7 @@ static HRESULT WINAPI topology_node_GetInputPrefType(IMFTopologyNode *iface, DWO
struct topology_node *node = impl_from_IMFTopologyNode(iface);
HRESULT hr = S_OK;
- TRACE("%p, %u, %p.\n", iface, index, mediatype);
+ TRACE("%p, %lu, %p.\n", iface, index, mediatype);
EnterCriticalSection(&node->cs);
@@ -1833,7 +1833,7 @@ HRESULT WINAPI MFGetTopoNodeCurrentType(IMFTopologyNode *node, DWORD stream, BOO
UINT32 primary_output;
HRESULT hr;
- TRACE("%p, %u, %d, %p.\n", node, stream, output, type);
+ TRACE("%p, %lu, %d, %p.\n", node, stream, output, type);
if (FAILED(hr = IMFTopologyNode_GetNodeType(node, &node_type)))
return hr;
@@ -1916,7 +1916,7 @@ static ULONG WINAPI topology_loader_AddRef(IMFTopoLoader *iface)
struct topology_loader *loader = impl_from_IMFTopoLoader(iface);
ULONG refcount = InterlockedIncrement(&loader->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -1926,7 +1926,7 @@ static ULONG WINAPI topology_loader_Release(IMFTopoLoader *iface)
struct topology_loader *loader = impl_from_IMFTopoLoader(iface);
ULONG refcount = InterlockedDecrement(&loader->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
free(loader);
@@ -2456,16 +2456,16 @@ static HRESULT topology_loader_create_copier(IMFTopologyNode *upstream_node, DWO
return hr;
if (FAILED(hr = MFGetTopoNodeCurrentType(upstream_node, upstream_output, TRUE, &input_type)))
- WARN("Failed to get upstream media type hr %#x.\n", hr);
+ WARN("Failed to get upstream media type hr %#lx.\n", hr);
if (SUCCEEDED(hr) && FAILED(hr = MFGetTopoNodeCurrentType(downstream_node, downstream_input, FALSE, &output_type)))
- WARN("Failed to get downstream media type hr %#x.\n", hr);
+ WARN("Failed to get downstream media type hr %#lx.\n", hr);
if (SUCCEEDED(hr) && FAILED(hr = IMFTransform_SetInputType(transform, 0, input_type, 0)))
- WARN("Input type wasn't accepted, hr %#x.\n", hr);
+ WARN("Input type wasn't accepted, hr %#lx.\n", hr);
if (SUCCEEDED(hr) && FAILED(hr = IMFTransform_SetOutputType(transform, 0, output_type, 0)))
- WARN("Output type wasn't accepted, hr %#x.\n", hr);
+ WARN("Output type wasn't accepted, hr %#lx.\n", hr);
if (SUCCEEDED(hr))
{
@@ -2558,7 +2558,7 @@ static void topology_loader_resolve_complete(struct topoloader_context *context)
IMFTopologyNode_SetUINT32(node, &MF_TOPONODE_STREAMID, 0);
if (FAILED(hr = topology_loader_connect_d3d_aware_input(context, node)))
- WARN("Failed to connect D3D-aware input, hr %#x.\n", hr);
+ WARN("Failed to connect D3D-aware input, hr %#lx.\n", hr);
}
else if (node_type == MF_TOPOLOGY_SOURCESTREAM_NODE)
{
@@ -2642,7 +2642,7 @@ static HRESULT WINAPI topology_loader_Load(IMFTopoLoader *iface, IMFTopology *in
if (node_type == MF_TOPOLOGY_SOURCESTREAM_NODE)
{
if (FAILED(hr = topology_loader_clone_node(&context, node, NULL, 0)))
- WARN("Failed to clone source node, hr %#x.\n", hr);
+ WARN("Failed to clone source node, hr %#lx.\n", hr);
}
IMFTopologyNode_Release(node);
@@ -2652,7 +2652,7 @@ static HRESULT WINAPI topology_loader_Load(IMFTopoLoader *iface, IMFTopology *in
{
if (FAILED(hr = topology_loader_resolve_nodes(&context, &layer_size)))
{
- WARN("Failed to resolve for marker %u, hr %#x.\n", context.marker, hr);
+ WARN("Failed to resolve for marker %u, hr %#lx.\n", context.marker, hr);
break;
}
@@ -2734,7 +2734,7 @@ static ULONG WINAPI seq_source_AddRef(IMFSequencerSource *iface)
struct seq_source *seq_source = impl_from_IMFSequencerSource(iface);
ULONG refcount = InterlockedIncrement(&seq_source->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -2744,7 +2744,7 @@ static ULONG WINAPI seq_source_Release(IMFSequencerSource *iface)
struct seq_source *seq_source = impl_from_IMFSequencerSource(iface);
ULONG refcount = InterlockedDecrement(&seq_source->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
free(seq_source);
@@ -2755,14 +2755,14 @@ static ULONG WINAPI seq_source_Release(IMFSequencerSource *iface)
static HRESULT WINAPI seq_source_AppendTopology(IMFSequencerSource *iface, IMFTopology *topology,
DWORD flags, MFSequencerElementId *id)
{
- FIXME("%p, %p, %x, %p.\n", iface, topology, flags, id);
+ FIXME("%p, %p, %lx, %p.\n", iface, topology, flags, id);
return E_NOTIMPL;
}
static HRESULT WINAPI seq_source_DeleteTopology(IMFSequencerSource *iface, MFSequencerElementId id)
{
- FIXME("%p, %#x.\n", iface, id);
+ FIXME("%p, %#lx.\n", iface, id);
return E_NOTIMPL;
}
@@ -2778,14 +2778,14 @@ static HRESULT WINAPI seq_source_GetPresentationContext(IMFSequencerSource *ifac
static HRESULT WINAPI seq_source_UpdateTopology(IMFSequencerSource *iface, MFSequencerElementId id,
IMFTopology *topology)
{
- FIXME("%p, %#x, %p.\n", iface, id, topology);
+ FIXME("%p, %#lx, %p.\n", iface, id, topology);
return E_NOTIMPL;
}
static HRESULT WINAPI seq_source_UpdateTopologyFlags(IMFSequencerSource *iface, MFSequencerElementId id, DWORD flags)
{
- FIXME("%p, %#x, %#x.\n", iface, id, flags);
+ FIXME("%p, %#lx, %#lx.\n", iface, id, flags);
return E_NOTIMPL;
}
--
2.34.1
1
0
Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com>
---
Changes in this version:
- Move struct condrv_output_info_params_font to SetCurrentConsoleFontEx
as anonymous struct.
- ioctl size only contains meaningful bytes.
- Calculate face_name string size in conhost.
- Manage invalid font height, weight and face name parameters.
dlls/kernel32/console.c | 7 ------
dlls/kernel32/kernel32.spec | 2 +-
dlls/kernel32/tests/console.c | 40 ++++++++++++++++-----------------
dlls/kernelbase/console.c | 40 +++++++++++++++++++++++++++++++++
dlls/kernelbase/kernelbase.spec | 1 +
include/wine/condrv.h | 1 +
programs/conhost/conhost.c | 25 ++++++++++++++++++---
programs/conhost/conhost.h | 14 +++++++-----
programs/conhost/window.c | 27 +++++++++++++---------
9 files changed, 111 insertions(+), 46 deletions(-)
diff --git a/dlls/kernel32/console.c b/dlls/kernel32/console.c
index 80f3419cd7a..58bd18d2a5f 100644
--- a/dlls/kernel32/console.c
+++ b/dlls/kernel32/console.c
@@ -480,10 +480,3 @@ BOOL WINAPI GetConsoleFontInfo(HANDLE hConsole, BOOL maximize, DWORD numfonts, C
SetLastError(LOWORD(E_NOTIMPL) /* win10 1709+ */);
return FALSE;
}
-
-BOOL WINAPI SetCurrentConsoleFontEx(HANDLE hConsole, BOOL maxwindow, CONSOLE_FONT_INFOEX *cfix)
-{
- FIXME("(%p %d %p): stub!\n", hConsole, maxwindow, cfix);
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
-}
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index 87fa0c39381..6e063bfaa7b 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -1390,7 +1390,7 @@
@ stdcall -import SetConsoleTitleW(wstr)
@ stdcall -import SetConsoleWindowInfo(long long ptr)
@ stdcall SetCriticalSectionSpinCount(ptr long) NTDLL.RtlSetCriticalSectionSpinCount
-@ stdcall SetCurrentConsoleFontEx(long long ptr)
+@ stdcall -import SetCurrentConsoleFontEx(long long ptr)
@ stdcall -import SetCurrentDirectoryA(str)
@ stdcall -import SetCurrentDirectoryW(wstr)
@ stub SetDaylightFlag
diff --git a/dlls/kernel32/tests/console.c b/dlls/kernel32/tests/console.c
index e4d9d43f4c4..5443a611f80 100644
--- a/dlls/kernel32/tests/console.c
+++ b/dlls/kernel32/tests/console.c
@@ -3576,18 +3576,18 @@ static void test_SetCurrentConsoleFontEx(HANDLE std_output)
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(NULL, FALSE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(NULL, TRUE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
CreatePipe(&pipe1, &pipe2, NULL, 0);
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(pipe1, FALSE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
CloseHandle(pipe1);
CloseHandle(pipe2);
@@ -3595,47 +3595,47 @@ static void test_SetCurrentConsoleFontEx(HANDLE std_output)
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(pipe1, TRUE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
CloseHandle(pipe1);
CloseHandle(pipe2);
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(std_input, FALSE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(std_input, TRUE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(std_output, FALSE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(std_output, TRUE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
cfix = orig_cfix;
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(NULL, FALSE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(NULL, TRUE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
CreatePipe(&pipe1, &pipe2, NULL, 0);
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(pipe1, FALSE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
CloseHandle(pipe1);
CloseHandle(pipe2);
@@ -3643,35 +3643,35 @@ static void test_SetCurrentConsoleFontEx(HANDLE std_output)
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(pipe1, TRUE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
CloseHandle(pipe1);
CloseHandle(pipe2);
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(std_input, FALSE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(std_input, TRUE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(std_output, FALSE, &cfix);
- todo_wine ok(ret, "got %d, expected non-zero\n", ret);
- todo_wine ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError());
+ ok(ret, "got %d, expected non-zero\n", ret);
+ ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError());
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(std_output, TRUE, &cfix);
- todo_wine ok(ret, "got %d, expected non-zero\n", ret);
- todo_wine ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError());
+ ok(ret, "got %d, expected non-zero\n", ret);
+ ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError());
/* Restore original console font parameters */
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(std_output, FALSE, &orig_cfix);
- todo_wine ok(ret, "got %d, expected non-zero\n", ret);
- todo_wine ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError());
+ ok(ret, "got %d, expected non-zero\n", ret);
+ ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError());
}
static void test_GetConsoleFontSize(HANDLE std_output)
diff --git a/dlls/kernelbase/console.c b/dlls/kernelbase/console.c
index a7eeb439232..5f64fc90fa3 100644
--- a/dlls/kernelbase/console.c
+++ b/dlls/kernelbase/console.c
@@ -1303,6 +1303,46 @@ BOOL WINAPI DECLSPEC_HOTPATCH SetConsoleWindowInfo( HANDLE handle, BOOL absolute
}
+/******************************************************************************
+ * SetCurrentConsoleFontEx (kernelbase.@)
+ */
+BOOL WINAPI SetCurrentConsoleFontEx(HANDLE hConsole, BOOL maxwindow, CONSOLE_FONT_INFOEX *cfix)
+{
+ struct
+ {
+ struct condrv_output_info_params params;
+ WCHAR face_name[LF_FACESIZE];
+ } data;
+
+ WCHAR *p = cfix->FaceName;
+ int len = 0;
+ DWORD size;
+
+ TRACE( "(%p %d %p)\n", hConsole, maxwindow, cfix );
+
+ if (cfix->cbSize != sizeof(CONSOLE_FONT_INFOEX))
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ data.params.mask = SET_CONSOLE_OUTPUT_INFO_FONT;
+
+ data.params.info.font_width = cfix->dwFontSize.X;
+ data.params.info.font_height = cfix->dwFontSize.Y;
+ data.params.info.font_pitch_family = cfix->FontFamily;
+ data.params.info.font_weight = cfix->FontWeight;
+
+ while (*p && len < LF_FACESIZE) { p++; len++; }
+ size = len * sizeof(WCHAR);
+
+ memcpy( data.face_name, cfix->FaceName, size );
+ size += sizeof(struct condrv_output_info_params);
+
+ return console_ioctl( hConsole, IOCTL_CONDRV_SET_OUTPUT_INFO, &data, size, NULL, 0, NULL );
+}
+
+
/***********************************************************************
* ReadConsoleInputA (kernelbase.@)
*/
diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec
index 01135d6250a..91c4909e006 100644
--- a/dlls/kernelbase/kernelbase.spec
+++ b/dlls/kernelbase/kernelbase.spec
@@ -1422,6 +1422,7 @@
@ stdcall SetConsoleTitleW(wstr)
@ stdcall SetConsoleWindowInfo(long long ptr)
@ stdcall SetCriticalSectionSpinCount(ptr long) ntdll.RtlSetCriticalSectionSpinCount
+@ stdcall SetCurrentConsoleFontEx(long long ptr)
@ stdcall SetCurrentDirectoryA(str)
@ stdcall SetCurrentDirectoryW(wstr)
@ stdcall SetDefaultDllDirectories(long)
diff --git a/include/wine/condrv.h b/include/wine/condrv.h
index 4d2332a1ee9..b5e294b9401 100644
--- a/include/wine/condrv.h
+++ b/include/wine/condrv.h
@@ -155,6 +155,7 @@ struct condrv_output_info_params
#define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x0010
#define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x0020
#define SET_CONSOLE_OUTPUT_INFO_POPUP_ATTR 0x0040
+#define SET_CONSOLE_OUTPUT_INFO_FONT 0x0080
/* IOCTL_CONDRV_FILL_OUTPUT params */
struct condrv_fill_output_params
diff --git a/programs/conhost/conhost.c b/programs/conhost/conhost.c
index 2b137c40fb0..77b6c222621 100644
--- a/programs/conhost/conhost.c
+++ b/programs/conhost/conhost.c
@@ -1830,7 +1830,7 @@ NTSTATUS change_screen_buffer_size( struct screen_buffer *screen_buffer, int new
}
static NTSTATUS set_output_info( struct screen_buffer *screen_buffer,
- const struct condrv_output_info_params *params )
+ const struct condrv_output_info_params *params, size_t in_size )
{
const struct condrv_output_info *info = ¶ms->info;
NTSTATUS status;
@@ -1917,6 +1917,24 @@ static NTSTATUS set_output_info( struct screen_buffer *screen_buffer,
screen_buffer->max_width = info->max_width;
screen_buffer->max_height = info->max_height;
}
+ if (params->mask & SET_CONSOLE_OUTPUT_INFO_FONT)
+ {
+ WCHAR *face_name = (WCHAR *)(params + 1);
+ size_t face_name_size = in_size - sizeof(*params);
+ unsigned int height = info->font_height;
+ unsigned int weight = FW_NORMAL;
+
+ if (!*face_name)
+ {
+ face_name = screen_buffer->font.face_name;
+ face_name_size = screen_buffer->font.face_len * sizeof(WCHAR);
+ }
+
+ if (!height) height = 12;
+ if (info->font_weight >= FW_SEMIBOLD) weight = FW_BOLD;
+
+ update_console_font( screen_buffer->console, face_name, face_name_size, height, weight );
+ }
if (is_active( screen_buffer ))
{
@@ -2429,8 +2447,9 @@ static NTSTATUS screen_buffer_ioctl( struct screen_buffer *screen_buffer, unsign
return get_output_info( screen_buffer, out_size );
case IOCTL_CONDRV_SET_OUTPUT_INFO:
- if (in_size != sizeof(struct condrv_output_info_params) || *out_size) return STATUS_INVALID_PARAMETER;
- return set_output_info( screen_buffer, in_data );
+ if (in_size < sizeof(struct condrv_output_info_params) || *out_size)
+ return STATUS_INVALID_PARAMETER;
+ return set_output_info( screen_buffer, in_data, in_size );
case IOCTL_CONDRV_FILL_OUTPUT:
if (in_size != sizeof(struct condrv_fill_output_params) || *out_size != sizeof(DWORD))
diff --git a/programs/conhost/conhost.h b/programs/conhost/conhost.h
index 5e9b999380c..3cbd2ed2d80 100644
--- a/programs/conhost/conhost.h
+++ b/programs/conhost/conhost.h
@@ -130,17 +130,21 @@ struct screen_buffer
struct wine_rb_entry entry; /* map entry */
};
-BOOL init_window( struct console *console );
-void init_message_window( struct console *console );
-void update_window_region( struct console *console, const RECT *update );
-void update_window_config( struct console *console, BOOL delay );
-
+/* conhost.c */
NTSTATUS write_console_input( struct console *console, const INPUT_RECORD *records,
unsigned int count, BOOL flush );
void notify_screen_buffer_size( struct screen_buffer *screen_buffer );
NTSTATUS change_screen_buffer_size( struct screen_buffer *screen_buffer, int new_width, int new_height );
+/* window.c */
+void update_console_font( struct console *console, const WCHAR *face_name, size_t face_name_size,
+ unsigned int height, unsigned int weight );
+BOOL init_window( struct console *console );
+void init_message_window( struct console *console );
+void update_window_region( struct console *console, const RECT *update );
+void update_window_config( struct console *console, BOOL delay );
+
static inline void empty_update_rect( struct screen_buffer *screen_buffer, RECT *rect )
{
SetRect( rect, screen_buffer->width, screen_buffer->height, 0, 0 );
diff --git a/programs/conhost/window.c b/programs/conhost/window.c
index db04ba120e4..b88b95c41ce 100644
--- a/programs/conhost/window.c
+++ b/programs/conhost/window.c
@@ -652,7 +652,8 @@ static HFONT select_font_config( struct console_config *config, unsigned int cp,
return font;
}
-static void fill_logfont( LOGFONTW *lf, const WCHAR *name, unsigned int height, unsigned int weight )
+static void fill_logfont( LOGFONTW *lf, const WCHAR *face_name, size_t face_name_size,
+ unsigned int height, unsigned int weight )
{
lf->lfHeight = height;
lf->lfWidth = 0;
@@ -667,7 +668,8 @@ static void fill_logfont( LOGFONTW *lf, const WCHAR *name, unsigned int height,
lf->lfClipPrecision = CLIP_DEFAULT_PRECIS;
lf->lfQuality = DEFAULT_QUALITY;
lf->lfPitchAndFamily = FIXED_PITCH | FF_DONTCARE;
- lstrcpyW( lf->lfFaceName, name );
+ memcpy( lf->lfFaceName, face_name, face_name_size );
+ lf->lfFaceName[face_name_size / sizeof(WCHAR)] = 0;
}
static BOOL set_console_font( struct console *console, const LOGFONTW *logfont )
@@ -705,6 +707,7 @@ static BOOL set_console_font( struct console *console, const LOGFONTW *logfont )
font_info->width = tm.tmAveCharWidth;
font_info->height = tm.tmHeight + tm.tmExternalLeading;
+ font_info->pitch_family = tm.tmPitchAndFamily;
font_info->weight = tm.tmWeight;
free( font_info->face_name );
@@ -851,15 +854,15 @@ static int WINAPI get_first_font_enum( const LOGFONTW *lf, const TEXTMETRICW *tm
/* sets logfont as the new font for the console */
-static void update_console_font( struct console *console, const WCHAR *font,
- unsigned int height, unsigned int weight )
+void update_console_font( struct console *console, const WCHAR *face_name, size_t face_name_size,
+ unsigned int height, unsigned int weight )
{
struct font_chooser fc;
LOGFONTW lf;
- if (font[0] && height && weight)
+ if (face_name[0] && height && weight)
{
- fill_logfont( &lf, font, height, weight );
+ fill_logfont( &lf, face_name, face_name_size, height, weight );
if (set_console_font( console, &lf )) return;
}
@@ -1581,8 +1584,9 @@ static BOOL select_font( struct dialog_info *di )
if (font_idx < 0 || size_idx < 0 || size_idx >= di->font_count)
return FALSE;
- fill_logfont( &lf, di->font[size_idx].faceName, di->font[size_idx].height,
- di->font[size_idx].weight );
+ fill_logfont( &lf, di->font[size_idx].faceName,
+ wcslen(di->font[size_idx].faceName) * sizeof(WCHAR),
+ di->font[size_idx].height, di->font[size_idx].weight );
font = select_font_config( &config, di->console->output_cp, di->console->win, &lf );
if (!font) return FALSE;
@@ -1702,7 +1706,9 @@ static INT_PTR WINAPI font_dialog_proc( HWND dialog, UINT msg, WPARAM wparam, LP
{
LOGFONTW lf;
- fill_logfont( &lf, di->font[val].faceName, di->font[val].height, di->font[val].weight );
+ fill_logfont( &lf, di->font[val].faceName,
+ wcslen(di->font[val].faceName) * sizeof(WCHAR),
+ di->font[val].height, di->font[val].weight );
DeleteObject( select_font_config( &di->config, di->console->output_cp,
di->console->win, &lf ));
}
@@ -1901,7 +1907,8 @@ static void apply_config( struct console *console, const struct console_config *
memcmp( console->active->font.face_name, config->face_name,
console->active->font.face_len * sizeof(WCHAR) ))
{
- update_console_font( console, config->face_name, config->cell_height, config->font_weight );
+ update_console_font( console, config->face_name, wcslen(config->face_name) * sizeof(WCHAR),
+ config->cell_height, config->font_weight );
}
update_window( console );
--
2.34.1
2
2
Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com>
---
Changes in this version:
- Use wcsnlen to determine the length of the FaceName string.
- Use face_name_size to check for empty FaceName string.
dlls/kernel32/console.c | 7 ------
dlls/kernel32/kernel32.spec | 2 +-
dlls/kernel32/tests/console.c | 40 ++++++++++++++++-----------------
dlls/kernelbase/console.c | 37 ++++++++++++++++++++++++++++++
dlls/kernelbase/kernelbase.spec | 1 +
include/wine/condrv.h | 1 +
programs/conhost/conhost.c | 25 ++++++++++++++++++---
programs/conhost/conhost.h | 14 +++++++-----
programs/conhost/window.c | 27 +++++++++++++---------
9 files changed, 108 insertions(+), 46 deletions(-)
diff --git a/dlls/kernel32/console.c b/dlls/kernel32/console.c
index 80f3419cd7a..58bd18d2a5f 100644
--- a/dlls/kernel32/console.c
+++ b/dlls/kernel32/console.c
@@ -480,10 +480,3 @@ BOOL WINAPI GetConsoleFontInfo(HANDLE hConsole, BOOL maximize, DWORD numfonts, C
SetLastError(LOWORD(E_NOTIMPL) /* win10 1709+ */);
return FALSE;
}
-
-BOOL WINAPI SetCurrentConsoleFontEx(HANDLE hConsole, BOOL maxwindow, CONSOLE_FONT_INFOEX *cfix)
-{
- FIXME("(%p %d %p): stub!\n", hConsole, maxwindow, cfix);
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
-}
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index 87fa0c39381..6e063bfaa7b 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -1390,7 +1390,7 @@
@ stdcall -import SetConsoleTitleW(wstr)
@ stdcall -import SetConsoleWindowInfo(long long ptr)
@ stdcall SetCriticalSectionSpinCount(ptr long) NTDLL.RtlSetCriticalSectionSpinCount
-@ stdcall SetCurrentConsoleFontEx(long long ptr)
+@ stdcall -import SetCurrentConsoleFontEx(long long ptr)
@ stdcall -import SetCurrentDirectoryA(str)
@ stdcall -import SetCurrentDirectoryW(wstr)
@ stub SetDaylightFlag
diff --git a/dlls/kernel32/tests/console.c b/dlls/kernel32/tests/console.c
index e4d9d43f4c4..5443a611f80 100644
--- a/dlls/kernel32/tests/console.c
+++ b/dlls/kernel32/tests/console.c
@@ -3576,18 +3576,18 @@ static void test_SetCurrentConsoleFontEx(HANDLE std_output)
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(NULL, FALSE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(NULL, TRUE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
CreatePipe(&pipe1, &pipe2, NULL, 0);
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(pipe1, FALSE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
CloseHandle(pipe1);
CloseHandle(pipe2);
@@ -3595,47 +3595,47 @@ static void test_SetCurrentConsoleFontEx(HANDLE std_output)
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(pipe1, TRUE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
CloseHandle(pipe1);
CloseHandle(pipe2);
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(std_input, FALSE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(std_input, TRUE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(std_output, FALSE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(std_output, TRUE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u, expected 87\n", GetLastError());
cfix = orig_cfix;
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(NULL, FALSE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(NULL, TRUE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
CreatePipe(&pipe1, &pipe2, NULL, 0);
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(pipe1, FALSE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
CloseHandle(pipe1);
CloseHandle(pipe2);
@@ -3643,35 +3643,35 @@ static void test_SetCurrentConsoleFontEx(HANDLE std_output)
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(pipe1, TRUE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
CloseHandle(pipe1);
CloseHandle(pipe2);
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(std_input, FALSE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(std_input, TRUE, &cfix);
ok(!ret, "got %d, expected 0\n", ret);
- todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(std_output, FALSE, &cfix);
- todo_wine ok(ret, "got %d, expected non-zero\n", ret);
- todo_wine ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError());
+ ok(ret, "got %d, expected non-zero\n", ret);
+ ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError());
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(std_output, TRUE, &cfix);
- todo_wine ok(ret, "got %d, expected non-zero\n", ret);
- todo_wine ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError());
+ ok(ret, "got %d, expected non-zero\n", ret);
+ ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError());
/* Restore original console font parameters */
SetLastError(0xdeadbeef);
ret = SetCurrentConsoleFontEx(std_output, FALSE, &orig_cfix);
- todo_wine ok(ret, "got %d, expected non-zero\n", ret);
- todo_wine ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError());
+ ok(ret, "got %d, expected non-zero\n", ret);
+ ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError());
}
static void test_GetConsoleFontSize(HANDLE std_output)
diff --git a/dlls/kernelbase/console.c b/dlls/kernelbase/console.c
index a7eeb439232..56340922d32 100644
--- a/dlls/kernelbase/console.c
+++ b/dlls/kernelbase/console.c
@@ -1303,6 +1303,43 @@ BOOL WINAPI DECLSPEC_HOTPATCH SetConsoleWindowInfo( HANDLE handle, BOOL absolute
}
+/******************************************************************************
+ * SetCurrentConsoleFontEx (kernelbase.@)
+ */
+BOOL WINAPI SetCurrentConsoleFontEx(HANDLE hConsole, BOOL maxwindow, CONSOLE_FONT_INFOEX *cfix)
+{
+ struct
+ {
+ struct condrv_output_info_params params;
+ WCHAR face_name[LF_FACESIZE];
+ } data;
+
+ size_t size;
+
+ TRACE( "(%p %d %p)\n", hConsole, maxwindow, cfix );
+
+ if (cfix->cbSize != sizeof(CONSOLE_FONT_INFOEX))
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ data.params.mask = SET_CONSOLE_OUTPUT_INFO_FONT;
+
+ data.params.info.font_width = cfix->dwFontSize.X;
+ data.params.info.font_height = cfix->dwFontSize.Y;
+ data.params.info.font_pitch_family = cfix->FontFamily;
+ data.params.info.font_weight = cfix->FontWeight;
+
+ size = wcsnlen( cfix->FaceName, LF_FACESIZE - 1 ) * sizeof(WCHAR);
+
+ memcpy( data.face_name, cfix->FaceName, size );
+ size += sizeof(struct condrv_output_info_params);
+
+ return console_ioctl( hConsole, IOCTL_CONDRV_SET_OUTPUT_INFO, &data, size, NULL, 0, NULL );
+}
+
+
/***********************************************************************
* ReadConsoleInputA (kernelbase.@)
*/
diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec
index 01135d6250a..91c4909e006 100644
--- a/dlls/kernelbase/kernelbase.spec
+++ b/dlls/kernelbase/kernelbase.spec
@@ -1422,6 +1422,7 @@
@ stdcall SetConsoleTitleW(wstr)
@ stdcall SetConsoleWindowInfo(long long ptr)
@ stdcall SetCriticalSectionSpinCount(ptr long) ntdll.RtlSetCriticalSectionSpinCount
+@ stdcall SetCurrentConsoleFontEx(long long ptr)
@ stdcall SetCurrentDirectoryA(str)
@ stdcall SetCurrentDirectoryW(wstr)
@ stdcall SetDefaultDllDirectories(long)
diff --git a/include/wine/condrv.h b/include/wine/condrv.h
index 4d2332a1ee9..b5e294b9401 100644
--- a/include/wine/condrv.h
+++ b/include/wine/condrv.h
@@ -155,6 +155,7 @@ struct condrv_output_info_params
#define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x0010
#define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x0020
#define SET_CONSOLE_OUTPUT_INFO_POPUP_ATTR 0x0040
+#define SET_CONSOLE_OUTPUT_INFO_FONT 0x0080
/* IOCTL_CONDRV_FILL_OUTPUT params */
struct condrv_fill_output_params
diff --git a/programs/conhost/conhost.c b/programs/conhost/conhost.c
index 2b137c40fb0..8b03d749d21 100644
--- a/programs/conhost/conhost.c
+++ b/programs/conhost/conhost.c
@@ -1830,7 +1830,7 @@ NTSTATUS change_screen_buffer_size( struct screen_buffer *screen_buffer, int new
}
static NTSTATUS set_output_info( struct screen_buffer *screen_buffer,
- const struct condrv_output_info_params *params )
+ const struct condrv_output_info_params *params, size_t in_size )
{
const struct condrv_output_info *info = ¶ms->info;
NTSTATUS status;
@@ -1917,6 +1917,24 @@ static NTSTATUS set_output_info( struct screen_buffer *screen_buffer,
screen_buffer->max_width = info->max_width;
screen_buffer->max_height = info->max_height;
}
+ if (params->mask & SET_CONSOLE_OUTPUT_INFO_FONT)
+ {
+ WCHAR *face_name = (WCHAR *)(params + 1);
+ size_t face_name_size = in_size - sizeof(*params);
+ unsigned int height = info->font_height;
+ unsigned int weight = FW_NORMAL;
+
+ if (!face_name_size)
+ {
+ face_name = screen_buffer->font.face_name;
+ face_name_size = screen_buffer->font.face_len * sizeof(WCHAR);
+ }
+
+ if (!height) height = 12;
+ if (info->font_weight >= FW_SEMIBOLD) weight = FW_BOLD;
+
+ update_console_font( screen_buffer->console, face_name, face_name_size, height, weight );
+ }
if (is_active( screen_buffer ))
{
@@ -2429,8 +2447,9 @@ static NTSTATUS screen_buffer_ioctl( struct screen_buffer *screen_buffer, unsign
return get_output_info( screen_buffer, out_size );
case IOCTL_CONDRV_SET_OUTPUT_INFO:
- if (in_size != sizeof(struct condrv_output_info_params) || *out_size) return STATUS_INVALID_PARAMETER;
- return set_output_info( screen_buffer, in_data );
+ if (in_size < sizeof(struct condrv_output_info_params) || *out_size)
+ return STATUS_INVALID_PARAMETER;
+ return set_output_info( screen_buffer, in_data, in_size );
case IOCTL_CONDRV_FILL_OUTPUT:
if (in_size != sizeof(struct condrv_fill_output_params) || *out_size != sizeof(DWORD))
diff --git a/programs/conhost/conhost.h b/programs/conhost/conhost.h
index 5e9b999380c..3cbd2ed2d80 100644
--- a/programs/conhost/conhost.h
+++ b/programs/conhost/conhost.h
@@ -130,17 +130,21 @@ struct screen_buffer
struct wine_rb_entry entry; /* map entry */
};
-BOOL init_window( struct console *console );
-void init_message_window( struct console *console );
-void update_window_region( struct console *console, const RECT *update );
-void update_window_config( struct console *console, BOOL delay );
-
+/* conhost.c */
NTSTATUS write_console_input( struct console *console, const INPUT_RECORD *records,
unsigned int count, BOOL flush );
void notify_screen_buffer_size( struct screen_buffer *screen_buffer );
NTSTATUS change_screen_buffer_size( struct screen_buffer *screen_buffer, int new_width, int new_height );
+/* window.c */
+void update_console_font( struct console *console, const WCHAR *face_name, size_t face_name_size,
+ unsigned int height, unsigned int weight );
+BOOL init_window( struct console *console );
+void init_message_window( struct console *console );
+void update_window_region( struct console *console, const RECT *update );
+void update_window_config( struct console *console, BOOL delay );
+
static inline void empty_update_rect( struct screen_buffer *screen_buffer, RECT *rect )
{
SetRect( rect, screen_buffer->width, screen_buffer->height, 0, 0 );
diff --git a/programs/conhost/window.c b/programs/conhost/window.c
index db04ba120e4..b88b95c41ce 100644
--- a/programs/conhost/window.c
+++ b/programs/conhost/window.c
@@ -652,7 +652,8 @@ static HFONT select_font_config( struct console_config *config, unsigned int cp,
return font;
}
-static void fill_logfont( LOGFONTW *lf, const WCHAR *name, unsigned int height, unsigned int weight )
+static void fill_logfont( LOGFONTW *lf, const WCHAR *face_name, size_t face_name_size,
+ unsigned int height, unsigned int weight )
{
lf->lfHeight = height;
lf->lfWidth = 0;
@@ -667,7 +668,8 @@ static void fill_logfont( LOGFONTW *lf, const WCHAR *name, unsigned int height,
lf->lfClipPrecision = CLIP_DEFAULT_PRECIS;
lf->lfQuality = DEFAULT_QUALITY;
lf->lfPitchAndFamily = FIXED_PITCH | FF_DONTCARE;
- lstrcpyW( lf->lfFaceName, name );
+ memcpy( lf->lfFaceName, face_name, face_name_size );
+ lf->lfFaceName[face_name_size / sizeof(WCHAR)] = 0;
}
static BOOL set_console_font( struct console *console, const LOGFONTW *logfont )
@@ -705,6 +707,7 @@ static BOOL set_console_font( struct console *console, const LOGFONTW *logfont )
font_info->width = tm.tmAveCharWidth;
font_info->height = tm.tmHeight + tm.tmExternalLeading;
+ font_info->pitch_family = tm.tmPitchAndFamily;
font_info->weight = tm.tmWeight;
free( font_info->face_name );
@@ -851,15 +854,15 @@ static int WINAPI get_first_font_enum( const LOGFONTW *lf, const TEXTMETRICW *tm
/* sets logfont as the new font for the console */
-static void update_console_font( struct console *console, const WCHAR *font,
- unsigned int height, unsigned int weight )
+void update_console_font( struct console *console, const WCHAR *face_name, size_t face_name_size,
+ unsigned int height, unsigned int weight )
{
struct font_chooser fc;
LOGFONTW lf;
- if (font[0] && height && weight)
+ if (face_name[0] && height && weight)
{
- fill_logfont( &lf, font, height, weight );
+ fill_logfont( &lf, face_name, face_name_size, height, weight );
if (set_console_font( console, &lf )) return;
}
@@ -1581,8 +1584,9 @@ static BOOL select_font( struct dialog_info *di )
if (font_idx < 0 || size_idx < 0 || size_idx >= di->font_count)
return FALSE;
- fill_logfont( &lf, di->font[size_idx].faceName, di->font[size_idx].height,
- di->font[size_idx].weight );
+ fill_logfont( &lf, di->font[size_idx].faceName,
+ wcslen(di->font[size_idx].faceName) * sizeof(WCHAR),
+ di->font[size_idx].height, di->font[size_idx].weight );
font = select_font_config( &config, di->console->output_cp, di->console->win, &lf );
if (!font) return FALSE;
@@ -1702,7 +1706,9 @@ static INT_PTR WINAPI font_dialog_proc( HWND dialog, UINT msg, WPARAM wparam, LP
{
LOGFONTW lf;
- fill_logfont( &lf, di->font[val].faceName, di->font[val].height, di->font[val].weight );
+ fill_logfont( &lf, di->font[val].faceName,
+ wcslen(di->font[val].faceName) * sizeof(WCHAR),
+ di->font[val].height, di->font[val].weight );
DeleteObject( select_font_config( &di->config, di->console->output_cp,
di->console->win, &lf ));
}
@@ -1901,7 +1907,8 @@ static void apply_config( struct console *console, const struct console_config *
memcmp( console->active->font.face_name, config->face_name,
console->active->font.face_len * sizeof(WCHAR) ))
{
- update_console_font( console, config->face_name, config->cell_height, config->font_weight );
+ update_console_font( console, config->face_name, wcslen(config->face_name) * sizeof(WCHAR),
+ config->cell_height, config->font_weight );
}
update_window( console );
--
2.34.1
1
0
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/dbgeng/tests/Makefile.in | 1 -
dlls/dbgeng/tests/dbgeng.c | 136 +++++++++++++++++-----------------
2 files changed, 68 insertions(+), 69 deletions(-)
diff --git a/dlls/dbgeng/tests/Makefile.in b/dlls/dbgeng/tests/Makefile.in
index 8ffef052654..26006e9546b 100644
--- a/dlls/dbgeng/tests/Makefile.in
+++ b/dlls/dbgeng/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = dbgeng.dll
IMPORTS = dbgeng
diff --git a/dlls/dbgeng/tests/dbgeng.c b/dlls/dbgeng/tests/dbgeng.c
index 53dabd5bc36..b0428215a9a 100644
--- a/dlls/dbgeng/tests/dbgeng.c
+++ b/dlls/dbgeng/tests/dbgeng.c
@@ -35,67 +35,67 @@ static void test_engine_options(void)
HRESULT hr;
hr = DebugCreate(&IID_IDebugControl, (void **)&control);
- ok(hr == S_OK, "Failed to create engine object, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create engine object, hr %#lx.\n", hr);
options = 0xf;
hr = control->lpVtbl->GetEngineOptions(control, &options);
- ok(hr == S_OK, "Failed to get engine options, hr %#x.\n", hr);
- ok(options == 0, "Unexpected options %#x.\n", options);
+ ok(hr == S_OK, "Failed to get engine options, hr %#lx.\n", hr);
+ ok(options == 0, "Unexpected options %#lx.\n", options);
hr = control->lpVtbl->AddEngineOptions(control, DEBUG_ENGOPT_INITIAL_BREAK);
- ok(hr == S_OK, "Failed to add engine options, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to add engine options, hr %#lx.\n", hr);
options = 0;
hr = control->lpVtbl->GetEngineOptions(control, &options);
- ok(hr == S_OK, "Failed to get engine options, hr %#x.\n", hr);
- ok(options == DEBUG_ENGOPT_INITIAL_BREAK, "Unexpected options %#x.\n", options);
+ ok(hr == S_OK, "Failed to get engine options, hr %#lx.\n", hr);
+ ok(options == DEBUG_ENGOPT_INITIAL_BREAK, "Unexpected options %#lx.\n", options);
hr = control->lpVtbl->AddEngineOptions(control, 0x01000000);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
options = 0;
hr = control->lpVtbl->GetEngineOptions(control, &options);
- ok(hr == S_OK, "Failed to get engine options, hr %#x.\n", hr);
- ok(options == DEBUG_ENGOPT_INITIAL_BREAK, "Unexpected options %#x.\n", options);
+ ok(hr == S_OK, "Failed to get engine options, hr %#lx.\n", hr);
+ ok(options == DEBUG_ENGOPT_INITIAL_BREAK, "Unexpected options %#lx.\n", options);
hr = control->lpVtbl->RemoveEngineOptions(control, 0x01000000);
- ok(hr == S_OK, "Failed to remove options, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to remove options, hr %#lx.\n", hr);
hr = control->lpVtbl->AddEngineOptions(control, DEBUG_ENGOPT_IGNORE_DBGHELP_VERSION);
- ok(hr == S_OK, "Failed to add engine options, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to add engine options, hr %#lx.\n", hr);
options = 0;
hr = control->lpVtbl->GetEngineOptions(control, &options);
- ok(hr == S_OK, "Failed to get engine options, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to get engine options, hr %#lx.\n", hr);
ok(options == (DEBUG_ENGOPT_INITIAL_BREAK | DEBUG_ENGOPT_IGNORE_DBGHELP_VERSION),
- "Unexpected options %#x.\n", options);
+ "Unexpected options %#lx.\n", options);
hr = control->lpVtbl->RemoveEngineOptions(control, DEBUG_ENGOPT_INITIAL_BREAK);
- ok(hr == S_OK, "Failed to remove options, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to remove options, hr %#lx.\n", hr);
options = 0;
hr = control->lpVtbl->GetEngineOptions(control, &options);
- ok(hr == S_OK, "Failed to get engine options, hr %#x.\n", hr);
- ok(options == DEBUG_ENGOPT_IGNORE_DBGHELP_VERSION, "Unexpected options %#x.\n", options);
+ ok(hr == S_OK, "Failed to get engine options, hr %#lx.\n", hr);
+ ok(options == DEBUG_ENGOPT_IGNORE_DBGHELP_VERSION, "Unexpected options %#lx.\n", options);
hr = control->lpVtbl->SetEngineOptions(control, DEBUG_ENGOPT_INITIAL_BREAK);
- ok(hr == S_OK, "Failed to set options, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to set options, hr %#lx.\n", hr);
options = 0;
hr = control->lpVtbl->GetEngineOptions(control, &options);
- ok(hr == S_OK, "Failed to get engine options, hr %#x.\n", hr);
- ok(options == DEBUG_ENGOPT_INITIAL_BREAK, "Unexpected options %#x.\n", options);
+ ok(hr == S_OK, "Failed to get engine options, hr %#lx.\n", hr);
+ ok(options == DEBUG_ENGOPT_INITIAL_BREAK, "Unexpected options %#lx.\n", options);
hr = control->lpVtbl->SetEngineOptions(control, 0x01000000);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = control->lpVtbl->SetEngineOptions(control, 0x01000000 | DEBUG_ENGOPT_IGNORE_DBGHELP_VERSION);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
options = 0;
hr = control->lpVtbl->GetEngineOptions(control, &options);
- ok(hr == S_OK, "Failed to get engine options, hr %#x.\n", hr);
- ok(options == DEBUG_ENGOPT_INITIAL_BREAK, "Unexpected options %#x.\n", options);
+ ok(hr == S_OK, "Failed to get engine options, hr %#lx.\n", hr);
+ ok(options == DEBUG_ENGOPT_INITIAL_BREAK, "Unexpected options %#lx.\n", options);
control->lpVtbl->Release(control);
}
@@ -264,13 +264,13 @@ static void test_attach(void)
BOOL ret;
hr = DebugCreate(&IID_IDebugClient, (void **)&client);
- ok(hr == S_OK, "Failed to create engine object, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create engine object, hr %#lx.\n", hr);
hr = client->lpVtbl->QueryInterface(client, &IID_IDebugControl, (void **)&control);
- ok(hr == S_OK, "Failed to get interface pointer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to get interface pointer, hr %#lx.\n", hr);
hr = client->lpVtbl->SetEventCallbacks(client, &event_callbacks);
- ok(hr == S_OK, "Failed to set event callbacks, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to set event callbacks, hr %#lx.\n", hr);
event = CreateEventA(NULL, FALSE, FALSE, event_name);
ok(event != NULL, "Failed to create event.\n");
@@ -284,7 +284,7 @@ static void test_attach(void)
/* Non-invasive mode. */
hr = client->lpVtbl->AttachProcess(client, 0, info.dwProcessId, DEBUG_ATTACH_NONINVASIVE);
- ok(hr == S_OK, "Failed to attach to process, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to attach to process, hr %#lx.\n", hr);
is_debugged = TRUE;
ret = CheckRemoteDebuggerPresent(info.hProcess, &is_debugged);
@@ -292,7 +292,7 @@ static void test_attach(void)
ok(!is_debugged, "Unexpected mode.\n");
hr = control->lpVtbl->WaitForEvent(control, 0, INFINITE);
- ok(hr == S_OK, "Waiting for event failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Waiting for event failed, hr %#lx.\n", hr);
is_debugged = TRUE;
ret = CheckRemoteDebuggerPresent(info.hProcess, &is_debugged);
@@ -300,11 +300,11 @@ static void test_attach(void)
ok(!is_debugged, "Unexpected mode.\n");
hr = client->lpVtbl->DetachProcesses(client);
- ok(hr == S_OK, "Failed to detach, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to detach, hr %#lx.\n", hr);
hr = client->lpVtbl->EndSession(client, DEBUG_END_ACTIVE_DETACH);
todo_wine
- ok(hr == S_OK, "Failed to end session, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to end session, hr %#lx.\n", hr);
SetEvent(event);
@@ -322,7 +322,7 @@ static void test_attach(void)
static void test_module_information(void)
{
static const char *event_name = "dbgeng_test_event";
- unsigned int loaded, unloaded, index, length;
+ ULONG loaded, unloaded, index, length;
DEBUG_MODULE_PARAMETERS params[2];
IDebugDataSpaces *dataspaces;
PROCESS_INFORMATION info;
@@ -336,19 +336,19 @@ static void test_module_information(void)
BOOL ret;
hr = DebugCreate(&IID_IDebugClient, (void **)&client);
- ok(hr == S_OK, "Failed to create engine object, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create engine object, hr %#lx.\n", hr);
hr = client->lpVtbl->QueryInterface(client, &IID_IDebugControl, (void **)&control);
- ok(hr == S_OK, "Failed to get interface pointer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to get interface pointer, hr %#lx.\n", hr);
hr = client->lpVtbl->QueryInterface(client, &IID_IDebugSymbols2, (void **)&symbols);
- ok(hr == S_OK, "Failed to get interface pointer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to get interface pointer, hr %#lx.\n", hr);
hr = client->lpVtbl->QueryInterface(client, &IID_IDebugDataSpaces, (void **)&dataspaces);
- ok(hr == S_OK, "Failed to get interface pointer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to get interface pointer, hr %#lx.\n", hr);
hr = control->lpVtbl->IsPointer64Bit(control);
- ok(hr == E_UNEXPECTED, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_UNEXPECTED, "Unexpected hr %#lx.\n", hr);
event = CreateEventA(NULL, FALSE, FALSE, event_name);
ok(event != NULL, "Failed to create event.\n");
@@ -357,120 +357,120 @@ static void test_module_information(void)
ok(ret, "Failed to create target process.\n");
hr = control->lpVtbl->SetEngineOptions(control, DEBUG_ENGOPT_INITIAL_BREAK);
- ok(hr == S_OK, "Failed to set engine options, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to set engine options, hr %#lx.\n", hr);
hr = client->lpVtbl->AttachProcess(client, 0, info.dwProcessId, DEBUG_ATTACH_NONINVASIVE);
- ok(hr == S_OK, "Failed to attach to process, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to attach to process, hr %#lx.\n", hr);
hr = control->lpVtbl->IsPointer64Bit(control);
- ok(hr == E_UNEXPECTED, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_UNEXPECTED, "Unexpected hr %#lx.\n", hr);
hr = control->lpVtbl->WaitForEvent(control, 0, INFINITE);
- ok(hr == S_OK, "Waiting for event failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Waiting for event failed, hr %#lx.\n", hr);
hr = control->lpVtbl->IsPointer64Bit(control);
- ok(SUCCEEDED(hr), "Failed to get pointer length, hr %#x.\n", hr);
+ ok(SUCCEEDED(hr), "Failed to get pointer length, hr %#lx.\n", hr);
/* Number of modules. */
hr = symbols->lpVtbl->GetNumberModules(symbols, &loaded, &unloaded);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(loaded > 0, "Unexpected module count %u.\n", loaded);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(loaded > 0, "Unexpected module count %lu.\n", loaded);
/* Module base. */
hr = symbols->lpVtbl->GetModuleByIndex(symbols, loaded, &base);
- ok(FAILED(hr), "Unexpected hr %#x.\n", hr);
+ ok(FAILED(hr), "Unexpected hr %#lx.\n", hr);
base = 0;
hr = symbols->lpVtbl->GetModuleByIndex(symbols, 0, &base);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!!base, "Unexpected module base.\n");
hr = symbols->lpVtbl->GetModuleByOffset(symbols, 0, 0, &index, &base);
- ok(FAILED(hr), "Unexpected hr %#x.\n", hr);
+ ok(FAILED(hr), "Unexpected hr %#lx.\n", hr);
hr = symbols->lpVtbl->GetModuleByOffset(symbols, base, 0, &index, &base);
- ok(hr == S_OK, "Failed to get module, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to get module, hr %#lx.\n", hr);
hr = symbols->lpVtbl->GetModuleByOffset(symbols, base, 0, NULL, NULL);
- ok(hr == S_OK, "Failed to get module, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to get module, hr %#lx.\n", hr);
hr = symbols->lpVtbl->GetModuleByOffset(symbols, base + 1, 0, NULL, NULL);
- ok(hr == S_OK, "Failed to get module, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to get module, hr %#lx.\n", hr);
hr = symbols->lpVtbl->GetModuleByOffset(symbols, base, loaded, NULL, NULL);
- ok(FAILED(hr), "Unexpected hr %#x.\n", hr);
+ ok(FAILED(hr), "Unexpected hr %#lx.\n", hr);
/* Parameters. */
base = 0;
hr = symbols->lpVtbl->GetModuleByIndex(symbols, 0, &base);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!!base, "Unexpected module base.\n");
hr = symbols->lpVtbl->GetModuleParameters(symbols, 1, NULL, 0, params);
- ok(hr == S_OK, "Failed to get module parameters, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to get module parameters, hr %#lx.\n", hr);
ok(params[0].Base == base, "Unexpected module base.\n");
hr = symbols->lpVtbl->GetModuleParameters(symbols, 1, &base, 100, params);
- ok(hr == S_OK, "Failed to get module parameters, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to get module parameters, hr %#lx.\n", hr);
ok(params[0].Base == base, "Unexpected module base.\n");
bases[0] = base + 1;
bases[1] = base;
hr = symbols->lpVtbl->GetModuleParameters(symbols, 2, bases, 0, params);
- ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* XP */, "Failed to get module parameters, hr %#x.\n", hr);
+ ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* XP */, "Failed to get module parameters, hr %#lx.\n", hr);
ok(params[0].Base == DEBUG_INVALID_OFFSET, "Unexpected module base.\n");
ok(params[0].Size == 0, "Unexpected module size.\n");
ok(params[1].Base == base, "Unexpected module base.\n");
ok(params[1].Size != 0, "Unexpected module size.\n");
hr = symbols->lpVtbl->GetModuleParameters(symbols, 1, bases, 0, params);
- ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* XP */, "Failed to get module parameters, hr %#x.\n", hr);
+ ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* XP */, "Failed to get module parameters, hr %#lx.\n", hr);
hr = symbols->lpVtbl->GetModuleParameters(symbols, 1, bases, loaded, params);
- ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* XP */, "Failed to get module parameters, hr %#x.\n", hr);
+ ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* XP */, "Failed to get module parameters, hr %#lx.\n", hr);
hr = symbols->lpVtbl->GetModuleParameters(symbols, 1, NULL, loaded, params);
- ok(FAILED(hr), "Unexpected hr %#x.\n", hr);
+ ok(FAILED(hr), "Unexpected hr %#lx.\n", hr);
/* Image name. */
hr = symbols->lpVtbl->GetModuleNameString(symbols, DEBUG_MODNAME_IMAGE, 0, 0, buffer, sizeof(buffer), &length);
- ok(hr == S_OK, "Failed to get image name, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to get image name, hr %#lx.\n", hr);
ok(strlen(buffer) + 1 == length, "Unexpected length.\n");
hr = symbols->lpVtbl->GetModuleNameString(symbols, DEBUG_MODNAME_IMAGE, 0, 0, NULL, sizeof(buffer), &length);
- ok(hr == S_OK, "Failed to get image name, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to get image name, hr %#lx.\n", hr);
ok(length > 0, "Unexpected length.\n");
hr = symbols->lpVtbl->GetModuleNameString(symbols, DEBUG_MODNAME_IMAGE, DEBUG_ANY_ID, base, buffer, sizeof(buffer),
&length);
- ok(hr == S_OK, "Failed to get image name, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to get image name, hr %#lx.\n", hr);
ok(strlen(buffer) + 1 == length, "Unexpected length.\n");
hr = symbols->lpVtbl->GetModuleNameString(symbols, DEBUG_MODNAME_IMAGE, 0, 0, buffer, length - 1, &length);
- ok(hr == S_FALSE, "Failed to get image name, hr %#x.\n", hr);
- ok(strlen(buffer) + 2 == length, "Unexpected length %u.\n", length);
+ ok(hr == S_FALSE, "Failed to get image name, hr %#lx.\n", hr);
+ ok(strlen(buffer) + 2 == length, "Unexpected length %lu.\n", length);
hr = symbols->lpVtbl->GetModuleNameString(symbols, DEBUG_MODNAME_IMAGE, 0, 0, NULL, length - 1, NULL);
- ok(hr == S_FALSE, "Failed to get image name, hr %#x.\n", hr);
+ ok(hr == S_FALSE, "Failed to get image name, hr %#lx.\n", hr);
/* Read memory. */
base = 0;
hr = symbols->lpVtbl->GetModuleByIndex(symbols, 0, &base);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!!base, "Unexpected module base.\n");
hr = dataspaces->lpVtbl->ReadVirtual(dataspaces, base, buffer, sizeof(buffer), &length);
- ok(hr == S_OK, "Failed to read process memory, hr %#x.\n", hr);
- ok(length == sizeof(buffer), "Unexpected length %u.\n", length);
+ ok(hr == S_OK, "Failed to read process memory, hr %#lx.\n", hr);
+ ok(length == sizeof(buffer), "Unexpected length %lu.\n", length);
ok(buffer[0] == 'M' && buffer[1] == 'Z', "Unexpected contents.\n");
memset(buffer, 0, sizeof(buffer));
hr = dataspaces->lpVtbl->ReadVirtual(dataspaces, base, buffer, sizeof(buffer), NULL);
- ok(hr == S_OK, "Failed to read process memory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to read process memory, hr %#lx.\n", hr);
ok(buffer[0] == 'M' && buffer[1] == 'Z', "Unexpected contents.\n");
hr = client->lpVtbl->DetachProcesses(client);
- ok(hr == S_OK, "Failed to detach, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to detach, hr %#lx.\n", hr);
SetEvent(event);
wait_child_process(info.hProcess);
--
2.34.1
1
0
[PATCH 6/7] comctl32/button: Use the brush from WM_CTLCOLORSTATIC to fill background for checkboxes and radio buttons.
by Zhiyi Zhang 09 Feb '22
by Zhiyi Zhang 09 Feb '22
09 Feb '22
Fix radio buttons of Mupen64-RR-Lua input window having stale background. Mupen64-RR-Lua doesn't actually handle
WM_ERASEBKGND even though it returns nonzero. And tests show that a WM_CTLCOLORSTATIC is sent and the returned brush
is used for filling background, even painting over the content from DrawThemeParentBackground().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52433
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
---
dlls/comctl32/button.c | 5 +++++
dlls/comctl32/tests/misc.c | 15 ++++++++-------
2 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c
index 14b2200afed..1349e10c4c0 100644
--- a/dlls/comctl32/button.c
+++ b/dlls/comctl32/button.c
@@ -2796,6 +2796,7 @@ static void CB_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in
UINT btn_type = get_button_type( dwStyle );
int part = (btn_type == BS_RADIOBUTTON) || (btn_type == BS_AUTORADIOBUTTON) ? BP_RADIOBUTTON : BP_CHECKBOX;
NMCUSTOMDRAW nmcd;
+ HBRUSH brush;
LRESULT cdrf;
LOGFONTW lf;
HWND parent;
@@ -2859,6 +2860,10 @@ static void CB_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in
if (cdrf & CDRF_SKIPDEFAULT) goto cleanup;
DrawThemeParentBackground(infoPtr->hwnd, hDC, NULL);
+ /* Tests show that the brush from WM_CTLCOLORSTATIC is used for filling background after a
+ * DrawThemeParentBackground() call */
+ brush = (HBRUSH)SendMessageW(parent, WM_CTLCOLORSTATIC, (WPARAM)hDC, (LPARAM)infoPtr->hwnd);
+ FillRect(hDC, &client_rect, brush ? brush : GetSysColorBrush(COLOR_BTNFACE));
if (cdrf & CDRF_NOTIFYPOSTERASE)
{
diff --git a/dlls/comctl32/tests/misc.c b/dlls/comctl32/tests/misc.c
index 09c5b3d6c40..c3de9e68c5a 100644
--- a/dlls/comctl32/tests/misc.c
+++ b/dlls/comctl32/tests/misc.c
@@ -843,14 +843,14 @@ static void test_themed_background(void)
{ANIMATE_CLASSA, 0, empty_seq, TRUE},
{WC_BUTTONA, BS_PUSHBUTTON, pushbutton_seq},
{WC_BUTTONA, BS_DEFPUSHBUTTON, defpushbutton_seq},
- {WC_BUTTONA, BS_CHECKBOX, checkbox_seq, TRUE},
- {WC_BUTTONA, BS_AUTOCHECKBOX, checkbox_seq, TRUE},
- {WC_BUTTONA, BS_RADIOBUTTON, radiobutton_seq, TRUE},
- {WC_BUTTONA, BS_3STATE, checkbox_seq, TRUE},
- {WC_BUTTONA, BS_AUTO3STATE, checkbox_seq, TRUE},
+ {WC_BUTTONA, BS_CHECKBOX, checkbox_seq},
+ {WC_BUTTONA, BS_AUTOCHECKBOX, checkbox_seq},
+ {WC_BUTTONA, BS_RADIOBUTTON, radiobutton_seq},
+ {WC_BUTTONA, BS_3STATE, checkbox_seq},
+ {WC_BUTTONA, BS_AUTO3STATE, checkbox_seq},
{WC_BUTTONA, BS_GROUPBOX, groupbox_seq, TRUE},
{WC_BUTTONA, BS_USERBUTTON, pushbutton_seq},
- {WC_BUTTONA, BS_AUTORADIOBUTTON, radiobutton_seq, TRUE},
+ {WC_BUTTONA, BS_AUTORADIOBUTTON, radiobutton_seq},
{WC_BUTTONA, BS_PUSHBOX, radiobutton_seq, TRUE},
{WC_BUTTONA, BS_OWNERDRAW, ownerdrawbutton_seq},
{WC_BUTTONA, BS_SPLITBUTTON, splitbutton_seq},
@@ -950,7 +950,8 @@ static void test_themed_background(void)
{
/* WM_CTLCOLORSTATIC is used to fill background */
color = GetPixel(hdc, 40, 40);
- todo_wine
+ /* BS_PUSHBOX is unimplemented on Wine */
+ todo_wine_if(i == 11)
ok(color == 0x808080, "Expected color %#x, got %#x.\n", 0x808080, color);
}
else if (tests[i].seq == groupbox_seq)
--
2.32.0
2
2
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/dnsapi/Makefile.in | 1 -
dlls/dnsapi/main.c | 81 ++++++++++++++---------------------
dlls/dnsapi/query.c | 37 ++++++++--------
dlls/dnsapi/tests/Makefile.in | 1 -
dlls/dnsapi/tests/name.c | 4 +-
dlls/dnsapi/tests/query.c | 63 ++++++++++++++-------------
dlls/dnsapi/tests/record.c | 42 +++++++++---------
7 files changed, 105 insertions(+), 124 deletions(-)
diff --git a/dlls/dnsapi/Makefile.in b/dlls/dnsapi/Makefile.in
index 1e280745bd0..b7785e5ebeb 100644
--- a/dlls/dnsapi/Makefile.in
+++ b/dlls/dnsapi/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = dnsapi.dll
UNIXLIB = dnsapi.so
IMPORTLIB = dnsapi
diff --git a/dlls/dnsapi/main.c b/dlls/dnsapi/main.c
index 5d766416ecc..23738bf36fe 100644
--- a/dlls/dnsapi/main.c
+++ b/dlls/dnsapi/main.c
@@ -36,7 +36,7 @@ unixlib_handle_t resolv_handle = 0;
BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
{
- TRACE( "(%p,%u,%p)\n", hinst, reason, reserved );
+ TRACE( "(%p, %lu, %p)\n", hinst, reason, reserved );
switch (reason)
{
@@ -56,10 +56,9 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
* DnsAcquireContextHandle_A [DNSAPI.@]
*
*/
-DNS_STATUS WINAPI DnsAcquireContextHandle_A( DWORD flags, PVOID cred,
- PHANDLE context )
+DNS_STATUS WINAPI DnsAcquireContextHandle_A( DWORD flags, void *cred, HANDLE *context )
{
- FIXME( "(0x%08x,%p,%p) stub\n", flags, cred, context );
+ FIXME( "(%#lx, %p, %p) stub\n", flags, cred, context );
*context = (HANDLE)0xdeadbeef;
return ERROR_SUCCESS;
@@ -69,10 +68,9 @@ DNS_STATUS WINAPI DnsAcquireContextHandle_A( DWORD flags, PVOID cred,
* DnsAcquireContextHandle_UTF8 [DNSAPI.@]
*
*/
-DNS_STATUS WINAPI DnsAcquireContextHandle_UTF8( DWORD flags, PVOID cred,
- PHANDLE context )
+DNS_STATUS WINAPI DnsAcquireContextHandle_UTF8( DWORD flags, void *cred, HANDLE *context )
{
- FIXME( "(0x%08x,%p,%p) stub\n", flags, cred, context );
+ FIXME( "(%#lx, %p, %p) stub\n", flags, cred, context );
*context = (HANDLE)0xdeadbeef;
return ERROR_SUCCESS;
@@ -82,10 +80,9 @@ DNS_STATUS WINAPI DnsAcquireContextHandle_UTF8( DWORD flags, PVOID cred,
* DnsAcquireContextHandle_W [DNSAPI.@]
*
*/
-DNS_STATUS WINAPI DnsAcquireContextHandle_W( DWORD flags, PVOID cred,
- PHANDLE context )
+DNS_STATUS WINAPI DnsAcquireContextHandle_W( DWORD flags, void *cred, HANDLE *context )
{
- FIXME( "(0x%08x,%p,%p) stub\n", flags, cred, context );
+ FIXME( "(%#lx, %p, %p) stub\n", flags, cred, context );
*context = (HANDLE)0xdeadbeef;
return ERROR_SUCCESS;
@@ -156,12 +153,10 @@ VOID WINAPI DnsReleaseContextHandle( HANDLE context )
* DnsModifyRecordsInSet_A [DNSAPI.@]
*
*/
-DNS_STATUS WINAPI DnsModifyRecordsInSet_A( PDNS_RECORDA add, PDNS_RECORDA delete,
- DWORD options, HANDLE context,
- PVOID servers, PVOID reserved )
+DNS_STATUS WINAPI DnsModifyRecordsInSet_A( DNS_RECORDA *add, DNS_RECORDA *delete, DWORD options, HANDLE context,
+ void *servers, void *reserved )
{
- FIXME( "(%p,%p,0x%08x,%p,%p,%p) stub\n", add, delete, options,
- context, servers, reserved );
+ FIXME( "(%p, %p, %#lx, %p, %p, %p) stub\n", add, delete, options, context, servers, reserved );
return ERROR_SUCCESS;
}
@@ -169,12 +164,10 @@ DNS_STATUS WINAPI DnsModifyRecordsInSet_A( PDNS_RECORDA add, PDNS_RECORDA delete
* DnsModifyRecordsInSet_UTF8 [DNSAPI.@]
*
*/
-DNS_STATUS WINAPI DnsModifyRecordsInSet_UTF8( PDNS_RECORDA add, PDNS_RECORDA delete,
- DWORD options, HANDLE context,
- PVOID servers, PVOID reserved )
+DNS_STATUS WINAPI DnsModifyRecordsInSet_UTF8( DNS_RECORDA *add, DNS_RECORDA *delete, DWORD options, HANDLE context,
+ void *servers, void *reserved )
{
- FIXME( "(%p,%p,0x%08x,%p,%p,%p) stub\n", add, delete, options,
- context, servers, reserved );
+ FIXME( "(%p, %p, %#lx, %p, %p, %p) stub\n", add, delete, options, context, servers, reserved );
return ERROR_SUCCESS;
}
@@ -182,12 +175,10 @@ DNS_STATUS WINAPI DnsModifyRecordsInSet_UTF8( PDNS_RECORDA add, PDNS_RECORDA del
* DnsModifyRecordsInSet_W [DNSAPI.@]
*
*/
-DNS_STATUS WINAPI DnsModifyRecordsInSet_W( PDNS_RECORDW add, PDNS_RECORDW delete,
- DWORD options, HANDLE context,
- PVOID servers, PVOID reserved )
+DNS_STATUS WINAPI DnsModifyRecordsInSet_W( DNS_RECORDW *add, DNS_RECORDW *delete, DWORD options, HANDLE context,
+ void *servers, void *reserved )
{
- FIXME( "(%p,%p,0x%08x,%p,%p,%p) stub\n", add, delete, options,
- context, servers, reserved );
+ FIXME( "(%p, %p, %#lx, %p, %p, %p) stub\n", add, delete, options, context, servers, reserved );
return ERROR_SUCCESS;
}
@@ -195,12 +186,10 @@ DNS_STATUS WINAPI DnsModifyRecordsInSet_W( PDNS_RECORDW add, PDNS_RECORDW delete
* DnsWriteQuestionToBuffer_UTF8 [DNSAPI.@]
*
*/
-BOOL WINAPI DnsWriteQuestionToBuffer_UTF8( PDNS_MESSAGE_BUFFER buffer, PDWORD size,
- PCSTR name, WORD type, WORD xid,
- BOOL recurse )
+BOOL WINAPI DnsWriteQuestionToBuffer_UTF8( DNS_MESSAGE_BUFFER *buffer, DWORD *size, const char *name, WORD type,
+ WORD xid, BOOL recurse )
{
- FIXME( "(%p,%p,%s,%d,%d,%d) stub\n", buffer, size, debugstr_a(name),
- type, xid, recurse );
+ FIXME( "(%p, %p, %s, %d, %d, %d) stub\n", buffer, size, debugstr_a(name), type, xid, recurse );
return FALSE;
}
@@ -208,12 +197,10 @@ BOOL WINAPI DnsWriteQuestionToBuffer_UTF8( PDNS_MESSAGE_BUFFER buffer, PDWORD si
* DnsWriteQuestionToBuffer_W [DNSAPI.@]
*
*/
-BOOL WINAPI DnsWriteQuestionToBuffer_W( PDNS_MESSAGE_BUFFER buffer, PDWORD size,
- PCWSTR name, WORD type, WORD xid,
- BOOL recurse )
+BOOL WINAPI DnsWriteQuestionToBuffer_W( DNS_MESSAGE_BUFFER *buffer, DWORD *size, const WCHAR *name, WORD type,
+ WORD xid, BOOL recurse )
{
- FIXME( "(%p,%p,%s,%d,%d,%d) stub\n", buffer, size, debugstr_w(name),
- type, xid, recurse );
+ FIXME( "(%p, %p, %s, %d, %d, %d) stub\n", buffer, size, debugstr_w(name), type, xid, recurse );
return FALSE;
}
@@ -221,12 +208,10 @@ BOOL WINAPI DnsWriteQuestionToBuffer_W( PDNS_MESSAGE_BUFFER buffer, PDWORD size,
* DnsReplaceRecordSetA [DNSAPI.@]
*
*/
-DNS_STATUS WINAPI DnsReplaceRecordSetA( PDNS_RECORDA set, DWORD options,
- HANDLE context, PVOID servers,
- PVOID reserved )
+DNS_STATUS WINAPI DnsReplaceRecordSetA( DNS_RECORDA *set, DWORD options, HANDLE context, void *servers,
+ void *reserved )
{
- FIXME( "(%p,0x%08x,%p,%p,%p) stub\n", set, options, context,
- servers, reserved );
+ FIXME( "(%p, %#lx, %p, %p, %p) stub\n", set, options, context, servers, reserved );
return ERROR_SUCCESS;
}
@@ -234,12 +219,10 @@ DNS_STATUS WINAPI DnsReplaceRecordSetA( PDNS_RECORDA set, DWORD options,
* DnsReplaceRecordSetUTF8 [DNSAPI.@]
*
*/
-DNS_STATUS WINAPI DnsReplaceRecordSetUTF8( PDNS_RECORDA set, DWORD options,
- HANDLE context, PVOID servers,
- PVOID reserved )
+DNS_STATUS WINAPI DnsReplaceRecordSetUTF8( DNS_RECORDA *set, DWORD options, HANDLE context, void *servers,
+ void *reserved )
{
- FIXME( "(%p,0x%08x,%p,%p,%p) stub\n", set, options, context,
- servers, reserved );
+ FIXME( "(%p, %#lx, %p, %p, %p) stub\n", set, options, context, servers, reserved );
return ERROR_SUCCESS;
}
@@ -247,11 +230,9 @@ DNS_STATUS WINAPI DnsReplaceRecordSetUTF8( PDNS_RECORDA set, DWORD options,
* DnsReplaceRecordSetW [DNSAPI.@]
*
*/
-DNS_STATUS WINAPI DnsReplaceRecordSetW( PDNS_RECORDW set, DWORD options,
- HANDLE context, PVOID servers,
- PVOID reserved )
+DNS_STATUS WINAPI DnsReplaceRecordSetW( DNS_RECORDW *set, DWORD options, HANDLE context, void *servers,
+ void *reserved )
{
- FIXME( "(%p,0x%08x,%p,%p,%p) stub\n", set, options, context,
- servers, reserved );
+ FIXME( "(%p, %#lx, %p, %p, %p) stub\n", set, options, context, servers, reserved );
return ERROR_SUCCESS;
}
diff --git a/dlls/dnsapi/query.c b/dlls/dnsapi/query.c
index f732c6a6c65..12aa1086540 100644
--- a/dlls/dnsapi/query.c
+++ b/dlls/dnsapi/query.c
@@ -106,13 +106,11 @@ exit:
static const char *debugstr_query_request(const DNS_QUERY_REQUEST *req)
{
- if (!req)
- return "(null)";
-
- return wine_dbg_sprintf("{%d %s %s %x%08x %p %d %p %p}", req->Version,
+ if (!req) return "(null)";
+ return wine_dbg_sprintf("{%lu %s %s %I64x %p %lu %p %p}", req->Version,
debugstr_w(req->QueryName), debugstr_type(req->QueryType),
- (UINT32)(req->QueryOptions>>32u), (UINT32)req->QueryOptions, req->pDnsServerList,
- req->InterfaceIndex, req->pQueryCompletionCallback, req->pQueryContext);
+ req->QueryOptions, req->pDnsServerList, req->InterfaceIndex,
+ req->pQueryCompletionCallback, req->pQueryContext);
}
/******************************************************************************
@@ -121,7 +119,7 @@ static const char *debugstr_query_request(const DNS_QUERY_REQUEST *req)
*/
DNS_STATUS WINAPI DnsQueryEx(DNS_QUERY_REQUEST *request, DNS_QUERY_RESULT *result, DNS_QUERY_CANCEL *cancel)
{
- FIXME("(%s %p %p)\n", debugstr_query_request(request), result, cancel);
+ FIXME("(%s, %p, %p)\n", debugstr_query_request(request), result, cancel);
return DNS_ERROR_RCODE_NOT_IMPLEMENTED;
}
@@ -129,14 +127,14 @@ DNS_STATUS WINAPI DnsQueryEx(DNS_QUERY_REQUEST *request, DNS_QUERY_RESULT *resul
* DnsQuery_A [DNSAPI.@]
*
*/
-DNS_STATUS WINAPI DnsQuery_A( PCSTR name, WORD type, DWORD options, PVOID servers,
- PDNS_RECORDA *result, PVOID *reserved )
+DNS_STATUS WINAPI DnsQuery_A( const char *name, WORD type, DWORD options, void *servers, DNS_RECORDA **result,
+ void **reserved )
{
WCHAR *nameW;
DNS_RECORDW *resultW;
DNS_STATUS status;
- TRACE( "(%s,%s,0x%08x,%p,%p,%p)\n", debugstr_a(name), debugstr_type( type ),
+ TRACE( "(%s, %s, %#lx, %p, %p, %p)\n", debugstr_a(name), debugstr_type( type ),
options, servers, result, reserved );
if (!name || !result)
@@ -164,15 +162,15 @@ DNS_STATUS WINAPI DnsQuery_A( PCSTR name, WORD type, DWORD options, PVOID server
* DnsQuery_UTF8 [DNSAPI.@]
*
*/
-DNS_STATUS WINAPI DnsQuery_UTF8( PCSTR name, WORD type, DWORD options, PVOID servers,
- PDNS_RECORDA *result, PVOID *reserved )
+DNS_STATUS WINAPI DnsQuery_UTF8( const char *name, WORD type, DWORD options, void *servers, DNS_RECORDA **result,
+ void **reserved )
{
DNS_STATUS ret = DNS_ERROR_RCODE_NOT_IMPLEMENTED;
unsigned char answer[4096];
DWORD len = sizeof(answer);
struct query_params query_params = { name, type, options, answer, &len };
- TRACE( "(%s,%s,0x%08x,%p,%p,%p)\n", debugstr_a(name), debugstr_type( type ),
+ TRACE( "(%s, %s, %#lx, %p, %p, %p)\n", debugstr_a(name), debugstr_type( type ),
options, servers, result, reserved );
if (!name || !result)
@@ -218,14 +216,14 @@ DNS_STATUS WINAPI DnsQuery_UTF8( PCSTR name, WORD type, DWORD options, PVOID ser
* DnsQuery_W [DNSAPI.@]
*
*/
-DNS_STATUS WINAPI DnsQuery_W( PCWSTR name, WORD type, DWORD options, PVOID servers,
- PDNS_RECORDW *result, PVOID *reserved )
+DNS_STATUS WINAPI DnsQuery_W( const WCHAR *name, WORD type, DWORD options, void *servers, DNS_RECORDW **result,
+ void **reserved )
{
char *nameU;
DNS_RECORDA *resultA;
DNS_STATUS status;
- TRACE( "(%s,%s,0x%08x,%p,%p,%p)\n", debugstr_w(name), debugstr_type( type ),
+ TRACE( "(%s, %s, %#lx, %p, %p, %p)\n", debugstr_w(name), debugstr_type( type ),
options, servers, result, reserved );
if (!name || !result)
@@ -329,13 +327,12 @@ err:
* DnsQueryConfig [DNSAPI.@]
*
*/
-DNS_STATUS WINAPI DnsQueryConfig( DNS_CONFIG_TYPE config, DWORD flag, PCWSTR adapter,
- PVOID reserved, PVOID buffer, PDWORD len )
+DNS_STATUS WINAPI DnsQueryConfig( DNS_CONFIG_TYPE config, DWORD flag, const WCHAR *adapter, void *reserved,
+ void *buffer, DWORD *len )
{
DNS_STATUS ret = ERROR_INVALID_PARAMETER;
- TRACE( "(%d,0x%08x,%s,%p,%p,%p)\n", config, flag, debugstr_w(adapter),
- reserved, buffer, len );
+ TRACE( "(%d, %#lx, %s, %p, %p, %p)\n", config, flag, debugstr_w(adapter), reserved, buffer, len );
if (!len) return ERROR_INVALID_PARAMETER;
diff --git a/dlls/dnsapi/tests/Makefile.in b/dlls/dnsapi/tests/Makefile.in
index 8764aebeaf9..3f8c424b4f7 100644
--- a/dlls/dnsapi/tests/Makefile.in
+++ b/dlls/dnsapi/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = dnsapi.dll
IMPORTS = dnsapi ws2_32 iphlpapi
diff --git a/dlls/dnsapi/tests/name.c b/dlls/dnsapi/tests/name.c
index f4d5b9e691d..946b941e83f 100644
--- a/dlls/dnsapi/tests/name.c
+++ b/dlls/dnsapi/tests/name.c
@@ -150,7 +150,7 @@ static void test_DnsValidateName_A( void )
{
status = DnsValidateName_A( test_data[i].name, test_data[i].format );
ok( status == test_data[i].status || broken(status == test_data[i].status_broken),
- "%d: \'%s\': got %d, expected %d\n", i, test_data[i].name, status, test_data[i].status );
+ "%u: \'%s\': got %ld, expected %ld\n", i, test_data[i].name, status, test_data[i].status );
}
}
@@ -213,7 +213,7 @@ static void test_DnsFlushResolverCacheEntry_A(void)
ret = DnsFlushResolverCacheEntry_A( NULL );
err = GetLastError();
ok( !ret, "got %d\n", ret );
- ok( err == 0xdeadbeef, "got %u\n", err );
+ ok( err == 0xdeadbeef, "got %lu\n", err );
ret = DnsFlushResolverCacheEntry_A( "localhost" );
ok( ret, "got %d\n", ret );
diff --git a/dlls/dnsapi/tests/query.c b/dlls/dnsapi/tests/query.c
index e691822a46a..3307fcbe3cc 100644
--- a/dlls/dnsapi/tests/query.c
+++ b/dlls/dnsapi/tests/query.c
@@ -46,20 +46,22 @@ static void test_DnsQuery(void)
skip("query timed out\n");
return;
}
- ok(status == ERROR_SUCCESS, "got %d\n", status);
+ ok(status == ERROR_SUCCESS, "got %ld\n", status);
DnsRecordListFree(rec, DnsFreeRecordList);
status = DnsQuery_W(L"", DNS_TYPE_SRV, DNS_QUERY_STANDARD, NULL, &rec, NULL);
- ok(status == DNS_ERROR_RCODE_NAME_ERROR || status == DNS_INFO_NO_RECORDS || status == ERROR_INVALID_NAME /* XP */, "got %u\n", status);
+ ok(status == DNS_ERROR_RCODE_NAME_ERROR || status == DNS_INFO_NO_RECORDS || status == ERROR_INVALID_NAME /* XP */,
+ "got %ld\n", status);
wcscpy(domain, L"_ldap._tcp.deadbeef");
status = DnsQuery_W(domain, DNS_TYPE_SRV, DNS_QUERY_STANDARD, NULL, &rec, NULL);
- ok(status == DNS_ERROR_RCODE_NAME_ERROR || status == DNS_INFO_NO_RECORDS || status == ERROR_INVALID_NAME /* XP */, "got %u\n", status);
+ ok(status == DNS_ERROR_RCODE_NAME_ERROR || status == DNS_INFO_NO_RECORDS || status == ERROR_INVALID_NAME /* XP */,
+ "got %ld\n", status);
wcscpy(domain, L"_ldap._tcp.dc._msdcs.");
size = ARRAY_SIZE(domain) - wcslen(domain);
ret = GetComputerNameExW(ComputerNameDnsDomain, domain + wcslen(domain), &size);
- ok(ret, "GetComputerNameEx error %u\n", GetLastError());
+ ok(ret, "GetComputerNameEx error %lu\n", GetLastError());
if (!size)
{
skip("computer is not in a domain\n");
@@ -67,7 +69,7 @@ static void test_DnsQuery(void)
}
status = DnsQuery_W(domain, DNS_TYPE_SRV, DNS_QUERY_STANDARD, NULL, &rec, NULL);
- trace("DnsQuery_W(%s) => %d\n", wine_dbgstr_w(domain), status);
+ trace("DnsQuery_W(%s) => %ld\n", wine_dbgstr_w(domain), status);
if (status != ERROR_SUCCESS)
{
skip("domain %s doesn't have an SRV entry\n", wine_dbgstr_w(domain));
@@ -81,7 +83,8 @@ static void test_DnsQuery(void)
/* IPv4 */
status = DnsQuery_W(name, DNS_TYPE_A, DNS_QUERY_STANDARD, NULL, &rec, NULL);
- ok(status == ERROR_SUCCESS || status == DNS_ERROR_RCODE_NAME_ERROR, "DnsQuery_W(%s) => %d\n", wine_dbgstr_w(name), status);
+ ok(status == ERROR_SUCCESS || status == DNS_ERROR_RCODE_NAME_ERROR, "DnsQuery_W(%s) => %ld\n",
+ wine_dbgstr_w(name), status);
if (status == ERROR_SUCCESS)
{
SOCKADDR_IN addr;
@@ -92,7 +95,7 @@ static void test_DnsQuery(void)
addr.sin_addr.s_addr = rec->Data.A.IpAddress;
size = sizeof(buf);
ret = WSAAddressToStringW((SOCKADDR *)&addr, sizeof(addr), NULL, buf, &size);
- ok(!ret, "WSAAddressToStringW error %d\n", ret);
+ ok(!ret, "WSAAddressToStringW error %lu\n", ret);
trace("WSAAddressToStringW => %s\n", wine_dbgstr_w(buf));
DnsRecordListFree(rec, DnsFreeRecordList);
@@ -100,7 +103,8 @@ static void test_DnsQuery(void)
/* IPv6 */
status = DnsQuery_W(name, DNS_TYPE_AAAA, DNS_QUERY_STANDARD, NULL, &rec, NULL);
- ok(status == ERROR_SUCCESS || status == DNS_ERROR_RCODE_NAME_ERROR, "DnsQuery_W(%s) => %d\n", wine_dbgstr_w(name), status);
+ ok(status == ERROR_SUCCESS || status == DNS_ERROR_RCODE_NAME_ERROR, "DnsQuery_W(%s) => %ld\n",
+ wine_dbgstr_w(name), status);
if (status == ERROR_SUCCESS)
{
SOCKADDR_IN6 addr;
@@ -112,7 +116,7 @@ static void test_DnsQuery(void)
memcpy(addr.sin6_addr.s6_addr, &rec->Data.AAAA.Ip6Address, sizeof(rec->Data.AAAA.Ip6Address));
size = sizeof(buf);
ret = WSAAddressToStringW((SOCKADDR *)&addr, sizeof(addr), NULL, buf, &size);
- ok(!ret, "WSAAddressToStringW error %d\n", ret);
+ ok(!ret, "WSAAddressToStringW error %lu\n", ret);
trace("WSAAddressToStringW => %s\n", wine_dbgstr_w(buf));
DnsRecordListFree(rec, DnsFreeRecordList);
@@ -138,7 +142,8 @@ static IP_ADAPTER_ADDRESSES *get_adapters(void)
static void test_DnsQueryConfig( void )
{
- DWORD err, size, i, ipv6_count;
+ DNS_STATUS err;
+ DWORD size, i, ipv6_count;
WCHAR name[MAX_ADAPTER_NAME_LENGTH + 1];
IP_ADAPTER_ADDRESSES *adapters, *ptr;
DNS_ADDR_ARRAY *ipv4, *ipv6, *unspec;
@@ -157,61 +162,61 @@ static void test_DnsQueryConfig( void )
ipv4 = malloc( size );
size--;
err = DnsQueryConfig( DnsConfigDnsServersIpv4, 0, name, NULL, ipv4, &size );
- ok( err == ERROR_MORE_DATA, "got %d\n", err );
+ ok( err == ERROR_MORE_DATA, "got %ld\n", err );
size++;
err = DnsQueryConfig( DnsConfigDnsServersIpv4, 0, name, NULL, ipv4, &size );
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
- ok( ipv4->AddrCount == ipv4->MaxCount, "got %d vs %d\n", ipv4->AddrCount, ipv4->MaxCount );
- ok( !ipv4->Tag, "got %08x\n", ipv4->Tag );
+ ok( ipv4->AddrCount == ipv4->MaxCount, "got %lu vs %lu\n", ipv4->AddrCount, ipv4->MaxCount );
+ ok( !ipv4->Tag, "got %#lx\n", ipv4->Tag );
ok( !ipv4->Family, "got %d\n", ipv4->Family );
- ok( !ipv4->WordReserved, "got %04x\n", ipv4->WordReserved );
- ok( !ipv4->Flags, "got %08x\n", ipv4->Flags );
- ok( !ipv4->MatchFlag, "got %08x\n", ipv4->MatchFlag );
- ok( !ipv4->Reserved1, "got %08x\n", ipv4->Reserved1 );
- ok( !ipv4->Reserved2, "got %08x\n", ipv4->Reserved2 );
+ ok( !ipv4->WordReserved, "got %#x\n", ipv4->WordReserved );
+ ok( !ipv4->Flags, "got %#lx\n", ipv4->Flags );
+ ok( !ipv4->MatchFlag, "got %#lx\n", ipv4->MatchFlag );
+ ok( !ipv4->Reserved1, "got %#lx\n", ipv4->Reserved1 );
+ ok( !ipv4->Reserved2, "got %#lx\n", ipv4->Reserved2 );
size = 0;
err = DnsQueryConfig( DnsConfigDnsServerList, 0, name, NULL, NULL, &size );
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
ip4_array = malloc( size );
err = DnsQueryConfig( DnsConfigDnsServerList, 0, name, NULL, ip4_array, &size );
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
- ok( ipv4->AddrCount == ip4_array->AddrCount, "got %d vs %d\n", ipv4->AddrCount, ip4_array->AddrCount );
+ ok( ipv4->AddrCount == ip4_array->AddrCount, "got %lu vs %lu\n", ipv4->AddrCount, ip4_array->AddrCount );
for (i = 0; i < ipv4->AddrCount; i++)
{
SOCKADDR_IN *sa = (SOCKADDR_IN *)ipv4->AddrArray[i].MaxSa;
ok( sa->sin_family == AF_INET, "got %d\n", sa->sin_family );
- ok( sa->sin_addr.s_addr == ip4_array->AddrArray[i], "got %08x vs %08x\n",
+ ok( sa->sin_addr.s_addr == ip4_array->AddrArray[i], "got %#lx vs %#lx\n",
sa->sin_addr.s_addr, ip4_array->AddrArray[i] );
- ok( ipv4->AddrArray[i].Data.DnsAddrUserDword[0] == sizeof(*sa), "got %d\n",
+ ok( ipv4->AddrArray[i].Data.DnsAddrUserDword[0] == sizeof(*sa), "got %lu\n",
ipv4->AddrArray[i].Data.DnsAddrUserDword[0] );
}
size = 0;
err = DnsQueryConfig( DnsConfigDnsServersIpv6, 0, name, NULL, NULL, &size );
- ok( !err || err == DNS_ERROR_NO_DNS_SERVERS, "got %d\n", err );
+ ok( !err || err == DNS_ERROR_NO_DNS_SERVERS, "got %ld\n", err );
ipv6_count = 0;
ipv6 = NULL;
if (!err)
{
ipv6 = malloc( size );
err = DnsQueryConfig( DnsConfigDnsServersIpv6, 0, name, NULL, ipv6, &size );
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
ipv6_count = ipv6->AddrCount;
}
size = 0;
err = DnsQueryConfig( DnsConfigDnsServersUnspec, 0, name, NULL, NULL, &size );
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
unspec = malloc( size );
err = DnsQueryConfig( DnsConfigDnsServersUnspec, 0, name, NULL, unspec, &size );
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
- ok( unspec->AddrCount == ipv4->AddrCount + ipv6_count, "got %d vs %d + %d\n",
+ ok( unspec->AddrCount == ipv4->AddrCount + ipv6_count, "got %lu vs %lu + %lu\n",
unspec->AddrCount, ipv4->AddrCount, ipv6_count );
free( ip4_array );
diff --git a/dlls/dnsapi/tests/record.c b/dlls/dnsapi/tests/record.c
index c07c3400e78..20738de3618 100644
--- a/dlls/dnsapi/tests/record.c
+++ b/dlls/dnsapi/tests/record.c
@@ -202,58 +202,58 @@ static void test_DnsExtractRecordsFromMessage(void)
ret = DnsExtractRecordsFromMessage_UTF8( (DNS_MESSAGE_BUFFER *)msg_empty, sizeof(msg_empty) - 1, &rec );
ok( ret == ERROR_INVALID_PARAMETER || broken(ret == DNS_ERROR_BAD_PACKET) /* win7 */,
- "failed %u\n", ret );
+ "failed %ld\n", ret );
ret = DnsExtractRecordsFromMessage_UTF8( (DNS_MESSAGE_BUFFER *)msg_empty, sizeof(msg_empty), &rec );
- ok( ret == DNS_ERROR_BAD_PACKET, "failed %u\n", ret );
+ ok( ret == DNS_ERROR_BAD_PACKET, "failed %ld\n", ret );
ret = DnsExtractRecordsFromMessage_UTF8( (DNS_MESSAGE_BUFFER *)msg_empty_answer, sizeof(msg_empty_answer), &rec );
- ok( ret == DNS_ERROR_BAD_PACKET, "failed %u\n", ret );
+ ok( ret == DNS_ERROR_BAD_PACKET, "failed %ld\n", ret );
rec = (void *)0xdeadbeef;
ret = DnsExtractRecordsFromMessage_UTF8( (DNS_MESSAGE_BUFFER *)msg_question, sizeof(msg_question), &rec );
- ok( !ret, "failed %u\n", ret );
+ ok( !ret, "failed %ld\n", ret );
ok( !rec, "record %p\n", rec );
rec = (void *)0xdeadbeef;
ret = DnsExtractRecordsFromMessage_UTF8( (DNS_MESSAGE_BUFFER *)msg_winehq, sizeof(msg_winehq), &rec );
- ok( !ret, "failed %u\n", ret );
+ ok( !ret, "failed %ld\n", ret );
ok( rec != NULL, "record not set\n" );
ok( !strcmp( rec->pName, "winehq.org" ), "wrong name %s\n", rec->pName );
ok( rec->Flags.S.Section == DnsSectionAnswer, "wrong section %u\n", rec->Flags.S.Section );
ok( rec->Flags.S.CharSet == DnsCharSetUtf8, "wrong charset %u\n", rec->Flags.S.CharSet );
ok( rec->wType == DNS_TYPE_A, "wrong type %u\n", rec->wType );
ok( rec->wDataLength == sizeof(DNS_A_DATA), "wrong len %u\n", rec->wDataLength );
- ok( rec->dwTtl == 0x04050607, "wrong ttl %x\n", rec->dwTtl );
- ok( rec->Data.A.IpAddress == 0x7c510404, "wrong addr %08x\n", rec->Data.A.IpAddress );
+ ok( rec->dwTtl == 0x04050607, "wrong ttl %#lx\n", rec->dwTtl );
+ ok( rec->Data.A.IpAddress == 0x7c510404, "wrong addr %#lx\n", rec->Data.A.IpAddress );
ok( !rec->pNext, "next record %p\n", rec->pNext );
DnsRecordListFree( (DNS_RECORD *)rec, DnsFreeRecordList );
recW = (void *)0xdeadbeef;
ret = DnsExtractRecordsFromMessage_W( (DNS_MESSAGE_BUFFER *)msg_winehq, sizeof(msg_winehq), &recW );
- ok( !ret, "failed %u\n", ret );
+ ok( !ret, "failed %ld\n", ret );
ok( recW != NULL, "record not set\n" );
ok( !wcscmp( recW->pName, L"winehq.org" ), "wrong name %s\n", debugstr_w(recW->pName) );
DnsRecordListFree( (DNS_RECORD *)recW, DnsFreeRecordList );
ret = DnsExtractRecordsFromMessage_UTF8( (DNS_MESSAGE_BUFFER *)msg_invchars, sizeof(msg_invchars), &rec );
- ok( !ret, "failed %u\n", ret );
+ ok( !ret, "failed %ld\n", ret );
ok( !strcmp( rec->pName, "a$.b\\.c..\td" ), "wrong name %s\n", rec->pName );
DnsRecordListFree( (DNS_RECORD *)rec, DnsFreeRecordList );
ret = DnsExtractRecordsFromMessage_UTF8( (DNS_MESSAGE_BUFFER *)msg_root, sizeof(msg_root), &rec );
- ok( !ret, "failed %u\n", ret );
+ ok( !ret, "failed %ld\n", ret );
ok( !strcmp( rec->pName, "." ), "wrong name %s\n", rec->pName );
DnsRecordListFree( (DNS_RECORD *)rec, DnsFreeRecordList );
ret = DnsExtractRecordsFromMessage_UTF8( (DNS_MESSAGE_BUFFER *)msg_label, sizeof(msg_label), &rec );
- ok( ret == DNS_ERROR_BAD_PACKET, "failed %u\n", ret );
+ ok( ret == DNS_ERROR_BAD_PACKET, "failed %ld\n", ret );
ret = DnsExtractRecordsFromMessage_UTF8( (DNS_MESSAGE_BUFFER *)msg_loop, sizeof(msg_loop), &rec );
- ok( ret == DNS_ERROR_BAD_PACKET, "failed %u\n", ret );
+ ok( ret == DNS_ERROR_BAD_PACKET, "failed %ld\n", ret );
ret = DnsExtractRecordsFromMessage_UTF8( (DNS_MESSAGE_BUFFER *)msg_types, sizeof(msg_types), &rec );
- ok( !ret, "failed %u\n", ret );
+ ok( !ret, "failed %ld\n", ret );
r = rec;
ok( r != NULL, "record not set\n" );
ok( !strcmp( r->pName, "winehq.org" ), "wrong name %s\n", r->pName );
@@ -271,15 +271,15 @@ static void test_DnsExtractRecordsFromMessage(void)
ok( r != NULL, "record not set\n" );
ok( !strcmp( r->pName, "winehq.org" ), "wrong name %s\n", r->pName );
ok( r->wType == DNS_TYPE_AAAA, "wrong type %u\n", r->wType );
- ok( r->Data.AAAA.Ip6Address.IP6Dword[0] == 0x04030201, "wrong addr %x\n",
+ ok( r->Data.AAAA.Ip6Address.IP6Dword[0] == 0x04030201, "wrong addr %#lx\n",
r->Data.AAAA.Ip6Address.IP6Dword[0] );
- ok( r->Data.AAAA.Ip6Address.IP6Dword[1] == 0x08070605, "wrong addr %x\n",
+ ok( r->Data.AAAA.Ip6Address.IP6Dword[1] == 0x08070605, "wrong addr %#lx\n",
r->Data.AAAA.Ip6Address.IP6Dword[1] );
- ok( r->Data.AAAA.Ip6Address.IP6Dword[2] == 0x0c0b0a09, "wrong addr %x\n",
+ ok( r->Data.AAAA.Ip6Address.IP6Dword[2] == 0x0c0b0a09, "wrong addr %#lx\n",
r->Data.AAAA.Ip6Address.IP6Dword[2] );
- ok( r->Data.AAAA.Ip6Address.IP6Dword[3] == 0x000f0e0d, "wrong addr %x\n",
+ ok( r->Data.AAAA.Ip6Address.IP6Dword[3] == 0x000f0e0d, "wrong addr %#lx\n",
r->Data.AAAA.Ip6Address.IP6Dword[3] );
- ok( r->wDataLength == sizeof(DNS_AAAA_DATA), "wrong len %x\n", r->wDataLength );
+ ok( r->wDataLength == sizeof(DNS_AAAA_DATA), "wrong len %u\n", r->wDataLength );
r = r->pNext;
ok( r != NULL, "record not set\n" );
ok( !strcmp( r->pName, "winehq.org" ), "wrong name %s\n", r->pName );
@@ -296,7 +296,7 @@ static void test_DnsExtractRecordsFromMessage(void)
ok( r != NULL, "record not set\n" );
ok( !strcmp( r->pName, "t.x" ), "wrong name %s\n", r->pName );
ok( r->wType == DNS_TYPE_TEXT, "wrong type %u\n", r->wType );
- ok( r->Data.TXT.dwStringCount == 3, "wrong count %u\n", r->Data.TXT.dwStringCount );
+ ok( r->Data.TXT.dwStringCount == 3, "wrong count %lu\n", r->Data.TXT.dwStringCount );
ok( !strcmp( r->Data.TXT.pStringArray[0], "zy" ), "wrong string %s\n", r->Data.TXT.pStringArray[0] );
ok( !strcmp( r->Data.TXT.pStringArray[1], "" ), "wrong string %s\n", r->Data.TXT.pStringArray[1] );
ok( !strcmp( r->Data.TXT.pStringArray[2], "XY\xc3\xa9" ), "wrong string %s\n", r->Data.TXT.pStringArray[2] );
@@ -306,7 +306,7 @@ static void test_DnsExtractRecordsFromMessage(void)
DnsRecordListFree( (DNS_RECORD *)rec, DnsFreeRecordList );
ret = DnsExtractRecordsFromMessage_W( (DNS_MESSAGE_BUFFER *)msg_types, sizeof(msg_types), &recW );
- ok( !ret, "failed %u\n", ret );
+ ok( !ret, "failed %ld\n", ret );
rW = recW;
ok( rW != NULL, "record not set\n" );
ok( !wcscmp( rW->pName, L"winehq.org" ), "wrong name %s\n", debugstr_w(rW->pName) );
@@ -328,7 +328,7 @@ static void test_DnsExtractRecordsFromMessage(void)
ok( r != NULL, "record not set\n" );
ok( !wcscmp( rW->pName, L"t.x" ), "wrong name %s\n", debugstr_w(rW->pName) );
ok( rW->wType == DNS_TYPE_TEXT, "wrong type %u\n", rW->wType );
- ok( rW->Data.TXT.dwStringCount == 3, "wrong count %u\n", rW->Data.TXT.dwStringCount );
+ ok( rW->Data.TXT.dwStringCount == 3, "wrong count %lu\n", rW->Data.TXT.dwStringCount );
ok( !wcscmp( rW->Data.TXT.pStringArray[0], L"zy" ), "wrong string %s\n", debugstr_w(rW->Data.TXT.pStringArray[0]) );
ok( !wcscmp( rW->Data.TXT.pStringArray[1], L"" ), "wrong string %s\n", debugstr_w(rW->Data.TXT.pStringArray[1]) );
ok( !wcscmp( rW->Data.TXT.pStringArray[2], L"XY\x00e9" ), "wrong string %s\n", debugstr_w(rW->Data.TXT.pStringArray[2]) );
--
2.30.2
1
0