Wine-devel
Threads by month
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
March 2022
- 80 participants
- 950 discussions
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/wininet/tests/http.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
index cf3f62f868a..706b8fa623b 100644
--- a/dlls/wininet/tests/http.c
+++ b/dlls/wininet/tests/http.c
@@ -363,7 +363,7 @@ static void _test_http_version(unsigned line, HINTERNET req)
ok_(__FILE__,line)(v.dwMinorVersion == 1, "dwMinorVersion = %d\n", v.dwMinorVersion);
}
-static int close_handle_cnt;
+static LONG close_handle_cnt;
static VOID WINAPI callback(
HINTERNET hInternet,
2
3
Log: for driver "SHARP DX-2008UC", the wrong value for bmformat causes incorrect color picture data to be printed.
Signed-off-by: zhaoyi <zhaoyi(a)uniontech.com>
Change-Id: I9818dbd86f8a58777e185a76f027fd1c30b7f7ff
---
dlls/mscms/liblcms.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/mscms/liblcms.c b/dlls/mscms/liblcms.c
index 1f43c359c4..522e1dc3d0 100644
--- a/dlls/mscms/liblcms.c
+++ b/dlls/mscms/liblcms.c
@@ -49,12 +49,12 @@ static DWORD from_bmformat( BMFORMAT format )
switch (format)
{
- case BM_RGBTRIPLETS: ret = TYPE_RGB_8; break;
- case BM_BGRTRIPLETS: ret = TYPE_BGR_8; break;
+ case BM_RGBTRIPLETS: ret = TYPE_BGR_8; break;
+ case BM_BGRTRIPLETS: ret = TYPE_RGB_8; break;
case BM_GRAY: ret = TYPE_GRAY_8; break;
- case BM_xRGBQUADS: ret = TYPE_ARGB_8; break;
- case BM_xBGRQUADS: ret = TYPE_ABGR_8; break;
- case BM_KYMCQUADS: ret = TYPE_KYMC_8; break;
+ case BM_xRGBQUADS: ret = TYPE_ABGR_8; break;
+ case BM_xBGRQUADS: ret = TYPE_ARGB_8; break;
+ case BM_KYMCQUADS: ret = TYPE_CMYK_8; break;
default:
if (!quietfixme)
{
--
2.20.1
3
2
Implements IsNoCacheReponse based on IsNoStoreReponse implementation.
Signed-off-by: Pat Leamon <pleamonhp(a)yahoo.com.au>
---
dlls/mshtml/nsio.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c
index fc6602eddf4..33d26670e4c 100644
--- a/dlls/mshtml/nsio.c
+++ b/dlls/mshtml/nsio.c
@@ -1501,10 +1501,15 @@ static nsresult NSAPI nsChannel_IsNoStoreResponse(nsIHttpChannel *iface, cpp_boo
static nsresult NSAPI nsChannel_IsNoCacheResponse(nsIHttpChannel *iface, cpp_bool *_retval)
{
nsChannel *This = impl_from_nsIHttpChannel(iface);
+ http_header_t *header;
- FIXME("(%p)->(%p)\n", This, _retval);
+ static const WCHAR cache_controlW[] = {'C','a','c','h','e','-','C','o','n','t','r','o','l'};
- return NS_ERROR_NOT_IMPLEMENTED;
+ TRACE("(%p)->(%p)\n", This, _retval);
+
+ header = find_http_header(&This->response_headers, cache_controlW, ARRAY_SIZE(cache_controlW));
+ *_retval = header && !wcsicmp(header->data, L"no-cache");
+ return NS_OK;
}
static nsresult NSAPI nsChannel_IsPrivateResponse(nsIHttpChannel *iface, cpp_bool *_retval)
--
2.25.1
1
0
[PATCH] dlls/kernel32/tests/change.c, time.c: enable compilation with long types
by Eric Pouech 09 Mar '22
by Eric Pouech 09 Mar '22
09 Mar '22
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/kernel32/tests/change.c | 159 +++++++++++++++++++++---------------------
dlls/kernel32/tests/time.c | 139 ++++++++++++++++++-------------------
2 files changed, 150 insertions(+), 148 deletions(-)
diff --git a/dlls/kernel32/tests/change.c b/dlls/kernel32/tests/change.c
index c0fcf00ba68..97578fe68bd 100644
--- a/dlls/kernel32/tests/change.c
+++ b/dlls/kernel32/tests/change.c
@@ -18,6 +18,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#undef WINE_NO_LONG_TYPES /* temporary for migration */
/* TODO: - security attribute changes
* - compound filter and multiple notifications
@@ -51,7 +52,7 @@ static DWORD CALLBACK NotificationThread(LPVOID arg)
}
ret = FindCloseChangeNotification(change);
- ok( ret, "FindCloseChangeNotification error: %d\n",
+ ok( ret, "FindCloseChangeNotification error: %ld\n",
GetLastError());
ExitThread((DWORD)notified);
@@ -63,10 +64,10 @@ static HANDLE StartNotificationThread(LPCSTR path, BOOL subtree, DWORD flags)
DWORD threadId;
change = FindFirstChangeNotificationA(path, subtree, flags);
- ok(change != INVALID_HANDLE_VALUE, "FindFirstChangeNotification error: %d\n", GetLastError());
+ ok(change != INVALID_HANDLE_VALUE, "FindFirstChangeNotification error: %ld\n", GetLastError());
thread = CreateThread(NULL, 0, NotificationThread, change, 0, &threadId);
- ok(thread != NULL, "CreateThread error: %d\n", GetLastError());
+ ok(thread != NULL, "CreateThread error: %ld\n", GetLastError());
return thread;
}
@@ -76,7 +77,7 @@ static DWORD FinishNotificationThread(HANDLE thread)
DWORD status, exitcode;
status = WaitForSingleObject(thread, 5000);
- ok(status == WAIT_OBJECT_0, "WaitForSingleObject status %d error %d\n", status, GetLastError());
+ ok(status == WAIT_OBJECT_0, "WaitForSingleObject status %ld error %ld\n", status, GetLastError());
ok(GetExitCodeThread(thread, &exitcode), "Could not retrieve thread exit code\n");
CloseHandle(thread);
@@ -100,46 +101,46 @@ static void test_FindFirstChangeNotification(void)
change = FindFirstChangeNotificationA("not-a-file", FALSE, FILE_NOTIFY_CHANGE_FILE_NAME);
ok(change == INVALID_HANDLE_VALUE, "Expected INVALID_HANDLE_VALUE, got %p\n", change);
ok(GetLastError() == ERROR_FILE_NOT_FOUND,
- "FindFirstChangeNotification error: %d\n", GetLastError());
+ "FindFirstChangeNotification error: %ld\n", GetLastError());
change = FindFirstChangeNotificationA(NULL, FALSE, FILE_NOTIFY_CHANGE_FILE_NAME);
ok(change == INVALID_HANDLE_VALUE || broken(change == NULL) /* < win7 */,
"Expected INVALID_HANDLE_VALUE, got %p\n", change);
ok(GetLastError() == ERROR_PATH_NOT_FOUND,
- "FindFirstChangeNotification error: %u\n", GetLastError());
+ "FindFirstChangeNotification error: %lu\n", GetLastError());
ret = FindNextChangeNotification(NULL);
- ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "FindNextChangeNotification error: %d\n",
+ ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "FindNextChangeNotification error: %ld\n",
GetLastError());
ret = FindCloseChangeNotification(NULL);
- ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "FindCloseChangeNotification error: %d\n",
+ ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "FindCloseChangeNotification error: %ld\n",
GetLastError());
ret = GetTempPathA(MAX_PATH, dirname1);
- ok(ret, "GetTempPathA error: %d\n", GetLastError());
+ ok(ret, "GetTempPathA error: %ld\n", GetLastError());
ret = GetTempFileNameA(dirname1, "ffc", 0, workdir);
- ok(ret, "GetTempFileNameA error: %d\n", GetLastError());
+ ok(ret, "GetTempFileNameA error: %ld\n", GetLastError());
DeleteFileA( workdir );
ret = CreateDirectoryA(workdir, NULL);
- ok(ret, "CreateDirectoryA error: %d\n", GetLastError());
+ ok(ret, "CreateDirectoryA error: %ld\n", GetLastError());
ret = GetTempFileNameA(workdir, prefix, 0, filename1);
- ok(ret, "GetTempFileNameA error: %d\n", GetLastError());
+ ok(ret, "GetTempFileNameA error: %ld\n", GetLastError());
file = CreateFileA(filename1, GENERIC_WRITE|GENERIC_READ, 0, NULL, CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL, 0);
- ok(file != INVALID_HANDLE_VALUE, "CreateFileA error: %d\n", GetLastError());
+ ok(file != INVALID_HANDLE_VALUE, "CreateFileA error: %ld\n", GetLastError());
ret = CloseHandle(file);
- ok( ret, "CloseHandle error: %d\n", GetLastError());
+ ok( ret, "CloseHandle error: %ld\n", GetLastError());
/* Try to register notification for a file */
change = FindFirstChangeNotificationA(filename1, FALSE, FILE_NOTIFY_CHANGE_FILE_NAME);
ok(change == INVALID_HANDLE_VALUE, "Expected INVALID_HANDLE_VALUE, got %p\n", change);
ok(GetLastError() == ERROR_DIRECTORY,
- "FindFirstChangeNotification error: %d\n", GetLastError());
+ "FindFirstChangeNotification error: %ld\n", GetLastError());
lstrcpyA(dirname1, filename1);
lstrcatA(dirname1, "dir");
@@ -148,18 +149,18 @@ static void test_FindFirstChangeNotification(void)
lstrcatA(dirname2, "new");
ret = CreateDirectoryA(dirname1, NULL);
- ok(ret, "CreateDirectoryA error: %d\n", GetLastError());
+ ok(ret, "CreateDirectoryA error: %ld\n", GetLastError());
/* What if we move the directory we registered notification for? */
thread = StartNotificationThread(dirname1, FALSE, FILE_NOTIFY_CHANGE_DIR_NAME);
ret = MoveFileA(dirname1, dirname2);
- ok(ret, "MoveFileA error: %d\n", GetLastError());
+ ok(ret, "MoveFileA error: %ld\n", GetLastError());
ok(!FinishNotificationThread(thread), "Got notification\n");
/* What if we remove the directory we registered notification for? */
thread = StartNotificationThread(dirname2, FALSE, FILE_NOTIFY_CHANGE_DIR_NAME);
ret = RemoveDirectoryA(dirname2);
- ok(ret, "RemoveDirectoryA error: %d\n", GetLastError());
+ ok(ret, "RemoveDirectoryA error: %ld\n", GetLastError());
ret = FinishNotificationThread(thread);
todo_wine ok(ret, "Missed notification\n");
@@ -168,19 +169,19 @@ static void test_FindFirstChangeNotification(void)
/* Create a directory */
thread = StartNotificationThread(workdir, FALSE, FILE_NOTIFY_CHANGE_DIR_NAME);
ret = CreateDirectoryA(dirname1, NULL);
- ok(ret, "CreateDirectoryA error: %d\n", GetLastError());
+ ok(ret, "CreateDirectoryA error: %ld\n", GetLastError());
ok(FinishNotificationThread(thread), "Missed notification\n");
/* Rename a directory */
thread = StartNotificationThread(workdir, FALSE, FILE_NOTIFY_CHANGE_DIR_NAME);
ret = MoveFileA(dirname1, dirname2);
- ok(ret, "MoveFileA error: %d\n", GetLastError());
+ ok(ret, "MoveFileA error: %ld\n", GetLastError());
ok(FinishNotificationThread(thread), "Missed notification\n");
/* Delete a directory */
thread = StartNotificationThread(workdir, FALSE, FILE_NOTIFY_CHANGE_DIR_NAME);
ret = RemoveDirectoryA(dirname2);
- ok(ret, "RemoveDirectoryA error: %d\n", GetLastError());
+ ok(ret, "RemoveDirectoryA error: %ld\n", GetLastError());
ok(FinishNotificationThread(thread), "Missed notification\n");
lstrcpyA(filename2, filename1);
@@ -189,64 +190,64 @@ static void test_FindFirstChangeNotification(void)
/* Rename a file */
thread = StartNotificationThread(workdir, FALSE, FILE_NOTIFY_CHANGE_FILE_NAME);
ret = MoveFileA(filename1, filename2);
- ok(ret, "MoveFileA error: %d\n", GetLastError());
+ ok(ret, "MoveFileA error: %ld\n", GetLastError());
ok(FinishNotificationThread(thread), "Missed notification\n");
/* Delete a file */
thread = StartNotificationThread(workdir, FALSE, FILE_NOTIFY_CHANGE_FILE_NAME);
ret = DeleteFileA(filename2);
- ok(ret, "DeleteFileA error: %d\n", GetLastError());
+ ok(ret, "DeleteFileA error: %ld\n", GetLastError());
ok(FinishNotificationThread(thread), "Missed notification\n");
/* Create a file */
thread = StartNotificationThread(workdir, FALSE, FILE_NOTIFY_CHANGE_FILE_NAME);
file = CreateFileA(filename2, GENERIC_WRITE|GENERIC_READ, 0, NULL, CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL, 0);
- ok(file != INVALID_HANDLE_VALUE, "CreateFileA error: %d\n", GetLastError());
+ ok(file != INVALID_HANDLE_VALUE, "CreateFileA error: %ld\n", GetLastError());
ret = CloseHandle(file);
- ok( ret, "CloseHandle error: %d\n", GetLastError());
+ ok( ret, "CloseHandle error: %ld\n", GetLastError());
ok(FinishNotificationThread(thread), "Missed notification\n");
attributes = GetFileAttributesA(filename2);
- ok(attributes != INVALID_FILE_ATTRIBUTES, "GetFileAttributesA error: %d\n", GetLastError());
+ ok(attributes != INVALID_FILE_ATTRIBUTES, "GetFileAttributesA error: %ld\n", GetLastError());
attributes &= FILE_ATTRIBUTE_READONLY;
/* Change file attributes */
thread = StartNotificationThread(workdir, FALSE, FILE_NOTIFY_CHANGE_ATTRIBUTES);
ret = SetFileAttributesA(filename2, attributes);
- ok(ret, "SetFileAttributesA error: %d\n", GetLastError());
+ ok(ret, "SetFileAttributesA error: %ld\n", GetLastError());
ok(FinishNotificationThread(thread), "Missed notification\n");
/* Change last write time by writing to a file */
thread = StartNotificationThread(workdir, FALSE, FILE_NOTIFY_CHANGE_LAST_WRITE);
file = CreateFileA(filename2, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL, 0);
- ok(file != INVALID_HANDLE_VALUE, "CreateFileA error: %d\n", GetLastError());
+ ok(file != INVALID_HANDLE_VALUE, "CreateFileA error: %ld\n", GetLastError());
memset(buffer, 0, sizeof(buffer));
ret = WriteFile(file, buffer, sizeof(buffer), &count, NULL);
- ok(ret && count == sizeof(buffer), "WriteFile error: %d\n", GetLastError());
+ ok(ret && count == sizeof(buffer), "WriteFile error: %ld\n", GetLastError());
ret = CloseHandle(file);
- ok( ret, "CloseHandle error: %d\n", GetLastError());
+ ok( ret, "CloseHandle error: %ld\n", GetLastError());
ok(FinishNotificationThread(thread), "Missed notification\n");
/* Change file size by truncating a file */
thread = StartNotificationThread(workdir, FALSE, FILE_NOTIFY_CHANGE_SIZE);
file = CreateFileA(filename2, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL, 0);
- ok(file != INVALID_HANDLE_VALUE, "CreateFileA error: %d\n", GetLastError());
+ ok(file != INVALID_HANDLE_VALUE, "CreateFileA error: %ld\n", GetLastError());
ret = WriteFile(file, buffer, sizeof(buffer) / 2, &count, NULL);
- ok(ret && count == sizeof(buffer) / 2, "WriteFileA error: %d\n", GetLastError());
+ ok(ret && count == sizeof(buffer) / 2, "WriteFileA error: %ld\n", GetLastError());
ret = CloseHandle(file);
- ok( ret, "CloseHandle error: %d\n", GetLastError());
+ ok( ret, "CloseHandle error: %ld\n", GetLastError());
ok(FinishNotificationThread(thread), "Missed notification\n");
/* clean up */
ret = DeleteFileA(filename2);
- ok(ret, "DeleteFileA error: %d\n", GetLastError());
+ ok(ret, "DeleteFileA error: %ld\n", GetLastError());
ret = RemoveDirectoryA(workdir);
- ok(ret, "RemoveDirectoryA error: %d\n", GetLastError());
+ ok(ret, "RemoveDirectoryA error: %ld\n", GetLastError());
}
/* this test concentrates more on the wait behaviour of the handle */
@@ -287,7 +288,7 @@ static void test_ffcn(void)
file = CreateFileW( filename, GENERIC_READ | GENERIC_WRITE, 0, NULL,
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0 );
- ok( file != INVALID_HANDLE_VALUE, "CreateFile error %u\n", GetLastError() );
+ ok( file != INVALID_HANDLE_VALUE, "CreateFile error %lu\n", GetLastError() );
CloseHandle(file);
r = WaitForSingleObject( handle, 0 );
@@ -364,20 +365,20 @@ static void test_ffcnMultipleThreads(void)
char tmp[MAX_PATH], path[MAX_PATH];
r = GetTempPathA(MAX_PATH, tmp);
- ok(r, "GetTempPathA error: %d\n", GetLastError());
+ ok(r, "GetTempPathA error: %ld\n", GetLastError());
r = GetTempFileNameA(tmp, "ffc", 0, path);
- ok(r, "GetTempFileNameA error: %d\n", GetLastError());
+ ok(r, "GetTempFileNameA error: %ld\n", GetLastError());
DeleteFileA( path );
r = CreateDirectoryA(path, NULL);
- ok(r, "CreateDirectoryA error: %d\n", GetLastError());
+ ok(r, "CreateDirectoryA error: %ld\n", GetLastError());
filter = FILE_NOTIFY_CHANGE_FILE_NAME;
filter |= FILE_NOTIFY_CHANGE_DIR_NAME;
handles[0] = FindFirstChangeNotificationA(path, FALSE, filter);
- ok(handles[0] != INVALID_HANDLE_VALUE, "FindFirstChangeNotification error: %d\n", GetLastError());
+ ok(handles[0] != INVALID_HANDLE_VALUE, "FindFirstChangeNotification error: %ld\n", GetLastError());
/* Test behavior if a waiting thread holds the last reference to a change
* directory object with an empty wine user APC queue for this thread (bug #7286) */
@@ -385,10 +386,10 @@ static void test_ffcnMultipleThreads(void)
/* Create our notification thread */
handles[1] = CreateThread(NULL, 0, NotificationThread, handles[0], 0,
&threadId);
- ok(handles[1] != NULL, "CreateThread error: %d\n", GetLastError());
+ ok(handles[1] != NULL, "CreateThread error: %ld\n", GetLastError());
status = WaitForMultipleObjects(2, handles, FALSE, 5000);
- ok(status == WAIT_OBJECT_0 || status == WAIT_OBJECT_0+1, "WaitForMultipleObjects status %d error %d\n", status, GetLastError());
+ ok(status == WAIT_OBJECT_0 || status == WAIT_OBJECT_0+1, "WaitForMultipleObjects status %ld error %ld\n", status, GetLastError());
ok(GetExitCodeThread(handles[1], &exitcode), "Could not retrieve thread exit code\n");
/* Clean up */
@@ -614,18 +615,18 @@ static void test_readdirectorychanges(void)
/* we may get a notification for the parent dir too */
if (pfni->Action == FILE_ACTION_MODIFIED && pfni->NextEntryOffset)
{
- ok( pfni->FileNameLength == 3*sizeof(WCHAR), "len wrong %u\n", pfni->FileNameLength );
+ ok( pfni->FileNameLength == 3*sizeof(WCHAR), "len wrong %lu\n", pfni->FileNameLength );
ok( !memcmp(pfni->FileName,&szGa[1],3*sizeof(WCHAR)), "name wrong\n" );
pfni = (PFILE_NOTIFY_INFORMATION)((char *)pfni + pfni->NextEntryOffset);
}
- ok( pfni->NextEntryOffset == 0, "offset wrong %u\n", pfni->NextEntryOffset );
- ok( pfni->Action == FILE_ACTION_REMOVED, "action wrong %u\n", pfni->Action );
- ok( pfni->FileNameLength == 6*sizeof(WCHAR), "len wrong %u\n", pfni->FileNameLength );
+ ok( pfni->NextEntryOffset == 0, "offset wrong %lu\n", pfni->NextEntryOffset );
+ ok( pfni->Action == FILE_ACTION_REMOVED, "action wrong %lu\n", pfni->Action );
+ ok( pfni->FileNameLength == 6*sizeof(WCHAR), "len wrong %lu\n", pfni->FileNameLength );
ok( !memcmp(pfni->FileName,&szGa[1],6*sizeof(WCHAR)), "name wrong\n" );
ok( (NTSTATUS)ov.Internal == STATUS_SUCCESS, "ov.Internal wrong\n");
dwCount = (char *)&pfni->FileName[pfni->FileNameLength/sizeof(WCHAR)] - buffer;
- ok( ov.InternalHigh == dwCount, "ov.InternalHigh wrong %lu/%u\n",ov.InternalHigh, dwCount );
+ ok( ov.InternalHigh == dwCount, "ov.InternalHigh wrong %Iu/%lu\n",ov.InternalHigh, dwCount );
CloseHandle(hdir);
@@ -799,7 +800,7 @@ static void test_readdirectorychanges_filedir(void)
static void CALLBACK readdirectorychanges_cr(DWORD error, DWORD len, LPOVERLAPPED ov)
{
- ok(error == 0, "ReadDirectoryChangesW error %d\n", error);
+ ok(error == 0, "ReadDirectoryChangesW error %ld\n", error);
ok(ov->hEvent == (void*)0xdeadbeef, "hEvent should not have changed\n");
}
@@ -853,9 +854,9 @@ static void test_readdirectorychanges_cr(void)
r = SleepEx(1000, TRUE);
ok(r != 0, "failed to receive file creation event\n");
ok(fni->NextEntryOffset == 0, "there should be no more events in buffer\n");
- ok(fni->Action == FILE_ACTION_ADDED, "Action = %d\n", fni->Action);
+ ok(fni->Action == FILE_ACTION_ADDED, "Action = %ld\n", fni->Action);
ok(fni->FileNameLength == lstrlenW(szFile)*sizeof(WCHAR),
- "FileNameLength = %d\n", fni->FileNameLength);
+ "FileNameLength = %ld\n", fni->FileNameLength);
ok(!memcmp(fni->FileName, szFile, lstrlenW(szFile)*sizeof(WCHAR)),
"FileName = %s\n", wine_dbgstr_wn(fni->FileName, fni->FileNameLength/sizeof(WCHAR)));
@@ -873,9 +874,9 @@ static void test_readdirectorychanges_cr(void)
r = SleepEx(1000, TRUE);
ok(r != 0, "failed to receive file move event\n");
ok(fni->NextEntryOffset == 0, "there should be no more events in buffer\n");
- ok(fni->Action == FILE_ACTION_REMOVED, "Action = %d\n", fni->Action);
+ ok(fni->Action == FILE_ACTION_REMOVED, "Action = %ld\n", fni->Action);
ok(fni->FileNameLength == lstrlenW(szFile)*sizeof(WCHAR),
- "FileNameLength = %d\n", fni->FileNameLength);
+ "FileNameLength = %ld\n", fni->FileNameLength);
ok(!memcmp(fni->FileName, szFile, lstrlenW(szFile)*sizeof(WCHAR)),
"FileName = %s\n", wine_dbgstr_wn(fni->FileName, fni->FileNameLength/sizeof(WCHAR)));
@@ -889,9 +890,9 @@ static void test_readdirectorychanges_cr(void)
r = SleepEx(1000, TRUE);
ok(r != 0, "failed to receive file move event\n");
ok(fni->NextEntryOffset == 0, "there should be no more events in buffer\n");
- ok(fni->Action == FILE_ACTION_ADDED, "Action = %d\n", fni->Action);
+ ok(fni->Action == FILE_ACTION_ADDED, "Action = %ld\n", fni->Action);
ok(fni->FileNameLength == lstrlenW(szFile)*sizeof(WCHAR),
- "FileNameLength = %d\n", fni->FileNameLength);
+ "FileNameLength = %ld\n", fni->FileNameLength);
ok(!memcmp(fni->FileName, szFile, lstrlenW(szFile)*sizeof(WCHAR)),
"FileName = %s\n", wine_dbgstr_wn(fni->FileName, fni->FileNameLength/sizeof(WCHAR)));
@@ -905,9 +906,9 @@ static void test_readdirectorychanges_cr(void)
r = SleepEx(1000, TRUE);
ok(r != 0, "failed to receive file removal event\n");
ok(fni->NextEntryOffset == 0, "there should be no more events in buffer\n");
- ok(fni->Action == FILE_ACTION_REMOVED, "Action = %d\n", fni->Action);
+ ok(fni->Action == FILE_ACTION_REMOVED, "Action = %ld\n", fni->Action);
ok(fni->FileNameLength == lstrlenW(szFile)*sizeof(WCHAR),
- "FileNameLength = %d\n", fni->FileNameLength);
+ "FileNameLength = %ld\n", fni->FileNameLength);
ok(!memcmp(fni->FileName, szFile, lstrlenW(szFile)*sizeof(WCHAR)),
"FileName = %s\n", wine_dbgstr_wn(fni->FileName, fni->FileNameLength/sizeof(WCHAR)));
@@ -929,17 +930,17 @@ static void test_readdirectorychanges_cr(void)
ok(r != 0, "failed to receive directory move event\n");
if (fni->Action == FILE_ACTION_RENAMED_OLD_NAME)
{
- ok(fni->Action == FILE_ACTION_RENAMED_OLD_NAME, "Action = %d\n", fni->Action);
+ ok(fni->Action == FILE_ACTION_RENAMED_OLD_NAME, "Action = %ld\n", fni->Action);
ok(fni->FileNameLength == lstrlenW(szDir)*sizeof(WCHAR),
- "FileNameLength = %d\n", fni->FileNameLength);
+ "FileNameLength = %ld\n", fni->FileNameLength);
ok(!memcmp(fni->FileName, szDir, lstrlenW(szDir)*sizeof(WCHAR)),
"FileName = %s\n", wine_dbgstr_wn(fni->FileName, fni->FileNameLength/sizeof(WCHAR)));
ok(fni->NextEntryOffset != 0, "no next entry in movement event\n");
fni_next = (FILE_NOTIFY_INFORMATION*)((char*)fni+fni->NextEntryOffset);
ok(fni_next->NextEntryOffset == 0, "there should be no more events in buffer\n");
- ok(fni_next->Action == FILE_ACTION_RENAMED_NEW_NAME, "Action = %d\n", fni_next->Action);
+ ok(fni_next->Action == FILE_ACTION_RENAMED_NEW_NAME, "Action = %ld\n", fni_next->Action);
ok(fni_next->FileNameLength == lstrlenW(szFile)*sizeof(WCHAR),
- "FileNameLength = %d\n", fni_next->FileNameLength);
+ "FileNameLength = %ld\n", fni_next->FileNameLength);
ok(!memcmp(fni_next->FileName, szFile, lstrlenW(szFile)*sizeof(WCHAR)),
"FileName = %s\n", wine_dbgstr_wn(fni_next->FileName, fni_next->FileNameLength/sizeof(WCHAR)));
}
@@ -970,9 +971,9 @@ static void test_readdirectorychanges_cr(void)
r = SleepEx(1000, TRUE);
ok(r != 0, "failed to receive directory creation event\n");
- ok(fni->Action == FILE_ACTION_ADDED, "Action = %d\n", fni->Action);
+ ok(fni->Action == FILE_ACTION_ADDED, "Action = %ld\n", fni->Action);
ok(fni->FileNameLength == lstrlenW(szDir)*sizeof(WCHAR),
- "FileNameLength = %d\n", fni->FileNameLength);
+ "FileNameLength = %ld\n", fni->FileNameLength);
ok(!memcmp(fni->FileName, szDir, lstrlenW(szDir)*sizeof(WCHAR)),
"FileName = %s\n", wine_dbgstr_wn(fni->FileName, fni->FileNameLength/sizeof(WCHAR)));
if (fni->NextEntryOffset)
@@ -988,9 +989,9 @@ static void test_readdirectorychanges_cr(void)
fni_next = fni;
}
ok(fni_next->NextEntryOffset == 0, "there should be no more events in buffer\n");
- ok(fni_next->Action == FILE_ACTION_REMOVED, "Action = %d\n", fni_next->Action);
+ ok(fni_next->Action == FILE_ACTION_REMOVED, "Action = %ld\n", fni_next->Action);
ok(fni_next->FileNameLength == lstrlenW(szDir)*sizeof(WCHAR),
- "FileNameLength = %d\n", fni_next->FileNameLength);
+ "FileNameLength = %ld\n", fni_next->FileNameLength);
ok(!memcmp(fni_next->FileName, szDir, lstrlenW(szDir)*sizeof(WCHAR)),
"FileName = %s\n", wine_dbgstr_wn(fni_next->FileName, fni_next->FileNameLength/sizeof(WCHAR)));
@@ -1010,21 +1011,21 @@ static void test_ffcn_directory_overlap(void)
/* Setup directory hierarchy */
ret = GetTempPathA(MAX_PATH, workdir);
ok((ret > 0) && (ret <= MAX_PATH),
- "GetTempPathA error: %d\n", GetLastError());
+ "GetTempPathA error: %ld\n", GetLastError());
ret = GetTempFileNameA(workdir, "fcn", 0, tempfile);
- ok(ret, "GetTempFileNameA error: %d\n", GetLastError());
+ ok(ret, "GetTempFileNameA error: %ld\n", GetLastError());
ret = DeleteFileA(tempfile);
- ok(ret, "DeleteFileA error: %d\n", GetLastError());
+ ok(ret, "DeleteFileA error: %ld\n", GetLastError());
lstrcpyA(parentdir, tempfile);
ret = CreateDirectoryA(parentdir, NULL);
- ok(ret, "CreateDirectoryA error: %d\n", GetLastError());
+ ok(ret, "CreateDirectoryA error: %ld\n", GetLastError());
lstrcpyA(childdir, parentdir);
lstrcatA(childdir, "\\c");
ret = CreateDirectoryA(childdir, NULL);
- ok(ret, "CreateDirectoryA error: %d\n", GetLastError());
+ ok(ret, "CreateDirectoryA error: %ld\n", GetLastError());
/* When recursively watching overlapping directories, changes in child
@@ -1036,7 +1037,7 @@ static void test_ffcn_directory_overlap(void)
/* Create a file in child */
ret = GetTempFileNameA(childdir, "fcn", 0, tempfile);
- ok(ret, "GetTempFileNameA error: %d\n", GetLastError());
+ ok(ret, "GetTempFileNameA error: %ld\n", GetLastError());
/* Both watches should trigger */
ret = FinishNotificationThread(parent_thread);
@@ -1045,7 +1046,7 @@ static void test_ffcn_directory_overlap(void)
ok(ret, "Missed child notification\n");
ret = DeleteFileA(tempfile);
- ok(ret, "DeleteFileA error: %d\n", GetLastError());
+ ok(ret, "DeleteFileA error: %ld\n", GetLastError());
/* Removing a recursive parent watch should not affect child watches. Doing
@@ -1053,22 +1054,22 @@ static void test_ffcn_directory_overlap(void)
parent_watch = FindFirstChangeNotificationA(parentdir, TRUE,
FILE_NOTIFY_CHANGE_FILE_NAME);
ok(parent_watch != INVALID_HANDLE_VALUE,
- "FindFirstChangeNotification error: %d\n", GetLastError());
+ "FindFirstChangeNotification error: %ld\n", GetLastError());
child_watch = FindFirstChangeNotificationA(childdir, TRUE,
FILE_NOTIFY_CHANGE_FILE_NAME);
ok(child_watch != INVALID_HANDLE_VALUE,
- "FindFirstChangeNotification error: %d\n", GetLastError());
+ "FindFirstChangeNotification error: %ld\n", GetLastError());
ret = FindCloseChangeNotification(parent_watch);
- ok(ret, "FindCloseChangeNotification error: %d\n", GetLastError());
+ ok(ret, "FindCloseChangeNotification error: %ld\n", GetLastError());
child_thread = CreateThread(NULL, 0, NotificationThread, child_watch, 0,
&threadId);
- ok(child_thread != NULL, "CreateThread error: %d\n", GetLastError());
+ ok(child_thread != NULL, "CreateThread error: %ld\n", GetLastError());
/* Create a file in child */
ret = GetTempFileNameA(childdir, "fcn", 0, tempfile);
- ok(ret, "GetTempFileNameA error: %d\n", GetLastError());
+ ok(ret, "GetTempFileNameA error: %ld\n", GetLastError());
/* Child watch should trigger */
ret = FinishNotificationThread(child_thread);
@@ -1076,13 +1077,13 @@ static void test_ffcn_directory_overlap(void)
/* clean up */
ret = DeleteFileA(tempfile);
- ok(ret, "DeleteFileA error: %d\n", GetLastError());
+ ok(ret, "DeleteFileA error: %ld\n", GetLastError());
ret = RemoveDirectoryA(childdir);
- ok(ret, "RemoveDirectoryA error: %d\n", GetLastError());
+ ok(ret, "RemoveDirectoryA error: %ld\n", GetLastError());
ret = RemoveDirectoryA(parentdir);
- ok(ret, "RemoveDirectoryA error: %d\n", GetLastError());
+ ok(ret, "RemoveDirectoryA error: %ld\n", GetLastError());
}
START_TEST(change)
diff --git a/dlls/kernel32/tests/time.c b/dlls/kernel32/tests/time.c
index 0ae272311bb..147413402e5 100644
--- a/dlls/kernel32/tests/time.c
+++ b/dlls/kernel32/tests/time.c
@@ -18,6 +18,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#undef WINE_NO_LONG_TYPES /* temporary for migration */
#include "wine/test.h"
#include "winbase.h"
@@ -122,14 +123,14 @@ static void test_conversions(void)
SETUP_ZEROTIME(st)
ok (SystemTimeToFileTime(&st, &ft), "Conversion failed ZERO_TIME\n");
ok( (!((ft.dwHighDateTime != 0) || (ft.dwLowDateTime != 0))),
- "Wrong time for ATIME: %08x %08x (correct %08x %08x)\n",
+ "Wrong time for ATIME: %08lx %08lx (correct %08x %08x)\n",
ft.dwLowDateTime, ft.dwHighDateTime, 0, 0);
SETUP_ATIME(st)
ok (SystemTimeToFileTime(&st,&ft), "Conversion Failed ATIME\n");
ok( (!((ft.dwHighDateTime != ATIME_HI) || (ft.dwLowDateTime!=ATIME_LOW))),
- "Wrong time for ATIME: %08x %08x (correct %08x %08x)\n",
+ "Wrong time for ATIME: %08lx %08lx (correct %08x %08x)\n",
ft.dwLowDateTime, ft.dwHighDateTime, ATIME_LOW, ATIME_HI);
@@ -138,7 +139,7 @@ static void test_conversions(void)
ok( (!((ft.dwHighDateTime != MAYDAY_2002_HI) ||
(ft.dwLowDateTime!=MAYDAY_2002_LO))),
- "Wrong time for 2002 %08x %08x (correct %08x %08x)\n", ft.dwLowDateTime,
+ "Wrong time for 2002 %08lx %08lx (correct %08x %08x)\n", ft.dwLowDateTime,
ft.dwHighDateTime, MAYDAY_2002_LO, MAYDAY_2002_HI);
@@ -147,7 +148,7 @@ static void test_conversions(void)
ok( (!((ft.dwHighDateTime!=NEWYEAR_1980_HI) ||
(ft.dwLowDateTime!=NEWYEAR_1980_LO))) ,
- "Wrong time for 1980 %08x %08x (correct %08x %08x)\n", ft.dwLowDateTime,
+ "Wrong time for 1980 %08lx %08lx (correct %08x %08x)\n", ft.dwLowDateTime,
ft.dwHighDateTime, NEWYEAR_1980_LO,NEWYEAR_1980_HI );
ok(DosDateTimeToFileTime(DOS_DATE(1980,1,1),DOS_TIME(0,0,0),&ft),
@@ -155,7 +156,7 @@ static void test_conversions(void)
ok( (!((ft.dwHighDateTime!=NEWYEAR_1980_HI) ||
(ft.dwLowDateTime!=NEWYEAR_1980_LO))),
- "Wrong time DosDateTimeToFileTime %08x %08x (correct %08x %08x)\n",
+ "Wrong time DosDateTimeToFileTime %08lx %08lx (correct %08x %08x)\n",
ft.dwHighDateTime, ft.dwLowDateTime, NEWYEAR_1980_HI, NEWYEAR_1980_LO);
}
@@ -173,7 +174,7 @@ static void test_invalid_arg(void)
"DosDateTimeToFileTime() failed\n");
ok( (ft.dwHighDateTime==NEWYEAR_1980_HI) && (ft.dwLowDateTime==NEWYEAR_1980_LO),
- "filetime for 1/1/80 00:00:00 was %08x %08x\n", ft.dwHighDateTime, ft.dwLowDateTime);
+ "filetime for 1/1/80 00:00:00 was %08lx %08lx\n", ft.dwHighDateTime, ft.dwLowDateTime);
/* now check SystemTimeToFileTime */
memset(&ft,0,sizeof ft);
@@ -206,7 +207,7 @@ static LONGLONG system_time_to_minutes(const SYSTEMTIME *st)
SetLastError(0xdeadbeef);
ret = SystemTimeToFileTime(st, &ft);
- ok(ret, "SystemTimeToFileTime error %u\n", GetLastError());
+ ok(ret, "SystemTimeToFileTime error %lu\n", GetLastError());
minutes = ((LONGLONG)ft.dwHighDateTime << 32) + ft.dwLowDateTime;
minutes /= (LONGLONG)600000000; /* convert to minutes */
@@ -226,7 +227,7 @@ static LONG get_tz_bias(const TIME_ZONE_INFORMATION *tzinfo, DWORD tz_id)
return tzinfo->StandardBias;
default:
- trace("unknown time zone id %d\n", tz_id);
+ trace("unknown time zone id %ld\n", tz_id);
/* fall through */
case TIME_ZONE_ID_UNKNOWN:
return 0;
@@ -249,19 +250,19 @@ static void test_GetTimeZoneInformation(void)
SetLastError(0xdeadbeef);
res = SystemTimeToFileTime(&st, &s_ft);
- ok(res, "SystemTimeToFileTime error %u\n", GetLastError());
+ ok(res, "SystemTimeToFileTime error %lu\n", GetLastError());
SetLastError(0xdeadbeef);
res = FileTimeToLocalFileTime(&s_ft, &l_ft);
- ok(res, "FileTimeToLocalFileTime error %u\n", GetLastError());
+ ok(res, "FileTimeToLocalFileTime error %lu\n", GetLastError());
SetLastError(0xdeadbeef);
res = FileTimeToSystemTime(&l_ft, &local);
- ok(res, "FileTimeToSystemTime error %u\n", GetLastError());
+ ok(res, "FileTimeToSystemTime error %lu\n", GetLastError());
l_time = system_time_to_minutes(&local);
tz_id = GetTimeZoneInformation(&tzinfo);
ok(tz_id != TIME_ZONE_ID_INVALID, "GetTimeZoneInformation failed\n");
- trace("tz_id %u (%s)\n", tz_id,
+ trace("tz_id %lu (%s)\n", tz_id,
tz_id == TIME_ZONE_ID_DAYLIGHT ? "TIME_ZONE_ID_DAYLIGHT" :
(tz_id == TIME_ZONE_ID_STANDARD ? "TIME_ZONE_ID_STANDARD" :
(tz_id == TIME_ZONE_ID_UNKNOWN ? "TIME_ZONE_ID_UNKNOWN" :
@@ -269,14 +270,14 @@ static void test_GetTimeZoneInformation(void)
WideCharToMultiByte(CP_ACP, 0, tzinfo.StandardName, -1, std_name, sizeof(std_name), NULL, NULL);
WideCharToMultiByte(CP_ACP, 0, tzinfo.DaylightName, -1, dlt_name, sizeof(dlt_name), NULL, NULL);
- trace("bias %d, %s - %s\n", tzinfo.Bias, std_name, dlt_name);
- trace("standard (d/m/y): %u/%02u/%04u day of week %u %u:%02u:%02u.%03u bias %d\n",
+ trace("bias %ld, %s - %s\n", tzinfo.Bias, std_name, dlt_name);
+ trace("standard (d/m/y): %u/%02u/%04u day of week %u %u:%02u:%02u.%03u bias %ld\n",
tzinfo.StandardDate.wDay, tzinfo.StandardDate.wMonth,
tzinfo.StandardDate.wYear, tzinfo.StandardDate.wDayOfWeek,
tzinfo.StandardDate.wHour, tzinfo.StandardDate.wMinute,
tzinfo.StandardDate.wSecond, tzinfo.StandardDate.wMilliseconds,
tzinfo.StandardBias);
- trace("daylight (d/m/y): %u/%02u/%04u day of week %u %u:%02u:%02u.%03u bias %d\n",
+ trace("daylight (d/m/y): %u/%02u/%04u day of week %u %u:%02u:%02u.%03u bias %ld\n",
tzinfo.DaylightDate.wDay, tzinfo.DaylightDate.wMonth,
tzinfo.DaylightDate.wYear, tzinfo.DaylightDate.wDayOfWeek,
tzinfo.DaylightDate.wHour, tzinfo.DaylightDate.wMinute,
@@ -285,7 +286,7 @@ static void test_GetTimeZoneInformation(void)
diff = (LONG)(s_time - l_time);
ok(diff == tzinfo.Bias + get_tz_bias(&tzinfo, tz_id),
- "system/local diff %d != tz bias %d\n",
+ "system/local diff %ld != tz bias %ld\n",
diff, tzinfo.Bias + get_tz_bias(&tzinfo, tz_id));
ok(SetEnvironmentVariableA("TZ","GMT0") != 0,
@@ -317,16 +318,16 @@ static void test_GetTimeZoneInformation(void)
return;
}
- ok(res, "SystemTimeToTzSpecificLocalTime error %u\n", GetLastError());
+ ok(res, "SystemTimeToTzSpecificLocalTime error %lu\n", GetLastError());
s_time = system_time_to_minutes(¤t);
tzinfo.StandardBias -= 123;
tzinfo.DaylightBias += 456;
res = pSystemTimeToTzSpecificLocalTime(&tzinfo, &utc, &local);
- ok(res, "SystemTimeToTzSpecificLocalTime error %u\n", GetLastError());
+ ok(res, "SystemTimeToTzSpecificLocalTime error %lu\n", GetLastError());
l_time = system_time_to_minutes(&local);
- ok(l_time - s_time == diff - get_tz_bias(&tzinfo, tz_id), "got %d, expected %d\n",
+ ok(l_time - s_time == diff - get_tz_bias(&tzinfo, tz_id), "got %ld, expected %ld\n",
(LONG)(l_time - s_time), diff - get_tz_bias(&tzinfo, tz_id));
/* pretend that there is no transition dates */
@@ -338,9 +339,9 @@ static void test_GetTimeZoneInformation(void)
tzinfo.StandardDate.wYear = 0;
res = pSystemTimeToTzSpecificLocalTime(&tzinfo, &utc, &local);
- ok(res, "SystemTimeToTzSpecificLocalTime error %u\n", GetLastError());
+ ok(res, "SystemTimeToTzSpecificLocalTime error %lu\n", GetLastError());
l_time = system_time_to_minutes(&local);
- ok(l_time - s_time == diff, "got %d, expected %d\n",
+ ok(l_time - s_time == diff, "got %ld, expected %ld\n",
(LONG)(l_time - s_time), diff);
/* test 23:01, 31st of December date */
@@ -361,7 +362,7 @@ static void test_GetTimeZoneInformation(void)
utc.wHour = 23;
utc.wMinute = 1;
res = pSystemTimeToTzSpecificLocalTime(&tzinfo, &utc, &local);
- ok(res, "SystemTimeToTzSpecificLocalTime error %u\n", GetLastError());
+ ok(res, "SystemTimeToTzSpecificLocalTime error %lu\n", GetLastError());
ok(local.wYear==2012 && local.wMonth==12 && local.wDay==31 && local.wHour==23 && local.wMinute==1,
"got (%d-%d-%d %02d:%02d), expected (2012-12-31 23:01)\n",
local.wYear, local.wMonth, local.wDay, local.wHour, local.wMinute);
@@ -378,7 +379,7 @@ static void test_FileTimeToSystemTime(void)
ft.dwLowDateTime = 0;
ret = FileTimeToSystemTime(&ft, &st);
ok( ret,
- "FileTimeToSystemTime() failed with Error %d\n",GetLastError());
+ "FileTimeToSystemTime() failed with Error %ld\n",GetLastError());
ok(((st.wYear == 1601) && (st.wMonth == 1) && (st.wDay == 1) &&
(st.wHour == 0) && (st.wMinute == 0) && (st.wSecond == 0) &&
(st.wMilliseconds == 0)),
@@ -388,7 +389,7 @@ static void test_FileTimeToSystemTime(void)
ft.dwLowDateTime = (UINT)time;
ret = FileTimeToSystemTime(&ft, &st);
ok( ret,
- "FileTimeToSystemTime() failed with Error %d\n",GetLastError());
+ "FileTimeToSystemTime() failed with Error %ld\n",GetLastError());
ok(((st.wYear == 1970) && (st.wMonth == 1) && (st.wDay == 1) &&
(st.wHour == 0) && (st.wMinute == 0) && (st.wSecond == 1) &&
(st.wMilliseconds == 0)),
@@ -415,7 +416,7 @@ static void test_FileTimeToLocalFileTime(void)
ft.dwLowDateTime = (UINT)time;
ret = FileTimeToLocalFileTime(&ft, &lft);
ok( ret,
- "FileTimeToLocalFileTime() failed with Error %d\n",GetLastError());
+ "FileTimeToLocalFileTime() failed with Error %ld\n",GetLastError());
FileTimeToSystemTime(&lft, &st);
ok(((st.wYear == 1970) && (st.wMonth == 1) && (st.wDay == 1) &&
(st.wHour == 0) && (st.wMinute == 0) && (st.wSecond == 1) &&
@@ -429,7 +430,7 @@ static void test_FileTimeToLocalFileTime(void)
ok(res != TIME_ZONE_ID_INVALID, "GetTimeZoneInformation failed\n");
ret = FileTimeToLocalFileTime(&ft, &lft);
ok( ret,
- "FileTimeToLocalFileTime() failed with Error %d\n",GetLastError());
+ "FileTimeToLocalFileTime() failed with Error %ld\n",GetLastError());
FileTimeToSystemTime(&lft, &st);
ok(((st.wYear == 1970) && (st.wMonth == 1) && (st.wDay == 1) &&
(st.wHour == 0) && (st.wMinute == 0) && (st.wSecond == 1) &&
@@ -647,25 +648,25 @@ static void test_FileTimeToDosDateTime(void)
ret = FileTimeToDosDateTime(&ft, NULL, NULL);
ok(!ret, "expected failure\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef);
ret = FileTimeToDosDateTime(&ft, &fatdate, NULL);
ok(!ret, "expected failure\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef);
ret = FileTimeToDosDateTime(&ft, NULL, &fattime);
ok(!ret, "expected failure\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef);
ret = FileTimeToDosDateTime(&ft, &fatdate, &fattime);
ok(!ret, "expected failure\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
}
static void test_GetCalendarInfo(void)
@@ -683,57 +684,57 @@ static void test_GetCalendarInfo(void)
ret = pGetCalendarInfoA( 0x0409, CAL_GREGORIAN, CAL_ITWODIGITYEARMAX | CAL_RETURN_NUMBER,
NULL, 0, &val1 );
- ok( ret, "GetCalendarInfoA failed err %u\n", GetLastError() );
+ ok( ret, "GetCalendarInfoA failed err %lu\n", GetLastError() );
ok( ret == sizeof(val1), "wrong size %u\n", ret );
- ok( val1 >= 2000 && val1 < 2100, "wrong value %u\n", val1 );
+ ok( val1 >= 2000 && val1 < 2100, "wrong value %lu\n", val1 );
ret = pGetCalendarInfoW( 0x0409, CAL_GREGORIAN, CAL_ITWODIGITYEARMAX | CAL_RETURN_NUMBER,
NULL, 0, &val2 );
- ok( ret, "GetCalendarInfoW failed err %u\n", GetLastError() );
+ ok( ret, "GetCalendarInfoW failed err %lu\n", GetLastError() );
ok( ret == sizeof(val2)/sizeof(WCHAR), "wrong size %u\n", ret );
- ok( val1 == val2, "A/W mismatch %u/%u\n", val1, val2 );
+ ok( val1 == val2, "A/W mismatch %lu/%lu\n", val1, val2 );
ret = pGetCalendarInfoA( 0x0409, CAL_GREGORIAN, CAL_ITWODIGITYEARMAX, bufferA, sizeof(bufferA), NULL );
- ok( ret, "GetCalendarInfoA failed err %u\n", GetLastError() );
+ ok( ret, "GetCalendarInfoA failed err %lu\n", GetLastError() );
ok( ret == 5, "wrong size %u\n", ret );
- ok( atoi( bufferA ) == val1, "wrong value %s/%u\n", bufferA, val1 );
+ ok( atoi( bufferA ) == val1, "wrong value %s/%lu\n", bufferA, val1 );
ret = pGetCalendarInfoW( 0x0409, CAL_GREGORIAN, CAL_ITWODIGITYEARMAX, bufferW, ARRAY_SIZE(bufferW), NULL );
- ok( ret, "GetCalendarInfoW failed err %u\n", GetLastError() );
+ ok( ret, "GetCalendarInfoW failed err %lu\n", GetLastError() );
ok( ret == 5, "wrong size %u\n", ret );
memset( bufferA, 0x55, sizeof(bufferA) );
WideCharToMultiByte( CP_ACP, 0, bufferW, -1, bufferA, sizeof(bufferA), NULL, NULL );
- ok( atoi( bufferA ) == val1, "wrong value %s/%u\n", bufferA, val1 );
+ ok( atoi( bufferA ) == val1, "wrong value %s/%lu\n", bufferA, val1 );
ret = pGetCalendarInfoA( 0x0409, CAL_GREGORIAN, CAL_ITWODIGITYEARMAX | CAL_RETURN_NUMBER,
NULL, 0, NULL );
ok( !ret, "GetCalendarInfoA succeeded\n" );
- ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
ret = pGetCalendarInfoA( 0x0409, CAL_GREGORIAN, CAL_ITWODIGITYEARMAX, NULL, 0, NULL );
- ok( ret, "GetCalendarInfoA failed err %u\n", GetLastError() );
+ ok( ret, "GetCalendarInfoA failed err %lu\n", GetLastError() );
ok( ret == 5, "wrong size %u\n", ret );
ret = pGetCalendarInfoW( 0x0409, CAL_GREGORIAN, CAL_ITWODIGITYEARMAX | CAL_RETURN_NUMBER,
NULL, 0, NULL );
ok( !ret, "GetCalendarInfoW succeeded\n" );
- ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
ret = pGetCalendarInfoW( 0x0409, CAL_GREGORIAN, CAL_ITWODIGITYEARMAX, NULL, 0, NULL );
- ok( ret, "GetCalendarInfoW failed err %u\n", GetLastError() );
+ ok( ret, "GetCalendarInfoW failed err %lu\n", GetLastError() );
ok( ret == 5, "wrong size %u\n", ret );
ret = pGetCalendarInfoA( LANG_SYSTEM_DEFAULT, CAL_GREGORIAN, CAL_SDAYNAME1,
bufferA, sizeof(bufferA), NULL);
- ok( ret, "GetCalendarInfoA failed err %u\n", GetLastError() );
+ ok( ret, "GetCalendarInfoA failed err %lu\n", GetLastError() );
ret2 = pGetCalendarInfoA( LANG_SYSTEM_DEFAULT, CAL_GREGORIAN, CAL_SDAYNAME1,
bufferA, 0, NULL);
- ok( ret2, "GetCalendarInfoA failed err %u\n", GetLastError() );
+ ok( ret2, "GetCalendarInfoA failed err %lu\n", GetLastError() );
ok( ret == ret2, "got %d, expected %d\n", ret2, ret );
ret2 = pGetCalendarInfoW( LANG_SYSTEM_DEFAULT, CAL_GREGORIAN, CAL_SDAYNAME1,
bufferW, ARRAY_SIZE(bufferW), NULL);
- ok( ret2, "GetCalendarInfoW failed err %u\n", GetLastError() );
+ ok( ret2, "GetCalendarInfoW failed err %lu\n", GetLastError() );
ret2 = WideCharToMultiByte( CP_ACP, 0, bufferW, -1, NULL, 0, NULL, NULL );
ok( ret == ret2, "got %d, expected %d\n", ret, ret2 );
}
@@ -752,13 +753,13 @@ static void test_GetDynamicTimeZoneInformation(void)
ret = pGetDynamicTimeZoneInformation(&dyninfo);
ret2 = GetTimeZoneInformation(&tzinfo);
- ok(ret == ret2, "got %d, %d\n", ret, ret2);
+ ok(ret == ret2, "got %ld, %ld\n", ret, ret2);
- ok(dyninfo.Bias == tzinfo.Bias, "got %d, %d\n", dyninfo.Bias, tzinfo.Bias);
+ ok(dyninfo.Bias == tzinfo.Bias, "got %ld, %ld\n", dyninfo.Bias, tzinfo.Bias);
ok(!lstrcmpW(dyninfo.StandardName, tzinfo.StandardName), "got std name %s, %s\n",
wine_dbgstr_w(dyninfo.StandardName), wine_dbgstr_w(tzinfo.StandardName));
ok(!memcmp(&dyninfo.StandardDate, &tzinfo.StandardDate, sizeof(dyninfo.StandardDate)), "got different StandardDate\n");
- ok(dyninfo.StandardBias == tzinfo.StandardBias, "got %d, %d\n", dyninfo.StandardBias, tzinfo.StandardBias);
+ ok(dyninfo.StandardBias == tzinfo.StandardBias, "got %ld, %ld\n", dyninfo.StandardBias, tzinfo.StandardBias);
ok(!lstrcmpW(dyninfo.DaylightName, tzinfo.DaylightName), "got daylight name %s, %s\n",
wine_dbgstr_w(dyninfo.DaylightName), wine_dbgstr_w(tzinfo.DaylightName));
ok(!memcmp(&dyninfo.DaylightDate, &tzinfo.DaylightDate, sizeof(dyninfo.DaylightDate)), "got different DaylightDate\n");
@@ -856,7 +857,7 @@ static void test_GetSystemTimes(void)
ok( !NtQuerySystemInformation(SystemBasicInformation, &sbi, sizeof(sbi), &ReturnLength),
"NtQuerySystemInformation failed\n" );
- ok( sizeof(sbi) == ReturnLength, "Inconsistent length %d\n", ReturnLength );
+ ok( sizeof(sbi) == ReturnLength, "Inconsistent length %ld\n", ReturnLength );
/* Check if we have some return values */
trace( "Number of Processors : %d\n", sbi.NumberOfProcessors );
@@ -972,30 +973,30 @@ static void test_GetTimeZoneInformationForYear(void)
GetTimeZoneInformation(&local_tzinfo);
ret = pGetTimeZoneInformationForYear(systemtime.wYear, NULL, &tzinfo);
- ok(ret == TRUE, "GetTimeZoneInformationForYear failed, err %u\n", GetLastError());
- ok(tzinfo.Bias == local_tzinfo.Bias, "Expected Bias %d, got %d\n", local_tzinfo.Bias, tzinfo.Bias);
+ ok(ret == TRUE, "GetTimeZoneInformationForYear failed, err %lu\n", GetLastError());
+ ok(tzinfo.Bias == local_tzinfo.Bias, "Expected Bias %ld, got %ld\n", local_tzinfo.Bias, tzinfo.Bias);
ok(!lstrcmpW(tzinfo.StandardName, local_tzinfo.StandardName),
"Expected StandardName %s, got %s\n", wine_dbgstr_w(local_tzinfo.StandardName), wine_dbgstr_w(tzinfo.StandardName));
ok(!memcmp(&tzinfo.StandardDate, &local_tzinfo.StandardDate, sizeof(SYSTEMTIME)), "StandardDate does not match\n");
- ok(tzinfo.StandardBias == local_tzinfo.StandardBias, "Expected StandardBias %d, got %d\n", local_tzinfo.StandardBias, tzinfo.StandardBias);
+ ok(tzinfo.StandardBias == local_tzinfo.StandardBias, "Expected StandardBias %ld, got %ld\n", local_tzinfo.StandardBias, tzinfo.StandardBias);
ok(!lstrcmpW(tzinfo.DaylightName, local_tzinfo.DaylightName),
"Expected DaylightName %s, got %s\n", wine_dbgstr_w(local_tzinfo.DaylightName), wine_dbgstr_w(tzinfo.DaylightName));
ok(!memcmp(&tzinfo.DaylightDate, &local_tzinfo.DaylightDate, sizeof(SYSTEMTIME)), "DaylightDate does not match\n");
- ok(tzinfo.DaylightBias == local_tzinfo.DaylightBias, "Expected DaylightBias %d, got %d\n", local_tzinfo.DaylightBias, tzinfo.DaylightBias);
+ ok(tzinfo.DaylightBias == local_tzinfo.DaylightBias, "Expected DaylightBias %ld, got %ld\n", local_tzinfo.DaylightBias, tzinfo.DaylightBias);
pGetDynamicTimeZoneInformation(&dyn_tzinfo);
ret = pGetTimeZoneInformationForYear(systemtime.wYear, &dyn_tzinfo, &tzinfo);
- ok(ret == TRUE, "GetTimeZoneInformationForYear failed, err %u\n", GetLastError());
- ok(tzinfo.Bias == local_tzinfo.Bias, "Expected Bias %d, got %d\n", local_tzinfo.Bias, tzinfo.Bias);
+ ok(ret == TRUE, "GetTimeZoneInformationForYear failed, err %lu\n", GetLastError());
+ ok(tzinfo.Bias == local_tzinfo.Bias, "Expected Bias %ld, got %ld\n", local_tzinfo.Bias, tzinfo.Bias);
ok(!lstrcmpW(tzinfo.StandardName, local_tzinfo.StandardName),
"Expected StandardName %s, got %s\n", wine_dbgstr_w(local_tzinfo.StandardName), wine_dbgstr_w(tzinfo.StandardName));
ok(!memcmp(&tzinfo.StandardDate, &local_tzinfo.StandardDate, sizeof(SYSTEMTIME)), "StandardDate does not match\n");
- ok(tzinfo.StandardBias == local_tzinfo.StandardBias, "Expected StandardBias %d, got %d\n", local_tzinfo.StandardBias, tzinfo.StandardBias);
+ ok(tzinfo.StandardBias == local_tzinfo.StandardBias, "Expected StandardBias %ld, got %ld\n", local_tzinfo.StandardBias, tzinfo.StandardBias);
ok(!lstrcmpW(tzinfo.DaylightName, local_tzinfo.DaylightName),
"Expected DaylightName %s, got %s\n", wine_dbgstr_w(local_tzinfo.DaylightName), wine_dbgstr_w(tzinfo.DaylightName));
ok(!memcmp(&tzinfo.DaylightDate, &local_tzinfo.DaylightDate, sizeof(SYSTEMTIME)), "DaylightDate does not match\n");
- ok(tzinfo.DaylightBias == local_tzinfo.DaylightBias, "Expected DaylightBias %d, got %d\n", local_tzinfo.DaylightBias, tzinfo.DaylightBias);
+ ok(tzinfo.DaylightBias == local_tzinfo.DaylightBias, "Expected DaylightBias %ld, got %ld\n", local_tzinfo.DaylightBias, tzinfo.DaylightBias);
memset(&dyn_tzinfo, 0xaa, sizeof(dyn_tzinfo));
lstrcpyW(dyn_tzinfo.TimeZoneKeyName, L"Greenland Daylight Time");
@@ -1005,7 +1006,7 @@ static void test_GetTimeZoneInformationForYear(void)
broken_test = TRUE;
ok((ret == FALSE && GetLastError() == ERROR_FILE_NOT_FOUND) ||
broken(broken_test) /* vista,7 */,
- "GetTimeZoneInformationForYear err %u\n", GetLastError());
+ "GetTimeZoneInformationForYear err %lu\n", GetLastError());
memset(&dyn_tzinfo, 0xaa, sizeof(dyn_tzinfo));
lstrcpyW(dyn_tzinfo.TimeZoneKeyName, L"Altai Standard Time");
@@ -1014,7 +1015,7 @@ static void test_GetTimeZoneInformationForYear(void)
if (!ret && GetLastError() == ERROR_FILE_NOT_FOUND)
broken_test = TRUE;
ok(ret == TRUE || broken(broken_test) /* before 10 1809 */,
- "GetTimeZoneInformationForYear err %u\n", GetLastError());
+ "GetTimeZoneInformationForYear err %lu\n", GetLastError());
if (broken(broken_test))
{
@@ -1031,11 +1032,11 @@ static void test_GetTimeZoneInformationForYear(void)
ret = pGetTimeZoneInformationForYear(test_data[i].year, &dyn_tzinfo, &tzinfo);
todo_wine_if(test_data[i].tzinfo_todo)
- ok(ret == TRUE, "GetTimeZoneInformationForYear failed, err %u, for %s\n", GetLastError(), wine_dbgstr_w(test_data[i].tzname));
+ ok(ret == TRUE, "GetTimeZoneInformationForYear failed, err %lu, for %s\n", GetLastError(), wine_dbgstr_w(test_data[i].tzname));
if (!ret)
continue;
todo_wine_if(test_data[i].bias_todo)
- ok(tzinfo.Bias == test_data[i].bias, "Expected bias %d, got %d, for %s\n",
+ ok(tzinfo.Bias == test_data[i].bias, "Expected bias %ld, got %ld, for %s\n",
test_data[i].bias, tzinfo.Bias, wine_dbgstr_w(test_data[i].tzname));
todo_wine_if(test_data[i].std_month_todo)
ok(tzinfo.StandardDate.wMonth == test_data[i].std_month, "Expected standard month %d, got %d, for %s\n",
@@ -1045,7 +1046,7 @@ static void test_GetTimeZoneInformationForYear(void)
ok(std_day == test_data[i].std_day, "Expected standard day %d, got %d, for %s\n",
test_data[i].std_day, std_day, wine_dbgstr_w(test_data[i].tzname));
todo_wine_if(test_data[i].std_bias_todo)
- ok(tzinfo.StandardBias == test_data[i].std_bias, "Expected standard bias %d, got %d, for %s\n",
+ ok(tzinfo.StandardBias == test_data[i].std_bias, "Expected standard bias %ld, got %ld, for %s\n",
test_data[i].std_bias, tzinfo.StandardBias, wine_dbgstr_w(test_data[i].tzname));
todo_wine_if(test_data[i].dlt_month_todo)
ok(tzinfo.DaylightDate.wMonth == test_data[i].dlt_month, "Expected daylight month %d, got %d, for %s\n",
@@ -1055,7 +1056,7 @@ static void test_GetTimeZoneInformationForYear(void)
ok(dlt_day == test_data[i].dlt_day, "Expected daylight day %d, got %d, for %s\n",
test_data[i].dlt_day, dlt_day, wine_dbgstr_w(test_data[i].tzname));
todo_wine_if(test_data[i].dlt_bias_todo)
- ok(tzinfo.DaylightBias == test_data[i].dlt_bias, "Expected daylight bias %d, got %d, for %s\n",
+ ok(tzinfo.DaylightBias == test_data[i].dlt_bias, "Expected daylight bias %ld, got %ld, for %s\n",
test_data[i].dlt_bias, tzinfo.DaylightBias, wine_dbgstr_w(test_data[i].tzname));
if (i > 0 && test_data[i-1].tzname == test_data[i].tzname)
@@ -1090,8 +1091,8 @@ static void test_GetTickCount(void)
t3 = pNtGetTickCount();
} while(t3 < t1 && i++ < 1); /* allow for wrap, but only once */
- ok(t1 <= t2, "out of order %d %d\n", t1, t2);
- ok(t2 <= t3, "out of order %d %d\n", t2, t3);
+ ok(t1 <= t2, "out of order %ld %ld\n", t1, t2);
+ ok(t2 <= t3, "out of order %ld %ld\n", t2, t3);
}
BOOL (WINAPI *pQueryUnbiasedInterruptTime)(ULONGLONG *time);
@@ -1106,22 +1107,22 @@ static void test_QueryUnbiasedInterruptTime(void)
{
SetLastError( 0xdeadbeef );
ret = pQueryUnbiasedInterruptTime( &time );
- ok( ret, "QueryUnbiasedInterruptTime failed err %u\n", GetLastError() );
+ ok( ret, "QueryUnbiasedInterruptTime failed err %lu\n", GetLastError() );
SetLastError( 0xdeadbeef );
ret = pQueryUnbiasedInterruptTime( NULL );
ok( !ret, "QueryUnbiasedInterruptTime succeeded\n" );
- ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
}
else win_skip( "QueryUnbiasedInterruptTime not supported\n" );
if (pRtlQueryUnbiasedInterruptTime)
{
SetLastError( 0xdeadbeef );
ret = pRtlQueryUnbiasedInterruptTime( &time );
- ok( ret, "RtlQueryUnbiasedInterruptTime failed err %u\n", GetLastError() );
+ ok( ret, "RtlQueryUnbiasedInterruptTime failed err %lu\n", GetLastError() );
SetLastError( 0xdeadbeef );
ret = pRtlQueryUnbiasedInterruptTime( NULL );
ok( !ret, "RtlQueryUnbiasedInterruptTime succeeded\n" );
- ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() );
+ ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
}
else win_skip( "RtlQueryUnbiasedInterruptTime not supported\n" );
}
2
1
[PATCH 1/4] windows.gaming.input: Implement CreateGameController for RawGameController runtimeclass.
by Rémi Bernon 09 Mar '22
by Rémi Bernon 09 Mar '22
09 Mar '22
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
dlls/windows.gaming.input/controller.c | 242 ++++++++++++++++++++++++-
dlls/windows.gaming.input/manager.c | 36 +++-
dlls/windows.gaming.input/private.h | 34 ++--
3 files changed, 288 insertions(+), 24 deletions(-)
diff --git a/dlls/windows.gaming.input/controller.c b/dlls/windows.gaming.input/controller.c
index 94343c0927d..9b08528b01b 100644
--- a/dlls/windows.gaming.input/controller.c
+++ b/dlls/windows.gaming.input/controller.c
@@ -18,11 +18,237 @@
*/
#include "private.h"
+#include "provider.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(input);
+struct controller
+{
+ IGameControllerImpl IGameControllerImpl_iface;
+ IGameControllerInputSink IGameControllerInputSink_iface;
+ IRawGameController IRawGameController_iface;
+ IGameController *IGameController_outer;
+ LONG ref;
+
+ IGameControllerProvider *provider;
+};
+
+static inline struct controller *impl_from_IGameControllerImpl( IGameControllerImpl *iface )
+{
+ return CONTAINING_RECORD( iface, struct controller, IGameControllerImpl_iface );
+}
+
+static HRESULT WINAPI controller_QueryInterface( IGameControllerImpl *iface, REFIID iid, void **out )
+{
+ struct controller *impl = impl_from_IGameControllerImpl( iface );
+
+ TRACE( "iface %p, iid %s, out %p.\n", iface, debugstr_guid( iid ), out );
+
+ if (IsEqualGUID( iid, &IID_IUnknown ) ||
+ IsEqualGUID( iid, &IID_IInspectable ) ||
+ IsEqualGUID( iid, &IID_IGameControllerImpl ))
+ {
+ IInspectable_AddRef( (*out = &impl->IGameControllerImpl_iface) );
+ return S_OK;
+ }
+
+ if (IsEqualGUID( iid, &IID_IGameControllerInputSink ))
+ {
+ IInspectable_AddRef( (*out = &impl->IGameControllerInputSink_iface) );
+ return S_OK;
+ }
+
+ if (IsEqualGUID( iid, &IID_IRawGameController ))
+ {
+ IInspectable_AddRef( (*out = &impl->IRawGameController_iface) );
+ return S_OK;
+ }
+
+ WARN( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) );
+ *out = NULL;
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI controller_AddRef( IGameControllerImpl *iface )
+{
+ struct controller *impl = impl_from_IGameControllerImpl( iface );
+ ULONG ref = InterlockedIncrement( &impl->ref );
+ TRACE( "iface %p increasing refcount to %lu.\n", iface, ref );
+ return ref;
+}
+
+static ULONG WINAPI controller_Release( IGameControllerImpl *iface )
+{
+ struct controller *impl = impl_from_IGameControllerImpl( iface );
+ ULONG ref = InterlockedDecrement( &impl->ref );
+
+ TRACE( "iface %p decreasing refcount to %lu.\n", iface, ref );
+
+ if (!ref)
+ {
+ IGameControllerProvider_Release( impl->provider );
+ free( impl );
+ }
+
+ return ref;
+}
+
+static HRESULT WINAPI controller_GetIids( IGameControllerImpl *iface, ULONG *iid_count, IID **iids )
+{
+ FIXME( "iface %p, iid_count %p, iids %p stub!\n", iface, iid_count, iids );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI controller_GetRuntimeClassName( IGameControllerImpl *iface, HSTRING *class_name )
+{
+ return WindowsCreateString( RuntimeClass_Windows_Gaming_Input_RawGameController,
+ ARRAY_SIZE(RuntimeClass_Windows_Gaming_Input_RawGameController),
+ class_name );
+}
+
+static HRESULT WINAPI controller_GetTrustLevel( IGameControllerImpl *iface, TrustLevel *trust_level )
+{
+ FIXME( "iface %p, trust_level %p stub!\n", iface, trust_level );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI controller_Initialize( IGameControllerImpl *iface, IGameController *outer,
+ IGameControllerProvider *provider )
+{
+ struct controller *impl = impl_from_IGameControllerImpl( iface );
+
+ TRACE( "iface %p, outer %p, provider %p.\n", iface, outer, provider );
+
+ impl->IGameController_outer = outer;
+ IGameControllerProvider_AddRef( (impl->provider = provider) );
+
+ return S_OK;
+}
+
+static const struct IGameControllerImplVtbl controller_vtbl =
+{
+ controller_QueryInterface,
+ controller_AddRef,
+ controller_Release,
+ /* IInspectable methods */
+ controller_GetIids,
+ controller_GetRuntimeClassName,
+ controller_GetTrustLevel,
+ /* IGameControllerImpl methods */
+ controller_Initialize,
+};
+
+DEFINE_IINSPECTABLE_OUTER( input_sink, IGameControllerInputSink, struct controller, IGameController_outer )
+
+static HRESULT WINAPI input_sink_OnInputResumed( IGameControllerInputSink *iface, UINT64 timestamp )
+{
+ FIXME( "iface %p, timestamp %I64u stub!\n", iface, timestamp );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI input_sink_OnInputSuspended( IGameControllerInputSink *iface, UINT64 timestamp )
+{
+ FIXME( "iface %p, timestamp %I64u stub!\n", iface, timestamp );
+ return E_NOTIMPL;
+}
+
+static const struct IGameControllerInputSinkVtbl input_sink_vtbl =
+{
+ input_sink_QueryInterface,
+ input_sink_AddRef,
+ input_sink_Release,
+ /* IInspectable methods */
+ input_sink_GetIids,
+ input_sink_GetRuntimeClassName,
+ input_sink_GetTrustLevel,
+ /* IGameControllerInputSink methods */
+ input_sink_OnInputResumed,
+ input_sink_OnInputSuspended,
+};
+
+DEFINE_IINSPECTABLE_OUTER( raw_controller, IRawGameController, struct controller, IGameController_outer )
+
+static HRESULT WINAPI raw_controller_get_AxisCount( IRawGameController *iface, INT32 *value )
+{
+ FIXME( "iface %p, value %p stub!\n", iface, value );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI raw_controller_get_ButtonCount( IRawGameController *iface, INT32 *value )
+{
+ FIXME( "iface %p, value %p stub!\n", iface, value );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI raw_controller_get_ForceFeedbackMotors( IRawGameController *iface, IVectorView_ForceFeedbackMotor **value )
+{
+ FIXME( "iface %p, value %p stub!\n", iface, value );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI raw_controller_get_HardwareProductId( IRawGameController *iface, UINT16 *value )
+{
+ FIXME( "iface %p, value %p stub!\n", iface, value );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI raw_controller_get_HardwareVendorId( IRawGameController *iface, UINT16 *value )
+{
+ FIXME( "iface %p, value %p stub!\n", iface, value );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI raw_controller_get_SwitchCount( IRawGameController *iface, INT32 *value )
+{
+ FIXME( "iface %p, value %p stub!\n", iface, value );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI raw_controller_GetButtonLabel( IRawGameController *iface, INT32 index,
+ enum GameControllerButtonLabel *value )
+{
+ FIXME( "iface %p, index %d, value %p stub!\n", iface, index, value );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI raw_controller_GetCurrentReading( IRawGameController *iface, UINT32 buttons_size, BOOLEAN *buttons,
+ UINT32 switches_size, enum GameControllerSwitchPosition *switches,
+ UINT32 axes_size, DOUBLE *axes, UINT64 *timestamp )
+{
+ FIXME( "iface %p, buttons_size %u, buttons %p, switches_size %u, switches %p, axes_size %u, axes %p, timestamp %p stub!\n",
+ iface, buttons_size, buttons, switches_size, switches, axes_size, axes, timestamp );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI raw_controller_GetSwitchKind( IRawGameController *iface, INT32 index, enum GameControllerSwitchKind *value )
+{
+ FIXME( "iface %p, index %d, value %p stub!\n", iface, index, value );
+ return E_NOTIMPL;
+}
+
+static const struct IRawGameControllerVtbl raw_controller_vtbl =
+{
+ raw_controller_QueryInterface,
+ raw_controller_AddRef,
+ raw_controller_Release,
+ /* IInspectable methods */
+ raw_controller_GetIids,
+ raw_controller_GetRuntimeClassName,
+ raw_controller_GetTrustLevel,
+ /* IRawGameController methods */
+ raw_controller_get_AxisCount,
+ raw_controller_get_ButtonCount,
+ raw_controller_get_ForceFeedbackMotors,
+ raw_controller_get_HardwareProductId,
+ raw_controller_get_HardwareVendorId,
+ raw_controller_get_SwitchCount,
+ raw_controller_GetButtonLabel,
+ raw_controller_GetCurrentReading,
+ raw_controller_GetSwitchKind,
+};
+
struct controller_statics
{
IActivationFactory IActivationFactory_iface;
@@ -213,8 +439,20 @@ DEFINE_IINSPECTABLE( controller_factory, ICustomGameControllerFactory, struct co
static HRESULT WINAPI controller_factory_CreateGameController( ICustomGameControllerFactory *iface, IGameControllerProvider *provider,
IInspectable **value )
{
- FIXME( "iface %p, provider %p, value %p stub!\n", iface, provider, value );
- return E_NOTIMPL;
+ struct controller *impl;
+
+ TRACE( "iface %p, provider %p, value %p.\n", iface, provider, value );
+
+ if (!(impl = calloc( 1, sizeof(*impl) ))) return E_OUTOFMEMORY;
+ impl->IGameControllerImpl_iface.lpVtbl = &controller_vtbl;
+ impl->IGameControllerInputSink_iface.lpVtbl = &input_sink_vtbl;
+ impl->IRawGameController_iface.lpVtbl = &raw_controller_vtbl;
+ impl->ref = 1;
+
+ TRACE( "created RawGameController %p\n", impl );
+
+ *value = (IInspectable *)&impl->IGameControllerImpl_iface;
+ return S_OK;
}
static HRESULT WINAPI controller_factory_OnGameControllerAdded( ICustomGameControllerFactory *iface, IGameController *value )
diff --git a/dlls/windows.gaming.input/manager.c b/dlls/windows.gaming.input/manager.c
index f5b5654a4c6..489588a68ab 100644
--- a/dlls/windows.gaming.input/manager.c
+++ b/dlls/windows.gaming.input/manager.c
@@ -40,6 +40,7 @@ struct controller
{
IGameController IGameController_iface;
IGameControllerBatteryInfo IGameControllerBatteryInfo_iface;
+ IInspectable *IInspectable_inner;
LONG ref;
struct list entry;
@@ -73,9 +74,7 @@ static HRESULT WINAPI controller_QueryInterface( IGameController *iface, REFIID
return S_OK;
}
- FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) );
- *out = NULL;
- return E_NOINTERFACE;
+ return IInspectable_QueryInterface( impl->IInspectable_inner, iid, out );
}
static ULONG WINAPI controller_AddRef( IGameController *iface )
@@ -95,6 +94,9 @@ static ULONG WINAPI controller_Release( IGameController *iface )
if (!ref)
{
+ /* guard against re-entry if inner releases an outer iface */
+ InterlockedIncrement( &impl->ref );
+ IInspectable_Release( impl->IInspectable_inner );
ICustomGameControllerFactory_Release( impl->factory );
IGameControllerProvider_Release( impl->provider );
free( impl );
@@ -111,14 +113,14 @@ static HRESULT WINAPI controller_GetIids( IGameController *iface, ULONG *iid_cou
static HRESULT WINAPI controller_GetRuntimeClassName( IGameController *iface, HSTRING *class_name )
{
- FIXME( "iface %p, class_name %p stub!\n", iface, class_name );
- return E_NOTIMPL;
+ struct controller *impl = impl_from_IGameController( iface );
+ return IInspectable_GetRuntimeClassName( impl->IInspectable_inner, class_name );
}
static HRESULT WINAPI controller_GetTrustLevel( IGameController *iface, TrustLevel *trust_level )
{
- FIXME( "iface %p, trust_level %p stub!\n", iface, trust_level );
- return E_NOTIMPL;
+ struct controller *impl = impl_from_IGameController( iface );
+ return IInspectable_GetTrustLevel( impl->IInspectable_inner, trust_level );
}
static HRESULT WINAPI controller_add_HeadsetConnected( IGameController *iface, ITypedEventHandler_IGameController_Headset *handler,
@@ -421,13 +423,33 @@ IGameControllerFactoryManagerStatics2 *manager_factory = &manager_statics.IGameC
static HRESULT controller_create( ICustomGameControllerFactory *factory, IGameControllerProvider *provider,
struct controller **out )
{
+ IGameControllerImpl *inner_impl;
struct controller *impl;
+ HRESULT hr;
if (!(impl = malloc(sizeof(*impl)))) return E_OUTOFMEMORY;
impl->IGameController_iface.lpVtbl = &controller_vtbl;
impl->IGameControllerBatteryInfo_iface.lpVtbl = &battery_vtbl;
impl->ref = 1;
+ if (FAILED(hr = ICustomGameControllerFactory_CreateGameController( factory, provider, &impl->IInspectable_inner )))
+ WARN( "Failed to create game controller, hr %#lx\n", hr );
+ else if (FAILED(hr = IInspectable_QueryInterface( impl->IInspectable_inner, &IID_IGameControllerImpl, (void **)&inner_impl )))
+ WARN( "Failed to find IGameControllerImpl iface, hr %#lx\n", hr );
+ else
+ {
+ if (FAILED(hr = IGameControllerImpl_Initialize( inner_impl, &impl->IGameController_iface, provider )))
+ WARN( "Failed to initialize game controller, hr %#lx\n", hr );
+ IGameControllerImpl_Release( inner_impl );
+ }
+
+ if (FAILED(hr))
+ {
+ if (impl->IInspectable_inner) IInspectable_Release( impl->IInspectable_inner );
+ free( impl );
+ return hr;
+ }
+
ICustomGameControllerFactory_AddRef( (impl->factory = factory) );
IGameControllerProvider_AddRef( (impl->provider = provider) );
diff --git a/dlls/windows.gaming.input/private.h b/dlls/windows.gaming.input/private.h
index 56d03abad44..e3da45621b4 100644
--- a/dlls/windows.gaming.input/private.h
+++ b/dlls/windows.gaming.input/private.h
@@ -49,38 +49,42 @@ extern void provider_remove( const WCHAR *device_path );
extern void manager_on_provider_created( IGameControllerProvider *provider );
extern void manager_on_provider_removed( IGameControllerProvider *provider );
-#define DEFINE_IINSPECTABLE( pfx, iface_type, impl_type, base_iface ) \
- static inline impl_type *impl_from_##iface_type( iface_type *iface ) \
+#define DEFINE_IINSPECTABLE_( pfx, iface_type, impl_type, impl_from, iface_mem, expr ) \
+ static inline impl_type *impl_from( iface_type *iface ) \
{ \
- return CONTAINING_RECORD( iface, impl_type, iface_type##_iface ); \
+ return CONTAINING_RECORD( iface, impl_type, iface_mem ); \
} \
static HRESULT WINAPI pfx##_QueryInterface( iface_type *iface, REFIID iid, void **out ) \
{ \
- impl_type *impl = impl_from_##iface_type( iface ); \
- return IInspectable_QueryInterface( (IInspectable *)&impl->base_iface, iid, out ); \
+ impl_type *impl = impl_from( iface ); \
+ return IInspectable_QueryInterface( (IInspectable *)(expr), iid, out ); \
} \
static ULONG WINAPI pfx##_AddRef( iface_type *iface ) \
{ \
- impl_type *impl = impl_from_##iface_type( iface ); \
- return IInspectable_AddRef( (IInspectable *)&impl->base_iface ); \
+ impl_type *impl = impl_from( iface ); \
+ return IInspectable_AddRef( (IInspectable *)(expr) ); \
} \
static ULONG WINAPI pfx##_Release( iface_type *iface ) \
{ \
- impl_type *impl = impl_from_##iface_type( iface ); \
- return IInspectable_Release( (IInspectable *)&impl->base_iface ); \
+ impl_type *impl = impl_from( iface ); \
+ return IInspectable_Release( (IInspectable *)(expr) ); \
} \
static HRESULT WINAPI pfx##_GetIids( iface_type *iface, ULONG *iid_count, IID **iids ) \
{ \
- impl_type *impl = impl_from_##iface_type( iface ); \
- return IInspectable_GetIids( (IInspectable *)&impl->base_iface, iid_count, iids ); \
+ impl_type *impl = impl_from( iface ); \
+ return IInspectable_GetIids( (IInspectable *)(expr), iid_count, iids ); \
} \
static HRESULT WINAPI pfx##_GetRuntimeClassName( iface_type *iface, HSTRING *class_name ) \
{ \
- impl_type *impl = impl_from_##iface_type( iface ); \
- return IInspectable_GetRuntimeClassName( (IInspectable *)&impl->base_iface, class_name ); \
+ impl_type *impl = impl_from( iface ); \
+ return IInspectable_GetRuntimeClassName( (IInspectable *)(expr), class_name ); \
} \
static HRESULT WINAPI pfx##_GetTrustLevel( iface_type *iface, TrustLevel *trust_level ) \
{ \
- impl_type *impl = impl_from_##iface_type( iface ); \
- return IInspectable_GetTrustLevel( (IInspectable *)&impl->base_iface, trust_level ); \
+ impl_type *impl = impl_from( iface ); \
+ return IInspectable_GetTrustLevel( (IInspectable *)(expr), trust_level ); \
}
+#define DEFINE_IINSPECTABLE( pfx, iface_type, impl_type, base_iface ) \
+ DEFINE_IINSPECTABLE_( pfx, iface_type, impl_type, impl_from_##iface_type, iface_type##_iface, &impl->base_iface )
+#define DEFINE_IINSPECTABLE_OUTER( pfx, iface_type, impl_type, outer_iface ) \
+ DEFINE_IINSPECTABLE_( pfx, iface_type, impl_type, impl_from_##iface_type, iface_type##_iface, impl->outer_iface )
--
2.35.1
1
3
[PATCH 6/6] combase: Execute dllhost.exe for correct architecture in a WoW64 setup.
by Dmitry Timoshkov 09 Mar '22
by Dmitry Timoshkov 09 Mar '22
09 Mar '22
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/combase/combase.c | 2 +-
dlls/combase/rpc.c | 48 +++++++++++++++++++++++++++++---------
programs/dllhost/dllhost.c | 2 ++
3 files changed, 40 insertions(+), 12 deletions(-)
diff --git a/dlls/combase/combase.c b/dlls/combase/combase.c
index fb8f453661f..376f270fdf1 100644
--- a/dlls/combase/combase.c
+++ b/dlls/combase/combase.c
@@ -350,7 +350,7 @@ HRESULT open_appidkey_from_clsid(REFCLSID clsid, REGSAM access, HKEY *subkey)
HRESULT hr;
/* read the AppID value under the class's key */
- hr = open_key_for_clsid(clsid, NULL, KEY_READ, &hkey);
+ hr = open_key_for_clsid(clsid, NULL, access, &hkey);
if (FAILED(hr))
return hr;
diff --git a/dlls/combase/rpc.c b/dlls/combase/rpc.c
index 40f900175dd..f620339f19e 100644
--- a/dlls/combase/rpc.c
+++ b/dlls/combase/rpc.c
@@ -526,18 +526,24 @@ static HRESULT create_surrogate_server(REFCLSID rclsid, HANDLE *process)
{
static const WCHAR processidW[] = L" /PROCESSID:";
HKEY key;
+ int arch = (sizeof(void *) > sizeof(int)) ? 64 : 32;
+ REGSAM opposite = (arch == 64) ? KEY_WOW64_32KEY : KEY_WOW64_64KEY;
+ BOOL is_wow64 = FALSE;
HRESULT hr;
WCHAR command[MAX_PATH + ARRAY_SIZE(processidW) + CHARS_IN_GUID];
DWORD size;
- STARTUPINFOW sinfo;
- PROCESS_INFORMATION pinfo;
+ STARTUPINFOW si;
+ PROCESS_INFORMATION pi;
LONG ret;
TRACE("Attempting to start surrogate server for %s\n", debugstr_guid(rclsid));
hr = open_appidkey_from_clsid(rclsid, KEY_READ, &key);
- if (FAILED(hr))
- return hr;
+ if (FAILED(hr) && (arch == 64 || (IsWow64Process(GetCurrentProcess(), &is_wow64) && is_wow64)))
+ {
+ hr = open_appidkey_from_clsid(rclsid, opposite | KEY_READ, &key);
+ if (FAILED(hr)) return hr;
+ }
size = (MAX_PATH + 1) * sizeof(WCHAR);
ret = RegQueryValueExW(key, L"DllSurrogate", NULL, NULL, (LPBYTE)command, &size);
@@ -545,25 +551,45 @@ static HRESULT create_surrogate_server(REFCLSID rclsid, HANDLE *process)
if (ret || !size || !command[0])
{
TRACE("No value for DllSurrogate key\n");
- wcscpy(command, L"dllhost.exe");
+
+ if ((sizeof(void *) == 8 || is_wow64) && opposite == KEY_WOW64_32KEY)
+ GetSystemWow64DirectoryW(command, MAX_PATH - ARRAY_SIZE(L"\\dllhost.exe"));
+ else
+ GetSystemDirectoryW(command, MAX_PATH - ARRAY_SIZE(L"\\dllhost.exe"));
+
+ wcscat(command, L"\\dllhost.exe");
}
/* Surrogate EXE servers are started with the /PROCESSID:{GUID} switch. */
wcscat(command, processidW);
StringFromGUID2(rclsid, command + wcslen(command), CHARS_IN_GUID);
- memset(&sinfo, 0, sizeof(sinfo));
- sinfo.cb = sizeof(sinfo);
+ memset(&si, 0, sizeof(si));
+ si.cb = sizeof(si);
TRACE("Activating surrogate local server %s\n", debugstr_w(command));
- if (!CreateProcessW(NULL, command, NULL, NULL, FALSE, DETACHED_PROCESS, NULL, NULL, &sinfo, &pinfo))
+ if (is_wow64 && arch == 64)
+ {
+ void *cookie;
+ Wow64DisableWow64FsRedirection(&cookie);
+ if (!CreateProcessW(NULL, command, NULL, NULL, FALSE, DETACHED_PROCESS, NULL, NULL, &si, &pi))
+ {
+ WARN("failed to run surrogate local server %s\n", debugstr_w(command));
+ hr = HRESULT_FROM_WIN32(GetLastError());
+ }
+ Wow64RevertWow64FsRedirection(cookie);
+ }
+ else if (!CreateProcessW(NULL, command, NULL, NULL, FALSE, DETACHED_PROCESS, NULL, NULL, &si, &pi))
{
WARN("failed to run surrogate local server %s\n", debugstr_w(command));
- return HRESULT_FROM_WIN32(GetLastError());
+ hr = HRESULT_FROM_WIN32(GetLastError());
}
- *process = pinfo.hProcess;
- CloseHandle(pinfo.hThread);
+
+ if (FAILED(hr)) return hr;
+
+ *process = pi.hProcess;
+ CloseHandle(pi.hThread);
return S_OK;
}
diff --git a/programs/dllhost/dllhost.c b/programs/dllhost/dllhost.c
index dc89c978510..83700826f8b 100644
--- a/programs/dllhost/dllhost.c
+++ b/programs/dllhost/dllhost.c
@@ -327,6 +327,8 @@ int WINAPI wWinMain(HINSTANCE hinst, HINSTANCE previnst, LPWSTR cmdline, int sho
CLSID clsid;
struct surrogate surrogate;
+ TRACE("Running as %u-bit\n", (int)sizeof(void *) * 8);
+
if (wcsnicmp(cmdline, L"/PROCESSID:", 11))
return 0;
--
2.35.1
1
0
09 Mar '22
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/wintrust/tests/Makefile.in | 1
dlls/wintrust/tests/asn.c | 208 ++++++++++++++++++-------------------
dlls/wintrust/tests/crypt.c | 222 ++++++++++++++++++++-------------------
dlls/wintrust/tests/register.c | 44 ++++----
dlls/wintrust/tests/softpub.c | 144 +++++++++++++------------
5 files changed, 309 insertions(+), 310 deletions(-)
diff --git a/dlls/wintrust/tests/Makefile.in b/dlls/wintrust/tests/Makefile.in
index c19db4558a9..87654a685ff 100644
--- a/dlls/wintrust/tests/Makefile.in
+++ b/dlls/wintrust/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = wintrust.dll
IMPORTS = wintrust crypt32 advapi32
diff --git a/dlls/wintrust/tests/asn.c b/dlls/wintrust/tests/asn.c
index 82feac61bfe..9cb255d3048 100644
--- a/dlls/wintrust/tests/asn.c
+++ b/dlls/wintrust/tests/asn.c
@@ -46,20 +46,20 @@ static void test_encodeSPCFinancialCriteria(void)
}
ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, SPC_FINANCIAL_CRITERIA_STRUCT,
&criteria, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
- ok(size == sizeof(falseCriteria), "Unexpected size %d\n", size);
+ ok(size == sizeof(falseCriteria), "Unexpected size %ld\n", size);
ok(!memcmp(buf, falseCriteria, size), "Unexpected value\n");
LocalFree(buf);
}
criteria.fFinancialInfoAvailable = criteria.fMeetsCriteria = TRUE;
ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, SPC_FINANCIAL_CRITERIA_STRUCT,
&criteria, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
- ok(size == sizeof(trueCriteria), "Unexpected size %d\n", size);
+ ok(size == sizeof(trueCriteria), "Unexpected size %ld\n", size);
ok(!memcmp(buf, trueCriteria, size), "Unexpected value\n");
LocalFree(buf);
}
@@ -79,7 +79,7 @@ static void test_decodeSPCFinancialCriteria(void)
ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, SPC_FINANCIAL_CRITERIA_STRUCT,
falseCriteria, sizeof(falseCriteria), 0, NULL, &criteria, &size);
- ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
ok(!criteria.fFinancialInfoAvailable, "expected FALSE\n");
@@ -87,7 +87,7 @@ static void test_decodeSPCFinancialCriteria(void)
}
ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, SPC_FINANCIAL_CRITERIA_STRUCT,
trueCriteria, sizeof(trueCriteria), 0, NULL, &criteria, &size);
- ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
ok(criteria.fFinancialInfoAvailable, "expected TRUE\n");
@@ -131,14 +131,14 @@ static void test_encodeSPCLink(void)
ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, SPC_LINK_STRUCT, &link,
CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size);
ok(!ret && GetLastError() == E_INVALIDARG,
- "Expected E_INVALIDARG, got %08x\n", GetLastError());
+ "Expected E_INVALIDARG, got %08lx\n", GetLastError());
link.dwLinkChoice = SPC_URL_LINK_CHOICE;
ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, SPC_LINK_STRUCT, &link,
CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
- ok(size == sizeof(emptyURLSPCLink), "Unexpected size %d\n", size);
+ ok(size == sizeof(emptyURLSPCLink), "Unexpected size %ld\n", size);
ok(!memcmp(buf, emptyURLSPCLink, size), "Unexpected value\n");
LocalFree(buf);
}
@@ -151,18 +151,18 @@ static void test_encodeSPCLink(void)
ok(!ret &&
(GetLastError() == CRYPT_E_INVALID_IA5_STRING ||
GetLastError() == OSS_BAD_PTR /* WinNT */),
- "Expected CRYPT_E_INVALID_IA5_STRING, got %08x\n", GetLastError());
+ "Expected CRYPT_E_INVALID_IA5_STRING, got %08lx\n", GetLastError());
/* Unlike the crypt32 string encoding routines, size is not set to the
* index of the first invalid character.
*/
- ok(size == 0, "Expected size 0, got %d\n", size);
+ ok(size == 0, "Expected size 0, got %ld\n", size);
U(link).pwszUrl = url;
ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, SPC_LINK_STRUCT, &link,
CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
- ok(size == sizeof(urlSPCLink), "Unexpected size %d\n", size);
+ ok(size == sizeof(urlSPCLink), "Unexpected size %ld\n", size);
ok(!memcmp(buf, urlSPCLink, size), "Unexpected value\n");
LocalFree(buf);
}
@@ -170,10 +170,10 @@ static void test_encodeSPCLink(void)
U(link).pwszFile = (LPWSTR)nihongoURL;
ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, SPC_LINK_STRUCT, &link,
CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
- ok(size == sizeof(fileSPCLink), "Unexpected size %d\n", size);
+ ok(size == sizeof(fileSPCLink), "Unexpected size %ld\n", size);
ok(!memcmp(buf, fileSPCLink, size), "Unexpected value\n");
LocalFree(buf);
}
@@ -181,10 +181,10 @@ static void test_encodeSPCLink(void)
memset(&U(link).Moniker, 0, sizeof(U(link).Moniker));
ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, SPC_LINK_STRUCT, &link,
CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
- ok(size == sizeof(emptyMonikerSPCLink), "Unexpected size %d\n", size);
+ ok(size == sizeof(emptyMonikerSPCLink), "Unexpected size %ld\n", size);
ok(!memcmp(buf, emptyMonikerSPCLink, size), "Unexpected value\n");
LocalFree(buf);
}
@@ -193,10 +193,10 @@ static void test_encodeSPCLink(void)
U(link).Moniker.SerializedData.cbData = sizeof(data);
ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, SPC_LINK_STRUCT, &link,
CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
- ok(size == sizeof(monikerSPCLink), "Unexpected size %d\n", size);
+ ok(size == sizeof(monikerSPCLink), "Unexpected size %ld\n", size);
ok(!memcmp(buf, monikerSPCLink, size), "Unexpected value\n");
LocalFree(buf);
}
@@ -222,50 +222,50 @@ static void test_decodeSPCLink(void)
ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, SPC_LINK_STRUCT,
emptyURLSPCLink, sizeof(emptyURLSPCLink), CRYPT_DECODE_ALLOC_FLAG, NULL,
&buf, &size);
- ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
link = (SPC_LINK *)buf;
ok(link->dwLinkChoice == SPC_URL_LINK_CHOICE,
- "Expected SPC_URL_LINK_CHOICE, got %d\n", link->dwLinkChoice);
+ "Expected SPC_URL_LINK_CHOICE, got %ld\n", link->dwLinkChoice);
ok(lstrlenW(U(*link).pwszUrl) == 0, "Expected empty string\n");
LocalFree(buf);
}
ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, SPC_LINK_STRUCT,
urlSPCLink, sizeof(urlSPCLink), CRYPT_DECODE_ALLOC_FLAG, NULL,
&buf, &size);
- ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
link = (SPC_LINK *)buf;
ok(link->dwLinkChoice == SPC_URL_LINK_CHOICE,
- "Expected SPC_URL_LINK_CHOICE, got %d\n", link->dwLinkChoice);
+ "Expected SPC_URL_LINK_CHOICE, got %ld\n", link->dwLinkChoice);
ok(!lstrcmpW(U(*link).pwszUrl, url), "Unexpected URL\n");
LocalFree(buf);
}
ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, SPC_LINK_STRUCT,
fileSPCLink, sizeof(fileSPCLink), CRYPT_DECODE_ALLOC_FLAG, NULL,
&buf, &size);
- ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
link = (SPC_LINK *)buf;
ok(link->dwLinkChoice == SPC_FILE_LINK_CHOICE,
- "Expected SPC_FILE_LINK_CHOICE, got %d\n", link->dwLinkChoice);
+ "Expected SPC_FILE_LINK_CHOICE, got %ld\n", link->dwLinkChoice);
ok(!lstrcmpW(U(*link).pwszFile, nihongoURL), "Unexpected file\n");
LocalFree(buf);
}
ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, SPC_LINK_STRUCT,
emptyMonikerSPCLink, sizeof(emptyMonikerSPCLink), CRYPT_DECODE_ALLOC_FLAG,
NULL, &buf, &size);
- ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
SPC_SERIALIZED_OBJECT emptyMoniker = { { 0 } };
link = (SPC_LINK *)buf;
ok(link->dwLinkChoice == SPC_MONIKER_LINK_CHOICE,
- "Expected SPC_MONIKER_LINK_CHOICE, got %d\n", link->dwLinkChoice);
+ "Expected SPC_MONIKER_LINK_CHOICE, got %ld\n", link->dwLinkChoice);
ok(!memcmp(&U(*link).Moniker.ClassId, &emptyMoniker.ClassId,
sizeof(emptyMoniker.ClassId)), "Unexpected value\n");
ok(U(*link).Moniker.SerializedData.cbData == 0,
@@ -275,19 +275,19 @@ static void test_decodeSPCLink(void)
ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, SPC_LINK_STRUCT,
monikerSPCLink, sizeof(monikerSPCLink), CRYPT_DECODE_ALLOC_FLAG, NULL,
&buf, &size);
- ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
SPC_UUID id;
link = (SPC_LINK *)buf;
ok(link->dwLinkChoice == SPC_MONIKER_LINK_CHOICE,
- "Expected SPC_MONIKER_LINK_CHOICE, got %d\n", link->dwLinkChoice);
+ "Expected SPC_MONIKER_LINK_CHOICE, got %ld\n", link->dwLinkChoice);
memset(&id, 0xea, sizeof(id));
ok(!memcmp(&U(*link).Moniker.ClassId, &id, sizeof(id)),
"Unexpected value\n");
ok(U(*link).Moniker.SerializedData.cbData == sizeof(data),
- "Unexpected data size %d\n", U(*link).Moniker.SerializedData.cbData);
+ "Unexpected data size %ld\n", U(*link).Moniker.SerializedData.cbData);
ok(!memcmp(U(*link).Moniker.SerializedData.pbData, data, sizeof(data)),
"Unexpected value\n");
LocalFree(buf);
@@ -299,7 +299,7 @@ static void test_decodeSPCLink(void)
ok(!ret &&
(GetLastError() == CRYPT_E_BAD_ENCODE ||
GetLastError() == OSS_DATA_ERROR /* WinNT */),
- "Expected CRYPT_E_BAD_ENCODE, got %08x\n", GetLastError());
+ "Expected CRYPT_E_BAD_ENCODE, got %08lx\n", GetLastError());
}
static const BYTE emptySequence[] = { 0x30,0x00 };
@@ -329,10 +329,10 @@ static void test_encodeSPCPEImage(void)
ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, SPC_PE_IMAGE_DATA_STRUCT,
&imageData, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
- ok(size == sizeof(emptySequence), "Unexpected size %d\n", size);
+ ok(size == sizeof(emptySequence), "Unexpected size %ld\n", size);
ok(!memcmp(buf, emptySequence, sizeof(emptySequence)),
"Unexpected value\n");
LocalFree(buf);
@@ -343,16 +343,16 @@ static void test_encodeSPCPEImage(void)
ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, SPC_PE_IMAGE_DATA_STRUCT,
&imageData, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size);
ok(!ret && GetLastError () == E_INVALIDARG,
- "Expected E_INVALIDARG, got %08x\n", GetLastError());
+ "Expected E_INVALIDARG, got %08lx\n", GetLastError());
/* With just unused bits field set: */
imageData.pFile = NULL;
imageData.Flags.cUnusedBits = 1;
ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, SPC_PE_IMAGE_DATA_STRUCT,
&imageData, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
- ok(size == sizeof(emptySequence), "Unexpected size %d\n", size);
+ ok(size == sizeof(emptySequence), "Unexpected size %ld\n", size);
ok(!memcmp(buf, emptySequence, sizeof(emptySequence)),
"Unexpected value\n");
LocalFree(buf);
@@ -368,10 +368,10 @@ static void test_encodeSPCPEImage(void)
skip("SPC_PE_IMAGE_DATA_STRUCT not supported\n");
return;
}
- ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
- ok(size == sizeof(onlyFlagsPEImage), "Unexpected size %d\n", size);
+ ok(size == sizeof(onlyFlagsPEImage), "Unexpected size %ld\n", size);
ok(!memcmp(buf, onlyFlagsPEImage, sizeof(onlyFlagsPEImage)),
"Unexpected value\n");
LocalFree(buf);
@@ -382,10 +382,10 @@ static void test_encodeSPCPEImage(void)
imageData.pFile = &link;
ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, SPC_PE_IMAGE_DATA_STRUCT,
&imageData, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
- ok(size == sizeof(onlyEmptyFilePEImage), "Unexpected size %d\n", size);
+ ok(size == sizeof(onlyEmptyFilePEImage), "Unexpected size %ld\n", size);
ok(!memcmp(buf, onlyEmptyFilePEImage, sizeof(onlyEmptyFilePEImage)),
"Unexpected value\n");
LocalFree(buf);
@@ -395,10 +395,10 @@ static void test_encodeSPCPEImage(void)
imageData.Flags.cbData = sizeof(flags);
ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, SPC_PE_IMAGE_DATA_STRUCT,
&imageData, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
- ok(size == sizeof(flagsAndEmptyFilePEImage), "Unexpected size %d\n",
+ ok(size == sizeof(flagsAndEmptyFilePEImage), "Unexpected size %ld\n",
size);
ok(!memcmp(buf, flagsAndEmptyFilePEImage,
sizeof(flagsAndEmptyFilePEImage)), "Unexpected value\n");
@@ -408,10 +408,10 @@ static void test_encodeSPCPEImage(void)
U(link).pwszFile = (LPWSTR)nihongoURL;
ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, SPC_PE_IMAGE_DATA_STRUCT,
&imageData, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
- ok(size == sizeof(flagsAndFilePEImage), "Unexpected size %d\n", size);
+ ok(size == sizeof(flagsAndFilePEImage), "Unexpected size %ld\n", size);
ok(!memcmp(buf, flagsAndFilePEImage, sizeof(flagsAndFilePEImage)),
"Unexpected value\n");
LocalFree(buf);
@@ -435,11 +435,11 @@ static void test_decodeSPCPEImage(void)
ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, SPC_PE_IMAGE_DATA_STRUCT,
emptySequence, sizeof(emptySequence),
CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
imageData = (SPC_PE_IMAGE_DATA *)buf;
- ok(imageData->Flags.cbData == 0, "Expected empty flags, got %d\n",
+ ok(imageData->Flags.cbData == 0, "Expected empty flags, got %ld\n",
imageData->Flags.cbData);
ok(imageData->pFile == NULL, "Expected no file\n");
LocalFree(buf);
@@ -447,12 +447,12 @@ static void test_decodeSPCPEImage(void)
ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, SPC_PE_IMAGE_DATA_STRUCT,
onlyFlagsPEImage, sizeof(onlyFlagsPEImage),
CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
imageData = (SPC_PE_IMAGE_DATA *)buf;
ok(imageData->Flags.cbData == sizeof(flags),
- "Unexpected flags size %d\n", imageData->Flags.cbData);
+ "Unexpected flags size %ld\n", imageData->Flags.cbData);
if (imageData->Flags.cbData)
ok(!memcmp(imageData->Flags.pbData, flags, sizeof(flags)),
"Unexpected flags\n");
@@ -462,17 +462,17 @@ static void test_decodeSPCPEImage(void)
ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, SPC_PE_IMAGE_DATA_STRUCT,
onlyEmptyFilePEImage, sizeof(onlyEmptyFilePEImage),
CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
imageData = (SPC_PE_IMAGE_DATA *)buf;
- ok(imageData->Flags.cbData == 0, "Expected empty flags, got %d\n",
+ ok(imageData->Flags.cbData == 0, "Expected empty flags, got %ld\n",
imageData->Flags.cbData);
ok(imageData->pFile != NULL, "Expected a file\n");
if (imageData->pFile)
{
ok(imageData->pFile->dwLinkChoice == SPC_FILE_LINK_CHOICE,
- "Expected SPC_FILE_LINK_CHOICE, got %d\n",
+ "Expected SPC_FILE_LINK_CHOICE, got %ld\n",
imageData->pFile->dwLinkChoice);
ok(!lstrcmpW(U(*imageData->pFile).pwszFile, emptyString),
"Unexpected file\n");
@@ -482,12 +482,12 @@ static void test_decodeSPCPEImage(void)
ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, SPC_PE_IMAGE_DATA_STRUCT,
flagsAndEmptyFilePEImage, sizeof(flagsAndEmptyFilePEImage),
CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
imageData = (SPC_PE_IMAGE_DATA *)buf;
ok(imageData->Flags.cbData == sizeof(flags),
- "Unexpected flags size %d\n", imageData->Flags.cbData);
+ "Unexpected flags size %ld\n", imageData->Flags.cbData);
if (imageData->Flags.cbData)
ok(!memcmp(imageData->Flags.pbData, flags, sizeof(flags)),
"Unexpected flags\n");
@@ -495,7 +495,7 @@ static void test_decodeSPCPEImage(void)
if (imageData->pFile)
{
ok(imageData->pFile->dwLinkChoice == SPC_FILE_LINK_CHOICE,
- "Expected SPC_FILE_LINK_CHOICE, got %d\n",
+ "Expected SPC_FILE_LINK_CHOICE, got %ld\n",
imageData->pFile->dwLinkChoice);
ok(!lstrcmpW(U(*imageData->pFile).pwszFile, emptyString),
"Unexpected file\n");
@@ -505,12 +505,12 @@ static void test_decodeSPCPEImage(void)
ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, SPC_PE_IMAGE_DATA_STRUCT,
flagsAndFilePEImage, sizeof(flagsAndFilePEImage),
CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
imageData = (SPC_PE_IMAGE_DATA *)buf;
ok(imageData->Flags.cbData == sizeof(flags),
- "Unexpected flags size %d\n", imageData->Flags.cbData);
+ "Unexpected flags size %ld\n", imageData->Flags.cbData);
if (imageData->Flags.cbData)
ok(!memcmp(imageData->Flags.pbData, flags, sizeof(flags)),
"Unexpected flags\n");
@@ -518,7 +518,7 @@ static void test_decodeSPCPEImage(void)
if (imageData->pFile)
{
ok(imageData->pFile->dwLinkChoice == SPC_FILE_LINK_CHOICE,
- "Expected SPC_FILE_LINK_CHOICE, got %d\n",
+ "Expected SPC_FILE_LINK_CHOICE, got %ld\n",
imageData->pFile->dwLinkChoice);
ok(!lstrcmpW(U(*imageData->pFile).pwszFile, nihongoURL),
"Unexpected file\n");
@@ -560,10 +560,10 @@ static void test_encodeCatMemberInfo(void)
ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, CAT_MEMBERINFO_STRUCT,
&info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
- ok(size == sizeof(emptyCatMemberInfo), "Unexpected size %d\n", size);
+ ok(size == sizeof(emptyCatMemberInfo), "Unexpected size %ld\n", size);
ok(!memcmp(buf, emptyCatMemberInfo, sizeof(emptyCatMemberInfo)),
"Unexpected value\n");
LocalFree(buf);
@@ -571,10 +571,10 @@ static void test_encodeCatMemberInfo(void)
info.pwszSubjGuid = foo;
ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, CAT_MEMBERINFO_STRUCT,
&info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
- ok(size == sizeof(catMemberInfoWithSillyGuid), "Unexpected size %d\n",
+ ok(size == sizeof(catMemberInfoWithSillyGuid), "Unexpected size %ld\n",
size);
ok(!memcmp(buf, catMemberInfoWithSillyGuid,
sizeof(catMemberInfoWithSillyGuid)), "Unexpected value\n");
@@ -583,10 +583,10 @@ static void test_encodeCatMemberInfo(void)
info.pwszSubjGuid = guidStr;
ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, CAT_MEMBERINFO_STRUCT,
&info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
- ok(size == sizeof(catMemberInfoWithGuid), "Unexpected size %d\n",
+ ok(size == sizeof(catMemberInfoWithGuid), "Unexpected size %ld\n",
size);
ok(!memcmp(buf, catMemberInfoWithGuid, sizeof(catMemberInfoWithGuid)),
"Unexpected value\n");
@@ -610,39 +610,39 @@ static void test_decodeCatMemberInfo(void)
ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, CAT_MEMBERINFO_STRUCT,
emptyCatMemberInfo, sizeof(emptyCatMemberInfo),
CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
info = (CAT_MEMBERINFO *)buf;
ok(!info->pwszSubjGuid || !info->pwszSubjGuid[0],
"expected empty pwszSubjGuid\n");
- ok(info->dwCertVersion == 0, "expected dwCertVersion == 0, got %d\n",
+ ok(info->dwCertVersion == 0, "expected dwCertVersion == 0, got %ld\n",
info->dwCertVersion);
LocalFree(buf);
}
ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, CAT_MEMBERINFO_STRUCT,
catMemberInfoWithSillyGuid, sizeof(catMemberInfoWithSillyGuid),
CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
info = (CAT_MEMBERINFO *)buf;
ok(info->pwszSubjGuid && !lstrcmpW(info->pwszSubjGuid, foo),
"unexpected pwszSubjGuid\n");
- ok(info->dwCertVersion == 0, "expected dwCertVersion == 0, got %d\n",
+ ok(info->dwCertVersion == 0, "expected dwCertVersion == 0, got %ld\n",
info->dwCertVersion);
LocalFree(buf);
}
ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, CAT_MEMBERINFO_STRUCT,
catMemberInfoWithGuid, sizeof(catMemberInfoWithGuid),
CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
info = (CAT_MEMBERINFO *)buf;
ok(info->pwszSubjGuid && !lstrcmpW(info->pwszSubjGuid, guidStr),
"unexpected pwszSubjGuid\n");
- ok(info->dwCertVersion == 0, "expected dwCertVersion == 0, got %d\n",
+ ok(info->dwCertVersion == 0, "expected dwCertVersion == 0, got %ld\n",
info->dwCertVersion);
LocalFree(buf);
}
@@ -670,10 +670,10 @@ static void test_encodeCatNameValue(void)
memset(&value, 0, sizeof(value));
ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, CAT_NAMEVALUE_STRUCT,
&value, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
- ok(size == sizeof(emptyCatNameValue), "Unexpected size %d\n", size);
+ ok(size == sizeof(emptyCatNameValue), "Unexpected size %ld\n", size);
ok(!memcmp(buf, emptyCatNameValue, sizeof(emptyCatNameValue)),
"Unexpected value\n");
LocalFree(buf);
@@ -681,10 +681,10 @@ static void test_encodeCatNameValue(void)
value.pwszTag = foo;
ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, CAT_NAMEVALUE_STRUCT,
&value, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
- ok(size == sizeof(catNameValueWithTag), "Unexpected size %d\n", size);
+ ok(size == sizeof(catNameValueWithTag), "Unexpected size %ld\n", size);
ok(!memcmp(buf, catNameValueWithTag, sizeof(catNameValueWithTag)),
"Unexpected value\n");
LocalFree(buf);
@@ -693,10 +693,10 @@ static void test_encodeCatNameValue(void)
value.fdwFlags = 0xf00dd00d;
ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, CAT_NAMEVALUE_STRUCT,
&value, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
- ok(size == sizeof(catNameValueWithFlags), "Unexpected size %d\n", size);
+ ok(size == sizeof(catNameValueWithFlags), "Unexpected size %ld\n", size);
ok(!memcmp(buf, catNameValueWithFlags, sizeof(catNameValueWithFlags)),
"Unexpected value\n");
LocalFree(buf);
@@ -706,10 +706,10 @@ static void test_encodeCatNameValue(void)
value.Value.pbData = aVal;
ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, CAT_NAMEVALUE_STRUCT,
&value, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
- ok(size == sizeof(catNameValueWithValue), "Unexpected size %d\n", size);
+ ok(size == sizeof(catNameValueWithValue), "Unexpected size %ld\n", size);
ok(!memcmp(buf, catNameValueWithValue, sizeof(catNameValueWithValue)),
"Unexpected value\n");
LocalFree(buf);
@@ -727,14 +727,14 @@ static void test_decodeCatNameValue(void)
ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, CAT_NAMEVALUE_STRUCT,
emptyCatNameValue, sizeof(emptyCatNameValue),
CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
value = (CAT_NAMEVALUE *)buf;
ok(!value->pwszTag || !value->pwszTag[0], "expected empty pwszTag\n");
- ok(value->fdwFlags == 0, "expected fdwFlags == 0, got %08x\n",
+ ok(value->fdwFlags == 0, "expected fdwFlags == 0, got %08lx\n",
value->fdwFlags);
- ok(value->Value.cbData == 0, "expected 0-length value, got %d\n",
+ ok(value->Value.cbData == 0, "expected 0-length value, got %ld\n",
value->Value.cbData);
LocalFree(buf);
}
@@ -742,15 +742,15 @@ static void test_decodeCatNameValue(void)
ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, CAT_NAMEVALUE_STRUCT,
catNameValueWithTag, sizeof(catNameValueWithTag),
CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
value = (CAT_NAMEVALUE *)buf;
ok(value->pwszTag && !lstrcmpW(value->pwszTag, foo),
"unexpected pwszTag\n");
- ok(value->fdwFlags == 0, "expected fdwFlags == 0, got %08x\n",
+ ok(value->fdwFlags == 0, "expected fdwFlags == 0, got %08lx\n",
value->fdwFlags);
- ok(value->Value.cbData == 0, "expected 0-length value, got %d\n",
+ ok(value->Value.cbData == 0, "expected 0-length value, got %ld\n",
value->Value.cbData);
LocalFree(buf);
}
@@ -758,14 +758,14 @@ static void test_decodeCatNameValue(void)
ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, CAT_NAMEVALUE_STRUCT,
catNameValueWithFlags, sizeof(catNameValueWithFlags),
CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
value = (CAT_NAMEVALUE *)buf;
ok(!value->pwszTag || !value->pwszTag[0], "expected empty pwszTag\n");
ok(value->fdwFlags == 0xf00dd00d,
- "expected fdwFlags == 0xf00dd00d, got %08x\n", value->fdwFlags);
- ok(value->Value.cbData == 0, "expected 0-length value, got %d\n",
+ "expected fdwFlags == 0xf00dd00d, got %08lx\n", value->fdwFlags);
+ ok(value->Value.cbData == 0, "expected 0-length value, got %ld\n",
value->Value.cbData);
LocalFree(buf);
}
@@ -773,14 +773,14 @@ static void test_decodeCatNameValue(void)
ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, CAT_NAMEVALUE_STRUCT,
catNameValueWithValue, sizeof(catNameValueWithValue),
CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
value = (CAT_NAMEVALUE *)buf;
ok(!value->pwszTag || !value->pwszTag[0], "expected empty pwszTag\n");
- ok(value->fdwFlags == 0, "expected fdwFlags == 0, got %08x\n",
+ ok(value->fdwFlags == 0, "expected fdwFlags == 0, got %08lx\n",
value->fdwFlags);
- ok(value->Value.cbData == sizeof(aVal), "unexpected size %d\n",
+ ok(value->Value.cbData == sizeof(aVal), "unexpected size %ld\n",
value->Value.cbData);
ok(!memcmp(value->Value.pbData, aVal, value->Value.cbData),
"unexpected value\n");
@@ -812,20 +812,20 @@ static void test_encodeSpOpusInfo(void)
memset(&info, 0, sizeof(info));
ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, SPC_SP_OPUS_INFO_STRUCT,
&info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
- ok(size == sizeof(emptySequence), "unexpected size %d\n", size);
+ ok(size == sizeof(emptySequence), "unexpected size %ld\n", size);
ok(!memcmp(buf, emptySequence, size), "unexpected value\n");
LocalFree(buf);
}
info.pwszProgramName = progName;
ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, SPC_SP_OPUS_INFO_STRUCT,
&info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
- ok(size == sizeof(spOpusInfoWithProgramName), "unexpected size %d\n",
+ ok(size == sizeof(spOpusInfoWithProgramName), "unexpected size %ld\n",
size);
ok(!memcmp(buf, spOpusInfoWithProgramName, size),
"unexpected value\n");
@@ -838,16 +838,16 @@ static void test_encodeSpOpusInfo(void)
ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, SPC_SP_OPUS_INFO_STRUCT,
&info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size);
ok(!ret && GetLastError() == E_INVALIDARG,
- "expected E_INVALIDARG, got %08x\n", GetLastError());
+ "expected E_INVALIDARG, got %08lx\n", GetLastError());
moreInfo.dwLinkChoice = SPC_URL_LINK_CHOICE;
U(moreInfo).pwszUrl = winehq;
ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, SPC_SP_OPUS_INFO_STRUCT,
&info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
ok(size == sizeof(spOpusInfoWithMoreInfo),
- "unexpected size %d\n", size);
+ "unexpected size %ld\n", size);
ok(!memcmp(buf, spOpusInfoWithMoreInfo, size),
"unexpected value\n");
LocalFree(buf);
@@ -856,11 +856,11 @@ static void test_encodeSpOpusInfo(void)
info.pPublisherInfo = &moreInfo;
ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, SPC_SP_OPUS_INFO_STRUCT,
&info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size);
- ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptEncodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
ok(size == sizeof(spOpusInfoWithPublisherInfo),
- "unexpected size %d\n", size);
+ "unexpected size %ld\n", size);
ok(!memcmp(buf, spOpusInfoWithPublisherInfo, size),
"unexpected value\n");
LocalFree(buf);
@@ -876,7 +876,7 @@ static void test_decodeSpOpusInfo(void)
ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, SPC_SP_OPUS_INFO_STRUCT,
emptySequence, sizeof(emptySequence), CRYPT_DECODE_ALLOC_FLAG, NULL,
&info, &size);
- ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
ok(!info->pwszProgramName, "expected NULL\n");
@@ -887,7 +887,7 @@ static void test_decodeSpOpusInfo(void)
ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, SPC_SP_OPUS_INFO_STRUCT,
spOpusInfoWithProgramName, sizeof(spOpusInfoWithProgramName),
CRYPT_DECODE_ALLOC_FLAG, NULL, &info, &size);
- ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
ok(info->pwszProgramName && !lstrcmpW(info->pwszProgramName,
@@ -899,7 +899,7 @@ static void test_decodeSpOpusInfo(void)
ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, SPC_SP_OPUS_INFO_STRUCT,
spOpusInfoWithMoreInfo, sizeof(spOpusInfoWithMoreInfo),
CRYPT_DECODE_ALLOC_FLAG, NULL, &info, &size);
- ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
ok(!info->pwszProgramName, "expected NULL\n");
@@ -907,7 +907,7 @@ static void test_decodeSpOpusInfo(void)
if (info->pMoreInfo)
{
ok(info->pMoreInfo->dwLinkChoice == SPC_URL_LINK_CHOICE,
- "unexpected link choice %d\n", info->pMoreInfo->dwLinkChoice);
+ "unexpected link choice %ld\n", info->pMoreInfo->dwLinkChoice);
ok(!lstrcmpW(U(*info->pMoreInfo).pwszUrl, winehq),
"unexpected link value\n");
}
@@ -917,7 +917,7 @@ static void test_decodeSpOpusInfo(void)
ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, SPC_SP_OPUS_INFO_STRUCT,
spOpusInfoWithPublisherInfo, sizeof(spOpusInfoWithPublisherInfo),
CRYPT_DECODE_ALLOC_FLAG, NULL, &info, &size);
- ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError());
+ ok(ret, "CryptDecodeObjectEx failed: %08lx\n", GetLastError());
if (ret)
{
ok(!info->pwszProgramName, "expected NULL\n");
@@ -927,7 +927,7 @@ static void test_decodeSpOpusInfo(void)
if (info->pPublisherInfo)
{
ok(info->pPublisherInfo->dwLinkChoice == SPC_URL_LINK_CHOICE,
- "unexpected link choice %d\n",
+ "unexpected link choice %ld\n",
info->pPublisherInfo->dwLinkChoice);
ok(!lstrcmpW(U(*info->pPublisherInfo).pwszUrl, winehq),
"unexpected link value\n");
diff --git a/dlls/wintrust/tests/crypt.c b/dlls/wintrust/tests/crypt.c
index 5f9c402e00f..ca246776046 100644
--- a/dlls/wintrust/tests/crypt.c
+++ b/dlls/wintrust/tests/crypt.c
@@ -200,25 +200,25 @@ static void test_context(void)
ret = pCryptCATAdminAcquireContext(NULL, NULL, 0);
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER,
- "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* NULL GUID */
if (0) { /* crashes on 64-bit win10 */
ret = pCryptCATAdminAcquireContext(&hca, NULL, 0);
- ok(ret, "Expected success, got FALSE with %d\n", GetLastError());
+ ok(ret, "Expected success, got FALSE with %ld\n", GetLastError());
ok(hca != NULL, "Expected a context handle, got NULL\n");
/* Proper release */
SetLastError(0xdeadbeef);
ret = pCryptCATAdminReleaseContext(hca, 0);
- ok(ret, "Expected success, got FALSE with %d\n", GetLastError());
+ ok(ret, "Expected success, got FALSE with %ld\n", GetLastError());
/* Try to release a second time */
SetLastError(0xdeadbeef);
ret = pCryptCATAdminReleaseContext(hca, 0);
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER,
- "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
}
/* All NULL */
@@ -226,14 +226,14 @@ static void test_context(void)
ret = pCryptCATAdminReleaseContext(NULL, 0);
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER,
- "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* NULL context handle and dummy GUID */
SetLastError(0xdeadbeef);
ret = pCryptCATAdminAcquireContext(NULL, &dummy, 0);
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER,
- "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* Correct context handle and dummy GUID
*
@@ -246,7 +246,7 @@ static void test_context(void)
*/
ret = pCryptCATAdminAcquireContext(&hca, &dummy, 0);
- ok(ret || GetLastError() == ERROR_ACCESS_DENIED, "CryptCATAdminAcquireContext failed %u\n", GetLastError());
+ ok(ret || GetLastError() == ERROR_ACCESS_DENIED, "CryptCATAdminAcquireContext failed %lu\n", GetLastError());
if (!ret && GetLastError() == ERROR_ACCESS_DENIED)
{
win_skip("Not running as administrator\n");
@@ -276,15 +276,15 @@ static void test_context(void)
}
ret = pCryptCATAdminReleaseContext(hca, 0);
- ok(ret, "Expected success, got FALSE with %d\n", GetLastError());
+ ok(ret, "Expected success, got FALSE with %ld\n", GetLastError());
/* Correct context handle and GUID */
ret = pCryptCATAdminAcquireContext(&hca, &unknown, 0);
- ok(ret, "Expected success, got FALSE with %d\n", GetLastError());
+ ok(ret, "Expected success, got FALSE with %ld\n", GetLastError());
ok(hca != NULL, "Expected a context handle, got NULL\n");
ret = pCryptCATAdminReleaseContext(hca, 0);
- ok(ret, "Expected success, got FALSE with %d\n", GetLastError());
+ ok(ret, "Expected success, got FALSE with %ld\n", GetLastError());
hca = (void *) 0xdeadbeef;
SetLastError(0xdeadbeef);
@@ -292,14 +292,14 @@ static void test_context(void)
ret = pCryptCATAdminAcquireContext(&hca, &unknown, 1);
ok((!ret && (GetLastError() == ERROR_INVALID_PARAMETER) && (hca == (void *) 0xdeadbeef)) ||
broken(ret && hca != NULL && hca != (void *) 0xdeadbeef),
- "Expected FALSE and ERROR_INVALID_PARAMETER with untouched handle, got %d and %u with %p\n",
+ "Expected FALSE and ERROR_INVALID_PARAMETER with untouched handle, got %d and %lu with %p\n",
ret, GetLastError(), hca);
if (ret && hca)
{
SetLastError(0xdeadbeef);
ret = pCryptCATAdminReleaseContext(hca, 0);
- ok(ret, "Expected success, got FALSE with %d\n", GetLastError());
+ ok(ret, "Expected success, got FALSE with %ld\n", GetLastError());
}
}
@@ -319,14 +319,14 @@ static void test_calchash(void)
ret = pCryptCATAdminCalcHashFromFileHandle(NULL, NULL, NULL, 0);
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER,
- "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* NULL filehandle, rest is legal */
SetLastError(0xdeadbeef);
ret = pCryptCATAdminCalcHashFromFileHandle(NULL, &hashsize, NULL, 0);
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER,
- "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* Correct filehandle, rest is NULL */
file = CreateFileA(selfname, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL);
@@ -334,7 +334,7 @@ static void test_calchash(void)
ret = pCryptCATAdminCalcHashFromFileHandle(file, NULL, NULL, 0);
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER,
- "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
CloseHandle(file);
/* All OK, but dwFlags set to 1 */
@@ -343,18 +343,18 @@ static void test_calchash(void)
ret = pCryptCATAdminCalcHashFromFileHandle(file, &hashsize, NULL, 1);
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER,
- "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
CloseHandle(file);
/* All OK, requesting the size of the hash */
file = CreateFileA(selfname, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
- ok(file != INVALID_HANDLE_VALUE, "CreateFile failed %u\n", GetLastError());
+ ok(file != INVALID_HANDLE_VALUE, "CreateFile failed %lu\n", GetLastError());
SetLastError(0xdeadbeef);
ret = pCryptCATAdminCalcHashFromFileHandle(file, &hashsize, NULL, 0);
- ok(ret, "Expected success, got FALSE with %d\n", GetLastError());
- ok(hashsize == 20," Expected a hash size of 20, got %d\n", hashsize);
+ ok(ret, "Expected success, got FALSE with %ld\n", GetLastError());
+ ok(hashsize == 20," Expected a hash size of 20, got %ld\n", hashsize);
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER,
- "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError());
+ "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError());
CloseHandle(file);
/* All OK, retrieve the hash
@@ -365,10 +365,10 @@ static void test_calchash(void)
hash = HeapAlloc(GetProcessHeap(), 0, hashsize);
SetLastError(0xdeadbeef);
ret = pCryptCATAdminCalcHashFromFileHandle(file, &hashsize, hash, 0);
- ok(ret, "Expected success, got FALSE with %d\n", GetLastError());
- ok(hashsize == 20," Expected a hash size of 20, got %d\n", hashsize);
+ ok(ret, "Expected success, got FALSE with %ld\n", GetLastError());
+ ok(hashsize == 20," Expected a hash size of 20, got %ld\n", hashsize);
ok(GetLastError() == ERROR_SUCCESS,
- "Expected ERROR_SUCCESS, got %d\n", GetLastError());
+ "Expected ERROR_SUCCESS, got %ld\n", GetLastError());
CloseHandle(file);
HeapFree(GetProcessHeap(), 0, hash);
@@ -387,9 +387,9 @@ static void test_calchash(void)
hash = HeapAlloc(GetProcessHeap(), 0, hashsize);
SetLastError(0xdeadbeef);
ret = pCryptCATAdminCalcHashFromFileHandle(file, &hashsize, hash, 0);
- ok(ret, "Expected success, got FALSE with %d\n", GetLastError());
+ ok(ret, "Expected success, got FALSE with %ld\n", GetLastError());
ok(GetLastError() == ERROR_SUCCESS,
- "Expected ERROR_SUCCESS, got %d\n", GetLastError());
+ "Expected ERROR_SUCCESS, got %ld\n", GetLastError());
ok(hashsize == sizeof(expectedhash) &&
!memcmp(hash, expectedhash, sizeof(expectedhash)),
"Hashes didn't match\n");
@@ -414,7 +414,7 @@ static void test_CryptCATOpen(void)
SetLastError(0xdeadbeef);
cat = pCryptCATOpen(NULL, 0, 0, 0, 0);
ok(cat == INVALID_HANDLE_VALUE, "expected failure\n");
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %lu\n", GetLastError());
for (flags = 0; flags < 8; ++flags)
{
@@ -422,19 +422,19 @@ static void test_CryptCATOpen(void)
cat = pCryptCATOpen(filename, flags, 0, 0, 0);
if (flags == CRYPTCAT_OPEN_EXISTING)
{
- ok(cat == INVALID_HANDLE_VALUE, "flags %#x: expected failure\n", flags);
- ok(GetLastError() == ERROR_FILE_NOT_FOUND, "flags %#x: got error %u\n", flags, GetLastError());
+ ok(cat == INVALID_HANDLE_VALUE, "flags %#lx: expected failure\n", flags);
+ ok(GetLastError() == ERROR_FILE_NOT_FOUND, "flags %#lx: got error %lu\n", flags, GetLastError());
ret = DeleteFileW(filename);
- ok(!ret, "flags %#x: expected failure\n", flags);
+ ok(!ret, "flags %#lx: expected failure\n", flags);
}
else
{
- ok(cat != INVALID_HANDLE_VALUE, "flags %#x: expected success\n", flags);
- ok(!GetLastError(), "flags %#x: got error %u\n", flags, GetLastError());
+ ok(cat != INVALID_HANDLE_VALUE, "flags %#lx: expected success\n", flags);
+ ok(!GetLastError(), "flags %#lx: got error %lu\n", flags, GetLastError());
ret = pCryptCATClose(cat);
- ok(ret, "flags %#x: failed to close file\n", flags);
+ ok(ret, "flags %#lx: failed to close file\n", flags);
ret = DeleteFileW(filename);
- ok(ret, "flags %#x: failed to delete file, error %u\n", flags, GetLastError());
+ ok(ret, "flags %#lx: failed to delete file, error %lu\n", flags, GetLastError());
}
file = _wfopen(filename, L"w");
@@ -443,21 +443,21 @@ static void test_CryptCATOpen(void)
SetLastError(0xdeadbeef);
cat = pCryptCATOpen(filename, flags, 0, 0, 0);
- ok(cat != INVALID_HANDLE_VALUE, "flags %#x: expected success\n", flags);
- ok(!GetLastError(), "flags %#x: got error %u\n", flags, GetLastError());
+ ok(cat != INVALID_HANDLE_VALUE, "flags %#lx: expected success\n", flags);
+ ok(!GetLastError(), "flags %#lx: got error %lu\n", flags, GetLastError());
ret = pCryptCATClose(cat);
- ok(ret, "flags %#x: failed to close file\n", flags);
+ ok(ret, "flags %#lx: failed to close file\n", flags);
file = _wfopen(filename, L"r");
ret = fread(buffer, 1, sizeof(buffer), file);
if (flags & CRYPTCAT_OPEN_CREATENEW)
- ok(!ret, "flags %#x: got %s\n", flags, debugstr_an(buffer, ret));
+ ok(!ret, "flags %#lx: got %s\n", flags, debugstr_an(buffer, ret));
else
- ok(ret == 9 && !strncmp(buffer, "test text", ret), "flags %#x: got %s\n", flags, debugstr_an(buffer, ret));
+ ok(ret == 9 && !strncmp(buffer, "test text", ret), "flags %#lx: got %s\n", flags, debugstr_an(buffer, ret));
fclose(file);
ret = DeleteFileW(filename);
- ok(ret, "flags %#x: failed to delete file, error %u\n", flags, GetLastError());
+ ok(ret, "flags %#lx: failed to delete file, error %lu\n", flags, GetLastError());
}
}
@@ -466,7 +466,7 @@ static DWORD local_error;
static void WINAPI cdf_callback(DWORD area, DWORD error, WCHAR* line)
{
- ok(error_area != -2, "Didn't expect cdf_callback() to be called (%08x, %08x)\n",
+ ok(error_area != -2, "Didn't expect cdf_callback() to be called (%08lx, %08lx)\n",
area, error);
error_area = area;
@@ -489,33 +489,33 @@ static void test_CryptCATCDF_params(void)
catcdf = pCryptCATCDFOpen(NULL, NULL);
ok(catcdf == NULL, "CryptCATCDFOpen succeeded\n");
todo_wine
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef);
catcdf = pCryptCATCDFOpen(NULL, cdf_callback);
ok(catcdf == NULL, "CryptCATCDFOpen succeeded\n");
todo_wine
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* File doesn't exist */
SetLastError(0xdeadbeef);
catcdf = pCryptCATCDFOpen(nonexistent, cdf_callback);
ok(catcdf == NULL, "CryptCATCDFOpen succeeded\n");
todo_wine
- ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError());
+ ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", GetLastError());
SetLastError(0xdeadbeef);
ret = pCryptCATCDFClose(NULL);
ok(!ret, "Expected failure\n");
todo_wine
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
catcdf = NULL;
SetLastError(0xdeadbeef);
ret = pCryptCATCDFClose(catcdf);
ok(!ret, "Expected failure\n");
todo_wine
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
}
/* FIXME: Once Wine can create catalog files we should use the created catalog file in this test */
@@ -545,11 +545,11 @@ static void test_CryptCATAdminAddRemoveCatalog(void)
if (!GetTempFileNameA(CURR_DIR, "cat", 0, tmpfile)) return;
DeleteFileA(tmpfile);
file = CreateFileA(tmpfile, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, NULL);
- ok(file != INVALID_HANDLE_VALUE, "CreateFileA failed %u\n", GetLastError());
+ ok(file != INVALID_HANDLE_VALUE, "CreateFileA failed %lu\n", GetLastError());
CloseHandle(file);
ret = pCryptCATAdminAcquireContext(&hcatadmin, &dummy, 0);
- ok(ret || GetLastError() == ERROR_ACCESS_DENIED, "CryptCATAdminAcquireContext failed %u\n", GetLastError());
+ ok(ret || GetLastError() == ERROR_ACCESS_DENIED, "CryptCATAdminAcquireContext failed %lu\n", GetLastError());
if (!ret && GetLastError() == ERROR_ACCESS_DENIED)
{
win_skip("Not running as administrator\n");
@@ -560,13 +560,13 @@ static void test_CryptCATAdminAddRemoveCatalog(void)
hcatinfo = pCryptCATAdminAddCatalog(NULL, NULL, NULL, 0);
error = GetLastError();
ok(hcatinfo == NULL, "CryptCATAdminAddCatalog succeeded\n");
- ok(error == ERROR_INVALID_PARAMETER, "got %u expected ERROR_INVALID_PARAMETER\n", GetLastError());
+ ok(error == ERROR_INVALID_PARAMETER, "got %lu expected ERROR_INVALID_PARAMETER\n", GetLastError());
SetLastError(0xdeadbeef);
hcatinfo = pCryptCATAdminAddCatalog(hcatadmin, NULL, NULL, 0);
error = GetLastError();
ok(hcatinfo == NULL, "CryptCATAdminAddCatalog succeeded\n");
- ok(error == ERROR_INVALID_PARAMETER, "got %u expected ERROR_INVALID_PARAMETER\n", GetLastError());
+ ok(error == ERROR_INVALID_PARAMETER, "got %lu expected ERROR_INVALID_PARAMETER\n", GetLastError());
MultiByteToWideChar(CP_ACP, 0, tmpfile, -1, tmpfileW, MAX_PATH);
@@ -575,7 +575,7 @@ static void test_CryptCATAdminAddRemoveCatalog(void)
error = GetLastError();
todo_wine {
ok(hcatinfo == NULL, "CryptCATAdminAddCatalog succeeded\n");
- ok(error == ERROR_BAD_FORMAT, "got %u expected ERROR_BAD_FORMAT\n", GetLastError());
+ ok(error == ERROR_BAD_FORMAT, "got %lu expected ERROR_BAD_FORMAT\n", GetLastError());
}
if (hcatinfo != NULL)
pCryptCATAdminReleaseCatalogContext(hcatadmin, hcatinfo, 0);
@@ -586,17 +586,17 @@ static void test_CryptCATAdminAddRemoveCatalog(void)
ok(hcatinfo == NULL, "CryptCATAdminAddCatalog succeeded\n");
ok(error == ERROR_INVALID_PARAMETER ||
error == ERROR_BAD_FORMAT, /* win 8 */
- "got %u\n", GetLastError());
+ "got %lu\n", GetLastError());
SetLastError(0xdeadbeef);
hcatinfo = pCryptCATAdminAddCatalog(hcatadmin, tmpfileW, NULL, 0);
error = GetLastError();
ok(hcatinfo == NULL, "CryptCATAdminAddCatalog succeeded\n");
- todo_wine ok(error == ERROR_BAD_FORMAT, "got %u expected ERROR_BAD_FORMAT\n", GetLastError());
+ todo_wine ok(error == ERROR_BAD_FORMAT, "got %lu expected ERROR_BAD_FORMAT\n", GetLastError());
DeleteFileA(tmpfile);
file = CreateFileA(tmpfile, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, NULL);
- ok(file != INVALID_HANDLE_VALUE, "CreateFileA failed %u\n", GetLastError());
+ ok(file != INVALID_HANDLE_VALUE, "CreateFileA failed %lu\n", GetLastError());
WriteFile(file, test_catalog, sizeof(test_catalog), &written, NULL);
CloseHandle(file);
@@ -607,14 +607,14 @@ static void test_CryptCATAdminAddRemoveCatalog(void)
win_skip("Not enough rights\n");
goto cleanup;
}
- todo_wine ok(hcatinfo != NULL, "CryptCATAdminAddCatalog failed %u\n", GetLastError());
+ todo_wine ok(hcatinfo != NULL, "CryptCATAdminAddCatalog failed %lu\n", GetLastError());
info.cbStruct = sizeof(info);
info.wszCatalogFile[0] = 0;
ret = pCryptCATCatalogInfoFromContext(hcatinfo, &info, 0);
todo_wine
{
- ok(ret, "CryptCATCatalogInfoFromContext failed %u\n", GetLastError());
+ ok(ret, "CryptCATCatalogInfoFromContext failed %lu\n", GetLastError());
ok(info.wszCatalogFile[0] != 0, "Expected a filename\n");
}
WideCharToMultiByte(CP_ACP, 0, info.wszCatalogFile, -1, catfile, MAX_PATH, NULL, NULL);
@@ -625,11 +625,11 @@ static void test_CryptCATAdminAddRemoveCatalog(void)
/* Set the file attributes so we can check what happens with them during the 'copy' */
attrs = FILE_ATTRIBUTE_READONLY;
ret = SetFileAttributesA(tmpfile, attrs);
- ok(ret, "SetFileAttributesA failed : %u\n", GetLastError());
+ ok(ret, "SetFileAttributesA failed : %lu\n", GetLastError());
/* winetest.cat will be created */
hcatinfo = pCryptCATAdminAddCatalog(hcatadmin, tmpfileW, basenameW, 0);
- ok(hcatinfo != NULL, "CryptCATAdminAddCatalog failed %u\n", GetLastError());
+ ok(hcatinfo != NULL, "CryptCATAdminAddCatalog failed %lu\n", GetLastError());
lstrcpyA(catfilepath, catroot);
lstrcatA(catfilepath, "\\{DEADBEEF-DEAD-BEEF-DEAD-BEEFDEADBEEF}\\winetest.cat");
@@ -638,45 +638,45 @@ static void test_CryptCATAdminAddRemoveCatalog(void)
todo_wine
ok(attrs == FILE_ATTRIBUTE_SYSTEM ||
attrs == (FILE_ATTRIBUTE_NOT_CONTENT_INDEXED | FILE_ATTRIBUTE_SYSTEM), /* Vista */
- "File has wrong attributes : %08x\n", attrs);
+ "File has wrong attributes : %08lx\n", attrs);
info.cbStruct = sizeof(info);
info.wszCatalogFile[0] = 0;
ret = pCryptCATCatalogInfoFromContext(hcatinfo, &info, 0);
- ok(ret, "CryptCATCatalogInfoFromContext failed %u\n", GetLastError());
+ ok(ret, "CryptCATCatalogInfoFromContext failed %lu\n", GetLastError());
ok(info.wszCatalogFile[0] != 0, "Expected a filename\n");
WideCharToMultiByte(CP_ACP, 0, info.wszCatalogFile, -1, catfile, MAX_PATH, NULL, NULL);
if ((p = strrchr(catfile, '\\'))) p++;
ok(!lstrcmpA(basename, p), "Expected %s, got %s\n", basename, p);
ret = pCryptCATAdminReleaseCatalogContext(hcatadmin, hcatinfo, 0);
- ok(ret, "CryptCATAdminReleaseCatalogContext failed %u\n", GetLastError());
+ ok(ret, "CryptCATAdminReleaseCatalogContext failed %lu\n", GetLastError());
/* Remove the catalog file with the unique name */
ret = pCryptCATAdminRemoveCatalog(hcatadmin, catfileW, 0);
- ok(ret, "CryptCATAdminRemoveCatalog failed %u\n", GetLastError());
+ ok(ret, "CryptCATAdminRemoveCatalog failed %lu\n", GetLastError());
/* Remove the winetest.cat catalog file, first with the full path. This should not succeed
* according to MSDN */
ret = pCryptCATAdminRemoveCatalog(hcatadmin, info.wszCatalogFile, 0);
- ok(ret, "CryptCATAdminRemoveCatalog failed %u\n", GetLastError());
+ ok(ret, "CryptCATAdminRemoveCatalog failed %lu\n", GetLastError());
/* The call succeeded with the full path but the file is not removed */
attrs = GetFileAttributesA(catfilepath);
ok(attrs != INVALID_FILE_ATTRIBUTES, "Expected %s to exist\n", catfilepath);
/* Given only the filename the file is removed */
ret = pCryptCATAdminRemoveCatalog(hcatadmin, basenameW, 0);
- ok(ret, "CryptCATAdminRemoveCatalog failed %u\n", GetLastError());
+ ok(ret, "CryptCATAdminRemoveCatalog failed %lu\n", GetLastError());
attrs = GetFileAttributesA(catfilepath);
ok(attrs == INVALID_FILE_ATTRIBUTES, "Expected %s to be removed\n", catfilepath);
cleanup:
ret = pCryptCATAdminReleaseContext(hcatadmin, 0);
- ok(ret, "CryptCATAdminReleaseContext failed %u\n", GetLastError());
+ ok(ret, "CryptCATAdminReleaseContext failed %lu\n", GetLastError());
/* Set the attributes so we can delete the file */
attrs = FILE_ATTRIBUTE_NORMAL;
ret = SetFileAttributesA(tmpfile, attrs);
- ok(ret, "SetFileAttributesA failed %u\n", GetLastError());
+ ok(ret, "SetFileAttributesA failed %lu\n", GetLastError());
DeleteFileA(tmpfile);
}
@@ -705,7 +705,7 @@ static void test_catalog_properties(const char *catfile, int attributes, int mem
trace("Creating the catalog file\n");
if (!GetTempFileNameA(CURR_DIR, "cat", 0, catalog)) return;
file = CreateFileA(catalog, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
- ok(file != INVALID_HANDLE_VALUE, "CreateFileA failed %u\n", GetLastError());
+ ok(file != INVALID_HANDLE_VALUE, "CreateFileA failed %lu\n", GetLastError());
WriteFile(file, test_catalog, sizeof(test_catalog), &written, NULL);
CloseHandle(file);
@@ -725,7 +725,7 @@ static void test_catalog_properties(const char *catfile, int attributes, int mem
win_skip("CryptCATOpen on W2K can't handle catalog files with no members\n");
return;
}
- ok(hcat != INVALID_HANDLE_VALUE, "CryptCATOpen failed %u\n", GetLastError());
+ ok(hcat != INVALID_HANDLE_VALUE, "CryptCATOpen failed %lu\n", GetLastError());
m = pCryptCATEnumerateMember(NULL, NULL);
ok(m == NULL, "CryptCATEnumerateMember succeeded\n");
@@ -733,12 +733,12 @@ static void test_catalog_properties(const char *catfile, int attributes, int mem
m = NULL;
while ((m = pCryptCATEnumerateMember(hcat, m)))
{
- ok(m->cbStruct == sizeof(CRYPTCATMEMBER), "unexpected size %u\n", m->cbStruct);
+ ok(m->cbStruct == sizeof(CRYPTCATMEMBER), "unexpected size %lu\n", m->cbStruct);
todo_wine ok(!lstrcmpW(m->pwszReferenceTag, hashmeW), "unexpected tag\n");
ok(!memcmp(&m->gSubjectType, &subject, sizeof(subject)), "guid differs\n");
- ok(!m->fdwMemberFlags, "got %x expected 0\n", m->fdwMemberFlags);
- ok(m->dwCertVersion == 0x200, "got %x expected 0x200\n", m->dwCertVersion);
- ok(!m->dwReserved, "got %x expected 0\n", m->dwReserved);
+ ok(!m->fdwMemberFlags, "got %lx expected 0\n", m->fdwMemberFlags);
+ ok(m->dwCertVersion == 0x200, "got %lx expected 0x200\n", m->dwCertVersion);
+ ok(!m->dwReserved, "got %lx expected 0\n", m->dwReserved);
ok(m->hReserved == NULL, "got %p expected NULL\n", m->hReserved);
attr = pCryptCATEnumerateAttr(hcat, m, NULL);
@@ -793,7 +793,7 @@ static void test_create_catalog_file(void)
/* Create the cdf file */
file = CreateFileA(cdffileA, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
- ok(file != INVALID_HANDLE_VALUE, "CreateFileA failed %u\n", GetLastError());
+ ok(file != INVALID_HANDLE_VALUE, "CreateFileA failed %lu\n", GetLastError());
WriteFile(file, test_cdf, sizeof(test_cdf) - 1, &written, NULL);
CloseHandle(file);
@@ -804,14 +804,14 @@ static void test_create_catalog_file(void)
todo_wine
{
ok(catcdf != NULL, "CryptCATCDFOpen failed\n");
- ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError());
+ ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError());
}
ret = pCryptCATCDFClose(catcdf);
todo_wine
{
- ok(ret, "Expected success, got FALSE with %d\n", GetLastError());
- ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError());
+ ok(ret, "Expected success, got FALSE with %ld\n", GetLastError());
+ ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError());
}
attrs = GetFileAttributesA(catfileA);
@@ -893,15 +893,15 @@ static void create_cdf_file(const CHAR *filename, const CHAR *contents)
DWORD written;
file = CreateFileA(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
- ok(file != INVALID_HANDLE_VALUE, "CreateFileA failed %u\n", GetLastError());
+ ok(file != INVALID_HANDLE_VALUE, "CreateFileA failed %lu\n", GetLastError());
WriteFile(file, contents, lstrlenA(contents), &written, NULL);
CloseHandle(file);
}
#define CHECK_EXPECT(a, b) \
do { \
- ok(a == error_area, "Expected %08x, got %08x\n", a, error_area); \
- ok(b == local_error, "Expected %08x, got %08x\n", b, local_error); \
+ ok(a == error_area, "Expected %08x, got %08lx\n", a, error_area); \
+ ok(b == local_error, "Expected %08x, got %08lx\n", b, local_error); \
} while (0)
/* Clear the variables (can't use 0) */
@@ -940,7 +940,7 @@ static void test_cdf_parsing(void)
CHECK_EXPECT(CRYPTCAT_E_AREA_HEADER, CRYPTCAT_E_CDF_TAGNOTFOUND);
ok(catcdf == NULL, "CryptCATCDFOpen succeeded\n");
todo_wine
- ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError());
+ ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError());
DeleteFileA(cdffileA);
ok(!DeleteFileA(catfileA), "Didn't expect a catalog file to be created\n");
@@ -954,7 +954,7 @@ static void test_cdf_parsing(void)
ok(catcdf == NULL, "CryptCATCDFOpen succeeded\n");
todo_wine
ok(GetLastError() == ERROR_SHARING_VIOLATION,
- "Expected ERROR_SHARING_VIOLATION, got %d\n", GetLastError());
+ "Expected ERROR_SHARING_VIOLATION, got %ld\n", GetLastError());
DeleteFileA(cdffileA);
/* Header and member only */
@@ -969,7 +969,7 @@ static void test_cdf_parsing(void)
ok(catcdf == NULL, "CryptCATCDFOpen succeeded\n");
todo_wine
ok(GetLastError() == ERROR_SHARING_VIOLATION,
- "Expected ERROR_SHARING_VIOLATION, got %d\n", GetLastError());
+ "Expected ERROR_SHARING_VIOLATION, got %ld\n", GetLastError());
DeleteFileA(cdffileA);
ok(!DeleteFileA(catfileA), "Didn't expect a catalog file to be created\n");
@@ -984,7 +984,7 @@ static void test_cdf_parsing(void)
ok(catcdf == NULL, "CryptCATCDFOpen succeeded\n");
todo_wine
ok(GetLastError() == ERROR_SHARING_VIOLATION,
- "Expected ERROR_SHARING_VIOLATION, got %d\n", GetLastError());
+ "Expected ERROR_SHARING_VIOLATION, got %ld\n", GetLastError());
DeleteFileA(cdffileA);
ok(!DeleteFileA(catfileA), "Didn't expect a catalog file to be created\n");
@@ -999,7 +999,7 @@ static void test_cdf_parsing(void)
todo_wine
{
ok(catcdf != NULL, "CryptCATCDFOpen failed\n");
- ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError());
+ ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError());
}
pCryptCATCDFClose(catcdf);
DeleteFileA(cdffileA);
@@ -1019,7 +1019,7 @@ static void test_cdf_parsing(void)
todo_wine
{
ok(catcdf != NULL, "CryptCATCDFOpen failed\n");
- ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError());
+ ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError());
}
/* Loop through the members */
CLEAR_EXPECT;
@@ -1046,7 +1046,7 @@ static void test_cdf_parsing(void)
todo_wine
{
ok(catcdf != NULL, "CryptCATCDFOpen failed\n");
- ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError());
+ ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError());
}
/* Loop through the members */
CLEAR_EXPECT;
@@ -1054,9 +1054,9 @@ static void test_cdf_parsing(void)
catmembertag = NULL;
while ((catmembertag = pCryptCATCDFEnumMembersByCDFTagEx(catcdf, catmembertag, cdf_callback, &catmember, FALSE, NULL))) ;
ok(error_area == 0xffffffff || broken(error_area == CRYPTCAT_E_AREA_MEMBER) /* < win81 */,
- "Expected area 0xffffffff, got %08x\n", error_area);
+ "Expected area 0xffffffff, got %08lx\n", error_area);
ok(local_error == 0xffffffff || broken(local_error == CRYPTCAT_E_CDF_MEMBER_FILE_PATH) /* < win81 */,
- "Expected error 0xffffffff, got %08x\n", local_error);
+ "Expected error 0xffffffff, got %08lx\n", local_error);
pCryptCATCDFClose(catcdf);
DeleteFileA(cdffileA);
@@ -1077,7 +1077,7 @@ static void test_cdf_parsing(void)
todo_wine
{
ok(catcdf != NULL, "CryptCATCDFOpen failed\n");
- ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError());
+ ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError());
}
/* Loop through the members */
SET_UNEXPECTED;
@@ -1102,7 +1102,7 @@ static void test_cdf_parsing(void)
todo_wine
{
ok(catcdf != NULL, "CryptCATCDFOpen failed\n");
- ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError());
+ ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError());
}
/* Loop through the attributes */
CLEAR_EXPECT;
@@ -1130,7 +1130,7 @@ static void test_cdf_parsing(void)
todo_wine
{
ok(catcdf != NULL, "CryptCATCDFOpen failed\n");
- ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError());
+ ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError());
}
/* Loop through the members */
SET_UNEXPECTED;
@@ -1162,7 +1162,7 @@ static void test_cdf_parsing(void)
todo_wine
{
ok(catcdf != NULL, "CryptCATCDFOpen failed\n");
- ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError());
+ ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError());
}
/* Loop through the members */
SET_UNEXPECTED;
@@ -1266,26 +1266,26 @@ static void test_sip(void)
info.cbSize = sizeof(SIP_SUBJECTINFO);
info.pgSubjectType = &guid;
ret = CryptSIPRetrieveSubjectGuid(NULL, file, info.pgSubjectType);
- ok(ret, "CryptSIPRetrieveSubjectGuid failed (%x)\n", GetLastError());
+ ok(ret, "CryptSIPRetrieveSubjectGuid failed (%lx)\n", GetLastError());
ret = pPutSignedDataMsg(&info, X509_ASN_ENCODING, &index, 4, (BYTE*)"test");
ok(!ret, "CryptSIPPutSignedDataMsg succeeded\n");
index = GetLastError();
- ok(index == ERROR_PATH_NOT_FOUND, "GetLastError returned %x\n", index);
+ ok(index == ERROR_PATH_NOT_FOUND, "GetLastError returned %lx\n", index);
info.hFile = file;
info.pwsFileName = nameW;
ret = pPutSignedDataMsg(&info, X509_ASN_ENCODING, &index, 4, (BYTE*)"test");
ok(!ret, "CryptSIPPutSignedDataMsg succeeded\n");
index = GetLastError();
- todo_wine ok(index == ERROR_INVALID_PARAMETER, "GetLastError returned %x\n", index);
+ todo_wine ok(index == ERROR_INVALID_PARAMETER, "GetLastError returned %lx\n", index);
info.hFile = INVALID_HANDLE_VALUE;
info.pwsFileName = nameW;
ret = pPutSignedDataMsg(&info, X509_ASN_ENCODING, &index, 4, (BYTE*)"test");
ok(!ret, "CryptSIPPutSignedDataMsg succeeded\n");
index = GetLastError();
- ok(index == ERROR_SHARING_VIOLATION, "GetLastError returned %x\n", index);
+ ok(index == ERROR_SHARING_VIOLATION, "GetLastError returned %lx\n", index);
CloseHandle(file);
file= CreateFileW(nameW, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
@@ -1293,8 +1293,8 @@ static void test_sip(void)
info.hFile = file;
info.pwsFileName = (void*)0xdeadbeef;
ret = pPutSignedDataMsg(&info, X509_ASN_ENCODING, &index, 4, (BYTE*)"test");
- ok(ret, "CryptSIPPutSignedDataMsg failed (%x)\n", GetLastError());
- ok(index == 0, "index = %x\n", index);
+ ok(ret, "CryptSIPPutSignedDataMsg failed (%lx)\n", GetLastError());
+ ok(index == 0, "index = %lx\n", index);
CloseHandle(file);
file= CreateFileW(nameW, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
@@ -1302,33 +1302,33 @@ static void test_sip(void)
info.hFile = INVALID_HANDLE_VALUE;
info.pwsFileName = nameW;
ret = pPutSignedDataMsg(&info, X509_ASN_ENCODING, &index, 14, (BYTE*)"longer message");
- ok(ret, "CryptSIPPutSignedDataMsg failed (%x)\n", GetLastError());
- ok(index == 1, "index = %x\n", index);
+ ok(ret, "CryptSIPPutSignedDataMsg failed (%lx)\n", GetLastError());
+ ok(index == 1, "index = %lx\n", index);
size = 0;
encoding = 0xdeadbeef;
ret = pGetSignedDataMsg(&info, &encoding, 0, &size, NULL);
- ok(ret, "CryptSIPGetSignedDataMsg failed (%x)\n", GetLastError());
- ok(encoding == 0xdeadbeef, "encoding = %x\n", encoding);
- ok(size == 16, "size = %d\n", size);
+ ok(ret, "CryptSIPGetSignedDataMsg failed (%lx)\n", GetLastError());
+ ok(encoding == 0xdeadbeef, "encoding = %lx\n", encoding);
+ ok(size == 16, "size = %ld\n", size);
ret = pGetSignedDataMsg(&info, &encoding, 0, &size, (BYTE*)buf);
- ok(ret, "CryptSIPGetSignedDataMsg failed (%x)\n", GetLastError());
- ok(encoding == (X509_ASN_ENCODING|PKCS_7_ASN_ENCODING), "encoding = %x\n", encoding);
- ok(size == 8, "size = %d\n", size);
+ ok(ret, "CryptSIPGetSignedDataMsg failed (%lx)\n", GetLastError());
+ ok(encoding == (X509_ASN_ENCODING|PKCS_7_ASN_ENCODING), "encoding = %lx\n", encoding);
+ ok(size == 8, "size = %ld\n", size);
ok(!memcmp(buf, "test\0\0\0\0", 8), "buf = %s\n", buf);
size = 0;
encoding = 0xdeadbeef;
ret = pGetSignedDataMsg(&info, &encoding, 1, &size, NULL);
- ok(ret, "CryptSIPGetSignedDataMsg failed (%x)\n", GetLastError());
- ok(encoding == 0xdeadbeef, "encoding = %x\n", encoding);
- ok(size == 24, "size = %d\n", size);
+ ok(ret, "CryptSIPGetSignedDataMsg failed (%lx)\n", GetLastError());
+ ok(encoding == 0xdeadbeef, "encoding = %lx\n", encoding);
+ ok(size == 24, "size = %ld\n", size);
ret = pGetSignedDataMsg(&info, &encoding, 1, &size, (BYTE*)buf);
- ok(ret, "CryptSIPGetSignedDataMsg failed (%x)\n", GetLastError());
- ok(encoding == (X509_ASN_ENCODING|PKCS_7_ASN_ENCODING), "encoding = %x\n", encoding);
- ok(size == 16, "size = %d\n", size);
+ ok(ret, "CryptSIPGetSignedDataMsg failed (%lx)\n", GetLastError());
+ ok(encoding == (X509_ASN_ENCODING|PKCS_7_ASN_ENCODING), "encoding = %lx\n", encoding);
+ ok(size == 16, "size = %ld\n", size);
ok(!strcmp(buf, "longer message"), "buf = %s\n", buf);
CryptReleaseContext(info.hProv, 0);
diff --git a/dlls/wintrust/tests/register.c b/dlls/wintrust/tests/register.c
index 32c87827491..bf4746d9284 100644
--- a/dlls/wintrust/tests/register.c
+++ b/dlls/wintrust/tests/register.c
@@ -76,7 +76,7 @@ static void test_AddRem_ActionID(void)
ok (!ret, "Expected WintrustAddActionID to fail.\n");
ok (GetLastError() == ERROR_INVALID_PARAMETER /* XP/W2K3 */ ||
GetLastError() == 0xdeadbeef /* Win98/NT4/W2K */,
- "Expected ERROR_INVALID_PARAMETER(W2K3) or 0xdeadbeef(Win98/NT4/W2K), got %u.\n", GetLastError());
+ "Expected ERROR_INVALID_PARAMETER(W2K3) or 0xdeadbeef(Win98/NT4/W2K), got %lu.\n", GetLastError());
/* NULL functions */
SetLastError(0xdeadbeef);
@@ -84,7 +84,7 @@ static void test_AddRem_ActionID(void)
ok (!ret, "Expected WintrustAddActionID to fail.\n");
ok (GetLastError() == ERROR_INVALID_PARAMETER /* XP/W2K3 */ ||
GetLastError() == 0xdeadbeef /* Win98/NT4/W2K */,
- "Expected ERROR_INVALID_PARAMETER(W2K3) or 0xdeadbeef(Win98/NT4/W2K), got %u.\n", GetLastError());
+ "Expected ERROR_INVALID_PARAMETER(W2K3) or 0xdeadbeef(Win98/NT4/W2K), got %lu.\n", GetLastError());
/* All OK (although no functions defined), except cbStruct is not set in ActionIDFunctions */
SetLastError(0xdeadbeef);
@@ -93,7 +93,7 @@ static void test_AddRem_ActionID(void)
ok (!ret, "Expected WintrustAddActionID to fail.\n");
ok (GetLastError() == ERROR_INVALID_PARAMETER /* XP/W2K3 */ ||
GetLastError() == 0xdeadbeef /* Win98/NT4/W2K */,
- "Expected ERROR_INVALID_PARAMETER(W2K3) or 0xdeadbeef(Win98/NT4/W2K), got %u.\n", GetLastError());
+ "Expected ERROR_INVALID_PARAMETER(W2K3) or 0xdeadbeef(Win98/NT4/W2K), got %lu.\n", GetLastError());
/* All OK (although no functions defined) and cbStruct is set now */
SetLastError(0xdeadbeef);
@@ -102,7 +102,7 @@ static void test_AddRem_ActionID(void)
ret = pWintrustAddActionID(&ActionID, 0, &ActionIDFunctions);
ok (ret, "Expected WintrustAddActionID to succeed.\n");
ok (GetLastError() == ERROR_INVALID_PARAMETER,
- "Expected ERROR_INVALID_PARAMETER, got %u.\n", GetLastError());
+ "Expected ERROR_INVALID_PARAMETER, got %lu.\n", GetLastError());
/* All OK and all (but 1) functions are correctly defined. The DLL and entrypoints
* are not present.
@@ -122,7 +122,7 @@ static void test_AddRem_ActionID(void)
ok (ret, "Expected WintrustAddActionID to succeed.\n");
ok (GetLastError() == ERROR_INVALID_PARAMETER ||
GetLastError() == ERROR_ACCESS_DENIED,
- "Expected ERROR_INVALID_PARAMETER or ERROR_ACCESS_DENIED, got %u.\n",
+ "Expected ERROR_INVALID_PARAMETER or ERROR_ACCESS_DENIED, got %lu.\n",
GetLastError());
/* All OK and all functions are correctly defined. The DLL and entrypoints
@@ -142,27 +142,27 @@ static void test_AddRem_ActionID(void)
ret = pWintrustAddActionID(&ActionID, 0, &ActionIDFunctions);
ok (ret, "Expected WintrustAddActionID to succeed.\n");
ok (GetLastError() == 0xdeadbeef || GetLastError() == ERROR_ACCESS_DENIED,
- "Expected 0xdeadbeef or ERROR_ACCESS_DENIED, got %u.\n",
+ "Expected 0xdeadbeef or ERROR_ACCESS_DENIED, got %lu.\n",
GetLastError());
SetLastError(0xdeadbeef);
ret = pWintrustRemoveActionID(&ActionID);
- ok ( ret, "WintrustRemoveActionID failed : %d\n", GetLastError());
- ok ( GetLastError() == 0xdeadbeef, "Last error should not have been changed: %u\n", GetLastError());
+ ok ( ret, "WintrustRemoveActionID failed : %ld\n", GetLastError());
+ ok ( GetLastError() == 0xdeadbeef, "Last error should not have been changed: %lu\n", GetLastError());
/* NULL input */
SetLastError(0xdeadbeef);
ret = pWintrustRemoveActionID(NULL);
ok (ret, "Expected WintrustRemoveActionID to succeed.\n");
ok (GetLastError() == ERROR_INVALID_PARAMETER,
- "Expected ERROR_INVALID_PARAMETER, got %u.\n", GetLastError());
+ "Expected ERROR_INVALID_PARAMETER, got %lu.\n", GetLastError());
/* The passed GUID is removed by a previous call, so it's basically a test with a nonexistent Trust provider */
SetLastError(0xdeadbeef);
ret = pWintrustRemoveActionID(&ActionID);
ok (ret, "Expected WintrustRemoveActionID to succeed.\n");
ok (GetLastError() == 0xdeadbeef,
- "Expected 0xdeadbeef, got %u.\n", GetLastError());
+ "Expected 0xdeadbeef, got %lu.\n", GetLastError());
}
static void test_AddDefaultForUsage(void)
@@ -185,14 +185,14 @@ static void test_AddDefaultForUsage(void)
ret = pWintrustAddDefaultForUsage(NULL, NULL);
ok (!ret, "Expected WintrustAddDefaultForUsage to fail.\n");
ok (GetLastError() == ERROR_INVALID_PARAMETER,
- "Expected ERROR_INVALID_PARAMETER, got %u.\n", GetLastError());
+ "Expected ERROR_INVALID_PARAMETER, got %lu.\n", GetLastError());
/* NULL defusage */
SetLastError(0xdeadbeef);
ret = pWintrustAddDefaultForUsage(oid, NULL);
ok (!ret, "Expected WintrustAddDefaultForUsage to fail.\n");
ok (GetLastError() == ERROR_INVALID_PARAMETER,
- "Expected ERROR_INVALID_PARAMETER, got %u.\n", GetLastError());
+ "Expected ERROR_INVALID_PARAMETER, got %lu.\n", GetLastError());
/* NULL oid and proper defusage */
memset(&DefUsage, 0 , sizeof(CRYPT_PROVIDER_REGDEFUSAGE));
@@ -205,7 +205,7 @@ static void test_AddDefaultForUsage(void)
ret = pWintrustAddDefaultForUsage(NULL, &DefUsage);
ok (!ret, "Expected WintrustAddDefaultForUsage to fail.\n");
ok (GetLastError() == ERROR_INVALID_PARAMETER,
- "Expected ERROR_INVALID_PARAMETER, got %u.\n", GetLastError());
+ "Expected ERROR_INVALID_PARAMETER, got %lu.\n", GetLastError());
/* cbStruct set to 0 */
memset(&DefUsage, 0 , sizeof(CRYPT_PROVIDER_REGDEFUSAGE));
@@ -218,7 +218,7 @@ static void test_AddDefaultForUsage(void)
ret = pWintrustAddDefaultForUsage(oid, &DefUsage);
ok (!ret, "Expected WintrustAddDefaultForUsage to fail.\n");
ok (GetLastError() == ERROR_INVALID_PARAMETER,
- "Expected ERROR_INVALID_PARAMETER, got %u.\n", GetLastError());
+ "Expected ERROR_INVALID_PARAMETER, got %lu.\n", GetLastError());
}
static void test_LoadFunctionPointers(void)
@@ -244,7 +244,7 @@ static void test_LoadFunctionPointers(void)
ok(!ret, "WintrustLoadFunctionPointers succeeded\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER ||
GetLastError() == 0xdeadbeef /* W2K and XP-SP1 */,
- "Expected ERROR_INVALID_PARAMETER or 0xdeadbeef, got %d\n", GetLastError());
+ "Expected ERROR_INVALID_PARAMETER or 0xdeadbeef, got %ld\n", GetLastError());
SetLastError(0xdeadbeef);
funcs.cbStruct = 0;
@@ -253,7 +253,7 @@ static void test_LoadFunctionPointers(void)
SetLastError(0xdeadbeef);
funcs.cbStruct = sizeof(funcs);
ret = pWintrustLoadFunctionPointers(&action, &funcs);
- ok(ret, "WintrustLoadFunctionPointers failed: %d\n", GetLastError());
+ ok(ret, "WintrustLoadFunctionPointers failed: %ld\n", GetLastError());
ok(funcs.pfnAlloc != NULL, "Expected a pointer\n");
ok(funcs.pfnFree != NULL, "Expected a pointer\n");
}
@@ -286,21 +286,21 @@ static void test_RegPolicyFlags(void)
r = RegOpenKeyExA(HKEY_CURRENT_USER, Software_Publishing, 0, KEY_ALL_ACCESS,
&key);
- ok(!r, "RegOpenKeyEx failed: %d\n", r);
+ ok(!r, "RegOpenKeyEx failed: %ld\n", r);
size = sizeof(flags1);
r = RegQueryValueExA(key, State, NULL, NULL, (LPBYTE)&flags1, &size);
- ok(!r || r == ERROR_FILE_NOT_FOUND, "RegQueryValueEx failed: %d\n", r);
+ ok(!r || r == ERROR_FILE_NOT_FOUND, "RegQueryValueEx failed: %ld\n", r);
if (!r)
- ok(flags1 == flags2, "Got %08x flags instead of %08x\n", flags1, flags2);
+ ok(flags1 == flags2, "Got %08lx flags instead of %08lx\n", flags1, flags2);
flags3 = flags2 | 1;
ret = pWintrustSetRegPolicyFlags(flags3);
- ok(ret, "WintrustSetRegPolicyFlags failed: %d\n", GetLastError());
+ ok(ret, "WintrustSetRegPolicyFlags failed: %ld\n", GetLastError());
size = sizeof(flags1);
r = RegQueryValueExA(key, State, NULL, NULL, (LPBYTE)&flags1, &size);
- ok(!r, "RegQueryValueEx failed: %d\n", r);
- ok(flags1 == flags3, "Got %08x flags instead of %08x\n", flags1, flags3);
+ ok(!r, "RegQueryValueEx failed: %ld\n", r);
+ ok(flags1 == flags3, "Got %08lx flags instead of %08lx\n", flags1, flags3);
pWintrustSetRegPolicyFlags(flags2);
diff --git a/dlls/wintrust/tests/softpub.c b/dlls/wintrust/tests/softpub.c
index 25d458faad7..8195e6006b1 100644
--- a/dlls/wintrust/tests/softpub.c
+++ b/dlls/wintrust/tests/softpub.c
@@ -138,8 +138,8 @@ static void test_utils(SAFE_PROVIDER_FUNCTIONS *funcs)
if (store)
{
ret = funcs->pfnAddStore2Chain(&data, store);
- ok(ret, "pfnAddStore2Chain failed: %08x\n", GetLastError());
- ok(data.chStores == 1, "Expected 1 store, got %d\n", data.chStores);
+ ok(ret, "pfnAddStore2Chain failed: %08lx\n", GetLastError());
+ ok(data.chStores == 1, "Expected 1 store, got %ld\n", data.chStores);
ok(data.pahStores != NULL, "Expected pahStores to be allocated\n");
if (data.pahStores)
{
@@ -153,15 +153,15 @@ static void test_utils(SAFE_PROVIDER_FUNCTIONS *funcs)
}
}
else
- skip("CertOpenStore failed: %08x\n", GetLastError());
+ skip("CertOpenStore failed: %08lx\n", GetLastError());
/* Crash
ret = funcs->pfnAddSgnr2Chain(NULL, FALSE, 0, NULL);
ret = funcs->pfnAddSgnr2Chain(&data, FALSE, 0, NULL);
*/
ret = funcs->pfnAddSgnr2Chain(&data, FALSE, 0, &sgnr);
- ok(ret, "pfnAddSgnr2Chain failed: %08x\n", GetLastError());
- ok(data.csSigners == 1, "Expected 1 signer, got %d\n", data.csSigners);
+ ok(ret, "pfnAddSgnr2Chain failed: %08lx\n", GetLastError());
+ ok(data.csSigners == 1, "Expected 1 signer, got %ld\n", data.csSigners);
ok(data.pasSigners != NULL, "Expected pasSigners to be allocated\n");
if (data.pasSigners)
{
@@ -173,15 +173,15 @@ static void test_utils(SAFE_PROVIDER_FUNCTIONS *funcs)
sgnr.cbStruct = sizeof(CRYPT_PROVIDER_SGNR);
sgnr.sftVerifyAsOf.dwLowDateTime = 0xdeadbeef;
ret = funcs->pfnAddSgnr2Chain(&data, FALSE, 1, &sgnr);
- ok(ret, "pfnAddSgnr2Chain failed: %08x\n", GetLastError());
- ok(data.csSigners == 2, "Expected 2 signers, got %d\n", data.csSigners);
+ ok(ret, "pfnAddSgnr2Chain failed: %08lx\n", GetLastError());
+ ok(data.csSigners == 2, "Expected 2 signers, got %ld\n", data.csSigners);
ok(!memcmp(&data.pasSigners[1], &sgnr, sizeof(sgnr)),
"Unexpected data in signer\n");
/* This also adds, but the index is ignored */
sgnr.cbStruct = sizeof(DWORD);
ret = funcs->pfnAddSgnr2Chain(&data, FALSE, 0, &sgnr);
- ok(ret, "pfnAddSgnr2Chain failed: %08x\n", GetLastError());
- ok(data.csSigners == 3, "Expected 3 signers, got %d\n", data.csSigners);
+ ok(ret, "pfnAddSgnr2Chain failed: %08lx\n", GetLastError());
+ ok(data.csSigners == 3, "Expected 3 signers, got %ld\n", data.csSigners);
sgnr.sftVerifyAsOf.dwLowDateTime = 0;
todo_wine
ok(!memcmp(&data.pasSigners[2], &sgnr, sizeof(sgnr)),
@@ -191,7 +191,7 @@ static void test_utils(SAFE_PROVIDER_FUNCTIONS *funcs)
SetLastError(0xdeadbeef);
ret = funcs->pfnAddSgnr2Chain(&data, FALSE, 0, &sgnr);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
- "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* Crash
ret = funcs->pfnAddCert2Chain(NULL, 0, FALSE, 0, NULL);
@@ -206,8 +206,8 @@ static void test_utils(SAFE_PROVIDER_FUNCTIONS *funcs)
* 2. An invalid signer index isn't checked.
*/
ret = funcs->pfnAddCert2Chain(&data, 0, FALSE, 0, cert);
- ok(ret, "pfnAddCert2Chain failed: %08x\n", GetLastError());
- ok(data.pasSigners[0].csCertChain == 1, "Expected 1 cert, got %d\n",
+ ok(ret, "pfnAddCert2Chain failed: %08lx\n", GetLastError());
+ ok(data.pasSigners[0].csCertChain == 1, "Expected 1 cert, got %ld\n",
data.pasSigners[0].csCertChain);
ok(data.pasSigners[0].pasCertChain != NULL,
"Expected pasCertChain to be allocated\n");
@@ -221,7 +221,7 @@ static void test_utils(SAFE_PROVIDER_FUNCTIONS *funcs)
CertFreeCertificateContext(cert);
}
else
- skip("CertCreateCertificateContext failed: %08x\n", GetLastError());
+ skip("CertCreateCertificateContext failed: %08lx\n", GetLastError());
funcs->pfnFree(data.pasSigners);
}
}
@@ -243,7 +243,7 @@ static void testInitialize(SAFE_PROVIDER_FUNCTIONS *funcs, GUID *actionID)
*/
memset(&data, 0, sizeof(data));
ret = funcs->pfnInitialize(&data);
- ok(ret == S_FALSE, "Expected S_FALSE, got %08x\n", ret);
+ ok(ret == S_FALSE, "Expected S_FALSE, got %08lx\n", ret);
data.padwTrustStepErrors =
funcs->pfnAlloc(TRUSTERROR_MAX_STEPS * sizeof(DWORD));
/* Without wintrust data set, crashes when padwTrustStepErrors is set */
@@ -254,17 +254,17 @@ static void testInitialize(SAFE_PROVIDER_FUNCTIONS *funcs, GUID *actionID)
memset(data.padwTrustStepErrors, 0,
TRUSTERROR_MAX_STEPS * sizeof(DWORD));
ret = funcs->pfnInitialize(&data);
- ok(ret == S_OK, "Expected S_OK, got %08x\n", ret);
+ ok(ret == S_OK, "Expected S_OK, got %08lx\n", ret);
data.cdwTrustStepErrors = 1;
ret = funcs->pfnInitialize(&data);
- ok(ret == S_OK, "Expected S_OK, got %08x\n", ret);
+ ok(ret == S_OK, "Expected S_OK, got %08lx\n", ret);
memset(data.padwTrustStepErrors, 0xba,
TRUSTERROR_MAX_STEPS * sizeof(DWORD));
ret = funcs->pfnInitialize(&data);
- ok(ret == S_FALSE, "Expected S_FALSE, got %08x\n", ret);
+ ok(ret == S_FALSE, "Expected S_FALSE, got %08lx\n", ret);
data.padwTrustStepErrors[TRUSTERROR_STEP_FINAL_WVTINIT] = 0;
ret = funcs->pfnInitialize(&data);
- ok(ret == S_OK, "Expected S_OK, got %08x\n", ret);
+ ok(ret == S_OK, "Expected S_OK, got %08lx\n", ret);
funcs->pfnFree(data.padwTrustStepErrors);
}
}
@@ -333,28 +333,28 @@ static void testObjTrust(SAFE_PROVIDER_FUNCTIONS *funcs, GUID *actionID)
0x00,0x00,0x00,0x00,0x00 } };
ret = funcs->pfnObjectTrust(&data);
- ok(ret == S_FALSE, "Expected S_FALSE, got %08x\n", ret);
+ ok(ret == S_FALSE, "Expected S_FALSE, got %08lx\n", ret);
ok(data.padwTrustStepErrors[TRUSTERROR_STEP_FINAL_OBJPROV] ==
ERROR_INVALID_PARAMETER,
- "Expected ERROR_INVALID_PARAMETER, got %08x\n",
+ "Expected ERROR_INVALID_PARAMETER, got %08lx\n",
data.padwTrustStepErrors[TRUSTERROR_STEP_FINAL_OBJPROV]);
U(wintrust_data).pCert = &certInfo;
wintrust_data.dwUnionChoice = WTD_CHOICE_CERT;
ret = funcs->pfnObjectTrust(&data);
- ok(ret == S_OK, "Expected S_OK, got %08x\n", ret);
+ ok(ret == S_OK, "Expected S_OK, got %08lx\n", ret);
certInfo.psCertContext = (PCERT_CONTEXT)CertCreateCertificateContext(
X509_ASN_ENCODING, v1CertWithPubKey, sizeof(v1CertWithPubKey));
ret = funcs->pfnObjectTrust(&data);
- ok(ret == S_OK, "Expected S_OK, got %08x\n", ret);
+ ok(ret == S_OK, "Expected S_OK, got %08lx\n", ret);
CertFreeCertificateContext(certInfo.psCertContext);
certInfo.psCertContext = NULL;
wintrust_data.dwUnionChoice = WTD_CHOICE_FILE;
U(wintrust_data).pFile = NULL;
ret = funcs->pfnObjectTrust(&data);
- ok(ret == S_FALSE, "Expected S_FALSE, got %08x\n", ret);
+ ok(ret == S_FALSE, "Expected S_FALSE, got %08lx\n", ret);
ok(data.padwTrustStepErrors[TRUSTERROR_STEP_FINAL_OBJPROV] ==
ERROR_INVALID_PARAMETER,
- "Expected ERROR_INVALID_PARAMETER, got %08x\n",
+ "Expected ERROR_INVALID_PARAMETER, got %08lx\n",
data.padwTrustStepErrors[TRUSTERROR_STEP_FINAL_OBJPROV]);
U(wintrust_data).pFile = &fileInfo;
/* Crashes
@@ -366,19 +366,19 @@ static void testObjTrust(SAFE_PROVIDER_FUNCTIONS *funcs, GUID *actionID)
U(data).pPDSip = &provDataSIP;
data.psPfns = (CRYPT_PROVIDER_FUNCTIONS *)funcs;
ret = funcs->pfnObjectTrust(&data);
- ok(ret == S_FALSE, "Expected S_FALSE, got %08x\n", ret);
+ ok(ret == S_FALSE, "Expected S_FALSE, got %08lx\n", ret);
ok(data.padwTrustStepErrors[TRUSTERROR_STEP_FINAL_OBJPROV] ==
TRUST_E_SUBJECT_FORM_UNKNOWN,
- "expected TRUST_E_SUBJECT_FORM_UNKNOWN, got %08x\n",
+ "expected TRUST_E_SUBJECT_FORM_UNKNOWN, got %08lx\n",
data.padwTrustStepErrors[TRUSTERROR_STEP_FINAL_OBJPROV]);
CloseHandle(fileInfo.hFile);
fileInfo.hFile = NULL;
fileInfo.pcwszFilePath = pathW;
ret = funcs->pfnObjectTrust(&data);
- ok(ret == S_FALSE, "Expected S_FALSE, got %08x\n", ret);
+ ok(ret == S_FALSE, "Expected S_FALSE, got %08lx\n", ret);
ok(data.padwTrustStepErrors[TRUSTERROR_STEP_FINAL_OBJPROV] ==
TRUST_E_SUBJECT_FORM_UNKNOWN,
- "expected TRUST_E_SUBJECT_FORM_UNKNOWN, got %08x\n",
+ "expected TRUST_E_SUBJECT_FORM_UNKNOWN, got %08lx\n",
data.padwTrustStepErrors[TRUSTERROR_STEP_FINAL_OBJPROV]);
DeleteFileW(pathW);
/* Test again with a file we expect to exist, and to contain no
@@ -386,12 +386,12 @@ static void testObjTrust(SAFE_PROVIDER_FUNCTIONS *funcs, GUID *actionID)
*/
getNotepadPath(pathW, MAX_PATH);
ret = funcs->pfnObjectTrust(&data);
- ok(ret == S_FALSE, "Expected S_FALSE, got %08x\n", ret);
+ ok(ret == S_FALSE, "Expected S_FALSE, got %08lx\n", ret);
ok(data.padwTrustStepErrors[TRUSTERROR_STEP_FINAL_OBJPROV] ==
TRUST_E_NOSIGNATURE ||
data.padwTrustStepErrors[TRUSTERROR_STEP_FINAL_OBJPROV] ==
TRUST_E_SUBJECT_FORM_UNKNOWN,
- "Expected TRUST_E_NOSIGNATURE or TRUST_E_SUBJECT_FORM_UNKNOWN, got %08x\n",
+ "Expected TRUST_E_NOSIGNATURE or TRUST_E_SUBJECT_FORM_UNKNOWN, got %08lx\n",
data.padwTrustStepErrors[TRUSTERROR_STEP_FINAL_OBJPROV]);
if (data.padwTrustStepErrors[TRUSTERROR_STEP_FINAL_OBJPROV] ==
TRUST_E_NOSIGNATURE)
@@ -405,14 +405,14 @@ static void testObjTrust(SAFE_PROVIDER_FUNCTIONS *funcs, GUID *actionID)
/* Specifying the GUID results in that GUID being the subject GUID */
fileInfo.pgKnownSubject = &bogusGuid;
ret = funcs->pfnObjectTrust(&data);
- ok(ret == S_FALSE, "Expected S_FALSE, got %08x\n", ret);
+ ok(ret == S_FALSE, "Expected S_FALSE, got %08lx\n", ret);
ok(data.padwTrustStepErrors[TRUSTERROR_STEP_FINAL_OBJPROV] ==
TRUST_E_NOSIGNATURE ||
data.padwTrustStepErrors[TRUSTERROR_STEP_FINAL_OBJPROV] ==
TRUST_E_SUBJECT_FORM_UNKNOWN ||
data.padwTrustStepErrors[TRUSTERROR_STEP_FINAL_OBJPROV] ==
TRUST_E_PROVIDER_UNKNOWN,
- "Expected TRUST_E_NOSIGNATURE or TRUST_E_SUBJECT_FORM_UNKNOWN or TRUST_E_PROVIDER_UNKNOWN, got %08x\n",
+ "Expected TRUST_E_NOSIGNATURE or TRUST_E_SUBJECT_FORM_UNKNOWN or TRUST_E_PROVIDER_UNKNOWN, got %08lx\n",
data.padwTrustStepErrors[TRUSTERROR_STEP_FINAL_OBJPROV]);
if (data.padwTrustStepErrors[TRUSTERROR_STEP_FINAL_OBJPROV] ==
TRUST_E_NOSIGNATURE)
@@ -425,7 +425,7 @@ static void testObjTrust(SAFE_PROVIDER_FUNCTIONS *funcs, GUID *actionID)
{
fileInfo.pgKnownSubject = (GUID *)0xdeadbeef;
ret = funcs->pfnObjectTrust(&data);
- ok(ret == S_FALSE, "Expected S_FALSE, got %08x\n", ret);
+ ok(ret == S_FALSE, "Expected S_FALSE, got %08lx\n", ret);
}
funcs->pfnFree(data.padwTrustStepErrors);
}
@@ -568,9 +568,9 @@ static void testCertTrust(SAFE_PROVIDER_FUNCTIONS *funcs, GUID *actionID)
return;
}
ret = funcs->pfnCertificateTrust(&data);
- ok(ret == S_FALSE, "Expected S_FALSE, got %08x\n", ret);
+ ok(ret == S_FALSE, "Expected S_FALSE, got %08lx\n", ret);
ok(data.padwTrustStepErrors[TRUSTERROR_STEP_FINAL_CERTPROV] ==
- TRUST_E_NOSIGNATURE, "Expected TRUST_E_NOSIGNATURE, got %08x\n",
+ TRUST_E_NOSIGNATURE, "Expected TRUST_E_NOSIGNATURE, got %08lx\n",
data.padwTrustStepErrors[TRUSTERROR_STEP_FINAL_CERTPROV]);
b = funcs->pfnAddSgnr2Chain(&data, FALSE, 0, &sgnr);
if (b)
@@ -579,7 +579,7 @@ static void testCertTrust(SAFE_PROVIDER_FUNCTIONS *funcs, GUID *actionID)
/* An empty signer "succeeds," even though there's no cert */
ret = funcs->pfnCertificateTrust(&data);
- ok(ret == S_OK, "Expected S_OK, got %08x\n", ret);
+ ok(ret == S_OK, "Expected S_OK, got %08lx\n", ret);
cert = CertCreateCertificateContext(X509_ASN_ENCODING, selfSignedCert,
sizeof(selfSignedCert));
if (cert)
@@ -598,13 +598,13 @@ static void testCertTrust(SAFE_PROVIDER_FUNCTIONS *funcs, GUID *actionID)
*/
data.psPfns = (CRYPT_PROVIDER_FUNCTIONS *)funcs;
ret = funcs->pfnCertificateTrust(&data);
- ok(ret == S_OK, "Expected S_OK, got %08x\n", ret);
- ok(data.csSigners == 1, "Unexpected number of signers %d\n",
+ ok(ret == S_OK, "Expected S_OK, got %08lx\n", ret);
+ ok(data.csSigners == 1, "Unexpected number of signers %ld\n",
data.csSigners);
ok(data.pasSigners[0].pChainContext != NULL,
"Expected a certificate chain\n");
ok(data.pasSigners[0].csCertChain == 1,
- "Unexpected number of chain elements %d\n",
+ "Unexpected number of chain elements %ld\n",
data.pasSigners[0].csCertChain);
/* pasSigners and pasSigners[0].pasCertChain are guaranteed to be
* initialized, see tests for pfnAddSgnr2Chain and pfnAddCert2Chain
@@ -615,7 +615,7 @@ static void testCertTrust(SAFE_PROVIDER_FUNCTIONS *funcs, GUID *actionID)
"Expected cert to be self-signed\n");
ok(data.pasSigners[0].pasCertChain[0].dwConfidence ==
(CERT_CONFIDENCE_SIG | CERT_CONFIDENCE_TIMENEST),
- "Expected CERT_CONFIDENCE_SIG | CERT_CONFIDENCE_TIMENEST, got %08x\n",
+ "Expected CERT_CONFIDENCE_SIG | CERT_CONFIDENCE_TIMENEST, got %08lx\n",
data.pasSigners[0].pasCertChain[0].dwConfidence);
CertFreeCertificateContext(
data.pasSigners[0].pasCertChain[0].pCert);
@@ -756,16 +756,16 @@ static void test_sip_create_indirect_data(void)
SetLastError(0xdeadbeef);
ret = CryptSIPCreateIndirectData_p(NULL, NULL, NULL);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef);
ret = CryptSIPCreateIndirectData_p(&subjinfo, NULL, NULL);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
subjinfo.cbSize = sizeof(subjinfo);
SetLastError(0xdeadbeef);
ret = CryptSIPCreateIndirectData_p(&subjinfo, NULL, NULL);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
file = create_temp_file(temp_file);
if (file == INVALID_HANDLE_VALUE)
{
@@ -779,17 +779,17 @@ static void test_sip_create_indirect_data(void)
SetLastError(0xdeadbeef);
ret = CryptSIPCreateIndirectData_p(&subjinfo, NULL, NULL);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
subjinfo.pgSubjectType = &unknown;
SetLastError(0xdeadbeef);
ret = CryptSIPCreateIndirectData_p(&subjinfo, NULL, NULL);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
subjinfo.DigestAlgorithm.pszObjId = oid_sha1;
count = 0xdeadbeef;
ret = CryptSIPCreateIndirectData_p(&subjinfo, &count, NULL);
todo_wine
- ok(ret, "CryptSIPCreateIndirectData failed: %d\n", GetLastError());
+ ok(ret, "CryptSIPCreateIndirectData failed: %ld\n", GetLastError());
ok(count, "expected a positive count\n");
if (ret)
{
@@ -797,16 +797,16 @@ static void test_sip_create_indirect_data(void)
count = 256;
ret = CryptSIPCreateIndirectData_p(&subjinfo, &count, indirect);
- ok(ret, "CryptSIPCreateIndirectData failed: %d\n", GetLastError());
+ ok(ret, "CryptSIPCreateIndirectData failed: %ld\n", GetLastError());
/* If the count is larger than needed, it's unmodified */
- ok(count == 256, "unexpected count %d\n", count);
+ ok(count == 256, "unexpected count %ld\n", count);
ok(!strcmp(indirect->Data.pszObjId, SPC_PE_IMAGE_DATA_OBJID),
"unexpected data oid %s\n",
indirect->Data.pszObjId);
ok(!strcmp(indirect->DigestAlgorithm.pszObjId, oid_sha1),
"unexpected digest algorithm oid %s\n",
indirect->DigestAlgorithm.pszObjId);
- ok(indirect->Digest.cbData == 20, "unexpected hash size %d\n",
+ ok(indirect->Digest.cbData == 20, "unexpected hash size %ld\n",
indirect->Digest.cbData);
if (indirect->Digest.cbData == 20)
{
@@ -847,9 +847,9 @@ static void test_wintrust(void)
file.hFile = create_temp_file(pathW);
SetLastError(0xdeadbeef);
r = WinVerifyTrust(INVALID_HANDLE_VALUE, &generic_action_v2, &wtd);
- ok(r == GetLastError(), "expected %08x, got %08x\n", GetLastError(), r);
+ ok(r == GetLastError(), "expected %08lx, got %08lx\n", GetLastError(), r);
ok(r == TRUST_E_SUBJECT_FORM_UNKNOWN,
- "expected TRUST_E_SUBJECT_FORM_UNKNOWN, got %08x\n", r);
+ "expected TRUST_E_SUBJECT_FORM_UNKNOWN, got %08lx\n", r);
CloseHandle(file.hFile);
DeleteFileW(pathW);
file.hFile = NULL;
@@ -857,25 +857,25 @@ static void test_wintrust(void)
getNotepadPath(pathW, MAX_PATH);
SetLastError(0xdeadbeef);
r = WinVerifyTrust(INVALID_HANDLE_VALUE, &generic_action_v2, &wtd);
- ok(r == GetLastError(), "expected %08x, got %08x\n", GetLastError(), r);
+ ok(r == GetLastError(), "expected %08lx, got %08lx\n", GetLastError(), r);
ok(r == TRUST_E_NOSIGNATURE || r == CRYPT_E_FILE_ERROR,
- "expected TRUST_E_NOSIGNATURE or CRYPT_E_FILE_ERROR, got %08x\n", r);
+ "expected TRUST_E_NOSIGNATURE or CRYPT_E_FILE_ERROR, got %08lx\n", r);
wtd.dwStateAction = WTD_STATEACTION_CLOSE;
SetLastError(0xdeadbeef);
r = WinVerifyTrust(INVALID_HANDLE_VALUE, &generic_action_v2, &wtd);
- ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %08x\n", GetLastError());
- ok(r == S_OK, "WinVerifyTrust failed: %08x\n", r);
+ ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %08lx\n", GetLastError());
+ ok(r == S_OK, "WinVerifyTrust failed: %08lx\n", r);
wtd.dwStateAction = WTD_STATEACTION_VERIFY;
SetLastError(0xdeadbeef);
hr = WinVerifyTrustEx(INVALID_HANDLE_VALUE, &generic_action_v2, &wtd);
- ok(hr == GetLastError(), "expected %08x, got %08x\n", GetLastError(), hr);
+ ok(hr == GetLastError(), "expected %08lx, got %08lx\n", GetLastError(), hr);
ok(hr == TRUST_E_NOSIGNATURE || hr == CRYPT_E_FILE_ERROR,
- "expected TRUST_E_NOSIGNATURE or CRYPT_E_FILE_ERROR, got %08x\n", hr);
+ "expected TRUST_E_NOSIGNATURE or CRYPT_E_FILE_ERROR, got %08lx\n", hr);
wtd.dwStateAction = WTD_STATEACTION_CLOSE;
SetLastError(0xdeadbeef);
r = WinVerifyTrust(INVALID_HANDLE_VALUE, &generic_action_v2, &wtd);
- ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %08x\n", GetLastError());
- ok(r == S_OK, "WinVerifyTrust failed: %08x\n", r);
+ ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %08lx\n", GetLastError());
+ ok(r == S_OK, "WinVerifyTrust failed: %08lx\n", r);
}
/* Self-signed .exe, built with tcc, signed with signtool
@@ -1142,7 +1142,7 @@ static void call_winverify(WCHAR *pathW, LONG *status, BOOL hash_only)
data.dwStateAction = WTD_STATEACTION_CLOSE;
ret = WinVerifyTrust(NULL, &WVTPolicyGUID, &data);
- ok(ret == S_OK, "WinVerifyTrust failed: %08x\n", ret);
+ ok(ret == S_OK, "WinVerifyTrust failed: %08lx\n", ret);
}
static void test_wintrust_digest(void)
@@ -1231,18 +1231,18 @@ static void test_wintrust_digest(void)
for (j = 0; tests[i].blocks[j].data; j++)
{
ret = WriteFile(file, tests[i].blocks[j].data, tests[i].blocks[j].length, &written, NULL);
- ok(ret && written == tests[i].blocks[j].length, "WriteFile failed with %u\n", GetLastError());
+ ok(ret && written == tests[i].blocks[j].length, "WriteFile failed with %lu\n", GetLastError());
}
CloseHandle(file);
call_winverify(pathW, &status, FALSE);
todo_wine_if(tests[i].t1.todo)
- ok(status == tests[i].t1.status, "test %d/1: expected %08x, got %08x\n", i, tests[i].t1.status, status);
+ ok(status == tests[i].t1.status, "test %d/1: expected %08lx, got %08lx\n", i, tests[i].t1.status, status);
call_winverify(pathW, &status, TRUE);
todo_wine_if(tests[i].t2.todo)
- ok(status == tests[i].t2.status, "test %d/2: expected %08x, got %08x\n", i, tests[i].t2.status, status);
+ ok(status == tests[i].t2.status, "test %d/2: expected %08lx, got %08lx\n", i, tests[i].t2.status, status);
DeleteFileW(pathW);
}
@@ -1261,22 +1261,22 @@ static void test_get_known_usages(void)
SetLastError(0xdeadbeef);
ret = pWTHelperGetKnownUsages(0, NULL);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef);
ret = pWTHelperGetKnownUsages(1, NULL);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef);
ret = pWTHelperGetKnownUsages(0, &usages);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* A value of 1 for the first parameter seems to imply the value is
* allocated
*/
SetLastError(0xdeadbeef);
usages = NULL;
ret = pWTHelperGetKnownUsages(1, &usages);
- ok(ret, "WTHelperGetKnownUsages failed: %d\n", GetLastError());
+ ok(ret, "WTHelperGetKnownUsages failed: %ld\n", GetLastError());
ok(usages != NULL, "expected a pointer\n");
if (ret && usages)
{
@@ -1289,10 +1289,10 @@ static void test_get_known_usages(void)
{
ok((*ptr)->cbSize == sizeof(CRYPT_OID_INFO) ||
(*ptr)->cbSize == (sizeof(CRYPT_OID_INFO) + 2 * sizeof(LPCWSTR)), /* Vista */
- "unexpected size %d\n", (*ptr)->cbSize);
+ "unexpected size %ld\n", (*ptr)->cbSize);
/* Each returned usage is in the CRYPT_ENHKEY_USAGE_OID_GROUP_ID group */
ok((*ptr)->dwGroupId == CRYPT_ENHKEY_USAGE_OID_GROUP_ID,
- "expected group CRYPT_ENHKEY_USAGE_OID_GROUP_ID, got %d\n",
+ "expected group CRYPT_ENHKEY_USAGE_OID_GROUP_ID, got %ld\n",
(*ptr)->dwGroupId);
}
}
@@ -1300,16 +1300,16 @@ static void test_get_known_usages(void)
*/
SetLastError(0xdeadbeef);
ret = pWTHelperGetKnownUsages(2, &usages);
- ok(ret, "WTHelperGetKnownUsages failed: %d\n", GetLastError());
+ ok(ret, "WTHelperGetKnownUsages failed: %ld\n", GetLastError());
ok(usages == NULL, "expected pointer to be cleared\n");
SetLastError(0xdeadbeef);
usages = NULL;
ret = pWTHelperGetKnownUsages(2, &usages);
- ok(ret, "WTHelperGetKnownUsages failed: %d\n", GetLastError());
+ ok(ret, "WTHelperGetKnownUsages failed: %ld\n", GetLastError());
SetLastError(0xdeadbeef);
ret = pWTHelperGetKnownUsages(2, NULL);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
}
START_TEST(softpub)
1
0
09 Mar '22
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/wintab32/tests/Makefile.in | 1 -
dlls/wintab32/tests/context.c | 22 +++++++++++-----------
2 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/dlls/wintab32/tests/Makefile.in b/dlls/wintab32/tests/Makefile.in
index 921d97284dc..635e03fd5d6 100644
--- a/dlls/wintab32/tests/Makefile.in
+++ b/dlls/wintab32/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = wintab32.dll
IMPORTS = user32
diff --git a/dlls/wintab32/tests/context.c b/dlls/wintab32/tests/context.c
index a88e4bb845d..4359412785a 100644
--- a/dlls/wintab32/tests/context.c
+++ b/dlls/wintab32/tests/context.c
@@ -165,40 +165,40 @@ static void test_WTInfoA(void)
ret = pWTInfoA( WTI_DEVICES, DVC_X, &value );
ok(ret == sizeof( AXIS ), "Wrong DVC_X size %d\n", ret);
- trace("DVC_X %d, %d, %d\n", value.axMin, value.axMax, value.axUnits);
+ trace("DVC_X %ld, %ld, %d\n", value.axMin, value.axMax, value.axUnits);
ret = pWTInfoA( WTI_DEVICES, DVC_Y, &value );
ok(ret == sizeof( AXIS ), "Wrong DVC_Y size %d\n", ret);
- trace("DVC_Y %d, %d, %d\n", value.axMin, value.axMax, value.axUnits);
+ trace("DVC_Y %ld, %ld, %d\n", value.axMin, value.axMax, value.axUnits);
ret = pWTInfoA( WTI_DEVICES, DVC_Z, &value );
if(ret)
- trace("DVC_Z %d, %d, %d\n", value.axMin, value.axMax, value.axUnits);
+ trace("DVC_Z %ld, %ld, %d\n", value.axMin, value.axMax, value.axUnits);
else
trace("DVC_Z not supported\n");
ret = pWTInfoA( WTI_DEVICES, DVC_NPRESSURE, &value );
ok(ret == sizeof( AXIS ), "Wrong DVC_NPRESSURE, size %d\n", ret);
- trace("DVC_NPRESSURE %d, %d, %d\n", value.axMin, value.axMax, value.axUnits);
+ trace("DVC_NPRESSURE %ld, %ld, %d\n", value.axMin, value.axMax, value.axUnits);
ret = pWTInfoA( WTI_DEVICES, DVC_TPRESSURE, &value );
if(ret)
- trace("DVC_TPRESSURE %d, %d, %d\n", value.axMin, value.axMax, value.axUnits);
+ trace("DVC_TPRESSURE %ld, %ld, %d\n", value.axMin, value.axMax, value.axUnits);
else
trace("DVC_TPRESSURE not supported\n");
ret = pWTInfoA( WTI_DEVICES, DVC_ORIENTATION, &orientation );
ok(ret == sizeof( AXIS )*3, "Wrong DVC_ORIENTATION, size %d\n", ret);
- trace("DVC_ORIENTATION0 %d, %d, %d\n", orientation[0].axMin, orientation[0].axMax, orientation[0].axUnits);
- trace("DVC_ORIENTATION1 %d, %d, %d\n", orientation[1].axMin, orientation[1].axMax, orientation[1].axUnits);
- trace("DVC_ORIENTATION2 %d, %d, %d\n", orientation[2].axMin, orientation[2].axMax, orientation[2].axUnits);
+ trace("DVC_ORIENTATION0 %ld, %ld, %d\n", orientation[0].axMin, orientation[0].axMax, orientation[0].axUnits);
+ trace("DVC_ORIENTATION1 %ld, %ld, %d\n", orientation[1].axMin, orientation[1].axMax, orientation[1].axUnits);
+ trace("DVC_ORIENTATION2 %ld, %ld, %d\n", orientation[2].axMin, orientation[2].axMax, orientation[2].axUnits);
ret = pWTInfoA( WTI_DEVICES, DVC_ROTATION, &orientation );
if(ret)
{
- trace("DVC_ROTATION0 %d, %d, %d\n", orientation[0].axMin, orientation[0].axMax, orientation[0].axUnits);
- trace("DVC_ROTATION1 %d, %d, %d\n", orientation[1].axMin, orientation[1].axMax, orientation[1].axUnits);
- trace("DVC_ROTATION2 %d, %d, %d\n", orientation[2].axMin, orientation[2].axMax, orientation[2].axUnits);
+ trace("DVC_ROTATION0 %ld, %ld, %d\n", orientation[0].axMin, orientation[0].axMax, orientation[0].axUnits);
+ trace("DVC_ROTATION1 %ld, %ld, %d\n", orientation[1].axMin, orientation[1].axMax, orientation[1].axUnits);
+ trace("DVC_ROTATION2 %ld, %ld, %d\n", orientation[2].axMin, orientation[2].axMax, orientation[2].axUnits);
}
else
trace("DVC_ROTATION not supported\n");
1
0
[PATCH] dlls/windows.media.devices/tests: enable compilation with long types
by Eric Pouech 09 Mar '22
by Eric Pouech 09 Mar '22
09 Mar '22
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/windows.media.devices/tests/Makefile.in | 1 -
dlls/windows.media.devices/tests/devices.c | 40 +++++++++++++-------------
2 files changed, 20 insertions(+), 21 deletions(-)
diff --git a/dlls/windows.media.devices/tests/Makefile.in b/dlls/windows.media.devices/tests/Makefile.in
index 37f5f7bde06..4d107889dad 100644
--- a/dlls/windows.media.devices/tests/Makefile.in
+++ b/dlls/windows.media.devices/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = windows.media.devices.dll
IMPORTS = combase
diff --git a/dlls/windows.media.devices/tests/devices.c b/dlls/windows.media.devices/tests/devices.c
index d8acc638837..c992686d4e8 100644
--- a/dlls/windows.media.devices/tests/devices.c
+++ b/dlls/windows.media.devices/tests/devices.c
@@ -103,7 +103,7 @@ static HRESULT WINAPI async_activate_ActivateCompleted(
hr = IActivateAudioInterfaceAsyncOperation_GetActivateResult(op,
&async_activate_test.result_hr, &async_activate_test.result_iface);
ok(hr == S_OK,
- "%s: GetActivateResult failed: %08x\n",
+ "%s: GetActivateResult failed: %08lx\n",
async_activate_test.msg_pfx, hr);
return S_OK;
@@ -135,29 +135,29 @@ static void test_MediaDeviceStatics(void)
DWORD dr;
hr = WindowsCreateString(media_device_statics_name, wcslen(media_device_statics_name), &str);
- ok(hr == S_OK, "WindowsCreateString failed, hr %#x\n", hr);
+ ok(hr == S_OK, "WindowsCreateString failed, hr %#lx\n", hr);
hr = RoGetActivationFactory(str, &IID_IActivationFactory, (void **)&factory);
- ok(hr == S_OK, "RoGetActivationFactory failed, hr %#x\n", hr);
+ ok(hr == S_OK, "RoGetActivationFactory failed, hr %#lx\n", hr);
WindowsDeleteString(str);
/* interface tests */
hr = IActivationFactory_QueryInterface(factory, &IID_IInspectable, (void **)&inspectable);
- ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IInspectable failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IInspectable failed, hr %#lx\n", hr);
hr = IActivationFactory_QueryInterface(factory, &IID_IAgileObject, (void **)&agile_object);
- ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IAgileObject failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IAgileObject failed, hr %#lx\n", hr);
hr = IActivationFactory_QueryInterface(factory, &IID_IMediaDeviceStatics, (void **)&media_device_statics);
- ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IMediaDeviceStatics failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IMediaDeviceStatics failed, hr %#lx\n", hr);
hr = IMediaDeviceStatics_QueryInterface(media_device_statics, &IID_IInspectable, (void **)&tmp_inspectable);
- ok(hr == S_OK, "IMediaDeviceStatics_QueryInterface IID_IInspectable failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IMediaDeviceStatics_QueryInterface IID_IInspectable failed, hr %#lx\n", hr);
ok(tmp_inspectable == inspectable, "IMediaDeviceStatics_QueryInterface IID_IInspectable returned %p, expected %p\n", tmp_inspectable, inspectable);
IInspectable_Release(tmp_inspectable);
hr = IMediaDeviceStatics_QueryInterface(media_device_statics, &IID_IAgileObject, (void **)&tmp_agile_object);
- ok(hr == S_OK, "IMediaDeviceStatics_QueryInterface IID_IAgileObject failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IMediaDeviceStatics_QueryInterface IID_IAgileObject failed, hr %#lx\n", hr);
ok(tmp_agile_object == agile_object, "IMediaDeviceStatics_QueryInterface IID_IAgileObject returned %p, expected %p\n", tmp_agile_object, agile_object);
IAgileObject_Release(tmp_agile_object);
@@ -169,7 +169,7 @@ static void test_MediaDeviceStatics(void)
/* test default capture device creation */
hr = IMediaDeviceStatics_GetDefaultAudioCaptureId(media_device_statics, AudioDeviceRole_Default, &str);
- ok(hr == S_OK, "GetDefaultAudioCaptureId failed: %08x\n", hr);
+ ok(hr == S_OK, "GetDefaultAudioCaptureId failed: %08lx\n", hr);
ok((!!g_default_capture_id) == (!!str),
"Presence of default capture device doesn't match expected state\n");
@@ -181,7 +181,7 @@ static void test_MediaDeviceStatics(void)
/* returned id does not work in GetDevice... */
hr = IMMDeviceEnumerator_GetDevice(g_mmdevenum, WindowsGetStringRawBuffer(str, NULL), &mmdev);
- ok(hr == E_INVALIDARG, "GetDevice gave wrong error: %08x\n", hr);
+ ok(hr == E_INVALIDARG, "GetDevice gave wrong error: %08lx\n", hr);
/* ...but does work in ActivateAudioInterfaceAsync */
async_activate_test.ref = 1;
@@ -194,14 +194,14 @@ static void test_MediaDeviceStatics(void)
EnterCriticalSection(&async_activate_test.lock);
hr = pActivateAudioInterfaceAsync(WindowsGetStringRawBuffer(str, NULL),
&IID_IAudioClient2, NULL, &async_activate_done, &async_activate_test.op);
- ok(hr == S_OK, "ActivateAudioInterfaceAsync failed: %08x\n", hr);
+ ok(hr == S_OK, "ActivateAudioInterfaceAsync failed: %08lx\n", hr);
LeaveCriticalSection(&async_activate_test.lock);
IActivateAudioInterfaceAsyncOperation_Release(async_activate_test.op);
dr = WaitForSingleObject(async_activate_test.evt, 1000); /* wait for all refs other than our own to be released */
ok(dr == WAIT_OBJECT_0, "Timed out waiting for async activate to complete\n");
- ok(async_activate_test.result_hr == S_OK, "Got unexpected activation result: %08x\n", async_activate_test.result_hr);
+ ok(async_activate_test.result_hr == S_OK, "Got unexpected activation result: %08lx\n", async_activate_test.result_hr);
ok(async_activate_test.result_iface != NULL, "Expected to get WASAPI interface, but got NULL\n");
IUnknown_Release(async_activate_test.result_iface);
@@ -210,7 +210,7 @@ static void test_MediaDeviceStatics(void)
/* test default render device creation */
hr = IMediaDeviceStatics_GetDefaultAudioRenderId(media_device_statics, AudioDeviceRole_Default, &str);
- ok(hr == S_OK, "GetDefaultAudioRenderId failed: %08x\n", hr);
+ ok(hr == S_OK, "GetDefaultAudioRenderId failed: %08lx\n", hr);
ok((!!g_default_render_id) == (!!str),
"Presence of default render device doesn't match expected state\n");
@@ -222,7 +222,7 @@ static void test_MediaDeviceStatics(void)
/* returned id does not work in GetDevice... */
hr = IMMDeviceEnumerator_GetDevice(g_mmdevenum, WindowsGetStringRawBuffer(str, NULL), &mmdev);
- ok(hr == E_INVALIDARG, "GetDevice gave wrong error: %08x\n", hr);
+ ok(hr == E_INVALIDARG, "GetDevice gave wrong error: %08lx\n", hr);
/* ...but does work in ActivateAudioInterfaceAsync */
async_activate_test.ref = 1;
@@ -235,14 +235,14 @@ static void test_MediaDeviceStatics(void)
EnterCriticalSection(&async_activate_test.lock);
hr = pActivateAudioInterfaceAsync(WindowsGetStringRawBuffer(str, NULL),
&IID_IAudioClient2, NULL, &async_activate_done, &async_activate_test.op);
- ok(hr == S_OK, "ActivateAudioInterfaceAsync failed: %08x\n", hr);
+ ok(hr == S_OK, "ActivateAudioInterfaceAsync failed: %08lx\n", hr);
LeaveCriticalSection(&async_activate_test.lock);
IActivateAudioInterfaceAsyncOperation_Release(async_activate_test.op);
dr = WaitForSingleObject(async_activate_test.evt, 1000); /* wait for all refs other than our own to be released */
ok(dr == WAIT_OBJECT_0, "Timed out waiting for async activate to complete\n");
- ok(async_activate_test.result_hr == S_OK, "Got unexpected activation result: %08x\n", async_activate_test.result_hr);
+ ok(async_activate_test.result_hr == S_OK, "Got unexpected activation result: %08lx\n", async_activate_test.result_hr);
ok(async_activate_test.result_iface != NULL, "Expected to get WASAPI interface, but got NULL\n");
IUnknown_Release(async_activate_test.result_iface);
@@ -278,17 +278,17 @@ START_TEST(devices)
#undef LOAD_FUNCPTR
hr = RoInitialize(RO_INIT_MULTITHREADED);
- ok(hr == S_OK, "RoInitialize failed, hr %#x\n", hr);
+ ok(hr == S_OK, "RoInitialize failed, hr %#lx\n", hr);
hr = CoCreateInstance(&CLSID_MMDeviceEnumerator, NULL,
CLSCTX_INPROC_SERVER, &IID_IMMDeviceEnumerator, (void**)&g_mmdevenum);
- ok(hr == S_OK, "Couldn't make MMDeviceEnumerator: %08x\n", hr);
+ ok(hr == S_OK, "Couldn't make MMDeviceEnumerator: %08lx\n", hr);
hr = IMMDeviceEnumerator_GetDefaultAudioEndpoint(g_mmdevenum, eCapture, eMultimedia, &mmdev);
if (hr == S_OK)
{
hr = IMMDevice_GetId(mmdev, &g_default_capture_id);
- ok(hr == S_OK, "IMMDevice::GetId(capture) failed: %08x\n", hr);
+ ok(hr == S_OK, "IMMDevice::GetId(capture) failed: %08lx\n", hr);
IMMDevice_Release(mmdev);
}
@@ -299,7 +299,7 @@ START_TEST(devices)
if (hr == S_OK)
{
hr = IMMDevice_GetId(mmdev, &g_default_render_id);
- ok(hr == S_OK, "IMMDevice::GetId(render) failed: %08x\n", hr);
+ ok(hr == S_OK, "IMMDevice::GetId(render) failed: %08lx\n", hr);
IMMDevice_Release(mmdev);
}
1
0
[PATCH] dlls/windows.globalization/tests: enable compilation with long types
by Eric Pouech 09 Mar '22
by Eric Pouech 09 Mar '22
09 Mar '22
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/windows.globalization/tests/Makefile.in | 1
dlls/windows.globalization/tests/globalization.c | 52 +++++++++++-----------
2 files changed, 26 insertions(+), 27 deletions(-)
diff --git a/dlls/windows.globalization/tests/Makefile.in b/dlls/windows.globalization/tests/Makefile.in
index 2b643ef8437..7ee2bc407d6 100644
--- a/dlls/windows.globalization/tests/Makefile.in
+++ b/dlls/windows.globalization/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = windows.globalization.dll
IMPORTS = combase uuid
diff --git a/dlls/windows.globalization/tests/globalization.c b/dlls/windows.globalization/tests/globalization.c
index ebe7ccc4704..c42cb67496e 100644
--- a/dlls/windows.globalization/tests/globalization.c
+++ b/dlls/windows.globalization/tests/globalization.c
@@ -59,13 +59,13 @@ static void test_GlobalizationPreferences(void)
GetUserDefaultLocaleName(locale, LOCALE_NAME_MAX_LENGTH);
hr = RoInitialize(RO_INIT_MULTITHREADED);
- ok(hr == S_OK, "RoInitialize failed, hr %#x\n", hr);
+ ok(hr == S_OK, "RoInitialize failed, hr %#lx\n", hr);
hr = WindowsCreateString(class_name, wcslen(class_name), &str);
- ok(hr == S_OK, "WindowsCreateString failed, hr %#x\n", hr);
+ ok(hr == S_OK, "WindowsCreateString failed, hr %#lx\n", hr);
hr = RoGetActivationFactory(str, &IID_IActivationFactory, (void **)&factory);
- ok(hr == S_OK || broken(hr == REGDB_E_CLASSNOTREG), "RoGetActivationFactory failed, hr %#x\n", hr);
+ ok(hr == S_OK || broken(hr == REGDB_E_CLASSNOTREG), "RoGetActivationFactory failed, hr %#lx\n", hr);
if (hr == REGDB_E_CLASSNOTREG)
{
win_skip("%s runtimeclass not registered, skipping tests.\n", wine_dbgstr_w(class_name));
@@ -75,26 +75,26 @@ static void test_GlobalizationPreferences(void)
}
hr = IActivationFactory_QueryInterface(factory, &IID_IInspectable, (void **)&inspectable);
- ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IInspectable failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IInspectable failed, hr %#lx\n", hr);
hr = IActivationFactory_QueryInterface(factory, &IID_IAgileObject, (void **)&agile_object);
- ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IAgileObject failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IAgileObject failed, hr %#lx\n", hr);
hr = IActivationFactory_QueryInterface(factory, &IID_IGlobalizationPreferencesStatics, (void **)&preferences_statics);
- ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IGlobalizationPreferencesStatics failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IGlobalizationPreferencesStatics failed, hr %#lx\n", hr);
hr = IGlobalizationPreferencesStatics_QueryInterface(preferences_statics, &IID_IInspectable, (void **)&tmp_inspectable);
- ok(hr == S_OK, "IGlobalizationPreferencesStatics_QueryInterface IID_IInspectable failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IGlobalizationPreferencesStatics_QueryInterface IID_IInspectable failed, hr %#lx\n", hr);
ok(tmp_inspectable == inspectable, "IGlobalizationPreferencesStatics_QueryInterface IID_IInspectable returned %p, expected %p\n", tmp_inspectable, inspectable);
IInspectable_Release(tmp_inspectable);
hr = IGlobalizationPreferencesStatics_QueryInterface(preferences_statics, &IID_IAgileObject, (void **)&tmp_agile_object);
- ok(hr == S_OK, "IGlobalizationPreferencesStatics_QueryInterface IID_IAgileObject failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IGlobalizationPreferencesStatics_QueryInterface IID_IAgileObject failed, hr %#lx\n", hr);
ok(tmp_agile_object == agile_object, "IGlobalizationPreferencesStatics_QueryInterface IID_IAgileObject returned %p, expected %p\n", tmp_agile_object, agile_object);
IAgileObject_Release(tmp_agile_object);
hr = IGlobalizationPreferencesStatics_get_HomeGeographicRegion(preferences_statics, &tmp_str);
- ok(hr == S_OK, "IGlobalizationPreferencesStatics_get_HomeGeographicRegion failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IGlobalizationPreferencesStatics_get_HomeGeographicRegion failed, hr %#lx\n", hr);
buf = WindowsGetStringRawBuffer(tmp_str, &len);
ok(buf != NULL && len > 0, "WindowsGetStringRawBuffer returned buf %p, len %u\n", buf, len);
@@ -112,25 +112,25 @@ static void test_GlobalizationPreferences(void)
WindowsDeleteString(tmp_str);
hr = IGlobalizationPreferencesStatics_get_Languages(preferences_statics, &languages);
- ok(hr == S_OK, "IGlobalizationPreferencesStatics_get_Languages failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IGlobalizationPreferencesStatics_get_Languages failed, hr %#lx\n", hr);
hr = IVectorView_HSTRING_QueryInterface(languages, &IID_IInspectable, (void **)&tmp_inspectable);
- ok(hr == S_OK, "IVectorView_HSTRING_QueryInterface failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IVectorView_HSTRING_QueryInterface failed, hr %#lx\n", hr);
ok(tmp_inspectable != inspectable, "IVectorView_HSTRING_QueryInterface returned %p, expected %p\n", tmp_inspectable, inspectable);
IInspectable_Release(tmp_inspectable);
hr = IVectorView_HSTRING_QueryInterface(languages, &IID_IAgileObject, (void **)&tmp_agile_object);
- ok(hr == S_OK, "IVectorView_HSTRING_QueryInterface failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IVectorView_HSTRING_QueryInterface failed, hr %#lx\n", hr);
ok(tmp_agile_object != agile_object, "IVectorView_HSTRING_QueryInterface IID_IAgileObject returned agile_object\n");
IAgileObject_Release(tmp_agile_object);
size = 0xdeadbeef;
hr = IVectorView_HSTRING_get_Size(languages, &size);
- ok(hr == S_OK, "IVectorView_HSTRING_get_Size failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IVectorView_HSTRING_get_Size failed, hr %#lx\n", hr);
ok(size != 0 && size != 0xdeadbeef, "IVectorView_HSTRING_get_Size returned %u\n", size);
hr = IVectorView_HSTRING_GetAt(languages, 0, &tmp_str);
- ok(hr == S_OK, "IVectorView_HSTRING_GetAt failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IVectorView_HSTRING_GetAt failed, hr %#lx\n", hr);
buf = WindowsGetStringRawBuffer(tmp_str, &len);
ok(buf != NULL && len > 0, "WindowsGetStringRawBuffer returned buf %p, len %u\n", buf, len);
@@ -141,34 +141,34 @@ static void test_GlobalizationPreferences(void)
i = 0xdeadbeef;
found = FALSE;
hr = IVectorView_HSTRING_IndexOf(languages, tmp_str, &i, &found);
- ok(hr == S_OK, "IVectorView_HSTRING_IndexOf failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IVectorView_HSTRING_IndexOf failed, hr %#lx\n", hr);
ok(i == 0 && found == TRUE, "IVectorView_HSTRING_IndexOf returned size %d, found %d\n", size, found);
WindowsDeleteString(tmp_str);
hr = WindowsCreateString(L"deadbeef", 8, &tmp_str);
- ok(hr == S_OK, "WindowsCreateString failed, hr %#x\n", hr);
+ ok(hr == S_OK, "WindowsCreateString failed, hr %#lx\n", hr);
i = 0xdeadbeef;
found = TRUE;
hr = IVectorView_HSTRING_IndexOf(languages, tmp_str, &i, &found);
- ok(hr == S_OK, "IVectorView_HSTRING_IndexOf failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IVectorView_HSTRING_IndexOf failed, hr %#lx\n", hr);
ok(i == 0 && found == FALSE, "IVectorView_HSTRING_IndexOf returned size %d, found %d\n", size, found);
WindowsDeleteString(tmp_str);
tmp_str = (HSTRING)0xdeadbeef;
hr = IVectorView_HSTRING_GetAt(languages, size, &tmp_str);
- ok(hr == E_BOUNDS, "IVectorView_HSTRING_GetAt failed, hr %#x\n", hr);
+ ok(hr == E_BOUNDS, "IVectorView_HSTRING_GetAt failed, hr %#lx\n", hr);
ok(tmp_str == NULL, "IVectorView_HSTRING_GetAt returned %p\n", tmp_str);
tmp_str = (HSTRING)0xdeadbeef;
hr = IVectorView_HSTRING_GetMany(languages, size, 1, &tmp_str, &i);
- ok(hr == S_OK, "IVectorView_HSTRING_GetAt failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IVectorView_HSTRING_GetAt failed, hr %#lx\n", hr);
ok(i == 0 && tmp_str == NULL, "IVectorView_HSTRING_GetMany returned count %u, str %p\n", i, tmp_str);
hr = IVectorView_HSTRING_GetMany(languages, 0, 1, &tmp_str, &i);
- ok(hr == S_OK, "IVectorView_HSTRING_GetAt failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IVectorView_HSTRING_GetAt failed, hr %#lx\n", hr);
ok(i == 1, "IVectorView_HSTRING_GetMany returned count %u, expected 1\n", i);
buf = WindowsGetStringRawBuffer(tmp_str, &len);
@@ -184,33 +184,33 @@ static void test_GlobalizationPreferences(void)
hr = IGlobalizationPreferencesStatics_get_Calendars(preferences_statics, &calendars);
- ok(hr == S_OK, "IGlobalizationPreferencesStatics_get_Calendars failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IGlobalizationPreferencesStatics_get_Calendars failed, hr %#lx\n", hr);
size = 0xdeadbeef;
hr = IVectorView_HSTRING_get_Size(calendars, &size);
- ok(hr == S_OK, "IVectorView_HSTRING_get_Size failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IVectorView_HSTRING_get_Size failed, hr %#lx\n", hr);
todo_wine ok(size != 0 && size != 0xdeadbeef, "IVectorView_HSTRING_get_Size returned %u\n", size);
IVectorView_HSTRING_Release(calendars);
hr = IGlobalizationPreferencesStatics_get_Clocks(preferences_statics, &clocks);
- ok(hr == S_OK, "IGlobalizationPreferencesStatics_get_Clocks failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IGlobalizationPreferencesStatics_get_Clocks failed, hr %#lx\n", hr);
size = 0xdeadbeef;
hr = IVectorView_HSTRING_get_Size(clocks, &size);
- ok(hr == S_OK, "IVectorView_HSTRING_get_Size failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IVectorView_HSTRING_get_Size failed, hr %#lx\n", hr);
todo_wine ok(size != 0 && size != 0xdeadbeef, "IVectorView_HSTRING_get_Size returned %u\n", size);
IVectorView_HSTRING_Release(clocks);
hr = IGlobalizationPreferencesStatics_get_Currencies(preferences_statics, ¤cies);
- ok(hr == S_OK, "IGlobalizationPreferencesStatics_get_Currencies failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IGlobalizationPreferencesStatics_get_Currencies failed, hr %#lx\n", hr);
size = 0xdeadbeef;
hr = IVectorView_HSTRING_get_Size(currencies, &size);
- ok(hr == S_OK, "IVectorView_HSTRING_get_Size failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IVectorView_HSTRING_get_Size failed, hr %#lx\n", hr);
todo_wine ok(size != 0 && size != 0xdeadbeef, "IVectorView_HSTRING_get_Size returned %u\n", size);
IVectorView_HSTRING_Release(currencies);
1
0