migrating dlls/oleaut32/tests required lot more effort than usual <g> - the current code didn't use the generic integer scheme of the rest of the file (likely because of LONG64 printf limitations) => test code is now converted to the generic integer scheme (making it a bit simpler) (I found it more straightforward to do it that way than trying to maintain a scheme that was meant to disapear at some time) - the long/LONG/int mixup showed up in automation as well. => most of the tests routines have been converted int => LONG (I didn't include the migration to long, which needs to be done *after* enabling LONG as long, please let me know if it's to be done)
No regressions have been seen here with winetest. Tested also on testbot without regression. But review is more than welcomed!
The rest of the changes are "as usual".
A+ ---
Eric Pouech (25): dlls/kernel32/tests/path.c: enable compilation with long types dlls/kernel32/tests/pipe.c: enable compilation with long types dlls/kernel32/tests/process.c: enable compilation with long types dlls/kernel32/tests/profile.c: enable compilation with long types dlls/oleaut32/tests: get rid of EXPECTI864 macro (vartype.c) dlls/oleaut32/tests: convert I8 to current integer test scheme (vartype.c) dlls/oleau32/tests: convert I8Copy to existing integer test scheme (vartype.c) dlls/oleaut32/tests: convert UI8 to existing integer test scheme (vartype.c) dlls/oleaut32/tests: convert UI8Copy to existing integer test scheme (vartype.c) dlls/oleaut32/tests: ensure (re)definition of EXPECTRES for all integer types (vartype.c) dlls/oleaut32/tests: use correct integral type dlls/oleaut32/tests: enable compilation with long types dlls/shdocvw/tests: enable compilation with long types dlls/shell32/tests: use correct integral type dlls/shell32/tests: enable compilation with long types dlls/shlwapi/tests: enable compilation with long types dlls/slc/tests: enable compilation with long types dlls/spoolss/tests: enable compilation with long types dlls/sti/tests: enable compilation with long types dlls/sxs/tests: enable compilation with long types dlls/tapi32/tests: enable compilation with long types dlls/taskschd/tests: enable compilation with long types dlls/twain_32/tests: enable compilation with long types dlls/uianimation/tests: enable compilation with long types dlls/uiautomationcore/tests: enable compilation with long types
dlls/kernel32/tests/path.c | 401 ++--- dlls/kernel32/tests/pipe.c | 949 ++++++------ dlls/kernel32/tests/process.c | 939 ++++++------ dlls/kernel32/tests/profile.c | 347 ++--- dlls/oleaut32/tests/Makefile.in | 1 - dlls/oleaut32/tests/dispatch.c | 52 +- dlls/oleaut32/tests/olefont.c | 124 +- dlls/oleaut32/tests/olepicture.c | 268 ++-- dlls/oleaut32/tests/safearray.c | 426 +++--- dlls/oleaut32/tests/tmarshal.c | 503 +++--- dlls/oleaut32/tests/tmarshal.idl | 12 +- dlls/oleaut32/tests/typelib.c | 1596 ++++++++++---------- dlls/oleaut32/tests/usrmarshal.c | 324 ++-- dlls/oleaut32/tests/varformat.c | 60 +- dlls/oleaut32/tests/vartest.c | 336 ++--- dlls/oleaut32/tests/vartype.c | 648 ++++---- dlls/shdocvw/tests/Makefile.in | 1 - dlls/shdocvw/tests/shdocvw.c | 46 +- dlls/shdocvw/tests/shortcut.c | 12 +- dlls/shell32/tests/Makefile.in | 1 - dlls/shell32/tests/appbar.c | 18 +- dlls/shell32/tests/assoc.c | 80 +- dlls/shell32/tests/autocomplete.c | 76 +- dlls/shell32/tests/brsfolder.c | 34 +- dlls/shell32/tests/ebrowser.c | 314 ++-- dlls/shell32/tests/msg.h | 8 +- dlls/shell32/tests/recyclebin.c | 6 +- dlls/shell32/tests/shelldispatch.c | 438 +++--- dlls/shell32/tests/shelllink.c | 274 ++-- dlls/shell32/tests/shellole.c | 74 +- dlls/shell32/tests/shellpath.c | 260 ++-- dlls/shell32/tests/shfldr_special.c | 66 +- dlls/shell32/tests/shlexec.c | 202 +-- dlls/shell32/tests/shlfileop.c | 287 ++-- dlls/shell32/tests/shlfolder.c | 1086 ++++++------- dlls/shell32/tests/shlview.c | 194 +-- dlls/shlwapi/tests/Makefile.in | 1 - dlls/shlwapi/tests/assoc.c | 50 +- dlls/shlwapi/tests/clist.c | 4 +- dlls/shlwapi/tests/clsid.c | 10 +- dlls/shlwapi/tests/istream.c | 258 ++-- dlls/shlwapi/tests/ordinal.c | 306 ++-- dlls/shlwapi/tests/path.c | 210 +-- dlls/shlwapi/tests/shreg.c | 104 +- dlls/shlwapi/tests/string.c | 52 +- dlls/shlwapi/tests/thread.c | 34 +- dlls/shlwapi/tests/url.c | 276 ++-- dlls/slc/tests/Makefile.in | 1 - dlls/slc/tests/slc.c | 18 +- dlls/spoolss/tests/Makefile.in | 1 - dlls/spoolss/tests/spoolss.c | 6 +- dlls/sti/tests/Makefile.in | 1 - dlls/sti/tests/sti.c | 20 +- dlls/sxs/tests/Makefile.in | 1 - dlls/sxs/tests/cache.c | 70 +- dlls/sxs/tests/name.c | 66 +- dlls/sxs/tests/sxs.c | 38 +- dlls/tapi32/tests/Makefile.in | 1 - dlls/tapi32/tests/tapi.c | 14 +- dlls/taskschd/tests/Makefile.in | 1 - dlls/taskschd/tests/scheduler.c | 618 ++++---- dlls/twain_32/tests/Makefile.in | 1 - dlls/twain_32/tests/dsm.c | 42 +- dlls/uianimation/tests/Makefile.in | 1 - dlls/uianimation/tests/uianimation.c | 26 +- dlls/uiautomationcore/tests/Makefile.in | 1 - dlls/uiautomationcore/tests/uiautomation.c | 80 +- 67 files changed, 6347 insertions(+), 6428 deletions(-)
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/kernel32/tests/path.c | 401 ++++++++++++++++++++++---------------------- 1 file changed, 201 insertions(+), 200 deletions(-)
diff --git a/dlls/kernel32/tests/path.c b/dlls/kernel32/tests/path.c index db376eef24a..6c497ae3b8c 100644 --- a/dlls/kernel32/tests/path.c +++ b/dlls/kernel32/tests/path.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 <stdarg.h> #include <stdio.h> @@ -265,25 +266,25 @@ static void test_FunnyChars(CHAR *curdir,CHAR *curdir_short,CHAR *filename, INT ok((passfail.shortlen==0 && (passfail.shorterror==ERROR_FILE_NOT_FOUND || passfail.shorterror==ERROR_PATH_NOT_FOUND || !passfail.shorterror)) || (passfail.shortlen==strlen(tmpstr1) && lstrcmpiA(tmpstr,tmpstr1)==0), - "%s: GetShortPathNameA error: len=%d error=%d tmpstr=[%s]\n", + "%s: GetShortPathNameA error: len=%ld error=%ld tmpstr=[%s]\n", errstr,passfail.shortlen,passfail.shorterror,tmpstr); } else { ok(passfail.shortlen==0 && (passfail.shorterror==ERROR_INVALID_NAME || passfail.shorterror==ERROR_FILE_NOT_FOUND || !passfail.shorterror), - "%s: GetShortPathA should have failed len=%d, error=%d\n", + "%s: GetShortPathA should have failed len=%ld, error=%ld\n", errstr,passfail.shortlen,passfail.shorterror); }
ok(!passfail.longlen, "GetLongPathNameA passed when it shouldn't have\n"); if (valid) { - ok(passfail.longerror == ERROR_FILE_NOT_FOUND, "%s: GetLongPathA unexpected error %d.\n", errstr, + ok(passfail.longerror == ERROR_FILE_NOT_FOUND, "%s: GetLongPathA unexpected error %ld.\n", errstr, passfail.longerror); } else { ok(passfail.longerror == ERROR_INVALID_NAME || passfail.longerror == ERROR_FILE_NOT_FOUND, - "%s: GetLongPathA unexpected error %d.\n", errstr, passfail.longerror); + "%s: GetLongPathA unexpected error %ld.\n", errstr, passfail.longerror); } }
@@ -350,7 +351,7 @@ static void test_InitPathA(CHAR *newdir, CHAR *curDrive, CHAR *otherDrive) "GetTempPathA returned a path that did not end in '\'\n"); lstrcpyA(tmpstr,"aaaaaaaa"); len1=GetTempPathA(len,tmpstr); - ok(len1==len+1,"GetTempPathA should return string length %d instead of %d\n",len+1,len1); + ok(len1==len+1,"GetTempPathA should return string length %ld instead of %ld\n",len+1,len1);
/* Test GetTmpFileNameA */ ok((id=GetTempFileNameA(tmppath,"path",0,newdir)),"GetTempFileNameA failed\n"); @@ -376,7 +377,7 @@ static void test_InitPathA(CHAR *newdir, CHAR *curDrive, CHAR *otherDrive) sprintf(invalid_dir, "%s\%s",tmppath,"non_existent_dir_1jwj3y32nb3"); SetLastError(0xdeadbeef); ok(!GetTempFileNameA(invalid_dir,"tfn",unique,newdir),"GetTempFileNameA should have failed\n"); - ok(GetLastError()==ERROR_DIRECTORY,"got %u, expected ERROR_DIRECTORY\n", GetLastError()); + ok(GetLastError()==ERROR_DIRECTORY,"got %lu, expected ERROR_DIRECTORY\n", GetLastError());
/* Check return value for unique !=0 */ if(unique) { @@ -416,12 +417,12 @@ static void test_InitPathA(CHAR *newdir, CHAR *curDrive, CHAR *otherDrive) bRes = CreateDirectoryA(tmpstr,NULL); ok(!bRes && (GetLastError() == ERROR_ACCESS_DENIED || GetLastError() == ERROR_ALREADY_EXISTS), - "CreateDirectoryA("%s" should have failed (%d)\n", tmpstr, GetLastError()); + "CreateDirectoryA("%s" should have failed (%ld)\n", tmpstr, GetLastError()); sprintf(tmpstr,"%c:\", *curDrive); bRes = CreateDirectoryA(tmpstr,NULL); ok(!bRes && (GetLastError() == ERROR_ACCESS_DENIED || GetLastError() == ERROR_ALREADY_EXISTS), - "CreateDirectoryA("%s" should have failed (%d)\n", tmpstr, GetLastError()); + "CreateDirectoryA("%s" should have failed (%ld)\n", tmpstr, GetLastError()); sprintf(tmpstr,"%s\%s\%s",newdir,SHORTDIR,SHORTFILE); hndl=CreateFileA(tmpstr,GENERIC_WRITE,0,NULL, CREATE_NEW,FILE_ATTRIBUTE_NORMAL,NULL); @@ -460,7 +461,7 @@ static void test_CurrentDirectoryA(CHAR *origdir, CHAR *newdir) */ lstrcpyA(tmpstr,"aaaaaaa"); len1=GetCurrentDirectoryA(len,tmpstr); - ok(len1==len+1, "GetCurrentDirectoryA returned %d instead of %d\n",len1,len+1); + ok(len1==len+1, "GetCurrentDirectoryA returned %ld instead of %ld\n",len1,len+1); ok(lstrcmpiA(tmpstr,"aaaaaaa")==0, "GetCurrentDirectoryA should not have modified the buffer\n");
@@ -468,27 +469,27 @@ static void test_CurrentDirectoryA(CHAR *origdir, CHAR *newdir) SetLastError( 0xdeadbeef ); strcpy( buffer, "foo" ); len = GetCurrentDirectoryA( 32767, buffer ); - ok( len != 0 && len < MAX_PATH, "GetCurrentDirectoryA failed %u err %u\n", len, GetLastError() ); + ok( len != 0 && len < MAX_PATH, "GetCurrentDirectoryA failed %lu err %lu\n", len, GetLastError() ); if (len) ok( !strcmp( buffer, origdir ), "wrong result %s\n", buffer ); SetLastError( 0xdeadbeef ); strcpy( buffer, "foo" ); len = GetCurrentDirectoryA( 32768, buffer ); - ok( len != 0 && len < MAX_PATH, "GetCurrentDirectoryA failed %u err %u\n", len, GetLastError() ); + ok( len != 0 && len < MAX_PATH, "GetCurrentDirectoryA failed %lu err %lu\n", len, GetLastError() ); if (len) ok( !strcmp( buffer, origdir ), "wrong result %s\n", buffer ); SetLastError( 0xdeadbeef ); strcpy( buffer, "foo" ); len = GetCurrentDirectoryA( 65535, buffer ); - ok( (len != 0 && len < MAX_PATH) || broken(!len), /* nt4, win2k, xp */ "GetCurrentDirectoryA failed %u err %u\n", len, GetLastError() ); + ok( (len != 0 && len < MAX_PATH) || broken(!len), /* nt4, win2k, xp */ "GetCurrentDirectoryA failed %lu err %lu\n", len, GetLastError() ); if (len) ok( !strcmp( buffer, origdir ), "wrong result %s\n", buffer ); SetLastError( 0xdeadbeef ); strcpy( buffer, "foo" ); len = GetCurrentDirectoryA( 65536, buffer ); - ok( (len != 0 && len < MAX_PATH), "GetCurrentDirectoryA failed %u err %u\n", len, GetLastError() ); + ok( (len != 0 && len < MAX_PATH), "GetCurrentDirectoryA failed %lu err %lu\n", len, GetLastError() ); if (len) ok( !strcmp( buffer, origdir ), "wrong result %s\n", buffer ); SetLastError( 0xdeadbeef ); strcpy( buffer, "foo" ); len = GetCurrentDirectoryA( 2 * 65536, buffer ); - ok( (len != 0 && len < MAX_PATH), "GetCurrentDirectoryA failed %u err %u\n", len, GetLastError() ); + ok( (len != 0 && len < MAX_PATH), "GetCurrentDirectoryA failed %lu err %lu\n", len, GetLastError() ); if (len) ok( !strcmp( buffer, origdir ), "wrong result %s\n", buffer ); HeapFree( GetProcessHeap(), 0, buffer );
@@ -574,14 +575,14 @@ static void test_ShortPathCase(const char *tmpdir, const char *dirname, sprintf(buf,"%s\%s\%s",tmpdir,dirname,filename); GetShortPathNameA(buf,shortbuf,sizeof(shortbuf)); hndl = CreateFileA(shortbuf,GENERIC_READ|GENERIC_WRITE,0,NULL,OPEN_EXISTING,0,NULL); - ok(hndl!=INVALID_HANDLE_VALUE,"CreateFileA failed (%d)\n",GetLastError()); + ok(hndl!=INVALID_HANDLE_VALUE,"CreateFileA failed (%ld)\n",GetLastError()); CloseHandle(hndl); /* Now for the real test */ for(i=0;i<strlen(shortbuf);i++) if (i % 2) shortbuf[i] = tolower(shortbuf[i]); hndl = CreateFileA(shortbuf,GENERIC_READ|GENERIC_WRITE,0,NULL,OPEN_EXISTING,0,NULL); - ok(hndl!=INVALID_HANDLE_VALUE,"CreateFileA failed (%d)\n",GetLastError()); + ok(hndl!=INVALID_HANDLE_VALUE,"CreateFileA failed (%ld)\n",GetLastError()); CloseHandle(hndl); }
@@ -614,12 +615,12 @@ static void test_PathNameA(CHAR *curdir, CHAR curDrive, CHAR otherDrive) rc1 = GetLongPathNameA(tmpstr, NULL, 0); rc2 = GetLongPathNameA(curdir, NULL, 0); ok((rc1-strlen(tmpstr))==(rc2-strlen(curdir)), - "GetLongPathNameA: wrong return code, %d instead of %d\n", + "GetLongPathNameA: wrong return code, %ld instead of %d\n", rc1, lstrlenA(tmpstr)+1);
sprintf(dir,"%c:",curDrive); rc1= GetLongPathNameA(dir, tmpstr, sizeof(tmpstr)); - ok(!strcmp(dir,tmpstr), "GetLongPathNameA: returned '%s' instead of '%s' (rc=%d)\n", + ok(!strcmp(dir,tmpstr), "GetLongPathNameA: returned '%s' instead of '%s' (rc=%ld)\n", tmpstr, dir, rc1);
/* Check the cases where both file and directory exist first */ @@ -649,11 +650,11 @@ static void test_PathNameA(CHAR *curdir, CHAR curDrive, CHAR otherDrive) (passfail.shorterror==ERROR_PATH_NOT_FOUND || passfail.shorterror==ERROR_FILE_NOT_FOUND)) || (passfail.shortlen==strlen(tmpstr1) && lstrcmpiA(tmpstr,tmpstr1)==0), - "GetShortPathNameA error: len=%d error=%d tmpstr=[%s]\n", + "GetShortPathNameA error: len=%ld error=%ld tmpstr=[%s]\n", passfail.shortlen,passfail.shorterror,tmpstr);
ok(!passfail.longlen, "GetLongPathNameA passed when it shouldn't have\n"); - ok(passfail.longerror == ERROR_FILE_NOT_FOUND, "Unexpected error %d.\n", passfail.longerror); + ok(passfail.longerror == ERROR_FILE_NOT_FOUND, "Unexpected error %ld.\n", passfail.longerror);
/* Now try a 8.3 directory, long file name */ test_ValidPathA(curdir,SHORTDIR,NONFILE_LONG,tmpstr,&passfail,"test6"); @@ -663,7 +664,7 @@ static void test_PathNameA(CHAR *curdir, CHAR curDrive, CHAR otherDrive) !passfail.shorterror, "GetShortPathA should have returned 'ERROR_FILE_NOT_FOUND'\n"); ok(!passfail.longlen, "GetLongPathNameA passed when it shouldn't have\n"); - ok(passfail.longerror == ERROR_FILE_NOT_FOUND, "Unexpected error %d.\n", passfail.longerror); + ok(passfail.longerror == ERROR_FILE_NOT_FOUND, "Unexpected error %ld.\n", passfail.longerror);
/* Next is a long directory, 8.3 file */ test_ValidPathA(curdir,LONGDIR,NONFILE_SHORT,tmpstr,&passfail,"test7"); @@ -674,10 +675,10 @@ static void test_PathNameA(CHAR *curdir, CHAR curDrive, CHAR otherDrive) (passfail.shorterror==ERROR_PATH_NOT_FOUND || passfail.shorterror==ERROR_FILE_NOT_FOUND)) || (passfail.shortlen==strlen(tmpstr1) && lstrcmpiA(tmpstr,tmpstr1)==0), - "GetShortPathNameA error: len=%d error=%d tmpstr=[%s]\n", + "GetShortPathNameA error: len=%ld error=%ld tmpstr=[%s]\n", passfail.shortlen,passfail.shorterror,tmpstr); ok(!passfail.longlen, "GetLongPathNameA passed when it shouldn't have\n"); - ok(passfail.longerror == ERROR_FILE_NOT_FOUND, "Unexpected error %d.\n", passfail.longerror); + ok(passfail.longerror == ERROR_FILE_NOT_FOUND, "Unexpected error %ld.\n", passfail.longerror);
/*Lastly a long directory, long file */ test_ValidPathA(curdir,LONGDIR,NONFILE_LONG,tmpstr,&passfail,"test8"); @@ -687,7 +688,7 @@ static void test_PathNameA(CHAR *curdir, CHAR curDrive, CHAR otherDrive) !passfail.shorterror, "GetShortPathA should have returned 'ERROR_FILE_NOT_FOUND'\n"); ok(!passfail.longlen, "GetLongPathNameA passed when it shouldn't have\n"); - ok(passfail.longerror == ERROR_FILE_NOT_FOUND, "Unexpected error %d.\n", passfail.longerror); + ok(passfail.longerror == ERROR_FILE_NOT_FOUND, "Unexpected error %ld.\n", passfail.longerror);
/* Now try again with directories that don't exist */ /* 8.3 directory, 8.3 filename */ @@ -697,11 +698,11 @@ static void test_PathNameA(CHAR *curdir, CHAR curDrive, CHAR otherDrive) (passfail.shorterror==ERROR_PATH_NOT_FOUND || passfail.shorterror==ERROR_FILE_NOT_FOUND)) || (passfail.shortlen==strlen(tmpstr1) && lstrcmpiA(tmpstr,tmpstr1)==0), - "GetShortPathNameA error: len=%d error=%d tmpstr=[%s]\n", + "GetShortPathNameA error: len=%ld error=%ld tmpstr=[%s]\n", passfail.shortlen,passfail.shorterror,tmpstr); ok(!passfail.longlen, "GetLongPathNameA passed when it shouldn't have\n"); ok(passfail.longerror == ERROR_PATH_NOT_FOUND || passfail.longerror == ERROR_FILE_NOT_FOUND, - "Unexpected error %d.\n", passfail.longerror); + "Unexpected error %ld.\n", passfail.longerror);
/* Now try a 8.3 directory, long file name */ test_ValidPathA(curdir,NONDIR_SHORT,LONGFILE,tmpstr,&passfail,"test10"); @@ -709,11 +710,11 @@ static void test_PathNameA(CHAR *curdir, CHAR curDrive, CHAR otherDrive) ok(passfail.shorterror==ERROR_PATH_NOT_FOUND || passfail.shorterror==ERROR_FILE_NOT_FOUND || !passfail.shorterror, - "GetShortPathA returned %d and not 'ERROR_PATH_NOT_FOUND'\n", + "GetShortPathA returned %ld and not 'ERROR_PATH_NOT_FOUND'\n", passfail.shorterror); ok(!passfail.longlen, "GetLongPathNameA passed when it shouldn't have\n"); ok(passfail.longerror == ERROR_PATH_NOT_FOUND || passfail.longerror == ERROR_FILE_NOT_FOUND, - "Unexpected error %d.\n", passfail.longerror); + "Unexpected error %ld.\n", passfail.longerror);
/* Next is a long directory, 8.3 file */ test_ValidPathA(curdir,NONDIR_LONG,SHORTFILE,tmpstr,&passfail,"test11"); @@ -721,11 +722,11 @@ static void test_PathNameA(CHAR *curdir, CHAR curDrive, CHAR otherDrive) ok(passfail.shorterror==ERROR_PATH_NOT_FOUND || passfail.shorterror==ERROR_FILE_NOT_FOUND || !passfail.shorterror, - "GetShortPathA returned %d and not 'ERROR_PATH_NOT_FOUND'\n", + "GetShortPathA returned %ld and not 'ERROR_PATH_NOT_FOUND'\n", passfail.shorterror); ok(!passfail.longlen, "GetLongPathNameA passed when it shouldn't have\n"); ok(passfail.longerror == ERROR_PATH_NOT_FOUND || passfail.longerror == ERROR_FILE_NOT_FOUND, - "Unexpected error %d.\n", passfail.longerror); + "Unexpected error %ld.\n", passfail.longerror);
/*Lastly a long directory, long file */ test_ValidPathA(curdir,NONDIR_LONG,LONGFILE,tmpstr,&passfail,"test12"); @@ -733,11 +734,11 @@ static void test_PathNameA(CHAR *curdir, CHAR curDrive, CHAR otherDrive) ok(passfail.shorterror==ERROR_PATH_NOT_FOUND || passfail.shorterror==ERROR_FILE_NOT_FOUND || !passfail.shorterror, - "GetShortPathA returned %d and not 'ERROR_PATH_NOT_FOUND'\n", + "GetShortPathA returned %ld and not 'ERROR_PATH_NOT_FOUND'\n", passfail.shorterror); ok(!passfail.longlen, "GetLongPathNameA passed when it shouldn't have\n"); ok(passfail.longerror == ERROR_PATH_NOT_FOUND || passfail.longerror == ERROR_FILE_NOT_FOUND, - "Unexpected error %d.\n", passfail.longerror); + "Unexpected error %ld.\n", passfail.longerror);
/* Next try directories ending with '\' */ /* Existing Directories */ @@ -753,10 +754,10 @@ static void test_PathNameA(CHAR *curdir, CHAR curDrive, CHAR otherDrive) (passfail.shorterror==ERROR_PATH_NOT_FOUND || passfail.shorterror==ERROR_FILE_NOT_FOUND)) || (passfail.shortlen==strlen(tmpstr2) && lstrcmpiA(tmpstr1,tmpstr2)==0), - "GetShortPathNameA error: len=%d error=%d tmpstr=[%s]\n", + "GetShortPathNameA error: len=%ld error=%ld tmpstr=[%s]\n", passfail.shortlen,passfail.shorterror,tmpstr); ok(!passfail.longlen, "GetLongPathNameA passed when it shouldn't have\n"); - ok(passfail.longerror == ERROR_FILE_NOT_FOUND, "Unexpected error %d.\n", passfail.longerror); + ok(passfail.longerror == ERROR_FILE_NOT_FOUND, "Unexpected error %ld.\n", passfail.longerror);
sprintf(tmpstr,"%s\",NONDIR_LONG); test_ValidPathA(curdir,"",tmpstr,tmpstr1,&passfail,"test16"); @@ -764,10 +765,10 @@ static void test_PathNameA(CHAR *curdir, CHAR curDrive, CHAR otherDrive) ok(passfail.shorterror==ERROR_PATH_NOT_FOUND || passfail.shorterror==ERROR_FILE_NOT_FOUND || !passfail.shorterror, - "GetShortPathA returned %d and not 'ERROR_FILE_NOT_FOUND'\n", + "GetShortPathA returned %ld and not 'ERROR_FILE_NOT_FOUND'\n", passfail.shorterror); ok(!passfail.longlen, "GetLongPathNameA passed when it shouldn't have\n"); - ok(passfail.longerror == ERROR_FILE_NOT_FOUND, "Unexpected error %d.\n", passfail.longerror); + ok(passfail.longerror == ERROR_FILE_NOT_FOUND, "Unexpected error %ld.\n", passfail.longerror);
/* Test GetFullPathNameA with drive letters */ if( curDrive != NOT_A_VALID_DRIVE) { @@ -946,10 +947,10 @@ static void test_GetTempPathA(char* tmp_dir) * of len_with_null. */ len = GetTempPathA(1, buf); - ok(len >= len_with_null, "Expected >= %u, got %u\n", len_with_null, len); + ok(len >= len_with_null, "Expected >= %lu, got %lu\n", len_with_null, len);
len = GetTempPathA(0, NULL); - ok(len >= len_with_null, "Expected >= %u, got %u\n", len_with_null, len); + ok(len >= len_with_null, "Expected >= %lu, got %lu\n", len_with_null, len);
/* The call above gave us the buffer size that Windows thinks is needed * so the next call should work @@ -966,15 +967,15 @@ static void test_GetTempPathA(char* tmp_dir) /* The rest of the buffer remains untouched */ slen = len + 1; for(len++; len < sizeof(buf); len++) - ok(buf[len] == 'a', "expected 'a' at [%d], got 0x%x\n", len, buf[len]); + ok(buf[len] == 'a', "expected 'a' at [%ld], got 0x%x\n", len, buf[len]);
/* When the buffer is not long enough it remains untouched */ memset(buf, 'a', sizeof(buf)); len = GetTempPathA(slen / 2, buf); ok(len == slen || broken(len == slen + 1) /* read the big comment above */ , - "expected %d, got %d\n", slen, len); + "expected %ld, got %ld\n", slen, len); for(len = 0; len < ARRAY_SIZE(buf); len++) - ok(buf[len] == 'a', "expected 'a' at [%d], got 0x%x\n", len, buf[len]); + ok(buf[len] == 'a', "expected 'a' at [%ld], got 0x%x\n", len, buf[len]); }
static void test_GetTempPathW(char* tmp_dir) @@ -1004,10 +1005,10 @@ static void test_GetTempPathW(char* tmp_dir) lstrcpyW(buf, fooW); len = GetTempPathW(1, buf); ok(buf[0] == 0, "unicode version should truncate the buffer to zero size\n"); - ok(len >= len_with_null, "Expected >= %u, got %u\n", len_with_null, len); + ok(len >= len_with_null, "Expected >= %lu, got %lu\n", len_with_null, len);
len = GetTempPathW(0, NULL); - ok(len >= len_with_null, "Expected >= %u, got %u\n", len_with_null, len); + ok(len >= len_with_null, "Expected >= %lu, got %lu\n", len_with_null, len);
lstrcpyW(buf, fooW); len = GetTempPathW(len, buf); @@ -1022,14 +1023,14 @@ static void test_GetTempPathW(char* tmp_dir) /* The rest of the buffer must be zeroed */ slen = len + 1; for(len++; len < ARRAY_SIZE(buf); len++) - ok(buf[len] == '\0', "expected NULL at [%d], got 0x%x\n", len, buf[len]); + ok(buf[len] == '\0', "expected NULL at [%ld], got 0x%x\n", len, buf[len]);
/* When the buffer is not long enough the length passed is zeroed */ for(len = 0; len < ARRAY_SIZE(buf); len++) buf[len] = 'a'; len = GetTempPathW(slen / 2, buf); ok(len == slen || broken(len == slen + 1) /* read the big comment above */ , - "expected %d, got %d\n", slen, len); + "expected %ld, got %ld\n", slen, len);
{ /* In Windows 8 when TMP var points to a drive only (like C:) instead of a @@ -1045,9 +1046,9 @@ static void test_GetTempPathW(char* tmp_dir) }
for(len = 0; len < slen / 2; len++) - ok(buf[len] == '\0', "expected NULL at [%d], got 0x%x\n", len, buf[len]); + ok(buf[len] == '\0', "expected NULL at [%ld], got 0x%x\n", len, buf[len]); for(; len < ARRAY_SIZE(buf); len++) - ok(buf[len] == 'a', "expected 'a' at [%d], got 0x%x\n", len, buf[len]); + ok(buf[len] == 'a', "expected 'a' at [%ld], got 0x%x\n", len, buf[len]);
/* bogus application from bug 38220 passes the count value in sizeof(buffer) * instead the correct count of WCHAR, this test catches this case. */ @@ -1069,11 +1070,11 @@ static void test_GetTempPathW(char* tmp_dir) * to simplify testing we will test only until XP. */ for(; len < 32767; len++) - ok(long_buf[len] == '\0', "expected NULL at [%d], got 0x%x\n", len, long_buf[len]); + ok(long_buf[len] == '\0', "expected NULL at [%ld], got 0x%x\n", len, long_buf[len]); /* we will know skip the test that is in the middle of the OS difference by * incrementing len and then resume the test for the untouched part. */ for(len++; len < slen; len++) - ok(long_buf[len] == 0xcc, "expected 0xcc at [%d], got 0x%x\n", len, long_buf[len]); + ok(long_buf[len] == 0xcc, "expected 0xcc at [%ld], got 0x%x\n", len, long_buf[len]);
HeapFree(GetProcessHeap(), 0, long_buf); } @@ -1150,7 +1151,7 @@ static void test_GetLongPathNameA(void) SetLastError(0xdeadbeef); length = GetLongPathNameA(tempfile, temppath, MAX_PATH); ok(!length, "GetLongPathNameA should fail\n"); - ok(GetLastError() == ERROR_INVALID_NAME, "wrong error %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_NAME, "wrong error %ld\n", GetLastError());
strcpy(name, "longfilename.longext");
@@ -1174,13 +1175,13 @@ static void test_GetLongPathNameA(void)
SetLastError(0xdeadbeef); length = GetLongPathNameA(temppath2, NULL, 0); - ok(length == explength, "Wrong length %d, expected %d\n", length, explength); + ok(length == explength, "Wrong length %ld, expected %ld\n", length, explength);
length = GetLongPathNameA(temppath2, NULL, MAX_PATH); - ok(length == explength, "Wrong length %d, expected %d\n", length, explength); + ok(length == explength, "Wrong length %ld, expected %ld\n", length, explength);
length = GetLongPathNameA(temppath2, temppath, 4); - ok(length == explength, "Wrong length %d, expected %d\n", length, explength); + ok(length == explength, "Wrong length %ld, expected %ld\n", length, explength); ok(temppath[0] == 0, "Buffer should not have been touched\n");
/* Now an UNC path with the computername */ @@ -1217,17 +1218,17 @@ static void test_GetLongPathNameA(void) } explength = lstrlenA(longpath) + 1; todo_wine - ok(length == explength, "Wrong length %d, expected %d\n", length, explength); + ok(length == explength, "Wrong length %ld, expected %ld\n", length, explength);
length = GetLongPathNameA(unc_short, NULL, MAX_PATH); todo_wine - ok(length == explength, "Wrong length %d, expected %d\n", length, explength); + ok(length == explength, "Wrong length %ld, expected %ld\n", length, explength);
memset(unc_long, 0, MAX_PATH); length = GetLongPathNameA(unc_short, unc_long, lstrlenA(unc_short)); /* length will include terminating '0' on failure */ todo_wine - ok(length == explength, "Wrong length %d, expected %d\n", length, explength); + ok(length == explength, "Wrong length %ld, expected %ld\n", length, explength); ok(unc_long[0] == 0, "Buffer should not have been touched\n");
memset(unc_long, 0, MAX_PATH); @@ -1236,7 +1237,7 @@ static void test_GetLongPathNameA(void) explength--; todo_wine { - ok(length == explength, "Wrong length %d, expected %d\n", length, explength); + ok(length == explength, "Wrong length %ld, expected %ld\n", length, explength); ok(!lstrcmpiA(unc_long, longpath), "Expected (%s), got (%s)\n", longpath, unc_long); }
@@ -1258,14 +1259,14 @@ static void test_GetLongPathNameW(void)
SetLastError(0xdeadbeef); length = GetLongPathNameW(NULL,NULL,0); - ok(0==length,"GetLongPathNameW returned %d but expected 0\n",length); - ok(GetLastError()==ERROR_INVALID_PARAMETER,"GetLastError returned %d but expected ERROR_INVALID_PARAMETER\n",GetLastError()); + ok(0==length,"GetLongPathNameW returned %ld but expected 0\n",length); + ok(GetLastError()==ERROR_INVALID_PARAMETER,"GetLastError returned %ld but expected ERROR_INVALID_PARAMETER\n",GetLastError());
SetLastError(0xdeadbeef); empty[0]=0; length = GetLongPathNameW(empty,NULL,0); - ok(0==length,"GetLongPathNameW returned %d but expected 0\n",length); - ok(GetLastError()==ERROR_PATH_NOT_FOUND,"GetLastError returned %d but expected ERROR_PATH_NOT_FOUND\n",GetLastError()); + ok(0==length,"GetLongPathNameW returned %ld but expected 0\n",length); + ok(GetLastError()==ERROR_PATH_NOT_FOUND,"GetLastError returned %ld but expected ERROR_PATH_NOT_FOUND\n",GetLastError());
/* Create a long path name. The path needs to exist for these tests to * succeed so we need the "\?" prefix when creating directories and @@ -1282,7 +1283,7 @@ static void test_GetLongPathNameW(void) lstrcatW(shortpath, name); lstrcpyW(dirpath, shortpath); ret = CreateDirectoryW(shortpath, NULL); - ok(ret, "Could not create the temporary directory : %d\n", GetLastError()); + ok(ret, "Could not create the temporary directory : %ld\n", GetLastError()); lstrcatW(shortpath, backslash); lstrcatW(shortpath, name);
@@ -1291,24 +1292,24 @@ static void test_GetLongPathNameW(void) /* No prefix */ SetLastError(0xdeadbeef); length = GetLongPathNameW(shortpath + 4, NULL, 0); - ok(length == 0, "Expected 0, got %d\n", length); + ok(length == 0, "Expected 0, got %ld\n", length); todo_wine ok(GetLastError() == ERROR_PATH_NOT_FOUND, - "Expected ERROR_PATH_NOT_FOUND, got %d\n", GetLastError()); + "Expected ERROR_PATH_NOT_FOUND, got %ld\n", GetLastError()); /* With prefix */ SetLastError(0xdeadbeef); length = GetLongPathNameW(shortpath, NULL, 0); todo_wine { - ok(length == 0, "Expected 0, got %d\n", length); + ok(length == 0, "Expected 0, got %ld\n", length); ok(GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_PATH_NOT_FOUND, got %d\n", GetLastError()); + "Expected ERROR_PATH_NOT_FOUND, got %ld\n", GetLastError()); }
file = CreateFileW(shortpath, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); ok(file != INVALID_HANDLE_VALUE, - "Could not create the temporary file : %d.\n", GetLastError()); + "Could not create the temporary file : %ld.\n", GetLastError()); CloseHandle(file);
/* Path exists */ @@ -1318,14 +1319,14 @@ static void test_GetLongPathNameW(void) length = GetLongPathNameW(shortpath + 4, NULL, 0); todo_wine { - ok(length == 0, "Expected 0, got %d\n", length); - ok(GetLastError() == ERROR_PATH_NOT_FOUND, "Expected ERROR_PATH_NOT_FOUND, got %d\n", GetLastError()); + ok(length == 0, "Expected 0, got %ld\n", length); + ok(GetLastError() == ERROR_PATH_NOT_FOUND, "Expected ERROR_PATH_NOT_FOUND, got %ld\n", GetLastError()); } /* With prefix */ expanded = 4 + (GetLongPathNameW(tempdir, NULL, 0) - 1) + lstrlenW(name) + 1 + lstrlenW(name) + 1; SetLastError(0xdeadbeef); length = GetLongPathNameW(shortpath, NULL, 0); - ok(length == expanded, "Expected %d, got %d\n", expanded, length); + ok(length == expanded, "Expected %ld, got %ld\n", expanded, length);
/* NULL buffer with length crashes on Windows */ if (0) @@ -1355,7 +1356,7 @@ static void test_GetShortPathNameW(void) lstrcatW( path, test_path ); lstrcatW( path, backSlash ); ret = CreateDirectoryW( path, NULL ); - ok( ret, "Directory was not created. LastError = %d\n", GetLastError() ); + ok( ret, "Directory was not created. LastError = %ld\n", GetLastError() );
/* Starting a main part of test */
@@ -1382,7 +1383,7 @@ static void test_GetShortPathNameW(void) SetLastError(0xdeadbeef); length = GetShortPathNameW( short_path, path, 0 ); ok(!length, "GetShortPathNameW should fail\n"); - 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());
file = CreateFileW( short_path, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL ); ok( file != INVALID_HANDLE_VALUE, "File was not created.\n" ); @@ -1397,13 +1398,13 @@ static void test_GetShortPathNameW(void) CloseHandle( file );
length = GetShortPathNameW( path, short_path, ARRAY_SIZE( short_path )); - ok( length, "GetShortPathNameW failed: %u.\n", GetLastError() ); + ok( length, "GetShortPathNameW failed: %lu.\n", GetLastError() );
lstrcpyW(ptr, wildW); SetLastError(0xdeadbeef); length = GetShortPathNameW( path, short_path, ARRAY_SIZE( short_path ) ); ok(!length, "GetShortPathNameW should fail\n"); - ok(GetLastError() == ERROR_INVALID_NAME, "wrong error %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_NAME, "wrong error %ld\n", GetLastError());
lstrcpyW(ptr, a_bcdeW); ret = DeleteFileW( path ); @@ -1424,7 +1425,7 @@ static void test_GetSystemDirectory(void) SetLastError(0xdeadbeef); res = GetSystemDirectoryA(NULL, 0); /* res includes the terminating Zero */ - ok(res > 0, "returned %d with %d (expected '>0')\n", res, GetLastError()); + ok(res > 0, "returned %ld with %ld (expected '>0')\n", res, GetLastError());
total = res;
@@ -1434,7 +1435,7 @@ static void test_GetSystemDirectory(void)
SetLastError(0xdeadbeef); res = GetSystemDirectoryA(NULL, total-1); - ok( res == total, "returned %u with %u (expected '%u')\n", + ok( res == total, "returned %lu with %lu (expected '%lu')\n", res, GetLastError(), total );
if (total > MAX_PATH) return; @@ -1444,7 +1445,7 @@ static void test_GetSystemDirectory(void) res = GetSystemDirectoryA(buffer, total); /* res does not include the terminating Zero */ ok( (res == (total-1)) && (buffer[0]), - "returned %d with %d and '%s' (expected '%d' and a string)\n", + "returned %ld with %ld and '%s' (expected '%ld' and a string)\n", res, GetLastError(), buffer, total-1);
buffer[0] = '\0'; @@ -1452,7 +1453,7 @@ static void test_GetSystemDirectory(void) res = GetSystemDirectoryA(buffer, total + 1); /* res does not include the terminating Zero */ ok( (res == (total-1)) && (buffer[0]), - "returned %d with %d and '%s' (expected '%d' and a string)\n", + "returned %ld with %ld and '%s' (expected '%ld' and a string)\n", res, GetLastError(), buffer, total-1);
memset(buffer, '#', total + 1); @@ -1460,7 +1461,7 @@ static void test_GetSystemDirectory(void) SetLastError(0xdeadbeef); res = GetSystemDirectoryA(buffer, total-1); /* res includes the terminating Zero) */ - ok( res == total, "returned %d with %d and '%s' (expected '%d')\n", + ok( res == total, "returned %ld with %ld and '%s' (expected '%ld')\n", res, GetLastError(), buffer, total);
memset(buffer, '#', total + 1); @@ -1468,7 +1469,7 @@ static void test_GetSystemDirectory(void) SetLastError(0xdeadbeef); res = GetSystemDirectoryA(buffer, total-2); /* res includes the terminating Zero) */ - ok( res == total, "returned %d with %d and '%s' (expected '%d')\n", + ok( res == total, "returned %ld with %ld and '%s' (expected '%ld')\n", res, GetLastError(), buffer, total); }
@@ -1481,7 +1482,7 @@ static void test_GetWindowsDirectory(void) SetLastError(0xdeadbeef); res = GetWindowsDirectoryA(NULL, 0); /* res includes the terminating Zero */ - ok(res > 0, "returned %d with %d (expected '>0')\n", res, GetLastError()); + ok(res > 0, "returned %ld with %ld (expected '>0')\n", res, GetLastError());
total = res; /* this crashes on XP */ @@ -1490,7 +1491,7 @@ static void test_GetWindowsDirectory(void)
SetLastError(0xdeadbeef); res = GetWindowsDirectoryA(NULL, total-1); - ok( res == total, "returned %u with %u (expected '%u')\n", + ok( res == total, "returned %lu with %lu (expected '%lu')\n", res, GetLastError(), total );
if (total > MAX_PATH) return; @@ -1500,7 +1501,7 @@ static void test_GetWindowsDirectory(void) res = GetWindowsDirectoryA(buffer, total); /* res does not include the terminating Zero */ ok( (res == (total-1)) && (buffer[0]), - "returned %d with %d and '%s' (expected '%d' and a string)\n", + "returned %ld with %ld and '%s' (expected '%ld' and a string)\n", res, GetLastError(), buffer, total-1);
buffer[0] = '\0'; @@ -1508,7 +1509,7 @@ static void test_GetWindowsDirectory(void) res = GetWindowsDirectoryA(buffer, total + 1); /* res does not include the terminating Zero */ ok( (res == (total-1)) && (buffer[0]), - "returned %d with %d and '%s' (expected '%d' and a string)\n", + "returned %ld with %ld and '%s' (expected '%ld' and a string)\n", res, GetLastError(), buffer, total-1);
memset(buffer, '#', total + 1); @@ -1516,7 +1517,7 @@ static void test_GetWindowsDirectory(void) SetLastError(0xdeadbeef); res = GetWindowsDirectoryA(buffer, total-1); /* res includes the terminating Zero) */ - ok( res == total, "returned %d with %d and '%s' (expected '%d')\n", + ok( res == total, "returned %ld with %ld and '%s' (expected '%ld')\n", res, GetLastError(), buffer, total);
memset(buffer, '#', total + 1); @@ -1524,7 +1525,7 @@ static void test_GetWindowsDirectory(void) SetLastError(0xdeadbeef); res = GetWindowsDirectoryA(buffer, total-2); /* res includes the terminating Zero) */ - ok( res == total, "returned %d with %d and '%s' (expected '%d')\n", + ok( res == total, "returned %ld with %ld and '%s' (expected '%ld')\n", res, GetLastError(), buffer, total); }
@@ -1592,7 +1593,7 @@ static void test_drive_letter_case(void) memset(buf, 0, sizeof(buf)); SetLastError(0xdeadbeef); ret = GetWindowsDirectoryA(buf, sizeof(buf)); - ok(ret, "GetWindowsDirectory error %u\n", GetLastError()); + ok(ret, "GetWindowsDirectory error %lu\n", GetLastError()); ok(ret < sizeof(buf), "buffer should be %u bytes\n", ret); ok(buf[1] == ':', "expected buf[1] == ':' got %c\n", buf[1]); ok(is_upper_case_letter(buf[0]), "expected buf[0] upper case letter got %c\n", buf[0]); @@ -1601,7 +1602,7 @@ static void test_drive_letter_case(void) buf[2] = '/'; SetLastError(0xdeadbeef); ret = GetFullPathNameA(buf + 2, sizeof(buf), buf, NULL); - ok(ret, "GetFullPathName error %u\n", GetLastError()); + ok(ret, "GetFullPathName error %lu\n", GetLastError()); ok(ret < sizeof(buf), "buffer should be %u bytes\n", ret); ok(buf[1] == ':', "expected buf[1] == ':' got %c\n", buf[1]); ok(is_upper_case_letter(buf[0]), "expected buf[0] upper case letter got %c\n", buf[0]); @@ -1609,7 +1610,7 @@ static void test_drive_letter_case(void) memset(buf, 0, sizeof(buf)); SetLastError(0xdeadbeef); ret = GetSystemDirectoryA(buf, sizeof(buf)); - ok(ret, "GetSystemDirectory error %u\n", GetLastError()); + ok(ret, "GetSystemDirectory error %lu\n", GetLastError()); ok(ret < sizeof(buf), "buffer should be %u bytes\n", ret); ok(buf[1] == ':', "expected buf[1] == ':' got %c\n", buf[1]); ok(is_upper_case_letter(buf[0]), "expected buf[0] upper case letter got %c\n", buf[0]); @@ -1617,7 +1618,7 @@ static void test_drive_letter_case(void) memset(buf, 0, sizeof(buf)); SetLastError(0xdeadbeef); ret = GetCurrentDirectoryA(sizeof(buf), buf); - ok(ret, "GetCurrentDirectory error %u\n", GetLastError()); + ok(ret, "GetCurrentDirectory error %lu\n", GetLastError()); ok(ret < sizeof(buf), "buffer should be %u bytes\n", ret); ok(buf[1] == ':', "expected buf[1] == ':' got %c\n", buf[1]); ok(is_upper_case_letter(buf[0]), "expected buf[0] upper case letter got %c\n", buf[0]); @@ -1626,7 +1627,7 @@ static void test_drive_letter_case(void) memset(buf, 0, sizeof(buf)); SetLastError(0xdeadbeef); ret = GetTempPathA(sizeof(buf), buf); - ok(ret, "GetTempPath error %u\n", GetLastError()); + ok(ret, "GetTempPath error %lu\n", GetLastError()); ok(ret < sizeof(buf), "buffer should be %u bytes\n", ret); if (buf[0]) { @@ -1637,7 +1638,7 @@ static void test_drive_letter_case(void) memset(buf, 0, sizeof(buf)); SetLastError(0xdeadbeef); ret = GetFullPathNameA(".", sizeof(buf), buf, NULL); - ok(ret, "GetFullPathName error %u\n", GetLastError()); + ok(ret, "GetFullPathName error %lu\n", GetLastError()); ok(ret < sizeof(buf), "buffer should be %u bytes\n", ret); ok(buf[1] == ':', "expected buf[1] == ':' got %c\n", buf[1]); ok(is_upper_case_letter(buf[0]), "expected buf[0] upper case letter got %c\n", buf[0]); @@ -1645,7 +1646,7 @@ static void test_drive_letter_case(void) /* re-use the buffer returned by GetFullPathName */ SetLastError(0xdeadbeef); ret = GetShortPathNameA(buf, buf, sizeof(buf)); - ok(ret, "GetShortPathName error %u\n", GetLastError()); + ok(ret, "GetShortPathName error %lu\n", GetLastError()); ok(ret < sizeof(buf), "buffer should be %u bytes\n", ret); ok(buf[1] == ':', "expected buf[1] == ':' got %c\n", buf[1]); ok(is_upper_case_letter(buf[0]), "expected buf[0] upper case letter got %c\n", buf[0]); @@ -1653,7 +1654,7 @@ static void test_drive_letter_case(void) /* re-use the buffer returned by GetShortPathName */ SetLastError(0xdeadbeef); ret = GetLongPathNameA(buf, buf, sizeof(buf)); - ok(ret, "GetLongPathNameA error %u\n", GetLastError()); + ok(ret, "GetLongPathNameA error %lu\n", GetLastError()); ok(ret < sizeof(buf), "buffer should be %u bytes\n", ret); ok(buf[1] == ':', "expected buf[1] == ':' got %c\n", buf[1]); ok(is_upper_case_letter(buf[0]), "expected buf[0] upper case letter got %c\n", buf[0]); @@ -1690,7 +1691,7 @@ static void create_manifest_file(const char *filename, const char *manifest) lstrcatW(manifest_path, path);
file = CreateFileW(manifest_path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %lu\n", GetLastError()); WriteFile(file, manifest, strlen(manifest), &size, NULL); CloseHandle(file); } @@ -1719,10 +1720,10 @@ static HANDLE test_create(const char *file) actctx.lpSource = manifest_path;
handle = CreateActCtxW(&actctx); - ok(handle != INVALID_HANDLE_VALUE, "failed to create context, error %u\n", GetLastError()); + ok(handle != INVALID_HANDLE_VALUE, "failed to create context, error %lu\n", GetLastError());
- ok(actctx.cbSize == sizeof(actctx), "cbSize=%d\n", actctx.cbSize); - ok(actctx.dwFlags == 0, "dwFlags=%d\n", actctx.dwFlags); + ok(actctx.cbSize == sizeof(actctx), "cbSize=%ld\n", actctx.cbSize); + ok(actctx.dwFlags == 0, "dwFlags=%ld\n", actctx.dwFlags); ok(actctx.lpSource == manifest_path, "lpSource=%p\n", actctx.lpSource); ok(actctx.wProcessorArchitecture == 0, "wProcessorArchitecture=%d\n", actctx.wProcessorArchitecture); ok(actctx.wLangId == 0, "wLangId=%d\n", actctx.wLangId); @@ -1752,16 +1753,16 @@ static void test_SearchPathA(void) /* NULL filename */ SetLastError(0xdeadbeef); ret = SearchPathA(pathA, NULL, NULL, ARRAY_SIZE(buffA), buffA, &ptrA); - ok(ret == 0, "Expected failure, got %d\n", ret); + ok(ret == 0, "Expected failure, got %ld\n", ret); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %lx\n", GetLastError());
/* empty filename */ SetLastError(0xdeadbeef); ret = SearchPathA(pathA, fileA, NULL, ARRAY_SIZE(buffA), buffA, &ptrA); - ok(ret == 0, "Expected failure, got %d\n", ret); + ok(ret == 0, "Expected failure, got %ld\n", ret); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %lx\n", GetLastError());
GetTempPathA(ARRAY_SIZE(pathA), pathA); strcpy(path2A, pathA); @@ -1773,15 +1774,15 @@ static void test_SearchPathA(void)
buffA[0] = 0; ret = SearchPathA(pathA, "testfile.ext", NULL, ARRAY_SIZE(buffA), buffA, NULL); - ok(!ret, "Unexpected return value %u.\n", ret); + ok(!ret, "Unexpected return value %lu.\n", ret);
buffA[0] = 0; ret = SearchPathA(pathA, "testfile.ext", ".ext2", ARRAY_SIZE(buffA), buffA, NULL); - ok(!ret, "Unexpected return value %u.\n", ret); + ok(!ret, "Unexpected return value %lu.\n", ret);
buffA[0] = 0; ret = SearchPathA(pathA, "testfile.ext.ext2", NULL, ARRAY_SIZE(buffA), buffA, NULL); - ok(ret && ret == strlen(path2A), "got %d\n", ret); + ok(ret && ret == strlen(path2A), "got %ld\n", ret);
DeleteFileA(path2A);
@@ -1796,42 +1797,42 @@ static void test_SearchPathA(void)
/* search fails without active context */ ret = SearchPathA(NULL, testdepA, NULL, ARRAY_SIZE(buffA), buffA, NULL); - ok(ret == 0, "got %d\n", ret); + ok(ret == 0, "got %ld\n", ret);
ret = SearchPathA(NULL, kernel32A, NULL, ARRAY_SIZE(path2A), path2A, NULL); - ok(ret && ret == strlen(path2A), "got %d\n", ret); + ok(ret && ret == strlen(path2A), "got %ld\n", ret);
ret = ActivateActCtx(handle, &cookie); - ok(ret, "failed to activate context, %u\n", GetLastError()); + ok(ret, "failed to activate context, %lu\n", GetLastError());
/* works when activated */ ret = SearchPathA(NULL, testdepA, NULL, ARRAY_SIZE(buffA), buffA, NULL); - ok(ret && ret == strlen(buffA), "got %d\n", ret); + ok(ret && ret == strlen(buffA), "got %ld\n", ret);
ret = SearchPathA(NULL, "testdep.dll", ".ext", ARRAY_SIZE(buffA), buffA, NULL); - ok(ret && ret == strlen(buffA), "got %d\n", ret); + ok(ret && ret == strlen(buffA), "got %ld\n", ret);
ret = SearchPathA(NULL, "testdep", ".dll", ARRAY_SIZE(buffA), buffA, NULL); - ok(ret && ret == strlen(buffA), "got %d\n", ret); + ok(ret && ret == strlen(buffA), "got %ld\n", ret);
ret = SearchPathA(NULL, "testdep", ".ext", ARRAY_SIZE(buffA), buffA, NULL); - ok(!ret, "got %d\n", ret); + ok(!ret, "got %ld\n", ret);
/* name contains path */ ret = SearchPathA(NULL, testdeprelA, NULL, ARRAY_SIZE(buffA), buffA, NULL); - ok(!ret, "got %d\n", ret); + ok(!ret, "got %ld\n", ret);
/* fails with specified path that doesn't contain this file */ ret = SearchPathA(pathA, testdepA, NULL, ARRAY_SIZE(buffA), buffA, NULL); - ok(!ret, "got %d\n", ret); + ok(!ret, "got %ld\n", ret);
/* path is redirected for wellknown names too */ ret = SearchPathA(NULL, kernel32A, NULL, ARRAY_SIZE(buffA), buffA, NULL); - ok(ret && ret == strlen(buffA), "got %d\n", ret); + ok(ret && ret == strlen(buffA), "got %ld\n", ret); ok(strcmp(buffA, path2A), "got wrong path %s, %s\n", buffA, path2A);
ret = DeactivateActCtx(0, cookie); - ok(ret, "failed to deactivate context, %u\n", GetLastError()); + ok(ret, "failed to deactivate context, %lu\n", GetLastError()); ReleaseActCtx(handle);
/* test the search path priority of the working directory */ @@ -1840,17 +1841,17 @@ static void test_SearchPathA(void) ok(ret, "failed to obtain working directory.\n"); sprintf(pathA, "%s\%s", tmpdirA, kernel32A); ret = SearchPathA(NULL, kernel32A, NULL, ARRAY_SIZE(path2A), path2A, NULL); - ok(ret && ret == strlen(path2A), "got %d\n", ret); + ok(ret && ret == strlen(path2A), "got %ld\n", ret); bret = CopyFileA(path2A, pathA, FALSE); - ok(bret != 0, "failed to copy test executable to temp directory, %u\n", GetLastError()); + ok(bret != 0, "failed to copy test executable to temp directory, %lu\n", GetLastError()); GetModuleFileNameA( GetModuleHandleA(0), path3A, sizeof(path3A) ); strcpy( strrchr( path3A, '\' ) + 1, kernel32A ); bret = CopyFileA(path2A, path3A, FALSE); - ok(bret != 0, "failed to copy test executable to launch directory, %u\n", GetLastError()); + ok(bret != 0, "failed to copy test executable to launch directory, %lu\n", GetLastError()); bret = SetCurrentDirectoryA(tmpdirA); ok(bret, "failed to change working directory\n"); ret = SearchPathA(NULL, kernel32A, ".exe", sizeof(buffA), buffA, NULL); - ok(ret && ret == strlen(buffA), "got %d\n", ret); + ok(ret && ret == strlen(buffA), "got %ld\n", ret); ok(strcmp(buffA, path3A) == 0, "expected %s, got %s\n", path3A, buffA); bret = SetCurrentDirectoryA(curdirA); ok(bret, "failed to reset working directory\n"); @@ -1880,18 +1881,18 @@ static void test_SearchPathW(void)
/* NULL filename */ ret = SearchPathW(pathW, NULL, NULL, ARRAY_SIZE(buffW), buffW, &ptrW); - ok(ret == 0, "Expected failure, got %d\n", ret); + ok(ret == 0, "Expected failure, got %ld\n", ret); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %#x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %#lx\n", GetLastError());
GetWindowsDirectoryW(pathW, ARRAY_SIZE(pathW));
/* empty filename */ SetLastError(0xdeadbeef); ret = SearchPathW(pathW, fileW, NULL, ARRAY_SIZE(buffW), buffW, &ptrW); - ok(ret == 0, "Expected failure, got %d\n", ret); + ok(ret == 0, "Expected failure, got %ld\n", ret); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %lx\n", GetLastError());
GetTempPathW(ARRAY_SIZE(pathW), pathW); lstrcpyW(path2W, pathW); @@ -1903,15 +1904,15 @@ static void test_SearchPathW(void)
buffW[0] = 0; ret = SearchPathW(pathW, fileextW, NULL, ARRAY_SIZE(buffW), buffW, NULL); - ok(!ret, "Unexpected return value %u.\n", ret); + ok(!ret, "Unexpected return value %lu.\n", ret);
buffW[0] = 0; ret = SearchPathW(pathW, fileextW, ext2W, ARRAY_SIZE(buffW), buffW, NULL); - ok(!ret, "Unexpected return value %u.\n", ret); + ok(!ret, "Unexpected return value %lu.\n", ret);
buffW[0] = 0; ret = SearchPathW(pathW, fileext2W, NULL, ARRAY_SIZE(buffW), buffW, NULL); - ok(ret && ret == lstrlenW(path2W), "got %d\n", ret); + ok(ret && ret == lstrlenW(path2W), "got %ld\n", ret);
DeleteFileW(path2W);
@@ -1926,53 +1927,53 @@ static void test_SearchPathW(void)
/* search fails without active context */ ret = SearchPathW(NULL, testdepW, NULL, ARRAY_SIZE(buffW), buffW, NULL); - ok(ret == 0, "got %d\n", ret); + ok(ret == 0, "got %ld\n", ret);
ret = SearchPathW(NULL, kernel32dllW, NULL, ARRAY_SIZE(path2W), path2W, NULL); - ok(ret && ret == lstrlenW(path2W), "got %d\n", ret); + ok(ret && ret == lstrlenW(path2W), "got %ld\n", ret);
/* full path, name without 'dll' extension */ GetSystemDirectoryW(pathW, ARRAY_SIZE(pathW)); ret = SearchPathW(pathW, kernel32W, NULL, ARRAY_SIZE(path2W), path2W, NULL); - ok(ret == 0, "got %d\n", ret); + ok(ret == 0, "got %ld\n", ret);
GetWindowsDirectoryW(pathW, ARRAY_SIZE(pathW));
ret = ActivateActCtx(handle, &cookie); - ok(ret, "failed to activate context, %u\n", GetLastError()); + ok(ret, "failed to activate context, %lu\n", GetLastError());
/* works when activated */ ret = SearchPathW(NULL, testdepW, NULL, ARRAY_SIZE(buffW), buffW, NULL); - ok(ret && ret == lstrlenW(buffW), "got %d\n", ret); + ok(ret && ret == lstrlenW(buffW), "got %ld\n", ret);
ret = SearchPathW(NULL, testdepW, extW, ARRAY_SIZE(buffW), buffW, NULL); - ok(ret && ret == lstrlenW(buffW), "got %d\n", ret); + ok(ret && ret == lstrlenW(buffW), "got %ld\n", ret);
ret = SearchPathW(NULL, testdep1W, dllW, ARRAY_SIZE(buffW), buffW, NULL); - ok(ret && ret == lstrlenW(buffW), "got %d\n", ret); + ok(ret && ret == lstrlenW(buffW), "got %ld\n", ret);
ret = SearchPathW(NULL, testdep1W, extW, ARRAY_SIZE(buffW), buffW, NULL); - ok(!ret, "got %d\n", ret); + ok(!ret, "got %ld\n", ret);
/* name contains path */ ret = SearchPathW(NULL, testdeprelW, NULL, ARRAY_SIZE(buffW), buffW, NULL); - ok(!ret, "got %d\n", ret); + ok(!ret, "got %ld\n", ret);
/* fails with specified path that doesn't contain this file */ ret = SearchPathW(pathW, testdepW, NULL, ARRAY_SIZE(buffW), buffW, NULL); - ok(!ret, "got %d\n", ret); + ok(!ret, "got %ld\n", ret);
/* path is redirected for wellknown names too, meaning it takes precedence over normal search order */ ret = SearchPathW(NULL, kernel32dllW, NULL, ARRAY_SIZE(buffW), buffW, NULL); - ok(ret && ret == lstrlenW(buffW), "got %d\n", ret); + ok(ret && ret == lstrlenW(buffW), "got %ld\n", ret); ok(lstrcmpW(buffW, path2W), "got wrong path %s, %s\n", wine_dbgstr_w(buffW), wine_dbgstr_w(path2W));
/* path is built using on manifest file name */ ret = SearchPathW(NULL, ole32W, NULL, ARRAY_SIZE(buffW), buffW, NULL); - ok(ret && ret == lstrlenW(buffW), "got %d\n", ret); + ok(ret && ret == lstrlenW(buffW), "got %ld\n", ret);
ret = DeactivateActCtx(0, cookie); - ok(ret, "failed to deactivate context, %u\n", GetLastError()); + ok(ret, "failed to deactivate context, %lu\n", GetLastError()); ReleaseActCtx(handle); }
@@ -2010,12 +2011,12 @@ static void test_GetFullPathNameA(void) invalid_parameters[i].len, invalid_parameters[i].buffer, invalid_parameters[i].lastpart); - ok(!ret, "[%d] Expected GetFullPathNameA to return 0, got %u\n", i, ret); + ok(!ret, "[%d] Expected GetFullPathNameA to return 0, got %lu\n", i, ret); ok(!strcmp(output, "deadbeef"), "[%d] Expected the output buffer to be unchanged, got "%s"\n", i, output); ok(filepart == (char *)0xdeadbeef, "[%d] Expected output file part pointer to be untouched, got %p\n", i, filepart); ok(GetLastError() == 0xdeadbeef || GetLastError() == ERROR_INVALID_NAME, /* Win7 */ - "[%d] Expected GetLastError() to return 0xdeadbeef, got %u\n", + "[%d] Expected GetLastError() to return 0xdeadbeef, got %lu\n", i, GetLastError()); }
@@ -2034,7 +2035,7 @@ static void test_GetFullPathNameA(void) for (i = 0; i < ARRAY_SIZE(testset); i++) { ret = GetFullPathNameA(testset[i].input, sizeof(output), output, &filepart); - ok(ret, "[%d] GetFullPathName error %u\n", i, GetLastError()); + ok(ret, "[%d] GetFullPathName error %lu\n", i, GetLastError()); ok(!lstrcmpA(filepart, testset[i].expected), "[%d] expected %s got %s\n", i, testset[i].expected, filepart); } @@ -2080,14 +2081,14 @@ static void test_GetFullPathNameW(void) invalid_parameters[i].len, invalid_parameters[i].buffer, invalid_parameters[i].lastpart); - ok(!ret, "[%d] Expected GetFullPathNameW to return 0, got %u\n", i, ret); + ok(!ret, "[%d] Expected GetFullPathNameW to return 0, got %lu\n", i, ret); ok(!lstrcmpW(output, deadbeefW), "[%d] Expected the output buffer to be unchanged, got %s\n", i, wine_dbgstr_w(output)); ok(filepart == (WCHAR *)0xdeadbeef || (invalid_parameters[i].win7_expect && filepart == NULL), "[%d] Expected output file part pointer to be untouched, got %p\n", i, filepart); ok(GetLastError() == 0xdeadbeef || GetLastError() == ERROR_INVALID_NAME, /* Win7 */ - "[%d] Expected GetLastError() to return 0xdeadbeef, got %u\n", + "[%d] Expected GetLastError() to return 0xdeadbeef, got %lu\n", i, GetLastError()); } } @@ -2124,65 +2125,65 @@ static void test_relative_path(void) GetCurrentDirectoryW(MAX_PATH, curdir); GetTempPathA(MAX_PATH, path); ret = SetCurrentDirectoryA(path); - ok(ret, "SetCurrentDirectory error %d\n", GetLastError()); + ok(ret, "SetCurrentDirectory error %ld\n", GetLastError());
ret = CreateDirectoryA("foo", NULL); - ok(ret, "CreateDirectory error %d\n", GetLastError()); + ok(ret, "CreateDirectory error %ld\n", GetLastError()); file = CreateFileA("foo\file", GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); ok(file != INVALID_HANDLE_VALUE, "failed to create temp file\n"); CloseHandle(file); ret = CreateDirectoryA("bar", NULL); - ok(ret, "CreateDirectory error %d\n", GetLastError()); + ok(ret, "CreateDirectory error %ld\n", GetLastError()); ret = SetCurrentDirectoryA("bar"); - ok(ret, "SetCurrentDirectory error %d\n", GetLastError()); + ok(ret, "SetCurrentDirectory error %ld\n", GetLastError());
ret = GetFileAttributesA("..\foo\file"); - ok(ret != INVALID_FILE_ATTRIBUTES, "GetFileAttributes error %d\n", GetLastError()); + ok(ret != INVALID_FILE_ATTRIBUTES, "GetFileAttributes error %ld\n", GetLastError());
strcpy(buf, "deadbeef"); ret = GetLongPathNameA(".", buf, MAX_PATH); - ok(ret, "GetLongPathName error %d\n", GetLastError()); + ok(ret, "GetLongPathName error %ld\n", GetLastError()); ok(!strcmp(buf, "."), "expected ., got %s\n", buf); strcpy(buf, "deadbeef"); ret = GetShortPathNameA(".", buf, MAX_PATH); - ok(ret, "GetShortPathName error %d\n", GetLastError()); + ok(ret, "GetShortPathName error %ld\n", GetLastError()); ok(!strcmp(buf, "."), "expected ., got %s\n", buf);
strcpy(buf, "deadbeef"); ret = GetLongPathNameA("..", buf, MAX_PATH); - ok(ret, "GetLongPathName error %d\n", GetLastError()); + ok(ret, "GetLongPathName error %ld\n", GetLastError()); ok(!strcmp(buf, ".."), "expected .., got %s\n", buf); strcpy(buf, "deadbeef"); ret = GetShortPathNameA("..", buf, MAX_PATH); - ok(ret, "GetShortPathName error %d\n", GetLastError()); + ok(ret, "GetShortPathName error %ld\n", GetLastError()); ok(!strcmp(buf, ".."), "expected .., got %s\n", buf);
strcpy(buf, "deadbeef"); ret = GetLongPathNameA("..\foo\file", buf, MAX_PATH); - ok(ret, "GetLongPathName error %d\n", GetLastError()); + ok(ret, "GetLongPathName error %ld\n", GetLastError()); ok(!strcmp(buf, "..\foo\file"), "expected ..\foo\file, got %s\n", buf); strcpy(buf, "deadbeef"); ret = GetShortPathNameA("..\foo\file", buf, MAX_PATH); - ok(ret, "GetShortPathName error %d\n", GetLastError()); + ok(ret, "GetShortPathName error %ld\n", GetLastError()); ok(!strcmp(buf, "..\foo\file"), "expected ..\foo\file, got %s\n", buf);
strcpy(buf, "deadbeef"); ret = GetLongPathNameA(".\..\foo\file", buf, MAX_PATH); - ok(ret, "GetLongPathName error %d\n", GetLastError()); + ok(ret, "GetLongPathName error %ld\n", GetLastError()); ok(!strcmp(buf, ".\..\foo\file"), "expected .\..\foo\file, got %s\n", buf); strcpy(buf, "deadbeef"); ret = GetShortPathNameA(".\..\foo\file", buf, MAX_PATH); - ok(ret, "GetShortPathName error %d\n", GetLastError()); + ok(ret, "GetShortPathName error %ld\n", GetLastError()); ok(!strcmp(buf, ".\..\foo\file"), "expected .\..\foo\file, got %s\n", buf);
/* test double delimiters */ strcpy(buf, "deadbeef"); ret = GetLongPathNameA("..\\foo\file", buf, MAX_PATH); - ok(ret, "GetLongPathName error %d\n", GetLastError()); + ok(ret, "GetLongPathName error %ld\n", GetLastError()); ok(!strcmp(buf, "..\\foo\file"), "expected ..\\foo\file, got %s\n", buf); strcpy(buf, "deadbeef"); ret = GetShortPathNameA("..\\foo\file", buf, MAX_PATH); - ok(ret, "GetShortPathName error %d\n", GetLastError()); + ok(ret, "GetShortPathName error %ld\n", GetLastError()); ok(!strcmp(buf, "..\\foo\file"), "expected ..\\foo\file, got %s\n", buf);
SetCurrentDirectoryA(".."); @@ -2289,43 +2290,43 @@ static void test_SetSearchPathMode(void) SetLastError( 0xdeadbeef ); ret = pSetSearchPathMode( 0 ); ok( !ret, "SetSearchPathMode succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); ret = pSetSearchPathMode( 0x80 ); ok( !ret, "SetSearchPathMode succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); ret = pSetSearchPathMode( BASE_SEARCH_PATH_PERMANENT ); ok( !ret, "SetSearchPathMode succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); ret = SearchPathA( NULL, "kernel32.dll", NULL, MAX_PATH, buf, NULL ); - ok( ret, "SearchPathA failed err %u\n", GetLastError() ); + ok( ret, "SearchPathA failed err %lu\n", GetLastError() ); GetCurrentDirectoryA( MAX_PATH, expect ); strcat( expect, "\kernel32.dll" ); ok( !lstrcmpiA( buf, expect ), "found %s expected %s\n", buf, expect );
SetLastError( 0xdeadbeef ); ret = pSetSearchPathMode( BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE ); - ok( ret, "SetSearchPathMode failed err %u\n", GetLastError() ); + ok( ret, "SetSearchPathMode failed err %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); ret = SearchPathA( NULL, "kernel32.dll", NULL, MAX_PATH, buf, NULL ); - ok( ret, "SearchPathA failed err %u\n", GetLastError() ); + ok( ret, "SearchPathA failed err %lu\n", GetLastError() ); GetSystemDirectoryA( expect, MAX_PATH ); strcat( expect, "\kernel32.dll" ); ok( !lstrcmpiA( buf, expect ), "found %s expected %s\n", buf, expect );
SetLastError( 0xdeadbeef ); ret = pSetSearchPathMode( BASE_SEARCH_PATH_DISABLE_SAFE_SEARCHMODE ); - ok( ret, "SetSearchPathMode failed err %u\n", GetLastError() ); + ok( ret, "SetSearchPathMode failed err %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); ret = SearchPathA( NULL, "kernel32.dll", NULL, MAX_PATH, buf, NULL ); - ok( ret, "SearchPathA failed err %u\n", GetLastError() ); + ok( ret, "SearchPathA failed err %lu\n", GetLastError() ); GetCurrentDirectoryA( MAX_PATH, expect ); strcat( expect, "\kernel32.dll" ); ok( !lstrcmpiA( buf, expect ), "found %s expected %s\n", buf, expect ); @@ -2333,29 +2334,29 @@ static void test_SetSearchPathMode(void) SetLastError( 0xdeadbeef ); ret = pSetSearchPathMode( BASE_SEARCH_PATH_DISABLE_SAFE_SEARCHMODE | BASE_SEARCH_PATH_PERMANENT ); ok( !ret, "SetSearchPathMode succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); ret = pSetSearchPathMode( BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE | BASE_SEARCH_PATH_PERMANENT ); - ok( ret, "SetSearchPathMode failed err %u\n", GetLastError() ); + ok( ret, "SetSearchPathMode failed err %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); ret = pSetSearchPathMode( BASE_SEARCH_PATH_DISABLE_SAFE_SEARCHMODE ); ok( !ret, "SetSearchPathMode succeeded\n" ); - ok( GetLastError() == ERROR_ACCESS_DENIED, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_ACCESS_DENIED, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); ret = pSetSearchPathMode( BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE ); ok( !ret, "SetSearchPathMode succeeded\n" ); - ok( GetLastError() == ERROR_ACCESS_DENIED, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_ACCESS_DENIED, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); ret = pSetSearchPathMode( BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE | BASE_SEARCH_PATH_PERMANENT ); - ok( ret, "SetSearchPathMode failed err %u\n", GetLastError() ); + ok( ret, "SetSearchPathMode failed err %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); ret = SearchPathA( NULL, "kernel32.dll", NULL, MAX_PATH, buf, NULL ); - ok( ret, "SearchPathA failed err %u\n", GetLastError() ); + ok( ret, "SearchPathA failed err %lu\n", GetLastError() ); GetSystemDirectoryA( expect, MAX_PATH ); strcat( expect, "\kernel32.dll" ); ok( !lstrcmpiA( buf, expect ), "found %s expected %s\n", buf, expect ); @@ -2434,7 +2435,7 @@ static void test_RtlGetSearchPath(void) build_search_path( buffer, ARRAY_SIZE(buffer), NULL, NULL, TRUE ); path = (WCHAR *)0xdeadbeef; ret = pRtlGetSearchPath( &path ); - ok( !ret, "RtlGetSearchPath failed %x\n", ret ); + ok( !ret, "RtlGetSearchPath failed %lx\n", ret ); ok( path_equal( path, buffer ), "got %s expected %s\n", wine_dbgstr_w(path), wine_dbgstr_w(buffer)); pRtlReleasePath( path );
@@ -2442,7 +2443,7 @@ static void test_RtlGetSearchPath(void) build_search_path( buffer, ARRAY_SIZE(buffer), NULL, NULL, TRUE ); path = (WCHAR *)0xdeadbeef; ret = pRtlGetSearchPath( &path ); - ok( !ret, "RtlGetSearchPath failed %x\n", ret ); + ok( !ret, "RtlGetSearchPath failed %lx\n", ret ); ok( path_equal( path, buffer ), "got %s expected %s\n", wine_dbgstr_w(path), wine_dbgstr_w(buffer)); pRtlReleasePath( path );
@@ -2452,7 +2453,7 @@ static void test_RtlGetSearchPath(void) build_search_path( buffer, ARRAY_SIZE(buffer), NULL, NULL, TRUE ); path = (WCHAR *)0xdeadbeef; ret = pRtlGetSearchPath( &path ); - ok( !ret, "RtlGetSearchPath failed %x\n", ret ); + ok( !ret, "RtlGetSearchPath failed %lx\n", ret ); ok( path_equal( path, buffer ), "got %s expected %s\n", wine_dbgstr_w(path), wine_dbgstr_w(buffer)); pRtlReleasePath( path ); pSetDllDirectoryW( NULL ); @@ -2483,14 +2484,14 @@ static void test_RtlGetExePath(void) build_search_path( buffer, ARRAY_SIZE(buffer), NULL, NULL, FALSE ); path = (WCHAR *)0xdeadbeef; ret = pRtlGetExePath( fooW, &path ); - ok( !ret, "RtlGetExePath failed %x\n", ret ); + ok( !ret, "RtlGetExePath failed %lx\n", ret ); ok( path_equal( path, buffer ), "got %s expected %s\n", wine_dbgstr_w(path), wine_dbgstr_w(buffer)); pRtlReleasePath( path );
build_search_path( buffer, ARRAY_SIZE(buffer), NULL, NULL, FALSE ); path = (WCHAR *)0xdeadbeef; ret = pRtlGetExePath( fooW + 1, &path ); - ok( !ret, "RtlGetExePath failed %x\n", ret ); + ok( !ret, "RtlGetExePath failed %lx\n", ret ); ok( path_equal( path, buffer ), "got %s expected %s\n", wine_dbgstr_w(path), wine_dbgstr_w(buffer)); pRtlReleasePath( path );
@@ -2499,14 +2500,14 @@ static void test_RtlGetExePath(void) build_search_path( buffer, ARRAY_SIZE(buffer), NULL, NULL, FALSE ); path = (WCHAR *)0xdeadbeef; ret = pRtlGetExePath( fooW, &path ); - ok( !ret, "RtlGetExePath failed %x\n", ret ); + ok( !ret, "RtlGetExePath failed %lx\n", ret ); ok( path_equal( path, buffer ), "got %s expected %s\n", wine_dbgstr_w(path), wine_dbgstr_w(buffer)); pRtlReleasePath( path );
build_search_path( buffer, ARRAY_SIZE(buffer), NULL, emptyW, TRUE ); path = (WCHAR *)0xdeadbeef; ret = pRtlGetExePath( fooW + 1, &path ); - ok( !ret, "RtlGetExePath failed %x\n", ret ); + ok( !ret, "RtlGetExePath failed %lx\n", ret ); ok( path_equal( path, buffer ), "got %s expected %s\n", wine_dbgstr_w(path), wine_dbgstr_w(buffer)); pRtlReleasePath( path );
@@ -2514,7 +2515,7 @@ static void test_RtlGetExePath(void) build_search_path( buffer, ARRAY_SIZE(buffer), NULL, NULL, FALSE ); path = (WCHAR *)0xdeadbeef; ret = pRtlGetExePath( fooW, &path ); - ok( !ret, "RtlGetExePath failed %x\n", ret ); + ok( !ret, "RtlGetExePath failed %lx\n", ret ); ok( path_equal( path, buffer ), "got %s expected %s\n", wine_dbgstr_w(path), wine_dbgstr_w(buffer)); pRtlReleasePath( path );
@@ -2524,7 +2525,7 @@ static void test_RtlGetExePath(void) build_search_path( buffer, ARRAY_SIZE(buffer), NULL, NULL, FALSE ); path = (WCHAR *)0xdeadbeef; ret = pRtlGetExePath( fooW, &path ); - ok( !ret, "RtlGetExePath failed %x\n", ret ); + ok( !ret, "RtlGetExePath failed %lx\n", ret ); ok( path_equal( path, buffer ), "got %s expected %s\n", wine_dbgstr_w(path), wine_dbgstr_w(buffer)); pRtlReleasePath( path ); pSetDllDirectoryW( NULL ); @@ -2553,7 +2554,7 @@ static void test_LdrGetDllPath(void)
path = unknown_ptr = (WCHAR *)0xdeadbeef; ret = pLdrGetDllPath( 0, 0, &path, &unknown_ptr ); - ok( !ret, "LdrGetDllPath failed %x\n", ret ); + ok( !ret, "LdrGetDllPath failed %lx\n", ret ); ok( !unknown_ptr, "unknown ptr %p\n", unknown_ptr ); ok( path_equal( path, buffer ), "got %s expected %s\n", wine_dbgstr_w(path), wine_dbgstr_w(buffer)); pRtlReleasePath( path ); @@ -2561,7 +2562,7 @@ static void test_LdrGetDllPath(void) SetEnvironmentVariableA( "PATH", "foo" ); build_search_path( buffer, ARRAY_SIZE(buffer), NULL, NULL, TRUE ); ret = pLdrGetDllPath( 0, 0, &path, &unknown_ptr ); - ok( !ret, "LdrGetDllPath failed %x\n", ret ); + ok( !ret, "LdrGetDllPath failed %lx\n", ret ); ok( !unknown_ptr, "unknown ptr %p\n", unknown_ptr ); ok( path_equal( path, buffer ), "got %s expected %s\n", wine_dbgstr_w(path), wine_dbgstr_w(buffer)); pRtlReleasePath( path ); @@ -2571,7 +2572,7 @@ static void test_LdrGetDllPath(void) ok( pSetDllDirectoryW( dlldir ), "SetDllDirectoryW failed\n" ); build_search_path( buffer, ARRAY_SIZE(buffer), NULL, dlldir, TRUE ); ret = pLdrGetDllPath( 0, 0, &path, &unknown_ptr ); - ok( !ret, "LdrGetDllPath failed %x\n", ret ); + ok( !ret, "LdrGetDllPath failed %lx\n", ret ); ok( !unknown_ptr, "unknown ptr %p\n", unknown_ptr ); ok( path_equal( path, buffer ), "got %s expected %s\n", wine_dbgstr_w(path), wine_dbgstr_w(buffer)); pRtlReleasePath( path ); @@ -2579,14 +2580,14 @@ static void test_LdrGetDllPath(void) }
ret = pLdrGetDllPath( 0, LOAD_LIBRARY_SEARCH_SYSTEM32, &path, &unknown_ptr ); - ok( !ret, "LdrGetDllPath failed %x\n", ret ); + ok( !ret, "LdrGetDllPath failed %lx\n", ret ); ok( !unknown_ptr, "unknown ptr %p\n", unknown_ptr ); GetSystemDirectoryW( buffer, ARRAY_SIZE(buffer) ); ok( path_equal( path, buffer ), "got %s expected %s\n", wine_dbgstr_w(path), wine_dbgstr_w(buffer)); pRtlReleasePath( path );
ret = pLdrGetDllPath( 0, LOAD_LIBRARY_SEARCH_APPLICATION_DIR, &path, &unknown_ptr ); - ok( !ret, "LdrGetDllPath failed %x\n", ret ); + ok( !ret, "LdrGetDllPath failed %lx\n", ret ); ok( !unknown_ptr, "unknown ptr %p\n", unknown_ptr ); GetModuleFileNameW( NULL, buffer, ARRAY_SIZE(buffer) ); if ((p = wcsrchr( buffer, '\' ))) *p = 0; @@ -2594,7 +2595,7 @@ static void test_LdrGetDllPath(void) pRtlReleasePath( path );
ret = pLdrGetDllPath( fooW, LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR, &path, &unknown_ptr ); - ok( ret == STATUS_INVALID_PARAMETER, "LdrGetDllPath failed %x\n", ret ); + ok( ret == STATUS_INVALID_PARAMETER, "LdrGetDllPath failed %lx\n", ret );
lstrcpyW( buffer, L"\\?\" ); lstrcatW( buffer, dlldir ); @@ -2602,48 +2603,48 @@ static void test_LdrGetDllPath(void) *p++ = '\'; lstrcpyW( p, fooW ); ret = pLdrGetDllPath( buffer, LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR, &path, &unknown_ptr ); - ok( !ret, "LdrGetDllPath failed %x\n", ret ); + ok( !ret, "LdrGetDllPath failed %lx\n", ret ); ok( !unknown_ptr, "unknown ptr %p\n", unknown_ptr ); ok( !memcmp( path, L"\\?\", 4 * sizeof(WCHAR) ) && path_equal( path + 4, dlldir ), "got %s expected \\?\%s\n", wine_dbgstr_w(path), wine_dbgstr_w(dlldir)); pRtlReleasePath( path );
ret = pLdrGetDllPath( L"\\?\c:\test.dll", LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR, &path, &unknown_ptr ); - ok( !ret, "LdrGetDllPath failed %x\n", ret ); + ok( !ret, "LdrGetDllPath failed %lx\n", ret ); ok( !unknown_ptr, "unknown ptr %p\n", unknown_ptr ); ok( !lstrcmpW( path, L"\\?\c:" ), "got %s expected \\?\c:\n", wine_dbgstr_w(path)); pRtlReleasePath( path );
ret = pLdrGetDllPath( fooW, LOAD_WITH_ALTERED_SEARCH_PATH, &path, &unknown_ptr ); - ok( !ret, "LdrGetDllPath failed %x\n", ret ); + ok( !ret, "LdrGetDllPath failed %lx\n", ret ); ok( !unknown_ptr, "unknown ptr %p\n", unknown_ptr ); build_search_path( buffer, ARRAY_SIZE(buffer), NULL, NULL, TRUE ); ok( path_equal( path, buffer ), "got %s expected %s\n", wine_dbgstr_w(path), wine_dbgstr_w(buffer)); pRtlReleasePath( path );
ret = pLdrGetDllPath( L"temp/foo", LOAD_WITH_ALTERED_SEARCH_PATH, &path, &unknown_ptr ); - ok( !ret, "LdrGetDllPath failed %x\n", ret ); + ok( !ret, "LdrGetDllPath failed %lx\n", ret ); ok( !unknown_ptr, "unknown ptr %p\n", unknown_ptr ); build_search_path( buffer, ARRAY_SIZE(buffer), NULL, NULL, TRUE ); ok( path_equal( path, buffer ), "got %s expected %s\n", wine_dbgstr_w(path), wine_dbgstr_w(buffer)); pRtlReleasePath( path );
ret = pLdrGetDllPath( L".\foo\foobar", LOAD_WITH_ALTERED_SEARCH_PATH, &path, &unknown_ptr ); - ok( !ret, "LdrGetDllPath failed %x\n", ret ); + ok( !ret, "LdrGetDllPath failed %lx\n", ret ); ok( !unknown_ptr, "unknown ptr %p\n", unknown_ptr ); build_search_path( buffer, ARRAY_SIZE(buffer), L".\foo\foobar", NULL, TRUE ); ok( path_equal( path, buffer ), "got %s expected %s\n", wine_dbgstr_w(path), wine_dbgstr_w(buffer)); pRtlReleasePath( path );
ret = pLdrGetDllPath( L"temp\foo", LOAD_WITH_ALTERED_SEARCH_PATH, &path, &unknown_ptr ); - ok( !ret, "LdrGetDllPath failed %x\n", ret ); + ok( !ret, "LdrGetDllPath failed %lx\n", ret ); ok( !unknown_ptr, "unknown ptr %p\n", unknown_ptr ); build_search_path( buffer, ARRAY_SIZE(buffer), L"temp\foo", NULL, TRUE ); ok( path_equal( path, buffer ), "got %s expected %s\n", wine_dbgstr_w(path), wine_dbgstr_w(buffer)); pRtlReleasePath( path );
ret = pLdrGetDllPath( L"c:\temp\foo", LOAD_WITH_ALTERED_SEARCH_PATH, &path, &unknown_ptr ); - ok( !ret, "LdrGetDllPath failed %x\n", ret ); + ok( !ret, "LdrGetDllPath failed %lx\n", ret ); ok( !unknown_ptr, "unknown ptr %p\n", unknown_ptr ); build_search_path( buffer, ARRAY_SIZE(buffer), L"c:\temp\foo", NULL, TRUE ); ok( path_equal( path, buffer ), "got %s expected %s\n", wine_dbgstr_w(path), wine_dbgstr_w(buffer)); @@ -2651,7 +2652,7 @@ static void test_LdrGetDllPath(void)
lstrcpyW( buffer, fooW ); ret = pLdrGetDllPath( buffer, LOAD_WITH_ALTERED_SEARCH_PATH | LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR, &path, &unknown_ptr ); - ok( ret == STATUS_INVALID_PARAMETER, "got %x expected %x\n", ret, STATUS_INVALID_PARAMETER ); + ok( ret == STATUS_INVALID_PARAMETER, "got %lx expected %lx\n", ret, STATUS_INVALID_PARAMETER ); ok( !unknown_ptr, "unknown ptr %p\n", unknown_ptr ); pRtlReleasePath( path );
@@ -2660,7 +2661,7 @@ static void test_LdrGetDllPath(void) *p++ = '\'; lstrcpyW( p, fooW ); ret = pLdrGetDllPath( buffer, LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR, &path, &unknown_ptr ); - ok( !ret, "LdrGetDllPath failed %x\n", ret ); + ok( !ret, "LdrGetDllPath failed %lx\n", ret ); ok( !unknown_ptr, "unknown ptr %p\n", unknown_ptr ); ok( path_equal( path, dlldir ), "got %s expected %s\n", wine_dbgstr_w(path), wine_dbgstr_w(dlldir)); pRtlReleasePath( path ); @@ -2670,7 +2671,7 @@ static void test_LdrGetDllPath(void) DLL_DIRECTORY_COOKIE cookie = pAddDllDirectory( dlldir ); ok( !!cookie, "AddDllDirectory failed\n" ); ret = pLdrGetDllPath( 0, LOAD_LIBRARY_SEARCH_USER_DIRS, &path, &unknown_ptr ); - ok( !ret, "LdrGetDllPath failed %x\n", ret ); + ok( !ret, "LdrGetDllPath failed %lx\n", ret ); ok( !unknown_ptr, "unknown ptr %p\n", unknown_ptr ); ok( path_equal( path, dlldir ), "got %s expected %s\n", wine_dbgstr_w(path), wine_dbgstr_w(dlldir)); pRtlReleasePath( path ); @@ -2681,7 +2682,7 @@ static void test_LdrGetDllPath(void) { pSetDefaultDllDirectories( LOAD_LIBRARY_SEARCH_SYSTEM32 ); ret = pLdrGetDllPath( 0, 0, &path, &unknown_ptr ); - ok( !ret, "LdrGetDllPath failed %x\n", ret ); + ok( !ret, "LdrGetDllPath failed %lx\n", ret ); ok( !unknown_ptr, "unknown ptr %p\n", unknown_ptr ); GetSystemDirectoryW( buffer, ARRAY_SIZE(buffer) ); ok( path_equal( path, buffer ), "got %s expected %s\n", wine_dbgstr_w(path), wine_dbgstr_w(buffer));
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=109853
Your paranoid android.
=== w8adm (32 bit report) ===
kernel32: path: Timeout
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/kernel32/tests/pipe.c | 949 ++++++++++++++++++++++---------------------- 1 file changed, 475 insertions(+), 474 deletions(-)
diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c index 053e103bf14..c44146459f2 100644 --- a/dlls/kernel32/tests/pipe.c +++ b/dlls/kernel32/tests/pipe.c @@ -17,6 +17,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 <stdarg.h> #include <stdio.h> @@ -107,9 +108,9 @@ static BOOL RpcReadFile(HANDLE hFile, LPVOID buffer, DWORD bytesToRead, LPDWORD rpcargs.args[4] = (ULONG_PTR)overlapped;
thread = CreateThread(NULL, 0, rpcThreadMain, (void *)&rpcargs, 0, &threadId); - ok(thread != NULL, "CreateThread failed. %d\n", GetLastError()); + ok(thread != NULL, "CreateThread failed. %ld\n", GetLastError()); ret = WaitForSingleObject(thread, INFINITE); - ok(ret == WAIT_OBJECT_0, "WaitForSingleObject failed with %d.\n", GetLastError()); + ok(ret == WAIT_OBJECT_0, "WaitForSingleObject failed with %ld.\n", GetLastError()); CloseHandle(thread);
SetLastError(rpcargs.lastError); @@ -120,14 +121,14 @@ static BOOL RpcReadFile(HANDLE hFile, LPVOID buffer, DWORD bytesToRead, LPDWORD static void _test_not_signaled(unsigned line, HANDLE handle) { DWORD res = WaitForSingleObject(handle, 0); - ok_(__FILE__,line)(res == WAIT_TIMEOUT, "WaitForSingleObject returned %u (%u)\n", res, GetLastError()); + ok_(__FILE__,line)(res == WAIT_TIMEOUT, "WaitForSingleObject returned %lu (%lu)\n", res, GetLastError()); }
#define test_signaled(h) _test_signaled(__LINE__,h) static void _test_signaled(unsigned line, HANDLE handle) { DWORD res = WaitForSingleObject(handle, 0); - ok_(__FILE__,line)(res == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", res); + ok_(__FILE__,line)(res == WAIT_OBJECT_0, "WaitForSingleObject returned %lu\n", res); }
#define test_pipe_info(a,b,c,d,e) _test_pipe_info(__LINE__,a,b,c,d,e) @@ -138,10 +139,10 @@ static void _test_pipe_info(unsigned line, HANDLE pipe, DWORD ex_flags, DWORD ex
res = GetNamedPipeInfo(pipe, &flags, &out_buf_size, &in_buf_size, &max_instances); ok_(__FILE__,line)(res, "GetNamedPipeInfo failed: %x\n", res); - ok_(__FILE__,line)(flags == ex_flags, "flags = %x, expected %x\n", flags, ex_flags); - ok_(__FILE__,line)(out_buf_size == ex_out_buf_size, "out_buf_size = %x, expected %u\n", out_buf_size, ex_out_buf_size); - ok_(__FILE__,line)(in_buf_size == ex_in_buf_size, "in_buf_size = %x, expected %u\n", in_buf_size, ex_in_buf_size); - ok_(__FILE__,line)(max_instances == ex_max_instances, "max_instances = %x, expected %u\n", max_instances, ex_max_instances); + ok_(__FILE__,line)(flags == ex_flags, "flags = %lx, expected %lx\n", flags, ex_flags); + ok_(__FILE__,line)(out_buf_size == ex_out_buf_size, "out_buf_size = %lx, expected %lu\n", out_buf_size, ex_out_buf_size); + ok_(__FILE__,line)(in_buf_size == ex_in_buf_size, "in_buf_size = %lx, expected %lu\n", in_buf_size, ex_in_buf_size); + ok_(__FILE__,line)(max_instances == ex_max_instances, "max_instances = %lx, expected %lu\n", max_instances, ex_max_instances); }
#define test_file_access(a,b) _test_file_access(__LINE__,a,b) @@ -153,8 +154,8 @@ static void _test_file_access(unsigned line, HANDLE handle, DWORD expected_acces
memset(&info, 0x11, sizeof(info)); status = NtQueryInformationFile(handle, &io, &info, sizeof(info), FileAccessInformation); - ok_(__FILE__,line)(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %08x\n", status); - ok_(__FILE__,line)(info.AccessFlags == expected_access, "got access %08x expected %08x\n", + ok_(__FILE__,line)(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %08lx\n", status); + ok_(__FILE__,line)(info.AccessFlags == expected_access, "got access %08lx expected %08lx\n", info.AccessFlags, expected_access); }
@@ -180,7 +181,7 @@ static void test_CreateNamedPipe(int pipemode) /* Wait for nonexistent pipe */ ret = WaitNamedPipeA(PIPENAME, 2000); ok(ret == 0, "WaitNamedPipe returned %d for nonexistent pipe\n", ret); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %lu\n", GetLastError());
/* Bad parameter checks */ hnp = CreateNamedPipeA("not a named pipe", PIPE_ACCESS_DUPLEX, pipemode | PIPE_WAIT, @@ -232,24 +233,24 @@ static void test_CreateNamedPipe(int pipemode) | FILE_APPEND_DATA | FILE_WRITE_DATA | FILE_READ_DATA);
ret = PeekNamedPipe(hnp, NULL, 0, NULL, &readden, NULL); - ok(!ret && GetLastError() == ERROR_BAD_PIPE, "PeekNamedPipe returned %x (%u)\n", + ok(!ret && GetLastError() == ERROR_BAD_PIPE, "PeekNamedPipe returned %x (%lu)\n", ret, GetLastError());
ret = WaitNamedPipeA(PIPENAME, 2000); - ok(ret, "WaitNamedPipe failed (%d)\n", GetLastError()); + ok(ret, "WaitNamedPipe failed (%ld)\n", GetLastError());
hFile = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0); - ok(hFile != INVALID_HANDLE_VALUE, "CreateFile failed (%d)\n", GetLastError()); + ok(hFile != INVALID_HANDLE_VALUE, "CreateFile failed (%ld)\n", GetLastError());
ok(!WaitNamedPipeA(PIPENAME, 100), "WaitNamedPipe succeeded\n");
- ok(GetLastError() == ERROR_SEM_TIMEOUT, "wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_SEM_TIMEOUT, "wrong error %lu\n", GetLastError());
/* Test ConnectNamedPipe() in both directions */ ok(!ConnectNamedPipe(hnp, NULL), "ConnectNamedPipe(server) succeeded\n"); - ok(GetLastError() == ERROR_PIPE_CONNECTED, "expected ERROR_PIPE_CONNECTED, got %u\n", GetLastError()); + ok(GetLastError() == ERROR_PIPE_CONNECTED, "expected ERROR_PIPE_CONNECTED, got %lu\n", GetLastError()); ok(!ConnectNamedPipe(hFile, NULL), "ConnectNamedPipe(client) succeeded\n"); - ok(GetLastError() == ERROR_INVALID_FUNCTION, "expected ERROR_INVALID_FUNCTION, got %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_FUNCTION, "expected ERROR_INVALID_FUNCTION, got %lu\n", GetLastError());
/* don't try to do i/o if one side couldn't be opened, as it hangs */ if (hFile != INVALID_HANDLE_VALUE) { @@ -260,14 +261,14 @@ static void test_CreateNamedPipe(int pipemode) ok(WriteFile(hnp, obuf, sizeof(obuf), &written, NULL), "WriteFile\n"); ok(written == sizeof(obuf), "write file len\n"); ok(ReadFile(hFile, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile\n"); - ok(readden == sizeof(obuf), "read got %d bytes\n", readden); + ok(readden == sizeof(obuf), "read got %ld bytes\n", readden); ok(memcmp(obuf, ibuf, written) == 0, "content check\n");
memset(ibuf, 0, sizeof(ibuf)); ok(WriteFile(hFile, obuf2, sizeof(obuf2), &written, NULL), "WriteFile\n"); ok(written == sizeof(obuf2), "write file len\n"); ok(ReadFile(hnp, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile\n"); - ok(readden == sizeof(obuf2), "read got %d bytes\n", readden); + ok(readden == sizeof(obuf2), "read got %ld bytes\n", readden); ok(memcmp(obuf2, ibuf, written) == 0, "content check\n");
/* Now the same again, but with an additional call to PeekNamedPipe */ @@ -275,32 +276,32 @@ static void test_CreateNamedPipe(int pipemode) ok(WriteFile(hnp, obuf, sizeof(obuf), &written, NULL), "WriteFile\n"); ok(written == sizeof(obuf), "write file len 1\n"); ok(PeekNamedPipe(hFile, NULL, 0, NULL, &avail, &left), "Peek\n"); - ok(avail == sizeof(obuf), "peek 1 got %d bytes\n", avail); + ok(avail == sizeof(obuf), "peek 1 got %ld bytes\n", avail); if (pipemode == PIPE_TYPE_BYTE) - ok(left == 0, "peek 1 got %d bytes left\n", left); + ok(left == 0, "peek 1 got %ld bytes left\n", left); else - ok(left == sizeof(obuf), "peek 1 got %d bytes left\n", left); + ok(left == sizeof(obuf), "peek 1 got %ld bytes left\n", left); ok(ReadFile(hFile, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile\n"); - ok(readden == sizeof(obuf), "read 1 got %d bytes\n", readden); + ok(readden == sizeof(obuf), "read 1 got %ld bytes\n", readden); ok(memcmp(obuf, ibuf, written) == 0, "content 1 check\n");
memset(ibuf, 0, sizeof(ibuf)); ok(WriteFile(hFile, obuf2, sizeof(obuf2), &written, NULL), "WriteFile\n"); ok(written == sizeof(obuf2), "write file len 2\n"); ok(PeekNamedPipe(hnp, NULL, 0, NULL, &avail, &left), "Peek\n"); - ok(avail == sizeof(obuf2), "peek 2 got %d bytes\n", avail); + ok(avail == sizeof(obuf2), "peek 2 got %ld bytes\n", avail); if (pipemode == PIPE_TYPE_BYTE) - ok(left == 0, "peek 2 got %d bytes left\n", left); + ok(left == 0, "peek 2 got %ld bytes left\n", left); else - ok(left == sizeof(obuf2), "peek 2 got %d bytes left\n", left); + ok(left == sizeof(obuf2), "peek 2 got %ld bytes left\n", left); ok(PeekNamedPipe(hnp, (LPVOID)1, 0, NULL, &avail, &left), "Peek\n"); - ok(avail == sizeof(obuf2), "peek 2 got %d bytes\n", avail); + ok(avail == sizeof(obuf2), "peek 2 got %ld bytes\n", avail); if (pipemode == PIPE_TYPE_BYTE) - ok(left == 0, "peek 2 got %d bytes left\n", left); + ok(left == 0, "peek 2 got %ld bytes left\n", left); else - ok(left == sizeof(obuf2), "peek 2 got %d bytes left\n", left); + ok(left == sizeof(obuf2), "peek 2 got %ld bytes left\n", left); ok(ReadFile(hnp, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile\n"); - ok(readden == sizeof(obuf2), "read 2 got %d bytes\n", readden); + ok(readden == sizeof(obuf2), "read 2 got %ld bytes\n", readden); ok(memcmp(obuf2, ibuf, written) == 0, "content 2 check\n");
/* Test how ReadFile behaves when the buffer is not big enough for the whole message */ @@ -308,39 +309,39 @@ static void test_CreateNamedPipe(int pipemode) ok(WriteFile(hnp, obuf2, sizeof(obuf2), &written, NULL), "WriteFile\n"); ok(written == sizeof(obuf2), "write file len\n"); ok(PeekNamedPipe(hFile, ibuf, 4, &readden, &avail, &left), "Peek\n"); - ok(readden == 4, "peek got %d bytes\n", readden); - ok(avail == sizeof(obuf2), "peek got %d bytes available\n", avail); + ok(readden == 4, "peek got %ld bytes\n", readden); + ok(avail == sizeof(obuf2), "peek got %ld bytes available\n", avail); if (pipemode == PIPE_TYPE_BYTE) - ok(left == -4, "peek got %d bytes left\n", left); + ok(left == -4, "peek got %ld bytes left\n", left); else - ok(left == sizeof(obuf2)-4, "peek got %d bytes left\n", left); + ok(left == sizeof(obuf2)-4, "peek got %ld bytes left\n", left); ok(ReadFile(hFile, ibuf, 4, &readden, NULL), "ReadFile\n"); - ok(readden == 4, "read got %d bytes\n", readden); + ok(readden == 4, "read got %ld bytes\n", readden); ok(ReadFile(hFile, ibuf + 4, sizeof(ibuf) - 4, &readden, NULL), "ReadFile\n"); - ok(readden == sizeof(obuf2) - 4, "read got %d bytes\n", readden); + ok(readden == sizeof(obuf2) - 4, "read got %ld bytes\n", readden); ok(memcmp(obuf2, ibuf, written) == 0, "content check\n");
memset(ibuf, 0, sizeof(ibuf)); ok(WriteFile(hFile, obuf, sizeof(obuf), &written, NULL), "WriteFile\n"); ok(written == sizeof(obuf), "write file len\n"); ok(PeekNamedPipe(hnp, ibuf, 4, &readden, &avail, &left), "Peek\n"); - ok(readden == 4, "peek got %d bytes\n", readden); - ok(avail == sizeof(obuf), "peek got %d bytes available\n", avail); + ok(readden == 4, "peek got %ld bytes\n", readden); + ok(avail == sizeof(obuf), "peek got %ld bytes available\n", avail); if (pipemode == PIPE_TYPE_BYTE) { - ok(left == -4, "peek got %d bytes left\n", left); + ok(left == -4, "peek got %ld bytes left\n", left); ok(ReadFile(hnp, ibuf, 4, &readden, NULL), "ReadFile\n"); } else { - ok(left == sizeof(obuf)-4, "peek got %d bytes left\n", left); + ok(left == sizeof(obuf)-4, "peek got %ld bytes left\n", left); SetLastError(0xdeadbeef); ok(!ReadFile(hnp, ibuf, 4, &readden, NULL), "ReadFile\n"); ok(GetLastError() == ERROR_MORE_DATA, "wrong error\n"); } - ok(readden == 4, "read got %d bytes\n", readden); + ok(readden == 4, "read got %ld bytes\n", readden); ok(ReadFile(hnp, ibuf + 4, sizeof(ibuf) - 4, &readden, NULL), "ReadFile\n"); - ok(readden == sizeof(obuf) - 4, "read got %d bytes\n", readden); + ok(readden == sizeof(obuf) - 4, "read got %ld bytes\n", readden); ok(memcmp(obuf, ibuf, written) == 0, "content check\n");
/* Similar to above, but use a read buffer size small enough to read in three parts */ @@ -350,7 +351,7 @@ static void test_CreateNamedPipe(int pipemode) if (pipemode == PIPE_TYPE_BYTE) { ok(ReadFile(hnp, ibuf, 4, &readden, NULL), "ReadFile\n"); - ok(readden == 4, "read got %d bytes\n", readden); + ok(readden == 4, "read got %ld bytes\n", readden); ok(ReadFile(hnp, ibuf + 4, 4, &readden, NULL), "ReadFile\n"); } else @@ -358,14 +359,14 @@ static void test_CreateNamedPipe(int pipemode) SetLastError(0xdeadbeef); ok(!ReadFile(hnp, ibuf, 4, &readden, NULL), "ReadFile\n"); ok(GetLastError() == ERROR_MORE_DATA, "wrong error\n"); - ok(readden == 4, "read got %d bytes\n", readden); + ok(readden == 4, "read got %ld bytes\n", readden); SetLastError(0xdeadbeef); ok(!ReadFile(hnp, ibuf + 4, 4, &readden, NULL), "ReadFile\n"); ok(GetLastError() == ERROR_MORE_DATA, "wrong error\n"); } - ok(readden == 4, "read got %d bytes\n", readden); + ok(readden == 4, "read got %ld bytes\n", readden); ok(ReadFile(hnp, ibuf + 8, sizeof(ibuf) - 8, &readden, NULL), "ReadFile\n"); - ok(readden == sizeof(obuf2) - 8, "read got %d bytes\n", readden); + ok(readden == sizeof(obuf2) - 8, "read got %ld bytes\n", readden); ok(memcmp(obuf2, ibuf, written) == 0, "content check\n");
/* Test reading of multiple writes */ @@ -375,23 +376,23 @@ static void test_CreateNamedPipe(int pipemode) ok(WriteFile(hnp, obuf2, sizeof(obuf2), &written, NULL), " WriteFile3b\n"); ok(written == sizeof(obuf2), "write file len 3b\n"); ok(PeekNamedPipe(hFile, ibuf, 4, &readden, &avail, &left), "Peek3\n"); - ok(readden == 4, "peek3 got %d bytes\n", readden); + ok(readden == 4, "peek3 got %ld bytes\n", readden); if (pipemode == PIPE_TYPE_BYTE) - ok(left == -4, "peek3 got %d bytes left\n", left); + ok(left == -4, "peek3 got %ld bytes left\n", left); else - ok(left == sizeof(obuf)-4, "peek3 got %d bytes left\n", left); - ok(avail == sizeof(obuf) + sizeof(obuf2), "peek3 got %d bytes available\n", avail); + ok(left == sizeof(obuf)-4, "peek3 got %ld bytes left\n", left); + ok(avail == sizeof(obuf) + sizeof(obuf2), "peek3 got %ld bytes available\n", avail); ok(PeekNamedPipe(hFile, ibuf, sizeof(ibuf), &readden, &avail, &left), "Peek3\n"); if (pipemode == PIPE_TYPE_BYTE) { - ok(readden == sizeof(obuf) + sizeof(obuf2), "peek3 got %d bytes\n", readden); - ok(left == (DWORD) -(sizeof(obuf) + sizeof(obuf2)), "peek3 got %d bytes left\n", left); + ok(readden == sizeof(obuf) + sizeof(obuf2), "peek3 got %ld bytes\n", readden); + ok(left == (DWORD) -(sizeof(obuf) + sizeof(obuf2)), "peek3 got %ld bytes left\n", left); } else { - ok(readden == sizeof(obuf), "peek3 got %d bytes\n", readden); - ok(left == 0, "peek3 got %d bytes left\n", left); + ok(readden == sizeof(obuf), "peek3 got %ld bytes\n", readden); + ok(left == 0, "peek3 got %ld bytes left\n", left); } - ok(avail == sizeof(obuf) + sizeof(obuf2), "peek3 got %d bytes available\n", avail); + ok(avail == sizeof(obuf) + sizeof(obuf2), "peek3 got %ld bytes available\n", avail); pbuf = ibuf; ok(memcmp(obuf, pbuf, sizeof(obuf)) == 0, "pipe content 3a check\n"); if (pipemode == PIPE_TYPE_BYTE && readden >= sizeof(obuf)+sizeof(obuf2)) { @@ -399,7 +400,7 @@ static void test_CreateNamedPipe(int pipemode) ok(memcmp(obuf2, pbuf, sizeof(obuf2)) == 0, "pipe content 3b check\n"); } ok(ReadFile(hFile, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile\n"); - ok(readden == sizeof(obuf) + sizeof(obuf2), "read 3 got %d bytes\n", readden); + ok(readden == sizeof(obuf) + sizeof(obuf2), "read 3 got %ld bytes\n", readden); pbuf = ibuf; ok(memcmp(obuf, pbuf, sizeof(obuf)) == 0, "content 3a check\n"); pbuf += sizeof(obuf); @@ -412,23 +413,23 @@ static void test_CreateNamedPipe(int pipemode) ok(WriteFile(hFile, obuf2, sizeof(obuf2), &written, NULL), " WriteFile4b\n"); ok(written == sizeof(obuf2), "write file len 4b\n"); ok(PeekNamedPipe(hnp, ibuf, 4, &readden, &avail, &left), "Peek3\n"); - ok(readden == 4, "peek3 got %d bytes\n", readden); + ok(readden == 4, "peek3 got %ld bytes\n", readden); if (pipemode == PIPE_TYPE_BYTE) - ok(left == -4, "peek3 got %d bytes left\n", left); + ok(left == -4, "peek3 got %ld bytes left\n", left); else - ok(left == sizeof(obuf)-4, "peek3 got %d bytes left\n", left); - ok(avail == sizeof(obuf) + sizeof(obuf2), "peek3 got %d bytes available\n", avail); + ok(left == sizeof(obuf)-4, "peek3 got %ld bytes left\n", left); + ok(avail == sizeof(obuf) + sizeof(obuf2), "peek3 got %ld bytes available\n", avail); ok(PeekNamedPipe(hnp, ibuf, sizeof(ibuf), &readden, &avail, &left), "Peek4\n"); if (pipemode == PIPE_TYPE_BYTE) { - ok(readden == sizeof(obuf) + sizeof(obuf2), "peek4 got %d bytes\n", readden); - ok(left == (DWORD) -(sizeof(obuf) + sizeof(obuf2)), "peek4 got %d bytes left\n", left); + ok(readden == sizeof(obuf) + sizeof(obuf2), "peek4 got %ld bytes\n", readden); + ok(left == (DWORD) -(sizeof(obuf) + sizeof(obuf2)), "peek4 got %ld bytes left\n", left); } else { - ok(readden == sizeof(obuf), "peek4 got %d bytes\n", readden); - ok(left == 0, "peek4 got %d bytes left\n", left); + ok(readden == sizeof(obuf), "peek4 got %ld bytes\n", readden); + ok(left == 0, "peek4 got %ld bytes left\n", left); } - ok(avail == sizeof(obuf) + sizeof(obuf2), "peek4 got %d bytes available\n", avail); + ok(avail == sizeof(obuf) + sizeof(obuf2), "peek4 got %ld bytes available\n", avail); pbuf = ibuf; ok(memcmp(obuf, pbuf, sizeof(obuf)) == 0, "pipe content 4a check\n"); if (pipemode == PIPE_TYPE_BYTE && readden >= sizeof(obuf)+sizeof(obuf2)) { @@ -437,10 +438,10 @@ static void test_CreateNamedPipe(int pipemode) } ok(ReadFile(hnp, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile\n"); if (pipemode == PIPE_TYPE_BYTE) { - ok(readden == sizeof(obuf) + sizeof(obuf2), "read 4 got %d bytes\n", readden); + ok(readden == sizeof(obuf) + sizeof(obuf2), "read 4 got %ld bytes\n", readden); } else { - ok(readden == sizeof(obuf), "read 4 got %d bytes\n", readden); + ok(readden == sizeof(obuf), "read 4 got %ld bytes\n", readden); } pbuf = ibuf; ok(memcmp(obuf, pbuf, sizeof(obuf)) == 0, "content 4a check\n"); @@ -465,13 +466,13 @@ static void test_CreateNamedPipe(int pipemode) ok(WriteFile(hnp, obuf2, sizeof(obuf2), &written, NULL), " WriteFile5b\n"); ok(written == sizeof(obuf2), "write file len 3b\n"); ok(PeekNamedPipe(hFile, ibuf, sizeof(ibuf), &readden, &avail, &left), "Peek5\n"); - ok(readden == sizeof(obuf), "peek5 got %d bytes\n", readden); - ok(avail == sizeof(obuf) + sizeof(obuf2), "peek5 got %d bytes available\n", avail); - ok(left == 0, "peek5 got %d bytes left\n", left); + ok(readden == sizeof(obuf), "peek5 got %ld bytes\n", readden); + ok(avail == sizeof(obuf) + sizeof(obuf2), "peek5 got %ld bytes available\n", avail); + ok(left == 0, "peek5 got %ld bytes left\n", left); pbuf = ibuf; ok(memcmp(obuf, pbuf, sizeof(obuf)) == 0, "content 5a check\n"); ok(ReadFile(hFile, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile\n"); - ok(readden == sizeof(obuf), "read 5 got %d bytes\n", readden); + ok(readden == sizeof(obuf), "read 5 got %ld bytes\n", readden); pbuf = ibuf; ok(memcmp(obuf, pbuf, sizeof(obuf)) == 0, "content 5a check\n"); if (readden <= sizeof(obuf)) @@ -480,11 +481,11 @@ static void test_CreateNamedPipe(int pipemode) /* Multiple writes in the reverse direction */ /* the write of obuf2 from write4 should still be in the buffer */ ok(PeekNamedPipe(hnp, ibuf, sizeof(ibuf), &readden, &avail, NULL), "Peek6a\n"); - ok(readden == sizeof(obuf2), "peek6a got %d bytes\n", readden); - ok(avail == sizeof(obuf2), "peek6a got %d bytes available\n", avail); + ok(readden == sizeof(obuf2), "peek6a got %ld bytes\n", readden); + ok(avail == sizeof(obuf2), "peek6a got %ld bytes available\n", avail); if (avail > 0) { ok(ReadFile(hnp, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile\n"); - ok(readden == sizeof(obuf2), "read 6a got %d bytes\n", readden); + ok(readden == sizeof(obuf2), "read 6a got %ld bytes\n", readden); pbuf = ibuf; ok(memcmp(obuf2, pbuf, sizeof(obuf2)) == 0, "content 6a check\n"); } @@ -494,13 +495,13 @@ static void test_CreateNamedPipe(int pipemode) ok(WriteFile(hFile, obuf2, sizeof(obuf2), &written, NULL), " WriteFile6b\n"); ok(written == sizeof(obuf2), "write file len 6b\n"); ok(PeekNamedPipe(hnp, ibuf, sizeof(ibuf), &readden, &avail, NULL), "Peek6\n"); - ok(readden == sizeof(obuf), "peek6 got %d bytes\n", readden); + ok(readden == sizeof(obuf), "peek6 got %ld bytes\n", readden);
- ok(avail == sizeof(obuf) + sizeof(obuf2), "peek6b got %d bytes available\n", avail); + ok(avail == sizeof(obuf) + sizeof(obuf2), "peek6b got %ld bytes available\n", avail); pbuf = ibuf; ok(memcmp(obuf, pbuf, sizeof(obuf)) == 0, "content 6a check\n"); ok(ReadFile(hnp, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile\n"); - ok(readden == sizeof(obuf), "read 6b got %d bytes\n", readden); + ok(readden == sizeof(obuf), "read 6b got %ld bytes\n", readden); pbuf = ibuf; ok(memcmp(obuf, pbuf, sizeof(obuf)) == 0, "content 6a check\n"); if (readden <= sizeof(obuf)) @@ -513,9 +514,9 @@ static void test_CreateNamedPipe(int pipemode) SetLastError(0xdeadbeef); ok(!ReadFile(hFile, ibuf, 4, &readden, NULL), "ReadFile 7\n"); ok(GetLastError() == ERROR_MORE_DATA, "wrong error 7\n"); - ok(readden == 4, "read got %d bytes 7\n", readden); + ok(readden == 4, "read got %ld bytes 7\n", readden); ok(ReadFile(hFile, ibuf + 4, sizeof(ibuf) - 4, &readden, NULL), "ReadFile 7\n"); - ok(readden == sizeof(obuf2) - 4, "read got %d bytes 7\n", readden); + ok(readden == sizeof(obuf2) - 4, "read got %ld bytes 7\n", readden); ok(memcmp(obuf2, ibuf, written) == 0, "content check 7\n");
memset(ibuf, 0, sizeof(ibuf)); @@ -524,9 +525,9 @@ static void test_CreateNamedPipe(int pipemode) SetLastError(0xdeadbeef); ok(!ReadFile(hnp, ibuf, 4, &readden, NULL), "ReadFile 8\n"); ok(GetLastError() == ERROR_MORE_DATA, "wrong error 8\n"); - ok(readden == 4, "read got %d bytes 8\n", readden); + ok(readden == 4, "read got %ld bytes 8\n", readden); ok(ReadFile(hnp, ibuf + 4, sizeof(ibuf) - 4, &readden, NULL), "ReadFile 8\n"); - ok(readden == sizeof(obuf) - 4, "read got %d bytes 8\n", readden); + ok(readden == sizeof(obuf) - 4, "read got %ld bytes 8\n", readden); ok(memcmp(obuf, ibuf, written) == 0, "content check 8\n");
/* The following test shows that when doing a partial read of a message, the rest @@ -541,15 +542,15 @@ static void test_CreateNamedPipe(int pipemode) SetLastError(0xdeadbeef); ok(!ReadFile(hFile, ibuf, 4, &readden, NULL), "ReadFile 9\n"); ok(GetLastError() == ERROR_MORE_DATA, "wrong error 9\n"); - ok(readden == 4, "read got %d bytes 9\n", readden); + ok(readden == 4, "read got %ld bytes 9\n", readden); SetLastError(0xdeadbeef); ret = RpcReadFile(hFile, ibuf + 4, 4, &readden, NULL); ok(!ret, "RpcReadFile 9\n"); ok(GetLastError() == ERROR_MORE_DATA, "wrong error 9\n"); - ok(readden == 4, "read got %d bytes 9\n", readden); + ok(readden == 4, "read got %ld bytes 9\n", readden); ret = RpcReadFile(hFile, ibuf + 8, sizeof(ibuf), &readden, NULL); ok(ret, "RpcReadFile 9\n"); - ok(readden == sizeof(obuf) - 8, "read got %d bytes 9\n", readden); + ok(readden == sizeof(obuf) - 8, "read got %ld bytes 9\n", readden); ok(memcmp(obuf, ibuf, sizeof(obuf)) == 0, "content check 9\n"); if (readden <= sizeof(obuf) - 8) /* blocks forever if second part was already received */ { @@ -558,14 +559,14 @@ static void test_CreateNamedPipe(int pipemode) ret = RpcReadFile(hFile, ibuf, 4, &readden, NULL); ok(!ret, "RpcReadFile 9\n"); ok(GetLastError() == ERROR_MORE_DATA, "wrong error 9\n"); - ok(readden == 4, "read got %d bytes 9\n", readden); + ok(readden == 4, "read got %ld bytes 9\n", readden); SetLastError(0xdeadbeef); ok(!ReadFile(hFile, ibuf + 4, 4, &readden, NULL), "ReadFile 9\n"); ok(GetLastError() == ERROR_MORE_DATA, "wrong error 9\n"); - ok(readden == 4, "read got %d bytes 9\n", readden); + ok(readden == 4, "read got %ld bytes 9\n", readden); ret = RpcReadFile(hFile, ibuf + 8, sizeof(ibuf), &readden, NULL); ok(ret, "RpcReadFile 9\n"); - ok(readden == sizeof(obuf2) - 8, "read got %d bytes 9\n", readden); + ok(readden == sizeof(obuf2) - 8, "read got %ld bytes 9\n", readden); ok(memcmp(obuf2, ibuf, sizeof(obuf2)) == 0, "content check 9\n"); }
@@ -578,15 +579,15 @@ static void test_CreateNamedPipe(int pipemode) SetLastError(0xdeadbeef); ok(!ReadFile(hnp, ibuf, 4, &readden, NULL), "ReadFile 10\n"); ok(GetLastError() == ERROR_MORE_DATA, "wrong error 10\n"); - ok(readden == 4, "read got %d bytes 10\n", readden); + ok(readden == 4, "read got %ld bytes 10\n", readden); SetLastError(0xdeadbeef); ret = RpcReadFile(hnp, ibuf + 4, 4, &readden, NULL); ok(!ret, "RpcReadFile 10\n"); ok(GetLastError() == ERROR_MORE_DATA, "wrong error 10\n"); - ok(readden == 4, "read got %d bytes 10\n", readden); + ok(readden == 4, "read got %ld bytes 10\n", readden); ret = RpcReadFile(hnp, ibuf + 8, sizeof(ibuf), &readden, NULL); ok(ret, "RpcReadFile 10\n"); - ok(readden == sizeof(obuf2) - 8, "read got %d bytes 10\n", readden); + ok(readden == sizeof(obuf2) - 8, "read got %ld bytes 10\n", readden); ok(memcmp(obuf2, ibuf, sizeof(obuf2)) == 0, "content check 10\n"); if (readden <= sizeof(obuf2) - 8) /* blocks forever if second part was already received */ { @@ -595,14 +596,14 @@ static void test_CreateNamedPipe(int pipemode) ret = RpcReadFile(hnp, ibuf, 4, &readden, NULL); ok(!ret, "RpcReadFile 10\n"); ok(GetLastError() == ERROR_MORE_DATA, "wrong error 10\n"); - ok(readden == 4, "read got %d bytes 10\n", readden); + ok(readden == 4, "read got %ld bytes 10\n", readden); SetLastError(0xdeadbeef); ok(!ReadFile(hnp, ibuf + 4, 4, &readden, NULL), "ReadFile 10\n"); ok(GetLastError() == ERROR_MORE_DATA, "wrong error 10\n"); - ok(readden == 4, "read got %d bytes 10\n", readden); + ok(readden == 4, "read got %ld bytes 10\n", readden); ret = RpcReadFile(hnp, ibuf + 8, sizeof(ibuf), &readden, NULL); ok(ret, "RpcReadFile 10\n"); - ok(readden == sizeof(obuf) - 8, "read got %d bytes 10\n", readden); + ok(readden == sizeof(obuf) - 8, "read got %ld bytes 10\n", readden); ok(memcmp(obuf, ibuf, sizeof(obuf)) == 0, "content check 10\n"); }
@@ -667,7 +668,7 @@ static void test_CreateNamedPipe(int pipemode) | FILE_WRITE_PROPERTIES | FILE_APPEND_DATA | FILE_WRITE_DATA);
hFile = CreateFileA(PIPENAME, 0, 0, NULL, OPEN_EXISTING, 0, 0); - ok(hFile != INVALID_HANDLE_VALUE, "CreateFile failed: %u\n", GetLastError()); + ok(hFile != INVALID_HANDLE_VALUE, "CreateFile failed: %lu\n", GetLastError()); test_file_access(hFile, SYNCHRONIZE | FILE_READ_ATTRIBUTES); CloseHandle(hFile);
@@ -675,9 +676,9 @@ static void test_CreateNamedPipe(int pipemode)
hnp = CreateNamedPipeA("\\.\pipe\a<>*?|"/b", PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE, 1, 1024, 1024, NMPWAIT_USE_DEFAULT_WAIT, NULL); - ok(hnp != INVALID_HANDLE_VALUE, "failed to create pipe, error %u\n", GetLastError()); + ok(hnp != INVALID_HANDLE_VALUE, "failed to create pipe, error %lu\n", GetLastError()); hFile = CreateFileA("\\.\pipe\a<>*?|"/b", 0, 0, NULL, OPEN_EXISTING, 0, 0); - ok(hFile != INVALID_HANDLE_VALUE, "failed to open pipe, error %u\n", GetLastError()); + ok(hFile != INVALID_HANDLE_VALUE, "failed to open pipe, error %lu\n", GetLastError()); CloseHandle(hFile); CloseHandle(hnp);
@@ -781,43 +782,43 @@ static void test_ReadFile(void) server = CreateNamedPipeA(PIPENAME, PIPE_ACCESS_DUPLEX, PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, 1, 1024, 1024, NMPWAIT_WAIT_FOREVER, NULL); - ok(server != INVALID_HANDLE_VALUE, "CreateNamedPipe failed with %u\n", GetLastError()); + ok(server != INVALID_HANDLE_VALUE, "CreateNamedPipe failed with %lu\n", GetLastError());
client = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0); - ok(client != INVALID_HANDLE_VALUE, "CreateFile failed with %u\n", GetLastError()); + ok(client != INVALID_HANDLE_VALUE, "CreateFile failed with %lu\n", GetLastError());
ok(WriteFile(client, buf, sizeof(buf), &size, NULL), "WriteFile\n");
res = ReadFile(server, buf, 1, &size, NULL); - ok(!res && GetLastError() == ERROR_MORE_DATA, "ReadFile returned %x(%u)\n", res, GetLastError()); - ok(size == 1, "size = %u\n", size); + ok(!res && GetLastError() == ERROR_MORE_DATA, "ReadFile returned %x(%lu)\n", res, GetLastError()); + ok(size == 1, "size = %lu\n", size);
/* pass both overlapped and ret read */ memset(&overlapped, 0, sizeof(overlapped)); res = ReadFile(server, buf, 1, &size, &overlapped); - ok(!res && GetLastError() == ERROR_MORE_DATA, "ReadFile returned %x(%u)\n", res, GetLastError()); - ok(size == 0, "size = %u\n", size); - ok((NTSTATUS)overlapped.Internal == STATUS_BUFFER_OVERFLOW, "Internal = %lx\n", overlapped.Internal); - ok(overlapped.InternalHigh == 1, "InternalHigh = %lx\n", overlapped.InternalHigh); + ok(!res && GetLastError() == ERROR_MORE_DATA, "ReadFile returned %x(%lu)\n", res, GetLastError()); + ok(size == 0, "size = %lu\n", size); + ok((NTSTATUS)overlapped.Internal == STATUS_BUFFER_OVERFLOW, "Internal = %Ix\n", overlapped.Internal); + ok(overlapped.InternalHigh == 1, "InternalHigh = %Ix\n", overlapped.InternalHigh);
DisconnectNamedPipe(server);
memset(&overlapped, 0, sizeof(overlapped)); overlapped.InternalHigh = 0xdeadbeef; res = ReadFile(server, buf, 1, &size, &overlapped); - ok(!res && GetLastError() == ERROR_PIPE_NOT_CONNECTED, "ReadFile returned %x(%u)\n", res, GetLastError()); - ok(size == 0, "size = %u\n", size); - ok(overlapped.Internal == STATUS_PENDING, "Internal = %lx\n", overlapped.Internal); - ok(overlapped.InternalHigh == 0xdeadbeef, "InternalHigh = %lx\n", overlapped.InternalHigh); + ok(!res && GetLastError() == ERROR_PIPE_NOT_CONNECTED, "ReadFile returned %x(%lu)\n", res, GetLastError()); + ok(size == 0, "size = %lu\n", size); + ok(overlapped.Internal == STATUS_PENDING, "Internal = %Ix\n", overlapped.Internal); + ok(overlapped.InternalHigh == 0xdeadbeef, "InternalHigh = %Ix\n", overlapped.InternalHigh);
memset(&overlapped, 0, sizeof(overlapped)); overlapped.InternalHigh = 0xdeadbeef; res = WriteFile(server, buf, 1, &size, &overlapped); - ok(!res && GetLastError() == ERROR_PIPE_NOT_CONNECTED, "ReadFile returned %x(%u)\n", res, GetLastError()); - ok(size == 0, "size = %u\n", size); - ok(overlapped.Internal == STATUS_PENDING, "Internal = %lx\n", overlapped.Internal); - ok(overlapped.InternalHigh == 0xdeadbeef, "InternalHigh = %lx\n", overlapped.InternalHigh); + ok(!res && GetLastError() == ERROR_PIPE_NOT_CONNECTED, "ReadFile returned %x(%lu)\n", res, GetLastError()); + ok(size == 0, "size = %lu\n", size); + ok(overlapped.Internal == STATUS_PENDING, "Internal = %Ix\n", overlapped.Internal); + ok(overlapped.InternalHigh == 0xdeadbeef, "InternalHigh = %Ix\n", overlapped.InternalHigh);
CloseHandle(server); CloseHandle(client); @@ -919,7 +920,7 @@ static DWORD CALLBACK serverThreadMain2(LPVOID arg) { if (winetest_debug > 1) trace("Queueing an user APC\n"); /* verify the pipe is non alerable */ ret = QueueUserAPC(&user_apc, GetCurrentThread(), 0); - ok(ret, "QueueUserAPC failed: %d\n", GetLastError()); + ok(ret, "QueueUserAPC failed: %ld\n", GetLastError()); }
/* Wait for client to connect */ @@ -1010,7 +1011,7 @@ static DWORD CALLBACK serverThreadMain3(LPVOID arg) if (winetest_debug > 1) trace("Server calling non-overlapped ConnectNamedPipe on overlapped pipe...\n"); success = ConnectNamedPipe(hnp, NULL); err = GetLastError(); - ok(success || (err == ERROR_PIPE_CONNECTED), "ConnectNamedPipe failed: %d\n", err); + ok(success || (err == ERROR_PIPE_CONNECTED), "ConnectNamedPipe failed: %ld\n", err); if (winetest_debug > 1) trace("ConnectNamedPipe operation complete.\n"); } else { if (winetest_debug > 1) trace("Server calling overlapped ConnectNamedPipe...\n"); @@ -1025,7 +1026,7 @@ static DWORD CALLBACK serverThreadMain3(LPVOID arg) do { ret = WaitForSingleObjectEx(hEvent, INFINITE, TRUE); } while (ret == WAIT_IO_COMPLETION); - ok(ret == 0, "wait ConnectNamedPipe returned %x\n", ret); + ok(ret == 0, "wait ConnectNamedPipe returned %lx\n", ret); } success = GetOverlappedResult(hnp, &oOverlap, &dummy, letGORwait); if (!letGORwait && !letWFSOEwait && !success) { @@ -1053,7 +1054,7 @@ static DWORD CALLBACK serverThreadMain3(LPVOID arg) do { ret = WaitForSingleObjectEx(hEvent, INFINITE, TRUE); } while (ret == WAIT_IO_COMPLETION); - ok(ret == 0, "wait ReadFile returned %x\n", ret); + ok(ret == 0, "wait ReadFile returned %lx\n", ret); } success = GetOverlappedResult(hnp, &oOverlap, &readden, letGORwait); if (!letGORwait && !letWFSOEwait && !success) { @@ -1077,7 +1078,7 @@ static DWORD CALLBACK serverThreadMain3(LPVOID arg) do { ret = WaitForSingleObjectEx(hEvent, INFINITE, TRUE); } while (ret == WAIT_IO_COMPLETION); - ok(ret == 0, "wait WriteFile returned %x\n", ret); + ok(ret == 0, "wait WriteFile returned %lx\n", ret); } success = GetOverlappedResult(hnp, &oOverlap, &written, letGORwait); if (!letGORwait && !letWFSOEwait && !success) { @@ -1115,7 +1116,7 @@ static DWORD CALLBACK serverThreadMain4(LPVOID arg) ok(hnp != INVALID_HANDLE_VALUE, "CreateNamedPipe failed\n");
hcompletion = CreateIoCompletionPort(hnp, NULL, 12345, 1); - ok(hcompletion != NULL, "CreateIoCompletionPort failed, error=%i\n", GetLastError()); + ok(hcompletion != NULL, "CreateIoCompletionPort failed, error=%li\n", GetLastError());
for (i = 0; i < NB_SERVER_LOOPS; i++) { char buf[512]; @@ -1139,17 +1140,17 @@ static DWORD CALLBACK serverThreadMain4(LPVOID arg) success = ConnectNamedPipe(hnp, &oConnect); err = GetLastError(); ok(!success && (err == ERROR_IO_PENDING || err == ERROR_PIPE_CONNECTED), - "overlapped ConnectNamedPipe got %u err %u\n", success, err ); + "overlapped ConnectNamedPipe got %u err %lu\n", success, err ); if (!success && err == ERROR_IO_PENDING) { if (winetest_debug > 1) trace("ConnectNamedPipe GetQueuedCompletionStatus\n"); success = GetQueuedCompletionStatus(hcompletion, &dummy, &compkey, &oResult, 0); if (!success) { ok( GetLastError() == WAIT_TIMEOUT, - "ConnectNamedPipe GetQueuedCompletionStatus wrong error %u\n", GetLastError()); + "ConnectNamedPipe GetQueuedCompletionStatus wrong error %lu\n", GetLastError()); success = GetQueuedCompletionStatus(hcompletion, &dummy, &compkey, &oResult, 10000); } - ok(success, "ConnectNamedPipe GetQueuedCompletionStatus failed, errno=%i\n", GetLastError()); + ok(success, "ConnectNamedPipe GetQueuedCompletionStatus failed, errno=%li\n", GetLastError()); if (success) { ok(compkey == 12345, "got completion key %i instead of 12345\n", (int)compkey); @@ -1165,10 +1166,10 @@ static DWORD CALLBACK serverThreadMain4(LPVOID arg) success = ReadFile(hnp, buf, sizeof(buf), &readden, &oRead); if (winetest_debug > 1) trace("Server ReadFile returned...\n"); err = GetLastError(); - ok(success || err == ERROR_IO_PENDING, "overlapped ReadFile, err=%i\n", err); + ok(success || err == ERROR_IO_PENDING, "overlapped ReadFile, err=%li\n", err); success = GetQueuedCompletionStatus(hcompletion, &readden, &compkey, &oResult, 10000); - ok(success, "ReadFile GetQueuedCompletionStatus failed, errno=%i\n", GetLastError()); + ok(success, "ReadFile GetQueuedCompletionStatus failed, errno=%li\n", GetLastError()); if (success) { ok(compkey == 12345, "got completion key %i instead of 12345\n", (int)compkey); @@ -1180,10 +1181,10 @@ static DWORD CALLBACK serverThreadMain4(LPVOID arg) success = WriteFile(hnp, buf, readden, &written, &oWrite); if (winetest_debug > 1) trace("Server WriteFile returned...\n"); err = GetLastError(); - ok(success || err == ERROR_IO_PENDING, "overlapped WriteFile failed, err=%u\n", err); + ok(success || err == ERROR_IO_PENDING, "overlapped WriteFile failed, err=%lu\n", err); success = GetQueuedCompletionStatus(hcompletion, &written, &compkey, &oResult, 10000); - ok(success, "WriteFile GetQueuedCompletionStatus failed, errno=%i\n", GetLastError()); + ok(success, "WriteFile GetQueuedCompletionStatus failed, errno=%li\n", GetLastError()); if (success) { ok(compkey == 12345, "got completion key %i instead of 12345\n", (int)compkey); @@ -1202,7 +1203,7 @@ static DWORD CALLBACK serverThreadMain4(LPVOID arg) success = WriteFile(hnp, buf, readden, &written, &oWrite); err = GetLastError(); ok(!success && err == ERROR_NO_DATA, - "overlapped WriteFile on disconnected pipe returned %u, err=%i\n", success, err); + "overlapped WriteFile on disconnected pipe returned %u, err=%li\n", success, err);
/* No completion status is queued on immediate error. */ SetLastError(ERROR_SUCCESS); @@ -1211,7 +1212,7 @@ static DWORD CALLBACK serverThreadMain4(LPVOID arg) &oResult, 0); err = GetLastError(); ok(!success && err == WAIT_TIMEOUT && !oResult, - "WriteFile GetQueuedCompletionStatus returned %u, err=%i, oResult %p\n", + "WriteFile GetQueuedCompletionStatus returned %u, err=%li, oResult %p\n", success, err, oResult);
if (winetest_debug > 1) trace("Server reading from disconnected pipe...\n"); @@ -1220,7 +1221,7 @@ static DWORD CALLBACK serverThreadMain4(LPVOID arg) if (winetest_debug > 1) trace("Server ReadFile from disconnected pipe returned...\n"); err = GetLastError(); ok(!success && err == ERROR_BROKEN_PIPE, - "overlapped ReadFile on disconnected pipe returned %u, err=%i\n", success, err); + "overlapped ReadFile on disconnected pipe returned %u, err=%li\n", success, err);
SetLastError(ERROR_SUCCESS); oResult = (OVERLAPPED *)0xdeadbeef; @@ -1228,19 +1229,19 @@ static DWORD CALLBACK serverThreadMain4(LPVOID arg) &oResult, 0); err = GetLastError(); ok(!success && err == WAIT_TIMEOUT && !oResult, - "ReadFile GetQueuedCompletionStatus returned %u, err=%i, oResult %p\n", + "ReadFile GetQueuedCompletionStatus returned %u, err=%li, oResult %p\n", success, err, oResult);
/* finish this connection, wait for next one */ ok(FlushFileBuffers(hnp), "FlushFileBuffers\n"); success = DisconnectNamedPipe(hnp); - ok(success, "DisconnectNamedPipe failed, err %u\n", GetLastError()); + ok(success, "DisconnectNamedPipe failed, err %lu\n", GetLastError()); }
ret = CloseHandle(hnp); - ok(ret, "CloseHandle named pipe failed, err=%i\n", GetLastError()); + ok(ret, "CloseHandle named pipe failed, err=%li\n", GetLastError()); ret = CloseHandle(hcompletion); - ok(ret, "CloseHandle completion failed, err=%i\n", GetLastError()); + ok(ret, "CloseHandle completion failed, err=%li\n", GetLastError());
return 0; } @@ -1296,7 +1297,7 @@ static DWORD CALLBACK serverThreadMain5(LPVOID arg) if (winetest_debug > 1) trace("Server calling ConnectNamedPipe...\n"); success = ConnectNamedPipe(hnp, NULL); err = GetLastError(); - ok(success || (err == ERROR_PIPE_CONNECTED), "ConnectNamedPipe failed: %d\n", err); + ok(success || (err == ERROR_PIPE_CONNECTED), "ConnectNamedPipe failed: %ld\n", err); if (winetest_debug > 1) trace("ConnectNamedPipe operation complete.\n");
/* Echo bytes once */ @@ -1307,7 +1308,7 @@ static DWORD CALLBACK serverThreadMain5(LPVOID arg) ResetEvent(hEvent); success = ReadFileEx(hnp, buf, sizeof(buf), &oOverlap, completion_routine); if (winetest_debug > 1) trace("Server ReadFileEx returned...\n"); - ok(success, "ReadFileEx failed, err=%i\n", GetLastError()); + ok(success, "ReadFileEx failed, err=%li\n", GetLastError()); ok(completion_called == 0, "completion routine called before ReadFileEx return\n"); if (winetest_debug > 1) trace("ReadFileEx returned.\n"); if (success) { @@ -1315,10 +1316,10 @@ static DWORD CALLBACK serverThreadMain5(LPVOID arg) do { ret = WaitForSingleObjectEx(hEvent, INFINITE, TRUE); } while (ret == WAIT_IO_COMPLETION); - ok(ret == 0, "wait ReadFileEx returned %x\n", ret); + ok(ret == 0, "wait ReadFileEx returned %lx\n", ret); } ok(completion_called == 1, "completion routine called %i times\n", completion_called); - ok(completion_errorcode == ERROR_SUCCESS, "completion routine got error %d\n", completion_errorcode); + ok(completion_errorcode == ERROR_SUCCESS, "completion routine got error %ld\n", completion_errorcode); ok(completion_num_bytes != 0, "read 0 bytes\n"); ok(completion_lpoverlapped == &oOverlap, "got wrong overlapped pointer %p\n", completion_lpoverlapped); readden = completion_num_bytes; @@ -1329,7 +1330,7 @@ static DWORD CALLBACK serverThreadMain5(LPVOID arg) ResetEvent(hEvent); success = WriteFileEx(hnp, buf, readden, &oOverlap, completion_routine); if (winetest_debug > 1) trace("Server WriteFileEx returned...\n"); - ok(success, "WriteFileEx failed, err=%i\n", GetLastError()); + ok(success, "WriteFileEx failed, err=%li\n", GetLastError()); ok(completion_called == 0, "completion routine called before ReadFileEx return\n"); if (winetest_debug > 1) trace("overlapped WriteFile returned.\n"); if (success) { @@ -1337,12 +1338,12 @@ static DWORD CALLBACK serverThreadMain5(LPVOID arg) do { ret = WaitForSingleObjectEx(hEvent, INFINITE, TRUE); } while (ret == WAIT_IO_COMPLETION); - ok(ret == 0, "wait WriteFileEx returned %x\n", ret); + ok(ret == 0, "wait WriteFileEx returned %lx\n", ret); } if (winetest_debug > 1) trace("Server done writing.\n"); ok(completion_called == 1, "completion routine called %i times\n", completion_called); - ok(completion_errorcode == ERROR_SUCCESS, "completion routine got error %d\n", completion_errorcode); - ok(completion_num_bytes == readden, "read %i bytes wrote %i\n", readden, completion_num_bytes); + ok(completion_errorcode == ERROR_SUCCESS, "completion routine got error %ld\n", completion_errorcode); + ok(completion_num_bytes == readden, "read %li bytes wrote %li\n", readden, completion_num_bytes); ok(completion_lpoverlapped == &oOverlap, "got wrong overlapped pointer %p\n", completion_lpoverlapped);
/* finish this connection, wait for next one */ @@ -1414,7 +1415,7 @@ static void test_NamedPipe_2(void) alarm_event = CreateEventW( NULL, TRUE, FALSE, NULL ); SetLastError(0xdeadbeef); alarmThread = CreateThread(NULL, 0, alarmThreadMain, (void *) 20000, 0, &alarmThreadId); - ok(alarmThread != NULL, "CreateThread failed: %d\n", GetLastError()); + ok(alarmThread != NULL, "CreateThread failed: %ld\n", GetLastError());
/* The servers we're about to exercise do try to clean up carefully, * but to reduce the chance of a test failure due to a pipe handle @@ -1424,31 +1425,31 @@ static void test_NamedPipe_2(void) /* Try server #1 */ SetLastError(0xdeadbeef); serverThread = CreateThread(NULL, 0, serverThreadMain1, (void *)8, 0, &serverThreadId); - ok(serverThread != NULL, "CreateThread failed: %d\n", GetLastError()); + ok(serverThread != NULL, "CreateThread failed: %ld\n", GetLastError()); exerciseServer(PIPENAME "serverThreadMain1", serverThread);
/* Try server #2 */ SetLastError(0xdeadbeef); serverThread = CreateThread(NULL, 0, serverThreadMain2, 0, 0, &serverThreadId); - ok(serverThread != NULL, "CreateThread failed: %d\n", GetLastError()); + ok(serverThread != NULL, "CreateThread failed: %ld\n", GetLastError()); exerciseServer(PIPENAME "serverThreadMain2", serverThread);
/* Try server #3 */ SetLastError(0xdeadbeef); serverThread = CreateThread(NULL, 0, serverThreadMain3, 0, 0, &serverThreadId); - ok(serverThread != NULL, "CreateThread failed: %d\n", GetLastError()); + ok(serverThread != NULL, "CreateThread failed: %ld\n", GetLastError()); exerciseServer(PIPENAME "serverThreadMain3", serverThread);
/* Try server #4 */ SetLastError(0xdeadbeef); serverThread = CreateThread(NULL, 0, serverThreadMain4, 0, 0, &serverThreadId); - ok(serverThread != NULL, "CreateThread failed: %d\n", GetLastError()); + ok(serverThread != NULL, "CreateThread failed: %ld\n", GetLastError()); exerciseServer(PIPENAME "serverThreadMain4", serverThread);
/* Try server #5 */ SetLastError(0xdeadbeef); serverThread = CreateThread(NULL, 0, serverThreadMain5, 0, 0, &serverThreadId); - ok(serverThread != NULL, "CreateThread failed: %d\n", GetLastError()); + ok(serverThread != NULL, "CreateThread failed: %ld\n", GetLastError()); exerciseServer(PIPENAME "serverThreadMain5", serverThread);
ok(SetEvent( alarm_event ), "SetEvent\n"); @@ -1512,13 +1513,13 @@ static int test_DisconnectNamedPipe(void) ok(!DisconnectNamedPipe(hnp) && GetLastError() == ERROR_PIPE_NOT_CONNECTED, "DisconnectNamedPipe worked twice\n"); ret = WaitForSingleObject(hFile, 0); - ok(ret == WAIT_TIMEOUT, "WaitForSingleObject returned %X\n", ret); + ok(ret == WAIT_TIMEOUT, "WaitForSingleObject returned %lX\n", ret);
ret = PeekNamedPipe(hFile, NULL, 0, NULL, &readden, NULL); - ok(!ret && GetLastError() == ERROR_PIPE_NOT_CONNECTED, "PeekNamedPipe returned %x (%u)\n", + ok(!ret && GetLastError() == ERROR_PIPE_NOT_CONNECTED, "PeekNamedPipe returned %lx (%lu)\n", ret, GetLastError()); ret = PeekNamedPipe(hnp, NULL, 0, NULL, &readden, NULL); - ok(!ret && GetLastError() == ERROR_BAD_PIPE, "PeekNamedPipe returned %x (%u)\n", + ok(!ret && GetLastError() == ERROR_BAD_PIPE, "PeekNamedPipe returned %lx (%lu)\n", ret, GetLastError()); ok(CloseHandle(hFile), "CloseHandle\n"); } @@ -1553,20 +1554,20 @@ static void test_CreatePipe(void) | FILE_WRITE_DATA);
ok(WriteFile(pipewrite,PIPENAME,sizeof(PIPENAME), &written, NULL), "Write to anonymous pipe failed\n"); - ok(written == sizeof(PIPENAME), "Write to anonymous pipe wrote %d bytes\n", written); + ok(written == sizeof(PIPENAME), "Write to anonymous pipe wrote %ld bytes\n", written); ok(ReadFile(piperead,readbuf,sizeof(readbuf),&read, NULL), "Read from non empty pipe failed\n"); - ok(read == sizeof(PIPENAME), "Read from anonymous pipe got %d bytes\n", read); + ok(read == sizeof(PIPENAME), "Read from anonymous pipe got %ld bytes\n", read); ok(CloseHandle(pipewrite), "CloseHandle for the write pipe failed\n"); ok(CloseHandle(piperead), "CloseHandle for the read pipe failed\n");
/* Now write another chunk*/ ok(CreatePipe(&piperead, &pipewrite, &pipe_attr, 0) != 0, "CreatePipe failed\n"); ok(WriteFile(pipewrite,PIPENAME,sizeof(PIPENAME), &written, NULL), "Write to anonymous pipe failed\n"); - ok(written == sizeof(PIPENAME), "Write to anonymous pipe wrote %d bytes\n", written); + ok(written == sizeof(PIPENAME), "Write to anonymous pipe wrote %ld bytes\n", written); /* and close the write end, read should still succeed*/ ok(CloseHandle(pipewrite), "CloseHandle for the Write Pipe failed\n"); ok(ReadFile(piperead,readbuf,sizeof(readbuf),&read, NULL), "Read from broken pipe with pending data failed\n"); - ok(read == sizeof(PIPENAME), "Read from anonymous pipe got %d bytes\n", read); + ok(read == sizeof(PIPENAME), "Read from anonymous pipe got %ld bytes\n", read); /* But now we need to get informed that the pipe is closed */ ok(ReadFile(piperead,readbuf,sizeof(readbuf),&read, NULL) == 0, "Broken pipe not detected\n"); ok(CloseHandle(piperead), "CloseHandle for the read pipe failed\n"); @@ -1577,13 +1578,13 @@ static void test_CreatePipe(void) for (i = 0; i < size; i++) buffer[i] = i; ok(CreatePipe(&piperead, &pipewrite, &pipe_attr, (size + 24)) != 0, "CreatePipe failed\n"); ok(WriteFile(pipewrite, buffer, size, &written, NULL), "Write to anonymous pipe failed\n"); - ok(written == size, "Write to anonymous pipe wrote %d bytes\n", written); + ok(written == size, "Write to anonymous pipe wrote %ld bytes\n", written); /* and close the write end, read should still succeed*/ ok(CloseHandle(pipewrite), "CloseHandle for the Write Pipe failed\n"); memset( buffer, 0, size ); ok(ReadFile(piperead, buffer, size, &read, NULL), "Read from broken pipe with pending data failed\n"); - ok(read == size, "Read from anonymous pipe got %d bytes\n", read); - for (i = 0; i < size; i++) ok( buffer[i] == (BYTE)i, "invalid data %x at %x\n", buffer[i], i ); + ok(read == size, "Read from anonymous pipe got %ld bytes\n", read); + for (i = 0; i < size; i++) ok( buffer[i] == (BYTE)i, "invalid data %x at %lx\n", buffer[i], i ); /* But now we need to get informed that the pipe is closed */ ok(ReadFile(piperead,readbuf,sizeof(readbuf),&read, NULL) == 0, "Broken pipe not detected\n"); ok(CloseHandle(piperead), "CloseHandle for the read pipe failed\n"); @@ -1610,107 +1611,107 @@ static void test_CloseHandle(void) hpipe = CreateNamedPipeA(PIPENAME, PIPE_ACCESS_DUPLEX, PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, 1, 1024, 1024, NMPWAIT_USE_DEFAULT_WAIT, NULL); - ok(hpipe != INVALID_HANDLE_VALUE, "CreateNamedPipe failed with %u\n", GetLastError()); + ok(hpipe != INVALID_HANDLE_VALUE, "CreateNamedPipe failed with %lu\n", GetLastError());
hfile = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "CreateFile failed with %u\n", GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "CreateFile failed with %lu\n", GetLastError());
numbytes = 0xdeadbeef; ret = WriteFile(hpipe, testdata, sizeof(testdata), &numbytes, NULL); - ok(ret, "WriteFile failed with %u\n", GetLastError()); - ok(numbytes == sizeof(testdata), "expected sizeof(testdata), got %u\n", numbytes); + ok(ret, "WriteFile failed with %lu\n", GetLastError()); + ok(numbytes == sizeof(testdata), "expected sizeof(testdata), got %lu\n", numbytes);
numbytes = 0xdeadbeef; ret = PeekNamedPipe(hfile, NULL, 0, NULL, &numbytes, NULL); - ok(ret, "PeekNamedPipe failed with %u\n", GetLastError()); - ok(numbytes == sizeof(testdata), "expected sizeof(testdata), got %u\n", numbytes); + ok(ret, "PeekNamedPipe failed with %lu\n", GetLastError()); + ok(numbytes == sizeof(testdata), "expected sizeof(testdata), got %lu\n", numbytes);
ret = CloseHandle(hpipe); - ok(ret, "CloseHandle failed with %u\n", GetLastError()); + ok(ret, "CloseHandle failed with %lu\n", GetLastError());
numbytes = 0xdeadbeef; memset(buffer, 0, sizeof(buffer)); ret = ReadFile(hfile, buffer, 0, &numbytes, NULL); - ok(ret, "ReadFile failed with %u\n", GetLastError()); - ok(numbytes == 0, "expected 0, got %u\n", numbytes); + ok(ret, "ReadFile failed with %lu\n", GetLastError()); + ok(numbytes == 0, "expected 0, got %lu\n", numbytes);
numbytes = 0xdeadbeef; ret = PeekNamedPipe(hfile, NULL, 0, NULL, &numbytes, NULL); - ok(ret, "PeekNamedPipe failed with %u\n", GetLastError()); - ok(numbytes == sizeof(testdata), "expected sizeof(testdata), got %u\n", numbytes); + ok(ret, "PeekNamedPipe failed with %lu\n", GetLastError()); + ok(numbytes == sizeof(testdata), "expected sizeof(testdata), got %lu\n", numbytes);
numbytes = 0xdeadbeef; memset(buffer, 0, sizeof(buffer)); ret = ReadFile(hfile, buffer, sizeof(buffer), &numbytes, NULL); - ok(ret, "ReadFile failed with %u\n", GetLastError()); - ok(numbytes == sizeof(testdata), "expected sizeof(testdata), got %u\n", numbytes); + ok(ret, "ReadFile failed with %lu\n", GetLastError()); + ok(numbytes == sizeof(testdata), "expected sizeof(testdata), got %lu\n", numbytes);
ret = GetNamedPipeHandleStateA(hfile, &state, NULL, NULL, NULL, NULL, 0); - ok(ret, "GetNamedPipeHandleState failed with %u\n", GetLastError()); + ok(ret, "GetNamedPipeHandleState failed with %lu\n", GetLastError()); state = PIPE_READMODE_MESSAGE | PIPE_WAIT; ret = SetNamedPipeHandleState(hfile, &state, NULL, NULL); - ok(ret, "SetNamedPipeHandleState failed with %u\n", GetLastError()); + ok(ret, "SetNamedPipeHandleState failed with %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = ReadFile(hfile, buffer, 0, &numbytes, NULL); ok(!ret, "ReadFile unexpectedly succeeded\n"); - ok(GetLastError() == ERROR_BROKEN_PIPE, "expected ERROR_BROKEN_PIPE, got %u\n", GetLastError()); + ok(GetLastError() == ERROR_BROKEN_PIPE, "expected ERROR_BROKEN_PIPE, got %lu\n", GetLastError());
numbytes = 0xdeadbeef; ret = PeekNamedPipe(hfile, NULL, 0, NULL, &numbytes, NULL); - ok(!ret && GetLastError() == ERROR_BROKEN_PIPE, "PeekNamedPipe returned %x (%u)\n", + ok(!ret && GetLastError() == ERROR_BROKEN_PIPE, "PeekNamedPipe returned %x (%lu)\n", ret, GetLastError()); - ok(numbytes == 0xdeadbeef, "numbytes = %u\n", numbytes); + ok(numbytes == 0xdeadbeef, "numbytes = %lu\n", numbytes);
SetLastError(0xdeadbeef); ret = WriteFile(hfile, testdata, sizeof(testdata), &numbytes, NULL); ok(!ret, "WriteFile unexpectedly succeeded\n"); - ok(GetLastError() == ERROR_NO_DATA, "expected ERROR_NO_DATA, got %u\n", GetLastError()); + ok(GetLastError() == ERROR_NO_DATA, "expected ERROR_NO_DATA, got %lu\n", GetLastError());
CloseHandle(hfile);
hpipe = CreateNamedPipeA(PIPENAME, PIPE_ACCESS_DUPLEX, PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, 1, 1024, 1024, NMPWAIT_USE_DEFAULT_WAIT, NULL); - ok(hpipe != INVALID_HANDLE_VALUE, "CreateNamedPipe failed with %u\n", GetLastError()); + ok(hpipe != INVALID_HANDLE_VALUE, "CreateNamedPipe failed with %lu\n", GetLastError());
hfile = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "CreateFile failed with %u\n", GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "CreateFile failed with %lu\n", GetLastError());
numbytes = 0xdeadbeef; ret = WriteFile(hpipe, testdata, 0, &numbytes, NULL); - ok(ret, "WriteFile failed with %u\n", GetLastError()); - ok(numbytes == 0, "expected 0, got %u\n", numbytes); + ok(ret, "WriteFile failed with %lu\n", GetLastError()); + ok(numbytes == 0, "expected 0, got %lu\n", numbytes);
ret = CloseHandle(hpipe); - ok(ret, "CloseHandle failed with %u\n", GetLastError()); + ok(ret, "CloseHandle failed with %lu\n", GetLastError());
numbytes = 0xdeadbeef; memset(buffer, 0, sizeof(buffer)); ret = ReadFile(hfile, buffer, sizeof(buffer), &numbytes, NULL); - ok(ret, "ReadFile failed with %u\n", GetLastError()); - ok(numbytes == 0, "expected 0, got %u\n", numbytes); + ok(ret, "ReadFile failed with %lu\n", GetLastError()); + ok(numbytes == 0, "expected 0, got %lu\n", numbytes);
SetLastError(0xdeadbeef); ret = ReadFile(hfile, buffer, 0, &numbytes, NULL); ok(!ret, "ReadFile unexpectedly succeeded\n"); - ok(GetLastError() == ERROR_BROKEN_PIPE, "expected ERROR_BROKEN_PIPE, got %u\n", GetLastError()); + ok(GetLastError() == ERROR_BROKEN_PIPE, "expected ERROR_BROKEN_PIPE, got %lu\n", GetLastError());
ret = GetNamedPipeHandleStateA(hfile, &state, NULL, NULL, NULL, NULL, 0); - ok(ret, "GetNamedPipeHandleState failed with %u\n", GetLastError()); + ok(ret, "GetNamedPipeHandleState failed with %lu\n", GetLastError()); state = PIPE_READMODE_MESSAGE | PIPE_WAIT; ret = SetNamedPipeHandleState(hfile, &state, NULL, NULL); - ok(ret, "SetNamedPipeHandleState failed with %u\n", GetLastError()); + ok(ret, "SetNamedPipeHandleState failed with %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = ReadFile(hfile, buffer, 0, &numbytes, NULL); ok(!ret, "ReadFile unexpectedly succeeded\n"); - ok(GetLastError() == ERROR_BROKEN_PIPE, "expected ERROR_BROKEN_PIPE, got %u\n", GetLastError()); + ok(GetLastError() == ERROR_BROKEN_PIPE, "expected ERROR_BROKEN_PIPE, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = WriteFile(hfile, testdata, sizeof(testdata), &numbytes, NULL); ok(!ret, "WriteFile unexpectedly succeeded\n"); - ok(GetLastError() == ERROR_NO_DATA, "expected ERROR_NO_DATA, got %u\n", GetLastError()); + ok(GetLastError() == ERROR_NO_DATA, "expected ERROR_NO_DATA, got %lu\n", GetLastError());
CloseHandle(hfile);
@@ -1719,108 +1720,108 @@ static void test_CloseHandle(void) hpipe = CreateNamedPipeA(PIPENAME, PIPE_ACCESS_DUPLEX, PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, 1, 1024, 1024, NMPWAIT_USE_DEFAULT_WAIT, NULL); - ok(hpipe != INVALID_HANDLE_VALUE, "CreateNamedPipe failed with %u\n", GetLastError()); + ok(hpipe != INVALID_HANDLE_VALUE, "CreateNamedPipe failed with %lu\n", GetLastError());
hfile = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "CreateFile failed with %u\n", GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "CreateFile failed with %lu\n", GetLastError());
numbytes = 0xdeadbeef; ret = WriteFile(hfile, testdata, sizeof(testdata), &numbytes, NULL); - ok(ret, "WriteFile failed with %u\n", GetLastError()); - ok(numbytes == sizeof(testdata), "expected sizeof(testdata), got %u\n", numbytes); + ok(ret, "WriteFile failed with %lu\n", GetLastError()); + ok(numbytes == sizeof(testdata), "expected sizeof(testdata), got %lu\n", numbytes);
numbytes = 0xdeadbeef; ret = PeekNamedPipe(hpipe, NULL, 0, NULL, &numbytes, NULL); - ok(ret, "PeekNamedPipe failed with %u\n", GetLastError()); - ok(numbytes == sizeof(testdata), "expected sizeof(testdata), got %u\n", numbytes); + ok(ret, "PeekNamedPipe failed with %lu\n", GetLastError()); + ok(numbytes == sizeof(testdata), "expected sizeof(testdata), got %lu\n", numbytes);
ret = CloseHandle(hfile); - ok(ret, "CloseHandle failed with %u\n", GetLastError()); + ok(ret, "CloseHandle failed with %lu\n", GetLastError());
numbytes = 0xdeadbeef; memset(buffer, 0, sizeof(buffer)); ret = ReadFile(hpipe, buffer, 0, &numbytes, NULL); ok(ret || GetLastError() == ERROR_MORE_DATA /* >= Win 8 */, - "ReadFile failed with %u\n", GetLastError()); - ok(numbytes == 0, "expected 0, got %u\n", numbytes); + "ReadFile failed with %lu\n", GetLastError()); + ok(numbytes == 0, "expected 0, got %lu\n", numbytes);
numbytes = 0xdeadbeef; ret = PeekNamedPipe(hpipe, NULL, 0, NULL, &numbytes, NULL); - ok(ret, "PeekNamedPipe failed with %u\n", GetLastError()); - ok(numbytes == sizeof(testdata), "expected sizeof(testdata), got %u\n", numbytes); + ok(ret, "PeekNamedPipe failed with %lu\n", GetLastError()); + ok(numbytes == sizeof(testdata), "expected sizeof(testdata), got %lu\n", numbytes);
numbytes = 0xdeadbeef; memset(buffer, 0, sizeof(buffer)); ret = ReadFile(hpipe, buffer, sizeof(buffer), &numbytes, NULL); - ok(ret, "ReadFile failed with %u\n", GetLastError()); - ok(numbytes == sizeof(testdata), "expected sizeof(testdata), got %u\n", numbytes); + ok(ret, "ReadFile failed with %lu\n", GetLastError()); + ok(numbytes == sizeof(testdata), "expected sizeof(testdata), got %lu\n", numbytes);
ret = GetNamedPipeHandleStateA(hpipe, &state, NULL, NULL, NULL, NULL, 0); - ok(ret, "GetNamedPipeHandleState failed with %u\n", GetLastError()); + ok(ret, "GetNamedPipeHandleState failed with %lu\n", GetLastError()); state = PIPE_READMODE_MESSAGE | PIPE_WAIT; ret = SetNamedPipeHandleState(hpipe, &state, NULL, NULL); - ok(ret, "SetNamedPipeHandleState failed with %u\n", GetLastError()); + ok(ret, "SetNamedPipeHandleState failed with %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = ReadFile(hpipe, buffer, 0, &numbytes, NULL); ok(!ret, "ReadFile unexpectedly succeeded\n"); - ok(GetLastError() == ERROR_BROKEN_PIPE, "expected ERROR_BROKEN_PIPE, got %u\n", GetLastError()); + ok(GetLastError() == ERROR_BROKEN_PIPE, "expected ERROR_BROKEN_PIPE, got %lu\n", GetLastError());
numbytes = 0xdeadbeef; ret = PeekNamedPipe(hpipe, NULL, 0, NULL, &numbytes, NULL); - ok(!ret && GetLastError() == ERROR_BROKEN_PIPE, "PeekNamedPipe returned %x (%u)\n", + ok(!ret && GetLastError() == ERROR_BROKEN_PIPE, "PeekNamedPipe returned %x (%lu)\n", ret, GetLastError()); - ok(numbytes == 0xdeadbeef, "numbytes = %u\n", numbytes); + ok(numbytes == 0xdeadbeef, "numbytes = %lu\n", numbytes);
SetLastError(0xdeadbeef); ret = WriteFile(hpipe, testdata, sizeof(testdata), &numbytes, NULL); ok(!ret, "WriteFile unexpectedly succeeded\n"); - ok(GetLastError() == ERROR_NO_DATA, "expected ERROR_NO_DATA, got %u\n", GetLastError()); + ok(GetLastError() == ERROR_NO_DATA, "expected ERROR_NO_DATA, got %lu\n", GetLastError());
CloseHandle(hpipe);
hpipe = CreateNamedPipeA(PIPENAME, PIPE_ACCESS_DUPLEX, PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, 1, 1024, 1024, NMPWAIT_USE_DEFAULT_WAIT, NULL); - ok(hpipe != INVALID_HANDLE_VALUE, "CreateNamedPipe failed with %u\n", GetLastError()); + ok(hpipe != INVALID_HANDLE_VALUE, "CreateNamedPipe failed with %lu\n", GetLastError());
hfile = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "CreateFile failed with %u\n", GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "CreateFile failed with %lu\n", GetLastError());
numbytes = 0xdeadbeef; ret = WriteFile(hfile, testdata, 0, &numbytes, NULL); - ok(ret, "WriteFile failed with %u\n", GetLastError()); - ok(numbytes == 0, "expected 0, got %u\n", numbytes); + ok(ret, "WriteFile failed with %lu\n", GetLastError()); + ok(numbytes == 0, "expected 0, got %lu\n", numbytes);
ret = CloseHandle(hfile); - ok(ret, "CloseHandle failed with %u\n", GetLastError()); + ok(ret, "CloseHandle failed with %lu\n", GetLastError());
numbytes = 0xdeadbeef; memset(buffer, 0, sizeof(buffer)); ret = ReadFile(hpipe, buffer, sizeof(buffer), &numbytes, NULL); - ok(ret, "ReadFile failed with %u\n", GetLastError()); - ok(numbytes == 0, "expected 0, got %u\n", numbytes); + ok(ret, "ReadFile failed with %lu\n", GetLastError()); + ok(numbytes == 0, "expected 0, got %lu\n", numbytes);
SetLastError(0xdeadbeef); ret = ReadFile(hpipe, buffer, 0, &numbytes, NULL); ok(!ret, "ReadFile unexpectedly succeeded\n"); - ok(GetLastError() == ERROR_BROKEN_PIPE, "expected ERROR_BROKEN_PIPE, got %u\n", GetLastError()); + ok(GetLastError() == ERROR_BROKEN_PIPE, "expected ERROR_BROKEN_PIPE, got %lu\n", GetLastError());
ret = GetNamedPipeHandleStateA(hpipe, &state, NULL, NULL, NULL, NULL, 0); - ok(ret, "GetNamedPipeHandleState failed with %u\n", GetLastError()); + ok(ret, "GetNamedPipeHandleState failed with %lu\n", GetLastError()); state = PIPE_READMODE_MESSAGE | PIPE_WAIT; ret = SetNamedPipeHandleState(hpipe, &state, NULL, NULL); - ok(ret, "SetNamedPipeHandleState failed with %u\n", GetLastError()); + ok(ret, "SetNamedPipeHandleState failed with %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = ReadFile(hpipe, buffer, 0, &numbytes, NULL); ok(!ret, "ReadFile unexpectedly succeeded\n"); - ok(GetLastError() == ERROR_BROKEN_PIPE, "expected ERROR_BROKEN_PIPE, got %u\n", GetLastError()); + ok(GetLastError() == ERROR_BROKEN_PIPE, "expected ERROR_BROKEN_PIPE, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = WriteFile(hpipe, testdata, sizeof(testdata), &numbytes, NULL); ok(!ret, "WriteFile unexpectedly succeeded\n"); - ok(GetLastError() == ERROR_NO_DATA, "expected ERROR_NO_DATA, got %u\n", GetLastError()); + ok(GetLastError() == ERROR_NO_DATA, "expected ERROR_NO_DATA, got %lu\n", GetLastError());
CloseHandle(hpipe); } @@ -1851,10 +1852,10 @@ static DWORD CALLBACK named_pipe_client_func(LPVOID p) /* modify the token so we can tell if the pipe impersonation * token reverts to the process token */ ret = AdjustTokenPrivileges(params->token, TRUE, NULL, 0, NULL, NULL); - ok(ret, "AdjustTokenPrivileges failed with error %d\n", GetLastError()); + ok(ret, "AdjustTokenPrivileges failed with error %ld\n", GetLastError()); } ret = SetThreadToken(NULL, params->token); - ok(ret, "SetThreadToken failed with error %d\n", GetLastError()); + ok(ret, "SetThreadToken failed with error %ld\n", GetLastError()); } else { @@ -1862,40 +1863,40 @@ static DWORD CALLBACK named_pipe_client_func(LPVOID p) HANDLE process_token;
ret = OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY|TOKEN_ADJUST_PRIVILEGES, &process_token); - ok(ret, "OpenProcessToken failed with error %d\n", GetLastError()); + ok(ret, "OpenProcessToken failed with error %ld\n", GetLastError());
ret = GetTokenInformation(process_token, TokenPrivileges, NULL, 0, &Size); - ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetTokenInformation(TokenPrivileges) failed with %d\n", GetLastError()); + ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetTokenInformation(TokenPrivileges) failed with %ld\n", GetLastError()); Privileges = HeapAlloc(GetProcessHeap(), 0, Size); ret = GetTokenInformation(process_token, TokenPrivileges, Privileges, Size, &Size); - ok(ret, "GetTokenInformation(TokenPrivileges) failed with %d\n", GetLastError()); + ok(ret, "GetTokenInformation(TokenPrivileges) failed with %ld\n", GetLastError());
ret = AdjustTokenPrivileges(process_token, TRUE, NULL, 0, NULL, NULL); - ok(ret, "AdjustTokenPrivileges failed with error %d\n", GetLastError()); + ok(ret, "AdjustTokenPrivileges failed with error %ld\n", GetLastError());
CloseHandle(process_token); }
pipe = CreateFileA(PIPE_NAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, params->security_flags, NULL); - ok(pipe != INVALID_HANDLE_VALUE, "CreateFile for pipe failed with error %d\n", GetLastError()); + ok(pipe != INVALID_HANDLE_VALUE, "CreateFile for pipe failed with error %ld\n", GetLastError());
ret = WriteFile(pipe, message, sizeof(message), &bytes_written, NULL); - ok(ret, "WriteFile failed with error %d\n", GetLastError()); + ok(ret, "WriteFile failed with error %ld\n", GetLastError());
ret = ReadFile(pipe, &dummy, sizeof(dummy), &bytes_read, NULL); - ok(ret, "ReadFile failed with error %d\n", GetLastError()); + ok(ret, "ReadFile failed with error %ld\n", GetLastError());
if (params->token) { if (params->revert) { ret = RevertToSelf(); - ok(ret, "RevertToSelf failed with error %d\n", GetLastError()); + ok(ret, "RevertToSelf failed with error %ld\n", GetLastError()); } else { ret = AdjustTokenPrivileges(params->token, TRUE, NULL, 0, NULL, NULL); - ok(ret, "AdjustTokenPrivileges failed with error %d\n", GetLastError()); + ok(ret, "AdjustTokenPrivileges failed with error %ld\n", GetLastError()); } } else @@ -1903,10 +1904,10 @@ static DWORD CALLBACK named_pipe_client_func(LPVOID p) HANDLE process_token;
ret = OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &process_token); - ok(ret, "OpenProcessToken failed with error %d\n", GetLastError()); + ok(ret, "OpenProcessToken failed with error %ld\n", GetLastError());
ret = AdjustTokenPrivileges(process_token, FALSE, Privileges, 0, NULL, NULL); - ok(ret, "AdjustTokenPrivileges failed with error %d\n", GetLastError()); + ok(ret, "AdjustTokenPrivileges failed with error %ld\n", GetLastError());
HeapFree(GetProcessHeap(), 0, Privileges);
@@ -1914,10 +1915,10 @@ static DWORD CALLBACK named_pipe_client_func(LPVOID p) }
ret = WriteFile(pipe, message, sizeof(message), &bytes_written, NULL); - ok(ret, "WriteFile failed with error %d\n", GetLastError()); + ok(ret, "WriteFile failed with error %ld\n", GetLastError());
ret = ReadFile(pipe, &dummy, sizeof(dummy), &bytes_read, NULL); - ok(ret, "ReadFile failed with error %d\n", GetLastError()); + ok(ret, "ReadFile failed with error %ld\n", GetLastError());
CloseHandle(pipe);
@@ -1931,10 +1932,10 @@ static HANDLE make_impersonation_token(DWORD Access, SECURITY_IMPERSONATION_LEVE BOOL ret;
ret = OpenProcessToken(GetCurrentProcess(), TOKEN_DUPLICATE, &ProcessToken); - ok(ret, "OpenProcessToken failed with error %d\n", GetLastError()); + ok(ret, "OpenProcessToken failed with error %ld\n", GetLastError());
ret = pDuplicateTokenEx(ProcessToken, Access, NULL, ImpersonationLevel, TokenImpersonation, &Token); - ok(ret, "DuplicateToken failed with error %d\n", GetLastError()); + ok(ret, "DuplicateToken failed with error %ld\n", GetLastError());
CloseHandle(ProcessToken);
@@ -1958,37 +1959,37 @@ static void test_ImpersonateNamedPipeClient(HANDLE hClientToken, DWORD security_ DWORD size;
hPipeServer = CreateNamedPipeA(PIPE_NAME, PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT, 1, 100, 100, NMPWAIT_USE_DEFAULT_WAIT, NULL); - ok(hPipeServer != INVALID_HANDLE_VALUE, "CreateNamedPipe failed with error %d\n", GetLastError()); + ok(hPipeServer != INVALID_HANDLE_VALUE, "CreateNamedPipe failed with error %ld\n", GetLastError());
params.security_flags = security_flags; params.token = hClientToken; params.revert = revert; hThread = CreateThread(NULL, 0, named_pipe_client_func, ¶ms, 0, &dwTid); - ok(hThread != NULL, "CreateThread failed with error %d\n", GetLastError()); + ok(hThread != NULL, "CreateThread failed with error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = ImpersonateNamedPipeClient(hPipeServer); error = GetLastError(); ok(ret /* win2k3 */ || (error == ERROR_CANNOT_IMPERSONATE), - "ImpersonateNamedPipeClient should have failed with ERROR_CANNOT_IMPERSONATE instead of %d\n", GetLastError()); + "ImpersonateNamedPipeClient should have failed with ERROR_CANNOT_IMPERSONATE instead of %ld\n", GetLastError());
ret = ConnectNamedPipe(hPipeServer, NULL); - ok(ret || (GetLastError() == ERROR_PIPE_CONNECTED), "ConnectNamedPipe failed with error %d\n", GetLastError()); + ok(ret || (GetLastError() == ERROR_PIPE_CONNECTED), "ConnectNamedPipe failed with error %ld\n", GetLastError());
ret = ReadFile(hPipeServer, buffer, sizeof(buffer), &dwBytesRead, NULL); - ok(ret, "ReadFile failed with error %d\n", GetLastError()); + ok(ret, "ReadFile failed with error %ld\n", GetLastError());
ret = ImpersonateNamedPipeClient(hPipeServer); - ok(ret, "ImpersonateNamedPipeClient failed with error %d\n", GetLastError()); + ok(ret, "ImpersonateNamedPipeClient failed with error %ld\n", GetLastError());
ret = OpenThreadToken(GetCurrentThread(), TOKEN_QUERY, FALSE, &hToken); - ok(ret, "OpenThreadToken failed with error %d\n", GetLastError()); + ok(ret, "OpenThreadToken failed with error %ld\n", GetLastError());
(*test_func)(0, hToken);
ImpersonationLevel = 0xdeadbeef; /* to avoid false positives */ ret = GetTokenInformation(hToken, TokenImpersonationLevel, &ImpersonationLevel, sizeof(ImpersonationLevel), &size); - ok(ret, "GetTokenInformation(TokenImpersonationLevel) failed with error %d\n", GetLastError()); + ok(ret, "GetTokenInformation(TokenImpersonationLevel) failed with error %ld\n", GetLastError()); ok(ImpersonationLevel == SecurityImpersonation, "ImpersonationLevel should have been SecurityImpersonation(%d) instead of %d\n", SecurityImpersonation, ImpersonationLevel);
CloseHandle(hToken); @@ -1996,16 +1997,16 @@ static void test_ImpersonateNamedPipeClient(HANDLE hClientToken, DWORD security_ RevertToSelf();
ret = WriteFile(hPipeServer, &dummy, sizeof(dummy), &dwBytesWritten, NULL); - ok(ret, "WriteFile failed with error %d\n", GetLastError()); + ok(ret, "WriteFile failed with error %ld\n", GetLastError());
ret = ReadFile(hPipeServer, buffer, sizeof(buffer), &dwBytesRead, NULL); - ok(ret, "ReadFile failed with error %d\n", GetLastError()); + ok(ret, "ReadFile failed with error %ld\n", GetLastError());
ret = ImpersonateNamedPipeClient(hPipeServer); - ok(ret, "ImpersonateNamedPipeClient failed with error %d\n", GetLastError()); + ok(ret, "ImpersonateNamedPipeClient failed with error %ld\n", GetLastError());
ret = OpenThreadToken(GetCurrentThread(), TOKEN_QUERY, FALSE, &hToken); - ok(ret, "OpenThreadToken failed with error %d\n", GetLastError()); + ok(ret, "OpenThreadToken failed with error %ld\n", GetLastError());
(*test_func)(1, hToken);
@@ -2014,12 +2015,12 @@ static void test_ImpersonateNamedPipeClient(HANDLE hClientToken, DWORD security_ RevertToSelf();
ret = WriteFile(hPipeServer, &dummy, sizeof(dummy), &dwBytesWritten, NULL); - ok(ret, "WriteFile failed with error %d\n", GetLastError()); + ok(ret, "WriteFile failed with error %ld\n", GetLastError());
WaitForSingleObject(hThread, INFINITE);
ret = ImpersonateNamedPipeClient(hPipeServer); - ok(ret, "ImpersonateNamedPipeClient failed with error %d\n", GetLastError()); + ok(ret, "ImpersonateNamedPipeClient failed with error %ld\n", GetLastError());
RevertToSelf();
@@ -2085,7 +2086,7 @@ static void test_no_sqos_no_token(int call_index, HANDLE hToken) case 0: priv_count = get_privilege_count(hToken); todo_wine - ok(priv_count == 0, "privilege count should have been 0 instead of %d\n", priv_count); + ok(priv_count == 0, "privilege count should have been 0 instead of %ld\n", priv_count); break; case 1: priv_count = get_privilege_count(hToken); @@ -2167,7 +2168,7 @@ static void test_no_sqos_revert(int call_index, HANDLE hToken) case 0: priv_count = get_privilege_count(hToken); todo_wine - ok(priv_count == 0, "privilege count should have been 0 instead of %d\n", priv_count); + ok(priv_count == 0, "privilege count should have been 0 instead of %ld\n", priv_count); break; case 1: priv_count = get_privilege_count(hToken); @@ -2344,7 +2345,7 @@ static void test_overlapped(void) Sleep(1);
ret = WriteFile(pipe, "x", 1, &num, NULL); - ok(ret, "WriteFile failed with error %d\n", GetLastError()); + ok(ret, "WriteFile failed with error %ld\n", GetLastError());
WaitForSingleObject(thread, INFINITE); CloseHandle(pipe); @@ -2360,29 +2361,29 @@ static void test_overlapped_error(void) BOOL ret;
event = CreateEventA(NULL, TRUE, FALSE, NULL); - ok(event != NULL, "CreateEventA failed with %u\n", GetLastError()); + ok(event != NULL, "CreateEventA failed with %lu\n", GetLastError());
pipe = CreateNamedPipeA(PIPENAME, PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, 1, 1024, 1024, NMPWAIT_WAIT_FOREVER, NULL); - ok(pipe != INVALID_HANDLE_VALUE, "CreateNamedPipe failed with %u\n", GetLastError()); + ok(pipe != INVALID_HANDLE_VALUE, "CreateNamedPipe failed with %lu\n", GetLastError());
memset(&overlapped, 0, sizeof(overlapped)); overlapped.hEvent = event; ret = ConnectNamedPipe(pipe, &overlapped); err = GetLastError(); ok(ret == FALSE, "ConnectNamedPipe succeeded\n"); - ok(err == ERROR_IO_PENDING, "expected ERROR_IO_PENDING, got %u\n", err); + ok(err == ERROR_IO_PENDING, "expected ERROR_IO_PENDING, got %lu\n", err);
file = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, 0); - ok(file != INVALID_HANDLE_VALUE, "CreateFile failed with %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "CreateFile failed with %lu\n", GetLastError());
numbytes = 0xdeadbeef; ret = GetOverlappedResult(pipe, &overlapped, &numbytes, TRUE); ok(ret == TRUE, "GetOverlappedResult failed\n"); - ok(numbytes == 0, "expected 0, got %u\n", numbytes); - ok(overlapped.Internal == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %08lx\n", overlapped.Internal); + ok(numbytes == 0, "expected 0, got %lu\n", numbytes); + ok(overlapped.Internal == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %08Ix\n", overlapped.Internal);
CloseHandle(file); CloseHandle(pipe); @@ -2390,19 +2391,19 @@ static void test_overlapped_error(void) pipe = CreateNamedPipeA(PIPENAME, PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, 1, 1024, 1024, NMPWAIT_WAIT_FOREVER, NULL); - ok(pipe != INVALID_HANDLE_VALUE, "CreateNamedPipe failed with %u\n", GetLastError()); + ok(pipe != INVALID_HANDLE_VALUE, "CreateNamedPipe failed with %lu\n", GetLastError());
file = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, 0); - ok(file != INVALID_HANDLE_VALUE, "CreateFile failed with %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "CreateFile failed with %lu\n", GetLastError());
memset(&overlapped, 0, sizeof(overlapped)); overlapped.hEvent = event; ret = ConnectNamedPipe(pipe, &overlapped); err = GetLastError(); ok(ret == FALSE, "ConnectNamedPipe succeeded\n"); - ok(err == ERROR_PIPE_CONNECTED, "expected ERROR_PIPE_CONNECTED, got %u\n", err); - ok(overlapped.Internal == STATUS_PENDING, "expected STATUS_PENDING, got %08lx\n", overlapped.Internal); + ok(err == ERROR_PIPE_CONNECTED, "expected ERROR_PIPE_CONNECTED, got %lu\n", err); + ok(overlapped.Internal == STATUS_PENDING, "expected STATUS_PENDING, got %08Ix\n", overlapped.Internal);
CloseHandle(file); CloseHandle(pipe); @@ -2426,14 +2427,14 @@ static void test_NamedPipeHandleState(void) /* lpSecurityAttrib */ NULL); ok(server != INVALID_HANDLE_VALUE, "cf failed\n"); ret = GetNamedPipeHandleStateA(server, NULL, NULL, NULL, NULL, NULL, 0); - ok(ret, "GetNamedPipeHandleState failed: %d\n", GetLastError()); + ok(ret, "GetNamedPipeHandleState failed: %ld\n", GetLastError()); ret = GetNamedPipeHandleStateA(server, &state, &instances, NULL, NULL, NULL, 0); - ok(ret, "GetNamedPipeHandleState failed: %d\n", GetLastError()); + ok(ret, "GetNamedPipeHandleState failed: %ld\n", GetLastError()); if (ret) { - ok(state == 0, "unexpected state %08x\n", state); - ok(instances == 1, "expected 1 instances, got %d\n", instances); + ok(state == 0, "unexpected state %08lx\n", state); + ok(instances == 1, "expected 1 instances, got %ld\n", instances); } /* Some parameters have no meaning, and therefore can't be retrieved, * on a local pipe. @@ -2443,13 +2444,13 @@ static void test_NamedPipeHandleState(void) &collectDataTimeout, userName, ARRAY_SIZE(userName)); todo_wine ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); /* A byte-mode pipe server can't be changed to message mode. */ state = PIPE_READMODE_MESSAGE; SetLastError(0xdeadbeef); ret = SetNamedPipeHandleState(server, &state, NULL, NULL); ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
client = CreateFileA(PIPENAME, GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); @@ -2457,13 +2458,13 @@ static void test_NamedPipeHandleState(void)
state = PIPE_READMODE_BYTE; ret = SetNamedPipeHandleState(client, &state, NULL, NULL); - ok(ret, "SetNamedPipeHandleState failed: %d\n", GetLastError()); + ok(ret, "SetNamedPipeHandleState failed: %ld\n", GetLastError()); /* A byte-mode pipe client can't be changed to message mode, either. */ state = PIPE_READMODE_MESSAGE; SetLastError(0xdeadbeef); ret = SetNamedPipeHandleState(server, &state, NULL, NULL); ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
CloseHandle(client); CloseHandle(server); @@ -2477,21 +2478,21 @@ static void test_NamedPipeHandleState(void) /* lpSecurityAttrib */ NULL); ok(server != INVALID_HANDLE_VALUE, "cf failed\n"); ret = GetNamedPipeHandleStateA(server, NULL, NULL, NULL, NULL, NULL, 0); - ok(ret, "GetNamedPipeHandleState failed: %d\n", GetLastError()); + ok(ret, "GetNamedPipeHandleState failed: %ld\n", GetLastError()); ret = GetNamedPipeHandleStateA(server, &state, &instances, NULL, NULL, NULL, 0); - ok(ret, "GetNamedPipeHandleState failed: %d\n", GetLastError()); + ok(ret, "GetNamedPipeHandleState failed: %ld\n", GetLastError()); if (ret) { - ok(state == 0, "unexpected state %08x\n", state); - ok(instances == 1, "expected 1 instances, got %d\n", instances); + ok(state == 0, "unexpected state %08lx\n", state); + ok(instances == 1, "expected 1 instances, got %ld\n", instances); } /* In contrast to byte-mode pipes, a message-mode pipe server can be * changed to byte mode. */ state = PIPE_READMODE_BYTE; ret = SetNamedPipeHandleState(server, &state, NULL, NULL); - ok(ret, "SetNamedPipeHandleState failed: %d\n", GetLastError()); + ok(ret, "SetNamedPipeHandleState failed: %ld\n", GetLastError());
client = CreateFileA(PIPENAME, GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); @@ -2499,12 +2500,12 @@ static void test_NamedPipeHandleState(void)
state = PIPE_READMODE_MESSAGE; ret = SetNamedPipeHandleState(client, &state, NULL, NULL); - ok(ret, "SetNamedPipeHandleState failed: %d\n", GetLastError()); + ok(ret, "SetNamedPipeHandleState failed: %ld\n", GetLastError()); /* A message-mode pipe client can also be changed to byte mode. */ state = PIPE_READMODE_BYTE; ret = SetNamedPipeHandleState(client, &state, NULL, NULL); - ok(ret, "SetNamedPipeHandleState failed: %d\n", GetLastError()); + ok(ret, "SetNamedPipeHandleState failed: %ld\n", GetLastError());
CloseHandle(client); CloseHandle(server); @@ -2596,37 +2597,37 @@ static void test_readfileex_pending(void) ret = ConnectNamedPipe(server, &overlapped); err = GetLastError(); ok(ret == FALSE, "ConnectNamedPipe succeeded\n"); - ok(err == ERROR_IO_PENDING, "ConnectNamedPipe set error %i\n", err); + ok(err == ERROR_IO_PENDING, "ConnectNamedPipe set error %li\n", err);
wait = WaitForSingleObject(event, 0); - ok(wait == WAIT_TIMEOUT, "WaitForSingleObject returned %x\n", wait); + ok(wait == WAIT_TIMEOUT, "WaitForSingleObject returned %lx\n", wait);
client = CreateFileA(PIPENAME, GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); ok(client != INVALID_HANDLE_VALUE, "cf failed\n");
wait = WaitForSingleObject(event, 0); - ok(wait == WAIT_OBJECT_0, "WaitForSingleObject returned %x\n", wait); + ok(wait == WAIT_OBJECT_0, "WaitForSingleObject returned %lx\n", wait);
/* Start a read that can't complete immediately. */ completion_called = 0; ResetEvent(event); ret = ReadFileEx(server, read_buf, sizeof(read_buf), &overlapped, completion_routine); - ok(ret == TRUE, "ReadFileEx failed, err=%i\n", GetLastError()); + ok(ret == TRUE, "ReadFileEx failed, err=%li\n", GetLastError()); ok(completion_called == 0, "completion routine called before ReadFileEx returned\n");
ret = WriteFile(client, test_string, strlen(test_string), &num_bytes, NULL); ok(ret == TRUE, "WriteFile failed\n"); - ok(num_bytes == strlen(test_string), "only %i bytes written\n", num_bytes); + ok(num_bytes == strlen(test_string), "only %li bytes written\n", num_bytes);
ok(completion_called == 0, "completion routine called during WriteFile\n");
wait = WaitForSingleObjectEx(event, 0, TRUE); - ok(wait == WAIT_IO_COMPLETION || wait == WAIT_OBJECT_0, "WaitForSingleObjectEx returned %x\n", wait); + ok(wait == WAIT_IO_COMPLETION || wait == WAIT_OBJECT_0, "WaitForSingleObjectEx returned %lx\n", wait);
ok(completion_called == 1, "completion not called after writing pipe\n"); - ok(completion_errorcode == 0, "completion called with error %x\n", completion_errorcode); - ok(completion_num_bytes == strlen(test_string), "ReadFileEx returned only %d bytes\n", completion_num_bytes); + ok(completion_errorcode == 0, "completion called with error %lx\n", completion_errorcode); + ok(completion_num_bytes == strlen(test_string), "ReadFileEx returned only %ld bytes\n", completion_num_bytes); ok(completion_lpoverlapped == &overlapped, "completion called with wrong overlapped pointer\n"); ok(!memcmp(test_string, read_buf, strlen(test_string)), "ReadFileEx read wrong bytes\n");
@@ -2647,16 +2648,16 @@ static void test_readfileex_pending(void) /* write couldn't complete immediately, presumably the pipe is full */ break;
- ok(wait == WAIT_IO_COMPLETION || wait == WAIT_OBJECT_0, "WaitForSingleObject returned %x\n", wait); + ok(wait == WAIT_IO_COMPLETION || wait == WAIT_OBJECT_0, "WaitForSingleObject returned %lx\n", wait);
- ok(ret == TRUE, "WriteFileEx failed, err=%i\n", err); - ok(completion_errorcode == 0, "completion called with error %x\n", completion_errorcode); + ok(ret == TRUE, "WriteFileEx failed, err=%li\n", err); + ok(completion_errorcode == 0, "completion called with error %lx\n", completion_errorcode); ok(completion_lpoverlapped == &overlapped, "completion called with wrong overlapped pointer\n"); }
- ok(ret == TRUE, "WriteFileEx failed, err=%i\n", err); + ok(ret == TRUE, "WriteFileEx failed, err=%li\n", err); ok(completion_called == 0, "completion routine called but wait timed out\n"); - ok(completion_errorcode == 0, "completion called with error %x\n", completion_errorcode); + ok(completion_errorcode == 0, "completion called with error %lx\n", completion_errorcode); ok(completion_lpoverlapped == &overlapped, "completion called with wrong overlapped pointer\n");
/* free up some space in the pipe */ @@ -2669,20 +2670,20 @@ static void test_readfileex_pending(void)
wait = WaitForSingleObjectEx(event, 0, TRUE); ok(wait == WAIT_IO_COMPLETION || wait == WAIT_OBJECT_0 || wait == WAIT_TIMEOUT, - "WaitForSingleObject returned %x\n", wait); + "WaitForSingleObject returned %lx\n", wait); if (wait != WAIT_TIMEOUT) break; }
ok(completion_called == 1, "completion routine not called\n"); - ok(completion_errorcode == 0, "completion called with error %x\n", completion_errorcode); + ok(completion_errorcode == 0, "completion called with error %lx\n", completion_errorcode); ok(completion_lpoverlapped == &overlapped, "completion called with wrong overlapped pointer\n");
num_bytes = 0xdeadbeef; SetLastError(0xdeadbeef); ret = ReadFile(INVALID_HANDLE_VALUE, read_buf, 0, &num_bytes, NULL); ok(!ret, "ReadFile should fail\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "wrong error %u\n", GetLastError()); - ok(num_bytes == 0, "expected 0, got %u\n", num_bytes); + ok(GetLastError() == ERROR_INVALID_HANDLE, "wrong error %lu\n", GetLastError()); + ok(num_bytes == 0, "expected 0, got %lu\n", num_bytes);
S(U(overlapped)).Offset = 0; S(U(overlapped)).OffsetHigh = 0; @@ -2693,31 +2694,31 @@ static void test_readfileex_pending(void) SetLastError(0xdeadbeef); ret = ReadFile(server, read_buf, 0, &num_bytes, &overlapped); ok(!ret, "ReadFile should fail\n"); - ok(GetLastError() == ERROR_IO_PENDING, "expected ERROR_IO_PENDING, got %d\n", GetLastError()); - ok(num_bytes == 0, "bytes %u\n", num_bytes); - ok((NTSTATUS)overlapped.Internal == STATUS_PENDING, "expected STATUS_PENDING, got %#lx\n", overlapped.Internal); - ok(overlapped.InternalHigh == -1, "expected -1, got %lu\n", overlapped.InternalHigh); + ok(GetLastError() == ERROR_IO_PENDING, "expected ERROR_IO_PENDING, got %ld\n", GetLastError()); + ok(num_bytes == 0, "bytes %lu\n", num_bytes); + ok((NTSTATUS)overlapped.Internal == STATUS_PENDING, "expected STATUS_PENDING, got %#Ix\n", overlapped.Internal); + ok(overlapped.InternalHigh == -1, "expected -1, got %Iu\n", overlapped.InternalHigh);
wait = WaitForSingleObject(event, 100); - ok(wait == WAIT_TIMEOUT, "WaitForSingleObject returned %x\n", wait); + ok(wait == WAIT_TIMEOUT, "WaitForSingleObject returned %lx\n", wait);
num_bytes = 0xdeadbeef; ret = WriteFile(client, test_string, 1, &num_bytes, NULL); ok(ret, "WriteFile failed\n"); - ok(num_bytes == 1, "bytes %u\n", num_bytes); + ok(num_bytes == 1, "bytes %lu\n", num_bytes);
wait = WaitForSingleObject(event, 100); - ok(wait == WAIT_OBJECT_0, "WaitForSingleObject returned %x\n", wait); + ok(wait == WAIT_OBJECT_0, "WaitForSingleObject returned %lx\n", wait);
- ok(num_bytes == 1, "bytes %u\n", num_bytes); - ok((NTSTATUS)overlapped.Internal == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", overlapped.Internal); - ok(overlapped.InternalHigh == 0, "expected 0, got %lu\n", overlapped.InternalHigh); + ok(num_bytes == 1, "bytes %lu\n", num_bytes); + ok((NTSTATUS)overlapped.Internal == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#Ix\n", overlapped.Internal); + ok(overlapped.InternalHigh == 0, "expected 0, got %Iu\n", overlapped.InternalHigh);
/* read the pending byte and clear the pipe */ num_bytes = 0xdeadbeef; ret = ReadFile(server, read_buf, 1, &num_bytes, &overlapped); ok(ret, "ReadFile failed\n"); - ok(num_bytes == 1, "bytes %u\n", num_bytes); + ok(num_bytes == 1, "bytes %lu\n", num_bytes);
CloseHandle(client); CloseHandle(server); @@ -2735,28 +2736,28 @@ static void _test_peek_pipe(unsigned line, HANDLE pipe, DWORD expected_read, DWO BOOL r;
r = PeekNamedPipe(pipe, buf, sizeof(buf), &bytes_read, &avail, &left); - ok_(__FILE__,line)(r, "PeekNamedPipe failed: %u\n", GetLastError()); - ok_(__FILE__,line)(bytes_read == expected_read, "bytes_read = %u, expected %u\n", bytes_read, expected_read); - ok_(__FILE__,line)(avail == expected_avail, "avail = %u, expected %u\n", avail, expected_avail); - ok_(__FILE__,line)(left == expected_message_length - expected_read, "left = %d, expected %d\n", + ok_(__FILE__,line)(r, "PeekNamedPipe failed: %lu\n", GetLastError()); + ok_(__FILE__,line)(bytes_read == expected_read, "bytes_read = %lu, expected %lu\n", bytes_read, expected_read); + ok_(__FILE__,line)(avail == expected_avail, "avail = %lu, expected %lu\n", avail, expected_avail); + ok_(__FILE__,line)(left == expected_message_length - expected_read, "left = %ld, expected %ld\n", left, expected_message_length - expected_read);
status = NtFsControlFile(pipe, 0, NULL, NULL, &io, FSCTL_PIPE_PEEK, NULL, 0, buf, sizeof(buf)); - ok_(__FILE__,line)(!status || status == STATUS_PENDING, "NtFsControlFile(FSCTL_PIPE_PEEK) failed: %x\n", status); + ok_(__FILE__,line)(!status || status == STATUS_PENDING, "NtFsControlFile(FSCTL_PIPE_PEEK) failed: %lx\n", status); ok_(__FILE__,line)(io.Information == FIELD_OFFSET(FILE_PIPE_PEEK_BUFFER, Data[expected_read]), - "io.Information = %lu\n", io.Information); - ok_(__FILE__,line)(peek_buf->ReadDataAvailable == expected_avail, "ReadDataAvailable = %u, expected %u\n", + "io.Information = %Iu\n", io.Information); + ok_(__FILE__,line)(peek_buf->ReadDataAvailable == expected_avail, "ReadDataAvailable = %lu, expected %lu\n", peek_buf->ReadDataAvailable, expected_avail); - ok_(__FILE__,line)(peek_buf->MessageLength == expected_message_length, "MessageLength = %u, expected %u\n", + ok_(__FILE__,line)(peek_buf->MessageLength == expected_message_length, "MessageLength = %lu, expected %lu\n", peek_buf->MessageLength, expected_message_length);
if (expected_read) { r = PeekNamedPipe(pipe, buf, 1, &bytes_read, &avail, &left); - ok_(__FILE__,line)(r, "PeekNamedPipe failed: %u\n", GetLastError()); - ok_(__FILE__,line)(bytes_read == 1, "bytes_read = %u, expected %u\n", bytes_read, expected_read); - ok_(__FILE__,line)(avail == expected_avail, "avail = %u, expected %u\n", avail, expected_avail); - ok_(__FILE__,line)(left == expected_message_length-1, "left = %d, expected %d\n", left, expected_message_length-1); + ok_(__FILE__,line)(r, "PeekNamedPipe failed: %lu\n", GetLastError()); + ok_(__FILE__,line)(bytes_read == 1, "bytes_read = %lu, expected %lu\n", bytes_read, expected_read); + ok_(__FILE__,line)(avail == expected_avail, "avail = %lu, expected %lu\n", avail, expected_avail); + ok_(__FILE__,line)(left == expected_message_length-1, "left = %ld, expected %ld\n", left, expected_message_length-1); } }
@@ -2771,22 +2772,22 @@ static void _overlapped_read_sync(unsigned line, HANDLE reader, void *buf, DWORD overlapped.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); res = ReadFile(reader, buf, buf_size, &read_bytes, &overlapped); if (partial_read) - ok_(__FILE__,line)(!res && GetLastError() == ERROR_MORE_DATA, "ReadFile returned: %x (%u)\n", res, GetLastError()); + ok_(__FILE__,line)(!res && GetLastError() == ERROR_MORE_DATA, "ReadFile returned: %x (%lu)\n", res, GetLastError()); else - ok_(__FILE__,line)(res, "ReadFile failed: %u\n", GetLastError()); + ok_(__FILE__,line)(res, "ReadFile failed: %lu\n", GetLastError()); if(partial_read) - ok_(__FILE__,line)(!read_bytes, "read_bytes %u expected 0\n", read_bytes); + ok_(__FILE__,line)(!read_bytes, "read_bytes %lu expected 0\n", read_bytes); else - ok_(__FILE__,line)(read_bytes == expected_result, "read_bytes %u expected %u\n", read_bytes, expected_result); + ok_(__FILE__,line)(read_bytes == expected_result, "read_bytes %lu expected %lu\n", read_bytes, expected_result);
read_bytes = 0xdeadbeef; res = GetOverlappedResult(reader, &overlapped, &read_bytes, FALSE); if (partial_read) ok_(__FILE__,line)(!res && GetLastError() == ERROR_MORE_DATA, - "GetOverlappedResult returned: %x (%u)\n", res, GetLastError()); + "GetOverlappedResult returned: %x (%lu)\n", res, GetLastError()); else - ok_(__FILE__,line)(res, "GetOverlappedResult failed: %u\n", GetLastError()); - ok_(__FILE__,line)(read_bytes == expected_result, "read_bytes %u expected %u\n", read_bytes, expected_result); + ok_(__FILE__,line)(res, "GetOverlappedResult failed: %lu\n", GetLastError()); + ok_(__FILE__,line)(read_bytes == expected_result, "read_bytes %lu expected %lu\n", read_bytes, expected_result); CloseHandle(overlapped.hEvent); }
@@ -2799,8 +2800,8 @@ static void _overlapped_read_async(unsigned line, HANDLE reader, void *buf, DWOR memset(overlapped, 0, sizeof(*overlapped)); overlapped->hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); res = ReadFile(reader, buf, buf_size, &read_bytes, overlapped); - ok_(__FILE__,line)(!res && GetLastError() == ERROR_IO_PENDING, "ReadFile returned %x(%u)\n", res, GetLastError()); - ok_(__FILE__,line)(!read_bytes, "read_bytes %u expected 0\n", read_bytes); + ok_(__FILE__,line)(!res && GetLastError() == ERROR_IO_PENDING, "ReadFile returned %x(%lu)\n", res, GetLastError()); + ok_(__FILE__,line)(!read_bytes, "read_bytes %lu expected 0\n", read_bytes);
_test_not_signaled(line, overlapped->hEvent); } @@ -2815,13 +2816,13 @@ static void _overlapped_write_sync(unsigned line, HANDLE writer, void *buf, DWOR memset(&overlapped, 0, sizeof(overlapped)); overlapped.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); res = WriteFile(writer, buf, size, &written_bytes, &overlapped); - ok_(__FILE__,line)(res, "WriteFile returned %x(%u)\n", res, GetLastError()); - ok_(__FILE__,line)(written_bytes == size, "WriteFile returned written_bytes = %u\n", written_bytes); + ok_(__FILE__,line)(res, "WriteFile returned %x(%lu)\n", res, GetLastError()); + ok_(__FILE__,line)(written_bytes == size, "WriteFile returned written_bytes = %lu\n", written_bytes);
written_bytes = 0xdeadbeef; res = GetOverlappedResult(writer, &overlapped, &written_bytes, FALSE); - ok_(__FILE__,line)(res, "GetOverlappedResult failed: %u\n", GetLastError()); - ok_(__FILE__,line)(written_bytes == size, "GetOverlappedResult returned written_bytes %u expected %u\n", written_bytes, size); + ok_(__FILE__,line)(res, "GetOverlappedResult failed: %lu\n", GetLastError()); + ok_(__FILE__,line)(written_bytes == size, "GetOverlappedResult returned written_bytes %lu expected %lu\n", written_bytes, size);
CloseHandle(overlapped.hEvent); } @@ -2835,8 +2836,8 @@ static void _overlapped_write_async(unsigned line, HANDLE writer, void *buf, DWO memset(overlapped, 0, sizeof(*overlapped)); overlapped->hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); res = WriteFile(writer, buf, size, &written_bytes, overlapped); - ok_(__FILE__,line)(!res && GetLastError() == ERROR_IO_PENDING, "WriteFile returned %x(%u)\n", res, GetLastError()); - ok_(__FILE__,line)(!written_bytes, "written_bytes = %u\n", written_bytes); + ok_(__FILE__,line)(!res && GetLastError() == ERROR_IO_PENDING, "WriteFile returned %x(%lu)\n", res, GetLastError()); + ok_(__FILE__,line)(!written_bytes, "written_bytes = %lu\n", written_bytes);
_test_not_signaled(line, overlapped->hEvent); } @@ -2847,7 +2848,7 @@ static void _test_flush_sync(unsigned line, HANDLE pipe) BOOL res;
res = FlushFileBuffers(pipe); - ok_(__FILE__,line)(res, "FlushFileBuffers failed: %u\n", GetLastError()); + ok_(__FILE__,line)(res, "FlushFileBuffers failed: %lu\n", GetLastError()); }
static DWORD expected_flush_error; @@ -2859,13 +2860,13 @@ static DWORD CALLBACK flush_proc(HANDLE pipe) res = FlushFileBuffers(pipe); if (expected_flush_error == ERROR_SUCCESS) { - ok(res, "FlushFileBuffers failed: %u\n", GetLastError()); + ok(res, "FlushFileBuffers failed: %lu\n", GetLastError()); } else { ok(!res, "FlushFileBuffers should have failed\n"); ok(GetLastError() == expected_flush_error, - "FlushFileBuffers set error %u, expected %u\n", GetLastError(), expected_flush_error); + "FlushFileBuffers set error %lu, expected %lu\n", GetLastError(), expected_flush_error); } return 0; } @@ -2878,7 +2879,7 @@ static HANDLE _test_flush_async(unsigned line, HANDLE pipe, DWORD error)
expected_flush_error = error; thread = CreateThread(NULL, 0, flush_proc, pipe, 0, &tid); - ok_(__FILE__,line)(thread != NULL, "CreateThread failed: %u\n", GetLastError()); + ok_(__FILE__,line)(thread != NULL, "CreateThread failed: %lu\n", GetLastError());
Sleep(50); _test_not_signaled(line, thread); @@ -2889,7 +2890,7 @@ static HANDLE _test_flush_async(unsigned line, HANDLE pipe, DWORD error) static void _test_flush_done(unsigned line, HANDLE thread) { DWORD res = WaitForSingleObject(thread, 1000); - ok_(__FILE__,line)(res == WAIT_OBJECT_0, "WaitForSingleObject returned %u (%u)\n", res, GetLastError()); + ok_(__FILE__,line)(res == WAIT_OBJECT_0, "WaitForSingleObject returned %lu (%lu)\n", res, GetLastError()); CloseHandle(thread); }
@@ -2903,10 +2904,10 @@ static void _test_overlapped_result(unsigned line, HANDLE handle, OVERLAPPED *ov
res = GetOverlappedResult(handle, overlapped, &result, FALSE); if (partial_read) - ok_(__FILE__,line)(!res && GetLastError() == ERROR_MORE_DATA, "GetOverlappedResult returned: %x (%u)\n", res, GetLastError()); + ok_(__FILE__,line)(!res && GetLastError() == ERROR_MORE_DATA, "GetOverlappedResult returned: %x (%lu)\n", res, GetLastError()); else - ok_(__FILE__,line)(res, "GetOverlappedResult failed: %u\n", GetLastError()); - ok_(__FILE__,line)(result == expected_result, "read_bytes = %u, expected %u\n", result, expected_result); + ok_(__FILE__,line)(res, "GetOverlappedResult failed: %lu\n", GetLastError()); + ok_(__FILE__,line)(result == expected_result, "read_bytes = %lu, expected %lu\n", result, expected_result); CloseHandle(overlapped->hEvent); }
@@ -2919,9 +2920,9 @@ static void _test_overlapped_failure(unsigned line, HANDLE handle, OVERLAPPED *o _test_signaled(line, overlapped->hEvent);
res = GetOverlappedResult(handle, overlapped, &result, FALSE); - ok_(__FILE__,line)(!res && GetLastError() == error, "GetOverlappedResult returned: %x (%u), expected error %u\n", + ok_(__FILE__,line)(!res && GetLastError() == error, "GetOverlappedResult returned: %x (%lu), expected error %lu\n", res, GetLastError(), error); - ok_(__FILE__,line)(!result, "result = %u\n", result); + ok_(__FILE__,line)(!result, "result = %lu\n", result); CloseHandle(overlapped->hEvent); }
@@ -2931,7 +2932,7 @@ static void _cancel_overlapped(unsigned line, HANDLE handle, OVERLAPPED *overlap BOOL res;
res = pCancelIoEx(handle, overlapped); - ok_(__FILE__,line)(res, "CancelIoEx failed: %u\n", GetLastError()); + ok_(__FILE__,line)(res, "CancelIoEx failed: %lu\n", GetLastError());
_test_overlapped_failure(line, handle, overlapped, ERROR_OPERATION_ABORTED); } @@ -3079,11 +3080,11 @@ static void test_blocking_rw(HANDLE writer, HANDLE reader, DWORD buf_size, BOOL SetLastError(0xdeadbeef); overlapped_read_async(reader, read_buf, 1, &read_overlapped2); res = pCancelIoEx(reader, &read_overlapped2); - ok(res, "CancelIoEx failed with error %d\n", GetLastError()); + ok(res, "CancelIoEx failed with error %ld\n", GetLastError()); res = pCancelIoEx(reader, &read_overlapped2); ok(!res, "CancelIOEx succeeded unexpectedly\n"); ok(GetLastError() == ERROR_NOT_FOUND, - "In CancelIoEx failure, expected ERROR_NOT_FOUND, got %d\n", GetLastError()); + "In CancelIoEx failure, expected ERROR_NOT_FOUND, got %ld\n", GetLastError()); test_overlapped_failure(reader, &read_overlapped2, ERROR_OPERATION_ABORTED);
/* make two async writes, cancel the first one and make sure that we read from the second one */ @@ -3129,7 +3130,7 @@ static void _overlapped_transact(unsigned line, HANDLE caller, void *write_buf, overlapped->hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); res = TransactNamedPipe(caller, write_buf, write_size, read_buf, read_size, NULL, overlapped); ok_(__FILE__,line)(!res && GetLastError() == ERROR_IO_PENDING, - "TransactNamedPipe returned: %x(%u)\n", res, GetLastError()); + "TransactNamedPipe returned: %x(%lu)\n", res, GetLastError()); }
#define overlapped_transact_failure(a,b,c,d,e,f) _overlapped_transact_failure(__LINE__,a,b,c,d,e,f) @@ -3151,7 +3152,7 @@ static void _overlapped_transact_failure(unsigned line, HANDLE caller, void *wri else { ok_(__FILE__,line)(GetLastError() == expected_error, - "TransactNamedPipe returned error %u, expected %u\n", + "TransactNamedPipe returned error %lu, expected %lu\n", GetLastError(), expected_error); CloseHandle(overlapped.hEvent); } @@ -3177,9 +3178,9 @@ static HANDLE create_writepipe_process(HANDLE pipe) BOOL res;
winetest_get_mainargs(&argv); - sprintf(buf, ""%s" pipe writepipe %lx", argv[0], (UINT_PTR)pipe); + sprintf(buf, ""%s" pipe writepipe %Ix", argv[0], (UINT_PTR)pipe); res = CreateProcessA(NULL, buf, NULL, NULL, TRUE, 0L, NULL, NULL, &si, &info); - ok(res, "CreateProcess failed: %u\n", GetLastError()); + ok(res, "CreateProcess failed: %lu\n", GetLastError()); CloseHandle(info.hThread);
return info.hProcess; @@ -3194,21 +3195,21 @@ static void create_overlapped_pipe(DWORD mode, HANDLE *client, HANDLE *server)
*server = CreateNamedPipeA(PIPENAME, FILE_FLAG_OVERLAPPED | PIPE_ACCESS_DUPLEX, PIPE_WAIT | mode, 1, 5000, 6000, NMPWAIT_USE_DEFAULT_WAIT, NULL); - ok(*server != INVALID_HANDLE_VALUE, "CreateNamedPipe failed: %u\n", GetLastError()); + ok(*server != INVALID_HANDLE_VALUE, "CreateNamedPipe failed: %lu\n", GetLastError()); test_signaled(*server);
memset(&overlapped, 0, sizeof(overlapped)); overlapped.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); res = ConnectNamedPipe(*server, &overlapped); - ok(!res && GetLastError() == ERROR_IO_PENDING, "WriteFile returned %x(%u)\n", res, GetLastError()); + ok(!res && GetLastError() == ERROR_IO_PENDING, "WriteFile returned %x(%lu)\n", res, GetLastError()); test_not_signaled(*server); test_not_signaled(overlapped.hEvent);
*client = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, &sec_attr, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL); - ok(*client != INVALID_HANDLE_VALUE, "CreateFile failed: %u\n", GetLastError()); + ok(*client != INVALID_HANDLE_VALUE, "CreateFile failed: %lu\n", GetLastError());
res = SetNamedPipeHandleState(*client, &read_mode, NULL, NULL); - ok(res, "SetNamedPipeHandleState failed: %u\n", GetLastError()); + ok(res, "SetNamedPipeHandleState failed: %lu\n", GetLastError());
test_signaled(*client); test_not_signaled(*server); @@ -3265,7 +3266,7 @@ static void test_overlapped_transport(BOOL msg_mode, BOOL msg_read_mode) overlapped_write_async(server, buf, 7000, &overlapped2); flush = test_flush_async(client, ERROR_PIPE_NOT_CONNECTED); res = DisconnectNamedPipe(server); - ok(res, "DisconnectNamedPipe failed: %u\n", GetLastError()); + ok(res, "DisconnectNamedPipe failed: %lu\n", GetLastError()); test_overlapped_failure(client, &overlapped, ERROR_PIPE_NOT_CONNECTED); test_overlapped_failure(client, &overlapped2, ERROR_PIPE_NOT_CONNECTED); test_flush_done(flush); @@ -3278,10 +3279,10 @@ static void test_overlapped_transport(BOOL msg_mode, BOOL msg_read_mode) /* successfully read part of write that is pending in child process */ res = ReadFile(server, buf, 10, &read_bytes, NULL); if(!msg_read_mode) - ok(res, "ReadFile failed: %u\n", GetLastError()); + ok(res, "ReadFile failed: %lu\n", GetLastError()); else - ok(!res && GetLastError() == ERROR_MORE_DATA, "ReadFile returned: %x %u\n", res, GetLastError()); - ok(read_bytes == 10, "read_bytes = %u\n", read_bytes); + ok(!res && GetLastError() == ERROR_MORE_DATA, "ReadFile returned: %x %lu\n", res, GetLastError()); + ok(read_bytes == 10, "read_bytes = %lu\n", read_bytes); TerminateProcess(process, 0); wait_child_process(process); /* after terminating process, there is no pending write and pipe buffer is empty */ @@ -3399,9 +3400,9 @@ static HANDLE create_overlapped_server( OVERLAPPED *overlapped )
pipe = CreateNamedPipeA(PIPENAME, FILE_FLAG_OVERLAPPED | PIPE_ACCESS_DUPLEX, PIPE_READMODE_BYTE | PIPE_WAIT, 1, 5000, 6000, NMPWAIT_USE_DEFAULT_WAIT, NULL); - ok(pipe != INVALID_HANDLE_VALUE, "got %u\n", GetLastError()); + ok(pipe != INVALID_HANDLE_VALUE, "got %lu\n", GetLastError()); ret = ConnectNamedPipe(pipe, overlapped); - ok(!ret && GetLastError() == ERROR_IO_PENDING, "got %u\n", GetLastError()); + ok(!ret && GetLastError() == ERROR_IO_PENDING, "got %lu\n", GetLastError()); return pipe; }
@@ -3413,17 +3414,17 @@ static void child_process_check_pid(DWORD server_pid) BOOL ret;
pipe = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); - ok(pipe != INVALID_HANDLE_VALUE, "got %u\n", GetLastError()); + ok(pipe != INVALID_HANDLE_VALUE, "got %lu\n", GetLastError());
pid = 0; ret = pGetNamedPipeClientProcessId(pipe, &pid); - ok(ret, "got %u\n", GetLastError()); - ok(pid == current, "got %04x\n", pid); + ok(ret, "got %lu\n", GetLastError()); + ok(pid == current, "got %04lx\n", pid);
pid = 0; ret = pGetNamedPipeServerProcessId(pipe, &pid); - ok(ret, "got %u\n", GetLastError()); - ok(pid == server_pid, "got %04x expected %04x\n", pid, server_pid); + ok(ret, "got %lu\n", GetLastError()); + ok(pid == server_pid, "got %04lx expected %04lx\n", pid, server_pid); CloseHandle(pipe); }
@@ -3435,9 +3436,9 @@ static HANDLE create_check_id_process(const char *verb, DWORD id) BOOL ret;
winetest_get_mainargs(&argv); - sprintf(buf, ""%s" pipe %s %x", argv[0], verb, id); + sprintf(buf, ""%s" pipe %s %lx", argv[0], verb, id); ret = CreateProcessA(NULL, buf, NULL, NULL, TRUE, 0, NULL, NULL, &si, &info); - ok(ret, "got %u\n", GetLastError()); + ok(ret, "got %lu\n", GetLastError()); CloseHandle(info.hThread); return info.hProcess; } @@ -3461,44 +3462,44 @@ static void test_namedpipe_process_id(void) SetLastError(0xdeadbeef); ret = pGetNamedPipeClientProcessId(server, NULL); ok(!ret, "success\n"); - todo_wine ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %u\n", GetLastError()); + todo_wine ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %lu\n", GetLastError());
pid = 0; ret = pGetNamedPipeClientProcessId(server, &pid); - ok(ret, "got %u\n", GetLastError()); - ok(pid == current, "got %04x expected %04x\n", pid, current); + ok(ret, "got %lu\n", GetLastError()); + ok(pid == current, "got %04lx expected %04lx\n", pid, current);
pid = 0; ret = pGetNamedPipeClientProcessId(client, &pid); - ok(ret, "got %u\n", GetLastError()); - ok(pid == current, "got %04x expected %04x\n", pid, current); + ok(ret, "got %lu\n", GetLastError()); + ok(pid == current, "got %04lx expected %04lx\n", pid, current);
SetLastError(0xdeadbeef); ret = pGetNamedPipeServerProcessId(server, NULL); ok(!ret, "success\n"); - todo_wine ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %u\n", GetLastError()); + todo_wine ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %lu\n", GetLastError());
pid = 0; ret = pGetNamedPipeServerProcessId(client, &pid); - ok(ret, "got %u\n", GetLastError()); - ok(pid == current, "got %04x expected %04x\n", pid, current); + ok(ret, "got %lu\n", GetLastError()); + ok(pid == current, "got %04lx expected %04lx\n", pid, current);
pid = 0; ret = pGetNamedPipeServerProcessId(server, &pid); - ok(ret, "got %u\n", GetLastError()); - ok(pid == current, "got %04x expected %04x\n", pid, current); + ok(ret, "got %lu\n", GetLastError()); + ok(pid == current, "got %04lx expected %04lx\n", pid, current);
/* closed client handle */ CloseHandle(client); pid = 0; ret = pGetNamedPipeClientProcessId(server, &pid); - ok(ret, "got %u\n", GetLastError()); - ok(pid == current, "got %04x expected %04x\n", pid, current); + ok(ret, "got %lu\n", GetLastError()); + ok(pid == current, "got %04lx expected %04lx\n", pid, current);
pid = 0; ret = pGetNamedPipeServerProcessId(server, &pid); - ok(ret, "got %u\n", GetLastError()); - ok(pid == current, "got %04x expected %04x\n", pid, current); + ok(ret, "got %lu\n", GetLastError()); + ok(pid == current, "got %04lx expected %04lx\n", pid, current); CloseHandle(server);
/* disconnected server */ @@ -3508,22 +3509,22 @@ static void test_namedpipe_process_id(void) SetLastError(0xdeadbeef); ret = pGetNamedPipeClientProcessId(server, &pid); todo_wine ok(!ret, "success\n"); - todo_wine ok(GetLastError() == ERROR_NOT_FOUND, "got %u\n", GetLastError()); + todo_wine ok(GetLastError() == ERROR_NOT_FOUND, "got %lu\n", GetLastError());
pid = 0; ret = pGetNamedPipeServerProcessId(server, &pid); - ok(ret, "got %u\n", GetLastError()); - ok(pid == current, "got %04x expected %04x\n", pid, current); + ok(ret, "got %lu\n", GetLastError()); + ok(pid == current, "got %04lx expected %04lx\n", pid, current);
SetLastError(0xdeadbeef); ret = pGetNamedPipeClientProcessId(client, &pid); todo_wine ok(!ret, "success\n"); - todo_wine ok(GetLastError() == ERROR_PIPE_NOT_CONNECTED, "got %u\n", GetLastError()); + todo_wine ok(GetLastError() == ERROR_PIPE_NOT_CONNECTED, "got %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = pGetNamedPipeServerProcessId(client, &pid); todo_wine ok(!ret, "success\n"); - todo_wine ok(GetLastError() == ERROR_PIPE_NOT_CONNECTED, "got %u\n", GetLastError()); + todo_wine ok(GetLastError() == ERROR_PIPE_NOT_CONNECTED, "got %lu\n", GetLastError()); CloseHandle(client); CloseHandle(server);
@@ -3533,20 +3534,20 @@ static void test_namedpipe_process_id(void)
pid = 0; ret = pGetNamedPipeClientProcessId(client, &pid); - ok(ret, "got %u\n", GetLastError()); - ok(pid == current, "got %04x expected %04x\n", pid, current); + ok(ret, "got %lu\n", GetLastError()); + ok(pid == current, "got %04lx expected %04lx\n", pid, current);
pid = 0; ret = pGetNamedPipeServerProcessId(client, &pid); - ok(ret, "got %u\n", GetLastError()); - ok(pid == current, "got %04x expected %04x\n", pid, current); + ok(ret, "got %lu\n", GetLastError()); + ok(pid == current, "got %04lx expected %04lx\n", pid, current); CloseHandle(client);
/* different process */ memset(&overlapped, 0, sizeof(overlapped)); overlapped.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); server = create_overlapped_server( &overlapped ); - ok(server != INVALID_HANDLE_VALUE, "got %u\n", GetLastError()); + ok(server != INVALID_HANDLE_VALUE, "got %lu\n", GetLastError());
process = create_check_id_process("checkpid", GetProcessId(GetCurrentProcess())); wait_child_process(process); @@ -3566,17 +3567,17 @@ static void child_process_check_session_id(DWORD server_id) ProcessIdToSessionId(GetProcessId(GetCurrentProcess()), ¤t);
pipe = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); - ok(pipe != INVALID_HANDLE_VALUE, "got %u\n", GetLastError()); + ok(pipe != INVALID_HANDLE_VALUE, "got %lu\n", GetLastError());
id = 0; ret = pGetNamedPipeClientSessionId(pipe, &id); - ok(ret, "got %u\n", GetLastError()); - ok(id == current, "got %04x\n", id); + ok(ret, "got %lu\n", GetLastError()); + ok(id == current, "got %04lx\n", id);
id = 0; ret = pGetNamedPipeServerSessionId(pipe, &id); - ok(ret, "got %u\n", GetLastError()); - ok(id == server_id, "got %04x expected %04x\n", id, server_id); + ok(ret, "got %lu\n", GetLastError()); + ok(id == server_id, "got %04lx expected %04lx\n", id, server_id); CloseHandle(pipe); }
@@ -3607,41 +3608,41 @@ static void test_namedpipe_session_id(void)
id = 0; ret = pGetNamedPipeClientSessionId(server, &id); - ok(ret, "got %u\n", GetLastError()); - ok(id == current, "got %u expected %u\n", id, current); + ok(ret, "got %lu\n", GetLastError()); + ok(id == current, "got %lu expected %lu\n", id, current);
id = 0; ret = pGetNamedPipeClientSessionId(client, &id); - ok(ret, "got %u\n", GetLastError()); - ok(id == current, "got %u expected %u\n", id, current); + ok(ret, "got %lu\n", GetLastError()); + ok(id == current, "got %lu expected %lu\n", id, current);
SetLastError(0xdeadbeef); ret = pGetNamedPipeServerSessionId(server, NULL); ok(!ret, "success\n"); - todo_wine ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %u\n", GetLastError()); + todo_wine ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %lu\n", GetLastError());
id = 0; ret = pGetNamedPipeServerSessionId(client, &id); - ok(ret, "got %u\n", GetLastError()); - ok(id == current, "got %u expected %u\n", id, current); + ok(ret, "got %lu\n", GetLastError()); + ok(id == current, "got %lu expected %lu\n", id, current);
id = 0; ret = pGetNamedPipeServerSessionId(server, &id); - ok(ret, "got %u\n", GetLastError()); - ok(id == current, "got %u expected %u\n", id, current); + ok(ret, "got %lu\n", GetLastError()); + ok(id == current, "got %lu expected %lu\n", id, current);
/* closed client handle */ CloseHandle(client);
id = 0; ret = pGetNamedPipeClientSessionId(server, &id); - ok(ret, "got %u\n", GetLastError()); - ok(id == current, "got %04x expected %04x\n", id, current); + ok(ret, "got %lu\n", GetLastError()); + ok(id == current, "got %04lx expected %04lx\n", id, current);
id = 0; ret = pGetNamedPipeServerSessionId(server, &id); - ok(ret, "got %u\n", GetLastError()); - ok(id == current, "got %04x expected %04x\n", id, current); + ok(ret, "got %lu\n", GetLastError()); + ok(id == current, "got %04lx expected %04lx\n", id, current); CloseHandle(server);
/* disconnected server */ @@ -3651,22 +3652,22 @@ static void test_namedpipe_session_id(void) SetLastError(0xdeadbeef); ret = pGetNamedPipeClientSessionId(server, &id); todo_wine ok(!ret, "success\n"); - todo_wine ok(GetLastError() == ERROR_NOT_FOUND, "got %u\n", GetLastError()); + todo_wine ok(GetLastError() == ERROR_NOT_FOUND, "got %lu\n", GetLastError());
id = 0; ret = pGetNamedPipeServerSessionId(server, &id); - ok(ret, "got %u\n", GetLastError()); - ok(id == current, "got %04x expected %04x\n", id, current); + ok(ret, "got %lu\n", GetLastError()); + ok(id == current, "got %04lx expected %04lx\n", id, current);
SetLastError(0xdeadbeef); ret = pGetNamedPipeClientSessionId(client, &id); todo_wine ok(!ret, "success\n"); - todo_wine ok(GetLastError() == ERROR_PIPE_NOT_CONNECTED, "got %u\n", GetLastError()); + todo_wine ok(GetLastError() == ERROR_PIPE_NOT_CONNECTED, "got %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = pGetNamedPipeServerSessionId(client, &id); todo_wine ok(!ret, "success\n"); - todo_wine ok(GetLastError() == ERROR_PIPE_NOT_CONNECTED, "got %u\n", GetLastError()); + todo_wine ok(GetLastError() == ERROR_PIPE_NOT_CONNECTED, "got %lu\n", GetLastError()); CloseHandle(client); CloseHandle(server);
@@ -3676,20 +3677,20 @@ static void test_namedpipe_session_id(void)
id = 0; ret = pGetNamedPipeClientSessionId(client, &id); - ok(ret, "got %u\n", GetLastError()); - ok(id == current, "got %04x expected %04x\n", id, current); + ok(ret, "got %lu\n", GetLastError()); + ok(id == current, "got %04lx expected %04lx\n", id, current);
id = 0; ret = pGetNamedPipeServerSessionId(client, &id); - ok(ret, "got %u\n", GetLastError()); - ok(id == current, "got %04x expected %04x\n", id, current); + ok(ret, "got %lu\n", GetLastError()); + ok(id == current, "got %04lx expected %04lx\n", id, current); CloseHandle(client);
/* different process */ memset(&overlapped, 0, sizeof(overlapped)); overlapped.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); server = create_overlapped_server( &overlapped ); - ok(server != INVALID_HANDLE_VALUE, "got %u\n", GetLastError()); + ok(server != INVALID_HANDLE_VALUE, "got %lu\n", GetLastError());
process = create_check_id_process("checksessionid", current); wait_child_process(process); @@ -3728,12 +3729,12 @@ static void test_multiple_instances(void) memset(&ov, 0, sizeof(ov)); ret = ConnectNamedPipe(server[2], &ov); ok(ret == FALSE, "got %d\n", ret); - ok(GetLastError() == ERROR_IO_PENDING, "got %d\n", GetLastError()); + ok(GetLastError() == ERROR_IO_PENDING, "got %ld\n", GetLastError());
memset(&ov, 0, sizeof(ov)); ret = ConnectNamedPipe(server[0], &ov); ok(ret == FALSE, "got %d\n", ret); - ok(GetLastError() == ERROR_PIPE_CONNECTED, "got %d\n", GetLastError()); + ok(GetLastError() == ERROR_PIPE_CONNECTED, "got %ld\n", GetLastError());
CloseHandle(client);
@@ -3745,12 +3746,12 @@ static void test_multiple_instances(void) memset(&ov, 0, sizeof(ov)); ret = ConnectNamedPipe(server[2], &ov); ok(ret == FALSE, "got %d\n", ret); - ok(GetLastError() == ERROR_IO_PENDING, "got %d\n", GetLastError()); + ok(GetLastError() == ERROR_IO_PENDING, "got %ld\n", GetLastError());
memset(&ov, 0, sizeof(ov)); ret = ConnectNamedPipe(server[1], &ov); ok(ret == FALSE, "got %d\n", ret); - ok(GetLastError() == ERROR_PIPE_CONNECTED, "got %d\n", GetLastError()); + ok(GetLastError() == ERROR_PIPE_CONNECTED, "got %ld\n", GetLastError());
CloseHandle(client);
@@ -3762,7 +3763,7 @@ static void test_multiple_instances(void) memset(&ov, 0, sizeof(ov)); ret = ConnectNamedPipe(server[2], &ov); ok(ret == FALSE, "got %d\n", ret); - ok(GetLastError() == ERROR_PIPE_CONNECTED, "got %d\n", GetLastError()); + ok(GetLastError() == ERROR_PIPE_CONNECTED, "got %ld\n", GetLastError());
CloseHandle(client);
@@ -3776,12 +3777,12 @@ static void test_multiple_instances(void) memset(&ov, 0, sizeof(ov)); ret = ConnectNamedPipe(server[2], &ov); ok(ret == FALSE, "got %d\n", ret); - ok(GetLastError() == ERROR_IO_PENDING, "got %d\n", GetLastError()); + ok(GetLastError() == ERROR_IO_PENDING, "got %ld\n", GetLastError());
memset(&ov, 0, sizeof(ov)); ret = ConnectNamedPipe(server[0], &ov); ok(ret == FALSE, "got %d\n", ret); - ok(GetLastError() == ERROR_IO_PENDING, "got %d\n", GetLastError()); + ok(GetLastError() == ERROR_IO_PENDING, "got %ld\n", GetLastError());
/* server[3] is connected next */
@@ -3791,7 +3792,7 @@ static void test_multiple_instances(void) memset(&ov, 0, sizeof(ov)); ret = ConnectNamedPipe(server[3], &ov); ok(ret == FALSE, "got %d\n", ret); - ok(GetLastError() == ERROR_PIPE_CONNECTED, "got %d\n", GetLastError()); + ok(GetLastError() == ERROR_PIPE_CONNECTED, "got %ld\n", GetLastError());
CloseHandle(client);
@@ -3803,12 +3804,12 @@ static void test_multiple_instances(void) memset(&ov, 0, sizeof(ov)); ret = ConnectNamedPipe(server[2], &ov); ok(ret == FALSE, "got %d\n", ret); - ok(GetLastError() == ERROR_PIPE_CONNECTED, "got %d\n", GetLastError()); + ok(GetLastError() == ERROR_PIPE_CONNECTED, "got %ld\n", GetLastError());
memset(&ov, 0, sizeof(ov)); ret = ConnectNamedPipe(server[0], &ov); ok(ret == FALSE, "got %d\n", ret); - ok(GetLastError() == ERROR_IO_PENDING, "got %d\n", GetLastError()); + ok(GetLastError() == ERROR_IO_PENDING, "got %ld\n", GetLastError());
CloseHandle(client);
@@ -3820,14 +3821,14 @@ static void test_multiple_instances(void) memset(&ov, 0, sizeof(ov)); ret = ConnectNamedPipe(server[0], &ov); ok(ret == FALSE, "got %d\n", ret); - ok(GetLastError() == ERROR_PIPE_CONNECTED, "got %d\n", GetLastError()); + ok(GetLastError() == ERROR_PIPE_CONNECTED, "got %ld\n", GetLastError());
CloseHandle(client);
/* No more listening pipes available */ DisconnectNamedPipe(server[0]); client = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0); - ok(client == INVALID_HANDLE_VALUE && GetLastError() == ERROR_PIPE_BUSY, "got %p(%u)\n", client, GetLastError()); + ok(client == INVALID_HANDLE_VALUE && GetLastError() == ERROR_PIPE_BUSY, "got %p(%lu)\n", client, GetLastError());
for (i = 0; i < ARRAY_SIZE(server); i++) { @@ -3840,7 +3841,7 @@ static DWORD WINAPI wait_pipe_proc(void *arg) { BOOL ret; ret = WaitNamedPipeA(PIPENAME, 1000); - ok(ret, "WaitNamedPipe failed (%u)\n", GetLastError()); + ok(ret, "WaitNamedPipe failed (%lu)\n", GetLastError()); return 0; }
@@ -3850,10 +3851,10 @@ static HANDLE async_wait_pipe(void) BOOL ret;
thread = CreateThread(NULL, 0, wait_pipe_proc, NULL, 0, NULL); - ok(thread != NULL, "CreateThread failed: %u\n", GetLastError()); + ok(thread != NULL, "CreateThread failed: %lu\n", GetLastError());
ret = WaitNamedPipeA(PIPENAME, 1); - ok(!ret && GetLastError() == ERROR_SEM_TIMEOUT, "WaitNamedPipe failed %x(%u)\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_SEM_TIMEOUT, "WaitNamedPipe failed %x(%lu)\n", ret, GetLastError());
return thread; } @@ -3866,7 +3867,7 @@ static void test_wait_pipe(void) BOOL ret;
ret = WaitNamedPipeA(PIPENAME, 0); - ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, "WaitNamedPipe failed %x(%u)\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, "WaitNamedPipe failed %x(%lu)\n", ret, GetLastError());
server[0] = CreateNamedPipeA(PIPENAME, PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, PIPE_READMODE_BYTE | PIPE_WAIT, ARRAY_SIZE(server), 1024, 1024, @@ -3874,7 +3875,7 @@ static void test_wait_pipe(void) ok(server[0] != INVALID_HANDLE_VALUE, "got invalid handle\n");
ret = WaitNamedPipeA(PIPENAME, 1); - ok(ret, "WaitNamedPipe failed (%u)\n", GetLastError()); + ok(ret, "WaitNamedPipe failed (%lu)\n", GetLastError());
client = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0); ok(client != INVALID_HANDLE_VALUE, "got invalid handle\n"); @@ -3887,14 +3888,14 @@ static void test_wait_pipe(void) ok(server[1] != INVALID_HANDLE_VALUE, "got invalid handle\n");
res = WaitForSingleObject(wait, 100); - ok(res == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", res); + ok(res == WAIT_OBJECT_0, "WaitForSingleObject returned %lu\n", res);
CloseHandle(wait); CloseHandle(server[1]);
CloseHandle(client); ret = DisconnectNamedPipe(server[0]); - ok(ret, "DisconnectNamedPipe failed (%u)\n", GetLastError()); + ok(ret, "DisconnectNamedPipe failed (%lu)\n", GetLastError());
/* Putting pipe server into waiting listening state wakes waiters */ wait = async_wait_pipe(); @@ -3902,14 +3903,14 @@ static void test_wait_pipe(void) ov.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); ret = ConnectNamedPipe(server[0], &ov); ok(ret == FALSE, "got %d\n", ret); - ok(GetLastError() == ERROR_IO_PENDING, "got %d\n", GetLastError()); + ok(GetLastError() == ERROR_IO_PENDING, "got %ld\n", GetLastError());
res = WaitForSingleObject(wait, 100); - ok(res == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", res); + ok(res == WAIT_OBJECT_0, "WaitForSingleObject returned %lu\n", res); CloseHandle(server[0]);
res = WaitForSingleObject(ov.hEvent, 0); - ok(res == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", res); + ok(res == WAIT_OBJECT_0, "WaitForSingleObject returned %lu\n", res); CloseHandle(ov.hEvent); }
@@ -3936,7 +3937,7 @@ static void test_nowait(DWORD pipe_type) ol.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); SetLastError(0xdeadbeef); ok(ReadFile(piperead, readbuf, sizeof(readbuf), &read, &ol) == FALSE, "ReadFile should fail\n"); - ok(GetLastError() == ERROR_NO_DATA, "got %d should be ERROR_NO_DATA\n", GetLastError()); + ok(GetLastError() == ERROR_NO_DATA, "got %ld should be ERROR_NO_DATA\n", GetLastError()); if (GetLastError() == ERROR_IO_PENDING) CancelIo(piperead);
@@ -3979,63 +3980,63 @@ static void test_nowait(DWORD pipe_type) /* overlapped read of 32768, non-blocking write of 512 */ SetLastError(0xdeadbeef); ok(ReadFile(piperead, readbuf, sizeof(readbuf), &read, &ol2) == FALSE, "ReadFile should fail\n"); - ok(GetLastError() == ERROR_IO_PENDING, "got %d should be ERROR_IO_PENDING\n", GetLastError()); + ok(GetLastError() == ERROR_IO_PENDING, "got %ld should be ERROR_IO_PENDING\n", GetLastError()); ok(WriteFile(pipewrite, teststring, sizeof(teststring), &write, &ol), "WriteFile should succeed\n"); - ok(write == sizeof(teststring), "got %d\n", write); + ok(write == sizeof(teststring), "got %ld\n", write); ok(GetOverlappedResult(piperead, &ol2, &read, FALSE), "GetOverlappedResult should succeed\n"); - ok(read == sizeof(teststring), "got %d\n", read); + ok(read == sizeof(teststring), "got %ld\n", read); if (GetOverlappedResult(piperead, &ol2, &read, FALSE) == FALSE) CancelIo(piperead);
/* overlapped read of 32768, non-blocking write of 513 */ SetLastError(0xdeadbeef); ok(ReadFile(piperead, readbuf, sizeof(readbuf), &read, &ol2) == FALSE, "ReadFile should fail\n"); - ok(GetLastError() == ERROR_IO_PENDING, "got %d should be ERROR_IO_PENDING\n", GetLastError()); + ok(GetLastError() == ERROR_IO_PENDING, "got %ld should be ERROR_IO_PENDING\n", GetLastError()); ok(WriteFile(pipewrite, readbuf, 513, &write, &ol), "WriteFile should succeed\n"); - ok(write == 513, "got %d, write should be %d\n", write, 513); + ok(write == 513, "got %ld, write should be %d\n", write, 513); ok(GetOverlappedResult(piperead, &ol2, &read, FALSE), "GetOverlappedResult should succeed\n"); - ok(read == 513, "got %d, read should be %d\n", read, 513); + ok(read == 513, "got %ld, read should be %d\n", read, 513); if (GetOverlappedResult(piperead, &ol2, &read, FALSE) == FALSE) CancelIo(piperead);
/* overlapped read of 1 byte, non-blocking write of 513 bytes */ SetLastError(0xdeadbeef); ok(ReadFile(piperead, readbuf, 1, &read, &ol2) == FALSE, "ReadFile should fail\n"); - ok(GetLastError() == ERROR_IO_PENDING, "got %d should be ERROR_IO_PENDING\n", GetLastError()); + ok(GetLastError() == ERROR_IO_PENDING, "got %ld should be ERROR_IO_PENDING\n", GetLastError()); ok(WriteFile(pipewrite, readbuf, 513, &write, &ol), "WriteFile should succeed\n"); - ok(write == 513, "got %d, write should be %d\n", write, 513); + ok(write == 513, "got %ld, write should be %d\n", write, 513); ok(GetOverlappedResult(piperead, &ol2, &read, FALSE), "GetOverlappedResult should succeed\n"); - ok(read == 1, "got %d, read should be %d\n", read, 1); + ok(read == 1, "got %ld, read should be %d\n", read, 1); if (GetOverlappedResult(piperead, &ol2, &read, FALSE) == FALSE) CancelIo(piperead); /* read the remaining 512 bytes */ SetLastError(0xdeadbeef); ok(ReadFile(piperead, readbuf, sizeof(readbuf), &read, &ol2), "ReadFile should succeed\n"); - ok(read == 512, "got %d, write should be %d\n", write, 512); + ok(read == 512, "got %ld, write should be %d\n", write, 512); if (GetOverlappedResult(piperead, &ol2, &read, FALSE) == FALSE) CancelIo(piperead);
/* overlapped read of 1 byte, non-blocking write of 514 bytes */ SetLastError(0xdeadbeef); ok(ReadFile(piperead, readbuf, 1, &read, &ol2) == FALSE, "ReadFile should fail\n"); - ok(GetLastError() == ERROR_IO_PENDING, "got %d should be ERROR_IO_PENDING\n", GetLastError()); + ok(GetLastError() == ERROR_IO_PENDING, "got %ld should be ERROR_IO_PENDING\n", GetLastError()); ok(WriteFile(pipewrite, readbuf, 514, &write, &ol), "WriteFile should succeed\n"); if (pipe_type == PIPE_TYPE_MESSAGE) { todo_wine - ok(write == 0, "got %d\n", write); + ok(write == 0, "got %ld\n", write); todo_wine ok(!GetOverlappedResult(piperead, &ol2, &read, FALSE), "GetOverlappedResult should fail\n"); todo_wine - ok(GetLastError() == ERROR_IO_INCOMPLETE, "got %d should be ERROR_IO_PENDING\n", GetLastError()); + ok(GetLastError() == ERROR_IO_INCOMPLETE, "got %ld should be ERROR_IO_PENDING\n", GetLastError()); todo_wine - ok(read == 0, "got %d, read should be %d\n", read, 1); + ok(read == 0, "got %ld, read should be %d\n", read, 1); } else { - ok(write == 1, "got %d\n", write); + ok(write == 1, "got %ld\n", write); ok(GetOverlappedResult(piperead, &ol2, &read, FALSE), "GetOverlappedResult should fail\n"); - ok(read == 1, "got %d, read should be %d\n", read, 1); + ok(read == 1, "got %ld, read should be %d\n", read, 1); } if (GetOverlappedResult(piperead, &ol2, &read, FALSE) == FALSE) CancelIo(piperead); @@ -4066,7 +4067,7 @@ static void test_nowait(DWORD pipe_type) ol.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); SetLastError(0xdeadbeef); ok(ConnectNamedPipe(pipewrite, &ol) == FALSE, "ConnectNamedPipe should fail\n"); - ok(GetLastError() == ERROR_PIPE_LISTENING, "got %d should be ERROR_PIPE_LISTENING\n", GetLastError()); + ok(GetLastError() == ERROR_PIPE_LISTENING, "got %ld should be ERROR_PIPE_LISTENING\n", GetLastError()); if (GetLastError() == ERROR_IO_PENDING) CancelIo(pipewrite);
@@ -4076,7 +4077,7 @@ static void test_nowait(DWORD pipe_type) ok(CloseHandle(file), "CloseHandle failed\n"); SetLastError(0xdeadbeef); ok(ConnectNamedPipe(pipewrite,&ol) == FALSE, "ConnectNamedPipe should fail\n"); - ok(GetLastError() == ERROR_NO_DATA, "got %d should be ERROR_NO_DATA\n", GetLastError()); + ok(GetLastError() == ERROR_NO_DATA, "got %ld should be ERROR_NO_DATA\n", GetLastError()); if (GetLastError() == ERROR_IO_PENDING) CancelIo(pipewrite);
@@ -4084,7 +4085,7 @@ static void test_nowait(DWORD pipe_type) ok(DisconnectNamedPipe(pipewrite) == TRUE, "DisconnectNamedPipe should succeed\n"); SetLastError(0xdeadbeef); ok(ConnectNamedPipe(pipewrite,&ol) == FALSE, "ConnectNamedPipe should fail\n"); - ok(GetLastError() == ERROR_PIPE_LISTENING, "got %d should be ERROR_PIPE_LISTENING\n", GetLastError()); + ok(GetLastError() == ERROR_PIPE_LISTENING, "got %ld should be ERROR_PIPE_LISTENING\n", GetLastError()); if (GetLastError() == ERROR_IO_PENDING) CancelIo(pipewrite); ok(CloseHandle(ol.hEvent), "CloseHandle for the event failed\n"); @@ -4115,25 +4116,25 @@ static void test_GetOverlappedResultEx(void) SetLastError(0xdeadbeef); ret = pGetOverlappedResultEx(client, &ovl, &ret_size, 0, FALSE); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_IO_INCOMPLETE, "wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_IO_INCOMPLETE, "wrong error %lu\n", GetLastError()); ok(!user_apc_ran, "APC should not have run\n");
SetLastError(0xdeadbeef); ret = pGetOverlappedResultEx(client, &ovl, &ret_size, 0, TRUE); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_IO_INCOMPLETE, "wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_IO_INCOMPLETE, "wrong error %lu\n", GetLastError()); ok(!user_apc_ran, "APC should not have run\n");
SetLastError(0xdeadbeef); ret = pGetOverlappedResultEx(client, &ovl, &ret_size, 10, FALSE); ok(!ret, "expected failure\n"); - ok(GetLastError() == WAIT_TIMEOUT, "wrong error %u\n", GetLastError()); + ok(GetLastError() == WAIT_TIMEOUT, "wrong error %lu\n", GetLastError()); ok(!user_apc_ran, "APC should not have run\n");
SetLastError(0xdeadbeef); ret = pGetOverlappedResultEx(client, &ovl, &ret_size, 10, TRUE); ok(!ret, "expected failure\n"); - ok(GetLastError() == WAIT_IO_COMPLETION, "wrong error %u\n", GetLastError()); + ok(GetLastError() == WAIT_IO_COMPLETION, "wrong error %lu\n", GetLastError()); ok(user_apc_ran, "APC should have run\n");
CloseHandle(ovl.hEvent); @@ -4154,13 +4155,13 @@ static void child_process_exit_process_async(DWORD parent_pid, HANDLE parent_pip
ret = DuplicateHandle(parent, parent_pipe, GetCurrentProcess(), &pipe, 0, FALSE, DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
overlapped.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
ret = ReadFile(pipe, buffer, sizeof(buffer), NULL, &overlapped); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_IO_PENDING, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_IO_PENDING, "got error %lu\n", GetLastError());
/* exit without closing the pipe handle */ } @@ -4182,9 +4183,9 @@ static void test_exit_process_async(void) create_overlapped_pipe(PIPE_TYPE_BYTE, &client, &server); port = CreateIoCompletionPort(client, NULL, 123, 0);
- sprintf(cmdline, "%s pipe exit_process_async %x %p", argv[0], GetCurrentProcessId(), client); + sprintf(cmdline, "%s pipe exit_process_async %lx %p", argv[0], GetCurrentProcessId(), client); ret = CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ret = WaitForSingleObject(pi.hProcess, 1000); ok(!ret, "wait timed out\n"); CloseHandle(pi.hThread); @@ -4194,8 +4195,8 @@ static void test_exit_process_async(void) size = 0xdeadbeef; ret = GetQueuedCompletionStatus(port, &size, &key, &overlapped, 1000); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_OPERATION_ABORTED, "got error %u\n", GetLastError()); - ok(!size, "got size %u\n", size); + ok(GetLastError() == ERROR_OPERATION_ABORTED, "got error %lu\n", GetLastError()); + ok(!size, "got size %lu\n", size); ok(key == 123, "got key %Iu\n", key);
CloseHandle(port); @@ -4225,14 +4226,14 @@ START_TEST(pipe) if (!strcmp(argv[2], "writepipe")) { ULONG handle; - sscanf(argv[3], "%x", &handle); + sscanf(argv[3], "%lx", &handle); child_process_write_pipe(ULongToHandle(handle)); return; } if (!strcmp(argv[2], "checkpid")) { DWORD pid = GetProcessId(GetCurrentProcess()); - sscanf(argv[3], "%x", &pid); + sscanf(argv[3], "%lx", &pid); child_process_check_pid(pid); return; } @@ -4240,7 +4241,7 @@ START_TEST(pipe) { DWORD id; ProcessIdToSessionId(GetProcessId(GetCurrentProcess()), &id); - sscanf(argv[3], "%x", &id); + sscanf(argv[3], "%lx", &id); child_process_check_session_id(id); return; } @@ -4248,7 +4249,7 @@ START_TEST(pipe) { HANDLE handle; DWORD pid; - sscanf(argv[3], "%x", &pid); + sscanf(argv[3], "%lx", &pid); sscanf(argv[4], "%p", &handle); child_process_exit_process_async(pid, handle); return;
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/kernel32/tests/process.c | 939 +++++++++++++++++++++-------------------- 1 file changed, 470 insertions(+), 469 deletions(-)
diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c index a4af5bb57ff..4354b7c4db3 100644 --- a/dlls/kernel32/tests/process.c +++ b/dlls/kernel32/tests/process.c @@ -19,6 +19,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 <assert.h> #include <stdarg.h> @@ -47,7 +48,7 @@ do { \ int value = (actual); \ ok((expected) == value, "Expected " #actual " to be %d (" #expected ") is %d\n", \ - (expected), value); \ + (int)(expected), value); \ } while (0) #define expect_eq_s(expected, actual) \ do { \ @@ -343,11 +344,11 @@ static void doChild(const char* file, const char* option) /* output of startup info (Ansi) */ GetStartupInfoA(&siA); childPrintf(hFile, - "[StartupInfoA]\ncb=%08u\nlpDesktop=%s\nlpTitle=%s\n" - "dwX=%u\ndwY=%u\ndwXSize=%u\ndwYSize=%u\n" - "dwXCountChars=%u\ndwYCountChars=%u\ndwFillAttribute=%u\n" - "dwFlags=%u\nwShowWindow=%u\n" - "hStdInput=%lu\nhStdOutput=%lu\nhStdError=%lu\n\n", + "[StartupInfoA]\ncb=%08lu\nlpDesktop=%s\nlpTitle=%s\n" + "dwX=%lu\ndwY=%lu\ndwXSize=%lu\ndwYSize=%lu\n" + "dwXCountChars=%lu\ndwYCountChars=%lu\ndwFillAttribute=%lu\n" + "dwFlags=%lu\nwShowWindow=%u\n" + "hStdInput=%Iu\nhStdOutput=%Iu\nhStdError=%Iu\n\n", siA.cb, encodeA(siA.lpDesktop), encodeA(siA.lpTitle), siA.dwX, siA.dwY, siA.dwXSize, siA.dwYSize, siA.dwXCountChars, siA.dwYCountChars, siA.dwFillAttribute, @@ -355,7 +356,7 @@ static void doChild(const char* file, const char* option) (DWORD_PTR)siA.hStdInput, (DWORD_PTR)siA.hStdOutput, (DWORD_PTR)siA.hStdError);
/* check the console handles in the TEB */ - childPrintf(hFile, "[TEB]\nhStdInput=%lu\nhStdOutput=%lu\nhStdError=%lu\n\n", + childPrintf(hFile, "[TEB]\nhStdInput=%Iu\nhStdOutput=%Iu\nhStdError=%Iu\n\n", (DWORD_PTR)params->hStdInput, (DWORD_PTR)params->hStdOutput, (DWORD_PTR)params->hStdError);
@@ -365,11 +366,11 @@ static void doChild(const char* file, const char* option) memset(&siW, 0, sizeof(siW)); GetStartupInfoW(&siW); childPrintf(hFile, - "[StartupInfoW]\ncb=%08u\nlpDesktop=%s\nlpTitle=%s\n" - "dwX=%u\ndwY=%u\ndwXSize=%u\ndwYSize=%u\n" - "dwXCountChars=%u\ndwYCountChars=%u\ndwFillAttribute=%u\n" - "dwFlags=%u\nwShowWindow=%u\n" - "hStdInput=%lu\nhStdOutput=%lu\nhStdError=%lu\n\n", + "[StartupInfoW]\ncb=%08lu\nlpDesktop=%s\nlpTitle=%s\n" + "dwX=%lu\ndwY=%lu\ndwXSize=%lu\ndwYSize=%lu\n" + "dwXCountChars=%lu\ndwYCountChars=%lu\ndwFillAttribute=%lu\n" + "dwFlags=%lu\nwShowWindow=%u\n" + "hStdInput=%Iu\nhStdOutput=%Iu\nhStdError=%Iu\n\n", siW.cb, encodeW(siW.lpDesktop), encodeW(siW.lpTitle), siW.dwX, siW.dwY, siW.dwXSize, siW.dwYSize, siW.dwXCountChars, siW.dwYCountChars, siW.dwFillAttribute, @@ -387,7 +388,7 @@ static void doChild(const char* file, const char* option)
/* output toolhelp information */ snapshot = pCreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); - ok(snapshot != INVALID_HANDLE_VALUE, "CreateToolhelp32Snapshot failed %u\n", GetLastError()); + ok(snapshot != INVALID_HANDLE_VALUE, "CreateToolhelp32Snapshot failed %lu\n", GetLastError()); memset(&pe, 0, sizeof(pe)); pe.dwSize = sizeof(pe); if (pProcess32First(snapshot, &pe)) @@ -398,9 +399,9 @@ static void doChild(const char* file, const char* option) CloseHandle(snapshot); ok(pe.th32ProcessID == GetCurrentProcessId(), "failed to find current process in snapshot\n"); childPrintf(hFile, - "[Toolhelp]\ncntUsage=%u\nth32DefaultHeapID=%lu\n" - "th32ModuleID=%u\ncntThreads=%u\nth32ParentProcessID=%u\n" - "pcPriClassBase=%u\ndwFlags=%u\nszExeFile=%s\n\n", + "[Toolhelp]\ncntUsage=%lu\nth32DefaultHeapID=%Iu\n" + "th32ModuleID=%lu\ncntThreads=%lu\nth32ParentProcessID=%lu\n" + "pcPriClassBase=%lu\ndwFlags=%lu\nszExeFile=%s\n\n", pe.cntUsage, pe.th32DefaultHeapID, pe.th32ModuleID, pe.cntThreads, pe.th32ParentProcessID, pe.pcPriClassBase, pe.dwFlags, encodeA(pe.szExeFile)); @@ -471,9 +472,9 @@ static void doChild(const char* file, const char* option) childPrintf(hFile, "InputCP=%d\nOutputCP=%d\n", GetConsoleCP(), GetConsoleOutputCP()); if (GetConsoleMode(hConIn, &modeIn)) - childPrintf(hFile, "InputMode=%u\n", modeIn); + childPrintf(hFile, "InputMode=%lu\n", modeIn); if (GetConsoleMode(hConOut, &modeOut)) - childPrintf(hFile, "OutputMode=%u\n", modeOut); + childPrintf(hFile, "OutputMode=%lu\n", modeOut);
/* now that we have written all relevant information, let's change it */ SetLastError(0xdeadbeef); @@ -489,13 +490,13 @@ static void doChild(const char* file, const char* option) }
ret = SetConsoleMode(hConIn, modeIn ^ 1); - ok( ret, "Setting mode (%d)\n", GetLastError()); + ok( ret, "Setting mode (%ld)\n", GetLastError()); ret = SetConsoleMode(hConOut, modeOut ^ 1); - ok( ret, "Setting mode (%d)\n", GetLastError()); + ok( ret, "Setting mode (%ld)\n", GetLastError()); sbi.dwCursorPosition.X ^= 1; sbi.dwCursorPosition.Y ^= 1; ret = SetConsoleCursorPosition(hConOut, sbi.dwCursorPosition); - ok( ret, "Setting cursor position (%d)\n", GetLastError()); + ok( ret, "Setting cursor position (%ld)\n", GetLastError()); } if (option && strcmp(option, "stdhandle") == 0) { @@ -896,25 +897,25 @@ static void test_CommandLine(void) memset(&info, 0xa, sizeof(info)); ok(!CreateProcessA(buffer, buffer, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info), "CreateProcess unexpectedly succeeded\n"); /* Check that the effective STARTUPINFOA parameters are not modified */ - ok(startup.cb == sizeof(startup), "unexpected cb %d\n", startup.cb); + ok(startup.cb == sizeof(startup), "unexpected cb %ld\n", startup.cb); ok(startup.lpDesktop == NULL, "lpDesktop is not NULL\n"); ok(startup.lpTitle == NULL, "lpTitle is not NULL\n"); - ok(startup.dwFlags == STARTF_USESHOWWINDOW, "unexpected dwFlags %04x\n", startup.dwFlags); + ok(startup.dwFlags == STARTF_USESHOWWINDOW, "unexpected dwFlags %04lx\n", startup.dwFlags); ok(startup.wShowWindow == SW_SHOWNORMAL, "unexpected wShowWindow %d\n", startup.wShowWindow); ok(!info.hProcess, "unexpected hProcess %p\n", info.hProcess); ok(!info.hThread, "unexpected hThread %p\n", info.hThread); - ok(!info.dwProcessId, "unexpected dwProcessId %04x\n", info.dwProcessId); - ok(!info.dwThreadId, "unexpected dwThreadId %04x\n", info.dwThreadId); + ok(!info.dwProcessId, "unexpected dwProcessId %04lx\n", info.dwProcessId); + ok(!info.dwThreadId, "unexpected dwThreadId %04lx\n", info.dwThreadId);
/* the basics; not getting confused by the leading and trailing " */ get_file_name(resfile); sprintf(buffer, ""%s" process dump "%s" "C:\Program Files\my nice app.exe"", selfname, resfile); ok(CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info), "CreateProcess\n"); /* Check that the effective STARTUPINFOA parameters are not modified */ - ok(startup.cb == sizeof(startup), "unexpected cb %d\n", startup.cb); + ok(startup.cb == sizeof(startup), "unexpected cb %ld\n", startup.cb); ok(startup.lpDesktop == NULL, "lpDesktop is not NULL\n"); ok(startup.lpTitle == NULL, "lpTitle is not NULL\n"); - ok(startup.dwFlags == STARTF_USESHOWWINDOW, "unexpected dwFlags %04x\n", startup.dwFlags); + ok(startup.dwFlags == STARTF_USESHOWWINDOW, "unexpected dwFlags %04lx\n", startup.dwFlags); ok(startup.wShowWindow == SW_SHOWNORMAL, "unexpected wShowWindow %d\n", startup.wShowWindow); wait_and_close_child_process(&info);
@@ -955,7 +956,7 @@ static void test_CommandLine(void) sprintf(buffer, "./%s process dump "%s" """"", exename, resfile); SetLastError(0xdeadbeef); ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info); - ok(ret, "CreateProcess (%s) failed : %d\n", buffer, GetLastError()); + ok(ret, "CreateProcess (%s) failed : %ld\n", buffer, GetLastError()); wait_and_close_child_process(&info);
reload_child_info(resfile); @@ -972,7 +973,7 @@ static void test_CommandLine(void) sprintf(buffer, ".\%s process dump "%s"", exename, resfile); SetLastError(0xdeadbeef); ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info); - ok(ret, "CreateProcess (%s) failed : %d\n", buffer, GetLastError()); + ok(ret, "CreateProcess (%s) failed : %ld\n", buffer, GetLastError()); wait_and_close_child_process(&info);
reload_child_info(resfile); @@ -988,7 +989,7 @@ static void test_CommandLine(void) else sprintf(buffer, "./%s process dump "%s"", exename, resfile); SetLastError(0xdeadbeef); ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info); - ok(ret, "CreateProcess (%s) failed : %d\n", buffer, GetLastError()); + ok(ret, "CreateProcess (%s) failed : %ld\n", buffer, GetLastError()); wait_and_close_child_process(&info);
reload_child_info(resfile); @@ -1010,7 +1011,7 @@ static void test_CommandLine(void) sprintf(buffer2, "dummy process dump "%s"", resfile); SetLastError(0xdeadbeef); ret = CreateProcessA(buffer, buffer2, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info); - ok(ret, "CreateProcess (%s) failed : %d\n", buffer, GetLastError()); + ok(ret, "CreateProcess (%s) failed : %ld\n", buffer, GetLastError()); wait_and_close_child_process(&info);
reload_child_info(resfile); @@ -1028,7 +1029,7 @@ static void test_CommandLine(void) ret = CreateProcessA(NULL, NULL, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info); ok(!ret, "CreateProcessA unexpectedly succeeded\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); }
buffer[0] = '\0'; @@ -1040,7 +1041,7 @@ static void test_CommandLine(void) ok(GetLastError() == ERROR_PATH_NOT_FOUND || broken(GetLastError() == ERROR_FILE_NOT_FOUND) /* Win9x/WinME */ || broken(GetLastError() == ERROR_ACCESS_DENIED) /* Win98 */, - "Expected ERROR_PATH_NOT_FOUND, got %d\n", GetLastError()); + "Expected ERROR_PATH_NOT_FOUND, got %ld\n", GetLastError());
buffer2[0] = '\0';
@@ -1051,7 +1052,7 @@ static void test_CommandLine(void) ok(GetLastError() == ERROR_PATH_NOT_FOUND || broken(GetLastError() == ERROR_FILE_NOT_FOUND) /* Win9x/WinME */ || broken(GetLastError() == ERROR_ACCESS_DENIED) /* Win98 */, - "Expected ERROR_PATH_NOT_FOUND, got %d\n", GetLastError()); + "Expected ERROR_PATH_NOT_FOUND, got %ld\n", GetLastError());
/* Test empty command line parameter. */ SetLastError(0xdeadbeef); @@ -1061,7 +1062,7 @@ static void test_CommandLine(void) GetLastError() == ERROR_PATH_NOT_FOUND /* NT4 */ || GetLastError() == ERROR_BAD_PATHNAME /* Win98 */ || GetLastError() == ERROR_INVALID_PARAMETER /* Win7 */, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %ld\n", GetLastError());
strcpy(buffer, "doesnotexist.exe"); strcpy(buffer2, "does not exist.exe"); @@ -1070,23 +1071,23 @@ static void test_CommandLine(void) SetLastError(0xdeadbeef); ret = CreateProcessA(buffer, NULL, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info); ok(!ret, "CreateProcessA unexpectedly succeeded\n"); - 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 = CreateProcessA(buffer2, NULL, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info); ok(!ret, "CreateProcessA unexpectedly succeeded\n"); - 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());
/* Test nonexistent command line parameter. */ SetLastError(0xdeadbeef); ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info); ok(!ret, "CreateProcessA unexpectedly succeeded\n"); - 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 = CreateProcessA(NULL, buffer2, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info); ok(!ret, "CreateProcessA unexpectedly succeeded\n"); - 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());
/* Test whether GetCommandLineW reads directly from TEB or from a cached address */ cmdline = GetCommandLineW(); @@ -1135,7 +1136,7 @@ static void test_Directory(void) memset(&info, 0, sizeof(info)); ok(!CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, 0L, NULL, "non\existent\directory", &startup, &info), "CreateProcess\n"); - ok(GetLastError() == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %ld\n", GetLastError()); ok(!TerminateProcess(info.hProcess, 0), "Child process should not exist\n"); }
@@ -1178,7 +1179,7 @@ static void test_Toolhelp(void) wait_child_process(info.hProcess);
process = OpenProcess(PROCESS_ALL_ACCESS_NT4, FALSE, info.dwProcessId); - ok(process != NULL, "OpenProcess failed %u\n", GetLastError()); + ok(process != NULL, "OpenProcess failed %lu\n", GetLastError()); CloseHandle(process);
CloseHandle(info.hProcess); @@ -1188,7 +1189,7 @@ static void test_Toolhelp(void) { SetLastError(0xdeadbeef); process = OpenProcess(PROCESS_ALL_ACCESS_NT4, FALSE, info.dwProcessId); - ok(process || GetLastError() == ERROR_INVALID_PARAMETER, "OpenProcess failed %u\n", GetLastError()); + ok(process || GetLastError() == ERROR_INVALID_PARAMETER, "OpenProcess failed %lu\n", GetLastError()); if (!process) break; CloseHandle(process); Sleep(100); @@ -1202,7 +1203,7 @@ static void test_Toolhelp(void) DeleteFileA(resfile);
snapshot = pCreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); - ok(snapshot != INVALID_HANDLE_VALUE, "CreateToolhelp32Snapshot failed %u\n", GetLastError()); + ok(snapshot != INVALID_HANDLE_VALUE, "CreateToolhelp32Snapshot failed %lu\n", GetLastError()); memset(&pe, 0, sizeof(pe)); pe.dwSize = sizeof(pe); if (pProcess32First(snapshot, &pe)) @@ -1212,14 +1213,14 @@ static void test_Toolhelp(void) } CloseHandle(snapshot); ok(pe.th32ProcessID == nested_pid, "failed to find nested child process\n"); - ok(pe.th32ParentProcessID == info.dwProcessId, "nested child process has parent %u instead of %u\n", pe.th32ParentProcessID, info.dwProcessId); + ok(pe.th32ParentProcessID == info.dwProcessId, "nested child process has parent %lu instead of %lu\n", pe.th32ParentProcessID, info.dwProcessId); ok(stricmp(pe.szExeFile, exename) == 0, "nested executable is %s instead of %s\n", pe.szExeFile, exename);
process = OpenProcess(PROCESS_ALL_ACCESS_NT4, FALSE, pe.th32ProcessID); - ok(process != NULL, "OpenProcess failed %u\n", GetLastError()); + ok(process != NULL, "OpenProcess failed %lu\n", GetLastError());
snapshot = pCreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, 0); - ok(snapshot != INVALID_HANDLE_VALUE, "CreateToolhelp32Snapshot failed %u\n", GetLastError()); + ok(snapshot != INVALID_HANDLE_VALUE, "CreateToolhelp32Snapshot failed %lu\n", GetLastError()); memset(&te, 0, sizeof(te)); te.dwSize = sizeof(te); if (pThread32First(snapshot, &te)) @@ -1231,9 +1232,9 @@ static void test_Toolhelp(void) ok(te.th32OwnerProcessID == pe.th32ProcessID, "failed to find suspended thread\n");
thread = OpenThread(THREAD_ALL_ACCESS_NT4, FALSE, te.th32ThreadID); - ok(thread != NULL, "OpenThread failed %u\n", GetLastError()); + ok(thread != NULL, "OpenThread failed %lu\n", GetLastError()); ret = ResumeThread(thread); - ok(ret == 1, "expected 1, got %u\n", ret); + ok(ret == 1, "expected 1, got %lu\n", ret); CloseHandle(thread);
wait_child_process(process); @@ -1475,7 +1476,7 @@ static void test_DebuggingFlag(void) if (!dbg) { ok(de.dwDebugEventCode == CREATE_PROCESS_DEBUG_EVENT, - "first event: %d\n", de.dwDebugEventCode); + "first event: %ld\n", de.dwDebugEventCode); processbase = de.u.CreateProcessInfo.lpBaseOfImage; } if (de.dwDebugEventCode != EXCEPTION_DEBUG_EVENT) dbg++; @@ -1581,7 +1582,7 @@ static void test_Console(void) ok(!SetConsoleCP(0), "Shouldn't succeed\n"); ok(GetLastError()==ERROR_INVALID_PARAMETER || broken(GetLastError() == ERROR_CALL_NOT_IMPLEMENTED), /* win9x */ - "GetLastError: expecting %u got %u\n", + "GetLastError: expecting %u got %lu\n", ERROR_INVALID_PARAMETER, GetLastError()); if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) run_tests = FALSE; @@ -1591,7 +1592,7 @@ static void test_Console(void) ok(!SetConsoleOutputCP(0), "Shouldn't succeed\n"); ok(GetLastError()==ERROR_INVALID_PARAMETER || broken(GetLastError() == ERROR_CALL_NOT_IMPLEMENTED), /* win9x */ - "GetLastError: expecting %u got %u\n", + "GetLastError: expecting %u got %lu\n", ERROR_INVALID_PARAMETER, GetLastError());
SetConsoleCP(cpIn); @@ -1636,8 +1637,8 @@ static void test_Console(void)
if (run_tests) { - ok(cpInC == 1252, "Wrong console CP (expected 1252 got %d/%d)\n", cpInC, cpIn); - ok(cpOutC == 1252, "Wrong console-SB CP (expected 1252 got %d/%d)\n", cpOutC, cpOut); + ok(cpInC == 1252, "Wrong console CP (expected 1252 got %ld/%ld)\n", cpInC, cpIn); + ok(cpOutC == 1252, "Wrong console-SB CP (expected 1252 got %ld/%ld)\n", cpOutC, cpOut); } else win_skip("Setting the codepage is not implemented\n"); @@ -1676,7 +1677,7 @@ static void test_Console(void)
msg_len = strlen(msg) + 1; ok(WriteFile(hParentOut, msg, msg_len, &w, NULL), "Writing to child\n"); - ok(w == msg_len, "Should have written %u bytes, actually wrote %u\n", msg_len, w); + ok(w == msg_len, "Should have written %u bytes, actually wrote %lu\n", msg_len, w); memset(buffer, 0, sizeof(buffer)); ok(ReadFile(hParentIn, buffer, sizeof(buffer), &w, NULL), "Reading from child\n"); ok(strcmp(buffer, msg) == 0, "Should have received '%s'\n", msg); @@ -1731,7 +1732,7 @@ static void test_OpenProcess(void)
/* without PROCESS_VM_OPERATION */ hproc = OpenProcess(PROCESS_ALL_ACCESS_NT4 & ~PROCESS_VM_OPERATION, FALSE, GetCurrentProcessId()); - ok(hproc != NULL, "OpenProcess error %d\n", GetLastError()); + ok(hproc != NULL, "OpenProcess error %ld\n", GetLastError());
SetLastError(0xdeadbeef); addr1 = VirtualAllocEx(hproc, 0, 0xFFFC, MEM_RESERVE, PAGE_NOACCESS); @@ -1742,35 +1743,35 @@ static void test_OpenProcess(void) win_skip("VirtualAllocEx not implemented\n"); return; } - ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error %d\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error %ld\n", GetLastError());
read_bytes = 0xdeadbeef; SetLastError(0xdeadbeef); ret = ReadProcessMemory(hproc, test_OpenProcess, &dummy, sizeof(dummy), &read_bytes); - ok(ret, "ReadProcessMemory error %d\n", GetLastError()); - ok(read_bytes == sizeof(dummy), "wrong read bytes %ld\n", read_bytes); + ok(ret, "ReadProcessMemory error %ld\n", GetLastError()); + ok(read_bytes == sizeof(dummy), "wrong read bytes %Id\n", read_bytes);
CloseHandle(hproc);
hproc = OpenProcess(PROCESS_VM_OPERATION, FALSE, GetCurrentProcessId()); - ok(hproc != NULL, "OpenProcess error %d\n", GetLastError()); + ok(hproc != NULL, "OpenProcess error %ld\n", GetLastError());
addr1 = VirtualAllocEx(hproc, 0, 0xFFFC, MEM_RESERVE, PAGE_NOACCESS); - ok(addr1 != NULL, "VirtualAllocEx error %d\n", GetLastError()); + ok(addr1 != NULL, "VirtualAllocEx error %ld\n", GetLastError());
/* without PROCESS_QUERY_INFORMATION */ SetLastError(0xdeadbeef); ok(!VirtualQueryEx(hproc, addr1, &info, sizeof(info)), "VirtualQueryEx without PROCESS_QUERY_INFORMATION rights should fail\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error %d\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error %ld\n", GetLastError());
/* without PROCESS_VM_READ */ read_bytes = 0xdeadbeef; SetLastError(0xdeadbeef); ok(!ReadProcessMemory(hproc, addr1, &dummy, sizeof(dummy), &read_bytes), "ReadProcessMemory without PROCESS_VM_READ rights should fail\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error %d\n", GetLastError()); - ok(read_bytes == 0, "wrong read bytes %ld\n", read_bytes); + ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error %ld\n", GetLastError()); + ok(read_bytes == 0, "wrong read bytes %Id\n", read_bytes);
CloseHandle(hproc);
@@ -1778,23 +1779,23 @@ static void test_OpenProcess(void)
memset(&info, 0xcc, sizeof(info)); read_bytes = VirtualQueryEx(hproc, addr1, &info, sizeof(info)); - ok(read_bytes == sizeof(info), "VirtualQueryEx error %d\n", GetLastError()); + ok(read_bytes == sizeof(info), "VirtualQueryEx error %ld\n", GetLastError());
ok(info.BaseAddress == addr1, "%p != %p\n", info.BaseAddress, addr1); ok(info.AllocationBase == addr1, "%p != %p\n", info.AllocationBase, addr1); - ok(info.AllocationProtect == PAGE_NOACCESS, "%x != PAGE_NOACCESS\n", info.AllocationProtect); - ok(info.RegionSize == 0x10000, "%lx != 0x10000\n", info.RegionSize); - ok(info.State == MEM_RESERVE, "%x != MEM_RESERVE\n", info.State); + ok(info.AllocationProtect == PAGE_NOACCESS, "%lx != PAGE_NOACCESS\n", info.AllocationProtect); + ok(info.RegionSize == 0x10000, "%Ix != 0x10000\n", info.RegionSize); + ok(info.State == MEM_RESERVE, "%lx != MEM_RESERVE\n", info.State); /* NT reports Protect == 0 for a not committed memory block */ ok(info.Protect == 0 /* NT */ || info.Protect == PAGE_NOACCESS, /* Win9x */ - "%x != PAGE_NOACCESS\n", info.Protect); - ok(info.Type == MEM_PRIVATE, "%x != MEM_PRIVATE\n", info.Type); + "%lx != PAGE_NOACCESS\n", info.Protect); + ok(info.Type == MEM_PRIVATE, "%lx != MEM_PRIVATE\n", info.Type);
SetLastError(0xdeadbeef); ok(!VirtualFreeEx(hproc, addr1, 0, MEM_RELEASE), "VirtualFreeEx without PROCESS_VM_OPERATION rights should fail\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error %d\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error %ld\n", GetLastError());
CloseHandle(hproc);
@@ -1806,22 +1807,22 @@ static void test_OpenProcess(void) read_bytes = VirtualQueryEx(hproc, addr1, &info, sizeof(info)); if (read_bytes) /* win8 */ { - ok(read_bytes == sizeof(info), "VirtualQueryEx error %d\n", GetLastError()); + ok(read_bytes == sizeof(info), "VirtualQueryEx error %ld\n", GetLastError()); ok(info.BaseAddress == addr1, "%p != %p\n", info.BaseAddress, addr1); ok(info.AllocationBase == addr1, "%p != %p\n", info.AllocationBase, addr1); - ok(info.AllocationProtect == PAGE_NOACCESS, "%x != PAGE_NOACCESS\n", info.AllocationProtect); - ok(info.RegionSize == 0x10000, "%lx != 0x10000\n", info.RegionSize); - ok(info.State == MEM_RESERVE, "%x != MEM_RESERVE\n", info.State); - ok(info.Protect == 0, "%x != PAGE_NOACCESS\n", info.Protect); - ok(info.Type == MEM_PRIVATE, "%x != MEM_PRIVATE\n", info.Type); + ok(info.AllocationProtect == PAGE_NOACCESS, "%lx != PAGE_NOACCESS\n", info.AllocationProtect); + ok(info.RegionSize == 0x10000, "%Ix != 0x10000\n", info.RegionSize); + ok(info.State == MEM_RESERVE, "%lx != MEM_RESERVE\n", info.State); + ok(info.Protect == 0, "%lx != PAGE_NOACCESS\n", info.Protect); + ok(info.Type == MEM_PRIVATE, "%lx != MEM_PRIVATE\n", info.Type); } else /* before win8 */ - ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error %d\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ok(!VirtualFreeEx(hproc, addr1, 0, MEM_RELEASE), "VirtualFreeEx without PROCESS_VM_OPERATION rights should fail\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error %d\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error %ld\n", GetLastError());
CloseHandle(hproc); } @@ -1838,11 +1839,11 @@ static void test_GetProcessVersion(void)
SetLastError(0xdeadbeef); ret = GetProcessVersion(0); - ok(ret, "GetProcessVersion error %u\n", GetLastError()); + ok(ret, "GetProcessVersion error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = GetProcessVersion(GetCurrentProcessId()); - ok(ret, "GetProcessVersion error %u\n", GetLastError()); + ok(ret, "GetProcessVersion error %lu\n", GetLastError());
memset(&si, 0, sizeof(si)); si.cb = sizeof(si); @@ -1850,15 +1851,15 @@ static void test_GetProcessVersion(void) si.wShowWindow = SW_HIDE; SetLastError(0xdeadbeef); ret = CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret, "CreateProcess error %u\n", GetLastError()); + ok(ret, "CreateProcess error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = GetProcessVersion(pi.dwProcessId); - ok(ret, "GetProcessVersion error %u\n", GetLastError()); + ok(ret, "GetProcessVersion error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = TerminateProcess(pi.hProcess, 0); - ok(ret, "TerminateProcess error %u\n", GetLastError()); + ok(ret, "TerminateProcess error %lu\n", GetLastError());
CloseHandle(pi.hProcess); CloseHandle(pi.hThread); @@ -1880,7 +1881,7 @@ static void test_GetProcessImageFileNameA(void) SetLastError(0xdeadbeef); rc = pK32GetProcessImageFileNameA(GetCurrentProcess(), NULL, 0); ok(!rc && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "K32GetProcessImageFileNameA(no buffer): returned %u, le=%u\n", rc, GetLastError()); + "K32GetProcessImageFileNameA(no buffer): returned %lu, le=%lu\n", rc, GetLastError());
*process = '\0'; rc = pK32GetProcessImageFileNameA(GetCurrentProcess(), process, sizeof(process)); @@ -1920,7 +1921,7 @@ static void test_QueryFullProcessImageNameA(void) *module = '\0'; SetLastError(0); /* old Windows don't reset it on success */ size = GetModuleFileNameA(NULL, module, sizeof(module)); - ok(size && GetLastError() != ERROR_INSUFFICIENT_BUFFER, "GetModuleFileName failed: %u le=%u\n", size, GetLastError()); + ok(size && GetLastError() != ERROR_INSUFFICIENT_BUFFER, "GetModuleFileName failed: %lu le=%lu\n", size, GetLastError());
/* get the buffer length without \0 terminator */ length = sizeof(buf); @@ -2059,9 +2060,9 @@ static void test_QueryFullProcessImageNameW(void) module_name[2] = '\0'; *device = '\0'; size = QueryDosDeviceW(module_name, device, ARRAY_SIZE(device)); - ok(size, "QueryDosDeviceW failed: le=%u\n", GetLastError()); + ok(size, "QueryDosDeviceW failed: le=%lu\n", GetLastError()); len = lstrlenW(device); - ok(size >= len+2, "expected %d to be greater than %d+2 = strlen(%s)\n", size, len, wine_dbgstr_w(device)); + ok(size >= len+2, "expected %ld to be greater than %ld+2 = strlen(%s)\n", size, len, wine_dbgstr_w(device));
if (size >= lstrlenW(buf)) { @@ -2089,25 +2090,25 @@ static void test_Handles(void) handle == (HANDLE)(ULONG_PTR)0x7fffffff /* win9x */, "invalid current process handle %p\n", handle ); ret = GetExitCodeProcess( handle, &code ); - ok( ret, "GetExitCodeProcess failed err %u\n", GetLastError() ); + ok( ret, "GetExitCodeProcess failed err %lu\n", GetLastError() ); #ifdef _WIN64 /* truncated handle */ SetLastError( 0xdeadbeef ); handle = (HANDLE)((ULONG_PTR)handle & ~0u); ret = GetExitCodeProcess( handle, &code ); ok( !ret, "GetExitCodeProcess succeeded for %p\n", handle ); - ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %lu\n", GetLastError() ); /* sign-extended handle */ SetLastError( 0xdeadbeef ); handle = (HANDLE)((LONG_PTR)(int)(ULONG_PTR)handle); ret = GetExitCodeProcess( handle, &code ); - ok( ret, "GetExitCodeProcess failed err %u\n", GetLastError() ); + ok( ret, "GetExitCodeProcess failed err %lu\n", GetLastError() ); /* invalid high-word */ SetLastError( 0xdeadbeef ); handle = (HANDLE)(((ULONG_PTR)handle & ~0u) + ((ULONG_PTR)1 << 32)); ret = GetExitCodeProcess( handle, &code ); ok( !ret, "GetExitCodeProcess succeeded for %p\n", handle ); - ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %lu\n", GetLastError() ); #endif
handle = GetStdHandle( STD_ERROR_HANDLE ); @@ -2215,7 +2216,7 @@ static void test_IsWow64Process2(void) SetLastError(0xdeadbeef); machine = native_machine = 0xdead; ret = pIsWow64Process2(pi.hProcess, &machine, &native_machine); - ok(ret, "IsWow64Process2 error %u\n", GetLastError()); + ok(ret, "IsWow64Process2 error %lu\n", GetLastError());
#if defined(__i386__) || defined(__x86_64__) ok(machine == IMAGE_FILE_MACHINE_I386, "got %#x\n", machine); @@ -2236,16 +2237,16 @@ static void test_IsWow64Process2(void) si.cb = sizeof(si); SetLastError(0xdeadbeef); ret = CreateProcessA(cmdline, NULL, NULL, NULL, FALSE, CREATE_SUSPENDED, NULL, NULL, &si, &pi); - ok(ret, "CreateProcess error %u\n", GetLastError()); + ok(ret, "CreateProcess error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = pIsWow64Process(pi.hProcess, &is_wow64); - ok(ret, "IsWow64Process error %u\n", GetLastError()); + ok(ret, "IsWow64Process error %lu\n", GetLastError());
SetLastError(0xdeadbeef); machine = native_machine = 0xdead; ret = pIsWow64Process2(pi.hProcess, &machine, &native_machine); - ok(ret, "IsWow64Process2 error %u\n", GetLastError()); + ok(ret, "IsWow64Process2 error %lu\n", GetLastError());
ok(machine == IMAGE_FILE_MACHINE_UNKNOWN, "got %#x\n", machine); ok(native_machine == expect_native, "got %#x\n", native_machine); @@ -2253,7 +2254,7 @@ static void test_IsWow64Process2(void) SetLastError(0xdeadbeef); machine = 0xdead; ret = pIsWow64Process2(pi.hProcess, &machine, NULL); - ok(ret, "IsWow64Process2 error %u\n", GetLastError()); + ok(ret, "IsWow64Process2 error %lu\n", GetLastError()); ok(machine == IMAGE_FILE_MACHINE_UNKNOWN, "got %#x\n", machine);
ret = TerminateProcess(pi.hProcess, 0); @@ -2264,12 +2265,12 @@ static void test_IsWow64Process2(void)
SetLastError(0xdeadbeef); ret = pIsWow64Process(GetCurrentProcess(), &is_wow64); - ok(ret, "IsWow64Process error %u\n", GetLastError()); + ok(ret, "IsWow64Process error %lu\n", GetLastError());
SetLastError(0xdeadbeef); machine = native_machine = 0xdead; ret = pIsWow64Process2(GetCurrentProcess(), &machine, &native_machine); - ok(ret, "IsWow64Process2 error %u\n", GetLastError()); + ok(ret, "IsWow64Process2 error %lu\n", GetLastError());
if (is_wow64) { @@ -2285,7 +2286,7 @@ static void test_IsWow64Process2(void) SetLastError(0xdeadbeef); machine = 0xdead; ret = pIsWow64Process2(GetCurrentProcess(), &machine, NULL); - ok(ret, "IsWow64Process2 error %u\n", GetLastError()); + ok(ret, "IsWow64Process2 error %lu\n", GetLastError()); if (is_wow64) ok(machine == IMAGE_FILE_MACHINE_I386, "got %#x\n", machine); else @@ -2315,7 +2316,7 @@ static void test_SystemInfo(void) "Expected PROCESSOR_ARCHITECTURE_AMD64, got %d\n", S(U(nsi)).wProcessorArchitecture); ok(nsi.dwProcessorType == PROCESSOR_AMD_X8664, - "Expected PROCESSOR_AMD_X8664, got %d\n", + "Expected PROCESSOR_AMD_X8664, got %ld\n", nsi.dwProcessorType); } } @@ -2325,7 +2326,7 @@ static void test_SystemInfo(void) "Expected no difference for wProcessorArchitecture, got %d and %d\n", S(U(si)).wProcessorArchitecture, S(U(nsi)).wProcessorArchitecture); ok(si.dwProcessorType == nsi.dwProcessorType, - "Expected no difference for dwProcessorType, got %d and %d\n", + "Expected no difference for dwProcessorType, got %ld and %ld\n", si.dwProcessorType, nsi.dwProcessorType); } } @@ -2343,7 +2344,7 @@ static void test_ProcessorCount(void) active = pGetActiveProcessorCount(ALL_PROCESSOR_GROUPS); maximum = pGetMaximumProcessorCount(ALL_PROCESSOR_GROUPS); ok(active <= maximum, - "Number of active processors %i is greater than maximum number of processors %i\n", + "Number of active processors %li is greater than maximum number of processors %li\n", active, maximum); }
@@ -2387,26 +2388,26 @@ static void test_TerminateProcess(void) si.cb = sizeof(si); SetLastError(0xdeadbeef); ret = CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, CREATE_SUSPENDED, NULL, NULL, &si, &pi); - ok(ret, "CreateProcess error %u\n", GetLastError()); + ok(ret, "CreateProcess error %lu\n", GetLastError());
SetLastError(0xdeadbeef); thread = CreateRemoteThread(pi.hProcess, NULL, 0, (void *)0xdeadbeef, NULL, CREATE_SUSPENDED, &ret); - ok(thread != 0, "CreateRemoteThread error %d\n", GetLastError()); + ok(thread != 0, "CreateRemoteThread error %ld\n", GetLastError());
/* create a not closed thread handle duplicate in the target process */ SetLastError(0xdeadbeef); ret = DuplicateHandle(GetCurrentProcess(), thread, pi.hProcess, &dummy, 0, FALSE, DUPLICATE_SAME_ACCESS); - ok(ret, "DuplicateHandle error %u\n", GetLastError()); + ok(ret, "DuplicateHandle error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = TerminateThread(thread, 0); - ok(ret, "TerminateThread error %u\n", GetLastError()); + ok(ret, "TerminateThread error %lu\n", GetLastError()); CloseHandle(thread);
SetLastError(0xdeadbeef); ret = TerminateProcess(pi.hProcess, 0); - ok(ret, "TerminateProcess error %u\n", GetLastError()); + ok(ret, "TerminateProcess error %lu\n", GetLastError());
CloseHandle(pi.hProcess); CloseHandle(pi.hThread); @@ -2422,20 +2423,20 @@ static void test_DuplicateHandle(void) r = DuplicateHandle(GetCurrentProcess(), GetCurrentProcess(), GetCurrentProcess(), &out, 0, FALSE, DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE); - ok(r, "DuplicateHandle error %u\n", GetLastError()); + ok(r, "DuplicateHandle error %lu\n", GetLastError()); r = GetHandleInformation(out, &info); - ok(r, "GetHandleInformation error %u\n", GetLastError()); - ok(info == 0, "info = %x\n", info); + ok(r, "GetHandleInformation error %lu\n", GetLastError()); + ok(info == 0, "info = %lx\n", info); ok(out != GetCurrentProcess(), "out = GetCurrentProcess()\n"); CloseHandle(out);
r = DuplicateHandle(GetCurrentProcess(), GetCurrentProcess(), GetCurrentProcess(), &out, 0, TRUE, DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE); - ok(r, "DuplicateHandle error %u\n", GetLastError()); + ok(r, "DuplicateHandle error %lu\n", GetLastError()); r = GetHandleInformation(out, &info); - ok(r, "GetHandleInformation error %u\n", GetLastError()); - ok(info == HANDLE_FLAG_INHERIT, "info = %x\n", info); + ok(r, "GetHandleInformation error %lu\n", GetLastError()); + ok(info == HANDLE_FLAG_INHERIT, "info = %lx\n", info); ok(out != GetCurrentProcess(), "out = GetCurrentProcess()\n"); CloseHandle(out);
@@ -2450,31 +2451,31 @@ static void test_DuplicateHandle(void)
r = DuplicateHandle(GetCurrentProcess(), f, GetCurrentProcess(), &out, 0, FALSE, DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE); - ok(r, "DuplicateHandle error %u\n", GetLastError()); + ok(r, "DuplicateHandle error %lu\n", GetLastError()); ok(f == out, "f != out\n"); r = GetHandleInformation(out, &info); - ok(r, "GetHandleInformation error %u\n", GetLastError()); - ok(info == 0, "info = %x\n", info); + ok(r, "GetHandleInformation error %lu\n", GetLastError()); + ok(info == 0, "info = %lx\n", info);
r = DuplicateHandle(GetCurrentProcess(), f, GetCurrentProcess(), &out, 0, TRUE, DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE); - ok(r, "DuplicateHandle error %u\n", GetLastError()); + ok(r, "DuplicateHandle error %lu\n", GetLastError()); ok(f == out, "f != out\n"); r = GetHandleInformation(out, &info); - ok(r, "GetHandleInformation error %u\n", GetLastError()); - ok(info == HANDLE_FLAG_INHERIT, "info = %x\n", info); + ok(r, "GetHandleInformation error %lu\n", GetLastError()); + ok(info == HANDLE_FLAG_INHERIT, "info = %lx\n", info);
r = SetHandleInformation(f, HANDLE_FLAG_PROTECT_FROM_CLOSE, HANDLE_FLAG_PROTECT_FROM_CLOSE); - ok(r, "SetHandleInformation error %u\n", GetLastError()); + ok(r, "SetHandleInformation error %lu\n", GetLastError()); r = DuplicateHandle(GetCurrentProcess(), f, GetCurrentProcess(), &out, 0, TRUE, DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE); - ok(r, "DuplicateHandle error %u\n", GetLastError()); + ok(r, "DuplicateHandle error %lu\n", GetLastError()); ok(f != out, "f == out\n"); r = GetHandleInformation(out, &info); - ok(r, "GetHandleInformation error %u\n", GetLastError()); - ok(info == HANDLE_FLAG_INHERIT, "info = %x\n", info); + ok(r, "GetHandleInformation error %lu\n", GetLastError()); + ok(info == HANDLE_FLAG_INHERIT, "info = %lx\n", info); r = SetHandleInformation(f, HANDLE_FLAG_PROTECT_FROM_CLOSE, 0); - ok(r, "SetHandleInformation error %u\n", GetLastError()); + ok(r, "SetHandleInformation error %lu\n", GetLastError());
/* Test if DuplicateHandle allocates first free handle */ if (f > out) @@ -2489,7 +2490,7 @@ static void test_DuplicateHandle(void) CloseHandle(fmin); r = DuplicateHandle(GetCurrentProcess(), f, GetCurrentProcess(), &out, 0, TRUE, DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE); - ok(r, "DuplicateHandle error %u\n", GetLastError()); + ok(r, "DuplicateHandle error %lu\n", GetLastError()); ok(f == out, "f != out\n"); CloseHandle(out); DeleteFileA(file_name); @@ -2504,7 +2505,7 @@ static void test_DuplicateHandle(void)
r = DuplicateHandle(GetCurrentProcess(), f, GetCurrentProcess(), &out, 0, FALSE, DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE); - ok(r, "DuplicateHandle error %u\n", GetLastError()); + ok(r, "DuplicateHandle error %lu\n", GetLastError()); todo_wine ok(f != out, "f == out\n"); CloseHandle(out); } @@ -2519,10 +2520,10 @@ static void _test_completion(int line, HANDLE port, DWORD ekey, ULONG_PTR evalue
ret = GetQueuedCompletionStatus(port, &key, &value, &overlapped, wait);
- ok_(__FILE__, line)(ret, "GetQueuedCompletionStatus: %x\n", GetLastError()); + ok_(__FILE__, line)(ret, "GetQueuedCompletionStatus: %lx\n", GetLastError()); if (ret) { - ok_(__FILE__, line)(key == ekey, "unexpected key %x\n", key); + ok_(__FILE__, line)(key == ekey, "unexpected key %lx\n", key); ok_(__FILE__, line)(value == evalue, "unexpected value %p\n", (void *)value); ok_(__FILE__, line)(overlapped == (LPOVERLAPPED)eoverlapped, "unexpected overlapped %p\n", overlapped); } @@ -2538,7 +2539,7 @@ static void _create_process(int line, const char *command, LPPROCESS_INFORMATION sprintf(buffer, ""%s" process %s", selfname, command);
ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0, NULL, NULL, &si, pi); - ok_(__FILE__, line)(ret, "CreateProcess error %u\n", GetLastError()); + ok_(__FILE__, line)(ret, "CreateProcess error %lu\n", GetLastError()); }
@@ -2555,39 +2556,39 @@ static void test_IsProcessInJob(void) }
job = pCreateJobObjectW(NULL, NULL); - ok(job != NULL, "CreateJobObject error %u\n", GetLastError()); + ok(job != NULL, "CreateJobObject error %lu\n", GetLastError());
job2 = pCreateJobObjectW(NULL, NULL); - ok(job2 != NULL, "CreateJobObject error %u\n", GetLastError()); + ok(job2 != NULL, "CreateJobObject error %lu\n", GetLastError());
create_process("wait", &pi);
out = TRUE; ret = pIsProcessInJob(pi.hProcess, job, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(!out, "IsProcessInJob returned out=%u\n", out);
out = TRUE; ret = pIsProcessInJob(pi.hProcess, job2, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(!out, "IsProcessInJob returned out=%u\n", out);
ret = pAssignProcessToJobObject(job, pi.hProcess); - ok(ret, "AssignProcessToJobObject error %u\n", GetLastError()); + ok(ret, "AssignProcessToJobObject error %lu\n", GetLastError());
out = FALSE; ret = pIsProcessInJob(pi.hProcess, job, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(out, "IsProcessInJob returned out=%u\n", out);
out = TRUE; ret = pIsProcessInJob(pi.hProcess, job2, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(!out, "IsProcessInJob returned out=%u\n", out);
out = FALSE; ret = pIsProcessInJob(pi.hProcess, NULL, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(out, "IsProcessInJob returned out=%u\n", out);
TerminateProcess(pi.hProcess, 0); @@ -2595,7 +2596,7 @@ static void test_IsProcessInJob(void)
out = FALSE; ret = pIsProcessInJob(pi.hProcess, job, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(out, "IsProcessInJob returned out=%u\n", out);
CloseHandle(pi.hProcess); @@ -2612,25 +2613,25 @@ static void test_TerminateJobObject(void) DWORD dwret;
job = pCreateJobObjectW(NULL, NULL); - ok(job != NULL, "CreateJobObject error %u\n", GetLastError()); + ok(job != NULL, "CreateJobObject error %lu\n", GetLastError());
create_process("wait", &pi);
ret = pAssignProcessToJobObject(job, pi.hProcess); - ok(ret, "AssignProcessToJobObject error %u\n", GetLastError()); + ok(ret, "AssignProcessToJobObject error %lu\n", GetLastError());
ret = pTerminateJobObject(job, 123); - ok(ret, "TerminateJobObject error %u\n", GetLastError()); + ok(ret, "TerminateJobObject error %lu\n", GetLastError());
/* not wait_child_process() because of the exit code */ dwret = WaitForSingleObject(pi.hProcess, 1000); - ok(dwret == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", dwret); + ok(dwret == WAIT_OBJECT_0, "WaitForSingleObject returned %lu\n", dwret); if (dwret == WAIT_TIMEOUT) TerminateProcess(pi.hProcess, 0);
ret = GetExitCodeProcess(pi.hProcess, &dwret); - ok(ret, "GetExitCodeProcess error %u\n", GetLastError()); + ok(ret, "GetExitCodeProcess error %lu\n", GetLastError()); ok(dwret == 123 || broken(dwret == 0) /* randomly fails on Win 2000 / XP */, - "wrong exitcode %u\n", dwret); + "wrong exitcode %lu\n", dwret);
CloseHandle(pi.hProcess); CloseHandle(pi.hThread); @@ -2664,27 +2665,27 @@ static void test_QueryInformationJobObject(void) BOOL ret;
job = pCreateJobObjectW(NULL, NULL); - ok(job != NULL, "CreateJobObject error %u\n", GetLastError()); + ok(job != NULL, "CreateJobObject error %lu\n", GetLastError());
/* Only active processes are returned */ - sprintf(buffer, "sync kernel32-process-%x", GetCurrentProcessId()); + sprintf(buffer, "sync kernel32-process-%lx", GetCurrentProcessId()); sem = CreateSemaphoreA(NULL, 0, 1, buffer + 5); - ok(sem != NULL, "CreateSemaphoreA failed le=%u\n", GetLastError()); + ok(sem != NULL, "CreateSemaphoreA failed le=%lu\n", GetLastError()); create_process(buffer, &pi[0]);
ret = pAssignProcessToJobObject(job, pi[0].hProcess); - ok(ret, "AssignProcessToJobObject error %u\n", GetLastError()); + ok(ret, "AssignProcessToJobObject error %lu\n", GetLastError());
ReleaseSemaphore(sem, 1, NULL); wait_and_close_child_process(&pi[0]);
create_process("wait", &pi[0]); ret = pAssignProcessToJobObject(job, pi[0].hProcess); - ok(ret, "AssignProcessToJobObject error %u\n", GetLastError()); + ok(ret, "AssignProcessToJobObject error %lu\n", GetLastError());
create_process("wait", &pi[1]); ret = pAssignProcessToJobObject(job, pi[1].hProcess); - ok(ret, "AssignProcessToJobObject error %u\n", GetLastError()); + ok(ret, "AssignProcessToJobObject error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = QueryInformationJobObject(job, JobObjectBasicProcessIdList, pid_list, @@ -2708,7 +2709,7 @@ static void test_QueryInformationJobObject(void)
memset(buf, 0, sizeof(buf)); ret = pQueryInformationJobObject(job, JobObjectBasicProcessIdList, pid_list, sizeof(buf), &ret_len); - ok(ret, "QueryInformationJobObject error %u\n", GetLastError()); + ok(ret, "QueryInformationJobObject error %lu\n", GetLastError()); if(ret) { if (pid_list->NumberOfAssignedProcesses == 3) /* Win 8 */ @@ -2718,7 +2719,7 @@ static void test_QueryInformationJobObject(void) ULONG_PTR *list = pid_list->ProcessIdList;
ok(ret_len == FIELD_OFFSET(JOBOBJECT_BASIC_PROCESS_ID_LIST, ProcessIdList[2]), - "QueryInformationJobObject returned ret_len=%u\n", ret_len); + "QueryInformationJobObject returned ret_len=%lu\n", ret_len);
expect_eq_d(2, pid_list->NumberOfAssignedProcesses); expect_eq_d(2, pid_list->NumberOfProcessIdsInList); @@ -2737,8 +2738,8 @@ static void test_QueryInformationJobObject(void) memset(basic_limit_info, 0x11, sizeof(*basic_limit_info)); ret = pQueryInformationJobObject(job, JobObjectBasicLimitInformation, basic_limit_info, sizeof(*basic_limit_info), &ret_len); - ok(ret, "QueryInformationJobObject error %u\n", GetLastError()); - ok(ret_len == sizeof(*basic_limit_info), "QueryInformationJobObject returned ret_len=%u\n", ret_len); + ok(ret, "QueryInformationJobObject error %lu\n", GetLastError()); + ok(ret_len == sizeof(*basic_limit_info), "QueryInformationJobObject returned ret_len=%lu\n", ret_len); expect_eq_d(0, basic_limit_info->LimitFlags);
/* test JobObjectExtendedLimitInformation */ @@ -2751,15 +2752,15 @@ static void test_QueryInformationJobObject(void) memset(&ext_limit_info, 0x11, sizeof(ext_limit_info)); ret = pQueryInformationJobObject(job, JobObjectExtendedLimitInformation, &ext_limit_info, sizeof(ext_limit_info), &ret_len); - ok(ret, "QueryInformationJobObject error %u\n", GetLastError()); - ok(ret_len == sizeof(ext_limit_info), "QueryInformationJobObject returned ret_len=%u\n", ret_len); + ok(ret, "QueryInformationJobObject error %lu\n", GetLastError()); + ok(ret_len == sizeof(ext_limit_info), "QueryInformationJobObject returned ret_len=%lu\n", ret_len); expect_eq_d(0, basic_limit_info->LimitFlags);
/* test JobObjectBasicAccountingInformation */ ret = pQueryInformationJobObject(job, JobObjectBasicAccountingInformation, &basic_accounting_info, sizeof(basic_accounting_info), &ret_len); - ok(ret, "QueryInformationJobObject error %u\n", GetLastError()); - ok(ret_len == sizeof(basic_accounting_info), "QueryInformationJobObject returned ret_len=%u\n", ret_len); + ok(ret, "QueryInformationJobObject error %lu\n", GetLastError()); + ok(ret_len == sizeof(basic_accounting_info), "QueryInformationJobObject returned ret_len=%lu\n", ret_len); expect_eq_d(3, basic_accounting_info.TotalProcesses); expect_eq_d(2, basic_accounting_info.ActiveProcesses);
@@ -2782,24 +2783,24 @@ static void test_CompletionPort(void) BOOL ret;
job = pCreateJobObjectW(NULL, NULL); - ok(job != NULL, "CreateJobObject error %u\n", GetLastError()); + ok(job != NULL, "CreateJobObject error %lu\n", GetLastError());
create_process("wait", &pi2); ret = pAssignProcessToJobObject(job, pi2.hProcess); - ok(ret, "AssignProcessToJobObject error %u\n", GetLastError()); + ok(ret, "AssignProcessToJobObject error %lu\n", GetLastError());
port = pCreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, 0, 1); - ok(port != NULL, "CreateIoCompletionPort error %u\n", GetLastError()); + ok(port != NULL, "CreateIoCompletionPort error %lu\n", GetLastError());
port_info.CompletionKey = job; port_info.CompletionPort = port; ret = pSetInformationJobObject(job, JobObjectAssociateCompletionPortInformation, &port_info, sizeof(port_info)); - ok(ret, "SetInformationJobObject error %u\n", GetLastError()); + ok(ret, "SetInformationJobObject error %lu\n", GetLastError());
create_process("wait", &pi);
ret = pAssignProcessToJobObject(job, pi.hProcess); - ok(ret, "AssignProcessToJobObject error %u\n", GetLastError()); + ok(ret, "AssignProcessToJobObject error %lu\n", GetLastError());
test_completion(port, JOB_OBJECT_MSG_NEW_PROCESS, (DWORD_PTR)job, pi2.dwProcessId, 0); test_completion(port, JOB_OBJECT_MSG_NEW_PROCESS, (DWORD_PTR)job, pi.dwProcessId, 0); @@ -2831,7 +2832,7 @@ static void test_KillOnJobClose(void) BOOL ret;
job = pCreateJobObjectW(NULL, NULL); - ok(job != NULL, "CreateJobObject error %u\n", GetLastError()); + ok(job != NULL, "CreateJobObject error %lu\n", GetLastError());
limit_info.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE; ret = pSetInformationJobObject(job, JobObjectExtendedLimitInformation, &limit_info, sizeof(limit_info)); @@ -2840,18 +2841,18 @@ static void test_KillOnJobClose(void) win_skip("Kill on job close limit not available\n"); return; } - ok(ret, "SetInformationJobObject error %u\n", GetLastError()); + ok(ret, "SetInformationJobObject error %lu\n", GetLastError());
create_process("wait", &pi);
ret = pAssignProcessToJobObject(job, pi.hProcess); - ok(ret, "AssignProcessToJobObject error %u\n", GetLastError()); + ok(ret, "AssignProcessToJobObject error %lu\n", GetLastError());
CloseHandle(job);
/* not wait_child_process() for the kill */ dwret = WaitForSingleObject(pi.hProcess, 1000); - ok(dwret == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", dwret); + ok(dwret == WAIT_OBJECT_0, "WaitForSingleObject returned %lu\n", dwret); if (dwret == WAIT_TIMEOUT) TerminateProcess(pi.hProcess, 0);
CloseHandle(pi.hProcess); @@ -2868,25 +2869,25 @@ static void test_WaitForJobObject(void)
/* test waiting for a job object when the process is killed */ job = pCreateJobObjectW(NULL, NULL); - ok(job != NULL, "CreateJobObject error %u\n", GetLastError()); + ok(job != NULL, "CreateJobObject error %lu\n", GetLastError());
dwret = WaitForSingleObject(job, 100); - ok(dwret == WAIT_TIMEOUT, "WaitForSingleObject returned %u\n", dwret); + ok(dwret == WAIT_TIMEOUT, "WaitForSingleObject returned %lu\n", dwret);
create_process("wait", &pi);
ret = pAssignProcessToJobObject(job, pi.hProcess); - ok(ret, "AssignProcessToJobObject error %u\n", GetLastError()); + ok(ret, "AssignProcessToJobObject error %lu\n", GetLastError());
dwret = WaitForSingleObject(job, 100); - ok(dwret == WAIT_TIMEOUT, "WaitForSingleObject returned %u\n", dwret); + ok(dwret == WAIT_TIMEOUT, "WaitForSingleObject returned %lu\n", dwret);
ret = pTerminateJobObject(job, 123); - ok(ret, "TerminateJobObject error %u\n", GetLastError()); + ok(ret, "TerminateJobObject error %lu\n", GetLastError());
dwret = WaitForSingleObject(job, 500); ok(dwret == WAIT_OBJECT_0 || broken(dwret == WAIT_TIMEOUT), - "WaitForSingleObject returned %u\n", dwret); + "WaitForSingleObject returned %lu\n", dwret);
if (dwret == WAIT_TIMEOUT) /* Win 2000/XP */ { @@ -2899,7 +2900,7 @@ static void test_WaitForJobObject(void)
/* the object is not reset immediately */ dwret = WaitForSingleObject(job, 100); - ok(dwret == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", dwret); + ok(dwret == WAIT_OBJECT_0, "WaitForSingleObject returned %lu\n", dwret);
CloseHandle(pi.hProcess); CloseHandle(pi.hThread); @@ -2908,13 +2909,13 @@ static void test_WaitForJobObject(void) create_process("wait", &pi);
ret = pAssignProcessToJobObject(job, pi.hProcess); - ok(ret, "AssignProcessToJobObject error %u\n", GetLastError()); + ok(ret, "AssignProcessToJobObject error %lu\n", GetLastError());
dwret = WaitForSingleObject(job, 100); - ok(dwret == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", dwret); + ok(dwret == WAIT_OBJECT_0, "WaitForSingleObject returned %lu\n", dwret);
ret = pTerminateJobObject(job, 123); - ok(ret, "TerminateJobObject error %u\n", GetLastError()); + ok(ret, "TerminateJobObject error %lu\n", GetLastError());
CloseHandle(pi.hProcess); CloseHandle(pi.hThread); @@ -2923,22 +2924,22 @@ static void test_WaitForJobObject(void)
/* repeat the test, but this time the process terminates properly */ job = pCreateJobObjectW(NULL, NULL); - ok(job != NULL, "CreateJobObject error %u\n", GetLastError()); + ok(job != NULL, "CreateJobObject error %lu\n", GetLastError());
dwret = WaitForSingleObject(job, 100); - ok(dwret == WAIT_TIMEOUT, "WaitForSingleObject returned %u\n", dwret); + ok(dwret == WAIT_TIMEOUT, "WaitForSingleObject returned %lu\n", dwret);
- sprintf(buffer, "sync kernel32-process-%x", GetCurrentProcessId()); + sprintf(buffer, "sync kernel32-process-%lx", GetCurrentProcessId()); sem = CreateSemaphoreA(NULL, 0, 1, buffer + 5); - ok(sem != NULL, "CreateSemaphoreA failed le=%u\n", GetLastError()); + ok(sem != NULL, "CreateSemaphoreA failed le=%lu\n", GetLastError()); create_process(buffer, &pi);
ret = pAssignProcessToJobObject(job, pi.hProcess); - ok(ret, "AssignProcessToJobObject error %u\n", GetLastError()); + ok(ret, "AssignProcessToJobObject error %lu\n", GetLastError()); ReleaseSemaphore(sem, 1, NULL);
dwret = WaitForSingleObject(job, 100); - ok(dwret == WAIT_TIMEOUT, "WaitForSingleObject returned %u\n", dwret); + ok(dwret == WAIT_TIMEOUT, "WaitForSingleObject returned %lu\n", dwret);
wait_and_close_child_process(&pi); CloseHandle(job); @@ -2951,10 +2952,10 @@ static HANDLE test_AddSelfToJob(void) BOOL ret;
job = pCreateJobObjectW(NULL, NULL); - ok(job != NULL, "CreateJobObject error %u\n", GetLastError()); + ok(job != NULL, "CreateJobObject error %lu\n", GetLastError());
ret = pAssignProcessToJobObject(job, GetCurrentProcess()); - ok(ret, "AssignProcessToJobObject error %u\n", GetLastError()); + ok(ret, "AssignProcessToJobObject error %lu\n", GetLastError());
return job; } @@ -2974,7 +2975,7 @@ static void test_jobInheritance(HANDLE job)
out = FALSE; ret = pIsProcessInJob(pi.hProcess, job, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(out, "IsProcessInJob returned out=%u\n", out);
wait_and_close_child_process(&pi); @@ -2996,11 +2997,11 @@ static void test_BreakawayOk(HANDLE parent_job) }
job = pCreateJobObjectW(NULL, NULL); - ok(!!job, "CreateJobObjectW error %u\n", GetLastError()); + ok(!!job, "CreateJobObjectW error %lu\n", GetLastError());
ret = pAssignProcessToJobObject(job, GetCurrentProcess()); ok(ret || broken(!ret && GetLastError() == ERROR_ACCESS_DENIED) /* before Win 8. */, - "AssignProcessToJobObject error %u\n", GetLastError()); + "AssignProcessToJobObject error %lu\n", GetLastError()); nested_jobs = ret; if (!ret) win_skip("Nested jobs are not supported.\n"); @@ -3020,18 +3021,18 @@ static void test_BreakawayOk(HANDLE parent_job) { limit_info.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_BREAKAWAY_OK; ret = pSetInformationJobObject(job, JobObjectExtendedLimitInformation, &limit_info, sizeof(limit_info)); - ok(ret, "SetInformationJobObject error %u\n", GetLastError()); + ok(ret, "SetInformationJobObject error %lu\n", GetLastError());
sprintf(buffer, ""%s" process exit", selfname); ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, CREATE_BREAKAWAY_FROM_JOB, NULL, NULL, &si, &pi); - ok(ret, "CreateProcessA error %u\n", GetLastError()); + ok(ret, "CreateProcessA error %lu\n", GetLastError());
ret = pIsProcessInJob(pi.hProcess, job, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(!out, "IsProcessInJob returned out=%u\n", out);
ret = pIsProcessInJob(pi.hProcess, parent_job, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(out, "IsProcessInJob returned out=%u\n", out);
TerminateProcess(pi.hProcess, 0); @@ -3040,30 +3041,30 @@ static void test_BreakawayOk(HANDLE parent_job)
limit_info.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_BREAKAWAY_OK; ret = pSetInformationJobObject(parent_job, JobObjectExtendedLimitInformation, &limit_info, sizeof(limit_info)); - ok(ret, "SetInformationJobObject error %u\n", GetLastError()); + ok(ret, "SetInformationJobObject error %lu\n", GetLastError());
ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, CREATE_BREAKAWAY_FROM_JOB, NULL, NULL, &si, &pi); - ok(ret, "CreateProcessA error %u\n", GetLastError()); + ok(ret, "CreateProcessA error %lu\n", GetLastError());
ret = pIsProcessInJob(pi.hProcess, job, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(!out, "IsProcessInJob returned out=%u\n", out);
ret = pIsProcessInJob(pi.hProcess, parent_job, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(!out, "IsProcessInJob returned out=%u\n", out);
wait_and_close_child_process(&pi);
limit_info.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK; ret = pSetInformationJobObject(job, JobObjectExtendedLimitInformation, &limit_info, sizeof(limit_info)); - ok(ret, "SetInformationJobObject error %u\n", GetLastError()); + ok(ret, "SetInformationJobObject error %lu\n", GetLastError());
ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret, "CreateProcess error %u\n", GetLastError()); + ok(ret, "CreateProcess error %lu\n", GetLastError());
ret = pIsProcessInJob(pi.hProcess, job, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(!out, "IsProcessInJob returned out=%u\n", out);
wait_and_close_child_process(&pi); @@ -3071,7 +3072,7 @@ static void test_BreakawayOk(HANDLE parent_job) /* unset breakaway ok */ limit_info.BasicLimitInformation.LimitFlags = 0; ret = pSetInformationJobObject(job, JobObjectExtendedLimitInformation, &limit_info, sizeof(limit_info)); - ok(ret, "SetInformationJobObject error %u\n", GetLastError()); + ok(ret, "SetInformationJobObject error %lu\n", GetLastError()); }
static void test_StartupNoConsole(void) @@ -3202,7 +3203,7 @@ static BOOL are_imports_resolved(HANDLE process_handle, PVOID module_base, IMAGE ret = ReadProcessMemory(process_handle, (char *)module_base + nt_header->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress, &iid, sizeof(iid), NULL); - ok(ret, "Failed to read remote module IID (%d)\n", GetLastError()); + ok(ret, "Failed to read remote module IID (%ld)\n", GetLastError());
/* Validate the IID is present and not a bound import, and that we have an OriginalFirstThunk to compare with */ @@ -3214,13 +3215,13 @@ static BOOL are_imports_resolved(HANDLE process_handle, PVOID module_base, IMAGE /* Read a single IAT entry from the FirstThunk */ ret = ReadProcessMemory(process_handle, (char *)module_base + iid.FirstThunk, &iat_entry_value, sizeof(iat_entry_value), NULL); - ok(ret, "Failed to read IAT entry from FirstThunk (%d)\n", GetLastError()); + ok(ret, "Failed to read IAT entry from FirstThunk (%ld)\n", GetLastError()); ok(iat_entry_value, "IAT entry in FirstThunk is NULL\n");
/* Read a single IAT entry from the OriginalFirstThunk */ ret = ReadProcessMemory(process_handle, (char *)module_base + iid.OriginalFirstThunk, &orig_iat_entry_value, sizeof(orig_iat_entry_value), NULL); - ok(ret, "Failed to read IAT entry from OriginalFirstThunk (%d)\n", GetLastError()); + ok(ret, "Failed to read IAT entry from OriginalFirstThunk (%ld)\n", GetLastError()); ok(orig_iat_entry_value, "IAT entry in OriginalFirstThunk is NULL\n");
return iat_entry_value != orig_iat_entry_value; @@ -3242,7 +3243,7 @@ static void test_SuspendProcessNewThread(void)
si.cb = sizeof(si); ret = CreateProcessA(NULL, selfname, NULL, NULL, FALSE, CREATE_SUSPENDED, NULL, NULL, &si, &pi); - ok(ret, "Failed to create process (%d)\n", GetLastError()); + ok(ret, "Failed to create process (%ld)\n", GetLastError());
exe_base = get_process_exe(pi.hProcess, &nt_header); ok(exe_base != NULL, "Could not find EXE in remote process\n"); @@ -3253,58 +3254,58 @@ static void test_SuspendProcessNewThread(void) thread_handle = CreateRemoteThread(pi.hProcess, NULL, 0, (LPTHREAD_START_ROUTINE)exit_thread_ptr, (PVOID)(ULONG_PTR)0x1234, CREATE_SUSPENDED, NULL); - ok(thread_handle != NULL, "Could not create remote thread (%d)\n", GetLastError()); + ok(thread_handle != NULL, "Could not create remote thread (%ld)\n", GetLastError());
ret = are_imports_resolved(pi.hProcess, exe_base, &nt_header); ok(!ret, "IAT entry resolved prematurely\n");
ctx.ContextFlags = CONTEXT_ALL; ret = GetThreadContext( thread_handle, &ctx ); - ok( ret, "Failed retrieving remote thread context (%d)\n", GetLastError() ); - ok( ctx.ContextFlags == CONTEXT_ALL, "wrong flags %x\n", ctx.ContextFlags ); + ok( ret, "Failed retrieving remote thread context (%ld)\n", GetLastError() ); + ok( ctx.ContextFlags == CONTEXT_ALL, "wrong flags %lx\n", ctx.ContextFlags ); #ifdef __x86_64__ - ok( !ctx.Rax, "rax is not zero %lx\n", ctx.Rax ); - ok( !ctx.Rbx, "rbx is not zero %lx\n", ctx.Rbx ); - ok( ctx.Rcx == (ULONG_PTR)exit_thread_ptr, "wrong rcx %lx/%p\n", ctx.Rcx, exit_thread_ptr ); - ok( ctx.Rdx == 0x1234, "wrong rdx %lx\n", ctx.Rdx ); - ok( !ctx.Rsi, "rsi is not zero %lx\n", ctx.Rsi ); - ok( !ctx.Rdi, "rdi is not zero %lx\n", ctx.Rdi ); - ok( !ctx.Rbp, "rbp is not zero %lx\n", ctx.Rbp ); - ok( !ctx.R8, "r8 is not zero %lx\n", ctx.R8 ); - ok( !ctx.R9, "r9 is not zero %lx\n", ctx.R9 ); - ok( !ctx.R10, "r10 is not zero %lx\n", ctx.R10 ); - ok( !ctx.R11, "r11 is not zero %lx\n", ctx.R11 ); - ok( !ctx.R12, "r12 is not zero %lx\n", ctx.R12 ); - ok( !ctx.R13, "r13 is not zero %lx\n", ctx.R13 ); - ok( !ctx.R14, "r14 is not zero %lx\n", ctx.R14 ); - ok( !ctx.R15, "r15 is not zero %lx\n", ctx.R15 ); - ok( !((ctx.Rsp + 0x28) & 0xfff), "rsp is not at top of stack page %lx\n", ctx.Rsp ); - ok( ctx.EFlags == 0x200, "wrong flags %08x\n", ctx.EFlags ); - ok( ctx.MxCsr == 0x1f80, "wrong mxcsr %08x\n", ctx.MxCsr ); + ok( !ctx.Rax, "rax is not zero %Ix\n", ctx.Rax ); + ok( !ctx.Rbx, "rbx is not zero %Ix\n", ctx.Rbx ); + ok( ctx.Rcx == (ULONG_PTR)exit_thread_ptr, "wrong rcx %Ix/%p\n", ctx.Rcx, exit_thread_ptr ); + ok( ctx.Rdx == 0x1234, "wrong rdx %Ix\n", ctx.Rdx ); + ok( !ctx.Rsi, "rsi is not zero %Ix\n", ctx.Rsi ); + ok( !ctx.Rdi, "rdi is not zero %Ix\n", ctx.Rdi ); + ok( !ctx.Rbp, "rbp is not zero %Ix\n", ctx.Rbp ); + ok( !ctx.R8, "r8 is not zero %Ix\n", ctx.R8 ); + ok( !ctx.R9, "r9 is not zero %Ix\n", ctx.R9 ); + ok( !ctx.R10, "r10 is not zero %Ix\n", ctx.R10 ); + ok( !ctx.R11, "r11 is not zero %Ix\n", ctx.R11 ); + ok( !ctx.R12, "r12 is not zero %Ix\n", ctx.R12 ); + ok( !ctx.R13, "r13 is not zero %Ix\n", ctx.R13 ); + ok( !ctx.R14, "r14 is not zero %Ix\n", ctx.R14 ); + ok( !ctx.R15, "r15 is not zero %Ix\n", ctx.R15 ); + ok( !((ctx.Rsp + 0x28) & 0xfff), "rsp is not at top of stack page %Ix\n", ctx.Rsp ); + ok( ctx.EFlags == 0x200, "wrong flags %08lx\n", ctx.EFlags ); + ok( ctx.MxCsr == 0x1f80, "wrong mxcsr %08lx\n", ctx.MxCsr ); ok( ctx.FltSave.ControlWord == 0x27f, "wrong control %08x\n", ctx.FltSave.ControlWord ); #else - ok( !ctx.Ebp || broken(ctx.Ebp), /* winxp */ "ebp is not zero %08x\n", ctx.Ebp ); + ok( !ctx.Ebp || broken(ctx.Ebp), /* winxp */ "ebp is not zero %08lx\n", ctx.Ebp ); if (!ctx.Ebp) /* winxp is completely different */ { - ok( !ctx.Ecx, "ecx is not zero %08x\n", ctx.Ecx ); - ok( !ctx.Edx, "edx is not zero %08x\n", ctx.Edx ); - ok( !ctx.Esi, "esi is not zero %08x\n", ctx.Esi ); - ok( !ctx.Edi, "edi is not zero %08x\n", ctx.Edi ); + ok( !ctx.Ecx, "ecx is not zero %08lx\n", ctx.Ecx ); + ok( !ctx.Edx, "edx is not zero %08lx\n", ctx.Edx ); + ok( !ctx.Esi, "esi is not zero %08lx\n", ctx.Esi ); + ok( !ctx.Edi, "edi is not zero %08lx\n", ctx.Edi ); } - ok( ctx.Eax == (ULONG_PTR)exit_thread_ptr, "wrong eax %08x/%p\n", ctx.Eax, exit_thread_ptr ); - ok( ctx.Ebx == 0x1234, "wrong ebx %08x\n", ctx.Ebx ); + ok( ctx.Eax == (ULONG_PTR)exit_thread_ptr, "wrong eax %08lx/%p\n", ctx.Eax, exit_thread_ptr ); + ok( ctx.Ebx == 0x1234, "wrong ebx %08lx\n", ctx.Ebx ); ok( !((ctx.Esp + 0x10) & 0xfff) || broken( !((ctx.Esp + 4) & 0xfff) ), /* winxp, w2k3 */ - "esp is not at top of stack page or properly aligned: %08x\n", ctx.Esp ); - ok( (ctx.EFlags & ~2) == 0x200, "wrong flags %08x\n", ctx.EFlags ); - ok( (WORD)ctx.FloatSave.ControlWord == 0x27f, "wrong control %08x\n", ctx.FloatSave.ControlWord ); + "esp is not at top of stack page or properly aligned: %08lx\n", ctx.Esp ); + ok( (ctx.EFlags & ~2) == 0x200, "wrong flags %08lx\n", ctx.EFlags ); + ok( (WORD)ctx.FloatSave.ControlWord == 0x27f, "wrong control %08lx\n", ctx.FloatSave.ControlWord ); ok( *(WORD *)ctx.ExtendedRegisters == 0x27f, "wrong control %08x\n", *(WORD *)ctx.ExtendedRegisters ); #endif
ResumeThread( thread_handle ); dret = WaitForSingleObject(thread_handle, 60000); - ok(dret == WAIT_OBJECT_0, "Waiting for remote thread failed (%d)\n", GetLastError()); + ok(dret == WAIT_OBJECT_0, "Waiting for remote thread failed (%ld)\n", GetLastError()); ret = GetExitCodeThread(thread_handle, &exit_code); - ok(ret, "Failed to retrieve remote thread exit code (%d)\n", GetLastError()); + ok(ret, "Failed to retrieve remote thread exit code (%ld)\n", GetLastError()); ok(exit_code == 0x1234, "Invalid remote thread exit code\n");
ret = are_imports_resolved(pi.hProcess, exe_base, &nt_header); @@ -3383,7 +3384,7 @@ static void test_SuspendProcessState(void)
si.cb = sizeof(si); ret = CreateProcessA(NULL, selfname, NULL, NULL, FALSE, CREATE_SUSPENDED, NULL, NULL, &si, &pi); - ok(ret, "Failed to create process (%d)\n", GetLastError()); + ok(ret, "Failed to create process (%ld)\n", GetLastError());
exe_base = get_process_exe(pi.hProcess, &nt_header); /* Make sure we found the EXE in the new process */ @@ -3395,16 +3396,16 @@ static void test_SuspendProcessState(void) server_pipe_handle = CreateNamedPipeA(pipe_name, PIPE_ACCESS_DUPLEX | FILE_FLAG_WRITE_THROUGH, PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE, 1, 0x20000, 0x20000, 0, NULL); - ok(server_pipe_handle != INVALID_HANDLE_VALUE, "Failed to create communication pipe (%d)\n", GetLastError()); + ok(server_pipe_handle != INVALID_HANDLE_VALUE, "Failed to create communication pipe (%ld)\n", GetLastError());
/* Set up the remote process environment */ ctx.ContextFlags = CONTEXT_ALL; ret = GetThreadContext(pi.hThread, &ctx); - ok(ret, "Failed retrieving remote thread context (%d)\n", GetLastError()); - ok( ctx.ContextFlags == CONTEXT_ALL, "wrong flags %x\n", ctx.ContextFlags ); + ok(ret, "Failed retrieving remote thread context (%ld)\n", GetLastError()); + ok( ctx.ContextFlags == CONTEXT_ALL, "wrong flags %lx\n", ctx.ContextFlags );
remote_pipe_params = VirtualAllocEx(pi.hProcess, NULL, sizeof(pipe_params), MEM_COMMIT, PAGE_READWRITE); - ok(remote_pipe_params != NULL, "Failed allocating memory in remote process (%d)\n", GetLastError()); + ok(remote_pipe_params != NULL, "Failed allocating memory in remote process (%ld)\n", GetLastError());
pipe_params.pipe_write_buf = pipe_write_magic; pipe_params.pipe_read_buf = 0; @@ -3413,25 +3414,25 @@ static void test_SuspendProcessState(void)
ret = WriteProcessMemory(pi.hProcess, remote_pipe_params, &pipe_params, sizeof(pipe_params), NULL); - ok(ret, "Failed to write to remote process memory (%d)\n", GetLastError()); + ok(ret, "Failed to write to remote process memory (%ld)\n", GetLastError());
#ifdef __x86_64__ - ok( !ctx.Rax, "rax is not zero %lx\n", ctx.Rax ); - ok( !ctx.Rbx, "rbx is not zero %lx\n", ctx.Rbx ); - ok( !ctx.Rsi, "rsi is not zero %lx\n", ctx.Rsi ); - ok( !ctx.Rdi, "rdi is not zero %lx\n", ctx.Rdi ); - ok( !ctx.Rbp, "rbp is not zero %lx\n", ctx.Rbp ); - ok( !ctx.R8, "r8 is not zero %lx\n", ctx.R8 ); - ok( !ctx.R9, "r9 is not zero %lx\n", ctx.R9 ); - ok( !ctx.R10, "r10 is not zero %lx\n", ctx.R10 ); - ok( !ctx.R11, "r11 is not zero %lx\n", ctx.R11 ); - ok( !ctx.R12, "r12 is not zero %lx\n", ctx.R12 ); - ok( !ctx.R13, "r13 is not zero %lx\n", ctx.R13 ); - ok( !ctx.R14, "r14 is not zero %lx\n", ctx.R14 ); - ok( !ctx.R15, "r15 is not zero %lx\n", ctx.R15 ); - ok( !((ctx.Rsp + 0x28) & 0xfff), "rsp is not at top of stack page %lx\n", ctx.Rsp ); - ok( ctx.EFlags == 0x200, "wrong flags %08x\n", ctx.EFlags ); - ok( ctx.MxCsr == 0x1f80, "wrong mxcsr %08x\n", ctx.MxCsr ); + ok( !ctx.Rax, "rax is not zero %Ix\n", ctx.Rax ); + ok( !ctx.Rbx, "rbx is not zero %Ix\n", ctx.Rbx ); + ok( !ctx.Rsi, "rsi is not zero %Ix\n", ctx.Rsi ); + ok( !ctx.Rdi, "rdi is not zero %Ix\n", ctx.Rdi ); + ok( !ctx.Rbp, "rbp is not zero %Ix\n", ctx.Rbp ); + ok( !ctx.R8, "r8 is not zero %Ix\n", ctx.R8 ); + ok( !ctx.R9, "r9 is not zero %Ix\n", ctx.R9 ); + ok( !ctx.R10, "r10 is not zero %Ix\n", ctx.R10 ); + ok( !ctx.R11, "r11 is not zero %Ix\n", ctx.R11 ); + ok( !ctx.R12, "r12 is not zero %Ix\n", ctx.R12 ); + ok( !ctx.R13, "r13 is not zero %Ix\n", ctx.R13 ); + ok( !ctx.R14, "r14 is not zero %Ix\n", ctx.R14 ); + ok( !ctx.R15, "r15 is not zero %Ix\n", ctx.R15 ); + ok( !((ctx.Rsp + 0x28) & 0xfff), "rsp is not at top of stack page %Ix\n", ctx.Rsp ); + ok( ctx.EFlags == 0x200, "wrong flags %08lx\n", ctx.EFlags ); + ok( ctx.MxCsr == 0x1f80, "wrong mxcsr %08lx\n", ctx.MxCsr ); ok( ctx.FltSave.ControlWord == 0x27f, "wrong control %08x\n", ctx.FltSave.ControlWord ); start_ptr = (void *)ctx.Rip; entry_ptr = (void *)ctx.Rcx; @@ -3449,20 +3450,20 @@ static void test_SuspendProcessState(void) ctx.Rip = (ULONG_PTR)call_named_pipe_a; ctx.Rsp -= sizeof(rop_chain); ret = WriteProcessMemory(pi.hProcess, (void *)ctx.Rsp, &rop_chain, sizeof(rop_chain), NULL); - ok(ret, "Failed to write to remote process thread stack (%d)\n", GetLastError()); + ok(ret, "Failed to write to remote process thread stack (%ld)\n", GetLastError()); #else - ok( !ctx.Ebp || broken(ctx.Ebp), /* winxp */ "ebp is not zero %08x\n", ctx.Ebp ); + ok( !ctx.Ebp || broken(ctx.Ebp), /* winxp */ "ebp is not zero %08lx\n", ctx.Ebp ); if (!ctx.Ebp) /* winxp is completely different */ { - ok( !ctx.Ecx, "ecx is not zero %08x\n", ctx.Ecx ); - ok( !ctx.Edx, "edx is not zero %08x\n", ctx.Edx ); - ok( !ctx.Esi, "esi is not zero %08x\n", ctx.Esi ); - ok( !ctx.Edi, "edi is not zero %08x\n", ctx.Edi ); + ok( !ctx.Ecx, "ecx is not zero %08lx\n", ctx.Ecx ); + ok( !ctx.Edx, "edx is not zero %08lx\n", ctx.Edx ); + ok( !ctx.Esi, "esi is not zero %08lx\n", ctx.Esi ); + ok( !ctx.Edi, "edi is not zero %08lx\n", ctx.Edi ); } ok( !((ctx.Esp + 0x10) & 0xfff) || broken( !((ctx.Esp + 4) & 0xfff) ), /* winxp, w2k3 */ - "esp is not at top of stack page or properly aligned: %08x\n", ctx.Esp ); - ok( (ctx.EFlags & ~2) == 0x200, "wrong flags %08x\n", ctx.EFlags ); - ok( (WORD)ctx.FloatSave.ControlWord == 0x27f, "wrong control %08x\n", ctx.FloatSave.ControlWord ); + "esp is not at top of stack page or properly aligned: %08lx\n", ctx.Esp ); + ok( (ctx.EFlags & ~2) == 0x200, "wrong flags %08lx\n", ctx.EFlags ); + ok( (WORD)ctx.FloatSave.ControlWord == 0x27f, "wrong control %08lx\n", ctx.FloatSave.ControlWord ); ok( *(WORD *)ctx.ExtendedRegisters == 0x27f, "wrong control %08x\n", *(WORD *)ctx.ExtendedRegisters ); start_ptr = (void *)ctx.Eip; entry_ptr = (void *)ctx.Eax; @@ -3481,11 +3482,11 @@ static void test_SuspendProcessState(void) ctx.Eip = (ULONG_PTR)call_named_pipe_a; ctx.Esp -= sizeof(rop_chain); ret = WriteProcessMemory(pi.hProcess, (void *)ctx.Esp, &rop_chain, sizeof(rop_chain), NULL); - ok(ret, "Failed to write to remote process thread stack (%d)\n", GetLastError()); + ok(ret, "Failed to write to remote process thread stack (%ld)\n", GetLastError()); #endif
ret = ReadProcessMemory( pi.hProcess, peb_ptr, &child_peb, sizeof(child_peb), NULL ); - ok( ret, "Failed to read PEB (%u)\n", GetLastError() ); + ok( ret, "Failed to read PEB (%lu)\n", GetLastError() ); ok( child_peb.ImageBaseAddress == exe_base, "wrong base %p/%p\n", child_peb.ImageBaseAddress, exe_base ); user_thread_start = GetProcAddress( GetModuleHandleA("ntdll.dll"), "RtlUserThreadStart" ); @@ -3504,19 +3505,19 @@ static void test_SuspendProcessState(void) ok( !child_peb.ProcessHeap, "ProcessHeap set %p\n", child_peb.ProcessHeap ); ok( !child_peb.CSDVersion.Buffer, "CSDVersion set %s\n", debugstr_w(child_peb.CSDVersion.Buffer) );
- ok( child_peb.OSMajorVersion == peb->OSMajorVersion, "OSMajorVersion not set %u\n", child_peb.OSMajorVersion ); - ok( child_peb.OSPlatformId == peb->OSPlatformId, "OSPlatformId not set %u\n", child_peb.OSPlatformId ); - ok( child_peb.SessionId == peb->SessionId, "SessionId not set %u\n", child_peb.SessionId ); + ok( child_peb.OSMajorVersion == peb->OSMajorVersion, "OSMajorVersion not set %lu\n", child_peb.OSMajorVersion ); + ok( child_peb.OSPlatformId == peb->OSPlatformId, "OSPlatformId not set %lu\n", child_peb.OSPlatformId ); + ok( child_peb.SessionId == peb->SessionId, "SessionId not set %lu\n", child_peb.SessionId ); ok( child_peb.CriticalSectionTimeout.QuadPart, "CriticalSectionTimeout not set %s\n", wine_dbgstr_longlong(child_peb.CriticalSectionTimeout.QuadPart) ); ok( child_peb.HeapSegmentReserve == peb->HeapSegmentReserve, - "HeapSegmentReserve not set %lu\n", child_peb.HeapSegmentReserve ); + "HeapSegmentReserve not set %Iu\n", child_peb.HeapSegmentReserve ); ok( child_peb.HeapSegmentCommit == peb->HeapSegmentCommit, - "HeapSegmentCommit not set %lu\n", child_peb.HeapSegmentCommit ); + "HeapSegmentCommit not set %Iu\n", child_peb.HeapSegmentCommit ); ok( child_peb.HeapDeCommitTotalFreeThreshold == peb->HeapDeCommitTotalFreeThreshold, - "HeapDeCommitTotalFreeThreshold not set %lu\n", child_peb.HeapDeCommitTotalFreeThreshold ); + "HeapDeCommitTotalFreeThreshold not set %Iu\n", child_peb.HeapDeCommitTotalFreeThreshold ); ok( child_peb.HeapDeCommitFreeBlockThreshold == peb->HeapDeCommitFreeBlockThreshold, - "HeapDeCommitFreeBlockThreshold not set %lu\n", child_peb.HeapDeCommitFreeBlockThreshold ); + "HeapDeCommitFreeBlockThreshold not set %Iu\n", child_peb.HeapDeCommitFreeBlockThreshold );
if (pNtQueryInformationThread) { @@ -3524,25 +3525,25 @@ static void test_SuspendProcessState(void) THREAD_BASIC_INFORMATION info; NTSTATUS status = pNtQueryInformationThread( pi.hThread, ThreadBasicInformation, &info, sizeof(info), NULL ); - ok( !status, "NtQueryInformationProcess failed %x\n", status ); + ok( !status, "NtQueryInformationProcess failed %lx\n", status ); ret = ReadProcessMemory( pi.hProcess, info.TebBaseAddress, &child_teb, sizeof(child_teb), NULL ); - ok( ret, "Failed to read TEB (%u)\n", GetLastError() ); + ok( ret, "Failed to read TEB (%lu)\n", GetLastError() );
ok( child_teb.Peb == peb_ptr, "wrong Peb %p / %p\n", child_teb.Peb, peb_ptr ); - ok( PtrToUlong(child_teb.ClientId.UniqueProcess) == pi.dwProcessId, "wrong pid %x / %x\n", + ok( PtrToUlong(child_teb.ClientId.UniqueProcess) == pi.dwProcessId, "wrong pid %lx / %lx\n", PtrToUlong(child_teb.ClientId.UniqueProcess), pi.dwProcessId ); - ok( PtrToUlong(child_teb.ClientId.UniqueThread) == pi.dwThreadId, "wrong tid %x / %x\n", + ok( PtrToUlong(child_teb.ClientId.UniqueThread) == pi.dwThreadId, "wrong tid %lx / %lx\n", PtrToUlong(child_teb.ClientId.UniqueThread), pi.dwThreadId ); - ok( PtrToUlong(child_teb.RealClientId.UniqueProcess) == pi.dwProcessId, "wrong real pid %x / %x\n", + ok( PtrToUlong(child_teb.RealClientId.UniqueProcess) == pi.dwProcessId, "wrong real pid %lx / %lx\n", PtrToUlong(child_teb.RealClientId.UniqueProcess), pi.dwProcessId ); - ok( PtrToUlong(child_teb.RealClientId.UniqueThread) == pi.dwThreadId, "wrong real tid %x / %x\n", + ok( PtrToUlong(child_teb.RealClientId.UniqueThread) == pi.dwThreadId, "wrong real tid %lx / %lx\n", PtrToUlong(child_teb.RealClientId.UniqueThread), pi.dwThreadId ); ok( child_teb.StaticUnicodeString.MaximumLength == sizeof(child_teb.StaticUnicodeBuffer), "StaticUnicodeString.MaximumLength wrong %x\n", child_teb.StaticUnicodeString.MaximumLength ); ok( (char *)child_teb.StaticUnicodeString.Buffer == (char *)info.TebBaseAddress + offsetof(TEB, StaticUnicodeBuffer), "StaticUnicodeString.Buffer wrong %p\n", child_teb.StaticUnicodeString.Buffer );
- ok( !child_teb.CurrentLocale, "CurrentLocale set %x\n", child_teb.CurrentLocale ); + ok( !child_teb.CurrentLocale, "CurrentLocale set %lx\n", child_teb.CurrentLocale ); ok( !child_teb.TlsLinks.Flink, "TlsLinks.Flink set %p\n", child_teb.TlsLinks.Flink ); ok( !child_teb.TlsLinks.Blink, "TlsLinks.Blink set %p\n", child_teb.TlsLinks.Blink ); ok( !child_teb.TlsExpansionSlots, "TlsExpansionSlots set %p\n", child_teb.TlsExpansionSlots ); @@ -3550,7 +3551,7 @@ static void test_SuspendProcessState(void) }
ret = SetThreadContext(pi.hThread, &ctx); - ok(ret, "Failed to set remote thread context (%d)\n", GetLastError()); + ok(ret, "Failed to set remote thread context (%ld)\n", GetLastError());
ResumeThread(pi.hThread);
@@ -3558,7 +3559,7 @@ static void test_SuspendProcessState(void) ok(pipe_connected, "Pipe did not connect\n");
ret = ReadFile(server_pipe_handle, &pipe_magic, sizeof(pipe_magic), &numb, NULL); - ok(ret, "Failed to read buffer from pipe (%d)\n", GetLastError()); + ok(ret, "Failed to read buffer from pipe (%ld)\n", GetLastError());
ok(pipe_magic == pipe_write_magic, "Did not get the correct magic from the remote process\n");
@@ -3570,7 +3571,7 @@ static void test_SuspendProcessState(void) ok(ret, "EXE IAT is not resolved\n");
ret = WriteFile(server_pipe_handle, &pipe_magic, sizeof(pipe_magic), &numb, NULL); - ok(ret, "Failed to write the magic back to the pipe (%d)\n", GetLastError()); + ok(ret, "Failed to write the magic back to the pipe (%ld)\n", GetLastError()); CloseHandle(server_pipe_handle);
/* Avoid wait_child_process() because the exit code results from a race @@ -3672,7 +3673,7 @@ static void test_GetNumaProcessorNode(void) { ok(!ret, "GetNumaProcessorNode returned TRUE for processor %d\n", i); ok(node == 0xFF || broken(node == 0xAA) /* WinXP */, "expected node 0xFF, got %x\n", node); - 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()); } } } @@ -3683,11 +3684,11 @@ static void test_session_info(void) BOOL r;
r = ProcessIdToSessionId(GetCurrentProcessId(), &session_id); - ok(r, "ProcessIdToSessionId failed: %u\n", GetLastError()); - trace("session_id = %x\n", session_id); + ok(r, "ProcessIdToSessionId failed: %lu\n", GetLastError()); + trace("session_id = %lx\n", session_id);
active_session = pWTSGetActiveConsoleSessionId(); - trace("active_session = %x\n", active_session); + trace("active_session = %lx\n", active_session); }
static void test_process_info(HANDLE hproc) @@ -3805,46 +3806,46 @@ static void test_process_info(HANDLE hproc) case ProcessImageInformation: case ProcessPagePriority: case ProcessImageFileNameWin32: - ok(status == STATUS_SUCCESS, "for info %u expected STATUS_SUCCESS, got %08x (ret_len %u)\n", i, status, ret_len); + ok(status == STATUS_SUCCESS, "for info %lu expected STATUS_SUCCESS, got %08lx (ret_len %lu)\n", i, status, ret_len); break;
case ProcessAffinityMask: case ProcessBreakOnTermination: ok(status == STATUS_ACCESS_DENIED /* before win8 */ || status == STATUS_SUCCESS /* win8 is less strict */, - "for info %u expected STATUS_SUCCESS, got %08x (ret_len %u)\n", i, status, ret_len); + "for info %lu expected STATUS_SUCCESS, got %08lx (ret_len %lu)\n", i, status, ret_len); break;
case ProcessDebugObjectHandle: ok(status == STATUS_ACCESS_DENIED || status == STATUS_PORT_NOT_SET, - "for info %u expected STATUS_ACCESS_DENIED, got %08x (ret_len %u)\n", i, status, ret_len); + "for info %lu expected STATUS_ACCESS_DENIED, got %08lx (ret_len %lu)\n", i, status, ret_len); break; case ProcessCookie: if (is_current) ok(status == STATUS_SUCCESS || status == STATUS_INVALID_PARAMETER /* before win8 */, - "for info %u got %08x (ret_len %u)\n", i, status, ret_len); + "for info %lu got %08lx (ret_len %lu)\n", i, status, ret_len); else ok(status == STATUS_INVALID_PARAMETER /* before win8 */ || status == STATUS_ACCESS_DENIED, - "for info %u got %08x (ret_len %u)\n", i, status, ret_len); + "for info %lu got %08lx (ret_len %lu)\n", i, status, ret_len); break; case ProcessExecuteFlags: case ProcessDebugPort: case ProcessDebugFlags: if (is_current) ok(status == STATUS_SUCCESS || status == STATUS_INVALID_PARAMETER, - "for info %u, got %08x (ret_len %u)\n", i, status, ret_len); + "for info %lu, got %08lx (ret_len %lu)\n", i, status, ret_len); else todo_wine ok(status == STATUS_ACCESS_DENIED, - "for info %u expected STATUS_ACCESS_DENIED, got %08x (ret_len %u)\n", i, status, ret_len); + "for info %lu expected STATUS_ACCESS_DENIED, got %08lx (ret_len %lu)\n", i, status, ret_len); break;
default: if (is_current) ok(status == STATUS_SUCCESS || status == STATUS_UNSUCCESSFUL || status == STATUS_INVALID_PARAMETER, - "for info %u, got %08x (ret_len %u)\n", i, status, ret_len); + "for info %lu, got %08lx (ret_len %lu)\n", i, status, ret_len); else ok(status == STATUS_ACCESS_DENIED, - "for info %u expected STATUS_ACCESS_DENIED, got %08x (ret_len %u)\n", i, status, ret_len); + "for info %lu expected STATUS_ACCESS_DENIED, got %08lx (ret_len %lu)\n", i, status, ret_len); break; } } @@ -3863,22 +3864,22 @@ static void test_GetLogicalProcessorInformationEx(void) }
ret = pGetLogicalProcessorInformationEx(RelationAll, NULL, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "got %d, error %d\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "got %d, error %ld\n", ret, GetLastError());
len = 0; ret = pGetLogicalProcessorInformationEx(RelationProcessorCore, NULL, &len); - ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %d, error %d\n", ret, GetLastError()); - ok(len > 0, "got %u\n", len); + ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %d, error %ld\n", ret, GetLastError()); + ok(len > 0, "got %lu\n", len);
len = 0; ret = pGetLogicalProcessorInformationEx(RelationAll, NULL, &len); - ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %d, error %d\n", ret, GetLastError()); - ok(len > 0, "got %u\n", len); + ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %d, error %ld\n", ret, GetLastError()); + ok(len > 0, "got %lu\n", len);
info = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len); ret = pGetLogicalProcessorInformationEx(RelationAll, info, &len); - ok(ret, "got %d, error %d\n", ret, GetLastError()); - ok(info->Size > 0, "got %u\n", info->Size); + ok(ret, "got %d, error %ld\n", ret, GetLastError()); + ok(info->Size > 0, "got %lu\n", info->Size); HeapFree(GetProcessHeap(), 0, info); }
@@ -3910,32 +3911,32 @@ static void test_GetSystemCpuSetInformation(void) size = 0xdeadbeef; SetLastError(0xdeadbeef); ret = pGetSystemCpuSetInformation(NULL, size, &size, process, 0); - ok(!ret && GetLastError() == ERROR_NOACCESS, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); - ok(!size, "Got unexpected size %u.\n", size); + ok(!ret && GetLastError() == ERROR_NOACCESS, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError()); + ok(!size, "Got unexpected size %lu.\n", size);
size = 0xdeadbeef; SetLastError(0xdeadbeef); ret = pGetSystemCpuSetInformation(NULL, 0, &size, (HANDLE)0xdeadbeef, 0); - ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); - ok(!size, "Got unexpected size %u.\n", size); + ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError()); + ok(!size, "Got unexpected size %lu.\n", size);
size = 0xdeadbeef; SetLastError(0xdeadbeef); ret = pGetSystemCpuSetInformation(NULL, 0, &size, process, 0); - ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); - ok(size == expected_size, "Got unexpected size %u.\n", size); + ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError()); + ok(size == expected_size, "Got unexpected size %lu.\n", size);
info = heap_alloc(size); info_nt = heap_alloc(size);
status = pNtQuerySystemInformationEx(SystemCpuSetInformation, &process, sizeof(process), info_nt, expected_size, NULL); - ok(!status, "Got unexpected status %#x.\n", status); + ok(!status, "Got unexpected status %#lx.\n", status);
size = 0xdeadbeef; SetLastError(0xdeadbeef); ret = pGetSystemCpuSetInformation(info, expected_size, &size, process, 0); - ok(ret && GetLastError() == 0xdeadbeef, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); - ok(size == expected_size, "Got unexpected size %u.\n", size); + ok(ret && GetLastError() == 0xdeadbeef, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError()); + ok(size == expected_size, "Got unexpected size %lu.\n", size);
ok(!memcmp(info, info_nt, expected_size), "Info does not match NtQuerySystemInformationEx().\n");
@@ -3953,7 +3954,7 @@ static void test_largepages(void) } size = pGetLargePageMinimum();
- ok((size == 0) || (size == 2*1024*1024) || (size == 4*1024*1024), "GetLargePageMinimum reports %ld size\n", size); + ok((size == 0) || (size == 2*1024*1024) || (size == 4*1024*1024), "GetLargePageMinimum reports %Id size\n", size); }
struct proc_thread_attr @@ -3994,16 +3995,16 @@ static void test_ProcThreadAttributeList(void) ok(!ret, "got %d\n", ret); if(i >= 4 && GetLastError() == ERROR_INVALID_PARAMETER) /* Vista only allows a maximium of 3 slots */ break; - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %d\n", GetLastError()); - ok(size == needed, "%d: got %ld expect %ld\n", i, size, needed); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %ld\n", GetLastError()); + ok(size == needed, "%d: got %Id expect %Id\n", i, size, needed);
memset(&list, 0xcc, sizeof(list)); ret = pInitializeProcThreadAttributeList(&list, i, 0, &size); ok(ret, "got %d\n", ret); - ok(list.mask == 0, "%d: got %08x\n", i, list.mask); - ok(list.size == i, "%d: got %08x\n", i, list.size); - ok(list.count == 0, "%d: got %08x\n", i, list.count); - ok(list.unk == 0, "%d: got %08lx\n", i, list.unk); + ok(list.mask == 0, "%d: got %08lx\n", i, list.mask); + ok(list.size == i, "%d: got %08lx\n", i, list.size); + ok(list.count == 0, "%d: got %08lx\n", i, list.count); + ok(list.unk == 0, "%d: got %08Ix\n", i, list.unk); }
memset(handles, 0, sizeof(handles)); @@ -4015,15 +4016,15 @@ static void test_ProcThreadAttributeList(void)
ret = pUpdateProcThreadAttribute(&list, 0, 0xcafe, handles, sizeof(PROCESSOR_NUMBER), NULL, NULL); ok(!ret, "got %d\n", ret); - ok(GetLastError() == ERROR_NOT_SUPPORTED, "got %d\n", GetLastError()); + ok(GetLastError() == ERROR_NOT_SUPPORTED, "got %ld\n", GetLastError());
ret = pUpdateProcThreadAttribute(&list, 0, PROC_THREAD_ATTRIBUTE_PARENT_PROCESS, handles, sizeof(handles[0]) / 2, NULL, NULL); ok(!ret, "got %d\n", ret); - ok(GetLastError() == ERROR_BAD_LENGTH, "got %d\n", GetLastError()); + ok(GetLastError() == ERROR_BAD_LENGTH, "got %ld\n", GetLastError());
ret = pUpdateProcThreadAttribute(&list, 0, PROC_THREAD_ATTRIBUTE_PARENT_PROCESS, handles, sizeof(handles[0]) * 2, NULL, NULL); ok(!ret, "got %d\n", ret); - ok(GetLastError() == ERROR_BAD_LENGTH, "got %d\n", GetLastError()); + ok(GetLastError() == ERROR_BAD_LENGTH, "got %ld\n", GetLastError());
ret = pUpdateProcThreadAttribute(&list, 0, PROC_THREAD_ATTRIBUTE_PARENT_PROCESS, handles, sizeof(handles[0]), NULL, NULL); ok(ret, "got %d\n", ret); @@ -4036,11 +4037,11 @@ static void test_ProcThreadAttributeList(void)
ret = pUpdateProcThreadAttribute(&list, 0, PROC_THREAD_ATTRIBUTE_PARENT_PROCESS, handles, sizeof(handles[0]), NULL, NULL); ok(!ret, "got %d\n", ret); - ok(GetLastError() == ERROR_OBJECT_NAME_EXISTS, "got %d\n", GetLastError()); + ok(GetLastError() == ERROR_OBJECT_NAME_EXISTS, "got %ld\n", GetLastError());
ret = pUpdateProcThreadAttribute(&list, 0, PROC_THREAD_ATTRIBUTE_HANDLE_LIST, handles, sizeof(handles) - 1, NULL, NULL); ok(!ret, "got %d\n", ret); - ok(GetLastError() == ERROR_BAD_LENGTH, "got %d\n", GetLastError()); + ok(GetLastError() == ERROR_BAD_LENGTH, "got %ld\n", GetLastError());
ret = pUpdateProcThreadAttribute(&list, 0, PROC_THREAD_ATTRIBUTE_HANDLE_LIST, handles, sizeof(handles), NULL, NULL); ok(ret, "got %d\n", ret); @@ -4053,10 +4054,10 @@ static void test_ProcThreadAttributeList(void)
ret = pUpdateProcThreadAttribute(&list, 0, PROC_THREAD_ATTRIBUTE_HANDLE_LIST, handles, sizeof(handles), NULL, NULL); ok(!ret, "got %d\n", ret); - ok(GetLastError() == ERROR_OBJECT_NAME_EXISTS, "got %d\n", GetLastError()); + ok(GetLastError() == ERROR_OBJECT_NAME_EXISTS, "got %ld\n", GetLastError());
ret = pUpdateProcThreadAttribute(&list, 0, PROC_THREAD_ATTRIBUTE_IDEAL_PROCESSOR, handles, sizeof(PROCESSOR_NUMBER), NULL, NULL); - ok(ret || GetLastError() == ERROR_NOT_SUPPORTED, "got %d gle %d\n", ret, GetLastError()); + ok(ret || GetLastError() == ERROR_NOT_SUPPORTED, "got %d gle %ld\n", ret, GetLastError());
if (ret) { @@ -4068,7 +4069,7 @@ static void test_ProcThreadAttributeList(void) }
ret = pUpdateProcThreadAttribute(&list, 0, PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE, handles, sizeof(handles[0]), NULL, NULL); - ok(ret || broken(GetLastError() == ERROR_NOT_SUPPORTED), "got %d gle %d\n", ret, GetLastError()); + ok(ret || broken(GetLastError() == ERROR_NOT_SUPPORTED), "got %d gle %ld\n", ret, GetLastError());
if (ret) { @@ -4127,7 +4128,7 @@ static void test_parent_process_attribute(unsigned int level, HANDLE read_pipe) if (!level) { ret = CreatePipe(&read_pipe, &write_pipe, &sa, 0); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError());
parent_data.parent = OpenProcess(PROCESS_CREATE_PROCESS | PROCESS_QUERY_INFORMATION, TRUE, GetCurrentProcessId()); parent_data.parent_id = GetCurrentProcessId(); @@ -4135,19 +4136,19 @@ static void test_parent_process_attribute(unsigned int level, HANDLE read_pipe) else { status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessBasicInformation, &pbi, sizeof(pbi), &pbi_size); - ok(status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status); + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status); parent_id = pbi.InheritedFromUniqueProcessId;
memset(&parent_data, 0, sizeof(parent_data)); ret = ReadFile(read_pipe, &parent_data, sizeof(parent_data), &size, NULL); ok((level == 2 && ret) || (level == 1 && !ret && GetLastError() == ERROR_INVALID_HANDLE), - "Got unexpected ret %#x, level %u, GetLastError() %u.\n", + "Got unexpected ret %#x, level %u, GetLastError() %lu.\n", ret, level, GetLastError()); }
if (level == 2) { - ok(parent_id == parent_data.parent_id, "Got parent id %u, parent_data.parent_id %u.\n", + ok(parent_id == parent_data.parent_id, "Got parent id %lu, parent_data.parent_id %lu.\n", parent_id, parent_data.parent_id); return; } @@ -4162,7 +4163,7 @@ static void test_parent_process_attribute(unsigned int level, HANDLE read_pipe)
ret = pInitializeProcThreadAttributeList(NULL, 1, 0, &size); ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError());
sprintf(buffer, ""%s" process parent %u %p", selfname, 255, read_pipe);
@@ -4175,14 +4176,14 @@ static void test_parent_process_attribute(unsigned int level, HANDLE read_pipe) #endif si.lpAttributeList = heap_alloc(size); ret = pInitializeProcThreadAttributeList(si.lpAttributeList, 1, 0, &size); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError()); handle = OpenProcess(PROCESS_CREATE_PROCESS, TRUE, GetCurrentProcessId()); ret = pUpdateProcThreadAttribute(si.lpAttributeList, 0, PROC_THREAD_ATTRIBUTE_PARENT_PROCESS, &handle, sizeof(handle), NULL, NULL); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError()); ret = CreateProcessA(NULL, buffer, NULL, NULL, TRUE, EXTENDED_STARTUPINFO_PRESENT, NULL, NULL, (STARTUPINFOA *)&si, &info); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError()); wait_and_close_child_process(&info); CloseHandle(handle); pDeleteProcThreadAttributeList(si.lpAttributeList); @@ -4190,44 +4191,44 @@ static void test_parent_process_attribute(unsigned int level, HANDLE read_pipe)
si.lpAttributeList = heap_alloc(size); ret = pInitializeProcThreadAttributeList(si.lpAttributeList, 1, 0, &size); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError()); handle = (HANDLE)0xdeadbeef; ret = pUpdateProcThreadAttribute(si.lpAttributeList, 0, PROC_THREAD_ATTRIBUTE_PARENT_PROCESS, &handle, sizeof(handle), NULL, NULL); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError()); ret = CreateProcessA(NULL, buffer, NULL, NULL, TRUE, EXTENDED_STARTUPINFO_PRESENT, NULL, NULL, (STARTUPINFOA *)&si, &info); - ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected ret %#x, GetLastError() %u.\n", + ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError()); pDeleteProcThreadAttributeList(si.lpAttributeList); heap_free(si.lpAttributeList);
si.lpAttributeList = heap_alloc(size); ret = pInitializeProcThreadAttributeList(si.lpAttributeList, 1, 0, &size); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError()); handle = NULL; ret = pUpdateProcThreadAttribute(si.lpAttributeList, 0, PROC_THREAD_ATTRIBUTE_PARENT_PROCESS, &handle, sizeof(handle), NULL, NULL); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError()); ret = CreateProcessA(NULL, buffer, NULL, NULL, TRUE, EXTENDED_STARTUPINFO_PRESENT, NULL, NULL, (STARTUPINFOA *)&si, &info); - ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected ret %#x, GetLastError() %u.\n", + ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError()); pDeleteProcThreadAttributeList(si.lpAttributeList); heap_free(si.lpAttributeList);
si.lpAttributeList = heap_alloc(size); ret = pInitializeProcThreadAttributeList(si.lpAttributeList, 1, 0, &size); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError()); handle = GetCurrentProcess(); ret = pUpdateProcThreadAttribute(si.lpAttributeList, 0, PROC_THREAD_ATTRIBUTE_PARENT_PROCESS, &handle, sizeof(handle), NULL, NULL); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError()); ret = CreateProcessA(NULL, buffer, NULL, NULL, TRUE, EXTENDED_STARTUPINFO_PRESENT, NULL, NULL, (STARTUPINFOA *)&si, &info); /* Broken on Vista / w7 / w10. */ ok(ret || broken(!ret && GetLastError() == ERROR_INVALID_HANDLE), - "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError()); if (ret) wait_and_close_child_process(&info); pDeleteProcThreadAttributeList(si.lpAttributeList); @@ -4235,19 +4236,19 @@ static void test_parent_process_attribute(unsigned int level, HANDLE read_pipe)
si.lpAttributeList = heap_alloc(size); ret = pInitializeProcThreadAttributeList(si.lpAttributeList, 1, 0, &size); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError());
parent = OpenProcess(PROCESS_CREATE_PROCESS, FALSE, parent_id);
ret = pUpdateProcThreadAttribute(si.lpAttributeList, 0, PROC_THREAD_ATTRIBUTE_PARENT_PROCESS, &parent, sizeof(parent), NULL, NULL); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError()); }
sprintf(buffer, ""%s" process parent %u %p", selfname, level + 1, read_pipe); ret = CreateProcessA(NULL, buffer, NULL, NULL, level == 1, level == 1 ? EXTENDED_STARTUPINFO_PRESENT : 0, NULL, NULL, (STARTUPINFOA *)&si, &info); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError());
if (level) { @@ -4286,25 +4287,25 @@ static void test_handle_list_attribute(BOOL child, HANDLE handle1, HANDLE handle
flags = 0; ret = GetHandleInformation(handle1, &flags); - ok(ret, "Failed to get handle info, error %d.\n", GetLastError()); - ok(flags == HANDLE_FLAG_INHERIT, "Unexpected flags %#x.\n", flags); + ok(ret, "Failed to get handle info, error %ld.\n", GetLastError()); + ok(flags == HANDLE_FLAG_INHERIT, "Unexpected flags %#lx.\n", flags); CloseHandle(handle1);
ret = GetHandleInformation(handle2, &flags); - ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "Unexpected return value, error %d.\n", GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "Unexpected return value, error %ld.\n", GetLastError());
return; }
ret = pInitializeProcThreadAttributeList(NULL, 1, 0, &size); ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError());
memset(&si, 0, sizeof(si)); si.StartupInfo.cb = sizeof(si); si.lpAttributeList = heap_alloc(size); ret = pInitializeProcThreadAttributeList(si.lpAttributeList, 1, 0, &size); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError());
memset(&sa, 0, sizeof(sa)); sa.nLength = sizeof(sa); @@ -4315,12 +4316,12 @@ static void test_handle_list_attribute(BOOL child, HANDLE handle1, HANDLE handle
ret = pUpdateProcThreadAttribute(si.lpAttributeList, 0, PROC_THREAD_ATTRIBUTE_HANDLE_LIST, &pipe[0], sizeof(pipe[0]), NULL, NULL); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError());
sprintf(buffer, ""%s" process handlelist %p %p", selfname, pipe[0], pipe[1]); ret = CreateProcessA(NULL, buffer, NULL, NULL, TRUE, EXTENDED_STARTUPINFO_PRESENT, NULL, NULL, (STARTUPINFOA *)&si, &info); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError());
wait_and_close_child_process(&info);
@@ -4348,23 +4349,23 @@ static void test_dead_process(void)
memset( data, 0, sizeof(data) ); status = NtQueryInformationProcess( pi.hProcess, ProcessImageFileName, data, sizeof(data), NULL); - ok( !status, "ProcessImageFileName failed %x\n", status ); + ok( !status, "ProcessImageFileName failed %lx\n", status ); ok( ((UNICODE_STRING *)data)->Length, "ProcessImageFileName not set\n" ); ok( ((UNICODE_STRING *)data)->Buffer[0] == '\', "ProcessImageFileName not set\n" );
memset( prio, 0xcc, sizeof(*prio) ); status = NtQueryInformationProcess( pi.hProcess, ProcessPriorityClass, prio, sizeof(*prio), NULL); - ok( !status, "ProcessPriorityClass failed %x\n", status ); + ok( !status, "ProcessPriorityClass failed %lx\n", status ); ok( prio->PriorityClass != 0xcc, "ProcessPriorityClass not set\n" );
memset( &basic, 0xcc, sizeof(basic) ); status = NtQueryInformationProcess( pi.hProcess, ProcessBasicInformation, &basic, sizeof(basic), NULL); - ok( !status, "ProcessBasicInformation failed %x\n", status ); + ok( !status, "ProcessBasicInformation failed %lx\n", status ); ok( basic.ExitStatus == 0, "ProcessBasicInformation info modified\n" );
memset( &image, 0xcc, sizeof(image) ); status = NtQueryInformationProcess( pi.hProcess, ProcessImageInformation, &image, sizeof(image), NULL); - ok( status == STATUS_PROCESS_IS_TERMINATING, "ProcessImageInformation wrong error %x\n", status ); + ok( status == STATUS_PROCESS_IS_TERMINATING, "ProcessImageInformation wrong error %lx\n", status ); ok( image.Machine == 0xcccc, "ProcessImageInformation info modified\n" );
while ((status = NtQuerySystemInformation(SystemProcessInformation, buffer, size, &size)) == STATUS_INFO_LENGTH_MISMATCH) @@ -4372,7 +4373,7 @@ static void test_dead_process(void) free(buffer); buffer = malloc(size); } - ok(status == STATUS_SUCCESS, "got %#x\n", status); + ok(status == STATUS_SUCCESS, "got %#lx\n", status); found = FALSE; do { @@ -4404,54 +4405,54 @@ static void test_nested_jobs_child(unsigned int index) sprintf(job_name, "test_nested_jobs_%u", index); job = pOpenJobObjectA(JOB_OBJECT_ASSIGN_PROCESS | JOB_OBJECT_SET_ATTRIBUTES | JOB_OBJECT_QUERY | JOB_OBJECT_TERMINATE, FALSE, job_name); - ok(!!job, "OpenJobObjectA error %u\n", GetLastError()); + ok(!!job, "OpenJobObjectA error %lu\n", GetLastError());
sprintf(job_name, "test_nested_jobs_%u", !index); job_other = pOpenJobObjectA(JOB_OBJECT_ASSIGN_PROCESS | JOB_OBJECT_SET_ATTRIBUTES | JOB_OBJECT_QUERY | JOB_OBJECT_TERMINATE, FALSE, job_name); - ok(!!job_other, "OpenJobObjectA error %u\n", GetLastError()); + ok(!!job_other, "OpenJobObjectA error %lu\n", GetLastError());
job_parent = pCreateJobObjectW(NULL, NULL); - ok(!!job_parent, "CreateJobObjectA error %u\n", GetLastError()); + ok(!!job_parent, "CreateJobObjectA error %lu\n", GetLastError());
ret = pAssignProcessToJobObject(job_parent, GetCurrentProcess()); - ok(ret, "AssignProcessToJobObject error %u\n", GetLastError()); + ok(ret, "AssignProcessToJobObject error %lu\n", GetLastError());
create_process("wait", &pi);
ret = pAssignProcessToJobObject(job_parent, pi.hProcess); ok(ret || broken(!ret && GetLastError() == ERROR_ACCESS_DENIED) /* Supported since Windows 8. */, - "AssignProcessToJobObject error %u\n", GetLastError()); + "AssignProcessToJobObject error %lu\n", GetLastError()); if (!ret) { win_skip("Nested jobs are not supported.\n"); goto done; } ret = pAssignProcessToJobObject(job, pi.hProcess); - ok(ret, "AssignProcessToJobObject error %u\n", GetLastError()); + ok(ret, "AssignProcessToJobObject error %lu\n", GetLastError());
out = FALSE; ret = pIsProcessInJob(pi.hProcess, NULL, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(out, "IsProcessInJob returned out=%u\n", out);
out = FALSE; ret = pIsProcessInJob(pi.hProcess, job, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(out, "IsProcessInJob returned out=%u\n", out);
out = TRUE; ret = pIsProcessInJob(GetCurrentProcess(), job, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(!out, "IsProcessInJob returned out=%u\n", out);
out = FALSE; ret = pIsProcessInJob(pi.hProcess, job, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(out, "IsProcessInJob returned out=%u\n", out);
ret = pAssignProcessToJobObject(job, GetCurrentProcess()); - ok(ret, "AssignProcessToJobObject error %u\n", GetLastError()); + ok(ret, "AssignProcessToJobObject error %lu\n", GetLastError());
TerminateProcess(pi.hProcess, 0); wait_child_process(pi.hProcess); @@ -4461,26 +4462,26 @@ static void test_nested_jobs_child(unsigned int index) dead_pid = pi.dwProcessId;
port = pCreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, 0, 1); - ok(!!port, "CreateIoCompletionPort error %u\n", GetLastError()); + ok(!!port, "CreateIoCompletionPort error %lu\n", GetLastError());
port_info.CompletionPort = port; port_info.CompletionKey = job; ret = pSetInformationJobObject(job, JobObjectAssociateCompletionPortInformation, &port_info, sizeof(port_info)); - ok(ret, "SetInformationJobObject error %u\n", GetLastError()); + ok(ret, "SetInformationJobObject error %lu\n", GetLastError()); port_info.CompletionKey = job_parent; ret = pSetInformationJobObject(job_parent, JobObjectAssociateCompletionPortInformation, &port_info, sizeof(port_info)); - ok(ret, "SetInformationJobObject error %u\n", GetLastError()); + ok(ret, "SetInformationJobObject error %lu\n", GetLastError());
create_process("wait", &pi); out = FALSE; ret = pIsProcessInJob(pi.hProcess, job, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(out, "IsProcessInJob returned out=%u\n", out);
out = FALSE; ret = pIsProcessInJob(pi.hProcess, job_parent, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(out, "IsProcessInJob returned out=%u\n", out);
/* The first already dead child process still shows up randomly. */ @@ -4489,20 +4490,20 @@ static void test_nested_jobs_child(unsigned int index) ret = GetQueuedCompletionStatus(port, &key, &value, &overlapped, 0); } while (ret && (ULONG_PTR)overlapped == dead_pid);
- ok(ret, "GetQueuedCompletionStatus: %x\n", GetLastError()); - ok(key == JOB_OBJECT_MSG_NEW_PROCESS, "unexpected key %x\n", key); + ok(ret, "GetQueuedCompletionStatus: %lx\n", GetLastError()); + ok(key == JOB_OBJECT_MSG_NEW_PROCESS, "unexpected key %lx\n", key); ok((HANDLE)value == job, "unexpected value %p\n", (void *)value); - ok((ULONG_PTR)overlapped == GetCurrentProcessId(), "unexpected pid %#x\n", (DWORD)(DWORD_PTR)overlapped); + ok((ULONG_PTR)overlapped == GetCurrentProcessId(), "unexpected pid %#lx\n", (DWORD)(DWORD_PTR)overlapped);
do { ret = GetQueuedCompletionStatus(port, &key, &value, &overlapped, 0); } while (ret && (ULONG_PTR)overlapped == dead_pid);
- ok(ret, "GetQueuedCompletionStatus: %x\n", GetLastError()); - ok(key == JOB_OBJECT_MSG_NEW_PROCESS, "unexpected key %x\n", key); + ok(ret, "GetQueuedCompletionStatus: %lx\n", GetLastError()); + ok(key == JOB_OBJECT_MSG_NEW_PROCESS, "unexpected key %lx\n", key); ok((HANDLE)value == job_parent, "unexpected value %p\n", (void *)value); - ok((ULONG_PTR)overlapped == GetCurrentProcessId(), "unexpected pid %#x\n", (DWORD)(DWORD_PTR)overlapped); + ok((ULONG_PTR)overlapped == GetCurrentProcessId(), "unexpected pid %#lx\n", (DWORD)(DWORD_PTR)overlapped);
test_completion(port, JOB_OBJECT_MSG_NEW_PROCESS, (DWORD_PTR)job, pi.dwProcessId, 0); test_completion(port, JOB_OBJECT_MSG_NEW_PROCESS, (DWORD_PTR)job_parent, pi.dwProcessId, 0); @@ -4514,7 +4515,7 @@ static void test_nested_jobs_child(unsigned int index) { ret = pAssignProcessToJobObject(job_other, GetCurrentProcess()); ok(!ret, "AssignProcessToJobObject succeeded\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "Got unexpected error %u.\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "Got unexpected error %lu.\n", GetLastError()); }
CloseHandle(port); @@ -4546,9 +4547,9 @@ static void test_nested_jobs(void) }
job1 = pCreateJobObjectW(NULL, NULL); - ok(!!job1, "CreateJobObjectW failed, error %u.\n", GetLastError()); + ok(!!job1, "CreateJobObjectW failed, error %lu.\n", GetLastError()); job2 = pCreateJobObjectW(NULL, NULL); - ok(!!job2, "CreateJobObjectW failed, error %u.\n", GetLastError()); + ok(!!job2, "CreateJobObjectW failed, error %lu.\n", GetLastError());
create_succeeded = TRUE; sprintf(buffer, ""%s" process wait", selfname); @@ -4560,25 +4561,25 @@ static void test_nested_jobs(void) create_succeeded = FALSE; break; } - ok(ret, "CreateProcessA error %u\n", GetLastError()); + ok(ret, "CreateProcessA error %lu\n", GetLastError()); }
if (create_succeeded) { ret = pIsProcessInJob(info[0].hProcess, NULL, &already_in_job); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError());
if (!already_in_job) { ret = pAssignProcessToJobObject(job2, info[1].hProcess); - ok(ret, "AssignProcessToJobObject error %u\n", GetLastError()); + ok(ret, "AssignProcessToJobObject error %lu\n", GetLastError());
ret = pAssignProcessToJobObject(job1, info[0].hProcess); - ok(ret, "AssignProcessToJobObject error %u\n", GetLastError()); + ok(ret, "AssignProcessToJobObject error %lu\n", GetLastError());
ret = pAssignProcessToJobObject(job2, info[0].hProcess); ok(!ret, "AssignProcessToJobObject succeeded\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "Got unexpected error %u.\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "Got unexpected error %lu.\n", GetLastError());
TerminateProcess(info[1].hProcess, 0); wait_child_process(info[1].hProcess); @@ -4587,7 +4588,7 @@ static void test_nested_jobs(void)
ret = pAssignProcessToJobObject(job2, info[0].hProcess); ok(!ret, "AssignProcessToJobObject succeeded\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "Got unexpected error %u.\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "Got unexpected error %lu.\n", GetLastError()); }
TerminateProcess(info[0].hProcess, 0); @@ -4605,9 +4606,9 @@ static void test_nested_jobs(void) CloseHandle(job2);
job1 = pCreateJobObjectW(NULL, L"test_nested_jobs_0"); - ok(!!job1, "CreateJobObjectW failed, error %u.\n", GetLastError()); + ok(!!job1, "CreateJobObjectW failed, error %lu.\n", GetLastError()); job2 = pCreateJobObjectW(NULL, L"test_nested_jobs_1"); - ok(!!job2, "CreateJobObjectW failed, error %u.\n", GetLastError()); + ok(!!job2, "CreateJobObjectW failed, error %lu.\n", GetLastError());
sprintf(buffer, ""%s" process nested_jobs 0", selfname); ok(CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0, NULL, NULL, &si, &info[0]), @@ -4652,7 +4653,7 @@ static void test_job_list_attribute(HANDLE parent_job)
ret = pInitializeProcThreadAttributeList(NULL, 1, 0, &size); ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError()); attrs = heap_alloc(size);
@@ -4660,7 +4661,7 @@ static void test_job_list_attribute(HANDLE parent_job) jobs[1] = NULL;
ret = pInitializeProcThreadAttributeList(attrs, 1, 0, &size); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError()); ret = pUpdateProcThreadAttribute(attrs, 0, PROC_THREAD_ATTRIBUTE_JOB_LIST, jobs, sizeof(*jobs), NULL, NULL); if (!ret && GetLastError() == ERROR_NOT_SUPPORTED) @@ -4671,23 +4672,23 @@ static void test_job_list_attribute(HANDLE parent_job) heap_free(attrs); return; } - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError());
ret = pInitializeProcThreadAttributeList(attrs, 1, 0, &size); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError()); ret = pUpdateProcThreadAttribute(attrs, 0, PROC_THREAD_ATTRIBUTE_JOB_LIST, jobs, 3, NULL, NULL); - ok(!ret && GetLastError() == ERROR_BAD_LENGTH, "Got unexpected ret %#x, GetLastError() %u.\n", + ok(!ret && GetLastError() == ERROR_BAD_LENGTH, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError());
ret = pInitializeProcThreadAttributeList(attrs, 1, 0, &size); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError()); ret = pUpdateProcThreadAttribute(attrs, 0, PROC_THREAD_ATTRIBUTE_JOB_LIST, jobs, sizeof(*jobs) * 2, NULL, NULL); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError());
ret = pInitializeProcThreadAttributeList(attrs, 1, 0, &size); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError()); ret = pUpdateProcThreadAttribute(attrs, 0, PROC_THREAD_ATTRIBUTE_JOB_LIST, jobs, sizeof(*jobs), NULL, NULL);
@@ -4698,65 +4699,65 @@ static void test_job_list_attribute(HANDLE parent_job)
ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, EXTENDED_STARTUPINFO_PRESENT, NULL, NULL, (STARTUPINFOA *)&si, &pi); - ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected ret %#x, GetLastError() %u.\n", + ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError());
ret = pInitializeProcThreadAttributeList(attrs, 1, 0, &size); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError()); ret = pUpdateProcThreadAttribute(attrs, 0, PROC_THREAD_ATTRIBUTE_JOB_LIST, jobs + 1, sizeof(*jobs), NULL, NULL); ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, EXTENDED_STARTUPINFO_PRESENT, NULL, NULL, (STARTUPINFOA *)&si, &pi); - ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected ret %#x, GetLastError() %u.\n", + ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError());
ret = pInitializeProcThreadAttributeList(attrs, 1, 0, &size); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError()); ret = pUpdateProcThreadAttribute(attrs, 0, PROC_THREAD_ATTRIBUTE_JOB_LIST, &parent_job, sizeof(parent_job), NULL, NULL); ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, EXTENDED_STARTUPINFO_PRESENT, NULL, NULL, (STARTUPINFOA *)&si, &pi); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError());
ret = pIsProcessInJob(pi.hProcess, parent_job, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(out, "IsProcessInJob returned out=%u\n", out);
TerminateProcess(pi.hProcess, 0); wait_and_close_child_process(&pi);
jobs[0] = pCreateJobObjectW(NULL, NULL); - ok(!!jobs[0], "CreateJobObjectA error %u\n", GetLastError()); + ok(!!jobs[0], "CreateJobObjectA error %lu\n", GetLastError()); jobs[1] = pCreateJobObjectW(NULL, NULL); - ok(!!jobs[1], "CreateJobObjectA error %u\n", GetLastError()); + ok(!!jobs[1], "CreateJobObjectA error %lu\n", GetLastError());
/* Breakaway works for the inherited job only. */ limit_info.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_BREAKAWAY_OK; ret = pSetInformationJobObject(parent_job, JobObjectExtendedLimitInformation, &limit_info, sizeof(limit_info)); - ok(ret, "SetInformationJobObject error %u\n", GetLastError()); + ok(ret, "SetInformationJobObject error %lu\n", GetLastError()); limit_info.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_BREAKAWAY_OK | JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK; ret = pSetInformationJobObject(jobs[1], JobObjectExtendedLimitInformation, &limit_info, sizeof(limit_info)); - ok(ret, "SetInformationJobObject error %u\n", GetLastError()); + ok(ret, "SetInformationJobObject error %lu\n", GetLastError());
ret = pInitializeProcThreadAttributeList(attrs, 1, 0, &size); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError()); ret = pUpdateProcThreadAttribute(attrs, 0, PROC_THREAD_ATTRIBUTE_JOB_LIST, jobs + 1, sizeof(*jobs), NULL, NULL); ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, EXTENDED_STARTUPINFO_PRESENT | CREATE_BREAKAWAY_FROM_JOB, NULL, NULL, (STARTUPINFOA *)&si, &pi); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError());
ret = pIsProcessInJob(pi.hProcess, parent_job, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(!out, "IsProcessInJob returned out=%u\n", out);
ret = pIsProcessInJob(pi.hProcess, jobs[1], &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(out, "IsProcessInJob returned out=%u\n", out);
ret = pIsProcessInJob(pi.hProcess, jobs[0], &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(!out, "IsProcessInJob returned out=%u\n", out);
TerminateProcess(pi.hProcess, 0); @@ -4764,26 +4765,26 @@ static void test_job_list_attribute(HANDLE parent_job)
CloseHandle(jobs[1]); jobs[1] = pCreateJobObjectW(NULL, NULL); - ok(!!jobs[1], "CreateJobObjectA error %u\n", GetLastError()); + ok(!!jobs[1], "CreateJobObjectA error %lu\n", GetLastError());
ret = pInitializeProcThreadAttributeList(attrs, 1, 0, &size); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError()); ret = pUpdateProcThreadAttribute(attrs, 0, PROC_THREAD_ATTRIBUTE_JOB_LIST, jobs + 1, sizeof(*jobs), NULL, NULL); ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, EXTENDED_STARTUPINFO_PRESENT, NULL, NULL, (STARTUPINFOA *)&si, &pi); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError());
ret = pIsProcessInJob(pi.hProcess, parent_job, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(out, "IsProcessInJob returned out=%u\n", out);
ret = pIsProcessInJob(pi.hProcess, jobs[1], &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(out, "IsProcessInJob returned out=%u\n", out);
ret = pIsProcessInJob(pi.hProcess, jobs[0], &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(!out, "IsProcessInJob returned out=%u\n", out);
TerminateProcess(pi.hProcess, 0); @@ -4791,54 +4792,54 @@ static void test_job_list_attribute(HANDLE parent_job)
ret = pQueryInformationJobObject(jobs[0], JobObjectBasicAccountingInformation, &job_info, sizeof(job_info), NULL); - ok(ret, "QueryInformationJobObject error %u\n", GetLastError()); - ok(!job_info.TotalProcesses, "Got unexpected TotalProcesses %u.\n", job_info.TotalProcesses); - ok(!job_info.ActiveProcesses, "Got unexpected ActiveProcesses %u.\n", job_info.ActiveProcesses); + ok(ret, "QueryInformationJobObject error %lu\n", GetLastError()); + ok(!job_info.TotalProcesses, "Got unexpected TotalProcesses %lu.\n", job_info.TotalProcesses); + ok(!job_info.ActiveProcesses, "Got unexpected ActiveProcesses %lu.\n", job_info.ActiveProcesses);
ret = pQueryInformationJobObject(jobs[1], JobObjectBasicAccountingInformation, &job_info, sizeof(job_info), NULL); - ok(ret, "QueryInformationJobObject error %u\n", GetLastError()); - ok(job_info.TotalProcesses == 1, "Got unexpected TotalProcesses %u.\n", job_info.TotalProcesses); - ok(!job_info.ActiveProcesses || job_info.ActiveProcesses == 1, "Got unexpected ActiveProcesses %u.\n", + ok(ret, "QueryInformationJobObject error %lu\n", GetLastError()); + ok(job_info.TotalProcesses == 1, "Got unexpected TotalProcesses %lu.\n", job_info.TotalProcesses); + ok(!job_info.ActiveProcesses || job_info.ActiveProcesses == 1, "Got unexpected ActiveProcesses %lu.\n", job_info.ActiveProcesses);
/* Fails due to the second job already has the parent other than the first job in the list. */ ret = pInitializeProcThreadAttributeList(attrs, 1, 0, &size); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError()); ret = pUpdateProcThreadAttribute(attrs, 0, PROC_THREAD_ATTRIBUTE_JOB_LIST, jobs, 2 * sizeof(*jobs), NULL, NULL);
port = pCreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, 0, 1); - ok(!!port, "CreateIoCompletionPort error %u\n", GetLastError()); + ok(!!port, "CreateIoCompletionPort error %lu\n", GetLastError());
port_info.CompletionPort = port; port_info.CompletionKey = jobs[0]; ret = pSetInformationJobObject(jobs[0], JobObjectAssociateCompletionPortInformation, &port_info, sizeof(port_info)); - ok(ret, "SetInformationJobObject error %u\n", GetLastError()); + ok(ret, "SetInformationJobObject error %lu\n", GetLastError());
ret = GetQueuedCompletionStatus(port, &key, &value, &overlapped, 0); ok(!ret, "GetQueuedCompletionStatus succeeded.\n");
ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, EXTENDED_STARTUPINFO_PRESENT, NULL, NULL, (STARTUPINFOA *)&si, &pi); - ok(!ret && GetLastError() == ERROR_ACCESS_DENIED, "Got unexpected ret %#x, GetLastError() %u.\n", + ok(!ret && GetLastError() == ERROR_ACCESS_DENIED, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError());
ret = GetQueuedCompletionStatus(port, &key, &value, &overlapped, 100); - ok(ret, "GetQueuedCompletionStatus: %x\n", GetLastError()); - ok(key == JOB_OBJECT_MSG_NEW_PROCESS, "unexpected key %x\n", key); + ok(ret, "GetQueuedCompletionStatus: %lx\n", GetLastError()); + ok(key == JOB_OBJECT_MSG_NEW_PROCESS, "unexpected key %lx\n", key); ok((HANDLE)value == jobs[0], "unexpected value %p\n", (void *)value); ok(!!overlapped, "Got zero pid.\n");
ret = GetQueuedCompletionStatus(port, &key, &value, &overlapped, 100); - ok(ret, "GetQueuedCompletionStatus: %x\n", GetLastError()); - ok(key == JOB_OBJECT_MSG_EXIT_PROCESS, "unexpected key %x\n", key); + ok(ret, "GetQueuedCompletionStatus: %lx\n", GetLastError()); + ok(key == JOB_OBJECT_MSG_EXIT_PROCESS, "unexpected key %lx\n", key); ok((HANDLE)value == jobs[0], "unexpected value %p\n", (void *)value); ok(!!overlapped, "Got zero pid.\n");
ret = GetQueuedCompletionStatus(port, &key, &value, &overlapped, 100); - ok(ret, "GetQueuedCompletionStatus: %x\n", GetLastError()); - ok(key == JOB_OBJECT_MSG_ACTIVE_PROCESS_ZERO, "unexpected key %x\n", key); + ok(ret, "GetQueuedCompletionStatus: %lx\n", GetLastError()); + ok(key == JOB_OBJECT_MSG_ACTIVE_PROCESS_ZERO, "unexpected key %lx\n", key); ok((HANDLE)value == jobs[0], "unexpected value %p\n", (void *)value); ok(!overlapped, "Got unexpected overlapped %p.\n", overlapped);
@@ -4850,31 +4851,31 @@ static void test_job_list_attribute(HANDLE parent_job) /* The first job got updated even though the process creation failed. */ ret = pQueryInformationJobObject(jobs[0], JobObjectBasicAccountingInformation, &job_info, sizeof(job_info), NULL); - ok(ret, "QueryInformationJobObject error %u\n", GetLastError()); - ok(job_info.TotalProcesses == 1, "Got unexpected TotalProcesses %u.\n", job_info.TotalProcesses); - ok(!job_info.ActiveProcesses, "Got unexpected ActiveProcesses %u.\n", job_info.ActiveProcesses); + ok(ret, "QueryInformationJobObject error %lu\n", GetLastError()); + ok(job_info.TotalProcesses == 1, "Got unexpected TotalProcesses %lu.\n", job_info.TotalProcesses); + ok(!job_info.ActiveProcesses, "Got unexpected ActiveProcesses %lu.\n", job_info.ActiveProcesses);
ret = pQueryInformationJobObject(jobs[1], JobObjectBasicAccountingInformation, &job_info, sizeof(job_info), NULL); - ok(ret, "QueryInformationJobObject error %u\n", GetLastError()); - ok(job_info.TotalProcesses == 1, "Got unexpected TotalProcesses %u.\n", job_info.TotalProcesses); - ok(!job_info.ActiveProcesses, "Got unexpected ActiveProcesses %u.\n", job_info.ActiveProcesses); + ok(ret, "QueryInformationJobObject error %lu\n", GetLastError()); + ok(job_info.TotalProcesses == 1, "Got unexpected TotalProcesses %lu.\n", job_info.TotalProcesses); + ok(!job_info.ActiveProcesses, "Got unexpected ActiveProcesses %lu.\n", job_info.ActiveProcesses);
/* Check that the first job actually got the job_parent as parent. */ ret = pInitializeProcThreadAttributeList(attrs, 1, 0, &size); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError()); ret = pUpdateProcThreadAttribute(attrs, 0, PROC_THREAD_ATTRIBUTE_JOB_LIST, jobs, sizeof(*jobs), NULL, NULL); ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, EXTENDED_STARTUPINFO_PRESENT | CREATE_BREAKAWAY_FROM_JOB, NULL, NULL, (STARTUPINFOA *)&si, &pi); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError());
ret = pIsProcessInJob(pi.hProcess, parent_job, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(out, "IsProcessInJob returned out=%u\n", out);
ret = pIsProcessInJob(pi.hProcess, jobs[0], &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(out, "IsProcessInJob returned out=%u\n", out);
TerminateProcess(pi.hProcess, 0); @@ -4885,64 +4886,64 @@ static void test_job_list_attribute(HANDLE parent_job) jobs[1] = tmp;
ret = pInitializeProcThreadAttributeList(attrs, 1, 0, &size); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError()); ret = pUpdateProcThreadAttribute(attrs, 0, PROC_THREAD_ATTRIBUTE_JOB_LIST, jobs, 2 * sizeof(*jobs), NULL, NULL); ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, EXTENDED_STARTUPINFO_PRESENT, NULL, NULL, (STARTUPINFOA *)&si, &pi); - ok(!ret && GetLastError() == ERROR_ACCESS_DENIED, "Got unexpected ret %#x, GetLastError() %u.\n", + ok(!ret && GetLastError() == ERROR_ACCESS_DENIED, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError());
CloseHandle(jobs[0]); CloseHandle(jobs[1]);
jobs[0] = pCreateJobObjectW(NULL, NULL); - ok(!!jobs[0], "CreateJobObjectA error %u\n", GetLastError()); + ok(!!jobs[0], "CreateJobObjectA error %lu\n", GetLastError()); jobs[1] = pCreateJobObjectW(NULL, NULL); - ok(!!jobs[1], "CreateJobObjectA error %u\n", GetLastError()); + ok(!!jobs[1], "CreateJobObjectA error %lu\n", GetLastError());
/* Create the job chain successfully and check the job chain. */ ret = pInitializeProcThreadAttributeList(attrs, 1, 0, &size); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError()); ret = pUpdateProcThreadAttribute(attrs, 0, PROC_THREAD_ATTRIBUTE_JOB_LIST, jobs, 2 * sizeof(*jobs), NULL, NULL); ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, EXTENDED_STARTUPINFO_PRESENT, NULL, NULL, (STARTUPINFOA *)&si, &pi); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError());
ret = pIsProcessInJob(pi.hProcess, parent_job, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(out, "IsProcessInJob returned out=%u\n", out);
ret = pIsProcessInJob(pi.hProcess, jobs[0], &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(out, "IsProcessInJob returned out=%u\n", out);
ret = pIsProcessInJob(pi.hProcess, jobs[1], &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(out, "IsProcessInJob returned out=%u\n", out);
TerminateProcess(pi.hProcess, 0); wait_and_close_child_process(&pi);
ret = pInitializeProcThreadAttributeList(attrs, 1, 0, &size); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError()); ret = pUpdateProcThreadAttribute(attrs, 0, PROC_THREAD_ATTRIBUTE_JOB_LIST, jobs + 1, sizeof(*jobs), NULL, NULL); ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, EXTENDED_STARTUPINFO_PRESENT | CREATE_BREAKAWAY_FROM_JOB, NULL, NULL, (STARTUPINFOA *)&si, &pi); - ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError());
ret = pIsProcessInJob(pi.hProcess, parent_job, &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(out, "IsProcessInJob returned out=%u\n", out);
ret = pIsProcessInJob(pi.hProcess, jobs[0], &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(out, "IsProcessInJob returned out=%u\n", out);
ret = pIsProcessInJob(pi.hProcess, jobs[1], &out); - ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(ret, "IsProcessInJob error %lu\n", GetLastError()); ok(out, "IsProcessInJob returned out=%u\n", out);
TerminateProcess(pi.hProcess, 0); @@ -4956,7 +4957,7 @@ static void test_job_list_attribute(HANDLE parent_job)
limit_info.BasicLimitInformation.LimitFlags = 0; ret = pSetInformationJobObject(parent_job, JobObjectExtendedLimitInformation, &limit_info, sizeof(limit_info)); - ok(ret, "SetInformationJobObject error %u\n", GetLastError()); + ok(ret, "SetInformationJobObject error %lu\n", GetLastError()); }
START_TEST(process) @@ -4982,11 +4983,11 @@ START_TEST(process) else if (!strcmp(myARGV[2], "sync") && myARGC >= 4) { HANDLE sem = OpenSemaphoreA(SYNCHRONIZE, FALSE, myARGV[3]); - ok(sem != 0, "OpenSemaphoreA(%s) failed le=%u\n", myARGV[3], GetLastError()); + ok(sem != 0, "OpenSemaphoreA(%s) failed le=%lu\n", myARGV[3], GetLastError()); if (sem) { DWORD ret = WaitForSingleObject(sem, 30000); - ok(ret == WAIT_OBJECT_0, "WaitForSingleObject(%s) returned %u\n", myARGV[3], ret); + ok(ret == WAIT_OBJECT_0, "WaitForSingleObject(%s) returned %lu\n", myARGV[3], ret); CloseHandle(sem); } return; @@ -5017,7 +5018,7 @@ START_TEST(process) * nested process. */ hFile = CreateFileA(myARGV[3], GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); - childPrintf(hFile, "[Nested]\nPid=%08u\n", info.dwProcessId); + childPrintf(hFile, "[Nested]\nPid=%08lu\n", info.dwProcessId); CloseHandle(hFile); return; }
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/kernel32/tests/profile.c | 347 +++++++++++++++++++++-------------------- 1 file changed, 174 insertions(+), 173 deletions(-)
diff --git a/dlls/kernel32/tests/profile.c b/dlls/kernel32/tests/profile.c index 94ef0a85467..08e419544cc 100644 --- a/dlls/kernel32/tests/profile.c +++ b/dlls/kernel32/tests/profile.c @@ -17,6 +17,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 <stdarg.h> #include <stdio.h> @@ -36,7 +37,7 @@ static void check_profile_string_(int line, const char *section, const char *nam { char value[200] = {0}; DWORD ret = GetPrivateProfileStringA(section, name, "default", value, sizeof(value), file); - ok_(__FILE__, line)(ret == strlen(expect), "expected len %u, got %u\n", strlen(expect), ret); + ok_(__FILE__, line)(ret == strlen(expect), "expected len %Iu, got %lu\n", strlen(expect), ret); ok_(__FILE__, line)(!strcmp(value, expect), "expected %s, got %s\n", debugstr_a(expect), debugstr_a(value)); } #define check_profile_string(a, b, c, d) check_profile_string_(__LINE__, a, b, c, d); @@ -191,7 +192,7 @@ static void test_profile_sections(void) ok( ret == 0, "expected return size 0, got %d\n", ret ); ok( GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == 0xdeadbeef /* Win98 */, - "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); if (GetLastError() == 0xdeadbeef) on_win98 = TRUE;
SetLastError(0xdeadbeef); @@ -199,35 +200,35 @@ static void test_profile_sections(void) ok( ret == 0, "expected return size 0, got %d\n", ret ); ok( GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == 0xdeadbeef /* Win98 */, - "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
if (!on_win98) { SetLastError(0xdeadbeef); ret = GetPrivateProfileSectionA( "section1", NULL, 0, testfile4 ); ok( ret == 0, "expected return size 0, got %d\n", ret ); - 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); ret = GetPrivateProfileSectionA( NULL, buf, sizeof(buf), testfile4 ); ok( ret == 0, "expected return size 0, got %d\n", ret ); ok( GetLastError() == ERROR_INVALID_PARAMETER, - "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = GetPrivateProfileSectionA( "section1", buf, sizeof(buf), NULL ); ok( ret == 0, "expected return size 0, got %d\n", ret ); todo_wine ok( GetLastError() == ERROR_FILE_NOT_FOUND, - "expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); + "expected ERROR_FILE_NOT_FOUND, got %ld\n", GetLastError());
/* Existing empty section with no keys */ SetLastError(0xdeadbeef); ret=GetPrivateProfileSectionA("section2", buf, sizeof(buf), testfile4); ok( ret == 0, "expected return size 0, got %d\n", ret ); ok( GetLastError() == ERROR_SUCCESS, - "expected ERROR_SUCCESS, got %d\n", GetLastError()); + "expected ERROR_SUCCESS, got %ld\n", GetLastError());
/* Existing section with keys and values*/ SetLastError(0xdeadbeef); @@ -238,7 +239,7 @@ static void test_profile_sections(void) ret, buf); ok( buf[ret-1] == 0 && buf[ret] == 0, "returned buffer not terminated with double-null\n" ); ok( GetLastError() == ERROR_SUCCESS, - "expected ERROR_SUCCESS, got %d\n", GetLastError()); + "expected ERROR_SUCCESS, got %ld\n", GetLastError());
/* Existing section with no keys but has values */ SetLastError(0xdeadbeef); @@ -250,7 +251,7 @@ static void test_profile_sections(void) ret, buf); ok( buf[ret-1] == 0 && buf[ret] == 0, "returned buffer not terminated with double-null\n" ); ok( GetLastError() == ERROR_SUCCESS, - "expected ERROR_SUCCESS, got %d\n", GetLastError()); + "expected ERROR_SUCCESS, got %ld\n", GetLastError());
/* Overflow*/ ret=GetPrivateProfileSectionA("section1", buf, 24, testfile4); @@ -394,24 +395,24 @@ static void test_profile_existing(void) { if (!ret) ok( broken(GetLastError() == pe[i].broken_error), - "%d: WritePrivateProfileString failed with error %u\n", i, GetLastError() ); + "%d: WritePrivateProfileString failed with error %lu\n", i, GetLastError() ); CloseHandle(h); size = GetPrivateProfileStringA(SECTION, KEY, 0, buffer, MAX_PATH, testfile1); if (ret) - ok( size == 5, "%d: test failed, number of characters copied: %d instead of 5\n", i, size ); + ok( size == 5, "%d: test failed, number of characters copied: %ld instead of 5\n", i, size ); else - ok( !size, "%d: test failed, number of characters copied: %d instead of 0\n", i, size ); + ok( !size, "%d: test failed, number of characters copied: %ld instead of 0\n", i, size ); } else { DWORD err = GetLastError(); ok( !ret, "%d: WritePrivateProfileString succeeded\n", i ); if (!ret) - ok( err == pe[i].write_error, "%d: WritePrivateProfileString failed with error %u/%u\n", + ok( err == pe[i].write_error, "%d: WritePrivateProfileString failed with error %lu/%lu\n", i, err, pe[i].write_error ); CloseHandle(h); size = GetPrivateProfileStringA(SECTION, KEY, 0, buffer, MAX_PATH, testfile1); - ok( !size, "%d: test failed, number of characters copied: %d instead of 0\n", i, size ); + ok( !size, "%d: test failed, number of characters copied: %ld instead of 0\n", i, size ); }
ok( DeleteFileA(testfile1), "delete failed\n" ); @@ -430,7 +431,7 @@ static void test_profile_existing(void) SetLastError(0xdeadbeef); ret = GetPrivateProfileStringA(SECTION, KEY, NULL, buffer, MAX_PATH, testfile2); if (!pe[i].read_error) - ok( ret, "%d: GetPrivateProfileString failed with error %u\n", i, GetLastError() ); + ok( ret, "%d: GetPrivateProfileString failed with error %lu\n", i, GetLastError() ); else ok( !ret, "%d: GetPrivateProfileString succeeded\n", i ); CloseHandle(h); @@ -448,12 +449,12 @@ static void test_profile_delete_on_close(void) h = CreateFileA(testfile, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_FLAG_DELETE_ON_CLOSE, NULL); res = WriteFile( h, contents, sizeof contents - 1, &size, NULL ); - ok( res, "Cannot write test file: %x\n", GetLastError() ); + ok( res, "Cannot write test file: %lx\n", GetLastError() ); ok( size == sizeof contents - 1, "Test file: partial write\n");
SetLastError(0xdeadbeef); res = GetPrivateProfileIntA(SECTION, KEY, 0, testfile); - ok( res == 123, "Got %d instead of 123\n", res); + ok( res == 123, "Got %ld instead of 123\n", res);
/* This also deletes the file */ CloseHandle(h); @@ -470,12 +471,12 @@ static void test_profile_refresh(void) h = CreateFileA(testfile, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_FLAG_DELETE_ON_CLOSE, NULL); res = WriteFile( h, contents1, sizeof contents1 - 1, &size, NULL ); - ok( res, "Cannot write test file: %x\n", GetLastError() ); + ok( res, "Cannot write test file: %lx\n", GetLastError() ); ok( size == sizeof contents1 - 1, "Test file: partial write\n");
SetLastError(0xdeadbeef); res = GetPrivateProfileIntA(SECTION, KEY, 0, testfile); - ok( res == 123, "Got %d instead of 123\n", res); + ok( res == 123, "Got %ld instead of 123\n", res);
CloseHandle(h);
@@ -484,12 +485,12 @@ static void test_profile_refresh(void) h = CreateFileA(testfile, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_FLAG_DELETE_ON_CLOSE, NULL); res = WriteFile( h, contents2, sizeof contents2 - 1, &size, NULL ); - ok( res, "Cannot write test file: %x\n", GetLastError() ); + ok( res, "Cannot write test file: %lx\n", GetLastError() ); ok( size == sizeof contents2 - 1, "Test file: partial write\n");
SetLastError(0xdeadbeef); res = GetPrivateProfileIntA(SECTION, KEY, 0, testfile); - ok( res == 124, "Got %d instead of 124\n", res); + ok( res == 124, "Got %ld instead of 124\n", res);
/* This also deletes the file */ CloseHandle(h); @@ -497,7 +498,7 @@ static void test_profile_refresh(void) /* Cache must be invalidated if file no longer exists and default must be returned */ SetLastError(0xdeadbeef); res = GetPrivateProfileIntA(SECTION, KEY, 421, testfile); - ok( res == 421, "Got %d instead of 421\n", res); + ok( res == 421, "Got %ld instead of 421\n", res); }
static void create_test_file(LPCSTR name, LPCSTR data, DWORD size) @@ -536,7 +537,7 @@ static void test_profile_directory_readonly(void)
attributes.nLength = sizeof(attributes); ret = ConvertStringSecurityDescriptorToSecurityDescriptorA(sddl_string_everyone_readonly, SDDL_REVISION_1, &attributes.lpSecurityDescriptor, NULL); - ok(ret == TRUE, "ConvertStringSecurityDescriptorToSecurityDescriptor failed: %d\n", GetLastError()); + ok(ret == TRUE, "ConvertStringSecurityDescriptorToSecurityDescriptor failed: %ld\n", GetLastError());
GetTempPathA(MAX_PATH, path_folder); lstrcatA(path_folder, "wine-test"); @@ -545,7 +546,7 @@ static void test_profile_directory_readonly(void) lstrcatA(path_file, "\tmp.ini");
ret = CreateDirectoryA(path_folder, &attributes); - ok(ret == TRUE, "CreateDirectoryA failed: %d\n", GetLastError()); + ok(ret == TRUE, "CreateDirectoryA failed: %ld\n", GetLastError());
ret = WritePrivateProfileStringA("App", "key", "string", path_file); ok(ret == FALSE, "Expected FALSE, got %d\n", ret); @@ -557,7 +558,7 @@ static void test_profile_directory_readonly(void) ok(ret == FALSE, "Expected FALSE, got %d\n", ret);
ret = RemoveDirectoryA(path_folder); - ok(ret == TRUE, "RemoveDirectoryA failed: %d\n", GetLastError()); + ok(ret == TRUE, "RemoveDirectoryA failed: %ld\n", GetLastError());
LocalFree(attributes.lpSecurityDescriptor); } @@ -589,7 +590,7 @@ static void test_GetPrivateProfileString(const char *content, const char *descri lstrcpyA(buf, "kumquat"); ret = GetPrivateProfileStringA(NULL, "name1", "default", buf, MAX_PATH, filename); - ok(ret == 18, "Expected 18, got %d\n", ret); + ok(ret == 18, "Expected 18, got %ld\n", ret); len = lstrlenA("section1") + sizeof(CHAR) + lstrlenA("section2") + 2 * sizeof(CHAR);
ok(!memcmp(buf, "section1\0section2\0", len), @@ -601,7 +602,7 @@ static void test_GetPrivateProfileString(const char *content, const char *descri lstrcpyA(buf, "kumquat"); ret = GetPrivateProfileStringA(emptystr, "name1", "default", buf, MAX_PATH, filename); - ok(ret == 7, "Expected 7, got %d\n", ret); + ok(ret == 7, "Expected 7, got %ld\n", ret); ok(!lstrcmpA(buf, "default"), "Expected "default", got "%s"\n", buf); ok(emptystr_ok(emptystr), "AppName modified\n");
@@ -610,7 +611,7 @@ static void test_GetPrivateProfileString(const char *content, const char *descri lstrcpyA(buf, "kumquat"); ret = GetPrivateProfileStringA("notasection", "name1", "default", buf, MAX_PATH, filename); - ok(ret == 7, "Expected 7, got %d\n", ret); + ok(ret == 7, "Expected 7, got %ld\n", ret); ok(!lstrcmpA(buf, "default"), "Expected "default", got "%s"\n", buf);
/* lpAppName is empty, lpDefault is NULL */ @@ -618,7 +619,7 @@ static void test_GetPrivateProfileString(const char *content, const char *descri lstrcpyA(buf, "kumquat"); ret = GetPrivateProfileStringA(emptystr, "name1", NULL, buf, MAX_PATH, filename); - ok(ret == 0, "Expected 0, got %d\n", ret); + ok(ret == 0, "Expected 0, got %ld\n", ret); ok(!lstrcmpA(buf, ""), "Expected "", got "%s"\n", buf); ok(emptystr_ok(emptystr), "AppName modified\n");
@@ -627,7 +628,7 @@ static void test_GetPrivateProfileString(const char *content, const char *descri lstrcpyA(buf, "kumquat"); ret = GetPrivateProfileStringA(emptystr, "name1", "", buf, MAX_PATH, filename); - ok(ret == 0, "Expected 0, got %d\n", ret); + ok(ret == 0, "Expected 0, got %ld\n", ret); ok(!lstrcmpA(buf, ""), "Expected "", got "%s"\n", buf); ok(emptystr_ok(emptystr), "AppName modified\n");
@@ -638,7 +639,7 @@ static void test_GetPrivateProfileString(const char *content, const char *descri lstrcpyA(def_val, "default "); ret = GetPrivateProfileStringA(emptystr, "name1", def_val, buf, MAX_PATH, filename); - ok(ret == 7, "Expected 7, got %d\n", ret); + ok(ret == 7, "Expected 7, got %ld\n", ret); ok(!lstrcmpA(buf, "default"), "Expected "default", got "%s"\n", buf); ok(emptystr_ok(emptystr), "AppName modified\n");
@@ -649,7 +650,7 @@ static void test_GetPrivateProfileString(const char *content, const char *descri lstrcpyA(def_val, "one two "); ret = GetPrivateProfileStringA(emptystr, "name1", def_val, buf, MAX_PATH, filename); - ok(ret == 7, "Expected 7, got %d\n", ret); + ok(ret == 7, "Expected 7, got %ld\n", ret); ok(!lstrcmpA(buf, "one two"), "Expected "one two", got "%s"\n", buf); ok(emptystr_ok(emptystr), "AppName modified\n");
@@ -658,7 +659,7 @@ static void test_GetPrivateProfileString(const char *content, const char *descri lstrcpyA(buf, "kumquat"); ret = GetPrivateProfileStringA(emptystr, "name1", "one two", buf, MAX_PATH, filename); - ok(ret == 7, "Expected 7, got %d\n", ret); + ok(ret == 7, "Expected 7, got %ld\n", ret); ok(!lstrcmpA(buf, "one two"), "Expected "one two", got "%s"\n", buf); ok(emptystr_ok(emptystr), "AppName modified\n");
@@ -667,7 +668,7 @@ static void test_GetPrivateProfileString(const char *content, const char *descri lstrcpyA(buf, "kumquat"); ret = GetPrivateProfileStringA("section1", NULL, "default", buf, MAX_PATH, filename); - ok(ret == 18, "Expected 18, got %d\n", ret); + ok(ret == 18, "Expected 18, got %ld\n", ret); ok(!memcmp(buf, "name1\0name2\0name4\0", ret + 1), "Expected "name1\x00name2\x00name4\x00\x00", got %s\n", debugstr_an(buf, (ret + 2 >= MAX_PATH ? MAX_PATH : ret + 1))); @@ -677,7 +678,7 @@ static void test_GetPrivateProfileString(const char *content, const char *descri lstrcpyA(buf, "kumquat"); ret = GetPrivateProfileStringA("section1", emptystr, "default", buf, MAX_PATH, filename); - ok(ret == 7, "Expected 7, got %d\n", ret); + ok(ret == 7, "Expected 7, got %ld\n", ret); ok(!lstrcmpA(buf, "default"), "Expected "default", got "%s"\n", buf); ok(emptystr_ok(emptystr), "KeyName modified\n");
@@ -686,7 +687,7 @@ static void test_GetPrivateProfileString(const char *content, const char *descri lstrcpyA(buf, "kumquat"); ret = GetPrivateProfileStringA("section1", "notakey", "default", buf, MAX_PATH, filename); - ok(ret == 7, "Expected 7, got %d\n", ret); + ok(ret == 7, "Expected 7, got %ld\n", ret); ok(!lstrcmpA(buf, "default"), "Expected "default", got "%s"\n", buf);
/* lpKeyName is empty, lpDefault is NULL */ @@ -694,7 +695,7 @@ static void test_GetPrivateProfileString(const char *content, const char *descri lstrcpyA(buf, "kumquat"); ret = GetPrivateProfileStringA("section1", emptystr, NULL, buf, MAX_PATH, filename); - ok(ret == 0, "Expected 0, got %d\n", ret); + ok(ret == 0, "Expected 0, got %ld\n", ret); ok(!lstrcmpA(buf, ""), "Expected "", got "%s"\n", buf); ok(emptystr_ok(emptystr), "KeyName modified\n");
@@ -703,7 +704,7 @@ static void test_GetPrivateProfileString(const char *content, const char *descri lstrcpyA(buf, "kumquat"); ret = GetPrivateProfileStringA("section1", emptystr, "", buf, MAX_PATH, filename); - ok(ret == 0, "Expected 0, got %d\n", ret); + ok(ret == 0, "Expected 0, got %ld\n", ret); ok(!lstrcmpA(buf, ""), "Expected "", got "%s"\n", buf); ok(emptystr_ok(emptystr), "KeyName modified\n");
@@ -714,7 +715,7 @@ static void test_GetPrivateProfileString(const char *content, const char *descri lstrcpyA(def_val, "default "); ret = GetPrivateProfileStringA("section1", emptystr, def_val, buf, MAX_PATH, filename); - ok(ret == 7, "Expected 7, got %d\n", ret); + ok(ret == 7, "Expected 7, got %ld\n", ret); ok(!lstrcmpA(buf, "default"), "Expected "default", got "%s"\n", buf); ok(emptystr_ok(emptystr), "KeyName modified\n");
@@ -730,7 +731,7 @@ static void test_GetPrivateProfileString(const char *content, const char *descri lstrcpyA(buf, "kumquat"); ret = GetPrivateProfileStringA("section1", "name1", "default", buf, MAX_PATH, NULL); - ok(ret == 7, "Expected 7, got %d\n", ret); + ok(ret == 7, "Expected 7, got %ld\n", ret); ok(!lstrcmpA(buf, "default"), "Expected "default", got "%s"\n", buf);
/* lpFileName is empty */ @@ -738,7 +739,7 @@ static void test_GetPrivateProfileString(const char *content, const char *descri lstrcpyA(buf, "kumquat"); ret = GetPrivateProfileStringA("section1", "name1", "default", buf, MAX_PATH, ""); - ok(ret == 7, "Expected 7, got %d\n", ret); + ok(ret == 7, "Expected 7, got %ld\n", ret); ok(!lstrcmpA(buf, "default"), "Expected "default", got "%s"\n", buf);
/* lpFileName is nonexistent */ @@ -746,7 +747,7 @@ static void test_GetPrivateProfileString(const char *content, const char *descri lstrcpyA(buf, "kumquat"); ret = GetPrivateProfileStringA("section1", "name1", "default", buf, MAX_PATH, "nonexistent"); - ok(ret == 7, "Expected 7, got %d\n", ret); + ok(ret == 7, "Expected 7, got %ld\n", ret); ok(!lstrcmpA(buf, "default"), "Expected "default", got "%s"\n", buf);
/* nSize is 0 */ @@ -754,7 +755,7 @@ static void test_GetPrivateProfileString(const char *content, const char *descri lstrcpyA(buf, "kumquat"); ret = GetPrivateProfileStringA("section1", "name1", "default", buf, 0, filename); - ok(ret == 0, "Expected 0, got %d\n", ret); + ok(ret == 0, "Expected 0, got %ld\n", ret); ok(!lstrcmpA(buf, "kumquat"), "Expected buf to be unchanged, got "%s"\n", buf);
/* nSize is exact size of output */ @@ -762,7 +763,7 @@ static void test_GetPrivateProfileString(const char *content, const char *descri lstrcpyA(buf, "kumquat"); ret = GetPrivateProfileStringA("section1", "name1", "default", buf, 4, filename); - ok(ret == 3, "Expected 3, got %d\n", ret); + ok(ret == 3, "Expected 3, got %ld\n", ret); ok(!lstrcmpA(buf, "val"), "Expected "val", got "%s"\n", buf);
/* nSize has room for NULL terminator */ @@ -770,7 +771,7 @@ static void test_GetPrivateProfileString(const char *content, const char *descri lstrcpyA(buf, "kumquat"); ret = GetPrivateProfileStringA("section1", "name1", "default", buf, 5, filename); - ok(ret == 4, "Expected 4, got %d\n", ret); + ok(ret == 4, "Expected 4, got %ld\n", ret); ok(!lstrcmpA(buf, "val1"), "Expected "val1", got "%s"\n", buf);
/* output is 1 character */ @@ -778,7 +779,7 @@ static void test_GetPrivateProfileString(const char *content, const char *descri lstrcpyA(buf, "kumquat"); ret = GetPrivateProfileStringA("section1", "name4", "default", buf, MAX_PATH, filename); - ok(ret == 1, "Expected 1, got %d\n", ret); + ok(ret == 1, "Expected 1, got %ld\n", ret); ok(!lstrcmpA(buf, "a"), "Expected "a", got "%s"\n", buf);
/* output is 1 character, no room for NULL terminator */ @@ -786,7 +787,7 @@ static void test_GetPrivateProfileString(const char *content, const char *descri lstrcpyA(buf, "kumquat"); ret = GetPrivateProfileStringA("section1", "name4", "default", buf, 1, filename); - ok(ret == 0, "Expected 0, got %d\n", ret); + ok(ret == 0, "Expected 0, got %ld\n", ret); ok(!lstrcmpA(buf, ""), "Expected "", got "%s"\n", buf);
/* lpAppName is NULL, not enough room for final section name */ @@ -794,7 +795,7 @@ static void test_GetPrivateProfileString(const char *content, const char *descri lstrcpyA(buf, "kumquat"); ret = GetPrivateProfileStringA(NULL, "name1", "default", buf, 16, filename); - ok(ret == 14, "Expected 14, got %d\n", ret); + ok(ret == 14, "Expected 14, got %ld\n", ret); len = lstrlenA("section1") + 2 * sizeof(CHAR); todo_wine ok(!memcmp(buf, "section1\0secti\0", ret + 2), @@ -806,7 +807,7 @@ static void test_GetPrivateProfileString(const char *content, const char *descri lstrcpyA(buf, "kumquat"); ret = GetPrivateProfileStringA("section1", NULL, "default", buf, 16, filename); - ok(ret == 14, "Expected 14, got %d\n", ret); + ok(ret == 14, "Expected 14, got %ld\n", ret); todo_wine ok(!memcmp(buf, "name1\0name2\0na\0", ret + 2), "Expected "name1\x00name2\x00na\x00\x00", got %s\n", @@ -817,7 +818,7 @@ static void test_GetPrivateProfileString(const char *content, const char *descri lstrcpyA(buf, "kumquat"); ret = GetPrivateProfileStringA("section1", "name2", "default", buf, MAX_PATH, filename); - ok(ret == 4, "Expected 4, got %d\n", ret); + ok(ret == 4, "Expected 4, got %ld\n", ret); ok(!lstrcmpA(buf, "val2"), "Expected "val2", got "%s"\n", buf);
/* case does not match */ @@ -825,7 +826,7 @@ static void test_GetPrivateProfileString(const char *content, const char *descri lstrcpyA(buf, "kumquat"); ret = GetPrivateProfileStringA("section1", "NaMe1", "default", buf, MAX_PATH, filename); - ok(ret == 4, "Expected 4, got %d\n", ret); + ok(ret == 4, "Expected 4, got %ld\n", ret); ok(!lstrcmpA(buf, "val1"), "Expected "val1", got "%s"\n", buf);
/* only filename is used */ @@ -833,7 +834,7 @@ static void test_GetPrivateProfileString(const char *content, const char *descri lstrcpyA(buf, "kumquat"); ret = GetPrivateProfileStringA("section1", "NaMe1", "default", buf, MAX_PATH, "winetest.ini"); - ok(ret == 7, "Expected 7, got %d\n", ret); + ok(ret == 7, "Expected 7, got %ld\n", ret); ok(!lstrcmpA(buf, "default"), "Expected "default", got "%s"\n", buf);
GetWindowsDirectoryA(windir, MAX_PATH); @@ -853,7 +854,7 @@ static void test_GetPrivateProfileString(const char *content, const char *descri lstrcpyA(buf, "kumquat"); ret = GetPrivateProfileStringA("section1", "NaMe1", "default", buf, MAX_PATH, tempfile); - ok(ret == 4, "Expected 4, got %d\n", ret); + ok(ret == 4, "Expected 4, got %ld\n", ret); ok(!lstrcmpA(buf, "val1"), "Expected "val1", got "%s"\n", buf);
/* successful case */ @@ -861,7 +862,7 @@ static void test_GetPrivateProfileString(const char *content, const char *descri lstrcpyA(buf, "kumquat"); ret = GetPrivateProfileStringA("section1", "name1", "default", buf, MAX_PATH, filename); - ok(ret == 4, "Expected 4, got %d\n", ret); + ok(ret == 4, "Expected 4, got %ld\n", ret); ok(!lstrcmpA(buf, "val1"), "Expected "val1", got "%s"\n", buf);
/* Existing section with no keys in an existing file */ @@ -869,12 +870,12 @@ static void test_GetPrivateProfileString(const char *content, const char *descri SetLastError(0xdeadbeef); ret=GetPrivateProfileStringA("section2", "DoesntExist", "", buf, MAX_PATH, filename); - ok( ret == 0, "expected return size 0, got %d\n", ret ); + ok( ret == 0, "expected return size 0, got %ld\n", ret ); ok(!lstrcmpA(buf, ""), "Expected "", got "%s"\n", buf); todo_wine ok( GetLastError() == 0xdeadbeef || GetLastError() == ERROR_FILE_NOT_FOUND /* Win 7 */, - "expected 0xdeadbeef or ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); + "expected 0xdeadbeef or ERROR_FILE_NOT_FOUND, got %ld\n", GetLastError());
DeleteFileA(path); @@ -929,7 +930,7 @@ static void test_WritePrivateProfileString(void) ret = WritePrivateProfileStringA(NULL, "key", "string", path); ok(ret == FALSE, "Expected FALSE, got %d\n", ret); ok(GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %ld\n", GetLastError()); ok(GetFileAttributesA(path) == INVALID_FILE_ATTRIBUTES, "Expected path to not exist\n");
@@ -941,7 +942,7 @@ static void test_WritePrivateProfileString(void) ret = WritePrivateProfileStringA(NULL, "key", "string", path); ok(ret == FALSE, "Expected FALSE, got %d\n", ret); ok(GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %ld\n", GetLastError()); ok(check_file_data(path, data), "File doesn't match\n"); DeleteFileA(path);
@@ -1003,7 +1004,7 @@ static void test_WritePrivateProfileString(void) ret = WritePrivateProfileStringA("App", "key", "string", ""); ok(ret == FALSE, "Expected FALSE, got %d\n", ret); ok(GetLastError() == ERROR_ACCESS_DENIED, - "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + "Expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError());
/* Relative paths are relative to X:\%WINDIR% */ GetWindowsDirectoryA(path, MAX_PATH); @@ -1019,7 +1020,7 @@ static void test_WritePrivateProfileString(void) data = "[App]\r\n" "key=string\r\n"; ret = WritePrivateProfileStringA("App", "key", "string", "win1.tmp"); - ok(ret == TRUE, "Expected TRUE, got %d, le=%u\n", ret, GetLastError()); + ok(ret == TRUE, "Expected TRUE, got %d, le=%lu\n", ret, GetLastError()); ok(check_file_data(path, data), "File doesn't match\n"); DeleteFileA(path); } @@ -1115,25 +1116,25 @@ static void test_profile_struct(void) SetLastError(0xdeadbeef); ret = GetPrivateProfileStructA("s", "key", buffer, sizeof(buffer), "./winetest.ini"); ok(!ret, "expected failure\n"); - todo_wine ok(GetLastError() == ERROR_BAD_LENGTH, "got error %u\n", GetLastError()); + todo_wine ok(GetLastError() == ERROR_BAD_LENGTH, "got error %lu\n", GetLastError());
ret = WritePrivateProfileStructA("s", "key", (void *)"abacus", sizeof("abacus"), "./winetest.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(check_file_data("./winetest.ini", expect_data), "file doesn't match\n");
SetLastError(0xdeadbeef); ret = GetPrivateProfileStructA("s", "key", buffer, 6, "./winetest.ini"); ok(!ret, "expected failure\n"); - todo_wine ok(GetLastError() == ERROR_BAD_LENGTH, "got error %u\n", GetLastError()); + todo_wine ok(GetLastError() == ERROR_BAD_LENGTH, "got error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = GetPrivateProfileStructA("s", "key", buffer, 8, "./winetest.ini"); ok(!ret, "expected failure\n"); - todo_wine ok(GetLastError() == ERROR_BAD_LENGTH, "got error %u\n", GetLastError()); + todo_wine ok(GetLastError() == ERROR_BAD_LENGTH, "got error %lu\n", GetLastError());
memset(buffer, 0xcc, sizeof(buffer)); ret = GetPrivateProfileStructA("s", "key", buffer, 7, "./winetest.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(!strcmp(buffer, "abacus"), "data didn't match\n");
memset(buffer, 0xcc, sizeof(buffer)); @@ -1142,39 +1143,39 @@ static void test_profile_struct(void) ok(!strcmp(buffer, "616261637573006F"), "got %s\n", debugstr_a(buffer));
ret = WritePrivateProfileStringA("s", "key", "636163747573006F", "./winetest.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = GetPrivateProfileStructA("s", "key", buffer, 7, "./winetest.ini"); ok(!ret, "expected failure\n"); - todo_wine ok(GetLastError() == ERROR_INVALID_DATA, "got error %u\n", GetLastError()); + todo_wine ok(GetLastError() == ERROR_INVALID_DATA, "got error %lu\n", GetLastError());
ret = WritePrivateProfileStringA("s", "key", "6361637475730083", "./winetest.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
memset(buffer, 0xcc, sizeof(buffer)); ret = GetPrivateProfileStructA("s", "key", buffer, 7, "./winetest.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(!strcmp(buffer, "cactus"), "data didn't match\n");
ret = WritePrivateProfileStringA("s", "key", "636163747573008Q", "./winetest.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = GetPrivateProfileStructA("s", "key", buffer, 7, "./winetest.ini"); ok(!ret, "expected failure\n"); - todo_wine ok(GetLastError() == ERROR_INVALID_DATA, "got error %u\n", GetLastError()); + todo_wine ok(GetLastError() == ERROR_INVALID_DATA, "got error %lu\n", GetLastError());
ret = WritePrivateProfileStringA("s", "key", "16361637475730083", "./winetest.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = GetPrivateProfileStructA("s", "key", buffer, 7, "./winetest.ini"); ok(!ret, "expected failure\n"); - todo_wine ok(GetLastError() == ERROR_BAD_LENGTH, "got error %u\n", GetLastError()); + todo_wine ok(GetLastError() == ERROR_BAD_LENGTH, "got error %lu\n", GetLastError());
ret = DeleteFileA("./winetest.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); }
static void check_registry_value_(int line, HKEY key, const char *value, const char *expect) @@ -1185,9 +1186,9 @@ static void check_registry_value_(int line, HKEY key, const char *value, const c
memset(buffer, 0xcc, sizeof(buffer)); ret = RegQueryValueExA(key, value, 0, &type, (BYTE *)buffer, &size); - ok_(__FILE__, line)(!ret, "got error %u\n", ret); + ok_(__FILE__, line)(!ret, "got error %lu\n", ret); ok_(__FILE__, line)(!strcmp(buffer, expect), "expected %s, got %s\n", debugstr_a(expect), debugstr_a(buffer)); - ok_(__FILE__, line)(type == REG_SZ, "got type %u\n", type); + ok_(__FILE__, line)(type == REG_SZ, "got type %lu\n", type); } #define check_registry_value(a, b, c) check_registry_value_(__LINE__, a, b, c)
@@ -1200,7 +1201,7 @@ static void test_registry_mapping(void)
/* impersonate ourselves to prevent registry virtualization */ ret = ImpersonateSelf(SecurityImpersonation); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows NT\CurrentVersion\IniFileMapping\winetest_map.ini", @@ -1210,27 +1211,27 @@ static void test_registry_mapping(void) skip("Not enough permissions to write to the IniFileMapping key.\n"); return; } - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret);
ret = RegSetValueExA(mapping_key, "section1", 0, REG_SZ, (BYTE *)"USR:winetest_map", sizeof("USR:winetest_map")); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); ret = WritePrivateProfileStringA(NULL, NULL, NULL, "winetest_map.ini"); - todo_wine ok(ret, "got error %u\n", GetLastError()); + todo_wine ok(ret, "got error %lu\n", GetLastError());
check_profile_string("section1", "name1", "winetest_map.ini", "default");
ret = WritePrivateProfileStringA("section1", "name1", "value1", "winetest_map.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
check_profile_string("section1", "name1", "winetest_map.ini", "value1"); check_profile_string("section1", "name1", "C:/fake/path/winetest_map.ini", "value1");
ret = RegOpenKeyExA(HKEY_CURRENT_USER, "winetest_map", 0, KEY_READ | KEY_WRITE, &mapped_key); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); check_registry_value(mapped_key, "name1", "value1");
ret = RegSetValueExA(mapped_key, "name2", 0, REG_SZ, (BYTE *)"value2", sizeof("value2")); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret);
check_profile_string("section1", "name2", "winetest_map.ini", "value2");
@@ -1238,40 +1239,40 @@ static void test_registry_mapping(void) ok(ret == INVALID_FILE_ATTRIBUTES, "winetest_map.ini should not exist.\n");
ret = WritePrivateProfileStringA("section1", "name2", NULL, "winetest_map.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ret = RegQueryValueExA(mapped_key, "name2", 0, NULL, NULL, NULL); - ok(ret == ERROR_FILE_NOT_FOUND, "got error %u\n", ret); + ok(ret == ERROR_FILE_NOT_FOUND, "got error %lu\n", ret);
/* Test non-string types. */
ret = RegSetValueExA(mapped_key, "name3", 0, REG_DWORD, (BYTE *)&ivalue, sizeof(ivalue)); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); check_profile_string("section1", "name3", "winetest_map.ini", "default");
ret = GetPrivateProfileIntA("section1", "name3", 0, "winetest_map.ini"); - ok(ret == 0, "got %#x\n", ret); + ok(ret == 0, "got %#lx\n", ret);
ret = RegSetValueExA(mapped_key, "name3", 0, REG_BINARY, (BYTE *)"value3", sizeof("value3")); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); check_profile_string("section1", "name3", "winetest_map.ini", "default");
ret = RegSetValueExA(mapped_key, "name3", 0, REG_MULTI_SZ, (BYTE *)"one\0two\0", sizeof("one\0two\0")); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); check_profile_string("section1", "name3", "winetest_map.ini", "default");
ret = RegSetValueExA(mapped_key, "name3", 0, REG_EXPAND_SZ, (BYTE *)"x%SystemRoot%", sizeof("x%SystemRoot%")); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); check_profile_string("section1", "name3", "winetest_map.ini", "default");
/* Test WritePrivateProfileSection(). Unlike with .ini files, it doesn't * remove existing entries. */
ret = WritePrivateProfileStringA("section1", "name4", "value4", "winetest_map.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ret = WritePrivateProfileStringA("section1", "name5", "value5", "winetest_map.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ret = WritePrivateProfileSectionA("section1", "name4=four\0name6=six\0", "winetest_map.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); check_profile_string("section1", "name4", "winetest_map.ini", "four"); check_profile_string("section1", "name5", "winetest_map.ini", "value5"); check_profile_string("section1", "name6", "winetest_map.ini", "six"); @@ -1281,74 +1282,74 @@ static void test_registry_mapping(void) RegCloseKey(mapped_key);
ret = RegCreateKeyExA(HKEY_CURRENT_USER, "winetest_map\subkey", 0, NULL, 0, 0, NULL, &mapped_key, NULL); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); RegCloseKey(mapped_key);
ret = WritePrivateProfileStringA("section1", "name1", "value1", "winetest_map.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ret = WritePrivateProfileStringA("section1", NULL, NULL, "winetest_map.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); check_profile_string("section1", "name1", "winetest_map.ini", "default");
ret = WritePrivateProfileStringA("section1", "name1", "value1", "winetest_map.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ret = WritePrivateProfileSectionA("section1", NULL, "winetest_map.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); check_profile_string("section1", "name1", "winetest_map.ini", "default");
ret = RegDeleteKeyA(HKEY_CURRENT_USER, "winetest_map\subkey"); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); ret = RegDeleteKeyA(HKEY_CURRENT_USER, "winetest_map"); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret);
/* Test GetPrivateProfileSectionNames(). */
memset(buffer, 0xcc, sizeof(buffer)); ret = GetPrivateProfileSectionNamesA(buffer, 5, "winetest_map.ini"); - ok(ret == 3, "got %u\n", ret); + ok(ret == 3, "got %lu\n", ret); ok(!memcmp(buffer, "sec\0", 5), "got %s\n", debugstr_an(buffer, ret));
memset(buffer, 0xcc, sizeof(buffer)); ret = GetPrivateProfileSectionNamesA(buffer, sizeof(buffer), "winetest_map.ini"); - ok(ret == 9, "got %u\n", ret); + ok(ret == 9, "got %lu\n", ret); ok(!memcmp(buffer, "section1\0", 10), "got %s\n", debugstr_an(buffer, ret));
ret = WritePrivateProfileStringA("file_section", "name1", "value1", "winetest_map.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
memset(buffer, 0xcc, sizeof(buffer)); ret = GetPrivateProfileSectionNamesA(buffer, 5, "winetest_map.ini"); - ok(ret == 3, "got %u\n", ret); + ok(ret == 3, "got %lu\n", ret); ok(!memcmp(buffer, "sec\0", 5), "got %s\n", debugstr_an(buffer, ret));
memset(buffer, 0xcc, sizeof(buffer)); ret = GetPrivateProfileSectionNamesA(buffer, sizeof(buffer), "winetest_map.ini"); - ok(ret == 22, "got %u\n", ret); + ok(ret == 22, "got %lu\n", ret); ok(!memcmp(buffer, "section1\0file_section\0", 23), "got %s\n", debugstr_an(buffer, ret));
ret = DeleteFileA("C:/windows/winetest_map.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
/* Test the SYS: prefix. */
ret = RegSetValueExA(mapping_key, "section2", 0, REG_SZ, (BYTE *)"SYS:winetest_map", sizeof("SYS:winetest_map")); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); ret = WritePrivateProfileStringA(NULL, NULL, NULL, "winetest_map.ini"); - todo_wine ok(ret, "got error %u\n", GetLastError()); + todo_wine ok(ret, "got error %lu\n", GetLastError());
check_profile_string("section2", "name1", "winetest_map.ini", "default");
ret = WritePrivateProfileStringA("section2", "name1", "value1", "winetest_map.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
check_profile_string("section2", "name1", "winetest_map.ini", "value1");
ret = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\winetest_map", 0, KEY_READ | KEY_WRITE, &mapped_key); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); check_registry_value(mapped_key, "name1", "value1");
ret = RegSetValueExA(mapped_key, "name2", 0, REG_SZ, (BYTE *)"value2", sizeof("value2")); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret);
check_profile_string("section2", "name2", "winetest_map.ini", "value2");
@@ -1356,75 +1357,75 @@ static void test_registry_mapping(void) ok(ret == INVALID_FILE_ATTRIBUTES, "winetest_map.ini should not exist.\n");
ret = RegDeleteKeyA(mapped_key, ""); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); RegCloseKey(mapped_key);
/* Try writing directly to the .ini file on disk instead. */
ret = WritePrivateProfileStringA("section3", "name1", "value1", "winetest_map.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); check_profile_string("section3", "name1", "winetest_map.ini", "value1");
ret = RegSetValueExA(mapping_key, "section3", 0, REG_SZ, (BYTE *)"USR:winetest_map", sizeof("USR:winetest_map")); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); ret = WritePrivateProfileStringA(NULL, NULL, NULL, "winetest_map.ini"); - todo_wine ok(ret, "got error %u\n", GetLastError()); + todo_wine ok(ret, "got error %lu\n", GetLastError());
check_profile_string("section3", "name1", "winetest_map.ini", "default");
ret = RegOpenKeyExA(HKEY_CURRENT_USER, "winetest_section3", 0, KEY_READ | KEY_WRITE, &mapped_key); - ok(ret == ERROR_FILE_NOT_FOUND, "got error %u\n", ret); + ok(ret == ERROR_FILE_NOT_FOUND, "got error %lu\n", ret);
ret = WritePrivateProfileStringA("section3", "name1", "value2", "winetest_map.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
check_profile_string("section3", "name1", "winetest_map.ini", "value2");
ret = RegOpenKeyExA(HKEY_CURRENT_USER, "winetest_map", 0, KEY_READ | KEY_WRITE, &mapped_key); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret);
ret = RegDeleteKeyA(mapped_key, ""); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); RegCloseKey(mapped_key);
ret = RegDeleteValueA(mapping_key, "section3"); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); ret = WritePrivateProfileStringA(NULL, NULL, NULL, "winetest_map.ini"); - todo_wine ok(ret, "got error %u\n", GetLastError()); + todo_wine ok(ret, "got error %lu\n", GetLastError());
check_profile_string("section3", "name1", "winetest_map.ini", "value1");
ret = DeleteFileA("C:/windows/winetest_map.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
/* Test default keys. */
ret = WritePrivateProfileStringA("section4", "name1", "value1", "winetest_map.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
check_profile_string("section4", "name1", "winetest_map.ini", "value1");
ret = DeleteFileA("C:/windows/winetest_map.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = RegSetValueExA(mapping_key, NULL, 0, REG_SZ, (BYTE *)"SYS:winetest_default", sizeof("SYS:winetest_default")); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); ret = WritePrivateProfileStringA(NULL, NULL, NULL, "winetest_map.ini"); - todo_wine ok(ret, "got error %u\n", GetLastError()); + todo_wine ok(ret, "got error %lu\n", GetLastError());
ret = WritePrivateProfileStringA("section4", "name1", "value1", "winetest_map.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\winetest_default\section4", 0, KEY_READ, &mapped_key); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); check_registry_value(mapped_key, "name1", "value1"); RegCloseKey(mapped_key);
ret = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "Software\winetest_default\section5", 0, NULL, 0, KEY_WRITE, NULL, &mapped_key, NULL); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); ret = RegSetValueExA(mapped_key, "name2", 0, REG_SZ, (BYTE *)"value2", sizeof("value2")); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); RegCloseKey(mapped_key);
check_profile_string("section5", "name2", "winetest_map.ini", "value2"); @@ -1435,157 +1436,157 @@ static void test_registry_mapping(void) ret = RegDeleteKeyA(HKEY_LOCAL_MACHINE, "Software\winetest_default\Section4"); ret = RegDeleteKeyA(HKEY_LOCAL_MACHINE, "Software\winetest_default\Section5"); ret = RegDeleteKeyA(HKEY_LOCAL_MACHINE, "Software\winetest_default"); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); ret = RegDeleteValueA(mapping_key, NULL); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret);
/* Test name-specific mapping. */
ret = RegCreateKeyExA(mapping_key, "section6", 0, NULL, 0, KEY_READ | KEY_WRITE, NULL, &mapping_subkey, NULL); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); ret = RegSetValueExA(mapping_subkey, "name1", 0, REG_SZ, (BYTE *)"USR:winetest_name1", sizeof("USR:winetest_name1")); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); ret = RegSetValueExA(mapping_subkey, "name2", 0, REG_SZ, (BYTE *)"SYS:winetest_name2", sizeof("SYS:winetest_name2")); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); ret = WritePrivateProfileStringA(NULL, NULL, NULL, "winetest_map.ini"); - todo_wine ok(ret, "got error %u\n", GetLastError()); + todo_wine ok(ret, "got error %lu\n", GetLastError());
ret = WritePrivateProfileStringA("section6", "name1", "value1", "winetest_map.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); check_profile_string("section6", "name1", "winetest_map.ini", "value1");
ret = RegOpenKeyExA(HKEY_CURRENT_USER, "winetest_name1", 0, KEY_READ | KEY_WRITE, &mapped_key); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); check_registry_value(mapped_key, "name1", "value1");
ret = RegSetValueExA(mapped_key, "name1", 0, REG_SZ, (BYTE *)"one", sizeof("one")); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); check_profile_string("section6", "name1", "winetest_map.ini", "one");
ret = RegDeleteKeyA(mapped_key, ""); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); RegCloseKey(mapped_key);
ret = WritePrivateProfileStringA("section6", "name2", "value2", "winetest_map.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\winetest_name2", 0, KEY_READ | KEY_WRITE, &mapped_key); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); check_registry_value(mapped_key, "name2", "value2");
ret = RegSetValueExA(mapped_key, "name2", 0, REG_SZ, (BYTE *)"two", sizeof("two")); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); check_profile_string("section6", "name2", "winetest_map.ini", "two");
ret = RegDeleteKeyA(mapped_key, ""); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); RegCloseKey(mapped_key);
ret = WritePrivateProfileStringA("section6", "name3", "value3", "winetest_map.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); check_profile_string("section6", "name3", "winetest_map.ini", "value3"); ret = DeleteFileA("C:/windows/winetest_map.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
/* Test name-specific mapping with Get/WritePrivateProfileSection(). */
ret = WritePrivateProfileStringA("section6", "name2", "value2", "winetest_map.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = WritePrivateProfileStringA("section6", "name3", "value3", "winetest_map.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = WritePrivateProfileSectionA("section6", "name1=one\0name3=three\0", "winetest_map.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); check_profile_string("section6", "name1", "winetest_map.ini", "one"); check_profile_string("section6", "name2", "winetest_map.ini", "value2"); check_profile_string("section6", "name3", "winetest_map.ini", "value3");
ret = RegOpenKeyExA(HKEY_CURRENT_USER, "winetest_name1", 0, KEY_READ | KEY_WRITE, &mapped_key); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); ret = RegDeleteValueA(mapped_key, "name1"); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); RegCloseKey(mapped_key);
memset(buffer, 0xcc, sizeof(buffer)); ret = GetPrivateProfileSectionA("section6", buffer, 5, "winetest_map.ini"); - ok(ret == 3, "got %u\n", ret); + ok(ret == 3, "got %lu\n", ret); ok(!memcmp(buffer, "nam\0", 5), "got %s\n", debugstr_an(buffer, ret));
memset(buffer, 0xcc, sizeof(buffer)); ret = GetPrivateProfileSectionA("section6", buffer, sizeof(buffer), "winetest_map.ini"); - ok(ret == 26, "got %u\n", ret); + ok(ret == 26, "got %lu\n", ret); ok(!memcmp(buffer, "name2=value2\0name3=value3\0", 27), "got %s\n", debugstr_an(buffer, ret));
ret = WritePrivateProfileStringA("section6", NULL, NULL, "winetest_map.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); check_profile_string("section6", "name1", "winetest_map.ini", "default"); check_profile_string("section6", "name2", "winetest_map.ini", "default"); check_profile_string("section6", "name3", "winetest_map.ini", "default");
ret = RegDeleteKeyA(HKEY_CURRENT_USER, "winetest_name1"); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); ret = RegDeleteKeyA(HKEY_LOCAL_MACHINE, "Software\winetest_name2"); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); ret = DeleteFileA("C:/windows/winetest_map.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
/* Test name-specific mapping with a default value. */
ret = RegSetValueExA(mapping_subkey, NULL, 0, REG_SZ, (BYTE *)"USR:winetest_default", sizeof("USR:winetest_default")); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); ret = WritePrivateProfileStringA(NULL, NULL, NULL, "winetest_map.ini"); - todo_wine ok(ret, "got error %u\n", GetLastError()); + todo_wine ok(ret, "got error %lu\n", GetLastError());
ret = WritePrivateProfileStringA("section6", "name2", "value2", "winetest_map.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ret = WritePrivateProfileStringA("section6", "name3", "value3", "winetest_map.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = RegOpenKeyExA(HKEY_CURRENT_USER, "winetest_default", 0, KEY_READ | KEY_WRITE, &mapped_key); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); check_registry_value(mapped_key, "name3", "value3");
ret = RegSetValueExA(mapped_key, "name3", 0, REG_SZ, (BYTE *)"three", sizeof("three")); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); check_profile_string("section6", "name3", "winetest_map.ini", "three");
memset(buffer, 0xcc, sizeof(buffer)); ret = GetPrivateProfileSectionA("section6", buffer, sizeof(buffer), "winetest_map.ini"); - ok(ret == 25, "got %u\n", ret); + ok(ret == 25, "got %lu\n", ret); todo_wine ok(!memcmp(buffer, "name2=value2\0name3=three\0", 26), "got %s\n", debugstr_an(buffer, ret));
ret = WritePrivateProfileSectionA("section6", "name2=duo\0name3=treis\0", "winetest_map.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); check_profile_string("section6", "name2", "winetest_map.ini", "duo"); check_profile_string("section6", "name3", "winetest_map.ini", "treis");
ret = WritePrivateProfileStringA("section6", NULL, NULL, "winetest_map.ini"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); check_profile_string("section6", "name2", "winetest_map.ini", "default"); check_profile_string("section6", "name3", "winetest_map.ini", "default");
ret = RegDeleteKeyA(HKEY_LOCAL_MACHINE, "Software\winetest_name2"); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); ret = RegDeleteKeyA(HKEY_CURRENT_USER, "winetest_name1"); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); ret = RegDeleteKeyA(mapped_key, ""); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); RegCloseKey(mapped_key);
ret = RegDeleteKeyA(mapping_subkey, ""); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); RegCloseKey(mapping_subkey);
ret = RegDeleteKeyA(mapping_key, ""); - ok(!ret, "got error %u\n", ret); + ok(!ret, "got error %lu\n", ret); RegCloseKey(mapping_key);
ret = DeleteFileA("C:/windows/winetest_map.ini"); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "got error %lu\n", GetLastError()); ret = RevertToSelf(); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); }
START_TEST(profile)
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/oleaut32/tests/vartype.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/dlls/oleaut32/tests/vartype.c b/dlls/oleaut32/tests/vartype.c index 995fd254208..a61907cc4bb 100644 --- a/dlls/oleaut32/tests/vartype.c +++ b/dlls/oleaut32/tests/vartype.c @@ -1875,11 +1875,6 @@ static void test_VarUI4ChangeTypeEx(void) (ULONG)((LONG64)(x) >> 32), (ULONG)((x) & 0xffffffff), \ (ULONG)(out >> 32), (ULONG)(out & 0xffffffff), hres)
-#define EXPECTI864(x,y) \ - ok(hres == S_OK && (out >> 32) == (CONV_TYPE)(x) && (out & 0xffffffff) == (CONV_TYPE)(y), \ - "expected " #x "(%u,%u), got (%u,%u); hres=0x%08x\n", \ - (ULONG)(x), (ULONG)(y), \ - (ULONG)(out >> 32), (ULONG)(out & 0xffffffff), hres)
static void test_VarI8FromI1(void) { @@ -2011,7 +2006,7 @@ static void test_VarI8FromUI8(void)
CONVERT(VarI8FromUI8, 0); EXPECTI8(0); CONVERT(VarI8FromUI8, 1); EXPECTI8(1); - CONVERT_I8(VarI8FromUI8, 0x7fffffff, 0xffffffff); EXPECTI864(0x7fffffff, 0xffffffff); + CONVERT_I8(VarI8FromUI8, 0x7fffffff, 0xffffffff); EXPECTI8(0x7fffffffffffffffull); CONVERT_I8(VarI8FromUI8, 0x80000000, 0); EXPECT_OVERFLOW; }
@@ -2313,8 +2308,8 @@ static void test_VarUI8FromStr(void) CONVERT_STR(VarUI8FromStr,"0",0); EXPECTI8(0); CONVERT_STR(VarUI8FromStr,"-1",0); EXPECT_OVERFLOW; CONVERT_STR(VarUI8FromStr,"2147483647",0); EXPECTI8(2147483647); - CONVERT_STR(VarUI8FromStr,"18446744073709551614",0); EXPECTI864(0xFFFFFFFF,0xFFFFFFFE); - CONVERT_STR(VarUI8FromStr,"18446744073709551615",0); EXPECTI864(0xFFFFFFFF,0xFFFFFFFF); + CONVERT_STR(VarUI8FromStr,"18446744073709551614",0); EXPECTI8(0xFFFFFFFFFFFFFFFEull); + CONVERT_STR(VarUI8FromStr,"18446744073709551615",0); EXPECTI8(0xFFFFFFFFFFFFFFFFull); CONVERT_STR(VarUI8FromStr,"18446744073709551616",0); EXPECT_OVERFLOW;
CONVERT_STR(VarUI8FromStr,"-1.5",LOCALE_NOUSEROVERRIDE); EXPECT_OVERFLOW;
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/oleaut32/tests/vartype.c | 183 +++++++++++++++++++---------------------- 1 file changed, 85 insertions(+), 98 deletions(-)
diff --git a/dlls/oleaut32/tests/vartype.c b/dlls/oleaut32/tests/vartype.c index a61907cc4bb..220a5f59c9f 100644 --- a/dlls/oleaut32/tests/vartype.c +++ b/dlls/oleaut32/tests/vartype.c @@ -1868,6 +1868,8 @@ static void test_VarUI4ChangeTypeEx(void)
#undef CONV_TYPE #define CONV_TYPE LONG64 +#undef EXPECTRES +#define EXPECTRES(res, x) _EXPECTRES(res, x, "%I64d")
#define EXPECTI8(x) \ ok((hres == S_OK && out == (CONV_TYPE)(x)), \ @@ -1881,10 +1883,7 @@ static void test_VarI8FromI1(void) CONVVARS(signed char); int i;
- for (i = -128; i < 128; i++) - { - CONVERT(VarI8FromI1,i); EXPECTI8(i); - } + CONVERTRANGE(VarI8FromI1, -128, 128); }
static void test_VarI8FromUI1(void) @@ -1892,10 +1891,7 @@ static void test_VarI8FromUI1(void) CONVVARS(BYTE); int i;
- for (i = 0; i < 256; i++) - { - CONVERT(VarI8FromUI1,i); EXPECTI8(i); - } + CONVERTRANGE(VarI8FromUI1, 0, 256); }
static void test_VarI8FromI2(void) @@ -1903,10 +1899,7 @@ static void test_VarI8FromI2(void) CONVVARS(SHORT); int i;
- for (i = -32768; i < 32768; i++) - { - CONVERT(VarI8FromI2,i); EXPECTI8(i); - } + CONVERTRANGE(VarI8FromI2, -32768, 32768); }
static void test_VarI8FromUI2(void) @@ -1914,79 +1907,76 @@ static void test_VarI8FromUI2(void) CONVVARS(USHORT); int i;
- for (i = -0; i < 65535; i++) - { - CONVERT(VarI8FromUI2,i); EXPECTI8(i); - } + CONVERTRANGE(VarI8FromUI2, -0, 65535); }
static void test_VarI8FromUI4(void) { CONVVARS(ULONG);
- CONVERT(VarI8FromUI4, 0); EXPECTI8(0); - CONVERT(VarI8FromUI4, 1); EXPECTI8(1); - CONVERT(VarI8FromUI4, 4294967295ul); EXPECTI8(4294967295ul); + CONVERT(VarI8FromUI4, 0); EXPECT(0); + CONVERT(VarI8FromUI4, 1); EXPECT(1); + CONVERT(VarI8FromUI4, 4294967295ul); EXPECT(4294967295ul); }
static void test_VarI8FromR4(void) { CONVVARS(FLOAT);
- CONVERT(VarI8FromR4, -128.0f); EXPECTI8(-128); - CONVERT(VarI8FromR4, -1.0f); EXPECTI8(-1); - CONVERT(VarI8FromR4, 0.0f); EXPECTI8(0); - CONVERT(VarI8FromR4, 1.0f); EXPECTI8(1); - CONVERT(VarI8FromR4, 127.0f); EXPECTI8(127); + CONVERT(VarI8FromR4, -128.0f); EXPECT(-128); + CONVERT(VarI8FromR4, -1.0f); EXPECT(-1); + CONVERT(VarI8FromR4, 0.0f); EXPECT(0); + CONVERT(VarI8FromR4, 1.0f); EXPECT(1); + CONVERT(VarI8FromR4, 127.0f); EXPECT(127);
- CONVERT(VarI8FromR4, -1.5f); EXPECTI8(-2); - CONVERT(VarI8FromR4, -0.6f); EXPECTI8(-1); - CONVERT(VarI8FromR4, -0.5f); EXPECTI8(0); - CONVERT(VarI8FromR4, -0.4f); EXPECTI8(0); - CONVERT(VarI8FromR4, 0.4f); EXPECTI8(0); - CONVERT(VarI8FromR4, 0.5f); EXPECTI8(0); - CONVERT(VarI8FromR4, 0.6f); EXPECTI8(1); - CONVERT(VarI8FromR4, 1.5f); EXPECTI8(2); + CONVERT(VarI8FromR4, -1.5f); EXPECT(-2); + CONVERT(VarI8FromR4, -0.6f); EXPECT(-1); + CONVERT(VarI8FromR4, -0.5f); EXPECT(0); + CONVERT(VarI8FromR4, -0.4f); EXPECT(0); + CONVERT(VarI8FromR4, 0.4f); EXPECT(0); + CONVERT(VarI8FromR4, 0.5f); EXPECT(0); + CONVERT(VarI8FromR4, 0.6f); EXPECT(1); + CONVERT(VarI8FromR4, 1.5f); EXPECT(2); }
static void test_VarI8FromR8(void) { CONVVARS(DOUBLE);
- CONVERT(VarI8FromR8, -128.0); EXPECTI8(-128); - CONVERT(VarI8FromR8, -1.0); EXPECTI8(-1); - CONVERT(VarI8FromR8, 0.0); EXPECTI8(0); - CONVERT(VarI8FromR8, 1.0); EXPECTI8(1); - CONVERT(VarI8FromR8, 127.0); EXPECTI8(127); + CONVERT(VarI8FromR8, -128.0); EXPECT(-128); + CONVERT(VarI8FromR8, -1.0); EXPECT(-1); + CONVERT(VarI8FromR8, 0.0); EXPECT(0); + CONVERT(VarI8FromR8, 1.0); EXPECT(1); + CONVERT(VarI8FromR8, 127.0); EXPECT(127);
- CONVERT(VarI8FromR8, -1.5); EXPECTI8(-2); - CONVERT(VarI8FromR8, -0.6); EXPECTI8(-1); - CONVERT(VarI8FromR8, -0.5); EXPECTI8(0); - CONVERT(VarI8FromR8, -0.4); EXPECTI8(0); - CONVERT(VarI8FromR8, 0.4); EXPECTI8(0); - CONVERT(VarI8FromR8, 0.5); EXPECTI8(0); - CONVERT(VarI8FromR8, 0.6); EXPECTI8(1); - CONVERT(VarI8FromR8, 1.5); EXPECTI8(2); + CONVERT(VarI8FromR8, -1.5); EXPECT(-2); + CONVERT(VarI8FromR8, -0.6); EXPECT(-1); + CONVERT(VarI8FromR8, -0.5); EXPECT(0); + CONVERT(VarI8FromR8, -0.4); EXPECT(0); + CONVERT(VarI8FromR8, 0.4); EXPECT(0); + CONVERT(VarI8FromR8, 0.5); EXPECT(0); + CONVERT(VarI8FromR8, 0.6); EXPECT(1); + CONVERT(VarI8FromR8, 1.5); EXPECT(2); }
static void test_VarI8FromDate(void) { CONVVARS(DATE);
- CONVERT(VarI8FromDate, -128.0); EXPECTI8(-128); - CONVERT(VarI8FromDate, -1.0); EXPECTI8(-1); - CONVERT(VarI8FromDate, 0.0); EXPECTI8(0); - CONVERT(VarI8FromDate, 1.0); EXPECTI8(1); - CONVERT(VarI8FromDate, 127.0); EXPECTI8(127); + CONVERT(VarI8FromDate, -128.0); EXPECT(-128); + CONVERT(VarI8FromDate, -1.0); EXPECT(-1); + CONVERT(VarI8FromDate, 0.0); EXPECT(0); + CONVERT(VarI8FromDate, 1.0); EXPECT(1); + CONVERT(VarI8FromDate, 127.0); EXPECT(127);
- CONVERT(VarI8FromDate, -1.5); EXPECTI8(-2); - CONVERT(VarI8FromDate, -0.6); EXPECTI8(-1); - CONVERT(VarI8FromDate, -0.5); EXPECTI8(0); - CONVERT(VarI8FromDate, -0.4); EXPECTI8(0); - CONVERT(VarI8FromDate, 0.4); EXPECTI8(0); - CONVERT(VarI8FromDate, 0.5); EXPECTI8(0); - CONVERT(VarI8FromDate, 0.6); EXPECTI8(1); - CONVERT(VarI8FromDate, 1.5); EXPECTI8(2); + CONVERT(VarI8FromDate, -1.5); EXPECT(-2); + CONVERT(VarI8FromDate, -0.6); EXPECT(-1); + CONVERT(VarI8FromDate, -0.5); EXPECT(0); + CONVERT(VarI8FromDate, -0.4); EXPECT(0); + CONVERT(VarI8FromDate, 0.4); EXPECT(0); + CONVERT(VarI8FromDate, 0.5); EXPECT(0); + CONVERT(VarI8FromDate, 0.6); EXPECT(1); + CONVERT(VarI8FromDate, 1.5); EXPECT(2); }
static void test_VarI8FromBool(void) @@ -1994,40 +1984,37 @@ static void test_VarI8FromBool(void) CONVVARS(VARIANT_BOOL); int i;
- for (i = -32768; i < 32768; i++) - { - CONVERT(VarI8FromBool,i); EXPECTI8(i); - } + CONVERTRANGE(VarI8FromBool, -32768, 32768); }
static void test_VarI8FromUI8(void) { CONVVARS(ULONG64);
- CONVERT(VarI8FromUI8, 0); EXPECTI8(0); - CONVERT(VarI8FromUI8, 1); EXPECTI8(1); - CONVERT_I8(VarI8FromUI8, 0x7fffffff, 0xffffffff); EXPECTI8(0x7fffffffffffffffull); - CONVERT_I8(VarI8FromUI8, 0x80000000, 0); EXPECT_OVERFLOW; + CONVERT(VarI8FromUI8, 0); EXPECT(0); + CONVERT(VarI8FromUI8, 1); EXPECT(1); + CONVERT(VarI8FromUI8, 0x7fffffffffffffffll); EXPECT(0x7fffffffffffffffull); + CONVERT(VarI8FromUI8, 0x8000000000000000ll); EXPECT_OVERFLOW; }
static void test_VarI8FromCy(void) { CONVVARS(CY);
- CONVERT_CY(VarI8FromCy,-128); EXPECTI8(-129); - CONVERT_CY(VarI8FromCy,-1); EXPECTI8(-2); - CONVERT_CY(VarI8FromCy,0); EXPECTI8(0); - CONVERT_CY(VarI8FromCy,1); EXPECTI8(1); - CONVERT_CY(VarI8FromCy,127); EXPECTI8(127); + CONVERT_CY(VarI8FromCy,-128); EXPECT(-129); + CONVERT_CY(VarI8FromCy,-1); EXPECT(-2); + CONVERT_CY(VarI8FromCy,0); EXPECT(0); + CONVERT_CY(VarI8FromCy,1); EXPECT(1); + CONVERT_CY(VarI8FromCy,127); EXPECT(127);
- CONVERT_CY(VarI8FromCy,-1.5); EXPECTI8(-2); - CONVERT_CY(VarI8FromCy,-0.6); EXPECTI8(-1); - CONVERT_CY(VarI8FromCy,-0.5); EXPECTI8(-1); - CONVERT_CY(VarI8FromCy,-0.4); EXPECTI8(-1); - CONVERT_CY(VarI8FromCy,0.4); EXPECTI8(0); - CONVERT_CY(VarI8FromCy,0.5); EXPECTI8(0); - CONVERT_CY(VarI8FromCy,0.6); EXPECTI8(1); - CONVERT_CY(VarI8FromCy,1.5); EXPECTI8(2); + CONVERT_CY(VarI8FromCy,-1.5); EXPECT(-2); + CONVERT_CY(VarI8FromCy,-0.6); EXPECT(-1); + CONVERT_CY(VarI8FromCy,-0.5); EXPECT(-1); + CONVERT_CY(VarI8FromCy,-0.4); EXPECT(-1); + CONVERT_CY(VarI8FromCy,0.4); EXPECT(0); + CONVERT_CY(VarI8FromCy,0.5); EXPECT(0); + CONVERT_CY(VarI8FromCy,0.6); EXPECT(1); + CONVERT_CY(VarI8FromCy,1.5); EXPECT(2); }
static void test_VarI8FromDec(void) @@ -2036,14 +2023,14 @@ static void test_VarI8FromDec(void)
CONVERT_BADDEC(VarI8FromDec);
- CONVERT_DEC(VarI8FromDec,0,0x80,0,128); EXPECTI8(-128); - CONVERT_DEC(VarI8FromDec,0,0x80,0,1); EXPECTI8(-1); - CONVERT_DEC(VarI8FromDec,0,0,0,0); EXPECTI8(0); - CONVERT_DEC(VarI8FromDec,0,0,0,1); EXPECTI8(1); - CONVERT_DEC(VarI8FromDec,0,0,0,127); EXPECTI8(127); + CONVERT_DEC(VarI8FromDec,0,0x80,0,128); EXPECT(-128); + CONVERT_DEC(VarI8FromDec,0,0x80,0,1); EXPECT(-1); + CONVERT_DEC(VarI8FromDec,0,0,0,0); EXPECT(0); + CONVERT_DEC(VarI8FromDec,0,0,0,1); EXPECT(1); + CONVERT_DEC(VarI8FromDec,0,0,0,127); EXPECT(127);
- CONVERT_DEC(VarI8FromDec,2,0x80,0,12700); EXPECTI8(-127); - CONVERT_DEC(VarI8FromDec,2,0,0,12700); EXPECTI8(127); + CONVERT_DEC(VarI8FromDec,2,0x80,0,12700); EXPECT(-127); + CONVERT_DEC(VarI8FromDec,2,0,0,12700); EXPECT(127); }
static void test_VarI8FromStr(void) @@ -2054,18 +2041,18 @@ static void test_VarI8FromStr(void) in = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT);
CONVERT_STR(VarI8FromStr,NULL,0); EXPECT_MISMATCH; - CONVERT_STR(VarI8FromStr,"0",0); EXPECTI8(0); - CONVERT_STR(VarI8FromStr,"-1",0); EXPECTI8(-1); - CONVERT_STR(VarI8FromStr,"2147483647",0); EXPECTI8(2147483647); - - CONVERT_STR(VarI8FromStr,"-1.5",LOCALE_NOUSEROVERRIDE); EXPECTI8(-2); - CONVERT_STR(VarI8FromStr,"-0.6",LOCALE_NOUSEROVERRIDE); EXPECTI8(-1); - CONVERT_STR(VarI8FromStr,"-0.5",LOCALE_NOUSEROVERRIDE); EXPECTI8(0); - CONVERT_STR(VarI8FromStr,"-0.4",LOCALE_NOUSEROVERRIDE); EXPECTI8(0); - CONVERT_STR(VarI8FromStr,"0.4",LOCALE_NOUSEROVERRIDE); EXPECTI8(0); - CONVERT_STR(VarI8FromStr,"0.5",LOCALE_NOUSEROVERRIDE); EXPECTI8(0); - CONVERT_STR(VarI8FromStr,"0.6",LOCALE_NOUSEROVERRIDE); EXPECTI8(1); - CONVERT_STR(VarI8FromStr,"1.5",LOCALE_NOUSEROVERRIDE); EXPECTI8(2); + CONVERT_STR(VarI8FromStr,"0",0); EXPECT(0); + CONVERT_STR(VarI8FromStr,"-1",0); EXPECT(-1); + CONVERT_STR(VarI8FromStr,"2147483647",0); EXPECT(2147483647); + + CONVERT_STR(VarI8FromStr,"-1.5",LOCALE_NOUSEROVERRIDE); EXPECT(-2); + CONVERT_STR(VarI8FromStr,"-0.6",LOCALE_NOUSEROVERRIDE); EXPECT(-1); + CONVERT_STR(VarI8FromStr,"-0.5",LOCALE_NOUSEROVERRIDE); EXPECT(0); + CONVERT_STR(VarI8FromStr,"-0.4",LOCALE_NOUSEROVERRIDE); EXPECT(0); + CONVERT_STR(VarI8FromStr,"0.4",LOCALE_NOUSEROVERRIDE); EXPECT(0); + CONVERT_STR(VarI8FromStr,"0.5",LOCALE_NOUSEROVERRIDE); EXPECT(0); + CONVERT_STR(VarI8FromStr,"0.6",LOCALE_NOUSEROVERRIDE); EXPECT(1); + CONVERT_STR(VarI8FromStr,"1.5",LOCALE_NOUSEROVERRIDE); EXPECT(2); }
static void test_VarI8Copy(void)
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/oleaut32/tests/vartype.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-)
diff --git a/dlls/oleaut32/tests/vartype.c b/dlls/oleaut32/tests/vartype.c index 220a5f59c9f..1f8cafc82b8 100644 --- a/dlls/oleaut32/tests/vartype.c +++ b/dlls/oleaut32/tests/vartype.c @@ -2057,33 +2057,13 @@ static void test_VarI8FromStr(void)
static void test_VarI8Copy(void) { - HRESULT hres; - VARIANTARG vSrc, vDst; - LONGLONG in = 1; - if (!has_i8) { win_skip("I8 and UI8 data types are not available\n"); return; }
- VariantInit(&vSrc); - VariantInit(&vDst); - V_VT(&vSrc) = VT_I8; - V_I8(&vSrc) = in; - hres = VariantCopy(&vDst, &vSrc); - ok(hres == S_OK && V_VT(&vDst) == VT_I8 && V_I8(&vDst) == in, - "copy hres 0x%X, type %d, value (%x%08x) %x%08x\n", - hres, V_VT(&vDst), (UINT)(in >> 32), (UINT)in, (UINT)(V_I8(&vDst) >> 32), (UINT)V_I8(&vDst) ); - V_VT(&vSrc) = VT_I8|VT_BYREF; - V_I8REF(&vSrc) = ∈ - hres = VariantCopy(&vDst, &vSrc); - ok(hres == S_OK && V_VT(&vDst) == (VT_I8|VT_BYREF) && V_I8REF(&vDst) == &in, - "ref hres 0x%X, type %d, ref (%p) %p\n", hres, V_VT(&vDst), &in, V_I8REF(&vDst)); - hres = VariantCopyInd(&vDst, &vSrc); - ok(hres == S_OK && V_VT(&vDst) == VT_I8 && V_I8(&vDst) == in, - "copy hres 0x%X, type %d, value (%x%08x) %x%08x\n", - hres, V_VT(&vDst), (UINT)(in >> 32), (UINT)in, (UINT)(V_I8(&vDst) >> 32), (UINT)V_I8(&vDst) ); + COPYTEST(1ll, VT_I8, V_I8(&vSrc), V_I8(&vDst), V_I8REF(&vSrc), V_I8REF(&vDst), "%I64d"); }
static void test_VarI8ChangeTypeEx(void)
- getting rid of EXPECTI8 macro Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/oleaut32/tests/vartype.c | 152 +++++++++++++++++------------------------ 1 file changed, 63 insertions(+), 89 deletions(-)
diff --git a/dlls/oleaut32/tests/vartype.c b/dlls/oleaut32/tests/vartype.c index 1f8cafc82b8..601520eb2f6 100644 --- a/dlls/oleaut32/tests/vartype.c +++ b/dlls/oleaut32/tests/vartype.c @@ -1871,13 +1871,6 @@ static void test_VarUI4ChangeTypeEx(void) #undef EXPECTRES #define EXPECTRES(res, x) _EXPECTRES(res, x, "%I64d")
-#define EXPECTI8(x) \ - ok((hres == S_OK && out == (CONV_TYPE)(x)), \ - "expected " #x "(%u,%u), got (%u,%u); hres=0x%08x\n", \ - (ULONG)((LONG64)(x) >> 32), (ULONG)((x) & 0xffffffff), \ - (ULONG)(out >> 32), (ULONG)(out & 0xffffffff), hres) - - static void test_VarI8FromI1(void) { CONVVARS(signed char); @@ -2087,20 +2080,16 @@ static void test_VarI8ChangeTypeEx(void) /* Adapt the test macros to UI8 */ #undef CONV_TYPE #define CONV_TYPE ULONG64 +#undef EXPECTRES +#define EXPECTRES(res, x) _EXPECTRES(res, x, "%I64u")
static void test_VarUI8FromI1(void) { CONVVARS(signed char); int i;
- for (i = -128; i < 128; i++) - { - CONVERT(VarUI8FromI1,i); - if (i < 0) - EXPECT_OVERFLOW; - else - EXPECTI8(i); - } + OVERFLOWRANGE(VarUI8FromI1, -128, 0); + CONVERTRANGE(VarUI8FromI1, 0, 128); }
static void test_VarUI8FromUI1(void) @@ -2108,10 +2097,7 @@ static void test_VarUI8FromUI1(void) CONVVARS(BYTE); int i;
- for (i = 0; i < 256; i++) - { - CONVERT(VarUI8FromUI1,i); EXPECTI8(i); - } + CONVERTRANGE(VarUI8FromUI1, 0, 256); }
static void test_VarUI8FromI2(void) @@ -2119,14 +2105,8 @@ static void test_VarUI8FromI2(void) CONVVARS(SHORT); int i;
- for (i = -32768; i < 32768; i++) - { - CONVERT(VarUI8FromI2,i); - if (i < 0) - EXPECT_OVERFLOW; - else - EXPECTI8(i); - } + OVERFLOWRANGE(VarUI8FromI2, -32768, 0); + CONVERTRANGE(VarUI8FromI2, 0, 32768); }
static void test_VarUI8FromUI2(void) @@ -2134,18 +2114,15 @@ static void test_VarUI8FromUI2(void) CONVVARS(USHORT); int i;
- for (i = 0; i < 65535; i++) - { - CONVERT(VarUI8FromUI2,i); EXPECTI8(i); - } + CONVERTRANGE(VarUI8FromUI2, 0, 65535); }
static void test_VarUI8FromUI4(void) { CONVVARS(ULONG);
- CONVERT(VarUI8FromUI4, 0); EXPECTI8(0); - CONVERT(VarUI8FromUI4, 0xffffffff); EXPECTI8(0xffffffff); + CONVERT(VarUI8FromUI4, 0); EXPECT(0); + CONVERT(VarUI8FromUI4, 0xffffffff); EXPECT(0xffffffff); }
static void test_VarUI8FromR4(void) @@ -2153,18 +2130,18 @@ static void test_VarUI8FromR4(void) CONVVARS(FLOAT);
CONVERT(VarUI8FromR4, -1.0f); EXPECT_OVERFLOW; - CONVERT(VarUI8FromR4, 0.0f); EXPECTI8(0); - CONVERT(VarUI8FromR4, 1.0f); EXPECTI8(1); - CONVERT(VarUI8FromR4, 255.0f); EXPECTI8(255); + CONVERT(VarUI8FromR4, 0.0f); EXPECT(0); + CONVERT(VarUI8FromR4, 1.0f); EXPECT(1); + CONVERT(VarUI8FromR4, 255.0f); EXPECT(255);
CONVERT(VarUI8FromR4, -1.5f); EXPECT_OVERFLOW; CONVERT(VarUI8FromR4, -0.6f); EXPECT_OVERFLOW; - CONVERT(VarUI8FromR4, -0.5f); EXPECTI8(0); - CONVERT(VarUI8FromR4, -0.4f); EXPECTI8(0); - CONVERT(VarUI8FromR4, 0.4f); EXPECTI8(0); - CONVERT(VarUI8FromR4, 0.5f); EXPECTI8(0); - CONVERT(VarUI8FromR4, 0.6f); EXPECTI8(1); - CONVERT(VarUI8FromR4, 1.5f); EXPECTI8(2); + CONVERT(VarUI8FromR4, -0.5f); EXPECT(0); + CONVERT(VarUI8FromR4, -0.4f); EXPECT(0); + CONVERT(VarUI8FromR4, 0.4f); EXPECT(0); + CONVERT(VarUI8FromR4, 0.5f); EXPECT(0); + CONVERT(VarUI8FromR4, 0.6f); EXPECT(1); + CONVERT(VarUI8FromR4, 1.5f); EXPECT(2); }
static void test_VarUI8FromR8(void) @@ -2172,18 +2149,18 @@ static void test_VarUI8FromR8(void) CONVVARS(DOUBLE);
CONVERT(VarUI8FromR8, -1.0); EXPECT_OVERFLOW; - CONVERT(VarUI8FromR8, 0.0); EXPECTI8(0); - CONVERT(VarUI8FromR8, 1.0); EXPECTI8(1); - CONVERT(VarUI8FromR8, 255.0); EXPECTI8(255); + CONVERT(VarUI8FromR8, 0.0); EXPECT(0); + CONVERT(VarUI8FromR8, 1.0); EXPECT(1); + CONVERT(VarUI8FromR8, 255.0); EXPECT(255);
CONVERT(VarUI8FromR8, -1.5); EXPECT_OVERFLOW; CONVERT(VarUI8FromR8, -0.6); EXPECT_OVERFLOW; - CONVERT(VarUI8FromR8, -0.5); EXPECTI8(0); - CONVERT(VarUI8FromR8, -0.4); EXPECTI8(0); - CONVERT(VarUI8FromR8, 0.4); EXPECTI8(0); - CONVERT(VarUI8FromR8, 0.5); EXPECTI8(0); - CONVERT(VarUI8FromR8, 0.6); EXPECTI8(1); - CONVERT(VarUI8FromR8, 1.5); EXPECTI8(2); + CONVERT(VarUI8FromR8, -0.5); EXPECT(0); + CONVERT(VarUI8FromR8, -0.4); EXPECT(0); + CONVERT(VarUI8FromR8, 0.4); EXPECT(0); + CONVERT(VarUI8FromR8, 0.5); EXPECT(0); + CONVERT(VarUI8FromR8, 0.6); EXPECT(1); + CONVERT(VarUI8FromR8, 1.5); EXPECT(2); }
static void test_VarUI8FromDate(void) @@ -2191,18 +2168,18 @@ static void test_VarUI8FromDate(void) CONVVARS(DATE);
CONVERT(VarUI8FromDate, -1.0); EXPECT_OVERFLOW; - CONVERT(VarUI8FromDate, 0.0); EXPECTI8(0); - CONVERT(VarUI8FromDate, 1.0); EXPECTI8(1); - CONVERT(VarUI8FromDate, 255.0); EXPECTI8(255); + CONVERT(VarUI8FromDate, 0.0); EXPECT(0); + CONVERT(VarUI8FromDate, 1.0); EXPECT(1); + CONVERT(VarUI8FromDate, 255.0); EXPECT(255);
CONVERT(VarUI8FromDate, -1.5); EXPECT_OVERFLOW; CONVERT(VarUI8FromDate, -0.6); EXPECT_OVERFLOW; - CONVERT(VarUI8FromDate, -0.5); EXPECTI8(0); - CONVERT(VarUI8FromDate, -0.4); EXPECTI8(0); - CONVERT(VarUI8FromDate, 0.4); EXPECTI8(0); - CONVERT(VarUI8FromDate, 0.5); EXPECTI8(0); - CONVERT(VarUI8FromDate, 0.6); EXPECTI8(1); - CONVERT(VarUI8FromDate, 1.5); EXPECTI8(2); + CONVERT(VarUI8FromDate, -0.5); EXPECT(0); + CONVERT(VarUI8FromDate, -0.4); EXPECT(0); + CONVERT(VarUI8FromDate, 0.4); EXPECT(0); + CONVERT(VarUI8FromDate, 0.5); EXPECT(0); + CONVERT(VarUI8FromDate, 0.6); EXPECT(1); + CONVERT(VarUI8FromDate, 1.5); EXPECT(2); }
static void test_VarUI8FromBool(void) @@ -2210,10 +2187,7 @@ static void test_VarUI8FromBool(void) CONVVARS(VARIANT_BOOL); int i;
- for (i = -32768; i < 32768; i++) - { - CONVERT(VarUI8FromBool, i); EXPECTI8(i); - } + CONVERTRANGE(VarUI8FromBool, -32768, 32768); }
static void test_VarUI8FromI8(void) @@ -2221,8 +2195,8 @@ static void test_VarUI8FromI8(void) CONVVARS(LONG64);
CONVERT(VarUI8FromI8, -1); EXPECT_OVERFLOW; - CONVERT(VarUI8FromI8, 0); EXPECTI8(0); - CONVERT(VarUI8FromI8, 1); EXPECTI8(1); + CONVERT(VarUI8FromI8, 0); EXPECT(0); + CONVERT(VarUI8FromI8, 1); EXPECT(1); }
static void test_VarUI8FromCy(void) @@ -2230,18 +2204,18 @@ static void test_VarUI8FromCy(void) CONVVARS(CY);
CONVERT_CY(VarUI8FromCy,-1); EXPECT_OVERFLOW; - CONVERT_CY(VarUI8FromCy,0); EXPECTI8(0); - CONVERT_CY(VarUI8FromCy,1); EXPECTI8(1); - CONVERT_CY(VarUI8FromCy,255); EXPECTI8(255); + CONVERT_CY(VarUI8FromCy,0); EXPECT(0); + CONVERT_CY(VarUI8FromCy,1); EXPECT(1); + CONVERT_CY(VarUI8FromCy,255); EXPECT(255);
CONVERT_CY(VarUI8FromCy,-1.5); EXPECT_OVERFLOW; CONVERT_CY(VarUI8FromCy,-0.6); EXPECT_OVERFLOW; - CONVERT_CY(VarUI8FromCy,-0.5); EXPECTI8(0); - CONVERT_CY(VarUI8FromCy,-0.4); EXPECTI8(0); - CONVERT_CY(VarUI8FromCy,0.4); EXPECTI8(0); - CONVERT_CY(VarUI8FromCy,0.5); EXPECTI8(0); - CONVERT_CY(VarUI8FromCy,0.6); EXPECTI8(1); - CONVERT_CY(VarUI8FromCy,1.5); EXPECTI8(2); + CONVERT_CY(VarUI8FromCy,-0.5); EXPECT(0); + CONVERT_CY(VarUI8FromCy,-0.4); EXPECT(0); + CONVERT_CY(VarUI8FromCy,0.4); EXPECT(0); + CONVERT_CY(VarUI8FromCy,0.5); EXPECT(0); + CONVERT_CY(VarUI8FromCy,0.6); EXPECT(1); + CONVERT_CY(VarUI8FromCy,1.5); EXPECT(2); }
static void test_VarUI8FromDec(void) @@ -2256,12 +2230,12 @@ static void test_VarUI8FromDec(void) CONVERT_DEC(VarUI8FromDec,0,0x80,0,1); }
- CONVERT_DEC(VarUI8FromDec,0,0,0,0); EXPECTI8(0); - CONVERT_DEC(VarUI8FromDec,0,0,0,1); EXPECTI8(1); - CONVERT_DEC(VarUI8FromDec,0,0,0,255); EXPECTI8(255); + CONVERT_DEC(VarUI8FromDec,0,0,0,0); EXPECT(0); + CONVERT_DEC(VarUI8FromDec,0,0,0,1); EXPECT(1); + CONVERT_DEC(VarUI8FromDec,0,0,0,255); EXPECT(255);
CONVERT_DEC(VarUI8FromDec,2,0x80,0,100); EXPECT_OVERFLOW; - CONVERT_DEC(VarUI8FromDec,2,0,0,25500); EXPECTI8(255); + CONVERT_DEC(VarUI8FromDec,2,0,0,25500); EXPECT(255); }
static void test_VarUI8FromStr(void) @@ -2272,21 +2246,21 @@ static void test_VarUI8FromStr(void) in = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT);
CONVERT_STR(VarUI8FromStr,NULL,0); EXPECT_MISMATCH; - CONVERT_STR(VarUI8FromStr,"0",0); EXPECTI8(0); + CONVERT_STR(VarUI8FromStr,"0",0); EXPECT(0); CONVERT_STR(VarUI8FromStr,"-1",0); EXPECT_OVERFLOW; - CONVERT_STR(VarUI8FromStr,"2147483647",0); EXPECTI8(2147483647); - CONVERT_STR(VarUI8FromStr,"18446744073709551614",0); EXPECTI8(0xFFFFFFFFFFFFFFFEull); - CONVERT_STR(VarUI8FromStr,"18446744073709551615",0); EXPECTI8(0xFFFFFFFFFFFFFFFFull); + CONVERT_STR(VarUI8FromStr,"2147483647",0); EXPECT(2147483647); + CONVERT_STR(VarUI8FromStr,"18446744073709551614",0); EXPECT(0xFFFFFFFFFFFFFFFEull); + CONVERT_STR(VarUI8FromStr,"18446744073709551615",0); EXPECT(0xFFFFFFFFFFFFFFFFull); CONVERT_STR(VarUI8FromStr,"18446744073709551616",0); EXPECT_OVERFLOW;
CONVERT_STR(VarUI8FromStr,"-1.5",LOCALE_NOUSEROVERRIDE); EXPECT_OVERFLOW; CONVERT_STR(VarUI8FromStr,"-0.6",LOCALE_NOUSEROVERRIDE); EXPECT_OVERFLOW; - CONVERT_STR(VarUI8FromStr,"-0.5",LOCALE_NOUSEROVERRIDE); EXPECTI8(0); - CONVERT_STR(VarUI8FromStr,"-0.4",LOCALE_NOUSEROVERRIDE); EXPECTI8(0); - CONVERT_STR(VarUI8FromStr,"0.4",LOCALE_NOUSEROVERRIDE); EXPECTI8(0); - CONVERT_STR(VarUI8FromStr,"0.5",LOCALE_NOUSEROVERRIDE); EXPECTI8(0); - CONVERT_STR(VarUI8FromStr,"0.6",LOCALE_NOUSEROVERRIDE); EXPECTI8(1); - CONVERT_STR(VarUI8FromStr,"1.5",LOCALE_NOUSEROVERRIDE); EXPECTI8(2); + CONVERT_STR(VarUI8FromStr,"-0.5",LOCALE_NOUSEROVERRIDE); EXPECT(0); + CONVERT_STR(VarUI8FromStr,"-0.4",LOCALE_NOUSEROVERRIDE); EXPECT(0); + CONVERT_STR(VarUI8FromStr,"0.4",LOCALE_NOUSEROVERRIDE); EXPECT(0); + CONVERT_STR(VarUI8FromStr,"0.5",LOCALE_NOUSEROVERRIDE); EXPECT(0); + CONVERT_STR(VarUI8FromStr,"0.6",LOCALE_NOUSEROVERRIDE); EXPECT(1); + CONVERT_STR(VarUI8FromStr,"1.5",LOCALE_NOUSEROVERRIDE); EXPECT(2); }
static void test_VarUI8Copy(void)
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/oleaut32/tests/vartype.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-)
diff --git a/dlls/oleaut32/tests/vartype.c b/dlls/oleaut32/tests/vartype.c index 601520eb2f6..46897085d05 100644 --- a/dlls/oleaut32/tests/vartype.c +++ b/dlls/oleaut32/tests/vartype.c @@ -2265,33 +2265,13 @@ static void test_VarUI8FromStr(void)
static void test_VarUI8Copy(void) { - HRESULT hres; - VARIANTARG vSrc, vDst; - ULONGLONG in = 1; - if (!has_i8) { win_skip("I8 and UI8 data types are not available\n"); return; }
- VariantInit(&vSrc); - VariantInit(&vDst); - V_VT(&vSrc) = VT_UI8; - V_UI8(&vSrc) = in; - hres = VariantCopy(&vDst, &vSrc); - ok(hres == S_OK && V_VT(&vDst) == VT_UI8 && V_UI8(&vDst) == in, - "copy hres 0x%X, type %d, value (%x%08x) %x%08x\n", - hres, V_VT(&vDst), (UINT)(in >> 32), (UINT)in, (UINT)(V_UI8(&vDst) >> 32), (UINT)V_UI8(&vDst) ); - V_VT(&vSrc) = VT_UI8|VT_BYREF; - V_UI8REF(&vSrc) = ∈ - hres = VariantCopy(&vDst, &vSrc); - ok(hres == S_OK && V_VT(&vDst) == (VT_UI8|VT_BYREF) && V_UI8REF(&vDst) == &in, - "ref hres 0x%X, type %d, ref (%p) %p\n", hres, V_VT(&vDst), &in, V_UI8REF(&vDst)); - hres = VariantCopyInd(&vDst, &vSrc); - ok(hres == S_OK && V_VT(&vDst) == VT_UI8 && V_UI8(&vDst) == in, - "copy hres 0x%X, type %d, value (%x%08x) %x%08x\n", - hres, V_VT(&vDst), (UINT)(in >> 32), (UINT)in, (UINT)(V_UI8(&vDst) >> 32), (UINT)V_UI8(&vDst) ); + COPYTEST(1ull, VT_UI8, V_UI8(&vSrc), V_UI8(&vDst), V_UI8REF(&vSrc), V_UI8REF(&vDst), "%I64u"); }
static void test_VarUI8ChangeTypeEx(void)
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/oleaut32/tests/vartype.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/dlls/oleaut32/tests/vartype.c b/dlls/oleaut32/tests/vartype.c index 46897085d05..c368c5129bb 100644 --- a/dlls/oleaut32/tests/vartype.c +++ b/dlls/oleaut32/tests/vartype.c @@ -648,6 +648,8 @@ static void test_VarI1ChangeTypeEx(void)
#undef CONV_TYPE #define CONV_TYPE BYTE +#undef EXPECTRES +#define EXPECTRES(res, x) _EXPECTRES(res, x, "%u")
static void test_VarUI1FromI1(void) { @@ -942,6 +944,8 @@ static void test_VarUI1ChangeTypeEx(void)
#undef CONV_TYPE #define CONV_TYPE SHORT +#undef EXPECTRES +#define EXPECTRES(res, x) _EXPECTRES(res, x, "%d")
static void test_VarI2FromI1(void) { @@ -1178,6 +1182,8 @@ static void test_VarI2ChangeTypeEx(void)
#undef CONV_TYPE #define CONV_TYPE USHORT +#undef EXPECTRES +#define EXPECTRES(res, x) _EXPECTRES(res, x, "%u")
static void test_VarUI2FromI1(void) { @@ -1411,6 +1417,8 @@ static void test_VarUI2ChangeTypeEx(void)
#undef CONV_TYPE #define CONV_TYPE LONG +#undef EXPECTRES +#define EXPECTRES(res, x) _EXPECTRES(res, x, "%d")
static void test_VarI4FromI1(void) {
- (U)I4 is a (U)LONG - so migrate all helper functions and .idl to use LONG instead of ints - renamed accordingly the variables (i => l, ui => ul) - renamed accordingly method names s/Widget_int_ptr/Widget_long_ptr/
Note: we cannot use long yet as LONG isn't yet defined as a long.
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/oleaut32/tests/tmarshal.c | 85 +++++++++++++++++++------------------- dlls/oleaut32/tests/tmarshal.idl | 12 +++-- 2 files changed, 49 insertions(+), 48 deletions(-)
diff --git a/dlls/oleaut32/tests/tmarshal.c b/dlls/oleaut32/tests/tmarshal.c index 80ed7bed525..3c9d9a98a84 100644 --- a/dlls/oleaut32/tests/tmarshal.c +++ b/dlls/oleaut32/tests/tmarshal.c @@ -1104,17 +1104,17 @@ static HRESULT WINAPI Widget_VarArg_Ref_Run( return S_OK; }
-static HRESULT WINAPI Widget_basetypes_in(IWidget *iface, signed char c, short s, int i, hyper h, - unsigned char uc, unsigned short us, unsigned int ui, MIDL_uhyper uh, +static HRESULT WINAPI Widget_basetypes_in(IWidget *iface, signed char c, short s, LONG l, hyper h, + unsigned char uc, unsigned short us, ULONG ul, MIDL_uhyper uh, float f, double d, STATE st) { ok(c == 5, "Got char %d.\n", c); ok(s == -123, "Got short %d.\n", s); - ok(i == -100000, "Got int %d.\n", i); + ok(l == -100000, "Got int %d.\n", l); ok(h == (LONGLONG)-100000 * 1000000, "Got hyper %s.\n", wine_dbgstr_longlong(h)); ok(uc == 0, "Got unsigned char %u.\n", uc); ok(us == 456, "Got unsigned short %u.\n", us); - ok(ui == 0xdeadbeef, "Got unsigned int %i.\n", ui); + ok(ul == 0xdeadbeef, "Got unsigned int %u.\n", ul); ok(uh == (ULONGLONG)1234567890 * 9876543210, "Got unsigned hyper %s.\n", wine_dbgstr_longlong(uh)); ok(f == (float)M_PI, "Got float %f.\n", f); ok(d == M_E, "Got double %f.\n", d); @@ -1123,17 +1123,17 @@ static HRESULT WINAPI Widget_basetypes_in(IWidget *iface, signed char c, short s return S_OK; }
-static HRESULT WINAPI Widget_basetypes_out(IWidget *iface, signed char *c, short *s, int *i, hyper *h, - unsigned char *uc, unsigned short *us, unsigned int *ui, MIDL_uhyper *uh, +static HRESULT WINAPI Widget_basetypes_out(IWidget *iface, signed char *c, short *s, LONG *l, hyper *h, + unsigned char *uc, unsigned short *us, ULONG *ul, MIDL_uhyper *uh, float *f, double *d, STATE *st) { *c = 10; *s = -321; - *i = -200000; + *l = -200000; *h = (LONGLONG)-200000 * 1000000; *uc = 254; *us = 256; - *ui = 0xf00dfade; + *ul = 0xf00dfade; *uh = (((ULONGLONG)0xabcdef01) << 32) | (ULONGLONG)0x23456789; *f = M_LN2; *d = M_LN10; @@ -1153,7 +1153,7 @@ static HRESULT WINAPI Widget_float_abi(IWidget *iface, float f, double d, int i, return S_OK; }
-static HRESULT WINAPI Widget_int_ptr(IWidget *iface, int *in, int *out, int *in_out) +static HRESULT WINAPI Widget_long_ptr(IWidget *iface, LONG *in, LONG *out, LONG *in_out) { ok(*in == 123, "Got [in] %d.\n", *in); if (testmode == 0) /* Invoke() */ @@ -1169,7 +1169,7 @@ static HRESULT WINAPI Widget_int_ptr(IWidget *iface, int *in, int *out, int *in_ return S_OK; }
-static HRESULT WINAPI Widget_int_ptr_ptr(IWidget *iface, int **in, int **out, int **in_out) +static HRESULT WINAPI Widget_long_ptr_ptr(IWidget *iface, LONG **in, LONG **out, LONG **in_out) { ok(!*out, "Got [out] %p.\n", *out); if (testmode == 0) @@ -1637,8 +1637,8 @@ static const struct IWidgetVtbl Widget_VTable = Widget_basetypes_in, Widget_basetypes_out, Widget_float_abi, - Widget_int_ptr, - Widget_int_ptr_ptr, + Widget_long_ptr, + Widget_long_ptr_ptr, Widget_iface_in, Widget_iface_out, Widget_iface_ptr, @@ -1980,11 +1980,12 @@ static void test_marshal_basetypes(IWidget *widget, IDispatch *disp)
signed char c; short s; + LONG l; int i, i2, *pi; hyper h; unsigned char uc; unsigned short us; - unsigned int ui; + ULONG ul; MIDL_uhyper uh; float f; double d; @@ -2009,46 +2010,46 @@ static void test_marshal_basetypes(IWidget *widget, IDispatch *disp) 0xdeadbeef, (ULONGLONG)1234567890 * 9876543210, M_PI, M_E, STATE_WIDGETIFIED); ok(hr == S_OK, "Got hr %#x.\n", hr);
- c = s = i = h = uc = us = ui = uh = f = d = st = 0; + c = s = l = h = uc = us = ul = uh = f = d = st = 0;
V_VT(&arg[10]) = VT_BYREF|VT_I1; V_I1REF(&arg[10]) = &c; V_VT(&arg[9]) = VT_BYREF|VT_I2; V_I2REF(&arg[9]) = &s; - V_VT(&arg[8]) = VT_BYREF|VT_I4; V_I4REF(&arg[8]) = &i; + V_VT(&arg[8]) = VT_BYREF|VT_I4; V_I4REF(&arg[8]) = &l; V_VT(&arg[7]) = VT_BYREF|VT_I8; V_I8REF(&arg[7]) = &h; V_VT(&arg[6]) = VT_BYREF|VT_UI1; V_UI1REF(&arg[6]) = &uc; V_VT(&arg[5]) = VT_BYREF|VT_UI2; V_UI2REF(&arg[5]) = &us; - V_VT(&arg[4]) = VT_BYREF|VT_UI4; V_UI4REF(&arg[4]) = &ui; + V_VT(&arg[4]) = VT_BYREF|VT_UI4; V_UI4REF(&arg[4]) = &ul; V_VT(&arg[3]) = VT_BYREF|VT_UI8; V_UI8REF(&arg[3]) = &uh; V_VT(&arg[2]) = VT_BYREF|VT_R4; V_R4REF(&arg[2]) = &f; V_VT(&arg[1]) = VT_BYREF|VT_R8; V_R8REF(&arg[1]) = &d; - V_VT(&arg[0]) = VT_BYREF|VT_I4; V_I4REF(&arg[0]) = (int *)&st; + V_VT(&arg[0]) = VT_BYREF|VT_I4; V_I4REF(&arg[0]) = (LONG *)&st; hr = IDispatch_Invoke(disp, DISPID_TM_BASETYPES_OUT, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); ok(hr == S_OK, "Got hr %#x.\n", hr); ok(c == 10, "Got char %d.\n", c); ok(s == -321, "Got short %d.\n", s); - ok(i == -200000, "Got int %d.\n", i); + ok(l == -200000, "Got int %d.\n", l); ok(h == (LONGLONG)-200000 * 1000000L, "Got hyper %s.\n", wine_dbgstr_longlong(h)); ok(uc == 254, "Got unsigned char %u.\n", uc); ok(us == 256, "Got unsigned short %u.\n", us); - ok(ui == 0xf00dfade, "Got unsigned int %i.\n", ui); + ok(ul == 0xf00dfade, "Got unsigned int %i.\n", ul); ok(uh == ((((ULONGLONG)0xabcdef01) << 32) | (ULONGLONG)0x23456789), "Got unsigned hyper %s.\n", wine_dbgstr_longlong(uh)); ok(f == (float)M_LN2, "Got float %f.\n", f); ok(d == M_LN10, "Got double %f.\n", d); ok(st == STATE_UNWIDGETIFIED, "Got state %u.\n", st);
- c = s = i = h = uc = us = ui = uh = f = d = st = 0; + c = s = l = h = uc = us = ul = uh = f = d = st = 0;
- hr = IWidget_basetypes_out(widget, &c, &s, &i, &h, &uc, &us, &ui, &uh, &f, &d, &st); + hr = IWidget_basetypes_out(widget, &c, &s, &l, &h, &uc, &us, &ul, &uh, &f, &d, &st); ok(hr == S_OK, "Got hr %#x.\n", hr); ok(c == 10, "Got char %d.\n", c); ok(s == -321, "Got short %d.\n", s); - ok(i == -200000, "Got int %d.\n", i); + ok(l == -200000, "Got int %d.\n", l); ok(h == (LONGLONG)-200000 * 1000000L, "Got hyper %s.\n", wine_dbgstr_longlong(h)); ok(uc == 254, "Got unsigned char %u.\n", uc); ok(us == 256, "Got unsigned short %u.\n", us); - ok(ui == 0xf00dfade, "Got unsigned int %i.\n", ui); + ok(ul == 0xf00dfade, "Got unsigned int %i.\n", ul); ok(uh == ((((ULONGLONG)0xabcdef01) << 32) | (ULONGLONG)0x23456789), "Got unsigned hyper %s.\n", wine_dbgstr_longlong(uh)); ok(f == (float)M_LN2, "Got float %f.\n", f); @@ -2073,7 +2074,7 @@ static void test_marshal_pointer(IWidget *widget, IDispatch *disp) { VARIANTARG arg[3]; DISPPARAMS dispparams = {arg, NULL, ARRAY_SIZE(arg), 0}; - int in, out, in_out, *in_ptr, *out_ptr, *in_out_ptr; + LONG in, out, in_out, *in_ptr, *out_ptr, *in_out_ptr; HRESULT hr;
testmode = 0; @@ -2096,26 +2097,26 @@ static void test_marshal_pointer(IWidget *widget, IDispatch *disp) in = 123; out = 456; in_out = 789; - hr = IWidget_int_ptr(widget, &in, &out, &in_out); + hr = IWidget_long_ptr(widget, &in, &out, &in_out); ok(hr == S_OK, "Got hr %#x.\n", hr); ok(in == 123, "Got [in] %d.\n", in); ok(out == 654, "Got [out] %d.\n", out); ok(in_out == 321, "Got [in, out] %d.\n", in_out);
out = in_out = -1; - hr = IWidget_int_ptr(widget, NULL, &out, &in_out); + hr = IWidget_long_ptr(widget, NULL, &out, &in_out); ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#x.\n", hr); ok(!out, "[out] parameter should have been cleared.\n"); ok(in_out == -1, "[in, out] parameter should not have been cleared.\n");
in = in_out = -1; - hr = IWidget_int_ptr(widget, &in, NULL, &in_out); + hr = IWidget_long_ptr(widget, &in, NULL, &in_out); ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#x.\n", hr); ok(in == -1, "[in] parameter should not have been cleared.\n"); ok(in_out == -1, "[in, out] parameter should not have been cleared.\n");
in = out = -1; - hr = IWidget_int_ptr(widget, &in, &out, NULL); + hr = IWidget_long_ptr(widget, &in, &out, NULL); ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#x.\n", hr); ok(in == -1, "[in] parameter should not have been cleared.\n"); ok(!out, "[out] parameter should have been cleared.\n"); @@ -2125,14 +2126,14 @@ static void test_marshal_pointer(IWidget *widget, IDispatch *disp)
testmode = 0; in_ptr = out_ptr = in_out_ptr = NULL; - hr = IWidget_int_ptr_ptr(widget, &in_ptr, &out_ptr, &in_out_ptr); + hr = IWidget_long_ptr_ptr(widget, &in_ptr, &out_ptr, &in_out_ptr); ok(hr == S_OK, "Got hr %#x\n", hr); ok(!in_ptr, "Got [in] %p.\n", in_ptr); ok(!out_ptr, "Got [out] %p.\n", out_ptr); ok(!in_out_ptr, "Got [in, out] %p.\n", in_out_ptr);
testmode = 1; - hr = IWidget_int_ptr_ptr(widget, &in_ptr, &out_ptr, &in_out_ptr); + hr = IWidget_long_ptr_ptr(widget, &in_ptr, &out_ptr, &in_out_ptr); ok(hr == S_OK, "Got hr %#x\n", hr); ok(*out_ptr == 654, "Got [out] %d.\n", *out_ptr); ok(*in_out_ptr == 321, "Got [in, out] %d.\n", *in_out_ptr); @@ -2146,7 +2147,7 @@ static void test_marshal_pointer(IWidget *widget, IDispatch *disp) in_ptr = ∈ out_ptr = &out; in_out_ptr = &in_out; - hr = IWidget_int_ptr_ptr(widget, &in_ptr, &out_ptr, &in_out_ptr); + hr = IWidget_long_ptr_ptr(widget, &in_ptr, &out_ptr, &in_out_ptr); ok(hr == S_OK, "Got hr %#x.\n", hr); ok(out_ptr != &out, "[out] ptr should have changed.\n"); ok(in_out_ptr == &in_out, "[in, out] ptr should not have changed.\n"); @@ -2157,27 +2158,27 @@ static void test_marshal_pointer(IWidget *widget, IDispatch *disp) in_ptr = out_ptr = NULL; in_out = 789; in_out_ptr = &in_out; - hr = IWidget_int_ptr_ptr(widget, &in_ptr, &out_ptr, &in_out_ptr); + hr = IWidget_long_ptr_ptr(widget, &in_ptr, &out_ptr, &in_out_ptr); ok(hr == S_OK, "Got hr %#x.\n", hr); ok(!in_out_ptr, "Got [in, out] %p.\n", in_out_ptr);
out_ptr = &out; in_out_ptr = &in_out; - hr = IWidget_int_ptr_ptr(widget, NULL, &out_ptr, &in_out_ptr); + hr = IWidget_long_ptr_ptr(widget, NULL, &out_ptr, &in_out_ptr); ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#x.\n", hr); ok(!out_ptr, "[out] parameter should have been cleared.\n"); ok(in_out_ptr == &in_out, "[in, out] parameter should not have been cleared.\n");
in_ptr = ∈ in_out_ptr = &in_out; - hr = IWidget_int_ptr_ptr(widget, &in_ptr, NULL, &in_out_ptr); + hr = IWidget_long_ptr_ptr(widget, &in_ptr, NULL, &in_out_ptr); ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#x.\n", hr); ok(in_ptr == &in, "[in] parameter should not have been cleared.\n"); ok(in_out_ptr == &in_out, "[in, out] parameter should not have been cleared.\n");
in_ptr = ∈ out_ptr = &out; - hr = IWidget_int_ptr_ptr(widget, &in_ptr, &out_ptr, NULL); + hr = IWidget_long_ptr_ptr(widget, &in_ptr, &out_ptr, NULL); ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#x.\n", hr); ok(in_ptr == &in, "[in] parameter should not have been cleared.\n"); ok(!out_ptr, "[out] parameter should have been cleared.\n"); @@ -2634,7 +2635,7 @@ static void test_marshal_array(IWidget *widget, IDispatch *disp) array_t in, out, in_out; MYSTRUCT struct_in[2]; HRESULT hr; - int i = 2; + LONG l = 2;
memcpy(in, test_array1, sizeof(array_t)); memcpy(out, test_array2, sizeof(array_t)); @@ -2646,7 +2647,7 @@ static void test_marshal_array(IWidget *widget, IDispatch *disp) ok(!memcmp(&in_out, &test_array6, sizeof(array_t)), "Arrays didn't match.\n");
V_VT(&var_in[0]) = VT_I4; V_I4(&var_in[0]) = 1; - V_VT(&var_in[1]) = VT_BYREF|VT_I4; V_I4REF(&var_in[1]) = &i; + V_VT(&var_in[1]) = VT_BYREF|VT_I4; V_I4REF(&var_in[1]) = &l; V_VT(&var_out[0]) = VT_I4; V_I4(&var_out[0]) = 3; V_VT(&var_out[1]) = VT_I4; V_I4(&var_out[1]) = 4; V_VT(&var_in_out[0]) = VT_I4; V_I4(&var_in_out[0]) = 5; @@ -2656,8 +2657,8 @@ static void test_marshal_array(IWidget *widget, IDispatch *disp) ok(V_VT(&var_in[0]) == VT_I4, "Got wrong type %u.\n", V_VT(&var_in[0])); ok(V_I4(&var_in[0]) == 1, "Got wrong value %d.\n", V_I4(&var_in[0])); ok(V_VT(&var_in[1]) == (VT_BYREF|VT_I4), "Got wrong type %u.\n", V_VT(&var_in[1])); - ok(V_I4REF(&var_in[1]) == &i, "Got wrong value %p.\n", V_I4REF(&var_in[1])); - ok(i == 2, "Got wrong value %d.\n", i); + ok(V_I4REF(&var_in[1]) == &l, "Got wrong value %p.\n", V_I4REF(&var_in[1])); + ok(l == 2, "Got wrong value %d.\n", l); ok(V_VT(&var_out[0]) == VT_I1, "Got wrong type %u.\n", V_VT(&var_out[0])); ok(V_I1(&var_out[0]) == 9, "Got wrong value %u.\n", V_VT(&var_out[0])); ok(V_VT(&var_out[1]) == VT_BSTR, "Got wrong type %u.\n", V_VT(&var_out[1])); @@ -3054,7 +3055,7 @@ static void test_typelibmarshal(void) the_state = STATE_WIDGETIFIED; VariantInit(&vararg[0]); V_VT(&vararg[0]) = VT_BYREF|VT_I4; - V_I4REF(&vararg[0]) = (int *)&the_state; + V_I4REF(&vararg[0]) = (LONG *)&the_state; dispparams.cNamedArgs = 1; dispparams.cArgs = 1; dispparams.rgdispidNamedArgs = &dispidNamed; @@ -3416,7 +3417,7 @@ static void test_typelibmarshal(void) uval = 666; VariantInit(&vararg[0]); V_VT(&vararg[0]) = VT_UI4|VT_BYREF; - V_UI4REF(&vararg[0]) = &uval; + V_UI4REF(&vararg[0]) = (ULONG *)&uval; dispparams.cNamedArgs = 0; dispparams.cArgs = 1; dispparams.rgvarg = vararg; @@ -3425,7 +3426,7 @@ static void test_typelibmarshal(void) ok_ole_success(hr, ITypeInfo_Invoke); ok(V_VT(&varresult) == VT_EMPTY, "varresult should be VT_EMPTY\n"); ok(V_VT(&vararg[0]) == (VT_UI4|VT_BYREF), "arg VT not unmarshalled correctly: %x\n", V_VT(&vararg[0])); - ok(V_UI4REF(&vararg[0]) == &uval, "Byref pointer not preserved: %p/%p\n", &uval, V_UI4REF(&vararg[0])); + ok(V_UI4REF(&vararg[0]) == (ULONG *)&uval, "Byref pointer not preserved: %p/%p\n", &uval, V_UI4REF(&vararg[0])); ok(*V_UI4REF(&vararg[0]) == 42, "Expected 42 to be returned instead of %u\n", *V_UI4REF(&vararg[0])); VariantClear(&varresult); VariantClear(&vararg[0]); diff --git a/dlls/oleaut32/tests/tmarshal.idl b/dlls/oleaut32/tests/tmarshal.idl index a594f9137d8..e1c5a8557b7 100644 --- a/dlls/oleaut32/tests/tmarshal.idl +++ b/dlls/oleaut32/tests/tmarshal.idl @@ -291,23 +291,23 @@ cpp_quote("struct Coclass3 { ICoclass1 *iface; };") HRESULT VarArg_Ref_Run([in] BSTR name, [in] SAFEARRAY(VARIANT) *params, [out, retval] VARIANT *result);
[id(DISPID_TM_BASETYPES_IN)] - HRESULT basetypes_in([in] signed char c, [in] short s, [in] int i, [in] hyper h, - [in] unsigned char uc, [in] unsigned short us, [in] unsigned int ui, + HRESULT basetypes_in([in] signed char c, [in] short s, [in] long l, [in] hyper h, + [in] unsigned char uc, [in] unsigned short us, [in] unsigned long ul, [in] unsigned hyper uh, [in] float f, [in] double d, [in] STATE st);
[id(DISPID_TM_BASETYPES_OUT)] - HRESULT basetypes_out([out] signed char *c, [out] short *s, [out] int *i, [out] hyper *h, - [out] unsigned char *uc, [out] unsigned short *us, [out] unsigned int *ui, + HRESULT basetypes_out([out] signed char *c, [out] short *s, [out] long *l, [out] hyper *h, + [out] unsigned char *uc, [out] unsigned short *us, [out] unsigned long *ul, [out] unsigned hyper *uh, [out] float *f, [out] double *d, [out] STATE *st);
[id(DISPID_TM_FLOAT_ABI)] HRESULT float_abi([in] float f, [in] double d, [in] int i, [in] float f2, [in] double d2);
[id(DISPID_TM_INT_PTR)] - HRESULT int_ptr([in] int *in, [out] int *out, [in, out] int *in_out); + HRESULT long_ptr([in] long *in, [out] long *out, [in, out] long *in_out);
[id(DISPID_TM_INT_PTR_PTR)] - HRESULT int_ptr_ptr([in] int **in, [out] int **out, [in, out] int **in_out); + HRESULT long_ptr_ptr([in] long **in, [out] long **out, [in, out] long **in_out);
[id(DISPID_TM_IFACE_IN)] HRESULT iface_in([in] IUnknown *unk, [in] IDispatch *disp, [in] ISomethingFromDispatch *sfd);
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/oleaut32/tests/Makefile.in | 1 dlls/oleaut32/tests/dispatch.c | 52 + dlls/oleaut32/tests/olefont.c | 124 +-- dlls/oleaut32/tests/olepicture.c | 268 +++--- dlls/oleaut32/tests/safearray.c | 426 +++++----- dlls/oleaut32/tests/tmarshal.c | 432 +++++----- dlls/oleaut32/tests/typelib.c | 1596 +++++++++++++++++++------------------- dlls/oleaut32/tests/usrmarshal.c | 324 ++++---- dlls/oleaut32/tests/varformat.c | 60 + dlls/oleaut32/tests/vartest.c | 336 ++++---- dlls/oleaut32/tests/vartype.c | 260 +++--- 11 files changed, 1939 insertions(+), 1940 deletions(-)
diff --git a/dlls/oleaut32/tests/Makefile.in b/dlls/oleaut32/tests/Makefile.in index 780a068ede4..098ea9deef7 100644 --- a/dlls/oleaut32/tests/Makefile.in +++ b/dlls/oleaut32/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = oleaut32.dll IMPORTS = oleaut32 ole32 rpcrt4 user32 gdi32 advapi32
diff --git a/dlls/oleaut32/tests/dispatch.c b/dlls/oleaut32/tests/dispatch.c index ff63a7d592a..022eb4b7e67 100644 --- a/dlls/oleaut32/tests/dispatch.c +++ b/dlls/oleaut32/tests/dispatch.c @@ -84,7 +84,7 @@ static void test_DispGetParam(void) err_index = 0xdeadbeef; hr = DispGetParam(&dispparams, 0, VT_I2, &result, &err_index); ok(hr == DISP_E_PARAMNOTFOUND, - "Expected DISP_E_PARAMNOTFOUND, got %08x\n", hr); + "Expected DISP_E_PARAMNOTFOUND, got %08lx\n", hr); ok(V_VT(&result) == VT_EMPTY, "Expected VT_EMPTY, got %08x\n", V_VT(&result)); ok(err_index == 0xdeadbeef, @@ -96,7 +96,7 @@ static void test_DispGetParam(void) err_index = 0xdeadbeef; hr = DispGetParam(&dispparams, 1, VT_I2, &result, &err_index); ok(hr == DISP_E_PARAMNOTFOUND, - "Expected DISP_E_PARAMNOTFOUND, got %08x\n", hr); + "Expected DISP_E_PARAMNOTFOUND, got %08lx\n", hr); ok(V_VT(&result) == VT_EMPTY, "Expected VT_EMPTY, got %08x\n", V_VT(&result)); ok(err_index == 0xdeadbeef, @@ -107,7 +107,7 @@ static void test_DispGetParam(void) err_index = 0xdeadbeef; hr = DispGetParam(&dispparams, 0, VT_I2, NULL, &err_index); ok(hr == DISP_E_PARAMNOTFOUND, - "Expected DISP_E_PARAMNOTFOUND, got %08x\n", hr); + "Expected DISP_E_PARAMNOTFOUND, got %08lx\n", hr); ok(err_index == 0xdeadbeef, "Expected err_index to be unchanged, got %d\n", err_index);
@@ -116,7 +116,7 @@ static void test_DispGetParam(void) VariantInit(&result); hr = DispGetParam(&dispparams, 0, VT_I2, &result, NULL); ok(hr == DISP_E_PARAMNOTFOUND, - "Expected DISP_E_PARAMNOTFOUND, got %08x\n", hr); + "Expected DISP_E_PARAMNOTFOUND, got %08lx\n", hr); ok(V_VT(&result) == VT_EMPTY, "Expected VT_EMPTY, got %08x\n", V_VT(&result));
@@ -125,7 +125,7 @@ static void test_DispGetParam(void) VariantInit(&result); err_index = 0xdeadbeef; hr = DispGetParam(&dispparams, 0, VT_I2, &result, &err_index); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr); ok(V_VT(&result) == VT_EMPTY, "Expected VT_EMPTY, got %08x\n", V_VT(&result)); ok(err_index == 0, "Expected 0, got %d\n", err_index); @@ -145,7 +145,7 @@ static void test_DispGetParam(void) VariantInit(&result); err_index = 0xdeadbeef; hr = DispGetParam(&dispparams, 2, VT_I2, &result, &err_index); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(V_VT(&result) == VT_I2, "Expected VT_I2, got %08x\n", V_VT(&result)); ok(V_I2(&result) == 42, "Expected 42, got %d\n", V_I2(&result)); ok(err_index == 0xdeadbeef, @@ -156,10 +156,10 @@ static void test_DispGetParam(void) VariantInit(&result); err_index = 0xdeadbeef; hr = DispGetParam(&dispparams, 1, VT_I4, &result, &err_index); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(V_VT(&result) == VT_I4, "Expected VT_I4, got %08x\n", V_VT(&result)); ok(V_I4(&result) == 1234567890, - "Expected 1234567890, got %d\n", V_I4(&result)); + "Expected 1234567890, got %ld\n", V_I4(&result)); ok(err_index == 0xdeadbeef, "Expected err_index to be unchanged, got %d\n", err_index);
@@ -168,7 +168,7 @@ static void test_DispGetParam(void) VariantInit(&result); err_index = 0xdeadbeef; hr = DispGetParam(&dispparams, 0, VT_BSTR, &result, &err_index); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(V_VT(&result) == VT_BSTR, "Expected VT_BSTR, got %08x\n", V_VT(&result)); ok_bstr(V_BSTR(&result), "Sunshine", "Expected %s, got %s\n"); ok(err_index == 0xdeadbeef, @@ -181,7 +181,7 @@ static void test_DispGetParam(void) err_index = 0xdeadbeef; hr = DispGetParam(&dispparams, 3, VT_I2, &result, &err_index); ok(hr == DISP_E_PARAMNOTFOUND, - "Expected DISP_E_PARAMNOTFOUND, got %08x\n", hr); + "Expected DISP_E_PARAMNOTFOUND, got %08lx\n", hr); ok(V_VT(&result) == VT_EMPTY, "Expected VT_EMPTY, got %08x\n", V_VT(&result)); ok(err_index == 0xdeadbeef, @@ -191,14 +191,14 @@ static void test_DispGetParam(void) INIT_DISPPARAMS(dispparams, vararg, NULL, 3, 0); err_index = 0xdeadbeef; hr = DispGetParam(&dispparams, 2, VT_I2, NULL, &err_index); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr); ok(err_index == 0, "Expected 0, got %d\n", err_index);
/* puArgErr is NULL. */ INIT_DISPPARAMS(dispparams, vararg, NULL, 3, 0); VariantInit(&result); hr = DispGetParam(&dispparams, 2, VT_I2, &result, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(V_VT(&result) == VT_I2, "Expected VT_I2, got %08x\n", V_VT(&result)); ok(V_I2(&result) == 42, "Expected 42, got %d\n", V_I2(&result));
@@ -207,9 +207,9 @@ static void test_DispGetParam(void) VariantInit(&result); err_index = 0xdeadbeef; hr = DispGetParam(&dispparams, 2, VT_I4, &result, &err_index); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(V_VT(&result) == VT_I4, "Expected VT_I4, got %08x\n", V_VT(&result)); - ok(V_I4(&result) == 42, "Expected 42, got %d\n", V_I4(&result)); + ok(V_I4(&result) == 42, "Expected 42, got %ld\n", V_I4(&result)); ok(err_index == 0xdeadbeef, "Expected err_index to be unchanged, got %d\n", err_index);
@@ -218,7 +218,7 @@ static void test_DispGetParam(void) VariantInit(&result); err_index = 0xdeadbeef; hr = DispGetParam(&dispparams, 2, VT_BSTR, &result, &err_index); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(V_VT(&result) == VT_BSTR, "Expected VT_BSTR, got %08x\n", V_VT(&result)); ok_bstr(V_BSTR(&result), "42", "Expected %s, got %s\n"); ok(err_index == 0xdeadbeef, @@ -230,7 +230,7 @@ static void test_DispGetParam(void) VariantInit(&result); err_index = 0xdeadbeef; hr = DispGetParam(&dispparams, 1, VT_I2, &result, &err_index); - ok(hr == DISP_E_OVERFLOW, "Expected DISP_E_OVERFLOW, got %08x\n", hr); + ok(hr == DISP_E_OVERFLOW, "Expected DISP_E_OVERFLOW, got %08lx\n", hr); ok(V_VT(&result) == VT_EMPTY, "Expected VT_EMPTY, got %08x\n", V_VT(&result)); ok(err_index == 1, "Expected 1, got %d\n", err_index); @@ -241,7 +241,7 @@ static void test_DispGetParam(void) err_index = 0xdeadbeef; hr = DispGetParam(&dispparams, 0, VT_I2, &result, &err_index); ok(hr == DISP_E_TYPEMISMATCH, - "Expected DISP_E_TYPEMISMATCH, got %08x\n", hr); + "Expected DISP_E_TYPEMISMATCH, got %08lx\n", hr); ok(V_VT(&result) == VT_EMPTY, "Expected VT_EMPTY, got %08x\n", V_VT(&result)); ok(err_index == 2, "Expected 2, got %d\n", err_index); @@ -251,7 +251,7 @@ static void test_DispGetParam(void) VariantInit(&result); err_index = 0xdeadbeef; hr = DispGetParam(&dispparams, 2, VT_ILLEGAL, &result, &err_index); - ok(hr == DISP_E_BADVARTYPE, "Expected DISP_E_BADVARTYPE, got %08x\n", hr); + ok(hr == DISP_E_BADVARTYPE, "Expected DISP_E_BADVARTYPE, got %08lx\n", hr); ok(V_VT(&result) == VT_EMPTY, "Expected VT_EMPTY, got %08x\n", V_VT(&result)); ok(err_index == 0, "Expected 0, got %d\n", err_index); @@ -264,7 +264,7 @@ static void test_DispGetParam(void) VariantInit(&result); err_index = 0xdeadbeef; hr = DispGetParam(&dispparams, 0, VT_BSTR, &result, &err_index); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr); ok(V_VT(&result) == VT_BSTR, "Expected VT_BSTR, got %08x\n", V_VT(&result)); ok(err_index == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", err_index); VariantClear(&result); @@ -312,25 +312,25 @@ static void test_CreateStdDispatch(void) HRESULT hr;
hr = CreateStdDispatch(NULL, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = CreateStdDispatch(NULL, NULL, NULL, &unk); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = LoadTypeLib(stdole2W, &tl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); hr = ITypeLib_GetTypeInfoOfGuid(tl, &IID_IUnknown, &ti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ITypeLib_Release(tl);
hr = CreateStdDispatch(NULL, &test_unk, NULL, &unk); - ok(hr == E_INVALIDARG, "got %08x\n", hr); + ok(hr == E_INVALIDARG, "got %08lx\n", hr);
hr = CreateStdDispatch(NULL, NULL, ti, &unk); - ok(hr == E_INVALIDARG, "got %08x\n", hr); + ok(hr == E_INVALIDARG, "got %08lx\n", hr);
hr = CreateStdDispatch(NULL, &test_unk, ti, &unk); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); IUnknown_Release(unk);
ITypeInfo_Release(ti); diff --git a/dlls/oleaut32/tests/olefont.c b/dlls/oleaut32/tests/olefont.c index d7ae64d81e3..cf5b9ab34af 100644 --- a/dlls/oleaut32/tests/olefont.c +++ b/dlls/oleaut32/tests/olefont.c @@ -61,13 +61,13 @@ static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOO expected_hr = supported ? S_OK : E_NOINTERFACE;
hr = IUnknown_QueryInterface(iface, iid, (void **)&unk); - ok_(__FILE__, line)(hr == expected_hr, "Got hr %#x, expected %#x.\n", hr, expected_hr); + ok_(__FILE__, line)(hr == expected_hr, "Got hr %#lx, expected %#lx.\n", hr, expected_hr); if (SUCCEEDED(hr)) IUnknown_Release(unk); }
#define EXPECT_HR(hr,hr_exp) \ - ok(hr == hr_exp, "got 0x%08x, expected 0x%08x\n", hr, hr_exp) + ok(hr == hr_exp, "got 0x%08lx, expected 0x%08lx\n", hr, hr_exp)
/* Create a font with cySize given by lo_size, hi_size, */ /* SetRatio to ratio_logical, ratio_himetric, */ @@ -97,35 +97,35 @@ static void test_ifont_size(LONGLONG size, LONG ratio_logical, LONG ratio_himetr /* Create font, test that it worked. */ hres = pOleCreateFontIndirect(&fd, &IID_IFont, &pvObj); ifnt = pvObj; - ok(hres == S_OK,"%s: OCFI returns 0x%08x instead of S_OK.\n", + ok(hres == S_OK,"%s: OCFI returns 0x%08lx instead of S_OK.\n", test_name, hres); ok(pvObj != NULL,"%s: OCFI returns NULL.\n", test_name);
/* Change the scaling ratio */ hres = IFont_SetRatio(ifnt, ratio_logical, ratio_himetric); ok((ratio_logical && ratio_himetric) ? hres == S_OK : hres == E_FAIL, - "%s: IFont_SetRatio unexpectedly returned 0x%08x.\n", test_name, hres); + "%s: IFont_SetRatio unexpectedly returned 0x%08lx.\n", test_name, hres);
/* Read back size. */ hres = IFont_get_Size(ifnt, &psize); - ok(hres == S_OK,"%s: IFont_get_size returns 0x%08x instead of S_OK.\n", + ok(hres == S_OK,"%s: IFont_get_size returns 0x%08lx instead of S_OK.\n", test_name, hres);
/* Check returned size - allow for errors due to rounding & font realization. */ ok((psize.int64 - size) < 10000 && (psize.int64 - size) > -10000, - "%s: IFont_get_Size: Lo=%d, Hi=%d; expected Lo=%d, Hi=%d.\n", + "%s: IFont_get_Size: Lo=%ld, Hi=%ld; expected Lo=%ld, Hi=%ld.\n", test_name, S(psize).Lo, S(psize).Hi, fd.cySize.Lo, fd.cySize.Hi);
/* Check hFont size. */ hres = IFont_get_hFont (ifnt, &hfont); - ok(hres == S_OK, "%s: IFont_get_hFont returns 0x%08x instead of S_OK.\n", + ok(hres == S_OK, "%s: IFont_get_hFont returns 0x%08lx instead of S_OK.\n", test_name, hres); rtnval = GetObjectA(hfont, sizeof(LOGFONTA), &lf); ok(rtnval > 0, "GetObject(hfont) failed\n");
/* Since font scaling may encounter rounding errors, allow 1 pixel deviation. */ ok(abs(lf.lfHeight - hfont_height) <= 1, - "%s: hFont has lf.lfHeight=%d, expected %d.\n", + "%s: hFont has lf.lfHeight=%ld, expected %ld.\n", test_name, lf.lfHeight, hfont_height);
/* Free IFont. */ @@ -154,7 +154,7 @@ static void test_ifont_sizes(void) test_ifont_size(180000, 0, 0, -30, "default"); /* normal font */ test_ifont_size(186000, 0, 0, -31, "rounding"); /* test rounding */ } else - skip("Skipping resolution dependent font size tests - display resolution is %d\n", dpi); + skip("Skipping resolution dependent font size tests - display resolution is %ld\n", dpi);
/* Next 4 tests specify a scaling ratio, so display resolution is not a factor. */ test_ifont_size(180000, 72, 2540, -18, "ratio1"); /* change ratio */ @@ -240,11 +240,11 @@ static void test_type_info(void) fontdisp = pvObj;
hres = IFontDisp_GetTypeInfo(fontdisp, 0, en_us, &pTInfo); - ok(hres == S_OK, "GTI returned 0x%08x instead of S_OK.\n", hres); + ok(hres == S_OK, "GTI returned 0x%08lx instead of S_OK.\n", hres); ok(pTInfo != NULL, "GTI returned NULL.\n");
hres = ITypeInfo_GetNames(pTInfo, DISPID_FONT_NAME, names, 3, &n); - ok(hres == S_OK, "GetNames returned 0x%08x instead of S_OK.\n", hres); + ok(hres == S_OK, "GetNames returned 0x%08lx instead of S_OK.\n", hres); ok(n == 1, "GetNames returned %d names instead of 1.\n", n); ok(!lstrcmpiW(names[0],name_Name), "DISPID_FONT_NAME doesn't get 'Names'.\n"); SysFreeString(names[0]); @@ -259,7 +259,7 @@ static void test_type_info(void) hres = IFontDisp_Invoke(fontdisp, DISPID_FONT_NAME, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dispparams, &varresult, NULL, NULL); - ok(hres == S_OK, "IFontDisp_Invoke return 0x%08x instead of S_OK.\n", hres); + ok(hres == S_OK, "IFontDisp_Invoke return 0x%08lx instead of S_OK.\n", hres); VariantClear(&varresult);
IFontDisp_Release(fontdisp); @@ -327,7 +327,7 @@ static HRESULT WINAPI FontEventsDisp_Invoke( { VARIANTARG *arg0 = &pDispParams->rgvarg[0];
- ok(dispid == DISPID_FONT_CHANGED, "expected DISPID_FONT_CHANGED instead of 0x%x\n", dispid); + ok(dispid == DISPID_FONT_CHANGED, "expected DISPID_FONT_CHANGED instead of 0x%lx\n", dispid); ok(IsEqualGUID(riid, &GUID_NULL), "got riid %s\n", wine_dbgstr_guid(riid)); ok(wFlags == INVOKE_FUNC, "expected INVOKE_FUNC instead of 0x%x\n", wFlags); ok(pDispParams->cArgs == 1, "expected arg count 1, got %d\n", pDispParams->cArgs); @@ -470,12 +470,12 @@ static void test_font_events_disp(void) dispparams.rgvarg = &vararg; fonteventsdisp_invoke_called = 0; hr = IFontDisp_Invoke(pFontDisp, font_dispids[i].dispid, &IID_NULL, 0, DISPATCH_PROPERTYPUT, &dispparams, NULL, NULL, NULL); - ok(hr == S_OK, "dispid=%d, got 0x%08x\n", font_dispids[i].dispid, hr); - ok(fonteventsdisp_invoke_called == 1, "dispid=%d, DISPID_FONT_CHANGED not called, got %d\n", font_dispids[i].dispid, + ok(hr == S_OK, "dispid=%ld, got 0x%08lx\n", font_dispids[i].dispid, hr); + ok(fonteventsdisp_invoke_called == 1, "dispid=%ld, DISPID_FONT_CHANGED not called, got %d\n", font_dispids[i].dispid, fonteventsdisp_invoke_called); if (hr == S_OK) { - ok(!lstrcmpW(font_dispids[i].name, fonteventsdisp_invoke_arg0), "dispid=%d, got %s, expected %s\n", + ok(!lstrcmpW(font_dispids[i].name, fonteventsdisp_invoke_arg0), "dispid=%ld, got %s, expected %s\n", font_dispids[i].dispid, wine_dbgstr_w(fonteventsdisp_invoke_arg0), wine_dbgstr_w(font_dispids[i].name)); SysFreeString(fonteventsdisp_invoke_arg0); } @@ -516,19 +516,19 @@ static void test_names_ids(WCHAR* w_name_1, const char* a_name_1,
/* test hres */ ok(hres == hres_expect, - "GetIDsOfNames: "%s", "%s" returns 0x%08x, expected 0x%08x.\n", + "GetIDsOfNames: "%s", "%s" returns 0x%08lx, expected 0x%08lx.\n", a_name_1, a_name_2, hres, hres_expect);
/* test first DISPID */ ok(rgDispId[0]==id_1, - "GetIDsOfNames: "%s" gets DISPID 0x%08x, expected 0x%08x.\n", + "GetIDsOfNames: "%s" gets DISPID 0x%08lx, expected 0x%08lx.\n", a_name_1, rgDispId[0], id_1);
/* test second DISPID is present */ if (numnames == 2) { ok(rgDispId[1]==id_2, - "GetIDsOfNames: ..., "%s" gets DISPID 0x%08x, expected 0x%08x.\n", + "GetIDsOfNames: ..., "%s" gets DISPID 0x%08lx, expected 0x%08lx.\n", a_name_2, rgDispId[1], id_2); }
@@ -679,20 +679,20 @@ static void test_IsEqual(void) pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2); hres = IFont_IsEqual(ifnt,ifnt2); ok(hres == S_OK, - "IFont_IsEqual: (EQUAL) Expected S_OK but got 0x%08x\n",hres); + "IFont_IsEqual: (EQUAL) Expected S_OK but got 0x%08lx\n",hres); IFont_Release(ifnt2);
/* Check for bad pointer */ hres = IFont_IsEqual(ifnt,NULL); ok(hres == E_POINTER, - "IFont_IsEqual: (NULL) Expected 0x80004003 but got 0x%08x\n",hres); + "IFont_IsEqual: (NULL) Expected 0x80004003 but got 0x%08lx\n",hres);
/* Test strName */ fd.lpstrName = arial_font; pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2); hres = IFont_IsEqual(ifnt,ifnt2); ok(hres == S_FALSE, - "IFont_IsEqual: (strName) Expected S_FALSE but got 0x%08x\n",hres); + "IFont_IsEqual: (strName) Expected S_FALSE but got 0x%08lx\n",hres); fd.lpstrName = system_font; IFont_Release(ifnt2);
@@ -701,7 +701,7 @@ static void test_IsEqual(void) pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2); hres = IFont_IsEqual(ifnt,ifnt2); ok(hres == S_FALSE, - "IFont_IsEqual: (Lo font size) Expected S_FALSE but got 0x%08x\n",hres); + "IFont_IsEqual: (Lo font size) Expected S_FALSE but got 0x%08lx\n",hres); S(fd.cySize).Lo = 100; IFont_Release(ifnt2);
@@ -710,7 +710,7 @@ static void test_IsEqual(void) pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2); hres = IFont_IsEqual(ifnt,ifnt2); ok(hres == S_FALSE, - "IFont_IsEqual: (Hi font size) Expected S_FALSE but got 0x%08x\n",hres); + "IFont_IsEqual: (Hi font size) Expected S_FALSE but got 0x%08lx\n",hres); S(fd.cySize).Hi = 100; IFont_Release(ifnt2);
@@ -719,7 +719,7 @@ static void test_IsEqual(void) pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2); hres = IFont_IsEqual(ifnt,ifnt2); ok(hres == S_FALSE, - "IFont_IsEqual: (Weight) Expected S_FALSE but got 0x%08x\n",hres); + "IFont_IsEqual: (Weight) Expected S_FALSE but got 0x%08lx\n",hres); fd.sWeight = 0; IFont_Release(ifnt2);
@@ -728,7 +728,7 @@ static void test_IsEqual(void) pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2); hres = IFont_IsEqual(ifnt,ifnt2); ok(hres == S_FALSE, - "IFont_IsEqual: (Charset) Expected S_FALSE but got 0x%08x\n",hres); + "IFont_IsEqual: (Charset) Expected S_FALSE but got 0x%08lx\n",hres); fd.sCharset = 0; IFont_Release(ifnt2);
@@ -737,7 +737,7 @@ static void test_IsEqual(void) pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2); hres = IFont_IsEqual(ifnt,ifnt2); ok(hres == S_FALSE, - "IFont_IsEqual: (Italic) Expected S_FALSE but got 0x%08x\n",hres); + "IFont_IsEqual: (Italic) Expected S_FALSE but got 0x%08lx\n",hres); fd.fItalic = FALSE; IFont_Release(ifnt2);
@@ -746,7 +746,7 @@ static void test_IsEqual(void) pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2); hres = IFont_IsEqual(ifnt,ifnt2); ok(hres == S_FALSE, - "IFont_IsEqual: (Underline) Expected S_FALSE but got 0x%08x\n",hres); + "IFont_IsEqual: (Underline) Expected S_FALSE but got 0x%08lx\n",hres); fd.fUnderline = FALSE; IFont_Release(ifnt2);
@@ -755,7 +755,7 @@ static void test_IsEqual(void) pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2); hres = IFont_IsEqual(ifnt,ifnt2); ok(hres == S_FALSE, - "IFont_IsEqual: (Strikethrough) Expected S_FALSE but got 0x%08x\n",hres); + "IFont_IsEqual: (Strikethrough) Expected S_FALSE but got 0x%08lx\n",hres); fd.fStrikethrough = FALSE; IFont_Release(ifnt2);
@@ -797,36 +797,36 @@ static void test_ReleaseHfont(void) /* Try invalid HFONT */ hres = IFont_ReleaseHfont(ifnt1,NULL); ok(hres == E_INVALIDARG, - "IFont_ReleaseHfont: (Bad HFONT) Expected E_INVALIDARG but got 0x%08x\n", + "IFont_ReleaseHfont: (Bad HFONT) Expected E_INVALIDARG but got 0x%08lx\n", hres);
/* Try to add a bad HFONT */ hres = IFont_ReleaseHfont(ifnt1,(HFONT)32); ok(hres == S_FALSE, - "IFont_ReleaseHfont: (Bad HFONT) Expected S_FALSE but got 0x%08x\n", + "IFont_ReleaseHfont: (Bad HFONT) Expected S_FALSE but got 0x%08lx\n", hres);
/* Release all refs */ hres = IFont_ReleaseHfont(ifnt1,hfnt1); ok(hres == S_OK, - "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08x\n", + "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08lx\n", hres);
hres = IFont_ReleaseHfont(ifnt2,hfnt2); ok(hres == S_OK, - "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08x\n", + "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08lx\n", hres);
/* Check that both lists are empty */ hres = IFont_ReleaseHfont(ifnt1,hfnt1); ok(hres == S_FALSE, - "IFont_AddRefHfont: (Release ref) Expected S_FALSE but got 0x%08x\n", + "IFont_AddRefHfont: (Release ref) Expected S_FALSE but got 0x%08lx\n", hres);
/* The list should be empty */ hres = IFont_ReleaseHfont(ifnt2,hfnt2); ok(hres == S_FALSE, - "IFont_AddRefHfont: (Release ref) Expected S_FALSE but got 0x%08x\n", + "IFont_AddRefHfont: (Release ref) Expected S_FALSE but got 0x%08lx\n", hres);
IFont_Release(ifnt1); @@ -865,59 +865,59 @@ static void test_AddRefHfont(void) /* Try invalid HFONT */ hres = IFont_AddRefHfont(ifnt1,NULL); ok(hres == E_INVALIDARG, - "IFont_AddRefHfont: (Bad HFONT) Expected E_INVALIDARG but got 0x%08x\n", + "IFont_AddRefHfont: (Bad HFONT) Expected E_INVALIDARG but got 0x%08lx\n", hres);
/* Try to add a bad HFONT */ hres = IFont_AddRefHfont(ifnt1,(HFONT)32); ok(hres == S_FALSE, - "IFont_AddRefHfont: (Bad HFONT) Expected S_FALSE but got 0x%08x\n", + "IFont_AddRefHfont: (Bad HFONT) Expected S_FALSE but got 0x%08lx\n", hres);
/* Add simple IFONT HFONT pair */ hres = IFont_AddRefHfont(ifnt1,hfnt1); ok(hres == S_OK, - "IFont_AddRefHfont: (Add ref) Expected S_OK but got 0x%08x\n", + "IFont_AddRefHfont: (Add ref) Expected S_OK but got 0x%08lx\n", hres);
/* IFONT and HFONT do not have to be the same (always looks at HFONT) */ hres = IFont_AddRefHfont(ifnt2,hfnt1); ok(hres == S_OK, - "IFont_AddRefHfont: (Add ref) Expected S_OK but got 0x%08x\n", + "IFont_AddRefHfont: (Add ref) Expected S_OK but got 0x%08lx\n", hres);
/* Release all hfnt1 refs */ hres = IFont_ReleaseHfont(ifnt1,hfnt1); ok(hres == S_OK, - "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08x\n", + "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08lx\n", hres);
hres = IFont_ReleaseHfont(ifnt1,hfnt1); ok(hres == S_OK, - "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08x\n", + "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08lx\n", hres);
hres = IFont_ReleaseHfont(ifnt1,hfnt1); ok(hres == S_OK, - "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08x\n", + "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08lx\n", hres);
/* Check if hfnt1 is empty */ hres = IFont_ReleaseHfont(ifnt1,hfnt1); ok(hres == S_FALSE, - "IFont_AddRefHfont: (Release ref) Expected S_FALSE but got 0x%08x\n", + "IFont_AddRefHfont: (Release ref) Expected S_FALSE but got 0x%08lx\n", hres);
/* Release all hfnt2 refs */ hres = IFont_ReleaseHfont(ifnt2,hfnt2); ok(hres == S_OK, - "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08x\n", + "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08lx\n", hres);
/* Check if hfnt2 is empty */ hres = IFont_ReleaseHfont(ifnt2,hfnt2); ok(hres == S_FALSE, - "IFont_AddRefHfont: (Release ref) Expected S_FALSE but got 0x%08x\n", + "IFont_AddRefHfont: (Release ref) Expected S_FALSE but got 0x%08lx\n", hres);
/* Show that releasing an IFONT does not always release it from the HFONT cache. */ @@ -927,14 +927,14 @@ static void test_AddRefHfont(void) /* Add a reference for destroyed hfnt1 */ hres = IFont_AddRefHfont(ifnt2,hfnt1); ok(hres == S_OK, - "IFont_AddRefHfont: (Add ref) Expected S_OK but got 0x%08x\n", + "IFont_AddRefHfont: (Add ref) Expected S_OK but got 0x%08lx\n", hres);
/* Decrement reference for destroyed hfnt1 */ hres = IFont_ReleaseHfont(ifnt2,hfnt1); ok(hres == S_OK || hres == S_FALSE, /* <= win2k */ - "IFont_AddRefHfont: (Release ref) Expected S_OK or S_FALSE but got 0x%08x\n", + "IFont_AddRefHfont: (Release ref) Expected S_OK or S_FALSE but got 0x%08lx\n", hres);
/* Shows that releasing all IFONT's does clear the HFONT cache. */ @@ -949,13 +949,13 @@ static void test_AddRefHfont(void) /* Add a reference for destroyed hfnt1 */ hres = IFont_AddRefHfont(ifnt3,hfnt1); ok(hres == S_FALSE, - "IFont_AddRefHfont: (Add ref) Expected S_OK but got 0x%08x\n", + "IFont_AddRefHfont: (Add ref) Expected S_OK but got 0x%08lx\n", hres);
/* Decrement reference for destroyed hfnt1 */ hres = IFont_ReleaseHfont(ifnt3,hfnt1); ok(hres == S_FALSE, - "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08x\n", + "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08lx\n", hres);
IFont_Release(ifnt3); @@ -1028,14 +1028,14 @@ static void test_hfont_lifetime(void) size.int64 = (i + 10) * 20000;
obj_type = GetObjectType(hfont); - ok(obj_type == OBJ_FONT, "got obj type %d\n", obj_type); + ok(obj_type == OBJ_FONT, "got obj type %ld\n", obj_type);
hr = IFont_put_Size(font, size); EXPECT_HR(hr, S_OK);
/* put_Size doesn't cause the new font to be realized */ obj_type = GetObjectType(last_hfont); - ok(obj_type == OBJ_FONT, "got obj type %d\n", obj_type); + ok(obj_type == OBJ_FONT, "got obj type %ld\n", obj_type);
hr = IFont_get_hFont(font, &hfont); EXPECT_HR(hr, S_OK); @@ -1048,7 +1048,7 @@ static void test_hfont_lifetime(void) size.int64 = (i + 10) * 20000;
obj_type = GetObjectType(hfont); - ok(obj_type == OBJ_FONT, "got obj type %d\n", obj_type); + ok(obj_type == OBJ_FONT, "got obj type %ld\n", obj_type);
hr = IFont_put_Size(font, size); EXPECT_HR(hr, S_OK); @@ -1061,7 +1061,7 @@ static void test_hfont_lifetime(void)
if(i == 0) first_hfont = hfont; obj_type = GetObjectType(first_hfont); - ok(obj_type == OBJ_FONT, "got obj type %d\n", obj_type); + ok(obj_type == OBJ_FONT, "got obj type %ld\n", obj_type); }
IFont_Release(font); @@ -1082,14 +1082,14 @@ static void test_hfont_lifetime(void) size.int64 = (i + 10) * 20000;
obj_type = GetObjectType(hfont); - ok(obj_type == OBJ_FONT, "got obj type %d\n", obj_type); + ok(obj_type == OBJ_FONT, "got obj type %ld\n", obj_type);
hr = IFont_put_Size(font, size); EXPECT_HR(hr, S_OK);
/* put_Size doesn't cause the new font to be realized */ obj_type = GetObjectType(last_hfont); - ok(obj_type == OBJ_FONT, "got obj type %d\n", obj_type); + ok(obj_type == OBJ_FONT, "got obj type %ld\n", obj_type);
hr = IFont_get_hFont(font, &hfont); EXPECT_HR(hr, S_OK); @@ -1109,7 +1109,7 @@ static void test_hfont_lifetime(void) size.int64 = (i + 10) * 20000;
obj_type = GetObjectType(hfont); - ok(obj_type == OBJ_FONT, "got obj type %d\n", obj_type); + ok(obj_type == OBJ_FONT, "got obj type %ld\n", obj_type);
hr = IFont_put_Size(font, size); EXPECT_HR(hr, S_OK); @@ -1122,7 +1122,7 @@ static void test_hfont_lifetime(void)
if(i == 0) first_hfont = hfont; obj_type = GetObjectType(first_hfont); - ok(obj_type == OBJ_FONT, "got obj type %d\n", obj_type); + ok(obj_type == OBJ_FONT, "got obj type %ld\n", obj_type); }
IFont_Release(font); @@ -1151,12 +1151,12 @@ static void test_hfont_lifetime(void) EXPECT_HR(hr, S_FALSE);
obj_type = GetObjectType(hfont); - ok(obj_type == OBJ_FONT, "got obj type %d\n", obj_type); + ok(obj_type == OBJ_FONT, "got obj type %ld\n", obj_type);
IFont_Release(font);
obj_type = GetObjectType(hfont); - ok(obj_type == OBJ_FONT, "got obj type %d\n", obj_type); + ok(obj_type == OBJ_FONT, "got obj type %ld\n", obj_type);
IFont_Release(font2); } @@ -1255,13 +1255,13 @@ static void test_OleCreateFontIndirect(void) IFont_Release(font);
hr = OleInitialize(NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = CoGetClassObject(&CLSID_StdFont, CLSCTX_INPROC_SERVER, NULL, &IID_IClassFactory, (void**)&unk); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void**)&unk2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
IUnknown_Release(unk); IUnknown_Release(unk2); diff --git a/dlls/oleaut32/tests/olepicture.c b/dlls/oleaut32/tests/olepicture.c index 4d8d0ec24c5..a40901cb6f4 100644 --- a/dlls/oleaut32/tests/olepicture.c +++ b/dlls/oleaut32/tests/olepicture.c @@ -46,7 +46,7 @@
#define ole_expect(expr, expect) { \ HRESULT r = expr; \ - ok(r == (expect), #expr " returned %x, expected %s (%x)\n", r, #expect, expect); \ + ok(r == (expect), #expr " returned %lx, expected %s (%lx)\n", r, #expect, expect); \ }
#define ole_check(expr) ole_expect(expr, S_OK); @@ -56,7 +56,7 @@ static HMODULE hOleaut32; static HRESULT (WINAPI *pOleLoadPicture)(LPSTREAM,LONG,BOOL,REFIID,LPVOID*); static HRESULT (WINAPI *pOleLoadPictureEx)(LPSTREAM,LONG,BOOL,REFIID,DWORD,DWORD,DWORD,LPVOID*);
-#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr) +#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error %#08lx\n", hr)
/* 1x1 pixel gif */ static const unsigned char gifimage[35] = { @@ -218,7 +218,7 @@ test_pic_with_stream(LPSTREAM stream, unsigned int imgsize) hres = pOleLoadPicture(stream, imgsize, TRUE, &IID_IPicture, &pvObj); pic = pvObj;
- ok(hres == S_OK,"OLP (NULL,..) does not return 0, but 0x%08x\n",hres); + ok(hres == S_OK,"OLP (NULL,..) does not return 0, but 0x%08lx\n",hres); ok(pic != NULL,"OLP (NULL,..) returns NULL, instead of !NULL\n"); if (pic == NULL) return; @@ -226,14 +226,14 @@ test_pic_with_stream(LPSTREAM stream, unsigned int imgsize) pvObj = NULL; hres = IPicture_QueryInterface (pic, &IID_IPicture, &pvObj);
- ok(hres == S_OK,"IPicture_QI does not return S_OK, but 0x%08x\n", hres); + ok(hres == S_OK,"IPicture_QI does not return S_OK, but 0x%08lx\n", hres); ok(pvObj != NULL,"IPicture_QI does return NULL, instead of a ptr\n");
IPicture_Release ((IPicture*)pvObj);
handle = 0; hres = IPicture_get_Handle (pic, &handle); - ok(hres == S_OK,"IPicture_get_Handle does not return S_OK, but 0x%08x\n", hres); + ok(hres == S_OK,"IPicture_get_Handle does not return S_OK, but 0x%08lx\n", hres); ok(handle != 0, "IPicture_get_Handle returns a NULL handle, but it should be non NULL\n");
if (handle) @@ -245,32 +245,32 @@ test_pic_with_stream(LPSTREAM stream, unsigned int imgsize)
width = 0; hres = IPicture_get_Width (pic, &width); - ok(hres == S_OK,"IPicture_get_Width does not return S_OK, but 0x%08x\n", hres); + ok(hres == S_OK,"IPicture_get_Width does not return S_OK, but 0x%08lx\n", hres); ok(width != 0, "IPicture_get_Width returns 0, but it should not be 0.\n");
height = 0; hres = IPicture_get_Height (pic, &height); - ok(hres == S_OK,"IPicture_get_Height does not return S_OK, but 0x%08x\n", hres); + ok(hres == S_OK,"IPicture_get_Height does not return S_OK, but 0x%08lx\n", hres); ok(height != 0, "IPicture_get_Height returns 0, but it should not be 0.\n");
type = 0; hres = IPicture_get_Type (pic, &type); - ok(hres == S_OK,"IPicture_get_Type does not return S_OK, but 0x%08x\n", hres); + ok(hres == S_OK,"IPicture_get_Type does not return S_OK, but 0x%08lx\n", hres); ok(type == PICTYPE_BITMAP, "IPicture_get_Type returns %d, but it should be PICTYPE_BITMAP(%d).\n", type, PICTYPE_BITMAP);
attr = 0; hres = IPicture_get_Attributes (pic, &attr); - ok(hres == S_OK,"IPicture_get_Attributes does not return S_OK, but 0x%08x\n", hres); - ok(attr == 0, "IPicture_get_Attributes returns %d, but it should be 0.\n", attr); + ok(hres == S_OK,"IPicture_get_Attributes does not return S_OK, but 0x%08lx\n", hres); + ok(attr == 0, "IPicture_get_Attributes returns %ld, but it should be 0.\n", attr);
hPal = 0; hres = IPicture_get_hPal (pic, &hPal); - ok(hres == S_OK,"IPicture_get_hPal does not return S_OK, but 0x%08x\n", hres); + ok(hres == S_OK,"IPicture_get_hPal does not return S_OK, but 0x%08lx\n", hres); /* a single pixel b/w image has no palette */ ok(hPal == 0, "IPicture_get_hPal returns %d, but it should be 0.\n", hPal);
res = IPicture_Release (pic); - ok (res == 0, "refcount after release is %d, but should be 0?\n", res); + ok (res == 0, "refcount after release is %ld, but should be 0?\n", res); }
static void @@ -292,11 +292,11 @@ test_pic(const unsigned char *imgdata, unsigned int imgsize) GlobalUnlock(hglob); data = NULL;
hres = CreateStreamOnHGlobal (hglob, FALSE, &stream); - ok (hres == S_OK, "createstreamonhglobal failed? doubt it... hres 0x%08x\n", hres); + ok (hres == S_OK, "createstreamonhglobal failed? doubt it... hres 0x%08lx\n", hres);
memset(&seekto,0,sizeof(seekto)); hres = IStream_Seek(stream,seekto,SEEK_CUR,&newpos1); - ok (hres == S_OK, "istream seek failed? doubt it... hres 0x%08x\n", hres); + ok (hres == S_OK, "istream seek failed? doubt it... hres 0x%08lx\n", hres); test_pic_with_stream(stream, imgsize); IStream_Release(stream); @@ -323,11 +323,11 @@ test_pic(const unsigned char *imgdata, unsigned int imgsize) GlobalUnlock(hglob); data = NULL;
hres = CreateStreamOnHGlobal (hglob, FALSE, &stream); - ok (hres == S_OK, "createstreamonhglobal failed? doubt it... hres 0x%08x\n", hres); + ok (hres == S_OK, "createstreamonhglobal failed? doubt it... hres 0x%08lx\n", hres);
memset(&seekto,0,sizeof(seekto)); hres = IStream_Seek(stream,seekto,SEEK_CUR,&newpos1); - ok (hres == S_OK, "istream seek failed? doubt it... hres 0x%08x\n", hres); + ok (hres == S_OK, "istream seek failed? doubt it... hres 0x%08lx\n", hres); test_pic_with_stream(stream, imgsize); IStream_Release(stream); @@ -360,29 +360,29 @@ static void test_empty_image(void) { memcpy(data,"lt\0\0",4); ((DWORD*)data)[1] = 0; hres = CreateStreamOnHGlobal (hglob, TRUE, &stream); - ok (hres == S_OK, "CreatestreamOnHGlobal failed? doubt it... hres 0x%08x\n", hres); + ok (hres == S_OK, "CreatestreamOnHGlobal failed? doubt it... hres 0x%08lx\n", hres);
memset(&seekto,0,sizeof(seekto)); hres = IStream_Seek(stream,seekto,SEEK_CUR,&newpos1); - ok (hres == S_OK, "istream seek failed? doubt it... hres 0x%08x\n", hres); + ok (hres == S_OK, "istream seek failed? doubt it... hres 0x%08lx\n", hres);
pvObj = NULL; hres = pOleLoadPicture(stream, 8, TRUE, &IID_IPicture, &pvObj); pic = pvObj; - ok(hres == S_OK,"empty picture not loaded, hres 0x%08x\n", hres); + ok(hres == S_OK,"empty picture not loaded, hres 0x%08lx\n", hres); ok(pic != NULL,"empty picture not loaded, pic is NULL\n");
hres = IPicture_get_Type (pic, &type); - ok (hres == S_OK,"empty picture get type failed with hres 0x%08x\n", hres); + ok (hres == S_OK,"empty picture get type failed with hres 0x%08lx\n", hres); ok (type == PICTYPE_NONE,"type is %d, but should be PICTYPE_NONE(0)\n", type);
attr = 0xdeadbeef; hres = IPicture_get_Attributes (pic, &attr); - ok (hres == S_OK,"empty picture get attributes failed with hres 0x%08x\n", hres); - ok (attr == 0,"attr is %d, but should be 0\n", attr); + ok (hres == S_OK,"empty picture get attributes failed with hres 0x%08lx\n", hres); + ok (attr == 0,"attr is %ld, but should be 0\n", attr);
hres = IPicture_get_Handle (pic, &handle); - ok (hres == S_OK,"empty picture get handle failed with hres 0x%08x\n", hres); + ok (hres == S_OK,"empty picture get handle failed with hres 0x%08lx\n", hres); ok (handle == 0, "empty picture get handle did not return 0, but 0x%08x\n", handle); IPicture_Release (pic); IStream_Release (stream); @@ -406,21 +406,21 @@ static void test_empty_image_2(void) { memcpy(data,"lt\0\0",4); ((DWORD*)data)[1] = 0; hres = CreateStreamOnHGlobal (hglob, TRUE, &stream); - ok (hres == S_OK, "CreatestreamOnHGlobal failed? doubt it... hres 0x%08x\n", hres); + ok (hres == S_OK, "CreatestreamOnHGlobal failed? doubt it... hres 0x%08lx\n", hres);
memset(&seekto,0,sizeof(seekto)); seekto.u.LowPart = 42; hres = IStream_Seek(stream,seekto,SEEK_CUR,&newpos1); - ok (hres == S_OK, "istream seek failed? doubt it... hres 0x%08x\n", hres); + ok (hres == S_OK, "istream seek failed? doubt it... hres 0x%08lx\n", hres);
pvObj = NULL; hres = pOleLoadPicture(stream, 8, TRUE, &IID_IPicture, &pvObj); pic = pvObj; - ok(hres == S_OK,"empty picture not loaded, hres 0x%08x\n", hres); + ok(hres == S_OK,"empty picture not loaded, hres 0x%08lx\n", hres); ok(pic != NULL,"empty picture not loaded, pic is NULL\n");
hres = IPicture_get_Type (pic, &type); - ok (hres == S_OK,"empty picture get type failed with hres 0x%08x\n", hres); + ok (hres == S_OK,"empty picture get type failed with hres 0x%08lx\n", hres); ok (type == PICTYPE_NONE,"type is %d, but should be PICTYPE_NONE(0)\n", type);
IPicture_Release (pic); @@ -460,43 +460,43 @@ static void test_Invoke(void) dispparams.cArgs = 1; dispparams.rgvarg = &vararg; hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_HPAL, &IID_IPictureDisp, 0, DISPATCH_PROPERTYPUT, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_UNKNOWNNAME, "IPictureDisp_Invoke should have returned DISP_E_UNKNOWNNAME instead of 0x%08x\n", hr); + ok(hr == DISP_E_UNKNOWNNAME, "IPictureDisp_Invoke should have returned DISP_E_UNKNOWNNAME instead of 0x%08lx\n", hr); hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_HPAL, &IID_IUnknown, 0, DISPATCH_PROPERTYPUT, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_UNKNOWNNAME, "IPictureDisp_Invoke should have returned DISP_E_UNKNOWNNAME instead of 0x%08x\n", hr); + ok(hr == DISP_E_UNKNOWNNAME, "IPictureDisp_Invoke should have returned DISP_E_UNKNOWNNAME instead of 0x%08lx\n", hr);
dispparams.cArgs = 0; dispparams.rgvarg = NULL; hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_HPAL, &IID_NULL, 0, DISPATCH_PROPERTYPUT, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_BADPARAMCOUNT, "IPictureDisp_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08x\n", hr); + ok(hr == DISP_E_BADPARAMCOUNT, "IPictureDisp_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08lx\n", hr);
hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_HPAL, &IID_NULL, 0, DISPATCH_PROPERTYPUT, NULL, NULL, NULL, NULL); - ok(hr == DISP_E_PARAMNOTOPTIONAL, "IPictureDisp_Invoke should have returned DISP_E_PARAMNOTOPTIONAL instead of 0x%08x\n", hr); + ok(hr == DISP_E_PARAMNOTOPTIONAL, "IPictureDisp_Invoke should have returned DISP_E_PARAMNOTOPTIONAL instead of 0x%08lx\n", hr);
hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_HPAL, &IID_NULL, 0, DISPATCH_PROPERTYGET, NULL, NULL, NULL, NULL); - ok(hr == DISP_E_PARAMNOTOPTIONAL, "IPictureDisp_Invoke should have returned DISP_E_PARAMNOTOPTIONAL instead of 0x%08x\n", hr); + ok(hr == DISP_E_PARAMNOTOPTIONAL, "IPictureDisp_Invoke should have returned DISP_E_PARAMNOTOPTIONAL instead of 0x%08lx\n", hr);
hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_HPAL, &IID_NULL, 0, DISPATCH_PROPERTYGET, NULL, &varresult, NULL, NULL); - ok(hr == DISP_E_PARAMNOTOPTIONAL, "IPictureDisp_Invoke should have returned DISP_E_PARAMNOTOPTIONAL instead of 0x%08x\n", hr); + ok(hr == DISP_E_PARAMNOTOPTIONAL, "IPictureDisp_Invoke should have returned DISP_E_PARAMNOTOPTIONAL instead of 0x%08lx\n", hr);
hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_HPAL, &IID_NULL, 0, DISPATCH_PROPERTYGET, &dispparams, &varresult, NULL, NULL); ok_ole_success(hr, "IPictureDisp_Invoke"); ok(V_VT(&varresult) == VT_I4, "V_VT(&varresult) should have been VT_UINT instead of %d\n", V_VT(&varresult));
hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_HPAL, &IID_NULL, 0, DISPATCH_METHOD, &dispparams, &varresult, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "IPictureDisp_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "IPictureDisp_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\n", hr);
hr = IPictureDisp_Invoke(picdisp, 0xdeadbeef, &IID_NULL, 0, DISPATCH_PROPERTYGET, &dispparams, &varresult, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "IPictureDisp_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "IPictureDisp_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\n", hr);
dispparams.cArgs = 1; dispparams.rgvarg = &vararg; hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_HPAL, &IID_NULL, 0, DISPATCH_PROPERTYGET, &dispparams, &varresult, NULL, NULL); - ok(hr == DISP_E_BADPARAMCOUNT, "IPictureDisp_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08x\n", hr); + ok(hr == DISP_E_BADPARAMCOUNT, "IPictureDisp_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08lx\n", hr);
dispparams.cArgs = 1; dispparams.rgvarg = &vararg; hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_HPAL, &IID_NULL, 0, DISPATCH_PROPERTYGET, &dispparams, &varresult, NULL, NULL); - ok(hr == DISP_E_BADPARAMCOUNT, "IPictureDisp_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08x\n", hr); + ok(hr == DISP_E_BADPARAMCOUNT, "IPictureDisp_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08lx\n", hr);
/* DISPID_PICT_RENDER */ hdc = create_render_dc(); @@ -522,18 +522,18 @@ static void test_Invoke(void)
V_VT(&varresult) = VT_EMPTY; hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_RENDER, &GUID_NULL, 0, DISPATCH_METHOD, &dispparams, &varresult, NULL, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* Try with one argument set to VT_I2, it'd still work if coerced. */ V_VT(&args[3]) = VT_I2; hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_RENDER, &GUID_NULL, 0, DISPATCH_METHOD, &dispparams, &varresult, NULL, NULL); - ok(hr == DISP_E_TYPEMISMATCH, "got 0x%08x\n", hr); + ok(hr == DISP_E_TYPEMISMATCH, "got 0x%08lx\n", hr); V_VT(&args[3]) = VT_I4;
/* Wrong argument count */ dispparams.cArgs = 9; hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_RENDER, &GUID_NULL, 0, DISPATCH_METHOD, &dispparams, &varresult, NULL, NULL); - ok(hr == DISP_E_BADPARAMCOUNT, "got 0x%08x\n", hr); + ok(hr == DISP_E_BADPARAMCOUNT, "got 0x%08lx\n", hr);
delete_render_dc(hdc); IPictureDisp_Release(picdisp); @@ -605,22 +605,22 @@ if (0) desc.picType = PICTYPE_UNINITIALIZED; pict = (void *)0xdeadbeef; hr = OleCreatePictureIndirect(&desc, &IID_IPicture, TRUE, (void **)&pict); - ok(hr == E_UNEXPECTED, "got %#x\n", hr); + ok(hr == E_UNEXPECTED, "got %#lx\n", hr); ok(pict == NULL, "got %p\n", pict);
for (i = PICTYPE_UNINITIALIZED; i <= PICTYPE_ENHMETAFILE; i++) { hr = create_picture(i, &pict); - ok(hr == S_OK, "%d: got %#x\n", i, hr); + ok(hr == S_OK, "%d: got %#lx\n", i, hr);
type = 0xdead; hr = IPicture_get_Type(pict, &type); - ok(hr == S_OK, "%d: got %#x\n", i, hr); + ok(hr == S_OK, "%d: got %#lx\n", i, hr); ok(type == i, "%d: got %d\n", i, type);
handle = 0xdeadbeef; hr = IPicture_get_Handle(pict, &handle); - ok(hr == S_OK, "%d: got %#x\n", i, hr); + ok(hr == S_OK, "%d: got %#lx\n", i, hr); if (type == PICTYPE_UNINITIALIZED || type == PICTYPE_NONE) ok(handle == 0, "%d: got %#x\n", i, handle); else @@ -630,20 +630,20 @@ if (0) hr = IPicture_get_hPal(pict, &handle); if (type == PICTYPE_BITMAP) { - ok(hr == S_OK, "%d: got %#x\n", i, hr); + ok(hr == S_OK, "%d: got %#lx\n", i, hr); ok(handle == 0xbeefdead, "%d: got %#x\n", i, handle); } else { - ok(hr == E_FAIL, "%d: got %#x\n", i, hr); + ok(hr == E_FAIL, "%d: got %#lx\n", i, hr); ok(handle == 0xdeadbeef || handle == 0 /* win64 */, "%d: got %#x\n", i, handle); }
hr = IPicture_set_hPal(pict, HandleToUlong(GetStockObject(DEFAULT_PALETTE))); if (type == PICTYPE_BITMAP) - ok(hr == S_OK, "%d: got %#x\n", i, hr); + ok(hr == S_OK, "%d: got %#lx\n", i, hr); else - ok(hr == E_FAIL, "%d: got %#x\n", i, hr); + ok(hr == E_FAIL, "%d: got %#lx\n", i, hr);
IPicture_Release(pict); } @@ -674,13 +674,13 @@ static void test_apm(void) expect_eq(type, PICTYPE_METAFILE, short, "%d");
ole_check(IPicture_get_Height(pict, &cxy)); - expect_eq(cxy, 1667, LONG, "%d"); + expect_eq(cxy, 1667l, LONG, "%ld");
ole_check(IPicture_get_Width(pict, &cxy)); - expect_eq(cxy, 1323, LONG, "%d"); + expect_eq(cxy, 1323l, LONG, "%ld");
ole_check(IPicture_get_KeepOriginalFormat(pict, &keep)); - todo_wine expect_eq(keep, FALSE, LONG, "%d"); + todo_wine expect_eq(keep, (LONG)FALSE, LONG, "%ld");
ole_expect(IPicture_get_hPal(pict, &handle), E_FAIL); IPicture_Release(pict); @@ -730,13 +730,13 @@ static void test_enhmetafile(void) expect_eq(type, PICTYPE_ENHMETAFILE, short, "%d");
ole_check(IPicture_get_Height(pict, &cxy)); - expect_eq(cxy, -23, LONG, "%d"); + expect_eq(cxy, -23l, LONG, "%ld");
ole_check(IPicture_get_Width(pict, &cxy)); - expect_eq(cxy, -25, LONG, "%d"); + expect_eq(cxy, -25l, LONG, "%ld");
ole_check(IPicture_get_KeepOriginalFormat(pict, &keep)); - todo_wine expect_eq(keep, FALSE, LONG, "%d"); + todo_wine expect_eq(keep, (LONG)FALSE, LONG, "%ld");
IPicture_Release(pict); IStream_Release(stream); @@ -783,7 +783,7 @@ static HRESULT picture_render(IPicture *iface, HDC hdc, LONG x, LONG y, LONG cx, V_VT(&ret) = VT_EMPTY; hr_disp = IDispatch_Invoke(disp, DISPID_PICT_RENDER, &GUID_NULL, 0, DISPATCH_METHOD, ¶ms, &ret, NULL, NULL); - ok(hr == hr_disp, "DISPID_PICT_RENDER returned wrong code, 0x%08x, expected 0x%08x\n", + ok(hr == hr_disp, "DISPID_PICT_RENDER returned wrong code, 0x%08lx, expected 0x%08lx\n", hr_disp, hr);
IDispatch_Release(disp); @@ -804,9 +804,9 @@ static void test_Render(void)
/* test IPicture::Render return code on uninitialized picture */ hres = OleCreatePictureIndirect(NULL, &IID_IPicture, TRUE, (void **)&pic); - ok(hres == S_OK, "Failed to create a picture, hr %#x.\n", hres); + ok(hres == S_OK, "Failed to create a picture, hr %#lx.\n", hres); hres = IPicture_get_Type(pic, &type); - ok(hres == S_OK, "IPicture_get_Type does not return S_OK, but 0x%08x\n", hres); + ok(hres == S_OK, "IPicture_get_Type does not return S_OK, but 0x%08lx\n", hres); ok(type == PICTYPE_UNINITIALIZED, "Expected type = PICTYPE_UNINITIALIZED, got = %d\n", type); /* zero dimensions */ hres = picture_render(pic, hdc, 0, 0, 0, 0, 0, 0, 0, 0, NULL); @@ -838,7 +838,7 @@ static void test_Render(void) }
hres = OleCreatePictureIndirect(&desc, &IID_IPicture, TRUE, (void **)&pic); - ok(hres == S_OK, "Failed to create a picture, hr %#x.\n", hres); + ok(hres == S_OK, "Failed to create a picture, hr %#lx.\n", hres); /* zero dimensions, PICTYPE_ICON */ hres = picture_render(pic, hdc, 0, 0, 0, 0, 0, 0, 0, 0, NULL); ole_expect(hres, CTL_E_INVALIDPROPERTYVALUE); @@ -872,13 +872,13 @@ static void test_Render(void) /* Evaluate the rendered Icon */ result = GetPixel(hdc, 0, 0); ok(result == expected, - "Color at 0,0 should be unchanged 0x%06X, but was 0x%06X\n", expected, result); + "Color at 0,0 should be unchanged 0x%06lX, but was 0x%06lX\n", expected, result); result = GetPixel(hdc, 5, 5); ok(result != expected, - "Color at 5,5 should have changed, but still was 0x%06X\n", expected); + "Color at 5,5 should have changed, but still was 0x%06lX\n", expected); result = GetPixel(hdc, 10, 10); ok(result == expected, - "Color at 10,10 should be unchanged 0x%06X, but was 0x%06X\n", expected, result); + "Color at 10,10 should be unchanged 0x%06lX, but was 0x%06lX\n", expected, result);
done: IPicture_Release(pic); @@ -893,9 +893,9 @@ static void test_get_Attributes(void) DWORD attr;
hres = OleCreatePictureIndirect(NULL, &IID_IPicture, TRUE, (void **)&pic); - ok(hres == S_OK, "Failed to create a picture, hr %#x.\n", hres); + ok(hres == S_OK, "Failed to create a picture, hr %#lx.\n", hres); hres = IPicture_get_Type(pic, &type); - ok(hres == S_OK, "IPicture_get_Type does not return S_OK, but 0x%08x\n", hres); + ok(hres == S_OK, "IPicture_get_Type does not return S_OK, but 0x%08lx\n", hres); ok(type == PICTYPE_UNINITIALIZED, "Expected type = PICTYPE_UNINITIALIZED, got = %d\n", type);
hres = IPicture_get_Attributes(pic, NULL); @@ -904,7 +904,7 @@ static void test_get_Attributes(void) attr = 0xdeadbeef; hres = IPicture_get_Attributes(pic, &attr); ole_expect(hres, S_OK); - ok(attr == 0, "IPicture_get_Attributes does not reset attr to zero, got %d\n", attr); + ok(attr == 0, "IPicture_get_Attributes does not reset attr to zero, got %ld\n", attr);
IPicture_Release(pic); } @@ -915,7 +915,7 @@ static void test_get_Handle(void) HRESULT hres;
hres = OleCreatePictureIndirect(NULL, &IID_IPicture, TRUE, (void **)&pic); - ok(hres == S_OK, "Failed to create a picture, hr %#x.\n", hres); + ok(hres == S_OK, "Failed to create a picture, hr %#lx.\n", hres); hres = IPicture_get_Handle(pic, NULL); ole_expect(hres, E_POINTER);
@@ -928,7 +928,7 @@ static void test_get_Type(void) HRESULT hres;
hres = OleCreatePictureIndirect(NULL, &IID_IPicture, TRUE, (void **)&pic); - ok(hres == S_OK, "Failed to create a picture, hr %#x.\n", hres); + ok(hres == S_OK, "Failed to create a picture, hr %#lx.\n", hres);
hres = IPicture_get_Type(pic, NULL); ole_expect(hres, E_POINTER); @@ -972,7 +972,7 @@ static void test_OleLoadPicturePath(void) invalid_parameters[i].riid, (void **)invalid_parameters[i].pic); ok(hres == E_INVALIDARG, - "[%d] Expected OleLoadPicturePath to return E_INVALIDARG, got 0x%08x\n", i, hres); + "[%d] Expected OleLoadPicturePath to return E_INVALIDARG, got 0x%08lx\n", i, hres); ok(pic == (IPicture *)0xdeadbeef, "[%d] Expected output pointer to be 0xdeadbeef, got %p\n", i, pic); } @@ -983,7 +983,7 @@ static void test_OleLoadPicturePath(void) ok(hres == INET_E_UNKNOWN_PROTOCOL || /* XP/Vista+ */ broken(hres == E_UNEXPECTED) || /* NT4 */ broken(hres == E_OUTOFMEMORY), /* Win2k/Win2k3 */ - "Expected OleLoadPicturePath to return INET_E_UNKNOWN_PROTOCOL, got 0x%08x\n", hres); + "Expected OleLoadPicturePath to return INET_E_UNKNOWN_PROTOCOL, got 0x%08lx\n", hres); ok(pic == NULL, "Expected the output interface pointer to be NULL, got %p\n", pic);
@@ -993,7 +993,7 @@ static void test_OleLoadPicturePath(void) ok(hres == INET_E_UNKNOWN_PROTOCOL || /* XP/Vista+ */ broken(hres == E_UNEXPECTED) || /* NT4 */ broken(hres == E_OUTOFMEMORY), /* Win2k/Win2k3 */ - "Expected OleLoadPicturePath to return INET_E_UNKNOWN_PROTOCOL, got 0x%08x\n", hres); + "Expected OleLoadPicturePath to return INET_E_UNKNOWN_PROTOCOL, got 0x%08lx\n", hres); ok(pic == NULL, "Expected the output interface pointer to be NULL, got %p\n", pic);
@@ -1011,7 +1011,7 @@ static void test_OleLoadPicturePath(void) hres = OleLoadPicturePath(temp_fileW + 8, NULL, 0, 0, &IID_IPicture, (void **)&pic); ok(hres == S_OK || broken(hres == E_UNEXPECTED), /* NT4 */ - "Expected OleLoadPicturePath to return S_OK, got 0x%08x\n", hres); + "Expected OleLoadPicturePath to return S_OK, got 0x%08lx\n", hres); if (pic) IPicture_Release(pic);
@@ -1019,7 +1019,7 @@ static void test_OleLoadPicturePath(void) hres = OleLoadPicturePath(temp_fileW, NULL, 0, 0, &IID_IPicture, (void **)&pic); ok(hres == S_OK || broken(hres == E_UNEXPECTED), /* NT4 */ - "Expected OleLoadPicturePath to return S_OK, got 0x%08x\n", hres); + "Expected OleLoadPicturePath to return S_OK, got 0x%08lx\n", hres); if (pic) IPicture_Release(pic);
@@ -1030,13 +1030,13 @@ static void test_OleLoadPicturePath(void) ok(hres == INET_E_RESOURCE_NOT_FOUND || /* XP+ */ broken(hres == E_UNEXPECTED) || /* NT4 */ broken(hres == E_FAIL), /*Win2k */ - "Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08x\n", hres); + "Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08lx\n", hres);
hres = OleLoadPicturePath(temp_fileW, NULL, 0, 0, &IID_IPicture, (void **)&pic); ok(hres == INET_E_RESOURCE_NOT_FOUND || /* XP+ */ broken(hres == E_UNEXPECTED) || /* NT4 */ broken(hres == E_FAIL), /* Win2k */ - "Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08x\n", hres); + "Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08lx\n", hres);
file = CreateFileA(temp_file, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); @@ -1055,7 +1055,7 @@ static void test_OleLoadPicturePath(void) hres = OleLoadPicturePath(temp_fileW, NULL, 0, 0, &IID_IPicture, (void **)&pic); ok(hres == S_OK || broken(hres == E_UNEXPECTED), /* NT4 */ - "Expected OleLoadPicturePath to return S_OK, got 0x%08x\n", hres); + "Expected OleLoadPicturePath to return S_OK, got 0x%08lx\n", hres); if (pic) IPicture_Release(pic);
@@ -1066,7 +1066,7 @@ static void test_OleLoadPicturePath(void) ok(hres == INET_E_RESOURCE_NOT_FOUND || /* XP+ */ broken(hres == E_UNEXPECTED) || /* NT4 */ broken(hres == E_FAIL), /* Win2k */ - "Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08x\n", hres); + "Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08lx\n", hres); }
static void test_himetric(void) @@ -1095,19 +1095,19 @@ static void test_himetric(void)
/* size in himetric units reported rounded up to next integer value */ hr = OleCreatePictureIndirect(&desc, &IID_IPicture, FALSE, (void**)&pic); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
cx = 0; d = MulDiv((INT)(1.9 * GetDeviceCaps(hdc, LOGPIXELSX)), 2540, GetDeviceCaps(hdc, LOGPIXELSX)); hr = IPicture_get_Width(pic, &cx); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(cx == d, "got %d, expected %d\n", cx, d); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(cx == d, "got %ld, expected %d\n", cx, d);
cy = 0; d = MulDiv((INT)(1.9 * GetDeviceCaps(hdc, LOGPIXELSY)), 2540, GetDeviceCaps(hdc, LOGPIXELSY)); hr = IPicture_get_Height(pic, &cy); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(cy == d, "got %d, expected %d\n", cy, d); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(cy == d, "got %ld, expected %d\n", cy, d);
DeleteObject(bmp); IPicture_Release(pic); @@ -1121,19 +1121,19 @@ static void test_himetric(void) desc.u.icon.hicon = icon;
hr = OleCreatePictureIndirect(&desc, &IID_IPicture, FALSE, (void**)&pic); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
cx = 0; d = MulDiv(GetSystemMetrics(SM_CXICON), 2540, GetDeviceCaps(hdc, LOGPIXELSX)); hr = IPicture_get_Width(pic, &cx); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(cx == d, "got %d, expected %d\n", cx, d); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(cx == d, "got %ld, expected %d\n", cx, d);
cy = 0; d = MulDiv(GetSystemMetrics(SM_CYICON), 2540, GetDeviceCaps(hdc, LOGPIXELSY)); hr = IPicture_get_Height(pic, &cy); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(cy == d, "got %d, expected %d\n", cy, d); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(cy == d, "got %ld, expected %d\n", cy, d);
IPicture_Release(pic); DestroyIcon(icon); @@ -1160,55 +1160,55 @@ static void test_load_save_bmp(void) desc.u.bmp.hpal = 0; desc.u.bmp.hbitmap = CreateBitmap(1, 1, 1, 1, NULL); hr = OleCreatePictureIndirect(&desc, &IID_IPicture, FALSE, (void**)&pic); - ok(hr == S_OK, "OleCreatePictureIndirect error %#x\n", hr); + ok(hr == S_OK, "OleCreatePictureIndirect error %#lx\n", hr);
type = -1; hr = IPicture_get_Type(pic, &type); - ok(hr == S_OK,"get_Type error %#8x\n", hr); + ok(hr == S_OK,"get_Type error %#8lx\n", hr); ok(type == PICTYPE_BITMAP,"expected picture type PICTYPE_BITMAP, got %d\n", type);
hr = IPicture_get_Handle(pic, &handle); - ok(hr == S_OK,"get_Handle error %#8x\n", hr); + ok(hr == S_OK,"get_Handle error %#8lx\n", hr); ok(IntToPtr(handle) == desc.u.bmp.hbitmap, "get_Handle returned wrong handle %#x\n", handle);
hmem = GlobalAlloc(GMEM_ZEROINIT, 4096); hr = CreateStreamOnHGlobal(hmem, FALSE, &dst_stream); - ok(hr == S_OK, "createstreamonhglobal error %#x\n", hr); + ok(hr == S_OK, "createstreamonhglobal error %#lx\n", hr);
size = -1; hr = IPicture_SaveAsFile(pic, dst_stream, TRUE, &size); - ok(hr == S_OK, "IPicture_SaveasFile error %#x\n", hr); + ok(hr == S_OK, "IPicture_SaveasFile error %#lx\n", hr); todo_wine - ok(size == 66, "expected 66, got %d\n", size); + ok(size == 66, "expected 66, got %ld\n", size); mem = GlobalLock(hmem); todo_wine - ok(!memcmp(&mem[0], "BM", 2), "got wrong bmp header %04x\n", mem[0]); + ok(!memcmp(&mem[0], "BM", 2), "got wrong bmp header %04lx\n", mem[0]); GlobalUnlock(hmem);
size = -1; hr = IPicture_SaveAsFile(pic, dst_stream, FALSE, &size); todo_wine - ok(hr == E_FAIL, "expected E_FAIL, got %#x\n", hr); + ok(hr == E_FAIL, "expected E_FAIL, got %#lx\n", hr); todo_wine - ok(size == -1, "expected -1, got %d\n", size); + ok(size == -1, "expected -1, got %ld\n", size);
offset.QuadPart = 0; hr = IStream_Seek(dst_stream, offset, SEEK_SET, NULL); - ok(hr == S_OK, "IStream_Seek %#x\n", hr); + ok(hr == S_OK, "IStream_Seek %#lx\n", hr);
hr = IPicture_QueryInterface(pic, &IID_IPersistStream, (void **)&src_stream); - ok(hr == S_OK, "QueryInterface error %#x\n", hr); + ok(hr == S_OK, "QueryInterface error %#lx\n", hr);
hr = IPersistStream_Save(src_stream, dst_stream, TRUE); - ok(hr == S_OK, "Save error %#x\n", hr); + ok(hr == S_OK, "Save error %#lx\n", hr);
IPersistStream_Release(src_stream); IStream_Release(dst_stream);
mem = GlobalLock(hmem); - ok(!memcmp(mem, "lt\0\0", 4), "got wrong stream header %04x\n", mem[0]); - ok(mem[1] == 66, "expected stream size 66, got %u\n", mem[1]); - ok(!memcmp(&mem[2], "BM", 2), "got wrong bmp header %04x\n", mem[2]); + ok(!memcmp(mem, "lt\0\0", 4), "got wrong stream header %04lx\n", mem[0]); + ok(mem[1] == 66, "expected stream size 66, got %lu\n", mem[1]); + ok(!memcmp(&mem[2], "BM", 2), "got wrong bmp header %04lx\n", mem[2]);
GlobalUnlock(hmem); GlobalFree(hmem); @@ -1235,56 +1235,56 @@ static void test_load_save_icon(void) desc.picType = PICTYPE_ICON; desc.u.icon.hicon = LoadIconA(NULL, (LPCSTR)IDI_APPLICATION); hr = OleCreatePictureIndirect(&desc, &IID_IPicture, FALSE, (void**)&pic); - ok(hr == S_OK, "OleCreatePictureIndirect error %#x\n", hr); + ok(hr == S_OK, "OleCreatePictureIndirect error %#lx\n", hr);
type = -1; hr = IPicture_get_Type(pic, &type); - ok(hr == S_OK,"get_Type error %#8x\n", hr); + ok(hr == S_OK,"get_Type error %#8lx\n", hr); ok(type == PICTYPE_ICON,"expected picture type PICTYPE_ICON, got %d\n", type);
hr = IPicture_get_Handle(pic, &handle); - ok(hr == S_OK,"get_Handle error %#8x\n", hr); + ok(hr == S_OK,"get_Handle error %#8lx\n", hr); ok(IntToPtr(handle) == desc.u.icon.hicon, "get_Handle returned wrong handle %#x\n", handle);
hmem = GlobalAlloc(GMEM_ZEROINIT, 8192); hr = CreateStreamOnHGlobal(hmem, FALSE, &dst_stream); - ok(hr == S_OK, "CreateStreamOnHGlobal error %#x\n", hr); + ok(hr == S_OK, "CreateStreamOnHGlobal error %#lx\n", hr);
size = -1; hr = IPicture_SaveAsFile(pic, dst_stream, TRUE, &size); - ok(hr == S_OK, "IPicture_SaveasFile error %#x\n", hr); + ok(hr == S_OK, "IPicture_SaveasFile error %#lx\n", hr); todo_wine - ok(size == 766, "expected 766, got %d\n", size); + ok(size == 766, "expected 766, got %ld\n", size); mem = GlobalLock(hmem); todo_wine - ok(mem[0] == 0x00010000, "got wrong icon header %04x\n", mem[0]); + ok(mem[0] == 0x00010000, "got wrong icon header %04lx\n", mem[0]); GlobalUnlock(hmem);
size = -1; hr = IPicture_SaveAsFile(pic, dst_stream, FALSE, &size); todo_wine - ok(hr == E_FAIL, "expected E_FAIL, got %#x\n", hr); + ok(hr == E_FAIL, "expected E_FAIL, got %#lx\n", hr); todo_wine - ok(size == -1, "expected -1, got %d\n", size); + ok(size == -1, "expected -1, got %ld\n", size);
offset.QuadPart = 0; hr = IStream_Seek(dst_stream, offset, SEEK_SET, NULL); - ok(hr == S_OK, "IStream_Seek %#x\n", hr); + ok(hr == S_OK, "IStream_Seek %#lx\n", hr);
hr = IPicture_QueryInterface(pic, &IID_IPersistStream, (void **)&src_stream); - ok(hr == S_OK, "QueryInterface error %#x\n", hr); + ok(hr == S_OK, "QueryInterface error %#lx\n", hr);
hr = IPersistStream_Save(src_stream, dst_stream, TRUE); - ok(hr == S_OK, "Saveerror %#x\n", hr); + ok(hr == S_OK, "Saveerror %#lx\n", hr);
IPersistStream_Release(src_stream); IStream_Release(dst_stream);
mem = GlobalLock(hmem); - ok(!memcmp(mem, "lt\0\0", 4), "got wrong stream header %04x\n", mem[0]); + ok(!memcmp(mem, "lt\0\0", 4), "got wrong stream header %04lx\n", mem[0]); todo_wine - ok(mem[1] == 766, "expected stream size 766, got %u\n", mem[1]); - ok(mem[2] == 0x00010000, "got wrong icon header %04x\n", mem[2]); + ok(mem[1] == 766, "expected stream size 766, got %lu\n", mem[1]); + ok(mem[2] == 0x00010000, "got wrong icon header %04lx\n", mem[2]);
GlobalUnlock(hmem); GlobalFree(hmem); @@ -1311,43 +1311,43 @@ static void test_load_save_empty_picture(void) desc.cbSizeofstruct = sizeof(desc); desc.picType = PICTYPE_NONE; hr = OleCreatePictureIndirect(&desc, &IID_IPicture, FALSE, (void **)&pic); - ok(hr == S_OK, "OleCreatePictureIndirect error %#x\n", hr); + ok(hr == S_OK, "OleCreatePictureIndirect error %#lx\n", hr);
type = -1; hr = IPicture_get_Type(pic, &type); - ok(hr == S_OK, "get_Type error %#x\n", hr); + ok(hr == S_OK, "get_Type error %#lx\n", hr); ok(type == PICTYPE_NONE,"expected picture type PICTYPE_NONE, got %d\n", type);
handle = (OLE_HANDLE)0xdeadbeef; hr = IPicture_get_Handle(pic, &handle); - ok(hr == S_OK,"get_Handle error %#8x\n", hr); + ok(hr == S_OK,"get_Handle error %#8lx\n", hr); ok(!handle, "get_Handle returned wrong handle %#x\n", handle);
hmem = GlobalAlloc(GMEM_ZEROINIT, 4096); hr = CreateStreamOnHGlobal(hmem, FALSE, &dst_stream); - ok(hr == S_OK, "createstreamonhglobal error %#x\n", hr); + ok(hr == S_OK, "createstreamonhglobal error %#lx\n", hr);
size = -1; hr = IPicture_SaveAsFile(pic, dst_stream, TRUE, &size); - ok(hr == S_OK, "IPicture_SaveasFile error %#x\n", hr); + ok(hr == S_OK, "IPicture_SaveasFile error %#lx\n", hr); todo_wine - ok(size == -1, "expected -1, got %d\n", size); + ok(size == -1, "expected -1, got %ld\n", size);
size = -1; hr = IPicture_SaveAsFile(pic, dst_stream, FALSE, &size); - ok(hr == S_OK, "IPicture_SaveasFile error %#x\n", hr); + ok(hr == S_OK, "IPicture_SaveasFile error %#lx\n", hr); todo_wine - ok(size == -1, "expected -1, got %d\n", size); + ok(size == -1, "expected -1, got %ld\n", size);
hr = IPicture_QueryInterface(pic, &IID_IPersistStream, (void **)&src_stream); - ok(hr == S_OK, "QueryInterface error %#x\n", hr); + ok(hr == S_OK, "QueryInterface error %#lx\n", hr);
hr = IPersistStream_Save(src_stream, dst_stream, TRUE); - ok(hr == S_OK, "Save error %#x\n", hr); + ok(hr == S_OK, "Save error %#lx\n", hr);
mem = GlobalLock(hmem); - ok(!memcmp(mem, "lt\0\0", 4), "got wrong stream header %04x\n", mem[0]); - ok(mem[1] == 0, "expected stream size 0, got %u\n", mem[1]); + ok(!memcmp(mem, "lt\0\0", 4), "got wrong stream header %04lx\n", mem[0]); + ok(mem[1] == 0, "expected stream size 0, got %lu\n", mem[1]); GlobalUnlock(hmem);
IPersistStream_Release(src_stream); @@ -1356,22 +1356,22 @@ static void test_load_save_empty_picture(void) /* first with statable and seekable stream */ offset.QuadPart = 0; hr = IStream_Seek(dst_stream, offset, SEEK_SET, NULL); - ok(hr == S_OK, "IStream_Seek %#x\n", hr); + ok(hr == S_OK, "IStream_Seek %#lx\n", hr);
pic = NULL; hr = pOleLoadPicture(dst_stream, 0, FALSE, &IID_IPicture, (void **)&pic); - ok(hr == S_OK, "OleLoadPicture error %#x\n", hr); + ok(hr == S_OK, "OleLoadPicture error %#lx\n", hr); ok(pic != NULL,"picture should not be not NULL\n"); if (pic != NULL) { type = -1; hr = IPicture_get_Type(pic, &type); - ok(hr == S_OK,"get_Type error %#8x\n", hr); + ok(hr == S_OK,"get_Type error %#8lx\n", hr); ok(type == PICTYPE_NONE,"expected picture type PICTYPE_NONE, got %d\n", type);
handle = (OLE_HANDLE)0xdeadbeef; hr = IPicture_get_Handle(pic, &handle); - ok(hr == S_OK,"get_Handle error %#8x\n", hr); + ok(hr == S_OK,"get_Handle error %#8lx\n", hr); ok(!handle, "get_Handle returned wrong handle %#x\n", handle);
IPicture_Release(pic); @@ -1384,18 +1384,18 @@ static void test_load_save_empty_picture(void)
pic = NULL; hr = pOleLoadPicture(stream, 0, FALSE, &IID_IPicture, (void **)&pic); - ok(hr == S_OK, "OleLoadPicture error %#x\n", hr); + ok(hr == S_OK, "OleLoadPicture error %#lx\n", hr); ok(pic != NULL,"picture should not be not NULL\n"); if (pic != NULL) { type = -1; hr = IPicture_get_Type(pic, &type); - ok(hr == S_OK,"get_Type error %#8x\n", hr); + ok(hr == S_OK,"get_Type error %#8lx\n", hr); ok(type == PICTYPE_NONE,"expected picture type PICTYPE_NONE, got %d\n", type);
handle = (OLE_HANDLE)0xdeadbeef; hr = IPicture_get_Handle(pic, &handle); - ok(hr == S_OK,"get_Handle error %#8x\n", hr); + ok(hr == S_OK,"get_Handle error %#8lx\n", hr); ok(!handle, "get_Handle returned wrong handle %#x\n", handle);
IPicture_Release(pic); diff --git a/dlls/oleaut32/tests/safearray.c b/dlls/oleaut32/tests/safearray.c index a5ddeb82d88..dbbe86994f5 100644 --- a/dlls/oleaut32/tests/safearray.c +++ b/dlls/oleaut32/tests/safearray.c @@ -316,7 +316,7 @@ static void check_for_VT_INT_PTR(void) trace("VT_INT_PTR is supported\n"); has_int_ptr = TRUE; hres = SafeArrayDestroy(a); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); } else { trace("VT_INT_PTR is not supported\n"); @@ -390,7 +390,7 @@ static void test_safearray(void) unsigned char *ptr1, *ptr2;
hres = SafeArrayDestroy( NULL); - ok( hres == S_OK, "SafeArrayDestroy( NULL) returned 0x%x\n", hres); + ok( hres == S_OK, "SafeArrayDestroy( NULL) returned 0x%lx\n", hres);
bound.cElements = 1; bound.lLbound = 0; @@ -403,25 +403,25 @@ static void test_safearray(void) ok(NULL != a,"SAC(VT_I4,1,[0,0]) failed.\n");
hres = SafeArrayGetLBound(a, 1, &l); - ok(hres == S_OK, "SAGLB of 0 size dimensioned array failed with %x\n",hres); - ok(l == 42, "SAGLB of 0 size dimensioned array failed to return 42, but returned %d\n",l); + ok(hres == S_OK, "SAGLB of 0 size dimensioned array failed with %lx\n",hres); + ok(l == 42, "SAGLB of 0 size dimensioned array failed to return 42, but returned %ld\n",l); hres = SafeArrayGetUBound(a, 1, &l); - ok(hres == S_OK, "SAGUB of 0 size dimensioned array failed with %x\n",hres); - ok(l == 41, "SAGUB of 0 size dimensioned array failed to return 41, but returned %d\n",l); + ok(hres == S_OK, "SAGUB of 0 size dimensioned array failed with %lx\n",hres); + ok(l == 41, "SAGUB of 0 size dimensioned array failed to return 41, but returned %ld\n",l);
hres = SafeArrayAccessData(a, &data); - ok(hres == S_OK, "SafeArrayAccessData of 0 size dimensioned array failed with %x\n", hres); + ok(hres == S_OK, "SafeArrayAccessData of 0 size dimensioned array failed with %lx\n", hres); SafeArrayUnaccessData(a);
bound.cElements = 2; hres = SafeArrayRedim(a, &bound); - ok(hres == S_OK,"SAR of a 0 elements dimension failed with hres %x\n", hres); + ok(hres == S_OK,"SAR of a 0 elements dimension failed with hres %lx\n", hres); bound.cElements = 0; hres = SafeArrayRedim(a, &bound); ok(hres == S_OK || hres == E_OUTOFMEMORY, - "SAR to a 0 elements dimension failed with hres %x\n", hres); + "SAR to a 0 elements dimension failed with hres %lx\n", hres); hres = SafeArrayDestroy(a); - ok(hres == S_OK,"SAD of 0 dim array failed with hres %x\n", hres); + ok(hres == S_OK,"SAD of 0 dim array failed with hres %lx\n", hres);
SafeArrayAllocDescriptor(2, &a); a->rgsabound[0].cElements = 2; @@ -430,12 +430,12 @@ static void test_safearray(void) a->rgsabound[1].lLbound = 1; a->cbElements = 2; hres = SafeArrayAllocData(a); - ok(hres == S_OK, "SafeArrayAllocData failed with hres %x\n", hres); + ok(hres == S_OK, "SafeArrayAllocData failed with hres %lx\n", hres);
indices[0] = 4; indices[1] = 2; hres = SafeArrayPtrOfIndex(a, indices, (void **)&ptr1); - ok(hres == S_OK, "SAPOI failed with hres %x\n", hres); + ok(hres == S_OK, "SAPOI failed with hres %lx\n", hres); SafeArrayAccessData(a, (void **)&ptr2); ok(ptr1 - ptr2 == 14, "SAPOI got wrong ptr\n"); *(WORD *)ptr1 = 0x55aa; @@ -463,7 +463,7 @@ static void test_safearray(void) "Data not preserved when resizing array\n");
hres = SafeArrayDestroy(a); - ok(hres == S_OK,"SAD failed with hres %x\n", hres); + ok(hres == S_OK,"SAD failed with hres %lx\n", hres);
bounds[0].cElements = 0; bounds[0].lLbound = 1; bounds[1].cElements = 2; bounds[1].lLbound = 23; @@ -471,14 +471,14 @@ static void test_safearray(void) ok(a != NULL,"SAC(VT_INT32,2,...) with 0 element dim failed.\n");
hres = SafeArrayDestroy(a); - ok(hres == S_OK,"SAD failed with hres %x\n", hres); + ok(hres == S_OK,"SAD failed with hres %lx\n", hres); bounds[0].cElements = 1; bounds[0].lLbound = 1; bounds[1].cElements = 0; bounds[1].lLbound = 23; a = SafeArrayCreate(VT_I4,2,bounds); ok(a != NULL,"SAC(VT_INT32,2,...) with 0 element dim failed.\n");
hres = SafeArrayDestroy(a); - ok(hres == S_OK,"SAD failed with hres %x\n", hres); + ok(hres == S_OK,"SAD failed with hres %lx\n", hres);
bounds[0].cElements = 42; bounds[0].lLbound = 1; bounds[1].cElements = 2; bounds[1].lLbound = 23; @@ -486,26 +486,26 @@ static void test_safearray(void) ok(a != NULL,"SAC(VT_INT32,2,...) failed.\n");
hres = SafeArrayGetLBound (a, 0, &l); - ok (hres == DISP_E_BADINDEX, "SAGLB 0 failed with %x\n", hres); + ok (hres == DISP_E_BADINDEX, "SAGLB 0 failed with %lx\n", hres); hres = SafeArrayGetLBound (a, 1, &l); - ok (hres == S_OK, "SAGLB 1 failed with %x\n", hres); - ok (l == 1, "SAGLB 1 returned %d instead of 1\n", l); + ok (hres == S_OK, "SAGLB 1 failed with %lx\n", hres); + ok (l == 1, "SAGLB 1 returned %ld instead of 1\n", l); hres = SafeArrayGetLBound (a, 2, &l); - ok (hres == S_OK, "SAGLB 2 failed with %x\n", hres); - ok (l == 23, "SAGLB 2 returned %d instead of 23\n", l); + ok (hres == S_OK, "SAGLB 2 failed with %lx\n", hres); + ok (l == 23, "SAGLB 2 returned %ld instead of 23\n", l); hres = SafeArrayGetLBound (a, 3, &l); - ok (hres == DISP_E_BADINDEX, "SAGLB 3 failed with %x\n", hres); + ok (hres == DISP_E_BADINDEX, "SAGLB 3 failed with %lx\n", hres);
hres = SafeArrayGetUBound (a, 0, &l); - ok (hres == DISP_E_BADINDEX, "SAGUB 0 failed with %x\n", hres); + ok (hres == DISP_E_BADINDEX, "SAGUB 0 failed with %lx\n", hres); hres = SafeArrayGetUBound (a, 1, &l); - ok (hres == S_OK, "SAGUB 1 failed with %x\n", hres); - ok (l == 42, "SAGUB 1 returned %d instead of 42\n", l); + ok (hres == S_OK, "SAGUB 1 failed with %lx\n", hres); + ok (l == 42, "SAGUB 1 returned %ld instead of 42\n", l); hres = SafeArrayGetUBound (a, 2, &l); - ok (hres == S_OK, "SAGUB 2 failed with %x\n", hres); - ok (l == 24, "SAGUB 2 returned %d instead of 24\n", l); + ok (hres == S_OK, "SAGUB 2 failed with %lx\n", hres); + ok (l == 24, "SAGUB 2 returned %ld instead of 24\n", l); hres = SafeArrayGetUBound (a, 3, &l); - ok (hres == DISP_E_BADINDEX, "SAGUB 3 failed with %x\n", hres); + ok (hres == DISP_E_BADINDEX, "SAGUB 3 failed with %lx\n", hres);
i = SafeArrayGetDim(a); ok(i == 2, "getdims of 2 din array returned %d\n",i); @@ -513,57 +513,57 @@ static void test_safearray(void) indices[0] = 0; indices[1] = 23; hres = SafeArrayGetElement(a, indices, &i); - ok(DISP_E_BADINDEX == hres,"SAGE failed [0,23], hres 0x%x\n",hres); + ok(DISP_E_BADINDEX == hres,"SAGE failed [0,23], hres 0x%lx\n",hres);
indices[0] = 1; indices[1] = 22; hres = SafeArrayGetElement(a, indices, &i); - ok(DISP_E_BADINDEX == hres,"SAGE failed [1,22], hres 0x%x\n",hres); + ok(DISP_E_BADINDEX == hres,"SAGE failed [1,22], hres 0x%lx\n",hres);
indices[0] = 1; indices[1] = 23; hres = SafeArrayGetElement(a, indices, &i); - ok(S_OK == hres,"SAGE failed [1,23], hres 0x%x\n",hres); + ok(S_OK == hres,"SAGE failed [1,23], hres 0x%lx\n",hres);
indices[0] = 1; indices[1] = 25; hres = SafeArrayGetElement(a, indices, &i); - ok(DISP_E_BADINDEX == hres,"SAGE failed [1,24], hres 0x%x\n",hres); + ok(DISP_E_BADINDEX == hres,"SAGE failed [1,24], hres 0x%lx\n",hres);
indices[0] = 3; indices[1] = 23; hres = SafeArrayGetElement(a, indices, &i); - ok(S_OK == hres,"SAGE failed [42,23], hres 0x%x\n",hres); + ok(S_OK == hres,"SAGE failed [42,23], hres 0x%lx\n",hres);
hres = SafeArrayAccessData(a, (void**)&ptr1); - ok(S_OK == hres, "SAAD failed with 0x%x\n", hres); + ok(S_OK == hres, "SAAD failed with 0x%lx\n", hres);
indices[0] = 3; indices[1] = 23; hres = SafeArrayPtrOfIndex(a, indices, (void**)&ptr2); - ok(S_OK == hres,"SAPOI failed [1,23], hres 0x%x\n",hres); + ok(S_OK == hres,"SAPOI failed [1,23], hres 0x%lx\n",hres); diff = ptr2 - ptr1; ok(diff == 8,"ptr difference is not 8, but %d (%p vs %p)\n", diff, ptr2, ptr1);
indices[0] = 3; indices[1] = 24; hres = SafeArrayPtrOfIndex(a, indices, (void**)&ptr2); - ok(S_OK == hres,"SAPOI failed [5,24], hres 0x%x\n",hres); + ok(S_OK == hres,"SAPOI failed [5,24], hres 0x%lx\n",hres); diff = ptr2 - ptr1; ok(diff == 176,"ptr difference is not 176, but %d (%p vs %p)\n", diff, ptr2, ptr1);
indices[0] = 20; indices[1] = 23; hres = SafeArrayPtrOfIndex(a, indices, (void**)&ptr2); - ok(S_OK == hres,"SAPOI failed [20,23], hres 0x%x\n",hres); + ok(S_OK == hres,"SAPOI failed [20,23], hres 0x%lx\n",hres); diff = ptr2 - ptr1; ok(diff == 76,"ptr difference is not 76, but %d (%p vs %p)\n", diff, ptr2, ptr1);
hres = SafeArrayUnaccessData(a); - ok(S_OK == hres, "SAUAD failed with 0x%x\n", hres); + ok(S_OK == hres, "SAUAD failed with 0x%lx\n", hres);
hres = SafeArrayDestroy(a); - ok(hres == S_OK,"SAD failed with hres %x\n", hres); + ok(hres == S_OK,"SAD failed with hres %lx\n", hres);
for (i = 0; i < ARRAY_SIZE(vttypes); i++) { if ((i == VT_I8 || i == VT_UI8) && has_i8) @@ -575,7 +575,7 @@ static void test_safearray(void)
ok((!a && !vttypes[i].elemsize) || (a && vttypes[i].elemsize == a->cbElements), - "SAC(%d,1,[1,0]), %p result %d, expected %d\n", + "SAC(%d,1,[1,0]), %p result %ld, expected %d\n", vttypes[i].vt,a,(a?a->cbElements:0),vttypes[i].elemsize);
if (a) @@ -594,37 +594,37 @@ static void test_safearray(void) if (pSafeArrayGetVartype) { hres = pSafeArrayGetVartype(a, &vt); - ok(hres == S_OK, "SAGVT of arra y with vt %d failed with %x\n", vttypes[i].vt, hres); + ok(hres == S_OK, "SAGVT of arra y with vt %d failed with %lx\n", vttypes[i].vt, hres); /* Windows prior to Vista returns VT_UNKNOWN instead of VT_DISPATCH */ ok(broken(vt == VT_UNKNOWN) || vt == vttypes[i].vt, "SAGVT of array with vt %d returned %d\n", vttypes[i].vt, vt); }
hres = SafeArrayCopy(a, &c); - ok(hres == S_OK, "failed to copy safearray of vt %d with hres %x\n", vttypes[i].vt, hres); + ok(hres == S_OK, "failed to copy safearray of vt %d with hres %lx\n", vttypes[i].vt, hres);
- ok(vttypes[i].elemsize == c->cbElements,"copy of SAC(%d,1,[1,0]), result %d, expected %d\n",vttypes[i].vt,(c?c->cbElements:0),vttypes[i].elemsize + ok(vttypes[i].elemsize == c->cbElements,"copy of SAC(%d,1,[1,0]), result %ld, expected %d\n",vttypes[i].vt,(c?c->cbElements:0),vttypes[i].elemsize ); ok(c->fFeatures == (vttypes[i].expflags | vttypes[i].addflags),"SAC of %d returned feature flags %x, expected %x\n", vttypes[i].vt, c->fFeatures, vttypes[i].expflags|vttypes[i].addflags); ok(SafeArrayGetElemsize(c) == vttypes[i].elemsize,"SAGE for vt %d returned elemsize %d instead of expected %d\n",vttypes[i].vt, SafeArrayGetElemsize(c),vttypes[i].elemsize);
if (pSafeArrayGetVartype) { hres = pSafeArrayGetVartype(c, &vt); - ok(hres == S_OK, "SAGVT of array with vt %d failed with %x\n", vttypes[i].vt, hres); + ok(hres == S_OK, "SAGVT of array with vt %d failed with %lx\n", vttypes[i].vt, hres); /* Windows prior to Vista returns VT_UNKNOWN instead of VT_DISPATCH */ ok(broken(vt == VT_UNKNOWN) || vt == vttypes[i].vt, "SAGVT of array with vt %d returned %d\n", vttypes[i].vt, vt); }
hres = SafeArrayCopyData(a, c); - ok(hres == S_OK, "failed to copy safearray data of vt %d with hres %x\n", vttypes[i].vt, hres); + ok(hres == S_OK, "failed to copy safearray data of vt %d with hres %lx\n", vttypes[i].vt, hres);
hres = SafeArrayDestroyData(c); - ok(hres == S_OK,"SADD of copy of array with vt %d failed with hres %x\n", vttypes[i].vt, hres); + ok(hres == S_OK,"SADD of copy of array with vt %d failed with hres %lx\n", vttypes[i].vt, hres);
hres = SafeArrayDestroy(c); - ok(hres == S_OK,"SAD failed with hres %x\n", hres); + ok(hres == S_OK,"SAD failed with hres %lx\n", hres);
hres = SafeArrayDestroy(a); - ok(hres == S_OK,"SAD of array with vt %d failed with hres %x\n", vttypes[i].vt, hres); + ok(hres == S_OK,"SAD of array with vt %d failed with hres %lx\n", vttypes[i].vt, hres); }
/* Test conversion of type|VT_ARRAY <-> VT_BSTR */ @@ -638,7 +638,7 @@ static void test_safearray(void) V_VT(&v) = VT_ARRAY|VT_UI1; V_ARRAY(&v) = a; hres = VariantChangeTypeEx(&v, &v, 0, 0, VT_BSTR); - ok(hres==S_OK, "CTE VT_ARRAY|VT_UI1 -> VT_BSTR failed with %x\n",hres); + ok(hres==S_OK, "CTE VT_ARRAY|VT_UI1 -> VT_BSTR failed with %lx\n",hres); ok(V_VT(&v) == VT_BSTR,"CTE VT_ARRAY|VT_UI1 -> VT_BSTR did not return VT_BSTR, but %d.v\n",V_VT(&v)); ok(V_BSTR(&v)[0] == 0x6548,"First letter are not 'He', but %x\n", V_BSTR(&v)[0]); VariantClear(&v); @@ -647,7 +647,7 @@ static void test_safearray(void) V_VT(&v) = VT_BSTR; V_BSTR(&v) = SysAllocStringLen(NULL, 0); hres = VariantChangeTypeEx(&d, &v, 0, 0, VT_UI1|VT_ARRAY); - ok(hres==S_OK, "CTE VT_BSTR -> VT_UI1|VT_ARRAY failed with %x\n",hres); + ok(hres==S_OK, "CTE VT_BSTR -> VT_UI1|VT_ARRAY failed with %lx\n",hres); ok(V_VT(&d) == (VT_UI1|VT_ARRAY),"CTE BSTR -> VT_UI1|VT_ARRAY did not return VT_UI1|VT_ARRAY, but %d.v\n",V_VT(&v)); VariantClear(&v); VariantClear(&d); @@ -657,16 +657,16 @@ static void test_safearray(void) ok(a!=NULL,"SAC should not fail\n");
hres = SafeArrayAccessData(a, &data); - ok(hres == S_OK,"SAAD failed with hres %x\n",hres); + ok(hres == S_OK,"SAAD failed with hres %lx\n",hres);
hres = SafeArrayDestroy(a); - ok(hres == DISP_E_ARRAYISLOCKED,"locked safe array destroy not failed with DISP_E_ARRAYISLOCKED, but with hres %x\n", hres); + ok(hres == DISP_E_ARRAYISLOCKED,"locked safe array destroy not failed with DISP_E_ARRAYISLOCKED, but with hres %lx\n", hres);
hres = SafeArrayDestroyData(a); - ok(hres == DISP_E_ARRAYISLOCKED,"locked safe array destroy data not failed with DISP_E_ARRAYISLOCKED, but with hres %x\n", hres); + ok(hres == DISP_E_ARRAYISLOCKED,"locked safe array destroy data not failed with DISP_E_ARRAYISLOCKED, but with hres %lx\n", hres);
hres = SafeArrayDestroyDescriptor(a); - ok(hres == DISP_E_ARRAYISLOCKED,"locked safe array destroy descriptor not failed with DISP_E_ARRAYISLOCKED, but with hres %x\n", hres); + ok(hres == DISP_E_ARRAYISLOCKED,"locked safe array destroy descriptor not failed with DISP_E_ARRAYISLOCKED, but with hres %lx\n", hres);
hres = SafeArrayUnaccessData(a); ok(hres == S_OK,"SAUD failed after lock/destroy test\n"); @@ -678,7 +678,7 @@ static void test_safearray(void) a = SafeArrayCreate(VT_I4, 1, &bound); ok(a!=NULL,"SAC should not fail\n"); hres = SafeArrayDestroyDescriptor(a); - ok(hres == S_OK,"SADD with data in array failed with hres %x\n",hres); + ok(hres == S_OK,"SADD with data in array failed with hres %lx\n",hres);
/* IID functions */ /* init a small stack safearray */ @@ -686,16 +686,16 @@ static void test_safearray(void) b.cDims = 1; memset(&iid, 0x42, sizeof(IID)); hres = SafeArraySetIID(&b, &iid); - ok(hres == E_INVALIDARG, "Unexpected ret value %#x.\n", hres); + ok(hres == E_INVALIDARG, "Unexpected ret value %#lx.\n", hres);
hres = SafeArrayAllocDescriptor(1, &a); - ok(hres == S_OK, "Failed to allocate array descriptor, hr %#x.\n", hres); + ok(hres == S_OK, "Failed to allocate array descriptor, hr %#lx.\n", hres); ok((a->fFeatures & FADF_HAVEIID) == 0, "Unexpected features mask %#x.\n", a->fFeatures); hres = SafeArraySetIID(a, &iid); - ok(hres == E_INVALIDARG, "Unexpected ret value %#x.\n", hres); + ok(hres == E_INVALIDARG, "Unexpected ret value %#lx.\n", hres);
hres = SafeArrayDestroyDescriptor(a); - ok(hres == S_OK,"SADD failed with hres %x\n",hres); + ok(hres == S_OK,"SADD failed with hres %lx\n",hres);
if (!pSafeArrayAllocDescriptorEx) return; @@ -703,11 +703,11 @@ static void test_safearray(void) for (i = 0; i < ARRAY_SIZE(vttypes); i++) { a = NULL; hres = pSafeArrayAllocDescriptorEx(vttypes[i].vt,1,&a); - ok(hres == S_OK, "SafeArrayAllocDescriptorEx gave hres 0x%x\n", hres); + ok(hres == S_OK, "SafeArrayAllocDescriptorEx gave hres 0x%lx\n", hres); ok(a->fFeatures == vttypes[i].expflags,"SAADE(%d) resulted with flags %x, expected %x\n", vttypes[i].vt, a->fFeatures, vttypes[i].expflags); if (a->fFeatures & FADF_HAVEIID) { hres = SafeArrayGetIID(a, &iid); - ok(hres == S_OK,"SAGIID failed for vt %d with hres %x\n", vttypes[i].vt,hres); + ok(hres == S_OK,"SAGIID failed for vt %d with hres %lx\n", vttypes[i].vt,hres); switch (vttypes[i].vt) { case VT_UNKNOWN: ok(IsEqualGUID(((GUID*)a)-1,&IID_IUnknown),"guid for VT_UNKNOWN is not IID_IUnknown\n"); @@ -723,17 +723,17 @@ static void test_safearray(void) } } else { hres = SafeArrayGetIID(a, &iid); - ok(hres == E_INVALIDARG,"SAGIID did not fail for vt %d with hres %x\n", vttypes[i].vt,hres); + ok(hres == E_INVALIDARG,"SAGIID did not fail for vt %d with hres %lx\n", vttypes[i].vt,hres); } if (a->fFeatures & FADF_RECORD) { ok(vttypes[i].vt == VT_RECORD,"FADF_RECORD for non record %d\n",vttypes[i].vt); } if (a->fFeatures & FADF_HAVEVARTYPE) { - ok(vttypes[i].vt == ((DWORD*)a)[-1], "FADF_HAVEVARTYPE set, but vt %d mismatch stored %d\n",vttypes[i].vt,((DWORD*)a)[-1]); + ok(vttypes[i].vt == ((DWORD*)a)[-1], "FADF_HAVEVARTYPE set, but vt %d mismatch stored %ld\n",vttypes[i].vt,((DWORD*)a)[-1]); }
hres = pSafeArrayGetVartype(a, &vt); - ok(hres == S_OK, "SAGVT of array with vt %d failed with %x\n", vttypes[i].vt, hres); + ok(hres == S_OK, "SAGVT of array with vt %d failed with %lx\n", vttypes[i].vt, hres);
if (vttypes[i].vt == VT_DISPATCH) { /* Special case. Checked against Windows. */ @@ -744,16 +744,16 @@ static void test_safearray(void)
if (a->fFeatures & FADF_HAVEIID) { hres = SafeArraySetIID(a, &IID_IStorage); /* random IID */ - ok(hres == S_OK,"SASIID failed with FADF_HAVEIID set for vt %d with %x\n", vttypes[i].vt, hres); + ok(hres == S_OK,"SASIID failed with FADF_HAVEIID set for vt %d with %lx\n", vttypes[i].vt, hres); hres = SafeArrayGetIID(a, &iid); - ok(hres == S_OK,"SAGIID failed with FADF_HAVEIID set for vt %d with %x\n", vttypes[i].vt, hres); + ok(hres == S_OK,"SAGIID failed with FADF_HAVEIID set for vt %d with %lx\n", vttypes[i].vt, hres); ok(IsEqualGUID(&iid, &IID_IStorage),"returned iid is not IID_IStorage\n"); } else { hres = SafeArraySetIID(a, &IID_IStorage); /* random IID */ - ok(hres == E_INVALIDARG,"SASIID did not failed with !FADF_HAVEIID set for vt %d with %x\n", vttypes[i].vt, hres); + ok(hres == E_INVALIDARG,"SASIID did not failed with !FADF_HAVEIID set for vt %d with %lx\n", vttypes[i].vt, hres); } hres = SafeArrayDestroyDescriptor(a); - ok(hres == S_OK,"SADD failed with hres %x\n",hres); + ok(hres == S_OK,"SADD failed with hres %lx\n",hres); } }
@@ -765,23 +765,23 @@ static void test_SafeArrayAllocDestroyDescriptor(void)
/* Failure cases */ hres = SafeArrayAllocDescriptor(0, &sa); - ok(hres == E_INVALIDARG, "0 dimensions gave hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "0 dimensions gave hres 0x%lx\n", hres);
hres = SafeArrayAllocDescriptor(65536, &sa); - ok(hres == E_INVALIDARG, "65536 dimensions gave hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "65536 dimensions gave hres 0x%lx\n", hres);
if (0) { /* Crashes on 95: XP & Wine return E_POINTER */ hres=SafeArrayAllocDescriptor(1, NULL); - ok(hres == E_POINTER,"NULL parm gave hres 0x%x\n", hres); + ok(hres == E_POINTER,"NULL parm gave hres 0x%lx\n", hres); }
/* Test up to the dimension boundary case */ for (i = 5; i <= 65535; i += 30) { hres = SafeArrayAllocDescriptor(i, &sa); - ok(hres == S_OK, "%d dimensions failed; hres 0x%x\n", i, hres); + ok(hres == S_OK, "%d dimensions failed; hres 0x%lx\n", i, hres);
if (hres == S_OK) { @@ -789,7 +789,7 @@ static void test_SafeArrayAllocDestroyDescriptor(void) SafeArrayGetDim(sa), i);
hres = SafeArrayDestroyDescriptor(sa); - ok(hres == S_OK, "destroy failed; hres 0x%x\n", hres); + ok(hres == S_OK, "destroy failed; hres 0x%lx\n", hres); } }
@@ -797,25 +797,25 @@ static void test_SafeArrayAllocDestroyDescriptor(void) return;
hres = pSafeArrayAllocDescriptorEx(VT_UI1, 0, &sa); - ok(hres == E_INVALIDARG, "0 dimensions gave hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "0 dimensions gave hres 0x%lx\n", hres);
hres = pSafeArrayAllocDescriptorEx(VT_UI1, 65536, &sa); - ok(hres == E_INVALIDARG, "65536 dimensions gave hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "65536 dimensions gave hres 0x%lx\n", hres);
hres = pSafeArrayAllocDescriptorEx(VT_UI1, 1, NULL); - ok(hres == E_POINTER,"NULL parm gave hres 0x%x\n", hres); + ok(hres == E_POINTER,"NULL parm gave hres 0x%lx\n", hres);
hres = pSafeArrayAllocDescriptorEx(-1, 1, &sa); - ok(hres == S_OK, "VT = -1 gave hres 0x%x\n", hres); + ok(hres == S_OK, "VT = -1 gave hres 0x%lx\n", hres);
sa->rgsabound[0].cElements = 0; sa->rgsabound[0].lLbound = 1;
hres = SafeArrayAllocData(sa); - ok(hres == S_OK, "SafeArrayAllocData gave hres 0x%x\n", hres); + ok(hres == S_OK, "SafeArrayAllocData gave hres 0x%lx\n", hres);
hres = SafeArrayDestroy(sa); - ok(hres == S_OK,"SafeArrayDestroy failed with hres %x\n",hres); + ok(hres == S_OK,"SafeArrayDestroy failed with hres %lx\n",hres); }
static void test_SafeArrayCreateLockDestroy(void) @@ -868,7 +868,7 @@ static void test_SafeArrayCreateLockDestroy(void) "VARTYPE %d (@%d dimensions) cDims is %d, expected %d\n", vt, dimension, SafeArrayGetDim(sa), dimension); ok(SafeArrayGetElemsize(sa) == dwLen || vt == VT_R8, - "VARTYPE %d (@%d dimensions) cbElements is %d, expected %d\n", + "VARTYPE %d (@%d dimensions) cbElements is %d, expected %ld\n", vt, dimension, SafeArrayGetElemsize(sa), dwLen);
if (vt != VT_UNKNOWN && vt != VT_DISPATCH) @@ -876,7 +876,7 @@ static void test_SafeArrayCreateLockDestroy(void) ok((sa->fFeatures & FADF_HAVEIID) == 0, "Non interface type should not have FADF_HAVEIID\n"); hres = SafeArraySetIID(sa, &IID_IUnknown); - ok(hres == E_INVALIDARG, "Unexpected ret value %#x.\n", hres); + ok(hres == E_INVALIDARG, "Unexpected ret value %#lx.\n", hres); if (vt != VT_RECORD) { VARTYPE aVt; @@ -887,7 +887,7 @@ static void test_SafeArrayCreateLockDestroy(void) { hres = pSafeArrayGetVartype(sa, &aVt); ok(hres == S_OK && aVt == vt, - "Non interface type %d: bad type %d, hres %x\n", vt, aVt, hres); + "Non interface type %d: bad type %d, hres %lx\n", vt, aVt, hres); } } } @@ -895,32 +895,32 @@ static void test_SafeArrayCreateLockDestroy(void) { ok(sa->fFeatures & FADF_HAVEIID, "Interface type should have FADF_HAVEIID\n"); hres = SafeArraySetIID(sa, &IID_IUnknown); - ok(hres == S_OK, "Failed to set array IID, hres %#x.\n", hres); + ok(hres == S_OK, "Failed to set array IID, hres %#lx.\n", hres); ok((sa->fFeatures & FADF_HAVEVARTYPE) == 0, "Interface type %d should not have FADF_HAVEVARTYPE\n", vt); }
hres = SafeArrayLock(sa); - ok(hres == S_OK, "Lock VARTYPE %d (@%d dimensions) failed; hres 0x%x\n", + ok(hres == S_OK, "Lock VARTYPE %d (@%d dimensions) failed; hres 0x%lx\n", vt, dimension, hres);
if (hres == S_OK) { hres = SafeArrayDestroy(sa); - ok(hres == DISP_E_ARRAYISLOCKED,"Destroy() got hres %x\n", hres); + ok(hres == DISP_E_ARRAYISLOCKED,"Destroy() got hres %lx\n", hres);
hres = SafeArrayDestroyData(sa); - ok(hres == DISP_E_ARRAYISLOCKED,"DestroyData() got hres %x\n", hres); + ok(hres == DISP_E_ARRAYISLOCKED,"DestroyData() got hres %lx\n", hres);
hres = SafeArrayDestroyDescriptor(sa); - ok(hres == DISP_E_ARRAYISLOCKED,"DestroyDescriptor() got hres %x\n", hres); + ok(hres == DISP_E_ARRAYISLOCKED,"DestroyDescriptor() got hres %lx\n", hres);
hres = SafeArrayUnlock(sa); - ok(hres == S_OK, "Unlock VARTYPE %d (@%d dims) hres 0x%x\n", + ok(hres == S_OK, "Unlock VARTYPE %d (@%d dims) hres 0x%lx\n", vt, dimension, hres);
hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "destroy VARTYPE %d (@%d dims) hres 0x%x\n", + ok(hres == S_OK, "destroy VARTYPE %d (@%d dims) hres 0x%lx\n", vt, dimension, hres); } } @@ -939,7 +939,7 @@ static void test_VectorCreateLockDestroy(void) ok(sa != NULL, "SACV with 0 elements failed.\n");
hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "SafeArrayDestroy failed with hres %x\n",hres); + ok(hres == S_OK, "SafeArrayDestroy failed with hres %lx\n",hres);
/* Test all VARTYPES in different lengths */ for (element = 1; element <= 101; element += 10) @@ -960,21 +960,21 @@ static void test_VectorCreateLockDestroy(void) ok(SafeArrayGetDim(sa) == 1, "VARTYPE %d (@%d elements) cDims %d, not 1\n", vt, element, SafeArrayGetDim(sa)); ok(SafeArrayGetElemsize(sa) == dwLen, - "VARTYPE %d (@%d elements) cbElements is %d, expected %d\n", + "VARTYPE %d (@%d elements) cbElements is %d, expected %ld\n", vt, element, SafeArrayGetElemsize(sa), dwLen);
hres = SafeArrayLock(sa); - ok(hres == S_OK, "Lock VARTYPE %d (@%d elements) failed; hres 0x%x\n", + ok(hres == S_OK, "Lock VARTYPE %d (@%d elements) failed; hres 0x%lx\n", vt, element, hres);
if (hres == S_OK) { hres = SafeArrayUnlock(sa); - ok(hres == S_OK, "Unlock VARTYPE %d (@%d elements) failed; hres 0x%x\n", + ok(hres == S_OK, "Unlock VARTYPE %d (@%d elements) failed; hres 0x%lx\n", vt, element, hres);
hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "destroy VARTYPE %d (@%d elements) failed; hres 0x%x\n", + ok(hres == S_OK, "destroy VARTYPE %d (@%d elements) failed; hres 0x%lx\n", vt, element, hres); } } @@ -992,9 +992,9 @@ static void test_LockUnlock(void)
/* Failure cases */ hres = SafeArrayLock(NULL); - ok(hres == E_INVALIDARG, "Lock NULL array hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "Lock NULL array hres 0x%lx\n", hres); hres = SafeArrayUnlock(NULL); - ok(hres == E_INVALIDARG, "Lock NULL array hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "Lock NULL array hres 0x%lx\n", hres);
for (dimension = 0; dimension < ARRAY_SIZE(sab); dimension++) { @@ -1011,24 +1011,24 @@ test_LockUnlock_Vector: int count = 0;
hres = SafeArrayUnlock(sa); - ok (hres == E_UNEXPECTED, "Bad %sUnlock gave hres 0x%x\n", + ok (hres == E_UNEXPECTED, "Bad %sUnlock gave hres 0x%lx\n", bVector ? "vector " : "\n", hres);
while ((hres = SafeArrayLock(sa)) == S_OK) count++; - ok (count == 65535 && hres == E_UNEXPECTED, "Lock %sfailed at %d; hres 0x%x\n", + ok (count == 65535 && hres == E_UNEXPECTED, "Lock %sfailed at %d; hres 0x%lx\n", bVector ? "vector " : "\n", count, hres);
if (count == 65535 && hres == E_UNEXPECTED) { while ((hres = SafeArrayUnlock(sa)) == S_OK) count--; - ok (count == 0 && hres == E_UNEXPECTED, "Unlock %sfailed at %d; hres 0x%x\n", + ok (count == 0 && hres == E_UNEXPECTED, "Unlock %sfailed at %d; hres 0x%lx\n", bVector ? "vector " : "\n", count, hres); }
hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); }
if (bVector == FALSE) @@ -1089,14 +1089,14 @@ static void test_SafeArrayGetPutElement(void) indices[3] = sab[3].lLbound;
hres = SafeArrayPutElement(NULL, indices, &value); - ok(hres == E_INVALIDARG, "Put NULL array hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "Put NULL array hres 0x%lx\n", hres); hres = SafeArrayGetElement(NULL, indices, &value); - ok(hres == E_INVALIDARG, "Get NULL array hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "Get NULL array hres 0x%lx\n", hres);
hres = SafeArrayPutElement(sa, NULL, &value); - ok(hres == E_INVALIDARG, "Put NULL indices hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "Put NULL indices hres 0x%lx\n", hres); hres = SafeArrayGetElement(sa, NULL, &value); - ok(hres == E_INVALIDARG, "Get NULL indices hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "Get NULL indices hres 0x%lx\n", hres);
if (0) { @@ -1104,11 +1104,11 @@ static void test_SafeArrayGetPutElement(void) * except the following, which crashes. We ERR this in Wine. */ hres = SafeArrayPutElement(sa, indices, NULL); - ok(hres == E_INVALIDARG, "Put NULL value hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "Put NULL value hres 0x%lx\n", hres); }
hres = SafeArrayGetElement(sa, indices, NULL); - ok(hres == E_INVALIDARG, "Get NULL value hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "Get NULL value hres 0x%lx\n", hres);
value = 0;
@@ -1128,7 +1128,7 @@ static void test_SafeArrayGetPutElement(void) { indices[3] = sab[3].lLbound + a; hres = SafeArrayPutElement(sa, indices, &value); - ok(hres == S_OK, "Failed to put element at (%d,%d,%d,%d) hres 0x%x\n", + ok(hres == S_OK, "Failed to put element at (%d,%d,%d,%d) hres 0x%lx\n", x, y, z, a, hres); value++; } @@ -1152,7 +1152,7 @@ static void test_SafeArrayGetPutElement(void) indices[3] = sab[3].lLbound + a; gotvalue = value / 3; hres = SafeArrayGetElement(sa, indices, &gotvalue); - ok(hres == S_OK, "Failed to get element at (%d,%d,%d,%d) hres 0x%x\n", + ok(hres == S_OK, "Failed to get element at (%d,%d,%d,%d) hres 0x%lx\n", x, y, z, a, hres); if (hres == S_OK) ok(value == gotvalue, "Got value %d instead of %d at (%d,%d,%d,%d)\n", @@ -1163,7 +1163,7 @@ static void test_SafeArrayGetPutElement(void) } } hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
/* VT_RECORD array */ irec = IRecordInfoImpl_Construct(); @@ -1174,23 +1174,23 @@ static void test_SafeArrayGetPutElement(void)
sa = pSafeArrayCreateEx(VT_RECORD, 1, sab, &irec->IRecordInfo_iface); ok(sa != NULL, "failed to create array\n"); - ok(irec->ref == 2, "got %d\n", irec->ref); + ok(irec->ref == 2, "got %ld\n", irec->ref);
index = 0; irec->recordcopy = 0; hres = SafeArrayPutElement(sa, &index, (void*)0xdeadbeef); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(irec->recordcopy == 1, "got %d\n", irec->recordcopy);
index = 0; irec->recordcopy = 0; hres = SafeArrayGetElement(sa, &index, (void*)0xdeadbeef); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(irec->recordcopy == 1, "got %d\n", irec->recordcopy);
hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(irec->ref == 1, "got %d\n", irec->ref); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(irec->ref == 1, "got %ld\n", irec->ref); IRecordInfo_Release(&irec->IRecordInfo_iface); }
@@ -1217,14 +1217,14 @@ static void test_SafeArrayGetPutElement_BSTR(void) value = SysAllocString(szTest); ok (value != NULL, "Expected non-NULL\n"); hres = SafeArrayPutElement(sa, indices, value); - ok(hres == S_OK, "Failed to put bstr element hres 0x%x\n", hres); + ok(hres == S_OK, "Failed to put bstr element hres 0x%lx\n", hres); gotvalue = NULL; hres = SafeArrayGetElement(sa, indices, &gotvalue); - ok(hres == S_OK, "Failed to get bstr element at hres 0x%x\n", hres); + ok(hres == S_OK, "Failed to get bstr element at hres 0x%lx\n", hres); if (hres == S_OK) ok(SysStringLen(value) == SysStringLen(gotvalue), "Got len %d instead of %d\n", SysStringLen(gotvalue), SysStringLen(value)); hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); SysFreeString(value); SysFreeString(gotvalue); } @@ -1278,16 +1278,16 @@ static void test_SafeArrayGetPutElement_IUnknown(void) indices[0] = sab.lLbound; xtunk.ref = 1; hres = SafeArrayPutElement(sa, indices, &xtunk.IUnknown_iface); - ok(hres == S_OK, "Failed to put bstr element hres 0x%x\n", hres); + ok(hres == S_OK, "Failed to put bstr element hres 0x%lx\n", hres); ok(xtunk.ref == 2,"Failed to increment refcount of iface.\n"); gotvalue = NULL; hres = SafeArrayGetElement(sa, indices, &gotvalue); ok(xtunk.ref == 3,"Failed to increment refcount of iface.\n"); - ok(hres == S_OK, "Failed to get bstr element at hres 0x%x\n", hres); + ok(hres == S_OK, "Failed to get bstr element at hres 0x%lx\n", hres); if (hres == S_OK) ok(gotvalue == &xtunk.IUnknown_iface, "Got %p instead of %p\n", gotvalue, &xtunk.IUnknown_iface); hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(xtunk.ref == 2,"Failed to decrement refcount of iface.\n"); }
@@ -1310,14 +1310,14 @@ static void test_SafeArrayRedim_IUnknown(void) indices[0] = 2; xtunk.ref = 1; hres = SafeArrayPutElement(sa, indices, &xtunk.IUnknown_iface); - ok(hres == S_OK, "Failed to put IUnknown element hres 0x%x\n", hres); + ok(hres == S_OK, "Failed to put IUnknown element hres 0x%lx\n", hres); ok(xtunk.ref == 2,"Failed to increment refcount of iface.\n"); sab.cElements = 1; hres = SafeArrayRedim(sa, &sab); - ok(hres == S_OK, "Failed to shrink array hres 0x%x\n", hres); + ok(hres == S_OK, "Failed to shrink array hres 0x%lx\n", hres); ok(xtunk.ref == 1, "Failed to decrement refcount\n"); hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); }
static void test_SafeArrayGetPutElement_VARIANT(void) @@ -1341,22 +1341,22 @@ static void test_SafeArrayGetPutElement_VARIANT(void) V_VT(&value) = VT_I4; V_I4(&value) = 0x42424242; hres = SafeArrayPutElement(sa, indices, &value); - ok(hres == S_OK, "Failed to put Variant I4 element hres 0x%x\n", hres); + ok(hres == S_OK, "Failed to put Variant I4 element hres 0x%lx\n", hres);
V_VT(&gotvalue) = 0xdead; hres = SafeArrayGetElement(sa, indices, &gotvalue); - ok(hres == S_OK, "Failed to get variant element at hres 0x%x\n", hres); + ok(hres == S_OK, "Failed to get variant element at hres 0x%lx\n", hres);
V_VT(&gotvalue) = VT_EMPTY; hres = SafeArrayGetElement(sa, indices, &gotvalue); - ok(hres == S_OK, "Failed to get variant element at hres 0x%x\n", hres); + ok(hres == S_OK, "Failed to get variant element at hres 0x%lx\n", hres); if (hres == S_OK) { ok(V_VT(&value) == V_VT(&gotvalue), "Got type 0x%x instead of 0x%x\n", V_VT(&value), V_VT(&gotvalue)); if (V_VT(&value) == V_VT(&gotvalue)) - ok(V_I4(&value) == V_I4(&gotvalue), "Got %d instead of %d\n", V_I4(&value), V_VT(&gotvalue)); + ok(V_I4(&value) == V_I4(&gotvalue), "Got %ld instead of %d\n", V_I4(&value), V_VT(&gotvalue)); } hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); }
static void test_SafeArrayCopyData(void) @@ -1392,7 +1392,7 @@ static void test_SafeArrayCopyData(void) }
hres = SafeArrayCopyData(sa, sacopy); - ok(hres == S_OK, "copy data failed hres 0x%x\n", hres); + ok(hres == S_OK, "copy data failed hres 0x%lx\n", hres); if (hres == S_OK) { ok(!memcmp(sa->pvData, sacopy->pvData, size * sizeof(int)), "compared different\n"); @@ -1400,41 +1400,41 @@ static void test_SafeArrayCopyData(void)
/* Failure cases */ hres = SafeArrayCopyData(NULL, sacopy); - ok(hres == E_INVALIDARG, "Null copy source hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "Null copy source hres 0x%lx\n", hres); hres = SafeArrayCopyData(sa, NULL); - ok(hres == E_INVALIDARG, "Null copy hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "Null copy hres 0x%lx\n", hres);
sacopy->rgsabound[0].cElements += 1; hres = SafeArrayCopyData(sa, sacopy); - ok(hres == E_INVALIDARG, "Bigger copy first dimension hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "Bigger copy first dimension hres 0x%lx\n", hres);
sacopy->rgsabound[0].cElements -= 2; hres = SafeArrayCopyData(sa, sacopy); - ok(hres == E_INVALIDARG, "Smaller copy first dimension hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "Smaller copy first dimension hres 0x%lx\n", hres); sacopy->rgsabound[0].cElements += 1;
sacopy->rgsabound[3].cElements += 1; hres = SafeArrayCopyData(sa, sacopy); - ok(hres == E_INVALIDARG, "Bigger copy last dimension hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "Bigger copy last dimension hres 0x%lx\n", hres);
sacopy->rgsabound[3].cElements -= 2; hres = SafeArrayCopyData(sa, sacopy); - ok(hres == E_INVALIDARG, "Smaller copy last dimension hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "Smaller copy last dimension hres 0x%lx\n", hres); sacopy->rgsabound[3].cElements += 1;
hres = SafeArrayDestroy(sacopy); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); sacopy = NULL; hres = SafeArrayCopyData(sa, sacopy); - ok(hres == E_INVALIDARG, "->Null copy hres 0x%x\n", hres); + ok(hres == E_INVALIDARG, "->Null copy hres 0x%lx\n", hres);
hres = SafeArrayCopy(sa, &sacopy); - ok(hres == S_OK, "copy failed hres 0x%x\n", hres); + ok(hres == S_OK, "copy failed hres 0x%lx\n", hres); ok(SafeArrayGetElemsize(sa) == SafeArrayGetElemsize(sacopy),"elemsize wrong\n"); ok(SafeArrayGetDim(sa) == SafeArrayGetDim(sacopy),"dimensions wrong\n"); ok(!memcmp(sa->pvData, sacopy->pvData, size * sizeof(int)), "compared different\n"); hres = SafeArrayDestroy(sacopy); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
sacopy = SafeArrayCreate(VT_INT, ARRAY_SIZE(sab), sab); ok(sacopy != NULL, "Copy test couldn't create copy array\n"); @@ -1447,15 +1447,15 @@ static void test_SafeArrayCopyData(void)
sa->fFeatures |= feature; hres = SafeArrayCopyData(sa, sacopy); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(sacopy->fFeatures == orig && orig == FADF_HAVEVARTYPE, "got features 0x%04x\n", sacopy->fFeatures); sa->fFeatures &= ~feature; }
hres = SafeArrayDestroy(sacopy); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
/* copy data from a vector */ sa = SafeArrayCreateVector(VT_UI1, 0, 2); @@ -1468,7 +1468,7 @@ static void test_SafeArrayCopyData(void) broken(sacopy->fFeatures == FADF_CREATEVECTOR /* W2k */), "got 0x%08x\n", sacopy->fFeatures); hres = SafeArrayCopyData(sa, sacopy); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(sacopy->fFeatures == (FADF_HAVEVARTYPE|FADF_CREATEVECTOR) || broken(sacopy->fFeatures == FADF_CREATEVECTOR /* W2k */), "got 0x%04x\n", sacopy->fFeatures); @@ -1478,7 +1478,7 @@ static void test_SafeArrayCopyData(void) ok(sacopy != NULL, "Copy test couldn't create copy array\n"); ok(sacopy->fFeatures == FADF_HAVEVARTYPE, "0x%04x\n", sacopy->fFeatures); hres = SafeArrayCopyData(sa, sacopy); - ok(hres == E_INVALIDARG, "got 0x%08x\n", hres); + ok(hres == E_INVALIDARG, "got 0x%08lx\n", hres); SafeArrayDestroy(sacopy);
SafeArrayDestroy(sa); @@ -1517,14 +1517,14 @@ static void test_SafeArrayCreateEx(void) GUID guid;
hres = SafeArrayGetIID(sa, &guid); - ok(hres == S_OK, "Failed to get array IID, hres %#x.\n", hres); + ok(hres == S_OK, "Failed to get array IID, hres %#lx.\n", hres); ok(IsEqualGUID(&guid, &IID_ITypeInfo), "CreateEx (ITypeInfo) bad IID\n"); hres = SafeArraySetIID(sa, &IID_IUnknown); - ok(hres == S_OK, "Failed to set IID, hres = %8x\n", hres); + ok(hres == S_OK, "Failed to set IID, hres = %8lx\n", hres); hres = SafeArrayGetIID(sa, &guid); ok(hres == S_OK && IsEqualGUID(&guid, &IID_IUnknown), "Set bad IID\n"); hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); }
sa = pSafeArrayCreateEx(VT_DISPATCH, 1, sab, NULL); @@ -1535,10 +1535,10 @@ static void test_SafeArrayCreateEx(void) GUID guid;
hres = SafeArrayGetIID(sa, &guid); - ok(hres == S_OK, "Failed to get array IID, hres %#x.\n", hres); + ok(hres == S_OK, "Failed to get array IID, hres %#lx.\n", hres); ok(IsEqualGUID(&guid, &IID_IDispatch), "CreateEx (NULL) bad IID\n"); hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); }
sa = pSafeArrayCreateEx(VT_UNKNOWN, 1, sab, NULL); @@ -1549,10 +1549,10 @@ static void test_SafeArrayCreateEx(void) GUID guid;
hres = SafeArrayGetIID(sa, &guid); - ok(hres == S_OK, "Failed to get array IID, hres %#x.\n", hres); + ok(hres == S_OK, "Failed to get array IID, hres %#lx.\n", hres); ok(IsEqualGUID(&guid, &IID_IUnknown), "CreateEx (NULL-Unk) bad IID\n"); hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); }
/* VT_RECORD failure case */ @@ -1565,16 +1565,16 @@ static void test_SafeArrayCreateEx(void) fail_GetSize = TRUE; sa = pSafeArrayCreateEx(VT_RECORD, 1, sab, &iRec->IRecordInfo_iface); ok(sa != NULL, "CreateEx (Fail Size) failed\n"); - ok(iRec->ref == START_REF_COUNT + 1, "Wrong iRec refcount %d\n", iRec->ref); + ok(iRec->ref == START_REF_COUNT + 1, "Wrong iRec refcount %ld\n", iRec->ref); ok(iRec->sizeCalled == 1, "GetSize called %d times\n", iRec->sizeCalled); ok(iRec->clearCalled == 0, "Clear called %d times\n", iRec->clearCalled); if (sa) { - ok(sa->cbElements == RECORD_SIZE_FAIL, "Altered size to %d\n", sa->cbElements); + ok(sa->cbElements == RECORD_SIZE_FAIL, "Altered size to %ld\n", sa->cbElements); hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(iRec->clearCalled == sab[0].cElements, "Destroy->Clear called %d times\n", iRec->clearCalled); - ok(iRec->ref == START_REF_COUNT, "got %d, expected %d\n", iRec->ref, START_REF_COUNT); + ok(iRec->ref == START_REF_COUNT, "got %ld, expected %d\n", iRec->ref, START_REF_COUNT); }
/* Test VT_RECORD array */ @@ -1584,7 +1584,7 @@ static void test_SafeArrayCreateEx(void) iRec->clearCalled = 0; sa = pSafeArrayCreateEx(VT_RECORD, 1, sab, &iRec->IRecordInfo_iface); ok(sa != NULL, "CreateEx (Rec) failed\n"); - ok(iRec->ref == START_REF_COUNT + 1, "Wrong iRec refcount %d\n", iRec->ref); + ok(iRec->ref == START_REF_COUNT + 1, "Wrong iRec refcount %ld\n", iRec->ref); ok(iRec->sizeCalled == 1, "GetSize called %d times\n", iRec->sizeCalled); ok(iRec->clearCalled == 0, "Clear called %d times\n", iRec->clearCalled); if (sa && pSafeArrayGetRecordInfo) @@ -1595,10 +1595,10 @@ static void test_SafeArrayCreateEx(void) hres = pSafeArrayGetRecordInfo(sa, &saRec); ok(hres == S_OK,"GRI failed\n"); ok(saRec == &iRec->IRecordInfo_iface, "Different saRec\n"); - ok(iRec->ref == START_REF_COUNT + 2, "Didn't AddRef %d\n", iRec->ref); + ok(iRec->ref == START_REF_COUNT + 2, "Didn't AddRef %ld\n", iRec->ref); IRecordInfo_Release(saRec);
- ok(sa->cbElements == RECORD_SIZE,"Elemsize is %d\n", sa->cbElements); + ok(sa->cbElements == RECORD_SIZE,"Elemsize is %ld\n", sa->cbElements);
/* try to copy record based arrays */ sacopy = pSafeArrayCreateEx(VT_RECORD, 1, sab, &iRec->IRecordInfo_iface); @@ -1606,25 +1606,25 @@ static void test_SafeArrayCreateEx(void) iRec->clearCalled = 0; /* array copy code doesn't explicitly clear a record */ hres = SafeArrayCopyData(sa, sacopy); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(iRec->recordcopy == sab[0].cElements, "got %d\n", iRec->recordcopy); ok(iRec->clearCalled == 0, "got %d\n", iRec->clearCalled);
hres = SafeArrayDestroy(sacopy); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
iRec->clearCalled = 0; iRec->sizeCalled = 0; hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(iRec->sizeCalled == 0, "Destroy->GetSize called %d times\n", iRec->sizeCalled); ok(iRec->clearCalled == sab[0].cElements, "Destroy->Clear called %d times\n", iRec->clearCalled); - ok(iRec->ref == START_REF_COUNT, "Wrong iRec refcount %d\n", iRec->ref); + ok(iRec->ref == START_REF_COUNT, "Wrong iRec refcount %ld\n", iRec->ref); } else { hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); }
IRecordInfo_Release(&iRec->IRecordInfo_iface); @@ -1648,7 +1648,7 @@ static void test_SafeArrayClear(void) V_VT(&v) = VT_ARRAY|VT_UI1; V_ARRAY(&v) = sa; hres = VariantClear(&v); - ok(hres == S_OK && V_VT(&v) == VT_EMPTY, "VariantClear: hres 0x%x, Type %d\n", hres, V_VT(&v)); + ok(hres == S_OK && V_VT(&v) == VT_EMPTY, "VariantClear: hres 0x%lx, Type %d\n", hres, V_VT(&v)); ok(V_ARRAY(&v) == sa, "VariantClear: Overwrote value\n");
sa = SafeArrayCreate(VT_UI1, 1, &sab); @@ -1659,15 +1659,15 @@ static void test_SafeArrayClear(void) V_VT(&v) = VT_SAFEARRAY; V_ARRAY(&v) = sa; hres = VariantClear(&v); - ok(hres == DISP_E_BADVARTYPE, "VariantClear: hres 0x%x\n", hres); + ok(hres == DISP_E_BADVARTYPE, "VariantClear: hres 0x%lx\n", hres);
V_VT(&v) = VT_SAFEARRAY|VT_BYREF; V_ARRAYREF(&v) = &sa; hres = VariantClear(&v); - ok(hres == DISP_E_BADVARTYPE, "VariantClear: hres 0x%x\n", hres); + ok(hres == DISP_E_BADVARTYPE, "VariantClear: hres 0x%lx\n", hres);
hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); }
static void test_SafeArrayCopy(void) @@ -1692,7 +1692,7 @@ static void test_SafeArrayCopy(void)
hres = VariantCopy(&vDst, &vSrc); ok(hres == S_OK && V_VT(&vDst) == (VT_ARRAY|VT_BYREF|VT_UI1), - "VariantCopy: hres 0x%x, Type %d\n", hres, V_VT(&vDst)); + "VariantCopy: hres 0x%lx, Type %d\n", hres, V_VT(&vDst)); ok(V_ARRAYREF(&vDst) == &sa, "VariantClear: Performed deep copy\n");
V_VT(&vSrc) = (VT_ARRAY|VT_UI1); @@ -1701,50 +1701,50 @@ static void test_SafeArrayCopy(void)
hres = VariantCopy(&vDst, &vSrc); ok(hres == S_OK && V_VT(&vDst) == (VT_ARRAY|VT_UI1), - "VariantCopy: hres 0x%x, Type %d\n", hres, V_VT(&vDst)); + "VariantCopy: hres 0x%lx, Type %d\n", hres, V_VT(&vDst)); ok(V_ARRAY(&vDst) != sa, "VariantClear: Performed shallow copy\n");
hres = SafeArrayDestroy(V_ARRAY(&vSrc)); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); hres = SafeArrayDestroy(V_ARRAY(&vDst)); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = SafeArrayAllocDescriptor(1, &sa); - ok(hres == S_OK, "SafeArrayAllocDescriptor failed with error 0x%08x\n", hres); + ok(hres == S_OK, "SafeArrayAllocDescriptor failed with error 0x%08lx\n", hres);
sa->cbElements = 16; hres = SafeArrayCopy(sa, &sa2); - ok(hres == S_OK, "SafeArrayCopy failed with error 0x%08x\n", hres); + ok(hres == S_OK, "SafeArrayCopy failed with error 0x%08lx\n", hres); ok(sa != sa2, "SafeArrayCopy performed shallow copy\n");
hres = SafeArrayDestroy(sa2); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
sa2 = (void*)0xdeadbeef; hres = SafeArrayCopy(NULL, &sa2); - ok(hres == S_OK, "SafeArrayCopy failed with error 0x%08x\n", hres); + ok(hres == S_OK, "SafeArrayCopy failed with error 0x%08lx\n", hres); ok(!sa2, "SafeArrayCopy didn't return NULL for output array\n");
hres = SafeArrayAllocDescriptor(1, &sa); - ok(hres == S_OK, "SafeArrayAllocDescriptor failed with error 0x%08x\n", hres); + ok(hres == S_OK, "SafeArrayAllocDescriptor failed with error 0x%08lx\n", hres);
sa2 = (void*)0xdeadbeef; hres = SafeArrayCopy(sa, &sa2); ok(hres == E_INVALIDARG, - "SafeArrayCopy with empty array should have failed with error E_INVALIDARG instead of 0x%08x\n", + "SafeArrayCopy with empty array should have failed with error E_INVALIDARG instead of 0x%08lx\n", hres); ok(!sa2, "SafeArrayCopy didn't return NULL for output array\n");
hres = SafeArrayDestroy(sa2); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
/* test feature copy */ hres = SafeArrayAllocDescriptor(1, &sa); - ok(hres == S_OK, "SafeArrayAllocDescriptor failed with error 0x%08x\n", hres); + ok(hres == S_OK, "SafeArrayAllocDescriptor failed with error 0x%08lx\n", hres); ok(sa->fFeatures == 0, "got src features 0x%04x\n", sa->fFeatures); sa->cbElements = 16;
@@ -1754,10 +1754,10 @@ static void test_SafeArrayCopy(void)
sa->fFeatures |= feature; hres = SafeArrayCopy(sa, &sa2); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(sa2->fFeatures == 0, "got features 0x%04x\n", sa2->fFeatures); hres = SafeArrayDestroy(sa2); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); sa->fFeatures &= ~feature; }
@@ -1769,7 +1769,7 @@ static void test_SafeArrayCopy(void) broken(sa->fFeatures == FADF_CREATEVECTOR /* W2k */), "got 0x%08x\n", sa->fFeatures); hres = SafeArrayCopy(sa, &sa2); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(sa2->fFeatures == FADF_HAVEVARTYPE || broken(!sa2->fFeatures /* W2k */), "got 0x%04x\n", sa2->fFeatures); @@ -1801,7 +1801,7 @@ static void test_SafeArrayChangeTypeEx(void) memcpy(sa->pvData, szHello, strlen(szHello)+1);
hres = VariantChangeTypeEx(&v2, &v, 0, 0, VT_BSTR); - ok(hres == S_OK, "CTE VT_ARRAY|VT_UI1 -> VT_BSTR failed with %x\n", hres); + ok(hres == S_OK, "CTE VT_ARRAY|VT_UI1 -> VT_BSTR failed with %lx\n", hres); if (hres == S_OK) { ok(V_VT(&v2) == VT_BSTR, "CTE VT_ARRAY|VT_UI1 -> VT_BSTR did not return VT_BSTR, but %d.\n",V_VT(&v2)); @@ -1812,7 +1812,7 @@ static void test_SafeArrayChangeTypeEx(void)
/* VT_VECTOR|VT_UI1 -> VT_BSTR */ hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
sa = SafeArrayCreateVector(VT_UI1, 0, strlen(szHello)+1); ok(sa != NULL, "CreateVector() failed.\n"); @@ -1825,12 +1825,12 @@ static void test_SafeArrayChangeTypeEx(void) VariantInit(&v2);
hres = VariantChangeTypeEx(&v2, &v, 0, 0, VT_BSTR); - ok(hres == DISP_E_BADVARTYPE, "CTE VT_VECTOR|VT_UI1 returned %x\n", hres); + ok(hres == DISP_E_BADVARTYPE, "CTE VT_VECTOR|VT_UI1 returned %lx\n", hres);
/* (vector)VT_ARRAY|VT_UI1 -> VT_BSTR (In place) */ V_VT(&v) = VT_ARRAY|VT_UI1; hres = VariantChangeTypeEx(&v, &v, 0, 0, VT_BSTR); - ok(hres == S_OK, "CTE VT_ARRAY|VT_UI1 -> VT_BSTR failed with %x\n", hres); + ok(hres == S_OK, "CTE VT_ARRAY|VT_UI1 -> VT_BSTR failed with %lx\n", hres); if (hres == S_OK) { ok(V_VT(&v) == VT_BSTR, "CTE VT_ARRAY|VT_UI1 -> VT_BSTR did not return VT_BSTR, but %d.\n",V_VT(&v)); @@ -1857,14 +1857,14 @@ static void test_SafeArrayChangeTypeEx(void) hres = VariantChangeTypeEx(&v2, &v, 0, 0, VT_BSTR); if (vt == VT_INT_PTR || vt == VT_UINT_PTR) { - ok(hres == DISP_E_BADVARTYPE, "expected DISP_E_BADVARTYPE, got 0x%08x\n", hres); + ok(hres == DISP_E_BADVARTYPE, "expected DISP_E_BADVARTYPE, got 0x%08lx\n", hres); SafeArrayDestroy(sa); } else { - ok(hres == DISP_E_TYPEMISMATCH, "got 0x%08x for vt=%d, instead of DISP_E_TYPEMISMATCH\n", hres, vt); + ok(hres == DISP_E_TYPEMISMATCH, "got 0x%08lx for vt=%d, instead of DISP_E_TYPEMISMATCH\n", hres, vt); hres = VariantClear(&v); - ok(hres == S_OK, "expected S_OK, got 0x%08x\n", hres); + ok(hres == S_OK, "expected S_OK, got 0x%08lx\n", hres); } VariantClear(&v2); } @@ -1880,11 +1880,11 @@ static void test_SafeArrayChangeTypeEx(void) V_VT(&v) = VT_ARRAY|VT_UI1; V_ARRAY(&v) = sa; hres = VariantChangeTypeEx(&v2, &v, 0, 0, VT_ARRAY|VT_I1); - ok(hres == DISP_E_TYPEMISMATCH, "CTE VT_ARRAY|VT_UI1->VT_ARRAY|VT_I1 returned %x\n", hres); + ok(hres == DISP_E_TYPEMISMATCH, "CTE VT_ARRAY|VT_UI1->VT_ARRAY|VT_I1 returned %lx\n", hres);
/* But can change to the same array type */ hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); sa = SafeArrayCreateVector(VT_UI1, 0, 1); ok(sa != NULL, "CreateVector() failed.\n"); if (!sa) @@ -1892,19 +1892,19 @@ static void test_SafeArrayChangeTypeEx(void) V_VT(&v) = VT_ARRAY|VT_UI1; V_ARRAY(&v) = sa; hres = VariantChangeTypeEx(&v2, &v, 0, 0, VT_ARRAY|VT_UI1); - ok(hres == S_OK, "CTE VT_ARRAY|VT_UI1->VT_ARRAY|VT_UI1 returned %x\n", hres); + ok(hres == S_OK, "CTE VT_ARRAY|VT_UI1->VT_ARRAY|VT_UI1 returned %lx\n", hres); hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); VariantClear(&v2);
/* NULL/EMPTY */ MKARRAY(0,1,VT_UI1); hres = VariantChangeTypeEx(&v2, &v, 0, 0, VT_NULL); - ok(hres == DISP_E_TYPEMISMATCH, "CTE VT_ARRAY|VT_UI1 returned %x\n", hres); + ok(hres == DISP_E_TYPEMISMATCH, "CTE VT_ARRAY|VT_UI1 returned %lx\n", hres); VariantClear(&v); MKARRAY(0,1,VT_UI1); hres = VariantChangeTypeEx(&v2, &v, 0, 0, VT_EMPTY); - ok(hres == DISP_E_TYPEMISMATCH, "CTE VT_ARRAY|VT_UI1 returned %x\n", hres); + ok(hres == DISP_E_TYPEMISMATCH, "CTE VT_ARRAY|VT_UI1 returned %lx\n", hres); VariantClear(&v); }
@@ -1931,7 +1931,7 @@ static void test_SafeArrayDestroyData (void) features = (sa->fFeatures |= FADF_STATIC); temp_pvData = sa->pvData; hres = SafeArrayDestroyData(sa); - ok(hres == S_OK, "SADData FADF_STATIC failed, error code %x.\n",hres); + ok(hres == S_OK, "SADData FADF_STATIC failed, error code %lx.\n",hres); ok(features == sa->fFeatures, "got 0x%x\n", sa->fFeatures); ok(sa->pvData == temp_pvData, "SADData FADF_STATIC: pvData=%p, expected %p (fFeatures = %d).\n", sa->pvData, temp_pvData, sa->fFeatures); @@ -1941,12 +1941,12 @@ static void test_SafeArrayDestroyData (void) /* Clear FADF_STATIC, now really destroy the data. */ features = (sa->fFeatures ^= FADF_STATIC); hres = SafeArrayDestroyData(sa); - ok(hres == S_OK, "SADData !FADF_STATIC failed, error code %x.\n",hres); + ok(hres == S_OK, "SADData !FADF_STATIC failed, error code %lx.\n",hres); ok(features == sa->fFeatures, "got 0x%x\n", sa->fFeatures); ok(sa->pvData == NULL, "SADData !FADF_STATIC: pvData=%p, expected NULL.\n", sa->pvData);
hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "SAD failed, error code %x.\n", hres); + ok(hres == S_OK, "SAD failed, error code %lx.\n", hres);
/* two dimensions */ sab[0].lLbound = 0; @@ -1960,33 +1960,33 @@ static void test_SafeArrayDestroyData (void)
features = sa->fFeatures; hres = SafeArrayDestroyData(sa); - ok(hres == S_OK, "got 0x%08x\n",hres); + ok(hres == S_OK, "got 0x%08lx\n",hres); ok(features == sa->fFeatures, "got 0x%x\n", sa->fFeatures);
SafeArrayDestroy(sa);
/* try to destroy data from descriptor */ hres = SafeArrayAllocDescriptor(1, &sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(sa->fFeatures == 0, "got 0x%x\n", sa->fFeatures);
hres = SafeArrayDestroyData(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(sa->fFeatures == 0, "got 0x%x\n", sa->fFeatures);
hres = SafeArrayDestroyDescriptor(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = SafeArrayAllocDescriptor(2, &sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(sa->fFeatures == 0, "got 0x%x\n", sa->fFeatures);
hres = SafeArrayDestroyData(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(sa->fFeatures == 0, "got 0x%x\n", sa->fFeatures);
hres = SafeArrayDestroyDescriptor(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
/* vector case */ sa = SafeArrayCreateVector(VT_I4, 0, 10); @@ -1995,7 +1995,7 @@ static void test_SafeArrayDestroyData (void)
ok(sa->pvData != NULL, "got %p\n", sa->pvData); hres = SafeArrayDestroyData(sa); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); todo_wine ok(sa->fFeatures == FADF_HAVEVARTYPE, "got 0x%x\n", sa->fFeatures); todo_wine @@ -2027,26 +2027,26 @@ static void test_safearray_layout(void) ok(IsEqualIID(guidptr, &IID_IUnknown), "got %s\n", wine_dbgstr_guid(guidptr));
hr = SafeArraySetIID(sa, &IID_IDispatch); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(IsEqualIID(guidptr, &IID_IDispatch), "got %s\n", wine_dbgstr_guid(guidptr));
memcpy(guidptr, &IID_IUnknown, sizeof(GUID)); hr = SafeArrayGetIID(sa, &guid); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(IsEqualIID(&guid, &IID_IUnknown), "got %s\n", wine_dbgstr_guid(&guid));
hr = SafeArrayDestroy(sa); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* VARTYPE field */ sa = SafeArrayCreate(VT_UI1, 1, &sab); ok(sa != NULL, "got %p\n", sa);
dwptr = (DWORD*)sa - 1; - ok(*dwptr == VT_UI1, "got %d\n", *dwptr); + ok(*dwptr == VT_UI1, "got %ld\n", *dwptr);
hr = SafeArrayDestroy(sa); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* IRecordInfo pointer */ irec = IRecordInfoImpl_Construct(); @@ -2059,7 +2059,7 @@ static void test_safearray_layout(void) ok(record == &irec->IRecordInfo_iface, "got %p\n", record);
hr = SafeArrayDestroy(sa); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IRecordInfo_Release(&irec->IRecordInfo_iface); }
diff --git a/dlls/oleaut32/tests/tmarshal.c b/dlls/oleaut32/tests/tmarshal.c index 3c9d9a98a84..a61b1637c5e 100644 --- a/dlls/oleaut32/tests/tmarshal.c +++ b/dlls/oleaut32/tests/tmarshal.c @@ -30,11 +30,11 @@
#include "tmarshal.h"
-#define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error 0x%08x\n", hr) +#define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error %#08lx\n", hr) static inline void release_iface_(unsigned int line, void *iface) { ULONG ref = IUnknown_Release((IUnknown *)iface); - ok_(__FILE__, line)(!ref, "Got outstanding refcount %d.\n", ref); + ok_(__FILE__, line)(!ref, "Got outstanding refcount %ld.\n", ref); if (ref == 1) IUnknown_Release((IUnknown *)iface); } #define release_iface(a) release_iface_(__LINE__, a) @@ -169,7 +169,7 @@ static void release_host_object(DWORD tid) static void end_host_object(DWORD tid, HANDLE thread) { BOOL ret = PostThreadMessageA(tid, WM_QUIT, 0, 0); - ok(ret, "PostThreadMessage failed with error %d\n", GetLastError()); + ok(ret, "PostThreadMessage failed with error %ld\n", GetLastError()); /* be careful of races - don't return until hosting thread has terminated */ WaitForSingleObject(thread, INFINITE); CloseHandle(thread); @@ -199,8 +199,8 @@ static DWORD WINAPI ExternalConnection_AddConnection(IExternalConnection *iface, { trace("add connection\n");
- ok(extconn == EXTCONN_STRONG, "extconn = %d\n", extconn); - ok(!reserved, "reserved = %x\n", reserved); + ok(extconn == EXTCONN_STRONG, "extconn = %ld\n", extconn); + ok(!reserved, "reserved = %lx\n", reserved); return ++external_connections; }
@@ -209,8 +209,8 @@ static DWORD WINAPI ExternalConnection_ReleaseConnection(IExternalConnection *if { trace("release connection\n");
- ok(extconn == EXTCONN_STRONG, "extconn = %d\n", extconn); - ok(!reserved, "reserved = %x\n", reserved); + ok(extconn == EXTCONN_STRONG, "extconn = %ld\n", extconn); + ok(!reserved, "reserved = %lx\n", reserved);
ok(fLastReleaseCloses == expect_last_release_closes, "fLastReleaseCloses = %x, expected %x\n", fLastReleaseCloses, expect_last_release_closes); @@ -816,7 +816,7 @@ static HRESULT WINAPI Widget_DoSomething( ok(number == 3.141, "number(%f) != 3.141\n", number); ok(*str2 == '\0', "str2(%s) != ""\n", wine_dbgstr_w(str2)); ok(V_VT(opt) == VT_ERROR, "V_VT(opt) should be VT_ERROR instead of 0x%x\n", V_VT(opt)); - ok(V_ERROR(opt) == DISP_E_PARAMNOTFOUND, "V_ERROR(opt) should be DISP_E_PARAMNOTFOUND instead of 0x%08x\n", V_ERROR(opt)); + ok(V_ERROR(opt) == DISP_E_PARAMNOTFOUND, "V_ERROR(opt) should be DISP_E_PARAMNOTFOUND instead of 0x%08lx\n", V_ERROR(opt)); *str1 = SysAllocString(szString);
return S_FALSE; @@ -853,7 +853,7 @@ static HRESULT WINAPI Widget_SetOleColor( IWidget * iface, OLE_COLOR val) { - trace("SetOleColor(0x%x)\n", val); + trace("SetOleColor(0x%lx)\n", val); return S_OK; }
@@ -923,24 +923,24 @@ static HRESULT WINAPI Widget_VarArg( trace("VarArg(%p)\n", values);
hr = SafeArrayGetLBound(values, 1, &lbound); - ok(hr == S_OK, "SafeArrayGetLBound failed with %x\n", hr); - ok(lbound == 0, "SafeArrayGetLBound returned %d\n", lbound); + ok(hr == S_OK, "SafeArrayGetLBound failed with %lx\n", hr); + ok(lbound == 0, "SafeArrayGetLBound returned %ld\n", lbound);
hr = SafeArrayGetUBound(values, 1, &ubound); - ok(hr == S_OK, "SafeArrayGetUBound failed with %x\n", hr); - ok(ubound == numexpect-1, "SafeArrayGetUBound returned %d, but expected %d\n", ubound, numexpect-1); + ok(hr == S_OK, "SafeArrayGetUBound failed with %lx\n", hr); + ok(ubound == numexpect-1, "SafeArrayGetUBound returned %ld, but expected %d\n", ubound, numexpect-1);
hr = SafeArrayAccessData(values, (LPVOID)&data); - ok(hr == S_OK, "SafeArrayAccessData failed with %x\n", hr); + ok(hr == S_OK, "SafeArrayAccessData failed with %lx\n", hr);
for (i=0; i<=ubound-lbound; i++) { - ok(V_VT(&data[i]) == VT_I4, "V_VT(&data[%d]) was %d\n", i, V_VT(&data[i])); - ok(V_I4(&data[i]) == i, "V_I4(&data[%d]) was %d\n", i, V_I4(&data[i])); + ok(V_VT(&data[i]) == VT_I4, "V_VT(&data[%ld]) was %d\n", i, V_VT(&data[i])); + ok(V_I4(&data[i]) == i, "V_I4(&data[%ld]) was %ld\n", i, V_I4(&data[i])); }
hr = SafeArrayUnaccessData(values); - ok(hr == S_OK, "SafeArrayUnaccessData failed with %x\n", hr); + ok(hr == S_OK, "SafeArrayUnaccessData failed with %lx\n", hr);
return S_OK; } @@ -964,8 +964,8 @@ static HRESULT WINAPI Widget_CloneInterface( static HRESULT WINAPI Widget_put_prop_with_lcid( IWidget* iface, LONG lcid, INT i) { - trace("put_prop_with_lcid(%08x, %x)\n", lcid, i); - ok(lcid == MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), "got lcid %08x\n", lcid); + trace("put_prop_with_lcid(%08lx, %x)\n", lcid, i); + ok(lcid == MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), "got lcid %08lx\n", lcid); ok(i == 0xcafe, "got %08x\n", i); return S_OK; } @@ -973,8 +973,8 @@ static HRESULT WINAPI Widget_put_prop_with_lcid( static HRESULT WINAPI Widget_get_prop_with_lcid( IWidget* iface, LONG lcid, INT *i) { - trace("get_prop_with_lcid(%08x, %p)\n", lcid, i); - ok(lcid == MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), "got lcid %08x\n", lcid); + trace("get_prop_with_lcid(%08lx, %p)\n", lcid, i); + ok(lcid == MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), "got lcid %08lx\n", lcid); *i = lcid; return S_OK; } @@ -1049,22 +1049,22 @@ static HRESULT WINAPI Widget_VarArg_Run( ok(!lstrcmpW(name, catW), "got %s\n", wine_dbgstr_w(name));
hr = SafeArrayGetLBound(params, 1, &bound); - ok(hr == S_OK, "SafeArrayGetLBound error %#x\n", hr); - ok(bound == 0, "expected 0, got %d\n", bound); + ok(hr == S_OK, "SafeArrayGetLBound error %#lx\n", hr); + ok(bound == 0, "expected 0, got %ld\n", bound);
hr = SafeArrayGetUBound(params, 1, &bound); - ok(hr == S_OK, "SafeArrayGetUBound error %#x\n", hr); - ok(bound == 0, "expected 0, got %d\n", bound); + ok(hr == S_OK, "SafeArrayGetUBound error %#lx\n", hr); + ok(bound == 0, "expected 0, got %ld\n", bound);
hr = SafeArrayAccessData(params, (void **)&var); - ok(hr == S_OK, "SafeArrayAccessData failed with %x\n", hr); + ok(hr == S_OK, "SafeArrayAccessData failed with %lx\n", hr);
ok(V_VT(&var[0]) == VT_BSTR, "expected VT_BSTR, got %d\n", V_VT(&var[0])); bstr = V_BSTR(&var[0]); ok(!lstrcmpW(bstr, supermanW), "got %s\n", wine_dbgstr_w(bstr));
hr = SafeArrayUnaccessData(params); - ok(hr == S_OK, "SafeArrayUnaccessData error %#x\n", hr); + ok(hr == S_OK, "SafeArrayUnaccessData error %#lx\n", hr);
return S_OK; } @@ -1084,22 +1084,22 @@ static HRESULT WINAPI Widget_VarArg_Ref_Run( ok(!lstrcmpW(name, catW), "got %s\n", wine_dbgstr_w(name));
hr = SafeArrayGetLBound(*params, 1, &bound); - ok(hr == S_OK, "SafeArrayGetLBound error %#x\n", hr); - ok(bound == 0, "expected 0, got %d\n", bound); + ok(hr == S_OK, "SafeArrayGetLBound error %#lx\n", hr); + ok(bound == 0, "expected 0, got %ld\n", bound);
hr = SafeArrayGetUBound(*params, 1, &bound); - ok(hr == S_OK, "SafeArrayGetUBound error %#x\n", hr); - ok(bound == 0, "expected 0, got %d\n", bound); + ok(hr == S_OK, "SafeArrayGetUBound error %#lx\n", hr); + ok(bound == 0, "expected 0, got %ld\n", bound);
hr = SafeArrayAccessData(*params, (void **)&var); - ok(hr == S_OK, "SafeArrayAccessData error %#x\n", hr); + ok(hr == S_OK, "SafeArrayAccessData error %#lx\n", hr);
ok(V_VT(&var[0]) == VT_BSTR, "expected VT_BSTR, got %d\n", V_VT(&var[0])); bstr = V_BSTR(&var[0]); ok(!lstrcmpW(bstr, supermanW), "got %s\n", wine_dbgstr_w(bstr));
hr = SafeArrayUnaccessData(*params); - ok(hr == S_OK, "SafeArrayUnaccessData error %#x\n", hr); + ok(hr == S_OK, "SafeArrayUnaccessData error %#lx\n", hr);
return S_OK; } @@ -1110,11 +1110,11 @@ static HRESULT WINAPI Widget_basetypes_in(IWidget *iface, signed char c, short s { ok(c == 5, "Got char %d.\n", c); ok(s == -123, "Got short %d.\n", s); - ok(l == -100000, "Got int %d.\n", l); + ok(l == -100000, "Got int %ld.\n", l); ok(h == (LONGLONG)-100000 * 1000000, "Got hyper %s.\n", wine_dbgstr_longlong(h)); ok(uc == 0, "Got unsigned char %u.\n", uc); ok(us == 456, "Got unsigned short %u.\n", us); - ok(ul == 0xdeadbeef, "Got unsigned int %u.\n", ul); + ok(ul == 0xdeadbeef, "Got unsigned int %lu.\n", ul); ok(uh == (ULONGLONG)1234567890 * 9876543210, "Got unsigned hyper %s.\n", wine_dbgstr_longlong(uh)); ok(f == (float)M_PI, "Got float %f.\n", f); ok(d == M_E, "Got double %f.\n", d); @@ -1155,12 +1155,12 @@ static HRESULT WINAPI Widget_float_abi(IWidget *iface, float f, double d, int i,
static HRESULT WINAPI Widget_long_ptr(IWidget *iface, LONG *in, LONG *out, LONG *in_out) { - ok(*in == 123, "Got [in] %d.\n", *in); + ok(*in == 123, "Got [in] %ld.\n", *in); if (testmode == 0) /* Invoke() */ - ok(*out == 456, "Got [out] %d.\n", *out); + ok(*out == 456, "Got [out] %ld.\n", *out); else if (testmode == 1) - ok(!*out, "Got [out] %d.\n", *out); - ok(*in_out == 789, "Got [in, out] %d.\n", *in_out); + ok(!*out, "Got [out] %ld.\n", *out); + ok(*in_out == 789, "Got [in, out] %ld.\n", *in_out);
*in = 987; *out = 654; @@ -1189,8 +1189,8 @@ static HRESULT WINAPI Widget_long_ptr_ptr(IWidget *iface, LONG **in, LONG **out, } else if (testmode == 2) { - ok(**in == 123, "Got [in] %d.\n", **in); - ok(**in_out == 789, "Got [in, out] %d.\n", **in_out); + ok(**in == 123, "Got [in] %ld.\n", **in); + ok(**in_out == 789, "Got [in, out] %ld.\n", **in_out);
*out = CoTaskMemAlloc(sizeof(int)); **out = 654; @@ -1198,7 +1198,7 @@ static HRESULT WINAPI Widget_long_ptr_ptr(IWidget *iface, LONG **in, LONG **out, } else if (testmode == 3) { - ok(**in_out == 789, "Got [in, out] %d.\n", **in_out); + ok(**in_out == 789, "Got [in, out] %ld.\n", **in_out); *in_out = NULL; }
@@ -1213,14 +1213,14 @@ static void check_iface_marshal(IUnknown *unk, IDispatch *disp, ISomethingFromDi HRESULT hr;
hr = IUnknown_QueryInterface(unk, &IID_ISomethingFromDispatch, (void **)&sfd2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ISomethingFromDispatch_Release(sfd2);
hr = IDispatch_GetTypeInfo(disp, 0xdeadbeef, 0, &typeinfo); - ok(hr == 0xbeefdead, "Got hr %#x.\n", hr); + ok(hr == 0xbeefdead, "Got hr %#lx.\n", hr);
hr = ISomethingFromDispatch_anotherfn(sfd); - ok(hr == 0x01234567, "Got hr %#x.\n", hr); + ok(hr == 0x01234567, "Got hr %#lx.\n", hr); }
static HRESULT WINAPI Widget_iface_in(IWidget *iface, IUnknown *unk, IDispatch *disp, ISomethingFromDispatch *sfd) @@ -1260,9 +1260,9 @@ static HRESULT WINAPI Widget_iface_ptr(IWidget *iface, ISomethingFromDispatch ** if (testmode == 0 || testmode == 1) { hr = ISomethingFromDispatch_anotherfn(*in); - ok(hr == 0x01234567, "Got hr %#x.\n", hr); + ok(hr == 0x01234567, "Got hr %#lx.\n", hr); hr = ISomethingFromDispatch_anotherfn(*in_out); - ok(hr == 0x01234567, "Got hr %#x.\n", hr); + ok(hr == 0x01234567, "Got hr %#lx.\n", hr); }
if (testmode == 1) @@ -1280,7 +1280,7 @@ static HRESULT WINAPI Widget_iface_ptr(IWidget *iface, ISomethingFromDispatch ** else if (testmode == 3) { hr = ISomethingFromDispatch_anotherfn(*in_out); - ok(hr == 0x01234567, "Got hr %#x.\n", hr); + ok(hr == 0x01234567, "Got hr %#lx.\n", hr); ISomethingFromDispatch_Release(*in_out); *in_out = NULL; } @@ -1332,12 +1332,12 @@ static HRESULT WINAPI Widget_variant(IWidget *iface, VARIANT in, VARIANT *out, V if (testmode == 0) { ok(V_VT(out) == VT_I4, "Got wrong type %u.\n", V_VT(out)); - ok(V_I4(out) == 1, "Got wrong value %d.\n", V_I4(out)); + ok(V_I4(out) == 1, "Got wrong value %ld.\n", V_I4(out)); } else ok(V_VT(out) == VT_EMPTY, "Got wrong type %u.\n", V_VT(out)); ok(V_VT(in_ptr) == VT_I4, "Got wrong type %u.\n", V_VT(in_ptr)); - ok(V_I4(in_ptr) == -1, "Got wrong value %d.\n", V_I4(in_ptr)); + ok(V_I4(in_ptr) == -1, "Got wrong value %ld.\n", V_I4(in_ptr)); ok(V_VT(in_out) == VT_BSTR, "Got wrong type %u.\n", V_VT(in_out)); ok(!lstrcmpW(V_BSTR(in_out), test_bstr2), "Got wrong value %s.\n", wine_dbgstr_w(V_BSTR(in_out))); @@ -1374,14 +1374,14 @@ static void check_safearray(SAFEARRAY *sa, LONG expect)
hr = SafeArrayGetUBound(sa, 1, &len); len++; - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(len == expect, "Expected len %d, got %d.\n", expect, len); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(len == expect, "Expected len %ld, got %ld.\n", expect, len);
hr = SafeArrayAccessData(sa, (void **)&data); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
for (i = 0; i < len; ++i) - ok(data[i] == len + i, "Expected data %d at %d, got %d.\n", len + i, i, data[i]); + ok(data[i] == len + i, "Expected data %ld at %ld, got %ld.\n", len + i, i, data[i]);
SafeArrayUnaccessData(sa); } @@ -1396,7 +1396,7 @@ static HRESULT WINAPI Widget_safearray(IWidget *iface, SAFEARRAY *in, SAFEARRAY check_safearray(*in_out, 9);
hr = SafeArrayDestroy(*in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
*out = make_safearray(4); *in_out = make_safearray(6); @@ -1453,12 +1453,12 @@ static HRESULT WINAPI Widget_complex_struct(IWidget *iface, struct complex in) ok(*in.pi == 2, "Got int pointer %d.\n", *in.pi); ok(**in.ppi == 10, "Got int double pointer %d.\n", **in.ppi); hr = ISomethingFromDispatch_anotherfn(in.iface); - ok(hr == 0x01234567, "Got wrong hr %#x.\n", hr); + ok(hr == 0x01234567, "Got wrong hr %#lx.\n", hr); hr = ISomethingFromDispatch_anotherfn(*in.iface_ptr); - ok(hr == 0x01234567, "Got wrong hr %#x.\n", hr); + ok(hr == 0x01234567, "Got wrong hr %#lx.\n", hr); ok(!lstrcmpW(in.bstr, test_bstr2), "Got string %s.\n", wine_dbgstr_w(in.bstr)); ok(V_VT(&in.var) == VT_I4, "Got wrong type %u.\n", V_VT(&in.var)); - ok(V_I4(&in.var) == 123, "Got wrong value %d.\n", V_I4(&in.var)); + ok(V_I4(&in.var) == 123, "Got wrong value %ld.\n", V_I4(&in.var)); ok(!memcmp(&in.mystruct, &test_mystruct1, sizeof(MYSTRUCT)), "Structs didn't match.\n"); ok(!memcmp(in.arr, test_array1, sizeof(array_t)), "Arrays didn't match.\n"); ok(in.myint == 456, "Got int %d.\n", in.myint); @@ -1483,9 +1483,9 @@ static HRESULT WINAPI Widget_array(IWidget *iface, array_t in, array_t out, arra static HRESULT WINAPI Widget_variant_array(IWidget *iface, VARIANT in[2], VARIANT out[2], VARIANT in_out[2]) { ok(V_VT(&in[0]) == VT_I4, "Got wrong type %u.\n", V_VT(&in[0])); - ok(V_I4(&in[0]) == 1, "Got wrong value %d.\n", V_I4(&in[0])); + ok(V_I4(&in[0]) == 1, "Got wrong value %ld.\n", V_I4(&in[0])); ok(V_VT(&in[1]) == (VT_BYREF|VT_I4), "Got wrong type %u.\n", V_VT(&in[1])); - ok(*V_I4REF(&in[1]) == 2, "Got wrong value %d.\n", *V_I4REF(&in[1])); + ok(*V_I4REF(&in[1]) == 2, "Got wrong value %ld.\n", *V_I4REF(&in[1])); ok(V_VT(&out[0]) == VT_EMPTY, "Got wrong type %u.\n", V_VT(&out[0])); ok(V_VT(&out[1]) == VT_EMPTY, "Got wrong type %u.\n", V_VT(&out[1])); ok(V_VT(&in_out[0]) == VT_I4, "Got wrong type %u.\n", V_VT(&in_out[0])); @@ -1523,13 +1523,13 @@ static HRESULT WINAPI Widget_Coclass(IWidget *iface, Coclass1 *class1, Coclass2 HRESULT hr;
hr = ICoclass1_test((ICoclass1 *)class1); - ok(hr == 1, "Got hr %#x.\n", hr); + ok(hr == 1, "Got hr %#lx.\n", hr);
hr = ICoclass2_test((ICoclass2 *)class2); - ok(hr == 2, "Got hr %#x.\n", hr); + ok(hr == 2, "Got hr %#lx.\n", hr);
hr = ICoclass1_test((ICoclass1 *)class3); - ok(hr == 1, "Got hr %#x.\n", hr); + ok(hr == 1, "Got hr %#lx.\n", hr);
return S_OK; } @@ -1543,9 +1543,9 @@ static HRESULT WINAPI Widget_Coclass_ptr(IWidget *iface, Coclass1 **in, Coclass1 if (testmode == 0 || testmode == 1) { hr = ICoclass1_test((ICoclass1 *)*in); - ok(hr == 1, "Got hr %#x.\n", hr); + ok(hr == 1, "Got hr %#lx.\n", hr); hr = ICoclass1_test((ICoclass1 *)*in_out); - ok(hr == 1, "Got hr %#x.\n", hr); + ok(hr == 1, "Got hr %#lx.\n", hr); }
if (testmode == 1) @@ -1566,7 +1566,7 @@ static HRESULT WINAPI Widget_Coclass_ptr(IWidget *iface, Coclass1 **in, Coclass1 else if (testmode == 3) { hr = ICoclass1_test((ICoclass1 *)*in_out); - ok(hr == 1, "Got hr %#x.\n", hr); + ok(hr == 1, "Got hr %#lx.\n", hr); ICoclass1_Release((ICoclass1 *)*in_out); *in_out = NULL; } @@ -1579,13 +1579,13 @@ static HRESULT WINAPI Widget_Coclass_noptr(IWidget *iface, Coclass1 class1, Cocl HRESULT hr;
hr = ICoclass1_test(class1.iface); - ok(hr == 1, "Got hr %#x.\n", hr); + ok(hr == 1, "Got hr %#lx.\n", hr);
hr = ICoclass2_test(class2.iface); - ok(hr == 2, "Got hr %#x.\n", hr); + ok(hr == 2, "Got hr %#lx.\n", hr);
hr = ICoclass1_test(class3.iface); - ok(hr == 1, "Got hr %#x.\n", hr); + ok(hr == 1, "Got hr %#lx.\n", hr);
return S_OK; } @@ -2004,11 +2004,11 @@ static void test_marshal_basetypes(IWidget *widget, IDispatch *disp) V_VT(&arg[0]) = VT_I4; V_I4(&arg[0]) = STATE_WIDGETIFIED; hr = IDispatch_Invoke(disp, DISPID_TM_BASETYPES_IN, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWidget_basetypes_in(widget, 5, -123, -100000, (LONGLONG)-100000 * 1000000, 0, 456, 0xdeadbeef, (ULONGLONG)1234567890 * 9876543210, M_PI, M_E, STATE_WIDGETIFIED); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
c = s = l = h = uc = us = ul = uh = f = d = st = 0;
@@ -2025,14 +2025,14 @@ static void test_marshal_basetypes(IWidget *widget, IDispatch *disp) V_VT(&arg[0]) = VT_BYREF|VT_I4; V_I4REF(&arg[0]) = (LONG *)&st; hr = IDispatch_Invoke(disp, DISPID_TM_BASETYPES_OUT, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(c == 10, "Got char %d.\n", c); ok(s == -321, "Got short %d.\n", s); - ok(l == -200000, "Got int %d.\n", l); + ok(l == -200000, "Got int %ld.\n", l); ok(h == (LONGLONG)-200000 * 1000000L, "Got hyper %s.\n", wine_dbgstr_longlong(h)); ok(uc == 254, "Got unsigned char %u.\n", uc); ok(us == 256, "Got unsigned short %u.\n", us); - ok(ul == 0xf00dfade, "Got unsigned int %i.\n", ul); + ok(ul == 0xf00dfade, "Got unsigned int %li.\n", ul); ok(uh == ((((ULONGLONG)0xabcdef01) << 32) | (ULONGLONG)0x23456789), "Got unsigned hyper %s.\n", wine_dbgstr_longlong(uh)); ok(f == (float)M_LN2, "Got float %f.\n", f); @@ -2042,14 +2042,14 @@ static void test_marshal_basetypes(IWidget *widget, IDispatch *disp) c = s = l = h = uc = us = ul = uh = f = d = st = 0;
hr = IWidget_basetypes_out(widget, &c, &s, &l, &h, &uc, &us, &ul, &uh, &f, &d, &st); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(c == 10, "Got char %d.\n", c); ok(s == -321, "Got short %d.\n", s); - ok(l == -200000, "Got int %d.\n", l); + ok(l == -200000, "Got int %ld.\n", l); ok(h == (LONGLONG)-200000 * 1000000L, "Got hyper %s.\n", wine_dbgstr_longlong(h)); ok(uc == 254, "Got unsigned char %u.\n", uc); ok(us == 256, "Got unsigned short %u.\n", us); - ok(ul == 0xf00dfade, "Got unsigned int %i.\n", ul); + ok(ul == 0xf00dfade, "Got unsigned int %li.\n", ul); ok(uh == ((((ULONGLONG)0xabcdef01) << 32) | (ULONGLONG)0x23456789), "Got unsigned hyper %s.\n", wine_dbgstr_longlong(uh)); ok(f == (float)M_LN2, "Got float %f.\n", f); @@ -2062,12 +2062,12 @@ static void test_marshal_basetypes(IWidget *widget, IDispatch *disp) i2 = 789; pi = &i2; hr = IWidget_myint(widget, 123, &i, &pi); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Test that different float ABIs are correctly handled. */
hr = IWidget_float_abi(widget, 1.0f, 2.0, 3, 4.0f, 5.0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
static void test_marshal_pointer(IWidget *widget, IDispatch *disp) @@ -2087,10 +2087,10 @@ static void test_marshal_pointer(IWidget *widget, IDispatch *disp) V_VT(&arg[0]) = VT_BYREF|VT_I4; V_I4REF(&arg[0]) = &in_out; hr = IDispatch_Invoke(disp, DISPID_TM_INT_PTR, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(in == 987, "Got [in] %d.\n", in); - ok(out == 654, "Got [out] %d.\n", out); - ok(in_out == 321, "Got [in, out] %d.\n", in_out); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(in == 987, "Got [in] %ld.\n", in); + ok(out == 654, "Got [out] %ld.\n", out); + ok(in_out == 321, "Got [in, out] %ld.\n", in_out);
testmode = 1;
@@ -2098,26 +2098,26 @@ static void test_marshal_pointer(IWidget *widget, IDispatch *disp) out = 456; in_out = 789; hr = IWidget_long_ptr(widget, &in, &out, &in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(in == 123, "Got [in] %d.\n", in); - ok(out == 654, "Got [out] %d.\n", out); - ok(in_out == 321, "Got [in, out] %d.\n", in_out); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(in == 123, "Got [in] %ld.\n", in); + ok(out == 654, "Got [out] %ld.\n", out); + ok(in_out == 321, "Got [in, out] %ld.\n", in_out);
out = in_out = -1; hr = IWidget_long_ptr(widget, NULL, &out, &in_out); - ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#lx.\n", hr); ok(!out, "[out] parameter should have been cleared.\n"); ok(in_out == -1, "[in, out] parameter should not have been cleared.\n");
in = in_out = -1; hr = IWidget_long_ptr(widget, &in, NULL, &in_out); - ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#lx.\n", hr); ok(in == -1, "[in] parameter should not have been cleared.\n"); ok(in_out == -1, "[in, out] parameter should not have been cleared.\n");
in = out = -1; hr = IWidget_long_ptr(widget, &in, &out, NULL); - ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#lx.\n", hr); ok(in == -1, "[in] parameter should not have been cleared.\n"); ok(!out, "[out] parameter should have been cleared.\n");
@@ -2127,16 +2127,16 @@ static void test_marshal_pointer(IWidget *widget, IDispatch *disp) testmode = 0; in_ptr = out_ptr = in_out_ptr = NULL; hr = IWidget_long_ptr_ptr(widget, &in_ptr, &out_ptr, &in_out_ptr); - ok(hr == S_OK, "Got hr %#x\n", hr); + ok(hr == S_OK, "Got hr %#lx\n", hr); ok(!in_ptr, "Got [in] %p.\n", in_ptr); ok(!out_ptr, "Got [out] %p.\n", out_ptr); ok(!in_out_ptr, "Got [in, out] %p.\n", in_out_ptr);
testmode = 1; hr = IWidget_long_ptr_ptr(widget, &in_ptr, &out_ptr, &in_out_ptr); - ok(hr == S_OK, "Got hr %#x\n", hr); - ok(*out_ptr == 654, "Got [out] %d.\n", *out_ptr); - ok(*in_out_ptr == 321, "Got [in, out] %d.\n", *in_out_ptr); + ok(hr == S_OK, "Got hr %#lx\n", hr); + ok(*out_ptr == 654, "Got [out] %ld.\n", *out_ptr); + ok(*in_out_ptr == 321, "Got [in, out] %ld.\n", *in_out_ptr); CoTaskMemFree(out_ptr); CoTaskMemFree(in_out_ptr);
@@ -2148,38 +2148,38 @@ static void test_marshal_pointer(IWidget *widget, IDispatch *disp) out_ptr = &out; in_out_ptr = &in_out; hr = IWidget_long_ptr_ptr(widget, &in_ptr, &out_ptr, &in_out_ptr); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(out_ptr != &out, "[out] ptr should have changed.\n"); ok(in_out_ptr == &in_out, "[in, out] ptr should not have changed.\n"); - ok(*out_ptr == 654, "Got [out] %d.\n", *out_ptr); - ok(*in_out_ptr == 321, "Got [in, out] %d.\n", *in_out_ptr); + ok(*out_ptr == 654, "Got [out] %ld.\n", *out_ptr); + ok(*in_out_ptr == 321, "Got [in, out] %ld.\n", *in_out_ptr);
testmode = 3; in_ptr = out_ptr = NULL; in_out = 789; in_out_ptr = &in_out; hr = IWidget_long_ptr_ptr(widget, &in_ptr, &out_ptr, &in_out_ptr); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!in_out_ptr, "Got [in, out] %p.\n", in_out_ptr);
out_ptr = &out; in_out_ptr = &in_out; hr = IWidget_long_ptr_ptr(widget, NULL, &out_ptr, &in_out_ptr); - ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#lx.\n", hr); ok(!out_ptr, "[out] parameter should have been cleared.\n"); ok(in_out_ptr == &in_out, "[in, out] parameter should not have been cleared.\n");
in_ptr = ∈ in_out_ptr = &in_out; hr = IWidget_long_ptr_ptr(widget, &in_ptr, NULL, &in_out_ptr); - ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#lx.\n", hr); ok(in_ptr == &in, "[in] parameter should not have been cleared.\n"); ok(in_out_ptr == &in_out, "[in, out] parameter should not have been cleared.\n");
in_ptr = ∈ out_ptr = &out; hr = IWidget_long_ptr_ptr(widget, &in_ptr, &out_ptr, NULL); - ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "Got hr %#lx.\n", hr); ok(in_ptr == &in, "[in] parameter should not have been cleared.\n"); ok(!out_ptr, "[out] parameter should have been cleared.\n"); } @@ -2202,21 +2202,21 @@ static void test_marshal_iface(IWidget *widget, IDispatch *disp) sfd3 = create_disp_obj(); hr = IWidget_iface_in(widget, (IUnknown *)sfd1, (IDispatch *)sfd2, sfd3); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); release_iface(sfd1); release_iface(sfd2); release_iface(sfd3);
testmode = 1; hr = IWidget_iface_in(widget, NULL, NULL, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
testmode = 0; proxy_unk = (IUnknown *)0xdeadbeef; proxy_disp = (IDispatch *)0xdeadbeef; proxy_sfd = (ISomethingFromDispatch *)0xdeadbeef; hr = IWidget_iface_out(widget, &proxy_unk, &proxy_disp, &proxy_sfd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_iface_marshal(proxy_unk, proxy_disp, proxy_sfd); release_iface(proxy_unk); release_iface(proxy_disp); @@ -2224,7 +2224,7 @@ static void test_marshal_iface(IWidget *widget, IDispatch *disp)
testmode = 1; hr = IWidget_iface_out(widget, &proxy_unk, &proxy_disp, &proxy_sfd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!proxy_unk, "Got unexpected proxy %p.\n", proxy_unk); ok(!proxy_disp, "Got unexpected proxy %p.\n", proxy_disp); ok(!proxy_sfd, "Got unexpected proxy %p.\n", proxy_sfd); @@ -2234,7 +2234,7 @@ static void test_marshal_iface(IWidget *widget, IDispatch *disp) sfd_out = sfd2 = create_disp_obj(); sfd_in_out = sfd3 = create_disp_obj(); hr = IWidget_iface_ptr(widget, &sfd_in, &sfd_out, &sfd_in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(sfd_in == sfd1, "[in] parameter should not have changed.\n"); ok(!sfd_out, "[out] parameter should have been cleared.\n"); ok(sfd_in_out == sfd3, "[in, out] parameter should not have changed.\n"); @@ -2247,12 +2247,12 @@ static void test_marshal_iface(IWidget *widget, IDispatch *disp) sfd_in_out = sfd3 = create_disp_obj(); ISomethingFromDispatch_AddRef(sfd_in_out); hr = IWidget_iface_ptr(widget, &sfd_in, &sfd_out, &sfd_in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = ISomethingFromDispatch_anotherfn(sfd_out); - ok(hr == 0x01234567, "Got hr %#x.\n", hr); + ok(hr == 0x01234567, "Got hr %#lx.\n", hr); ok(sfd_in_out != sfd3, "[in, out] parameter should have changed.\n"); hr = ISomethingFromDispatch_anotherfn(sfd_in_out); - ok(hr == 0x01234567, "Got hr %#x.\n", hr); + ok(hr == 0x01234567, "Got hr %#lx.\n", hr); release_iface(sfd_out); release_iface(sfd_in_out); release_iface(sfd1); @@ -2261,10 +2261,10 @@ static void test_marshal_iface(IWidget *widget, IDispatch *disp) testmode = 2; sfd_in = sfd_out = sfd_in_out = NULL; hr = IWidget_iface_ptr(widget, &sfd_in, &sfd_out, &sfd_in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!sfd_out, "[out] parameter should not have been set.\n"); hr = ISomethingFromDispatch_anotherfn(sfd_in_out); - ok(hr == 0x01234567, "Got hr %#x.\n", hr); + ok(hr == 0x01234567, "Got hr %#lx.\n", hr); release_iface(sfd_in_out);
testmode = 3; @@ -2272,7 +2272,7 @@ static void test_marshal_iface(IWidget *widget, IDispatch *disp) sfd_in_out = sfd3 = create_disp_obj(); ISomethingFromDispatch_AddRef(sfd_in_out); hr = IWidget_iface_ptr(widget, &sfd_in, &sfd_out, &sfd_in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!sfd_in_out, "Got [in, out] %p.\n", sfd_in_out); release_iface(sfd3);
@@ -2283,7 +2283,7 @@ static void test_marshal_iface(IWidget *widget, IDispatch *disp) disp_noptr.lpVtbl = (IDispatchVtbl *)sfd2; sfd_noptr.lpVtbl = (ISomethingFromDispatchVtbl *)sfd3; hr = IWidget_iface_noptr(widget, unk_noptr, disp_noptr, sfd_noptr); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); release_iface(sfd1); release_iface(sfd2); release_iface(sfd3); @@ -2301,14 +2301,14 @@ static void test_marshal_iface(IWidget *widget, IDispatch *disp) V_VT(&arg[0]) = VT_UNKNOWN; V_UNKNOWN(&arg[0]) = (IUnknown *)sfd3; hr = IDispatch_Invoke(disp, DISPID_TM_IFACE_IN, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
V_VT(&arg[2]) = VT_DISPATCH; V_DISPATCH(&arg[2]) = (IDispatch *)sfd1; V_VT(&arg[1]) = VT_DISPATCH; V_DISPATCH(&arg[1]) = (IDispatch *)sfd2; V_VT(&arg[0]) = VT_DISPATCH; V_DISPATCH(&arg[0]) = (IDispatch *)sfd3; hr = IDispatch_Invoke(disp, DISPID_TM_IFACE_IN, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
release_iface(sfd1); release_iface(sfd2); @@ -2320,7 +2320,7 @@ static void test_marshal_iface(IWidget *widget, IDispatch *disp) V_VT(&arg[0]) = VT_UNKNOWN; V_UNKNOWN(&arg[0]) = NULL; hr = IDispatch_Invoke(disp, DISPID_TM_IFACE_IN, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
testmode = 0; proxy_unk = proxy_unk2 = NULL; @@ -2331,10 +2331,10 @@ static void test_marshal_iface(IWidget *widget, IDispatch *disp) hr = IDispatch_Invoke(disp, DISPID_TM_IFACE_OUT, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); todo_wine - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr == S_OK) { hr = IUnknown_QueryInterface(proxy_unk2, &IID_ISomethingFromDispatch, (void **)&proxy_sfd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_iface_marshal(proxy_unk, proxy_disp, proxy_sfd); ISomethingFromDispatch_Release(proxy_sfd); release_iface(proxy_unk); @@ -2348,7 +2348,7 @@ if (hr == S_OK) { hr = IDispatch_Invoke(disp, DISPID_TM_IFACE_OUT, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); todo_wine - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!proxy_unk, "Got unexpected proxy %p.\n", proxy_unk); ok(!proxy_disp, "Got unexpected proxy %p.\n", proxy_disp); ok(!proxy_unk2, "Got unexpected proxy %p.\n", proxy_unk2); @@ -2365,7 +2365,7 @@ if (hr == S_OK) { hr = IDispatch_Invoke(disp, DISPID_TM_IFACE_PTR, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); todo_wine - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk_in == (IUnknown *)sfd1, "[in] parameter should not have changed.\n"); ok(!unk_out, "[out] parameter should have been cleared.\n"); ok(unk_in_out == (IUnknown *)sfd3, "[in, out] parameter should not have changed.\n"); @@ -2382,20 +2382,20 @@ if (hr == S_OK) { hr = IDispatch_Invoke(disp, DISPID_TM_IFACE_PTR, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); todo_wine - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (hr == S_OK) { hr = IUnknown_QueryInterface(unk_out, &IID_ISomethingFromDispatch, (void **)&sfd_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = ISomethingFromDispatch_anotherfn(sfd_out); - ok(hr == 0x01234567, "Got hr %#x.\n", hr); + ok(hr == 0x01234567, "Got hr %#lx.\n", hr); ISomethingFromDispatch_Release(sfd_out);
ok(unk_in_out != (IUnknown *)sfd3, "[in, out] parameter should have changed.\n"); hr = IUnknown_QueryInterface(unk_in_out, &IID_ISomethingFromDispatch, (void **)&sfd_in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = ISomethingFromDispatch_anotherfn(sfd_in_out); - ok(hr == 0x01234567, "Got hr %#x.\n", hr); + ok(hr == 0x01234567, "Got hr %#lx.\n", hr); ISomethingFromDispatch_Release(sfd_in_out);
release_iface(unk_out); @@ -2410,14 +2410,14 @@ if (hr == S_OK) { hr = IDispatch_Invoke(disp, DISPID_TM_IFACE_PTR, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); todo_wine - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!unk_out, "[out] parameter should not have been set.\n"); if (hr == S_OK) { hr = IUnknown_QueryInterface(unk_in_out, &IID_ISomethingFromDispatch, (void **)&sfd_in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = ISomethingFromDispatch_anotherfn(sfd_in_out); - ok(hr == 0x01234567, "Got hr %#x.\n", hr); + ok(hr == 0x01234567, "Got hr %#lx.\n", hr); ISomethingFromDispatch_Release(sfd_in_out);
release_iface(unk_in_out); @@ -2431,7 +2431,7 @@ if (hr == S_OK) { hr = IDispatch_Invoke(disp, DISPID_TM_IFACE_PTR, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); todo_wine { - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!unk_in_out, "[in, out] parameter should have been cleared.\n"); release_iface(sfd3); } @@ -2457,7 +2457,7 @@ static void test_marshal_bstr(IWidget *widget, IDispatch *disp) V_VT(&arg[0]) = VT_BSTR|VT_BYREF; V_BSTRREF(&arg[0]) = &in_out; hr = IDispatch_Invoke(disp, DISPID_TM_BSTR, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(in[1] == test_bstr1[1], "[in] parameter should not be changed.\n"); ok(in_ptr[1] == 'X', "[in] pointer should be changed.\n"); ok(in_out[1] == 'X', "[in, out] parameter should be changed.\n"); @@ -2471,7 +2471,7 @@ static void test_marshal_bstr(IWidget *widget, IDispatch *disp) SysFreeString(out); out = (BSTR)0xdeadbeef; hr = IWidget_bstr(widget, in, &out, &in_ptr, &in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(in[1] == test_bstr1[1], "[in] parameter should not be changed.\n"); ok(in_ptr[1] == test_bstr2[1], "[in] pointer should not be changed.\n"); ok(in_out[1] == 'X', "[in, out] parameter should be changed.\n"); @@ -2486,11 +2486,11 @@ static void test_marshal_bstr(IWidget *widget, IDispatch *disp) testmode = 1; out = in_ptr = in_out = NULL; hr = IWidget_bstr(widget, NULL, &out, &in_ptr, &in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
in = SysAllocString(L"test"); hr = IWidget_no_in_out(widget, in, 5); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
static void test_marshal_variant(IWidget *widget, IDispatch *disp) @@ -2517,7 +2517,7 @@ static void test_marshal_variant(IWidget *widget, IDispatch *disp) V_VT(&arg[0]) = VT_VARIANT|VT_BYREF; V_VARIANTREF(&arg[0]) = &in_out; hr = IDispatch_Invoke(disp, DISPID_TM_VARIANT, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(V_VT(&arg[3]) == VT_CY, "Got wrong type %u.\n", V_VT(&arg[3])); ok(V_VT(&out) == VT_UI1, "Got wrong type %u.\n", V_VT(&out)); ok(V_UI1(&out) == 3, "Got wrong value %d.\n", V_UI1(&out)); @@ -2535,7 +2535,7 @@ static void test_marshal_variant(IWidget *widget, IDispatch *disp) V_VT(&in_out) = VT_BSTR; V_BSTR(&in_out) = bstr = SysAllocString(test_bstr2); hr = IWidget_variant(widget, arg[3], &out, &in_ptr, &in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(V_VT(&arg[3]) == VT_CY, "Got wrong type %u.\n", V_VT(&arg[3])); ok(V_VT(&out) == VT_UI1, "Got wrong type %u.\n", V_VT(&out)); ok(V_UI1(&out) == 3, "Got wrong value %d.\n", V_UI1(&out)); @@ -2555,7 +2555,7 @@ static void test_marshal_safearray(IWidget *widget, IDispatch *disp) in_ptr = make_safearray(7); in_out = make_safearray(9); hr = IWidget_safearray(widget, in, &out, &in_ptr, &in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_safearray(in, 3); check_safearray(out, 4); check_safearray(out2, 5); @@ -2582,7 +2582,7 @@ static void test_marshal_struct(IWidget *widget, IDispatch *disp) memcpy(&in_ptr, &test_mystruct3, sizeof(MYSTRUCT)); memcpy(&in_out, &test_mystruct4, sizeof(MYSTRUCT)); hr = IWidget_mystruct(widget, test_mystruct1, &out, &in_ptr, &in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!memcmp(&out, &test_mystruct5, sizeof(MYSTRUCT)), "Structs didn't match.\n"); ok(!memcmp(&in_ptr, &test_mystruct3, sizeof(MYSTRUCT)), "Structs didn't match.\n"); ok(!memcmp(&in_out, &test_mystruct7, sizeof(MYSTRUCT)), "Structs didn't match.\n"); @@ -2590,12 +2590,12 @@ static void test_marshal_struct(IWidget *widget, IDispatch *disp) memcpy(&in_ptr, &test_mystruct1, sizeof(MYSTRUCT)); in_ptr_ptr = &in_ptr; hr = IWidget_mystruct_ptr_ptr(widget, &in_ptr_ptr); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Make sure that "thin" structs (<=8 bytes) are handled correctly in x86-64. */
hr = IWidget_thin_struct(widget, test_thin_struct); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Make sure we can handle an imported type. */
@@ -2603,7 +2603,7 @@ static void test_marshal_struct(IWidget *widget, IDispatch *disp) rect_in_ptr = test_rect3; rect_in_out = test_rect4; hr = IWidget_rect(widget, test_rect1, &rect_out, &rect_in_ptr, &rect_in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(EqualRect(&rect_out, &test_rect5), "Rects didn't match.\n"); ok(EqualRect(&rect_in_ptr, &test_rect3), "Rects didn't match.\n"); ok(EqualRect(&rect_in_out, &test_rect7), "Rects didn't match.\n"); @@ -2625,7 +2625,7 @@ static void test_marshal_struct(IWidget *widget, IDispatch *disp) memcpy(complex.arr, test_array1, sizeof(array_t)); complex.myint = 456; hr = IWidget_complex_struct(widget, complex); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
static void test_marshal_array(IWidget *widget, IDispatch *disp) @@ -2641,7 +2641,7 @@ static void test_marshal_array(IWidget *widget, IDispatch *disp) memcpy(out, test_array2, sizeof(array_t)); memcpy(in_out, test_array3, sizeof(array_t)); hr = IWidget_array(widget, in, out, in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!memcmp(&in, &test_array1, sizeof(array_t)), "Arrays didn't match.\n"); ok(!memcmp(&out, &test_array5, sizeof(array_t)), "Arrays didn't match.\n"); ok(!memcmp(&in_out, &test_array6, sizeof(array_t)), "Arrays didn't match.\n"); @@ -2653,12 +2653,12 @@ static void test_marshal_array(IWidget *widget, IDispatch *disp) V_VT(&var_in_out[0]) = VT_I4; V_I4(&var_in_out[0]) = 5; V_VT(&var_in_out[1]) = VT_BSTR; V_BSTR(&var_in_out[1]) = SysAllocString(test_bstr1); hr = IWidget_variant_array(widget, var_in, var_out, var_in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(V_VT(&var_in[0]) == VT_I4, "Got wrong type %u.\n", V_VT(&var_in[0])); - ok(V_I4(&var_in[0]) == 1, "Got wrong value %d.\n", V_I4(&var_in[0])); + ok(V_I4(&var_in[0]) == 1, "Got wrong value %ld.\n", V_I4(&var_in[0])); ok(V_VT(&var_in[1]) == (VT_BYREF|VT_I4), "Got wrong type %u.\n", V_VT(&var_in[1])); ok(V_I4REF(&var_in[1]) == &l, "Got wrong value %p.\n", V_I4REF(&var_in[1])); - ok(l == 2, "Got wrong value %d.\n", l); + ok(l == 2, "Got wrong value %ld.\n", l); ok(V_VT(&var_out[0]) == VT_I1, "Got wrong type %u.\n", V_VT(&var_out[0])); ok(V_I1(&var_out[0]) == 9, "Got wrong value %u.\n", V_VT(&var_out[0])); ok(V_VT(&var_out[1]) == VT_BSTR, "Got wrong type %u.\n", V_VT(&var_out[1])); @@ -2667,16 +2667,16 @@ static void test_marshal_array(IWidget *widget, IDispatch *disp) ok(V_I1(&var_in_out[0]) == 11, "Got wrong value %u.\n", V_VT(&var_in_out[0])); ok(V_VT(&var_in_out[1]) == VT_UNKNOWN, "Got wrong type %u.\n", V_VT(&var_in_out[1])); hr = IUnknown_QueryInterface(V_UNKNOWN(&var_in_out[1]), &IID_ISomethingFromDispatch, (void **)&proxy_sfd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = ISomethingFromDispatch_anotherfn(proxy_sfd); - ok(hr == 0x01234567, "Got hr %#x.\n", hr); + ok(hr == 0x01234567, "Got hr %#lx.\n", hr); ISomethingFromDispatch_Release(proxy_sfd); release_iface(V_UNKNOWN(&var_in_out[1]));
memcpy(&struct_in[0], &test_mystruct1, sizeof(MYSTRUCT)); memcpy(&struct_in[1], &test_mystruct2, sizeof(MYSTRUCT)); hr = IWidget_mystruct_array(widget, struct_in); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
static void test_marshal_coclass(IWidget *widget, IDispatch *disp) @@ -2697,11 +2697,11 @@ static void test_marshal_coclass(IWidget *widget, IDispatch *disp)
hr = IWidget_Coclass(widget, (Coclass1 *)&class1->ICoclass1_iface, (Coclass2 *)&class2->ICoclass1_iface, (Coclass3 *)&class3->ICoclass1_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IWidget_Coclass(widget, (Coclass1 *)&class1->ICoclass2_iface, (Coclass2 *)&class2->ICoclass2_iface, (Coclass3 *)&class3->ICoclass2_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
release_iface(&class1->ICoclass1_iface); release_iface(&class2->ICoclass1_iface); @@ -2715,7 +2715,7 @@ static void test_marshal_coclass(IWidget *widget, IDispatch *disp) out = &class2->ICoclass1_iface; in_out = &class3->ICoclass1_iface; hr = IWidget_Coclass_ptr(widget, (Coclass1 **)&in, (Coclass1 **)&out, (Coclass1 **)&in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(in == &class1->ICoclass1_iface, "[in] parameter should not have changed.\n"); ok(!out, "[out] parameter should have been cleared.\n"); ok(in_out == &class3->ICoclass1_iface, "[in, out] parameter should not have changed.\n"); @@ -2731,12 +2731,12 @@ static void test_marshal_coclass(IWidget *widget, IDispatch *disp) ICoclass1_AddRef(in_out); hr = IWidget_Coclass_ptr(widget, (Coclass1 **)&in, (Coclass1 **)&out, (Coclass1 **)&in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = ICoclass1_test(out); - ok(hr == 1, "Got hr %#x.\n", hr); + ok(hr == 1, "Got hr %#lx.\n", hr); ok(in_out != &class3->ICoclass1_iface, "[in, out] parameter should have changed.\n"); hr = ICoclass1_test(in_out); - ok(hr == 1, "Got hr %#x.\n", hr); + ok(hr == 1, "Got hr %#lx.\n", hr); release_iface(out); release_iface(in_out); release_iface(&class1->ICoclass1_iface); @@ -2746,9 +2746,9 @@ static void test_marshal_coclass(IWidget *widget, IDispatch *disp) in = out = in_out = NULL; hr = IWidget_Coclass_ptr(widget, (Coclass1 **)&in, (Coclass1 **)&out, (Coclass1 **)&in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = ICoclass1_test(in_out); - ok(hr == 1, "Got hr %#x.\n", hr); + ok(hr == 1, "Got hr %#lx.\n", hr); release_iface(in_out);
testmode = 3; @@ -2757,7 +2757,7 @@ static void test_marshal_coclass(IWidget *widget, IDispatch *disp) in_out = &class3->ICoclass1_iface; hr = IWidget_Coclass_ptr(widget, (Coclass1 **)&in, (Coclass1 **)&out, (Coclass1 **)&in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!in_out, "Got [in, out] %p.\n", in_out);
class1 = create_coclass_obj(); @@ -2767,7 +2767,7 @@ static void test_marshal_coclass(IWidget *widget, IDispatch *disp) class2_noptr.iface = &class2->ICoclass2_iface; class3_noptr.iface = &class3->ICoclass1_iface; hr = IWidget_Coclass_noptr(widget, class1_noptr, class2_noptr, class3_noptr); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); release_iface(&class1->ICoclass1_iface); release_iface(&class2->ICoclass1_iface); release_iface(&class3->ICoclass1_iface); @@ -2784,21 +2784,21 @@ static void test_marshal_coclass(IWidget *widget, IDispatch *disp) V_VT(&arg[0]) = VT_UNKNOWN; V_UNKNOWN(&arg[0]) = (IUnknown *)&class3->ICoclass1_iface; hr = IDispatch_Invoke(disp, DISPID_TM_COCLASS, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
V_VT(&arg[2]) = VT_UNKNOWN; V_UNKNOWN(&arg[2]) = (IUnknown *)&class1->ICoclass2_iface; V_VT(&arg[1]) = VT_UNKNOWN; V_UNKNOWN(&arg[1]) = (IUnknown *)&class2->ICoclass2_iface; V_VT(&arg[0]) = VT_UNKNOWN; V_UNKNOWN(&arg[0]) = (IUnknown *)&class3->ICoclass2_iface; hr = IDispatch_Invoke(disp, DISPID_TM_COCLASS, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
V_VT(&arg[2]) = VT_DISPATCH; V_DISPATCH(&arg[2]) = (IDispatch *)&class1->ICoclass1_iface; V_VT(&arg[1]) = VT_DISPATCH; V_DISPATCH(&arg[1]) = (IDispatch *)&class2->ICoclass1_iface; V_VT(&arg[0]) = VT_DISPATCH; V_DISPATCH(&arg[0]) = (IDispatch *)&class3->ICoclass1_iface; hr = IDispatch_Invoke(disp, DISPID_TM_COCLASS, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
release_iface(&class1->ICoclass1_iface); release_iface(&class2->ICoclass1_iface); @@ -2816,7 +2816,7 @@ static void test_marshal_coclass(IWidget *widget, IDispatch *disp) hr = IDispatch_Invoke(disp, DISPID_TM_COCLASS_PTR, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); todo_wine - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk_in == (IUnknown *)&class1->ICoclass1_iface, "[in] parameter should not have changed.\n"); ok(!unk_out, "[out] parameter should have been cleared.\n"); ok(unk_in_out == (IUnknown *)&class3->ICoclass1_iface, "[in, out] parameter should not have changed.\n"); @@ -2833,20 +2833,20 @@ static void test_marshal_coclass(IWidget *widget, IDispatch *disp) hr = IDispatch_Invoke(disp, DISPID_TM_COCLASS_PTR, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); todo_wine - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (hr == S_OK) { hr = IUnknown_QueryInterface(unk_out, &IID_ICoclass1, (void **)&out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = ICoclass1_test(out); - ok(hr == 1, "Got hr %#x.\n", hr); + ok(hr == 1, "Got hr %#lx.\n", hr); ICoclass1_Release(out);
ok(unk_in_out != (IUnknown *)&class3->ICoclass1_iface, "[in, out] parameter should have changed.\n"); hr = IUnknown_QueryInterface(unk_in_out, &IID_ICoclass1, (void **)&in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = ICoclass1_test(in_out); - ok(hr == 1, "Got hr %#x.\n", hr); + ok(hr == 1, "Got hr %#lx.\n", hr); ICoclass1_Release(in_out);
release_iface(unk_out); @@ -2861,14 +2861,14 @@ if (hr == S_OK) { hr = IDispatch_Invoke(disp, DISPID_TM_COCLASS_PTR, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); todo_wine - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!unk_out, "[out] parameter should not have been set.\n"); if (hr == S_OK) { hr = IUnknown_QueryInterface(unk_in_out, &IID_ICoclass1, (void **)&in_out); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = ICoclass1_test(in_out); - ok(hr == 1, "Got hr %#x.\n", hr); + ok(hr == 1, "Got hr %#lx.\n", hr); ICoclass1_Release(in_out);
release_iface(unk_in_out); @@ -2882,7 +2882,7 @@ if (hr == S_OK) { hr = IDispatch_Invoke(disp, DISPID_TM_COCLASS_PTR, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); todo_wine - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(!unk_in_out, "[in, out] parameter should have been cleared.\n");
@@ -2954,7 +2954,7 @@ static void test_typelibmarshal(void) hr = IDispatch_Invoke(pDispatch, DISPID_TM_NAME, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYPUT, &dispparams, &varresult, &excepinfo, NULL); ok_ole_success(hr, IDispatch_Invoke); ok(excepinfo.wCode == 0x0 && excepinfo.scode == S_OK, - "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n", + "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08lx\n", excepinfo.wCode, excepinfo.scode); VariantClear(&varresult);
@@ -2973,7 +2973,7 @@ static void test_typelibmarshal(void) hr = IDispatch_Invoke(pDispatch, DISPID_TM_NAME, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL); ok_ole_success(hr, IDispatch_Invoke); ok(excepinfo.wCode == 0x0 && excepinfo.scode == S_OK, - "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n", + "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08lx\n", excepinfo.wCode, excepinfo.scode); trace("Name = %s\n", wine_dbgstr_w(V_BSTR(&varresult))); VariantClear(&varresult); @@ -3135,7 +3135,7 @@ static void test_typelibmarshal(void) ok_ole_success(hr, IDispatch_Invoke);
ok(excepinfo.wCode == 0x0 && excepinfo.scode == S_OK, - "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n", + "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08lx\n", excepinfo.wCode, excepinfo.scode);
ok(V_VT(&varresult) == VT_I2, "V_VT(&varresult) was %d instead of VT_I2\n", V_VT(&varresult)); @@ -3152,7 +3152,7 @@ static void test_typelibmarshal(void) ok_ole_success(hr, IDispatch_Invoke);
ok(excepinfo.wCode == 0x0 && excepinfo.scode == S_OK, - "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n", + "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08lx\n", excepinfo.wCode, excepinfo.scode);
ok(V_VT(&varresult) == VT_DISPATCH, "V_VT(&varresult) was %d instead of VT_DISPATCH\n", V_VT(&varresult)); @@ -3172,7 +3172,7 @@ static void test_typelibmarshal(void) ok_ole_success(hr, IDispatch_Invoke);
ok(excepinfo.wCode == 0x0 && excepinfo.scode == S_OK, - "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n", + "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08lx\n", excepinfo.wCode, excepinfo.scode);
ok(V_VT(&varresult) == VT_I2, "V_VT(&varresult) was %d instead of VT_I2\n", V_VT(&varresult)); @@ -3188,7 +3188,7 @@ static void test_typelibmarshal(void) dispparams.rgdispidNamedArgs = NULL; dispparams.rgvarg = vararg; hr = IDispatch_Invoke(pDispatch, DISPID_TM_ARRAY, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_TYPEMISMATCH || hr == DISP_E_BADVARTYPE, "expected DISP_E_TYPEMISMATCH, got %#x\n", hr); + ok(hr == DISP_E_TYPEMISMATCH || hr == DISP_E_BADVARTYPE, "expected DISP_E_TYPEMISMATCH, got %#lx\n", hr); SysFreeString(V_BSTR(&vararg[0]));
/* call ArrayPtr with BSTR argument - type mismatch */ @@ -3200,7 +3200,7 @@ static void test_typelibmarshal(void) dispparams.rgdispidNamedArgs = NULL; dispparams.rgvarg = vararg; hr = IDispatch_Invoke(pDispatch, DISPID_TM_VARARRAYPTR, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_TYPEMISMATCH || hr == DISP_E_BADVARTYPE, "expected DISP_E_TYPEMISMATCH, got %#x\n", hr); + ok(hr == DISP_E_TYPEMISMATCH || hr == DISP_E_BADVARTYPE, "expected DISP_E_TYPEMISMATCH, got %#lx\n", hr); SysFreeString(V_BSTR(&vararg[0]));
/* call VarArg */ @@ -3228,7 +3228,7 @@ static void test_typelibmarshal(void) dispparams.cNamedArgs = 1; dispparams.rgdispidNamedArgs = &dispidNamed; hr = IDispatch_Invoke(pDispatch, DISPID_TM_VARARG, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_NONAMEDARGS, "IDispatch_Invoke should have returned DISP_E_NONAMEDARGS instead of 0x%08x\n", hr); + ok(hr == DISP_E_NONAMEDARGS, "IDispatch_Invoke should have returned DISP_E_NONAMEDARGS instead of 0x%08lx\n", hr); dispidNamed = DISPID_PROPERTYPUT;
/* call VarArg_Run */ @@ -3270,9 +3270,9 @@ static void test_typelibmarshal(void) dispparams.rgvarg = NULL; VariantInit(&varresult); hr = IDispatch_Invoke(pDispatch, DISPID_TM_ERROR, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, &excepinfo, NULL); - ok(hr == DISP_E_EXCEPTION, "IDispatch_Invoke should have returned DISP_E_EXCEPTION instead of 0x%08x\n", hr); + ok(hr == DISP_E_EXCEPTION, "IDispatch_Invoke should have returned DISP_E_EXCEPTION instead of 0x%08lx\n", hr); ok(excepinfo.wCode == 0x0 && excepinfo.scode == E_NOTIMPL, - "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n", + "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08lx\n", excepinfo.wCode, excepinfo.scode); VariantClear(&varresult);
@@ -3295,10 +3295,10 @@ static void test_typelibmarshal(void) dispparams.rgdispidNamedArgs = NULL; dispparams.rgvarg = NULL; hr = ITypeInfo_Invoke(pTypeInfo, &NonOleAutomation, DISPID_NOA_ERROR, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_EXCEPTION, "ITypeInfo_Invoke should have returned DISP_E_EXCEPTION instead of 0x%08x\n", hr); + ok(hr == DISP_E_EXCEPTION, "ITypeInfo_Invoke should have returned DISP_E_EXCEPTION instead of 0x%08lx\n", hr); ok(V_VT(&varresult) == VT_EMPTY, "V_VT(&varresult) should be VT_EMPTY instead of %d\n", V_VT(&varresult)); ok(excepinfo.wCode == 0x0 && excepinfo.scode == E_NOTIMPL, - "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n", + "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08lx\n", excepinfo.wCode, excepinfo.scode); VariantClear(&varresult);
@@ -3312,7 +3312,7 @@ static void test_typelibmarshal(void) dispparams.rgvarg = vararg; VariantInit(&varresult); hr = IDispatch_Invoke(pDispatch, DISPID_TM_NAME, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYPUT, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_PARAMNOTFOUND, "IDispatch_Invoke should have returned DISP_E_PARAMNOTFOUND instead of 0x%08x\n", hr); + ok(hr == DISP_E_PARAMNOTFOUND, "IDispatch_Invoke should have returned DISP_E_PARAMNOTFOUND instead of 0x%08lx\n", hr); VariantClear(&varresult);
/* tests param type that cannot be coerced */ @@ -3325,7 +3325,7 @@ static void test_typelibmarshal(void) dispparams.rgvarg = vararg; VariantInit(&varresult); hr = IDispatch_Invoke(pDispatch, DISPID_TM_NAME, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYPUT, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_TYPEMISMATCH, "IDispatch_Invoke should have returned DISP_E_TYPEMISMATCH instead of 0x%08x\n", hr); + ok(hr == DISP_E_TYPEMISMATCH, "IDispatch_Invoke should have returned DISP_E_TYPEMISMATCH instead of 0x%08lx\n", hr); VariantClear(&varresult);
/* tests bad param type */ @@ -3338,7 +3338,7 @@ static void test_typelibmarshal(void) dispparams.rgvarg = vararg; VariantInit(&varresult); hr = IDispatch_Invoke(pDispatch, DISPID_TM_NAME, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYPUT, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_BADVARTYPE, "IDispatch_Invoke should have returned DISP_E_BADVARTYPE instead of 0x%08x\n", hr); + ok(hr == DISP_E_BADVARTYPE, "IDispatch_Invoke should have returned DISP_E_BADVARTYPE instead of 0x%08lx\n", hr); VariantClear(&varresult);
/* tests too small param count */ @@ -3348,7 +3348,7 @@ static void test_typelibmarshal(void) dispparams.rgvarg = NULL; VariantInit(&varresult); hr = IDispatch_Invoke(pDispatch, DISPID_TM_DOSOMETHING, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_BADPARAMCOUNT, "IDispatch_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08x\n", hr); + ok(hr == DISP_E_BADPARAMCOUNT, "IDispatch_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08lx\n", hr); VariantClear(&varresult);
/* tests propget function with large param count */ @@ -3362,7 +3362,7 @@ static void test_typelibmarshal(void) dispparams.rgdispidNamedArgs = NULL; dispparams.rgvarg = vararg; hr = IDispatch_Invoke(pDispatch, DISPID_TM_STATE, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_NOTACOLLECTION, "IDispatch_Invoke should have returned DISP_E_NOTACOLLECTION instead of 0x%08x\n", hr); + ok(hr == DISP_E_NOTACOLLECTION, "IDispatch_Invoke should have returned DISP_E_NOTACOLLECTION instead of 0x%08lx\n", hr);
/* test propput with lcid */
@@ -3388,7 +3388,7 @@ static void test_typelibmarshal(void) hr = IDispatch_Invoke(pDispatch, DISPID_TM_PROP_WITH_LCID, &IID_NULL, 0x40c, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL); ok_ole_success(hr, ITypeInfo_Invoke); ok(V_VT(&varresult) == VT_I4, "got %x\n", V_VT(&varresult)); - ok(V_I4(&varresult) == 0x409, "got %x\n", V_I4(&varresult)); + ok(V_I4(&varresult) == 0x409, "got %lx\n", V_I4(&varresult)); VariantClear(&varresult);
/* test propget of INT value */ @@ -3399,7 +3399,7 @@ static void test_typelibmarshal(void) hr = IDispatch_Invoke(pDispatch, DISPID_TM_PROP_INT, &IID_NULL, 0x40c, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL); ok_ole_success(hr, ITypeInfo_Invoke); ok(V_VT(&varresult) == VT_I4, "got %x\n", V_VT(&varresult)); - ok(V_I4(&varresult) == -13, "got %x\n", V_I4(&varresult)); + ok(V_I4(&varresult) == -13, "got %lx\n", V_I4(&varresult)); VariantClear(&varresult);
/* test propget of INT value */ @@ -3410,7 +3410,7 @@ static void test_typelibmarshal(void) hr = IDispatch_Invoke(pDispatch, DISPID_TM_PROP_UINT, &IID_NULL, 0x40c, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL); ok_ole_success(hr, ITypeInfo_Invoke); ok(V_VT(&varresult) == VT_UI4, "got %x\n", V_VT(&varresult)); - ok(V_UI4(&varresult) == 42, "got %x\n", V_UI4(&varresult)); + ok(V_UI4(&varresult) == 42, "got %lx\n", V_UI4(&varresult)); VariantClear(&varresult);
/* test byref marshalling */ @@ -3427,7 +3427,7 @@ static void test_typelibmarshal(void) ok(V_VT(&varresult) == VT_EMPTY, "varresult should be VT_EMPTY\n"); ok(V_VT(&vararg[0]) == (VT_UI4|VT_BYREF), "arg VT not unmarshalled correctly: %x\n", V_VT(&vararg[0])); ok(V_UI4REF(&vararg[0]) == (ULONG *)&uval, "Byref pointer not preserved: %p/%p\n", &uval, V_UI4REF(&vararg[0])); - ok(*V_UI4REF(&vararg[0]) == 42, "Expected 42 to be returned instead of %u\n", *V_UI4REF(&vararg[0])); + ok(*V_UI4REF(&vararg[0]) == 42, "Expected 42 to be returned instead of %lu\n", *V_UI4REF(&vararg[0])); VariantClear(&varresult); VariantClear(&vararg[0]);
@@ -3467,7 +3467,7 @@ static void test_typelibmarshal(void) dispparams.rgvarg = NULL; VariantInit(&varresult); hr = IDispatch_Invoke(pDispatch, DISPID_TM_RESTRICTED, &IID_NULL, 0x40c, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok( hr == DISP_E_MEMBERNOTFOUND, "got %08x\n", hr ); + ok( hr == DISP_E_MEMBERNOTFOUND, "got %08lx\n", hr ); VariantClear(&varresult);
/* restricted member with -ve memid (not restricted) */ @@ -3477,9 +3477,9 @@ static void test_typelibmarshal(void) dispparams.rgvarg = NULL; VariantInit(&varresult); hr = IDispatch_Invoke(pDispatch, DISPID_TM_NEG_RESTRICTED, &IID_NULL, 0x40c, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); ok(V_VT(&varresult) == VT_I4, "got %x\n", V_VT(&varresult)); - ok(V_I4(&varresult) == DISPID_TM_NEG_RESTRICTED, "got %x\n", V_I4(&varresult)); + ok(V_I4(&varresult) == DISPID_TM_NEG_RESTRICTED, "got %lx\n", V_I4(&varresult)); VariantClear(&varresult);
test_marshal_basetypes(pWidget, pDispatch); @@ -3586,7 +3586,7 @@ static void test_libattr(void) ok_ole_success(hr, GetLibAttr); if (SUCCEEDED(hr)) { - ok(pattr->lcid == MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), "lcid %x\n", pattr->lcid); + ok(pattr->lcid == MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), "lcid %lx\n", pattr->lcid);
ITypeLib_ReleaseTLibAttr(pTypeLib, pattr); } @@ -3612,13 +3612,13 @@ static void test_external_connection(void) /* Marshaling an interface increases external connection count. */ expect_last_release_closes = FALSE; hres = CreateStreamOnHGlobal(NULL, TRUE, &stream); - ok(hres == S_OK, "CreateStreamOnHGlobal failed: %08x\n", hres); + ok(hres == S_OK, "CreateStreamOnHGlobal failed: %08lx\n", hres); tid = start_host_object(stream, &IID_ItestDual, (IUnknown*)&TestDual, MSHLFLAGS_NORMAL, &thread); ok(external_connections == 1, "external_connections = %d\n", external_connections);
IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); hres = CoUnmarshalInterface(stream, &IID_ItestDual, (void**)&iface); - ok(hres == S_OK, "CoUnmarshalInterface failed: %08x\n", hres); + ok(hres == S_OK, "CoUnmarshalInterface failed: %08lx\n", hres); if (FAILED(hres)) { end_host_object(tid, thread); @@ -3632,7 +3632,7 @@ static void test_external_connection(void)
/* Creating a stub for new iface causes new external connection. */ hres = ItestDual_QueryInterface(iface, &IID_ITestSecondDisp, (void**)&second); - ok(hres == S_OK, "Could not get ITestSecondDisp iface: %08x\n", hres); + ok(hres == S_OK, "Could not get ITestSecondDisp iface: %08lx\n", hres); todo_wine ok(external_connections == 2, "external_connections = %d\n", external_connections);
@@ -3648,42 +3648,42 @@ static void test_external_connection(void)
/* A test with direct CoMarshalInterface call. */ hres = CreateStreamOnHGlobal(NULL, TRUE, &stream); - ok(hres == S_OK, "CreateStreamOnHGlobal failed: %08x\n", hres); + ok(hres == S_OK, "CreateStreamOnHGlobal failed: %08lx\n", hres);
expect_last_release_closes = FALSE; hres = CoMarshalInterface(stream, &IID_ItestDual, (IUnknown*)&TestDual, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok(hres == S_OK, "CoMarshalInterface failed: %08x\n", hres); + ok(hres == S_OK, "CoMarshalInterface failed: %08lx\n", hres); ok(external_connections == 1, "external_connections = %d\n", external_connections);
expect_last_release_closes = TRUE; IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); hres = CoReleaseMarshalData(stream); - ok(hres == S_OK, "CoReleaseMarshalData failed: %08x\n", hres); + ok(hres == S_OK, "CoReleaseMarshalData failed: %08lx\n", hres); ok(external_connections == 0, "external_connections = %d\n", external_connections);
/* Two separated marshal data are still one external connection. */ hres = CreateStreamOnHGlobal(NULL, TRUE, &stream2); - ok(hres == S_OK, "CreateStreamOnHGlobal failed: %08x\n", hres); + ok(hres == S_OK, "CreateStreamOnHGlobal failed: %08lx\n", hres);
expect_last_release_closes = FALSE; IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); hres = CoMarshalInterface(stream, &IID_ItestDual, (IUnknown*)&TestDual, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok(hres == S_OK, "CoMarshalInterface failed: %08x\n", hres); + ok(hres == S_OK, "CoMarshalInterface failed: %08lx\n", hres); ok(external_connections == 1, "external_connections = %d\n", external_connections);
hres = CoMarshalInterface(stream2, &IID_ItestDual, (IUnknown*)&TestDual, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok(hres == S_OK, "CoMarshalInterface failed: %08x\n", hres); + ok(hres == S_OK, "CoMarshalInterface failed: %08lx\n", hres); ok(external_connections == 1, "external_connections = %d\n", external_connections);
IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); hres = CoReleaseMarshalData(stream); - ok(hres == S_OK, "CoReleaseMarshalData failed: %08x\n", hres); + ok(hres == S_OK, "CoReleaseMarshalData failed: %08lx\n", hres); ok(external_connections == 1, "external_connections = %d\n", external_connections);
expect_last_release_closes = TRUE; IStream_Seek(stream2, zero, STREAM_SEEK_SET, NULL); hres = CoReleaseMarshalData(stream2); - ok(hres == S_OK, "CoReleaseMarshalData failed: %08x\n", hres); + ok(hres == S_OK, "CoReleaseMarshalData failed: %08lx\n", hres); ok(external_connections == 0, "external_connections = %d\n", external_connections);
IStream_Release(stream); @@ -3691,21 +3691,21 @@ static void test_external_connection(void)
/* Weak table marshaling does not increment external connections */ hres = CreateStreamOnHGlobal(NULL, TRUE, &stream); - ok(hres == S_OK, "CreateStreamOnHGlobal failed: %08x\n", hres); + ok(hres == S_OK, "CreateStreamOnHGlobal failed: %08lx\n", hres);
hres = CoMarshalInterface(stream, &IID_ItestDual, (IUnknown*)&TestDual, MSHCTX_INPROC, NULL, MSHLFLAGS_TABLEWEAK); - ok(hres == S_OK, "CoMarshalInterface failed: %08x\n", hres); + ok(hres == S_OK, "CoMarshalInterface failed: %08lx\n", hres); ok(external_connections == 0, "external_connections = %d\n", external_connections);
IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); hres = CoUnmarshalInterface(stream, &IID_ItestDual, (void**)&iface); - ok(hres == S_OK, "CoUnmarshalInterface failed: %08x\n", hres); + ok(hres == S_OK, "CoUnmarshalInterface failed: %08lx\n", hres); ok(external_connections == 0, "external_connections = %d\n", external_connections); ItestDual_Release(iface);
IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); hres = CoReleaseMarshalData(stream); - ok(hres == S_OK, "CoReleaseMarshalData failed: %08x\n", hres); + ok(hres == S_OK, "CoReleaseMarshalData failed: %08lx\n", hres); ok(external_connections == 0, "external_connections = %d\n", external_connections);
IStream_Release(stream); @@ -3728,18 +3728,18 @@ static void test_marshal_dispinterface(void) tid = start_host_object(stream, &DIID_ItestIF4, (IUnknown *)disp_obj, MSHLFLAGS_NORMAL, &thread); IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); hr = CoUnmarshalInterface(stream, &DIID_ItestIF4, (void **)&proxy_disp); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDispatch_GetTypeInfo(proxy_disp, 0xdeadbeef, 0, &typeinfo); - ok(hr == 0xbeefdead, "Got hr %#x.\n", hr); + ok(hr == 0xbeefdead, "Got hr %#lx.\n", hr);
ref = IDispatch_Release(proxy_disp); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IStream_Release(stream); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); end_host_object(tid, thread); ref = ISomethingFromDispatch_Release(disp_obj); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
START_TEST(tmarshal) diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index 4266243c1ba..da40ac737c8 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -58,12 +58,12 @@
#define ole_expect(expr, expect) { \ HRESULT r = expr; \ - ok(r == (expect), #expr " returned %x, expected %s (%x)\n", r, #expect, expect); \ + ok(r == (expect), #expr " returned %lx, expected %s (%lx)\n", r, #expect, expect); \ }
#define ole_check(expr) ole_expect(expr, S_OK);
-#define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error 0x%08x\n", hr) +#define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error %#08lx\n", hr)
#ifdef __i386__ #define ARCH "x86" @@ -83,7 +83,7 @@ static void _expect_ref(IUnknown* obj, ULONG ref, int line) ULONG rc; IUnknown_AddRef(obj); rc = IUnknown_Release(obj); - ok_(__FILE__,line)(rc == ref, "expected refcount %d, got %d\n", ref, rc); + ok_(__FILE__,line)(rc == ref, "expected refcount %ld, got %ld\n", ref, rc); }
static HRESULT (WINAPI *pRegisterTypeLibForUser)(ITypeLib*,OLECHAR*,OLECHAR*); @@ -161,7 +161,7 @@ static HRESULT WINAPI collection_Invoke(ICollection *iface, DISPID dispid, REFII ok(dispparams->cArgs == 1, "dispparams->cArgs = %d\n", dispparams->cArgs); ok(!dispparams->cNamedArgs, "dispparams->cNamedArgs = %d\n", dispparams->cNamedArgs); ok(V_VT(dispparams->rgvarg) == VT_I4, "V_VT(dispparams->rgvarg) = %d\n", V_VT(dispparams->rgvarg)); - ok(V_I4(dispparams->rgvarg) == 7, "V_I4(dispparams->rgvarg) = %d\n", V_I4(dispparams->rgvarg)); + ok(V_I4(dispparams->rgvarg) == 7, "V_I4(dispparams->rgvarg) = %ld\n", V_I4(dispparams->rgvarg)); ok(res != NULL, "res == NULL\n"); ok(V_VT(res) == VT_EMPTY, "V_VT(res) = %d\n", V_VT(res));
@@ -393,7 +393,7 @@ static void test_TypeComp(void) ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszSavePicture); hr = ITypeComp_Bind(pTypeComp, wszSavePicture, ulHash, INVOKE_PROPERTYGET, &pTypeInfo, &desckind, &bindptr); ok(hr == TYPE_E_TYPEMISMATCH, - "ITypeComp_Bind should have failed with TYPE_E_TYPEMISMATCH instead of 0x%08x\n", + "ITypeComp_Bind should have failed with TYPE_E_TYPEMISMATCH instead of 0x%08lx\n", hr);
ok(desckind == DESCKIND_NONE, @@ -483,25 +483,25 @@ static void test_TypeComp(void) /* test basic BindType argument handling */ ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszGUID); hr = ITypeComp_BindType(pTypeComp, wszGUID, ulHash, NULL, NULL); - ok(hr == E_INVALIDARG, "Got %08x\n", hr); + ok(hr == E_INVALIDARG, "Got %08lx\n", hr);
ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszGUID); pTypeInfo = (void*)0xdeadbeef; hr = ITypeComp_BindType(pTypeComp, wszGUID, ulHash, &pTypeInfo, NULL); - ok(hr == E_INVALIDARG, "Got %08x\n", hr); + ok(hr == E_INVALIDARG, "Got %08lx\n", hr); ok(pTypeInfo == (void*)0xdeadbeef, "Got %p\n", pTypeInfo);
ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszGUID); pTypeComp_tmp = (void*)0xdeadbeef; hr = ITypeComp_BindType(pTypeComp, wszGUID, ulHash, NULL, &pTypeComp_tmp); - ok(hr == E_INVALIDARG, "Got %08x\n", hr); + ok(hr == E_INVALIDARG, "Got %08lx\n", hr); ok(pTypeComp_tmp == (void*)0xdeadbeef, "Got %p\n", pTypeComp_tmp);
ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszGUID); pTypeComp_tmp = (void*)0xdeadbeef; pTypeInfo = (void*)0xdeadbeef; hr = ITypeComp_BindType(pTypeComp, NULL, ulHash, &pTypeInfo, &pTypeComp_tmp); - ok(hr == E_INVALIDARG, "Got %08x\n", hr); + ok(hr == E_INVALIDARG, "Got %08lx\n", hr); ok(pTypeInfo == (void*)0xdeadbeef, "Got %p\n", pTypeInfo); ok(pTypeComp_tmp == (void*)0xdeadbeef, "Got %p\n", pTypeComp_tmp);
@@ -536,11 +536,11 @@ static void test_TypeComp(void) ok_ole_success(hr, ITypeLib_GetTypeComp);
hr = ITypeInfo_QueryInterface(pFontTypeInfo, &IID_ITypeComp, (void**)&tcomp); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(tcomp == pTypeComp, "got %p, was %p\n", tcomp, pTypeComp);
hr = ITypeComp_QueryInterface(tcomp, &IID_ITypeInfo, (void**)&ti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(ti == pFontTypeInfo, "got %p, was %p\n", ti, pFontTypeInfo); ITypeInfo_Release(ti);
@@ -559,7 +559,7 @@ static void test_TypeComp(void)
ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszClone); hr = ITypeComp_Bind(pTypeComp, wszClone, ulHash, INVOKE_PROPERTYGET, &pTypeInfo, &desckind, &bindptr); - ok(hr == TYPE_E_TYPEMISMATCH, "ITypeComp_Bind should have failed with TYPE_E_TYPEMISMATCH instead of 0x%08x\n", hr); + ok(hr == TYPE_E_TYPEMISMATCH, "ITypeComp_Bind should have failed with TYPE_E_TYPEMISMATCH instead of 0x%08lx\n", hr);
ok(desckind == DESCKIND_NONE, "desckind should have been DESCKIND_NONE instead of %d\n", @@ -674,10 +674,10 @@ static void test_CreateDispTypeInfo(void) methdata[3].vtReturn = VT_I4;
hr = CreateDispTypeInfo(&ifdata, LOCALE_NEUTRAL, &pTypeInfo); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr);
hr = ITypeInfo_GetTypeAttr(pTypeInfo, &pTypeAttr); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr);
ok(pTypeAttr->typekind == TKIND_COCLASS, "typekind %0x\n", pTypeAttr->typekind); ok(pTypeAttr->cImplTypes == 1, "cImplTypes %d\n", pTypeAttr->cImplTypes); @@ -686,12 +686,12 @@ static void test_CreateDispTypeInfo(void) ITypeInfo_ReleaseTypeAttr(pTypeInfo, pTypeAttr);
hr = ITypeInfo_GetRefTypeOfImplType(pTypeInfo, 0, &href); - ok(hr == S_OK, "hr %08x\n", hr); - ok(href == 0, "href = 0x%x\n", href); + ok(hr == S_OK, "hr %08lx\n", hr); + ok(href == 0, "href = 0x%lx\n", href); hr = ITypeInfo_GetRefTypeInfo(pTypeInfo, href, &pTI2); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetTypeAttr(pTI2, &pTypeAttr); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); ok(pTypeAttr->typekind == TKIND_INTERFACE, "typekind %0x\n", pTypeAttr->typekind); ok(pTypeAttr->cFuncs == 4, "cFuncs %d\n", pTypeAttr->cFuncs); ok(IsEqualGUID(&pTypeAttr->guid, &GUID_NULL), "guid %s\n", debugstr_guid(&pTypeAttr->guid)); @@ -700,8 +700,8 @@ static void test_CreateDispTypeInfo(void) ITypeInfo_ReleaseTypeAttr(pTI2, pTypeAttr);
hr = ITypeInfo_GetFuncDesc(pTI2, 0, &pFuncDesc); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pFuncDesc->memid == 0x123, "memid %x\n", pFuncDesc->memid); + ok(hr == S_OK, "hr %08lx\n", hr); + ok(pFuncDesc->memid == 0x123, "memid %lx\n", pFuncDesc->memid); ok(pFuncDesc->funckind == FUNC_VIRTUAL, "funckind %d\n", pFuncDesc->funckind); ok(pFuncDesc->invkind == methdata[0].wFlags, "invkind %d\n", pFuncDesc->invkind); ok(pFuncDesc->callconv == methdata[0].cc, "callconv %d\n", pFuncDesc->callconv); @@ -717,7 +717,7 @@ static void test_CreateDispTypeInfo(void) ITypeInfo_ReleaseFuncDesc(pTI2, pFuncDesc);
hr = ITypeInfo_GetFuncDesc(pTI2, 1, &pFuncDesc); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); ok(pFuncDesc->funckind == FUNC_VIRTUAL, "funckind %d\n", pFuncDesc->funckind); ok(pFuncDesc->invkind == methdata[1].wFlags, "invkind %d\n", pFuncDesc->invkind); ok(pFuncDesc->callconv == methdata[1].cc, "callconv %d\n", pFuncDesc->callconv); @@ -728,7 +728,7 @@ static void test_CreateDispTypeInfo(void) ITypeInfo_ReleaseFuncDesc(pTI2, pFuncDesc);
hr = ITypeInfo_GetFuncDesc(pTI2, 2, &pFuncDesc); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); ok(pFuncDesc->funckind == FUNC_VIRTUAL, "funckind %d\n", pFuncDesc->funckind); ok(pFuncDesc->invkind == methdata[2].wFlags, "invkind %d\n", pFuncDesc->invkind); ok(pFuncDesc->callconv == methdata[2].cc, "callconv %d\n", pFuncDesc->callconv); @@ -741,7 +741,7 @@ static void test_CreateDispTypeInfo(void) ITypeInfo_ReleaseFuncDesc(pTI2, pFuncDesc);
hr = ITypeInfo_GetFuncDesc(pTI2, 3, &pFuncDesc); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); ok(pFuncDesc->funckind == FUNC_VIRTUAL, "funckind %d\n", pFuncDesc->funckind); ok(pFuncDesc->invkind == methdata[3].wFlags, "invkind %d\n", pFuncDesc->invkind); ok(pFuncDesc->callconv == methdata[3].cc, "callconv %d\n", pFuncDesc->callconv); @@ -753,8 +753,8 @@ static void test_CreateDispTypeInfo(void)
/* test GetIDsOfNames on a coclass to see if it searches its interfaces */ hr = ITypeInfo_GetIDsOfNames(pTypeInfo, &name, 1, &memid); - ok(hr == S_OK, "hr 0x%08x\n", hr); - ok(memid == 0x123, "memid 0x%08x\n", memid); + ok(hr == S_OK, "hr 0x%08lx\n", hr); + ok(memid == 0x123, "memid 0x%08lx\n", memid);
ITypeInfo_Release(pTI2); ITypeInfo_Release(pTypeInfo); @@ -798,9 +798,9 @@ static void test_invoke_func(ITypeInfo *typeinfo) V_INT(args) = 3; V_VT(&res) = VT_ERROR; hres = ITypeInfo_Invoke(typeinfo, &invoketest, 3, DISPATCH_METHOD, &dp, &res, NULL, &i); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(V_VT(&res) == VT_I4, "got %d\n", V_VT(&res)); - ok(V_I4(&res) == 4, "got %d\n", V_I4(&res)); + ok(V_I4(&res) == 4, "got %ld\n", V_I4(&res));
V_VT(args) = VT_DISPATCH; V_DISPATCH(args) = (IDispatch*)&invoketest; @@ -810,7 +810,7 @@ static void test_invoke_func(ITypeInfo *typeinfo) dp.cNamedArgs = 1; dp.cArgs = 2; hres = ITypeInfo_Invoke(typeinfo, &invoketest, 3, DISPATCH_METHOD, &dp, &res, NULL, &i); - ok(hres == DISP_E_BADPARAMCOUNT, "got 0x%08x\n", hres); + ok(hres == DISP_E_BADPARAMCOUNT, "got 0x%08lx\n", hres); }
static WCHAR *create_test_typelib(int res_no) @@ -856,22 +856,22 @@ static void test_TypeInfo(void)
/* invalid index */ hr = ITypeLib_GetTypeInfo(pTypeLib, count, &pTypeInfo); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "got 0x%08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "got 0x%08lx\n", hr);
hr = ITypeLib_GetTypeInfo(pTypeLib, 0, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = ITypeLib_GetLibAttr(pTypeLib, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = ITypeLib_GetTypeInfoType(pTypeLib, count, &kind); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "got 0x%08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "got 0x%08lx\n", hr);
hr = ITypeLib_GetTypeInfoType(pTypeLib, count, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = ITypeLib_GetTypeInfoType(pTypeLib, 0, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = ITypeLib_GetTypeInfoOfGuid(pTypeLib, &IID_IFont, &pTypeInfo); ok_ole_success(hr, ITypeLib_GetTypeInfoOfGuid); @@ -879,7 +879,7 @@ static void test_TypeInfo(void) /* test nonexistent method name */ hr = ITypeInfo_GetIDsOfNames(pTypeInfo, &bogus, 1, &dispidMember); ok(hr == DISP_E_UNKNOWNNAME, - "ITypeInfo_GetIDsOfNames should have returned DISP_E_UNKNOWNNAME instead of 0x%08x\n", + "ITypeInfo_GetIDsOfNames should have returned DISP_E_UNKNOWNNAME instead of 0x%08lx\n", hr);
dispparams.cArgs = 0; @@ -891,18 +891,18 @@ static void test_TypeInfo(void) /* invalid member id -- wrong flags -- cNamedArgs not bigger than cArgs */ dispparams.cNamedArgs = 0; hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, 0xdeadbeef, DISPATCH_PROPERTYGET, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\n", hr); /* invalid member id -- correct flags -- cNamedArgs not bigger than cArgs */ hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, 0xdeadbeef, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\n", hr);
/* invalid member id -- wrong flags -- cNamedArgs bigger than cArgs */ dispparams.cNamedArgs = 1; hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, 0xdeadbeef, DISPATCH_PROPERTYGET, &dispparams, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08lx\n", hr); /* invalid member id -- correct flags -- cNamedArgs bigger than cArgs */ hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, 0xdeadbeef, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
hr = ITypeInfo_GetIDsOfNames(pTypeInfo, &pwszClone, 1, &dispidMember); @@ -911,36 +911,36 @@ static void test_TypeInfo(void) /* correct member id -- wrong flags -- cNamedArgs not bigger than cArgs */ dispparams.cNamedArgs = 0; hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_PROPERTYGET, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\n", hr); /* correct member id -- correct flags -- cNamedArgs not bigger than cArgs */ hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_BADPARAMCOUNT, "ITypeInfo_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08x\n", hr); + ok(hr == DISP_E_BADPARAMCOUNT, "ITypeInfo_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08lx\n", hr);
/* correct member id -- wrong flags -- cNamedArgs bigger than cArgs */ dispparams.cNamedArgs = 1; hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_PROPERTYGET, &dispparams, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08lx\n", hr); /* correct member id -- correct flags -- cNamedArgs bigger than cArgs */ hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
/* test NULL dispparams */
/* correct member id -- wrong flags -- cNamedArgs not bigger than cArgs */ dispparams.cNamedArgs = 0; hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_PROPERTYGET, NULL, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08lx\n", hr); /* correct member id -- correct flags -- cNamedArgs not bigger than cArgs */ hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_METHOD, NULL, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
/* correct member id -- wrong flags -- cNamedArgs bigger than cArgs */ dispparams.cNamedArgs = 1; hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_PROPERTYGET, NULL, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08lx\n", hr); /* correct member id -- correct flags -- cNamedArgs bigger than cArgs */ hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_METHOD, NULL, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08lx\n", hr);
ITypeInfo_Release(pTypeInfo);
@@ -972,17 +972,17 @@ static void test_TypeInfo(void) /* Check instance size for IDispatch, typelib is loaded using system SYS_WIN* kind so it always matches system bitness. */ hr = ITypeInfo_GetTypeAttr(pTypeInfo, &attr); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(attr->cbSizeInstance == sizeof(void*), "got size %d\n", attr->cbSizeInstance); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(attr->cbSizeInstance == sizeof(void*), "got size %ld\n", attr->cbSizeInstance); ok(attr->typekind == TKIND_INTERFACE, "got typekind %d\n", attr->typekind); ITypeInfo_ReleaseTypeAttr(pTypeInfo, attr);
/* same size check with some general interface */ hr = ITypeLib_GetTypeInfoOfGuid(pTypeLib, &IID_IEnumVARIANT, &ti); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = ITypeInfo_GetTypeAttr(ti, &attr); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(attr->cbSizeInstance == sizeof(void*), "got size %d\n", attr->cbSizeInstance); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(attr->cbSizeInstance == sizeof(void*), "got size %ld\n", attr->cbSizeInstance); ITypeInfo_ReleaseTypeAttr(ti, attr); ITypeInfo_Release(ti);
@@ -991,43 +991,43 @@ static void test_TypeInfo(void) /* correct member id -- wrong flags -- cNamedArgs not bigger than cArgs */ dispparams.cNamedArgs = 0; hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_PROPERTYGET, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\n", hr); /* correct member id -- correct flags -- cNamedArgs not bigger than cArgs */ hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\n", hr);
/* correct member id -- wrong flags -- cNamedArgs bigger than cArgs */ dispparams.cNamedArgs = 1; hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_PROPERTYGET, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\n", hr); /* correct member id -- correct flags -- cNamedArgs bigger than cArgs */ hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\n", hr);
/* test NULL dispparams */
/* correct member id -- wrong flags -- cNamedArgs not bigger than cArgs */ dispparams.cNamedArgs = 0; hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_PROPERTYGET, NULL, NULL, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\n", hr); /* correct member id -- correct flags -- cNamedArgs not bigger than cArgs */ hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_METHOD, NULL, NULL, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\n", hr);
/* correct member id -- wrong flags -- cNamedArgs bigger than cArgs */ dispparams.cNamedArgs = 1; hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_PROPERTYGET, NULL, NULL, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\n", hr); /* correct member id -- correct flags -- cNamedArgs bigger than cArgs */ hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_METHOD, NULL, NULL, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); + ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\n", hr);
ITypeInfo_Release(pTypeInfo); ITypeLib_Release(pTypeLib);
filename = create_test_typelib(3); hr = LoadTypeLib(filename, &pTypeLib); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* test GetDllEntry */ hr = ITypeLib_GetTypeInfoOfGuid(pTypeLib, &moduleTestGetDllEntryGuid, &pTypeInfo); @@ -1036,24 +1036,24 @@ static void test_TypeInfo(void)
/* wrong memberid -- wrong invkind */ hr = ITypeInfo_GetDllEntry(pTypeInfo, 0x6000000d, INVOKE_FUNC, &bstrDllName, &bstrName, &ordinal); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "ITypeInfo_GetDllEntry should have returned TYPE_E_ELEMENTNOTFOUND instead of 0x%08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "ITypeInfo_GetDllEntry should have returned TYPE_E_ELEMENTNOTFOUND instead of 0x%08lx\n", hr);
hr = ITypeInfo_GetDllEntry(pTypeInfo, 0x6000000d, INVOKE_PROPERTYPUTREF, &bstrDllName, &bstrName, &ordinal); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "ITypeInfo_GetDllEntry should have returned TYPE_E_ELEMENTNOTFOUND instead of 0x%08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "ITypeInfo_GetDllEntry should have returned TYPE_E_ELEMENTNOTFOUND instead of 0x%08lx\n", hr);
/* wrong memberid -- correct invkind */ hr = ITypeInfo_GetDllEntry(pTypeInfo, 0x6000000d, INVOKE_PROPERTYGET, &bstrDllName, &bstrName, &ordinal); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "ITypeInfo_GetDllEntry should have returned TYPE_E_ELEMENTNOTFOUND instead of 0x%08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "ITypeInfo_GetDllEntry should have returned TYPE_E_ELEMENTNOTFOUND instead of 0x%08lx\n", hr);
hr = ITypeInfo_GetDllEntry(pTypeInfo, 0x6000000d, INVOKE_PROPERTYPUT, &bstrDllName, &bstrName, &ordinal); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "ITypeInfo_GetDllEntry should have returned TYPE_E_ELEMENTNOTFOUND instead of 0x%08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "ITypeInfo_GetDllEntry should have returned TYPE_E_ELEMENTNOTFOUND instead of 0x%08lx\n", hr);
/* correct memberid -- wrong invkind */ hr = ITypeInfo_GetDllEntry(pTypeInfo, 0x60000000, INVOKE_FUNC, &bstrDllName, &bstrName, &ordinal); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "ITypeInfo_GetDllEntry should have returned TYPE_E_ELEMENTNOTFOUND instead of 0x%08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "ITypeInfo_GetDllEntry should have returned TYPE_E_ELEMENTNOTFOUND instead of 0x%08lx\n", hr);
hr = ITypeInfo_GetDllEntry(pTypeInfo, 0x60000000, INVOKE_PROPERTYPUTREF, &bstrDllName, &bstrName, &ordinal); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "ITypeInfo_GetDllEntry should have returned TYPE_E_ELEMENTNOTFOUND instead of 0x%08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "ITypeInfo_GetDllEntry should have returned TYPE_E_ELEMENTNOTFOUND instead of 0x%08lx\n", hr);
/* correct memberid -- correct invkind */ hr = ITypeInfo_GetDllEntry(pTypeInfo, 0x60000000, INVOKE_PROPERTYGET, &bstrDllName, &bstrName, &ordinal); @@ -1073,7 +1073,7 @@ static void test_TypeInfo(void) ITypeInfo_Release(pTypeInfo);
hr = ITypeLib_GetTypeInfoOfGuid(pTypeLib, &IID_IInvokeTest, &pTypeInfo); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
dispparams.cArgs = 1; dispparams.cNamedArgs = 0; @@ -1089,24 +1089,24 @@ static void test_TypeInfo(void) /* call propget with DISPATCH_METHOD|DISPATCH_PROPERTYGET flags */ hr = ITypeInfo_Invoke(pTypeInfo, &invoketest, DISPID_VALUE, DISPATCH_METHOD|DISPATCH_PROPERTYGET, &dispparams, &res, NULL, &i); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(V_VT(&res) == VT_I4, "got %d\n", V_VT(&res)); - ok(V_I4(&res) == 1, "got %d\n", V_I4(&res)); + ok(V_I4(&res) == 1, "got %ld\n", V_I4(&res));
i = 0; /* call propget with DISPATCH_METHOD flags */ hr = ITypeInfo_Invoke(pTypeInfo, &invoketest, DISPID_VALUE, DISPATCH_METHOD, &dispparams, &res, NULL, &i); - ok(hr == DISP_E_MEMBERNOTFOUND, "got 0x%08x, %d\n", hr, i); + ok(hr == DISP_E_MEMBERNOTFOUND, "got 0x%08lx, %d\n", hr, i);
i = 0; V_VT(&res) = VT_EMPTY; V_I4(&res) = 0; hr = ITypeInfo_Invoke(pTypeInfo, &invoketest, DISPID_VALUE, DISPATCH_PROPERTYGET, &dispparams, &res, NULL, &i); - ok(hr == S_OK, "got 0x%08x, %d\n", hr, i); + ok(hr == S_OK, "got 0x%08lx, %d\n", hr, i); ok(V_VT(&res) == VT_I4, "got %d\n", V_VT(&res)); - ok(V_I4(&res) == 1, "got %d\n", V_I4(&res)); + ok(V_I4(&res) == 1, "got %ld\n", V_I4(&res));
/* call propget with DISPATCH_METHOD|DISPATCH_PROPERTYGET flags */ V_VT(&args[0]) = VT_I4; @@ -1119,9 +1119,9 @@ static void test_TypeInfo(void) V_VT(&res) = VT_EMPTY; V_I4(&res) = 0; hr = ITypeInfo_Invoke(pTypeInfo, &invoketest, 4, DISPATCH_METHOD|DISPATCH_PROPERTYGET, &dispparams, &res, NULL, &i); - ok(hr == S_OK, "got 0x%08x, %d\n", hr, i); + ok(hr == S_OK, "got 0x%08lx, %d\n", hr, i); ok(V_VT(&res) == VT_I4, "got %d\n", V_VT(&res)); - ok(V_I4(&res) == 15, "got %d\n", V_I4(&res)); + ok(V_I4(&res) == 15, "got %ld\n", V_I4(&res));
/* DISPATCH_PROPERTYPUTREF */ @@ -1139,15 +1139,15 @@ static void test_TypeInfo(void) V_VT(&res) = VT_EMPTY; V_I4(&res) = 0; hr = ITypeInfo_Invoke(pTypeInfo, &invoketest, 1, DISPATCH_PROPERTYPUTREF, &dispparams, &res, NULL, &i); - ok(hr == S_OK, "got 0x%08x, %d\n", hr, i); + ok(hr == S_OK, "got 0x%08lx, %d\n", hr, i); ok(V_VT(&res) == VT_I4, "got %d\n", V_VT(&res)); - ok(V_I4(&res) == 3, "got %d\n", V_I4(&res)); + ok(V_I4(&res) == 3, "got %ld\n", V_I4(&res));
i = 0; V_VT(&res) = VT_EMPTY; V_I4(&res) = 0; hr = ITypeInfo_Invoke(pTypeInfo, &invoketest, 1, DISPATCH_PROPERTYPUT, &dispparams, &res, NULL, &i); - ok(hr == DISP_E_MEMBERNOTFOUND, "got 0x%08x, %d\n", hr, i); + ok(hr == DISP_E_MEMBERNOTFOUND, "got 0x%08lx, %d\n", hr, i);
i = 0; V_VT(&args[0]) = VT_UNKNOWN; @@ -1156,15 +1156,15 @@ static void test_TypeInfo(void) V_VT(&res) = VT_EMPTY; V_I4(&res) = 0; hr = ITypeInfo_Invoke(pTypeInfo, &invoketest, 2, DISPATCH_PROPERTYPUTREF, &dispparams, &res, NULL, &i); - ok(hr == S_OK, "got 0x%08x, %d\n", hr, i); + ok(hr == S_OK, "got 0x%08lx, %d\n", hr, i); ok(V_VT(&res) == VT_I4, "got %d\n", V_VT(&res)); - ok(V_I4(&res) == 6, "got %d\n", V_I4(&res)); + ok(V_I4(&res) == 6, "got %ld\n", V_I4(&res));
i = 0; V_VT(&res) = VT_EMPTY; V_I4(&res) = 0; hr = ITypeInfo_Invoke(pTypeInfo, &invoketest, 2, DISPATCH_PROPERTYPUT, &dispparams, &res, NULL, &i); - ok(hr == DISP_E_MEMBERNOTFOUND, "got 0x%08x, %d\n", hr, i); + ok(hr == DISP_E_MEMBERNOTFOUND, "got 0x%08lx, %d\n", hr, i);
test_invoke_func(pTypeInfo);
@@ -1194,8 +1194,8 @@ static double WINAPI double_func( double a0, float a1, double a2, int a3 )
static LONGLONG WINAPI longlong_func( LONGLONG a0, CY a1 ) { - ok( a0 == (((ULONGLONG)0xdead << 32) | 0xbeef), "wrong arg0 %08x%08x\n", (DWORD)(a0 >> 32), (DWORD)a0); - ok( a1.int64 == ((ULONGLONG)10000 * 12345678), "wrong arg1 %08x%08x\n", + ok( a0 == (((ULONGLONG)0xdead << 32) | 0xbeef), "wrong arg0 %08lx%08lx\n", (DWORD)(a0 >> 32), (DWORD)a0); + ok( a1.int64 == ((ULONGLONG)10000 * 12345678), "wrong arg1 %08lx%08lx\n", (DWORD)(a1.int64 >> 32), (DWORD)a1.int64 ); return ((ULONGLONG)4321 << 32) | 8765; } @@ -1207,10 +1207,10 @@ static VARIANT WINAPI variant_func( int a0, BOOL a1, DECIMAL a2, VARIANT a3 ) ok( a1 == 1 || broken(a1 == 0x55550001), "wrong arg1 %x\n", a1 ); V_VT(&var) = VT_LPWSTR; V_UI4(&var) = 0xbabe; - ok( a2.Hi32 == 1122, "wrong arg2.Hi32 %x\n", a2.Hi32 ); - ok( U1(a2).Lo64 == 3344, "wrong arg2.Lo64 %08x%08x\n", (DWORD)(U1(a2).Lo64 >> 32), (DWORD)U1(a2).Lo64 ); + ok( a2.Hi32 == 1122, "wrong arg2.Hi32 %lx\n", a2.Hi32 ); + ok( U1(a2).Lo64 == 3344, "wrong arg2.Lo64 %08lx%08lx\n", (DWORD)(U1(a2).Lo64 >> 32), (DWORD)U1(a2).Lo64 ); ok( V_VT(&a3) == VT_EMPTY, "wrong arg3 type %x\n", V_VT(&a3) ); - ok( V_UI4(&a3) == 0xdeadbeef, "wrong arg3 value %x\n", V_UI4(&a3) ); + ok( V_UI4(&a3) == 0xdeadbeef, "wrong arg3 value %lx\n", V_UI4(&a3) ); return var; }
@@ -1253,7 +1253,7 @@ static VARIANT WINAPI variant_func2(VARIANT v1, VARIANT v2) VARIANT ret;
ok(V_VT(&v1) == VT_I4, "unexpected %d\n", V_VT(&v1)); - ok(V_I4(&v1) == 2, "unexpected %d\n", V_I4(&v1)); + ok(V_I4(&v1) == 2, "unexpected %ld\n", V_I4(&v1)); ok(V_VT(&v2) == VT_BSTR, "unexpected %d\n", V_VT(&v2)); ok(lstrcmpW(V_BSTR(&v2), testW) == 0, "unexpected %s\n", wine_dbgstr_w(V_BSTR(&v2)));
@@ -1284,10 +1284,10 @@ static void WINAPI inst_func2(void *inst, VARIANT *ret, VARIANT v1, VARIANT v2) ok( (*(void ***)inst)[3] == inst_func2, "wrong ptr %p\n", inst );
ok(V_VT(ret) == VT_I4 || broken(V_VT(ret) == VT_VARIANT) /* win64 */, "unexpected %d\n", V_VT(ret)); - ok(V_I4(ret) == 1234, "unexpected %d\n", V_I4(ret)); + ok(V_I4(ret) == 1234, "unexpected %ld\n", V_I4(ret));
ok(V_VT(&v1) == VT_I4, "unexpected %d\n", V_VT(&v1)); - ok(V_I4(&v1) == 2, "unexpected %d\n", V_I4(&v1)); + ok(V_I4(&v1) == 2, "unexpected %ld\n", V_I4(&v1)); ok(V_VT(&v2) == VT_BSTR, "unexpected %d\n", V_VT(&v2)); ok(lstrcmpW(V_BSTR(&v2), testW) == 0, "unexpected %s\n", wine_dbgstr_w(V_BSTR(&v2)));
@@ -1320,17 +1320,17 @@ static void test_DispCallFunc(void) V_BSTR(&args[1]) = SysAllocString(testW); memset( &result, 0xcc, sizeof(result) ); res = DispCallFunc(NULL, (ULONG_PTR)variant_func2, CC_STDCALL, VT_VARIANT, 2, types, pargs, &result); - ok(res == S_OK, "DispCallFunc error %#x\n", res); + ok(res == S_OK, "DispCallFunc error %#lx\n", res); ok(V_VT(&result) == VT_UI4, "wrong result type %d\n", V_VT(&result)); - ok(V_UI4(&result) == 4321, "wrong result %u\n", V_UI4(&result)); + ok(V_UI4(&result) == 4321, "wrong result %lu\n", V_UI4(&result));
V_VT(&result) = VT_I4; V_UI4(&result) = 1234; inst = vtable2; res = DispCallFunc(&inst, 3 * sizeof(void *), CC_STDCALL, VT_VARIANT, 2, types, pargs, &result); - ok(res == S_OK, "DispCallFunc error %#x\n", res); + ok(res == S_OK, "DispCallFunc error %#lx\n", res); ok(V_VT(&result) == VT_UI4, "wrong result type %d\n", V_VT(&result)); - ok(V_UI4(&result) == 4321, "wrong result %u\n", V_UI4(&result)); + ok(V_UI4(&result) == 4321, "wrong result %lu\n", V_UI4(&result));
VariantClear(&args[1]);
@@ -1347,19 +1347,19 @@ static void test_DispCallFunc(void) V_I1(&args[4]) = -3; memset( &result, 0xcc, sizeof(result) ); res = DispCallFunc( NULL, (ULONG_PTR)int_func, CC_STDCALL, VT_UI4, 5, types, pargs, &result ); - ok( res == S_OK, "DispCallFunc failed %x\n", res ); + ok( res == S_OK, "DispCallFunc failed %lx\n", res ); ok( V_VT(&result) == VT_UI4, "wrong result type %d\n", V_VT(&result) ); - ok( V_UI4(&result) == 4321, "wrong result %u\n", V_UI4(&result) ); + ok( V_UI4(&result) == 4321, "wrong result %lu\n", V_UI4(&result) );
/* the function checks the argument sizes for stdcall */ if (abi_supports_stdcall) { res = DispCallFunc( NULL, (ULONG_PTR)stdcall_func, CC_STDCALL, VT_UI4, 0, types, pargs, &result ); - ok( res == DISP_E_BADCALLEE, "DispCallFunc wrong error %x\n", res ); + ok( res == DISP_E_BADCALLEE, "DispCallFunc wrong error %lx\n", res ); res = DispCallFunc( NULL, (ULONG_PTR)stdcall_func, CC_STDCALL, VT_UI4, 1, types, pargs, &result ); - ok( res == S_OK, "DispCallFunc failed %x\n", res ); + ok( res == S_OK, "DispCallFunc failed %lx\n", res ); res = DispCallFunc( NULL, (ULONG_PTR)stdcall_func, CC_STDCALL, VT_UI4, 2, types, pargs, &result ); - ok( res == DISP_E_BADCALLEE, "DispCallFunc wrong error %x\n", res ); + ok( res == DISP_E_BADCALLEE, "DispCallFunc wrong error %lx\n", res ); }
memset( args, 0x55, sizeof(args) ); @@ -1373,7 +1373,7 @@ static void test_DispCallFunc(void) V_I4(&args[3]) = -4433; memset( &result, 0xcc, sizeof(result) ); res = DispCallFunc( NULL, (ULONG_PTR)double_func, CC_STDCALL, VT_R8, 4, types, pargs, &result ); - ok( res == S_OK, "DispCallFunc failed %x\n", res ); + ok( res == S_OK, "DispCallFunc failed %lx\n", res ); ok( V_VT(&result) == VT_R8, "wrong result type %d\n", V_VT(&result) ); ok( V_R8(&result) == 4321, "wrong result %f\n", V_R8(&result) );
@@ -1385,11 +1385,11 @@ static void test_DispCallFunc(void) memset( &result, 0xcc, sizeof(result) ); res = DispCallFunc( NULL, (ULONG_PTR)longlong_func, CC_STDCALL, VT_I8, 2, types, pargs, &result ); ok( res == S_OK || broken(res == E_INVALIDARG), /* longlong not supported on <= win2k */ - "DispCallFunc failed %x\n", res ); + "DispCallFunc failed %lx\n", res ); if (res == S_OK) { ok( V_VT(&result) == VT_I8, "wrong result type %d\n", V_VT(&result) ); - ok( V_I8(&result) == (((ULONGLONG)4321 << 32) | 8765), "wrong result %08x%08x\n", + ok( V_I8(&result) == (((ULONGLONG)4321 << 32) | 8765), "wrong result %08lx%08lx\n", (DWORD)(V_I8(&result) >> 32), (DWORD)V_I8(&result) ); }
@@ -1407,9 +1407,9 @@ static void test_DispCallFunc(void) types[4] = VT_EMPTY; memset( &result, 0xcc, sizeof(result) ); res = DispCallFunc( NULL, (ULONG_PTR)variant_func, CC_STDCALL, VT_VARIANT, 5, types, pargs, &result ); - ok( res == S_OK, "DispCallFunc failed %x\n", res ); + ok( res == S_OK, "DispCallFunc failed %lx\n", res ); ok( V_VT(&result) == VT_LPWSTR, "wrong result type %d\n", V_VT(&result) ); - ok( V_UI4(&result) == 0xbabe, "wrong result %08x\n", V_UI4(&result) ); + ok( V_UI4(&result) == 0xbabe, "wrong result %08lx\n", V_UI4(&result) );
memset( args, 0x55, sizeof(args) ); types[0] = VT_EMPTY; @@ -1421,12 +1421,12 @@ static void test_DispCallFunc(void) types[4] = VT_EMPTY; memset( &result, 0xcc, sizeof(result) ); res = DispCallFunc( NULL, (ULONG_PTR)void_func, CC_CDECL, VT_EMPTY, 5, types, pargs, &result ); - ok( res == S_OK, "DispCallFunc failed %x\n", res ); + ok( res == S_OK, "DispCallFunc failed %lx\n", res ); ok( V_VT(&result) == VT_EMPTY, "wrong result type %d\n", V_VT(&result) ); if (is_win64) - ok( V_UI4(&result) == 12, "wrong result %08x\n", V_UI4(&result) ); + ok( V_UI4(&result) == 12, "wrong result %08lx\n", V_UI4(&result) ); else - ok( V_UI4(&result) == 0xcccccccc, "wrong result %08x\n", V_UI4(&result) ); + ok( V_UI4(&result) == 0xcccccccc, "wrong result %08lx\n", V_UI4(&result) );
memset( args, 0x55, sizeof(args) ); types[0] = VT_I4; @@ -1434,19 +1434,19 @@ static void test_DispCallFunc(void) memset( &result, 0xcc, sizeof(result) ); inst = vtable; res = DispCallFunc( &inst, 3 * sizeof(void*), CC_STDCALL, VT_I4, 1, types, pargs, &result ); - ok( res == S_OK, "DispCallFunc failed %x\n", res ); + ok( res == S_OK, "DispCallFunc failed %lx\n", res ); ok( V_VT(&result) == VT_I4, "wrong result type %d\n", V_VT(&result) ); - ok( V_I4(&result) == 6, "wrong result %08x\n", V_I4(&result) ); + ok( V_I4(&result) == 6, "wrong result %08lx\n", V_I4(&result) );
memset( &result, 0xcc, sizeof(result) ); res = DispCallFunc(NULL, (ULONG_PTR)ret_false_func, CC_STDCALL, VT_ERROR, 0, NULL, NULL, &result); - ok(res == S_OK, "DispCallFunc failed: %08x\n", res); + ok(res == S_OK, "DispCallFunc failed: %08lx\n", res); ok(V_VT(&result) == VT_ERROR, "V_VT(result) = %u\n", V_VT(&result)); - ok(V_ERROR(&result) == S_FALSE, "V_ERROR(result) = %08x\n", V_ERROR(&result)); + ok(V_ERROR(&result) == S_FALSE, "V_ERROR(result) = %08lx\n", V_ERROR(&result));
memset( &result, 0xcc, sizeof(result) ); res = DispCallFunc(NULL, (ULONG_PTR)ret_false_func, CC_STDCALL, VT_HRESULT, 0, NULL, NULL, &result); - ok(res == E_INVALIDARG, "DispCallFunc failed: %08x\n", res); + ok(res == E_INVALIDARG, "DispCallFunc failed: %08lx\n", res); ok(V_VT(&result) == 0xcccc, "V_VT(result) = %u\n", V_VT(&result)); }
@@ -1550,7 +1550,7 @@ static BOOL do_typelib_reg_key(GUID *uid, WORD maj, WORD min, DWORD arch, LPCWST
if (res != ERROR_SUCCESS) { - trace("RegCreateKeyExW failed: %u\n", res); + trace("RegCreateKeyExW failed: %lu\n", res); return FALSE; }
@@ -1595,7 +1595,7 @@ static void test_QueryPathOfRegTypeLib(DWORD arch) BSTR path;
status = UuidCreate(&uid); - ok(!status || status == RPC_S_UUID_LOCAL_ONLY, "UuidCreate error %08x\n", status); + ok(!status || status == RPC_S_UUID_LOCAL_ONLY, "UuidCreate error %08lx\n", status);
StringFromGUID2(&uid, uid_str, 40); /*trace("GUID: %s\n", wine_dbgstr_w(uid_str));*/ @@ -1609,7 +1609,7 @@ static void test_QueryPathOfRegTypeLib(DWORD arch) for (i = 0; i < ARRAY_SIZE(td); i++) { ret = QueryPathOfRegTypeLib(&uid, td[i].maj, td[i].min, LOCALE_NEUTRAL, &path); - ok(ret == td[i].ret, "QueryPathOfRegTypeLib(%u.%u) returned %08x\n", td[i].maj, td[i].min, ret); + ok(ret == td[i].ret, "QueryPathOfRegTypeLib(%u.%u) returned %08lx\n", td[i].maj, td[i].min, ret); if (ret == S_OK) { ok(!lstrcmpW(td[i].path, path), "typelib %u.%u path doesn't match\n", td[i].maj, td[i].min); @@ -1640,10 +1640,10 @@ static void test_inheritance(void)
/* ItestIF3 is a syntax 2 dispinterface */ hr = ITypeLib_GetTypeInfoOfGuid(pTL, &DIID_ItestIF3, &pTI); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr);
hr = ITypeInfo_GetTypeAttr(pTI, &pTA); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); ok(pTA->typekind == TKIND_DISPATCH, "kind %04x\n", pTA->typekind); ok(pTA->cbSizeVft == 7 * sizeof(void *), "sizevft %d\n", pTA->cbSizeVft); ok(pTA->wTypeFlags == TYPEFLAG_FDISPATCHABLE, "typeflags %x\n", pTA->wTypeFlags); @@ -1652,21 +1652,21 @@ static void test_inheritance(void) ITypeInfo_ReleaseTypeAttr(pTI, pTA);
hr = ITypeInfo_GetRefTypeOfImplType(pTI, 0, &href); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetRefTypeInfo(pTI, href, &pTI_p); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetTypeAttr(pTI_p, &pTA); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(IsEqualGUID(&pTA->guid, &IID_IDispatch), "guid %s\n", debugstr_guid(&pTA->guid)); ITypeInfo_ReleaseTypeAttr(pTI_p, pTA); ITypeInfo_Release(pTI_p);
/* Should have six methods */ hr = ITypeInfo_GetFuncDesc(pTI, 6, &pFD); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "hr %08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "hr %08lx\n", hr); hr = ITypeInfo_GetFuncDesc(pTI, 5, &pFD); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pFD->memid == 0x60020000, "memid %08x\n", pFD->memid); + ok(hr == S_OK, "hr %08lx\n", hr); + ok(pFD->memid == 0x60020000, "memid %08lx\n", pFD->memid); ok(pFD->oVft == 5 * sizeof(void *), "oVft %d\n", pFD->oVft); ITypeInfo_ReleaseFuncDesc(pTI, pFD); ITypeInfo_Release(pTI); @@ -1674,10 +1674,10 @@ static void test_inheritance(void)
/* ItestIF4 is a syntax 1 dispinterface */ hr = ITypeLib_GetTypeInfoOfGuid(pTL, &DIID_ItestIF4, &pTI); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr);
hr = ITypeInfo_GetTypeAttr(pTI, &pTA); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); ok(pTA->typekind == TKIND_DISPATCH, "kind %04x\n", pTA->typekind); ok(pTA->cbSizeVft == 7 * sizeof(void *), "sizevft %d\n", pTA->cbSizeVft); ok(pTA->wTypeFlags == TYPEFLAG_FDISPATCHABLE, "typeflags %x\n", pTA->wTypeFlags); @@ -1686,29 +1686,29 @@ static void test_inheritance(void) ITypeInfo_ReleaseTypeAttr(pTI, pTA);
hr = ITypeInfo_GetRefTypeOfImplType(pTI, 0, &href); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetRefTypeInfo(pTI, href, &pTI_p); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetTypeAttr(pTI_p, &pTA); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(IsEqualGUID(&pTA->guid, &IID_IDispatch), "guid %s\n", debugstr_guid(&pTA->guid)); ITypeInfo_ReleaseTypeAttr(pTI_p, pTA); ITypeInfo_Release(pTI_p); hr = ITypeInfo_GetFuncDesc(pTI, 1, &pFD); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "hr %08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "hr %08lx\n", hr); hr = ITypeInfo_GetFuncDesc(pTI, 0, &pFD); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pFD->memid == 0x1c, "memid %08x\n", pFD->memid); + ok(hr == S_OK, "hr %08lx\n", hr); + ok(pFD->memid == 0x1c, "memid %08lx\n", pFD->memid); ITypeInfo_ReleaseFuncDesc(pTI, pFD); ITypeInfo_Release(pTI);
/* ItestIF5 is dual with inherited ifaces which derive from IUnknown but not IDispatch */ hr = ITypeLib_GetTypeInfoOfGuid(pTL, &IID_ItestIF5, &pTI); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr);
hr = ITypeInfo_GetTypeAttr(pTI, &pTA); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); ok(pTA->typekind == TKIND_DISPATCH, "kind %04x\n", pTA->typekind); ok(pTA->cbSizeVft == 7 * sizeof(void *), "sizevft %d\n", pTA->cbSizeVft); ok(pTA->wTypeFlags == TYPEFLAG_FDUAL, "typeflags %x\n", pTA->wTypeFlags); @@ -1717,26 +1717,26 @@ static void test_inheritance(void) ITypeInfo_ReleaseTypeAttr(pTI, pTA);
hr = ITypeInfo_GetRefTypeOfImplType(pTI, 0, &href); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetRefTypeInfo(pTI, href, &pTI_p); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetTypeAttr(pTI_p, &pTA); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(IsEqualGUID(&pTA->guid, &IID_IDispatch), "guid %s\n", debugstr_guid(&pTA->guid)); ITypeInfo_ReleaseTypeAttr(pTI_p, pTA); ITypeInfo_Release(pTI_p); hr = ITypeInfo_GetFuncDesc(pTI, 6, &pFD); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pFD->memid == 0x1234, "memid %08x\n", pFD->memid); + ok(hr == S_OK, "hr %08lx\n", hr); + ok(pFD->memid == 0x1234, "memid %08lx\n", pFD->memid); ITypeInfo_ReleaseFuncDesc(pTI, pFD); ITypeInfo_Release(pTI);
/* ItestIF7 is dual with inherited ifaces which derive from Dispatch */ hr = ITypeLib_GetTypeInfoOfGuid(pTL, &IID_ItestIF7, &pTI); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr);
hr = ITypeInfo_GetTypeAttr(pTI, &pTA); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); ok(pTA->typekind == TKIND_DISPATCH, "kind %04x\n", pTA->typekind); ok(pTA->cbSizeVft == 7 * sizeof(void *), "sizevft %d\n", pTA->cbSizeVft); ok(pTA->wTypeFlags == (TYPEFLAG_FDISPATCHABLE|TYPEFLAG_FDUAL), "typeflags %x\n", pTA->wTypeFlags); @@ -1745,27 +1745,27 @@ static void test_inheritance(void) ITypeInfo_ReleaseTypeAttr(pTI, pTA);
hr = ITypeInfo_GetRefTypeOfImplType(pTI, 0, &href); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetRefTypeInfo(pTI, href, &pTI_p); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetTypeAttr(pTI_p, &pTA); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(IsEqualGUID(&pTA->guid, &IID_IDispatch), "guid %s\n", debugstr_guid(&pTA->guid)); ITypeInfo_ReleaseTypeAttr(pTI_p, pTA); ITypeInfo_Release(pTI_p);
hr = ITypeInfo_GetFuncDesc(pTI, 9, &pFD); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pFD->memid == 0x1236, "memid %08x\n", pFD->memid); + ok(hr == S_OK, "hr %08lx\n", hr); + ok(pFD->memid == 0x1236, "memid %08lx\n", pFD->memid); ITypeInfo_ReleaseFuncDesc(pTI, pFD); ITypeInfo_Release(pTI);
/* ItestIF10 is a syntax 2 dispinterface which doesn't derive from IUnknown */ hr = ITypeLib_GetTypeInfoOfGuid(pTL, &DIID_ItestIF10, &pTI); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr);
hr = ITypeInfo_GetTypeAttr(pTI, &pTA); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); ok(pTA->typekind == TKIND_DISPATCH, "kind %04x\n", pTA->typekind); ok(pTA->cbSizeVft == sizeof(IDispatchVtbl), "sizevft %d\n", pTA->cbSizeVft); ok(pTA->wTypeFlags == TYPEFLAG_FDISPATCHABLE, "typeflags %x\n", pTA->wTypeFlags); @@ -1774,33 +1774,33 @@ static void test_inheritance(void) ITypeInfo_ReleaseTypeAttr(pTI, pTA);
hr = ITypeInfo_GetRefTypeOfImplType(pTI, -1, &href); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "hr %08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "hr %08lx\n", hr); hr = ITypeInfo_GetRefTypeOfImplType(pTI, 0, &href); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetRefTypeInfo(pTI, href, &pTI_p); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetTypeAttr(pTI_p, &pTA); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(IsEqualGUID(&pTA->guid, &IID_IDispatch), "guid %s\n", debugstr_guid(&pTA->guid)); ITypeInfo_ReleaseTypeAttr(pTI_p, pTA); ITypeInfo_Release(pTI_p);
/* Should have three methods */ hr = ITypeInfo_GetFuncDesc(pTI, 3, &pFD); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "hr %08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "hr %08lx\n", hr); hr = ITypeInfo_GetFuncDesc(pTI, 2, &pFD); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pFD->memid == 0x60010000, "memid %08x\n", pFD->memid); + ok(hr == S_OK, "hr %08lx\n", hr); + ok(pFD->memid == 0x60010000, "memid %08lx\n", pFD->memid); ok(pFD->oVft == 2 * sizeof(void *), "oVft %d\n", pFD->oVft); ITypeInfo_ReleaseFuncDesc(pTI, pFD); ITypeInfo_Release(pTI);
/* ItestIF11 is a syntax 2 dispinterface which derives from IDispatch */ hr = ITypeLib_GetTypeInfoOfGuid(pTL, &DIID_ItestIF11, &pTI); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr);
hr = ITypeInfo_GetTypeAttr(pTI, &pTA); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); ok(pTA->typekind == TKIND_DISPATCH, "kind %04x\n", pTA->typekind); ok(pTA->cbSizeVft == 7 * sizeof(void *), "sizevft %d\n", pTA->cbSizeVft); ok(pTA->wTypeFlags == TYPEFLAG_FDISPATCHABLE, "typeflags %x\n", pTA->wTypeFlags); @@ -1809,21 +1809,21 @@ static void test_inheritance(void) ITypeInfo_ReleaseTypeAttr(pTI, pTA);
hr = ITypeInfo_GetRefTypeOfImplType(pTI, 0, &href); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetRefTypeInfo(pTI, href, &pTI_p); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetTypeAttr(pTI_p, &pTA); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(IsEqualGUID(&pTA->guid, &IID_IDispatch), "guid %s\n", debugstr_guid(&pTA->guid)); ITypeInfo_ReleaseTypeAttr(pTI_p, pTA); ITypeInfo_Release(pTI_p);
/* Should have ten methods */ hr = ITypeInfo_GetFuncDesc(pTI, 10, &pFD); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "hr %08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "hr %08lx\n", hr); hr = ITypeInfo_GetFuncDesc(pTI, 9, &pFD); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pFD->memid == 0x1236, "memid %08x\n", pFD->memid); + ok(hr == S_OK, "hr %08lx\n", hr); + ok(pFD->memid == 0x1236, "memid %08lx\n", pFD->memid); ok(pFD->oVft == 9 * sizeof(void *), "oVft %d\n", pFD->oVft);
/* first argument to 10th function is an HREFTYPE from the impl type */ @@ -1831,9 +1831,9 @@ static void test_inheritance(void) ok(pFD->lprgelemdescParam[0].tdesc.vt == VT_USERDEFINED, "vt 0x%x\n", pFD->lprgelemdescParam[0].tdesc.vt); href = U(pFD->lprgelemdescParam[0].tdesc).hreftype; - ok((href & 0xff000000) == 0x04000000, "href 0x%08x\n", href); + ok((href & 0xff000000) == 0x04000000, "href 0x%08lx\n", href); hr = ITypeInfo_GetRefTypeInfo(pTI, href, &pTI_p); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); if (SUCCEEDED(hr)) ITypeInfo_Release(pTI_p); ITypeInfo_ReleaseFuncDesc(pTI, pFD); ITypeInfo_Release(pTI); @@ -1841,10 +1841,10 @@ static void test_inheritance(void)
/* ItestIF2 is an interface which derives from IUnknown */ hr = ITypeLib_GetTypeInfoOfGuid(pTL, &IID_ItestIF2, &pTI); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr);
hr = ITypeInfo_GetTypeAttr(pTI, &pTA); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); ok(pTA->typekind == TKIND_INTERFACE, "kind %04x\n", pTA->typekind); ok(pTA->cbSizeVft == 6 * sizeof(void *), "sizevft %d\n", pTA->cbSizeVft); ok(pTA->wTypeFlags == 0, "typeflags %x\n", pTA->wTypeFlags); @@ -1854,20 +1854,20 @@ static void test_inheritance(void)
/* Should have one method */ hr = ITypeInfo_GetFuncDesc(pTI, 1, &pFD); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "hr %08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "hr %08lx\n", hr); hr = ITypeInfo_GetFuncDesc(pTI, 0, &pFD); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pFD->memid == 0x60020000, "memid %08x\n", pFD->memid); + ok(hr == S_OK, "hr %08lx\n", hr); + ok(pFD->memid == 0x60020000, "memid %08lx\n", pFD->memid); ok(pFD->oVft == 5 * sizeof(void *), "oVft %d\n", pFD->oVft); ITypeInfo_ReleaseFuncDesc(pTI, pFD); ITypeInfo_Release(pTI);
/* ItestIF13 is dual with inherited dual ifaces */ hr = ITypeLib_GetTypeInfoOfGuid(pTL, &IID_ItestIF13, &pTI); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr);
hr = ITypeInfo_GetTypeAttr(pTI, &pTA); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); ok(pTA->typekind == TKIND_DISPATCH, "kind %04x\n", pTA->typekind); ok(pTA->cbSizeVft == 7 * sizeof(void *), "sizevft %d\n", pTA->cbSizeVft); ok(pTA->wTypeFlags == (TYPEFLAG_FDISPATCHABLE|TYPEFLAG_FDUAL), "typeflags %x\n", pTA->wTypeFlags); @@ -1876,24 +1876,24 @@ static void test_inheritance(void) ITypeInfo_ReleaseTypeAttr(pTI, pTA);
hr = ITypeInfo_GetRefTypeOfImplType(pTI, 0, &href); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetRefTypeInfo(pTI, href, &pTI_p); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetTypeAttr(pTI_p, &pTA); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(IsEqualGUID(&pTA->guid, &IID_IDispatch), "guid %s\n", wine_dbgstr_guid(&pTA->guid)); ITypeInfo_ReleaseTypeAttr(pTI_p, pTA);
hr = ITypeInfo_GetFuncDesc(pTI, 9, &pFD); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pFD->memid == 0x1236, "memid %08x\n", pFD->memid); + ok(hr == S_OK, "hr %08lx\n", hr); + ok(pFD->memid == 0x1236, "memid %08lx\n", pFD->memid); ITypeInfo_ReleaseFuncDesc(pTI, pFD);
hr = ITypeInfo_GetRefTypeInfo(pTI, -2, &dual_ti); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr);
hr = ITypeInfo_GetTypeAttr(dual_ti, &pTA); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); ok(pTA->typekind == TKIND_INTERFACE, "kind %04x\n", pTA->typekind); ok(pTA->cbSizeVft == sizeof(ItestIF13Vtbl), "sizevft %d\n", pTA->cbSizeVft); ok(pTA->wTypeFlags == (TYPEFLAG_FDISPATCHABLE|TYPEFLAG_FOLEAUTOMATION|TYPEFLAG_FDUAL), "typeflags %x\n", pTA->wTypeFlags); @@ -1902,11 +1902,11 @@ static void test_inheritance(void) ITypeInfo_ReleaseTypeAttr(dual_ti, pTA);
hr = ITypeInfo_GetRefTypeOfImplType(dual_ti, 0, &href); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetRefTypeInfo(dual_ti, href, &pTI_p); - ok(hr == S_OK, "hr %08x\n", hr); + ok(hr == S_OK, "hr %08lx\n", hr); hr = ITypeInfo_GetTypeAttr(pTI_p, &pTA); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(pTA->typekind == TKIND_INTERFACE, "kind %04x\n", pTA->typekind); ok(pTA->cbSizeVft == sizeof(ItestIF12Vtbl), "sizevft %d\n", pTA->cbSizeVft); ok(IsEqualGUID(&pTA->guid, &IID_ItestIF12), "guid %s\n", wine_dbgstr_guid(&pTA->guid)); @@ -1997,45 +1997,45 @@ static void test_CreateTypeLib(SYSKIND sys) { trace("CreateTypeLib tests\n");
hres = LoadTypeLib(wszStdOle2, &stdole); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeLib_GetTypeInfoOfGuid(stdole, &IID_IUnknown, &unknown); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetTypeAttr(unknown, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(typeattr->cbSizeVft == 3 * sizeof(void*), "Got wrong cbSizeVft: %u\n", typeattr->cbSizeVft); ITypeInfo_ReleaseTypeAttr(unknown, typeattr);
hres = ITypeLib_GetTypeInfoOfGuid(stdole, &IID_IDispatch, &dispatch); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
GetTempFileNameA(".", "tlb", 0, filename); MultiByteToWideChar(CP_ACP, 0, filename, -1, filenameW, MAX_PATH);
hres = CreateTypeLib2(sys, filenameW, &createtl); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeLib2_QueryInterface(createtl, &IID_ITypeLib, (void**)&tl); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeLib_GetTypeInfo(tl, 0, NULL); - ok(hres == E_INVALIDARG, "got 0x%08x\n", hres); + ok(hres == E_INVALIDARG, "got 0x%08lx\n", hres);
hres = ITypeLib_GetTypeInfoType(tl, 0, &kind); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got 0x%08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got 0x%08lx\n", hres);
hres = ITypeLib_GetTypeInfoType(tl, 0, NULL); - ok(hres == E_INVALIDARG, "got 0x%08x\n", hres); + ok(hres == E_INVALIDARG, "got 0x%08lx\n", hres);
hres = ITypeLib_GetTypeInfoType(tl, 0, NULL); - ok(hres == E_INVALIDARG, "got 0x%08x\n", hres); + ok(hres == E_INVALIDARG, "got 0x%08lx\n", hres);
hres = ITypeLib_GetLibAttr(tl, NULL); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
hres = ITypeLib_GetLibAttr(tl, &libattr); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
ok(libattr->syskind == sys, "syskind = %d\n", libattr->syskind); ok(libattr->wMajorVerNum == 0, "wMajorVer = %d\n", libattr->wMajorVerNum); @@ -2046,26 +2046,26 @@ static void test_CreateTypeLib(SYSKIND sys) {
name = (BSTR)0xdeadbeef; hres = ITypeLib_GetDocumentation(tl, -1, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(name == NULL, "name != NULL\n"); ok(docstring == NULL, "docstring != NULL\n"); ok(helpcontext == 0, "helpcontext != 0\n"); ok(helpfile == NULL, "helpfile != NULL\n");
hres = ITypeLib_GetDocumentation(tl, 0, &name, NULL, NULL, NULL); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
hres = ICreateTypeLib2_SetName(createtl, typelibW); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeLib2_SetHelpFileName(createtl, helpfileW); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeLib_GetDocumentation(tl, -1, NULL, NULL, NULL, NULL); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeLib_GetDocumentation(tl, -1, &name, NULL, NULL, &helpfile); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(!memcmp(name, typelibW, sizeof(typelibW)), "name = %s\n", wine_dbgstr_w(name)); ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "helpfile = %s\n", wine_dbgstr_w(helpfile));
@@ -2075,38 +2075,38 @@ static void test_CreateTypeLib(SYSKIND sys) { V_VT(&cust_data) = VT_I4; V_I4(&cust_data) = 1; hres = ICreateTypeLib2_SetCustData(createtl, &tlcustguid, &cust_data); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeLib_QueryInterface(tl, &IID_ITypeLib2, (void**)&tl2); - ok(hres == S_OK, "no ITypeLib2 interface (%x)\n", hres); + ok(hres == S_OK, "no ITypeLib2 interface (%lx)\n", hres);
V_VT(&cust_data) = VT_EMPTY; V_I4(&cust_data) = 0; hres = ITypeLib2_GetCustData(tl2, &tlcustguid, &cust_data); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(V_VT(&cust_data) == VT_I4, "V_VT(&cust_data) = %d\n", V_VT(&cust_data)); - ok(V_I4(&cust_data) == 1, "V_I4(&cust_data) = %d\n", V_I4(&cust_data)); + ok(V_I4(&cust_data) == 1, "V_I4(&cust_data) = %ld\n", V_I4(&cust_data));
ITypeLib2_Release(tl2);
/* invalid parameters */ hres = ICreateTypeLib2_CreateTypeInfo(createtl, NULL, TKIND_INTERFACE, &createti); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
hres = ICreateTypeLib2_CreateTypeInfo(createtl, interface1W, TKIND_INTERFACE, NULL); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
hres = ICreateTypeLib2_CreateTypeInfo(createtl, NULL, TKIND_INTERFACE, NULL); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
hres = ICreateTypeLib2_CreateTypeInfo(createtl, interface1W, TKIND_INTERFACE, &createti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_QueryInterface(createti, &IID_ITypeInfo, (void**)&interface1); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeLib_GetDocumentation(tl, 0, &name, NULL, NULL, NULL); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(!memcmp(name, interface1W, sizeof(interface1W)), "name = %s\n", wine_dbgstr_w(name));
SysFreeString(name); @@ -2116,7 +2116,7 @@ static void test_CreateTypeLib(SYSKIND sys) { name = (BSTR)0xdeadbeef; helpfile = (BSTR)0xdeadbeef; hres = ITypeInfo_GetDocumentation(interface1, -1, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(!memcmp(name, interface1W, sizeof(interface1W)), "name = %s\n", wine_dbgstr_w(name)); ok(docstring == NULL, "docstring != NULL\n"); ok(helpcontext == 0, "helpcontext != 0\n"); @@ -2126,53 +2126,53 @@ static void test_CreateTypeLib(SYSKIND sys) { SysFreeString(helpfile);
hres = ITypeInfo_GetDocumentation(interface1, 0, &name, NULL, NULL, NULL); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
hres = ITypeInfo_GetRefTypeInfo(interface1, 0, NULL); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
hres = ICreateTypeInfo_LayOut(createti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetGuid(createti, &interfaceguid); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddRefTypeInfo(createti, NULL, &hreftype); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddRefTypeInfo(createti, unknown, NULL); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddRefTypeInfo(createti, unknown, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); if(hres != S_OK) { skip("Skipping some tests\n"); return; }
hres = ICreateTypeInfo_AddImplType(createti, 1, hreftype); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddImplType(createti, 0, hreftype); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetRefTypeOfImplType(interface1, 0, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - ok(hreftype == 3, "hreftype = %d\n", hreftype); + ok(hres == S_OK, "got %08lx\n", hres); + ok(hreftype == 3, "hreftype = %ld\n", hreftype);
hres = ITypeInfo_GetRefTypeInfo(interface1, hreftype, &ti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(typeattr->cbSizeVft == 3 * ptr_size, "retrieved IUnknown gave wrong cbSizeVft: %u\n", typeattr->cbSizeVft); ITypeInfo_ReleaseTypeAttr(ti, typeattr);
ITypeInfo_Release(ti);
hres = ITypeInfo_GetRefTypeOfImplType(interface1, -1, &hreftype); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
ICreateTypeInfo_QueryInterface(createti, &IID_ITypeInfo2, (void**)&ti2);
@@ -2184,24 +2184,24 @@ static void test_CreateTypeLib(SYSKIND sys) { U(funcdesc.elemdescFunc).idldesc.wIDLFlags = IDLFLAG_NONE;
hres = ICreateTypeInfo_AddFuncDesc(createti, 0, NULL); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddFuncDesc(createti, 1, &funcdesc); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddFuncDesc(createti, 0, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo2_GetFuncDesc(ti2, 0, NULL); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
hres = ITypeInfo2_GetFuncDesc(ti2, 1, &pfuncdesc); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
hres = ITypeInfo2_GetFuncDesc(ti2, 0, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
- ok(pfuncdesc->memid == 0, "got %x\n", pfuncdesc->memid); + ok(pfuncdesc->memid == 0, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam == NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -2217,15 +2217,15 @@ static void test_CreateTypeLib(SYSKIND sys) { ITypeInfo2_ReleaseFuncDesc(ti2, pfuncdesc);
hres = ICreateTypeInfo_SetFuncHelpContext(createti, 0, 0xabcdefab); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
funcdesc.invkind = INVOKE_PROPERTYPUT; hres = ICreateTypeInfo_AddFuncDesc(createti, 1, &funcdesc); - ok(hres == TYPE_E_INCONSISTENTPROPFUNCS, "got %08x\n", hres); + ok(hres == TYPE_E_INCONSISTENTPROPFUNCS, "got %08lx\n", hres);
funcdesc.invkind = INVOKE_PROPERTYPUTREF; hres = ICreateTypeInfo_AddFuncDesc(createti, 1, &funcdesc); - ok(hres == TYPE_E_INCONSISTENTPROPFUNCS, "got %08x\n", hres); + ok(hres == TYPE_E_INCONSISTENTPROPFUNCS, "got %08lx\n", hres);
elemdesc[0].tdesc.vt = VT_BSTR; U(elemdesc[0]).idldesc.dwReserved = 0; @@ -2237,30 +2237,30 @@ static void test_CreateTypeLib(SYSKIND sys) { funcdesc.elemdescFunc.tdesc.vt = VT_VOID;
hres = ICreateTypeInfo_AddFuncDesc(createti, 1, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetFuncHelpContext(createti, 1, 0xabcdefab); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 0, propname, 0); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 0, NULL, 1); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 0, propname, 1); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 1, propname, 1); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 1, propname, 2); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
hres = ITypeInfo2_GetFuncDesc(ti2, 1, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
- ok(pfuncdesc->memid == 0, "got %x\n", pfuncdesc->memid); + ok(pfuncdesc->memid == 0, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -2282,13 +2282,13 @@ static void test_CreateTypeLib(SYSKIND sys) {
funcdesc.invkind = INVOKE_PROPERTYPUTREF; hres = ICreateTypeInfo_AddFuncDesc(createti, 0, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetFuncHelpContext(createti, 0, 0xabcdefab); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetFuncHelpContext(createti, 0, 0x201); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
funcdesc.memid = 1; funcdesc.lprgelemdescParam = NULL; @@ -2297,12 +2297,12 @@ static void test_CreateTypeLib(SYSKIND sys) { funcdesc.cScodes = 1; funcdesc.lprgscode = NULL; hres = ICreateTypeInfo_AddFuncDesc(createti, 1, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo2_GetFuncDesc(ti2, 1, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
- ok(pfuncdesc->memid == 1, "got %d\n", pfuncdesc->memid); + ok(pfuncdesc->memid == 1, "got %ld\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam == NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -2319,7 +2319,7 @@ static void test_CreateTypeLib(SYSKIND sys) {
funcdesc.memid = MEMBERID_NIL; hres = ICreateTypeInfo_AddFuncDesc(createti, 1, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
elemdesc[0].tdesc.vt = VT_PTR; U(elemdesc[0].tdesc).lptdesc = &typedesc1; @@ -2327,12 +2327,12 @@ static void test_CreateTypeLib(SYSKIND sys) { funcdesc.cParams = 1; funcdesc.lprgelemdescParam = elemdesc; hres = ICreateTypeInfo_AddFuncDesc(createti, 4, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo2_GetFuncDesc(ti2, 4, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
- ok(pfuncdesc->memid == 0x60010004, "got %x\n", pfuncdesc->memid); + ok(pfuncdesc->memid == 0x60010004, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -2358,12 +2358,12 @@ static void test_CreateTypeLib(SYSKIND sys) { typedesc2.vt = VT_PTR; U(typedesc2).lptdesc = &typedesc1; hres = ICreateTypeInfo_AddFuncDesc(createti, 4, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo2_GetFuncDesc(ti2, 4, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
- ok(pfuncdesc->memid == 0x60010007, "got %x\n", pfuncdesc->memid); + ok(pfuncdesc->memid == 0x60010007, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -2393,12 +2393,12 @@ static void test_CreateTypeLib(SYSKIND sys) { V_VT(¶mdescex.varDefaultValue) = VT_INT; V_INT(¶mdescex.varDefaultValue) = 0x123; hres = ICreateTypeInfo_AddFuncDesc(createti, 3, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo2_GetFuncDesc(ti2, 3, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
- ok(pfuncdesc->memid == 0x60010003, "got %x\n", pfuncdesc->memid); + ok(pfuncdesc->memid == 0x60010003, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -2415,11 +2415,11 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(edesc->tdesc.vt == VT_INT, "got: %d\n", edesc->tdesc.vt); ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(U(*edesc).paramdesc.pparamdescex != NULL, "got: %p\n", U(*edesc).paramdesc.pparamdescex); - ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %d\n", + ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %ld\n", U(*edesc).paramdesc.pparamdescex->cBytes); ok(V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == VT_I4, "got: %d\n", V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); - ok(V_I4(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == 0x123, "got: 0x%x\n", + ok(V_I4(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == 0x123, "got: 0x%lx\n", V_I4(&U(*edesc).paramdesc.pparamdescex->varDefaultValue));
ITypeInfo2_ReleaseFuncDesc(ti2, pfuncdesc); @@ -2433,12 +2433,12 @@ static void test_CreateTypeLib(SYSKIND sys) { V_UI2(¶mdescex.varDefaultValue) = 0xffff; funcdesc.cParams = 2; hres = ICreateTypeInfo_AddFuncDesc(createti, 3, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo2_GetFuncDesc(ti2, 3, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
- ok(pfuncdesc->memid == 0x60010009, "got %x\n", pfuncdesc->memid); + ok(pfuncdesc->memid == 0x60010009, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -2460,7 +2460,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(edesc->tdesc.vt == VT_UI2, "got: %d\n", edesc->tdesc.vt); ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(U(*edesc).paramdesc.pparamdescex != NULL, "got: %p\n", U(*edesc).paramdesc.pparamdescex); - ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %d\n", + ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %ld\n", U(*edesc).paramdesc.pparamdescex->cBytes); ok(V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == VT_UI2, "got: %d\n", V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); @@ -2475,23 +2475,23 @@ static void test_CreateTypeLib(SYSKIND sys) { V_VT(¶mdescex.varDefaultValue) = VT_INT; V_INT(¶mdescex.varDefaultValue) = 0xffffffff; hres = ICreateTypeInfo_AddFuncDesc(createti, 3, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
elemdesc[0].tdesc.vt = VT_BSTR; elemdesc[1].tdesc.vt = VT_BSTR; V_VT(¶mdescex.varDefaultValue) = VT_BSTR; V_BSTR(¶mdescex.varDefaultValue) = SysAllocString(defaultW); hres = ICreateTypeInfo_AddFuncDesc(createti, 3, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); SysFreeString(V_BSTR(¶mdescex.varDefaultValue));
WideCharToMultiByte(CP_ACP, 0, defaultW, -1, nameA, sizeof(nameA), NULL, NULL); MultiByteToWideChar(CP_ACP, 0, nameA, -1, nameW, ARRAY_SIZE(nameW));
hres = ITypeInfo2_GetFuncDesc(ti2, 3, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
- ok(pfuncdesc->memid == 0x6001000b, "got %x\n", pfuncdesc->memid); + ok(pfuncdesc->memid == 0x6001000b, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -2508,7 +2508,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(edesc->tdesc.vt == VT_BSTR, "got: %d\n", edesc->tdesc.vt); ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(U(*edesc).paramdesc.pparamdescex != NULL, "got: %p\n", U(*edesc).paramdesc.pparamdescex); - ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %d\n", + ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %ld\n", U(*edesc).paramdesc.pparamdescex->cBytes); ok(V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == VT_BSTR, "got: %d\n", V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); @@ -2520,7 +2520,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(edesc->tdesc.vt == VT_BSTR, "got: %d\n", edesc->tdesc.vt); ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(U(*edesc).paramdesc.pparamdescex != NULL, "got: %p\n", U(*edesc).paramdesc.pparamdescex); - ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %d\n", + ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %ld\n", U(*edesc).paramdesc.pparamdescex->cBytes); ok(V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == VT_BSTR, "got: %d\n", V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); @@ -2543,12 +2543,12 @@ static void test_CreateTypeLib(SYSKIND sys) { funcdesc.elemdescFunc.tdesc.vt = VT_VOID;
hres = ICreateTypeInfo_AddFuncDesc(createti, 5, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo2_GetFuncDesc(ti2, 5, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
- ok(pfuncdesc->memid == 0x60010005, "got %x\n", pfuncdesc->memid); + ok(pfuncdesc->memid == 0x60010005, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -2566,7 +2566,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(edesc->tdesc.vt == VT_USERDEFINED, "got: %d\n", edesc->tdesc.vt); - ok(U(edesc->tdesc).hreftype == hreftype, "got: 0x%x\n", U(edesc->tdesc).hreftype); + ok(U(edesc->tdesc).hreftype == hreftype, "got: 0x%lx\n", U(edesc->tdesc).hreftype); ok(V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == VT_INT, "got: %d\n", V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); ok(V_INT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == 0x789, "got: %d\n", @@ -2586,12 +2586,12 @@ static void test_CreateTypeLib(SYSKIND sys) { funcdesc.elemdescFunc.tdesc.vt = VT_VARIANT;
hres = ICreateTypeInfo_AddFuncDesc(createti, 6, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo2_GetFuncDesc(ti2, 6, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
- ok(pfuncdesc->memid == 0x60010006, "got %x\n", pfuncdesc->memid); + ok(pfuncdesc->memid == 0x60010006, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -2617,7 +2617,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ITypeInfo2_ReleaseFuncDesc(ti2, pfuncdesc);
hres = ITypeInfo_GetDocumentation(interface1, 0, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(name == NULL, "name != NULL\n"); ok(docstring == NULL, "docstring != NULL\n"); ok(helpcontext == 0x201, "helpcontext != 0x201\n"); @@ -2626,99 +2626,99 @@ static void test_CreateTypeLib(SYSKIND sys) { SysFreeString(helpfile);
hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 1000, NULL, 1); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 1000, names1, 1); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 0, names1, 2); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 0, names2, 1); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 0, names1, 1); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetDocumentation(interface1, 0, &name, NULL, NULL, NULL); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(!memcmp(name, func1W, sizeof(func1W)), "name = %s\n", wine_dbgstr_w(name));
SysFreeString(name);
hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 3, names2, 3); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 3, names1, 3); - ok(hres == TYPE_E_AMBIGUOUSNAME, "got %08x\n", hres); + ok(hres == TYPE_E_AMBIGUOUSNAME, "got %08lx\n", hres);
ITypeInfo2_Release(ti2); ICreateTypeInfo_Release(createti);
hres = ICreateTypeLib2_CreateTypeInfo(createtl, interface1W, TKIND_INTERFACE, &createti); - ok(hres == TYPE_E_NAMECONFLICT, "got %08x\n", hres); + ok(hres == TYPE_E_NAMECONFLICT, "got %08lx\n", hres);
hres = ICreateTypeLib2_CreateTypeInfo(createtl, interface2W, TKIND_INTERFACE, &createti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetGuid(createti, &interface2guid); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_QueryInterface(createti, &IID_ITypeInfo, (void**)&interface2); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetRefTypeOfImplType(interface2, 0, &hreftype); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddRefTypeInfo(createti, interface1, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetRefTypeInfo(interface2, 0, &ti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(ti == interface1, "Received and added interfaces are different\n");
ITypeInfo_Release(ti);
hres = ICreateTypeInfo_AddImplType(createti, 0, hreftype); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetRefTypeOfImplType(interface2, 0, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - ok(hreftype == 2, "hreftype = %d\n", hreftype); + ok(hres == S_OK, "got %08lx\n", hres); + ok(hreftype == 2, "hreftype = %ld\n", hreftype);
hres = ITypeInfo_GetRefTypeOfImplType(interface2, -1, &hreftype); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetImplTypeFlags(createti, 0, IMPLTYPEFLAG_FDEFAULT); - ok(hres == TYPE_E_BADMODULEKIND, "got %08x\n", hres); + ok(hres == TYPE_E_BADMODULEKIND, "got %08lx\n", hres);
hres = ITypeInfo_GetImplTypeFlags(interface2, 0, &impltypeflags); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(impltypeflags == 0, "impltypeflags = %x\n", impltypeflags);
hres = ITypeInfo_GetImplTypeFlags(interface2, 1, &impltypeflags); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
funcdesc.elemdescFunc.tdesc.vt = VT_VOID; funcdesc.oVft = 0xaaac; hres = ICreateTypeInfo_AddFuncDesc(createti, 0, &funcdesc); if(sys == SYS_WIN64){ - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres); funcdesc.oVft = 0xaab0; hres = ICreateTypeInfo_AddFuncDesc(createti, 0, &funcdesc); } - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); funcdesc.oVft = 0xaaa8; hres = ICreateTypeInfo_AddFuncDesc(createti, 0, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_QueryInterface(createti, &IID_ITypeInfo, (void**)&ti2); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo2_GetFuncDesc(ti2, 0, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
- ok(pfuncdesc->memid == 0x60020000, "got %x\n", pfuncdesc->memid); + ok(pfuncdesc->memid == 0x60020000, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -2741,74 +2741,74 @@ static void test_CreateTypeLib(SYSKIND sys) { VariantInit(&cust_data);
hres = ICreateTypeLib2_CreateTypeInfo(createtl, interface3W, TKIND_INTERFACE, &createti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_QueryInterface(createti, &IID_ICreateTypeInfo2, (void**)&createti2); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo2_QueryInterface(createti2, &IID_ITypeInfo2, (void**)&ti2); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo2_GetCustData(ti2, NULL, NULL); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
hres = ITypeInfo2_GetCustData(ti2, &custguid, NULL); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
hres = ITypeInfo2_GetCustData(ti2, &custguid, &cust_data); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo2_SetCustData(createti2, NULL, NULL); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
hres = ICreateTypeInfo2_SetCustData(createti2, &custguid, NULL); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
hres = ICreateTypeInfo2_SetCustData(createti2, &custguid, &cust_data); - ok(hres == DISP_E_BADVARTYPE, "got %08x\n", hres); + ok(hres == DISP_E_BADVARTYPE, "got %08lx\n", hres);
V_VT(&cust_data) = VT_UI4; V_I4(&cust_data) = 0xdeadbeef;
hres = ICreateTypeInfo2_SetCustData(createti2, &custguid, &cust_data); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
V_I4(&cust_data) = 0; V_VT(&cust_data) = VT_EMPTY;
hres = ITypeInfo2_GetCustData(ti2, &custguid, &cust_data); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
ok(V_VT(&cust_data) == VT_UI4, "got %d\n", V_VT(&cust_data)); - ok(V_I4(&cust_data) == 0xdeadbeef, "got 0x%08x\n", V_I4(&cust_data)); + ok(V_I4(&cust_data) == 0xdeadbeef, "got 0x%08lx\n", V_I4(&cust_data));
V_VT(&cust_data) = VT_UI4; V_I4(&cust_data) = 12345678;
hres = ICreateTypeInfo2_SetCustData(createti2, &custguid, &cust_data); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
V_I4(&cust_data) = 0; V_VT(&cust_data) = VT_EMPTY;
hres = ITypeInfo2_GetCustData(ti2, &custguid, &cust_data); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
ok(V_VT(&cust_data) == VT_UI4, "got %d\n", V_VT(&cust_data)); - ok(V_I4(&cust_data) == 12345678, "got 0x%08x\n", V_I4(&cust_data)); + ok(V_I4(&cust_data) == 12345678, "got 0x%08lx\n", V_I4(&cust_data));
V_VT(&cust_data) = VT_BSTR; V_BSTR(&cust_data) = SysAllocString(asdfW);
hres = ICreateTypeInfo2_SetCustData(createti2, &custguid, &cust_data); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
SysFreeString(V_BSTR(&cust_data)); V_I4(&cust_data) = 0; V_VT(&cust_data) = VT_EMPTY;
hres = ITypeInfo2_GetCustData(ti2, &custguid, &cust_data); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
ok(V_VT(&cust_data) == VT_BSTR, "got %d\n", V_VT(&cust_data)); ok(!lstrcmpW(V_BSTR(&cust_data), asdfW), "got %s\n", wine_dbgstr_w(V_BSTR(&cust_data))); @@ -2818,7 +2818,7 @@ static void test_CreateTypeLib(SYSKIND sys) { V_UI4(&cust_data) = 17;
hres = ITypeInfo2_GetCustData(ti2, &bogusguid, &cust_data); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
ok(V_VT(&cust_data) == VT_EMPTY, "got: %d\n", V_VT(&cust_data));
@@ -2827,93 +2827,93 @@ static void test_CreateTypeLib(SYSKIND sys) { ICreateTypeInfo_Release(createti);
hres = ICreateTypeLib2_CreateTypeInfo(createtl, coclassW, TKIND_COCLASS, &createti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddRefTypeInfo(createti, interface1, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddImplType(createti, 0, hreftype); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddImplType(createti, 0, hreftype); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddRefTypeInfo(createti, unknown, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddImplType(createti, 1, hreftype); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddImplType(createti, 1, hreftype); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddImplType(createti, 2, hreftype); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetImplTypeFlags(createti, 0, IMPLTYPEFLAG_FDEFAULT); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetImplTypeFlags(createti, 1, IMPLTYPEFLAG_FRESTRICTED); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_QueryInterface(createti, &IID_ITypeInfo, (void**)&ti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetImplTypeFlags(ti, 0, NULL); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
hres = ITypeInfo_GetImplTypeFlags(ti, 0, &impltypeflags); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(impltypeflags == IMPLTYPEFLAG_FDEFAULT, "impltypeflags = %x\n", impltypeflags);
hres = ITypeInfo_GetImplTypeFlags(ti, 1, &impltypeflags); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(impltypeflags == IMPLTYPEFLAG_FRESTRICTED, "impltypeflags = %x\n", impltypeflags);
hres = ITypeInfo_GetImplTypeFlags(ti, 2, &impltypeflags); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(impltypeflags == 0, "impltypeflags = %x\n", impltypeflags);
hres = ITypeInfo_GetRefTypeOfImplType(ti, 0, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - ok(hreftype == 0, "hreftype = %d\n", hreftype); + ok(hres == S_OK, "got %08lx\n", hres); + ok(hreftype == 0, "hreftype = %ld\n", hreftype);
hres = ITypeInfo_GetRefTypeOfImplType(ti, 1, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - ok(hreftype == 1, "hreftype = %d\n", hreftype); + ok(hres == S_OK, "got %08lx\n", hres); + ok(hreftype == 1, "hreftype = %ld\n", hreftype);
hres = ITypeInfo_GetRefTypeOfImplType(ti, 2, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - ok(hreftype == 1, "hreftype = %d\n", hreftype); + ok(hres == S_OK, "got %08lx\n", hres); + ok(hreftype == 1, "hreftype = %ld\n", hreftype);
hres = ITypeInfo_GetRefTypeOfImplType(ti, -1, &hreftype); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
ITypeInfo_Release(ti);
ICreateTypeInfo_Release(createti);
hres = ICreateTypeLib2_CreateTypeInfo(createtl, dualW, TKIND_INTERFACE, &createti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_SetTypeFlags(createti, TYPEFLAG_FDUAL); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddFuncDesc(createti, 0, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddRefTypeInfo(createti, dispatch, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_AddImplType(createti, 0, hreftype); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_QueryInterface(createti, &IID_ITypeInfo, (void**)&dual); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetTypeAttr(dual, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeInstance == ptr_size, "cbSizeInstance = %d\n", typeattr->cbSizeInstance); + ok(hres == S_OK, "got %08lx\n", hres); + ok(typeattr->cbSizeInstance == ptr_size, "cbSizeInstance = %ld\n", typeattr->cbSizeInstance); ok(typeattr->typekind == TKIND_INTERFACE, "typekind = %d\n", typeattr->typekind); ok(typeattr->cFuncs == 1, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); @@ -2927,18 +2927,18 @@ static void test_CreateTypeLib(SYSKIND sys) { ITypeInfo_ReleaseTypeAttr(dual, typeattr);
hres = ITypeInfo_GetRefTypeOfImplType(dual, -1, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - ok(hreftype == -2, "got %08x\n", hreftype); + ok(hres == S_OK, "got %08lx\n", hres); + ok(hreftype == -2, "got %08lx\n", hreftype);
EXPECT_REF(dual, 2); hres = ITypeInfo_GetRefTypeInfo(dual, -2, &ti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); todo_wine EXPECT_REF(dual, 3);
hres = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeInstance == ptr_size, "cbSizeInstance = %d\n", typeattr->cbSizeInstance); + ok(hres == S_OK, "got %08lx\n", hres); + ok(typeattr->cbSizeInstance == ptr_size, "cbSizeInstance = %ld\n", typeattr->cbSizeInstance); ok(typeattr->typekind == TKIND_DISPATCH, "typekind = %d\n", typeattr->typekind); ok(typeattr->cFuncs == 8, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); @@ -2952,7 +2952,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ITypeInfo_ReleaseTypeAttr(ti, typeattr);
hres = ITypeInfo_GetRefTypeInfo(dual, -2, &ti_2); - ok(hres == S_OK, "Failed to get reference typeinfo, hr %#x.\n", hres); + ok(hres == S_OK, "Failed to get reference typeinfo, hr %#lx.\n", hres); todo_wine { ok(ti == ti_2, "Unexpected typeinfo instance.\n"); EXPECT_REF(dual, 4); @@ -2966,13 +2966,13 @@ todo_wine { ITypeInfo_Release(ti);
hres = ICreateTypeInfo_SetTypeDescAlias(createti, &typedesc1); - ok(hres == TYPE_E_BADMODULEKIND, "got %08x\n", hres); + ok(hres == TYPE_E_BADMODULEKIND, "got %08lx\n", hres);
ICreateTypeInfo_Release(createti);
hres = ITypeInfo_GetTypeAttr(interface1, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeInstance == ptr_size, "cbSizeInstance = %d\n", typeattr->cbSizeInstance); + ok(hres == S_OK, "got %08lx\n", hres); + ok(typeattr->cbSizeInstance == ptr_size, "cbSizeInstance = %ld\n", typeattr->cbSizeInstance); ok(typeattr->typekind == TKIND_INTERFACE, "typekind = %d\n", typeattr->typekind); ok(typeattr->cFuncs == 13, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); @@ -2986,8 +2986,8 @@ todo_wine { ITypeInfo_ReleaseTypeAttr(interface1, typeattr);
hres = ITypeInfo_GetTypeAttr(interface2, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeInstance == ptr_size, "cbSizeInstance = %d\n", typeattr->cbSizeInstance); + ok(hres == S_OK, "got %08lx\n", hres); + ok(typeattr->cbSizeInstance == ptr_size, "cbSizeInstance = %ld\n", typeattr->cbSizeInstance); ok(typeattr->typekind == TKIND_INTERFACE, "typekind = %d\n", typeattr->typekind); ok(typeattr->cFuncs == 2, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); @@ -3007,17 +3007,17 @@ todo_wine { ok(ITypeInfo_Release(dual)==0, "Object should be freed\n");
hres = ICreateTypeLib2_CreateTypeInfo(createtl, aliasW, TKIND_ALIAS, &createti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ICreateTypeInfo_QueryInterface(createti, &IID_ITypeInfo, (void**)&interface1); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
if(0){ /* windows gives invalid values here, and even breaks the typeinfo permanently * on winxp. only call GetTypeAttr() on a TKIND_ALIAS after SetTypeDescAlias. */ hres = ITypeInfo_GetTypeAttr(interface1, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeInstance == 0xffffffb4, "cbSizeInstance = %d\n", typeattr->cbSizeInstance); + ok(hres == S_OK, "got %08lx\n", hres); + ok(typeattr->cbSizeInstance == 0xffffffb4, "cbSizeInstance = %ld\n", typeattr->cbSizeInstance); ok(typeattr->typekind == TKIND_ALIAS, "typekind = %d\n", typeattr->typekind); ok(typeattr->cFuncs == 0, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); @@ -3032,15 +3032,15 @@ todo_wine { }
hres = ICreateTypeInfo_SetTypeDescAlias(createti, NULL); - ok(hres == E_INVALIDARG, "got %08x\n", hres); + ok(hres == E_INVALIDARG, "got %08lx\n", hres);
typedesc1.vt = VT_I1; hres = ICreateTypeInfo_SetTypeDescAlias(createti, &typedesc1); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetTypeAttr(interface1, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeInstance == 1, "cbSizeInstance = %d\n", typeattr->cbSizeInstance); + ok(hres == S_OK, "got %08lx\n", hres); + ok(typeattr->cbSizeInstance == 1, "cbSizeInstance = %ld\n", typeattr->cbSizeInstance); ok(typeattr->typekind == TKIND_ALIAS, "typekind = %d\n", typeattr->typekind); ok(typeattr->cFuncs == 0, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); @@ -3055,11 +3055,11 @@ todo_wine {
typedesc1.vt = VT_R8; hres = ICreateTypeInfo_SetTypeDescAlias(createti, &typedesc1); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetTypeAttr(interface1, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeInstance == 8, "cbSizeInstance = %d\n", typeattr->cbSizeInstance); + ok(hres == S_OK, "got %08lx\n", hres); + ok(typeattr->cbSizeInstance == 8, "cbSizeInstance = %ld\n", typeattr->cbSizeInstance); ok(typeattr->typekind == TKIND_ALIAS, "typekind = %d\n", typeattr->typekind); ok(typeattr->cFuncs == 0, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); @@ -3076,7 +3076,7 @@ todo_wine { ICreateTypeInfo_Release(createti);
hres = ICreateTypeLib2_SaveAllChanges(createtl); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
ok(ICreateTypeLib2_Release(createtl)==0, "Object should be freed\n");
@@ -3085,10 +3085,10 @@ todo_wine { ok(ITypeLib_Release(stdole)==0, "Object should be freed\n");
hres = LoadTypeLibEx(filenameW, REGKIND_NONE, &tl); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeLib_GetLibAttr(tl, &libattr); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(libattr->syskind == sys, "syskind = %d\n", libattr->syskind); ok(libattr->wMajorVerNum == 0, "wMajorVer = %d\n", libattr->wMajorVerNum); ok(libattr->wMinorVerNum == 0, "wMinorVerNum = %d\n", libattr->wMinorVerNum); @@ -3100,7 +3100,7 @@ todo_wine { memids[0] = 0xdeadbeef; memids[1] = 0xdeadbeef; hres = ITypeLib_FindName(tl, param1W, 0, tinfos, memids, &found); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(found == 0, "got wrong count: %u\n", found); ok(tinfos[0] == NULL, "got invalid typeinfo[0]\n"); ok(tinfos[1] == NULL, "got invalid typeinfo[1]\n"); @@ -3112,7 +3112,7 @@ todo_wine { memids[0] = 0xdeadbeef; memids[1] = 0xdeadbeef; hres = ITypeLib_FindName(tl, func1W, 0, tinfos, memids, &found); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(found == 1, "got wrong count: %u\n", found); ok(tinfos[0] != NULL, "got invalid typeinfo[0]\n"); ok(tinfos[1] == NULL, "got invalid typeinfo[1]\n"); @@ -3126,53 +3126,53 @@ todo_wine { memids[0] = 0xdeadbeef; memids[1] = 0xdeadbeef; hres = ITypeLib_FindName(tl, interface1W, 0, tinfos, memids, &found); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(found == 1, "got wrong count: %u\n", found); ok(tinfos[0] != NULL, "got invalid typeinfo[0]\n"); ok(tinfos[1] == NULL, "got invalid typeinfo[1]\n"); - ok(memids[0] == MEMBERID_NIL, "got invalid memid[0]: %x\n", memids[0]); + ok(memids[0] == MEMBERID_NIL, "got invalid memid[0]: %lx\n", memids[0]); ok(memids[1] == 0xdeadbeef, "got invalid memid[1]\n"); if(tinfos[0]) ITypeInfo_Release(tinfos[0]);
hres = ITypeLib_GetDocumentation(tl, -1, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(memcmp(typelibW, name, sizeof(typelibW)) == 0, "got wrong typelib name: %s\n", wine_dbgstr_w(name)); ok(docstring == NULL, "got wrong docstring: %s\n", wine_dbgstr_w(docstring)); - ok(helpcontext == 0, "got wrong helpcontext: 0x%x\n", helpcontext); + ok(helpcontext == 0, "got wrong helpcontext: 0x%lx\n", helpcontext); ok(memcmp(helpfileW, helpfile, sizeof(helpfileW)) == 0, "got wrong helpfile: %s\n", wine_dbgstr_w(helpfile)); SysFreeString(name); SysFreeString(helpfile);
hres = ITypeLib_GetDocumentation(tl, 0, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(memcmp(interface1W, name, sizeof(interface1W)) == 0, "got wrong typeinfo name: %s\n", wine_dbgstr_w(name)); ok(docstring == NULL, "got wrong docstring: %s\n", wine_dbgstr_w(docstring)); - ok(helpcontext == 0, "got wrong helpcontext: 0x%x\n", helpcontext); + ok(helpcontext == 0, "got wrong helpcontext: 0x%lx\n", helpcontext); ok(memcmp(helpfileW, helpfile, sizeof(helpfileW)) == 0, "got wrong helpfile: %s\n", wine_dbgstr_w(helpfile)); SysFreeString(name); SysFreeString(helpfile);
hres = ITypeLib_QueryInterface(tl, &IID_ITypeLib2, (void**)&tl2); - ok(hres == S_OK, "no ITypeLib2 interface (%x)\n", hres); + ok(hres == S_OK, "no ITypeLib2 interface (%lx)\n", hres); V_VT(&cust_data) = VT_EMPTY; V_I4(&cust_data) = 0; hres = ITypeLib2_GetCustData(tl2, &tlcustguid, &cust_data); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(V_VT(&cust_data) == VT_I4, "V_VT(&cust_data) = %d\n", V_VT(&cust_data)); - ok(V_I4(&cust_data) == 1, "V_I4(&cust_data) = %d\n", V_I4(&cust_data)); + ok(V_I4(&cust_data) == 1, "V_I4(&cust_data) = %ld\n", V_I4(&cust_data)); ITypeLib2_Release(tl2);
hres = ITypeLib_GetTypeInfo(tl, 0, &ti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeInstance == sizeof(void*), "cbSizeInstance = %d\n", typeattr->cbSizeInstance); + ok(hres == S_OK, "got %08lx\n", hres); + ok(typeattr->cbSizeInstance == sizeof(void*), "cbSizeInstance = %ld\n", typeattr->cbSizeInstance); ok(typeattr->typekind == TKIND_INTERFACE, "typekind = %d\n", typeattr->typekind); ok(typeattr->cFuncs == 13, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); @@ -3186,22 +3186,22 @@ todo_wine { ITypeInfo_ReleaseTypeAttr(ti, typeattr);
hres = ITypeInfo_GetRefTypeOfImplType(ti, 0, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - ok(hreftype == 3, "hreftype = %d\n", hreftype); + ok(hres == S_OK, "got %08lx\n", hres); + ok(hreftype == 3, "hreftype = %ld\n", hreftype);
hres = ITypeInfo_GetRefTypeInfo(ti, hreftype, &unknown); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetTypeAttr(unknown, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(IsEqualGUID(&typeattr->guid, &IID_IUnknown), "got wrong reftypeinfo\n"); ITypeInfo_ReleaseTypeAttr(unknown, typeattr);
ITypeInfo_Release(unknown);
hres = ITypeInfo_GetFuncDesc(ti, 0, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); - ok(pfuncdesc->memid == 0, "got %x\n", pfuncdesc->memid); + ok(hres == S_OK, "got %08lx\n", hres); + ok(pfuncdesc->memid == 0, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -3217,24 +3217,24 @@ todo_wine { ok(U(*edesc).idldesc.wIDLFlags == IDLFLAG_FIN, "got: %x\n", U(*edesc).idldesc.wIDLFlags);
hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(!memcmp(name, func1W, sizeof(func1W)), "got name: %s\n", wine_dbgstr_w(name)); ok(docstring == NULL, "got docstring: %s\n", wine_dbgstr_w(docstring)); - ok(helpcontext == 0x201, "got helpcontext: 0x%x\n", helpcontext); + ok(helpcontext == 0x201, "got helpcontext: 0x%lx\n", helpcontext); ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "got helpfile: %s\n", wine_dbgstr_w(helpfile)); SysFreeString(name); SysFreeString(helpfile);
hres = ITypeInfo_GetNames(ti, pfuncdesc->memid, NULL, 0, &cnames); - ok(hres == E_INVALIDARG, "got: %08x\n", hres); + ok(hres == E_INVALIDARG, "got: %08lx\n", hres);
cnames = 8; hres = ITypeInfo_GetNames(ti, pfuncdesc->memid, names, 0, &cnames); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(cnames == 0, "got: %u\n", cnames);
hres = ITypeInfo_GetNames(ti, pfuncdesc->memid, names, ARRAY_SIZE(names), &cnames); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(cnames == 1, "got: %u\n", cnames); ok(!memcmp(names[0], func1W, sizeof(func1W)), "got names[0]: %s\n", wine_dbgstr_w(names[0])); SysFreeString(names[0]); @@ -3242,8 +3242,8 @@ todo_wine { ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
hres = ITypeInfo_GetFuncDesc(ti, 1, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); - ok(pfuncdesc->memid == 0x60010001, "got %x\n", pfuncdesc->memid); + ok(hres == S_OK, "got %08lx\n", hres); + ok(pfuncdesc->memid == 0x60010001, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam == NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -3257,17 +3257,17 @@ todo_wine { ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags);
hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(name == NULL, "got name: %s\n", wine_dbgstr_w(name)); ok(docstring == NULL, "got docstring: %s\n", wine_dbgstr_w(docstring)); - ok(helpcontext == 0, "got helpcontext: 0x%x\n", helpcontext); + ok(helpcontext == 0, "got helpcontext: 0x%lx\n", helpcontext); ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "got helpfile: %s\n", wine_dbgstr_w(helpfile)); SysFreeString(helpfile); ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
hres = ITypeInfo_GetFuncDesc(ti, 2, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); - ok(pfuncdesc->memid == 0x1, "got %x\n", pfuncdesc->memid); + ok(hres == S_OK, "got %08lx\n", hres); + ok(pfuncdesc->memid == 0x1, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam == NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -3281,17 +3281,17 @@ todo_wine { ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags);
hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(name == NULL, "got name: %s\n", wine_dbgstr_w(name)); ok(docstring == NULL, "got docstring: %s\n", wine_dbgstr_w(docstring)); - ok(helpcontext == 0, "got helpcontext: 0x%x\n", helpcontext); + ok(helpcontext == 0, "got helpcontext: 0x%lx\n", helpcontext); ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "got helpfile: %s\n", wine_dbgstr_w(helpfile)); SysFreeString(helpfile); ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
hres = ITypeInfo_GetFuncDesc(ti, 3, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); - ok(pfuncdesc->memid == 0x6001000b, "got %x\n", pfuncdesc->memid); + ok(hres == S_OK, "got %08lx\n", hres); + ok(pfuncdesc->memid == 0x6001000b, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -3308,7 +3308,7 @@ todo_wine { ok(edesc->tdesc.vt == VT_BSTR, "got: %d\n", edesc->tdesc.vt); ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(U(*edesc).paramdesc.pparamdescex != NULL, "got: %p\n", U(*edesc).paramdesc.pparamdescex); - ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %d\n", + ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %ld\n", U(*edesc).paramdesc.pparamdescex->cBytes); ok(V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == VT_BSTR, "got: %d\n", V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); @@ -3320,7 +3320,7 @@ todo_wine { ok(edesc->tdesc.vt == VT_BSTR, "got: %d\n", edesc->tdesc.vt); ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(U(*edesc).paramdesc.pparamdescex != NULL, "got: %p\n", U(*edesc).paramdesc.pparamdescex); - ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %d\n", + ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %ld\n", U(*edesc).paramdesc.pparamdescex->cBytes); ok(V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == VT_BSTR, "got: %d\n", V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); @@ -3329,16 +3329,16 @@ todo_wine { wine_dbgstr_w(V_BSTR(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)));
hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(!memcmp(name, func2W, sizeof(func2W)), "got name: %s\n", wine_dbgstr_w(name)); ok(docstring == NULL, "got docstring: %s\n", wine_dbgstr_w(docstring)); - ok(helpcontext == 0, "got helpcontext: 0x%x\n", helpcontext); + ok(helpcontext == 0, "got helpcontext: 0x%lx\n", helpcontext); ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "got helpfile: %s\n", wine_dbgstr_w(helpfile)); SysFreeString(name); SysFreeString(helpfile);
hres = ITypeInfo_GetNames(ti, pfuncdesc->memid, names, ARRAY_SIZE(names), &cnames); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(cnames == 3, "got: %u\n", cnames); ok(!memcmp(names[0], func2W, sizeof(func2W)), "got names[0]: %s\n", wine_dbgstr_w(names[0])); ok(!memcmp(names[1], param1W, sizeof(func2W)), "got names[1]: %s\n", wine_dbgstr_w(names[1])); @@ -3349,8 +3349,8 @@ todo_wine { ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
hres = ITypeInfo_GetFuncDesc(ti, 4, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); - ok(pfuncdesc->memid == 0x6001000c, "got %x\n", pfuncdesc->memid); + ok(hres == S_OK, "got %08lx\n", hres); + ok(pfuncdesc->memid == 0x6001000c, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -3367,36 +3367,36 @@ todo_wine { ok(edesc->tdesc.vt == VT_INT, "got: %d\n", edesc->tdesc.vt); ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(U(*edesc).paramdesc.pparamdescex != NULL, "got: %p\n", U(*edesc).paramdesc.pparamdescex); - ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %d\n", + ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %ld\n", U(*edesc).paramdesc.pparamdescex->cBytes); ok(V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == VT_I4, "got: %d\n", V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); ok(V_I4(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == 0xFFFFFFFF, - "got: 0x%x\n", V_I4(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); + "got: 0x%lx\n", V_I4(&U(*edesc).paramdesc.pparamdescex->varDefaultValue));
edesc = pfuncdesc->lprgelemdescParam + 1; ok(edesc->tdesc.vt == VT_INT, "got: %d\n", edesc->tdesc.vt); ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(U(*edesc).paramdesc.pparamdescex != NULL, "got: %p\n", U(*edesc).paramdesc.pparamdescex); - ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %d\n", + ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %ld\n", U(*edesc).paramdesc.pparamdescex->cBytes); ok(V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == VT_I4, "got: %d\n", V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); ok(V_I4(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == 0xFFFFFFFF, - "got: 0x%x\n", V_I4(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); + "got: 0x%lx\n", V_I4(&U(*edesc).paramdesc.pparamdescex->varDefaultValue));
hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(name == NULL, "got name: %s\n", wine_dbgstr_w(name)); ok(docstring == NULL, "got docstring: %s\n", wine_dbgstr_w(docstring)); - ok(helpcontext == 0, "got helpcontext: 0x%x\n", helpcontext); + ok(helpcontext == 0, "got helpcontext: 0x%lx\n", helpcontext); ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "got helpfile: %s\n", wine_dbgstr_w(helpfile)); SysFreeString(helpfile); ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
hres = ITypeInfo_GetFuncDesc(ti, 5, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); - ok(pfuncdesc->memid == 0x60010005, "got %x\n", pfuncdesc->memid); + ok(hres == S_OK, "got %08lx\n", hres); + ok(pfuncdesc->memid == 0x60010005, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -3411,7 +3411,7 @@ todo_wine {
edesc = pfuncdesc->lprgelemdescParam; ok(U(*edesc).paramdesc.pparamdescex != NULL, "got: %p\n", U(*edesc).paramdesc.pparamdescex); - ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %d\n", + ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %ld\n", U(*edesc).paramdesc.pparamdescex->cBytes); ok(V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == VT_INT, "got: %d\n", V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); @@ -3420,20 +3420,20 @@ todo_wine { ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(edesc->tdesc.vt == VT_USERDEFINED, "got: %d\n", edesc->tdesc.vt); - ok(U(edesc->tdesc).hreftype == hreftype, "got: 0x%x\n", U(edesc->tdesc).hreftype); + ok(U(edesc->tdesc).hreftype == hreftype, "got: 0x%lx\n", U(edesc->tdesc).hreftype);
hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(name == NULL, "got name: %s\n", wine_dbgstr_w(name)); ok(docstring == NULL, "got docstring: %s\n", wine_dbgstr_w(docstring)); - ok(helpcontext == 0, "got helpcontext: 0x%x\n", helpcontext); + ok(helpcontext == 0, "got helpcontext: 0x%lx\n", helpcontext); ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "got helpfile: %s\n", wine_dbgstr_w(helpfile)); SysFreeString(helpfile); ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
hres = ITypeInfo_GetFuncDesc(ti, 6, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); - ok(pfuncdesc->memid == 0x60010006, "got %x\n", pfuncdesc->memid); + ok(hres == S_OK, "got %08lx\n", hres); + ok(pfuncdesc->memid == 0x60010006, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -3448,7 +3448,7 @@ todo_wine {
edesc = pfuncdesc->lprgelemdescParam; ok(U(*edesc).paramdesc.pparamdescex != NULL, "got: %p\n", U(*edesc).paramdesc.pparamdescex); - ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %d\n", + ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %ld\n", U(*edesc).paramdesc.pparamdescex->cBytes); ok(V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == VT_INT, "got: %d\n", V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); @@ -3457,20 +3457,20 @@ todo_wine { ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(edesc->tdesc.vt == VT_VARIANT, "got: %d\n", edesc->tdesc.vt); - ok(U(edesc->tdesc).hreftype == 0, "got: 0x%x\n", U(edesc->tdesc).hreftype); + ok(U(edesc->tdesc).hreftype == 0, "got: 0x%lx\n", U(edesc->tdesc).hreftype);
hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(name == NULL, "got name: %s\n", wine_dbgstr_w(name)); ok(docstring == NULL, "got docstring: %s\n", wine_dbgstr_w(docstring)); - ok(helpcontext == 0, "got helpcontext: 0x%x\n", helpcontext); + ok(helpcontext == 0, "got helpcontext: 0x%lx\n", helpcontext); ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "got helpfile: %s\n", wine_dbgstr_w(helpfile)); SysFreeString(helpfile); ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
hres = ITypeInfo_GetFuncDesc(ti, 7, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); - ok(pfuncdesc->memid == 0x60010009, "got %x\n", pfuncdesc->memid); + ok(hres == S_OK, "got %08lx\n", hres); + ok(pfuncdesc->memid == 0x60010009, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -3492,7 +3492,7 @@ todo_wine { ok(edesc->tdesc.vt == VT_UI2, "got: %d\n", edesc->tdesc.vt); ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(U(*edesc).paramdesc.pparamdescex != NULL, "got: %p\n", U(*edesc).paramdesc.pparamdescex); - ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %d\n", + ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %ld\n", U(*edesc).paramdesc.pparamdescex->cBytes); ok(V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == VT_UI2, "got: %d\n", V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); @@ -3500,17 +3500,17 @@ todo_wine { V_UI2(&U(*edesc).paramdesc.pparamdescex->varDefaultValue));
hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(name == NULL, "got name: %s\n", wine_dbgstr_w(name)); ok(docstring == NULL, "got docstring: %s\n", wine_dbgstr_w(docstring)); - ok(helpcontext == 0, "got helpcontext: 0x%x\n", helpcontext); + ok(helpcontext == 0, "got helpcontext: 0x%lx\n", helpcontext); ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "got helpfile: %s\n", wine_dbgstr_w(helpfile)); SysFreeString(helpfile); ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
hres = ITypeInfo_GetFuncDesc(ti, 8, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); - ok(pfuncdesc->memid == 0x60010003, "got %x\n", pfuncdesc->memid); + ok(hres == S_OK, "got %08lx\n", hres); + ok(pfuncdesc->memid == 0x60010003, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -3527,25 +3527,25 @@ todo_wine { ok(edesc->tdesc.vt == VT_INT, "got: %d\n", edesc->tdesc.vt); ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(U(*edesc).paramdesc.pparamdescex != NULL, "got: %p\n", U(*edesc).paramdesc.pparamdescex); - ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %d\n", + ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %ld\n", U(*edesc).paramdesc.pparamdescex->cBytes); ok(V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == VT_I4, "got: %d\n", V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); - ok(V_I4(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == 0x123, "got: 0x%x\n", + ok(V_I4(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == 0x123, "got: 0x%lx\n", V_I4(&U(*edesc).paramdesc.pparamdescex->varDefaultValue));
hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(name == NULL, "got name: %s\n", wine_dbgstr_w(name)); ok(docstring == NULL, "got docstring: %s\n", wine_dbgstr_w(docstring)); - ok(helpcontext == 0, "got helpcontext: 0x%x\n", helpcontext); + ok(helpcontext == 0, "got helpcontext: 0x%lx\n", helpcontext); ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "got helpfile: %s\n", wine_dbgstr_w(helpfile)); SysFreeString(helpfile); ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
hres = ITypeInfo_GetFuncDesc(ti, 9, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); - ok(pfuncdesc->memid == 0, "got %x\n", pfuncdesc->memid); + ok(hres == S_OK, "got %08lx\n", hres); + ok(pfuncdesc->memid == 0, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam == NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -3559,24 +3559,24 @@ todo_wine { ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags);
hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(!memcmp(name, func1W, sizeof(func1W)), "got name: %s\n", wine_dbgstr_w(name)); ok(docstring == NULL, "got docstring: %s\n", wine_dbgstr_w(docstring)); - ok(helpcontext == 0x201, "got helpcontext: 0x%x\n", helpcontext); + ok(helpcontext == 0x201, "got helpcontext: 0x%lx\n", helpcontext); ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "got helpfile: %s\n", wine_dbgstr_w(helpfile)); SysFreeString(name); SysFreeString(helpfile);
hres = ITypeInfo_GetNames(ti, pfuncdesc->memid, names, ARRAY_SIZE(names), &cnames); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(cnames == 1, "got: %u\n", cnames); ok(!memcmp(names[0], func1W, sizeof(func1W)), "got names[0]: %s\n", wine_dbgstr_w(names[0])); SysFreeString(names[0]); ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
hres = ITypeInfo_GetFuncDesc(ti, 10, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); - ok(pfuncdesc->memid == 0x60010007, "got %x\n", pfuncdesc->memid); + ok(hres == S_OK, "got %08lx\n", hres); + ok(pfuncdesc->memid == 0x60010007, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -3599,17 +3599,17 @@ todo_wine { ok(U(*U(edesc->tdesc).lptdesc).lptdesc->vt == VT_BSTR, "got: %d\n", U(*U(edesc->tdesc).lptdesc).lptdesc->vt);
hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(name == NULL, "got name: %s\n", wine_dbgstr_w(name)); ok(docstring == NULL, "got docstring: %s\n", wine_dbgstr_w(docstring)); - ok(helpcontext == 0, "got helpcontext: 0x%x\n", helpcontext); + ok(helpcontext == 0, "got helpcontext: 0x%lx\n", helpcontext); ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "got helpfile: %s\n", wine_dbgstr_w(helpfile)); SysFreeString(helpfile); ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
hres = ITypeInfo_GetFuncDesc(ti, 11, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); - ok(pfuncdesc->memid == 0x60010004, "got %x\n", pfuncdesc->memid); + ok(hres == S_OK, "got %08lx\n", hres); + ok(pfuncdesc->memid == 0x60010004, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -3630,17 +3630,17 @@ todo_wine { ok(U(edesc->tdesc).lptdesc->vt == VT_BSTR, "got: %d\n", U(edesc->tdesc).lptdesc->vt);
hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(name == NULL, "got name: %s\n", wine_dbgstr_w(name)); ok(docstring == NULL, "got docstring: %s\n", wine_dbgstr_w(docstring)); - ok(helpcontext == 0, "got helpcontext: 0x%x\n", helpcontext); + ok(helpcontext == 0, "got helpcontext: 0x%lx\n", helpcontext); ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "got helpfile: %s\n", wine_dbgstr_w(helpfile)); SysFreeString(helpfile); ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
hres = ITypeInfo_GetFuncDesc(ti, 12, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); - ok(pfuncdesc->memid == 0, "got %x\n", pfuncdesc->memid); + ok(hres == S_OK, "got %08lx\n", hres); + ok(pfuncdesc->memid == 0, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -3658,32 +3658,32 @@ todo_wine { ok(U(*edesc).idldesc.wIDLFlags == IDLFLAG_FIN, "got: %x\n", U(*edesc).idldesc.wIDLFlags);
hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(!memcmp(name, func1W, sizeof(func1W)), "got name: %s\n", wine_dbgstr_w(name)); ok(docstring == NULL, "got docstring: %s\n", wine_dbgstr_w(docstring)); - ok(helpcontext == 0x201, "got helpcontext: 0x%x\n", helpcontext); + ok(helpcontext == 0x201, "got helpcontext: 0x%lx\n", helpcontext); ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "got helpfile: %s\n", wine_dbgstr_w(helpfile)); SysFreeString(name); SysFreeString(helpfile);
hres = ITypeInfo_GetNames(ti, pfuncdesc->memid, names, ARRAY_SIZE(names), &cnames); - ok(hres == S_OK, "got: %08x\n", hres); + ok(hres == S_OK, "got: %08lx\n", hres); ok(cnames == 1, "got: %u\n", cnames); ok(!memcmp(names[0], func1W, sizeof(func1W)), "got names[0]: %s\n", wine_dbgstr_w(names[0])); SysFreeString(names[0]); ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
hres = ITypeInfo_GetFuncDesc(ti, 13, &pfuncdesc); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
ok(ITypeInfo_Release(ti) == 0, "Object should be freed\n");
hres = ITypeLib_GetTypeInfo(tl, 1, &ti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeInstance == sizeof(void*), "cbSizeInstance = %d\n", typeattr->cbSizeInstance); + ok(hres == S_OK, "got %08lx\n", hres); + ok(typeattr->cbSizeInstance == sizeof(void*), "cbSizeInstance = %ld\n", typeattr->cbSizeInstance); ok(typeattr->typekind == TKIND_INTERFACE, "typekind = %d\n", typeattr->typekind); ok(typeattr->cFuncs == 2, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); @@ -3697,11 +3697,11 @@ todo_wine { ITypeInfo_ReleaseTypeAttr(ti, typeattr);
hres = ITypeInfo_GetRefTypeOfImplType(ti, 0, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetFuncDesc(ti, 0, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); - ok(pfuncdesc->memid == 0x60020000, "got %x\n", pfuncdesc->memid); + ok(hres == S_OK, "got %08lx\n", hres); + ok(pfuncdesc->memid == 0x60020000, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -3719,7 +3719,7 @@ todo_wine { ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(U(*edesc).paramdesc.pparamdescex != NULL, "got: %p\n", U(*edesc).paramdesc.pparamdescex); - ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %d\n", + ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %ld\n", U(*edesc).paramdesc.pparamdescex->cBytes); ok(V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == VT_INT, "got: %d\n", V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); @@ -3728,12 +3728,12 @@ todo_wine { ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(U(edesc->tdesc).lptdesc == NULL, "got: %p\n", U(edesc->tdesc).lptdesc); - ok(U(edesc->tdesc).hreftype == 0, "got: %d\n", U(edesc->tdesc).hreftype); + ok(U(edesc->tdesc).hreftype == 0, "got: %ld\n", U(edesc->tdesc).hreftype); ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
hres = ITypeInfo_GetFuncDesc(ti, 1, &pfuncdesc); - ok(hres == S_OK, "got %08x\n", hres); - ok(pfuncdesc->memid == 0x60020001, "got %x\n", pfuncdesc->memid); + ok(hres == S_OK, "got %08lx\n", hres); + ok(pfuncdesc->memid == 0x60020001, "got %lx\n", pfuncdesc->memid); ok(pfuncdesc->lprgscode == NULL, "got %p\n", pfuncdesc->lprgscode); ok(pfuncdesc->lprgelemdescParam != NULL, "got %p\n", pfuncdesc->lprgelemdescParam); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got 0x%x\n", pfuncdesc->funckind); @@ -3751,7 +3751,7 @@ todo_wine { ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(U(*edesc).paramdesc.pparamdescex != NULL, "got: %p\n", U(*edesc).paramdesc.pparamdescex); - ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %d\n", + ok(U(*edesc).paramdesc.pparamdescex->cBytes == sizeof(PARAMDESCEX), "got: %ld\n", U(*edesc).paramdesc.pparamdescex->cBytes); ok(V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue) == VT_INT, "got: %d\n", V_VT(&U(*edesc).paramdesc.pparamdescex->varDefaultValue)); @@ -3760,20 +3760,20 @@ todo_wine { ok(U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT, "got: 0x%x\n", U(*edesc).paramdesc.wParamFlags); ok(U(edesc->tdesc).lptdesc == NULL, "got: %p\n", U(edesc->tdesc).lptdesc); - ok(U(edesc->tdesc).hreftype == 0, "got: %d\n", U(edesc->tdesc).hreftype); + ok(U(edesc->tdesc).hreftype == 0, "got: %ld\n", U(edesc->tdesc).hreftype); ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
ok(ITypeInfo_Release(ti) == 0, "Object should be freed\n");
hres = ITypeLib_GetTypeInfo(tl, 2, &ti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_QueryInterface(ti, &IID_ITypeInfo2, (void**)&ti2); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeInstance == sizeof(void*), "cbSizeInstance = %d\n", typeattr->cbSizeInstance); + ok(hres == S_OK, "got %08lx\n", hres); + ok(typeattr->cbSizeInstance == sizeof(void*), "cbSizeInstance = %ld\n", typeattr->cbSizeInstance); ok(typeattr->typekind == TKIND_INTERFACE, "typekind = %d\n", typeattr->typekind); ok(typeattr->cFuncs == 0, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); @@ -3787,7 +3787,7 @@ todo_wine {
VariantClear(&cust_data); hres = ITypeInfo2_GetCustData(ti2, &custguid, &cust_data); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(V_VT(&cust_data) == VT_BSTR, "got wrong custdata type: %u\n", V_VT(&cust_data)); ok(!lstrcmpW(V_BSTR(&cust_data), asdfW), "got wrong custdata value: %s\n", wine_dbgstr_w(V_BSTR(&cust_data))); SysFreeString(V_BSTR(&cust_data)); @@ -3796,11 +3796,11 @@ todo_wine { ok(ITypeInfo_Release(ti) == 0, "Object should be freed\n");
hres = ITypeLib_GetTypeInfo(tl, 3, &ti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeInstance == sizeof(void*), "cbSizeInstance = %d\n", typeattr->cbSizeInstance); + ok(hres == S_OK, "got %08lx\n", hres); + ok(typeattr->cbSizeInstance == sizeof(void*), "cbSizeInstance = %ld\n", typeattr->cbSizeInstance); ok(typeattr->typekind == TKIND_COCLASS, "typekind = %d\n", typeattr->typekind); ok(typeattr->cFuncs == 0, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); @@ -3813,40 +3813,40 @@ todo_wine { ITypeInfo_ReleaseTypeAttr(ti, typeattr);
hres = ITypeInfo_GetRefTypeOfImplType(ti, 0, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - ok(hreftype == 0, "got wrong hreftype: %x\n", hreftype); + ok(hres == S_OK, "got %08lx\n", hres); + ok(hreftype == 0, "got wrong hreftype: %lx\n", hreftype);
hres = ITypeInfo_GetImplTypeFlags(ti, 0, &impltypeflags); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(impltypeflags == IMPLTYPEFLAG_FDEFAULT, "got wrong flag: %x\n", impltypeflags);
hres = ITypeInfo_GetRefTypeOfImplType(ti, 1, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - ok(hreftype == 1, "got wrong hreftype: %x\n", hreftype); + ok(hres == S_OK, "got %08lx\n", hres); + ok(hreftype == 1, "got wrong hreftype: %lx\n", hreftype);
hres = ITypeInfo_GetImplTypeFlags(ti, 1, &impltypeflags); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(impltypeflags == IMPLTYPEFLAG_FRESTRICTED, "got wrong flag: %x\n", impltypeflags);
hres = ITypeInfo_GetRefTypeOfImplType(ti, 2, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - ok(hreftype == 1, "got wrong hreftype: %x\n", hreftype); + ok(hres == S_OK, "got %08lx\n", hres); + ok(hreftype == 1, "got wrong hreftype: %lx\n", hreftype);
hres = ITypeInfo_GetImplTypeFlags(ti, 2, &impltypeflags); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(impltypeflags == 0, "got wrong flag: %x\n", impltypeflags);
hres = ITypeInfo_GetRefTypeOfImplType(ti, 3, &hreftype); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hres);
ok(ITypeInfo_Release(ti) == 0, "Object should be freed\n");
hres = ITypeLib_GetTypeInfo(tl, 4, &ti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeInstance == sizeof(void*), "cbSizeInstance = %d\n", typeattr->cbSizeInstance); + ok(hres == S_OK, "got %08lx\n", hres); + ok(typeattr->cbSizeInstance == sizeof(void*), "cbSizeInstance = %ld\n", typeattr->cbSizeInstance); ok(typeattr->typekind == TKIND_DISPATCH, "typekind = %d\n", typeattr->typekind); ok(typeattr->cFuncs == 8, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); @@ -3859,17 +3859,17 @@ todo_wine { ITypeInfo_ReleaseTypeAttr(ti, typeattr);
hres = ITypeInfo_GetTypeComp(ti, &tcomp); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_QueryInterface(ti, &IID_ITypeComp, (void**)&tcomp2); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(tcomp == tcomp2, "got %p, was %p\n", tcomp2, tcomp); ITypeComp_Release(tcomp2);
hres = ITypeComp_Bind(tcomp, invokeW, 0, INVOKE_FUNC, &interface1, &desckind, &bindptr); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); ok(desckind == DESCKIND_FUNCDESC, "got wrong desckind: 0x%x\n", desckind); - ok(bindptr.lpfuncdesc->memid == 0x60010003, "got %x\n", bindptr.lpfuncdesc->memid); + ok(bindptr.lpfuncdesc->memid == 0x60010003, "got %lx\n", bindptr.lpfuncdesc->memid); ok(bindptr.lpfuncdesc->lprgscode == NULL, "got %p\n", bindptr.lpfuncdesc->lprgscode); ok(bindptr.lpfuncdesc->lprgelemdescParam != NULL, "got %p\n", bindptr.lpfuncdesc->lprgelemdescParam); ok(bindptr.lpfuncdesc->funckind == FUNC_DISPATCH, "got 0x%x\n", bindptr.lpfuncdesc->funckind); @@ -3887,15 +3887,15 @@ todo_wine { ITypeComp_Release(tcomp);
hres = ITypeInfo_GetRefTypeOfImplType(ti, -1, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - ok(hreftype == -2, "got wrong hreftype: %x\n", hreftype); + ok(hres == S_OK, "got %08lx\n", hres); + ok(hreftype == -2, "got wrong hreftype: %lx\n", hreftype);
hres = ITypeInfo_GetRefTypeInfo(ti, hreftype, &interface1); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetTypeAttr(interface1, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeInstance == sizeof(void*), "cbSizeInstance = %d\n", typeattr->cbSizeInstance); + ok(hres == S_OK, "got %08lx\n", hres); + ok(typeattr->cbSizeInstance == sizeof(void*), "cbSizeInstance = %ld\n", typeattr->cbSizeInstance); ok(typeattr->typekind == TKIND_INTERFACE, "typekind = %d\n", typeattr->typekind); ok(typeattr->cFuncs == 1, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); @@ -3913,11 +3913,11 @@ todo_wine { ok(ITypeInfo_Release(ti) == 0, "Object should be freed\n");
hres = ITypeLib_GetTypeInfo(tl, 5, &ti); - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres);
hres = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeInstance == 8, "cbSizeInstance = %d\n", typeattr->cbSizeInstance); + ok(hres == S_OK, "got %08lx\n", hres); + ok(typeattr->cbSizeInstance == 8, "cbSizeInstance = %ld\n", typeattr->cbSizeInstance); ok(typeattr->typekind == TKIND_ALIAS, "typekind = %d\n", typeattr->typekind); ok(typeattr->cFuncs == 0, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); @@ -6375,14 +6375,14 @@ static void test_dump_typelib(const WCHAR *name) /* check that it's possible to search using this uuid */ typeinfo2 = NULL; hr = ITypeLib_GetTypeInfoOfGuid(typelib, &guid, &typeinfo2); - ok(hr == S_OK || (IsEqualGUID(&guid, &IID_NULL) && hr == TYPE_E_ELEMENTNOTFOUND), "got 0x%08x\n", hr); + ok(hr == S_OK || (IsEqualGUID(&guid, &IID_NULL) && hr == TYPE_E_ELEMENTNOTFOUND), "got 0x%08lx\n", hr); if (hr == S_OK) ITypeInfo_Release(typeinfo2); }
ole_check(ITypeInfo_GetTypeAttr(typeinfo, &typeattr));
hr = ITypeInfo_QueryInterface(typeinfo, &IID_ITypeInfo2, (void**)&typeinfo2); - ok(hr == S_OK, "Could not get ITypeInfo2: %08x\n", hr); + ok(hr == S_OK, "Could not get ITypeInfo2: %08lx\n", hr);
memset(&cust_data, 0, sizeof(cust_data)); ole_check(ITypeInfo2_GetAllCustData(typeinfo2,&cust_data)); @@ -6394,7 +6394,7 @@ static void test_dump_typelib(const WCHAR *name) parse_guid(ti->custdata[cust].uuid,&guid); /* check that it's possible to search using this uuid */ hr = ITypeInfo2_GetCustData(typeinfo2,&guid,&v); - ok(hr == S_OK, "GetCustDatafailed: %08x\n", hr); + ok(hr == S_OK, "GetCustDatafailed: %08lx\n", hr); check_variant_info(&v,&ti->custdata[cust].value); VariantClear(&v); } @@ -6429,7 +6429,7 @@ static void test_dump_typelib(const WCHAR *name) parse_guid(fn_info->custdata[cust].uuid,&guid); /* check that it's possible to search using this uuid */ hr = ITypeInfo2_GetFuncCustData(typeinfo2,func,&guid,&v); - ok(hr == S_OK, "GetCustDatafailed: %08x\n", hr); + ok(hr == S_OK, "GetCustDatafailed: %08lx\n", hr); check_variant_info(&v,&fn_info->custdata[cust].value); VariantClear(&v); } @@ -6457,7 +6457,7 @@ static void test_dump_typelib(const WCHAR *name) parse_guid(fn_info->params[i].custdata[cust].uuid,&guid); /* check that it's possible to search using this uuid */ hr = ITypeInfo2_GetParamCustData(typeinfo2,func,i,&guid,&v); - ok(hr == S_OK, "GetParamCustDatafailed: %08x\n", hr); + ok(hr == S_OK, "GetParamCustDatafailed: %08lx\n", hr); check_variant_info(&v,&fn_info->params[i].custdata[cust].value); VariantClear(&v); } @@ -6480,13 +6480,13 @@ static void test_dump_typelib(const WCHAR *name)
V_VT(&v) = VT_ERROR; hr = ITypeInfo2_GetFuncCustData(typeinfo2, func, &IID_NULL, &v); - ok(hr == S_OK, "GetFuncCustData failed: %08x\n", hr); + ok(hr == S_OK, "GetFuncCustData failed: %08lx\n", hr); ok(V_VT(&v) == VT_EMPTY, "V_VT(&v) = %d\n", V_VT(&v)); VariantClear(&v);
V_VT(&v) = VT_ERROR; hr = ITypeInfo2_GetFuncCustData(typeinfo2, func, &IID_IBaseIface, &v); - ok(hr == S_OK, "GetFuncCustData failed: %08x\n", hr); + ok(hr == S_OK, "GetFuncCustData failed: %08lx\n", hr); ok(V_VT(&v) == VT_EMPTY, "V_VT(&v) = %d\n", V_VT(&v)); VariantClear(&v);
@@ -6535,7 +6535,7 @@ static void test_dump_typelib(const WCHAR *name) parse_guid(var_info->custdata[cust].uuid,&guid); /* check that it's possible to search using this uuid */ hr = ITypeInfo2_GetVarCustData(typeinfo2,var,&guid,&v); - ok(hr == S_OK, "GetVarCustData failed: %08x\n", hr); + ok(hr == S_OK, "GetVarCustData failed: %08lx\n", hr); check_variant_info(&v,&var_info->custdata[cust].value); VariantClear(&v); } @@ -6584,27 +6584,27 @@ static void test_create_typelib_lcid(LCID lcid) MultiByteToWideChar(CP_ACP, 0, filename, -1, name, MAX_PATH);
hr = CreateTypeLib2(SYS_WIN32, name, &tl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_QueryInterface(tl, &IID_ITypeLib, (void**)&typelib); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeLib_GetLibAttr(typelib, &attr); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(attr->wLibFlags == 0, "flags 0x%x\n", attr->wLibFlags); ITypeLib_ReleaseTLibAttr(typelib, attr);
hr = ICreateTypeLib2_SetLcid(tl, lcid); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_SetVersion(tl, 3, 4); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_SaveAllChanges(tl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeLib_GetLibAttr(typelib, &attr); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(attr->wLibFlags == 0, "flags 0x%x\n", attr->wLibFlags); ITypeLib_ReleaseTLibAttr(typelib, attr);
@@ -6615,23 +6615,23 @@ static void test_create_typelib_lcid(LCID lcid) ok( file != INVALID_HANDLE_VALUE, "file creation failed\n" );
ReadFile( file, msft_header, sizeof(msft_header), &read, NULL ); - ok(read == sizeof(msft_header), "read %d\n", read); + ok(read == sizeof(msft_header), "read %ld\n", read); CloseHandle( file );
- ok(msft_header[0] == 0x5446534d, "got %08x\n", msft_header[0]); - ok(msft_header[1] == 0x00010002, "got %08x\n", msft_header[1]); - ok(msft_header[2] == 0xffffffff, "got %08x\n", msft_header[2]); - ok(msft_header[3] == (lcid ? lcid : 0x409), "got %08x (lcid %08x)\n", msft_header[3], lcid); - ok(msft_header[4] == lcid, "got %08x (lcid %08x)\n", msft_header[4], lcid); - ok(msft_header[6] == 0x00040003, "got %08x\n", msft_header[6]); - ok(msft_header[7] == 0, "got %08x\n", msft_header[7]); + ok(msft_header[0] == 0x5446534d, "got %08lx\n", msft_header[0]); + ok(msft_header[1] == 0x00010002, "got %08lx\n", msft_header[1]); + ok(msft_header[2] == 0xffffffff, "got %08lx\n", msft_header[2]); + ok(msft_header[3] == (lcid ? lcid : 0x409), "got %08lx (lcid %08lx)\n", msft_header[3], lcid); + ok(msft_header[4] == lcid, "got %08lx (lcid %08lx)\n", msft_header[4], lcid); + ok(msft_header[6] == 0x00040003, "got %08lx\n", msft_header[6]); + ok(msft_header[7] == 0, "got %08lx\n", msft_header[7]);
/* check flags after loading */ hr = LoadTypeLib(name, &typelib); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeLib_GetLibAttr(typelib, &attr); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(attr->wLibFlags == LIBFLAG_FHASDISKIMAGE, "flags 0x%x\n", attr->wLibFlags); ITypeLib_ReleaseTLibAttr(typelib, attr); ITypeLib_Release(typelib); @@ -6705,7 +6705,7 @@ static void test_register_typelib(BOOL system_registration) filename = create_test_typelib(3);
hr = LoadTypeLibEx(filename, REGKIND_NONE, &typelib); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
if (system_registration) hr = RegisterTypeLib(typelib, filename, NULL); @@ -6718,7 +6718,7 @@ static void test_register_typelib(BOOL system_registration) DeleteFileW(filename); return; } - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
count = ITypeLib_GetTypeInfoCount(typelib); ok(count == 15, "got %d\n", count); @@ -6729,10 +6729,10 @@ static void test_register_typelib(BOOL system_registration) TYPEATTR *attr;
hr = ITypeLib_GetTypeInfo(typelib, i, &typeinfo); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeInfo_GetTypeAttr(typeinfo, &attr); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
ok(attr->typekind == attrs[i].kind, "%d: got kind %d\n", i, attr->typekind); ok(attr->wTypeFlags == attrs[i].flags, "%d: got flags %04x\n", i, attr->wTypeFlags); @@ -6744,13 +6744,13 @@ static void test_register_typelib(BOOL system_registration) TYPEATTR *dual_attr;
hr = ITypeInfo_GetRefTypeOfImplType(typeinfo, -1, &reftype); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeInfo_GetRefTypeInfo(typeinfo, reftype, &dual_info); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeInfo_GetTypeAttr(dual_info, &dual_attr); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
ok(dual_attr->typekind == TKIND_INTERFACE, "%d: got kind %d\n", i, dual_attr->typekind); ok(dual_attr->wTypeFlags == (attrs[i].flags | TYPEFLAG_FOLEAUTOMATION), @@ -6774,12 +6774,12 @@ static void test_register_typelib(BOOL system_registration) expect_ret = ERROR_FILE_NOT_FOUND;
ret = RegOpenKeyExA(HKEY_CLASSES_ROOT, key_name, 0, KEY_READ, &hkey); - ok(ret == expect_ret, "%d: got %d\n", i, ret); + ok(ret == expect_ret, "%d: got %ld\n", i, ret); if (ret == ERROR_SUCCESS) { size = sizeof(uuid); ret = RegQueryValueA(hkey, "ProxyStubClsid32", uuid, &size); - ok(!ret, "Failed to get proxy GUID, error %u.\n", ret); + ok(!ret, "Failed to get proxy GUID, error %lu.\n", ret);
if (attrs[i].kind == TKIND_INTERFACE || (attrs[i].flags & TYPEFLAG_FDUAL)) { @@ -6800,7 +6800,7 @@ static void test_register_typelib(BOOL system_registration) if (is_win64 || is_wow64) { ret = RegOpenKeyExA(HKEY_CLASSES_ROOT, key_name, 0, KEY_READ | opposite, &hkey); - ok(ret == expect_ret, "%d: got %d\n", i, ret); + ok(ret == expect_ret, "%d: got %ld\n", i, ret); if(ret == ERROR_SUCCESS) RegCloseKey(hkey); }
@@ -6812,7 +6812,7 @@ static void test_register_typelib(BOOL system_registration) hr = UnRegisterTypeLib(&LIBID_register_test, 1, 0, LOCALE_NEUTRAL, is_win64 ? SYS_WIN64 : SYS_WIN32); else hr = pUnRegisterTypeLibForUser(&LIBID_register_test, 1, 0, LOCALE_NEUTRAL, is_win64 ? SYS_WIN64 : SYS_WIN32); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
for(i = 0; i < count; i++) { @@ -6820,10 +6820,10 @@ static void test_register_typelib(BOOL system_registration) TYPEATTR *attr;
hr = ITypeLib_GetTypeInfo(typelib, i, &typeinfo); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeInfo_GetTypeAttr(typeinfo, &attr); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
if((attr->typekind == TKIND_INTERFACE && (attr->wTypeFlags & TYPEFLAG_FOLEAUTOMATION)) || attr->typekind == TKIND_DISPATCH) @@ -6885,51 +6885,51 @@ static void test_register_typelib_64(void) pIsWow64Process(GetCurrentProcess(), &is_wow64);
hr = LoadTypeLib(wszStdOle2, &stdole); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeLib_GetTypeInfoOfGuid(stdole, &IID_IDispatch, &unknown); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
GetTempFileNameW(L".", L"tlb", 0, filename);
hr = CreateTypeLib2(sys, filename, &createtl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_SetName(createtl, typelibW); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_SetHelpFileName(createtl, helpfileW); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_SetHelpStringDll(createtl, dllfileW); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_SetGuid(createtl, &tlcustguid); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_SetVersion(createtl, 1, 0); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_CreateTypeInfo(createtl, coclassW, TKIND_COCLASS, &createti_co); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_CreateTypeInfo(createtl, interface1W, TKIND_INTERFACE, &createti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_LayOut(createti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetGuid(createti, &interfaceguid); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetVersion(createti, 1, 0); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_AddRefTypeInfo(createti, unknown, &hreftype); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_AddImplType(createti, 0, hreftype); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
elemdesc[0].tdesc.vt = VT_UINT; U(elemdesc[0]).idldesc.dwReserved = 0; @@ -6949,7 +6949,7 @@ static void test_register_typelib_64(void) funcdesc.lprgelemdescParam = elemdesc;
hr = ICreateTypeInfo_AddFuncDesc(createti, 0, &funcdesc); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
elemdesc2[0].tdesc.vt = VT_UINT; U(elemdesc2[0]).idldesc.dwReserved = 0; @@ -6965,54 +6965,54 @@ static void test_register_typelib_64(void) funcdesc2.lprgelemdescParam = elemdesc2;
hr = ICreateTypeInfo_AddFuncDesc(createti, 1, &funcdesc2); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetFuncHelpContext(createti, 0, 0xabcdefab); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetFuncHelpContext(createti, 1, 0xabcdefab); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetFuncAndParamNames(createti, 0, names1, 3); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetFuncAndParamNames(createti, 1, names2, 2); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetTypeFlags(createti, TYPEFLAG_FOLEAUTOMATION | TYPEFLAG_FNONEXTENSIBLE | TYPEFLAG_FDUAL); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_QueryInterface(createti, &IID_ITypeInfo, (void**)&tinfo); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeInfo_GetRefTypeOfImplType(tinfo, 0, &hreftype); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetGuid(createti_co, &coclassguid); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_AddRefTypeInfo(createti_co, tinfo, &hreftype); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_AddImplType(createti_co, 0, hreftype); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetImplTypeFlags(createti_co, 0, IMPLTYPEFLAG_FDEFAULT); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_Release(createti_co); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
ICreateTypeInfo_Release(createti);
hr = ICreateTypeLib2_SaveAllChanges(createtl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
ICreateTypeLib2_Release(createtl);
trace("TypeLib to load: %ls\n", filename); hr = LoadTypeLibEx(filename, REGKIND_NONE, &typelib); - ok(hr == S_OK, "got: %08x\n", hr); + ok(hr == S_OK, "got: %08lx\n", hr);
if(typelib) { @@ -7029,7 +7029,7 @@ static void test_register_typelib_64(void) DeleteFileW(filename); return; } - ok(hr == S_OK, "got: %08x\n", hr); + ok(hr == S_OK, "got: %08lx\n", hr);
ITypeLib_Release(typelib);
@@ -7037,23 +7037,23 @@ static void test_register_typelib_64(void) swprintf(key_name, sizeof(key_name), L"TypeLib\%ls\1.0", uuid);
hr = RegOpenKeyExW(HKEY_CLASSES_ROOT, key_name, 0, KEY_READ, &hkey); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
size = sizeof(tlb_name); hr = RegQueryValueW(hkey, L"", tlb_name, &size); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
/* The typelib should be registered in WoW64_32 and WoW64_64 mode */ if(is_win64 || is_wow64) { hr = RegOpenKeyExW(HKEY_CLASSES_ROOT, key_name, 0, KEY_READ | opposite, &hkey); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
if(hkey) { size = sizeof(tlb_name); hr = RegQueryValueW(hkey, L"", tlb_name, &size); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
RegCloseKey(hkey); } @@ -7074,22 +7074,22 @@ static void test_LoadTypeLib(void) static const WCHAR kernel32_dllW[] = {'k','e','r','n','e','l','3','2','.','d','l','l',0};
hres = LoadTypeLib(kernel32_dllW, &tl); - ok(hres == TYPE_E_CANTLOADLIBRARY, "LoadTypeLib returned: %08x, expected TYPE_E_CANTLOADLIBRARY\n", hres); + ok(hres == TYPE_E_CANTLOADLIBRARY, "LoadTypeLib returned: %08lx, expected TYPE_E_CANTLOADLIBRARY\n", hres);
hres = LoadTypeLib(NULL, NULL); - ok(hres == E_INVALIDARG, "Got %#x.\n", hres); + ok(hres == E_INVALIDARG, "Got %#lx.\n", hres);
tl = (void *)0xdeadbeef; hres = LoadTypeLib(NULL, &tl); - ok(hres == E_INVALIDARG, "Got %#x.\n", hres); + ok(hres == E_INVALIDARG, "Got %#lx.\n", hres); ok(tl == (void *)0xdeadbeef, "Got %p.\n", tl);
hres = LoadTypeLibEx(NULL, REGKIND_NONE, NULL); - ok(hres == E_INVALIDARG, "Got %#x.\n", hres); + ok(hres == E_INVALIDARG, "Got %#lx.\n", hres);
tl = (void *)0xdeadbeef; hres = LoadTypeLibEx(NULL, REGKIND_NONE, &tl); - ok(hres == E_INVALIDARG, "Got %#x.\n", hres); + ok(hres == E_INVALIDARG, "Got %#lx.\n", hres); ok(tl == (void *)0xdeadbeef, "Got %p.\n", tl); }
@@ -7111,13 +7111,13 @@ static void test_SetVarHelpContext(void) MultiByteToWideChar(CP_ACP, 0, filenameA, -1, filenameW, MAX_PATH);
hr = CreateTypeLib2(SYS_WIN32, filenameW, &ctl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_CreateTypeInfo(ctl, nameW, TKIND_ENUM, &cti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetVarHelpContext(cti, 0, 0); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hr);
memset(&desc, 0, sizeof(desc)); desc.memid = MEMBERID_NIL; @@ -7128,43 +7128,43 @@ static void test_SetVarHelpContext(void) V_INT(&v) = 1; U(desc).lpvarValue = &v; hr = ICreateTypeInfo_AddVarDesc(cti, 0, &desc); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetVarHelpContext(cti, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
/* another time */ hr = ICreateTypeInfo_SetVarHelpContext(cti, 0, 1); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
/* wrong index now */ hr = ICreateTypeInfo_SetVarHelpContext(cti, 1, 0); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hr);
ICreateTypeInfo_Release(cti);
hr = ICreateTypeLib2_SaveAllChanges(ctl); - ok(hr == S_OK, "got: %08x\n", hr); + ok(hr == S_OK, "got: %08lx\n", hr);
ICreateTypeLib2_Release(ctl);
hr = LoadTypeLib(filenameW, &tl); - ok(hr == S_OK, "got: %08x\n", hr); + ok(hr == S_OK, "got: %08lx\n", hr);
hr = ITypeLib_GetTypeInfo(tl, 0, &ti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeInfo_GetVarDesc(ti, 0, &pdesc); - ok(hr == S_OK, "got %08x\n", hr); - ok(pdesc->memid == 0x40000000, "got wrong memid: %x\n", pdesc->memid); + ok(hr == S_OK, "got %08lx\n", hr); + ok(pdesc->memid == 0x40000000, "got wrong memid: %lx\n", pdesc->memid); ok(pdesc->elemdescVar.tdesc.vt == VT_INT, "got wrong vardesc type: %u\n", pdesc->elemdescVar.tdesc.vt); ok(pdesc->varkind == VAR_CONST, "got wrong varkind: %u\n", pdesc->varkind); ok(V_VT(U(*pdesc).lpvarValue) == VT_INT, "got wrong value type: %u\n", V_VT(U(*pdesc).lpvarValue)); ok(V_INT(U(*pdesc).lpvarValue) == 1, "got wrong value: 0x%x\n", V_INT(U(*pdesc).lpvarValue));
hr = ITypeInfo_GetDocumentation(ti, pdesc->memid, NULL, NULL, &ctx, NULL); - ok(hr == S_OK, "got %08x\n", hr); - ok(ctx == 1, "got wrong help context: 0x%x\n", ctx); + ok(hr == S_OK, "got %08lx\n", hr); + ok(ctx == 1, "got wrong help context: 0x%lx\n", ctx);
ITypeInfo_ReleaseVarDesc(ti, pdesc); ITypeInfo_Release(ti); @@ -7197,10 +7197,10 @@ static void test_SetFuncAndParamNames(void) MultiByteToWideChar(CP_ACP, 0, filenameA, -1, filenameW, MAX_PATH);
hr = CreateTypeLib2(SYS_WIN32, filenameW, &ctl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_CreateTypeInfo(ctl, nameW, TKIND_DISPATCH, &cti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
/* get method */ memset(&funcdesc, 0, sizeof(FUNCDESC)); @@ -7220,65 +7220,65 @@ static void test_SetFuncAndParamNames(void) funcdesc.cParams = 1;
hr = ICreateTypeInfo_AddFuncDesc(cti, 0, &funcdesc); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* setter name */ hr = ICreateTypeInfo_SetFuncAndParamNames(cti, 0, propW, 1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* putref method */ funcdesc.invkind = INVOKE_PROPERTYPUTREF; hr = ICreateTypeInfo_AddFuncDesc(cti, 1, &funcdesc); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* putref name */ hr = ICreateTypeInfo_SetFuncAndParamNames(cti, 1, propW, 1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
funcdesc.invkind = INVOKE_PROPERTYGET; funcdesc.cParams = 0; hr = ICreateTypeInfo_AddFuncDesc(cti, 2, &funcdesc); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* getter name */ hr = ICreateTypeInfo_SetFuncAndParamNames(cti, 2, propW, 1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ICreateTypeInfo_AddFuncDesc(cti, 3, &funcdesc); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* getter name again */ hr = ICreateTypeInfo_SetFuncAndParamNames(cti, 3, propW, 1); - ok(hr == TYPE_E_AMBIGUOUSNAME, "got 0x%08x\n", hr); + ok(hr == TYPE_E_AMBIGUOUSNAME, "got 0x%08lx\n", hr);
/* regular function */ funcdesc.invkind = INVOKE_FUNC; funcdesc.cParams = 1; hr = ICreateTypeInfo_AddFuncDesc(cti, 4, &funcdesc); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ICreateTypeInfo_SetFuncAndParamNames(cti, 4, funcW, 2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
ICreateTypeInfo_Release(cti);
hr = ICreateTypeLib2_CreateTypeInfo(ctl, name2W, TKIND_INTERFACE, &cti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
funcdesc.funckind = FUNC_PUREVIRTUAL; funcdesc.invkind = INVOKE_FUNC; funcdesc.cParams = 0; funcdesc.lprgelemdescParam = NULL; hr = ICreateTypeInfo_AddFuncDesc(cti, 0, &funcdesc); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ICreateTypeInfo_SetFuncAndParamNames(cti, 0, funcW, 1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
ICreateTypeInfo_Release(cti);
hr = ICreateTypeLib2_QueryInterface(ctl, &IID_ITypeLib, (void**)&tl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
found = 1; memset(infos, 0, sizeof(infos)); @@ -7286,7 +7286,7 @@ static void test_SetFuncAndParamNames(void) memids[1] = 0xdeadbeef; memids[2] = 0xdeadbeef; hr = ITypeLib_FindName(tl, func, 0, infos, memids, &found); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(found == 1, "got wrong count: %u\n", found); ok(infos[0] && !infos[1] && !infos[2], "got wrong typeinfo\n"); ok(memids[0] == 0, "got wrong memid[0]\n"); @@ -7299,7 +7299,7 @@ static void test_SetFuncAndParamNames(void) memids[1] = 0xdeadbeef; memids[2] = 0xdeadbeef; hr = ITypeLib_FindName(tl, func, 0, infos, memids, &found); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(found == 2, "got wrong count: %u\n", found); ok(infos[0] && infos[1] && infos[0] != infos[1], "got same typeinfo\n"); ok(memids[0] == 0, "got wrong memid[0]\n"); @@ -7335,16 +7335,16 @@ static void test_SetDocString(void) MultiByteToWideChar(CP_ACP, 0, filenameA, -1, filenameW, MAX_PATH);
hr = CreateTypeLib2(SYS_WIN32, filenameW, &ctl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_CreateTypeInfo(ctl, nameW, TKIND_ENUM, &cti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetVarDocString(cti, 0, doc1W); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetVarDocString(cti, 0, NULL); - ok(hr == E_INVALIDARG, "got %08x\n", hr); + ok(hr == E_INVALIDARG, "got %08lx\n", hr);
memset(&desc, 0, sizeof(desc)); desc.memid = MEMBERID_NIL; @@ -7355,41 +7355,41 @@ static void test_SetDocString(void) V_INT(&v) = 1; U(desc).lpvarValue = &v; hr = ICreateTypeInfo_AddVarDesc(cti, 0, &desc); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetVarName(cti, 0, NULL); - ok(hr == E_INVALIDARG, "got %08x\n", hr); + ok(hr == E_INVALIDARG, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetVarName(cti, 1, var_nameW); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetVarName(cti, 0, var_nameW); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetVarDocString(cti, 0, NULL); - ok(hr == E_INVALIDARG, "got %08x\n", hr); + ok(hr == E_INVALIDARG, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetVarDocString(cti, 0, doc1W); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
/* already set */ hr = ICreateTypeInfo_SetVarDocString(cti, 0, doc2W); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
/* wrong index now */ hr = ICreateTypeInfo_SetVarDocString(cti, 1, doc1W); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hr);
ICreateTypeInfo_Release(cti);
hr = ICreateTypeLib2_CreateTypeInfo(ctl, name2W, TKIND_INTERFACE, &cti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetFuncDocString(cti, 0, doc1W); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetFuncDocString(cti, 0, NULL); - ok(hr == E_INVALIDARG, "got %08x\n", hr); + ok(hr == E_INVALIDARG, "got %08lx\n", hr);
memset(&funcdesc, 0, sizeof(funcdesc)); funcdesc.memid = MEMBERID_NIL; @@ -7398,34 +7398,34 @@ static void test_SetDocString(void) funcdesc.callconv = CC_STDCALL;
hr = ICreateTypeInfo_AddFuncDesc(cti, 0, &funcdesc); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetFuncDocString(cti, 0, doc1W); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
ICreateTypeInfo_Release(cti);
hr = ICreateTypeLib2_SaveAllChanges(ctl); - ok(hr == S_OK, "got: %08x\n", hr); + ok(hr == S_OK, "got: %08lx\n", hr);
ICreateTypeLib2_Release(ctl);
hr = LoadTypeLib(filenameW, &tl); - ok(hr == S_OK, "got: %08x\n", hr); + ok(hr == S_OK, "got: %08lx\n", hr);
hr = ITypeLib_GetTypeInfo(tl, 0, &ti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeInfo_GetVarDesc(ti, 0, &pdesc); - ok(hr == S_OK, "got %08x\n", hr); - ok(pdesc->memid == 0x40000000, "got wrong memid: %x\n", pdesc->memid); + ok(hr == S_OK, "got %08lx\n", hr); + ok(pdesc->memid == 0x40000000, "got wrong memid: %lx\n", pdesc->memid); ok(pdesc->elemdescVar.tdesc.vt == VT_INT, "got wrong vardesc type: %u\n", pdesc->elemdescVar.tdesc.vt); ok(pdesc->varkind == VAR_CONST, "got wrong varkind: %u\n", pdesc->varkind); ok(V_VT(U(*pdesc).lpvarValue) == VT_INT, "got wrong value type: %u\n", V_VT(U(*pdesc).lpvarValue)); ok(V_INT(U(*pdesc).lpvarValue) == 1, "got wrong value: 0x%x\n", V_INT(U(*pdesc).lpvarValue));
hr = ITypeInfo_GetDocumentation(ti, pdesc->memid, &namestr, &docstr, NULL, NULL); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(memcmp(namestr, var_nameW, sizeof(var_nameW)) == 0, "got wrong name: %s\n", wine_dbgstr_w(namestr)); ok(memcmp(docstr, doc2W, sizeof(doc2W)) == 0, "got wrong docstring: %s\n", wine_dbgstr_w(docstr));
@@ -7436,17 +7436,17 @@ static void test_SetDocString(void) ITypeInfo_Release(ti);
hr = ITypeLib_GetTypeInfo(tl, 1, &ti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeInfo_GetFuncDesc(ti, 0, &pfuncdesc); - ok(hr == S_OK, "got %08x\n", hr); - ok(pfuncdesc->memid == 0x60000000, "got wrong memid: %x\n", pfuncdesc->memid); + ok(hr == S_OK, "got %08lx\n", hr); + ok(pfuncdesc->memid == 0x60000000, "got wrong memid: %lx\n", pfuncdesc->memid); ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL, "got wrong funckind: %x\n", pfuncdesc->funckind); ok(pfuncdesc->invkind == INVOKE_FUNC, "got wrong invkind: %x\n", pfuncdesc->invkind); ok(pfuncdesc->callconv == CC_STDCALL, "got wrong callconv: %x\n", pfuncdesc->callconv);
hr = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &namestr, &docstr, NULL, NULL); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(namestr == NULL, "got wrong name: %s\n", wine_dbgstr_w(namestr)); ok(memcmp(docstr, doc1W, sizeof(doc1W)) == 0, "got wrong docstring: %s\n", wine_dbgstr_w(docstr));
@@ -7471,26 +7471,26 @@ static void test_FindName(void) UINT16 c;
hr = LoadTypeLib(wszStdOle2, &tl); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITypeLib_FindName(tl, NULL, 0, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
lstrcpyW(buffW, wszGUID); hr = ITypeLib_FindName(tl, buffW, 0, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
c = 0; ti = (void*)0xdeadbeef; hr = ITypeLib_FindName(tl, buffW, 0, &ti, NULL, &c); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(c == 0, "got %d\n", c); ok(ti == (void*)0xdeadbeef, "got %p\n", ti);
c = 1; ti = (void*)0xdeadbeef; hr = ITypeLib_FindName(tl, buffW, 0, &ti, NULL, &c); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ok(c == 1, "got %d\n", c); ok(ti == (void*)0xdeadbeef, "got %p\n", ti);
@@ -7498,8 +7498,8 @@ static void test_FindName(void) memid = 0; ti = (void*)0xdeadbeef; hr = ITypeLib_FindName(tl, buffW, 0, &ti, &memid, &c); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(memid == MEMBERID_NIL, "got %d\n", memid); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(memid == MEMBERID_NIL, "got %ld\n", memid); ok(!lstrcmpW(buffW, wszGUID), "got %s\n", wine_dbgstr_w(buffW)); ok(c == 1, "got %d\n", c); ITypeInfo_Release(ti); @@ -7509,9 +7509,9 @@ static void test_FindName(void) lstrcpyW(buffW, wszguid); ti = (void*)0xdeadbeef; hr = ITypeLib_FindName(tl, buffW, 0, &ti, &memid, &c); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); todo_wine { - ok(memid == MEMBERID_NIL, "got %d\n", memid); + ok(memid == MEMBERID_NIL, "got %ld\n", memid); ok(!lstrcmpW(buffW, wszGUID), "got %s\n", wine_dbgstr_w(buffW)); ok(c == 1, "got %d\n", c); } @@ -7523,8 +7523,8 @@ todo_wine { lstrcpyW(buffW, invalidW); ti = (void*)0xdeadbeef; hr = ITypeLib_FindName(tl, buffW, 0, &ti, &memid, &c); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(memid == MEMBERID_NIL, "got %d\n", memid); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(memid == MEMBERID_NIL, "got %ld\n", memid); ok(!lstrcmpW(buffW, invalidW), "got %s\n", wine_dbgstr_w(buffW)); ok(c == 0, "got %d\n", c); ok(ti == (void*)0xdeadbeef, "got %p\n", ti); @@ -7587,7 +7587,7 @@ static void create_manifest_file(const char *filename, const char *manifest)
file = CreateFileA(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %lu\n", GetLastError()); WriteFile(file, manifest, strlen(manifest), &size, NULL); CloseHandle(file); } @@ -7604,10 +7604,10 @@ static HANDLE create_actctx(const char *file) actctx.lpSource = path;
handle = CreateActCtxW(&actctx); - ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError()); + ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %lu\n", GetLastError());
- ok(actctx.cbSize == sizeof(actctx), "actctx.cbSize=%d\n", actctx.cbSize); - ok(actctx.dwFlags == 0, "actctx.dwFlags=%d\n", actctx.dwFlags); + ok(actctx.cbSize == sizeof(actctx), "actctx.cbSize=%ld\n", actctx.cbSize); + ok(actctx.dwFlags == 0, "actctx.dwFlags=%ld\n", actctx.dwFlags); ok(actctx.lpSource == path, "actctx.lpSource=%p\n", actctx.lpSource); ok(actctx.wProcessorArchitecture == 0, "actctx.wProcessorArchitecture=%d\n", actctx.wProcessorArchitecture); ok(actctx.wLangId == 0, "actctx.wLangId=%d\n", actctx.wLangId); @@ -7669,85 +7669,85 @@ static void test_LoadRegTypeLib(void) write_typelib(3, L"test_actctx_tlb2.tlb");
hr = LoadRegTypeLib(&LIBID_TestTypelib, 1, 0, LOCALE_NEUTRAL, &tl); - ok(hr == TYPE_E_LIBNOTREGISTERED, "got 0x%08x\n", hr); + ok(hr == TYPE_E_LIBNOTREGISTERED, "got 0x%08lx\n", hr);
hr = LoadRegTypeLib(&LIBID_register_test, 1, 0, LOCALE_NEUTRAL, &tl); - ok(hr == TYPE_E_LIBNOTREGISTERED, "got 0x%08x\n", hr); + ok(hr == TYPE_E_LIBNOTREGISTERED, "got 0x%08lx\n", hr);
hr = QueryPathOfRegTypeLib(&LIBID_TestTypelib, 2, 0, LOCALE_NEUTRAL, &path); - ok(hr == TYPE_E_LIBNOTREGISTERED, "got 0x%08x\n", hr); + ok(hr == TYPE_E_LIBNOTREGISTERED, "got 0x%08lx\n", hr);
ret = ActivateActCtx(handle, &cookie); - ok(ret, "ActivateActCtx failed: %u\n", GetLastError()); + ok(ret, "ActivateActCtx failed: %lu\n", GetLastError());
path = NULL; hr = QueryPathOfRegTypeLib(&LIBID_TestTypelib, 2, 0, LOCALE_NEUTRAL, &path); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); SysFreeString(path);
path = NULL; hr = QueryPathOfRegTypeLib(&LIBID_TestTypelib, 2, 0, lcid_en, &path); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); SysFreeString(path);
path = NULL; hr = QueryPathOfRegTypeLib(&LIBID_TestTypelib, 2, 0, lcid_ru, &path); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); SysFreeString(path);
hr = QueryPathOfRegTypeLib(&LIBID_TestTypelib, 2, 8, LOCALE_NEUTRAL, &path); - ok(hr == TYPE_E_LIBNOTREGISTERED || broken(hr == S_OK) /* winxp */, "got 0x%08x\n", hr); + ok(hr == TYPE_E_LIBNOTREGISTERED || broken(hr == S_OK) /* winxp */, "got 0x%08lx\n", hr);
path = NULL; hr = QueryPathOfRegTypeLib(&LIBID_TestTypelib, 2, 7, LOCALE_NEUTRAL, &path); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); SysFreeString(path);
path = NULL; hr = QueryPathOfRegTypeLib(&LIBID_TestTypelib, 1, 0, LOCALE_NEUTRAL, &path); - ok(hr == TYPE_E_LIBNOTREGISTERED || broken(hr == S_OK) /* winxp */, "got 0x%08x\n", hr); + ok(hr == TYPE_E_LIBNOTREGISTERED || broken(hr == S_OK) /* winxp */, "got 0x%08lx\n", hr); SysFreeString(path);
path = NULL; hr = QueryPathOfRegTypeLib(&LIBID_TestTypelib, 0xffff, 0xffff, LOCALE_NEUTRAL, &path); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); SysFreeString(path);
/* manifest version is 2.0, actual is 1.0 */ hr = LoadRegTypeLib(&LIBID_register_test, 1, 0, LOCALE_NEUTRAL, &tl); - ok(hr == TYPE_E_LIBNOTREGISTERED || broken(hr == S_OK) /* winxp */, "got 0x%08x\n", hr); + ok(hr == TYPE_E_LIBNOTREGISTERED || broken(hr == S_OK) /* winxp */, "got 0x%08lx\n", hr); if (hr == S_OK) ITypeLib_Release(tl);
hr = LoadRegTypeLib(&LIBID_register_test, 2, 0, LOCALE_NEUTRAL, &tl); - ok(hr == TYPE_E_LIBNOTREGISTERED, "got 0x%08x\n", hr); + ok(hr == TYPE_E_LIBNOTREGISTERED, "got 0x%08lx\n", hr);
/* manifest version is 2.7, actual is 2.5 */ hr = LoadRegTypeLib(&LIBID_TestTypelib, 2, 0, LOCALE_NEUTRAL, &tl); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if (hr == S_OK) ITypeLib_Release(tl);
hr = LoadRegTypeLib(&LIBID_TestTypelib, 2, 1, LOCALE_NEUTRAL, &tl); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if (hr == S_OK) ITypeLib_Release(tl);
hr = LoadRegTypeLib(&LIBID_TestTypelib, 2, 0, lcid_en, &tl); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if (hr == S_OK) ITypeLib_Release(tl);
hr = LoadRegTypeLib(&LIBID_TestTypelib, 2, 0, lcid_ru, &tl); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if (hr == S_OK) ITypeLib_Release(tl);
hr = LoadRegTypeLib(&LIBID_TestTypelib, 2, 7, LOCALE_NEUTRAL, &tl); - ok(hr == TYPE_E_LIBNOTREGISTERED, "got 0x%08x\n", hr); + ok(hr == TYPE_E_LIBNOTREGISTERED, "got 0x%08lx\n", hr);
hr = LoadRegTypeLib(&LIBID_TestTypelib, 2, 5, LOCALE_NEUTRAL, &tl); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITypeLib_GetLibAttr(tl, &attr); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
- ok(attr->lcid == 0, "got %x\n", attr->lcid); + ok(attr->lcid == 0, "got %lx\n", attr->lcid); ok(attr->wMajorVerNum == 2, "got %d\n", attr->wMajorVerNum); ok(attr->wMinorVerNum == 5, "got %d\n", attr->wMinorVerNum); ok(attr->wLibFlags == LIBFLAG_FHASDISKIMAGE, "got %x\n", attr->wLibFlags); @@ -7756,18 +7756,18 @@ static void test_LoadRegTypeLib(void) ITypeLib_Release(tl);
hr = LoadRegTypeLib(&LIBID_TestTypelib, 1, 7, LOCALE_NEUTRAL, &tl); - ok(hr == TYPE_E_LIBNOTREGISTERED, "got 0x%08x\n", hr); + ok(hr == TYPE_E_LIBNOTREGISTERED, "got 0x%08lx\n", hr);
tl = NULL; hr = LoadRegTypeLib(&LIBID_TestTypelib, 0xffff, 0xffff, LOCALE_NEUTRAL, &tl); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
if (tl) { hr = ITypeLib_GetLibAttr(tl, &attr); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
- ok(attr->lcid == 0, "got %x\n", attr->lcid); + ok(attr->lcid == 0, "got %lx\n", attr->lcid); ok(attr->wMajorVerNum == 2, "got %d\n", attr->wMajorVerNum); ok(attr->wMinorVerNum == 5, "got %d\n", attr->wMinorVerNum); ok(attr->wLibFlags == LIBFLAG_FHASDISKIMAGE, "got %x\n", attr->wLibFlags); @@ -7780,7 +7780,7 @@ static void test_LoadRegTypeLib(void) DeleteFileA("test_actctx_tlb2.tlb");
ret = DeactivateActCtx(0, cookie); - ok(ret, "DeactivateActCtx failed: %u\n", GetLastError()); + ok(ret, "DeactivateActCtx failed: %lu\n", GetLastError());
ReleaseActCtx(handle); } @@ -7849,10 +7849,10 @@ static void testTDA(ITypeLib *tl, struct _TDATest *TDATest,
if(create){ hr = ITypeLib_QueryInterface(tl, &IID_ICreateTypeLib2, (void**)&ctl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_CreateTypeInfo(ctl, nameW, TKIND_ALIAS, &cti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
tdesc.vt = TDATest->vt; if(TDATest->aux == AUX_TDESC) @@ -7863,10 +7863,10 @@ static void testTDA(ITypeLib *tl, struct _TDATest *TDATest, U(tdesc).hreftype = hreftype;
hr = ICreateTypeInfo_SetTypeDescAlias(cti, &tdesc); - ok(hr == S_OK, "for VT %u, got %08x\n", TDATest->vt, hr); + ok(hr == S_OK, "for VT %u, got %08lx\n", TDATest->vt, hr);
hr = ICreateTypeInfo_QueryInterface(cti, &IID_ITypeInfo, (void**)&ti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
ICreateTypeInfo_Release(cti); ICreateTypeLib2_Release(ctl); @@ -7875,11 +7875,11 @@ static void testTDA(ITypeLib *tl, struct _TDATest *TDATest, MEMBERID memid;
hr = ITypeLib_FindName(tl, nameW, 0, &ti, &memid, &found); - ok(hr == S_OK, "for VT %u, got %08x\n", TDATest->vt, hr); + ok(hr == S_OK, "for VT %u, got %08lx\n", TDATest->vt, hr); }
hr = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
if(TDATest->aux == AUX_HREF){ size = href_cbSizeInstance; @@ -7908,13 +7908,13 @@ static void testTDA(ITypeLib *tl, struct _TDATest *TDATest, #endif }
- ok(typeattr->cbSizeInstance == size, "got wrong size for VT %u: 0x%x\n", TDATest->vt, typeattr->cbSizeInstance); + ok(typeattr->cbSizeInstance == size, "got wrong size for VT %u: 0x%lx\n", TDATest->vt, typeattr->cbSizeInstance); ok(typeattr->cbAlignment == alignment, "got wrong alignment for VT %u: 0x%x\n", TDATest->vt, typeattr->cbAlignment); ok(typeattr->tdescAlias.vt == TDATest->vt, "got wrong VT for VT %u: 0x%x\n", TDATest->vt, typeattr->tdescAlias.vt);
switch(TDATest->aux){ case AUX_HREF: - ok(U(typeattr->tdescAlias).hreftype == hreftype, "got wrong hreftype for VT %u: 0x%x\n", TDATest->vt, U(typeattr->tdescAlias).hreftype); + ok(U(typeattr->tdescAlias).hreftype == hreftype, "got wrong hreftype for VT %u: 0x%lx\n", TDATest->vt, U(typeattr->tdescAlias).hreftype); break; case AUX_TDESC: ok(U(typeattr->tdescAlias).lptdesc->vt == TDATest->tdesc.vt, "got wrong typedesc VT for VT %u: 0x%x\n", TDATest->vt, U(typeattr->tdescAlias).lptdesc->vt); @@ -7922,8 +7922,8 @@ static void testTDA(ITypeLib *tl, struct _TDATest *TDATest, case AUX_ADESC: ok(U(typeattr->tdescAlias).lpadesc->tdescElem.vt == TDATest->adesc.tdescElem.vt, "got wrong arraydesc element VT for VT %u: 0x%x\n", TDATest->vt, U(typeattr->tdescAlias).lpadesc->tdescElem.vt); ok(U(typeattr->tdescAlias).lpadesc->cDims == TDATest->adesc.cDims, "got wrong arraydesc dimension count for VT %u: 0x%x\n", TDATest->vt, U(typeattr->tdescAlias).lpadesc->cDims); - ok(U(typeattr->tdescAlias).lpadesc->rgbounds[0].cElements == TDATest->adesc.rgbounds[0].cElements, "got wrong arraydesc element count for VT %u: 0x%x\n", TDATest->vt, U(typeattr->tdescAlias).lpadesc->rgbounds[0].cElements); - ok(U(typeattr->tdescAlias).lpadesc->rgbounds[0].lLbound == TDATest->adesc.rgbounds[0].lLbound, "got wrong arraydesc lower bound for VT %u: 0x%x\n", TDATest->vt, U(typeattr->tdescAlias).lpadesc->rgbounds[0].lLbound); + ok(U(typeattr->tdescAlias).lpadesc->rgbounds[0].cElements == TDATest->adesc.rgbounds[0].cElements, "got wrong arraydesc element count for VT %u: 0x%lx\n", TDATest->vt, U(typeattr->tdescAlias).lpadesc->rgbounds[0].cElements); + ok(U(typeattr->tdescAlias).lpadesc->rgbounds[0].lLbound == TDATest->adesc.rgbounds[0].lLbound, "got wrong arraydesc lower bound for VT %u: 0x%lx\n", TDATest->vt, U(typeattr->tdescAlias).lpadesc->rgbounds[0].lLbound); break; }
@@ -7964,19 +7964,19 @@ static void test_SetTypeDescAlias(SYSKIND kind) MultiByteToWideChar(CP_ACP, 0, filenameA, -1, filenameW, MAX_PATH);
hr = CreateTypeLib2(kind, filenameW, &ctl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_CreateTypeInfo(ctl, interfaceW, TKIND_INTERFACE, &cti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_QueryInterface(cti, &IID_ITypeInfo, (void**)&ti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_AddRefTypeInfo(cti, ti, &hreftype); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
href_cbSizeInstance = typeattr->cbSizeInstance; href_cbAlignment = typeattr->cbAlignment; @@ -7987,13 +7987,13 @@ static void test_SetTypeDescAlias(SYSKIND kind) ICreateTypeInfo_Release(cti);
hr = ICreateTypeLib2_QueryInterface(ctl, &IID_ITypeLib, (void**)&tl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
for(i = 0; TDATests[i].vt; ++i) testTDA(tl, &TDATests[i], ptr_size, hreftype, href_cbSizeInstance, href_cbAlignment, TRUE);
hr = ICreateTypeLib2_SaveAllChanges(ctl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
ITypeLib_Release(tl); ok(0 == ICreateTypeLib2_Release(ctl), "typelib should have been released\n"); @@ -8001,13 +8001,13 @@ static void test_SetTypeDescAlias(SYSKIND kind) trace("after save...\n");
hr = LoadTypeLibEx(filenameW, REGKIND_NONE, &tl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeLib_GetTypeInfo(tl, 0, &ti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
href_cbSizeInstance = typeattr->cbSizeInstance; href_cbAlignment = typeattr->cbAlignment; @@ -8031,17 +8031,17 @@ static void test_GetLibAttr(void) HRESULT hr;
hr = LoadTypeLib(wszStdOle2, &tl); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
ref1 = ITypeLib_AddRef(tl); ITypeLib_Release(tl);
hr = ITypeLib_GetLibAttr(tl, &attr); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
ref2 = ITypeLib_AddRef(tl); ITypeLib_Release(tl); - ok(ref2 == ref1, "got %d, %d\n", ref2, ref1); + ok(ref2 == ref1, "got %ld, %ld\n", ref2, ref1);
ITypeLib_ReleaseTLibAttr(tl, attr); ITypeLib_Release(tl); @@ -8103,65 +8103,65 @@ static void test_stub(void) CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
hr = LoadTypeLib(wszStdOle2, &stdole); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeLib_GetTypeInfoOfGuid(stdole, &IID_IUnknown, &unk); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
GetTempFileNameA(".", "tlb", 0, filenameA); MultiByteToWideChar(CP_ACP, 0, filenameA, -1, filenameW, MAX_PATH);
hr = CreateTypeLib2(SYS_WIN32, filenameW, &ctl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_SetGuid(ctl, &libguid); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_SetLcid(ctl, LOCALE_NEUTRAL); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_CreateTypeInfo(ctl, interfaceW, TKIND_INTERFACE, &cti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetGuid(cti, &interfaceguid); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetTypeFlags(cti, TYPEFLAG_FOLEAUTOMATION); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_AddRefTypeInfo(cti, unk, &href); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_AddImplType(cti, 0, href); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_QueryInterface(cti, &IID_ITypeInfo, (void**)&ti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
ICreateTypeInfo_Release(cti); ITypeInfo_Release(unk); ITypeLib_Release(stdole);
hr = ICreateTypeLib2_CreateTypeInfo(ctl, classW, TKIND_COCLASS, &cti); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetGuid(cti, &coclassguid); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_AddRefTypeInfo(cti, ti, &href); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_AddImplType(cti, 0, href); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
ITypeInfo_Release(ti); ICreateTypeInfo_Release(cti);
hr = ICreateTypeLib2_SaveAllChanges(ctl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_QueryInterface(ctl, &IID_ITypeLib, (void**)&tl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
for (i = 0; sam_list[i] != ~0; i++) { @@ -8178,14 +8178,14 @@ static void test_stub(void) win_skip("Insufficient privileges to register typelib in the registry\n"); break; } - ok(hr == S_OK, "got %08x, side: %04x\n", hr, side); + ok(hr == S_OK, "got %08lx, side: %04lx\n", hr, side);
/* SYS_WIN32 typelibs should be registered only as 32-bit */ lr = RegOpenKeyExA(HKEY_CLASSES_ROOT, "TypeLib\{3b9ff02e-9675-4861-b781-ceaea4782acc}\0.0\0\win64", 0, KEY_READ | side, &hkey); - ok(lr == ERROR_FILE_NOT_FOUND, "got wrong return code: %u, side: %04x\n", lr, side); + ok(lr == ERROR_FILE_NOT_FOUND, "got wrong return code: %lu, side: %04lx\n", lr, side);
lr = RegOpenKeyExA(HKEY_CLASSES_ROOT, "TypeLib\{3b9ff02e-9675-4861-b781-ceaea4782acc}\0.0\0\win32", 0, KEY_READ | side, &hkey); - ok(lr == ERROR_SUCCESS, "got wrong return code: %u, side: %04x\n", lr, side); + ok(lr == ERROR_SUCCESS, "got wrong return code: %lu, side: %04lx\n", lr, side); RegCloseKey(hkey);
/* Simulate pre-win7 installers that create interface key on one side */ @@ -8198,14 +8198,14 @@ static void test_stub(void)
/* Delete the opposite interface key */ lr = RegOpenKeyExA(HKEY_CLASSES_ROOT, "Interface", 0, KEY_READ | opposite, &hkey); - ok(lr == ERROR_SUCCESS, "got wrong return code: %u, side: %04x\n", lr, side); + ok(lr == ERROR_SUCCESS, "got wrong return code: %lu, side: %04lx\n", lr, side); lr = myRegDeleteTreeW(hkey, guidW, opposite); - ok(lr == ERROR_SUCCESS, "got wrong return code: %u, side: %04x\n", lr, side); + ok(lr == ERROR_SUCCESS, "got wrong return code: %lu, side: %04lx\n", lr, side); RegCloseKey(hkey);
/* Is our side interface key affected by above operation? */ lr = RegOpenKeyExA(HKEY_CLASSES_ROOT, "Interface\{3b9ff02f-9675-4861-b781-ceaea4782acc}", 0, KEY_READ | side, &hkey); - ok(lr == ERROR_SUCCESS || broken(lr == ERROR_FILE_NOT_FOUND), "got wrong return code: %u, side: %04x\n", lr, side); + ok(lr == ERROR_SUCCESS || broken(lr == ERROR_FILE_NOT_FOUND), "got wrong return code: %lu, side: %04lx\n", lr, side); if (lr == ERROR_FILE_NOT_FOUND) { /* win2k3, vista, 2008 */ @@ -8216,25 +8216,25 @@ static void test_stub(void)
/* Opposite side typelib key still exists */ lr = RegOpenKeyExA(HKEY_CLASSES_ROOT, "TypeLib\{3b9ff02e-9675-4861-b781-ceaea4782acc}\0.0\0\win32", 0, KEY_READ | opposite, &hkey); - ok(lr == ERROR_SUCCESS, "got wrong return code: %u, side: %04x\n", lr, side); + ok(lr == ERROR_SUCCESS, "got wrong return code: %lu, side: %04lx\n", lr, side); RegCloseKey(hkey); }
hr = CoGetPSClsid(&interfaceguid, &clsid); - ok(hr == S_OK, "got: %x, side: %04x\n", hr, side); + ok(hr == S_OK, "got: %lx, side: %04lx\n", hr, side);
hr = CoGetClassObject(&clsid, CLSCTX_INPROC_SERVER, NULL, &IID_IPSFactoryBuffer, (void **)&factory); - ok(hr == S_OK, "got: %x, side: %04x\n", hr, side); + ok(hr == S_OK, "got: %lx, side: %04lx\n", hr, side);
hr = IPSFactoryBuffer_CreateStub(factory, &interfaceguid, &uk, &base_stub); - ok(hr == S_OK, "got: %x, side: %04x\n", hr, side); + ok(hr == S_OK, "got: %lx, side: %04lx\n", hr, side); IRpcStubBuffer_Release(base_stub);
IPSFactoryBuffer_Release(factory); next: hr = UnRegisterTypeLib(&libguid, 0, 0, 0, SYS_WIN32); - ok(hr == S_OK, "got: %x, side: %04x\n", hr, side); + ok(hr == S_OK, "got: %lx, side: %04lx\n", hr, side); }
ITypeLib_Release(tl); @@ -8268,47 +8268,47 @@ static void test_dep(void) {
refFilename = create_test_typelib(4); hr = LoadTypeLibEx(refFilename, REGKIND_NONE, &preftLib); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeLib_GetTypeInfoOfGuid(preftLib, &IID_IBaseIface, &preftInfo); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
GetTempFileNameA(".", "tlb", 0, filename); MultiByteToWideChar(CP_ACP, 0, filename, -1, filenameW, MAX_PATH);
if(sizeof(void*) == 8) { hr = CreateTypeLib2(SYS_WIN64, filenameW, &pctLib); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); } else { hr = CreateTypeLib2(SYS_WIN32, filenameW, &pctLib); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); }
hr = ICreateTypeLib2_SetGuid(pctLib, &libguid); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_SetLcid(pctLib, LOCALE_NEUTRAL); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeLib2_CreateTypeInfo(pctLib, ifacenameW, TKIND_INTERFACE, &pctInfo); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetGuid(pctInfo, &ifaceguid); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_SetTypeFlags(pctInfo, TYPEFLAG_FOLEAUTOMATION); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_AddRefTypeInfo(pctInfo, preftInfo, &refType); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ICreateTypeInfo_AddImplType(pctInfo, 0, refType); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
ICreateTypeInfo_Release(pctInfo);
hr = ICreateTypeLib2_SaveAllChanges(pctLib); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
ICreateTypeLib2_Release(pctLib);
@@ -8317,16 +8317,16 @@ static void test_dep(void) { DeleteFileW(refFilename);
hr = LoadTypeLibEx(filenameW, REGKIND_NONE, &ptLib); - ok(hr == S_OK, "got: %x\n", hr); + ok(hr == S_OK, "got: %lx\n", hr);
hr = ITypeLib_GetTypeInfoOfGuid(ptLib, &ifaceguid, &ptInfo); - ok(hr == S_OK, "got: %x\n", hr); + ok(hr == S_OK, "got: %lx\n", hr);
hr = ITypeInfo_GetRefTypeOfImplType(ptInfo, 0, &refType); - ok(hr == S_OK, "got: %x\n", hr); + ok(hr == S_OK, "got: %lx\n", hr);
hr = ITypeInfo_GetRefTypeInfo(ptInfo, refType, &ptInfoExt); - ok(hr == TYPE_E_CANTLOADLIBRARY, "got: %x\n", hr); + ok(hr == TYPE_E_CANTLOADLIBRARY, "got: %lx\n", hr);
ITypeInfo_Release(ptInfo); if(ptInfoExt) @@ -8334,23 +8334,23 @@ static void test_dep(void) { ITypeLib_Release(ptLib);
hr = LoadTypeLibEx(filenameW, REGKIND_NONE, &ptLib); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeLib_GetTypeInfo(ptLib, 0, &ptInfo); - ok(hr == S_OK, "GetTypeInfo failed: %08x\n", hr); + ok(hr == S_OK, "GetTypeInfo failed: %08lx\n", hr);
hr = ITypeInfo_GetRefTypeOfImplType(ptInfo, 0, &refType); - ok(hr == S_OK, "GetRefTypeOfImplType failed: %08x\n", hr); + ok(hr == S_OK, "GetRefTypeOfImplType failed: %08lx\n", hr);
hr = ITypeInfo_GetRefTypeInfo(ptInfo, refType, &ptInfoExt); - ok(hr == TYPE_E_CANTLOADLIBRARY, "got: %x\n", hr); + ok(hr == TYPE_E_CANTLOADLIBRARY, "got: %lx\n", hr);
refFilename = create_test_typelib(4); hr = LoadTypeLibEx(refFilename, REGKIND_NONE, &preftLib); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = ITypeInfo_GetRefTypeInfo(ptInfo, refType, &ptInfoExt); - ok(hr == S_OK, "got: %x\n", hr); + ok(hr == S_OK, "got: %lx\n", hr); ITypeInfo_Release(ptInfoExt);
ITypeLib_Release(preftLib); @@ -8377,75 +8377,75 @@ static void test_DeleteImplType(void) int flags;
hr = LoadTypeLib(L"stdole2.tlb", &stdole); - ok(hr == S_OK, "Failed to load stdole2, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to load stdole2, hr %#lx.\n", hr);
hr = ITypeLib_GetTypeInfoOfGuid(stdole, &IID_IDispatch, &dispti); - ok(hr == S_OK, "Failed to get IDispatch typeinfo, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get IDispatch typeinfo, hr %#lx.\n", hr);
GetTempFileNameW(L".", L"tlb", 0, filenameW);
hr = CreateTypeLib2(SYS_WIN32, filenameW, &createtl); - ok(hr == S_OK, "Failed to create instance, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create instance, hr %#lx.\n", hr);
hr = ICreateTypeLib2_CreateTypeInfo(createtl, interface1W, TKIND_INTERFACE, &createti); - ok(hr == S_OK, "Failed to create instance, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create instance, hr %#lx.\n", hr); hr = ICreateTypeInfo_QueryInterface(createti, &IID_ICreateTypeInfo2, (void **)&createti2); - ok(hr == S_OK, "Failed to get interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get interface, hr %#lx.\n", hr); ICreateTypeInfo_Release(createti);
hr = ICreateTypeInfo2_AddRefTypeInfo(createti2, dispti, &hreftype); - ok(hr == S_OK, "Failed to add referenced typeinfo, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add referenced typeinfo, hr %#lx.\n", hr);
hr = ICreateTypeInfo2_QueryInterface(createti2, &IID_ITypeInfo, (void **)&ti); - ok(hr == S_OK, "Failed to get interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get interface, hr %#lx.\n", hr);
hr = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hr == S_OK, "Failed to get type attr, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get type attr, hr %#lx.\n", hr); ok(!(typeattr->wTypeFlags & TYPEFLAG_FDISPATCHABLE), "Unexpected type flags %#x.\n", typeattr->wTypeFlags); ITypeInfo_ReleaseTypeAttr(ti, typeattr);
hr = ICreateTypeInfo2_AddImplType(createti2, 0, hreftype); - ok(hr == S_OK, "Failed to add impl type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add impl type, hr %#lx.\n", hr);
hr = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hr == S_OK, "Failed to get type attr, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get type attr, hr %#lx.\n", hr); ok(typeattr->wTypeFlags & TYPEFLAG_FDISPATCHABLE, "Unexpected type flags %#x.\n", typeattr->wTypeFlags); ok(typeattr->cImplTypes == 1, "Unexpected cImplTypes value.\n"); ITypeInfo_ReleaseTypeAttr(ti, typeattr);
/* Delete impltype, check flags. */ hr = ICreateTypeInfo2_DeleteImplType(createti2, 0); - ok(hr == S_OK, "Failed to delete impl type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to delete impl type, hr %#lx.\n", hr);
hr = ICreateTypeInfo2_DeleteImplType(createti2, 0); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "Unexpected hr %#x.\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "Unexpected hr %#lx.\n", hr);
hr = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hr == S_OK, "Failed to get type attr, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get type attr, hr %#lx.\n", hr); ok(typeattr->wTypeFlags & TYPEFLAG_FDISPATCHABLE, "Unexpected type flags %#x.\n", typeattr->wTypeFlags); ok(!typeattr->cImplTypes, "Unexpected cImplTypes value.\n"); ITypeInfo_ReleaseTypeAttr(ti, typeattr);
hr = ITypeInfo_GetImplTypeFlags(ti, 0, &flags); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "Unexpected hr %#x.\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "Unexpected hr %#lx.\n", hr);
hr = ITypeInfo_GetRefTypeOfImplType(ti, 0, &hreftype2); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "Unexpected hr %#x.\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "Unexpected hr %#lx.\n", hr);
hr = ICreateTypeLib2_SaveAllChanges(createtl); - ok(hr == S_OK, "Failed to save changes, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to save changes, hr %#lx.\n", hr); ICreateTypeLib2_Release(createtl); ITypeInfo_Release(ti); ICreateTypeInfo2_Release(createti2);
/* Load and check typeinfo. */ hr = LoadTypeLibEx(filenameW, REGKIND_NONE, &tl); - ok(hr == S_OK, "Failed to load typelib, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to load typelib, hr %#lx.\n", hr);
hr = ITypeLib_GetTypeInfo(tl, 0, &ti); - ok(hr == S_OK, "Failed to get typeinfo, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get typeinfo, hr %#lx.\n", hr); hr = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hr == S_OK, "Failed to get type attr, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get type attr, hr %#lx.\n", hr); ok(typeattr->wTypeFlags & TYPEFLAG_FDISPATCHABLE, "Unexpected type flags %#x.\n", typeattr->wTypeFlags); ok(!typeattr->cImplTypes, "Unexpected cImplTypes value.\n"); ITypeInfo_ReleaseTypeAttr(ti, typeattr); @@ -8476,16 +8476,16 @@ static void test_DeleteFuncDesc(void) GetTempFileNameW(temp_path, L"tlb", 0, filenameW);
hr = CreateTypeLib2(SYS_WIN32, filenameW, &createtl); - ok(hr == S_OK, "Failed to create instance, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create instance, hr %#lx.\n", hr);
hr = ICreateTypeLib2_CreateTypeInfo(createtl, interface1W, TKIND_INTERFACE, &createti); - ok(hr == S_OK, "Failed to create instance, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create instance, hr %#lx.\n", hr); hr = ICreateTypeInfo_QueryInterface(createti, &IID_ICreateTypeInfo2, (void **)&createti2); - ok(hr == S_OK, "Failed to get interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get interface, hr %#lx.\n", hr); ICreateTypeInfo_Release(createti);
hr = ICreateTypeInfo2_QueryInterface(createti2, &IID_ITypeInfo, (void **)&ti); - ok(hr == S_OK, "Failed to get typeinfo, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get typeinfo, hr %#lx.\n", hr);
memset(&funcdesc, 0, sizeof(FUNCDESC)); funcdesc.funckind = FUNC_PUREVIRTUAL; @@ -8495,38 +8495,38 @@ static void test_DeleteFuncDesc(void) U(funcdesc.elemdescFunc).idldesc.wIDLFlags = IDLFLAG_NONE;
hr = ICreateTypeInfo2_AddFuncDesc(createti2, 0, &funcdesc); - ok(hr == S_OK, "Failed to add a funcdesc, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add a funcdesc, hr %#lx.\n", hr);
hr = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hr == S_OK, "Failed to get type attr, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get type attr, hr %#lx.\n", hr); ok(typeattr->cFuncs == 1, "Unexpected cFuncs %u.\n", typeattr->cFuncs); ITypeInfo_ReleaseTypeAttr(ti, typeattr);
hr = ICreateTypeInfo2_DeleteFuncDesc(createti2, 1); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "Unexpected hr %#x.\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "Unexpected hr %#lx.\n", hr);
hr = ICreateTypeInfo2_DeleteFuncDesc(createti2, 0); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hr == S_OK, "Failed to get type attr, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get type attr, hr %#lx.\n", hr); ok(!typeattr->cFuncs, "Unexpected cFuncs %u.\n", typeattr->cFuncs); ITypeInfo_ReleaseTypeAttr(ti, typeattr);
hr = ICreateTypeLib2_SaveAllChanges(createtl); - ok(hr == S_OK, "Failed to save changes, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to save changes, hr %#lx.\n", hr); ICreateTypeLib2_Release(createtl); ITypeInfo_Release(ti); ICreateTypeInfo2_Release(createti2);
/* Load and check typeinfo. */ hr = LoadTypeLibEx(filenameW, REGKIND_NONE, &tl); - ok(hr == S_OK, "Failed to load typelib, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to load typelib, hr %#lx.\n", hr);
hr = ITypeLib_GetTypeInfo(tl, 0, &ti); - ok(hr == S_OK, "Failed to get typeinfo, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get typeinfo, hr %#lx.\n", hr); hr = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hr == S_OK, "Failed to get type attr, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get type attr, hr %#lx.\n", hr); ok(!typeattr->cFuncs, "Unexpected cFuncs value.\n"); ITypeInfo_ReleaseTypeAttr(ti, typeattr); ITypeInfo_Release(ti); diff --git a/dlls/oleaut32/tests/usrmarshal.c b/dlls/oleaut32/tests/usrmarshal.c index bb458dec309..c4f4381b47f 100644 --- a/dlls/oleaut32/tests/usrmarshal.c +++ b/dlls/oleaut32/tests/usrmarshal.c @@ -140,7 +140,7 @@ static void check_safearray(void *buffer, LPSAFEARRAY lpsa)
if(!lpsa) { - ok(*(DWORD *)wiresa == 0, "wiresa + 0x0 should be NULL instead of 0x%08x\n", *(DWORD *)wiresa); + ok(*(DWORD *)wiresa == 0, "wiresa + 0x0 should be NULL instead of 0x%08lx\n", *(DWORD *)wiresa); return; }
@@ -151,25 +151,25 @@ static void check_safearray(void *buffer, LPSAFEARRAY lpsa) sftype = get_union_type(lpsa); cell_count = get_cell_count(lpsa);
- ok(*(DWORD *)wiresa, "wiresa + 0x0 should be non-NULL instead of 0x%08x\n", *(DWORD *)wiresa); /* win2k: this is lpsa. winxp: this is 0x00000001 */ + ok(*(DWORD *)wiresa, "wiresa + 0x0 should be non-NULL instead of 0x%08lx\n", *(DWORD *)wiresa); /* win2k: this is lpsa. winxp: this is 0x00000001 */ wiresa += sizeof(DWORD); - ok(*(DWORD *)wiresa == lpsa->cDims, "wiresa + 0x4 should be lpsa->cDims instead of 0x%08x\n", *(DWORD *)wiresa); + ok(*(DWORD *)wiresa == lpsa->cDims, "wiresa + 0x4 should be lpsa->cDims instead of 0x%08lx\n", *(DWORD *)wiresa); wiresa += sizeof(DWORD); ok(*(WORD *)wiresa == lpsa->cDims, "wiresa + 0x8 should be lpsa->cDims instead of 0x%04x\n", *(WORD *)wiresa); wiresa += sizeof(WORD); ok(*(WORD *)wiresa == lpsa->fFeatures, "wiresa + 0xa should be lpsa->fFeatures instead of 0x%08x\n", *(WORD *)wiresa); wiresa += sizeof(WORD); - ok(*(DWORD *)wiresa == elem_wire_size(lpsa, sftype), "wiresa + 0xc should be 0x%08x instead of 0x%08x\n", elem_wire_size(lpsa, sftype), *(DWORD *)wiresa); + ok(*(DWORD *)wiresa == elem_wire_size(lpsa, sftype), "wiresa + 0xc should be 0x%08lx instead of 0x%08lx\n", elem_wire_size(lpsa, sftype), *(DWORD *)wiresa); wiresa += sizeof(DWORD); ok(*(WORD *)wiresa == lpsa->cLocks, "wiresa + 0x10 should be lpsa->cLocks instead of 0x%04x\n", *(WORD *)wiresa); wiresa += sizeof(WORD); ok(*(WORD *)wiresa == vt, "wiresa + 0x12 should be %04x instead of 0x%04x\n", vt, *(WORD *)wiresa); wiresa += sizeof(WORD); - ok(*(DWORD *)wiresa == sftype, "wiresa + 0x14 should be %08x instead of 0x%08x\n", (DWORD)sftype, *(DWORD *)wiresa); + ok(*(DWORD *)wiresa == sftype, "wiresa + 0x14 should be %08lx instead of 0x%08lx\n", (DWORD)sftype, *(DWORD *)wiresa); wiresa += sizeof(DWORD); - ok(*(DWORD *)wiresa == cell_count, "wiresa + 0x18 should be %u instead of %u\n", cell_count, *(DWORD *)wiresa); + ok(*(DWORD *)wiresa == cell_count, "wiresa + 0x18 should be %lu instead of %lu\n", cell_count, *(DWORD *)wiresa); wiresa += sizeof(DWORD); - ok(*(DWORD *)wiresa, "wiresa + 0x1c should be non-zero instead of 0x%08x\n", *(DWORD *)wiresa); + ok(*(DWORD *)wiresa, "wiresa + 0x1c should be non-zero instead of 0x%08lx\n", *(DWORD *)wiresa); wiresa += sizeof(DWORD); if(sftype == SF_HAVEIID) { @@ -184,7 +184,7 @@ static void check_safearray(void *buffer, LPSAFEARRAY lpsa) for(i=0; i<lpsa->cDims; i++) { ok(memcmp(bounds, &lpsa->rgsabound[lpsa->cDims-i-1], sizeof(SAFEARRAYBOUND)) == 0, - "bounds mismatch for dimension %d, got (%d,%d), expected (%d,%d)\n", i, + "bounds mismatch for dimension %d, got (%ld,%ld), expected (%ld,%ld)\n", i, bounds->lLbound, bounds->cElements, lpsa->rgsabound[lpsa->cDims-i-1].lLbound, lpsa->rgsabound[lpsa->cDims-i-1].cElements); bounds++; @@ -192,7 +192,7 @@ static void check_safearray(void *buffer, LPSAFEARRAY lpsa)
wiresa += sizeof(lpsa->rgsabound[0]) * lpsa->cDims;
- ok(*(DWORD *)wiresa == cell_count, "wiresa + 0x28 should be %u instead of %u\n", cell_count, *(DWORD*)wiresa); + ok(*(DWORD *)wiresa == cell_count, "wiresa + 0x28 should be %lu instead of %lu\n", cell_count, *(DWORD*)wiresa); wiresa += sizeof(DWORD); /* elements are now pointed to by wiresa */ } @@ -261,17 +261,17 @@ static void test_marshal_LPSAFEARRAY(void) expected = (44 + 1 + sizeof(ULONG) - 1) & ~(sizeof(ULONG) - 1); expected += sab[0].cElements * sizeof(USHORT); ok(size == expected || size == expected + 12, /* win64 */ - "size should be %u bytes, not %u\n", expected, size); + "size should be %lu bytes, not %lu\n", expected, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = LPSAFEARRAY_UserSize(&umcb.Flags, 0, &lpsa); expected = 44 + sab[0].cElements * sizeof(USHORT); ok(size == expected || size == expected + 12, /* win64 */ - "size should be %u bytes, not %u\n", expected, size); + "size should be %lu bytes, not %lu\n", expected, size); buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); next = LPSAFEARRAY_UserMarshal(&umcb.Flags, buffer, &lpsa); - ok(next - buffer == expected, "Marshaled %u bytes, expected %u\n", (ULONG) (next - buffer), expected); - ok(lpsa->cLocks == 7, "got lock count %u\n", lpsa->cLocks); + ok(next - buffer == expected, "Marshaled %lu bytes, expected %lu\n", (ULONG) (next - buffer), expected); + ok(lpsa->cLocks == 7, "got lock count %lu\n", lpsa->cLocks);
check_safearray(buffer, lpsa);
@@ -281,14 +281,14 @@ static void test_marshal_LPSAFEARRAY(void) SafeArrayGetVartype(lpsa, &vt); SafeArrayGetVartype(lpsa2, &vt2); ok(vt == vt2, "vts differ %x %x\n", vt, vt2); - ok(lpsa2->cLocks == 0, "got lock count %u, expected 0\n", lpsa2->cLocks); + ok(lpsa2->cLocks == 0, "got lock count %lu, expected 0\n", lpsa2->cLocks); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); LPSAFEARRAY_UserFree(&umcb.Flags, &lpsa2); ok(!lpsa2, "lpsa2 was not set to 0 by LPSAFEARRAY_UserFree\n"); HeapFree(GetProcessHeap(), 0, buffer); lpsa->cLocks = 0; hr = SafeArrayDestroy(lpsa); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* use two dimensions */ sab[0].lLbound = 5; @@ -305,17 +305,17 @@ static void test_marshal_LPSAFEARRAY(void) expected = (44 + 1 + +sizeof(SAFEARRAYBOUND) + sizeof(ULONG) - 1) & ~(sizeof(ULONG) - 1); expected += max(sab[0].cElements, sab[1].cElements) * lpsa->cDims * sizeof(USHORT); ok(size == expected || size == expected + 12, /* win64 */ - "size should be %u bytes, not %u\n", expected, size); + "size should be %lu bytes, not %lu\n", expected, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = LPSAFEARRAY_UserSize(&umcb.Flags, 0, &lpsa); expected = 52 + max(sab[0].cElements, sab[1].cElements) * lpsa->cDims * sizeof(USHORT); ok(size == expected || size == expected + 12, /* win64 */ - "size should be %u bytes, not %u\n", expected, size); + "size should be %lu bytes, not %lu\n", expected, size); buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); next = LPSAFEARRAY_UserMarshal(&umcb.Flags, buffer, &lpsa); - ok(next - buffer == expected, "Marshaled %u bytes, expected %u\n", (ULONG) (next - buffer), expected); - ok(lpsa->cLocks == 7, "got lock count %u\n", lpsa->cLocks); + ok(next - buffer == expected, "Marshaled %lu bytes, expected %lu\n", (ULONG) (next - buffer), expected); + ok(lpsa->cLocks == 7, "got lock count %lu\n", lpsa->cLocks);
check_safearray(buffer, lpsa);
@@ -325,13 +325,13 @@ static void test_marshal_LPSAFEARRAY(void) SafeArrayGetVartype(lpsa, &vt); SafeArrayGetVartype(lpsa2, &vt2); ok(vt == vt2, "vts differ %x %x\n", vt, vt2); - ok(lpsa2->cLocks == 0, "got lock count %u, expected 0\n", lpsa2->cLocks); + ok(lpsa2->cLocks == 0, "got lock count %lu, expected 0\n", lpsa2->cLocks); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); LPSAFEARRAY_UserFree(&umcb.Flags, &lpsa2); HeapFree(GetProcessHeap(), 0, buffer); lpsa->cLocks = 0; hr = SafeArrayDestroy(lpsa); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* test NULL safe array */ lpsa = NULL; @@ -339,11 +339,11 @@ static void test_marshal_LPSAFEARRAY(void) init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = LPSAFEARRAY_UserSize(&umcb.Flags, 0, &lpsa); expected = 4; - ok(size == expected, "size should be 4 bytes, not %d\n", size); + ok(size == expected, "size should be 4 bytes, not %ld\n", size); buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); next = LPSAFEARRAY_UserMarshal(&umcb.Flags, buffer, &lpsa); - ok(next - buffer == expected, "Marshaled %u bytes, expected %u\n", (ULONG) (next - buffer), expected); + ok(next - buffer == expected, "Marshaled %lu bytes, expected %lu\n", (ULONG) (next - buffer), expected); check_safearray(buffer, lpsa);
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); @@ -365,54 +365,54 @@ static void test_marshal_LPSAFEARRAY(void) expected = (44 + 1 + (sizeof(double) - 1)) & ~(sizeof(double) - 1); expected += sab[0].cElements * sizeof(double); ok(size == expected || size == expected + 16, /* win64 */ - "size should be %u bytes, not %u\n", expected, size); + "size should be %lu bytes, not %lu\n", expected, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); expected = (44 + (sizeof(double) - 1)) & ~(sizeof(double) - 1); expected += sab[0].cElements * sizeof(double); size = LPSAFEARRAY_UserSize(&umcb.Flags, 0, &lpsa); ok(size == expected || size == expected + 8, /* win64 */ - "size should be %u bytes, not %u\n", expected, size); + "size should be %lu bytes, not %lu\n", expected, size); buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); next = LPSAFEARRAY_UserMarshal(&umcb.Flags, buffer, &lpsa); ok(next - buffer == expected || broken(next - buffer + sizeof(DWORD) == expected), - "Marshaled %u bytes, expected %u\n", (ULONG) (next - buffer), expected); + "Marshaled %lu bytes, expected %lu\n", (ULONG) (next - buffer), expected);
check_safearray(buffer, lpsa);
HeapFree(GetProcessHeap(), 0, buffer); lpsa->cLocks = 0; hr = SafeArrayDestroy(lpsa); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* VARTYPE-less arrays can be marshaled if cbElements is 1,2,4 or 8 as type SF_In */ hr = SafeArrayAllocDescriptor(1, &lpsa); - ok(hr == S_OK, "saad failed %08x\n", hr); + ok(hr == S_OK, "saad failed %08lx\n", hr); lpsa->cbElements = 8; lpsa->rgsabound[0].lLbound = 2; lpsa->rgsabound[0].cElements = 48; hr = SafeArrayAllocData(lpsa); - ok(hr == S_OK, "saad failed %08x\n", hr); + ok(hr == S_OK, "saad failed %08lx\n", hr); hr = SafeArrayGetVartype(lpsa, &vt); - ok(hr == E_INVALIDARG, "ret %08x\n", hr); + ok(hr == E_INVALIDARG, "ret %08lx\n", hr);
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = LPSAFEARRAY_UserSize(&umcb.Flags, 0, &lpsa); expected = (44 + lpsa->cbElements - 1) & ~(lpsa->cbElements - 1); expected += lpsa->cbElements * lpsa->rgsabound[0].cElements; ok(size == expected || size == expected + 8, /* win64 */ - "size should be %u bytes, not %u\n", expected, size); + "size should be %lu bytes, not %lu\n", expected, size); buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); next = LPSAFEARRAY_UserMarshal(&umcb.Flags, buffer, &lpsa); ok(next - buffer == expected || broken(next - buffer + sizeof(DWORD) == expected), - "Marshaled %u bytes, expected %u\n", (ULONG) (next - buffer), expected); + "Marshaled %lu bytes, expected %lu\n", (ULONG) (next - buffer), expected); check_safearray(buffer, lpsa); HeapFree(GetProcessHeap(), 0, buffer); hr = SafeArrayDestroyData(lpsa); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = SafeArrayDestroyDescriptor(lpsa); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* Test an array of VT_BSTR */ sab[0].lLbound = 3; @@ -430,7 +430,7 @@ static void test_marshal_LPSAFEARRAY(void) indices[0] = i + sab[0].lLbound; values[i] = SysAllocString(buf); hr = SafeArrayPutElement(lpsa, indices, values[i]); - ok(hr == S_OK, "Failed to put bstr element hr 0x%x\n", hr); + ok(hr == S_OK, "Failed to put bstr element hr 0x%lx\n", hr); expected_bstr_size += (j * sizeof(WCHAR)) + (3 * sizeof(DWORD)); if (i % 2 == 0) /* Account for DWORD padding. Works so long as cElements is even */ expected_bstr_size += sizeof(WCHAR); @@ -441,18 +441,18 @@ static void test_marshal_LPSAFEARRAY(void) expected = 44 + (sab[0].cElements * sizeof(DWORD)) + expected_bstr_size; todo_wine ok(size == expected + sizeof(DWORD) || size == (expected + sizeof(DWORD) + 12 /* win64 */), - "size should be %u bytes, not %u\n", expected + (ULONG) sizeof(DWORD), size); + "size should be %lu bytes, not %lu\n", expected + (ULONG) sizeof(DWORD), size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = LPSAFEARRAY_UserSize(&umcb.Flags, 0, &lpsa); todo_wine ok(size == expected || size == (expected + 12 /* win64 */), - "size should be %u bytes, not %u\n", expected, size); + "size should be %lu bytes, not %lu\n", expected, size); buffer = HeapAlloc(GetProcessHeap(), 0, size); memset(buffer, 0xcc, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); next = LPSAFEARRAY_UserMarshal(&umcb.Flags, buffer, &lpsa); todo_wine - ok(next - buffer == expected, "Marshaled %u bytes, expected %u\n", (ULONG) (next - buffer), expected); + ok(next - buffer == expected, "Marshaled %lu bytes, expected %lu\n", (ULONG) (next - buffer), expected);
check_safearray(buffer, lpsa);
@@ -460,7 +460,7 @@ static void test_marshal_LPSAFEARRAY(void) init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); next = LPSAFEARRAY_UserUnmarshal(&umcb.Flags, buffer, &lpsa2); todo_wine - ok(next - buffer == expected, "Marshaled %u bytes, expected %u\n", (ULONG) (next - buffer), expected); + ok(next - buffer == expected, "Marshaled %lu bytes, expected %lu\n", (ULONG) (next - buffer), expected); ok(lpsa2 != NULL, "LPSAFEARRAY didn't unmarshal, result %p\n", next);
for (i = 0; i < ARRAY_SIZE(values); i++) @@ -471,7 +471,7 @@ static void test_marshal_LPSAFEARRAY(void) { indices[0] = i + sab[0].lLbound; hr = SafeArrayGetElement(lpsa2, indices, &gotvalue); - ok(hr == S_OK, "Failed to get bstr element at hres 0x%x\n", hr); + ok(hr == S_OK, "Failed to get bstr element at hres 0x%lx\n", hr); if (hr == S_OK) { ok(VarBstrCmp(values[i], gotvalue, 0, 0) == VARCMP_EQ, "String %d does not match\n", i); @@ -487,39 +487,39 @@ static void test_marshal_LPSAFEARRAY(void)
HeapFree(GetProcessHeap(), 0, buffer); hr = SafeArrayDestroy(lpsa); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* VARTYPE-less arrays with FADF_VARIANT */ hr = SafeArrayAllocDescriptor(1, &lpsa); - ok(hr == S_OK, "saad failed %08x\n", hr); + ok(hr == S_OK, "saad failed %08lx\n", hr); lpsa->cbElements = sizeof(VARIANT); lpsa->fFeatures = FADF_VARIANT; lpsa->rgsabound[0].lLbound = 2; lpsa->rgsabound[0].cElements = 48; hr = SafeArrayAllocData(lpsa); - ok(hr == S_OK, "saad failed %08x\n", hr); + ok(hr == S_OK, "saad failed %08lx\n", hr); hr = SafeArrayGetVartype(lpsa, &vt); - ok(hr == E_INVALIDARG, "ret %08x\n", hr); + ok(hr == E_INVALIDARG, "ret %08lx\n", hr);
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = LPSAFEARRAY_UserSize(&umcb.Flags, 0, &lpsa); expected = 44 + 28 * lpsa->rgsabound[0].cElements; todo_wine ok(size == expected || size == expected + 8, /* win64 */ - "size should be %u bytes, not %u\n", expected, size); + "size should be %lu bytes, not %lu\n", expected, size); buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); next = LPSAFEARRAY_UserMarshal(&umcb.Flags, buffer, &lpsa); todo_wine ok(next - buffer == expected || broken(next - buffer + sizeof(DWORD) == expected), - "Marshaled %u bytes, expected %u\n", (ULONG) (next - buffer), expected); + "Marshaled %lu bytes, expected %lu\n", (ULONG) (next - buffer), expected); lpsa->cbElements = 16; /* VARIANT wire size */ check_safearray(buffer, lpsa); HeapFree(GetProcessHeap(), 0, buffer); hr = SafeArrayDestroyData(lpsa); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = SafeArrayDestroyDescriptor(lpsa); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* Test an array of VT_UNKNOWN */ sab[0].lLbound = 3; @@ -544,8 +544,8 @@ static void test_marshal_LPSAFEARRAY(void) indices[0] = i + sab[0].lLbound; heap_unknown[i] = unk; hr = SafeArrayPutElement(lpsa, indices, &heap_unknown[i]->IUnknown_iface); - ok(hr == S_OK, "Failed to put unknown element hr 0x%x\n", hr); - ok(unk->refs == 2, "VT_UNKNOWN safearray elem %d, refcount %d\n", i, unk->refs); + ok(hr == S_OK, "Failed to put unknown element hr 0x%lx\n", hr); + ok(unk->refs == 2, "VT_UNKNOWN safearray elem %d, refcount %ld\n", i, unk->refs);
V_VT(&v) = VT_UNKNOWN; V_UNKNOWN(&v) = &unk->IUnknown_iface; @@ -555,26 +555,26 @@ static void test_marshal_LPSAFEARRAY(void) init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = LPSAFEARRAY_UserSize(&umcb.Flags, 0, &lpsa); ok(size >= expected || size >= (expected + 12 ), - "size should be at least %u bytes, not %u\n", expected, size); + "size should be at least %lu bytes, not %lu\n", expected, size);
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size2 = LPSAFEARRAY_UserSize(&umcb.Flags, 1, &lpsa); ok(size2 == (size + sizeof(DWORD)) || size2 == (size + sizeof(DWORD) + 12), - "size should be %u bytes, not %u\n", size + (ULONG) sizeof(DWORD), size2); + "size should be %lu bytes, not %lu\n", size + (ULONG) sizeof(DWORD), size2);
buffer = HeapAlloc(GetProcessHeap(), 0, size); memset(buffer, 0xcc, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); next = LPSAFEARRAY_UserMarshal(&umcb.Flags, buffer, &lpsa); - ok((next - buffer) <= size, "Marshaled %u bytes, expected at most %u\n", (ULONG) (next - buffer), size); + ok((next - buffer) <= size, "Marshaled %lu bytes, expected at most %lu\n", (ULONG) (next - buffer), size); check_safearray(buffer, lpsa); todo_wine - ok(heap_unknown[0]->refs == 3, "Unexpected refcount %d\n", heap_unknown[0]->refs); + ok(heap_unknown[0]->refs == 3, "Unexpected refcount %ld\n", heap_unknown[0]->refs);
lpsa2 = NULL; init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); next = LPSAFEARRAY_UserUnmarshal(&umcb.Flags, buffer, &lpsa2); - ok((next - buffer) <= size, "Marshaled %u bytes, expected at most %u\n", (ULONG) (next - buffer), size); + ok((next - buffer) <= size, "Marshaled %lu bytes, expected at most %lu\n", (ULONG) (next - buffer), size); ok(lpsa2 != NULL, "LPSAFEARRAY didn't unmarshal, result %p\n", next);
for (i = 0; i < ARRAY_SIZE(heap_unknown); i++) @@ -585,7 +585,7 @@ static void test_marshal_LPSAFEARRAY(void) { indices[0] = i + sab[0].lLbound; hr = SafeArrayGetElement(lpsa2, indices, &gotvalue); - ok(hr == S_OK, "Failed to get unk element at %d, hres 0x%x\n", i, hr); + ok(hr == S_OK, "Failed to get unk element at %d, hres 0x%lx\n", i, hr); if (hr == S_OK) { ok(gotvalue == &heap_unknown[i]->IUnknown_iface, "Interface %d mismatch, expected %p, got %p\n", @@ -601,7 +601,7 @@ static void test_marshal_LPSAFEARRAY(void) /* Set one of the elements to NULL, see how this effects size. */ indices[0] = 3 + sab[0].lLbound; hr = SafeArrayPutElement(lpsa, indices, NULL); - ok(hr == S_OK, "Failed to put unknown element hr 0x%x\n", hr); + ok(hr == S_OK, "Failed to put unknown element hr 0x%lx\n", hr);
expected = 60; for (i = 0; i < sab[0].cElements; i++) @@ -616,24 +616,24 @@ static void test_marshal_LPSAFEARRAY(void) init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = LPSAFEARRAY_UserSize(&umcb.Flags, 0, &lpsa); ok(size >= expected || size >= (expected + 12 ), - "size should be at least %u bytes, not %u\n", expected, size); + "size should be at least %lu bytes, not %lu\n", expected, size);
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size2 = LPSAFEARRAY_UserSize(&umcb.Flags, 1, &lpsa); ok(size2 == (size + sizeof(DWORD)) || size2 == (size + sizeof(DWORD) + 12), - "size should be %u bytes, not %u\n", size + (ULONG) sizeof(DWORD), size2); + "size should be %lu bytes, not %lu\n", size + (ULONG) sizeof(DWORD), size2);
buffer = HeapAlloc(GetProcessHeap(), 0, size); memset(buffer, 0xcc, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); next = LPSAFEARRAY_UserMarshal(&umcb.Flags, buffer, &lpsa); - ok((next - buffer) <= expected, "Marshaled %u bytes, expected at most %u bytes\n", (ULONG) (next - buffer), expected); + ok((next - buffer) <= expected, "Marshaled %lu bytes, expected at most %lu bytes\n", (ULONG) (next - buffer), expected); check_safearray(buffer, lpsa);
lpsa2 = NULL; init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); next = LPSAFEARRAY_UserUnmarshal(&umcb.Flags, buffer, &lpsa2); - ok((next - buffer) <= expected, "Marshaled %u bytes, expected at most %u bytes\n", (ULONG) (next - buffer), expected); + ok((next - buffer) <= expected, "Marshaled %lu bytes, expected at most %lu bytes\n", (ULONG) (next - buffer), expected); ok(lpsa2 != NULL, "LPSAFEARRAY didn't unmarshal, result %p\n", next);
for (i = 0; i < ARRAY_SIZE(heap_unknown); i++) @@ -644,7 +644,7 @@ static void test_marshal_LPSAFEARRAY(void) { indices[0] = i + sab[0].lLbound; hr = SafeArrayGetElement(lpsa2, indices, &gotvalue); - ok(hr == S_OK, "Failed to get unk element at %d, hres 0x%x\n", i, hr); + ok(hr == S_OK, "Failed to get unk element at %d, hres 0x%lx\n", i, hr); if (hr == S_OK) { /* Our NULL interface. */ @@ -664,10 +664,10 @@ static void test_marshal_LPSAFEARRAY(void) init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); LPSAFEARRAY_UserFree(&umcb.Flags, &lpsa2);
- ok(heap_unknown[0]->refs == 1, "Unexpected refcount %d\n", heap_unknown[0]->refs); + ok(heap_unknown[0]->refs == 1, "Unexpected refcount %ld\n", heap_unknown[0]->refs);
hr = SafeArrayDestroy(lpsa); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); }
static void check_bstr(void *buffer, BSTR b) @@ -675,14 +675,14 @@ static void check_bstr(void *buffer, BSTR b) DWORD *wireb = buffer; DWORD len = SysStringByteLen(b);
- ok(*wireb == (len + 1) / 2, "wv[0] %08x\n", *wireb); + ok(*wireb == (len + 1) / 2, "wv[0] %08lx\n", *wireb); wireb++; if(b) - ok(*wireb == len, "wv[1] %08x\n", *wireb); + ok(*wireb == len, "wv[1] %08lx\n", *wireb); else - ok(*wireb == 0xffffffff, "wv[1] %08x\n", *wireb); + ok(*wireb == 0xffffffff, "wv[1] %08lx\n", *wireb); wireb++; - ok(*wireb == (len + 1) / 2, "wv[2] %08x\n", *wireb); + ok(*wireb == (len + 1) / 2, "wv[2] %08lx\n", *wireb); if(len) { wireb++; @@ -704,17 +704,17 @@ static void test_marshal_BSTR(void)
b = SysAllocString(str); len = SysStringLen(b); - ok(len == 13, "get %d\n", len); + ok(len == 13, "get %ld\n", len);
/* BSTRs are DWORD aligned */
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = BSTR_UserSize(&umcb.Flags, 1, &b); - ok(size == 42, "size %d\n", size); + ok(size == 42, "size %ld\n", size);
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = BSTR_UserSize(&umcb.Flags, 0, &b); - ok(size == 38, "size %d\n", size); + ok(size == 38, "size %ld\n", size);
buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); @@ -737,7 +737,7 @@ static void test_marshal_BSTR(void) b = NULL; init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = BSTR_UserSize(&umcb.Flags, 0, &b); - ok(size == 12, "size %d\n", size); + ok(size == 12, "size %ld\n", size);
buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); @@ -757,13 +757,13 @@ static void test_marshal_BSTR(void) b = SysAllocStringByteLen("abc", 3); *(((char*)b) + 3) = 'd'; len = SysStringLen(b); - ok(len == 1, "get %d\n", len); + ok(len == 1, "get %ld\n", len); len = SysStringByteLen(b); - ok(len == 3, "get %d\n", len); + ok(len == 3, "get %ld\n", len);
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = BSTR_UserSize(&umcb.Flags, 0, &b); - ok(size == 16, "size %d\n", size); + ok(size == 16, "size %ld\n", size);
buffer = HeapAlloc(GetProcessHeap(), 0, size); memset(buffer, 0xcc, size); @@ -786,13 +786,13 @@ static void test_marshal_BSTR(void)
b = SysAllocStringByteLen("", 0); len = SysStringLen(b); - ok(len == 0, "get %d\n", len); + ok(len == 0, "get %ld\n", len); len = SysStringByteLen(b); - ok(len == 0, "get %d\n", len); + ok(len == 0, "get %ld\n", len);
init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); size = BSTR_UserSize(&umcb.Flags, 0, &b); - ok(size == 12, "size %d\n", size); + ok(size == 12, "size %ld\n", size);
buffer = HeapAlloc(GetProcessHeap(), 0, size); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); @@ -806,7 +806,7 @@ static void test_marshal_BSTR(void) ok(next == buffer + size, "got %p expect %p\n", next, buffer + size); ok(b2 != NULL, "NULL LPSAFEARRAY didn't unmarshal\n"); len = SysStringByteLen(b2); - ok(len == 0, "byte len %d\n", len); + ok(len == 0, "byte len %ld\n", len); init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); BSTR_UserFree(&umcb.Flags, &b2); HeapFree(GetProcessHeap(), 0, buffer); @@ -867,8 +867,8 @@ static DWORD *check_variant_header(DWORD *wirev, VARIANT *v, ULONG size) const variant_wire_t *header = (const variant_wire_t*)wirev; DWORD switch_is;
- ok(header->clSize == (size + 7) >> 3, "wv[0] %08x, expected %08x\n", header->clSize, (size + 7) >> 3); - ok(header->rpcReserved == 0, "wv[1] %08x\n", header->rpcReserved); + ok(header->clSize == (size + 7) >> 3, "wv[0] %08lx, expected %08lx\n", header->clSize, (size + 7) >> 3); + ok(header->rpcReserved == 0, "wv[1] %08lx\n", header->rpcReserved); ok(header->vt == V_VT(v), "vt %04x expected %04x\n", header->vt, V_VT(v)); ok(header->wReserved1 == V_U2(v).wReserved1, "res1 %04x expected %04x\n", header->wReserved1, V_U2(v).wReserved1); ok(header->wReserved2 == V_U2(v).wReserved2, "res2 %04x expected %04x\n", header->wReserved2, V_U2(v).wReserved2); @@ -877,7 +877,7 @@ static DWORD *check_variant_header(DWORD *wirev, VARIANT *v, ULONG size) switch_is = V_VT(v); if(switch_is & VT_ARRAY) switch_is &= ~VT_TYPEMASK; - ok(header->switch_is == switch_is, "switch_is %08x expected %08x\n", header->switch_is, switch_is); + ok(header->switch_is == switch_is, "switch_is %08lx expected %08lx\n", header->switch_is, switch_is);
return (DWORD*)((unsigned char*)wirev + sizeof(variant_wire_t)); } @@ -938,10 +938,10 @@ static void test_marshal_VARIANT(void)
/* Variants have an alignment of 8 */ rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 1, &v); - ok(stubMsg.BufferLength == 29, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 29, "size %ld\n", stubMsg.BufferLength);
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 21, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 21, "size %ld\n", stubMsg.BufferLength);
buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; @@ -950,7 +950,7 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, stubMsg.BufferLength); - ok(*(char*)wirev == V_I1(&v), "wv[5] %08x\n", *wirev); + ok(*(char*)wirev == V_I1(&v), "wv[5] %08lx\n", *wirev); VariantInit(&v2); stubMsg.Buffer = buffer; next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); @@ -967,7 +967,7 @@ static void test_marshal_VARIANT(void) V_I2(&v) = 0x1234;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 22, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 22, "size %ld\n", stubMsg.BufferLength);
buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; @@ -976,7 +976,7 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, stubMsg.BufferLength); - ok(*(short*)wirev == V_I2(&v), "wv[5] %08x\n", *wirev); + ok(*(short*)wirev == V_I2(&v), "wv[5] %08lx\n", *wirev); VariantInit(&v2); stubMsg.Buffer = buffer; next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); @@ -994,7 +994,7 @@ static void test_marshal_VARIANT(void) V_I2REF(&v) = &s;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 26, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 26, "size %ld\n", stubMsg.BufferLength);
buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; @@ -1003,9 +1003,9 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, stubMsg.BufferLength); - ok(*wirev == 0x4, "wv[5] %08x\n", *wirev); + ok(*wirev == 0x4, "wv[5] %08lx\n", *wirev); wirev++; - ok(*(short*)wirev == s, "wv[6] %08x\n", *wirev); + ok(*(short*)wirev == s, "wv[6] %08lx\n", *wirev); VariantInit(&v2); V_VT(&v2) = VT_I2 | VT_BYREF; V_BYREF(&v2) = mem = CoTaskMemAlloc(sizeof(V_I2(&v2))); @@ -1025,7 +1025,7 @@ static void test_marshal_VARIANT(void) V_I4(&v) = 0x1234;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 24, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 24, "size %ld\n", stubMsg.BufferLength);
buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; @@ -1034,14 +1034,14 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, stubMsg.BufferLength); - ok(*wirev == V_I4(&v), "wv[5] %08x\n", *wirev); + ok(*wirev == V_I4(&v), "wv[5] %08lx\n", *wirev);
VariantInit(&v2); stubMsg.Buffer = buffer; next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); ok(V_VT(&v) == V_VT(&v2), "got vt %d expect %d\n", V_VT(&v), V_VT(&v2)); - ok(V_I4(&v) == V_I4(&v2), "got i4 %x expect %x\n", V_I4(&v), V_I4(&v2)); + ok(V_I4(&v) == V_I4(&v2), "got i4 %lx expect %lx\n", V_I4(&v), V_I4(&v2));
VARIANT_UserFree(&umcb.Flags, &v2); HeapFree(GetProcessHeap(), 0, oldbuffer); @@ -1052,7 +1052,7 @@ static void test_marshal_VARIANT(void) V_UI4(&v) = 0x1234;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 24, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 24, "size %ld\n", stubMsg.BufferLength);
buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; @@ -1061,13 +1061,13 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, stubMsg.BufferLength); - ok(*wirev == 0x1234, "wv[5] %08x\n", *wirev); + ok(*wirev == 0x1234, "wv[5] %08lx\n", *wirev); VariantInit(&v2); stubMsg.Buffer = buffer; next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); ok(V_VT(&v) == V_VT(&v2), "got vt %d expect %d\n", V_VT(&v), V_VT(&v2)); - ok(V_UI4(&v) == V_UI4(&v2), "got ui4 %x expect %x\n", V_UI4(&v), V_UI4(&v2)); + ok(V_UI4(&v) == V_UI4(&v2), "got ui4 %lx expect %lx\n", V_UI4(&v), V_UI4(&v2));
VARIANT_UserFree(&umcb.Flags, &v2); HeapFree(GetProcessHeap(), 0, oldbuffer); @@ -1079,7 +1079,7 @@ static void test_marshal_VARIANT(void) V_UI4REF(&v) = &ul;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 28, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 28, "size %ld\n", stubMsg.BufferLength);
buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; @@ -1088,16 +1088,16 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, stubMsg.BufferLength); - ok(*wirev == 0x4, "wv[5] %08x\n", *wirev); + ok(*wirev == 0x4, "wv[5] %08lx\n", *wirev); wirev++; - ok(*wirev == ul, "wv[6] %08x\n", *wirev); + ok(*wirev == ul, "wv[6] %08lx\n", *wirev);
VariantInit(&v2); stubMsg.Buffer = buffer; next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); ok(V_VT(&v) == V_VT(&v2), "got vt %d expect %d\n", V_VT(&v), V_VT(&v2)); - ok(*V_UI4REF(&v) == *V_UI4REF(&v2), "got ui4 ref %x expect ui4 ref %x\n", *V_UI4REF(&v), *V_UI4REF(&v2)); + ok(*V_UI4REF(&v) == *V_UI4REF(&v2), "got ui4 ref %lx expect ui4 ref %lx\n", *V_UI4REF(&v), *V_UI4REF(&v2));
VARIANT_UserFree(&umcb.Flags, &v2); HeapFree(GetProcessHeap(), 0, oldbuffer); @@ -1108,7 +1108,7 @@ static void test_marshal_VARIANT(void) V_I8(&v) = (LONGLONG)1000000 * 1000000;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 32, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 32, "size %ld\n", stubMsg.BufferLength);
buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; @@ -1118,7 +1118,7 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, stubMsg.BufferLength); - ok(*wirev == 0xcccccccc, "wv[5] %08x\n", *wirev); /* pad */ + ok(*wirev == 0xcccccccc, "wv[5] %08lx\n", *wirev); /* pad */ wirev++; ok(*(LONGLONG *)wirev == V_I8(&v), "wv[6] %s\n", wine_dbgstr_longlong(*(LONGLONG *)wirev)); VariantInit(&v2); @@ -1138,7 +1138,7 @@ static void test_marshal_VARIANT(void) V_R8(&v) = 3.1415;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 24, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 24, "size %ld\n", stubMsg.BufferLength);
buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; @@ -1147,7 +1147,7 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, stubMsg.BufferLength); - ok(*(float*)wirev == V_R4(&v), "wv[5] %08x\n", *wirev); + ok(*(float*)wirev == V_R4(&v), "wv[5] %08lx\n", *wirev); VariantInit(&v2); stubMsg.Buffer = buffer; next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); @@ -1164,7 +1164,7 @@ static void test_marshal_VARIANT(void) V_R8(&v) = 3.1415;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 32, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 32, "size %ld\n", stubMsg.BufferLength);
buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; @@ -1174,9 +1174,9 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, stubMsg.BufferLength); - ok(*wirev == 0xcccccccc, "wv[5] %08x\n", *wirev); /* pad */ + ok(*wirev == 0xcccccccc, "wv[5] %08lx\n", *wirev); /* pad */ wirev++; - ok(*(double*)wirev == V_R8(&v), "wv[6] %08x, wv[7] %08x\n", *wirev, *(wirev+1)); + ok(*(double*)wirev == V_R8(&v), "wv[6] %08lx, wv[7] %08lx\n", *wirev, *(wirev+1)); VariantInit(&v2); stubMsg.Buffer = buffer; next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); @@ -1194,7 +1194,7 @@ static void test_marshal_VARIANT(void) V_R8REF(&v) = &d;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 32, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 32, "size %ld\n", stubMsg.BufferLength);
buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; @@ -1203,9 +1203,9 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, stubMsg.BufferLength); - ok(*wirev == 8, "wv[5] %08x\n", *wirev); + ok(*wirev == 8, "wv[5] %08lx\n", *wirev); wirev++; - ok(*(double*)wirev == d, "wv[6] %08x wv[7] %08x\n", *wirev, *(wirev+1)); + ok(*(double*)wirev == d, "wv[6] %08lx wv[7] %08lx\n", *wirev, *(wirev+1)); VariantInit(&v2); stubMsg.Buffer = buffer; next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); @@ -1222,7 +1222,7 @@ static void test_marshal_VARIANT(void) V_BOOL(&v) = 0x1234;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 22, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 22, "size %ld\n", stubMsg.BufferLength);
buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; @@ -1250,7 +1250,7 @@ static void test_marshal_VARIANT(void) V_VT(&v) = VT_DECIMAL;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 40, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 40, "size %ld\n", stubMsg.BufferLength);
buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; @@ -1260,11 +1260,11 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, stubMsg.BufferLength); - ok(*wirev == 0xcccccccc, "wirev[5] %08x\n", *wirev); /* pad */ + ok(*wirev == 0xcccccccc, "wirev[5] %08lx\n", *wirev); /* pad */ wirev++; dec2 = dec; dec2.wReserved = VT_DECIMAL; - ok(!memcmp(wirev, &dec2, sizeof(dec2)), "wirev[6] %08x wirev[7] %08x wirev[8] %08x wirev[9] %08x\n", + ok(!memcmp(wirev, &dec2, sizeof(dec2)), "wirev[6] %08lx wirev[7] %08lx wirev[8] %08lx wirev[9] %08lx\n", *wirev, *(wirev + 1), *(wirev + 2), *(wirev + 3)); VariantInit(&v2); stubMsg.Buffer = buffer; @@ -1282,7 +1282,7 @@ static void test_marshal_VARIANT(void) V_DECIMALREF(&v) = &dec;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 40, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 40, "size %ld\n", stubMsg.BufferLength);
buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; @@ -1291,9 +1291,9 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, stubMsg.BufferLength); - ok(*wirev == 16, "wv[5] %08x\n", *wirev); + ok(*wirev == 16, "wv[5] %08lx\n", *wirev); wirev++; - ok(!memcmp(wirev, &dec, sizeof(dec)), "wirev[6] %08x wirev[7] %08x wirev[8] %08x wirev[9] %08x\n", *wirev, *(wirev + 1), *(wirev + 2), *(wirev + 3)); + ok(!memcmp(wirev, &dec, sizeof(dec)), "wirev[6] %08lx wirev[7] %08lx wirev[8] %08lx wirev[9] %08lx\n", *wirev, *(wirev + 1), *(wirev + 2), *(wirev + 3)); VariantInit(&v2); /* check_variant_header tests wReserved[123], so initialize to unique values. * (Could probably also do this by setting the variant to a known DECIMAL.) @@ -1316,7 +1316,7 @@ static void test_marshal_VARIANT(void) V_VT(&v) = VT_EMPTY;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 20, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 20, "size %ld\n", stubMsg.BufferLength);
buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; @@ -1339,7 +1339,7 @@ static void test_marshal_VARIANT(void) V_VT(&v) = VT_NULL;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 20, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 20, "size %ld\n", stubMsg.BufferLength);
buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; @@ -1364,7 +1364,7 @@ static void test_marshal_VARIANT(void) V_BSTR(&v) = b;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 60, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 60, "size %ld\n", stubMsg.BufferLength); buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); @@ -1372,7 +1372,7 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, stubMsg.BufferLength); - ok(*wirev, "wv[5] %08x\n", *wirev); /* win2k: this is b. winxp: this is (char*)b + 1 */ + ok(*wirev, "wv[5] %08lx\n", *wirev); /* win2k: this is b. winxp: this is (char*)b + 1 */ wirev++; check_bstr(wirev, V_BSTR(&v)); VariantInit(&v2); @@ -1392,7 +1392,7 @@ static void test_marshal_VARIANT(void) V_BSTRREF(&v) = &b;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 64, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 64, "size %ld\n", stubMsg.BufferLength); buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); @@ -1400,9 +1400,9 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, stubMsg.BufferLength); - ok(*wirev == 0x4, "wv[5] %08x\n", *wirev); + ok(*wirev == 0x4, "wv[5] %08lx\n", *wirev); wirev++; - ok(*wirev, "wv[6] %08x\n", *wirev); /* win2k: this is b. winxp: this is (char*)b + 1 */ + ok(*wirev, "wv[6] %08lx\n", *wirev); /* win2k: this is b. winxp: this is (char*)b + 1 */ wirev++; check_bstr(wirev, b); b2 = SysAllocString(str); @@ -1438,7 +1438,7 @@ static void test_marshal_VARIANT(void) rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); expected = 152; ok(stubMsg.BufferLength == expected || stubMsg.BufferLength == expected + 8, /* win64 */ - "size %u instead of %u\n", stubMsg.BufferLength, expected); + "size %lu instead of %lu\n", stubMsg.BufferLength, expected); buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); @@ -1446,7 +1446,7 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, expected); - ok(*wirev, "wv[5] %08x\n", *wirev); /* win2k: this is lpsa. winxp: this is (char*)lpsa + 1 */ + ok(*wirev, "wv[5] %08lx\n", *wirev); /* win2k: this is lpsa. winxp: this is (char*)lpsa + 1 */ wirev++; check_safearray(wirev, lpsa); VariantInit(&v2); @@ -1475,7 +1475,7 @@ static void test_marshal_VARIANT(void) rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); expected = 152; ok(stubMsg.BufferLength == expected || stubMsg.BufferLength == expected + 16, /* win64 */ - "size %u instead of %u\n", stubMsg.BufferLength, expected); + "size %lu instead of %lu\n", stubMsg.BufferLength, expected); buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); @@ -1483,9 +1483,9 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, expected); - ok(*wirev == 4, "wv[5] %08x\n", *wirev); + ok(*wirev == 4, "wv[5] %08lx\n", *wirev); wirev++; - ok(*wirev, "wv[6] %08x\n", *wirev); /* win2k: this is lpsa. winxp: this is (char*)lpsa + 1 */ + ok(*wirev, "wv[6] %08lx\n", *wirev); /* win2k: this is lpsa. winxp: this is (char*)lpsa + 1 */ wirev++; check_safearray(wirev, lpsa); VariantInit(&v2); @@ -1515,7 +1515,7 @@ static void test_marshal_VARIANT(void) rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); expected = 152; ok(stubMsg.BufferLength == expected || stubMsg.BufferLength == expected + 16, /* win64 */ - "size %u instead of %u\n", stubMsg.BufferLength, expected); + "size %lu instead of %lu\n", stubMsg.BufferLength, expected); buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); @@ -1523,9 +1523,9 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer;
wirev = check_variant_header(wirev, &v, expected); - ok(*wirev == 4, "wv[5] %08x\n", *wirev); + ok(*wirev == 4, "wv[5] %08lx\n", *wirev); wirev++; - ok(*wirev, "wv[6] %08x\n", *wirev); /* win2k: this is lpsa. winxp: this is (char*)lpsa + 1 */ + ok(*wirev, "wv[6] %08lx\n", *wirev); /* win2k: this is lpsa. winxp: this is (char*)lpsa + 1 */ wirev++; check_safearray(wirev, lpsa); lpsa_copy = lpsa2 = SafeArrayCreate(VT_I8, 1, &sab); @@ -1552,11 +1552,11 @@ static void test_marshal_VARIANT(void) ok(vt == vt2, "array vts differ %x %x\n", vt, vt2); lpsa2->fFeatures &= ~FADF_STATIC; hr = SafeArrayDestroy(*V_ARRAYREF(&v2)); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); HeapFree(GetProcessHeap(), 0, oldbuffer); lpsa->fFeatures &= ~FADF_STATIC; hr = SafeArrayDestroy(lpsa); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/*** VARIANT BYREF ***/ VariantInit(&v); @@ -1567,7 +1567,7 @@ static void test_marshal_VARIANT(void) V_VARIANTREF(&v) = &v2;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 64, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 64, "size %ld\n", stubMsg.BufferLength); buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; memset(buffer, 0xcc, stubMsg.BufferLength); @@ -1576,16 +1576,16 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer; wirev = check_variant_header(wirev, &v, stubMsg.BufferLength);
- ok(*wirev == sizeof(VARIANT), "wv[5] %08x\n", *wirev); + ok(*wirev == sizeof(VARIANT), "wv[5] %08lx\n", *wirev); wirev++; - ok(*wirev == ('U' | 's' << 8 | 'e' << 16 | 'r' << 24), "wv[6] %08x\n", *wirev); /* 'User' */ + ok(*wirev == ('U' | 's' << 8 | 'e' << 16 | 'r' << 24), "wv[6] %08lx\n", *wirev); /* 'User' */ wirev++; - ok(*wirev == 0xcccccccc, "wv[7] %08x\n", *wirev); /* pad */ + ok(*wirev == 0xcccccccc, "wv[7] %08lx\n", *wirev); /* pad */ wirev++; wirev = check_variant_header(wirev, &v2, stubMsg.BufferLength - 32); - ok(*wirev == 0xcccccccc, "wv[13] %08x\n", *wirev); /* pad for VT_R8 */ + ok(*wirev == 0xcccccccc, "wv[13] %08lx\n", *wirev); /* pad for VT_R8 */ wirev++; - ok(*(double*)wirev == V_R8(&v2), "wv[6] %08x wv[7] %08x\n", *wirev, *(wirev+1)); + ok(*(double*)wirev == V_R8(&v2), "wv[6] %08lx wv[7] %08lx\n", *wirev, *(wirev+1)); VariantInit(&v3); stubMsg.Buffer = buffer; next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v3); @@ -1607,36 +1607,36 @@ static void test_marshal_VARIANT(void) V_UNKNOWN(&v) = &heap_unknown->IUnknown_iface;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength > 40, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength > 40, "size %ld\n", stubMsg.BufferLength); buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; memset(buffer, 0xcc, stubMsg.BufferLength); next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); todo_wine - ok(heap_unknown->refs == 2, "got refcount %d\n", heap_unknown->refs); + ok(heap_unknown->refs == 2, "got refcount %ld\n", heap_unknown->refs); wirev = (DWORD*)buffer; wirev = check_variant_header(wirev, &v, next - buffer);
ok(*wirev == (DWORD_PTR)V_UNKNOWN(&v) /* Win9x */ || - *wirev == (DWORD_PTR)V_UNKNOWN(&v) + 1 /* NT */, "wv[5] %08x\n", *wirev); + *wirev == (DWORD_PTR)V_UNKNOWN(&v) + 1 /* NT */, "wv[5] %08lx\n", *wirev); wirev++; - ok(*wirev == next - buffer - 0x20, "wv[6] %08x\n", *wirev); + ok(*wirev == next - buffer - 0x20, "wv[6] %08lx\n", *wirev); wirev++; - ok(*wirev == next - buffer - 0x20, "wv[7] %08x\n", *wirev); + ok(*wirev == next - buffer - 0x20, "wv[7] %08lx\n", *wirev); wirev++; - ok(*wirev == 0x574f454d, "wv[8] %08x\n", *wirev); + ok(*wirev == 0x574f454d, "wv[8] %08lx\n", *wirev); VariantInit(&v3); V_VT(&v3) = VT_UNKNOWN; V_UNKNOWN(&v3) = &heap_unknown->IUnknown_iface; IUnknown_AddRef(V_UNKNOWN(&v3)); stubMsg.Buffer = buffer; todo_wine - ok(heap_unknown->refs == 3, "got refcount %d\n", heap_unknown->refs); + ok(heap_unknown->refs == 3, "got refcount %ld\n", heap_unknown->refs); next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v3); ok(V_VT(&v) == V_VT(&v3), "got vt %d expect %d\n", V_VT(&v), V_VT(&v3)); ok(V_UNKNOWN(&v) == V_UNKNOWN(&v3), "got %p expect %p\n", V_UNKNOWN(&v), V_UNKNOWN(&v3)); VARIANT_UserFree(&umcb.Flags, &v3); - ok(heap_unknown->refs == 1, "%d refcounts of IUnknown leaked\n", heap_unknown->refs - 1); + ok(heap_unknown->refs == 1, "%ld refcounts of IUnknown leaked\n", heap_unknown->refs - 1); IUnknown_Release(&heap_unknown->IUnknown_iface); HeapFree(GetProcessHeap(), 0, oldbuffer);
@@ -1646,14 +1646,14 @@ static void test_marshal_VARIANT(void) V_UNKNOWN(&v) = NULL;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength >= 24, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength >= 24, "size %ld\n", stubMsg.BufferLength); buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; memset(buffer, 0xcc, stubMsg.BufferLength); next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); wirev = (DWORD*)buffer; wirev = check_variant_header(wirev, &v, next - buffer); - ok(*wirev == 0, "wv[5] %08x\n", *wirev); + ok(*wirev == 0, "wv[5] %08lx\n", *wirev);
VariantInit(&v2); stubMsg.Buffer = buffer; @@ -1673,27 +1673,27 @@ static void test_marshal_VARIANT(void) V_UNKNOWNREF(&v) = (IUnknown **)&heap_unknown;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength >= 44, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength >= 44, "size %ld\n", stubMsg.BufferLength); buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; memset(buffer, 0xcc, stubMsg.BufferLength); - ok(heap_unknown->refs == 1, "got refcount %d\n", heap_unknown->refs); + ok(heap_unknown->refs == 1, "got refcount %ld\n", heap_unknown->refs); next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); todo_wine - ok(heap_unknown->refs == 2, "got refcount %d\n", heap_unknown->refs); + ok(heap_unknown->refs == 2, "got refcount %ld\n", heap_unknown->refs); wirev = (DWORD*)buffer; wirev = check_variant_header(wirev, &v, next - buffer);
- ok(*wirev == 4, "wv[5] %08x\n", *wirev); + ok(*wirev == 4, "wv[5] %08lx\n", *wirev); wirev++; ok(*wirev == (DWORD_PTR)heap_unknown /* Win9x, Win2000 */ || - *wirev == (DWORD_PTR)heap_unknown + 1 /* XP */, "wv[6] %08x\n", *wirev); + *wirev == (DWORD_PTR)heap_unknown + 1 /* XP */, "wv[6] %08lx\n", *wirev); wirev++; - ok(*wirev == next - buffer - 0x24, "wv[7] %08x\n", *wirev); + ok(*wirev == next - buffer - 0x24, "wv[7] %08lx\n", *wirev); wirev++; - ok(*wirev == next - buffer - 0x24, "wv[8] %08x\n", *wirev); + ok(*wirev == next - buffer - 0x24, "wv[8] %08lx\n", *wirev); wirev++; - ok(*wirev == 0x574f454d, "wv[9] %08x\n", *wirev); + ok(*wirev == 0x574f454d, "wv[9] %08lx\n", *wirev);
VariantInit(&v3); V_VT(&v3) = VT_UNKNOWN; @@ -1701,11 +1701,11 @@ static void test_marshal_VARIANT(void) IUnknown_AddRef(V_UNKNOWN(&v3)); stubMsg.Buffer = buffer; next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v3); - ok(heap_unknown->refs == 2, "got refcount %d\n", heap_unknown->refs); + ok(heap_unknown->refs == 2, "got refcount %ld\n", heap_unknown->refs); ok(V_VT(&v) == V_VT(&v3), "got vt %d expect %d\n", V_VT(&v), V_VT(&v3)); ok(*V_UNKNOWNREF(&v) == *V_UNKNOWNREF(&v3), "got %p expect %p\n", *V_UNKNOWNREF(&v), *V_UNKNOWNREF(&v3)); VARIANT_UserFree(&umcb.Flags, &v3); - ok(heap_unknown->refs == 1, "%d refcounts of IUnknown leaked\n", heap_unknown->refs - 1); + ok(heap_unknown->refs == 1, "%ld refcounts of IUnknown leaked\n", heap_unknown->refs - 1); IUnknown_Release(&heap_unknown->IUnknown_iface); HeapFree(GetProcessHeap(), 0, oldbuffer);
@@ -1715,7 +1715,7 @@ static void test_marshal_VARIANT(void) V_UNKNOWNREF(&v) = &unk;
rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength >= 28, "size %d\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength >= 28, "size %ld\n", stubMsg.BufferLength); buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; memset(buffer, 0xcc, stubMsg.BufferLength); @@ -1724,7 +1724,7 @@ static void test_marshal_VARIANT(void) wirev = (DWORD*)buffer; wirev = check_variant_header(wirev, &v, stubMsg.BufferLength);
- ok(*wirev == 4, "wv[5] %08x\n", *wirev); + ok(*wirev == 4, "wv[5] %08lx\n", *wirev);
VariantInit(&v2); stubMsg.Buffer = buffer; diff --git a/dlls/oleaut32/tests/varformat.c b/dlls/oleaut32/tests/varformat.c index 55190574ca9..d238ef7b049 100644 --- a/dlls/oleaut32/tests/varformat.c +++ b/dlls/oleaut32/tests/varformat.c @@ -40,7 +40,7 @@ #define FMT_NUMBER(vt,val) \ VariantInit(&v); V_VT(&v) = vt; val(&v) = 1; \ hres = VarFormatNumber(&v,2,0,0,0,0,&str); \ - ok(hres == S_OK, "VarFormatNumber (vt %d): returned %8x\n", vt, hres); \ + ok(hres == S_OK, "VarFormatNumber (vt %d): returned %8lx\n", vt, hres); \ if (hres == S_OK) { \ ok(str && wcscmp(str,szResult1) == 0, \ "VarFormatNumber (vt %d): string different\n", vt); \ @@ -78,7 +78,7 @@ static void test_VarFormatNumber(void) V_BSTR(&v) = SysAllocString(L"1");
hres = VarFormatNumber(&v,2,0,0,0,0,&str); - ok(hres == S_OK, "VarFormatNumber (bstr): returned %8x\n", hres); + ok(hres == S_OK, "VarFormatNumber (bstr): returned %8lx\n", hres); if (hres == S_OK) ok(str && wcscmp(str, szResult1) == 0, "VarFormatNumber (bstr): string different\n"); SysFreeString(V_BSTR(&v)); @@ -86,7 +86,7 @@ static void test_VarFormatNumber(void)
V_BSTR(&v) = SysAllocString(L"-1"); hres = VarFormatNumber(&v,2,0,-1,0,0,&str); - ok(hres == S_OK, "VarFormatNumber (bstr): returned %8x\n", hres); + ok(hres == S_OK, "VarFormatNumber (bstr): returned %8lx\n", hres); if (hres == S_OK) ok(str && wcscmp(str, L"(1.00)") == 0, "VarFormatNumber (-bstr): string different\n"); SysFreeString(V_BSTR(&v)); @@ -384,21 +384,21 @@ static void test_VarFormat(void) /* 'out' is not cleared */ out = (BSTR)0x1; hres = VarFormat(&in,NULL,fd,fw,flags,&out); /* Would crash if out is cleared */ - ok(hres == S_OK, "got %08x\n", hres); + ok(hres == S_OK, "got %08lx\n", hres); SysFreeString(out); out = NULL;
/* VT_NULL */ V_VT(&in) = VT_NULL; hres = VarFormat(&in,NULL,fd,fw,0,&out); - ok(hres == S_OK, "VarFormat failed with 0x%08x\n", hres); + ok(hres == S_OK, "VarFormat failed with 0x%08lx\n", hres); ok(out == NULL, "expected NULL formatted string\n");
/* Invalid args */ hres = VarFormat(&in,NULL,fd,fw,flags,NULL); - ok(hres == E_INVALIDARG, "Null out: expected E_INVALIDARG, got 0x%08x\n", hres); + ok(hres == E_INVALIDARG, "Null out: expected E_INVALIDARG, got 0x%08lx\n", hres); hres = VarFormat(NULL,NULL,fd,fw,flags,&out); - ok(hres == E_INVALIDARG, "Null in: expected E_INVALIDARG, got 0x%08x\n", hres); + ok(hres == E_INVALIDARG, "Null in: expected E_INVALIDARG, got 0x%08lx\n", hres); fd = -1; VARFMT(VT_BOOL,V_BOOL,VARIANT_TRUE,"",E_INVALIDARG,""); fd = 8; @@ -480,7 +480,7 @@ static void test_VarWeekdayName(void)
hres = VarWeekdayName(1, 0, 0, 0, NULL); ok(E_INVALIDARG == hres, - "Null pointer: expected E_INVALIDARG, got 0x%08x\n", hres); + "Null pointer: expected E_INVALIDARG, got 0x%08lx\n", hres);
/* Check all combinations */ for (iWeekday = 1; iWeekday <= 7; ++iWeekday) @@ -532,17 +532,17 @@ static void test_VarFormatFromTokens(void)
lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); hres = VarTokenizeFormatString(number_fmt, buff, sizeof(buff), 1, 1, lcid, NULL); - ok(hres == S_OK, "VarTokenizeFormatString failed: %x\n", hres); + ok(hres == S_OK, "VarTokenizeFormatString failed: %lx\n", hres); hres = VarFormatFromTokens(&var, number_fmt, buff, 0, &bstr, lcid); - ok(hres == S_OK, "VarFormatFromTokens failed: %x\n", hres); + ok(hres == S_OK, "VarFormatFromTokens failed: %lx\n", hres); ok(!wcscmp(bstr, L"690.00"), "incorrectly formatted number: %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr);
lcid = MAKELCID(MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN), SORT_DEFAULT); hres = VarTokenizeFormatString(number_fmt, buff, sizeof(buff), 1, 1, lcid, NULL); - ok(hres == S_OK, "VarTokenizeFormatString failed: %x\n", hres); + ok(hres == S_OK, "VarTokenizeFormatString failed: %lx\n", hres); hres = VarFormatFromTokens(&var, number_fmt, buff, 0, &bstr, lcid); - ok(hres == S_OK, "VarFormatFromTokens failed: %x\n", hres); + ok(hres == S_OK, "VarFormatFromTokens failed: %lx\n", hres); ok(!wcscmp(bstr, L"6,90"), "incorrectly formatted number: %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr);
@@ -553,17 +553,17 @@ static void test_VarFormatFromTokens(void)
lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); hres = VarTokenizeFormatString(date_fmt, buff, sizeof(buff), 1, 1, lcid, NULL); - ok(hres == S_OK, "VarTokenizeFormatString failed: %x\n", hres); + ok(hres == S_OK, "VarTokenizeFormatString failed: %lx\n", hres); hres = VarFormatFromTokens(&var, date_fmt, buff, 0, &bstr, lcid); - ok(hres == S_OK, "VarFormatFromTokens failed: %x\n", hres); + ok(hres == S_OK, "VarFormatFromTokens failed: %lx\n", hres); ok(!wcscmp(bstr, L"11-12"), "incorrectly formatted date: %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr);
lcid = MAKELCID(MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN), SORT_DEFAULT); hres = VarTokenizeFormatString(date_fmt, buff, sizeof(buff), 1, 1, lcid, NULL); - ok(hres == S_OK, "VarTokenizeFormatString failed: %x\n", hres); + ok(hres == S_OK, "VarTokenizeFormatString failed: %lx\n", hres); hres = VarFormatFromTokens(&var, date_fmt, buff, 0, &bstr, lcid); - ok(hres == S_OK, "VarFormatFromTokens failed: %x\n", hres); + ok(hres == S_OK, "VarFormatFromTokens failed: %lx\n", hres); ok(!wcscmp(bstr, L"12-11"), "incorrectly formatted date: %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr);
@@ -574,17 +574,17 @@ static void test_VarFormatFromTokens(void)
lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); hres = VarTokenizeFormatString(string_fmt, buff, sizeof(buff), 1, 1, lcid, NULL); - ok(hres == S_OK, "VarTokenizeFormatString failed: %x\n", hres); + ok(hres == S_OK, "VarTokenizeFormatString failed: %lx\n", hres); hres = VarFormatFromTokens(&var, string_fmt, buff, 0, &bstr, lcid); - ok(hres == S_OK, "VarFormatFromTokens failed: %x\n", hres); + ok(hres == S_OK, "VarFormatFromTokens failed: %lx\n", hres); ok(!wcscmp(bstr, L"1.5"), "incorrectly formatted string: %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr);
lcid = MAKELCID(MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN), SORT_DEFAULT); hres = VarTokenizeFormatString(string_fmt, buff, sizeof(buff), 1, 1, lcid, NULL); - ok(hres == S_OK, "VarTokenizeFormatString failed: %x\n", hres); + ok(hres == S_OK, "VarTokenizeFormatString failed: %lx\n", hres); hres = VarFormatFromTokens(&var, string_fmt, buff, 0, &bstr, lcid); - ok(hres == S_OK, "VarFormatFromTokens failed: %x\n", hres); + ok(hres == S_OK, "VarFormatFromTokens failed: %lx\n", hres); ok(!wcscmp(bstr, L"1,5"), "incorrectly formatted string: %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); } @@ -596,32 +596,32 @@ static void test_GetAltMonthNames(void)
str = (void *)0xdeadbeef; hr = GetAltMonthNames(0, &str); - ok(hr == S_OK, "Unexpected return value %08x\n", hr); + ok(hr == S_OK, "Unexpected return value %08lx\n", hr); ok(str == NULL, "Got %p\n", str);
str = (void *)0xdeadbeef; hr = GetAltMonthNames(MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT), &str); - ok(hr == S_OK, "Unexpected return value %08x\n", hr); + ok(hr == S_OK, "Unexpected return value %08lx\n", hr); ok(str == NULL, "Got %p\n", str);
str = NULL; hr = GetAltMonthNames(MAKELCID(MAKELANGID(LANG_ARABIC, SUBLANG_ARABIC_EGYPT), SORT_DEFAULT), &str); - ok(hr == S_OK, "Unexpected return value %08x\n", hr); + ok(hr == S_OK, "Unexpected return value %08lx\n", hr); ok(str != NULL, "Got %p\n", str);
str2 = NULL; hr = GetAltMonthNames(MAKELCID(MAKELANGID(LANG_ARABIC, SUBLANG_ARABIC_EGYPT), SORT_DEFAULT), &str2); - ok(hr == S_OK, "Unexpected return value %08x\n", hr); + ok(hr == S_OK, "Unexpected return value %08lx\n", hr); ok(str2 == str, "Got %p\n", str2);
str = NULL; hr = GetAltMonthNames(MAKELCID(MAKELANGID(LANG_RUSSIAN, SUBLANG_DEFAULT), SORT_DEFAULT), &str); - ok(hr == S_OK, "Unexpected return value %08x\n", hr); + ok(hr == S_OK, "Unexpected return value %08lx\n", hr); ok(str != NULL, "Got %p\n", str);
str = NULL; hr = GetAltMonthNames(MAKELCID(MAKELANGID(LANG_POLISH, SUBLANG_DEFAULT), SORT_DEFAULT), &str); - ok(hr == S_OK, "Unexpected return value %08x\n", hr); + ok(hr == S_OK, "Unexpected return value %08lx\n", hr); ok(str != NULL, "Got %p\n", str); }
@@ -634,19 +634,19 @@ static void test_VarFormatCurrency(void) V_CY(&in).int64 = 0; V_VT(&in) = VT_CY; hr = VarFormatCurrency(&in, 3, -2, -2, -2, 0, &str); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
V_VT(&in) = VT_BSTR; V_BSTR(&in) = str; hr = VarFormatCurrency(&in, 1, -2, -2, -2, 0, &str2); - ok(hr == S_OK, "Unexpected hr %#x for %s\n", hr, wine_dbgstr_w(str)); + ok(hr == S_OK, "Unexpected hr %#lx for %s\n", hr, wine_dbgstr_w(str)); ok(lstrcmpW(str, str2), "Expected different string.\n"); SysFreeString(str2);
V_VT(&in) = VT_BSTR | VT_BYREF; V_BSTRREF(&in) = &str; hr = VarFormatCurrency(&in, 1, -2, -2, -2, 0, &str2); - ok(hr == S_OK, "Unexpected hr %#x for %s\n", hr, wine_dbgstr_w(str)); + ok(hr == S_OK, "Unexpected hr %#lx for %s\n", hr, wine_dbgstr_w(str)); ok(lstrcmpW(str, str2), "Expected different string.\n");
SysFreeString(str); @@ -655,7 +655,7 @@ static void test_VarFormatCurrency(void) V_VT(&in) = VT_BSTR; V_BSTR(&in) = SysAllocString(L"test"); hr = VarFormatCurrency(&in, 1, -2, -2, -2, 0, &str2); - ok(hr == DISP_E_TYPEMISMATCH, "Unexpected hr %#x.\n", hr); + ok(hr == DISP_E_TYPEMISMATCH, "Unexpected hr %#lx.\n", hr); VariantClear(&in); }
diff --git a/dlls/oleaut32/tests/vartest.c b/dlls/oleaut32/tests/vartest.c index f25a448645c..bdbb7e4414f 100644 --- a/dlls/oleaut32/tests/vartest.c +++ b/dlls/oleaut32/tests/vartest.c @@ -193,7 +193,7 @@ static HRESULT WINAPI DummyDispatch_Invoke(IDispatch *iface,
CHECK_EXPECT(dispatch_invoke);
- ok(dispid == DISPID_VALUE, "got dispid %d\n", dispid); + ok(dispid == DISPID_VALUE, "got dispid %ld\n", dispid); ok(IsEqualIID(riid, &IID_NULL), "go riid %s\n", wine_dbgstr_guid(riid)); ok(wFlags == DISPATCH_PROPERTYGET, "Flags wrong\n");
@@ -554,7 +554,7 @@ static const char *variantstr( const VARIANT *var ) case VT_I2: sprintf( vtstr_buffer[vtstr_current], "VT_I2(%d)", V_I2(var) ); break; case VT_I4: - sprintf( vtstr_buffer[vtstr_current], "VT_I4(%d)", V_I4(var) ); break; + sprintf( vtstr_buffer[vtstr_current], "VT_I4(%ld)", V_I4(var) ); break; case VT_INT: sprintf( vtstr_buffer[vtstr_current], "VT_INT(%d)", V_INT(var) ); break; case VT_I8: @@ -570,11 +570,11 @@ static const char *variantstr( const VARIANT *var ) case VT_UI2: sprintf( vtstr_buffer[vtstr_current], "VT_UI2(%u)", V_UI2(var) ); break; case VT_UI4: - sprintf( vtstr_buffer[vtstr_current], "VT_UI4(%u)", V_UI4(var) ); break; + sprintf( vtstr_buffer[vtstr_current], "VT_UI4(%lu)", V_UI4(var) ); break; case VT_UINT: sprintf( vtstr_buffer[vtstr_current], "VT_UINT(%d)", V_UINT(var) ); break; case VT_CY: - sprintf( vtstr_buffer[vtstr_current], "VT_CY(%x%08x)", S(V_CY(var)).Hi, S(V_CY(var)).Lo ); break; + sprintf( vtstr_buffer[vtstr_current], "VT_CY(%lx%08lx)", S(V_CY(var)).Hi, S(V_CY(var)).Lo ); break; case VT_DATE: sprintf( vtstr_buffer[vtstr_current], "VT_DATE(%g)", V_DATE(var) ); break; default: @@ -633,7 +633,7 @@ static void test_var_call1( int line, HRESULT (WINAPI *func)(LPVARIANT,LPVARIANT
memset( &result, 0, sizeof(result) ); hres = func( arg, &result ); - ok_(__FILE__,line)( hres == S_OK, "wrong result %x\n", hres ); + ok_(__FILE__,line)( hres == S_OK, "wrong result %lx\n", hres ); if (hres == S_OK) ok_(__FILE__,line)( is_expected_variant( &result, expected ), "got %s expected %s\n", variantstr(&result), variantstr(expected) ); @@ -651,7 +651,7 @@ static void test_var_call2( int line, HRESULT (WINAPI *func)(LPVARIANT,LPVARIANT
memset( &result, 0, sizeof(result) ); hres = func( left, right, &result ); - ok_(__FILE__,line)( hres == S_OK, "wrong result %x\n", hres ); + ok_(__FILE__,line)( hres == S_OK, "wrong result %lx\n", hres ); if (hres == S_OK) ok_(__FILE__,line)( is_expected_variant( &result, expected ), "got %s expected %s\n", variantstr(&result), variantstr(expected) ); @@ -785,7 +785,7 @@ static void test_VariantClear(void) V_UI4(&v) = ~0u; hres = VariantClear(&v); ok((hres == S_OK && V_VT(&v) == VT_EMPTY), - "VariantClear: Type set to %d, res %08x\n", V_VT(&v), hres); + "VariantClear: Type set to %d, res %08lx\n", V_VT(&v), hres); ok(V_UI4(&v) == ~0u, "VariantClear: Overwrote value\n");
/* Test all possible V_VT values. @@ -810,7 +810,7 @@ static void test_VariantClear(void) if (IsValidVariantClearVT(vt, ExtraFlags[i])) hExpected = S_OK;
- ok(hres == hExpected, "VariantClear: expected 0x%X, got 0x%X for vt %d | 0x%X\n", + ok(hres == hExpected, "VariantClear: expected 0x%lX, got 0x%lX for vt %d | 0x%X\n", hExpected, hres, vt, ExtraFlags[i]); } } @@ -824,11 +824,11 @@ static void test_VariantClear(void) V_VARIANTREF(&v) = &v2;
hres = VariantClear(&v); - ok(hres == S_OK, "ret %08x\n", hres); + ok(hres == S_OK, "ret %08lx\n", hres); ok(V_VT(&v) == 0, "vt %04x\n", V_VT(&v)); ok(V_VARIANTREF(&v) == &v2, "variant ref %p\n", V_VARIANTREF(&v2)); ok(V_VT(&v2) == VT_I4, "vt %04x\n", V_VT(&v2)); - ok(V_I4(&v2) == 0x1234, "i4 %04x\n", V_I4(&v2)); + ok(V_I4(&v2) == 0x1234, "i4 %04lx\n", V_I4(&v2));
/* I4 BYREF */ i4 = 0x4321; @@ -836,10 +836,10 @@ static void test_VariantClear(void) V_I4REF(&v) = &i4;
hres = VariantClear(&v); - ok(hres == S_OK, "ret %08x\n", hres); + ok(hres == S_OK, "ret %08lx\n", hres); ok(V_VT(&v) == 0, "vt %04x\n", V_VT(&v)); ok(V_I4REF(&v) == &i4, "i4 ref %p\n", V_I4REF(&v2)); - ok(i4 == 0x4321, "i4 changed %08x\n", i4); + ok(i4 == 0x4321, "i4 changed %08lx\n", i4);
/* UNKNOWN */ @@ -847,11 +847,11 @@ static void test_VariantClear(void) V_UNKNOWN(&v) = &test_myVariantClearImpl.IUnknown_iface; test_myVariantClearImpl.events = 0; hres = VariantClear(&v); - ok(hres == S_OK, "ret %08x\n", hres); + ok(hres == S_OK, "ret %08lx\n", hres); ok(V_VT(&v) == 0, "vt %04x\n", V_VT(&v)); ok(V_UNKNOWN(&v) == &test_myVariantClearImpl.IUnknown_iface, "unknown %p\n", V_UNKNOWN(&v)); /* Check that Release got called, but nothing else */ - ok(test_myVariantClearImpl.events == 0x4, "Unexpected call. events %08x\n", test_myVariantClearImpl.events); + ok(test_myVariantClearImpl.events == 0x4, "Unexpected call. events %08lx\n", test_myVariantClearImpl.events);
/* UNKNOWN BYREF */ punk = &test_myVariantClearImpl.IUnknown_iface; @@ -859,23 +859,23 @@ static void test_VariantClear(void) V_UNKNOWNREF(&v) = &punk; test_myVariantClearImpl.events = 0; hres = VariantClear(&v); - ok(hres == S_OK, "ret %08x\n", hres); + ok(hres == S_OK, "ret %08lx\n", hres); ok(V_VT(&v) == 0, "vt %04x\n", V_VT(&v)); ok(V_UNKNOWNREF(&v) == &punk, "unknown ref %p\n", V_UNKNOWNREF(&v)); /* Check that nothing got called */ - ok(test_myVariantClearImpl.events == 0, "Unexpected call. events %08x\n", test_myVariantClearImpl.events); + ok(test_myVariantClearImpl.events == 0, "Unexpected call. events %08lx\n", test_myVariantClearImpl.events);
/* DISPATCH */ V_VT(&v) = VT_DISPATCH; V_DISPATCH(&v) = (IDispatch*)&test_myVariantClearImpl.IUnknown_iface; test_myVariantClearImpl.events = 0; hres = VariantClear(&v); - ok(hres == S_OK, "ret %08x\n", hres); + ok(hres == S_OK, "ret %08lx\n", hres); ok(V_VT(&v) == 0, "vt %04x\n", V_VT(&v)); ok(V_DISPATCH(&v) == (IDispatch*)&test_myVariantClearImpl.IUnknown_iface, "dispatch %p\n", V_DISPATCH(&v)); /* Check that Release got called, but nothing else */ - ok(test_myVariantClearImpl.events == 0x4, "Unexpected call. events %08x\n", test_myVariantClearImpl.events); + ok(test_myVariantClearImpl.events == 0x4, "Unexpected call. events %08lx\n", test_myVariantClearImpl.events);
/* DISPATCH BYREF */ punk = &test_myVariantClearImpl.IUnknown_iface; @@ -883,11 +883,11 @@ static void test_VariantClear(void) V_DISPATCHREF(&v) = (IDispatch**)&punk; test_myVariantClearImpl.events = 0; hres = VariantClear(&v); - ok(hres == S_OK, "ret %08x\n", hres); + ok(hres == S_OK, "ret %08lx\n", hres); ok(V_VT(&v) == 0, "vt %04x\n", V_VT(&v)); ok(V_DISPATCHREF(&v) == (IDispatch**)&punk, "dispatch ref %p\n", V_DISPATCHREF(&v)); /* Check that nothing got called */ - ok(test_myVariantClearImpl.events == 0, "Unexpected call. events %08x\n", test_myVariantClearImpl.events); + ok(test_myVariantClearImpl.events == 0, "Unexpected call. events %08lx\n", test_myVariantClearImpl.events);
/* RECORD */ recinfo = get_test_recordinfo(); @@ -899,10 +899,10 @@ static void test_VariantClear(void) recinfo->ref = 2; recinfo->rec = rec; hres = VariantClear(&v); - ok(hres == S_OK, "ret %08x\n", hres); + ok(hres == S_OK, "ret %08lx\n", hres); ok(rec->pvRecord == NULL, "got %p\n", rec->pvRecord); ok(recinfo->recordclear == 1, "got %d\n", recinfo->recordclear); - ok(recinfo->ref == 1, "got %d\n", recinfo->ref); + ok(recinfo->ref == 1, "got %ld\n", recinfo->ref); IRecordInfo_Release(&recinfo->IRecordInfo_iface); }
@@ -938,7 +938,7 @@ static void test_VariantCopy(void) hres = VariantCopy(&vSrc, &vSrc);
ok(hres == hExpected, - "Copy(src==dst): expected 0x%X, got 0x%X for src==dest vt %d|0x%X\n", + "Copy(src==dst): expected 0x%lX, got 0x%lX for src==dest vt %d|0x%X\n", hExpected, hres, vt, ExtraFlags[i]); } } @@ -966,7 +966,7 @@ static void test_VariantCopy(void) hres = VariantCopy(&vDst, &vSrc);
ok(hres == hExpected, - "Copy(bad dst): expected 0x%X, got 0x%X for dest vt %d|0x%X\n", + "Copy(bad dst): expected 0x%lX, got 0x%lX for dest vt %d|0x%X\n", hExpected, hres, vt, ExtraFlags[i]); if (hres == S_OK) ok(V_VT(&vDst) == VT_UI1, @@ -996,7 +996,7 @@ static void test_VariantCopy(void) hres = VariantCopy(&vDst, &vSrc);
ok(hres == hExpected, - "Copy(bad src): expected 0x%X, got 0x%X for src vt %d|0x%X\n", + "Copy(bad src): expected 0x%lX, got 0x%lX for src vt %d|0x%X\n", hExpected, hres, vt, ExtraFlags[i]); if (hres == S_OK) { @@ -1042,7 +1042,7 @@ static void test_VariantCopy(void) recinfo->getsize = 0; recinfo->rec = rec; hres = VariantCopy(&vDst, &vSrc); - ok(hres == S_OK, "ret %08x\n", hres); + ok(hres == S_OK, "ret %08lx\n", hres);
rec = &V_UNION(&vDst, brecVal); ok(rec->pvRecord != (void*)0xdeadbeef && rec->pvRecord != NULL, "got %p\n", rec->pvRecord); @@ -1120,7 +1120,7 @@ static void test_VariantCopyInd(void) hres = VariantCopyInd(&vSrc, &vSrc);
ok(hres == hExpected, - "CopyInd(src==dst): expected 0x%X, got 0x%X for src==dst vt %d|0x%X\n", + "CopyInd(src==dst): expected 0x%lX, got 0x%lX for src==dst vt %d|0x%X\n", hExpected, hres, vt, ExtraFlags[i]); } } @@ -1147,7 +1147,7 @@ static void test_VariantCopyInd(void) hres = VariantCopyInd(&vDst, &vSrc);
ok(hres == hExpected, - "CopyInd(bad dst): expected 0x%X, got 0x%X for dst vt %d|0x%X\n", + "CopyInd(bad dst): expected 0x%lX, got 0x%lX for dst vt %d|0x%X\n", hExpected, hres, vt, ExtraFlags[i]); if (hres == S_OK) ok(V_VT(&vDst) == VT_UI1, @@ -1201,7 +1201,7 @@ static void test_VariantCopyInd(void) hres = VariantCopyInd(&vDst, &vSrc);
ok(hres == hExpected, - "CopyInd(bad src): expected 0x%X, got 0x%X for src vt %d|0x%X\n", + "CopyInd(bad src): expected 0x%lX, got 0x%lX for src vt %d|0x%X\n", hExpected, hres, vt, ExtraFlags[i]); if (hres == S_OK) { @@ -1235,7 +1235,7 @@ static void test_VariantCopyInd(void) VariantInit(&vDst);
hres = VariantCopyInd(&vDst, &vSrc); - ok(hres == S_OK, "VariantCopyInd failed: 0x%08x\n", hres); + ok(hres == S_OK, "VariantCopyInd failed: 0x%08lx\n", hres); ok(V_VT(&vDst) == VT_UI1 && V_UI1(&vDst) == 0x77, "CopyInd(deref): expected dst vt = VT_UI1, val 0x77, got %d|0x%X, 0x%2X\n", V_VT(&vDst) & VT_TYPEMASK, V_VT(&vDst) & ~VT_TYPEMASK, V_UI1(&vDst)); @@ -1248,7 +1248,7 @@ static void test_VariantCopyInd(void) VariantInit(&vDst);
hres = VariantCopyInd(&vDst, &vSrc); - ok(hres == S_OK, "VariantCopyInd failed: 0x%08x\n", hres); + ok(hres == S_OK, "VariantCopyInd failed: 0x%08lx\n", hres); ok(V_VT(&vDst) == VT_UI1 && V_UI1(&vDst) == 0x88, "CopyInd(deref): expected dst vt = VT_UI1, val 0x77, got %d|0x%X, 0x%2X\n", V_VT(&vDst) & VT_TYPEMASK, V_VT(&vDst) & ~VT_TYPEMASK, V_UI1(&vDst)); @@ -1264,7 +1264,7 @@ static void test_VariantCopyInd(void)
hres = VariantCopyInd(&vDst, &vSrc); ok(hres == E_INVALIDARG, - "CopyInd(ref->ref): expected E_INVALIDARG, got 0x%08x\n", hres); + "CopyInd(ref->ref): expected E_INVALIDARG, got 0x%08lx\n", hres); }
static HRESULT (WINAPI *pVarParseNumFromStr)(const OLECHAR*,LCID,ULONG,NUMPARSE*,BYTE*); @@ -1293,12 +1293,12 @@ static HRESULT convert_str( const char *str, INT dig, ULONG flags, static void expect_NumFromStr( int line, HRESULT hres, NUMPARSE *np, INT a, ULONG b, ULONG c, INT d, INT e, INT f ) { - ok_(__FILE__,line)(hres == S_OK, "returned %08x\n", hres); + ok_(__FILE__,line)(hres == S_OK, "returned %08lx\n", hres); if (hres == S_OK) { ok_(__FILE__,line)(np->cDig == a, "Expected cDig = %d, got %d\n", a, np->cDig); - ok_(__FILE__,line)(np->dwInFlags == b, "Expected dwInFlags = 0x%x, got 0x%x\n", b, np->dwInFlags); - ok_(__FILE__,line)(np->dwOutFlags == c, "Expected dwOutFlags = 0x%x, got 0x%x\n", c, np->dwOutFlags); + ok_(__FILE__,line)(np->dwInFlags == b, "Expected dwInFlags = 0x%lx, got 0x%lx\n", b, np->dwInFlags); + ok_(__FILE__,line)(np->dwOutFlags == c, "Expected dwOutFlags = 0x%lx, got 0x%lx\n", c, np->dwOutFlags); ok_(__FILE__,line)(np->cchUsed == d, "Expected cchUsed = %d, got %d\n", d, np->cchUsed); ok_(__FILE__,line)(np->nBaseShift == e, "Expected nBaseShift = %d, got %d\n", e, np->nBaseShift); ok_(__FILE__,line)(np->nPwr10 == f, "Expected nPwr10 = %d, got %d\n", f, np->nPwr10); @@ -1311,7 +1311,7 @@ static void expect_NumFromStr( int line, HRESULT hres, NUMPARSE *np, INT a, ULON #define CONVERT(str,flags) CONVERTN(str,sizeof(rgb),flags) #define EXPECT(a,b,c,d,e,f) expect_NumFromStr( __LINE__, hres, &np, a, b, c, d, e, f ) #define EXPECTRGB(a,b) ok(rgb[a] == b, "Digit[%d], expected %d, got %d\n", a, b, rgb[a]) -#define EXPECTFAIL ok(hres == DISP_E_TYPEMISMATCH, "Call succeeded, hres = %08x\n", hres) +#define EXPECTFAIL ok(hres == DISP_E_TYPEMISMATCH, "Call succeeded, hres = %08lx\n", hres) #define EXPECT2(a,b) EXPECTRGB(0,a); EXPECTRGB(1,b)
static void test_VarParseNumFromStrEn(void) @@ -2413,7 +2413,7 @@ static void test_VarParseNumFromStrMisc(void) lcid = MAKELCID(MAKELANGID(LANG_FRENCH,SUBLANG_FRENCH_SWISS),SORT_DEFAULT); WCONVERT(L"3CHF", NUMPRS_CURRENCY|NUMPRS_USE_ALL); /* Windows <= 8.1 uses an old currency symbol: "fr. 5" */ - todo_wine ok(hres == S_OK || broken(hres == DISP_E_TYPEMISMATCH), "returned %08x\n", hres); + todo_wine ok(hres == S_OK || broken(hres == DISP_E_TYPEMISMATCH), "returned %08lx\n", hres); if (hres == S_OK) { todo_wine EXPECT(1,NUMPRS_CURRENCY|NUMPRS_USE_ALL,NUMPRS_CURRENCY,4,0,0); @@ -2426,7 +2426,7 @@ static void test_VarParseNumFromStrMisc(void) /* Windows 8.1 incorrectly doubles the right-to-left mark: * "\x62f.\x645.\x200f\x200f 5" */ - ok(hres == S_OK || broken(hres == DISP_E_TYPEMISMATCH), "returned %08x\n", hres); + ok(hres == S_OK || broken(hres == DISP_E_TYPEMISMATCH), "returned %08lx\n", hres); if (hres == S_OK) { EXPECT(1,NUMPRS_CURRENCY|NUMPRS_USE_ALL,NUMPRS_CURRENCY,6,0,0); @@ -2464,11 +2464,11 @@ static const char *szFailOk = "Call failed, hres = %08x\n"; #define EXPECT_UI2(val) EXPECT_OK { EXPECT_TYPE(VT_UI2); \ ok(V_UI2(&vOut) == val, "Expected ui2 = %d, got %d\n", (USHORT)val, V_UI2(&vOut)); } #define EXPECT_I4(val) EXPECT_OK { EXPECT_TYPE(VT_I4); \ - ok(V_I4(&vOut) == val, "Expected i4 = %d, got %d\n", (LONG)val, V_I4(&vOut)); } + ok(V_I4(&vOut) == val, "Expected i4 = %ld, got %ld\n", (LONG)val, V_I4(&vOut)); } #define EXPECT_UI4(val) EXPECT_OK { EXPECT_TYPE(VT_UI4); \ ok(V_UI4(&vOut) == val, "Expected ui4 = %d, got %d\n", (ULONG)val, V_UI4(&vOut)); } #define EXPECT_I8(high,low) EXPECT_OK { EXPECT_TYPE(VT_I8); \ - ok(V_I8(&vOut) == ((((ULONG64)(high))<<32)|(low)), "Expected i8 = %x%08x, got %x%08x\n", \ + ok(V_I8(&vOut) == ((((ULONG64)(high))<<32)|(low)), "Expected i8 = %lx%08lx, got %lx%08lx\n", \ (LONG)(high), (LONG)(low), (LONG)(V_I8(&vOut)>>32), (LONG)V_I8(&vOut) ); } #define EXPECT_UI8(val) EXPECT_OK { EXPECT_TYPE(VT_UI8); \ ok(V_UI8(&vOut) == val, "Expected ui8 = 0x%x%08x, got 0x%x%08x\n", \ @@ -2479,12 +2479,12 @@ static const char *szFailOk = "Call failed, hres = %08x\n"; ok(V_R8(&vOut) == val, "Expected r8 = %g, got %g\n", val, V_R8(&vOut)); } #define CY_MULTIPLIER 10000 #define EXPECT_CY(val) EXPECT_OK { EXPECT_TYPE(VT_CY); \ - ok(V_CY(&vOut).int64 == (LONG64)(val * CY_MULTIPLIER), "Expected r8 = 0x%x%08x, got 0x%x%08x\n", \ + ok(V_CY(&vOut).int64 == (LONG64)(val * CY_MULTIPLIER), "Expected r8 = 0x%lx%08lx, got 0x%lx%08lx\n", \ (DWORD)((LONG64)val >> 23), (DWORD)(LONG64)val, (DWORD)(V_CY(&vOut).int64 >>32), (DWORD)V_CY(&vOut).int64); } #define EXPECT_DECIMAL(valHi, valMid, valLo) EXPECT_OK { EXPECT_TYPE(VT_DECIMAL); \ ok((V_DECIMAL(&vOut).Hi32 == valHi) && (S1(U1(V_DECIMAL(&vOut))).Mid32 == valMid) && \ (S1(U1(V_DECIMAL(&vOut))).Lo32 == valLo), \ - "Expected decimal = %x/0x%x%08x, got %x/0x%x%08x\n", valHi, valMid, valLo, \ + "Expected decimal = %x/0x%x%08x, got %lx/0x%lx%08lx\n", valHi, valMid, valLo, \ V_DECIMAL(&vOut).Hi32, S1(U1(V_DECIMAL(&vOut))).Mid32, S1(U1(V_DECIMAL(&vOut))).Lo32); }
static void test_VarNumFromParseNum(void) @@ -2671,7 +2671,7 @@ static void test_UdateFromDate( int line, DATE dt, ULONG flags, HRESULT r, WORD ok_(__FILE__,line)(r == res && (res != S_OK || (ud.st.wYear == y && ud.st.wMonth == m && ud.st.wDay == d && ud.st.wHour == h && ud.st.wMinute == mn && ud.st.wSecond == s && ud.st.wMilliseconds == ms && ud.st.wDayOfWeek == dw && ud.wDayOfYear == dy)), - "%.16g expected res(%x) %d,%d,%d,%d,%d,%d,%d %d %d, got res(%x) %d,%d,%d,%d,%d,%d,%d %d %d\n", + "%.16g expected res(%lx) %d,%d,%d,%d,%d,%d,%d %d %d, got res(%lx) %d,%d,%d,%d,%d,%d,%d %d %d\n", dt, r, d, m, y, h, mn, s, ms, dw, dy, res, ud.st.wDay, ud.st.wMonth, ud.st.wYear, ud.st.wHour, ud.st.wMinute, ud.st.wSecond, ud.st.wMilliseconds, ud.st.wDayOfWeek, ud.wDayOfYear ); @@ -2730,7 +2730,7 @@ static void test_DateFromUDate( int line, WORD d, WORD m, WORD y, WORD h, WORD m ud.wDayOfYear = dy; res = pVarDateFromUdate(&ud, flags, &out); ok_(__FILE__,line)(r == res && (r != S_OK || EQ_DOUBLE(out, dt)), - "expected %x, %.16g, got %x, %.16g\n", r, dt, res, out); + "expected %lx, %.16g, got %lx, %.16g\n", r, dt, res, out); } #define UD2T(d,m,y,h,mn,s,ms,dw,dy,flags,r,dt) test_DateFromUDate(__LINE__,d,m,y,h,mn,s,ms,dw,dy,flags,r,dt)
@@ -3039,7 +3039,7 @@ static void test_VarAbs(void) if (vt == VT_I8 || vt == VT_UI8 || vt == VT_INT || vt == VT_UINT || vt == VT_I1 || vt == VT_UI2 || vt == VT_UI4) continue; - ok(hres == hExpected, "VarAbs: expected 0x%X, got 0x%X for vt %d | 0x%X\n", + ok(hres == hExpected, "VarAbs: expected 0x%lX, got 0x%lX for vt %d | 0x%X\n", hExpected, hres, vt, ExtraFlags[i]); } } @@ -3067,7 +3067,7 @@ static void test_VarAbs(void) memset(&vDst,0,sizeof(vDst)); hres = pVarAbs(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_CY && V_CY(&vDst).int64 == 10000, - "VarAbs(CY): expected 0x0 got 0x%X\n", hres); + "VarAbs(CY): expected 0x0 got 0x%lX\n", hres); GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, buff, ARRAY_SIZE(buff)); if (buff[1]) { @@ -3081,7 +3081,7 @@ static void test_VarAbs(void) memset(&vDst,0,sizeof(vDst)); hres = pVarAbs(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_R8 && V_R8(&vDst) == 1.1, - "VarAbs: expected 0x0,%d,%g, got 0x%X,%d,%g\n", VT_R8, 1.1, hres, V_VT(&vDst), V_R8(&vDst)); + "VarAbs: expected 0x0,%d,%g, got 0x%lX,%d,%g\n", VT_R8, 1.1, hres, V_VT(&vDst), V_R8(&vDst)); }
static HRESULT (WINAPI *pVarNot)(LPVARIANT,LPVARIANT); @@ -3146,7 +3146,7 @@ static void test_VarNot(void) }
hres = pVarNot(&v,&vDst); - ok(hres == hExpected, "VarNot: expected 0x%X, got 0x%X vt %d|0x%X\n", + ok(hres == hExpected, "VarNot: expected 0x%lX, got 0x%lX vt %d|0x%X\n", hExpected, hres, vt, ExtraFlags[i]); } } @@ -3366,8 +3366,8 @@ static void test_VarSub(void) hres = pVarSub(&left, &right, &result);
ok(hres == expectedhres && V_VT(&result) == resvt, - "VarSub: %d|0x%X, %d|0x%X: Expected failure 0x%X, " - "got 0x%X, expected vt %d got vt %d\n", + "VarSub: %d|0x%X, %d|0x%X: Expected failure 0x%lX, " + "got 0x%lX, expected vt %d got vt %d\n", leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], expectedhres, hres, resvt, V_VT(&result)); } @@ -3450,7 +3450,7 @@ static void test_Mod( int line, VARIANT *left, VARIANT *right, VARIANT *expected
memset( &result, 0, sizeof(result) ); hres = pVarMod( left, right, &result ); - ok_(__FILE__,line)( hres == expres, "wrong result %x/%x\n", hres, expres ); + ok_(__FILE__,line)( hres == expres, "wrong result %lx/%lx\n", hres, expres ); if (hres == S_OK) ok_(__FILE__,line)( is_expected_variant( &result, expected ), "got %s expected %s\n", variantstr(&result), variantstr(expected) ); @@ -3816,7 +3816,7 @@ static void test_VarMod(void) { hres = pVarMod(&v1,&v2,&vDst); ok(hres == hexpected, - "VarMod: expected 0x%x, got 0x%X for l type of %d, r type of %d,\n", hexpected, hres, l, r); + "VarMod: expected 0x%lx, got 0x%lX for l type of %d, r type of %d,\n", hexpected, hres, l, r); } } } @@ -3862,7 +3862,7 @@ static void test_VarMod(void) V_CY(&v2).int64 = 100000; hres = pVarMod(&v1,&v2,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_I4 && V_I4(&vDst) == 0, - "VarMod: expected 0x%x,%d,%d, got 0x%X,%d,%d\n", S_OK, VT_I4, 0, hres, V_VT(&vDst), V_I4(&vDst)); + "VarMod: expected 0x%lx,%d,%d, got 0x%lX,%d,%ld\n", S_OK, VT_I4, 0, hres, V_VT(&vDst), V_I4(&vDst));
V_VT(&v1) = VT_I4; V_VT(&v2) = VT_CY; @@ -3870,7 +3870,7 @@ static void test_VarMod(void) V_CY(&v2).int64 = 100000; hres = pVarMod(&v1,&v2,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_I4 && V_I4(&vDst) == 0, - "VarMod: expected 0x%x,%d,%d, got 0x%X,%d,%d\n", S_OK, VT_I4, 0, hres, V_VT(&vDst), V_I4(&vDst)); + "VarMod: expected 0x%lx,%d,%d, got 0x%lX,%d,%ld\n", S_OK, VT_I4, 0, hres, V_VT(&vDst), V_I4(&vDst));
/* some decimals */ V_VT(&v1) = VT_DECIMAL; @@ -3879,7 +3879,7 @@ static void test_VarMod(void) VarDecFromI4(10, &V_DECIMAL(&v2)); hres = pVarMod(&v1,&v2,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_I4 && V_I4(&vDst) == 0, - "VarMod: expected 0x%x,%d,%d, got 0x%X,%d,%d\n", S_OK, VT_I4, 0, hres, V_VT(&vDst), V_I4(&vDst)); + "VarMod: expected 0x%lx,%d,%d, got 0x%lX,%d,%ld\n", S_OK, VT_I4, 0, hres, V_VT(&vDst), V_I4(&vDst));
V_VT(&v1) = VT_I4; V_VT(&v2) = VT_DECIMAL; @@ -3887,7 +3887,7 @@ static void test_VarMod(void) VarDecFromI4(10, &V_DECIMAL(&v2)); hres = pVarMod(&v1,&v2,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_I4 && V_I4(&vDst) == 0, - "VarMod: expected 0x%x,%d,%d, got 0x%X,%d,%d\n", S_OK, VT_I4, 0, hres, V_VT(&vDst), V_I4(&vDst)); + "VarMod: expected 0x%lx,%d,%d, got 0x%lX,%d,%ld\n", S_OK, VT_I4, 0, hres, V_VT(&vDst), V_I4(&vDst));
VARMOD2(UINT,I4,100,10,I4,0,S_OK);
@@ -3900,7 +3900,7 @@ static void test_VarMod(void) V_I4(&vDst) = 1231; hres = pVarMod(&v1,&v2,&vDst); ok(hres == DISP_E_TYPEMISMATCH && V_VT(&vDst) == VT_EMPTY && V_I4(&vDst) == 1231, - "VarMod: expected 0x%x,%d,%d, got 0x%X,%d,%d\n", DISP_E_TYPEMISMATCH, VT_EMPTY, 1231, hres, V_VT(&vDst), V_I4(&vDst)); + "VarMod: expected 0x%lx,%d,%d, got 0x%lX,%d,%ld\n", DISP_E_TYPEMISMATCH, VT_EMPTY, 1231, hres, V_VT(&vDst), V_I4(&vDst));
/* test some invalid types */ @@ -3941,7 +3941,7 @@ static void test_VarMod(void) V_I4(&v2)= 10; hres = pVarMod(&v1,&v2,&vDst); ok(hres == DISP_E_BADVARTYPE && V_VT(&vDst) == VT_EMPTY, - "VarMod: expected 0x%x,%d, got 0x%X,%d\n", DISP_E_BADVARTYPE, VT_EMPTY, hres, V_VT(&vDst)); + "VarMod: expected 0x%lx,%d, got 0x%lX,%d\n", DISP_E_BADVARTYPE, VT_EMPTY, hres, V_VT(&vDst));
SysFreeString(strNum0); SysFreeString(strNum1); @@ -3996,10 +3996,10 @@ static void test_VarFix(void) hres = pVarFix(&v,&vDst); if (bFail) ok(hres == DISP_E_TYPEMISMATCH || hres == DISP_E_BADVARTYPE, - "VarFix: expected failure, got 0x%X vt %d|0x%X\n", + "VarFix: expected failure, got 0x%lX vt %d|0x%X\n", hres, vt, ExtraFlags[i]); else - ok(hres == S_OK, "VarFix: expected S_OK, got 0x%X vt %d|0x%X\n", + ok(hres == S_OK, "VarFix: expected S_OK, got 0x%lX vt %d|0x%X\n", hres, vt, ExtraFlags[i]); } } @@ -4028,13 +4028,13 @@ static void test_VarFix(void) V_VT(&v) = VT_EMPTY; hres = pVarFix(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_I2 && V_I2(&vDst) == 0, - "VarFix: expected 0x0,%d,0 got 0x%X,%d,%d\n", VT_EMPTY, + "VarFix: expected 0x0,%d,0 got 0x%lX,%d,%d\n", VT_EMPTY, hres, V_VT(&vDst), V_I2(&vDst));
V_VT(&v) = VT_NULL; hres = pVarFix(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_NULL, - "VarFix: expected 0x0,%d got 0x%X,%d\n", VT_NULL, hres, V_VT(&vDst)); + "VarFix: expected 0x0,%d got 0x%lX,%d\n", VT_NULL, hres, V_VT(&vDst));
V_VT(&v) = VT_DECIMAL; S(U(*pdec)).sign = DECIMAL_NEG; @@ -4044,7 +4044,7 @@ static void test_VarFix(void) S1(U1(*pdec)).Lo32 = 1; hres = pVarFix(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_DECIMAL && !memcmp(&V_DECIMAL(&v), &V_DECIMAL(&vDst), sizeof(DECIMAL)), - "VarFix: expected 0x0,%d,identical, got 0x%X,%d\n", VT_DECIMAL, + "VarFix: expected 0x0,%d,identical, got 0x%lX,%d\n", VT_DECIMAL, hres, V_VT(&vDst));
/* FIXME: Test some fractional decimals when VarDecFix is implemented */ @@ -4053,13 +4053,13 @@ static void test_VarFix(void) pcy->int64 = -10000; hres = pVarFix(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_CY && V_CY(&vDst).int64 == -10000, - "VarFix: VT_CY wrong, hres=0x%X\n", hres); + "VarFix: VT_CY wrong, hres=0x%lX\n", hres);
V_VT(&v) = VT_CY; pcy->int64 = -16000; hres = pVarFix(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_CY && V_CY(&vDst).int64 == -10000, - "VarFix: VT_CY wrong, hres=0x%X\n", hres); + "VarFix: VT_CY wrong, hres=0x%lX\n", hres); }
static HRESULT (WINAPI *pVarInt)(LPVARIANT,LPVARIANT); @@ -4111,10 +4111,10 @@ static void test_VarInt(void) hres = pVarInt(&v,&vDst); if (bFail) ok(hres == DISP_E_TYPEMISMATCH || hres == DISP_E_BADVARTYPE, - "VarInt: expected failure, got 0x%X vt %d|0x%X\n", + "VarInt: expected failure, got 0x%lX vt %d|0x%X\n", hres, vt, ExtraFlags[i]); else - ok(hres == S_OK, "VarInt: expected S_OK, got 0x%X vt %d|0x%X\n", + ok(hres == S_OK, "VarInt: expected S_OK, got 0x%lX vt %d|0x%X\n", hres, vt, ExtraFlags[i]); } } @@ -4143,13 +4143,13 @@ static void test_VarInt(void) V_VT(&v) = VT_EMPTY; hres = pVarInt(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_I2 && V_I2(&vDst) == 0, - "VarInt: expected 0x0,%d,0 got 0x%X,%d,%d\n", VT_EMPTY, + "VarInt: expected 0x0,%d,0 got 0x%lX,%d,%d\n", VT_EMPTY, hres, V_VT(&vDst), V_I2(&vDst));
V_VT(&v) = VT_NULL; hres = pVarInt(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_NULL, - "VarInt: expected 0x0,%d got 0x%X,%d\n", VT_NULL, hres, V_VT(&vDst)); + "VarInt: expected 0x0,%d got 0x%lX,%d\n", VT_NULL, hres, V_VT(&vDst));
V_VT(&v) = VT_DECIMAL; S(U(*pdec)).sign = DECIMAL_NEG; @@ -4159,7 +4159,7 @@ static void test_VarInt(void) S1(U1(*pdec)).Lo32 = 1; hres = pVarInt(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_DECIMAL && !memcmp(&V_DECIMAL(&v), &V_DECIMAL(&vDst), sizeof(DECIMAL)), - "VarInt: expected 0x0,%d,identical, got 0x%X,%d\n", VT_DECIMAL, + "VarInt: expected 0x0,%d,identical, got 0x%lX,%d\n", VT_DECIMAL, hres, V_VT(&vDst));
/* FIXME: Test some fractional decimals when VarDecInt is implemented */ @@ -4168,13 +4168,13 @@ static void test_VarInt(void) pcy->int64 = -10000; hres = pVarInt(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_CY && V_CY(&vDst).int64 == -10000, - "VarInt: VT_CY wrong, hres=0x%X\n", hres); + "VarInt: VT_CY wrong, hres=0x%lX\n", hres);
V_VT(&v) = VT_CY; pcy->int64 = -11000; hres = pVarInt(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_CY && V_CY(&vDst).int64 == -20000, - "VarInt: VT_CY wrong, hres=0x%X 0x%x%08x\n", + "VarInt: VT_CY wrong, hres=0x%lX 0x%lx%08lx\n", hres, (DWORD)(V_CY(&vDst).int64 >> 32), (DWORD)V_CY(&vDst).int64); }
@@ -4232,10 +4232,10 @@ static void test_VarNeg(void) hres = pVarNeg(&v,&vDst); if (bFail) ok(hres == DISP_E_TYPEMISMATCH || hres == DISP_E_BADVARTYPE, - "VarNeg: expected failure, got 0x%X vt %d|0x%X\n", + "VarNeg: expected failure, got 0x%lX vt %d|0x%X\n", hres, vt, ExtraFlags[i]); else - ok(hres == S_OK, "VarNeg: expected S_OK, got 0x%X vt %d|0x%X\n", + ok(hres == S_OK, "VarNeg: expected S_OK, got 0x%lX vt %d|0x%X\n", hres, vt, ExtraFlags[i]); } } @@ -4268,13 +4268,13 @@ static void test_VarNeg(void) V_VT(&v) = VT_EMPTY; hres = pVarNeg(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_I2 && V_I2(&vDst) == 0, - "VarNeg: expected 0x0,%d,0 got 0x%X,%d,%d\n", VT_EMPTY, + "VarNeg: expected 0x0,%d,0 got 0x%lX,%d,%d\n", VT_EMPTY, hres, V_VT(&vDst), V_I2(&vDst));
V_VT(&v) = VT_NULL; hres = pVarNeg(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_NULL, - "VarNeg: expected 0x0,%d got 0x%X,%d\n", VT_NULL, hres, V_VT(&vDst)); + "VarNeg: expected 0x0,%d got 0x%lX,%d\n", VT_NULL, hres, V_VT(&vDst));
V_VT(&v) = VT_DECIMAL; S(U(*pdec)).sign = DECIMAL_NEG; @@ -4285,21 +4285,21 @@ static void test_VarNeg(void) hres = pVarNeg(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_DECIMAL && S(U(V_DECIMAL(&vDst))).sign == 0, - "VarNeg: expected 0x0,%d,0x00, got 0x%X,%d,%02x\n", VT_DECIMAL, + "VarNeg: expected 0x0,%d,0x00, got 0x%lX,%d,%02x\n", VT_DECIMAL, hres, V_VT(&vDst), S(U(V_DECIMAL(&vDst))).sign);
S(U(*pdec)).sign = 0; hres = pVarNeg(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_DECIMAL && S(U(V_DECIMAL(&vDst))).sign == DECIMAL_NEG, - "VarNeg: expected 0x0,%d,0x7f, got 0x%X,%d,%02x\n", VT_DECIMAL, + "VarNeg: expected 0x0,%d,0x7f, got 0x%lX,%d,%02x\n", VT_DECIMAL, hres, V_VT(&vDst), S(U(V_DECIMAL(&vDst))).sign);
V_VT(&v) = VT_CY; pcy->int64 = -10000; hres = pVarNeg(&v,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_CY && V_CY(&vDst).int64 == 10000, - "VarNeg: VT_CY wrong, hres=0x%X\n", hres); + "VarNeg: VT_CY wrong, hres=0x%lX\n", hres); }
static HRESULT (WINAPI *pVarRound)(LPVARIANT,int,LPVARIANT); @@ -4311,7 +4311,7 @@ static void test_Round( int line, VARIANT *arg, int deci, VARIANT *expected )
memset( &result, 0, sizeof(result) ); hres = pVarRound( arg, deci, &result ); - ok_(__FILE__,line)( hres == S_OK, "wrong result %x\n", hres ); + ok_(__FILE__,line)( hres == S_OK, "wrong result %lx\n", hres ); if (hres == S_OK) ok_(__FILE__,line)( is_expected_variant( &result, expected ), "got %s expected %s\n", variantstr(&result), variantstr(expected) ); @@ -4425,13 +4425,13 @@ static void test_VarRound(void) V_VT(&v) = VT_EMPTY; hres = pVarRound(&v,0,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_I2 && V_I2(&vDst) == 0, - "VarRound: expected 0x0,%d,0 got 0x%X,%d,%d\n", VT_EMPTY, + "VarRound: expected 0x0,%d,0 got 0x%lX,%d,%d\n", VT_EMPTY, hres, V_VT(&vDst), V_I2(&vDst));
V_VT(&v) = VT_NULL; hres = pVarRound(&v,0,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_NULL, - "VarRound: expected 0x0,%d got 0x%X,%d\n", VT_NULL, hres, V_VT(&vDst)); + "VarRound: expected 0x0,%d got 0x%lX,%d\n", VT_NULL, hres, V_VT(&vDst));
/* VT_DECIMAL */ for (i = 0; i < ARRAY_SIZE(decimal_round_data); i++) @@ -4448,17 +4448,17 @@ static void test_VarRound(void) S1(U1(*pdec)).Lo32 = ptr->source.Lo32; VariantInit(&vDst); hres = pVarRound(&v, ptr->dec, &vDst); - ok(hres == S_OK, "%d: got 0x%08x\n", i, hres); + ok(hres == S_OK, "%d: got 0x%08lx\n", i, hres); if (hres == S_OK) { ok(V_VT(&vDst) == VT_DECIMAL, "%d: got VT %d, expected VT_DECIMAL\n", i, V_VT(&vDst)); ok(S(U(V_DECIMAL(&vDst))).sign == ptr->ret.sign, "%d: got sign 0x%02x, expected 0x%02x\n", i, S(U(V_DECIMAL(&vDst))).sign, ptr->ret.sign); - ok(V_DECIMAL(&vDst).Hi32 == ptr->ret.Hi32, "%d: got Hi32 %d, expected %d\n", + ok(V_DECIMAL(&vDst).Hi32 == ptr->ret.Hi32, "%d: got Hi32 %ld, expected %ld\n", i, V_DECIMAL(&vDst).Hi32, ptr->ret.Hi32); - ok(S1(U1(V_DECIMAL(&vDst))).Mid32 == ptr->ret.Mid32, "%d: got Mid32 %d, expected %d\n", + ok(S1(U1(V_DECIMAL(&vDst))).Mid32 == ptr->ret.Mid32, "%d: got Mid32 %ld, expected %ld\n", i, S1(U1(V_DECIMAL(&vDst))).Mid32, ptr->ret.Mid32); - ok(S1(U1(V_DECIMAL(&vDst))).Lo32 == ptr->ret.Lo32, "%d: got Lo32 %d, expected %d\n", + ok(S1(U1(V_DECIMAL(&vDst))).Lo32 == ptr->ret.Lo32, "%d: got Lo32 %ld, expected %ld\n", i, S1(U1(V_DECIMAL(&vDst))).Lo32, ptr->ret.Lo32); } } @@ -4468,7 +4468,7 @@ static void test_VarRound(void) pcy->int64 = 10000; hres = pVarRound(&v,0,&vDst); ok(hres == S_OK && V_VT(&vDst) == VT_CY && V_CY(&vDst).int64 == 10000, - "VarRound: VT_CY wrong, hres=0x%X\n", hres); + "VarRound: VT_CY wrong, hres=0x%lX\n", hres);
}
@@ -4586,12 +4586,12 @@ static void test_VarXor(void) hres = pVarXor(&left, &right, &result); if (bFail) ok(hres == DISP_E_TYPEMISMATCH || hres == DISP_E_BADVARTYPE, - "VarXor: %d|0x%X, %d|0x%X: Expected failure, got 0x%X vt %d\n", + "VarXor: %d|0x%X, %d|0x%X: Expected failure, got 0x%lX vt %d\n", leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], hres, V_VT(&result)); else ok(hres == S_OK && V_VT(&result) == resvt, - "VarXor: %d|0x%X, %d|0x%X: expected S_OK, vt %d, got 0x%X vt %d\n", + "VarXor: %d|0x%X, %d|0x%X: expected S_OK, vt %d, got 0x%lX vt %d\n", leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], resvt, hres, V_VT(&result)); } @@ -5320,12 +5320,12 @@ static void test_VarOr(void) hres = pVarOr(&left, &right, &result); if (bFail) ok(hres == DISP_E_TYPEMISMATCH || hres == DISP_E_BADVARTYPE, - "VarOr: %d|0x%X, %d|0x%X: Expected failure, got 0x%X vt %d\n", + "VarOr: %d|0x%X, %d|0x%X: Expected failure, got 0x%lX vt %d\n", leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], hres, V_VT(&result)); else ok(hres == S_OK && V_VT(&result) == resvt, - "VarOr: %d|0x%X, %d|0x%X: expected S_OK, vt %d, got 0x%X vt %d\n", + "VarOr: %d|0x%X, %d|0x%X: expected S_OK, vt %d, got 0x%lX vt %d\n", leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], resvt, hres, V_VT(&result)); } @@ -6051,12 +6051,12 @@ static void test_VarEqv(void) hres = pVarEqv(&left, &right, &result); if (bFail) ok(hres == DISP_E_TYPEMISMATCH || hres == DISP_E_BADVARTYPE, - "VarEqv: %d|0x%X, %d|0x%X: Expected failure, got 0x%X vt %d\n", + "VarEqv: %d|0x%X, %d|0x%X: Expected failure, got 0x%lX vt %d\n", leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], hres, V_VT(&result)); else ok(hres == S_OK && V_VT(&result) == resvt, - "VarEqv: %d|0x%X, %d|0x%X: expected S_OK, vt %d, got 0x%X vt %d\n", + "VarEqv: %d|0x%X, %d|0x%X: expected S_OK, vt %d, got 0x%lX vt %d\n", leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], resvt, hres, V_VT(&result)); } @@ -6188,12 +6188,12 @@ static void test_VarMul(void) hres = pVarMul(&left, &right, &result); if (bFail) { ok(hres == DISP_E_TYPEMISMATCH || hres == DISP_E_BADVARTYPE, - "VarMul: %d|0x%X, %d|0x%X: Expected failure, got 0x%X vt %d\n", + "VarMul: %d|0x%X, %d|0x%X: Expected failure, got 0x%lX vt %d\n", leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], hres, V_VT(&result)); } else { ok(hres == S_OK && V_VT(&result) == resvt, - "VarMul: %d|0x%X, %d|0x%X: expected S_OK, vt %d, got 0x%X vt %d\n", + "VarMul: %d|0x%X, %d|0x%X: expected S_OK, vt %d, got 0x%lX vt %d\n", leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], resvt, hres, V_VT(&result)); } @@ -6366,12 +6366,12 @@ static void test_VarAdd(void) hres = pVarAdd(&left, &right, &result); if (bFail) { ok(hres == DISP_E_TYPEMISMATCH || hres == DISP_E_BADVARTYPE, - "VarAdd: %d|0x%X, %d|0x%X: Expected failure, got 0x%X vt %d\n", + "VarAdd: %d|0x%X, %d|0x%X: Expected failure, got 0x%lX vt %d\n", leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], hres, V_VT(&result)); } else { ok(hres == S_OK && V_VT(&result) == resvt, - "VarAdd: %d|0x%X, %d|0x%X: expected S_OK, vt %d, got 0x%X vt %d\n", + "VarAdd: %d|0x%X, %d|0x%X: expected S_OK, vt %d, got 0x%lX vt %d\n", leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], resvt, hres, V_VT(&result)); } @@ -6592,7 +6592,7 @@ static void test_VarCat(void)
/* Determine the error code for the vt combination */ ok(hres == expected_error_num, - "VarCat: %d, %d returned error, 0x%X expected 0x%X.\n", + "VarCat: %d, %d returned error, 0x%lX expected 0x%lX.\n", leftvt, rightvt, hres, expected_error_num);
/* Check types are correct */ @@ -6616,7 +6616,7 @@ static void test_VarCat(void) V_BSTR(&right) = SysAllocString(sz34); V_BSTR(&expected) = SysAllocString(sz1234); hres = pVarCat(&left,&right,&result); - ok(hres == S_OK, "VarCat failed with error 0x%08x\n", hres); + ok(hres == S_OK, "VarCat failed with error 0x%08lx\n", hres); if (pVarCmp) ok(pVarCmp(&result,&expected,lcid,0) == VARCMP_EQ, "VarCat: VT_BSTR concat with VT_BSTR failed to return correct result\n"); @@ -6630,7 +6630,7 @@ static void test_VarCat(void) V_VT(&right) = VT_BSTR; V_BSTR(&right) = SysAllocString(sz1234); hres = pVarCat(&left,&right,&result); - ok(hres == DISP_E_TYPEMISMATCH, "VarCat should have returned DISP_E_TYPEMISMATCH instead of 0x%08x\n", hres); + ok(hres == DISP_E_TYPEMISMATCH, "VarCat should have returned DISP_E_TYPEMISMATCH instead of 0x%08lx\n", hres); ok(V_VT(&result) == VT_EMPTY, "VarCat: VT_ERROR concat with VT_BSTR should have returned VT_EMPTY\n");
@@ -6642,7 +6642,7 @@ static void test_VarCat(void) V_VT(&right) = VT_ERROR; V_BSTR(&left) = SysAllocString(sz1234); hres = pVarCat(&left,&right,&result); - ok(hres == DISP_E_TYPEMISMATCH, "VarCat should have returned DISP_E_TYPEMISMATCH instead of 0x%08x\n", hres); + ok(hres == DISP_E_TYPEMISMATCH, "VarCat should have returned DISP_E_TYPEMISMATCH instead of 0x%08lx\n", hres); ok(V_VT(&result) == VT_EMPTY, "VarCat: VT_BSTR concat with VT_ERROR should have returned VT_EMPTY\n");
@@ -6659,11 +6659,11 @@ static void test_VarCat(void) V_BOOL(&right) = TRUE; V_BSTR(&expected) = SysAllocString(sz12_true); hres = pVarCat(&left,&right,&result); - ok(hres == S_OK, "VarCat failed with error 0x%08x\n", hres); + ok(hres == S_OK, "VarCat failed with error 0x%08lx\n", hres); if (pVarCmp) { hres = pVarCmp(&result,&expected,lcid,0); - ok(hres == VARCMP_EQ, "Expected VARCMP_EQ, got %08x for %s, %s\n", + ok(hres == VARCMP_EQ, "Expected VARCMP_EQ, got %08lx for %s, %s\n", hres, variantstr(&result), variantstr(&expected)); }
@@ -6679,11 +6679,11 @@ static void test_VarCat(void) V_BOOL(&right) = FALSE; V_BSTR(&expected) = SysAllocString(sz12_false); hres = pVarCat(&left,&right,&result); - ok(hres == S_OK, "VarCat failed with error 0x%08x\n", hres); + ok(hres == S_OK, "VarCat failed with error 0x%08lx\n", hres); if (pVarCmp) { hres = pVarCmp(&result,&expected,lcid,0); - ok(hres == VARCMP_EQ, "Expected VARCMP_EQ, got %08x for %s, %s\n", + ok(hres == VARCMP_EQ, "Expected VARCMP_EQ, got %08lx for %s, %s\n", hres, variantstr(&result), variantstr(&expected)); }
@@ -6700,7 +6700,7 @@ static void test_VarCat(void) V_INT(&right) = 34; V_BSTR(&expected) = SysAllocString(sz1234); hres = pVarCat(&left,&right,&result); - ok(hres == S_OK, "VarCat failed with error 0x%08x\n", hres); + ok(hres == S_OK, "VarCat failed with error 0x%08lx\n", hres); if (pVarCmp) ok(pVarCmp(&result,&expected,lcid,0) == VARCMP_EQ, "VarCat: NUMBER concat with NUMBER returned incorrect result\n"); @@ -6715,7 +6715,7 @@ static void test_VarCat(void) V_INT(&left) = 12; V_BSTR(&right) = SysAllocString(sz34); hres = pVarCat(&left,&right,&result); - ok(hres == S_OK, "VarCat failed with error 0x%08x\n", hres); + ok(hres == S_OK, "VarCat failed with error 0x%08lx\n", hres); if (pVarCmp) ok(pVarCmp(&result,&expected,lcid,0) == VARCMP_EQ, "VarCat: NUMBER concat with VT_BSTR, incorrect result\n"); @@ -6729,7 +6729,7 @@ static void test_VarCat(void) V_BSTR(&left) = SysAllocString(sz12); V_INT(&right) = 34; hres = pVarCat(&left,&right,&result); - ok(hres == S_OK, "VarCat failed with error 0x%08x\n", hres); + ok(hres == S_OK, "VarCat failed with error 0x%08lx\n", hres); if (pVarCmp) ok(pVarCmp(&result,&expected,lcid,0) == VARCMP_EQ, "VarCat: VT_BSTR concat with NUMBER, incorrect result\n"); @@ -6749,7 +6749,7 @@ static void test_VarCat(void) V_BSTR(&expected)= SysAllocString(sz12_date); V_BSTR(&expected_broken)= SysAllocString(sz12_date_broken); hres = pVarCat(&left,&right,&result); - ok(hres == S_OK, "VarCat failed with error 0x%08x\n", hres); + ok(hres == S_OK, "VarCat failed with error 0x%08lx\n", hres); if (pVarCmp) ok(pVarCmp(&result,&expected,lcid,0) == VARCMP_EQ || broken(pVarCmp(&result,&expected_broken,lcid,0) == VARCMP_EQ), /* Some W98 and NT4 (intermittent) */ @@ -6770,7 +6770,7 @@ static void test_VarCat(void) V_BSTR(&expected)= SysAllocString(date_sz12); V_BSTR(&expected_broken)= SysAllocString(date_sz12_broken); hres = pVarCat(&left,&right,&result); - ok(hres == S_OK, "VarCat failed with error 0x%08x\n", hres); + ok(hres == S_OK, "VarCat failed with error 0x%08lx\n", hres); if (pVarCmp) ok(pVarCmp(&result,&expected,lcid,0) == VARCMP_EQ || broken(pVarCmp(&result,&expected_broken,lcid,0) == VARCMP_EQ), /* Some W98 and NT4 (intermittent) */ @@ -6790,7 +6790,7 @@ static void test_VarCat(void) V_BSTR(&right) = SysAllocString(sz_empty); V_BSTR(&expected)= SysAllocString(sz_empty); hres = pVarCat(&left,&right,&result); - ok(hres == S_OK, "VarCat failed with error 0x%08x\n", hres); + ok(hres == S_OK, "VarCat failed with error 0x%08lx\n", hres); if (pVarCmp) ok(pVarCmp(&result,&left,lcid,0) == VARCMP_EQ, "VarCat: EMPTY concat with EMPTY did not return empty VT_BSTR\n"); @@ -6810,7 +6810,7 @@ static void test_VarCat(void)
SET_EXPECT(dispatch_invoke); hres = VarCat(&left, &right, &result); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(V_VT(&result) == VT_BSTR, "got %d\n", V_VT(&result)); ok(SysStringLen(V_BSTR(&result)) == 0, "got %d\n", SysStringLen(V_BSTR(&result))); CHECK_CALLED(dispatch_invoke); @@ -6825,7 +6825,7 @@ static void test_VarCat(void)
SET_EXPECT(dispatch_invoke); hres = VarCat(&left, &right, &result); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(V_VT(&result) == VT_BSTR, "got %d\n", V_VT(&result)); ok(SysStringLen(V_BSTR(&result)) == 0, "got %d\n", SysStringLen(V_BSTR(&result))); CHECK_CALLED(dispatch_invoke); @@ -6842,7 +6842,7 @@ static void test_VarCat(void) V_BSTR(&left) = SysAllocString(sz12); SET_EXPECT(dispatch_invoke); hres = pVarCat(&left,&right,&result); - ok(hres == S_OK, "VarCat failed with error 0x%08x\n", hres); + ok(hres == S_OK, "VarCat failed with error 0x%08lx\n", hres); CHECK_CALLED(dispatch_invoke); ok(!lstrcmpW(V_BSTR(&result), L"1234"), "got %s\n", wine_dbgstr_w(V_BSTR(&result)));
@@ -6857,7 +6857,7 @@ static void test_VarCat(void)
SET_EXPECT(dispatch_invoke); hres = VarCat(&left, &right, &result); - ok(hres == E_OUTOFMEMORY, "got 0x%08x\n", hres); + ok(hres == E_OUTOFMEMORY, "got 0x%08lx\n", hres); CHECK_CALLED(dispatch_invoke);
VariantClear(&left); @@ -6871,7 +6871,7 @@ static void test_VarCat(void)
SET_EXPECT(dispatch_invoke); hres = VarCat(&left, &right, &result); - ok(hres == DISP_E_TYPEMISMATCH, "got 0x%08x\n", hres); + ok(hres == DISP_E_TYPEMISMATCH, "got 0x%08lx\n", hres); CHECK_CALLED(dispatch_invoke);
VariantClear(&left); @@ -6884,7 +6884,7 @@ static void test_VarCat(void) V_VT(&right) = VT_BSTR; V_BSTR(&right) = SysAllocStringLen(NULL,0); hres = pVarCat(&left, &right, &result); - ok(hres == S_OK, "VarCat failed: %08x\n", hres); + ok(hres == S_OK, "VarCat failed: %08lx\n", hres); VariantClear(&right);
cmp = lstrcmpW(V_BSTR(&result), L"True"); @@ -6893,13 +6893,13 @@ static void test_VarCat(void) V_VT(&right) = VT_BOOL; V_BOOL(&right) = 100; hres = pVarCat(&left, &right, &result); - ok(hres == S_OK, "VarCat failed: %08x\n", hres); + ok(hres == S_OK, "VarCat failed: %08lx\n", hres); test_bstr_var(&result, L"TrueTrue"); VariantClear(&result);
V_BOOL(&right) = VARIANT_FALSE; hres = pVarCat(&left, &right, &result); - ok(hres == S_OK, "VarCat failed: %08x\n", hres); + ok(hres == S_OK, "VarCat failed: %08lx\n", hres); test_bstr_var(&result, L"TrueFalse"); VariantClear(&result); }else { @@ -7022,12 +7022,12 @@ static void test_VarAnd(void) /* Check expected HRESULT and if result variant type is correct */ if (bFail) ok (hres == DISP_E_BADVARTYPE || hres == DISP_E_TYPEMISMATCH, - "VarAnd: %s|0x%X, %s|0x%X: got vt %s hr 0x%X\n", + "VarAnd: %s|0x%X, %s|0x%X: got vt %s hr 0x%lX\n", vtstr(leftvt), ExtraFlags[i], vtstr(rightvt), ExtraFlags[i], vtstr(V_VT(&result)), hres); else ok (hres == S_OK && resvt == V_VT(&result), - "VarAnd: %s|0x%X, %s|0x%X: expected vt %s hr 0x%X, got vt %s hr 0x%X\n", + "VarAnd: %s|0x%X, %s|0x%X: expected vt %s hr 0x%lX, got vt %s hr 0x%lX\n", vtstr(leftvt), ExtraFlags[i], vtstr(rightvt), ExtraFlags[i], vtstr(resvt), S_OK, vtstr(V_VT(&result)), hres); } @@ -7591,7 +7591,7 @@ static void test_cmp( int line, LCID lcid, UINT flags, VARIANT *left, VARIANT *r CHECKPTR(VarCmp);
hres = pVarCmp(left,right,lcid,flags); - ok_(__FILE__,line)(hres == result, "VarCmp(%s,%s): expected 0x%x, got hres=0x%x\n", + ok_(__FILE__,line)(hres == result, "VarCmp(%s,%s): expected 0x%lx, got hres=0x%lx\n", variantstr(left), variantstr(right), result, hres ); } static void test_cmpex( int line, LCID lcid, VARIANT *left, VARIANT *right, @@ -7732,11 +7732,11 @@ static void test_VarCmp(void) hres = pVarCmp(&left, &right, LOCALE_USER_DEFAULT, 0); if (bFail) { ok(hres == DISP_E_TYPEMISMATCH || hres == DISP_E_BADVARTYPE, - "VarCmp: %d|0x%X, %d|0x%X: Expected failure, got 0x%X\n", + "VarCmp: %d|0x%X, %d|0x%X: Expected failure, got 0x%lX\n", leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], hres); } else { ok(hres == expect, - "VarCmp: %d|0x%X, %d|0x%X: Expected 0x%X, got 0x%X\n", + "VarCmp: %d|0x%X, %d|0x%X: Expected 0x%lX, got 0x%lX\n", leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], expect, hres); } @@ -7958,12 +7958,12 @@ static void test_VarPow(void) /* Check expected HRESULT and if result variant type is correct */ if (bFail) ok (hres == DISP_E_BADVARTYPE || hres == DISP_E_TYPEMISMATCH, - "VarPow: %s|0x%X, %s|0x%X: got vt %s hr 0x%X\n", + "VarPow: %s|0x%X, %s|0x%X: got vt %s hr 0x%lX\n", vtstr(leftvt), ExtraFlags[i], vtstr(rightvt), ExtraFlags[i], vtstr(V_VT(&result)), hres); else ok (hres == S_OK && resvt == V_VT(&result), - "VarPow: %s|0x%X, %s|0x%X: expected vt %s hr 0x%X, got vt %s hr 0x%X\n", + "VarPow: %s|0x%X, %s|0x%X: expected vt %s hr 0x%lX, got vt %s hr 0x%lX\n", vtstr(leftvt), ExtraFlags[i], vtstr(rightvt), ExtraFlags[i], vtstr(resvt), S_OK, vtstr(V_VT(&result)), hres); } @@ -8324,7 +8324,7 @@ static void test_VarPow(void)
hres = pVarPow(&cy, &cy, &result); ok(hres == S_OK && V_VT(&result) == VT_R8, - "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n", + "VARPOW: expected coerced hres 0x%lX type VT_R8, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 4.0), "VARPOW: CY value %f, expected %f\n", V_R8(&result), 4.0); @@ -8333,7 +8333,7 @@ static void test_VarPow(void) if (hres == S_OK) { ok(V_VT(&result) == VT_R8, - "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n", + "VARPOW: expected coerced hres 0x%lX type VT_R8, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(EQ_DOUBLE(V_R8(&result), 4.0), "VARPOW: CY value %f, expected %f\n", V_R8(&result), 4.0); @@ -8341,27 +8341,27 @@ static void test_VarPow(void) else { ok(hres == DISP_E_BADVARTYPE && V_VT(&result) == VT_EMPTY, - "VARPOW: expected coerced hres 0x%X type VT_EMPTY, got hres 0x%X type %s!\n", + "VARPOW: expected coerced hres 0x%lX type VT_EMPTY, got hres 0x%lX type %s!\n", DISP_E_BADVARTYPE, hres, vtstr(V_VT(&result))); }
hres = pVarPow(&left, &cy, &result); ok(hres == S_OK && V_VT(&result) == VT_R8, - "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n", + "VARPOW: expected coerced hres 0x%lX type VT_R8, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 10000.0), "VARPOW: CY value %f, expected %f\n", V_R8(&result), 10000.0);
hres = pVarPow(&left, &dec, &result); ok(hres == S_OK && V_VT(&result) == VT_R8, - "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n", + "VARPOW: expected coerced hres 0x%lX type VT_R8, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(hres == S_OK && EQ_DOUBLE(V_R8(&result),10000.0), "VARPOW: DECIMAL value %f, expected %f\n", V_R8(&result), 10000.0);
hres = pVarPow(&dec, &dec, &result); ok(hres == S_OK && V_VT(&result) == VT_R8, - "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n", + "VARPOW: expected coerced hres 0x%lX type VT_R8, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 4.0), "VARPOW: DECIMAL value %f, expected %f\n", V_R8(&result), 4.0); @@ -8370,7 +8370,7 @@ static void test_VarPow(void) if (hres == S_OK) { ok(V_VT(&result) == VT_R8, - "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n", + "VARPOW: expected coerced hres 0x%lX type VT_R8, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(EQ_DOUBLE(V_R8(&result), 4.0), "VARPOW: DECIMAL value %f, expected %f\n", V_R8(&result), 4.0); @@ -8378,7 +8378,7 @@ static void test_VarPow(void) else { ok(hres == DISP_E_BADVARTYPE && V_VT(&result) == VT_EMPTY, - "VARPOW: expected coerced hres 0x%X type VT_EMPTY, got hres 0x%X type %s!\n", + "VARPOW: expected coerced hres 0x%lX type VT_EMPTY, got hres 0x%lX type %s!\n", DISP_E_BADVARTYPE, hres, vtstr(V_VT(&result))); }
@@ -8530,12 +8530,12 @@ static void test_VarDiv(void) if (bFail) ok (hres == DISP_E_BADVARTYPE || hres == DISP_E_TYPEMISMATCH || hres == DISP_E_OVERFLOW || hres == DISP_E_DIVBYZERO, - "VarDiv: %s|0x%X, %s|0x%X: got vt %s hr 0x%X\n", + "VarDiv: %s|0x%X, %s|0x%X: got vt %s hr 0x%lX\n", vtstr(leftvt), ExtraFlags[i], vtstr(rightvt), ExtraFlags[i], vtstr(V_VT(&result)), hres); else ok (hres == S_OK && resvt == V_VT(&result), - "VarDiv: %s|0x%X, %s|0x%X: expected vt %s hr 0x%X, got vt %s hr 0x%X\n", + "VarDiv: %s|0x%X, %s|0x%X: expected vt %s hr 0x%lX, got vt %s hr 0x%lX\n", vtstr(leftvt), ExtraFlags[i], vtstr(rightvt), ExtraFlags[i], vtstr(resvt), S_OK, vtstr(V_VT(&result)), hres); } @@ -8746,7 +8746,7 @@ static void test_VarDiv(void) V_I4(&right) = 0; hres = pVarDiv(&left, &right, &result); ok(hres == DISP_E_DIVBYZERO && V_VT(&result) == VT_EMPTY, - "VARDIV: Division by (1.0/0.0) should result in DISP_E_DIVBYZERO but got 0x%X\n", hres); + "VARDIV: Division by (1.0/0.0) should result in DISP_E_DIVBYZERO but got 0x%lX\n", hres);
V_VT(&left) = VT_R8; V_I4(&left) = 0; @@ -8754,7 +8754,7 @@ static void test_VarDiv(void) V_I4(&right) = 0; hres = pVarDiv(&left, &right, &result); ok(hres == DISP_E_OVERFLOW && V_VT(&result) == VT_EMPTY, - "VARDIV: Division by (0.0/0.0) should result in DISP_E_OVERFLOW but got 0x%X\n", hres); + "VARDIV: Division by (0.0/0.0) should result in DISP_E_OVERFLOW but got 0x%lX\n", hres);
SysFreeString(num1_str); SysFreeString(num2_str); @@ -8907,12 +8907,12 @@ static void test_VarIdiv(void) if (bFail) ok (hres == DISP_E_BADVARTYPE || hres == DISP_E_TYPEMISMATCH || hres == DISP_E_DIVBYZERO, - "VarIdiv: %s|0x%X, %s|0x%X: got vt %s hr 0x%X\n", + "VarIdiv: %s|0x%X, %s|0x%X: got vt %s hr 0x%lX\n", vtstr(leftvt), ExtraFlags[i], vtstr(rightvt), ExtraFlags[i], vtstr(V_VT(&result)), hres); else ok (hres == S_OK && resvt == V_VT(&result), - "VarIdiv: %s|0x%X, %s|0x%X: expected vt %s hr 0x%X, got vt %s hr 0x%X\n", + "VarIdiv: %s|0x%X, %s|0x%X: expected vt %s hr 0x%lX, got vt %s hr 0x%lX\n", vtstr(leftvt), ExtraFlags[i], vtstr(rightvt), ExtraFlags[i], vtstr(resvt), S_OK, vtstr(V_VT(&result)), hres); } @@ -9256,51 +9256,51 @@ static void test_VarIdiv(void)
hres = pVarIdiv(&cy, &cy, &result); ok(hres == S_OK && V_VT(&result) == VT_I4, - "VARIDIV: expected coerced hres 0x%X type VT_I4, got hres 0x%X type %s!\n", + "VARIDIV: expected coerced hres 0x%lX type VT_I4, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(hres == S_OK && V_I4(&result) == 1, - "VARIDIV: CY value %d, expected %d\n", V_I4(&result), 1); + "VARIDIV: CY value %ld, expected %d\n", V_I4(&result), 1);
if (has_i8) { hres = pVarIdiv(&cy, &right, &result); ok(hres == S_OK && V_VT(&result) == VT_I8, - "VARIDIV: expected coerced hres 0x%X type VT_I8, got hres 0x%X type %s!\n", + "VARIDIV: expected coerced hres 0x%lX type VT_I8, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(hres == S_OK && V_I8(&result) == 5000, - "VARIDIV: CY value 0x%x%08x, expected 0x%x\n", + "VARIDIV: CY value 0x%lx%08lx, expected 0x%x\n", (DWORD)(V_I8(&result) >>32), (DWORD)V_I8(&result), 5000); }
hres = pVarIdiv(&left, &cy, &result); ok(hres == S_OK && V_VT(&result) == VT_I4, - "VARIDIV: expected coerced hres 0x%X type VT_I4, got hres 0x%X type %s!\n", + "VARIDIV: expected coerced hres 0x%lX type VT_I4, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(hres == S_OK && V_I4(&result) == 0, - "VARIDIV: CY value %d, expected %d\n", V_I4(&result), 0); + "VARIDIV: CY value %ld, expected %d\n", V_I4(&result), 0);
hres = pVarIdiv(&left, &dec, &result); ok(hres == S_OK && V_VT(&result) == VT_I4, - "VARIDIV: expected coerced hres 0x%X type VT_I4, got hres 0x%X type %s!\n", + "VARIDIV: expected coerced hres 0x%lX type VT_I4, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(hres == S_OK && V_I4(&result) == 50, - "VARIDIV: DECIMAL value %d, expected %d\n", V_I4(&result), 50); + "VARIDIV: DECIMAL value %ld, expected %d\n", V_I4(&result), 50);
hres = pVarIdiv(&dec, &dec, &result); ok(hres == S_OK && V_VT(&result) == VT_I4, - "VARIDIV: expected coerced hres 0x%X type VT_I4, got hres 0x%X type %s!\n", + "VARIDIV: expected coerced hres 0x%lX type VT_I4, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(hres == S_OK && V_I4(&result) == 1, - "VARIDIV: DECIMAL value %d, expected %d\n", V_I4(&result), 1); + "VARIDIV: DECIMAL value %ld, expected %d\n", V_I4(&result), 1);
if (has_i8) { hres = pVarIdiv(&dec, &right, &result); ok(hres == S_OK && V_VT(&result) == VT_I8, - "VARIDIV: expected coerced hres 0x%X type VT_I8, got hres 0x%X type %s!\n", + "VARIDIV: expected coerced hres 0x%lX type VT_I8, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(hres == S_OK && V_I8(&result) == 1, - "VARIDIV: DECIMAL value 0x%x%08x, expected %d\n", + "VARIDIV: DECIMAL value 0x%lx%08lx, expected %d\n", (DWORD)(V_I8(&result) >> 32), (DWORD)V_I8(&result), 1); }
@@ -9311,7 +9311,7 @@ static void test_VarIdiv(void) V_I4(&right) = 0; hres = pVarIdiv(&left, &right, &result); ok(hres == DISP_E_DIVBYZERO && V_VT(&result) == VT_EMPTY, - "VARIDIV: Division by 0 should result in DISP_E_DIVBYZERO but got 0x%X\n", hres); + "VARIDIV: Division by 0 should result in DISP_E_DIVBYZERO but got 0x%lX\n", hres);
V_VT(&left) = VT_INT; V_I4(&left) = 0; @@ -9319,7 +9319,7 @@ static void test_VarIdiv(void) V_I4(&right) = 0; hres = pVarIdiv(&left, &right, &result); ok(hres == DISP_E_DIVBYZERO && V_VT(&result) == VT_EMPTY, - "VARIDIV: Division by 0 should result in DISP_E_DIVBYZERO but got 0x%X\n", hres); + "VARIDIV: Division by 0 should result in DISP_E_DIVBYZERO but got 0x%lX\n", hres);
SysFreeString(num1_str); SysFreeString(num2_str); @@ -9472,12 +9472,12 @@ static void test_VarImp(void) /* Check expected HRESULT and if result variant type is correct */ if (bFail) ok (hres == DISP_E_BADVARTYPE || hres == DISP_E_TYPEMISMATCH, - "VarImp: %s|0x%X, %s|0x%X: got vt %s hr 0x%X\n", + "VarImp: %s|0x%X, %s|0x%X: got vt %s hr 0x%lX\n", vtstr(leftvt), ExtraFlags[i], vtstr(rightvt), ExtraFlags[i], vtstr(V_VT(&result)), hres); else ok (hres == S_OK && resvt == V_VT(&result), - "VarImp: %s|0x%X, %s|0x%X: expected vt %s hr 0x%X, got vt %s hr 0x%X\n", + "VarImp: %s|0x%X, %s|0x%X: expected vt %s hr 0x%lX, got vt %s hr 0x%lX\n", vtstr(leftvt), ExtraFlags[i], vtstr(rightvt), ExtraFlags[i], vtstr(resvt), S_OK, vtstr(V_VT(&result)), hres); } @@ -9836,51 +9836,51 @@ static void test_VarImp(void)
hres = pVarImp(&cy, &cy, &result); ok(hres == S_OK && V_VT(&result) == VT_I4, - "VARIMP: expected coerced hres 0x%X type VT_I4, got hres 0x%X type %s!\n", + "VARIMP: expected coerced hres 0x%lX type VT_I4, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(hres == S_OK && V_I4(&result) == -1, - "VARIMP: CY value %d, expected %d\n", V_I4(&result), -1); + "VARIMP: CY value %ld, expected %d\n", V_I4(&result), -1);
if (has_i8) { hres = pVarImp(&cy, &right, &result); ok(hres == S_OK && V_VT(&result) == VT_I8, - "VARIMP: expected coerced hres 0x%X type VT_I8, got hres 0x%X type %s!\n", + "VARIMP: expected coerced hres 0x%lX type VT_I8, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(hres == S_OK && V_I8(&result) == -2, - "VARIMP: CY value %x%08x, expected %d\n", + "VARIMP: CY value %lx%08lx, expected %d\n", (DWORD)((V_I8(&result)) >> 32), (DWORD)(V_I8(&result)), -2); }
hres = pVarImp(&left, &cy, &result); ok(hres == S_OK && V_VT(&result) == VT_I4, - "VARIMP: expected coerced hres 0x%X type VT_I4, got hres 0x%X type %s!\n", + "VARIMP: expected coerced hres 0x%lX type VT_I4, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(hres == S_OK && V_I4(&result) == -1, - "VARIMP: CY value %d, expected %d\n", V_I4(&result), -1); + "VARIMP: CY value %ld, expected %d\n", V_I4(&result), -1);
hres = pVarImp(&left, &dec, &result); ok(hres == S_OK && V_VT(&result) == VT_I4, - "VARIMP: expected coerced hres 0x%X type VT_I4, got hres 0x%X type %s!\n", + "VARIMP: expected coerced hres 0x%lX type VT_I4, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(hres == S_OK && V_I4(&result) == -1, - "VARIMP: DECIMAL value %d, expected %d\n", V_I4(&result), -1); + "VARIMP: DECIMAL value %ld, expected %d\n", V_I4(&result), -1);
hres = pVarImp(&dec, &dec, &result); ok(hres == S_OK && V_VT(&result) == VT_I4, - "VARIMP: expected coerced hres 0x%X type VT_I4, got hres 0x%X type %s!\n", + "VARIMP: expected coerced hres 0x%lX type VT_I4, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(hres == S_OK && V_I4(&result) == -1, - "VARIMP: DECIMAL value %d, expected %d\n", V_I4(&result), -1); + "VARIMP: DECIMAL value %ld, expected %d\n", V_I4(&result), -1);
if (has_i8) { hres = pVarImp(&dec, &right, &result); ok(hres == S_OK && V_VT(&result) == VT_I8, - "VARIMP: expected coerced hres 0x%X type VT_I8, got hres 0x%X type %s!\n", + "VARIMP: expected coerced hres 0x%lX type VT_I8, got hres 0x%lX type %s!\n", S_OK, hres, vtstr(V_VT(&result))); ok(hres == S_OK && V_I8(&result) == -3, - "VARIMP: DECIMAL value 0x%x%08x, expected %d\n", + "VARIMP: DECIMAL value 0x%lx%08lx, expected %d\n", (DWORD)(V_I8(&result) >>32), (DWORD)V_I8(&result), -3); }
diff --git a/dlls/oleaut32/tests/vartype.c b/dlls/oleaut32/tests/vartype.c index c368c5129bb..7a860e411db 100644 --- a/dlls/oleaut32/tests/vartype.c +++ b/dlls/oleaut32/tests/vartype.c @@ -69,7 +69,7 @@ static BOOL has_locales; /* Macros for converting and testing results */ #define CONVVARS(typ) HRESULT hres; CONV_TYPE out; typ in
-#define _EXPECT_NO_OUT(res) ok(hres == res, "expected " #res ", got hres=0x%08x\n", hres) +#define _EXPECT_NO_OUT(res) ok(hres == res, "expected " #res ", got hres=%#08lx\n", hres) #define EXPECT_OVERFLOW _EXPECT_NO_OUT(DISP_E_OVERFLOW) #define EXPECT_MISMATCH _EXPECT_NO_OUT(DISP_E_TYPEMISMATCH) #define EXPECT_BADVAR _EXPECT_NO_OUT(DISP_E_BADVARTYPE) @@ -79,12 +79,12 @@ static BOOL has_locales; #define EXPECT_EQ _EXPECT_NO_OUT(VARCMP_EQ)
#define _EXPECTRES(res, x, fs) \ - ok(hres == S_OK && out == (CONV_TYPE)(x), "expected " #x ", got " fs "; hres=0x%08x\n", out, hres) + ok(hres == S_OK && out == (CONV_TYPE)(x), "expected " #x ", got " fs "; hres=%#08lx\n", out, hres) #define EXPECT(x) EXPECTRES(S_OK, (x)) #define EXPECT_DBL(x) \ - ok(hres == S_OK && EQ_DOUBLE(out, (x)), "expected %.16g, got %.16g; hres=0x%08x\n", (x), out, hres) + ok(hres == S_OK && EQ_DOUBLE(out, (x)), "expected %.16g, got %.16g; hres=%#08lx\n", (x), out, hres) #define EXPECT_DBL2(new,old) \ - ok(hres == S_OK && (EQ_DOUBLE(out, (new)) || broken(EQ_DOUBLE(out, (old)))), "expected %.16g or %.16g, got %.16g; hres=0x%08x\n", (new), (old), out, hres) + ok(hres == S_OK && (EQ_DOUBLE(out, (new)) || broken(EQ_DOUBLE(out, (old)))), "expected %.16g or %.16g, got %.16g; hres=%#08lx\n", (new), (old), out, hres)
#define CONVERT(func, val) in = val; hres = func(in, &out) #define CONVERTRANGE(func,start,end) for (i = start; i < end; i+=1) { CONVERT(func, i); EXPECT(i); }; @@ -128,25 +128,25 @@ static BOOL has_locales; V_VT(&vSrc) = vt; srcval = in; \ hres = VariantCopy(&vDst, &vSrc); \ ok(hres == S_OK && V_VT(&vDst) == vt && dstval == in, \ - "copy hres 0x%X, type %d, value (" fs ") " fs "\n", hres, V_VT(&vDst), val, dstval); \ + "copy hres %#lX, type %d, value (" fs ") " fs "\n", hres, V_VT(&vDst), val, dstval); \ V_VT(&vSrc) = vt|VT_BYREF; srcref = ∈ \ hres = VariantCopy(&vDst, &vSrc); \ ok(hres == S_OK && V_VT(&vDst) == (vt|VT_BYREF) && dstref == &in, \ - "ref hres 0x%X, type %d, ref (%p) %p\n", hres, V_VT(&vDst), &in, dstref); \ + "ref hres %#lX, type %d, ref (%p) %p\n", hres, V_VT(&vDst), &in, dstref); \ hres = VariantCopyInd(&vDst, &vSrc); \ ok(hres == S_OK && V_VT(&vDst) == vt && dstval == in, \ - "ind hres 0x%X, type %d, value (" fs ") " fs "\n", hres, V_VT(&vDst), val, dstval); \ + "ind hres %#lX, type %d, value (" fs ") " fs "\n", hres, V_VT(&vDst), val, dstval); \ } while(0)
#define CHANGETYPEEX(typ) hres = VariantChangeTypeEx(&vDst, &vSrc, 0, 0, typ)
#define TYPETEST(typ,res,fs) CHANGETYPEEX(typ); \ ok(hres == S_OK && V_VT(&vDst) == typ && (CONV_TYPE)res == in, \ - "hres=0x%X, type=%d (should be %d(" #typ ")), value=" fs " (should be " fs ")\n", \ + "hres=%#lX, type=%d (should be %d(" #typ ")), value=" fs " (should be " fs ")\n", \ hres, V_VT(&vDst), typ, (CONV_TYPE)res, in); #define TYPETESTI8(typ,res) CHANGETYPEEX(typ); \ ok(hres == S_OK && V_VT(&vDst) == typ && (CONV_TYPE)res == in, \ - "hres=0x%X, type=%d (should be %d(" #typ ")), value=%d (should be 1)\n", \ + "hres=%#lX, type=%d (should be %d(" #typ ")), value=%d (should be 1)\n", \ hres, V_VT(&vDst), typ, (int)res); #define BADVAR(typ) CHANGETYPEEX(typ); EXPECT_BADVAR #define MISMATCH(typ) CHANGETYPEEX(typ); EXPECT_MISMATCH @@ -203,31 +203,31 @@ static BOOL has_locales; hres = VariantChangeTypeEx(&vDst, &vSrc, 0, 0, VT_BOOL); \ ok(hres == S_OK && V_VT(&vDst) == VT_BOOL && \ (V_BOOL(&vDst) == VARIANT_TRUE || (V_VT(&vSrc) == VT_BOOL && V_BOOL(&vDst) == 1)), \ - "->VT_BOOL hres=0x%X, type=%d (should be VT_BOOL), value %d (should be VARIANT_TRUE)\n", \ + "->VT_BOOL hres=0x%lX, type=%d (should be VT_BOOL), value %d (should be VARIANT_TRUE)\n", \ hres, V_VT(&vDst), V_BOOL(&vDst)); \ hres = VariantChangeTypeEx(&vDst, &vSrc, 0, 0, VT_CY); \ ok(hres == S_OK && V_VT(&vDst) == VT_CY && V_CY(&vDst).int64 == CY_MULTIPLIER, \ - "->VT_CY hres=0x%X, type=%d (should be VT_CY), value (%08x,%08x) (should be CY_MULTIPLIER)\n", \ + "->VT_CY hres=0x%lX, type=%d (should be VT_CY), value (%08lx,%08lx) (should be CY_MULTIPLIER)\n", \ hres, V_VT(&vDst), S(V_CY(&vDst)).Hi, S(V_CY(&vDst)).Lo); \ if (V_VT(&vSrc) != VT_DATE) \ { \ hres = VariantChangeTypeEx(&vDst, &vSrc, 0, 0, VT_BSTR); \ ok(hres == S_OK && V_VT(&vDst) == VT_BSTR && \ V_BSTR(&vDst) && V_BSTR(&vDst)[0] == '1' && V_BSTR(&vDst)[1] == '\0', \ - "->VT_BSTR hres=0x%X, type=%d (should be VT_BSTR), *bstr='%c'\n", \ + "->VT_BSTR hres=0x%lX, type=%d (should be VT_BSTR), *bstr='%c'\n", \ hres, V_VT(&vDst), V_BSTR(&vDst) ? *V_BSTR(&vDst) : '?'); \ } \ hres = VariantChangeTypeEx(&vDst, &vSrc, 0, 0, VT_DECIMAL); \ ok(hres == S_OK && V_VT(&vDst) == VT_DECIMAL && \ S(U(V_DECIMAL(&vDst))).sign == 0 && S(U(V_DECIMAL(&vDst))).scale == 0 && \ V_DECIMAL(&vDst).Hi32 == 0 && U1(V_DECIMAL(&vDst)).Lo64 == (ULONGLONG)in, \ - "->VT_DECIMAL hres=0x%X, type=%d (should be VT_DECIMAL), sign=%d, scale=%d, hi=%u, lo=(%8x %8x),\n", \ + "->VT_DECIMAL hres=0x%lX, type=%d (should be VT_DECIMAL), sign=%d, scale=%d, hi=%lu, lo=(%8lx %8lx),\n", \ hres, V_VT(&vDst), S(U(V_DECIMAL(&vDst))).sign, S(U(V_DECIMAL(&vDst))).scale, \ V_DECIMAL(&vDst).Hi32, S1(U1(V_DECIMAL(&vDst))).Mid32, S1(U1(V_DECIMAL(&vDst))).Lo32); \ hres = VariantChangeTypeEx(&vDst, &vSrc, 0, 0, VT_EMPTY); \ - ok(hres == S_OK && V_VT(&vDst) == VT_EMPTY, "->VT_EMPTY hres=0x%X, type=%d (should be VT_EMPTY)\n", hres, V_VT(&vDst)); \ + ok(hres == S_OK && V_VT(&vDst) == VT_EMPTY, "->VT_EMPTY hres=0x%lX, type=%d (should be VT_EMPTY)\n", hres, V_VT(&vDst)); \ hres = VariantChangeTypeEx(&vDst, &vSrc, 0, 0, VT_NULL); \ - ok(hres == S_OK && V_VT(&vDst) == VT_NULL, "->VT_NULL hres=0x%X, type=%d (should be VT_NULL)\n", hres, V_VT(&vDst)); \ + ok(hres == S_OK && V_VT(&vDst) == VT_NULL, "->VT_NULL hres=0x%lX, type=%d (should be VT_NULL)\n", hres, V_VT(&vDst)); \ MISMATCH(VT_DISPATCH); \ MISMATCH(VT_ERROR); \ MISMATCH(VT_UNKNOWN); \ @@ -359,7 +359,7 @@ static HRESULT WINAPI DummyDispatch_Invoke(IDispatch *iface,
CHECK_EXPECT(dispatch_invoke);
- ok(dispid == DISPID_VALUE, "got dispid %d\n", dispid); + ok(dispid == DISPID_VALUE, "got dispid %ld\n", dispid); ok(IsEqualIID(riid, &IID_NULL), "go riid %s\n", wine_dbgstr_guid(riid)); ok(wFlags == DISPATCH_PROPERTYGET, "Flags wrong\n");
@@ -890,7 +890,7 @@ static void test_VarUI1FromDisp(void) SET_EXPECT(dispatch_invoke); out = 10; hres = VarUI1FromDisp(&dispatch.IDispatch_iface, in, &out); - ok(broken(hres == DISP_E_BADVARTYPE) || hres == S_OK, "got 0x%08x\n", hres); + ok(broken(hres == DISP_E_BADVARTYPE) || hres == S_OK, "got 0x%08lx\n", hres); ok(broken(out == 10) || out == 1, "got %d\n", out); CHECK_CALLED(dispatch_invoke);
@@ -898,7 +898,7 @@ static void test_VarUI1FromDisp(void) V_VT(&vDst) = VT_EMPTY; V_UI1(&vDst) = 0; hres = VariantChangeTypeEx(&vDst, &vSrc, in, 0, VT_UI1); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(V_VT(&vDst) == VT_UI1, "got %d\n", V_VT(&vDst)); ok(V_UI1(&vDst) == 1, "got %d\n", V_UI1(&vDst)); CHECK_CALLED(dispatch_invoke); @@ -908,14 +908,14 @@ static void test_VarUI1FromDisp(void) SET_EXPECT(dispatch_invoke); out = 10; hres = VarUI1FromDisp(&dispatch.IDispatch_iface, in, &out); - ok(hres == DISP_E_TYPEMISMATCH, "got 0x%08x\n", hres); + ok(hres == DISP_E_TYPEMISMATCH, "got 0x%08lx\n", hres); ok(out == 10, "got %d\n", out); CHECK_CALLED(dispatch_invoke);
SET_EXPECT(dispatch_invoke); V_VT(&vDst) = VT_EMPTY; hres = VariantChangeTypeEx(&vDst, &vSrc, in, 0, VT_UI1); - ok(hres == DISP_E_TYPEMISMATCH, "got 0x%08x\n", hres); + ok(hres == DISP_E_TYPEMISMATCH, "got 0x%08lx\n", hres); ok(V_VT(&vDst) == VT_EMPTY, "got %d\n", V_VT(&vDst)); CHECK_CALLED(dispatch_invoke); } @@ -1418,7 +1418,7 @@ static void test_VarUI2ChangeTypeEx(void) #undef CONV_TYPE #define CONV_TYPE LONG #undef EXPECTRES -#define EXPECTRES(res, x) _EXPECTRES(res, x, "%d") +#define EXPECTRES(res, x) _EXPECTRES(res, x, "%ld")
static void test_VarI4FromI1(void) { @@ -1632,7 +1632,7 @@ static void test_VarI4FromStr(void)
static void test_VarI4Copy(void) { - COPYTEST(1, VT_I4, V_I4(&vSrc), V_I4(&vDst), V_I4REF(&vSrc), V_I4REF(&vDst), "%d"); + COPYTEST(1l, VT_I4, V_I4(&vSrc), V_I4(&vDst), V_I4REF(&vSrc), V_I4REF(&vDst), "%ld"); }
static void test_VarI4ChangeTypeEx(void) @@ -1643,15 +1643,15 @@ static void test_VarI4ChangeTypeEx(void)
in = 1;
- INITIAL_TYPETEST(VT_I4, V_I4, "%d"); + INITIAL_TYPETEST(VT_I4, V_I4, "%ld"); COMMON_TYPETEST; - NEGATIVE_TYPETEST(VT_I4, V_I4, "%d", VT_UI4, V_UI4); + NEGATIVE_TYPETEST(VT_I4, V_I4, "%ld", VT_UI4, V_UI4); }
#undef CONV_TYPE #define CONV_TYPE ULONG #undef EXPECTRES -#define EXPECTRES(res, x) _EXPECTRES(res, x, "%u") +#define EXPECTRES(res, x) _EXPECTRES(res, x, "%lu")
static void test_VarUI4FromI1(void) { @@ -1854,7 +1854,7 @@ static void test_VarUI4FromStr(void)
static void test_VarUI4Copy(void) { - COPYTEST(1u, VT_UI4, V_UI4(&vSrc), V_UI4(&vDst), V_UI4REF(&vSrc), V_UI4REF(&vDst), "%u"); + COPYTEST(1lu, VT_UI4, V_UI4(&vSrc), V_UI4(&vDst), V_UI4REF(&vSrc), V_UI4REF(&vDst), "%lu"); }
static void test_VarUI4ChangeTypeEx(void) @@ -1865,9 +1865,9 @@ static void test_VarUI4ChangeTypeEx(void)
in = 1;
- INITIAL_TYPETEST(VT_UI4, V_UI4, "%u"); + INITIAL_TYPETEST(VT_UI4, V_UI4, "%lu"); COMMON_TYPETEST; - NEGATIVE_TYPETEST(VT_UI4, V_UI4, "%u", VT_I4, V_I4); + NEGATIVE_TYPETEST(VT_UI4, V_UI4, "%lu", VT_I4, V_I4); }
/* @@ -3118,7 +3118,7 @@ static void test_VarDateChangeTypeEx(void) hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, VARIANT_NOUSEROVERRIDE, VT_BSTR); ok(hres == S_OK && V_VT(&vDst) == VT_BSTR && V_BSTR(&vDst) && (!lstrcmpW(V_BSTR(&vDst), sz25570) || !lstrcmpW(V_BSTR(&vDst), sz25570_2)), - "hres=0x%X, type=%d (should be VT_BSTR), *bstr=%s\n", + "hres=0x%lX, type=%d (should be VT_BSTR), *bstr=%s\n", hres, V_VT(&vDst), V_BSTR(&vDst) ? wtoascii(V_BSTR(&vDst)) : "?"); VariantClear(&vDst);
@@ -3127,7 +3127,7 @@ static void test_VarDateChangeTypeEx(void) { hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, VARIANT_NOUSEROVERRIDE|VARIANT_USE_NLS, VT_BSTR); ok(hres == S_OK && V_VT(&vDst) == VT_BSTR && V_BSTR(&vDst) && !lstrcmpW(V_BSTR(&vDst), sz25570Nls), - "hres=0x%X, type=%d (should be VT_BSTR), *bstr=%s\n", + "hres=0x%lX, type=%d (should be VT_BSTR), *bstr=%s\n", hres, V_VT(&vDst), V_BSTR(&vDst) ? wtoascii(V_BSTR(&vDst)) : "?"); VariantClear(&vDst); } @@ -3142,11 +3142,11 @@ static void test_VarDateChangeTypeEx(void)
#define EXPECTCY(x) \ ok((hres == S_OK && out.int64 == (LONGLONG)(x*CY_MULTIPLIER)), \ - "expected " #x "*CY_MULTIPLIER, got (%8x %8x); hres=0x%08x\n", S(out).Hi, S(out).Lo, hres) + "expected " #x "*CY_MULTIPLIER, got (%8lx %8lx); hres=0x%08lx\n", S(out).Hi, S(out).Lo, hres)
#define EXPECTCY64(x,y) \ ok(hres == S_OK && S(out).Hi == (LONG)x && S(out).Lo == y, \ - "expected " #x " " #y " (%u,%u), got (%u,%u); hres=0x%08x\n", \ + "expected " #x " " #y " (%lu,%lu), got (%lu,%lu); hres=0x%08lx\n", \ (ULONG)(x), (ULONG)(y), S(out).Hi, S(out).Lo, hres)
static void test_VarCyFromI1(void) @@ -3618,7 +3618,7 @@ static void test_VarCyInt(void) #define EXPECTDEC(scl, sgn, hi, lo) ok(hres == S_OK && \ S(U(out)).scale == (BYTE)(scl) && S(U(out)).sign == (BYTE)(sgn) && \ out.Hi32 == (ULONG)(hi) && U1(out).Lo64 == (ULONG64)(lo), \ - "expected (%d,%d,%d,(%x %x)), got (%d,%d,%d,(%x %x)) hres 0x%08x\n", \ + "expected (%d,%d,%d,(%lx %lx)), got (%d,%d,%ld,(%lx %lx)) hres 0x%08lx\n", \ scl, sgn, hi, (LONG)((LONG64)(lo) >> 32), (LONG)((lo) & 0xffffffff), S(U(out)).scale, \ S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres)
@@ -3626,14 +3626,14 @@ static void test_VarCyInt(void) S(U(out)).scale == (BYTE)(scl) && S(U(out)).sign == (BYTE)(sgn) && \ out.Hi32 == (ULONG)(hi) && S1(U1(out)).Mid32 == (ULONG)(mid) && \ S1(U1(out)).Lo32 == (ULONG)(lo), \ - "expected (%d,%d,%d,(%x %x)), got (%d,%d,%d,(%x %x)) hres 0x%08x\n", \ + "expected (%d,%d,%d,(%lx %lx)), got (%d,%d,%ld,(%lx %lx)) hres 0x%08lx\n", \ scl, sgn, hi, (LONG)(mid), (LONG)(lo), S(U(out)).scale, \ S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres)
/* expect either a positive or negative zero */ #define EXPECTDECZERO() ok(hres == S_OK && S(U(out)).scale == 0 && \ (S(U(out)).sign == 0 || S(U(out)).sign == 0x80) && out.Hi32 == 0 && U1(out).Lo64 == 0, \ - "expected zero, got (%d,%d,%d,(%x %x)) hres 0x%08x\n", \ + "expected zero, got (%d,%d,%ld,(%lx %lx)) hres 0x%08lx\n", \ S(U(out)).scale, S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres)
#define EXPECTDECI if (i < 0) EXPECTDEC(0, 0x80, 0, -i); else EXPECTDEC(0, 0, 0, i) @@ -3887,14 +3887,14 @@ static void test_VarDecAdd(void) SETDEC64(l,0,0,0xffffffff,0xffffffff,0xffffffff);SETDEC(r,0,0x80,0,1); MATH2(VarDecAdd); EXPECTDEC64(0,0,0xffffffff,0xffffffff,0xfffffffe); SETDEC64(l,0,0,0xffffffff,0xffffffff,0xffffffff);SETDEC(r,0,0,0,1); MATH2(VarDecAdd); - ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%d,(%8x,%8x)x) hres 0x%08x\n", + ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%ld,(%8lx,%8lx)x) hres 0x%08lx\n", S(U(out)).scale, S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres);
SETDEC64(l,1,0,0xffffffff,0xffffffff,0xffffffff);SETDEC(r,1,0,0,1); MATH2(VarDecAdd); EXPECTDEC64(0,0,0x19999999,0x99999999,0x9999999A);
SETDEC64(l,0,0,0xe22ea493,0xb30310a7,0x70000000);SETDEC64(r,0,0,0xe22ea493,0xb30310a7,0x70000000); MATH2(VarDecAdd); - ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%d,(%8x,%8x)x) hres 0x%08x\n", + ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%ld,(%8lx,%8lx)x) hres 0x%08lx\n", S(U(out)).scale, S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres);
SETDEC64(l,1,0,0xe22ea493,0xb30310a7,0x70000000);SETDEC64(r,1,0,0xe22ea493,0xb30310a7,0x70000000); MATH2(VarDecAdd); @@ -3904,15 +3904,15 @@ static void test_VarDecAdd(void) MATH2(VarDecAdd); EXPECTDEC64(0,0,-1,0xFFFFFFFF,0xFFFFFF84);
SETDEC(l,3,0,0,123456); SETDEC64(r,0,0,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF); MATH2(VarDecAdd); - ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%d,(%8x,%8x)x) hres 0x%08x\n", + ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%ld,(%8lx,%8lx)x) hres 0x%08lx\n", S(U(out)).scale, S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres);
SETDEC(l,4,0,0,123456); SETDEC64(r,0,0,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF); MATH2(VarDecAdd); - ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%d,(%8x,%8x)x) hres 0x%08x\n", + ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%ld,(%8lx,%8lx)x) hres 0x%08lx\n", S(U(out)).scale, S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres);
SETDEC(l,5,0,0,123456); SETDEC64(r,0,0,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF); MATH2(VarDecAdd); - ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%d,(%8x,%8x)x) hres 0x%08x\n", + ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%ld,(%8lx,%8lx)x) hres 0x%08lx\n", S(U(out)).scale, S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres);
SETDEC(l,6,0,0,123456); SETDEC64(r,0,0,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF); @@ -3971,7 +3971,7 @@ static void test_VarDecMul(void) SETDEC64(l,0,0,0,0xFFFFFFFF,0xFFFFFFFF); SETDEC(r,0,0,0,2000000000); MATH2(VarDecMul);EXPECTDEC64(0,0,1999999999,0xFFFFFFFF,0x88CA6C00); /* actual overflow - right operand is 10 times the previous value */ SETDEC64(l,0,0,0,0xFFFFFFFF,0xFFFFFFFF); SETDEC64(r,0,0,0,4,0xA817C800); MATH2(VarDecMul); - ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%d,(%8x,%8x)x) hres 0x%08x\n", + ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%ld,(%8lx,%8lx)x) hres 0x%08lx\n", S(U(out)).scale, S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres); /* here, native oleaut32 has an opportunity to avert the overflow, by reducing the scale of the result */ SETDEC64(l,1,0,0,0xFFFFFFFF,0xFFFFFFFF); SETDEC64(r,0,0,0,4,0xA817C800); MATH2(VarDecMul);EXPECTDEC64(0,0,1999999999,0xFFFFFFFF,0x88CA6C00); @@ -3980,7 +3980,7 @@ static void test_VarDecMul(void) SETDEC64(l,0,0,1,0xFFFFFFFF,0xFFFFFFFE); SETDEC(r,0,0,0,1000000000); MATH2(VarDecMul);EXPECTDEC64(0,0,1999999999,0xFFFFFFFF,0x88CA6C00); /* actual overflow - right operand is 10 times the previous value */ SETDEC64(l,0,0,1,0xFFFFFFFF,0xFFFFFFFE); SETDEC64(r,0,0,0,2,0x540BE400); MATH2(VarDecMul); - ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%d,(%8x,%8x)x) hres 0x%08x\n", + ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%ld,(%8lx,%8lx)x) hres 0x%08lx\n", S(U(out)).scale, S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres); /* here, native oleaut32 has an opportunity to avert the overflow, by reducing the scale of the result */ SETDEC64(l,1,0,1,0xFFFFFFFF,0xFFFFFFFE); SETDEC64(r,0,0,0,2,0x540BE400); MATH2(VarDecMul);EXPECTDEC64(0,0,1999999999,0xFFFFFFFF,0x88CA6C00); @@ -4030,10 +4030,10 @@ static void test_VarDecDiv(void)
/* oddballs */ SETDEC(l,0,0,0,0); SETDEC(r,0,0,0,0); MATH2(VarDecDiv);/* indeterminate */ - ok(hres == DISP_E_DIVBYZERO,"Expected division-by-zero, got (%d,%d,%d,(%8x,%8x)x) hres 0x%08x\n", + ok(hres == DISP_E_DIVBYZERO,"Expected division-by-zero, got (%d,%d,%ld,(%8lx,%8lx)x) hres 0x%08lx\n", S(U(out)).scale, S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres); SETDEC(l,0,0,0,1); SETDEC(r,0,0,0,0); MATH2(VarDecDiv);/* division by zero */ - ok(hres == DISP_E_DIVBYZERO,"Expected division-by-zero, got (%d,%d,%d,(%8x,%8x)x) hres 0x%08x\n", + ok(hres == DISP_E_DIVBYZERO,"Expected division-by-zero, got (%d,%d,%ld,(%8lx,%8lx)x) hres 0x%08lx\n", S(U(out)).scale, S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres);
} @@ -4436,7 +4436,7 @@ static void test_VarBoolCopy(void) #define BOOL_STR(flags, str) hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, flags, VT_BSTR); \ ok(hres == S_OK && V_VT(&vDst) == VT_BSTR && \ V_BSTR(&vDst) && !memcmp(V_BSTR(&vDst), str, sizeof(str)), \ - "hres=0x%X, type=%d (should be VT_BSTR), *bstr='%c'\n", \ + "hres=0x%lX, type=%d (should be VT_BSTR), *bstr='%c'\n", \ hres, V_VT(&vDst), V_BSTR(&vDst) ? *V_BSTR(&vDst) : '?'); \ VariantClear(&vDst)
@@ -4495,7 +4495,7 @@ static void test_VarBstrFromI4(void)
value = -2147483648; hres = VarBstrFromI4(value, lcid, LOCALE_NOUSEROVERRIDE, &bstr); - ok(hres == S_OK, "got hres 0x%08x\n", hres); + ok(hres == S_OK, "got hres 0x%08lx\n", hres); if (bstr) { ok(memcmp(bstr, int_min, sizeof(int_min)) == 0, "string different\n"); @@ -4504,7 +4504,7 @@ static void test_VarBstrFromI4(void)
value = -42; hres = VarBstrFromI4(value, lcid, LOCALE_NOUSEROVERRIDE, &bstr); - ok(hres == S_OK, "got hres 0x%08x\n", hres); + ok(hres == S_OK, "got hres 0x%08lx\n", hres); if (bstr) { ok(memcmp(bstr, minus_42, sizeof(minus_42)) == 0, "string different\n"); @@ -4529,7 +4529,7 @@ static void test_VarBstrFromR4(void) lcid_spanish = MAKELCID(MAKELANGID(LANG_SPANISH, SUBLANG_SPANISH), SORT_DEFAULT); f = 654322.23456f; hres = VarBstrFromR4(f, lcid, 0, &bstr); - ok(hres == S_OK, "got hres 0x%08x\n", hres); + ok(hres == S_OK, "got hres 0x%08lx\n", hres); if (bstr) { ok(memcmp(bstr, szNative, sizeof(szNative)) == 0, "string different\n"); @@ -4538,7 +4538,7 @@ static void test_VarBstrFromR4(void)
f = -0.0; hres = VarBstrFromR4(f, lcid, 0, &bstr); - ok(hres == S_OK, "got hres 0x%08x\n", hres); + ok(hres == S_OK, "got hres 0x%08lx\n", hres); if (bstr) { if (bstr[0] == '-') @@ -4551,7 +4551,7 @@ static void test_VarBstrFromR4(void) /* The following tests that lcid is used for decimal separator even without LOCALE_USE_NLS */ f = 0.5; hres = VarBstrFromR4(f, lcid, LOCALE_NOUSEROVERRIDE, &bstr); - ok(hres == S_OK, "got hres 0x%08x\n", hres); + ok(hres == S_OK, "got hres 0x%08lx\n", hres); if (bstr) { ok(memcmp(bstr, szOneHalf_English, sizeof(szOneHalf_English)) == 0, "English locale failed (got %s)\n", wtoascii(bstr)); @@ -4559,7 +4559,7 @@ static void test_VarBstrFromR4(void) } f = 0.5; hres = VarBstrFromR4(f, lcid_spanish, LOCALE_NOUSEROVERRIDE, &bstr); - ok(hres == S_OK, "got hres 0x%08x\n", hres); + ok(hres == S_OK, "got hres 0x%08lx\n", hres); if (bstr) { ok(memcmp(bstr, szOneHalf_Spanish, sizeof(szOneHalf_Spanish)) == 0, "Spanish locale failed (got %s)\n", wtoascii(bstr)); @@ -4583,7 +4583,7 @@ static void _BSTR_DATE(DATE dt, const char *str, int line) else buff[0] = 0; ok_(__FILE__, line)(hres == S_OK && !strcmp(str, buff), - "Expected '%s', got '%s', hres = 0x%08x\n", str, buff, hres); + "Expected '%s', got '%s', hres = 0x%08lx\n", str, buff, hres); }
static void test_VarBstrFromDate(void) @@ -4614,7 +4614,7 @@ static void _BSTR_CY(LONG a, LONG b, const char *str, LCID lcid, int line) S(l).Lo = b; S(l).Hi = a; hr = VarBstrFromCy(l, lcid, LOCALE_NOUSEROVERRIDE, &bstr); - ok(hr == S_OK, "got hr 0x%08x\n", hr); + ok(hr == S_OK, "got hr 0x%08lx\n", hr);
if(bstr) { @@ -4665,7 +4665,7 @@ static void _BSTR_DEC(BYTE scale, BYTE sign, ULONG hi, ULONG mid, ULONGLONG lo,
SETDEC64(dec, scale, sign, hi, mid, lo); hr = VarBstrFromDec(&dec, lcid, LOCALE_NOUSEROVERRIDE, &bstr); - ok_(__FILE__, line)(hr == S_OK, "got hr 0x%08x\n", hr); + ok_(__FILE__, line)(hr == S_OK, "got hr 0x%08lx\n", hr);
if(bstr) { @@ -4739,7 +4739,7 @@ static void test_VarBstrFromDec(void)
#define _VARBSTRCMP(left,right,lcid,flags,result) \ hres = VarBstrCmp(left,right,lcid,flags); \ - ok(hres == result, "VarBstrCmp: expected " #result ", got hres=0x%x\n", hres) + ok(hres == result, "VarBstrCmp: expected " #result ", got hres=%#lx\n", hres) #define VARBSTRCMP(left,right,flags,result) \ _VARBSTRCMP(left,right,lcid,flags,result)
@@ -4872,7 +4872,7 @@ static void test_SysAllocString(void) DWORD_PTR p = (DWORD_PTR)str; int align = sizeof(void *);
- ok (bstr->dwLen == 8, "Expected 8, got %d\n", bstr->dwLen); + ok (bstr->dwLen == 8, "Expected 8, got %ld\n", bstr->dwLen); ok (!lstrcmpW(bstr->szString, szTest), "String different\n"); ok ((p & ~(align-1)) == p, "Not aligned to %d\n", align); SysFreeString(str); @@ -4897,7 +4897,7 @@ static void test_SysAllocStringLen(void) { LPINTERNAL_BSTR bstr = Get(str);
- ok (bstr->dwLen == 0, "Expected 0, got %d\n", bstr->dwLen); + ok (bstr->dwLen == 0, "Expected 0, got %ld\n", bstr->dwLen); ok (!bstr->szString[0], "String not empty\n"); SysFreeString(str); } @@ -4908,7 +4908,7 @@ static void test_SysAllocStringLen(void) { LPINTERNAL_BSTR bstr = Get(str);
- ok (bstr->dwLen == 8, "Expected 8, got %d\n", bstr->dwLen); + ok (bstr->dwLen == 8, "Expected 8, got %ld\n", bstr->dwLen); ok (!lstrcmpW(bstr->szString, szTest), "String different\n"); SysFreeString(str); } @@ -4937,7 +4937,7 @@ static void test_SysAllocStringByteLen(void) { LPINTERNAL_BSTR bstr = Get(str);
- ok (bstr->dwLen == 0, "Expected 0, got %d\n", bstr->dwLen); + ok (bstr->dwLen == 0, "Expected 0, got %ld\n", bstr->dwLen); ok (!bstr->szString[0], "String not empty\n"); SysFreeString(str); } @@ -4948,7 +4948,7 @@ static void test_SysAllocStringByteLen(void) { LPINTERNAL_BSTR bstr = Get(str);
- ok (bstr->dwLen == 4, "Expected 4, got %d\n", bstr->dwLen); + ok (bstr->dwLen == 4, "Expected 4, got %ld\n", bstr->dwLen); ok (!lstrcmpA((LPCSTR)bstr->szString, szTestA), "String different\n"); SysFreeString(str); } @@ -4961,7 +4961,7 @@ static void test_SysAllocStringByteLen(void) const CHAR szTestTruncA[4] = { 'T','e','s','\0' }; LPINTERNAL_BSTR bstr = Get(str);
- ok (bstr->dwLen == 3, "Expected 3, got %d\n", bstr->dwLen); + ok (bstr->dwLen == 3, "Expected 3, got %ld\n", bstr->dwLen); ok (!lstrcmpA((LPCSTR)bstr->szString, szTestTruncA), "String different\n"); ok (!bstr->szString[2], "String not terminated\n"); SysFreeString(str); @@ -4973,7 +4973,7 @@ static void test_SysAllocStringByteLen(void) { LPINTERNAL_BSTR bstr = Get(str);
- ok (bstr->dwLen == 8, "Expected 8, got %d\n", bstr->dwLen); + ok (bstr->dwLen == 8, "Expected 8, got %ld\n", bstr->dwLen); ok (!lstrcmpW(bstr->szString, szTest), "String different\n"); SysFreeString(str); } @@ -4988,7 +4988,7 @@ static void test_SysAllocStringByteLen(void) str = SysAllocStringByteLen(NULL, i); ok (str != NULL, "Expected non-NULL\n"); bstr = Get(str); - ok (bstr->dwLen == i, "Expected %d, got %d\n", i, bstr->dwLen); + ok (bstr->dwLen == i, "Expected %d, got %ld\n", i, bstr->dwLen); ok (!bstr->szString[(i+sizeof(WCHAR)-1)/sizeof(WCHAR)], "String not terminated\n"); SysFreeString(str);
@@ -4996,7 +4996,7 @@ static void test_SysAllocStringByteLen(void) str = SysAllocStringByteLen(buf, i); ok (str != NULL, "Expected non-NULL\n"); bstr = Get(str); - ok (bstr->dwLen == i, "Expected %d, got %d\n", i, bstr->dwLen); + ok (bstr->dwLen == i, "Expected %d, got %ld\n", i, bstr->dwLen); buf[i] = 0; ok (!lstrcmpA((LPCSTR)bstr->szString, buf), "String different\n"); ok (!bstr->szString[(i+sizeof(WCHAR)-1)/sizeof(WCHAR)], "String not terminated\n"); @@ -5020,7 +5020,7 @@ static void test_SysReAllocString(void) int changed;
bstr = Get(str); - ok (bstr->dwLen == 8, "Expected 8, got %d\n", bstr->dwLen); + ok (bstr->dwLen == 8, "Expected 8, got %ld\n", bstr->dwLen); ok (!lstrcmpW(bstr->szString, szTest), "String different\n");
changed = SysReAllocString(&str, szSmaller); @@ -5028,7 +5028,7 @@ static void test_SysReAllocString(void) /* Vista creates a new string, but older versions reuse the existing string. */ /*ok (str == oldstr, "Created new string\n");*/ bstr = Get(str); - ok (bstr->dwLen == 2, "Expected 2, got %d\n", bstr->dwLen); + ok (bstr->dwLen == 2, "Expected 2, got %ld\n", bstr->dwLen); ok (!lstrcmpW(bstr->szString, szSmaller), "String different\n");
changed = SysReAllocString(&str, szLarger); @@ -5036,7 +5036,7 @@ static void test_SysReAllocString(void) /* Early versions always make new strings rather than resizing */ /* ok (str == oldstr, "Created new string\n"); */ bstr = Get(str); - ok (bstr->dwLen == 12, "Expected 12, got %d\n", bstr->dwLen); + ok (bstr->dwLen == 12, "Expected 12, got %ld\n", bstr->dwLen); ok (!lstrcmpW(bstr->szString, szLarger), "String different\n");
SysFreeString(str); @@ -5058,7 +5058,7 @@ static void test_SysReAllocStringLen(void) int changed;
bstr = Get(str); - ok (bstr->dwLen == 8, "Expected 8, got %d\n", bstr->dwLen); + ok (bstr->dwLen == 8, "Expected 8, got %ld\n", bstr->dwLen); ok (!lstrcmpW(bstr->szString, szTest), "String different\n");
changed = SysReAllocStringLen(&str, szSmaller, 1); @@ -5066,7 +5066,7 @@ static void test_SysReAllocStringLen(void) /* Vista creates a new string, but older versions reuse the existing string. */ /*ok (str == oldstr, "Created new string\n");*/ bstr = Get(str); - ok (bstr->dwLen == 2, "Expected 2, got %d\n", bstr->dwLen); + ok (bstr->dwLen == 2, "Expected 2, got %ld\n", bstr->dwLen); ok (!lstrcmpW(bstr->szString, szSmaller), "String different\n");
changed = SysReAllocStringLen(&str, szLarger, 6); @@ -5074,7 +5074,7 @@ static void test_SysReAllocStringLen(void) /* Early versions always make new strings rather than resizing */ /* ok (str == oldstr, "Created new string\n"); */ bstr = Get(str); - ok (bstr->dwLen == 12, "Expected 12, got %d\n", bstr->dwLen); + ok (bstr->dwLen == 12, "Expected 12, got %ld\n", bstr->dwLen); ok (!lstrcmpW(bstr->szString, szLarger), "String different\n");
changed = SysReAllocStringLen(&str, str, 6); @@ -5144,9 +5144,9 @@ static void test_BstrCopy(void) V_BSTR(&vt1) = str; V_VT(&vt2) = VT_EMPTY; hres = VariantCopy(&vt2, &vt1); - ok (hres == S_OK,"Failed to copy binary bstring with hres 0x%08x\n", hres); + ok (hres == S_OK,"Failed to copy binary bstring with hres 0x%08lx\n", hres); bstr = Get(V_BSTR(&vt2)); - ok (bstr->dwLen == 3, "Expected 3, got %d\n", bstr->dwLen); + ok (bstr->dwLen == 3, "Expected 3, got %ld\n", bstr->dwLen); ok (!lstrcmpA((LPCSTR)bstr->szString, szTestTruncA), "String different\n"); VariantClear(&vt2); VariantClear(&vt1); @@ -5175,7 +5175,7 @@ if (0)
/* Concatenation of two NULL strings works */ ret = VarBstrCat(NULL, NULL, &res); - ok(ret == S_OK, "VarBstrCat failed: %08x\n", ret); + ok(ret == S_OK, "VarBstrCat failed: %08lx\n", ret); ok(res != NULL, "Expected a string\n"); ok(SysStringLen(res) == 0, "Expected a 0-length string\n"); SysFreeString(res); @@ -5184,13 +5184,13 @@ if (0)
/* Concatenation with one NULL arg */ ret = VarBstrCat(NULL, str1, &res); - ok(ret == S_OK, "VarBstrCat failed: %08x\n", ret); + ok(ret == S_OK, "VarBstrCat failed: %08lx\n", ret); ok(res != NULL, "Expected a string\n"); ok(SysStringLen(res) == SysStringLen(str1), "Unexpected length\n"); ok(!memcmp(res, sz1, SysStringLen(str1)), "Unexpected value\n"); SysFreeString(res); ret = VarBstrCat(str1, NULL, &res); - ok(ret == S_OK, "VarBstrCat failed: %08x\n", ret); + ok(ret == S_OK, "VarBstrCat failed: %08lx\n", ret); ok(res != NULL, "Expected a string\n"); ok(SysStringLen(res) == SysStringLen(str1), "Unexpected length\n"); ok(!memcmp(res, sz1, SysStringLen(str1)), "Unexpected value\n"); @@ -5199,7 +5199,7 @@ if (0) /* Concatenation of two zero-terminated strings */ str2 = SysAllocString(sz2); ret = VarBstrCat(str1, str2, &res); - ok(ret == S_OK, "VarBstrCat failed: %08x\n", ret); + ok(ret == S_OK, "VarBstrCat failed: %08lx\n", ret); ok(res != NULL, "Expected a string\n"); ok(SysStringLen(res) == ARRAY_SIZE(sz1sz2) - 1, "Unexpected length\n"); ok(!memcmp(res, sz1sz2, sizeof(sz1sz2)), "Unexpected value\n"); @@ -5213,7 +5213,7 @@ if (0) str2 = SysAllocStringLen(s2, ARRAY_SIZE(s2));
ret = VarBstrCat(str1, str2, &res); - ok(ret == S_OK, "VarBstrCat failed: %08x\n", ret); + ok(ret == S_OK, "VarBstrCat failed: %08lx\n", ret); ok(res != NULL, "Expected a string\n"); ok(SysStringLen(res) == ARRAY_SIZE(s1s2), "Unexpected length\n"); ok(!memcmp(res, s1s2, sizeof(s1s2)), "Unexpected value\n"); @@ -5231,7 +5231,7 @@ if (0) ok(len == (sizeof(str2A)-1)/sizeof(WCHAR), "got length %u\n", len);
ret = VarBstrCat(str1, str2, &res); - ok(ret == S_OK, "VarBstrCat failed: %08x\n", ret); + ok(ret == S_OK, "VarBstrCat failed: %08lx\n", ret); ok(res != NULL, "Expected a string\n"); len = (sizeof(str1A) + sizeof(str2A) - 2)/sizeof(WCHAR); ok(SysStringLen(res) == len, "got %d, expected %u\n", SysStringLen(res), len); @@ -5250,7 +5250,7 @@ if (0) ok(len == 0, "got length %u\n", len);
ret = VarBstrCat(str1, str2, &res); - ok(ret == S_OK, "VarBstrCat failed: %08x\n", ret); + ok(ret == S_OK, "VarBstrCat failed: %08lx\n", ret); ok(res != NULL, "Expected a string\n"); ok(SysStringLen(res) == 1, "got %d, expected 1\n", SysStringLen(res)); ok(!memcmp(res, "HA", 2), "got (%s)\n", (char*)res); @@ -5277,7 +5277,7 @@ static void test_IUnknownClear(void) V_UNKNOWN(&v) = (IUnknown*)&u.IDispatch_iface; hres = VariantClear(&v); ok(hres == S_OK && u.ref == 0 && V_VT(&v) == VT_EMPTY, - "clear unknown: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n", + "clear unknown: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n", S_OK, 0, VT_EMPTY, hres, u.ref, V_VT(&v));
/* But not when clearing a by-reference*/ @@ -5286,7 +5286,7 @@ static void test_IUnknownClear(void) V_UNKNOWNREF(&v) = &pu; hres = VariantClear(&v); ok(hres == S_OK && u.ref == 1 && V_VT(&v) == VT_EMPTY, - "clear dispatch: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n", + "clear dispatch: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n", S_OK, 1, VT_EMPTY, hres, u.ref, V_VT(&v)); }
@@ -5306,7 +5306,7 @@ static void test_IUnknownCopy(void) V_UNKNOWN(&vSrc) = pu; hres = VariantCopy(&vDst, &vSrc); ok(hres == S_OK && u.ref == 2 && V_VT(&vDst) == VT_UNKNOWN, - "copy unknown: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n", + "copy unknown: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n", S_OK, 2, VT_EMPTY, hres, u.ref, V_VT(&vDst));
/* AddRef is skipped on copy of by-reference IDispatch */ @@ -5316,7 +5316,7 @@ static void test_IUnknownCopy(void) V_UNKNOWNREF(&vSrc) = &pu; hres = VariantCopy(&vDst, &vSrc); ok(hres == S_OK && u.ref == 1 && V_VT(&vDst) == (VT_UNKNOWN|VT_BYREF), - "copy unknown: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n", + "copy unknown: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n", S_OK, 1, VT_DISPATCH, hres, u.ref, V_VT(&vDst));
/* AddRef is called copying by-reference IDispatch with indirection */ @@ -5326,7 +5326,7 @@ static void test_IUnknownCopy(void) V_UNKNOWNREF(&vSrc) = &pu; hres = VariantCopyInd(&vDst, &vSrc); ok(hres == S_OK && u.ref == 2 && V_VT(&vDst) == VT_UNKNOWN, - "copy unknown: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n", + "copy unknown: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n", S_OK, 2, VT_DISPATCH, hres, u.ref, V_VT(&vDst));
/* Indirection in place also calls AddRef */ @@ -5335,7 +5335,7 @@ static void test_IUnknownCopy(void) V_UNKNOWNREF(&vSrc) = &pu; hres = VariantCopyInd(&vSrc, &vSrc); ok(hres == S_OK && u.ref == 2 && V_VT(&vSrc) == VT_UNKNOWN, - "copy unknown: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n", + "copy unknown: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n", S_OK, 2, VT_DISPATCH, hres, u.ref, V_VT(&vSrc)); }
@@ -5360,7 +5360,7 @@ static void test_IUnknownChangeTypeEx(void) V_DISPATCH(&vDst) = (void*)0xdeadbeef; hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, 0, VT_DISPATCH); ok(hres == S_OK && V_VT(&vDst) == VT_DISPATCH && V_DISPATCH(&vDst) == NULL, - "change unk(src,dst): expected 0x%08x,%d,%p, got 0x%08x,%d,%p\n", + "change unk(src,dst): expected 0x%08lx,%d,%p, got 0x%08lx,%d,%p\n", S_OK, VT_DISPATCH, NULL, hres, V_VT(&vDst), V_DISPATCH(&vDst));
V_VT(&vSrc) = VT_UNKNOWN; @@ -5370,7 +5370,7 @@ static void test_IUnknownChangeTypeEx(void) hres = VariantChangeTypeEx(&vSrc, &vSrc, lcid, 0, VT_DISPATCH); ok(hres == S_OK && u.ref == 1 && V_VT(&vSrc) == VT_DISPATCH && V_DISPATCH(&vSrc) == (IDispatch*)pu, - "change unk(src=src): expected 0x%08x,%d,%d,%p, got 0x%08x,%d,%d,%p\n", + "change unk(src=src): expected 0x%08lx,%d,%d,%p, got 0x%08lx,%ld,%d,%p\n", S_OK, 1, VT_DISPATCH, pu, hres, u.ref, V_VT(&vSrc), V_DISPATCH(&vSrc));
/* =>IDispatch */ @@ -5382,7 +5382,7 @@ static void test_IUnknownChangeTypeEx(void) /* Note vSrc is not cleared, as final refcount is 2 */ ok(hres == S_OK && u.ref == 2 && V_VT(&vDst) == VT_UNKNOWN && V_UNKNOWN(&vDst) == pu, - "change unk(src,dst): expected 0x%08x,%d,%d,%p, got 0x%08x,%d,%d,%p\n", + "change unk(src,dst): expected 0x%08lx,%d,%d,%p, got 0x%08lx,%ld,%d,%p\n", S_OK, 2, VT_UNKNOWN, pu, hres, u.ref, V_VT(&vDst), V_UNKNOWN(&vDst));
/* Can't change unknown to anything else */ @@ -5413,7 +5413,7 @@ static void test_IUnknownChangeTypeEx(void)
hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, 0, vt); ok(hres == hExpected, - "change unk(badvar): vt %d expected 0x%08x, got 0x%08x\n", + "change unk(badvar): vt %d expected 0x%08lx, got 0x%08lx\n", vt, hExpected, hres); } } @@ -5435,7 +5435,7 @@ static void test_IDispatchClear(void) V_DISPATCH(&v) = pd; hres = VariantClear(&v); ok(hres == S_OK && d.ref == 0 && V_VT(&v) == VT_EMPTY, - "clear dispatch: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n", + "clear dispatch: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n", S_OK, 0, VT_EMPTY, hres, d.ref, V_VT(&v));
d.ref = 1; @@ -5443,7 +5443,7 @@ static void test_IDispatchClear(void) V_DISPATCHREF(&v) = &pd; hres = VariantClear(&v); ok(hres == S_OK && d.ref == 1 && V_VT(&v) == VT_EMPTY, - "clear dispatch: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n", + "clear dispatch: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n", S_OK, 1, VT_EMPTY, hres, d.ref, V_VT(&v)); }
@@ -5464,7 +5464,7 @@ static void test_IDispatchCopy(void) V_DISPATCH(&vSrc) = pd; hres = VariantCopy(&vDst, &vSrc); ok(hres == S_OK && d.ref == 2 && V_VT(&vDst) == VT_DISPATCH, - "copy dispatch: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n", + "copy dispatch: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n", S_OK, 2, VT_EMPTY, hres, d.ref, V_VT(&vDst));
VariantInit(&vDst); @@ -5473,7 +5473,7 @@ static void test_IDispatchCopy(void) V_DISPATCHREF(&vSrc) = &pd; hres = VariantCopy(&vDst, &vSrc); ok(hres == S_OK && d.ref == 1 && V_VT(&vDst) == (VT_DISPATCH|VT_BYREF), - "copy dispatch: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n", + "copy dispatch: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n", S_OK, 1, VT_DISPATCH, hres, d.ref, V_VT(&vDst));
VariantInit(&vDst); @@ -5482,7 +5482,7 @@ static void test_IDispatchCopy(void) V_DISPATCHREF(&vSrc) = &pd; hres = VariantCopyInd(&vDst, &vSrc); ok(hres == S_OK && d.ref == 2 && V_VT(&vDst) == VT_DISPATCH, - "copy dispatch: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n", + "copy dispatch: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n", S_OK, 2, VT_DISPATCH, hres, d.ref, V_VT(&vDst));
d.ref = 1; @@ -5490,7 +5490,7 @@ static void test_IDispatchCopy(void) V_DISPATCHREF(&vSrc) = &pd; hres = VariantCopyInd(&vSrc, &vSrc); ok(hres == S_OK && d.ref == 2 && V_VT(&vSrc) == VT_DISPATCH, - "copy dispatch: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n", + "copy dispatch: expected 0x%08lx, %d, %d, got 0x%08lx, %ld, %d\n", S_OK, 2, VT_DISPATCH, hres, d.ref, V_VT(&vSrc)); }
@@ -5514,7 +5514,7 @@ static void test_IDispatchChangeTypeEx(void) V_UNKNOWN(&vDst) = (void*)0xdeadbeef; hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, 0, VT_UNKNOWN); ok(hres == S_OK && V_VT(&vDst) == VT_UNKNOWN && V_UNKNOWN(&vDst) == NULL, - "change unk(src,dst): expected 0x%08x,%d,%p, got 0x%08x,%d,%p\n", + "change unk(src,dst): expected 0x%08lx,%d,%p, got 0x%08lx,%d,%p\n", S_OK, VT_UNKNOWN, NULL, hres, V_VT(&vDst), V_UNKNOWN(&vDst));
V_VT(&vSrc) = VT_DISPATCH; @@ -5524,7 +5524,7 @@ static void test_IDispatchChangeTypeEx(void) hres = VariantChangeTypeEx(&vSrc, &vSrc, lcid, 0, VT_UNKNOWN); ok(hres == S_OK && d.ref == 1 && V_VT(&vSrc) == VT_UNKNOWN && V_UNKNOWN(&vSrc) == (IUnknown*)pd, - "change disp(src=src): expected 0x%08x,%d,%d,%p, got 0x%08x,%d,%d,%p\n", + "change disp(src=src): expected 0x%08lx,%d,%d,%p, got 0x%08lx,%ld,%d,%p\n", S_OK, 1, VT_UNKNOWN, pd, hres, d.ref, V_VT(&vSrc), V_UNKNOWN(&vSrc));
/* =>IUnknown */ @@ -5536,7 +5536,7 @@ static void test_IDispatchChangeTypeEx(void) /* Note vSrc is not cleared, as final refcount is 2 */ ok(hres == S_OK && d.ref == 2 && V_VT(&vDst) == VT_UNKNOWN && V_UNKNOWN(&vDst) == (IUnknown*)pd, - "change disp(src,dst): expected 0x%08x,%d,%d,%p, got 0x%08x,%d,%d,%p\n", + "change disp(src,dst): expected 0x%08lx,%d,%d,%p, got 0x%08lx,%ld,%d,%p\n", S_OK, 2, VT_UNKNOWN, pd, hres, d.ref, V_VT(&vDst), V_UNKNOWN(&vDst));
/* FIXME: Verify that VARIANT_NOVALUEPROP prevents conversion to integral @@ -5581,7 +5581,7 @@ static void test_ErrorChangeTypeEx(void) }
ok(hres == hExpected, - "change err: vt %d expected 0x%08x, got 0x%08x\n", vt, hExpected, hres); + "change err: vt %d expected 0x%08lx, got 0x%08lx\n", vt, hExpected, hres); } }
@@ -5647,7 +5647,7 @@ static void test_EmptyChangeTypeEx(void) V_VT(&vDst) = VT_NULL;
hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, 0, vt); - ok(hres == hExpected, "change empty: vt %d expected 0x%08x, got 0x%08x, vt %d\n", + ok(hres == hExpected, "change empty: vt %d expected 0x%08lx, got 0x%08lx, vt %d\n", vt, hExpected, hres, V_VT(&vDst)); if (hres == S_OK) { @@ -5719,15 +5719,15 @@ static void test_NullChangeTypeEx(void) V_VT(&vDst) = VT_EMPTY;
hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, 0, vt); - ok(hres == hExpected, "change null: vt %d expected 0x%08x, got 0x%08x, vt %d\n", + ok(hres == hExpected, "change null: vt %d expected 0x%08lx, got 0x%08lx, vt %d\n", vt, hExpected, hres, V_VT(&vDst));
/* should work only for VT_NULL -> VT_NULL case */ if (hres == S_OK) - ok(V_VT(&vDst) == VT_NULL, "change null: VT_NULL expected 0x%08x, got 0x%08x, vt %d\n", + ok(V_VT(&vDst) == VT_NULL, "change null: VT_NULL expected 0x%08lx, got 0x%08lx, vt %d\n", hExpected, hres, V_VT(&vDst)); else - ok(V_VT(&vDst) == VT_EMPTY, "change null: vt %d expected 0x%08x, got 0x%08x, vt %d\n", + ok(V_VT(&vDst) == VT_EMPTY, "change null: vt %d expected 0x%08lx, got 0x%08lx, vt %d\n", vt, hExpected, hres, V_VT(&vDst)); } } @@ -5748,7 +5748,7 @@ static void test_UintChangeTypeEx(void) V_UI4(&vSrc) = -1; hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, 0, VT_I4); ok(hres == S_OK && V_VT(&vDst) == VT_I4 && V_I4(&vDst) == -1, - "change uint: Expected %d,0x%08x,%d got %d,0x%08x,%d\n", + "change uint: Expected %d,0x%08lx,%d got %d,0x%08lx,%ld\n", VT_I4, S_OK, -1, V_VT(&vDst), hres, V_I4(&vDst)); }
@@ -5811,19 +5811,19 @@ static void test_ChangeType_keep_dst(void) V_VT(&v1) = VT_BSTR; V_BSTR(&v1) = bstr; hres = VariantChangeTypeEx(&v1, &v1, 0, 0, VT_INT); - ok(hres == DISP_E_TYPEMISMATCH, "VariantChangeTypeEx returns %08x\n", hres); + ok(hres == DISP_E_TYPEMISMATCH, "VariantChangeTypeEx returns %08lx\n", hres); ok(V_VT(&v1) == VT_BSTR && V_BSTR(&v1) == bstr, "VariantChangeTypeEx changed dst variant\n"); V_VT(&v2) = VT_INT; V_INT(&v2) = 4; hres = VariantChangeTypeEx(&v2, &v1, 0, 0, VT_INT); - ok(hres == DISP_E_TYPEMISMATCH, "VariantChangeTypeEx returns %08x\n", hres); + ok(hres == DISP_E_TYPEMISMATCH, "VariantChangeTypeEx returns %08lx\n", hres); ok(V_VT(&v2) == VT_INT && V_INT(&v2) == 4, "VariantChangeTypeEx changed dst variant\n"); V_VT(&v2) = 0xff; /* incorrect variant type */ hres = VariantChangeTypeEx(&v2, &v1, 0, 0, VT_INT); - ok(hres == DISP_E_TYPEMISMATCH, "VariantChangeTypeEx returns %08x\n", hres); + ok(hres == DISP_E_TYPEMISMATCH, "VariantChangeTypeEx returns %08lx\n", hres); ok(V_VT(&v2) == 0xff, "VariantChangeTypeEx changed dst variant\n"); hres = VariantChangeTypeEx(&v2, &v1, 0, 0, VT_BSTR); - ok(hres == DISP_E_BADVARTYPE, "VariantChangeTypeEx returns %08x\n", hres); + ok(hres == DISP_E_BADVARTYPE, "VariantChangeTypeEx returns %08lx\n", hres); ok(V_VT(&v2) == 0xff, "VariantChangeTypeEx changed dst variant\n"); SysFreeString(bstr); } @@ -5930,43 +5930,43 @@ static void test_recinfo(void) filename = create_test_typelib(2); MultiByteToWideChar(CP_ACP, 0, filename, -1, filenameW, MAX_PATH); hr = LoadTypeLibEx(filenameW, REGKIND_NONE, &typelib); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
filename = create_test_typelib(3); MultiByteToWideChar(CP_ACP, 0, filename, -1, filename2W, MAX_PATH); hr = LoadTypeLibEx(filename2W, REGKIND_NONE, &typelib2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
typeinfo = NULL; found = 1; hr = ITypeLib_FindName(typelib, teststructW, 0, &typeinfo, &memid, &found); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(typeinfo != NULL, "got %p\n", typeinfo); hr = ITypeInfo_GetTypeAttr(typeinfo, &attr); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(IsEqualGUID(&attr->guid, &UUID_test_struct), "got %s\n", wine_dbgstr_guid(&attr->guid)); ok(attr->typekind == TKIND_RECORD, "got %d\n", attr->typekind);
typeinfo2 = NULL; found = 1; hr = ITypeLib_FindName(typelib, teststruct2W, 0, &typeinfo2, &memid, &found); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(typeinfo2 != NULL, "got %p\n", typeinfo2);
typeinfo3 = NULL; found = 1; hr = ITypeLib_FindName(typelib2, teststruct3W, 0, &typeinfo3, &memid, &found); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(typeinfo3 != NULL, "got %p\n", typeinfo3);
hr = GetRecordInfoFromTypeInfo(typeinfo, &recinfo); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = GetRecordInfoFromTypeInfo(typeinfo2, &recinfo2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = GetRecordInfoFromTypeInfo(typeinfo3, &recinfo3); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* IsMatchingType, these two records only differ in GUIDs */ ret = IRecordInfo_IsMatchingType(recinfo, recinfo2); @@ -5983,9 +5983,9 @@ static void test_recinfo(void)
size = 0; hr = IRecordInfo_GetSize(recinfo, &size); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(size == sizeof(struct test_struct), "got size %d\n", size); - ok(attr->cbSizeInstance == sizeof(struct test_struct), "got instance size %d\n", attr->cbSizeInstance); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(size == sizeof(struct test_struct), "got size %ld\n", size); + ok(attr->cbSizeInstance == sizeof(struct test_struct), "got instance size %ld\n", attr->cbSizeInstance); ITypeInfo_ReleaseTypeAttr(typeinfo, attr);
/* RecordInit() */ @@ -5995,8 +5995,8 @@ static void test_recinfo(void) teststruct.bstr = (void*)0xdeadbeef;
hr = IRecordInfo_RecordInit(recinfo, &teststruct); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(teststruct.hr == 0, "got 0x%08x\n", teststruct.hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(teststruct.hr == 0, "got 0x%08lx\n", teststruct.hr); ok(teststruct.b == 0, "got 0x%08x\n", teststruct.b); ok(teststruct.disp == NULL, "got %p\n", teststruct.disp); ok(teststruct.bstr == NULL, "got %p\n", teststruct.bstr); @@ -6010,20 +6010,20 @@ static void test_recinfo(void) teststruct.bstr = SysAllocString(testW); memset(&testcopy, 0, sizeof(testcopy)); hr = IRecordInfo_RecordCopy(recinfo, &teststruct, &testcopy); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(testcopy.hr == S_FALSE, "got 0x%08x\n", testcopy.hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(testcopy.hr == S_FALSE, "got 0x%08lx\n", testcopy.hr); ok(testcopy.b == VARIANT_TRUE, "got %d\n", testcopy.b); ok(testcopy.disp == teststruct.disp, "got %p\n", testcopy.disp); - ok(dispatch.ref == 11, "got %d\n", dispatch.ref); + ok(dispatch.ref == 11, "got %ld\n", dispatch.ref); ok(testcopy.bstr != teststruct.bstr, "got %p\n", testcopy.bstr); ok(!lstrcmpW(testcopy.bstr, teststruct.bstr), "got %s, %s\n", wine_dbgstr_w(testcopy.bstr), wine_dbgstr_w(teststruct.bstr));
/* RecordClear() */ hr = IRecordInfo_RecordClear(recinfo, &teststruct); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(teststruct.bstr == NULL, "got %p\n", teststruct.bstr); hr = IRecordInfo_RecordClear(recinfo, &testcopy); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(testcopy.bstr == NULL, "got %p\n", testcopy.bstr);
/* now the destination contains the interface pointer */ @@ -6032,8 +6032,8 @@ static void test_recinfo(void) dispatch.ref = 10;
hr = IRecordInfo_RecordCopy(recinfo, &teststruct, &testcopy); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dispatch.ref == 9, "got %d\n", dispatch.ref); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dispatch.ref == 9, "got %ld\n", dispatch.ref);
IRecordInfo_Release(recinfo);
@@ -6051,7 +6051,7 @@ START_TEST(vartype) has_i8 = GetProcAddress(hOleaut32, "VarI8FromI1") != NULL; has_locales = has_i8 && GetProcAddress(hOleaut32, "GetVarConversionLocaleSetting") != NULL;
- trace("LCIDs: System=0x%08x, User=0x%08x\n", GetSystemDefaultLCID(), + trace("LCIDs: System=0x%08lx, User=0x%08lx\n", GetSystemDefaultLCID(), GetUserDefaultLCID());
test_bstr_cache();
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/shdocvw/tests/Makefile.in | 1 - dlls/shdocvw/tests/shdocvw.c | 46 ++++++++++++++++++++-------------------- dlls/shdocvw/tests/shortcut.c | 12 +++++----- 3 files changed, 29 insertions(+), 30 deletions(-)
diff --git a/dlls/shdocvw/tests/Makefile.in b/dlls/shdocvw/tests/Makefile.in index 7fb0f544025..4c415363e2d 100644 --- a/dlls/shdocvw/tests/Makefile.in +++ b/dlls/shdocvw/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = shdocvw.dll IMPORTS = shell32 ole32 oleaut32 advapi32
diff --git a/dlls/shdocvw/tests/shdocvw.c b/dlls/shdocvw/tests/shdocvw.c index d54cf1613ac..fcfd4a644db 100644 --- a/dlls/shdocvw/tests/shdocvw.c +++ b/dlls/shdocvw/tests/shdocvw.c @@ -96,7 +96,7 @@ static void test_URLSubRegQueryA(void) buffer[sizeof(buffer)-1] = '\0'; /* called by inetcpl.cpl */ hr = pURLSubRegQueryA(regpath_iemain, default_page_url, REG_SZ, buffer, INTERNET_MAX_URL_LENGTH, -1); - ok(hr == E_FAIL || hr == S_OK, "got 0x%x (expected E_FAIL or S_OK)\n", hr); + ok(hr == E_FAIL || hr == S_OK, "got 0x%lx (expected E_FAIL or S_OK)\n", hr);
memset(buffer, '#', sizeof(buffer)-1); buffer[sizeof(buffer)-1] = '\0'; @@ -104,7 +104,7 @@ static void test_URLSubRegQueryA(void) hr = pURLSubRegQueryA(regpath_iemain, start_page, REG_SZ, buffer, INTERNET_MAX_URL_LENGTH, -1); len = lstrlenA(buffer); /* respect privacy: do not dump the url */ - ok(hr == S_OK, "got 0x%x and %d (expected S_OK)\n", hr, len); + ok(hr == S_OK, "got 0x%lx and %ld (expected S_OK)\n", hr, len);
/* test buffer length: just large enough */ memset(buffer, '#', sizeof(buffer)-1); @@ -113,7 +113,7 @@ static void test_URLSubRegQueryA(void) used = lstrlenA(buffer); /* respect privacy: do not dump the url */ ok((hr == S_OK) && (used == len), - "got 0x%x and %d (expected S_OK and %d)\n", hr, used, len); + "got 0x%lx and %ld (expected S_OK and %ld)\n", hr, used, len);
/* no space for terminating 0: result is truncated */ memset(buffer, '#', sizeof(buffer)-1); @@ -121,7 +121,7 @@ static void test_URLSubRegQueryA(void) hr = pURLSubRegQueryA(regpath_iemain, start_page, REG_SZ, buffer, len, -1); used = lstrlenA(buffer); ok((hr == S_OK) && (used == len - 1), - "got 0x%x and %d (expected S_OK and %d)\n", hr, used, len - 1); + "got 0x%lx and %ld (expected S_OK and %ld)\n", hr, used, len - 1);
/* no space for the complete result: truncate another char */ if (len > 1) { @@ -130,7 +130,7 @@ static void test_URLSubRegQueryA(void) hr = pURLSubRegQueryA(regpath_iemain, start_page, REG_SZ, buffer, len-1, -1); used = lstrlenA(buffer); ok((hr == S_OK) && (used == (len - 2)), - "got 0x%x and %d (expected S_OK and %d)\n", hr, used, len - 2); + "got 0x%lx and %ld (expected S_OK and %ld)\n", hr, used, len - 2); }
/* only space for the terminating 0: function still succeeded */ @@ -139,7 +139,7 @@ static void test_URLSubRegQueryA(void) hr = pURLSubRegQueryA(regpath_iemain, start_page, REG_SZ, buffer, 1, -1); used = lstrlenA(buffer); ok((hr == S_OK) && !used, - "got 0x%x and %d (expected S_OK and 0)\n", hr, used); + "got 0x%lx and %ld (expected S_OK and 0)\n", hr, used);
/* size of buffer is 0, but the function still succeed. buffer[0] is cleared in IE 5.01 and IE 5.5 (Buffer Overflow) */ @@ -149,23 +149,23 @@ static void test_URLSubRegQueryA(void) used = lstrlenA(buffer); ok( (hr == S_OK) && ((used == INTERNET_MAX_URL_LENGTH - 1) || broken(used == 0)) , - "got 0x%x and %d (expected S_OK and INTERNET_MAX_URL_LENGTH - 1)\n", + "got 0x%lx and %ld (expected S_OK and INTERNET_MAX_URL_LENGTH - 1)\n", hr, used);
/* still succeed without a buffer for the result */ hr = pURLSubRegQueryA(regpath_iemain, start_page, REG_SZ, NULL, 0, -1); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr);
/* still succeed, when a length is given without a buffer */ hr = pURLSubRegQueryA(regpath_iemain, start_page, REG_SZ, NULL, INTERNET_MAX_URL_LENGTH, -1); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr);
/* this value does not exist */ memset(buffer, '#', sizeof(buffer)-1); buffer[sizeof(buffer)-1] = '\0'; hr = pURLSubRegQueryA(regpath_iemain, does_not_exist, REG_SZ, buffer, INTERNET_MAX_URL_LENGTH, -1); /* random bytes are copied to the buffer */ - ok((hr == E_FAIL), "got 0x%x (expected E_FAIL)\n", hr); + ok((hr == E_FAIL), "got 0x%lx (expected E_FAIL)\n", hr);
/* the third parameter is ignored. Is it really a type? (data is REG_SZ) */ memset(buffer, '#', sizeof(buffer)-1); @@ -173,20 +173,20 @@ static void test_URLSubRegQueryA(void) hr = pURLSubRegQueryA(regpath_iemain, start_page, REG_DWORD, buffer, INTERNET_MAX_URL_LENGTH, -1); used = lstrlenA(buffer); ok((hr == S_OK) && (used == len), - "got 0x%x and %d (expected S_OK and %d)\n", hr, used, len); + "got 0x%lx and %ld (expected S_OK and %ld)\n", hr, used, len);
/* the function works for HKCU and HKLM */ memset(buffer, '#', sizeof(buffer)-1); buffer[sizeof(buffer)-1] = '\0'; hr = pURLSubRegQueryA(regpath_shellfolders, appdata, REG_SZ, buffer, INTERNET_MAX_URL_LENGTH, -1); used = lstrlenA(buffer); - ok(hr == S_OK, "got 0x%x and %d (expected S_OK)\n", hr, used); + ok(hr == S_OK, "got 0x%lx and %ld (expected S_OK)\n", hr, used);
memset(buffer, '#', sizeof(buffer)-1); buffer[sizeof(buffer)-1] = '\0'; hr = pURLSubRegQueryA(regpath_shellfolders, common_appdata, REG_SZ, buffer, INTERNET_MAX_URL_LENGTH, -1); used = lstrlenA(buffer); - ok(hr == S_OK, "got 0x%x and %d (expected S_OK)\n", hr, used); + ok(hr == S_OK, "got 0x%lx and %ld (expected S_OK)\n", hr, used);
/* todo: what does the last parameter mean? */ } @@ -217,7 +217,7 @@ static void test_ParseURLFromOutsideSourceA(void) /* len does not include the terminating 0, when buffer is large enough */ ok( res != 0 && len == ParseURL_table[i].len && !lstrcmpA(buffer, ParseURL_table[i].newurl), - "#%d: got %d and %d with '%s' (expected '!=0' and %d with '%s')\n", + "#%d: got %ld and %ld with '%s' (expected '!=0' and %ld with '%s')\n", i, res, len, buffer, ParseURL_table[i].len, ParseURL_table[i].newurl);
@@ -233,7 +233,7 @@ static void test_ParseURLFromOutsideSourceA(void) res = pParseURLFromOutsideSourceA(ParseURL_table[i].url, buffer, &len, &dummy); ok( res != 0 && len == ParseURL_table[i].len && !lstrcmpA(buffer, ParseURL_table[i].newurl), - "#%d (+1): got %d and %d with '%s' (expected '!=0' and %d with '%s')\n", + "#%d (+1): got %ld and %ld with '%s' (expected '!=0' and %ld with '%s')\n", i, res, len, buffer, ParseURL_table[i].len, ParseURL_table[i].newurl);
memset(buffer, '#', sizeof(buffer)-1); @@ -243,7 +243,7 @@ static void test_ParseURLFromOutsideSourceA(void) res = pParseURLFromOutsideSourceA(ParseURL_table[i].url, buffer, &len, &dummy); /* len includes the terminating 0, when the buffer is too small */ ok( res == 0 && len == ParseURL_table[i].len + 1, - "#%d (==): got %d and %d (expected '0' and %d)\n", + "#%d (==): got %ld and %ld (expected '0' and %ld)\n", i, res, len, ParseURL_table[i].len + 1);
memset(buffer, '#', sizeof(buffer)-1); @@ -253,7 +253,7 @@ static void test_ParseURLFromOutsideSourceA(void) res = pParseURLFromOutsideSourceA(ParseURL_table[i].url, buffer, &len, &dummy); /* len includes the terminating 0 on XP SP1 and before, when the buffer is too small */ ok( res == 0 && (len == ParseURL_table[i].len || len == ParseURL_table[i].len + 1), - "#%d (-1): got %d and %d (expected '0' and %d or %d)\n", + "#%d (-1): got %ld and %ld (expected '0' and %ld or %ld)\n", i, res, len, ParseURL_table[i].len, ParseURL_table[i].len + 1);
memset(buffer, '#', sizeof(buffer)-1); @@ -263,7 +263,7 @@ static void test_ParseURLFromOutsideSourceA(void) res = pParseURLFromOutsideSourceA(ParseURL_table[i].url, NULL, &len, &dummy); /* len does not include the terminating 0, when buffer is NULL */ ok( res == 0 && len == ParseURL_table[i].len, - "#%d (buffer): got %d and %d (expected '0' and %d)\n", + "#%d (buffer): got %ld and %ld (expected '0' and %ld)\n", i, res, len, ParseURL_table[i].len);
if (0) { @@ -278,7 +278,7 @@ static void test_ParseURLFromOutsideSourceA(void) res = pParseURLFromOutsideSourceA(ParseURL_table[i].url, buffer, &len, NULL); ok( res != 0 && len == ParseURL_table[i].len && !lstrcmpA(buffer, ParseURL_table[i].newurl), - "#%d (unknown): got %d and %d with '%s' (expected '!=0' and %d with '%s')\n", + "#%d (unknown): got %ld and %ld with '%s' (expected '!=0' and %ld with '%s')\n", i, res, len, buffer, ParseURL_table[i].len, ParseURL_table[i].newurl); } } @@ -312,7 +312,7 @@ static void test_ParseURLFromOutsideSourceW(void) WideCharToMultiByte(CP_ACP, 0, bufferW, -1, bufferA, sizeof(bufferA), NULL, NULL); ok( res != 0 && len == ParseURL_table[0].len && !lstrcmpA(bufferA, ParseURL_table[0].newurl), - "got %d and %d with '%s' (expected '!=0' and %d with '%s')\n", + "got %ld and %ld with '%s' (expected '!=0' and %ld with '%s')\n", res, len, bufferA, ParseURL_table[0].len, ParseURL_table[0].newurl);
@@ -328,7 +328,7 @@ static void test_ParseURLFromOutsideSourceW(void) /* len does not include the terminating 0, when buffer is large enough */ ok( res != 0 && len == ParseURL_table[0].len && !lstrcmpA(bufferA, ParseURL_table[0].newurl), - "+1: got %d and %d with '%s' (expected '!=0' and %d with '%s')\n", + "+1: got %ld and %ld with '%s' (expected '!=0' and %ld with '%s')\n", res, len, bufferA, ParseURL_table[0].len, ParseURL_table[0].newurl);
len = maxlen; @@ -336,7 +336,7 @@ static void test_ParseURLFromOutsideSourceW(void) res = pParseURLFromOutsideSourceW(urlW, bufferW, &len, &dummy); /* len includes the terminating 0, when the buffer is too small */ ok( res == 0 && len == ParseURL_table[0].len + 1, - "==: got %d and %d (expected '0' and %d)\n", + "==: got %ld and %ld (expected '0' and %ld)\n", res, len, ParseURL_table[0].len + 1);
len = maxlen - 1; @@ -344,7 +344,7 @@ static void test_ParseURLFromOutsideSourceW(void) res = pParseURLFromOutsideSourceW(urlW, bufferW, &len, &dummy); /* len includes the terminating 0 on XP SP1 and before, when the buffer is too small */ ok( res == 0 && (len == ParseURL_table[0].len || len == ParseURL_table[0].len + 1), - "-1: got %d and %d (expected '0' and %d or %d)\n", + "-1: got %ld and %ld (expected '0' and %ld or %ld)\n", res, len, ParseURL_table[0].len, ParseURL_table[0].len + 1);
} diff --git a/dlls/shdocvw/tests/shortcut.c b/dlls/shdocvw/tests/shortcut.c index 5cf1c4bad7f..c744b01ca21 100644 --- a/dlls/shdocvw/tests/shortcut.c +++ b/dlls/shdocvw/tests/shortcut.c @@ -172,7 +172,7 @@ static void test_ShortcutFolder(void) { register_keys(HKEY_CLASSES_ROOT, HKEY_CLASSES_ROOT_keys, 1);
hr = SHGetDesktopFolder(&pDesktopFolder); - ok (SUCCEEDED(hr), "SHGetDesktopFolder failed! hr = %08x\n", hr); + ok (SUCCEEDED(hr), "SHGetDesktopFolder failed! hr = %08lx\n", hr); if (FAILED(hr)) goto cleanup;
/* Convert the wszWineTestFolder string to an ITEMIDLIST. */ @@ -181,7 +181,7 @@ static void test_ShortcutFolder(void) { todo_wine { ok (hr == HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), - "Expected %08x, got %08x\n", HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), hr); + "Expected %08lx, got %08lx\n", HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), hr); } if (FAILED(hr)) { IShellFolder_Release(pDesktopFolder); @@ -196,22 +196,22 @@ static void test_ShortcutFolder(void) { (LPVOID*)&pWineTestFolder); IShellFolder_Release(pDesktopFolder); ILFree(pidlWineTestFolder); - ok (SUCCEEDED(hr), "IShellFolder::BindToObject(WineTestFolder) failed! hr = %08x\n", hr); + ok (SUCCEEDED(hr), "IShellFolder::BindToObject(WineTestFolder) failed! hr = %08lx\n", hr); if (FAILED(hr)) goto cleanup;
hr = IShellFolder_QueryInterface(pWineTestFolder, &IID_IPersistFolder3, (LPVOID*)&pWineTestPersistFolder); - ok (SUCCEEDED(hr), "IShellFolder::QueryInterface(IPersistFolder3) failed! hr = %08x\n", hr); + ok (SUCCEEDED(hr), "IShellFolder::QueryInterface(IPersistFolder3) failed! hr = %08lx\n", hr); IShellFolder_Release(pWineTestFolder); if (FAILED(hr)) goto cleanup;
/* The resulting folder object has the FolderShortcut CLSID, instead of its own. */ hr = IPersistFolder3_GetClassID(pWineTestPersistFolder, &clsid); - ok (SUCCEEDED(hr), "IPersist::GetClassID failed! hr = %08x\n", hr); + ok (SUCCEEDED(hr), "IPersist::GetClassID failed! hr = %08lx\n", hr); ok (IsEqualCLSID(&CLSID_FolderShortcut, &clsid), "GetClassId returned wrong CLSID!\n");
pidlCurFolder = (LPITEMIDLIST)0xdeadbeef; hr = IPersistFolder3_GetCurFolder(pWineTestPersistFolder, &pidlCurFolder); - ok (SUCCEEDED(hr), "IPersistFolder3::GetCurFolder failed! hr = %08x\n", hr); + ok (SUCCEEDED(hr), "IPersistFolder3::GetCurFolder failed! hr = %08lx\n", hr); ok (pidlCurFolder->mkid.cb == 20 && ((LPSHITEMID)((BYTE*)pidlCurFolder+20))->cb == 0 && IsEqualCLSID(&CLSID_WineTest, (REFCLSID)((LPBYTE)pidlCurFolder+4)), "GetCurFolder returned unexpected pidl!\n");
Signed-off-by: Jacek Caban jacek@codeweavers.com
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/shell32/tests/recyclebin.c | 2 +- dlls/shell32/tests/shlfileop.c | 9 +++++---- dlls/shell32/tests/shlfolder.c | 16 +++++++++------- 3 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/dlls/shell32/tests/recyclebin.c b/dlls/shell32/tests/recyclebin.c index 50e262e918d..9207872d40f 100644 --- a/dlls/shell32/tests/recyclebin.c +++ b/dlls/shell32/tests/recyclebin.c @@ -39,7 +39,7 @@ static void test_query_recyclebin(void) { SHQUERYRBINFO info1={sizeof(info1),0xdeadbeef,0xdeadbeef}; SHQUERYRBINFO info2={sizeof(info2),0xdeadbeef,0xdeadbeef}; - UINT written; + DWORD written; HRESULT hr; HANDLE file; SHFILEOPSTRUCTA shfo; diff --git a/dlls/shell32/tests/shlfileop.c b/dlls/shell32/tests/shlfileop.c index 1c7f25ccd52..180ff4b1108 100644 --- a/dlls/shell32/tests/shlfileop.c +++ b/dlls/shell32/tests/shlfileop.c @@ -290,7 +290,8 @@ static void check_icon_size( HICON icon, DWORD flags ) { ICONINFO info; BITMAP bm; - SIZE list_size, metrics_size; + SIZE metrics_size; + int list_cx, list_cy; IImageList *list;
GetIconInfo( icon, &info ); @@ -298,7 +299,7 @@ static void check_icon_size( HICON icon, DWORD flags )
SHGetImageList( (flags & SHGFI_SMALLICON) ? SHIL_SMALL : SHIL_LARGE, &IID_IImageList, (void **)&list ); - IImageList_GetIconSize( list, &list_size.cx, &list_size.cy ); + IImageList_GetIconSize( list, &list_cx, &list_cy ); IImageList_Release( list );
metrics_size.cx = GetSystemMetrics( (flags & SHGFI_SMALLICON) ? SM_CXSMICON : SM_CXICON ); @@ -307,8 +308,8 @@ static void check_icon_size( HICON icon, DWORD flags )
if (flags & SHGFI_SHELLICONSIZE) { - ok( bm.bmWidth == list_size.cx, "got %d expected %d\n", bm.bmWidth, list_size.cx ); - ok( bm.bmHeight == list_size.cy, "got %d expected %d\n", bm.bmHeight, list_size.cy ); + ok( bm.bmWidth == list_cx, "got %d expected %d\n", bm.bmWidth, list_cx ); + ok( bm.bmHeight == list_cy, "got %d expected %d\n", bm.bmHeight, list_cy ); } else { diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c index 13108f92246..608d4defcb9 100644 --- a/dlls/shell32/tests/shlfolder.c +++ b/dlls/shell32/tests/shlfolder.c @@ -3311,7 +3311,8 @@ static void test_SHCreateShellItemArray(void) if(SUCCEEDED(hr)) { LPITEMIDLIST apidl[5]; - UINT done, numitems, i; + UINT done; + DWORD numitems, i;
for(done = 0; done < 5; done++) if(IEnumIDList_Next(peidl, 1, &apidl[done], NULL) != S_OK) @@ -3387,7 +3388,7 @@ static void test_SHCreateShellItemArray(void) if(SUCCEEDED(hr)) { IShellItem *psi2; - UINT count; + DWORD count; hr = IShellItemArray_GetCount(psia, &count); ok(hr == S_OK, "Got 0x%08x\n", hr); ok(count == 1, "Got count %d\n", count); @@ -3464,7 +3465,7 @@ static void test_SHCreateShellItemArray(void) ok(hr == S_OK, "Got 0x%08x\n", hr); if(SUCCEEDED(hr)) { - UINT count_sia, i; + DWORD count_sia, i; hr = IShellItemArray_GetCount(psia, &count_sia); ok(hr == S_OK, "Got 0x%08x\n", hr); ok(count_sia == count, "Counts differ (%d, %d)\n", count, count_sia); @@ -3544,7 +3545,7 @@ static void test_SHCreateShellItemArray(void) if(SUCCEEDED(hr)) { IShellItem *psi; - UINT count = 0; + DWORD count = 0;
hr = IShellItemArray_GetCount(psia, &count); ok(hr == S_OK, "Got 0x%08x\n", hr); @@ -3597,7 +3598,7 @@ static void test_SHCreateShellItemArray(void) if(SUCCEEDED(hr)) { IShellItem *psi; - UINT count = 0; + DWORD count = 0;
hr = IShellItemArray_GetCount(psia, &count); ok(hr == S_OK, "Got 0x%08x\n", hr); @@ -3639,7 +3640,7 @@ static void test_SHCreateShellItemArray(void) if(SUCCEEDED(hr)) { IShellItem *psi; - UINT count = 0; + DWORD count = 0;
hr = IShellItemArray_GetCount(psia, &count); ok(hr == S_OK, "Got 0x%08x\n", hr); @@ -3731,7 +3732,8 @@ static void test_ShellItemArrayEnumItems(void) { IShellItemArray *psia; LPITEMIDLIST apidl[5]; - UINT done, numitems, i; + UINT done; + DWORD numitems, i;
for(done = 0; done < 5; done++) if(IEnumIDList_Next(peidl, 1, &apidl[done], NULL) != S_OK)
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=109866
Your paranoid android.
=== w1064v1809 (32 bit report) ===
shell32: shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3)
=== w1064_tsign (32 bit report) ===
shell32: shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 40000) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3)
=== w10pro64 (32 bit report) ===
shell32: shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 4000000) shlfolder.c:4912: Test failed: MKDIR: expected notification type 8, got: 40000 shlfolder.c:4919: Test failed: GetDisplayNameOf failed: 0x80070057 shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 4000000) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 8) shlfolder.c:4912: Test failed: RMDIR: expected notification type 10, got: 40000 shlfolder.c:4919: Test failed: GetDisplayNameOf failed: 0x80070057 shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 10) shlfolder.c:4912: Test failed: CREATE: expected notification type 2, got: 40000 shlfolder.c:4919: Test failed: GetDisplayNameOf failed: 0x80070057 shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3)
=== w1064v1809 (64 bit report) ===
shell32: shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3)
=== w1064_tsign (64 bit report) ===
shell32: shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 4000000) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 40000) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 4000000) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 4000000) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 4000000) shlfolder.c:4912: Test failed: RMDIR: expected notification type 10, got: 40000 shlfolder.c:4919: Test failed: GetDisplayNameOf failed: 0x80070057 shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 10) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3)
=== w10pro64 (64 bit report) ===
shell32: shlfolder.c:4912: Test failed: MKDIR: expected notification type 8, got: 4000000 shlfolder.c:4919: Test failed: GetDisplayNameOf failed: 0x80070057 shlfolder.c:4920: Test failed: Expected PIDL to be NULL shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 8) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 40000) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 4000000) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3)
=== w10pro64_ar (64 bit report) ===
shell32: shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4912: Test failed: MKDIR: expected notification type 8, got: 40000 shlfolder.c:4919: Test failed: GetDisplayNameOf failed: 0x80070057 shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4912: Test failed: CREATE: expected notification type 2, got: 40000 shlfolder.c:4919: Test failed: GetDisplayNameOf failed: 0x80070057 shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3)
=== w10pro64_he (64 bit report) ===
shell32: shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4912: Test failed: MKDIR: expected notification type 8, got: 40000 shlfolder.c:4919: Test failed: GetDisplayNameOf failed: 0x80070057 shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4912: Test failed: CREATE: expected notification type 2, got: 40000 shlfolder.c:4919: Test failed: GetDisplayNameOf failed: 0x80070057 shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3)
=== w10pro64_ja (64 bit report) ===
shell32: shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 4000000) shlfolder.c:4912: Test failed: CREATE: expected notification type 2, got: 40000 shlfolder.c:4919: Test failed: GetDisplayNameOf failed: 0x80070057 shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 2) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 4000000) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 4000000) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 4000000) shlfolder.c:4912: Test failed: RMDIR: expected notification type 10, got: 40000 shlfolder.c:4919: Test failed: GetDisplayNameOf failed: 0x80070057 shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 10) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3)
=== w10pro64_zh_CN (64 bit report) ===
shell32: shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 4000000) shlfolder.c:4912: Test failed: RMDIR: expected notification type 10, got: 40000 shlfolder.c:4919: Test failed: GetDisplayNameOf failed: 0x80070057 shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 10) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4912: Test failed: MKDIR: expected notification type 8, got: 40000 shlfolder.c:4919: Test failed: GetDisplayNameOf failed: 0x80070057 shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4912: Test failed: RMDIR: expected notification type 10, got: 40000 shlfolder.c:4919: Test failed: GetDisplayNameOf failed: 0x80070057 shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3)
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/shell32/tests/Makefile.in | 1 dlls/shell32/tests/appbar.c | 18 - dlls/shell32/tests/assoc.c | 80 +-- dlls/shell32/tests/autocomplete.c | 76 +- dlls/shell32/tests/brsfolder.c | 34 + dlls/shell32/tests/ebrowser.c | 314 +++++----- dlls/shell32/tests/msg.h | 8 dlls/shell32/tests/recyclebin.c | 4 dlls/shell32/tests/shelldispatch.c | 438 +++++++------- dlls/shell32/tests/shelllink.c | 274 ++++----- dlls/shell32/tests/shellole.c | 74 +- dlls/shell32/tests/shellpath.c | 260 ++++----- dlls/shell32/tests/shfldr_special.c | 66 +- dlls/shell32/tests/shlexec.c | 202 +++---- dlls/shell32/tests/shlfileop.c | 278 +++++---- dlls/shell32/tests/shlfolder.c | 1070 ++++++++++++++++++----------------- dlls/shell32/tests/shlview.c | 194 +++--- 17 files changed, 1695 insertions(+), 1696 deletions(-)
diff --git a/dlls/shell32/tests/Makefile.in b/dlls/shell32/tests/Makefile.in index 9abd0d1e353..08a7d3af3a6 100644 --- a/dlls/shell32/tests/Makefile.in +++ b/dlls/shell32/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = shell32.dll IMPORTS = shell32 ole32 oleaut32 user32 gdi32 advapi32 shlwapi
diff --git a/dlls/shell32/tests/appbar.c b/dlls/shell32/tests/appbar.c index e1c050bbc16..8b71a90ba7a 100644 --- a/dlls/shell32/tests/appbar.c +++ b/dlls/shell32/tests/appbar.c @@ -78,19 +78,19 @@ static void testwindow_setpos(HWND hwnd) switch (info->edge) { case ABE_BOTTOM: - ok(info->desired_rect.top == abd.rc.top, "ABM_QUERYPOS changed top of rect from %i to %i\n", info->desired_rect.top, abd.rc.top); + ok(info->desired_rect.top == abd.rc.top, "ABM_QUERYPOS changed top of rect from %li to %li\n", info->desired_rect.top, abd.rc.top); abd.rc.top = abd.rc.bottom - (info->desired_rect.bottom - info->desired_rect.top); break; case ABE_LEFT: - ok(info->desired_rect.right == abd.rc.right, "ABM_QUERYPOS changed right of rect from %i to %i\n", info->desired_rect.right, abd.rc.right); + ok(info->desired_rect.right == abd.rc.right, "ABM_QUERYPOS changed right of rect from %li to %li\n", info->desired_rect.right, abd.rc.right); abd.rc.right = abd.rc.left + (info->desired_rect.right - info->desired_rect.left); break; case ABE_RIGHT: - ok(info->desired_rect.left == abd.rc.left, "ABM_QUERYPOS changed left of rect from %i to %i\n", info->desired_rect.left, abd.rc.left); + ok(info->desired_rect.left == abd.rc.left, "ABM_QUERYPOS changed left of rect from %li to %li\n", info->desired_rect.left, abd.rc.left); abd.rc.left = abd.rc.right - (info->desired_rect.right - info->desired_rect.left); break; case ABE_TOP: - ok(info->desired_rect.bottom == abd.rc.bottom, "ABM_QUERYPOS changed bottom of rect from %i to %i\n", info->desired_rect.bottom, abd.rc.bottom); + ok(info->desired_rect.bottom == abd.rc.bottom, "ABM_QUERYPOS changed bottom of rect from %li to %li\n", info->desired_rect.bottom, abd.rc.bottom); abd.rc.bottom = abd.rc.top + (info->desired_rect.bottom - info->desired_rect.top); break; } @@ -339,7 +339,7 @@ static void test_setpos(void) win_skip("Some broken Vista boxes don't move the higher appbar down\n"); else ok(windows[1].allocated_rect.bottom == expected_bottom, - "windows[1]'s bottom is %i, expected %i\n", + "windows[1]'s bottom is %li, expected %i\n", windows[1].allocated_rect.bottom, expected_bottom);
test_window_rects(1, 2); @@ -432,7 +432,7 @@ static void test_GetCurrentProcessExplicitAppUserModelID(void) appid = (void*)0xdeadbeef; hr = pGetCurrentProcessExplicitAppUserModelID(&appid); todo_wine - ok(hr == E_FAIL, "got 0x%08x\n", hr); + ok(hr == E_FAIL, "got 0x%08lx\n", hr); ok(appid == NULL, "got %p\n", appid); }
@@ -450,14 +450,14 @@ static void test_SHGetPropertyStoreForWindow(void)
unk = (IUnknown *)0xdeadbeef; hr = pSHGetPropertyStoreForWindow(GetDesktopWindow(), &IID_IDispatch, (void **)&unk); - ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr); + ok(hr == E_NOINTERFACE, "got 0x%08lx\n", hr); ok(unk == NULL, "got %p\n", unk);
hr = pSHGetPropertyStoreForWindow(GetDesktopWindow(), &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IUnknown_QueryInterface(unk, &IID_IPropertyStore, (void **)&store); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
if (store) IPropertyStore_Release(store); if (unk) IUnknown_Release(unk); diff --git a/dlls/shell32/tests/assoc.c b/dlls/shell32/tests/assoc.c index 65334e4a739..403390d8a09 100644 --- a/dlls/shell32/tests/assoc.c +++ b/dlls/shell32/tests/assoc.c @@ -37,22 +37,22 @@ static void test_IQueryAssociations_QueryInterface(void) HRESULT hr;
hr = CoCreateInstance(&CLSID_QueryAssociations, NULL, CLSCTX_INPROC_SERVER, &IID_IQueryAssociations, (void*)&qa); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IQueryAssociations_QueryInterface(qa, &IID_IQueryAssociations, (void**)&qa2); - ok(hr == S_OK, "QueryInterface (IQueryAssociations) returned 0x%x\n", hr); + ok(hr == S_OK, "QueryInterface (IQueryAssociations) returned 0x%lx\n", hr); if (SUCCEEDED(hr)) { IQueryAssociations_Release(qa2); }
hr = IQueryAssociations_QueryInterface(qa, &IID_IUnknown, (void**)&unk); - ok(hr == S_OK, "QueryInterface (IUnknown) returned 0x%x\n", hr); + ok(hr == S_OK, "QueryInterface (IUnknown) returned 0x%lx\n", hr); if (SUCCEEDED(hr)) { IUnknown_Release(unk); }
hr = IQueryAssociations_QueryInterface(qa, &IID_IUnknown, NULL); - ok(hr == E_POINTER, "got 0x%x (expected E_POINTER)\n", hr); + ok(hr == E_POINTER, "got 0x%lx (expected E_POINTER)\n", hr);
IQueryAssociations_Release(qa); } @@ -66,19 +66,19 @@ static void test_IApplicationAssociationRegistration_QueryInterface(IApplication
hr = IApplicationAssociationRegistration_QueryInterface(appreg, &IID_IApplicationAssociationRegistration, (void**)&appreg2); - ok(hr == S_OK, "QueryInterface (IApplicationAssociationRegistration) returned 0x%x\n", hr); + ok(hr == S_OK, "QueryInterface (IApplicationAssociationRegistration) returned 0x%lx\n", hr); if (SUCCEEDED(hr)) { IApplicationAssociationRegistration_Release(appreg2); }
hr = IApplicationAssociationRegistration_QueryInterface(appreg, &IID_IUnknown, (void**)&unk); - ok(hr == S_OK, "QueryInterface (IUnknown) returned 0x%x\n", hr); + ok(hr == S_OK, "QueryInterface (IUnknown) returned 0x%lx\n", hr); if (SUCCEEDED(hr)) { IUnknown_Release(unk); }
hr = IApplicationAssociationRegistration_QueryInterface(appreg, &IID_IUnknown, NULL); - ok(hr == E_POINTER, "got 0x%x (expected E_POINTER)\n", hr); + ok(hr == E_POINTER, "got 0x%lx (expected E_POINTER)\n", hr); }
struct assoc_getstring_test @@ -109,13 +109,13 @@ static void getstring_test(LPCWSTR assocName, HKEY progIdKey, ASSOCSTR str, LPCW DWORD len;
hr = CoCreateInstance(&CLSID_QueryAssociations, NULL, CLSCTX_INPROC_SERVER, &IID_IQueryAssociations, (void*)&assoc); - ok_(__FILE__, line)(hr == S_OK, "failed to create IQueryAssociations, 0x%x\n", hr); + ok_(__FILE__, line)(hr == S_OK, "failed to create IQueryAssociations, 0x%lx\n", hr); hr = IQueryAssociations_Init(assoc, ASSOCF_NONE, assocName, progIdKey, NULL); - ok_(__FILE__, line)(hr == S_OK, "IQueryAssociations::Init failed, 0x%x\n", hr); + ok_(__FILE__, line)(hr == S_OK, "IQueryAssociations::Init failed, 0x%lx\n", hr);
hr = IQueryAssociations_GetString(assoc, ASSOCF_NONE, str, NULL, NULL, &len); if (expected_string) { - ok_(__FILE__, line)(hr == S_FALSE, "GetString returned 0x%x, expected S_FALSE\n", hr); + ok_(__FILE__, line)(hr == S_FALSE, "GetString returned 0x%lx, expected S_FALSE\n", hr); if (hr != S_FALSE) { /* don't try to allocate memory using uninitialized len */ IQueryAssociations_Release(assoc); @@ -125,12 +125,12 @@ static void getstring_test(LPCWSTR assocName, HKEY progIdKey, ASSOCSTR str, LPCW buffer = heap_alloc(len * sizeof(WCHAR)); ok_(__FILE__, line)(buffer != NULL, "out of memory\n"); hr = IQueryAssociations_GetString(assoc, 0, str, NULL, buffer, &len); - ok_(__FILE__, line)(hr == S_OK, "GetString returned 0x%x, expected S_OK\n", hr); + ok_(__FILE__, line)(hr == S_OK, "GetString returned 0x%lx, expected S_OK\n", hr);
ok_(__FILE__, line)(lstrcmpW(buffer, expected_string) == 0, "GetString returned %s, expected %s\n", wine_dbgstr_w(buffer), wine_dbgstr_w(expected_string)); } else { - ok_(__FILE__, line)(FAILED(hr), "GetString returned 0x%x, expected failure\n", hr); + ok_(__FILE__, line)(FAILED(hr), "GetString returned 0x%lx, expected failure\n", hr); }
IQueryAssociations_Release(assoc); @@ -162,22 +162,22 @@ static void test_IQueryAssociations_GetString(void) return; }
- ok(r == ERROR_SUCCESS, "RegCreateKeyExW(HKCR, ".test") failed: 0x%lx\n", r); + ok(r == ERROR_SUCCESS, "RegCreateKeyExW(HKCR, ".test") failed: 0x%Ix\n", r); r = RegSetValueExW(test_extension_key, NULL, 0, REG_SZ, (PBYTE)test_progidW, sizeof(test_progidW)); - ok(r == ERROR_SUCCESS, "RegSetValueExW(HKCR\.test, NULL, "testfile") failed: 0x%lx\n", r); + ok(r == ERROR_SUCCESS, "RegSetValueExW(HKCR\.test, NULL, "testfile") failed: 0x%Ix\n", r);
/* adding progid key with no information should fail to return information */ r = RegCreateKeyExW(HKEY_CLASSES_ROOT, test_progidW, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &test_progid_key, NULL); - ok(r == ERROR_SUCCESS, "RegCreateKeyExW(HKCR, "testfile") failed: 0x%lx\n", r); + ok(r == ERROR_SUCCESS, "RegCreateKeyExW(HKCR, "testfile") failed: 0x%Ix\n", r); getstring_test(test_extensionW, NULL, ASSOCSTR_DEFAULTICON, NULL, __LINE__); getstring_test(test_progidW, NULL, ASSOCSTR_DEFAULTICON, NULL, __LINE__); getstring_test(NULL, test_progid_key, ASSOCSTR_DEFAULTICON, NULL, __LINE__);
/* adding information to the progid should return that information */ r = RegCreateKeyExW(test_progid_key, DefaultIconW, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &test_defaulticon_key, NULL); - ok(r == ERROR_SUCCESS, "RegCreateKeyExW(HKCR\testfile\DefaultIcon) failed: 0x%lx\n", r); + ok(r == ERROR_SUCCESS, "RegCreateKeyExW(HKCR\testfile\DefaultIcon) failed: 0x%Ix\n", r); r = RegSetValueExW(test_defaulticon_key, NULL, 0, REG_SZ, (PBYTE)test_iconW, sizeof(test_iconW)); - ok(r == ERROR_SUCCESS, "RegSetValueExW(HKCR\testfile\DefaultIcon, NULL, "folder.ico") failed: 0x%lx\n", r); + ok(r == ERROR_SUCCESS, "RegSetValueExW(HKCR\testfile\DefaultIcon, NULL, "folder.ico") failed: 0x%Ix\n", r); getstring_test(test_extensionW, NULL, ASSOCSTR_DEFAULTICON, test_iconW, __LINE__); getstring_test(test_progidW, NULL, ASSOCSTR_DEFAULTICON, test_iconW, __LINE__); getstring_test(NULL, test_progid_key, ASSOCSTR_DEFAULTICON, test_iconW, __LINE__); @@ -187,15 +187,15 @@ static void test_IQueryAssociations_GetString(void) RegDeleteKeyW(HKEY_CLASSES_ROOT, test_extensionW);
hr = CoCreateInstance(&CLSID_QueryAssociations, NULL, CLSCTX_INPROC_SERVER, &IID_IQueryAssociations, (void*)&assoc); - ok(hr == S_OK, "failed to create object, 0x%x\n", hr); + ok(hr == S_OK, "failed to create object, 0x%lx\n", hr);
hr = IQueryAssociations_Init(assoc, ASSOCF_NONE, httpW, NULL, NULL); - ok(hr == S_OK, "Init failed, 0x%x\n", hr); + ok(hr == S_OK, "Init failed, 0x%lx\n", hr);
len = 0; hr = IQueryAssociations_GetString(assoc, ASSOCF_NONE, ASSOCSTR_EXECUTABLE, NULL, NULL, &len); - ok(hr == S_FALSE, "got 0x%08x\n", hr); - ok(len > 0, "got wrong needed length, %d\n", len); + ok(hr == S_FALSE, "got 0x%08lx\n", hr); + ok(len > 0, "got wrong needed length, %ld\n", len);
while (ptr->key) { @@ -203,17 +203,17 @@ static void test_IQueryAssociations_GetString(void) DWORD len;
hr = IQueryAssociations_Init(assoc, ASSOCF_NONE, ptr->key, NULL, NULL); - ok(hr == S_OK, "%d: Init failed, 0x%x\n", i, hr); + ok(hr == S_OK, "%d: Init failed, 0x%lx\n", i, hr);
len = ptr->len; buffW[0] = ptr->flags & ASSOCF_NOTRUNCATE ? 0x1 : 0; hr = IQueryAssociations_GetString(assoc, ptr->flags, ptr->str, NULL, buffW, &len); if (hr != ptr->hr) - ok(broken(hr == ptr->brokenhr), "%d: GetString failed, 0x%08x\n", i, hr); + ok(broken(hr == ptr->brokenhr), "%d: GetString failed, 0x%08lx\n", i, hr); else { - ok(hr == ptr->hr, "%d: GetString failed, 0x%08x\n", i, hr); - ok(len > ptr->len, "%d: got needed length %d\n", i, len); + ok(hr == ptr->hr, "%d: GetString failed, 0x%08lx\n", i, hr); + ok(len > ptr->len, "%d: got needed length %ld\n", i, len); }
/* even with ASSOCF_NOTRUNCATE it's null terminated */ @@ -237,20 +237,20 @@ static void test_IQueryAssociations_Init(void) DWORD len;
hr = CoCreateInstance(&CLSID_QueryAssociations, NULL, CLSCTX_INPROC_SERVER, &IID_IQueryAssociations, (void*)&assoc); - ok(hr == S_OK, "failed to create object, 0x%x\n", hr); + ok(hr == S_OK, "failed to create object, 0x%lx\n", hr);
hr = IQueryAssociations_Init(assoc, ASSOCF_NONE, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "Init failed, 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Init failed, 0x%08lx\n", hr);
hr = IQueryAssociations_Init(assoc, ASSOCF_NONE, httpW, NULL, NULL); - ok(hr == S_OK, "Init failed, 0x%08x\n", hr); + ok(hr == S_OK, "Init failed, 0x%08lx\n", hr);
hr = IQueryAssociations_Init(assoc, ASSOCF_NONE, badW, NULL, NULL); - ok(hr == S_OK || broken(hr == S_FALSE) /* pre-vista */, "Init failed, 0x%08x\n", hr); + ok(hr == S_OK || broken(hr == S_FALSE) /* pre-vista */, "Init failed, 0x%08lx\n", hr);
len = 0; hr = IQueryAssociations_GetString(assoc, ASSOCF_NONE, ASSOCSTR_EXECUTABLE, NULL, NULL, &len); - ok(hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION) || broken(hr == E_FAIL) /* pre-vista */, "got 0x%08x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION) || broken(hr == E_FAIL) /* pre-vista */, "got 0x%08lx\n", hr);
IQueryAssociations_Release(assoc); } @@ -264,31 +264,31 @@ static void test_IApplicationAssociationRegistration_QueryCurrentDefault(IApplic LPWSTR assocprog = NULL;
hr = IApplicationAssociationRegistration_QueryCurrentDefault(appreg, emptyW, AT_URLPROTOCOL, AL_EFFECTIVE, &assocprog); - ok(hr == E_INVALIDARG, "got 0x%x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%lx\n", hr);
hr = IApplicationAssociationRegistration_QueryCurrentDefault(appreg, emptyW, AT_FILEEXTENSION, AL_EFFECTIVE, &assocprog); - ok(hr == E_INVALIDARG, "got 0x%x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%lx\n", hr);
hr = IApplicationAssociationRegistration_QueryCurrentDefault(appreg, spacetxtW, AT_FILEEXTENSION, AL_EFFECTIVE, &assocprog); - ok(hr == E_INVALIDARG || hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION) /*Win8*/, "got 0x%x\n", hr); + ok(hr == E_INVALIDARG || hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION) /*Win8*/, "got 0x%lx\n", hr);
hr = IApplicationAssociationRegistration_QueryCurrentDefault(appreg, httpW, AT_URLPROTOCOL, AL_EFFECTIVE, NULL); - ok(hr == E_INVALIDARG, "got 0x%x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%lx\n", hr);
/* AT_FILEEXTENSION must start with a period */ hr = IApplicationAssociationRegistration_QueryCurrentDefault(appreg, txtW, AT_FILEEXTENSION, AL_EFFECTIVE, &assocprog); - ok(hr == S_OK, "got 0x%x\n", hr); + ok(hr == S_OK, "got 0x%lx\n", hr); trace("%s\n", wine_dbgstr_w(assocprog)); CoTaskMemFree(assocprog);
hr = IApplicationAssociationRegistration_QueryCurrentDefault(appreg, emptyW, AT_STARTMENUCLIENT, AL_EFFECTIVE, &assocprog); - ok(hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION), "got 0x%x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION), "got 0x%lx\n", hr);
hr = IApplicationAssociationRegistration_QueryCurrentDefault(appreg, emptyW, AT_MIMETYPE, AL_EFFECTIVE, &assocprog); - ok(hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION), "got 0x%x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION), "got 0x%lx\n", hr);
hr = IApplicationAssociationRegistration_QueryCurrentDefault(appreg, httpW, AT_URLPROTOCOL, AL_EFFECTIVE, &assocprog); - ok(hr == S_OK, "got 0x%x\n", hr); + ok(hr == S_OK, "got 0x%lx\n", hr); trace("%s\n", wine_dbgstr_w(assocprog));
CoTaskMemFree(assocprog); @@ -313,7 +313,7 @@ START_TEST(assoc) IQueryAssociations_Release(qa); } else - win_skip("IQueryAssociations not supported, 0x%x\n", hr); + win_skip("IQueryAssociations not supported, 0x%lx\n", hr);
/* this works since Vista */ hr = CoCreateInstance(&CLSID_ApplicationAssociationRegistration, NULL, CLSCTX_INPROC_SERVER, @@ -326,7 +326,7 @@ START_TEST(assoc) IApplicationAssociationRegistration_Release(appreg); } else - win_skip("IApplicationAssociationRegistration not supported: 0x%x\n", hr); + win_skip("IApplicationAssociationRegistration not supported: 0x%lx\n", hr);
CoUninitialize(); } diff --git a/dlls/shell32/tests/autocomplete.c b/dlls/shell32/tests/autocomplete.c index ce68d21f045..0631126c021 100644 --- a/dlls/shell32/tests/autocomplete.c +++ b/dlls/shell32/tests/autocomplete.c @@ -50,7 +50,7 @@ static void test_invalid_init(void) win_skip("CLSID_AutoComplete is not registered\n"); return; } - ok(hr == S_OK, "no IID_IAutoComplete (0x%08x)\n", hr); + ok(hr == S_OK, "no IID_IAutoComplete (0x%08lx)\n", hr);
/* AutoComplete source */ hr = CoCreateInstance(&CLSID_ACLMulti, NULL, CLSCTX_INPROC_SERVER, @@ -61,7 +61,7 @@ static void test_invalid_init(void) IAutoComplete_Release(ac); return; } - ok(hr == S_OK, "no IID_IACList (0x%08x)\n", hr); + ok(hr == S_OK, "no IID_IACList (0x%08lx)\n", hr);
edit_control = CreateWindowExA(0, "EDIT", "Some text", 0, 10, 10, 300, 300, hMainWnd, NULL, hinst, NULL); @@ -71,14 +71,14 @@ static void test_invalid_init(void) hr = IAutoComplete_Init(ac, NULL, acSource, NULL, NULL); ok(hr == E_INVALIDARG || broken(hr == S_OK), /* Win2k/XP/Win2k3 */ - "Init returned 0x%08x\n", hr); + "Init returned 0x%08lx\n", hr); if (hr == E_INVALIDARG) { LONG ref;
IUnknown_AddRef(acSource); ref = IUnknown_Release(acSource); - ok(ref == 1, "Expected AutoComplete source refcount to be 1, got %d\n", ref); + ok(ref == 1, "Expected AutoComplete source refcount to be 1, got %ld\n", ref); }
if (0) @@ -88,43 +88,43 @@ if (0) * object after this call succeeds would fail, because initialization * state is determined by whether a non-NULL window handle is stored. */ hr = IAutoComplete_Init(ac, (HWND)0xdeadbeef, acSource, NULL, NULL); - ok(hr == S_OK, "Init returned 0x%08x\n", hr); + ok(hr == S_OK, "Init returned 0x%08lx\n", hr);
/* Tests crash on older Windows. */ hr = IAutoComplete_Init(ac, NULL, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "Init returned 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Init returned 0x%08lx\n", hr);
hr = IAutoComplete_Init(ac, edit_control, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "Init returned 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Init returned 0x%08lx\n", hr); }
/* bind to edit control */ hr = IAutoComplete_Init(ac, edit_control, acSource, NULL, NULL); - ok(hr == S_OK, "Init returned 0x%08x\n", hr); + ok(hr == S_OK, "Init returned 0x%08lx\n", hr);
/* try invalid parameters after successful initialization .*/ hr = IAutoComplete_Init(ac, NULL, NULL, NULL, NULL); ok(hr == E_INVALIDARG || hr == E_FAIL, /* Win2k/XP/Win2k3 */ - "Init returned 0x%08x\n", hr); + "Init returned 0x%08lx\n", hr);
hr = IAutoComplete_Init(ac, NULL, acSource, NULL, NULL); ok(hr == E_INVALIDARG || hr == E_FAIL, /* Win2k/XP/Win2k3 */ - "Init returned 0x%08x\n", hr); + "Init returned 0x%08lx\n", hr);
hr = IAutoComplete_Init(ac, edit_control, NULL, NULL, NULL); ok(hr == E_INVALIDARG || hr == E_FAIL, /* Win2k/XP/Win2k3 */ - "Init returned 0x%08x\n", hr); + "Init returned 0x%08lx\n", hr);
/* try initializing twice on the same control */ hr = IAutoComplete_Init(ac, edit_control, acSource, NULL, NULL); - ok(hr == E_FAIL, "Init returned 0x%08x\n", hr); + ok(hr == E_FAIL, "Init returned 0x%08lx\n", hr);
/* try initializing with a different control */ hr = IAutoComplete_Init(ac, hEdit, acSource, NULL, NULL); - ok(hr == E_FAIL, "Init returned 0x%08x\n", hr); + ok(hr == E_FAIL, "Init returned 0x%08lx\n", hr);
DestroyWindow(edit_control);
@@ -133,7 +133,7 @@ if (0) hr = IAutoComplete_Init(ac, hEdit, acSource, NULL, NULL); ok(hr == E_UNEXPECTED || hr == E_FAIL, /* Win2k/XP/Win2k3 */ - "Init returned 0x%08x\n", hr); + "Init returned 0x%08lx\n", hr);
IUnknown_Release(acSource); IAutoComplete_Release(ac); @@ -153,7 +153,7 @@ static IAutoComplete *test_init(void) win_skip("CLSID_AutoComplete is not registered\n"); return NULL; } - ok(r == S_OK, "no IID_IAutoComplete (0x%08x)\n", r); + ok(r == S_OK, "no IID_IAutoComplete (0x%08lx)\n", r);
/* AutoComplete source */ r = CoCreateInstance(&CLSID_ACLMulti, NULL, CLSCTX_INPROC_SERVER, @@ -164,14 +164,14 @@ static IAutoComplete *test_init(void) IAutoComplete_Release(ac); return NULL; } - ok(r == S_OK, "no IID_IACList (0x%08x)\n", r); + ok(r == S_OK, "no IID_IACList (0x%08lx)\n", r);
user_data = GetWindowLongPtrA(hEdit, GWLP_USERDATA); ok(user_data == 0, "Expected the edit control user data to be zero\n");
/* bind to edit control */ r = IAutoComplete_Init(ac, hEdit, acSource, NULL, NULL); - ok(r == S_OK, "Init returned 0x%08x\n", r); + ok(r == S_OK, "Init returned 0x%08lx\n", r);
user_data = GetWindowLongPtrA(hEdit, GWLP_USERDATA); ok(user_data == 0, "Expected the edit control user data to be zero\n"); @@ -179,10 +179,10 @@ static IAutoComplete *test_init(void) /* bind a different object to the same edit control */ r = CoCreateInstance(&CLSID_AutoComplete, NULL, CLSCTX_INPROC_SERVER, &IID_IAutoComplete, (LPVOID*)&ac2); - ok(r == S_OK, "no IID_IAutoComplete (0x%08x)\n", r); + ok(r == S_OK, "no IID_IAutoComplete (0x%08lx)\n", r);
r = IAutoComplete_Init(ac2, hEdit, acSource, NULL, NULL); - ok(r == S_OK, "Init returned 0x%08x\n", r); + ok(r == S_OK, "Init returned 0x%08lx\n", r); IAutoComplete_Release(ac2);
IUnknown_Release(acSource); @@ -459,7 +459,7 @@ static void check_dropdown_(const char *file, UINT line, IAutoCompleteDropDown * HRESULT hr;
hr = IAutoCompleteDropDown_GetDropDownStatus(acdropdown, &flags, &str); - ok_(file, line)(hr == S_OK, "IAutoCompleteDropDown_GetDropDownStatus failed: %x\n", hr); + ok_(file, line)(hr == S_OK, "IAutoCompleteDropDown_GetDropDownStatus failed: %lx\n", hr); if (hr != S_OK) return; if (list_num) ok_(file, line)(flags & ACDD_VISIBLE, "AutoComplete DropDown not visible\n"); else @@ -480,7 +480,7 @@ static void check_dropdown_(const char *file, UINT line, IAutoCompleteDropDown * SendMessageW(hwnd_edit, WM_KEYDOWN, VK_DOWN, 0); SendMessageW(hwnd_edit, WM_KEYUP, VK_DOWN, 0xc0000000); hr = IAutoCompleteDropDown_GetDropDownStatus(acdropdown, &flags, &str); - ok_(file, line)(hr == S_OK, "IAutoCompleteDropDown_GetDropDownStatus failed: %x\n", hr); + ok_(file, line)(hr == S_OK, "IAutoCompleteDropDown_GetDropDownStatus failed: %lx\n", hr); ok_(file, line)(flags & ACDD_VISIBLE, "AutoComplete DropDown not visible\n"); if (hr == S_OK) { @@ -555,7 +555,7 @@ static void test_aclist_expand(HWND hwnd_edit, void *enumerator, IAutoCompleteDr ok(lstrcmpW(obj->last_expand, str1a) == 0, "Expected %s, got %s\n", wine_dbgstr_w(str1a), wine_dbgstr_w(obj->last_expand)); ok(obj->num_resets == 6, "Expected 6 resets, got %u\n", obj->num_resets); hr = IAutoCompleteDropDown_ResetEnumerator(acdropdown); - ok(hr == S_OK, "IAutoCompleteDropDown_ResetEnumerator failed: %x\n", hr); + ok(hr == S_OK, "IAutoCompleteDropDown_ResetEnumerator failed: %lx\n", hr); SendMessageW(hwnd_edit, WM_CHAR, 'o', 1); dispatch_messages(); ok(obj->num_expand == 6, "Expected 6 expansions, got %u\n", obj->num_expand); @@ -595,17 +595,17 @@ static void test_prefix_filtering(HWND hwnd_edit) HRESULT hr;
hr = CoCreateInstance(&CLSID_AutoComplete, NULL, CLSCTX_INPROC_SERVER, &IID_IAutoComplete2, (void**)&autocomplete); - ok(hr == S_OK, "CoCreateInstance failed: %x\n", hr); + ok(hr == S_OK, "CoCreateInstance failed: %lx\n", hr);
hr = IAutoComplete2_QueryInterface(autocomplete, &IID_IAutoCompleteDropDown, (LPVOID*)&acdropdown); - ok(hr == S_OK, "No IAutoCompleteDropDown interface: %x\n", hr); + ok(hr == S_OK, "No IAutoCompleteDropDown interface: %lx\n", hr);
string_enumerator_create((void**)&enumerator, suggestions, ARRAY_SIZE(suggestions));
hr = IAutoComplete2_SetOptions(autocomplete, ACO_FILTERPREFIXES | ACO_AUTOSUGGEST | ACO_AUTOAPPEND); - ok(hr == S_OK, "IAutoComplete2_SetOptions failed: %x\n", hr); + ok(hr == S_OK, "IAutoComplete2_SetOptions failed: %lx\n", hr); hr = IAutoComplete2_Init(autocomplete, hwnd_edit, enumerator, NULL, NULL); - ok(hr == S_OK, "IAutoComplete_Init failed: %x\n", hr); + ok(hr == S_OK, "IAutoComplete_Init failed: %lx\n", hr);
SendMessageW(hwnd_edit, EM_SETSEL, 0, -1); SendMessageW(hwnd_edit, WM_CHAR, 'a', 1); @@ -711,20 +711,20 @@ static void test_custom_source(void) hwnd_edit = CreateWindowA("Edit", "", WS_OVERLAPPED | WS_VISIBLE | WS_CHILD | WS_BORDER, 50, 5, 200, 20, hMainWnd, 0, NULL, 0);
hr = CoCreateInstance(&CLSID_AutoComplete, NULL, CLSCTX_INPROC_SERVER, &IID_IAutoComplete2, (void**)&autocomplete); - ok(hr == S_OK, "CoCreateInstance failed: %x\n", hr); + ok(hr == S_OK, "CoCreateInstance failed: %lx\n", hr);
hr = IAutoComplete2_QueryInterface(autocomplete, &IID_IAutoCompleteDropDown, (LPVOID*)&acdropdown); - ok(hr == S_OK, "No IAutoCompleteDropDown interface: %x\n", hr); + ok(hr == S_OK, "No IAutoCompleteDropDown interface: %lx\n", hr);
string_enumerator_create((void**)&enumerator, suggestions, ARRAY_SIZE(suggestions)); obj = (struct string_enumerator*)enumerator;
hr = IAutoComplete2_SetOptions(autocomplete, ACO_AUTOSUGGEST | ACO_AUTOAPPEND); - ok(hr == S_OK, "IAutoComplete2_SetOptions failed: %x\n", hr); + ok(hr == S_OK, "IAutoComplete2_SetOptions failed: %lx\n", hr); hr = IAutoCompleteDropDown_ResetEnumerator(acdropdown); - ok(hr == S_OK, "IAutoCompleteDropDown_ResetEnumerator failed: %x\n", hr); + ok(hr == S_OK, "IAutoCompleteDropDown_ResetEnumerator failed: %lx\n", hr); hr = IAutoComplete2_Init(autocomplete, hwnd_edit, enumerator, NULL, NULL); - ok(hr == S_OK, "IAutoComplete_Init failed: %x\n", hr); + ok(hr == S_OK, "IAutoComplete_Init failed: %lx\n", hr);
SetFocus(hwnd_edit); SendMessageW(hwnd_edit, WM_CHAR, 'a', 1); @@ -740,7 +740,7 @@ static void test_custom_source(void) ok(buffer[0] == '\0', "Expected empty string, got %s\n", wine_dbgstr_w(buffer)); ok(obj->num_resets == 1, "Expected 1 reset, got %u\n", obj->num_resets); hr = IAutoCompleteDropDown_ResetEnumerator(acdropdown); - ok(hr == S_OK, "IAutoCompleteDropDown_ResetEnumerator failed: %x\n", hr); + ok(hr == S_OK, "IAutoCompleteDropDown_ResetEnumerator failed: %lx\n", hr); ok(obj->num_resets == 1, "Expected 1 reset, got %u\n", obj->num_resets); obj->num_resets = 0;
@@ -762,7 +762,7 @@ static void test_custom_source(void) SendMessageW(hwnd_edit, WM_GETTEXT, ARRAY_SIZE(buffer), (LPARAM)buffer); ok(buffer[0] == '\0', "Expected empty string, got %s\n", wine_dbgstr_w(buffer)); hr = IAutoCompleteDropDown_ResetEnumerator(acdropdown); - ok(hr == S_OK, "IAutoCompleteDropDown_ResetEnumerator failed: %x\n", hr); + ok(hr == S_OK, "IAutoCompleteDropDown_ResetEnumerator failed: %lx\n", hr);
HijackerWndProc_prev = (WNDPROC)SetWindowLongPtrW(hwnd_edit, GWLP_WNDPROC, (LONG_PTR)HijackerWndProc2); SendMessageW(hwnd_edit, WM_CHAR, 'a', 1); @@ -775,17 +775,17 @@ static void test_custom_source(void) /* end of hijacks */
hr = IAutoCompleteDropDown_GetDropDownStatus(acdropdown, &flags, NULL); - ok(hr == S_OK, "IAutoCompleteDropDown_GetDropDownStatus failed: %x\n", hr); + ok(hr == S_OK, "IAutoCompleteDropDown_GetDropDownStatus failed: %lx\n", hr); ok(flags & ACDD_VISIBLE, "AutoComplete DropDown should be visible\n"); SendMessageW(hwnd_edit, WM_SETTEXT, 0, (LPARAM)str_au); dispatch_messages(); hr = IAutoCompleteDropDown_GetDropDownStatus(acdropdown, &flags, NULL); - ok(hr == S_OK, "IAutoCompleteDropDown_GetDropDownStatus failed: %x\n", hr); + ok(hr == S_OK, "IAutoCompleteDropDown_GetDropDownStatus failed: %lx\n", hr); ok(!(flags & ACDD_VISIBLE), "AutoComplete DropDown should have been hidden\n"); SendMessageW(hwnd_edit, WM_SETTEXT, 0, (LPARAM)str_aut); dispatch_messages(); hr = IAutoCompleteDropDown_GetDropDownStatus(acdropdown, &flags, NULL); - ok(hr == S_OK, "IAutoCompleteDropDown_GetDropDownStatus failed: %x\n", hr); + ok(hr == S_OK, "IAutoCompleteDropDown_GetDropDownStatus failed: %lx\n", hr); ok(!(flags & ACDD_VISIBLE), "AutoComplete DropDown should be hidden\n"); SendMessageW(hwnd_edit, WM_GETTEXT, ARRAY_SIZE(buffer), (LPARAM)buffer); ok(lstrcmpW(str_aut, buffer) == 0, "Expected %s, got %s\n", wine_dbgstr_w(str_aut), wine_dbgstr_w(buffer)); @@ -794,7 +794,7 @@ static void test_custom_source(void) obj->num_resets = 0;
hr = IAutoCompleteDropDown_ResetEnumerator(acdropdown); - ok(hr == S_OK, "IAutoCompleteDropDown_ResetEnumerator failed: %x\n", hr); + ok(hr == S_OK, "IAutoCompleteDropDown_ResetEnumerator failed: %lx\n", hr); SendMessageW(hwnd_edit, WM_CHAR, 'x', 1); dispatch_messages(); ok(obj->num_resets == 1, "Expected 1 reset, got %u\n", obj->num_resets); @@ -821,7 +821,7 @@ START_TEST(autocomplete) POINT orig_pos;
r = CoInitialize(NULL); - ok(r == S_OK, "CoInitialize failed (0x%08x). Tests aborted.\n", r); + ok(r == S_OK, "CoInitialize failed (0x%08lx). Tests aborted.\n", r); if (r != S_OK) return;
diff --git a/dlls/shell32/tests/brsfolder.c b/dlls/shell32/tests/brsfolder.c index 0888cfa4684..6383e64e27b 100644 --- a/dlls/shell32/tests/brsfolder.c +++ b/dlls/shell32/tests/brsfolder.c @@ -177,14 +177,14 @@ static void test_click_make_new_folder_button(void) resCoInit = CoInitialize(NULL); if(!(resCoInit == S_OK || resCoInit == S_FALSE)) { - skip("COM could not be initialized %u\n", GetLastError()); + skip("COM could not be initialized %lu\n", GetLastError()); return; }
/* Leave room for concatenating title, two backslashes, and an extra NULL. */ if (!GetCurrentDirectoryA(MAX_PATH-strlen(title)-3, test_folder_path)) { - skip("GetCurrentDirectoryA failed %u\n", GetLastError()); + skip("GetCurrentDirectoryA failed %lu\n", GetLastError()); } strcat(test_folder_path, "\"); strcat(test_folder_path, title); @@ -193,7 +193,7 @@ static void test_click_make_new_folder_button(void) /* Avoid conflicts by creating a test folder. */ if (!CreateDirectoryA(title, NULL)) { - skip("CreateDirectoryA failed %u\n", GetLastError()); + skip("CreateDirectoryA failed %lu\n", GetLastError()); return; }
@@ -207,7 +207,7 @@ static void test_click_make_new_folder_button(void) MultiByteToWideChar(CP_UTF8, 0, test_folder_path, -1, test_folder_pathW, MAX_PATH); hr = SHGetDesktopFolder(&test_folder_object); - ok (SUCCEEDED(hr), "SHGetDesktopFolder failed with hr 0x%08x\n", hr); + ok (SUCCEEDED(hr), "SHGetDesktopFolder failed with hr 0x%08lx\n", hr); if (FAILED(hr)) { skip("SHGetDesktopFolder failed - skipping\n"); return; @@ -268,34 +268,34 @@ static int CALLBACK selection_callback(HWND hwnd, UINT uMsg, LPARAM lParam, LPAR case BFFM_INITIALIZED: /* test with zero values */ ret = SendMessageA(hwnd, BFFM_SETSELECTIONA, 0, 0); - ok(!ret, "SendMessage returned: %u\n", ret); + ok(!ret, "SendMessage returned: %lu\n", ret); ret = SendMessageA(hwnd, BFFM_SETSELECTIONW, 0, 0); - ok(!ret, "SendMessage returned: %u\n", ret); + ok(!ret, "SendMessage returned: %lu\n", ret);
ret = SendMessageA(hwnd, BFFM_SETSELECTIONA, 1, 0); - ok(!ret, "SendMessage returned: %u\n", ret); + ok(!ret, "SendMessage returned: %lu\n", ret);
if(0) { /* Crashes on NT4 */ ret = SendMessageA(hwnd, BFFM_SETSELECTIONW, 1, 0); - ok(!ret, "SendMessage returned: %u\n", ret); + ok(!ret, "SendMessage returned: %lu\n", ret); }
ret = SendMessageA(hwnd, BFFM_SETSELECTIONA, 0, (LPARAM)selected_folder_pidl); - ok(!ret, "SendMessage returned: %u\n", ret); + ok(!ret, "SendMessage returned: %lu\n", ret); ret = SendMessageW(hwnd, BFFM_SETSELECTIONW, 0, (LPARAM)selected_folder_pidl); - ok(!ret, "SendMessage returned: %u\n", ret); + ok(!ret, "SendMessage returned: %lu\n", ret);
ret = SendMessageA(hwnd, BFFM_SETSELECTIONA, 1, (LPARAM)selected_folder_pidl); - ok(!ret, "SendMessage returned: %u\n", ret); + ok(!ret, "SendMessage returned: %lu\n", ret); ret = SendMessageW(hwnd, BFFM_SETSELECTIONW, 1, (LPARAM)selected_folder_pidl); - ok(!ret, "SendMessage returned: %u\n", ret); + ok(!ret, "SendMessage returned: %lu\n", ret);
ret = SendMessageA(hwnd, BFFM_SETSELECTIONA, 1, (LPARAM)new_folder_name); - ok(!ret, "SendMessage returned: %u\n", ret); + ok(!ret, "SendMessage returned: %lu\n", ret); ret = SendMessageW(hwnd, BFFM_SETSELECTIONW, 1, (LPARAM)new_folder_name); - ok(!ret, "SendMessage returned: %u\n", ret); + ok(!ret, "SendMessage returned: %lu\n", ret);
SendMessageA(hwnd, WM_COMMAND, IDOK, 0); return 1; @@ -316,13 +316,13 @@ static void test_selection(void) resCoInit = CoInitialize(NULL); if(!(resCoInit == S_OK || resCoInit == S_FALSE)) { - skip("COM could not be initialized %u\n", GetLastError()); + skip("COM could not be initialized %lu\n", GetLastError()); return; }
if (!GetCurrentDirectoryW(MAX_PATH, selected_folderW)) { - skip("GetCurrentDirectoryW failed %u\n", GetLastError()); + skip("GetCurrentDirectoryW failed %lu\n", GetLastError()); }
/* Initialize browse info struct for SHBrowseForFolder */ @@ -332,7 +332,7 @@ static void test_selection(void) bi.lpfn = selection_callback;
hr = SHGetDesktopFolder(&desktop_object); - ok (SUCCEEDED(hr), "SHGetDesktopFolder failed with hr 0x%08x\n", hr); + ok (SUCCEEDED(hr), "SHGetDesktopFolder failed with hr 0x%08lx\n", hr); if (FAILED(hr)) { skip("SHGetDesktopFolder failed - skipping\n"); return; diff --git a/dlls/shell32/tests/ebrowser.c b/dlls/shell32/tests/ebrowser.c index 7aefd14b377..257084053a7 100644 --- a/dlls/shell32/tests/ebrowser.c +++ b/dlls/shell32/tests/ebrowser.c @@ -207,7 +207,7 @@ static HRESULT WINAPI IExplorerPaneVisibility_fnGetPaneState(IExplorerPaneVisibi
ok(ep != NULL, "ep is NULL.\n"); ok(peps != NULL, "peps is NULL.\n"); - ok(*peps == 0, "got %d\n", *peps); + ok(*peps == 0, "got %ld\n", *peps);
*peps = EPS_FORCE; if(IsEqualGUID(&EP_NavPane, ep)) This->np++; @@ -505,12 +505,12 @@ static void test_QueryInterface(void) LONG lres;
hr = ebrowser_instantiate(&peb); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
#define test_qinterface(iid, exp) \ do { \ hr = IExplorerBrowser_QueryInterface(peb, &iid, (void**)&punk); \ - ok(hr == exp, "(%s:)Expected (0x%08x), got (0x%08x)\n", \ + ok(hr == exp, "(%s:)Expected (0x%08lx), got (0x%08lx)\n", \ #iid, exp, hr); \ if(SUCCEEDED(hr)) IUnknown_Release(punk); \ } while(0) @@ -536,7 +536,7 @@ static void test_QueryInterface(void) #undef test_qinterface
lres = IExplorerBrowser_Release(peb); - ok(lres == 0, "Got %d\n", lres); + ok(lres == 0, "Got %ld\n", lres); }
static void test_SB_misc(void) @@ -551,7 +551,7 @@ static void test_SB_misc(void)
ebrowser_instantiate(&peb); hr = IExplorerBrowser_QueryInterface(peb, &IID_IShellBrowser, (void**)&psb); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(FAILED(hr)) { skip("Failed to get IShellBrowser interface.\n"); @@ -561,42 +561,42 @@ static void test_SB_misc(void) /* Some unimplemented methods */ retHwnd = (HWND)0xdeadbeef; hr = IShellBrowser_GetControlWindow(psb, FCW_TOOLBAR, &retHwnd); - ok(hr == E_NOTIMPL, "got (0x%08x)\n", hr); + ok(hr == E_NOTIMPL, "got (0x%08lx)\n", hr); ok(retHwnd == NULL || broken(retHwnd == (HWND)0xdeadbeef), "got %p\n", retHwnd);
retHwnd = (HWND)0xdeadbeef; hr = IShellBrowser_GetControlWindow(psb, FCW_STATUS, &retHwnd); - ok(hr == E_NOTIMPL, "got (0x%08x)\n", hr); + ok(hr == E_NOTIMPL, "got (0x%08lx)\n", hr); ok(retHwnd == NULL || broken(retHwnd == (HWND)0xdeadbeef), "got %p\n", retHwnd);
retHwnd = (HWND)0xdeadbeef; hr = IShellBrowser_GetControlWindow(psb, FCW_TREE, &retHwnd); - ok(hr == E_NOTIMPL, "got (0x%08x)\n", hr); + ok(hr == E_NOTIMPL, "got (0x%08lx)\n", hr); ok(retHwnd == NULL || broken(retHwnd == (HWND)0xdeadbeef), "got %p\n", retHwnd);
retHwnd = (HWND)0xdeadbeef; hr = IShellBrowser_GetControlWindow(psb, FCW_PROGRESS, &retHwnd); - ok(hr == E_NOTIMPL, "got (0x%08x)\n", hr); + ok(hr == E_NOTIMPL, "got (0x%08lx)\n", hr); ok(retHwnd == NULL || broken(retHwnd == (HWND)0xdeadbeef), "got %p\n", retHwnd);
/* ::InsertMenuSB */ hr = IShellBrowser_InsertMenusSB(psb, NULL, NULL); - ok(hr == E_NOTIMPL, "got (0x%08x)\n", hr); + ok(hr == E_NOTIMPL, "got (0x%08lx)\n", hr);
/* ::RemoveMenusSB */ hr = IShellBrowser_RemoveMenusSB(psb, NULL); - ok(hr == E_NOTIMPL, "got (0x%08x)\n", hr); + ok(hr == E_NOTIMPL, "got (0x%08lx)\n", hr);
/* ::SetMenuSB */ hr = IShellBrowser_SetMenuSB(psb, NULL, NULL, NULL); - ok(hr == E_NOTIMPL, "got (0x%08x)\n", hr); + ok(hr == E_NOTIMPL, "got (0x%08lx)\n", hr);
/***** Before EB::Initialize *****/
/* ::GetWindow */ retHwnd = (HWND)0xDEADBEEF; hr = IShellBrowser_GetWindow(psb, &retHwnd); - ok(hr == E_FAIL, "got (0x%08x)\n", hr); + ok(hr == E_FAIL, "got (0x%08lx)\n", hr); ok(retHwnd == (HWND)0xDEADBEEF, "HWND overwritten\n");
todo_wine @@ -605,28 +605,28 @@ static void test_SB_misc(void) /* ::SendControlMsg */ lres = 0xDEADBEEF; hr = IShellBrowser_SendControlMsg(psb, FCW_STATUS, 0, 0, 0, &lres); - ok(hr == S_OK, "got (0x%08x)\n", hr); - ok(lres == 0, "lres was %ld\n", lres); + ok(hr == S_OK, "got (0x%08lx)\n", hr); + ok(lres == 0, "lres was %Id\n", lres);
lres = 0xDEADBEEF; hr = IShellBrowser_SendControlMsg(psb, FCW_TOOLBAR, TB_CHECKBUTTON, FCIDM_TB_SMALLICON, TRUE, &lres); - ok(hr == S_OK, "got (0x%08x)\n", hr); - ok(lres == 0, "lres was %ld\n", lres); + ok(hr == S_OK, "got (0x%08lx)\n", hr); + ok(lres == 0, "lres was %Id\n", lres);
hr = IShellBrowser_SendControlMsg(psb, FCW_STATUS, 0, 0, 0, NULL); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
hr = IShellBrowser_SendControlMsg(psb, FCW_TREE, 0, 0, 0, NULL); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
hr = IShellBrowser_SendControlMsg(psb, FCW_PROGRESS, 0, 0, 0, NULL); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); }
/* ::QueryActiveShellView */ hr = IShellBrowser_QueryActiveShellView(psb, (IShellView**)&punk); - ok(hr == E_FAIL, "got (0x%08x)\n", hr); + ok(hr == E_FAIL, "got (0x%08lx)\n", hr);
/* Initialize ExplorerBrowser */ ebrowser_initialize(peb); @@ -635,46 +635,46 @@ static void test_SB_misc(void)
/* ::GetWindow */ hr = IShellBrowser_GetWindow(psb, &retHwnd); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); ok(GetParent(retHwnd) == hwnd, "The HWND returned is not our child.\n");
todo_wine { /* ::SendControlMsg */ hr = IShellBrowser_SendControlMsg(psb, FCW_STATUS, 0, 0, 0, NULL); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
lres = 0xDEADBEEF; hr = IShellBrowser_SendControlMsg(psb, FCW_TOOLBAR, 0, 0, 0, &lres); - ok(hr == S_OK, "got (0x%08x)\n", hr); - ok(lres == 0, "lres was %ld\n", lres); + ok(hr == S_OK, "got (0x%08lx)\n", hr); + ok(lres == 0, "lres was %Id\n", lres);
lres = 0xDEADBEEF; hr = IShellBrowser_SendControlMsg(psb, FCW_STATUS, 0, 0, 0, &lres); - ok(hr == S_OK, "got (0x%08x)\n", hr); - ok(lres == 0, "lres was %ld\n", lres); + ok(hr == S_OK, "got (0x%08lx)\n", hr); + ok(lres == 0, "lres was %Id\n", lres);
lres = 0xDEADBEEF; hr = IShellBrowser_SendControlMsg(psb, 1234, 0, 0, 0, &lres); - ok(hr == S_OK, "got (0x%08x)\n", hr); - ok(lres == 0, "lres was %ld\n", lres); + ok(hr == S_OK, "got (0x%08lx)\n", hr); + ok(lres == 0, "lres was %Id\n", lres);
/* Returns S_OK */ hr = IShellBrowser_SetStatusTextSB(psb, NULL); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
hr = IShellBrowser_ContextSensitiveHelp(psb, FALSE); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
hr = IShellBrowser_EnableModelessSB(psb, TRUE); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
hr = IShellBrowser_SetToolbarItems(psb, NULL, 1, 1); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); }
hr = IShellBrowser_QueryActiveShellView(psb, (IShellView**)&punk); - ok(hr == E_FAIL, "got (0x%08x)\n", hr); + ok(hr == E_FAIL, "got (0x%08lx)\n", hr);
IShellBrowser_Release(psb); IExplorerBrowser_Destroy(peb); @@ -687,19 +687,19 @@ static void test_SB_misc(void)
process_msgs(); hr = ebrowser_browse_to_desktop(peb); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); process_msgs();
/****** After Browsing *****/
hr = IShellBrowser_QueryActiveShellView(psb, (IShellView**)&punk); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk);
IShellBrowser_Release(psb); IExplorerBrowser_Destroy(peb); ref = IExplorerBrowser_Release(peb); - ok(ref == 0, "Got %d\n", ref); + ok(ref == 0, "Got %ld\n", ref); }
static void test_initialization(void) @@ -724,36 +724,36 @@ static void test_initialization(void) ZeroMemory(&rc, sizeof(RECT));
hr = IExplorerBrowser_Initialize(peb, NULL, &rc, NULL); - ok(hr == E_INVALIDARG, "got (0x%08x)\n", hr); + ok(hr == E_INVALIDARG, "got (0x%08lx)\n", hr);
hr = IExplorerBrowser_Initialize(peb, hwnd, &rc, NULL); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
/* Initialize twice */ hr = IExplorerBrowser_Initialize(peb, hwnd, &rc, NULL); - ok(hr == E_UNEXPECTED, "got (0x%08x)\n", hr); + ok(hr == E_UNEXPECTED, "got (0x%08lx)\n", hr);
hr = IExplorerBrowser_Destroy(peb); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
/* Initialize again */ hr = IExplorerBrowser_Initialize(peb, hwnd, &rc, NULL); - ok(hr == E_UNEXPECTED, "got (0x%08x)\n", hr); + ok(hr == E_UNEXPECTED, "got (0x%08lx)\n", hr);
/* Destroy again */ hr = IExplorerBrowser_Destroy(peb); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); lres = IExplorerBrowser_Release(peb); - ok(lres == 0, "Got %d\n", lres); + ok(lres == 0, "Got %ld\n", lres);
/* Initialize with a few different rectangles */ peb = NULL; ebrowser_instantiate(&peb); SetRect(&rc, 50, 20, 100, 80); hr = IExplorerBrowser_Initialize(peb, hwnd, &rc, NULL); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); hr = IExplorerBrowser_QueryInterface(peb, &IID_IShellBrowser, (void**)&psb); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { RECT eb_rc; @@ -762,14 +762,14 @@ static void test_initialization(void) static const RECT exp_rc = {0, 0, 48, 58};
hr = IShellBrowser_GetWindow(psb, &eb_hwnd); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
GetClientRect(eb_hwnd, &eb_rc); ok(EqualRect(&eb_rc, &exp_rc), "Got client rect %s\n", wine_dbgstr_rect(&eb_rc));
GetWindowRect(eb_hwnd, &eb_rc); - ok(eb_rc.right - eb_rc.left == 50, "Got window width %d\n", eb_rc.right - eb_rc.left); - ok(eb_rc.bottom - eb_rc.top == 60, "Got window height %d\n", eb_rc.bottom - eb_rc.top); + ok(eb_rc.right - eb_rc.left == 50, "Got window width %ld\n", eb_rc.right - eb_rc.left); + ok(eb_rc.bottom - eb_rc.top == 60, "Got window height %ld\n", eb_rc.bottom - eb_rc.top);
buf[0] = '\0'; GetClassNameA(eb_hwnd, buf, 1024); @@ -777,11 +777,11 @@ static void test_initialization(void)
expected_style = WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_BORDER; style = GetWindowLongPtrW(eb_hwnd, GWL_STYLE); - todo_wine ok(style == expected_style, "Got style 0x%08x, expected 0x%08x\n", style, expected_style); + todo_wine ok(style == expected_style, "Got style 0x%08lx, expected 0x%08lx\n", style, expected_style);
expected_style = WS_EX_CONTROLPARENT; style = GetWindowLongPtrW(eb_hwnd, GWL_EXSTYLE); - ok(style == expected_style, "Got exstyle 0x%08x, expected 0x%08x\n", style, expected_style); + ok(style == expected_style, "Got exstyle 0x%08lx, expected 0x%08lx\n", style, expected_style);
ok(GetParent(eb_hwnd) == hwnd, "GetParent returns %p\n", GetParent(eb_hwnd));
@@ -792,7 +792,7 @@ static void test_initialization(void)
IShellBrowser_Release(psb); lres = IExplorerBrowser_Release(peb); - ok(lres == 0, "Got refcount %d\n", lres); + ok(lres == 0, "Got refcount %ld\n", lres); } else { @@ -800,26 +800,26 @@ static void test_initialization(void)
IExplorerBrowser_Destroy(peb); lres = IExplorerBrowser_Release(peb); - ok(lres == 0, "Got refcount %d\n", lres); + ok(lres == 0, "Got refcount %ld\n", lres); }
/* check window style with EBO_NOBORDER */ ebrowser_instantiate(&peb); hr = IExplorerBrowser_SetOptions(peb, EBO_NOBORDER); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); SetRect(&rc, 50, 20, 100, 80);
hr = IExplorerBrowser_Initialize(peb, hwnd, &rc, NULL); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
hr = IExplorerBrowser_QueryInterface(peb, &IID_IShellBrowser, (void**)&psb); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
hr = IShellBrowser_GetWindow(psb, &eb_hwnd); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
style = GetWindowLongPtrW(eb_hwnd, GWL_STYLE); - ok(!(style & WS_BORDER) || broken(style & WS_BORDER) /* before win8 */, "got style 0x%08x\n", style); + ok(!(style & WS_BORDER) || broken(style & WS_BORDER) /* before win8 */, "got style 0x%08lx\n", style);
IShellBrowser_Release(psb); IExplorerBrowser_Destroy(peb); @@ -829,34 +829,34 @@ static void test_initialization(void) ebrowser_instantiate(&peb); SetRectEmpty(&rc); hr = IExplorerBrowser_Initialize(peb, hwnd, &rc, NULL); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); IExplorerBrowser_Destroy(peb); lres = IExplorerBrowser_Release(peb); - ok(lres == 0, "Got refcount %d\n", lres); + ok(lres == 0, "Got refcount %ld\n", lres);
ebrowser_instantiate(&peb); SetRect(&rc, -1, -1, 1, 1); hr = IExplorerBrowser_Initialize(peb, hwnd, &rc, NULL); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); IExplorerBrowser_Destroy(peb); lres = IExplorerBrowser_Release(peb); - ok(lres == 0, "Got refcount %d\n", lres); + ok(lres == 0, "Got refcount %ld\n", lres);
ebrowser_instantiate(&peb); SetRect(&rc, 10, 10, 5, 5); hr = IExplorerBrowser_Initialize(peb, hwnd, &rc, NULL); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); IExplorerBrowser_Destroy(peb); lres = IExplorerBrowser_Release(peb); - ok(lres == 0, "Got refcount %d\n", lres); + ok(lres == 0, "Got refcount %ld\n", lres);
ebrowser_instantiate(&peb); SetRect(&rc, 10, 10, 5, 5); hr = IExplorerBrowser_Initialize(peb, hwnd, &rc, NULL); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); IExplorerBrowser_Destroy(peb); lres = IExplorerBrowser_Release(peb); - ok(lres == 0, "Got refcount %d\n", lres); + ok(lres == 0, "Got refcount %ld\n", lres); }
static void test_SetSite(void) @@ -883,13 +883,13 @@ static void test_SetSite(void) IExplorerBrowser_SetOptions(peb, EBO_SHOWFRAMES);
hr = IExplorerBrowser_QueryInterface(peb, &IID_IObjectWithSite, (void**)&pow); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { spimpl->interfaces = expected;
hr = IObjectWithSite_SetSite(pow, (IUnknown*)&spimpl->IServiceProvider_iface); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
if(FAILED(hr)) IObjectWithSite_Release(pow); @@ -904,7 +904,7 @@ static void test_SetSite(void) IExplorerPaneVisibility_Release(&epvimpl->IExplorerPaneVisibility_iface); IExplorerBrowser_Destroy(peb); ref = IExplorerBrowser_Release(peb); - ok(ref == 0, "Got ref %d\n", ref); + ok(ref == 0, "Got ref %ld\n", ref);
return; } @@ -932,52 +932,52 @@ static void test_SetSite(void) todo_wine ok(cdbimpl->OnPreviewCreated, "Got %d\n", cdbimpl->OnPreviewCreated);
/* IExplorerPaneVisibility */ - ok(epvimpl->np, "Got %d\n", epvimpl->np); - todo_wine ok(epvimpl->cp, "Got %d\n", epvimpl->cp); - todo_wine ok(epvimpl->cp_o, "Got %d\n", epvimpl->cp_o); - todo_wine ok(epvimpl->cp_v, "Got %d\n", epvimpl->cp_v); - todo_wine ok(epvimpl->dp, "Got %d\n", epvimpl->dp); - todo_wine ok(epvimpl->pp, "Got %d\n", epvimpl->pp); - ok(!epvimpl->qp, "Got %d\n", epvimpl->qp); - ok(!epvimpl->aqp, "Got %d\n", epvimpl->aqp); - ok(!epvimpl->unk, "Got %d\n", epvimpl->unk); + ok(epvimpl->np, "Got %ld\n", epvimpl->np); + todo_wine ok(epvimpl->cp, "Got %ld\n", epvimpl->cp); + todo_wine ok(epvimpl->cp_o, "Got %ld\n", epvimpl->cp_o); + todo_wine ok(epvimpl->cp_v, "Got %ld\n", epvimpl->cp_v); + todo_wine ok(epvimpl->dp, "Got %ld\n", epvimpl->dp); + todo_wine ok(epvimpl->pp, "Got %ld\n", epvimpl->pp); + ok(!epvimpl->qp, "Got %ld\n", epvimpl->qp); + ok(!epvimpl->aqp, "Got %ld\n", epvimpl->aqp); + ok(!epvimpl->unk, "Got %ld\n", epvimpl->unk);
/* Test when IServiceProvider is released. */ IServiceProvider_AddRef(&spimpl->IServiceProvider_iface); ref = IServiceProvider_Release(&spimpl->IServiceProvider_iface); - ok(ref == 2, "Got ref %d\n", ref); + ok(ref == 2, "Got ref %ld\n", ref);
hr = IObjectWithSite_SetSite(pow, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
IServiceProvider_AddRef(&spimpl->IServiceProvider_iface); ref = IServiceProvider_Release(&spimpl->IServiceProvider_iface); - ok(ref == 1, "Got ref %d\n", ref); + ok(ref == 1, "Got ref %ld\n", ref);
hr = IObjectWithSite_SetSite(pow, (IUnknown*)&spimpl->IServiceProvider_iface); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
IServiceProvider_AddRef(&spimpl->IServiceProvider_iface); ref = IServiceProvider_Release(&spimpl->IServiceProvider_iface); - ok(ref == 2, "Got ref %d\n", ref); + ok(ref == 2, "Got ref %ld\n", ref);
IExplorerBrowser_Destroy(peb);
IServiceProvider_AddRef(&spimpl->IServiceProvider_iface); ref = IServiceProvider_Release(&spimpl->IServiceProvider_iface); - ok(ref == 2, "Got ref %d\n", ref); + ok(ref == 2, "Got ref %ld\n", ref);
IObjectWithSite_Release(pow); ref = IExplorerBrowser_Release(peb); - ok(ref == 0, "Got ref %d\n", ref); + ok(ref == 0, "Got ref %ld\n", ref);
ref = IServiceProvider_Release(&spimpl->IServiceProvider_iface); - ok(ref == 0, "Got ref %d\n", ref); + ok(ref == 0, "Got ref %ld\n", ref);
ref = ICommDlgBrowser3_Release(&cdbimpl->ICommDlgBrowser3_iface); - ok(ref == 0, "Got ref %d\n", ref); + ok(ref == 0, "Got ref %ld\n", ref); ref = IExplorerPaneVisibility_Release(&epvimpl->IExplorerPaneVisibility_iface); - ok(ref == 0, "Got ref %d\n", ref); + ok(ref == 0, "Got ref %ld\n", ref); }
static void test_basics(void) @@ -998,23 +998,23 @@ static void test_basics(void) /* SetRect */ SetRectEmpty(&rc); hr = IExplorerBrowser_SetRect(peb, NULL, rc); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
SetRect(&rc, 100, 100, 10, 10); hr = IExplorerBrowser_SetRect(peb, NULL, rc); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
/* SetRect with DeferWindowPos */ SetRect(&rc, 0, 0, 10, 10); hdwp = BeginDeferWindowPos(1); hr = IExplorerBrowser_SetRect(peb, &hdwp, rc); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); lres = EndDeferWindowPos(hdwp); ok(lres, "EndDeferWindowPos failed.\n");
hdwp = NULL; hr = IExplorerBrowser_SetRect(peb, &hdwp, rc); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); ok(hdwp == NULL, "got %p\n", hdwp); lres = EndDeferWindowPos(hdwp); ok(!lres, "EndDeferWindowPos succeeded unexpectedly.\n"); @@ -1022,9 +1022,9 @@ static void test_basics(void) /* Test positioning */ SetRect(&rc, 10, 20, 50, 50); hr = IExplorerBrowser_SetRect(peb, NULL, rc); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); hr = IExplorerBrowser_QueryInterface(peb, &IID_IShellBrowser, (void**)&psb); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { HWND eb_hwnd; @@ -1033,7 +1033,7 @@ static void test_basics(void) static const RECT exp_rc2 = {11, 21, 49, 24};
hr = IShellBrowser_GetWindow(psb, &eb_hwnd); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
GetClientRect(eb_hwnd, &eb_rc); MapWindowPoints(eb_hwnd, hwnd, (POINT*)&eb_rc, 2); @@ -1043,14 +1043,14 @@ static void test_basics(void) rc.bottom = 25; hdwp = (HDWP)0xdeadbeef; hr = IExplorerBrowser_SetRect(peb, &hdwp, rc); - ok(hr == E_FAIL, "Got 0x%08x\n", hr); + ok(hr == E_FAIL, "Got 0x%08lx\n", hr); GetClientRect(eb_hwnd, &eb_rc); MapWindowPoints(eb_hwnd, hwnd, (POINT*)&eb_rc, 2); ok(EqualRect(&eb_rc, &exp_rc), "Got rect %s\n", wine_dbgstr_rect(&eb_rc));
hdwp = NULL; hr = IExplorerBrowser_SetRect(peb, &hdwp, rc); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); GetClientRect(eb_hwnd, &eb_rc); MapWindowPoints(eb_hwnd, hwnd, (POINT*)&eb_rc, 2); ok(EqualRect(&eb_rc, &exp_rc2), "Got rect %s\n", wine_dbgstr_rect(&eb_rc)); @@ -1070,18 +1070,18 @@ static void test_basics(void) }
hr = IExplorerBrowser_GetOptions(peb, &flags); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); ok(flags == 0, "got (0x%08x)\n", flags);
/* Settings preserved through Initialize. */ hr = IExplorerBrowser_SetOptions(peb, 0xDEADBEEF); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
ebrowser_initialize(peb);
hr = IExplorerBrowser_GetOptions(peb, &flags); ok(flags == 0xDEADBEEF, "got (0x%08x)\n", flags); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
IExplorerBrowser_Destroy(peb); IExplorerBrowser_Release(peb); @@ -1091,22 +1091,22 @@ static void test_basics(void)
/* SetFolderSettings */ hr = IExplorerBrowser_SetFolderSettings(peb, NULL); - ok(hr == E_INVALIDARG, "got (0x%08x)\n", hr); + ok(hr == E_INVALIDARG, "got (0x%08lx)\n", hr); fs.ViewMode = 0; fs.fFlags = 0; hr = IExplorerBrowser_SetFolderSettings(peb, &fs); - todo_wine ok(hr == E_INVALIDARG, "got (0x%08x)\n", hr); + todo_wine ok(hr == E_INVALIDARG, "got (0x%08lx)\n", hr);
/* SetPropertyBag */ hr = IExplorerBrowser_SetPropertyBag(peb, NULL); - ok(hr == E_INVALIDARG, "Got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Got 0x%08lx\n", hr); hr = IExplorerBrowser_SetPropertyBag(peb, winetest); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
/* TODO: Test after browsing somewhere. */
IExplorerBrowser_Destroy(peb); lres = IExplorerBrowser_Release(peb); - ok(lres == 0, "Got %d\n", lres); + ok(lres == 0, "Got %ld\n", lres); }
static void test_Advise(void) @@ -1133,13 +1133,13 @@ static void test_Advise(void) /* Using Unadvise with a cookie that has yet to be given out * results in E_INVALIDARG */ hr = IExplorerBrowser_Unadvise(peb, 11); - ok(hr == E_INVALIDARG, "got (0x%08x)\n", hr); + ok(hr == E_INVALIDARG, "got (0x%08lx)\n", hr);
/* Add some before initialization */ for(i = 0; i < 5; i++) { hr = IExplorerBrowser_Advise(peb, pebe, &cookies[i]); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); }
ebrowser_initialize(peb); @@ -1148,10 +1148,10 @@ static void test_Advise(void) for(i = 5; i < 10; i++) { hr = IExplorerBrowser_Advise(peb, pebe, &cookies[i]); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); }
- ok(ebev.ref == 10, "Got %d\n", ebev.ref); + ok(ebev.ref == 10, "Got %ld\n", ebev.ref);
ebev.completed = 0; ebrowser_browse_to_desktop(peb); @@ -1162,7 +1162,7 @@ static void test_Advise(void) for(i = 4; i < 8; i++) { hr = IExplorerBrowser_Unadvise(peb, cookies[i]); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); }
ebev.completed = 0; @@ -1183,11 +1183,11 @@ static void test_Advise(void) if(i<4||i>7) { hr = IExplorerBrowser_Unadvise(peb, cookies[i]); - ok(hr == S_OK, "%d: got (0x%08x)\n", i, hr); + ok(hr == S_OK, "%d: got (0x%08lx)\n", i, hr); } }
- ok(ebev.ref == 0, "Got %d\n", ebev.ref); + ok(ebev.ref == 0, "Got %ld\n", ebev.ref);
ebev.completed = 0; ebrowser_browse_to_desktop(peb); @@ -1196,12 +1196,12 @@ static void test_Advise(void)
/* ::Destroy implies ::Unadvise. */ hr = IExplorerBrowser_Advise(peb, pebe, &cookies[0]); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(ebev.ref == 1, "Got %d\n", ebev.ref); + ok(hr == S_OK, "Got 0x%08lx\n", hr); + ok(ebev.ref == 1, "Got %ld\n", ebev.ref);
hr = IExplorerBrowser_Destroy(peb); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(ebev.ref == 0, "Got %d\n", ebev.ref); + ok(hr == S_OK, "Got 0x%08lx\n", hr); + ok(ebev.ref == 0, "Got %ld\n", ebev.ref);
ref = IExplorerBrowser_Release(peb); ok(!ref, "Got %d\n", ref); @@ -1236,7 +1236,7 @@ static void test_browse_pidl_(IExplorerBrowser *peb, IExplorerBrowserEventsImpl ebev->completed = ebev->created = ebev->pending = ebev->failed = 0;
hr = IExplorerBrowser_BrowseToIDList(peb, pidl, uFlags); - ok_(file, line) (hr == hr_exp, "BrowseToIDList returned 0x%08x\n", hr); + ok_(file, line) (hr == hr_exp, "BrowseToIDList returned 0x%08lx\n", hr); process_msgs();
ok_(file, line) @@ -1257,13 +1257,13 @@ static void test_browse_pidl_sb_(IExplorerBrowser *peb, IExplorerBrowserEventsIm HRESULT hr;
hr = IExplorerBrowser_QueryInterface(peb, &IID_IShellBrowser, (void**)&psb); - ok_(file, line) (hr == S_OK, "QueryInterface returned 0x%08x\n", hr); + ok_(file, line) (hr == S_OK, "QueryInterface returned 0x%08lx\n", hr); if(SUCCEEDED(hr)) { ebev->completed = ebev->created = ebev->pending = ebev->failed = 0;
hr = IShellBrowser_BrowseObject(psb, pidl, uFlags); - ok_(file, line) (hr == hr_exp, "BrowseObject returned 0x%08x\n", hr); + ok_(file, line) (hr == hr_exp, "BrowseObject returned 0x%08lx\n", hr); process_msgs();
ok_(file, line) @@ -1309,9 +1309,9 @@ static void test_navigation(void) CreateDirectoryW(child_path, NULL);
hr = SHParseDisplayName(current_path, NULL, &pidl_current, 0, NULL); - ok(hr == S_OK, "Failed to parse a path, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to parse a path, hr %#lx.\n", hr); hr = SHParseDisplayName(child_path, NULL, &pidl_child, 0, NULL); - ok(hr == S_OK, "Failed to parse a path, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to parse a path, hr %#lx.\n", hr);
ebrowser_instantiate(&peb); ebrowser_initialize(peb); @@ -1364,16 +1364,16 @@ static void test_navigation(void) test_browse_pidl_sb(peb2, &ebev, pidl_current, SBSP_ABSOLUTE, S_OK, 1, 0, 0, 1);
hr = IExplorerBrowser_GetCurrentView(peb, &IID_IFolderView, (void**)&pfv); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { LPITEMIDLIST pidl_relative;
hr = IFolderView_GetFolder(pfv, &IID_IShellFolder, (void**)&psf); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); hr = IShellFolder_ParseDisplayName(psf, NULL, NULL, (LPWSTR)testfolderW, NULL, &pidl_relative, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
/* Browsing to another location here before using the * pidl_relative would make ExplorerBrowser in Windows 7 show a @@ -1414,11 +1414,11 @@ static void test_navigation(void) }
hr = IExplorerBrowser_Unadvise(peb, cookie); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); IExplorerBrowser_Destroy(peb); process_msgs(); hr = IExplorerBrowser_Unadvise(peb2, cookie2); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); IExplorerBrowser_Destroy(peb2); process_msgs();
@@ -1427,42 +1427,42 @@ static void test_navigation(void) test_browse_pidl_sb(peb2, &ebev, pidl_child, SBSP_ABSOLUTE, HRESULT_FROM_WIN32(ERROR_BUSY), 0, 0, 0, 0);
lres = IExplorerBrowser_Release(peb); - ok(lres == 0, "Got lres %d\n", lres); + ok(lres == 0, "Got lres %ld\n", lres); lres = IExplorerBrowser_Release(peb2); - ok(lres == 0, "Got lres %d\n", lres); + ok(lres == 0, "Got lres %ld\n", lres);
/******************************************/ /* Test some options that affect browsing */
ebrowser_instantiate(&peb); hr = IExplorerBrowser_Advise(peb, &ebev.IExplorerBrowserEvents_iface, &cookie); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); hr = IExplorerBrowser_SetOptions(peb, EBO_NAVIGATEONCE); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); ebrowser_initialize(peb);
test_browse_pidl(peb, &ebev, pidl_current, 0, S_OK, 1, 1, 0, 1); test_browse_pidl(peb, &ebev, pidl_current, 0, E_FAIL, 0, 0, 0, 0);
hr = IExplorerBrowser_SetOptions(peb, 0); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
test_browse_pidl(peb, &ebev, pidl_current, 0, S_OK, 1, 0, 0, 1); test_browse_pidl(peb, &ebev, pidl_current, 0, S_OK, 1, 0, 0, 1);
/* Difference in behavior lies where? */ hr = IExplorerBrowser_SetOptions(peb, EBO_ALWAYSNAVIGATE); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
test_browse_pidl(peb, &ebev, pidl_current, 0, S_OK, 1, 0, 0, 1); test_browse_pidl(peb, &ebev, pidl_current, 0, S_OK, 1, 0, 0, 1);
hr = IExplorerBrowser_Unadvise(peb, cookie); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
IExplorerBrowser_Destroy(peb); lres = IExplorerBrowser_Release(peb); - ok(lres == 0, "Got lres %d\n", lres); + ok(lres == 0, "Got lres %ld\n", lres);
/* BrowseToObject tests */ ebrowser_instantiate(&peb); @@ -1470,11 +1470,11 @@ static void test_navigation(void)
/* Browse to the desktop by passing an IShellFolder */ hr = SHGetDesktopFolder(&psf); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { hr = IExplorerBrowser_BrowseToObject(peb, (IUnknown*)psf, SBSP_DEFBROWSER); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); if(hr == S_OK) process_msgs();
IShellFolder_Release(psf); @@ -1482,11 +1482,11 @@ static void test_navigation(void)
/* Browse to the current directory by passing a ShellItem */ hr = pSHCreateShellItem(NULL, NULL, pidl_current, &psi); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { hr = IExplorerBrowser_BrowseToObject(peb, (IUnknown*)psi, SBSP_DEFBROWSER); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); process_msgs();
IShellItem_Release(psi); @@ -1494,7 +1494,7 @@ static void test_navigation(void)
IExplorerBrowser_Destroy(peb); lres = IExplorerBrowser_Release(peb); - ok(lres == 0, "Got lres %d\n", lres); + ok(lres == 0, "Got lres %ld\n", lres);
/* Cleanup */ RemoveDirectoryW(child_path); @@ -1517,12 +1517,12 @@ static void test_GetCurrentView(void) IExplorerBrowser_GetCurrentView(peb, NULL, NULL); } hr = IExplorerBrowser_GetCurrentView(peb, NULL, (void**)&punk); - ok(hr == E_FAIL, "Got 0x%08x\n", hr); + ok(hr == E_FAIL, "Got 0x%08lx\n", hr);
#define test_gcv(iid, exp) \ do { \ hr = IExplorerBrowser_GetCurrentView(peb, &iid, (void**)&punk); \ - ok(hr == exp, "(%s:)Expected (0x%08x), got: (0x%08x)\n", \ + ok(hr == exp, "(%s:)Expected (0x%08lx), got: (0x%08lx)\n", \ #iid ,exp, hr); \ if(SUCCEEDED(hr)) IUnknown_Release(punk); \ } while(0) @@ -1585,7 +1585,7 @@ static void test_InputObject(void)
ebrowser_instantiate(&peb); hr = IExplorerBrowser_QueryInterface(peb, &IID_IInputObject, (void**)&pio); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(FAILED(hr)) { win_skip("IInputObject not supported.\n"); @@ -1594,47 +1594,47 @@ static void test_InputObject(void)
/* Before initializing */ hr = IInputObject_TranslateAcceleratorIO(pio, &msg_a); - todo_wine ok(hr == E_FAIL, "Got 0x%08x\n", hr); + todo_wine ok(hr == E_FAIL, "Got 0x%08lx\n", hr);
hr = IInputObject_HasFocusIO(pio); - todo_wine ok(hr == E_FAIL, "Got 0x%08x\n", hr); + todo_wine ok(hr == E_FAIL, "Got 0x%08lx\n", hr);
hr = IInputObject_UIActivateIO(pio, TRUE, &msg_a); - todo_wine ok(hr == S_OK, "Got 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "Got 0x%08lx\n", hr);
hr = IInputObject_HasFocusIO(pio); - todo_wine ok(hr == E_FAIL, "Got 0x%08x\n", hr); + todo_wine ok(hr == E_FAIL, "Got 0x%08lx\n", hr);
hr = IInputObject_TranslateAcceleratorIO(pio, &msg_a); - todo_wine ok(hr == E_FAIL, "Got 0x%08x\n", hr); + todo_wine ok(hr == E_FAIL, "Got 0x%08lx\n", hr);
SetRect(&rc, 0, 0, 100, 100); hr = IExplorerBrowser_Initialize(peb, hwnd, &rc, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
hr = IInputObject_HasFocusIO(pio); - todo_wine ok(hr == E_FAIL, "Got 0x%08x\n", hr); + todo_wine ok(hr == E_FAIL, "Got 0x%08lx\n", hr);
hr = IInputObject_TranslateAcceleratorIO(pio, &msg_a); - todo_wine ok(hr == E_FAIL, "Got 0x%08x\n", hr); + todo_wine ok(hr == E_FAIL, "Got 0x%08lx\n", hr);
/* Browse to the desktop */ SHGetDesktopFolder(&psf); hr = IExplorerBrowser_BrowseToObject(peb, (IUnknown*)psf, SBSP_DEFBROWSER); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); IShellFolder_Release(psf);
hr = IInputObject_UIActivateIO(pio, TRUE, &msg_a); - todo_wine ok(hr == S_OK, "Got 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "Got 0x%08lx\n", hr);
hr = IInputObject_HasFocusIO(pio); - todo_wine ok(hr == S_OK, "Got 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "Got 0x%08lx\n", hr);
hr = IInputObject_UIActivateIO(pio, FALSE, &msg_a); - todo_wine ok(hr == S_OK, "Got 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "Got 0x%08lx\n", hr);
hr = IInputObject_HasFocusIO(pio); - todo_wine ok(hr == S_OK, "Got 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "Got 0x%08lx\n", hr);
hr = IInputObject_TranslateAcceleratorIO(pio, &msg_a); if(hr == S_OK) @@ -1656,7 +1656,7 @@ static void test_InputObject(void) msg_a.wParam = i; process_msgs(); hr = IInputObject_TranslateAcceleratorIO(pio, &msg_a); - todo_wine ok(hr == (found ? S_OK : S_FALSE), "Got 0x%08x (%04x)\n", hr, i); + todo_wine ok(hr == (found ? S_OK : S_FALSE), "Got 0x%08lx (%04x)\n", hr, i); if(i == VK_F5) Sleep(1000); /* Needed for w2k8 (64bit) */ } @@ -1674,7 +1674,7 @@ static BOOL test_instantiate_control(void) HRESULT hr;
hr = ebrowser_instantiate(&peb); - ok(hr == S_OK || hr == REGDB_E_CLASSNOTREG, "Got (0x%08x)\n", hr); + ok(hr == S_OK || hr == REGDB_E_CLASSNOTREG, "Got (0x%08lx)\n", hr); if(FAILED(hr)) return FALSE;
diff --git a/dlls/shell32/tests/msg.h b/dlls/shell32/tests/msg.h index 74354d17407..a6c16ae05e6 100644 --- a/dlls/shell32/tests/msg.h +++ b/dlls/shell32/tests/msg.h @@ -132,14 +132,14 @@ static void ok_sequence_(struct msg_sequence **seq, int sequence_index, { failcount++; ok_(file, line) (FALSE, - "%s: in msg 0x%04x expecting wParam 0x%lx got 0x%lx\n", + "%s: in msg 0x%04x expecting wParam 0x%Ix got 0x%Ix\n", context, expected->message, expected->wParam, actual->wParam); } } else { ok_(file, line) (expected->wParam == actual->wParam, - "%s: in msg 0x%04x expecting wParam 0x%lx got 0x%lx\n", + "%s: in msg 0x%04x expecting wParam 0x%Ix got 0x%Ix\n", context, expected->message, expected->wParam, actual->wParam); } } @@ -152,14 +152,14 @@ static void ok_sequence_(struct msg_sequence **seq, int sequence_index, { failcount++; ok_(file, line) (FALSE, - "%s: in msg 0x%04x expecting lParam 0x%lx got 0x%lx\n", + "%s: in msg 0x%04x expecting lParam 0x%Ix got 0x%Ix\n", context, expected->message, expected->lParam, actual->lParam); } } else { ok_(file, line) (expected->lParam == actual->lParam, - "%s: in msg 0x%04x expecting lParam 0x%lx got 0x%lx\n", + "%s: in msg 0x%04x expecting lParam 0x%Ix got 0x%Ix\n", context, expected->message, expected->lParam, actual->lParam); } } diff --git a/dlls/shell32/tests/recyclebin.c b/dlls/shell32/tests/recyclebin.c index 9207872d40f..d32c9e672a1 100644 --- a/dlls/shell32/tests/recyclebin.c +++ b/dlls/shell32/tests/recyclebin.c @@ -58,7 +58,7 @@ static void test_query_recyclebin(void) ok(GetTempFileNameA(temp_path, "trash", 0, buf), "GetTempFileName failed\n"); buf[strlen(buf) + 1] = '\0'; hr = pSHQueryRecycleBinA(buf,&info1); - ok(hr == S_OK, "SHQueryRecycleBinA failed with error 0x%x\n", hr); + ok(hr == S_OK, "SHQueryRecycleBinA failed with error 0x%lx\n", hr); ok(info1.i64Size!=0xdeadbeef,"i64Size not set\n"); ok(info1.i64NumItems!=0xdeadbeef,"i64NumItems not set\n"); /*create and send a file to the recycle bin*/ @@ -75,7 +75,7 @@ static void test_query_recyclebin(void) shfo.lpszProgressTitle = NULL; ok(!pSHFileOperationA(&shfo), "Deletion was not successful\n"); hr = pSHQueryRecycleBinA(buf,&info2); - ok(hr == S_OK, "SHQueryRecycleBinA failed with error 0x%x\n", hr); + ok(hr == S_OK, "SHQueryRecycleBinA failed with error 0x%lx\n", hr); ok(info2.i64Size==info1.i64Size+written,"Expected recycle bin to have 0x%s bytes\n",wine_dbgstr_longlong(info1.i64Size+written)); ok(info2.i64NumItems==info1.i64NumItems+1,"Expected recycle bin to have 0x%s items\n",wine_dbgstr_longlong(info1.i64NumItems+1)); } diff --git a/dlls/shell32/tests/shelldispatch.c b/dlls/shell32/tests/shelldispatch.c index 860024ae6fa..3894f67dd11 100644 --- a/dlls/shell32/tests/shelldispatch.c +++ b/dlls/shell32/tests/shelldispatch.c @@ -33,7 +33,7 @@ #include "initguid.h"
#define EXPECT_HR(hr,hr_exp) \ - ok(hr == hr_exp, "got 0x%08x, expected 0x%08x\n", hr, hr_exp) + ok(hr == hr_exp, "got 0x%08lx, expected 0x%08lx\n", hr, hr_exp)
#define EXPECT_REF(obj,ref) _expect_ref((IUnknown *)obj, ref, __LINE__) static void _expect_ref(IUnknown *obj, ULONG ref, int line) @@ -41,7 +41,7 @@ static void _expect_ref(IUnknown *obj, ULONG ref, int line) ULONG rc; IUnknown_AddRef(obj); rc = IUnknown_Release(obj); - ok_(__FILE__,line)(rc == ref, "Unexpected refcount %d, expected %d\n", rc, ref); + ok_(__FILE__,line)(rc == ref, "Unexpected refcount %ld, expected %ld\n", rc, ref); }
static const WCHAR winetestW[] = {'w','i','n','e','t','e','s','t',0}; @@ -140,24 +140,24 @@ static void test_namespace(void) int len, i;
r = CoCreateInstance(&CLSID_Shell, NULL, CLSCTX_INPROC_SERVER, &IID_IShellDispatch, (void **)&sd); - ok(SUCCEEDED(r), "Failed to create ShellDispatch object: %#x.\n", r); + ok(SUCCEEDED(r), "Failed to create ShellDispatch object: %#lx.\n", r);
disp = NULL; r = IShellDispatch_get_Application(sd, &disp); - ok(r == S_OK, "Failed to get application pointer, hr %#x.\n", r); + ok(r == S_OK, "Failed to get application pointer, hr %#lx.\n", r); ok(disp == (IDispatch *)sd, "Unexpected application pointer %p.\n", disp); IDispatch_Release(disp);
disp = NULL; r = IShellDispatch_get_Parent(sd, &disp); - ok(r == S_OK, "Failed to get Shell object parent, hr %#x.\n", r); + ok(r == S_OK, "Failed to get Shell object parent, hr %#lx.\n", r); ok(disp == (IDispatch *)sd, "Unexpected parent pointer %p.\n", disp); IDispatch_Release(disp);
VariantInit(&var); folder = (void*)0xdeadbeef; r = IShellDispatch_NameSpace(sd, var, &folder); - ok(r == S_FALSE, "expected S_FALSE, got %08x\n", r); + ok(r == S_FALSE, "expected S_FALSE, got %08lx\n", r); ok(folder == NULL, "expected NULL, got %p\n", folder);
/* test valid folder ids */ @@ -169,9 +169,9 @@ static void test_namespace(void) r = IShellDispatch_NameSpace(sd, var, &folder); if (special_folders[i] == ssfALTSTARTUP || special_folders[i] == ssfCOMMONALTSTARTUP) todo_wine - ok(r == S_OK || broken(r == S_FALSE) /* winxp */, "Failed to get folder for index %#x, got %08x\n", special_folders[i], r); + ok(r == S_OK || broken(r == S_FALSE) /* winxp */, "Failed to get folder for index %#x, got %08lx\n", special_folders[i], r); else - ok(r == S_OK, "Failed to get folder for index %#x, got %08x\n", special_folders[i], r); + ok(r == S_OK, "Failed to get folder for index %#x, got %08lx\n", special_folders[i], r); if (folder) Folder_Release(folder); } @@ -180,22 +180,22 @@ static void test_namespace(void) V_I4(&var) = -1; folder = (void *)0xdeadbeef; r = IShellDispatch_NameSpace(sd, var, &folder); - ok(r == S_FALSE, "Unexpected hr %#x.\n", r); + ok(r == S_FALSE, "Unexpected hr %#lx.\n", r); ok(folder == NULL, "Unexpected folder instance %p\n", folder);
V_VT(&var) = VT_I4; V_I4(&var) = ssfPROGRAMFILES; r = IShellDispatch_NameSpace(sd, var, &folder); - ok(r == S_OK, "IShellDispatch::NameSpace failed: %08x\n", r); + ok(r == S_OK, "IShellDispatch::NameSpace failed: %08lx\n", r); if (r == S_OK) { static WCHAR path[MAX_PATH];
r = SHGetFolderPathW(NULL, CSIDL_PROGRAM_FILES, NULL, SHGFP_TYPE_CURRENT, path); - ok(r == S_OK, "Failed to get folder path: %#x.\n", r); + ok(r == S_OK, "Failed to get folder path: %#lx.\n", r);
r = Folder_get_Title(folder, &title); - ok(r == S_OK, "Folder::get_Title failed: %08x\n", r); + ok(r == S_OK, "Folder::get_Title failed: %08lx\n", r); if (r == S_OK) { /* On Win2000-2003 title is equal to program files directory name in @@ -208,9 +208,9 @@ static void test_namespace(void) PWSTR name;
r = SHGetSpecialFolderLocation(NULL, CSIDL_PROGRAM_FILES, &pidl); - ok(r == S_OK, "SHGetSpecialFolderLocation failed: %08x\n", r); + ok(r == S_OK, "SHGetSpecialFolderLocation failed: %08lx\n", r); r = pSHGetNameFromIDList(pidl, SIGDN_NORMALDISPLAY, &name); - ok(r == S_OK, "SHGetNameFromIDList failed: %08x\n", r); + ok(r == S_OK, "SHGetNameFromIDList failed: %08lx\n", r); ok(!lstrcmpW(title, name), "expected %s, got %s\n", wine_dbgstr_w(name), wine_dbgstr_w(title)); CoTaskMemFree(name); CoTaskMemFree(pidl); @@ -228,15 +228,15 @@ static void test_namespace(void) SysFreeString(title); } r = Folder_QueryInterface(folder, &IID_Folder2, (LPVOID*)&folder2); - ok(r == S_OK, "Folder::QueryInterface failed: %08x\n", r); + ok(r == S_OK, "Folder::QueryInterface failed: %08lx\n", r); if (r == S_OK) { r = Folder2_get_Self(folder2, &item); - ok(r == S_OK, "Folder::get_Self failed: %08x\n", r); + ok(r == S_OK, "Folder::get_Self failed: %08lx\n", r); if (r == S_OK) { r = FolderItem_get_Path(item, &item_path); - ok(r == S_OK, "FolderItem::get_Path failed: %08x\n", r); + ok(r == S_OK, "FolderItem::get_Path failed: %08lx\n", r); ok(!lstrcmpiW(item_path, path), "expected %s, got %s\n", wine_dbgstr_w(path), wine_dbgstr_w(item_path)); SysFreeString(item_path); FolderItem_Release(item); @@ -249,14 +249,14 @@ static void test_namespace(void) V_VT(&var) = VT_I4; V_I4(&var) = ssfBITBUCKET; r = IShellDispatch_NameSpace(sd, var, &folder); - ok(r == S_OK, "IShellDispatch::NameSpace failed: %08x\n", r); + ok(r == S_OK, "IShellDispatch::NameSpace failed: %08lx\n", r);
r = Folder_QueryInterface(folder, &IID_Folder2, (void **)&folder2); - ok(r == S_OK, "Failed to get Folder2 interface: %#x.\n", r); + ok(r == S_OK, "Failed to get Folder2 interface: %#lx.\n", r); r = Folder2_get_Self(folder2, &item); - ok(r == S_OK, "Folder::get_Self failed: %08x\n", r); + ok(r == S_OK, "Folder::get_Self failed: %08lx\n", r); r = FolderItem_get_Path(item, &item_path); - ok(r == S_OK, "FolderItem::get_Path failed: %08x\n", r); + ok(r == S_OK, "FolderItem::get_Path failed: %08lx\n", r); /* TODO: we return lowercase GUID here */ ok(!lstrcmpiW(item_path, clsidW), "expected %s, got %s\n", wine_dbgstr_w(clsidW), wine_dbgstr_w(item_path));
@@ -272,7 +272,7 @@ static void test_namespace(void) V_VT(&var) = VT_BSTR; V_BSTR(&var) = SysAllocString(winetestW); r = IShellDispatch_NameSpace(sd, var, &folder); - ok(r == S_FALSE, "expected S_FALSE, got %08x\n", r); + ok(r == S_FALSE, "expected S_FALSE, got %08lx\n", r); SysFreeString(V_BSTR(&var));
GetFullPathNameW(winetestW, MAX_PATH, tempW, NULL); @@ -284,24 +284,24 @@ static void test_namespace(void) V_VT(&var) = VT_BSTR; V_BSTR(&var) = SysAllocString(tempW); r = IShellDispatch_NameSpace(sd, var, &folder); - ok(r == S_OK, "IShellDispatch::NameSpace failed: %08x\n", r); + ok(r == S_OK, "IShellDispatch::NameSpace failed: %08lx\n", r);
disp = (void *)0xdeadbeef; r = Folder_get_Parent(folder, &disp); - ok(r == E_NOTIMPL, "Unexpected hr %#x.\n", r); + ok(r == E_NOTIMPL, "Unexpected hr %#lx.\n", r); ok(disp == NULL, "Unexpected parent pointer %p.\n", disp);
r = Folder_get_Title(folder, &title); - ok(r == S_OK, "Failed to get folder title: %#x.\n", r); + ok(r == S_OK, "Failed to get folder title: %#lx.\n", r); ok(!lstrcmpW(title, winetestW), "Unexpected title: %s\n", wine_dbgstr_w(title)); SysFreeString(title);
r = Folder_QueryInterface(folder, &IID_Folder2, (void **)&folder2); - ok(r == S_OK, "Failed to get Folder2 interface: %#x.\n", r); + ok(r == S_OK, "Failed to get Folder2 interface: %#lx.\n", r); r = Folder2_get_Self(folder2, &item); - ok(r == S_OK, "Folder::get_Self failed: %08x\n", r); + ok(r == S_OK, "Folder::get_Self failed: %08lx\n", r); r = FolderItem_get_Path(item, &item_path); - ok(r == S_OK, "Failed to get item path: %#x.\n", r); + ok(r == S_OK, "Failed to get item path: %#lx.\n", r); ok(!lstrcmpW(item_path, long_pathW), "Unexpected path %s, got %s\n", wine_dbgstr_w(item_path), wine_dbgstr_w(long_pathW)); SysFreeString(item_path); FolderItem_Release(item); @@ -317,11 +317,11 @@ static void test_namespace(void) V_VT(&var) = VT_BSTR; V_BSTR(&var) = SysAllocString(tempW); r = IShellDispatch_NameSpace(sd, var, &folder); - ok(r == S_OK, "IShellDispatch::NameSpace failed: %08x\n", r); + ok(r == S_OK, "IShellDispatch::NameSpace failed: %08lx\n", r); if (r == S_OK) { r = Folder_get_Title(folder, &title); - ok(r == S_OK, "Folder::get_Title failed: %08x\n", r); + ok(r == S_OK, "Folder::get_Title failed: %08lx\n", r); if (r == S_OK) { ok(!lstrcmpW(title, winetestW), "bad title: %s\n", @@ -329,15 +329,15 @@ static void test_namespace(void) SysFreeString(title); } r = Folder_QueryInterface(folder, &IID_Folder2, (LPVOID*)&folder2); - ok(r == S_OK, "Failed to get Folder2 interface: %#x.\n", r); + ok(r == S_OK, "Failed to get Folder2 interface: %#lx.\n", r); if (r == S_OK) { r = Folder2_get_Self(folder2, &item); - ok(r == S_OK, "Folder::get_Self failed: %08x\n", r); + ok(r == S_OK, "Folder::get_Self failed: %08lx\n", r); if (r == S_OK) { r = FolderItem_get_Path(item, &item_path); - ok(r == S_OK, "FolderItem::get_Path failed: %08x\n", r); + ok(r == S_OK, "FolderItem::get_Path failed: %08lx\n", r); ok(!lstrcmpW(item_path, long_pathW), "Unexpected path %s, got %s\n", wine_dbgstr_w(item_path), wine_dbgstr_w(long_pathW)); SysFreeString(item_path); @@ -393,7 +393,7 @@ static void test_items(void) int i;
r = CoCreateInstance(&CLSID_Shell, NULL, CLSCTX_INPROC_SERVER, &IID_IShellDispatch, (void**)&sd); - ok(SUCCEEDED(r), "CoCreateInstance failed: %08x\n", r); + ok(SUCCEEDED(r), "CoCreateInstance failed: %08lx\n", r); ok(!!sd, "sd is null\n");
/* create and enter a temporary directory and a folder object for it */ @@ -401,14 +401,14 @@ static void test_items(void) GetCurrentDirectoryW(MAX_PATH, orig_dir); SetCurrentDirectoryW(path); ret = CreateDirectoryW(winetestW, NULL); - ok(ret, "CreateDirectory failed: %08x\n", GetLastError()); + ok(ret, "CreateDirectory failed: %08lx\n", GetLastError()); GetFullPathNameW(winetestW, MAX_PATH, path, NULL); V_VT(&var) = VT_BSTR; V_BSTR(&var) = SysAllocString(path);
EXPECT_REF(sd, 1); r = IShellDispatch_NameSpace(sd, var, &folder); - ok(r == S_OK, "IShellDispatch::NameSpace failed: %08x\n", r); + ok(r == S_OK, "IShellDispatch::NameSpace failed: %08lx\n", r); ok(!!folder, "folder is null\n"); EXPECT_REF(folder, 1); EXPECT_REF(sd, 1); @@ -421,14 +421,14 @@ static void test_items(void) /* FolderItems grabs its Folder reference */ items = NULL; r = Folder_Items(folder, &items); - ok(r == S_OK, "Folder::Items failed: %08x\n", r); + ok(r == S_OK, "Folder::Items failed: %08lx\n", r); ok(!!items, "items is null\n"); EXPECT_REF(folder, 2); EXPECT_REF(items, 1);
unk = NULL; r = Folder_Items(folder, (FolderItems **)&unk); - ok(r == S_OK, "Folder::Items failed: %08x\n", r); + ok(r == S_OK, "Folder::Items failed: %08lx\n", r); EXPECT_REF(folder, 3); IUnknown_Release(unk); EXPECT_REF(folder, 2); @@ -441,18 +441,18 @@ static void test_items(void) disp = NULL; EXPECT_REF(sd, 1); r = Folder_get_Application(folder, &disp); - ok(r == S_OK, "Failed to get application %#x.\n", r); + ok(r == S_OK, "Failed to get application %#lx.\n", r); ok(disp != (IDispatch *)sd, "Unexpected application pointer\n"); EXPECT_REF(sd, 1);
disp2 = NULL; r = Folder_get_Application(folder, &disp2); - ok(r == S_OK, "Failed to get application %#x.\n", r); + ok(r == S_OK, "Failed to get application %#lx.\n", r); ok(disp2 == disp, "Unexpected application pointer\n"); IDispatch_Release(disp2);
r = IDispatch_QueryInterface(disp, &IID_IShellDispatch, (void **)&disp2); - ok(r == S_OK, "Wrong instance, hr %#x.\n", r); + ok(r == S_OK, "Wrong instance, hr %#lx.\n", r); IDispatch_Release(disp2); IDispatch_Release(disp);
@@ -460,8 +460,8 @@ static void test_items(void) r = FolderItems_get_Count(items, NULL);
r = FolderItems_get_Count(items, &count); - ok(r == S_OK, "FolderItems::get_Count failed: %08x\n", r); - ok(!count, "expected 0 files, got %d\n", count); + ok(r == S_OK, "FolderItems::get_Count failed: %08lx\n", r); + ok(!count, "expected 0 files, got %ld\n", count);
V_VT(&var) = VT_I4; V_I4(&var) = 0; @@ -470,7 +470,7 @@ static void test_items(void) r = FolderItems_Item(items, var, NULL);
r = FolderItems_Item(items, var, &item); - ok(r == S_FALSE, "expected S_FALSE, got %08x\n", r); + ok(r == S_FALSE, "expected S_FALSE, got %08lx\n", r); ok(!item, "item is not null\n");
/* create test files */ @@ -480,16 +480,16 @@ static void test_items(void) { case DIRECTORY: r = CreateDirectoryA(file_defs[i].name, NULL); - ok(r, "CreateDirectory failed: %08x\n", GetLastError()); + ok(r, "CreateDirectory failed: %08lx\n", GetLastError()); PathCombineA(cstr, file_defs[i].name, "foo.txt"); file = CreateFileA(cstr, 0, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %08x\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %08lx\n", GetLastError()); CloseHandle(file); break;
case EMPTY_FILE: file = CreateFileA(file_defs[i].name, 0, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %08x\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %08lx\n", GetLastError()); CloseHandle(file); break; } @@ -498,23 +498,23 @@ static void test_items(void) /* test that get_Count is not aware of the newly created files */ count = -1; r = FolderItems_get_Count(items, &count); - ok(r == S_OK, "FolderItems::get_Count failed: %08x\n", r); - ok(!count, "expected 0 files, got %d\n", count); + ok(r == S_OK, "FolderItems::get_Count failed: %08lx\n", r); + ok(!count, "expected 0 files, got %ld\n", count);
/* test that the newly created files CAN be retrieved by string index */ variant_set_string(&var, file_defs[0].name); item = NULL; r = FolderItems_Item(items, var, &item); - ok(r == S_OK, "FolderItems::Item failed: %08x\n", r); + ok(r == S_OK, "FolderItems::Item failed: %08lx\n", r); ok(!!item, "item is null\n");
disp = (void *)0xdeadbeef; r = FolderItems_get_Parent(items, &disp); - ok(r == E_NOTIMPL, "Unexpected hr %#x.\n", r); + ok(r == E_NOTIMPL, "Unexpected hr %#lx.\n", r); ok(disp == NULL, "Unexpected parent pointer %p.\n", disp);
r = FolderItem_get_Parent(item, &disp); - ok(r == S_OK, "Failed to get parent pointer, hr %#x.\n", r); + ok(r == S_OK, "Failed to get parent pointer, hr %#lx.\n", r); ok(disp == (IDispatch *)folder, "Unexpected parent pointer %p.\n", disp); IDispatch_Release(disp);
@@ -525,29 +525,29 @@ static void test_items(void) FolderItems_Release(items); items = NULL; r = Folder_Items(folder, &items); - ok(r == S_OK, "Folder::Items failed: %08x\n", r); + ok(r == S_OK, "Folder::Items failed: %08lx\n", r); ok(!!items, "items is null\n"); r = FolderItems_QueryInterface(items, &IID_FolderItems2, (void**)&items2); - ok(r == S_OK || broken(r == E_NOINTERFACE) /* xp and later */, "FolderItems::QueryInterface failed: %08x\n", r); + ok(r == S_OK || broken(r == E_NOINTERFACE) /* xp and later */, "FolderItems::QueryInterface failed: %08lx\n", r); if (r == S_OK) { ok(!!items2, "items2 is null\n"); FolderItems2_Release(items2); } r = FolderItems_QueryInterface(items, &IID_FolderItems3, (void**)&items3); - ok(r == S_OK, "FolderItems::QueryInterface failed: %08x\n", r); + ok(r == S_OK, "FolderItems::QueryInterface failed: %08lx\n", r); ok(!!items3, "items3 is null\n");
count = -1; r = FolderItems_get_Count(items, &count); - ok(r == S_OK, "FolderItems::get_Count failed: %08x\n", r); - ok(count == ARRAY_SIZE(file_defs), "got %d files\n", count); + ok(r == S_OK, "FolderItems::get_Count failed: %08lx\n", r); + ok(count == ARRAY_SIZE(file_defs), "got %ld files\n", count);
/* VT_EMPTY */ V_VT(&var) = VT_EMPTY; item = (FolderItem*)0xdeadbeef; r = FolderItems_Item(items, var, &item); - ok(r == E_NOTIMPL, "expected E_NOTIMPL, got %08x\n", r); + ok(r == E_NOTIMPL, "expected E_NOTIMPL, got %08lx\n", r); ok(!item, "item is not null\n");
/* VT_I2 */ @@ -558,15 +558,15 @@ static void test_items(void) EXPECT_REF(items, 2); item = NULL; r = FolderItems_Item(items, var, &item); - ok(r == S_OK, "FolderItems::Item failed: %08x\n", r); + ok(r == S_OK, "FolderItems::Item failed: %08lx\n", r); ok(!!item, "item is null\n"); EXPECT_REF(folder, 3); EXPECT_REF(items, 2);
r = Folder_get_Application(folder, &disp); - ok(r == S_OK, "Failed to get application pointer %#x.\n", r); + ok(r == S_OK, "Failed to get application pointer %#lx.\n", r); r = FolderItem_get_Application(item, &disp2); - ok(r == S_OK, "Failed to get application pointer %#x.\n", r); + ok(r == S_OK, "Failed to get application pointer %#lx.\n", r); ok(disp == disp2, "Unexpected application pointer.\n"); IDispatch_Release(disp2); IDispatch_Release(disp); @@ -582,7 +582,7 @@ static void test_items(void)
item = NULL; r = FolderItems_Item(items, var, &item); - ok(r == S_OK, "FolderItems::Item failed: %08x\n", r); + ok(r == S_OK, "FolderItems::Item failed: %08lx\n", r); ok(!!item, "item is null\n"); FolderItem_Release(item);
@@ -591,27 +591,27 @@ static void test_items(void) V_I4(&var) = 0; item = NULL; r = FolderItems_Item(items, var, &item); - ok(r == S_OK, "FolderItems::Item failed: %08x\n", r); + ok(r == S_OK, "FolderItems::Item failed: %08lx\n", r); ok(!!item, "item is null\n"); if (item) FolderItem_Release(item);
V_I4(&var) = -1; item = (FolderItem*)0xdeadbeef; r = FolderItems_Item(items, var, &item); - ok(r == S_FALSE, "expected S_FALSE, got %08x\n", r); + ok(r == S_FALSE, "expected S_FALSE, got %08lx\n", r); ok(!item, "item is not null\n");
V_VT(&var) = VT_ERROR; V_ERROR(&var) = 0; item = NULL; r = FolderItems_Item(items, var, &item); - ok(r == S_OK, "expected S_OK, got %08x\n", r); + ok(r == S_OK, "expected S_OK, got %08lx\n", r); ok(!!item, "item is null\n"); if (item) { bstr = NULL; r = FolderItem_get_Path(item, &bstr); - ok(r == S_OK, "FolderItem::get_Path failed: %08x\n", r); + ok(r == S_OK, "FolderItem::get_Path failed: %08lx\n", r); ok(!lstrcmpW(bstr, cur_dir), "expected %s, got %s\n", wine_dbgstr_w(cur_dir), wine_dbgstr_w(bstr)); SysFreeString(bstr); @@ -631,18 +631,18 @@ static void test_items(void)
item = NULL; r = FolderItems_Item(items, int_index, &item); - ok(r == S_OK, "file_defs[%d]: FolderItems::Item failed: %08x\n", i, r); + ok(r == S_OK, "file_defs[%d]: FolderItems::Item failed: %08lx\n", i, r); ok(!!item, "file_defs[%d]: item is null\n", i);
item2 = NULL; r = FolderItems_Item(items, int_index, &item2); - ok(r == S_OK, "file_defs[%d]: FolderItems::Item failed: %08x\n", i, r); + ok(r == S_OK, "file_defs[%d]: FolderItems::Item failed: %08lx\n", i, r); ok(item2 != item, "file_defs[%d]: item and item2 are the same\n", i); FolderItem_Release(item2);
bstr = NULL; r = FolderItem_get_Path(item, &bstr); - ok(r == S_OK, "file_defs[%d]: FolderItem::get_Path failed: %08x\n", i, r); + ok(r == S_OK, "file_defs[%d]: FolderItem::get_Path failed: %08lx\n", i, r); PathCombineW(path, cur_dir, V_BSTR(&str_index)); ok(!lstrcmpW(bstr, path), "file_defs[%d]: expected %s, got %s\n", i, wine_dbgstr_w(path), wine_dbgstr_w(bstr)); @@ -650,7 +650,7 @@ static void test_items(void)
bstr = a2bstr(file_defs[i].name); r = FolderItem_get_Name(item, &name); - ok(r == S_OK, "Failed to get item name, hr %#x.\n", r); + ok(r == S_OK, "Failed to get item name, hr %#lx.\n", r); /* Returned display name does not have to strictly match file name, e.g. extension could be omitted. */ ok(lstrlenW(name) <= lstrlenW(bstr), "file_defs[%d]: unexpected name length.\n", i); ok(!memcmp(bstr, name, lstrlenW(name) * sizeof(WCHAR)), "file_defs[%d]: unexpected name %s.\n", i, wine_dbgstr_w(name)); @@ -661,12 +661,12 @@ static void test_items(void)
item = NULL; r = FolderItems_Item(items, str_index, &item); - ok(r == S_OK, "file_defs[%d]: FolderItems::Item failed: %08x\n", i, r); + ok(r == S_OK, "file_defs[%d]: FolderItems::Item failed: %08lx\n", i, r); ok(!!item, "file_defs[%d]: item is null\n", i);
bstr = NULL; r = FolderItem_get_Path(item, &bstr); - ok(r == S_OK, "file_defs[%d]: FolderItem::get_Path failed: %08x\n", i, r); + ok(r == S_OK, "file_defs[%d]: FolderItem::get_Path failed: %08lx\n", i, r); PathCombineW(path, cur_dir, V_BSTR(&str_index)); ok(!lstrcmpW(bstr, path), "file_defs[%d]: expected %s, got %s\n", i, wine_dbgstr_w(path), wine_dbgstr_w(bstr)); @@ -674,7 +674,7 @@ static void test_items(void)
b = 0xdead; r = FolderItem_get_IsFolder(item, &b); - ok(r == S_OK, "Failed to get IsFolder property, %#x.\n", r); + ok(r == S_OK, "Failed to get IsFolder property, %#lx.\n", r); ok(file_defs[i].type == DIRECTORY ? b == VARIANT_TRUE : b == VARIANT_FALSE, "Unexpected prop value %#x.\n", b);
FolderItem_Release(item); @@ -686,14 +686,14 @@ static void test_items(void) variant_set_string(&str_index2, cstr); item2 = NULL; r = FolderItems_Item(items, str_index2, &item2); - ok(r == S_OK, "file_defs[%d]: FolderItems::Item failed: %08x\n", i, r); + ok(r == S_OK, "file_defs[%d]: FolderItems::Item failed: %08lx\n", i, r); ok(!!item2, "file_defs[%d]: item is null\n", i); if (item2) FolderItem_Release(item2); VariantClear(&str_index2);
/* delete the file in the subdirectory */ ret = DeleteFileA(cstr); - ok(ret, "file_defs[%d]: DeleteFile failed: %08x\n", i, GetLastError()); + ok(ret, "file_defs[%d]: DeleteFile failed: %08lx\n", i, GetLastError());
/* test that getting an item object via a relative path fails */ strcpy(cstr, file_defs[i].name); @@ -702,29 +702,29 @@ static void test_items(void) variant_set_string(&str_index2, cstr); item2 = (FolderItem*)0xdeadbeef; r = FolderItems_Item(items, str_index2, &item2); - ok(r == S_FALSE, "file_defs[%d]: expected S_FALSE, got %08x\n", i, r); + ok(r == S_FALSE, "file_defs[%d]: expected S_FALSE, got %08lx\n", i, r); ok(!item2, "file_defs[%d]: item is not null\n", i); VariantClear(&str_index2);
/* remove the directory */ ret = RemoveDirectoryA(file_defs[i].name); - ok(ret, "file_defs[%d]: RemoveDirectory failed: %08x\n", i, GetLastError()); + ok(ret, "file_defs[%d]: RemoveDirectory failed: %08lx\n", i, GetLastError()); } else { ret = DeleteFileA(file_defs[i].name); - ok(ret, "file_defs[%d]: DeleteFile failed: %08x\n", i, GetLastError()); + ok(ret, "file_defs[%d]: DeleteFile failed: %08lx\n", i, GetLastError()); }
/* test that the folder item is still accessible by integer index */ item = NULL; r = FolderItems_Item(items, int_index, &item); - ok(r == S_OK, "file_defs[%d]: FolderItems::Item failed: %08x\n", i, r); + ok(r == S_OK, "file_defs[%d]: FolderItems::Item failed: %08lx\n", i, r); ok(!!item, "file_defs[%d]: item is null\n", i);
bstr = NULL; r = FolderItem_get_Path(item, &bstr); - ok(r == S_OK, "file_defs[%d]: FolderItem::get_Path failed: %08x\n", i, r); + ok(r == S_OK, "file_defs[%d]: FolderItem::get_Path failed: %08lx\n", i, r); PathCombineW(path, cur_dir, V_BSTR(&str_index)); ok(!lstrcmpW(bstr, path), "file_defs[%d]: expected %s, got %s\n", i, wine_dbgstr_w(path), wine_dbgstr_w(bstr)); @@ -735,7 +735,7 @@ static void test_items(void) /* test that the folder item is no longer accessible by string index */ item = (FolderItem*)0xdeadbeef; r = FolderItems_Item(items, str_index, &item); - ok(r == S_FALSE, "file_defs[%d]: expected S_FALSE, got %08x\n", i, r); + ok(r == S_FALSE, "file_defs[%d]: expected S_FALSE, got %08lx\n", i, r); ok(!item, "file_defs[%d]: item is not null\n", i);
VariantClear(&str_index); @@ -745,20 +745,20 @@ static void test_items(void) V_I4(&int_index) = ARRAY_SIZE(file_defs); item = (FolderItem*)0xdeadbeef; r = FolderItems_Item(items, int_index, &item); - ok(r == S_FALSE, "expected S_FALSE, got %08x\n", r); + ok(r == S_FALSE, "expected S_FALSE, got %08lx\n", r); ok(!item, "item is not null\n");
if (0) /* crashes on xp */ { r = FolderItems_get_Application(items, NULL); - ok(r == E_INVALIDARG, "expected E_INVALIDARG, got %08x\n", r); + ok(r == E_INVALIDARG, "expected E_INVALIDARG, got %08lx\n", r); }
r = FolderItems_get_Application(items, &disp); - ok(r == S_OK, "FolderItems::get_Application failed: %08x\n", r); + ok(r == S_OK, "FolderItems::get_Application failed: %08lx\n", r);
r = Folder_get_Application(folder, &disp2); - ok(r == S_OK, "Failed to get application pointer, hr %#x.\n", r); + ok(r == S_OK, "Failed to get application pointer, hr %#lx.\n", r); ok(disp == disp2, "Unexpected application pointer.\n"); IDispatch_Release(disp2); IDispatch_Release(disp); @@ -766,23 +766,23 @@ static void test_items(void) if (0) /* crashes on xp */ { r = FolderItems_get_Parent(items, NULL); - ok(r == E_NOTIMPL, "expected E_NOTIMPL, got %08x\n", r); + ok(r == E_NOTIMPL, "expected E_NOTIMPL, got %08lx\n", r); }
disp = (IDispatch*)0xdeadbeef; r = FolderItems_get_Parent(items, &disp); - ok(r == E_NOTIMPL, "expected E_NOTIMPL, got %08x\n", r); + ok(r == E_NOTIMPL, "expected E_NOTIMPL, got %08lx\n", r); ok(!disp, "disp is not null\n");
if (0) /* crashes on xp */ { r = FolderItems__NewEnum(items, NULL); - ok(r == E_INVALIDARG, "expected E_INVALIDARG, got %08x\n", r); + ok(r == E_INVALIDARG, "expected E_INVALIDARG, got %08lx\n", r); }
r = FolderItems__NewEnum(items, &unk); todo_wine - ok(r == S_OK, "FolderItems::_NewEnum failed: %08x\n", r); + ok(r == S_OK, "FolderItems::_NewEnum failed: %08lx\n", r); todo_wine ok(!!unk, "unk is null\n"); if (unk) IUnknown_Release(unk); @@ -791,17 +791,17 @@ static void test_items(void) { r = FolderItems3_Filter(items3, 0, NULL); todo_wine - ok(r == S_OK, "expected S_OK, got %08x\n", r); + ok(r == S_OK, "expected S_OK, got %08lx\n", r);
if (0) /* crashes on xp */ { r = FolderItems3_get_Verbs(items3, NULL); - ok(r == E_INVALIDARG, "expected E_INVALIDARG, got %08x\n", r); + ok(r == E_INVALIDARG, "expected E_INVALIDARG, got %08lx\n", r); }
r = FolderItems3_get_Verbs(items3, &verbs); todo_wine - ok(r == S_FALSE, "expected S_FALSE, got %08x\n", r); + ok(r == S_FALSE, "expected S_FALSE, got %08lx\n", r); ok(!verbs, "verbs is not null\n"); }
@@ -809,26 +809,26 @@ static void test_items(void) GetTempPathW(MAX_PATH, path); SetCurrentDirectoryW(path); ret = RemoveDirectoryW(winetestW); - ok(ret, "RemoveDirectory failed: %08x\n", GetLastError()); + ok(ret, "RemoveDirectory failed: %08lx\n", GetLastError()); SetCurrentDirectoryW(orig_dir);
/* test that everything stops working after the directory has been removed */ count = -1; r = FolderItems_get_Count(items, &count); - ok(r == S_OK, "FolderItems::get_Count failed: %08x\n", r); - ok(!count, "expected 0 files, got %d\n", count); + ok(r == S_OK, "FolderItems::get_Count failed: %08lx\n", r); + ok(!count, "expected 0 files, got %ld\n", count);
item = NULL; V_I4(&int_index) = 0; item = (FolderItem*)0xdeadbeef; r = FolderItems_Item(items, int_index, &item); - ok(r == S_FALSE, "expected S_FALSE, got %08x\n", r); + ok(r == S_FALSE, "expected S_FALSE, got %08lx\n", r); ok(!item, "item is not null\n");
variant_set_string(&str_index, file_defs[0].name); item = (FolderItem*)0xdeadbeef; r = FolderItems_Item(items, str_index, &item); - ok(r == S_FALSE, "expected S_FALSE, got %08x\n", r); + ok(r == S_FALSE, "expected S_FALSE, got %08lx\n", r); ok(!item, "item is not null\n"); VariantClear(&str_index);
@@ -904,14 +904,14 @@ static void test_dispatch_typeinfo(IDispatch *disp, REFIID *riid)
count = 10; hr = IDispatch_GetTypeInfoCount(disp, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(count == 1, "got %u\n", count);
hr = IDispatch_GetTypeInfo(disp, 0, LOCALE_SYSTEM_DEFAULT, &typeinfo); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITypeInfo_GetTypeAttr(typeinfo, &typeattr); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); while (!IsEqualGUID(*riid, &IID_NULL)) { if (IsEqualGUID(&typeattr->guid, *riid)) break; @@ -943,37 +943,37 @@ static void test_ShellFolderViewDual(void)
/* IShellFolderViewDual is not an IShellView extension */ hr = SHGetDesktopFolder(&desktop); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IShellFolder_CreateViewObject(desktop, NULL, &IID_IShellView, (void**)&view); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IShellView_QueryInterface(view, &IID_IShellFolderViewDual, (void**)&viewdual); - ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr); + ok(hr == E_NOINTERFACE, "got 0x%08lx\n", hr);
hr = IShellView_GetItemObject(view, SVGIO_BACKGROUND, &IID_IDispatch, (void**)&disp); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IShellView_GetItemObject(view, SVGIO_BACKGROUND, &IID_IDispatch, (void**)&disp2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(disp2 == disp, "got %p, %p\n", disp2, disp); IDispatch_Release(disp2);
hr = IDispatch_QueryInterface(disp, &IID_IShellFolderViewDual, (void**)&viewdual); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(disp == (IDispatch*)viewdual, "got %p, expected %p\n", viewdual, disp);
hr = IShellFolderViewDual_QueryInterface(viewdual, &IID_IShellView, (void**)&view2); - ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr); + ok(hr == E_NOINTERFACE, "got 0x%08lx\n", hr);
/* get_Application() */
if (0) /* crashes on pre-vista */ { hr = IShellFolderViewDual_get_Application(viewdual, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); } hr = IShellFolderViewDual_get_Application(viewdual, &disp2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(disp2 != (IDispatch*)viewdual, "got %p, %p\n", disp2, viewdual); test_dispatch_typeinfo(disp2, shelldisp_riids); IDispatch_Release(disp2); @@ -983,27 +983,27 @@ if (0) /* crashes on pre-vista */ {
disp = (void*)0xdeadbeef; hr = IShellView_GetItemObject(view, SVGIO_BACKGROUND, &IID_IShellFolderViewDual, (void**)&disp); - ok(hr == E_NOINTERFACE || broken(hr == E_NOTIMPL) /* win2k */, "got 0x%08x\n", hr); + ok(hr == E_NOINTERFACE || broken(hr == E_NOTIMPL) /* win2k */, "got 0x%08lx\n", hr); ok(disp == NULL, "got %p\n", disp); IShellView_Release(view);
/* Try with some other folder, that's not a desktop */ GetTempPathW(ARRAY_SIZE(pathW), pathW); hr = IShellFolder_ParseDisplayName(desktop, NULL, NULL, pathW, NULL, &pidl, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IShellFolder_BindToObject(desktop, pidl, NULL, &IID_IShellFolder, (void**)&tmpdir); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); CoTaskMemFree(pidl);
hr = IShellFolder_CreateViewObject(desktop, NULL, &IID_IShellView, (void**)&view); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IShellView_QueryInterface(view, &IID_IShellFolderViewDual, (void**)&viewdual); - ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr); + ok(hr == E_NOINTERFACE, "got 0x%08lx\n", hr);
hr = IShellView_GetItemObject(view, SVGIO_BACKGROUND, &IID_IDispatch, (void**)&disp); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IDispatch_Release(disp); IShellView_Release(view);
@@ -1023,36 +1023,36 @@ static void test_ShellWindows(void)
hr = CoCreateInstance(&CLSID_ShellWindows, NULL, CLSCTX_LOCAL_SERVER, &IID_IShellWindows, (void**)&shellwindows); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); /* TODO: remove when explorer startup with clean prefix is fixed */ if (hr != S_OK) return;
hr = IShellWindows_Register(shellwindows, NULL, 0, SWC_EXPLORER, NULL); - ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "got 0x%08x\n", hr); + ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "got 0x%08lx\n", hr);
hr = IShellWindows_Register(shellwindows, NULL, 0, SWC_EXPLORER, &cookie); - ok(hr == E_POINTER, "got 0x%08x\n", hr); + ok(hr == E_POINTER, "got 0x%08lx\n", hr);
hr = IShellWindows_Register(shellwindows, (IDispatch*)shellwindows, 0, SWC_EXPLORER, &cookie); - ok(hr == E_POINTER, "got 0x%08x\n", hr); + ok(hr == E_POINTER, "got 0x%08lx\n", hr);
hr = IShellWindows_Register(shellwindows, (IDispatch*)shellwindows, 0, SWC_EXPLORER, &cookie); - ok(hr == E_POINTER, "got 0x%08x\n", hr); + ok(hr == E_POINTER, "got 0x%08lx\n", hr);
hwnd = CreateWindowExA(0, "button", "test", BS_CHECKBOX | WS_VISIBLE | WS_POPUP, 0, 0, 50, 14, 0, 0, 0, NULL); - ok(hwnd != NULL, "got %p, error %d\n", hwnd, GetLastError()); + ok(hwnd != NULL, "got %p, error %ld\n", hwnd, GetLastError());
cookie = 0; hr = IShellWindows_Register(shellwindows, NULL, HandleToLong(hwnd), SWC_EXPLORER, &cookie); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(cookie != 0, "got %d\n", cookie); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(cookie != 0, "got %ld\n", cookie);
cookie2 = 0; hr = IShellWindows_Register(shellwindows, NULL, HandleToLong(hwnd), SWC_EXPLORER, &cookie2); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(cookie2 != 0 && cookie2 != cookie, "got %d\n", cookie2); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(cookie2 != 0 && cookie2 != cookie, "got %ld\n", cookie2);
pidl = ILCreateFromPathA("C:\"); V_VT(&v) = VT_ARRAY | VT_UI1; @@ -1061,51 +1061,51 @@ static void test_ShellWindows(void)
VariantInit(&v2); hr = IShellWindows_FindWindowSW(shellwindows, &v, &v2, SWC_EXPLORER, &ret, 0, &disp); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!ret, "Got window %#x.\n", ret); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!ret, "Got window %#lx.\n", ret); ok(!disp, "Got IDispatch %p.\n", &disp);
hr = IShellWindows_OnNavigate(shellwindows, 0, &v); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IShellWindows_OnNavigate(shellwindows, cookie, &v); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IShellWindows_FindWindowSW(shellwindows, &v, &v2, SWC_EXPLORER, &ret, 0, &disp); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(ret == (LONG)(LONG_PTR)hwnd, "Expected %p, got %#x.\n", hwnd, ret); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(ret == (LONG)(LONG_PTR)hwnd, "Expected %p, got %#lx.\n", hwnd, ret); ok(!disp, "Got IDispatch %p.\n", &disp);
hr = IShellWindows_Revoke(shellwindows, cookie); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IShellWindows_FindWindowSW(shellwindows, &v, &v2, SWC_EXPLORER, &ret, 0, &disp); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!ret, "Got window %#x.\n", ret); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!ret, "Got window %#lx.\n", ret); ok(!disp, "Got IDispatch %p.\n", &disp);
hr = IShellWindows_Revoke(shellwindows, cookie2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IShellWindows_Revoke(shellwindows, 0); - ok(hr == S_FALSE, "got 0x%08x\n", hr); + ok(hr == S_FALSE, "got 0x%08lx\n", hr);
/* we can register ourselves as desktop, but FindWindowSW still returns real desktop window */ cookie = 0; hr = IShellWindows_Register(shellwindows, NULL, HandleToLong(hwnd), SWC_DESKTOP, &cookie); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(cookie != 0, "got %d\n", cookie); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(cookie != 0, "got %ld\n", cookie);
disp = (void*)0xdeadbeef; ret = 0xdead; VariantInit(&v); hr = IShellWindows_FindWindowSW(shellwindows, &v, &v, SWC_DESKTOP, &ret, SWFO_NEEDDISPATCH, &disp); - ok(hr == S_OK || broken(hr == S_FALSE), "got 0x%08x\n", hr); + ok(hr == S_OK || broken(hr == S_FALSE), "got 0x%08lx\n", hr); if (hr == S_FALSE) /* winxp and earlier */ { win_skip("SWC_DESKTOP is not supported, some tests will be skipped.\n"); /* older versions allowed to register SWC_DESKTOP and access it with FindWindowSW */ ok(disp == NULL, "got %p\n", disp); - ok(ret == 0, "got %d\n", ret); + ok(ret == 0, "got %ld\n", ret); } else { static const IID *browser_riids[] = { @@ -1127,27 +1127,27 @@ static void test_ShellWindows(void) IUnknown *unk;
ok(disp != NULL, "got %p\n", disp); - ok(ret != HandleToUlong(hwnd), "got %d\n", ret); + ok(ret != HandleToUlong(hwnd), "got %ld\n", ret);
/* IDispatch-related tests */ test_dispatch_typeinfo(disp, browser_riids);
/* IWebBrowser2 */ hr = IDispatch_QueryInterface(disp, &IID_IWebBrowser2, (void**)&wb); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IWebBrowser2_Refresh(wb); todo_wine - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IWebBrowser2_get_Application(wb, &app); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(disp == app, "got %p, %p\n", app, disp); IDispatch_Release(app);
hr = IWebBrowser2_get_Document(wb, &doc); todo_wine - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if (hr == S_OK) { test_dispatch_typeinfo(doc, viewdual_riids); } @@ -1155,51 +1155,51 @@ if (hr == S_OK) {
/* IServiceProvider */ hr = IDispatch_QueryInterface(disp, &IID_IShellFolderViewDual, (void**)&view); - ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr); + ok(hr == E_NOINTERFACE, "got 0x%08lx\n", hr);
hr = IDispatch_QueryInterface(disp, &IID_IServiceProvider, (void**)&sp); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IServiceProvider_QueryService(sp, &SID_STopLevelBrowser, &IID_IShellBrowser, (void**)&sb); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IServiceProvider_QueryService(sp, &SID_STopLevelBrowser, &IID_IShellBrowser, (void**)&sb2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(sb == sb2, "got %p, %p\n", sb, sb2);
hr = IServiceProvider_QueryService(sp, &SID_STopLevelBrowser, &IID_IOleWindow, (void**)&unk); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IUnknown_Release(unk);
hr = IServiceProvider_QueryService(sp, &SID_STopLevelBrowser, &IID_IExplorerBrowser, (void**)&unk); - ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr); + ok(hr == E_NOINTERFACE, "got 0x%08lx\n", hr);
hr = IShellBrowser_QueryInterface(sb, &IID_IExplorerBrowser, (void**)&unk); - ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr); + ok(hr == E_NOINTERFACE, "got 0x%08lx\n", hr);
hr = IShellBrowser_QueryInterface(sb, &IID_IWebBrowser2, (void**)&unk); - ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr); + ok(hr == E_NOINTERFACE, "got 0x%08lx\n", hr);
hr = IShellBrowser_QueryInterface(sb, &IID_IDispatch, (void**)&unk); - ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr); + ok(hr == E_NOINTERFACE, "got 0x%08lx\n", hr);
hr = IShellBrowser_QueryActiveShellView(sb, &sv); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IShellView_Release(sv);
IShellBrowser_Release(sb2); IShellBrowser_Release(sb);
hr = IServiceProvider_QueryService(sp, &SID_STopLevelBrowser, &IID_IUnknown, (void**)&unk); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IUnknown_QueryInterface(unk, &IID_IShellBrowser, (void**)&sb2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IShellBrowser_Release(sb2); IUnknown_Release(unk);
hr = IServiceProvider_QueryService(sp, &SID_STopLevelBrowser, &IID_IShellView, (void**)&sv); - ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr); + ok(hr == E_NOINTERFACE, "got 0x%08lx\n", hr);
IServiceProvider_Release(sp); IDispatch_Release(disp); @@ -1209,9 +1209,9 @@ if (hr == S_OK) { ret = 0xdead; VariantInit(&v); hr = IShellWindows_FindWindowSW(shellwindows, &v, &v, SWC_DESKTOP, &ret, 0, &disp); - ok(hr == S_OK || broken(hr == S_FALSE) /* winxp */, "got 0x%08x\n", hr); + ok(hr == S_OK || broken(hr == S_FALSE) /* winxp */, "got 0x%08lx\n", hr); ok(disp == NULL, "got %p\n", disp); - ok(ret != HandleToUlong(hwnd), "got %d\n", ret); + ok(ret != HandleToUlong(hwnd), "got %ld\n", ret);
disp = (void*)0xdeadbeef; ret = 0xdead; @@ -1220,12 +1220,12 @@ if (hr == S_OK) { VariantInit(&v2); hr = IShellWindows_FindWindowSW(shellwindows, &v, &v2, SWC_BROWSER, &ret, SWFO_COOKIEPASSED, &disp); todo_wine - ok(hr == S_FALSE, "got 0x%08x\n", hr); + ok(hr == S_FALSE, "got 0x%08lx\n", hr); ok(disp == NULL, "got %p\n", disp); - ok(ret == 0, "got %d\n", ret); + ok(ret == 0, "got %ld\n", ret);
hr = IShellWindows_Revoke(shellwindows, cookie); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); DestroyWindow(hwnd); IShellWindows_Release(shellwindows); } @@ -1243,25 +1243,25 @@ static void test_ParseName(void)
hr = CoCreateInstance(&CLSID_Shell, NULL, CLSCTX_INPROC_SERVER, &IID_IShellDispatch, (void**)&sd); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
GetTempPathW(ARRAY_SIZE(pathW), pathW); V_VT(&v) = VT_BSTR; V_BSTR(&v) = SysAllocString(pathW); hr = IShellDispatch_NameSpace(sd, v, &folder); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); VariantClear(&v);
item = (void*)0xdeadbeef; hr = Folder_ParseName(folder, NULL, &item); - ok(hr == S_FALSE || broken(hr == E_INVALIDARG) /* win2k */, "got 0x%08x\n", hr); + ok(hr == S_FALSE || broken(hr == E_INVALIDARG) /* win2k */, "got 0x%08lx\n", hr); ok(item == NULL, "got %p\n", item);
/* empty name */ str = SysAllocStringLen(NULL, 0); item = (void*)0xdeadbeef; hr = Folder_ParseName(folder, str, &item); - ok(hr == S_FALSE || broken(hr == E_INVALIDARG) /* win2k */, "got 0x%08x\n", hr); + ok(hr == S_FALSE || broken(hr == E_INVALIDARG) /* win2k */, "got 0x%08lx\n", hr); ok(item == NULL, "got %p\n", item); SysFreeString(str);
@@ -1270,7 +1270,7 @@ static void test_ParseName(void) item = (void*)0xdeadbeef; hr = Folder_ParseName(folder, str, &item); ok(hr == S_FALSE || broken(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)) /* win2k */, - "got 0x%08x\n", hr); + "got 0x%08lx\n", hr); ok(item == NULL, "got %p\n", item); SysFreeString(str);
@@ -1280,12 +1280,12 @@ static void test_ParseName(void) str = SysAllocString(cadabraW); item = NULL; hr = Folder_ParseName(folder, str, &item); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(item != NULL, "got %p\n", item); SysFreeString(str);
hr = FolderItem_get_Path(item, &str); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(str[0] != 0, "path %s\n", wine_dbgstr_w(str)); SysFreeString(str);
@@ -1312,59 +1312,59 @@ static void test_Verbs(void)
hr = CoCreateInstance(&CLSID_Shell, NULL, CLSCTX_INPROC_SERVER, &IID_IShellDispatch, (void**)&sd); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
GetTempPathW(ARRAY_SIZE(pathW), pathW); V_VT(&v) = VT_BSTR; V_BSTR(&v) = SysAllocString(pathW); hr = IShellDispatch_NameSpace(sd, v, &folder); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); VariantClear(&v);
hr = Folder_QueryInterface(folder, &IID_Folder2, (void**)&folder2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); Folder_Release(folder);
hr = Folder2_get_Self(folder2, &item); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); Folder2_Release(folder2);
if (0) { /* crashes on some systems */ hr = FolderItem_Verbs(item, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); } hr = FolderItem_Verbs(item, &verbs); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = FolderItem_Verbs(item, &verbs2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(verbs2 != verbs, "Unexpected verbs pointer.\n"); FolderItemVerbs_Release(verbs2);
disp = (void *)0xdeadbeef; hr = FolderItemVerbs_get_Application(verbs, &disp); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr); ok(disp == NULL, "Unexpected application pointer.\n");
disp = (void *)0xdeadbeef; hr = FolderItemVerbs_get_Parent(verbs, &disp); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr); ok(disp == NULL, "Unexpected parent pointer %p.\n", disp);
if (0) { /* crashes on winxp/win2k3 */ hr = FolderItemVerbs_get_Count(verbs, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); } count = 0; hr = FolderItemVerbs_get_Count(verbs, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(count > 0, "got count %d\n", count); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(count > 0, "got count %ld\n", count);
if (0) { /* crashes on winxp/win2k3 */ V_VT(&v) = VT_I4; V_I4(&v) = 0; hr = FolderItemVerbs_Item(verbs, v, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); } /* there's always one item more, so you can access [0,count], instead of actual [0,count) */ @@ -1372,21 +1372,21 @@ if (0) { /* crashes on winxp/win2k3 */ V_VT(&v) = VT_I4; V_I4(&v) = i; hr = FolderItemVerbs_Item(verbs, v, &verb); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = FolderItemVerb_get_Name(verb, &str); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(str != NULL, "%d: name %s\n", i, wine_dbgstr_w(str)); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(str != NULL, "%ld: name %s\n", i, wine_dbgstr_w(str)); if (i == count) - ok(str[0] == 0, "%d: got terminating item %s\n", i, wine_dbgstr_w(str)); + ok(str[0] == 0, "%ld: got terminating item %s\n", i, wine_dbgstr_w(str));
disp = (void *)0xdeadbeef; hr = FolderItemVerb_get_Parent(verb, &disp); - ok(hr == E_NOTIMPL, "got %#x.\n", hr); + ok(hr == E_NOTIMPL, "got %#lx.\n", hr); ok(disp == NULL, "Unexpected parent pointer %p.\n", disp);
disp = (void *)0xdeadbeef; hr = FolderItemVerb_get_Application(verb, &disp); - ok(hr == E_NOTIMPL, "got %#x.\n", hr); + ok(hr == E_NOTIMPL, "got %#lx.\n", hr); ok(disp == NULL, "Unexpected parent pointer %p.\n", disp);
SysFreeString(str); @@ -1397,7 +1397,7 @@ if (0) { /* crashes on winxp/win2k3 */ V_I4(&v) = count+1; verb = NULL; hr = FolderItemVerbs_Item(verbs, v, &verb); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(verb == NULL, "got %p\n", verb);
FolderItemVerbs_Release(verbs); @@ -1427,69 +1427,69 @@ static void test_ShellLinkObject(void)
hr = CoCreateInstance(&CLSID_Shell, NULL, CLSCTX_INPROC_SERVER, &IID_IShellDispatch, (void**)&sd); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
GetTempPathW(MAX_PATH, path); V_VT(&v) = VT_BSTR; V_BSTR(&v) = SysAllocString(path); hr = IShellDispatch_NameSpace(sd, v, &folder); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); VariantClear(&v);
hr = Folder_QueryInterface(folder, &IID_Folder2, (void**)&folder2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); Folder_Release(folder);
hr = Folder2_get_Self(folder2, &item); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
dispatch = (IDispatch*)0xdeadbeef; hr = FolderItem_get_GetLink(item, &dispatch); - ok(hr == E_NOTIMPL, "got 0x%08x\n", hr); + ok(hr == E_NOTIMPL, "got 0x%08lx\n", hr); ok(dispatch == NULL, "got %p\n", dispatch);
FolderItem_Release(item);
PathCombineW(empty_path, path, L"winetest_empty_file.txt"); file = CreateFileW(empty_path, 0, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %08x\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %08lx\n", GetLastError()); CloseHandle(file);
hr = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLinkW, (LPVOID*)&sl); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IShellLinkW_SetPath(sl, empty_path); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IShellLinkW_GetPath(sl, empty_path, MAX_PATH, NULL, 0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IShellLinkW_SetDescription(sl, L"description"); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IShellLinkW_SetWorkingDirectory(sl, L"working directory"); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IShellLinkW_SetArguments(sl, L"arguments"); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IShellLinkW_SetHotkey(sl, 1234); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IShellLinkW_SetShowCmd(sl, 1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IShellLinkW_QueryInterface(sl, &IID_IPersistFile, (LPVOID*)&pf); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
PathCombineW(link_path, path, L"winetest_filled.lnk"); hr = IPersistFile_Save(pf, link_path, TRUE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
IPersistFile_Release(pf); IShellLinkW_Release(sl);
str = SysAllocString(L"winetest_filled.lnk"); hr = Folder2_ParseName(folder2, str, &item); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); SysFreeString(str);
dispatch = NULL; hr = FolderItem_get_GetLink(item, &dispatch); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(dispatch != NULL, "got %p\n", dispatch);
if (dispatch) { @@ -1497,7 +1497,7 @@ static void test_ShellLinkObject(void)
str = NULL; hr = IShellLinkDual2_get_Path(sld, &str); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if (hr == S_OK) { ok(!wcscmp(str, empty_path), "got %s (wanted %s)\n", wine_dbgstr_w(str), wine_dbgstr_w(empty_path)); @@ -1506,7 +1506,7 @@ static void test_ShellLinkObject(void)
str = NULL; hr = IShellLinkDual2_get_Description(sld, &str); - todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "got 0x%08lx\n", hr); if (hr == S_OK) { ok(!wcscmp(str, L"description"), "got %s\n", wine_dbgstr_w(str)); SysFreeString(str); @@ -1514,7 +1514,7 @@ static void test_ShellLinkObject(void)
str = NULL; hr = IShellLinkDual2_get_WorkingDirectory(sld, &str); - todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "got 0x%08lx\n", hr); if (hr == S_OK) { ok(!wcscmp(str, L"working directory"), "got %s\n", wine_dbgstr_w(str)); SysFreeString(str); @@ -1522,7 +1522,7 @@ static void test_ShellLinkObject(void)
str = NULL; hr = IShellLinkDual2_get_Arguments(sld, &str); - todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "got 0x%08lx\n", hr); if (hr == S_OK) { ok(!wcscmp(str, L"arguments"), "got %s\n", wine_dbgstr_w(str)); SysFreeString(str); @@ -1530,12 +1530,12 @@ static void test_ShellLinkObject(void)
hk = 0; hr = IShellLinkDual2_get_Hotkey(sld, &hk); - todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "got 0x%08lx\n", hr); todo_wine ok(hk == 1234, "got %i\n", hk);
hk = 0; hr = IShellLinkDual2_get_ShowCommand(sld, &hk); - todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "got 0x%08lx\n", hr); todo_wine ok(hk == 1, "got %i\n", hk);
IShellLinkDual2_Release(sld); @@ -1544,9 +1544,9 @@ static void test_ShellLinkObject(void) FolderItem_Release(item);
ret = DeleteFileW(link_path); - ok(ret, "DeleteFile failed: %08x\n", GetLastError()); + ok(ret, "DeleteFile failed: %08lx\n", GetLastError()); ret = DeleteFileW(empty_path); - ok(ret, "DeleteFile failed: %08x\n", GetLastError()); + ok(ret, "DeleteFile failed: %08lx\n", GetLastError());
Folder2_Release(folder2);
@@ -1581,14 +1581,14 @@ static void test_ShellExecute(void) name = SysAllocString(regW);
hr = IShellDispatch2_ShellExecute(sd, name, args, dir, op, show); - ok(hr == S_OK, "ShellExecute failed: %08x\n", hr); + ok(hr == S_OK, "ShellExecute failed: %08lx\n", hr);
/* test invalid value for show */ V_VT(&show) = VT_BSTR; V_BSTR(&show) = name;
hr = IShellDispatch2_ShellExecute(sd, name, args, dir, op, show); - ok(hr == S_OK, "ShellExecute failed: %08x\n", hr); + ok(hr == S_OK, "ShellExecute failed: %08lx\n", hr);
SysFreeString(name); IShellDispatch2_Release(sd); @@ -1599,7 +1599,7 @@ START_TEST(shelldispatch) HRESULT r;
r = CoInitialize(NULL); - ok(SUCCEEDED(r), "CoInitialize failed: %08x\n", r); + ok(SUCCEEDED(r), "CoInitialize failed: %08lx\n", r); if (FAILED(r)) return;
diff --git a/dlls/shell32/tests/shelllink.c b/dlls/shell32/tests/shelllink.c index 5caebcd776c..e4e1e664038 100644 --- a/dlls/shell32/tests/shelllink.c +++ b/dlls/shell32/tests/shelllink.c @@ -74,7 +74,7 @@ static LPITEMIDLIST path_to_pidl(const char* path) MultiByteToWideChar(CP_ACP, 0, path, -1, pathW, len);
r=pSHILCreateFromPath(pathW, &pidl, NULL); - ok(r == S_OK, "SHILCreateFromPath failed (0x%08x)\n", r); + ok(r == S_OK, "SHILCreateFromPath failed (0x%08lx)\n", r); heap_free(pathW); } return pidl; @@ -100,93 +100,93 @@ static void test_get_set(void)
r = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLinkA, (LPVOID*)&sl); - ok(r == S_OK, "no IID_IShellLinkA (0x%08x)\n", r); + ok(r == S_OK, "no IID_IShellLinkA (0x%08lx)\n", r); if (r != S_OK) return;
/* Test Getting / Setting the description */ strcpy(buffer,"garbage"); r = IShellLinkA_GetDescription(sl, buffer, sizeof(buffer)); - ok(r == S_OK, "GetDescription failed (0x%08x)\n", r); + ok(r == S_OK, "GetDescription failed (0x%08lx)\n", r); ok(*buffer=='\0', "GetDescription returned '%s'\n", buffer);
str="Some description"; r = IShellLinkA_SetDescription(sl, str); - ok(r == S_OK, "SetDescription failed (0x%08x)\n", r); + ok(r == S_OK, "SetDescription failed (0x%08lx)\n", r);
strcpy(buffer,"garbage"); r = IShellLinkA_GetDescription(sl, buffer, sizeof(buffer)); - ok(r == S_OK, "GetDescription failed (0x%08x)\n", r); + ok(r == S_OK, "GetDescription failed (0x%08lx)\n", r); ok(strcmp(buffer,str)==0, "GetDescription returned '%s'\n", buffer);
r = IShellLinkA_SetDescription(sl, NULL); - ok(r == S_OK, "SetDescription failed (0x%08x)\n", r); + ok(r == S_OK, "SetDescription failed (0x%08lx)\n", r);
strcpy(buffer,"garbage"); r = IShellLinkA_GetDescription(sl, buffer, sizeof(buffer)); - ok(r == S_OK, "GetDescription failed (0x%08x)\n", r); + ok(r == S_OK, "GetDescription failed (0x%08lx)\n", r); ok(!*buffer, "GetDescription returned '%s'\n", buffer);
/* Test Getting / Setting the work directory */ strcpy(buffer,"garbage"); r = IShellLinkA_GetWorkingDirectory(sl, buffer, sizeof(buffer)); - ok(r == S_OK, "GetWorkingDirectory failed (0x%08x)\n", r); + ok(r == S_OK, "GetWorkingDirectory failed (0x%08lx)\n", r); ok(*buffer=='\0', "GetWorkingDirectory returned '%s'\n", buffer);
str="c:\nonexistent\directory"; r = IShellLinkA_SetWorkingDirectory(sl, str); - ok(r == S_OK, "SetWorkingDirectory failed (0x%08x)\n", r); + ok(r == S_OK, "SetWorkingDirectory failed (0x%08lx)\n", r);
strcpy(buffer,"garbage"); r = IShellLinkA_GetWorkingDirectory(sl, buffer, sizeof(buffer)); - ok(r == S_OK, "GetWorkingDirectory failed (0x%08x)\n", r); + ok(r == S_OK, "GetWorkingDirectory failed (0x%08lx)\n", r); ok(lstrcmpiA(buffer,str)==0, "GetWorkingDirectory returned '%s'\n", buffer);
/* Test Getting / Setting the path */ strcpy(buffer,"garbage"); r = IShellLinkA_GetPath(sl, buffer, sizeof(buffer), NULL, SLGP_RAWPATH); - ok(r == S_FALSE, "GetPath failed (0x%08x)\n", r); + ok(r == S_FALSE, "GetPath failed (0x%08lx)\n", r); ok(!*buffer, "GetPath returned '%s'\n", buffer);
strcpy(buffer,"garbage"); memset(&finddata, 0xaa, sizeof(finddata)); r = IShellLinkA_GetPath(sl, buffer, sizeof(buffer), &finddata, SLGP_RAWPATH); - ok(r == S_FALSE, "GetPath failed (0x%08x)\n", r); + ok(r == S_FALSE, "GetPath failed (0x%08lx)\n", r); ok(!*buffer, "GetPath returned '%s'\n", buffer); - ok(finddata.dwFileAttributes == 0, "unexpected attributes %x\n", finddata.dwFileAttributes); + ok(finddata.dwFileAttributes == 0, "unexpected attributes %lx\n", finddata.dwFileAttributes); ok(finddata.cFileName[0] == 0, "unexpected filename '%s'\n", finddata.cFileName);
r = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLinkW, (void **)&slW); - ok(r == S_OK, "CoCreateInstance failed (0x%08x)\n", r); + ok(r == S_OK, "CoCreateInstance failed (0x%08lx)\n", r); IShellLinkW_Release(slW);
r = IShellLinkA_SetPath(sl, NULL); - ok(r == E_INVALIDARG, "Unexpected hr %#x.\n", r); + ok(r == E_INVALIDARG, "Unexpected hr %#lx.\n", r);
r = IShellLinkA_SetPath(sl, ""); - ok(r==S_OK, "SetPath failed (0x%08x)\n", r); + ok(r==S_OK, "SetPath failed (0x%08lx)\n", r);
strcpy(buffer,"garbage"); r = IShellLinkA_GetPath(sl, buffer, sizeof(buffer), NULL, SLGP_RAWPATH); - ok(r == S_FALSE, "GetPath failed (0x%08x)\n", r); + ok(r == S_FALSE, "GetPath failed (0x%08lx)\n", r); ok(*buffer=='\0', "GetPath returned '%s'\n", buffer);
/* Win98 returns S_FALSE, but WinXP returns S_OK */ str="c:\nonexistent\file"; r = IShellLinkA_SetPath(sl, str); - ok(r==S_FALSE || r==S_OK, "SetPath failed (0x%08x)\n", r); + ok(r==S_FALSE || r==S_OK, "SetPath failed (0x%08lx)\n", r);
strcpy(buffer,"garbage"); r = IShellLinkA_GetPath(sl, buffer, sizeof(buffer), NULL, SLGP_RAWPATH); - ok(r == S_OK, "GetPath failed (0x%08x)\n", r); + ok(r == S_OK, "GetPath failed (0x%08lx)\n", r); ok(lstrcmpiA(buffer,str)==0, "GetPath returned '%s'\n", buffer);
strcpy(buffer,"garbage"); memset(&finddata, 0xaa, sizeof(finddata)); r = IShellLinkA_GetPath(sl, buffer, sizeof(buffer), &finddata, SLGP_RAWPATH); - ok(r == S_OK, "GetPath failed (0x%08x)\n", r); + ok(r == S_OK, "GetPath failed (0x%08lx)\n", r); ok(lstrcmpiA(buffer,str)==0, "GetPath returned '%s'\n", buffer); - ok(finddata.dwFileAttributes == 0, "unexpected attributes %x\n", finddata.dwFileAttributes); + ok(finddata.dwFileAttributes == 0, "unexpected attributes %lx\n", finddata.dwFileAttributes); ok(lstrcmpiA(finddata.cFileName, "file") == 0, "unexpected filename '%s'\n", finddata.cFileName);
/* Get some real path to play with */ @@ -196,7 +196,7 @@ static void test_get_set(void) /* Test the interaction of SetPath and SetIDList */ tmp_pidl=NULL; r = IShellLinkA_GetIDList(sl, &tmp_pidl); - ok(r == S_OK, "GetIDList failed (0x%08x)\n", r); + ok(r == S_OK, "GetIDList failed (0x%08lx)\n", r); if (r == S_OK) { BOOL ret; @@ -217,16 +217,16 @@ static void test_get_set(void) LPITEMIDLIST second_pidl;
r = IShellLinkA_SetIDList(sl, pidl); - ok(r == S_OK, "SetIDList failed (0x%08x)\n", r); + ok(r == S_OK, "SetIDList failed (0x%08lx)\n", r);
tmp_pidl=NULL; r = IShellLinkA_GetIDList(sl, &tmp_pidl); - ok(r == S_OK, "GetIDList failed (0x%08x)\n", r); + ok(r == S_OK, "GetIDList failed (0x%08lx)\n", r); ok(tmp_pidl && ILIsEqual(pidl, tmp_pidl), "GetIDList returned an incorrect pidl\n");
r = IShellLinkA_GetIDList(sl, &second_pidl); - ok(r == S_OK, "GetIDList failed (0x%08x)\n", r); + ok(r == S_OK, "GetIDList failed (0x%08lx)\n", r); ok(second_pidl && ILIsEqual(pidl, second_pidl), "GetIDList returned an incorrect pidl\n"); ok(second_pidl != tmp_pidl, "pidls are the same\n"); @@ -237,15 +237,15 @@ static void test_get_set(void)
strcpy(buffer,"garbage"); r = IShellLinkA_GetPath(sl, buffer, sizeof(buffer), NULL, SLGP_RAWPATH); - ok(r == S_OK, "GetPath failed (0x%08x)\n", r); + ok(r == S_OK, "GetPath failed (0x%08lx)\n", r); ok(lstrcmpiA(buffer, mypath)==0, "GetPath returned '%s'\n", buffer);
strcpy(buffer,"garbage"); memset(&finddata, 0xaa, sizeof(finddata)); r = IShellLinkA_GetPath(sl, buffer, sizeof(buffer), &finddata, SLGP_RAWPATH); - ok(r == S_OK, "GetPath failed (0x%08x)\n", r); + ok(r == S_OK, "GetPath failed (0x%08lx)\n", r); ok(lstrcmpiA(buffer, mypath)==0, "GetPath returned '%s'\n", buffer); - ok(finddata.dwFileAttributes != 0, "unexpected attributes %x\n", finddata.dwFileAttributes); + ok(finddata.dwFileAttributes != 0, "unexpected attributes %lx\n", finddata.dwFileAttributes); ok(lstrcmpiA(finddata.cFileName, "regedit.exe") == 0, "unexpected filename '%s'\n", finddata.cFileName); }
@@ -254,22 +254,22 @@ static void test_get_set(void) LPITEMIDLIST pidl_controls;
r = pSHGetFolderLocation(NULL, CSIDL_CONTROLS, NULL, 0, &pidl_controls); - ok(r == S_OK, "SHGetFolderLocation failed (0x%08x)\n", r); + ok(r == S_OK, "SHGetFolderLocation failed (0x%08lx)\n", r);
r = IShellLinkA_SetIDList(sl, pidl_controls); - ok(r == S_OK, "SetIDList failed (0x%08x)\n", r); + ok(r == S_OK, "SetIDList failed (0x%08lx)\n", r);
strcpy(buffer,"garbage"); r = IShellLinkA_GetPath(sl, buffer, sizeof(buffer), NULL, SLGP_RAWPATH); - ok(r == S_FALSE, "GetPath failed (0x%08x)\n", r); + ok(r == S_FALSE, "GetPath failed (0x%08lx)\n", r); ok(buffer[0] == 0, "GetPath returned '%s'\n", buffer);
strcpy(buffer,"garbage"); memset(&finddata, 0xaa, sizeof(finddata)); r = IShellLinkA_GetPath(sl, buffer, sizeof(buffer), &finddata, SLGP_RAWPATH); - ok(r == S_FALSE, "GetPath failed (0x%08x)\n", r); + ok(r == S_FALSE, "GetPath failed (0x%08lx)\n", r); ok(buffer[0] == 0, "GetPath returned '%s'\n", buffer); - ok(finddata.dwFileAttributes == 0, "unexpected attributes %x\n", finddata.dwFileAttributes); + ok(finddata.dwFileAttributes == 0, "unexpected attributes %lx\n", finddata.dwFileAttributes); ok(finddata.cFileName[0] == 0, "unexpected filename '%s'\n", finddata.cFileName);
ILFree(pidl_controls); @@ -277,102 +277,102 @@ static void test_get_set(void)
/* test path with quotes (IShellLinkA_SetPath returns S_FALSE on W2K and below and S_OK on XP and above */ r = IShellLinkA_SetPath(sl, ""c:\nonexistent\file""); - ok(r==S_FALSE || r == S_OK, "SetPath failed (0x%08x)\n", r); + ok(r==S_FALSE || r == S_OK, "SetPath failed (0x%08lx)\n", r);
strcpy(buffer,"garbage"); r = IShellLinkA_GetPath(sl, buffer, sizeof(buffer), NULL, SLGP_RAWPATH); - ok(r==S_OK, "GetPath failed (0x%08x)\n", r); + ok(r==S_OK, "GetPath failed (0x%08lx)\n", r); todo_wine ok(!strcmp(buffer, "C:\nonexistent\file"), "case doesn't match\n");
r = IShellLinkA_SetPath(sl, ""c:\foo"); - ok(r==S_FALSE || r == S_OK || r == E_INVALIDARG /* Vista */, "SetPath failed (0x%08x)\n", r); + ok(r==S_FALSE || r == S_OK || r == E_INVALIDARG /* Vista */, "SetPath failed (0x%08lx)\n", r);
r = IShellLinkA_SetPath(sl, """c:\foo"); - ok(r==S_FALSE || r == S_OK || r == E_INVALIDARG /* Vista */, "SetPath failed (0x%08x)\n", r); + ok(r==S_FALSE || r == S_OK || r == E_INVALIDARG /* Vista */, "SetPath failed (0x%08lx)\n", r);
r = IShellLinkA_SetPath(sl, "c:\foo""); - ok(r==S_FALSE || r == S_OK || r == E_INVALIDARG /* Vista */, "SetPath failed (0x%08x)\n", r); + ok(r==S_FALSE || r == S_OK || r == E_INVALIDARG /* Vista */, "SetPath failed (0x%08lx)\n", r);
r = IShellLinkA_SetPath(sl, """c:\foo""); - ok(r==S_FALSE || r == S_OK || r == E_INVALIDARG /* Vista */, "SetPath failed (0x%08x)\n", r); + ok(r==S_FALSE || r == S_OK || r == E_INVALIDARG /* Vista */, "SetPath failed (0x%08lx)\n", r);
r = IShellLinkA_SetPath(sl, """c:\foo"""); - ok(r==S_FALSE || r == S_OK || r == E_INVALIDARG /* Vista */, "SetPath failed (0x%08x)\n", r); + ok(r==S_FALSE || r == S_OK || r == E_INVALIDARG /* Vista */, "SetPath failed (0x%08lx)\n", r);
/* Test Getting / Setting the arguments */ strcpy(buffer,"garbage"); r = IShellLinkA_GetArguments(sl, buffer, sizeof(buffer)); - ok(r == S_OK, "GetArguments failed (0x%08x)\n", r); + ok(r == S_OK, "GetArguments failed (0x%08lx)\n", r); ok(*buffer=='\0', "GetArguments returned '%s'\n", buffer);
str="param1 "spaced param2""; r = IShellLinkA_SetArguments(sl, str); - ok(r == S_OK, "SetArguments failed (0x%08x)\n", r); + ok(r == S_OK, "SetArguments failed (0x%08lx)\n", r);
strcpy(buffer,"garbage"); r = IShellLinkA_GetArguments(sl, buffer, sizeof(buffer)); - ok(r == S_OK, "GetArguments failed (0x%08x)\n", r); + ok(r == S_OK, "GetArguments failed (0x%08lx)\n", r); ok(strcmp(buffer,str)==0, "GetArguments returned '%s'\n", buffer);
strcpy(buffer,"garbage"); r = IShellLinkA_SetArguments(sl, NULL); - ok(r == S_OK, "SetArguments failed (0x%08x)\n", r); + ok(r == S_OK, "SetArguments failed (0x%08lx)\n", r); r = IShellLinkA_GetArguments(sl, buffer, sizeof(buffer)); - ok(r == S_OK, "GetArguments failed (0x%08x)\n", r); + ok(r == S_OK, "GetArguments failed (0x%08lx)\n", r); ok(!buffer[0] || strcmp(buffer,str)==0, "GetArguments returned '%s'\n", buffer);
strcpy(buffer,"garbage"); r = IShellLinkA_SetArguments(sl, ""); - ok(r == S_OK, "SetArguments failed (0x%08x)\n", r); + ok(r == S_OK, "SetArguments failed (0x%08lx)\n", r); r = IShellLinkA_GetArguments(sl, buffer, sizeof(buffer)); - ok(r == S_OK, "GetArguments failed (0x%08x)\n", r); + ok(r == S_OK, "GetArguments failed (0x%08lx)\n", r); ok(!buffer[0], "GetArguments returned '%s'\n", buffer);
/* Test Getting / Setting showcmd */ i=0xdeadbeef; r = IShellLinkA_GetShowCmd(sl, &i); - ok(r == S_OK, "GetShowCmd failed (0x%08x)\n", r); + ok(r == S_OK, "GetShowCmd failed (0x%08lx)\n", r); ok(i==SW_SHOWNORMAL, "GetShowCmd returned %d\n", i);
r = IShellLinkA_SetShowCmd(sl, SW_SHOWMAXIMIZED); - ok(r == S_OK, "SetShowCmd failed (0x%08x)\n", r); + ok(r == S_OK, "SetShowCmd failed (0x%08lx)\n", r);
i=0xdeadbeef; r = IShellLinkA_GetShowCmd(sl, &i); - ok(r == S_OK, "GetShowCmd failed (0x%08x)\n", r); + ok(r == S_OK, "GetShowCmd failed (0x%08lx)\n", r); ok(i==SW_SHOWMAXIMIZED, "GetShowCmd returned %d'\n", i);
/* Test Getting / Setting the icon */ i=0xdeadbeef; strcpy(buffer,"garbage"); r = IShellLinkA_GetIconLocation(sl, buffer, sizeof(buffer), &i); - ok(r == S_OK, "GetIconLocation failed (0x%08x)\n", r); + ok(r == S_OK, "GetIconLocation failed (0x%08lx)\n", r); ok(*buffer=='\0', "GetIconLocation returned '%s'\n", buffer); ok(i==0, "GetIconLocation returned %d\n", i);
str="c:\nonexistent\file"; r = IShellLinkA_SetIconLocation(sl, str, 0xbabecafe); - ok(r == S_OK, "SetIconLocation failed (0x%08x)\n", r); + ok(r == S_OK, "SetIconLocation failed (0x%08lx)\n", r);
i=0xdeadbeef; r = IShellLinkA_GetIconLocation(sl, buffer, sizeof(buffer), &i); - ok(r == S_OK, "GetIconLocation failed (0x%08x)\n", r); + ok(r == S_OK, "GetIconLocation failed (0x%08lx)\n", r); ok(lstrcmpiA(buffer,str)==0, "GetIconLocation returned '%s'\n", buffer); ok(i==0xbabecafe, "GetIconLocation returned %d'\n", i);
/* Test Getting / Setting the hot key */ w=0xbeef; r = IShellLinkA_GetHotkey(sl, &w); - ok(r == S_OK, "GetHotkey failed (0x%08x)\n", r); + ok(r == S_OK, "GetHotkey failed (0x%08lx)\n", r); ok(w==0, "GetHotkey returned %d\n", w);
r = IShellLinkA_SetHotkey(sl, 0x5678); - ok(r == S_OK, "SetHotkey failed (0x%08x)\n", r); + ok(r == S_OK, "SetHotkey failed (0x%08lx)\n", r);
w=0xbeef; r = IShellLinkA_GetHotkey(sl, &w); - ok(r == S_OK, "GetHotkey failed (0x%08x)\n", r); + ok(r == S_OK, "GetHotkey failed (0x%08lx)\n", r); ok(w==0x5678, "GetHotkey returned %d'\n", w);
IShellLinkA_Release(sl); @@ -394,53 +394,53 @@ void create_lnk_(int line, const WCHAR* path, lnk_desc_t* desc)
r = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLinkA, (LPVOID*)&sl); - lok(r == S_OK, "no IID_IShellLinkA (0x%08x)\n", r); + lok(r == S_OK, "no IID_IShellLinkA (0x%08lx)\n", r); if (r != S_OK) return;
if (desc->description) { r = IShellLinkA_SetDescription(sl, desc->description); - lok(r == S_OK, "SetDescription failed (0x%08x)\n", r); + lok(r == S_OK, "SetDescription failed (0x%08lx)\n", r); } if (desc->workdir) { r = IShellLinkA_SetWorkingDirectory(sl, desc->workdir); - lok(r == S_OK, "SetWorkingDirectory failed (0x%08x)\n", r); + lok(r == S_OK, "SetWorkingDirectory failed (0x%08lx)\n", r); } if (desc->path) { r = IShellLinkA_SetPath(sl, desc->path); - lok(SUCCEEDED(r), "SetPath failed (0x%08x)\n", r); + lok(SUCCEEDED(r), "SetPath failed (0x%08lx)\n", r); } if (desc->pidl) { r = IShellLinkA_SetIDList(sl, desc->pidl); - lok(r == S_OK, "SetIDList failed (0x%08x)\n", r); + lok(r == S_OK, "SetIDList failed (0x%08lx)\n", r); } if (desc->arguments) { r = IShellLinkA_SetArguments(sl, desc->arguments); - lok(r == S_OK, "SetArguments failed (0x%08x)\n", r); + lok(r == S_OK, "SetArguments failed (0x%08lx)\n", r); } if (desc->showcmd) { r = IShellLinkA_SetShowCmd(sl, desc->showcmd); - lok(r == S_OK, "SetShowCmd failed (0x%08x)\n", r); + lok(r == S_OK, "SetShowCmd failed (0x%08lx)\n", r); } if (desc->icon) { r = IShellLinkA_SetIconLocation(sl, desc->icon, desc->icon_id); - lok(r == S_OK, "SetIconLocation failed (0x%08x)\n", r); + lok(r == S_OK, "SetIconLocation failed (0x%08lx)\n", r); } if (desc->hotkey) { r = IShellLinkA_SetHotkey(sl, desc->hotkey); - lok(r == S_OK, "SetHotkey failed (0x%08x)\n", r); + lok(r == S_OK, "SetHotkey failed (0x%08lx)\n", r); }
r = IShellLinkA_QueryInterface(sl, &IID_IPersistFile, (void**)&pf); - lok(r == S_OK, "no IID_IPersistFile (0x%08x)\n", r); + lok(r == S_OK, "no IID_IPersistFile (0x%08lx)\n", r); if (r == S_OK) { LPOLESTR str; @@ -453,39 +453,39 @@ void create_lnk_(int line, const WCHAR* path, lnk_desc_t* desc)
init_dirty = IPersistFile_IsDirty(pf); /* empty links start off as clean */ r = IPersistFile_Save(pf, NULL, FALSE); - lok(r == S_OK || r == E_INVALIDARG /* before Windows 7 */, "save failed (0x%08x)\n", r); + lok(r == S_OK || r == E_INVALIDARG /* before Windows 7 */, "save failed (0x%08lx)\n", r); r = IPersistFile_IsDirty(pf); - lok(r == init_dirty, "dirty (0x%08x)\n", r); + lok(r == init_dirty, "dirty (0x%08lx)\n", r);
r = IPersistFile_Save(pf, NULL, TRUE); - lok(r == S_OK || r == E_INVALIDARG /* before Windows 7 */, "save failed (0x%08x)\n", r); + lok(r == S_OK || r == E_INVALIDARG /* before Windows 7 */, "save failed (0x%08lx)\n", r); r = IPersistFile_IsDirty(pf); - lok(r == init_dirty, "dirty (0x%08x)\n", r); + lok(r == init_dirty, "dirty (0x%08lx)\n", r);
/* test GetCurFile before ::Save */ str = (LPWSTR)0xdeadbeef; r = IPersistFile_GetCurFile(pf, &str); - lok(r == S_FALSE, "got 0x%08x\n", r); + lok(r == S_FALSE, "got 0x%08lx\n", r); lok(str == NULL, "got %p\n", str);
r = IPersistFile_Save(pf, path, TRUE); - lok(r == S_OK, "save failed (0x%08x)\n", r); + lok(r == S_OK, "save failed (0x%08lx)\n", r); r = IPersistFile_IsDirty(pf); - lok(r == S_FALSE, "dirty (0x%08x)\n", r); + lok(r == S_FALSE, "dirty (0x%08lx)\n", r);
/* test GetCurFile after ::Save */ r = IPersistFile_GetCurFile(pf, &str); - lok(r == S_OK, "got 0x%08x\n", r); + lok(r == S_OK, "got 0x%08lx\n", r); lok(str != NULL, "Didn't expect NULL\n"); lok(!wcscmp(path, str), "Expected %s, got %s\n", wine_dbgstr_w(path), wine_dbgstr_w(str)); CoTaskMemFree(str);
r = IPersistFile_Save(pf, NULL, TRUE); - lok(r == S_OK, "save failed (0x%08x)\n", r); + lok(r == S_OK, "save failed (0x%08lx)\n", r);
/* test GetCurFile after ::Save */ r = IPersistFile_GetCurFile(pf, &str); - lok(r == S_OK, "got 0x%08x\n", r); + lok(r == S_OK, "got 0x%08lx\n", r); lok(str != NULL, "Didn't expect NULL\n"); lok(!wcscmp(path, str), "Expected %s, got %s\n", wine_dbgstr_w(path), wine_dbgstr_w(str)); CoTaskMemFree(str); @@ -506,12 +506,12 @@ static void check_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int todo)
r = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLinkA, (LPVOID*)&sl); - lok(r == S_OK, "no IID_IShellLinkA (0x%08x)\n", r); + lok(r == S_OK, "no IID_IShellLinkA (0x%08lx)\n", r); if (r != S_OK) return;
r = IShellLinkA_QueryInterface(sl, &IID_IPersistFile, (LPVOID*)&pf); - lok(r == S_OK, "no IID_IPersistFile (0x%08x)\n", r); + lok(r == S_OK, "no IID_IPersistFile (0x%08lx)\n", r); if (r != S_OK) { IShellLinkA_Release(sl); @@ -521,15 +521,15 @@ static void check_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int todo) /* test GetCurFile before ::Load */ str = (LPWSTR)0xdeadbeef; r = IPersistFile_GetCurFile(pf, &str); - lok(r == S_FALSE, "got 0x%08x\n", r); + lok(r == S_FALSE, "got 0x%08lx\n", r); lok(str == NULL, "got %p\n", str);
r = IPersistFile_Load(pf, path, STGM_READ); - lok(r == S_OK, "load failed (0x%08x)\n", r); + lok(r == S_OK, "load failed (0x%08lx)\n", r);
/* test GetCurFile after ::Save */ r = IPersistFile_GetCurFile(pf, &str); - lok(r == S_OK, "got 0x%08x\n", r); + lok(r == S_OK, "got 0x%08lx\n", r); lok(str != NULL, "Didn't expect NULL\n"); lok(!wcscmp(path, str), "Expected %s, got %s\n", wine_dbgstr_w(path), wine_dbgstr_w(str)); CoTaskMemFree(str); @@ -540,7 +540,7 @@ static void check_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int todo) { strcpy(buffer,"garbage"); r = IShellLinkA_GetDescription(sl, buffer, sizeof(buffer)); - lok(r == S_OK, "GetDescription failed (0x%08x)\n", r); + lok(r == S_OK, "GetDescription failed (0x%08lx)\n", r); todo_wine_if ((todo & 0x1) != 0) lok(strcmp(buffer, desc->description)==0, "GetDescription returned '%s' instead of '%s'\n", buffer, desc->description); @@ -549,7 +549,7 @@ static void check_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int todo) { strcpy(buffer,"garbage"); r = IShellLinkA_GetWorkingDirectory(sl, buffer, sizeof(buffer)); - lok(r == S_OK, "GetWorkingDirectory failed (0x%08x)\n", r); + lok(r == S_OK, "GetWorkingDirectory failed (0x%08lx)\n", r); todo_wine_if ((todo & 0x2) != 0) lok(lstrcmpiA(buffer, desc->workdir)==0, "GetWorkingDirectory returned '%s' instead of '%s'\n", buffer, desc->workdir); @@ -558,7 +558,7 @@ static void check_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int todo) { strcpy(buffer,"garbage"); r = IShellLinkA_GetPath(sl, buffer, sizeof(buffer), NULL, SLGP_RAWPATH); - lok(SUCCEEDED(r), "GetPath failed (0x%08x)\n", r); + lok(SUCCEEDED(r), "GetPath failed (0x%08lx)\n", r); todo_wine_if ((todo & 0x4) != 0) lok(lstrcmpiA(buffer, desc->path)==0, "GetPath returned '%s' instead of '%s'\n", buffer, desc->path); @@ -567,7 +567,7 @@ static void check_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int todo) { LPITEMIDLIST pidl=NULL; r = IShellLinkA_GetIDList(sl, &pidl); - lok(r == S_OK, "GetIDList failed (0x%08x)\n", r); + lok(r == S_OK, "GetIDList failed (0x%08lx)\n", r); todo_wine_if ((todo & 0x8) != 0) lok(ILIsEqual(pidl, desc->pidl), "GetIDList returned an incorrect pidl\n"); } @@ -575,7 +575,7 @@ static void check_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int todo) { int i=0xdeadbeef; r = IShellLinkA_GetShowCmd(sl, &i); - lok(r == S_OK, "GetShowCmd failed (0x%08x)\n", r); + lok(r == S_OK, "GetShowCmd failed (0x%08lx)\n", r); todo_wine_if ((todo & 0x10) != 0) lok(i==desc->showcmd, "GetShowCmd returned 0x%0x instead of 0x%0x\n", i, desc->showcmd); @@ -585,7 +585,7 @@ static void check_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int todo) int i=0xdeadbeef; strcpy(buffer,"garbage"); r = IShellLinkA_GetIconLocation(sl, buffer, sizeof(buffer), &i); - lok(r == S_OK, "GetIconLocation failed (0x%08x)\n", r); + lok(r == S_OK, "GetIconLocation failed (0x%08lx)\n", r); todo_wine_if ((todo & 0x20) != 0) { lok(lstrcmpiA(buffer, desc->icon)==0, "GetIconLocation returned '%s' instead of '%s'\n", buffer, desc->icon); @@ -597,7 +597,7 @@ static void check_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int todo) { WORD i=0xbeef; r = IShellLinkA_GetHotkey(sl, &i); - lok(r == S_OK, "GetHotkey failed (0x%08x)\n", r); + lok(r == S_OK, "GetHotkey failed (0x%08lx)\n", r); todo_wine_if ((todo & 0x40) != 0) lok(i==desc->hotkey, "GetHotkey returned 0x%04x instead of 0x%04x\n", i, desc->hotkey); @@ -651,7 +651,7 @@ static void test_load_save(void) check_lnk(lnkfile, &desc, 0x0);
r=GetModuleFileNameA(NULL, mypath, sizeof(mypath)); - ok(r<sizeof(mypath), "GetModuleFileName failed (%d)\n", r); + ok(r<sizeof(mypath), "GetModuleFileName failed (%ld)\n", r); strcpy(mydir, mypath); p=strrchr(mydir, '\'); if (p) @@ -726,9 +726,9 @@ static void test_load_save(void)
/* Create a temporary non-executable file */ r=GetTempPathA(sizeof(mypath), mypath); - ok(r<sizeof(mypath), "GetTempPath failed (%d), err %d\n", r, GetLastError()); + ok(r<sizeof(mypath), "GetTempPath failed (%ld), err %ld\n", r, GetLastError()); r = GetLongPathNameA(mypath, mydir, sizeof(mydir)); - ok(r<sizeof(mydir), "GetLongPathName failed (%d), err %d\n", r, GetLastError()); + ok(r<sizeof(mydir), "GetLongPathName failed (%ld), err %ld\n", r, GetLastError()); p=strrchr(mydir, '\'); if (p) *p='\0'; @@ -753,7 +753,7 @@ static void test_load_save(void) check_lnk(lnkfile, &desc, 0x0);
r = GetShortPathNameA(mydir, mypath, sizeof(mypath)); - ok(r<sizeof(mypath), "GetShortPathName failed (%d), err %d\n", r, GetLastError()); + ok(r<sizeof(mypath), "GetShortPathName failed (%ld), err %ld\n", r, GetLastError());
strcpy(realpath, mypath); strcat(realpath, "\test.txt"); @@ -774,7 +774,7 @@ static void test_load_save(void) check_lnk(lnkfile, &desc, 0x0);
r = DeleteFileA(mypath); - ok(r, "failed to delete file %s (%d)\n", mypath, GetLastError()); + ok(r, "failed to delete file %s (%ld)\n", mypath, GetLastError());
/* Create a temporary .bat file */ strcpy(mypath, mydir); @@ -804,7 +804,7 @@ static void test_load_save(void) check_lnk(lnkfile, &desc, 0x4);
r = DeleteFileA(realpath); - ok(r, "failed to delete file %s (%d)\n", realpath, GetLastError()); + ok(r, "failed to delete file %s (%ld)\n", realpath, GetLastError());
/* FIXME: Also test saving a .lnk pointing to a pidl that cannot be * represented as a path. @@ -812,7 +812,7 @@ static void test_load_save(void)
/* DeleteFileW is not implemented on Win9x */ r=DeleteFileA(lnkfileA); - ok(r, "failed to delete link '%s' (%d)\n", lnkfileA, GetLastError()); + ok(r, "failed to delete link '%s' (%ld)\n", lnkfileA, GetLastError()); }
static void test_datalink(void) @@ -836,10 +836,10 @@ static void test_datalink(void)
r = CoCreateInstance( &CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLinkW, (LPVOID*)&sl ); - ok( r == S_OK, "Failed to create shelllink object, hr %#x.\n", r); + ok( r == S_OK, "Failed to create shelllink object, hr %#lx.\n", r);
r = IShellLinkW_QueryInterface( sl, &IID_IShellLinkDataList, (void **)&dl ); - ok( r == S_OK, "Failed to get interface, hr %#x.\n", r); + ok( r == S_OK, "Failed to get interface, hr %#lx.\n", r);
flags = 0; r = IShellLinkDataList_GetFlags( dl, &flags ); @@ -852,7 +852,7 @@ static void test_datalink(void) ok( dar == NULL, "should be null\n");
r = IShellLinkW_SetPath(sl, NULL); - ok(r == E_INVALIDARG, "Unexpected hr %#x.\n", r); + ok(r == E_INVALIDARG, "Unexpected hr %#lx.\n", r);
r = IShellLinkW_SetPath(sl, lnk); ok(r == S_OK, "SetPath failed\n"); @@ -889,7 +889,7 @@ static void test_shdefextracticon(void) HRESULT res;
res = SHDefExtractIconA("shell32.dll", 0, 0, &hiconlarge, &hiconsmall, MAKELONG(16,24)); - ok(SUCCEEDED(res), "SHDefExtractIconA failed, res=%x\n", res); + ok(SUCCEEDED(res), "SHDefExtractIconA failed, res=%lx\n", res); ok(hiconlarge != NULL, "got null hiconlarge\n"); ok(hiconsmall != NULL, "got null hiconsmall\n"); DestroyIcon(hiconlarge); @@ -897,12 +897,12 @@ static void test_shdefextracticon(void)
hiconsmall = NULL; res = SHDefExtractIconA("shell32.dll", 0, 0, NULL, &hiconsmall, MAKELONG(16,24)); - ok(SUCCEEDED(res), "SHDefExtractIconA failed, res=%x\n", res); + ok(SUCCEEDED(res), "SHDefExtractIconA failed, res=%lx\n", res); ok(hiconsmall != NULL, "got null hiconsmall\n"); DestroyIcon(hiconsmall);
res = SHDefExtractIconA("shell32.dll", 0, 0, NULL, NULL, MAKELONG(16,24)); - ok(SUCCEEDED(res), "SHDefExtractIconA failed, res=%x\n", res); + ok(SUCCEEDED(res), "SHDefExtractIconA failed, res=%lx\n", res); }
static void test_GetIconLocation(void) @@ -917,25 +917,25 @@ static void test_GetIconLocation(void)
r = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLinkA, (LPVOID*)&sl); - ok(r == S_OK, "no IID_IShellLinkA (0x%08x)\n", r); + ok(r == S_OK, "no IID_IShellLinkA (0x%08lx)\n", r); if(r != S_OK) return;
i = 0xdeadbeef; strcpy(buffer, "garbage"); r = IShellLinkA_GetIconLocation(sl, buffer, sizeof(buffer), &i); - ok(r == S_OK, "GetIconLocation failed (0x%08x)\n", r); + ok(r == S_OK, "GetIconLocation failed (0x%08lx)\n", r); ok(*buffer == '\0', "GetIconLocation returned '%s'\n", buffer); ok(i == 0, "GetIconLocation returned %d\n", i);
str = "c:\some\path"; r = IShellLinkA_SetPath(sl, str); - ok(r == S_FALSE || r == S_OK, "SetPath failed (0x%08x)\n", r); + ok(r == S_FALSE || r == S_OK, "SetPath failed (0x%08lx)\n", r);
i = 0xdeadbeef; strcpy(buffer, "garbage"); r = IShellLinkA_GetIconLocation(sl, buffer, sizeof(buffer), &i); - ok(r == S_OK, "GetIconLocation failed (0x%08x)\n", r); + ok(r == S_OK, "GetIconLocation failed (0x%08lx)\n", r); ok(*buffer == '\0', "GetIconLocation returned '%s'\n", buffer); ok(i == 0, "GetIconLocation returned %d\n", i);
@@ -943,48 +943,48 @@ static void test_GetIconLocation(void) strcat(mypath, "\regedit.exe"); pidl = path_to_pidl(mypath); r = IShellLinkA_SetIDList(sl, pidl); - ok(r == S_OK, "SetPath failed (0x%08x)\n", r); + ok(r == S_OK, "SetPath failed (0x%08lx)\n", r); ILFree(pidl);
i = 0xdeadbeef; strcpy(buffer, "garbage"); r = IShellLinkA_GetIconLocation(sl, buffer, sizeof(buffer), &i); - ok(r == S_OK, "GetIconLocation failed (0x%08x)\n", r); + ok(r == S_OK, "GetIconLocation failed (0x%08lx)\n", r); ok(*buffer == '\0', "GetIconLocation returned '%s'\n", buffer); ok(i == 0, "GetIconLocation returned %d\n", i);
str = "c:\nonexistent\file"; r = IShellLinkA_SetIconLocation(sl, str, 0xbabecafe); - ok(r == S_OK, "SetIconLocation failed (0x%08x)\n", r); + ok(r == S_OK, "SetIconLocation failed (0x%08lx)\n", r);
i = 0xdeadbeef; r = IShellLinkA_GetIconLocation(sl, buffer, sizeof(buffer), &i); - ok(r == S_OK, "GetIconLocation failed (0x%08x)\n", r); + ok(r == S_OK, "GetIconLocation failed (0x%08lx)\n", r); ok(lstrcmpiA(buffer,str) == 0, "GetIconLocation returned '%s'\n", buffer); ok(i == 0xbabecafe, "GetIconLocation returned %#x.\n", i);
r = IShellLinkA_SetIconLocation(sl, NULL, 0xcafefe); - ok(r == S_OK, "SetIconLocation failed (0x%08x)\n", r); + ok(r == S_OK, "SetIconLocation failed (0x%08lx)\n", r);
i = 0xdeadbeef; r = IShellLinkA_GetIconLocation(sl, buffer, sizeof(buffer), &i); - ok(r == S_OK, "GetIconLocation failed (0x%08x)\n", r); + ok(r == S_OK, "GetIconLocation failed (0x%08lx)\n", r); ok(!*buffer, "GetIconLocation returned '%s'\n", buffer); ok(i == 0xcafefe, "GetIconLocation returned %#x.\n", i);
r = IShellLinkA_QueryInterface(sl, &IID_IShellLinkW, (void **)&slW); - ok(SUCCEEDED(r), "Failed to get IShellLinkW, hr %#x.\n", r); + ok(SUCCEEDED(r), "Failed to get IShellLinkW, hr %#lx.\n", r);
str = "c:\nonexistent\file"; r = IShellLinkA_SetIconLocation(sl, str, 0xbabecafe); - ok(r == S_OK, "SetIconLocation failed (0x%08x)\n", r); + ok(r == S_OK, "SetIconLocation failed (0x%08lx)\n", r);
r = IShellLinkA_SetIconLocation(sl, NULL, 0xcafefe); - ok(r == S_OK, "SetIconLocation failed (0x%08x)\n", r); + ok(r == S_OK, "SetIconLocation failed (0x%08lx)\n", r);
i = 0xdeadbeef; r = IShellLinkA_GetIconLocation(sl, buffer, sizeof(buffer), &i); - ok(r == S_OK, "GetIconLocation failed (0x%08x)\n", r); + ok(r == S_OK, "GetIconLocation failed (0x%08lx)\n", r); ok(!*buffer, "GetIconLocation returned '%s'\n", buffer); ok(i == 0xcafefe, "GetIconLocation returned %#x.\n", i);
@@ -1010,7 +1010,7 @@ static void test_SHGetStockIconInfo(void) memset(buffer, '#', sizeof(buffer)); sii->cbSize = sizeof(SHSTOCKICONINFO); hr = pSHGetStockIconInfo(SIID_INVALID, SHGSI_ICONLOCATION, sii); - ok(hr == E_INVALIDARG, "-1: got 0x%x (expected E_INVALIDARG)\n", hr); + ok(hr == E_INVALIDARG, "-1: got 0x%lx (expected E_INVALIDARG)\n", hr);
/* max. id for vista is 140 (no definition exists for this value) */ for (i = SIID_DOCNOASSOC; i <= SIID_CLUSTEREDDRIVE; i++) @@ -1020,7 +1020,7 @@ static void test_SHGetStockIconInfo(void) hr = pSHGetStockIconInfo(i, SHGSI_ICONLOCATION, sii);
ok(hr == S_OK, - "%3d: got 0x%x, iSysImageIndex: 0x%x, iIcon: 0x%x (expected S_OK)\n", + "%3d: got 0x%lx, iSysImageIndex: 0x%x, iIcon: 0x%x (expected S_OK)\n", i, hr, sii->iSysImageIndex, sii->iIcon);
if ((hr == S_OK) && (winetest_debug > 1)) @@ -1034,7 +1034,7 @@ static void test_SHGetStockIconInfo(void) memset(buffer, '#', sizeof(buffer)); sii->cbSize = sizeof(SHSTOCKICONINFO); hr = pSHGetStockIconInfo(i, SHGSI_ICONLOCATION, sii); - ok(hr == E_INVALIDARG, "%3d: got 0x%x (expected E_INVALIDARG)\n", i, hr); + ok(hr == E_INVALIDARG, "%3d: got 0x%lx (expected E_INVALIDARG)\n", i, hr); todo_wine { ok(sii->iSysImageIndex == -1, "%d: got iSysImageIndex %d\n", i, sii->iSysImageIndex); ok(sii->iIcon == -1, "%d: got iIcon %d\n", i, sii->iIcon); @@ -1045,7 +1045,7 @@ static void test_SHGetStockIconInfo(void) memset(buffer, '#', sizeof(buffer)); sii->cbSize = sizeof(SHSTOCKICONINFO); hr = pSHGetStockIconInfo(SIID_FOLDER, SHGSI_ICONLOCATION, sii); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr); ok(!sii->hIcon, "got %p (expected NULL)\n", sii->hIcon); ok(sii->iSysImageIndex == -1, "got %d (expected -1)\n", sii->iSysImageIndex);
@@ -1053,26 +1053,26 @@ static void test_SHGetStockIconInfo(void) memset(buffer, '#', sizeof(buffer)); sii->cbSize = sizeof(SHSTOCKICONINFO) + 2; hr = pSHGetStockIconInfo(SIID_FOLDER, SHGSI_ICONLOCATION, sii); - ok(hr == E_INVALIDARG, "+2: got 0x%x, iSysImageIndex: 0x%x, iIcon: 0x%x\n", hr, sii->iSysImageIndex, sii->iIcon); + ok(hr == E_INVALIDARG, "+2: got 0x%lx, iSysImageIndex: 0x%x, iIcon: 0x%x\n", hr, sii->iSysImageIndex, sii->iIcon);
memset(buffer, '#', sizeof(buffer)); sii->cbSize = sizeof(SHSTOCKICONINFO) + 1; hr = pSHGetStockIconInfo(SIID_FOLDER, SHGSI_ICONLOCATION, sii); - ok(hr == E_INVALIDARG, "+1: got 0x%x, iSysImageIndex: 0x%x, iIcon: 0x%x\n", hr, sii->iSysImageIndex, sii->iIcon); + ok(hr == E_INVALIDARG, "+1: got 0x%lx, iSysImageIndex: 0x%x, iIcon: 0x%x\n", hr, sii->iSysImageIndex, sii->iIcon);
memset(buffer, '#', sizeof(buffer)); sii->cbSize = sizeof(SHSTOCKICONINFO) - 1; hr = pSHGetStockIconInfo(SIID_FOLDER, SHGSI_ICONLOCATION, sii); - ok(hr == E_INVALIDARG, "-1: got 0x%x, iSysImageIndex: 0x%x, iIcon: 0x%x\n", hr, sii->iSysImageIndex, sii->iIcon); + ok(hr == E_INVALIDARG, "-1: got 0x%lx, iSysImageIndex: 0x%x, iIcon: 0x%x\n", hr, sii->iSysImageIndex, sii->iIcon);
memset(buffer, '#', sizeof(buffer)); sii->cbSize = sizeof(SHSTOCKICONINFO) - 2; hr = pSHGetStockIconInfo(SIID_FOLDER, SHGSI_ICONLOCATION, sii); - ok(hr == E_INVALIDARG, "-2: got 0x%x, iSysImageIndex: 0x%x, iIcon: 0x%x\n", hr, sii->iSysImageIndex, sii->iIcon); + ok(hr == E_INVALIDARG, "-2: got 0x%lx, iSysImageIndex: 0x%x, iIcon: 0x%x\n", hr, sii->iSysImageIndex, sii->iIcon);
/* there is a NULL check for the struct */ hr = pSHGetStockIconInfo(SIID_FOLDER, SHGSI_ICONLOCATION, NULL); - ok(hr == E_INVALIDARG, "NULL: got 0x%x\n", hr); + ok(hr == E_INVALIDARG, "NULL: got 0x%lx\n", hr); }
static void test_SHExtractIcons(void) @@ -1141,10 +1141,10 @@ static void test_propertystore(void)
hr = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLinkA, (void**)&linkA); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IShellLinkA_QueryInterface(linkA, &IID_IShellLinkW, (void**)&linkW); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IShellLinkA_QueryInterface(linkA, &IID_IPropertyStore, (void**)&ps); if (hr == S_OK) { @@ -1153,10 +1153,10 @@ static void test_propertystore(void) IPropertyStore_Release(ps);
hr = IShellLinkW_QueryInterface(linkW, &IID_IPropertyStore, (void**)&ps); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IPropertyStore_QueryInterface(ps, &IID_IPropertyStoreCache, (void**)&pscache); - ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr); + ok(hr == E_NOINTERFACE, "got 0x%08lx\n", hr);
IPropertyStore_Release(ps); } @@ -1218,7 +1218,7 @@ static void test_ExtractIcon(void) ok(hicon == NULL, "Got icon %p\n", hicon);
r = DeleteFileA(path); - ok(r, "failed to delete file %s (%d)\n", path, GetLastError()); + ok(r, "failed to delete file %s (%ld)\n", path, GetLastError());
/* same for W variant */ if (0) @@ -1266,7 +1266,7 @@ if (0) ok(hicon == NULL, "Got icon %p\n", hicon);
r = DeleteFileW(pathW); - ok(r, "failed to delete file %s (%d)\n", path, GetLastError()); + ok(r, "failed to delete file %s (%ld)\n", path, GetLastError()); }
static void test_ExtractAssociatedIcon(void) @@ -1346,20 +1346,20 @@ static void test_SHGetImageList(void) BOOL dpi_aware = pIsProcessDPIAware && pIsProcessDPIAware();
hr = SHGetImageList( SHIL_LARGE, &IID_IImageList, (void **)&list ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); start_refs = IImageList_AddRef( list ); IImageList_Release( list );
hr = SHGetImageList( SHIL_LARGE, &IID_IImageList, (void **)&list2 ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); ok( list == list2, "lists differ\n" ); refs = IImageList_AddRef( list ); IImageList_Release( list ); - ok( refs == start_refs + 1, "got %d, start_refs %d\n", refs, start_refs ); + ok( refs == start_refs + 1, "got %ld, start_refs %ld\n", refs, start_refs ); IImageList_Release( list2 );
hr = SHGetImageList( SHIL_SMALL, &IID_IImageList, (void **)&list2 ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
ret = Shell_GetImageLists( &lg, &sm ); ok( ret, "got %d\n", ret ); @@ -1369,7 +1369,7 @@ static void test_SHGetImageList(void) /* Shell_GetImageLists doesn't take a reference */ refs = IImageList_AddRef( list ); IImageList_Release( list ); - ok( refs == start_refs, "got %d, start_refs %d\n", refs, start_refs ); + ok( refs == start_refs, "got %ld, start_refs %ld\n", refs, start_refs );
IImageList_Release( list2 ); IImageList_Release( list ); @@ -1379,7 +1379,7 @@ static void test_SHGetImageList(void) { hr = SHGetImageList( i, &IID_IImageList, (void **)&list ); ok( hr == S_OK || broken( i == SHIL_JUMBO && hr == E_INVALIDARG ), /* XP and 2003 */ - "%d: got %08x\n", i, hr ); + "%d: got %08lx\n", i, hr ); if (FAILED(hr)) continue; IImageList_GetIconSize( list, &width, &height ); switch (i) @@ -1424,7 +1424,7 @@ START_TEST(shelllink) pIsProcessDPIAware = (void *)GetProcAddress(huser32, "IsProcessDPIAware");
r = CoInitialize(NULL); - ok(r == S_OK, "CoInitialize failed (0x%08x)\n", r); + ok(r == S_OK, "CoInitialize failed (0x%08lx)\n", r); if (r != S_OK) return;
diff --git a/dlls/shell32/tests/shellole.c b/dlls/shell32/tests/shellole.c index 1c26612bf98..5f0c2ea1bca 100644 --- a/dlls/shell32/tests/shellole.c +++ b/dlls/shell32/tests/shellole.c @@ -116,15 +116,15 @@ static HRESULT WINAPI PropertyStorage_ReadMultiple(IPropertyStorage *This, ULONG ok(rgpspec != NULL, "rgpspec = NULL\n"); ok(rgpropvar != NULL, "rgpropvar = NULL\n");
- ok(rgpspec[0].ulKind == PRSPEC_PROPID, "rgpspec[0].ulKind = %d\n", rgpspec[0].ulKind); - ok(rgpspec[0].u.propid == PID_CODEPAGE, "rgpspec[0].propid = %d\n", rgpspec[0].u.propid); + ok(rgpspec[0].ulKind == PRSPEC_PROPID, "rgpspec[0].ulKind = %ld\n", rgpspec[0].ulKind); + ok(rgpspec[0].u.propid == PID_CODEPAGE, "rgpspec[0].propid = %ld\n", rgpspec[0].u.propid);
rgpropvar[0].vt = VT_I2; rgpropvar[0].iVal = 1234; } else { CHECK_EXPECT(ReadMultiple);
- ok(cpspec == 10, "cpspec = %u\n", cpspec); + ok(cpspec == 10, "cpspec = %lu\n", cpspec); ok(rgpspec == (void*)0xdeadbeef, "rgpspec = %p\n", rgpspec); ok(rgpropvar != NULL, "rgpropvar = NULL\n");
@@ -149,10 +149,10 @@ static HRESULT WINAPI PropertyStorage_WriteMultiple(IPropertyStorage *This, ULON { CHECK_EXPECT(WriteMultiple);
- ok(cpspec == 20, "cpspec = %d\n", cpspec); + ok(cpspec == 20, "cpspec = %ld\n", cpspec); ok(rgpspec == (void*)0xdeadbeef, "rgpspec = %p\n", rgpspec); ok(rgpropvar == (void*)0xdeadbeef, "rgpropvar = %p\n", rgpspec); - ok(propidNameFirst == PID_FIRST_USABLE, "propidNameFirst = %d\n", propidNameFirst); + ok(propidNameFirst == PID_FIRST_USABLE, "propidNameFirst = %ld\n", propidNameFirst); return S_OK; }
@@ -272,8 +272,8 @@ static HRESULT WINAPI PropertySetStorage_Create(IPropertySetStorage *This, ok(IsEqualGUID(rfmtid, &FMTID_Test) || IsEqualGUID(rfmtid, &FMTID_NotExisting), "Incorrect rfmtid value\n"); ok(pclsid == NULL, "pclsid != NULL\n"); - ok(grfFlags == PROPSETFLAG_ANSI, "grfFlags = %x\n", grfFlags); - ok(grfMode == STGM_READ, "grfMode = %x\n", grfMode); + ok(grfFlags == PROPSETFLAG_ANSI, "grfFlags = %lx\n", grfFlags); + ok(grfMode == STGM_READ, "grfMode = %lx\n", grfMode);
*ppprstg = &PropertyStorage; return S_OK; @@ -285,7 +285,7 @@ static HRESULT WINAPI PropertySetStorage_Open(IPropertySetStorage *This, CHECK_EXPECT(Open);
if(IsEqualGUID(rfmtid, &FMTID_Test)) { - ok(grfMode == STGM_READ, "grfMode = %x\n", grfMode); + ok(grfMode == STGM_READ, "grfMode = %lx\n", grfMode);
*ppprstg = &PropertyStorage; return S_OK; @@ -348,14 +348,14 @@ static void test_SHPropStg_functions(void) hres = pSHPropStgCreate(&PropertySetStorage, &FMTID_Test, NULL, PROPSETFLAG_DEFAULT, STGM_READ, OPEN_EXISTING, &property_storage, &codepage); ok(codepage == 1234, "codepage = %d\n", codepage); - ok(hres == S_OK, "hres = %x\n", hres); + ok(hres == S_OK, "hres = %lx\n", hres); CHECK_CALLED(Open); CHECK_CALLED(ReadMultipleCodePage);
SET_EXPECT(Open); hres = pSHPropStgCreate(&PropertySetStorage, &FMTID_NotExisting, NULL, PROPSETFLAG_DEFAULT, STGM_READ, OPEN_EXISTING, &property_storage, &codepage); - ok(hres == STG_E_FILENOTFOUND, "hres = %x\n", hres); + ok(hres == STG_E_FILENOTFOUND, "hres = %lx\n", hres); CHECK_CALLED(Open);
SET_EXPECT(Open); @@ -366,7 +366,7 @@ static void test_SHPropStg_functions(void) hres = pSHPropStgCreate(&PropertySetStorage, &FMTID_Test, NULL, PROPSETFLAG_ANSI, STGM_READ, CREATE_ALWAYS, &property_storage, &codepage); ok(codepage == 1234, "codepage = %d\n", codepage); - ok(hres == S_OK, "hres = %x\n", hres); + ok(hres == S_OK, "hres = %lx\n", hres); CHECK_CALLED(Open); CHECK_CALLED(Release); CHECK_CALLED(Delete); @@ -379,7 +379,7 @@ static void test_SHPropStg_functions(void) hres = pSHPropStgCreate(&PropertySetStorage, &FMTID_NotExisting, NULL, PROPSETFLAG_ANSI, STGM_READ, CREATE_ALWAYS, &property_storage, &codepage); ok(codepage == 1234, "codepage = %d\n", codepage); - ok(hres == S_OK, "hres = %x\n", hres); + ok(hres == S_OK, "hres = %lx\n", hres); CHECK_CALLED(Open); CHECK_CALLED(Create); CHECK_CALLED(ReadMultipleCodePage); @@ -387,7 +387,7 @@ static void test_SHPropStg_functions(void) SET_EXPECT(Open); hres = pSHPropStgCreate(&PropertySetStorage, &FMTID_Test, &FMTID_NotExisting, PROPSETFLAG_DEFAULT, STGM_READ, OPEN_EXISTING, &property_storage, NULL); - ok(hres == S_OK, "hres = %x\n", hres); + ok(hres == S_OK, "hres = %lx\n", hres); CHECK_CALLED(Open);
SET_EXPECT(Stat); @@ -395,7 +395,7 @@ static void test_SHPropStg_functions(void) SET_EXPECT(WriteMultiple); codepage = 0; hres = pSHPropStgWriteMultiple(property_storage, &codepage, 20, (void*)0xdeadbeef, (void*)0xdeadbeef, PID_FIRST_USABLE); - ok(hres == S_OK, "hres = %x\n", hres); + ok(hres == S_OK, "hres = %lx\n", hres); ok(codepage == 1234, "codepage = %d\n", codepage); CHECK_CALLED(Stat); CHECK_CALLED(ReadMultipleCodePage); @@ -405,7 +405,7 @@ static void test_SHPropStg_functions(void) SET_EXPECT(ReadMultipleCodePage); SET_EXPECT(WriteMultiple); hres = pSHPropStgWriteMultiple(property_storage, NULL, 20, (void*)0xdeadbeef, (void*)0xdeadbeef, PID_FIRST_USABLE); - ok(hres == S_OK, "hres = %x\n", hres); + ok(hres == S_OK, "hres = %lx\n", hres); CHECK_CALLED(Stat); CHECK_CALLED(ReadMultipleCodePage); CHECK_CALLED(WriteMultiple); @@ -414,7 +414,7 @@ static void test_SHPropStg_functions(void) SET_EXPECT(WriteMultiple); codepage = 1000; hres = pSHPropStgWriteMultiple(property_storage, &codepage, 20, (void*)0xdeadbeef, (void*)0xdeadbeef, PID_FIRST_USABLE); - ok(hres == S_OK, "hres = %x\n", hres); + ok(hres == S_OK, "hres = %lx\n", hres); ok(codepage == 1000, "codepage = %d\n", codepage); CHECK_CALLED(Stat); CHECK_CALLED(WriteMultiple); @@ -425,7 +425,7 @@ static void test_SHPropStg_functions(void) SET_EXPECT(ReadMultipleCodePage); SET_EXPECT(Stat); hres = pSHPropStgReadMultiple(property_storage, 0, 10, (void*)0xdeadbeef, read); - ok(hres == S_OK, "hres = %x\n", hres); + ok(hres == S_OK, "hres = %lx\n", hres); CHECK_CALLED(ReadMultiple); CHECK_CALLED(ReadMultipleCodePage); CHECK_CALLED(Stat); @@ -433,7 +433,7 @@ static void test_SHPropStg_functions(void) SET_EXPECT(ReadMultiple); SET_EXPECT(Stat); hres = pSHPropStgReadMultiple(property_storage, 1251, 10, (void*)0xdeadbeef, read); - ok(hres == S_OK, "hres = %x\n", hres); + ok(hres == S_OK, "hres = %lx\n", hres); CHECK_CALLED(ReadMultiple); CHECK_CALLED(Stat); } @@ -715,19 +715,19 @@ static void test_SHCreateQueryCancelAutoPlayMoniker(void) }
hr = pSHCreateQueryCancelAutoPlayMoniker(NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = pSHCreateQueryCancelAutoPlayMoniker(&mon); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
sys = -1; hr = IMoniker_IsSystemMoniker(mon, &sys); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(sys == MKSYS_CLASSMONIKER, "got %d\n", sys); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(sys == MKSYS_CLASSMONIKER, "got %ld\n", sys);
memset(&clsid, 0, sizeof(clsid)); hr = IMoniker_GetClassID(mon, &clsid); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(IsEqualGUID(&clsid, &CLSID_ClassMoniker), "got %s\n", wine_dbgstr_guid(&clsid));
/* extract used CLSID that implements this hook */ @@ -736,7 +736,7 @@ static void test_SHCreateQueryCancelAutoPlayMoniker(void)
CreateBindCtx(0, &ctxt); hr = IMoniker_BindToObject(mon, ctxt, &test_moniker, &IID_IQueryCancelAutoPlay, (void**)&unk); - ok(hr == E_NOTIMPL, "got 0x%08x\n", hr); + ok(hr == E_NOTIMPL, "got 0x%08lx\n", hr); IBindCtx_Release(ctxt);
CHECK_CALLED(autoplay_BindToObject); @@ -778,8 +778,8 @@ static LRESULT WINAPI drop_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARA ok(!strcmp(filename, DROPTEST_FILENAME), "got %s\n", filename); r = DragQueryPoint(hDrop, &pt); ok(r == expected, "expected %d, got %d\n", expected, r); - ok(pt.x == 10, "expected 10, got %d\n", pt.x); - ok(pt.y == 20, "expected 20, got %d\n", pt.y); + ok(pt.x == 10, "expected 10, got %ld\n", pt.x); + ok(pt.y == 20, "expected 20, got %ld\n", pt.y); DragFinish(hDrop); return 0; } @@ -803,13 +803,13 @@ static DWORD WINAPI drop_window_therad(void *arg)
param->hwnd = CreateWindowA("drop test", NULL, 0, 0, 0, 0, 0, NULL, 0, NULL, 0); - ok(param->hwnd != NULL, "CreateWindow failed: %d\n", GetLastError()); + ok(param->hwnd != NULL, "CreateWindow failed: %ld\n", GetLastError());
memset(&info, 0, sizeof(info)); info.cbSize = sizeof(info); r = GetWindowInfo(param->hwnd, &info); ok(r, "got %d\n", r); - ok(!(info.dwExStyle & WS_EX_ACCEPTFILES), "got %08x\n", info.dwExStyle); + ok(!(info.dwExStyle & WS_EX_ACCEPTFILES), "got %08lx\n", info.dwExStyle);
DragAcceptFiles(param->hwnd, TRUE);
@@ -817,7 +817,7 @@ static DWORD WINAPI drop_window_therad(void *arg) info.cbSize = sizeof(info); r = GetWindowInfo(param->hwnd, &info); ok(r, "got %d\n", r); - ok((info.dwExStyle & WS_EX_ACCEPTFILES), "got %08x\n", info.dwExStyle); + ok((info.dwExStyle & WS_EX_ACCEPTFILES), "got %08lx\n", info.dwExStyle);
SetEvent(param->ready);
@@ -849,7 +849,7 @@ static void test_DragQueryFile(BOOL non_client_flag) hThread = CreateThread(NULL, 0, drop_window_therad, ¶m, 0, NULL);
rc = WaitForSingleObject(param.ready, 5000); - ok(rc == WAIT_OBJECT_0, "got %u\n", rc); + ok(rc == WAIT_OBJECT_0, "got %lu\n", rc);
hDrop = GlobalAlloc(GHND, sizeof(DROPFILES) + (strlen(DROPTEST_FILENAME) + 2) * sizeof(WCHAR)); pDrop = GlobalLock(hDrop); @@ -873,7 +873,7 @@ static void test_DragQueryFile(BOOL non_client_flag) ok(r, "got %d\n", r);
rc = WaitForSingleObject(hThread, 5000); - ok(rc == WAIT_OBJECT_0, "got %d\n", rc); + ok(rc == WAIT_OBJECT_0, "got %ld\n", rc);
CloseHandle(param.ready); CloseHandle(hThread); @@ -904,14 +904,14 @@ static void test_SHCreateSessionKey(void)
hkey = (HKEY)0xdeadbeef; hr = pSHCreateSessionKey(0, &hkey); - ok(hr == E_ACCESSDENIED, "got 0x%08x\n", hr); + ok(hr == E_ACCESSDENIED, "got 0x%08lx\n", hr); ok(hkey == NULL, "got %p\n", hkey);
hr = pSHCreateSessionKey(KEY_READ, &hkey); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = pSHCreateSessionKey(KEY_READ, &hkey2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(hkey != hkey2, "got %p, %p\n", hkey, hkey2);
RegCloseKey(hkey); @@ -935,10 +935,10 @@ static void test_dragdrophelper(void) HRESULT hr;
hr = CoCreateInstance(&CLSID_DragDropHelper, NULL, CLSCTX_INPROC_SERVER, &IID_IDropTargetHelper, (void **)&target); - ok(hr == S_OK, "Failed to create IDropTargetHelper, %#x\n", hr); + ok(hr == S_OK, "Failed to create IDropTargetHelper, %#lx\n", hr);
hr = IDropTargetHelper_QueryInterface(target, &IID_IDragSourceHelper, (void **)&dragsource); - ok(hr == S_OK, "QI failed, %#x\n", hr); + ok(hr == S_OK, "QI failed, %#lx\n", hr); IDragSourceHelper_Release(dragsource);
IDropTargetHelper_Release(target); @@ -951,7 +951,7 @@ START_TEST(shellole) init();
hr = CoInitialize(NULL); - ok(hr == S_OK, "CoInitialize failed (0x%08x)\n", hr); + ok(hr == S_OK, "CoInitialize failed (0x%08lx)\n", hr); if (hr != S_OK) return;
diff --git a/dlls/shell32/tests/shellpath.c b/dlls/shell32/tests/shellpath.c index 7d0f725158a..91ecf6b9a80 100644 --- a/dlls/shell32/tests/shellpath.c +++ b/dlls/shell32/tests/shellpath.c @@ -217,7 +217,7 @@ static void loadShell32(void) { shellVersion.cbSize = sizeof(shellVersion); pDllGetVersion(&shellVersion); - trace("shell32 version is %d.%d\n", + trace("shell32 version is %ld.%ld\n", shellVersion.dwMajorVersion, shellVersion.dwMinorVersion); } #undef GET_PROC @@ -1327,12 +1327,12 @@ static void test_parameters(void) /* check a bogus CSIDL: */ pidl = NULL; hr = SHGetFolderLocation(NULL, 0xeeee, NULL, 0, &pidl); - ok(hr == E_INVALIDARG, "got 0x%08x, expected E_INVALIDARG\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx, expected E_INVALIDARG\n", hr);
/* check a bogus user token: */ pidl = NULL; hr = SHGetFolderLocation(NULL, CSIDL_FAVORITES, (HANDLE)2, 0, &pidl); - ok(hr == E_FAIL || hr == E_HANDLE, "got 0x%08x, expected E_FAIL or E_HANDLE\n", hr); + ok(hr == E_FAIL || hr == E_HANDLE, "got 0x%08lx, expected E_FAIL or E_HANDLE\n", hr);
/* a NULL pidl pointer crashes, so don't test it */
@@ -1343,7 +1343,7 @@ static void test_parameters(void) SHGetSpecialFolderLocation(NULL, 0, NULL);
hr = pSHGetSpecialFolderLocation(NULL, 0xeeee, &pidl); - ok(hr == E_INVALIDARG, "got returned 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got returned 0x%08lx\n", hr); }
if (pSHGetFolderPathA) @@ -1351,10 +1351,10 @@ static void test_parameters(void) /* expect 2's a bogus handle, especially since we didn't open it */ hr = pSHGetFolderPathA(NULL, CSIDL_DESKTOP, (HANDLE)2, SHGFP_TYPE_DEFAULT, path); ok(hr == E_FAIL || hr == E_HANDLE || /* Vista and 2k8 */ - broken(hr == S_OK), /* W2k and Me */ "got 0x%08x, expected E_FAIL\n", hr); + broken(hr == S_OK), /* W2k and Me */ "got 0x%08lx, expected E_FAIL\n", hr);
hr = pSHGetFolderPathA(NULL, 0xeeee, NULL, SHGFP_TYPE_DEFAULT, path); - ok(hr == E_INVALIDARG, "got 0x%08x, expected E_INVALIDARG\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx, expected E_INVALIDARG\n", hr); }
if (pSHGetSpecialFolderPathA) @@ -1437,7 +1437,7 @@ static void test_SHGetFolderPath(BOOL optional, int folder)
hr = pSHGetFolderPathA(NULL, folder, NULL, SHGFP_TYPE_CURRENT, path); ok(hr == S_OK || optional, - "SHGetFolderPathA(NULL, %s, NULL, SHGFP_TYPE_CURRENT, path) failed: 0x%08x\n", getFolderName(folder), hr); + "SHGetFolderPathA(NULL, %s, NULL, SHGFP_TYPE_CURRENT, path) failed: 0x%08lx\n", getFolderName(folder), hr); }
static void test_SHGetSpecialFolderPath(BOOL optional, int folder) @@ -1716,12 +1716,12 @@ static void doChild(const char *arg) /* test some failure cases first: */ hr = pSHGetFolderPathA(NULL, CSIDL_FAVORITES, NULL, SHGFP_TYPE_CURRENT, path); ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "SHGetFolderPath returned 0x%08x, expected 0x80070002\n", hr); + "SHGetFolderPath returned 0x%08lx, expected 0x80070002\n", hr);
pidl = NULL; hr = SHGetFolderLocation(NULL, CSIDL_FAVORITES, NULL, 0, &pidl); ok(hr == E_FAIL || hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "SHGetFolderLocation returned 0x%08x\n", hr); + "SHGetFolderLocation returned 0x%08lx\n", hr);
ok(!pSHGetSpecialFolderPathA(NULL, path, CSIDL_FAVORITES, FALSE), "SHGetSpecialFolderPath succeeded, expected failure\n"); @@ -1729,12 +1729,12 @@ static void doChild(const char *arg) pidl = NULL; hr = pSHGetSpecialFolderLocation(NULL, CSIDL_FAVORITES, &pidl); ok(hr == E_FAIL || hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "SHGetFolderLocation returned 0x%08x\n", hr); + "SHGetFolderLocation returned 0x%08lx\n", hr);
/* now test success: */ hr = pSHGetFolderPathA(NULL, CSIDL_FAVORITES | CSIDL_FLAG_CREATE, NULL, SHGFP_TYPE_CURRENT, path); - ok (hr == S_OK, "got 0x%08x\n", hr); + ok (hr == S_OK, "got 0x%08lx\n", hr); if (hr == S_OK) { BOOL ret; @@ -1744,7 +1744,7 @@ static void doChild(const char *arg) ok(!ret, "expected failure with ERROR_ALREADY_EXISTS\n"); if (!ret) ok(GetLastError() == ERROR_ALREADY_EXISTS, - "got %d, expected ERROR_ALREADY_EXISTS\n", GetLastError()); + "got %ld, expected ERROR_ALREADY_EXISTS\n", GetLastError());
p = path + strlen(path); strcpy(p, "\desktop.ini"); @@ -1752,7 +1752,7 @@ static void doChild(const char *arg) *p = 0; SetFileAttributesA( path, FILE_ATTRIBUTE_NORMAL ); ret = RemoveDirectoryA(path); - ok( ret, "failed to remove %s error %u\n", path, GetLastError() ); + ok( ret, "failed to remove %s error %lu\n", path, GetLastError() ); } } else if (arg[0] == '2') @@ -1761,7 +1761,7 @@ static void doChild(const char *arg) original value of CSIDL_FAVORITES is restored. */ hr = pSHGetFolderPathA(NULL, CSIDL_FAVORITES | CSIDL_FLAG_CREATE, NULL, SHGFP_TYPE_CURRENT, path); - ok(hr == S_OK, "SHGetFolderPath failed: 0x%08x\n", hr); + ok(hr == S_OK, "SHGetFolderPath failed: 0x%08lx\n", hr); } }
@@ -1861,17 +1861,17 @@ static void test_SHGetFolderPathEx(void)
if (0) { /* crashes */ hr = pSHGetKnownFolderPath(&FOLDERID_Desktop, 0, NULL, NULL); - ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got 0x%08lx\n", hr); } /* non-existent folder id */ path = (void *)0xdeadbeef; hr = pSHGetKnownFolderPath(&IID_IOleObject, 0, NULL, &path); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08lx\n", hr); ok(path == NULL, "got %p\n", path);
path = NULL; hr = pSHGetKnownFolderPath(&FOLDERID_Desktop, KF_FLAG_DEFAULT_PATH, NULL, &path); - ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "expected S_OK, got 0x%08lx\n", hr); ok(path != NULL, "expected path != NULL\n"); CoTaskMemFree(path);
@@ -1886,40 +1886,40 @@ if (0) { /* crashes */ ok(path == NULL, "expected path == NULL\n"); continue; } - ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "expected S_OK, got 0x%08lx\n", hr); ok(path != NULL, "expected path != NULL\n");
path2 = NULL; hr = pSHGetKnownFolderPath(folder_id, KF_FLAG_SIMPLE_IDLIST, NULL, &path2); - ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "expected S_OK, got 0x%08lx\n", hr); ok(path2 != NULL, "expected path != NULL\n"); ok(!lstrcmpiW(path, path2), "expected equal paths: %s, %s\n", wine_dbgstr_w(path), wine_dbgstr_w(path2)); CoTaskMemFree(path2);
path2 = NULL; hr = pSHGetKnownFolderPath(folder_id, KF_FLAG_DONT_UNEXPAND, NULL, &path2); - ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "expected S_OK, got 0x%08lx\n", hr); ok(path2 != NULL, "expected path != NULL\n"); ok(!lstrcmpiW(path, path2), "expected equal paths: %s, %s\n", wine_dbgstr_w(path), wine_dbgstr_w(path2)); CoTaskMemFree(path2);
path2 = NULL; hr = pSHGetKnownFolderPath(folder_id, KF_FLAG_SIMPLE_IDLIST | KF_FLAG_DONT_UNEXPAND, NULL, &path2); - ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "expected S_OK, got 0x%08lx\n", hr); ok(path2 != NULL, "expected path != NULL\n"); ok(!lstrcmpiW(path, path2), "expected equal paths: %s, %s\n", wine_dbgstr_w(path), wine_dbgstr_w(path2)); CoTaskMemFree(path2);
hr = pSHGetKnownFolderPath(folder_id, KF_FLAG_DEFAULT_PATH, NULL, &path2); - ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "expected S_OK, got 0x%08lx\n", hr); ok(path2 != NULL, "expected path != NULL\n"); CoTaskMemFree(path2);
hr = pSHGetKnownFolderPath(folder_id, KF_FLAG_NOT_PARENT_RELATIVE, NULL, &path2); - ok(hr == E_INVALIDARG, "expected S_OK, got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "expected S_OK, got 0x%08lx\n", hr);
hr = pSHGetKnownFolderPath(folder_id, KF_FLAG_DEFAULT_PATH | KF_FLAG_NOT_PARENT_RELATIVE, NULL, &path2); - ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "expected S_OK, got 0x%08lx\n", hr); ok(path2 != NULL, "expected path != NULL\n"); CoTaskMemFree(path2);
@@ -1928,50 +1928,50 @@ if (0) { /* crashes */
path = NULL; hr = pSHGetKnownFolderPath(&FOLDERID_Desktop, 0, NULL, &path); - ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "expected S_OK, got 0x%08lx\n", hr); ok(path != NULL, "expected path != NULL\n");
hr = pSHGetFolderPathEx(&FOLDERID_Desktop, 0, NULL, buffer, MAX_PATH); - ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "expected S_OK, got 0x%08lx\n", hr); ok(!lstrcmpiW(path, buffer), "expected equal paths\n"); len = lstrlenW(buffer); CoTaskMemFree(path);
hr = pSHGetFolderPathEx(&FOLDERID_Desktop, 0, NULL, buffer, 0); - ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got 0x%08lx\n", hr);
if (0) { /* crashes */ hr = pSHGetFolderPathEx(&FOLDERID_Desktop, 0, NULL, NULL, len + 1); - ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got 0x%08lx\n", hr);
hr = pSHGetFolderPathEx(NULL, 0, NULL, buffer, MAX_PATH); - ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got 0x%08lx\n", hr); } hr = pSHGetFolderPathEx(&FOLDERID_Desktop, 0, NULL, buffer, len); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "expected E_NOT_SUFFICIENT_BUFFER, got 0x%08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "expected E_NOT_SUFFICIENT_BUFFER, got 0x%08lx\n", hr);
hr = pSHGetFolderPathEx(&FOLDERID_Desktop, 0, NULL, buffer, len + 1); - ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "expected S_OK, got 0x%08lx\n", hr);
path = NULL; hr = pSHGetKnownFolderPath(&FOLDERID_ProgramFilesX64, 0, NULL, &path); #ifdef _WIN64 - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(path != NULL, "path not set\n"); CoTaskMemFree(path); #else - todo_wine ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08x\n", hr); + todo_wine ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08lx\n", hr); ok(path == NULL, "path set\n"); #endif
path = NULL; hr = pSHGetKnownFolderPath(&FOLDERID_ProgramFilesCommonX64, 0, NULL, &path); #ifdef _WIN64 - ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "expected S_OK, got 0x%08lx\n", hr); ok(path != NULL, "path not set\n"); CoTaskMemFree(path); #else - todo_wine ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08x\n", hr); + todo_wine ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08lx\n", hr); ok(path == NULL, "path set\n"); #endif } @@ -2063,7 +2063,7 @@ static void check_known_folder(IKnownFolderManager *mgr, KNOWNFOLDERID *folderId
ok_(__FILE__, known_folder->line)(known_folder->attributes == kfd.dwAttributes || (known_folder->csidl & WINE_ATTRIBUTES_OPTIONAL && kfd.dwAttributes == 0), - "invalid known folder attributes for %s: 0x%08x expected, but 0x%08x retrieved\n", known_folder->sFolderId, known_folder->attributes, kfd.dwAttributes); + "invalid known folder attributes for %s: 0x%08lx expected, but 0x%08lx retrieved\n", known_folder->sFolderId, known_folder->attributes, kfd.dwAttributes);
ok_(__FILE__, known_folder->line)(!(kfd.kfdFlags & (~known_folder->definitionFlags)), "invalid known folder flags for %s: 0x%08x expected, but 0x%08x retrieved\n", known_folder->sFolderId, known_folder->definitionFlags, kfd.kfdFlags);
@@ -2073,7 +2073,7 @@ static void check_known_folder(IKnownFolderManager *mgr, KNOWNFOLDERID *folderId { ikf_path = NULL; hr = IKnownFolder_GetPath(folder, KF_FLAG_DEFAULT, &ikf_path); - ok_(__FILE__, known_folder->line)(hr == S_OK, "IKnownFolder::GetPath failed: 0x%08x\n", hr); + ok_(__FILE__, known_folder->line)(hr == S_OK, "IKnownFolder::GetPath failed: 0x%08lx\n", hr); ok_(__FILE__, known_folder->line)(ikf_path != NULL, "SHGetKnownFolderPath gave NULL path\n");
/* IKnownFolder::GetPath and SHGetKnownFolderPath should be the same */ @@ -2088,13 +2088,13 @@ static void check_known_folder(IKnownFolderManager *mgr, KNOWNFOLDERID *folderId debugstr_w(kfd.pszRelativePath), debugstr_w(ikf_path));
hr = IKnownFolderManager_GetFolder(mgr, &kfd.fidParent, &kf_parent); - ok_(__FILE__, known_folder->line)(hr == S_OK, "IKnownFolderManager::GetFolder(parent) failed: 0x%08x\n", hr); + ok_(__FILE__, known_folder->line)(hr == S_OK, "IKnownFolderManager::GetFolder(parent) failed: 0x%08lx\n", hr);
if(SUCCEEDED(hr)) { ikf_parent_path = NULL; hr = IKnownFolder_GetPath(kf_parent, KF_FLAG_DEFAULT, &ikf_parent_path); - ok_(__FILE__, known_folder->line)(hr == S_OK, "IKnownFolder::GetPath(parent) failed: 0x%08x\n", hr); + ok_(__FILE__, known_folder->line)(hr == S_OK, "IKnownFolder::GetPath(parent) failed: 0x%08lx\n", hr);
/* Parent path + pszRelativePath should give the full path */ ok_(__FILE__, known_folder->line)(memcmp(ikf_parent_path, ikf_path, lstrlenW(ikf_parent_path) * sizeof(WCHAR)) == 0, @@ -2151,7 +2151,7 @@ static void check_known_folder(IKnownFolderManager *mgr, KNOWNFOLDERID *folderId trace(" localized name: %s\n", wine_dbgstr_w(kfd.pszLocalizedName)); trace(" icon: %s\n", wine_dbgstr_w(kfd.pszIcon)); trace(" security: %s\n", wine_dbgstr_w(kfd.pszSecurity)); - trace(" attributes: 0x%08x\n", kfd.dwAttributes); + trace(" attributes: 0x%08lx\n", kfd.dwAttributes); trace(" flags: 0x%08x\n", kfd.kfdFlags); trace(" type: %s\n", wine_dbgstr_guid(&kfd.ftidType)); FreeKnownFolderDefinitionFields(&kfd); @@ -2214,96 +2214,96 @@ static void test_knownFolders(void) { IUnknown *unk;
- ok(hr == S_OK, "failed to create KnownFolderManager instance: 0x%08x\n", hr); + ok(hr == S_OK, "failed to create KnownFolderManager instance: 0x%08lx\n", hr);
hr = IKnownFolderManager_QueryInterface(mgr, &IID_IMarshal, (void**)&unk); - ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr); + ok(hr == E_NOINTERFACE, "got 0x%08lx\n", hr);
hr = IKnownFolderManager_FolderIdFromCsidl(mgr, CSIDL_WINDOWS, &folderId); - ok(hr == S_OK, "failed to convert CSIDL to KNOWNFOLDERID: 0x%08x\n", hr); + ok(hr == S_OK, "failed to convert CSIDL to KNOWNFOLDERID: 0x%08lx\n", hr); ok(IsEqualGUID(&folderId, &FOLDERID_Windows)==TRUE, "invalid KNOWNFOLDERID returned\n");
hr = IKnownFolderManager_FolderIdToCsidl(mgr, &FOLDERID_Windows, &csidl); - ok(hr == S_OK, "failed to convert CSIDL to KNOWNFOLDERID: 0x%08x\n", hr); + ok(hr == S_OK, "failed to convert CSIDL to KNOWNFOLDERID: 0x%08lx\n", hr); ok(csidl == CSIDL_WINDOWS, "invalid CSIDL returned\n");
hr = IKnownFolderManager_GetFolder(mgr, &FOLDERID_Windows, &folder); - ok(hr == S_OK, "failed to get known folder: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get known folder: 0x%08lx\n", hr); if(SUCCEEDED(hr)) { hr = IKnownFolder_QueryInterface(folder, &IID_IMarshal, (void**)&unk); - ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr); + ok(hr == E_NOINTERFACE, "got 0x%08lx\n", hr);
hr = IKnownFolder_GetCategory(folder, &cat); - ok(hr == S_OK, "failed to get folder category: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get folder category: 0x%08lx\n", hr); ok(cat==KF_CATEGORY_FIXED, "invalid folder category: %d\n", cat);
hr = IKnownFolder_GetId(folder, &folderId); - ok(hr == S_OK, "failed to get folder id: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get folder id: 0x%08lx\n", hr); ok(IsEqualGUID(&folderId, &FOLDERID_Windows)==TRUE, "invalid KNOWNFOLDERID returned\n");
hr = IKnownFolder_GetPath(folder, 0, &folderPath); - ok(hr == S_OK, "failed to get path from known folder: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get path from known folder: 0x%08lx\n", hr); ok(lstrcmpiW(sWinDir, folderPath)==0, "invalid path returned: "%s", expected: "%s"\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sWinDir)); CoTaskMemFree(folderPath);
hr = IKnownFolder_GetRedirectionCapabilities(folder, &redirectionCapabilities); - ok(hr == S_OK, "failed to get redirection capabilities: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get redirection capabilities: 0x%08lx\n", hr); todo_wine ok(redirectionCapabilities==0, "invalid redirection capabilities returned: %d\n", redirectionCapabilities);
hr = IKnownFolder_SetPath(folder, 0, sWinDir); todo_wine - ok(hr == E_INVALIDARG, "unexpected value from SetPath: 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "unexpected value from SetPath: 0x%08lx\n", hr);
hr = IKnownFolder_GetFolderDefinition(folder, &kfDefinition); - ok(hr == S_OK, "failed to get folder definition: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get folder definition: 0x%08lx\n", hr); if(SUCCEEDED(hr)) { ok(kfDefinition.category==KF_CATEGORY_FIXED, "invalid folder category: 0x%08x\n", kfDefinition.category); ok(lstrcmpW(kfDefinition.pszName, sWindows)==0, "invalid folder name: %s\n", wine_dbgstr_w(kfDefinition.pszName)); - ok(kfDefinition.dwAttributes==0, "invalid folder attributes: %d\n", kfDefinition.dwAttributes); + ok(kfDefinition.dwAttributes==0, "invalid folder attributes: %ld\n", kfDefinition.dwAttributes); FreeKnownFolderDefinitionFields(&kfDefinition); }
hr = IKnownFolder_Release(folder); - ok(hr == S_OK, "failed to release KnownFolder instance: 0x%08x\n", hr); + ok(hr == S_OK, "failed to release KnownFolder instance: 0x%08lx\n", hr); }
hr = IKnownFolderManager_GetFolderByName(mgr, sWindows, &folder); - ok(hr == S_OK, "failed to get known folder: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get known folder: 0x%08lx\n", hr); if(SUCCEEDED(hr)) { hr = IKnownFolder_GetId(folder, &folderId); - ok(hr == S_OK, "failed to get folder id: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get folder id: 0x%08lx\n", hr); ok(IsEqualGUID(&folderId, &FOLDERID_Windows)==TRUE, "invalid KNOWNFOLDERID returned\n");
hr = IKnownFolder_Release(folder); - ok(hr == S_OK, "failed to release KnownFolder instance: 0x%08x\n", hr); + ok(hr == S_OK, "failed to release KnownFolder instance: 0x%08lx\n", hr); }
hr = IKnownFolderManager_GetFolderByName(mgr, sWindows2, &folder); - ok(hr == S_OK, "failed to get known folder: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get known folder: 0x%08lx\n", hr); if(SUCCEEDED(hr)) { hr = IKnownFolder_GetId(folder, &folderId); - ok(hr == S_OK, "failed to get folder id: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get folder id: 0x%08lx\n", hr); ok(IsEqualGUID(&folderId, &FOLDERID_Windows)==TRUE, "invalid KNOWNFOLDERID returned\n");
hr = IKnownFolder_Release(folder); - ok(hr == S_OK, "failed to release KnownFolder instance: 0x%08x\n", hr); + ok(hr == S_OK, "failed to release KnownFolder instance: 0x%08lx\n", hr); }
folder = (IKnownFolder *)0xdeadbeef; hr = IKnownFolderManager_GetFolderByName(mgr, sNoSuch, &folder); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08lx\n", hr); ok(folder == NULL, "got %p\n", folder);
for(i=0; i < ARRAY_SIZE(known_folder_found); ++i) known_folder_found[i] = FALSE;
hr = IKnownFolderManager_GetFolderIds(mgr, &folders, &nCount); - ok(hr == S_OK, "failed to get known folders: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get known folders: 0x%08lx\n", hr); for(i=0;i<nCount;++i) check_known_folder(mgr, &folders[i]);
@@ -2335,24 +2335,24 @@ static void test_knownFolders(void) win_skip("No permissions required to register custom known folder\n"); else { - ok(hr == S_OK, "failed to register known folder: 0x%08x\n", hr); + ok(hr == S_OK, "failed to register known folder: 0x%08lx\n", hr); if(SUCCEEDED(hr)) { hr = IKnownFolderManager_GetFolder(mgr, &newFolderId, &folder); - ok(hr == S_OK, "failed to get known folder: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get known folder: 0x%08lx\n", hr); if(SUCCEEDED(hr)) { hr = IKnownFolder_GetCategory(folder, &cat); - ok(hr == S_OK, "failed to get folder category: hr=0x%0x\n", hr); + ok(hr == S_OK, "failed to get folder category: hr=0x%0lx\n", hr); ok(cat == KF_CATEGORY_PERUSER, "invalid category returned: %d, while %d (KF_CATEGORY_PERUSER) expected\n", cat, KF_CATEGORY_PERUSER);
hr = IKnownFolder_GetId(folder, &folderId); - ok(hr == S_OK, "failed to get folder id: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get folder id: 0x%08lx\n", hr); ok(IsEqualGUID(&folderId, &newFolderId)==TRUE, "invalid KNOWNFOLDERID returned\n");
/* current path should be Temp\Example */ hr = IKnownFolder_GetPath(folder, 0, &folderPath); - ok(hr == S_OK, "failed to get path from known folder: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get path from known folder: 0x%08lx\n", hr); ok(lstrcmpiW(folderPath, sExamplePath)==0, "invalid known folder path retrieved: "%s" when "%s" was expected\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sExamplePath)); CoTaskMemFree(folderPath);
@@ -2368,45 +2368,45 @@ static void test_knownFolders(void) kfSubDefinition.fidParent = newFolderId;
hr = IKnownFolderManager_RegisterFolder(mgr, &subFolderId, &kfSubDefinition); - ok(hr == S_OK, "failed to register known folder: 0x%08x\n", hr); + ok(hr == S_OK, "failed to register known folder: 0x%08lx\n", hr); if(SUCCEEDED(hr)) {
hr = IKnownFolderManager_GetFolder(mgr, &subFolderId, &subFolder); - ok(hr == S_OK, "failed to get known folder: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get known folder: 0x%08lx\n", hr); if(SUCCEEDED(hr)) { /* check sub folder path */ hr = IKnownFolder_GetPath(subFolder, 0, &folderPath); - ok(hr == S_OK, "failed to get known folder path: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get known folder path: 0x%08lx\n", hr); ok(lstrcmpiW(folderPath, sSubFolderPath)==0, "invalid known folder path retrieved: "%s" when "%s" was expected\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sSubFolderPath)); CoTaskMemFree(folderPath);
/* try to redirect Example to Temp\Example2 */ hr = IKnownFolderManager_Redirect(mgr, &newFolderId, NULL, 0, sExample2Path, 0, NULL, &errorMsg); - ok(hr == S_OK, "failed to redirect known folder: 0x%08x, errorMsg: %s\n", hr, wine_dbgstr_w(errorMsg)); + ok(hr == S_OK, "failed to redirect known folder: 0x%08lx, errorMsg: %s\n", hr, wine_dbgstr_w(errorMsg));
/* verify */ hr = IKnownFolder_GetPath(folder, 0, &folderPath); - ok(hr == S_OK, "failed to get known folder path: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get known folder path: 0x%08lx\n", hr); ok(lstrcmpiW(folderPath, sExample2Path)==0, "invalid known folder path retrieved: "%s" when "%s" was expected\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sExample2Path)); CoTaskMemFree(folderPath);
/* verify sub folder - it should fail now, as we redirected its parent folder, but we have no sub folder in new location */ hr = IKnownFolder_GetPath(subFolder, 0, &folderPath); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "unexpected value from GetPath(): 0x%08x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "unexpected value from GetPath(): 0x%08lx\n", hr); ok(folderPath==NULL, "invalid known folder path retrieved: "%s" when NULL pointer was expected\n", wine_dbgstr_w(folderPath)); CoTaskMemFree(folderPath);
/* set Example path to original. Using SetPath() is valid here, as it also uses redirection internally */ hr = IKnownFolder_SetPath(folder, 0, sExamplePath); - ok(hr == S_OK, "SetPath() failed: 0x%08x\n", hr); + ok(hr == S_OK, "SetPath() failed: 0x%08lx\n", hr);
/* verify */ hr = IKnownFolder_GetPath(folder, 0, &folderPath); - ok(hr == S_OK, "failed to get known folder path: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get known folder path: 0x%08lx\n", hr); ok(lstrcmpiW(folderPath, sExamplePath)==0, "invalid known folder path retrieved: "%s" when "%s" was expected\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sExamplePath)); CoTaskMemFree(folderPath);
@@ -2417,11 +2417,11 @@ static void test_knownFolders(void)
/* again perform that same redirection */ hr = IKnownFolderManager_Redirect(mgr, &newFolderId, NULL, 0, sExample2Path, 0, NULL, &errorMsg); - ok(hr == S_OK, "failed to redirect known folder: 0x%08x, errorMsg: %s\n", hr, wine_dbgstr_w(errorMsg)); + ok(hr == S_OK, "failed to redirect known folder: 0x%08lx, errorMsg: %s\n", hr, wine_dbgstr_w(errorMsg));
/* verify sub folder. It should succeed now, as the required sub folder exists */ hr = IKnownFolder_GetPath(subFolder, 0, &folderPath); - ok(hr == S_OK, "failed to get known folder path: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get known folder path: 0x%08lx\n", hr); ok(lstrcmpiW(folderPath, sSubFolder2Path)==0, "invalid known folder path retrieved: "%s" when "%s" was expected\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sSubFolder2Path)); CoTaskMemFree(folderPath);
@@ -2431,7 +2431,7 @@ static void test_knownFolders(void) /* verify subfolder. It still succeeds, so Windows does not check folder presence each time */ hr = IKnownFolder_GetPath(subFolder, 0, &folderPath); todo_wine - ok(hr == S_OK, "failed to get known folder path: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get known folder path: 0x%08lx\n", hr); todo_wine ok(lstrcmpiW(folderPath, sSubFolder2Path)==0, "invalid known folder path retrieved: "%s" when "%s" was expected\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sSubFolder2Path)); CoTaskMemFree(folderPath); @@ -2439,17 +2439,17 @@ static void test_knownFolders(void)
/* set Example path to original */ hr = IKnownFolder_SetPath(folder, 0, sExamplePath); - ok(hr == S_OK, "SetPath() failed: 0x%08x\n", hr); + ok(hr == S_OK, "SetPath() failed: 0x%08lx\n", hr);
/* verify */ hr = IKnownFolder_GetPath(folder, 0, &folderPath); - ok(hr == S_OK, "failed to get known folder path: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get known folder path: 0x%08lx\n", hr); ok(lstrcmpiW(folderPath, sExamplePath)==0, "invalid known folder path retrieved: "%s" when "%s" was expected\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sExamplePath)); CoTaskMemFree(folderPath);
/* verify sub folder */ hr = IKnownFolder_GetPath(subFolder, 0, &folderPath); - ok(hr == S_OK, "failed to get known folder path: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get known folder path: 0x%08lx\n", hr); ok(lstrcmpiW(folderPath, sSubFolderPath)==0, "invalid known folder path retrieved: "%s" when "%s" was expected\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sSubFolderPath)); CoTaskMemFree(folderPath);
@@ -2460,17 +2460,17 @@ static void test_knownFolders(void)
/* do that same redirection, but try to exclude sub-folder */ hr = IKnownFolderManager_Redirect(mgr, &newFolderId, NULL, 0, sExample2Path, 1, &subFolderId, &errorMsg); - ok(hr == S_OK, "failed to redirect known folder: 0x%08x, errorMsg: %s\n", hr, wine_dbgstr_w(errorMsg)); + ok(hr == S_OK, "failed to redirect known folder: 0x%08lx, errorMsg: %s\n", hr, wine_dbgstr_w(errorMsg));
/* verify */ hr = IKnownFolder_GetPath(folder, 0, &folderPath); - ok(hr == S_OK, "failed to get known folder path: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get known folder path: 0x%08lx\n", hr); ok(lstrcmpiW(folderPath, sExample2Path)==0, "invalid known folder path retrieved: "%s" when "%s" was expected\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sExample2Path)); CoTaskMemFree(folderPath);
/* verify sub folder. Unexpectedly, this path was also changed. So, exclusion seems to be ignored (Windows bug)? This test however will let us know, if this behavior is changed */ hr = IKnownFolder_GetPath(subFolder, 0, &folderPath); - ok(hr == S_OK, "failed to get known folder path: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get known folder path: 0x%08lx\n", hr); ok(lstrcmpiW(folderPath, sSubFolder2Path)==0, "invalid known folder path retrieved: "%s" when "%s" was expected\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sSubFolder2Path)); CoTaskMemFree(folderPath);
@@ -2480,34 +2480,34 @@ static void test_knownFolders(void)
/* set Example path to original */ hr = IKnownFolder_SetPath(folder, 0, sExamplePath); - ok(hr == S_OK, "SetPath() failed: 0x%08x\n", hr); + ok(hr == S_OK, "SetPath() failed: 0x%08lx\n", hr);
/* verify */ hr = IKnownFolder_GetPath(folder, 0, &folderPath); - ok(hr == S_OK, "failed to get known folder path: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get known folder path: 0x%08lx\n", hr); ok(lstrcmpiW(folderPath, sExamplePath)==0, "invalid known folder path retrieved: "%s" when "%s" was expected\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sExamplePath)); CoTaskMemFree(folderPath);
/* verify sub folder */ hr = IKnownFolder_GetPath(subFolder, 0, &folderPath); - ok(hr == S_OK, "failed to get known folder path: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get known folder path: 0x%08lx\n", hr); ok(lstrcmpiW(folderPath, sSubFolderPath)==0, "invalid known folder path retrieved: "%s" when "%s" was expected\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sSubFolderPath)); CoTaskMemFree(folderPath);
/* do that same redirection again, but set it to copy content. It should also copy the sub folder, so checking it would succeed now */ hr = IKnownFolderManager_Redirect(mgr, &newFolderId, NULL, KF_REDIRECT_COPY_CONTENTS, sExample2Path, 0, NULL, &errorMsg); - ok(hr == S_OK, "failed to redirect known folder: 0x%08x, errorMsg: %s\n", hr, wine_dbgstr_w(errorMsg)); + ok(hr == S_OK, "failed to redirect known folder: 0x%08lx, errorMsg: %s\n", hr, wine_dbgstr_w(errorMsg));
/* verify */ hr = IKnownFolder_GetPath(folder, 0, &folderPath); - ok(hr == S_OK, "failed to get known folder path: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get known folder path: 0x%08lx\n", hr); ok(lstrcmpiW(folderPath, sExample2Path)==0, "invalid known folder path retrieved: "%s" when "%s" was expected\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sExample2Path)); CoTaskMemFree(folderPath);
/* verify sub folder */ hr = IKnownFolder_GetPath(subFolder, 0, &folderPath); - ok(hr == S_OK, "failed to get known folder path: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get known folder path: 0x%08lx\n", hr); ok(lstrcmpiW(folderPath, sSubFolder2Path)==0, "invalid known folder path retrieved: "%s" when "%s" was expected\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sSubFolder2Path)); CoTaskMemFree(folderPath);
@@ -2517,55 +2517,55 @@ static void test_knownFolders(void)
/* set Example path to original */ hr = IKnownFolder_SetPath(folder, 0, sExamplePath); - ok(hr == S_OK, "SetPath() failed: 0x%08x\n", hr); + ok(hr == S_OK, "SetPath() failed: 0x%08lx\n", hr);
/* verify */ hr = IKnownFolder_GetPath(folder, 0, &folderPath); - ok(hr == S_OK, "failed to get known folder path: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get known folder path: 0x%08lx\n", hr); ok(lstrcmpiW(folderPath, sExamplePath)==0, "invalid known folder path retrieved: "%s" when "%s" was expected\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sExamplePath)); CoTaskMemFree(folderPath);
/* verify sub folder */ hr = IKnownFolder_GetPath(subFolder, 0, &folderPath); - ok(hr == S_OK, "failed to get known folder path: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get known folder path: 0x%08lx\n", hr); ok(lstrcmpiW(folderPath, sSubFolderPath)==0, "invalid known folder path retrieved: "%s" when "%s" was expected\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sSubFolderPath)); CoTaskMemFree(folderPath);
/* redirect again, set it to copy content and remove originals */ hr = IKnownFolderManager_Redirect(mgr, &newFolderId, NULL, KF_REDIRECT_COPY_CONTENTS | KF_REDIRECT_DEL_SOURCE_CONTENTS, sExample2Path, 0, NULL, &errorMsg); - ok(hr == S_OK, "failed to redirect known folder: 0x%08x, errorMsg: %s\n", hr, wine_dbgstr_w(errorMsg)); + ok(hr == S_OK, "failed to redirect known folder: 0x%08lx, errorMsg: %s\n", hr, wine_dbgstr_w(errorMsg));
/* verify */ hr = IKnownFolder_GetPath(folder, 0, &folderPath); - ok(hr == S_OK, "failed to get known folder path: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get known folder path: 0x%08lx\n", hr); ok(lstrcmpiW(folderPath, sExample2Path)==0, "invalid known folder path retrieved: "%s" when "%s" was expected\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sExample2Path)); CoTaskMemFree(folderPath);
/* verify sub folder */ hr = IKnownFolder_GetPath(subFolder, 0, &folderPath); - ok(hr == S_OK, "failed to get known folder path: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get known folder path: 0x%08lx\n", hr); ok(lstrcmpiW(folderPath, sSubFolder2Path)==0, "invalid known folder path retrieved: "%s" when "%s" was expected\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sSubFolder2Path)); CoTaskMemFree(folderPath);
/* check if original directory was really removed */ dwAttributes = GetFileAttributesW(sExamplePath); - ok(dwAttributes==INVALID_FILE_ATTRIBUTES, "directory should not exist, but has attributes: 0x%08x\n", dwAttributes ); + ok(dwAttributes==INVALID_FILE_ATTRIBUTES, "directory should not exist, but has attributes: 0x%08lx\n", dwAttributes );
/* redirect (with copy) to original path */ hr = IKnownFolderManager_Redirect(mgr, &newFolderId, NULL, KF_REDIRECT_COPY_CONTENTS, sExamplePath, 0, NULL, &errorMsg); - ok(hr == S_OK, "failed to redirect known folder: 0x%08x, errorMsg: %s\n", hr, wine_dbgstr_w(errorMsg)); + ok(hr == S_OK, "failed to redirect known folder: 0x%08lx, errorMsg: %s\n", hr, wine_dbgstr_w(errorMsg));
/* verify */ hr = IKnownFolder_GetPath(folder, 0, &folderPath); - ok(hr == S_OK, "failed to get known folder path: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get known folder path: 0x%08lx\n", hr); ok(lstrcmpiW(folderPath, sExamplePath)==0, "invalid known folder path retrieved: "%s" when "%s" was expected\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sExamplePath)); CoTaskMemFree(folderPath);
/* verify sub folder */ hr = IKnownFolder_GetPath(subFolder, 0, &folderPath); - ok(hr == S_OK, "failed to get known folder path: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get known folder path: 0x%08lx\n", hr); ok(lstrcmpiW(folderPath, sSubFolderPath)==0, "invalid known folder path retrieved: "%s" when "%s" was expected\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sSubFolderPath)); CoTaskMemFree(folderPath);
@@ -2578,63 +2578,63 @@ static void test_knownFolders(void) /* try to get current known folder path */ hr = pSHGetKnownFolderPath(&newFolderId, 0, NULL, &folderPath); todo_wine - ok(hr==S_OK, "cannot get known folder path: hr=0x%0x\n", hr); + ok(hr==S_OK, "cannot get known folder path: hr=0x%0lx\n", hr); todo_wine ok(lstrcmpW(folderPath, sExamplePath)==0, "invalid path returned: %s\n", wine_dbgstr_w(folderPath));
/* set it to new value */ hr = pSHSetKnownFolderPath(&newFolderId, 0, NULL, sExample2Path); todo_wine - ok(hr==S_OK, "cannot set known folder path: hr=0x%0x\n", hr); + ok(hr==S_OK, "cannot set known folder path: hr=0x%0lx\n", hr);
/* check if it changed */ hr = pSHGetKnownFolderPath(&newFolderId, 0, NULL, &folderPath); todo_wine - ok(hr==S_OK, "cannot get known folder path: hr=0x%0x\n", hr); + ok(hr==S_OK, "cannot get known folder path: hr=0x%0lx\n", hr); todo_wine ok(lstrcmpW(folderPath, sExample2Path)==0, "invalid path returned: %s\n", wine_dbgstr_w(folderPath));
/* set it back */ hr = pSHSetKnownFolderPath(&newFolderId, 0, NULL, sExamplePath); todo_wine - ok(hr==S_OK, "cannot set known folder path: hr=0x%0x\n", hr); + ok(hr==S_OK, "cannot set known folder path: hr=0x%0lx\n", hr); }
IKnownFolder_Release(subFolder); }
hr = IKnownFolderManager_UnregisterFolder(mgr, &subFolderId); - ok(hr == S_OK, "failed to unregister folder: 0x%08x\n", hr); + ok(hr == S_OK, "failed to unregister folder: 0x%08lx\n", hr); }
FreeKnownFolderDefinitionFields(&kfSubDefinition);
hr = IKnownFolder_Release(folder); - ok(hr == S_OK, "failed to release KnownFolder instance: 0x%08x\n", hr); + ok(hr == S_OK, "failed to release KnownFolder instance: 0x%08lx\n", hr);
/* update the folder */ CoTaskMemFree(kfDefinition.pszName); kfDefinition.pszName = CoTaskMemAlloc(sizeof(sExample2)); lstrcpyW(kfDefinition.pszName, sExample2); hr = IKnownFolderManager_RegisterFolder(mgr, &newFolderId, &kfDefinition); - ok(hr == S_OK, "failed to re-register known folder: 0x%08x\n", hr); + ok(hr == S_OK, "failed to re-register known folder: 0x%08lx\n", hr);
hr = IKnownFolderManager_GetFolder(mgr, &newFolderId, &folder); - ok(hr == S_OK, "failed to get known folder: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get known folder: 0x%08lx\n", hr);
hr = IKnownFolder_GetFolderDefinition(folder, &kfSubDefinition); - ok(hr == S_OK, "failed to get folder definition: 0x%08x\n", hr); + ok(hr == S_OK, "failed to get folder definition: 0x%08lx\n", hr); ok(!memcmp(kfDefinition.pszName, kfSubDefinition.pszName, sizeof(sExample2)), "Got wrong updated name: %s\n", wine_dbgstr_w(kfSubDefinition.pszName));
FreeKnownFolderDefinitionFields(&kfSubDefinition);
hr = IKnownFolder_Release(folder); - ok(hr == S_OK, "failed to release KnownFolder instance: 0x%08x\n", hr); + ok(hr == S_OK, "failed to release KnownFolder instance: 0x%08lx\n", hr); }
hr = IKnownFolderManager_UnregisterFolder(mgr, &newFolderId); - ok(hr == S_OK, "failed to unregister folder: 0x%08x\n", hr); + ok(hr == S_OK, "failed to unregister folder: 0x%08lx\n", hr); } } FreeKnownFolderDefinitionFields(&kfDefinition); @@ -2645,7 +2645,7 @@ static void test_knownFolders(void) RemoveDirectoryW(sExample2Path);
hr = IKnownFolderManager_Release(mgr); - ok(hr == S_OK, "failed to release KnownFolderManager instance: 0x%08x\n", hr); + ok(hr == S_OK, "failed to release KnownFolderManager instance: 0x%08lx\n", hr); } CoUninitialize(); } @@ -2695,14 +2695,14 @@ static void test_DoEnvironmentSubst(void) return; } ok(HIWORD(res) && (LOWORD(res) == res2), - "got %d/%d (expected TRUE/%d)\n", HIWORD(res), LOWORD(res), res2); + "got %d/%d (expected TRUE/%ld)\n", HIWORD(res), LOWORD(res), res2); ok(!lstrcmpA(bufferA, expectedA), "got %s (expected %s)\n", bufferA, expectedA);
res2 = ExpandEnvironmentStringsW(bufferW, expectedW, MAX_PATH); res = DoEnvironmentSubstW(bufferW, MAX_PATH); ok(HIWORD(res) && (LOWORD(res) == res2), - "got %d/%d (expected TRUE/%d)\n", HIWORD(res), LOWORD(res), res2); + "got %d/%d (expected TRUE/%ld)\n", HIWORD(res), LOWORD(res), res2); ok(!lstrcmpW(bufferW, expectedW), "got %s (expected %s)\n", wine_dbgstr_w(bufferW), wine_dbgstr_w(expectedW)); winetest_pop_context(); @@ -2720,14 +2720,14 @@ static void test_DoEnvironmentSubst(void) res2 = ExpandEnvironmentStringsA(bufferA, expectedA, MAX_PATH); res = DoEnvironmentSubstA(bufferA, len + 1); ok(HIWORD(res) && (LOWORD(res) == res2), - "+1: got %d/%d (expected TRUE/%d)\n", HIWORD(res), LOWORD(res), res2); + "+1: got %d/%d (expected TRUE/%ld)\n", HIWORD(res), LOWORD(res), res2); ok(!lstrcmpA(bufferA, expectedA), "+1: got %s (expected %s)\n", bufferA, expectedA);
res2 = ExpandEnvironmentStringsW(bufferW, expectedW, MAX_PATH); res = DoEnvironmentSubstW(bufferW, len + 1); ok(HIWORD(res) && (LOWORD(res) == res2), - "+1: got %d/%d (expected TRUE/%d)\n", HIWORD(res), LOWORD(res), res2); + "+1: got %d/%d (expected TRUE/%ld)\n", HIWORD(res), LOWORD(res), res2); ok(!lstrcmpW(bufferW, expectedW), "+1: got %s (expected %s)\n", wine_dbgstr_w(bufferW), wine_dbgstr_w(expectedW));
@@ -2741,7 +2741,7 @@ static void test_DoEnvironmentSubst(void) /* ANSI version failed without an extra byte, as documented on msdn */ res = DoEnvironmentSubstA(bufferA, len); ok(!HIWORD(res) && (LOWORD(res) == len), - " 0: got %d/%d (expected FALSE/%d)\n", HIWORD(res), LOWORD(res), len); + " 0: got %d/%d (expected FALSE/%ld)\n", HIWORD(res), LOWORD(res), len); ok(!lstrcmpA(bufferA, names[i]), " 0: got %s (expected %s)\n", bufferA, names[i]);
@@ -2749,7 +2749,7 @@ static void test_DoEnvironmentSubst(void) res2 = ExpandEnvironmentStringsW(bufferW, expectedW, MAX_PATH); res = DoEnvironmentSubstW(bufferW, len); ok(HIWORD(res) && (LOWORD(res) == res2), - " 0: got %d/%d (expected TRUE/%d)\n", HIWORD(res), LOWORD(res), res2); + " 0: got %d/%d (expected TRUE/%ld)\n", HIWORD(res), LOWORD(res), res2); ok(!lstrcmpW(bufferW, expectedW), " 0: got %s (expected %s)\n", wine_dbgstr_w(bufferW), wine_dbgstr_w(expectedW));
@@ -2763,14 +2763,14 @@ static void test_DoEnvironmentSubst(void)
res = DoEnvironmentSubstA(bufferA, len - 1); ok(!HIWORD(res) && (LOWORD(res) == (len - 1)), - "-1: got %d/%d (expected FALSE/%d)\n", HIWORD(res), LOWORD(res), len - 1); + "-1: got %d/%d (expected FALSE/%ld)\n", HIWORD(res), LOWORD(res), len - 1); ok(!lstrcmpA(bufferA, names[i]), "-1: got %s (expected %s)\n", bufferA, names[i]);
lstrcpyW(expectedW, bufferW); res = DoEnvironmentSubstW(bufferW, len - 1); ok(!HIWORD(res) && (LOWORD(res) == (len - 1)), - "-1: got %d/%d (expected FALSE/%d)\n", HIWORD(res), LOWORD(res), len - 1); + "-1: got %d/%d (expected FALSE/%ld)\n", HIWORD(res), LOWORD(res), len - 1); ok(!lstrcmpW(bufferW, expectedW), "-1: got %s (expected %s)\n", wine_dbgstr_w(bufferW), wine_dbgstr_w(expectedW));
@@ -2785,13 +2785,13 @@ static void test_DoEnvironmentSubst(void) res2 = lstrlenA(does_not_existA) + 1; res = DoEnvironmentSubstA(bufferA, MAX_PATH); ok(HIWORD(res) && (LOWORD(res) == res2), - "%d: got %d/%d (expected TRUE/%d)\n", i, HIWORD(res), LOWORD(res), res2); + "%d: got %d/%d (expected TRUE/%ld)\n", i, HIWORD(res), LOWORD(res), res2); ok(!lstrcmpA(bufferA, does_not_existA), "%d: got %s (expected %s)\n", i, bufferA, does_not_existA);
res = DoEnvironmentSubstW(bufferW, MAX_PATH); ok(HIWORD(res) && (LOWORD(res) == res2), - "%d: got %d/%d (expected TRUE/%d)\n", i, HIWORD(res), LOWORD(res), res2); + "%d: got %d/%d (expected TRUE/%ld)\n", i, HIWORD(res), LOWORD(res), res2); ok(!lstrcmpW(bufferW, does_not_existW), "%d: got %s (expected %s)\n", i, wine_dbgstr_w(bufferW), wine_dbgstr_w(does_not_existW));
@@ -2895,7 +2895,7 @@ static void test_SHGetKnownFolderIDList(void) }
hr = pSHGetKnownFolderIDList(NULL, 0, NULL, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
if (0) { /* crashes on native */ pidl = (void*)0xdeadbeef; @@ -2904,36 +2904,36 @@ if (0) { /* crashes on native */ /* not a known folder */ pidl = (void*)0xdeadbeef; hr = pSHGetKnownFolderIDList(&IID_IUnknown, 0, NULL, &pidl); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08lx\n", hr); ok(pidl == NULL, "got %p\n", pidl);
hr = pSHGetKnownFolderIDList(&FOLDERID_Desktop, 0, NULL, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
pidl = (void*)0xdeadbeef; hr = pSHGetKnownFolderIDList(&FOLDERID_Desktop, 0, NULL, &pidl); - ok(hr == S_OK, "SHGetKnownFolderIDList failed: 0x%08x\n", hr); + ok(hr == S_OK, "SHGetKnownFolderIDList failed: 0x%08lx\n", hr); ok(ILIsEmpty(pidl), "pidl should be empty.\n"); ok(pidl->mkid.cb == 0, "get wrong value: %d\n", pidl->mkid.cb); ILFree(pidl);
pidl = (void*)0xdeadbeef; hr = pSHGetKnownFolderIDList(&FOLDERID_Desktop, KF_FLAG_NO_ALIAS, NULL, &pidl); - ok(hr == S_OK, "SHGetKnownFolderIDList failed: 0x%08x\n", hr); + ok(hr == S_OK, "SHGetKnownFolderIDList failed: 0x%08lx\n", hr); todo_wine ok(!ILIsEmpty(pidl), "pidl should not be empty.\n"); todo_wine ok(pidl->mkid.cb == 20, "get wrong value: %d\n", pidl->mkid.cb); ILFree(pidl);
pidl = (void*)0xdeadbeef; hr = pSHGetKnownFolderIDList(&FOLDERID_Documents, 0, NULL, &pidl); - ok(hr == S_OK, "SHGetKnownFolderIDList failed: 0x%08x\n", hr); + ok(hr == S_OK, "SHGetKnownFolderIDList failed: 0x%08lx\n", hr); ok(!ILIsEmpty(pidl), "pidl should not be empty.\n"); ok(pidl->mkid.cb == 20, "get wrong value: %d\n", pidl->mkid.cb); ILFree(pidl);
pidl = (void*)0xdeadbeef; hr = pSHGetKnownFolderIDList(&FOLDERID_Documents, KF_FLAG_NO_ALIAS, NULL, &pidl); - ok(hr == S_OK, "SHGetKnownFolderIDList failed: 0x%08x\n", hr); + ok(hr == S_OK, "SHGetKnownFolderIDList failed: 0x%08lx\n", hr); ok(!ILIsEmpty(pidl), "pidl should not be empty.\n"); ok(pidl->mkid.cb == 20, "get wrong value: %d\n", pidl->mkid.cb); ILFree(pidl); @@ -3051,7 +3051,7 @@ static void test_PathResolve(void) if (!tests[i].expected) ok(GetLastError() == ERROR_FILE_NOT_FOUND || broken(GetLastError() == ERROR_PATH_NOT_FOUND /* some win 8.1 & 10 */), - "expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); + "expected ERROR_FILE_NOT_FOUND, got %ld\n", GetLastError()); winetest_pop_context(); }
diff --git a/dlls/shell32/tests/shfldr_special.c b/dlls/shell32/tests/shfldr_special.c index b73759ed0f8..cc0bb20ff33 100644 --- a/dlls/shell32/tests/shfldr_special.c +++ b/dlls/shell32/tests/shfldr_special.c @@ -57,19 +57,19 @@ static void test_parse_for_entire_network(void) DWORD expected_attr;
hr = SHGetDesktopFolder(&psfDesktop); - ok(hr == S_OK, "SHGetDesktopFolder failed with error 0x%x\n", hr); + ok(hr == S_OK, "SHGetDesktopFolder failed with error 0x%lx\n", hr);
hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, my_network_places_path, &eaten, &pidl, &attr); - ok(hr == S_OK, "IShellFolder_ParseDisplayName failed with error 0x%x\n", hr); + ok(hr == S_OK, "IShellFolder_ParseDisplayName failed with error 0x%lx\n", hr); todo_wine - ok(eaten == 0xdeadbeef, "eaten should not have been set to %u\n", eaten); + ok(eaten == 0xdeadbeef, "eaten should not have been set to %lu\n", eaten); expected_attr = SFGAO_HASSUBFOLDER|SFGAO_FOLDER|SFGAO_FILESYSANCESTOR|SFGAO_DROPTARGET|SFGAO_HASPROPSHEET|SFGAO_CANRENAME|SFGAO_CANLINK; todo_wine ok((attr == expected_attr) || /* Win9x, NT4 */ (attr == (expected_attr | SFGAO_STREAM)) || /* W2K */ (attr == (expected_attr | SFGAO_CANDELETE)) || /* XP, W2K3 */ (attr == (expected_attr | SFGAO_CANDELETE | SFGAO_NONENUMERATED)), /* Vista */ - "Unexpected attributes : %08x\n", attr); + "Unexpected attributes : %08lx\n", attr);
ILFree(pidl);
@@ -86,15 +86,15 @@ static void test_parse_for_entire_network(void) win_skip("'EntireNetwork' is not available on Win9x, NT4 and Vista\n"); return; } - ok(hr == S_OK, "IShellFolder_ParseDisplayName failed with error 0x%x\n", hr); + ok(hr == S_OK, "IShellFolder_ParseDisplayName failed with error 0x%lx\n", hr); todo_wine - ok(eaten == 0xdeadbeef, "eaten should not have been set to %u\n", eaten); + ok(eaten == 0xdeadbeef, "eaten should not have been set to %lu\n", eaten); expected_attr = SFGAO_HASSUBFOLDER|SFGAO_FOLDER|SFGAO_FILESYSANCESTOR|SFGAO_HASPROPSHEET|SFGAO_CANLINK; todo_wine ok(attr == expected_attr || /* winme, nt4 */ attr == (expected_attr | SFGAO_STREAM) || /* win2k */ attr == (expected_attr | SFGAO_STORAGEANCESTOR), /* others */ - "attr should be 0x%x, not 0x%x\n", expected_attr, attr); + "attr should be 0x%lx, not 0x%lx\n", expected_attr, attr);
ILFree(pidl); } @@ -113,18 +113,18 @@ static void test_parse_for_control_panel(void) DWORD attr = ~0;
hr = SHGetDesktopFolder(&psfDesktop); - ok(hr == S_OK, "SHGetDesktopFolder failed with error 0x%x\n", hr); + ok(hr == S_OK, "SHGetDesktopFolder failed with error 0x%lx\n", hr);
hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, control_panel_path, &eaten, &pidl, &attr); - ok(hr == S_OK, "IShellFolder_ParseDisplayName failed with error 0x%x\n", hr); - todo_wine ok(eaten == 0xdeadbeef, "eaten should not have been set to %u\n", eaten); + ok(hr == S_OK, "IShellFolder_ParseDisplayName failed with error 0x%lx\n", hr); + todo_wine ok(eaten == 0xdeadbeef, "eaten should not have been set to %lu\n", eaten); todo_wine ok((attr == (SFGAO_CANLINK | SFGAO_FOLDER)) || /* Win9x, NT4 */ (attr == (SFGAO_CANLINK | SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_STREAM)) || /* W2K */ (attr == (SFGAO_CANLINK | SFGAO_FOLDER | SFGAO_HASSUBFOLDER)) || /* W2K, XP, W2K3 */ (attr == (SFGAO_CANLINK | SFGAO_NONENUMERATED)) || /* Vista */ (attr == SFGAO_CANLINK), /* Vista, W2K8 */ - "Unexpected attributes : %08x\n", attr); + "Unexpected attributes : %08lx\n", attr);
ILFree(pidl); IShellFolder_Release(psfDesktop); @@ -160,14 +160,14 @@ if (0)
/* 5 columns defined */ hr = IShellFolder2_GetDetailsOf(folder, NULL, 6, &details); - ok(hr == E_NOTIMPL, "got 0x%08x\n", hr); + ok(hr == E_NOTIMPL, "got 0x%08lx\n", hr);
hr = IShellFolder2_GetDefaultColumnState(folder, 6, &state); - ok(broken(hr == E_NOTIMPL) || hr == E_INVALIDARG /* Win7 */, "got 0x%08x\n", hr); + ok(broken(hr == E_NOTIMPL) || hr == E_INVALIDARG /* Win7 */, "got 0x%08lx\n", hr);
details.str.u.pOleStr = NULL; hr = IShellFolder2_GetDetailsOf(folder, NULL, 0, &details); - ok(hr == S_OK || broken(hr == E_NOTIMPL) /* W2K */, "got 0x%08x\n", hr); + ok(hr == S_OK || broken(hr == E_NOTIMPL) /* W2K */, "got 0x%08lx\n", hr); if (SHELL_OsIsUnicode()) SHFree(details.str.u.pOleStr);
/* test every column if method is implemented */ @@ -178,7 +178,7 @@ if (0) for(i = 0; i < 6; i++) { hr = IShellFolder2_GetDetailsOf(folder, NULL, i, &details); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* all columns are left-aligned */ ok(details.fmt == LVCFMT_LEFT, "got 0x%x\n", details.fmt); @@ -187,33 +187,33 @@ if (0) if (SHELL_OsIsUnicode()) SHFree(details.str.u.pOleStr);
hr = IShellFolder2_GetDefaultColumnState(folder, i, &state); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); /* all columns are string except document count */ if (i == 1) - ok(state == (SHCOLSTATE_TYPE_INT | SHCOLSTATE_ONBYDEFAULT), "got 0x%x\n", state); + ok(state == (SHCOLSTATE_TYPE_INT | SHCOLSTATE_ONBYDEFAULT), "got 0x%lx\n", state); else - ok(state == (SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT), "got 0x%x\n", state); + ok(state == (SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT), "got 0x%lx\n", state); } }
/* default pidl */ hr = IShellFolder2_QueryInterface(folder, &IID_IPersistFolder2, (void**)&pf); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* not initialized */ pidl1 = (void*)0xdeadbeef; hr = IPersistFolder2_GetCurFolder(pf, &pidl1); - ok(hr == S_FALSE, "got 0x%08x\n", hr); + ok(hr == S_FALSE, "got 0x%08lx\n", hr); ok(pidl1 == NULL, "got %p\n", pidl1);
hr = SHGetSpecialFolderLocation(NULL, CSIDL_PRINTERS, &pidl2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IPersistFolder2_Initialize(pf, pidl2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IPersistFolder2_GetCurFolder(pf, &pidl1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
ok(ILIsEqual(pidl1, pidl2), "expected same PIDL\n"); IPersistFolder2_Release(pf); @@ -231,10 +231,10 @@ static void test_desktop_folder(void) HRESULT hr;
hr = SHGetDesktopFolder(&psf); - ok(hr == S_OK, "Got %x\n", hr); + ok(hr == S_OK, "Got %lx\n", hr);
hr = IShellFolder_QueryInterface(psf, &IID_IShellFolder, NULL); - ok(hr == E_POINTER, "Got %x\n", hr); + ok(hr == E_POINTER, "Got %lx\n", hr);
IShellFolder_Release(psf); } @@ -255,7 +255,7 @@ static void test_desktop_displaynameof(void) UINT i;
hr = SHGetDesktopFolder(&desktop); - ok(hr == S_OK, "SHGetDesktopFolder failed with error 0x%08x\n", hr); + ok(hr == S_OK, "SHGetDesktopFolder failed with error 0x%08lx\n", hr); if (FAILED(hr)) return;
for (i = 0; i < ARRAY_SIZE(folders); i++) @@ -263,26 +263,26 @@ static void test_desktop_displaynameof(void) WCHAR name1[MAX_PATH], name2[MAX_PATH];
hr = IShellFolder_ParseDisplayName(desktop, NULL, NULL, folders[i], &eaten, &pidl, NULL); - ok(hr == S_OK, "IShellFolder::ParseDisplayName failed with error 0x%08x\n", hr); + ok(hr == S_OK, "IShellFolder::ParseDisplayName failed with error 0x%08lx\n", hr); if (FAILED(hr)) continue;
hr = IShellFolder_GetDisplayNameOf(desktop, pidl, SHGDN_INFOLDER, &strret); - ok(hr == S_OK, "IShellFolder::GetDisplayNameOf failed with error 0x%08x\n", hr); + ok(hr == S_OK, "IShellFolder::GetDisplayNameOf failed with error 0x%08lx\n", hr); hr = StrRetToBufW(&strret, pidl, name1, ARRAY_SIZE(name1)); - ok(hr == S_OK, "StrRetToBuf failed with error 0x%08x\n", hr); + ok(hr == S_OK, "StrRetToBuf failed with error 0x%08lx\n", hr);
hr = IShellFolder_GetDisplayNameOf(desktop, pidl, SHGDN_INFOLDER | SHGDN_FORPARSING | SHGDN_FORADDRESSBAR, &strret); - ok(hr == S_OK, "IShellFolder::GetDisplayNameOf failed with error 0x%08x\n", hr); + ok(hr == S_OK, "IShellFolder::GetDisplayNameOf failed with error 0x%08lx\n", hr); hr = StrRetToBufW(&strret, pidl, name2, ARRAY_SIZE(name2)); - ok(hr == S_OK, "StrRetToBuf failed with error 0x%08x\n", hr); + ok(hr == S_OK, "StrRetToBuf failed with error 0x%08lx\n", hr);
ok(!lstrcmpW(name1, name2), "the display names are not equal: %s vs %s\n", wine_dbgstr_w(name1), wine_dbgstr_w(name2)); ok(name1[0] != ':' || name1[1] != ':', "display name is a GUID: %s\n", wine_dbgstr_w(name1));
hr = IShellFolder_GetDisplayNameOf(desktop, pidl, SHGDN_INFOLDER | SHGDN_FORPARSING, &strret); - ok(hr == S_OK, "IShellFolder::GetDisplayNameOf failed with error 0x%08x\n", hr); + ok(hr == S_OK, "IShellFolder::GetDisplayNameOf failed with error 0x%08lx\n", hr); hr = StrRetToBufW(&strret, pidl, name1, ARRAY_SIZE(name1)); - ok(hr == S_OK, "StrRetToBuf failed with error 0x%08x\n", hr); + ok(hr == S_OK, "StrRetToBuf failed with error 0x%08lx\n", hr);
ok(lstrcmpW(name1, name2), "the display names are equal: %s\n", wine_dbgstr_w(name1)); ok(name1[0] == ':' && name1[1] == ':', "display name is not a GUID: %s\n", wine_dbgstr_w(name1)); diff --git a/dlls/shell32/tests/shlexec.c b/dlls/shell32/tests/shlexec.c index e319dfb6fa7..cea7245f387 100644 --- a/dlls/shell32/tests/shlexec.c +++ b/dlls/shell32/tests/shlexec.c @@ -157,7 +157,7 @@ static HDDEDATA CALLBACK ddeCb(UINT uType, UINT uFmt, HCONV hConv, DWORD size = 0;
if (winetest_debug > 2) - trace("dde_cb: %04x, %04x, %p, %p, %p, %p, %08lx, %08lx\n", + trace("dde_cb: %04x, %04x, %p, %p, %p, %p, %08Ix, %08Ix\n", uType, uFmt, hConv, hsz1, hsz2, hData, dwData1, dwData2);
switch (uType) @@ -166,7 +166,7 @@ static HDDEDATA CALLBACK ddeCb(UINT uType, UINT uFmt, HCONV hConv, if (!DdeCmpStringHandles(hsz1, hszTopic)) { size = DdeQueryStringA(ddeInst, hsz2, ddeApplication, MAX_PATH, CP_WINANSI); - ok(size < MAX_PATH, "got size %d\n", size); + ok(size < MAX_PATH, "got size %ld\n", size); assert(size < MAX_PATH); return (HDDEDATA)TRUE; } @@ -174,7 +174,7 @@ static HDDEDATA CALLBACK ddeCb(UINT uType, UINT uFmt, HCONV hConv,
case XTYP_EXECUTE: size = DdeGetData(hData, (LPBYTE)ddeExec, MAX_PATH, 0); - ok(size < MAX_PATH, "got size %d\n", size); + ok(size < MAX_PATH, "got size %ld\n", size); assert(size < MAX_PATH); DdeFreeDataHandle(hData); if (post_quit_on_execute) @@ -239,7 +239,7 @@ static void doChild(int argc, char** argv) *buffer = '\0'; SetLastError(0); GetEnvironmentVariableA("ShlexecVar", buffer, sizeof(buffer)); - childPrintf(hFile, "ShlexecVarLE=%d\r\n", GetLastError()); + childPrintf(hFile, "ShlexecVarLE=%ld\r\n", GetLastError()); childPrintf(hFile, "ShlexecVar=%s\r\n", encodeA(buffer));
map = OpenFileMappingA(FILE_MAP_READ, FALSE, "winetest_shlexec_dde_map"); @@ -266,7 +266,7 @@ static void doChild(int argc, char** argv) hszTopic = DdeCreateStringHandleA(ddeInst, shared_block, CP_WINANSI); ok(hszTopic != NULL, "DdeCreateStringHandleA(%s) = NULL\n", shared_block); hdde = DdeNameService(ddeInst, hszApplication, 0, DNS_REGISTER | DNS_FILTEROFF); - ok(hdde != NULL, "DdeNameService() failed le=%u\n", GetLastError()); + ok(hdde != NULL, "DdeNameService() failed le=%lu\n", GetLastError());
timer = SetTimer(NULL, 0, CHILD_DDE_TIMEOUT, childTimeout);
@@ -277,14 +277,14 @@ static void doChild(int argc, char** argv) while (GetMessageA(&msg, NULL, 0, 0)) { if (winetest_debug > 2) - trace("msg %d lParam=%ld wParam=%lu\n", msg.message, msg.lParam, msg.wParam); + trace("msg %d lParam=%Id wParam=%Iu\n", msg.message, msg.lParam, msg.wParam); DispatchMessageA(&msg); }
Sleep(500); KillTimer(NULL, timer); hdde = DdeNameService(ddeInst, hszApplication, 0, DNS_UNREGISTER); - ok(hdde != NULL, "DdeNameService() failed le=%u\n", GetLastError()); + ok(hdde != NULL, "DdeNameService() failed le=%lu\n", GetLastError()); ok(DdeFreeStringHandle(ddeInst, hszTopic), "DdeFreeStringHandle(topic)\n"); ok(DdeFreeStringHandle(ddeInst, hszApplication), "DdeFreeStringHandle(application)\n"); ok(DdeUninitialize(ddeInst), "DdeUninitialize() failed\n"); @@ -301,7 +301,7 @@ static void doChild(int argc, char** argv) childPrintf(hFile, "ddeExec=%s\r\n", encodeA(ddeExec)); }
- childPrintf(hFile, "Failures=%d\r\n", winetest_get_failures()); + childPrintf(hFile, "Failures=%ld\r\n", winetest_get_failures()); CloseHandle(hFile);
init_event(filename); @@ -561,7 +561,7 @@ static INT_PTR shell_execute_(const char* file, int line, LPCSTR verb, LPCSTR fi bad_shellexecute = 1; okShell_(file, line)(rc == rcEmpty || broken(rc != rcEmpty && rcEmpty == SE_ERR_NOASSOC) /* NT4 */, - "Got different return value with empty string: %lu %lu\n", rc, rcEmpty); + "Got different return value with empty string: %Iu %Iu\n", rc, rcEmpty); }
return rc; @@ -583,7 +583,7 @@ static INT_PTR shell_execute_ex_(const char* file, int line, mask |= SEE_MASK_NOCLOSEPROCESS | SEE_MASK_NO_CONSOLE;
strcpy(shell_call, "ShellExecuteEx("); - sprintf(smask, "0x%x", mask); + sprintf(smask, "0x%lx", mask); strcat_param(shell_call, "mask", smask); strcat_param(shell_call, "verb", verb); strcat_param(shell_call, "file", filename); @@ -616,7 +616,7 @@ static INT_PTR shell_execute_ex_(const char* file, int line, success=ShellExecuteExA(&sei); rc=(INT_PTR)sei.hInstApp; okShell_(file, line)((success && rc > 32) || (!success && rc <= 32), - "rc=%d and hInstApp=%ld is not allowed\n", + "rc=%d and hInstApp=%Id is not allowed\n", success, rc);
if (rc > 32) @@ -626,18 +626,18 @@ static INT_PTR shell_execute_ex_(const char* file, int line, { wait_rc=WaitForSingleObject(sei.hProcess, 5000); okShell_(file, line)(wait_rc==WAIT_OBJECT_0, - "WaitForSingleObject(hProcess) returned %d\n", + "WaitForSingleObject(hProcess) returned %ld\n", wait_rc); wait_rc = GetExitCodeProcess(sei.hProcess, &rc); - okShell_(file, line)(wait_rc, "GetExitCodeProcess() failed le=%u\n", GetLastError()); + okShell_(file, line)(wait_rc, "GetExitCodeProcess() failed le=%lu\n", GetLastError()); todo_wine_if(_todo_wait) - okShell_(file, line)(rc == 0, "child returned %u\n", rc); + okShell_(file, line)(rc == 0, "child returned %lu\n", rc); CloseHandle(sei.hProcess); } wait_rc=WaitForSingleObject(hEvent, 5000); todo_wine_if(_todo_wait) okShell_(file, line)(wait_rc==WAIT_OBJECT_0, - "WaitForSingleObject returned %d\n", wait_rc); + "WaitForSingleObject returned %ld\n", wait_rc); } else okShell_(file, line)(sei.hProcess==NULL, @@ -690,19 +690,19 @@ static BOOL create_test_class(const char* class, BOOL protocol) KEY_CREATE_SUB_KEY | KEY_SET_VALUE, NULL, &hkey, NULL); ok(rc == ERROR_SUCCESS || rc == ERROR_ACCESS_DENIED, - "could not create class %s (rc=%d)\n", class, rc); + "could not create class %s (rc=%ld)\n", class, rc); if (rc != ERROR_SUCCESS) return FALSE;
if (protocol) { rc = RegSetValueExA(hkey, "URL Protocol", 0, REG_SZ, (LPBYTE)"", 1); - ok(rc == ERROR_SUCCESS, "RegSetValueEx '%s' failed, expected ERROR_SUCCESS, got %d\n", class, rc); + ok(rc == ERROR_SUCCESS, "RegSetValueEx '%s' failed, expected ERROR_SUCCESS, got %ld\n", class, rc); }
rc = RegCreateKeyExA(hkey, "shell", 0, NULL, 0, KEY_CREATE_SUB_KEY, NULL, &hkey_shell, NULL); - ok(rc == ERROR_SUCCESS, "RegCreateKeyEx 'shell' failed, expected ERROR_SUCCESS, got %d\n", rc); + ok(rc == ERROR_SUCCESS, "RegCreateKeyEx 'shell' failed, expected ERROR_SUCCESS, got %ld\n", rc);
CloseHandle(hkey); CloseHandle(hkey_shell); @@ -719,12 +719,12 @@ static BOOL create_test_association(const char* extension) rc=RegCreateKeyExA(HKEY_CLASSES_ROOT, extension, 0, NULL, 0, KEY_SET_VALUE, NULL, &hkey, NULL); ok(rc == ERROR_SUCCESS || rc == ERROR_ACCESS_DENIED, - "could not create association %s (rc=%d)\n", class, rc); + "could not create association %s (rc=%ld)\n", class, rc); if (rc != ERROR_SUCCESS) return FALSE;
rc=RegSetValueExA(hkey, NULL, 0, REG_SZ, (LPBYTE) class, strlen(class)+1); - ok(rc==ERROR_SUCCESS, "RegSetValueEx '%s' failed, expected ERROR_SUCCESS, got %d\n", class, rc); + ok(rc==ERROR_SUCCESS, "RegSetValueEx '%s' failed, expected ERROR_SUCCESS, got %ld\n", class, rc); CloseHandle(hkey);
return create_test_class(class, FALSE); @@ -835,15 +835,15 @@ static void create_test_verb_dde(const char* classname, const char* verb, sprintf(shell, "%s\shell", classname); rc=RegOpenKeyExA(HKEY_CLASSES_ROOT, shell, 0, KEY_CREATE_SUB_KEY, &hkey_shell); - ok(rc == ERROR_SUCCESS, "%s key creation failed with %d\n", shell, rc); + ok(rc == ERROR_SUCCESS, "%s key creation failed with %ld\n", shell, rc);
rc=RegCreateKeyExA(hkey_shell, verb, 0, NULL, 0, KEY_CREATE_SUB_KEY, NULL, &hkey_verb, NULL); - ok(rc == ERROR_SUCCESS, "%s verb key creation failed with %d\n", verb, rc); + ok(rc == ERROR_SUCCESS, "%s verb key creation failed with %ld\n", verb, rc);
rc=RegCreateKeyExA(hkey_verb, "command", 0, NULL, 0, KEY_SET_VALUE, NULL, &hkey_cmd, NULL); - ok(rc == ERROR_SUCCESS, "'command' key creation failed with %d\n", rc); + ok(rc == ERROR_SUCCESS, "'command' key creation failed with %ld\n", rc);
if (rawcmd) { @@ -854,7 +854,7 @@ static void create_test_verb_dde(const char* classname, const char* verb, cmd = heap_alloc(strlen(argv0) + 10 + strlen(child_file) + 2 + strlen(cmdtail) + 1); sprintf(cmd,"%s shlexec "%s" %s", argv0, child_file, cmdtail); rc=RegSetValueExA(hkey_cmd, NULL, 0, REG_SZ, (LPBYTE)cmd, strlen(cmd)+1); - ok(rc == ERROR_SUCCESS, "setting command failed with %d\n", rc); + ok(rc == ERROR_SUCCESS, "setting command failed with %ld\n", rc); heap_free(cmd); }
@@ -864,40 +864,40 @@ static void create_test_verb_dde(const char* classname, const char* verb,
rc=RegCreateKeyExA(hkey_verb, "ddeexec", 0, NULL, 0, KEY_SET_VALUE | KEY_CREATE_SUB_KEY, NULL, &hkey_ddeexec, NULL); - ok(rc == ERROR_SUCCESS, "'ddeexec' key creation failed with %d\n", rc); + ok(rc == ERROR_SUCCESS, "'ddeexec' key creation failed with %ld\n", rc); rc=RegSetValueExA(hkey_ddeexec, NULL, 0, REG_SZ, (LPBYTE)ddeexec, strlen(ddeexec)+1); - ok(rc == ERROR_SUCCESS, "set value failed with %d\n", rc); + ok(rc == ERROR_SUCCESS, "set value failed with %ld\n", rc);
if (application) { rc=RegCreateKeyExA(hkey_ddeexec, "application", 0, NULL, 0, KEY_SET_VALUE, NULL, &hkey_application, NULL); - ok(rc == ERROR_SUCCESS, "'application' key creation failed with %d\n", rc); + ok(rc == ERROR_SUCCESS, "'application' key creation failed with %ld\n", rc);
rc=RegSetValueExA(hkey_application, NULL, 0, REG_SZ, (LPBYTE)application, strlen(application)+1); - ok(rc == ERROR_SUCCESS, "set value failed with %d\n", rc); + ok(rc == ERROR_SUCCESS, "set value failed with %ld\n", rc); CloseHandle(hkey_application); } if (topic) { rc=RegCreateKeyExA(hkey_ddeexec, "topic", 0, NULL, 0, KEY_SET_VALUE, NULL, &hkey_topic, NULL); - ok(rc == ERROR_SUCCESS, "'topic' key creation failed with %d\n", rc); + ok(rc == ERROR_SUCCESS, "'topic' key creation failed with %ld\n", rc); rc=RegSetValueExA(hkey_topic, NULL, 0, REG_SZ, (LPBYTE)topic, strlen(topic)+1); - ok(rc == ERROR_SUCCESS, "set value failed with %d\n", rc); + ok(rc == ERROR_SUCCESS, "set value failed with %ld\n", rc); CloseHandle(hkey_topic); } if (ifexec) { rc=RegCreateKeyExA(hkey_ddeexec, "ifexec", 0, NULL, 0, KEY_SET_VALUE, NULL, &hkey_ifexec, NULL); - ok(rc == ERROR_SUCCESS, "'ifexec' key creation failed with %d\n", rc); + ok(rc == ERROR_SUCCESS, "'ifexec' key creation failed with %ld\n", rc); rc=RegSetValueExA(hkey_ifexec, NULL, 0, REG_SZ, (LPBYTE)ifexec, strlen(ifexec)+1); - ok(rc == ERROR_SUCCESS, "set value failed with %d\n", rc); + ok(rc == ERROR_SUCCESS, "set value failed with %ld\n", rc); CloseHandle(hkey_ifexec); } CloseHandle(hkey_ddeexec); @@ -1103,48 +1103,48 @@ static void test_lpFile_parsed(void) /* existing "drawback_file.noassoc" prevents finding "drawback_file.noassoc foo.shlexec" on Wine */ sprintf(fileA, "%s\drawback_file.noassoc foo.shlexec", tmpdir); rc=shell_execute(NULL, fileA, NULL, NULL); - okShell(rc > 32, "failed: rc=%lu\n", rc); + okShell(rc > 32, "failed: rc=%Iu\n", rc);
/* if quoted, existing "drawback_file.noassoc" does not prevent finding "drawback_file.noassoc foo.shlexec" on Wine */ sprintf(fileA, ""%s\drawback_file.noassoc foo.shlexec"", tmpdir); rc=shell_execute(NULL, fileA, NULL, NULL); okShell(rc > 32 || broken(rc == SE_ERR_FNF) /* Win95/NT4 */, - "failed: rc=%lu\n", rc); + "failed: rc=%Iu\n", rc);
/* error should be SE_ERR_FNF, not SE_ERR_NOASSOC */ sprintf(fileA, ""%s\drawback_file.noassoc" foo.shlexec", tmpdir); rc=shell_execute(NULL, fileA, NULL, NULL); - okShell(rc == SE_ERR_FNF, "returned %lu\n", rc); + okShell(rc == SE_ERR_FNF, "returned %Iu\n", rc);
/* ""command"" not works on wine (and real win9x and w2k) */ sprintf(fileA, """%s\simple.shlexec""", tmpdir); rc=shell_execute(NULL, fileA, NULL, NULL); todo_wine okShell(rc > 32 || broken(rc == SE_ERR_FNF) /* Win9x/2000 */, - "failed: rc=%lu\n", rc); + "failed: rc=%Iu\n", rc);
/* nonexistent "drawback_nonexist.noassoc" does not prevent finding "drawback_nonexist.noassoc foo.shlexec" on Wine */ sprintf(fileA, "%s\drawback_nonexist.noassoc foo.shlexec", tmpdir); rc=shell_execute(NULL, fileA, NULL, NULL); - okShell(rc > 32, "failed: rc=%lu\n", rc); + okShell(rc > 32, "failed: rc=%Iu\n", rc);
/* is SEE_MASK_DOENVSUBST default flag? Should only be when XP emulates 9x (XP bug or real 95 or ME behavior ?) */ rc=shell_execute(NULL, "%TMPDIR%\simple.shlexec", NULL, NULL); - todo_wine okShell(rc == SE_ERR_FNF, "returned %lu\n", rc); + todo_wine okShell(rc == SE_ERR_FNF, "returned %Iu\n", rc);
/* quoted */ rc=shell_execute(NULL, ""%TMPDIR%\simple.shlexec"", NULL, NULL); - todo_wine okShell(rc == SE_ERR_FNF, "returned %lu\n", rc); + todo_wine okShell(rc == SE_ERR_FNF, "returned %Iu\n", rc);
/* test SEE_MASK_DOENVSUBST works */ rc=shell_execute_ex(SEE_MASK_DOENVSUBST | SEE_MASK_FLAG_NO_UI, NULL, "%TMPDIR%\simple.shlexec", NULL, NULL, NULL); - okShell(rc > 32, "failed: rc=%lu\n", rc); + okShell(rc > 32, "failed: rc=%Iu\n", rc);
/* quoted lpFile does not work on real win95 and nt4 */ rc=shell_execute_ex(SEE_MASK_DOENVSUBST | SEE_MASK_FLAG_NO_UI, NULL, ""%TMPDIR%\simple.shlexec"", NULL, NULL, NULL); okShell(rc > 32 || broken(rc == SE_ERR_FNF) /* Win95/NT4 */, - "failed: rc=%lu\n", rc); + "failed: rc=%Iu\n", rc); }
typedef struct @@ -1376,12 +1376,12 @@ static void test_commandline2argv(void) SetLastError(0xdeadbeef); args = CommandLineToArgvW(exeW, NULL); le = GetLastError(); - ok(args == NULL && le == ERROR_INVALID_PARAMETER, "expected NULL with ERROR_INVALID_PARAMETER got %p with %u\n", args, le); + ok(args == NULL && le == ERROR_INVALID_PARAMETER, "expected NULL with ERROR_INVALID_PARAMETER got %p with %lu\n", args, le);
SetLastError(0xdeadbeef); args = CommandLineToArgvW(NULL, NULL); le = GetLastError(); - ok(args == NULL && le == ERROR_INVALID_PARAMETER, "expected NULL with ERROR_INVALID_PARAMETER got %p with %u\n", args, le); + ok(args == NULL && le == ERROR_INVALID_PARAMETER, "expected NULL with ERROR_INVALID_PARAMETER got %p with %lu\n", args, le);
*strW = 0; args = CommandLineToArgvW(strW, &numargs); @@ -1558,7 +1558,7 @@ static void test_argify(void)
/* We need NOZONECHECKS on Win2003 to block a dialog */ rc=shell_execute_ex(SEE_MASK_NOZONECHECKS, NULL, argv0, params, NULL, NULL); - okShell(rc > 32, "failed: rc=%lu\n", rc); + okShell(rc > 32, "failed: rc=%Iu\n", rc); okChildInt("argcA", 4); okChildPath("argvA3", fileA);
@@ -1584,7 +1584,7 @@ static void test_argify(void) bad = test->broken ? test->broken : test->cmd;
rc = shell_execute_ex(SEE_MASK_DOENVSUBST, test->verb, fileA, test->params, NULL, NULL); - okShell(rc > 32, "failed: rc=%lu\n", rc); + okShell(rc > 32, "failed: rc=%Iu\n", rc);
cmd = getChildString("Child", "cmdlineA"); /* Our commands are such that the verb immediately precedes the @@ -1652,7 +1652,7 @@ static void test_filename(void) rc=33; okShell(rc==test->rc || broken(quotedfile && rc == SE_ERR_FNF), /* NT4 */ - "failed: rc=%ld err=%u\n", rc, GetLastError()); + "failed: rc=%Id err=%lu\n", rc, GetLastError()); if (rc == 33) { const char* verb; @@ -1675,7 +1675,7 @@ static void test_filename(void) if (rc > 32) rc=33; todo_wine_if(test->todo & 0x1) - okShell(rc==test->rc, "failed: rc=%ld err=%u\n", rc, GetLastError()); + okShell(rc==test->rc, "failed: rc=%Id err=%lu\n", rc, GetLastError()); if (rc==0) { int count; @@ -1719,7 +1719,7 @@ static void test_filename(void) */ sprintf(filename, ""%s\test file.shlexec"", tmpdir); rc=shell_execute(NULL, filename, NULL, NULL); - okShell(rc > 32, "failed: rc=%ld err=%u\n", rc, GetLastError()); + okShell(rc > 32, "failed: rc=%Id err=%lu\n", rc, GetLastError()); okChildInt("argcA", 5); okChildString("argvA3", "Open"); sprintf(filename, "%s\test file.shlexec", tmpdir); @@ -1728,7 +1728,7 @@ static void test_filename(void)
sprintf(filename, ""%s\test file.sha"", tmpdir); rc=shell_execute(NULL, filename, NULL, NULL); - todo_wine okShell(rc > 32, "failed: rc=%ld err=%u\n", rc, GetLastError()); + todo_wine okShell(rc > 32, "failed: rc=%Id err=%lu\n", rc, GetLastError()); okChildInt("argcA", 5); todo_wine okChildString("argvA3", "averb"); sprintf(filename, "%s\test file.sha", tmpdir); @@ -1827,7 +1827,7 @@ static void test_fileurls(void)
/* Test it first with FindExecutable() */ rc = (INT_PTR)FindExecutableA(fileurl, NULL, command); - ok(rc == SE_ERR_FNF, "FindExecutable(%s) failed: bad rc=%lu\n", fileurl, rc); + ok(rc == SE_ERR_FNF, "FindExecutable(%s) failed: bad rc=%Iu\n", fileurl, rc);
/* Then ShellExecute() */ if ((test->todo & 0x10) == 0) @@ -1842,14 +1842,14 @@ static void test_fileurls(void) if (test->flags & URL_SUCCESS) { todo_wine_if(test->todo & 0x1) - okShell(rc > 32, "failed: bad rc=%lu\n", rc); + okShell(rc > 32, "failed: bad rc=%Iu\n", rc); } else { todo_wine_if(test->todo & 0x1) okShell(rc == SE_ERR_FNF || rc == SE_ERR_PNF || broken(rc == SE_ERR_ACCESSDENIED) /* win2000 */, - "failed: bad rc=%lu\n", rc); + "failed: bad rc=%Iu\n", rc); } if (rc == 33) { @@ -1884,15 +1884,15 @@ static void test_urls(void) /* Protocols must be properly declared */ rc = shell_execute(NULL, "notaproto://foo", NULL, NULL); ok(rc == SE_ERR_NOASSOC || broken(rc == SE_ERR_ACCESSDENIED), - "%s returned %lu\n", shell_call, rc); + "%s returned %Iu\n", shell_call, rc);
rc = shell_execute(NULL, "fakeproto://foo/bar", NULL, NULL); todo_wine ok(rc == SE_ERR_NOASSOC || broken(rc == SE_ERR_ACCESSDENIED), - "%s returned %lu\n", shell_call, rc); + "%s returned %Iu\n", shell_call, rc);
/* Here's a real live one */ rc = shell_execute(NULL, "shlproto://foo/bar", NULL, NULL); - ok(rc > 32, "%s failed: rc=%lu\n", shell_call, rc); + ok(rc > 32, "%s failed: rc=%Iu\n", shell_call, rc); okChildInt("argcA", 5); okChildString("argvA3", "URL"); okChildString("argvA4", "shlproto://foo/bar"); @@ -1901,7 +1901,7 @@ static void test_urls(void) rc = shell_execute(NULL, "shlpaverb://foo/bar", NULL, NULL); todo_wine ok(rc > 32 || /* XP+IE7 - Win10 */ broken(rc == SE_ERR_NOASSOC), /* XP+IE6 */ - "%s failed: rc=%lu\n", shell_call, rc); + "%s failed: rc=%Iu\n", shell_call, rc); if (rc > 32) { okChildInt("argcA", 5); @@ -1913,7 +1913,7 @@ static void test_urls(void) rc = shell_execute("averb", "shlproto://foo/bar", NULL, NULL); ok(rc > 32 || /* Win8 - Win10 */ broken(rc == SE_ERR_ACCESSDENIED), /* XP - Win7 */ - "%s failed: rc=%lu\n", shell_call, rc); + "%s failed: rc=%Iu\n", shell_call, rc); if (rc > 32) { okChildString("argvA3", "AVerb"); @@ -1922,21 +1922,21 @@ static void test_urls(void)
/* A .lnk ending does not turn a URL into a shortcut */ rc = shell_execute(NULL, "shlproto://foo/bar.lnk", NULL, NULL); - ok(rc > 32, "%s failed: rc=%lu\n", shell_call, rc); + ok(rc > 32, "%s failed: rc=%Iu\n", shell_call, rc); okChildInt("argcA", 5); okChildString("argvA3", "URL"); okChildString("argvA4", "shlproto://foo/bar.lnk");
/* Neither does a .exe extension */ rc = shell_execute(NULL, "shlproto://foo/bar.exe", NULL, NULL); - ok(rc > 32, "%s failed: rc=%lu\n", shell_call, rc); + ok(rc > 32, "%s failed: rc=%Iu\n", shell_call, rc); okChildInt("argcA", 5); okChildString("argvA3", "URL"); okChildString("argvA4", "shlproto://foo/bar.exe");
/* But a class name overrides it */ rc = shell_execute(NULL, "shlproto://foo/bar", "shlexec.shlexec", NULL); - ok(rc > 32, "%s failed: rc=%lu\n", shell_call, rc); + ok(rc > 32, "%s failed: rc=%Iu\n", shell_call, rc); okChildInt("argcA", 5); okChildString("argvA3", "URL"); okChildString("argvA4", "shlproto://foo/bar"); @@ -1944,7 +1944,7 @@ static void test_urls(void) /* Environment variables are expanded in URLs (but not in file URLs!) */ rc = shell_execute_ex(SEE_MASK_DOENVSUBST | SEE_MASK_FLAG_NO_UI, NULL, "shlproto://%TMPDIR%/bar", NULL, NULL, NULL); - okShell(rc > 32, "failed: rc=%lu\n", rc); + okShell(rc > 32, "failed: rc=%Iu\n", rc); okChildInt("argcA", 5); sprintf(url, "shlproto://%s/bar", tmpdir); okChildString("argvA3", "URL"); @@ -1953,7 +1953,7 @@ static void test_urls(void) /* But only after the path has been identified as a URL */ SetEnvironmentVariableA("urlprefix", "shlproto:///"); rc = shell_execute(NULL, "%urlprefix%foo", NULL, NULL); - todo_wine ok(rc == SE_ERR_FNF, "%s returned %lu\n", shell_call, rc); + todo_wine ok(rc == SE_ERR_FNF, "%s returned %Iu\n", shell_call, rc); SetEnvironmentVariableA("urlprefix", NULL);
delete_test_class("fakeproto"); @@ -1981,7 +1981,7 @@ static void test_find_executable(void) if (0) /* Can crash on Vista! */ { rc=(INT_PTR)FindExecutableA(NULL, NULL, command); - ok(rc == SE_ERR_FNF || rc > 32 /* nt4 */, "FindExecutable(NULL) returned %ld\n", rc); + ok(rc == SE_ERR_FNF || rc > 32 /* nt4 */, "FindExecutable(NULL) returned %Id\n", rc); ok(strcmp(command, "your word") != 0, "FindExecutable(NULL) returned command=[%s]\n", command); }
@@ -1991,30 +1991,30 @@ static void test_find_executable(void) /* Search for something that should be in the system-wide search path (no default directory) */ strcpy(command, "your word"); rc=(INT_PTR)FindExecutableA("notepad.exe", NULL, command); - ok(rc > 32, "FindExecutable(%s) returned %ld\n", "notepad.exe", rc); + ok(rc > 32, "FindExecutable(%s) returned %Id\n", "notepad.exe", rc); ok(strcasecmp(command, notepad_path) == 0, "FindExecutable(%s) returned command=[%s]\n", "notepad.exe", command);
/* Search for something that should be in the system-wide search path (with default directory) */ strcpy(command, "your word"); rc=(INT_PTR)FindExecutableA("notepad.exe", tmpdir, command); - ok(rc > 32, "FindExecutable(%s) returned %ld\n", "notepad.exe", rc); + ok(rc > 32, "FindExecutable(%s) returned %Id\n", "notepad.exe", rc); ok(strcasecmp(command, notepad_path) == 0, "FindExecutable(%s) returned command=[%s]\n", "notepad.exe", command);
strcpy(command, "your word"); rc=(INT_PTR)FindExecutableA(tmpdir, NULL, command); - ok(rc == SE_ERR_NOASSOC /* >= win2000 */ || rc > 32 /* win98, nt4 */, "FindExecutable(NULL) returned %ld\n", rc); + ok(rc == SE_ERR_NOASSOC /* >= win2000 */ || rc > 32 /* win98, nt4 */, "FindExecutable(NULL) returned %Id\n", rc); ok(strcmp(command, "your word") != 0, "FindExecutable(NULL) returned command=[%s]\n", command);
sprintf(filename, "%s\test file.sfe", tmpdir); rc=(INT_PTR)FindExecutableA(filename, NULL, command); - ok(rc > 32, "FindExecutable(%s) returned %ld\n", filename, rc); + ok(rc > 32, "FindExecutable(%s) returned %Id\n", filename, rc); /* Depending on the platform, command could be '%1' or 'test file.sfe' */
rc=(INT_PTR)FindExecutableA("test file.sfe", tmpdir, command); - ok(rc > 32, "FindExecutable(%s) returned %ld\n", filename, rc); + ok(rc > 32, "FindExecutable(%s) returned %Id\n", filename, rc);
rc=(INT_PTR)FindExecutableA("test file.sfe", NULL, command); - ok(rc == SE_ERR_FNF, "FindExecutable(%s) returned %ld\n", filename, rc); + ok(rc == SE_ERR_FNF, "FindExecutable(%s) returned %Id\n", filename, rc);
delete_test_association(".sfe");
@@ -2027,7 +2027,7 @@ static void test_find_executable(void)
sprintf(filename, "%s\test file.shl", tmpdir); rc=(INT_PTR)FindExecutableA(filename, NULL, command); - ok(rc == SE_ERR_FNF /* NT4 */ || rc > 32, "FindExecutable(%s) returned %ld\n", filename, rc); + ok(rc == SE_ERR_FNF /* NT4 */ || rc > 32, "FindExecutable(%s) returned %Id\n", filename, rc);
sprintf(filename, "%s\test file.shlfoo", tmpdir); rc=(INT_PTR)FindExecutableA(filename, NULL, command); @@ -2075,7 +2075,7 @@ static void test_find_executable(void) if (rc > 32) rc=33; todo_wine_if(test->todo & 0x10) - ok(rc==test->rc, "FindExecutable(%s) failed: rc=%ld\n", filename, rc); + ok(rc==test->rc, "FindExecutable(%s) failed: rc=%Id\n", filename, rc); if (rc > 32) { BOOL equal; @@ -2121,7 +2121,7 @@ static void test_lnks(void) /* Should open through our association */ sprintf(filename, "%s\test_shortcut_shlexec.lnk", tmpdir); rc=shell_execute_ex(SEE_MASK_NOZONECHECKS, NULL, filename, NULL, NULL, NULL); - okShell(rc > 32, "failed: rc=%lu err=%u\n", rc, GetLastError()); + okShell(rc > 32, "failed: rc=%Iu err=%lu\n", rc, GetLastError()); okChildInt("argcA", 5); okChildString("argvA3", "Open"); sprintf(params, "%s\test file.shlexec", tmpdir); @@ -2129,7 +2129,7 @@ static void test_lnks(void) okChildPath("argvA4", filename);
rc=shell_execute_ex(SEE_MASK_NOZONECHECKS|SEE_MASK_DOENVSUBST, NULL, "%TMPDIR%\test_shortcut_shlexec.lnk", NULL, NULL, NULL); - okShell(rc > 32, "failed: rc=%lu err=%u\n", rc, GetLastError()); + okShell(rc > 32, "failed: rc=%Iu err=%lu\n", rc, GetLastError()); okChildInt("argcA", 5); okChildString("argvA3", "Open"); sprintf(params, "%s\test file.shlexec", tmpdir); @@ -2140,7 +2140,7 @@ static void test_lnks(void) /* Should just run our executable */ sprintf(filename, "%s\test_shortcut_exe.lnk", tmpdir); rc=shell_execute_ex(SEE_MASK_NOZONECHECKS, NULL, filename, NULL, NULL, NULL); - okShell(rc > 32, "failed: rc=%lu err=%u\n", rc, GetLastError()); + okShell(rc > 32, "failed: rc=%Iu err=%lu\n", rc, GetLastError()); okChildInt("argcA", 4); okChildString("argvA3", "Lnk");
@@ -2148,7 +2148,7 @@ static void test_lnks(void) { /* An explicit class overrides lnk's ContextMenuHandler */ rc=shell_execute_ex(SEE_MASK_CLASSNAME | SEE_MASK_NOZONECHECKS, NULL, filename, NULL, NULL, "shlexec.shlexec"); - okShell(rc > 32, "failed: rc=%lu err=%u\n", rc, GetLastError()); + okShell(rc > 32, "failed: rc=%Iu err=%lu\n", rc, GetLastError()); okChildInt("argcA", 5); okChildString("argvA3", "Open"); okChildPath("argvA4", filename); @@ -2169,7 +2169,7 @@ static void test_lnks(void) c++; } rc=shell_execute_ex(SEE_MASK_NOZONECHECKS, NULL, filename, NULL, NULL, NULL); - okShell(rc > 32, "failed: rc=%lu err=%u\n", rc, GetLastError()); + okShell(rc > 32, "failed: rc=%Iu err=%lu\n", rc, GetLastError()); okChildInt("argcA", 4); okChildString("argvA3", "Lnk"); } @@ -2186,7 +2186,7 @@ static void test_lnks(void) if (rc > 32) rc=33; todo_wine_if(test->todo & 0x1) - okShell(rc==test->rc, "failed: rc=%lu err=%u\n", rc, GetLastError()); + okShell(rc==test->rc, "failed: rc=%Iu err=%lu\n", rc, GetLastError()); if (rc==0) { todo_wine_if(test->todo & 0x2) @@ -2212,7 +2212,7 @@ static void test_exes(void) /* We need NOZONECHECKS on Win2003 to block a dialog */ rc=shell_execute_ex(SEE_MASK_NOZONECHECKS, NULL, argv0, params, NULL, NULL); - okShell(rc > 32, "returned %lu\n", rc); + okShell(rc > 32, "returned %Iu\n", rc); okChildInt("argcA", 4); okChildString("argvA3", "Exec");
@@ -2223,7 +2223,7 @@ static void test_exes(void) { rc=shell_execute(NULL, filename, params, NULL); todo_wine { - okShell(rc==SE_ERR_NOASSOC, "returned %lu\n", rc); + okShell(rc==SE_ERR_NOASSOC, "returned %Iu\n", rc); } } } @@ -2235,16 +2235,16 @@ static void test_exes(void) /* test combining executable and parameters */ sprintf(filename, "%s shlexec "%s" Exec", argv0, child_file); rc = shell_execute(NULL, filename, NULL, NULL); - okShell(rc == SE_ERR_FNF, "returned %lu\n", rc); + okShell(rc == SE_ERR_FNF, "returned %Iu\n", rc);
sprintf(filename, ""%s" shlexec "%s" Exec", argv0, child_file); rc = shell_execute(NULL, filename, NULL, NULL); - okShell(rc == SE_ERR_FNF, "returned %lu\n", rc); + okShell(rc == SE_ERR_FNF, "returned %Iu\n", rc);
/* A verb, even if invalid, overrides the normal handling of executables */ todo_wait rc = shell_execute_ex(SEE_MASK_FLAG_NO_UI, "notaverb", argv0, NULL, NULL, NULL); - todo_wine okShell(rc == SE_ERR_NOASSOC, "returned %lu\n", rc); + todo_wine okShell(rc == SE_ERR_NOASSOC, "returned %Iu\n", rc);
if (!skip_shlexec_tests) { @@ -2252,7 +2252,7 @@ static void test_exes(void) /* FIXME SEE_MASK_FLAG_NO_UI is only needed due to Wine's bug */ rc = shell_execute_ex(SEE_MASK_CLASSNAME | SEE_MASK_FLAG_NO_UI, NULL, argv0, NULL, NULL, ".shlexec"); - todo_wine okShell(rc > 32, "returned %lu\n", rc); + todo_wine okShell(rc > 32, "returned %Iu\n", rc); okChildInt("argcA", 5); todo_wine okChildString("argvA3", "Open"); todo_wine okChildPath("argvA4", argv0); @@ -2304,7 +2304,7 @@ static DWORD WINAPI hooked_WaitForInputIdle(HANDLE process, DWORD timeout) { waitforinputidle_count++; if (winetest_debug > 1) - trace("WaitForInputIdle() waiting for dde event timeout=min(%u,5s)\n", timeout); + trace("WaitForInputIdle() waiting for dde event timeout=min(%lu,5s)\n", timeout); timeout = timeout < 5000 ? timeout : 5000; return WaitForSingleObject(dde_ready_event, timeout); } @@ -2444,7 +2444,7 @@ static void test_dde(void) Sleep(CHILD_DDE_TIMEOUT); continue; } - okShell(32 < rc, "failed: rc=%lu err=%u\n", rc, GetLastError()); + okShell(32 < rc, "failed: rc=%Iu err=%lu\n", rc, GetLastError()); if (test->ddeexec) okShell(waitforinputidle_count == 1 || broken(waitforinputidle_count == 0) /* Win10 race */, @@ -2564,7 +2564,7 @@ static void test_dde_default_app(void) ddeInst = 0; rc = DdeInitializeA(&ddeInst, ddeCb, CBF_SKIP_ALLNOTIFICATIONS | CBF_FAIL_ADVISES | CBF_FAIL_POKES | CBF_FAIL_REQUESTS, 0); - ok(rc == DMLERR_NO_ERROR, "got %lx\n", rc); + ok(rc == DMLERR_NO_ERROR, "got %Ix\n", rc);
sprintf(filename, "%s\test file.sde", tmpdir);
@@ -2621,7 +2621,7 @@ static void test_dde_default_app(void) }
todo_wine_if(test->todo & 0x1) - okShell(rc==test->rc[which], "failed: rc=%lu err=%u\n", + okShell(rc==test->rc[which], "failed: rc=%Iu err=%lu\n", rc, GetLastError()); if (rc == 33) { @@ -2664,7 +2664,7 @@ static void init_test(void) { dllver.cbSize=sizeof(dllver); pDllGetVersion(&dllver); - trace("major=%d minor=%d build=%d platform=%d\n", + trace("major=%ld minor=%ld build=%ld platform=%ld\n", dllver.dwMajorVersion, dllver.dwMinorVersion, dllver.dwBuildNumber, dllver.dwPlatformID); } @@ -2674,12 +2674,12 @@ static void init_test(void) }
r = CoInitialize(NULL); - ok(r == S_OK, "CoInitialize failed (0x%08x)\n", r); + ok(r == S_OK, "CoInitialize failed (0x%08lx)\n", r); if (FAILED(r)) exit(1);
rc=GetModuleFileNameA(NULL, argv0, sizeof(argv0)); - ok(rc != 0 && rc < sizeof(argv0), "got %d\n", rc); + ok(rc != 0 && rc < sizeof(argv0), "got %ld\n", rc); if (GetFileAttributesA(argv0)==INVALID_FILE_ATTRIBUTES) { strcat(argv0, ".so"); @@ -2703,7 +2703,7 @@ static void init_test(void) DeleteFileA( tmpdir ); rc = CreateDirectoryA( tmpdir, NULL ); ok( rc || GetLastError() == ERROR_ALREADY_EXISTS, - "failed to create %s err %u\n", tmpdir, GetLastError() ); + "failed to create %s err %lu\n", tmpdir, GetLastError() ); /* Set %TMPDIR% for the tests */ SetEnvironmentVariableA("TMPDIR", tmpdir);
@@ -2722,7 +2722,7 @@ static void init_test(void) FILE_ATTRIBUTE_NORMAL, NULL); if (hfile==INVALID_HANDLE_VALUE) { - trace("unable to create '%s': err=%u\n", filename, GetLastError()); + trace("unable to create '%s': err=%lu\n", filename, GetLastError()); assert(0); } CloseHandle(hfile); @@ -2828,7 +2828,7 @@ static void test_directory(void) SetCurrentDirectoryA(tmpdir); rc=shell_execute_ex(SEE_MASK_NOZONECHECKS|SEE_MASK_FLAG_NO_UI, NULL, "test2.exe", params, NULL, NULL); - okShell(rc > 32, "returned %lu\n", rc); + okShell(rc > 32, "returned %Iu\n", rc); okChildInt("argcA", 4); todo_wine okChildString("argvA0", path); okChildString("argvA3", "Exec"); @@ -2837,12 +2837,12 @@ static void test_directory(void)
rc=shell_execute_ex(SEE_MASK_NOZONECHECKS|SEE_MASK_FLAG_NO_UI, NULL, "test2.exe", params, NULL, NULL); - okShell(rc == SE_ERR_FNF, "returned %lu\n", rc); + okShell(rc == SE_ERR_FNF, "returned %Iu\n", rc);
/* Explicitly specify the directory to use */ rc=shell_execute_ex(SEE_MASK_NOZONECHECKS|SEE_MASK_FLAG_NO_UI, NULL, "test2.exe", params, tmpdir, NULL); - okShell(rc > 32, "returned %lu\n", rc); + okShell(rc > 32, "returned %Iu\n", rc); okChildInt("argcA", 4); okChildString("argvA0", path); okChildString("argvA3", "Exec"); @@ -2851,11 +2851,11 @@ static void test_directory(void) /* Specify it through an environment variable */ rc=shell_execute_ex(SEE_MASK_NOZONECHECKS|SEE_MASK_FLAG_NO_UI, NULL, "test2.exe", params, "%TMPDIR%", NULL); - todo_wine okShell(rc == SE_ERR_FNF, "returned %lu\n", rc); + todo_wine okShell(rc == SE_ERR_FNF, "returned %Iu\n", rc);
rc=shell_execute_ex(SEE_MASK_DOENVSUBST|SEE_MASK_NOZONECHECKS|SEE_MASK_FLAG_NO_UI, NULL, "test2.exe", params, "%TMPDIR%", NULL); - okShell(rc > 32, "returned %lu\n", rc); + okShell(rc > 32, "returned %Iu\n", rc); okChildInt("argcA", 4); okChildString("argvA0", path); okChildString("argvA3", "Exec"); @@ -2865,14 +2865,14 @@ static void test_directory(void) sprintf(dirpath, "%s:%s", curdir, tmpdir); rc=shell_execute_ex(SEE_MASK_NOZONECHECKS|SEE_MASK_FLAG_NO_UI, NULL, "test2.exe", params, dirpath, NULL); - okShell(rc == SE_ERR_FNF, "returned %lu\n", rc); + okShell(rc == SE_ERR_FNF, "returned %Iu\n", rc);
/* Same-named executable in different directory */ snprintf(path, ARRAY_SIZE(path), "%s%s", tmpdir, strrchr(argv0, '\')); CopyFileA(argv0, path, FALSE); rc=shell_execute_ex(SEE_MASK_NOZONECHECKS|SEE_MASK_FLAG_NO_UI, NULL, strrchr(argv0, '\') + 1, params, tmpdir, NULL); - okShell(rc > 32, "returned %lu\n", rc); + okShell(rc > 32, "returned %Iu\n", rc); okChildInt("argcA", 4); okChildString("argvA0", path); okChildString("argvA3", "Exec"); @@ -2880,10 +2880,10 @@ static void test_directory(void)
SetCurrentDirectoryA(tmpdir); ret = CreateDirectoryA( "tmp", NULL ); - ok(ret || GetLastError() == ERROR_ALREADY_EXISTS, "Failed to create 'tmp' err %u\n", GetLastError()); + ok(ret || GetLastError() == ERROR_ALREADY_EXISTS, "Failed to create 'tmp' err %lu\n", GetLastError()); rc=shell_execute_ex(SEE_MASK_NOZONECHECKS|SEE_MASK_FLAG_NO_UI, NULL, path, params, "tmp", NULL); - okShell(rc > 32, "returned %lu\n", rc); + okShell(rc > 32, "returned %Iu\n", rc);
DeleteFileA(path);
diff --git a/dlls/shell32/tests/shlfileop.c b/dlls/shell32/tests/shlfileop.c index 180ff4b1108..273b09d5005 100644 --- a/dlls/shell32/tests/shlfileop.c +++ b/dlls/shell32/tests/shlfileop.c @@ -42,7 +42,7 @@ #define expect_retval(ret, ret_prewin32)\ ok(retval == ret ||\ broken(retval == ret_prewin32),\ - "Expected %d, got %d\n", ret, retval) + "Expected %d, got %ld\n", ret, retval)
static BOOL old_shell32 = FALSE;
@@ -173,7 +173,7 @@ static void test_get_file_info(void) /* Test whether fields of SHFILEINFOA are always cleared */ memset(&shfi, 0xcf, sizeof(shfi)); rc=SHGetFileInfoA("", 0, &shfi, sizeof(shfi), 0); - ok(rc == 1, "SHGetFileInfoA('' | 0) should return 1, got 0x%x\n", rc); + ok(rc == 1, "SHGetFileInfoA('' | 0) should return 1, got 0x%lx\n", rc); todo_wine ok(shfi.hIcon == 0, "SHGetFileInfoA('' | 0) did not clear hIcon\n"); todo_wine ok(shfi.szDisplayName[0] == 0, "SHGetFileInfoA('' | 0) did not clear szDisplayName[0]\n"); todo_wine ok(shfi.szTypeName[0] == 0, "SHGetFileInfoA('' | 0) did not clear szTypeName[0]\n"); @@ -201,7 +201,7 @@ static void test_get_file_info(void) rc=SHGetFileInfoA("c:\nonexistent", FILE_ATTRIBUTE_DIRECTORY, &shfi, sizeof(shfi), SHGFI_ATTRIBUTES | SHGFI_USEFILEATTRIBUTES); - ok(rc == 1, "SHGetFileInfoA(c:\nonexistent | SHGFI_ATTRIBUTES) should return 1, got 0x%x\n", rc); + ok(rc == 1, "SHGetFileInfoA(c:\nonexistent | SHGFI_ATTRIBUTES) should return 1, got 0x%lx\n", rc); if (rc) ok(shfi.dwAttributes != 0xcfcfcfcf, "dwFileAttributes is not set\n"); todo_wine ok(shfi.hIcon == 0, "SHGetFileInfoA(c:\nonexistent | SHGFI_ATTRIBUTES) did not clear hIcon\n"); @@ -214,7 +214,7 @@ static void test_get_file_info(void) rc=SHGetFileInfoA("c:\nonexistent", FILE_ATTRIBUTE_DIRECTORY, &shfi, sizeof(shfi), SHGFI_EXETYPE | SHGFI_USEFILEATTRIBUTES); - todo_wine ok(rc == 1, "SHGetFileInfoA(c:\nonexistent | SHGFI_EXETYPE) should return 1, got 0x%x\n", rc); + todo_wine ok(rc == 1, "SHGetFileInfoA(c:\nonexistent | SHGFI_EXETYPE) should return 1, got 0x%lx\n", rc);
/* Test SHGFI_USEFILEATTRIBUTES support */ strcpy(shfi.szDisplayName, "dummy"); @@ -222,7 +222,7 @@ static void test_get_file_info(void) rc=SHGetFileInfoA("c:\nonexistent", FILE_ATTRIBUTE_DIRECTORY, &shfi, sizeof(shfi), SHGFI_ICONLOCATION | SHGFI_USEFILEATTRIBUTES); - ok(rc == 1, "SHGetFileInfoA(c:\nonexistent) should return 1, got 0x%x\n", rc); + ok(rc == 1, "SHGetFileInfoA(c:\nonexistent) should return 1, got 0x%lx\n", rc); if (rc) { ok(strcmp(shfi.szDisplayName, "dummy"), "SHGetFileInfoA(c:\nonexistent) displayname is not set\n"); @@ -239,13 +239,13 @@ static void test_get_file_info(void) rc=SHGetFileInfoA(notepad, GetFileAttributesA(notepad), &shfi, sizeof(shfi), SHGFI_ICONLOCATION | SHGFI_USEFILEATTRIBUTES); - ok(rc == 1, "SHGetFileInfoA(%s, SHGFI_USEFILEATTRIBUTES) should return 1, got 0x%x\n", notepad, rc); + ok(rc == 1, "SHGetFileInfoA(%s, SHGFI_USEFILEATTRIBUTES) should return 1, got 0x%lx\n", notepad, rc); strcpy(shfi2.szDisplayName, "dummy"); shfi2.iIcon=0xdeadbeef; rc2=SHGetFileInfoA(notepad, 0, &shfi2, sizeof(shfi2), SHGFI_ICONLOCATION); - ok(rc2 == 1, "SHGetFileInfoA(%s) failed %x\n", notepad, rc2); + ok(rc2 == 1, "SHGetFileInfoA(%s) failed %lx\n", notepad, rc2); if (rc && rc2) { ok(lstrcmpiA(shfi2.szDisplayName, shfi.szDisplayName) == 0, "wrong display name %s != %s\n", shfi.szDisplayName, shfi2.szDisplayName); @@ -259,13 +259,13 @@ static void test_get_file_info(void) rc=SHGetFileInfoA("test4.txt", GetFileAttributesA("test4.txt"), &shfi, sizeof(shfi), SHGFI_ICONLOCATION | SHGFI_USEFILEATTRIBUTES); - ok(rc == 1, "SHGetFileInfoA(test4.txt/, SHGFI_USEFILEATTRIBUTES) should return 1, got 0x%x\n", rc); + ok(rc == 1, "SHGetFileInfoA(test4.txt/, SHGFI_USEFILEATTRIBUTES) should return 1, got 0x%lx\n", rc); strcpy(shfi2.szDisplayName, "dummy"); shfi2.iIcon=0xdeadbeef; rc2=SHGetFileInfoA("test4.txt", 0, &shfi2, sizeof(shfi2), SHGFI_ICONLOCATION); - ok(rc2 == 1, "SHGetFileInfoA(test4.txt/) should return 1, got 0x%x\n", rc2); + ok(rc2 == 1, "SHGetFileInfoA(test4.txt/) should return 1, got 0x%lx\n", rc2); if (rc && rc2) { ok(lstrcmpiA(shfi2.szDisplayName, shfi.szDisplayName) == 0, "wrong display name %s != %s\n", shfi.szDisplayName, shfi2.szDisplayName); @@ -279,7 +279,7 @@ static void test_get_file_info(void) shfi.dwAttributes=0xdeadbeef; rc=SHGetFileInfoA("c:\", 0, &shfi, sizeof(shfi), SHGFI_TYPENAME | SHGFI_DISPLAYNAME | SHGFI_ICON | SHGFI_SMALLICON); - ok(rc == 1, "SHGetFileInfoA(c:\) should return 1, got 0x%x\n", rc); + ok(rc == 1, "SHGetFileInfoA(c:\) should return 1, got 0x%lx\n", rc); ok(strcmp(shfi.szDisplayName, "dummy") != 0, "display name was expected to change\n"); ok(strcmp(shfi.szTypeName, "dummy") != 0, "type name was expected to change\n"); ok(shfi.hIcon != (HICON) 0xdeadbeef, "hIcon was expected to change\n"); @@ -313,8 +313,8 @@ static void check_icon_size( HICON icon, DWORD flags ) } else { - ok( bm.bmWidth == metrics_size.cx, "got %d expected %d\n", bm.bmWidth, metrics_size.cx ); - ok( bm.bmHeight == metrics_size.cy, "got %d expected %d\n", bm.bmHeight, metrics_size.cy ); + ok( bm.bmWidth == metrics_size.cx, "got %d expected %ld\n", bm.bmWidth, metrics_size.cx ); + ok( bm.bmHeight == metrics_size.cy, "got %d expected %ld\n", bm.bmHeight, metrics_size.cy ); } }
@@ -352,7 +352,7 @@ static void test_get_file_info_iconlist(void) IImageList_Release( small_list ); ok( refs == start_refs + 1 || broken( refs == start_refs ), /* XP and 2003 */ - "got %d, start_refs %d\n", refs, start_refs ); + "got %ld, start_refs %ld\n", refs, start_refs ); todo_wine ok(shInfoa.hIcon == 0, "SHGetFileInfoA(CSIDL_DESKTOP, SHGFI_SYSICONINDEX|SHGFI_SMALLICON|SHGFI_PIDL) did not clear hIcon\n"); todo_wine ok(shInfoa.szTypeName[0] == 0, "SHGetFileInfoA(CSIDL_DESKTOP, SHGFI_SYSICONINDEX|SHGFI_SMALLICON|SHGFI_PIDL) did not clear szTypeName[0]\n"); ok(shInfoa.iIcon != 0xcfcfcfcf, "SHGetFileInfoA(CSIDL_DESKTOP, SHGFI_SYSICONINDEX|SHGFI_SMALLICON|SHGFI_PIDL) should set iIcon\n"); @@ -564,7 +564,7 @@ static void test_delete(void) ok(!file_exists("test3.txt"), "File should have been removed\n");
ret = SHFileOperationA(&shfo); - ok(ret == ERROR_SUCCESS, "Directory exists, but is not removed, ret=%d\n", ret); + ok(ret == ERROR_SUCCESS, "Directory exists, but is not removed, ret=%ld\n", ret); ok(dir_exists("test4.txt"), "Directory should not have been removed\n");
shfo.fFlags = FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI; @@ -573,7 +573,7 @@ static void test_delete(void) ok(!dir_exists("test4.txt"), "Directory should have been removed\n");
ret = SHFileOperationA(&shfo); - ok(!ret, "The requested file does not exist, ret=%d\n", ret); + ok(!ret, "The requested file does not exist, ret=%ld\n", ret);
init_shfo_tests(); sprintf(buf, "%s\%s", CURR_DIR, "test4.txt"); @@ -616,7 +616,7 @@ static void test_delete(void) shfo.fFlags &= ~FOF_FILESONLY; shfo.fAnyOperationsAborted = FALSE; ret = SHFileOperationA(&shfo); - ok(ret == ERROR_ACCESS_DENIED, "Expected ERROR_ACCESS_DENIED, got %d\n", ret); + ok(ret == ERROR_ACCESS_DENIED, "Expected ERROR_ACCESS_DENIED, got %ld\n", ret); ok(!shfo.fAnyOperationsAborted, "Expected no aborted operations\n"); ok(file_exists("test1.txt"), "Expected test1.txt to exist\n"); } @@ -628,7 +628,7 @@ static void test_delete(void) ret = SHFileOperationA(&shfo); ok(ret == ERROR_INVALID_PARAMETER || broken(ret == ERROR_SUCCESS), /* Win9x, NT4 */ - "Expected ERROR_INVALID_PARAMETER, got %d\n", ret); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", ret); ok(file_exists("test1.txt"), "Expected test1.txt to exist\n");
/* try an invalid list, only one null terminator */ @@ -638,7 +638,7 @@ static void test_delete(void) shfo.pFrom = ""; shfo.wFunc = FO_DELETE; ret = SHFileOperationA(&shfo); - ok(ret == ERROR_ACCESS_DENIED, "Expected ERROR_ACCESS_DENIED, got %d\n", ret); + ok(ret == ERROR_ACCESS_DENIED, "Expected ERROR_ACCESS_DENIED, got %ld\n", ret); ok(file_exists("test1.txt"), "Expected test1.txt to exist\n"); }
@@ -649,7 +649,7 @@ static void test_delete(void) ok(ret == 1026 || ret == ERROR_FILE_NOT_FOUND || /* Vista */ broken(ret == ERROR_SUCCESS), /* NT4 */ - "Expected 1026 or ERROR_FILE_NOT_FOUND, got %d\n", ret); + "Expected 1026 or ERROR_FILE_NOT_FOUND, got %ld\n", ret);
/* delete a dir, and then a file inside the dir, same as * deleting a nonexistent file @@ -662,7 +662,7 @@ static void test_delete(void) ret = SHFileOperationA(&shfo); ok(ret == ERROR_PATH_NOT_FOUND || broken(ret == ERROR_SUCCESS), /* NT4 */ - "Expected ERROR_PATH_NOT_FOUND, got %d\n", ret); + "Expected ERROR_PATH_NOT_FOUND, got %ld\n", ret); ok(!dir_exists("testdir2"), "Expected testdir2 to not exist\n"); ok(!file_exists("testdir2\one.txt"), "Expected testdir2\one.txt to not exist\n"); } @@ -677,7 +677,7 @@ static void test_delete(void) ok(ret == 1026 || ret == ERROR_FILE_NOT_FOUND || /* Vista */ broken(ret == ERROR_SUCCESS), /* NT4 */ - "Expected 1026 or ERROR_FILE_NOT_FOUND, got %d\n", ret); + "Expected 1026 or ERROR_FILE_NOT_FOUND, got %ld\n", ret); todo_wine ok(file_exists("test1.txt"), "Expected test1.txt to exist\n"); ok(file_exists("test2.txt"), "Expected test2.txt to exist\n"); @@ -689,19 +689,19 @@ static void test_delete(void) ok(ret == ERROR_FILE_NOT_FOUND || /* Vista */ broken(ret == 0x402) || /* XP */ broken(ret == ERROR_SUCCESS), /* NT4 */ - "Expected 0x402 or ERROR_FILE_NOT_FOUND, got %x\n", ret); + "Expected 0x402 or ERROR_FILE_NOT_FOUND, got %lx\n", ret); shfo.pFrom = "nonexistent\one.txt\0"; ret = SHFileOperationA(&shfo); ok(ret == DE_INVALIDFILES || /* Vista or later */ broken(ret == 0x402), /* XP */ - "Expected 0x402 or DE_INVALIDFILES, got %x\n", ret); + "Expected 0x402 or DE_INVALIDFILES, got %lx\n", ret);
/* try the FOF_NORECURSION flag, continues deleting subdirs */ init_shfo_tests(); shfo.pFrom = "testdir2\0"; shfo.fFlags |= FOF_NORECURSION; ret = SHFileOperationA(&shfo); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", ret); ok(!file_exists("testdir2\one.txt"), "Expected testdir2\one.txt to not exist\n"); ok(!dir_exists("testdir2\nested"), "Expected testdir2\nested to not exist\n"); } @@ -728,7 +728,7 @@ static void test_rename(void) ok(retval == ERROR_ALREADY_EXISTS || retval == DE_FILEDESTISFLD || /* Vista */ broken(retval == ERROR_INVALID_NAME), /* Win9x, NT4 */ - "Expected ERROR_ALREADY_EXISTS or DE_FILEDESTISFLD, got %d\n", retval); + "Expected ERROR_ALREADY_EXISTS or DE_FILEDESTISFLD, got %ld\n", retval); ok(file_exists("test1.txt"), "The file is renamed\n");
set_curr_dir_path(from, "test3.txt\0"); @@ -751,7 +751,7 @@ static void test_rename(void) ok(retval == ERROR_GEN_FAILURE || retval == DE_MANYSRC1DEST || /* Vista */ broken(retval == ERROR_SUCCESS), /* Win9x */ - "Expected ERROR_GEN_FAILURE or DE_MANYSRC1DEST , got %d\n", retval); + "Expected ERROR_GEN_FAILURE or DE_MANYSRC1DEST , got %ld\n", retval); ok(file_exists("test1.txt"), "The file is renamed - many files are specified\n");
memcpy(&shfo2, &shfo, sizeof(SHFILEOPSTRUCTA)); @@ -763,32 +763,32 @@ static void test_rename(void) ok(retval == ERROR_GEN_FAILURE || retval == DE_MANYSRC1DEST || /* Vista */ broken(retval == ERROR_SUCCESS), /* Win9x */ - "Expected ERROR_GEN_FAILURE or DE_MANYSRC1DEST files, got %d\n", retval); + "Expected ERROR_GEN_FAILURE or DE_MANYSRC1DEST files, got %ld\n", retval); ok(file_exists("test1.txt"), "The file is not renamed - many files are specified\n");
set_curr_dir_path(from, "test1.txt\0"); set_curr_dir_path(to, "test6.txt\0"); retval = SHFileOperationA(&shfo); - ok(retval == ERROR_SUCCESS, "Rename file failed, retval = %d\n", retval); + ok(retval == ERROR_SUCCESS, "Rename file failed, retval = %ld\n", retval); ok(!file_exists("test1.txt"), "The file is not renamed\n"); ok(file_exists("test6.txt"), "The file is not renamed\n");
set_curr_dir_path(from, "test6.txt\0"); set_curr_dir_path(to, "test1.txt\0"); retval = SHFileOperationA(&shfo); - ok(retval == ERROR_SUCCESS, "Rename file back failed, retval = %d\n", retval); + ok(retval == ERROR_SUCCESS, "Rename file back failed, retval = %ld\n", retval);
set_curr_dir_path(from, "test4.txt\0"); set_curr_dir_path(to, "test6.txt\0"); retval = SHFileOperationA(&shfo); - ok(retval == ERROR_SUCCESS, "Rename dir failed, retval = %d\n", retval); + ok(retval == ERROR_SUCCESS, "Rename dir failed, retval = %ld\n", retval); ok(!dir_exists("test4.txt"), "The dir is not renamed\n"); ok(dir_exists("test6.txt"), "The dir is not renamed\n");
set_curr_dir_path(from, "test6.txt\0"); set_curr_dir_path(to, "test4.txt\0"); retval = SHFileOperationA(&shfo); - ok(retval == ERROR_SUCCESS, "Rename dir back failed, retval = %d\n", retval); + ok(retval == ERROR_SUCCESS, "Rename dir back failed, retval = %ld\n", retval); ok(dir_exists("test4.txt"), "The dir is not renamed\n");
/* try to rename more than one file to a single file */ @@ -798,7 +798,7 @@ static void test_rename(void) ok(retval == ERROR_GEN_FAILURE || retval == DE_MANYSRC1DEST || /* Vista */ broken(retval == ERROR_SUCCESS), /* Win9x */ - "Expected ERROR_GEN_FAILURE or DE_MANYSRC1DEST, got %d\n", retval); + "Expected ERROR_GEN_FAILURE or DE_MANYSRC1DEST, got %ld\n", retval); ok(file_exists("test1.txt"), "Expected test1.txt to exist\n"); ok(file_exists("test2.txt"), "Expected test2.txt to exist\n"); ok(!file_exists("a.txt"), "Expected a.txt to not exist\n"); @@ -810,7 +810,7 @@ static void test_rename(void) ok(retval == 1026 || retval == ERROR_FILE_NOT_FOUND || /* Vista */ broken(retval == ERROR_SUCCESS), /* NT4 */ - "Expected 1026 or ERROR_FILE_NOT_FOUND, got %d\n", retval); + "Expected 1026 or ERROR_FILE_NOT_FOUND, got %ld\n", retval); ok(!file_exists("newfile"), "Expected newfile to not exist\n");
/* pTo already exist */ @@ -829,7 +829,7 @@ static void test_rename(void) ok(retval == ERROR_ALREADY_EXISTS || broken(retval == DE_OPCANCELLED) || /* NT4 */ broken(retval == ERROR_INVALID_NAME), /* Win9x */ - "Expected ERROR_ALREADY_EXISTS, got %d\n", retval); + "Expected ERROR_ALREADY_EXISTS, got %ld\n", retval); }
/* pFrom is valid, but pTo is empty */ @@ -841,7 +841,7 @@ static void test_rename(void) retval == DE_FILEDESTISFLD || /* Vista, running from c: */ broken(retval == DE_OPCANCELLED) || /* Win9x */ broken(retval == 65652), /* NT4 */ - "Expected ERROR_CANCELLED or DE_DIFFDIR, got %u\n", retval); + "Expected ERROR_CANCELLED or DE_DIFFDIR, got %lu\n", retval); ok(file_exists("test1.txt"), "Expected test1.txt to exist\n");
/* pFrom is empty */ @@ -850,14 +850,14 @@ static void test_rename(void) ok(retval == ERROR_ACCESS_DENIED || retval == DE_MANYSRC1DEST || /* Vista */ broken(retval == ERROR_SUCCESS), /* Win9x */ - "Expected ERROR_ACCESS_DENIED or DE_MANYSRC1DEST, got %d\n", retval); + "Expected ERROR_ACCESS_DENIED or DE_MANYSRC1DEST, got %ld\n", retval);
/* pFrom is NULL, commented out because it crashes on nt 4.0 */ if (0) { shfo.pFrom = NULL; retval = SHFileOperationA(&shfo); - ok(retval == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", retval); + ok(retval == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", retval); } }
@@ -893,7 +893,7 @@ static void test_copy(void) if (dir_exists("test6.txt")) { /* Vista and W2K8 (broken or new behavior ?) */ - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval); ok(DeleteFileA("test6.txt\test1.txt"), "The file is not copied - many files " "are specified as a target\n"); DeleteFileA("test6.txt\test2.txt"); @@ -926,7 +926,7 @@ static void test_copy(void) if (dir_exists("test6.txt")) { /* Vista and W2K8 (broken or new behavior?) */ - ok(retval == DE_DESTSAMETREE, "Expected DE_DESTSAMETREE, got %d\n", retval); + ok(retval == DE_DESTSAMETREE, "Expected DE_DESTSAMETREE, got %ld\n", retval); ok(DeleteFileA("test6.txt\test1.txt"), "The file is not copied - many files " "are specified as a target\n"); RemoveDirectoryA("test6.txt"); @@ -1014,7 +1014,7 @@ static void test_copy(void) shfo.pFrom = "test1.txt\0test2.txt\0test3.txt\0"; shfo.pTo = "testdir2\0"; retval = SHFileOperationA(&shfo); - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval); ok(file_exists("testdir2\test1.txt"), "Expected testdir2\test1 to exist\n");
/* try to overwrite an existing write protected file */ @@ -1026,15 +1026,15 @@ static void test_copy(void) /* suppress the error-dialog in win9x here */ shfo.fFlags = FOF_NOERRORUI | FOF_NOCONFIRMATION | FOF_SILENT; ret = SetFileAttributesA(shfo.pTo, FILE_ATTRIBUTE_READONLY); - ok(ret, "Failure to set file attributes (error %x)\n", GetLastError()); + ok(ret, "Failure to set file attributes (error %lx)\n", GetLastError()); retval = CopyFileA(shfo.pFrom, shfo.pTo, FALSE); ok(!retval && GetLastError() == ERROR_ACCESS_DENIED, "CopyFileA should have fail with ERROR_ACCESS_DENIED\n"); retval = SHFileOperationA(&shfo); /* Does not work on Win95, Win95B, NT4WS and NT4SRV */ - ok(!retval || broken(retval == DE_OPCANCELLED), "SHFileOperationA failed to copy (error %x)\n", retval); + ok(!retval || broken(retval == DE_OPCANCELLED), "SHFileOperationA failed to copy (error %lx)\n", retval); /* Set back normal attributes to make the file deletion succeed */ ret = SetFileAttributesA(shfo.pTo, FILE_ATTRIBUTE_NORMAL); - ok(ret, "Failure to set file attributes (error %x)\n", GetLastError()); + ok(ret, "Failure to set file attributes (error %lx)\n", GetLastError()); shfo.fFlags = tmp_flags;
/* try to copy files to a file */ @@ -1072,7 +1072,7 @@ static void test_copy(void) ok(!shfo.fAnyOperationsAborted || broken(shfo.fAnyOperationsAborted == 0xdeadbeef), /* NT4 */ "Didn't expect aborted operations\n"); - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval); ok(DeleteFileA("test3.txt\test1.txt"), "Expected test3.txt\test1.txt to exist\n"); ok(DeleteFileA("test3.txt\test2.txt"), "Expected test3.txt\test1.txt to exist\n"); ok(RemoveDirectoryA(to), "Expected test3.txt to exist\n"); @@ -1090,7 +1090,7 @@ static void test_copy(void) if (dir_exists("testdir2\a.txt")) { /* Vista and W2K8 (broken or new behavior ?) */ - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval); ok(!shfo.fAnyOperationsAborted, "Didn't expect aborted operations\n"); ok(DeleteFileA("testdir2\a.txt\test1.txt"), "Expected testdir2\a.txt\test1.txt to exist\n"); RemoveDirectoryA("testdir2\a.txt"); @@ -1121,7 +1121,7 @@ static void test_copy(void) { /* Vista and W2K8 (broken or new behavior ?) */ ok(!shfo.fAnyOperationsAborted, "Didn't expect aborted operations\n"); - ok(retval == DE_SAMEFILE, "Expected DE_SAMEFILE, got %d\n", retval); + ok(retval == DE_SAMEFILE, "Expected DE_SAMEFILE, got %ld\n", retval); ok(DeleteFileA("e.txt\test1.txt"), "Expected e.txt\test1.txt to exist\n"); RemoveDirectoryA("e.txt"); ok(DeleteFileA("f.txt\test2.txt"), "Expected f.txt\test2.txt to exist\n"); @@ -1146,7 +1146,7 @@ static void test_copy(void) "Didn't expect aborted operations\n"); ok(retval == ERROR_SUCCESS || broken(retval == 0x100a1), /* WinMe */ - "Expected ERROR_SUCCESS, got %d\n", retval); + "Expected ERROR_SUCCESS, got %ld\n", retval); ok(DeleteFileA("testdir2\a.txt"), "Expected testdir2\a.txt to exist\n"); ok(DeleteFileA("testdir2\b.txt"), "Expected testdir2\b.txt to exist\n"); if (retval == ERROR_SUCCESS) @@ -1164,7 +1164,7 @@ static void test_copy(void) if (dir_exists("a.txt")) { /* Vista and W2K8 (broken or new behavior ?) */ - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval); ok(!shfo.fAnyOperationsAborted, "Didn't expect aborted operations\n"); ok(DeleteFileA("a.txt\test1.txt"), "Expected a.txt\test1.txt to exist\n"); ok(DeleteFileA("a.txt\test2.txt"), "Expected a.txt\test2.txt to exist\n"); @@ -1188,7 +1188,7 @@ static void test_copy(void) retval = SHFileOperationA(&shfo); ok(retval == ERROR_SUCCESS || broken(retval == 0x100a1), /* WinMe */ - "Expected ERROR_SUCCESS, got %d\n", retval); + "Expected ERROR_SUCCESS, got %ld\n", retval); ok(file_exists("testdir2\test1.txt"), "Expected testdir2\test1.txt to exist\n");
/* try a glob with FOF_FILESONLY */ @@ -1197,7 +1197,7 @@ static void test_copy(void) shfo.pFrom = "test?.txt\0"; shfo.fFlags |= FOF_FILESONLY; retval = SHFileOperationA(&shfo); - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval); ok(file_exists("testdir2\test1.txt"), "Expected testdir2\test1.txt to exist\n"); ok(!dir_exists("testdir2\test4.txt"), "Expected testdir2\test4.txt to not exist\n");
@@ -1213,7 +1213,7 @@ static void test_copy(void) if (dir_exists("testdir2\a.txt")) { /* Vista and W2K8 (broken or new behavior ?) */ - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval); ok(DeleteFileA("testdir2\a.txt\test1.txt"), "Expected testdir2\a.txt\test1.txt to exist\n"); ok(DeleteFileA("testdir2\a.txt\test2.txt"), "Expected testdir2\a.txt\test2.txt to exist\n"); ok(DeleteFileA("testdir2\a.txt\test3.txt"), "Expected testdir2\a.txt\test3.txt to exist\n"); @@ -1250,7 +1250,7 @@ static void test_copy(void) } else { - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval); ok(DeleteFileA("b.txt"), "Expected b.txt to exist\n"); } ok(!DeleteFileA("c.txt"), "Expected c.txt to not exist\n"); @@ -1263,7 +1263,7 @@ static void test_copy(void) if (dir_exists("b.txt")) { /* Vista and W2K8 (broken or new behavior ?) */ - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval); ok(!shfo.fAnyOperationsAborted, "Didn't expect aborted operations\n"); ok(DeleteFileA("b.txt\test1.txt"), "Expected b.txt\test1.txt to exist\n"); RemoveDirectoryA("b.txt"); @@ -1287,7 +1287,7 @@ static void test_copy(void) if (dir_exists("b.txt")) { /* Vista and W2K8 (broken or new behavior ?) */ - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval); ok(!shfo.fAnyOperationsAborted, "Didn't expect aborted operations\n"); ok(DeleteFileA("b.txt\test1.txt"), "Expected b.txt\test1.txt to exist\n"); RemoveDirectoryA("b.txt"); @@ -1313,7 +1313,7 @@ static void test_copy(void) retval = SHFileOperationA(&shfo); ok(retval == ERROR_SUCCESS || broken(retval == 0x100a1), /* WinMe */ - "Expected ERROR_SUCCESS, got %d\n", retval); + "Expected ERROR_SUCCESS, got %ld\n", retval); if (retval == ERROR_SUCCESS) { ok(DeleteFileA("testdir2\test1.txt"), "Expected testdir2\test1.txt to exist\n"); @@ -1327,7 +1327,7 @@ static void test_copy(void) retval = SHFileOperationA(&shfo); ok(retval == ERROR_SUCCESS || broken(retval == 0x100a1), /* WinMe */ - "Expected ERROR_SUCCESS, got %d\n", retval); + "Expected ERROR_SUCCESS, got %ld\n", retval); if (retval == ERROR_SUCCESS) { ok(DeleteFileA("testdir2\test4.txt\a.txt"), "Expected a.txt to exist\n"); @@ -1341,7 +1341,7 @@ static void test_copy(void) if (dir_exists("nonexistent")) { /* Vista and W2K8 (broken or new behavior ?) */ - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval); ok(DeleteFileA("nonexistent\test4.txt\a.txt"), "Expected nonexistent\test4.txt\a.txt to exist\n"); RemoveDirectoryA("nonexistent\test4.txt"); ok(DeleteFileA("nonexistent\a.txt"), "Expected nonexistent\a.txt to exist\n"); @@ -1370,7 +1370,7 @@ static void test_copy(void) } else { - ok(retval == DE_SAMEFILE, "Expected DE_SAMEFILE, got %d\n", retval); + ok(retval == DE_SAMEFILE, "Expected DE_SAMEFILE, got %ld\n", retval); ok(DeleteFileA("b.txt"), "Expected b.txt to exist\n"); } ok(!shfo.fAnyOperationsAborted, "Expected no operations to be aborted\n"); @@ -1390,7 +1390,7 @@ static void test_copy(void) { ok(retval == ERROR_SUCCESS || retval == DE_DESTSAMETREE, /* Vista */ - "Expected ERROR_SUCCESS or DE_DESTSAMETREE, got %d\n", retval); + "Expected ERROR_SUCCESS or DE_DESTSAMETREE, got %ld\n", retval); ok(DeleteFileA("b.txt"), "Expected b.txt to exist\n"); } ok(!file_exists("c.txt"), "Expected c.txt to not exist\n"); @@ -1403,7 +1403,7 @@ static void test_copy(void) retval = SHFileOperationA(&shfo); ok(retval == ERROR_SUCCESS || retval == DE_DESTSUBTREE, /* Vista */ - "Expected ERROR_SUCCESS or DE_DESTSUBTREE, got %d\n", retval); + "Expected ERROR_SUCCESS or DE_DESTSUBTREE, got %ld\n", retval); ok(!RemoveDirectoryA("test4.txt\newdir"), "Expected test4.txt\newdir to not exist\n");
/* copy a directory to itself, error displayed in UI */ @@ -1413,7 +1413,7 @@ static void test_copy(void) retval = SHFileOperationA(&shfo); ok(retval == ERROR_SUCCESS || retval == DE_DESTSUBTREE, /* Vista */ - "Expected ERROR_SUCCESS or DE_DESTSUBTREE, got %d\n", retval); + "Expected ERROR_SUCCESS or DE_DESTSUBTREE, got %ld\n", retval);
/* copy a file into a directory, and the directory into itself */ shfo.pFrom = "test1.txt\0test4.txt\0"; @@ -1423,7 +1423,7 @@ static void test_copy(void) retval = SHFileOperationA(&shfo); ok(retval == ERROR_SUCCESS || retval == DE_DESTSUBTREE, /* Vista */ - "Expected ERROR_SUCCESS or DE_DESTSUBTREE, got %d\n", retval); + "Expected ERROR_SUCCESS or DE_DESTSUBTREE, got %ld\n", retval); ok(DeleteFileA("test4.txt\test1.txt"), "Expected test4.txt\test1.txt to exist\n");
/* copy a file to a file, and the directory into itself */ @@ -1434,7 +1434,7 @@ static void test_copy(void) if (dir_exists("test4.txt\a.txt")) { /* Vista and W2K8 (broken or new behavior ?) */ - ok(retval == DE_DESTSUBTREE, "Expected DE_DESTSUBTREE, got %d\n", retval); + ok(retval == DE_DESTSUBTREE, "Expected DE_DESTSUBTREE, got %ld\n", retval); ok(DeleteFileA("test4.txt\a.txt\test1.txt"), "Expected test4.txt\a.txt\test1.txt to exist\n"); RemoveDirectoryA("test4.txt\a.txt"); } @@ -1452,7 +1452,7 @@ static void test_copy(void) ok(retval == 1026 || retval == ERROR_FILE_NOT_FOUND || /* Vista */ broken(retval == ERROR_SUCCESS), /* NT4 */ - "Expected 1026 or ERROR_FILE_NOT_FOUND, got %d\n", retval); + "Expected 1026 or ERROR_FILE_NOT_FOUND, got %ld\n", retval); ok(!file_exists("nonexistent\e.txt"), "Expected nonexistent\e.txt to not exist\n"); ok(!file_exists("nonexistent"), "Expected nonexistent to not exist\n");
@@ -1470,7 +1470,7 @@ static void test_copy(void) shfo.fAnyOperationsAborted = 0xdeadbeef; /* without FOF_NOCONFIRMATION the confirmation is Yes/No */ retval = SHFileOperationA(&shfo); - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval); ok(!shfo.fAnyOperationsAborted, "Didn't expect aborted operations\n"); ok(file_has_content("test2.txt", "test1.txt\n"), "The file was not copied\n");
@@ -1479,7 +1479,7 @@ static void test_copy(void) shfo.fFlags = FOF_NOCONFIRMATION | FOF_MULTIDESTFILES; /* without FOF_NOCONFIRMATION the confirmation is Yes/Yes to All/No/Cancel */ retval = SHFileOperationA(&shfo); - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval); ok(file_has_content("test2.txt", "test3.txt\n"), "The file was not copied\n");
shfo.pFrom = "one.txt\0"; @@ -1487,7 +1487,7 @@ static void test_copy(void) shfo.fFlags = FOF_NOCONFIRMATION; /* without FOF_NOCONFIRMATION the confirmation is Yes/No */ retval = SHFileOperationA(&shfo); - ok(retval == 0, "Expected 0, got %d\n", retval); + ok(retval == 0, "Expected 0, got %ld\n", retval); ok(file_has_content("testdir2\one.txt", "test1.txt\n"), "The file was not copied\n"); }
@@ -1499,14 +1499,14 @@ static void test_copy(void) retval = SHFileOperationA(&shfo); ok(retval == ERROR_SUCCESS || broken(retval == 0x100a1), /* WinMe */ - "Expected ERROR_SUCCESS, got %d\n", retval); + "Expected ERROR_SUCCESS, got %ld\n", retval); shfo.fFlags = FOF_NOCONFIRMATION; if (ERROR_SUCCESS) { createTestFile("test4.txt\.\test1.txt"); /* modify the content of the file */ /* without FOF_NOCONFIRMATION the confirmation is "This folder already contains a folder named ..." */ retval = SHFileOperationA(&shfo); - ok(retval == 0, "Expected 0, got %d\n", retval); + ok(retval == 0, "Expected 0, got %ld\n", retval); ok(file_has_content("testdir2\test4.txt\test1.txt", "test4.txt\.\test1.txt\n"), "The file was not copied\n"); }
@@ -1523,7 +1523,7 @@ static void test_copy(void) ok(retval == 1148 || retval == 1026 || retval == ERROR_ACCESS_DENIED || /* win2k */ retval == DE_INVALIDFILES, /* Vista */ - "Unexpected return value, got %d\n", retval); + "Unexpected return value, got %ld\n", retval); ok(DeleteFileA("one.txt"), "Expected file to exist\n"); if (dir_exists("two.txt")) /* Vista and W2K8 (broken or new behavior ?) */ @@ -1548,7 +1548,7 @@ static void test_copy(void) } else { - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval); ok(DeleteFileA("two.txt"), "Expected file to exist\n"); } ok(DeleteFileA("one.txt"), "Expected file to exist\n"); @@ -1567,7 +1567,7 @@ static void test_copy(void) } else { - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval); ok(DeleteFileA("two.txt"), "Expected file to exist\n"); } ok(DeleteFileA("one.txt"), "Expected file to exist\n"); @@ -1588,7 +1588,7 @@ static void test_copy(void) ok(retval == 1148 || retval == 1026 || retval == ERROR_ACCESS_DENIED || /* win2k */ retval == DE_INVALIDFILES, /* Vista */ - "Unexpected return value, got %d\n", retval); + "Unexpected return value, got %ld\n", retval); ok(DeleteFileA("one.txt"), "Expected file to exist\n"); if (dir_exists("two.txt")) /* Vista and W2K8 (broken or new behavior ?) */ @@ -1614,7 +1614,7 @@ static void test_copy(void) } else { - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval); ok(DeleteFileA("two.txt"), "Expected file to exist\n"); } ok(DeleteFileA("one.txt"), "Expected file to exist\n"); @@ -1636,7 +1636,7 @@ static void test_copy(void) if (dir_exists("threedir")) { /* Vista and W2K8 (broken or new behavior ?) */ - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval); ok(DeleteFileA("threedir\one.txt"), "Expected file to exist\n"); ok(DeleteFileA("threedir\two.txt"), "Expected file to exist\n"); ok(RemoveDirectoryA("threedir"), "Expected dir to exist\n"); @@ -1667,7 +1667,7 @@ static void test_copy(void) shfo.pTo = to; shfo.fFlags = FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI; retval = SHFileOperationA(&shfo); - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval); ok(DeleteFileA("threedir\one.txt"), "Expected file to exist\n"); ok(DeleteFileA("threedir\two.txt"), "Expected file to exist\n"); ok(DeleteFileA("one.txt"), "Expected file to exist\n"); @@ -1694,7 +1694,7 @@ static void test_copy(void) retval = SHFileOperationA(&shfo); ok(retval == ERROR_CANCELLED || retval == ERROR_SUCCESS, /* win2k3 */ - "Expected ERROR_CANCELLED or ERROR_SUCCESS, got %d\n", retval); + "Expected ERROR_CANCELLED or ERROR_SUCCESS, got %ld\n", retval); ok(!DeleteFileA("threedir\one.txt"), "Expected file to not exist\n"); ok(!DeleteFileA("threedir\two.txt"), "Expected file to not exist\n"); ok(DeleteFileA("one.txt"), "Expected file to exist\n"); @@ -1724,7 +1724,7 @@ static void test_copy(void) shfo.fFlags = FOF_MULTIDESTFILES | FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI; retval = SHFileOperationA(&shfo); - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval); ok(DeleteFileA("one.txt"), "Expected file to exist\n"); ok(DeleteFileA("two.txt"), "Expected file to exist\n"); ok(DeleteFileA("threedir\one.txt"), "Expected file to exist\n"); @@ -1759,7 +1759,7 @@ static void test_copy(void) ok(retval == ERROR_CANCELLED || retval == DE_FILEDESTISFLD || /* Vista */ broken(retval == DE_OPCANCELLED), /* Win9x, NT4 */ - "Expected ERROR_CANCELLED or DE_FILEDESTISFLD. got %d\n", retval); + "Expected ERROR_CANCELLED or DE_FILEDESTISFLD. got %ld\n", retval); if (file_exists("threedir\threedir")) { /* NT4 */ @@ -1786,7 +1786,7 @@ static void test_copy(void) shfo.fFlags = FOF_MULTIDESTFILES | FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI; retval = SHFileOperationA(&shfo); - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval); ok(DeleteFileA("one.txt"), "Expected file to exist\n"); ok(DeleteFileA("two.txt"), "Expected file to exist\n"); ok(DeleteFileA("threedir\one.txt"), "Expected file to exist\n"); @@ -1817,7 +1817,7 @@ static void test_copy(void) shfo.pTo = "one\0"; shfo.fFlags |= FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI | FOF_MULTIDESTFILES; retval = SHFileOperationA(&shfo); - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval); ok(DeleteFileA("one\aa.txt"), "Expected file to exist\n"); ok(DeleteFileA("one\ab.txt"), "Expected file to exist\n");
@@ -1826,7 +1826,7 @@ static void test_copy(void) shfo.pTo = "one\0two\0"; shfo.fFlags = FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI; retval = SHFileOperationA(&shfo); - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval); ok(DeleteFileA("one\aa.txt"), "Expected file to exist\n"); ok(DeleteFileA("one\ab.txt"), "Expected file to exist\n"); ok(!DeleteFileA("two\aa.txt"), "Expected file to not exist\n"); @@ -1845,7 +1845,7 @@ static void test_copy(void) retval = SHFileOperationA(&shfo); ok(retval == ERROR_SUCCESS || broken(retval == DE_OPCANCELLED), /* NT4 */ - "Expected ERROR_SUCCESS, got %d\n", retval); + "Expected ERROR_SUCCESS, got %ld\n", retval); if (retval == ERROR_SUCCESS) ok(DeleteFileA("abcdefgh.abc"), "Expected file to exist\n"); ok(DeleteFileA("dir\abcdefgh.abc"), "Expected file to exist\n"); @@ -1859,9 +1859,9 @@ static void test_copy(void) shfo.fFlags = FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI; SetLastError(0xdeadbeef); retval = SHFileOperationA(&shfo); - ok(retval == ERROR_SUCCESS, "File copy failed with %d\n", retval); + ok(retval == ERROR_SUCCESS, "File copy failed with %ld\n", retval); ok(!shfo.fAnyOperationsAborted, "Didn't expect aborted operations\n"); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError());
/* Check last error after a failed file operation. */ clean_after_shfo_tests(); @@ -1873,7 +1873,7 @@ static void test_copy(void) retval = SHFileOperationA(&shfo); ok(retval != ERROR_SUCCESS, "Unexpected ERROR_SUCCESS\n"); ok(!shfo.fAnyOperationsAborted, "Didn't expect aborted operations\n"); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError());
/* test with / */ CreateDirectoryA("dir", NULL); @@ -1885,7 +1885,7 @@ static void test_copy(void) retval = SHFileOperationA(&shfo); if (dir_exists("dir\destdir")) { - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval); ok(DeleteFileA("dir\destdir\aa.txt"), "Expected file to exist\n"); ok(RemoveDirectoryA("dir\destdir"), "Expected dir to exist\n"); } @@ -1932,7 +1932,7 @@ static void test_move(void) set_curr_dir_path(from, "testdir2\*.*\0"); set_curr_dir_path(to, "test4.txt\0"); retval = SHFileOperationA(&shfo); - ok(!retval, "SHFileOperation error %#x\n", retval); + ok(!retval, "SHFileOperation error %#lx\n", retval); ok(!shfo.fAnyOperationsAborted, "fAnyOperationsAborted %d\n", shfo.fAnyOperationsAborted);
ok(file_exists("testdir2"), "dir should not be moved\n"); @@ -1954,7 +1954,7 @@ static void test_move(void) retval = SHFileOperationA(&shfo); ok(retval == ERROR_SUCCESS || broken(retval == ERROR_FILE_NOT_FOUND), /* WinXp, Win2k3 */ - "Expected ERROR_SUCCESS, got %d\n", retval); + "Expected ERROR_SUCCESS, got %ld\n", retval); if (retval == ERROR_SUCCESS) { ok(!shfo.fAnyOperationsAborted, "fAnyOperationsAborted %d\n", shfo.fAnyOperationsAborted); @@ -2031,7 +2031,7 @@ static void test_move(void) else { /* Vista and W2K8 (broken or new behavior ?) */ - ok(retval == DE_DESTSAMETREE, "Expected DE_DESTSAMETREE, got %d\n", retval); + ok(retval == DE_DESTSAMETREE, "Expected DE_DESTSAMETREE, got %ld\n", retval); ok(DeleteFileA("test6.txt\test1.txt"), "The file is not moved\n"); RemoveDirectoryA("test6.txt"); ok(DeleteFileA("test7.txt\test2.txt"), "The file is not moved\n"); @@ -2065,7 +2065,7 @@ static void test_move(void) else { /* Vista and W2K8 (broken or new behavior ?) */ - ok(retval == DE_SAMEFILE, "Expected DE_SAMEFILE, got %d\n", retval); + ok(retval == DE_SAMEFILE, "Expected DE_SAMEFILE, got %ld\n", retval); ok(DeleteFileA("test6.txt\test1.txt"), "The file is not moved\n"); RemoveDirectoryA("test6.txt"); ok(DeleteFileA("test7.txt\test2.txt"), "The file is not moved\n"); @@ -2089,7 +2089,7 @@ static void test_move(void) retval = SHFileOperationA(&shfo2); if (dir_exists("test6.txt")) { - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval); ok(DeleteFileA("test6.txt\test1.txt"),"The file is not moved\n"); ok(DeleteFileA("test7.txt\test2.txt"),"The file is not moved\n"); ok(!dir_exists("test8.txt") && !file_exists("test8.txt"), @@ -2112,7 +2112,7 @@ static void test_move(void) retval = SHFileOperationA(&shfo2); if (dir_exists("test5.txt")) { - ok(retval == DE_SAMEFILE, "Expected DE_SAMEFILE, got %d\n", retval); + ok(retval == DE_SAMEFILE, "Expected DE_SAMEFILE, got %ld\n", retval); ok(DeleteFileA("test4.txt\test1.txt"),"The file is not moved\n"); ok(DeleteFileA("test5.txt\test2.txt"),"The file is not moved\n"); ok(file_exists("test3.txt"), "The file is not moved\n"); @@ -2121,7 +2121,7 @@ static void test_move(void) } else { - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval); ok(DeleteFileA("test4.txt\test1.txt"),"The file is not moved\n"); ok(DeleteFileA("test4.txt\test2.txt"),"The file is not moved\n"); ok(DeleteFileA("test4.txt\test3.txt"),"The file is not moved\n"); @@ -2134,7 +2134,7 @@ static void test_move(void) set_curr_dir_path(to, "test6.txt\0\0"); retval = SHFileOperationA(&shfo2); ok(retval == ERROR_SUCCESS || retval == ERROR_ACCESS_DENIED - , "Expected ERROR_SUCCESS || ERROR_ACCESS_DENIED, got %d\n", retval); + , "Expected ERROR_SUCCESS || ERROR_ACCESS_DENIED, got %ld\n", retval); ok(!file_exists("test6.txt"), "The file should not exist\n");
init_shfo_tests(); @@ -2144,7 +2144,7 @@ static void test_move(void) retval = SHFileOperationA(&shfo2); ok(retval == ERROR_FILE_NOT_FOUND || broken(retval == 1026) - , "Expected ERROR_FILE_NOT_FOUND, got %d\n", retval); + , "Expected ERROR_FILE_NOT_FOUND, got %ld\n", retval); ok(!file_exists("test6.txt"), "The file should not exist\n");
init_shfo_tests(); @@ -2163,7 +2163,7 @@ static void test_move(void) { /* Old shell32 */ /* Vista and W2K8 (broken or new behavior ?) */ - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval); ok(DeleteFileA("test6.txt\test1.txt"), "The file is not moved. Many files are specified\n"); ok(DeleteFileA("test6.txt\test2.txt"), "The file is not moved. Many files are specified\n"); ok(DeleteFileA("test6.txt\test4.txt\test1.txt"), "The file is not moved. Many files are specified\n"); @@ -2209,7 +2209,7 @@ static void test_move(void) } else { - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval); if (old_shell32) { DeleteFileA("a.txt\a.txt"); @@ -2229,7 +2229,7 @@ static void test_move(void) { /* Old shell32 */ /* Vista and W2K8 (broken or new behavior ?) */ - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval); ok(DeleteFileA("test1.txt\test2.txt"), "Expected test1.txt\test2.txt to exist\n"); ok(DeleteFileA("test1.txt\test3.txt"), "Expected test1.txt\test3.txt to exist\n"); RemoveDirectoryA("test1.txt"); @@ -2250,7 +2250,7 @@ static void test_move(void) retval = SHFileOperationA(&shfo); ok(retval == ERROR_SUCCESS || retval == DE_DESTSUBTREE, /* Vista */ - "Expected ERROR_SUCCESS or DE_DESTSUBTREE, got %d\n", retval); + "Expected ERROR_SUCCESS or DE_DESTSUBTREE, got %ld\n", retval); ok(!RemoveDirectoryA("test4.txt\b.txt"), "Expected test4.txt\b.txt to not exist\n"); ok(dir_exists("test4.txt"), "Expected test4.txt to exist\n");
@@ -2262,7 +2262,7 @@ static void test_move(void) { /* Old shell32 */ /* Vista and W2K8 (broken or new behavior ?) */ - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval); ok(DeleteFileA("d.txt\test2.txt"), "Expected d.txt\test2.txt to exist\n"); ok(DeleteFileA("d.txt\test3.txt"), "Expected d.txt\test3.txt to exist\n"); RemoveDirectoryA("d.txt"); @@ -2293,7 +2293,7 @@ static void test_move(void) { /* Vista and W2K8 (broken or new behavior ?) */ ok(retval == DE_SAMEFILE, - "Expected DE_SAMEFILE, got %d\n", retval); + "Expected DE_SAMEFILE, got %ld\n", retval); ok(DeleteFileA("d.txt\test2.txt"), "Expected d.txt\test2.txt to exist\n"); ok(!file_exists("d.txt\test3.txt"), "Expected d.txt\test3.txt to not exist\n"); RemoveDirectoryA("d.txt"); @@ -2313,7 +2313,7 @@ static void test_move(void) if (dir_exists("dir1")) { /* Vista and W2K8 (broken or new behavior ?) */ - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval); ok(DeleteFileA("dir1\dir2\test2.txt"), "Expected dir1\dir2\test2.txt to exist\n"); RemoveDirectoryA("dir1\dir2"); RemoveDirectoryA("dir1"); @@ -2334,7 +2334,7 @@ static void test_move(void) } else { - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); + ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval); ok(!file_exists("test2.txt"), "Expected test2.txt to not exist\n"); if (old_shell32) { @@ -2375,22 +2375,22 @@ static void test_sh_path_prepare(void) /* directory exists, SHPPFW_NONE */ set_curr_dir_path(path, "testdir2\0"); res = SHPathPrepareForWriteA(0, 0, path, SHPPFW_NONE); - ok(res == S_OK, "res == 0x%08x, expected S_OK\n", res); + ok(res == S_OK, "res == 0x%08lx, expected S_OK\n", res);
/* directory exists, SHPPFW_IGNOREFILENAME */ set_curr_dir_path(path, "testdir2\test4.txt\0"); res = SHPathPrepareForWriteA(0, 0, path, SHPPFW_IGNOREFILENAME); - ok(res == S_OK, "res == 0x%08x, expected S_OK\n", res); + ok(res == S_OK, "res == 0x%08lx, expected S_OK\n", res);
/* directory exists, SHPPFW_DIRCREATE */ set_curr_dir_path(path, "testdir2\0"); res = SHPathPrepareForWriteA(0, 0, path, SHPPFW_DIRCREATE); - ok(res == S_OK, "res == 0x%08x, expected S_OK\n", res); + ok(res == S_OK, "res == 0x%08lx, expected S_OK\n", res);
/* directory exists, SHPPFW_IGNOREFILENAME|SHPPFW_DIRCREATE */ set_curr_dir_path(path, "testdir2\test4.txt\0"); res = SHPathPrepareForWriteA(0, 0, path, SHPPFW_IGNOREFILENAME|SHPPFW_DIRCREATE); - ok(res == S_OK, "res == 0x%08x, expected S_OK\n", res); + ok(res == S_OK, "res == 0x%08lx, expected S_OK\n", res); ok(!file_exists("nonexistent\"), "nonexistent\ exists but shouldn't\n");
/* file exists, SHPPFW_NONE */ @@ -2399,14 +2399,14 @@ static void test_sh_path_prepare(void) ok(res == HRESULT_FROM_WIN32(ERROR_DIRECTORY) || res == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) || /* WinMe */ res == HRESULT_FROM_WIN32(ERROR_INVALID_NAME), /* Vista */ - "Unexpected result : 0x%08x\n", res); + "Unexpected result : 0x%08lx\n", res);
/* file exists, SHPPFW_DIRCREATE */ res = SHPathPrepareForWriteA(0, 0, path, SHPPFW_DIRCREATE); ok(res == HRESULT_FROM_WIN32(ERROR_DIRECTORY) || res == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) || /* WinMe */ res == HRESULT_FROM_WIN32(ERROR_INVALID_NAME), /* Vista */ - "Unexpected result : 0x%08x\n", res); + "Unexpected result : 0x%08lx\n", res);
/* file exists, SHPPFW_NONE, trailing \ */ set_curr_dir_path(path, "test1.txt\\0"); @@ -2414,39 +2414,39 @@ static void test_sh_path_prepare(void) ok(res == HRESULT_FROM_WIN32(ERROR_DIRECTORY) || res == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) || /* WinMe */ res == HRESULT_FROM_WIN32(ERROR_INVALID_NAME), /* Vista */ - "Unexpected result : 0x%08x\n", res); + "Unexpected result : 0x%08lx\n", res);
/* relative path exists, SHPPFW_DIRCREATE */ res = SHPathPrepareForWriteA(0, 0, ".\testdir2", SHPPFW_DIRCREATE); - ok(res == S_OK, "res == 0x%08x, expected S_OK\n", res); + ok(res == S_OK, "res == 0x%08lx, expected S_OK\n", res);
/* relative path doesn't exist, SHPPFW_DIRCREATE -- Windows does not create the directory in this case */ res = SHPathPrepareForWriteA(0, 0, ".\testdir2\test4.txt", SHPPFW_DIRCREATE); - ok(res == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), "res == 0x%08x, expected HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND)\n", res); + ok(res == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), "res == 0x%08lx, expected HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND)\n", res); ok(!file_exists(".\testdir2\test4.txt\"), ".\testdir2\test4.txt\ exists but shouldn't\n");
/* directory doesn't exist, SHPPFW_NONE */ set_curr_dir_path(path, "nonexistent\0"); res = SHPathPrepareForWriteA(0, 0, path, SHPPFW_NONE); - ok(res == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), "res == 0x%08x, expected HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND)\n", res); + ok(res == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), "res == 0x%08lx, expected HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND)\n", res);
/* directory doesn't exist, SHPPFW_IGNOREFILENAME */ set_curr_dir_path(path, "nonexistent\notreal\0"); res = SHPathPrepareForWriteA(0, 0, path, SHPPFW_IGNOREFILENAME); - ok(res == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), "res == 0x%08x, expected HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND)\n", res); + ok(res == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), "res == 0x%08lx, expected HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND)\n", res); ok(!file_exists("nonexistent\notreal"), "nonexistent\notreal exists but shouldn't\n"); ok(!file_exists("nonexistent\"), "nonexistent\ exists but shouldn't\n");
/* directory doesn't exist, SHPPFW_IGNOREFILENAME|SHPPFW_DIRCREATE */ set_curr_dir_path(path, "testdir2\test4.txt\\0"); res = SHPathPrepareForWriteA(0, 0, path, SHPPFW_IGNOREFILENAME|SHPPFW_DIRCREATE); - ok(res == S_OK, "res == 0x%08x, expected S_OK\n", res); + ok(res == S_OK, "res == 0x%08lx, expected S_OK\n", res); ok(file_exists("testdir2\test4.txt\"), "testdir2\test4.txt doesn't exist but should\n");
/* nested directory doesn't exist, SHPPFW_DIRCREATE */ set_curr_dir_path(path, "nonexistent\notreal\0"); res = SHPathPrepareForWriteA(0, 0, path, SHPPFW_DIRCREATE); - ok(res == S_OK, "res == 0x%08x, expected S_OK\n", res); + ok(res == S_OK, "res == 0x%08lx, expected S_OK\n", res); ok(file_exists("nonexistent\notreal"), "nonexistent\notreal doesn't exist but should\n");
/* SHPPFW_ASKDIRCREATE, SHPPFW_NOWRITECHECK, and SHPPFW_MEDIACHECKONLY are untested */ @@ -2455,7 +2455,7 @@ static void test_sh_path_prepare(void) UsedDefaultChar = FALSE; if (WideCharToMultiByte(CP_ACP, WC_NO_BEST_FIT_CHARS, UNICODE_PATH, -1, UNICODE_PATH_A, sizeof(UNICODE_PATH_A), NULL, &UsedDefaultChar) == 0) { - win_skip("Could not convert Unicode path name to multibyte (%d)\n", GetLastError()); + win_skip("Could not convert Unicode path name to multibyte (%ld)\n", GetLastError()); return; } if (UsedDefaultChar) @@ -2467,22 +2467,22 @@ static void test_sh_path_prepare(void) /* unicode directory doesn't exist, SHPPFW_NONE */ RemoveDirectoryA(UNICODE_PATH_A); res = SHPathPrepareForWriteW(0, 0, UNICODE_PATH, SHPPFW_NONE); - ok(res == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), "res == %08x, expected HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND)\n", res); + ok(res == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), "res == %08lx, expected HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND)\n", res); ok(!file_exists(UNICODE_PATH_A), "unicode path was created but shouldn't be\n"); RemoveDirectoryA(UNICODE_PATH_A);
/* unicode directory doesn't exist, SHPPFW_DIRCREATE */ res = SHPathPrepareForWriteW(0, 0, UNICODE_PATH, SHPPFW_DIRCREATE); - ok(res == S_OK, "res == %08x, expected S_OK\n", res); + ok(res == S_OK, "res == %08lx, expected S_OK\n", res); ok(file_exists(UNICODE_PATH_A), "unicode path should've been created\n");
/* unicode directory exists, SHPPFW_NONE */ res = SHPathPrepareForWriteW(0, 0, UNICODE_PATH, SHPPFW_NONE); - ok(res == S_OK, "ret == %08x, expected S_OK\n", res); + ok(res == S_OK, "ret == %08lx, expected S_OK\n", res);
/* unicode directory exists, SHPPFW_DIRCREATE */ res = SHPathPrepareForWriteW(0, 0, UNICODE_PATH, SHPPFW_DIRCREATE); - ok(res == S_OK, "ret == %08x, expected S_OK\n", res); + ok(res == S_OK, "ret == %08lx, expected S_OK\n", res); RemoveDirectoryA(UNICODE_PATH_A); }
@@ -2509,7 +2509,7 @@ static void test_sh_new_link_info(void) ret = SHGetNewLinkInfoA(linkto, destdir, result, &mustcopy, 0); ok(ret == TRUE || broken(ret == lstrlenA(result) + 1), /* NT4 */ - "SHGetNewLinkInfoA failed, err=%i\n", GetLastError()); + "SHGetNewLinkInfoA failed, err=%li\n", GetLastError()); ok(mustcopy == FALSE, "mustcopy should be FALSE\n");
/* source file exists */ @@ -2518,7 +2518,7 @@ static void test_sh_new_link_info(void) ret = SHGetNewLinkInfoA(linkto, destdir, result, &mustcopy, 0); ok(ret == TRUE || broken(ret == lstrlenA(result) + 1), /* NT4 */ - "SHGetNewLinkInfoA failed, err=%i\n", GetLastError()); + "SHGetNewLinkInfoA failed, err=%li\n", GetLastError()); ok(mustcopy == FALSE, "mustcopy should be FALSE\n"); ok(CompareStringA(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE, destdir, lstrlenA(destdir), result, lstrlenA(destdir)) == CSTR_EQUAL, @@ -2531,7 +2531,7 @@ static void test_sh_new_link_info(void) ret = SHGetNewLinkInfoA(linkto, destdir, result2, &mustcopy, 0); ok(ret == TRUE || broken(ret == lstrlenA(result2) + 1), /* NT4 */ - "SHGetNewLinkInfoA failed, err=%i\n", GetLastError()); + "SHGetNewLinkInfoA failed, err=%li\n", GetLastError()); ok(mustcopy == FALSE, "mustcopy should be FALSE\n"); ok(CompareStringA(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE, destdir, lstrlenA(destdir), result2, lstrlenA(destdir)) == CSTR_EQUAL, @@ -2626,7 +2626,7 @@ static void test_unicode(void) ok(!shfoW.fAnyOperationsAborted, "Didn't expect aborted operations\n"); ok(GetLastError() == ERROR_SUCCESS || broken(GetLastError() == ERROR_INVALID_HANDLE), /* WinXp, win2k3 */ - "Expected ERROR_SUCCESS, got %d\n", GetLastError()); + "Expected ERROR_SUCCESS, got %ld\n", GetLastError()); DeleteFileW(UNICODE_PATH_TO);
/* Check last error after a failed file operation. */ @@ -2638,7 +2638,7 @@ static void test_unicode(void) ok(!shfoW.fAnyOperationsAborted, "Didn't expect aborted operations\n"); ok(GetLastError() == ERROR_SUCCESS || broken(GetLastError() == ERROR_INVALID_HANDLE), /* WinXp, win2k3 */ - "Expected ERROR_SUCCESS, got %d\n", GetLastError()); + "Expected ERROR_SUCCESS, got %ld\n", GetLastError());
/* Check SHCreateDirectoryExW with a Hwnd * returns ERROR_ALREADY_EXISTS where a directory already exists */ @@ -2664,36 +2664,36 @@ test_shlmenu(void) { BOOL bres;
hres = Shell_MergeMenus (0, 0, 0x42, 0x4242, 0x424242, 0); - ok (hres == 0x4242, "expected 0x4242 but got %x\n", hres); + ok (hres == 0x4242, "expected 0x4242 but got %lx\n", hres); hres = Shell_MergeMenus ((HMENU)42, 0, 0x42, 0x4242, 0x424242, 0); - ok (hres == 0x4242, "expected 0x4242 but got %x\n", hres); + ok (hres == 0x4242, "expected 0x4242 but got %lx\n", hres);
src_menu = CreatePopupMenu (); - ok (src_menu != NULL, "CreatePopupMenu() failed, error %d\n", GetLastError ()); + ok (src_menu != NULL, "CreatePopupMenu() failed, error %ld\n", GetLastError ());
dst_menu = CreatePopupMenu (); - ok (dst_menu != NULL, "CreatePopupMenu() failed, error %d\n", GetLastError ()); + ok (dst_menu != NULL, "CreatePopupMenu() failed, error %ld\n", GetLastError ()); bres = InsertMenuA (src_menu, -1, MF_BYPOSITION | MF_STRING, 10, "item1"); - ok (bres, "InsertMenuA failed, error %d\n", GetLastError()); + ok (bres, "InsertMenuA failed, error %ld\n", GetLastError()); bres = InsertMenuA (src_menu, -1, MF_BYPOSITION | MF_STRING, 11, "item2"); - ok (bres, "InsertMenuA failed, error %d\n", GetLastError()); + ok (bres, "InsertMenuA failed, error %ld\n", GetLastError()); hres = Shell_MergeMenus (dst_menu, src_menu, 0, 123, 133, MM_SUBMENUSHAVEIDS); - ok (hres == 134, "got %d\n", hres); + ok (hres == 134, "got %ld\n", hres); count = GetMenuItemCount (dst_menu); ok (count == 1, "got %d\n", count); memset (&item_info, 0, sizeof(item_info)); item_info.cbSize = sizeof(item_info); item_info.fMask = MIIM_ID; bres = GetMenuItemInfoA (dst_menu, 0, TRUE, &item_info); - ok (bres, "GetMenuItemInfoA failed, error %d\n", GetLastError ()); + ok (bres, "GetMenuItemInfoA failed, error %ld\n", GetLastError ()); ok (item_info.wID == 133, "got %d\n", item_info.wID); DestroyMenu (dst_menu);
/* integer overflow: Shell_MergeMenus() return value is wrong, but items are still added */ dst_menu = CreatePopupMenu (); - ok (dst_menu != NULL, "CreatePopupMenu() failed, error %d\n", GetLastError ()); + ok (dst_menu != NULL, "CreatePopupMenu() failed, error %ld\n", GetLastError ()); hres = Shell_MergeMenus (dst_menu, src_menu, 0, -1, 133, MM_SUBMENUSHAVEIDS); - ok (hres == -1, "got %d\n", hres); + ok (hres == -1, "got %ld\n", hres); count = GetMenuItemCount (dst_menu); ok (count == 2, "got %d\n", count); DestroyMenu (dst_menu); @@ -2748,7 +2748,7 @@ static void test_file_operation(void) hr = CoCreateInstance(&CLSID_FileOperation, NULL, CLSCTX_INPROC_SERVER, &IID_IFileOperation, (void **)&operation); ok(hr == S_OK || broken(hr == REGDB_E_CLASSNOTREG) /* before vista */, - "Got hr %#x.\n", hr); + "Got hr %#lx.\n", hr); if (hr == REGDB_E_CLASSNOTREG) { win_skip("IFileOperation isn't supported.\n"); @@ -2756,7 +2756,7 @@ static void test_file_operation(void) }
hr = IFileOperation_QueryInterface(operation, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IUnknown_Release(unk);
IFileOperation_Release(operation); diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c index 608d4defcb9..8105ba71e54 100644 --- a/dlls/shell32/tests/shlfolder.c +++ b/dlls/shell32/tests/shlfolder.c @@ -200,16 +200,16 @@ static void test_ParseDisplayName(void) int i;
hr = SHGetDesktopFolder(&desktop); - ok(hr == S_OK, "Expected SHGetDesktopFolder to return S_OK, got 0x%08x\n", hr); + ok(hr == S_OK, "Expected SHGetDesktopFolder to return S_OK, got 0x%08lx\n", hr);
hr = IShellFolder_ParseDisplayName(desktop, NULL, NULL, NULL, NULL, &pidl, NULL); - ok(hr == E_INVALIDARG, "got %#x\n", hr); + ok(hr == E_INVALIDARG, "got %#lx\n", hr);
for (i = 0; i < ARRAY_SIZE(parse_tests); i++) { hr = IShellFolder_ParseDisplayName(desktop, NULL, NULL, parse_tests[i].path, NULL, &pidl, NULL); todo_wine_if(parse_tests[i].todo) - ok(hr == parse_tests[i].hr, "%s: expected %#x, got %#x\n", + ok(hr == parse_tests[i].hr, "%s: expected %#lx, got %#lx\n", wine_dbgstr_w(parse_tests[i].path), parse_tests[i].hr, hr); if (SUCCEEDED(hr)) CoTaskMemFree(pidl); @@ -220,10 +220,10 @@ static void test_ParseDisplayName(void) * out it doesn't. The magic seems to happen in the file dialogs, then. */
bRes = SHGetSpecialFolderPathW(NULL, buffer, CSIDL_PERSONAL, FALSE); - ok(bRes, "SHGetSpecialFolderPath(CSIDL_PERSONAL) failed! %u\n", GetLastError()); + ok(bRes, "SHGetSpecialFolderPath(CSIDL_PERSONAL) failed! %lu\n", GetLastError());
hr = IShellFolder_ParseDisplayName(desktop, NULL, NULL, buffer, NULL, &pidl, 0); - ok(hr == S_OK, "DesktopFolder->ParseDisplayName failed. hr = %08x.\n", hr); + ok(hr == S_OK, "DesktopFolder->ParseDisplayName failed. hr = %08lx.\n", hr);
ok(ILFindLastID(pidl)->mkid.abID[0] == 0x31, "Last pidl should be of type PT_FOLDER, but is: %02x\n", @@ -237,17 +237,17 @@ static void test_ParseDisplayName(void) CreateDirectoryW(testdirW, NULL);
hr = IShellFolder_ParseDisplayName(desktop, NULL, NULL, testdirW, NULL, &pidl, NULL); - ok(hr == 0x80070002, "got %#x\n", hr); + ok(hr == 0x80070002, "got %#lx\n", hr);
RemoveDirectoryW(testdirW);
hr = SHGetSpecialFolderPathW(NULL, buffer, CSIDL_DESKTOP, FALSE); - ok(hr == S_FALSE, "got %#x\n", hr); + ok(hr == S_FALSE, "got %#lx\n", hr); SetCurrentDirectoryW(buffer); CreateDirectoryW(testdirW, NULL);
hr = IShellFolder_ParseDisplayName(desktop, NULL, NULL, testdirW, NULL, &pidl, NULL); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
ok(SHGetPathFromIDListW(pidl, buffer2), "SHGetPathFromIDList failed\n"); lstrcatW(buffer, backslashW); @@ -339,7 +339,7 @@ static void test_EnumObjects(IShellFolder *iFolder) };
hr = IShellFolder_EnumObjects(iFolder, NULL, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS | SHCONTF_INCLUDEHIDDEN, &iEnumList); - ok(hr == S_OK, "EnumObjects failed %08x\n", hr); + ok(hr == S_OK, "EnumObjects failed %08lx\n", hr);
/* This is to show that, contrary to what is said on MSDN, on IEnumIDList::Next, * the filesystem shellfolders return S_OK even if less than 'celt' items are @@ -350,7 +350,7 @@ static void test_EnumObjects(IShellFolder *iFolder) ok (i == 5, "i: %d\n", i);
hr = IEnumIDList_Release(iEnumList); - ok(hr == S_OK, "IEnumIDList_Release failed %08x\n", hr); + ok(hr == S_OK, "IEnumIDList_Release failed %08lx\n", hr);
/* Sort them first in case of wrong order from system */ for (i=0;i<5;i++) for (j=0;j<5;j++) @@ -364,7 +364,7 @@ static void test_EnumObjects(IShellFolder *iFolder) for (i=0;i<5;i++) for (j=0;j<5;j++) { hr = IShellFolder_CompareIDs(iFolder, 0, idlArr[i], idlArr[j]); - ok(hr == iResults[i][j], "Got %x expected [%d]-[%d]=%x\n", hr, i, j, iResults[i][j]); + ok(hr == iResults[i][j], "Got %lx expected [%d]-[%d]=%x\n", hr, i, j, iResults[i][j]); }
for (i = 0; i < ARRAY_SIZE(attrs); ++i) @@ -374,20 +374,20 @@ static void test_EnumObjects(IShellFolder *iFolder) flags = SFGAO_CANCOPY; hr = IShellFolder_GetAttributesOf(iFolder, 1, (LPCITEMIDLIST*)(idlArr + i), &flags); flags &= SFGAO_testfor; - ok(hr == S_OK, "Failed to get item attributes, hr %#x.\n", hr); - ok((flags & attrs[i]) == attrs[i], "%i: unexpected attributes got %#x, expected %#x.\n", i, flags, attrs[i]); + ok(hr == S_OK, "Failed to get item attributes, hr %#lx.\n", hr); + ok((flags & attrs[i]) == attrs[i], "%i: unexpected attributes got %#lx, expected %#lx.\n", i, flags, attrs[i]);
flags = SFGAO_testfor; hr = IShellFolder_GetAttributesOf(iFolder, 1, (LPCITEMIDLIST*)(idlArr + i), &flags); flags &= SFGAO_testfor; - ok(hr == S_OK, "Failed to get item attributes, hr %#x.\n", hr); - ok(flags == (attrs[i] | SFGAO_CAPABILITYMASK), "%i: unexpected attributes got %#x, expected %#x.\n", + ok(hr == S_OK, "Failed to get item attributes, hr %#lx.\n", hr); + ok(flags == (attrs[i] | SFGAO_CAPABILITYMASK), "%i: unexpected attributes got %#lx, expected %#lx.\n", i, flags, attrs[i]);
flags = ~0u; hr = IShellFolder_GetAttributesOf(iFolder, 1, (LPCITEMIDLIST*)(idlArr + i), &flags); - ok(hr == S_OK, "Failed to get item attributes, hr %#x.\n", hr); - ok((flags & ~(SFGAO_HASSUBFOLDER|SFGAO_COMPRESSED)) == full_attrs[i], "%d: unexpected attributes %#x, expected %#x\n", + ok(hr == S_OK, "Failed to get item attributes, hr %#lx.\n", hr); + ok((flags & ~(SFGAO_HASSUBFOLDER|SFGAO_COMPRESSED)) == full_attrs[i], "%d: unexpected attributes %#lx, expected %#lx\n", i, flags, full_attrs[i]); }
@@ -419,36 +419,36 @@ static void test_BindToObject(void) * with an empty pidl. This is tested for Desktop, MyComputer and the FS ShellFolder */ hr = SHGetDesktopFolder(&psfDesktop); - ok (hr == S_OK, "SHGetDesktopFolder failed! hr = %08x\n", hr); + ok (hr == S_OK, "SHGetDesktopFolder failed! hr = %08lx\n", hr); if (hr != S_OK) return;
hr = IShellFolder_BindToObject(psfDesktop, pidlEmpty, NULL, &IID_IShellFolder, (LPVOID*)&psfChild); - ok (hr == E_INVALIDARG, "Desktop's BindToObject should fail, when called with empty pidl! hr = %08x\n", hr); + ok (hr == E_INVALIDARG, "Desktop's BindToObject should fail, when called with empty pidl! hr = %08lx\n", hr);
hr = IShellFolder_BindToObject(psfDesktop, NULL, NULL, &IID_IShellFolder, (LPVOID*)&psfChild); - ok (hr == E_INVALIDARG, "Desktop's BindToObject should fail, when called with NULL pidl! hr = %08x\n", hr); + ok (hr == E_INVALIDARG, "Desktop's BindToObject should fail, when called with NULL pidl! hr = %08lx\n", hr);
hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, wszMyComputer, NULL, &pidlMyComputer, NULL); - ok (hr == S_OK, "Desktop's ParseDisplayName failed to parse MyComputer's CLSID! hr = %08x\n", hr); + ok (hr == S_OK, "Desktop's ParseDisplayName failed to parse MyComputer's CLSID! hr = %08lx\n", hr); if (hr != S_OK) { IShellFolder_Release(psfDesktop); return; }
hr = IShellFolder_BindToObject(psfDesktop, pidlMyComputer, NULL, &IID_IShellFolder, (LPVOID*)&psfMyComputer); - ok (hr == S_OK, "Desktop failed to bind to MyComputer object! hr = %08x\n", hr); + ok (hr == S_OK, "Desktop failed to bind to MyComputer object! hr = %08lx\n", hr); IShellFolder_Release(psfDesktop); ILFree(pidlMyComputer); if (hr != S_OK) return;
hr = IShellFolder_BindToObject(psfMyComputer, pidlEmpty, NULL, &IID_IShellFolder, (LPVOID*)&psfChild); - ok (hr == E_INVALIDARG, "MyComputers's BindToObject should fail, when called with empty pidl! hr = %08x\n", hr); + ok (hr == E_INVALIDARG, "MyComputers's BindToObject should fail, when called with empty pidl! hr = %08lx\n", hr);
hr = IShellFolder_BindToObject(psfMyComputer, NULL, NULL, &IID_IShellFolder, (LPVOID*)&psfChild); - ok (hr == E_INVALIDARG, "MyComputers's BindToObject should fail, when called with NULL pidl! hr = %08x\n", hr); + ok (hr == E_INVALIDARG, "MyComputers's BindToObject should fail, when called with NULL pidl! hr = %08lx\n", hr);
cChars = GetSystemDirectoryA(szSystemDir, MAX_PATH); - ok (cChars > 0 && cChars < MAX_PATH, "GetSystemDirectoryA failed! LastError: %u\n", GetLastError()); + ok (cChars > 0 && cChars < MAX_PATH, "GetSystemDirectoryA failed! LastError: %lu\n", GetLastError()); if (cChars == 0 || cChars >= MAX_PATH) { IShellFolder_Release(psfMyComputer); return; @@ -456,25 +456,25 @@ static void test_BindToObject(void) MultiByteToWideChar(CP_ACP, 0, szSystemDir, -1, wszSystemDir, MAX_PATH);
hr = IShellFolder_ParseDisplayName(psfMyComputer, NULL, NULL, wszSystemDir, NULL, &pidlSystemDir, NULL); - ok (hr == S_OK, "MyComputers's ParseDisplayName failed to parse the SystemDirectory! hr = %08x\n", hr); + ok (hr == S_OK, "MyComputers's ParseDisplayName failed to parse the SystemDirectory! hr = %08lx\n", hr); if (hr != S_OK) { IShellFolder_Release(psfMyComputer); return; }
hr = IShellFolder_BindToObject(psfMyComputer, pidlSystemDir, NULL, &IID_IShellFolder, (LPVOID*)&psfSystemDir); - ok (hr == S_OK, "MyComputer failed to bind to a FileSystem ShellFolder! hr = %08x\n", hr); + ok (hr == S_OK, "MyComputer failed to bind to a FileSystem ShellFolder! hr = %08lx\n", hr); IShellFolder_Release(psfMyComputer); ILFree(pidlSystemDir); if (hr != S_OK) return;
hr = IShellFolder_BindToObject(psfSystemDir, pidlEmpty, NULL, &IID_IShellFolder, (LPVOID*)&psfChild); ok (hr == E_INVALIDARG, - "FileSystem ShellFolder's BindToObject should fail, when called with empty pidl! hr = %08x\n", hr); + "FileSystem ShellFolder's BindToObject should fail, when called with empty pidl! hr = %08lx\n", hr);
hr = IShellFolder_BindToObject(psfSystemDir, NULL, NULL, &IID_IShellFolder, (LPVOID*)&psfChild); ok (hr == E_INVALIDARG, - "FileSystem ShellFolder's BindToObject should fail, when called with NULL pidl! hr = %08x\n", hr); + "FileSystem ShellFolder's BindToObject should fail, when called with NULL pidl! hr = %08lx\n", hr);
IShellFolder_Release(psfSystemDir);
@@ -499,23 +499,23 @@ static void test_BindToObject(void) CloseHandle(hfile); MultiByteToWideChar(CP_ACP, 0, pathA, -1, path, MAX_PATH); hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, path, NULL, &pidl, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { hr = IShellFolder_BindToObject(psfDesktop, pidl, NULL, &IID_IShellFolder, (void**)&psfChild); ok(hr == S_OK || hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), /* XP, W2K3 */ - "Got 0x%08x\n", hr); + "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { IPersist *pp; hr = IShellFolder_QueryInterface(psfChild, &IID_IPersist, (void**)&pp); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { CLSID id; hr = IPersist_GetClassID(pp, &id); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(IsEqualIID(&id, &CLSID_ShellDocObjView), "Unexpected classid %s\n", wine_dbgstr_guid(&id)); IPersist_Release(pp); } @@ -538,13 +538,13 @@ static void test_BindToObject(void) CloseHandle(hfile); MultiByteToWideChar(CP_ACP, 0, pathA, -1, path, MAX_PATH); hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, path, NULL, &pidl, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { hr = IShellFolder_BindToObject(psfDesktop, pidl, NULL, &IID_IShellFolder, (void**)&psfChild); ok(hr == E_FAIL || /* Vista+ */ hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), /* XP, W2K3 */ - "Got 0x%08x\n", hr); + "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) IShellFolder_Release(psfChild); ILFree(pidl); } @@ -562,13 +562,13 @@ static void test_BindToObject(void) CloseHandle(hfile); MultiByteToWideChar(CP_ACP, 0, pathA, -1, path, MAX_PATH); hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, path, NULL, &pidl, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { hr = IShellFolder_BindToObject(psfDesktop, pidl, NULL, &IID_IShellFolder, (void**)&psfChild); ok(hr == E_FAIL || /* Vista+ */ hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), /* XP, W2K3 */ - "Got 0x%08x\n", hr); + "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) IShellFolder_Release(psfChild); ILFree(pidl); } @@ -586,16 +586,16 @@ static void test_BindToObject(void) CloseHandle(hfile); MultiByteToWideChar(CP_ACP, 0, pathA, -1, path, MAX_PATH); hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, path, NULL, &pidl, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
hr = IShellFolder_BindToObject(psfDesktop, pidl, NULL, &IID_IShellFolder, (void **)&psfChild); ok(hr == S_OK || hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), /* XP, W2K3 */ - "Got 0x%08x\n", hr); + "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) IShellFolder_Release(psfChild); ILFree(pidl); if(!DeleteFileA(pathA)) - trace("Failed to delete: %d\n", GetLastError()); + trace("Failed to delete: %ld\n", GetLastError());
SHGetSpecialFolderPathA(NULL, pathA, CSIDL_DESKTOP, FALSE); lstrcatA(pathA, "\"); @@ -605,12 +605,12 @@ static void test_BindToObject(void) CloseHandle(hfile); MultiByteToWideChar(CP_ACP, 0, pathA, -1, path, MAX_PATH); hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, path, NULL, &pidl, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
hr = IShellFolder_BindToObject(psfDesktop, pidl, NULL, &IID_IShellFolder, (void **)&psfChild); ok(hr == E_FAIL || /* Vista+ */ hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), /* XP, W2K3 */ - "Got 0x%08x\n", hr); + "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) IShellFolder_Release(psfChild); ILFree(pidl); DeleteFileA(pathA); @@ -650,7 +650,7 @@ static void test_GetDisplayName(void)
/* First creating a directory in MyDocuments and a file in this directory. */ result = SHGetSpecialFolderPathA(NULL, szTestDir, CSIDL_PERSONAL, FALSE); - ok(result, "SHGetSpecialFolderPathA failed! Last error: %u\n", GetLastError()); + ok(result, "SHGetSpecialFolderPathA failed! Last error: %lu\n", GetLastError()); if (!result) return;
/* Use ANSI file functions so this works on Windows 9x */ @@ -667,19 +667,19 @@ static void test_GetDisplayName(void) lstrcatA(szTestFile, "\"); lstrcatA(szTestFile, szFileName); hTestFile = CreateFileA(szTestFile, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); - ok((hTestFile != INVALID_HANDLE_VALUE), "CreateFileA failed! Last error: %u\n", GetLastError()); + ok((hTestFile != INVALID_HANDLE_VALUE), "CreateFileA failed! Last error: %lu\n", GetLastError()); if (hTestFile == INVALID_HANDLE_VALUE) return; CloseHandle(hTestFile);
/* Getting an itemidlist for the file. */ hr = SHGetDesktopFolder(&psfDesktop); - ok(hr == S_OK, "SHGetDesktopFolder failed! hr = %08x\n", hr); + ok(hr == S_OK, "SHGetDesktopFolder failed! hr = %08lx\n", hr); if (hr != S_OK) return;
MultiByteToWideChar(CP_ACP, 0, szTestFile, -1, wszTestFile, MAX_PATH);
hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, wszTestFile, NULL, &pidlTestFile, NULL); - ok(hr == S_OK, "Desktop->ParseDisplayName failed! hr = %08x\n", hr); + ok(hr == S_OK, "Desktop->ParseDisplayName failed! hr = %08lx\n", hr); if (hr != S_OK) { IShellFolder_Release(psfDesktop); return; @@ -705,18 +705,18 @@ static void test_GetDisplayName(void) hr = IShellFolder_BindToObject(psfDesktop, pidlTestFile, NULL, &IID_IUnknown, (VOID**)&psfFile); ok (hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || hr == E_NOTIMPL, /* Vista */ - "hr = %08x\n", hr); + "hr = %08lx\n", hr); if (hr == S_OK) { IUnknown_Release(psfFile); }
/* Some tests for IShellFolder::SetNameOf */ hr = SHBindToParent(pidlTestFile, &IID_IShellFolder, (void **)&psfPersonal, &pidlLast); - ok(hr == S_OK, "SHBindToParent failed! hr = %08x\n", hr); + ok(hr == S_OK, "SHBindToParent failed! hr = %08lx\n", hr);
/* The pidl returned through the last parameter of SetNameOf is a simple one. */ hr = IShellFolder_SetNameOf(psfPersonal, NULL, pidlLast, wszDirName, SHGDN_NORMAL, &pidlNew); - ok (hr == S_OK, "SetNameOf failed! hr = %08x\n", hr); + ok (hr == S_OK, "SetNameOf failed! hr = %08lx\n", hr);
ok (((ITEMIDLIST *)((BYTE *)pidlNew + pidlNew->mkid.cb))->mkid.cb == 0, "pidl returned from SetNameOf should be simple!\n"); @@ -724,12 +724,12 @@ static void test_GetDisplayName(void) /* Passing an absolute path to SetNameOf fails. The HRESULT code indicates that SetNameOf * is implemented on top of SHFileOperation in WinXP. */ hr = IShellFolder_SetNameOf(psfPersonal, NULL, pidlNew, wszAbsoluteFilename, SHGDN_FORPARSING, NULL); - ok (hr == HRESULT_FROM_WIN32(ERROR_CANCELLED), "SetNameOf succeeded! hr = %08x\n", hr); + ok (hr == HRESULT_FROM_WIN32(ERROR_CANCELLED), "SetNameOf succeeded! hr = %08lx\n", hr);
/* Rename the file back to its original name. SetNameOf ignores the fact, that the * SHGDN flags specify an absolute path. */ hr = IShellFolder_SetNameOf(psfPersonal, NULL, pidlNew, wszFileName, SHGDN_FORPARSING, NULL); - ok (hr == S_OK, "SetNameOf failed! hr = %08x\n", hr); + ok (hr == S_OK, "SetNameOf failed! hr = %08lx\n", hr);
ILFree(pidlNew); IShellFolder_Release(psfPersonal); @@ -740,24 +740,24 @@ static void test_GetDisplayName(void)
/* SHGetPathFromIDListW still works, although the file is not present anymore. */ result = SHGetPathFromIDListW(pidlTestFile, wszTestFile2); - ok (result, "SHGetPathFromIDListW failed! Last error: %u\n", GetLastError()); + ok (result, "SHGetPathFromIDListW failed! Last error: %lu\n", GetLastError()); ok (!lstrcmpiW(wszTestFile, wszTestFile2), "SHGetPathFromIDListW returns incorrect path!\n");
/* SHBindToParent fails, if called with a NULL PIDL. */ hr = SHBindToParent(NULL, &IID_IShellFolder, (void **)&psfPersonal, &pidlLast); ok (hr == E_INVALIDARG || broken(hr == E_OUTOFMEMORY) /* XP */, - "SHBindToParent(NULL) should fail! hr = %08x\n", hr); + "SHBindToParent(NULL) should fail! hr = %08lx\n", hr);
/* But it succeeds with an empty PIDL. */ hr = SHBindToParent(pidlEmpty, &IID_IShellFolder, (void **)&psfPersonal, &pidlLast); - ok (hr == S_OK, "SHBindToParent(empty PIDL) should succeed! hr = %08x\n", hr); + ok (hr == S_OK, "SHBindToParent(empty PIDL) should succeed! hr = %08lx\n", hr); ok (pidlLast == pidlEmpty, "The last element of an empty PIDL should be the PIDL itself!\n"); if (hr == S_OK) IShellFolder_Release(psfPersonal);
/* Binding to the folder and querying the display name of the file also works. */ hr = SHBindToParent(pidlTestFile, &IID_IShellFolder, (void **)&psfPersonal, &pidlLast); - ok (hr == S_OK, "SHBindToParent failed! hr = %08x\n", hr); + ok (hr == S_OK, "SHBindToParent failed! hr = %08lx\n", hr); if (hr != S_OK) { IShellFolder_Release(psfDesktop); return; @@ -769,7 +769,7 @@ static void test_GetDisplayName(void) "SHBindToParent doesn't return the last id of the pidl param!\n");
hr = IShellFolder_GetDisplayNameOf(psfPersonal, pidlLast, SHGDN_FORPARSING, &strret); - ok (hr == S_OK, "Personal->GetDisplayNameOf failed! hr = %08x\n", hr); + ok (hr == S_OK, "Personal->GetDisplayNameOf failed! hr = %08lx\n", hr); if (hr != S_OK) { IShellFolder_Release(psfDesktop); IShellFolder_Release(psfPersonal); @@ -777,7 +777,7 @@ static void test_GetDisplayName(void) }
hr = StrRetToBufW(&strret, pidlLast, wszTestFile2, MAX_PATH); - ok (hr == S_OK, "StrRetToBufW failed! hr = %08x\n", hr); + ok (hr == S_OK, "StrRetToBufW failed! hr = %08lx\n", hr); ok (!lstrcmpiW(wszTestFile, wszTestFile2), "GetDisplayNameOf returns incorrect path!\n");
ILFree(pidlTestFile); @@ -815,13 +815,13 @@ static void test_CallForAttributes(void) * on MSDN. This test is meant to document the observed behaviour on WinXP SP2. */ hr = SHGetDesktopFolder(&psfDesktop); - ok (hr == S_OK, "SHGetDesktopFolder failed! hr = %08x\n", hr); + ok (hr == S_OK, "SHGetDesktopFolder failed! hr = %08lx\n", hr); if (hr != S_OK) return;
hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, wszMyDocuments, NULL, &pidlMyDocuments, NULL); ok (hr == S_OK, - "Desktop's ParseDisplayName failed to parse MyDocuments's CLSID! hr = %08x\n", hr); + "Desktop's ParseDisplayName failed to parse MyDocuments's CLSID! hr = %08lx\n", hr); if (hr != S_OK) { IShellFolder_Release(psfDesktop); return; @@ -830,7 +830,7 @@ static void test_CallForAttributes(void) dwAttributes = 0xffffffff; hr = IShellFolder_GetAttributesOf(psfDesktop, 1, (LPCITEMIDLIST*)&pidlMyDocuments, &dwAttributes); - ok (hr == S_OK, "Desktop->GetAttributesOf(MyDocuments) failed! hr = %08x\n", hr); + ok (hr == S_OK, "Desktop->GetAttributesOf(MyDocuments) failed! hr = %08lx\n", hr);
/* We need the following setup (as observed on WinXP SP2), for the tests to make sense. */ ok (dwAttributes & SFGAO_FILESYSTEM, "SFGAO_FILESYSTEM attribute is not set for MyDocuments!\n"); @@ -843,7 +843,7 @@ static void test_CallForAttributes(void) lResult = RegOpenKeyExW(HKEY_CLASSES_ROOT, wszMyDocumentsKey, 0, KEY_WRITE|KEY_READ, &hKey); ok (lResult == ERROR_SUCCESS || lResult == ERROR_ACCESS_DENIED, - "RegOpenKeyEx failed! result: %08x\n", lResult); + "RegOpenKeyEx failed! result: %08lx\n", lResult); if (lResult != ERROR_SUCCESS) { if (lResult == ERROR_ACCESS_DENIED) skip("Not enough rights to open the registry key\n"); @@ -855,7 +855,7 @@ static void test_CallForAttributes(void) /* Query MyDocuments' Attributes value, to be able to restore it later. */ dwSize = sizeof(DWORD); lResult = RegQueryValueExW(hKey, wszAttributes, NULL, NULL, (LPBYTE)&dwOrigAttributes, &dwSize); - ok (lResult == ERROR_SUCCESS, "RegQueryValueEx failed! result: %08x\n", lResult); + ok (lResult == ERROR_SUCCESS, "RegQueryValueEx failed! result: %08lx\n", lResult); if (lResult != ERROR_SUCCESS) { RegCloseKey(hKey); ILFree(pidlMyDocuments); @@ -867,7 +867,7 @@ static void test_CallForAttributes(void) dwSize = sizeof(DWORD); lResult = RegQueryValueExW(hKey, wszCallForAttributes, NULL, NULL, (LPBYTE)&dwOrigCallForAttributes, &dwSize); - ok (lResult == ERROR_SUCCESS, "RegQueryValueEx failed! result: %08x\n", lResult); + ok (lResult == ERROR_SUCCESS, "RegQueryValueEx failed! result: %08lx\n", lResult); if (lResult != ERROR_SUCCESS) { RegCloseKey(hKey); ILFree(pidlMyDocuments); @@ -892,10 +892,10 @@ static void test_CallForAttributes(void) dwAttributes = SFGAO_ISSLOW|SFGAO_GHOSTED|SFGAO_FILESYSTEM; hr = IShellFolder_GetAttributesOf(psfDesktop, 1, (LPCITEMIDLIST*)&pidlMyDocuments, &dwAttributes); - ok (hr == S_OK, "Desktop->GetAttributesOf(MyDocuments) failed! hr = %08x\n", hr); + ok (hr == S_OK, "Desktop->GetAttributesOf(MyDocuments) failed! hr = %08lx\n", hr); if (hr == S_OK) ok (dwAttributes == SFGAO_FILESYSTEM, - "Desktop->GetAttributes(MyDocuments) returned unexpected attributes: %08x\n", + "Desktop->GetAttributes(MyDocuments) returned unexpected attributes: %08lx\n", dwAttributes);
/* Restore MyDocuments' original Attributes and CallForAttributes registry values */ @@ -930,24 +930,24 @@ static void test_GetAttributesOf(void) int len;
hr = SHGetDesktopFolder(&psfDesktop); - ok (hr == S_OK, "SHGetDesktopFolder failed! hr = %08x\n", hr); + ok (hr == S_OK, "SHGetDesktopFolder failed! hr = %08lx\n", hr); if (hr != S_OK) return;
/* The Desktop attributes can be queried with a single empty itemidlist, .. */ dwFlags = 0xffffffff; hr = IShellFolder_GetAttributesOf(psfDesktop, 1, &pidlEmpty, &dwFlags); - ok (hr == S_OK, "Desktop->GetAttributesOf(empty pidl) failed! hr = %08x\n", hr); - ok (dwFlags == desktopFlags, "Wrong Desktop attributes: %08x\n", dwFlags); + ok (hr == S_OK, "Desktop->GetAttributesOf(empty pidl) failed! hr = %08lx\n", hr); + ok (dwFlags == desktopFlags, "Wrong Desktop attributes: %08lx\n", dwFlags);
/* .. or with no itemidlist at all. */ dwFlags = 0xffffffff; hr = IShellFolder_GetAttributesOf(psfDesktop, 0, NULL, &dwFlags); - ok (hr == S_OK, "Desktop->GetAttributesOf(NULL) failed! hr = %08x\n", hr); - ok (dwFlags == desktopFlags, "Wrong Desktop attributes: %08x\n", dwFlags); + ok (hr == S_OK, "Desktop->GetAttributesOf(NULL) failed! hr = %08lx\n", hr); + ok (dwFlags == desktopFlags, "Wrong Desktop attributes: %08lx\n", dwFlags);
/* Testing the attributes of the MyComputer shellfolder */ hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, wszMyComputer, NULL, &pidlMyComputer, NULL); - ok (hr == S_OK, "Desktop's ParseDisplayName failed to parse MyComputer's CLSID! hr = %08x\n", hr); + ok (hr == S_OK, "Desktop's ParseDisplayName failed to parse MyComputer's CLSID! hr = %08lx\n", hr); if (hr != S_OK) { IShellFolder_Release(psfDesktop); return; @@ -958,25 +958,25 @@ static void test_GetAttributesOf(void) */ dwFlags = 0xffffffff; hr = IShellFolder_GetAttributesOf(psfDesktop, 1, (LPCITEMIDLIST*)&pidlMyComputer, &dwFlags); - ok (hr == S_OK, "Desktop->GetAttributesOf(MyComputer) failed! hr = %08x\n", hr); + ok (hr == S_OK, "Desktop->GetAttributesOf(MyComputer) failed! hr = %08lx\n", hr); todo_wine - ok (dwFlags == (myComputerFlags | SFGAO_CANLINK), "Wrong MyComputer attributes: %08x\n", dwFlags); + ok (dwFlags == (myComputerFlags | SFGAO_CANLINK), "Wrong MyComputer attributes: %08lx\n", dwFlags);
hr = IShellFolder_BindToObject(psfDesktop, pidlMyComputer, NULL, &IID_IShellFolder, (LPVOID*)&psfMyComputer); - ok (hr == S_OK, "Desktop failed to bind to MyComputer object! hr = %08x\n", hr); + ok (hr == S_OK, "Desktop failed to bind to MyComputer object! hr = %08lx\n", hr); IShellFolder_Release(psfDesktop); ILFree(pidlMyComputer); if (hr != S_OK) return;
hr = IShellFolder_GetAttributesOf(psfMyComputer, 1, &pidlEmpty, &dwFlags); todo_wine - ok (hr == E_INVALIDARG, "MyComputer->GetAttributesOf(empty pidl) should fail! hr = %08x\n", hr); + ok (hr == E_INVALIDARG, "MyComputer->GetAttributesOf(empty pidl) should fail! hr = %08lx\n", hr);
dwFlags = 0xffffffff; hr = IShellFolder_GetAttributesOf(psfMyComputer, 0, NULL, &dwFlags); - ok (hr == S_OK, "MyComputer->GetAttributesOf(NULL) failed! hr = %08x\n", hr); + ok (hr == S_OK, "MyComputer->GetAttributesOf(NULL) failed! hr = %08lx\n", hr); todo_wine - ok (dwFlags == myComputerFlags, "Wrong MyComputer attributes: %08x\n", dwFlags); + ok (dwFlags == myComputerFlags, "Wrong MyComputer attributes: %08lx\n", dwFlags);
IShellFolder_Release(psfMyComputer);
@@ -996,25 +996,25 @@ static void test_GetAttributesOf(void) MultiByteToWideChar(CP_ACP, 0, cCurrDirA, -1, cCurrDirW, MAX_PATH);
hr = SHGetDesktopFolder(&IDesktopFolder); - ok(hr == S_OK, "SHGetDesktopfolder failed %08x\n", hr); + ok(hr == S_OK, "SHGetDesktopfolder failed %08lx\n", hr);
hr = IShellFolder_ParseDisplayName(IDesktopFolder, NULL, NULL, cCurrDirW, NULL, &newPIDL, 0); - ok(hr == S_OK, "ParseDisplayName failed %08x\n", hr); + ok(hr == S_OK, "ParseDisplayName failed %08lx\n", hr);
hr = IShellFolder_BindToObject(IDesktopFolder, newPIDL, NULL, (REFIID)&IID_IShellFolder, (LPVOID *)&testIShellFolder); - ok(hr == S_OK, "BindToObject failed %08x\n", hr); + ok(hr == S_OK, "BindToObject failed %08lx\n", hr);
ILFree(newPIDL);
/* get relative PIDL */ hr = IShellFolder_ParseDisplayName(testIShellFolder, NULL, NULL, cTestDirW, NULL, &newPIDL, 0); - ok(hr == S_OK, "ParseDisplayName failed %08x\n", hr); + ok(hr == S_OK, "ParseDisplayName failed %08lx\n", hr);
/* test the shell attributes of the test directory using the relative PIDL */ dwFlags = SFGAO_FOLDER; hr = IShellFolder_GetAttributesOf(testIShellFolder, 1, (LPCITEMIDLIST*)&newPIDL, &dwFlags); - ok (hr == S_OK, "Desktop->GetAttributesOf() failed! hr = %08x\n", hr); - ok ((dwFlags&SFGAO_FOLDER), "Wrong directory attribute for relative PIDL: %08x\n", dwFlags); + ok (hr == S_OK, "Desktop->GetAttributesOf() failed! hr = %08lx\n", hr); + ok ((dwFlags&SFGAO_FOLDER), "Wrong directory attribute for relative PIDL: %08lx\n", dwFlags);
/* free memory */ ILFree(newPIDL); @@ -1026,13 +1026,13 @@ static void test_GetAttributesOf(void) MultiByteToWideChar(CP_ACP, 0, cCurrDirA, -1, cCurrDirW, MAX_PATH);
hr = IShellFolder_ParseDisplayName(IDesktopFolder, NULL, NULL, cCurrDirW, NULL, &newPIDL, 0); - ok(hr == S_OK, "ParseDisplayName failed %08x\n", hr); + ok(hr == S_OK, "ParseDisplayName failed %08lx\n", hr);
/* test the shell attributes of the test directory using the absolute PIDL */ dwFlags = SFGAO_FOLDER; hr = IShellFolder_GetAttributesOf(IDesktopFolder, 1, (LPCITEMIDLIST*)&newPIDL, &dwFlags); - ok (hr == S_OK, "Desktop->GetAttributesOf() failed! hr = %08x\n", hr); - ok ((dwFlags&SFGAO_FOLDER), "Wrong directory attribute for absolute PIDL: %08x\n", dwFlags); + ok (hr == S_OK, "Desktop->GetAttributesOf() failed! hr = %08lx\n", hr); + ok ((dwFlags&SFGAO_FOLDER), "Wrong directory attribute for absolute PIDL: %08lx\n", dwFlags);
/* free memory */ ILFree(newPIDL); @@ -1073,21 +1073,21 @@ static void test_SHGetPathFromIDList(void)
/* Calling SHGetPathFromIDListW with an empty pidl should return the desktop folder's path. */ result = SHGetSpecialFolderPathW(NULL, wszDesktop, CSIDL_DESKTOP, FALSE); - ok(result, "SHGetSpecialFolderPathW(CSIDL_DESKTOP) failed! Last error: %u\n", GetLastError()); + ok(result, "SHGetSpecialFolderPathW(CSIDL_DESKTOP) failed! Last error: %lu\n", GetLastError()); if (!result) return;
result = SHGetPathFromIDListW(pidlEmpty, wszPath); - ok(result, "SHGetPathFromIDListW failed! Last error: %u\n", GetLastError()); + ok(result, "SHGetPathFromIDListW failed! Last error: %lu\n", GetLastError()); if (!result) return; ok(!lstrcmpiW(wszDesktop, wszPath), "SHGetPathFromIDListW didn't return desktop path for empty pidl!\n");
/* MyComputer does not map to a filesystem path. SHGetPathFromIDListW should fail. */ hr = SHGetDesktopFolder(&psfDesktop); - ok (hr == S_OK, "SHGetDesktopFolder failed! hr = %08x\n", hr); + ok (hr == S_OK, "SHGetDesktopFolder failed! hr = %08lx\n", hr); if (hr != S_OK) return;
hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, wszMyComputer, NULL, &pidlMyComputer, NULL); - ok (hr == S_OK, "Desktop's ParseDisplayName failed to parse MyComputer's CLSID! hr = %08x\n", hr); + ok (hr == S_OK, "Desktop's ParseDisplayName failed to parse MyComputer's CLSID! hr = %08lx\n", hr); if (hr != S_OK) { IShellFolder_Release(psfDesktop); return; @@ -1100,7 +1100,7 @@ static void test_SHGetPathFromIDList(void) ok (!result, "SHGetPathFromIDListW succeeded where it shouldn't!\n"); ok (GetLastError()==0xdeadbeef || GetLastError()==ERROR_SUCCESS, /* Vista and higher */ - "Unexpected last error from SHGetPathFromIDListW: %u\n", GetLastError()); + "Unexpected last error from SHGetPathFromIDListW: %lu\n", GetLastError()); ok (!wszPath[0], "Expected empty path\n"); if (result) { IShellFolder_Release(psfDesktop); @@ -1110,7 +1110,7 @@ static void test_SHGetPathFromIDList(void) ILFree(pidlMyComputer);
result = SHGetSpecialFolderPathW(NULL, wszFileName, CSIDL_DESKTOPDIRECTORY, FALSE); - ok(result, "SHGetSpecialFolderPathW failed! Last error: %u\n", GetLastError()); + ok(result, "SHGetSpecialFolderPathW failed! Last error: %lu\n", GetLastError()); if (!result) { IShellFolder_Release(psfDesktop); return; @@ -1118,7 +1118,7 @@ static void test_SHGetPathFromIDList(void) myPathAddBackslashW(wszFileName); lstrcatW(wszFileName, wszTestFile); hTestFile = CreateFileW(wszFileName, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, NULL); - ok(hTestFile != INVALID_HANDLE_VALUE, "CreateFileW failed! Last error: %u\n", GetLastError()); + ok(hTestFile != INVALID_HANDLE_VALUE, "CreateFileW failed! Last error: %lu\n", GetLastError()); if (hTestFile == INVALID_HANDLE_VALUE) { IShellFolder_Release(psfDesktop); return; @@ -1126,7 +1126,7 @@ static void test_SHGetPathFromIDList(void) CloseHandle(hTestFile);
hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, wszTestFile, NULL, &pidlTestFile, NULL); - ok (hr == S_OK, "Desktop's ParseDisplayName failed to parse filename hr = %08x\n", hr); + ok (hr == S_OK, "Desktop's ParseDisplayName failed to parse filename hr = %08lx\n", hr); if (hr != S_OK) { IShellFolder_Release(psfDesktop); DeleteFileW(wszFileName); @@ -1137,7 +1137,7 @@ static void test_SHGetPathFromIDList(void) /* This test is to show that the Desktop shellfolder prepends the CSIDL_DESKTOPDIRECTORY * path for files placed on the desktop, if called with SHGDN_FORPARSING. */ hr = IShellFolder_GetDisplayNameOf(psfDesktop, pidlTestFile, SHGDN_FORPARSING, &strret); - ok (hr == S_OK, "Desktop's GetDisplayNamfOf failed! hr = %08x\n", hr); + ok (hr == S_OK, "Desktop's GetDisplayNamfOf failed! hr = %08lx\n", hr); IShellFolder_Release(psfDesktop); DeleteFileW(wszFileName); if (hr != S_OK) { @@ -1150,30 +1150,30 @@ static void test_SHGetPathFromIDList(void) "returned incorrect path for file placed on desktop\n");
result = SHGetPathFromIDListW(pidlTestFile, wszPath); - ok(result, "SHGetPathFromIDListW failed! Last error: %u\n", GetLastError()); + ok(result, "SHGetPathFromIDListW failed! Last error: %lu\n", GetLastError()); ok(0 == lstrcmpW(wszFileName, wszPath), "SHGetPathFromIDListW returned incorrect path for file placed on desktop\n");
if (pSHGetPathFromIDListEx) { result = pSHGetPathFromIDListEx(pidlEmpty, wszPath, MAX_PATH, SFGAO_FILESYSTEM); - ok(result, "SHGetPathFromIDListEx failed: %u\n", GetLastError()); + ok(result, "SHGetPathFromIDListEx failed: %lu\n", GetLastError()); ok(!lstrcmpiW(wszDesktop, wszPath), "Unexpected SHGetPathFromIDListEx result %s, expected %s\n", wine_dbgstr_w(wszPath), wine_dbgstr_w(wszDesktop));
result = pSHGetPathFromIDListEx(pidlTestFile, wszPath, MAX_PATH, SFGAO_FILESYSTEM); - ok(result, "SHGetPathFromIDListEx failed: %u\n", GetLastError()); + ok(result, "SHGetPathFromIDListEx failed: %lu\n", GetLastError()); ok(!lstrcmpiW(wszFileName, wszPath), "Unexpected SHGetPathFromIDListEx result %s, expected %s\n", wine_dbgstr_w(wszPath), wine_dbgstr_w(wszFileName));
SetLastError(0xdeadbeef); memset(wszPath, 0x55, sizeof(wszPath)); result = pSHGetPathFromIDListEx(pidlTestFile, wszPath, 5, SFGAO_FILESYSTEM); - ok(!result, "SHGetPathFromIDListEx returned: %x(%u)\n", result, GetLastError()); + ok(!result, "SHGetPathFromIDListEx returned: %x(%lu)\n", result, GetLastError());
SetLastError(0xdeadbeef); memset(wszPath, 0x55, sizeof(wszPath)); result = pSHGetPathFromIDListEx(pidlEmpty, wszPath, 5, SFGAO_FILESYSTEM); - ok(!result, "SHGetPathFromIDListEx returned: %x(%u)\n", result, GetLastError()); + ok(!result, "SHGetPathFromIDListEx returned: %x(%lu)\n", result, GetLastError()); } else win_skip("SHGetPathFromIDListEx not available\n"); @@ -1182,7 +1182,7 @@ static void test_SHGetPathFromIDList(void)
/* Test if we can get the path from the start menu "program files" PIDL. */ hr = SHGetSpecialFolderLocation(NULL, CSIDL_PROGRAM_FILES, &pidlPrograms); - ok(hr == S_OK, "SHGetFolderLocation failed: 0x%08x\n", hr); + ok(hr == S_OK, "SHGetFolderLocation failed: 0x%08lx\n", hr);
SetLastError(0xdeadbeef); result = SHGetPathFromIDListW(pidlPrograms, wszPath); @@ -1214,15 +1214,15 @@ static void test_EnumObjects_and_CompareIDs(void) MultiByteToWideChar(CP_ACP, 0, cCurrDirA, -1, cTestDirW, MAX_PATH);
hr = SHGetDesktopFolder(&IDesktopFolder); - ok(hr == S_OK, "SHGetDesktopfolder failed %08x\n", hr); + ok(hr == S_OK, "SHGetDesktopfolder failed %08lx\n", hr);
CreateFilesFolders();
hr = IShellFolder_ParseDisplayName(IDesktopFolder, NULL, NULL, cTestDirW, NULL, &newPIDL, 0); - ok(hr == S_OK, "ParseDisplayName failed %08x\n", hr); + ok(hr == S_OK, "ParseDisplayName failed %08lx\n", hr);
hr = IShellFolder_BindToObject(IDesktopFolder, newPIDL, NULL, (REFIID)&IID_IShellFolder, (LPVOID *)&testIShellFolder); - ok(hr == S_OK, "BindToObject failed %08x\n", hr); + ok(hr == S_OK, "BindToObject failed %08lx\n", hr);
test_EnumObjects(testIShellFolder);
@@ -1298,7 +1298,7 @@ static HRESULT WINAPI InitPropertyBag_IPropertyBag_Read(IPropertyBag *iface, LPC if (V_VT(pVar) != VT_BSTR) return E_INVALIDARG;
result = SHGetSpecialFolderPathW(NULL, wszPath, CSIDL_DESKTOPDIRECTORY, FALSE); - ok(result, "SHGetSpecialFolderPathW(DESKTOPDIRECTORY) failed! %u\n", GetLastError()); + ok(result, "SHGetSpecialFolderPathW(DESKTOPDIRECTORY) failed! %lu\n", GetLastError()); if (!result) return E_INVALIDARG;
V_BSTR(pVar) = SysAllocString(wszPath); @@ -1384,11 +1384,11 @@ static void test_FolderShortcut(void) { win_skip("CLSID_FolderShortcut is not implemented\n"); return; } - ok (hr == S_OK, "CoCreateInstance failed! hr = 0x%08x\n", hr); + ok (hr == S_OK, "CoCreateInstance failed! hr = 0x%08lx\n", hr); if (hr != S_OK) return;
hr = IPersistPropertyBag_Load(pPersistPropertyBag, &InitPropertyBag, NULL); - ok(hr == S_OK, "IPersistPropertyBag_Load failed! hr = %08x\n", hr); + ok(hr == S_OK, "IPersistPropertyBag_Load failed! hr = %08lx\n", hr); if (hr != S_OK) { IPersistPropertyBag_Release(pPersistPropertyBag); return; @@ -1397,19 +1397,19 @@ static void test_FolderShortcut(void) { hr = IPersistPropertyBag_QueryInterface(pPersistPropertyBag, &IID_IShellFolder, (LPVOID*)&pShellFolder); IPersistPropertyBag_Release(pPersistPropertyBag); - ok(hr == S_OK, "IPersistPropertyBag_QueryInterface(IShellFolder) failed! hr = %08x\n", hr); + ok(hr == S_OK, "IPersistPropertyBag_QueryInterface(IShellFolder) failed! hr = %08lx\n", hr); if (hr != S_OK) return;
hr = IShellFolder_GetDisplayNameOf(pShellFolder, NULL, SHGDN_FORPARSING, &strret); ok(hr == S_OK || broken(hr == E_INVALIDARG) /* win10 */, - "IShellFolder_GetDisplayNameOf(NULL) failed! hr = %08x\n", hr); + "IShellFolder_GetDisplayNameOf(NULL) failed! hr = %08lx\n", hr); if (hr != S_OK) { IShellFolder_Release(pShellFolder); return; }
result = SHGetSpecialFolderPathW(NULL, wszDesktopPath, CSIDL_DESKTOPDIRECTORY, FALSE); - ok(result, "SHGetSpecialFolderPathW(CSIDL_DESKTOPDIRECTORY) failed! %u\n", GetLastError()); + ok(result, "SHGetSpecialFolderPathW(CSIDL_DESKTOPDIRECTORY) failed! %lu\n", GetLastError()); if (!result) return;
StrRetToBufW(&strret, NULL, wszBuffer, MAX_PATH); @@ -1417,15 +1417,15 @@ static void test_FolderShortcut(void) {
hr = IShellFolder_QueryInterface(pShellFolder, &IID_IPersistFolder3, (LPVOID*)&pPersistFolder3); IShellFolder_Release(pShellFolder); - ok(hr == S_OK, "IShellFolder_QueryInterface(IID_IPersistFolder3 failed! hr = 0x%08x\n", hr); + ok(hr == S_OK, "IShellFolder_QueryInterface(IID_IPersistFolder3 failed! hr = 0x%08lx\n", hr); if (hr != S_OK) return;
hr = IPersistFolder3_GetClassID(pPersistFolder3, &clsid); - ok(hr == S_OK, "IPersistFolder3_GetClassID failed! hr=0x%08x\n", hr); + ok(hr == S_OK, "IPersistFolder3_GetClassID failed! hr=0x%08lx\n", hr); ok(IsEqualCLSID(&clsid, &CLSID_FolderShortcut), "Unexpected CLSID!\n");
hr = IPersistFolder3_GetCurFolder(pPersistFolder3, &pidlCurrentFolder); - todo_wine ok(hr == S_FALSE, "IPersistFolder3_GetCurFolder failed! hr=0x%08x\n", hr); + todo_wine ok(hr == S_FALSE, "IPersistFolder3_GetCurFolder failed! hr=0x%08lx\n", hr); ok(!pidlCurrentFolder, "IPersistFolder3_GetCurFolder should return a NULL pidl!\n");
/* For FolderShortcut objects, the Initialize method initialized the folder's position in the @@ -1435,7 +1435,7 @@ static void test_FolderShortcut(void) { * itemidlist, but GetDisplayNameOf still returns the path from above. */ hr = SHGetDesktopFolder(&pDesktopFolder); - ok (hr == S_OK, "SHGetDesktopFolder failed! hr = %08x\n", hr); + ok (hr == S_OK, "SHGetDesktopFolder failed! hr = %08lx\n", hr); if (hr != S_OK) return;
/* Temporarily register WineTestFolder as a shell namespace extension at the Desktop. @@ -1446,11 +1446,11 @@ static void test_FolderShortcut(void) { &pidlWineTestFolder, NULL); RegDeleteKeyW(HKEY_CURRENT_USER, wszShellExtKey); IShellFolder_Release(pDesktopFolder); - ok (hr == S_OK, "IShellFolder::ParseDisplayName failed! hr = %08x\n", hr); + ok (hr == S_OK, "IShellFolder::ParseDisplayName failed! hr = %08lx\n", hr); if (hr != S_OK) return;
hr = IPersistFolder3_Initialize(pPersistFolder3, pidlWineTestFolder); - ok (hr == S_OK, "IPersistFolder3::Initialize failed! hr = %08x\n", hr); + ok (hr == S_OK, "IPersistFolder3::Initialize failed! hr = %08lx\n", hr); if (hr != S_OK) { IPersistFolder3_Release(pPersistFolder3); ILFree(pidlWineTestFolder); @@ -1458,7 +1458,7 @@ static void test_FolderShortcut(void) { }
hr = IPersistFolder3_GetCurFolder(pPersistFolder3, &pidlCurrentFolder); - ok(hr == S_OK, "IPersistFolder3_GetCurFolder failed! hr=0x%08x\n", hr); + ok(hr == S_OK, "IPersistFolder3_GetCurFolder failed! hr=0x%08lx\n", hr); ok(ILIsEqual(pidlCurrentFolder, pidlWineTestFolder), "IPersistFolder3_GetCurFolder should return pidlWineTestFolder!\n"); ILFree(pidlCurrentFolder); @@ -1466,11 +1466,11 @@ static void test_FolderShortcut(void) {
hr = IPersistFolder3_QueryInterface(pPersistFolder3, &IID_IShellFolder, (LPVOID*)&pShellFolder); IPersistFolder3_Release(pPersistFolder3); - ok(hr == S_OK, "IPersistFolder3_QueryInterface(IShellFolder) failed! hr = %08x\n", hr); + ok(hr == S_OK, "IPersistFolder3_QueryInterface(IShellFolder) failed! hr = %08lx\n", hr); if (hr != S_OK) return;
hr = IShellFolder_GetDisplayNameOf(pShellFolder, NULL, SHGDN_FORPARSING, &strret); - ok(hr == S_OK, "IShellFolder_GetDisplayNameOf(NULL) failed! hr = %08x\n", hr); + ok(hr == S_OK, "IShellFolder_GetDisplayNameOf(NULL) failed! hr = %08lx\n", hr); if (hr != S_OK) { IShellFolder_Release(pShellFolder); return; @@ -1491,7 +1491,7 @@ static void test_FolderShortcut(void) { hr = IShellFolder_ParseDisplayName(pShellFolder, NULL, NULL, wszSomeSubFolder, NULL, &pidlSubFolder, NULL); RemoveDirectoryW(wszDesktopPath); - ok (hr == S_OK, "IShellFolder::ParseDisplayName failed! hr = %08x\n", hr); + ok (hr == S_OK, "IShellFolder::ParseDisplayName failed! hr = %08lx\n", hr); if (hr != S_OK) { IShellFolder_Release(pShellFolder); return; @@ -1501,14 +1501,14 @@ static void test_FolderShortcut(void) { (LPVOID*)&pPersistFolder3); IShellFolder_Release(pShellFolder); ILFree(pidlSubFolder); - ok (hr == S_OK, "IShellFolder::BindToObject failed! hr = %08x\n", hr); + ok (hr == S_OK, "IShellFolder::BindToObject failed! hr = %08lx\n", hr); if (hr != S_OK) return;
/* On windows, we expect CLSID_ShellFSFolder. On wine we relax this constraint * a little bit and also allow CLSID_UnixDosFolder. */ hr = IPersistFolder3_GetClassID(pPersistFolder3, &clsid); - ok(hr == S_OK, "IPersistFolder3_GetClassID failed! hr=0x%08x\n", hr); + ok(hr == S_OK, "IPersistFolder3_GetClassID failed! hr=0x%08lx\n", hr); ok(IsEqualCLSID(&clsid, &CLSID_ShellFSFolder) || IsEqualCLSID(&clsid, &CLSID_UnixDosFolder), "IPersistFolder3::GetClassID returned unexpected CLSID!\n");
@@ -1553,7 +1553,7 @@ static void test_ITEMIDLIST_format(void) { int i;
bResult = SHGetSpecialFolderPathW(NULL, wszPersonal, CSIDL_PERSONAL, FALSE); - ok(bResult, "SHGetSpecialFolderPathW failed! Last error: %u\n", GetLastError()); + ok(bResult, "SHGetSpecialFolderPathW failed! Last error: %lu\n", GetLastError()); if (!bResult) return;
SetLastError(0xdeadbeef); @@ -1562,15 +1562,15 @@ static void test_ITEMIDLIST_format(void) { win_skip("Most W-calls are not implemented\n"); return; } - ok(bResult, "SetCurrentDirectory failed! Last error: %u\n", GetLastError()); + ok(bResult, "SetCurrentDirectory failed! Last error: %lu\n", GetLastError()); if (!bResult) return;
hr = SHGetDesktopFolder(&psfDesktop); - ok(hr == S_OK, "SHGetDesktopFolder failed! hr: %08x\n", hr); + ok(hr == S_OK, "SHGetDesktopFolder failed! hr: %08lx\n", hr); if (hr != S_OK) return;
hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, wszPersonal, NULL, &pidlPersonal, NULL); - ok(hr == S_OK, "psfDesktop->ParseDisplayName failed! hr = %08x\n", hr); + ok(hr == S_OK, "psfDesktop->ParseDisplayName failed! hr = %08lx\n", hr); if (hr != S_OK) { IShellFolder_Release(psfDesktop); return; @@ -1580,7 +1580,7 @@ static void test_ITEMIDLIST_format(void) { (LPVOID*)&psfPersonal); IShellFolder_Release(psfDesktop); ILFree(pidlPersonal); - ok(hr == S_OK, "psfDesktop->BindToObject failed! hr = %08x\n", hr); + ok(hr == S_OK, "psfDesktop->BindToObject failed! hr = %08lx\n", hr); if (hr != S_OK) return;
for (i=0; i<3; i++) { @@ -1591,7 +1591,7 @@ static void test_ITEMIDLIST_format(void) { WideCharToMultiByte(CP_ACP, 0, wszFile[i], -1, szFile, MAX_PATH, NULL, NULL);
hFile = CreateFileW(wszFile[i], GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_FLAG_WRITE_THROUGH, NULL); - ok(hFile != INVALID_HANDLE_VALUE, "CreateFile failed! (%u)\n", GetLastError()); + ok(hFile != INVALID_HANDLE_VALUE, "CreateFile failed! (%lu)\n", GetLastError()); if (hFile == INVALID_HANDLE_VALUE) { IShellFolder_Release(psfPersonal); return; @@ -1600,7 +1600,7 @@ static void test_ITEMIDLIST_format(void) {
hr = IShellFolder_ParseDisplayName(psfPersonal, NULL, NULL, wszFile[i], NULL, &pidlFile, NULL); DeleteFileW(wszFile[i]); - ok(hr == S_OK, "psfPersonal->ParseDisplayName failed! hr: %08x\n", hr); + ok(hr == S_OK, "psfPersonal->ParseDisplayName failed! hr: %08lx\n", hr); if (hr != S_OK) { IShellFolder_Release(psfPersonal); return; @@ -1704,14 +1704,14 @@ static void test_SHGetFolderPathA(void) if (!pIsWow64Process || !pIsWow64Process( GetCurrentProcess(), &is_wow64 )) is_wow64 = FALSE;
hr = SHGetFolderPathA( 0, CSIDL_PROGRAM_FILES, 0, SHGFP_TYPE_CURRENT, path ); - ok( hr == S_OK, "SHGetFolderPathA failed %x\n", hr ); + ok( hr == S_OK, "SHGetFolderPathA failed %lx\n", hr ); hr = SHGetFolderPathA( 0, CSIDL_PROGRAM_FILESX86, 0, SHGFP_TYPE_CURRENT, path_x86 ); if (hr == E_FAIL) { win_skip( "Program Files (x86) not supported\n" ); return; } - ok( hr == S_OK, "SHGetFolderPathA failed %x\n", hr ); + ok( hr == S_OK, "SHGetFolderPathA failed %lx\n", hr ); if (is_win64) { ok( lstrcmpiA( path, path_x86 ), "paths are identical '%s'\n", path ); @@ -1739,14 +1739,14 @@ static void test_SHGetFolderPathA(void) }
hr = SHGetFolderPathA( 0, CSIDL_PROGRAM_FILES_COMMON, 0, SHGFP_TYPE_CURRENT, path ); - ok( hr == S_OK, "SHGetFolderPathA failed %x\n", hr ); + ok( hr == S_OK, "SHGetFolderPathA failed %lx\n", hr ); hr = SHGetFolderPathA( 0, CSIDL_PROGRAM_FILES_COMMONX86, 0, SHGFP_TYPE_CURRENT, path_x86 ); if (hr == E_FAIL) { win_skip( "Common Files (x86) not supported\n" ); return; } - ok( hr == S_OK, "SHGetFolderPathA failed %x\n", hr ); + ok( hr == S_OK, "SHGetFolderPathA failed %lx\n", hr ); if (is_win64) { ok( lstrcmpiA( path, path_x86 ), "paths are identical '%s'\n", path ); @@ -1794,20 +1794,20 @@ static void test_SHGetFolderPathAndSubDirA(void) sprintf(testpath, "%s\%s", appdata, winetemp); delret = RemoveDirectoryA(testpath); if(!delret && (ERROR_PATH_NOT_FOUND != GetLastError()) ) { - win_skip("RemoveDirectoryA(%s) failed with error %u\n", testpath, GetLastError()); + win_skip("RemoveDirectoryA(%s) failed with error %lu\n", testpath, GetLastError()); return; }
sprintf(testpath, "%s\%s", appdata, wine); delret = RemoveDirectoryA(testpath); if(!delret && (ERROR_PATH_NOT_FOUND != GetLastError()) && (ERROR_FILE_NOT_FOUND != GetLastError())) { - win_skip("RemoveDirectoryA(%s) failed with error %u\n", testpath, GetLastError()); + win_skip("RemoveDirectoryA(%s) failed with error %lu\n", testpath, GetLastError()); return; }
/* test invalid second parameter */ ret = SHGetFolderPathAndSubDirA(NULL, CSIDL_FLAG_DONT_VERIFY | 0xff, NULL, SHGFP_TYPE_CURRENT, wine, testpath); - ok(E_INVALIDARG == ret, "expected E_INVALIDARG, got %x\n", ret); + ok(E_INVALIDARG == ret, "expected E_INVALIDARG, got %lx\n", ret);
/* test fourth parameter */ ret = SHGetFolderPathAndSubDirA(NULL, CSIDL_FLAG_DONT_VERIFY | CSIDL_LOCAL_APPDATA, NULL, 2, winetemp, testpath); @@ -1821,23 +1821,23 @@ static void test_SHGetFolderPathAndSubDirA(void) case E_INVALIDARG: /* winxp, win2k3 */ break; default: - ok(0, "expected S_OK or E_INVALIDARG, got %x\n", ret); + ok(0, "expected S_OK or E_INVALIDARG, got %lx\n", ret); }
/* test fifth parameter */ testpath[0] = '\0'; ret = SHGetFolderPathAndSubDirA(NULL, CSIDL_FLAG_DONT_VERIFY | CSIDL_LOCAL_APPDATA, NULL, SHGFP_TYPE_CURRENT, NULL, testpath); - ok(S_OK == ret, "expected S_OK, got %x\n", ret); + ok(S_OK == ret, "expected S_OK, got %lx\n", ret); ok(!lstrcmpA(appdata, testpath), "expected %s, got %s\n", appdata, testpath);
testpath[0] = '\0'; ret = SHGetFolderPathAndSubDirA(NULL, CSIDL_FLAG_DONT_VERIFY | CSIDL_LOCAL_APPDATA, NULL, SHGFP_TYPE_CURRENT, "", testpath); - ok(S_OK == ret, "expected S_OK, got %x\n", ret); + ok(S_OK == ret, "expected S_OK, got %lx\n", ret); ok(!lstrcmpA(appdata, testpath), "expected %s, got %s\n", appdata, testpath);
testpath[0] = '\0'; ret = SHGetFolderPathAndSubDirA(NULL, CSIDL_FLAG_DONT_VERIFY | CSIDL_LOCAL_APPDATA, NULL, SHGFP_TYPE_CURRENT, "\", testpath); - ok(S_OK == ret, "expected S_OK, got %x\n", ret); + ok(S_OK == ret, "expected S_OK, got %lx\n", ret); ok(!lstrcmpA(appdata, testpath), "expected %s, got %s\n", appdata, testpath);
for(i=0; i< MAX_PATH; i++) @@ -1845,28 +1845,28 @@ static void test_SHGetFolderPathAndSubDirA(void) toolongpath[MAX_PATH] = '\0'; ret = SHGetFolderPathAndSubDirA(NULL, CSIDL_FLAG_DONT_VERIFY | CSIDL_LOCAL_APPDATA, NULL, SHGFP_TYPE_CURRENT, toolongpath, testpath); ok(HRESULT_FROM_WIN32(ERROR_FILENAME_EXCED_RANGE) == ret, - "expected %x, got %x\n", HRESULT_FROM_WIN32(ERROR_FILENAME_EXCED_RANGE), ret); + "expected %lx, got %lx\n", HRESULT_FROM_WIN32(ERROR_FILENAME_EXCED_RANGE), ret);
testpath[0] = '\0'; ret = SHGetFolderPathAndSubDirA(NULL, CSIDL_FLAG_DONT_VERIFY | CSIDL_LOCAL_APPDATA, NULL, SHGFP_TYPE_CURRENT, wine, NULL); - ok((S_OK == ret) || (E_INVALIDARG == ret), "expected S_OK or E_INVALIDARG, got %x\n", ret); + ok((S_OK == ret) || (E_INVALIDARG == ret), "expected S_OK or E_INVALIDARG, got %lx\n", ret);
/* test a not existing path */ testpath[0] = '\0'; ret = SHGetFolderPathAndSubDirA(NULL, CSIDL_LOCAL_APPDATA, NULL, SHGFP_TYPE_CURRENT, winetemp, testpath); ok(HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) == ret, - "expected %x, got %x\n", HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), ret); + "expected %lx, got %lx\n", HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), ret);
/* create a directory inside a not existing directory */ testpath[0] = '\0'; ret = SHGetFolderPathAndSubDirA(NULL, CSIDL_FLAG_CREATE | CSIDL_LOCAL_APPDATA, NULL, SHGFP_TYPE_CURRENT, winetemp, testpath); - ok(S_OK == ret, "expected S_OK, got %x\n", ret); + ok(S_OK == ret, "expected S_OK, got %lx\n", ret); ok(!strncmp(appdata, testpath, strlen(appdata)), "expected %s to start with %s\n", testpath, appdata); ok(!lstrcmpA(&testpath[1 + strlen(appdata)], winetemp), "expected %s to end with %s\n", testpath, winetemp); dwret = GetFileAttributesA(testpath); - ok(FILE_ATTRIBUTE_DIRECTORY | dwret, "expected %x to contain FILE_ATTRIBUTE_DIRECTORY\n", dwret); + ok(FILE_ATTRIBUTE_DIRECTORY | dwret, "expected %lx to contain FILE_ATTRIBUTE_DIRECTORY\n", dwret);
/* cleanup */ sprintf(testpath, "%s\%s", appdata, winetemp); @@ -1906,11 +1906,11 @@ static void test_LocalizedNames(void)
file = CreateFileA(".\testfolder\desktop.ini", GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - ok(file != INVALID_HANDLE_VALUE, "CreateFileA failed %i\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "CreateFileA failed %li\n", GetLastError()); ret = WriteFile(file, desktopini_contents1, strlen(desktopini_contents1), &res, NULL) && WriteFile(file, resourcefile, strlen(resourcefile), &res, NULL) && WriteFile(file, desktopini_contents2, strlen(desktopini_contents2), &res, NULL); - ok(ret, "WriteFile failed %i\n", GetLastError()); + ok(ret, "WriteFile failed %li\n", GetLastError()); CloseHandle(file);
/* get IShellFolder for parent */ @@ -1927,43 +1927,43 @@ static void test_LocalizedNames(void) MultiByteToWideChar(CP_ACP, 0, cCurrDirA, -1, cCurrDirW, MAX_PATH);
hr = SHGetDesktopFolder(&IDesktopFolder); - ok(hr == S_OK, "SHGetDesktopfolder failed %08x\n", hr); + ok(hr == S_OK, "SHGetDesktopfolder failed %08lx\n", hr);
hr = IShellFolder_ParseDisplayName(IDesktopFolder, NULL, NULL, cCurrDirW, NULL, &newPIDL, 0); - ok(hr == S_OK, "ParseDisplayName failed %08x\n", hr); + ok(hr == S_OK, "ParseDisplayName failed %08lx\n", hr);
hr = IShellFolder_BindToObject(IDesktopFolder, newPIDL, NULL, (REFIID)&IID_IShellFolder, (LPVOID *)&testIShellFolder); - ok(hr == S_OK, "BindToObject failed %08x\n", hr); + ok(hr == S_OK, "BindToObject failed %08lx\n", hr);
ILFree(newPIDL);
/* windows reads the display name from the resource */ hr = IShellFolder_ParseDisplayName(testIShellFolder, NULL, NULL, foldernameW, NULL, &newPIDL, 0); - ok(hr == S_OK, "ParseDisplayName failed %08x\n", hr); + ok(hr == S_OK, "ParseDisplayName failed %08lx\n", hr);
hr = IShellFolder_GetDisplayNameOf(testIShellFolder, newPIDL, SHGDN_INFOLDER, &strret); - ok(hr == S_OK, "GetDisplayNameOf failed %08x\n", hr); + ok(hr == S_OK, "GetDisplayNameOf failed %08lx\n", hr);
hr = StrRetToBufW(&strret, newPIDL, tempbufW, ARRAY_SIZE(tempbufW)); - ok (hr == S_OK, "StrRetToBufW failed! hr = %08x\n", hr); + ok (hr == S_OK, "StrRetToBufW failed! hr = %08lx\n", hr); todo_wine ok (!lstrcmpiW(tempbufW, folderdisplayW), "GetDisplayNameOf returned %s\n", wine_dbgstr_w(tempbufW));
/* editing name is also read from the resource */ hr = IShellFolder_GetDisplayNameOf(testIShellFolder, newPIDL, SHGDN_INFOLDER|SHGDN_FOREDITING, &strret); - ok(hr == S_OK, "GetDisplayNameOf failed %08x\n", hr); + ok(hr == S_OK, "GetDisplayNameOf failed %08lx\n", hr);
hr = StrRetToBufW(&strret, newPIDL, tempbufW, ARRAY_SIZE(tempbufW)); - ok (hr == S_OK, "StrRetToBufW failed! hr = %08x\n", hr); + ok (hr == S_OK, "StrRetToBufW failed! hr = %08lx\n", hr); todo_wine ok (!lstrcmpiW(tempbufW, folderdisplayW), "GetDisplayNameOf returned %s\n", wine_dbgstr_w(tempbufW));
/* parsing name is unchanged */ hr = IShellFolder_GetDisplayNameOf(testIShellFolder, newPIDL, SHGDN_INFOLDER|SHGDN_FORPARSING, &strret); - ok(hr == S_OK, "GetDisplayNameOf failed %08x\n", hr); + ok(hr == S_OK, "GetDisplayNameOf failed %08lx\n", hr);
hr = StrRetToBufW(&strret, newPIDL, tempbufW, ARRAY_SIZE(tempbufW)); - ok (hr == S_OK, "StrRetToBufW failed! hr = %08x\n", hr); + ok (hr == S_OK, "StrRetToBufW failed! hr = %08lx\n", hr); ok (!lstrcmpiW(tempbufW, foldernameW), "GetDisplayNameOf returned %s\n", wine_dbgstr_w(tempbufW));
IShellFolder_Release(IDesktopFolder); @@ -2004,29 +2004,29 @@ static void test_SHCreateShellItem(void) }
ret = SHGetSpecialFolderLocation(NULL, CSIDL_DESKTOP, &pidl_desktop); - ok(ret == S_OK, "Got 0x%08x\n", ret); + ok(ret == S_OK, "Got 0x%08lx\n", ret);
MultiByteToWideChar(CP_ACP, 0, curdirA, -1, curdirW, MAX_PATH);
ret = SHGetDesktopFolder(&desktopfolder); - ok(SUCCEEDED(ret), "SHGetShellFolder returned %x\n", ret); + ok(SUCCEEDED(ret), "SHGetShellFolder returned %lx\n", ret);
ret = IShellFolder_ParseDisplayName(desktopfolder, NULL, NULL, curdirW, NULL, &pidl_cwd, NULL); - ok(SUCCEEDED(ret), "ParseDisplayName returned %x\n", ret); + ok(SUCCEEDED(ret), "ParseDisplayName returned %lx\n", ret);
ret = IShellFolder_BindToObject(desktopfolder, pidl_cwd, NULL, &IID_IShellFolder, (void**)¤tfolder); - ok(SUCCEEDED(ret), "BindToObject returned %x\n", ret); + ok(SUCCEEDED(ret), "BindToObject returned %lx\n", ret);
CreateTestFile(".\testfile");
ret = IShellFolder_ParseDisplayName(currentfolder, NULL, NULL, testfileW, NULL, &pidl_testfile, NULL); - ok(SUCCEEDED(ret), "ParseDisplayName returned %x\n", ret); + ok(SUCCEEDED(ret), "ParseDisplayName returned %lx\n", ret);
pidl_abstestfile = ILCombine(pidl_cwd, pidl_testfile);
shellitem = (void*)0xdeadbeef; ret = pSHCreateShellItem(NULL, NULL, NULL, &shellitem); - ok(ret == E_INVALIDARG, "SHCreateShellItem returned %x\n", ret); + ok(ret == E_INVALIDARG, "SHCreateShellItem returned %lx\n", ret); ok(shellitem == 0, "Got %p\n", shellitem);
if (0) /* crashes on Windows XP */ @@ -2038,15 +2038,15 @@ static void test_SHCreateShellItem(void) }
ret = pSHCreateShellItem(NULL, NULL, pidl_cwd, &shellitem); - ok(SUCCEEDED(ret), "SHCreateShellItem returned %x\n", ret); + ok(SUCCEEDED(ret), "SHCreateShellItem returned %lx\n", ret); if (SUCCEEDED(ret)) { ret = IShellItem_QueryInterface(shellitem, &IID_IPersistIDList, (void**)&persistidl); - ok(SUCCEEDED(ret), "QueryInterface returned %x\n", ret); + ok(SUCCEEDED(ret), "QueryInterface returned %lx\n", ret); if (SUCCEEDED(ret)) { ret = IPersistIDList_GetIDList(persistidl, &pidl_test); - ok(SUCCEEDED(ret), "GetIDList returned %x\n", ret); + ok(SUCCEEDED(ret), "GetIDList returned %lx\n", ret); if (SUCCEEDED(ret)) { ok(ILIsEqual(pidl_cwd, pidl_test), "id lists are not equal\n"); @@ -2058,15 +2058,15 @@ static void test_SHCreateShellItem(void) }
ret = pSHCreateShellItem(pidl_cwd, NULL, pidl_testfile, &shellitem); - ok(SUCCEEDED(ret), "SHCreateShellItem returned %x\n", ret); + ok(SUCCEEDED(ret), "SHCreateShellItem returned %lx\n", ret); if (SUCCEEDED(ret)) { ret = IShellItem_QueryInterface(shellitem, &IID_IPersistIDList, (void**)&persistidl); - ok(SUCCEEDED(ret), "QueryInterface returned %x\n", ret); + ok(SUCCEEDED(ret), "QueryInterface returned %lx\n", ret); if (SUCCEEDED(ret)) { ret = IPersistIDList_GetIDList(persistidl, &pidl_test); - ok(SUCCEEDED(ret), "GetIDList returned %x\n", ret); + ok(SUCCEEDED(ret), "GetIDList returned %lx\n", ret); if (SUCCEEDED(ret)) { ok(ILIsEqual(pidl_abstestfile, pidl_test), "id lists are not equal\n"); @@ -2076,15 +2076,15 @@ static void test_SHCreateShellItem(void) }
ret = IShellItem_GetParent(shellitem, &shellitem2); - ok(SUCCEEDED(ret), "GetParent returned %x\n", ret); + ok(SUCCEEDED(ret), "GetParent returned %lx\n", ret); if (SUCCEEDED(ret)) { ret = IShellItem_QueryInterface(shellitem2, &IID_IPersistIDList, (void**)&persistidl); - ok(SUCCEEDED(ret), "QueryInterface returned %x\n", ret); + ok(SUCCEEDED(ret), "QueryInterface returned %lx\n", ret); if (SUCCEEDED(ret)) { ret = IPersistIDList_GetIDList(persistidl, &pidl_test); - ok(SUCCEEDED(ret), "GetIDList returned %x\n", ret); + ok(SUCCEEDED(ret), "GetIDList returned %lx\n", ret); if (SUCCEEDED(ret)) { ok(ILIsEqual(pidl_cwd, pidl_test), "id lists are not equal\n"); @@ -2099,15 +2099,15 @@ static void test_SHCreateShellItem(void) }
ret = pSHCreateShellItem(NULL, currentfolder, pidl_testfile, &shellitem); - ok(SUCCEEDED(ret), "SHCreateShellItem returned %x\n", ret); + ok(SUCCEEDED(ret), "SHCreateShellItem returned %lx\n", ret); if (SUCCEEDED(ret)) { ret = IShellItem_QueryInterface(shellitem, &IID_IPersistIDList, (void**)&persistidl); - ok(SUCCEEDED(ret), "QueryInterface returned %x\n", ret); + ok(SUCCEEDED(ret), "QueryInterface returned %lx\n", ret); if (SUCCEEDED(ret)) { ret = IPersistIDList_GetIDList(persistidl, &pidl_test); - ok(SUCCEEDED(ret), "GetIDList returned %x\n", ret); + ok(SUCCEEDED(ret), "GetIDList returned %lx\n", ret); if (SUCCEEDED(ret)) { ok(ILIsEqual(pidl_abstestfile, pidl_test), "id lists are not equal\n"); @@ -2120,15 +2120,15 @@ static void test_SHCreateShellItem(void)
/* if a parent pidl and shellfolder are specified, the shellfolder is ignored */ ret = pSHCreateShellItem(pidl_cwd, desktopfolder, pidl_testfile, &shellitem); - ok(SUCCEEDED(ret), "SHCreateShellItem returned %x\n", ret); + ok(SUCCEEDED(ret), "SHCreateShellItem returned %lx\n", ret); if (SUCCEEDED(ret)) { ret = IShellItem_QueryInterface(shellitem, &IID_IPersistIDList, (void**)&persistidl); - ok(SUCCEEDED(ret), "QueryInterface returned %x\n", ret); + ok(SUCCEEDED(ret), "QueryInterface returned %lx\n", ret); if (SUCCEEDED(ret)) { ret = IPersistIDList_GetIDList(persistidl, &pidl_test); - ok(SUCCEEDED(ret), "GetIDList returned %x\n", ret); + ok(SUCCEEDED(ret), "GetIDList returned %lx\n", ret); if (SUCCEEDED(ret)) { ok(ILIsEqual(pidl_abstestfile, pidl_test), "id lists are not equal\n"); @@ -2140,15 +2140,15 @@ static void test_SHCreateShellItem(void) }
ret = pSHCreateShellItem(NULL, desktopfolder, pidl_testfile, &shellitem); - ok(SUCCEEDED(ret), "SHCreateShellItem returned %x\n", ret); + ok(SUCCEEDED(ret), "SHCreateShellItem returned %lx\n", ret); if (SUCCEEDED(ret)) { ret = IShellItem_QueryInterface(shellitem, &IID_IPersistIDList, (void**)&persistidl); - ok(SUCCEEDED(ret), "QueryInterface returned %x\n", ret); + ok(SUCCEEDED(ret), "QueryInterface returned %lx\n", ret); if (SUCCEEDED(ret)) { ret = IPersistIDList_GetIDList(persistidl, &pidl_test); - ok(SUCCEEDED(ret), "GetIDList returned %x\n", ret); + ok(SUCCEEDED(ret), "GetIDList returned %lx\n", ret); if (SUCCEEDED(ret)) { ok(ILIsEqual(pidl_testfile, pidl_test), "id lists are not equal\n"); @@ -2161,11 +2161,11 @@ static void test_SHCreateShellItem(void) }
ret = pSHCreateShellItem(NULL, NULL, pidl_desktop, &shellitem); - ok(SUCCEEDED(ret), "SHCreateShellItem returned %x\n", ret); + ok(SUCCEEDED(ret), "SHCreateShellItem returned %lx\n", ret); if (SUCCEEDED(ret)) { ret = IShellItem_GetParent(shellitem, &shellitem2); - ok(FAILED(ret), "Got 0x%08x\n", ret); + ok(FAILED(ret), "Got 0x%08lx\n", ret); if(SUCCEEDED(ret)) IShellItem_Release(shellitem2); IShellItem_Release(shellitem); } @@ -2181,12 +2181,12 @@ static void test_SHCreateShellItem(void)
shellitem = (void*)0xdeadbeef; ret = pSHCreateItemFromParsingName(NULL, NULL, &IID_IShellItem, (void**)&shellitem); - ok(ret == E_INVALIDARG, "SHCreateItemFromParsingName returned %x\n", ret); + ok(ret == E_INVALIDARG, "SHCreateItemFromParsingName returned %lx\n", ret); ok(shellitem == NULL, "shellitem was %p.\n", shellitem);
ret = pSHCreateItemFromParsingName(testfileW, NULL, &IID_IShellItem, (void**)&shellitem); ok(ret == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "SHCreateItemFromParsingName returned %x\n", ret); + "SHCreateItemFromParsingName returned %lx\n", ret); if(SUCCEEDED(ret)) IShellItem_Release(shellitem);
lstrcpyW(fnbufW, curdirW); @@ -2194,12 +2194,12 @@ static void test_SHCreateShellItem(void) lstrcatW(fnbufW, testfileW);
ret = pSHCreateItemFromParsingName(fnbufW, NULL, &IID_IShellItem, (void**)&shellitem); - ok(ret == S_OK, "SHCreateItemFromParsingName returned %x\n", ret); + ok(ret == S_OK, "SHCreateItemFromParsingName returned %lx\n", ret); if(SUCCEEDED(ret)) { LPWSTR tmp_fname; ret = IShellItem_GetDisplayName(shellitem, SIGDN_FILESYSPATH, &tmp_fname); - ok(ret == S_OK, "GetDisplayName returned %x\n", ret); + ok(ret == S_OK, "GetDisplayName returned %lx\n", ret); if(SUCCEEDED(ret)) { ok(!lstrcmpW(fnbufW, tmp_fname), "strings not equal\n"); @@ -2222,18 +2222,18 @@ static void test_SHCreateShellItem(void) }
ret = pSHCreateItemFromIDList(NULL, &IID_IShellItem, (void**)&shellitem); - ok(ret == E_INVALIDARG, "SHCreateItemFromIDList returned %x\n", ret); + ok(ret == E_INVALIDARG, "SHCreateItemFromIDList returned %lx\n", ret);
ret = pSHCreateItemFromIDList(pidl_cwd, &IID_IShellItem, (void**)&shellitem); - ok(ret == S_OK, "SHCreateItemFromIDList returned %x\n", ret); + ok(ret == S_OK, "SHCreateItemFromIDList returned %lx\n", ret); if (SUCCEEDED(ret)) { ret = IShellItem_QueryInterface(shellitem, &IID_IPersistIDList, (void**)&persistidl); - ok(ret == S_OK, "QueryInterface returned %x\n", ret); + ok(ret == S_OK, "QueryInterface returned %lx\n", ret); if (SUCCEEDED(ret)) { ret = IPersistIDList_GetIDList(persistidl, &pidl_test); - ok(ret == S_OK, "GetIDList returned %x\n", ret); + ok(ret == S_OK, "GetIDList returned %lx\n", ret); if (SUCCEEDED(ret)) { ok(ILIsEqual(pidl_cwd, pidl_test), "id lists are not equal\n"); @@ -2245,15 +2245,15 @@ static void test_SHCreateShellItem(void) }
ret = pSHCreateItemFromIDList(pidl_testfile, &IID_IShellItem, (void**)&shellitem); - ok(ret == S_OK, "SHCreateItemFromIDList returned %x\n", ret); + ok(ret == S_OK, "SHCreateItemFromIDList returned %lx\n", ret); if (SUCCEEDED(ret)) { ret = IShellItem_QueryInterface(shellitem, &IID_IPersistIDList, (void**)&persistidl); - ok(ret == S_OK, "QueryInterface returned %x\n", ret); + ok(ret == S_OK, "QueryInterface returned %lx\n", ret); if (SUCCEEDED(ret)) { ret = IPersistIDList_GetIDList(persistidl, &pidl_test); - ok(ret == S_OK, "GetIDList returned %x\n", ret); + ok(ret == S_OK, "GetIDList returned %lx\n", ret); if (SUCCEEDED(ret)) { ok(ILIsEqual(pidl_testfile, pidl_test), "id lists are not equal\n"); @@ -2278,12 +2278,12 @@ static void test_SHCreateShellItem(void) int order;
ret = pSHCreateShellItem(NULL, NULL, pidl_desktop, &shellitem_desktop); - ok(ret == S_OK, "SHCreateShellItem failed: 0x%08x.\n", ret); + ok(ret == S_OK, "SHCreateShellItem failed: 0x%08lx.\n", ret);
shellitem = (void*)0xdeadbeef; ret = pSHCreateItemFromRelativeName(shellitem_desktop, NULL, NULL, &IID_IShellItem, (void**)&shellitem); - ok(ret == E_INVALIDARG, "Expected 0x%08x but SHCreateItemFromRelativeName return: 0x%08x.\n", + ok(ret == E_INVALIDARG, "Expected 0x%08lx but SHCreateItemFromRelativeName return: 0x%08lx.\n", E_INVALIDARG, ret); ok(shellitem == NULL, "shellitem was %p.\n", shellitem);
@@ -2292,7 +2292,7 @@ static void test_SHCreateShellItem(void) ret = pSHCreateItemFromRelativeName(shellitem_desktop, testfileW, NULL, &IID_IShellItem, (void**)&shellitem); ok(ret == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "Expected 0x%08x but SHCreateItemFromRelativeName return: 0x%08x.\n", + "Expected 0x%08lx but SHCreateItemFromRelativeName return: 0x%08lx.\n", HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), ret); ok(shellitem == NULL, "shellitem was %p.\n", shellitem);
@@ -2302,37 +2302,37 @@ static void test_SHCreateShellItem(void) myPathAddBackslashW(testfile_path); lstrcatW(testfile_path, testfileW); file = CreateFileW(testfile_path, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, NULL); - ok(file != INVALID_HANDLE_VALUE, "CreateFileW failed! Last error: 0x%08x.\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "CreateFileW failed! Last error: 0x%08lx.\n", GetLastError()); CloseHandle(file);
shellitem = (void*)0xdeadbeef; ret = pSHCreateItemFromRelativeName(shellitem_desktop, testfileW, NULL, &IID_IShellItem, (void**)&shellitem); - ok(ret == S_OK, "SHCreateItemFromRelativeName failed: 0x%08x.\n", ret); + ok(ret == S_OK, "SHCreateItemFromRelativeName failed: 0x%08lx.\n", ret); ok(shellitem != NULL, "shellitem was %p.\n", shellitem); if(SUCCEEDED(ret)) { ret = IShellItem_GetDisplayName(shellitem, 0, &displayname); - ok(ret == S_OK, "IShellItem_GetDisplayName failed: 0x%08x.\n", ret); + ok(ret == S_OK, "IShellItem_GetDisplayName failed: 0x%08lx.\n", ret); ok(!lstrcmpW(displayname, testfileW), "got wrong display name: %s.\n", wine_dbgstr_w(displayname)); CoTaskMemFree(displayname);
shellitem2 = (void*)0xdeadbeef; ret = pSHCreateItemFromRelativeName(shellitem_desktop, testfileW, NULL, &IID_IShellItem, (void**)&shellitem2); - ok(ret == S_OK, "SHCreateItemFromRelativeName failed: 0x%08x.\n", ret); + ok(ret == S_OK, "SHCreateItemFromRelativeName failed: 0x%08lx.\n", ret); ret = IShellItem_Compare(shellitem, shellitem2, 0, &order); - ok(ret == S_OK, "IShellItem_Compare failed: 0x%08x.\n", ret); + ok(ret == S_OK, "IShellItem_Compare failed: 0x%08lx.\n", ret); ok(!order, "order got wrong value: %d.\n", order); IShellItem_Release(shellitem2);
shellitem2 = (void*)0xdeadbeef; ret = IShellFolder_ParseDisplayName(desktopfolder, NULL, NULL, testfileW, NULL, &pidl_desktop_testfile, NULL); - ok(ret == S_OK, "ParseDisplayName failed 0x%08x.\n", ret); + ok(ret == S_OK, "ParseDisplayName failed 0x%08lx.\n", ret); ret = pSHCreateItemFromIDList(pidl_desktop_testfile, &IID_IShellItem, (void**)&shellitem2); ret = IShellItem_Compare(shellitem, shellitem2, 0, &order); - ok(ret == S_OK, "IShellItem_Compare fail: 0x%08x.\n", ret); + ok(ret == S_OK, "IShellItem_Compare fail: 0x%08lx.\n", ret); ok(!order, "order got wrong value: %d.\n", order); ILFree(pidl_desktop_testfile); IShellItem_Release(shellitem2); @@ -2360,17 +2360,17 @@ static void test_SHCreateShellItem(void) shellitem = (void*)0xdeadbeef; ret = pSHCreateItemInKnownFolder(&FOLDERID_Desktop, 0, NULL, &IID_IShellItem, (void**)&shellitem); - ok(ret == S_OK, "SHCreateItemInKnownFolder failed: 0x%08x.\n", ret); + ok(ret == S_OK, "SHCreateItemInKnownFolder failed: 0x%08lx.\n", ret); ok(shellitem != NULL, "shellitem was %p.\n", shellitem); if(SUCCEEDED(ret)) { shellitem2 = (void*)0xdeadbeef; ret = pSHCreateShellItem(NULL, NULL, pidl_desktop, &shellitem2); - ok(SUCCEEDED(ret), "SHCreateShellItem returned %x\n", ret); + ok(SUCCEEDED(ret), "SHCreateShellItem returned %lx\n", ret); if(SUCCEEDED(ret)) { ret = IShellItem_Compare(shellitem, shellitem2, 0, &order); - ok(ret == S_OK, "IShellItem_Compare failed: 0x%08x.\n", ret); + ok(ret == S_OK, "IShellItem_Compare failed: 0x%08lx.\n", ret); ok(!order, "order got wrong value: %d.\n", order); IShellItem_Release(shellitem2); } @@ -2382,7 +2382,7 @@ static void test_SHCreateShellItem(void) ret = pSHCreateItemInKnownFolder(&FOLDERID_Desktop, 0, testfileW, &IID_IShellItem, (void**)&shellitem); ok(ret == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "Expected 0x%08x but SHCreateItemInKnownFolder return: 0x%08x.\n", + "Expected 0x%08lx but SHCreateItemInKnownFolder return: 0x%08lx.\n", HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), ret); ok(shellitem == NULL, "shellitem was %p.\n", shellitem);
@@ -2391,18 +2391,18 @@ static void test_SHCreateShellItem(void) myPathAddBackslashW(testfile_path); lstrcatW(testfile_path, testfileW); file = CreateFileW(testfile_path, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, NULL); - ok(file != INVALID_HANDLE_VALUE, "CreateFileW failed! Last error: 0x%08x.\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "CreateFileW failed! Last error: 0x%08lx.\n", GetLastError()); CloseHandle(file);
shellitem = (void*)0xdeadbeef; ret = pSHCreateItemInKnownFolder(&FOLDERID_Desktop, 0, testfileW, &IID_IShellItem, (void**)&shellitem); - ok(ret == S_OK, "SHCreateItemInKnownFolder failed: 0x%08x.\n", ret); + ok(ret == S_OK, "SHCreateItemInKnownFolder failed: 0x%08lx.\n", ret); ok(shellitem != NULL, "shellitem was %p.\n", shellitem); if(SUCCEEDED(ret)) { ret = IShellItem_GetDisplayName(shellitem, 0, &displayname); - ok(ret == S_OK, "IShellItem_GetDisplayName failed: 0x%08x.\n", ret); + ok(ret == S_OK, "IShellItem_GetDisplayName failed: 0x%08lx.\n", ret); ok(!lstrcmpW(displayname, testfileW), "got wrong display name: %s.\n", wine_dbgstr_w(displayname)); CoTaskMemFree(displayname); @@ -2410,20 +2410,20 @@ static void test_SHCreateShellItem(void) shellitem2 = (void*)0xdeadbeef; ret = pSHCreateItemInKnownFolder(&FOLDERID_Desktop, 0, testfileW, &IID_IShellItem, (void**)&shellitem2); - ok(ret == S_OK, "SHCreateItemInKnownFolder failed: 0x%08x.\n", ret); + ok(ret == S_OK, "SHCreateItemInKnownFolder failed: 0x%08lx.\n", ret); ok(shellitem2 != NULL, "shellitem was %p.\n", shellitem); ret = IShellItem_Compare(shellitem, shellitem2, 0, &order); - ok(ret == S_OK, "IShellItem_Compare failed: 0x%08x.\n", ret); + ok(ret == S_OK, "IShellItem_Compare failed: 0x%08lx.\n", ret); ok(!order, "order got wrong value: %d.\n", order); IShellItem_Release(shellitem2);
shellitem2 = (void*)0xdeadbeef; ret = IShellFolder_ParseDisplayName(desktopfolder, NULL, NULL, testfileW, NULL, &pidl_desktop_testfile, NULL); - ok(SUCCEEDED(ret), "ParseDisplayName returned %x.\n", ret); + ok(SUCCEEDED(ret), "ParseDisplayName returned %lx.\n", ret); ret = pSHCreateItemFromIDList(pidl_desktop_testfile, &IID_IShellItem, (void**)&shellitem2); ret = IShellItem_Compare(shellitem, shellitem2, 0, &order); - ok(ret == S_OK, "IShellItem_Compare failed: 0x%08x.\n", ret); + ok(ret == S_OK, "IShellItem_Compare failed: 0x%08lx.\n", ret); ok(!order, "order got wrong value: %d.\n", order); ILFree(pidl_desktop_testfile); IShellItem_Release(shellitem2); @@ -2434,17 +2434,17 @@ static void test_SHCreateShellItem(void) shellitem = (void*)0xdeadbeef; ret = pSHCreateItemInKnownFolder(&FOLDERID_Documents, 0, NULL, &IID_IShellItem, (void**)&shellitem); - ok(ret == S_OK, "SHCreateItemInKnownFolder failed: 0x%08x.\n", ret); + ok(ret == S_OK, "SHCreateItemInKnownFolder failed: 0x%08lx.\n", ret); ok(shellitem != NULL, "shellitem was %p.\n", shellitem); if(SUCCEEDED(ret)) { shellitem2 = (void*)0xdeadbeef; ret = pSHCreateItemInKnownFolder(&FOLDERID_Documents, 0, NULL, &IID_IShellItem, (void**)&shellitem2); - ok(ret == S_OK, "SHCreateItemInKnownFolder failed: 0x%08x.\n", ret); + ok(ret == S_OK, "SHCreateItemInKnownFolder failed: 0x%08lx.\n", ret); ok(shellitem2 != NULL, "shellitem was %p.\n", shellitem); ret = IShellItem_Compare(shellitem, shellitem2, 0, &order); - ok(ret == S_OK, "IShellItem_Compare failed: 0x%08x.\n", ret); + ok(ret == S_OK, "IShellItem_Compare failed: 0x%08lx.\n", ret); ok(!order, "order got wrong value: %d.\n", order); IShellItem_Release(shellitem2);
@@ -2494,13 +2494,13 @@ static void test_SHGetNameFromIDList(void) }
hres = pSHGetNameFromIDList(NULL, 0, &name_string); - ok(hres == E_INVALIDARG, "Got 0x%08x\n", hres); + ok(hres == E_INVALIDARG, "Got 0x%08lx\n", hres);
/* Test the desktop */ hres = SHGetSpecialFolderLocation(NULL, CSIDL_DESKTOP, &pidl); - ok(hres == S_OK, "Got 0x%08x\n", hres); + ok(hres == S_OK, "Got 0x%08lx\n", hres); hres = pSHCreateShellItem(NULL, NULL, pidl, &shellitem); - ok(hres == S_OK, "Got 0x%08x\n", hres); + ok(hres == S_OK, "Got 0x%08lx\n", hres); if(SUCCEEDED(hres)) { WCHAR *nameSI, *nameSH; @@ -2514,11 +2514,11 @@ static void test_SHGetNameFromIDList(void) for(i = 0; flags[i] != -1234; i++) { hrSI = IShellItem_GetDisplayName(shellitem, flags[i], &nameSI); - ok(hrSI == S_OK, "Got 0x%08x\n", hrSI); + ok(hrSI == S_OK, "Got 0x%08lx\n", hrSI); hrSH = pSHGetNameFromIDList(pidl, flags[i], &nameSH); - ok(hrSH == S_OK, "Got 0x%08x\n", hrSH); + ok(hrSH == S_OK, "Got 0x%08lx\n", hrSH); hrSF = IShellFolder_GetDisplayNameOf(psf, pidl, flags[i] & 0xffff, &strret); - ok(hrSF == S_OK, "Got 0x%08x\n", hrSF); + ok(hrSF == S_OK, "Got 0x%08lx\n", hrSF);
if(SUCCEEDED(hrSI) && SUCCEEDED(hrSH)) ok(!lstrcmpW(nameSI, nameSH), "Strings differ.\n"); @@ -2537,7 +2537,7 @@ static void test_SHGetNameFromIDList(void) IShellFolder_Release(psf);
hrSI = pSHGetNameFromIDList(pidl, SIGDN_FILESYSPATH, &nameSI); - ok(hrSI == S_OK, "Got 0x%08x\n", hrSI); + ok(hrSI == S_OK, "Got 0x%08lx\n", hrSI); res = SHGetPathFromIDListW(pidl, buf); ok(res == TRUE, "Got %d\n", res); if(SUCCEEDED(hrSI) && res) @@ -2545,7 +2545,7 @@ static void test_SHGetNameFromIDList(void) if(SUCCEEDED(hrSI)) CoTaskMemFree(nameSI);
hres = pSHGetNameFromIDList(pidl, SIGDN_URL, &name_string); - todo_wine ok(hres == S_OK, "Got 0x%08x\n", hres); + todo_wine ok(hres == S_OK, "Got 0x%08lx\n", hres); if(SUCCEEDED(hres)) CoTaskMemFree(name_string);
IShellItem_Release(shellitem); @@ -2554,9 +2554,9 @@ static void test_SHGetNameFromIDList(void)
/* Test the control panel */ hres = SHGetSpecialFolderLocation(NULL, CSIDL_CONTROLS, &pidl); - ok(hres == S_OK, "Got 0x%08x\n", hres); + ok(hres == S_OK, "Got 0x%08lx\n", hres); hres = pSHCreateShellItem(NULL, NULL, pidl, &shellitem); - ok(hres == S_OK, "Got 0x%08x\n", hres); + ok(hres == S_OK, "Got 0x%08lx\n", hres); if(SUCCEEDED(hres)) { WCHAR *nameSI, *nameSH; @@ -2570,11 +2570,11 @@ static void test_SHGetNameFromIDList(void) for(i = 0; flags[i] != -1234; i++) { hrSI = IShellItem_GetDisplayName(shellitem, flags[i], &nameSI); - ok(hrSI == S_OK, "Got 0x%08x\n", hrSI); + ok(hrSI == S_OK, "Got 0x%08lx\n", hrSI); hrSH = pSHGetNameFromIDList(pidl, flags[i], &nameSH); - ok(hrSH == S_OK, "Got 0x%08x\n", hrSH); + ok(hrSH == S_OK, "Got 0x%08lx\n", hrSH); hrSF = IShellFolder_GetDisplayNameOf(psf, pidl, flags[i] & 0xffff, &strret); - ok(hrSF == S_OK, "Got 0x%08x\n", hrSF); + ok(hrSF == S_OK, "Got 0x%08lx\n", hrSF);
if(SUCCEEDED(hrSI) && SUCCEEDED(hrSH)) ok(!lstrcmpW(nameSI, nameSH), "Strings differ.\n"); @@ -2593,7 +2593,7 @@ static void test_SHGetNameFromIDList(void) IShellFolder_Release(psf);
hrSI = pSHGetNameFromIDList(pidl, SIGDN_FILESYSPATH, &nameSI); - ok(hrSI == E_INVALIDARG, "Got 0x%08x\n", hrSI); + ok(hrSI == E_INVALIDARG, "Got 0x%08lx\n", hrSI); res = SHGetPathFromIDListW(pidl, buf); ok(res == FALSE, "Got %d\n", res); if(SUCCEEDED(hrSI) && res) @@ -2602,7 +2602,7 @@ static void test_SHGetNameFromIDList(void)
hres = pSHGetNameFromIDList(pidl, SIGDN_URL, &name_string); todo_wine ok(hres == E_NOTIMPL /* Win7 */ || hres == S_OK /* Vista */, - "Got 0x%08x\n", hres); + "Got 0x%08lx\n", hres); if(SUCCEEDED(hres)) CoTaskMemFree(name_string);
IShellItem_Release(shellitem); @@ -2630,12 +2630,12 @@ static void test_SHGetItemFromDataObject(void) }
hres = pSHGetItemFromDataObject(NULL, 0, &IID_IShellItem, (void**)&psv); - ok(hres == E_INVALIDARG, "got 0x%08x\n", hres); + ok(hres == E_INVALIDARG, "got 0x%08lx\n", hres);
SHGetDesktopFolder(&psfdesktop);
hres = IShellFolder_CreateViewObject(psfdesktop, NULL, &IID_IShellView, (void**)&psv); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); if(SUCCEEDED(hres)) { IEnumIDList *peidl; @@ -2644,7 +2644,7 @@ static void test_SHGetItemFromDataObject(void)
enum_flags = SHCONTF_NONFOLDERS | SHCONTF_FOLDERS | SHCONTF_INCLUDEHIDDEN; hres = IShellFolder_EnumObjects(psfdesktop, NULL, enum_flags, &peidl); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); if(SUCCEEDED(hres)) { LPITEMIDLIST apidl[5]; @@ -2658,23 +2658,23 @@ static void test_SHGetItemFromDataObject(void) { hres = IShellFolder_GetUIObjectOf(psfdesktop, NULL, 1, (LPCITEMIDLIST*)apidl, &IID_IDataObject, NULL, (void**)&pdo); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); if(SUCCEEDED(hres)) { hres = pSHGetItemFromDataObject(pdo, DOGIF_DEFAULT, &IID_IShellItem, (void**)&psi); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); if(SUCCEEDED(hres)) IShellItem_Release(psi); hres = pSHGetItemFromDataObject(pdo, DOGIF_TRAVERSE_LINK, &IID_IShellItem, (void**)&psi); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); if(SUCCEEDED(hres)) IShellItem_Release(psi); hres = pSHGetItemFromDataObject(pdo, DOGIF_NO_HDROP, &IID_IShellItem, (void**)&psi); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); if(SUCCEEDED(hres)) IShellItem_Release(psi); hres = pSHGetItemFromDataObject(pdo, DOGIF_NO_URL, &IID_IShellItem, (void**)&psi); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); if(SUCCEEDED(hres)) IShellItem_Release(psi); hres = pSHGetItemFromDataObject(pdo, DOGIF_ONLY_IF_ONE, &IID_IShellItem, (void**)&psi); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); if(SUCCEEDED(hres)) IShellItem_Release(psi);
IDataObject_Release(pdo); @@ -2687,23 +2687,23 @@ static void test_SHGetItemFromDataObject(void) { hres = IShellFolder_GetUIObjectOf(psfdesktop, NULL, count, (LPCITEMIDLIST*)apidl, &IID_IDataObject, NULL, (void**)&pdo); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); if(SUCCEEDED(hres)) { hres = pSHGetItemFromDataObject(pdo, DOGIF_DEFAULT, &IID_IShellItem, (void**)&psi); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); if(SUCCEEDED(hres)) IShellItem_Release(psi); hres = pSHGetItemFromDataObject(pdo, DOGIF_TRAVERSE_LINK, &IID_IShellItem, (void**)&psi); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); if(SUCCEEDED(hres)) IShellItem_Release(psi); hres = pSHGetItemFromDataObject(pdo, DOGIF_NO_HDROP, &IID_IShellItem, (void**)&psi); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); if(SUCCEEDED(hres)) IShellItem_Release(psi); hres = pSHGetItemFromDataObject(pdo, DOGIF_NO_URL, &IID_IShellItem, (void**)&psi); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); if(SUCCEEDED(hres)) IShellItem_Release(psi); hres = pSHGetItemFromDataObject(pdo, DOGIF_ONLY_IF_ONE, &IID_IShellItem, (void**)&psi); - ok(hres == E_FAIL, "got 0x%08x\n", hres); + ok(hres == E_FAIL, "got 0x%08lx\n", hres); if(SUCCEEDED(hres)) IShellItem_Release(psi); IDataObject_Release(pdo); } @@ -2767,9 +2767,9 @@ static void test_ShellItemCompare(void)
SHGetDesktopFolder(&psf_desktop); hr = IShellFolder_ParseDisplayName(psf_desktop, NULL, NULL, curdirW, NULL, &pidl_cwd, NULL); - ok(SUCCEEDED(hr), "ParseDisplayName returned %x\n", hr); + ok(SUCCEEDED(hr), "ParseDisplayName returned %lx\n", hr); hr = IShellFolder_BindToObject(psf_desktop, pidl_cwd, NULL, &IID_IShellFolder, (void**)&psf_current); - ok(SUCCEEDED(hr), "BindToObject returned %x\n", hr); + ok(SUCCEEDED(hr), "BindToObject returned %lx\n", hr); IShellFolder_Release(psf_desktop); ILFree(pidl_cwd);
@@ -2782,11 +2782,11 @@ static void test_ShellItemCompare(void)
hr = IShellFolder_ParseDisplayName(psf_current, NULL, NULL, (LPWSTR)filesW[i], NULL, &pidl_testfile, NULL); - ok(SUCCEEDED(hr), "ParseDisplayName returned %x\n", hr); + ok(SUCCEEDED(hr), "ParseDisplayName returned %lx\n", hr); if(SUCCEEDED(hr)) { hr = pSHCreateShellItem(NULL, NULL, pidl_testfile, &psi[i]); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ILFree(pidl_testfile); } if(FAILED(hr)) failed = TRUE; @@ -2799,13 +2799,13 @@ static void test_ShellItemCompare(void)
/* Generate ShellItems for the folders */ hr = IShellItem_GetParent(psi[0], &psi_a); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(FAILED(hr)) failed = TRUE; hr = IShellItem_GetParent(psi[3], &psi_b); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(FAILED(hr)) failed = TRUE; hr = IShellItem_GetParent(psi[6], &psi_c); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(FAILED(hr)) failed = TRUE;
if(failed) @@ -2826,103 +2826,103 @@ static void test_ShellItemCompare(void) for(i = 0; i < 9; i++) { hr = IShellItem_Compare(psi[i], psi[i], SICHINT_DISPLAY, &order); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(order == 0, "Got order %d\n", order); hr = IShellItem_Compare(psi[i], psi[i], SICHINT_CANONICAL, &order); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(order == 0, "Got order %d\n", order); hr = IShellItem_Compare(psi[i], psi[i], SICHINT_ALLFIELDS, &order); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(order == 0, "Got order %d\n", order); }
/* Order */ /* a\b:a\a , a\b:a\c, a\b:a\b */ hr = IShellItem_Compare(psi[1], psi[0], SICHINT_DISPLAY, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); + ok(hr == S_FALSE, "Got 0x%08lx\n", hr); ok(order == 1, "Got order %d\n", order); hr = IShellItem_Compare(psi[1], psi[2], SICHINT_DISPLAY, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); + ok(hr == S_FALSE, "Got 0x%08lx\n", hr); ok(order == -1, "Got order %d\n", order); hr = IShellItem_Compare(psi[1], psi[1], SICHINT_DISPLAY, &order); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(order == 0, "Got order %d\n", order);
/* b\b:a\b, b\b:c\b, b\b:c\b */ hr = IShellItem_Compare(psi[4], psi[1], SICHINT_DISPLAY, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); + ok(hr == S_FALSE, "Got 0x%08lx\n", hr); ok(order == 1, "Got order %d\n", order); hr = IShellItem_Compare(psi[4], psi[7], SICHINT_DISPLAY, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); + ok(hr == S_FALSE, "Got 0x%08lx\n", hr); ok(order == -1, "Got order %d\n", order); hr = IShellItem_Compare(psi[4], psi[4], SICHINT_DISPLAY, &order); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(order == 0, "Got order %d\n", order);
/* b:a\a, b:a\c, b:a\b */ hr = IShellItem_Compare(psi_b, psi[0], SICHINT_DISPLAY, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); + ok(hr == S_FALSE, "Got 0x%08lx\n", hr); todo_wine ok(order == 1, "Got order %d\n", order); hr = IShellItem_Compare(psi_b, psi[2], SICHINT_DISPLAY, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); + ok(hr == S_FALSE, "Got 0x%08lx\n", hr); todo_wine ok(order == 1, "Got order %d\n", order); hr = IShellItem_Compare(psi_b, psi[1], SICHINT_DISPLAY, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); + ok(hr == S_FALSE, "Got 0x%08lx\n", hr); todo_wine ok(order == 1, "Got order %d\n", order);
/* b:c\a, b:c\c, b:c\b */ hr = IShellItem_Compare(psi_b, psi[6], SICHINT_DISPLAY, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); + ok(hr == S_FALSE, "Got 0x%08lx\n", hr); ok(order == -1, "Got order %d\n", order); hr = IShellItem_Compare(psi_b, psi[8], SICHINT_DISPLAY, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); + ok(hr == S_FALSE, "Got 0x%08lx\n", hr); ok(order == -1, "Got order %d\n", order); hr = IShellItem_Compare(psi_b, psi[7], SICHINT_DISPLAY, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); + ok(hr == S_FALSE, "Got 0x%08lx\n", hr); ok(order == -1, "Got order %d\n", order);
/* a\b:a\a , a\b:a\c, a\b:a\b */ hr = IShellItem_Compare(psi[1], psi[0], SICHINT_CANONICAL, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); + ok(hr == S_FALSE, "Got 0x%08lx\n", hr); ok(order == 1, "Got order %d\n", order); hr = IShellItem_Compare(psi[1], psi[2], SICHINT_CANONICAL, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); + ok(hr == S_FALSE, "Got 0x%08lx\n", hr); ok(order == -1, "Got order %d\n", order); hr = IShellItem_Compare(psi[1], psi[1], SICHINT_CANONICAL, &order); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(order == 0, "Got order %d\n", order);
/* b\b:a\b, b\b:c\b, b\b:c\b */ hr = IShellItem_Compare(psi[4], psi[1], SICHINT_CANONICAL, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); + ok(hr == S_FALSE, "Got 0x%08lx\n", hr); ok(order == 1, "Got order %d\n", order); hr = IShellItem_Compare(psi[4], psi[7], SICHINT_CANONICAL, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); + ok(hr == S_FALSE, "Got 0x%08lx\n", hr); ok(order == -1, "Got order %d\n", order); hr = IShellItem_Compare(psi[4], psi[4], SICHINT_CANONICAL, &order); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(order == 0, "Got order %d\n", order);
/* b:a\a, b:a\c, b:a\b */ hr = IShellItem_Compare(psi_b, psi[0], SICHINT_CANONICAL, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); + ok(hr == S_FALSE, "Got 0x%08lx\n", hr); todo_wine ok(order == 1, "Got order %d\n", order); hr = IShellItem_Compare(psi_b, psi[2], SICHINT_CANONICAL, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); + ok(hr == S_FALSE, "Got 0x%08lx\n", hr); todo_wine ok(order == 1, "Got order %d\n", order); hr = IShellItem_Compare(psi_b, psi[1], SICHINT_CANONICAL, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); + ok(hr == S_FALSE, "Got 0x%08lx\n", hr); todo_wine ok(order == 1, "Got order %d\n", order);
/* b:c\a, b:c\c, b:c\b */ hr = IShellItem_Compare(psi_b, psi[6], SICHINT_CANONICAL, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); + ok(hr == S_FALSE, "Got 0x%08lx\n", hr); ok(order == -1, "Got order %d\n", order); hr = IShellItem_Compare(psi_b, psi[8], SICHINT_CANONICAL, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); + ok(hr == S_FALSE, "Got 0x%08lx\n", hr); ok(order == -1, "Got order %d\n", order); hr = IShellItem_Compare(psi_b, psi[7], SICHINT_CANONICAL, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); + ok(hr == S_FALSE, "Got 0x%08lx\n", hr); ok(order == -1, "Got order %d\n", order);
cleanup: @@ -3030,7 +3030,7 @@ static void test_SHGetIDListFromObject(void) }
hres = pSHGetIDListFromObject(NULL, &pidl); - ok(hres == E_NOINTERFACE, "Got %x\n", hres); + ok(hres == E_NOINTERFACE, "Got %lx\n", hres);
punkimpl = heap_alloc(sizeof(*punkimpl)); punkimpl->IUnknown_iface.lpVtbl = &vt_IUnknown; @@ -3038,7 +3038,7 @@ static void test_SHGetIDListFromObject(void) punkimpl->unknown = 0;
hres = pSHGetIDListFromObject(&punkimpl->IUnknown_iface, &pidl); - ok(hres == E_NOINTERFACE, "Got %x\n", hres); + ok(hres == E_NOINTERFACE, "Got %lx\n", hres); ok(ifaces[0].count, "interface not requested.\n"); ok(ifaces[1].count, "interface not requested.\n"); ok(ifaces[2].count, "interface not requested.\n"); @@ -3048,7 +3048,7 @@ static void test_SHGetIDListFromObject(void) ok(ifaces[4].count || broken(!ifaces[4].count /*vista*/), "interface not requested.\n");
- ok(!punkimpl->unknown, "Got %d unknown.\n", punkimpl->unknown); + ok(!punkimpl->unknown, "Got %ld unknown.\n", punkimpl->unknown); heap_free(punkimpl);
pidl_desktop = NULL; @@ -3062,11 +3062,11 @@ static void test_SHGetIDListFromObject(void) { IShellItem *shellitem; hres = pSHCreateShellItem(NULL, NULL, pidl_desktop, &shellitem); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); if(SUCCEEDED(hres)) { hres = pSHGetIDListFromObject((IUnknown*)shellitem, &pidl); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); if(SUCCEEDED(hres)) { ok(ILIsEqual(pidl_desktop, pidl), "pidl not equal.\n"); @@ -3080,7 +3080,7 @@ static void test_SHGetIDListFromObject(void)
/* Test IShellFolder */ hres = pSHGetIDListFromObject((IUnknown*)psfdesktop, &pidl); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); if(SUCCEEDED(hres)) { ok(ILIsEqual(pidl_desktop, pidl), "pidl not equal.\n"); @@ -3088,7 +3088,7 @@ static void test_SHGetIDListFromObject(void) }
hres = IShellFolder_CreateViewObject(psfdesktop, NULL, &IID_IShellView, (void**)&psv); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); if(SUCCEEDED(hres)) { IEnumIDList *peidl; @@ -3097,7 +3097,7 @@ static void test_SHGetIDListFromObject(void)
/* Test IFolderView */ hres = pSHGetIDListFromObject((IUnknown*)psv, &pidl); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); if(SUCCEEDED(hres)) { ok(ILIsEqual(pidl_desktop, pidl), "pidl not equal.\n"); @@ -3107,7 +3107,7 @@ static void test_SHGetIDListFromObject(void) /* Test IDataObject */ enum_flags = SHCONTF_NONFOLDERS | SHCONTF_FOLDERS | SHCONTF_INCLUDEHIDDEN; hres = IShellFolder_EnumObjects(psfdesktop, NULL, enum_flags, &peidl); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); if(SUCCEEDED(hres)) { LPITEMIDLIST apidl[5]; @@ -3120,12 +3120,12 @@ static void test_SHGetIDListFromObject(void) { hres = IShellFolder_GetUIObjectOf(psfdesktop, NULL, 1, (LPCITEMIDLIST*)apidl, &IID_IDataObject, NULL, (void**)&pdo); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); if(SUCCEEDED(hres)) { pidl = (void*)0xDEADBEEF; hres = pSHGetIDListFromObject((IUnknown*)pdo, &pidl); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(pidl != NULL, "pidl is NULL.\n"); ok(ILIsEqual(pidl, apidl[0]), "pidl not equal.\n"); ILFree(pidl); @@ -3140,13 +3140,13 @@ static void test_SHGetIDListFromObject(void) { hres = IShellFolder_GetUIObjectOf(psfdesktop, NULL, count, (LPCITEMIDLIST*)apidl, &IID_IDataObject, NULL, (void**)&pdo); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); if(SUCCEEDED(hres)) { pidl = (void*)0xDEADBEEF; hres = pSHGetIDListFromObject((IUnknown*)pdo, &pidl); ok(hres == E_NOINTERFACE || hres == E_FAIL /*Vista*/, - "got 0x%08x\n", hres); + "got 0x%08lx\n", hres); ok(pidl == NULL, "pidl is not NULL.\n");
IDataObject_Release(pdo); @@ -3201,7 +3201,7 @@ static void test_SHGetItemFromObject(void) }
hres = pSHGetItemFromObject(NULL, &IID_IUnknown, (void**)&punk); - ok(hres == E_NOINTERFACE, "Got 0x%08x\n", hres); + ok(hres == E_NOINTERFACE, "Got 0x%08lx\n", hres);
punkimpl = heap_alloc(sizeof(*punkimpl)); punkimpl->IUnknown_iface.lpVtbl = &vt_IUnknown; @@ -3210,7 +3210,7 @@ static void test_SHGetItemFromObject(void)
/* The same as SHGetIDListFromObject */ hres = pSHGetIDListFromObject(&punkimpl->IUnknown_iface, &pidl); - ok(hres == E_NOINTERFACE, "Got %x\n", hres); + ok(hres == E_NOINTERFACE, "Got %lx\n", hres); ok(ifaces[0].count, "interface not requested.\n"); ok(ifaces[1].count, "interface not requested.\n"); ok(ifaces[2].count, "interface not requested.\n"); @@ -3220,17 +3220,17 @@ static void test_SHGetItemFromObject(void) ok(ifaces[4].count || broken(!ifaces[4].count /*vista*/), "interface not requested.\n");
- ok(!punkimpl->unknown, "Got %d unknown.\n", punkimpl->unknown); + ok(!punkimpl->unknown, "Got %ld unknown.\n", punkimpl->unknown); heap_free(punkimpl);
/* Test IShellItem */ hres = pSHGetItemFromObject((IUnknown*)psfdesktop, &IID_IShellItem, (void**)&psi); - ok(hres == S_OK, "Got 0x%08x\n", hres); + ok(hres == S_OK, "Got 0x%08lx\n", hres); if(SUCCEEDED(hres)) { IShellItem *psi2; hres = pSHGetItemFromObject((IUnknown*)psi, &IID_IShellItem, (void**)&psi2); - ok(hres == S_OK, "Got 0x%08x\n", hres); + ok(hres == S_OK, "Got 0x%08lx\n", hres); if(SUCCEEDED(hres)) { todo_wine @@ -3268,18 +3268,18 @@ static void test_SHCreateShellItemArray(void) }
hr = pSHCreateShellItemArray(NULL, NULL, 0, NULL, &psia); - ok(hr == E_POINTER, "got 0x%08x\n", hr); + ok(hr == E_POINTER, "got 0x%08lx\n", hr);
SHGetDesktopFolder(&pdesktopsf); hr = pSHCreateShellItemArray(NULL, pdesktopsf, 0, NULL, &psia); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = pSHCreateShellItemArray(NULL, pdesktopsf, 1, NULL, &psia); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
SHGetSpecialFolderLocation(NULL, CSIDL_DESKTOP, &pidl); hr = pSHCreateShellItemArray(pidl, NULL, 0, NULL, &psia); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); ILFree(pidl);
GetCurrentDirectoryW(MAX_PATH, cTestDirW); @@ -3289,12 +3289,12 @@ static void test_SHCreateShellItemArray(void) CreateFilesFolders();
hr = IShellFolder_ParseDisplayName(pdesktopsf, NULL, NULL, cTestDirW, NULL, &pidl_testdir, 0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { hr = IShellFolder_BindToObject(pdesktopsf, pidl_testdir, NULL, (REFIID)&IID_IShellFolder, (void**)&psf); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); } IShellFolder_Release(pdesktopsf);
@@ -3307,7 +3307,7 @@ static void test_SHCreateShellItemArray(void) }
hr = IShellFolder_EnumObjects(psf, NULL, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS, &peidl); - ok(hr == S_OK, "Got %08x\n", hr); + ok(hr == S_OK, "Got %08lx\n", hr); if(SUCCEEDED(hr)) { LPITEMIDLIST apidl[5]; @@ -3322,7 +3322,7 @@ static void test_SHCreateShellItemArray(void)
/* Create a ShellItemArray */ hr = pSHCreateShellItemArray(NULL, psf, done, (LPCITEMIDLIST*)apidl, &psia); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { IShellItem *psi; @@ -3334,10 +3334,10 @@ static void test_SHCreateShellItemArray(void) }
IShellItemArray_GetCount(psia, &numitems); - ok(numitems == done, "Got %d, expected %d\n", numitems, done); + ok(numitems == done, "Got %ld, expected %d\n", numitems, done);
hr = IShellItemArray_GetItemAt(psia, numitems, &psi); - ok(hr == E_FAIL, "Got 0x%08x\n", hr); + ok(hr == E_FAIL, "Got 0x%08lx\n", hr);
/* Compare all the items */ for(i = 0; i < numitems; i++) @@ -3346,11 +3346,11 @@ static void test_SHCreateShellItemArray(void) pidl_abs = ILCombine(pidl_testdir, apidl[i]);
hr = IShellItemArray_GetItemAt(psia, i, &psi); - ok(hr == S_OK, "(%d) Failed with 0x%08x\n", i, hr); + ok(hr == S_OK, "(%ld) Failed with 0x%08lx\n", i, hr); if(SUCCEEDED(hr)) { hr = pSHGetIDListFromObject((IUnknown*)psi, &pidl); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { ok(ILIsEqual(pidl_abs, pidl), "Pidl not equal.\n"); @@ -3380,30 +3380,30 @@ static void test_SHCreateShellItemArray(void) }
hr = pSHCreateItemFromIDList(pidl_testdir, &IID_IShellItem, (void**)&psi); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { hr = pSHCreateShellItemArrayFromShellItem(psi, &IID_IShellItemArray, (void**)&psia); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { IShellItem *psi2; DWORD count; hr = IShellItemArray_GetCount(psia, &count); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(count == 1, "Got count %d\n", count); + ok(hr == S_OK, "Got 0x%08lx\n", hr); + ok(count == 1, "Got count %ld\n", count); hr = IShellItemArray_GetItemAt(psia, 0, &psi2); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); todo_wine ok(psi != psi2, "ShellItems are of the same instance.\n"); if(SUCCEEDED(hr)) { LPITEMIDLIST pidl1, pidl2; hr = pSHGetIDListFromObject((IUnknown*)psi, &pidl1); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(pidl1 != NULL, "pidl1 was null.\n"); hr = pSHGetIDListFromObject((IUnknown*)psi2, &pidl2); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(pidl2 != NULL, "pidl2 was null.\n"); ok(ILIsEqual(pidl1, pidl2), "pidls not equal.\n"); ILFree(pidl1); @@ -3411,7 +3411,7 @@ static void test_SHCreateShellItemArray(void) IShellItem_Release(psi2); } hr = IShellItemArray_GetItemAt(psia, 1, &psi2); - ok(hr == E_FAIL, "Got 0x%08x\n", hr); + ok(hr == E_FAIL, "Got 0x%08lx\n", hr); IShellItemArray_Release(psia); } IShellItem_Release(psi); @@ -3430,10 +3430,10 @@ static void test_SHCreateShellItemArray(void) pSHCreateShellItemArrayFromDataObject(NULL, &IID_IShellItemArray, NULL); } hr = pSHCreateShellItemArrayFromDataObject(NULL, &IID_IShellItemArray, (void**)&psia); - ok(hr == E_INVALIDARG, "Got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Got 0x%08lx\n", hr);
hr = IShellFolder_CreateViewObject(psf, NULL, &IID_IShellView, (void**)&psv); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { IEnumIDList *peidl; @@ -3442,7 +3442,7 @@ static void test_SHCreateShellItemArray(void)
enum_flags = SHCONTF_NONFOLDERS | SHCONTF_FOLDERS | SHCONTF_INCLUDEHIDDEN; hr = IShellFolder_EnumObjects(psf, NULL, enum_flags, &peidl); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { LPITEMIDLIST apidl[5]; @@ -3457,29 +3457,29 @@ static void test_SHCreateShellItemArray(void) { hr = IShellFolder_GetUIObjectOf(psf, NULL, count, (LPCITEMIDLIST*)apidl, &IID_IDataObject, NULL, (void**)&pdo); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { hr = pSHCreateShellItemArrayFromDataObject(pdo, &IID_IShellItemArray, (void**)&psia); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { DWORD count_sia, i; hr = IShellItemArray_GetCount(psia, &count_sia); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(count_sia == count, "Counts differ (%d, %d)\n", count, count_sia); + ok(hr == S_OK, "Got 0x%08lx\n", hr); + ok(count_sia == count, "Counts differ (%d, %ld)\n", count, count_sia); for(i = 0; i < count_sia; i++) { LPITEMIDLIST pidl_abs = ILCombine(pidl_testdir, apidl[i]); IShellItem *psi; hr = IShellItemArray_GetItemAt(psia, i, &psi); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { LPITEMIDLIST pidl; hr = pSHGetIDListFromObject((IUnknown*)psi, &pidl); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(pidl != NULL, "pidl as NULL.\n"); ok(ILIsEqual(pidl, pidl_abs), "pidls differ.\n"); ILFree(pidl); @@ -3522,25 +3522,25 @@ static void test_SHCreateShellItemArray(void)
psia = (void*)0xdeadbeef; hr = pSHCreateShellItemArrayFromIDLists(0, NULL, &psia); - ok(hr == E_INVALIDARG, "Got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Got 0x%08lx\n", hr); ok(psia == NULL, "Got %p\n", psia);
psia = (void*)0xdeadbeef; hr = pSHCreateShellItemArrayFromIDLists(0, pidl_array, &psia); - ok(hr == E_INVALIDARG, "Got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Got 0x%08lx\n", hr); ok(psia == NULL, "Got %p\n", psia);
psia = (void*)0xdeadbeef; pidl_array[0] = NULL; hr = pSHCreateShellItemArrayFromIDLists(1, pidl_array, &psia); - todo_wine ok(hr == E_OUTOFMEMORY, "Got 0x%08x\n", hr); + todo_wine ok(hr == E_OUTOFMEMORY, "Got 0x%08lx\n", hr); ok(psia == NULL, "Got %p\n", psia);
psia = (void*)0xdeadbeef; pidl_array[0] = pidl_testdir; pidl_array[1] = NULL; hr = pSHCreateShellItemArrayFromIDLists(2, pidl_array, &psia); - todo_wine ok(hr == S_OK || broken(hr == E_INVALIDARG) /* Vista */, "Got 0x%08x\n", hr); + todo_wine ok(hr == S_OK || broken(hr == E_INVALIDARG) /* Vista */, "Got 0x%08lx\n", hr); todo_wine ok(psia != NULL || broken(psia == NULL) /* Vista */, "Got %p\n", psia); if(SUCCEEDED(hr)) { @@ -3548,16 +3548,16 @@ static void test_SHCreateShellItemArray(void) DWORD count = 0;
hr = IShellItemArray_GetCount(psia, &count); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(count == 2, "Got %d\n", count); + ok(hr == S_OK, "Got 0x%08lx\n", hr); + ok(count == 2, "Got %ld\n", count);
hr = IShellItemArray_GetItemAt(psia, 0, &psi); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { LPWSTR path; hr = IShellItem_GetDisplayName(psi, SIGDN_DESKTOPABSOLUTEPARSING, &path); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(!lstrcmpW(path, cTestDirW), "Got %s\n", wine_dbgstr_w(path)); if(SUCCEEDED(hr)) CoTaskMemFree(path); @@ -3566,7 +3566,7 @@ static void test_SHCreateShellItemArray(void) }
hr = IShellItemArray_GetItemAt(psia, 1, &psi); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { LPWSTR path; @@ -3574,10 +3574,10 @@ static void test_SHCreateShellItemArray(void) BOOL result;
result = SHGetSpecialFolderPathW(NULL, desktoppath, CSIDL_DESKTOPDIRECTORY, FALSE); - ok(result, "SHGetSpecialFolderPathW(CSIDL_DESKTOPDIRECTORY) failed! %u\n", GetLastError()); + ok(result, "SHGetSpecialFolderPathW(CSIDL_DESKTOPDIRECTORY) failed! %lu\n", GetLastError());
hr = IShellItem_GetDisplayName(psi, SIGDN_DESKTOPABSOLUTEPARSING, &path); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(!lstrcmpW(path, desktoppath), "Got %s\n", wine_dbgstr_w(path)); if(SUCCEEDED(hr)) CoTaskMemFree(path); @@ -3594,23 +3594,23 @@ static void test_SHCreateShellItemArray(void) psia = (void*)0xdeadbeef; pidl_array[0] = pidl_testdir; hr = pSHCreateShellItemArrayFromIDLists(1, pidl_array, &psia); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { IShellItem *psi; DWORD count = 0;
hr = IShellItemArray_GetCount(psia, &count); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(count == 1, "Got %d\n", count); + ok(hr == S_OK, "Got 0x%08lx\n", hr); + ok(count == 1, "Got %ld\n", count);
hr = IShellItemArray_GetItemAt(psia, 0, &psi); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { LPWSTR path; hr = IShellItem_GetDisplayName(psi, SIGDN_DESKTOPABSOLUTEPARSING, &path); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(!lstrcmpW(path, cTestDirW), "Got %s\n", wine_dbgstr_w(path)); if(SUCCEEDED(hr)) CoTaskMemFree(path); @@ -3629,30 +3629,30 @@ static void test_SHCreateShellItemArray(void) SHGetDesktopFolder(&pdesktopsf);
hr = IShellFolder_ParseDisplayName(pdesktopsf, NULL, NULL, test1pathW, NULL, &pidltest1, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { psia = (void*)0xdeadbeef; pidl_array[0] = pidl_testdir; pidl_array[1] = pidltest1; hr = pSHCreateShellItemArrayFromIDLists(2, pidl_array, &psia); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { IShellItem *psi; DWORD count = 0;
hr = IShellItemArray_GetCount(psia, &count); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(count == 2, "Got %d\n", count); + ok(hr == S_OK, "Got 0x%08lx\n", hr); + ok(count == 2, "Got %ld\n", count);
hr = IShellItemArray_GetItemAt(psia, 0, &psi); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { LPWSTR path; hr = IShellItem_GetDisplayName(psi, SIGDN_DESKTOPABSOLUTEPARSING, &path); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(!lstrcmpW(path, cTestDirW), "Got %s\n", wine_dbgstr_w(path)); if(SUCCEEDED(hr)) CoTaskMemFree(path); @@ -3661,12 +3661,12 @@ static void test_SHCreateShellItemArray(void) }
hr = IShellItemArray_GetItemAt(psia, 1, &psi); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { LPWSTR path; hr = IShellItem_GetDisplayName(psi, SIGDN_DESKTOPABSOLUTEPARSING, &path); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(!lstrcmpW(path, test1pathW), "Got %s\n", wine_dbgstr_w(path)); if(SUCCEEDED(hr)) CoTaskMemFree(path); @@ -3715,19 +3715,19 @@ static void test_ShellItemArrayEnumItems(void) lstrcatW(cTestDirW, testdirW);
hr = IShellFolder_ParseDisplayName(pdesktopsf, NULL, NULL, cTestDirW, NULL, &pidl_testdir, 0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { hr = IShellFolder_BindToObject(pdesktopsf, pidl_testdir, NULL, (REFIID)&IID_IShellFolder, (void**)&psf); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ILFree(pidl_testdir); } IShellFolder_Release(pdesktopsf); if (FAILED(hr)) return;
hr = IShellFolder_EnumObjects(psf, NULL, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS, &peidl); - ok(hr == S_OK, "Got %08x\n", hr); + ok(hr == S_OK, "Got %08lx\n", hr); if(SUCCEEDED(hr)) { IShellItemArray *psia; @@ -3743,7 +3743,7 @@ static void test_ShellItemArrayEnumItems(void)
/* Create a ShellItemArray */ hr = pSHCreateShellItemArray(NULL, psf, done, (LPCITEMIDLIST*)apidl, &psia); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { IEnumShellItems *iesi; @@ -3751,11 +3751,11 @@ static void test_ShellItemArrayEnumItems(void) ULONG fetched;
IShellItemArray_GetCount(psia, &numitems); - ok(numitems == done, "Got %d, expected %d\n", numitems, done); + ok(numitems == done, "Got %ld, expected %d\n", numitems, done);
iesi = NULL; hr = IShellItemArray_EnumItems(psia, &iesi); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(iesi != NULL, "Got NULL\n"); if(SUCCEEDED(hr)) { @@ -3764,12 +3764,12 @@ static void test_ShellItemArrayEnumItems(void) /* This should fail according to the documentation and Win7+ */ for(i = 0; i < 10; i++) my_array[i] = (void*)0xdeadbeef; hr = IEnumShellItems_Next(iesi, 2, my_array, NULL); - ok(hr == E_INVALIDARG || broken(hr == S_OK) /* Vista */, "Got 0x%08x\n", hr); + ok(hr == E_INVALIDARG || broken(hr == S_OK) /* Vista */, "Got 0x%08lx\n", hr); for(i = 0; i < 2; i++) { ok(my_array[i] == (void*)0xdeadbeef || broken(my_array[i] != (void*)0xdeadbeef && my_array[i] != NULL), /* Vista */ - "Got %p (%d)\n", my_array[i], i); + "Got %p (%ld)\n", my_array[i], i);
if(my_array[i] != (void*)0xdeadbeef) IShellItem_Release(my_array[i]); @@ -3779,7 +3779,7 @@ static void test_ShellItemArrayEnumItems(void) IEnumShellItems_Reset(iesi); for(i = 0; i < 10; i++) my_array[i] = (void*)0xdeadbeef; hr = IEnumShellItems_Next(iesi, 1, my_array, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(my_array[0] != NULL && my_array[0] != (void*)0xdeadbeef, "Got %p\n", my_array[0]); if(my_array[0] != NULL && my_array[0] != (void*)0xdeadbeef) IShellItem_Release(my_array[0]); @@ -3789,12 +3789,12 @@ static void test_ShellItemArrayEnumItems(void) fetched = 0; for(i = 0; i < 10; i++) my_array[i] = (void*)0xdeadbeef; hr = IEnumShellItems_Next(iesi, numitems, my_array, &fetched); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(fetched == numitems, "Got %d\n", fetched); + ok(hr == S_OK, "Got 0x%08lx\n", hr); + ok(fetched == numitems, "Got %ld\n", fetched); for(i = 0;i < numitems; i++) { ok(my_array[i] != NULL && my_array[i] != (void*)0xdeadbeef, - "Got %p at %d\n", my_array[i], i); + "Got %p at %ld\n", my_array[i], i);
if(my_array[i] != NULL && my_array[i] != (void*)0xdeadbeef) IShellItem_Release(my_array[i]); @@ -3809,13 +3809,13 @@ static void test_ShellItemArrayEnumItems(void) int order;
hr = IShellItemArray_GetItemAt(psia, i, &psi); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); hr = IEnumShellItems_Next(iesi, 1, my_array, &fetched); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(fetched == 1, "Got %d\n", fetched); + ok(hr == S_OK, "Got 0x%08lx\n", hr); + ok(fetched == 1, "Got %ld\n", fetched);
hr = IShellItem_Compare(psi, my_array[0], 0, &order); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(order == 0, "Got %d\n", order);
IShellItem_Release(psi); @@ -3824,14 +3824,14 @@ static void test_ShellItemArrayEnumItems(void)
my_array[0] = (void*)0xdeadbeef; hr = IEnumShellItems_Next(iesi, 1, my_array, &fetched); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); - ok(fetched == 0, "Got %d\n", fetched); + ok(hr == S_FALSE, "Got 0x%08lx\n", hr); + ok(fetched == 0, "Got %ld\n", fetched); ok(my_array[0] == (void*)0xdeadbeef, "Got %p\n", my_array[0]);
/* Cloning not implemented anywhere */ iesi2 = (void*)0xdeadbeef; hr = IEnumShellItems_Clone(iesi, &iesi2); - ok(hr == E_NOTIMPL, "Got 0x%08x\n", hr); + ok(hr == E_NOTIMPL, "Got 0x%08lx\n", hr); ok(iesi2 == NULL || broken(iesi2 == (void*)0xdeadbeef) /* Vista */, "Got %p\n", iesi2);
IEnumShellItems_Release(iesi); @@ -3861,11 +3861,11 @@ static void test_ShellItemBindToHandler(void) }
hr = SHGetSpecialFolderLocation(NULL, CSIDL_DESKTOP, &pidl_desktop); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { hr = pSHCreateShellItem(NULL, NULL, pidl_desktop, &psi); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); } if(SUCCEEDED(hr)) { @@ -3879,19 +3879,19 @@ static void test_ShellItemBindToHandler(void) IShellItem_BindToHandler(psi, NULL, &IID_IUnknown, &IID_IUnknown, NULL); } hr = IShellItem_BindToHandler(psi, NULL, &IID_IUnknown, &IID_IUnknown, (void**)&punk); - ok(hr == MK_E_NOOBJECT, "Got 0x%08x\n", hr); + ok(hr == MK_E_NOOBJECT, "Got 0x%08lx\n", hr);
/* BHID_SFObject */ hr = IShellItem_BindToHandler(psi, NULL, &BHID_SFObject, &IID_IShellFolder, (void**)&punk); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk); hr = IShellItem_BindToHandler(psi, NULL, &BHID_SFObject, &IID_IPersistFolder2, (void**)&ppf2); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { LPITEMIDLIST pidl_tmp; hr = IPersistFolder2_GetCurFolder(ppf2, &pidl_tmp); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { ok(ILIsEqual(pidl_desktop, pidl_tmp), "Pidl not equal (%p, %p)\n", pidl_desktop, pidl_tmp); @@ -3902,105 +3902,105 @@ static void test_ShellItemBindToHandler(void)
/* BHID_SFUIObject */ hr = IShellItem_BindToHandler(psi, NULL, &BHID_SFUIObject, &IID_IDataObject, (void**)&punk); - ok(hr == S_OK || broken(hr == E_NOINTERFACE /* XP */), "Got 0x%08x\n", hr); + ok(hr == S_OK || broken(hr == E_NOINTERFACE /* XP */), "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk); hr = IShellItem_BindToHandler(psi, NULL, &BHID_SFUIObject, &IID_IContextMenu, (void**)&punk); - ok(hr == S_OK || broken(hr == E_NOINTERFACE /* XP */), "Got 0x%08x\n", hr); + ok(hr == S_OK || broken(hr == E_NOINTERFACE /* XP */), "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk);
/* BHID_DataObject */ hr = IShellItem_BindToHandler(psi, NULL, &BHID_DataObject, &IID_IDataObject, (void**)&punk); - ok(hr == S_OK || broken(hr == MK_E_NOOBJECT /* XP */), "Got 0x%08x\n", hr); + ok(hr == S_OK || broken(hr == MK_E_NOOBJECT /* XP */), "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk);
todo_wine { /* BHID_SFViewObject */ hr = IShellItem_BindToHandler(psi, NULL, &BHID_SFViewObject, &IID_IShellView, (void**)&punk); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk); hr = IShellItem_BindToHandler(psi, NULL, &BHID_SFViewObject, &IID_IShellFolderView, (void**)&punk); - ok(hr == E_NOINTERFACE, "Got 0x%08x\n", hr); + ok(hr == E_NOINTERFACE, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk);
/* BHID_Storage */ hr = IShellItem_BindToHandler(psi, NULL, &BHID_Storage, &IID_IStream, (void**)&punk); - ok(hr == E_NOINTERFACE, "Got 0x%08x\n", hr); + ok(hr == E_NOINTERFACE, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk); hr = IShellItem_BindToHandler(psi, NULL, &BHID_Storage, &IID_IUnknown, (void**)&punk); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk);
/* BHID_Stream */ hr = IShellItem_BindToHandler(psi, NULL, &BHID_Stream, &IID_IStream, (void**)&punk); - ok(hr == E_NOINTERFACE, "Got 0x%08x\n", hr); + ok(hr == E_NOINTERFACE, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk); hr = IShellItem_BindToHandler(psi, NULL, &BHID_Stream, &IID_IUnknown, (void**)&punk); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk);
/* BHID_StorageEnum */ hr = IShellItem_BindToHandler(psi, NULL, &BHID_StorageEnum, &IID_IEnumShellItems, (void**)&punk); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk);
/* BHID_Transfer ITransferSource and ITransferDestination are accessible starting from Vista, IUnknown is supported starting from Win8. */ hr = IShellItem_BindToHandler(psi, NULL, &BHID_Transfer, &IID_ITransferSource, (void**)&punk); - ok(hr == S_OK || broken(FAILED(hr)) /* pre-Vista */, "Got 0x%08x\n", hr); + ok(hr == S_OK || broken(FAILED(hr)) /* pre-Vista */, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { IUnknown_Release(punk);
hr = IShellItem_BindToHandler(psi, NULL, &BHID_Transfer, &IID_ITransferDestination, (void**)&punk); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk);
hr = IShellItem_BindToHandler(psi, NULL, &BHID_Transfer, &IID_IUnknown, (void**)&punk); - ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* pre-Win8 */, "Got 0x%08x\n", hr); + ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* pre-Win8 */, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk); }
/* BHID_EnumItems */ hr = IShellItem_BindToHandler(psi, NULL, &BHID_EnumItems, &IID_IEnumShellItems, (void**)&punk); - ok(hr == S_OK || broken(hr == MK_E_NOOBJECT /* XP */), "Got 0x%08x\n", hr); + ok(hr == S_OK || broken(hr == MK_E_NOOBJECT /* XP */), "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk);
/* BHID_Filter */ hr = IShellItem_BindToHandler(psi, NULL, &BHID_Filter, &IID_IUnknown, (void**)&punk); - ok(hr == S_OK || broken(hr == MK_E_NOOBJECT /* XP */), "Got 0x%08x\n", hr); + ok(hr == S_OK || broken(hr == MK_E_NOOBJECT /* XP */), "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk);
/* BHID_LinkTargetItem */ hr = IShellItem_BindToHandler(psi, NULL, &BHID_LinkTargetItem, &IID_IShellItem, (void**)&punk); - ok(hr == E_NOINTERFACE || broken(hr == E_INVALIDARG /* XP */), "Got 0x%08x\n", hr); + ok(hr == E_NOINTERFACE || broken(hr == E_INVALIDARG /* XP */), "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk); hr = IShellItem_BindToHandler(psi, NULL, &BHID_LinkTargetItem, &IID_IUnknown, (void**)&punk); - ok(hr == E_NOINTERFACE || broken(hr == E_INVALIDARG /* XP */), "Got 0x%08x\n", hr); + ok(hr == E_NOINTERFACE || broken(hr == E_INVALIDARG /* XP */), "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk);
/* BHID_PropertyStore */ hr = IShellItem_BindToHandler(psi, NULL, &BHID_PropertyStore, &IID_IPropertyStore, (void**)&punk); - ok(hr == E_NOINTERFACE || broken(hr == MK_E_NOOBJECT /* XP */), "Got 0x%08x\n", hr); + ok(hr == E_NOINTERFACE || broken(hr == MK_E_NOOBJECT /* XP */), "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk); hr = IShellItem_BindToHandler(psi, NULL, &BHID_PropertyStore, &IID_IPropertyStoreFactory, (void**)&punk); - ok(hr == E_NOINTERFACE || broken(hr == MK_E_NOOBJECT /* XP */), "Got 0x%08x\n", hr); + ok(hr == E_NOINTERFACE || broken(hr == MK_E_NOOBJECT /* XP */), "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk);
/* BHID_ThumbnailHandler */ hr = IShellItem_BindToHandler(psi, NULL, &BHID_ThumbnailHandler, &IID_IUnknown, (void**)&punk); - ok(hr == E_INVALIDARG || broken(hr == MK_E_NOOBJECT /* XP */), "Got 0x%08x\n", hr); + ok(hr == E_INVALIDARG || broken(hr == MK_E_NOOBJECT /* XP */), "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk);
/* BHID_AssociationArray */ hr = IShellItem_BindToHandler(psi, NULL, &BHID_AssociationArray, &IID_IQueryAssociations, (void**)&punk); - ok(hr == S_OK || broken(hr == MK_E_NOOBJECT /* XP */), "Got 0x%08x\n", hr); + ok(hr == S_OK || broken(hr == MK_E_NOOBJECT /* XP */), "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk);
/* BHID_EnumAssocHandlers */ hr = IShellItem_BindToHandler(psi, NULL, &BHID_EnumAssocHandlers, &IID_IUnknown, (void**)&punk); - ok(hr == E_NOINTERFACE || broken(hr == MK_E_NOOBJECT /* XP */), "Got 0x%08x\n", hr); + ok(hr == E_NOINTERFACE || broken(hr == MK_E_NOOBJECT /* XP */), "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) IUnknown_Release(punk); }
@@ -4031,11 +4031,11 @@ static void test_ShellItemGetAttributes(void) }
hr = SHGetSpecialFolderLocation(NULL, CSIDL_DESKTOP, &pidl_desktop); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { hr = pSHCreateShellItem(NULL, NULL, pidl_desktop, &psi); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ILFree(pidl_desktop); } if(FAILED(hr)) @@ -4053,8 +4053,8 @@ static void test_ShellItemGetAttributes(void) /* Test GetAttributes on the desktop folder. */ sfgao = 0xdeadbeef; hr = IShellItem_GetAttributes(psi, SFGAO_FOLDER, &sfgao); - ok(hr == S_OK || broken(hr == E_FAIL) /* <Vista */, "Got 0x%08x\n", hr); - ok(sfgao == SFGAO_FOLDER || broken(sfgao == 0) /* <Vista */, "Got 0x%08x\n", sfgao); + ok(hr == S_OK || broken(hr == E_FAIL) /* <Vista */, "Got 0x%08lx\n", hr); + ok(sfgao == SFGAO_FOLDER || broken(sfgao == 0) /* <Vista */, "Got 0x%08lx\n", sfgao);
IShellItem_Release(psi);
@@ -4068,35 +4068,35 @@ static void test_ShellItemGetAttributes(void) lstrcpyW(buf, curdirW); lstrcatW(buf, testdir1W); hr = IShellFolder_ParseDisplayName(pdesktopsf, NULL, NULL, buf, NULL, &pidl, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = pSHCreateShellItem(NULL, NULL, pidl, &psi_folder1); - ok(hr == S_OK, "Got 0x%08x\n", sfgao); + ok(hr == S_OK, "Got 0x%08lx\n", sfgao); ILFree(pidl);
lstrcpyW(buf, curdirW); lstrcatW(buf, testfile1W); hr = IShellFolder_ParseDisplayName(pdesktopsf, NULL, NULL, buf, NULL, &pidl, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = pSHCreateShellItem(NULL, NULL, pidl, &psi_file1); - ok(hr == S_OK, "Got 0x%08x\n", sfgao); + ok(hr == S_OK, "Got 0x%08lx\n", sfgao); ILFree(pidl);
IShellFolder_Release(pdesktopsf);
sfgao = 0xdeadbeef; hr = IShellItem_GetAttributes(psi_folder1, 0, &sfgao); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(sfgao == 0, "Got 0x%08x\n", sfgao); + ok(hr == S_OK, "Got 0x%08lx\n", hr); + ok(sfgao == 0, "Got 0x%08lx\n", sfgao);
sfgao = 0xdeadbeef; hr = IShellItem_GetAttributes(psi_folder1, SFGAO_FOLDER, &sfgao); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(sfgao == SFGAO_FOLDER, "Got 0x%08x\n", sfgao); + ok(hr == S_OK, "Got 0x%08lx\n", hr); + ok(sfgao == SFGAO_FOLDER, "Got 0x%08lx\n", sfgao);
sfgao = 0xdeadbeef; hr = IShellItem_GetAttributes(psi_file1, SFGAO_FOLDER, &sfgao); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); - ok(sfgao == 0, "Got 0x%08x\n", sfgao); + ok(hr == S_FALSE, "Got 0x%08lx\n", hr); + ok(sfgao == 0, "Got 0x%08lx\n", sfgao);
IShellItem_Release(psi_folder1); IShellItem_Release(psi_file1); @@ -4140,18 +4140,18 @@ static void test_ShellItemArrayGetAttributes(void) lstrcpyW(buf, curdirW); lstrcatW(buf, testfilesW[i]); hr = IShellFolder_ParseDisplayName(pdesktopsf, NULL, NULL, buf, NULL, (LPITEMIDLIST*)&pidl_array[i], NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); } IShellFolder_Release(pdesktopsf);
hr = pSHCreateShellItemArrayFromIDLists(2, pidl_array, &psia_folders1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = pSHCreateShellItemArrayFromIDLists(2, &pidl_array[1], &psia_folders2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = pSHCreateShellItemArrayFromIDLists(2, &pidl_array[3], &psia_files); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = pSHCreateShellItemArrayFromIDLists(4, &pidl_array[1], &psia_all); /* All except the first */ - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
for(i = 0; i < 5; i++) ILFree((LPITEMIDLIST)pidl_array[i]); @@ -4159,38 +4159,38 @@ static void test_ShellItemArrayGetAttributes(void) /* [testfolder/, testfolder/testfolder2] seems to break in Vista */ attr = 0xdeadbeef; hr = IShellItemArray_GetAttributes(psia_folders1, SIATTRIBFLAGS_AND, SFGAO_FOLDER, &attr); - ok(hr == S_OK || broken(hr == E_UNEXPECTED) /* Vista */, "Got 0x%08x\n", hr); - ok(attr == SFGAO_FOLDER || broken(attr == 0) /* Vista */, "Got 0x%08x\n", attr); + ok(hr == S_OK || broken(hr == E_UNEXPECTED) /* Vista */, "Got 0x%08lx\n", hr); + ok(attr == SFGAO_FOLDER || broken(attr == 0) /* Vista */, "Got 0x%08lx\n", attr); attr = 0xdeadbeef; hr = IShellItemArray_GetAttributes(psia_folders1, SIATTRIBFLAGS_OR, SFGAO_FOLDER, &attr); - ok(hr == S_OK || broken(hr == E_UNEXPECTED) /* Vista */, "Got 0x%08x\n", hr); - ok(attr == SFGAO_FOLDER || broken(attr == 0) /* Vista */, "Got 0x%08x\n", attr); + ok(hr == S_OK || broken(hr == E_UNEXPECTED) /* Vista */, "Got 0x%08lx\n", hr); + ok(attr == SFGAO_FOLDER || broken(attr == 0) /* Vista */, "Got 0x%08lx\n", attr);
/* [testfolder/testfolder2, testfolder/testfolder3] works */ attr = 0xdeadbeef; hr = IShellItemArray_GetAttributes(psia_folders2, SIATTRIBFLAGS_AND, SFGAO_FOLDER, &attr); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(attr == SFGAO_FOLDER, "Got 0x%08x\n", attr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); + ok(attr == SFGAO_FOLDER, "Got 0x%08lx\n", attr); attr = 0xdeadbeef; hr = IShellItemArray_GetAttributes(psia_files, SIATTRIBFLAGS_AND, SFGAO_FOLDER, &attr); - ok(hr == S_FALSE || broken(hr == S_OK) /* Vista */, "Got 0x%08x\n", hr); - ok(attr == 0, "Got 0x%08x\n", attr); + ok(hr == S_FALSE || broken(hr == S_OK) /* Vista */, "Got 0x%08lx\n", hr); + ok(attr == 0, "Got 0x%08lx\n", attr); attr = 0xdeadbeef; hr = IShellItemArray_GetAttributes(psia_all, SIATTRIBFLAGS_AND, SFGAO_FOLDER, &attr); - ok(hr == S_FALSE || broken(hr == S_OK) /* Vista */, "Got 0x%08x\n", hr); - ok(attr == 0, "Got 0x%08x\n", attr); + ok(hr == S_FALSE || broken(hr == S_OK) /* Vista */, "Got 0x%08lx\n", hr); + ok(attr == 0, "Got 0x%08lx\n", attr); attr = 0xdeadbeef; hr = IShellItemArray_GetAttributes(psia_folders2, SIATTRIBFLAGS_OR, SFGAO_FOLDER, &attr); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(attr == SFGAO_FOLDER, "Got 0x%08x\n", attr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); + ok(attr == SFGAO_FOLDER, "Got 0x%08lx\n", attr); attr = 0xdeadbeef; hr = IShellItemArray_GetAttributes(psia_files, SIATTRIBFLAGS_OR, SFGAO_FOLDER, &attr); - ok(hr == S_FALSE || broken(hr == S_OK) /* Vista */, "Got 0x%08x\n", hr); - ok(attr == 0, "Got 0x%08x\n", attr); + ok(hr == S_FALSE || broken(hr == S_OK) /* Vista */, "Got 0x%08lx\n", hr); + ok(attr == 0, "Got 0x%08lx\n", attr); attr = 0xdeadbeef; hr = IShellItemArray_GetAttributes(psia_all, SIATTRIBFLAGS_OR, SFGAO_FOLDER, &attr); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(attr == SFGAO_FOLDER, "Got 0x%08x\n", attr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); + ok(attr == SFGAO_FOLDER, "Got 0x%08lx\n", attr);
IShellItemArray_Release(psia_folders1); IShellItemArray_Release(psia_folders2); @@ -4221,17 +4221,17 @@ if (0) pidl1 = (LPITEMIDLIST)0xdeadbeef; hr = SHParseDisplayName(NULL, NULL, &pidl1, 0, NULL); ok(broken(hr == E_OUTOFMEMORY) /* < Vista */ || - hr == E_INVALIDARG, "failed %08x\n", hr); + hr == E_INVALIDARG, "failed %08lx\n", hr); ok(pidl1 == 0, "expected null ptr, got %p\n", pidl1);
/* dummy name */ nameW[0] = 0; hr = SHParseDisplayName(nameW, NULL, &pidl1, 0, NULL); - ok(hr == S_OK, "failed %08x\n", hr); + ok(hr == S_OK, "failed %08lx\n", hr); hr = SHGetDesktopFolder(&desktop); - ok(hr == S_OK, "failed %08x\n", hr); + ok(hr == S_OK, "failed %08lx\n", hr); hr = IShellFolder_ParseDisplayName(desktop, NULL, NULL, nameW, NULL, &pidl2, NULL); - ok(hr == S_OK, "failed %08x\n", hr); + ok(hr == S_OK, "failed %08lx\n", hr); ret = ILIsEqual(pidl1, pidl2); ok(ret == TRUE, "expected equal idls\n"); ILFree(pidl1); @@ -4241,9 +4241,9 @@ if (0) GetWindowsDirectoryW( dirW, MAX_PATH );
hr = SHParseDisplayName(dirW, NULL, &pidl1, 0, NULL); - ok(hr == S_OK, "failed %08x\n", hr); + ok(hr == S_OK, "failed %08lx\n", hr); hr = IShellFolder_ParseDisplayName(desktop, NULL, NULL, dirW, NULL, &pidl2, NULL); - ok(hr == S_OK, "failed %08x\n", hr); + ok(hr == S_OK, "failed %08lx\n", hr);
ret = ILIsEqual(pidl1, pidl2); ok(ret == TRUE, "expected equal idls\n"); @@ -4257,14 +4257,14 @@ if (0) UINT len; *dirW = 0; len = GetSystemDirectoryW(dirW, MAX_PATH); - ok(len > 0, "GetSystemDirectoryW failed: %u\n", GetLastError()); + ok(len > 0, "GetSystemDirectoryW failed: %lu\n", GetLastError()); hr = SHParseDisplayName(dirW, NULL, &pidl1, 0, NULL); - ok(hr == S_OK, "failed %08x\n", hr); + ok(hr == S_OK, "failed %08lx\n", hr); *dirW = 0; len = GetSystemWow64DirectoryW(dirW, MAX_PATH); - ok(len > 0, "GetSystemWow64DirectoryW failed: %u\n", GetLastError()); + ok(len > 0, "GetSystemWow64DirectoryW failed: %lu\n", GetLastError()); hr = SHParseDisplayName(dirW, NULL, &pidl2, 0, NULL); - ok(hr == S_OK, "failed %08x\n", hr); + ok(hr == S_OK, "failed %08lx\n", hr); ret = ILIsEqual(pidl1, pidl2); ok(ret == FALSE, "expected different idls\n"); ILFree(pidl1); @@ -4283,10 +4283,10 @@ static void test_desktop_IPersist(void) HRESULT hr;
hr = SHGetDesktopFolder(&desktop); - ok(hr == S_OK, "failed %08x\n", hr); + ok(hr == S_OK, "failed %08lx\n", hr);
hr = IShellFolder_QueryInterface(desktop, &IID_IPersist, (void**)&persist); - ok(hr == S_OK, "failed %08x\n", hr); + ok(hr == S_OK, "failed %08lx\n", hr);
if (hr == S_OK) { @@ -4297,13 +4297,13 @@ static void test_desktop_IPersist(void) } memset(&clsid, 0, sizeof(clsid)); hr = IPersist_GetClassID(persist, &clsid); - ok(hr == S_OK, "failed %08x\n", hr); + ok(hr == S_OK, "failed %08lx\n", hr); ok(IsEqualIID(&CLSID_ShellDesktop, &clsid), "Expected CLSID_ShellDesktop\n"); IPersist_Release(persist); }
hr = IShellFolder_QueryInterface(desktop, &IID_IPersistFolder2, (void**)&ppf2); - ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* pre-Vista */, "failed %08x\n", hr); + ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* pre-Vista */, "failed %08lx\n", hr); if(SUCCEEDED(hr)) { IPersistFolder *ppf; @@ -4315,12 +4315,12 @@ static void test_desktop_IPersist(void)
todo_wine { hr = IPersistFolder2_Initialize(ppf2, NULL); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); }
pidl = NULL; hr = IPersistFolder2_GetCurFolder(ppf2, &pidl); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(pidl != NULL, "pidl was NULL.\n"); if(SUCCEEDED(hr)) ILFree(pidl);
@@ -4337,13 +4337,13 @@ static void test_contextmenu_qi(IContextMenu *menu, BOOL todo)
hr = IContextMenu_QueryInterface(menu, &IID_IShellExtInit, (void **)&unk); todo_wine_if(todo) - ok(hr == S_OK, "Failed to get IShellExtInit, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get IShellExtInit, hr %#lx.\n", hr); if (hr == S_OK) IUnknown_Release(unk);
hr = IContextMenu_QueryInterface(menu, &IID_IObjectWithSite, (void **)&unk); todo_wine_if(todo) - ok(hr == S_OK, "Failed to get IShellExtInit, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get IShellExtInit, hr %#lx.\n", hr); if (hr == S_OK) IUnknown_Release(unk); } @@ -4357,7 +4357,7 @@ static void test_contextmenu(IContextMenu *menu, BOOL background) test_contextmenu_qi(menu, FALSE);
hr = IContextMenu_QueryContextMenu(menu, hmenu, 0, 64, 32767, CMF_NORMAL); - ok(SUCCEEDED(hr), "Failed to query the menu, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to query the menu, hr %#lx.\n", hr);
max_id = HRESULT_CODE(hr) - 1; /* returns max_id + 1 */ ok(max_id <= 32767, "Got %d\n", max_id); @@ -4376,7 +4376,7 @@ static void test_contextmenu(IContextMenu *menu, BOOL background) mii.cch = sizeof(buf2);
res = GetMenuItemInfoA(hmenu, i, TRUE, &mii); - ok(res, "Failed to get menu item info, error %d.\n", GetLastError()); + ok(res, "Failed to get menu item info, error %ld.\n", GetLastError());
if (!(mii.fType & MFT_SEPARATOR)) { @@ -4384,7 +4384,7 @@ static void test_contextmenu(IContextMenu *menu, BOOL background) "Expected between 64 and %d, got %d.\n", 64 + max_id, mii.wID); hr = IContextMenu_GetCommandString(menu, mii.wID - 64, GCS_VERBA, 0, buf, sizeof(buf)); ok(hr == S_OK || hr == E_NOTIMPL || hr == E_INVALIDARG, - "Got unexpected hr %#x for ID %d, string %s.\n", hr, mii.wID, debugstr_a(mii.dwTypeData)); + "Got unexpected hr %#lx for ID %d, string %s.\n", hr, mii.wID, debugstr_a(mii.dwTypeData)); if (hr == S_OK) { trace("Got ID %d, verb %s, string %s.\n", mii.wID, debugstr_a(buf), debugstr_a(mii.dwTypeData)); @@ -4396,7 +4396,7 @@ static void test_contextmenu(IContextMenu *menu, BOOL background) cmi.cbSize = sizeof(CMINVOKECOMMANDINFO); cmi.lpVerb = "copy"; hr = IContextMenu_InvokeCommand(menu, &cmi); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(IsClipboardFormatAvailable(RegisterClipboardFormatA(CFSTR_SHELLIDLISTA)), "CFSTR_SHELLIDLISTA not available\n"); ok(IsClipboardFormatAvailable(CF_HDROP), "CF_HDROP not available\n"); } @@ -4406,7 +4406,7 @@ static void test_contextmenu(IContextMenu *menu, BOOL background) ok(mii.wID == 64 - 0x7000 + FCIDM_SHVIEW_PROPERTIES, "wrong menu wID %d\n", mii.wID); } else - trace("Got ID %d, hr %#x, string %s.\n", mii.wID, hr, debugstr_a(mii.dwTypeData)); + trace("Got ID %d, hr %#lx, string %s.\n", mii.wID, hr, debugstr_a(mii.dwTypeData)); } }
@@ -4421,14 +4421,14 @@ static void test_contextmenu(IContextMenu *menu, BOOL background) cmi.lpVerb = MAKEINTRESOURCEA(9999); hr = IContextMenu_InvokeCommand(menu, &cmi); todo_wine_if(background) - ok(hr == E_INVALIDARG, "Got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Got 0x%08lx\n", hr);
cmi.lpVerb = "foobar_wine_test"; hr = IContextMenu_InvokeCommand(menu, &cmi); todo_wine_if(background) ok((hr == E_INVALIDARG) || (hr == E_FAIL /* Win7 */) || (hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION) /* Vista */), - "Unexpected hr %#x.\n", hr); + "Unexpected hr %#lx.\n", hr); }
DestroyMenu(hmenu); @@ -4458,20 +4458,20 @@ static void test_GetUIObject(void) CreateFilesFolders();
hr = IShellFolder_ParseDisplayName(psf_desktop, NULL, NULL, path, NULL, &pidl, 0); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
hr = SHBindToParent(pidl, &IID_IShellFolder, (void **)&psf, &pidl_child); - ok(hr == S_OK, "Failed to bind to folder, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to bind to folder, hr %#lx.\n", hr);
/* Item menu */ hr = IShellFolder_GetUIObjectOf(psf, NULL, 1, &pidl_child, &IID_IContextMenu, NULL, (void **)&pcm); - ok(hr == S_OK, "GetUIObjectOf() failed, hr %#x.\n", hr); + ok(hr == S_OK, "GetUIObjectOf() failed, hr %#lx.\n", hr); test_contextmenu(pcm, FALSE); IContextMenu_Release(pcm);
/* Background menu */ hr = IShellFolder_GetUIObjectOf(psf_desktop, NULL, 0, NULL, &IID_IContextMenu, NULL, (void **)&pcm); - ok(hr == S_OK, "GetUIObjectOf() failed, hr %#x.\n", hr); + ok(hr == S_OK, "GetUIObjectOf() failed, hr %#lx.\n", hr); test_contextmenu(pcm, TRUE); IContextMenu_Release(pcm);
@@ -4508,36 +4508,36 @@ static void test_CreateViewObject_contextmenu(void) hr = CoCreateInstance(folders[i], NULL, CLSCTX_INPROC_SERVER, &IID_IShellFolder, (void**)&folder); if (hr != S_OK) { - win_skip("Failed to create folder %s, hr %#x.\n", wine_dbgstr_guid(folders[i]), hr); + win_skip("Failed to create folder %s, hr %#lx.\n", wine_dbgstr_guid(folders[i]), hr); continue; }
hr = IShellFolder_CreateViewObject(folder, NULL, &IID_IContextMenu, (void**)&cmenu); if (IsEqualIID(folders[i], &CLSID_MyDocuments)) - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); else if (IsEqualIID(folders[i], &CLSID_MyComputer)) - ok(hr == S_OK || broken(hr == E_NOINTERFACE /* win10 */), "got 0x%08x\n", hr); + ok(hr == S_OK || broken(hr == E_NOINTERFACE /* win10 */), "got 0x%08lx\n", hr); else - ok(hr == E_NOINTERFACE || broken(FAILED(hr)), "got 0x%08x for %s\n", hr, wine_dbgstr_guid(folders[i])); + ok(hr == E_NOINTERFACE || broken(FAILED(hr)), "got 0x%08lx for %s\n", hr, wine_dbgstr_guid(folders[i])); if (SUCCEEDED(hr)) IContextMenu_Release(cmenu); IShellFolder_Release(folder); }
hr = SHGetDesktopFolder(&desktop); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IShellFolder_CreateViewObject(desktop, NULL, &IID_IContextMenu, (void**)&cmenu); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if (SUCCEEDED(hr)) IContextMenu_Release(cmenu); ret = GetCurrentDirectoryW(MAX_PATH, path); - ok(ret, "got %d\n", GetLastError()); + ok(ret, "got %ld\n", GetLastError()); hr = IShellFolder_ParseDisplayName(desktop, NULL, NULL, path, NULL, &pidl, 0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IShellFolder_BindToObject(desktop, pidl, NULL, &IID_IShellFolder, (void**)&folder); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IShellFolder_CreateViewObject(folder, NULL, &IID_IContextMenu, (void**)&cmenu); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if (SUCCEEDED(hr)) IContextMenu_Release(cmenu); IShellFolder_Release(folder); @@ -4560,12 +4560,12 @@ static void r_verify_pidl(unsigned l, LPCITEMIDLIST pidl, const WCHAR *path) }
hr = SHBindToParent(pidl, &IID_IShellFolder, (void **)&parent, &child); - ok_(__FILE__,l)(hr == S_OK, "SHBindToParent failed: 0x%08x\n", hr); + ok_(__FILE__,l)(hr == S_OK, "SHBindToParent failed: 0x%08lx\n", hr); if(FAILED(hr)) return;
hr = IShellFolder_GetDisplayNameOf(parent, child, SHGDN_FORPARSING, &filename); - ok_(__FILE__,l)(hr == S_OK, "GetDisplayNameOf failed: 0x%08x\n", hr); + ok_(__FILE__,l)(hr == S_OK, "GetDisplayNameOf failed: 0x%08lx\n", hr); if(FAILED(hr)){ IShellFolder_Release(parent); return; @@ -4601,7 +4601,7 @@ static void test_SHSimpleIDListFromPath(void) LPITEMIDLIST pidl = NULL;
br = CreateDirectoryA(adirA, NULL); - ok(br == TRUE, "CreateDirectory failed: %d\n", GetLastError()); + ok(br == TRUE, "CreateDirectory failed: %ld\n", GetLastError());
if(is_unicode) pidl = SHSimpleIDListFromPath(adirW); @@ -4611,7 +4611,7 @@ static void test_SHSimpleIDListFromPath(void) ILFree(pidl);
br = RemoveDirectoryA(adirA); - ok(br == TRUE, "RemoveDirectory failed: %d\n", GetLastError()); + ok(br == TRUE, "RemoveDirectory failed: %ld\n", GetLastError());
if(is_unicode) pidl = SHSimpleIDListFromPath(adirW); @@ -4721,7 +4721,7 @@ static void test_ParseDisplayNamePBC(void) }
hres = SHGetDesktopFolder(&psf); - ok(hres == S_OK, "SHGetDesktopFolder failed: 0x%08x\n", hres); + ok(hres == S_OK, "SHGetDesktopFolder failed: 0x%08lx\n", hres); if(FAILED(hres)){ win_skip("Failed to get IShellFolder, can't run tests\n"); return; @@ -4729,46 +4729,46 @@ static void test_ParseDisplayNamePBC(void)
/* fails on unknown dir with no IBindCtx */ hres = IShellFolder_ParseDisplayName(psf, NULL, NULL, adirW, NULL, &pidl, NULL); - ok(hres == exp_err, "ParseDisplayName failed with wrong error: 0x%08x\n", hres); + ok(hres == exp_err, "ParseDisplayName failed with wrong error: 0x%08lx\n", hres); hres = IShellFolder_ParseDisplayName(psf, NULL, NULL, afileW, NULL, &pidl, NULL); - ok(hres == exp_err, "ParseDisplayName failed with wrong error: 0x%08x\n", hres); + ok(hres == exp_err, "ParseDisplayName failed with wrong error: 0x%08lx\n", hres); hres = IShellFolder_ParseDisplayName(psf, NULL, NULL, afile2W, NULL, &pidl, NULL); - ok(hres == exp_err, "ParseDisplayName failed with wrong error: 0x%08x\n", hres); + ok(hres == exp_err, "ParseDisplayName failed with wrong error: 0x%08lx\n", hres);
/* fails on unknown dir with IBindCtx with no IFileSystemBindData */ hres = CreateBindCtx(0, &pbc); - ok(hres == S_OK, "CreateBindCtx failed: 0x%08x\n", hres); + ok(hres == S_OK, "CreateBindCtx failed: 0x%08lx\n", hres);
hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, adirW, NULL, &pidl, NULL); - ok(hres == exp_err, "ParseDisplayName failed with wrong error: 0x%08x\n", hres); + ok(hres == exp_err, "ParseDisplayName failed with wrong error: 0x%08lx\n", hres); hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, afileW, NULL, &pidl, NULL); - ok(hres == exp_err, "ParseDisplayName failed with wrong error: 0x%08x\n", hres); + ok(hres == exp_err, "ParseDisplayName failed with wrong error: 0x%08lx\n", hres); hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, afile2W, NULL, &pidl, NULL); - ok(hres == exp_err, "ParseDisplayName failed with wrong error: 0x%08x\n", hres); + ok(hres == exp_err, "ParseDisplayName failed with wrong error: 0x%08lx\n", hres);
/* unknown dir with IBindCtx with IFileSystemBindData */ hres = IBindCtx_RegisterObjectParam(pbc, wFileSystemBindData, (IUnknown*)&fsbd); - ok(hres == S_OK, "RegisterObjectParam failed: 0x%08x\n", hres); + ok(hres == S_OK, "RegisterObjectParam failed: 0x%08lx\n", hres);
/* return E_FAIL from GetFindData */ pidl = (ITEMIDLIST*)0xdeadbeef; fsbdVtbl.GetFindData = fsbd_GetFindData_fail; hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, adirW, NULL, &pidl, NULL); - ok(hres == S_OK, "ParseDisplayName failed: 0x%08x\n", hres); + ok(hres == S_OK, "ParseDisplayName failed: 0x%08lx\n", hres); if(SUCCEEDED(hres)){ verify_pidl(pidl, adirW); ILFree(pidl); }
hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, afileW, NULL, &pidl, NULL); - ok(hres == S_OK, "ParseDisplayName failed: 0x%08x\n", hres); + ok(hres == S_OK, "ParseDisplayName failed: 0x%08lx\n", hres); if(SUCCEEDED(hres)){ verify_pidl(pidl, afileW); ILFree(pidl); }
hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, afile2W, NULL, &pidl, NULL); - ok(hres == S_OK, "ParseDisplayName failed: 0x%08x\n", hres); + ok(hres == S_OK, "ParseDisplayName failed: 0x%08lx\n", hres); if(SUCCEEDED(hres)){ verify_pidl(pidl, afile2W); ILFree(pidl); @@ -4778,21 +4778,21 @@ static void test_ParseDisplayNamePBC(void) pidl = (ITEMIDLIST*)0xdeadbeef; fsbdVtbl.GetFindData = fsbd_GetFindData_nul; hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, adirW, NULL, &pidl, NULL); - ok(hres == S_OK, "ParseDisplayName failed: 0x%08x\n", hres); + ok(hres == S_OK, "ParseDisplayName failed: 0x%08lx\n", hres); if(SUCCEEDED(hres)){ verify_pidl(pidl, adirW); ILFree(pidl); }
hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, afileW, NULL, &pidl, NULL); - ok(hres == S_OK, "ParseDisplayName failed: 0x%08x\n", hres); + ok(hres == S_OK, "ParseDisplayName failed: 0x%08lx\n", hres); if(SUCCEEDED(hres)){ verify_pidl(pidl, afileW); ILFree(pidl); }
hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, afile2W, NULL, &pidl, NULL); - ok(hres == S_OK, "ParseDisplayName failed: 0x%08x\n", hres); + ok(hres == S_OK, "ParseDisplayName failed: 0x%08lx\n", hres); if(SUCCEEDED(hres)){ verify_pidl(pidl, afile2W); ILFree(pidl); @@ -4802,21 +4802,21 @@ static void test_ParseDisplayNamePBC(void) pidl = (ITEMIDLIST*)0xdeadbeef; fsbdVtbl.GetFindData = fsbd_GetFindData_junk; hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, adirW, NULL, &pidl, NULL); - ok(hres == S_OK, "ParseDisplayName failed: 0x%08x\n", hres); + ok(hres == S_OK, "ParseDisplayName failed: 0x%08lx\n", hres); if(SUCCEEDED(hres)){ verify_pidl(pidl, adirW); ILFree(pidl); }
hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, afileW, NULL, &pidl, NULL); - ok(hres == S_OK, "ParseDisplayName failed: 0x%08x\n", hres); + ok(hres == S_OK, "ParseDisplayName failed: 0x%08lx\n", hres); if(SUCCEEDED(hres)){ verify_pidl(pidl, afileW); ILFree(pidl); }
hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, afile2W, NULL, &pidl, NULL); - ok(hres == S_OK, "ParseDisplayName failed: 0x%08x\n", hres); + ok(hres == S_OK, "ParseDisplayName failed: 0x%08lx\n", hres); if(SUCCEEDED(hres)){ verify_pidl(pidl, afile2W); ILFree(pidl); @@ -4826,21 +4826,21 @@ static void test_ParseDisplayNamePBC(void) pidl = (ITEMIDLIST*)0xdeadbeef; fsbdVtbl.GetFindData = fsbd_GetFindData_invalid; hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, adirW, NULL, &pidl, NULL); - ok(hres == S_OK, "ParseDisplayName failed: 0x%08x\n", hres); + ok(hres == S_OK, "ParseDisplayName failed: 0x%08lx\n", hres); if(SUCCEEDED(hres)){ verify_pidl(pidl, adirW); ILFree(pidl); }
hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, afileW, NULL, &pidl, NULL); - ok(hres == S_OK, "ParseDisplayName failed: 0x%08x\n", hres); + ok(hres == S_OK, "ParseDisplayName failed: 0x%08lx\n", hres); if(SUCCEEDED(hres)){ verify_pidl(pidl, afileW); ILFree(pidl); }
hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, afile2W, NULL, &pidl, NULL); - ok(hres == S_OK, "ParseDisplayName failed: 0x%08x\n", hres); + ok(hres == S_OK, "ParseDisplayName failed: 0x%08lx\n", hres); if(SUCCEEDED(hres)){ verify_pidl(pidl, afile2W); ILFree(pidl); @@ -4850,21 +4850,21 @@ static void test_ParseDisplayNamePBC(void) pidl = (ITEMIDLIST*)0xdeadbeef; fsbdVtbl.GetFindData = fsbd_GetFindData_valid; hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, adirW, NULL, &pidl, NULL); - ok(hres == S_OK, "ParseDisplayName failed: 0x%08x\n", hres); + ok(hres == S_OK, "ParseDisplayName failed: 0x%08lx\n", hres); if(SUCCEEDED(hres)){ verify_pidl(pidl, adirW); ILFree(pidl); }
hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, afileW, NULL, &pidl, NULL); - ok(hres == S_OK, "ParseDisplayName failed: 0x%08x\n", hres); + ok(hres == S_OK, "ParseDisplayName failed: 0x%08lx\n", hres); if(SUCCEEDED(hres)){ verify_pidl(pidl, afileW); ILFree(pidl); }
hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, afile2W, NULL, &pidl, NULL); - ok(hres == S_OK, "ParseDisplayName failed: 0x%08x\n", hres); + ok(hres == S_OK, "ParseDisplayName failed: 0x%08lx\n", hres); if(SUCCEEDED(hres)){ verify_pidl(pidl, afile2W); ILFree(pidl); @@ -4910,7 +4910,7 @@ static LRESULT CALLBACK testwindow_wndproc(HWND hwnd, UINT msg, WPARAM wparam, L }
ok(exp_data->signal == signal, - "%s: expected notification type %x, got: %x\n", + "%s: expected notification type %x, got: %lx\n", exp_data->id, exp_data->signal, signal);
trace("verifying pidls for: %s\n", exp_data->id); @@ -4926,7 +4926,7 @@ static LRESULT CALLBACK testwindow_wndproc(HWND hwnd, UINT msg, WPARAM wparam, L if(test_new_delivery_flag) SHChangeNotification_Unlock(hLock); }else - ok(0, "Didn't expect a WM_USER_NOTIFY message (event: %x)\n", signal); + ok(0, "Didn't expect a WM_USER_NOTIFY message (event: %lx)\n", signal); return 0; } return DefWindowProcA(hwnd, msg, wparam, lparam); @@ -4946,7 +4946,7 @@ static void register_testwindow_class(void)
SetLastError(0); ret = RegisterClassExA(&cls); - ok(ret != 0, "RegisterClassExA failed: %d\n", GetLastError()); + ok(ret != 0, "RegisterClassExA failed: %ld\n", GetLastError()); }
/* SHCNF_FLUSH doesn't seem to work as advertised for SHCNF_PATHA, so we @@ -4991,14 +4991,14 @@ static void test_SHChangeNotify(BOOL test_new_delivery) ok(wnd != NULL, "Failed to make a window\n");
br = CreateDirectoryA(root_dirA, NULL); - ok(br == TRUE, "CreateDirectory failed: %d\n", GetLastError()); + ok(br == TRUE, "CreateDirectory failed: %ld\n", GetLastError());
entries[0].pidl = NULL; if(has_unicode) hr = SHILCreateFromPath(root_dirW, (LPITEMIDLIST*)&entries[0].pidl, 0); else hr = SHILCreateFromPath((const void *)root_dirA, (LPITEMIDLIST*)&entries[0].pidl, 0); - ok(hr == S_OK, "SHILCreateFromPath failed: 0x%08x\n", hr); + ok(hr == S_OK, "SHILCreateFromPath failed: 0x%08lx\n", hr); entries[0].fRecursive = TRUE;
notifyID = SHChangeNotifyRegister(wnd, !test_new_delivery ? SHCNRF_ShellLevel : SHCNRF_ShellLevel|SHCNRF_NewDelivery, @@ -5037,7 +5037,7 @@ static void test_SHChangeNotify(BOOL test_new_delivery)
ILFree((LPITEMIDLIST)entries[0].pidl); br = RemoveDirectoryA(root_dirA); - ok(br == TRUE, "RemoveDirectory failed: %d\n", GetLastError()); + ok(br == TRUE, "RemoveDirectory failed: %ld\n", GetLastError()); }
static void test_SHCreateDefaultContextMenu(void) @@ -5072,11 +5072,11 @@ static void test_SHCreateDefaultContextMenu(void) CreateFilesFolders();
hr = IShellFolder_ParseDisplayName(desktop, NULL, NULL, path, NULL, &pidl, 0); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { hr = SHBindToParent(pidl, &IID_IShellFolder, (void **)&folder, (const ITEMIDLIST **)&pidl_child); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr);
IShellFolder_QueryInterface(folder,&IID_IPersistFolder2,(void**)&persist); IPersistFolder2_GetCurFolder(persist,&pidlFolder); @@ -5094,13 +5094,13 @@ static void test_SHCreateDefaultContextMenu(void) cminfo.punkAssociationInfo=NULL;
hr = pSHCreateDefaultContextMenu(&cminfo,&IID_IContextMenu,(void**)&cmenu); - ok(hr==S_OK,"Got 0x%08x\n", hr); + ok(hr==S_OK,"Got 0x%08lx\n", hr); test_contextmenu_qi(cmenu, TRUE); IContextMenu_Release(cmenu);
cminfo.pidlFolder=pidlFolder; hr = pSHCreateDefaultContextMenu(&cminfo,&IID_IContextMenu,(void**)&cmenu); - ok(hr==S_OK,"Got 0x%08x\n", hr); + ok(hr==S_OK,"Got 0x%08lx\n", hr); test_contextmenu_qi(cmenu, TRUE); IContextMenu_Release(cmenu);
@@ -5112,7 +5112,7 @@ static void test_SHCreateDefaultContextMenu(void) cminfo.cKeys=16; hr = pSHCreateDefaultContextMenu(&cminfo,&IID_IContextMenu,(void**)&cmenu); RegCloseKey(keys[0]); - ok(hr==S_OK,"Got 0x%08x\n", hr); + ok(hr==S_OK,"Got 0x%08lx\n", hr); IContextMenu_Release(cmenu); } } @@ -5139,7 +5139,7 @@ static void test_DataObject(void)
hres = IShellFolder_EnumObjects(desktop, NULL, SHCONTF_NONFOLDERS|SHCONTF_FOLDERS|SHCONTF_INCLUDEHIDDEN, &peidl); - ok(hres == S_OK, "got %x\n", hres); + ok(hres == S_OK, "got %lx\n", hres);
if(IEnumIDList_Next(peidl, 1, &apidl, NULL) != S_OK) { skip("no files on desktop - skipping GetDataObject tests\n"); @@ -5151,7 +5151,7 @@ static void test_DataObject(void)
hres = IShellFolder_GetUIObjectOf(desktop, NULL, 1, (LPCITEMIDLIST*)&apidl, &IID_IDataObject, NULL, (void**)&data_obj); - ok(hres == S_OK, "got %x\n", hres); + ok(hres == S_OK, "got %lx\n", hres); ILFree(apidl); IShellFolder_Release(desktop);
@@ -5162,20 +5162,20 @@ static void test_DataObject(void) fmt.lindex = -1; fmt.tymed = TYMED_HGLOBAL; hres = IDataObject_QueryGetData(data_obj, &fmt); - ok(hres == S_OK, "got %x\n", hres); + ok(hres == S_OK, "got %lx\n", hres);
fmt.tymed = TYMED_HGLOBAL | TYMED_ISTREAM; hres = IDataObject_QueryGetData(data_obj, &fmt); - ok(hres == S_OK, "got %x\n", hres); + ok(hres == S_OK, "got %lx\n", hres);
fmt.tymed = TYMED_ISTREAM; hres = IDataObject_QueryGetData(data_obj, &fmt); - todo_wine ok(hres == S_FALSE, "got %x\n", hres); + todo_wine ok(hres == S_FALSE, "got %lx\n", hres);
fmt.tymed = TYMED_HGLOBAL | TYMED_ISTREAM; hres = IDataObject_GetData(data_obj, &fmt, &medium); - ok(hres == S_OK, "got %x\n", hres); - ok(medium.tymed == TYMED_HGLOBAL, "medium.tymed = %x\n", medium.tymed); + ok(hres == S_OK, "got %lx\n", hres); + ok(medium.tymed == TYMED_HGLOBAL, "medium.tymed = %lx\n", medium.tymed); ReleaseStgMedium(&medium);
IDataObject_Release(data_obj); @@ -5206,26 +5206,26 @@ static void test_GetDefaultColumn(void) hr = CoCreateInstance(folders[i], NULL, CLSCTX_INPROC_SERVER, &IID_IShellFolder2, (void **)&folder); if (hr != S_OK) { - win_skip("Failed to create folder %s, hr %#x.\n", wine_dbgstr_guid(folders[i]), hr); + win_skip("Failed to create folder %s, hr %#lx.\n", wine_dbgstr_guid(folders[i]), hr); continue; }
hr = IShellFolder2_GetDefaultColumn(folder, 0, NULL, NULL); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
sort = display = 123; hr = IShellFolder2_GetDefaultColumn(folder, 0, &sort, &display); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr); ok(sort == 123 && display == 123, "Unexpected default column.\n");
display = 123; hr = IShellFolder2_GetDefaultColumn(folder, 0, NULL, &display); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr); ok(display == 123, "Unexpected default column.\n");
sort = 123; hr = IShellFolder2_GetDefaultColumn(folder, 0, &sort, NULL); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr); ok(sort == 123, "Unexpected default column.\n");
IShellFolder2_Release(folder); @@ -5259,7 +5259,7 @@ static void test_GetDefaultSearchGUID(void) hr = CoCreateInstance(folders[i], NULL, CLSCTX_INPROC_SERVER, &IID_IShellFolder2, (void **)&folder); if (hr != S_OK) { - win_skip("Failed to create folder %s, hr %#x.\n", wine_dbgstr_guid(folders[i]), hr); + win_skip("Failed to create folder %s, hr %#lx.\n", wine_dbgstr_guid(folders[i]), hr); continue; }
@@ -5267,12 +5267,12 @@ static void test_GetDefaultSearchGUID(void) { /* crashes on XP */ hr = IShellFolder2_GetDefaultSearchGUID(folder, NULL); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr); }
memcpy(&guid, &CLSID_MyComputer, sizeof(guid)); hr = IShellFolder2_GetDefaultSearchGUID(folder, &guid); - ok(hr == E_NOTIMPL || broken(hr == S_OK) /* Method was last supported on XP */, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL || broken(hr == S_OK) /* Method was last supported on XP */, "Unexpected hr %#lx.\n", hr); if (hr == E_NOTIMPL) ok(IsEqualGUID(&guid, &CLSID_MyComputer), "Unexpected guid %s.\n", wine_dbgstr_guid(&guid));
@@ -5289,22 +5289,22 @@ static void test_SHLimitInputEdit(void) HWND hwnd;
hr = SHGetDesktopFolder(&desktop); - ok(hr == S_OK, "Failed to get desktop folder, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get desktop folder, hr %#lx.\n", hr);
hr = SHLimitInputEdit(NULL, desktop); todo_wine - ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr); + ok(hr == E_FAIL, "Unexpected hr %#lx.\n", hr);
hwnd = CreateWindowA("EDIT", NULL, WS_VISIBLE, 0, 0, 100, 30, NULL, NULL, NULL, NULL); ok(hwnd != NULL, "Failed to create Edit control.\n");
hr = SHLimitInputEdit(hwnd, desktop); todo_wine - ok(hr == S_OK, "Failed to set input limits, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set input limits, hr %#lx.\n", hr);
hr = SHLimitInputEdit(hwnd, desktop); todo_wine - ok(hr == S_OK, "Failed to set input limits, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set input limits, hr %#lx.\n", hr);
DestroyWindow(hwnd); IShellFolder_Release(desktop); @@ -5340,7 +5340,7 @@ static void test_SHGetSetFolderCustomSettings(void) fcs.pszIconFile = iconpathW;
hr = pSHGetSetFolderCustomSettings(&fcs, pathW, FCS_FORCEWRITE); /*creates and writes to a Desktop.ini*/ - ok(hr == S_OK, "Expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr);
memset(&fcs, 0, sizeof(fcs)); fcs.dwSize = sizeof(fcs); @@ -5350,11 +5350,11 @@ static void test_SHGetSetFolderCustomSettings(void) bufferW[0] = 0;
hr = pSHGetSetFolderCustomSettings(&fcs, pathW, FCS_READ); - todo_wine ok(hr == S_OK, "Expected S_OK, got %#x\n", hr); + todo_wine ok(hr == S_OK, "Expected S_OK, got %#lx\n", hr); todo_wine ok(!lstrcmpiW(iconpathW, fcs.pszIconFile), "Expected %s, got %s\n", wine_dbgstr_w(iconpathW), wine_dbgstr_w(fcs.pszIconFile));
hr = pSHGetSetFolderCustomSettings(&fcs, NULL, FCS_READ); - ok(FAILED(hr), "Unexpected hr %#x.\n", hr); + ok(FAILED(hr), "Unexpected hr %#lx.\n", hr);
lstrcpyW(bufferW, pathW); lstrcatW(bufferW, desktop_iniW); diff --git a/dlls/shell32/tests/shlview.c b/dlls/shell32/tests/shlview.c index 48ba72a4c0e..b405a84bc19 100644 --- a/dlls/shell32/tests/shlview.c +++ b/dlls/shell32/tests/shlview.c @@ -633,13 +633,13 @@ static void test_CreateViewWindow(void) IUnknown *unk;
hr = SHGetDesktopFolder(&desktop); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
hr = IShellFolder_CreateViewObject(desktop, NULL, &IID_IShellView, (void**)&view); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
hr = IShellView_QueryInterface(view, &IID_CDefView, (void **)&unk); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); ok(unk == (IUnknown *)view, "got %p\n", unk); IUnknown_Release(unk);
@@ -653,51 +653,51 @@ if (0) settings.fFlags = 0; hwnd_view = (HWND)0xdeadbeef; hr = IShellView_CreateViewWindow(view, NULL, &settings, NULL, NULL, &hwnd_view); - ok(hr == E_UNEXPECTED, "got (0x%08x)\n", hr); + ok(hr == E_UNEXPECTED, "got (0x%08lx)\n", hr); ok(hwnd_view == 0, "got %p\n", hwnd_view);
hwnd_view = (HWND)0xdeadbeef; hr = IShellView_CreateViewWindow(view, NULL, &settings, NULL, &r, &hwnd_view); - ok(hr == E_UNEXPECTED, "got (0x%08x)\n", hr); + ok(hr == E_UNEXPECTED, "got (0x%08lx)\n", hr); ok(hwnd_view == 0, "got %p\n", hwnd_view);
hwnd_view = NULL; hr = IShellView_CreateViewWindow(view, NULL, &settings, &test_shellbrowser, &r, &hwnd_view); - ok(hr == S_OK || broken(hr == S_FALSE), "got (0x%08x)\n", hr); + ok(hr == S_OK || broken(hr == S_FALSE), "got (0x%08lx)\n", hr); ok(hwnd_view != 0, "got %p\n", hwnd_view);
hwnd2 = (HWND)0xdeadbeef; hr = IShellView_CreateViewWindow(view, NULL, &settings, &test_shellbrowser, &r, &hwnd2); - ok(hr == E_UNEXPECTED, "got (0x%08x)\n", hr); + ok(hr == E_UNEXPECTED, "got (0x%08lx)\n", hr); ok(hwnd2 == NULL, "got %p\n", hwnd2);
/* ::DragLeave without drag operation */ hr = IShellView_QueryInterface(view, &IID_IDropTarget, (void**)&dt); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); hr = IDropTarget_DragLeave(dt); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); IDropTarget_Release(dt);
IShellView_AddRef(view); ref1 = IShellView_Release(view); hr = IShellView_DestroyViewWindow(view); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); ok(!IsWindow(hwnd_view), "hwnd %p still valid\n", hwnd_view); ref2 = IShellView_Release(view); - ok(ref1 > ref2, "expected %u > %u\n", ref1, ref2); + ok(ref1 > ref2, "expected %lu > %lu\n", ref1, ref2); ref1 = ref2;
/* Show that releasing the shell view does not destroy the window */ hr = IShellFolder_CreateViewObject(desktop, NULL, &IID_IShellView, (void**)&view); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); hwnd_view = NULL; hr = IShellView_CreateViewWindow(view, NULL, &settings, &test_shellbrowser, &r, &hwnd_view); - ok(hr == S_OK || broken(hr == S_FALSE), "got (0x%08x)\n", hr); + ok(hr == S_OK || broken(hr == S_FALSE), "got (0x%08lx)\n", hr); ok(hwnd_view != NULL, "got %p\n", hwnd_view); ok(IsWindow(hwnd_view), "hwnd %p still valid\n", hwnd_view); ref2 = IShellView_Release(view); - ok(ref2 != 0, "ref2 = %u\n", ref2); - ok(ref2 > ref1, "expected %u > %u\n", ref2, ref1); + ok(ref2 != 0, "ref2 = %lu\n", ref2); + ok(ref2 > ref1, "expected %lu > %lu\n", ref2, ref1); ok(IsWindow(hwnd_view), "hwnd %p still valid\n", hwnd_view); DestroyWindow(hwnd_view);
@@ -721,10 +721,10 @@ static void test_IFolderView(void) RECT r;
hr = SHGetDesktopFolder(&desktop); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
hr = IShellFolder_CreateViewObject(desktop, NULL, &IID_IShellView, (void**)&view); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
hr = IShellView_QueryInterface(view, &IID_IFolderView, (void**)&fv); if (hr != S_OK) @@ -737,11 +737,11 @@ static void test_IFolderView(void)
/* call methods before window creation */ hr = IFolderView_GetSpacing(fv, NULL); - ok(hr == S_FALSE || broken(hr == S_OK) /* win7 */, "got (0x%08x)\n", hr); + ok(hr == S_FALSE || broken(hr == S_OK) /* win7 */, "got (0x%08lx)\n", hr);
pidl = (void*)0xdeadbeef; hr = IFolderView_Item(fv, 0, &pidl); - ok(hr == E_INVALIDARG || broken(hr == E_FAIL) /* < Vista */, "got (0x%08x)\n", hr); + ok(hr == E_INVALIDARG || broken(hr == E_FAIL) /* < Vista */, "got (0x%08lx)\n", hr); ok(pidl == 0 || broken(pidl == (void*)0xdeadbeef) /* < Vista */, "got %p\n", pidl);
if (0) @@ -764,7 +764,7 @@ if (0) hwnd_view = (HWND)0xdeadbeef; SetRect(&r, 0, 0, 100, 100); hr = IShellView_CreateViewWindow(view, NULL, &settings, browser, &r, &hwnd_view); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); ok(IsWindow(hwnd_view), "got %p\n", hwnd_view);
hwnd_list = subclass_listview(hwnd_view); @@ -781,18 +781,18 @@ if (0) /* IFolderView::GetSpacing */ flush_sequences(sequences, NUM_MSG_SEQUENCES); hr = IFolderView_GetSpacing(fv, NULL); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); ok_sequence(sequences, LISTVIEW_SEQ_INDEX, empty_seq, "IFolderView::GetSpacing, empty", FALSE);
flush_sequences(sequences, NUM_MSG_SEQUENCES); hr = IFolderView_GetSpacing(fv, &pt); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); /* fails with empty sequence on win7 for unknown reason */ if (sequences[LISTVIEW_SEQ_INDEX]->count) { ok_sequence(sequences, LISTVIEW_SEQ_INDEX, folderview_getspacing_seq, "IFolderView::GetSpacing", FALSE); - ok(pt.x > 0, "got %d\n", pt.x); - ok(pt.y > 0, "got %d\n", pt.y); + ok(pt.x > 0, "got %ld\n", pt.x); + ok(pt.y > 0, "got %ld\n", pt.y); ret = SendMessageA(hwnd_list, LVM_GETITEMSPACING, 0, 0); ok(pt.x == LOWORD(ret) && pt.y == HIWORD(ret), "got (%d, %d)\n", LOWORD(ret), HIWORD(ret)); } @@ -817,9 +817,9 @@ if (0) flush_sequences(sequences, NUM_MSG_SEQUENCES); hr = IFolderView_GetSelectionMarkedItem(fv, &ret); if (count) - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); else - ok(hr == S_FALSE, "got (0x%08x)\n", hr); + ok(hr == S_FALSE, "got (0x%08lx)\n", hr); ok_sequence(sequences, LISTVIEW_SEQ_INDEX, folderview_getselectionmarked_seq, "IFolderView::GetSelectionMarkedItem", FALSE);
@@ -827,9 +827,9 @@ if (0) flush_sequences(sequences, NUM_MSG_SEQUENCES); hr = IFolderView_GetFocusedItem(fv, &ret); if (count) - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); else - ok(hr == S_FALSE, "got (0x%08x)\n", hr); + ok(hr == S_FALSE, "got (0x%08lx)\n", hr); ok_sequence(sequences, LISTVIEW_SEQ_INDEX, folderview_getfocused_seq, "IFolderView::GetFocusedItem", FALSE);
@@ -842,15 +842,15 @@ if (0) }
hr = IFolderView_GetFolder(fv, &IID_IShellFolder, NULL); - ok(hr == E_POINTER, "got (0x%08x)\n", hr); + ok(hr == E_POINTER, "got (0x%08lx)\n", hr);
hr = IFolderView_GetFolder(fv, &IID_IShellFolder, (void**)&folder); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); ok(desktop == folder, "\n"); if (folder) IShellFolder_Release(folder);
hr = IFolderView_GetFolder(fv, &IID_IUnknown, (void**)&unk); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); if (unk) IUnknown_Release(unk);
hr = IFolderView_QueryInterface(fv, &IID_IFolderView2, (void**)&fv2); @@ -859,7 +859,7 @@ if (0) if (fv2) IFolderView2_Release(fv2);
hr = IShellView_DestroyViewWindow(view); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); ok(!IsWindow(hwnd_view), "hwnd %p still valid\n", hwnd_view);
IShellBrowser_Release(browser); @@ -876,30 +876,30 @@ static void test_GetItemObject(void) HRESULT hr;
hr = SHGetDesktopFolder(&desktop); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
hr = IShellFolder_CreateViewObject(desktop, NULL, &IID_IShellView, (void**)&view); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
/* from documentation three interfaces are supported for SVGIO_BACKGROUND: IContextMenu, IDispatch, IPersistHistory */ hr = IShellView_GetItemObject(view, SVGIO_BACKGROUND, &IID_IContextMenu, (void**)&unk); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); IUnknown_Release(unk);
unk = NULL; hr = IShellView_GetItemObject(view, SVGIO_BACKGROUND, &IID_IDispatch, (void**)&unk); - ok(hr == S_OK || broken(hr == E_NOTIMPL) /* NT4 */, "got (0x%08x)\n", hr); + ok(hr == S_OK || broken(hr == E_NOTIMPL) /* NT4 */, "got (0x%08lx)\n", hr); if (unk) IUnknown_Release(unk);
unk = NULL; hr = IShellView_GetItemObject(view, SVGIO_BACKGROUND, &IID_IPersistHistory, (void**)&unk); - todo_wine ok(hr == S_OK || broken(hr == E_NOTIMPL) /* W9x, NT4 */, "got (0x%08x)\n", hr); + todo_wine ok(hr == S_OK || broken(hr == E_NOTIMPL) /* W9x, NT4 */, "got (0x%08lx)\n", hr); if (unk) IUnknown_Release(unk);
/* example of unsupported interface, base for IPersistHistory */ hr = IShellView_GetItemObject(view, SVGIO_BACKGROUND, &IID_IPersist, (void**)&unk); - ok(hr == E_NOINTERFACE || broken(hr == E_NOTIMPL) /* W2K */, "got (0x%08x)\n", hr); + ok(hr == E_NOINTERFACE || broken(hr == E_NOTIMPL) /* W2K */, "got (0x%08lx)\n", hr);
IShellView_Release(view); IShellFolder_Release(desktop); @@ -915,10 +915,10 @@ static void test_IShellFolderView(void) HRESULT hr;
hr = SHGetDesktopFolder(&desktop); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
hr = IShellFolder_CreateViewObject(desktop, NULL, &IID_IShellView, (void**)&view); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
hr = IShellView_QueryInterface(view, &IID_IShellFolderView, (void**)&folderview); if (hr != S_OK) @@ -932,25 +932,25 @@ static void test_IShellFolderView(void) /* ::MoveIcons */ obj = IDataObjectImpl_Construct(); hr = IShellFolderView_MoveIcons(folderview, obj); - ok(hr == E_NOTIMPL || broken(hr == S_OK) /* W98 */, "got (0x%08x)\n", hr); + ok(hr == E_NOTIMPL || broken(hr == S_OK) /* W98 */, "got (0x%08lx)\n", hr); IDataObject_Release(obj);
/* ::SetRedraw without list created */ hr = IShellFolderView_SetRedraw(folderview, TRUE); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
/* ::QuerySupport */ hr = IShellFolderView_QuerySupport(folderview, NULL); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); i = 0xdeadbeef; hr = IShellFolderView_QuerySupport(folderview, &i); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); ok(i == 0xdeadbeef, "got %d\n", i);
/* ::RemoveObject */ i = 0xdeadbeef; hr = IShellFolderView_RemoveObject(folderview, NULL, &i); - ok(hr == S_OK || hr == E_FAIL, "got (0x%08x)\n", hr); + ok(hr == S_OK || hr == E_FAIL, "got (0x%08lx)\n", hr); if (hr == S_OK) ok(i == 0 || broken(i == 0xdeadbeef) /* Vista, 2k8 */, "got %d\n", i);
@@ -968,19 +968,19 @@ static void test_IOleWindow(void) HRESULT hr;
hr = SHGetDesktopFolder(&desktop); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
hr = IShellFolder_CreateViewObject(desktop, NULL, &IID_IShellView, (void**)&view); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
hr = IShellView_QueryInterface(view, &IID_IOleWindow, (void**)&wnd); - ok(hr == E_NOINTERFACE, "got (0x%08x)\n", hr); + ok(hr == E_NOINTERFACE, "got (0x%08lx)\n", hr);
/* IShellView::ContextSensitiveHelp */ hr = IShellView_ContextSensitiveHelp(view, TRUE); - ok(hr == E_NOTIMPL, "got (0x%08x)\n", hr); + ok(hr == E_NOTIMPL, "got (0x%08lx)\n", hr); hr = IShellView_ContextSensitiveHelp(view, FALSE); - ok(hr == E_NOTIMPL, "got (0x%08x)\n", hr); + ok(hr == E_NOTIMPL, "got (0x%08lx)\n", hr);
IShellView_Release(view); IShellFolder_Release(desktop); @@ -1090,19 +1090,19 @@ static void test_GetSetCurrentViewMode(void) static const int win7_res[11] = {1, 1, 1, 3, 4, 1, 6, 1, 8, 8, 8};
hr = SHGetDesktopFolder(&desktop); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
hr = IShellFolder_CreateViewObject(desktop, NULL, &IID_IShellView, (void**)&sview); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
fs.ViewMode = 1; fs.fFlags = 0; browser = IShellBrowserImpl_Construct(); hr = IShellView_CreateViewWindow(sview, NULL, &fs, browser, &rc, &hwnd); - ok(hr == S_OK || broken(hr == S_FALSE /*Win2k*/ ), "got (0x%08x)\n", hr); + ok(hr == S_OK || broken(hr == S_FALSE /*Win2k*/ ), "got (0x%08lx)\n", hr);
hr = IShellView_QueryInterface(sview, &IID_IFolderView, (void**)&fview); - ok(hr == S_OK || broken(hr == E_NOINTERFACE), "got (0x%08x)\n", hr); + ok(hr == S_OK || broken(hr == E_NOINTERFACE), "got (0x%08lx)\n", hr); if(SUCCEEDED(hr)) { HWND hwnd_lv; @@ -1115,27 +1115,27 @@ static void test_GetSetCurrentViewMode(void) }
hr = IFolderView_GetCurrentViewMode(fview, &viewmode); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); ok(viewmode == 1, "ViewMode was %d\n", viewmode);
hr = IFolderView_SetCurrentViewMode(fview, FVM_AUTO); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
hr = IFolderView_SetCurrentViewMode(fview, 0); ok(hr == E_INVALIDARG || broken(hr == S_OK), - "got (0x%08x)\n", hr); + "got (0x%08lx)\n", hr);
hr = IFolderView_GetCurrentViewMode(fview, &viewmode); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
for(i = 1; i < 9; i++) { hr = IFolderView_SetCurrentViewMode(fview, i); ok(hr == S_OK || (i == 8 && hr == E_INVALIDARG /*Vista*/), - "(%d) got (0x%08x)\n", i, hr); + "(%d) got (0x%08lx)\n", i, hr);
hr = IFolderView_GetCurrentViewMode(fview, &viewmode); - ok(hr == S_OK, "(%d) got (0x%08x)\n", i, hr); + ok(hr == S_OK, "(%d) got (0x%08lx)\n", i, hr);
/* Wine currently behaves like winxp here. */ ok((viewmode == win7_res[i]) || (viewmode == vista_res[i]) || @@ -1145,7 +1145,7 @@ static void test_GetSetCurrentViewMode(void)
hr = IFolderView_SetCurrentViewMode(fview, 9); ok(hr == E_INVALIDARG || broken(hr == S_OK), - "got (0x%08x)\n", hr); + "got (0x%08lx)\n", hr);
/* Test messages */ hwnd_lv = subclass_listview(hwnd); @@ -1164,7 +1164,7 @@ static void test_GetSetCurrentViewMode(void)
flush_sequences(sequences, NUM_MSG_SEQUENCES); hr = IFolderView_SetCurrentViewMode(fview, 1); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* WM_SETREDRAW is not sent in versions before Vista. */ vista_plus = get_msg_count(sequences, LISTVIEW_SEQ_INDEX, WM_SETREDRAW); @@ -1175,7 +1175,7 @@ static void test_GetSetCurrentViewMode(void) "IFolderView::SetCurrentViewMode(1)", TRUE);
hr = IFolderView_SetCurrentViewMode(fview, 2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if(vista_plus) verify_msgs_in(sequences[LISTVIEW_SEQ_INDEX], vista_plus_msgs); else @@ -1183,7 +1183,7 @@ static void test_GetSetCurrentViewMode(void) "IFolderView::SetCurrentViewMode(2)", TRUE);
hr = IFolderView_SetCurrentViewMode(fview, 3); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if(vista_plus) verify_msgs_in(sequences[LISTVIEW_SEQ_INDEX], vista_plus_msgs); else @@ -1191,7 +1191,7 @@ static void test_GetSetCurrentViewMode(void) "IFolderView::SetCurrentViewMode(3)", TRUE);
hr = IFolderView_SetCurrentViewMode(fview, 4); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if(vista_plus) verify_msgs_in(sequences[LISTVIEW_SEQ_INDEX], vista_plus_msgs); else @@ -1199,7 +1199,7 @@ static void test_GetSetCurrentViewMode(void) "IFolderView::SetCurrentViewMode(4)", TRUE);
hr = IFolderView_SetCurrentViewMode(fview, 5); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); todo_wine { if(vista_plus) @@ -1217,7 +1217,7 @@ static void test_GetSetCurrentViewMode(void) }
hr = IFolderView_SetCurrentViewMode(fview, 6); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); todo_wine { if(vista_plus) @@ -1235,7 +1235,7 @@ static void test_GetSetCurrentViewMode(void) }
hr = IFolderView_SetCurrentViewMode(fview, 7); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); todo_wine { if(vista_plus) @@ -1253,7 +1253,7 @@ static void test_GetSetCurrentViewMode(void) }
hr = IFolderView_SetCurrentViewMode(fview, 8); - ok(hr == S_OK || broken(hr == E_INVALIDARG /* Vista */), "got 0x%08x\n", hr); + ok(hr == S_OK || broken(hr == E_INVALIDARG /* Vista */), "got 0x%08lx\n", hr); todo_wine { if(vista_plus) @@ -1297,31 +1297,31 @@ static void test_IOleCommandTarget(void) HRESULT hr;
hr = SHGetDesktopFolder(&psf_desktop); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
hr = IShellFolder_CreateViewObject(psf_desktop, NULL, &IID_IShellView, (void**)&psv); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); if(SUCCEEDED(hr)) { hr = IShellView_QueryInterface(psv, &IID_IOleCommandTarget, (void**)&poct); - ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* Win95/NT4 */, "Got 0x%08x\n", hr); + ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* Win95/NT4 */, "Got 0x%08lx\n", hr); if(SUCCEEDED(hr)) { OLECMD oc;
hr = IOleCommandTarget_QueryStatus(poct, NULL, 0, NULL, NULL); - ok(hr == E_INVALIDARG, "Got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Got 0x%08lx\n", hr);
oc.cmdID = 1; hr = IOleCommandTarget_QueryStatus(poct, NULL, 0, &oc, NULL); - ok(hr == OLECMDERR_E_UNKNOWNGROUP, "Got 0x%08x\n", hr); + ok(hr == OLECMDERR_E_UNKNOWNGROUP, "Got 0x%08lx\n", hr);
oc.cmdID = 1; hr = IOleCommandTarget_QueryStatus(poct, NULL, 1, &oc, NULL); - ok(hr == OLECMDERR_E_UNKNOWNGROUP, "Got 0x%08x\n", hr); + ok(hr == OLECMDERR_E_UNKNOWNGROUP, "Got 0x%08lx\n", hr);
hr = IOleCommandTarget_Exec(poct, NULL, 0, 0, NULL, NULL); - ok(hr == OLECMDERR_E_UNKNOWNGROUP, "Got 0x%08x\n", hr); + ok(hr == OLECMDERR_E_UNKNOWNGROUP, "Got 0x%08lx\n", hr);
IOleCommandTarget_Release(poct); } @@ -1342,7 +1342,7 @@ static void test_SHCreateShellFolderView(void) HRESULT hr;
hr = SHGetDesktopFolder(&desktop); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
if (0) { @@ -1352,27 +1352,27 @@ static void test_SHCreateShellFolderView(void)
psv = (void *)0xdeadbeef; hr = SHCreateShellFolderView(NULL, &psv); - ok(hr == E_INVALIDARG, "Got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Got 0x%08lx\n", hr); ok(psv == NULL, "psv = %p\n", psv);
memset(&sfvc, 0, sizeof(sfvc)); psv = (void *)0xdeadbeef; hr = SHCreateShellFolderView(&sfvc, &psv); - ok(hr == E_INVALIDARG, "Got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Got 0x%08lx\n", hr); ok(psv == NULL, "psv = %p\n", psv);
memset(&sfvc, 0, sizeof(sfvc)); sfvc.cbSize = sizeof(sfvc) - 1; psv = (void *)0xdeadbeef; hr = SHCreateShellFolderView(&sfvc, &psv); - ok(hr == E_INVALIDARG, "Got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Got 0x%08lx\n", hr); ok(psv == NULL, "psv = %p\n", psv);
memset(&sfvc, 0, sizeof(sfvc)); sfvc.cbSize = sizeof(sfvc) + 1; psv = (void *)0xdeadbeef; hr = SHCreateShellFolderView(&sfvc, &psv); - ok(hr == E_INVALIDARG, "Got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Got 0x%08lx\n", hr); ok(psv == NULL, "psv = %p\n", psv);
if (0) @@ -1382,7 +1382,7 @@ if (0) sfvc.cbSize = sizeof(sfvc); psv = (void *)0xdeadbeef; hr = SHCreateShellFolderView(&sfvc, &psv); - ok(hr == E_UNEXPECTED, "Got 0x%08x\n", hr); + ok(hr == E_UNEXPECTED, "Got 0x%08lx\n", hr); ok(psv == NULL, "psv = %p\n", psv); } memset(&sfvc, 0, sizeof(sfvc)); @@ -1390,7 +1390,7 @@ if (0) sfvc.pshf = desktop; psv = (void *)0xdeadbeef; hr = SHCreateShellFolderView(&sfvc, &psv); - ok(hr == E_INVALIDARG, "Got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "Got 0x%08lx\n", hr); ok(psv == NULL, "psv = %p\n", psv);
memset(&sfvc, 0, sizeof(sfvc)); @@ -1398,16 +1398,16 @@ if (0) sfvc.pshf = desktop; psv = NULL; hr = SHCreateShellFolderView(&sfvc, &psv); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(psv != NULL, "psv = %p\n", psv);
hr = IShellView_QueryInterface(psv, &IID_CDefView, (void **)&unk); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); ok(unk == (IUnknown *)psv, "got %p\n", unk); IUnknown_Release(unk);
refCount = IShellView_Release(psv); - ok(refCount == 0, "refCount = %u\n", refCount); + ok(refCount == 0, "refCount = %lu\n", refCount);
IShellFolder_Release(desktop); } @@ -1422,7 +1422,7 @@ static void test_SHCreateShellFolderViewEx(void) CSFV csfv;
hr = SHGetDesktopFolder(&desktop); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr);
if (0) { @@ -1436,16 +1436,16 @@ static void test_SHCreateShellFolderViewEx(void) csfv.pshf = desktop; psv = NULL; hr = SHCreateShellFolderViewEx(&csfv, &psv); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(psv != NULL, "psv = %p\n", psv);
hr = IShellView_QueryInterface(psv, &IID_CDefView, (void **)&unk); - ok(hr == S_OK, "got (0x%08x)\n", hr); + ok(hr == S_OK, "got (0x%08lx)\n", hr); ok(unk == (IUnknown *)psv, "got %p\n", unk); IUnknown_Release(unk);
refCount = IShellView_Release(psv); - ok(refCount == 0, "refCount = %u\n", refCount); + ok(refCount == 0, "refCount = %lu\n", refCount);
if (0) { @@ -1454,7 +1454,7 @@ if (0) csfv.pshf = NULL; psv = (void *)0xdeadbeef; hr = SHCreateShellFolderViewEx(&csfv, &psv); - ok(hr == E_UNEXPECTED, "Got 0x%08x\n", hr); + ok(hr == E_UNEXPECTED, "Got 0x%08lx\n", hr); ok(psv == NULL, "psv = %p\n", psv); } memset(&csfv, 0, sizeof(csfv)); @@ -1462,12 +1462,12 @@ if (0) csfv.pshf = desktop; psv = NULL; hr = SHCreateShellFolderViewEx(&csfv, &psv); - ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(hr == S_OK, "Got 0x%08lx\n", hr); ok(psv != NULL, "psv = %p\n", psv); if (psv) { refCount = IShellView_Release(psv); - ok(refCount == 0, "refCount = %u\n", refCount); + ok(refCount == 0, "refCount = %lu\n", refCount); }
IShellFolder_Release(desktop); @@ -1480,7 +1480,7 @@ static void test_newmenu(void)
hr = CoCreateInstance(&CLSID_NewMenu, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); todo_wine - ok(hr == S_OK, "Failed to create NewMenu object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create NewMenu object, hr %#lx.\n", hr); if (hr != S_OK) { skip("NewMenu is not supported.\n"); @@ -1488,15 +1488,15 @@ static void test_newmenu(void) }
hr = IUnknown_QueryInterface(unk, &IID_IShellExtInit, (void **)&unk2); - ok(hr == S_OK, "Failed to get IShellExtInit, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get IShellExtInit, hr %#lx.\n", hr); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IContextMenu3, (void **)&unk2); - ok(hr == S_OK, "Failed to get IContextMenu3, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get IContextMenu3, hr %#lx.\n", hr); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IObjectWithSite, (void **)&unk2); - ok(hr == S_OK, "Failed to get IObjectWithSite, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get IObjectWithSite, hr %#lx.\n", hr); IUnknown_Release(unk2);
IUnknown_Release(unk);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=109867
Your paranoid android.
=== w1064_tsign (32 bit report) ===
shell32: autocomplete.c:734: Test failed: Expected L"auto complete", got L"au" autocomplete.c:735: Test failed: Expected 1 reset, got 0 autocomplete.c:741: Test failed: Expected 1 reset, got 0 autocomplete.c:744: Test failed: Expected 1 reset, got 0
=== w10pro64_ar (64 bit report) ===
shell32: autocomplete.c:561: Test failed: Expected 6 expansions, got 5 autocomplete.c:563: Test failed: Expected 7 resets, got 6 autocomplete.c:667: Test failed: Expected L"http://a0", got L"http://a" autocomplete.c:668: Test failed: AutoComplete DropDown not visible autocomplete.c:668: Test failed: AutoComplete DropDown not visible autocomplete.c:668: Test failed: Expected L"http://a0", got (null) autocomplete.c:668: Test failed: AutoComplete DropDown not visible autocomplete.c:668: Test failed: Expected L"http://abc.aa.com", got (null) autocomplete.c:668: Test failed: AutoComplete DropDown not visible
=== w10pro64_he (64 bit report) ===
shell32: autocomplete.c:773: Test failed: Expected L"auto complete", got L"au" autocomplete.c:774: Test failed: Expected 2 resets, got 0 autocomplete.c:779: Test failed: AutoComplete DropDown should be visible autocomplete.c:784: Test failed: AutoComplete DropDown should have been hidden
=== w10pro64_zh_CN (64 bit report) ===
shell32: autocomplete.c:774: Test failed: Expected 2 resets, got 1 autocomplete.c:535: Test failed: Expected 3 expansions, got 2 autocomplete.c:536: Test failed: Expected L"test\foo\bar\baz_bbq\", got L"test\foo\bar\" autocomplete.c:537: Test failed: Expected 3 resets, got 2 autocomplete.c:542: Test failed: Expected 4 expansions, got 2 autocomplete.c:543: Test failed: Expected L"test\", got L"test\foo\bar\" autocomplete.c:544: Test failed: Expected 4 resets, got 2 autocomplete.c:548: Test failed: Expected 4 expansions, got 2 autocomplete.c:549: Test failed: Expected 5 resets, got 2 autocomplete.c:554: Test failed: Expected 5 expansions, got 2 autocomplete.c:555: Test failed: Expected L"test\", got L"test\foo\bar\" autocomplete.c:556: Test failed: Expected 6 resets, got 2 autocomplete.c:561: Test failed: Expected 6 expansions, got 3 autocomplete.c:563: Test failed: Expected 7 resets, got 3
=== w1064v1809 (32 bit report) ===
shell32: shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 40000)
=== w1064_tsign (32 bit report) ===
shell32: shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 2) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 40000)
=== w10pro64 (32 bit report) ===
shell32: shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 4000000) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 40000) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 4000000) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 40000) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3)
=== w1064v1809 (64 bit report) ===
shell32: shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3)
=== w1064 (64 bit report) ===
shell32: shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 40000)
=== w1064_tsign (64 bit report) ===
shell32: shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 4000000) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 40000) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 4000000) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 4000000) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4912: Test failed: MKDIR: expected notification type 8, got: 40000 shlfolder.c:4919: Test failed: GetDisplayNameOf failed: 0x80070057 shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3)
=== w10pro64 (64 bit report) ===
shell32: shlfolder.c:4912: Test failed: CREATE: expected notification type 2, got: 40000 shlfolder.c:4919: Test failed: GetDisplayNameOf failed: 0x80070057 shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 2)
=== w10pro64_ar (64 bit report) ===
shell32: shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4912: Test failed: MKDIR: expected notification type 8, got: 40000 shlfolder.c:4919: Test failed: GetDisplayNameOf failed: 0x80070057 shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4912: Test failed: CREATE: expected notification type 2, got: 4000000 shlfolder.c:4919: Test failed: GetDisplayNameOf failed: 0x80070057 shlfolder.c:4920: Test failed: Expected PIDL to be NULL shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4912: Test failed: CREATE: expected notification type 2, got: 40000 shlfolder.c:4919: Test failed: GetDisplayNameOf failed: 0x80070057 shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3)
=== w10pro64_he (64 bit report) ===
shell32: shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 4000000) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 40000) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 4000000) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4912: Test failed: MKDIR: expected notification type 8, got: 40000 shlfolder.c:4919: Test failed: GetDisplayNameOf failed: 0x80070057 shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3)
=== w10pro64_ja (64 bit report) ===
shell32: shlfolder.c:4912: Test failed: RMDIR: expected notification type 10, got: 4000000 shlfolder.c:4919: Test failed: GetDisplayNameOf failed: 0x80070057 shlfolder.c:4920: Test failed: Expected PIDL to be NULL shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 40000) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4912: Test failed: MKDIR: expected notification type 8, got: 40000 shlfolder.c:4919: Test failed: GetDisplayNameOf failed: 0x80070057 shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4912: Test failed: CREATE: expected notification type 2, got: 40000 shlfolder.c:4919: Test failed: GetDisplayNameOf failed: 0x80070057 shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3)
=== w10pro64_zh_CN (64 bit report) ===
shell32: shlfolder.c:4912: Test failed: RMDIR: expected notification type 10, got: 40000 shlfolder.c:4919: Test failed: GetDisplayNameOf failed: 0x80070057 shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 10) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3) shlfolder.c:4912: Test failed: MKDIR: expected notification type 8, got: 40000 shlfolder.c:4919: Test failed: GetDisplayNameOf failed: 0x80070057 shlfolder.c:4929: Test failed: Didn't expect a WM_USER_NOTIFY message (event: 3)
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/shlwapi/tests/Makefile.in | 1 dlls/shlwapi/tests/assoc.c | 50 +++---- dlls/shlwapi/tests/clist.c | 4 - dlls/shlwapi/tests/clsid.c | 10 + dlls/shlwapi/tests/istream.c | 258 +++++++++++++++++----------------- dlls/shlwapi/tests/ordinal.c | 306 ++++++++++++++++++++-------------------- dlls/shlwapi/tests/path.c | 210 ++++++++++++++------------- dlls/shlwapi/tests/shreg.c | 104 +++++++------- dlls/shlwapi/tests/string.c | 52 +++---- dlls/shlwapi/tests/thread.c | 34 ++-- dlls/shlwapi/tests/url.c | 276 ++++++++++++++++++------------------ 11 files changed, 652 insertions(+), 653 deletions(-)
diff --git a/dlls/shlwapi/tests/Makefile.in b/dlls/shlwapi/tests/Makefile.in index 5c026fd6e5d..450a3955489 100644 --- a/dlls/shlwapi/tests/Makefile.in +++ b/dlls/shlwapi/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = shlwapi.dll IMPORTS = shlwapi shell32 mlang oleaut32 ole32 user32 advapi32
diff --git a/dlls/shlwapi/tests/assoc.c b/dlls/shlwapi/tests/assoc.c index 4b461128dc4..84eda1317bb 100644 --- a/dlls/shlwapi/tests/assoc.c +++ b/dlls/shlwapi/tests/assoc.c @@ -23,8 +23,8 @@ #include "shlwapi.h" #include "shlguid.h"
-#define expect(expected, got) ok ( expected == got, "Expected %d, got %d\n", expected, got) -#define expect_hr(expected, got) ok ( expected == got, "Expected %08x, got %08x\n", expected, got) +#define expect(expected, got) ok ( expected == got, "Expected %ld, got %ld\n", expected, got) +#define expect_hr(expected, got) ok ( expected == got, "Expected %08lx, got %08lx\n", expected, got)
static HRESULT (WINAPI *pAssocQueryStringA)(ASSOCF,ASSOCSTR,LPCSTR,LPCSTR,LPSTR,LPDWORD) = NULL; static HRESULT (WINAPI *pAssocQueryStringW)(ASSOCF,ASSOCSTR,LPCWSTR,LPCWSTR,LPWSTR,LPDWORD) = NULL; @@ -53,24 +53,24 @@ static void test_getstring_bad(void) len = 0xdeadbeef; hr = pAssocQueryStringW(0, ASSOCSTR_EXECUTABLE, NULL, open, NULL, &len); expect_hr(E_INVALIDARG, hr); - ok(len == 0xdeadbeef, "got %u\n", len); + ok(len == 0xdeadbeef, "got %lu\n", len);
len = 0xdeadbeef; hr = pAssocQueryStringW(0, ASSOCSTR_EXECUTABLE, badBad, open, NULL, &len); ok(hr == E_FAIL || hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION), /* Win9x/WinMe/NT4/W2K/Vista/W2K8 */ - "Unexpected result : %08x\n", hr); - ok(len == 0xdeadbeef, "got %u\n", len); + "Unexpected result : %08lx\n", hr); + ok(len == 0xdeadbeef, "got %lu\n", len);
len = ARRAY_SIZE(buf); hr = pAssocQueryStringW(0, ASSOCSTR_EXECUTABLE, dotBad, open, buf, &len); ok(hr == E_FAIL || hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION) /* Win9x/WinMe/NT4/W2K/Vista/W2K8 */ || hr == S_OK /* Win8 */, - "Unexpected result : %08x\n", hr); + "Unexpected result : %08lx\n", hr); if (hr == S_OK) { - ok(len < ARRAY_SIZE(buf), "got %u\n", len); + ok(len < ARRAY_SIZE(buf), "got %lu\n", len); ok(!lstrcmpiW(buf + len - ARRAY_SIZE(openwith), openwith), "wrong data\n"); }
@@ -78,25 +78,25 @@ static void test_getstring_bad(void) hr = pAssocQueryStringW(0, ASSOCSTR_EXECUTABLE, dotHtml, invalid, NULL, &len); ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION), /* Win9x/WinMe/NT4/W2K/Vista/W2K8 */ - "Unexpected result : %08x\n", hr); - ok(len == 0xdeadbeef, "got %u\n", len); + "Unexpected result : %08lx\n", hr); + ok(len == 0xdeadbeef, "got %lu\n", len);
hr = pAssocQueryStringW(0, ASSOCSTR_EXECUTABLE, dotHtml, open, NULL, NULL); ok(hr == E_UNEXPECTED || hr == E_INVALIDARG, /* Win9x/WinMe/NT4/W2K/Vista/W2K8 */ - "Unexpected result : %08x\n", hr); + "Unexpected result : %08lx\n", hr);
len = 0xdeadbeef; hr = pAssocQueryStringW(0, ASSOCSTR_FRIENDLYAPPNAME, NULL, open, NULL, &len); expect_hr(E_INVALIDARG, hr); - ok(len == 0xdeadbeef, "got %u\n", len); + ok(len == 0xdeadbeef, "got %lu\n", len);
len = 0xdeadbeef; hr = pAssocQueryStringW(0, ASSOCSTR_FRIENDLYAPPNAME, badBad, open, NULL, &len); ok(hr == E_FAIL || hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION), /* Win9x/WinMe/NT4/W2K/Vista/W2K8 */ - "Unexpected result : %08x\n", hr); - ok(len == 0xdeadbeef, "got %u\n", len); + "Unexpected result : %08lx\n", hr); + ok(len == 0xdeadbeef, "got %lu\n", len);
len = 0xdeadbeef; hr = pAssocQueryStringW(0, ASSOCSTR_FRIENDLYAPPNAME, dotBad, open, NULL, &len); @@ -104,22 +104,22 @@ static void test_getstring_bad(void) hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION) /* Win9x/WinMe/NT4/W2K/Vista/W2K8 */ || hr == HRESULT_FROM_WIN32(ERROR_NOT_FOUND) /* Win8 */ || hr == S_FALSE, /* Win10 */ - "Unexpected result : %08x\n", hr); + "Unexpected result : %08lx\n", hr); ok((hr == S_FALSE && len < ARRAY_SIZE(buf)) || len == 0xdeadbeef, - "got hr=%08x and len=%u\n", hr, len); + "got hr=%08lx and len=%lu\n", hr, len);
len = 0xdeadbeef; hr = pAssocQueryStringW(0, ASSOCSTR_FRIENDLYAPPNAME, dotHtml, invalid, NULL, &len); ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION) || /* W2K/Vista/W2K8 */ hr == E_FAIL, /* Win9x/WinMe/NT4 */ - "Unexpected result : %08x\n", hr); - ok(len == 0xdeadbeef, "got %u\n", len); + "Unexpected result : %08lx\n", hr); + ok(len == 0xdeadbeef, "got %lu\n", len);
hr = pAssocQueryStringW(0, ASSOCSTR_FRIENDLYAPPNAME, dotHtml, open, NULL, NULL); ok(hr == E_UNEXPECTED || hr == E_INVALIDARG, /* Win9x/WinMe/NT4/W2K/Vista/W2K8 */ - "Unexpected result : %08x\n", hr); + "Unexpected result : %08lx\n", hr); }
static void test_getstring_basic(void) @@ -164,7 +164,7 @@ static void test_getstring_basic(void) ok(hr == S_FALSE || hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) /* Win9x/NT4 */ || hr == HRESULT_FROM_WIN32(ERROR_NOT_FOUND), /* Win8 */ - "Unexpected result : %08x\n", hr); + "Unexpected result : %08lx\n", hr); if (hr != S_FALSE) { HeapFree(GetProcessHeap(), 0, executableName); @@ -255,7 +255,7 @@ static void test_getstring_no_extra(void) hr = pAssocQueryStringA(0, ASSOCSTR_EXECUTABLE, dotWinetest, NULL, buf, &len); ok(hr == S_OK || hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), /* XP and W2K3 */ - "Unexpected result : %08x\n", hr); + "Unexpected result : %08lx\n", hr); hr = pAssocQueryStringA(0, ASSOCSTR_EXECUTABLE, dotWinetest, "foo", buf, &len); expect_hr(S_OK, hr); ok(strstr(buf, action) != NULL, @@ -279,19 +279,19 @@ static void test_assoc_create(void) }
hr = pAssocCreate(IID_NULL, &IID_NULL, NULL); - ok(hr == E_INVALIDARG, "Unexpected result : %08x\n", hr); + ok(hr == E_INVALIDARG, "Unexpected result : %08lx\n", hr);
hr = pAssocCreate(CLSID_QueryAssociations, &IID_NULL, (LPVOID*)&pqa); ok(hr == CLASS_E_CLASSNOTAVAILABLE || hr == E_NOTIMPL || hr == E_NOINTERFACE - , "Unexpected result : %08x\n", hr); + , "Unexpected result : %08lx\n", hr);
hr = pAssocCreate(IID_NULL, &IID_IQueryAssociations, (LPVOID*)&pqa); ok(hr == CLASS_E_CLASSNOTAVAILABLE || hr == E_NOTIMPL || hr == E_INVALIDARG - , "Unexpected result : %08x\n", hr); + , "Unexpected result : %08lx\n", hr);
hr = pAssocCreate(CLSID_QueryAssociations, &IID_IQueryAssociations, (LPVOID*)&pqa); ok(hr == S_OK || hr == E_NOTIMPL /* win98 */ - , "Unexpected result : %08x\n", hr); + , "Unexpected result : %08lx\n", hr); if(hr == S_OK) { IQueryAssociations_Release(pqa); @@ -299,7 +299,7 @@ static void test_assoc_create(void)
hr = pAssocCreate(CLSID_QueryAssociations, &IID_IUnknown, (LPVOID*)&pqa); ok(hr == S_OK || hr == E_NOTIMPL /* win98 */ - , "Unexpected result : %08x\n", hr); + , "Unexpected result : %08lx\n", hr); if(hr == S_OK) { IQueryAssociations_Release(pqa); diff --git a/dlls/shlwapi/tests/clist.c b/dlls/shlwapi/tests/clist.c index 0c914d608e5..5f88e92a5a6 100644 --- a/dlls/shlwapi/tests/clist.c +++ b/dlls/shlwapi/tests/clist.c @@ -328,7 +328,7 @@ static void test_CList(void) else if (inserted) { ok(inserted->cbSize == item->cbSize + sizeof(DATABLOCK_HEADER), - "id %d wrong size %d\n", inserted->dwSignature, inserted->cbSize); + "id %ld wrong size %ld\n", inserted->dwSignature, inserted->cbSize); } if (inserted) { @@ -449,7 +449,7 @@ static void test_CList(void) else if (inserted) { ok(inserted->cbSize == item->cbSize + sizeof(DATABLOCK_HEADER), - "id %d wrong size %d\n", inserted->dwSignature, inserted->cbSize); + "id %ld wrong size %ld\n", inserted->dwSignature, inserted->cbSize); } ok(!inserted || inserted->dwSignature == item->dwSignature, "find got wrong item\n"); if (inserted) diff --git a/dlls/shlwapi/tests/clsid.c b/dlls/shlwapi/tests/clsid.c index 7f2d375a35b..46b2a0b0185 100644 --- a/dlls/shlwapi/tests/clsid.c +++ b/dlls/shlwapi/tests/clsid.c @@ -116,7 +116,7 @@ static void test_ClassIDs(void) { dwLen = pSHStringFromGUIDA(*guids, szBuff, 256); if (!i && dwLen == S_OK) is_vista = TRUE; /* seems to return an HRESULT on vista */ - ok(dwLen == (is_vista ? S_OK : 39), "wrong size %u for id %d\n", dwLen, i); + ok(dwLen == (is_vista ? S_OK : 39), "wrong size %lu for id %d\n", dwLen, i);
bRet = pGUIDFromStringA(szBuff, &guid); ok(bRet != FALSE, "created invalid string '%s'\n", szBuff); @@ -130,7 +130,7 @@ static void test_ClassIDs(void)
/* Test endianness */ dwLen = pSHStringFromGUIDA(&IID_Endianness, szBuff, 256); - ok(dwLen == (is_vista ? S_OK : 39), "wrong size %u for IID_Endianness\n", dwLen); + ok(dwLen == (is_vista ? S_OK : 39), "wrong size %lu for IID_Endianness\n", dwLen);
ok(!strcmp(szBuff, "{01020304-0506-0708-090A-0B0C0D0E0F0A}"), "Endianness Broken, got '%s'\n", szBuff); @@ -171,14 +171,14 @@ static void test_CLSIDFromProgIDWrap(void) pCLSIDFromProgIDWrap = (void*)GetProcAddress(hShlwapi,(char*)435);
hres = pCLSIDFromProgIDWrap(wszStdPicture, &clsid); - ok(hres == S_OK, "CLSIDFromProgIDWrap failed: %08x\n", hres); + ok(hres == S_OK, "CLSIDFromProgIDWrap failed: %08lx\n", hres); ok(IsEqualGUID(&CLSID_StdPicture, &clsid), "wrong clsid\n");
hres = pCLSIDFromProgIDWrap(NULL, &clsid); - ok(hres == E_INVALIDARG, "CLSIDFromProgIDWrap failed: %08x, expected E_INVALIDARG\n", hres); + ok(hres == E_INVALIDARG, "CLSIDFromProgIDWrap failed: %08lx, expected E_INVALIDARG\n", hres);
hres = pCLSIDFromProgIDWrap(wszStdPicture, NULL); - ok(hres == E_INVALIDARG, "CLSIDFromProgIDWrap failed: %08x, expected E_INVALIDARG\n", hres); + ok(hres == E_INVALIDARG, "CLSIDFromProgIDWrap failed: %08lx, expected E_INVALIDARG\n", hres); }
START_TEST(clsid) diff --git a/dlls/shlwapi/tests/istream.c b/dlls/shlwapi/tests/istream.c index 4894eabdf50..8ccb3775fa0 100644 --- a/dlls/shlwapi/tests/istream.c +++ b/dlls/shlwapi/tests/istream.c @@ -51,16 +51,16 @@ static void test_IStream_invalid_operations(IStream * stream, DWORD mode) /* IStream_Read from the COBJMACROS is undefined by shlwapi.h, replaced by the IStream_Read helper function. */
ret = stream->lpVtbl->Read(stream, NULL, 0, &count); - ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret); + ok(ret == S_OK, "expected S_OK, got 0x%08lx\n", ret);
ret = stream->lpVtbl->Read(stream, data, 5, NULL); - ok(ret == S_FALSE || ret == S_OK, "expected S_FALSE or S_OK, got 0x%08x\n", ret); + ok(ret == S_FALSE || ret == S_OK, "expected S_FALSE or S_OK, got 0x%08lx\n", ret);
ret = stream->lpVtbl->Read(stream, data, 0, NULL); - ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret); + ok(ret == S_OK, "expected S_OK, got 0x%08lx\n", ret);
ret = stream->lpVtbl->Read(stream, data, 3, &count); - ok(ret == S_FALSE || ret == S_OK, "expected S_FALSE or S_OK, got 0x%08x\n", ret); + ok(ret == S_FALSE || ret == S_OK, "expected S_FALSE or S_OK, got 0x%08lx\n", ret);
/* IStream::Write */
@@ -70,104 +70,104 @@ static void test_IStream_invalid_operations(IStream * stream, DWORD mode) if (mode == STGM_READ) { ok(ret == STG_E_ACCESSDENIED /* XP */ || broken(ret == S_OK) /* Win2000 + IE5 */, - "expected STG_E_ACCESSDENIED, got 0x%08x\n", ret); + "expected STG_E_ACCESSDENIED, got 0x%08lx\n", ret); } else - ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret); + ok(ret == S_OK, "expected S_OK, got 0x%08lx\n", ret);
strcpy(data, "Hello"); ret = stream->lpVtbl->Write(stream, data, 5, NULL); if (mode == STGM_READ) ok(ret == STG_E_ACCESSDENIED, - "expected STG_E_ACCESSDENIED, got 0x%08x\n", ret); + "expected STG_E_ACCESSDENIED, got 0x%08lx\n", ret); else - ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret); + ok(ret == S_OK, "expected S_OK, got 0x%08lx\n", ret);
strcpy(data, "Hello"); ret = stream->lpVtbl->Write(stream, data, 0, NULL); if (mode == STGM_READ) ok(ret == STG_E_ACCESSDENIED, - "expected STG_E_ACCESSDENIED, got 0x%08x\n", ret); + "expected STG_E_ACCESSDENIED, got 0x%08lx\n", ret); else - ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret); + ok(ret == S_OK, "expected S_OK, got 0x%08lx\n", ret);
strcpy(data, "Hello"); ret = stream->lpVtbl->Write(stream, data, 0, &count); if (mode == STGM_READ) ok(ret == STG_E_ACCESSDENIED, - "expected STG_E_ACCESSDENIED, got 0x%08x\n", ret); + "expected STG_E_ACCESSDENIED, got 0x%08lx\n", ret); else - ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret); + ok(ret == S_OK, "expected S_OK, got 0x%08lx\n", ret);
strcpy(data, "Hello"); ret = stream->lpVtbl->Write(stream, data, 3, &count); if (mode == STGM_READ) ok(ret == STG_E_ACCESSDENIED, - "expected STG_E_ACCESSDENIED, got 0x%08x\n", ret); + "expected STG_E_ACCESSDENIED, got 0x%08lx\n", ret); else - ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret); + ok(ret == S_OK, "expected S_OK, got 0x%08lx\n", ret);
/* IStream::Seek */
ret = IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); - ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret); + ok(ret == S_OK, "expected S_OK, got 0x%08lx\n", ret);
ret = IStream_Seek(stream, zero, 20, NULL); ok(ret == E_INVALIDARG, - "expected E_INVALIDARG, got 0x%08x\n", ret); + "expected E_INVALIDARG, got 0x%08lx\n", ret);
/* IStream::CopyTo */
ret = IStream_CopyTo(stream, NULL, uzero, &uret, &uret); - ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret); + ok(ret == S_OK, "expected S_OK, got 0x%08lx\n", ret);
clone = NULL; ret = IStream_CopyTo(stream, clone, uzero, &uret, &uret); - ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret); + ok(ret == S_OK, "expected S_OK, got 0x%08lx\n", ret);
ret = IStream_CopyTo(stream, stream, uzero, &uret, &uret); - ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret); + ok(ret == S_OK, "expected S_OK, got 0x%08lx\n", ret);
ret = IStream_CopyTo(stream, stream, uzero, &uret, NULL); - ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret); + ok(ret == S_OK, "expected S_OK, got 0x%08lx\n", ret);
ret = IStream_CopyTo(stream, stream, uzero, NULL, &uret); - ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret); + ok(ret == S_OK, "expected S_OK, got 0x%08lx\n", ret);
/* IStream::Commit */
ret = IStream_Commit(stream, STGC_DEFAULT); - ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret); + ok(ret == S_OK, "expected S_OK, got 0x%08lx\n", ret);
/* IStream::Revert */
ret = IStream_Revert(stream); - ok(ret == E_NOTIMPL, "expected E_NOTIMPL, got 0x%08x\n", ret); + ok(ret == E_NOTIMPL, "expected E_NOTIMPL, got 0x%08lx\n", ret);
/* IStream::LockRegion */
ret = IStream_LockRegion(stream, uzero, uzero, 0); ok(ret == E_NOTIMPL /* XP */ || ret == S_OK /* Vista */, - "expected E_NOTIMPL or S_OK, got 0x%08x\n", ret); + "expected E_NOTIMPL or S_OK, got 0x%08lx\n", ret);
/* IStream::UnlockRegion */
if (ret == E_NOTIMPL) /* XP */ { ret = IStream_UnlockRegion(stream, uzero, uzero, 0); - ok(ret == E_NOTIMPL, "expected E_NOTIMPL, got 0x%08x\n", ret); + ok(ret == E_NOTIMPL, "expected E_NOTIMPL, got 0x%08lx\n", ret); } else /* Vista */ { ret = IStream_UnlockRegion(stream, uzero, uzero, 0); - ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret); + ok(ret == S_OK, "expected S_OK, got 0x%08lx\n", ret);
ret = IStream_UnlockRegion(stream, uzero, uzero, 0); - ok(ret == STG_E_LOCKVIOLATION, "expected STG_E_LOCKVIOLATION, got 0x%08x\n", ret); + ok(ret == STG_E_LOCKVIOLATION, "expected STG_E_LOCKVIOLATION, got 0x%08lx\n", ret); }
/* IStream::Stat */
ret = IStream_Stat(stream, NULL, 0); ok(ret == STG_E_INVALIDPOINTER, - "expected STG_E_INVALIDPOINTER or E_NOTIMPL, got 0x%08x\n", ret); + "expected STG_E_INVALIDPOINTER or E_NOTIMPL, got 0x%08lx\n", ret);
/* IStream::Clone */
@@ -175,12 +175,12 @@ static void test_IStream_invalid_operations(IStream * stream, DWORD mode)
clone = NULL; ret = IStream_Clone(stream, &clone); - ok(ret == E_NOTIMPL, "expected E_NOTIMPL, got 0x%08x\n", ret); + ok(ret == E_NOTIMPL, "expected E_NOTIMPL, got 0x%08lx\n", ret); ok(clone == NULL, "expected a NULL IStream object, got %p\n", stream);
if (clone) { refcount = IStream_Release(clone); - ok(refcount == 0, "expected 0, got %d\n", refcount); + ok(refcount == 0, "expected 0, got %ld\n", refcount); } }
@@ -199,63 +199,63 @@ static void test_stream_read_write(IStream *stream, DWORD mode) ret = stream->lpVtbl->Write(stream, "\x5e\xa7", 2, &written); if (mode == STGM_WRITE || mode == STGM_READWRITE) { - ok(ret == S_OK, "IStream_Write error %#x (access %#x)\n", ret, mode); - ok(written == 2, "expected 2, got %u\n", written); + ok(ret == S_OK, "IStream_Write error %#lx (access %#lx)\n", ret, mode); + ok(written == 2, "expected 2, got %lu\n", written); } else { - ok(ret == STG_E_ACCESSDENIED || broken(ret == S_OK) /* win2000 */, "expected STG_E_ACCESSDENIED, got %#x (access %#x)\n", ret, mode); - ok(written == 0xdeadbeaf || broken(written == 2) /* win2000 */, "expected 0xdeadbeaf, got %#x\n", written); + ok(ret == STG_E_ACCESSDENIED || broken(ret == S_OK) /* win2000 */, "expected STG_E_ACCESSDENIED, got %#lx (access %#lx)\n", ret, mode); + ok(written == 0xdeadbeaf || broken(written == 2) /* win2000 */, "expected 0xdeadbeaf, got %#lx\n", written); written = 0; if (ret == S_OK) return; /* no point in further testing */ }
ret = stream->lpVtbl->Seek(stream, start, STREAM_SEEK_SET, NULL); - ok(ret == S_OK, "Seek error %#x\n", ret); + ok(ret == S_OK, "Seek error %#lx\n", ret);
count = 0xdeadbeaf; ret = stream->lpVtbl->Read(stream, buf, 2, &count); if (written != 0) { - ok(ret == S_OK || broken(ret == S_FALSE) /* win2000 */, "IStream_Read error %#x (access %#x, written %u)\n", ret, mode, written); + ok(ret == S_OK || broken(ret == S_FALSE) /* win2000 */, "IStream_Read error %#lx (access %#lx, written %lu)\n", ret, mode, written); if (ret == S_OK && (mode == STGM_WRITE || mode == STGM_READWRITE)) { - ok(count == 2, "expected 2, got %u\n", count); + ok(count == 2, "expected 2, got %lu\n", count); ok(buf[0] == 0x5e && buf[1] == 0xa7, "expected 5ea7, got %02x%02x\n", buf[0], buf[1]); } else - ok(count == 0, "expected 0, got %u\n", count); + ok(count == 0, "expected 0, got %lu\n", count); } else { - ok(ret == S_FALSE, "expected S_FALSE, got %#x (access %#x, written %u)\n", ret, mode, written); - ok(count == 0, "expected 0, got %u\n", count); + ok(ret == S_FALSE, "expected S_FALSE, got %#lx (access %#lx, written %lu)\n", ret, mode, written); + ok(count == 0, "expected 0, got %lu\n", count); }
ret = stream->lpVtbl->Seek(stream, start, STREAM_SEEK_SET, NULL); - ok(ret == S_OK, "Seek error %#x\n", ret); + ok(ret == S_OK, "Seek error %#lx\n", ret);
count = 0xdeadbeaf; ret = stream->lpVtbl->Read(stream, buf, 0, &count); - ok(ret == S_OK, "IStream_Read error %#x (access %#x, written %u)\n", ret, mode, written); - ok(count == 0, "expected 0, got %u\n", count); + ok(ret == S_OK, "IStream_Read error %#lx (access %#lx, written %lu)\n", ret, mode, written); + ok(count == 0, "expected 0, got %lu\n", count);
count = 0xdeadbeaf; ret = stream->lpVtbl->Read(stream, buf, sizeof(buf), &count); - ok(ret == S_FALSE, "expected S_FALSE, got %#x (access %#x, written %u)\n", ret, mode, written); - ok(count == written, "expected %u, got %u\n", written, count); + ok(ret == S_FALSE, "expected S_FALSE, got %#lx (access %#lx, written %lu)\n", ret, mode, written); + ok(count == written, "expected %lu, got %lu\n", written, count); if (count) ok(buf[0] == 0x5e && buf[1] == 0xa7, "expected 5ea7, got %02x%02x\n", buf[0], buf[1]);
memset(&statstg, 0xff, sizeof(statstg)); ret = IStream_Stat(stream, &statstg, 0); - ok(ret == S_OK, "Stat failed, hr %#x.\n", ret); + ok(ret == S_OK, "Stat failed, hr %#lx.\n", ret); ok(statstg.pwcsName != NULL, "Unexpected name %s.\n", wine_dbgstr_w(statstg.pwcsName)); CoTaskMemFree(statstg.pwcsName);
memset(&statstg, 0xff, sizeof(statstg)); ret = IStream_Stat(stream, &statstg, STATFLAG_NONAME); - ok(ret == S_OK, "Stat failed, hr %#x.\n", ret); + ok(ret == S_OK, "Stat failed, hr %#lx.\n", ret); ok(statstg.pwcsName == NULL, "Unexpected name %s.\n", wine_dbgstr_w(statstg.pwcsName)); }
@@ -265,17 +265,17 @@ static void test_stream_qi(IStream *stream) HRESULT hr;
hr = IStream_QueryInterface(stream, &IID_IStream, (void **)&unk); - ok(SUCCEEDED(hr), "Failed to get IStream interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get IStream interface, hr %#lx.\n", hr); IUnknown_Release(unk);
unk = NULL; hr = IStream_QueryInterface(stream, &IID_ISequentialStream, (void **)&unk); - ok(SUCCEEDED(hr) || broken(hr == E_NOINTERFACE) /* XP */, "Failed to get ISequentialStream interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr) || broken(hr == E_NOINTERFACE) /* XP */, "Failed to get ISequentialStream interface, hr %#lx.\n", hr); if (unk) IUnknown_Release(unk);
hr = IStream_QueryInterface(stream, &IID_IUnknown, (void **)&unk); - ok(SUCCEEDED(hr), "Failed to get IUnknown interface, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get IUnknown interface, hr %#lx.\n", hr); IUnknown_Release(unk); }
@@ -287,7 +287,7 @@ static void test_SHCreateStreamOnFileA(DWORD mode, DWORD stgm) char test_file[MAX_PATH]; static const CHAR testA_txt[] = "\testA.txt";
- trace("SHCreateStreamOnFileA: testing mode %d, STGM flags %08x\n", mode, stgm); + trace("SHCreateStreamOnFileA: testing mode %ld, STGM flags %08lx\n", mode, stgm);
/* Don't used a fixed path for the testA.txt file */ GetTempPathA(MAX_PATH, test_file); @@ -305,40 +305,40 @@ static void test_SHCreateStreamOnFileA(DWORD mode, DWORD stgm) ok(ret == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) /* NT */ || ret == HRESULT_FROM_WIN32(ERROR_BAD_PATHNAME) /* 9x */, "SHCreateStreamOnFileA: expected HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) " - "or HRESULT_FROM_WIN32(ERROR_BAD_PATHNAME), got 0x%08x\n", ret); + "or HRESULT_FROM_WIN32(ERROR_BAD_PATHNAME), got 0x%08lx\n", ret); ok(stream == NULL, "SHCreateStreamOnFileA: expected a NULL IStream object, got %p\n", stream);
if (0) /* This test crashes on WinXP SP2 */ { ret = SHCreateStreamOnFileA(test_file, mode | stgm, NULL); - ok(ret == E_INVALIDARG, "SHCreateStreamOnFileA: expected E_INVALIDARG, got 0x%08x\n", ret); + ok(ret == E_INVALIDARG, "SHCreateStreamOnFileA: expected E_INVALIDARG, got 0x%08lx\n", ret); }
stream = NULL; ret = SHCreateStreamOnFileA(test_file, mode | STGM_CONVERT | stgm, &stream); - ok(ret == E_INVALIDARG, "SHCreateStreamOnFileA: expected E_INVALIDARG, got 0x%08x\n", ret); + ok(ret == E_INVALIDARG, "SHCreateStreamOnFileA: expected E_INVALIDARG, got 0x%08lx\n", ret); ok(stream == NULL, "SHCreateStreamOnFileA: expected a NULL IStream object, got %p\n", stream);
stream = NULL; ret = SHCreateStreamOnFileA(test_file, mode | STGM_DELETEONRELEASE | stgm, &stream); - ok(ret == E_INVALIDARG, "SHCreateStreamOnFileA: expected E_INVALIDARG, got 0x%08x\n", ret); + ok(ret == E_INVALIDARG, "SHCreateStreamOnFileA: expected E_INVALIDARG, got 0x%08lx\n", ret); ok(stream == NULL, "SHCreateStreamOnFileA: expected a NULL IStream object, got %p\n", stream);
stream = NULL; ret = SHCreateStreamOnFileA(test_file, mode | STGM_TRANSACTED | stgm, &stream); - ok(ret == E_INVALIDARG, "SHCreateStreamOnFileA: expected E_INVALIDARG, got 0x%08x\n", ret); + ok(ret == E_INVALIDARG, "SHCreateStreamOnFileA: expected E_INVALIDARG, got 0x%08lx\n", ret); ok(stream == NULL, "SHCreateStreamOnFileA: expected a NULL IStream object, got %p\n", stream);
/* file does not exist */
stream = NULL; ret = SHCreateStreamOnFileA(test_file, mode | STGM_FAILIFTHERE | stgm, &stream); - ok(ret == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "SHCreateStreamOnFileA: expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got 0x%08x\n", ret); + ok(ret == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "SHCreateStreamOnFileA: expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got 0x%08lx\n", ret); ok(stream == NULL, "SHCreateStreamOnFileA: expected a NULL IStream object, got %p\n", stream);
stream = NULL; ret = SHCreateStreamOnFileA(test_file, mode | STGM_CREATE | stgm, &stream); - ok(ret == S_OK, "SHCreateStreamOnFileA: expected S_OK, got 0x%08x\n", ret); + ok(ret == S_OK, "SHCreateStreamOnFileA: expected S_OK, got 0x%08lx\n", ret); ok(stream != NULL, "SHCreateStreamOnFileA: expected a valid IStream object, got NULL\n");
if (stream) { @@ -346,7 +346,7 @@ if (0) /* This test crashes on WinXP SP2 */ test_IStream_invalid_operations(stream, mode);
refcount = IStream_Release(stream); - ok(refcount == 0, "SHCreateStreamOnFileA: expected 0, got %d\n", refcount); + ok(refcount == 0, "SHCreateStreamOnFileA: expected 0, got %ld\n", refcount); }
/* NOTE: don't delete the file, as it will be used for the file exists tests. */ @@ -355,19 +355,19 @@ if (0) /* This test crashes on WinXP SP2 */
stream = NULL; ret = SHCreateStreamOnFileA(test_file, mode | STGM_FAILIFTHERE | stgm, &stream); - ok(ret == S_OK, "SHCreateStreamOnFileA: expected S_OK, got 0x%08x\n", ret); + ok(ret == S_OK, "SHCreateStreamOnFileA: expected S_OK, got 0x%08lx\n", ret); ok(stream != NULL, "SHCreateStreamOnFileA: expected a valid IStream object, got NULL\n");
if (stream) { test_IStream_invalid_operations(stream, mode);
refcount = IStream_Release(stream); - ok(refcount == 0, "SHCreateStreamOnFileA: expected 0, got %d\n", refcount); + ok(refcount == 0, "SHCreateStreamOnFileA: expected 0, got %ld\n", refcount); }
stream = NULL; ret = SHCreateStreamOnFileA(test_file, mode | STGM_CREATE | stgm, &stream); - ok(ret == S_OK, "SHCreateStreamOnFileA: expected S_OK, got 0x%08x\n", ret); + ok(ret == S_OK, "SHCreateStreamOnFileA: expected S_OK, got 0x%08lx\n", ret); ok(stream != NULL, "SHCreateStreamOnFileA: expected a valid IStream object, got NULL\n");
if (stream) { @@ -377,10 +377,10 @@ if (0) /* This test crashes on WinXP SP2 */ test_IStream_invalid_operations(stream, mode);
refcount = IStream_Release(stream); - ok(refcount == 0, "SHCreateStreamOnFileA: expected 0, got %d\n", refcount); + ok(refcount == 0, "SHCreateStreamOnFileA: expected 0, got %ld\n", refcount);
delret = DeleteFileA(test_file); - ok(delret, "SHCreateStreamOnFileA: could not delete file '%s', got error %d\n", + ok(delret, "SHCreateStreamOnFileA: could not delete file '%s', got error %ld\n", test_file, GetLastError()); } } @@ -395,7 +395,7 @@ static void test_SHCreateStreamOnFileW(DWORD mode, DWORD stgm) CHAR test_fileA[MAX_PATH]; static const CHAR testW_txt[] = "\testW.txt";
- trace("SHCreateStreamOnFileW: testing mode %d, STGM flags %08x\n", mode, stgm); + trace("SHCreateStreamOnFileW: testing mode %ld, STGM flags %08lx\n", mode, stgm);
/* Don't used a fixed path for the testW.txt file */ GetTempPathA(MAX_PATH, test_fileA); @@ -411,7 +411,7 @@ static void test_SHCreateStreamOnFileW(DWORD mode, DWORD stgm) ret = SHCreateStreamOnFileW(NULL, mode | stgm, &stream); ok(ret == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) || /* XP */ ret == E_INVALIDARG /* Vista */, - "SHCreateStreamOnFileW: expected HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) or E_INVALIDARG, got 0x%08x\n", ret); + "SHCreateStreamOnFileW: expected HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) or E_INVALIDARG, got 0x%08lx\n", ret); ok(stream == NULL, "SHCreateStreamOnFileW: expected a NULL IStream object, got %p\n", stream); }
@@ -419,22 +419,22 @@ static void test_SHCreateStreamOnFileW(DWORD mode, DWORD stgm) { /* This test crashes on WinXP SP2 */ ret = SHCreateStreamOnFileW(test_file, mode | stgm, NULL); - ok(ret == E_INVALIDARG, "SHCreateStreamOnFileW: expected E_INVALIDARG, got 0x%08x\n", ret); + ok(ret == E_INVALIDARG, "SHCreateStreamOnFileW: expected E_INVALIDARG, got 0x%08lx\n", ret); }
stream = NULL; ret = SHCreateStreamOnFileW(test_file, mode | STGM_CONVERT | stgm, &stream); - ok(ret == E_INVALIDARG, "SHCreateStreamOnFileW: expected E_INVALIDARG, got 0x%08x\n", ret); + ok(ret == E_INVALIDARG, "SHCreateStreamOnFileW: expected E_INVALIDARG, got 0x%08lx\n", ret); ok(stream == NULL, "SHCreateStreamOnFileW: expected a NULL IStream object, got %p\n", stream);
stream = NULL; ret = SHCreateStreamOnFileW(test_file, mode | STGM_DELETEONRELEASE | stgm, &stream); - ok(ret == E_INVALIDARG, "SHCreateStreamOnFileW: expected E_INVALIDARG, got 0x%08x\n", ret); + ok(ret == E_INVALIDARG, "SHCreateStreamOnFileW: expected E_INVALIDARG, got 0x%08lx\n", ret); ok(stream == NULL, "SHCreateStreamOnFileW: expected a NULL IStream object, got %p\n", stream);
stream = NULL; ret = SHCreateStreamOnFileW(test_file, mode | STGM_TRANSACTED | stgm, &stream); - ok(ret == E_INVALIDARG, "SHCreateStreamOnFileW: expected E_INVALIDARG, got 0x%08x\n", ret); + ok(ret == E_INVALIDARG, "SHCreateStreamOnFileW: expected E_INVALIDARG, got 0x%08lx\n", ret); ok(stream == NULL, "SHCreateStreamOnFileW: expected a NULL IStream object, got %p\n", stream);
/* file does not exist */ @@ -446,12 +446,12 @@ static void test_SHCreateStreamOnFileW(DWORD mode, DWORD stgm) return; }
- ok(ret == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "SHCreateStreamOnFileW: expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got 0x%08x\n", ret); + ok(ret == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "SHCreateStreamOnFileW: expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got 0x%08lx\n", ret); ok(stream == NULL, "SHCreateStreamOnFileW: expected a NULL IStream object, got %p\n", stream);
stream = NULL; ret = SHCreateStreamOnFileW(test_file, mode | STGM_CREATE | stgm, &stream); - ok(ret == S_OK, "SHCreateStreamOnFileW: expected S_OK, got 0x%08x\n", ret); + ok(ret == S_OK, "SHCreateStreamOnFileW: expected S_OK, got 0x%08lx\n", ret); ok(stream != NULL, "SHCreateStreamOnFileW: expected a valid IStream object, got NULL\n");
if (stream) { @@ -459,7 +459,7 @@ static void test_SHCreateStreamOnFileW(DWORD mode, DWORD stgm) test_IStream_invalid_operations(stream, mode);
refcount = IStream_Release(stream); - ok(refcount == 0, "SHCreateStreamOnFileW: expected 0, got %d\n", refcount); + ok(refcount == 0, "SHCreateStreamOnFileW: expected 0, got %ld\n", refcount); }
/* NOTE: don't delete the file, as it will be used for the file exists tests. */ @@ -468,19 +468,19 @@ static void test_SHCreateStreamOnFileW(DWORD mode, DWORD stgm)
stream = NULL; ret = SHCreateStreamOnFileW(test_file, mode | STGM_FAILIFTHERE | stgm, &stream); - ok(ret == S_OK, "SHCreateStreamOnFileW: expected S_OK, got 0x%08x\n", ret); + ok(ret == S_OK, "SHCreateStreamOnFileW: expected S_OK, got 0x%08lx\n", ret); ok(stream != NULL, "SHCreateStreamOnFileW: expected a valid IStream object, got NULL\n");
if (stream) { test_IStream_invalid_operations(stream, mode);
refcount = IStream_Release(stream); - ok(refcount == 0, "SHCreateStreamOnFileW: expected 0, got %d\n", refcount); + ok(refcount == 0, "SHCreateStreamOnFileW: expected 0, got %ld\n", refcount); }
stream = NULL; ret = SHCreateStreamOnFileW(test_file, mode | STGM_CREATE | stgm, &stream); - ok(ret == S_OK, "SHCreateStreamOnFileW: expected S_OK, got 0x%08x\n", ret); + ok(ret == S_OK, "SHCreateStreamOnFileW: expected S_OK, got 0x%08lx\n", ret); ok(stream != NULL, "SHCreateStreamOnFileW: expected a valid IStream object, got NULL\n");
if (stream) { @@ -490,10 +490,10 @@ static void test_SHCreateStreamOnFileW(DWORD mode, DWORD stgm) test_IStream_invalid_operations(stream, mode);
refcount = IStream_Release(stream); - ok(refcount == 0, "SHCreateStreamOnFileW: expected 0, got %d\n", refcount); + ok(refcount == 0, "SHCreateStreamOnFileW: expected 0, got %ld\n", refcount);
delret = DeleteFileA(test_fileA); - ok(delret, "SHCreateStreamOnFileW: could not delete the test file, got error %d\n", + ok(delret, "SHCreateStreamOnFileW: could not delete the test file, got error %ld\n", GetLastError()); } } @@ -511,7 +511,7 @@ static void test_SHCreateStreamOnFileEx(DWORD mode, DWORD stgm) BOOL delret;
if (winetest_debug > 1) - trace("SHCreateStreamOnFileEx: testing mode %d, STGM flags %08x\n", mode, stgm); + trace("SHCreateStreamOnFileEx: testing mode %ld, STGM flags %08lx\n", mode, stgm);
/* Don't used a fixed path for the testEx.txt file */ GetTempPathA(MAX_PATH, test_fileA); @@ -527,7 +527,7 @@ static void test_SHCreateStreamOnFileEx(DWORD mode, DWORD stgm) ret = SHCreateStreamOnFileEx(NULL, mode, 0, FALSE, NULL, &stream); ok(ret == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) || /* XP */ ret == E_INVALIDARG /* Vista */, - "SHCreateStreamOnFileEx: expected HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) or E_INVALIDARG, got 0x%08x\n", ret); + "SHCreateStreamOnFileEx: expected HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) or E_INVALIDARG, got 0x%08lx\n", ret); ok(stream == NULL, "SHCreateStreamOnFileEx: expected a NULL IStream object, got %p\n", stream); }
@@ -541,7 +541,7 @@ static void test_SHCreateStreamOnFileEx(DWORD mode, DWORD stgm) ok( ret == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || ret == HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), "SHCreateStreamOnFileEx: expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) or " - "HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got 0x%08x\n", ret); + "HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got 0x%08lx\n", ret);
ok(stream == NULL, "SHCreateStreamOnFileEx: expected a NULL IStream object, got %p\n", stream);
@@ -549,7 +549,7 @@ static void test_SHCreateStreamOnFileEx(DWORD mode, DWORD stgm) { /* This test crashes on WinXP SP2 */ ret = SHCreateStreamOnFileEx(test_file, mode, 0, FALSE, NULL, NULL); - ok(ret == E_INVALIDARG, "SHCreateStreamOnFileEx: expected E_INVALIDARG, got 0x%08x\n", ret); + ok(ret == E_INVALIDARG, "SHCreateStreamOnFileEx: expected E_INVALIDARG, got 0x%08lx\n", ret); }
/* file does not exist */ @@ -558,7 +558,7 @@ static void test_SHCreateStreamOnFileEx(DWORD mode, DWORD stgm) ret = SHCreateStreamOnFileEx(test_file, mode | STGM_FAILIFTHERE | stgm, 0, FALSE, NULL, &stream); if ((stgm & STGM_TRANSACTED) == STGM_TRANSACTED && mode == STGM_READ) { ok(ret == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) /* XP */ || ret == E_INVALIDARG /* Vista */, - "SHCreateStreamOnFileEx: expected E_INVALIDARG or HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got 0x%08x\n", ret); + "SHCreateStreamOnFileEx: expected E_INVALIDARG or HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got 0x%08lx\n", ret);
if (ret == E_INVALIDARG) { skip("SHCreateStreamOnFileEx: STGM_TRANSACTED not supported in this configuration.\n"); @@ -568,7 +568,7 @@ static void test_SHCreateStreamOnFileEx(DWORD mode, DWORD stgm) ok( ret == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || ret == HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), "SHCreateStreamOnFileEx: expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) or " - "HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got 0x%08x\n", ret); + "HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got 0x%08lx\n", ret); } ok(stream == NULL, "SHCreateStreamOnFileEx: expected a NULL IStream object, got %p\n", stream);
@@ -581,7 +581,7 @@ static void test_SHCreateStreamOnFileEx(DWORD mode, DWORD stgm) return; }
- ok(ret == S_OK, "SHCreateStreamOnFileEx: expected S_OK, got 0x%08x\n", ret); + ok(ret == S_OK, "SHCreateStreamOnFileEx: expected S_OK, got 0x%08lx\n", ret); ok(stream != NULL, "SHCreateStreamOnFileEx: expected a valid IStream object, got NULL\n");
if (stream) { @@ -589,10 +589,10 @@ static void test_SHCreateStreamOnFileEx(DWORD mode, DWORD stgm) test_IStream_invalid_operations(stream, mode);
refcount = IStream_Release(stream); - ok(refcount == 0, "SHCreateStreamOnFileEx: expected 0, got %d\n", refcount); + ok(refcount == 0, "SHCreateStreamOnFileEx: expected 0, got %ld\n", refcount);
delret = DeleteFileA(test_fileA); - ok(delret, "SHCreateStreamOnFileEx: could not delete the test file, got error %d\n", + ok(delret, "SHCreateStreamOnFileEx: could not delete the test file, got error %ld\n", GetLastError()); }
@@ -603,17 +603,17 @@ static void test_SHCreateStreamOnFileEx(DWORD mode, DWORD stgm) Sleep(1000); ret = SHCreateStreamOnFileEx(test_file, mode | STGM_CREATE | stgm, 0, FALSE, NULL, &stream); } - ok(ret == S_OK, "SHCreateStreamOnFileEx: expected S_OK, got 0x%08x\n", ret); + ok(ret == S_OK, "SHCreateStreamOnFileEx: expected S_OK, got 0x%08lx\n", ret); ok(stream != NULL, "SHCreateStreamOnFileEx: expected a valid IStream object, got NULL\n");
if (stream) { test_IStream_invalid_operations(stream, mode);
refcount = IStream_Release(stream); - ok(refcount == 0, "SHCreateStreamOnFileEx: expected 0, got %d\n", refcount); + ok(refcount == 0, "SHCreateStreamOnFileEx: expected 0, got %ld\n", refcount);
delret = DeleteFileA(test_fileA); - ok(delret, "SHCreateStreamOnFileEx: could not delete the test file, got error %d\n", + ok(delret, "SHCreateStreamOnFileEx: could not delete the test file, got error %ld\n", GetLastError()); }
@@ -624,14 +624,14 @@ static void test_SHCreateStreamOnFileEx(DWORD mode, DWORD stgm) Sleep(1000); ret = SHCreateStreamOnFileEx(test_file, mode | STGM_CREATE | stgm, 0, TRUE, NULL, &stream); } - ok(ret == S_OK, "SHCreateStreamOnFileEx: expected S_OK, got 0x%08x\n", ret); + ok(ret == S_OK, "SHCreateStreamOnFileEx: expected S_OK, got 0x%08lx\n", ret); ok(stream != NULL, "SHCreateStreamOnFileEx: expected a valid IStream object, got NULL\n");
if (stream) { test_IStream_invalid_operations(stream, mode);
refcount = IStream_Release(stream); - ok(refcount == 0, "SHCreateStreamOnFileEx: expected 0, got %d\n", refcount); + ok(refcount == 0, "SHCreateStreamOnFileEx: expected 0, got %ld\n", refcount); }
/* NOTE: don't delete the file, as it will be used for the file exists tests. */ @@ -640,47 +640,47 @@ static void test_SHCreateStreamOnFileEx(DWORD mode, DWORD stgm)
stream = NULL; ret = SHCreateStreamOnFileEx(test_file, mode | STGM_FAILIFTHERE | stgm, 0, FALSE, NULL, &stream); - ok(ret == S_OK, "SHCreateStreamOnFileEx: expected S_OK, got 0x%08x\n", ret); + ok(ret == S_OK, "SHCreateStreamOnFileEx: expected S_OK, got 0x%08lx\n", ret); ok(stream != NULL, "SHCreateStreamOnFileEx: expected a valid IStream object, got NULL\n");
if (stream) { test_IStream_invalid_operations(stream, mode);
refcount = IStream_Release(stream); - ok(refcount == 0, "SHCreateStreamOnFileEx: expected 0, got %d\n", refcount); + ok(refcount == 0, "SHCreateStreamOnFileEx: expected 0, got %ld\n", refcount); }
stream = NULL; ret = SHCreateStreamOnFileEx(test_file, mode | STGM_FAILIFTHERE | stgm, 0, TRUE, NULL, &stream); - ok(ret == HRESULT_FROM_WIN32(ERROR_FILE_EXISTS), "SHCreateStreamOnFileEx: expected HRESULT_FROM_WIN32(ERROR_FILE_EXISTS), got 0x%08x\n", ret); + ok(ret == HRESULT_FROM_WIN32(ERROR_FILE_EXISTS), "SHCreateStreamOnFileEx: expected HRESULT_FROM_WIN32(ERROR_FILE_EXISTS), got 0x%08lx\n", ret); ok(stream == NULL, "SHCreateStreamOnFileEx: expected a NULL IStream object, got %p\n", stream);
stream = NULL; ret = SHCreateStreamOnFileEx(test_file, mode | STGM_CREATE | stgm, 0, FALSE, NULL, &stream); - ok(ret == S_OK, "SHCreateStreamOnFileEx: expected S_OK, got 0x%08x\n", ret); + ok(ret == S_OK, "SHCreateStreamOnFileEx: expected S_OK, got 0x%08lx\n", ret); ok(stream != NULL, "SHCreateStreamOnFileEx: expected a valid IStream object, got NULL\n");
if (stream) { test_IStream_invalid_operations(stream, mode);
refcount = IStream_Release(stream); - ok(refcount == 0, "SHCreateStreamOnFileEx: expected 0, got %d\n", refcount); + ok(refcount == 0, "SHCreateStreamOnFileEx: expected 0, got %ld\n", refcount); }
stream = NULL; ret = SHCreateStreamOnFileEx(test_file, mode | STGM_CREATE | stgm, 0, TRUE, NULL, &stream); - ok(ret == S_OK, "SHCreateStreamOnFileEx: expected S_OK, got 0x%08x\n", ret); + ok(ret == S_OK, "SHCreateStreamOnFileEx: expected S_OK, got 0x%08lx\n", ret); ok(stream != NULL, "SHCreateStreamOnFileEx: expected a valid IStream object, got NULL\n");
if (stream) { test_IStream_invalid_operations(stream, mode);
refcount = IStream_Release(stream); - ok(refcount == 0, "SHCreateStreamOnFileEx: expected 0, got %d\n", refcount); + ok(refcount == 0, "SHCreateStreamOnFileEx: expected 0, got %ld\n", refcount); }
delret = DeleteFileA(test_fileA); - ok(delret, "SHCreateStreamOnFileEx: could not delete the test file, got error %d\n", + ok(delret, "SHCreateStreamOnFileEx: could not delete the test file, got error %ld\n", GetLastError()); }
@@ -699,32 +699,32 @@ static void test_SHCreateStreamOnFileEx_CopyTo(void)
GetTempPathW(MAX_PATH, tmpPath); ret = GetTempFileNameW(tmpPath, prefix, 0, srcFileName); - ok(ret != 0, "GetTempFileName failed, got error %d\n", GetLastError()); + ok(ret != 0, "GetTempFileName failed, got error %ld\n", GetLastError()); ret = GetTempFileNameW(tmpPath, prefix, 0, dstFileName); - ok(ret != 0, "GetTempFileName failed, got error %d\n", GetLastError()); + ok(ret != 0, "GetTempFileName failed, got error %ld\n", GetLastError());
ret = SHCreateStreamOnFileEx(srcFileName, STGM_CREATE | STGM_READWRITE | STGM_DELETEONRELEASE, FILE_ATTRIBUTE_TEMPORARY, FALSE, NULL, &src); - ok(SUCCEEDED(ret), "SHCreateStreamOnFileEx failed with ret=0x%08x\n", ret); + ok(SUCCEEDED(ret), "SHCreateStreamOnFileEx failed with ret=0x%08lx\n", ret);
written.QuadPart = 0; ret = IStream_Write(src, srcContents, sizeof(srcContents), &U(written).LowPart); - ok(SUCCEEDED(ret), "ISequentialStream_Write failed with ret=0x%08x\n", ret); + ok(SUCCEEDED(ret), "ISequentialStream_Write failed with ret=0x%08lx\n", ret);
distance.QuadPart = 0; ret = IStream_Seek(src, distance, STREAM_SEEK_SET, &written); - ok(SUCCEEDED(ret), "ISequentialStream_Seek failed with ret=0x%08x\n", ret); + ok(SUCCEEDED(ret), "ISequentialStream_Seek failed with ret=0x%08lx\n", ret);
ret = SHCreateStreamOnFileEx(dstFileName, STGM_CREATE | STGM_READWRITE | STGM_DELETEONRELEASE, FILE_ATTRIBUTE_TEMPORARY, FALSE, NULL, &dst); - ok(SUCCEEDED(ret), "SHCreateStreamOnFileEx failed with ret=0x%08x\n", ret); + ok(SUCCEEDED(ret), "SHCreateStreamOnFileEx failed with ret=0x%08lx\n", ret);
/* Test using a count larger than the source file, so that the Read operation will fall short */ count.QuadPart = 2;
ret = IStream_CopyTo(src, dst, count, &read, &written); - ok(SUCCEEDED(ret), "CopyTo failed with ret=0x%08x\n", ret); + ok(SUCCEEDED(ret), "CopyTo failed with ret=0x%08lx\n", ret);
- ok(read.QuadPart == 1, "read does not match size: %d != 1\n", U(read).LowPart); - ok(written.QuadPart == 1, "written does not match size: %d != 1\n", U(written).LowPart); + ok(read.QuadPart == 1, "read does not match size: %ld != 1\n", U(read).LowPart); + ok(written.QuadPart == 1, "written does not match size: %ld != 1\n", U(written).LowPart);
IStream_Release(dst); IStream_Release(src); @@ -754,64 +754,64 @@ static void test_SHCreateMemStream(void) ok(stream != NULL, "Failed to create a stream.\n");
hr = IStream_QueryInterface(stream, &IID_ISequentialStream, (void **)&unk); - ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* WinXP */, "Failed to QI, hr %#x.\n", hr); + ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* WinXP */, "Failed to QI, hr %#lx.\n", hr); if (unk) IUnknown_Release(unk);
num = ~0; hr = IStream_Read(stream, buff, sizeof(buff), &num); - ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr); - ok(num == 0, "expected 0, got 0x%08x\n", num); + ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr); + ok(num == 0, "expected 0, got 0x%08lx\n", num);
num = ~0; memset(buff, 0x55, sizeof(buff)); hr = IStream_Write(stream, buff, sizeof(buff), &num); - ok(hr == S_OK, "Failed to write, hr %#x.\n", hr); - ok(num == sizeof(buff), "expected %u, got %u\n", sizeof(buff), num); + ok(hr == S_OK, "Failed to write, hr %#lx.\n", hr); + ok(num == sizeof(buff), "expected %Iu, got %lu\n", sizeof(buff), num);
off.QuadPart = 0; hr = IStream_Seek(stream, off, STREAM_SEEK_SET, NULL); - ok(hr == S_OK, "Failed to seek, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to seek, hr %#lx.\n", hr);
num = ~0; memset(buff, 0, sizeof(buff)); hr = IStream_Read(stream, buff, sizeof(buff), &num); - ok(hr == S_OK, "Failed to read, hr %#x.\n", hr); - ok(num == sizeof(buff), "expected %u, got %u\n", sizeof(buff), num); + ok(hr == S_OK, "Failed to read, hr %#lx.\n", hr); + ok(num == sizeof(buff), "expected %Iu, got %lu\n", sizeof(buff), num); for (i = 0; i < ARRAY_SIZE(buff); i++) - ok(buff[i] == 0x55, "expected 0x55, got 0x%02x at %u\n", buff[i], i); + ok(buff[i] == 0x55, "expected 0x55, got 0x%02x at %lu\n", buff[i], i);
num = ~0; hr = IStream_Read(stream, buff, sizeof(buff), &num); - ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr); - ok(num == 0, "expected 0, got 0x%08x\n", num); + ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr); + ok(num == 0, "expected 0, got 0x%08lx\n", num);
num = ~0; memset(buff, 0x11, sizeof(buff)); hr = IStream_Write(stream, buff, sizeof(buff), &num); - ok(hr == S_OK, "Failed to write, hr %#x.\n", hr); - ok(num == sizeof(buff), "expected %u, got %u\n", sizeof(buff), num); + ok(hr == S_OK, "Failed to write, hr %#lx.\n", hr); + ok(num == sizeof(buff), "expected %Iu, got %lu\n", sizeof(buff), num);
off.QuadPart = -sizeof(buff); hr = IStream_Seek(stream, off, STREAM_SEEK_CUR, NULL); - ok(hr == S_OK, "Failed to seek, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to seek, hr %#lx.\n", hr);
num = ~0; memset(buff, 0, sizeof(buff)); hr = IStream_Read(stream, buff, sizeof(buff), &num); - ok(hr == S_OK, "Failed to read, hr %#x.\n", hr); - ok(num == sizeof(buff), "expected %u, got %u\n", sizeof(buff), num); + ok(hr == S_OK, "Failed to read, hr %#lx.\n", hr); + ok(num == sizeof(buff), "expected %Iu, got %lu\n", sizeof(buff), num); for (i = 0; i < ARRAY_SIZE(buff); i++) - ok(buff[i] == 0x11, "expected 0x11, got 0x%02x at %u\n", buff[i], i); + ok(buff[i] == 0x11, "expected 0x11, got 0x%02x at %lu\n", buff[i], i);
num = ~0; hr = IStream_Read(stream, buff, sizeof(buff), &num); - ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr); - ok(num == 0, "expected 0, got 0x%08x\n", num); + ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr); + ok(num == 0, "expected 0, got 0x%08lx\n", num);
hr = IStream_Clone(stream, &stream2); todo_wine - ok(hr == S_OK || broken(hr == E_NOTIMPL) /* < Win8 */, "Failed to clone a stream, hr %#x.\n", hr); + ok(hr == S_OK || broken(hr == E_NOTIMPL) /* < Win8 */, "Failed to clone a stream, hr %#lx.\n", hr); if (hr == S_OK) IStream_Release(stream2);
diff --git a/dlls/shlwapi/tests/ordinal.c b/dlls/shlwapi/tests/ordinal.c index bac91c4c9d8..603a2ac2a76 100644 --- a/dlls/shlwapi/tests/ordinal.c +++ b/dlls/shlwapi/tests/ordinal.c @@ -197,7 +197,7 @@ static void test_GetAcceptLanguagesA(void) /* Get the original Value */ lres = RegOpenKeyA(HKEY_CURRENT_USER, ie_international, &hroot); if (lres) { - skip("RegOpenKey(%s) failed: %d\n", ie_international, lres); + skip("RegOpenKey(%s) failed: %ld\n", ie_international, lres); return; } len = sizeof(original); @@ -230,7 +230,7 @@ static void test_GetAcceptLanguagesA(void) hr = pGetAcceptLanguagesA( buffer, &len);
if (hr != S_OK) { - win_skip("GetAcceptLanguagesA failed with 0x%x\n", hr); + win_skip("GetAcceptLanguagesA failed with 0x%lx\n", hr); goto restore_original; }
@@ -238,7 +238,7 @@ static void test_GetAcceptLanguagesA(void) /* some windows versions use "lang" or "lang-country" as default */ language[0] = 0; hr = LcidToRfc1766A(lcid, language, sizeof(language)); - ok(hr == S_OK, "LcidToRfc1766A returned 0x%x and %s\n", hr, language); + ok(hr == S_OK, "LcidToRfc1766A returned 0x%lx and %s\n", hr, language); }
ok(!lstrcmpA(buffer, language), @@ -255,7 +255,7 @@ static void test_GetAcceptLanguagesA(void) exactsize = lstrlenA(entry);
lres = RegSetValueExA(hroot, acceptlanguage, 0, REG_SZ, (const BYTE *) entry, exactsize + 1); - ok(!lres, "got %d for RegSetValueExA: %s\n", lres, entry); + ok(!lres, "got %ld for RegSetValueExA: %s\n", lres, entry);
/* len includes space for the terminating 0 before vista/w2k8 */ len = exactsize + 2; @@ -266,7 +266,7 @@ static void test_GetAcceptLanguagesA(void) (SUCCEEDED(hr) && ((len == exactsize) || (len == exactsize+1)) && !lstrcmpA(buffer, entry)), - "+2_#%d: got 0x%x with %d and %s\n", i, hr, len, buffer); + "+2_#%d: got 0x%lx with %ld and %s\n", i, hr, len, buffer);
len = exactsize + 1; memset(buffer, '#', maxlen); @@ -276,7 +276,7 @@ static void test_GetAcceptLanguagesA(void) (SUCCEEDED(hr) && ((len == exactsize) || (len == exactsize+1)) && !lstrcmpA(buffer, entry)), - "+1_#%d: got 0x%x with %d and %s\n", i, hr, len, buffer); + "+1_#%d: got 0x%lx with %ld and %s\n", i, hr, len, buffer);
len = exactsize; memset(buffer, '#', maxlen); @@ -296,7 +296,7 @@ static void test_GetAcceptLanguagesA(void) ((hr == S_OK) && !memcmp(buffer, language, len)) || ((hr == E_NOT_SUFFICIENT_BUFFER) && !len) || ((hr == __HRESULT_FROM_WIN32(ERROR_MORE_DATA)) && len == exactsize)), - "==_#%d: got 0x%x with %d and %s\n", i, hr, len, buffer); + "==_#%d: got 0x%lx with %ld and %s\n", i, hr, len, buffer);
if (exactsize > 1) { len = exactsize - 1; @@ -308,7 +308,7 @@ static void test_GetAcceptLanguagesA(void) ((hr == S_OK) && !memcmp(buffer, language, len)) || ((hr == E_NOT_SUFFICIENT_BUFFER) && !len) || ((hr == __HRESULT_FROM_WIN32(ERROR_MORE_DATA)) && len == exactsize - 1)), - "-1_#%d: got 0x%x with %d and %s\n", i, hr, len, buffer); + "-1_#%d: got 0x%lx with %ld and %s\n", i, hr, len, buffer); }
len = 1; @@ -320,7 +320,7 @@ static void test_GetAcceptLanguagesA(void) ((hr == S_OK) && !memcmp(buffer, language, len)) || ((hr == E_NOT_SUFFICIENT_BUFFER) && !len) || ((hr == __HRESULT_FROM_WIN32(ERROR_MORE_DATA)) && len == 1)), - "=1_#%d: got 0x%x with %d and %s\n", i, hr, len, buffer); + "=1_#%d: got 0x%lx with %ld and %s\n", i, hr, len, buffer);
len = maxlen; hr = pGetAcceptLanguagesA( NULL, &len); @@ -329,7 +329,7 @@ static void test_GetAcceptLanguagesA(void) since w2k8: S_OK and needed size (excluding 0), win8 S_OK and size including 0. */ ok( ((hr == S_OK) && ((len == exactsize) || (len == exactsize + 1))) || ((hr == E_FAIL) && (len == maxlen)), - "NULL,max #%d: got 0x%x with %d and %s\n", i, hr, len, buffer); + "NULL,max #%d: got 0x%lx with %ld and %s\n", i, hr, len, buffer);
i++; } @@ -342,7 +342,7 @@ static void test_GetAcceptLanguagesA(void) buffer[maxlen] = 0; hr = pGetAcceptLanguagesA( buffer, &len); ok( ((hr == S_OK) && (len == lstrlenA(language))), - "max: got 0x%x with %d and %s (expected S_OK with %d and '%s'\n", + "max: got 0x%lx with %ld and %s (expected S_OK with %d and '%s'\n", hr, len, buffer, lstrlenA(language), language);
len = 2; @@ -352,7 +352,7 @@ static void test_GetAcceptLanguagesA(void) ok( (((hr == S_OK) || (hr == E_INVALIDARG)) && !memcmp(buffer, language, len)) || ((hr == E_NOT_SUFFICIENT_BUFFER) && !len) || ((hr == __HRESULT_FROM_WIN32(ERROR_CANNOT_COPY)) && !len), - "=2: got 0x%x with %d and %s\n", hr, len, buffer); + "=2: got 0x%lx with %ld and %s\n", hr, len, buffer);
len = 1; memset(buffer, '#', maxlen); @@ -365,7 +365,7 @@ static void test_GetAcceptLanguagesA(void) ok( (((hr == S_OK) || (hr == E_INVALIDARG)) && !memcmp(buffer, language, len)) || ((hr == E_NOT_SUFFICIENT_BUFFER) && !len) || ((hr == __HRESULT_FROM_WIN32(ERROR_CANNOT_COPY)) && !len), - "=1: got 0x%x with %d and %s\n", hr, len, buffer); + "=1: got 0x%lx with %ld and %s\n", hr, len, buffer);
len = 0; memset(buffer, '#', maxlen); @@ -373,26 +373,26 @@ static void test_GetAcceptLanguagesA(void) hr = pGetAcceptLanguagesA( buffer, &len); /* w2k3 and below: E_FAIL, since w2k8: E_INVALIDARG, win8 ERROR_CANNOT_COPY */ ok((hr == E_FAIL) || (hr == E_INVALIDARG) || (hr == __HRESULT_FROM_WIN32(ERROR_CANNOT_COPY)), - "got 0x%x\n", hr); + "got 0x%lx\n", hr);
memset(buffer, '#', maxlen); buffer[maxlen] = 0; hr = pGetAcceptLanguagesA( buffer, NULL); /* w2k3 and below: E_FAIL, since w2k8: E_INVALIDARG */ ok((hr == E_FAIL) || (hr == E_INVALIDARG), - "got 0x%x (expected E_FAIL or E_INVALIDARG)\n", hr); + "got 0x%lx (expected E_FAIL or E_INVALIDARG)\n", hr);
hr = pGetAcceptLanguagesA( NULL, NULL); /* w2k3 and below: E_FAIL, since w2k8: E_INVALIDARG */ ok((hr == E_FAIL) || (hr == E_INVALIDARG), - "got 0x%x (expected E_FAIL or E_INVALIDARG)\n", hr); + "got 0x%lx (expected E_FAIL or E_INVALIDARG)\n", hr);
restore_original: if (!res_query) { len = lstrlenA(original); lres = RegSetValueExA(hroot, acceptlanguage, 0, REG_SZ, (const BYTE *) original, len ? len + 1: 0); - ok(!lres, "RegSetValueEx(%s) failed: %d\n", original, lres); + ok(!lres, "RegSetValueEx(%s) failed: %ld\n", original, lres); } else { @@ -460,25 +460,25 @@ static void test_alloc_shared(int argc, char **argv)
procid=GetCurrentProcessId(); hmem=pSHAllocShared(NULL,10,procid); - ok(hmem!=NULL,"SHAllocShared(NULL...) failed: %u\n", GetLastError()); + ok(hmem!=NULL,"SHAllocShared(NULL...) failed: %lu\n", GetLastError()); ret = pSHFreeShared(hmem, procid); - ok( ret, "SHFreeShared failed: %u\n", GetLastError()); + ok( ret, "SHFreeShared failed: %lu\n", GetLastError());
val.value = 0x12345678; val.handle = 0; hmem = pSHAllocShared(&val, sizeof(val), procid); - ok(hmem!=NULL,"SHAllocShared(NULL...) failed: %u\n", GetLastError()); + ok(hmem!=NULL,"SHAllocShared(NULL...) failed: %lu\n", GetLastError());
p=pSHLockShared(hmem,procid); - ok(p!=NULL,"SHLockShared failed: %u\n", GetLastError()); + ok(p!=NULL,"SHLockShared failed: %lu\n", GetLastError()); if (p!=NULL) - ok(p->value == 0x12345678, "Wrong value in shared memory: %d instead of %d\n", p->value, 0x12345678); + ok(p->value == 0x12345678, "Wrong value in shared memory: %ld instead of %d\n", p->value, 0x12345678); ret = pSHUnlockShared(p); - ok( ret, "SHUnlockShared failed: %u\n", GetLastError()); + ok( ret, "SHUnlockShared failed: %lu\n", GetLastError());
- sprintf(cmdline, "%s %s %d %p", argv[0], argv[1], procid, hmem); + sprintf(cmdline, "%s %s %ld %p", argv[0], argv[1], procid, hmem); ret = CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret, "could not create child process error: %u\n", GetLastError()); + ok(ret, "could not create child process error: %lu\n", GetLastError()); if (ret) { wait_child_process(pi.hProcess); @@ -486,37 +486,37 @@ static void test_alloc_shared(int argc, char **argv) CloseHandle(pi.hProcess);
p = pSHLockShared(hmem, procid); - ok(p != NULL,"SHLockShared failed: %u\n", GetLastError()); + ok(p != NULL,"SHLockShared failed: %lu\n", GetLastError()); if (p != NULL && p->value != 0x12345678) { - ok(p->value == 0x12345679, "Wrong value in shared memory: %d instead of %d\n", p->value, 0x12345679); + ok(p->value == 0x12345679, "Wrong value in shared memory: %ld instead of %d\n", p->value, 0x12345679); hmem2 = p->handle; ok(hmem2 != NULL, "Expected handle in shared memory\n"); } ret = pSHUnlockShared(p); - ok(ret, "SHUnlockShared failed: %u\n", GetLastError()); + ok(ret, "SHUnlockShared failed: %lu\n", GetLastError()); }
ret = pSHFreeShared(hmem, procid); - ok( ret, "SHFreeShared failed: %u\n", GetLastError()); + ok( ret, "SHFreeShared failed: %lu\n", GetLastError());
if (hmem2) { p = pSHLockShared(hmem2, procid); - ok(p != NULL,"SHLockShared failed: %u\n", GetLastError()); + ok(p != NULL,"SHLockShared failed: %lu\n", GetLastError()); if (p != NULL) - ok(p->value == 0xDEADBEEF, "Wrong value in shared memory: %d instead of %d\n", p->value, 0xDEADBEEF); + ok(p->value == 0xDEADBEEF, "Wrong value in shared memory: %ld instead of %d\n", p->value, 0xDEADBEEF); ret = pSHUnlockShared(p); - ok(ret, "SHUnlockShared failed: %u\n", GetLastError()); + ok(ret, "SHUnlockShared failed: %lu\n", GetLastError());
ret = pSHFreeShared(hmem2, procid); - ok(ret, "SHFreeShared failed: %u\n", GetLastError()); + ok(ret, "SHFreeShared failed: %lu\n", GetLastError()); }
SetLastError(0xdeadbeef); ret = pSHFreeShared(NULL, procid); - ok(ret, "SHFreeShared failed: %u\n", GetLastError()); - ok(GetLastError() == 0xdeadbeef, "last error should not have changed, got %u\n", GetLastError()); + ok(ret, "SHFreeShared failed: %lu\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "last error should not have changed, got %lu\n", GetLastError()); }
static void test_alloc_shared_remote(DWORD procid, HANDLE hmem) @@ -527,36 +527,36 @@ static void test_alloc_shared_remote(DWORD procid, HANDLE hmem)
/* test directly accessing shared memory of a remote process */ p = pSHLockShared(hmem, procid); - ok(p != NULL || broken(p == NULL) /* Windows 7/8 */, "SHLockShared failed: %u\n", GetLastError()); + ok(p != NULL || broken(p == NULL) /* Windows 7/8 */, "SHLockShared failed: %lu\n", GetLastError()); if (p == NULL) { win_skip("Subprocess failed to modify shared memory, skipping test\n"); return; }
- ok(p->value == 0x12345678, "Wrong value in shared memory: %d instead of %d\n", p->value, 0x12345678); + ok(p->value == 0x12345678, "Wrong value in shared memory: %ld instead of %d\n", p->value, 0x12345678); p->value++;
val.value = 0xDEADBEEF; val.handle = 0; p->handle = pSHAllocShared(&val, sizeof(val), procid); - ok(p->handle != NULL, "SHAllocShared failed: %u\n", GetLastError()); + ok(p->handle != NULL, "SHAllocShared failed: %lu\n", GetLastError());
ret = pSHUnlockShared(p); - ok(ret, "SHUnlockShared failed: %u\n", GetLastError()); + ok(ret, "SHUnlockShared failed: %lu\n", GetLastError());
/* test SHMapHandle */ SetLastError(0xdeadbeef); hmem2 = pSHMapHandle(NULL, procid, GetCurrentProcessId(), 0, 0); ok(hmem2 == NULL, "expected NULL, got new handle\n"); - ok(GetLastError() == 0xdeadbeef, "last error should not have changed, got %u\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "last error should not have changed, got %lu\n", GetLastError());
hmem2 = pSHMapHandle(hmem, procid, GetCurrentProcessId(), 0, 0);
/* It seems like Windows Vista/2008 uses a different internal implementation * for shared memory, and calling SHMapHandle fails. */ ok(hmem2 != NULL || broken(hmem2 == NULL), - "SHMapHandle failed: %u\n", GetLastError()); + "SHMapHandle failed: %lu\n", GetLastError()); if (hmem2 == NULL) { win_skip("Subprocess failed to map shared memory, skipping test\n"); @@ -564,16 +564,16 @@ static void test_alloc_shared_remote(DWORD procid, HANDLE hmem) }
p = pSHLockShared(hmem2, GetCurrentProcessId()); - ok(p != NULL, "SHLockShared failed: %u\n", GetLastError()); + ok(p != NULL, "SHLockShared failed: %lu\n", GetLastError());
if (p != NULL) - ok(p->value == 0x12345679, "Wrong value in shared memory: %d instead of %d\n", p->value, 0x12345679); + ok(p->value == 0x12345679, "Wrong value in shared memory: %ld instead of %d\n", p->value, 0x12345679);
ret = pSHUnlockShared(p); - ok(ret, "SHUnlockShared failed: %u\n", GetLastError()); + ok(ret, "SHUnlockShared failed: %lu\n", GetLastError());
ret = pSHFreeShared(hmem2, GetCurrentProcessId()); - ok(ret, "SHFreeShared failed: %u\n", GetLastError()); + ok(ret, "SHFreeShared failed: %lu\n", GetLastError()); }
static void test_fdsa(void) @@ -608,52 +608,52 @@ static void test_fdsa(void) memset(&info, 0, sizeof(info));
ok(pFDSA_Initialize(block_size, inc, &info, mem, init_blocks), "FDSA_Initialize rets FALSE\n"); - ok(info.num_items == 0, "num_items = %d\n", info.num_items); + ok(info.num_items == 0, "num_items = %ld\n", info.num_items); ok(info.mem == mem, "mem = %p\n", info.mem); - ok(info.blocks_alloced == init_blocks, "blocks_alloced = %d\n", info.blocks_alloced); + ok(info.blocks_alloced == init_blocks, "blocks_alloced = %ld\n", info.blocks_alloced); ok(info.inc == inc, "inc = %d\n", info.inc); ok(info.block_size == block_size, "block_size = %d\n", info.block_size); ok(info.flags == 0, "flags = %d\n", info.flags);
ret = pFDSA_InsertItem(&info, 1234, "1234567890"); - ok(ret == 0, "ret = %d\n", ret); - ok(info.num_items == 1, "num_items = %d\n", info.num_items); + ok(ret == 0, "ret = %ld\n", ret); + ok(info.num_items == 1, "num_items = %ld\n", info.num_items); ok(info.mem == mem, "mem = %p\n", info.mem); - ok(info.blocks_alloced == init_blocks, "blocks_alloced = %d\n", info.blocks_alloced); + ok(info.blocks_alloced == init_blocks, "blocks_alloced = %ld\n", info.blocks_alloced); ok(info.inc == inc, "inc = %d\n", info.inc); ok(info.block_size == block_size, "block_size = %d\n", info.block_size); ok(info.flags == 0, "flags = %d\n", info.flags);
ret = pFDSA_InsertItem(&info, 1234, "abcdefghij"); - ok(ret == 1, "ret = %d\n", ret); + ok(ret == 1, "ret = %ld\n", ret);
ret = pFDSA_InsertItem(&info, 1, "klmnopqrst"); - ok(ret == 1, "ret = %d\n", ret); + ok(ret == 1, "ret = %ld\n", ret);
ret = pFDSA_InsertItem(&info, 0, "uvwxyzABCD"); - ok(ret == 0, "ret = %d\n", ret); + ok(ret == 0, "ret = %ld\n", ret); ok(info.mem == mem, "mem = %p\n", info.mem); ok(info.flags == 0, "flags = %d\n", info.flags);
/* This next InsertItem will cause shlwapi to allocate its own mem buffer */ ret = pFDSA_InsertItem(&info, 0, "EFGHIJKLMN"); - ok(ret == 0, "ret = %d\n", ret); + ok(ret == 0, "ret = %ld\n", ret); ok(info.mem != mem, "mem = %p\n", info.mem); - ok(info.blocks_alloced == init_blocks + inc, "blocks_alloced = %d\n", info.blocks_alloced); + ok(info.blocks_alloced == init_blocks + inc, "blocks_alloced = %ld\n", info.blocks_alloced); ok(info.flags == 0x1, "flags = %d\n", info.flags);
ok(!memcmp(info.mem, "EFGHIJKLMNuvwxyzABCD1234567890klmnopqrstabcdefghij", 50), "mem %s\n", (char*)info.mem);
ok(pFDSA_DeleteItem(&info, 2), "rets FALSE\n"); ok(info.mem != mem, "mem = %p\n", info.mem); - ok(info.blocks_alloced == init_blocks + inc, "blocks_alloced = %d\n", info.blocks_alloced); + ok(info.blocks_alloced == init_blocks + inc, "blocks_alloced = %ld\n", info.blocks_alloced); ok(info.flags == 0x1, "flags = %d\n", info.flags);
ok(!memcmp(info.mem, "EFGHIJKLMNuvwxyzABCDklmnopqrstabcdefghij", 40), "mem %s\n", (char*)info.mem);
ok(pFDSA_DeleteItem(&info, 3), "rets FALSE\n"); ok(info.mem != mem, "mem = %p\n", info.mem); - ok(info.blocks_alloced == init_blocks + inc, "blocks_alloced = %d\n", info.blocks_alloced); + ok(info.blocks_alloced == init_blocks + inc, "blocks_alloced = %ld\n", info.blocks_alloced); ok(info.flags == 0x1, "flags = %d\n", info.flags);
ok(!memcmp(info.mem, "EFGHIJKLMNuvwxyzABCDklmnopqrst", 30), "mem %s\n", (char*)info.mem); @@ -716,11 +716,11 @@ static void test_GetShellSecurityDescriptor(void) ok(IsValidSecurityDescriptor(psd), "returned value is not valid SD\n");
ret = GetSecurityDescriptorControl(psd, &control, &dwRev); - ok(ret, "GetSecurityDescriptorControl failed with error %u\n", GetLastError()); + ok(ret, "GetSecurityDescriptorControl failed with error %lu\n", GetLastError()); ok(0 == (control & SE_SELF_RELATIVE), "SD should be absolute\n");
ret = GetSecurityDescriptorDacl(psd, &bHasDacl, &pAcl, &bDefaulted); - ok(ret, "GetSecurityDescriptorDacl failed with error %u\n", GetLastError()); + ok(ret, "GetSecurityDescriptorDacl failed with error %lu\n", GetLastError());
ok(bHasDacl, "SD has no DACL\n"); if (bHasDacl) @@ -735,36 +735,36 @@ static void test_GetShellSecurityDescriptor(void) ok(IsValidAcl(pAcl), "DACL is not valid\n");
ret = GetAclInformation(pAcl, &asiSize, sizeof(asiSize), AclSizeInformation); - ok(ret, "GetAclInformation failed with error %u\n", GetLastError()); + ok(ret, "GetAclInformation failed with error %lu\n", GetLastError());
- ok(asiSize.AceCount == 3, "Incorrect number of ACEs: %d entries\n", asiSize.AceCount); + ok(asiSize.AceCount == 3, "Incorrect number of ACEs: %ld entries\n", asiSize.AceCount); if (asiSize.AceCount == 3) { ACCESS_ALLOWED_ACE *paaa; /* will use for DENIED too */
ret = GetAce(pAcl, 0, (LPVOID*)&paaa); - ok(ret, "GetAce failed with error %u\n", GetLastError()); + ok(ret, "GetAce failed with error %lu\n", GetLastError()); ok(paaa->Header.AceType == ACCESS_ALLOWED_ACE_TYPE, "Invalid ACE type %d\n", paaa->Header.AceType); ok(paaa->Header.AceFlags == 0, "Invalid ACE flags %x\n", paaa->Header.AceFlags); - ok(paaa->Mask == GENERIC_ALL, "Invalid ACE mask %x\n", paaa->Mask); + ok(paaa->Mask == GENERIC_ALL, "Invalid ACE mask %lx\n", paaa->Mask);
ret = GetAce(pAcl, 1, (LPVOID*)&paaa); - ok(ret, "GetAce failed with error %u\n", GetLastError()); + ok(ret, "GetAce failed with error %lu\n", GetLastError()); ok(paaa->Header.AceType == ACCESS_DENIED_ACE_TYPE, "Invalid ACE type %d\n", paaa->Header.AceType); /* first one of two ACEs generated from inheritable entry - without inheritance */ ok(paaa->Header.AceFlags == 0, "Invalid ACE flags %x\n", paaa->Header.AceFlags); - ok(paaa->Mask == GENERIC_WRITE, "Invalid ACE mask %x\n", paaa->Mask); + ok(paaa->Mask == GENERIC_WRITE, "Invalid ACE mask %lx\n", paaa->Mask);
ret = GetAce(pAcl, 2, (LPVOID*)&paaa); - ok(ret, "GetAce failed with error %u\n", GetLastError()); + ok(ret, "GetAce failed with error %lu\n", GetLastError()); ok(paaa->Header.AceType == ACCESS_DENIED_ACE_TYPE, "Invalid ACE type %d\n", paaa->Header.AceType); /* second ACE - with inheritance */ ok(paaa->Header.AceFlags == MY_INHERITANCE, "Invalid ACE flags %x\n", paaa->Header.AceFlags); - ok(paaa->Mask == GENERIC_READ, "Invalid ACE mask %x\n", paaa->Mask); + ok(paaa->Mask == GENERIC_READ, "Invalid ACE mask %lx\n", paaa->Mask); } } } @@ -782,17 +782,17 @@ static void test_SHPackDispParams(void) memset(¶ms, 0xc0, sizeof(params)); memset(vars, 0xc0, sizeof(vars)); hres = pSHPackDispParams(¶ms, vars, 1, VT_I4, 0xdeadbeef); - ok(hres == S_OK, "SHPackDispParams failed: %08x\n", hres); + ok(hres == S_OK, "SHPackDispParams failed: %08lx\n", hres); ok(params.cArgs == 1, "params.cArgs = %d\n", params.cArgs); ok(params.cNamedArgs == 0, "params.cNamedArgs = %d\n", params.cArgs); ok(params.rgdispidNamedArgs == NULL, "params.rgdispidNamedArgs = %p\n", params.rgdispidNamedArgs); ok(params.rgvarg == vars, "params.rgvarg = %p\n", params.rgvarg); ok(V_VT(vars) == VT_I4, "V_VT(var) = %d\n", V_VT(vars)); - ok(V_I4(vars) == 0xdeadbeef, "failed %x\n", V_I4(vars)); + ok(V_I4(vars) == 0xdeadbeef, "failed %lx\n", V_I4(vars));
memset(¶ms, 0xc0, sizeof(params)); hres = pSHPackDispParams(¶ms, NULL, 0, 0); - ok(hres == S_OK, "SHPackDispParams failed: %08x\n", hres); + ok(hres == S_OK, "SHPackDispParams failed: %08lx\n", hres); ok(params.cArgs == 0, "params.cArgs = %d\n", params.cArgs); ok(params.cNamedArgs == 0, "params.cNamedArgs = %d\n", params.cArgs); ok(params.rgdispidNamedArgs == NULL, "params.rgdispidNamedArgs = %p\n", params.rgdispidNamedArgs); @@ -802,17 +802,17 @@ static void test_SHPackDispParams(void) memset(¶ms, 0xc0, sizeof(params)); hres = pSHPackDispParams(¶ms, vars, 4, VT_BSTR, (void*)0xdeadbeef, VT_EMPTY, 10, VT_I4, 100, VT_DISPATCH, (void*)0xdeadbeef); - ok(hres == S_OK, "SHPackDispParams failed: %08x\n", hres); + ok(hres == S_OK, "SHPackDispParams failed: %08lx\n", hres); ok(params.cArgs == 4, "params.cArgs = %d\n", params.cArgs); ok(params.cNamedArgs == 0, "params.cNamedArgs = %d\n", params.cArgs); ok(params.rgdispidNamedArgs == NULL, "params.rgdispidNamedArgs = %p\n", params.rgdispidNamedArgs); ok(params.rgvarg == vars, "params.rgvarg = %p\n", params.rgvarg); ok(V_VT(vars) == VT_DISPATCH, "V_VT(vars[0]) = %x\n", V_VT(vars)); - ok(V_I4(vars) == 0xdeadbeef, "V_I4(vars[0]) = %x\n", V_I4(vars)); + ok(V_I4(vars) == 0xdeadbeef, "V_I4(vars[0]) = %lx\n", V_I4(vars)); ok(V_VT(vars+1) == VT_I4, "V_VT(vars[1]) = %d\n", V_VT(vars+1)); - ok(V_I4(vars+1) == 100, "V_I4(vars[1]) = %x\n", V_I4(vars+1)); + ok(V_I4(vars+1) == 100, "V_I4(vars[1]) = %lx\n", V_I4(vars+1)); ok(V_VT(vars+2) == VT_I4, "V_VT(vars[2]) = %d\n", V_VT(vars+2)); - ok(V_I4(vars+2) == 10, "V_I4(vars[2]) = %x\n", V_I4(vars+2)); + ok(V_I4(vars+2) == 10, "V_I4(vars[2]) = %lx\n", V_I4(vars+2)); ok(V_VT(vars+3) == VT_BSTR, "V_VT(vars[3]) = %d\n", V_VT(vars+3)); ok(V_BSTR(vars+3) == (void*)0xdeadbeef, "V_BSTR(vars[3]) = %p\n", V_BSTR(vars+3)); } @@ -964,13 +964,13 @@ static HRESULT WINAPI Disp_Invoke( EXCEPINFO *pExcepInfo, UINT *puArgErr) { - trace("%p %x %s %x %x %p %p %p %p\n", This, dispIdMember, wine_dbgstr_guid(riid), lcid, wFlags, + trace("%p %lx %s %lx %x %p %p %p %p\n", This, dispIdMember, wine_dbgstr_guid(riid), lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
ok(dispIdMember == 0xa0 || dispIdMember == 0xa1, "Unknown dispIdMember\n"); ok(pDispParams != NULL, "Invoked with NULL pDispParams\n"); ok(wFlags == DISPATCH_METHOD, "Wrong flags %x\n",wFlags); - ok(lcid == 0,"Wrong lcid %x\n",lcid); + ok(lcid == 0,"Wrong lcid %lx\n",lcid); if (dispIdMember == 0xa0) { ok(pDispParams->cArgs == 0, "params.cArgs = %d\n", pDispParams->cArgs); @@ -986,7 +986,7 @@ static HRESULT WINAPI Disp_Invoke( ok(V_VT(pDispParams->rgvarg) == VT_BSTR, "V_VT(var) = %d\n", V_VT(pDispParams->rgvarg)); ok(V_I4(pDispParams->rgvarg) == 0xdeadcafe , "failed %p\n", V_BSTR(pDispParams->rgvarg)); ok(V_VT(pDispParams->rgvarg+1) == VT_I4, "V_VT(var) = %d\n", V_VT(pDispParams->rgvarg+1)); - ok(V_I4(pDispParams->rgvarg+1) == 0xdeadbeef, "failed %x\n", V_I4(pDispParams->rgvarg+1)); + ok(V_I4(pDispParams->rgvarg+1) == 0xdeadbeef, "failed %lx\n", V_I4(pDispParams->rgvarg+1)); }
return ERROR_SUCCESS; @@ -1461,32 +1461,32 @@ static void test_IConnectionPoint(void)
rc = pConnectToConnectionPoint((IUnknown*)&dispatch->IDispatch_iface, &IID_NULL, TRUE, (IUnknown*)&container->IConnectionPointContainer_iface, &cookie, &point); - ok(rc == S_OK, "pConnectToConnectionPoint failed with %x\n",rc); + ok(rc == S_OK, "pConnectToConnectionPoint failed with %lx\n",rc); ok(point != NULL, "returned ConnectionPoint is NULL\n"); ok(cookie != 0xffffffff, "invalid cookie returned\n");
rc = pIConnectionPoint_SimpleInvoke(point,0xa0,NULL); - ok(rc == S_OK, "pConnectToConnectionPoint failed with %x\n",rc); + ok(rc == S_OK, "pConnectToConnectionPoint failed with %lx\n",rc);
memset(¶ms, 0xc0, sizeof(params)); memset(vars, 0xc0, sizeof(vars)); rc = pSHPackDispParams(¶ms, vars, 2, VT_I4, 0xdeadbeef, VT_BSTR, 0xdeadcafe); - ok(rc == S_OK, "SHPackDispParams failed: %08x\n", rc); + ok(rc == S_OK, "SHPackDispParams failed: %08lx\n", rc);
rc = pIConnectionPoint_SimpleInvoke(point,0xa1,¶ms); - ok(rc == S_OK, "pConnectToConnectionPoint failed with %x\n",rc); + ok(rc == S_OK, "pConnectToConnectionPoint failed with %lx\n",rc);
rc = pConnectToConnectionPoint(NULL, &IID_NULL, FALSE, (IUnknown*)&container->IConnectionPointContainer_iface, &cookie, NULL); - ok(rc == S_OK, "pConnectToConnectionPoint failed with %x\n",rc); + ok(rc == S_OK, "pConnectToConnectionPoint failed with %lx\n",rc);
/* MSDN says this should be required but it crashes on XP IUnknown_Release(point); */ ref = IConnectionPointContainer_Release(&container->IConnectionPointContainer_iface); - ok(ref == 0, "leftover IConnectionPointContainer reference %i\n",ref); + ok(ref == 0, "leftover IConnectionPointContainer reference %li\n",ref); ref = IDispatch_Release(&dispatch->IDispatch_iface); - ok(ref == 0, "leftover IDispatch reference %i\n",ref); + ok(ref == 0, "leftover IDispatch reference %li\n",ref); }
typedef struct _propbag @@ -1585,16 +1585,16 @@ static void test_SHPropertyBag_ReadLONG(void)
out = 0xfeedface; rc = pSHPropertyBag_ReadLONG(NULL, szName1, &out); - ok(rc == E_INVALIDARG || broken(rc == S_OK), "incorrect return %x\n",rc); + ok(rc == E_INVALIDARG || broken(rc == S_OK), "incorrect return %lx\n",rc); ok(out == 0xfeedface, "value should not have changed\n"); rc = pSHPropertyBag_ReadLONG(&pb->IPropertyBag_iface, NULL, &out); - ok(rc == E_INVALIDARG || broken(rc == S_OK) || broken(rc == S_FALSE), "incorrect return %x\n",rc); + ok(rc == E_INVALIDARG || broken(rc == S_OK) || broken(rc == S_FALSE), "incorrect return %lx\n",rc); ok(out == 0xfeedface, "value should not have changed\n"); rc = pSHPropertyBag_ReadLONG(&pb->IPropertyBag_iface, szName1, NULL); - ok(rc == E_INVALIDARG || broken(rc == S_OK) || broken(rc == S_FALSE), "incorrect return %x\n",rc); + ok(rc == E_INVALIDARG || broken(rc == S_OK) || broken(rc == S_FALSE), "incorrect return %lx\n",rc); rc = pSHPropertyBag_ReadLONG(&pb->IPropertyBag_iface, szName1, &out); - ok(rc == DISP_E_BADVARTYPE || broken(rc == S_OK) || broken(rc == S_FALSE), "incorrect return %x\n",rc); - ok(out == 0xfeedface || broken(out == 0xfeedfa00), "value should not have changed %x\n",out); + ok(rc == DISP_E_BADVARTYPE || broken(rc == S_OK) || broken(rc == S_FALSE), "incorrect return %lx\n",rc); + ok(out == 0xfeedface || broken(out == 0xfeedfa00), "value should not have changed %lx\n",out); IPropertyBag_Release(&pb->IPropertyBag_iface); }
@@ -1623,9 +1623,9 @@ static void test_SHSetWindowBits(void) /* null window */ SetLastError(0xdeadbeef); style = pSHSetWindowBits(NULL, GWL_STYLE, 0, 0); - ok(style == 0, "expected 0 retval, got %d\n", style); + ok(style == 0, "expected 0 retval, got %ld\n", style); ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, - "expected ERROR_INVALID_WINDOW_HANDLE, got %d\n", GetLastError()); + "expected ERROR_INVALID_WINDOW_HANDLE, got %ld\n", GetLastError());
/* zero mask, zero flags */ styleold = GetWindowLongA(hwnd, GWL_STYLE); @@ -1638,19 +1638,19 @@ static void test_SHSetWindowBits(void) ok(styleold & WS_VISIBLE, "expected WS_VISIBLE\n"); style = pSHSetWindowBits(hwnd, GWL_STYLE, WS_VISIBLE, 0);
- ok(style == styleold, "expected previous style, got %x\n", style); + ok(style == styleold, "expected previous style, got %lx\n", style); ok((GetWindowLongA(hwnd, GWL_STYLE) & WS_VISIBLE) == 0, "expected updated style\n");
/* test mask, unset style bit used */ styleold = GetWindowLongA(hwnd, GWL_STYLE); style = pSHSetWindowBits(hwnd, GWL_STYLE, WS_VISIBLE, 0); - ok(style == styleold, "expected previous style, got %x\n", style); + ok(style == styleold, "expected previous style, got %lx\n", style); ok(styleold == GetWindowLongA(hwnd, GWL_STYLE), "expected to keep old style\n");
/* set back with flags */ styleold = GetWindowLongA(hwnd, GWL_STYLE); style = pSHSetWindowBits(hwnd, GWL_STYLE, WS_VISIBLE, WS_VISIBLE); - ok(style == styleold, "expected previous style, got %x\n", style); + ok(style == styleold, "expected previous style, got %lx\n", style); ok(GetWindowLongA(hwnd, GWL_STYLE) & WS_VISIBLE, "expected updated style\n");
/* reset and try to set without a mask */ @@ -1658,7 +1658,7 @@ static void test_SHSetWindowBits(void) ok((GetWindowLongA(hwnd, GWL_STYLE) & WS_VISIBLE) == 0, "expected updated style\n"); styleold = GetWindowLongA(hwnd, GWL_STYLE); style = pSHSetWindowBits(hwnd, GWL_STYLE, 0, WS_VISIBLE); - ok(style == styleold, "expected previous style, got %x\n", style); + ok(style == styleold, "expected previous style, got %lx\n", style); ok((GetWindowLongA(hwnd, GWL_STYLE) & WS_VISIBLE) == 0, "expected updated style\n");
DestroyWindow(hwnd); @@ -1687,7 +1687,7 @@ static void test_SHFormatDateTimeA(void) buff[0] = 'a'; buff[1] = 0; ret = pSHFormatDateTimeA(&filetime, NULL, buff, 0); ok(ret == 0, "got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %ld\n", GetLastError()); ok(buff[0] == 'a', "expected same string, got %s\n", buff);
/* flags needs to have FDTF_NOAUTOREADINGORDER for these tests to succeed on Vista+ */ @@ -1697,20 +1697,20 @@ static void test_SHFormatDateTimeA(void) SetLastError(0xdeadbeef); ret = pSHFormatDateTimeA(&filetime, &flags, buff, sizeof(buff)); ok(ret == lstrlenA(buff)+1, "got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %ld\n", GetLastError());
flags = FDTF_NOAUTOREADINGORDER | FDTF_SHORTDATE | FDTF_LONGDATE; SetLastError(0xdeadbeef); ret = pSHFormatDateTimeA(&filetime, &flags, buff, sizeof(buff)); ok(ret == lstrlenA(buff)+1, "got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %ld\n", GetLastError());
flags = FDTF_SHORTDATE | FDTF_LTRDATE | FDTF_RTLDATE; SetLastError(0xdeadbeef); ret = pSHFormatDateTimeA(&filetime, &flags, buff, sizeof(buff)); ok(ret == lstrlenA(buff)+1, "got %d\n", ret); ok(GetLastError() == 0xdeadbeef, - "expected 0xdeadbeef, got %d\n", GetLastError()); + "expected 0xdeadbeef, got %ld\n", GetLastError());
flags = FDTF_DEFAULT; ret = pSHFormatDateTimeA(&filetime, &flags, buff, sizeof(buff)); @@ -1850,13 +1850,13 @@ if (0) SetLastError(0xdeadbeef); ret = pSHFormatDateTimeW(&filetime, NULL, NULL, 0); ok(ret == 0, "expected 0, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); buff[0] = 'a'; buff[1] = 0; ret = pSHFormatDateTimeW(&filetime, NULL, buff, 0); ok(ret == 0, "expected 0, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %ld\n", GetLastError()); ok(buff[0] == 'a', "expected same string\n");
/* all combinations documented as invalid succeeded */ @@ -1865,14 +1865,14 @@ if (0) ret = pSHFormatDateTimeW(&filetime, &flags, buff, ARRAY_SIZE(buff)); ok(ret == lstrlenW(buff)+1 || ret == lstrlenW(buff), "expected %d or %d, got %d\n", lstrlenW(buff)+1, lstrlenW(buff), ret); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %ld\n", GetLastError());
flags = FDTF_SHORTDATE | FDTF_LONGDATE; SetLastError(0xdeadbeef); ret = pSHFormatDateTimeW(&filetime, &flags, buff, ARRAY_SIZE(buff)); ok(ret == lstrlenW(buff)+1 || ret == lstrlenW(buff), "expected %d or %d, got %d\n", lstrlenW(buff)+1, lstrlenW(buff), ret); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %ld\n", GetLastError());
flags = FDTF_SHORTDATE | FDTF_LTRDATE | FDTF_RTLDATE; SetLastError(0xdeadbeef); @@ -1881,7 +1881,7 @@ if (0) ok(ret == lstrlenW(buff)+1 || ret == lstrlenW(buff), "expected %d or %d, got %d\n", lstrlenW(buff)+1, lstrlenW(buff), ret); ok(GetLastError() == 0xdeadbeef, - "expected 0xdeadbeef, got %d\n", GetLastError()); + "expected 0xdeadbeef, got %ld\n", GetLastError());
/* now check returned strings */ flags = FDTF_SHORTTIME; @@ -2044,7 +2044,7 @@ static void test_SHGetObjectCompatFlags(void)
/* null args */ ret = pSHGetObjectCompatFlags(NULL, NULL); - ok(ret == 0, "got %d\n", ret); + ok(ret == 0, "got %ld\n", ret);
ret = RegOpenKeyA(HKEY_LOCAL_MACHINE, compat_path, &root); if (ret != ERROR_SUCCESS) @@ -2080,7 +2080,7 @@ static void test_SHGetObjectCompatFlags(void)
pGUIDFromStringA(keyA, &clsid); got = pSHGetObjectCompatFlags(NULL, &clsid); - ok(got == expected, "got 0x%08x, expected 0x%08x. Key %s\n", got, expected, keyA); + ok(got == expected, "got 0x%08lx, expected 0x%08lx. Key %s\n", got, expected, keyA);
RegCloseKey(clsid_key); } @@ -2304,7 +2304,7 @@ static void test_IUnknown_QueryServiceExec(void) hr = pIUnknown_QueryServiceExec(NULL, &dummy_serviceid, &dummy_groupid, 0, 0, 0, 0); ok(hr == E_FAIL || hr == E_NOTIMPL, /* win 8 */ - "got 0x%08x\n", hr); + "got 0x%08lx\n", hr);
/* expected trace: IUnknown_QueryServiceExec( ptr1, serviceid, groupid, arg1, arg2, arg3, arg4); @@ -2320,7 +2320,7 @@ static void test_IUnknown_QueryServiceExec(void)
init_call_trace(&trace_got); hr = pIUnknown_QueryServiceExec((IUnknown*)provider, &dummy_serviceid, &dummy_groupid, 0x1, 0x2, (void*)0x3, (void*)0x4); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
ok_trace(&trace_expected, &trace_got);
@@ -2414,7 +2414,7 @@ static void test_IUnknown_ProfferService(void) hr = pIUnknown_ProfferService(NULL, &dummy_serviceid, 0, 0); ok(hr == E_FAIL || hr == E_NOTIMPL, /* win 8 */ - "got 0x%08x\n", hr); + "got 0x%08lx\n", hr);
/* expected trace: IUnknown_ProfferService( ptr1, serviceid, arg1, arg2); @@ -2435,8 +2435,8 @@ static void test_IUnknown_ProfferService(void) init_call_trace(&trace_got); cookie = 0; hr = pIUnknown_ProfferService((IUnknown*)proff, &dummy_serviceid, provider, &cookie); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(cookie == 0xdeadbeef, "got %x\n", cookie); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(cookie == 0xdeadbeef, "got %lx\n", cookie);
ok_trace(&trace_expected, &trace_got); free_call_trace(&trace_got); @@ -2450,10 +2450,10 @@ static void test_IUnknown_ProfferService(void) add_call(&trace_expected, 4, (void*)(DWORD_PTR)cookie, 0, 0, 0, 0);
init_call_trace(&trace_got); - ok(cookie != 0, "got %x\n", cookie); + ok(cookie != 0, "got %lx\n", cookie); hr = pIUnknown_ProfferService((IUnknown*)proff, &dummy_serviceid, 0, &cookie); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(cookie == 0, "got %x\n", cookie); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(cookie == 0, "got %lx\n", cookie); ok_trace(&trace_expected, &trace_got); free_call_trace(&trace_got); free_call_trace(&trace_expected); @@ -2477,7 +2477,7 @@ static void test_SHCreateWorkerWindowA(void) ok(lstrcmpA(classA, "WorkerA") == 0, "expected WorkerA class, got %s\n", classA);
ret = GetWindowLongPtrA(hwnd, 0); - ok(ret == 0, "got %ld\n", ret); + ok(ret == 0, "got %Id\n", ret);
/* class info */ memset(&cliA, 0, sizeof(cliA)); @@ -2498,19 +2498,19 @@ static void test_SHCreateWorkerWindowA(void) ok(lstrcmpA(classA, "WorkerA") == 0, "expected WorkerA class, got %s\n", classA);
ret = GetWindowLongPtrA(hwnd, 0); - ok(ret == 0xdeadbeef, "got %ld\n", ret); + ok(ret == 0xdeadbeef, "got %Id\n", ret);
/* test exstyle */ ret = GetWindowLongA(hwnd, GWL_EXSTYLE); ok(ret == WS_EX_WINDOWEDGE || - ret == (WS_EX_WINDOWEDGE|WS_EX_LAYOUTRTL) /* systems with RTL locale */, "0x%08lx\n", ret); + ret == (WS_EX_WINDOWEDGE|WS_EX_LAYOUTRTL) /* systems with RTL locale */, "0x%08Ix\n", ret);
DestroyWindow(hwnd);
hwnd = pSHCreateWorkerWindowA(0, NULL, WS_EX_TOOLWINDOW, 0, 0, 0); ret = GetWindowLongA(hwnd, GWL_EXSTYLE); ok(ret == (WS_EX_WINDOWEDGE|WS_EX_TOOLWINDOW) || - ret == (WS_EX_WINDOWEDGE|WS_EX_TOOLWINDOW|WS_EX_LAYOUTRTL) /* systems with RTL locale */, "0x%08lx\n", ret); + ret == (WS_EX_WINDOWEDGE|WS_EX_TOOLWINDOW|WS_EX_LAYOUTRTL) /* systems with RTL locale */, "0x%08Ix\n", ret); DestroyWindow(hwnd); }
@@ -2643,16 +2643,16 @@ static void test_SHIShellFolder_EnumObjects(void) /* SHIShellFolder_EnumObjects doesn't QI the object for IShellFolder */ enm = (IEnumIDList*)0xdeadbeef; hres = pSHIShellFolder_EnumObjects(&ShellFolder, NULL, 0, &enm); - ok(hres == S_OK, "SHIShellFolder_EnumObjects failed: 0x%08x\n", hres); + ok(hres == S_OK, "SHIShellFolder_EnumObjects failed: 0x%08lx\n", hres); ok(enm == (IEnumIDList*)0xcafebabe, "Didn't get expected enumerator location, instead: %p\n", enm);
/* SHIShellFolder_EnumObjects isn't strict about the IShellFolder object */ hres = SHGetDesktopFolder(&folder); - ok(hres == S_OK, "SHGetDesktopFolder failed: 0x%08x\n", hres); + ok(hres == S_OK, "SHGetDesktopFolder failed: 0x%08lx\n", hres);
enm = NULL; hres = pSHIShellFolder_EnumObjects(folder, NULL, 0, &enm); - ok(hres == S_OK, "SHIShellFolder_EnumObjects failed: 0x%08x\n", hres); + ok(hres == S_OK, "SHIShellFolder_EnumObjects failed: 0x%08lx\n", hres); ok(enm != NULL, "Didn't get an enumerator\n"); if(enm) IEnumIDList_Release(enm); @@ -2729,27 +2729,27 @@ static void test_SHGetIniString(void) }
ret = pSHGetIniStringW(TestAppW, AKeyW, out, 0, pathW); - ok(ret == 0, "SHGetIniStringW should have given 0, instead: %d\n", ret); + ok(ret == 0, "SHGetIniStringW should have given 0, instead: %ld\n", ret);
/* valid arguments */ out[0] = 0; SetLastError(0xdeadbeef); ret = pSHGetIniStringW(TestAppW, NULL, out, ARRAY_SIZE(out), pathW); - ok(ret == 4, "SHGetIniStringW should have given 4, instead: %d\n", ret); - ok(!lstrcmpW(out, AKeyW), "Expected %s, got: %s, %d\n", + ok(ret == 4, "SHGetIniStringW should have given 4, instead: %ld\n", ret); + ok(!lstrcmpW(out, AKeyW), "Expected %s, got: %s, %ld\n", wine_dbgstr_w(AKeyW), wine_dbgstr_w(out), GetLastError());
ret = pSHGetIniStringW(TestAppW, AKeyW, out, ARRAY_SIZE(out), pathW); - ok(ret == 1, "SHGetIniStringW should have given 1, instead: %d\n", ret); + ok(ret == 1, "SHGetIniStringW should have given 1, instead: %ld\n", ret); ok(!lstrcmpW(out, L"1"), "Expected L"1", got: %s\n", wine_dbgstr_w(out));
ret = pSHGetIniStringW(TestAppW, AnotherKeyW, out, ARRAY_SIZE(out), pathW); - ok(ret == 4, "SHGetIniStringW should have given 4, instead: %d\n", ret); + ok(ret == 4, "SHGetIniStringW should have given 4, instead: %ld\n", ret); ok(!lstrcmpW(out, L"asdf"), "Expected L"asdf", got: %s\n", wine_dbgstr_w(out));
out[0] = 1; ret = pSHGetIniStringW(TestAppW, JunkKeyW, out, ARRAY_SIZE(out), pathW); - ok(ret == 0, "SHGetIniStringW should have given 0, instead: %d\n", ret); + ok(ret == 0, "SHGetIniStringW should have given 0, instead: %ld\n", ret); ok(*out == 0, "Expected L"", got: %s\n", wine_dbgstr_w(out));
DeleteFileW(pathW); @@ -2854,40 +2854,40 @@ static void test_SHGetShellKey(void)
size = sizeof(data); hres = pSKGetValueW(SHKEY_Root_HKLM, WineTestW, NULL, NULL, &data, &size); - ok(hres == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "hres = %x\n", hres); + ok(hres == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "hres = %lx\n", hres);
data = 1234; hres = pSKSetValueW(SHKEY_Root_HKLM, WineTestW, NULL, REG_DWORD, &data, sizeof(DWORD)); - ok(hres == S_OK, "hres = %x\n", hres); + ok(hres == S_OK, "hres = %lx\n", hres);
size = 1; hres = pSKGetValueW(SHKEY_Root_HKLM, WineTestW, NULL, NULL, NULL, &size); - ok(hres == S_OK, "hres = %x\n", hres); - ok(size == sizeof(DWORD), "size = %d\n", size); + ok(hres == S_OK, "hres = %lx\n", hres); + ok(size == sizeof(DWORD), "size = %ld\n", size);
data = 0xdeadbeef; hres = pSKGetValueW(SHKEY_Root_HKLM, WineTestW, NULL, NULL, &data, &size); - ok(hres == S_OK, "hres = %x\n", hres); - ok(size == sizeof(DWORD), "size = %d\n", size); - ok(data == 1234, "data = %d\n", data); + ok(hres == S_OK, "hres = %lx\n", hres); + ok(size == sizeof(DWORD), "size = %ld\n", size); + ok(data == 1234, "data = %ld\n", data);
hres = pSKAllocValueW(SHKEY_Root_HKLM, WineTestW, NULL, NULL, (void**)&alloc_data, &size); - ok(hres == S_OK, "hres= %x\n", hres); - ok(size == sizeof(DWORD), "size = %d\n", size); + ok(hres == S_OK, "hres= %lx\n", hres); + ok(size == sizeof(DWORD), "size = %ld\n", size); if (SUCCEEDED(hres)) { - ok(*alloc_data == 1234, "*alloc_data = %d\n", *alloc_data); + ok(*alloc_data == 1234, "*alloc_data = %ld\n", *alloc_data); LocalFree(alloc_data); }
hres = pSKDeleteValueW(SHKEY_Root_HKLM, WineTestW, NULL); - ok(hres == S_OK, "hres = %x\n", hres); + ok(hres == S_OK, "hres = %lx\n", hres);
hres = pSKDeleteValueW(SHKEY_Root_HKLM, WineTestW, NULL); - ok(hres == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "hres = %x\n", hres); + ok(hres == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "hres = %lx\n", hres);
hres = pSKGetValueW(SHKEY_Root_HKLM, WineTestW, NULL, NULL, &data, &size); - ok(hres == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "hres = %x\n", hres); + ok(hres == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "hres = %lx\n", hres);
hkey = pSHGetShellKey(SHKEY_Root_HKLM, NULL, FALSE); ok(hkey != NULL, "Can't create key\n"); @@ -2953,21 +2953,21 @@ static void test_SHSetParentHwnd(void) ret = GetParent(hwnd); ok(ret == NULL, "got %p\n", ret); style = GetWindowLongA(hwnd, GWL_STYLE); - ok((style & (WS_POPUP|WS_CHILD)) == 0, "got style 0x%08x\n", style); + ok((style & (WS_POPUP|WS_CHILD)) == 0, "got style 0x%08lx\n", style); ret = pSHSetParentHwnd(hwnd, NULL); ok(ret == NULL, "got %p\n", ret); style = GetWindowLongA(hwnd, GWL_STYLE); - ok((style & (WS_POPUP|WS_CHILD)) == 0, "got style 0x%08x\n", style); + ok((style & (WS_POPUP|WS_CHILD)) == 0, "got style 0x%08lx\n", style);
/* reset to null parent from not null */ ret = GetParent(hwnd2); ok(ret == hwnd, "got %p\n", ret); style = GetWindowLongA(hwnd2, GWL_STYLE); - ok((style & (WS_POPUP|WS_CHILD)) == WS_CHILD, "got style 0x%08x\n", style); + ok((style & (WS_POPUP|WS_CHILD)) == WS_CHILD, "got style 0x%08lx\n", style); ret = pSHSetParentHwnd(hwnd2, NULL); ok(ret == NULL, "got %p\n", ret); style = GetWindowLongA(hwnd2, GWL_STYLE); - ok((style & (WS_POPUP|WS_CHILD)) == WS_POPUP, "got style 0x%08x\n", style); + ok((style & (WS_POPUP|WS_CHILD)) == WS_POPUP, "got style 0x%08lx\n", style); ret = GetParent(hwnd2); ok(ret == NULL, "got %p\n", ret);
@@ -2975,13 +2975,13 @@ static void test_SHSetParentHwnd(void) style = GetWindowLongA(hwnd2, GWL_STYLE); SetWindowLongA(hwnd2, GWL_STYLE, style & ~(WS_CHILD|WS_POPUP)); style = GetWindowLongA(hwnd2, GWL_STYLE); - ok((style & (WS_CHILD|WS_POPUP)) == 0, "got 0x%08x\n", style); + ok((style & (WS_CHILD|WS_POPUP)) == 0, "got 0x%08lx\n", style);
ret = pSHSetParentHwnd(hwnd2, hwnd); todo_wine ok(ret == NULL, "got %p\n", ret);
style = GetWindowLongA(hwnd2, GWL_STYLE); - ok((style & (WS_POPUP|WS_CHILD)) == WS_CHILD, "got style 0x%08x\n", style); + ok((style & (WS_POPUP|WS_CHILD)) == WS_CHILD, "got style 0x%08lx\n", style); ret = GetParent(hwnd2); ok(ret == hwnd, "got %p\n", ret);
@@ -2992,7 +2992,7 @@ static void test_SHSetParentHwnd(void) ret = pSHSetParentHwnd(hwnd2, hwnd); todo_wine ok(ret == NULL, "got %p\n", ret); style = GetWindowLongA(hwnd2, GWL_STYLE); - ok((style & (WS_CHILD|WS_POPUP)) == WS_CHILD, "got 0x%08x\n", style); + ok((style & (WS_CHILD|WS_POPUP)) == WS_CHILD, "got 0x%08lx\n", style); ret = GetParent(hwnd2); ok(ret == hwnd, "got %p\n", ret);
@@ -3002,7 +3002,7 @@ static void test_SHSetParentHwnd(void) ret = pSHSetParentHwnd(hwnd2, hwnd); todo_wine ok(ret == hwnd, "got %p\n", ret); style = GetWindowLongA(hwnd2, GWL_STYLE); - ok((style & (WS_CHILD|WS_POPUP)) == WS_CHILD, "got 0x%08x\n", style); + ok((style & (WS_CHILD|WS_POPUP)) == WS_CHILD, "got 0x%08lx\n", style); ret = GetParent(hwnd2); ok(ret == hwnd, "got %p\n", ret);
@@ -3078,14 +3078,14 @@ static void test_IUnknown_GetClassID(void) memset(&clsid, 0xcc, sizeof(clsid)); memset(&clsid3, 0xcc, sizeof(clsid3)); hr = pIUnknown_GetClassID(NULL, &clsid); - ok(hr == E_FAIL, "got 0x%08x\n", hr); + ok(hr == E_FAIL, "got 0x%08lx\n", hr); ok(IsEqualCLSID(&clsid, &CLSID_NULL) || broken(IsEqualCLSID(&clsid, &clsid3)) /* win2k, winxp, win2k3 */, "got wrong clsid %s\n", wine_dbgstr_guid(&clsid));
memset(&clsid, 0xcc, sizeof(clsid)); memset(&clsid2, 0xab, sizeof(clsid2)); hr = pIUnknown_GetClassID((IUnknown*)&testpersist, &clsid); - ok(hr == 0x8fff2222, "got 0x%08x\n", hr); + ok(hr == 0x8fff2222, "got 0x%08lx\n", hr); ok(IsEqualCLSID(&clsid, &clsid2) || broken(IsEqualCLSID(&clsid, &clsid3)) /* win2k3 */, "got wrong clsid %s\n", wine_dbgstr_guid(&clsid));
@@ -3094,7 +3094,7 @@ static void test_IUnknown_GetClassID(void) memset(&clsid2, 0xab, sizeof(clsid2)); memset(&clsid3, 0xcc, sizeof(clsid3)); hr = pIUnknown_GetClassID((IUnknown*)&testpersist2, &clsid); - ok(hr == 0x8fff2222, "got 0x%08x\n", hr); + ok(hr == 0x8fff2222, "got 0x%08lx\n", hr); ok(IsEqualCLSID(&clsid, &clsid2) || broken(IsEqualCLSID(&clsid, &clsid3)) /* win2k3 */, "got wrong clsid %s\n", wine_dbgstr_guid(&clsid)); } @@ -3104,7 +3104,7 @@ static void test_DllGetVersion(void) HRESULT hr;
hr = pDllGetVersion(NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); }
START_TEST(ordinal) @@ -3121,7 +3121,7 @@ START_TEST(ordinal) { DWORD procid; HANDLE hmem; - sscanf(argv[2], "%d", &procid); + sscanf(argv[2], "%ld", &procid); sscanf(argv[3], "%p", &hmem); test_alloc_shared_remote(procid, hmem); return; diff --git a/dlls/shlwapi/tests/path.c b/dlls/shlwapi/tests/path.c index dbe1f36fbfd..4614d3fea25 100644 --- a/dlls/shlwapi/tests/path.c +++ b/dlls/shlwapi/tests/path.c @@ -279,19 +279,19 @@ static void test_PathCreateFromUrl(void) /* Won't say how much is needed without a buffer */ len = 0xdeca; ret = pPathCreateFromUrlA("file://foo", NULL, &len, 0); - ok(ret == E_INVALIDARG, "got 0x%08x expected E_INVALIDARG\n", ret); - ok(len == 0xdeca, "got %x expected 0xdeca\n", len); + ok(ret == E_INVALIDARG, "got 0x%08lx expected E_INVALIDARG\n", ret); + ok(len == 0xdeca, "got %lx expected 0xdeca\n", len);
/* Test the decoding itself */ for (i = 0; i < ARRAY_SIZE(TEST_PATHFROMURL); i++) { len = INTERNET_MAX_URL_LENGTH; ret = pPathCreateFromUrlA(TEST_PATHFROMURL[i].url, ret_path, &len, 0); todo_wine_if (TEST_PATHFROMURL[i].todo & 0x1) - ok(ret == TEST_PATHFROMURL[i].ret, "ret %08x from url %s\n", ret, TEST_PATHFROMURL[i].url); + ok(ret == TEST_PATHFROMURL[i].ret, "ret %08lx from url %s\n", ret, TEST_PATHFROMURL[i].url); if(SUCCEEDED(ret) && TEST_PATHFROMURL[i].path) { if(!(TEST_PATHFROMURL[i].todo & 0x2)) { ok(!lstrcmpiA(ret_path, TEST_PATHFROMURL[i].path), "got %s expected %s from url %s\n", ret_path, TEST_PATHFROMURL[i].path, TEST_PATHFROMURL[i].url); - ok(len == strlen(ret_path), "ret len %d from url %s\n", len, TEST_PATHFROMURL[i].url); + ok(len == strlen(ret_path), "ret len %ld from url %s\n", len, TEST_PATHFROMURL[i].url); } else todo_wine /* Wrong string, don't bother checking the length */ ok(!lstrcmpiA(ret_path, TEST_PATHFROMURL[i].path), "got %s expected %s from url %s\n", ret_path, TEST_PATHFROMURL[i].path, TEST_PATHFROMURL[i].url); @@ -304,12 +304,12 @@ static void test_PathCreateFromUrl(void) ret = pPathCreateFromUrlW(urlW, ret_pathW, &len, 0); WideCharToMultiByte(CP_ACP, 0, ret_pathW, -1, ret_path, sizeof(ret_path),NULL,NULL); todo_wine_if (TEST_PATHFROMURL[i].todo & 0x1) - ok(ret == TEST_PATHFROMURL[i].ret, "ret %08x from url L"%s"\n", ret, TEST_PATHFROMURL[i].url); + ok(ret == TEST_PATHFROMURL[i].ret, "ret %08lx from url L"%s"\n", ret, TEST_PATHFROMURL[i].url); if(SUCCEEDED(ret) && TEST_PATHFROMURL[i].path) { if(!(TEST_PATHFROMURL[i].todo & 0x2)) { ok(!lstrcmpiW(ret_pathW, pathW), "got %s expected %s from url L"%s"\n", ret_path, TEST_PATHFROMURL[i].path, TEST_PATHFROMURL[i].url); - ok(len == lstrlenW(ret_pathW), "ret len %d from url L"%s"\n", len, TEST_PATHFROMURL[i].url); + ok(len == lstrlenW(ret_pathW), "ret len %ld from url L"%s"\n", len, TEST_PATHFROMURL[i].url); } else todo_wine /* Wrong string, don't bother checking the length */ ok(!lstrcmpiW(ret_pathW, pathW), "got %s expected %s from url L"%s"\n", @@ -321,9 +321,9 @@ static void test_PathCreateFromUrl(void) /* Check what happens if the buffer is too small */ len2 = 2; ret = pPathCreateFromUrlW(urlW, ret_pathW, &len2, 0); - ok(ret == E_POINTER, "ret %08x, expected E_POINTER from url %s\n", ret, TEST_PATHFROMURL[i].url); + ok(ret == E_POINTER, "ret %08lx, expected E_POINTER from url %s\n", ret, TEST_PATHFROMURL[i].url); todo_wine_if (TEST_PATHFROMURL[i].todo & 0x4) - ok(len2 == len + 1, "got len = %d expected %d from url %s\n", len2, len + 1, TEST_PATHFROMURL[i].url); + ok(len2 == len + 1, "got len = %ld expected %ld from url %s\n", len2, len + 1, TEST_PATHFROMURL[i].url); }
FreeWideString(urlW); @@ -338,7 +338,7 @@ static void test_PathCreateFromUrl(void)
pathW = NULL; ret = pPathCreateFromUrlAlloc(fileW, &pathW, 0); - ok(ret == S_OK, "got 0x%08x expected S_OK\n", ret); + ok(ret == S_OK, "got 0x%08lx expected S_OK\n", ret); ok(lstrcmpiW(pathW, fooW) == 0, "got %s expected %s\n", wine_dbgstr_w(pathW), wine_dbgstr_w(fooW)); HeapFree(GetProcessHeap(), 0, pathW); } @@ -566,19 +566,19 @@ static void test_PathCombineA(void) SetLastError(0xdeadbeef); str = PathCombineA(NULL, "C:\", "one\two\three"); ok(str == NULL, "Expected NULL, got %p\n", str); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try NULL dest and NULL directory */ SetLastError(0xdeadbeef); str = PathCombineA(NULL, NULL, "one\two\three"); ok(str == NULL, "Expected NULL, got %p\n", str); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try all NULL*/ SetLastError(0xdeadbeef); str = PathCombineA(NULL, NULL, NULL); ok(str == NULL, "Expected NULL, got %p\n", str); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try NULL file part */ SetLastError(0xdeadbeef); @@ -586,7 +586,7 @@ static void test_PathCombineA(void) str = PathCombineA(dest, "C:\", NULL); ok(str == dest, "Expected str == dest, got %p\n", str); ok(!lstrcmpA(str, "C:\"), "Expected C:\, got %s\n", str); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try empty file part */ SetLastError(0xdeadbeef); @@ -594,7 +594,7 @@ static void test_PathCombineA(void) str = PathCombineA(dest, "C:\", ""); ok(str == dest, "Expected str == dest, got %p\n", str); ok(!lstrcmpA(str, "C:\"), "Expected C:\, got %s\n", str); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try empty directory and file part */ SetLastError(0xdeadbeef); @@ -604,7 +604,7 @@ static void test_PathCombineA(void) ok(!lstrcmpA(str, "\") || broken(!lstrcmpA(str, "control")), /* Win95 and some W2K */ "Expected \, got %s\n", str); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try NULL directory */ SetLastError(0xdeadbeef); @@ -612,7 +612,7 @@ static void test_PathCombineA(void) str = PathCombineA(dest, NULL, "one\two\three"); ok(str == dest, "Expected str == dest, got %p\n", str); ok(!lstrcmpA(str, "one\two\three"), "Expected one\two\three, got %s\n", str); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try NULL directory and empty file part */ SetLastError(0xdeadbeef); @@ -624,7 +624,7 @@ static void test_PathCombineA(void) "Expected \, got %s\n", str); ok(GetLastError() == 0xdeadbeef || broken(GetLastError() == ERROR_INVALID_PARAMETER), /* Win95 */ - "Expected 0xdeadbeef, got %d\n", GetLastError()); + "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try NULL directory and file part */ SetLastError(0xdeadbeef); @@ -635,7 +635,7 @@ static void test_PathCombineA(void) "Expected str == NULL, got %p\n", str); ok(!dest[0] || broken(!lstrcmpA(dest, "control")), /* Win95 and some W2K */ "Expected 0 length, got %i\n", lstrlenA(dest)); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try directory without backslash */ SetLastError(0xdeadbeef); @@ -643,7 +643,7 @@ static void test_PathCombineA(void) str = PathCombineA(dest, "C:", "one\two\three"); ok(str == dest, "Expected str == dest, got %p\n", str); ok(!lstrcmpA(str, "C:\one\two\three"), "Expected C:\one\two\three, got %s\n", str); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try directory with backslash */ SetLastError(0xdeadbeef); @@ -651,7 +651,7 @@ static void test_PathCombineA(void) str = PathCombineA(dest, "C:\", "one\two\three"); ok(str == dest, "Expected str == dest, got %p\n", str); ok(!lstrcmpA(str, "C:\one\two\three"), "Expected C:\one\two\three, got %s\n", str); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try directory with backslash and file with prepended backslash */ SetLastError(0xdeadbeef); @@ -659,7 +659,7 @@ static void test_PathCombineA(void) str = PathCombineA(dest, "C:\", "\one\two\three"); ok(str == dest, "Expected str == dest, got %p\n", str); ok(!lstrcmpA(str, "C:\one\two\three"), "Expected C:\one\two\three, got %s\n", str); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try previous test, with backslash appended as well */ SetLastError(0xdeadbeef); @@ -667,13 +667,13 @@ static void test_PathCombineA(void) str = PathCombineA(dest, "C:\", "\one\two\three\"); ok(str == dest, "Expected str == dest, got %p\n", str); ok(!lstrcmpA(str, "C:\one\two\three\"), "Expected C:\one\two\three\, got %s\n", str); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try a relative directory */ SetLastError(0xdeadbeef); lstrcpyA(dest, "control"); str = PathCombineA(dest, "relative\dir", "\one\two\three\"); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); /* Vista fails which probably makes sense as PathCombineA expects an absolute dir */ if (str) { @@ -687,7 +687,7 @@ static void test_PathCombineA(void) str = PathCombineA(dest, "C:\", "one/two/three\"); ok(str == dest, "Expected str == dest, got %p\n", str); ok(!lstrcmpA(str, "C:\one/two/three\"), "Expected one/two/three\, got %s\n", str); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try a really weird directory */ SetLastError(0xdeadbeef); @@ -695,7 +695,7 @@ static void test_PathCombineA(void) str = PathCombineA(dest, "C:\/\/", "\one\two\three\"); ok(str == dest, "Expected str == dest, got %p\n", str); ok(!lstrcmpA(str, "C:\one\two\three\"), "Expected C:\one\two\three\, got %s\n", str); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try periods */ SetLastError(0xdeadbeef); @@ -703,7 +703,7 @@ static void test_PathCombineA(void) str = PathCombineA(dest, "C:\", "one\..\two\.\three"); ok(str == dest, "Expected str == dest, got %p\n", str); ok(!lstrcmpA(str, "C:\two\three"), "Expected C:\two\three, got %s\n", str); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try .. as file */ /* try forward slashes */ @@ -712,7 +712,7 @@ static void test_PathCombineA(void) str = PathCombineA(dest, "C:\", ".."); ok(str == dest, "Expected str == dest, got %p\n", str); ok(!lstrcmpA(str, "C:\"), "Expected C:\, got %s\n", str); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try relative paths */ /* try forward slashes */ @@ -721,7 +721,7 @@ static void test_PathCombineA(void) str = PathCombineA(dest, "../../../one/two/", "*"); ok(str == dest, "Expected str == dest, got %p\n", str); ok(!lstrcmpA(str, "../../../one/two/\*"), "Expected ../../../one/two/\*, got %s\n", str); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
memset(too_long, 'a', LONG_LEN); too_long[LONG_LEN - 1] = '\0'; @@ -733,7 +733,7 @@ static void test_PathCombineA(void) ok(str == NULL, "Expected str == NULL, got %p\n", str); ok(!dest[0] || broken(!lstrcmpA(dest, "control")), /* Win95 and some W2K */ "Expected 0 length, got %i\n", lstrlenA(dest)); - todo_wine ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + todo_wine ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try a directory longer than MAX_PATH */ SetLastError(0xdeadbeef); @@ -742,7 +742,7 @@ static void test_PathCombineA(void) ok(str == NULL, "Expected str == NULL, got %p\n", str); ok(!dest[0] || broken(!lstrcmpA(dest, "control")), /* Win95 and some W2K */ "Expected 0 length, got %i\n", lstrlenA(dest)); - todo_wine ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + todo_wine ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
memset(one, 'b', HALF_LEN); memset(two, 'c', HALF_LEN); @@ -756,7 +756,7 @@ static void test_PathCombineA(void) ok(str == NULL, "Expected str == NULL, got %p\n", str); ok(!dest[0] || broken(!lstrcmpA(dest, "control")), /* Win95 and some W2K */ "Expected 0 length, got %i\n", lstrlenA(dest)); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); }
static void test_PathAddBackslash(void) @@ -769,7 +769,7 @@ static void test_PathAddBackslash(void) SetLastError(0xdeadbeef); str = PathAddBackslashA(NULL); ok(str == NULL, "Expected str == NULL, got %p\n", str); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try an empty path */ path[0] = '\0'; @@ -777,7 +777,7 @@ static void test_PathAddBackslash(void) str = PathAddBackslashA(path); ok(str == (path + lstrlenA(path)), "Expected str to point to end of path, got %p\n", str); ok(!path[0], "Expected empty string, got %i\n", lstrlenA(path)); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try a relative path */ lstrcpyA(path, "one\two"); @@ -785,7 +785,7 @@ static void test_PathAddBackslash(void) str = PathAddBackslashA(path); ok(str == (path + lstrlenA(path)), "Expected str to point to end of path, got %p\n", str); ok(!lstrcmpA(path, "one\two\"), "Expected one\two\, got %s\n", path); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try periods */ lstrcpyA(path, "one\..\two"); @@ -793,7 +793,7 @@ static void test_PathAddBackslash(void) str = PathAddBackslashA(path); ok(str == (path + lstrlenA(path)), "Expected str to point to end of path, got %p\n", str); ok(!lstrcmpA(path, "one\..\two\"), "Expected one\..\two\, got %s\n", path); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try just a space */ lstrcpyA(path, " "); @@ -801,7 +801,7 @@ static void test_PathAddBackslash(void) str = PathAddBackslashA(path); ok(str == (path + lstrlenA(path)), "Expected str to point to end of path, got %p\n", str); ok(!lstrcmpA(path, " \"), "Expected \, got %s\n", path); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* path already has backslash */ lstrcpyA(path, "C:\one\"); @@ -809,7 +809,7 @@ static void test_PathAddBackslash(void) str = PathAddBackslashA(path); ok(str == (path + lstrlenA(path)), "Expected str to point to end of path, got %p\n", str); ok(!lstrcmpA(path, "C:\one\"), "Expected C:\one\, got %s\n", path); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
memset(too_long, 'a', LONG_LEN); too_long[LONG_LEN - 1] = '\0'; @@ -818,7 +818,7 @@ static void test_PathAddBackslash(void) SetLastError(0xdeadbeef); str = PathAddBackslashA(too_long); ok(str == NULL, "Expected str == NULL, got %p\n", str); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); }
static void test_PathAppendA(void) @@ -834,28 +834,28 @@ static void test_PathAppendA(void) SetLastError(0xdeadbeef); res = PathAppendA(path, NULL); ok(!res, "Expected failure\n"); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok(!lstrcmpA(path, "C:\one"), "Expected C:\one, got %s\n", path);
/* try empty pszMore */ SetLastError(0xdeadbeef); res = PathAppendA(path, ""); ok(res, "Expected success\n"); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok(!lstrcmpA(path, "C:\one"), "Expected C:\one, got %s\n", path);
/* try NULL pszPath */ SetLastError(0xdeadbeef); res = PathAppendA(NULL, "two\three"); ok(!res, "Expected failure\n"); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try empty pszPath */ path[0] = '\0'; SetLastError(0xdeadbeef); res = PathAppendA(path, "two\three"); ok(res, "Expected success\n"); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok(!lstrcmpA(path, "two\three"), "Expected \two\three, got %s\n", path);
/* try empty pszPath and empty pszMore */ @@ -863,7 +863,7 @@ static void test_PathAppendA(void) SetLastError(0xdeadbeef); res = PathAppendA(path, ""); ok(res, "Expected success\n"); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok(!lstrcmpA(path, "\"), "Expected \, got %s\n", path);
/* try legit params */ @@ -871,7 +871,7 @@ static void test_PathAppendA(void) SetLastError(0xdeadbeef); res = PathAppendA(path, "two\three"); ok(res, "Expected success\n"); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok(!lstrcmpA(path, "C:\one\two\three"), "Expected C:\one\two\three, got %s\n", path);
/* try pszPath with backslash after it */ @@ -879,7 +879,7 @@ static void test_PathAppendA(void) SetLastError(0xdeadbeef); res = PathAppendA(path, "two\three"); ok(res, "Expected success\n"); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok(!lstrcmpA(path, "C:\one\two\three"), "Expected C:\one\two\three, got %s\n", path);
/* try pszMore with backslash before it */ @@ -887,7 +887,7 @@ static void test_PathAppendA(void) SetLastError(0xdeadbeef); res = PathAppendA(path, "\two\three"); ok(res, "Expected success\n"); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok(!lstrcmpA(path, "C:\one\two\three"), "Expected C:\one\two\three, got %s\n", path);
/* try pszMore with backslash after it */ @@ -895,7 +895,7 @@ static void test_PathAppendA(void) SetLastError(0xdeadbeef); res = PathAppendA(path, "two\three\"); ok(res, "Expected success\n"); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok(!lstrcmpA(path, "C:\one\two\three\"), "Expected C:\one\two\three\, got %s\n", path);
/* try spaces in pszPath */ @@ -903,7 +903,7 @@ static void test_PathAppendA(void) SetLastError(0xdeadbeef); res = PathAppendA(path, "two\three"); ok(res, "Expected success\n"); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok(!lstrcmpA(path, "C: \ one \two\three"), "Expected C: \ one \two\three, got %s\n", path);
/* try spaces in pszMore */ @@ -911,7 +911,7 @@ static void test_PathAppendA(void) SetLastError(0xdeadbeef); res = PathAppendA(path, " two \ three "); ok(res, "Expected success\n"); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok(!lstrcmpA(path, "C:\one\ two \ three "), "Expected 'C:\one\ two \ three ', got %s\n", path);
/* pszPath is too long */ @@ -920,7 +920,7 @@ static void test_PathAppendA(void) SetLastError(0xdeadbeef); res = PathAppendA(too_long, "two\three"); ok(!res, "Expected failure\n"); - todo_wine ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + todo_wine ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok(!too_long[0] || broken(lstrlenA(too_long) == (LONG_LEN - 1)), /* Win95 and some W2K */ "Expected length of too_long to be zero, got %i\n", lstrlenA(too_long));
@@ -931,7 +931,7 @@ static void test_PathAppendA(void) SetLastError(0xdeadbeef); res = PathAppendA(path, too_long); ok(!res, "Expected failure\n"); - todo_wine ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + todo_wine ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok(!path[0] || broken(!lstrcmpA(path, "C:\one")), /* Win95 and some W2K */ "Expected length of path to be zero, got %i\n", lstrlenA(path));
@@ -945,7 +945,7 @@ static void test_PathAppendA(void) ok(!res, "Expected failure\n"); ok(!path[0] || broken(lstrlenA(path) == (HALF_LEN - 1)), /* Win95 and some W2K */ "Expected length of path to be zero, got %i\n", lstrlenA(path)); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); }
static void test_PathCanonicalizeA(void) @@ -960,7 +960,7 @@ static void test_PathCanonicalizeA(void) res = PathCanonicalizeA(dest, NULL); ok(!res, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); ok(dest[0] == 0 || !lstrcmpA(dest, "test"), "Expected either an empty string (Vista) or test, got %s\n", dest);
@@ -969,7 +969,7 @@ static void test_PathCanonicalizeA(void) SetLastError(0xdeadbeef); res = PathCanonicalizeA(dest, ""); ok(res, "Expected success\n"); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok(!lstrcmpA(dest, "\") || broken(!lstrcmpA(dest, "test")), /* Win95 and some W2K */ "Expected \, got %s\n", dest); @@ -979,14 +979,14 @@ static void test_PathCanonicalizeA(void) res = PathCanonicalizeA(NULL, "C:\"); ok(!res, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* try empty dest */ dest[0] = '\0'; SetLastError(0xdeadbeef); res = PathCanonicalizeA(dest, "C:\"); ok(res, "Expected success\n"); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok(!lstrcmpA(dest, "C:\"), "Expected C:\, got %s\n", dest);
/* try non-empty dest */ @@ -994,7 +994,7 @@ static void test_PathCanonicalizeA(void) SetLastError(0xdeadbeef); res = PathCanonicalizeA(dest, "C:\"); ok(res, "Expected success\n"); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok(!lstrcmpA(dest, "C:\"), "Expected C:\, got %s\n", dest);
/* try a space for source */ @@ -1002,7 +1002,7 @@ static void test_PathCanonicalizeA(void) SetLastError(0xdeadbeef); res = PathCanonicalizeA(dest, " "); ok(res, "Expected success\n"); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok(!lstrcmpA(dest, " "), "Expected ' ', got %s\n", dest);
/* try a relative path */ @@ -1010,7 +1010,7 @@ static void test_PathCanonicalizeA(void) SetLastError(0xdeadbeef); res = PathCanonicalizeA(dest, "one\two"); ok(res, "Expected success\n"); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok(!lstrcmpA(dest, "one\two"), "Expected one\two, got %s\n", dest);
/* try current dir and previous dir */ @@ -1018,7 +1018,7 @@ static void test_PathCanonicalizeA(void) SetLastError(0xdeadbeef); res = PathCanonicalizeA(dest, "C:\one\.\..\two\three\.."); ok(res, "Expected success\n"); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok(!lstrcmpA(dest, "C:\two"), "Expected C:\two, got %s\n", dest);
/* try simple forward slashes */ @@ -1026,7 +1026,7 @@ static void test_PathCanonicalizeA(void) SetLastError(0xdeadbeef); res = PathCanonicalizeA(dest, "C:\one/two/three\four/five\six"); ok(res, "Expected success\n"); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok(!lstrcmpA(dest, "C:\one/two/three\four/five\six"), "Expected C:\one/two/three\four/five\six, got %s\n", dest);
@@ -1035,7 +1035,7 @@ static void test_PathCanonicalizeA(void) SetLastError(0xdeadbeef); res = PathCanonicalizeA(dest, "C:\one/.\two"); ok(res, "Expected success\n"); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok(!lstrcmpA(dest, "C:\one/.\two"), "Expected C:\one/.\two, got %s\n", dest);
/* try simple forward slashes with change dir */ @@ -1043,7 +1043,7 @@ static void test_PathCanonicalizeA(void) SetLastError(0xdeadbeef); res = PathCanonicalizeA(dest, "C:\one/.\two\.."); ok(res, "Expected success\n"); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok(!lstrcmpA(dest, "C:\one/.") || !lstrcmpA(dest, "C:\one/"), /* Vista */ "Expected "C:\one/." or "C:\one/", got "%s"\n", dest); @@ -1053,7 +1053,7 @@ static void test_PathCanonicalizeA(void) SetLastError(0xdeadbeef); res = PathCanonicalizeA(dest, "../../one/two/"); ok(res, "Expected success\n"); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok(!lstrcmpA(dest, "../../one/two/"), "Expected ../../one/two/, got %s\n", dest);
/* try relative forward slashes */ @@ -1061,7 +1061,7 @@ static void test_PathCanonicalizeA(void) SetLastError(0xdeadbeef); res = PathCanonicalizeA(dest, "../../one/two/\*"); ok(res, "Expected success\n"); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok(!lstrcmpA(dest, "../../one/two/\*"), "Expected ../../one/two/\*, got %s\n", dest);
/* try forward slashes with change dirs @@ -1072,7 +1072,7 @@ static void test_PathCanonicalizeA(void) SetLastError(0xdeadbeef); res = PathCanonicalizeA(dest, "C:\one/.\..\two/three\..\four/.five"); ok(res, "Expected success\n"); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); ok(!lstrcmpA(dest, "C:\four/.five"), "Expected C:\four/.five, got %s\n", dest);
/* try src is too long */ @@ -1087,7 +1087,7 @@ static void test_PathCanonicalizeA(void) todo_wine { ok(GetLastError() == 0xdeadbeef || GetLastError() == ERROR_FILENAME_EXCED_RANGE /* Vista */, - "Expected 0xdeadbeef or ERROR_FILENAME_EXCED_RANGE, got %d\n", GetLastError()); + "Expected 0xdeadbeef or ERROR_FILENAME_EXCED_RANGE, got %ld\n", GetLastError()); } ok(lstrlenA(too_long) == LONG_LEN - 1, "Expected length LONG_LEN - 1, got %i\n", lstrlenA(too_long)); } @@ -1102,7 +1102,7 @@ static void test_PathFindExtensionA(void) SetLastError(0xdeadbeef); ext = PathFindExtensionA(NULL); ok(ext == NULL, "Expected NULL, got %p\n", ext); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try an empty path */ path[0] = '\0'; @@ -1110,7 +1110,7 @@ static void test_PathFindExtensionA(void) ext = PathFindExtensionA(path); ok(ext == path, "Expected ext == path, got %p\n", ext); ok(!ext[0], "Expected length 0, got %i\n", lstrlenA(ext)); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try a path without an extension */ lstrcpyA(path, "file"); @@ -1118,7 +1118,7 @@ static void test_PathFindExtensionA(void) ext = PathFindExtensionA(path); ok(ext == path + lstrlenA(path), "Expected ext == path, got %p\n", ext); ok(!ext[0], "Expected length 0, got %i\n", lstrlenA(ext)); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try a path with an extension */ lstrcpyA(path, "file.txt"); @@ -1127,7 +1127,7 @@ static void test_PathFindExtensionA(void) ok(ext == path + lstrlenA("file"), "Expected ext == path + lstrlenA("file"), got %p\n", ext); ok(!lstrcmpA(ext, ".txt"), "Expected .txt, got %s\n", ext); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try a path with two extensions */ lstrcpyA(path, "file.txt.doc"); @@ -1136,7 +1136,7 @@ static void test_PathFindExtensionA(void) ok(ext == path + lstrlenA("file.txt"), "Expected ext == path + lstrlenA("file.txt"), got %p\n", ext); ok(!lstrcmpA(ext, ".doc"), "Expected .txt, got %s\n", ext); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try a path longer than MAX_PATH without an extension*/ memset(too_long, 'a', LONG_LEN); @@ -1144,7 +1144,7 @@ static void test_PathFindExtensionA(void) SetLastError(0xdeadbeef); ext = PathFindExtensionA(too_long); ok(ext == too_long + LONG_LEN - 1, "Expected ext == too_long + LONG_LEN - 1, got %p\n", ext); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try a path longer than MAX_PATH with an extension*/ memset(too_long, 'a', LONG_LEN); @@ -1155,7 +1155,7 @@ static void test_PathFindExtensionA(void) ext = PathFindExtensionA(too_long); ok(ext == too_long + 300, "Expected ext == too_long + 300, got %p\n", ext); ok(lstrlenA(ext) == LONG_LEN - 301, "Expected LONG_LEN - 301, got %i\n", lstrlenA(ext)); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); }
static void test_PathBuildRootA(void) @@ -1178,7 +1178,7 @@ static void test_PathBuildRootA(void) root = PathBuildRootA(path, j); ok(root == path, "Expected root == path, got %p\n", root); ok(!lstrcmpA(root, root_expected[j]), "Expected %s, got %s\n", root_expected[j], root); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); }
/* test a negative drive number */ @@ -1188,7 +1188,7 @@ static void test_PathBuildRootA(void) ok(root == path, "Expected root == path, got %p\n", root); ok(!lstrcmpA(path, "aaaaaaaaa") || !path[0], /* Vista */ "Expected aaaaaaaaa or empty string, got %s\n", path); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* test a drive number greater than 25 */ SetLastError(0xdeadbeef); @@ -1197,7 +1197,7 @@ static void test_PathBuildRootA(void) ok(root == path, "Expected root == path, got %p\n", root); ok(!lstrcmpA(path, "aaaaaaaaa") || !path[0], /* Vista */ "Expected aaaaaaaaa or empty string, got %s\n", path); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* length of path is less than 4 */ SetLastError(0xdeadbeef); @@ -1205,13 +1205,13 @@ static void test_PathBuildRootA(void) root = PathBuildRootA(path, 0); ok(root == path, "Expected root == path, got %p\n", root); ok(!lstrcmpA(path, "A:\"), "Expected A:\, got %s\n", path); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* path is NULL */ SetLastError(0xdeadbeef); root = PathBuildRootA(NULL, 0); ok(root == NULL, "Expected root == NULL, got %p\n", root); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); }
static void test_PathCommonPrefixA(void) @@ -1231,7 +1231,7 @@ static void test_PathCommonPrefixA(void) ok(!lstrcmpA(out, "aaa"), "Expected aaa, got %s\n", out); } ok(!lstrcmpA(path2, "C:\"), "Expected C:\, got %s\n", path2); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* test NULL path2 */ SetLastError(0xdeadbeef); @@ -1244,7 +1244,7 @@ static void test_PathCommonPrefixA(void) ok(!lstrcmpA(out, "aaa"), "Expected aaa, got %s\n", out); } ok(!lstrcmpA(path1, "C:\"), "Expected C:\, got %s\n", path1); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* test empty path1 */ SetLastError(0xdeadbeef); @@ -1256,7 +1256,7 @@ static void test_PathCommonPrefixA(void) ok(!out[0], "Expected 0 length out, got %i\n", lstrlenA(out)); ok(!path1[0], "Expected 0 length path1, got %i\n", lstrlenA(path1)); ok(!lstrcmpA(path2, "C:\"), "Expected C:\, got %s\n", path2); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* test empty path1 */ SetLastError(0xdeadbeef); @@ -1268,7 +1268,7 @@ static void test_PathCommonPrefixA(void) ok(!out[0], "Expected 0 length out, got %i\n", lstrlenA(out)); ok(!path2[0], "Expected 0 length path2, got %i\n", lstrlenA(path2)); ok(!lstrcmpA(path1, "C:\"), "Expected C:\, got %s\n", path1); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* paths are legit, out is NULL */ SetLastError(0xdeadbeef); @@ -1278,7 +1278,7 @@ static void test_PathCommonPrefixA(void) ok(count == 3, "Expected 3, got %i\n", count); ok(!lstrcmpA(path1, "C:\"), "Expected C:\, got %s\n", path1); ok(!lstrcmpA(path2, "C:\"), "Expected C:\, got %s\n", path2); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* all parameters legit */ SetLastError(0xdeadbeef); @@ -1290,7 +1290,7 @@ static void test_PathCommonPrefixA(void) ok(!lstrcmpA(path1, "C:\"), "Expected C:\, got %s\n", path1); ok(!lstrcmpA(path2, "C:\"), "Expected C:\, got %s\n", path2); ok(!lstrcmpA(out, "C:\"), "Expected C:\, got %s\n", out); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* path1 and path2 not the same, but common prefix */ SetLastError(0xdeadbeef); @@ -1302,7 +1302,7 @@ static void test_PathCommonPrefixA(void) ok(!lstrcmpA(path1, "C:\one\two"), "Expected C:\one\two, got %s\n", path1); ok(!lstrcmpA(path2, "C:\one\three"), "Expected C:\one\three, got %s\n", path2); ok(!lstrcmpA(out, "C:\one"), "Expected C:\one, got %s\n", out); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try . prefix */ SetLastError(0xdeadbeef); @@ -1314,7 +1314,7 @@ static void test_PathCommonPrefixA(void) ok(!lstrcmpA(path1, "one\.two"), "Expected one\.two, got %s\n", path1); ok(!lstrcmpA(path2, "one\.three"), "Expected one\.three, got %s\n", path2); ok(!lstrcmpA(out, "one"), "Expected one, got %s\n", out); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try .. prefix */ SetLastError(0xdeadbeef); @@ -1326,7 +1326,7 @@ static void test_PathCommonPrefixA(void) ok(!lstrcmpA(path1, "one\..two"), "Expected one\..two, got %s\n", path1); ok(!lstrcmpA(path2, "one\..three"), "Expected one\..three, got %s\n", path2); ok(!lstrcmpA(out, "one"), "Expected one, got %s\n", out); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try ... prefix */ SetLastError(0xdeadbeef); @@ -1338,7 +1338,7 @@ static void test_PathCommonPrefixA(void) ok(!lstrcmpA(path1, "one\...two"), "Expected one\...two, got %s\n", path1); ok(!lstrcmpA(path2, "one\...three"), "Expected one\...three, got %s\n", path2); ok(!lstrcmpA(out, "one"), "Expected one, got %s\n", out); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try .\ prefix */ SetLastError(0xdeadbeef); @@ -1350,7 +1350,7 @@ static void test_PathCommonPrefixA(void) ok(!lstrcmpA(path1, "one\.\two"), "Expected one\.\two, got %s\n", path1); ok(!lstrcmpA(path2, "one\.\three"), "Expected one\.\three, got %s\n", path2); ok(!lstrcmpA(out, "one\."), "Expected one\., got %s\n", out); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try ..\ prefix */ SetLastError(0xdeadbeef); @@ -1362,7 +1362,7 @@ static void test_PathCommonPrefixA(void) ok(!lstrcmpA(path1, "one\..\two"), "Expected one\..\two, got %s\n", path1); ok(!lstrcmpA(path2, "one\..\three"), "Expected one\..\three, got %s\n", path2); ok(!lstrcmpA(out, "one\.."), "Expected one\.., got %s\n", out); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try ...\ prefix */ SetLastError(0xdeadbeef); @@ -1374,7 +1374,7 @@ static void test_PathCommonPrefixA(void) ok(!lstrcmpA(path1, "one\...\two"), "Expected one\...\two, got %s\n", path1); ok(!lstrcmpA(path2, "one\...\three"), "Expected one\...\three, got %s\n", path2); ok(!lstrcmpA(out, "one\..."), "Expected one\..., got %s\n", out); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try prefix that is not an msdn labeled prefix type */ SetLastError(0xdeadbeef); @@ -1386,7 +1386,7 @@ static void test_PathCommonPrefixA(void) ok(!lstrcmpA(path1, "same"), "Expected same, got %s\n", path1); ok(!lstrcmpA(path2, "same"), "Expected same, got %s\n", path2); ok(!lstrcmpA(out, "same"), "Expected same, got %s\n", out); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try . after directory */ SetLastError(0xdeadbeef); @@ -1398,7 +1398,7 @@ static void test_PathCommonPrefixA(void) ok(!lstrcmpA(path1, "one\mid.\two"), "Expected one\mid.\two, got %s\n", path1); ok(!lstrcmpA(path2, "one\mid.\three"), "Expected one\mid.\three, got %s\n", path2); ok(!lstrcmpA(out, "one\mid."), "Expected one\mid., got %s\n", out); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try . in the middle of a directory */ SetLastError(0xdeadbeef); @@ -1410,7 +1410,7 @@ static void test_PathCommonPrefixA(void) ok(!lstrcmpA(path1, "one\mid.end\two"), "Expected one\mid.end\two, got %s\n", path1); ok(!lstrcmpA(path2, "one\mid.end\three"), "Expected one\mid.end\three, got %s\n", path2); ok(!lstrcmpA(out, "one\mid.end"), "Expected one\mid.end, got %s\n", out); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
/* try comparing a .. with the expanded path */ SetLastError(0xdeadbeef); @@ -1422,7 +1422,7 @@ static void test_PathCommonPrefixA(void) ok(!lstrcmpA(path1, "one\..\two"), "Expected one\..\two, got %s\n", path1); ok(!lstrcmpA(path2, "two"), "Expected two, got %s\n", path2); ok(!out[0], "Expected 0 length out, got %i\n", lstrlenA(out)); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError()); }
static void test_PathUnquoteSpaces(void) @@ -1464,7 +1464,7 @@ static void test_PathGetDriveNumber(void) SetLastError(0xdeadbeef); ret = PathGetDriveNumberA(NULL); ok(ret == -1, "got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "got %ld\n", GetLastError());
ret = PathGetDriveNumberA(test1A); ok(ret == 0, "got %d\n", ret); @@ -1507,20 +1507,20 @@ static void test_PathUnExpandEnvStrings(void) ok(ret, "got %d\n", ret); SetLastError(0xdeadbeef); ret = pPathUnExpandEnvStringsA(envvarA, buff, sizeof(buff)); - ok(!ret && GetLastError() == 0xdeadbeef, "got %d, error %d\n", ret, GetLastError()); + ok(!ret && GetLastError() == 0xdeadbeef, "got %d, error %ld\n", ret, GetLastError());
ret = GetEnvironmentVariableW(computernameW, envvarW, ARRAY_SIZE(envvarW)); ok(ret, "got %d\n", ret); SetLastError(0xdeadbeef); ret = pPathUnExpandEnvStringsW(envvarW, buffW, ARRAY_SIZE(buffW)); - ok(!ret && GetLastError() == 0xdeadbeef, "got %d, error %d\n", ret, GetLastError()); + ok(!ret && GetLastError() == 0xdeadbeef, "got %d, error %ld\n", ret, GetLastError());
/* something that can't be represented with env var */ strcpy(path, "somepath_name"); strcpy(buff, "xx"); SetLastError(0xdeadbeef); ret = pPathUnExpandEnvStringsA(path, buff, sizeof(buff)); - ok(!ret && GetLastError() == 0xdeadbeef, "got %d, error %d\n", ret, GetLastError()); + ok(!ret && GetLastError() == 0xdeadbeef, "got %d, error %ld\n", ret, GetLastError()); ok(buff[0] == 'x', "wrong return string %s\n", buff);
len = GetSystemDirectoryA(path, MAX_PATH); @@ -1540,7 +1540,7 @@ static void test_PathUnExpandEnvStrings(void) strcpy(buff, "xx"); SetLastError(0xdeadbeef); ret = pPathUnExpandEnvStringsA(path, buff, sizeof(sysrootA)); - ok(!ret && GetLastError() == 0xdeadbeef, "got %d, error %d\n", ret, GetLastError()); + ok(!ret && GetLastError() == 0xdeadbeef, "got %d, error %ld\n", ret, GetLastError()); ok(buff[0] == 'x', "wrong return string %s\n", buff);
/* enough size */ @@ -1573,7 +1573,7 @@ static void test_PathUnExpandEnvStrings(void) strcat(path, sysdrvA); SetLastError(0xdeadbeef); ret = pPathUnExpandEnvStringsA(path, buff, sizeof(buff)); - ok(!ret && GetLastError() == 0xdeadbeef, "got %d, error %d\n", ret, GetLastError()); + ok(!ret && GetLastError() == 0xdeadbeef, "got %d, error %ld\n", ret, GetLastError());
ret = SetEnvironmentVariableA("SystemDrive", envvarA); ok(ret, "got %d\n", ret); @@ -1585,7 +1585,7 @@ static void test_PathUnExpandEnvStrings(void) buffW[0] = 'x'; buffW[1] = 0; SetLastError(0xdeadbeef); ret = pPathUnExpandEnvStringsW(pathW, buffW, ARRAY_SIZE(buffW)); - ok(!ret && GetLastError() == 0xdeadbeef, "got %d, error %d\n", ret, GetLastError()); + ok(!ret && GetLastError() == 0xdeadbeef, "got %d, error %ld\n", ret, GetLastError()); ok(buffW[0] == 'x', "wrong return string %s\n", wine_dbgstr_w(buffW));
len = GetSystemDirectoryW(pathW, MAX_PATH); @@ -1599,14 +1599,14 @@ static void test_PathUnExpandEnvStrings(void) buffW[0] = 'x'; buffW[1] = 0; SetLastError(0xdeadbeef); ret = pPathUnExpandEnvStringsW(pathW, buffW, 5); - ok(!ret && GetLastError() == 0xdeadbeef, "got %d, error %d\n", ret, GetLastError()); + ok(!ret && GetLastError() == 0xdeadbeef, "got %d, error %ld\n", ret, GetLastError()); ok(buffW[0] == 'x', "wrong return string %s\n", wine_dbgstr_w(buffW));
/* buffer size is enough to hold variable name only */ buffW[0] = 'x'; buffW[1] = 0; SetLastError(0xdeadbeef); ret = pPathUnExpandEnvStringsW(pathW, buffW, ARRAY_SIZE(sysrootW)); - ok(!ret && GetLastError() == 0xdeadbeef, "got %d, error %d\n", ret, GetLastError()); + ok(!ret && GetLastError() == 0xdeadbeef, "got %d, error %ld\n", ret, GetLastError()); ok(buffW[0] == 'x', "wrong return string %s\n", wine_dbgstr_w(buffW));
/* enough size */ diff --git a/dlls/shlwapi/tests/shreg.c b/dlls/shlwapi/tests/shreg.c index ca7fbad289e..3ce0551db39 100644 --- a/dlls/shlwapi/tests/shreg.c +++ b/dlls/shlwapi/tests/shreg.c @@ -83,7 +83,7 @@ static HKEY create_test_entries(void) SetEnvironmentVariableA("FOO", sEnvvar2);
ret = RegCreateKeyA(HKEY_CURRENT_USER, REG_TEST_KEY, &hKey); - ok( ERROR_SUCCESS == ret, "RegCreateKeyA failed, ret=%u\n", ret); + ok( ERROR_SUCCESS == ret, "RegCreateKeyA failed, ret=%lu\n", ret);
if (hKey) { @@ -98,13 +98,13 @@ static HKEY create_test_entries(void) nExpectedLen1 = strlen(sTestpath1) - strlen("%LONGSYSTEMVAR%") + strlen(sEnvvar1) + 1; nExpectedLen2 = strlen(sTestpath2) - strlen("%FOO%") + strlen(sEnvvar2) + 1; /* ExpandEnvironmentStringsA on NT4 returns 2x the correct result */ - trace("sExplen1 = (%d)\n", nExpLen1); + trace("sExplen1 = (%ld)\n", nExpLen1); if (nExpectedLen1 != nExpLen1) - trace( "Expanding %s failed (expected %d) - known bug in NT4\n", sTestpath1, nExpectedLen1 ); + trace( "Expanding %s failed (expected %ld) - known bug in NT4\n", sTestpath1, nExpectedLen1 );
- trace("sExplen2 = (%d)\n", nExpLen2); + trace("sExplen2 = (%ld)\n", nExpLen2); if (nExpectedLen2 != nExpLen2) - trace( "Expanding %s failed (expected %d) - known bug in NT4\n", sTestpath2, nExpectedLen2 ); + trace( "Expanding %s failed (expected %ld) - known bug in NT4\n", sTestpath2, nExpectedLen2 );
/* Make sure we carry on with correct values */ nExpLen1 = nExpectedLen1; @@ -123,21 +123,21 @@ static void test_SHGetValue(void) dwSize = MAX_PATH; dwType = -1; dwRet = SHGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test1", &dwType, buf, &dwSize); - ok( ERROR_SUCCESS == dwRet, "SHGetValueA failed, ret=%u\n", dwRet); + ok( ERROR_SUCCESS == dwRet, "SHGetValueA failed, ret=%lu\n", dwRet); ok( 0 == strcmp(sExpTestpath1, buf) || broken(0 == strcmp(sTestpath1, buf)), /* IE4.x */ "Comparing of (%s) with (%s) failed\n", buf, sExpTestpath1); ok( REG_SZ == dwType || broken(REG_EXPAND_SZ == dwType), /* IE4.x */ - "Expected REG_SZ, got (%u)\n", dwType); + "Expected REG_SZ, got (%lu)\n", dwType);
strcpy(buf, sEmptyBuffer); dwSize = MAX_PATH; dwType = -1; dwRet = SHGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test2", &dwType, buf, &dwSize); - ok( ERROR_SUCCESS == dwRet, "SHGetValueA failed, ret=%u\n", dwRet); + ok( ERROR_SUCCESS == dwRet, "SHGetValueA failed, ret=%lu\n", dwRet); ok( 0 == strcmp(sTestpath1, buf) , "Comparing of (%s) with (%s) failed\n", buf, sTestpath1); - ok( REG_SZ == dwType , "Expected REG_SZ, got (%u)\n", dwType); + ok( REG_SZ == dwType , "Expected REG_SZ, got (%lu)\n", dwType); }
static void test_SHRegGetValue(void) @@ -151,31 +151,31 @@ static void test_SHRegGetValue(void)
size = MAX_PATH; ret = pSHRegGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test1", SRRF_RT_REG_EXPAND_SZ, &type, data, &size); - ok(ret == ERROR_INVALID_PARAMETER, "SHRegGetValue failed, ret=%u\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "SHRegGetValue failed, ret=%lu\n", ret);
size = MAX_PATH; ret = pSHRegGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test1", SRRF_RT_REG_SZ, &type, data, &size); - ok(ret == ERROR_SUCCESS, "SHRegGetValue failed, ret=%u\n", ret); + ok(ret == ERROR_SUCCESS, "SHRegGetValue failed, ret=%lu\n", ret); ok(!strcmp(data, sExpTestpath1), "data = %s, expected %s\n", data, sExpTestpath1); - ok(type == REG_SZ, "type = %d, expected REG_SZ\n", type); + ok(type == REG_SZ, "type = %ld, expected REG_SZ\n", type);
size = MAX_PATH; ret = pSHRegGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test1", SRRF_RT_REG_DWORD, &type, data, &size); - ok(ret == ERROR_UNSUPPORTED_TYPE, "SHRegGetValue failed, ret=%u\n", ret); + ok(ret == ERROR_UNSUPPORTED_TYPE, "SHRegGetValue failed, ret=%lu\n", ret);
size = MAX_PATH; ret = pSHRegGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test2", SRRF_RT_REG_EXPAND_SZ, &type, data, &size); - ok(ret == ERROR_INVALID_PARAMETER, "SHRegGetValue failed, ret=%u\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "SHRegGetValue failed, ret=%lu\n", ret);
size = MAX_PATH; ret = pSHRegGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test2", SRRF_RT_REG_SZ, &type, data, &size); - ok(ret == ERROR_SUCCESS, "SHRegGetValue failed, ret=%u\n", ret); + ok(ret == ERROR_SUCCESS, "SHRegGetValue failed, ret=%lu\n", ret); ok(!strcmp(data, sTestpath1), "data = %s, expected %s\n", data, sTestpath1); - ok(type == REG_SZ, "type = %d, expected REG_SZ\n", type); + ok(type == REG_SZ, "type = %ld, expected REG_SZ\n", type);
size = MAX_PATH; ret = pSHRegGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test2", SRRF_RT_REG_QWORD, &type, data, &size); - ok(ret == ERROR_UNSUPPORTED_TYPE, "SHRegGetValue failed, ret=%u\n", ret); + ok(ret == ERROR_UNSUPPORTED_TYPE, "SHRegGetValue failed, ret=%lu\n", ret); }
static void test_SHGetRegPath(void) @@ -188,7 +188,7 @@ static void test_SHGetRegPath(void)
strcpy(buf, sEmptyBuffer); dwRet = (*pSHRegGetPathA)(HKEY_CURRENT_USER, REG_TEST_KEY, "Test1", buf, 0); - ok( ERROR_SUCCESS == dwRet, "SHRegGetPathA failed, ret=%u\n", dwRet); + ok( ERROR_SUCCESS == dwRet, "SHRegGetPathA failed, ret=%lu\n", dwRet); ok( 0 == strcmp(sExpTestpath1, buf) , "Comparing (%s) with (%s) failed\n", buf, sExpTestpath1); }
@@ -204,7 +204,7 @@ static void test_SHQueryValueEx(void)
sTestedFunction = "RegOpenKeyExA"; dwRet = RegOpenKeyExA(HKEY_CURRENT_USER, REG_TEST_KEY, 0, KEY_QUERY_VALUE, &hKey); - ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%u\n", sTestedFunction, dwRet); + ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%lu\n", sTestedFunction, dwRet);
/****** SHQueryValueExA ******/
@@ -215,15 +215,15 @@ static void test_SHQueryValueEx(void) * Case 1.1 All arguments are NULL */ dwRet = SHQueryValueExA( hKey, "Test1", NULL, NULL, NULL, NULL); - ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%u\n", sTestedFunction, dwRet); + ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%lu\n", sTestedFunction, dwRet);
/* * Case 1.2 dwType is set */ dwType = -1; dwRet = SHQueryValueExA( hKey, "Test1", NULL, &dwType, NULL, NULL); - ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%u\n", sTestedFunction, dwRet); - ok( REG_SZ == dwType , "Expected REG_SZ, got (%u)\n", dwType); + ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%lu\n", sTestedFunction, dwRet); + ok( REG_SZ == dwType , "Expected REG_SZ, got (%lu)\n", dwType);
/* * dwSize is set @@ -231,18 +231,18 @@ static void test_SHQueryValueEx(void) */ dwSize = 6; dwRet = SHQueryValueExA( hKey, "Test1", NULL, NULL, NULL, &dwSize); - ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%u\n", sTestedFunction, dwRet); - ok( dwSize == nUsedBuffer1, "Buffer sizes (%u) and (%u) are not equal\n", dwSize, nUsedBuffer1); + ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%lu\n", sTestedFunction, dwRet); + ok( dwSize == nUsedBuffer1, "Buffer sizes (%lu) and (%lu) are not equal\n", dwSize, nUsedBuffer1);
/* * dwExpanded > dwUnExpanded */ dwSize = 6; dwRet = SHQueryValueExA( hKey, "Test3", NULL, NULL, NULL, &dwSize); - ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%u\n", sTestedFunction, dwRet); + ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%lu\n", sTestedFunction, dwRet); ok( dwSize >= nUsedBuffer2 || broken(dwSize == (strlen(sTestpath2) + 1)), /* < IE4.x */ - "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2); + "Buffer size (%lu) should be >= (%lu)\n", dwSize, nUsedBuffer2);
/* * Case 1 string shrinks during expanding @@ -251,12 +251,12 @@ static void test_SHQueryValueEx(void) dwSize = 6; dwType = -1; dwRet = SHQueryValueExA( hKey, "Test1", NULL, &dwType, buf, &dwSize); - ok( ERROR_MORE_DATA == dwRet, "Expected ERROR_MORE_DATA, got (%u)\n", dwRet); + ok( ERROR_MORE_DATA == dwRet, "Expected ERROR_MORE_DATA, got (%lu)\n", dwRet); ok( 0 == strcmp(sEmptyBuffer, buf) , "Comparing (%s) with (%s) failed\n", buf, sEmptyBuffer); - ok( dwSize == nUsedBuffer1, "Buffer sizes (%u) and (%u) are not equal\n", dwSize, nUsedBuffer1); + ok( dwSize == nUsedBuffer1, "Buffer sizes (%lu) and (%lu) are not equal\n", dwSize, nUsedBuffer1); ok( REG_SZ == dwType || broken(REG_EXPAND_SZ == dwType), /* < IE6 */ - "Expected REG_SZ, got (%u)\n", dwType); + "Expected REG_SZ, got (%lu)\n", dwType);
/* * string grows during expanding @@ -266,14 +266,14 @@ static void test_SHQueryValueEx(void) dwSize = 6; dwType = -1; dwRet = SHQueryValueExA( hKey, "Test3", NULL, &dwType, buf, &dwSize); - ok( ERROR_MORE_DATA == dwRet, "Expected ERROR_MORE_DATA, got (%u)\n", dwRet); + ok( ERROR_MORE_DATA == dwRet, "Expected ERROR_MORE_DATA, got (%lu)\n", dwRet); ok( 0 == strcmp(sEmptyBuffer, buf) , "Comparing (%s) with (%s) failed\n", buf, sEmptyBuffer); ok( dwSize >= nUsedBuffer2 || broken(dwSize == (strlen(sTestpath2) + 1)), /* < IE6 */ - "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2); + "Buffer size (%lu) should be >= (%lu)\n", dwSize, nUsedBuffer2); ok( REG_SZ == dwType || broken(REG_EXPAND_SZ == dwType), /* < IE6 */ - "Expected REG_SZ, got (%u)\n", dwType); + "Expected REG_SZ, got (%lu)\n", dwType);
/* * string grows during expanding @@ -288,7 +288,7 @@ static void test_SHQueryValueEx(void) ok( ERROR_MORE_DATA == dwRet || broken(ERROR_ENVVAR_NOT_FOUND == dwRet) || /* IE5.5 */ broken(ERROR_SUCCESS == dwRet), /* < IE5.5*/ - "Expected ERROR_MORE_DATA, got (%u)\n", dwRet); + "Expected ERROR_MORE_DATA, got (%lu)\n", dwRet);
todo_wine { @@ -298,8 +298,8 @@ static void test_SHQueryValueEx(void)
ok( dwSize >= nUsedBuffer2 || broken(dwSize == (strlen("") + 1)), /* < IE 5.5 */ - "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2); - ok( REG_SZ == dwType , "Expected REG_SZ, got (%u)\n", dwType); + "Buffer size (%lu) should be >= (%lu)\n", dwSize, nUsedBuffer2); + ok( REG_SZ == dwType , "Expected REG_SZ, got (%lu)\n", dwType);
/* * string grows during expanding @@ -314,7 +314,7 @@ static void test_SHQueryValueEx(void) ok( ERROR_MORE_DATA == dwRet || broken(ERROR_ENVVAR_NOT_FOUND == dwRet) || /* IE5.5 */ broken(ERROR_SUCCESS == dwRet), /* < IE5.5 */ - "Expected ERROR_MORE_DATA, got (%u)\n", dwRet); + "Expected ERROR_MORE_DATA, got (%lu)\n", dwRet);
todo_wine { @@ -326,8 +326,8 @@ static void test_SHQueryValueEx(void) ok( dwSize >= nUsedBuffer2 || broken(dwSize == (strlen(sEnvvar2) + 1)) || /* IE4.01 SP1 (W98) and IE5 (W98SE) */ broken(dwSize == (strlen("") + 1)), /* IE4.01 (NT4) and IE5.x (W2K) */ - "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2); - ok( REG_SZ == dwType , "Expected REG_SZ, got (%u)\n", dwType); + "Buffer size (%lu) should be >= (%lu)\n", dwSize, nUsedBuffer2); + ok( REG_SZ == dwType , "Expected REG_SZ, got (%lu)\n", dwType);
/* * The buffer is NULL but the size is set @@ -336,11 +336,11 @@ static void test_SHQueryValueEx(void) dwSize = 6; dwType = -1; dwRet = SHQueryValueExA( hKey, "Test3", NULL, &dwType, NULL, &dwSize); - ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%u\n", sTestedFunction, dwRet); + ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%lu\n", sTestedFunction, dwRet); ok( dwSize >= nUsedBuffer2 || broken(dwSize == (strlen(sTestpath2) + 1)), /* IE4.01 SP1 (Win98) */ - "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2); - ok( REG_SZ == dwType , "Expected REG_SZ, got (%u)\n", dwType); + "Buffer size (%lu) should be >= (%lu)\n", dwSize, nUsedBuffer2); + ok( REG_SZ == dwType , "Expected REG_SZ, got (%lu)\n", dwType);
RegCloseKey(hKey); } @@ -368,7 +368,7 @@ static void test_SHCopyKey(void) dwRet = RegCreateKeyA(HKEY_CURRENT_USER, REG_TEST_KEY "\CopyDestination", &hKeyDst); if (dwRet || !hKeyDst) { - ok( 0, "Destination couldn't be created, RegCreateKeyA returned (%u)\n", dwRet); + ok( 0, "Destination couldn't be created, RegCreateKeyA returned (%lu)\n", dwRet); return; }
@@ -376,13 +376,13 @@ static void test_SHCopyKey(void) dwRet = RegOpenKeyA(HKEY_LOCAL_MACHINE, REG_CURRENT_VERSION, &hKeySrc); if (dwRet || !hKeySrc) { - ok( 0, "Source couldn't be opened, RegOpenKeyA returned (%u)\n", dwRet); + ok( 0, "Source couldn't be opened, RegOpenKeyA returned (%lu)\n", dwRet); RegCloseKey(hKeyDst); return; }
dwRet = (*pSHCopyKeyA)(hKeySrc, NULL, hKeyDst, 0); - ok ( ERROR_SUCCESS == dwRet, "Copy failed, ret=(%u)\n", dwRet); + ok ( ERROR_SUCCESS == dwRet, "Copy failed, ret=(%lu)\n", dwRet);
RegCloseKey(hKeySrc); RegCloseKey(hKeyDst); @@ -392,7 +392,7 @@ static void test_SHCopyKey(void) dwRet = RegOpenKeyA(HKEY_CURRENT_USER, REG_TEST_KEY "\CopyDestination\Shell Folders", &hKeyDst); if (dwRet || !hKeyDst) { - ok ( 0, "Copy couldn't be opened, RegOpenKeyA returned (%u)\n", dwRet); + ok ( 0, "Copy couldn't be opened, RegOpenKeyA returned (%lu)\n", dwRet); return; }
@@ -433,7 +433,7 @@ static void test_SHDeleteKey(void) {
dwRet = SHDeleteKeyA(HKEY_CURRENT_USER, REG_TEST_KEY "\ODBC"); - ok ( ERROR_SUCCESS == dwRet, "SHDeleteKey failed, ret=(%u)\n", dwRet); + ok ( ERROR_SUCCESS == dwRet, "SHDeleteKey failed, ret=(%lu)\n", dwRet);
dwRet = RegOpenKeyA(HKEY_CURRENT_USER, REG_TEST_KEY "\ODBC", &hKeyS); ok ( ERROR_FILE_NOT_FOUND == dwRet, "SHDeleteKey did not delete\n"); @@ -457,7 +457,7 @@ static void test_SHRegCreateUSKeyW(void) }
ret = pSHRegCreateUSKeyW(subkeyW, KEY_ALL_ACCESS, NULL, NULL, SHREGSET_FORCE_HKCU); - ok(ret == ERROR_INVALID_PARAMETER, "got %d\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "got %ld\n", ret); }
static void test_SHRegCloseUSKey(void) @@ -473,20 +473,20 @@ static void test_SHRegCloseUSKey(void) }
ret = pSHRegCloseUSKey(NULL); - ok(ret == ERROR_INVALID_PARAMETER, "got %d\n", ret); + ok(ret == ERROR_INVALID_PARAMETER, "got %ld\n", ret);
ret = pSHRegOpenUSKeyW(localW, KEY_ALL_ACCESS, NULL, &key, FALSE); - ok(ret == ERROR_SUCCESS, "got %d\n", ret); + ok(ret == ERROR_SUCCESS, "got %ld\n", ret);
ret = pSHRegCloseUSKey(key); - ok(ret == ERROR_SUCCESS, "got %d\n", ret); + ok(ret == ERROR_SUCCESS, "got %ld\n", ret);
/* Test with limited rights, specially without KEY_SET_VALUE */ ret = pSHRegOpenUSKeyW(localW, KEY_QUERY_VALUE, NULL, &key, FALSE); - ok(ret == ERROR_SUCCESS, "got %d\n", ret); + ok(ret == ERROR_SUCCESS, "got %ld\n", ret);
ret = pSHRegCloseUSKey(key); - ok(ret == ERROR_SUCCESS, "got %d\n", ret); + ok(ret == ERROR_SUCCESS, "got %ld\n", ret); }
START_TEST(shreg) diff --git a/dlls/shlwapi/tests/string.c b/dlls/shlwapi/tests/string.c index 77c108e38bf..d988e26acb4 100644 --- a/dlls/shlwapi/tests/string.c +++ b/dlls/shlwapi/tests/string.c @@ -772,7 +772,7 @@ static void test_StrFromTimeIntervalA(void) { StrFromTimeIntervalA(szBuff, 256, result->ms, result->digits);
- ok(!strcmp(result->time_interval, szBuff), "Formatted %d %d wrong: %s\n", + ok(!strcmp(result->time_interval, szBuff), "Formatted %ld %d wrong: %s\n", result->ms, result->digits, szBuff); result++; } @@ -867,14 +867,14 @@ static void test_StrRetToBSTR(void) bstr = 0; ret = pStrRetToBSTR(&strret, NULL, &bstr); ok(ret == S_OK && bstr && !wcscmp(bstr, szTestW), - "STRRET_WSTR: dup failed, ret=0x%08x, bstr %p\n", ret, bstr); + "STRRET_WSTR: dup failed, ret=0x%08lx, bstr %p\n", ret, bstr); SysFreeString(bstr);
strret.uType = STRRET_CSTR; lstrcpyA(U(strret).cStr, "Test"); ret = pStrRetToBSTR(&strret, NULL, &bstr); ok(ret == S_OK && bstr && !wcscmp(bstr, szTestW), - "STRRET_CSTR: dup failed, ret=0x%08x, bstr %p\n", ret, bstr); + "STRRET_CSTR: dup failed, ret=0x%08lx, bstr %p\n", ret, bstr); SysFreeString(bstr);
strret.uType = STRRET_OFFSET; @@ -882,7 +882,7 @@ static void test_StrRetToBSTR(void) strcpy((char*)&iidl, " Test"); ret = pStrRetToBSTR(&strret, iidl, &bstr); ok(ret == S_OK && bstr && !wcscmp(bstr, szTestW), - "STRRET_OFFSET: dup failed, ret=0x%08x, bstr %p\n", ret, bstr); + "STRRET_OFFSET: dup failed, ret=0x%08lx, bstr %p\n", ret, bstr); SysFreeString(bstr);
/* Native crashes if str is NULL */ @@ -987,7 +987,7 @@ static void test_SHAnsiToAnsi(void) memset(dest, '\n', sizeof(dest)); dwRet = pSHAnsiToAnsi("hello", dest, ARRAY_SIZE(dest)); ok(dwRet == 6 && !memcmp(dest, "hello\0\n\n", sizeof(dest)), - "SHAnsiToAnsi: expected 6, "hello\0\n\n", got %d, "%d,%d,%d,%d,%d,%d,%d,%d"\n", + "SHAnsiToAnsi: expected 6, "hello\0\n\n", got %ld, "%d,%d,%d,%d,%d,%d,%d,%d"\n", dwRet, dest[0], dest[1], dest[2], dest[3], dest[4], dest[5], dest[6], dest[7]); }
@@ -1014,7 +1014,7 @@ static void test_SHUnicodeToUnicode(void) memcpy(dest, lpInit, sizeof(lpInit)); dwRet = pSHUnicodeToUnicode(lpSrc, dest, ARRAY_SIZE(dest)); ok(dwRet == 6 && !memcmp(dest, lpRes, sizeof(dest)), - "SHUnicodeToUnicode: expected 6, "hello\0\n\n", got %d, "%d,%d,%d,%d,%d,%d,%d,%d"\n", + "SHUnicodeToUnicode: expected 6, "hello\0\n\n", got %ld, "%d,%d,%d,%d,%d,%d,%d,%d"\n", dwRet, dest[0], dest[1], dest[2], dest[3], dest[4], dest[5], dest[6], dest[7]); }
@@ -1098,7 +1098,7 @@ if (0) U(strret).pOleStr = StrDupW(wstr1); hres = pStrRetToBufW(&strret, NULL, wbuf, 10); ok(hres == E_NOT_SUFFICIENT_BUFFER || broken(hres == S_OK) /* winxp */, - "StrRetToBufW returned %08x\n", hres); + "StrRetToBufW returned %08lx\n", hres); if (hres == E_NOT_SUFFICIENT_BUFFER) expect_eq(wbuf[0], 0, WCHAR, "%x"); expect_eq(wbuf[9], 0, WCHAR, "%x"); @@ -1108,14 +1108,14 @@ if (0) strret.uType = STRRET_CSTR; StrCpyNA(U(strret).cStr, str1, MAX_PATH); hres = pStrRetToBufW(&strret, NULL, wbuf, 10); - ok(hres == S_OK, "StrRetToBufW returned %08x\n", hres); + ok(hres == S_OK, "StrRetToBufW returned %08lx\n", hres); ok(!memcmp(wbuf, wstr1, 9*sizeof(WCHAR)) && !wbuf[9], "StrRetToBuf returned %s\n", wine_dbgstr_w(wbuf));
memset(wbuf, 0xbf, sizeof(wbuf)); strret.uType = STRRET_WSTR; U(strret).pOleStr = NULL; hres = pStrRetToBufW(&strret, NULL, wbuf, 10); - ok(hres == E_FAIL, "StrRetToBufW returned %08x\n", hres); + ok(hres == E_FAIL, "StrRetToBufW returned %08lx\n", hres); ok(!wbuf[0], "StrRetToBuf returned %s\n", wine_dbgstr_w(wbuf)); } else @@ -1126,7 +1126,7 @@ if (0) memset(buf, 0xbf, sizeof(buf)); strret.uType = STRRET_CSTR; StrCpyNA(U(strret).cStr, str1, MAX_PATH); - expect_eq2(pStrRetToBufA(&strret, NULL, buf, 10), S_OK, E_NOT_SUFFICIENT_BUFFER /* Vista */, HRESULT, "%x"); + expect_eq2(pStrRetToBufA(&strret, NULL, buf, 10), S_OK, E_NOT_SUFFICIENT_BUFFER /* Vista */, HRESULT, "%lx"); expect_eq(buf[9], 0, CHAR, "%x"); expect_eq(buf[10], (CHAR)0xbf, CHAR, "%x"); } @@ -1554,43 +1554,43 @@ static void test_StrCatChainW(void)
/* Test with NULL buffer */ ret = pStrCatChainW(NULL, 0, 0, beefW); - ok(ret == 0, "Expected StrCatChainW to return 0, got %u\n", ret); + ok(ret == 0, "Expected StrCatChainW to return 0, got %lu\n", ret);
/* Test with empty buffer */ memset(buf, 0x11, sizeof(buf)); ret = pStrCatChainW(buf, 0, 0, beefW); - ok(ret == 0, "Expected StrCatChainW to return 0, got %u\n", ret); + ok(ret == 0, "Expected StrCatChainW to return 0, got %lu\n", ret); ok(buf[0] == 0x1111, "Expected buf[0] = 0x1111, got %x\n", buf[0]);
memcpy(buf, deadbeefW, sizeof(deadbeefW)); ret = pStrCatChainW(buf, 0, -1, beefW); - ok(ret == 8, "Expected StrCatChainW to return 8, got %u\n", ret); + ok(ret == 8, "Expected StrCatChainW to return 8, got %lu\n", ret); ok(!memcmp(buf, deadbeefW, sizeof(deadbeefW)), "Buffer contains wrong data\n");
/* Append data to existing string with offset = -1 */ memset(buf, 0x11, sizeof(buf)); ret = pStrCatChainW(buf, 32, 0, deadW); - ok(ret == 4, "Expected StrCatChainW to return 4, got %u\n", ret); + ok(ret == 4, "Expected StrCatChainW to return 4, got %lu\n", ret); ok(!memcmp(buf, deadW, sizeof(deadW)), "Buffer contains wrong data\n");
ret = pStrCatChainW(buf, 32, -1, beefW); - ok(ret == 8, "Expected StrCatChainW to return 8, got %u\n", ret); + ok(ret == 8, "Expected StrCatChainW to return 8, got %lu\n", ret); ok(!memcmp(buf, deadbeefW, sizeof(deadbeefW)), "Buffer contains wrong data\n");
/* Append data at a fixed offset */ memset(buf, 0x11, sizeof(buf)); ret = pStrCatChainW(buf, 32, 0, deadW); - ok(ret == 4, "Expected StrCatChainW to return 4, got %u\n", ret); + ok(ret == 4, "Expected StrCatChainW to return 4, got %lu\n", ret); ok(!memcmp(buf, deadW, sizeof(deadW)), "Buffer contains wrong data\n");
ret = pStrCatChainW(buf, 32, 4, beefW); - ok(ret == 8, "Expected StrCatChainW to return 8, got %u\n", ret); + ok(ret == 8, "Expected StrCatChainW to return 8, got %lu\n", ret); ok(!memcmp(buf, deadbeefW, sizeof(deadbeefW)), "Buffer contains wrong data\n");
/* Buffer exactly sufficient for string + terminating null */ memset(buf, 0x11, sizeof(buf)); ret = pStrCatChainW(buf, 5, 0, deadW); - ok(ret == 4, "Expected StrCatChainW to return 4, got %u\n", ret); + ok(ret == 4, "Expected StrCatChainW to return 4, got %lu\n", ret); ok(!memcmp(buf, deadW, sizeof(deadW)), "Buffer contains wrong data\n");
/* Buffer too small, string will be truncated */ @@ -1604,14 +1604,14 @@ static void test_StrCatChainW(void) win_skip("Windows2000/XP behaviour detected for StrCatChainW, skipping tests\n"); return; } - ok(ret == 3, "Expected StrCatChainW to return 3, got %u\n", ret); + ok(ret == 3, "Expected StrCatChainW to return 3, got %lu\n", ret); ok(!memcmp(buf, deadW, 3 * sizeof(WCHAR)), "Buffer contains wrong data\n"); ok(!buf[3], "String is not nullterminated\n"); ok(buf[4] == 0x1111, "Expected buf[4] = 0x1111, got %x\n", buf[4]);
/* Overwrite part of an existing string */ ret = pStrCatChainW(buf, 4, 1, beefW); - ok(ret == 3, "Expected StrCatChainW to return 3, got %u\n", ret); + ok(ret == 3, "Expected StrCatChainW to return 3, got %lu\n", ret); ok(buf[0] == 'D', "Expected buf[0] = 'D', got %x\n", buf[0]); ok(buf[1] == 'B', "Expected buf[1] = 'B', got %x\n", buf[1]); ok(buf[2] == 'e', "Expected buf[2] = 'e', got %x\n", buf[2]); @@ -1623,35 +1623,35 @@ static void test_StrCatChainW(void) memcpy(buf, deadbeefW, sizeof(deadbeefW)); memcpy(buf + 9, deadW, sizeof(deadW)); ret = pStrCatChainW(buf, 9, 8, beefW); - ok(ret == 8, "Expected StrCatChainW to return 8, got %u\n", ret); + ok(ret == 8, "Expected StrCatChainW to return 8, got %lu\n", ret); ok(!memcmp(buf, deadbeefW, sizeof(deadbeefW)), "Buffer contains wrong data\n"); ok(!memcmp(buf + 9, deadW, sizeof(deadW)), "Buffer contains wrong data\n");
/* Offset points at the end of the buffer */ ret = pStrCatChainW(buf, 9, 9, beefW); - ok(ret == 8, "Expected StrCatChainW to return 8, got %u\n", ret); + ok(ret == 8, "Expected StrCatChainW to return 8, got %lu\n", ret); ok(!memcmp(buf, deadbeefW, sizeof(deadbeefW)), "Buffer contains wrong data\n"); ok(!memcmp(buf + 9, deadW, sizeof(deadW)), "Buffer contains wrong data\n");
/* Offset points outside of the buffer */ ret = pStrCatChainW(buf, 9, 10, beefW); - ok(ret == 10, "Expected StrCatChainW to return 10, got %u\n", ret); + ok(ret == 10, "Expected StrCatChainW to return 10, got %lu\n", ret); ok(!memcmp(buf, deadbeefW, sizeof(deadbeefW)), "Buffer contains wrong data\n"); ok(!memcmp(buf + 9, deadW, sizeof(deadW)), "Buffer contains wrong data\n");
/* The same but without nullterminated string */ memcpy(buf, deadbeefW, sizeof(deadbeefW)); ret = pStrCatChainW(buf, 5, -1, deadW); - ok(ret == 8, "Expected StrCatChainW to return 8, got %u\n", ret); + ok(ret == 8, "Expected StrCatChainW to return 8, got %lu\n", ret); ok(!memcmp(buf, deadbeefW, sizeof(deadbeefW)), "Buffer contains wrong data\n");
ret = pStrCatChainW(buf, 5, 5, deadW); - ok(ret == 4, "Expected StrCatChainW to return 4, got %u\n", ret); + ok(ret == 4, "Expected StrCatChainW to return 4, got %lu\n", ret); ok(!memcmp(buf, deadW, sizeof(deadW)), "Buffer contains wrong data\n"); ok(buf[5] == 'e', "Expected buf[5] = 'e', got %x\n", buf[5]);
ret = pStrCatChainW(buf, 5, 6, deadW); - ok(ret == 6, "Expected StrCatChainW to return 6, got %u\n", ret); + ok(ret == 6, "Expected StrCatChainW to return 6, got %lu\n", ret); ok(!memcmp(buf, deadW, sizeof(deadW)), "Buffer contains wrong data\n"); ok(buf[5] == 'e', "Expected buf[5] = 'e', got %x\n", buf[5]); } diff --git a/dlls/shlwapi/tests/thread.c b/dlls/shlwapi/tests/thread.c index 34eb98ca607..65a13a3ef49 100644 --- a/dlls/shlwapi/tests/thread.c +++ b/dlls/shlwapi/tests/thread.c @@ -104,44 +104,44 @@ static void test_SHCreateThreadRef(void)
/* start with a clean state */ hr = pSHSetThreadRef(NULL); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr);
pobj = NULL; refcount = 0xdeadbeef; hr = pSHCreateThreadRef(&refcount, &pobj); ok((hr == S_OK) && pobj && (refcount == 1), - "got 0x%x and %p with %d (expected S_OK and '!= NULL' with 1)\n", + "got 0x%lx and %p with %ld (expected S_OK and '!= NULL' with 1)\n", hr, pobj, refcount);
/* the object is not automatic set as ThreadRef */ punk = NULL; hr = pSHGetThreadRef(&punk); ok( (hr == E_NOINTERFACE) && (punk == NULL), - "got 0x%x and %p (expected E_NOINTERFACE and NULL)\n", hr, punk); + "got 0x%lx and %p (expected E_NOINTERFACE and NULL)\n", hr, punk);
/* set the object */ hr = pSHSetThreadRef(pobj); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr);
/* read back */ punk = NULL; hr = pSHGetThreadRef(&punk); ok( (hr == S_OK) && (punk == pobj) && (refcount == 2), - "got 0x%x and %p with %d (expected S_OK and %p with 2)\n", + "got 0x%lx and %p with %ld (expected S_OK and %p with 2)\n", hr, punk, refcount, pobj);
/* free the ref from SHGetThreadRef */ if (SUCCEEDED(hr)) { hr = IUnknown_Release(pobj); ok((hr == 1) && (hr == refcount), - "got %d with %d (expected 1 with 1)\n", hr, refcount); + "got %ld with %ld (expected 1 with 1)\n", hr, refcount); }
/* free the object */ if (pobj) { hr = IUnknown_Release(pobj); ok((hr == 0) && (hr == refcount), - "got %d with %d (expected 0 with 0)\n", hr, refcount); + "got %ld with %ld (expected 0 with 0)\n", hr, refcount); }
if (0) { @@ -149,25 +149,25 @@ static void test_SHCreateThreadRef(void) but the object no longer exist after the *_Release */ punk = NULL; hr = pSHGetThreadRef(&punk); - trace("got 0x%x and %p with %d\n", hr, punk, refcount); + trace("got 0x%lx and %p with %ld\n", hr, punk, refcount); }
/* remove the dead object pointer */ hr = pSHSetThreadRef(NULL); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr);
/* parameter check */ if (0) { /* vista: E_INVALIDARG, XP: crash */ pobj = NULL; hr = pSHCreateThreadRef(NULL, &pobj); - ok(hr == E_INVALIDARG, "got 0x%x (expected E_INVALIDARG)\n", hr); + ok(hr == E_INVALIDARG, "got 0x%lx (expected E_INVALIDARG)\n", hr);
refcount = 0xdeadbeef; /* vista: E_INVALIDARG, XP: crash */ hr = pSHCreateThreadRef(&refcount, NULL); ok( (hr == E_INVALIDARG) && (refcount == 0xdeadbeef), - "got 0x%x with 0x%x (expected E_INVALIDARG and oxdeadbeef)\n", + "got 0x%lx with 0x%lx (expected E_INVALIDARG and oxdeadbeef)\n", hr, refcount); } } @@ -187,7 +187,7 @@ static void test_SHGetThreadRef(void) punk = NULL; hr = pSHGetThreadRef(&punk); ok( (hr == E_NOINTERFACE) && (punk == NULL), - "got 0x%x and %p (expected E_NOINTERFACE and NULL)\n", hr, punk); + "got 0x%lx and %p (expected E_NOINTERFACE and NULL)\n", hr, punk);
if (0) { /* this crash on Windows */ @@ -210,7 +210,7 @@ static void test_SHSetThreadRef(void)
/* start with a clean state */ hr = pSHSetThreadRef(NULL); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr);
/* build and set out object */ init_threadref(&ref, &refcount); @@ -218,7 +218,7 @@ static void test_SHSetThreadRef(void) refcount = 1; hr = pSHSetThreadRef(&ref.IUnknown_iface); ok( (hr == S_OK) && (refcount == 1) && (!AddRef_called), - "got 0x%x with %d, %d (expected S_OK with 1, 0)\n", + "got 0x%lx with %ld, %ld (expected S_OK with 1, 0)\n", hr, refcount, AddRef_called);
/* read back our object */ @@ -227,17 +227,17 @@ static void test_SHSetThreadRef(void) punk = NULL; hr = pSHGetThreadRef(&punk); ok( (hr == S_OK) && (punk == &ref.IUnknown_iface) && (refcount == 2) && (AddRef_called == 1), - "got 0x%x and %p with %d, %d (expected S_OK and %p with 2, 1)\n", + "got 0x%lx and %p with %ld, %ld (expected S_OK and %p with 2, 1)\n", hr, punk, refcount, AddRef_called, &ref);
/* clear the object pointer */ hr = pSHSetThreadRef(NULL); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); + ok(hr == S_OK, "got 0x%lx (expected S_OK)\n", hr);
/* verify, that our object is no longer known as ThreadRef */ hr = pSHGetThreadRef(&punk); ok( (hr == E_NOINTERFACE) && (punk == NULL), - "got 0x%x and %p (expected E_NOINTERFACE and NULL)\n", hr, punk); + "got 0x%lx and %p (expected E_NOINTERFACE and NULL)\n", hr, punk);
}
diff --git a/dlls/shlwapi/tests/url.c b/dlls/shlwapi/tests/url.c index c6c7e26cec6..476358c6d45 100644 --- a/dlls/shlwapi/tests/url.c +++ b/dlls/shlwapi/tests/url.c @@ -489,17 +489,17 @@ static void test_UrlApplyScheme(void) strcpy(newurl, "untouched"); res = UrlApplySchemeA(TEST_APPLY[i].url, newurl, &len, TEST_APPLY[i].flags); ok( res == TEST_APPLY[i].res, - "#%dA: got HRESULT 0x%x (expected 0x%x)\n", i, res, TEST_APPLY[i].res); + "#%ldA: got HRESULT 0x%lx (expected 0x%lx)\n", i, res, TEST_APPLY[i].res); if (res == S_OK) { - ok(len == strlen(newurl), "Test %u: Expected length %u, got %u.\n", i, strlen(newurl), len); - ok(!strcmp(newurl, TEST_APPLY[i].newurl), "Test %u: Expected %s, got %s.\n", + ok(len == strlen(newurl), "Test %lu: Expected length %Iu, got %lu.\n", i, strlen(newurl), len); + ok(!strcmp(newurl, TEST_APPLY[i].newurl), "Test %lu: Expected %s, got %s.\n", i, debugstr_a(TEST_APPLY[i].newurl), debugstr_a(newurl)); } else { - ok(len == ARRAY_SIZE(newurl), "Test %u: Got length %u.\n", i, len); - ok(!strcmp(newurl, "untouched"), "Test %u: Got %s.\n", i, debugstr_a(newurl)); + ok(len == ARRAY_SIZE(newurl), "Test %lu: Got length %lu.\n", i, len); + ok(!strcmp(newurl, "untouched"), "Test %lu: Got %s.\n", i, debugstr_a(newurl)); }
/* returned length is in character */ @@ -510,17 +510,17 @@ static void test_UrlApplyScheme(void) wcscpy(newurlW, L"untouched"); res = UrlApplySchemeW(urlW, newurlW, &len, TEST_APPLY[i].flags); ok( res == TEST_APPLY[i].res, - "#%dW: got HRESULT 0x%x (expected 0x%x)\n", i, res, TEST_APPLY[i].res); + "#%ldW: got HRESULT 0x%lx (expected 0x%lx)\n", i, res, TEST_APPLY[i].res); if (res == S_OK) { - ok(len == wcslen(newurlW), "Test %u: Expected length %u, got %u.\n", i, wcslen(newurlW), len); - ok(!wcscmp(newurlW, expectW), "Test %u: Expected %s, got %s.\n", + ok(len == wcslen(newurlW), "Test %lu: Expected length %Iu, got %lu.\n", i, wcslen(newurlW), len); + ok(!wcscmp(newurlW, expectW), "Test %lu: Expected %s, got %s.\n", i, debugstr_w(expectW), debugstr_w(newurlW)); } else { - ok(len == ARRAY_SIZE(newurlW), "Test %u: Got length %u.\n", i, len); - ok(!wcscmp(newurlW, L"untouched"), "Test %u: Got %s.\n", i, debugstr_w(newurlW)); + ok(len == ARRAY_SIZE(newurlW), "Test %lu: Got length %lu.\n", i, len); + ok(!wcscmp(newurlW, L"untouched"), "Test %lu: Got %s.\n", i, debugstr_w(newurlW)); } }
@@ -528,28 +528,28 @@ static void test_UrlApplyScheme(void) lstrcpyA(newurl, untouchedA); len = lstrlenA(TEST_APPLY[0].newurl); res = UrlApplySchemeA(TEST_APPLY[0].url, newurl, &len, TEST_APPLY[0].flags); - ok(res == E_POINTER, "got HRESULT 0x%x (expected E_POINTER)\n", res); + ok(res == E_POINTER, "got HRESULT 0x%lx (expected E_POINTER)\n", res); /* The returned length include the space for the terminating 0 */ i = lstrlenA(TEST_APPLY[0].newurl)+1; - ok(len == i, "got len %d (expected %d)\n", len, i); + ok(len == i, "got len %ld (expected %ld)\n", len, i); ok(!lstrcmpA(newurl, untouchedA), "got '%s' (expected '%s')\n", newurl, untouchedA);
/* NULL as parameter. The length and the buffer are not modified */ lstrcpyA(newurl, untouchedA); len = ARRAY_SIZE(newurl); res = UrlApplySchemeA(NULL, newurl, &len, TEST_APPLY[0].flags); - ok(res == E_INVALIDARG, "got HRESULT 0x%x (expected E_INVALIDARG)\n", res); - ok(len == ARRAY_SIZE(newurl), "got len %d\n", len); + ok(res == E_INVALIDARG, "got HRESULT 0x%lx (expected E_INVALIDARG)\n", res); + ok(len == ARRAY_SIZE(newurl), "got len %ld\n", len); ok(!lstrcmpA(newurl, untouchedA), "got '%s' (expected '%s')\n", newurl, untouchedA);
len = ARRAY_SIZE(newurl); res = UrlApplySchemeA(TEST_APPLY[0].url, NULL, &len, TEST_APPLY[0].flags); - ok(res == E_INVALIDARG, "got HRESULT 0x%x (expected E_INVALIDARG)\n", res); - ok(len == ARRAY_SIZE(newurl), "got len %d\n", len); + ok(res == E_INVALIDARG, "got HRESULT 0x%lx (expected E_INVALIDARG)\n", res); + ok(len == ARRAY_SIZE(newurl), "got len %ld\n", len);
lstrcpyA(newurl, untouchedA); res = UrlApplySchemeA(TEST_APPLY[0].url, newurl, NULL, TEST_APPLY[0].flags); - ok(res == E_INVALIDARG, "got HRESULT 0x%x (expected E_INVALIDARG)\n", res); + ok(res == E_INVALIDARG, "got HRESULT 0x%lx (expected E_INVALIDARG)\n", res); ok(!lstrcmpA(newurl, untouchedA), "got '%s' (expected '%s')\n", newurl, untouchedA);
} @@ -565,12 +565,12 @@ static void hash_url(const char* szUrl) DWORD cbSize = sizeof(DWORD); DWORD dwHash1, dwHash2; res = UrlHashA(szTestUrl, (LPBYTE)&dwHash1, cbSize); - ok(res == S_OK, "UrlHashA returned 0x%x (expected S_OK) for %s\n", res, szUrl); + ok(res == S_OK, "UrlHashA returned 0x%lx (expected S_OK) for %s\n", res, szUrl);
res = UrlHashW(wszTestUrl, (LPBYTE)&dwHash2, cbSize); - ok(res == S_OK, "UrlHashW returned 0x%x (expected S_OK) for %s\n", res, szUrl); + ok(res == S_OK, "UrlHashW returned 0x%lx (expected S_OK) for %s\n", res, szUrl); ok(dwHash1 == dwHash2, - "Hashes didn't match (A: 0x%x, W: 0x%x) for %s\n", dwHash1, dwHash2, szUrl); + "Hashes didn't match (A: 0x%lx, W: 0x%lx) for %s\n", dwHash1, dwHash2, szUrl); FreeWideString(wszTestUrl); }
@@ -751,23 +751,23 @@ static void test_UrlGetPart(void) winetest_mute_threshold = 5;
hr = UrlGetPartA(NULL, NULL, NULL, URL_PART_SCHEME, 0); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = UrlGetPartA(NULL, buffer, &size, URL_PART_SCHEME, 0); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = UrlGetPartA("res://some.dll/find.dlg", NULL, &size, URL_PART_SCHEME, 0); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = UrlGetPartA("res://some.dll/find.dlg", buffer, NULL, URL_PART_SCHEME, 0); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
size = 0; strcpy(buffer, "x"); hr = UrlGetPartA("hi", buffer, &size, URL_PART_SCHEME, 0); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); ok(!strcmp(buffer, "x"), "Got result %s.\n", debugstr_a(buffer)); - ok(!size, "Got size %u.\n", size); + ok(!size, "Got size %lu.\n", size);
for (i = 0; i < ARRAY_SIZE(tests); ++i) { @@ -777,7 +777,7 @@ static void test_UrlGetPart(void) DWORD flags = tests[i].flags; DWORD part = tests[i].part;
- winetest_push_context("URL %s, part %#x, flags %#x", debugstr_a(url), part, flags); + winetest_push_context("URL %s, part %#lx, flags %#lx", debugstr_a(url), part, flags);
size = 1; strcpy(buffer, "x"); @@ -785,14 +785,14 @@ static void test_UrlGetPart(void) todo_wine_if (tests[i].todo_hr) { if (tests[i].hr == S_OK) - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); else - ok(hr == tests[i].hr, "Got hr %#x.\n", hr); + ok(hr == tests[i].hr, "Got hr %#lx.\n", hr); }
if (hr == S_FALSE) { - ok(!size, "Got size %u.\n", size); + ok(!size, "Got size %lu.\n", size); ok(!buffer[0], "Got result %s.\n", debugstr_a(buffer)); } else @@ -802,12 +802,12 @@ static void test_UrlGetPart(void) if (expect) { todo_wine_if (tests[i].todo_hr || tests[i].todo_result) - ok(size == strlen(expect) + 1, "Got size %u.\n", size); + ok(size == strlen(expect) + 1, "Got size %lu.\n", size); } } else { - ok(size == 1, "Got size %u.\n", size); + ok(size == 1, "Got size %lu.\n", size); } ok(!strcmp(buffer, "x"), "Got result %s.\n", debugstr_a(buffer)); } @@ -816,10 +816,10 @@ static void test_UrlGetPart(void) strcpy(buffer, "x"); hr = UrlGetPartA(url, buffer, &size, part, flags); todo_wine_if (tests[i].todo_hr) - ok(hr == tests[i].hr, "Got hr %#x.\n", hr); + ok(hr == tests[i].hr, "Got hr %#lx.\n", hr); if (SUCCEEDED(hr)) { - ok(size == strlen(buffer), "Got size %u.\n", size); + ok(size == strlen(buffer), "Got size %lu.\n", size); if (expect) { todo_wine_if (tests[i].todo_hr || tests[i].todo_result) @@ -828,7 +828,7 @@ static void test_UrlGetPart(void) } else { - ok(size == sizeof(buffer), "Got size %u.\n", size); + ok(size == sizeof(buffer), "Got size %lu.\n", size); ok(!strcmp(buffer, "x"), "Got result %s.\n", debugstr_a(buffer)); }
@@ -840,14 +840,14 @@ static void test_UrlGetPart(void) todo_wine_if (tests[i].todo_hr || tests[i].hr == S_FALSE) { if (tests[i].hr == S_OK) - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); else - ok(hr == (tests[i].hr == S_FALSE ? S_OK : tests[i].hr), "Got hr %#x.\n", hr); + ok(hr == (tests[i].hr == S_FALSE ? S_OK : tests[i].hr), "Got hr %#lx.\n", hr); }
if (SUCCEEDED(hr)) { - ok(!size, "Got size %u.\n", size); + ok(!size, "Got size %lu.\n", size); ok(!buffer[0], "Got result %s.\n", debugstr_a(buffer)); } else @@ -857,12 +857,12 @@ static void test_UrlGetPart(void) if (expect) { todo_wine_if (tests[i].todo_hr || tests[i].todo_result) - ok(size == strlen(expect) + 1, "Got size %u.\n", size); + ok(size == strlen(expect) + 1, "Got size %lu.\n", size); } } else { - ok(size == 1, "Got size %u.\n", size); + ok(size == 1, "Got size %lu.\n", size); } ok(!wcscmp(bufferW, L"x"), "Got result %s.\n", debugstr_w(bufferW)); } @@ -871,16 +871,16 @@ static void test_UrlGetPart(void) wcscpy(bufferW, L"x"); hr = UrlGetPartW(urlW, bufferW, &size, part, flags); todo_wine_if ((tests[i].hr == S_FALSE || tests[i].todo_hr) && strcmp(url, "a:") && strcmp(url, "0:")) - ok(hr == (tests[i].hr == S_FALSE ? S_OK : tests[i].hr), "Got hr %#x.\n", hr); + ok(hr == (tests[i].hr == S_FALSE ? S_OK : tests[i].hr), "Got hr %#lx.\n", hr); if (SUCCEEDED(hr)) { - ok(size == wcslen(bufferW), "Got size %u.\n", size); + ok(size == wcslen(bufferW), "Got size %lu.\n", size); MultiByteToWideChar(CP_ACP, 0, buffer, -1, expectW, ARRAY_SIZE(expectW)); ok(!wcscmp(bufferW, expectW), "Got result %s.\n", debugstr_w(bufferW)); } else { - ok(size == ARRAY_SIZE(bufferW), "Got size %u.\n", size); + ok(size == ARRAY_SIZE(bufferW), "Got size %lu.\n", size); ok(!wcscmp(bufferW, L"x"), "Got result %s.\n", debugstr_w(bufferW)); }
@@ -904,18 +904,18 @@ static void check_url_canonicalize(int index, const char *szUrl, DWORD dwFlags,
dwSize = INTERNET_MAX_URL_LENGTH; ret = UrlCanonicalizeA(szUrl, NULL, &dwSize, dwFlags); - ok(ret == E_INVALIDARG, "Got unexpected hr %#x for index %d.\n", ret, index); + ok(ret == E_INVALIDARG, "Got unexpected hr %#lx for index %d.\n", ret, index); ret = UrlCanonicalizeA(szUrl, szReturnUrl, &dwSize, dwFlags); ok(ret == S_OK || (!szUrl[0] && ret == S_FALSE) /* Vista+ */, - "Got unexpected hr %#x for index %d.\n", ret, index); + "Got unexpected hr %#lx for index %d.\n", ret, index); todo_wine_if (todo) - ok(strcmp(szReturnUrl,szExpectUrl)==0, "UrlCanonicalizeA dwFlags 0x%08x url '%s' Expected "%s", but got "%s", index %d\n", dwFlags, szUrl, szExpectUrl, szReturnUrl, index); + ok(strcmp(szReturnUrl,szExpectUrl)==0, "UrlCanonicalizeA dwFlags 0x%08lx url '%s' Expected "%s", but got "%s", index %d\n", dwFlags, szUrl, szExpectUrl, szReturnUrl, index);
dwSize = INTERNET_MAX_URL_LENGTH; ret = UrlCanonicalizeW(wszUrl, NULL, &dwSize, dwFlags); - ok(ret == E_INVALIDARG, "Got unexpected hr %#x for index %d.\n", ret, index); + ok(ret == E_INVALIDARG, "Got unexpected hr %#lx for index %d.\n", ret, index); ret = UrlCanonicalizeW(wszUrl, wszReturnUrl, &dwSize, dwFlags); - ok(ret == S_OK, "Got unexpected hr %#x for index %d.\n", ret, index); + ok(ret == S_OK, "Got unexpected hr %#lx for index %d.\n", ret, index);
wszConvertedUrl = GetWideString(szReturnUrl); ok(lstrcmpW(wszReturnUrl, wszConvertedUrl)==0, @@ -935,36 +935,36 @@ static void test_UrlEscapeA(void) char empty_string[] = "";
ret = UrlEscapeA("/woningplan/woonkamer basis.swf", NULL, &size, URL_ESCAPE_SPACES_ONLY); - ok(ret == E_INVALIDARG, "got %x, expected %x\n", ret, E_INVALIDARG); - ok(size == 0, "got %d, expected %d\n", size, 0); + ok(ret == E_INVALIDARG, "got %lx, expected %lx\n", ret, E_INVALIDARG); + ok(size == 0, "got %ld, expected %d\n", size, 0);
size = 0; ret = UrlEscapeA("/woningplan/woonkamer basis.swf", empty_string, &size, URL_ESCAPE_SPACES_ONLY); - ok(ret == E_INVALIDARG, "got %x, expected %x\n", ret, E_INVALIDARG); - ok(size == 0, "got %d, expected %d\n", size, 0); + ok(ret == E_INVALIDARG, "got %lx, expected %lx\n", ret, E_INVALIDARG); + ok(size == 0, "got %ld, expected %d\n", size, 0);
size = 1; ret = UrlEscapeA("/woningplan/woonkamer basis.swf", NULL, &size, URL_ESCAPE_SPACES_ONLY); - ok(ret == E_INVALIDARG, "got %x, expected %x\n", ret, E_INVALIDARG); - ok(size == 1, "got %d, expected %d\n", size, 1); + ok(ret == E_INVALIDARG, "got %lx, expected %lx\n", ret, E_INVALIDARG); + ok(size == 1, "got %ld, expected %d\n", size, 1);
size = 1; ret = UrlEscapeA("/woningplan/woonkamer basis.swf", empty_string, NULL, URL_ESCAPE_SPACES_ONLY); - ok(ret == E_INVALIDARG, "got %x, expected %x\n", ret, E_INVALIDARG); - ok(size == 1, "got %d, expected %d\n", size, 1); + ok(ret == E_INVALIDARG, "got %lx, expected %lx\n", ret, E_INVALIDARG); + ok(size == 1, "got %ld, expected %d\n", size, 1);
size = 1; empty_string[0] = 127; ret = UrlEscapeA("/woningplan/woonkamer basis.swf", empty_string, &size, URL_ESCAPE_SPACES_ONLY); - ok(ret == E_POINTER, "got %x, expected %x\n", ret, E_POINTER); - ok(size == 34, "got %d, expected %d\n", size, 34); + ok(ret == E_POINTER, "got %lx, expected %lx\n", ret, E_POINTER); + ok(size == 34, "got %ld, expected %d\n", size, 34); ok(empty_string[0] == 127, "String has changed, empty_string[0] = %d\n", empty_string[0]);
size = 1; empty_string[0] = 127; ret = UrlEscapeA("/woningplan/woonkamer basis.swf", empty_string, &size, URL_ESCAPE_AS_UTF8); - ok(ret == E_NOTIMPL, "Got unexpected hr %#x.\n", ret); - ok(size == 1, "Got unexpected size %u.\n", size); + ok(ret == E_NOTIMPL, "Got unexpected hr %#lx.\n", ret); + ok(size == 1, "Got unexpected size %lu.\n", size); ok(empty_string[0] == 127, "String has changed, empty_string[0] = %d\n", empty_string[0]);
for (i = 0; i < ARRAY_SIZE(TEST_ESCAPE); i++) { @@ -972,7 +972,7 @@ static void test_UrlEscapeA(void)
size = INTERNET_MAX_URL_LENGTH; ret = UrlEscapeA(TEST_ESCAPE[i].url, ret_url, &size, TEST_ESCAPE[i].flags); - ok(ret == S_OK, "Got unexpected hr %#x for %s.\n", ret, debugstr_a(TEST_ESCAPE[i].url)); + ok(ret == S_OK, "Got unexpected hr %#lx for %s.\n", ret, debugstr_a(TEST_ESCAPE[i].url)); ok(!strcmp(ret_url, TEST_ESCAPE[i].expecturl), "Expected "%s", but got "%s" for "%s"\n", TEST_ESCAPE[i].expecturl, ret_url, TEST_ESCAPE[i].url); } @@ -991,56 +991,56 @@ static void test_UrlEscapeW(void) /* Check error paths */
ret = UrlEscapeW(L"/test", NULL, NULL, URL_ESCAPE_SPACES_ONLY); - ok(ret == E_INVALIDARG, "got %x, expected %x\n", ret, E_INVALIDARG); + ok(ret == E_INVALIDARG, "got %lx, expected %lx\n", ret, E_INVALIDARG);
size = 0; ret = UrlEscapeW(L"/test", NULL, &size, URL_ESCAPE_SPACES_ONLY); - ok(ret == E_INVALIDARG, "got %x, expected %x\n", ret, E_INVALIDARG); - ok(size == 0, "got %d, expected %d\n", size, 0); + ok(ret == E_INVALIDARG, "got %lx, expected %lx\n", ret, E_INVALIDARG); + ok(size == 0, "got %ld, expected %d\n", size, 0);
ret = UrlEscapeW(L"/test", empty_string, NULL, URL_ESCAPE_SPACES_ONLY); - ok(ret == E_INVALIDARG, "got %x, expected %x\n", ret, E_INVALIDARG); + ok(ret == E_INVALIDARG, "got %lx, expected %lx\n", ret, E_INVALIDARG);
size = 0; ret = UrlEscapeW(L"/test", empty_string, &size, URL_ESCAPE_SPACES_ONLY); - ok(ret == E_INVALIDARG, "got %x, expected %x\n", ret, E_INVALIDARG); - ok(size == 0, "got %d, expected %d\n", size, 0); + ok(ret == E_INVALIDARG, "got %lx, expected %lx\n", ret, E_INVALIDARG); + ok(size == 0, "got %ld, expected %d\n", size, 0);
ret = UrlEscapeW(L"/test", NULL, NULL, URL_ESCAPE_SPACES_ONLY); - ok(ret == E_INVALIDARG, "got %x, expected %x\n", ret, E_INVALIDARG); + ok(ret == E_INVALIDARG, "got %lx, expected %lx\n", ret, E_INVALIDARG);
size = 1; ret = UrlEscapeW(L"/test", NULL, &size, URL_ESCAPE_SPACES_ONLY); - ok(ret == E_INVALIDARG, "got %x, expected %x\n", ret, E_INVALIDARG); - ok(size == 1, "got %d, expected %d\n", size, 1); + ok(ret == E_INVALIDARG, "got %lx, expected %lx\n", ret, E_INVALIDARG); + ok(size == 1, "got %ld, expected %d\n", size, 1);
ret = UrlEscapeW(L"/test", empty_string, NULL, URL_ESCAPE_SPACES_ONLY); - ok(ret == E_INVALIDARG, "got %x, expected %x\n", ret, E_INVALIDARG); + ok(ret == E_INVALIDARG, "got %lx, expected %lx\n", ret, E_INVALIDARG);
size = 1; ret = UrlEscapeW(L"/test", empty_string, &size, URL_ESCAPE_SPACES_ONLY); - ok(ret == E_POINTER, "got %x, expected %x\n", ret, E_POINTER); - ok(size == 6, "got %d, expected %d\n", size, 6); + ok(ret == E_POINTER, "got %lx, expected %lx\n", ret, E_POINTER); + ok(size == 6, "got %ld, expected %d\n", size, 6);
/* Check actual escaping */
size = ARRAY_SIZE(overwrite); ret = UrlEscapeW(overwrite, overwrite, &size, URL_ESCAPE_SPACES_ONLY); - ok(ret == S_OK, "got %x, expected S_OK\n", ret); - ok(size == 9, "got %d, expected 9\n", size); + ok(ret == S_OK, "got %lx, expected S_OK\n", ret); + ok(size == 9, "got %ld, expected 9\n", size); ok(!wcscmp(overwrite, L"foo%20bar"), "Got unexpected string %s.\n", debugstr_w(overwrite));
size = 1; wc = 127; ret = UrlEscapeW(overwrite, &wc, &size, URL_ESCAPE_SPACES_ONLY); - ok(ret == E_POINTER, "got %x, expected %x\n", ret, E_POINTER); - ok(size == 10, "got %d, expected 10\n", size); + ok(ret == E_POINTER, "got %lx, expected %lx\n", ret, E_POINTER); + ok(size == 10, "got %ld, expected 10\n", size); ok(wc == 127, "String has changed, wc = %d\n", wc);
/* non-ASCII range */ size = ARRAY_SIZE(ret_urlW); ret = UrlEscapeW(L"ftp\x1f\xff\xfa\x2122q/", ret_urlW, &size, 0); - ok(ret == S_OK, "got %x, expected S_OK\n", ret); + ok(ret == S_OK, "got %lx, expected S_OK\n", ret); ok(!wcscmp(ret_urlW, L"ftp%1F%FF%FA\x2122q/"), "Got unexpected string %s.\n", debugstr_w(ret_urlW));
for (i = 0; i < ARRAY_SIZE(TEST_ESCAPE); i++) { @@ -1051,8 +1051,8 @@ static void test_UrlEscapeW(void) urlW = GetWideString(TEST_ESCAPE[i].url); expected_urlW = GetWideString(TEST_ESCAPE[i].expecturl); ret = UrlEscapeW(urlW, ret_urlW, &size, TEST_ESCAPE[i].flags); - ok(ret == S_OK, "Got unexpected hr %#x for %s.\n", ret, debugstr_w(urlW)); - ok(!lstrcmpW(ret_urlW, expected_urlW), "Expected %s, but got %s for %s flags %08x\n", + ok(ret == S_OK, "Got unexpected hr %#lx for %s.\n", ret, debugstr_w(urlW)); + ok(!lstrcmpW(ret_urlW, expected_urlW), "Expected %s, but got %s for %s flags %08lx\n", wine_dbgstr_w(expected_urlW), wine_dbgstr_w(ret_urlW), wine_dbgstr_w(urlW), TEST_ESCAPE[i].flags); FreeWideString(urlW); FreeWideString(expected_urlW); @@ -1063,7 +1063,7 @@ static void test_UrlEscapeW(void)
size = INTERNET_MAX_URL_LENGTH; ret = UrlEscapeW(TEST_ESCAPEW[i].url, ret_url, &size, TEST_ESCAPEW[i].flags); - ok(ret == S_OK, "Got unexpected hr %#x for %s.\n", ret, debugstr_w(TEST_ESCAPEW[i].url)); + ok(ret == S_OK, "Got unexpected hr %#lx for %s.\n", ret, debugstr_w(TEST_ESCAPEW[i].url)); ok(!wcscmp(ret_url, TEST_ESCAPEW[i].expecturl) || broken(!wcscmp(ret_url, TEST_ESCAPEW[i].win7url)), "Expected %s, but got %s for %s.\n", debugstr_w(TEST_ESCAPEW[i].expecturl), @@ -1087,18 +1087,18 @@ static void test_UrlCanonicalizeA(void) /* Parameter checks */ dwSize = ARRAY_SIZE(szReturnUrl); hr = UrlCanonicalizeA(NULL, szReturnUrl, &dwSize, URL_UNESCAPE); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
dwSize = ARRAY_SIZE(szReturnUrl); hr = UrlCanonicalizeA(winehqA, NULL, &dwSize, URL_UNESCAPE); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = UrlCanonicalizeA(winehqA, szReturnUrl, NULL, URL_UNESCAPE); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
dwSize = 0; hr = UrlCanonicalizeA(winehqA, szReturnUrl, &dwSize, URL_UNESCAPE); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
/* buffer has no space for the result */ dwSize=urllen-1; @@ -1107,7 +1107,7 @@ static void test_UrlCanonicalizeA(void) SetLastError(0xdeadbeef); hr = UrlCanonicalizeA(winehqA, szReturnUrl, &dwSize, URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE); ok( (hr == E_POINTER) && (dwSize == (urllen + 1)), - "got 0x%x with %u and size %u for '%s' and %u (expected 'E_POINTER' and size %u)\n", + "got 0x%lx with %lu and size %lu for '%s' and %u (expected 'E_POINTER' and size %lu)\n", hr, GetLastError(), dwSize, szReturnUrl, lstrlenA(szReturnUrl), urllen+1);
/* buffer has no space for the terminating '\0' */ @@ -1117,7 +1117,7 @@ static void test_UrlCanonicalizeA(void) SetLastError(0xdeadbeef); hr = UrlCanonicalizeA(winehqA, szReturnUrl, &dwSize, URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE); ok( (hr == E_POINTER) && (dwSize == (urllen + 1)), - "got 0x%x with %u and size %u for '%s' and %u (expected 'E_POINTER' and size %u)\n", + "got 0x%lx with %lu and size %lu for '%s' and %u (expected 'E_POINTER' and size %lu)\n", hr, GetLastError(), dwSize, szReturnUrl, lstrlenA(szReturnUrl), urllen+1);
/* buffer has the required size */ @@ -1127,7 +1127,7 @@ static void test_UrlCanonicalizeA(void) SetLastError(0xdeadbeef); hr = UrlCanonicalizeA(winehqA, szReturnUrl, &dwSize, URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE); ok( (hr == S_OK) && (dwSize == urllen), - "got 0x%x with %u and size %u for '%s' and %u (expected 'S_OK' and size %u)\n", + "got 0x%lx with %lu and size %lu for '%s' and %u (expected 'S_OK' and size %lu)\n", hr, GetLastError(), dwSize, szReturnUrl, lstrlenA(szReturnUrl), urllen);
/* buffer is larger as the required size */ @@ -1137,7 +1137,7 @@ static void test_UrlCanonicalizeA(void) SetLastError(0xdeadbeef); hr = UrlCanonicalizeA(winehqA, szReturnUrl, &dwSize, URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE); ok( (hr == S_OK) && (dwSize == urllen), - "got 0x%x with %u and size %u for '%s' and %u (expected 'S_OK' and size %u)\n", + "got 0x%lx with %lu and size %lu for '%s' and %u (expected 'S_OK' and size %lu)\n", hr, GetLastError(), dwSize, szReturnUrl, lstrlenA(szReturnUrl), urllen);
/* length is set to 0 */ @@ -1147,7 +1147,7 @@ static void test_UrlCanonicalizeA(void) SetLastError(0xdeadbeef); hr = UrlCanonicalizeA(winehqA, szReturnUrl, &dwSize, URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE); ok( (hr == E_INVALIDARG) && (dwSize == 0), - "got 0x%x with %u and size %u for '%s' and %u (expected 'E_INVALIDARG' and size %u)\n", + "got 0x%lx with %lu and size %lu for '%s' and %u (expected 'E_INVALIDARG' and size %u)\n", hr, GetLastError(), dwSize, szReturnUrl, lstrlenA(szReturnUrl), 0);
/* url length > INTERNET_MAX_URL_SIZE */ @@ -1156,7 +1156,7 @@ static void test_UrlCanonicalizeA(void) memcpy(longurl, winehqA, sizeof(winehqA)-1); longurl[sizeof(longurl)-1] = '\0'; hr = UrlCanonicalizeA(longurl, szReturnUrl, &dwSize, URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE); - ok(hr == S_OK, "hr = %x\n", hr); + ok(hr == S_OK, "hr = %lx\n", hr);
/* test url-modification */ for (i = 0; i < ARRAY_SIZE(TEST_CANONICALIZE); i++) { @@ -1180,18 +1180,18 @@ static void test_UrlCanonicalizeW(void) /* Parameter checks */ dwSize = ARRAY_SIZE(szReturnUrl); hr = UrlCanonicalizeW(NULL, szReturnUrl, &dwSize, URL_UNESCAPE); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
dwSize = ARRAY_SIZE(szReturnUrl); hr = UrlCanonicalizeW(winehqW, NULL, &dwSize, URL_UNESCAPE); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = UrlCanonicalizeW(winehqW, szReturnUrl, NULL, URL_UNESCAPE); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
dwSize = 0; hr = UrlCanonicalizeW(winehqW, szReturnUrl, &dwSize, URL_UNESCAPE); - ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
/* buffer has no space for the result */ dwSize = (urllen-1); @@ -1200,7 +1200,7 @@ static void test_UrlCanonicalizeW(void) SetLastError(0xdeadbeef); hr = UrlCanonicalizeW(winehqW, szReturnUrl, &dwSize, URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE); ok( (hr == E_POINTER) && (dwSize == (urllen + 1)), - "got 0x%x with %u and size %u for %u (expected 'E_POINTER' and size %u)\n", + "got 0x%lx with %lu and size %lu for %u (expected 'E_POINTER' and size %lu)\n", hr, GetLastError(), dwSize, lstrlenW(szReturnUrl), urllen+1);
@@ -1211,7 +1211,7 @@ static void test_UrlCanonicalizeW(void) SetLastError(0xdeadbeef); hr = UrlCanonicalizeW(winehqW, szReturnUrl, &dwSize, URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE); ok( (hr == E_POINTER) && (dwSize == (urllen + 1)), - "got 0x%x with %u and size %u for %u (expected 'E_POINTER' and size %u)\n", + "got 0x%lx with %lu and size %lu for %u (expected 'E_POINTER' and size %lu)\n", hr, GetLastError(), dwSize, lstrlenW(szReturnUrl), urllen+1);
/* buffer has the required size */ @@ -1221,7 +1221,7 @@ static void test_UrlCanonicalizeW(void) SetLastError(0xdeadbeef); hr = UrlCanonicalizeW(winehqW, szReturnUrl, &dwSize, URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE); ok( (hr == S_OK) && (dwSize == urllen), - "got 0x%x with %u and size %u for %u (expected 'S_OK' and size %u)\n", + "got 0x%lx with %lu and size %lu for %u (expected 'S_OK' and size %lu)\n", hr, GetLastError(), dwSize, lstrlenW(szReturnUrl), urllen);
/* buffer is larger as the required size */ @@ -1231,7 +1231,7 @@ static void test_UrlCanonicalizeW(void) SetLastError(0xdeadbeef); hr = UrlCanonicalizeW(winehqW, szReturnUrl, &dwSize, URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE); ok( (hr == S_OK) && (dwSize == urllen), - "got 0x%x with %u and size %u for %u (expected 'S_OK' and size %u)\n", + "got 0x%lx with %lu and size %lu for %u (expected 'S_OK' and size %lu)\n", hr, GetLastError(), dwSize, lstrlenW(szReturnUrl), urllen);
/* check that the characters 1..32 are chopped from the end of the string */ @@ -1268,36 +1268,36 @@ static void check_url_combine(const char *szUrl1, const char *szUrl2, DWORD dwFl wszExpectUrl = GetWideString(szExpectUrl);
hr = UrlCombineA(szUrl1, szUrl2, NULL, NULL, dwFlags); - ok(hr == E_INVALIDARG, "UrlCombineA returned 0x%08x, expected 0x%08x\n", hr, E_INVALIDARG); + ok(hr == E_INVALIDARG, "UrlCombineA returned 0x%08lx, expected 0x%08lx\n", hr, E_INVALIDARG);
dwSize = 0; hr = UrlCombineA(szUrl1, szUrl2, NULL, &dwSize, dwFlags); - ok(hr == E_POINTER, "Checking length of string, return was 0x%08x, expected 0x%08x\n", hr, E_POINTER); - ok(dwSize == dwExpectLen+1, "Got length %d, expected %d\n", dwSize, dwExpectLen+1); + ok(hr == E_POINTER, "Checking length of string, return was 0x%08lx, expected 0x%08lx\n", hr, E_POINTER); + ok(dwSize == dwExpectLen+1, "Got length %ld, expected %ld\n", dwSize, dwExpectLen+1);
dwSize--; hr = UrlCombineA(szUrl1, szUrl2, szReturnUrl, &dwSize, dwFlags); - ok(hr == E_POINTER, "UrlCombineA returned 0x%08x, expected 0x%08x\n", hr, E_POINTER); - ok(dwSize == dwExpectLen+1, "Got length %d, expected %d\n", dwSize, dwExpectLen+1); + ok(hr == E_POINTER, "UrlCombineA returned 0x%08lx, expected 0x%08lx\n", hr, E_POINTER); + ok(dwSize == dwExpectLen+1, "Got length %ld, expected %ld\n", dwSize, dwExpectLen+1);
hr = UrlCombineA(szUrl1, szUrl2, szReturnUrl, &dwSize, dwFlags); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); - ok(dwSize == dwExpectLen, "Got length %d, expected %d\n", dwSize, dwExpectLen); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + ok(dwSize == dwExpectLen, "Got length %ld, expected %ld\n", dwSize, dwExpectLen); ok(!strcmp(szReturnUrl, szExpectUrl), "Expected %s, got %s.\n", szExpectUrl, szReturnUrl);
dwSize = 0; hr = UrlCombineW(wszUrl1, wszUrl2, NULL, &dwSize, dwFlags); - ok(hr == E_POINTER, "Checking length of string, return was 0x%08x, expected 0x%08x\n", hr, E_POINTER); - ok(dwSize == dwExpectLen+1, "Got length %d, expected %d\n", dwSize, dwExpectLen+1); + ok(hr == E_POINTER, "Checking length of string, return was 0x%08lx, expected 0x%08lx\n", hr, E_POINTER); + ok(dwSize == dwExpectLen+1, "Got length %ld, expected %ld\n", dwSize, dwExpectLen+1);
dwSize--; hr = UrlCombineW(wszUrl1, wszUrl2, wszReturnUrl, &dwSize, dwFlags); - ok(hr == E_POINTER, "UrlCombineW returned 0x%08x, expected 0x%08x\n", hr, E_POINTER); - ok(dwSize == dwExpectLen+1, "Got length %d, expected %d\n", dwSize, dwExpectLen+1); + ok(hr == E_POINTER, "UrlCombineW returned 0x%08lx, expected 0x%08lx\n", hr, E_POINTER); + ok(dwSize == dwExpectLen+1, "Got length %ld, expected %ld\n", dwSize, dwExpectLen+1);
hr = UrlCombineW(wszUrl1, wszUrl2, wszReturnUrl, &dwSize, dwFlags); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); - ok(dwSize == dwExpectLen, "Got length %d, expected %d\n", dwSize, dwExpectLen); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + ok(dwSize == dwExpectLen, "Got length %ld, expected %ld\n", dwSize, dwExpectLen); wszConvertedUrl = GetWideString(szReturnUrl); ok(!wcscmp(wszReturnUrl, wszConvertedUrl), "Expected %s, got %s.\n", debugstr_w(wszConvertedUrl), debugstr_w(wszReturnUrl)); @@ -1331,20 +1331,20 @@ static void test_UrlCreateFromPath(void) for (i = 0; i < ARRAY_SIZE(TEST_URLFROMPATH); i++) { len = INTERNET_MAX_URL_LENGTH; ret = UrlCreateFromPathA(TEST_URLFROMPATH[i].path, ret_url, &len, 0); - ok(ret == TEST_URLFROMPATH[i].ret, "ret %08x from path %s\n", ret, TEST_URLFROMPATH[i].path); + ok(ret == TEST_URLFROMPATH[i].ret, "ret %08lx from path %s\n", ret, TEST_URLFROMPATH[i].path); ok(!lstrcmpiA(ret_url, TEST_URLFROMPATH[i].url), "url %s from path %s\n", ret_url, TEST_URLFROMPATH[i].path); - ok(len == strlen(ret_url), "ret len %d from path %s\n", len, TEST_URLFROMPATH[i].path); + ok(len == strlen(ret_url), "ret len %ld from path %s\n", len, TEST_URLFROMPATH[i].path);
len = INTERNET_MAX_URL_LENGTH; pathW = GetWideString(TEST_URLFROMPATH[i].path); urlW = GetWideString(TEST_URLFROMPATH[i].url); ret = UrlCreateFromPathW(pathW, ret_urlW, &len, 0); WideCharToMultiByte(CP_ACP, 0, ret_urlW, -1, ret_url, sizeof(ret_url),0,0); - ok(ret == TEST_URLFROMPATH[i].ret, "ret %08x from path L"%s", expected %08x\n", + ok(ret == TEST_URLFROMPATH[i].ret, "ret %08lx from path L"%s", expected %08lx\n", ret, TEST_URLFROMPATH[i].path, TEST_URLFROMPATH[i].ret); ok(!lstrcmpiW(ret_urlW, urlW), "got %s expected %s from path L"%s"\n", ret_url, TEST_URLFROMPATH[i].url, TEST_URLFROMPATH[i].path); - ok(len == lstrlenW(ret_urlW), "ret len %d from path L"%s"\n", len, TEST_URLFROMPATH[i].path); + ok(len == lstrlenW(ret_urlW), "ret len %ld from path L"%s"\n", len, TEST_URLFROMPATH[i].path); FreeWideString(urlW); FreeWideString(pathW); } @@ -1356,9 +1356,9 @@ static void test_UrlIs_null(DWORD flag) { BOOL ret; ret = UrlIsA(NULL, flag); - ok(ret == FALSE, "pUrlIsA(NULL, %d) failed\n", flag); + ok(ret == FALSE, "pUrlIsA(NULL, %ld) failed\n", flag); ret = UrlIsW(NULL, flag); - ok(ret == FALSE, "pUrlIsW(NULL, %d) failed\n", flag); + ok(ret == FALSE, "pUrlIsW(NULL, %ld) failed\n", flag); }
static void test_UrlIs(void) @@ -1431,7 +1431,7 @@ static void test_UrlUnescape(void) dwEscaped=INTERNET_MAX_URL_LENGTH; res = UrlUnescapeA(TEST_URL_UNESCAPE[i].url, szReturnUrl, &dwEscaped, 0); ok(res == S_OK, - "UrlUnescapeA returned 0x%x (expected S_OK) for "%s"\n", + "UrlUnescapeA returned 0x%lx (expected S_OK) for "%s"\n", res, TEST_URL_UNESCAPE[i].url); ok(strcmp(szReturnUrl,TEST_URL_UNESCAPE[i].expect)==0, "Expected "%s", but got "%s" from "%s"\n", TEST_URL_UNESCAPE[i].expect, szReturnUrl, TEST_URL_UNESCAPE[i].url);
@@ -1439,7 +1439,7 @@ static void test_UrlUnescape(void) /* if we set the buffer pointer to NULL here, UrlUnescape fails and the string is not converted */ res = UrlUnescapeA(TEST_URL_UNESCAPE[i].url, szReturnUrl, NULL, 0); ok(res == E_INVALIDARG, - "UrlUnescapeA returned 0x%x (expected E_INVALIDARG) for "%s"\n", + "UrlUnescapeA returned 0x%lx (expected E_INVALIDARG) for "%s"\n", res, TEST_URL_UNESCAPE[i].url); ok(strcmp(szReturnUrl,"")==0, "Expected empty string\n");
@@ -1448,7 +1448,7 @@ static void test_UrlUnescape(void) expected_urlW = GetWideString(TEST_URL_UNESCAPE[i].expect); res = UrlUnescapeW(urlW, ret_urlW, &dwEscaped, 0); ok(res == S_OK, - "UrlUnescapeW returned 0x%x (expected S_OK) for "%s"\n", + "UrlUnescapeW returned 0x%lx (expected S_OK) for "%s"\n", res, TEST_URL_UNESCAPE[i].url);
WideCharToMultiByte(CP_ACP,0,ret_urlW,-1,szReturnUrl,INTERNET_MAX_URL_LENGTH,0,0); @@ -1461,23 +1461,23 @@ static void test_UrlUnescape(void)
dwEscaped = sizeof(inplace); res = UrlUnescapeA(inplace, NULL, &dwEscaped, URL_UNESCAPE_INPLACE); - ok(res == S_OK, "UrlUnescapeA returned 0x%x (expected S_OK)\n", res); + ok(res == S_OK, "UrlUnescapeA returned 0x%lx (expected S_OK)\n", res); ok(!strcmp(inplace, expected), "got %s expected %s\n", inplace, expected); - ok(dwEscaped == 27, "got %d expected 27\n", dwEscaped); + ok(dwEscaped == 27, "got %ld expected 27\n", dwEscaped);
/* if we set the buffer pointer to NULL, the string apparently still gets converted (Google Lively does this) */ res = UrlUnescapeA(another_inplace, NULL, NULL, URL_UNESCAPE_INPLACE); - ok(res == S_OK, "UrlUnescapeA returned 0x%x (expected S_OK)\n", res); + ok(res == S_OK, "UrlUnescapeA returned 0x%lx (expected S_OK)\n", res); ok(!strcmp(another_inplace, expected), "got %s expected %s\n", another_inplace, expected);
dwEscaped = sizeof(inplaceW); res = UrlUnescapeW(inplaceW, NULL, &dwEscaped, URL_UNESCAPE_INPLACE); - ok(res == S_OK, "UrlUnescapeW returned 0x%x (expected S_OK)\n", res); - ok(dwEscaped == 50, "got %d expected 50\n", dwEscaped); + ok(res == S_OK, "UrlUnescapeW returned 0x%lx (expected S_OK)\n", res); + ok(dwEscaped == 50, "got %ld expected 50\n", dwEscaped);
/* if we set the buffer pointer to NULL, the string apparently still gets converted (Google Lively does this) */ res = UrlUnescapeW(another_inplaceW, NULL, NULL, URL_UNESCAPE_INPLACE); - ok(res == S_OK, "UrlUnescapeW returned 0x%x (expected S_OK)\n", res); + ok(res == S_OK, "UrlUnescapeW returned 0x%lx (expected S_OK)\n", res);
ok(lstrlenW(another_inplaceW) == 24, "got %d expected 24\n", lstrlenW(another_inplaceW)); } @@ -1518,7 +1518,7 @@ static void test_ParseURL(void) memset(&parseda, 0xd0, sizeof(parseda)); parseda.cbSize = sizeof(parseda); hres = ParseURLA(test->url, &parseda); - ok(hres == test->hres, "ParseURL failed: %08x, expected %08x\n", hres, test->hres); + ok(hres == test->hres, "ParseURL failed: %08lx, expected %08lx\n", hres, test->hres); if(hres == S_OK) { ok(parseda.pszProtocol == test->url, "parseda.pszProtocol = %s, expected %s\n", parseda.pszProtocol, test->url); @@ -1541,7 +1541,7 @@ static void test_ParseURL(void) memset(&parsedw, 0xd0, sizeof(parsedw)); parsedw.cbSize = sizeof(parsedw); hres = ParseURLW(url, &parsedw); - ok(hres == test->hres, "ParseURL failed: %08x, expected %08x\n", hres, test->hres); + ok(hres == test->hres, "ParseURL failed: %08lx, expected %08lx\n", hres, test->hres); if(hres == S_OK) { ok(parsedw.pszProtocol == url, "parsedw.pszProtocol = %s, expected %s\n", wine_dbgstr_w(parsedw.pszProtocol), wine_dbgstr_w(url)); @@ -1582,28 +1582,28 @@ static void test_HashData(void)
/* Test hashing with identically sized input/output buffers. */ res = HashData(input, 16, output, 16); - ok(res == S_OK, "Expected HashData to return S_OK, got 0x%08x\n", res); + ok(res == S_OK, "Expected HashData to return S_OK, got 0x%08lx\n", res); ok(!memcmp(output, expected, sizeof(expected)), "data didn't match\n");
/* Test hashing with larger output buffer. */ res = HashData(input, 16, output, 32); - ok(res == S_OK, "Expected HashData to return S_OK, got 0x%08x\n", res); + ok(res == S_OK, "Expected HashData to return S_OK, got 0x%08lx\n", res); ok(!memcmp(output, expected2, sizeof(expected2)), "data didn't match\n");
/* Test hashing with smaller input buffer. */ res = HashData(input, 8, output, 16); - ok(res == S_OK, "Expected HashData to return S_OK, got 0x%08x\n", res); + ok(res == S_OK, "Expected HashData to return S_OK, got 0x%08lx\n", res); ok(!memcmp(output, expected3, sizeof(expected3)), "data didn't match\n");
/* Test passing NULL pointers for input/output parameters. */ res = HashData(NULL, 0, NULL, 0); - ok(res == E_INVALIDARG, "Got unexpected hr %#x.\n", res); + ok(res == E_INVALIDARG, "Got unexpected hr %#lx.\n", res);
res = HashData(input, 0, NULL, 0); - ok(res == E_INVALIDARG, "Got unexpected hr %#x.\n", res); + ok(res == E_INVALIDARG, "Got unexpected hr %#lx.\n", res);
res = HashData(NULL, 0, output, 0); - ok(res == E_INVALIDARG, "Got unexpected hr %#x.\n", res); + ok(res == E_INVALIDARG, "Got unexpected hr %#lx.\n", res);
/* Test passing valid pointers with sizes of zero. */ for (i = 0; i < ARRAY_SIZE(input); i++) @@ -1613,7 +1613,7 @@ static void test_HashData(void) output[i] = 0xFF;
res = HashData(input, 0, output, 0); - ok(res == S_OK, "Expected HashData to return S_OK, got 0x%08x\n", res); + ok(res == S_OK, "Expected HashData to return S_OK, got 0x%08lx\n", res);
/* The buffers should be unchanged. */ for (i = 0; i < ARRAY_SIZE(input); i++) @@ -1624,12 +1624,12 @@ static void test_HashData(void)
/* Input/output parameters are not validated. */ res = HashData((BYTE *)0xdeadbeef, 0, (BYTE *)0xdeadbeef, 0); - ok(res == S_OK, "Expected HashData to return S_OK, got 0x%08x\n", res); + ok(res == S_OK, "Expected HashData to return S_OK, got 0x%08lx\n", res);
if (0) { res = HashData((BYTE *)0xdeadbeef, 1, (BYTE *)0xdeadbeef, 1); - trace("HashData returned 0x%08x\n", res); + trace("HashData returned 0x%08lx\n", res); } }
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=109868
Your paranoid android.
=== debian11 (32 bit Hindi:India report) ===
shlwapi: ordinal.c:1736: Test failed: expected (05-03-2022 06:56), got (06:56) ordinal.c:1743: Test failed: expected (05-03-2022 06:56), got (06:56:22) ordinal.c:1751: Test failed: expected (05-03-2022 06:56), got (06:56:22) ordinal.c:1758: Test failed: expected (05-03-2022 06:56), got (05-03-2022) ordinal.c:1765: Test failed: expected (05-03-2022 06:56), got (05 ????? 2022) ordinal.c:1773: Test failed: expected (05-03-2022 06:56), got (05 ????? 2022) ordinal.c:1787: Test failed: expected (05-03-2022 06:56) got (05 ????? 2022, 0) for date part ordinal.c:1801: Test failed: expected (05-03-2022 06:56) got (05 ????? 2022, 0) for date part ordinal.c:1813: Test failed: expected (05-03-2022 06:56 ), got (05-03-2022 06:56) ordinal.c:1824: Test failed: expected (05-03-2022 06:56 ), got (05-03-2022 06:56:22)
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/slc/tests/Makefile.in | 1 - dlls/slc/tests/slc.c | 18 +++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/dlls/slc/tests/Makefile.in b/dlls/slc/tests/Makefile.in index 86f77823a71..51b648cb854 100644 --- a/dlls/slc/tests/Makefile.in +++ b/dlls/slc/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = slc.dll IMPORTS = slc
diff --git a/dlls/slc/tests/slc.c b/dlls/slc/tests/slc.c index fc0b1c84ad7..10a87571e7d 100644 --- a/dlls/slc/tests/slc.c +++ b/dlls/slc/tests/slc.c @@ -33,30 +33,30 @@ static void test_SLGetWindowsInformationDWORD(void) HRESULT res;
res = SLGetWindowsInformationDWORD(L"Nonexistent-License-Value", NULL); - ok(res == E_INVALIDARG, "expected E_INVALIDARG, got %08x\n", res); + ok(res == E_INVALIDARG, "expected E_INVALIDARG, got %08lx\n", res);
res = SLGetWindowsInformationDWORD(NULL, &value); - ok(res == E_INVALIDARG, "expected E_INVALIDARG, got %08x\n", res); + ok(res == E_INVALIDARG, "expected E_INVALIDARG, got %08lx\n", res);
value = 0xdeadbeef; res = SLGetWindowsInformationDWORD(L"Nonexistent-License-Value", &value); - ok(res == SL_E_VALUE_NOT_FOUND, "expected SL_E_VALUE_NOT_FOUND, got %08x\n", res); - ok(value == 0xdeadbeef, "expected value = 0xdeadbeef, got %u\n", value); + ok(res == SL_E_VALUE_NOT_FOUND, "expected SL_E_VALUE_NOT_FOUND, got %08lx\n", res); + ok(value == 0xdeadbeef, "expected value = 0xdeadbeef, got %lu\n", value);
value = 0xdeadbeef; res = SLGetWindowsInformationDWORD(L"", &value); ok(res == SL_E_RIGHT_NOT_GRANTED || broken(res == 0xd000000d) /* Win 8 */, - "expected SL_E_RIGHT_NOT_GRANTED, got %08x\n", res); - ok(value == 0xdeadbeef, "expected value = 0xdeadbeef, got %u\n", value); + "expected SL_E_RIGHT_NOT_GRANTED, got %08lx\n", res); + ok(value == 0xdeadbeef, "expected value = 0xdeadbeef, got %lu\n", value);
value = 0xdeadbeef; res = SLGetWindowsInformationDWORD(L"Kernel-MUI-Language-Allowed", &value); - ok(res == SL_E_DATATYPE_MISMATCHED, "expected SL_E_DATATYPE_MISMATCHED, got %08x\n", res); - ok(value == 0xdeadbeef, "expected value = 0xdeadbeef, got %u\n", value); + ok(res == SL_E_DATATYPE_MISMATCHED, "expected SL_E_DATATYPE_MISMATCHED, got %08lx\n", res); + ok(value == 0xdeadbeef, "expected value = 0xdeadbeef, got %lu\n", value);
value = 0xdeadbeef; res = SLGetWindowsInformationDWORD(L"Kernel-MUI-Number-Allowed", &value); - ok(res == S_OK, "expected S_OK, got %u\n", res); + ok(res == S_OK, "expected S_OK, got %lu\n", res); ok(value != 0xdeadbeef, "expected value != 0xdeadbeef\n"); }
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/spoolss/tests/Makefile.in | 1 - dlls/spoolss/tests/spoolss.c | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/dlls/spoolss/tests/Makefile.in b/dlls/spoolss/tests/Makefile.in index 992090c3745..f54fe5937c1 100644 --- a/dlls/spoolss/tests/Makefile.in +++ b/dlls/spoolss/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = spoolss.dll
C_SRCS = \ diff --git a/dlls/spoolss/tests/spoolss.c b/dlls/spoolss/tests/spoolss.c index acf2801a589..ce55cf50220 100644 --- a/dlls/spoolss/tests/spoolss.c +++ b/dlls/spoolss/tests/spoolss.c @@ -166,7 +166,7 @@ static void test_BuildOtherNamesFromMachineName(void)
todo_wine ok( res && (buffers != NULL) && (numentries >= 3) && (buffers[0] != NULL) && (buffers[0][0] == '\0'), - "got %u with %u and %p,%u (%p:%d)\n", res, GetLastError(), buffers, numentries, + "got %lu with %lu and %p,%lu (%p:%d)\n", res, GetLastError(), buffers, numentries, ((numentries > 0) && buffers) ? buffers[0] : NULL, ((numentries > 0) && buffers && buffers[0]) ? lstrlenW(buffers[0]) : -1);
@@ -183,7 +183,7 @@ static void test_SplInitializeWinSpoolDrv(VOID) memset(fn_spl, 0xff, sizeof(fn_spl)); SetLastError(0xdeadbeef); res = pSplInitializeWinSpoolDrv(fn_spl); - ok(res, "got %u with %u (expected '!= 0')\n", res, GetLastError()); + ok(res, "got %lu with %lu (expected '!= 0')\n", res, GetLastError());
/* functions 0 to 5 are the same in "spoolss.dll" from w2k and above */ if (fn_spl[6] == fn_w2k[6]) { @@ -196,7 +196,7 @@ static void test_SplInitializeWinSpoolDrv(VOID) id = 0; while (id < WINSPOOL_TABLESIZE) { ok( fn_spl[id] == fn_ref[id], - "(#%02u) spoolss: %p (vista: %p, xp: %p, w2k: %p)\n", + "(#%02lu) spoolss: %p (vista: %p, xp: %p, w2k: %p)\n", id, fn_spl[id], fn_v[id], fn_xp[id], fn_w2k[id]); id++; }
Signed-off-by: Huw Davies huw@codeweavers.com
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/sti/tests/Makefile.in | 1 - dlls/sti/tests/sti.c | 20 ++++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/dlls/sti/tests/Makefile.in b/dlls/sti/tests/Makefile.in index 0c14e735f0a..a6735dd09e6 100644 --- a/dlls/sti/tests/Makefile.in +++ b/dlls/sti/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = sti.dll IMPORTS = uuid ole32
diff --git a/dlls/sti/tests/sti.c b/dlls/sti/tests/sti.c index a87ab9fe47e..fdfff62b3f6 100644 --- a/dlls/sti/tests/sti.c +++ b/dlls/sti/tests/sti.c @@ -99,7 +99,7 @@ static void test_version_flag_versus_aw(void) IUnknown_Release((IUnknown*)pStiW); } else - ok(0, "could not create StillImageA, hr = 0x%X\n", hr); + ok(0, "could not create StillImageA, hr = 0x%lX\n", hr); hr = pStiCreateInstance(GetModuleHandleA(NULL), STI_VERSION_REAL | STI_VERSION_FLAG_UNICODE, &pStiW, NULL); if (SUCCEEDED(hr)) { @@ -113,7 +113,7 @@ static void test_version_flag_versus_aw(void) IUnknown_Release((IUnknown*)pStiW); } else - ok(0, "could not create StillImageW, hr = 0x%X\n", hr); + ok(0, "could not create StillImageW, hr = 0x%lX\n", hr); } else skip("No StiCreateInstance function\n"); @@ -134,7 +134,7 @@ static void test_version_flag_versus_aw(void) IUnknown_Release((IUnknown*)pStiA); } else - todo_wine ok(0, "could not create StillImageA, hr = 0x%X\n", hr); + todo_wine ok(0, "could not create StillImageA, hr = 0x%lX\n", hr); } else skip("No StiCreateInstanceA function\n"); @@ -155,7 +155,7 @@ static void test_version_flag_versus_aw(void) IUnknown_Release((IUnknown*)pStiW); } else - ok(0, "could not create StillImageW, hr = 0x%X\n", hr); + ok(0, "could not create StillImageW, hr = 0x%lX\n", hr); } else skip("No StiCreateInstanceW function\n"); @@ -204,12 +204,12 @@ static void test_stillimage_aggregation(void) IStillImage_Release(pStiW2); } else - ok(0, "could not query for IID_IStillImageW, hr = 0x%x\n", hr); + ok(0, "could not query for IID_IStillImageW, hr = 0x%lx\n", hr);
IStillImage_Release(pStiW); } else - ok(0, "could not create StillImageW, hr = 0x%X\n", hr); + ok(0, "could not create StillImageW, hr = 0x%lX\n", hr);
/* Now do the above tests prove that STI.DLL isn't picky about querying for IUnknown in CoCreateInterface when aggregating? */ @@ -220,7 +220,7 @@ static void test_stillimage_aggregation(void) hr = CoCreateInstance(&CLSID_Sti, &aggregator, CLSCTX_ALL, &IID_IUnknown, (void**)&pUnknown); ok(SUCCEEDED(hr) || broken(hr == CLASS_E_NOAGGREGATION), /* Win 2000 */ - "CoCreateInstance unexpectedly failed when querying for IUnknown during aggregation, hr = 0x%x\n", hr); + "CoCreateInstance unexpectedly failed when querying for IUnknown during aggregation, hr = 0x%lx\n", hr); if (SUCCEEDED(hr)) IUnknown_Release(pUnknown); } @@ -249,14 +249,14 @@ static void test_launch_app_registry(void) else if (SUCCEEDED(hr)) { hr = IStillImage_UnregisterLaunchApplication(pStiW, appName); - ok(SUCCEEDED(hr), "could not unregister launch application, error 0x%X\n", hr); + ok(SUCCEEDED(hr), "could not unregister launch application, error 0x%lX\n", hr); } else - ok(0, "could not register launch application, error 0x%X\n", hr); + ok(0, "could not register launch application, error 0x%lX\n", hr); IStillImage_Release(pStiW); } else - ok(0, "could not create StillImageW, hr = 0x%X\n", hr); + ok(0, "could not create StillImageW, hr = 0x%lX\n", hr); }
START_TEST(sti)
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/sxs/tests/Makefile.in | 1 - dlls/sxs/tests/cache.c | 70 ++++++++++++++++++++++---------------------- dlls/sxs/tests/name.c | 66 +++++++++++++++++++++-------------------- dlls/sxs/tests/sxs.c | 38 ++++++++++++------------ 4 files changed, 87 insertions(+), 88 deletions(-)
diff --git a/dlls/sxs/tests/Makefile.in b/dlls/sxs/tests/Makefile.in index fde478921c0..e271d7df7f2 100644 --- a/dlls/sxs/tests/Makefile.in +++ b/dlls/sxs/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = sxs.dll IMPORTS = sxs shlwapi
diff --git a/dlls/sxs/tests/cache.c b/dlls/sxs/tests/cache.c index 59c51ad8866..1254d70b1f0 100644 --- a/dlls/sxs/tests/cache.c +++ b/dlls/sxs/tests/cache.c @@ -89,32 +89,32 @@ static void test_QueryAssemblyInfo( void ) const WCHAR *comctlW;
hr = CreateAssemblyCache( &cache, 0 ); - ok( hr == S_OK, "got %08x\n", hr ); - ok( cache != NULL, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); + ok( cache != NULL, "got %08lx\n", hr );
hr = IAssemblyCache_QueryAssemblyInfo( cache, 0, NULL, NULL ); - ok( hr == E_INVALIDARG, "got %08x\n", hr ); + ok( hr == E_INVALIDARG, "got %08lx\n", hr );
hr = IAssemblyCache_QueryAssemblyInfo( cache, 0, emptyW, NULL ); - ok( hr == E_INVALIDARG, "got %08x\n", hr ); + ok( hr == E_INVALIDARG, "got %08lx\n", hr );
hr = IAssemblyCache_QueryAssemblyInfo( cache, 0, wine1W, NULL ); ok( hr == HRESULT_FROM_WIN32( ERROR_SXS_MISSING_ASSEMBLY_IDENTITY_ATTRIBUTE ) || - broken(hr == E_INVALIDARG) /* winxp */, "got %08x\n", hr ); + broken(hr == E_INVALIDARG) /* winxp */, "got %08lx\n", hr );
hr = IAssemblyCache_QueryAssemblyInfo( cache, 0, wine2W, NULL ); ok( hr == HRESULT_FROM_WIN32( ERROR_SXS_MISSING_ASSEMBLY_IDENTITY_ATTRIBUTE ) || - broken(hr == HRESULT_FROM_WIN32( ERROR_NOT_FOUND )) /* winxp */, "got %08x\n", hr ); + broken(hr == HRESULT_FROM_WIN32( ERROR_NOT_FOUND )) /* winxp */, "got %08lx\n", hr );
hr = IAssemblyCache_QueryAssemblyInfo( cache, 0, wine3W, NULL ); ok( hr == HRESULT_FROM_WIN32( ERROR_SXS_MISSING_ASSEMBLY_IDENTITY_ATTRIBUTE ) || - broken(hr == HRESULT_FROM_WIN32( ERROR_NOT_FOUND )) /* winxp */, "got %08x\n", hr ); + broken(hr == HRESULT_FROM_WIN32( ERROR_NOT_FOUND )) /* winxp */, "got %08lx\n", hr );
hr = IAssemblyCache_QueryAssemblyInfo( cache, 0, wine4W, NULL ); - todo_wine ok( hr == HRESULT_FROM_WIN32( ERROR_NOT_FOUND ), "got %08x\n", hr ); + todo_wine ok( hr == HRESULT_FROM_WIN32( ERROR_NOT_FOUND ), "got %08lx\n", hr );
hr = IAssemblyCache_QueryAssemblyInfo( cache, 0, wine5W, NULL ); - todo_wine ok( hr == HRESULT_FROM_WIN32( ERROR_NOT_FOUND ), "got %08x\n", hr ); + todo_wine ok( hr == HRESULT_FROM_WIN32( ERROR_NOT_FOUND ), "got %08lx\n", hr );
GetWindowsDirectoryA( comctl_path1, MAX_PATH ); lstrcatA( comctl_path1, "\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.2600.2982_none_deadbeef" ); @@ -136,31 +136,31 @@ static void test_QueryAssemblyInfo( void ) }
hr = IAssemblyCache_QueryAssemblyInfo( cache, 0, comctlW, NULL ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
memset( &info, 0, sizeof(info) ); info.cbAssemblyInfo = sizeof(info); hr = IAssemblyCache_QueryAssemblyInfo( cache, 0, wine5W, &info ); - todo_wine ok( hr == HRESULT_FROM_WIN32( ERROR_NOT_FOUND ), "got %08x\n", hr ); + todo_wine ok( hr == HRESULT_FROM_WIN32( ERROR_NOT_FOUND ), "got %08lx\n", hr );
memset( &info, 0, sizeof(info) ); info.cbAssemblyInfo = sizeof(info); hr = IAssemblyCache_QueryAssemblyInfo( cache, 0, comctlW, &info ); - ok( hr == S_OK, "got %08x\n", hr ); - ok( info.dwAssemblyFlags == 1, "got %08x\n", info.dwAssemblyFlags ); - ok( !info.uliAssemblySizeInKB.u.LowPart, "got %u\n", info.uliAssemblySizeInKB.u.LowPart ); + ok( hr == S_OK, "got %08lx\n", hr ); + ok( info.dwAssemblyFlags == 1, "got %08lx\n", info.dwAssemblyFlags ); + ok( !info.uliAssemblySizeInKB.u.LowPart, "got %lu\n", info.uliAssemblySizeInKB.u.LowPart ); ok( info.pszCurrentAssemblyPathBuf == NULL, "got %p\n", info.pszCurrentAssemblyPathBuf ); - ok( !info.cchBuf, "got %u\n", info.cchBuf ); + ok( !info.cchBuf, "got %lu\n", info.cchBuf );
memset( &info, 0, sizeof(info) ); info.cbAssemblyInfo = sizeof(info); info.pszCurrentAssemblyPathBuf = path; info.cchBuf = ARRAY_SIZE( path ); hr = IAssemblyCache_QueryAssemblyInfo( cache, 0, comctlW, &info ); - ok( hr == S_OK, "got %08x\n", hr ); - ok( info.dwAssemblyFlags == 1, "got %08x\n", info.dwAssemblyFlags ); - ok( !info.uliAssemblySizeInKB.u.LowPart, "got %u\n", info.uliAssemblySizeInKB.u.LowPart ); - ok( info.cchBuf == ARRAY_SIZE( path ), "got %u\n", info.cchBuf ); + ok( hr == S_OK, "got %08lx\n", hr ); + ok( info.dwAssemblyFlags == 1, "got %08lx\n", info.dwAssemblyFlags ); + ok( !info.uliAssemblySizeInKB.u.LowPart, "got %lu\n", info.uliAssemblySizeInKB.u.LowPart ); + ok( info.cchBuf == ARRAY_SIZE( path ), "got %lu\n", info.cchBuf ); ok( path[0], "empty path\n" ); lstrcatW( path, L"comctl32.dll" ); ok( GetFileAttributesW( path ) != INVALID_FILE_ATTRIBUTES, "%s should exist\n", wine_dbgstr_w( path )); @@ -169,28 +169,28 @@ static void test_QueryAssemblyInfo( void ) info.cbAssemblyInfo = sizeof(info); info.pszCurrentAssemblyPathBuf = path; hr = IAssemblyCache_QueryAssemblyInfo( cache, 0, comctlW, &info ); - ok( hr == HRESULT_FROM_WIN32( ERROR_INSUFFICIENT_BUFFER ), "got %08x\n", hr ); - ok( info.dwAssemblyFlags == 1, "got %08x\n", info.dwAssemblyFlags ); - ok( !info.uliAssemblySizeInKB.u.LowPart, "got %u\n", info.uliAssemblySizeInKB.u.LowPart ); - ok( info.cchBuf, "got %u\n", info.cchBuf ); + ok( hr == HRESULT_FROM_WIN32( ERROR_INSUFFICIENT_BUFFER ), "got %08lx\n", hr ); + ok( info.dwAssemblyFlags == 1, "got %08lx\n", info.dwAssemblyFlags ); + ok( !info.uliAssemblySizeInKB.u.LowPart, "got %lu\n", info.uliAssemblySizeInKB.u.LowPart ); + ok( info.cchBuf, "got %lu\n", info.cchBuf );
memset( &info, 0, sizeof(info) ); info.cbAssemblyInfo = sizeof(info); hr = IAssemblyCache_QueryAssemblyInfo( cache, 1, comctlW, &info ); - ok( hr == E_INVALIDARG, "got %08x\n", hr ); - ok( !info.dwAssemblyFlags, "got %08x\n", info.dwAssemblyFlags ); - ok( !info.uliAssemblySizeInKB.u.LowPart, "got %u\n", info.uliAssemblySizeInKB.u.LowPart ); + ok( hr == E_INVALIDARG, "got %08lx\n", hr ); + ok( !info.dwAssemblyFlags, "got %08lx\n", info.dwAssemblyFlags ); + ok( !info.uliAssemblySizeInKB.u.LowPart, "got %lu\n", info.uliAssemblySizeInKB.u.LowPart ); ok( info.pszCurrentAssemblyPathBuf == NULL, "got %p\n", info.pszCurrentAssemblyPathBuf ); - ok( !info.cchBuf, "got %u\n", info.cchBuf ); + ok( !info.cchBuf, "got %lu\n", info.cchBuf );
memset( &info, 0, sizeof(info) ); info.cbAssemblyInfo = sizeof(info); hr = IAssemblyCache_QueryAssemblyInfo( cache, 2, comctlW, &info ); - ok( hr == E_INVALIDARG, "got %08x\n", hr ); - ok( !info.dwAssemblyFlags, "got %08x\n", info.dwAssemblyFlags ); - ok( !info.uliAssemblySizeInKB.u.LowPart, "got %u\n", info.uliAssemblySizeInKB.u.LowPart ); + ok( hr == E_INVALIDARG, "got %08lx\n", hr ); + ok( !info.dwAssemblyFlags, "got %08lx\n", info.dwAssemblyFlags ); + ok( !info.uliAssemblySizeInKB.u.LowPart, "got %lu\n", info.uliAssemblySizeInKB.u.LowPart ); ok( info.pszCurrentAssemblyPathBuf == NULL, "got %p\n", info.pszCurrentAssemblyPathBuf ); - ok( !info.cchBuf, "got %u\n", info.cchBuf ); + ok( !info.cchBuf, "got %lu\n", info.cchBuf );
memset( &info, 0, sizeof(info) ); info.cbAssemblyInfo = sizeof(info); @@ -198,10 +198,10 @@ static void test_QueryAssemblyInfo( void ) info.cchBuf = ARRAY_SIZE( path ); path[0] = 0; hr = IAssemblyCache_QueryAssemblyInfo( cache, 2, comctlW, &info ); - ok( hr == E_INVALIDARG, "got %08x\n", hr ); - ok( !info.dwAssemblyFlags, "got %08x\n", info.dwAssemblyFlags ); - ok( !info.uliAssemblySizeInKB.u.LowPart, "got %u\n", info.uliAssemblySizeInKB.u.LowPart ); - ok( info.cchBuf == ARRAY_SIZE( path ), "got %u\n", info.cchBuf ); + ok( hr == E_INVALIDARG, "got %08lx\n", hr ); + ok( !info.dwAssemblyFlags, "got %08lx\n", info.dwAssemblyFlags ); + ok( !info.uliAssemblySizeInKB.u.LowPart, "got %lu\n", info.uliAssemblySizeInKB.u.LowPart ); + ok( info.cchBuf == ARRAY_SIZE( path ), "got %lu\n", info.cchBuf ); ok( !path[0], "got %s\n", wine_dbgstr_w(path) );
IAssemblyCache_Release( cache ); diff --git a/dlls/sxs/tests/name.c b/dlls/sxs/tests/name.c index 99c6373cc71..0f825f55428 100644 --- a/dlls/sxs/tests/name.c +++ b/dlls/sxs/tests/name.c @@ -54,165 +54,165 @@ static void test_CreateAssemblyNameObject( void ) HRESULT hr;
hr = CreateAssemblyNameObject( NULL, wine1W, CANOF_PARSE_DISPLAY_NAME, NULL ); - ok(hr == E_INVALIDARG, "expected E_INVALIDARG got %08x\n", hr); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG got %08lx\n", hr);
name = (IAssemblyName *)0xdeadbeef; hr = CreateAssemblyNameObject( &name, NULL, CANOF_PARSE_DISPLAY_NAME, NULL ); - ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08x\n", hr ); + ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08lx\n", hr ); ok( !name, "expected NULL got %p\n", name );
name = (IAssemblyName *)0xdeadbeef; hr = CreateAssemblyNameObject( &name, emptyW, CANOF_PARSE_DISPLAY_NAME, NULL ); - ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08x\n", hr ); + ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08lx\n", hr ); ok( !name, "expected NULL got %p\n", name );
name = (IAssemblyName *)0xdeadbeef; hr = CreateAssemblyNameObject( &name, NULL, CANOF_SET_DEFAULT_VALUES, NULL ); - ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08x\n", hr ); + ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08lx\n", hr ); ok( !name, "expected NULL got %p\n", name );
name = (IAssemblyName *)0xdeadbeef; hr = CreateAssemblyNameObject( &name, emptyW, CANOF_SET_DEFAULT_VALUES, NULL ); - ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08x\n", hr ); + ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08lx\n", hr ); ok( !name, "expected NULL got %p\n", name );
name = NULL; hr = CreateAssemblyNameObject( &name, wine1W, CANOF_PARSE_DISPLAY_NAME, NULL ); - ok( hr == S_OK, "expected S_OK got %08x\n", hr ); + ok( hr == S_OK, "expected S_OK got %08lx\n", hr ); ok( name != NULL, "expected non-NULL name\n" ); IAssemblyName_Release( name );
hr = CreateAssemblyNameObject( NULL, wine1W, CANOF_SET_DEFAULT_VALUES, NULL ); - ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08x\n", hr ); + ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08lx\n", hr );
name = (IAssemblyName *)0xdeadbeef; hr = CreateAssemblyNameObject( &name, NULL, CANOF_SET_DEFAULT_VALUES, NULL ); - ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08x\n", hr ); + ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08lx\n", hr ); ok( !name, "expected NULL got %p\n", name );
name = (IAssemblyName *)0xdeadbeef; hr = CreateAssemblyNameObject( &name, emptyW, CANOF_SET_DEFAULT_VALUES, NULL ); - ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08x\n", hr ); + ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08lx\n", hr ); ok( !name, "expected NULL got %p\n", name );
name = (IAssemblyName *)0xdeadbeef; hr = CreateAssemblyNameObject( &name, NULL, CANOF_SET_DEFAULT_VALUES, NULL ); - ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08x\n", hr ); + ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08lx\n", hr ); ok( !name, "expected NULL got %p\n", name );
name = (IAssemblyName *)0xdeadbeef; hr = CreateAssemblyNameObject( &name, emptyW, CANOF_SET_DEFAULT_VALUES, NULL ); - ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08x\n", hr ); + ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08lx\n", hr ); ok( !name, "expected NULL got %p\n", name );
name = (IAssemblyName *)0xdeadbeef; hr = CreateAssemblyNameObject( &name, wine1W, CANOF_SET_DEFAULT_VALUES, NULL ); - ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08x\n", hr ); + ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08lx\n", hr ); ok( !name, "expected NULL got %p\n", name );
hr = CreateAssemblyNameObject( NULL, wine1W, 0, NULL ); - ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08x\n", hr ); + ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08lx\n", hr );
name = (IAssemblyName *)0xdeadbeef; hr = CreateAssemblyNameObject( &name, NULL, 0, NULL ); - ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08x\n", hr ); + ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08lx\n", hr ); ok( !name, "expected NULL got %p\n", name );
name = (IAssemblyName *)0xdeadbeef; hr = CreateAssemblyNameObject( &name, emptyW, 0, NULL ); - ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08x\n", hr ); + ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08lx\n", hr ); ok( !name, "expected NULL got %p\n", name );
name = (IAssemblyName *)0xdeadbeef; hr = CreateAssemblyNameObject( &name, NULL, 0, NULL ); - ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08x\n", hr ); + ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08lx\n", hr ); ok( !name, "expected NULL got %p\n", name );
name = (IAssemblyName *)0xdeadbeef; hr = CreateAssemblyNameObject( &name, emptyW, 0, NULL ); - ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08x\n", hr ); + ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08lx\n", hr ); ok( !name, "expected NULL got %p\n", name );
name = (IAssemblyName *)0xdeadbeef; hr = CreateAssemblyNameObject( &name, wine1W, 0, NULL ); - ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08x\n", hr ); + ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08lx\n", hr );
hr = CreateAssemblyNameObject( NULL, wine1W, CANOF_SET_DEFAULT_VALUES|CANOF_PARSE_DISPLAY_NAME, NULL ); - ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08x\n", hr ); + ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08lx\n", hr );
name = (IAssemblyName *)0xdeadbeef; hr = CreateAssemblyNameObject( &name, NULL, CANOF_SET_DEFAULT_VALUES|CANOF_PARSE_DISPLAY_NAME, NULL ); - ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08x\n", hr ); + ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08lx\n", hr ); ok( !name, "expected NULL got %p\n", name );
name = (IAssemblyName *)0xdeadbeef; hr = CreateAssemblyNameObject( &name, emptyW, CANOF_SET_DEFAULT_VALUES|CANOF_PARSE_DISPLAY_NAME, NULL ); - ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08x\n", hr ); + ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08lx\n", hr ); ok( !name, "expected NULL got %p\n", name );
name = (IAssemblyName *)0xdeadbeef; hr = CreateAssemblyNameObject( &name, NULL, CANOF_SET_DEFAULT_VALUES|CANOF_PARSE_DISPLAY_NAME, NULL ); - ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08x\n", hr ); + ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08lx\n", hr ); ok( !name, "expected NULL got %p\n", name );
name = (IAssemblyName *)0xdeadbeef; hr = CreateAssemblyNameObject( &name, emptyW, CANOF_SET_DEFAULT_VALUES|CANOF_PARSE_DISPLAY_NAME, NULL ); - ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08x\n", hr ); + ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08lx\n", hr ); ok( !name, "expected NULL got %p\n", name );
name = (IAssemblyName *)0xdeadbeef; hr = CreateAssemblyNameObject( &name, wine1W, CANOF_SET_DEFAULT_VALUES|CANOF_PARSE_DISPLAY_NAME, NULL ); - ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08x\n", hr ); + ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08lx\n", hr ); ok( !name, "expected NULL got %p\n", name );
name = NULL; hr = CreateAssemblyNameObject( &name, wine2W, CANOF_PARSE_DISPLAY_NAME, NULL ); - ok( hr == S_OK, "expected S_OK got %08x\n", hr ); + ok( hr == S_OK, "expected S_OK got %08lx\n", hr ); ok( name != NULL, "expected non-NULL name\n" ); IAssemblyName_Release( name );
name = (IAssemblyName *)0xdeadbeef; hr = CreateAssemblyNameObject( &name, wine3W, CANOF_PARSE_DISPLAY_NAME, NULL ); - ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08x\n", hr ); + ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08lx\n", hr ); ok( !name, "expected NULL got %p\n", name );
name = (IAssemblyName *)0xdeadbeef; hr = CreateAssemblyNameObject( &name, wine4W, CANOF_PARSE_DISPLAY_NAME, NULL ); ok( hr == HRESULT_FROM_WIN32( ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME ), - "expected ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME got %08x\n", hr ); + "expected ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME got %08lx\n", hr ); ok( !name, "expected NULL got %p\n", name );
name = (IAssemblyName *)0xdeadbeef; hr = CreateAssemblyNameObject( &name, wine5W, CANOF_PARSE_DISPLAY_NAME, NULL ); ok( hr == HRESULT_FROM_WIN32( ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME ), - "expected ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME got %08x\n", hr ); + "expected ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME got %08lx\n", hr ); ok( !name, "expected NULL got %p\n", name );
name = (IAssemblyName *)0xdeadbeef; hr = CreateAssemblyNameObject( &name, wine6W, CANOF_PARSE_DISPLAY_NAME, NULL ); - ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08x\n", hr ); + ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08lx\n", hr ); ok( !name, "expected NULL got %p\n", name );
name = NULL; hr = CreateAssemblyNameObject( &name, wine7W, CANOF_PARSE_DISPLAY_NAME, NULL ); - ok( hr == S_OK, "expected S_OK got %08x\n", hr ); + ok( hr == S_OK, "expected S_OK got %08lx\n", hr ); ok( name != NULL, "expected non-NULL name\n" ); IAssemblyName_Release( name );
name = (IAssemblyName *)0xdeadbeef; hr = CreateAssemblyNameObject( &name, wine8W, CANOF_PARSE_DISPLAY_NAME, NULL ); - ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08x\n", hr ); + ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08lx\n", hr ); ok( !name, "expected NULL got %p\n", name );
name = NULL; hr = CreateAssemblyNameObject( &name, wine9W, CANOF_PARSE_DISPLAY_NAME, NULL ); - ok( hr == S_OK, "expected S_OK got %08x\n", hr ); + ok( hr == S_OK, "expected S_OK got %08lx\n", hr ); ok( name != NULL, "expected non-NULL name\n" ); IAssemblyName_Release( name );
name = (IAssemblyName *)0xdeadbeef; hr = CreateAssemblyNameObject( &name, wine10W, CANOF_PARSE_DISPLAY_NAME, NULL ); - ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08x\n", hr ); + ok( hr == E_INVALIDARG, "expected E_INVALIDARG got %08lx\n", hr ); ok( !name, "expected NULL got %p\n", name ); }
diff --git a/dlls/sxs/tests/sxs.c b/dlls/sxs/tests/sxs.c index 2a7afcde25d..589d713e08b 100644 --- a/dlls/sxs/tests/sxs.c +++ b/dlls/sxs/tests/sxs.c @@ -90,31 +90,31 @@ static void run_test(void) ret = SxsLookupClrGuid(SXS_LOOKUP_CLR_GUID_FIND_ANY | SXS_LOOKUP_CLR_GUID_USE_ACTCTX, (GUID *)&CLSID_Test, NULL, NULL, 0, &buffer_size); ok(!ret, "Unexpected return value %d.\n", ret); - ok(GetLastError() == ERROR_NOT_FOUND, "Unexpected error %d.\n", GetLastError()); + ok(GetLastError() == ERROR_NOT_FOUND, "Unexpected error %ld.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SxsLookupClrGuid(SXS_LOOKUP_CLR_GUID_FIND_ANY | SXS_LOOKUP_CLR_GUID_USE_ACTCTX, (GUID *)&CLSID_Test, NULL, NULL, 0, &buffer_size); ok(!ret, "Unexpected return value %d.\n", ret); - ok(GetLastError() == ERROR_NOT_FOUND, "Unexpected error %d.\n", GetLastError()); + ok(GetLastError() == ERROR_NOT_FOUND, "Unexpected error %ld.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SxsLookupClrGuid(SXS_LOOKUP_CLR_GUID_FIND_ANY, (GUID*)&CLSID_Test, NULL, NULL, 0, &buffer_size); ok(!ret, "Unexpected return value %d.\n", ret); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = SxsLookupClrGuid(SXS_LOOKUP_CLR_GUID_FIND_CLR_CLASS, (GUID*)&CLSID_Test, NULL, NULL, 0, &buffer_size); ok(ret == FALSE, "Got %d\n", ret); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got %ld\n", GetLastError());
info = heap_alloc(buffer_size); SetLastError(0xdeadbeef); ret = SxsLookupClrGuid(SXS_LOOKUP_CLR_GUID_FIND_CLR_CLASS, (GUID*)&CLSID_Test, NULL, info, buffer_size, &buffer_size); ok(ret == TRUE, "Got %d\n", ret); - ok(GetLastError() == 0, "Got %d\n", GetLastError()); + ok(GetLastError() == 0, "Got %ld\n", GetLastError());
- ok(info->dwFlags == SXS_GUID_INFORMATION_CLR_FLAG_IS_CLASS, "Got %d\n", info->dwFlags); + ok(info->dwFlags == SXS_GUID_INFORMATION_CLR_FLAG_IS_CLASS, "Got %ld\n", info->dwFlags); ok(!lstrcmpW(info->pcwszTypeName, L"DLL.Test"), "Unexpected typename %s.\n", wine_dbgstr_w(info->pcwszTypeName)); ok(!lstrcmpW(info->pcwszAssemblyIdentity, L"comtest,type="win32",version="1.0.0.0""), "Unexpected assembly identity %s.\n", wine_dbgstr_w(info->pcwszAssemblyIdentity)); @@ -126,16 +126,16 @@ static void run_test(void) SetLastError(0xdeadbeef); ret = SxsLookupClrGuid(SXS_LOOKUP_CLR_GUID_FIND_SURROGATE, (GUID *)&CLSID_SurrogateTest, NULL, NULL, 0, &buffer_size); ok(!ret, "Unexpected return value %d.\n", ret); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got %ld\n", GetLastError());
info = heap_alloc(buffer_size); SetLastError(0xdeadbeef); ret = SxsLookupClrGuid(SXS_LOOKUP_CLR_GUID_FIND_SURROGATE, (GUID *)&CLSID_SurrogateTest, NULL, info, buffer_size, &buffer_size); ok(ret, "Unexpected return value %d.\n", ret); - ok(GetLastError() == 0, "Got %d\n", GetLastError()); + ok(GetLastError() == 0, "Got %ld\n", GetLastError());
- ok(info->dwFlags == SXS_GUID_INFORMATION_CLR_FLAG_IS_SURROGATE, "Unexpected flags %#x.\n", info->dwFlags); + ok(info->dwFlags == SXS_GUID_INFORMATION_CLR_FLAG_IS_SURROGATE, "Unexpected flags %#lx.\n", info->dwFlags); ok(!lstrcmpW(info->pcwszTypeName, L"Surrogate.Test"), "Unexpected typename %s.\n", wine_dbgstr_w(info->pcwszTypeName)); ok(!lstrcmpW(info->pcwszAssemblyIdentity, L"comtest,type="win32",version="1.0.0.0""), "Unexpected assembly identity %s.\n", wine_dbgstr_w(info->pcwszAssemblyIdentity)); @@ -147,7 +147,7 @@ static void run_test(void) SetLastError(0xdeadbeef); ret = SxsLookupClrGuid(SXS_LOOKUP_CLR_GUID_FIND_ANY, (GUID *)&CLSID_SurrogateTest, NULL, NULL, 0, &buffer_size); ok(!ret, "Unexpected return value %d.\n", ret); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got %ld\n", GetLastError()); }
static void prepare_and_run_test(void) @@ -180,7 +180,7 @@ static void prepare_and_run_test(void) context.dwFlags = ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID;
handle_context = CreateActCtxA(&context); - ok(handle_context != INVALID_HANDLE_VALUE, "CreateActCtxA failed: %d\n", GetLastError()); + ok(handle_context != INVALID_HANDLE_VALUE, "CreateActCtxA failed: %ld\n", GetLastError());
if (handle_context == INVALID_HANDLE_VALUE) { @@ -189,7 +189,7 @@ static void prepare_and_run_test(void) }
success = ActivateActCtx(handle_context, &cookie); - ok(success, "ActivateActCtx failed: %d\n", GetLastError()); + ok(success, "ActivateActCtx failed: %ld\n", GetLastError());
run_test();
@@ -197,18 +197,18 @@ cleanup: if (handle_context != INVALID_HANDLE_VALUE) { success = DeactivateActCtx(0, cookie); - ok(success, "DeactivateActCtx failed: %d\n", GetLastError()); + ok(success, "DeactivateActCtx failed: %ld\n", GetLastError()); ReleaseActCtx(handle_context); } if (*path_manifest_exe) { success = DeleteFileA(path_manifest_exe); - ok(success, "DeleteFileA failed: %d\n", GetLastError()); + ok(success, "DeleteFileA failed: %ld\n", GetLastError()); } if(*path_manifest_dll) { success = DeleteFileA(path_manifest_dll); - ok(success, "DeleteFileA failed: %d\n", GetLastError()); + ok(success, "DeleteFileA failed: %ld\n", GetLastError()); } }
@@ -231,7 +231,7 @@ static void run_child_process(void)
si.cb = sizeof(si); ret = CreateProcessA(exe, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret, "Could not create process: %u\n", GetLastError()); + ok(ret, "Could not create process: %lu\n", GetLastError());
wait_child_process(pi.hProcess);
@@ -247,18 +247,18 @@ static void test_SxsLookupClrGuid(void) SetLastError(0xdeadbeef); ret = SxsLookupClrGuid(SXS_LOOKUP_CLR_GUID_FIND_CLR_CLASS, (GUID*)&CLSID_Test, NULL, NULL, 0, &buffer_size); ok(ret == FALSE, "Expected FALSE, got %d\n", ret); - ok(GetLastError() == ERROR_NOT_FOUND, "Expected ERROR_NOT_FOUND, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_NOT_FOUND, "Expected ERROR_NOT_FOUND, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = SxsLookupClrGuid(SXS_LOOKUP_CLR_GUID_FIND_CLR_CLASS | SXS_LOOKUP_CLR_GUID_USE_ACTCTX, (GUID *)&CLSID_Test, NULL, NULL, 0, &buffer_size); ok(!ret, "Unexpected return value %d.\n", ret); - ok(GetLastError() == ERROR_NOT_FOUND, "Expected ERROR_NOT_FOUND, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_NOT_FOUND, "Expected ERROR_NOT_FOUND, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = SxsLookupClrGuid(SXS_LOOKUP_CLR_GUID_FIND_SURROGATE, (GUID *)&CLSID_Test, NULL, NULL, 0, &buffer_size); ok(!ret, "Unexpected return value %d.\n", ret); - ok(GetLastError() == ERROR_NOT_FOUND, "Expected ERROR_NOT_FOUND, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_NOT_FOUND, "Expected ERROR_NOT_FOUND, got %ld\n", GetLastError());
run_child_process(); }
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/tapi32/tests/Makefile.in | 1 - dlls/tapi32/tests/tapi.c | 14 +++++++------- 2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/dlls/tapi32/tests/Makefile.in b/dlls/tapi32/tests/Makefile.in index 6c420bf270f..126eed1c85c 100644 --- a/dlls/tapi32/tests/Makefile.in +++ b/dlls/tapi32/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = tapi32.dll IMPORTS = tapi32
diff --git a/dlls/tapi32/tests/tapi.c b/dlls/tapi32/tests/tapi.c index 13772c8c7d4..462f0ceb0c6 100644 --- a/dlls/tapi32/tests/tapi.c +++ b/dlls/tapi32/tests/tapi.c @@ -35,25 +35,25 @@ static void test_lineInitialize(void) HLINEAPP lnApp;
ret = lineInitialize(NULL, NULL, NULL, NULL, NULL); - todo_wine ok(ret == LINEERR_INVALPOINTER, "Expected return value LINEERR_INVALPOINTER, got %x.\n", ret); + todo_wine ok(ret == LINEERR_INVALPOINTER, "Expected return value LINEERR_INVALPOINTER, got %lx.\n", ret);
ret = lineInitialize(&lnApp, NULL, NULL, NULL, NULL); - todo_wine ok(ret == LINEERR_INVALPOINTER, "Expected return value LINEERR_INVALPOINTER, got %x.\n", ret); + todo_wine ok(ret == LINEERR_INVALPOINTER, "Expected return value LINEERR_INVALPOINTER, got %lx.\n", ret);
ret = lineInitialize(&lnApp, GetModuleHandleA(NULL), NULL, NULL, NULL); - todo_wine ok(ret == LINEERR_INVALPOINTER, "Expected return value LINEERR_INVALPOINTER, got %x.\n", ret); + todo_wine ok(ret == LINEERR_INVALPOINTER, "Expected return value LINEERR_INVALPOINTER, got %lx.\n", ret);
ret = lineInitialize(&lnApp, GetModuleHandleA(NULL), line_callback, NULL, NULL); - todo_wine ok(ret == LINEERR_INVALPOINTER, "Expected return value LINEERR_INVALPOINTER, got %x.\n", ret); + todo_wine ok(ret == LINEERR_INVALPOINTER, "Expected return value LINEERR_INVALPOINTER, got %lx.\n", ret);
ret = lineInitialize(&lnApp, GetModuleHandleA(NULL), line_callback, NULL, &dev); - ok(!ret, "unexpected return value, got %u.\n", ret); + ok(!ret, "unexpected return value, got %lu.\n", ret);
ret = lineShutdown(NULL); - todo_wine ok(ret == LINEERR_INVALAPPHANDLE, "Expected return value LINEERR_INVALAPPHANDLE, got %x.\n", ret); + todo_wine ok(ret == LINEERR_INVALAPPHANDLE, "Expected return value LINEERR_INVALAPPHANDLE, got %lx.\n", ret);
ret = lineShutdown(lnApp); - ok(!ret, "unexpected return value, got %u.\n", ret); + ok(!ret, "unexpected return value, got %lu.\n", ret); }
START_TEST(tapi)
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/taskschd/tests/Makefile.in | 1 dlls/taskschd/tests/scheduler.c | 618 ++++++++++++++++++++------------------- 2 files changed, 309 insertions(+), 310 deletions(-)
diff --git a/dlls/taskschd/tests/Makefile.in b/dlls/taskschd/tests/Makefile.in index 6d4878ab30d..63424dab5b0 100644 --- a/dlls/taskschd/tests/Makefile.in +++ b/dlls/taskschd/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = taskschd.dll IMPORTS = oleaut32 ole32
diff --git a/dlls/taskschd/tests/scheduler.c b/dlls/taskschd/tests/scheduler.c index e7b39e5fdaf..4a97d831795 100644 --- a/dlls/taskschd/tests/scheduler.c +++ b/dlls/taskschd/tests/scheduler.c @@ -45,23 +45,23 @@ static void test_Connect(void) hr = CoCreateInstance(&CLSID_TaskScheduler, NULL, CLSCTX_INPROC_SERVER, &IID_ITaskService, (void **)&service); if (hr != S_OK) { - win_skip("CoCreateInstance(CLSID_TaskScheduler) error %#x\n", hr); + win_skip("CoCreateInstance(CLSID_TaskScheduler) error %#lx\n", hr); return; }
hr = ITaskService_get_Connected(service, NULL); - ok(hr == E_POINTER, "expected E_POINTER, got %#x\n", hr); + ok(hr == E_POINTER, "expected E_POINTER, got %#lx\n", hr);
vbool = 0xdead; hr = ITaskService_get_Connected(service, &vbool); - ok(hr == S_OK, "get_Connected error %#x\n", hr); + ok(hr == S_OK, "get_Connected error %#lx\n", hr); ok(vbool == VARIANT_FALSE, "expected VARIANT_FALSE, got %d\n", vbool);
hr = ITaskService_get_TargetServer(service, NULL); - ok(hr == E_POINTER, "expected E_POINTER, got %#x\n", hr); + ok(hr == E_POINTER, "expected E_POINTER, got %#lx\n", hr);
hr = ITaskService_get_TargetServer(service, &bstr); - ok(hr == HRESULT_FROM_WIN32(ERROR_ONLY_IF_CONNECTED), "expected ERROR_ONLY_IF_CONNECTED, got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_ONLY_IF_CONNECTED), "expected ERROR_ONLY_IF_CONNECTED, got %#lx\n", hr);
/* Win7 doesn't support UNC \ prefix, but according to a user * comment on MSDN Win8 supports both ways. @@ -75,41 +75,41 @@ static void test_Connect(void) V_BSTR(&v_comp) = SysAllocString(comp_name);
hr = ITaskService_Connect(service, v_comp, v_null, v_null, v_null); - ok(hr == S_OK || hr == E_ACCESSDENIED /* not an administrator */, "Connect error %#x\n", hr); + ok(hr == S_OK || hr == E_ACCESSDENIED /* not an administrator */, "Connect error %#lx\n", hr); was_connected = hr == S_OK; SysFreeString(V_BSTR(&v_comp));
V_BSTR(&v_comp) = SysAllocString(deadbeefW); hr = ITaskService_Connect(service, v_comp, v_null, v_null, v_null); ok(hr == HRESULT_FROM_WIN32(RPC_S_INVALID_NET_ADDR) || hr == HRESULT_FROM_WIN32(ERROR_BAD_NETPATH) /* VM */, - "expected RPC_S_INVALID_NET_ADDR, got %#x\n", hr); + "expected RPC_S_INVALID_NET_ADDR, got %#lx\n", hr); SysFreeString(V_BSTR(&v_comp));
vbool = 0xdead; hr = ITaskService_get_Connected(service, &vbool); - ok(hr == S_OK, "get_Connected error %#x\n", hr); + ok(hr == S_OK, "get_Connected error %#lx\n", hr); ok(vbool == VARIANT_FALSE || (was_connected && vbool == VARIANT_TRUE), "Connect shouldn't trash an existing connection, got %d (was connected %d)\n", vbool, was_connected);
V_BSTR(&v_comp) = SysAllocString(empty); hr = ITaskService_Connect(service, v_comp, v_null, v_null, v_null); - ok(hr == S_OK, "Connect error %#x\n", hr); + ok(hr == S_OK, "Connect error %#lx\n", hr); SysFreeString(V_BSTR(&v_comp));
V_BSTR(&v_comp) = NULL; hr = ITaskService_Connect(service, v_comp, v_null, v_null, v_null); - ok(hr == S_OK, "Connect error %#x\n", hr); + ok(hr == S_OK, "Connect error %#lx\n", hr);
hr = ITaskService_Connect(service, v_null, v_null, v_null, v_null); - ok(hr == S_OK, "Connect error %#x\n", hr); + ok(hr == S_OK, "Connect error %#lx\n", hr);
vbool = 0xdead; hr = ITaskService_get_Connected(service, &vbool); - ok(hr == S_OK, "get_Connected error %#x\n", hr); + ok(hr == S_OK, "get_Connected error %#lx\n", hr); ok(vbool == VARIANT_TRUE, "expected VARIANT_TRUE, got %d\n", vbool);
hr = ITaskService_get_TargetServer(service, &bstr); - ok(hr == S_OK, "get_TargetServer error %#x\n", hr); + ok(hr == S_OK, "get_TargetServer error %#lx\n", hr); ok(!lstrcmpW(comp_name, bstr), "compname %s != server name %s\n", wine_dbgstr_w(comp_name), wine_dbgstr_w(bstr)); SysFreeString(bstr);
@@ -138,59 +138,59 @@ static void test_GetFolder(void) hr = CoCreateInstance(&CLSID_TaskScheduler, NULL, CLSCTX_INPROC_SERVER, &IID_ITaskService, (void **)&service); if (hr != S_OK) { - win_skip("CoCreateInstance(CLSID_TaskScheduler) error %#x\n", hr); + win_skip("CoCreateInstance(CLSID_TaskScheduler) error %#lx\n", hr); return; }
hr = ITaskService_GetFolder(service, NULL, &folder); - ok(hr == HRESULT_FROM_WIN32(ERROR_ONLY_IF_CONNECTED), "expected ERROR_ONLY_IF_CONNECTED, got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_ONLY_IF_CONNECTED), "expected ERROR_ONLY_IF_CONNECTED, got %#lx\n", hr);
V_VT(&v_null) = VT_NULL;
hr = ITaskService_Connect(service, v_null, v_null, v_null, v_null); - ok(hr == S_OK, "Connect error %#x\n", hr); + ok(hr == S_OK, "Connect error %#lx\n", hr);
hr = ITaskService_GetFolder(service, slash, &folder); todo_wine - ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_NAME), "expected ERROR_INVALID_NAME, got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_NAME), "expected ERROR_INVALID_NAME, got %#lx\n", hr);
hr = ITaskService_GetFolder(service, dot, &folder); todo_wine ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_NAME) || hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) /* win7 */, - "expected ERROR_INVALID_NAME, got %#x\n", hr); + "expected ERROR_INVALID_NAME, got %#lx\n", hr);
hr = ITaskService_GetFolder(service, bslash, &folder); - ok(hr == S_OK, "GetFolder error %#x\n", hr); + ok(hr == S_OK, "GetFolder error %#lx\n", hr); ITaskFolder_Release(folder);
hr = ITaskService_GetFolder(service, NULL, NULL); - ok(hr == E_POINTER, "expected E_POINTER, got %#x\n", hr); + ok(hr == E_POINTER, "expected E_POINTER, got %#lx\n", hr);
hr = ITaskService_GetFolder(service, empty, &folder); - ok(hr == S_OK, "GetFolder error %#x\n", hr); + ok(hr == S_OK, "GetFolder error %#lx\n", hr); ITaskFolder_Release(folder);
hr = ITaskService_GetFolder(service, NULL, &folder); - ok(hr == S_OK, "GetFolder error %#x\n", hr); + ok(hr == S_OK, "GetFolder error %#lx\n", hr);
hr = ITaskFolder_get_Name(folder, NULL); - ok(hr == E_POINTER, "expected E_POINTER, got %#x\n", hr); + ok(hr == E_POINTER, "expected E_POINTER, got %#lx\n", hr);
hr = ITaskFolder_get_Name(folder, &bstr); - ok (hr == S_OK, "get_Name error %#x\n", hr); + ok (hr == S_OK, "get_Name error %#lx\n", hr); ok(!lstrcmpW(bstr, bslash), "expected '\', got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr);
hr = ITaskFolder_get_Path(folder, NULL); - ok(hr == E_POINTER, "expected E_POINTER, got %#x\n", hr); + ok(hr == E_POINTER, "expected E_POINTER, got %#lx\n", hr);
hr = ITaskFolder_get_Path(folder, &bstr); - ok(hr == S_OK, "get_Path error %#x\n", hr); + ok(hr == S_OK, "get_Path error %#lx\n", hr); ok(!lstrcmpW(bstr, bslash), "expected '\', got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr);
hr = ITaskFolder_CreateFolder(folder, NULL, v_null, &subfolder); - ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#x\n", hr); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#lx\n", hr);
/* Just in case something was left from previous runs */ ITaskFolder_DeleteFolder(folder, Wine_Folder1_Folder2, 0); @@ -199,141 +199,141 @@ static void test_GetFolder(void)
hr = ITaskFolder_CreateFolder(folder, slash, v_null, &subfolder); todo_wine - ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_NAME), "expected ERROR_INVALID_NAME, got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_NAME), "expected ERROR_INVALID_NAME, got %#lx\n", hr);
hr = ITaskService_GetFolder(service, Wine_Folder1_Folder2, &subfolder); ok(hr == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) || hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) /* win7 */, - "expected ERROR_PATH_NOT_FOUND, got %#x\n", hr); + "expected ERROR_PATH_NOT_FOUND, got %#lx\n", hr);
hr = ITaskFolder_CreateFolder(folder, bslash, v_null, &subfolder); todo_wine - ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#x\n", hr); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#lx\n", hr);
hr = ITaskFolder_CreateFolder(folder, Wine_Folder1_Folder2, v_null, &subfolder); - ok(hr == S_OK, "CreateFolder error %#x\n", hr); + ok(hr == S_OK, "CreateFolder error %#lx\n", hr); ITaskFolder_Release(subfolder);
hr = ITaskFolder_CreateFolder(folder, Wine, v_null, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS), "expected ERROR_ALREADY_EXISTS, got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS), "expected ERROR_ALREADY_EXISTS, got %#lx\n", hr);
hr = ITaskFolder_CreateFolder(folder, Wine_Folder1_, v_null, &subfolder); - ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_NAME), "expected ERROR_INVALID_NAME, got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_NAME), "expected ERROR_INVALID_NAME, got %#lx\n", hr);
hr = ITaskFolder_CreateFolder(folder, Wine, v_null, &subfolder); - ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS), "expected ERROR_ALREADY_EXISTS, got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS), "expected ERROR_ALREADY_EXISTS, got %#lx\n", hr); hr = ITaskFolder_CreateFolder(folder, Wine+1, v_null, &subfolder); - ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS), "expected ERROR_ALREADY_EXISTS, got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS), "expected ERROR_ALREADY_EXISTS, got %#lx\n", hr); hr = ITaskFolder_CreateFolder(folder, Wine_Folder1, v_null, &subfolder); - ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS), "expected ERROR_ALREADY_EXISTS, got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS), "expected ERROR_ALREADY_EXISTS, got %#lx\n", hr); hr = ITaskFolder_CreateFolder(folder, Wine_Folder1+1, v_null, &subfolder); - ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS), "expected ERROR_ALREADY_EXISTS, got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS), "expected ERROR_ALREADY_EXISTS, got %#lx\n", hr); hr = ITaskFolder_CreateFolder(folder, Wine_Folder1_Folder2, v_null, &subfolder); - ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS), "expected ERROR_ALREADY_EXISTS, got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS), "expected ERROR_ALREADY_EXISTS, got %#lx\n", hr); hr = ITaskFolder_CreateFolder(folder, Wine_Folder1_Folder2+1, v_null, &subfolder); - ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS), "expected ERROR_ALREADY_EXISTS, got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS), "expected ERROR_ALREADY_EXISTS, got %#lx\n", hr);
hr = ITaskService_GetFolder(service, Wine_Folder1_Folder2, NULL); - ok(hr == E_POINTER, "expected E_POINTER, got %#x\n", hr); + ok(hr == E_POINTER, "expected E_POINTER, got %#lx\n", hr);
hr = ITaskService_GetFolder(service, Wine_Folder1_Folder2, &subfolder); - ok(hr == S_OK, "GetFolder error %#x\n", hr); + ok(hr == S_OK, "GetFolder error %#lx\n", hr);
hr = ITaskFolder_get_Name(subfolder, &bstr); - ok (hr == S_OK, "get_Name error %#x\n", hr); + ok (hr == S_OK, "get_Name error %#lx\n", hr); ok(!lstrcmpW(bstr, Folder2), "expected Folder2, got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); hr = ITaskFolder_get_Path(subfolder, &bstr); - ok(hr == S_OK, "get_Path error %#x\n", hr); + ok(hr == S_OK, "get_Path error %#lx\n", hr); ok(!lstrcmpW(bstr, Wine_Folder1_Folder2), "expected \Wine\Folder1\Folder2, got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); ITaskFolder_Release(subfolder);
hr = ITaskService_GetFolder(service, Wine_Folder1_Folder2+1, &subfolder); - ok(hr == S_OK, "GetFolder error %#x\n", hr); + ok(hr == S_OK, "GetFolder error %#lx\n", hr); hr = ITaskFolder_get_Name(subfolder, &bstr); - ok (hr == S_OK, "get_Name error %#x\n", hr); + ok (hr == S_OK, "get_Name error %#lx\n", hr); ok(!lstrcmpW(bstr, Folder2), "expected Folder2, got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); hr = ITaskFolder_get_Path(subfolder, &bstr); - ok(hr == S_OK, "get_Path error %#x\n", hr); + ok(hr == S_OK, "get_Path error %#lx\n", hr); ok(!lstrcmpW(bstr, Wine_Folder1_Folder2+1), "expected Wine\Folder1\Folder2, got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); ITaskFolder_Release(subfolder);
hr = ITaskService_GetFolder(service, Wine_Folder1, &subfolder); - ok(hr == S_OK, "GetFolder error %#x\n", hr); + ok(hr == S_OK, "GetFolder error %#lx\n", hr); hr = ITaskFolder_get_Name(subfolder, &bstr); - ok (hr == S_OK, "get_Name error %#x\n", hr); + ok (hr == S_OK, "get_Name error %#lx\n", hr); ok(!lstrcmpW(bstr, Folder1), "expected Folder1, got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); hr = ITaskFolder_get_Path(subfolder, &bstr); - ok(hr == S_OK, "get_Path error %#x\n", hr); + ok(hr == S_OK, "get_Path error %#lx\n", hr); ok(!lstrcmpW(bstr, Wine_Folder1), "expected \Wine\Folder1, got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); ITaskFolder_Release(subfolder);
hr = ITaskService_GetFolder(service, Wine, &subfolder); - ok(hr == S_OK, "GetFolder error %#x\n", hr); + ok(hr == S_OK, "GetFolder error %#lx\n", hr); hr = ITaskFolder_get_Name(subfolder, &bstr); - ok (hr == S_OK, "get_Name error %#x\n", hr); + ok (hr == S_OK, "get_Name error %#lx\n", hr); ok(!lstrcmpW(bstr, Wine+1), "expected Wine, got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); hr = ITaskFolder_get_Path(subfolder, &bstr); - ok(hr == S_OK, "get_Path error %#x\n", hr); + ok(hr == S_OK, "get_Path error %#lx\n", hr); ok(!lstrcmpW(bstr, Wine), "expected \Wine, got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); ITaskFolder_Release(subfolder);
hr = ITaskService_GetFolder(service, Wine+1, &subfolder); - ok(hr == S_OK, "GetFolder error %#x\n", hr); + ok(hr == S_OK, "GetFolder error %#lx\n", hr); hr = ITaskFolder_get_Name(subfolder, &bstr); - ok (hr == S_OK, "get_Name error %#x\n", hr); + ok (hr == S_OK, "get_Name error %#lx\n", hr); ok(!lstrcmpW(bstr, Wine+1), "expected Wine, got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); hr = ITaskFolder_get_Path(subfolder, &bstr); - ok(hr == S_OK, "get_Path error %#x\n", hr); + ok(hr == S_OK, "get_Path error %#lx\n", hr); ok(!lstrcmpW(bstr, Wine+1), "expected Wine, got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr);
hr = ITaskFolder_GetFolder(subfolder, bslash, &subfolder2); - ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_NAME), "expected ERROR_INVALID_NAME, got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_NAME), "expected ERROR_INVALID_NAME, got %#lx\n", hr);
hr = ITaskFolder_GetFolder(subfolder, NULL, &subfolder2); - ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#x\n", hr); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#lx\n", hr);
hr = ITaskFolder_GetFolder(subfolder, empty, &subfolder2); - ok(hr == S_OK, "GetFolder error %#x\n", hr); + ok(hr == S_OK, "GetFolder error %#lx\n", hr); hr = ITaskFolder_get_Name(subfolder2, &bstr); - ok (hr == S_OK, "get_Name error %#x\n", hr); + ok (hr == S_OK, "get_Name error %#lx\n", hr); ok(!lstrcmpW(bstr, Wine+1), "expected Wine, got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); hr = ITaskFolder_get_Path(subfolder2, &bstr); - ok(hr == S_OK, "get_Path error %#x\n", hr); + ok(hr == S_OK, "get_Path error %#lx\n", hr); ok(!lstrcmpW(bstr, Wine+1), "expected Wine, got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); ITaskFolder_Release(subfolder2);
hr = ITaskFolder_GetFolder(subfolder, Folder1_Folder2, &subfolder2); - ok(hr == S_OK, "GetFolder error %#x\n", hr); + ok(hr == S_OK, "GetFolder error %#lx\n", hr); hr = ITaskFolder_get_Name(subfolder2, &bstr); - ok (hr == S_OK, "get_Name error %#x\n", hr); + ok (hr == S_OK, "get_Name error %#lx\n", hr); ok(!lstrcmpW(bstr, Folder2), "expected Folder2, got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); hr = ITaskFolder_get_Path(subfolder2, &bstr); - ok(hr == S_OK, "get_Path error %#x\n", hr); + ok(hr == S_OK, "get_Path error %#lx\n", hr); ok(!lstrcmpW(bstr, Wine_Folder1_Folder2+1), "expected Wine\Folder1\Folder2, got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); ITaskFolder_Release(subfolder2);
hr = ITaskFolder_GetFolder(subfolder, Folder1_Folder2+1, &subfolder2); - ok(hr == S_OK, "GetFolder error %#x\n", hr); + ok(hr == S_OK, "GetFolder error %#lx\n", hr);
hr = ITaskFolder_get_Name(subfolder2, &bstr); - ok (hr == S_OK, "get_Name error %#x\n", hr); + ok (hr == S_OK, "get_Name error %#lx\n", hr); ok(!lstrcmpW(bstr, Folder2), "expected Folder2, got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); hr = ITaskFolder_get_Path(subfolder2, &bstr); - ok(hr == S_OK, "get_Path error %#x\n", hr); + ok(hr == S_OK, "get_Path error %#lx\n", hr); ok(!lstrcmpW(bstr, Wine_Folder1_Folder2+1), "expected Wine\Folder1\Folder2, got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); ITaskFolder_Release(subfolder2); @@ -341,27 +341,27 @@ static void test_GetFolder(void) ITaskFolder_Release(subfolder);
hr = ITaskFolder_DeleteFolder(folder, Wine, 0); - ok(hr == HRESULT_FROM_WIN32(ERROR_DIR_NOT_EMPTY), "expected ERROR_DIR_NOT_EMPTY, got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_DIR_NOT_EMPTY), "expected ERROR_DIR_NOT_EMPTY, got %#lx\n", hr);
hr = ITaskFolder_DeleteFolder(folder, Wine_Folder1_Folder2, 0); - ok(hr == S_OK, "DeleteFolder error %#x\n", hr); + ok(hr == S_OK, "DeleteFolder error %#lx\n", hr); hr = ITaskFolder_DeleteFolder(folder, Wine_Folder1+1, 0); - ok(hr == S_OK, "DeleteFolder error %#x\n", hr); + ok(hr == S_OK, "DeleteFolder error %#lx\n", hr); hr = ITaskFolder_DeleteFolder(folder, Wine+1, 0); - ok(hr == S_OK, "DeleteFolder error %#x\n", hr); + ok(hr == S_OK, "DeleteFolder error %#lx\n", hr);
hr = ITaskFolder_DeleteFolder(folder, Wine, 0); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || hr == S_OK /* win7 */, "expected ERROR_FILE_NOT_FOUND, got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || hr == S_OK /* win7 */, "expected ERROR_FILE_NOT_FOUND, got %#lx\n", hr);
hr = ITaskFolder_DeleteFolder(folder, NULL, 0); - ok(hr == E_ACCESSDENIED || hr == E_INVALIDARG /* Vista */, "expected E_ACCESSDENIED, got %#x\n", hr); + ok(hr == E_ACCESSDENIED || hr == E_INVALIDARG /* Vista */, "expected E_ACCESSDENIED, got %#lx\n", hr);
hr = ITaskFolder_DeleteFolder(folder, empty, 0); - ok(hr == E_ACCESSDENIED || hr == E_INVALIDARG /* Vista */, "expected E_ACCESSDENIED, got %#x\n", hr); + ok(hr == E_ACCESSDENIED || hr == E_INVALIDARG /* Vista */, "expected E_ACCESSDENIED, got %#lx\n", hr);
hr = ITaskFolder_DeleteFolder(folder, slash, 0); todo_wine - ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_NAME), "expected ERROR_INVALID_NAME, got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_NAME), "expected ERROR_INVALID_NAME, got %#lx\n", hr);
ITaskFolder_Release(folder); ITaskService_Release(service); @@ -428,17 +428,17 @@ static void test_FolderCollection(void) hr = CoCreateInstance(&CLSID_TaskScheduler, NULL, CLSCTX_INPROC_SERVER, &IID_ITaskService, (void **)&service); if (hr != S_OK) { - win_skip("CoCreateInstance(CLSID_TaskScheduler) error %#x\n", hr); + win_skip("CoCreateInstance(CLSID_TaskScheduler) error %#lx\n", hr); return; }
V_VT(&v_null) = VT_NULL;
hr = ITaskService_Connect(service, v_null, v_null, v_null, v_null); - ok(hr == S_OK, "Connect error %#x\n", hr); + ok(hr == S_OK, "Connect error %#lx\n", hr);
hr = ITaskService_GetFolder(service, NULL, &root); - ok(hr == S_OK, "GetFolder error %#x\n", hr); + ok(hr == S_OK, "GetFolder error %#lx\n", hr);
/* Just in case something was left from previous runs */ ITaskFolder_DeleteFolder(root, Wine_Folder1, 0); @@ -447,50 +447,50 @@ static void test_FolderCollection(void) ITaskFolder_DeleteFolder(root, Wine, 0);
hr = ITaskFolder_CreateFolder(root, Wine_Folder1, v_null, &subfolder); - ok(hr == S_OK, "CreateFolder error %#x\n", hr); + ok(hr == S_OK, "CreateFolder error %#lx\n", hr); ITaskFolder_Release(subfolder);
hr = ITaskFolder_CreateFolder(root, Wine_Folder2, v_null, &subfolder); - ok(hr == S_OK, "CreateFolder error %#x\n", hr); + ok(hr == S_OK, "CreateFolder error %#lx\n", hr); ITaskFolder_Release(subfolder);
hr = ITaskFolder_GetFolder(root, Wine, &folder); - ok(hr == S_OK, "GetFolder error %#x\n", hr); + ok(hr == S_OK, "GetFolder error %#lx\n", hr);
hr = ITaskFolder_GetFolders(folder, 0, NULL); - ok (hr == E_POINTER, "expected E_POINTER, got %#x\n", hr); + ok (hr == E_POINTER, "expected E_POINTER, got %#lx\n", hr);
hr = ITaskFolder_GetFolders(folder, 0, &folders); - ok(hr == S_OK, "GetFolders error %#x\n", hr); + ok(hr == S_OK, "GetFolders error %#lx\n", hr);
ITaskFolder_Release(folder);
hr = ITaskFolderCollection_get_Count(folders, NULL); - ok (hr == E_POINTER, "expected E_POINTER, got %#x\n", hr); + ok (hr == E_POINTER, "expected E_POINTER, got %#lx\n", hr);
count = 0; hr = ITaskFolderCollection_get_Count(folders, (LONG *)&count); - ok(hr == S_OK, "get_Count error %#x\n", hr); - ok(count == 2, "expected 2, got %d\n", count); + ok(hr == S_OK, "get_Count error %#lx\n", hr); + ok(count == 2, "expected 2, got %ld\n", count);
hr = ITaskFolder_CreateFolder(root, Wine_Folder3, v_null, &subfolder); - ok(hr == S_OK, "CreateFolder error %#x\n", hr); + ok(hr == S_OK, "CreateFolder error %#lx\n", hr); ITaskFolder_Release(subfolder);
count = 0; hr = ITaskFolderCollection_get_Count(folders, (LONG *)&count); - ok(hr == S_OK, "get_Count error %#x\n", hr); - ok(count == 2, "expected 2, got %d\n", count); + ok(hr == S_OK, "get_Count error %#lx\n", hr); + ok(count == 2, "expected 2, got %ld\n", count);
set_var(VT_INT, &idx, 0); hr = ITaskFolderCollection_get_Item(folders, idx, NULL); - ok (hr == E_POINTER, "expected E_POINTER, got %#x\n", hr); + ok (hr == E_POINTER, "expected E_POINTER, got %#lx\n", hr);
for (i = 0; i < ARRAY_SIZE(vt); i++) { set_var(vt[i], &idx, 1); hr = ITaskFolderCollection_get_Item(folders, idx, &subfolder); - ok(hr == S_OK, "get_Item(vt = %d) error %#x\n", vt[i], hr); + ok(hr == S_OK, "get_Item(vt = %d) error %#lx\n", vt[i], hr); ITaskFolder_Release(subfolder); }
@@ -501,13 +501,13 @@ static void test_FolderCollection(void) hr = ITaskFolderCollection_get_Item(folders, idx, &subfolder); if (i == 0) { - ok (hr == E_INVALIDARG, "expected E_INVALIDARG, got %#x\n", hr); + ok (hr == E_INVALIDARG, "expected E_INVALIDARG, got %#lx\n", hr); continue; } - ok(hr == S_OK, "get_Item error %#x\n", hr); + ok(hr == S_OK, "get_Item error %#lx\n", hr);
hr = ITaskFolder_get_Path(subfolder, &bstr); - ok(hr == S_OK, "get_Path error %#x\n", hr); + ok(hr == S_OK, "get_Path error %#lx\n", hr); is_first = !lstrcmpW(bstr, Wine_Folder1); if (is_first) ok(!lstrcmpW(bstr, Wine_Folder1), "expected \Wine\Folder1, got %s\n", wine_dbgstr_w(bstr)); @@ -516,7 +516,7 @@ static void test_FolderCollection(void) SysFreeString(bstr);
hr = ITaskFolder_get_Name(subfolder, &bstr); - ok(hr == S_OK, "get_Name error %#x\n", hr); + ok(hr == S_OK, "get_Name error %#lx\n", hr); if (is_first) ok(!lstrcmpW(bstr, Folder1), "expected Folder1, got %s\n", wine_dbgstr_w(bstr)); else @@ -527,11 +527,11 @@ static void test_FolderCollection(void) V_VT(&idx) = VT_BSTR; V_BSTR(&idx) = bstr; hr = ITaskFolderCollection_get_Item(folders, idx, &subfolder); - ok(hr == S_OK, "get_Item error %#x\n", hr); + ok(hr == S_OK, "get_Item error %#lx\n", hr); SysFreeString(bstr);
hr = ITaskFolder_get_Path(subfolder, &bstr); - ok(hr == S_OK, "get_Path error %#x\n", hr); + ok(hr == S_OK, "get_Path error %#lx\n", hr); if (is_first) ok(!lstrcmpW(bstr, Wine_Folder1), "expected \Wine\Folder1, got %s\n", wine_dbgstr_w(bstr)); else @@ -539,7 +539,7 @@ static void test_FolderCollection(void) SysFreeString(bstr);
hr = ITaskFolder_get_Name(subfolder, &bstr); - ok(hr == S_OK, "get_Name error %#x\n", hr); + ok(hr == S_OK, "get_Name error %#lx\n", hr); if (is_first) ok(!lstrcmpW(bstr, Folder1), "expected Folder1, got %s\n", wine_dbgstr_w(bstr)); else @@ -552,49 +552,49 @@ static void test_FolderCollection(void) V_VT(&idx) = VT_I4; V_UI4(&idx) = 3; hr = ITaskFolderCollection_get_Item(folders, idx, &subfolder); - ok (hr == E_INVALIDARG, "expected E_INVALIDARG, got %#x\n", hr); + ok (hr == E_INVALIDARG, "expected E_INVALIDARG, got %#lx\n", hr);
hr = ITaskFolderCollection_QueryInterface(folders, &IID_IEnumVARIANT, (void **)&enumvar); - ok(hr == E_NOINTERFACE, "expected E_NOINTERFACE, got %#x\n", hr); + ok(hr == E_NOINTERFACE, "expected E_NOINTERFACE, got %#lx\n", hr); hr = ITaskFolderCollection_QueryInterface(folders, &IID_IEnumUnknown, (void **)&enumvar); - ok(hr == E_NOINTERFACE, "expected E_NOINTERFACE, got %#x\n", hr); + ok(hr == E_NOINTERFACE, "expected E_NOINTERFACE, got %#lx\n", hr);
hr = ITaskFolderCollection_get__NewEnum(folders, NULL); - ok (hr == E_POINTER, "expected E_POINTER, got %#x\n", hr); + ok (hr == E_POINTER, "expected E_POINTER, got %#lx\n", hr);
hr = ITaskFolderCollection_get__NewEnum(folders, &unknown); - ok(hr == S_OK, "get__NewEnum error %#x\n", hr); + ok(hr == S_OK, "get__NewEnum error %#lx\n", hr); hr = IUnknown_QueryInterface(unknown, &IID_IEnumUnknown, (void **)&enumvar); - ok(hr == E_NOINTERFACE, "expected E_NOINTERFACE, got %#x\n", hr); + ok(hr == E_NOINTERFACE, "expected E_NOINTERFACE, got %#lx\n", hr); hr = IUnknown_QueryInterface(unknown, &IID_IEnumVARIANT, (void **)&enumvar); - ok(hr == S_OK, "QueryInterface error %#x\n", hr); + ok(hr == S_OK, "QueryInterface error %#lx\n", hr); IEnumVARIANT_Release(enumvar);
hr = IUnknown_QueryInterface(unknown, &IID_IUnknown, (void **)&enumvar); - ok(hr == S_OK, "QueryInterface error %#x\n", hr); + ok(hr == S_OK, "QueryInterface error %#lx\n", hr); IUnknown_Release(unknown);
hr = IEnumVARIANT_Skip(enumvar, 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); hr = IEnumVARIANT_Skip(enumvar, 2); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); hr = IEnumVARIANT_Skip(enumvar, 1); - ok(hr == S_FALSE, "expected S_FALSE, got %#x\n", hr); + ok(hr == S_FALSE, "expected S_FALSE, got %#lx\n", hr);
hr = IEnumVARIANT_Reset(enumvar); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
count = -1; hr = IEnumVARIANT_Next(enumvar, 1, NULL, &count); - ok(hr == E_POINTER, "expected E_POINTER, got %#x\n", hr); + ok(hr == E_POINTER, "expected E_POINTER, got %#lx\n", hr);
memset(var, 0, sizeof(var)); count = -1; hr = IEnumVARIANT_Next(enumvar, 1, var, &count); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); - ok(count == 1, "expected 1, got %d\n", count); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); + ok(count == 1, "expected 1, got %ld\n", count); hr = ITaskFolder_get_Path((ITaskFolder *)V_DISPATCH(&var[0]), &bstr); - ok(hr == S_OK, "get_Path error %#x\n", hr); + ok(hr == S_OK, "get_Path error %#lx\n", hr); is_first = !lstrcmpW(bstr, Wine_Folder1); if (is_first) ok(!lstrcmpW(bstr, Wine_Folder1), "expected \Wine\Folder1, got %s\n", wine_dbgstr_w(bstr)); @@ -602,7 +602,7 @@ static void test_FolderCollection(void) ok(!lstrcmpW(bstr, Wine_Folder2), "expected \Wine\Folder2, got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); hr = ITaskFolder_get_Name((ITaskFolder *)V_DISPATCH(&var[0]), &bstr); - ok(hr == S_OK, "get_Name error %#x\n", hr); + ok(hr == S_OK, "get_Name error %#lx\n", hr); if (is_first) ok(!lstrcmpW(bstr, Folder1), "expected Folder1, got %s\n", wine_dbgstr_w(bstr)); else @@ -613,22 +613,22 @@ static void test_FolderCollection(void) memset(var, 0, sizeof(var)); count = -1; hr = IEnumVARIANT_Next(enumvar, 1, var, &count); - ok(hr == S_FALSE, "expected S_FALSE, got %#x\n", hr); - ok(count == 0, "expected 0, got %d\n", count); + ok(hr == S_FALSE, "expected S_FALSE, got %#lx\n", hr); + ok(count == 0, "expected 0, got %ld\n", count);
count = -1; hr = IEnumVARIANT_Next(enumvar, 1, NULL, &count); - ok(hr == S_FALSE, "expected S_FALSE, got %#x\n", hr); - ok(count == 0, "expected 0, got %d\n", count); + ok(hr == S_FALSE, "expected S_FALSE, got %#lx\n", hr); + ok(count == 0, "expected 0, got %ld\n", count);
hr = IEnumVARIANT_Reset(enumvar); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
memset(var, 0, sizeof(var)); count = -1; hr = IEnumVARIANT_Next(enumvar, 3, var, &count); - ok(hr == S_FALSE, "expected S_FALSE, got %#x\n", hr); - ok(count == 2, "expected 2, got %d\n", count); + ok(hr == S_FALSE, "expected S_FALSE, got %#lx\n", hr); + ok(count == 2, "expected 2, got %ld\n", count); ok(V_VT(&var[0]) == VT_DISPATCH, "expected VT_DISPATCH, got %d\n", V_VT(&var[0])); ok(V_VT(&var[1]) == VT_DISPATCH, "expected VT_DISPATCH, got %d\n", V_VT(&var[1])); IEnumVARIANT_Release(enumvar); @@ -636,10 +636,10 @@ static void test_FolderCollection(void) for (i = 0; i < count; i++) { hr = IDispatch_QueryInterface(V_DISPATCH(&var[i]), &IID_ITaskFolder, (void **)&subfolder); - ok(hr == S_OK, "QueryInterface error %#x\n", hr); + ok(hr == S_OK, "QueryInterface error %#lx\n", hr);
hr = ITaskFolder_get_Path(subfolder, &bstr); - ok(hr == S_OK, "get_Path error %#x\n", hr); + ok(hr == S_OK, "get_Path error %#lx\n", hr); is_first = !lstrcmpW(bstr, Wine_Folder1); if (is_first) ok(!lstrcmpW(bstr, Wine_Folder1), "expected \Wine\Folder1, got %s\n", wine_dbgstr_w(bstr)); @@ -648,7 +648,7 @@ static void test_FolderCollection(void) SysFreeString(bstr);
hr = ITaskFolder_get_Name(subfolder, &bstr); - ok(hr == S_OK, "get_Name error %#x\n", hr); + ok(hr == S_OK, "get_Name error %#lx\n", hr); if (is_first) ok(!lstrcmpW(bstr, Folder1), "expected Folder1, got %s\n", wine_dbgstr_w(bstr)); else @@ -664,13 +664,13 @@ static void test_FolderCollection(void) ITaskFolderCollection_Release(folders);
hr = ITaskFolder_DeleteFolder(root, Wine_Folder1, 0); - ok(hr == S_OK, "DeleteFolder error %#x\n", hr); + ok(hr == S_OK, "DeleteFolder error %#lx\n", hr); hr = ITaskFolder_DeleteFolder(root, Wine_Folder2, 0); - ok(hr == S_OK, "DeleteFolder error %#x\n", hr); + ok(hr == S_OK, "DeleteFolder error %#lx\n", hr); hr = ITaskFolder_DeleteFolder(root, Wine_Folder3, 0); - ok(hr == S_OK, "DeleteFolder error %#x\n", hr); + ok(hr == S_OK, "DeleteFolder error %#lx\n", hr); hr = ITaskFolder_DeleteFolder(root, Wine, 0); - ok(hr == S_OK, "DeleteFolder error %#x\n", hr); + ok(hr == S_OK, "DeleteFolder error %#lx\n", hr);
ITaskFolder_Release(root); ITaskService_Release(service); @@ -750,17 +750,17 @@ static void test_GetTask(void) hr = CoCreateInstance(&CLSID_TaskScheduler, NULL, CLSCTX_INPROC_SERVER, &IID_ITaskService, (void **)&service); if (hr != S_OK) { - win_skip("CoCreateInstance(CLSID_TaskScheduler) error %#x\n", hr); + win_skip("CoCreateInstance(CLSID_TaskScheduler) error %#lx\n", hr); return; }
V_VT(&v_null) = VT_NULL;
hr = ITaskService_Connect(service, v_null, v_null, v_null, v_null); - ok(hr == S_OK, "Connect error %#x\n", hr); + ok(hr == S_OK, "Connect error %#lx\n", hr);
hr = ITaskService_GetFolder(service, NULL, &root); - ok(hr == S_OK, "GetFolder error %#x\n", hr); + ok(hr == S_OK, "GetFolder error %#lx\n", hr);
/* Just in case something was left from previous runs */ ITaskFolder_DeleteTask(root, Wine_Task1, 0); @@ -769,181 +769,181 @@ static void test_GetTask(void)
hr = ITaskFolder_GetTask(root, Wine_Task1, &task1); ok(hr == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) || hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) /* win7 */, - "expected ERROR_PATH_NOT_FOUND, got %#x\n", hr); + "expected ERROR_PATH_NOT_FOUND, got %#lx\n", hr);
hr = ITaskFolder_CreateFolder(root, Wine, v_null, &folder); - ok(hr == S_OK, "CreateFolder error %#x\n", hr); + ok(hr == S_OK, "CreateFolder error %#lx\n", hr);
hr = ITaskFolder_GetTask(root, Wine, &task1); ok(hr == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) || hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) /* win7 */, - "expected ERROR_PATH_NOT_FOUND, got %#x\n", hr); + "expected ERROR_PATH_NOT_FOUND, got %#lx\n", hr);
MultiByteToWideChar(CP_ACP, 0, xml1, -1, xmlW, ARRAY_SIZE(xmlW));
for (i = 0; i < ARRAY_SIZE(create_new_task); i++) { hr = ITaskFolder_RegisterTask(root, Wine_Task1, xmlW, create_new_task[i].flags, v_null, v_null, TASK_LOGON_NONE, v_null, &task1); - ok(hr == create_new_task[i].hr, "%d: expected %#x, got %#x\n", i, create_new_task[i].hr, hr); + ok(hr == create_new_task[i].hr, "%d: expected %#lx, got %#lx\n", i, create_new_task[i].hr, hr); if (hr == S_OK) { hr = ITaskFolder_DeleteTask(root, Wine_Task1, 0); - ok(hr == S_OK, "DeleteTask error %#x\n", hr); + ok(hr == S_OK, "DeleteTask error %#lx\n", hr); IRegisteredTask_Release(task1); } }
hr = ITaskFolder_RegisterTask(root, Wine_Task1, NULL, TASK_CREATE, v_null, v_null, TASK_LOGON_NONE, v_null, NULL); - ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "expected RPC_X_NULL_REF_POINTER, got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "expected RPC_X_NULL_REF_POINTER, got %#lx\n", hr);
hr = ITaskFolder_RegisterTask(root, Wine, xmlW, TASK_VALIDATE_ONLY, v_null, v_null, TASK_LOGON_NONE, v_null, NULL); - ok(hr == S_OK, "RegisterTask error %#x\n", hr); + ok(hr == S_OK, "RegisterTask error %#lx\n", hr);
hr = ITaskFolder_RegisterTask(root, Wine, xmlW, TASK_CREATE, v_null, v_null, TASK_LOGON_NONE, v_null, NULL); todo_wine - ok(hr == HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED) || broken(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS)) /* Vista */, "expected ERROR_ACCESS_DENIED, got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED) || broken(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS)) /* Vista */, "expected ERROR_ACCESS_DENIED, got %#lx\n", hr);
hr = ITaskFolder_RegisterTask(root, Wine_Task1, xmlW, TASK_CREATE, v_null, v_null, TASK_LOGON_NONE, v_null, NULL); - ok(hr == S_OK, "RegisterTask error %#x\n", hr); + ok(hr == S_OK, "RegisterTask error %#lx\n", hr);
hr = ITaskFolder_RegisterTask(root, Wine_Task1, xmlW, TASK_CREATE, v_null, v_null, TASK_LOGON_NONE, v_null, &task1); - ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS), "expected ERROR_ALREADY_EXISTS, got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS), "expected ERROR_ALREADY_EXISTS, got %#lx\n", hr);
hr = ITaskFolder_RegisterTask(root, Wine_Task1, xmlW, 0, v_null, v_null, TASK_LOGON_NONE, v_null, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS), "expected ERROR_ALREADY_EXISTS, got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS), "expected ERROR_ALREADY_EXISTS, got %#lx\n", hr);
hr = ITaskFolder_RegisterTask(root, Wine_Task1, xmlW, TASK_CREATE_OR_UPDATE, v_null, v_null, TASK_LOGON_NONE, v_null, &task1); - ok(hr == S_OK, "RegisterTask error %#x\n", hr); + ok(hr == S_OK, "RegisterTask error %#lx\n", hr);
for (i = 0; i < ARRAY_SIZE(open_existing_task); i++) { hr = ITaskFolder_RegisterTask(root, Wine_Task1, xmlW, open_existing_task[i].flags, v_null, v_null, TASK_LOGON_NONE, v_null, &task2); - ok(hr == open_existing_task[i].hr, "%d: expected %#x, got %#x\n", i, open_existing_task[i].hr, hr); + ok(hr == open_existing_task[i].hr, "%d: expected %#lx, got %#lx\n", i, open_existing_task[i].hr, hr); if (hr == S_OK) IRegisteredTask_Release(task2); }
hr = IRegisteredTask_get_Name(task1, NULL); - ok(hr == E_POINTER, "expected E_POINTER, got %#x\n", hr); + ok(hr == E_POINTER, "expected E_POINTER, got %#lx\n", hr);
hr = IRegisteredTask_get_Name(task1, &bstr); - ok(hr == S_OK, "get_Name error %#x\n", hr); + ok(hr == S_OK, "get_Name error %#lx\n", hr); ok(!lstrcmpW(bstr, Task1), "expected Task1, got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); hr = IRegisteredTask_get_Path(task1, &bstr); - ok(hr == S_OK, "get_Path error %#x\n", hr); + ok(hr == S_OK, "get_Path error %#lx\n", hr); ok(!lstrcmpW(bstr, Wine_Task1), "expected \Wine\Task1, got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); hr = IRegisteredTask_get_State(task1, &state); - ok(hr == S_OK, "get_State error %#x\n", hr); + ok(hr == S_OK, "get_State error %#lx\n", hr); ok(state == TASK_STATE_DISABLED, "expected TASK_STATE_DISABLED, got %d\n", state); hr = IRegisteredTask_get_Enabled(task1, &vbool); - ok(hr == S_OK, "get_Enabled error %#x\n", hr); + ok(hr == S_OK, "get_Enabled error %#lx\n", hr); ok(vbool == VARIANT_FALSE, "expected VARIANT_FALSE, got %d\n", vbool);
IRegisteredTask_Release(task1);
hr = ITaskFolder_RegisterTask(folder, Task1, xmlW, TASK_CREATE, v_null, v_null, TASK_LOGON_NONE, v_null, &task2); - ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS), "expected ERROR_ALREADY_EXISTS, got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS), "expected ERROR_ALREADY_EXISTS, got %#lx\n", hr);
MultiByteToWideChar(CP_ACP, 0, xml2, -1, xmlW, ARRAY_SIZE(xmlW));
hr = ITaskFolder_RegisterTask(folder, Task2, xmlW, TASK_CREATE, v_null, v_null, TASK_LOGON_NONE, v_null, &task2); - ok(hr == S_OK, "RegisterTask error %#x\n", hr); + ok(hr == S_OK, "RegisterTask error %#lx\n", hr);
hr = IRegisteredTask_get_Name(task2, &bstr); - ok(hr == S_OK, "get_Name error %#x\n", hr); + ok(hr == S_OK, "get_Name error %#lx\n", hr); ok(!lstrcmpW(bstr, Task2), "expected Task2, got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); hr = IRegisteredTask_get_Path(task2, &bstr); - ok(hr == S_OK, "get_Path error %#x\n", hr); + ok(hr == S_OK, "get_Path error %#lx\n", hr); ok(!lstrcmpW(bstr, Wine_Task2), "expected \Wine\Task2, got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); hr = IRegisteredTask_get_State(task2, &state); - ok(hr == S_OK, "get_State error %#x\n", hr); + ok(hr == S_OK, "get_State error %#lx\n", hr); todo_wine ok(state == TASK_STATE_READY, "expected TASK_STATE_READY, got %d\n", state); hr = IRegisteredTask_get_Enabled(task2, &vbool); - ok(hr == S_OK, "get_Enabled error %#x\n", hr); + ok(hr == S_OK, "get_Enabled error %#lx\n", hr); todo_wine ok(vbool == VARIANT_TRUE, "expected VARIANT_TRUE, got %d\n", vbool);
IRegisteredTask_Release(task2);
hr = ITaskFolder_GetTask(root, NULL, &task1); - ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#x\n", hr); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#lx\n", hr);
hr = ITaskFolder_GetTask(root, Wine_Task1, NULL); - ok(hr == E_POINTER, "expected E_POINTER, got %#x\n", hr); + ok(hr == E_POINTER, "expected E_POINTER, got %#lx\n", hr);
hr = ITaskFolder_GetTask(root, Wine_Task1, &task1); - ok(hr == S_OK, "GetTask error %#x\n", hr); + ok(hr == S_OK, "GetTask error %#lx\n", hr);
hr = IRegisteredTask_get_Name(task1, &bstr); - ok(hr == S_OK, "get_Name error %#x\n", hr); + ok(hr == S_OK, "get_Name error %#lx\n", hr); ok(!lstrcmpW(bstr, Task1), "expected Task1, got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); hr = IRegisteredTask_get_Path(task1, &bstr); - ok(hr == S_OK, "get_Path error %#x\n", hr); + ok(hr == S_OK, "get_Path error %#lx\n", hr); ok(!lstrcmpW(bstr, Wine_Task1), "expected \Wine\Task1, got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); hr = IRegisteredTask_get_State(task1, &state); - ok(hr == S_OK, "get_State error %#x\n", hr); + ok(hr == S_OK, "get_State error %#lx\n", hr); ok(state == TASK_STATE_DISABLED, "expected TASK_STATE_DISABLED, got %d\n", state); hr = IRegisteredTask_get_Enabled(task1, &vbool); - ok(hr == S_OK, "get_Enabled error %#x\n", hr); + ok(hr == S_OK, "get_Enabled error %#lx\n", hr); ok(vbool == VARIANT_FALSE, "expected VARIANT_FALSE, got %d\n", vbool);
hr = IRegisteredTask_put_Enabled(task1, VARIANT_TRUE); - ok(hr == S_OK, "put_Enabled error %#x\n", hr); + ok(hr == S_OK, "put_Enabled error %#lx\n", hr); hr = IRegisteredTask_get_State(task1, &state); - ok(hr == S_OK, "get_State error %#x\n", hr); + ok(hr == S_OK, "get_State error %#lx\n", hr); todo_wine ok(state == TASK_STATE_READY, "expected TASK_STATE_READY, got %d\n", state); hr = IRegisteredTask_get_Enabled(task1, &vbool); - ok(hr == S_OK, "get_Enabled error %#x\n", hr); + ok(hr == S_OK, "get_Enabled error %#lx\n", hr); todo_wine ok(vbool == VARIANT_TRUE, "expected VARIANT_TRUE, got %d\n", vbool);
IRegisteredTask_Release(task1);
hr = ITaskFolder_GetTask(folder, Task2, &task2); - ok(hr == S_OK, "GetTask error %#x\n", hr); + ok(hr == S_OK, "GetTask error %#lx\n", hr);
hr = IRegisteredTask_get_Name(task2, &bstr); - ok(hr == S_OK, "get_Name error %#x\n", hr); + ok(hr == S_OK, "get_Name error %#lx\n", hr); ok(!lstrcmpW(bstr, Task2), "expected Task2, got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); hr = IRegisteredTask_get_Path(task2, &bstr); - ok(hr == S_OK, "get_Path error %#x\n", hr); + ok(hr == S_OK, "get_Path error %#lx\n", hr); ok(!lstrcmpW(bstr, Wine_Task2), "expected \Wine\Task2, got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); hr = IRegisteredTask_get_State(task2, &state); - ok(hr == S_OK, "get_State error %#x\n", hr); + ok(hr == S_OK, "get_State error %#lx\n", hr); todo_wine ok(state == TASK_STATE_READY, "expected TASK_STATE_READY, got %d\n", state); hr = IRegisteredTask_get_Enabled(task2, &vbool); - ok(hr == S_OK, "get_Enabled error %#x\n", hr); + ok(hr == S_OK, "get_Enabled error %#lx\n", hr); todo_wine ok(vbool == VARIANT_TRUE, "expected VARIANT_TRUE, got %d\n", vbool);
hr = IRegisteredTask_get_State(task2, NULL); - ok(hr == E_POINTER, "expected E_POINTER, got %#x\n", hr); + ok(hr == E_POINTER, "expected E_POINTER, got %#lx\n", hr); hr = IRegisteredTask_get_Enabled(task2, NULL); - ok(hr == E_POINTER, "expected E_POINTER, got %#x\n", hr); + ok(hr == E_POINTER, "expected E_POINTER, got %#lx\n", hr);
IRegisteredTask_Release(task2);
hr = ITaskFolder_DeleteTask(folder, NULL, 0); todo_wine - ok(hr == HRESULT_FROM_WIN32(ERROR_DIR_NOT_EMPTY), "expected ERROR_DIR_NOT_EMPTY, got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_DIR_NOT_EMPTY), "expected ERROR_DIR_NOT_EMPTY, got %#lx\n", hr);
hr = ITaskFolder_DeleteTask(root, Wine_Task1, 0); - ok(hr == S_OK, "DeleteTask error %#x\n", hr); + ok(hr == S_OK, "DeleteTask error %#lx\n", hr); hr = ITaskFolder_DeleteTask(folder, Task2, 0); - ok(hr == S_OK, "DeleteTask error %#x\n", hr); + ok(hr == S_OK, "DeleteTask error %#lx\n", hr);
hr = ITaskFolder_DeleteTask(folder, Task2, 0); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || hr == S_OK /* win7 */, "expected ERROR_FILE_NOT_FOUND, got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || hr == S_OK /* win7 */, "expected ERROR_FILE_NOT_FOUND, got %#lx\n", hr);
hr = ITaskFolder_RegisterTask(root, NULL, xmlW, TASK_CREATE, v_null, v_null, TASK_LOGON_NONE, v_null, &task1); if(hr == E_ACCESSDENIED) @@ -951,27 +951,27 @@ static void test_GetTask(void) skip("Access denied\n"); goto no_access; } - ok(hr == S_OK, "RegisterTask error %#x\n", hr); + ok(hr == S_OK, "RegisterTask error %#lx\n", hr);
hr = IRegisteredTask_get_Name(task1, &bstr); - ok(hr == S_OK, "get_Name error %#x\n", hr); + ok(hr == S_OK, "get_Name error %#lx\n", hr); hr = IIDFromString(bstr, &iid); - ok(hr == S_OK, "IIDFromString error %#x\n", hr); + ok(hr == S_OK, "IIDFromString error %#lx\n", hr);
IRegisteredTask_Release(task1);
hr = ITaskFolder_DeleteTask(root, bstr, 0); - ok(hr == S_OK, "DeleteTask error %#x\n", hr); + ok(hr == S_OK, "DeleteTask error %#lx\n", hr); SysFreeString(bstr);
hr = ITaskFolder_RegisterTask(folder, NULL, xmlW, TASK_CREATE, v_null, v_null, TASK_LOGON_NONE, v_null, &task1); - ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#x\n", hr); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#lx\n", hr);
no_access: ITaskFolder_Release(folder);
hr = ITaskFolder_DeleteFolder(root, Wine, 0); - ok(hr == S_OK, "DeleteFolder error %#x\n", hr); + ok(hr == S_OK, "DeleteFolder error %#lx\n", hr);
ITaskFolder_Release(root); ITaskService_Release(service); @@ -1010,14 +1010,14 @@ static void test_settings_v1(ITaskDefinition *taskdef, struct settings *test, st TASK_COMPATIBILITY compat;
hr = ITaskDefinition_get_Settings(taskdef, &set); - ok(hr == S_OK, "get_Settings error %#x\n", hr); + ok(hr == S_OK, "get_Settings error %#lx\n", hr);
hr = ITaskSettings_get_AllowDemandStart(set, &vbool); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(vbool == def->allow_on_demand_start, "expected %d, got %d\n", def->allow_on_demand_start, vbool);
hr = ITaskSettings_get_RestartInterval(set, &bstr); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); if (!def->restart_interval[0]) ok(bstr == NULL, "expected NULL, got %s\n", wine_dbgstr_w(bstr)); else @@ -1027,35 +1027,35 @@ static void test_settings_v1(ITaskDefinition *taskdef, struct settings *test, st }
hr = ITaskSettings_get_RestartCount(set, &vint); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(vint == def->restart_count, "expected %d, got %d\n", def->restart_count, vint);
hr = ITaskSettings_get_MultipleInstances(set, &policy); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(policy == def->policy, "expected %d, got %d\n", def->policy, policy);
hr = ITaskSettings_get_StopIfGoingOnBatteries(set, &vbool); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(vbool == test->stop_if_going_on_batteries, "expected %d, got %d\n", test->stop_if_going_on_batteries, vbool);
hr = ITaskSettings_get_DisallowStartIfOnBatteries(set, &vbool); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(vbool == test->disallow_start_if_on_batteries, "expected %d, got %d\n", test->disallow_start_if_on_batteries, vbool);
hr = ITaskSettings_get_AllowHardTerminate(set, &vbool); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(vbool == def->allow_hard_terminate, "expected %d, got %d\n", def->allow_hard_terminate, vbool);
hr = ITaskSettings_get_StartWhenAvailable(set, &vbool); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(vbool == def->start_when_available, "expected %d, got %d\n", def->start_when_available, vbool);
hr = ITaskSettings_get_RunOnlyIfNetworkAvailable(set, &vbool); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(vbool == def->run_only_if_network_available, "expected %d, got %d\n", def->run_only_if_network_available, vbool);
hr = ITaskSettings_get_ExecutionTimeLimit(set, &bstr); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); if (!test->execution_time_limit[0]) ok(bstr == NULL, "expected NULL, got %s\n", wine_dbgstr_w(bstr)); else @@ -1065,11 +1065,11 @@ static void test_settings_v1(ITaskDefinition *taskdef, struct settings *test, st }
hr = ITaskSettings_get_Enabled(set, &vbool); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(vbool == test->enabled, "expected %d, got %d\n", test->enabled, vbool);
hr = ITaskSettings_get_DeleteExpiredTaskAfter(set, &bstr); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); if (!test->delete_expired_task_after[0]) ok(bstr == NULL, "expected NULL, got %s\n", wine_dbgstr_w(bstr)); else @@ -1079,23 +1079,23 @@ static void test_settings_v1(ITaskDefinition *taskdef, struct settings *test, st }
hr = ITaskSettings_get_Priority(set, &vint); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(vint == test->priority, "expected %d, got %d\n", test->priority, vint);
hr = ITaskSettings_get_Compatibility(set, &compat); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(compat == test->compatibility, "expected %d, got %d\n", test->compatibility, compat);
hr = ITaskSettings_get_Hidden(set, &vbool); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(vbool == test->hidden, "expected %d, got %d\n", test->hidden, vbool);
hr = ITaskSettings_get_RunOnlyIfIdle(set, &vbool); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(vbool == test->run_only_if_idle, "expected %d, got %d\n", test->run_only_if_idle, vbool);
hr = ITaskSettings_get_WakeToRun(set, &vbool); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(vbool == test->wake_to_run, "expected %d, got %d\n", test->wake_to_run, vbool);
/* FIXME: test IIdleSettings and INetworkSettings */ @@ -1112,93 +1112,93 @@ static void change_settings(ITaskDefinition *taskdef, struct settings *test) IActionCollection *actions;
hr = ITaskDefinition_get_Settings(taskdef, &set); - ok(hr == S_OK, "get_Settings error %#x\n", hr); + ok(hr == S_OK, "get_Settings error %#lx\n", hr);
if (!test->restart_interval[0]) hr = ITaskSettings_put_RestartInterval(set, NULL); else hr = ITaskSettings_put_RestartInterval(set, test->restart_interval); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
hr = ITaskSettings_put_RestartCount(set, test->restart_count); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
hr = ITaskSettings_put_MultipleInstances(set, test->policy); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
hr = ITaskSettings_put_StopIfGoingOnBatteries(set, test->stop_if_going_on_batteries); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
hr = ITaskSettings_put_DisallowStartIfOnBatteries(set, test->disallow_start_if_on_batteries); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
hr = ITaskSettings_put_AllowHardTerminate(set, test->allow_hard_terminate); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
hr = ITaskSettings_put_StartWhenAvailable(set, test->start_when_available); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
hr = ITaskSettings_put_RunOnlyIfNetworkAvailable(set, test->run_only_if_network_available); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
if (!test->execution_time_limit[0]) hr = ITaskSettings_put_ExecutionTimeLimit(set, NULL); else hr = ITaskSettings_put_ExecutionTimeLimit(set, test->execution_time_limit); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
hr = ITaskSettings_put_Enabled(set, test->enabled); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
if (!test->delete_expired_task_after[0]) hr = ITaskSettings_put_DeleteExpiredTaskAfter(set, NULL); else hr = ITaskSettings_put_DeleteExpiredTaskAfter(set, test->delete_expired_task_after); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
hr = ITaskSettings_put_Priority(set, test->priority); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
hr = ITaskSettings_put_Compatibility(set, test->compatibility); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
hr = ITaskSettings_put_Hidden(set, test->hidden); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
hr = ITaskSettings_put_RunOnlyIfIdle(set, test->run_only_if_idle); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
hr = ITaskSettings_put_WakeToRun(set, test->wake_to_run); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
hr = ITaskSettings_put_AllowDemandStart(set, test->allow_on_demand_start); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
triggers = NULL; hr = ITaskDefinition_get_Triggers(taskdef, &triggers); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(triggers != NULL, "triggers not set\n");
hr = ITaskDefinition_put_Triggers(taskdef, triggers); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); if (triggers) ITriggerCollection_Release(triggers);
principal = NULL; hr = ITaskDefinition_get_Principal(taskdef, &principal); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(principal != NULL, "principal not set\n");
hr = ITaskDefinition_put_Principal(taskdef, principal); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); if (principal) IPrincipal_Release(principal);
actions = NULL; hr = ITaskDefinition_get_Actions(taskdef, &actions); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(actions != NULL, "actions not set\n");
hr = ITaskDefinition_put_Actions(taskdef, actions); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); if (actions) IActionCollection_Release(actions);
/* FIXME: set IIdleSettings and INetworkSettings */ @@ -1242,73 +1242,73 @@ static void test_daily_trigger(ITrigger *trigger) ULONG i;
hr = ITrigger_QueryInterface(trigger, &IID_IDailyTrigger, (void**)&daily_trigger); - ok(hr == S_OK, "Could not get IDailyTrigger iface: %08x\n", hr); + ok(hr == S_OK, "Could not get IDailyTrigger iface: %08lx\n", hr);
interval = -1; hr = IDailyTrigger_get_DaysInterval(daily_trigger, &interval); - ok(hr == S_OK, "get_DaysInterval failed: %08x\n", hr); + ok(hr == S_OK, "get_DaysInterval failed: %08lx\n", hr); ok(interval == 1, "interval = %d\n", interval);
hr = IDailyTrigger_put_DaysInterval(daily_trigger, -2); - ok(hr == E_INVALIDARG, "put_DaysInterval failed: %08x\n", hr); + ok(hr == E_INVALIDARG, "put_DaysInterval failed: %08lx\n", hr); hr = IDailyTrigger_put_DaysInterval(daily_trigger, 0); - ok(hr == E_INVALIDARG, "put_DaysInterval failed: %08x\n", hr); + ok(hr == E_INVALIDARG, "put_DaysInterval failed: %08lx\n", hr);
interval = -1; hr = IDailyTrigger_get_DaysInterval(daily_trigger, &interval); - ok(hr == S_OK, "get_DaysInterval failed: %08x\n", hr); + ok(hr == S_OK, "get_DaysInterval failed: %08lx\n", hr); ok(interval == 1, "interval = %d\n", interval);
hr = IDailyTrigger_put_DaysInterval(daily_trigger, 2); - ok(hr == S_OK, "put_DaysInterval failed: %08x\n", hr); + ok(hr == S_OK, "put_DaysInterval failed: %08lx\n", hr);
interval = -1; hr = IDailyTrigger_get_DaysInterval(daily_trigger, &interval); - ok(hr == S_OK, "get_DaysInterval failed: %08x\n", hr); + ok(hr == S_OK, "get_DaysInterval failed: %08lx\n", hr); ok(interval == 2, "interval = %d\n", interval);
hr = IDailyTrigger_get_StartBoundary(daily_trigger, NULL); - ok(hr == E_POINTER, "get_StartBoundary failed: %08x\n", hr); + ok(hr == E_POINTER, "get_StartBoundary failed: %08lx\n", hr);
start_boundary = (BSTR)0xdeadbeef; hr = IDailyTrigger_get_StartBoundary(daily_trigger, &start_boundary); - ok(hr == S_OK, "get_StartBoundary failed: %08x\n", hr); + ok(hr == S_OK, "get_StartBoundary failed: %08lx\n", hr); ok(start_boundary == NULL, "start_boundary not set\n");
for (i = 0; i < ARRAY_SIZE(start_test); i++) { start_boundary = SysAllocString(start_test[i].str); hr = IDailyTrigger_put_StartBoundary(daily_trigger, start_boundary); - ok(hr == start_test[i].hr, "%u: got %08x expected %08x\n", i, hr, start_test[i].hr); + ok(hr == start_test[i].hr, "%lu: got %08lx expected %08lx\n", i, hr, start_test[i].hr); SysFreeString(start_boundary); if (hr == S_OK) { start_boundary = NULL; hr = IDailyTrigger_get_StartBoundary(daily_trigger, &start_boundary); - ok(hr == S_OK, "%u: got %08x\n", i, hr); + ok(hr == S_OK, "%lu: got %08lx\n", i, hr); ok(start_boundary != NULL, "start_boundary not set\n"); - ok(!lstrcmpW(start_boundary, start_test[i].str), "%u: got %s\n", i, wine_dbgstr_w(start_boundary)); + ok(!lstrcmpW(start_boundary, start_test[i].str), "%lu: got %s\n", i, wine_dbgstr_w(start_boundary)); SysFreeString(start_boundary); } }
hr = IDailyTrigger_put_StartBoundary(daily_trigger, NULL); - ok(hr == S_OK, "put_StartBoundary failed: %08x\n", hr); + ok(hr == S_OK, "put_StartBoundary failed: %08lx\n", hr);
hr = IDailyTrigger_get_Enabled(daily_trigger, NULL); - ok(hr == E_POINTER, "get_Enabled failed: %08x\n", hr); + ok(hr == E_POINTER, "get_Enabled failed: %08lx\n", hr);
enabled = VARIANT_FALSE; hr = IDailyTrigger_get_Enabled(daily_trigger, &enabled); - ok(hr == S_OK, "get_Enabled failed: %08x\n", hr); + ok(hr == S_OK, "get_Enabled failed: %08lx\n", hr); ok(enabled == VARIANT_TRUE, "got %d\n", enabled);
hr = IDailyTrigger_put_Enabled(daily_trigger, VARIANT_FALSE); - ok(hr == S_OK, "put_Enabled failed: %08x\n", hr); + ok(hr == S_OK, "put_Enabled failed: %08lx\n", hr);
enabled = VARIANT_TRUE; hr = IDailyTrigger_get_Enabled(daily_trigger, &enabled); - ok(hr == S_OK, "get_Enabled failed: %08x\n", hr); + ok(hr == S_OK, "get_Enabled failed: %08lx\n", hr); ok(enabled == VARIANT_FALSE, "got %d\n", enabled);
IDailyTrigger_Release(daily_trigger); @@ -1328,81 +1328,81 @@ static void create_action(ITaskDefinition *taskdef) BSTR path, str;
hr = ITaskDefinition_get_Actions(taskdef, NULL); - ok(hr == E_POINTER, "got %#x\n", hr); + ok(hr == E_POINTER, "got %#lx\n", hr);
hr = ITaskDefinition_get_Actions(taskdef, &actions); - ok(hr == S_OK, "get_Actions error %#x\n", hr); + ok(hr == S_OK, "get_Actions error %#lx\n", hr);
hr = IActionCollection_Create(actions, TASK_ACTION_EXEC, &action); - ok(hr == S_OK, "Create action error %#x\n", hr); + ok(hr == S_OK, "Create action error %#lx\n", hr);
hr = IAction_QueryInterface(action, &IID_IExecAction, (void **)&exec_action); - ok(hr == S_OK, "QueryInterface error %#x\n", hr); + ok(hr == S_OK, "QueryInterface error %#lx\n", hr);
type = 0xdeadbeef; hr = IExecAction_get_Type(exec_action, &type); - ok(hr == S_OK, "get_Type error %#x\n", hr); + ok(hr == S_OK, "get_Type error %#lx\n", hr); ok(type == TASK_ACTION_EXEC, "got %u\n", type );
hr = IExecAction_get_Path(exec_action, NULL); - ok(hr == E_POINTER, "got %#x\n", hr); + ok(hr == E_POINTER, "got %#lx\n", hr);
path = (BSTR)0xdeadbeef; hr = IExecAction_get_Path(exec_action, &path); - ok(hr == S_OK, "get_Path error %#x\n", hr); + ok(hr == S_OK, "get_Path error %#lx\n", hr); ok(path == NULL, "path not set\n");
hr = IExecAction_put_Path(exec_action, NULL); - ok(hr == S_OK, "put_Path error %#x\n", hr); + ok(hr == S_OK, "put_Path error %#lx\n", hr);
hr = IExecAction_put_Path(exec_action, task1_exe); - ok(hr == S_OK, "put_Path error %#x\n", hr); + ok(hr == S_OK, "put_Path error %#lx\n", hr);
path = NULL; hr = IExecAction_get_Path(exec_action, &path); - ok(hr == S_OK, "get_Path error %#x\n", hr); + ok(hr == S_OK, "get_Path error %#lx\n", hr); ok(path != NULL, "path not set\n"); ok(!lstrcmpW(path, task1_exe), "got %s\n", wine_dbgstr_w(path)); SysFreeString(path);
hr = IExecAction_get_WorkingDirectory(exec_action, NULL); - ok(hr == E_POINTER, "got %#x\n", hr); + ok(hr == E_POINTER, "got %#lx\n", hr);
path = (BSTR)0xdeadbeef; hr = IExecAction_get_WorkingDirectory(exec_action, &path); - ok(hr == S_OK, "get_WorkingDirectory error %#x\n", hr); + ok(hr == S_OK, "get_WorkingDirectory error %#lx\n", hr); ok(path == NULL, "workdir not set\n");
hr = IExecAction_put_WorkingDirectory(exec_action, NULL); - ok(hr == S_OK, "put_WorkingDirectory error %#x\n", hr); + ok(hr == S_OK, "put_WorkingDirectory error %#lx\n", hr);
hr = IExecAction_put_WorkingDirectory(exec_action, workdir); - ok(hr == S_OK, "put_WorkingDirectory error %#x\n", hr); + ok(hr == S_OK, "put_WorkingDirectory error %#lx\n", hr);
path = NULL; hr = IExecAction_get_WorkingDirectory(exec_action, &path); - ok(hr == S_OK, "get_WorkingDirectory error %#x\n", hr); + ok(hr == S_OK, "get_WorkingDirectory error %#lx\n", hr); ok(path != NULL, "workdir not set\n"); ok(!lstrcmpW(path, workdir), "got %s\n", wine_dbgstr_w(path)); SysFreeString(path);
hr = IExecAction_get_Arguments(exec_action, NULL); - ok(hr == E_POINTER, "got %#x\n", hr); + ok(hr == E_POINTER, "got %#lx\n", hr);
path = (BSTR)0xdeadbeef; hr = IExecAction_get_Arguments(exec_action, &path); - ok(hr == S_OK, "get_Arguments error %#x\n", hr); + ok(hr == S_OK, "get_Arguments error %#lx\n", hr); ok(path == NULL, "args not set\n");
hr = IExecAction_put_Arguments(exec_action, NULL); - ok(hr == S_OK, "put_Arguments error %#x\n", hr); + ok(hr == S_OK, "put_Arguments error %#lx\n", hr);
hr = IExecAction_put_Arguments(exec_action, args); - ok(hr == S_OK, "put_Arguments error %#x\n", hr); + ok(hr == S_OK, "put_Arguments error %#lx\n", hr);
path = NULL; hr = IExecAction_get_Arguments(exec_action, &path); - ok(hr == S_OK, "get_Arguments error %#x\n", hr); + ok(hr == S_OK, "get_Arguments error %#lx\n", hr); ok(path != NULL, "args not set\n"); ok(!lstrcmpW(path, args), "got %s\n", wine_dbgstr_w(path)); SysFreeString(path); @@ -1410,18 +1410,18 @@ static void create_action(ITaskDefinition *taskdef)
str = (BSTR)0xdeadbeef; hr = IExecAction_get_Id(exec_action, &str); - ok(hr == S_OK, "get_Id error %#x\n", hr); + ok(hr == S_OK, "get_Id error %#lx\n", hr); ok(str == NULL, "id should be NULL\n");
hr = IExecAction_put_Id(exec_action, NULL); - ok(hr == S_OK, "put_Id error %#x\n", hr); + ok(hr == S_OK, "put_Id error %#lx\n", hr);
hr = IExecAction_put_Id(exec_action, comment); - ok(hr == S_OK, "put_Id error %#x\n", hr); + ok(hr == S_OK, "put_Id error %#lx\n", hr);
str = NULL; hr = IExecAction_get_Id(exec_action, &str); - ok(hr == S_OK, "get_Id error %#x\n", hr); + ok(hr == S_OK, "get_Id error %#lx\n", hr); ok(str != NULL, "should not be NULL\n"); ok(!lstrcmpW(str, comment), "got %s\n", wine_dbgstr_w(str)); SysFreeString(str); @@ -1550,12 +1550,12 @@ static void test_TaskDefinition(void) hr = CoCreateInstance(&CLSID_TaskScheduler, NULL, CLSCTX_INPROC_SERVER, &IID_ITaskService, (void **)&service); if (hr != S_OK) { - win_skip("CoCreateInstance(CLSID_TaskScheduler) error %#x\n", hr); + win_skip("CoCreateInstance(CLSID_TaskScheduler) error %#lx\n", hr); return; }
hr = ITaskService_NewTask(service, 0, &taskdef); - ok(hr == S_OK, "NewTask error %#x\n", hr); + ok(hr == S_OK, "NewTask error %#lx\n", hr);
test_settings_v1(taskdef, &def_settings, &def_settings); change_settings(taskdef, &new_settings); @@ -1564,15 +1564,15 @@ static void test_TaskDefinition(void) create_action(taskdef);
hr = ITaskDefinition_get_XmlText(taskdef, &xml); - ok(hr == S_OK, "get_XmlText error %#x\n", hr); + ok(hr == S_OK, "get_XmlText error %#lx\n", hr);
ITaskDefinition_Release(taskdef);
hr = ITaskService_NewTask(service, 0, &taskdef); - ok(hr == S_OK, "NewTask error %#x\n", hr); + ok(hr == S_OK, "NewTask error %#lx\n", hr);
hr = ITaskDefinition_put_XmlText(taskdef, xml); - ok(hr == S_OK, "put_XmlText error %#x\n", hr); + ok(hr == S_OK, "put_XmlText error %#lx\n", hr); SysFreeString(xml);
/* FIXME: uncomment once changing settings is implemented @@ -1580,131 +1580,131 @@ static void test_TaskDefinition(void) */
hr = ITaskDefinition_put_XmlText(taskdef, NULL); - ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#x\n", hr); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#lx\n", hr);
MultiByteToWideChar(CP_ACP, 0, xml1, -1, xmlW, ARRAY_SIZE(xmlW)); hr = ITaskDefinition_put_XmlText(taskdef, xmlW); - ok(hr == S_OK, "put_XmlText error %#x\n", hr); + ok(hr == S_OK, "put_XmlText error %#lx\n", hr);
MultiByteToWideChar(CP_ACP, 0, xml2, -1, xmlW, ARRAY_SIZE(xmlW)); hr = ITaskDefinition_put_XmlText(taskdef, xmlW); - ok(hr == SCHED_E_NAMESPACE, "expected SCHED_E_NAMESPACE, got %#x\n", hr); + ok(hr == SCHED_E_NAMESPACE, "expected SCHED_E_NAMESPACE, got %#lx\n", hr);
MultiByteToWideChar(CP_ACP, 0, xml3, -1, xmlW, ARRAY_SIZE(xmlW)); hr = ITaskDefinition_put_XmlText(taskdef, xmlW); todo_wine - ok(hr == SCHED_E_UNEXPECTEDNODE, "expected SCHED_E_UNEXPECTEDNODE, got %#x\n", hr); + ok(hr == SCHED_E_UNEXPECTEDNODE, "expected SCHED_E_UNEXPECTEDNODE, got %#lx\n", hr);
MultiByteToWideChar(CP_ACP, 0, xml4, -1, xmlW, ARRAY_SIZE(xmlW)); hr = ITaskDefinition_put_XmlText(taskdef, xmlW); - ok(hr == S_OK, "put_XmlText error %#x\n", hr); + ok(hr == S_OK, "put_XmlText error %#lx\n", hr);
MultiByteToWideChar(CP_ACP, 0, xml5, -1, xmlW, ARRAY_SIZE(xmlW)); hr = ITaskDefinition_put_XmlText(taskdef, xmlW); todo_wine - ok(hr == SCHED_E_MISSINGNODE, "expected SCHED_E_MISSINGNODE, got %#x\n", hr); + ok(hr == SCHED_E_MISSINGNODE, "expected SCHED_E_MISSINGNODE, got %#lx\n", hr);
MultiByteToWideChar(CP_ACP, 0, xml6, -1, xmlW, ARRAY_SIZE(xmlW)); hr = ITaskDefinition_put_XmlText(taskdef, xmlW); - ok(hr == SCHED_E_MALFORMEDXML, "expected SCHED_E_MALFORMEDXML, got %#x\n", hr); + ok(hr == SCHED_E_MALFORMEDXML, "expected SCHED_E_MALFORMEDXML, got %#lx\n", hr);
MultiByteToWideChar(CP_ACP, 0, xml7, -1, xmlW, ARRAY_SIZE(xmlW)); hr = ITaskDefinition_put_XmlText(taskdef, xmlW); - ok(hr == SCHED_E_INVALIDVALUE, "expected SCHED_E_INVALIDVALUE, got %#x\n", hr); + ok(hr == SCHED_E_INVALIDVALUE, "expected SCHED_E_INVALIDVALUE, got %#lx\n", hr);
xmlW[0] = 0; hr = ITaskDefinition_put_XmlText(taskdef, xmlW); - ok(hr == SCHED_E_MALFORMEDXML, "expected SCHED_E_MALFORMEDXML, got %#x\n", hr); + ok(hr == SCHED_E_MALFORMEDXML, "expected SCHED_E_MALFORMEDXML, got %#lx\n", hr);
/* test registration info */ MultiByteToWideChar(CP_ACP, 0, xml1, -1, xmlW, ARRAY_SIZE(xmlW)); hr = ITaskDefinition_put_XmlText(taskdef, xmlW); - ok(hr == S_OK, "put_XmlText error %#x\n", hr); + ok(hr == S_OK, "put_XmlText error %#lx\n", hr); hr = ITaskDefinition_get_RegistrationInfo(taskdef, ®info); - ok(hr == S_OK, "get_RegistrationInfo error %#x\n", hr); + ok(hr == S_OK, "get_RegistrationInfo error %#lx\n", hr);
hr = IRegistrationInfo_get_Description(reginfo, &bstr); - ok(hr == S_OK, "get_Description error %#x\n", hr); + ok(hr == S_OK, "get_Description error %#lx\n", hr); ok(!lstrcmpW(bstr, Task1), "expected Task1, got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); hr = IRegistrationInfo_put_Description(reginfo, NULL); - ok(hr == S_OK, "put_Description error %#x\n", hr); + ok(hr == S_OK, "put_Description error %#lx\n", hr); bstr = (BSTR)0xdeadbeef; hr = IRegistrationInfo_get_Description(reginfo, &bstr); - ok(hr == S_OK, "get_Description error %#x\n", hr); + ok(hr == S_OK, "get_Description error %#lx\n", hr); ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr));
hr = IRegistrationInfo_get_Author(reginfo, &bstr); - ok(hr == S_OK, "get_Author error %#x\n", hr); + ok(hr == S_OK, "get_Author error %#lx\n", hr); ok(!lstrcmpW(bstr, authorW), "expected %s, got %s\n", wine_dbgstr_w(authorW), wine_dbgstr_w(bstr)); SysFreeString(bstr); hr = IRegistrationInfo_put_Author(reginfo, NULL); - ok(hr == S_OK, "put_Author error %#x\n", hr); + ok(hr == S_OK, "put_Author error %#lx\n", hr); bstr = (BSTR)0xdeadbeef; hr = IRegistrationInfo_get_Author(reginfo, &bstr); - ok(hr == S_OK, "get_Author error %#x\n", hr); + ok(hr == S_OK, "get_Author error %#lx\n", hr); ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr));
hr = IRegistrationInfo_get_Version(reginfo, &bstr); - ok(hr == S_OK, "get_Version error %#x\n", hr); + ok(hr == S_OK, "get_Version error %#lx\n", hr); ok(!lstrcmpW(bstr, versionW), "expected %s, got %s\n", wine_dbgstr_w(versionW), wine_dbgstr_w(bstr)); SysFreeString(bstr); hr = IRegistrationInfo_put_Version(reginfo, NULL); - ok(hr == S_OK, "put_Version error %#x\n", hr); + ok(hr == S_OK, "put_Version error %#lx\n", hr); bstr = (BSTR)0xdeadbeef; hr = IRegistrationInfo_get_Version(reginfo, &bstr); - ok(hr == S_OK, "get_Version error %#x\n", hr); + ok(hr == S_OK, "get_Version error %#lx\n", hr); ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr));
hr = IRegistrationInfo_get_Date(reginfo, &bstr); - ok(hr == S_OK, "get_Date error %#x\n", hr); + ok(hr == S_OK, "get_Date error %#lx\n", hr); ok(!lstrcmpW(bstr, dateW), "expected %s, got %s\n", wine_dbgstr_w(dateW), wine_dbgstr_w(bstr)); SysFreeString(bstr); hr = IRegistrationInfo_put_Date(reginfo, NULL); - ok(hr == S_OK, "put_Date error %#x\n", hr); + ok(hr == S_OK, "put_Date error %#lx\n", hr); bstr = (BSTR)0xdeadbeef; hr = IRegistrationInfo_get_Date(reginfo, &bstr); - ok(hr == S_OK, "get_Date error %#x\n", hr); + ok(hr == S_OK, "get_Date error %#lx\n", hr); ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr));
hr = IRegistrationInfo_get_Documentation(reginfo, &bstr); - ok(hr == S_OK, "get_Documentation error %#x\n", hr); + ok(hr == S_OK, "get_Documentation error %#lx\n", hr); ok(!lstrcmpW(bstr, docW), "expected %s, got %s\n", wine_dbgstr_w(docW), wine_dbgstr_w(bstr)); SysFreeString(bstr); hr = IRegistrationInfo_put_Documentation(reginfo, NULL); - ok(hr == S_OK, "put_Documentation error %#x\n", hr); + ok(hr == S_OK, "put_Documentation error %#lx\n", hr); bstr = (BSTR)0xdeadbeef; hr = IRegistrationInfo_get_Documentation(reginfo, &bstr); - ok(hr == S_OK, "get_Documentation error %#x\n", hr); + ok(hr == S_OK, "get_Documentation error %#lx\n", hr); ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr));
hr = IRegistrationInfo_get_URI(reginfo, &bstr); - ok(hr == S_OK, "get_URI error %#x\n", hr); + ok(hr == S_OK, "get_URI error %#lx\n", hr); ok(!lstrcmpW(bstr, uriW), "expected %s, got %s\n", wine_dbgstr_w(uriW), wine_dbgstr_w(bstr)); SysFreeString(bstr); hr = IRegistrationInfo_put_URI(reginfo, NULL); - ok(hr == S_OK, "put_URI error %#x\n", hr); + ok(hr == S_OK, "put_URI error %#lx\n", hr); bstr = (BSTR)0xdeadbeef; hr = IRegistrationInfo_get_URI(reginfo, &bstr); - ok(hr == S_OK, "get_URI error %#x\n", hr); + ok(hr == S_OK, "get_URI error %#lx\n", hr); ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr));
hr = IRegistrationInfo_get_Source(reginfo, &bstr); - ok(hr == S_OK, "get_Source error %#x\n", hr); + ok(hr == S_OK, "get_Source error %#lx\n", hr); ok(!lstrcmpW(bstr, sourceW), "expected %s, got %s\n", wine_dbgstr_w(sourceW), wine_dbgstr_w(bstr)); SysFreeString(bstr); hr = IRegistrationInfo_put_Source(reginfo, NULL); - ok(hr == S_OK, "put_Source error %#x\n", hr); + ok(hr == S_OK, "put_Source error %#lx\n", hr); bstr = (BSTR)0xdeadbeef; hr = IRegistrationInfo_get_Source(reginfo, &bstr); - ok(hr == S_OK, "get_Source error %#x\n", hr); + ok(hr == S_OK, "get_Source error %#lx\n", hr); ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr));
V_VT(&var) = VT_BSTR; V_BSTR(&var) = NULL; hr = IRegistrationInfo_get_SecurityDescriptor(reginfo, &var); todo_wine - ok(hr == S_OK, "get_SecurityDescriptor error %#x\n", hr); + ok(hr == S_OK, "get_SecurityDescriptor error %#lx\n", hr); if (hr == S_OK) ok(V_VT(&var) == VT_EMPTY, "expected VT_EMPTY, got %u\n", V_VT(&var));
@@ -1712,27 +1712,27 @@ static void test_TaskDefinition(void)
MultiByteToWideChar(CP_ACP, 0, xml4, -1, xmlW, ARRAY_SIZE(xmlW)); hr = ITaskDefinition_put_XmlText(taskdef, xmlW); - ok(hr == S_OK, "put_XmlText error %#x\n", hr); + ok(hr == S_OK, "put_XmlText error %#lx\n", hr); hr = ITaskDefinition_get_RegistrationInfo(taskdef, ®info); - ok(hr == S_OK, "get_RegistrationInfo error %#x\n", hr); + ok(hr == S_OK, "get_RegistrationInfo error %#lx\n", hr);
hr = IRegistrationInfo_get_Description(reginfo, &bstr); - ok(hr == S_OK, "get_Description error %#x\n", hr); + ok(hr == S_OK, "get_Description error %#lx\n", hr); ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr));
hr = ITaskDefinition_get_Triggers(taskdef, &trigger_col); - ok(hr == S_OK, "get_Triggers failed: %08x\n", hr); + ok(hr == S_OK, "get_Triggers failed: %08lx\n", hr); ok(trigger_col != NULL, "Triggers = NULL\n");
hr = ITriggerCollection_Create(trigger_col, TASK_TRIGGER_DAILY, &trigger); - ok(hr == S_OK, "Create failed: %08x\n", hr); + ok(hr == S_OK, "Create failed: %08lx\n", hr); ok(trigger != NULL, "trigger = NULL\n"); test_daily_trigger(trigger); ITrigger_Release(trigger); ITriggerCollection_Release(trigger_col);
hr = ITaskDefinition_get_Triggers(taskdef, &trigger_col2); - ok(hr == S_OK, "get_Triggers failed: %08x\n", hr); + ok(hr == S_OK, "get_Triggers failed: %08lx\n", hr); ok(trigger_col == trigger_col2, "Mismatched triggers\n"); ITriggerCollection_Release(trigger_col2);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=109874
Your paranoid android.
=== w7u_adm (32 bit report) ===
taskschd: scheduler.c:790: Test failed: DeleteTask error 0x80070005 scheduler.c:786: Test failed: 1: expected 0, got 0x800700b7 scheduler.c:786: Test failed: 2: expected 0x80070002, got 0 scheduler.c:790: Test failed: DeleteTask error 0x80070005 scheduler.c:790: Test failed: DeleteTask error 0x80070005 scheduler.c:806: Test failed: RegisterTask error 0x800700b7 scheduler.c:941: Test failed: DeleteTask error 0x80070005 scheduler.c:943: Test failed: DeleteTask error 0x80070005 scheduler.c:946: Test failed: expected ERROR_FILE_NOT_FOUND, got 0x80070005
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/twain_32/tests/Makefile.in | 1 - dlls/twain_32/tests/dsm.c | 42 ++++++++++++++++++++------------------- 2 files changed, 21 insertions(+), 22 deletions(-)
diff --git a/dlls/twain_32/tests/Makefile.in b/dlls/twain_32/tests/Makefile.in index 4945fef23be..c8853713e60 100644 --- a/dlls/twain_32/tests/Makefile.in +++ b/dlls/twain_32/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = twain_32.dll IMPORTS = user32 gdi32
diff --git a/dlls/twain_32/tests/dsm.c b/dlls/twain_32/tests/dsm.c index cf0f7b42707..f12110c664b 100644 --- a/dlls/twain_32/tests/dsm.c +++ b/dlls/twain_32/tests/dsm.c @@ -47,7 +47,7 @@ static BOOL dsm_RegisterWindowClasses(void) cls.lpszClassName = "TWAIN_dsm_class";
rc = RegisterClassA(&cls); - ok(rc, "RegisterClassA failed: le=%u\n", GetLastError()); + ok(rc, "RegisterClassA failed: le=%lu\n", GetLastError()); return rc; }
@@ -114,9 +114,9 @@ static void check_get(TW_CAPABILITY *pCapability, TW_INT32 actual_support, if (pCapability->ConType == TWON_ONEVALUE) { TW_ONEVALUE *onev = p; - ok(onev->Item == orig_value || !(actual_support & TWQC_GETCURRENT), "MSG_GET of 0x%x returned 0x%x, expecting 0x%x\n", + ok(onev->Item == orig_value || !(actual_support & TWQC_GETCURRENT), "MSG_GET of 0x%x returned 0x%lx, expecting 0x%lx\n", pCapability->Cap, onev->Item, orig_value); - trace("MSG_GET of 0x%x returned val 0x%x, type %d\n", pCapability->Cap, onev->Item, onev->ItemType); + trace("MSG_GET of 0x%x returned val 0x%lx, type %d\n", pCapability->Cap, onev->Item, onev->ItemType); if (suggested_set_value) *suggested_set_value = onev->Item; } @@ -130,7 +130,7 @@ static void check_get(TW_CAPABILITY *pCapability, TW_INT32 actual_support, p8 = enumv->ItemList; p16 = (TW_UINT16 *) p8; p32 = (TW_UINT32 *) p8; - trace("MSG_GET of 0x%x returned %d items:\n", pCapability->Cap, enumv->NumItems); + trace("MSG_GET of 0x%x returned %ld items:\n", pCapability->Cap, enumv->NumItems); for (i = 0; i < enumv->NumItems; i++) { if (enumv->ItemType == TWTY_UINT8 || enumv->ItemType == TWTY_INT8) @@ -138,15 +138,15 @@ static void check_get(TW_CAPABILITY *pCapability, TW_INT32 actual_support, if (enumv->ItemType == TWTY_UINT16 || enumv->ItemType == TWTY_INT16) trace(" %d: 0x%x\n", i, p16[i]); if (enumv->ItemType == TWTY_UINT32 || enumv->ItemType == TWTY_INT32) - trace(" %d: 0x%x\n", i, p32[i]); + trace(" %d: 0x%lx\n", i, p32[i]); } if (enumv->ItemType == TWTY_UINT16 || enumv->ItemType == TWTY_INT16) { ok(p16[enumv->CurrentIndex] == orig_value, - "Type 0x%x, values from MSG_GET (0x%x) and MSG_GETCURRENT (0x%x) do not match.\n", + "Type 0x%x, values from MSG_GET (0x%x) and MSG_GETCURRENT (0x%lx) do not match.\n", pCapability->Cap, p16[enumv->CurrentIndex], orig_value); ok(p16[enumv->DefaultIndex] == default_value, - "Type 0x%x, values from MSG_GET (0x%x) and MSG_GETDEFAULT (0x%x) do not match.\n", + "Type 0x%x, values from MSG_GET (0x%x) and MSG_GETDEFAULT (0x%lx) do not match.\n", pCapability->Cap, p16[enumv->DefaultIndex], default_value); if (suggested_set_value) *suggested_set_value = p16[(enumv->CurrentIndex + 1) % enumv->NumItems]; @@ -154,10 +154,10 @@ static void check_get(TW_CAPABILITY *pCapability, TW_INT32 actual_support, if (enumv->ItemType == TWTY_UINT32 || enumv->ItemType == TWTY_INT32) { ok(p32[enumv->CurrentIndex] == orig_value, - "Type 0x%x, values from MSG_GET (0x%x) and MSG_GETCURRENT (0x%x) do not match.\n", + "Type 0x%x, values from MSG_GET (0x%lx) and MSG_GETCURRENT (0x%lx) do not match.\n", pCapability->Cap, p32[enumv->CurrentIndex], orig_value); ok(p32[enumv->DefaultIndex] == default_value, - "Type 0x%x, values from MSG_GET (0x%x) and MSG_GETDEFAULT (0x%x) do not match.\n", + "Type 0x%x, values from MSG_GET (0x%lx) and MSG_GETDEFAULT (0x%lx) do not match.\n", pCapability->Cap, p32[enumv->DefaultIndex], default_value); if (suggested_set_value) *suggested_set_value = p32[(enumv->CurrentIndex + 1) % enumv->NumItems]; @@ -192,7 +192,7 @@ static void test_onevalue_cap(TW_IDENTITY *appid, TW_IDENTITY *source, TW_UINT16 return; ok(get_onevalue(cap.hContainer, (TW_UINT32 *) &actual_support, NULL), "Returned cap.hContainer invalid for QuerySupport on type 0x%x\n", captype); ok((actual_support & minimum_support) == minimum_support, - "Error: minimum support 0x%x for type 0x%x, got 0x%x\n", minimum_support, + "Error: minimum support 0x%lx for type 0x%x, got 0x%lx\n", minimum_support, captype, actual_support);
@@ -301,7 +301,7 @@ static void test_resolution(TW_IDENTITY *appid, TW_IDENTITY *source, TW_UINT16 c return; ok(get_onevalue(cap.hContainer, (TW_UINT32 *) &actual_support, NULL), "Returned cap.hContainer invalid for QuerySupport on type 0x%x\n", captype); ok((actual_support & minimum_support) == minimum_support, - "Error: minimum support 0x%x for type 0x%x, got 0x%x\n", minimum_support, + "Error: minimum support 0x%lx for type 0x%x, got 0x%lx\n", minimum_support, captype, actual_support);
@@ -358,7 +358,7 @@ static void test_resolution(TW_IDENTITY *appid, TW_IDENTITY *source, TW_UINT16 c TW_RANGE *range; ok(cap.ConType == TWON_RANGE, "MSG_GET for ICAP_[XY]RESOLUTION did not return TWON_RANGE, but %d\n", cap.ConType); range = GlobalLock(cap.hContainer); - trace("MSG_GET of 0x%x returned [ItemType %d|MinValue %d|MaxValue %d|StepSize %d|DefaultValue %d|CurrentValue %d]:\n", + trace("MSG_GET of 0x%x returned [ItemType %d|MinValue %ld|MaxValue %ld|StepSize %ld|DefaultValue %ld|CurrentValue %ld]:\n", cap.Cap, range->ItemType, range->MinValue, range->MaxValue, range->StepSize, range->DefaultValue, range->CurrentValue); for (new_value = range->MinValue; new_value < range->MaxValue; new_value += range->StepSize) @@ -420,7 +420,7 @@ static void test_physical(TW_IDENTITY *appid, TW_IDENTITY *source, TW_UINT16 cap return; ok(get_onevalue(cap.hContainer, (TW_UINT32 *) &actual_support, NULL), "Returned cap.hContainer invalid for QuerySupport on type 0x%x\n", captype); ok((actual_support & minimum_support) == minimum_support, - "Error: minimum support 0x%x for type 0x%x, got 0x%x\n", minimum_support, + "Error: minimum support 0x%lx for type 0x%x, got 0x%lx\n", minimum_support, captype, actual_support);
@@ -474,7 +474,7 @@ static void test_physical(TW_IDENTITY *appid, TW_IDENTITY *source, TW_UINT16 cap { get_onevalue(cap.hContainer, &val, &type); ok(type == TWTY_FIX32, "GET for PHYSICALXXX is not type FIX32, is type %d\n", type); - trace("GET for Physical type 0x%x returns 0x%x\n", captype, val); + trace("GET for Physical type 0x%x returns 0x%lx\n", captype, val); GlobalFree(cap.hContainer); } } @@ -506,7 +506,7 @@ static void test_supported_sizes(TW_IDENTITY *appid, TW_IDENTITY *source, TW_INT return; ok(get_onevalue(cap.hContainer, (TW_UINT32 *) &actual_support, NULL), "Returned cap.hContainer invalid for QuerySupport on ICAP_SUPPORTEDSIZES\n"); ok((actual_support & minimum_support) == minimum_support, - "Error: minimum support 0x%x for ICAP_SUPPORTEDSIZES, got 0x%x\n", minimum_support, actual_support); + "Error: minimum support 0x%lx for ICAP_SUPPORTEDSIZES, got 0x%lx\n", minimum_support, actual_support);
if (actual_support & TWQC_GETCURRENT) { @@ -522,7 +522,7 @@ static void test_supported_sizes(TW_IDENTITY *appid, TW_IDENTITY *source, TW_INT { get_onevalue(cap.hContainer, &val, &type); ok(type == TWTY_UINT16, "GETCURRENT for ICAP_SUPPORTEDSIZES is not type UINT16, is type %d\n", type); - trace("Current size is %d\n", val); + trace("Current size is %ld\n", val); GlobalFree(cap.hContainer); orig_value = val; } @@ -542,7 +542,7 @@ static void test_supported_sizes(TW_IDENTITY *appid, TW_IDENTITY *source, TW_INT { get_onevalue(cap.hContainer, &val, &type); ok(type == TWTY_UINT16, "GETDEFAULT for PHYSICALXXX is not type TWTY_UINT16, is type %d\n", type); - trace("Default size is %d\n", val); + trace("Default size is %ld\n", val); GlobalFree(cap.hContainer); default_value = val; } @@ -603,7 +603,7 @@ static void test_imagelayout(TW_IDENTITY *appid, TW_IDENTITY *source) "Error [rc %d|cc %d] doing MSG_GET for DG_IMAGE/DAT_IMAGELAYOUT\n", rc, status.ConditionCode); if (rc != TWRC_SUCCESS) return; - trace("ImageLayout [Left %x.%x|Top %x.%x|Right %x.%x|Bottom %x.%x|Document %d|Page %d|Frame %d]\n", + trace("ImageLayout [Left %x.%x|Top %x.%x|Right %x.%x|Bottom %x.%x|Document %ld|Page %ld|Frame %ld]\n", layout.Frame.Left.Whole, layout.Frame.Left.Frac, layout.Frame.Top.Whole, layout.Frame.Top.Frac, layout.Frame.Right.Whole, layout.Frame.Right.Frac, @@ -628,7 +628,7 @@ static void test_imagelayout(TW_IDENTITY *appid, TW_IDENTITY *source) "Error [rc %d|cc %d] doing MSG_GET for DG_IMAGE/DAT_IMAGELAYOUT\n", rc, status.ConditionCode); if (rc != TWRC_SUCCESS) return; - trace("ImageLayout after set [Left %x.%x|Top %x.%x|Right %x.%x|Bottom %x.%x|Document %d|Page %d|Frame %d]\n", + trace("ImageLayout after set [Left %x.%x|Top %x.%x|Right %x.%x|Bottom %x.%x|Document %ld|Page %ld|Frame %ld]\n", layout.Frame.Left.Whole, layout.Frame.Left.Frac, layout.Frame.Top.Whole, layout.Frame.Top.Frac, layout.Frame.Right.Whole, layout.Frame.Right.Frac, @@ -664,7 +664,7 @@ static void test_single_source(TW_IDENTITY *appid, TW_IDENTITY *source) { int i; UINT16 *u = (UINT16 *) a->ItemList; - trace("%d Capabilities:\n", a->NumItems); + trace("%ld Capabilities:\n", a->NumItems); for (i = 0; i < a->NumItems; i++) if (u[i] < ARRAY_SIZE(capabilities)) { @@ -776,7 +776,7 @@ static void test_sources(TW_IDENTITY *appid) while (rc == TWRC_SUCCESS) { scannercount++; - trace("[Scanner %d|Version %d.%d(%s)|Protocol %d.%d|SupportedGroups 0x%x|Manufacturer %s|Family %s|ProductName %s]\n", + trace("[Scanner %d|Version %d.%d(%s)|Protocol %d.%d|SupportedGroups 0x%lx|Manufacturer %s|Family %s|ProductName %s]\n", scannercount, source.Version.MajorNum, source.Version.MinorNum, source.Version.Info, source.ProtocolMajor, source.ProtocolMinor, source.SupportedGroups,
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/uianimation/tests/Makefile.in | 1 - dlls/uianimation/tests/uianimation.c | 26 +++++++++++++------------- 2 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/dlls/uianimation/tests/Makefile.in b/dlls/uianimation/tests/Makefile.in index 340034a0ddb..ec1118c2fcd 100644 --- a/dlls/uianimation/tests/Makefile.in +++ b/dlls/uianimation/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = uianimation.dll IMPORTS = ole32
diff --git a/dlls/uianimation/tests/uianimation.c b/dlls/uianimation/tests/uianimation.c index e8d113a6257..8aedd2e4bcf 100644 --- a/dlls/uianimation/tests/uianimation.c +++ b/dlls/uianimation/tests/uianimation.c @@ -41,12 +41,12 @@ static void test_UIAnimationManager(void) }
hr = IUIAnimationManager_CreateAnimationVariable(manager, 1.0f, &variable); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if (hr == S_OK) IUIAnimationVariable_Release(variable);
hr = IUIAnimationManager_CreateStoryboard(manager, &storyboard); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if (hr == S_OK) IUIAnimationStoryboard_Release(storyboard);
@@ -66,25 +66,25 @@ static void test_IUIAnimationTimer(void) }
hr = IUIAnimationTimer_IsEnabled(timer); - todo_wine ok(hr == S_FALSE, "got 0x%08x\n", hr); + todo_wine ok(hr == S_FALSE, "got 0x%08lx\n", hr);
hr = IUIAnimationTimer_Enable(timer); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IUIAnimationTimer_Enable(timer); - todo_wine ok(hr == S_FALSE, "got 0x%08x\n", hr); + todo_wine ok(hr == S_FALSE, "got 0x%08lx\n", hr);
hr = IUIAnimationTimer_IsEnabled(timer); - todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IUIAnimationTimer_Disable(timer); - todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IUIAnimationTimer_Disable(timer); - todo_wine ok(hr == S_FALSE, "got 0x%08x\n", hr); + todo_wine ok(hr == S_FALSE, "got 0x%08lx\n", hr);
hr = IUIAnimationTimer_IsEnabled(timer); - todo_wine ok(hr == S_FALSE, "got 0x%08x\n", hr); + todo_wine ok(hr == S_FALSE, "got 0x%08lx\n", hr);
IUIAnimationTimer_Release(timer); } @@ -104,7 +104,7 @@ static void test_IUIAnimationTransitionFactory(void) }
hr = IUIAnimationTransitionFactory_CreateTransition(factory, NULL, &transition); - todo_wine ok(hr == E_POINTER, "got 0x%08x\n", hr); + todo_wine ok(hr == E_POINTER, "got 0x%08lx\n", hr);
IUIAnimationTransitionFactory_Release(factory); } @@ -124,17 +124,17 @@ static void test_IUIAnimationTransitionLibrary(void) }
hr = IUIAnimationTransitionLibrary_CreateInstantaneousTransition(library, 100.0, &instantaneous); - todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "got 0x%08lx\n", hr); if (hr == S_OK) IUIAnimationTransition_Release(instantaneous);
hr = IUIAnimationTransitionLibrary_CreateLinearTransition(library, 500.0, 100.0, &linear); - todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "got 0x%08lx\n", hr); if (hr == S_OK) IUIAnimationTransition_Release(linear);
hr = IUIAnimationTransitionLibrary_CreateSmoothStopTransition(library, 500.0, 100.0, &smooth); - todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "got 0x%08lx\n", hr); if (hr == S_OK) IUIAnimationTransition_Release(smooth);
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/uiautomationcore/tests/Makefile.in | 1 dlls/uiautomationcore/tests/uiautomation.c | 80 ++++++++++++++-------------- 2 files changed, 40 insertions(+), 41 deletions(-)
diff --git a/dlls/uiautomationcore/tests/Makefile.in b/dlls/uiautomationcore/tests/Makefile.in index a81a8ec9eae..fbd53507fbe 100644 --- a/dlls/uiautomationcore/tests/Makefile.in +++ b/dlls/uiautomationcore/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = uiautomationcore.dll IMPORTS = uiautomationcore user32 ole32 oleaut32
diff --git a/dlls/uiautomationcore/tests/uiautomation.c b/dlls/uiautomationcore/tests/uiautomation.c index e5fa12535be..501875a20e7 100644 --- a/dlls/uiautomationcore/tests/uiautomation.c +++ b/dlls/uiautomationcore/tests/uiautomation.c @@ -61,33 +61,33 @@ static void test_UiaHostProviderFromHwnd(void)
p = (void *)0xdeadbeef; hr = UiaHostProviderFromHwnd(NULL, &p); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); ok(p == NULL, "Unexpected instance.\n");
hr = UiaHostProviderFromHwnd(hwnd, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
p = NULL; hr = UiaHostProviderFromHwnd(hwnd, &p); - ok(hr == S_OK, "Failed to get host provider, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get host provider, hr %#lx.\n", hr);
p2 = NULL; hr = UiaHostProviderFromHwnd(hwnd, &p2); - ok(hr == S_OK, "Failed to get host provider, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get host provider, hr %#lx.\n", hr); ok(p != p2, "Unexpected instance.\n"); IRawElementProviderSimple_Release(p2);
hr = IRawElementProviderSimple_get_HostRawElementProvider(p, &p2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(p2 == NULL, "Unexpected instance.\n");
hr = IRawElementProviderSimple_GetPropertyValue(p, UIA_NativeWindowHandlePropertyId, &v); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v)); - ok(V_I4(&v) == HandleToUlong(hwnd), "V_I4(&v) = %#x, expected %#x\n", V_I4(&v), HandleToUlong(hwnd)); + ok(V_I4(&v) == HandleToUlong(hwnd), "V_I4(&v) = %#lx, expected %#lx\n", V_I4(&v), HandleToUlong(hwnd));
hr = IRawElementProviderSimple_GetPropertyValue(p, UIA_ProviderDescriptionPropertyId, &v); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(V_VT(&v) == VT_BSTR, "V_VT(&v) = %d\n", V_VT(&v)); VariantClear(&v);
@@ -98,12 +98,12 @@ static void test_UiaHostProviderFromHwnd(void)
unk = (void *)0xdeadbeef; hr = IRawElementProviderSimple_GetPatternProvider(p, i, &unk); - ok(hr == S_OK, "Unexpected hr %#x, %d.\n", hr, i); + ok(hr == S_OK, "Unexpected hr %#lx, %d.\n", hr, i); ok(!unk, "Pattern %d returned %p\n", i, unk); }
hr = IRawElementProviderSimple_get_ProviderOptions(p, &prov_opt); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok((prov_opt == ProviderOptions_ServerSideProvider) || broken(prov_opt == ProviderOptions_ClientSideProvider), /* Windows < 10 1507 */ "Unexpected provider options %#x\n", prov_opt); @@ -112,17 +112,17 @@ static void test_UiaHostProviderFromHwnd(void) DestroyWindow(hwnd);
hr = IRawElementProviderSimple_GetPropertyValue(p, UIA_NativeWindowHandlePropertyId, &v); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v)); - ok(V_I4(&v) == HandleToUlong(hwnd), "V_I4(&v) = %#x, expected %#x\n", V_I4(&v), HandleToUlong(hwnd)); + ok(V_I4(&v) == HandleToUlong(hwnd), "V_I4(&v) = %#lx, expected %#lx\n", V_I4(&v), HandleToUlong(hwnd));
hr = IRawElementProviderSimple_GetPropertyValue(p, UIA_ProviderDescriptionPropertyId, &v); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(V_VT(&v) == VT_BSTR, "V_VT(&v) = %d\n", V_VT(&v)); VariantClear(&v);
hr = IRawElementProviderSimple_get_ProviderOptions(p, &prov_opt); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok((prov_opt == ProviderOptions_ServerSideProvider) || broken(prov_opt == ProviderOptions_ClientSideProvider), /* Windows < 10 1507 */ "Unexpected provider options %#x\n", prov_opt); @@ -141,16 +141,16 @@ static DWORD WINAPI uia_reserved_val_iface_marshal_thread(LPVOID param) CoInitializeEx(NULL, COINIT_MULTITHREADED);
hr = CoGetInterfaceAndReleaseStream(stream[0], &IID_IUnknown, (void **)&unk_ns); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = CoGetInterfaceAndReleaseStream(stream[1], &IID_IUnknown, (void **)&unk_ma); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = UiaGetReservedNotSupportedValue(&unk_ns2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = UiaGetReservedMixedAttributeValue(&unk_ma2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(unk_ns2 == unk_ns, "UiaGetReservedNotSupported pointer mismatch, unk_ns2 %p, unk_ns %p\n", unk_ns2, unk_ns); ok(unk_ma2 == unk_ma, "UiaGetReservedMixedAttribute pointer mismatch, unk_ma2 %p, unk_ma %p\n", unk_ma2, unk_ma); @@ -171,83 +171,83 @@ static void test_uia_reserved_value_ifaces(void)
/* ReservedNotSupportedValue. */ hr = UiaGetReservedNotSupportedValue(NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = UiaGetReservedNotSupportedValue(&unk_ns); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(unk_ns != NULL, "UiaGetReservedNotSupportedValue returned NULL interface.\n");
refcnt = IUnknown_AddRef(unk_ns); - ok(refcnt == 1, "Expected refcnt %d, got %d\n", 1, refcnt); + ok(refcnt == 1, "Expected refcnt %d, got %ld\n", 1, refcnt);
refcnt = IUnknown_AddRef(unk_ns); - ok(refcnt == 1, "Expected refcnt %d, got %d\n", 1, refcnt); + ok(refcnt == 1, "Expected refcnt %d, got %ld\n", 1, refcnt);
refcnt = IUnknown_Release(unk_ns); - ok(refcnt == 1, "Expected refcnt %d, got %d\n", 1, refcnt); + ok(refcnt == 1, "Expected refcnt %d, got %ld\n", 1, refcnt);
hr = UiaGetReservedNotSupportedValue(&unk_ns2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(unk_ns2 != NULL, "UiaGetReservedNotSupportedValue returned NULL interface."); ok(unk_ns2 == unk_ns, "UiaGetReservedNotSupported pointer mismatch, unk_ns2 %p, unk_ns %p\n", unk_ns2, unk_ns);
marshal = NULL; hr = IUnknown_QueryInterface(unk_ns, &IID_IMarshal, (void **)&marshal); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(marshal != NULL, "Failed to get IMarshal interface.\n");
refcnt = IMarshal_AddRef(marshal); - ok(refcnt == 2, "Expected refcnt %d, got %d\n", 2, refcnt); + ok(refcnt == 2, "Expected refcnt %d, got %ld\n", 2, refcnt);
refcnt = IMarshal_Release(marshal); - ok(refcnt == 1, "Expected refcnt %d, got %d\n", 1, refcnt); + ok(refcnt == 1, "Expected refcnt %d, got %ld\n", 1, refcnt);
refcnt = IMarshal_Release(marshal); - ok(refcnt == 0, "Expected refcnt %d, got %d\n", 0, refcnt); + ok(refcnt == 0, "Expected refcnt %d, got %ld\n", 0, refcnt);
/* ReservedMixedAttributeValue. */ hr = UiaGetReservedMixedAttributeValue(NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = UiaGetReservedMixedAttributeValue(&unk_ma); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(unk_ma != NULL, "UiaGetReservedMixedAttributeValue returned NULL interface.");
refcnt = IUnknown_AddRef(unk_ma); - ok(refcnt == 1, "Expected refcnt %d, got %d\n", 1, refcnt); + ok(refcnt == 1, "Expected refcnt %d, got %ld\n", 1, refcnt);
refcnt = IUnknown_AddRef(unk_ma); - ok(refcnt == 1, "Expected refcnt %d, got %d\n", 1, refcnt); + ok(refcnt == 1, "Expected refcnt %d, got %ld\n", 1, refcnt);
refcnt = IUnknown_Release(unk_ma); - ok(refcnt == 1, "Expected refcnt %d, got %d\n", 1, refcnt); + ok(refcnt == 1, "Expected refcnt %d, got %ld\n", 1, refcnt);
hr = UiaGetReservedMixedAttributeValue(&unk_ma2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(unk_ma2 != NULL, "UiaGetReservedMixedAttributeValue returned NULL interface."); ok(unk_ma2 == unk_ma, "UiaGetReservedMixedAttribute pointer mismatch, unk_ma2 %p, unk_ma %p\n", unk_ma2, unk_ma);
marshal = NULL; hr = IUnknown_QueryInterface(unk_ma, &IID_IMarshal, (void **)&marshal); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(marshal != NULL, "Failed to get IMarshal interface.\n");
refcnt = IMarshal_AddRef(marshal); - ok(refcnt == 2, "Expected refcnt %d, got %d\n", 2, refcnt); + ok(refcnt == 2, "Expected refcnt %d, got %ld\n", 2, refcnt);
refcnt = IMarshal_Release(marshal); - ok(refcnt == 1, "Expected refcnt %d, got %d\n", 1, refcnt); + ok(refcnt == 1, "Expected refcnt %d, got %ld\n", 1, refcnt);
refcnt = IMarshal_Release(marshal); - ok(refcnt == 0, "Expected refcnt %d, got %d\n", 0, refcnt); + ok(refcnt == 0, "Expected refcnt %d, got %ld\n", 0, refcnt);
/* Test cross-thread marshaling behavior. */ CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
hr = CoMarshalInterThreadInterfaceInStream(&IID_IUnknown, unk_ns, &stream[0]); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = CoMarshalInterThreadInterfaceInStream(&IID_IUnknown, unk_ma, &stream[1]); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
thread = CreateThread(NULL, 0, uia_reserved_val_iface_marshal_thread, (void *)stream, 0, NULL); while (MsgWaitForMultipleObjects(1, &thread, FALSE, INFINITE, QS_ALLINPUT) != WAIT_OBJECT_0)