Wine-Devel
By message
wine-devel@list.winehq.org
By month
Threads by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
February 2022
- 87 participants
- 926 discussions
[PATCH] winegstreamer: Do not block forever if EOS races with command queue.
by Giovanni Mascellani Feb. 9, 2022
by Giovanni Mascellani Feb. 9, 2022
Feb. 9, 2022
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 Feb. 9, 2022
by Paul Gofman Feb. 9, 2022
Feb. 9, 2022
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
Feb. 9, 2022
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 Feb. 9, 2022
by Huw Davies Feb. 9, 2022
Feb. 9, 2022
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
Feb. 9, 2022
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 Feb. 9, 2022
by Zhiyi Zhang Feb. 9, 2022
Feb. 9, 2022
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
Feb. 9, 2022
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/bcrypt/tests/Makefile.in | 1 -
dlls/bcrypt/tests/bcrypt.c | 1172 ++++++++++++++++-----------------
2 files changed, 586 insertions(+), 587 deletions(-)
diff --git a/dlls/bcrypt/tests/Makefile.in b/dlls/bcrypt/tests/Makefile.in
index 70ce1a6a925..1bf7d2c48f1 100644
--- a/dlls/bcrypt/tests/Makefile.in
+++ b/dlls/bcrypt/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = bcrypt.dll
IMPORTS = bcrypt user32 advapi32
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index 0f9456fee07..46793018742 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -35,27 +35,27 @@ static void test_BCryptGenRandom(void)
UCHAR buffer[256];
ret = BCryptGenRandom(NULL, NULL, 0, 0);
- ok(ret == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got 0x%x\n", ret);
+ ok(ret == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got %#lx\n", ret);
ret = BCryptGenRandom(NULL, buffer, 0, 0);
- ok(ret == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got 0x%x\n", ret);
+ ok(ret == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got %#lx\n", ret);
ret = BCryptGenRandom(NULL, buffer, sizeof(buffer), 0);
- ok(ret == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got 0x%x\n", ret);
+ ok(ret == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got %#lx\n", ret);
ret = BCryptGenRandom(NULL, buffer, sizeof(buffer), BCRYPT_USE_SYSTEM_PREFERRED_RNG);
- ok(ret == STATUS_SUCCESS, "Expected success, got 0x%x\n", ret);
+ ok(ret == STATUS_SUCCESS, "Expected success, got %#lx\n", ret);
ret = BCryptGenRandom(NULL, buffer, sizeof(buffer),
BCRYPT_USE_SYSTEM_PREFERRED_RNG|BCRYPT_RNG_USE_ENTROPY_IN_BUFFER);
- ok(ret == STATUS_SUCCESS, "Expected success, got 0x%x\n", ret);
+ ok(ret == STATUS_SUCCESS, "Expected success, got %#lx\n", ret);
ret = BCryptGenRandom(NULL, NULL, sizeof(buffer), BCRYPT_USE_SYSTEM_PREFERRED_RNG);
- ok(ret == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got 0x%x\n", ret);
+ ok(ret == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got %#lx\n", ret);
/* Zero sized buffer should work too */
ret = BCryptGenRandom(NULL, buffer, 0, BCRYPT_USE_SYSTEM_PREFERRED_RNG);
- ok(ret == STATUS_SUCCESS, "Expected success, got 0x%x\n", ret);
+ ok(ret == STATUS_SUCCESS, "Expected success, got %#lx\n", ret);
/* Test random number generation - It's impossible for a sane RNG to return 8 zeros */
memset(buffer, 0, 16);
ret = BCryptGenRandom(NULL, buffer, 8, BCRYPT_USE_SYSTEM_PREFERRED_RNG);
- ok(ret == STATUS_SUCCESS, "Expected success, got 0x%x\n", ret);
+ ok(ret == STATUS_SUCCESS, "Expected success, got %#lx\n", ret);
ok(memcmp(buffer, buffer + 8, 8), "Expected a random number, got 0\n");
}
@@ -87,11 +87,11 @@ todo_wine
RegCloseKey(hkey);
ret = BCryptGetFipsAlgorithmMode(&enabled);
- ok(ret == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got 0x%x\n", ret);
+ ok(ret == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %#lx\n", ret);
ok(enabled == expected, "expected result %d, got %d\n", expected, enabled);
ret = BCryptGetFipsAlgorithmMode(NULL);
- ok(ret == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got 0x%x\n", ret);
+ ok(ret == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got %#lx\n", ret);
}
static void format_hash(const UCHAR *bytes, ULONG size, char *buf)
@@ -113,32 +113,32 @@ static void _test_object_length(unsigned line, void *handle)
len = size = 0xdeadbeef;
status = BCryptGetProperty(NULL, BCRYPT_OBJECT_LENGTH, (UCHAR *)&len, sizeof(len), &size, 0);
- ok_(__FILE__,line)(status == STATUS_INVALID_HANDLE, "BCryptGetProperty failed: %08x\n", status);
+ ok_(__FILE__,line)(status == STATUS_INVALID_HANDLE, "BCryptGetProperty failed: %#lx\n", status);
len = size = 0xdeadbeef;
status = BCryptGetProperty(handle, NULL, (UCHAR *)&len, sizeof(len), &size, 0);
- ok_(__FILE__,line)(status == STATUS_INVALID_PARAMETER, "BCryptGetProperty failed: %08x\n", status);
+ ok_(__FILE__,line)(status == STATUS_INVALID_PARAMETER, "BCryptGetProperty failed: %#lx\n", status);
len = size = 0xdeadbeef;
status = BCryptGetProperty(handle, BCRYPT_OBJECT_LENGTH, (UCHAR *)&len, sizeof(len), NULL, 0);
- ok_(__FILE__,line)(status == STATUS_INVALID_PARAMETER, "BCryptGetProperty failed: %08x\n", status);
+ ok_(__FILE__,line)(status == STATUS_INVALID_PARAMETER, "BCryptGetProperty failed: %#lx\n", status);
len = size = 0xdeadbeef;
status = BCryptGetProperty(handle, BCRYPT_OBJECT_LENGTH, NULL, sizeof(len), &size, 0);
- ok_(__FILE__,line)(status == STATUS_SUCCESS, "BCryptGetProperty failed: %08x\n", status);
- ok_(__FILE__,line)(size == sizeof(len), "got %u\n", size);
+ ok_(__FILE__,line)(status == STATUS_SUCCESS, "BCryptGetProperty failed: %#lx\n", status);
+ ok_(__FILE__,line)(size == sizeof(len), "got %lu\n", size);
len = size = 0xdeadbeef;
status = BCryptGetProperty(handle, BCRYPT_OBJECT_LENGTH, (UCHAR *)&len, 0, &size, 0);
- ok_(__FILE__,line)(status == STATUS_BUFFER_TOO_SMALL, "BCryptGetProperty failed: %08x\n", status);
- ok_(__FILE__,line)(len == 0xdeadbeef, "got %u\n", len);
- ok_(__FILE__,line)(size == sizeof(len), "got %u\n", size);
+ ok_(__FILE__,line)(status == STATUS_BUFFER_TOO_SMALL, "BCryptGetProperty failed: %#lx\n", status);
+ ok_(__FILE__,line)(len == 0xdeadbeef, "got %lu\n", len);
+ ok_(__FILE__,line)(size == sizeof(len), "got %lu\n", size);
len = size = 0xdeadbeef;
status = BCryptGetProperty(handle, BCRYPT_OBJECT_LENGTH, (UCHAR *)&len, sizeof(len), &size, 0);
- ok_(__FILE__,line)(status == STATUS_SUCCESS, "BCryptGetProperty failed: %08x\n", status);
+ ok_(__FILE__,line)(status == STATUS_SUCCESS, "BCryptGetProperty failed: %#lx\n", status);
ok_(__FILE__,line)(len != 0xdeadbeef, "len not set\n");
- ok_(__FILE__,line)(size == sizeof(len), "got %u\n", size);
+ ok_(__FILE__,line)(size == sizeof(len), "got %lu\n", size);
}
#define test_hash_length(a,b) _test_hash_length(__LINE__,a,b)
@@ -148,9 +148,9 @@ static void _test_hash_length(unsigned line, void *handle, ULONG exlen)
NTSTATUS status;
status = BCryptGetProperty(handle, BCRYPT_HASH_LENGTH, (UCHAR *)&len, sizeof(len), &size, 0);
- ok_(__FILE__,line)(status == STATUS_SUCCESS, "BCryptGetProperty failed: %08x\n", status);
- ok_(__FILE__,line)(size == sizeof(len), "got %u\n", size);
- ok_(__FILE__,line)(len == exlen, "len = %u, expected %u\n", len, exlen);
+ ok_(__FILE__,line)(status == STATUS_SUCCESS, "BCryptGetProperty failed: %#lx\n", status);
+ ok_(__FILE__,line)(size == sizeof(len), "got %lu\n", size);
+ ok_(__FILE__,line)(len == exlen, "len = %lu, expected %lu\n", len, exlen);
}
#define test_alg_name(a,b) _test_alg_name(__LINE__,a,b)
@@ -162,8 +162,8 @@ static void _test_alg_name(unsigned line, void *handle, const WCHAR *exname)
NTSTATUS status;
status = BCryptGetProperty(handle, BCRYPT_ALGORITHM_NAME, buf, sizeof(buf), &size, 0);
- ok_(__FILE__,line)(status == STATUS_SUCCESS, "BCryptGetProperty failed: %08x\n", status);
- ok_(__FILE__,line)(size == (lstrlenW(exname)+1)*sizeof(WCHAR), "got %u\n", size);
+ ok_(__FILE__,line)(status == STATUS_SUCCESS, "BCryptGetProperty failed: %#lx\n", status);
+ ok_(__FILE__,line)(size == (lstrlenW(exname) + 1) * sizeof(WCHAR), "got %lu\n", size);
ok_(__FILE__,line)(!lstrcmpW(name, exname), "alg name = %s, expected %s\n", wine_dbgstr_w(name),
wine_dbgstr_w(exname));
}
@@ -189,7 +189,7 @@ static void test_hash(const struct hash_test *test)
alg = NULL;
ret = BCryptOpenAlgorithmProvider(&alg, test->alg, MS_PRIMITIVE_PROVIDER, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ok(alg != NULL, "alg not set\n");
test_object_length(alg);
@@ -199,122 +199,122 @@ static void test_hash(const struct hash_test *test)
hash = NULL;
len = sizeof(buf);
ret = BCryptCreateHash(alg, &hash, buf, len, NULL, 0, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ok(hash != NULL, "hash not set\n");
ret = BCryptHashData(hash, NULL, 0, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ret = BCryptHashData(hash, (UCHAR *)"test", sizeof("test"), 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
test_hash_length(hash, test->hash_size);
test_alg_name(hash, test->alg);
memset(hash_buf, 0, sizeof(hash_buf));
ret = BCryptFinishHash(hash, hash_buf, test->hash_size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
format_hash( hash_buf, test->hash_size, str );
ok(!strcmp(str, test->hash), "got %s\n", str);
ret = BCryptDestroyHash(hash);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
hash = NULL;
len = sizeof(buf);
ret = BCryptCreateHash(alg, &hash, buf, len, NULL, 0, BCRYPT_HASH_REUSABLE_FLAG);
- ok(ret == STATUS_SUCCESS || broken(ret == STATUS_INVALID_PARAMETER) /* < win8 */, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS || broken(ret == STATUS_INVALID_PARAMETER) /* < win8 */, "got %#lx\n", ret);
if (ret == STATUS_SUCCESS)
{
ret = BCryptHashData(hash, (UCHAR *)"test", sizeof("test"), 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
memset(hash_buf, 0, sizeof(hash_buf));
ret = BCryptFinishHash(hash, hash_buf, test->hash_size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
format_hash( hash_buf, test->hash_size, str );
ok(!strcmp(str, test->hash), "got %s\n", str);
/* reuse it */
ret = BCryptHashData(hash, (UCHAR *)"tset", sizeof("tset"), 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
memset(hash_buf, 0, sizeof(hash_buf));
ret = BCryptFinishHash(hash, hash_buf, test->hash_size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
format_hash( hash_buf, test->hash_size, str );
ok(!strcmp(str, test->hash2), "got %s\n", str);
ret = BCryptDestroyHash(hash);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
}
ret = BCryptCloseAlgorithmProvider(alg, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
alg = NULL;
ret = BCryptOpenAlgorithmProvider(&alg, test->alg, MS_PRIMITIVE_PROVIDER, BCRYPT_ALG_HANDLE_HMAC_FLAG);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ok(alg != NULL, "alg not set\n");
hash = NULL;
len = sizeof(buf_hmac);
ret = BCryptCreateHash(alg, &hash, buf_hmac, len, (UCHAR *)"key", sizeof("key"), 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ok(hash != NULL, "hash not set\n");
ret = BCryptHashData(hash, (UCHAR *)"test", sizeof("test"), 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
test_hash_length(hash, test->hash_size);
test_alg_name(hash, test->alg);
memset(hmac_hash, 0, sizeof(hmac_hash));
ret = BCryptFinishHash(hash, hmac_hash, test->hash_size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
format_hash( hmac_hash, test->hash_size, str );
ok(!strcmp(str, test->hmac_hash), "got %s\n", str);
ret = BCryptDestroyHash(hash);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
hash = NULL;
len = sizeof(buf_hmac);
ret = BCryptCreateHash(alg, &hash, buf_hmac, len, (UCHAR *)"key", sizeof("key"), BCRYPT_HASH_REUSABLE_FLAG);
- ok(ret == STATUS_SUCCESS || broken(ret == STATUS_INVALID_PARAMETER) /* < win8 */, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS || broken(ret == STATUS_INVALID_PARAMETER) /* < win8 */, "got %#lx\n", ret);
if (ret == STATUS_SUCCESS)
{
ret = BCryptHashData(hash, (UCHAR *)"test", sizeof("test"), 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
memset(hmac_hash, 0, sizeof(hmac_hash));
ret = BCryptFinishHash(hash, hmac_hash, test->hash_size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
format_hash( hmac_hash, test->hash_size, str );
ok(!strcmp(str, test->hmac_hash), "got %s\n", str);
/* reuse it */
ret = BCryptHashData(hash, (UCHAR *)"tset", sizeof("tset"), 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
memset(hmac_hash, 0, sizeof(hmac_hash));
ret = BCryptFinishHash(hash, hmac_hash, test->hash_size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
format_hash( hmac_hash, test->hash_size, str );
ok(!strcmp(str, test->hmac_hash2), "got %s\n", str);
ret = BCryptDestroyHash(hash);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
}
ret = BCryptDestroyHash(hash);
- ok(ret == STATUS_INVALID_PARAMETER, "got %08x\n", ret);
+ ok(ret == STATUS_INVALID_PARAMETER, "got %#lx\n", ret);
ret = BCryptDestroyHash(NULL);
- ok(ret == STATUS_INVALID_PARAMETER, "got %08x\n", ret);
+ ok(ret == STATUS_INVALID_PARAMETER, "got %#lx\n", ret);
ret = BCryptCloseAlgorithmProvider(alg, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
}
static void test_hashes(void)
@@ -397,7 +397,7 @@ static void test_BcryptHash(void)
alg = NULL;
ret = BCryptOpenAlgorithmProvider(&alg, BCRYPT_MD5_ALGORITHM, MS_PRIMITIVE_PROVIDER, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ok(alg != NULL, "alg not set\n");
test_hash_length(alg, 16);
@@ -405,26 +405,26 @@ static void test_BcryptHash(void)
memset(md5, 0, sizeof(md5));
ret = pBCryptHash(alg, NULL, 0, (UCHAR *)"test", sizeof("test"), md5, sizeof(md5));
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
format_hash( md5, sizeof(md5), str );
ok(!strcmp(str, expected), "got %s\n", str);
ret = BCryptCloseAlgorithmProvider(alg, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
alg = NULL;
memset(md5_hmac, 0, sizeof(md5_hmac));
ret = BCryptOpenAlgorithmProvider(&alg, BCRYPT_MD5_ALGORITHM, MS_PRIMITIVE_PROVIDER, BCRYPT_ALG_HANDLE_HMAC_FLAG);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ok(alg != NULL, "alg not set\n");
ret = pBCryptHash(alg, (UCHAR *)"key", sizeof("key"), (UCHAR *)"test", sizeof("test"), md5_hmac, sizeof(md5_hmac));
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
format_hash( md5_hmac, sizeof(md5_hmac), str );
ok(!strcmp(str, expected_hmac), "got %s\n", str);
ret = BCryptCloseAlgorithmProvider(alg, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
}
/* test vectors from RFC 6070 */
@@ -472,7 +472,7 @@ static void test_BcryptDeriveKeyPBKDF2(void)
alg = NULL;
ret = BCryptOpenAlgorithmProvider(&alg, BCRYPT_SHA1_ALGORITHM, MS_PRIMITIVE_PROVIDER,
BCRYPT_ALG_HANDLE_HMAC_FLAG);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ok(alg != NULL, "alg not set\n");
test_hash_length(alg, 20);
@@ -480,20 +480,20 @@ static void test_BcryptDeriveKeyPBKDF2(void)
ret = BCryptDeriveKeyPBKDF2(alg, rfc6070[0].pwd, rfc6070[0].pwd_len, rfc6070[0].salt, rfc6070[0].salt_len,
0, buf, rfc6070[0].dk_len, 0);
- ok(ret == STATUS_INVALID_PARAMETER, "got %08x\n", ret);
+ ok(ret == STATUS_INVALID_PARAMETER, "got %#lx\n", ret);
for (i = 0; i < ARRAY_SIZE(rfc6070); i++)
{
memset(buf, 0, sizeof(buf));
ret = BCryptDeriveKeyPBKDF2(alg, rfc6070[i].pwd, rfc6070[i].pwd_len, rfc6070[i].salt, rfc6070[i].salt_len,
rfc6070[i].iterations, buf, rfc6070[i].dk_len, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
format_hash(buf, rfc6070[i].dk_len, str);
ok(!memcmp(str, rfc6070[i].dk, rfc6070[i].dk_len), "got %s\n", str);
}
ret = BCryptCloseAlgorithmProvider(alg, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
}
static void test_rng(void)
@@ -505,26 +505,26 @@ static void test_rng(void)
alg = NULL;
ret = BCryptOpenAlgorithmProvider(&alg, BCRYPT_RNG_ALGORITHM, MS_PRIMITIVE_PROVIDER, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ok(alg != NULL, "alg not set\n");
len = size = 0xdeadbeef;
ret = BCryptGetProperty(alg, BCRYPT_OBJECT_LENGTH, (UCHAR *)&len, sizeof(len), &size, 0);
- ok(ret == STATUS_NOT_SUPPORTED, "got %08x\n", ret);
+ ok(ret == STATUS_NOT_SUPPORTED, "got %#lx\n", ret);
len = size = 0xdeadbeef;
ret = BCryptGetProperty(alg, BCRYPT_HASH_LENGTH, (UCHAR *)&len, sizeof(len), &size, 0);
- ok(ret == STATUS_NOT_SUPPORTED, "got %08x\n", ret);
+ ok(ret == STATUS_NOT_SUPPORTED, "got %#lx\n", ret);
test_alg_name(alg, L"RNG");
memset(buf, 0, 16);
ret = BCryptGenRandom(alg, buf, 8, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ok(memcmp(buf, buf + 8, 8), "got zeroes\n");
ret = BCryptCloseAlgorithmProvider(alg, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
}
static void test_aes(void)
@@ -537,62 +537,62 @@ static void test_aes(void)
alg = NULL;
ret = BCryptOpenAlgorithmProvider(&alg, BCRYPT_AES_ALGORITHM, MS_PRIMITIVE_PROVIDER, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ok(alg != NULL, "alg not set\n");
len = size = 0;
ret = BCryptGetProperty(alg, BCRYPT_OBJECT_LENGTH, (UCHAR *)&len, sizeof(len), &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ok(len, "expected non-zero len\n");
- ok(size == sizeof(len), "got %u\n", size);
+ ok(size == sizeof(len), "got %lu\n", size);
len = size = 0;
ret = BCryptGetProperty(alg, BCRYPT_BLOCK_LENGTH, (UCHAR *)&len, sizeof(len), &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(len == 16, "got %u\n", len);
- ok(size == sizeof(len), "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(len == 16, "got %lu\n", len);
+ ok(size == sizeof(len), "got %lu\n", size);
size = 0;
ret = BCryptGetProperty(alg, BCRYPT_CHAINING_MODE, mode, 0, &size, 0);
- ok(ret == STATUS_BUFFER_TOO_SMALL, "got %08x\n", ret);
- ok(size == 64, "got %u\n", size);
+ ok(ret == STATUS_BUFFER_TOO_SMALL, "got %#lx\n", ret);
+ ok(size == 64, "got %lu\n", size);
size = 0;
ret = BCryptGetProperty(alg, BCRYPT_CHAINING_MODE, mode, sizeof(mode) - 1, &size, 0);
- ok(ret == STATUS_BUFFER_TOO_SMALL, "got %08x\n", ret);
- ok(size == 64, "got %u\n", size);
+ ok(ret == STATUS_BUFFER_TOO_SMALL, "got %#lx\n", ret);
+ ok(size == 64, "got %lu\n", size);
size = 0;
memset(mode, 0, sizeof(mode));
ret = BCryptGetProperty(alg, BCRYPT_CHAINING_MODE, mode, sizeof(mode), &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ok(!lstrcmpW((const WCHAR *)mode, BCRYPT_CHAIN_MODE_CBC), "got %s\n", wine_dbgstr_w((const WCHAR *)mode));
- ok(size == 64, "got %u\n", size);
+ ok(size == 64, "got %lu\n", size);
size = 0;
memset(&key_lengths, 0, sizeof(key_lengths));
ret = BCryptGetProperty(alg, BCRYPT_KEY_LENGTHS, (UCHAR*)&key_lengths, sizeof(key_lengths), &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == sizeof(key_lengths), "got %u\n", size);
- ok(key_lengths.dwMinLength == 128, "Expected 128, got %d\n", key_lengths.dwMinLength);
- ok(key_lengths.dwMaxLength == 256, "Expected 256, got %d\n", key_lengths.dwMaxLength);
- ok(key_lengths.dwIncrement == 64, "Expected 64, got %d\n", key_lengths.dwIncrement);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == sizeof(key_lengths), "got %lu\n", size);
+ ok(key_lengths.dwMinLength == 128, "Expected 128, got %lu\n", key_lengths.dwMinLength);
+ ok(key_lengths.dwMaxLength == 256, "Expected 256, got %lu\n", key_lengths.dwMaxLength);
+ ok(key_lengths.dwIncrement == 64, "Expected 64, got %lu\n", key_lengths.dwIncrement);
memcpy(mode, BCRYPT_CHAIN_MODE_GCM, sizeof(BCRYPT_CHAIN_MODE_GCM));
ret = BCryptSetProperty(alg, BCRYPT_CHAINING_MODE, mode, 0, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
size = 0;
memset(mode, 0, sizeof(mode));
ret = BCryptGetProperty(alg, BCRYPT_CHAINING_MODE, mode, sizeof(mode), &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ok(!lstrcmpW((const WCHAR *)mode, BCRYPT_CHAIN_MODE_GCM), "got %s\n", wine_dbgstr_w((const WCHAR *)mode));
- ok(size == 64, "got %u\n", size);
+ ok(size == 64, "got %lu\n", size);
test_alg_name(alg, L"AES");
ret = BCryptCloseAlgorithmProvider(alg, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
}
static void test_3des(void)
@@ -605,55 +605,55 @@ static void test_3des(void)
alg = NULL;
ret = BCryptOpenAlgorithmProvider(&alg, BCRYPT_3DES_ALGORITHM, MS_PRIMITIVE_PROVIDER, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ok(alg != NULL, "alg not set\n");
len = size = 0;
ret = BCryptGetProperty(alg, BCRYPT_OBJECT_LENGTH, (UCHAR *)&len, sizeof(len), &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ok(len, "expected non-zero len\n");
- ok(size == sizeof(len), "got %u\n", size);
+ ok(size == sizeof(len), "got %lu\n", size);
len = size = 0;
ret = BCryptGetProperty(alg, BCRYPT_BLOCK_LENGTH, (UCHAR *)&len, sizeof(len), &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(len == 8, "got %u\n", len);
- ok(size == sizeof(len), "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(len == 8, "got %lu\n", len);
+ ok(size == sizeof(len), "got %lu\n", size);
size = 0;
ret = BCryptGetProperty(alg, BCRYPT_CHAINING_MODE, mode, 0, &size, 0);
- ok(ret == STATUS_BUFFER_TOO_SMALL, "got %08x\n", ret);
- ok(size == 64, "got %u\n", size);
+ ok(ret == STATUS_BUFFER_TOO_SMALL, "got %#lx\n", ret);
+ ok(size == 64, "got %lu\n", size);
size = 0;
ret = BCryptGetProperty(alg, BCRYPT_CHAINING_MODE, mode, sizeof(mode) - 1, &size, 0);
- ok(ret == STATUS_BUFFER_TOO_SMALL, "got %08x\n", ret);
- ok(size == 64, "got %u\n", size);
+ ok(ret == STATUS_BUFFER_TOO_SMALL, "got %#lx\n", ret);
+ ok(size == 64, "got %lu\n", size);
size = 0;
memset(mode, 0, sizeof(mode));
ret = BCryptGetProperty(alg, BCRYPT_CHAINING_MODE, mode, sizeof(mode), &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ok(!lstrcmpW((const WCHAR *)mode, BCRYPT_CHAIN_MODE_CBC), "got %s\n", wine_dbgstr_w((const WCHAR *)mode));
- ok(size == 64, "got %u\n", size);
+ ok(size == 64, "got %lu\n", size);
size = 0;
memset(&key_lengths, 0, sizeof(key_lengths));
ret = BCryptGetProperty(alg, BCRYPT_KEY_LENGTHS, (UCHAR*)&key_lengths, sizeof(key_lengths), &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == sizeof(key_lengths), "got %u\n", size);
- ok(key_lengths.dwMinLength == 192, "Expected 192, got %d\n", key_lengths.dwMinLength);
- ok(key_lengths.dwMaxLength == 192, "Expected 192, got %d\n", key_lengths.dwMaxLength);
- ok(key_lengths.dwIncrement == 0, "Expected 0, got %d\n", key_lengths.dwIncrement);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == sizeof(key_lengths), "got %lu\n", size);
+ ok(key_lengths.dwMinLength == 192, "Expected 192, got %lu\n", key_lengths.dwMinLength);
+ ok(key_lengths.dwMaxLength == 192, "Expected 192, got %lu\n", key_lengths.dwMaxLength);
+ ok(key_lengths.dwIncrement == 0, "Expected 0, got %lu\n", key_lengths.dwIncrement);
memcpy(mode, BCRYPT_CHAIN_MODE_GCM, sizeof(BCRYPT_CHAIN_MODE_GCM));
ret = BCryptSetProperty(alg, BCRYPT_CHAINING_MODE, mode, 0, 0);
- ok(ret == STATUS_NOT_SUPPORTED, "got %08x\n", ret);
+ ok(ret == STATUS_NOT_SUPPORTED, "got %#lx\n", ret);
test_alg_name(alg, L"3DES");
ret = BCryptCloseAlgorithmProvider(alg, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
}
static void test_BCryptGenerateSymmetricKey(void)
@@ -674,15 +674,15 @@ static void test_BCryptGenerateSymmetricKey(void)
NTSTATUS ret;
ret = BCryptOpenAlgorithmProvider(&aes, BCRYPT_AES_ALGORITHM, NULL, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
len = size = 0xdeadbeef;
ret = BCryptGetProperty(aes, BCRYPT_OBJECT_LENGTH, (UCHAR *)&len, sizeof(len), &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
key = (void *)0xdeadbeef;
ret = BCryptGenerateSymmetricKey(NULL, &key, NULL, 0, secret, sizeof(secret), 0);
- ok(ret == STATUS_INVALID_HANDLE, "got %08x\n", ret);
+ ok(ret == STATUS_INVALID_HANDLE, "got %#lx\n", ret);
ok(key == (void *)0xdeadbeef, "got %p\n", key);
key = NULL;
@@ -690,80 +690,80 @@ static void test_BCryptGenerateSymmetricKey(void)
key = (BCRYPT_KEY_HANDLE)0xdeadbeef;
ret = BCryptGenerateSymmetricKey(aes, &key, buf, len, secret, 1, 0);
- ok(ret == STATUS_INVALID_PARAMETER, "got %08x\n", ret);
+ ok(ret == STATUS_INVALID_PARAMETER, "got %#lx\n", ret);
ok(key == (HANDLE)0xdeadbeef, "got unexpected key %p.\n", key);
key = (BCRYPT_KEY_HANDLE)0xdeadbeef;
ret = BCryptGenerateSymmetricKey(aes, &key, buf, len, secret, sizeof(secret) + 1, 0);
- ok(ret == STATUS_INVALID_PARAMETER, "got %08x\n", ret);
+ ok(ret == STATUS_INVALID_PARAMETER, "got %#lx\n", ret);
ok(key == (HANDLE)0xdeadbeef, "got unexpected key %p.\n", key);
ret = BCryptGenerateSymmetricKey(aes, &key, buf, len, secret, sizeof(secret), 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ok(key != NULL, "key not set\n");
ret = BCryptSetProperty(aes, BCRYPT_CHAINING_MODE, (UCHAR *)BCRYPT_CHAIN_MODE_CBC,
sizeof(BCRYPT_CHAIN_MODE_CBC), 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
size = 0;
memset(mode, 0, sizeof(mode));
ret = BCryptGetProperty(key, BCRYPT_CHAINING_MODE, mode, sizeof(mode), &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ok(!lstrcmpW((const WCHAR *)mode, BCRYPT_CHAIN_MODE_CBC), "got %s\n", wine_dbgstr_w((const WCHAR *)mode));
- ok(size == 64, "got %u\n", size);
+ ok(size == 64, "got %lu\n", size);
ret = BCryptSetProperty(key, BCRYPT_CHAINING_MODE, (UCHAR *)BCRYPT_CHAIN_MODE_ECB, 0, 0);
- ok(ret == STATUS_SUCCESS || broken(ret == STATUS_NOT_SUPPORTED) /* < Win 8 */, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS || broken(ret == STATUS_NOT_SUPPORTED) /* < Win 8 */, "got %#lx\n", ret);
if (ret == STATUS_SUCCESS)
{
size = 0;
memset(mode, 0, sizeof(mode));
ret = BCryptGetProperty(key, BCRYPT_CHAINING_MODE, mode, sizeof(mode), &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ok(!lstrcmpW((const WCHAR *)mode, BCRYPT_CHAIN_MODE_ECB), "got %s\n", wine_dbgstr_w((const WCHAR *)mode));
- ok(size == 64, "got %u\n", size);
+ ok(size == 64, "got %lu\n", size);
}
ret = BCryptSetProperty(key, BCRYPT_CHAINING_MODE, (UCHAR *)BCRYPT_CHAIN_MODE_CBC,
sizeof(BCRYPT_CHAIN_MODE_CBC), 0);
- ok(ret == STATUS_SUCCESS || broken(ret == STATUS_NOT_SUPPORTED) /* < Win 8 */, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS || broken(ret == STATUS_NOT_SUPPORTED) /* < Win 8 */, "got %#lx\n", ret);
size = 0xdeadbeef;
ret = BCryptEncrypt(key, NULL, 0, NULL, NULL, 0, NULL, 0, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(!size, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(!size, "got %lu\n", size);
size = 0;
memcpy(ivbuf, iv, sizeof(iv));
ret = BCryptEncrypt(key, data, 16, NULL, ivbuf, 16, NULL, 0, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 16, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 16, "got %lu\n", size);
size = 0;
memcpy(ivbuf, iv, sizeof(iv));
memset(ciphertext, 0, sizeof(ciphertext));
ret = BCryptEncrypt(key, data, 16, NULL, ivbuf, 16, ciphertext, 16, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 16, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 16, "got %lu\n", size);
ok(!memcmp(ciphertext, expected, sizeof(expected)), "wrong data\n");
for (i = 0; i < 16; i++)
- ok(ciphertext[i] == expected[i], "%u: %02x != %02x\n", i, ciphertext[i], expected[i]);
+ ok(ciphertext[i] == expected[i], "%lu: %02x != %02x\n", i, ciphertext[i], expected[i]);
key2 = (void *)0xdeadbeef;
ret = BCryptDuplicateKey(NULL, &key2, NULL, 0, 0);
- ok(ret == STATUS_INVALID_HANDLE, "got %08x\n", ret);
+ ok(ret == STATUS_INVALID_HANDLE, "got %#lx\n", ret);
ok(key2 == (void *)0xdeadbeef, "got %p\n", key2);
if (0) /* crashes on some Windows versions */
{
ret = BCryptDuplicateKey(key, NULL, NULL, 0, 0);
- ok(ret == STATUS_INVALID_PARAMETER, "got %08x\n", ret);
+ ok(ret == STATUS_INVALID_PARAMETER, "got %#lx\n", ret);
}
key2 = (void *)0xdeadbeef;
ret = BCryptDuplicateKey(key, &key2, NULL, 0, 0);
- ok(ret == STATUS_SUCCESS || broken(ret == STATUS_INVALID_PARAMETER), "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS || broken(ret == STATUS_INVALID_PARAMETER), "got %#lx\n", ret);
if (ret == STATUS_SUCCESS)
{
@@ -771,62 +771,62 @@ static void test_BCryptGenerateSymmetricKey(void)
memcpy(ivbuf, iv, sizeof(iv));
memset(ciphertext, 0, sizeof(ciphertext));
ret = BCryptEncrypt(key2, data, 16, NULL, ivbuf, 16, ciphertext, 16, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 16, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 16, "got %lu\n", size);
ok(!memcmp(ciphertext, expected, sizeof(expected)), "wrong data\n");
for (i = 0; i < 16; i++)
- ok(ciphertext[i] == expected[i], "%u: %02x != %02x\n", i, ciphertext[i], expected[i]);
+ ok(ciphertext[i] == expected[i], "%lu: %02x != %02x\n", i, ciphertext[i], expected[i]);
ret = BCryptDestroyKey(key2);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
}
size = 0xdeadbeef;
ret = BCryptDecrypt(key, NULL, 0, NULL, NULL, 0, NULL, 0, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(!size, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(!size, "got %lu\n", size);
size = 0;
memcpy(ivbuf, iv, sizeof(iv));
ret = BCryptDecrypt(key, ciphertext, 16, NULL, ivbuf, 16, NULL, 0, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 16, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 16, "got %lu\n", size);
size = 0;
memcpy(ivbuf, iv, sizeof(iv));
memset(plaintext, 0, sizeof(plaintext));
ret = BCryptDecrypt(key, ciphertext, 16, NULL, ivbuf, 16, plaintext, 16, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 16, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 16, "got %lu\n", size);
ok(!memcmp(plaintext, data, sizeof(data)), "wrong data\n");
memset(mode, 0, sizeof(mode));
ret = BCryptGetProperty(key, BCRYPT_CHAINING_MODE, mode, sizeof(mode), &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ok(!lstrcmpW((const WCHAR *)mode, BCRYPT_CHAIN_MODE_CBC), "wrong mode\n");
len = 0;
size = 0;
ret = BCryptGetProperty(key, BCRYPT_BLOCK_LENGTH, (UCHAR *)&len, sizeof(len), &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(len == 16, "got %u\n", len);
- ok(size == sizeof(len), "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(len == 16, "got %lu\n", len);
+ ok(size == sizeof(len), "got %lu\n", size);
size = 0;
memset(&key_lengths, 0, sizeof(key_lengths));
ret = BCryptGetProperty(aes, BCRYPT_KEY_LENGTHS, (UCHAR*)&key_lengths, sizeof(key_lengths), &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == sizeof(key_lengths), "got %u\n", size);
- ok(key_lengths.dwMinLength == 128, "Expected 128, got %d\n", key_lengths.dwMinLength);
- ok(key_lengths.dwMaxLength == 256, "Expected 256, got %d\n", key_lengths.dwMaxLength);
- ok(key_lengths.dwIncrement == 64, "Expected 64, got %d\n", key_lengths.dwIncrement);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == sizeof(key_lengths), "got %lu\n", size);
+ ok(key_lengths.dwMinLength == 128, "Expected 128, got %lu\n", key_lengths.dwMinLength);
+ ok(key_lengths.dwMaxLength == 256, "Expected 256, got %lu\n", key_lengths.dwMaxLength);
+ ok(key_lengths.dwIncrement == 64, "Expected 64, got %lu\n", key_lengths.dwIncrement);
ret = BCryptDestroyKey(key);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
HeapFree(GetProcessHeap(), 0, buf);
ret = BCryptCloseAlgorithmProvider(aes, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
}
#define RACE_TEST_COUNT 200
@@ -874,8 +874,8 @@ static DWORD WINAPI encrypt_race_thread(void *parameter)
memset(ciphertext, 0xff, sizeof(ciphertext));
memset(tag, 0xff, sizeof(tag));
ret = BCryptEncrypt(key, data2, 32, &auth_info, NULL, 0, ciphertext, 32, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 32, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 32, "got %lu\n", size);
ok(!memcmp(ciphertext, expected4, sizeof(expected4)), "wrong data\n");
ok(!memcmp(tag, expected_tag3, sizeof(expected_tag3)), "wrong tag\n");
for (i = 0; i < 32; i++)
@@ -953,7 +953,7 @@ static void test_BCryptEncrypt(void)
NTSTATUS ret;
ret = BCryptOpenAlgorithmProvider(&aes, BCRYPT_AES_ALGORITHM, NULL, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
/******************
* AES - CBC mode *
@@ -962,37 +962,37 @@ static void test_BCryptEncrypt(void)
len = 0xdeadbeef;
size = sizeof(len);
ret = BCryptGetProperty(aes, BCRYPT_OBJECT_LENGTH, (UCHAR *)&len, sizeof(len), &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
key = NULL;
buf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
ret = BCryptGenerateSymmetricKey(aes, &key, buf, len, secret, sizeof(secret), 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ok(key != NULL, "key not set\n");
/* input size is a multiple of block size */
size = 0;
memcpy(ivbuf, iv, sizeof(iv));
ret = BCryptEncrypt(key, data, 16, NULL, ivbuf, 16, NULL, 0, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 16, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 16, "got %lu\n", size);
size = 0;
memcpy(ivbuf, iv, sizeof(iv));
memset(ciphertext, 0, sizeof(ciphertext));
ret = BCryptEncrypt(key, data, 16, NULL, ivbuf, 16, ciphertext, 16, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 16, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 16, "got %lu\n", size);
ok(!memcmp(ciphertext, expected, sizeof(expected)), "wrong data\n");
for (i = 0; i < 16; i++)
- ok(ciphertext[i] == expected[i], "%u: %02x != %02x\n", i, ciphertext[i], expected[i]);
+ ok(ciphertext[i] == expected[i], "%lu: %02x != %02x\n", i, ciphertext[i], expected[i]);
/* NULL initialization vector */
size = 0;
memset(ciphertext, 0, sizeof(ciphertext));
ret = BCryptEncrypt(key, data, 16, NULL, NULL, 0, ciphertext, 16, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 16, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 16, "got %lu\n", size);
todo_wine ok(!memcmp(ciphertext, expected8, sizeof(expected8)), "wrong data\n");
/* all zero initialization vector */
@@ -1000,103 +1000,103 @@ static void test_BCryptEncrypt(void)
memset(ciphertext, 0, sizeof(ciphertext));
memset(ivbuf, 0, sizeof(ivbuf));
ret = BCryptEncrypt(key, data, 16, NULL, ivbuf, 16, ciphertext, 16, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 16, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 16, "got %lu\n", size);
ok(!memcmp(ciphertext, expected9, sizeof(expected9)), "wrong data\n");
for (i = 0; i < 16; i++)
- ok(ciphertext[i] == expected9[i], "%u: %02x != %02x\n", i, ciphertext[i], expected9[i]);
+ ok(ciphertext[i] == expected9[i], "%lu: %02x != %02x\n", i, ciphertext[i], expected9[i]);
/* input size is not a multiple of block size */
size = 0;
memcpy(ivbuf, iv, sizeof(iv));
ret = BCryptEncrypt(key, data, 17, NULL, ivbuf, 16, NULL, 0, &size, 0);
- ok(ret == STATUS_INVALID_BUFFER_SIZE, "got %08x\n", ret);
- ok(size == 17, "got %u\n", size);
+ ok(ret == STATUS_INVALID_BUFFER_SIZE, "got %#lx\n", ret);
+ ok(size == 17, "got %lu\n", size);
/* input size is not a multiple of block size, block padding set */
size = 0;
memcpy(ivbuf, iv, sizeof(iv));
ret = BCryptEncrypt(key, data, 17, NULL, ivbuf, 16, NULL, 0, &size, BCRYPT_BLOCK_PADDING);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 32, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 32, "got %lu\n", size);
size = 0;
memcpy(ivbuf, iv, sizeof(iv));
memset(ciphertext, 0, sizeof(ciphertext));
ret = BCryptEncrypt(key, data, 17, NULL, ivbuf, 16, ciphertext, 32, &size, BCRYPT_BLOCK_PADDING);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 32, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 32, "got %lu\n", size);
ok(!memcmp(ciphertext, expected2, sizeof(expected2)), "wrong data\n");
for (i = 0; i < 32; i++)
- ok(ciphertext[i] == expected2[i], "%u: %02x != %02x\n", i, ciphertext[i], expected2[i]);
+ ok(ciphertext[i] == expected2[i], "%lu: %02x != %02x\n", i, ciphertext[i], expected2[i]);
/* input size is a multiple of block size, block padding set */
size = 0;
memcpy(ivbuf, iv, sizeof(iv));
ret = BCryptEncrypt(key, data2, 32, NULL, ivbuf, 16, NULL, 0, &size, BCRYPT_BLOCK_PADDING);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 48, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 48, "got %lu\n", size);
size = 0;
memcpy(ivbuf, iv, sizeof(iv));
memset(ciphertext, 0, sizeof(ciphertext));
ret = BCryptEncrypt(key, data2, 32, NULL, ivbuf, 16, ciphertext, 48, &size, BCRYPT_BLOCK_PADDING);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 48, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 48, "got %lu\n", size);
ok(!memcmp(ciphertext, expected3, sizeof(expected3)), "wrong data\n");
for (i = 0; i < 48; i++)
- ok(ciphertext[i] == expected3[i], "%u: %02x != %02x\n", i, ciphertext[i], expected3[i]);
+ ok(ciphertext[i] == expected3[i], "%lu: %02x != %02x\n", i, ciphertext[i], expected3[i]);
/* output size too small */
size = 0;
memcpy(ivbuf, iv, sizeof(iv));
memset(ciphertext, 0, sizeof(ciphertext));
ret = BCryptEncrypt(key, data, 17, NULL, ivbuf, 16, ciphertext, 31, &size, BCRYPT_BLOCK_PADDING);
- ok(ret == STATUS_BUFFER_TOO_SMALL, "got %08x\n", ret);
- ok(size == 32, "got %u\n", size);
+ ok(ret == STATUS_BUFFER_TOO_SMALL, "got %#lx\n", ret);
+ ok(size == 32, "got %lu\n", size);
size = 0;
memcpy(ivbuf, iv, sizeof(iv));
memset(ciphertext, 0, sizeof(ciphertext));
ret = BCryptEncrypt(key, data2, 32, NULL, ivbuf, 16, ciphertext, 32, &size, BCRYPT_BLOCK_PADDING);
- ok(ret == STATUS_BUFFER_TOO_SMALL, "got %08x\n", ret);
- ok(size == 48, "got %u\n", size);
+ ok(ret == STATUS_BUFFER_TOO_SMALL, "got %#lx\n", ret);
+ ok(size == 48, "got %lu\n", size);
ret = BCryptDestroyKey(key);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
HeapFree(GetProcessHeap(), 0, buf);
/* 256 bit key */
buf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
ret = BCryptGenerateSymmetricKey(aes, &key, buf, len, secret256, sizeof(secret256), 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ret = BCryptDestroyKey(key);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
/* Key generations succeeds if the key size exceeds maximum and uses maximum key length
* from secret. */
ret = BCryptGenerateSymmetricKey(aes, &key, buf, len, secret256, sizeof(secret256) + 1, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
size = 0;
memcpy(ivbuf, iv, sizeof(iv));
ret = BCryptEncrypt(key, data2, 32, NULL, ivbuf, 16, NULL, 0, &size, BCRYPT_BLOCK_PADDING);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 48, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 48, "got %lu\n", size);
size = 0;
memcpy(ivbuf, iv, sizeof(iv));
memset(ciphertext, 0, sizeof(ciphertext));
ret = BCryptEncrypt(key, data2, 32, NULL, ivbuf, 16, ciphertext, 48, &size, BCRYPT_BLOCK_PADDING);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 48, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 48, "got %lu\n", size);
ok(!memcmp(ciphertext, expected10, sizeof(expected10)), "wrong data\n");
for (i = 0; i < 48; i++)
- ok(ciphertext[i] == expected10[i], "%u: %02x != %02x\n", i, ciphertext[i], expected10[i]);
+ ok(ciphertext[i] == expected10[i], "%lu: %02x != %02x\n", i, ciphertext[i], expected10[i]);
ret = BCryptDestroyKey(key);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
HeapFree(GetProcessHeap(), 0, buf);
/******************
@@ -1105,38 +1105,38 @@ static void test_BCryptEncrypt(void)
size = 0;
ret = BCryptGetProperty(aes, BCRYPT_AUTH_TAG_LENGTH, NULL, 0, &size, 0);
- ok(ret == STATUS_NOT_SUPPORTED, "got %08x\n", ret);
+ ok(ret == STATUS_NOT_SUPPORTED, "got %#lx\n", ret);
ret = BCryptSetProperty(aes, BCRYPT_CHAINING_MODE, (UCHAR*)BCRYPT_CHAIN_MODE_GCM, sizeof(BCRYPT_CHAIN_MODE_GCM), 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
size = 0;
ret = BCryptGetProperty(aes, BCRYPT_AUTH_TAG_LENGTH, NULL, 0, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == sizeof(tag_length), "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == sizeof(tag_length), "got %lu\n", size);
size = 0;
memset(&tag_length, 0, sizeof(tag_length));
ret = BCryptGetProperty(aes, BCRYPT_AUTH_TAG_LENGTH, (UCHAR*)&tag_length, sizeof(tag_length), &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == sizeof(tag_length), "got %u\n", size);
- ok(tag_length.dwMinLength == 12, "Expected 12, got %d\n", tag_length.dwMinLength);
- ok(tag_length.dwMaxLength == 16, "Expected 16, got %d\n", tag_length.dwMaxLength);
- ok(tag_length.dwIncrement == 1, "Expected 1, got %d\n", tag_length.dwIncrement);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == sizeof(tag_length), "got %lu\n", size);
+ ok(tag_length.dwMinLength == 12, "Expected 12, got %lu\n", tag_length.dwMinLength);
+ ok(tag_length.dwMaxLength == 16, "Expected 16, got %lu\n", tag_length.dwMaxLength);
+ ok(tag_length.dwIncrement == 1, "Expected 1, got %lu\n", tag_length.dwIncrement);
len = 0xdeadbeef;
size = sizeof(len);
ret = BCryptGetProperty(aes, BCRYPT_OBJECT_LENGTH, (UCHAR *)&len, sizeof(len), &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
key = NULL;
buf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
ret = BCryptGenerateSymmetricKey(aes, &key, buf, len, secret, sizeof(secret), 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ok(key != NULL, "key not set\n");
ret = BCryptGetProperty(key, BCRYPT_AUTH_TAG_LENGTH, (UCHAR*)&tag_length, sizeof(tag_length), &size, 0);
- ok(ret == STATUS_NOT_SUPPORTED, "got %08x\n", ret);
+ ok(ret == STATUS_NOT_SUPPORTED, "got %#lx\n", ret);
memset(&auth_info, 0, sizeof(auth_info));
auth_info.cbSize = sizeof(auth_info);
@@ -1152,28 +1152,28 @@ static void test_BCryptEncrypt(void)
memset(ciphertext, 0xff, sizeof(ciphertext));
memset(tag, 0xff, sizeof(tag));
ret = BCryptEncrypt(key, data2, 32, &auth_info, ivbuf, 16, ciphertext, 32, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 32, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 32, "got %lu\n", size);
ok(!memcmp(ciphertext, expected4, sizeof(expected4)), "wrong data\n");
ok(!memcmp(tag, expected_tag, sizeof(expected_tag)), "wrong tag\n");
for (i = 0; i < 32; i++)
- ok(ciphertext[i] == expected4[i], "%u: %02x != %02x\n", i, ciphertext[i], expected4[i]);
+ ok(ciphertext[i] == expected4[i], "%lu: %02x != %02x\n", i, ciphertext[i], expected4[i]);
for (i = 0; i < 16; i++)
- ok(tag[i] == expected_tag[i], "%u: %02x != %02x\n", i, tag[i], expected_tag[i]);
+ ok(tag[i] == expected_tag[i], "%lu: %02x != %02x\n", i, tag[i], expected_tag[i]);
/* NULL initialization vector */
size = 0;
memset(ciphertext, 0xff, sizeof(ciphertext));
memset(tag, 0xff, sizeof(tag));
ret = BCryptEncrypt(key, data2, 32, &auth_info, NULL, 0, ciphertext, 32, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 32, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 32, "got %lu\n", size);
ok(!memcmp(ciphertext, expected4, sizeof(expected4)), "wrong data\n");
ok(!memcmp(tag, expected_tag, sizeof(expected_tag)), "wrong tag\n");
for (i = 0; i < 32; i++)
- ok(ciphertext[i] == expected4[i], "%u: %02x != %02x\n", i, ciphertext[i], expected4[i]);
+ ok(ciphertext[i] == expected4[i], "%lu: %02x != %02x\n", i, ciphertext[i], expected4[i]);
for (i = 0; i < 16; i++)
- ok(tag[i] == expected_tag[i], "%u: %02x != %02x\n", i, tag[i], expected_tag[i]);
+ ok(tag[i] == expected_tag[i], "%lu: %02x != %02x\n", i, tag[i], expected_tag[i]);
/* all zero initialization vector */
size = 0;
@@ -1181,14 +1181,14 @@ static void test_BCryptEncrypt(void)
memset(tag, 0xff, sizeof(tag));
memset(ivbuf, 0, sizeof(ivbuf));
ret = BCryptEncrypt(key, data2, 32, &auth_info, ivbuf, 16, ciphertext, 32, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 32, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 32, "got %lu\n", size);
ok(!memcmp(ciphertext, expected4, sizeof(expected4)), "wrong data\n");
ok(!memcmp(tag, expected_tag, sizeof(expected_tag)), "wrong tag\n");
for (i = 0; i < 32; i++)
- ok(ciphertext[i] == expected4[i], "%u: %02x != %02x\n", i, ciphertext[i], expected4[i]);
+ ok(ciphertext[i] == expected4[i], "%lu: %02x != %02x\n", i, ciphertext[i], expected4[i]);
for (i = 0; i < 16; i++)
- ok(tag[i] == expected_tag[i], "%u: %02x != %02x\n", i, tag[i], expected_tag[i]);
+ ok(tag[i] == expected_tag[i], "%lu: %02x != %02x\n", i, tag[i], expected_tag[i]);
/* input size is not multiple of block size */
size = 0;
@@ -1196,14 +1196,14 @@ static void test_BCryptEncrypt(void)
memset(ciphertext, 0xff, sizeof(ciphertext));
memset(tag, 0xff, sizeof(tag));
ret = BCryptEncrypt(key, data2, 24, &auth_info, ivbuf, 16, ciphertext, 24, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 24, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 24, "got %lu\n", size);
ok(!memcmp(ciphertext, expected4, 24), "wrong data\n");
ok(!memcmp(tag, expected_tag2, sizeof(expected_tag2)), "wrong tag\n");
for (i = 0; i < 24; i++)
- ok(ciphertext[i] == expected4[i], "%u: %02x != %02x\n", i, ciphertext[i], expected4[i]);
+ ok(ciphertext[i] == expected4[i], "%lu: %02x != %02x\n", i, ciphertext[i], expected4[i]);
for (i = 0; i < 16; i++)
- ok(tag[i] == expected_tag2[i], "%u: %02x != %02x\n", i, tag[i], expected_tag2[i]);
+ ok(tag[i] == expected_tag2[i], "%lu: %02x != %02x\n", i, tag[i], expected_tag2[i]);
/* test with auth data */
auth_info.pbAuthData = auth_data;
@@ -1214,40 +1214,40 @@ static void test_BCryptEncrypt(void)
memset(ciphertext, 0xff, sizeof(ciphertext));
memset(tag, 0xff, sizeof(tag));
ret = BCryptEncrypt(key, data2, 32, &auth_info, ivbuf, 16, ciphertext, 32, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 32, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 32, "got %lu\n", size);
ok(!memcmp(ciphertext, expected4, sizeof(expected4)), "wrong data\n");
ok(!memcmp(tag, expected_tag3, sizeof(expected_tag3)), "wrong tag\n");
for (i = 0; i < 32; i++)
- ok(ciphertext[i] == expected4[i], "%u: %02x != %02x\n", i, ciphertext[i], expected4[i]);
+ ok(ciphertext[i] == expected4[i], "%lu: %02x != %02x\n", i, ciphertext[i], expected4[i]);
for (i = 0; i < 16; i++)
- ok(tag[i] == expected_tag3[i], "%u: %02x != %02x\n", i, tag[i], expected_tag3[i]);
+ ok(tag[i] == expected_tag3[i], "%lu: %02x != %02x\n", i, tag[i], expected_tag3[i]);
memset(tag, 0xff, sizeof(tag));
ret = BCryptEncrypt(key, data2, 0, &auth_info, ivbuf, 16, NULL, 0, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(!size, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(!size, "got %lu\n", size);
for (i = 0; i < 16; i++)
- ok(tag[i] == 0xff, "%u: %02x != %02x\n", i, tag[i], 0xff);
+ ok(tag[i] == 0xff, "%lu: %02x != %02x\n", i, tag[i], 0xff);
memset(tag, 0xff, sizeof(tag));
ret = BCryptEncrypt(key, NULL, 0, &auth_info, ivbuf, 16, NULL, 0, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(!size, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(!size, "got %lu\n", size);
ok(!memcmp(tag, expected_tag4, sizeof(expected_tag4)), "wrong tag\n");
for (i = 0; i < 16; i++)
- ok(tag[i] == expected_tag4[i], "%u: %02x != %02x\n", i, tag[i], expected_tag4[i]);
+ ok(tag[i] == expected_tag4[i], "%lu: %02x != %02x\n", i, tag[i], expected_tag4[i]);
/* test with padding */
memcpy(ivbuf, iv, sizeof(iv));
memset(ciphertext, 0, sizeof(ciphertext));
ret = BCryptEncrypt(key, data2, 32, &auth_info, ivbuf, 16, ciphertext, 32, &size, BCRYPT_BLOCK_PADDING);
- todo_wine ok(ret == STATUS_BUFFER_TOO_SMALL, "got %08x\n", ret);
+ todo_wine ok(ret == STATUS_BUFFER_TOO_SMALL, "got %#lx\n", ret);
memcpy(ivbuf, iv, sizeof(iv));
memset(ciphertext, 0, sizeof(ciphertext));
ret = BCryptEncrypt(key, data2, 32, &auth_info, ivbuf, 16, ciphertext, 48, &size, BCRYPT_BLOCK_PADDING);
- ok(ret == STATUS_INVALID_PARAMETER, "got %08x\n", ret);
+ ok(ret == STATUS_INVALID_PARAMETER, "got %#lx\n", ret);
/* race test */
@@ -1263,20 +1263,20 @@ static void test_BCryptEncrypt(void)
memset(ciphertext, 0xff, sizeof(ciphertext));
memset(tag, 0xff, sizeof(tag));
ret = BCryptEncrypt(key, data2, 32, &auth_info, NULL, 0, ciphertext, 32, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 32, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 32, "got %lu\n", size);
ok(!memcmp(ciphertext, expected4, sizeof(expected4)), "wrong data\n");
ok(!memcmp(tag, expected_tag3, sizeof(expected_tag2)), "wrong tag\n");
for (i = 0; i < 32; i++)
- ok(ciphertext[i] == expected4[i], "%u: %02x != %02x\n", i, ciphertext[i], expected4[i]);
+ ok(ciphertext[i] == expected4[i], "%lu: %02x != %02x\n", i, ciphertext[i], expected4[i]);
for (i = 0; i < 16; i++)
- ok(tag[i] == expected_tag3[i], "%u: %02x != %02x\n", i, tag[i], expected_tag3[i]);
+ ok(tag[i] == expected_tag3[i], "%lu: %02x != %02x\n", i, tag[i], expected_tag3[i]);
}
WaitForSingleObject(hthread, INFINITE);
ret = BCryptDestroyKey(key);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
HeapFree(GetProcessHeap(), 0, buf);
/******************
@@ -1284,94 +1284,94 @@ static void test_BCryptEncrypt(void)
******************/
ret = BCryptSetProperty(aes, BCRYPT_CHAINING_MODE, (UCHAR*)BCRYPT_CHAIN_MODE_ECB, sizeof(BCRYPT_CHAIN_MODE_ECB), 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
len = 0xdeadbeef;
size = sizeof(len);
ret = BCryptGetProperty(aes, BCRYPT_OBJECT_LENGTH, (UCHAR *)&len, sizeof(len), &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
buf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
ret = BCryptGenerateSymmetricKey(aes, &key, buf, len, secret, sizeof(secret), 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
/* initialization vector is not allowed */
size = 0;
memcpy(ivbuf, iv, sizeof(iv));
ret = BCryptEncrypt(key, data, 16, NULL, ivbuf, 16, ciphertext, 16, &size, 0);
- ok(ret == STATUS_INVALID_PARAMETER, "got %08x\n", ret);
- ok(size == 16, "got %u\n", size);
+ ok(ret == STATUS_INVALID_PARAMETER, "got %#lx\n", ret);
+ ok(size == 16, "got %lu\n", size);
/* input size is a multiple of block size */
size = 0;
ret = BCryptEncrypt(key, data, 16, NULL, NULL, 16, NULL, 0, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 16, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 16, "got %lu\n", size);
size = 0;
memset(ciphertext, 0, sizeof(ciphertext));
ret = BCryptEncrypt(key, data, 16, NULL, NULL, 16, ciphertext, 16, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 16, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 16, "got %lu\n", size);
ok(!memcmp(ciphertext, expected5, sizeof(expected5)), "wrong data\n");
for (i = 0; i < 16; i++)
- ok(ciphertext[i] == expected5[i], "%u: %02x != %02x\n", i, ciphertext[i], expected5[i]);
+ ok(ciphertext[i] == expected5[i], "%lu: %02x != %02x\n", i, ciphertext[i], expected5[i]);
/* input size is not a multiple of block size */
size = 0;
ret = BCryptEncrypt(key, data, 17, NULL, NULL, 16, NULL, 0, &size, 0);
- ok(ret == STATUS_INVALID_BUFFER_SIZE, "got %08x\n", ret);
- ok(size == 17, "got %u\n", size);
+ ok(ret == STATUS_INVALID_BUFFER_SIZE, "got %#lx\n", ret);
+ ok(size == 17, "got %lu\n", size);
/* input size is not a multiple of block size, block padding set */
size = 0;
ret = BCryptEncrypt(key, data, 17, NULL, NULL, 16, NULL, 0, &size, BCRYPT_BLOCK_PADDING);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 32, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 32, "got %lu\n", size);
size = 0;
memset(ciphertext, 0, sizeof(ciphertext));
ret = BCryptEncrypt(key, data, 17, NULL, NULL, 16, ciphertext, 32, &size, BCRYPT_BLOCK_PADDING);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 32, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 32, "got %lu\n", size);
ok(!memcmp(ciphertext, expected6, sizeof(expected6)), "wrong data\n");
for (i = 0; i < 32; i++)
- ok(ciphertext[i] == expected6[i], "%u: %02x != %02x\n", i, ciphertext[i], expected6[i]);
+ ok(ciphertext[i] == expected6[i], "%lu: %02x != %02x\n", i, ciphertext[i], expected6[i]);
/* input size is a multiple of block size, block padding set */
size = 0;
ret = BCryptEncrypt(key, data2, 32, NULL, NULL, 16, NULL, 0, &size, BCRYPT_BLOCK_PADDING);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 48, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 48, "got %lu\n", size);
size = 0;
memset(ciphertext, 0, sizeof(ciphertext));
ret = BCryptEncrypt(key, data2, 32, NULL, NULL, 16, ciphertext, 48, &size, BCRYPT_BLOCK_PADDING);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 48, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 48, "got %lu\n", size);
ok(!memcmp(ciphertext, expected7, sizeof(expected7)), "wrong data\n");
for (i = 0; i < 48; i++)
- ok(ciphertext[i] == expected7[i], "%u: %02x != %02x\n", i, ciphertext[i], expected7[i]);
+ ok(ciphertext[i] == expected7[i], "%lu: %02x != %02x\n", i, ciphertext[i], expected7[i]);
/* output size too small */
size = 0;
memset(ciphertext, 0, sizeof(ciphertext));
ret = BCryptEncrypt(key, data, 17, NULL, NULL, 16, ciphertext, 31, &size, BCRYPT_BLOCK_PADDING);
- ok(ret == STATUS_BUFFER_TOO_SMALL, "got %08x\n", ret);
- ok(size == 32, "got %u\n", size);
+ ok(ret == STATUS_BUFFER_TOO_SMALL, "got %#lx\n", ret);
+ ok(size == 32, "got %lu\n", size);
size = 0;
memset(ciphertext, 0, sizeof(ciphertext));
ret = BCryptEncrypt(key, data2, 32, NULL, NULL, 16, ciphertext, 32, &size, BCRYPT_BLOCK_PADDING);
- ok(ret == STATUS_BUFFER_TOO_SMALL, "got %08x\n", ret);
- ok(size == 48, "got %u\n", size);
+ ok(ret == STATUS_BUFFER_TOO_SMALL, "got %#lx\n", ret);
+ ok(size == 48, "got %lu\n", size);
ret = BCryptDestroyKey(key);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
HeapFree(GetProcessHeap(), 0, buf);
ret = BCryptCloseAlgorithmProvider(aes, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
}
static void test_BCryptDecrypt(void)
@@ -1425,16 +1425,16 @@ static void test_BCryptDecrypt(void)
NTSTATUS ret;
ret = BCryptOpenAlgorithmProvider(&aes, BCRYPT_AES_ALGORITHM, NULL, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
size = 0;
memset(&key_lengths, 0, sizeof(key_lengths));
ret = BCryptGetProperty(aes, BCRYPT_KEY_LENGTHS, (UCHAR*)&key_lengths, sizeof(key_lengths), &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == sizeof(key_lengths), "got %u\n", size);
- ok(key_lengths.dwMinLength == 128, "Expected 128, got %d\n", key_lengths.dwMinLength);
- ok(key_lengths.dwMaxLength == 256, "Expected 256, got %d\n", key_lengths.dwMaxLength);
- ok(key_lengths.dwIncrement == 64, "Expected 64, got %d\n", key_lengths.dwIncrement);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == sizeof(key_lengths), "got %lu\n", size);
+ ok(key_lengths.dwMinLength == 128, "Expected 128, got %lu\n", key_lengths.dwMinLength);
+ ok(key_lengths.dwMaxLength == 256, "Expected 256, got %lu\n", key_lengths.dwMaxLength);
+ ok(key_lengths.dwIncrement == 64, "Expected 64, got %lu\n", key_lengths.dwIncrement);
/******************
* AES - CBC mode *
@@ -1443,100 +1443,100 @@ static void test_BCryptDecrypt(void)
len = 0xdeadbeef;
size = sizeof(len);
ret = BCryptGetProperty(aes, BCRYPT_OBJECT_LENGTH, (UCHAR *)&len, sizeof(len), &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
key = NULL;
buf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
ret = BCryptGenerateSymmetricKey(aes, &key, buf, len, secret, sizeof(secret), 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ok(key != NULL, "key not set\n");
/* input size is a multiple of block size */
size = 0;
memcpy(ivbuf, iv, sizeof(iv));
ret = BCryptDecrypt(key, ciphertext, 32, NULL, ivbuf, 16, NULL, 0, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 32, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 32, "got %lu\n", size);
size = 0;
memcpy(ivbuf, iv, sizeof(iv));
memset(plaintext, 0, sizeof(plaintext));
ret = BCryptDecrypt(key, ciphertext, 32, NULL, ivbuf, 16, plaintext, 32, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 32, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 32, "got %lu\n", size);
ok(!memcmp(plaintext, expected, sizeof(expected)), "wrong data\n");
/* test with padding smaller than block size */
size = 0;
memcpy(ivbuf, iv, sizeof(iv));
ret = BCryptDecrypt(key, ciphertext2, 32, NULL, ivbuf, 16, NULL, 0, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 32, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 32, "got %lu\n", size);
size = 0;
memcpy(ivbuf, iv, sizeof(iv));
memset(plaintext, 0, sizeof(plaintext));
ret = BCryptDecrypt(key, ciphertext2, 32, NULL, ivbuf, 16, plaintext, 17, &size, BCRYPT_BLOCK_PADDING);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 17, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 17, "got %lu\n", size);
ok(!memcmp(plaintext, expected2, sizeof(expected2)), "wrong data\n");
/* test with padding of block size */
size = 0;
memcpy(ivbuf, iv, sizeof(iv));
ret = BCryptDecrypt(key, ciphertext3, 48, NULL, ivbuf, 16, NULL, 0, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 48, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 48, "got %lu\n", size);
size = 0;
memcpy(ivbuf, iv, sizeof(iv));
memset(plaintext, 0, sizeof(plaintext));
ret = BCryptDecrypt(key, ciphertext3, 48, NULL, ivbuf, 16, plaintext, 32, &size, BCRYPT_BLOCK_PADDING);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 32, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 32, "got %lu\n", size);
ok(!memcmp(plaintext, expected3, sizeof(expected3)), "wrong data\n");
/* output size too small */
size = 0;
memcpy(ivbuf, iv, sizeof(iv));
ret = BCryptDecrypt(key, ciphertext, 32, NULL, ivbuf, 16, plaintext, 31, &size, 0);
- ok(ret == STATUS_BUFFER_TOO_SMALL, "got %08x\n", ret);
- ok(size == 32, "got %u\n", size);
+ ok(ret == STATUS_BUFFER_TOO_SMALL, "got %#lx\n", ret);
+ ok(size == 32, "got %lu\n", size);
size = 0;
memcpy(ivbuf, iv, sizeof(iv));
ret = BCryptDecrypt(key, ciphertext2, 32, NULL, ivbuf, 16, plaintext, 15, &size, BCRYPT_BLOCK_PADDING);
- ok(ret == STATUS_BUFFER_TOO_SMALL, "got %08x\n", ret);
- ok(size == 32, "got %u\n", size);
+ ok(ret == STATUS_BUFFER_TOO_SMALL, "got %#lx\n", ret);
+ ok(size == 32, "got %lu\n", size);
size = 0;
memcpy(ivbuf, iv, sizeof(iv));
ret = BCryptDecrypt(key, ciphertext2, 32, NULL, ivbuf, 16, plaintext, 16, &size, BCRYPT_BLOCK_PADDING);
- ok(ret == STATUS_BUFFER_TOO_SMALL, "got %08x\n", ret);
- ok(size == 17, "got %u\n", size);
+ ok(ret == STATUS_BUFFER_TOO_SMALL, "got %#lx\n", ret);
+ ok(size == 17, "got %lu\n", size);
size = 0;
memcpy(ivbuf, iv, sizeof(iv));
ret = BCryptDecrypt(key, ciphertext3, 48, NULL, ivbuf, 16, plaintext, 31, &size, BCRYPT_BLOCK_PADDING);
- ok(ret == STATUS_BUFFER_TOO_SMALL, "got %08x\n", ret);
- ok(size == 48, "got %u\n", size);
+ ok(ret == STATUS_BUFFER_TOO_SMALL, "got %#lx\n", ret);
+ ok(size == 48, "got %lu\n", size);
/* input size is not a multiple of block size */
size = 0;
memcpy(ivbuf, iv, sizeof(iv));
ret = BCryptDecrypt(key, ciphertext, 17, NULL, ivbuf, 16, NULL, 0, &size, 0);
- ok(ret == STATUS_INVALID_BUFFER_SIZE, "got %08x\n", ret);
- ok(size == 17 || broken(size == 0 /* Win < 7 */), "got %u\n", size);
+ ok(ret == STATUS_INVALID_BUFFER_SIZE, "got %#lx\n", ret);
+ ok(size == 17 || broken(size == 0 /* Win < 7 */), "got %lu\n", size);
/* input size is not a multiple of block size, block padding set */
size = 0;
memcpy(ivbuf, iv, sizeof(iv));
ret = BCryptDecrypt(key, ciphertext, 17, NULL, ivbuf, 16, NULL, 0, &size, BCRYPT_BLOCK_PADDING);
- ok(ret == STATUS_INVALID_BUFFER_SIZE, "got %08x\n", ret);
- ok(size == 17 || broken(size == 0 /* Win < 7 */), "got %u\n", size);
+ ok(ret == STATUS_INVALID_BUFFER_SIZE, "got %#lx\n", ret);
+ ok(size == 17 || broken(size == 0 /* Win < 7 */), "got %lu\n", size);
ret = BCryptDestroyKey(key);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
HeapFree(GetProcessHeap(), 0, buf);
/******************
@@ -1544,16 +1544,16 @@ static void test_BCryptDecrypt(void)
******************/
ret = BCryptSetProperty(aes, BCRYPT_CHAINING_MODE, (UCHAR*)BCRYPT_CHAIN_MODE_GCM, sizeof(BCRYPT_CHAIN_MODE_GCM), 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
key = NULL;
buf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
ret = BCryptGenerateSymmetricKey(aes, &key, buf, len, secret, sizeof(secret), 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ok(key != NULL, "key not set\n");
ret = BCryptGetProperty(key, BCRYPT_AUTH_TAG_LENGTH, (UCHAR*)&tag_lengths, sizeof(tag_lengths), &size, 0);
- ok(ret == STATUS_NOT_SUPPORTED, "got %08x\n", ret);
+ ok(ret == STATUS_NOT_SUPPORTED, "got %#lx\n", ret);
memset(&auth_info, 0, sizeof(auth_info));
auth_info.cbSize = sizeof(auth_info);
@@ -1568,8 +1568,8 @@ static void test_BCryptDecrypt(void)
memcpy(ivbuf, iv, sizeof(iv));
memset(plaintext, 0, sizeof(plaintext));
ret = BCryptDecrypt(key, ciphertext4, 32, &auth_info, ivbuf, 16, plaintext, 32, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 32, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 32, "got %lu\n", size);
ok(!memcmp(plaintext, expected3, sizeof(expected3)), "wrong data\n");
/* test with auth data */
@@ -1582,19 +1582,19 @@ static void test_BCryptDecrypt(void)
memcpy(ivbuf, iv, sizeof(iv));
memset(plaintext, 0, sizeof(plaintext));
ret = BCryptDecrypt(key, ciphertext4, 32, &auth_info, ivbuf, 16, plaintext, 32, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 32, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 32, "got %lu\n", size);
ok(!memcmp(plaintext, expected3, sizeof(expected3)), "wrong data\n");
/* test with wrong tag */
memcpy(ivbuf, iv, sizeof(iv));
auth_info.pbTag = iv; /* wrong tag */
ret = BCryptDecrypt(key, ciphertext4, 32, &auth_info, ivbuf, 16, plaintext, 32, &size, 0);
- ok(ret == STATUS_AUTH_TAG_MISMATCH, "got %08x\n", ret);
- ok(size == 32, "got %u\n", size);
+ ok(ret == STATUS_AUTH_TAG_MISMATCH, "got %#lx\n", ret);
+ ok(size == 32, "got %lu\n", size);
ret = BCryptDestroyKey(key);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
HeapFree(GetProcessHeap(), 0, buf);
/******************
@@ -1602,114 +1602,114 @@ static void test_BCryptDecrypt(void)
******************/
ret = BCryptSetProperty(aes, BCRYPT_CHAINING_MODE, (UCHAR*)BCRYPT_CHAIN_MODE_ECB, sizeof(BCRYPT_CHAIN_MODE_ECB), 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
len = 0xdeadbeef;
size = sizeof(len);
ret = BCryptGetProperty(aes, BCRYPT_OBJECT_LENGTH, (UCHAR *)&len, sizeof(len), &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
buf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
ret = BCryptGenerateSymmetricKey(aes, &key, buf, len, secret, sizeof(secret), 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
/* initialization vector is not allowed */
size = 0;
memcpy(ivbuf, iv, sizeof(iv));
ret = BCryptDecrypt(key, ciphertext5, 32, NULL, ivbuf, 16, plaintext, 32, &size, 0);
- ok(ret == STATUS_INVALID_PARAMETER, "got %08x\n", ret);
- ok(size == 32, "got %u\n", size);
+ ok(ret == STATUS_INVALID_PARAMETER, "got %#lx\n", ret);
+ ok(size == 32, "got %lu\n", size);
/* input size is a multiple of block size */
size = 0;
ret = BCryptDecrypt(key, ciphertext5, 32, NULL, NULL, 16, NULL, 0, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 32, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 32, "got %lu\n", size);
size = 0;
memset(plaintext, 0, sizeof(plaintext));
ret = BCryptDecrypt(key, ciphertext5, 32, NULL, NULL, 16, plaintext, 32, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 32, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 32, "got %lu\n", size);
ok(!memcmp(plaintext, expected, sizeof(expected)), "wrong data\n");
/* test with padding smaller than block size */
size = 0;
ret = BCryptDecrypt(key, ciphertext5, 32, NULL, NULL, 16, NULL, 0, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 32, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 32, "got %lu\n", size);
size = 0;
memset(plaintext, 0, sizeof(plaintext));
ret = BCryptDecrypt(key, ciphertext5, 32, NULL, NULL, 16, plaintext, 17, &size, BCRYPT_BLOCK_PADDING);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 17, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 17, "got %lu\n", size);
ok(!memcmp(plaintext, expected2, sizeof(expected2)), "wrong data\n");
/* test with padding of block size */
size = 0;
ret = BCryptDecrypt(key, ciphertext6, 48, NULL, NULL, 16, NULL, 0, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 48, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 48, "got %lu\n", size);
size = 0;
memset(plaintext, 0, sizeof(plaintext));
ret = BCryptDecrypt(key, ciphertext6, 48, NULL, NULL, 16, plaintext, 32, &size, BCRYPT_BLOCK_PADDING);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == 32, "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == 32, "got %lu\n", size);
ok(!memcmp(plaintext, expected3, sizeof(expected3)), "wrong data\n");
/* output size too small */
size = 0;
ret = BCryptDecrypt(key, ciphertext4, 32, NULL, NULL, 16, plaintext, 31, &size, 0);
- ok(ret == STATUS_BUFFER_TOO_SMALL, "got %08x\n", ret);
- ok(size == 32, "got %u\n", size);
+ ok(ret == STATUS_BUFFER_TOO_SMALL, "got %#lx\n", ret);
+ ok(size == 32, "got %lu\n", size);
size = 0;
ret = BCryptDecrypt(key, ciphertext5, 32, NULL, NULL, 16, plaintext, 15, &size, BCRYPT_BLOCK_PADDING);
- ok(ret == STATUS_BUFFER_TOO_SMALL, "got %08x\n", ret);
- ok(size == 32, "got %u\n", size);
+ ok(ret == STATUS_BUFFER_TOO_SMALL, "got %#lx\n", ret);
+ ok(size == 32, "got %lu\n", size);
size = 0;
ret = BCryptDecrypt(key, ciphertext5, 32, NULL, NULL, 16, plaintext, 16, &size, BCRYPT_BLOCK_PADDING);
- ok(ret == STATUS_BUFFER_TOO_SMALL, "got %08x\n", ret);
- ok(size == 17, "got %u\n", size);
+ ok(ret == STATUS_BUFFER_TOO_SMALL, "got %#lx\n", ret);
+ ok(size == 17, "got %lu\n", size);
size = 0;
ret = BCryptDecrypt(key, ciphertext6, 48, NULL, NULL, 16, plaintext, 31, &size, BCRYPT_BLOCK_PADDING);
- ok(ret == STATUS_BUFFER_TOO_SMALL, "got %08x\n", ret);
- ok(size == 48, "got %u\n", size);
+ ok(ret == STATUS_BUFFER_TOO_SMALL, "got %#lx\n", ret);
+ ok(size == 48, "got %lu\n", size);
/* input size is not a multiple of block size */
size = 0;
ret = BCryptDecrypt(key, ciphertext4, 17, NULL, NULL, 16, NULL, 0, &size, 0);
- ok(ret == STATUS_INVALID_BUFFER_SIZE, "got %08x\n", ret);
- ok(size == 17 || broken(size == 0 /* Win < 7 */), "got %u\n", size);
+ ok(ret == STATUS_INVALID_BUFFER_SIZE, "got %#lx\n", ret);
+ ok(size == 17 || broken(size == 0 /* Win < 7 */), "got %lu\n", size);
/* input size is not a multiple of block size, block padding set */
size = 0;
ret = BCryptDecrypt(key, ciphertext4, 17, NULL, NULL, 16, NULL, 0, &size, BCRYPT_BLOCK_PADDING);
- ok(ret == STATUS_INVALID_BUFFER_SIZE, "got %08x\n", ret);
- ok(size == 17 || broken(size == 0 /* Win < 7 */), "got %u\n", size);
+ ok(ret == STATUS_INVALID_BUFFER_SIZE, "got %#lx\n", ret);
+ ok(size == 17 || broken(size == 0 /* Win < 7 */), "got %lu\n", size);
ret = BCryptDestroyKey(key);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ret = BCryptDestroyKey(key);
- ok(ret == STATUS_INVALID_HANDLE, "got %08x\n", ret);
+ ok(ret == STATUS_INVALID_HANDLE, "got %#lx\n", ret);
HeapFree(GetProcessHeap(), 0, buf);
ret = BCryptDestroyKey(NULL);
- ok(ret == STATUS_INVALID_HANDLE, "got %08x\n", ret);
+ ok(ret == STATUS_INVALID_HANDLE, "got %#lx\n", ret);
ret = BCryptCloseAlgorithmProvider(aes, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ret = BCryptCloseAlgorithmProvider(aes, 0);
- ok(ret == STATUS_INVALID_HANDLE, "got %08x\n", ret);
+ ok(ret == STATUS_INVALID_HANDLE, "got %#lx\n", ret);
ret = BCryptCloseAlgorithmProvider(NULL, 0);
- ok(ret == STATUS_INVALID_HANDLE, "got %08x\n", ret);
+ ok(ret == STATUS_INVALID_HANDLE, "got %#lx\n", ret);
}
static void test_key_import_export(void)
@@ -1723,7 +1723,7 @@ static void test_key_import_export(void)
ULONG size;
ret = BCryptOpenAlgorithmProvider(&aes, BCRYPT_AES_ALGORITHM, NULL, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
key_data1->dwMagic = BCRYPT_KEY_DATA_BLOB_MAGIC;
key_data1->dwVersion = BCRYPT_KEY_DATA_BLOB_VERSION1;
@@ -1732,7 +1732,7 @@ static void test_key_import_export(void)
key = NULL;
ret = BCryptImportKey(aes, NULL, BCRYPT_KEY_DATA_BLOB, &key, NULL, 0, buffer1, sizeof(buffer1), 0);
- ok(ret == STATUS_SUCCESS || broken(ret == STATUS_INVALID_PARAMETER) /* vista */, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS || broken(ret == STATUS_INVALID_PARAMETER) /* vista */, "got %#lx\n", ret);
if (ret == STATUS_INVALID_PARAMETER)
{
win_skip("broken BCryptImportKey\n");
@@ -1742,40 +1742,40 @@ static void test_key_import_export(void)
size = 0;
ret = BCryptExportKey(key, NULL, BCRYPT_KEY_DATA_BLOB, buffer2, 0, &size, 0);
- ok(ret == STATUS_BUFFER_TOO_SMALL, "got %08x\n", ret);
- ok(size == sizeof(buffer2), "got %u\n", size);
+ ok(ret == STATUS_BUFFER_TOO_SMALL, "got %#lx\n", ret);
+ ok(size == sizeof(buffer2), "got %lu\n", size);
size = 0;
memset(buffer2, 0xff, sizeof(buffer2));
ret = BCryptExportKey(key, NULL, BCRYPT_KEY_DATA_BLOB, buffer2, sizeof(buffer2), &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == sizeof(buffer2), "Got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == sizeof(buffer2), "Got %lu\n", size);
ok(!memcmp(buffer1, buffer2, sizeof(buffer1)), "Expected exported key to match imported key\n");
/* opaque blob */
size = 0;
ret = BCryptExportKey(key, NULL, BCRYPT_OPAQUE_KEY_BLOB, buffer2, 0, &size, 0);
- ok(ret == STATUS_BUFFER_TOO_SMALL, "got %08x\n", ret);
+ ok(ret == STATUS_BUFFER_TOO_SMALL, "got %#lx\n", ret);
ok(size > 0, "got zero\n");
buf = HeapAlloc(GetProcessHeap(), 0, size);
ret = BCryptExportKey(key, NULL, BCRYPT_OPAQUE_KEY_BLOB, buf, size, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ret = BCryptDestroyKey(key);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
key = NULL;
ret = BCryptImportKey(aes, NULL, BCRYPT_OPAQUE_KEY_BLOB, &key, NULL, 0, buf, size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ok(key != NULL, "key not set\n");
HeapFree(GetProcessHeap(), 0, buf);
ret = BCryptDestroyKey(key);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ret = BCryptCloseAlgorithmProvider(aes, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
}
static BYTE eccPrivkey[] =
@@ -1826,7 +1826,7 @@ static void test_ECDSA(void)
status = BCryptOpenAlgorithmProvider(&alg, BCRYPT_ECDSA_P256_ALGORITHM, NULL, 0);
if (status)
{
- skip("Failed to open ECDSA provider: %08x, skipping test\n", status);
+ skip("Failed to open ECDSA provider: %#lx, skipping test\n", status);
return;
}
@@ -1836,23 +1836,23 @@ static void test_ECDSA(void)
ecckey->cbKey = 2;
size = sizeof(BCRYPT_ECCKEY_BLOB) + sizeof(eccPubkey);
status = BCryptImportKeyPair(alg, NULL, BCRYPT_ECCPUBLIC_BLOB, &key, buffer, size, 0);
- ok(status == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got %08x\n", status);
+ ok(status == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got %#lx\n", status);
ecckey->dwMagic = BCRYPT_ECDH_PUBLIC_P256_MAGIC;
ecckey->cbKey = 32;
status = BCryptImportKeyPair(alg, NULL, BCRYPT_ECCPUBLIC_BLOB, &key, buffer, size, 0);
- ok(status == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got %08x\n", status);
+ ok(status == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got %#lx\n", status);
ecckey->dwMagic = BCRYPT_ECDSA_PUBLIC_P256_MAGIC;
ecckey->cbKey = 32;
status = BCryptImportKeyPair(alg, NULL, BCRYPT_ECCPUBLIC_BLOB, &key, buffer, size, 0);
- ok(!status, "BCryptImportKeyPair failed: %08x\n", status);
+ ok(!status, "BCryptImportKeyPair failed: %#lx\n", status);
status = BCryptVerifySignature(key, NULL, certHash, sizeof(certHash) - 1, certSignature, sizeof(certSignature), 0);
- ok(status == STATUS_INVALID_SIGNATURE, "Expected STATUS_INVALID_SIGNATURE, got %08x\n", status);
+ ok(status == STATUS_INVALID_SIGNATURE, "Expected STATUS_INVALID_SIGNATURE, got %#lx\n", status);
status = BCryptVerifySignature(key, NULL, certHash, sizeof(certHash), certSignature, sizeof(certSignature), 0);
- ok(!status, "BCryptVerifySignature failed: %08x\n", status);
+ ok(!status, "BCryptVerifySignature failed: %#lx\n", status);
BCryptDestroyKey(key);
ecckey->dwMagic = BCRYPT_ECDSA_PRIVATE_P256_MAGIC;
@@ -1861,25 +1861,25 @@ static void test_ECDSA(void)
ecckey->cbKey = 2;
size = sizeof(BCRYPT_ECCKEY_BLOB) + sizeof(eccPrivkey);
status = BCryptImportKeyPair(alg, NULL, BCRYPT_ECCPRIVATE_BLOB, &key, buffer, size, 0);
- ok(status == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got %08x\n", status);
+ ok(status == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got %#lx\n", status);
ecckey->dwMagic = BCRYPT_ECDH_PRIVATE_P256_MAGIC;
ecckey->cbKey = 32;
status = BCryptImportKeyPair(alg, NULL, BCRYPT_ECCPRIVATE_BLOB, &key, buffer, size, 0);
- ok(status == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got %08x\n", status);
+ ok(status == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got %#lx\n", status);
ecckey->dwMagic = BCRYPT_ECDSA_PRIVATE_P256_MAGIC;
ecckey->cbKey = 32;
status = BCryptImportKeyPair(alg, NULL, BCRYPT_ECCPRIVATE_BLOB, &key, buffer, size, 0);
- ok(!status, "BCryptImportKeyPair failed: %08x\n", status);
+ ok(!status, "BCryptImportKeyPair failed: %#lx\n", status);
memset( buffer, 0, sizeof(buffer) );
status = BCryptExportKey(key, NULL, BCRYPT_ECCPRIVATE_BLOB, buffer, size, &size, 0);
- ok(status == STATUS_SUCCESS, "got %08x\n", status);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
ecckey = (BCRYPT_ECCKEY_BLOB *)buffer;
- ok(ecckey->dwMagic == BCRYPT_ECDSA_PRIVATE_P256_MAGIC, "got %08x\n", ecckey->dwMagic);
- ok(ecckey->cbKey == 32, "got %u\n", ecckey->cbKey);
- ok(size == sizeof(*ecckey) + ecckey->cbKey * 3, "got %u\n", size);
+ ok(ecckey->dwMagic == BCRYPT_ECDSA_PRIVATE_P256_MAGIC, "got %#lx\n", ecckey->dwMagic);
+ ok(ecckey->cbKey == 32, "got %lu\n", ecckey->cbKey);
+ ok(size == sizeof(*ecckey) + ecckey->cbKey * 3, "got %lu\n", size);
BCryptDestroyKey(key);
BCryptCloseAlgorithmProvider(alg, 0);
@@ -1987,152 +1987,152 @@ static void test_RSA(void)
ret = BCryptOpenAlgorithmProvider(&alg, BCRYPT_RSA_ALGORITHM, NULL, 0);
if (ret)
{
- win_skip("Failed to open RSA provider: %08x, skipping test\n", ret);
+ win_skip("Failed to open RSA provider: %#lx, skipping test\n", ret);
return;
}
schemes = size = 0;
ret = BCryptGetProperty(alg, L"PaddingSchemes", (UCHAR *)&schemes, sizeof(schemes), &size, 0);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
ok(schemes, "schemes not set\n");
- ok(size == sizeof(schemes), "got %u\n", size);
+ ok(size == sizeof(schemes), "got %lu\n", size);
ret = BCryptImportKeyPair(alg, NULL, BCRYPT_RSAPUBLIC_BLOB, &key, rsaPublicBlob, sizeof(rsaPublicBlob), 0);
- ok(!ret, "BCryptImportKeyPair failed: %08x\n", ret);
+ ok(!ret, "BCryptImportKeyPair failed: %#lx\n", ret);
pad.pszAlgId = BCRYPT_SHA1_ALGORITHM;
ret = BCryptVerifySignature(key, &pad, rsaHash, sizeof(rsaHash), rsaSignature, sizeof(rsaSignature), BCRYPT_PAD_PKCS1);
- ok(!ret, "BCryptVerifySignature failed: %08x\n", ret);
+ ok(!ret, "BCryptVerifySignature failed: %#lx\n", ret);
ret = BCryptVerifySignature(key, NULL, rsaHash, sizeof(rsaHash), rsaSignature, sizeof(rsaSignature), BCRYPT_PAD_PKCS1);
- ok(ret == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got %08x\n", ret);
+ ok(ret == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got %#lx\n", ret);
pad.pszAlgId = BCRYPT_SHA1_ALGORITHM;
ret = BCryptVerifySignature(key, &pad, rsaHash, sizeof(rsaHash), rsaSignature, sizeof(rsaSignature), 0);
- ok(ret == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got %08x\n", ret);
+ ok(ret == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got %#lx\n", ret);
ret = BCryptVerifySignature(key, NULL, rsaHash, sizeof(rsaHash), rsaSignature, sizeof(rsaSignature), 0);
- ok(ret == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got %08x\n", ret);
+ ok(ret == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got %#lx\n", ret);
pad.pszAlgId = BCRYPT_AES_ALGORITHM;
ret = BCryptVerifySignature(key, &pad, rsaHash, sizeof(rsaHash), rsaSignature, sizeof(rsaSignature), BCRYPT_PAD_PKCS1);
- ok(ret == STATUS_NOT_SUPPORTED, "Expected STATUS_NOT_SUPPORTED, got %08x\n", ret);
+ ok(ret == STATUS_NOT_SUPPORTED, "Expected STATUS_NOT_SUPPORTED, got %#lx\n", ret);
pad.pszAlgId = NULL;
ret = BCryptVerifySignature(key, &pad, rsaHash, sizeof(rsaHash), rsaSignature, sizeof(rsaSignature), BCRYPT_PAD_PKCS1);
- ok(ret == STATUS_INVALID_SIGNATURE, "Expected STATUS_INVALID_SIGNATURE, got %08x\n", ret);
+ ok(ret == STATUS_INVALID_SIGNATURE, "Expected STATUS_INVALID_SIGNATURE, got %#lx\n", ret);
ret = BCryptDestroyKey(key);
- ok(!ret, "BCryptDestroyKey failed: %08x\n", ret);
+ ok(!ret, "BCryptDestroyKey failed: %#lx\n", ret);
/* sign/verify with export/import round-trip */
ret = BCryptGenerateKeyPair(alg, &key, 512, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ret = BCryptFinalizeKeyPair(key, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
pad.pszAlgId = BCRYPT_SHA1_ALGORITHM;
memset(sig, 0, sizeof(sig));
ret = BCryptSignHash(key, &pad, hash, sizeof(hash), sig, sizeof(sig), &len, BCRYPT_PAD_PKCS1);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
/* export private key */
size = 0;
ret = BCryptExportKey(key, NULL, BCRYPT_RSAPRIVATE_BLOB, NULL, 0, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ok(size, "size not set\n");
buf = HeapAlloc(GetProcessHeap(), 0, size);
ret = BCryptExportKey(key, NULL, BCRYPT_RSAPRIVATE_BLOB, buf, size, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
rsablob = (BCRYPT_RSAKEY_BLOB *)buf;
- ok(rsablob->Magic == BCRYPT_RSAPRIVATE_MAGIC, "got %08x\n", rsablob->Magic);
- ok(rsablob->BitLength == 512, "got %u\n", rsablob->BitLength);
- ok(rsablob->cbPublicExp == 3, "got %u\n", rsablob->cbPublicExp);
- ok(rsablob->cbModulus == 64, "got %u\n", rsablob->cbModulus);
- ok(rsablob->cbPrime1 == 32, "got %u\n", rsablob->cbPrime1);
- ok(rsablob->cbPrime2 == 32, "got %u\n", rsablob->cbPrime2);
+ ok(rsablob->Magic == BCRYPT_RSAPRIVATE_MAGIC, "got %#lx\n", rsablob->Magic);
+ ok(rsablob->BitLength == 512, "got %lu\n", rsablob->BitLength);
+ ok(rsablob->cbPublicExp == 3, "got %lu\n", rsablob->cbPublicExp);
+ ok(rsablob->cbModulus == 64, "got %lu\n", rsablob->cbModulus);
+ ok(rsablob->cbPrime1 == 32, "got %lu\n", rsablob->cbPrime1);
+ ok(rsablob->cbPrime2 == 32, "got %lu\n", rsablob->cbPrime2);
size2 = sizeof(*rsablob) + rsablob->cbPublicExp + rsablob->cbModulus + rsablob->cbPrime1 + rsablob->cbPrime2;
- ok(size == size2, "got %u expected %u\n", size2, size);
+ ok(size == size2, "got %lu expected %lu\n", size2, size);
HeapFree(GetProcessHeap(), 0, buf);
size = 0;
ret = BCryptExportKey(key, NULL, BCRYPT_RSAFULLPRIVATE_BLOB, NULL, 0, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ok(size, "size not set\n");
buf = HeapAlloc(GetProcessHeap(), 0, size);
ret = BCryptExportKey(key, NULL, BCRYPT_RSAFULLPRIVATE_BLOB, buf, size, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
rsablob = (BCRYPT_RSAKEY_BLOB *)buf;
- ok(rsablob->Magic == BCRYPT_RSAFULLPRIVATE_MAGIC, "got %08x\n", rsablob->Magic);
- ok(rsablob->BitLength == 512, "got %u\n", rsablob->BitLength);
- ok(rsablob->cbPublicExp == 3, "got %u\n", rsablob->cbPublicExp);
- ok(rsablob->cbModulus == 64, "got %u\n", rsablob->cbModulus);
- ok(rsablob->cbPrime1 == 32, "got %u\n", rsablob->cbPrime1);
- ok(rsablob->cbPrime2 == 32, "got %u\n", rsablob->cbPrime2);
+ ok(rsablob->Magic == BCRYPT_RSAFULLPRIVATE_MAGIC, "got %#lx\n", rsablob->Magic);
+ ok(rsablob->BitLength == 512, "got %lu\n", rsablob->BitLength);
+ ok(rsablob->cbPublicExp == 3, "got %lu\n", rsablob->cbPublicExp);
+ ok(rsablob->cbModulus == 64, "got %lu\n", rsablob->cbModulus);
+ ok(rsablob->cbPrime1 == 32, "got %lu\n", rsablob->cbPrime1);
+ ok(rsablob->cbPrime2 == 32, "got %lu\n", rsablob->cbPrime2);
size2 = sizeof(*rsablob) + rsablob->cbPublicExp + rsablob->cbModulus * 2 + rsablob->cbPrime1 * 3 + rsablob->cbPrime2 * 2;
- ok(size == size2, "got %u expected %u\n", size2, size);
+ ok(size == size2, "got %lu expected %lu\n", size2, size);
HeapFree(GetProcessHeap(), 0, buf);
/* export public key */
size = 0;
ret = BCryptExportKey(key, NULL, BCRYPT_RSAPUBLIC_BLOB, NULL, 0, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ok(size, "size not set\n");
buf = HeapAlloc(GetProcessHeap(), 0, size);
ret = BCryptExportKey(key, NULL, BCRYPT_RSAPUBLIC_BLOB, buf, size, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
rsablob = (BCRYPT_RSAKEY_BLOB *)buf;
- ok(rsablob->Magic == BCRYPT_RSAPUBLIC_MAGIC, "got %08x\n", rsablob->Magic);
- ok(rsablob->BitLength == 512, "got %u\n", rsablob->BitLength);
- ok(rsablob->cbPublicExp == 3, "got %u\n", rsablob->cbPublicExp);
- ok(rsablob->cbModulus == 64, "got %u\n", rsablob->cbModulus);
- ok(!rsablob->cbPrime1, "got %u\n", rsablob->cbPrime1);
- ok(!rsablob->cbPrime2, "got %u\n", rsablob->cbPrime2);
- ok(size == sizeof(*rsablob) + rsablob->cbPublicExp + rsablob->cbModulus, "got %u\n", size);
+ ok(rsablob->Magic == BCRYPT_RSAPUBLIC_MAGIC, "got %#lx\n", rsablob->Magic);
+ ok(rsablob->BitLength == 512, "got %lu\n", rsablob->BitLength);
+ ok(rsablob->cbPublicExp == 3, "got %lu\n", rsablob->cbPublicExp);
+ ok(rsablob->cbModulus == 64, "got %lu\n", rsablob->cbModulus);
+ ok(!rsablob->cbPrime1, "got %lu\n", rsablob->cbPrime1);
+ ok(!rsablob->cbPrime2, "got %lu\n", rsablob->cbPrime2);
+ ok(size == sizeof(*rsablob) + rsablob->cbPublicExp + rsablob->cbModulus, "got %lu\n", size);
ret = BCryptDestroyKey(key);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
ret = BCryptImportKeyPair(alg, NULL, BCRYPT_RSAPUBLIC_BLOB, &key, buf, size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
HeapFree(GetProcessHeap(), 0, buf);
ret = BCryptVerifySignature(key, &pad, hash, sizeof(hash), sig, len, BCRYPT_PAD_PKCS1);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
ret = BCryptDestroyKey(key);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
/* import/export private key */
ret = BCryptImportKeyPair(alg, NULL, BCRYPT_RSAPRIVATE_BLOB, &key, rsaPrivateBlob, sizeof(rsaPrivateBlob), 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
size = 0;
buf = HeapAlloc(GetProcessHeap(), 0, sizeof(rsaPrivateBlob));
ret = BCryptExportKey(key, NULL, BCRYPT_RSAPRIVATE_BLOB, buf, sizeof(rsaPrivateBlob), &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == sizeof(rsaPrivateBlob), "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == sizeof(rsaPrivateBlob), "got %lu\n", size);
ok(!memcmp(buf, rsaPrivateBlob, size), "wrong data\n");
HeapFree(GetProcessHeap(), 0, buf);
BCryptDestroyKey(key);
/* import/export full private key */
ret = BCryptImportKeyPair(alg, NULL, BCRYPT_RSAFULLPRIVATE_BLOB, &key, rsaFullPrivateBlob, sizeof(rsaFullPrivateBlob), 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
size = 0;
buf = HeapAlloc(GetProcessHeap(), 0, sizeof(rsaFullPrivateBlob));
ret = BCryptExportKey(key, NULL, BCRYPT_RSAFULLPRIVATE_BLOB, buf, sizeof(rsaFullPrivateBlob), &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == sizeof(rsaFullPrivateBlob), "got %u\n", size);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == sizeof(rsaFullPrivateBlob), "got %lu\n", size);
ok(!memcmp(buf, rsaFullPrivateBlob, size), "wrong data\n");
HeapFree(GetProcessHeap(), 0, buf);
BCryptDestroyKey(key);
ret = BCryptCloseAlgorithmProvider(alg, 0);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
}
static void test_RSA_SIGN(void)
@@ -2148,86 +2148,86 @@ static void test_RSA_SIGN(void)
ret = BCryptOpenAlgorithmProvider(&alg, BCRYPT_RSA_SIGN_ALGORITHM, NULL, 0);
if (ret)
{
- win_skip("Failed to open RSA_SIGN provider: %08x, skipping test\n", ret);
+ win_skip("Failed to open RSA_SIGN provider: %#lx, skipping test\n", ret);
return;
}
ret = BCryptImportKeyPair(alg, NULL, BCRYPT_RSAPUBLIC_BLOB, &key, rsaPublicBlob, sizeof(rsaPublicBlob), 0);
- ok(!ret, "BCryptImportKeyPair failed: %08x\n", ret);
+ ok(!ret, "BCryptImportKeyPair failed: %#lx\n", ret);
pad.pszAlgId = BCRYPT_SHA1_ALGORITHM;
ret = BCryptVerifySignature(key, &pad, rsaHash, sizeof(rsaHash), rsaSignature, sizeof(rsaSignature), BCRYPT_PAD_PKCS1);
- ok(!ret, "BCryptVerifySignature failed: %08x\n", ret);
+ ok(!ret, "BCryptVerifySignature failed: %#lx\n", ret);
ret = BCryptVerifySignature(key, NULL, rsaHash, sizeof(rsaHash), rsaSignature, sizeof(rsaSignature), BCRYPT_PAD_PKCS1);
- ok(ret == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got %08x\n", ret);
+ ok(ret == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got %#lx\n", ret);
pad.pszAlgId = BCRYPT_SHA1_ALGORITHM;
ret = BCryptVerifySignature(key, &pad, rsaHash, sizeof(rsaHash), rsaSignature, sizeof(rsaSignature), 0);
- ok(ret == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got %08x\n", ret);
+ ok(ret == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got %#lx\n", ret);
ret = BCryptVerifySignature(key, NULL, rsaHash, sizeof(rsaHash), rsaSignature, sizeof(rsaSignature), 0);
- ok(ret == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got %08x\n", ret);
+ ok(ret == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got %#lx\n", ret);
pad.pszAlgId = BCRYPT_AES_ALGORITHM;
ret = BCryptVerifySignature(key, &pad, rsaHash, sizeof(rsaHash), rsaSignature, sizeof(rsaSignature), BCRYPT_PAD_PKCS1);
- ok(ret == STATUS_NOT_SUPPORTED, "Expected STATUS_NOT_SUPPORTED, got %08x\n", ret);
+ ok(ret == STATUS_NOT_SUPPORTED, "Expected STATUS_NOT_SUPPORTED, got %#lx\n", ret);
pad.pszAlgId = NULL;
ret = BCryptVerifySignature(key, &pad, rsaHash, sizeof(rsaHash), rsaSignature, sizeof(rsaSignature), BCRYPT_PAD_PKCS1);
- ok(ret == STATUS_INVALID_SIGNATURE, "Expected STATUS_INVALID_SIGNATURE, got %08x\n", ret);
+ ok(ret == STATUS_INVALID_SIGNATURE, "Expected STATUS_INVALID_SIGNATURE, got %#lx\n", ret);
ret = BCryptDestroyKey(key);
- ok(!ret, "BCryptDestroyKey failed: %08x\n", ret);
+ ok(!ret, "BCryptDestroyKey failed: %#lx\n", ret);
/* export private key */
ret = BCryptGenerateKeyPair(alg, &key, 512, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ret = BCryptFinalizeKeyPair(key, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
size = 0;
ret = BCryptExportKey(key, NULL, BCRYPT_RSAPRIVATE_BLOB, NULL, 0, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ok(size, "size not set\n");
buf = HeapAlloc(GetProcessHeap(), 0, size);
ret = BCryptExportKey(key, NULL, BCRYPT_RSAPRIVATE_BLOB, buf, size, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
rsablob = (BCRYPT_RSAKEY_BLOB *)buf;
- ok(rsablob->Magic == BCRYPT_RSAPRIVATE_MAGIC, "got %08x\n", rsablob->Magic);
- ok(rsablob->BitLength == 512, "got %u\n", rsablob->BitLength);
- ok(rsablob->cbPublicExp == 3, "got %u\n", rsablob->cbPublicExp);
- ok(rsablob->cbModulus == 64, "got %u\n", rsablob->cbModulus);
- ok(rsablob->cbPrime1 == 32, "got %u\n", rsablob->cbPrime1);
- ok(rsablob->cbPrime2 == 32, "got %u\n", rsablob->cbPrime2);
+ ok(rsablob->Magic == BCRYPT_RSAPRIVATE_MAGIC, "got %#lx\n", rsablob->Magic);
+ ok(rsablob->BitLength == 512, "got %lu\n", rsablob->BitLength);
+ ok(rsablob->cbPublicExp == 3, "got %lu\n", rsablob->cbPublicExp);
+ ok(rsablob->cbModulus == 64, "got %lu\n", rsablob->cbModulus);
+ ok(rsablob->cbPrime1 == 32, "got %lu\n", rsablob->cbPrime1);
+ ok(rsablob->cbPrime2 == 32, "got %lu\n", rsablob->cbPrime2);
size2 = sizeof(*rsablob) + rsablob->cbPublicExp + rsablob->cbModulus + rsablob->cbPrime1 + rsablob->cbPrime2;
- ok(size == size2, "got %u expected %u\n", size2, size);
+ ok(size == size2, "got %lu expected %lu\n", size2, size);
HeapFree(GetProcessHeap(), 0, buf);
size = 0;
ret = BCryptExportKey(key, NULL, BCRYPT_RSAFULLPRIVATE_BLOB, NULL, 0, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ok(size, "size not set\n");
buf = HeapAlloc(GetProcessHeap(), 0, size);
ret = BCryptExportKey(key, NULL, BCRYPT_RSAFULLPRIVATE_BLOB, buf, size, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
rsablob = (BCRYPT_RSAKEY_BLOB *)buf;
- ok(rsablob->Magic == BCRYPT_RSAFULLPRIVATE_MAGIC, "got %08x\n", rsablob->Magic);
- ok(rsablob->BitLength == 512, "got %u\n", rsablob->BitLength);
- ok(rsablob->cbPublicExp == 3, "got %u\n", rsablob->cbPublicExp);
- ok(rsablob->cbModulus == 64, "got %u\n", rsablob->cbModulus);
- ok(rsablob->cbPrime1 == 32, "got %u\n", rsablob->cbPrime1);
- ok(rsablob->cbPrime2 == 32, "got %u\n", rsablob->cbPrime2);
+ ok(rsablob->Magic == BCRYPT_RSAFULLPRIVATE_MAGIC, "got %#lx\n", rsablob->Magic);
+ ok(rsablob->BitLength == 512, "got %lu\n", rsablob->BitLength);
+ ok(rsablob->cbPublicExp == 3, "got %lu\n", rsablob->cbPublicExp);
+ ok(rsablob->cbModulus == 64, "got %lu\n", rsablob->cbModulus);
+ ok(rsablob->cbPrime1 == 32, "got %lu\n", rsablob->cbPrime1);
+ ok(rsablob->cbPrime2 == 32, "got %lu\n", rsablob->cbPrime2);
size2 = sizeof(*rsablob) + rsablob->cbPublicExp + rsablob->cbModulus * 2 + rsablob->cbPrime1 * 3 + rsablob->cbPrime2 * 2;
- ok(size == size2, "got %u expected %u\n", size2, size);
+ ok(size == size2, "got %lu expected %lu\n", size2, size);
HeapFree(GetProcessHeap(), 0, buf);
BCryptDestroyKey(key);
ret = BCryptCloseAlgorithmProvider(alg, 0);
- ok(!ret, "BCryptCloseAlgorithmProvider failed: %08x\n", ret);
+ ok(!ret, "BCryptCloseAlgorithmProvider failed: %#lx\n", ret);
}
static BYTE eccprivkey[] =
@@ -2292,75 +2292,75 @@ static void test_ECDH(void)
status = BCryptOpenAlgorithmProvider(&alg, BCRYPT_ECDH_P256_ALGORITHM, NULL, 0);
if (status)
{
- skip("Failed to open BCRYPT_ECDH_P256_ALGORITHM provider %08x\n", status);
+ skip("Failed to open BCRYPT_ECDH_P256_ALGORITHM provider %#lx\n", status);
return;
}
key = NULL;
status = BCryptGenerateKeyPair(alg, &key, 256, 0);
- ok(status == STATUS_SUCCESS, "got %08x\n", status);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
ok(key != NULL, "key not set\n");
status = BCryptFinalizeKeyPair(key, 0);
- ok(status == STATUS_SUCCESS, "got %08x\n", status);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
size = 0;
status = BCryptExportKey(key, NULL, BCRYPT_ECCPUBLIC_BLOB, NULL, 0, &size, 0);
- ok(status == STATUS_SUCCESS, "got %08x\n", status);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
ok(size, "size not set\n");
buf = HeapAlloc(GetProcessHeap(), 0, size);
status = BCryptExportKey(key, NULL, BCRYPT_ECCPUBLIC_BLOB, buf, size, &size, 0);
- ok(status == STATUS_SUCCESS, "got %08x\n", status);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
ecckey = (BCRYPT_ECCKEY_BLOB *)buf;
- ok(ecckey->dwMagic == BCRYPT_ECDH_PUBLIC_P256_MAGIC, "got %08x\n", ecckey->dwMagic);
- ok(ecckey->cbKey == 32, "got %u\n", ecckey->cbKey);
- ok(size == sizeof(*ecckey) + ecckey->cbKey * 2, "got %u\n", size);
+ ok(ecckey->dwMagic == BCRYPT_ECDH_PUBLIC_P256_MAGIC, "got %#lx\n", ecckey->dwMagic);
+ ok(ecckey->cbKey == 32, "got %lu\n", ecckey->cbKey);
+ ok(size == sizeof(*ecckey) + ecckey->cbKey * 2, "got %lu\n", size);
status = BCryptImportKeyPair(alg, NULL, BCRYPT_ECCPUBLIC_BLOB, &pubkey, buf, size, 0);
- ok(status == STATUS_SUCCESS, "got %08x\n", status);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
HeapFree(GetProcessHeap(), 0, buf);
size = 0;
status = BCryptExportKey(key, NULL, BCRYPT_ECCPRIVATE_BLOB, NULL, 0, &size, 0);
- ok(status == STATUS_SUCCESS, "got %08x\n", status);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
ok(size, "size not set\n");
buf = HeapAlloc(GetProcessHeap(), 0, size);
status = BCryptExportKey(key, NULL, BCRYPT_ECCPRIVATE_BLOB, buf, size, &size, 0);
- ok(status == STATUS_SUCCESS, "got %08x\n", status);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
ecckey = (BCRYPT_ECCKEY_BLOB *)buf;
- ok(ecckey->dwMagic == BCRYPT_ECDH_PRIVATE_P256_MAGIC, "got %08x\n", ecckey->dwMagic);
- ok(ecckey->cbKey == 32, "got %u\n", ecckey->cbKey);
- ok(size == sizeof(*ecckey) + ecckey->cbKey * 3, "got %u\n", size);
+ ok(ecckey->dwMagic == BCRYPT_ECDH_PRIVATE_P256_MAGIC, "got %#lx\n", ecckey->dwMagic);
+ ok(ecckey->cbKey == 32, "got %lu\n", ecckey->cbKey);
+ ok(size == sizeof(*ecckey) + ecckey->cbKey * 3, "got %lu\n", size);
status = BCryptImportKeyPair(alg, NULL, BCRYPT_ECCPRIVATE_BLOB, &privkey, buf, size, 0);
- ok(status == STATUS_SUCCESS, "got %08x\n", status);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
HeapFree(GetProcessHeap(), 0, buf);
BCryptDestroyKey(pubkey);
BCryptDestroyKey(privkey);
BCryptDestroyKey(key);
status = BCryptImportKeyPair(alg, NULL, BCRYPT_ECCPRIVATE_BLOB, &privkey, eccprivkey, sizeof(eccprivkey), 0);
- ok(status == STATUS_SUCCESS, "got %08x\n", status);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
size = 0;
status = BCryptExportKey(privkey, NULL, BCRYPT_ECCPRIVATE_BLOB, NULL, 0, &size, 0);
- ok(status == STATUS_SUCCESS, "got %08x\n", status);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
ok(size, "size not set\n");
buf = HeapAlloc(GetProcessHeap(), 0, size);
status = BCryptExportKey(privkey, NULL, BCRYPT_ECCPRIVATE_BLOB, buf, size, &size, 0);
- ok(status == STATUS_SUCCESS, "got %08x\n", status);
- ok(size == sizeof(eccprivkey), "got %u\n", size);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
+ ok(size == sizeof(eccprivkey), "got %lu\n", size);
ok(!memcmp(buf, eccprivkey, size), "wrong data\n");
HeapFree(GetProcessHeap(), 0, buf);
status = BCryptImportKeyPair(alg, NULL, BCRYPT_ECCPUBLIC_BLOB, &pubkey, ecdh_pubkey, sizeof(ecdh_pubkey), 0);
- ok(status == STATUS_SUCCESS, "got %08x\n", status);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
status = BCryptSecretAgreement(privkey, pubkey, &secret, 0);
- ok(status == STATUS_SUCCESS, "got %08x\n", status);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
if (status != STATUS_SUCCESS)
{
@@ -2376,53 +2376,53 @@ static void test_ECDH(void)
goto raw_secret_end;
}
- todo_wine ok(status == STATUS_SUCCESS, "got %08x\n", status);
+ todo_wine ok(status == STATUS_SUCCESS, "got %#lx\n", status);
if (status != STATUS_SUCCESS)
{
goto raw_secret_end;
}
- ok(size == 32, "size of secret key incorrect, got %u, expected 32\n", size);
+ ok(size == 32, "size of secret key incorrect, got %lu, expected 32\n", size);
buf = HeapAlloc(GetProcessHeap(), 0, size);
status = BCryptDeriveKey(secret, BCRYPT_KDF_RAW_SECRET, NULL, buf, size, &size, 0);
- ok(status == STATUS_SUCCESS, "got %08x\n", status);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
ok(!(memcmp(ecdh_secret, buf, size)), "wrong data\n");
HeapFree(GetProcessHeap(), 0, buf);
raw_secret_end:
status = BCryptDeriveKey(secret, BCRYPT_KDF_HASH, &hash_params, NULL, 0, &size, 0);
- todo_wine ok (status == STATUS_SUCCESS, "got %08x\n", status);
+ todo_wine ok (status == STATUS_SUCCESS, "got %#lx\n", status);
if (status != STATUS_SUCCESS)
{
goto derive_end;
}
- ok (size == 20, "got %u\n", size);
+ ok (size == 20, "got %lu\n", size);
buf = HeapAlloc(GetProcessHeap(), 0, size);
status = BCryptDeriveKey(secret, BCRYPT_KDF_HASH, &hash_params, buf, size, &size, 0);
- ok(status == STATUS_SUCCESS, "got %08x\n", status);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
ok(!(memcmp(hashed_secret, buf, size)), "wrong data\n");
HeapFree(GetProcessHeap(), 0, buf);
/* ulVersion is not verified */
hash_params.ulVersion = 0xdeadbeef;
status = BCryptDeriveKey(secret, BCRYPT_KDF_HASH, &hash_params, NULL, 0, &size, 0);
- ok (status == STATUS_SUCCESS, "got %08x\n", status);
+ ok (status == STATUS_SUCCESS, "got %#lx\n", status);
hash_params.ulVersion = BCRYPTBUFFER_VERSION;
hash_param_buffers[0].pvBuffer = (void*) L"INVALID";
hash_param_buffers[0].cbBuffer = sizeof(L"INVALID");
status = BCryptDeriveKey(secret, BCRYPT_KDF_HASH, &hash_params, NULL, 0, &size, 0);
- ok (status == STATUS_NOT_SUPPORTED || broken (status == STATUS_NOT_FOUND) /* < win8 */, "got %08x\n", status);
+ ok (status == STATUS_NOT_SUPPORTED || broken (status == STATUS_NOT_FOUND) /* < win8 */, "got %#lx\n", status);
hash_param_buffers[0].pvBuffer = (void*) BCRYPT_RNG_ALGORITHM;
hash_param_buffers[0].cbBuffer = sizeof(BCRYPT_RNG_ALGORITHM);
status = BCryptDeriveKey(secret, BCRYPT_KDF_HASH, &hash_params, NULL, 0, &size, 0);
- ok (status == STATUS_NOT_SUPPORTED, "got %08x\n", status);
+ ok (status == STATUS_NOT_SUPPORTED, "got %#lx\n", status);
derive_end:
@@ -2440,7 +2440,7 @@ static void test_BCryptEnumContextFunctions(void)
buffer = NULL;
status = BCryptEnumContextFunctions( CRYPT_LOCAL, L"SSL", NCRYPT_SCHANNEL_INTERFACE, &buflen, &buffer );
- todo_wine ok( status == STATUS_SUCCESS, "got %08x\n", status);
+ todo_wine ok( status == STATUS_SUCCESS, "got %#lx\n", status);
if (status == STATUS_SUCCESS) BCryptFreeBuffer( buffer );
}
@@ -2482,94 +2482,94 @@ static void test_BCryptSignHash(void)
ret = BCryptOpenAlgorithmProvider(&alg, BCRYPT_RSA_ALGORITHM, NULL, 0);
if (ret)
{
- win_skip("failed to open RSA provider: %08x\n", ret);
+ win_skip("failed to open RSA provider: %#lx\n", ret);
return;
}
/* public key */
ret = BCryptImportKeyPair(alg, NULL, BCRYPT_RSAPUBLIC_BLOB, &key, rsapublic, sizeof(rsapublic), 0);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
len = 0;
pad.pszAlgId = BCRYPT_SHA1_ALGORITHM;
ret = BCryptSignHash(key, &pad, NULL, 0, NULL, 0, &len, BCRYPT_PAD_PKCS1);
- ok(!ret, "got %08x\n", ret);
- ok(len == 256, "got %u\n", len);
+ ok(!ret, "got %#lx\n", ret);
+ ok(len == 256, "got %lu\n", len);
/* test len return when only output is NULL, as described in BCryptSignHash doc */
ret = BCryptSignHash(key, &pad, hash, sizeof(hash), NULL, 0, &len, BCRYPT_PAD_PKCS1);
- ok(!ret, "got %08x\n", ret);
- ok(len == 256, "got %u\n", len);
+ ok(!ret, "got %#lx\n", ret);
+ ok(len == 256, "got %lu\n", len);
len = 0;
ret = BCryptSignHash(key, &pad, hash, sizeof(hash), sig, sizeof(sig), &len, BCRYPT_PAD_PKCS1);
- ok(ret == STATUS_INVALID_PARAMETER || broken(ret == STATUS_INTERNAL_ERROR) /* < win7 */, "got %08x\n", ret);
+ ok(ret == STATUS_INVALID_PARAMETER || broken(ret == STATUS_INTERNAL_ERROR) /* < win7 */, "got %#lx\n", ret);
ret = BCryptDestroyKey(key);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
ret = BCryptGenerateKeyPair(alg, &key, 512, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ret = BCryptFinalizeKeyPair(key, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
len = 0;
memset(sig, 0, sizeof(sig));
/* inference of padding info on RSA not supported */
ret = BCryptSignHash(key, NULL, hash, sizeof(hash), sig, sizeof(sig), &len, 0);
- ok(ret == STATUS_INVALID_PARAMETER, "got %08x\n", ret);
+ ok(ret == STATUS_INVALID_PARAMETER, "got %#lx\n", ret);
ret = BCryptSignHash(key, &pad, hash, sizeof(hash), sig, 0, &len, BCRYPT_PAD_PKCS1);
- ok(ret == STATUS_BUFFER_TOO_SMALL, "got %08x\n", ret);
+ ok(ret == STATUS_BUFFER_TOO_SMALL, "got %#lx\n", ret);
ret = BCryptSignHash(key, &pad, hash, sizeof(hash), sig, sizeof(sig), &len, BCRYPT_PAD_PKCS1);
- ok(!ret, "got %08x\n", ret);
- ok(len == 64, "got %u\n", len);
+ ok(!ret, "got %#lx\n", ret);
+ ok(len == 64, "got %lu\n", len);
ret = BCryptVerifySignature(key, &pad, hash, sizeof(hash), sig, len, BCRYPT_PAD_PKCS1);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
ret = BCryptDestroyKey(key);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
ret = BCryptCloseAlgorithmProvider(alg, 0);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
/* ECDSA */
ret = BCryptOpenAlgorithmProvider(&alg, BCRYPT_ECDSA_P256_ALGORITHM, NULL, 0);
if (ret)
{
- win_skip("failed to open ECDSA provider: %08x\n", ret);
+ win_skip("failed to open ECDSA provider: %#lx\n", ret);
return;
}
ret = BCryptGenerateKeyPair(alg, &key, 256, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ret = BCryptFinalizeKeyPair(key, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
memset(sig, 0, sizeof(sig));
len = 0;
/* automatically detects padding info */
ret = BCryptSignHash(key, NULL, hash, sizeof(hash), sig, sizeof(sig), &len, 0);
- ok (!ret, "got %08x\n", ret);
- ok (len == 64, "got %u\n", len);
+ ok (!ret, "got %#lx\n", ret);
+ ok (len == 64, "got %lu\n", len);
ret = BCryptVerifySignature(key, NULL, hash, sizeof(hash), sig, len, 0);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
/* mismatch info (SHA-1 != SHA-256) */
ret = BCryptSignHash(key, &pad, hash_sha256, sizeof(hash_sha256), sig, sizeof(sig), &len, BCRYPT_PAD_PKCS1);
- ok (ret == STATUS_INVALID_PARAMETER, "got %08x\n", ret);
+ ok (ret == STATUS_INVALID_PARAMETER, "got %#lx\n", ret);
ret = BCryptDestroyKey(key);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
ret = BCryptCloseAlgorithmProvider(alg, 0);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
}
static void test_BCryptEnumAlgorithms(void)
@@ -2579,23 +2579,23 @@ static void test_BCryptEnumAlgorithms(void)
ULONG count;
ret = BCryptEnumAlgorithms(0, NULL, NULL, 0);
- ok(ret == STATUS_INVALID_PARAMETER, "got %08x\n", ret);
+ ok(ret == STATUS_INVALID_PARAMETER, "got %#lx\n", ret);
ret = BCryptEnumAlgorithms(0, &count, NULL, 0);
- ok(ret == STATUS_INVALID_PARAMETER, "got %08x\n", ret);
+ ok(ret == STATUS_INVALID_PARAMETER, "got %#lx\n", ret);
ret = BCryptEnumAlgorithms(0, NULL, &list, 0);
- ok(ret == STATUS_INVALID_PARAMETER, "got %08x\n", ret);
+ ok(ret == STATUS_INVALID_PARAMETER, "got %#lx\n", ret);
ret = BCryptEnumAlgorithms(~0u, &count, &list, 0);
- ok(ret == STATUS_INVALID_PARAMETER, "got %08x\n", ret);
+ ok(ret == STATUS_INVALID_PARAMETER, "got %#lx\n", ret);
count = 0;
list = NULL;
ret = BCryptEnumAlgorithms(0, &count, &list, 0);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
ok(list != NULL, "NULL list\n");
- ok(count, "got %u\n", count);
+ ok(count, "got %lu\n", count);
BCryptFreeBuffer( list );
}
@@ -2615,11 +2615,11 @@ static void test_aes_vector(void)
NTSTATUS ret;
ret = BCryptOpenAlgorithmProvider(&alg, BCRYPT_AES_ALGORITHM, NULL, 0);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
size = sizeof(BCRYPT_CHAIN_MODE_CBC);
ret = BCryptSetProperty(alg, BCRYPT_CHAINING_MODE, (UCHAR *)BCRYPT_CHAIN_MODE_CBC, size, 0);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
blob->dwMagic = BCRYPT_KEY_DATA_BLOB_MAGIC;
blob->dwVersion = BCRYPT_KEY_DATA_BLOB_VERSION1;
@@ -2627,7 +2627,7 @@ static void test_aes_vector(void)
memcpy(data + sizeof(*blob), secret, sizeof(secret));
size = sizeof(BCRYPT_KEY_DATA_BLOB_HEADER) + sizeof(secret);
ret = BCryptImportKey(alg, NULL, BCRYPT_KEY_DATA_BLOB, &key, NULL, 0, data, size, 0);
- ok(!ret || broken(ret == STATUS_INVALID_PARAMETER) /* vista */, "got %08x\n", ret);
+ ok(!ret || broken(ret == STATUS_INVALID_PARAMETER) /* vista */, "got %#lx\n", ret);
if (ret == STATUS_INVALID_PARAMETER)
{
win_skip("broken BCryptImportKey\n");
@@ -2639,16 +2639,16 @@ static void test_aes_vector(void)
size = 0;
memset(output, 0, sizeof(output));
ret = BCryptEncrypt(key, input, sizeof(input), NULL, iv, sizeof(iv), output, sizeof(output), &size, 0);
- ok(!ret, "got %08x\n", ret);
- ok(size == 16, "got %u\n", size);
+ ok(!ret, "got %#lx\n", ret);
+ ok(size == 16, "got %lu\n", size);
ok(!memcmp(output, expect, sizeof(expect)), "wrong cipher text\n");
/* same initialization vector */
size = 0;
memset(output, 0, sizeof(output));
ret = BCryptEncrypt(key, input, sizeof(input), NULL, iv, sizeof(iv), output, sizeof(output), &size, 0);
- ok(!ret, "got %08x\n", ret);
- ok(size == 16, "got %u\n", size);
+ ok(!ret, "got %#lx\n", ret);
+ ok(size == 16, "got %lu\n", size);
ok(!memcmp(output, expect2, sizeof(expect2)), "wrong cipher text\n");
/* different initialization vector */
@@ -2656,15 +2656,15 @@ static void test_aes_vector(void)
size = 0;
memset(output, 0, sizeof(output));
ret = BCryptEncrypt(key, input, sizeof(input), NULL, iv, sizeof(iv), output, sizeof(output), &size, 0);
- ok(!ret, "got %08x\n", ret);
- ok(size == 16, "got %u\n", size);
+ ok(!ret, "got %#lx\n", ret);
+ ok(size == 16, "got %lu\n", size);
todo_wine ok(!memcmp(output, expect3, sizeof(expect3)), "wrong cipher text\n");
ret = BCryptDestroyKey(key);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
ret = BCryptCloseAlgorithmProvider(alg, 0);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
}
static void test_BcryptDeriveKeyCapi(void)
@@ -2680,10 +2680,10 @@ static void test_BcryptDeriveKeyCapi(void)
NTSTATUS ret;
ret = BCryptOpenAlgorithmProvider(&alg, BCRYPT_SHA1_ALGORITHM, NULL, 0);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
ret = BCryptCreateHash(alg, &hash, NULL, 0, NULL, 0, 0);
- ok(!ret || broken(ret == STATUS_INVALID_PARAMETER) /* win2k8 */, "got %08x\n", ret);
+ ok(!ret || broken(ret == STATUS_INVALID_PARAMETER) /* win2k8 */, "got %#lx\n", ret);
if (ret == STATUS_INVALID_PARAMETER)
{
win_skip( "broken BCryptCreateHash\n" );
@@ -2691,66 +2691,66 @@ static void test_BcryptDeriveKeyCapi(void)
}
ret = BCryptDeriveKeyCapi(NULL, NULL, NULL, 0, 0);
- ok(ret == STATUS_INVALID_PARAMETER || ret == STATUS_INVALID_HANDLE /* win7 */, "got %08x\n", ret);
+ ok(ret == STATUS_INVALID_PARAMETER || ret == STATUS_INVALID_HANDLE /* win7 */, "got %#lx\n", ret);
ret = BCryptDeriveKeyCapi(hash, NULL, NULL, 0, 0);
- ok(ret == STATUS_INVALID_PARAMETER || !ret /* win7 */, "got %08x\n", ret);
+ ok(ret == STATUS_INVALID_PARAMETER || !ret /* win7 */, "got %#lx\n", ret);
ret = BCryptDestroyHash(hash);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
ret = BCryptCreateHash(alg, &hash, NULL, 0, NULL, 0, 0);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
ret = BCryptDeriveKeyCapi(hash, NULL, key, 0, 0);
- ok(ret == STATUS_INVALID_PARAMETER || !ret /* win7 */, "got %08x\n", ret);
+ ok(ret == STATUS_INVALID_PARAMETER || !ret /* win7 */, "got %#lx\n", ret);
ret = BCryptDestroyHash(hash);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
ret = BCryptCreateHash(alg, &hash, NULL, 0, NULL, 0, 0);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
memset(key, 0, sizeof(key));
ret = BCryptDeriveKeyCapi(hash, NULL, key, 41, 0);
- ok(ret == STATUS_INVALID_PARAMETER || !ret /* win7 */, "got %08x\n", ret);
+ ok(ret == STATUS_INVALID_PARAMETER || !ret /* win7 */, "got %#lx\n", ret);
if (!ret)
ok(!memcmp(key, expect, sizeof(expect) - 1), "wrong key data\n");
ret = BCryptDestroyHash(hash);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
ret = BCryptCreateHash(alg, &hash, NULL, 0, NULL, 0, 0);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
memset(key, 0, sizeof(key));
ret = BCryptDeriveKeyCapi(hash, NULL, key, 20, 0);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
ok(!memcmp(key, expect, sizeof(expect) - 1), "wrong key data\n");
ret = BCryptDeriveKeyCapi(hash, NULL, key, 20, 0);
- todo_wine ok(ret == STATUS_INVALID_HANDLE, "got %08x\n", ret);
+ todo_wine ok(ret == STATUS_INVALID_HANDLE, "got %#lx\n", ret);
ret = BCryptHashData(hash, NULL, 0, 0);
- todo_wine ok(ret == STATUS_INVALID_HANDLE, "got %08x\n", ret);
+ todo_wine ok(ret == STATUS_INVALID_HANDLE, "got %#lx\n", ret);
ret = BCryptDestroyHash(hash);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
ret = BCryptCreateHash(alg, &hash, NULL, 0, NULL, 0, 0);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
ret = BCryptHashData(hash, (UCHAR *)"test", 4, 0);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
/* padding */
memset(key, 0, sizeof(key));
ret = BCryptDeriveKeyCapi(hash, NULL, key, 40, 0);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
ok(!memcmp(key, expect2, sizeof(expect2) - 1), "wrong key data\n");
ret = BCryptCloseAlgorithmProvider(alg, 0);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
}
static UCHAR dsaHash[] =
@@ -2813,78 +2813,78 @@ static void test_DSA(void)
BYTE *buf;
ret = BCryptOpenAlgorithmProvider(&alg, BCRYPT_DSA_ALGORITHM, NULL, 0);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
ret = BCryptGetProperty(alg, L"PaddingSchemes", (UCHAR *)&schemes, sizeof(schemes), &size, 0);
- ok(ret == STATUS_NOT_SUPPORTED, "got %08x\n", ret);
+ ok(ret == STATUS_NOT_SUPPORTED, "got %#lx\n", ret);
ret = BCryptImportKeyPair(alg, NULL, BCRYPT_DSA_PUBLIC_BLOB, &key, dsaPublicBlob, sizeof(dsaPublicBlob), 0);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
ret = BCryptVerifySignature(key, NULL, dsaHash, sizeof(dsaHash), dsaSignature, sizeof(dsaSignature), 0);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
ret = BCryptDestroyKey(key);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
/* sign/verify with export/import round-trip */
ret = BCryptGenerateKeyPair(alg, &key, 512, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ret = BCryptFinalizeKeyPair(key, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
len = 0;
memset(sig, 0, sizeof(sig));
ret = BCryptSignHash(key, NULL, dsaHash, sizeof(dsaHash), sig, sizeof(sig), &len, 0);
- ok(!ret, "got %08x\n", ret);
- ok(len == 40, "got %u\n", len);
+ ok(!ret, "got %#lx\n", ret);
+ ok(len == 40, "got %lu\n", len);
size = 0;
ret = BCryptExportKey(key, NULL, BCRYPT_DSA_PUBLIC_BLOB, NULL, 0, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ok(size, "size not set\n");
buf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
ret = BCryptExportKey(key, NULL, BCRYPT_DSA_PUBLIC_BLOB, buf, size, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
dsablob = (BCRYPT_DSA_KEY_BLOB *)buf;
- ok(dsablob->dwMagic == BCRYPT_DSA_PUBLIC_MAGIC, "got %08x\n", dsablob->dwMagic);
- ok(dsablob->cbKey == 64, "got %u\n", dsablob->cbKey);
- ok(size == sizeof(*dsablob) + dsablob->cbKey * 3, "got %u\n", size);
+ ok(dsablob->dwMagic == BCRYPT_DSA_PUBLIC_MAGIC, "got %#lx\n", dsablob->dwMagic);
+ ok(dsablob->cbKey == 64, "got %lu\n", dsablob->cbKey);
+ ok(size == sizeof(*dsablob) + dsablob->cbKey * 3, "got %lu\n", size);
ret = BCryptDestroyKey(key);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
ret = BCryptImportKeyPair(alg, NULL, BCRYPT_DSA_PUBLIC_BLOB, &key, buf, size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
HeapFree(GetProcessHeap(), 0, buf);
ret = BCryptVerifySignature(key, NULL, dsaHash, sizeof(dsaHash), sig, len, 0);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
ret = BCryptDestroyKey(key);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
ret = BCryptImportKeyPair(alg, NULL, LEGACY_DSA_V2_PRIVATE_BLOB, &key, dssKey, sizeof(dssKey), 0);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
size = 0;
ret = BCryptExportKey(key, NULL, LEGACY_DSA_V2_PRIVATE_BLOB, NULL, 0, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ok(size, "size not set\n");
buf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
ret = BCryptExportKey(key, NULL, LEGACY_DSA_V2_PRIVATE_BLOB, buf, size, &size, 0);
- ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
- ok(size == sizeof(dssKey), "got %u expected %u\n", size, sizeof(dssKey));
+ ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
+ ok(size == sizeof(dssKey), "got %lu expected %Iu\n", size, sizeof(dssKey));
ok(!memcmp(dssKey, buf, size), "wrong data\n");
HeapFree(GetProcessHeap(), 0, buf);
ret = BCryptDestroyKey(key);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
ret = BCryptCloseAlgorithmProvider(alg, 0);
- ok(!ret, "got %08x\n", ret);
+ ok(!ret, "got %#lx\n", ret);
}
static void test_SecretAgreement(void)
@@ -2898,63 +2898,63 @@ static void test_SecretAgreement(void)
status = BCryptOpenAlgorithmProvider(&alg, BCRYPT_ECDH_P256_ALGORITHM, NULL, 0);
if (status)
{
- skip("Failed to open BCRYPT_ECDH_P256_ALGORITHM provider %08x\n", status);
+ skip("Failed to open BCRYPT_ECDH_P256_ALGORITHM provider %#lx\n", status);
return;
}
key = NULL;
status = BCryptGenerateKeyPair(alg, &key, 256, 0);
- ok(status == STATUS_SUCCESS, "got %08x\n", status);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
ok(key != NULL, "key not set\n");
status = BCryptFinalizeKeyPair(key, 0);
- ok(status == STATUS_SUCCESS, "got %08x\n", status);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
status = BCryptSecretAgreement(NULL, key, &secret, 0);
- ok(status == STATUS_INVALID_HANDLE, "got %08x\n", status);
+ ok(status == STATUS_INVALID_HANDLE, "got %#lx\n", status);
status = BCryptSecretAgreement(key, NULL, &secret, 0);
- ok(status == STATUS_INVALID_HANDLE, "got %08x\n", status);
+ ok(status == STATUS_INVALID_HANDLE, "got %#lx\n", status);
status = BCryptSecretAgreement(key, key, NULL, 0);
- ok(status == STATUS_INVALID_PARAMETER, "got %08x\n", status);
+ ok(status == STATUS_INVALID_PARAMETER, "got %#lx\n", status);
status = BCryptSecretAgreement(key, key, &secret, 0);
- ok(status == STATUS_SUCCESS, "got %08x\n", status);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
status = BCryptDeriveKey(NULL, L"HASH", NULL, NULL, 0, &size, 0);
- ok(status == STATUS_INVALID_HANDLE, "got %08x\n", status);
+ ok(status == STATUS_INVALID_HANDLE, "got %#lx\n", status);
status = BCryptDeriveKey(key, L"HASH", NULL, NULL, 0, &size, 0);
- ok(status == STATUS_INVALID_HANDLE, "got %08x\n", status);
+ ok(status == STATUS_INVALID_HANDLE, "got %#lx\n", status);
status = BCryptDeriveKey(secret, NULL, NULL, NULL, 0, &size, 0);
- ok(status == STATUS_INVALID_PARAMETER, "got %08x\n", status);
+ ok(status == STATUS_INVALID_PARAMETER, "got %#lx\n", status);
status = BCryptDeriveKey(secret, L"HASH", NULL, NULL, 0, &size, 0);
todo_wine
- ok(status == STATUS_SUCCESS, "got %08x\n", status);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
status = BCryptDestroyHash(secret);
- ok(status == STATUS_INVALID_PARAMETER, "got %08x\n", status);
+ ok(status == STATUS_INVALID_PARAMETER, "got %#lx\n", status);
status = BCryptDestroyKey(secret);
- ok(status == STATUS_INVALID_HANDLE, "got %08x\n", status);
+ ok(status == STATUS_INVALID_HANDLE, "got %#lx\n", status);
status = BCryptDestroySecret(NULL);
- ok(status == STATUS_INVALID_HANDLE, "got %08x\n", status);
+ ok(status == STATUS_INVALID_HANDLE, "got %#lx\n", status);
status = BCryptDestroySecret(alg);
- ok(status == STATUS_INVALID_HANDLE, "got %08x\n", status);
+ ok(status == STATUS_INVALID_HANDLE, "got %#lx\n", status);
status = BCryptDestroySecret(secret);
- ok(status == STATUS_SUCCESS, "got %08x\n", status);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
status = BCryptDestroyKey(key);
- ok(status == STATUS_SUCCESS, "got %08x\n", status);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
status = BCryptCloseAlgorithmProvider(alg, 0);
- ok(status == STATUS_SUCCESS, "got %08x\n", status);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
}
START_TEST(bcrypt)
--
2.30.2
1
0
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/evr/tests/Makefile.in | 1 -
dlls/evr/tests/evr.c | 1291 ++++++++++++++++++------------------
2 files changed, 647 insertions(+), 645 deletions(-)
diff --git a/dlls/evr/tests/Makefile.in b/dlls/evr/tests/Makefile.in
index b8980a3f397..c5db2226ebc 100644
--- a/dlls/evr/tests/Makefile.in
+++ b/dlls/evr/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = evr.dll
IMPORTS = dxva2 mfplat mfuuid mf strmiids uuid dxguid ole32 oleaut32 evr d3d9 user32
diff --git a/dlls/evr/tests/evr.c b/dlls/evr/tests/evr.c
index acbb2b1869a..ea67ff5b584 100644
--- a/dlls/evr/tests/evr.c
+++ b/dlls/evr/tests/evr.c
@@ -80,7 +80,7 @@ static IBaseFilter *create_evr(void)
IBaseFilter *filter = NULL;
HRESULT hr = CoCreateInstance(&CLSID_EnhancedVideoRenderer, NULL, CLSCTX_INPROC_SERVER,
&IID_IBaseFilter, (void **)&filter);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
return filter;
}
@@ -90,7 +90,7 @@ static IFilterGraph2 *create_graph(void)
HRESULT hr;
hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterGraph2, (void **)&ret);
- ok(hr == S_OK, "Failed to create FilterGraph: %#x\n", hr);
+ ok(hr == S_OK, "Failed to create FilterGraph: %#lx\n", hr);
return ret;
}
@@ -100,7 +100,7 @@ static void _expect_ref(IUnknown *obj, ULONG ref, int line)
ULONG rc;
IUnknown_AddRef(obj);
rc = IUnknown_Release(obj);
- ok_(__FILE__,line)(rc == ref, "Unexpected refcount %d, expected %d.\n", rc, ref);
+ ok_(__FILE__,line)(rc == ref, "Unexpected refcount %ld, expected %ld.\n", rc, ref);
}
static ULONG get_refcount(void *iface)
@@ -157,69 +157,69 @@ static void test_aggregation(void)
filter = (IBaseFilter *)0xdeadbeef;
hr = CoCreateInstance(&CLSID_EnhancedVideoRenderer, &test_outer, CLSCTX_INPROC_SERVER,
&IID_IBaseFilter, (void **)&filter);
- ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr);
+ ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr);
ok(!filter, "Got interface %p.\n", filter);
hr = CoCreateInstance(&CLSID_EnhancedVideoRenderer, &test_outer, CLSCTX_INPROC_SERVER,
&IID_IUnknown, (void **)&unk);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n");
ref = get_refcount(unk);
- ok(ref == 1, "Got unexpected refcount %d.\n", ref);
+ ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
ref = IUnknown_AddRef(unk);
- ok(ref == 2, "Got unexpected refcount %d.\n", ref);
- ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref);
+ ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
+ ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ref = IUnknown_Release(unk);
- ok(ref == 1, "Got unexpected refcount %d.\n", ref);
- ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref);
+ ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
+ ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2);
IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IBaseFilter, (void **)&filter);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_QueryInterface(filter, &IID_IUnknown, (void **)&unk2);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &IID_IBaseFilter, (void **)&filter2);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(filter2 == (IBaseFilter *)0xdeadbeef, "Got unexpected IBaseFilter %p.\n", filter2);
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2);
- ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr);
+ ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr);
ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &test_iid, (void **)&unk2);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
IBaseFilter_Release(filter);
ref = IUnknown_Release(unk);
- ok(!ref, "Got unexpected refcount %d.\n", ref);
- ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref);
+ ok(!ref, "Got unexpected refcount %ld.\n", ref);
+ ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
/* Default presenter. */
presenter = (void *)0xdeadbeef;
hr = CoCreateInstance(&CLSID_MFVideoPresenter9, &test_outer, CLSCTX_INPROC_SERVER, &IID_IMFVideoPresenter,
(void **)&presenter);
- ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
ok(!presenter, "Got interface %p.\n", presenter);
hr = CoCreateInstance(&CLSID_MFVideoPresenter9, &test_outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk);
- ok(hr == S_OK || broken(hr == E_FAIL) /* WinXP */, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK || broken(hr == E_FAIL) /* WinXP */, "Unexpected hr %#lx.\n", hr);
if (SUCCEEDED(hr))
{
- ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref);
+ ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n");
ref = get_refcount(unk);
- ok(ref == 1, "Got unexpected refcount %d.\n", ref);
+ ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
IUnknown_Release(unk);
}
@@ -228,15 +228,15 @@ static void test_aggregation(void)
presenter = (void *)0xdeadbeef;
hr = CoCreateInstance(&CLSID_MFVideoMixer9, &test_outer, CLSCTX_INPROC_SERVER, &IID_IMFTransform,
(void **)&mixer);
- ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
ok(!mixer, "Got interface %p.\n", mixer);
hr = CoCreateInstance(&CLSID_MFVideoMixer9, &test_outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n");
ref = get_refcount(unk);
- ok(ref == 1, "Got unexpected refcount %d.\n", ref);
+ ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
IUnknown_Release(unk);
}
@@ -251,7 +251,7 @@ static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOO
expected_hr = supported ? S_OK : E_NOINTERFACE;
hr = IUnknown_QueryInterface(iface, iid, (void **)&unk);
- ok_(__FILE__, line)(hr == expected_hr, "Got hr %#x, expected %#x.\n", hr, expected_hr);
+ ok_(__FILE__, line)(hr == expected_hr, "Got hr %#lx, expected %#lx.\n", hr, expected_hr);
if (SUCCEEDED(hr))
IUnknown_Release(unk);
}
@@ -266,7 +266,7 @@ static void check_service_interface_(unsigned int line, void *iface_ptr, REFGUID
expected_hr = supported ? S_OK : E_NOINTERFACE;
hr = MFGetService(iface, service, iid, (void **)&unk);
- ok_(__FILE__, line)(hr == expected_hr, "Got hr %#x, expected %#x.\n", hr, expected_hr);
+ ok_(__FILE__, line)(hr == expected_hr, "Got hr %#lx, expected %#lx.\n", hr, expected_hr);
if (SUCCEEDED(hr))
IUnknown_Release(unk);
}
@@ -295,7 +295,7 @@ static void test_interfaces(void)
check_interface(filter, &IID_IVideoWindow, FALSE);
ref = IBaseFilter_Release(filter);
- ok(!ref, "Got unexpected refcount %d.\n", ref);
+ ok(!ref, "Got unexpected refcount %ld.\n", ref);
}
static void test_enum_pins(void)
@@ -307,85 +307,85 @@ static void test_enum_pins(void)
HRESULT hr;
ref = get_refcount(filter);
- ok(ref == 1, "Got unexpected refcount %d.\n", ref);
+ ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IBaseFilter_EnumPins(filter, NULL);
- ok(hr == E_POINTER, "Got hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBaseFilter_EnumPins(filter, &enum1);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = get_refcount(filter);
- ok(ref == 2, "Got unexpected refcount %d.\n", ref);
+ ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
ref = get_refcount(enum1);
- ok(ref == 1, "Got unexpected refcount %d.\n", ref);
+ ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, NULL, NULL);
- ok(hr == E_POINTER, "Got hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = get_refcount(filter);
- ok(ref == 3, "Got unexpected refcount %d.\n", ref);
+ ok(ref == 3, "Got unexpected refcount %ld.\n", ref);
ref = get_refcount(pins[0]);
- ok(ref == 3, "Got unexpected refcount %d.\n", ref);
+ ok(ref == 3, "Got unexpected refcount %ld.\n", ref);
ref = get_refcount(enum1);
- ok(ref == 1, "Got unexpected refcount %d.\n", ref);
+ ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
IPin_Release(pins[0]);
ref = get_refcount(filter);
- ok(ref == 2, "Got unexpected refcount %d.\n", ref);
+ ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, pins, NULL);
- ok(hr == S_FALSE, "Got hr %#x.\n", hr);
+ ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Reset(enum1);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, &count);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(count == 1, "Got count %u.\n", count);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ ok(count == 1, "Got count %lu.\n", count);
IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, &count);
- ok(hr == S_FALSE, "Got hr %#x.\n", hr);
- ok(!count, "Got count %u.\n", count);
+ ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
+ ok(!count, "Got count %lu.\n", count);
hr = IEnumPins_Reset(enum1);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, NULL);
- ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, &count);
- ok(hr == S_FALSE, "Got hr %#x.\n", hr);
- ok(count == 1, "Got count %u.\n", count);
+ ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
+ ok(count == 1, "Got count %lu.\n", count);
IPin_Release(pins[0]);
hr = IEnumPins_Reset(enum1);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Clone(enum1, &enum2);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 2);
- ok(hr == S_FALSE, "Got hr %#x.\n", hr);
+ ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1);
- ok(hr == S_FALSE, "Got hr %#x.\n", hr);
+ ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL);
- ok(hr == S_FALSE, "Got hr %#x.\n", hr);
+ ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum2, 1, pins, NULL);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
IPin_Release(pins[0]);
IEnumPins_Release(enum2);
IEnumPins_Release(enum1);
ref = IBaseFilter_Release(filter);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
}
static void test_find_pin(void)
@@ -397,19 +397,19 @@ static void test_find_pin(void)
ULONG ref;
hr = IBaseFilter_EnumPins(filter, &enum_pins);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_FindPin(filter, sink_id, &pin);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(pin2 == pin, "Expected pin %p, got %p.\n", pin, pin2);
IPin_Release(pin2);
IPin_Release(pin);
IEnumPins_Release(enum_pins);
ref = IBaseFilter_Release(filter);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
}
static void test_pin_info(void)
@@ -423,38 +423,38 @@ static void test_pin_info(void)
IPin *pin;
hr = IBaseFilter_FindPin(filter, sink_id, &pin);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = get_refcount(filter);
- ok(ref == 2, "Got unexpected refcount %d.\n", ref);
+ ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
ref = get_refcount(pin);
- ok(ref == 2, "Got unexpected refcount %d.\n", ref);
+ ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IPin_QueryPinInfo(pin, &info);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter);
ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir);
ok(!lstrcmpW(info.achName, sink_id), "Got name %s.\n", wine_dbgstr_w(info.achName));
ref = get_refcount(filter);
- ok(ref == 3, "Got unexpected refcount %d.\n", ref);
+ ok(ref == 3, "Got unexpected refcount %ld.\n", ref);
ref = get_refcount(pin);
- ok(ref == 3, "Got unexpected refcount %d.\n", ref);
+ ok(ref == 3, "Got unexpected refcount %ld.\n", ref);
IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(dir == PINDIR_INPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!lstrcmpW(id, sink_id), "Got id %s.\n", wine_dbgstr_w(id));
CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, NULL);
- ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
IPin_Release(pin);
ref = IBaseFilter_Release(filter);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
}
static unsigned int check_event_code(IMediaEvent *eventsrc, DWORD timeout, LONG expected_code, LONG_PTR expected1, LONG_PTR expected2)
@@ -468,14 +468,14 @@ static unsigned int check_event_code(IMediaEvent *eventsrc, DWORD timeout, LONG
{
if (code == expected_code)
{
- ok(param1 == expected1, "Got param1 %#lx.\n", param1);
- ok(param2 == expected2, "Got param2 %#lx.\n", param2);
+ ok(param1 == expected1, "Got param1 %#Ix.\n", param1);
+ ok(param2 == expected2, "Got param2 %#Ix.\n", param2);
ret++;
}
IMediaEvent_FreeEventParams(eventsrc, code, param1, param2);
timeout = 0;
}
- ok(hr == E_ABORT, "Got hr %#x.\n", hr);
+ ok(hr == E_ABORT, "Got hr %#lx.\n", hr);
return ret;
}
@@ -496,49 +496,49 @@ static void test_unconnected_eos(void)
ULONG ref;
hr = IFilterGraph2_AddFilter(graph, filter, L"renderer");
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&control);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaEvent, (void **)&eventsrc);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0);
ok(!ret, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Pause(control);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0);
ok(!ret, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Run(control);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0);
ok(ret == 1, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Pause(control);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0);
ok(!ret, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Run(control);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0);
ok(ret == 1, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Stop(control);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0);
ok(!ret, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Run(control);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0);
ok(ret == 1, "Got %u EC_COMPLETE events.\n", ret);
@@ -546,9 +546,9 @@ static void test_unconnected_eos(void)
IMediaControl_Release(control);
IMediaEvent_Release(eventsrc);
ref = IFilterGraph2_Release(graph);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
ref = IBaseFilter_Release(filter);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
}
static IMFMediaType * create_video_type(const GUID *subtype)
@@ -557,13 +557,13 @@ static IMFMediaType * create_video_type(const GUID *subtype)
HRESULT hr;
hr = MFCreateMediaType(&video_type);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(video_type, &MF_MT_MAJOR_TYPE, &MFMediaType_Video);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(video_type, &MF_MT_SUBTYPE, subtype);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
return video_type;
}
@@ -583,17 +583,18 @@ static void test_default_mixer(void)
IMFTransform *transform;
DXVA2_ValueRange range;
DXVA2_Fixed32 dxva_value;
- DWORD flags, value, count;
+ UINT32 count, value;
COLORREF color;
unsigned int i;
DWORD ids[16];
IUnknown *unk;
+ DWORD flags;
GUID *guids;
HRESULT hr;
IID iid;
hr = MFCreateVideoMixer(NULL, &IID_IDirect3DDevice9, &IID_IMFTransform, (void **)&transform);
- ok(hr == S_OK, "Failed to create default mixer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create default mixer, hr %#lx.\n", hr);
check_interface(transform, &IID_IMFQualityAdvise, TRUE);
check_interface(transform, &IID_IMFClockStateSink, TRUE);
@@ -612,105 +613,105 @@ static void test_default_mixer(void)
check_service_interface(transform, &MR_VIDEO_MIXER_SERVICE, &IID_IMFTransform, FALSE);
hr = MFGetService((IUnknown *)transform, &MR_VIDEO_RENDER_SERVICE, &IID_IUnknown, (void **)&unk);
- ok(hr == MF_E_UNSUPPORTED_SERVICE, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_UNSUPPORTED_SERVICE, "Unexpected hr %#lx.\n", hr);
if (SUCCEEDED(MFGetService((IUnknown *)transform, &MR_VIDEO_MIXER_SERVICE, &IID_IMFVideoMixerControl2, (void **)&mixer_control2)))
{
hr = IMFVideoMixerControl2_GetMixingPrefs(mixer_control2, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoMixerControl2_GetMixingPrefs(mixer_control2, &flags);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(!flags, "Unexpected flags %#x.\n", flags);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(!flags, "Unexpected flags %#lx.\n", flags);
IMFVideoMixerControl2_Release(mixer_control2);
}
hr = MFGetService((IUnknown *)transform, &MR_VIDEO_MIXER_SERVICE, &IID_IMFVideoProcessor, (void **)&processor);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoProcessor_GetBackgroundColor(processor, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
color = 1;
hr = IMFVideoProcessor_GetBackgroundColor(processor, &color);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(!color, "Unexpected color %#x.\n", color);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(!color, "Unexpected color %#lx.\n", color);
hr = IMFVideoProcessor_SetBackgroundColor(processor, 0x00121212);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoProcessor_GetBackgroundColor(processor, &color);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(color == 0x121212, "Unexpected color %#x.\n", color);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(color == 0x121212, "Unexpected color %#lx.\n", color);
hr = IMFVideoProcessor_GetFilteringRange(processor, DXVA2_DetailFilterChromaLevel, &range);
todo_wine
- ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoProcessor_GetFilteringValue(processor, DXVA2_DetailFilterChromaLevel, &dxva_value);
todo_wine
- ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoProcessor_GetAvailableVideoProcessorModes(processor, &count, &guids);
todo_wine
- ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
IMFVideoProcessor_Release(processor);
hr = IMFTransform_SetOutputBounds(transform, 100, 10);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_QueryInterface(transform, &IID_IMFVideoDeviceID, (void **)&deviceid);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetAttributes(transform, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetAttributes(transform, &attributes);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetAttributes(transform, &attributes2);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(attributes == attributes2, "Unexpected attributes instance.\n");
IMFAttributes_Release(attributes2);
hr = IMFTransform_QueryInterface(transform, &IID_IMFAttributes, (void **)&attributes2);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(attributes != attributes2, "Unexpected attributes instance.\n");
hr = IMFAttributes_QueryInterface(attributes2, &IID_IMFTransform, (void **)&unk);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IUnknown_Release(unk);
hr = IMFAttributes_GetCount(attributes2, &count);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(count == 1, "Unexpected attribute count %u.\n", count);
value = 0;
hr = IMFAttributes_GetUINT32(attributes2, &MF_SA_D3D_AWARE, &value);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(value == 1, "Unexpected value %d.\n", value);
IMFAttributes_Release(attributes2);
hr = IMFAttributes_GetCount(attributes, &count);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(count == 1, "Unexpected attribute count %u.\n", count);
memset(&rect, 0, sizeof(rect));
hr = IMFAttributes_GetBlob(attributes, &VIDEO_ZOOM_RECT, (UINT8 *)&rect, sizeof(rect), NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(rect.left == 0.0f && rect.top == 0.0f && rect.right == 1.0f && rect.bottom == 1.0f,
"Unexpected zoom rect (%f, %f) - (%f, %f).\n", rect.left, rect.top, rect.right, rect.bottom);
IMFAttributes_Release(attributes);
hr = IMFVideoDeviceID_GetDeviceID(deviceid, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDeviceID_GetDeviceID(deviceid, &iid);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(IsEqualIID(&iid, &IID_IDirect3DDevice9), "Unexpected id %s.\n", wine_dbgstr_guid(&iid));
IMFVideoDeviceID_Release(deviceid);
@@ -718,84 +719,84 @@ static void test_default_mixer(void)
/* Stream configuration. */
input_count = output_count = 0;
hr = IMFTransform_GetStreamCount(transform, &input_count, &output_count);
- ok(hr == S_OK, "Failed to get stream count, hr %#x.\n", hr);
- ok(input_count == 1 && output_count == 1, "Unexpected stream count %u/%u.\n", input_count, output_count);
+ ok(hr == S_OK, "Failed to get stream count, hr %#lx.\n", hr);
+ ok(input_count == 1 && output_count == 1, "Unexpected stream count %lu/%lu.\n", input_count, output_count);
hr = IMFTransform_GetStreamLimits(transform, &input_min, &input_max, &output_min, &output_max);
- ok(hr == S_OK, "Failed to get stream limits, hr %#x.\n", hr);
- ok(input_min == 1 && input_max == 16 && output_min == 1 && output_max == 1, "Unexpected stream limits %u/%u, %u/%u.\n",
+ ok(hr == S_OK, "Failed to get stream limits, hr %#lx.\n", hr);
+ ok(input_min == 1 && input_max == 16 && output_min == 1 && output_max == 1, "Unexpected stream limits %lu/%lu, %lu/%lu.\n",
input_min, input_max, output_min, output_max);
hr = IMFTransform_GetInputStreamInfo(transform, 1, &input_info);
- ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputStreamInfo(transform, 1, &output_info);
- ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
memset(&input_info, 0xcc, sizeof(input_info));
hr = IMFTransform_GetInputStreamInfo(transform, 0, &input_info);
- ok(hr == S_OK, "Failed to get input info, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to get input info, hr %#lx.\n", hr);
memset(&output_info, 0xcc, sizeof(output_info));
hr = IMFTransform_GetOutputStreamInfo(transform, 0, &output_info);
- ok(hr == S_OK, "Failed to get input info, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to get input info, hr %#lx.\n", hr);
ok(!(output_info.dwFlags & (MFT_OUTPUT_STREAM_PROVIDES_SAMPLES | MFT_OUTPUT_STREAM_CAN_PROVIDE_SAMPLES)),
- "Unexpected output flags %#x.\n", output_info.dwFlags);
+ "Unexpected output flags %#lx.\n", output_info.dwFlags);
hr = IMFTransform_GetStreamIDs(transform, 1, &input_id, 1, &output_id);
- ok(hr == S_OK, "Failed to get input info, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to get input info, hr %#lx.\n", hr);
ok(input_id == 0 && output_id == 0, "Unexpected stream ids.\n");
hr = IMFTransform_GetInputStreamAttributes(transform, 1, &attributes);
- ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputStreamAttributes(transform, 1, &attributes);
- ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputStreamAttributes(transform, 0, &attributes);
- ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_AddInputStreams(transform, 16, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_AddInputStreams(transform, 16, ids);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
memset(ids, 0, sizeof(ids));
hr = IMFTransform_AddInputStreams(transform, 15, ids);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(ids); ++i)
ids[i] = i + 1;
hr = IMFTransform_AddInputStreams(transform, 15, ids);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
input_count = output_count = 0;
hr = IMFTransform_GetStreamCount(transform, &input_count, &output_count);
- ok(hr == S_OK, "Failed to get stream count, hr %#x.\n", hr);
- ok(input_count == 16 && output_count == 1, "Unexpected stream count %u/%u.\n", input_count, output_count);
+ ok(hr == S_OK, "Failed to get stream count, hr %#lx.\n", hr);
+ ok(input_count == 16 && output_count == 1, "Unexpected stream count %lu/%lu.\n", input_count, output_count);
memset(&input_info, 0, sizeof(input_info));
hr = IMFTransform_GetInputStreamInfo(transform, 1, &input_info);
- ok(hr == S_OK, "Failed to get input info, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to get input info, hr %#lx.\n", hr);
ok((input_info.dwFlags & (MFT_INPUT_STREAM_REMOVABLE | MFT_INPUT_STREAM_OPTIONAL)) ==
- (MFT_INPUT_STREAM_REMOVABLE | MFT_INPUT_STREAM_OPTIONAL), "Unexpected flags %#x.\n", input_info.dwFlags);
+ (MFT_INPUT_STREAM_REMOVABLE | MFT_INPUT_STREAM_OPTIONAL), "Unexpected flags %#lx.\n", input_info.dwFlags);
attributes = NULL;
hr = IMFTransform_GetInputStreamAttributes(transform, 0, &attributes);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFAttributes_GetCount(attributes, &count);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(count == 1, "Unexpected count %u.\n", count);
hr = IMFAttributes_GetUINT32(attributes, &MF_SA_REQUIRED_SAMPLE_COUNT, &count);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(count == 1, "Unexpected count %u.\n", count);
ok(!!attributes, "Unexpected attributes.\n");
attributes2 = NULL;
hr = IMFTransform_GetInputStreamAttributes(transform, 0, &attributes2);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(attributes == attributes2, "Unexpected instance.\n");
IMFAttributes_Release(attributes2);
@@ -803,42 +804,43 @@ static void test_default_mixer(void)
attributes = NULL;
hr = IMFTransform_GetInputStreamAttributes(transform, 1, &attributes);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!!attributes, "Unexpected attributes.\n");
IMFAttributes_Release(attributes);
hr = IMFTransform_DeleteInputStream(transform, 0);
- ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_DeleteInputStream(transform, 1);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
input_count = output_count = 0;
hr = IMFTransform_GetStreamCount(transform, &input_count, &output_count);
- ok(hr == S_OK, "Failed to get stream count, hr %#x.\n", hr);
- ok(input_count == 15 && output_count == 1, "Unexpected stream count %u/%u.\n", input_count, output_count);
+ ok(hr == S_OK, "Failed to get stream count, hr %#lx.\n", hr);
+ ok(input_count == 15 && output_count == 1, "Unexpected stream count %lu/%lu.\n", input_count, output_count);
IMFTransform_Release(transform);
hr = MFCreateVideoMixer(NULL, &IID_IMFTransform, &IID_IMFTransform, (void **)&transform);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = CoCreateInstance(&CLSID_MFVideoMixer9, NULL, CLSCTX_INPROC_SERVER, &IID_IMFTransform, (void **)&transform);
- ok(hr == S_OK, "Failed to create default mixer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create default mixer, hr %#lx.\n", hr);
IMFTransform_Release(transform);
}
static void test_surface_sample(void)
{
IDirect3DSurface9 *backbuffer = NULL, *surface;
+ DWORD flags, buffer_count, length;
IMFDesiredSample *desired_sample;
IMFMediaBuffer *buffer, *buffer2;
LONGLONG duration, time1, time2;
IDirect3DSwapChain9 *swapchain;
- DWORD flags, count, length;
IDirect3DDevice9 *device;
IMFSample *sample;
IUnknown *unk;
+ UINT32 count;
HWND window;
HRESULT hr;
BYTE *data;
@@ -851,195 +853,195 @@ static void test_surface_sample(void)
}
hr = IDirect3DDevice9_GetSwapChain(device, 0, &swapchain);
- ok(SUCCEEDED(hr), "Failed to get the implicit swapchain (%08x)\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DSwapChain9_GetBackBuffer(swapchain, 0, D3DBACKBUFFER_TYPE_MONO, &backbuffer);
- ok(SUCCEEDED(hr), "Failed to get the back buffer (%08x)\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(backbuffer != NULL, "The back buffer is NULL\n");
IDirect3DSwapChain9_Release(swapchain);
hr = MFCreateVideoSampleFromSurface(NULL, &sample);
- ok(hr == S_OK, "Failed to create surface sample, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create surface sample, hr %#lx.\n", hr);
IMFSample_Release(sample);
hr = MFCreateVideoSampleFromSurface((IUnknown *)backbuffer, &sample);
- ok(hr == S_OK, "Failed to create surface sample, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create surface sample, hr %#lx.\n", hr);
hr = IMFSample_QueryInterface(sample, &IID_IMFTrackedSample, (void **)&unk);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IUnknown_Release(unk);
hr = IMFSample_QueryInterface(sample, &IID_IMFDesiredSample, (void **)&desired_sample);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_GetCount(sample, &count);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!count, "Unexpected attribute count %u.\n", count);
hr = IMFDesiredSample_GetDesiredSampleTimeAndDuration(desired_sample, NULL, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFDesiredSample_GetDesiredSampleTimeAndDuration(desired_sample, NULL, &time2);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFDesiredSample_GetDesiredSampleTimeAndDuration(desired_sample, &time1, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFDesiredSample_GetDesiredSampleTimeAndDuration(desired_sample, &time1, &time2);
- ok(hr == MF_E_NOT_AVAILABLE, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_NOT_AVAILABLE, "Unexpected hr %#lx.\n", hr);
IMFDesiredSample_SetDesiredSampleTimeAndDuration(desired_sample, 123, 456);
time1 = time2 = 0;
hr = IMFDesiredSample_GetDesiredSampleTimeAndDuration(desired_sample, &time1, &time2);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(time1 == 123 && time2 == 456, "Unexpected time values.\n");
IMFDesiredSample_SetDesiredSampleTimeAndDuration(desired_sample, 0, 0);
time1 = time2 = 1;
hr = IMFDesiredSample_GetDesiredSampleTimeAndDuration(desired_sample, &time1, &time2);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(time1 == 0 && time2 == 0, "Unexpected time values.\n");
IMFDesiredSample_Clear(desired_sample);
hr = IMFDesiredSample_GetDesiredSampleTimeAndDuration(desired_sample, &time1, &time2);
- ok(hr == MF_E_NOT_AVAILABLE, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_NOT_AVAILABLE, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_GetCount(sample, &count);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!count, "Unexpected attribute count %u.\n", count);
/* Attributes are cleared. */
hr = IMFSample_SetUnknown(sample, &MFSampleExtension_Token, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_GetCount(sample, &count);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(count == 1, "Unexpected attribute count %u.\n", count);
hr = IMFSample_SetSampleTime(sample, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_GetSampleTime(sample, &time1);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_SetSampleDuration(sample, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_GetSampleDuration(sample, &duration);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_SetSampleFlags(sample, 0x1);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMFDesiredSample_Clear(desired_sample);
hr = IMFSample_GetCount(sample, &count);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!count, "Unexpected attribute count %u.\n", count);
hr = IMFSample_GetSampleTime(sample, &time1);
- ok(hr == MF_E_NO_SAMPLE_TIMESTAMP, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_NO_SAMPLE_TIMESTAMP, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_GetSampleDuration(sample, &duration);
- ok(hr == MF_E_NO_SAMPLE_DURATION, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_NO_SAMPLE_DURATION, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_GetSampleFlags(sample, &flags);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(flags == 0, "Unexpected flags %#x.\n", flags);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(!flags, "Unexpected flags %#lx.\n", flags);
IMFDesiredSample_Release(desired_sample);
hr = IMFSample_GetCount(sample, &count);
- ok(hr == S_OK, "Failed to get attribute count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to get attribute count, hr %#lx.\n", hr);
ok(!count, "Unexpected attribute count.\n");
- count = 0;
- hr = IMFSample_GetBufferCount(sample, &count);
- ok(hr == S_OK, "Failed to get buffer count, hr %#x.\n", hr);
- ok(count == 1, "Unexpected attribute count.\n");
+ buffer_count = 0;
+ hr = IMFSample_GetBufferCount(sample, &buffer_count);
+ ok(hr == S_OK, "Failed to get buffer count, hr %#lx.\n", hr);
+ ok(buffer_count == 1, "Unexpected attribute count.\n");
hr = IMFSample_GetTotalLength(sample, &length);
- ok(hr == S_OK, "Failed to get length, hr %#x.\n", hr);
- ok(!length, "Unexpected length %u.\n", length);
+ ok(hr == S_OK, "Failed to get length, hr %#lx.\n", hr);
+ ok(!length, "Unexpected length %lu.\n", length);
hr = IMFSample_GetSampleDuration(sample, &duration);
- ok(hr == MF_E_NO_SAMPLE_DURATION, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_NO_SAMPLE_DURATION, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_GetSampleTime(sample, &duration);
- ok(hr == MF_E_NO_SAMPLE_TIMESTAMP, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_NO_SAMPLE_TIMESTAMP, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_GetBufferByIndex(sample, 0, &buffer);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaBuffer_GetMaxLength(buffer, &length);
- ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaBuffer_GetCurrentLength(buffer, &length);
- ok(hr == S_OK, "Failed to get length, hr %#x.\n", hr);
- ok(!length, "Unexpected length %u.\n", length);
+ ok(hr == S_OK, "Failed to get length, hr %#lx.\n", hr);
+ ok(!length, "Unexpected length %lu.\n", length);
hr = IMFMediaBuffer_SetCurrentLength(buffer, 16);
- ok(hr == S_OK, "Failed to get length, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to get length, hr %#lx.\n", hr);
hr = IMFMediaBuffer_GetCurrentLength(buffer, &length);
- ok(hr == S_OK, "Failed to get length, hr %#x.\n", hr);
- ok(length == 16, "Unexpected length %u.\n", length);
+ ok(hr == S_OK, "Failed to get length, hr %#lx.\n", hr);
+ ok(length == 16, "Unexpected length %lu.\n", length);
hr = IMFMediaBuffer_Lock(buffer, &data, NULL, NULL);
- ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaBuffer_Unlock(buffer);
- ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaBuffer_QueryInterface(buffer, &IID_IMF2DBuffer, (void **)&unk);
- ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_AddBuffer(sample, buffer);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
- hr = IMFSample_GetBufferCount(sample, &count);
- ok(hr == S_OK, "Failed to get buffer count, hr %#x.\n", hr);
- ok(count == 2, "Unexpected attribute count.\n");
+ hr = IMFSample_GetBufferCount(sample, &buffer_count);
+ ok(hr == S_OK, "Failed to get buffer count, hr %#lx.\n", hr);
+ ok(buffer_count == 2, "Unexpected buffer count.\n");
hr = IMFSample_ConvertToContiguousBuffer(sample, &buffer2);
- ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_CopyToBuffer(sample, buffer);
- ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_RemoveAllBuffers(sample);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
- hr = IMFSample_GetBufferCount(sample, &count);
- ok(hr == S_OK, "Failed to get buffer count, hr %#x.\n", hr);
- ok(!count, "Unexpected attribute count.\n");
+ hr = IMFSample_GetBufferCount(sample, &buffer_count);
+ ok(hr == S_OK, "Failed to get buffer count, hr %#lx.\n", hr);
+ ok(!buffer_count, "Unexpected buffer count.\n");
hr = MFGetService((IUnknown *)buffer, &MR_BUFFER_SERVICE, &IID_IDirect3DSurface9, (void **)&surface);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(surface == backbuffer, "Unexpected instance.\n");
IDirect3DSurface9_Release(surface);
hr = MFGetService((IUnknown *)buffer, &MR_BUFFER_SERVICE, &IID_IUnknown, (void **)&surface);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(surface == backbuffer, "Unexpected instance.\n");
IDirect3DSurface9_Release(surface);
IMFMediaBuffer_Release(buffer);
hr = IMFSample_GetSampleFlags(sample, &flags);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_SetSampleFlags(sample, 0x123);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
flags = 0;
hr = IMFSample_GetSampleFlags(sample, &flags);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(flags == 0x123, "Unexpected flags %#x.\n", flags);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(flags == 0x123, "Unexpected flags %#lx.\n", flags);
IMFSample_Release(sample);
@@ -1060,38 +1062,38 @@ static void test_default_mixer_type_negotiation(void)
IMFMediaType *video_type;
IMFTransform *transform;
MFVideoArea aperture;
- DWORD index, count;
+ UINT count, token;
IUnknown *unk;
+ DWORD index;
HWND window;
HRESULT hr;
- UINT token;
hr = MFCreateVideoMixer(NULL, &IID_IDirect3DDevice9, &IID_IMFTransform, (void **)&transform);
- ok(hr == S_OK, "Failed to create default mixer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create default mixer, hr %#lx.\n", hr);
hr = IMFTransform_GetInputAvailableType(transform, 0, 0, &media_type);
- ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetInputCurrentType(transform, 0, &media_type);
- ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputAvailableType(transform, 0, 0, &media_type);
- ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = MFCreateMediaType(&media_type);
- ok(hr == S_OK, "Failed to create media type, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create media type, hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(media_type, &MF_MT_MAJOR_TYPE, &MFMediaType_Video);
- ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(media_type, &MF_MT_SUBTYPE, &MFVideoFormat_RGB32);
- ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = IMFTransform_SetInputType(transform, 0, media_type, 0);
- ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetInputType(transform, 0, media_type, MFT_SET_TYPE_TEST_ONLY);
- ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#lx.\n", hr);
/* Now try with device manager. */
@@ -1103,69 +1105,69 @@ static void test_default_mixer_type_negotiation(void)
}
hr = DXVA2CreateDirect3DDeviceManager9(&token, &manager);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_ProcessMessage(transform, MFT_MESSAGE_SET_D3D_MANAGER, (ULONG_PTR)manager);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Now manager is not initialized. */
hr = IMFTransform_SetInputType(transform, 0, media_type, 0);
- ok(hr == DXVA2_E_NOT_INITIALIZED, "Unexpected hr %#x.\n", hr);
+ ok(hr == DXVA2_E_NOT_INITIALIZED, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetInputType(transform, 0, media_type, MFT_SET_TYPE_TEST_ONLY);
- ok(hr == DXVA2_E_NOT_INITIALIZED, "Unexpected hr %#x.\n", hr);
+ ok(hr == DXVA2_E_NOT_INITIALIZED, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DDeviceManager9_ResetDevice(manager, device, token);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* And now type description is incomplete. */
hr = IMFTransform_SetInputType(transform, 0, media_type, 0);
- ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#lx.\n", hr);
IMFMediaType_Release(media_type);
video_type = create_video_type(&MFVideoFormat_RGB32);
/* Partially initialized type. */
hr = IMFTransform_SetInputType(transform, 0, video_type, 0);
- ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#lx.\n", hr);
/* Only required data - frame size and uncompressed marker. */
hr = IMFMediaType_SetUINT64(video_type, &MF_MT_FRAME_SIZE, (UINT64)640 << 32 | 480);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetUINT32(video_type, &MF_MT_ALL_SAMPLES_INDEPENDENT, TRUE);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
memset(&aperture, 0, sizeof(aperture));
aperture.Area.cx = 100; aperture.Area.cy = 200;
hr = IMFMediaType_SetBlob(video_type, &MF_MT_GEOMETRIC_APERTURE, (UINT8 *)&aperture, sizeof(aperture));
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetUINT32(video_type, &MF_MT_FIXED_SIZE_SAMPLES, 2);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetInputType(transform, 0, video_type, MFT_SET_TYPE_TEST_ONLY);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputAvailableType(transform, 0, 0, &media_type);
- ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetInputCurrentType(transform, 0, &media_type);
- ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetInputType(transform, 0, video_type, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetInputCurrentType(transform, 0, &media_type);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(media_type == video_type, "Unexpected media type instance.\n");
hr = IMFTransform_GetInputCurrentType(transform, 0, &media_type2);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(media_type == media_type2, "Unexpected media type instance.\n");
IMFMediaType_Release(media_type);
IMFMediaType_Release(media_type2);
/* Modified after type was set. */
hr = IMFMediaType_SetUINT64(video_type, &MF_MT_PIXEL_ASPECT_RATIO, (UINT64)56 << 32 | 55);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Check attributes on available output types. */
index = 0;
@@ -1177,30 +1179,30 @@ static void test_default_mixer_type_negotiation(void)
UINT32 value;
hr = IMFMediaType_GetGUID(media_type, &MF_MT_MAJOR_TYPE, &major);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(IsEqualGUID(&major, &MFMediaType_Video), "Unexpected major type.\n");
hr = IMFMediaType_GetGUID(media_type, &MF_MT_SUBTYPE, &subtype);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_GetUINT64(media_type, &MF_MT_FRAME_SIZE, &frame_size);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(frame_size == ((UINT64)100 << 32 | 200), "Unexpected frame size %s.\n", wine_dbgstr_longlong(frame_size));
hr = IMFMediaType_GetUINT32(media_type, &MF_MT_ALL_SAMPLES_INDEPENDENT, &value);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_GetUINT32(media_type, &MF_MT_INTERLACE_MODE, &value);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(value == MFVideoInterlace_Progressive, "Unexpected interlace mode.\n");
/* Ratio from input type */
hr = IMFMediaType_GetUINT64(media_type, &MF_MT_PIXEL_ASPECT_RATIO, &ratio);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(ratio == ((UINT64)1 << 32 | 1), "Unexpected PAR %s.\n", wine_dbgstr_longlong(ratio));
hr = IMFMediaType_GetBlob(media_type, &MF_MT_GEOMETRIC_APERTURE, (UINT8 *)&aperture, sizeof(aperture), NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(aperture.Area.cx == 100 && aperture.Area.cy == 200, "Unexpected aperture area.\n");
hr = IMFMediaType_GetBlob(media_type, &MF_MT_MINIMUM_DISPLAY_APERTURE, (UINT8 *)&aperture, sizeof(aperture), NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(aperture.Area.cx == 100 && aperture.Area.cy == 200, "Unexpected aperture area.\n");
hr = IMFMediaType_GetUINT32(video_type, &MF_MT_FIXED_SIZE_SAMPLES, &value);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(value == 2, "Unexpected value %u.\n", value);
IMFMediaType_Release(media_type);
@@ -1208,10 +1210,10 @@ static void test_default_mixer_type_negotiation(void)
ok(index > 1, "Unexpected number of available types.\n");
hr = IMFMediaType_DeleteItem(video_type, &MF_MT_FIXED_SIZE_SAMPLES);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetInputType(transform, 0, video_type, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
index = 0;
while (SUCCEEDED(IMFTransform_GetOutputAvailableType(transform, 0, index++, &media_type)))
@@ -1220,11 +1222,11 @@ static void test_default_mixer_type_negotiation(void)
UINT64 ratio;
hr = IMFMediaType_GetUINT64(media_type, &MF_MT_PIXEL_ASPECT_RATIO, &ratio);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(ratio == ((UINT64)56 << 32 | 55), "Unexpected PAR %s.\n", wine_dbgstr_longlong(ratio));
hr = IMFMediaType_GetUINT32(media_type, &MF_MT_FIXED_SIZE_SAMPLES, &value);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(value == 1, "Unexpected value %u.\n", value);
IMFMediaType_Release(media_type);
@@ -1233,97 +1235,97 @@ static void test_default_mixer_type_negotiation(void)
/* Cloned type is returned. */
hr = IMFTransform_GetOutputAvailableType(transform, 0, 0, &media_type);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputAvailableType(transform, 0, 0, &media_type2);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(media_type != media_type2, "Unexpected media type instance.\n");
IMFMediaType_Release(media_type);
IMFMediaType_Release(media_type2);
/* Minimal valid attribute set for output type. */
hr = IMFTransform_GetOutputAvailableType(transform, 0, 0, &media_type);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = MFCreateMediaType(&media_type2);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_GetGUID(media_type, &MF_MT_SUBTYPE, &subtype);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(media_type2, &MF_MT_MAJOR_TYPE, &MFMediaType_Video);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(media_type2, &MF_MT_SUBTYPE, &subtype);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetOutputType(transform, 1, NULL, MFT_SET_TYPE_TEST_ONLY);
- ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetOutputType(transform, 0, NULL, MFT_SET_TYPE_TEST_ONLY);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetOutputType(transform, 0, media_type2, MFT_SET_TYPE_TEST_ONLY);
- ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetUINT32(media_type2, &MF_MT_ALL_SAMPLES_INDEPENDENT, TRUE);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetOutputType(transform, 0, media_type2, MFT_SET_TYPE_TEST_ONLY);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Candidate type have frame size set, mismatching size is accepted. */
hr = IMFMediaType_SetUINT64(media_type2, &MF_MT_FRAME_SIZE, (UINT64)64 << 32 | 64);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetOutputType(transform, 0, media_type2, MFT_SET_TYPE_TEST_ONLY);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMFMediaType_Release(media_type2);
IMFMediaType_Release(media_type);
hr = IMFTransform_QueryInterface(transform, &IID_IMFVideoProcessor, (void **)&processor);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoProcessor_GetVideoProcessorMode(processor, &guid);
todo_wine
- ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoProcessor_GetVideoProcessorCaps(processor, (GUID *)&DXVA2_VideoProcSoftwareDevice, &caps);
todo_wine
- ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetInputCurrentType(transform, 0, &media_type);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(media_type == video_type, "Unexpected pointer.\n");
hr = IMFMediaType_QueryInterface(media_type, &IID_IMFVideoMediaType, (void **)&unk);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IUnknown_Release(unk);
IMFMediaType_Release(media_type);
hr = IMFVideoProcessor_GetAvailableVideoProcessorModes(processor, &count, &guids);
todo_wine
- ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputAvailableType(transform, 0, 0, &media_type);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetOutputType(transform, 1, media_type, 0);
- ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetOutputType(transform, 0, media_type, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoProcessor_GetVideoProcessorMode(processor, &guid);
todo_wine
- ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoProcessor_GetAvailableVideoProcessorModes(processor, &count, &guids);
todo_wine
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (SUCCEEDED(hr))
CoTaskMemFree(guids);
hr = IMFTransform_GetOutputCurrentType(transform, 0, &media_type2);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(media_type == media_type2, "Unexpected media type instance.\n");
IMFMediaType_Release(media_type2);
IMFMediaType_Release(media_type);
@@ -1356,10 +1358,10 @@ static void test_default_presenter(void)
GUID iid;
hr = MFCreateVideoPresenter(NULL, &IID_IMFVideoPresenter, &IID_IMFVideoPresenter, (void **)&presenter);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = MFCreateVideoPresenter(NULL, &IID_IDirect3DDevice9, &IID_IMFVideoPresenter, (void **)&presenter);
- ok(hr == S_OK, "Failed to create default presenter, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create default presenter, hr %#lx.\n", hr);
check_interface(presenter, &IID_IQualProp, TRUE);
check_interface(presenter, &IID_IMFVideoPositionMapper, TRUE);
@@ -1390,101 +1392,101 @@ static void test_default_presenter(void)
/* Query arbitrary supported interface back from device manager wrapper. */
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IDirect3DDeviceManager9, (void **)&dm);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DDeviceManager9_QueryInterface(dm, &IID_IQualProp, (void **)&unk);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IUnknown_Release(unk);
hr = IDirect3DDeviceManager9_QueryInterface(dm, &IID_IUnknown, (void **)&unk);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IUnknown, (void **)&unk2);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(unk == unk2, "Unexpected interface.\n");
IUnknown_Release(unk2);
IUnknown_Release(unk);
IDirect3DDeviceManager9_Release(dm);
hr = MFGetService((IUnknown *)presenter, &MR_VIDEO_MIXER_SERVICE, &IID_IUnknown, (void **)&unk);
- ok(hr == MF_E_UNSUPPORTED_SERVICE, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_UNSUPPORTED_SERVICE, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFVideoDeviceID, (void **)&deviceid);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDeviceID_GetDeviceID(deviceid, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDeviceID_GetDeviceID(deviceid, &iid);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(IsEqualIID(&iid, &IID_IDirect3DDevice9), "Unexpected id %s.\n", wine_dbgstr_guid(&iid));
IMFVideoDeviceID_Release(deviceid);
hr = MFGetService((IUnknown *)presenter, &MR_VIDEO_RENDER_SERVICE, &IID_IMFVideoDisplayControl, (void **)&display_control);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_GetRenderingPrefs(display_control, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
flags = 123;
hr = IMFVideoDisplayControl_GetRenderingPrefs(display_control, &flags);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(!flags, "Unexpected rendering flags %#x.\n", flags);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(!flags, "Unexpected rendering flags %#lx.\n", flags);
IMFVideoDisplayControl_Release(display_control);
hr = MFGetService((IUnknown *)presenter, &MR_VIDEO_ACCELERATION_SERVICE, &IID_IDirect3DDeviceManager9, (void **)&dm);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFVideoDisplayControl, (void **)&display_control);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Video window */
hwnd = create_window();
ok(!!hwnd, "Failed to create a test window.\n");
hr = IMFVideoDisplayControl_GetVideoWindow(display_control, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hwnd2 = hwnd;
hr = IMFVideoDisplayControl_GetVideoWindow(display_control, &hwnd2);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(hwnd2 == NULL, "Unexpected window %p.\n", hwnd2);
hr = IMFVideoDisplayControl_SetVideoWindow(display_control, NULL);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_SetVideoWindow(display_control, (HWND)0x1);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_SetVideoWindow(display_control, hwnd);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hwnd2 = NULL;
hr = IMFVideoDisplayControl_GetVideoWindow(display_control, &hwnd2);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(hwnd2 == hwnd, "Unexpected window %p.\n", hwnd2);
/* Rate support. */
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFRateSupport, (void **)&rate_support);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
rate = 1.0f;
hr = IMFRateSupport_GetSlowestRate(rate_support, MFRATE_FORWARD, FALSE, &rate);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(rate == 0.0f, "Unexpected rate %f.\n", rate);
rate = 1.0f;
hr = IMFRateSupport_GetSlowestRate(rate_support, MFRATE_FORWARD, TRUE, &rate);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(rate == 0.0f, "Unexpected rate %f.\n", rate);
rate = 1.0f;
hr = IMFRateSupport_GetSlowestRate(rate_support, MFRATE_REVERSE, FALSE, &rate);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(rate == 0.0f, "Unexpected rate %f.\n", rate);
rate = 1.0f;
hr = IMFRateSupport_GetSlowestRate(rate_support, MFRATE_REVERSE, TRUE, &rate);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(rate == 0.0f, "Unexpected rate %f.\n", rate);
IMFRateSupport_Release(rate_support);
@@ -1500,7 +1502,7 @@ static void test_MFCreateVideoMixerAndPresenter(void)
HRESULT hr;
hr = MFCreateVideoMixerAndPresenter(NULL, NULL, &IID_IUnknown, (void **)&mixer, &IID_IUnknown, (void **)&presenter);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IUnknown_Release(mixer);
IUnknown_Release(presenter);
@@ -1564,97 +1566,97 @@ static void test_MFCreateVideoSampleAllocator(void)
BYTE *data;
hr = MFCreateVideoSampleAllocator(&IID_IUnknown, (void **)&unk);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IUnknown_Release(unk);
hr = MFCreateVideoSampleAllocator(&IID_IMFVideoSampleAllocator, (void **)&allocator);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocator_QueryInterface(allocator, &IID_IMFVideoSampleAllocatorCallback, (void **)&allocator_cb);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocatorCallback_SetCallback(allocator_cb, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocatorCallback_SetCallback(allocator_cb, &test_notify);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocatorCallback_SetCallback(allocator_cb, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocatorCallback_GetFreeSampleCount(allocator_cb, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
count = 10;
hr = IMFVideoSampleAllocatorCallback_GetFreeSampleCount(allocator_cb, &count);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(!count, "Unexpected count %d.\n", count);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(!count, "Unexpected count %ld.\n", count);
hr = IMFVideoSampleAllocator_UninitializeSampleAllocator(allocator);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocator_AllocateSample(allocator, &sample);
- ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocator_SetDirectXManager(allocator, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = MFCreateMediaType(&media_type);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* It expects IMFVideoMediaType aka video major type. Exact return code is E_NOINTERFACE,
likely coming from querying for IMFVideoMediaType. Does not seem valuable to match it. */
hr = IMFVideoSampleAllocator_InitializeSampleAllocator(allocator, 2, media_type);
- ok(FAILED(hr), "Unexpected hr %#x.\n", hr);
+ ok(FAILED(hr), "Unexpected hr %#lx.\n", hr);
video_type = create_video_type(&MFVideoFormat_RGB32);
hr = IMFVideoSampleAllocator_InitializeSampleAllocator(allocator, 2, video_type);
- ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#lx.\n", hr);
/* Frame size is required. */
hr = IMFMediaType_SetUINT64(video_type, &MF_MT_FRAME_SIZE, (UINT64) 320 << 32 | 240);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocator_InitializeSampleAllocator(allocator, 0, video_type);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocatorCallback_GetFreeSampleCount(allocator_cb, &count);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(count == 1, "Unexpected count %d.\n", count);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(count == 1, "Unexpected count %ld.\n", count);
sample = NULL;
hr = IMFVideoSampleAllocator_AllocateSample(allocator, &sample);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
refcount = get_refcount(sample);
hr = IMFVideoSampleAllocator_AllocateSample(allocator, &sample2);
- ok(hr == MF_E_SAMPLEALLOCATOR_EMPTY, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SAMPLEALLOCATOR_EMPTY, "Unexpected hr %#lx.\n", hr);
/* Reinitialize with active sample. */
hr = IMFVideoSampleAllocator_InitializeSampleAllocator(allocator, 4, video_type);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(refcount == get_refcount(sample), "Unexpected refcount %u.\n", get_refcount(sample));
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(refcount == get_refcount(sample), "Unexpected refcount %lu.\n", get_refcount(sample));
hr = IMFVideoSampleAllocatorCallback_GetFreeSampleCount(allocator_cb, &count);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(count == 4, "Unexpected count %d.\n", count);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(count == 4, "Unexpected count %ld.\n", count);
check_interface(sample, &IID_IMFDesiredSample, TRUE);
check_interface(sample, &IID_IMFTrackedSample, TRUE);
hr = IMFSample_GetBufferByIndex(sample, 0, &buffer);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
check_interface(buffer, &IID_IMF2DBuffer, TRUE);
hr = IMFMediaBuffer_QueryInterface(buffer, &IID_IMFGetService, (void **)&gs);
- ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* Win7 */, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* Win7 */, "Unexpected hr %#lx.\n", hr);
/* Device manager wasn't set, sample gets regular memory buffers. */
if (SUCCEEDED(hr))
{
hr = IMFGetService_GetService(gs, &MR_BUFFER_SERVICE, &IID_IDirect3DSurface9, (void **)&surface);
- ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
IMFGetService_Release(gs);
}
@@ -1667,7 +1669,7 @@ static void test_MFCreateVideoSampleAllocator(void)
IMFVideoSampleAllocator_Release(allocator);
hr = MFCreateVideoSampleAllocator(&IID_IMFVideoSampleAllocatorCallback, (void **)&unk);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IUnknown_Release(unk);
/* Using device manager */
@@ -1679,39 +1681,39 @@ static void test_MFCreateVideoSampleAllocator(void)
}
hr = DXVA2CreateDirect3DDeviceManager9(&token, &manager);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DDeviceManager9_ResetDevice(manager, device, token);
- ok(hr == S_OK, "Failed to set a device, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to set a device, hr %#lx.\n", hr);
hr = MFCreateVideoSampleAllocator(&IID_IMFVideoSampleAllocator, (void **)&allocator);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocator_SetDirectXManager(allocator, (IUnknown *)manager);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetUINT64(video_type, &MF_MT_FRAME_SIZE, (UINT64) 320 << 32 | 240);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocator_InitializeSampleAllocator(allocator, 0, video_type);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocator_AllocateSample(allocator, &sample);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
check_interface(sample, &IID_IMFTrackedSample, TRUE);
check_interface(sample, &IID_IMFDesiredSample, TRUE);
hr = IMFSample_GetBufferByIndex(sample, 0, &buffer);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
check_service_interface(buffer, &MR_BUFFER_SERVICE, &IID_IDirect3DSurface9, TRUE);
check_interface(buffer, &IID_IMF2DBuffer, TRUE);
check_interface(buffer, &IID_IMF2DBuffer2, TRUE);
hr = IMFMediaBuffer_Lock(buffer, &data, NULL, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaBuffer_Unlock(buffer);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMFSample_Release(sample);
@@ -1772,7 +1774,7 @@ static HRESULT WINAPI test_host_LookupService(IMFTopologyServiceLookup *iface,
{
struct test_host *host = impl_from_test_host(iface);
- ok(*num_objects == 1, "Unexpected number of requested objects %u\n", *num_objects);
+ ok(*num_objects == 1, "Unexpected number of requested objects %lu\n", *num_objects);
memset(objects, 0, *num_objects * sizeof(*objects));
@@ -1863,8 +1865,8 @@ static void test_presenter_video_position(void)
struct test_host host;
IMFTransform *mixer;
RECT dst_rect;
+ UINT32 count;
HRESULT hr;
- DWORD count;
HWND hwnd;
hwnd = create_window();
@@ -1872,148 +1874,148 @@ static void test_presenter_video_position(void)
/* Setting position without the mixer. */
hr = MFCreateVideoPresenter(NULL, &IID_IDirect3DDevice9, &IID_IMFVideoPresenter, (void **)&presenter);
- ok(hr == S_OK, "Failed to create default presenter, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create default presenter, hr %#lx.\n", hr);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFVideoDisplayControl, (void **)&display_control);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_ProcessMessage(presenter, MFVP_MESSAGE_INVALIDATEMEDIATYPE, 0);
- ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
SetRect(&dst_rect, 0, 0, 10, 10);
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, NULL, &dst_rect);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_SetVideoWindow(display_control, hwnd);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_ProcessMessage(presenter, MFVP_MESSAGE_INVALIDATEMEDIATYPE, 0);
- ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, NULL, &dst_rect);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMFVideoDisplayControl_Release(display_control);
IMFVideoPresenter_Release(presenter);
/* With the mixer. */
hr = MFCreateVideoMixer(NULL, &IID_IDirect3DDevice9, &IID_IMFTransform, (void **)&mixer);
- ok(hr == S_OK, "Failed to create a mixer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create a mixer, hr %#lx.\n", hr);
hr = MFCreateVideoPresenter(NULL, &IID_IDirect3DDevice9, &IID_IMFVideoPresenter, (void **)&presenter);
- ok(hr == S_OK, "Failed to create default presenter, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create default presenter, hr %#lx.\n", hr);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFVideoDisplayControl, (void **)&display_control);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFTopologyServiceLookupClient, (void **)&lookup_client);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
init_test_host(&host, mixer, presenter);
/* Clear default mixer attributes, then attach presenter. */
hr = IMFTransform_GetAttributes(mixer, &mixer_attributes);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFAttributes_DeleteAllItems(mixer_attributes);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTopologyServiceLookupClient_InitServicePointers(lookup_client, &host.IMFTopologyServiceLookup_iface);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFAttributes_GetCount(mixer_attributes, &count);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(count == 1, "Unexpected count %u.\n", count);
memset(&src_rect, 0, sizeof(src_rect));
hr = IMFAttributes_GetBlob(mixer_attributes, &VIDEO_ZOOM_RECT, (UINT8 *)&src_rect, sizeof(src_rect), NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(src_rect.left == 0.0f && src_rect.top == 0.0f && src_rect.right == 1.0f &&
src_rect.bottom == 1.0f, "Unexpected source rectangle.\n");
hr = IMFVideoDisplayControl_GetVideoPosition(display_control, NULL, &dst_rect);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_GetVideoPosition(display_control, &src_rect, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
SetRect(&dst_rect, 1, 2, 3, 4);
hr = IMFVideoDisplayControl_GetVideoPosition(display_control, &src_rect, &dst_rect);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(src_rect.left == 0.0f && src_rect.top == 0.0f && src_rect.right == 1.0f &&
src_rect.bottom == 1.0f, "Unexpected source rectangle.\n");
ok(dst_rect.left == 0 && dst_rect.right == 0 && dst_rect.top == 0 && dst_rect.bottom == 0,
"Unexpected destination rectangle %s.\n", wine_dbgstr_rect(&dst_rect));
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, NULL, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
/* Setting position requires a window. */
SetRect(&dst_rect, 0, 0, 10, 10);
memset(&src_rect, 0, sizeof(src_rect));
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, &src_rect, &dst_rect);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_SetVideoWindow(display_control, hwnd);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SetRect(&dst_rect, 0, 0, 10, 10);
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, NULL, &dst_rect);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SetRect(&dst_rect, 1, 2, 3, 4);
hr = IMFVideoDisplayControl_GetVideoPosition(display_control, &src_rect, &dst_rect);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(dst_rect.left == 0 && dst_rect.right == 10 && dst_rect.top == 0 && dst_rect.bottom == 10,
"Unexpected destination rectangle %s.\n", wine_dbgstr_rect(&dst_rect));
set_rect(&src_rect, 0.0f, 0.0f, 2.0f, 1.0f);
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, &src_rect, NULL);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
set_rect(&src_rect, -0.1f, 0.0f, 0.9f, 1.0f);
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, &src_rect, NULL);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* Flipped source rectangle. */
set_rect(&src_rect, 0.5f, 0.0f, 0.4f, 1.0f);
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, &src_rect, NULL);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
set_rect(&src_rect, 0.0f, 0.5f, 0.4f, 0.1f);
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, &src_rect, NULL);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
set_rect(&src_rect, 0.1f, 0.2f, 0.8f, 0.9f);
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, &src_rect, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Presenter updates mixer attribute. */
memset(&src_rect, 0, sizeof(src_rect));
hr = IMFAttributes_GetBlob(mixer_attributes, &VIDEO_ZOOM_RECT, (UINT8 *)&src_rect, sizeof(src_rect), NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(src_rect.left == 0.1f && src_rect.top == 0.2f && src_rect.right == 0.8f &&
src_rect.bottom == 0.9f, "Unexpected source rectangle.\n");
hr = IMFVideoDisplayControl_GetVideoPosition(display_control, &src_rect, &dst_rect);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(src_rect.left == 0.1f && src_rect.top == 0.2f && src_rect.right == 0.8f &&
src_rect.bottom == 0.9f, "Unexpected source rectangle.\n");
SetRect(&dst_rect, 1, 2, 999, 1000);
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, NULL, &dst_rect);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SetRect(&dst_rect, 0, 1, 3, 4);
hr = IMFVideoDisplayControl_GetVideoPosition(display_control, &src_rect, &dst_rect);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(dst_rect.left == 1 && dst_rect.right == 999 && dst_rect.top == 2 && dst_rect.bottom == 1000,
"Unexpected destination rectangle %s.\n", wine_dbgstr_rect(&dst_rect));
/* Flipped destination rectangle. */
SetRect(&dst_rect, 100, 1, 50, 1000);
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, NULL, &dst_rect);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
SetRect(&dst_rect, 1, 100, 100, 50);
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, NULL, &dst_rect);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
IMFVideoDisplayControl_Release(display_control);
@@ -2038,86 +2040,86 @@ static void test_presenter_native_video_size(void)
IDirect3DDeviceManager9 *dm;
hr = MFCreateVideoMixer(NULL, &IID_IDirect3DDevice9, &IID_IMFTransform, (void **)&mixer);
- ok(hr == S_OK, "Failed to create a mixer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create a mixer, hr %#lx.\n", hr);
hr = MFCreateVideoPresenter(NULL, &IID_IDirect3DDevice9, &IID_IMFVideoPresenter, (void **)&presenter);
- ok(hr == S_OK, "Failed to create default presenter, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create default presenter, hr %#lx.\n", hr);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFTopologyServiceLookupClient, (void **)&lookup_client);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFVideoDisplayControl, (void **)&display_control);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_GetNativeVideoSize(display_control, NULL, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
memset(&size, 0xcc, sizeof(size));
hr = IMFVideoDisplayControl_GetNativeVideoSize(display_control, &size, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(size.cx == 0 && size.cy == 0, "Unexpected size.\n");
memset(&ratio, 0xcc, sizeof(ratio));
hr = IMFVideoDisplayControl_GetNativeVideoSize(display_control, NULL, &ratio);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(ratio.cx == 0 && ratio.cy == 0, "Unexpected ratio.\n");
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFTopologyServiceLookupClient, (void **)&lookup_client);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Configure mixer primary stream. */
hr = MFGetService((IUnknown *)presenter, &MR_VIDEO_ACCELERATION_SERVICE, &IID_IDirect3DDeviceManager9, (void **)&dm);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_ProcessMessage(mixer, MFT_MESSAGE_SET_D3D_MANAGER, (ULONG_PTR)dm);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IDirect3DDeviceManager9_Release(dm);
video_type = create_video_type(&MFVideoFormat_RGB32);
hr = IMFMediaType_SetUINT64(video_type, &MF_MT_FRAME_SIZE, (UINT64)640 << 32 | 480);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetUINT32(video_type, &MF_MT_ALL_SAMPLES_INDEPENDENT, TRUE);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetInputType(mixer, 0, video_type, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Native video size is cached on initialization. */
init_test_host(&host, mixer, presenter);
hr = IMFTopologyServiceLookupClient_InitServicePointers(lookup_client, &host.IMFTopologyServiceLookup_iface);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_GetNativeVideoSize(display_control, &size, &ratio);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(size.cx == 640 && size.cy == 480, "Unexpected size %u x %u.\n", size.cx, size.cy);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(size.cx == 640 && size.cy == 480, "Unexpected size %lu x %lu.\n", size.cx, size.cy);
ok((ratio.cx == 4 && ratio.cy == 3) || broken(!memcmp(&ratio, &size, sizeof(ratio))) /* < Win10 */,
- "Unexpected ratio %u x %u.\n", ratio.cx, ratio.cy);
+ "Unexpected ratio %lu x %lu.\n", ratio.cx, ratio.cy);
/* Update input type. */
hr = IMFMediaType_SetUINT64(video_type, &MF_MT_FRAME_SIZE, (UINT64)320 << 32 | 240);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetInputType(mixer, 0, video_type, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_GetNativeVideoSize(display_control, &size, &ratio);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(size.cx == 640 && size.cy == 480, "Unexpected size %u x %u.\n", size.cx, size.cy);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(size.cx == 640 && size.cy == 480, "Unexpected size %lu x %lu.\n", size.cx, size.cy);
ok((ratio.cx == 4 && ratio.cy == 3) || broken(!memcmp(&ratio, &size, sizeof(ratio))) /* < Win10 */,
- "Unexpected ratio %u x %u.\n", ratio.cx, ratio.cy);
+ "Unexpected ratio %lu x %lu.\n", ratio.cx, ratio.cy);
/* Negotiating types updates native video size. */
hr = IMFVideoPresenter_ProcessMessage(presenter, MFVP_MESSAGE_INVALIDATEMEDIATYPE, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_GetNativeVideoSize(display_control, &size, &ratio);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(size.cx == 320 && size.cy == 240, "Unexpected size %u x %u.\n", size.cx, size.cy);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(size.cx == 320 && size.cy == 240, "Unexpected size %lu x %lu.\n", size.cx, size.cy);
ok((ratio.cx == 4 && ratio.cy == 3) || broken(!memcmp(&ratio, &size, sizeof(ratio))) /* < Win10 */,
- "Unexpected ratio %u x %u.\n", ratio.cx, ratio.cy);
+ "Unexpected ratio %lu x %lu.\n", ratio.cx, ratio.cy);
IMFMediaType_Release(video_type);
IMFVideoDisplayControl_Release(display_control);
@@ -2132,26 +2134,26 @@ static void test_presenter_ar_mode(void)
DWORD mode;
hr = MFCreateVideoPresenter(NULL, &IID_IDirect3DDevice9, &IID_IMFVideoDisplayControl, (void **)&display_control);
- ok(hr == S_OK, "Failed to create default presenter, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create default presenter, hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_GetAspectRatioMode(display_control, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
mode = 0;
hr = IMFVideoDisplayControl_GetAspectRatioMode(display_control, &mode);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(mode == (MFVideoARMode_PreservePicture | MFVideoARMode_PreservePixel), "Unexpected mode %#x.\n", mode);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(mode == (MFVideoARMode_PreservePicture | MFVideoARMode_PreservePixel), "Unexpected mode %#lx.\n", mode);
hr = IMFVideoDisplayControl_SetAspectRatioMode(display_control, 0x100);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_SetAspectRatioMode(display_control, MFVideoARMode_Mask);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
mode = 0;
hr = IMFVideoDisplayControl_GetAspectRatioMode(display_control, &mode);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(mode == MFVideoARMode_Mask, "Unexpected mode %#x.\n", mode);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(mode == MFVideoARMode_Mask, "Unexpected mode %#lx.\n", mode);
IMFVideoDisplayControl_Release(display_control);
}
@@ -2169,73 +2171,73 @@ static void test_presenter_video_window(void)
HWND window;
hr = MFCreateVideoPresenter(NULL, &IID_IDirect3DDevice9, &IID_IMFVideoDisplayControl, (void **)&display_control);
- ok(hr == S_OK, "Failed to create default presenter, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create default presenter, hr %#lx.\n", hr);
hr = MFGetService((IUnknown *)display_control, &MR_VIDEO_ACCELERATION_SERVICE,
&IID_IDirect3DDeviceManager9, (void **)&dm);
hr = IDirect3DDeviceManager9_OpenDeviceHandle(dm, &hdevice);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DDeviceManager9_LockDevice(dm, hdevice, &d3d_device, FALSE);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice9_GetCreationParameters(d3d_device, &device_params);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(device_params.hFocusWindow == GetDesktopWindow(), "Unexpected window %p.\n", device_params.hFocusWindow);
hr = IDirect3DDevice9_GetSwapChain(d3d_device, 0, &swapchain);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DSwapChain9_GetPresentParameters(swapchain, &present_params);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(present_params.hDeviceWindow == GetDesktopWindow(), "Unexpected device window.\n");
ok(present_params.Windowed, "Unexpected windowed mode.\n");
ok(present_params.SwapEffect == D3DSWAPEFFECT_COPY, "Unexpected swap effect.\n");
- ok(present_params.Flags & D3DPRESENTFLAG_VIDEO, "Unexpected flags %#x.\n", present_params.Flags);
+ ok(present_params.Flags & D3DPRESENTFLAG_VIDEO, "Unexpected flags %#lx.\n", present_params.Flags);
ok(present_params.PresentationInterval == D3DPRESENT_INTERVAL_IMMEDIATE, "Unexpected present interval.\n");
IDirect3DSwapChain9_Release(swapchain);
IDirect3DDevice9_Release(d3d_device);
hr = IDirect3DDeviceManager9_UnlockDevice(dm, hdevice, FALSE);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Setting window. */
hr = IMFVideoDisplayControl_GetVideoWindow(display_control, &window);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!window, "Unexpected window %p.\n", window);
window = create_window();
hr = IMFVideoDisplayControl_SetVideoWindow(display_control, window);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Device is not recreated or reset on window change. */
hr = IDirect3DDeviceManager9_LockDevice(dm, hdevice, &d3d_device, FALSE);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice9_GetSwapChain(d3d_device, 0, &swapchain);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DSwapChain9_GetPresentParameters(swapchain, &present_params);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(present_params.hDeviceWindow == GetDesktopWindow(), "Unexpected device window.\n");
ok(present_params.Windowed, "Unexpected windowed mode.\n");
ok(present_params.SwapEffect == D3DSWAPEFFECT_COPY, "Unexpected swap effect.\n");
- ok(present_params.Flags & D3DPRESENTFLAG_VIDEO, "Unexpected flags %#x.\n", present_params.Flags);
+ ok(present_params.Flags & D3DPRESENTFLAG_VIDEO, "Unexpected flags %#lx.\n", present_params.Flags);
ok(present_params.PresentationInterval == D3DPRESENT_INTERVAL_IMMEDIATE, "Unexpected present interval.\n");
IDirect3DSwapChain9_Release(swapchain);
IDirect3DDevice9_Release(d3d_device);
hr = IDirect3DDeviceManager9_UnlockDevice(dm, hdevice, FALSE);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DDeviceManager9_CloseDeviceHandle(dm, hdevice);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMFVideoDisplayControl_Release(display_control);
@@ -2254,31 +2256,31 @@ static void test_presenter_quality_control(void)
HRESULT hr;
hr = MFCreateVideoPresenter(NULL, &IID_IDirect3DDevice9, &IID_IMFVideoPresenter, (void **)&presenter);
- ok(hr == S_OK, "Failed to create default presenter, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create default presenter, hr %#lx.\n", hr);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFQualityAdviseLimits, (void **)&qa_limits);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFQualityAdvise, (void **)&advise);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFQualityAdviseLimits_GetMaximumDropMode(qa_limits, NULL);
todo_wine
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFQualityAdviseLimits_GetMaximumDropMode(qa_limits, &mode);
todo_wine
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (SUCCEEDED(hr))
ok(mode == MF_DROP_MODE_NONE, "Unexpected mode %d.\n", mode);
hr = IMFQualityAdviseLimits_GetMinimumQualityLevel(qa_limits, NULL);
todo_wine
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFQualityAdviseLimits_GetMinimumQualityLevel(qa_limits, &level);
todo_wine
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (SUCCEEDED(hr))
ok(level == MF_QUALITY_NORMAL, "Unexpected level %d.\n", level);
@@ -2287,31 +2289,31 @@ static void test_presenter_quality_control(void)
todo_wine {
mode = 1;
hr = IMFQualityAdvise_GetDropMode(advise, &mode);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(mode == MF_DROP_MODE_NONE, "Unexpected mode %d.\n", mode);
level = 1;
hr = IMFQualityAdvise_GetQualityLevel(advise, &level);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(level == MF_QUALITY_NORMAL, "Unexpected mode %d.\n", level);
hr = IMFQualityAdvise_SetDropMode(advise, MF_DROP_MODE_1);
- ok(hr == MF_E_NO_MORE_DROP_MODES, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_NO_MORE_DROP_MODES, "Unexpected hr %#lx.\n", hr);
hr = IMFQualityAdvise_SetQualityLevel(advise, MF_QUALITY_NORMAL_MINUS_1);
- ok(hr == MF_E_NO_MORE_QUALITY_LEVELS, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_NO_MORE_QUALITY_LEVELS, "Unexpected hr %#lx.\n", hr);
}
IMFQualityAdvise_Release(advise);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IQualProp, (void **)&qual_prop);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IQualProp_get_FramesDrawn(qual_prop, NULL);
- ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IQualProp_get_FramesDrawn(qual_prop, &frame_count);
- ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
IQualProp_Release(qual_prop);
@@ -2328,16 +2330,16 @@ static void get_output_aperture(IMFTransform *mixer, SIZE *frame_size, MFVideoAr
memset(aperture, 0xcc, sizeof(*aperture));
hr = IMFTransform_GetOutputCurrentType(mixer, 0, &media_type);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_GetUINT64(media_type, &MF_MT_FRAME_SIZE, &size);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
frame_size->cx = size >> 32;
frame_size->cy = size;
hr = IMFMediaType_GetBlob(media_type, &MF_MT_GEOMETRIC_APERTURE, (UINT8 *)aperture, sizeof(*aperture), NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMFMediaType_Release(media_type);
}
@@ -2367,74 +2369,74 @@ static void test_presenter_media_type(void)
}
hr = DXVA2CreateDirect3DDeviceManager9(&token, &manager);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DDeviceManager9_ResetDevice(manager, device, token);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = MFCreateVideoPresenter(NULL, &IID_IDirect3DDevice9, &IID_IMFVideoPresenter, (void **)&presenter);
- ok(hr == S_OK, "Failed to create default presenter, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create default presenter, hr %#lx.\n", hr);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFVideoDisplayControl, (void **)&display_control);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = MFCreateVideoMixer(NULL, &IID_IDirect3DDevice9, &IID_IMFTransform, (void **)&mixer);
- ok(hr == S_OK, "Failed to create a mixer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create a mixer, hr %#lx.\n", hr);
input_type = create_video_type(&MFVideoFormat_RGB32);
hr = IMFMediaType_SetUINT64(input_type, &MF_MT_FRAME_SIZE, (UINT64)100 << 32 | 50);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetUINT32(input_type, &MF_MT_ALL_SAMPLES_INDEPENDENT, TRUE);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_ProcessMessage(mixer, MFT_MESSAGE_SET_D3D_MANAGER, (ULONG_PTR)manager);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFTopologyServiceLookupClient, (void **)&lookup_client);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
init_test_host(&host, mixer, presenter);
hr = IMFTopologyServiceLookupClient_InitServicePointers(lookup_client, &host.IMFTopologyServiceLookup_iface);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_SetVideoWindow(display_control, window);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Set destination rectangle before mixer types are configured. */
SetRect(&dst, 0, 0, 101, 51);
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, NULL, &dst);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetInputType(mixer, 0, input_type, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_ProcessMessage(presenter, MFVP_MESSAGE_INVALIDATEMEDIATYPE, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
get_output_aperture(mixer, &frame_size, &aperture);
- ok(frame_size.cx == 101 && frame_size.cy == 51, "Unexpected frame size %u x %u.\n", frame_size.cx, frame_size.cy);
- ok(aperture.Area.cx == 101 && aperture.Area.cy == 51, "Unexpected size %u x %u.\n", aperture.Area.cx, aperture.Area.cy);
+ ok(frame_size.cx == 101 && frame_size.cy == 51, "Unexpected frame size %lu x %lu.\n", frame_size.cx, frame_size.cy);
+ ok(aperture.Area.cx == 101 && aperture.Area.cy == 51, "Unexpected size %lu x %lu.\n", aperture.Area.cx, aperture.Area.cy);
ok(!aperture.OffsetX.value && !aperture.OffsetX.fract && !aperture.OffsetY.value && !aperture.OffsetY.fract,
"Unexpected offset %u x %u.\n", aperture.OffsetX.value, aperture.OffsetY.value);
SetRect(&dst, 1, 2, 200, 300);
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, NULL, &dst);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
get_output_aperture(mixer, &frame_size, &aperture);
- ok(frame_size.cx == 199 && frame_size.cy == 298, "Unexpected frame size %u x %u.\n", frame_size.cx, frame_size.cy);
- ok(aperture.Area.cx == 199 && aperture.Area.cy == 298, "Unexpected size %u x %u.\n", aperture.Area.cx, aperture.Area.cy);
+ ok(frame_size.cx == 199 && frame_size.cy == 298, "Unexpected frame size %lu x %lu.\n", frame_size.cx, frame_size.cy);
+ ok(aperture.Area.cx == 199 && aperture.Area.cy == 298, "Unexpected size %lu x %lu.\n", aperture.Area.cx, aperture.Area.cy);
ok(!aperture.OffsetX.value && !aperture.OffsetX.fract && !aperture.OffsetY.value && !aperture.OffsetY.fract,
"Unexpected offset %u x %u.\n", aperture.OffsetX.value, aperture.OffsetY.value);
hr = IMFVideoDisplayControl_SetAspectRatioMode(display_control, MFVideoARMode_None);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
get_output_aperture(mixer, &frame_size, &aperture);
- ok(frame_size.cx == 199 && frame_size.cy == 298, "Unexpected frame size %u x %u.\n", frame_size.cx, frame_size.cy);
- ok(aperture.Area.cx == 199 && aperture.Area.cy == 298, "Unexpected size %u x %u.\n", aperture.Area.cx, aperture.Area.cy);
+ ok(frame_size.cx == 199 && frame_size.cy == 298, "Unexpected frame size %lu x %lu.\n", frame_size.cx, frame_size.cy);
+ ok(aperture.Area.cx == 199 && aperture.Area.cy == 298, "Unexpected size %lu x %lu.\n", aperture.Area.cx, aperture.Area.cy);
ok(!aperture.OffsetX.value && !aperture.OffsetX.fract && !aperture.OffsetY.value && !aperture.OffsetY.fract,
"Unexpected offset %u x %u.\n", aperture.OffsetX.value, aperture.OffsetY.value);
@@ -2466,80 +2468,80 @@ static void test_presenter_shutdown(void)
ok(!!window, "Failed to create test window.\n");
hr = MFCreateVideoPresenter(NULL, &IID_IDirect3DDevice9, &IID_IMFVideoPresenter, (void **)&presenter);
- ok(hr == S_OK, "Failed to create default presenter, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create default presenter, hr %#lx.\n", hr);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFTopologyServiceLookupClient, (void **)&lookup_client);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFVideoDeviceID, (void **)&deviceid);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFVideoDisplayControl, (void **)&display_control);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IQualProp, (void **)&qual_prop);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTopologyServiceLookupClient_ReleaseServicePointers(lookup_client);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_ProcessMessage(presenter, MFVP_MESSAGE_INVALIDATEMEDIATYPE, 0);
- ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_ProcessMessage(presenter, MFVP_MESSAGE_BEGINSTREAMING, 0);
- ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_ProcessMessage(presenter, MFVP_MESSAGE_ENDSTREAMING, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_ProcessMessage(presenter, MFVP_MESSAGE_PROCESSINPUTNOTIFY, 0);
- ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoPresenter_GetCurrentMediaType(presenter, &media_type);
- ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDeviceID_GetDeviceID(deviceid, &iid);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_GetNativeVideoSize(display_control, &size, &size);
- ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_GetIdealVideoSize(display_control, &size, &size);
- ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
SetRect(&rect, 0, 0, 10, 10);
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, NULL, &rect);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_GetVideoPosition(display_control, NULL, &rect);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_SetAspectRatioMode(display_control, MFVideoARMode_None);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_GetAspectRatioMode(display_control, &mode);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_SetVideoWindow(display_control, window);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, NULL, &rect);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_GetVideoWindow(display_control, &window2);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoDisplayControl_RepaintVideo(display_control);
- ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IQualProp_get_FramesDrawn(qual_prop, NULL);
- ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IQualProp_get_FramesDrawn(qual_prop, &frame_count);
- ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IMFTopologyServiceLookupClient_ReleaseServicePointers(lookup_client);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IQualProp_Release(qual_prop);
IMFVideoDeviceID_Release(deviceid);
@@ -2559,52 +2561,52 @@ static void test_mixer_output_rectangle(void)
HRESULT hr;
hr = MFCreateVideoMixer(NULL, &IID_IDirect3DDevice9, &IID_IMFTransform, (void **)&mixer);
- ok(hr == S_OK, "Failed to create a mixer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create a mixer, hr %#lx.\n", hr);
hr = IMFTransform_QueryInterface(mixer, &IID_IMFVideoMixerControl, (void **)&mixer_control);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoMixerControl_GetStreamOutputRect(mixer_control, 0, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = IMFVideoMixerControl_GetStreamOutputRect(mixer_control, 0, &rect);
- ok(hr == S_OK, "Failed to get output rect, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to get output rect, hr %#lx.\n", hr);
ok(rect.left == 0.0f && rect.top == 0.0f && rect.right == 1.0f && rect.bottom == 1.0f,
"Unexpected rectangle.\n");
hr = IMFVideoMixerControl_GetStreamOutputRect(mixer_control, 1, &rect);
- ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoMixerControl_GetStreamOutputRect(mixer_control, 1, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoMixerControl_SetStreamOutputRect(mixer_control, 1, &rect);
- ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoMixerControl_SetStreamOutputRect(mixer_control, 1, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
/* Wrong bounds. */
set_rect(&rect, 0.0f, 0.0f, 1.1f, 1.0f);
hr = IMFVideoMixerControl_SetStreamOutputRect(mixer_control, 0, &rect);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
set_rect(&rect, -0.1f, 0.0f, 0.5f, 1.0f);
hr = IMFVideoMixerControl_SetStreamOutputRect(mixer_control, 0, &rect);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* Flipped. */
set_rect(&rect, 1.0f, 0.0f, 0.0f, 1.0f);
hr = IMFVideoMixerControl_SetStreamOutputRect(mixer_control, 0, &rect);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
set_rect(&rect, 0.0f, 1.0f, 1.0f, 0.5f);
hr = IMFVideoMixerControl_SetStreamOutputRect(mixer_control, 0, &rect);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoMixerControl_SetStreamOutputRect(mixer_control, 0, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
IMFVideoMixerControl_Release(mixer_control);
IMFTransform_Release(mixer);
@@ -2619,96 +2621,96 @@ static void test_mixer_zorder(void)
HRESULT hr;
hr = MFCreateVideoMixer(NULL, &IID_IDirect3DDevice9, &IID_IMFTransform, (void **)&mixer);
- ok(hr == S_OK, "Failed to create a mixer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create a mixer, hr %#lx.\n", hr);
hr = IMFTransform_QueryInterface(mixer, &IID_IMFVideoMixerControl, (void **)&mixer_control);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoMixerControl_GetStreamZOrder(mixer_control, 0, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoMixerControl_GetStreamZOrder(mixer_control, 1, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
value = 1;
hr = IMFVideoMixerControl_GetStreamZOrder(mixer_control, 0, &value);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(!value, "Unexpected value %u.\n", value);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(!value, "Unexpected value %lu.\n", value);
value = 1;
hr = IMFVideoMixerControl_GetStreamZOrder(mixer_control, 1, &value);
- ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoMixerControl_SetStreamZOrder(mixer_control, 0, 1);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoMixerControl_SetStreamZOrder(mixer_control, 1, 1);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* Exceeds maximum stream number. */
hr = IMFVideoMixerControl_SetStreamZOrder(mixer_control, 0, 20);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
value = 1;
hr = IMFTransform_AddInputStreams(mixer, 1, &value);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
value = 0;
hr = IMFVideoMixerControl_GetStreamZOrder(mixer_control, 1, &value);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(value == 1, "Unexpected zorder %u.\n", value);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(value == 1, "Unexpected zorder %lu.\n", value);
hr = IMFVideoMixerControl_SetStreamZOrder(mixer_control, 1, 0);
- ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoMixerControl_SetStreamZOrder(mixer_control, 1, 2);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoMixerControl_SetStreamZOrder(mixer_control, 0, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
value = 2;
hr = IMFTransform_AddInputStreams(mixer, 1, &value);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
value = 0;
hr = IMFVideoMixerControl_GetStreamZOrder(mixer_control, 2, &value);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(value == 2, "Unexpected zorder %u.\n", value);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(value == 2, "Unexpected zorder %lu.\n", value);
hr = IMFVideoMixerControl_SetStreamZOrder(mixer_control, 2, 1);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
value = 3;
hr = IMFTransform_AddInputStreams(mixer, 1, &value);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
value = 0;
hr = IMFVideoMixerControl_GetStreamZOrder(mixer_control, 3, &value);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(value == 3, "Unexpected zorder %u.\n", value);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(value == 3, "Unexpected zorder %lu.\n", value);
hr = IMFTransform_DeleteInputStream(mixer, 1);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_DeleteInputStream(mixer, 2);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_DeleteInputStream(mixer, 3);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ids[0] = 2;
ids[1] = 1;
hr = IMFTransform_AddInputStreams(mixer, 2, ids);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
value = 0;
hr = IMFVideoMixerControl_GetStreamZOrder(mixer_control, 1, &value);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(value == 2, "Unexpected zorder %u.\n", value);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(value == 2, "Unexpected zorder %lu.\n", value);
value = 0;
hr = IMFVideoMixerControl_GetStreamZOrder(mixer_control, 2, &value);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(value == 1, "Unexpected zorder %u.\n", value);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(value == 1, "Unexpected zorder %lu.\n", value);
IMFVideoMixerControl_Release(mixer_control);
IMFTransform_Release(mixer);
@@ -2724,31 +2726,31 @@ static IDirect3DSurface9 * create_surface(IDirect3DDeviceManager9 *manager, unsi
HRESULT hr;
hr = IDirect3DDeviceManager9_OpenDeviceHandle(manager, &handle);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DDeviceManager9_LockDevice(manager, handle, &device, TRUE);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DDeviceManager9_GetVideoService(manager, handle, &IID_IDirectXVideoProcessorService,
(void **)&service);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirectXVideoAccelerationService_CreateSurface(service, width, height, 0, D3DFMT_A8R8G8B8,
D3DPOOL_DEFAULT, 0, DXVA2_VideoProcessorRenderTarget, &surface, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IDirectXVideoAccelerationService_Release(service);
hr = IDirect3DDevice9_ColorFill(device, surface, NULL, D3DCOLOR_ARGB(0x10, 0xff, 0x00, 0x00));
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IDirect3DDevice9_Release(device);
hr = IDirect3DDeviceManager9_UnlockDevice(manager, handle, FALSE);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DDeviceManager9_CloseDeviceHandle(manager, handle);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
return surface;
}
@@ -2762,18 +2764,18 @@ static DWORD get_surface_color(IDirect3DSurface9 *surface, unsigned int x, unsig
HRESULT hr;
hr = IDirect3DSurface9_GetDesc(surface, &desc);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(x < desc.Width && y < desc.Height, "Invalid coordinate.\n");
if (x >= desc.Width || y >= desc.Height) return 0;
hr = IDirect3DSurface9_LockRect(surface, &locked_rect, NULL, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
row = (DWORD *)((char *)locked_rect.pBits + y * locked_rect.Pitch);
color = row[x];
hr = IDirect3DSurface9_UnlockRect(surface);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
return color;
}
@@ -2787,13 +2789,14 @@ static void test_mixer_samples(void)
IMFDesiredSample *desired;
IDirect3DDevice9 *device;
IMFMediaType *video_type;
- DWORD count, flags, color, status;
+ DWORD flags, color, status;
IMFTransform *mixer;
IMFSample *sample, *sample2;
HWND window;
UINT token;
HRESULT hr;
LONGLONG pts, duration;
+ UINT32 count;
window = create_window();
if (!(device = create_device(window)))
@@ -2803,217 +2806,217 @@ static void test_mixer_samples(void)
}
hr = MFCreateVideoMixer(NULL, &IID_IDirect3DDevice9, &IID_IMFTransform, (void **)&mixer);
- ok(hr == S_OK, "Failed to create a mixer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create a mixer, hr %#lx.\n", hr);
hr = IMFTransform_QueryInterface(mixer, &IID_IMFVideoProcessor, (void **)&processor);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetInputStatus(mixer, 0, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetInputStatus(mixer, 1, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetInputStatus(mixer, 0, &status);
- ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetInputStatus(mixer, 1, &status);
- ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputStatus(mixer, NULL);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputStatus(mixer, &status);
- ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
/* Configure device and media types. */
hr = DXVA2CreateDirect3DDeviceManager9(&token, &manager);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DDeviceManager9_ResetDevice(manager, device, token);
- ok(hr == S_OK, "Failed to set a device, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to set a device, hr %#lx.\n", hr);
hr = IMFTransform_ProcessMessage(mixer, MFT_MESSAGE_SET_D3D_MANAGER, (ULONG_PTR)manager);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
video_type = create_video_type(&MFVideoFormat_RGB32);
hr = IMFMediaType_SetUINT64(video_type, &MF_MT_FRAME_SIZE, (UINT64)640 << 32 | 480);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetUINT32(video_type, &MF_MT_ALL_SAMPLES_INDEPENDENT, TRUE);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetInputType(mixer, 0, video_type, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetInputStatus(mixer, 0, &status);
- ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetOutputType(mixer, 0, video_type, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
status = 0;
hr = IMFTransform_GetInputStatus(mixer, 0, &status);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(status == MFT_INPUT_STATUS_ACCEPT_DATA, "Unexpected status %#x.\n", status);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(status == MFT_INPUT_STATUS_ACCEPT_DATA, "Unexpected status %#lx.\n", status);
hr = IMFTransform_GetInputStatus(mixer, 1, &status);
- ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
status = ~0u;
hr = IMFTransform_GetOutputStatus(mixer, &status);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(!status, "Unexpected status %#x.\n", status);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(!status, "Unexpected status %#lx.\n", status);
IMFMediaType_Release(video_type);
memset(buffers, 0, sizeof(buffers));
hr = IMFTransform_ProcessOutput(mixer, 0, 1, buffers, &status);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* It needs a sample with a backing surface. */
hr = MFCreateSample(&sample);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
buffers[0].pSample = sample;
hr = IMFTransform_ProcessOutput(mixer, 0, 1, buffers, &status);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
IMFSample_Release(sample);
surface = create_surface(manager, 64, 64);
hr = MFCreateVideoSampleFromSurface((IUnknown *)surface, &sample);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_QueryInterface(sample, &IID_IMFDesiredSample, (void **)&desired);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
buffers[0].pSample = sample;
hr = IMFTransform_ProcessOutput(mixer, 0, 1, buffers, &status);
- ok(hr == MF_E_TRANSFORM_NEED_MORE_INPUT, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_TRANSFORM_NEED_MORE_INPUT, "Unexpected hr %#lx.\n", hr);
color = get_surface_color(surface, 0, 0);
- ok(color == D3DCOLOR_ARGB(0x10, 0xff, 0x00, 0x00), "Unexpected color %#x.\n", color);
+ ok(color == D3DCOLOR_ARGB(0x10, 0xff, 0x00, 0x00), "Unexpected color %#lx.\n", color);
/* Streaming is not started yet. Output is colored black, but only if desired timestamps were set. */
IMFDesiredSample_SetDesiredSampleTimeAndDuration(desired, 100, 0);
hr = IMFTransform_ProcessOutput(mixer, 0, 1, buffers, &status);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
color = get_surface_color(surface, 0, 0);
- ok(!color, "Unexpected color %#x.\n", color);
+ ok(!color, "Unexpected color %#lx.\n", color);
hr = IMFVideoProcessor_SetBackgroundColor(processor, RGB(0, 0, 255));
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_ProcessOutput(mixer, 0, 1, buffers, &status);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
color = get_surface_color(surface, 0, 0);
- ok(!color, "Unexpected color %#x.\n", color);
+ ok(!color, "Unexpected color %#lx.\n", color);
hr = IMFTransform_ProcessOutput(mixer, 0, 2, buffers, &status);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
buffers[1].pSample = sample;
hr = IMFTransform_ProcessOutput(mixer, 0, 2, buffers, &status);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
buffers[0].dwStreamID = 1;
hr = IMFTransform_ProcessOutput(mixer, 0, 1, buffers, &status);
- ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
IMFDesiredSample_Clear(desired);
hr = IMFTransform_ProcessInput(mixer, 0, NULL, 0);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_ProcessInput(mixer, 5, NULL, 0);
- ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
status = 0;
hr = IMFTransform_GetInputStatus(mixer, 0, &status);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(status == MFT_INPUT_STATUS_ACCEPT_DATA, "Unexpected status %#x.\n", status);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(status == MFT_INPUT_STATUS_ACCEPT_DATA, "Unexpected status %#lx.\n", status);
status = ~0u;
hr = IMFTransform_GetOutputStatus(mixer, &status);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(!status, "Unexpected status %#x.\n", status);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(!status, "Unexpected status %#lx.\n", status);
hr = IMFTransform_ProcessInput(mixer, 0, sample, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
status = ~0u;
hr = IMFTransform_GetInputStatus(mixer, 0, &status);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(!status, "Unexpected status %#x.\n", status);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(!status, "Unexpected status %#lx.\n", status);
hr = IMFTransform_GetOutputStatus(mixer, &status);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(status == MFT_OUTPUT_STATUS_SAMPLE_READY, "Unexpected status %#x.\n", status);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(status == MFT_OUTPUT_STATUS_SAMPLE_READY, "Unexpected status %#lx.\n", status);
hr = IMFTransform_ProcessInput(mixer, 0, sample, 0);
- ok(hr == MF_E_NOTACCEPTING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_NOTACCEPTING, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_ProcessInput(mixer, 5, sample, 0);
- ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
/* ProcessOutput() sets sample time and duration. */
hr = MFCreateVideoSampleFromSurface((IUnknown *)surface, &sample2);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_SetUINT32(sample2, &IID_IMFSample, 1);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_SetSampleFlags(sample2, 0x123);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_GetSampleTime(sample2, &pts);
- ok(hr == MF_E_NO_SAMPLE_TIMESTAMP, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_NO_SAMPLE_TIMESTAMP, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_GetSampleDuration(sample2, &duration);
- ok(hr == MF_E_NO_SAMPLE_DURATION, "Unexpected hr %#x.\n", hr);
+ ok(hr == MF_E_NO_SAMPLE_DURATION, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_SetSampleTime(sample, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_SetSampleDuration(sample, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
memset(buffers, 0, sizeof(buffers));
buffers[0].pSample = sample2;
hr = IMFTransform_ProcessOutput(mixer, 0, 1, buffers, &status);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_GetSampleTime(sample2, &pts);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!pts, "Unexpected sample time.\n");
hr = IMFSample_GetSampleDuration(sample2, &duration);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!duration, "Unexpected duration\n");
/* Flags are not copied. */
hr = IMFSample_GetSampleFlags(sample2, &flags);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(flags == 0x123, "Unexpected flags %#x.\n", flags);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(flags == 0x123, "Unexpected flags %#lx.\n", flags);
/* Attributes are not removed. */
hr = IMFSample_GetCount(sample2, &count);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(count == 1, "Unexpected attribute count %u.\n", count);
hr = IMFSample_GetCount(sample, &count);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!count, "Unexpected attribute count %u.\n", count);
IMFSample_Release(sample2);
hr = IMFTransform_ProcessMessage(mixer, MFT_MESSAGE_COMMAND_DRAIN, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMFSample_Release(sample);
@@ -3093,39 +3096,39 @@ static void test_mixer_render(void)
}
hr = MFCreateVideoMixer(NULL, &IID_IDirect3DDevice9, &IID_IMFTransform, (void **)&mixer);
- ok(hr == S_OK, "Failed to create a mixer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create a mixer, hr %#lx.\n", hr);
hr = IMFTransform_QueryInterface(mixer, &IID_IMFVideoProcessor, (void **)&processor);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_QueryInterface(mixer, &IID_IMFVideoMixerControl, (void **)&mixer_control);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Configure device and media types. */
hr = DXVA2CreateDirect3DDeviceManager9(&token, &manager);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DDeviceManager9_ResetDevice(manager, device, token);
- ok(hr == S_OK, "Failed to set a device, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to set a device, hr %#lx.\n", hr);
hr = IMFTransform_ProcessMessage(mixer, MFT_MESSAGE_SET_D3D_MANAGER, (ULONG_PTR)manager);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
video_type = create_video_type(&MFVideoFormat_RGB32);
hr = IMFMediaType_SetUINT64(video_type, &MF_MT_FRAME_SIZE, (UINT64)64 << 32 | 64);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetUINT32(video_type, &MF_MT_ALL_SAMPLES_INDEPENDENT, TRUE);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetInputType(mixer, 0, video_type, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputAvailableType(mixer, 0, 0, &output_type);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetOutputType(mixer, 0, output_type, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMFMediaType_Release(output_type);
IMFMediaType_Release(video_type);
@@ -3134,41 +3137,41 @@ static void test_mixer_render(void)
ok(!!surface, "Failed to create input surface.\n");
hr = MFCreateVideoSampleFromSurface((IUnknown *)surface, &sample);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
EXPECT_REF(sample, 1);
hr = IMFTransform_ProcessInput(mixer, 0, sample, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
EXPECT_REF(sample, 2);
hr = IMFTransform_GetOutputStatus(mixer, &status);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(status == MFT_OUTPUT_STATUS_SAMPLE_READY, "Unexpected status %#x.\n", status);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(status == MFT_OUTPUT_STATUS_SAMPLE_READY, "Unexpected status %#lx.\n", status);
/* FLUSH/END_STREAMING releases input */
hr = IMFTransform_ProcessMessage(mixer, MFT_MESSAGE_NOTIFY_END_STREAMING, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
EXPECT_REF(sample, 1);
hr = IMFTransform_GetOutputStatus(mixer, &status);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(!status, "Unexpected status %#x.\n", status);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(!status, "Unexpected status %#lx.\n", status);
hr = IMFTransform_ProcessInput(mixer, 0, sample, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
EXPECT_REF(sample, 2);
hr = IMFTransform_GetOutputStatus(mixer, &status);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(status == MFT_OUTPUT_STATUS_SAMPLE_READY, "Unexpected status %#x.\n", status);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(status == MFT_OUTPUT_STATUS_SAMPLE_READY, "Unexpected status %#lx.\n", status);
hr = IMFTransform_ProcessMessage(mixer, MFT_MESSAGE_COMMAND_FLUSH, 0);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
EXPECT_REF(sample, 1);
hr = IMFTransform_GetOutputStatus(mixer, &status);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- ok(!status, "Unexpected status %#x.\n", status);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(!status, "Unexpected status %#lx.\n", status);
IMFSample_Release(sample);
IDirect3DSurface9_Release(surface);
@@ -3190,7 +3193,7 @@ START_TEST(evr)
if (FAILED(hr = MFCreateVideoPresenter(NULL, &IID_IDirect3DDevice9, &IID_IMFVideoPresenter, (void **)&presenter)))
{
- win_skip("Failed to create default presenter, hr %#x. Skipping tests.\n", hr);
+ win_skip("Failed to create default presenter, hr %#lx. Skipping tests.\n", hr);
CoUninitialize();
return;
}
--
2.34.1
1
0
[PATCH 7/7] comctl32/button: Use the brush from WM_CTLCOLORSTATIC to fill text background for group boxes.
by Zhiyi Zhang Feb. 9, 2022
by Zhiyi Zhang Feb. 9, 2022
Feb. 9, 2022
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
---
dlls/comctl32/button.c | 13 ++++++++++++-
dlls/comctl32/tests/misc.c | 3 +--
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c
index 1349e10c4c0..2ce12252460 100644
--- a/dlls/comctl32/button.c
+++ b/dlls/comctl32/button.c
@@ -2914,10 +2914,20 @@ static void GB_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in
HFONT font, hPrevFont = NULL;
BOOL created_font = FALSE;
TEXTMETRICW textMetric;
+ HBRUSH brush;
+ HWND parent;
+ HRESULT hr;
LONG style;
int part;
- HRESULT hr = GetThemeFont(theme, hDC, BP_GROUPBOX, state, TMT_FONT, &lf);
+ /* DrawThemeParentBackground() is used for filling content background. The brush from
+ * WM_CTLCOLORSTATIC is used for filling text background */
+ parent = GetParent(infoPtr->hwnd);
+ if (!parent)
+ parent = infoPtr->hwnd;
+ brush = (HBRUSH)SendMessageW(parent, WM_CTLCOLORSTATIC, (WPARAM)hDC, (LPARAM)infoPtr->hwnd);
+
+ hr = GetThemeFont(theme, hDC, BP_GROUPBOX, state, TMT_FONT, &lf);
if (SUCCEEDED(hr)) {
font = CreateFontIndirectW(&lf);
if (!font)
@@ -2969,6 +2979,7 @@ static void GB_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in
SelectClipRgn(hDC, textRegion);
DeleteObject(textRegion);
}
+ FillRect(hDC, &textRect, brush ? brush : GetSysColorBrush(COLOR_BTNFACE));
BUTTON_DrawThemedLabel(infoPtr, hDC, dtFlags, &imageRect, &textRect, theme, part, state);
}
diff --git a/dlls/comctl32/tests/misc.c b/dlls/comctl32/tests/misc.c
index c3de9e68c5a..dc9648c1bf0 100644
--- a/dlls/comctl32/tests/misc.c
+++ b/dlls/comctl32/tests/misc.c
@@ -848,7 +848,7 @@ static void test_themed_background(void)
{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_GROUPBOX, groupbox_seq},
{WC_BUTTONA, BS_USERBUTTON, pushbutton_seq},
{WC_BUTTONA, BS_AUTORADIOBUTTON, radiobutton_seq},
{WC_BUTTONA, BS_PUSHBOX, radiobutton_seq, TRUE},
@@ -962,7 +962,6 @@ static void test_themed_background(void)
/* WM_CTLCOLORSTATIC is used to fill text background */
color = GetPixel(hdc, 10, 10);
- todo_wine
ok(color == 0x808080, "Expected color %#x, got %#x.\n", 0x808080, color);
}
--
2.32.0
1
0
[PATCH 5/7] comctl32/button: Use the brush from WM_CTLCOLORBTN to fill background for push buttons.
by Zhiyi Zhang Feb. 9, 2022
by Zhiyi Zhang Feb. 9, 2022
Feb. 9, 2022
The brush from WM_CTLCOLORBTN is used for filling background for push buttons after a DrawThemeParentBackground() call
according to tests.
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
---
dlls/comctl32/button.c | 7 +++++++
dlls/comctl32/tests/misc.c | 6 +++---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c
index 88b48a4a5c0..14b2200afed 100644
--- a/dlls/comctl32/button.c
+++ b/dlls/comctl32/button.c
@@ -2729,6 +2729,7 @@ static void PB_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in
{
RECT bgRect, labelRect, imageRect, textRect, focusRect;
NMCUSTOMDRAW nmcd;
+ HBRUSH brush;
LRESULT cdrf;
HWND parent;
@@ -2748,7 +2749,13 @@ static void PB_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in
if (cdrf & CDRF_SKIPDEFAULT) return;
if (IsThemeBackgroundPartiallyTransparent(theme, BP_PUSHBUTTON, state))
+ {
DrawThemeParentBackground(infoPtr->hwnd, hDC, NULL);
+ /* Tests show that the brush from WM_CTLCOLORBTN is used for filling background after a
+ * DrawThemeParentBackground() call */
+ brush = (HBRUSH)SendMessageW(parent, WM_CTLCOLORBTN, (WPARAM)hDC, (LPARAM)infoPtr->hwnd);
+ FillRect(hDC, &bgRect, brush ? brush : GetSysColorBrush(COLOR_BTNFACE));
+ }
DrawThemeBackground(theme, hDC, BP_PUSHBUTTON, state, &bgRect, NULL);
if (cdrf & CDRF_NOTIFYPOSTERASE)
diff --git a/dlls/comctl32/tests/misc.c b/dlls/comctl32/tests/misc.c
index 72674ea5942..09c5b3d6c40 100644
--- a/dlls/comctl32/tests/misc.c
+++ b/dlls/comctl32/tests/misc.c
@@ -841,15 +841,15 @@ static void test_themed_background(void)
tests[] =
{
{ANIMATE_CLASSA, 0, empty_seq, TRUE},
- {WC_BUTTONA, BS_PUSHBUTTON, pushbutton_seq, TRUE},
- {WC_BUTTONA, BS_DEFPUSHBUTTON, defpushbutton_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_GROUPBOX, groupbox_seq, TRUE},
- {WC_BUTTONA, BS_USERBUTTON, pushbutton_seq, TRUE},
+ {WC_BUTTONA, BS_USERBUTTON, pushbutton_seq},
{WC_BUTTONA, BS_AUTORADIOBUTTON, radiobutton_seq, TRUE},
{WC_BUTTONA, BS_PUSHBOX, radiobutton_seq, TRUE},
{WC_BUTTONA, BS_OWNERDRAW, ownerdrawbutton_seq},
--
2.32.0
1
0
[PATCH 4/7] comctl32/trackbar: Always use brush from WM_CTLCOLORSTATIC to fill background.
by Zhiyi Zhang Feb. 9, 2022
by Zhiyi Zhang Feb. 9, 2022
Feb. 9, 2022
Fix the track bar of Mupen64-RR-Lua input window having black background. Mupen64-RR-Lua doesn't actually handle
WM_ERASEBKGND even though it returns nonzero. And tests show that only WM_CTLCOLORSTATIC is sent when drawing themed
trackbar background.
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
---
dlls/comctl32/tests/misc.c | 2 +-
dlls/comctl32/trackbar.c | 12 ++++--------
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/dlls/comctl32/tests/misc.c b/dlls/comctl32/tests/misc.c
index 3a1b5253b58..72674ea5942 100644
--- a/dlls/comctl32/tests/misc.c
+++ b/dlls/comctl32/tests/misc.c
@@ -883,7 +883,7 @@ static void test_themed_background(void)
{WC_TABCONTROLA, 0, drawthemeparentbackground_seq, TRUE},
{TOOLBARCLASSNAMEA, 0, empty_seq, TRUE},
{TOOLTIPS_CLASSA, 0, empty_seq},
- {TRACKBAR_CLASSA, 0, wm_ctlcolorstatic_seq, TRUE},
+ {TRACKBAR_CLASSA, 0, wm_ctlcolorstatic_seq},
{WC_TREEVIEWA, 0, treeview_seq},
{UPDOWN_CLASSA, 0, empty_seq},
{WC_SCROLLBARA, 0, scrollbar_seq, TRUE},
diff --git a/dlls/comctl32/trackbar.c b/dlls/comctl32/trackbar.c
index 6643752c043..f2cb2a07a8d 100644
--- a/dlls/comctl32/trackbar.c
+++ b/dlls/comctl32/trackbar.c
@@ -899,6 +899,7 @@ TRACKBAR_Refresh (TRACKBAR_INFO *infoPtr, HDC hdcDst)
HBITMAP hOldBmp = 0, hOffScreenBmp = 0;
NMCUSTOMDRAW nmcd;
int gcdrf, icdrf;
+ HBRUSH brush;
if (infoPtr->flags & TB_THUMBCHANGED) {
TRACKBAR_UpdateThumb (infoPtr);
@@ -943,14 +944,9 @@ TRACKBAR_Refresh (TRACKBAR_INFO *infoPtr, HDC hdcDst)
/* Erase background */
if (gcdrf == CDRF_DODEFAULT ||
notify_customdraw(infoPtr, &nmcd, CDDS_PREERASE) != CDRF_SKIPDEFAULT) {
- if (GetWindowTheme (infoPtr->hwndSelf)) {
- DrawThemeParentBackground (infoPtr->hwndSelf, hdc, 0);
- }
- else {
- HBRUSH brush = (HBRUSH)SendMessageW(infoPtr->hwndNotify, WM_CTLCOLORSTATIC,
- (WPARAM)hdc, (LPARAM)infoPtr->hwndSelf);
- FillRect (hdc, &rcClient, brush ? brush : GetSysColorBrush(COLOR_BTNFACE));
- }
+ brush = (HBRUSH)SendMessageW(infoPtr->hwndNotify, WM_CTLCOLORSTATIC, (WPARAM)hdc,
+ (LPARAM)infoPtr->hwndSelf);
+ FillRect(hdc, &rcClient, brush ? brush : GetSysColorBrush(COLOR_BTNFACE));
if (gcdrf != CDRF_DODEFAULT)
notify_customdraw(infoPtr, &nmcd, CDDS_POSTERASE);
}
--
2.32.0
1
0
Add themed background tests to determine whether DrawThemeParentBackground()
or WM_CTLCOLOR* are used to draw themed background for comctl32 classes.
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
---
dlls/comctl32/tests/misc.c | 327 +++++++++++++++++++++++++++++++++++++
1 file changed, 327 insertions(+)
diff --git a/dlls/comctl32/tests/misc.c b/dlls/comctl32/tests/misc.c
index 4628e37bb7a..3a1b5253b58 100644
--- a/dlls/comctl32/tests/misc.c
+++ b/dlls/comctl32/tests/misc.c
@@ -46,6 +46,7 @@ static HMODULE hComctl32;
enum seq_index
{
CHILD_SEQ_INDEX,
+ PARENT_SEQ_INDEX,
NUM_MSG_SEQUENCES
};
@@ -652,6 +653,331 @@ static void test_WM_SYSCOLORCHANGE(void)
DestroyWindow(parent);
}
+static const struct message empty_seq[] =
+{
+ {0}
+};
+
+static const struct message wm_erasebkgnd_seq[] =
+{
+ {WM_ERASEBKGND, sent},
+ {0}
+};
+
+static const struct message wm_ctlcolorstatic_seq[] =
+{
+ {WM_CTLCOLORSTATIC, sent},
+ {0}
+};
+
+static const struct message drawthemeparentbackground_seq[] =
+{
+ {WM_ERASEBKGND, sent},
+ {WM_PRINTCLIENT, sent},
+ {0}
+};
+
+static const struct message drawthemeparentbackground_optional_seq[] =
+{
+ {WM_ERASEBKGND, sent | optional},
+ {WM_PRINTCLIENT, sent | optional},
+ {0}
+};
+
+static const struct message pushbutton_seq[] =
+{
+ {WM_ERASEBKGND, sent},
+ {WM_PRINTCLIENT, sent},
+ {WM_CTLCOLORBTN, sent},
+ {0}
+};
+
+static const struct message defpushbutton_seq[] =
+{
+ {WM_ERASEBKGND, sent},
+ {WM_PRINTCLIENT, sent},
+ {WM_CTLCOLORBTN, sent},
+ {WM_ERASEBKGND, sent | optional},
+ {WM_PRINTCLIENT, sent | optional},
+ {WM_CTLCOLORBTN, sent | optional},
+ {0}
+};
+
+static const struct message checkbox_seq[] =
+{
+ {WM_ERASEBKGND, sent | optional},
+ {WM_PRINTCLIENT, sent | optional},
+ {WM_CTLCOLORSTATIC, sent},
+ {0}
+};
+
+static const struct message radiobutton_seq[] =
+{
+ {WM_ERASEBKGND, sent},
+ {WM_PRINTCLIENT, sent},
+ {WM_CTLCOLORSTATIC, sent},
+ {0}
+};
+
+static const struct message groupbox_seq[] =
+{
+ {WM_CTLCOLORSTATIC, sent},
+ {WM_ERASEBKGND, sent},
+ {WM_PRINTCLIENT, sent},
+ {0}
+};
+
+static const struct message ownerdrawbutton_seq[] =
+{
+ {WM_CTLCOLORBTN, sent},
+ {WM_CTLCOLORBTN, sent},
+ {0}
+};
+
+static const struct message splitbutton_seq[] =
+{
+ {WM_ERASEBKGND, sent},
+ {WM_PRINTCLIENT, sent},
+ /* Either WM_CTLCOLORSTATIC or WM_CTLCOLORBTN */
+ {WM_CTLCOLORSTATIC, sent | optional},
+ {WM_CTLCOLORBTN, sent | optional},
+ /* BS_DEFSPLITBUTTON or BS_DEFCOMMANDLINK */
+ {WM_ERASEBKGND, sent | optional},
+ {WM_PRINTCLIENT, sent | optional},
+ {WM_CTLCOLORSTATIC, sent | optional},
+ {WM_CTLCOLORBTN, sent | optional},
+ {0}
+};
+
+static const struct message combobox_seq[] =
+{
+ {WM_ERASEBKGND, sent | optional},
+ {WM_PRINTCLIENT, sent | optional},
+ {WM_CTLCOLOREDIT, sent},
+ {WM_CTLCOLORLISTBOX, sent},
+ {WM_CTLCOLORLISTBOX, sent | optional},
+ {WM_CTLCOLOREDIT, sent | optional},
+ {WM_CTLCOLOREDIT, sent | optional},
+ {0}
+};
+
+static const struct message edit_seq[] =
+{
+ {WM_CTLCOLOREDIT, sent},
+ {WM_CTLCOLOREDIT, sent | optional},
+ {0}
+};
+
+static const struct message listbox_seq[] =
+{
+ {WM_CTLCOLORLISTBOX, sent},
+ {WM_CTLCOLORLISTBOX, sent},
+ {0}
+};
+
+static const struct message treeview_seq[] =
+{
+ {WM_CTLCOLOREDIT, sent | optional},
+ {WM_CTLCOLOREDIT, sent | optional},
+ {0}
+};
+
+static const struct message scrollbar_seq[] =
+{
+ {WM_CTLCOLORSCROLLBAR, sent},
+ {WM_CTLCOLORSCROLLBAR, sent | optional},
+ {0}
+};
+
+static LRESULT WINAPI test_themed_background_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp)
+{
+ struct message msg = {0};
+ HBRUSH brush;
+ RECT rect;
+
+ if (message == WM_ERASEBKGND || message == WM_PRINTCLIENT || (message >= WM_CTLCOLORMSGBOX
+ && message <= WM_CTLCOLORSTATIC))
+ {
+ msg.message = message;
+ msg.flags = sent;
+ add_message(sequences, PARENT_SEQ_INDEX, &msg);
+ }
+
+ if (message == WM_ERASEBKGND)
+ {
+ brush = CreateSolidBrush(RGB(255, 0, 0));
+ GetClientRect(hwnd, &rect);
+ FillRect((HDC)wp, &rect, brush);
+ DeleteObject(brush);
+ return 1;
+ }
+ else if (message >= WM_CTLCOLORMSGBOX && message <= WM_CTLCOLORSTATIC)
+ {
+ return (LRESULT)GetStockObject(GRAY_BRUSH);
+ }
+
+ return DefWindowProcA(hwnd, message, wp, lp);
+}
+
+static void test_themed_background(void)
+{
+ DPI_AWARENESS_CONTEXT (WINAPI *pSetThreadDpiAwarenessContext)(DPI_AWARENESS_CONTEXT);
+ DPI_AWARENESS_CONTEXT old_context = NULL;
+ BOOL (WINAPI *pIsThemeActive)(void);
+ HWND child, parent;
+ HMODULE uxtheme;
+ COLORREF color;
+ WNDCLASSA cls;
+ HDC hdc;
+ int i;
+
+ static const struct test
+ {
+ const CHAR *class_name;
+ DWORD style;
+ const struct message *seq;
+ BOOL todo;
+ }
+ tests[] =
+ {
+ {ANIMATE_CLASSA, 0, empty_seq, TRUE},
+ {WC_BUTTONA, BS_PUSHBUTTON, pushbutton_seq, TRUE},
+ {WC_BUTTONA, BS_DEFPUSHBUTTON, defpushbutton_seq, TRUE},
+ {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_GROUPBOX, groupbox_seq, TRUE},
+ {WC_BUTTONA, BS_USERBUTTON, pushbutton_seq, TRUE},
+ {WC_BUTTONA, BS_AUTORADIOBUTTON, radiobutton_seq, TRUE},
+ {WC_BUTTONA, BS_PUSHBOX, radiobutton_seq, TRUE},
+ {WC_BUTTONA, BS_OWNERDRAW, ownerdrawbutton_seq},
+ {WC_BUTTONA, BS_SPLITBUTTON, splitbutton_seq},
+ {WC_BUTTONA, BS_DEFSPLITBUTTON, splitbutton_seq},
+ {WC_BUTTONA, BS_COMMANDLINK, splitbutton_seq},
+ {WC_BUTTONA, BS_DEFCOMMANDLINK, splitbutton_seq},
+ {WC_COMBOBOXA, 0, combobox_seq, TRUE},
+ {WC_COMBOBOXEXA, 0, drawthemeparentbackground_optional_seq},
+ {DATETIMEPICK_CLASSA, 0, drawthemeparentbackground_optional_seq, TRUE},
+ {WC_EDITA, 0, edit_seq},
+ {WC_HEADERA, 0, empty_seq},
+ {HOTKEY_CLASSA, 0, empty_seq, TRUE},
+ {WC_IPADDRESSA, 0, empty_seq},
+ {WC_LISTBOXA, 0, listbox_seq, TRUE},
+ {WC_LISTVIEWA, 0, empty_seq},
+ {MONTHCAL_CLASSA, 0, empty_seq},
+ {WC_NATIVEFONTCTLA, 0, empty_seq},
+ {WC_PAGESCROLLERA, 0, wm_erasebkgnd_seq},
+ {PROGRESS_CLASSA, 0, drawthemeparentbackground_optional_seq},
+ {REBARCLASSNAMEA, 0, empty_seq},
+ {WC_STATICA, SS_LEFT, wm_ctlcolorstatic_seq},
+ {WC_STATICA, SS_ICON, wm_ctlcolorstatic_seq},
+ {WC_STATICA, SS_BLACKRECT, wm_ctlcolorstatic_seq, TRUE},
+ {WC_STATICA, SS_OWNERDRAW, wm_ctlcolorstatic_seq},
+ {WC_STATICA, SS_BITMAP, wm_ctlcolorstatic_seq},
+ {WC_STATICA, SS_ENHMETAFILE, wm_ctlcolorstatic_seq},
+ {WC_STATICA, SS_ETCHEDHORZ, wm_ctlcolorstatic_seq, TRUE},
+ {STATUSCLASSNAMEA, 0, empty_seq},
+ {"SysLink", 0, wm_ctlcolorstatic_seq},
+ {WC_TABCONTROLA, 0, drawthemeparentbackground_seq, TRUE},
+ {TOOLBARCLASSNAMEA, 0, empty_seq, TRUE},
+ {TOOLTIPS_CLASSA, 0, empty_seq},
+ {TRACKBAR_CLASSA, 0, wm_ctlcolorstatic_seq, TRUE},
+ {WC_TREEVIEWA, 0, treeview_seq},
+ {UPDOWN_CLASSA, 0, empty_seq},
+ {WC_SCROLLBARA, 0, scrollbar_seq, TRUE},
+ {WC_SCROLLBARA, SBS_SIZEBOX, empty_seq, TRUE},
+ {WC_SCROLLBARA, SBS_SIZEGRIP, empty_seq, TRUE},
+ };
+
+ uxtheme = LoadLibraryA("uxtheme.dll");
+ pIsThemeActive = (void *)GetProcAddress(uxtheme, "IsThemeActive");
+ if (!pIsThemeActive())
+ {
+ skip("Theming is inactive.\n");
+ FreeLibrary(uxtheme);
+ return;
+ }
+ FreeLibrary(uxtheme);
+
+ pSetThreadDpiAwarenessContext = (void *)GetProcAddress(GetModuleHandleA("user32.dll"),
+ "SetThreadDpiAwarenessContext");
+ if (pSetThreadDpiAwarenessContext)
+ pSetThreadDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE);
+
+ memset(&cls, 0, sizeof(cls));
+ cls.hInstance = GetModuleHandleA(0);
+ cls.hCursor = LoadCursorA(0, (LPCSTR)IDC_ARROW);
+ cls.hbrBackground = GetStockObject(WHITE_BRUSH);
+ cls.lpfnWndProc = test_themed_background_proc;
+ cls.lpszClassName = "ParentClass";
+ RegisterClassA(&cls);
+
+ parent = CreateWindowA(cls.lpszClassName, "parent", WS_POPUP | WS_VISIBLE, 100, 100, 100, 100,
+ 0, 0, 0, 0);
+ ok(parent != NULL, "CreateWindowA failed, error %u.\n", GetLastError());
+
+ for (i = 0; i < ARRAY_SIZE(tests); ++i)
+ {
+ winetest_push_context("%s %#x", tests[i].class_name, tests[i].style);
+
+ child = CreateWindowA(tests[i].class_name, " ", WS_CHILD | WS_VISIBLE | tests[i].style,
+ 0, 0, 50, 50, parent, 0, 0, 0);
+ ok(child != NULL, "CreateWindowA failed, error %u.\n", GetLastError());
+ flush_events();
+ flush_sequences(sequences, NUM_MSG_SEQUENCES);
+
+ RedrawWindow(child, NULL, NULL, RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW | RDW_ERASENOW | RDW_FRAME);
+ ok_sequence(sequences, PARENT_SEQ_INDEX, tests[i].seq, "paint background", tests[i].todo);
+
+ /* For message sequences that contain both DrawThemeParentBackground() messages and
+ * WM_CTLCOLOR*, do a color test to check which is really in effect for controls that can be
+ * tested automatically. For WM_ERASEBKGND from DrawThemeParentBackground(), a red brush is
+ * used. For WM_CTLCOLOR*, a gray brush is returned. If there are only WM_CTLCOLOR* messages
+ * in the message sequence, then surely DrawThemeParentBackground() is not used.
+ *
+ * For tests that use pushbutton_seq and defpushbutton_seq, manual tests on XP show that
+ * a brush from WM_CTLCOLORBTN is used to fill background even after a successful
+ * DrawThemeParentBackground(). This behavior can be verified by returning a gray or hollow
+ * brush in test_themed_background_proc() when handling WM_CTLCOLORBTN. It can't be tested
+ * automatically here because stock Windows themes don't use transparent button bitmaps */
+ if (tests[i].seq == radiobutton_seq || tests[i].seq == groupbox_seq)
+ {
+ hdc = GetDC(child);
+
+ if (tests[i].seq == radiobutton_seq)
+ {
+ /* WM_CTLCOLORSTATIC is used to fill background */
+ color = GetPixel(hdc, 40, 40);
+ todo_wine
+ ok(color == 0x808080, "Expected color %#x, got %#x.\n", 0x808080, color);
+ }
+ else if (tests[i].seq == groupbox_seq)
+ {
+ /* DrawThemeParentBackground() is used to fill content background */
+ color = GetPixel(hdc, 40, 40);
+ ok(color == 0xff, "Expected color %#x, got %#x.\n", 0xff, color);
+
+ /* WM_CTLCOLORSTATIC is used to fill text background */
+ color = GetPixel(hdc, 10, 10);
+ todo_wine
+ ok(color == 0x808080, "Expected color %#x, got %#x.\n", 0x808080, color);
+ }
+
+ ReleaseDC(child, hdc);
+ }
+
+ DestroyWindow(child);
+ winetest_pop_context();
+ }
+
+ DestroyWindow(parent);
+ UnregisterClassA(cls.lpszClassName, GetModuleHandleA(0));
+ if (pSetThreadDpiAwarenessContext)
+ pSetThreadDpiAwarenessContext(old_context);
+}
+
START_TEST(misc)
{
ULONG_PTR ctx_cookie;
@@ -675,6 +1001,7 @@ START_TEST(misc)
test_comctl32_classes(TRUE);
test_builtin_classes();
test_LoadIconWithScaleDown();
+ test_themed_background();
test_WM_THEMECHANGED();
test_WM_SYSCOLORCHANGE();
--
2.32.0
1
0
[PATCH 2/7] uxtheme: Use tab background as dialog texture for more WM_CTLCOLOR* messages.
by Zhiyi Zhang Feb. 9, 2022
by Zhiyi Zhang Feb. 9, 2022
Feb. 9, 2022
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
---
dlls/uxtheme/dialog.c | 3 +++
dlls/uxtheme/tests/system.c | 15 ++-------------
2 files changed, 5 insertions(+), 13 deletions(-)
diff --git a/dlls/uxtheme/dialog.c b/dlls/uxtheme/dialog.c
index 87c2b7d1c13..b91e20f0f33 100644
--- a/dlls/uxtheme/dialog.c
+++ b/dlls/uxtheme/dialog.c
@@ -149,6 +149,9 @@ LRESULT WINAPI UXTHEME_DefDlgProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp, BOO
SetBrushOrgEx(hdc, old_org.x, old_org.y, NULL);
return TRUE;
}
+ case WM_CTLCOLORMSGBOX:
+ case WM_CTLCOLORBTN:
+ case WM_CTLCOLORDLG:
case WM_CTLCOLORSTATIC:
{
dlgproc = (WNDPROC)GetWindowLongPtrW(hwnd, DWLP_DLGPROC);
diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c
index 77a12f3fa44..c70e6c27361 100644
--- a/dlls/uxtheme/tests/system.c
+++ b/dlls/uxtheme/tests/system.c
@@ -1854,7 +1854,6 @@ static void test_EnableThemeDialogTexture(void)
}
else
{
- todo_wine_if(msg != WM_CTLCOLORSTATIC)
ok(org.x == -1 && org.y == -2, "Expected (-1,-2), got %s.\n", wine_dbgstr_point(&org));
}
@@ -1863,7 +1862,6 @@ static void test_EnableThemeDialogTexture(void)
ok(old_mode != 0, "SetBkMode failed.\n");
SendMessageW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
mode = SetBkMode(child_hdc, old_mode);
- todo_wine_if(msg != WM_CTLCOLORSTATIC)
ok(mode == TRANSPARENT, "Expected mode %#x, got %#x.\n", TRANSPARENT, mode);
/* Test that some WM_CTLCOLOR* messages change background color when dialog texture is on */
@@ -1879,24 +1877,18 @@ static void test_EnableThemeDialogTexture(void)
memset(&log_brush, 0, sizeof(log_brush));
count = GetObjectA(brush, sizeof(log_brush), &log_brush);
ok(count == sizeof(log_brush), "GetObjectA failed, error %u.\n", GetLastError());
- todo_wine_if(msg != WM_CTLCOLORSTATIC)
ok(log_brush.lbColor == 0, "Expected brush color %#x, got %#x.\n", 0, log_brush.lbColor);
- todo_wine_if(msg != WM_CTLCOLORSTATIC)
ok(log_brush.lbStyle == BS_PATTERN, "Expected brush style %#x, got %#x.\n", BS_PATTERN,
log_brush.lbStyle);
memset(&bmp, 0, sizeof(bmp));
count = GetObjectA((HBITMAP)log_brush.lbHatch, sizeof(bmp), &bmp);
- todo_wine_if(msg != WM_CTLCOLORSTATIC)
ok(count == sizeof(bmp), "GetObjectA failed, error %u.\n", GetLastError());
- todo_wine_if(msg != WM_CTLCOLORSTATIC)
ok(bmp.bmWidth == size.cx, "Expected width %d, got %d.\n", size.cx, bmp.bmWidth);
- todo_wine_if(msg != WM_CTLCOLORSTATIC)
ok(bmp.bmHeight == size.cy, "Expected height %d, got %d.\n", size.cy, bmp.bmHeight);
/* Test that DefDlgProcA/W() are hooked for some WM_CTLCOLOR* messages */
brush = (HBRUSH)SendMessageW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
- todo_wine_if(msg != WM_CTLCOLORSTATIC)
ok(brush != GetSysColorBrush(COLOR_BTNFACE), "Expected a different brush.\n");
brush2 = (HBRUSH)DefDlgProcW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
ok(brush2 == brush, "Expected the same brush.\n");
@@ -1905,24 +1897,21 @@ static void test_EnableThemeDialogTexture(void)
/* Test that DefWindowProcA/W() are also hooked for some WM_CTLCOLOR* messages */
brush = (HBRUSH)SendMessageW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
- todo_wine_if(msg != WM_CTLCOLORSTATIC)
ok(brush != GetSysColorBrush(COLOR_BTNFACE), "Expected a different brush.\n");
if (msg != WM_CTLCOLORDLG)
{
brush2 = (HBRUSH)DefWindowProcW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
- todo_wine_if(msg == WM_CTLCOLORSTATIC)
+ todo_wine
ok(brush2 == brush, "Expected the same brush.\n");
brush2 = (HBRUSH)DefWindowProcA(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
- todo_wine_if(msg == WM_CTLCOLORSTATIC)
+ todo_wine
ok(brush2 == brush, "Expected the same brush.\n");
}
else
{
brush2 = (HBRUSH)DefWindowProcW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
- todo_wine
ok(brush2 != brush, "Expected a different brush.\n");
brush2 = (HBRUSH)DefWindowProcA(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
- todo_wine
ok(brush2 != brush, "Expected a different brush.\n");
}
--
2.32.0
1
0
[PATCH 1/7] uxtheme/tests: Test more WM_CTLCOLOR* messages for dialog theming.
by Zhiyi Zhang Feb. 9, 2022
by Zhiyi Zhang Feb. 9, 2022
Feb. 9, 2022
Test that some WM_CTLCOLOR* other than WM_CTLCOLORSTATIC also use tab background as dialog texture.
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
---
dlls/uxtheme/tests/system.c | 150 ++++++++++++++++++++++--------------
1 file changed, 94 insertions(+), 56 deletions(-)
diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c
index 980676f9e57..77a12f3fa44 100644
--- a/dlls/uxtheme/tests/system.c
+++ b/dlls/uxtheme/tests/system.c
@@ -1617,6 +1617,7 @@ static void test_EnableThemeDialogTexture(void)
LRESULT lr;
POINT org;
SIZE size;
+ UINT msg;
BOOL ret;
struct
@@ -1822,74 +1823,111 @@ static void test_EnableThemeDialogTexture(void)
GetSysColorBrush(COLOR_MENU), brush);
handle_WM_CTLCOLORSTATIC = FALSE;
- /* Test that WM_CTLCOLORSTATIC changes brush origin when dialog texture is on */
- ret = SetBrushOrgEx(child_hdc, 0, 0, NULL);
- ok(ret, "SetBrushOrgEx failed, error %u.\n", GetLastError());
- SendMessageW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child);
- ret = GetBrushOrgEx(child_hdc, &org);
- ok(ret, "GetBrushOrgEx failed, error %u.\n", GetLastError());
- ok(org.x == -1 && org.y == -2, "Expected (-1,-2), got %s.\n", wine_dbgstr_point(&org));
-
- /* Test that WM_CTLCOLORSTATIC changes background mode when dialog texture is on */
- old_mode = SetBkMode(child_hdc, OPAQUE);
- ok(old_mode != 0, "SetBkMode failed.\n");
- SendMessageW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child);
- mode = SetBkMode(child_hdc, old_mode);
- ok(mode == TRANSPARENT, "Expected mode %#x, got %#x.\n", TRANSPARENT, mode);
-
- /* Test that WM_CTLCOLORSTATIC changes background color when dialog texture is on */
- old_color = SetBkColor(child_hdc, 0xaa5511);
- ok(old_color != CLR_INVALID, "SetBkColor failed.\n");
- SendMessageW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child);
- color = SetBkColor(child_hdc, old_color);
- ok(color == GetSysColor(COLOR_BTNFACE), "Expected background color %#x, got %#x.\n",
- GetSysColor(COLOR_BTNFACE), color);
-
/* Test that dialog doesn't have theme handle opened for itself */
ok(GetWindowTheme(dialog) == NULL, "Expected NULL theme handle.\n");
- /* Test that the returned brush is a pattern brush created from the tab body */
- brush = (HBRUSH)SendMessageW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child);
- memset(&log_brush, 0, sizeof(log_brush));
- count = GetObjectA(brush, sizeof(log_brush), &log_brush);
- ok(count == sizeof(log_brush), "GetObjectA failed, error %u.\n", GetLastError());
- ok(log_brush.lbColor == 0, "Expected brush color %#x, got %#x.\n", 0, log_brush.lbColor);
- ok(log_brush.lbStyle == BS_PATTERN, "Expected brush style %#x, got %#x.\n", BS_PATTERN,
- log_brush.lbStyle);
-
- memset(&bmp, 0, sizeof(bmp));
- count = GetObjectA((HBITMAP)log_brush.lbHatch, sizeof(bmp), &bmp);
- ok(count == sizeof(bmp), "GetObjectA failed, error %u.\n", GetLastError());
-
theme = OpenThemeData(NULL, L"Tab");
ok(theme != NULL, "OpenThemeData failed.\n");
-
size.cx = 0;
size.cy = 0;
hr = GetThemePartSize(theme, NULL, TABP_BODY, 0, NULL, TS_TRUE, &size);
ok(hr == S_OK, "GetThemePartSize failed, hr %#x.\n", hr);
- ok(bmp.bmWidth == size.cx, "Expected width %d, got %d.\n", size.cx, bmp.bmWidth);
- ok(bmp.bmHeight == size.cy, "Expected height %d, got %d.\n", size.cy, bmp.bmHeight);
-
CloseThemeData(theme);
- /* Test that DefDlgProcA/W() are hooked for WM_CTLCOLORSTATIC */
- brush = (HBRUSH)SendMessageW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child);
- ok(brush != GetSysColorBrush(COLOR_BTNFACE), "Expected a different brush.\n");
- brush2 = (HBRUSH)DefDlgProcW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child);
- ok(brush2 == brush, "Expected the same brush.\n");
- brush2 = (HBRUSH)DefDlgProcA(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child);
- ok(brush2 == brush, "Expected the same brush.\n");
+ /* Test which WM_CTLCOLOR* message uses tab background as dialog texture */
+ for (msg = WM_CTLCOLORMSGBOX; msg <= WM_CTLCOLORSTATIC; ++msg)
+ {
+ winetest_push_context("msg %#x", msg);
- /* Test that DefWindowProcA/W() are also hooked for WM_CTLCOLORSTATIC */
- brush = (HBRUSH)SendMessageW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child);
- ok(brush != GetSysColorBrush(COLOR_BTNFACE), "Expected a different brush.\n");
- brush2 = (HBRUSH)DefWindowProcW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child);
- todo_wine
- ok(brush2 == brush, "Expected the same brush.\n");
- brush2 = (HBRUSH)DefWindowProcA(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child);
- todo_wine
- ok(brush2 == brush, "Expected the same brush.\n");
+ /* Test that some WM_CTLCOLOR* messages change brush origin when dialog texture is on */
+ ret = SetBrushOrgEx(child_hdc, 0, 0, NULL);
+ ok(ret, "SetBrushOrgEx failed, error %u.\n", GetLastError());
+ SendMessageW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
+ ret = GetBrushOrgEx(child_hdc, &org);
+ ok(ret, "GetBrushOrgEx failed, error %u.\n", GetLastError());
+ /* WM_CTLCOLOREDIT, WM_CTLCOLORLISTBOX and WM_CTLCOLORSCROLLBAR don't use tab background */
+ if (msg == WM_CTLCOLOREDIT || msg == WM_CTLCOLORLISTBOX || msg == WM_CTLCOLORSCROLLBAR)
+ {
+ ok(org.x == 0 && org.y == 0, "Expected (0,0), got %s.\n", wine_dbgstr_point(&org));
+ winetest_pop_context();
+ continue;
+ }
+ else
+ {
+ todo_wine_if(msg != WM_CTLCOLORSTATIC)
+ ok(org.x == -1 && org.y == -2, "Expected (-1,-2), got %s.\n", wine_dbgstr_point(&org));
+ }
+
+ /* Test that some WM_CTLCOLOR* messages change background mode when dialog texture is on */
+ old_mode = SetBkMode(child_hdc, OPAQUE);
+ ok(old_mode != 0, "SetBkMode failed.\n");
+ SendMessageW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
+ mode = SetBkMode(child_hdc, old_mode);
+ todo_wine_if(msg != WM_CTLCOLORSTATIC)
+ ok(mode == TRANSPARENT, "Expected mode %#x, got %#x.\n", TRANSPARENT, mode);
+
+ /* Test that some WM_CTLCOLOR* messages change background color when dialog texture is on */
+ old_color = SetBkColor(child_hdc, 0xaa5511);
+ ok(old_color != CLR_INVALID, "SetBkColor failed.\n");
+ SendMessageW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
+ color = SetBkColor(child_hdc, old_color);
+ ok(color == GetSysColor(COLOR_BTNFACE), "Expected background color %#x, got %#x.\n",
+ GetSysColor(COLOR_BTNFACE), color);
+
+ /* Test that the returned brush is a pattern brush created from the tab body */
+ brush = (HBRUSH)SendMessageW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
+ memset(&log_brush, 0, sizeof(log_brush));
+ count = GetObjectA(brush, sizeof(log_brush), &log_brush);
+ ok(count == sizeof(log_brush), "GetObjectA failed, error %u.\n", GetLastError());
+ todo_wine_if(msg != WM_CTLCOLORSTATIC)
+ ok(log_brush.lbColor == 0, "Expected brush color %#x, got %#x.\n", 0, log_brush.lbColor);
+ todo_wine_if(msg != WM_CTLCOLORSTATIC)
+ ok(log_brush.lbStyle == BS_PATTERN, "Expected brush style %#x, got %#x.\n", BS_PATTERN,
+ log_brush.lbStyle);
+
+ memset(&bmp, 0, sizeof(bmp));
+ count = GetObjectA((HBITMAP)log_brush.lbHatch, sizeof(bmp), &bmp);
+ todo_wine_if(msg != WM_CTLCOLORSTATIC)
+ ok(count == sizeof(bmp), "GetObjectA failed, error %u.\n", GetLastError());
+ todo_wine_if(msg != WM_CTLCOLORSTATIC)
+ ok(bmp.bmWidth == size.cx, "Expected width %d, got %d.\n", size.cx, bmp.bmWidth);
+ todo_wine_if(msg != WM_CTLCOLORSTATIC)
+ ok(bmp.bmHeight == size.cy, "Expected height %d, got %d.\n", size.cy, bmp.bmHeight);
+
+ /* Test that DefDlgProcA/W() are hooked for some WM_CTLCOLOR* messages */
+ brush = (HBRUSH)SendMessageW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
+ todo_wine_if(msg != WM_CTLCOLORSTATIC)
+ ok(brush != GetSysColorBrush(COLOR_BTNFACE), "Expected a different brush.\n");
+ brush2 = (HBRUSH)DefDlgProcW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
+ ok(brush2 == brush, "Expected the same brush.\n");
+ brush2 = (HBRUSH)DefDlgProcA(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
+ ok(brush2 == brush, "Expected the same brush.\n");
+
+ /* Test that DefWindowProcA/W() are also hooked for some WM_CTLCOLOR* messages */
+ brush = (HBRUSH)SendMessageW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
+ todo_wine_if(msg != WM_CTLCOLORSTATIC)
+ ok(brush != GetSysColorBrush(COLOR_BTNFACE), "Expected a different brush.\n");
+ if (msg != WM_CTLCOLORDLG)
+ {
+ brush2 = (HBRUSH)DefWindowProcW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
+ todo_wine_if(msg == WM_CTLCOLORSTATIC)
+ ok(brush2 == brush, "Expected the same brush.\n");
+ brush2 = (HBRUSH)DefWindowProcA(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
+ todo_wine_if(msg == WM_CTLCOLORSTATIC)
+ ok(brush2 == brush, "Expected the same brush.\n");
+ }
+ else
+ {
+ brush2 = (HBRUSH)DefWindowProcW(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
+ todo_wine
+ ok(brush2 != brush, "Expected a different brush.\n");
+ brush2 = (HBRUSH)DefWindowProcA(dialog, msg, (WPARAM)child_hdc, (LPARAM)child);
+ todo_wine
+ ok(brush2 != brush, "Expected a different brush.\n");
+ }
+
+ winetest_pop_context();
+ }
/* Test that DefWindowProcA/W() are not hooked for WM_ERASEBKGND. So the background is still
* drawn with hbrBackground, which in this case, is GRAY_BRUSH.
--
2.32.0
1
0
Feb. 9, 2022
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
programs/schtasks/Makefile.in | 1 -
programs/schtasks/schtasks.c | 8 ++++----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/programs/schtasks/Makefile.in b/programs/schtasks/Makefile.in
index 63afc93a876..6eb8d530425 100644
--- a/programs/schtasks/Makefile.in
+++ b/programs/schtasks/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = schtasks.exe
IMPORTS = oleaut32 ole32
diff --git a/programs/schtasks/schtasks.c b/programs/schtasks/schtasks.c
index 340aeaa56fb..c9434801db8 100644
--- a/programs/schtasks/schtasks.c
+++ b/programs/schtasks/schtasks.c
@@ -40,14 +40,14 @@ static ITaskFolder *get_tasks_root_folder(void)
V_VT(&empty) = VT_EMPTY;
hres = ITaskService_Connect(service, empty, empty, empty, empty);
if (FAILED(hres)) {
- FIXME("Connect failed: %08x\n", hres);
+ FIXME("Connect failed: %08lx\n", hres);
return NULL;
}
hres = ITaskService_GetFolder(service, NULL, &root);
ITaskService_Release(service);
if (FAILED(hres)) {
- FIXME("GetFolder failed: %08x\n", hres);
+ FIXME("GetFolder failed: %08lx\n", hres);
return NULL;
}
@@ -70,7 +70,7 @@ static IRegisteredTask *get_registered_task(const WCHAR *name)
SysFreeString(str);
ITaskFolder_Release(root);
if (FAILED(hres)) {
- FIXME("GetTask failed: %08x\n", hres);
+ FIXME("GetTask failed: %08lx\n", hres);
return NULL;
}
@@ -183,7 +183,7 @@ static int change_command(int argc, WCHAR *argv[])
hres = IRegisteredTask_put_Enabled(task, VARIANT_TRUE);
if (FAILED(hres)) {
IRegisteredTask_Release(task);
- FIXME("put_Enabled failed: %08x\n", hres);
+ FIXME("put_Enabled failed: %08lx\n", hres);
return 1;
}
}
1
24
ddraw1 doesn't draw, so presumably not affected. Can't find any crashes in the testbot history
http://test.winehq.org/data/4364ff8d5c0387edd6fae142affe8e844b291518/win81_…
http://test.winehq.org/data/d03984709d87d6eaa0e2e7746f0db5d8fdf81b5a/win150…
I haven't found any examples of ddraw7 crashing in this test. Doesn't mean there aren't any. Let's wait and see.
Signed-off-by: Stefan Dösinger <stefan(a)codeweavers.com>
---
dlls/ddraw/tests/ddraw2.c | 20 ++++++++++++++------
dlls/ddraw/tests/ddraw4.c | 9 +++++++++
2 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c
index 625776c652c..1285fa1b682 100644
--- a/dlls/ddraw/tests/ddraw2.c
+++ b/dlls/ddraw/tests/ddraw2.c
@@ -1076,6 +1076,17 @@ static void test_coop_level_d3d_state(void)
window = create_window();
ddraw = create_ddraw();
ok(!!ddraw, "Failed to create a ddraw object.\n");
+
+ if (ddraw_is_warp(ddraw))
+ {
+ /* ddraw2 crashes in EndScene, and if it doesn't crash it fails with
+ * DDERR_SURFACELOST on WARP. */
+ win_skip("Skipping test that crashes WARP occasionally.\n");
+ IDirectDraw2_Release(ddraw);
+ DestroyWindow(window);
+ return;
+ }
+
if (!(device = create_device(ddraw, window, DDSCL_NORMAL)))
{
skip("Failed to create a 3D device, skipping test.\n");
@@ -1159,12 +1170,9 @@ static void test_coop_level_d3d_state(void)
hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_LVERTEX, quad, ARRAY_SIZE(quad), 0);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice2_EndScene(device);
- ok(hr == DD_OK || broken(ddraw_is_warp(ddraw) && hr == DDERR_SURFACELOST), "Got unexpected hr %#x.\n", hr);
- if (hr == DD_OK)
- {
- color = get_surface_color(rt, 320, 240);
- ok(compare_color(color, 0x0000ff80, 1), "Got unexpected color 0x%08x.\n", color);
- }
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ color = get_surface_color(rt, 320, 240);
+ ok(compare_color(color, 0x0000ff80, 1), "Got unexpected color 0x%08x.\n", color);
destroy_viewport(device, viewport);
destroy_material(background);
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c
index 9b8acb674e3..6ed12d980db 100644
--- a/dlls/ddraw/tests/ddraw4.c
+++ b/dlls/ddraw/tests/ddraw4.c
@@ -1301,6 +1301,14 @@ static void test_coop_level_d3d_state(void)
hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **)&ddraw);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
IDirect3D3_Release(d3d);
+
+ if (ddraw_is_warp(ddraw))
+ {
+ /* ddraw4 occasionally crashes in GetRenderTarget. */
+ win_skip("Skipping test that crashes WARP occasionally.\n");
+ goto done;
+ }
+
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(rt);
@@ -1349,6 +1357,7 @@ static void test_coop_level_d3d_state(void)
|| broken(ddraw_is_warp(ddraw) && compare_color(color, 0x0000ff00, 0)),
"Got unexpected color 0x%08x.\n", color);
+done:
destroy_viewport(device, viewport);
IDirectDrawSurface4_Release(surface);
IDirectDrawSurface4_Release(rt);
--
2.34.1
5
13
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/ole32/Makefile.in | 2 +-
dlls/ole32/antimoniker.c | 11 +--
dlls/ole32/bindctx.c | 10 +--
dlls/ole32/classmoniker.c | 18 ++--
dlls/ole32/clipboard.c | 44 ++++-----
dlls/ole32/comcat.c | 6 +-
dlls/ole32/compobj.c | 8 +-
dlls/ole32/compositemoniker.c | 44 ++++-----
dlls/ole32/datacache.c | 25 +++---
dlls/ole32/defaulthandler.c | 37 ++++----
dlls/ole32/filelockbytes.c | 12 +--
dlls/ole32/filemoniker.c | 6 +-
dlls/ole32/git.c | 14 +--
dlls/ole32/itemmoniker.c | 18 ++--
dlls/ole32/memlockbytes.c | 6 +-
dlls/ole32/moniker.c | 28 +++---
dlls/ole32/ole2.c | 52 +++++------
dlls/ole32/ole2stubs.c | 4 +-
dlls/ole32/oleobj.c | 33 +++----
dlls/ole32/pointermoniker.c | 32 +++----
dlls/ole32/stg_prop.c | 104 +++++++++++-----------
dlls/ole32/stg_stream.c | 26 +++---
dlls/ole32/storage32.c | 162 ++++++++++++++++------------------
dlls/ole32/usrmarshal.c | 89 +++++++++----------
24 files changed, 375 insertions(+), 416 deletions(-)
diff --git a/dlls/ole32/Makefile.in b/dlls/ole32/Makefile.in
index e0e4bc74c1f..340ffdbded2 100644
--- a/dlls/ole32/Makefile.in
+++ b/dlls/ole32/Makefile.in
@@ -2,7 +2,7 @@ MODULE = ole32.dll
IMPORTLIB = ole32
IMPORTS = uuid advapi32 user32 gdi32 combase rpcrt4 kernelbase
DELAYIMPORTS = oleaut32
-EXTRADEFS = -DWINE_NO_LONG_TYPES -D_OLE32_
+EXTRADEFS = -D_OLE32_
C_SRCS = \
antimoniker.c \
diff --git a/dlls/ole32/antimoniker.c b/dlls/ole32/antimoniker.c
index 28c4dd91ac5..2a7be8e75cc 100644
--- a/dlls/ole32/antimoniker.c
+++ b/dlls/ole32/antimoniker.c
@@ -122,7 +122,7 @@ static ULONG WINAPI AntiMonikerImpl_AddRef(IMoniker *iface)
AntiMonikerImpl *moniker = impl_from_IMoniker(iface);
ULONG refcount = InterlockedIncrement(&moniker->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -135,7 +135,7 @@ static ULONG WINAPI AntiMonikerImpl_Release(IMoniker *iface)
AntiMonikerImpl *moniker = impl_from_IMoniker(iface);
ULONG refcount = InterlockedDecrement(&moniker->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -261,14 +261,11 @@ AntiMonikerImpl_BindToStorage(IMoniker* iface, IBindCtx* pbc, IMoniker* pmkToLef
return E_NOTIMPL;
}
-/******************************************************************************
- * AntiMoniker_Reduce
- ******************************************************************************/
static HRESULT WINAPI
AntiMonikerImpl_Reduce(IMoniker* iface, IBindCtx* pbc, DWORD dwReduceHowFar,
IMoniker** ppmkToLeft, IMoniker** ppmkReduced)
{
- TRACE("(%p,%p,%d,%p,%p)\n",iface,pbc,dwReduceHowFar,ppmkToLeft,ppmkReduced);
+ TRACE("%p, %p, %ld, %p, %p.\n", iface, pbc, dwReduceHowFar, ppmkToLeft, ppmkReduced);
if (ppmkReduced==NULL)
return E_POINTER;
@@ -556,7 +553,7 @@ AntiMonikerROTDataImpl_GetComparisonData(IROTData *iface, BYTE *data, ULONG data
{
AntiMonikerImpl *moniker = impl_from_IROTData(iface);
- TRACE("%p, %p, %u, %p.\n", iface, data, data_len, data_req);
+ TRACE("%p, %p, %lu, %p.\n", iface, data, data_len, data_req);
*data_req = sizeof(CLSID) + sizeof(DWORD);
if (data_len < *data_req)
diff --git a/dlls/ole32/bindctx.c b/dlls/ole32/bindctx.c
index 261c6b01c67..360464d13c5 100644
--- a/dlls/ole32/bindctx.c
+++ b/dlls/ole32/bindctx.c
@@ -118,7 +118,7 @@ static ULONG WINAPI BindCtxImpl_Release(IBindCtx* iface)
BindCtxImpl *context = impl_from_IBindCtx(iface);
ULONG refcount = InterlockedDecrement(&context->ref);
- TRACE("%p refcount %d.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -234,7 +234,7 @@ BindCtxImpl_SetBindOptions(IBindCtx* iface,BIND_OPTS *pbindopts)
if (pbindopts->cbStruct > sizeof(This->options))
{
- WARN("invalid size %u.\n", pbindopts->cbStruct);
+ WARN("invalid size %lu.\n", pbindopts->cbStruct);
return E_INVALIDARG;
}
memcpy(&This->options, pbindopts, pbindopts->cbStruct);
@@ -492,7 +492,7 @@ HRESULT WINAPI CreateBindCtx(DWORD reserved, IBindCtx **bind_context)
{
BindCtxImpl *object;
- TRACE("%#x, %p\n", reserved, bind_context);
+ TRACE("%#lx, %p.\n", reserved, bind_context);
if (!bind_context) return E_INVALIDARG;
@@ -500,7 +500,7 @@ HRESULT WINAPI CreateBindCtx(DWORD reserved, IBindCtx **bind_context)
if (reserved)
{
- WARN("reserved should be 0, not 0x%x\n", reserved);
+ WARN("reserved should be 0, not %#lx.\n", reserved);
return E_INVALIDARG;
}
@@ -539,7 +539,7 @@ HRESULT WINAPI BindMoniker(LPMONIKER pmk, DWORD grfOpt, REFIID riid, LPVOID * pp
HRESULT res;
IBindCtx * pbc;
- TRACE("(%p, %x, %s, %p)\n", pmk, grfOpt, debugstr_guid(riid), ppvResult);
+ TRACE("%p, %lx, %s, %p.\n", pmk, grfOpt, debugstr_guid(riid), ppvResult);
res = CreateBindCtx(grfOpt, &pbc);
if (SUCCEEDED(res))
diff --git a/dlls/ole32/classmoniker.c b/dlls/ole32/classmoniker.c
index 8fe60c6ba71..6199a5a5182 100644
--- a/dlls/ole32/classmoniker.c
+++ b/dlls/ole32/classmoniker.c
@@ -133,7 +133,7 @@ static ULONG WINAPI ClassMoniker_Release(IMoniker* iface)
ClassMoniker *moniker = impl_from_IMoniker(iface);
ULONG ref = InterlockedDecrement(&moniker->ref);
- TRACE("%p refcount %d\n", iface, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
if (!ref)
{
@@ -190,7 +190,7 @@ static HRESULT WINAPI ClassMoniker_Load(IMoniker *iface, IStream *stream)
heap_free(moniker->data);
if (!(moniker->data = heap_alloc(moniker->header.data_len)))
{
- WARN("Failed to allocate moniker data of size %u.\n", moniker->header.data_len);
+ WARN("Failed to allocate moniker data of size %lu.\n", moniker->header.data_len);
moniker->header.data_len = 0;
return E_OUTOFMEMORY;
}
@@ -278,16 +278,10 @@ static HRESULT WINAPI ClassMoniker_BindToStorage(IMoniker* iface,
return IMoniker_BindToObject(iface, pbc, pmkToLeft, riid, ppvResult);
}
-/******************************************************************************
- * ClassMoniker_Reduce
- ******************************************************************************/
-static HRESULT WINAPI ClassMoniker_Reduce(IMoniker* iface,
- IBindCtx* pbc,
- DWORD dwReduceHowFar,
- IMoniker** ppmkToLeft,
- IMoniker** ppmkReduced)
+static HRESULT WINAPI ClassMoniker_Reduce(IMoniker* iface, IBindCtx *pbc,
+ DWORD dwReduceHowFar, IMoniker **ppmkToLeft, IMoniker **ppmkReduced)
{
- TRACE("(%p,%p,%d,%p,%p)\n",iface,pbc,dwReduceHowFar,ppmkToLeft,ppmkReduced);
+ TRACE("%p, %p, %ld, %p, %p.\n", iface, pbc, dwReduceHowFar, ppmkToLeft, ppmkReduced);
if (!ppmkReduced)
return E_POINTER;
@@ -547,7 +541,7 @@ static HRESULT WINAPI ClassMonikerROTData_GetComparisonData(IROTData* iface,
{
ClassMoniker *This = impl_from_IROTData(iface);
- TRACE("(%p, %u, %p)\n", pbData, cbMax, pcbData);
+ TRACE("%p, %p, %lu, %p.\n", iface, pbData, cbMax, pcbData);
*pcbData = 2*sizeof(CLSID);
if (cbMax < *pcbData)
diff --git a/dlls/ole32/clipboard.c b/dlls/ole32/clipboard.c
index 1cad47a6a47..5d1be63a3f7 100644
--- a/dlls/ole32/clipboard.c
+++ b/dlls/ole32/clipboard.c
@@ -277,7 +277,7 @@ static inline HRESULT get_ole_clipbrd(ole_clipbrd **clipbrd)
static inline const char *dump_fmtetc(FORMATETC *fmt)
{
if (!fmt) return "(null)";
- return wine_dbg_sprintf("cf %04x ptd %p aspect %x lindex %d tymed %x",
+ return wine_dbg_sprintf("cf %04x ptd %p aspect %lx lindex %ld tymed %lx",
fmt->cfFormat, fmt->ptd, fmt->dwAspect, fmt->lindex, fmt->tymed);
}
@@ -338,9 +338,11 @@ static HRESULT WINAPI OLEClipbrd_IEnumFORMATETC_QueryInterface
static ULONG WINAPI OLEClipbrd_IEnumFORMATETC_AddRef(LPENUMFORMATETC iface)
{
enum_fmtetc *This = impl_from_IEnumFORMATETC(iface);
- TRACE("(%p)->(count=%u)\n",This, This->ref);
+ ULONG ref = InterlockedIncrement(&This->ref);
- return InterlockedIncrement(&This->ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
+
+ return ref;
}
/************************************************************************
@@ -351,11 +353,10 @@ static ULONG WINAPI OLEClipbrd_IEnumFORMATETC_AddRef(LPENUMFORMATETC iface)
static ULONG WINAPI OLEClipbrd_IEnumFORMATETC_Release(LPENUMFORMATETC iface)
{
enum_fmtetc *This = impl_from_IEnumFORMATETC(iface);
- ULONG ref;
+ ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p)->(count=%u)\n",This, This->ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
- ref = InterlockedDecrement(&This->ref);
if (!ref)
{
TRACE("() - destroying IEnumFORMATETC(%p)\n",This);
@@ -415,7 +416,7 @@ static HRESULT WINAPI OLEClipbrd_IEnumFORMATETC_Next
static HRESULT WINAPI OLEClipbrd_IEnumFORMATETC_Skip(LPENUMFORMATETC iface, ULONG celt)
{
enum_fmtetc *This = impl_from_IEnumFORMATETC(iface);
- TRACE("(%p)->(num=%u)\n", This, celt);
+ TRACE("%p, %lu.\n", iface, celt);
This->pos += celt;
if (This->pos > This->data->count)
@@ -650,7 +651,7 @@ static HRESULT render_embed_source_hack(IDataObject *data, LPFORMATETC fmt)
if (FAILED(hr = IDataObject_GetDataHere(theOleClipboard->src_data, fmt, &std)))
{
- WARN("() : IDataObject_GetDataHere failed to render clipboard data! (%x)\n", hr);
+ WARN("() : IDataObject_GetDataHere failed to render clipboard data! (%lx)\n", hr);
GlobalFree(hStorage);
return hr;
}
@@ -1025,7 +1026,7 @@ static HRESULT render_format(IDataObject *data, LPFORMATETC fmt)
}
else
{
- FIXME("Unhandled tymed %x\n", fmt->tymed);
+ FIXME("Unhandled tymed %lx\n", fmt->tymed);
hr = DV_E_FORMATETC;
}
@@ -1089,10 +1090,11 @@ static HRESULT WINAPI snapshot_QueryInterface(IDataObject *iface,
static ULONG WINAPI snapshot_AddRef(IDataObject *iface)
{
snapshot *This = impl_from_IDataObject(iface);
+ ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p)->(count=%u)\n", This, This->ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
- return InterlockedIncrement(&This->ref);
+ return ref;
}
/************************************************************************
@@ -1101,11 +1103,9 @@ static ULONG WINAPI snapshot_AddRef(IDataObject *iface)
static ULONG WINAPI snapshot_Release(IDataObject *iface)
{
snapshot *This = impl_from_IDataObject(iface);
- ULONG ref;
-
- TRACE("(%p)->(count=%u)\n", This, This->ref);
+ ULONG ref = InterlockedDecrement(&This->ref);
- ref = InterlockedDecrement(&This->ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
if (ref == 0)
{
@@ -1263,7 +1263,7 @@ static HRESULT get_priv_data(ole_priv_data **data)
else
TRACE("cf %04x\n", cf);
}
- TRACE("count %d\n", count);
+ TRACE("count %ld\n", count);
size += count * sizeof(ret->entries[0]);
/* There are holes in fmtetc so zero init */
@@ -1532,7 +1532,7 @@ static HRESULT WINAPI snapshot_GetData(IDataObject *iface, FORMATETC *fmt,
hr = get_stgmed_for_bitmap((HBITMAP)h, med);
else
{
- FIXME("Unhandled tymed - mask %x req tymed %x\n", mask, fmt->tymed);
+ FIXME("Unhandled tymed - mask %lx req tymed %lx\n", mask, fmt->tymed);
hr = E_FAIL;
goto end;
}
@@ -1558,7 +1558,7 @@ static HRESULT WINAPI snapshot_GetDataHere(IDataObject *iface, FORMATETC *fmt,
if ( !fmt || !med ) return E_INVALIDARG;
- TRACE("(%p, %p {%s}, %p (tymed %x)\n", iface, fmt, dump_fmtetc(fmt), med, med->tymed);
+ TRACE("%p, %p {%s}, %p (tymed %lx)\n", iface, fmt, dump_fmtetc(fmt), med, med->tymed);
if ( !OpenClipboard(NULL)) return CLIPBRD_E_CANT_OPEN;
@@ -1642,7 +1642,7 @@ static HRESULT WINAPI snapshot_GetDataHere(IDataObject *iface, FORMATETC *fmt,
break;
}
default:
- FIXME("Unhandled tymed - supported %x req tymed %x\n", supported, med->tymed);
+ FIXME("Unhandled tymed - supported %x req tymed %lx\n", supported, med->tymed);
hr = E_FAIL;
goto end;
}
@@ -1710,7 +1710,7 @@ static HRESULT WINAPI snapshot_EnumFormatEtc(IDataObject *iface, DWORD dir,
HRESULT hr;
ole_priv_data *data = NULL;
- TRACE("(%p, %x, %p)\n", iface, dir, enum_fmt);
+ TRACE("%p, %lx, %p.\n", iface, dir, enum_fmt);
*enum_fmt = NULL;
@@ -1737,7 +1737,7 @@ static HRESULT WINAPI snapshot_DAdvise(IDataObject *iface, FORMATETC *fmt,
DWORD flags, IAdviseSink *sink,
DWORD *conn)
{
- TRACE("(%p, %p, %x, %p, %p): not implemented\n", iface, fmt, flags, sink, conn);
+ TRACE("%p, %p, %lx, %p, %p.\n", iface, fmt, flags, sink, conn);
return E_NOTIMPL;
}
@@ -1748,7 +1748,7 @@ static HRESULT WINAPI snapshot_DAdvise(IDataObject *iface, FORMATETC *fmt,
*/
static HRESULT WINAPI snapshot_DUnadvise(IDataObject* iface, DWORD conn)
{
- TRACE("(%p, %d): not implemented\n", iface, conn);
+ TRACE("%p, %ld.\n", iface, conn);
return E_NOTIMPL;
}
diff --git a/dlls/ole32/comcat.c b/dlls/ole32/comcat.c
index 0b97b00d908..ad7e8a4b076 100644
--- a/dlls/ole32/comcat.c
+++ b/dlls/ole32/comcat.c
@@ -505,7 +505,7 @@ static HRESULT WINAPI COMCAT_ICatInformation_GetCategoryDesc(
HKEY key;
HRESULT res;
- TRACE("CATID: %s LCID: %x\n",debugstr_guid(rcatid), lcid);
+ TRACE("CATID: %s LCID: %lx\n",debugstr_guid(rcatid), lcid);
if (rcatid == NULL || ppszDesc == NULL) return E_INVALIDARG;
@@ -589,10 +589,10 @@ static HRESULT WINAPI COMCAT_ICatInformation_IsClassOfCategories(
if (TRACE_ON(ole)) {
ULONG count;
- TRACE("CLSID: %s Implemented %u\n",debugstr_guid(rclsid),cImplemented);
+ TRACE("CLSID: %s Implemented %lu\n",debugstr_guid(rclsid),cImplemented);
for (count = 0; count < cImplemented; ++count)
TRACE(" %s\n",debugstr_guid(&rgcatidImpl[count]));
- TRACE("Required %u\n",cRequired);
+ TRACE("Required %lu\n",cRequired);
for (count = 0; count < cRequired; ++count)
TRACE(" %s\n",debugstr_guid(&rgcatidReq[count]));
}
diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c
index aafc4cf19f8..8d2591c1211 100644
--- a/dlls/ole32/compobj.c
+++ b/dlls/ole32/compobj.c
@@ -373,7 +373,7 @@ static ULONG WINAPI ISynchronize_fnAddRef(ISynchronize *iface)
{
MREImpl *This = impl_from_ISynchronize(iface);
LONG ref = InterlockedIncrement(&This->ref);
- TRACE("%p - ref %d\n", This, ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
return ref;
}
@@ -382,7 +382,7 @@ static ULONG WINAPI ISynchronize_fnRelease(ISynchronize *iface)
{
MREImpl *This = impl_from_ISynchronize(iface);
LONG ref = InterlockedDecrement(&This->ref);
- TRACE("%p - ref %d\n", This, ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
if(!ref)
{
@@ -397,7 +397,7 @@ static HRESULT WINAPI ISynchronize_fnWait(ISynchronize *iface, DWORD dwFlags, DW
{
MREImpl *This = impl_from_ISynchronize(iface);
DWORD index;
- TRACE("%p (%08x, %08x)\n", This, dwFlags, dwMilliseconds);
+ TRACE("%p, %#lx, %#lx.\n", iface, dwFlags, dwMilliseconds);
return CoWaitForMultipleHandles(dwFlags, dwMilliseconds, 1, &This->event, &index);
}
@@ -929,7 +929,7 @@ HRESULT Handler_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
*/
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID reserved)
{
- TRACE("%p 0x%x %p\n", hinstDLL, fdwReason, reserved);
+ TRACE("%p, %#lx, %p.\n", hinstDLL, fdwReason, reserved);
switch(fdwReason) {
case DLL_PROCESS_ATTACH:
diff --git a/dlls/ole32/compositemoniker.c b/dlls/ole32/compositemoniker.c
index a94e4734f45..84099cee6d6 100644
--- a/dlls/ole32/compositemoniker.c
+++ b/dlls/ole32/compositemoniker.c
@@ -147,7 +147,7 @@ static ULONG WINAPI CompositeMonikerImpl_Release(IMoniker* iface)
CompositeMonikerImpl *moniker = impl_from_IMoniker(iface);
ULONG refcount = InterlockedDecrement(&moniker->ref);
- TRACE("%p, refcount %u\n", iface, refcount);
+ TRACE("%p, refcount %lu\n", iface, refcount);
if (!refcount)
{
@@ -205,13 +205,13 @@ static HRESULT WINAPI CompositeMonikerImpl_Load(IMoniker *iface, IStream *stream
hr = IStream_Read(stream, &count, sizeof(DWORD), NULL);
if (hr != S_OK)
{
- WARN("Failed to read component count, hr %#x.\n", hr);
+ WARN("Failed to read component count, hr %#lx.\n", hr);
return hr;
}
if (count < 2)
{
- WARN("Unexpected component count %u.\n", count);
+ WARN("Unexpected component count %lu.\n", count);
return E_UNEXPECTED;
}
@@ -222,7 +222,7 @@ static HRESULT WINAPI CompositeMonikerImpl_Load(IMoniker *iface, IStream *stream
{
if (FAILED(hr = OleLoadFromStream(stream, &IID_IMoniker, (void **)&m)))
{
- WARN("Failed to initialize component %u, hr %#x.\n", i, hr);
+ WARN("Failed to initialize component %lu, hr %#lx.\n", i, hr);
IMoniker_Release(last);
return hr;
}
@@ -416,7 +416,7 @@ static HRESULT WINAPI CompositeMonikerImpl_Reduce(IMoniker *iface, IBindCtx *pbc
BOOL was_reduced;
HRESULT hr;
- TRACE("%p, %p, %d, %p, %p.\n", iface, pbc, howfar, toleft, reduced);
+ TRACE("%p, %p, %ld, %p, %p.\n", iface, pbc, howfar, toleft, reduced);
if (!pbc || !reduced)
return E_INVALIDARG;
@@ -1021,7 +1021,7 @@ static HRESULT composite_get_moniker_comparison_data(IMoniker *moniker,
if (FAILED(hr = IMoniker_QueryInterface(moniker, &IID_IROTData, (void **)&rot_data)))
{
- WARN("Failed to get IROTData for component moniker, hr %#x.\n", hr);
+ WARN("Failed to get IROTData for component moniker, hr %#lx.\n", hr);
return hr;
}
@@ -1038,7 +1038,7 @@ static HRESULT WINAPI CompositeMonikerROTDataImpl_GetComparisonData(IROTData *if
HRESULT hr;
ULONG len;
- TRACE("%p, %p, %u, %p\n", iface, data, max_len, ret_len);
+ TRACE("%p, %p, %lu, %p\n", iface, data, max_len, ret_len);
if (!moniker->comp_count)
return E_UNEXPECTED;
@@ -1052,7 +1052,7 @@ static HRESULT WINAPI CompositeMonikerROTDataImpl_GetComparisonData(IROTData *if
*ret_len += len;
else
{
- WARN("Failed to get comparison data length for left component, hr %#x.\n", hr);
+ WARN("Failed to get comparison data length for left component, hr %#lx.\n", hr);
return hr;
}
@@ -1062,7 +1062,7 @@ static HRESULT WINAPI CompositeMonikerROTDataImpl_GetComparisonData(IROTData *if
*ret_len += len;
else
{
- WARN("Failed to get comparison data length for right component, hr %#x.\n", hr);
+ WARN("Failed to get comparison data length for right component, hr %#lx.\n", hr);
return hr;
}
@@ -1074,14 +1074,14 @@ static HRESULT WINAPI CompositeMonikerROTDataImpl_GetComparisonData(IROTData *if
max_len -= sizeof(CLSID);
if (FAILED(hr = composite_get_moniker_comparison_data(moniker->left, data, max_len, &len)))
{
- WARN("Failed to get comparison data for left component, hr %#x.\n", hr);
+ WARN("Failed to get comparison data for left component, hr %#lx.\n", hr);
return hr;
}
data += len;
max_len -= len;
if (FAILED(hr = composite_get_moniker_comparison_data(moniker->right, data, max_len, &len)))
{
- WARN("Failed to get comparison data for right component, hr %#x.\n", hr);
+ WARN("Failed to get comparison data for right component, hr %#lx.\n", hr);
return hr;
}
@@ -1121,7 +1121,7 @@ static HRESULT WINAPI CompositeMonikerMarshalImpl_GetUnmarshalClass(
{
CompositeMonikerImpl *This = impl_from_IMarshal(iface);
- TRACE("(%s, %p, %x, %p, %x, %p)\n", debugstr_guid(riid), pv,
+ TRACE("%s, %p, %lx, %p, %lx, %p.\n", debugstr_guid(riid), pv,
dwDestContext, pvDestContext, mshlflags, pCid);
return IMoniker_GetClassID(&This->IMoniker_iface, pCid);
@@ -1135,7 +1135,7 @@ static HRESULT WINAPI CompositeMonikerMarshalImpl_GetMarshalSizeMax(
HRESULT hr;
ULONG size;
- TRACE("(%s, %p, %x, %p, %x, %p)\n", debugstr_guid(riid), pv,
+ TRACE("%s, %p, %lx, %p, %lx, %p.\n", debugstr_guid(riid), pv,
dwDestContext, pvDestContext, mshlflags, pSize);
if (!moniker->comp_count)
@@ -1166,19 +1166,19 @@ static HRESULT WINAPI CompositeMonikerMarshalImpl_MarshalInterface(IMarshal *ifa
CompositeMonikerImpl *moniker = impl_from_IMarshal(iface);
HRESULT hr;
- TRACE("%p, %p, %s, %p, %x, %p, %#x\n", iface, stream, debugstr_guid(riid), pv, dwDestContext, pvDestContext, flags);
+ TRACE("%p, %p, %s, %p, %lx, %p, %#lx\n", iface, stream, debugstr_guid(riid), pv, dwDestContext, pvDestContext, flags);
if (!moniker->comp_count)
return E_UNEXPECTED;
if (FAILED(hr = CoMarshalInterface(stream, &IID_IMoniker, (IUnknown *)moniker->left, dwDestContext, pvDestContext, flags)))
{
- WARN("Failed to marshal left component, hr %#x.\n", hr);
+ WARN("Failed to marshal left component, hr %#lx.\n", hr);
return hr;
}
if (FAILED(hr = CoMarshalInterface(stream, &IID_IMoniker, (IUnknown *)moniker->right, dwDestContext, pvDestContext, flags)))
- WARN("Failed to marshal right component, hr %#x.\n", hr);
+ WARN("Failed to marshal right component, hr %#lx.\n", hr);
return hr;
}
@@ -1205,13 +1205,13 @@ static HRESULT WINAPI CompositeMonikerMarshalImpl_UnmarshalInterface(IMarshal *i
if (FAILED(hr = CoUnmarshalInterface(stream, &IID_IMoniker, (void **)&moniker->left)))
{
- WARN("Failed to unmarshal left moniker, hr %#x.\n", hr);
+ WARN("Failed to unmarshal left moniker, hr %#lx.\n", hr);
return hr;
}
if (FAILED(hr = CoUnmarshalInterface(stream, &IID_IMoniker, (void **)&moniker->right)))
{
- WARN("Failed to unmarshal right moniker, hr %#x.\n", hr);
+ WARN("Failed to unmarshal right moniker, hr %#lx.\n", hr);
return hr;
}
@@ -1229,7 +1229,7 @@ static HRESULT WINAPI CompositeMonikerMarshalImpl_ReleaseMarshalData(IMarshal *i
static HRESULT WINAPI CompositeMonikerMarshalImpl_DisconnectObject(IMarshal *iface,
DWORD dwReserved)
{
- TRACE("(0x%x)\n", dwReserved);
+ TRACE("%#lx\n", dwReserved);
/* can't disconnect a state-based marshal as nothing on server side to
* disconnect from */
return S_OK;
@@ -1286,7 +1286,7 @@ static ULONG WINAPI EnumMonikerImpl_Release(IEnumMoniker *iface)
ULONG refcount = InterlockedDecrement(&e->ref);
unsigned int i;
- TRACE("%p, refcount %d.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -1305,7 +1305,7 @@ static HRESULT WINAPI EnumMonikerImpl_Next(IEnumMoniker *iface, ULONG count,
EnumMonikerImpl *e = impl_from_IEnumMoniker(iface);
unsigned int i;
- TRACE("%p, %u, %p, %p.\n", iface, count, m, fetched);
+ TRACE("%p, %lu, %p, %p.\n", iface, count, m, fetched);
if (!m)
return E_INVALIDARG;
@@ -1329,7 +1329,7 @@ static HRESULT WINAPI EnumMonikerImpl_Skip(IEnumMoniker *iface, ULONG count)
{
EnumMonikerImpl *e = impl_from_IEnumMoniker(iface);
- TRACE("%p, %u.\n", iface, count);
+ TRACE("%p, %lu.\n", iface, count);
if (!count)
return S_OK;
diff --git a/dlls/ole32/datacache.c b/dlls/ole32/datacache.c
index a536f829515..e6cea25aca6 100644
--- a/dlls/ole32/datacache.c
+++ b/dlls/ole32/datacache.c
@@ -215,7 +215,7 @@ static inline DataCache *impl_from_IAdviseSink( IAdviseSink *iface )
const char *debugstr_formatetc(const FORMATETC *formatetc)
{
- return wine_dbg_sprintf("{ cfFormat = 0x%x, ptd = %p, dwAspect = %d, lindex = %d, tymed = %d }",
+ return wine_dbg_sprintf("{ cfFormat = 0x%x, ptd = %p, dwAspect = %ld, lindex = %ld, tymed = %ld }",
formatetc->cfFormat, formatetc->ptd, formatetc->dwAspect,
formatetc->lindex, formatetc->tymed);
}
@@ -353,7 +353,7 @@ static HRESULT check_valid_formatetc( const FORMATETC *fmt )
return CACHE_S_FORMATETC_NOTSUPPORTED;
else
{
- WARN("invalid clipformat/tymed combination: %d/%d\n", fmt->cfFormat, fmt->tymed);
+ WARN("invalid clipformat/tymed combination: %d/%ld\n", fmt->cfFormat, fmt->tymed);
return DV_E_TYMED;
}
}
@@ -427,7 +427,7 @@ static void DataCache_FireOnViewChange(
DWORD aspect,
LONG lindex)
{
- TRACE("(%p, %x, %d)\n", this, aspect, lindex);
+ TRACE("%p, %lx, %ld.\n", this, aspect, lindex);
/*
* The sink supplies a filter when it registers
@@ -2018,7 +2018,7 @@ static HRESULT WINAPI DataCache_Draw(
HRESULT hres;
DataCacheEntry *cache_entry;
- TRACE("(%p, %x, %d, %p, %p, %p, %p, %p, %p, %lx)\n",
+ TRACE("%p, %lx, %ld, %p, %p, %p, %p, %p, %p, %Ix.\n",
iface,
dwDrawAspect,
lindex,
@@ -2184,7 +2184,7 @@ static HRESULT WINAPI DataCache_SetAdvise(
{
DataCache *this = impl_from_IViewObject2(iface);
- TRACE("(%p, %x, %x, %p)\n", iface, aspects, advf, pAdvSink);
+ TRACE("%p, %lx, %lx, %p.\n", iface, aspects, advf, pAdvSink);
/*
* A call to this function removes the previous sink
@@ -2274,8 +2274,7 @@ static HRESULT WINAPI DataCache_GetExtent(
HRESULT hres = E_FAIL;
DataCacheEntry *cache_entry;
- TRACE("(%p, %x, %d, %p, %p)\n",
- iface, dwDrawAspect, lindex, ptd, lpsizel);
+ TRACE("%p, %lx, %ld, %p, %p.\n", iface, dwDrawAspect, lindex, ptd, lpsizel);
if (lpsizel==NULL)
return E_POINTER;
@@ -2284,7 +2283,7 @@ static HRESULT WINAPI DataCache_GetExtent(
lpsizel->cy = 0;
if (lindex!=-1)
- FIXME("Unimplemented flag lindex = %d\n", lindex);
+ FIXME("Unimplemented flag lindex = %ld\n", lindex);
/*
* Right now, we support only the callback from
@@ -2445,7 +2444,7 @@ static HRESULT WINAPI DataCache_Cache(
HRESULT hr;
FORMATETC fmt_cpy;
- TRACE("(%p, 0x%x, %p)\n", pformatetc, advf, pdwConnection);
+ TRACE("%p, %#lx, %p.\n", pformatetc, advf, pdwConnection);
if (!pformatetc || !pdwConnection)
return E_INVALIDARG;
@@ -2496,7 +2495,7 @@ static HRESULT WINAPI DataCache_Uncache(
DataCache *This = impl_from_IOleCache2(iface);
DataCacheEntry *cache_entry;
- TRACE("(%d)\n", dwConnection);
+ TRACE("%ld\n", dwConnection);
LIST_FOR_EACH_ENTRY(cache_entry, &This->cache_list, DataCacheEntry, entry)
if (cache_entry->id == dwConnection)
@@ -2505,7 +2504,7 @@ static HRESULT WINAPI DataCache_Uncache(
return S_OK;
}
- WARN("no connection found for %d\n", dwConnection);
+ WARN("no connection found for %ld\n", dwConnection);
return OLE_E_NOCONNECTION;
}
@@ -2626,7 +2625,7 @@ static HRESULT WINAPI DataCache_UpdateCache( IOleCache2 *iface, IDataObject *dat
int i, slots = 0;
BOOL done_one = FALSE;
- TRACE( "(%p %p %08x %p)\n", iface, data, mode, reserved );
+ TRACE("%p, %p, %#lx, %p.\n", iface, data, mode, reserved );
LIST_FOR_EACH_ENTRY( cache_entry, &This->cache_list, DataCacheEntry, entry )
{
@@ -2705,7 +2704,7 @@ static HRESULT WINAPI DataCache_DiscardCache(
DataCacheEntry *cache_entry;
HRESULT hr = S_OK;
- TRACE("(%d)\n", dwDiscardOptions);
+ TRACE("%ld\n", dwDiscardOptions);
if (dwDiscardOptions == DISCARDCACHE_SAVEIFDIRTY)
hr = DataCache_Save(&This->IPersistStorage_iface, This->presentationStorage, TRUE);
diff --git a/dlls/ole32/defaulthandler.c b/dlls/ole32/defaulthandler.c
index 81ffa1e6dbc..b69a054b572 100644
--- a/dlls/ole32/defaulthandler.c
+++ b/dlls/ole32/defaulthandler.c
@@ -519,7 +519,7 @@ static HRESULT WINAPI DefaultHandler_Close(
DefaultHandler *This = impl_from_IOleObject(iface);
HRESULT hr;
- TRACE("(%d)\n", dwSaveOption);
+ TRACE("%ld\n", dwSaveOption);
if (!object_is_running(This))
return S_OK;
@@ -548,7 +548,7 @@ static HRESULT WINAPI DefaultHandler_SetMoniker(
DefaultHandler *This = impl_from_IOleObject(iface);
HRESULT hr = S_OK;
- TRACE("(%p, %d, %p)\n", iface, dwWhichMoniker, pmk);
+ TRACE("%p, %ld, %p.\n", iface, dwWhichMoniker, pmk);
if (object_is_running(This))
{
@@ -576,8 +576,7 @@ static HRESULT WINAPI DefaultHandler_GetMoniker(
DefaultHandler *This = impl_from_IOleObject(iface);
HRESULT hr;
- TRACE("(%p, %d, %d, %p)\n",
- iface, dwAssign, dwWhichMoniker, ppmk);
+ TRACE("%p, %ld, %ld, %p.\n", iface, dwAssign, dwWhichMoniker, ppmk);
if (object_is_running(This))
{
@@ -617,8 +616,7 @@ static HRESULT WINAPI DefaultHandler_InitFromData(
DefaultHandler *This = impl_from_IOleObject(iface);
HRESULT hr = OLE_E_NOTRUNNING;
- TRACE("(%p, %p, %d, %d)\n",
- iface, pDataObject, fCreation, dwReserved);
+ TRACE("%p, %p, %d, %ld.\n", iface, pDataObject, fCreation, dwReserved);
if (object_is_running(This))
{
@@ -646,8 +644,7 @@ static HRESULT WINAPI DefaultHandler_GetClipboardData(
DefaultHandler *This = impl_from_IOleObject(iface);
HRESULT hr = OLE_E_NOTRUNNING;
- TRACE("(%p, %d, %p)\n",
- iface, dwReserved, ppDataObject);
+ TRACE("%p, %ld, %p.\n", iface, dwReserved, ppDataObject);
if (object_is_running(This))
{
@@ -673,7 +670,7 @@ static HRESULT WINAPI DefaultHandler_DoVerb(
IRunnableObject *pRunnableObj = &This->IRunnableObject_iface;
HRESULT hr;
- TRACE("(%d, %p, %p, %d, %p, %s)\n", iVerb, lpmsg, pActiveSite, lindex, hwndParent, wine_dbgstr_rect(lprcPosRect));
+ TRACE("%ld, %p, %p, %ld, %p, %s.\n", iVerb, lpmsg, pActiveSite, lindex, hwndParent, wine_dbgstr_rect(lprcPosRect));
hr = IRunnableObject_Run(pRunnableObj, NULL);
if (FAILED(hr)) return hr;
@@ -809,7 +806,7 @@ static HRESULT WINAPI DefaultHandler_GetUserType(
DefaultHandler *This = impl_from_IOleObject(iface);
HRESULT hr;
- TRACE("(%p, %d, %p)\n", iface, dwFormOfType, pszUserType);
+ TRACE("%p, %ld, %p.\n", iface, dwFormOfType, pszUserType);
if (object_is_running(This))
{
start_object_call( This );
@@ -836,8 +833,7 @@ static HRESULT WINAPI DefaultHandler_SetExtent(
DefaultHandler *This = impl_from_IOleObject(iface);
HRESULT hr = OLE_E_NOTRUNNING;
- TRACE("(%p, %x, (%d x %d))\n", iface,
- dwDrawAspect, psizel->cx, psizel->cy);
+ TRACE("%p, %lx, (%ld x %ld))\n", iface, dwDrawAspect, psizel->cx, psizel->cy);
if (object_is_running(This))
{
@@ -868,7 +864,7 @@ static HRESULT WINAPI DefaultHandler_GetExtent(
DefaultHandler *This = impl_from_IOleObject(iface);
- TRACE("(%p, %x, %p)\n", iface, dwDrawAspect, psizel);
+ TRACE("%p, %lx, %p.\n", iface, dwDrawAspect, psizel);
if (object_is_running(This))
{
@@ -947,7 +943,7 @@ static HRESULT WINAPI DefaultHandler_Unadvise(
{
DefaultHandler *This = impl_from_IOleObject(iface);
- TRACE("(%p, %d)\n", iface, dwConnection);
+ TRACE("%p, %ld.\n", iface, dwConnection);
/*
* If we don't have an advise holder yet, it means we don't have
@@ -1003,7 +999,7 @@ static HRESULT WINAPI DefaultHandler_GetMiscStatus(
HRESULT hres;
DefaultHandler *This = impl_from_IOleObject(iface);
- TRACE("(%p, %x, %p)\n", iface, dwAspect, pdwStatus);
+ TRACE("%p, %lx, %p.\n", iface, dwAspect, pdwStatus);
if (object_is_running(This))
{
@@ -1278,7 +1274,7 @@ static HRESULT WINAPI DefaultHandler_EnumFormatEtc(
{
DefaultHandler *This = impl_from_IDataObject(iface);
- TRACE("(%p, %x, %p)\n", iface, dwDirection, ppenumFormatEtc);
+ TRACE("%p, %lx, %p.\n", iface, dwDirection, ppenumFormatEtc);
return OleRegEnumFormatEtc(&This->clsid, dwDirection, ppenumFormatEtc);
}
@@ -1301,8 +1297,7 @@ static HRESULT WINAPI DefaultHandler_DAdvise(
HRESULT hres = S_OK;
DefaultHandler *This = impl_from_IDataObject(iface);
- TRACE("(%p, %p, %d, %p, %p)\n",
- iface, pformatetc, advf, pAdvSink, pdwConnection);
+ TRACE("%p, %p, %ld, %p, %p.\n", iface, pformatetc, advf, pAdvSink, pdwConnection);
/* Make sure we have a data advise holder before we start. */
if (!This->dataAdviseHolder)
@@ -1341,7 +1336,7 @@ static HRESULT WINAPI DefaultHandler_DUnadvise(
{
DefaultHandler *This = impl_from_IDataObject(iface);
- TRACE("(%p, %d)\n", iface, dwConnection);
+ TRACE("%p, %ld.\n", iface, dwConnection);
/*
* If we don't have a data advise holder yet, it means that
@@ -2154,7 +2149,7 @@ static DefaultHandler* DefaultHandler_Construct(
if (SUCCEEDED(hr))
This->object_state = object_state_running;
if (FAILED(hr))
- WARN("object creation failed with error %08x\n", hr);
+ WARN("object creation failed with error %#lx\n", hr);
}
else
{
@@ -2241,7 +2236,7 @@ HRESULT WINAPI OleCreateEmbeddingHelper(
DefaultHandler* newHandler = NULL;
HRESULT hr = S_OK;
- TRACE("(%s, %p, %08x, %p, %s, %p)\n", debugstr_guid(clsid), pUnkOuter, flags, pCF, debugstr_guid(riid), ppvObj);
+ TRACE("%s, %p, %#lx, %p, %s, %p.\n", debugstr_guid(clsid), pUnkOuter, flags, pCF, debugstr_guid(riid), ppvObj);
if (!ppvObj)
return E_POINTER;
diff --git a/dlls/ole32/filelockbytes.c b/dlls/ole32/filelockbytes.c
index e9699c01650..072314046a6 100644
--- a/dlls/ole32/filelockbytes.c
+++ b/dlls/ole32/filelockbytes.c
@@ -189,7 +189,7 @@ static HRESULT WINAPI FileLockBytesImpl_ReadAt(
LARGE_INTEGER offset;
ULONG cbRead;
- TRACE("(%p)-> %i %p %i %p\n",This, ulOffset.u.LowPart, pv, cb, pcbRead);
+ TRACE("%p, %ld, %p, %lu, %p.\n", iface, ulOffset.u.LowPart, pv, cb, pcbRead);
/* verify a sane environment */
if (!This) return E_FAIL;
@@ -244,7 +244,7 @@ static HRESULT WINAPI FileLockBytesImpl_WriteAt(
LARGE_INTEGER offset;
ULONG cbWritten;
- TRACE("(%p)-> %i %p %i %p\n",This, ulOffset.u.LowPart, pv, cb, pcbWritten);
+ TRACE("%p, %ld, %p, %lu, %p.\n", iface, ulOffset.u.LowPart, pv, cb, pcbWritten);
/* verify a sane environment */
if (!This) return E_FAIL;
@@ -297,7 +297,7 @@ static HRESULT WINAPI FileLockBytesImpl_SetSize(ILockBytes* iface, ULARGE_INTEGE
HRESULT hr = S_OK;
LARGE_INTEGER newpos;
- TRACE("new size %u\n", newSize.u.LowPart);
+ TRACE("new size %lu\n", newSize.u.LowPart);
newpos.QuadPart = newSize.QuadPart;
if (SetFilePointerEx(This->hfile, newpos, NULL, FILE_BEGIN))
@@ -316,7 +316,7 @@ static HRESULT get_lock_error(void)
case ERROR_ACCESS_DENIED: return STG_E_ACCESSDENIED; break;
case ERROR_NOT_SUPPORTED: return STG_E_INVALIDFUNCTION; break;
default:
- FIXME("no mapping for error %d\n", GetLastError());
+ FIXME("no mapping for error %ld\n", GetLastError());
return STG_E_INVALIDFUNCTION;
}
}
@@ -328,7 +328,7 @@ static HRESULT WINAPI FileLockBytesImpl_LockRegion(ILockBytes* iface,
OVERLAPPED ol;
DWORD lock_flags = LOCKFILE_FAIL_IMMEDIATELY;
- TRACE("ofs %u count %u flags %x\n", libOffset.u.LowPart, cb.u.LowPart, dwLockType);
+ TRACE("ofs %lu count %lu flags %lx\n", libOffset.u.LowPart, cb.u.LowPart, dwLockType);
if (dwLockType & LOCK_WRITE)
return STG_E_INVALIDFUNCTION;
@@ -351,7 +351,7 @@ static HRESULT WINAPI FileLockBytesImpl_UnlockRegion(ILockBytes* iface,
FileLockBytesImpl* This = impl_from_ILockBytes(iface);
OVERLAPPED ol;
- TRACE("ofs %u count %u flags %x\n", libOffset.u.LowPart, cb.u.LowPart, dwLockType);
+ TRACE("ofs %lu count %lu flags %lx\n", libOffset.u.LowPart, cb.u.LowPart, dwLockType);
if (dwLockType & LOCK_WRITE)
return STG_E_INVALIDFUNCTION;
diff --git a/dlls/ole32/filemoniker.c b/dlls/ole32/filemoniker.c
index 794b4507942..9b64d0e43e9 100644
--- a/dlls/ole32/filemoniker.c
+++ b/dlls/ole32/filemoniker.c
@@ -129,7 +129,7 @@ static ULONG WINAPI FileMonikerImpl_Release(IMoniker* iface)
FileMonikerImpl *moniker = impl_from_IMoniker(iface);
ULONG ref = InterlockedDecrement(&moniker->ref);
- TRACE("(%p, refcount %d)\n", iface, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
if (!ref)
{
@@ -611,7 +611,7 @@ FileMonikerImpl_BindToStorage(IMoniker* iface, IBindCtx* pbc, IMoniker* pmkToLef
static HRESULT WINAPI FileMonikerImpl_Reduce(IMoniker *iface, IBindCtx *pbc, DWORD howfar,
IMoniker **toleft, IMoniker **reduced)
{
- TRACE("%p, %p, %d, %p, %p.\n", iface, pbc, howfar, toleft, reduced);
+ TRACE("%p, %p, %ld, %p, %p.\n", iface, pbc, howfar, toleft, reduced);
if (!pbc || !reduced)
return E_INVALIDARG;
@@ -1233,7 +1233,7 @@ FileMonikerROTDataImpl_GetComparisonData(IROTData* iface, BYTE* pbData,
int i;
LPWSTR pszFileName;
- TRACE("(%p, %u, %p)\n", pbData, cbMax, pcbData);
+ TRACE("%p, %p, %lu, %p.\n", iface, pbData, cbMax, pcbData);
*pcbData = sizeof(CLSID) + len * sizeof(WCHAR);
if (cbMax < *pcbData)
diff --git a/dlls/ole32/git.c b/dlls/ole32/git.c
index fe6b5e58122..50848a2a020 100644
--- a/dlls/ole32/git.c
+++ b/dlls/ole32/git.c
@@ -95,7 +95,7 @@ static StdGITEntry* StdGlobalInterfaceTable_FindEntry(StdGlobalInterfaceTableImp
{
StdGITEntry* e;
- TRACE("This=%p, cookie=0x%x\n", This, cookie);
+ TRACE("%p, %#lx.\n", This, cookie);
LIST_FOR_EACH_ENTRY(e, &This->list, StdGITEntry, entry) {
if (e->cookie == cookie)
@@ -205,7 +205,7 @@ StdGlobalInterfaceTable_RegisterInterfaceInGlobal(
LeaveCriticalSection(&git_section);
- TRACE("Cookie is 0x%x\n", entry->cookie);
+ TRACE("Cookie is %#lx\n", entry->cookie);
return S_OK;
}
@@ -217,7 +217,7 @@ StdGlobalInterfaceTable_RevokeInterfaceFromGlobal(
StdGITEntry* entry;
HRESULT hr;
- TRACE("iface=%p, dwCookie=0x%x\n", iface, dwCookie);
+ TRACE("%p, %#lx.\n", iface, dwCookie);
EnterCriticalSection(&git_section);
@@ -236,7 +236,7 @@ StdGlobalInterfaceTable_RevokeInterfaceFromGlobal(
hr = CoReleaseMarshalData(entry->stream);
if (hr != S_OK)
{
- WARN("Failed to release marshal data, hr = 0x%08x\n", hr);
+ WARN("Failed to release marshal data, hr = %#lx\n", hr);
return hr;
}
IStream_Release(entry->stream);
@@ -255,13 +255,13 @@ StdGlobalInterfaceTable_GetInterfaceFromGlobal(
HRESULT hres;
IStream *stream;
- TRACE("dwCookie=0x%x, riid=%s, ppv=%p\n", dwCookie, debugstr_guid(riid), ppv);
+ TRACE("%#lx, %s, %p.\n", dwCookie, debugstr_guid(riid), ppv);
EnterCriticalSection(&git_section);
entry = StdGlobalInterfaceTable_FindEntry(This, dwCookie);
if (entry == NULL) {
- WARN("Entry for cookie 0x%x not found\n", dwCookie);
+ WARN("Entry for cookie %#lx not found\n", dwCookie);
LeaveCriticalSection(&git_section);
return E_INVALIDARG;
}
@@ -273,7 +273,7 @@ StdGlobalInterfaceTable_GetInterfaceFromGlobal(
LeaveCriticalSection(&git_section);
if (hres != S_OK) {
- WARN("Failed to clone stream with error 0x%08x\n", hres);
+ WARN("Failed to clone stream with error %#lx.\n", hres);
return hres;
}
diff --git a/dlls/ole32/itemmoniker.c b/dlls/ole32/itemmoniker.c
index 1ab9c52dbfb..112a8db4b16 100644
--- a/dlls/ole32/itemmoniker.c
+++ b/dlls/ole32/itemmoniker.c
@@ -198,7 +198,7 @@ static ULONG WINAPI ItemMonikerImpl_Release(IMoniker* iface)
ItemMonikerImpl *moniker = impl_from_IMoniker(iface);
ULONG refcount = InterlockedDecrement(&moniker->ref);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -286,7 +286,7 @@ static HRESULT item_moniker_load_string_record(IStream *stream, WCHAR **ret)
if (str_len % sizeof(WCHAR))
{
- WARN("Unexpected Unicode name length %d.\n", str_len);
+ WARN("Unexpected Unicode name length %ld.\n", str_len);
hr = E_FAIL;
goto end;
}
@@ -491,16 +491,10 @@ static HRESULT WINAPI ItemMonikerImpl_BindToStorage(IMoniker *iface, IBindCtx *p
return hr;
}
-/******************************************************************************
- * ItemMoniker_Reduce
- ******************************************************************************/
-static HRESULT WINAPI ItemMonikerImpl_Reduce(IMoniker* iface,
- IBindCtx* pbc,
- DWORD dwReduceHowFar,
- IMoniker** ppmkToLeft,
- IMoniker** ppmkReduced)
+static HRESULT WINAPI ItemMonikerImpl_Reduce(IMoniker* iface, IBindCtx* pbc,
+ DWORD dwReduceHowFar, IMoniker** ppmkToLeft, IMoniker** ppmkReduced)
{
- TRACE("(%p,%p,%d,%p,%p)\n",iface,pbc,dwReduceHowFar,ppmkToLeft,ppmkReduced);
+ TRACE("%p, %p, %ld, %p, %p.\n", iface, pbc, dwReduceHowFar, ppmkToLeft, ppmkReduced);
if (ppmkReduced==NULL)
return E_POINTER;
@@ -864,7 +858,7 @@ static HRESULT WINAPI ItemMonikerROTDataImpl_GetComparisonData(IROTData *iface,
int delim_len, i;
WCHAR *ptrW;
- TRACE("(%p, %p, %u, %p)\n", iface, buffer, max_len, data_len);
+ TRACE("%p, %p, %lu, %p.\n", iface, buffer, max_len, data_len);
delim_len = This->itemDelimiter && This->itemDelimiter[0] ? lstrlenW(This->itemDelimiter) : 0;
*data_len = sizeof(CLSID) + sizeof(WCHAR) + (delim_len + name_len) * sizeof(WCHAR);
diff --git a/dlls/ole32/memlockbytes.c b/dlls/ole32/memlockbytes.c
index 2d7d4572584..f974e4229eb 100644
--- a/dlls/ole32/memlockbytes.c
+++ b/dlls/ole32/memlockbytes.c
@@ -160,7 +160,7 @@ HRESULT WINAPI GetHGlobalFromILockBytes(ILockBytes* iface, HGLOBAL* phglobal)
/* It is not our lockbytes implementation, so use a more generic way */
hres = ILockBytes_Stat(iface,&stbuf,STATFLAG_NONAME);
if (hres != S_OK) {
- ERR("Cannot ILockBytes_Stat, %x\n",hres);
+ ERR("Cannot ILockBytes_Stat, %lx\n",hres);
return hres;
}
TRACE("cbSize is %s\n", wine_dbgstr_longlong(stbuf.cbSize.QuadPart));
@@ -171,11 +171,11 @@ HRESULT WINAPI GetHGlobalFromILockBytes(ILockBytes* iface, HGLOBAL* phglobal)
hres = ILockBytes_ReadAt(iface, start, GlobalLock(*phglobal), stbuf.cbSize.u.LowPart, &xread);
GlobalUnlock(*phglobal);
if (hres != S_OK) {
- FIXME("%p->ReadAt failed with %x\n",iface,hres);
+ FIXME("%p->ReadAt failed with %lx\n",iface,hres);
return hres;
}
if (stbuf.cbSize.u.LowPart != xread) {
- FIXME("Read size is not requested size %d vs %d?\n",stbuf.cbSize.u.LowPart, xread);
+ FIXME("Read size is not requested size %ld vs %ld?\n",stbuf.cbSize.u.LowPart, xread);
}
return S_OK;
}
diff --git a/dlls/ole32/moniker.c b/dlls/ole32/moniker.c
index ac47f5528c8..09266a33aba 100644
--- a/dlls/ole32/moniker.c
+++ b/dlls/ole32/moniker.c
@@ -159,7 +159,7 @@ static HRESULT get_moniker_comparison_data(IMoniker *pMoniker, MonikerComparison
IROTData_Release(pROTData);
if (hr != S_OK)
{
- ERR("Failed to copy comparison data into buffer, hr = 0x%08x\n", hr);
+ ERR("Failed to copy comparison data into buffer, hr = %#lx\n", hr);
HeapFree(GetProcessHeap(), 0, *moniker_data);
return hr;
}
@@ -218,7 +218,7 @@ static HRESULT reduce_moniker(IMoniker *pmk, IBindCtx *pbc, IMoniker **pmkReduce
}
hr = IMoniker_Reduce(pmk, pbc, MKRREDUCE_ALL, NULL, pmkReduced);
if (FAILED(hr))
- ERR("reducing moniker failed with error 0x%08x\n", hr);
+ ERR("reducing moniker failed with error %#lx.\n", hr);
if (pbcNew) IBindCtx_Release(pbcNew);
return hr;
}
@@ -288,11 +288,11 @@ RunningObjectTableImpl_Register(IRunningObjectTable* iface, DWORD flags,
IBindCtx *pbc;
InterfaceData *moniker = NULL;
- TRACE("%p, %#x, %p, %p, %p\n", This, flags, punkObject, pmkObjectName, pdwRegister);
+ TRACE("%p, %#lx, %p, %p, %p\n", iface, flags, punkObject, pmkObjectName, pdwRegister);
if (flags & ~(ROTFLAGS_REGISTRATIONKEEPSALIVE|ROTFLAGS_ALLOWANYCLIENT))
{
- ERR("Invalid flags: 0x%08x\n", flags & ~(ROTFLAGS_REGISTRATIONKEEPSALIVE|ROTFLAGS_ALLOWANYCLIENT));
+ ERR("Invalid flags: %#lx\n", flags & ~(ROTFLAGS_REGISTRATIONKEEPSALIVE|ROTFLAGS_ALLOWANYCLIENT));
return E_INVALIDARG;
}
@@ -435,7 +435,7 @@ RunningObjectTableImpl_Revoke( IRunningObjectTable* iface, DWORD dwRegister)
RunningObjectTableImpl *This = impl_from_IRunningObjectTable(iface);
struct rot_entry *rot_entry;
- TRACE("(%p,%d)\n",This,dwRegister);
+ TRACE("%p, %ld.\n", iface, dwRegister);
EnterCriticalSection(&This->lock);
LIST_FOR_EACH_ENTRY(rot_entry, &This->rot, struct rot_entry, entry)
@@ -568,7 +568,7 @@ RunningObjectTableImpl_GetObject( IRunningObjectTable* iface,
}
}
else
- WARN("Moniker unavailable, IrotGetObject returned 0x%08x\n", hr);
+ WARN("Moniker unavailable, IrotGetObject returned %#lx\n", hr);
HeapFree(GetProcessHeap(), 0, moniker_data);
@@ -590,7 +590,7 @@ RunningObjectTableImpl_NoteChangeTime(IRunningObjectTable* iface,
struct rot_entry *rot_entry;
HRESULT hr = E_INVALIDARG;
- TRACE("(%p,%d,%p)\n",This,dwRegister,pfiletime);
+ TRACE("%p, %ld, %p.\n", iface, dwRegister, pfiletime);
EnterCriticalSection(&This->lock);
LIST_FOR_EACH_ENTRY(rot_entry, &This->rot, struct rot_entry, entry)
@@ -608,7 +608,7 @@ RunningObjectTableImpl_NoteChangeTime(IRunningObjectTable* iface,
LeaveCriticalSection(&This->lock);
done:
- TRACE("-- 0x08%x\n", hr);
+ TRACE("-- %#lx\n", hr);
return hr;
}
@@ -661,7 +661,7 @@ RunningObjectTableImpl_GetTimeOfLastChange(IRunningObjectTable* iface,
HeapFree(GetProcessHeap(), 0, moniker_data);
- TRACE("-- 0x%08x\n", hr);
+ TRACE("-- %#lx\n", hr);
return hr;
}
@@ -717,7 +717,7 @@ static RunningObjectTableImpl rot =
*/
HRESULT WINAPI GetRunningObjectTable(DWORD reserved, IRunningObjectTable **ret)
{
- TRACE("%#x, %p\n", reserved, ret);
+ TRACE("%#lx, %p\n", reserved, ret);
if (reserved!=0)
return E_UNEXPECTED;
@@ -1048,7 +1048,7 @@ static HRESULT WINAPI EnumMonikerImpl_Next(IEnumMoniker* iface, ULONG celt, IM
EnumMonikerImpl *This = impl_from_IEnumMoniker(iface);
HRESULT hr = S_OK;
- TRACE("(%p) TabCurrentPos %d Tablastindx %d\n", This, This->pos, This->moniker_list->size);
+ TRACE("%p, %lu, %p, %p.\n", iface, celt, rgelt, pceltFetched);
/* retrieve the requested number of moniker from the current position */
for(i = 0; (This->pos < This->moniker_list->size) && (i < celt); i++)
@@ -1270,7 +1270,7 @@ static HRESULT WINAPI MonikerMarshal_GetUnmarshalClass(
{
MonikerMarshal *This = impl_from_IMarshal(iface);
- TRACE("(%s, %p, %x, %p, %x, %p)\n", debugstr_guid(riid), pv,
+ TRACE("%s, %p, %lx, %p, %lx, %p.\n", debugstr_guid(riid), pv,
dwDestContext, pvDestContext, mshlflags, pCid);
return IMoniker_GetClassID(This->moniker, pCid);
@@ -1284,7 +1284,7 @@ static HRESULT WINAPI MonikerMarshal_GetMarshalSizeMax(
HRESULT hr;
ULARGE_INTEGER size;
- TRACE("(%s, %p, %x, %p, %x, %p)\n", debugstr_guid(riid), pv,
+ TRACE("%s, %p, %lx, %p, %lx, %p.\n", debugstr_guid(riid), pv,
dwDestContext, pvDestContext, mshlflags, pSize);
hr = IMoniker_GetSizeMax(This->moniker, &size);
@@ -1299,7 +1299,7 @@ static HRESULT WINAPI MonikerMarshal_MarshalInterface(LPMARSHAL iface, IStream *
{
MonikerMarshal *This = impl_from_IMarshal(iface);
- TRACE("(%p, %s, %p, %x, %p, %x)\n", pStm, debugstr_guid(riid), pv,
+ TRACE("%p, %s, %p, %lx, %p, %lx.\n", pStm, debugstr_guid(riid), pv,
dwDestContext, pvDestContext, mshlflags);
return IMoniker_Save(This->moniker, pStm, FALSE);
diff --git a/dlls/ole32/ole2.c b/dlls/ole32/ole2.c
index a2781e51d5b..ee6a0b69b06 100644
--- a/dlls/ole32/ole2.c
+++ b/dlls/ole32/ole2.c
@@ -253,9 +253,10 @@ void WINAPI DECLSPEC_HOTPATCH OleUninitialize(void)
/******************************************************************************
* OleInitializeWOW [OLE32.@]
*/
-HRESULT WINAPI OleInitializeWOW(DWORD x, DWORD y) {
- FIXME("(0x%08x, 0x%08x),stub!\n",x, y);
- return 0;
+HRESULT WINAPI OleInitializeWOW(DWORD x, DWORD y)
+{
+ FIXME("%#lx, %#lx stub!\n", x, y);
+ return 0;
}
/*************************************************************
@@ -664,7 +665,7 @@ HRESULT WINAPI OleRegGetUserType(REFCLSID clsid, DWORD form, LPOLESTR *usertype)
HRESULT hres;
LONG ret;
- TRACE("(%s, %u, %p)\n", debugstr_guid(clsid), form, usertype);
+ TRACE("%s, %lu, %p.\n", debugstr_guid(clsid), form, usertype);
if (!usertype)
return E_INVALIDARG;
@@ -735,7 +736,7 @@ HRESULT WINAPI DoDragDrop (
HWND hwndTrackWindow;
MSG msg;
- TRACE("(%p, %p, %08x, %p)\n", pDataObject, pDropSource, dwOKEffect, pdwEffect);
+ TRACE("%p, %p, %#lx, %p.\n", pDataObject, pDropSource, dwOKEffect, pdwEffect);
if (!pDataObject || !pDropSource || !pdwEffect)
return E_INVALIDARG;
@@ -844,7 +845,7 @@ HRESULT WINAPI OleRegGetMiscStatus(
LONG result;
HRESULT hr;
- TRACE("(%s, %d, %p)\n", debugstr_guid(clsid), dwAspect, pdwStatus);
+ TRACE("%s, %ld, %p.\n", debugstr_guid(clsid), dwAspect, pdwStatus);
if (!pdwStatus) return E_INVALIDARG;
@@ -934,7 +935,7 @@ static HRESULT WINAPI EnumOLEVERB_Next(
EnumOLEVERB *This = impl_from_IEnumOLEVERB(iface);
HRESULT hr = S_OK;
- TRACE("(%d, %p, %p)\n", celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", iface, celt, rgelt, pceltFetched);
if (pceltFetched)
*pceltFetched = 0;
@@ -954,14 +955,14 @@ static HRESULT WINAPI EnumOLEVERB_Next(
}
else if (res != ERROR_SUCCESS)
{
- ERR("RegEnumKeyW failed with error %d\n", res);
+ ERR("RegEnumKeyW failed with error %ld\n", res);
hr = REGDB_E_READREGDB;
break;
}
res = RegQueryValueW(This->hkeyVerb, wszSubKey, NULL, &cbData);
if (res != ERROR_SUCCESS)
{
- ERR("RegQueryValueW failed with error %d\n", res);
+ ERR("RegQueryValueW failed with error %ld\n", res);
hr = REGDB_E_READREGDB;
break;
}
@@ -974,7 +975,7 @@ static HRESULT WINAPI EnumOLEVERB_Next(
res = RegQueryValueW(This->hkeyVerb, wszSubKey, pwszOLEVERB, &cbData);
if (res != ERROR_SUCCESS)
{
- ERR("RegQueryValueW failed with error %d\n", res);
+ ERR("RegQueryValueW failed with error %ld\n", res);
hr = REGDB_E_READREGDB;
CoTaskMemFree(pwszOLEVERB);
break;
@@ -1020,7 +1021,7 @@ static HRESULT WINAPI EnumOLEVERB_Skip(
{
EnumOLEVERB *This = impl_from_IEnumOLEVERB(iface);
- TRACE("(%d)\n", celt);
+ TRACE("%p, %lu.\n", iface, celt);
This->index += celt;
return S_OK;
@@ -1108,7 +1109,7 @@ HRESULT WINAPI OleRegEnumVerbs (REFCLSID clsid, LPENUMOLEVERB* ppenum)
else if (res == REGDB_E_KEYMISSING)
ERR("no Verbs key for class %s\n", debugstr_guid(clsid));
else
- ERR("failed to open Verbs key for CLSID %s with error %d\n",
+ ERR("failed to open Verbs key for CLSID %s with error %ld\n",
debugstr_guid(clsid), res);
return res;
}
@@ -1117,7 +1118,7 @@ HRESULT WINAPI OleRegEnumVerbs (REFCLSID clsid, LPENUMOLEVERB* ppenum)
NULL, NULL, NULL, NULL, NULL, NULL);
if (res != ERROR_SUCCESS)
{
- ERR("failed to get subkey count with error %d\n", GetLastError());
+ ERR("failed to get subkey count with error %ld\n", GetLastError());
return REGDB_E_READREGDB;
}
@@ -1602,7 +1603,7 @@ static LRESULT CALLBACK OLEMenu_CallWndProc(INT code, WPARAM wParam, LPARAM lPar
OleMenuHookItem *pHookItem = NULL;
WORD fuFlags;
- TRACE("%i, %04lx, %08lx\n", code, wParam, lParam );
+ TRACE("%i, %#Ix, %#Ix.\n", code, wParam, lParam );
/* Check if we're being asked to process the message */
if ( HC_ACTION != code )
@@ -1707,7 +1708,7 @@ static LRESULT CALLBACK OLEMenu_GetMsgProc(INT code, WPARAM wParam, LPARAM lPara
OleMenuHookItem *pHookItem = NULL;
WORD wCode;
- TRACE("%i, %04lx, %08lx\n", code, wParam, lParam );
+ TRACE("%i, %#Ix, %#Ix.\n", code, wParam, lParam );
/* Check if we're being asked to process a messages */
if ( HC_ACTION != code )
@@ -1943,7 +1944,7 @@ BOOL WINAPI IsAccelerator(HACCEL hAccel, int cAccelEntries, LPMSG lpMsg, WORD* l
}
TRACE_(accel)("hAccel=%p, cAccelEntries=%d,"
- "msg->hwnd=%p, msg->message=%04x, wParam=%08lx, lParam=%08lx\n",
+ "msg->hwnd=%p, msg->message=%04x, wParam=%#Ix, lParam=%#Ix\n",
hAccel, cAccelEntries,
lpMsg->hwnd, lpMsg->message, lpMsg->wParam, lpMsg->lParam);
for(i = 0; i < cAccelEntries; i++)
@@ -1964,7 +1965,7 @@ BOOL WINAPI IsAccelerator(HACCEL hAccel, int cAccelEntries, LPMSG lpMsg, WORD* l
if(lpAccelTbl[i].fVirt & FVIRTKEY)
{
INT mask = 0;
- TRACE_(accel)("found accel for virt_key %04lx (scan %04x)\n",
+ TRACE_(accel)("found accel for virt_key %Ix (scan %04x)\n",
lpMsg->wParam, HIWORD(lpMsg->lParam) & 0xff);
if(GetKeyState(VK_SHIFT) & 0x8000) mask |= FSHIFT;
if(GetKeyState(VK_CONTROL) & 0x8000) mask |= FCONTROL;
@@ -2463,7 +2464,7 @@ HRESULT WINAPI OleCreate(
IUnknown * pUnk = NULL;
IOleObject *pOleObject = NULL;
- TRACE("(%s, %s, %d, %p, %p, %p, %p)\n", debugstr_guid(rclsid),
+ TRACE("%s, %s, %ld, %p, %p, %p, %p.\n", debugstr_guid(rclsid),
debugstr_guid(riid), renderopt, pFormatEtc, pClientSite, pStg, ppvObj);
hres = CoCreateInstance(rclsid, 0, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, riid, (LPVOID*)&pUnk);
@@ -2488,7 +2489,7 @@ HRESULT WINAPI OleCreate(
{
TRACE("trying to set stg %p\n", pStg);
hres = IPersistStorage_InitNew(pPS, pStg);
- TRACE("-- result 0x%08x\n", hres);
+ TRACE("-- result %#lx\n", hres);
IPersistStorage_Release(pPS);
}
}
@@ -2497,7 +2498,7 @@ HRESULT WINAPI OleCreate(
{
TRACE("trying to set clientsite %p\n", pClientSite);
hres = IOleObject_SetClientSite(pOleObject, pClientSite);
- TRACE("-- result 0x%08x\n", hres);
+ TRACE("-- result %#lx\n", hres);
}
if (pOleObject)
@@ -2851,7 +2852,7 @@ HRESULT WINAPI OleCreateFromDataEx(IDataObject *data, REFIID iid, DWORD flags,
HRESULT hr;
UINT src_cf;
- FIXME("(%p, %s, %08x, %08x, %d, %p, %p, %p, %p, %p, %p, %p): stub\n",
+ FIXME("%p, %s, %#lx, %#lx, %ld, %p, %p, %p, %p, %p, %p, %p: stub\n",
data, debugstr_guid(iid), flags, renderopt, num_cache_fmts, adv_flags, cache_fmts,
sink, conns, client_site, stg, obj);
@@ -2884,7 +2885,7 @@ HRESULT WINAPI OleCreateFromData(IDataObject *data, REFIID iid, DWORD renderopt,
HRESULT WINAPI OleCreateLinkFromData(IDataObject *data, REFIID iid, DWORD renderopt, FORMATETC *fmt,
IOleClientSite *client_site, IStorage *stg, void **obj)
{
- FIXME("%p,%s,%08x,%p,%p,%p,%p: semi-stub\n",
+ FIXME("%p, %s, %#lx, %p, %p, %p, %p: semi-stub\n",
data, debugstr_guid(iid), renderopt, fmt, client_site, stg, obj);
return OleCreateFromData(data, iid, renderopt, fmt, client_site, stg, obj);
}
@@ -2904,8 +2905,7 @@ HRESULT WINAPI OleCreateStaticFromData(IDataObject *data, REFIID iid, DWORD rend
STGMEDIUM stgmedium;
LPOLESTR ole_typename;
- TRACE("(%p, %s, 0x%08x, %p, %p, %p, %p)\n",
- data, debugstr_guid(iid), renderopt, fmt, client_site, stg, obj);
+ TRACE("%p, %s, %#lx, %p, %p, %p, %p.\n", data, debugstr_guid(iid), renderopt, fmt, client_site, stg, obj);
if (!obj || !stg)
return E_INVALIDARG;
@@ -3007,11 +3007,11 @@ HRESULT WINAPI OleCreateFromFileEx(REFCLSID clsid, const OLECHAR *filename, REFI
IOleCache *cache = NULL;
ULONG i;
- TRACE("cls %s, %s, iid %s, flags %d, render opts %d, num fmts %d, adv flags %p, fmts %p\n", debugstr_guid(clsid),
+ TRACE("cls %s, %s, iid %s, flags %ld, render opts %ld, num fmts %ld, adv flags %p, fmts %p\n", debugstr_guid(clsid),
debugstr_w(filename), debugstr_guid(iid), flags, renderopt, num_fmts, adv_flags, fmts);
TRACE("sink %p, conns %p, client site %p, storage %p, obj %p\n", sink, conns, client_site, stg, obj);
for (i = 0; i < num_fmts; i++)
- TRACE("\t%d: fmt %s adv flags %d\n", i, debugstr_formatetc(fmts + i), adv_flags[i]);
+ TRACE("\t%ld: fmt %s adv flags %ld\n", i, debugstr_formatetc(fmts + i), adv_flags[i]);
hr = CreateFileMoniker( filename, &mon );
if (FAILED(hr)) return hr;
diff --git a/dlls/ole32/ole2stubs.c b/dlls/ole32/ole2stubs.c
index 7fad171facd..0d8198480b1 100644
--- a/dlls/ole32/ole2stubs.c
+++ b/dlls/ole32/ole2stubs.c
@@ -37,7 +37,7 @@ HRESULT WINAPI OleCreateLinkToFile(LPCOLESTR lpszFileName, REFIID riid,
DWORD renderopt, LPFORMATETC lpFormatEtc,
LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj)
{
- FIXME("(%p,%p,%i,%p,%p,%p,%p), stub!\n",lpszFileName, riid, renderopt, lpFormatEtc, pClientSite, pStg, ppvObj);
+ FIXME("%p, %p, %ld, %p, %p, %p, %p stub!\n",lpszFileName, riid, renderopt, lpFormatEtc, pClientSite, pStg, ppvObj);
return E_NOTIMPL;
}
@@ -77,7 +77,7 @@ HRESULT WINAPI DECLSPEC_HOTPATCH OleRegEnumFormatEtc (
DWORD dwDirection,
LPENUMFORMATETC* ppenumFormatetc)
{
- FIXME("(%p, %d, %p), stub!\n", clsid, dwDirection, ppenumFormatetc);
+ FIXME("%p, %ld, %p stub!\n", clsid, dwDirection, ppenumFormatetc);
return E_NOTIMPL;
}
diff --git a/dlls/ole32/oleobj.c b/dlls/ole32/oleobj.c
index 13a873655f5..464c4776b40 100644
--- a/dlls/ole32/oleobj.c
+++ b/dlls/ole32/oleobj.c
@@ -128,7 +128,7 @@ static HRESULT WINAPI EnumSTATDATA_Next(IEnumSTATDATA *iface, ULONG num, LPSTATD
DWORD count = 0;
HRESULT hr = S_OK;
- TRACE("(%d, %p, %p)\n", num, data, fetched);
+ TRACE("%p, %lu, %p, %p.\n", iface, num, data, fetched);
while(num--)
{
@@ -153,7 +153,7 @@ static HRESULT WINAPI EnumSTATDATA_Skip(IEnumSTATDATA *iface, ULONG num)
{
EnumSTATDATA *This = impl_from_IEnumSTATDATA(iface);
- TRACE("(%d)\n", num);
+ TRACE("%p, %lu.\n", iface, num);
if(This->index + num >= This->num_of_elems)
{
@@ -309,7 +309,7 @@ static ULONG WINAPI OleAdviseHolderImpl_AddRef(IOleAdviseHolder *iface)
OleAdviseHolderImpl *This = impl_from_IOleAdviseHolder(iface);
ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p)->(ref=%d)\n", This, ref - 1);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
@@ -320,9 +320,9 @@ static ULONG WINAPI OleAdviseHolderImpl_AddRef(IOleAdviseHolder *iface)
static ULONG WINAPI OleAdviseHolderImpl_Release(IOleAdviseHolder *iface)
{
OleAdviseHolderImpl *This = impl_from_IOleAdviseHolder(iface);
- ULONG ref;
- TRACE("(%p)->(ref=%d)\n", This, This->ref);
- ref = InterlockedDecrement(&This->ref);
+ ULONG ref = InterlockedDecrement(&This->ref);
+
+ TRACE("%p, refcount %lu.\n", iface, ref);
if (ref == 0) OleAdviseHolderImpl_Destructor(This);
@@ -382,7 +382,7 @@ static HRESULT WINAPI OleAdviseHolderImpl_Unadvise(IOleAdviseHolder *iface,
OleAdviseHolderImpl *This = impl_from_IOleAdviseHolder(iface);
DWORD index;
- TRACE("(%p)->(%u)\n", This, dwConnection);
+ TRACE("%p, %lu.\n", iface, dwConnection);
/* The connection number is 1 more than the index, see OleAdviseHolder_Advise */
index = dwConnection - 1;
@@ -609,8 +609,9 @@ static HRESULT WINAPI DataAdviseHolder_QueryInterface(IDataAdviseHolder *iface,
static ULONG WINAPI DataAdviseHolder_AddRef(IDataAdviseHolder *iface)
{
DataAdviseHolder *This = impl_from_IDataAdviseHolder(iface);
- TRACE("(%p) (ref=%d)\n", This, This->ref);
- return InterlockedIncrement(&This->ref);
+ ULONG ref = InterlockedIncrement(&This->ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
+ return ref;
}
/************************************************************************
@@ -619,10 +620,10 @@ static ULONG WINAPI DataAdviseHolder_AddRef(IDataAdviseHolder *iface)
static ULONG WINAPI DataAdviseHolder_Release(IDataAdviseHolder *iface)
{
DataAdviseHolder *This = impl_from_IDataAdviseHolder(iface);
- ULONG ref;
- TRACE("(%p) (ref=%d)\n", This, This->ref);
+ ULONG ref = InterlockedDecrement(&This->ref);
+
+ TRACE("%p, refcount %lu.\n", iface, ref);
- ref = InterlockedDecrement(&This->ref);
if (ref==0) DataAdviseHolder_Destructor(This);
return ref;
@@ -641,8 +642,7 @@ static HRESULT WINAPI DataAdviseHolder_Advise(IDataAdviseHolder *iface,
STATDATA new_conn;
DataAdviseHolder *This = impl_from_IDataAdviseHolder(iface);
- TRACE("(%p)->(%p, %p, %08x, %p, %p)\n", This, pDataObject, pFetc, advf,
- pAdvise, pdwConnection);
+ TRACE("%p, %p, %p, %#lx, %p, %p.\n", iface, pDataObject, pFetc, advf, pAdvise, pdwConnection);
if (pdwConnection==NULL)
return E_POINTER;
@@ -709,7 +709,8 @@ static HRESULT WINAPI DataAdviseHolder_Unadvise(IDataAdviseHolder *iface,
{
DataAdviseHolder *This = impl_from_IDataAdviseHolder(iface);
DWORD index;
- TRACE("(%p)->(%u)\n", This, dwConnection);
+
+ TRACE("%p, %lu.\n", iface, dwConnection);
/* The connection number is 1 more than the index, see DataAdviseHolder_Advise */
index = dwConnection - 1;
@@ -756,7 +757,7 @@ static HRESULT WINAPI DataAdviseHolder_SendOnDataChange(IDataAdviseHolder *iface
IEnumSTATDATA *pEnum;
HRESULT hr;
- TRACE("(%p)->(%p, %08x, %08x)\n", iface, data_obj, dwReserved, advf);
+ TRACE("%p, %p, %#lx, %#lx.\n", iface, data_obj, dwReserved, advf);
hr = IDataAdviseHolder_EnumAdvise(iface, &pEnum);
if (SUCCEEDED(hr))
diff --git a/dlls/ole32/pointermoniker.c b/dlls/ole32/pointermoniker.c
index c95c835e9e3..0beab94c649 100644
--- a/dlls/ole32/pointermoniker.c
+++ b/dlls/ole32/pointermoniker.c
@@ -95,7 +95,7 @@ static ULONG WINAPI PointerMonikerImpl_AddRef(IMoniker *iface)
PointerMonikerImpl *moniker = impl_from_IMoniker(iface);
ULONG refcount = InterlockedIncrement(&moniker->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -105,7 +105,7 @@ static ULONG WINAPI PointerMonikerImpl_Release(IMoniker *iface)
PointerMonikerImpl *moniker = impl_from_IMoniker(iface);
ULONG refcount = InterlockedDecrement(&moniker->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -230,7 +230,7 @@ static HRESULT WINAPI
PointerMonikerImpl_Reduce(IMoniker* iface, IBindCtx* pbc, DWORD dwReduceHowFar,
IMoniker** ppmkToLeft, IMoniker** ppmkReduced)
{
- TRACE("(%p,%p,%d,%p,%p)\n",iface,pbc,dwReduceHowFar,ppmkToLeft,ppmkReduced);
+ TRACE("%p, %p, %ld, %p, %p.\n", iface, pbc, dwReduceHowFar, ppmkToLeft, ppmkReduced);
if (ppmkReduced==NULL)
return E_POINTER;
@@ -509,7 +509,7 @@ static HRESULT WINAPI pointer_moniker_marshal_GetUnmarshalClass(IMarshal *iface,
{
PointerMonikerImpl *moniker = impl_from_IMarshal(iface);
- TRACE("%p, %s, %p, %x, %p, %x, %p.\n", iface, debugstr_guid(riid), pv, dwDestContext, pvDestContext,
+ TRACE("%p, %s, %p, %lx, %p, %lx, %p.\n", iface, debugstr_guid(riid), pv, dwDestContext, pvDestContext,
mshlflags, clsid);
return IMoniker_GetClassID(&moniker->IMoniker_iface, clsid);
@@ -520,7 +520,7 @@ static HRESULT WINAPI pointer_moniker_marshal_GetMarshalSizeMax(IMarshal *iface,
{
PointerMonikerImpl *moniker = impl_from_IMarshal(iface);
- TRACE("%p, %s, %p, %d, %p, %#x, %p.\n", iface, debugstr_guid(riid), pv, dwDestContext, pvDestContext,
+ TRACE("%p, %s, %p, %ld, %p, %#lx, %p.\n", iface, debugstr_guid(riid), pv, dwDestContext, pvDestContext,
mshlflags, size);
return CoGetMarshalSizeMax(size, &IID_IUnknown, moniker->pObject, dwDestContext, pvDestContext, mshlflags);
@@ -531,7 +531,7 @@ static HRESULT WINAPI pointer_moniker_marshal_MarshalInterface(IMarshal *iface,
{
PointerMonikerImpl *moniker = impl_from_IMarshal(iface);
- TRACE("%p, %s, %p, %x, %p, %x.\n", stream, debugstr_guid(riid), pv,
+ TRACE("%p, %s, %p, %lx, %p, %lx.\n", stream, debugstr_guid(riid), pv,
dwDestContext, pvDestContext, mshlflags);
return CoMarshalInterface(stream, &IID_IUnknown, moniker->pObject, dwDestContext,
@@ -550,7 +550,7 @@ static HRESULT WINAPI pointer_moniker_marshal_UnmarshalInterface(IMarshal *iface
hr = CoUnmarshalInterface(stream, &IID_IUnknown, (void **)&object);
if (FAILED(hr))
{
- ERR("Couldn't unmarshal moniker, hr = %#x.\n", hr);
+ ERR("Couldn't unmarshal moniker, hr = %#lx.\n", hr);
return hr;
}
@@ -570,7 +570,7 @@ static HRESULT WINAPI pointer_moniker_marshal_ReleaseMarshalData(IMarshal *iface
static HRESULT WINAPI pointer_moniker_marshal_DisconnectObject(IMarshal *iface, DWORD reserved)
{
- TRACE("%p, %#x.\n", iface, reserved);
+ TRACE("%p, %#lx.\n", iface, reserved);
return S_OK;
}
@@ -699,7 +699,7 @@ static ULONG WINAPI ObjrefMonikerImpl_AddRef(IMoniker *iface)
ObjrefMonikerImpl *moniker = objref_impl_from_IMoniker(iface);
ULONG refcount = InterlockedIncrement(&moniker->refcount);
- TRACE("%p, refcount %u\n", iface, refcount);
+ TRACE("%p, refcount %lu\n", iface, refcount);
return refcount;
}
@@ -709,7 +709,7 @@ static ULONG WINAPI ObjrefMonikerImpl_Release(IMoniker *iface)
ObjrefMonikerImpl *moniker = objref_impl_from_IMoniker(iface);
ULONG refcount = InterlockedDecrement(&moniker->refcount);
- TRACE("%p, refcount %u\n", iface, refcount);
+ TRACE("%p, refcount %lu\n", iface, refcount);
if (!refcount)
{
@@ -772,7 +772,7 @@ static HRESULT WINAPI ObjrefMonikerImpl_BindToStorage(IMoniker *iface, IBindCtx
static HRESULT WINAPI ObjrefMonikerImpl_Reduce(IMoniker *iface, IBindCtx *pbc, DWORD howfar,
IMoniker **left, IMoniker **reduced)
{
- FIXME("(%p,%p,%d,%p,%p): stub\n", iface, pbc, howfar, left, reduced);
+ FIXME("%p, %p, %ld, %p, %p: stub\n", iface, pbc, howfar, left, reduced);
return E_NOTIMPL;
}
@@ -930,7 +930,7 @@ static HRESULT WINAPI objref_moniker_marshal_GetUnmarshalClass(IMarshal *iface,
{
ObjrefMonikerImpl *moniker = objref_impl_from_IMarshal(iface);
- TRACE("(%p,%s,%p,%08x,%p,%x,%p)\n", iface, debugstr_guid(riid), pv, dwDestContext, pvDestContext,
+ TRACE("%p, %s, %p, %#lx, %p, %#lx, %p.\n", iface, debugstr_guid(riid), pv, dwDestContext, pvDestContext,
mshlflags, clsid);
return IMoniker_GetClassID(&moniker->IMoniker_iface, clsid);
@@ -941,7 +941,7 @@ static HRESULT WINAPI objref_moniker_marshal_GetMarshalSizeMax(IMarshal *iface,
{
ObjrefMonikerImpl *moniker = objref_impl_from_IMarshal(iface);
- TRACE("(%p,%s,%p,%08x,%p,%08x,%p)\n", iface, debugstr_guid(riid), pv, dwDestContext, pvDestContext,
+ TRACE("%p, %s, %p, %#lx, %p, %#lx, %p.\n", iface, debugstr_guid(riid), pv, dwDestContext, pvDestContext,
mshlflags, size);
return CoGetMarshalSizeMax(size, &IID_IUnknown, moniker->pObject, dwDestContext, pvDestContext, mshlflags);
@@ -952,7 +952,7 @@ static HRESULT WINAPI objref_moniker_marshal_MarshalInterface(IMarshal *iface, I
{
ObjrefMonikerImpl *moniker = objref_impl_from_IMarshal(iface);
- TRACE("(%p,%s,%p,%08x,%p,%08x)\n", stream, debugstr_guid(riid), pv, dwDestContext, pvDestContext, mshlflags);
+ TRACE("%p, %s, %p, %#lx, %p, %#lx\n", stream, debugstr_guid(riid), pv, dwDestContext, pvDestContext, mshlflags);
return CoMarshalInterface(stream, &IID_IUnknown, moniker->pObject, dwDestContext, pvDestContext, mshlflags);
}
@@ -969,7 +969,7 @@ static HRESULT WINAPI objref_moniker_marshal_UnmarshalInterface(IMarshal *iface,
hr = CoUnmarshalInterface(stream, &IID_IUnknown, (void **)&object);
if (FAILED(hr))
{
- ERR("Couldn't unmarshal moniker, hr = %#x.\n", hr);
+ ERR("Couldn't unmarshal moniker, hr = %#lx.\n", hr);
return hr;
}
@@ -988,7 +988,7 @@ static HRESULT WINAPI objref_moniker_marshal_ReleaseMarshalData(IMarshal *iface,
static HRESULT WINAPI objref_moniker_marshal_DisconnectObject(IMarshal *iface, DWORD reserved)
{
- TRACE("(%p,%08x)\n", iface, reserved);
+ TRACE("%p, %#lx.\n", iface, reserved);
return S_OK;
}
diff --git a/dlls/ole32/stg_prop.c b/dlls/ole32/stg_prop.c
index cd30dad8c99..28793d7cbd5 100644
--- a/dlls/ole32/stg_prop.c
+++ b/dlls/ole32/stg_prop.c
@@ -211,7 +211,7 @@ static ULONG WINAPI enum_stat_prop_stg_AddRef(IEnumSTATPROPSTG *iface)
struct enum_stat_prop_stg *penum = impl_from_IEnumSTATPROPSTG(iface);
LONG refcount = InterlockedIncrement(&penum->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -221,7 +221,7 @@ static ULONG WINAPI enum_stat_prop_stg_Release(IEnumSTATPROPSTG *iface)
struct enum_stat_prop_stg *penum = impl_from_IEnumSTATPROPSTG(iface);
LONG refcount = InterlockedDecrement(&penum->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -239,7 +239,7 @@ static HRESULT WINAPI enum_stat_prop_stg_Next(IEnumSTATPROPSTG *iface, ULONG cel
ULONG count = 0;
WCHAR *name;
- TRACE("%p, %u, %p, %p.\n", iface, celt, ret, fetched);
+ TRACE("%p, %lu, %p, %p.\n", iface, celt, ret, fetched);
if (penum->current == ~0u)
penum->current = 0;
@@ -267,7 +267,7 @@ static HRESULT WINAPI enum_stat_prop_stg_Next(IEnumSTATPROPSTG *iface, ULONG cel
static HRESULT WINAPI enum_stat_prop_stg_Skip(IEnumSTATPROPSTG *iface, ULONG celt)
{
- FIXME("%p, %u.\n", iface, celt);
+ FIXME("%p, %lu.\n", iface, celt);
return S_OK;
}
@@ -486,7 +486,7 @@ static HRESULT WINAPI IPropertyStorage_fnReadMultiple(
HRESULT hr = S_OK;
ULONG i;
- TRACE("(%p, %d, %p, %p)\n", iface, cpspec, rgpspec, rgpropvar);
+ TRACE("%p, %lu, %p, %p\n", iface, cpspec, rgpspec, rgpropvar);
if (!cpspec)
return S_FALSE;
@@ -613,7 +613,7 @@ static HRESULT PropertyStorage_StringCopy(LPCSTR src, UINT srcCP, LPSTR *dst, UI
HeapFree(GetProcessHeap(), 0, wideStr_tmp);
}
}
- TRACE("returning 0x%08x (%s)\n", hr,
+ TRACE("returning %#lx (%s)\n", hr,
dstCP == CP_UNICODE ? debugstr_w((LPCWSTR)*dst) : debugstr_a(*dst));
return hr;
}
@@ -671,7 +671,7 @@ static HRESULT PropertyStorage_StorePropWithId(PropertyStorage_impl *This,
case VT_VECTOR|VT_I1:
This->format = 1;
}
- TRACE("Setting 0x%08x to type %d\n", propid, propvar->vt);
+ TRACE("Setting %#lx to type %d\n", propid, propvar->vt);
if (prop)
{
PropVariantClear(prop);
@@ -727,7 +727,7 @@ static HRESULT PropertyStorage_StoreNameWithId(PropertyStorage_impl *This,
if (strlen(name) >= MAX_VERSION_0_PROP_NAME_LENGTH)
This->format = 1;
}
- TRACE("Adding prop name %s, propid %d\n",
+ TRACE("Adding prop name %s, propid %ld\n",
This->codePage == CP_UNICODE ? debugstr_w((LPCWSTR)name) :
debugstr_a(name), id);
dictionary_insert(This->name_to_propid, name, UlongToPtr(id));
@@ -750,7 +750,7 @@ static HRESULT WINAPI IPropertyStorage_fnWriteMultiple(
HRESULT hr = S_OK;
ULONG i;
- TRACE("(%p, %d, %p, %p)\n", iface, cpspec, rgpspec, rgpropvar);
+ TRACE("%p, %lu, %p, %p.\n", iface, cpspec, rgpspec, rgpropvar);
if (cpspec && (!rgpspec || !rgpropvar))
return E_INVALIDARG;
@@ -849,7 +849,7 @@ static HRESULT WINAPI IPropertyStorage_fnDeleteMultiple(
ULONG i;
HRESULT hr;
- TRACE("(%p, %d, %p)\n", iface, cpspec, rgpspec);
+ TRACE("%p, %ld, %p.\n", iface, cpspec, rgpspec);
if (cpspec && !rgpspec)
return E_INVALIDARG;
@@ -895,7 +895,7 @@ static HRESULT WINAPI IPropertyStorage_fnReadPropertyNames(
ULONG i;
HRESULT hr = S_FALSE;
- TRACE("(%p, %d, %p, %p)\n", iface, cpropid, rgpropid, rglpwstrName);
+ TRACE("%p, %ld, %p, %p.\n", iface, cpropid, rgpropid, rglpwstrName);
if (cpropid && (!rgpropid || !rglpwstrName))
return E_INVALIDARG;
@@ -935,7 +935,7 @@ static HRESULT WINAPI IPropertyStorage_fnWritePropertyNames(
ULONG i;
HRESULT hr;
- TRACE("(%p, %d, %p, %p)\n", iface, cpropid, rgpropid, rglpwstrName);
+ TRACE("%p, %lu, %p, %p.\n", iface, cpropid, rgpropid, rglpwstrName);
if (cpropid && (!rgpropid || !rglpwstrName))
return E_INVALIDARG;
@@ -968,7 +968,7 @@ static HRESULT WINAPI IPropertyStorage_fnDeletePropertyNames(
ULONG i;
HRESULT hr;
- TRACE("(%p, %d, %p)\n", iface, cpropid, rgpropid);
+ TRACE("%p, %ld, %p.\n", iface, cpropid, rgpropid);
if (cpropid && !rgpropid)
return E_INVALIDARG;
@@ -1003,7 +1003,7 @@ static HRESULT WINAPI IPropertyStorage_fnCommit(
PropertyStorage_impl *This = impl_from_IPropertyStorage(iface);
HRESULT hr;
- TRACE("(%p, 0x%08x)\n", iface, grfCommitFlags);
+ TRACE("%p, %#lx.\n", iface, grfCommitFlags);
if (!(This->grfMode & STGM_READWRITE))
return STG_E_ACCESSDENIED;
@@ -1149,7 +1149,7 @@ static void PropertyStorage_PropNameDestroy(void *k, void *d, void *extra)
static int PropertyStorage_PropCompare(const void *a, const void *b,
void *extra)
{
- TRACE("(%u, %u)\n", PtrToUlong(a), PtrToUlong(b));
+ TRACE("%lu, %lu.\n", PtrToUlong(a), PtrToUlong(b));
return PtrToUlong(a) - PtrToUlong(b);
}
@@ -1279,12 +1279,12 @@ static HRESULT propertystorage_read_scalar(PROPVARIANT *prop, const struct read_
case VT_INT:
case VT_I4:
hr = buffer_read_dword(buffer, offset, (DWORD *)&prop->lVal);
- TRACE("Read long %d\n", prop->lVal);
+ TRACE("Read long %ld\n", prop->lVal);
break;
case VT_UINT:
case VT_UI4:
hr = buffer_read_dword(buffer, offset, &prop->ulVal);
- TRACE("Read ulong %d\n", prop->ulVal);
+ TRACE("Read ulong %ld\n", prop->ulVal);
break;
case VT_I8:
hr = buffer_read_uint64(buffer, offset, (ULARGE_INTEGER *)&prop->hVal);
@@ -1398,7 +1398,7 @@ static HRESULT propertystorage_read_scalar(PROPVARIANT *prop, const struct read_
if (prop->blob.pBlobData)
{
hr = buffer_read_len(buffer, offset, prop->blob.pBlobData, count);
- TRACE("Read blob value of size %d\n", count);
+ TRACE("Read blob value of size %ld\n", count);
}
else
hr = STG_E_INSUFFICIENTMEMORY;
@@ -1583,7 +1583,7 @@ static HRESULT PropertyStorage_ReadHeaderFromStream(IStream *stm,
{
if (count != sizeof(buf))
{
- WARN("read only %d\n", count);
+ WARN("read only %ld\n", count);
hr = STG_E_INVALIDHEADER;
}
else
@@ -1600,7 +1600,7 @@ static HRESULT PropertyStorage_ReadHeaderFromStream(IStream *stm,
&hdr->reserved);
}
}
- TRACE("returning 0x%08x\n", hr);
+ TRACE("returning %#lx\n", hr);
return hr;
}
@@ -1618,7 +1618,7 @@ static HRESULT PropertyStorage_ReadFmtIdOffsetFromStream(IStream *stm,
{
if (count != sizeof(buf))
{
- WARN("read only %d\n", count);
+ WARN("read only %ld\n", count);
hr = STG_E_INVALIDHEADER;
}
else
@@ -1629,7 +1629,7 @@ static HRESULT PropertyStorage_ReadFmtIdOffsetFromStream(IStream *stm,
&fmt->dwOffset);
}
}
- TRACE("returning 0x%08x\n", hr);
+ TRACE("returning %#lx\n", hr);
return hr;
}
@@ -1647,7 +1647,7 @@ static HRESULT PropertyStorage_ReadSectionHeaderFromStream(IStream *stm,
{
if (count != sizeof(buf))
{
- WARN("read only %d\n", count);
+ WARN("read only %ld\n", count);
hr = STG_E_INVALIDHEADER;
}
else
@@ -1658,7 +1658,7 @@ static HRESULT PropertyStorage_ReadSectionHeaderFromStream(IStream *stm,
cProperties), &hdr->cProperties);
}
}
- TRACE("returning 0x%08x\n", hr);
+ TRACE("returning %#lx\n", hr);
return hr;
}
@@ -1677,7 +1677,7 @@ static HRESULT PropertyStorage_ReadDictionary(PropertyStorage_impl *This, const
if (FAILED(hr = buffer_read_dword(buffer, offset, &numEntries)))
return hr;
- TRACE("Reading %d entries:\n", numEntries);
+ TRACE("Reading %ld entries:\n", numEntries);
offset += sizeof(DWORD);
@@ -1697,7 +1697,7 @@ static HRESULT PropertyStorage_ReadDictionary(PropertyStorage_impl *This, const
if (FAILED(hr = buffer_test_offset(buffer, offset, This->codePage == CP_UNICODE ?
ALIGNED_LENGTH(cbEntry * sizeof(WCHAR), 3) : cbEntry)))
{
- WARN("Broken name length for entry %d.\n", i);
+ WARN("Broken name length for entry %ld.\n", i);
return hr;
}
@@ -1709,11 +1709,11 @@ static HRESULT PropertyStorage_ReadDictionary(PropertyStorage_impl *This, const
if (ch)
{
- WARN("Dictionary entry name %d is not null-terminated.\n", i);
+ WARN("Dictionary entry name %ld is not null-terminated.\n", i);
return E_FAIL;
}
- TRACE("Reading entry with ID %#x, %d chars, name %s.\n", propid, cbEntry, This->codePage == CP_UNICODE ?
+ TRACE("Reading entry with ID %#lx, %ld chars, name %s.\n", propid, cbEntry, This->codePage == CP_UNICODE ?
debugstr_wn((WCHAR *)buffer->data, cbEntry) : debugstr_an((char *)buffer->data, cbEntry));
hr = PropertyStorage_StoreNameWithId(This, (char *)buffer->data + offset, This->codePage, propid);
@@ -1796,8 +1796,7 @@ static HRESULT PropertyStorage_ReadFromStream(PropertyStorage_impl *This)
goto end;
if (fmtOffset.dwOffset > stat.cbSize.u.LowPart)
{
- WARN("invalid offset %d (stream length is %d)\n", fmtOffset.dwOffset,
- stat.cbSize.u.LowPart);
+ WARN("invalid offset %ld (stream length is %ld)\n", fmtOffset.dwOffset, stat.cbSize.u.LowPart);
hr = STG_E_INVALIDHEADER;
goto end;
}
@@ -1814,7 +1813,7 @@ static HRESULT PropertyStorage_ReadFromStream(PropertyStorage_impl *This)
/* The section size includes the section header, so check it */
if (sectionHdr.cbSection < sizeof(PROPERTYSECTIONHEADER))
{
- WARN("section header too small, got %d\n", sectionHdr.cbSection);
+ WARN("section header too small, got %ld\n", sectionHdr.cbSection);
hr = STG_E_INVALIDHEADER;
goto end;
}
@@ -1831,7 +1830,7 @@ static HRESULT PropertyStorage_ReadFromStream(PropertyStorage_impl *This)
hr = IStream_Read(This->stm, read_buffer.data, read_buffer.size, &count);
if (FAILED(hr))
goto end;
- TRACE("Reading %d properties:\n", sectionHdr.cProperties);
+ TRACE("Reading %ld properties:\n", sectionHdr.cProperties);
for (i = 0; SUCCEEDED(hr) && i < sectionHdr.cProperties; i++)
{
PROPERTYIDOFFSET *idOffset = (PROPERTYIDOFFSET *)(read_buffer.data +
@@ -1853,7 +1852,7 @@ static HRESULT PropertyStorage_ReadFromStream(PropertyStorage_impl *This)
* later.
*/
dictOffset = idOffset->dwOffset;
- TRACE("Dictionary offset is %d\n", dictOffset);
+ TRACE("Dictionary offset is %ld\n", dictOffset);
}
else
{
@@ -1864,8 +1863,7 @@ static HRESULT PropertyStorage_ReadFromStream(PropertyStorage_impl *This)
idOffset->dwOffset - sizeof(PROPERTYSECTIONHEADER), This->codePage,
Allocate_CoTaskMemAlloc, NULL)))
{
- TRACE("Read property with ID 0x%08x, type %d\n",
- idOffset->propid, prop.vt);
+ TRACE("Read property with ID %#lx, type %d\n", idOffset->propid, prop.vt);
switch(idOffset->propid)
{
case PID_CODEPAGE:
@@ -1901,7 +1899,7 @@ static HRESULT PropertyStorage_ReadFromStream(PropertyStorage_impl *This)
}
if (!This->locale)
This->locale = LOCALE_SYSTEM_DEFAULT;
- TRACE("Code page is %d, locale is %d\n", This->codePage, This->locale);
+ TRACE("Code page is %d, locale is %ld\n", This->codePage, This->locale);
if (dictOffset)
hr = PropertyStorage_ReadDictionary(This, &read_buffer, dictOffset - sizeof(PROPERTYSECTIONHEADER));
@@ -2088,7 +2086,7 @@ static HRESULT PropertyStorage_WriteDictionaryToStream(
if (closure.bytesWritten % sizeof(DWORD))
{
DWORD padding = sizeof(DWORD) - closure.bytesWritten % sizeof(DWORD);
- TRACE("adding %d bytes of padding\n", padding);
+ TRACE("adding %ld bytes of padding\n", padding);
*sectionOffset += padding;
}
@@ -2109,7 +2107,7 @@ static HRESULT PropertyStorage_WritePropertyToStream(PropertyStorage_impl *This,
assert(var);
assert(sectionOffset);
- TRACE("%p, %d, 0x%08x, (%d), (%d)\n", This, propNum, propid, var->vt,
+ TRACE("%p, %ld, %#lx, %d, %ld.\n", This, propNum, propid, var->vt,
*sectionOffset);
seek.QuadPart = SECTIONHEADER_OFFSET + sizeof(PROPERTYSECTIONHEADER) +
@@ -2288,7 +2286,7 @@ static HRESULT PropertyStorage_WritePropertyToStream(PropertyStorage_impl *This,
if (bytesWritten % sizeof(DWORD))
{
DWORD padding = sizeof(DWORD) - bytesWritten % sizeof(DWORD);
- TRACE("adding %d bytes of padding\n", padding);
+ TRACE("adding %ld bytes of padding\n", padding);
*sectionOffset += padding;
}
}
@@ -2578,7 +2576,7 @@ static HRESULT PropertyStorage_ConstructEmpty(IStream *stm,
else
ps->codePage = CP_UNICODE;
ps->locale = LOCALE_SYSTEM_DEFAULT;
- TRACE("Code page is %d, locale is %d\n", ps->codePage, ps->locale);
+ TRACE("Code page is %d, locale is %ld\n", ps->codePage, ps->locale);
*pps = &ps->IPropertyStorage_iface;
TRACE("PropertyStorage %p constructed\n", ps);
hr = S_OK;
@@ -2626,7 +2624,7 @@ static ULONG WINAPI enum_stat_propset_stg_AddRef(IEnumSTATPROPSETSTG *iface)
struct enum_stat_propset_stg *psenum = impl_from_IEnumSTATPROPSETSTG(iface);
LONG refcount = InterlockedIncrement(&psenum->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount;
}
@@ -2636,7 +2634,7 @@ static ULONG WINAPI enum_stat_propset_stg_Release(IEnumSTATPROPSETSTG *iface)
struct enum_stat_propset_stg *psenum = impl_from_IEnumSTATPROPSETSTG(iface);
LONG refcount = InterlockedDecrement(&psenum->refcount);
- TRACE("%p, refcount %u.\n", iface, refcount);
+ TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount)
{
@@ -2653,7 +2651,7 @@ static HRESULT WINAPI enum_stat_propset_stg_Next(IEnumSTATPROPSETSTG *iface, ULO
struct enum_stat_propset_stg *psenum = impl_from_IEnumSTATPROPSETSTG(iface);
ULONG count = 0;
- TRACE("%p, %u, %p, %p.\n", iface, celt, ret, fetched);
+ TRACE("%p, %lu, %p, %p.\n", iface, celt, ret, fetched);
if (psenum->current == ~0u)
psenum->current = 0;
@@ -2669,7 +2667,7 @@ static HRESULT WINAPI enum_stat_propset_stg_Next(IEnumSTATPROPSETSTG *iface, ULO
static HRESULT WINAPI enum_stat_propset_stg_Skip(IEnumSTATPROPSETSTG *iface, ULONG celt)
{
- FIXME("%p, %u.\n", iface, celt);
+ FIXME("%p, %lu.\n", iface, celt);
return S_OK;
}
@@ -2840,7 +2838,7 @@ static HRESULT WINAPI IPropertySetStorage_fnCreate(
IStream *stm = NULL;
HRESULT r;
- TRACE("%p %s %08x %08x %p\n", This, debugstr_guid(rfmtid), grfFlags,
+ TRACE("%p, %s %#lx, %#lx, %p.\n", This, debugstr_guid(rfmtid), grfFlags,
grfMode, ppprstg);
/* be picky */
@@ -2879,7 +2877,7 @@ static HRESULT WINAPI IPropertySetStorage_fnCreate(
IStream_Release( stm );
end:
- TRACE("returning 0x%08x\n", r);
+ TRACE("returning %#lx\n", r);
return r;
}
@@ -2897,7 +2895,7 @@ static HRESULT WINAPI IPropertySetStorage_fnOpen(
WCHAR name[CCH_MAX_PROPSTG_NAME + 1];
HRESULT r;
- TRACE("%p %s %08x %p\n", This, debugstr_guid(rfmtid), grfMode, ppprstg);
+ TRACE("%p, %s, %#lx, %p.\n", This, debugstr_guid(rfmtid), grfMode, ppprstg);
/* be picky */
if (grfMode != (STGM_READWRITE|STGM_SHARE_EXCLUSIVE) &&
@@ -2926,7 +2924,7 @@ static HRESULT WINAPI IPropertySetStorage_fnOpen(
IStream_Release( stm );
end:
- TRACE("returning 0x%08x\n", r);
+ TRACE("returning %#lx\n", r);
return r;
}
@@ -3205,7 +3203,7 @@ SERIALIZEDPROPERTYVALUE* WINAPI StgConvertVariantToProperty(const PROPVARIANT *p
USHORT CodePage, SERIALIZEDPROPERTYVALUE *pprop, ULONG *pcb, PROPID pid,
BOOLEAN fReserved, ULONG *pcIndirect)
{
- FIXME("%p,%d,%p,%p,%d,%d,%p\n", pvar, CodePage, pprop, pcb, pid, fReserved, pcIndirect);
+ FIXME("%p, %d, %p, %p, %ld, %d, %p.\n", pvar, CodePage, pprop, pcb, pid, fReserved, pcIndirect);
return NULL;
}
@@ -3217,7 +3215,7 @@ HRESULT WINAPI StgCreatePropStg(IUnknown *unk, REFFMTID fmt, const CLSID *clsid,
IStream *stm;
HRESULT r;
- TRACE("%p %s %s %08x %d %p\n", unk, debugstr_guid(fmt), debugstr_guid(clsid), flags, reserved, prop_stg);
+ TRACE("%p, %s, %s, %#lx, %ld, %p.\n", unk, debugstr_guid(fmt), debugstr_guid(clsid), flags, reserved, prop_stg);
if (!fmt || reserved)
{
@@ -3251,7 +3249,7 @@ HRESULT WINAPI StgCreatePropStg(IUnknown *unk, REFFMTID fmt, const CLSID *clsid,
}
end:
- TRACE("returning 0x%08x\n", r);
+ TRACE("returning %#lx\n", r);
return r;
}
@@ -3262,7 +3260,7 @@ HRESULT WINAPI StgOpenPropStg(IUnknown *unk, REFFMTID fmt, DWORD flags,
IStream *stm;
HRESULT r;
- TRACE("%p %s %08x %d %p\n", unk, debugstr_guid(fmt), flags, reserved, prop_stg);
+ TRACE("%p, %s, %#lx, %ld, %p.\n", unk, debugstr_guid(fmt), flags, reserved, prop_stg);
if (!fmt || reserved)
{
@@ -3296,6 +3294,6 @@ HRESULT WINAPI StgOpenPropStg(IUnknown *unk, REFFMTID fmt, DWORD flags,
}
end:
- TRACE("returning 0x%08x\n", r);
+ TRACE("returning %#lx\n", r);
return r;
}
diff --git a/dlls/ole32/stg_stream.c b/dlls/ole32/stg_stream.c
index 1a5f061250e..73fc1cc9480 100644
--- a/dlls/ole32/stg_stream.c
+++ b/dlls/ole32/stg_stream.c
@@ -136,8 +136,7 @@ static HRESULT WINAPI StgStreamImpl_Read(
ULONG bytesReadBuffer;
HRESULT res;
- TRACE("(%p, %p, %d, %p)\n",
- iface, pv, cb, pcbRead);
+ TRACE("%p, %p, %lu, %p.\n", iface, pv, cb, pcbRead);
if (!This->parentStorage)
{
@@ -167,7 +166,7 @@ static HRESULT WINAPI StgStreamImpl_Read(
This->currentPosition.QuadPart += *pcbRead;
}
- TRACE("<-- %08x\n", res);
+ TRACE("<-- %#lx\n", res);
return res;
}
@@ -192,8 +191,7 @@ static HRESULT WINAPI StgStreamImpl_Write(
ULONG bytesWritten = 0;
HRESULT res;
- TRACE("(%p, %p, %d, %p)\n",
- iface, pv, cb, pcbWritten);
+ TRACE("%p, %p, %lu, %p.\n", iface, pv, cb, pcbWritten);
/*
* Do we have permission to write to this stream?
@@ -204,7 +202,7 @@ static HRESULT WINAPI StgStreamImpl_Write(
case STGM_READWRITE:
break;
default:
- WARN("access denied by flags: 0x%x\n", STGM_ACCESS_MODE(This->grfMode));
+ WARN("access denied by flags: %#lx\n", STGM_ACCESS_MODE(This->grfMode));
return STG_E_ACCESSDENIED;
}
@@ -250,7 +248,7 @@ static HRESULT WINAPI StgStreamImpl_Write(
if (SUCCEEDED(res))
res = StorageBaseImpl_Flush(This->parentStorage);
- TRACE("<-- %08x, written %u\n", res, *pcbWritten);
+ TRACE("<-- %#lx, written %lu\n", res, *pcbWritten);
return res;
}
@@ -274,8 +272,7 @@ static HRESULT WINAPI StgStreamImpl_Seek(
DirEntry currentEntry;
HRESULT hr;
- TRACE("(%p, %d, %d, %p)\n",
- iface, dlibMove.u.LowPart, dwOrigin, plibNewPosition);
+ TRACE("%p, %ld, %ld, %p.\n", iface, dlibMove.u.LowPart, dwOrigin, plibNewPosition);
/*
* fail if the stream has no parent (as does windows)
@@ -316,7 +313,7 @@ static HRESULT WINAPI StgStreamImpl_Seek(
*plibNewPosition = currentEntry.size;
break;
default:
- WARN("invalid dwOrigin %d\n", dwOrigin);
+ WARN("invalid dwOrigin %ld\n", dwOrigin);
return STG_E_INVALIDFUNCTION;
}
@@ -345,7 +342,7 @@ static HRESULT WINAPI StgStreamImpl_SetSize(
HRESULT hr;
- TRACE("(%p, %d)\n", iface, libNewSize.u.LowPart);
+ TRACE("%p, %ld.\n", iface, libNewSize.u.LowPart);
if(!This->parentStorage)
{
@@ -358,7 +355,7 @@ static HRESULT WINAPI StgStreamImpl_SetSize(
*/
if (libNewSize.u.HighPart != 0)
{
- WARN("invalid value for libNewSize.u.HighPart %d\n", libNewSize.u.HighPart);
+ WARN("invalid value for libNewSize.u.HighPart %ld\n", libNewSize.u.HighPart);
return STG_E_INVALIDFUNCTION;
}
@@ -400,8 +397,7 @@ static HRESULT WINAPI StgStreamImpl_CopyTo(
ULARGE_INTEGER totalBytesRead;
ULARGE_INTEGER totalBytesWritten;
- TRACE("(%p, %p, %d, %p, %p)\n",
- iface, pstm, cb.u.LowPart, pcbRead, pcbWritten);
+ TRACE("%p, %p, %ld, %p, %p.\n", iface, pstm, cb.u.LowPart, pcbRead, pcbWritten);
/*
* Sanity check
@@ -547,7 +543,7 @@ static HRESULT WINAPI StgStreamImpl_Stat(
DirEntry currentEntry;
HRESULT hr;
- TRACE("%p %p %d\n", This, pstatstg, grfStatFlag);
+ TRACE("%p, %p, %#lx.\n", This, pstatstg, grfStatFlag);
/*
* if stream has no parent, return STG_E_REVERTED
diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c
index 1c1baa5ce08..fa7158bad1b 100644
--- a/dlls/ole32/storage32.c
+++ b/dlls/ole32/storage32.c
@@ -292,7 +292,7 @@ static HRESULT validateSTGM(DWORD stgm)
if (stgm&~STGM_KNOWN_FLAGS)
{
- ERR("unknown flags %08x\n", stgm);
+ ERR("unknown flags %#lx\n", stgm);
return E_FAIL;
}
@@ -463,7 +463,7 @@ static ULONG WINAPI directwriterlock_Release(IDirectWriterLock *iface)
static HRESULT WINAPI directwriterlock_WaitForWriteAccess(IDirectWriterLock *iface, DWORD timeout)
{
StorageBaseImpl *This = impl_from_IDirectWriterLock(iface);
- FIXME("(%p)->(%d): stub\n", This, timeout);
+ FIXME("%p, %ld: stub\n", This, timeout);
return E_NOTIMPL;
}
@@ -995,7 +995,7 @@ static HRESULT IEnumSTATSTGImpl_GetNextRef(
memcpy(This->name, result_name, sizeof(result_name));
}
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -1013,7 +1013,7 @@ static HRESULT WINAPI IEnumSTATSTGImpl_Next(
DirRef currentSearchNode;
HRESULT hr=S_OK;
- TRACE("%p,%u,%p,%p\n", iface, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", iface, celt, rgelt, pceltFetched);
if ( (rgelt==0) || ( (celt!=1) && (pceltFetched==0) ) )
return E_INVALIDARG;
@@ -1073,7 +1073,7 @@ static HRESULT WINAPI IEnumSTATSTGImpl_Next(
if (SUCCEEDED(hr) && *pceltFetched != celt)
hr = S_FALSE;
- TRACE("<-- %08x (asked %u, got %u)\n", hr, celt, *pceltFetched);
+ TRACE("<-- %#lx (asked %lu, got %lu)\n", hr, celt, *pceltFetched);
return hr;
}
@@ -1088,7 +1088,7 @@ static HRESULT WINAPI IEnumSTATSTGImpl_Skip(
DirRef currentSearchNode;
HRESULT hr=S_OK;
- TRACE("%p,%u\n", iface, celt);
+ TRACE("%p, %lu.\n", iface, celt);
if (This->parentStorage->reverted)
{
@@ -1109,7 +1109,7 @@ static HRESULT WINAPI IEnumSTATSTGImpl_Skip(
if (SUCCEEDED(hr) && objectFetched != celt)
return S_FALSE;
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -1282,7 +1282,7 @@ static ULONG WINAPI StorageBaseImpl_AddRef(
StorageBaseImpl *This = impl_from_IStorage(iface);
ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p) AddRef to %d\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
@@ -1302,7 +1302,7 @@ static ULONG WINAPI StorageBaseImpl_Release(
ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p) ReleaseRef to %d\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
if (ref == 0)
{
@@ -1447,7 +1447,7 @@ static HRESULT StorageBaseImpl_CopyChildEntryTo(StorageBaseImpl *This,
hr = StorageBaseImpl_CopyChildEntryTo( This, data.rightChild, skip_storage,
skip_stream, snbExclude, pstgDest );
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -1455,7 +1455,7 @@ static BOOL StorageBaseImpl_IsStreamOpen(StorageBaseImpl * stg, DirRef streamEnt
{
StgStreamImpl *strm;
- TRACE("%p,%d\n", stg, streamEntry);
+ TRACE("%p, %ld.\n", stg, streamEntry);
LIST_FOR_EACH_ENTRY(strm, &stg->strmHead, StgStreamImpl, StrmListEntry)
{
@@ -1472,7 +1472,7 @@ static BOOL StorageBaseImpl_IsStorageOpen(StorageBaseImpl * stg, DirRef storageE
{
StorageInternalImpl *childstg;
- TRACE("%p,%d\n", stg, storageEntry);
+ TRACE("%p, %ld.\n", stg, storageEntry);
LIST_FOR_EACH_ENTRY(childstg, &stg->storageHead, StorageInternalImpl, ParentListEntry)
{
@@ -1506,8 +1506,7 @@ static HRESULT WINAPI StorageBaseImpl_OpenStream(
DirRef streamEntryRef;
HRESULT res = STG_E_UNKNOWN;
- TRACE("(%p, %s, %p, %x, %d, %p)\n",
- iface, debugstr_w(pwcsName), reserved1, grfMode, reserved2, ppstm);
+ TRACE("%p, %s, %p, %#lx, %ld, %p.\n", iface, debugstr_w(pwcsName), reserved1, grfMode, reserved2, ppstm);
if ( (pwcsName==NULL) || (ppstm==0) )
{
@@ -1595,7 +1594,7 @@ static HRESULT WINAPI StorageBaseImpl_OpenStream(
end:
if (res == S_OK)
TRACE("<-- IStream %p\n", *ppstm);
- TRACE("<-- %08x\n", res);
+ TRACE("<-- %#lx\n", res);
return res;
}
@@ -1622,9 +1621,8 @@ static HRESULT WINAPI StorageBaseImpl_OpenStorage(
DirRef storageEntryRef;
HRESULT res = STG_E_UNKNOWN;
- TRACE("(%p, %s, %p, %x, %p, %d, %p)\n",
- iface, debugstr_w(pwcsName), pstgPriority,
- grfMode, snbExclude, reserved, ppstg);
+ TRACE("%p, %s, %p, %#lx, %p, %ld, %p.\n", iface, debugstr_w(pwcsName), pstgPriority,
+ grfMode, snbExclude, reserved, ppstg);
if ((pwcsName==NULL) || (ppstg==0) )
{
@@ -1732,7 +1730,7 @@ static HRESULT WINAPI StorageBaseImpl_OpenStorage(
res = STG_E_FILENOTFOUND;
end:
- TRACE("<-- %08x\n", res);
+ TRACE("<-- %#lx\n", res);
return res;
}
@@ -1754,8 +1752,7 @@ static HRESULT WINAPI StorageBaseImpl_EnumElements(
StorageBaseImpl *This = impl_from_IStorage(iface);
IEnumSTATSTGImpl* newEnum;
- TRACE("(%p, %d, %p, %d, %p)\n",
- iface, reserved1, reserved2, reserved3, ppenum);
+ TRACE("%p, %ld, %p, %ld, %p.\n", iface, reserved1, reserved2, reserved3, ppenum);
if (!ppenum)
return E_INVALIDARG;
@@ -1792,8 +1789,7 @@ static HRESULT WINAPI StorageBaseImpl_Stat(
DirEntry currentEntry;
HRESULT res = STG_E_UNKNOWN;
- TRACE("(%p, %p, %x)\n",
- iface, pstatstg, grfStatFlag);
+ TRACE("%p, %p, %#lx.\n", iface, pstatstg, grfStatFlag);
if (!pstatstg)
{
@@ -1827,9 +1823,9 @@ static HRESULT WINAPI StorageBaseImpl_Stat(
end:
if (res == S_OK)
{
- TRACE("<-- STATSTG: pwcsName: %s, type: %d, cbSize.Low/High: %d/%d, grfMode: %08x, grfLocksSupported: %d, grfStateBits: %08x\n", debugstr_w(pstatstg->pwcsName), pstatstg->type, pstatstg->cbSize.u.LowPart, pstatstg->cbSize.u.HighPart, pstatstg->grfMode, pstatstg->grfLocksSupported, pstatstg->grfStateBits);
+ TRACE("<-- STATSTG: pwcsName: %s, type: %ld, cbSize.Low/High: %ld/%ld, grfMode: %#lx, grfLocksSupported: %ld, grfStateBits: %#lx\n", debugstr_w(pstatstg->pwcsName), pstatstg->type, pstatstg->cbSize.u.LowPart, pstatstg->cbSize.u.HighPart, pstatstg->grfMode, pstatstg->grfLocksSupported, pstatstg->grfStateBits);
}
- TRACE("<-- %08x\n", res);
+ TRACE("<-- %#lx\n", res);
return res;
}
@@ -1935,9 +1931,7 @@ static HRESULT WINAPI StorageBaseImpl_CreateStream(
DirRef currentEntryRef, newStreamEntryRef;
HRESULT hr;
- TRACE("(%p, %s, %x, %d, %d, %p)\n",
- iface, debugstr_w(pwcsName), grfMode,
- reserved1, reserved2, ppstm);
+ TRACE("%p, %s, %#lx, %ld, %ld, %p.\n", iface, debugstr_w(pwcsName), grfMode, reserved1, reserved2, ppstm);
if (ppstm == 0)
return STG_E_INVALIDPOINTER;
@@ -2130,9 +2124,8 @@ static HRESULT WINAPI StorageBaseImpl_CreateStorage(
DirRef newEntryRef;
HRESULT hr;
- TRACE("(%p, %s, %x, %d, %d, %p)\n",
- iface, debugstr_w(pwcsName), grfMode,
- reserved1, reserved2, ppstg);
+ TRACE("%p, %s, %#lx, %ld, %ld, %p.\n", iface, debugstr_w(pwcsName), grfMode,
+ reserved1, reserved2, ppstg);
if (ppstg == 0)
return STG_E_INVALIDPOINTER;
@@ -2150,7 +2143,7 @@ static HRESULT WINAPI StorageBaseImpl_CreateStorage(
if ( FAILED( validateSTGM(grfMode) ) ||
(grfMode & STGM_DELETEONRELEASE) )
{
- WARN("bad grfMode: 0x%x\n", grfMode);
+ WARN("bad grfMode: %#lx\n", grfMode);
return STG_E_INVALIDFLAG;
}
@@ -2278,7 +2271,7 @@ static HRESULT StorageBaseImpl_CopyStorageEntryTo(StorageBaseImpl *This,
hr = StorageBaseImpl_CopyChildEntryTo( This, data.dirRootEntry, skip_storage,
skip_stream, snbExclude, pstgDest );
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -2297,9 +2290,7 @@ static HRESULT WINAPI StorageBaseImpl_CopyTo(
BOOL skip_storage = FALSE, skip_stream = FALSE;
DWORD i;
- TRACE("(%p, %d, %p, %p, %p)\n",
- iface, ciidExclude, rgiidExclude,
- snbExclude, pstgDest);
+ TRACE("%p, %ld, %p, %p, %p.\n", iface, ciidExclude, rgiidExclude, snbExclude, pstgDest);
if ( pstgDest == 0 )
return STG_E_INVALIDPOINTER;
@@ -2381,9 +2372,8 @@ static HRESULT WINAPI StorageBaseImpl_MoveElementTo(
const OLECHAR *pwcsNewName,/* [string][in] */
DWORD grfFlags) /* [in] */
{
- FIXME("(%p %s %p %s %u): stub\n", iface,
- debugstr_w(pwcsName), pstgDest,
- debugstr_w(pwcsNewName), grfFlags);
+ FIXME("%p, %s, %p, %s, %#lx: stub\n", iface, debugstr_w(pwcsName), pstgDest,
+ debugstr_w(pwcsNewName), grfFlags);
return E_NOTIMPL;
}
@@ -2400,7 +2390,7 @@ static HRESULT WINAPI StorageBaseImpl_Commit(
DWORD grfCommitFlags)/* [in] */
{
StorageBaseImpl* This = impl_from_IStorage(iface);
- TRACE("(%p %d)\n", iface, grfCommitFlags);
+ TRACE("%p, %#lx.\n", iface, grfCommitFlags);
return StorageBaseImpl_Flush(This);
}
@@ -2435,7 +2425,7 @@ static HRESULT deleteStorageContents(
HRESULT destroyHr = S_OK;
StorageInternalImpl *stg, *stg2;
- TRACE("%p,%d\n", parentStorage, indexToDelete);
+ TRACE("%p, %ld.\n", parentStorage, indexToDelete);
/* Invalidate any open storage objects. */
LIST_FOR_EACH_ENTRY_SAFE(stg, stg2, &parentStorage->storageHead, StorageInternalImpl, ParentListEntry)
@@ -2460,7 +2450,7 @@ static HRESULT deleteStorageContents(
if (hr != S_OK)
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -2471,7 +2461,7 @@ static HRESULT deleteStorageContents(
if (FAILED(hr))
{
IStorage_Release(childStorage);
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -2499,7 +2489,7 @@ static HRESULT deleteStorageContents(
IStorage_Release(childStorage);
IEnumSTATSTG_Release(elements);
- TRACE("%08x\n", hr);
+ TRACE("%#lx\n", hr);
return destroyHr;
}
@@ -2539,7 +2529,7 @@ static HRESULT deleteStreamContents(
if (hr!=S_OK)
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return(hr);
}
@@ -2550,7 +2540,7 @@ static HRESULT deleteStreamContents(
if(hr != S_OK)
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -2558,7 +2548,7 @@ static HRESULT deleteStreamContents(
* Release the stream object.
*/
IStream_Release(pis);
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return S_OK;
}
@@ -2625,7 +2615,7 @@ static HRESULT WINAPI StorageBaseImpl_DestroyElement(
if (hr!=S_OK)
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -2646,7 +2636,7 @@ static HRESULT WINAPI StorageBaseImpl_DestroyElement(
if (SUCCEEDED(hr))
hr = StorageBaseImpl_Flush(This);
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -2995,7 +2985,7 @@ static HRESULT StorageImpl_LoadFileHeader(
This->smallBlockSize != DEF_SMALL_BLOCK_SIZE ||
This->smallBlockLimit != LIMIT_TO_USE_SMALL_BLOCK)
{
- FIXME("Broken OLE storage file? bigblock=0x%x, smallblock=0x%x, sblimit=0x%x\n",
+ FIXME("Broken OLE storage file? bigblock=%#lx, smallblock=%#lx, sblimit=%#lx\n",
This->bigBlockSize, This->smallBlockSize, This->smallBlockLimit);
hr = STG_E_INVALIDHEADER;
}
@@ -3676,7 +3666,7 @@ static BlockChainStream* Storage32Impl_SmallBlocksToBigBlocks(
if (FAILED(resRead) || FAILED(resWrite))
{
- ERR("conversion failed: resRead = 0x%08x, resWrite = 0x%08x\n", resRead, resWrite);
+ ERR("conversion failed: resRead = %#lx, resWrite = %#lx\n", resRead, resWrite);
BlockChainStream_SetSize(bbTempChain, size);
BlockChainStream_Destroy(bbTempChain);
return NULL;
@@ -3781,7 +3771,7 @@ static SmallBlockChainStream* Storage32Impl_BigBlocksToSmallBlocks(
if(FAILED(resRead) || FAILED(resWrite))
{
- ERR("conversion failed: resRead = 0x%08x, resWrite = 0x%08x\n", resRead, resWrite);
+ ERR("conversion failed: resRead = %#lx, resWrite = %#lx\n", resRead, resWrite);
SmallBlockChainStream_SetSize(sbTempChain, size);
SmallBlockChainStream_Destroy(sbTempChain);
return NULL;
@@ -4010,8 +4000,7 @@ static HRESULT StorageImpl_GetNextBlockInChain(
if(depotBlockCount >= This->bigBlockDepotCount)
{
- WARN("depotBlockCount %d, bigBlockDepotCount %d\n", depotBlockCount,
- This->bigBlockDepotCount);
+ WARN("depotBlockCount %ld, bigBlockDepotCount %ld\n", depotBlockCount, This->bigBlockDepotCount);
return STG_E_READFAULT;
}
@@ -5476,7 +5465,7 @@ static HRESULT WINAPI StorageInternalImpl_Commit(
DWORD grfCommitFlags) /* [in] */
{
StorageBaseImpl* This = impl_from_IStorage(iface);
- TRACE("(%p,%x)\n", iface, grfCommitFlags);
+ TRACE("%p, %#lx.\n", iface, grfCommitFlags);
return StorageBaseImpl_Flush(This);
}
@@ -5942,7 +5931,7 @@ static HRESULT WINAPI TransactedSnapshotImpl_Commit(
zero.QuadPart = 0;
- TRACE("(%p,%x)\n", iface, grfCommitFlags);
+ TRACE("%p, %#lx.\n", iface, grfCommitFlags);
/* Cannot commit a read-only transacted storage */
if ( STGM_ACCESS_MODE( This->base.openFlags ) == STGM_READ )
@@ -6059,7 +6048,7 @@ end:
StorageBaseImpl_UnlockTransaction(This->transactedParent, TRUE);
}
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -6152,7 +6141,7 @@ static HRESULT TransactedSnapshotImpl_CreateDirEntry(StorageBaseImpl *base,
*index = new_ref;
- TRACE("%s l=%x r=%x d=%x <-- %x\n", debugstr_w(newData->name), newData->leftChild, newData->rightChild, newData->dirRootEntry, *index);
+ TRACE("%s l=%lx r=%lx d=%lx <-- %lx\n", debugstr_w(newData->name), newData->leftChild, newData->rightChild, newData->dirRootEntry, *index);
return S_OK;
}
@@ -6163,12 +6152,12 @@ static HRESULT TransactedSnapshotImpl_WriteDirEntry(StorageBaseImpl *base,
TransactedSnapshotImpl* This = (TransactedSnapshotImpl*) base;
HRESULT hr;
- TRACE("%x %s l=%x r=%x d=%x\n", index, debugstr_w(data->name), data->leftChild, data->rightChild, data->dirRootEntry);
+ TRACE("%lx %s l=%lx r=%lx d=%lx\n", index, debugstr_w(data->name), data->leftChild, data->rightChild, data->dirRootEntry);
hr = TransactedSnapshotImpl_EnsureReadEntry(This, index);
if (FAILED(hr))
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -6205,13 +6194,13 @@ static HRESULT TransactedSnapshotImpl_ReadDirEntry(StorageBaseImpl *base,
hr = TransactedSnapshotImpl_EnsureReadEntry(This, index);
if (FAILED(hr))
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
memcpy(data, &This->entries[index].data, sizeof(DirEntry));
- TRACE("%x %s l=%x r=%x d=%x\n", index, debugstr_w(data->name), data->leftChild, data->rightChild, data->dirRootEntry);
+ TRACE("%lx %s l=%lx r=%lx d=%lx\n", index, debugstr_w(data->name), data->leftChild, data->rightChild, data->dirRootEntry);
return S_OK;
}
@@ -6271,14 +6260,14 @@ static HRESULT TransactedSnapshotImpl_StreamWriteAt(StorageBaseImpl *base,
hr = TransactedSnapshotImpl_EnsureReadEntry(This, index);
if (FAILED(hr))
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
hr = TransactedSnapshotImpl_MakeStreamDirty(This, index);
if (FAILED(hr))
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -6290,7 +6279,7 @@ static HRESULT TransactedSnapshotImpl_StreamWriteAt(StorageBaseImpl *base,
This->entries[index].data.size.QuadPart,
offset.QuadPart + size);
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -6303,7 +6292,7 @@ static HRESULT TransactedSnapshotImpl_StreamSetSize(StorageBaseImpl *base,
hr = TransactedSnapshotImpl_EnsureReadEntry(This, index);
if (FAILED(hr))
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -6346,7 +6335,7 @@ static HRESULT TransactedSnapshotImpl_StreamSetSize(StorageBaseImpl *base,
if (SUCCEEDED(hr))
This->entries[index].data.size = newsize;
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -6360,14 +6349,14 @@ static HRESULT TransactedSnapshotImpl_StreamLink(StorageBaseImpl *base,
hr = TransactedSnapshotImpl_EnsureReadEntry(This, src);
if (FAILED(hr))
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
hr = TransactedSnapshotImpl_EnsureReadEntry(This, dst);
if (FAILED(hr))
{
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -6656,7 +6645,7 @@ static HRESULT WINAPI TransactedSharedImpl_Commit(
HRESULT hr;
ULONG transactionSig;
- TRACE("(%p,%x)\n", iface, grfCommitFlags);
+ TRACE("%p, %#lx\n", iface, grfCommitFlags);
/* Cannot commit a read-only transacted storage */
if ( STGM_ACCESS_MODE( This->base.openFlags ) == STGM_READ )
@@ -6724,7 +6713,7 @@ static HRESULT WINAPI TransactedSharedImpl_Commit(
This->lastTransactionSig = transactionSig+1;
}
}
- TRACE("<-- %08x\n", hr);
+ TRACE("<-- %#lx\n", hr);
return hr;
}
@@ -6862,7 +6851,7 @@ static HRESULT Storage_ConstructTransacted(StorageBaseImpl *parentStorage,
if (parentStorage->openFlags & fixme_flags)
{
fixme_flags &= ~parentStorage->openFlags;
- FIXME("Unimplemented flags %x\n", parentStorage->openFlags);
+ FIXME("Unimplemented flags %lx\n", parentStorage->openFlags);
}
if (toplevel && !(parentStorage->openFlags & STGM_NOSNAPSHOT) &&
@@ -7590,7 +7579,7 @@ HRESULT BlockChainStream_ReadAt(BlockChainStream* This,
HRESULT hr;
BlockChainBlock *cachedBlock;
- TRACE("(%p)-> %i %p %i %p\n",This, offset.u.LowPart, buffer, size, bytesRead);
+ TRACE("%p, %li, %p, %lu, %p.\n",This, offset.u.LowPart, buffer, size, bytesRead);
/*
* Find the first block in the stream that contains part of the buffer.
@@ -8581,7 +8570,7 @@ static HRESULT create_storagefile(
IStorage_Release(&newStorage->IStorage_iface);
end:
- TRACE("<-- %p r = %08x\n", *ppstgOpen, hr);
+ TRACE("<-- %p r = %#lx\n", *ppstgOpen, hr);
return hr;
}
@@ -8613,9 +8602,7 @@ HRESULT WINAPI StgCreateDocfile(
{
STGOPTIONS stgoptions = {1, 0, 512};
- TRACE("(%s, %x, %d, %p)\n",
- debugstr_w(pwcsName), grfMode,
- reserved, ppstgOpen);
+ TRACE("%s, %#lx, %ld, %p.\n", debugstr_w(pwcsName), grfMode, reserved, ppstgOpen);
if (ppstgOpen == 0)
return STG_E_INVALIDPOINTER;
@@ -8630,7 +8617,7 @@ HRESULT WINAPI StgCreateDocfile(
*/
HRESULT WINAPI StgCreateStorageEx(const WCHAR* pwcsName, DWORD grfMode, DWORD stgfmt, DWORD grfAttrs, STGOPTIONS* pStgOptions, void* reserved, REFIID riid, void** ppObjectOpen)
{
- TRACE("(%s, %x, %x, %x, %p, %p, %p, %p)\n", debugstr_w(pwcsName),
+ TRACE("%s, %#lx, %#lx, %#lx, %p, %p, %p, %p.\n", debugstr_w(pwcsName),
grfMode, stgfmt, grfAttrs, pStgOptions, reserved, riid, ppObjectOpen);
if (stgfmt != STGFMT_FILE && grfAttrs != 0)
@@ -8670,7 +8657,7 @@ HRESULT WINAPI StgCreateStorageEx(const WCHAR* pwcsName, DWORD grfMode, DWORD st
HRESULT WINAPI StgCreatePropSetStg(IStorage *pstg, DWORD reserved,
IPropertySetStorage **propset)
{
- TRACE("(%p, 0x%x, %p)\n", pstg, reserved, propset);
+ TRACE("%p, %#lx, %p.\n", pstg, reserved, propset);
if (reserved)
return STG_E_INVALIDPARAMETER;
@@ -8682,7 +8669,7 @@ HRESULT WINAPI StgCreatePropSetStg(IStorage *pstg, DWORD reserved,
*/
HRESULT WINAPI StgOpenStorageEx(const WCHAR* pwcsName, DWORD grfMode, DWORD stgfmt, DWORD grfAttrs, STGOPTIONS* pStgOptions, void* reserved, REFIID riid, void** ppObjectOpen)
{
- TRACE("(%s, %x, %x, %x, %p, %p, %p, %p)\n", debugstr_w(pwcsName),
+ TRACE("%s, %#lx, %#lx, %#lx, %p, %p, %p, %p.\n", debugstr_w(pwcsName),
grfMode, stgfmt, grfAttrs, pStgOptions, reserved, riid, ppObjectOpen);
if (stgfmt != STGFMT_DOCFILE && grfAttrs != 0)
@@ -8739,9 +8726,8 @@ HRESULT WINAPI StgOpenStorage(
DWORD accessMode;
LPWSTR temp_name = NULL;
- TRACE("(%s, %p, %x, %p, %d, %p)\n",
- debugstr_w(pwcsName), pstgPriority, grfMode,
- snbExclude, reserved, ppstgOpen);
+ TRACE("%s, %p, %#lx, %p, %ld, %p.\n", debugstr_w(pwcsName), pstgPriority, grfMode,
+ snbExclude, reserved, ppstgOpen);
if (pstgPriority)
{
@@ -8908,7 +8894,7 @@ HRESULT WINAPI StgOpenStorage(
end:
CoTaskMemFree(temp_name);
if (pstgPriority) IStorage_Release(pstgPriority);
- TRACE("<-- %08x, IStorage %p\n", hr, ppstgOpen ? *ppstgOpen : NULL);
+ TRACE("<-- %#lx, IStorage %p\n", hr, ppstgOpen ? *ppstgOpen : NULL);
return hr;
}
@@ -9242,7 +9228,7 @@ static HRESULT STREAM_ReadString( IStream *stm, LPWSTR *string )
if( count != sizeof(len) )
return E_OUTOFMEMORY;
- TRACE("%d bytes\n",len);
+ TRACE("%ld bytes\n",len);
str = CoTaskMemAlloc( len );
if( !str )
@@ -9381,7 +9367,7 @@ HRESULT WINAPI ReadFmtUserTypeStg (LPSTORAGE pstg, CLIPFORMAT* pcf, LPOLESTR* lp
r = IStorage_OpenStream( pstg, L"\1CompObj", NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stm );
if( FAILED ( r ) )
{
- WARN("Failed to open stream r = %08x\n", r);
+ WARN("Failed to open stream r = %#lx\n", r);
return r;
}
@@ -10576,7 +10562,7 @@ enum stream_1ole_flags {
HRESULT WINAPI OleConvertIStorageToOLESTREAMEx ( LPSTORAGE stg, CLIPFORMAT cf, LONG width, LONG height,
DWORD size, LPSTGMEDIUM medium, LPOLESTREAM olestream )
{
- FIXME("%p %x %d %d %d %p %p stub\n", stg, cf, width, height, size, medium, olestream);
+ FIXME("%p, %x, %ld, %ld, %ld, %p, %p: stub\n", stg, cf, width, height, size, medium, olestream);
return E_NOTIMPL;
}
@@ -10604,7 +10590,7 @@ HRESULT WINAPI GetConvertStg(IStorage *stg)
if (header[0] != version_magic)
{
- ERR("got wrong version magic for 1Ole stream, 0x%08x\n", header[0]);
+ ERR("got wrong version magic for 1Ole stream, %#lx.\n", header[0]);
return E_FAIL;
}
diff --git a/dlls/ole32/usrmarshal.c b/dlls/ole32/usrmarshal.c
index c58053489be..9a8ab431ea0 100644
--- a/dlls/ole32/usrmarshal.c
+++ b/dlls/ole32/usrmarshal.c
@@ -106,7 +106,7 @@ ULONG __RPC_USER HMETAFILE_UserSize(ULONG *pFlags, ULONG StartingSize, HMETAFILE
{
ULONG size = StartingSize;
- TRACE("(%s, %d, &%p\n", debugstr_user_flags(pFlags), StartingSize, *phmf);
+ TRACE("%s, %lu, &%p.\n", debugstr_user_flags(pFlags), StartingSize, *phmf);
ALIGN_LENGTH(size, 3);
@@ -302,7 +302,7 @@ void __RPC_USER HMETAFILE_UserFree(ULONG *pFlags, HMETAFILE *phmf)
*/
ULONG __RPC_USER HENHMETAFILE_UserSize(ULONG *pFlags, ULONG size, HENHMETAFILE *phEmf)
{
- TRACE("(%s, %d, %p\n", debugstr_user_flags(pFlags), size, *phEmf);
+ TRACE("%s, %lu, %p.\n", debugstr_user_flags(pFlags), size, *phEmf);
ALIGN_LENGTH(size, 3);
@@ -498,7 +498,7 @@ void __RPC_USER HENHMETAFILE_UserFree(ULONG *pFlags, HENHMETAFILE *phEmf)
*/
ULONG __RPC_USER HMETAFILEPICT_UserSize(ULONG *pFlags, ULONG size, HMETAFILEPICT *phMfp)
{
- TRACE("(%s, %d, &%p)\n", debugstr_user_flags(pFlags), size, *phMfp);
+ TRACE("%s, %lu, &%p.\n", debugstr_user_flags(pFlags), size, *phMfp);
ALIGN_LENGTH(size, 3);
@@ -721,7 +721,7 @@ ULONG __RPC_USER STGMEDIUM_UserSize(ULONG *pFlags, ULONG StartingSize, STGMEDIUM
{
ULONG size = StartingSize;
- TRACE("(%s, %d, %p\n", debugstr_user_flags(pFlags), StartingSize, pStgMedium);
+ TRACE("%s, %lu, %p.\n", debugstr_user_flags(pFlags), StartingSize, pStgMedium);
ALIGN_LENGTH(size, 3);
@@ -961,7 +961,7 @@ unsigned char * __RPC_USER STGMEDIUM_UserUnmarshal(ULONG *pFlags, unsigned char
pBuffer += sizeof(DWORD);
if (*(DWORD *)pBuffer != 0)
{
- ERR("invalid offset %d\n", *(DWORD *)pBuffer);
+ ERR("invalid offset %ld\n", *(DWORD *)pBuffer);
RpcRaiseException(RPC_S_INVALID_BOUND);
return NULL;
}
@@ -970,14 +970,13 @@ unsigned char * __RPC_USER STGMEDIUM_UserUnmarshal(ULONG *pFlags, unsigned char
pBuffer += sizeof(DWORD);
if (conformance != variance)
{
- ERR("conformance (%d) and variance (%d) should be equal\n",
- conformance, variance);
+ ERR("conformance (%ld) and variance (%ld) should be equal\n", conformance, variance);
RpcRaiseException(RPC_S_INVALID_BOUND);
return NULL;
}
if (conformance > 0x7fffffff)
{
- ERR("conformance 0x%x too large\n", conformance);
+ ERR("conformance %#lx too large\n", conformance);
RpcRaiseException(RPC_S_INVALID_BOUND);
return NULL;
}
@@ -1141,7 +1140,7 @@ ULONG __RPC_USER SNB_UserSize(ULONG *pFlags, ULONG StartingSize, SNB *pSnb)
{
ULONG size = StartingSize;
- TRACE("(%s, %d, %p\n", debugstr_user_flags(pFlags), StartingSize, pSnb);
+ TRACE("%s, %lu, %p.\n", debugstr_user_flags(pFlags), StartingSize, pSnb);
ALIGN_LENGTH(size, 3);
@@ -1305,7 +1304,7 @@ HRESULT CALLBACK IEnumUnknown_Next_Proxy(
ULONG *pceltFetched)
{
ULONG fetched;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
if (!pceltFetched) pceltFetched = &fetched;
return IEnumUnknown_RemoteNext_Proxy(This, celt, rgelt, pceltFetched);
}
@@ -1317,7 +1316,7 @@ HRESULT __RPC_STUB IEnumUnknown_Next_Stub(
ULONG *pceltFetched)
{
HRESULT hr;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
*pceltFetched = 0;
hr = IEnumUnknown_Next(This, celt, rgelt, pceltFetched);
if (hr == S_OK) *pceltFetched = celt;
@@ -1363,7 +1362,7 @@ HRESULT CALLBACK IEnumMoniker_Next_Proxy(
ULONG *pceltFetched)
{
ULONG fetched;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
if (!pceltFetched) pceltFetched = &fetched;
return IEnumMoniker_RemoteNext_Proxy(This, celt, rgelt, pceltFetched);
}
@@ -1375,7 +1374,7 @@ HRESULT __RPC_STUB IEnumMoniker_Next_Stub(
ULONG *pceltFetched)
{
HRESULT hr;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
*pceltFetched = 0;
hr = IEnumMoniker_Next(This, celt, rgelt, pceltFetched);
if (hr == S_OK) *pceltFetched = celt;
@@ -1449,7 +1448,7 @@ HRESULT CALLBACK IEnumString_Next_Proxy(
ULONG *pceltFetched)
{
ULONG fetched;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
if (!pceltFetched) pceltFetched = &fetched;
return IEnumString_RemoteNext_Proxy(This, celt, rgelt, pceltFetched);
}
@@ -1461,7 +1460,7 @@ HRESULT __RPC_STUB IEnumString_Next_Stub(
ULONG *pceltFetched)
{
HRESULT hr;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
*pceltFetched = 0;
hr = IEnumString_Next(This, celt, rgelt, pceltFetched);
if (hr == S_OK) *pceltFetched = celt;
@@ -1477,7 +1476,7 @@ HRESULT CALLBACK ISequentialStream_Read_Proxy(
ULONG read;
HRESULT hr;
- TRACE("(%p)->(%p, %d, %p)\n", This, pv, cb, pcbRead);
+ TRACE("%p, %p, %lu, %p.\n", This, pv, cb, pcbRead);
hr = ISequentialStream_RemoteRead_Proxy(This, pv, cb, &read);
if(pcbRead) *pcbRead = read;
@@ -1491,7 +1490,7 @@ HRESULT __RPC_STUB ISequentialStream_Read_Stub(
ULONG cb,
ULONG *pcbRead)
{
- TRACE("(%p)->(%p, %d, %p)\n", This, pv, cb, pcbRead);
+ TRACE("%p, %p, %lu, %p.\n", This, pv, cb, pcbRead);
return ISequentialStream_Read(This, pv, cb, pcbRead);
}
@@ -1504,7 +1503,7 @@ HRESULT CALLBACK ISequentialStream_Write_Proxy(
ULONG written;
HRESULT hr;
- TRACE("(%p)->(%p, %d, %p)\n", This, pv, cb, pcbWritten);
+ TRACE("%p, %p, %lu, %p.\n", This, pv, cb, pcbWritten);
hr = ISequentialStream_RemoteWrite_Proxy(This, pv, cb, &written);
if(pcbWritten) *pcbWritten = written;
@@ -1518,7 +1517,7 @@ HRESULT __RPC_STUB ISequentialStream_Write_Stub(
ULONG cb,
ULONG *pcbWritten)
{
- TRACE("(%p)->(%p, %d, %p)\n", This, pv, cb, pcbWritten);
+ TRACE("%p, %p, %lu, %p.\n", This, pv, cb, pcbWritten);
return ISequentialStream_Write(This, pv, cb, pcbWritten);
}
@@ -1531,7 +1530,7 @@ HRESULT CALLBACK IStream_Seek_Proxy(
ULARGE_INTEGER newpos;
HRESULT hr;
- TRACE("(%p)->(%s, %d, %p)\n", This, wine_dbgstr_longlong(dlibMove.QuadPart), dwOrigin, plibNewPosition);
+ TRACE("%p, %s, %ld, %p.\n", This, wine_dbgstr_longlong(dlibMove.QuadPart), dwOrigin, plibNewPosition);
hr = IStream_RemoteSeek_Proxy(This, dlibMove, dwOrigin, &newpos);
if(plibNewPosition) *plibNewPosition = newpos;
@@ -1545,7 +1544,7 @@ HRESULT __RPC_STUB IStream_Seek_Stub(
DWORD dwOrigin,
ULARGE_INTEGER *plibNewPosition)
{
- TRACE("(%p)->(%s, %d, %p)\n", This, wine_dbgstr_longlong(dlibMove.QuadPart), dwOrigin, plibNewPosition);
+ TRACE("%p, %s, %ld, %p.\n", This, wine_dbgstr_longlong(dlibMove.QuadPart), dwOrigin, plibNewPosition);
return IStream_Seek(This, dlibMove, dwOrigin, plibNewPosition);
}
@@ -1587,7 +1586,7 @@ HRESULT CALLBACK IEnumSTATSTG_Next_Proxy(
ULONG *pceltFetched)
{
ULONG fetched;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
if (!pceltFetched) pceltFetched = &fetched;
return IEnumSTATSTG_RemoteNext_Proxy(This, celt, rgelt, pceltFetched);
}
@@ -1599,7 +1598,7 @@ HRESULT __RPC_STUB IEnumSTATSTG_Next_Stub(
ULONG *pceltFetched)
{
HRESULT hr;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
*pceltFetched = 0;
hr = IEnumSTATSTG_Next(This, celt, rgelt, pceltFetched);
if (hr == S_OK) *pceltFetched = celt;
@@ -1614,7 +1613,7 @@ HRESULT CALLBACK IStorage_OpenStream_Proxy(
DWORD reserved2,
IStream **ppstm)
{
- TRACE("(%p)->(%s, %p, %08x, %d %p)\n", This, debugstr_w(pwcsName), reserved1, grfMode, reserved2, ppstm);
+ TRACE("%p, %s, %p, %#lx, %ld, %p.\n", This, debugstr_w(pwcsName), reserved1, grfMode, reserved2, ppstm);
if(reserved1) WARN("reserved1 %p\n", reserved1);
return IStorage_RemoteOpenStream_Proxy(This, pwcsName, 0, NULL, grfMode, reserved2, ppstm);
@@ -1629,8 +1628,8 @@ HRESULT __RPC_STUB IStorage_OpenStream_Stub(
DWORD reserved2,
IStream **ppstm)
{
- TRACE("(%p)->(%s, %d, %p, %08x, %d %p)\n", This, debugstr_w(pwcsName), cbReserved1, reserved1, grfMode, reserved2, ppstm);
- if(cbReserved1 || reserved1) WARN("cbReserved1 %d reserved1 %p\n", cbReserved1, reserved1);
+ TRACE("%p, %s, %ld, %p, %#lx, %ld, %p.\n", This, debugstr_w(pwcsName), cbReserved1, reserved1, grfMode, reserved2, ppstm);
+ if(cbReserved1 || reserved1) WARN("cbReserved1 %ld reserved1 %p\n", cbReserved1, reserved1);
return IStorage_OpenStream(This, pwcsName, NULL, grfMode, reserved2, ppstm);
}
@@ -1642,7 +1641,7 @@ HRESULT CALLBACK IStorage_EnumElements_Proxy(
DWORD reserved3,
IEnumSTATSTG **ppenum)
{
- TRACE("(%p)->(%d, %p, %d, %p)\n", This, reserved1, reserved2, reserved3, ppenum);
+ TRACE("%p, %ld, %p, %ld, %p.\n", This, reserved1, reserved2, reserved3, ppenum);
if(reserved2) WARN("reserved2 %p\n", reserved2);
return IStorage_RemoteEnumElements_Proxy(This, reserved1, 0, NULL, reserved3, ppenum);
@@ -1656,8 +1655,8 @@ HRESULT __RPC_STUB IStorage_EnumElements_Stub(
DWORD reserved3,
IEnumSTATSTG **ppenum)
{
- TRACE("(%p)->(%d, %d, %p, %d, %p)\n", This, reserved1, cbReserved2, reserved2, reserved3, ppenum);
- if(cbReserved2 || reserved2) WARN("cbReserved2 %d reserved2 %p\n", cbReserved2, reserved2);
+ TRACE("%p, %ld, %ld, %p, %ld, %p.\n", This, reserved1, cbReserved2, reserved2, reserved3, ppenum);
+ if(cbReserved2 || reserved2) WARN("cbReserved2 %ld reserved2 %p\n", cbReserved2, reserved2);
return IStorage_EnumElements(This, reserved1, NULL, reserved3, ppenum);
}
@@ -1672,7 +1671,7 @@ HRESULT CALLBACK ILockBytes_ReadAt_Proxy(
ULONG read;
HRESULT hr;
- TRACE("(%p)->(%s, %p, %d, %p)\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbRead);
+ TRACE("%p, %s, %p, %lu, %p.\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbRead);
hr = ILockBytes_RemoteReadAt_Proxy(This, ulOffset, pv, cb, &read);
if(pcbRead) *pcbRead = read;
@@ -1687,7 +1686,7 @@ HRESULT __RPC_STUB ILockBytes_ReadAt_Stub(
ULONG cb,
ULONG *pcbRead)
{
- TRACE("(%p)->(%s, %p, %d, %p)\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbRead);
+ TRACE("%p, %s, %p, %lu, %p.\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbRead);
return ILockBytes_ReadAt(This, ulOffset, pv, cb, pcbRead);
}
@@ -1701,7 +1700,7 @@ HRESULT CALLBACK ILockBytes_WriteAt_Proxy(
ULONG written;
HRESULT hr;
- TRACE("(%p)->(%s, %p, %d, %p)\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbWritten);
+ TRACE("%p, %s, %p, %lu, %p.\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbWritten);
hr = ILockBytes_RemoteWriteAt_Proxy(This, ulOffset, pv, cb, &written);
if(pcbWritten) *pcbWritten = written;
@@ -1716,7 +1715,7 @@ HRESULT __RPC_STUB ILockBytes_WriteAt_Stub(
ULONG cb,
ULONG *pcbWritten)
{
- TRACE("(%p)->(%s, %p, %d, %p)\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbWritten);
+ TRACE("%p, %s, %p, %lu, %p.\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbWritten);
return ILockBytes_WriteAt(This, ulOffset, pv, cb, pcbWritten);
}
@@ -1729,7 +1728,7 @@ HRESULT CALLBACK IFillLockBytes_FillAppend_Proxy(
ULONG written;
HRESULT hr;
- TRACE("(%p)->(%p, %d, %p)\n", This, pv, cb, pcbWritten);
+ TRACE("%p, %p, %lu, %p.\n", This, pv, cb, pcbWritten);
hr = IFillLockBytes_RemoteFillAppend_Proxy(This, pv, cb, &written);
if(pcbWritten) *pcbWritten = written;
@@ -1743,7 +1742,7 @@ HRESULT __RPC_STUB IFillLockBytes_FillAppend_Stub(
ULONG cb,
ULONG *pcbWritten)
{
- TRACE("(%p)->(%p, %d, %p)\n", This, pv, cb, pcbWritten);
+ TRACE("%p, %p, %lu, %p.\n", This, pv, cb, pcbWritten);
return IFillLockBytes_FillAppend(This, pv, cb, pcbWritten);
}
@@ -1757,7 +1756,7 @@ HRESULT CALLBACK IFillLockBytes_FillAt_Proxy(
ULONG written;
HRESULT hr;
- TRACE("(%p)->(%s, %p, %d, %p)\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbWritten);
+ TRACE("%p, %s, %p, %lu, %p.\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbWritten);
hr = IFillLockBytes_RemoteFillAt_Proxy(This, ulOffset, pv, cb, &written);
if(pcbWritten) *pcbWritten = written;
@@ -1772,7 +1771,7 @@ HRESULT __RPC_STUB IFillLockBytes_FillAt_Stub(
ULONG cb,
ULONG *pcbWritten)
{
- TRACE("(%p)->(%s, %p, %d, %p)\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbWritten);
+ TRACE("%p, %s, %p, %ld, %p.\n", This, wine_dbgstr_longlong(ulOffset.QuadPart), pv, cb, pcbWritten);
return IFillLockBytes_FillAt(This, ulOffset, pv, cb, pcbWritten);
}
@@ -1807,7 +1806,7 @@ HRESULT CALLBACK IEnumSTATDATA_Next_Proxy(
ULONG *pceltFetched)
{
ULONG fetched;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %ld, %p, %p.\n", This, celt, rgelt, pceltFetched);
if (!pceltFetched) pceltFetched = &fetched;
return IEnumSTATDATA_RemoteNext_Proxy(This, celt, rgelt, pceltFetched);
}
@@ -1819,7 +1818,7 @@ HRESULT __RPC_STUB IEnumSTATDATA_Next_Stub(
ULONG *pceltFetched)
{
HRESULT hr;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
*pceltFetched = 0;
hr = IEnumSTATDATA_Next(This, celt, rgelt, pceltFetched);
if (hr == S_OK) *pceltFetched = celt;
@@ -1850,7 +1849,7 @@ void CALLBACK IAdviseSink_OnViewChange_Proxy(
DWORD dwAspect,
LONG lindex)
{
- TRACE("(%p)->(%d, %d)\n", This, dwAspect, lindex);
+ TRACE("%p, %ld, %ld.\n", This, dwAspect, lindex);
IAdviseSink_RemoteOnViewChange_Proxy(This, dwAspect, lindex);
}
@@ -1859,7 +1858,7 @@ HRESULT __RPC_STUB IAdviseSink_OnViewChange_Stub(
DWORD dwAspect,
LONG lindex)
{
- TRACE("(%p)->(%d, %d)\n", This, dwAspect, lindex);
+ TRACE("%p, %ld, %ld.\n", This, dwAspect, lindex);
IAdviseSink_OnViewChange(This, dwAspect, lindex);
return S_OK;
}
@@ -2054,7 +2053,7 @@ HRESULT CALLBACK IOleCache2_UpdateCache_Proxy(
DWORD grfUpdf,
LPVOID pReserved)
{
- TRACE("(%p, %p, 0x%08x, %p)\n", This, pDataObject, grfUpdf, pReserved);
+ TRACE("%p, %p, %#lx, %p.\n", This, pDataObject, grfUpdf, pReserved);
return IOleCache2_RemoteUpdateCache_Proxy(This, pDataObject, grfUpdf, (LONG_PTR)pReserved);
}
@@ -2064,7 +2063,7 @@ HRESULT __RPC_STUB IOleCache2_UpdateCache_Stub(
DWORD grfUpdf,
LONG_PTR pReserved)
{
- TRACE("(%p, %p, 0x%08x, %li)\n", This, pDataObject, grfUpdf, pReserved);
+ TRACE("%p, %p, %#lx, %Id.\n", This, pDataObject, grfUpdf, pReserved);
return IOleCache2_UpdateCache(This, pDataObject, grfUpdf, (void*)pReserved);
}
@@ -2075,7 +2074,7 @@ HRESULT CALLBACK IEnumOLEVERB_Next_Proxy(
ULONG *pceltFetched)
{
ULONG fetched;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
if (!pceltFetched) pceltFetched = &fetched;
return IEnumOLEVERB_RemoteNext_Proxy(This, celt, rgelt, pceltFetched);
}
@@ -2087,7 +2086,7 @@ HRESULT __RPC_STUB IEnumOLEVERB_Next_Stub(
ULONG *pceltFetched)
{
HRESULT hr;
- TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
+ TRACE("%p, %lu, %p, %p.\n", This, celt, rgelt, pceltFetched);
*pceltFetched = 0;
hr = IEnumOLEVERB_Next(This, celt, rgelt, pceltFetched);
if (hr == S_OK) *pceltFetched = celt;
--
2.34.1
2
1
Feb. 9, 2022
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
---
dlls/xolehlp/Makefile.in | 1 -
dlls/xolehlp/xolehlp.c | 34 +++++++++++++++++-----------------
2 files changed, 17 insertions(+), 18 deletions(-)
diff --git a/dlls/xolehlp/Makefile.in b/dlls/xolehlp/Makefile.in
index c2bebe884fe..f39cd90f0b9 100644
--- a/dlls/xolehlp/Makefile.in
+++ b/dlls/xolehlp/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = xolehlp.dll
IMPORTS = uuid
diff --git a/dlls/xolehlp/xolehlp.c b/dlls/xolehlp/xolehlp.c
index d3355c1c34e..e61f4b35fc8 100644
--- a/dlls/xolehlp/xolehlp.c
+++ b/dlls/xolehlp/xolehlp.c
@@ -68,7 +68,7 @@ static ULONG WINAPI ResourceManager_AddRef(IResourceManager *iface)
ResourceManager *This = impl_from_IResourceManager(iface);
ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p) refcount=%u\n", iface, ref);
+ TRACE("(%p) refcount=%lu\n", iface, ref);
return ref;
}
@@ -78,7 +78,7 @@ static ULONG WINAPI ResourceManager_Release(IResourceManager *iface)
ResourceManager *This = impl_from_IResourceManager(iface);
ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p) refcount=%u\n", iface, ref);
+ TRACE("(%p) refcount=%lu\n", iface, ref);
if (ref == 0)
{
@@ -98,7 +98,7 @@ static HRESULT WINAPI ResourceManager_Enlist(IResourceManager *iface,
static HRESULT WINAPI ResourceManager_Reenlist(IResourceManager *iface,
byte *pPrepInfo,ULONG cbPrepInfo,DWORD lTimeout,XACTSTAT *pXactStat)
{
- FIXME("(%p, %p, %u, %u, %p): stub\n", iface, pPrepInfo, cbPrepInfo, lTimeout, pXactStat);
+ FIXME("(%p, %p, %lu, %lu, %p): stub\n", iface, pPrepInfo, cbPrepInfo, lTimeout, pXactStat);
return E_NOTIMPL;
}
static HRESULT WINAPI ResourceManager_ReenlistmentComplete(IResourceManager *iface)
@@ -186,7 +186,7 @@ static ULONG WINAPI TransactionOptions_AddRef(ITransactionOptions *iface)
TransactionOptions *This = impl_from_ITransactionOptions(iface);
ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p) refcount=%u\n", iface, ref);
+ TRACE("(%p) refcount=%lu\n", iface, ref);
return ref;
}
@@ -196,7 +196,7 @@ static ULONG WINAPI TransactionOptions_Release(ITransactionOptions *iface)
TransactionOptions *This = impl_from_ITransactionOptions(iface);
ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p) refcount=%u\n", iface, ref);
+ TRACE("(%p) refcount=%lu\n", iface, ref);
if (ref == 0)
{
@@ -211,7 +211,7 @@ static HRESULT WINAPI TransactionOptions_SetOptions(ITransactionOptions *iface,
TransactionOptions *This = impl_from_ITransactionOptions(iface);
if (!pOptions) return E_INVALIDARG;
- TRACE("(%p, %u, %s)\n", iface, pOptions->ulTimeout, debugstr_a(pOptions->szDescription));
+ TRACE("(%p, %lu, %s)\n", iface, pOptions->ulTimeout, debugstr_a(pOptions->szDescription));
This->opts = *pOptions;
return S_OK;
}
@@ -295,7 +295,7 @@ static ULONG WINAPI Transaction_AddRef(ITransaction *iface)
Transaction *This = impl_from_ITransaction(iface);
ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p) refcount=%u\n", iface, ref);
+ TRACE("(%p) refcount=%lu\n", iface, ref);
return ref;
}
@@ -305,7 +305,7 @@ static ULONG WINAPI Transaction_Release(ITransaction *iface)
Transaction *This = impl_from_ITransaction(iface);
ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p) refcount=%u\n", iface, ref);
+ TRACE("(%p) refcount=%lu\n", iface, ref);
if (ref == 0)
{
@@ -317,7 +317,7 @@ static ULONG WINAPI Transaction_Release(ITransaction *iface)
static HRESULT WINAPI Transaction_Commit(ITransaction *iface,
BOOL fRetaining, DWORD grfTC, DWORD grfRM)
{
- FIXME("(%p, %d, %08x, %08x): stub\n", iface, fRetaining, grfTC, grfRM);
+ FIXME("(%p, %d, %08lx, %08lx): stub\n", iface, fRetaining, grfTC, grfRM);
return E_NOTIMPL;
}
static HRESULT WINAPI Transaction_Abort(ITransaction *iface,
@@ -425,7 +425,7 @@ static ULONG WINAPI TransactionDispenser_AddRef(ITransactionDispenser *iface)
TransactionManager *This = impl_from_ITransactionDispenser(iface);
ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p) refcount=%u\n", iface, ref);
+ TRACE("(%p) refcount=%lu\n", iface, ref);
return ref;
}
@@ -435,7 +435,7 @@ static ULONG WINAPI TransactionDispenser_Release(ITransactionDispenser *iface)
TransactionManager *This = impl_from_ITransactionDispenser(iface);
ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p) refcount=%u\n", iface, ref);
+ TRACE("(%p) refcount=%lu\n", iface, ref);
if (ref == 0)
{
@@ -460,7 +460,7 @@ static HRESULT WINAPI TransactionDispenser_BeginTransaction(ITransactionDispense
ITransactionOptions *pOptions,
ITransaction **ppTransaction)
{
- FIXME("(%p, %p, %08x, %08x, %p, %p): semi-stub\n", iface, punkOuter,
+ FIXME("(%p, %p, %08lx, %08lx, %p, %p): semi-stub\n", iface, punkOuter,
isoLevel, isoFlags, pOptions, ppTransaction);
if (!ppTransaction) return E_INVALIDARG;
@@ -556,7 +556,7 @@ static HRESULT WINAPI TransactionImportWhereabouts_GetWhereaboutsSize(ITransacti
static HRESULT WINAPI TransactionImportWhereabouts_GetWhereabouts(ITransactionImportWhereabouts *iface,
ULONG cbWhereabouts, BYTE *rgbWhereabouts,ULONG *pcbUsed)
{
- FIXME("(%p, %u, %p, %p): stub returning fake value\n", iface, cbWhereabouts, rgbWhereabouts, pcbUsed);
+ FIXME("(%p, %lu, %p, %p): stub returning fake value\n", iface, cbWhereabouts, rgbWhereabouts, pcbUsed);
if (!rgbWhereabouts || !pcbUsed) return E_INVALIDARG;
*rgbWhereabouts = 0;
@@ -597,7 +597,7 @@ static ULONG WINAPI TransactionImport_Release(ITransactionImport *iface)
static HRESULT WINAPI TransactionImport_Import(ITransactionImport *iface,
ULONG cbTransactionCookie, byte *rgbTransactionCookie, IID *piid, void **ppvTransaction)
{
- FIXME("(%p, %u, %p, %s, %p): stub\n", iface, cbTransactionCookie, rgbTransactionCookie, debugstr_guid(piid), ppvTransaction);
+ FIXME("(%p, %lu, %p, %s, %p): stub\n", iface, cbTransactionCookie, rgbTransactionCookie, debugstr_guid(piid), ppvTransaction);
if (!rgbTransactionCookie || !piid || !ppvTransaction) return E_INVALIDARG;
return E_NOTIMPL;
@@ -653,7 +653,7 @@ static BOOL is_local_machineW( const WCHAR *server )
HRESULT CDECL DtcGetTransactionManager(char *host, char *tm_name, REFIID riid,
DWORD dwReserved1, WORD wcbReserved2, void *pvReserved2, void **ppv)
{
- TRACE("(%s, %s, %s, %d, %d, %p, %p)\n", debugstr_a(host), debugstr_a(tm_name),
+ TRACE("(%s, %s, %s, %ld, %d, %p, %p)\n", debugstr_a(host), debugstr_a(tm_name),
debugstr_guid(riid), dwReserved1, wcbReserved2, pvReserved2, ppv);
if (!is_local_machineA(host))
@@ -667,7 +667,7 @@ HRESULT CDECL DtcGetTransactionManager(char *host, char *tm_name, REFIID riid,
HRESULT CDECL DtcGetTransactionManagerExA(CHAR *host, CHAR *tm_name, REFIID riid,
DWORD options, void *config, void **ppv)
{
- TRACE("(%s, %s, %s, %d, %p, %p)\n", debugstr_a(host), debugstr_a(tm_name),
+ TRACE("(%s, %s, %s, %ld, %p, %p)\n", debugstr_a(host), debugstr_a(tm_name),
debugstr_guid(riid), options, config, ppv);
if (!is_local_machineA(host))
@@ -681,7 +681,7 @@ HRESULT CDECL DtcGetTransactionManagerExA(CHAR *host, CHAR *tm_name, REFIID riid
HRESULT CDECL DtcGetTransactionManagerExW(WCHAR *host, WCHAR *tm_name, REFIID riid,
DWORD options, void *config, void **ppv)
{
- TRACE("(%s, %s, %s, %d, %p, %p)\n", debugstr_w(host), debugstr_w(tm_name),
+ TRACE("(%s, %s, %s, %ld, %p, %p)\n", debugstr_w(host), debugstr_w(tm_name),
debugstr_guid(riid), options, config, ppv);
if (!is_local_machineW(host))
--
2.34.1
1
0
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/qasf/Makefile.in | 1 -
dlls/qasf/dmowrapper.c | 16 ++++++++--------
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/dlls/qasf/Makefile.in b/dlls/qasf/Makefile.in
index d82abfeea7d..ee8fd0451e1 100644
--- a/dlls/qasf/Makefile.in
+++ b/dlls/qasf/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = qasf.dll
IMPORTS = strmbase dmoguids strmiids uuid ole32 oleaut32
diff --git a/dlls/qasf/dmowrapper.c b/dlls/qasf/dmowrapper.c
index 54581b48bee..95e12e860ae 100644
--- a/dlls/qasf/dmowrapper.c
+++ b/dlls/qasf/dmowrapper.c
@@ -86,7 +86,7 @@ static HRESULT WINAPI buffer_SetLength(IMediaBuffer *iface, DWORD len)
{
struct buffer *buffer = impl_from_IMediaBuffer(iface);
- TRACE("iface %p, len %u.\n", iface, len);
+ TRACE("iface %p, len %lu.\n", iface, len);
return IMediaSample_SetActualDataLength(buffer->sample, len);
}
@@ -216,7 +216,7 @@ static HRESULT process_output(struct dmo_wrapper *filter, IMediaObject *dmo)
if (FAILED(hr = IMemAllocator_GetBuffer(filter->sources[i].pin.pAllocator,
&filter->sources[i].buffer.sample, NULL, NULL, 0)))
{
- ERR("Failed to get sample, hr %#x.\n", hr);
+ ERR("Failed to get sample, hr %#lx.\n", hr);
goto out;
}
buffers[i].pBuffer = &filter->sources[i].buffer.IMediaBuffer_iface;
@@ -263,7 +263,7 @@ static HRESULT process_output(struct dmo_wrapper *filter, IMediaObject *dmo)
{
if (FAILED(hr = IMemInputPin_Receive(filter->sources[i].pin.pMemInputPin, sample)))
{
- WARN("Downstream sink returned %#x.\n", hr);
+ WARN("Downstream sink returned %#lx.\n", hr);
goto out;
}
IMediaSample_SetActualDataLength(sample, 0);
@@ -300,7 +300,7 @@ static HRESULT WINAPI dmo_wrapper_sink_Receive(struct strmbase_sink *iface, IMed
{
if (FAILED(hr = IMediaObject_Discontinuity(dmo, index)))
{
- ERR("Discontinuity() failed, hr %#x.\n", hr);
+ ERR("Discontinuity() failed, hr %#lx.\n", hr);
goto out;
}
@@ -324,7 +324,7 @@ static HRESULT WINAPI dmo_wrapper_sink_Receive(struct strmbase_sink *iface, IMed
if (FAILED(hr = IMediaObject_ProcessInput(dmo, index,
&filter->input_buffer.IMediaBuffer_iface, flags, start, stop - start)))
{
- ERR("ProcessInput() failed, hr %#x.\n", hr);
+ ERR("ProcessInput() failed, hr %#lx.\n", hr);
goto out;
}
@@ -346,11 +346,11 @@ static HRESULT dmo_wrapper_sink_eos(struct strmbase_sink *iface)
IUnknown_QueryInterface(filter->dmo, &IID_IMediaObject, (void **)&dmo);
if (FAILED(hr = IMediaObject_Discontinuity(dmo, index)))
- ERR("Discontinuity() failed, hr %#x.\n", hr);
+ ERR("Discontinuity() failed, hr %#lx.\n", hr);
process_output(filter, dmo);
if (FAILED(hr = IMediaObject_Flush(dmo)))
- ERR("Flush() failed, hr %#x.\n", hr);
+ ERR("Flush() failed, hr %#lx.\n", hr);
for (i = 0; i < filter->source_count; ++i)
{
@@ -372,7 +372,7 @@ static HRESULT dmo_wrapper_end_flush(struct strmbase_sink *iface)
IUnknown_QueryInterface(filter->dmo, &IID_IMediaObject, (void **)&dmo);
if (FAILED(hr = IMediaObject_Flush(dmo)))
- ERR("Flush() failed, hr %#x.\n", hr);
+ ERR("Flush() failed, hr %#lx.\n", hr);
for (i = 0; i < filter->source_count; ++i)
{
--
2.34.1
2
4
[PATCH] winex11.drv: Change fullscreen state even when processing events.
by Esme Povirk Feb. 9, 2022
by Esme Povirk Feb. 9, 2022
Feb. 9, 2022
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52532
Signed-off-by: Esme Povirk <esme(a)codeweavers.com>
---
dlls/winex11.drv/window.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index 36fb41ac710..7e5b17288bf 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -2536,7 +2536,10 @@ void CDECL X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags
else
{
if (swp_flags & (SWP_FRAMECHANGED|SWP_STATECHANGED)) set_wm_hints( data );
- if (!event_type) update_net_wm_states( data );
+ if (!event_type ||
+ (!(swp_flags & (SWP_NOMOVE|SWP_NOSIZE)) &&
+ (is_window_rect_full_screen( &old_whole_rect ) != is_window_rect_full_screen( &data->whole_rect ))))
+ update_net_wm_states( data );
}
}
--
2.30.2
2
1
[RFC PATCH v5 0/5] Fix sock_recv reordering issue (#52401): unknown_status + wineserver call approach
by Jinoh Kang Feb. 9, 2022
by Jinoh Kang Feb. 9, 2022
Feb. 9, 2022
<preamble>
This is my forth attempt to tackle the issue #52401 [1]: "Improper
synchronization in sock_recv/sock_send leads to arbitrary reordering of
completion of I/O requests", which was initially reported (outside Bugzilla)
by Dongwan Kim [2].
Basically, the old process of sock_recv is:
1. Perform the I/O synchronously.
2. Report the result back to the server,
or queue up the request in the server.
3. If blocking, wait for I/O to complete.
The new process of sock_recv would be:
1. Queue up the request in the server.
2. Perform the I/O synchronously.
3. Report the result back to the server,
4. If blocking, wait for I/O to complete.
Everything except the actual I/O requires communicating with wineserver.
My goal here is to fix the issue without introducing extra calls to wineserver.
(However, if it turns out that this goal is not of utmost significance, then
this patch serie can be easily modified so that it issues separate server
calls.)
The previous approaches are listed here:
- Add a new select type called SELECT_SIGNAL_WAIT_ASYNC [3].
Zebediah has pointed out [4] that it is not very elegant to (ab-)use
the synchronization machinery for communicating the async result.
- Use APC_ASYNC_IO to perform the synchronous I/O [5].
This ended up with a total of 11 patches, and turned out to be
rather too complicated for a simple task.
- Add a new wineserver call, and use "add_queue" hook to save a round
trip to the server [6].
</preamble>
Each of the above turned out to be either too intrusive, complicated, or
hard to verify. Per suggestion by Zebediah [7], this is my (hopefully)
last approach: keep the new wineserver call, but keep out the implicit
STATUS_PENDING transition from "add_queue"; also, (re-)use the
"unknown_status" field.
Changelog:
- v1 -> v2: fix async queue hang on synchronous failure
- v2 -> v3: rewrite handling of pending/failed asyncs.
- v3 -> v4: don't set IOSB on synchronous failure, make more robust
[1] https://bugs.winehq.org/show_bug.cgi?id=52401
[2] https://www.winehq.org/pipermail/wine-devel/2021-May/186454.html
[3] https://www.winehq.org/pipermail/wine-devel/2022-January/204695.html
[4] https://www.winehq.org/pipermail/wine-devel/2022-January/204710.html
[5] https://www.winehq.org/pipermail/wine-devel/2022-January/205168.html
[6] https://www.winehq.org/pipermail/wine-devel/2022-January/205193.html
[7] https://www.winehq.org/pipermail/wine-devel/2022-January/205738.html
Jinoh Kang (5):
server: Allow calling async_handoff() with status code STATUS_ALERTED.
server: Add a new server request "set_async_direct_result."
server: Attempt to complete I/O request immediately in recv_socket.
ntdll: Don't call try_recv before server call in sock_recv.
server: Replace redundant recv_socket status fields with force_async
boolean field.
dlls/ntdll/unix/socket.c | 36 +++++++++--------
dlls/ntdll/unix/sync.c | 26 ++++++++++++
dlls/ntdll/unix/unix_private.h | 1 +
dlls/ws2_32/tests/sock.c | 8 ++--
server/async.c | 72 ++++++++++++++++++++++++++++++++++
server/protocol.def | 14 ++++++-
server/sock.c | 39 ++++++++++++------
7 files changed, 160 insertions(+), 36 deletions(-)
--
2.34.1
3
7