Wine-devel
Threads by month
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
March 2022
- 80 participants
- 950 discussions
[tools] testbot/web: Better initialize and check the Hours activity page parameter.
by Francois Gouget 22 Mar '22
by Francois Gouget 22 Mar '22
22 Mar '22
Set the FormPage property descriptors list. This allows
FormPage::Validate() to do most of the validation work.
Treat "00" the same as "0".
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
testbot/web/Activity.pl | 28 ++++++++++++++++++----------
1 file changed, 18 insertions(+), 10 deletions(-)
diff --git a/testbot/web/Activity.pl b/testbot/web/Activity.pl
index 9444779433..272215f958 100644
--- a/testbot/web/Activity.pl
+++ b/testbot/web/Activity.pl
@@ -27,28 +27,35 @@ our @ISA = qw(ObjectModel::CGI::FreeFormPage);
use POSIX qw(strftime);
use URI::Escape;
+use ObjectModel::BasicPropertyDescriptor;
use WineTestBot::Config;
use WineTestBot::Activity;
use WineTestBot::Log; # For Elapsed()
use WineTestBot::Utils;
use WineTestBot::VMs;
-
my $HOURS_DEFAULT = 12;
+
sub _initialize($$$)
{
my ($self, $Request, $RequiredRole) = @_;
$self->{start} = Time();
- $self->{hours} = $self->GetParam("Hours");
- if (!defined $self->{hours} or $self->{hours} !~ /^\d{1,3}$/)
- {
- $self->{hours} = $HOURS_DEFAULT;
- }
-
+ my @PropertyDescriptors = (
+ CreateBasicPropertyDescriptor("Hours", "Hours", !1, 1, "N", 3),
+ );
$self->SUPER::_initialize($Request, $RequiredRole);
$self->{Method} = "get";
+
+ if (!$self->GetParam("Hours") or !$self->Validate() or
+ !int($self->GetParam("Hours"))) # 00 case!
+ {
+ # This page always needs a valid value to calculate the cutoff. So just
+ # replace invalid values with the default (no error message is shown
+ # either).
+ $self->SetParam("Hours", $HOURS_DEFAULT);
+ }
}
sub GetPageTitle($$)
@@ -61,7 +68,8 @@ sub GetPageTitle($$)
sub GeneratePage($)
{
my ($self) = @_;
- if ($self->{hours} and $self->{hours} <= $HOURS_DEFAULT)
+
+ if ($self->GetParam("Hours") <= $HOURS_DEFAULT)
{
$self->{Request}->headers_out->add("Refresh", "60");
}
@@ -101,7 +109,7 @@ sub GenerateBody($)
# Generate a custom form to let the user specify the Hours field.
$self->GenerateFormStart();
- print "<div class='ItemProperty'><label>Analyze the activity of the past <div class='ItemValue'><input type='text' name='Hours' maxlength='3' size='3' value='$self->{hours}'/></div> hours.</label></div>\n";
+ print "<div class='ItemProperty'><label>Analyze the activity of the past <div class='ItemValue'><input type='text' name='Hours' maxlength='3' size='3' value='", $self->GetParam("Hours"), "'/></div> hours.</label></div>\n";
$self->GenerateFormEnd();
print "<h1>${ProjectName} Test Bot activity</h1>\n";
@@ -148,7 +156,7 @@ EOF
### Generate the HTML table with the newest record first
print "<tbody>\n";
- my ($Activity, $_Counters) = GetActivity($VMs, $self->{hours} * 3600);
+ my ($Activity, $_Counters) = GetActivity($VMs, $self->GetParam("Hours") * 3600);
for (my $Index = @$Activity; $Index--; )
{
my $Group = $Activity->[$Index];
--
2.30.2
1
0
[tools] testbot/web: Better document the default Hours log page value.
by Francois Gouget 22 Mar '22
by Francois Gouget 22 Mar '22
22 Mar '22
Store it in a variable at the start of the file so it's easy to spot.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
testbot/web/admin/Log.pl | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/testbot/web/admin/Log.pl b/testbot/web/admin/Log.pl
index ddc655f6d6..8d3a8ce8b7 100644
--- a/testbot/web/admin/Log.pl
+++ b/testbot/web/admin/Log.pl
@@ -28,6 +28,8 @@ use ObjectModel::BasicPropertyDescriptor;
use WineTestBot::Config;
use WineTestBot::Log;
+my $HOURS_DEFAULT = 1;
+
sub _initialize($$$)
{
@@ -41,7 +43,7 @@ sub _initialize($$$)
if (!$self->GetParam("Hours") or !$self->Validate() or
!int($self->GetParam("Hours"))) # 00 case!
{
- $self->SetParam("Hours", 1) if (!defined $self->{ErrMessage});
+ $self->SetParam("Hours", $HOURS_DEFAULT) if (!defined $self->{ErrMessage});
$self->SetParam("Action", undef);
}
}
--
2.30.2
1
0
[tools] testbot/cgi: Better select which FormPage fields can be shown / edited.
by Francois Gouget 22 Mar '22
by Francois Gouget 22 Mar '22
22 Mar '22
Also better document why each type of field can or cannot be edited /
shown.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
testbot/lib/ObjectModel/CGI/FormPage.pm | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/testbot/lib/ObjectModel/CGI/FormPage.pm b/testbot/lib/ObjectModel/CGI/FormPage.pm
index 3ac62239d5..e432fcbbd2 100644
--- a/testbot/lib/ObjectModel/CGI/FormPage.pm
+++ b/testbot/lib/ObjectModel/CGI/FormPage.pm
@@ -208,6 +208,8 @@ sub GetInputType($$)
{
my ($self, $PropertyDescriptor) = @_;
+ # Note: Editing Detailrefs and Itemrefs is not supported which leaves only
+ # Basic and Enum property descriptors here.
return $PropertyDescriptor->GetClass() eq "Enum" ? "select" :
$PropertyDescriptor->GetType() eq "B" ? "checkbox" :
$PropertyDescriptor->GetType() eq "textarea" ? "textarea" :
@@ -331,12 +333,20 @@ sub DisplayProperty($$)
{
my ($self, $PropertyDescriptor) = @_;
- if ($PropertyDescriptor->GetClass() eq "Detailref")
- {
- return "";
- }
-
- return "rw";
+ return # Detailref fields point to a Collection of objects matching the
+ # primary key of this form data. As such they can neither be shown
+ # nor edited.
+ $PropertyDescriptor->GetClass() eq "Detailref" ? "" :
+ # Itemref fields are keys identifying other objects and thus would
+ # require careful validation if edited. Requiring users to manually
+ # type the appropriate key value would also be cumbersome so this is
+ # currently not supported. But they can be displayed.
+ $PropertyDescriptor->GetClass() eq "Itemref" ? "ro" :
+ # All other properties can be edited...
+ $PropertyDescriptor->GetClass() ne "Basic" ? "rw" :
+ $PropertyDescriptor->GetType() ne "S" ? "rw" :
+ # ...except autoincrement ones (shown as <unset> if undefined)
+ "ro";
}
sub GetActions($)
--
2.30.2
1
0
22 Mar '22
They don't have a value yet and cannot be edited.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
testbot/lib/ObjectModel/CGI/ItemPage.pm | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/testbot/lib/ObjectModel/CGI/ItemPage.pm b/testbot/lib/ObjectModel/CGI/ItemPage.pm
index 940115475f..a178aa6e09 100644
--- a/testbot/lib/ObjectModel/CGI/ItemPage.pm
+++ b/testbot/lib/ObjectModel/CGI/ItemPage.pm
@@ -99,13 +99,16 @@ sub DisplayProperty($$)
my ($self, $PropertyDescriptor) = @_;
my $Display = $self->SUPER::DisplayProperty($PropertyDescriptor);
- if ($Display eq "rw" && ! $self->{Item}->GetIsNew() &&
- $PropertyDescriptor->GetIsKey())
- {
- $Display = "";
- }
-
- return $Display;
+ return # Don't show autoincrement fields of new items: they don't have a
+ # value yet and cannot be edited anyway so there is no point.
+ ($PropertyDescriptor->GetClass() eq "Basic" and
+ $PropertyDescriptor->GetType() eq "S" and
+ $self->{Item}->GetIsNew()) ? "" :
+ # Don't allow editing key attributes of existing items. Furthermore
+ # the item is identified in the page title so hide them altogether.
+ ($PropertyDescriptor->GetIsKey() and !$self->{Item}->GetIsNew() and
+ $Display eq "rw") ? "" :
+ $Display;
}
sub GetActions($)
--
2.30.2
1
0
22 Mar '22
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
winetest/patterns.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/winetest/patterns.js b/winetest/patterns.js
index be583a5f0c..042620b8f4 100644
--- a/winetest/patterns.js
+++ b/winetest/patterns.js
@@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
- *Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
"use strict";
--
2.30.2
1
0
22 Mar '22
The tests show that if we don't have a global IPv6 address, getaddrinfo()
will not return IPv6 results. Specifing AF_UNSPEC makes it return IPv4 results.
Signed-off-by: Ziqing Hui <zhui(a)codeweavers.com>
---
v3: Use www.kernel.org instead of microsoft site.
dlls/ws2_32/tests/protocol.c | 65 ++++++++++++++++++++++++++++++++++++
1 file changed, 65 insertions(+)
diff --git a/dlls/ws2_32/tests/protocol.c b/dlls/ws2_32/tests/protocol.c
index 5f728a9c4a4..9a6c8610718 100644
--- a/dlls/ws2_32/tests/protocol.c
+++ b/dlls/ws2_32/tests/protocol.c
@@ -2122,6 +2122,17 @@ static void compare_addrinfo(ADDRINFO *a, ADDRINFO *b)
ok(!a && !b, "Expected both addresses null (%p != %p)\n", a, b);
}
+static BOOL ipv6_found(ADDRINFOA *addr)
+{
+ ADDRINFOA *p;
+ for (p = addr; p; p = p->ai_next)
+ {
+ if (p->ai_family == AF_INET6)
+ return TRUE;
+ }
+ return FALSE;
+}
+
static void test_getaddrinfo(void)
{
int i, ret;
@@ -2129,6 +2140,7 @@ static void test_getaddrinfo(void)
SOCKADDR_IN *sockaddr;
CHAR name[256], *ip;
DWORD size = sizeof(name);
+ BOOL has_ipv6_addr;
memset(&hint, 0, sizeof(ADDRINFOA));
GetComputerNameExA( ComputerNamePhysicalDnsHostname, name, &size );
@@ -2396,6 +2408,59 @@ static void test_getaddrinfo(void)
ok(sockaddr->sin_family == AF_INET, "ai_addr->sin_family == %d\n", sockaddr->sin_family);
ok(sockaddr->sin_port == 0, "ai_addr->sin_port == %d\n", sockaddr->sin_port);
freeaddrinfo(result);
+
+ /* Check whether we have global IPv6 address */
+ result = NULL;
+ ret = getaddrinfo("", NULL, NULL, &result);
+ ok(!ret, "getaddrinfo failed with %d\n", WSAGetLastError());
+ has_ipv6_addr = FALSE;
+ for (p = result; p; p = p->ai_next)
+ {
+ if (p->ai_family == AF_INET6)
+ {
+ IN6_ADDR *a = &((SOCKADDR_IN6 *)p->ai_addr)->sin6_addr;
+ if (!IN6_IS_ADDR_LINKLOCAL(a) && !IN6_IS_ADDR_LOOPBACK(a) && !IN6_IS_ADDR_UNSPECIFIED(a))
+ {
+ has_ipv6_addr = TRUE;
+ break;
+ }
+ }
+ }
+ freeaddrinfo(result);
+
+ result = NULL;
+ ret = getaddrinfo("www.kernel.org", NULL, NULL, &result);
+ ok(!ret, "getaddrinfo failed with %d\n", WSAGetLastError());
+ if (!has_ipv6_addr)
+ todo_wine ok(!ipv6_found(result), "IPv6 address is returned.\n");
+ freeaddrinfo(result);
+
+ for (i = 0; i < ARRAY_SIZE(hinttests); i++)
+ {
+ if (hinttests[i].family != AF_UNSPEC || hinttests[i].error) continue;
+ winetest_push_context("Test %u", i);
+
+ hint.ai_flags = 0;
+ hint.ai_family = hinttests[i].family;
+ hint.ai_socktype = hinttests[i].socktype;
+ hint.ai_protocol = hinttests[i].protocol;
+
+ result = NULL;
+ ret = getaddrinfo("www.kernel.org", NULL, &hint, &result);
+ ok(!ret, "Got unexpected ret %d\n", ret);
+ if (!has_ipv6_addr)
+ todo_wine ok(!ipv6_found(result), "IPv6 address is returned.\n");
+ freeaddrinfo(result);
+
+ hint.ai_family = AF_INET6;
+ result = NULL;
+ ret = getaddrinfo("www.kernel.org", NULL, &hint, &result);
+ if (!has_ipv6_addr)
+ todo_wine ok(ret == WSANO_DATA, "Got unexpected ret %d\n", ret);
+ freeaddrinfo(result);
+
+ winetest_pop_context();
+ }
}
static void test_dns(void)
--
2.25.1
2
1
22 Mar '22
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/ntdll/tests/reg.c | 739 ++++++++++++++++++++++++------------------------
1 file changed, 370 insertions(+), 369 deletions(-)
diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c
index 7d069666604..c29d6f04818 100644
--- a/dlls/ntdll/tests/reg.c
+++ b/dlls/ntdll/tests/reg.c
@@ -21,6 +21,7 @@
* helper function RTL_GetKeyHandle().--Brad DeMorrow
*
*/
+#undef WINE_NO_LONG_TYPES /* temporary for migration */
#include "ntdll_test.h"
#include "winternl.h"
@@ -337,7 +338,7 @@ static void test_RtlQueryRegistryValues(void)
QueryTable[2].DefaultLength = 0;
status = pRtlQueryRegistryValues(RelativeTo, winetestpath.Buffer, QueryTable, 0, 0);
- ok(status == STATUS_SUCCESS, "RtlQueryRegistryValues return: 0x%08x\n", status);
+ ok(status == STATUS_SUCCESS, "RtlQueryRegistryValues return: 0x%08lx\n", status);
pRtlFreeHeap(GetProcessHeap(), 0, QueryTable);
}
@@ -352,30 +353,30 @@ static void test_NtOpenKey(void)
/* All NULL */
status = pNtOpenKey(NULL, 0, NULL);
- ok(status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got: 0x%08x\n", status);
+ ok(status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got: 0x%08lx\n", status);
/* NULL attributes */
status = pNtOpenKey(&key, 0, NULL);
ok(status == STATUS_ACCESS_VIOLATION /* W2K3/XP/W2K */ || status == STATUS_INVALID_PARAMETER /* NT4 */,
- "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER(NT4), got: 0x%08x\n", status);
+ "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER(NT4), got: 0x%08lx\n", status);
InitializeObjectAttributes(&attr, &winetestpath, 0, 0, 0);
/* NULL key */
status = pNtOpenKey(NULL, am, &attr);
- ok(status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got: 0x%08x\n", status);
+ ok(status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got: 0x%08lx\n", status);
/* Length > sizeof(OBJECT_ATTRIBUTES) */
attr.Length *= 2;
status = pNtOpenKey(&key, am, &attr);
- ok(status == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got: 0x%08x\n", status);
+ ok(status == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got: 0x%08lx\n", status);
/* Zero accessmask */
attr.Length = sizeof(attr);
key = (HANDLE)0xdeadbeef;
status = pNtOpenKey(&key, 0, &attr);
todo_wine
- ok(status == STATUS_ACCESS_DENIED, "Expected STATUS_ACCESS_DENIED, got: 0x%08x\n", status);
+ ok(status == STATUS_ACCESS_DENIED, "Expected STATUS_ACCESS_DENIED, got: 0x%08lx\n", status);
todo_wine
ok(!key, "key = %p\n", key);
if (status == STATUS_SUCCESS) NtClose(key);
@@ -385,7 +386,7 @@ static void test_NtOpenKey(void)
InitializeObjectAttributes(&attr, &str, 0, 0, 0);
key = (HANDLE)0xdeadbeef;
status = pNtOpenKey(&key, KEY_READ, &attr);
- todo_wine ok(status == STATUS_OBJECT_PATH_SYNTAX_BAD, "NtOpenKey Failed: 0x%08x\n", status);
+ todo_wine ok(status == STATUS_OBJECT_PATH_SYNTAX_BAD, "NtOpenKey Failed: 0x%08lx\n", status);
todo_wine
ok(!key, "key = %p\n", key);
pRtlFreeUnicodeString( &str );
@@ -394,68 +395,68 @@ static void test_NtOpenKey(void)
pRtlCreateUnicodeStringFromAsciiz( &str, "\\Registry\\Machine" );
status = pNtOpenKey(&key, KEY_READ, &attr);
ok(status == STATUS_OBJECT_PATH_NOT_FOUND || status == STATUS_SUCCESS /* Win10 1607+ */,
- "NtOpenKey Failed: 0x%08x\n", status);
+ "NtOpenKey Failed: 0x%08lx\n", status);
if (!status) pNtClose( key );
attr.Attributes = OBJ_CASE_INSENSITIVE;
status = pNtOpenKey(&key, KEY_READ, &attr);
- ok(status == STATUS_SUCCESS, "NtOpenKey Failed: 0x%08x\n", status);
+ ok(status == STATUS_SUCCESS, "NtOpenKey Failed: 0x%08lx\n", status);
pNtClose(key);
pRtlFreeUnicodeString( &str );
pRtlCreateUnicodeStringFromAsciiz( &str, "" );
status = pNtOpenKey(&key, KEY_READ, &attr);
todo_wine
- ok( status == STATUS_OBJECT_PATH_SYNTAX_BAD, "NtOpenKey failed: 0x%08x\n", status );
+ ok( status == STATUS_OBJECT_PATH_SYNTAX_BAD, "NtOpenKey failed: 0x%08lx\n", status );
pRtlFreeUnicodeString( &str );
pRtlCreateUnicodeStringFromAsciiz( &str, "\\" );
status = pNtOpenKey(&key, KEY_READ, &attr);
todo_wine
- ok( status == STATUS_OBJECT_TYPE_MISMATCH, "NtOpenKey failed: 0x%08x\n", status );
+ ok( status == STATUS_OBJECT_TYPE_MISMATCH, "NtOpenKey failed: 0x%08lx\n", status );
pRtlFreeUnicodeString( &str );
pRtlCreateUnicodeStringFromAsciiz( &str, "\\Registry" );
status = pNtOpenKey(&key, KEY_READ, &attr);
todo_wine
- ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08lx\n", status );
pNtClose( key );
pRtlFreeUnicodeString( &str );
pRtlCreateUnicodeStringFromAsciiz( &str, "\\Registry\\" );
status = pNtOpenKey(&key, KEY_READ, &attr);
- ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08lx\n", status );
pNtClose( key );
pRtlFreeUnicodeString( &str );
pRtlCreateUnicodeStringFromAsciiz( &str, "\\Foobar" );
status = pNtOpenKey(&key, KEY_READ, &attr);
todo_wine
- ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtOpenKey failed: 0x%08x\n", status );
+ ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtOpenKey failed: 0x%08lx\n", status );
pRtlFreeUnicodeString( &str );
pRtlCreateUnicodeStringFromAsciiz( &str, "\\Foobar\\Machine" );
status = pNtOpenKey(&key, KEY_READ, &attr);
todo_wine
- ok( status == STATUS_OBJECT_PATH_NOT_FOUND, "NtOpenKey failed: 0x%08x\n", status );
+ ok( status == STATUS_OBJECT_PATH_NOT_FOUND, "NtOpenKey failed: 0x%08lx\n", status );
pRtlFreeUnicodeString( &str );
pRtlCreateUnicodeStringFromAsciiz( &str, "\\Machine\\Software\\Classes" );
status = pNtOpenKey(&key, KEY_READ, &attr);
todo_wine
- ok( status == STATUS_OBJECT_PATH_NOT_FOUND, "NtOpenKey failed: 0x%08x\n", status );
+ ok( status == STATUS_OBJECT_PATH_NOT_FOUND, "NtOpenKey failed: 0x%08lx\n", status );
pRtlFreeUnicodeString( &str );
pRtlCreateUnicodeStringFromAsciiz( &str, "Machine\\Software\\Classes" );
status = pNtOpenKey(&key, KEY_READ, &attr);
todo_wine
- ok( status == STATUS_OBJECT_PATH_SYNTAX_BAD, "NtOpenKey failed: 0x%08x\n", status );
+ ok( status == STATUS_OBJECT_PATH_SYNTAX_BAD, "NtOpenKey failed: 0x%08lx\n", status );
pRtlFreeUnicodeString( &str );
pRtlCreateUnicodeStringFromAsciiz( &str, "\\Device\\Null" );
status = pNtOpenKey(&key, KEY_READ, &attr);
todo_wine
- ok( status == STATUS_OBJECT_TYPE_MISMATCH, "NtOpenKey failed: 0x%08x\n", status );
+ ok( status == STATUS_OBJECT_TYPE_MISMATCH, "NtOpenKey failed: 0x%08lx\n", status );
pRtlFreeUnicodeString( &str );
if (!pNtOpenKeyEx)
@@ -466,7 +467,7 @@ static void test_NtOpenKey(void)
InitializeObjectAttributes(&attr, &winetestpath, 0, 0, 0);
status = pNtOpenKeyEx(&key, KEY_WRITE|KEY_READ, &attr, 0);
- ok(status == STATUS_SUCCESS, "NtOpenKeyEx Failed: 0x%08x\n", status);
+ ok(status == STATUS_SUCCESS, "NtOpenKeyEx Failed: 0x%08lx\n", status);
pNtClose(key);
}
@@ -483,61 +484,61 @@ static void test_NtCreateKey(void)
/* All NULL */
status = pNtCreateKey(NULL, 0, NULL, 0, 0, 0, 0);
ok(status == STATUS_ACCESS_VIOLATION || status == STATUS_INVALID_PARAMETER,
- "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER, got: 0x%08x\n", status);
+ "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER, got: 0x%08lx\n", status);
/* Only the key */
status = pNtCreateKey(&key, 0, NULL, 0, 0, 0, 0);
ok(status == STATUS_ACCESS_VIOLATION /* W2K3/XP/W2K */ || status == STATUS_INVALID_PARAMETER /* NT4 */,
- "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER(NT4), got: 0x%08x\n", status);
+ "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER(NT4), got: 0x%08lx\n", status);
/* Only accessmask */
status = pNtCreateKey(NULL, am, NULL, 0, 0, 0, 0);
ok(status == STATUS_ACCESS_VIOLATION || status == STATUS_INVALID_PARAMETER,
- "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER, got: 0x%08x\n", status);
+ "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER, got: 0x%08lx\n", status);
/* Key and accessmask */
status = pNtCreateKey(&key, am, NULL, 0, 0, 0, 0);
ok(status == STATUS_ACCESS_VIOLATION /* W2K3/XP/W2K */ || status == STATUS_INVALID_PARAMETER /* NT4 */,
- "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER(NT4), got: 0x%08x\n", status);
+ "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER(NT4), got: 0x%08lx\n", status);
InitializeObjectAttributes(&attr, &winetestpath, 0, 0, 0);
/* Only attributes */
status = pNtCreateKey(NULL, 0, &attr, 0, 0, 0, 0);
ok(status == STATUS_ACCESS_VIOLATION || status == STATUS_ACCESS_DENIED /* Win7 */,
- "Expected STATUS_ACCESS_VIOLATION or STATUS_ACCESS_DENIED, got: 0x%08x\n", status);
+ "Expected STATUS_ACCESS_VIOLATION or STATUS_ACCESS_DENIED, got: 0x%08lx\n", status);
/* Length > sizeof(OBJECT_ATTRIBUTES) */
attr.Length *= 2;
status = pNtCreateKey(&key, am, &attr, 0, 0, 0, 0);
- ok(status == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got: 0x%08x\n", status);
+ ok(status == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got: 0x%08lx\n", status);
attr.Length = sizeof(attr);
status = pNtCreateKey(&key, am, &attr, 0, 0, 0, 0);
- ok(status == STATUS_SUCCESS, "NtCreateKey Failed: 0x%08x\n", status);
+ ok(status == STATUS_SUCCESS, "NtCreateKey Failed: 0x%08lx\n", status);
attr.RootDirectory = key;
attr.ObjectName = &str;
pRtlCreateUnicodeStringFromAsciiz( &str, "test\\sub\\key" );
status = pNtCreateKey( &subkey, am, &attr, 0, 0, 0, 0 );
- ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtCreateKey failed: 0x%08lx\n", status );
pRtlFreeUnicodeString( &str );
pRtlCreateUnicodeStringFromAsciiz( &str, "test\\subkey" );
status = pNtCreateKey( &subkey, am, &attr, 0, 0, 0, 0 );
- ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtCreateKey failed: 0x%08lx\n", status );
pRtlFreeUnicodeString( &str );
pRtlCreateUnicodeStringFromAsciiz( &str, "test\\subkey\\" );
status = pNtCreateKey( &subkey, am, &attr, 0, 0, 0, 0 );
- ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtCreateKey failed: 0x%08lx\n", status );
pRtlFreeUnicodeString( &str );
pRtlCreateUnicodeStringFromAsciiz( &str, "test_subkey\\" );
status = pNtCreateKey( &subkey, am, &attr, 0, 0, 0, 0 );
ok( status == STATUS_SUCCESS || broken(status == STATUS_OBJECT_NAME_NOT_FOUND), /* nt4 */
- "NtCreateKey failed: 0x%08x\n", status );
+ "NtCreateKey failed: 0x%08lx\n", status );
if (status == STATUS_SUCCESS)
{
pNtDeleteKey( subkey );
@@ -547,7 +548,7 @@ static void test_NtCreateKey(void)
pRtlCreateUnicodeStringFromAsciiz( &str, "test_subkey" );
status = pNtCreateKey( &subkey, am, &attr, 0, 0, 0, 0 );
- ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status );
pRtlFreeUnicodeString( &str );
pNtDeleteKey( subkey );
pNtClose( subkey );
@@ -558,64 +559,64 @@ static void test_NtCreateKey(void)
pRtlCreateUnicodeStringFromAsciiz( &str, "" );
status = pNtCreateKey( &subkey, am, &attr, 0, 0, 0, 0 );
todo_wine
- ok( status == STATUS_OBJECT_PATH_SYNTAX_BAD, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_OBJECT_PATH_SYNTAX_BAD, "NtCreateKey failed: 0x%08lx\n", status );
pRtlFreeUnicodeString( &str );
pRtlCreateUnicodeStringFromAsciiz( &str, "\\" );
status = pNtCreateKey( &subkey, am, &attr, 0, 0, 0, 0 );
todo_wine
- ok( status == STATUS_OBJECT_TYPE_MISMATCH, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_OBJECT_TYPE_MISMATCH, "NtCreateKey failed: 0x%08lx\n", status );
pRtlFreeUnicodeString( &str );
pRtlCreateUnicodeStringFromAsciiz( &str, "\\Registry" );
status = pNtCreateKey( &subkey, am, &attr, 0, 0, 0, 0 );
todo_wine
ok( status == STATUS_SUCCESS || status == STATUS_ACCESS_DENIED,
- "NtCreateKey failed: 0x%08x\n", status );
+ "NtCreateKey failed: 0x%08lx\n", status );
if (!status) pNtClose( subkey );
pRtlFreeUnicodeString( &str );
pRtlCreateUnicodeStringFromAsciiz( &str, "\\Registry\\" );
status = pNtCreateKey( &subkey, am, &attr, 0, 0, 0, 0 );
ok( status == STATUS_SUCCESS || status == STATUS_ACCESS_DENIED,
- "NtCreateKey failed: 0x%08x\n", status );
+ "NtCreateKey failed: 0x%08lx\n", status );
if (!status) pNtClose( subkey );
pRtlFreeUnicodeString( &str );
pRtlCreateUnicodeStringFromAsciiz( &str, "\\Foobar" );
status = pNtCreateKey( &subkey, am, &attr, 0, 0, 0, 0 );
todo_wine
- ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtCreateKey failed: 0x%08lx\n", status );
pRtlFreeUnicodeString( &str );
pRtlCreateUnicodeStringFromAsciiz( &str, "\\Foobar\\Machine" );
status = pNtCreateKey( &subkey, am, &attr, 0, 0, 0, 0 );
todo_wine
- ok( status == STATUS_OBJECT_PATH_NOT_FOUND, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_OBJECT_PATH_NOT_FOUND, "NtCreateKey failed: 0x%08lx\n", status );
pRtlFreeUnicodeString( &str );
pRtlCreateUnicodeStringFromAsciiz( &str, "\\Machine\\Software\\Classes" );
status = pNtCreateKey( &subkey, am, &attr, 0, 0, 0, 0 );
todo_wine
- ok( status == STATUS_OBJECT_PATH_NOT_FOUND, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_OBJECT_PATH_NOT_FOUND, "NtCreateKey failed: 0x%08lx\n", status );
pRtlFreeUnicodeString( &str );
pRtlCreateUnicodeStringFromAsciiz( &str, "Machine\\Software\\Classes" );
status = pNtCreateKey( &subkey, am, &attr, 0, 0, 0, 0 );
todo_wine
- ok( status == STATUS_OBJECT_PATH_SYNTAX_BAD, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_OBJECT_PATH_SYNTAX_BAD, "NtCreateKey failed: 0x%08lx\n", status );
pRtlFreeUnicodeString( &str );
pRtlCreateUnicodeStringFromAsciiz( &str, "\\Device\\Null" );
status = pNtCreateKey( &subkey, am, &attr, 0, 0, 0, 0 );
todo_wine
- ok( status == STATUS_OBJECT_TYPE_MISMATCH, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_OBJECT_TYPE_MISMATCH, "NtCreateKey failed: 0x%08lx\n", status );
pRtlFreeUnicodeString( &str );
pRtlCreateUnicodeStringFromAsciiz( &str, "\\Registry\\Machine\\Software\\Classes" );
status = pNtCreateKey( &subkey, am, &attr, 0, 0, 0, 0 );
ok( status == STATUS_SUCCESS || status == STATUS_ACCESS_DENIED,
- "NtCreateKey failed: 0x%08x\n", status );
+ "NtCreateKey failed: 0x%08lx\n", status );
if (!status) pNtClose( subkey );
pRtlFreeUnicodeString( &str );
@@ -625,21 +626,21 @@ static void test_NtCreateKey(void)
pRtlCreateUnicodeStringFromAsciiz( &str, "\\Registry\\Machine\\Software\\Classes" );
status = pNtCreateKey( &subkey, am, &attr, 0, 0, 0, 0 );
ok(status == STATUS_OBJECT_PATH_NOT_FOUND || status == STATUS_SUCCESS /* Win10 1607+ */,
- "NtCreateKey failed: 0x%08x\n", status );
+ "NtCreateKey failed: 0x%08lx\n", status );
if (!status) pNtClose( subkey );
pRtlFreeUnicodeString( &str );
pRtlCreateUnicodeStringFromAsciiz( &str, "\\REGISTRY\\Machine\\Software\\Classes" );
status = pNtCreateKey( &subkey, am, &attr, 0, 0, 0, 0 );
ok( status == STATUS_SUCCESS,
- "NtCreateKey failed: 0x%08x\n", status );
+ "NtCreateKey failed: 0x%08lx\n", status );
if (!status) pNtClose( subkey );
pRtlFreeUnicodeString( &str );
pRtlCreateUnicodeStringFromAsciiz( &str, "\\REGISTRY\\MACHINE\\SOFTWARE\\CLASSES" );
status = pNtCreateKey( &subkey, am, &attr, 0, 0, 0, 0 );
ok( status == STATUS_SUCCESS,
- "NtCreateKey failed: 0x%08x\n", status );
+ "NtCreateKey failed: 0x%08lx\n", status );
if (!status) pNtClose( subkey );
pRtlFreeUnicodeString( &str );
@@ -657,16 +658,16 @@ static void test_NtSetValueKey(void)
InitializeObjectAttributes(&attr, &winetestpath, 0, 0, 0);
status = pNtOpenKey(&key, am, &attr);
- ok(status == STATUS_SUCCESS, "NtOpenKey Failed: 0x%08x\n", status);
+ ok(status == STATUS_SUCCESS, "NtOpenKey Failed: 0x%08lx\n", status);
pRtlCreateUnicodeStringFromAsciiz(&ValName, "deletetest");
status = pNtSetValueKey(key, &ValName, 0, REG_DWORD, &data, sizeof(data));
- ok(status == STATUS_SUCCESS, "NtSetValueKey Failed: 0x%08x\n", status);
+ ok(status == STATUS_SUCCESS, "NtSetValueKey Failed: 0x%08lx\n", status);
pRtlFreeUnicodeString(&ValName);
pRtlCreateUnicodeStringFromAsciiz(&ValName, "stringtest");
status = pNtSetValueKey(key, &ValName, 0, REG_SZ, (VOID*)stringW, STR_TRUNC_SIZE);
- ok(status == STATUS_SUCCESS, "NtSetValueKey Failed: 0x%08x\n", status);
+ ok(status == STATUS_SUCCESS, "NtSetValueKey Failed: 0x%08lx\n", status);
pRtlFreeUnicodeString(&ValName);
pNtClose(key);
@@ -677,7 +678,7 @@ static void test_RtlOpenCurrentUser(void)
NTSTATUS status;
HANDLE handle;
status=pRtlOpenCurrentUser(KEY_READ, &handle);
- ok(status == STATUS_SUCCESS, "RtlOpenCurrentUser Failed: 0x%08x\n", status);
+ ok(status == STATUS_SUCCESS, "RtlOpenCurrentUser Failed: 0x%08lx\n", status);
pNtClose(handle);
}
@@ -687,22 +688,22 @@ static void test_RtlCheckRegistryKey(void)
NTSTATUS status;
status = pRtlCheckRegistryKey(RTL_REGISTRY_ABSOLUTE, winetestpath.Buffer);
- ok(status == STATUS_SUCCESS, "RtlCheckRegistryKey with RTL_REGISTRY_ABSOLUTE: 0x%08x\n", status);
+ ok(status == STATUS_SUCCESS, "RtlCheckRegistryKey with RTL_REGISTRY_ABSOLUTE: 0x%08lx\n", status);
status = pRtlCheckRegistryKey((RTL_REGISTRY_ABSOLUTE | RTL_REGISTRY_OPTIONAL), winetestpath.Buffer);
- ok(status == STATUS_SUCCESS, "RtlCheckRegistryKey with RTL_REGISTRY_ABSOLUTE and RTL_REGISTRY_OPTIONAL: 0x%08x\n", status);
+ ok(status == STATUS_SUCCESS, "RtlCheckRegistryKey with RTL_REGISTRY_ABSOLUTE and RTL_REGISTRY_OPTIONAL: 0x%08lx\n", status);
status = pRtlCheckRegistryKey(RTL_REGISTRY_ABSOLUTE, NULL);
- ok(status == STATUS_OBJECT_PATH_SYNTAX_BAD, "RtlCheckRegistryKey with RTL_REGISTRY_ABSOLUTE and Path being NULL: 0x%08x\n", status);
+ ok(status == STATUS_OBJECT_PATH_SYNTAX_BAD, "RtlCheckRegistryKey with RTL_REGISTRY_ABSOLUTE and Path being NULL: 0x%08lx\n", status);
status = pRtlCheckRegistryKey(RTL_REGISTRY_ABSOLUTE, empty);
- ok(status == STATUS_OBJECT_PATH_SYNTAX_BAD, "RtlCheckRegistryKey with RTL_REGISTRY_ABSOLUTE and Path being empty: 0x%08x\n", status);
+ ok(status == STATUS_OBJECT_PATH_SYNTAX_BAD, "RtlCheckRegistryKey with RTL_REGISTRY_ABSOLUTE and Path being empty: 0x%08lx\n", status);
status = pRtlCheckRegistryKey(RTL_REGISTRY_USER, NULL);
- ok(status == STATUS_SUCCESS, "RtlCheckRegistryKey with RTL_REGISTRY_USER and Path being NULL: 0x%08x\n", status);
+ ok(status == STATUS_SUCCESS, "RtlCheckRegistryKey with RTL_REGISTRY_USER and Path being NULL: 0x%08lx\n", status);
status = pRtlCheckRegistryKey(RTL_REGISTRY_USER, empty);
- ok(status == STATUS_SUCCESS, "RtlCheckRegistryKey with RTL_REGISTRY_USER and Path being empty: 0x%08x\n", status);
+ ok(status == STATUS_SUCCESS, "RtlCheckRegistryKey with RTL_REGISTRY_USER and Path being empty: 0x%08lx\n", status);
}
static void test_NtFlushKey(void)
@@ -713,13 +714,13 @@ static void test_NtFlushKey(void)
ACCESS_MASK am = KEY_ALL_ACCESS;
status = pNtFlushKey(NULL);
- ok(status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got: 0x%08x\n", status);
+ ok(status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got: 0x%08lx\n", status);
InitializeObjectAttributes(&attr, &winetestpath, 0, 0, 0);
pNtOpenKey(&hkey, am, &attr);
status = pNtFlushKey(hkey);
- ok(status == STATUS_SUCCESS, "NtDeleteKey Failed: 0x%08x\n", status);
+ ok(status == STATUS_SUCCESS, "NtDeleteKey Failed: 0x%08lx\n", status);
pNtClose(hkey);
}
@@ -739,67 +740,67 @@ static void test_NtQueryValueKey(void)
InitializeObjectAttributes(&attr, &winetestpath, 0, 0, 0);
status = pNtOpenKey(&key, KEY_READ|KEY_SET_VALUE, &attr);
- ok(status == STATUS_SUCCESS, "NtOpenKey Failed: 0x%08x\n", status);
+ ok(status == STATUS_SUCCESS, "NtOpenKey Failed: 0x%08lx\n", status);
len = FIELD_OFFSET(KEY_VALUE_BASIC_INFORMATION, Name[0]);
basic_info = HeapAlloc(GetProcessHeap(), 0, sizeof(*basic_info));
status = pNtQueryValueKey(key, &ValName, KeyValueBasicInformation, basic_info, len, &len);
- ok(status == STATUS_BUFFER_OVERFLOW, "NtQueryValueKey should have returned STATUS_BUFFER_OVERFLOW instead of 0x%08x\n", status);
- ok(basic_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %d\n", basic_info->TitleIndex);
- ok(basic_info->Type == REG_DWORD, "NtQueryValueKey returned wrong Type %d\n", basic_info->Type);
- ok(basic_info->NameLength == 20, "NtQueryValueKey returned wrong NameLength %d\n", basic_info->NameLength);
- ok(len == FIELD_OFFSET(KEY_VALUE_BASIC_INFORMATION, Name[basic_info->NameLength/sizeof(WCHAR)]), "NtQueryValueKey returned wrong len %d\n", len);
+ ok(status == STATUS_BUFFER_OVERFLOW, "NtQueryValueKey should have returned STATUS_BUFFER_OVERFLOW instead of 0x%08lx\n", status);
+ ok(basic_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %ld\n", basic_info->TitleIndex);
+ ok(basic_info->Type == REG_DWORD, "NtQueryValueKey returned wrong Type %ld\n", basic_info->Type);
+ ok(basic_info->NameLength == 20, "NtQueryValueKey returned wrong NameLength %ld\n", basic_info->NameLength);
+ ok(len == FIELD_OFFSET(KEY_VALUE_BASIC_INFORMATION, Name[basic_info->NameLength/sizeof(WCHAR)]), "NtQueryValueKey returned wrong len %ld\n", len);
basic_info = HeapReAlloc(GetProcessHeap(), 0, basic_info, len);
status = pNtQueryValueKey(key, &ValName, KeyValueBasicInformation, basic_info, len, &len);
- ok(status == STATUS_SUCCESS, "NtQueryValueKey should have returned STATUS_SUCCESS instead of 0x%08x\n", status);
- ok(basic_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %d\n", basic_info->TitleIndex);
- ok(basic_info->Type == REG_DWORD, "NtQueryValueKey returned wrong Type %d\n", basic_info->Type);
- ok(basic_info->NameLength == 20, "NtQueryValueKey returned wrong NameLength %d\n", basic_info->NameLength);
- ok(len == FIELD_OFFSET(KEY_VALUE_BASIC_INFORMATION, Name[basic_info->NameLength/sizeof(WCHAR)]), "NtQueryValueKey returned wrong len %d\n", len);
+ ok(status == STATUS_SUCCESS, "NtQueryValueKey should have returned STATUS_SUCCESS instead of 0x%08lx\n", status);
+ ok(basic_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %ld\n", basic_info->TitleIndex);
+ ok(basic_info->Type == REG_DWORD, "NtQueryValueKey returned wrong Type %ld\n", basic_info->Type);
+ ok(basic_info->NameLength == 20, "NtQueryValueKey returned wrong NameLength %ld\n", basic_info->NameLength);
+ ok(len == FIELD_OFFSET(KEY_VALUE_BASIC_INFORMATION, Name[basic_info->NameLength/sizeof(WCHAR)]), "NtQueryValueKey returned wrong len %ld\n", len);
ok(!memcmp(basic_info->Name, ValName.Buffer, ValName.Length), "incorrect Name returned\n");
HeapFree(GetProcessHeap(), 0, basic_info);
len = FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data[0]);
partial_info = HeapAlloc(GetProcessHeap(), 0, sizeof(*partial_info));
status = pNtQueryValueKey(key, &ValName, KeyValuePartialInformation, partial_info, len, &len);
- ok(status == STATUS_BUFFER_OVERFLOW, "NtQueryValueKey should have returned STATUS_BUFFER_OVERFLOW instead of 0x%08x\n", status);
- ok(partial_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %d\n", partial_info->TitleIndex);
- ok(partial_info->Type == REG_DWORD, "NtQueryValueKey returned wrong Type %d\n", partial_info->Type);
- ok(partial_info->DataLength == 4, "NtQueryValueKey returned wrong DataLength %d\n", partial_info->DataLength);
- ok(len == FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data[partial_info->DataLength]), "NtQueryValueKey returned wrong len %d\n", len);
+ ok(status == STATUS_BUFFER_OVERFLOW, "NtQueryValueKey should have returned STATUS_BUFFER_OVERFLOW instead of 0x%08lx\n", status);
+ ok(partial_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %ld\n", partial_info->TitleIndex);
+ ok(partial_info->Type == REG_DWORD, "NtQueryValueKey returned wrong Type %ld\n", partial_info->Type);
+ ok(partial_info->DataLength == 4, "NtQueryValueKey returned wrong DataLength %ld\n", partial_info->DataLength);
+ ok(len == FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data[partial_info->DataLength]), "NtQueryValueKey returned wrong len %ld\n", len);
partial_info = HeapReAlloc(GetProcessHeap(), 0, partial_info, len);
status = pNtQueryValueKey(key, &ValName, KeyValuePartialInformation, partial_info, len, &len);
- ok(status == STATUS_SUCCESS, "NtQueryValueKey should have returned STATUS_SUCCESS instead of 0x%08x\n", status);
- ok(partial_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %d\n", partial_info->TitleIndex);
- ok(partial_info->Type == REG_DWORD, "NtQueryValueKey returned wrong Type %d\n", partial_info->Type);
- ok(partial_info->DataLength == 4, "NtQueryValueKey returned wrong DataLength %d\n", partial_info->DataLength);
- ok(len == FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data[partial_info->DataLength]), "NtQueryValueKey returned wrong len %d\n", len);
- ok(*(DWORD *)partial_info->Data == 711, "incorrect Data returned: 0x%x\n", *(DWORD *)partial_info->Data);
+ ok(status == STATUS_SUCCESS, "NtQueryValueKey should have returned STATUS_SUCCESS instead of 0x%08lx\n", status);
+ ok(partial_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %ld\n", partial_info->TitleIndex);
+ ok(partial_info->Type == REG_DWORD, "NtQueryValueKey returned wrong Type %ld\n", partial_info->Type);
+ ok(partial_info->DataLength == 4, "NtQueryValueKey returned wrong DataLength %ld\n", partial_info->DataLength);
+ ok(len == FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data[partial_info->DataLength]), "NtQueryValueKey returned wrong len %ld\n", len);
+ ok(*(DWORD *)partial_info->Data == 711, "incorrect Data returned: 0x%lx\n", *(DWORD *)partial_info->Data);
HeapFree(GetProcessHeap(), 0, partial_info);
len = FIELD_OFFSET(KEY_VALUE_FULL_INFORMATION, Name[0]);
full_info = HeapAlloc(GetProcessHeap(), 0, sizeof(*full_info));
status = pNtQueryValueKey(key, &ValName, KeyValueFullInformation, full_info, len, &len);
- ok(status == STATUS_BUFFER_OVERFLOW, "NtQueryValueKey should have returned STATUS_BUFFER_OVERFLOW instead of 0x%08x\n", status);
- ok(full_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %d\n", full_info->TitleIndex);
- ok(full_info->Type == REG_DWORD, "NtQueryValueKey returned wrong Type %d\n", full_info->Type);
- ok(full_info->DataLength == 4, "NtQueryValueKey returned wrong DataLength %d\n", full_info->DataLength);
- ok(full_info->NameLength == 20, "NtQueryValueKey returned wrong NameLength %d\n", full_info->NameLength);
+ ok(status == STATUS_BUFFER_OVERFLOW, "NtQueryValueKey should have returned STATUS_BUFFER_OVERFLOW instead of 0x%08lx\n", status);
+ ok(full_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %ld\n", full_info->TitleIndex);
+ ok(full_info->Type == REG_DWORD, "NtQueryValueKey returned wrong Type %ld\n", full_info->Type);
+ ok(full_info->DataLength == 4, "NtQueryValueKey returned wrong DataLength %ld\n", full_info->DataLength);
+ ok(full_info->NameLength == 20, "NtQueryValueKey returned wrong NameLength %ld\n", full_info->NameLength);
ok(len == FIELD_OFFSET(KEY_VALUE_FULL_INFORMATION, Name[0]) + full_info->DataLength + full_info->NameLength,
- "NtQueryValueKey returned wrong len %d\n", len);
+ "NtQueryValueKey returned wrong len %ld\n", len);
len = FIELD_OFFSET(KEY_VALUE_FULL_INFORMATION, Name[0]) + full_info->DataLength + full_info->NameLength;
full_info = HeapReAlloc(GetProcessHeap(), 0, full_info, len);
status = pNtQueryValueKey(key, &ValName, KeyValueFullInformation, full_info, len, &len);
- ok(status == STATUS_SUCCESS, "NtQueryValueKey should have returned STATUS_SUCCESS instead of 0x%08x\n", status);
- ok(full_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %d\n", full_info->TitleIndex);
- ok(full_info->Type == REG_DWORD, "NtQueryValueKey returned wrong Type %d\n", full_info->Type);
- ok(full_info->DataLength == 4, "NtQueryValueKey returned wrong DataLength %d\n", full_info->DataLength);
- ok(full_info->NameLength == 20, "NtQueryValueKey returned wrong NameLength %d\n", full_info->NameLength);
+ ok(status == STATUS_SUCCESS, "NtQueryValueKey should have returned STATUS_SUCCESS instead of 0x%08lx\n", status);
+ ok(full_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %ld\n", full_info->TitleIndex);
+ ok(full_info->Type == REG_DWORD, "NtQueryValueKey returned wrong Type %ld\n", full_info->Type);
+ ok(full_info->DataLength == 4, "NtQueryValueKey returned wrong DataLength %ld\n", full_info->DataLength);
+ ok(full_info->NameLength == 20, "NtQueryValueKey returned wrong NameLength %ld\n", full_info->NameLength);
ok(!memcmp(full_info->Name, ValName.Buffer, ValName.Length), "incorrect Name returned\n");
- ok(*(DWORD *)((char *)full_info + full_info->DataOffset) == 711, "incorrect Data returned: 0x%x\n",
+ ok(*(DWORD *)((char *)full_info + full_info->DataOffset) == 711, "incorrect Data returned: 0x%lx\n",
*(DWORD *)((char *)full_info + full_info->DataOffset));
HeapFree(GetProcessHeap(), 0, full_info);
@@ -807,42 +808,42 @@ static void test_NtQueryValueKey(void)
pRtlCreateUnicodeStringFromAsciiz(&ValName, "stringtest");
status = pNtQueryValueKey(key, &ValName, KeyValuePartialInformation, NULL, 0, &len);
- ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryValueKey should have returned STATUS_BUFFER_TOO_SMALL instead of 0x%08x\n", status);
+ ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryValueKey should have returned STATUS_BUFFER_TOO_SMALL instead of 0x%08lx\n", status);
partial_info = HeapAlloc(GetProcessHeap(), 0, len+1);
memset(partial_info, 0xbd, len+1);
status = pNtQueryValueKey(key, &ValName, KeyValuePartialInformation, partial_info, len, &len);
- ok(status == STATUS_SUCCESS, "NtQueryValueKey should have returned STATUS_SUCCESS instead of 0x%08x\n", status);
- ok(partial_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %d\n", partial_info->TitleIndex);
- ok(partial_info->Type == REG_SZ, "NtQueryValueKey returned wrong Type %d\n", partial_info->Type);
- ok(partial_info->DataLength == STR_TRUNC_SIZE, "NtQueryValueKey returned wrong DataLength %d\n", partial_info->DataLength);
+ ok(status == STATUS_SUCCESS, "NtQueryValueKey should have returned STATUS_SUCCESS instead of 0x%08lx\n", status);
+ ok(partial_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %ld\n", partial_info->TitleIndex);
+ ok(partial_info->Type == REG_SZ, "NtQueryValueKey returned wrong Type %ld\n", partial_info->Type);
+ ok(partial_info->DataLength == STR_TRUNC_SIZE, "NtQueryValueKey returned wrong DataLength %ld\n", partial_info->DataLength);
ok(!memcmp(partial_info->Data, stringW, STR_TRUNC_SIZE), "incorrect Data returned\n");
ok(*(partial_info->Data+STR_TRUNC_SIZE) == 0xbd, "string overflowed %02x\n", *(partial_info->Data+STR_TRUNC_SIZE));
expected = len;
status = pNtQueryValueKey(key, &ValName, KeyValuePartialInformation, partial_info, 0, &len);
- ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryValueKey wrong status 0x%08x\n", status);
- ok(len == expected, "NtQueryValueKey wrong len %u\n", len);
+ ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryValueKey wrong status 0x%08lx\n", status);
+ ok(len == expected, "NtQueryValueKey wrong len %lu\n", len);
status = pNtQueryValueKey(key, &ValName, KeyValuePartialInformation, partial_info, 1, &len);
- ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryValueKey wrong status 0x%08x\n", status);
- ok(len == expected, "NtQueryValueKey wrong len %u\n", len);
+ ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryValueKey wrong status 0x%08lx\n", status);
+ ok(len == expected, "NtQueryValueKey wrong len %lu\n", len);
status = pNtQueryValueKey(key, &ValName, KeyValuePartialInformation, partial_info, FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data) - 1, &len);
- ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryValueKey wrong status 0x%08x\n", status);
- ok(len == expected, "NtQueryValueKey wrong len %u\n", len);
+ ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryValueKey wrong status 0x%08lx\n", status);
+ ok(len == expected, "NtQueryValueKey wrong len %lu\n", len);
status = pNtQueryValueKey(key, &ValName, KeyValuePartialInformation, partial_info, FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data), &len);
- ok(status == STATUS_BUFFER_OVERFLOW, "NtQueryValueKey wrong status 0x%08x\n", status);
- ok(len == expected, "NtQueryValueKey wrong len %u\n", len);
+ ok(status == STATUS_BUFFER_OVERFLOW, "NtQueryValueKey wrong status 0x%08lx\n", status);
+ ok(len == expected, "NtQueryValueKey wrong len %lu\n", len);
HeapFree(GetProcessHeap(), 0, partial_info);
pRtlFreeUnicodeString(&ValName);
pRtlCreateUnicodeStringFromAsciiz(&ValName, "custtest");
status = pNtSetValueKey(key, &ValName, 0, 0xff00ff00, NULL, 0);
- ok(status == STATUS_SUCCESS, "NtSetValueKey Failed: 0x%08x\n", status);
+ ok(status == STATUS_SUCCESS, "NtSetValueKey Failed: 0x%08lx\n", status);
status = pNtQueryValueKey(key, &ValName, KeyValuePartialInformation, &pi, sizeof(pi), &len);
- ok(status == STATUS_SUCCESS, "NtQueryValueKey should have returned STATUS_SUCCESS instead of 0x%08x\n", status);
- ok(pi.Type == 0xff00ff00, "Type=%x\n", pi.Type);
- ok(pi.DataLength == 0, "DataLength=%u\n", pi.DataLength);
+ ok(status == STATUS_SUCCESS, "NtQueryValueKey should have returned STATUS_SUCCESS instead of 0x%08lx\n", status);
+ ok(pi.Type == 0xff00ff00, "Type=%lx\n", pi.Type);
+ ok(pi.DataLength == 0, "DataLength=%lu\n", pi.DataLength);
pRtlFreeUnicodeString(&ValName);
pNtClose(key);
@@ -858,53 +859,53 @@ static void test_NtDeleteKey(void)
DWORD size;
status = pNtDeleteKey(NULL);
- ok(status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got: 0x%08x\n", status);
+ ok(status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got: 0x%08lx\n", status);
InitializeObjectAttributes(&attr, &winetestpath, 0, 0, 0);
status = pNtOpenKey(&hkey, KEY_ALL_ACCESS, &attr);
- ok(status == STATUS_SUCCESS, "NtOpenKey Failed: 0x%08x\n", status);
+ ok(status == STATUS_SUCCESS, "NtOpenKey Failed: 0x%08lx\n", status);
status = pNtDeleteKey(hkey);
- ok(status == STATUS_SUCCESS, "NtDeleteKey Failed: 0x%08x\n", status);
+ ok(status == STATUS_SUCCESS, "NtDeleteKey Failed: 0x%08lx\n", status);
status = pNtQueryKey(hkey, KeyNameInformation, buffer, sizeof(buffer), &size);
- ok(status == STATUS_KEY_DELETED, "got %#x\n", status);
+ ok(status == STATUS_KEY_DELETED, "got %#lx\n", status);
status = pNtEnumerateKey(hkey, 0, KeyFullInformation, buffer, sizeof(buffer), &size);
- ok(status == STATUS_KEY_DELETED, "got %#x\n", status);
+ ok(status == STATUS_KEY_DELETED, "got %#lx\n", status);
pRtlInitUnicodeString(&string, L"value");
status = pNtQueryValueKey(hkey, &string, KeyValueBasicInformation, buffer, sizeof(buffer), &size);
- ok(status == STATUS_KEY_DELETED, "got %#x\n", status);
+ ok(status == STATUS_KEY_DELETED, "got %#lx\n", status);
status = pNtEnumerateValueKey(hkey, 0, KeyValuePartialInformation, buffer, sizeof(buffer), &size);
- ok(status == STATUS_KEY_DELETED, "got %#x\n", status);
+ ok(status == STATUS_KEY_DELETED, "got %#lx\n", status);
status = pNtSetValueKey(hkey, &string, 0, REG_SZ, "test", 5);
- ok(status == STATUS_KEY_DELETED, "got %#x\n", status);
+ ok(status == STATUS_KEY_DELETED, "got %#lx\n", status);
status = pNtDeleteValueKey(hkey, &string);
- ok(status == STATUS_KEY_DELETED, "got %#x\n", status);
+ ok(status == STATUS_KEY_DELETED, "got %#lx\n", status);
status = pNtDeleteKey(hkey);
- todo_wine ok(!status, "got %#x\n", status);
+ todo_wine ok(!status, "got %#lx\n", status);
RtlInitUnicodeString(&string, L"subkey");
InitializeObjectAttributes(&attr, &string, OBJ_CASE_INSENSITIVE, hkey, NULL);
status = pNtOpenKey(&hkey2, KEY_READ, &attr);
- ok(status == STATUS_KEY_DELETED, "got %#x\n", status);
+ ok(status == STATUS_KEY_DELETED, "got %#lx\n", status);
status = pNtCreateKey(&hkey2, KEY_ALL_ACCESS, &attr, 0, NULL, 0, NULL);
- ok(status == STATUS_KEY_DELETED, "got %#x\n", status);
+ ok(status == STATUS_KEY_DELETED, "got %#lx\n", status);
status = pNtQueryObject(hkey, ObjectNameInformation, buffer, sizeof(buffer), &size);
- ok(status == STATUS_KEY_DELETED, "got %#x\n", status);
+ ok(status == STATUS_KEY_DELETED, "got %#lx\n", status);
status = pNtQueryObject(hkey, ObjectBasicInformation, buffer, sizeof(OBJECT_BASIC_INFORMATION), &size);
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
status = pNtClose(hkey);
- ok(status == STATUS_SUCCESS, "got %#x\n", status);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
}
static void test_NtQueryLicenseKey(void)
@@ -926,9 +927,9 @@ static void test_NtQueryLicenseKey(void)
len = 0xbeef;
memset(&name, 0, sizeof(name));
status = pNtQueryLicenseValue(&name, &type, buffer, sizeof(buffer), &len);
- ok(status == STATUS_INVALID_PARAMETER, "NtQueryLicenseValue returned %08x, expected STATUS_INVALID_PARAMETER\n", status);
- ok(type == 0xdead, "expected unmodified value for type, got %u\n", type);
- ok(len == 0xbeef, "expected unmodified value for len, got %u\n", len);
+ ok(status == STATUS_INVALID_PARAMETER, "NtQueryLicenseValue returned %08lx, expected STATUS_INVALID_PARAMETER\n", status);
+ ok(type == 0xdead, "expected unmodified value for type, got %lu\n", type);
+ ok(len == 0xbeef, "expected unmodified value for len, got %lu\n", len);
/* test with empty key */
pRtlCreateUnicodeStringFromAsciiz(&name, "");
@@ -936,26 +937,26 @@ static void test_NtQueryLicenseKey(void)
type = 0xdead;
len = 0xbeef;
status = pNtQueryLicenseValue(NULL, &type, buffer, sizeof(buffer), &len);
- ok(status == STATUS_INVALID_PARAMETER, "NtQueryLicenseValue returned %08x, expected STATUS_INVALID_PARAMETER\n", status);
- ok(type == 0xdead, "expected unmodified value for type, got %u\n", type);
- ok(len == 0xbeef, "expected unmodified value for len, got %u\n", len);
+ ok(status == STATUS_INVALID_PARAMETER, "NtQueryLicenseValue returned %08lx, expected STATUS_INVALID_PARAMETER\n", status);
+ ok(type == 0xdead, "expected unmodified value for type, got %lu\n", type);
+ ok(len == 0xbeef, "expected unmodified value for len, got %lu\n", len);
type = 0xdead;
status = pNtQueryLicenseValue(&name, &type, buffer, sizeof(buffer), NULL);
- ok(status == STATUS_INVALID_PARAMETER, "NtQueryLicenseValue returned %08x, expected STATUS_INVALID_PARAMETER\n", status);
- ok(type == 0xdead, "expected unmodified value for type, got %u\n", type);
+ ok(status == STATUS_INVALID_PARAMETER, "NtQueryLicenseValue returned %08lx, expected STATUS_INVALID_PARAMETER\n", status);
+ ok(type == 0xdead, "expected unmodified value for type, got %lu\n", type);
len = 0xbeef;
status = pNtQueryLicenseValue(&name, NULL, buffer, sizeof(buffer), &len);
- ok(status == STATUS_INVALID_PARAMETER, "NtQueryLicenseValue returned %08x, expected STATUS_INVALID_PARAMETER\n", status);
- ok(len == 0xbeef, "expected unmodified value for len, got %u\n", len);
+ ok(status == STATUS_INVALID_PARAMETER, "NtQueryLicenseValue returned %08lx, expected STATUS_INVALID_PARAMETER\n", status);
+ ok(len == 0xbeef, "expected unmodified value for len, got %lu\n", len);
type = 0xdead;
len = 0xbeef;
status = pNtQueryLicenseValue(&name, &type, buffer, sizeof(buffer), &len);
- ok(status == STATUS_INVALID_PARAMETER, "NtQueryLicenseValue returned %08x, expected STATUS_INVALID_PARAMETER\n", status);
- ok(type == 0xdead, "expected unmodified value for type, got %u\n", type);
- ok(len == 0xbeef, "expected unmodified value for len, got %u\n", len);
+ ok(status == STATUS_INVALID_PARAMETER, "NtQueryLicenseValue returned %08lx, expected STATUS_INVALID_PARAMETER\n", status);
+ ok(type == 0xdead, "expected unmodified value for type, got %lu\n", type);
+ ok(len == 0xbeef, "expected unmodified value for len, got %lu\n", len);
pRtlFreeUnicodeString(&name);
@@ -965,26 +966,26 @@ static void test_NtQueryLicenseKey(void)
type = 0xdead;
len = 0xbeef;
status = pNtQueryLicenseValue(NULL, &type, buffer, sizeof(buffer), &len);
- ok(status == STATUS_INVALID_PARAMETER, "NtQueryLicenseValue returned %08x, expected STATUS_INVALID_PARAMETER\n", status);
- ok(type == 0xdead, "expected unmodified value for type, got %u\n", type);
- ok(len == 0xbeef, "expected unmodified value for len, got %u\n", len);
+ ok(status == STATUS_INVALID_PARAMETER, "NtQueryLicenseValue returned %08lx, expected STATUS_INVALID_PARAMETER\n", status);
+ ok(type == 0xdead, "expected unmodified value for type, got %lu\n", type);
+ ok(len == 0xbeef, "expected unmodified value for len, got %lu\n", len);
type = 0xdead;
status = pNtQueryLicenseValue(&name, &type, buffer, sizeof(buffer), NULL);
- ok(status == STATUS_INVALID_PARAMETER, "NtQueryLicenseValue returned %08x, expected STATUS_INVALID_PARAMETER\n", status);
- ok(type == 0xdead, "expected unmodified value for type, got %u\n", type);
+ ok(status == STATUS_INVALID_PARAMETER, "NtQueryLicenseValue returned %08lx, expected STATUS_INVALID_PARAMETER\n", status);
+ ok(type == 0xdead, "expected unmodified value for type, got %lu\n", type);
len = 0xbeef;
status = pNtQueryLicenseValue(&name, NULL, buffer, sizeof(buffer), &len);
- ok(status == STATUS_OBJECT_NAME_NOT_FOUND, "NtQueryLicenseValue returned %08x, expected STATUS_OBJECT_NAME_NOT_FOUND\n", status);
- ok(len == 0xbeef || broken(!len) /* Win10 1607 */, "expected unmodified value for len, got %u\n", len);
+ ok(status == STATUS_OBJECT_NAME_NOT_FOUND, "NtQueryLicenseValue returned %08lx, expected STATUS_OBJECT_NAME_NOT_FOUND\n", status);
+ ok(len == 0xbeef || broken(!len) /* Win10 1607 */, "expected unmodified value for len, got %lu\n", len);
type = 0xdead;
len = 0xbeef;
status = pNtQueryLicenseValue(&name, &type, buffer, sizeof(buffer), &len);
ok(status == STATUS_OBJECT_NAME_NOT_FOUND, "NtQueryLicenseValue unexpected succeeded\n");
- ok(type == 0xdead, "expected unmodified value for type, got %u\n", type);
- ok(len == 0xbeef || broken(!len) /* Win10 1607 */, "expected unmodified value for len, got %u\n", len);
+ ok(type == 0xdead, "expected unmodified value for type, got %lu\n", type);
+ ok(len == 0xbeef || broken(!len) /* Win10 1607 */, "expected unmodified value for len, got %lu\n", len);
pRtlFreeUnicodeString(&name);
@@ -994,43 +995,43 @@ static void test_NtQueryLicenseKey(void)
type = 0xdead;
len = 0xbeef;
status = pNtQueryLicenseValue(NULL, &type, buffer, sizeof(buffer), &len);
- ok(status == STATUS_INVALID_PARAMETER, "NtQueryLicenseValue returned %08x, expected STATUS_INVALID_PARAMETER\n", status);
- ok(type == 0xdead, "expected unmodified value for type, got %u\n", type);
- ok(len == 0xbeef, "expected unmodified value for len, got %u\n", len);
+ ok(status == STATUS_INVALID_PARAMETER, "NtQueryLicenseValue returned %08lx, expected STATUS_INVALID_PARAMETER\n", status);
+ ok(type == 0xdead, "expected unmodified value for type, got %lu\n", type);
+ ok(len == 0xbeef, "expected unmodified value for len, got %lu\n", len);
type = 0xdead;
status = pNtQueryLicenseValue(&name, &type, buffer, sizeof(buffer), NULL);
- ok(status == STATUS_INVALID_PARAMETER, "NtQueryLicenseValue returned %08x, expected STATUS_INVALID_PARAMETER\n", status);
- ok(type == 0xdead, "expected unmodified value for type, got %u\n", type);
+ ok(status == STATUS_INVALID_PARAMETER, "NtQueryLicenseValue returned %08lx, expected STATUS_INVALID_PARAMETER\n", status);
+ ok(type == 0xdead, "expected unmodified value for type, got %lu\n", type);
type = 0xdead;
len = 0;
status = pNtQueryLicenseValue(&name, &type, buffer, 0, &len);
- ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryLicenseValue returned %08x, expected STATUS_BUFFER_TOO_SMALL\n", status);
- ok(type == REG_SZ, "expected type = REG_SZ, got %u\n", type);
- ok(len == sizeof(emptyW), "expected len = %u, got %u\n", (DWORD)sizeof(emptyW), len);
+ ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryLicenseValue returned %08lx, expected STATUS_BUFFER_TOO_SMALL\n", status);
+ ok(type == REG_SZ, "expected type = REG_SZ, got %lu\n", type);
+ ok(len == sizeof(emptyW), "expected len = %lu, got %lu\n", (DWORD)sizeof(emptyW), len);
len = 0;
status = pNtQueryLicenseValue(&name, NULL, buffer, 0, &len);
- ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryLicenseValue returned %08x, expected STATUS_BUFFER_TOO_SMALL\n", status);
- ok(len == sizeof(emptyW), "expected len = %u, got %u\n", (DWORD)sizeof(emptyW), len);
+ ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryLicenseValue returned %08lx, expected STATUS_BUFFER_TOO_SMALL\n", status);
+ ok(len == sizeof(emptyW), "expected len = %lu, got %lu\n", (DWORD)sizeof(emptyW), len);
type = 0xdead;
len = 0;
memset(buffer, 0x11, sizeof(buffer));
status = pNtQueryLicenseValue(&name, &type, buffer, sizeof(buffer), &len);
- ok(status == STATUS_SUCCESS, "NtQueryLicenseValue returned %08x, expected STATUS_SUCCESS\n", status);
- ok(type == REG_SZ, "expected type = REG_SZ, got %u\n", type);
- ok(len == sizeof(emptyW), "expected len = %u, got %u\n", (DWORD)sizeof(emptyW), len);
+ ok(status == STATUS_SUCCESS, "NtQueryLicenseValue returned %08lx, expected STATUS_SUCCESS\n", status);
+ ok(type == REG_SZ, "expected type = REG_SZ, got %lu\n", type);
+ ok(len == sizeof(emptyW), "expected len = %lu, got %lu\n", (DWORD)sizeof(emptyW), len);
ok(!memcmp(buffer, emptyW, sizeof(emptyW)), "unexpected buffer content\n");
type = 0xdead;
len = 0;
memset(buffer, 0x11, sizeof(buffer));
status = pNtQueryLicenseValue(&name, &type, buffer, 2, &len);
- ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryLicenseValue returned %08x, expected STATUS_BUFFER_TOO_SMALL\n", status);
- ok(type == REG_SZ, "expected type REG_SZ, got %u\n", type);
- ok(len == sizeof(emptyW), "expected len = %u, got %u\n", (DWORD)sizeof(emptyW), len);
+ ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryLicenseValue returned %08lx, expected STATUS_BUFFER_TOO_SMALL\n", status);
+ ok(type == REG_SZ, "expected type REG_SZ, got %lu\n", type);
+ ok(len == sizeof(emptyW), "expected len = %lu, got %lu\n", (DWORD)sizeof(emptyW), len);
ok(buffer[0] == 0x1111, "expected buffer[0] = 0x1111, got %u\n", buffer[0]);
pRtlFreeUnicodeString(&name);
@@ -1041,42 +1042,42 @@ static void test_NtQueryLicenseKey(void)
type = 0xdead;
len = 0xbeef;
status = pNtQueryLicenseValue(NULL, &type, &value, sizeof(value), &len);
- ok(status == STATUS_INVALID_PARAMETER, "NtQueryLicenseValue returned %08x, expected STATUS_INVALID_PARAMETER\n", status);
- ok(type == 0xdead, "expected unmodified value for type, got %u\n", type);
- ok(len == 0xbeef, "expected unmodified value for len, got %u\n", len);
+ ok(status == STATUS_INVALID_PARAMETER, "NtQueryLicenseValue returned %08lx, expected STATUS_INVALID_PARAMETER\n", status);
+ ok(type == 0xdead, "expected unmodified value for type, got %lu\n", type);
+ ok(len == 0xbeef, "expected unmodified value for len, got %lu\n", len);
type = 0xdead;
status = pNtQueryLicenseValue(&name, &type, &value, sizeof(value), NULL);
- ok(status == STATUS_INVALID_PARAMETER, "NtQueryLicenseValue returned %08x, expected STATUS_INVALID_PARAMETER\n", status);
- ok(type == 0xdead, "expected unmodified value for type, got %u\n", type);
+ ok(status == STATUS_INVALID_PARAMETER, "NtQueryLicenseValue returned %08lx, expected STATUS_INVALID_PARAMETER\n", status);
+ ok(type == 0xdead, "expected unmodified value for type, got %lu\n", type);
type = 0xdead;
len = 0;
status = pNtQueryLicenseValue(&name, &type, &value, 0, &len);
- ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryLicenseValue returned %08x, expected STATUS_BUFFER_TOO_SMALL\n", status);
- ok(type == REG_DWORD, "expected type = REG_DWORD, got %u\n", type);
- ok(len == sizeof(value), "expected len = %u, got %u\n", (DWORD)sizeof(value), len);
+ ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryLicenseValue returned %08lx, expected STATUS_BUFFER_TOO_SMALL\n", status);
+ ok(type == REG_DWORD, "expected type = REG_DWORD, got %lu\n", type);
+ ok(len == sizeof(value), "expected len = %lu, got %lu\n", (DWORD)sizeof(value), len);
len = 0;
status = pNtQueryLicenseValue(&name, NULL, &value, 0, &len);
- ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryLicenseValue returned %08x, expected STATUS_BUFFER_TOO_SMALL\n", status);
- ok(len == sizeof(value), "expected len = %u, got %u\n", (DWORD)sizeof(value), len);
+ ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryLicenseValue returned %08lx, expected STATUS_BUFFER_TOO_SMALL\n", status);
+ ok(len == sizeof(value), "expected len = %lu, got %lu\n", (DWORD)sizeof(value), len);
type = 0xdead;
len = 0;
value = 0xdeadbeef;
status = pNtQueryLicenseValue(&name, &type, &value, sizeof(value), &len);
- ok(status == STATUS_SUCCESS, "NtQueryLicenseValue returned %08x, expected STATUS_SUCCESS\n", status);
- ok(type == REG_DWORD, "expected type = REG_DWORD, got %u\n", type);
- ok(len == sizeof(value), "expected len = %u, got %u\n", (DWORD)sizeof(value), len);
+ ok(status == STATUS_SUCCESS, "NtQueryLicenseValue returned %08lx, expected STATUS_SUCCESS\n", status);
+ ok(type == REG_DWORD, "expected type = REG_DWORD, got %lu\n", type);
+ ok(len == sizeof(value), "expected len = %lu, got %lu\n", (DWORD)sizeof(value), len);
ok(value != 0xdeadbeef, "expected value != 0xdeadbeef\n");
type = 0xdead;
len = 0;
status = pNtQueryLicenseValue(&name, &type, &value, 2, &len);
- ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryLicenseValue returned %08x, expected STATUS_BUFFER_TOO_SMALL\n", status);
- ok(type == REG_DWORD, "expected type REG_DWORD, got %u\n", type);
- ok(len == sizeof(value), "expected len = %u, got %u\n", (DWORD)sizeof(value), len);
+ ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryLicenseValue returned %08lx, expected STATUS_BUFFER_TOO_SMALL\n", status);
+ ok(type == REG_DWORD, "expected type REG_DWORD, got %lu\n", type);
+ ok(len == sizeof(value), "expected len = %lu, got %lu\n", (DWORD)sizeof(value), len);
pRtlFreeUnicodeString(&name);
}
@@ -1086,7 +1087,7 @@ static void test_RtlpNtQueryValueKey(void)
NTSTATUS status;
status = pRtlpNtQueryValueKey(NULL, NULL, NULL, NULL, NULL);
- ok(status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got: 0x%08x\n", status);
+ ok(status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got: 0x%08lx\n", status);
}
static void test_symlinks(void)
@@ -1123,75 +1124,75 @@ static void test_symlinks(void)
attr.SecurityQualityOfService = NULL;
status = pNtCreateKey( &root, KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 );
- ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status );
attr.RootDirectory = root;
attr.ObjectName = &link_str;
status = pNtCreateKey( &link, KEY_ALL_ACCESS, &attr, 0, 0, REG_OPTION_CREATE_LINK, 0 );
- ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status );
/* REG_SZ is not allowed */
status = pNtSetValueKey( link, &symlink_str, 0, REG_SZ, target, target_len );
- ok( status == STATUS_ACCESS_DENIED, "NtSetValueKey wrong status 0x%08x\n", status );
+ ok( status == STATUS_ACCESS_DENIED, "NtSetValueKey wrong status 0x%08lx\n", status );
status = pNtSetValueKey( link, &symlink_str, 0, REG_LINK, target, target_len - sizeof(WCHAR) );
- ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08lx\n", status );
/* other values are not allowed */
status = pNtSetValueKey( link, &link_str, 0, REG_LINK, target, target_len - sizeof(WCHAR) );
- ok( status == STATUS_ACCESS_DENIED, "NtSetValueKey wrong status 0x%08x\n", status );
+ ok( status == STATUS_ACCESS_DENIED, "NtSetValueKey wrong status 0x%08lx\n", status );
/* try opening the target through the link */
attr.ObjectName = &link_str;
key = (HANDLE)0xdeadbeef;
status = pNtOpenKey( &key, KEY_ALL_ACCESS, &attr );
- ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtOpenKey wrong status 0x%08x\n", status );
+ ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtOpenKey wrong status 0x%08lx\n", status );
ok( !key, "key = %p\n", key );
attr.ObjectName = &target_str;
status = pNtCreateKey( &key, KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 );
- ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status );
dw = 0xbeef;
status = pNtSetValueKey( key, &value_str, 0, REG_DWORD, &dw, sizeof(dw) );
- ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08lx\n", status );
pNtClose( key );
attr.ObjectName = &link_str;
status = pNtOpenKey( &key, KEY_ALL_ACCESS, &attr );
- ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08lx\n", status );
len = sizeof(buffer);
status = pNtQueryValueKey( key, &value_str, KeyValuePartialInformation, info, len, &len );
- ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08x\n", status );
- ok( len == FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION,Data) + sizeof(DWORD), "wrong len %u\n", len );
+ ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08lx\n", status );
+ ok( len == FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION,Data) + sizeof(DWORD), "wrong len %lu\n", len );
status = pNtQueryValueKey( key, &symlink_str, KeyValuePartialInformation, info, len, &len );
- ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtQueryValueKey failed: 0x%08x\n", status );
+ ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtQueryValueKey failed: 0x%08lx\n", status );
/* REG_LINK can be created in non-link keys */
status = pNtSetValueKey( key, &symlink_str, 0, REG_LINK, target, target_len - sizeof(WCHAR) );
- ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08lx\n", status );
len = sizeof(buffer);
status = pNtQueryValueKey( key, &symlink_str, KeyValuePartialInformation, info, len, &len );
- ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08lx\n", status );
ok( len == FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION,Data) + target_len - sizeof(WCHAR),
- "wrong len %u\n", len );
+ "wrong len %lu\n", len );
status = pNtDeleteValueKey( key, &symlink_str );
- ok( status == STATUS_SUCCESS, "NtDeleteValueKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtDeleteValueKey failed: 0x%08lx\n", status );
pNtClose( key );
attr.Attributes = 0;
status = pNtCreateKey( &key, KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 );
- ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status );
len = sizeof(buffer);
status = pNtQueryValueKey( key, &value_str, KeyValuePartialInformation, info, len, &len );
- ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08x\n", status );
- ok( len == FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION,Data) + sizeof(DWORD), "wrong len %u\n", len );
+ ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08lx\n", status );
+ ok( len == FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION,Data) + sizeof(DWORD), "wrong len %lu\n", len );
status = pNtQueryValueKey( key, &symlink_str, KeyValuePartialInformation, info, len, &len );
- ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtQueryValueKey failed: 0x%08x\n", status );
+ ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtQueryValueKey failed: 0x%08lx\n", status );
pNtClose( key );
/* now open the symlink itself */
@@ -1200,87 +1201,87 @@ static void test_symlinks(void)
attr.Attributes = OBJ_OPENLINK;
attr.ObjectName = &link_str;
status = pNtOpenKey( &key, KEY_ALL_ACCESS, &attr );
- ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08lx\n", status );
len = sizeof(buffer);
status = pNtQueryValueKey( key, &symlink_str, KeyValuePartialInformation, info, len, &len );
- ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08lx\n", status );
ok( len == FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION,Data) + target_len - sizeof(WCHAR),
- "wrong len %u\n", len );
+ "wrong len %lu\n", len );
pNtClose( key );
if (pNtOpenKeyEx)
{
/* REG_OPTION_OPEN_LINK flag doesn't matter */
status = pNtOpenKeyEx( &key, KEY_ALL_ACCESS, &attr, REG_OPTION_OPEN_LINK );
- ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08lx\n", status );
len = sizeof(buffer);
status = pNtQueryValueKey( key, &symlink_str, KeyValuePartialInformation, info, len, &len );
- ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08lx\n", status );
ok( len == FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION,Data) + target_len - sizeof(WCHAR),
- "wrong len %u\n", len );
+ "wrong len %lu\n", len );
pNtClose( key );
status = pNtOpenKeyEx( &key, KEY_ALL_ACCESS, &attr, 0 );
- ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08lx\n", status );
len = sizeof(buffer);
status = pNtQueryValueKey( key, &symlink_str, KeyValuePartialInformation, info, len, &len );
- ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08lx\n", status );
ok( len == FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION,Data) + target_len - sizeof(WCHAR),
- "wrong len %u\n", len );
+ "wrong len %lu\n", len );
pNtClose( key );
attr.Attributes = 0;
status = pNtOpenKeyEx( &key, KEY_ALL_ACCESS, &attr, REG_OPTION_OPEN_LINK );
- ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08lx\n", status );
len = sizeof(buffer);
status = pNtQueryValueKey( key, &symlink_str, KeyValuePartialInformation, info, len, &len );
- ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtQueryValueKey failed: 0x%08x\n", status );
+ ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtQueryValueKey failed: 0x%08lx\n", status );
pNtClose( key );
}
attr.Attributes = OBJ_OPENLINK;
status = pNtCreateKey( &key, KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 );
- ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status );
len = sizeof(buffer);
status = pNtQueryValueKey( key, &symlink_str, KeyValuePartialInformation, info, len, &len );
- ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08lx\n", status );
ok( len == FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION,Data) + target_len - sizeof(WCHAR),
- "wrong len %u\n", len );
+ "wrong len %lu\n", len );
pNtClose( key );
/* delete target and create by NtCreateKey on link */
attr.ObjectName = &target_str;
status = pNtOpenKey( &key, KEY_ALL_ACCESS, &attr );
- ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08lx\n", status );
status = pNtDeleteKey( key );
- ok( status == STATUS_SUCCESS, "NtDeleteKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtDeleteKey failed: 0x%08lx\n", status );
pNtClose( key );
attr.ObjectName = &link_str;
attr.Attributes = 0;
status = pNtOpenKey( &key, KEY_ALL_ACCESS, &attr );
- ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtOpenKey wrong status 0x%08x\n", status );
+ ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtOpenKey wrong status 0x%08lx\n", status );
status = pNtCreateKey( &key, KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 );
- todo_wine ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status );
+ todo_wine ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status );
pNtClose( key );
if (status) /* can be removed once todo_wine above is fixed */
{
attr.ObjectName = &target_str;
attr.Attributes = OBJ_OPENLINK;
status = pNtCreateKey( &key, KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 );
- ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status );
pNtClose( key );
}
attr.ObjectName = &target_str;
attr.Attributes = OBJ_OPENLINK;
status = pNtOpenKey( &key, KEY_ALL_ACCESS, &attr );
- ok( status == STATUS_SUCCESS, "NtOpenKey wrong status 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtOpenKey wrong status 0x%08lx\n", status );
if (0) /* crashes the Windows kernel on some Vista systems */
{
@@ -1290,21 +1291,21 @@ static void test_symlinks(void)
attr.Attributes = OBJ_OPENLINK;
attr.ObjectName = &null_str;
status = pNtOpenKey( &key, KEY_ALL_ACCESS, &attr );
- ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08lx\n", status );
len = sizeof(buffer);
status = pNtQueryValueKey( key, &symlink_str, KeyValuePartialInformation, info, len, &len );
- ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08lx\n", status );
ok( len == FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION,Data) + target_len - sizeof(WCHAR),
- "wrong len %u\n", len );
+ "wrong len %lu\n", len );
pNtClose( key );
status = pNtCreateKey( &key, KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 );
- ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status );
len = sizeof(buffer);
status = pNtQueryValueKey( key, &symlink_str, KeyValuePartialInformation, info, len, &len );
- ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08lx\n", status );
ok( len == FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION,Data) + target_len - sizeof(WCHAR),
- "wrong len %u\n", len );
+ "wrong len %lu\n", len );
pNtClose( key );
}
@@ -1314,79 +1315,79 @@ static void test_symlinks(void)
attr.Attributes = 0;
attr.ObjectName = &null_str;
status = pNtOpenKey( &key, KEY_ALL_ACCESS, &attr );
- ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08lx\n", status );
len = sizeof(buffer);
status = pNtQueryValueKey( key, &symlink_str, KeyValuePartialInformation, info, len, &len );
- ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtQueryValueKey failed: 0x%08x\n", status );
+ ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtQueryValueKey failed: 0x%08lx\n", status );
pNtClose( key );
status = pNtCreateKey( &key, KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 );
- ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status );
len = sizeof(buffer);
status = pNtQueryValueKey( key, &symlink_str, KeyValuePartialInformation, info, len, &len );
- ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtQueryValueKey failed: 0x%08x\n", status );
+ ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtQueryValueKey failed: 0x%08lx\n", status );
pNtClose( key );
}
/* target with terminating null doesn't work */
status = pNtSetValueKey( link, &symlink_str, 0, REG_LINK, target, target_len );
- ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08lx\n", status );
attr.RootDirectory = root;
attr.Attributes = 0;
attr.ObjectName = &link_str;
status = pNtOpenKey( &key, KEY_ALL_ACCESS, &attr );
- ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtOpenKey wrong status 0x%08x\n", status );
+ ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtOpenKey wrong status 0x%08lx\n", status );
/* relative symlink, works only on win2k */
status = pNtSetValueKey( link, &symlink_str, 0, REG_LINK, targetW+1, sizeof(targetW)-2*sizeof(WCHAR) );
- ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08lx\n", status );
attr.ObjectName = &link_str;
status = pNtOpenKey( &key, KEY_ALL_ACCESS, &attr );
ok( status == STATUS_OBJECT_NAME_NOT_FOUND || status == STATUS_OBJECT_NAME_INVALID /* Win10 1607+ */,
- "NtOpenKey wrong status 0x%08x\n", status );
+ "NtOpenKey wrong status 0x%08lx\n", status );
key = (HKEY)0xdeadbeef;
status = pNtCreateKey( &key, KEY_ALL_ACCESS, &attr, 0, 0, REG_OPTION_CREATE_LINK, NULL );
- ok( status == STATUS_OBJECT_NAME_COLLISION, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_OBJECT_NAME_COLLISION, "NtCreateKey failed: 0x%08lx\n", status );
ok( !key, "key = %p\n", key );
status = pNtDeleteKey( link );
- ok( status == STATUS_SUCCESS, "NtDeleteKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtDeleteKey failed: 0x%08lx\n", status );
pNtClose( link );
attr.ObjectName = &target_str;
status = pNtOpenKey( &key, KEY_ALL_ACCESS, &attr );
- ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08lx\n", status );
status = pNtDeleteKey( key );
- ok( status == STATUS_SUCCESS, "NtDeleteKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtDeleteKey failed: 0x%08lx\n", status );
pNtClose( key );
/* symlink loop */
status = pNtCreateKey( &link, KEY_ALL_ACCESS, &attr, 0, 0, REG_OPTION_CREATE_LINK, 0 );
- ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status );
memcpy( target + target_len/sizeof(WCHAR) - 1, targetW, sizeof(targetW) );
status = pNtSetValueKey( link, &symlink_str, 0, REG_LINK,
target, target_len + sizeof(targetW) - sizeof(WCHAR) );
- ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08lx\n", status );
status = pNtOpenKey( &key, KEY_ALL_ACCESS, &attr );
ok( status == STATUS_OBJECT_NAME_NOT_FOUND /* XP */
|| status == STATUS_NAME_TOO_LONG
|| status == STATUS_INVALID_PARAMETER /* Win10 1607+ */,
- "NtOpenKey failed: 0x%08x\n", status );
+ "NtOpenKey failed: 0x%08lx\n", status );
attr.Attributes = OBJ_OPENLINK;
status = pNtOpenKey( &key, KEY_ALL_ACCESS, &attr );
- ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08lx\n", status );
pNtClose( key );
status = pNtDeleteKey( link );
- ok( status == STATUS_SUCCESS, "NtDeleteKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtDeleteKey failed: 0x%08lx\n", status );
pNtClose( link );
status = pNtDeleteKey( root );
- ok( status == STATUS_SUCCESS, "NtDeleteKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtDeleteKey failed: 0x%08lx\n", status );
pNtClose( root );
pRtlFreeHeap(GetProcessHeap(), 0, target);
@@ -1416,14 +1417,14 @@ static DWORD get_key_value( HANDLE root, const char *name, DWORD flags )
status = pNtCreateKey( &key, flags | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 );
if (status == STATUS_OBJECT_NAME_NOT_FOUND) return 0;
- ok( status == STATUS_SUCCESS, "%08x: NtCreateKey failed: 0x%08x\n", flags, status );
+ ok( status == STATUS_SUCCESS, "%08lx: NtCreateKey failed: 0x%08lx\n", flags, status );
status = pNtQueryValueKey( key, &value_str, KeyValuePartialInformation, info, len, &len );
if (status == STATUS_OBJECT_NAME_NOT_FOUND)
dw = 0;
else
{
- ok( status == STATUS_SUCCESS, "%08x: NtQueryValueKey failed: 0x%08x\n", flags, status );
+ ok( status == STATUS_SUCCESS, "%08lx: NtQueryValueKey failed: 0x%08lx\n", flags, status );
dw = *(DWORD *)info->Data;
}
pNtClose( key );
@@ -1434,7 +1435,7 @@ static DWORD get_key_value( HANDLE root, const char *name, DWORD flags )
static void _check_key_value( int line, HANDLE root, const char *name, DWORD flags, DWORD expect )
{
DWORD dw = get_key_value( root, name, flags );
- ok_(__FILE__,line)( dw == expect, "%08x: wrong value %u/%u\n", flags, dw, expect );
+ ok_(__FILE__,line)( dw == expect, "%08lx: wrong value %lu/%lu\n", flags, dw, expect );
}
#define check_key_value(root,name,flags,expect) _check_key_value( __LINE__, root, name, flags, expect )
@@ -1511,43 +1512,43 @@ static void test_redirection(void)
skip("Not authorized to modify KEY_WOW64_64KEY, no redirection\n");
return;
}
- ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status );
pRtlInitUnicodeString( &str, wine32W );
status = pNtCreateKey( &root32, KEY_WOW64_32KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 );
- ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status );
pRtlInitUnicodeString( &str, key64W );
status = pNtCreateKey( &key64, KEY_WOW64_64KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 );
- ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status );
pRtlInitUnicodeString( &str, key32W );
status = pNtCreateKey( &key32, KEY_WOW64_32KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 );
- ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status );
dw = 64;
status = pNtSetValueKey( key64, &value_str, 0, REG_DWORD, &dw, sizeof(dw) );
- ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08lx\n", status );
dw = 32;
status = pNtSetValueKey( key32, &value_str, 0, REG_DWORD, &dw, sizeof(dw) );
- ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08lx\n", status );
len = sizeof(buffer);
status = pNtQueryValueKey( key32, &value_str, KeyValuePartialInformation, info, len, &len );
- ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08lx\n", status );
dw = *(DWORD *)info->Data;
- ok( dw == 32, "wrong value %u\n", dw );
+ ok( dw == 32, "wrong value %lu\n", dw );
len = sizeof(buffer);
status = pNtQueryValueKey( key64, &value_str, KeyValuePartialInformation, info, len, &len );
- ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08lx\n", status );
dw = *(DWORD *)info->Data;
- ok( dw == 64, "wrong value %u\n", dw );
+ ok( dw == 64, "wrong value %lu\n", dw );
pRtlInitUnicodeString( &str, softwareW );
status = pNtCreateKey( &key, KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 );
- ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status );
if (ptr_size == 32)
{
@@ -1575,19 +1576,19 @@ static void test_redirection(void)
if (ptr_size == 32)
{
status = pNtCreateKey( &key, KEY_WOW64_64KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 );
- ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status );
dw = get_key_value( key, "Wine\\Winetest", 0 );
- ok( dw == 64 || broken(dw == 32) /* xp64 */, "wrong value %u\n", dw );
+ ok( dw == 64 || broken(dw == 32) /* xp64 */, "wrong value %lu\n", dw );
check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, 64 );
check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 );
check_key_value( key, "Wow6432Node\\Wine\\Winetest", 0, 32 );
dw = get_key_value( key, "Wow6432Node\\Wine\\Winetest", KEY_WOW64_64KEY );
- ok( dw == 32 || broken(dw == 64) /* xp64 */, "wrong value %u\n", dw );
+ ok( dw == 32 || broken(dw == 64) /* xp64 */, "wrong value %lu\n", dw );
check_key_value( key, "Wow6432Node\\Wine\\Winetest", KEY_WOW64_32KEY, 32 );
pNtClose( key );
status = pNtCreateKey( &key, KEY_WOW64_32KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 );
- ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status );
check_key_value( key, "Wine\\Winetest", 0, 32 );
check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 );
check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 );
@@ -1617,7 +1618,7 @@ static void test_redirection(void)
pRtlInitUnicodeString( &str, wownodeW );
status = pNtCreateKey( &key, KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 );
- ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status );
check_key_value( key, "Wine\\Winetest", 0, 32 );
check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, (ptr_size == 64) ? 32 : (is_vista ? 64 : 32) );
check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 );
@@ -1626,15 +1627,15 @@ static void test_redirection(void)
if (ptr_size == 32)
{
status = pNtCreateKey( &key, KEY_WOW64_64KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 );
- ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status );
dw = get_key_value( key, "Wine\\Winetest", 0 );
- ok( dw == (is_vista ? 64 : 32) || broken(dw == 32) /* xp64 */, "wrong value %u\n", dw );
+ ok( dw == (is_vista ? 64 : 32) || broken(dw == 32) /* xp64 */, "wrong value %lu\n", dw );
check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 );
check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 );
pNtClose( key );
status = pNtCreateKey( &key, KEY_WOW64_32KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 );
- ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status );
check_key_value( key, "Wine\\Winetest", 0, 32 );
check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 );
check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 );
@@ -1643,7 +1644,7 @@ static void test_redirection(void)
pRtlInitUnicodeString( &str, wine32W );
status = pNtCreateKey( &key, KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 );
- ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status );
check_key_value( key, "Winetest", 0, 32 );
check_key_value( key, "Winetest", KEY_WOW64_64KEY, (ptr_size == 32 && is_vista) ? 64 : 32 );
check_key_value( key, "Winetest", KEY_WOW64_32KEY, 32 );
@@ -1652,15 +1653,15 @@ static void test_redirection(void)
if (ptr_size == 32)
{
status = pNtCreateKey( &key, KEY_WOW64_64KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 );
- ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status );
dw = get_key_value( key, "Winetest", 0 );
- ok( dw == 32 || (is_vista && dw == 64), "wrong value %u\n", dw );
+ ok( dw == 32 || (is_vista && dw == 64), "wrong value %lu\n", dw );
check_key_value( key, "Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 );
check_key_value( key, "Winetest", KEY_WOW64_32KEY, 32 );
pNtClose( key );
status = pNtCreateKey( &key, KEY_WOW64_32KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 );
- ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status );
check_key_value( key, "Winetest", 0, 32 );
check_key_value( key, "Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 );
check_key_value( key, "Winetest", KEY_WOW64_32KEY, 32 );
@@ -1669,7 +1670,7 @@ static void test_redirection(void)
pRtlInitUnicodeString( &str, wine64W );
status = pNtCreateKey( &key, KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 );
- ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status );
check_key_value( key, "Winetest", 0, ptr_size );
check_key_value( key, "Winetest", KEY_WOW64_64KEY, is_vista ? 64 : ptr_size );
check_key_value( key, "Winetest", KEY_WOW64_32KEY, ptr_size );
@@ -1678,16 +1679,16 @@ static void test_redirection(void)
if (ptr_size == 32)
{
status = pNtCreateKey( &key, KEY_WOW64_64KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 );
- ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status );
dw = get_key_value( key, "Winetest", 0 );
- ok( dw == 64 || broken(dw == 32) /* xp64 */, "wrong value %u\n", dw );
+ ok( dw == 64 || broken(dw == 32) /* xp64 */, "wrong value %lu\n", dw );
check_key_value( key, "Winetest", KEY_WOW64_64KEY, 64 );
dw = get_key_value( key, "Winetest", KEY_WOW64_32KEY );
- todo_wine ok( dw == 32, "wrong value %u\n", dw );
+ todo_wine ok( dw == 32, "wrong value %lu\n", dw );
pNtClose( key );
status = pNtCreateKey( &key, KEY_WOW64_32KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 );
- ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status );
check_key_value( key, "Winetest", 0, 32 );
check_key_value( key, "Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 );
check_key_value( key, "Winetest", KEY_WOW64_32KEY, 32 );
@@ -1695,11 +1696,11 @@ static void test_redirection(void)
}
status = pNtDeleteKey( key32 );
- ok( status == STATUS_SUCCESS, "NtDeleteKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtDeleteKey failed: 0x%08lx\n", status );
pNtClose( key32 );
status = pNtDeleteKey( key64 );
- ok( status == STATUS_SUCCESS, "NtDeleteKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtDeleteKey failed: 0x%08lx\n", status );
pNtClose( key64 );
pNtDeleteKey( root32 );
@@ -1716,39 +1717,39 @@ static void test_redirection(void)
skip("Not authorized to modify the Classes key\n");
return;
}
- ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status );
pRtlInitUnicodeString( &str, classes32W );
status = pNtCreateKey( &key32, KEY_WOW64_32KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 );
- ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status );
dw = 64;
status = pNtSetValueKey( key64, &value_str, 0, REG_DWORD, &dw, sizeof(dw) );
- ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08lx\n", status );
pNtClose( key64 );
dw = 32;
status = pNtSetValueKey( key32, &value_str, 0, REG_DWORD, &dw, sizeof(dw) );
- ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08lx\n", status );
pNtClose( key32 );
pRtlInitUnicodeString( &str, classes64W );
status = pNtCreateKey( &key64, KEY_WOW64_64KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 );
- ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status );
len = sizeof(buffer);
status = pNtQueryValueKey( key64, &value_str, KeyValuePartialInformation, info, len, &len );
- ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08lx\n", status );
dw = *(DWORD *)info->Data;
- ok( dw == ptr_size, "wrong value %u\n", dw );
+ ok( dw == ptr_size, "wrong value %lu\n", dw );
pRtlInitUnicodeString( &str, classes32W );
status = pNtCreateKey( &key32, KEY_WOW64_32KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 );
- ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status );
len = sizeof(buffer);
status = pNtQueryValueKey( key32, &value_str, KeyValuePartialInformation, info, len, &len );
- ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08lx\n", status );
dw = *(DWORD *)info->Data;
- ok( dw == 32, "wrong value %u\n", dw );
+ ok( dw == 32, "wrong value %lu\n", dw );
pNtDeleteKey( key32 );
pNtClose( key32 );
@@ -1766,7 +1767,7 @@ static void test_long_value_name(void)
InitializeObjectAttributes(&attr, &winetestpath, 0, 0, 0);
status = pNtOpenKey(&key, KEY_WRITE|KEY_READ, &attr);
- ok(status == STATUS_SUCCESS, "NtOpenKey Failed: 0x%08x\n", status);
+ ok(status == STATUS_SUCCESS, "NtOpenKey Failed: 0x%08lx\n", status);
ValName.MaximumLength = 0xfffc;
ValName.Length = ValName.MaximumLength - sizeof(WCHAR);
@@ -1776,16 +1777,16 @@ static void test_long_value_name(void)
ValName.Buffer[i] = 0;
status = pNtDeleteValueKey(key, &ValName);
- ok(status == STATUS_OBJECT_NAME_NOT_FOUND, "NtDeleteValueKey with nonexistent long value name returned 0x%08x\n", status);
+ ok(status == STATUS_OBJECT_NAME_NOT_FOUND, "NtDeleteValueKey with nonexistent long value name returned 0x%08lx\n", status);
status = pNtSetValueKey(key, &ValName, 0, REG_DWORD, &i, sizeof(i));
ok(status == STATUS_INVALID_PARAMETER || broken(status == STATUS_SUCCESS) /* nt4 */,
- "NtSetValueKey with long value name returned 0x%08x\n", status);
+ "NtSetValueKey with long value name returned 0x%08lx\n", status);
expected = (status == STATUS_SUCCESS) ? STATUS_SUCCESS : STATUS_OBJECT_NAME_NOT_FOUND;
status = pNtDeleteValueKey(key, &ValName);
- ok(status == expected, "NtDeleteValueKey with long value name returned 0x%08x\n", status);
+ ok(status == expected, "NtDeleteValueKey with long value name returned 0x%08lx\n", status);
status = pNtQueryValueKey(key, &ValName, KeyValueBasicInformation, NULL, 0, &i);
- ok(status == STATUS_OBJECT_NAME_NOT_FOUND, "NtQueryValueKey with nonexistent long value name returned 0x%08x\n", status);
+ ok(status == STATUS_OBJECT_NAME_NOT_FOUND, "NtQueryValueKey with nonexistent long value name returned 0x%08lx\n", status);
pRtlFreeUnicodeString(&ValName);
pNtClose(key);
@@ -1804,7 +1805,7 @@ static void test_NtQueryKey(void)
InitializeObjectAttributes(&attr, &winetestpath, 0, 0, 0);
status = pNtOpenKey(&key, KEY_READ, &attr);
- ok(status == STATUS_SUCCESS, "NtOpenKey Failed: 0x%08x\n", status);
+ ok(status == STATUS_SUCCESS, "NtOpenKey Failed: 0x%08lx\n", status);
status = pNtQueryKey(key, KeyNameInformation, NULL, 0, &length);
if (status == STATUS_INVALID_PARAMETER) {
@@ -1812,20 +1813,20 @@ static void test_NtQueryKey(void)
pNtClose(key);
return;
}
- todo_wine ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryKey Failed: 0x%08x\n", status);
+ todo_wine ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryKey Failed: 0x%08lx\n", status);
info = HeapAlloc(GetProcessHeap(), 0, length);
/* non-zero buffer size, but insufficient */
status = pNtQueryKey(key, KeyNameInformation, info, sizeof(*info), &len);
- ok(status == STATUS_BUFFER_OVERFLOW, "NtQueryKey Failed: 0x%08x\n", status);
- ok(length == len, "got %d, expected %d\n", len, length);
- ok(info->NameLength == winetestpath.Length, "got %d, expected %d\n",
+ ok(status == STATUS_BUFFER_OVERFLOW, "NtQueryKey Failed: 0x%08lx\n", status);
+ ok(length == len, "got %ld, expected %ld\n", len, length);
+ ok(info->NameLength == winetestpath.Length, "got %ld, expected %d\n",
info->NameLength, winetestpath.Length);
/* correct buffer size */
status = pNtQueryKey(key, KeyNameInformation, info, length, &len);
- ok(status == STATUS_SUCCESS, "NtQueryKey Failed: 0x%08x\n", status);
- ok(length == len, "got %d, expected %d\n", len, length);
+ ok(status == STATUS_SUCCESS, "NtQueryKey Failed: 0x%08lx\n", status);
+ ok(length == len, "got %ld, expected %ld\n", len, length);
str.Buffer = info->Name;
str.Length = info->NameLength;
@@ -1840,54 +1841,54 @@ static void test_NtQueryKey(void)
attr.ObjectName = &str;
pRtlCreateUnicodeStringFromAsciiz(&str, "test_subkey");
status = pNtCreateKey(&subkey, GENERIC_ALL, &attr, 0, 0, 0, 0);
- ok(status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status);
+ ok(status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status);
pRtlFreeUnicodeString(&str);
status = pNtQueryKey(subkey, KeyCachedInformation, &cached_info, sizeof(cached_info), &len);
- ok(status == STATUS_SUCCESS, "NtQueryKey Failed: 0x%08x\n", status);
+ ok(status == STATUS_SUCCESS, "NtQueryKey Failed: 0x%08lx\n", status);
if (status == STATUS_SUCCESS)
{
- ok(len == sizeof(cached_info), "got unexpected length %d\n", len);
- ok(cached_info.SubKeys == 0, "cached_info.SubKeys = %u\n", cached_info.SubKeys);
- ok(cached_info.MaxNameLen == 0, "cached_info.MaxNameLen = %u\n", cached_info.MaxNameLen);
- ok(cached_info.Values == 0, "cached_info.Values = %u\n", cached_info.Values);
- ok(cached_info.MaxValueNameLen == 0, "cached_info.MaxValueNameLen = %u\n", cached_info.MaxValueNameLen);
- ok(cached_info.MaxValueDataLen == 0, "cached_info.MaxValueDataLen = %u\n", cached_info.MaxValueDataLen);
- ok(cached_info.NameLength == 22, "cached_info.NameLength = %u\n", cached_info.NameLength);
+ ok(len == sizeof(cached_info), "got unexpected length %ld\n", len);
+ ok(cached_info.SubKeys == 0, "cached_info.SubKeys = %lu\n", cached_info.SubKeys);
+ ok(cached_info.MaxNameLen == 0, "cached_info.MaxNameLen = %lu\n", cached_info.MaxNameLen);
+ ok(cached_info.Values == 0, "cached_info.Values = %lu\n", cached_info.Values);
+ ok(cached_info.MaxValueNameLen == 0, "cached_info.MaxValueNameLen = %lu\n", cached_info.MaxValueNameLen);
+ ok(cached_info.MaxValueDataLen == 0, "cached_info.MaxValueDataLen = %lu\n", cached_info.MaxValueDataLen);
+ ok(cached_info.NameLength == 22, "cached_info.NameLength = %lu\n", cached_info.NameLength);
}
attr.RootDirectory = subkey;
attr.ObjectName = &str;
pRtlCreateUnicodeStringFromAsciiz(&str, "test_subkey2");
status = pNtCreateKey(&subkey2, GENERIC_ALL, &attr, 0, 0, 0, 0);
- ok(status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status);
+ ok(status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status);
pRtlFreeUnicodeString(&str);
pRtlCreateUnicodeStringFromAsciiz(&str, "val");
dw = 64;
status = pNtSetValueKey( subkey, &str, 0, REG_DWORD, &dw, sizeof(dw) );
- ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08x\n", status );
+ ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08lx\n", status );
pRtlFreeUnicodeString(&str);
status = pNtQueryKey(subkey, KeyCachedInformation, &cached_info, sizeof(cached_info), &len);
- ok(status == STATUS_SUCCESS, "NtQueryKey Failed: 0x%08x\n", status);
+ ok(status == STATUS_SUCCESS, "NtQueryKey Failed: 0x%08lx\n", status);
if (status == STATUS_SUCCESS)
{
- ok(len == sizeof(cached_info), "got unexpected length %d\n", len);
- ok(cached_info.SubKeys == 1, "cached_info.SubKeys = %u\n", cached_info.SubKeys);
- ok(cached_info.MaxNameLen == 24, "cached_info.MaxNameLen = %u\n", cached_info.MaxNameLen);
- ok(cached_info.Values == 1, "cached_info.Values = %u\n", cached_info.Values);
- ok(cached_info.MaxValueNameLen == 6, "cached_info.MaxValueNameLen = %u\n", cached_info.MaxValueNameLen);
- ok(cached_info.MaxValueDataLen == 4, "cached_info.MaxValueDataLen = %u\n", cached_info.MaxValueDataLen);
- ok(cached_info.NameLength == 22, "cached_info.NameLength = %u\n", cached_info.NameLength);
+ ok(len == sizeof(cached_info), "got unexpected length %ld\n", len);
+ ok(cached_info.SubKeys == 1, "cached_info.SubKeys = %lu\n", cached_info.SubKeys);
+ ok(cached_info.MaxNameLen == 24, "cached_info.MaxNameLen = %lu\n", cached_info.MaxNameLen);
+ ok(cached_info.Values == 1, "cached_info.Values = %lu\n", cached_info.Values);
+ ok(cached_info.MaxValueNameLen == 6, "cached_info.MaxValueNameLen = %lu\n", cached_info.MaxValueNameLen);
+ ok(cached_info.MaxValueDataLen == 4, "cached_info.MaxValueDataLen = %lu\n", cached_info.MaxValueDataLen);
+ ok(cached_info.NameLength == 22, "cached_info.NameLength = %lu\n", cached_info.NameLength);
}
status = pNtDeleteKey(subkey2);
- ok(status == STATUS_SUCCESS, "NtDeleteSubkey failed: %x\n", status);
+ ok(status == STATUS_SUCCESS, "NtDeleteSubkey failed: %lx\n", status);
status = pNtDeleteKey(subkey);
- ok(status == STATUS_SUCCESS, "NtDeleteSubkey failed: %x\n", status);
+ ok(status == STATUS_SUCCESS, "NtDeleteSubkey failed: %lx\n", status);
pNtClose(subkey2);
pNtClose(subkey);
@@ -1906,114 +1907,114 @@ static void test_notify(void)
InitializeObjectAttributes(&attr, &winetestpath, 0, 0, 0);
status = pNtOpenKey(&key, KEY_ALL_ACCESS, &attr);
- ok(status == STATUS_SUCCESS, "NtOpenKey Failed: 0x%08x\n", status);
+ ok(status == STATUS_SUCCESS, "NtOpenKey Failed: 0x%08lx\n", status);
status = pNtOpenKey(&key2, KEY_ALL_ACCESS, &attr);
- ok(status == STATUS_SUCCESS, "NtOpenKey Failed: 0x%08x\n", status);
+ ok(status == STATUS_SUCCESS, "NtOpenKey Failed: 0x%08lx\n", status);
for (i = 0; i < ARRAY_SIZE(events); ++i)
events[i] = CreateEventW(NULL, TRUE, TRUE, NULL);
status = pNtNotifyChangeKey(key, events[0], NULL, NULL, &iosb, REG_NOTIFY_CHANGE_NAME, FALSE, NULL, 0, TRUE);
- ok(status == STATUS_PENDING, "NtNotifyChangeKey returned %x\n", status);
+ ok(status == STATUS_PENDING, "NtNotifyChangeKey returned %lx\n", status);
status = pNtNotifyChangeKey(key, events[1], NULL, NULL, &iosb, 0, FALSE, NULL, 0, TRUE);
- ok(status == STATUS_PENDING, "NtNotifyChangeKey returned %x\n", status);
+ ok(status == STATUS_PENDING, "NtNotifyChangeKey returned %lx\n", status);
status = pNtNotifyChangeKey(key2, events[2], NULL, NULL, &iosb, 0, FALSE, NULL, 0, TRUE);
- ok(status == STATUS_PENDING, "NtNotifyChangeKey returned %x\n", status);
+ ok(status == STATUS_PENDING, "NtNotifyChangeKey returned %lx\n", status);
status = pNtNotifyChangeKey(key2, events[3], NULL, NULL, &iosb, REG_NOTIFY_CHANGE_NAME, FALSE, NULL, 0, TRUE);
- ok(status == STATUS_PENDING, "NtNotifyChangeKey returned %x\n", status);
+ ok(status == STATUS_PENDING, "NtNotifyChangeKey returned %lx\n", status);
status = WaitForMultipleObjects(4, events, FALSE, 0);
- ok(status == WAIT_TIMEOUT, "got %d\n", status);
+ ok(status == WAIT_TIMEOUT, "got %ld\n", status);
attr.RootDirectory = key;
attr.ObjectName = &str;
pRtlCreateUnicodeStringFromAsciiz(&str, "test_subkey");
status = pNtCreateKey(&subkey, GENERIC_ALL, &attr, 0, 0, 0, 0);
- ok(status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status);
+ ok(status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status);
pRtlFreeUnicodeString(&str);
status = pNtWaitForSingleObject(events[0], FALSE, &timeout);
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
status = pNtWaitForSingleObject(events[1], FALSE, &timeout);
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
status = pNtWaitForSingleObject(events[2], FALSE, &timeout);
- ok(status == STATUS_TIMEOUT, "got %#x\n", status);
+ ok(status == STATUS_TIMEOUT, "got %#lx\n", status);
status = pNtWaitForSingleObject(events[3], FALSE, &timeout);
- ok(status == STATUS_TIMEOUT, "got %#x\n", status);
+ ok(status == STATUS_TIMEOUT, "got %#lx\n", status);
status = pNtNotifyChangeKey(key, events[0], NULL, NULL, &iosb, 0, FALSE, NULL, 0, TRUE);
- ok(status == STATUS_PENDING, "NtNotifyChangeKey returned %x\n", status);
+ ok(status == STATUS_PENDING, "NtNotifyChangeKey returned %lx\n", status);
status = pNtWaitForSingleObject(events[0], FALSE, &timeout);
- ok(status == STATUS_TIMEOUT, "got %#x\n", status);
+ ok(status == STATUS_TIMEOUT, "got %#lx\n", status);
status = pNtWaitForSingleObject(events[1], FALSE, &timeout);
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
status = pNtWaitForSingleObject(events[2], FALSE, &timeout);
- ok(status == STATUS_TIMEOUT, "got %#x\n", status);
+ ok(status == STATUS_TIMEOUT, "got %#lx\n", status);
status = pNtWaitForSingleObject(events[3], FALSE, &timeout);
- ok(status == STATUS_TIMEOUT, "got %#x\n", status);
+ ok(status == STATUS_TIMEOUT, "got %#lx\n", status);
status = pNtNotifyChangeKey(key, events[1], NULL, NULL, &iosb, 0, FALSE, NULL, 0, TRUE);
- ok(status == STATUS_PENDING, "NtNotifyChangeKey returned %x\n", status);
+ ok(status == STATUS_PENDING, "NtNotifyChangeKey returned %lx\n", status);
status = WaitForMultipleObjects(4, events, FALSE, 0);
- ok(status == WAIT_TIMEOUT, "got %d\n", status);
+ ok(status == WAIT_TIMEOUT, "got %ld\n", status);
status = pNtDeleteKey(subkey);
- ok(status == STATUS_SUCCESS, "NtDeleteSubkey failed: %x\n", status);
+ ok(status == STATUS_SUCCESS, "NtDeleteSubkey failed: %lx\n", status);
status = pNtWaitForSingleObject(events[0], FALSE, &timeout);
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
status = pNtWaitForSingleObject(events[1], FALSE, &timeout);
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
status = pNtWaitForSingleObject(events[2], FALSE, &timeout);
- ok(status == STATUS_TIMEOUT, "got %#x\n", status);
+ ok(status == STATUS_TIMEOUT, "got %#lx\n", status);
status = pNtWaitForSingleObject(events[3], FALSE, &timeout);
- ok(status == STATUS_TIMEOUT, "got %#x\n", status);
+ ok(status == STATUS_TIMEOUT, "got %#lx\n", status);
pNtClose(subkey);
status = pNtNotifyChangeKey(key, events[0], NULL, NULL, &iosb, 0, FALSE, NULL, 0, TRUE);
- ok(status == STATUS_PENDING, "NtNotifyChangeKey returned %x\n", status);
+ ok(status == STATUS_PENDING, "NtNotifyChangeKey returned %lx\n", status);
status = pNtNotifyChangeKey(key, events[1], NULL, NULL, &iosb, 0, FALSE, NULL, 0, TRUE);
- ok(status == STATUS_PENDING, "NtNotifyChangeKey returned %x\n", status);
+ ok(status == STATUS_PENDING, "NtNotifyChangeKey returned %lx\n", status);
pNtClose(key);
status = pNtWaitForSingleObject(events[0], FALSE, &timeout);
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
status = pNtWaitForSingleObject(events[1], FALSE, &timeout);
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
status = pNtWaitForSingleObject(events[2], FALSE, &timeout);
- ok(status == STATUS_TIMEOUT, "got %#x\n", status);
+ ok(status == STATUS_TIMEOUT, "got %#lx\n", status);
status = pNtWaitForSingleObject(events[3], FALSE, &timeout);
- ok(status == STATUS_TIMEOUT, "got %#x\n", status);
+ ok(status == STATUS_TIMEOUT, "got %#lx\n", status);
if (pNtNotifyChangeMultipleKeys)
{
InitializeObjectAttributes(&attr, &winetestpath, 0, 0, 0);
status = pNtOpenKey(&key, KEY_ALL_ACCESS, &attr);
- ok(status == STATUS_SUCCESS, "NtOpenKey Failed: 0x%08x\n", status);
+ ok(status == STATUS_SUCCESS, "NtOpenKey Failed: 0x%08lx\n", status);
status = pNtNotifyChangeMultipleKeys(key, 0, NULL, events[0], NULL, NULL, &iosb, REG_NOTIFY_CHANGE_NAME, FALSE, NULL, 0, TRUE);
- ok(status == STATUS_PENDING, "NtNotifyChangeKey returned %x\n", status);
+ ok(status == STATUS_PENDING, "NtNotifyChangeKey returned %lx\n", status);
status = pNtWaitForSingleObject(events[0], FALSE, &timeout);
- ok(status == STATUS_TIMEOUT, "NtWaitForSingleObject returned %x\n", status);
+ ok(status == STATUS_TIMEOUT, "NtWaitForSingleObject returned %lx\n", status);
attr.RootDirectory = key;
attr.ObjectName = &str;
pRtlCreateUnicodeStringFromAsciiz(&str, "test_subkey");
status = pNtCreateKey(&subkey, GENERIC_ALL, &attr, 0, 0, 0, 0);
- ok(status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status);
+ ok(status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status);
pRtlFreeUnicodeString(&str);
status = pNtWaitForSingleObject(events[0], FALSE, &timeout);
- ok(status == STATUS_SUCCESS, "NtWaitForSingleObject returned %x\n", status);
+ ok(status == STATUS_SUCCESS, "NtWaitForSingleObject returned %lx\n", status);
status = pNtDeleteKey(subkey);
- ok(status == STATUS_SUCCESS, "NtDeleteSubkey failed: %x\n", status);
+ ok(status == STATUS_SUCCESS, "NtDeleteSubkey failed: %lx\n", status);
pNtClose(subkey);
pNtClose(key);
}
@@ -2043,55 +2044,55 @@ static void test_RtlCreateRegistryKey(void)
/* should work */
status = pRtlCreateRegistryKey(RTL_REGISTRY_ABSOLUTE, winetestpath.Buffer);
- ok(status == STATUS_SUCCESS, "RtlCreateRegistryKey failed: %08x\n", status);
+ ok(status == STATUS_SUCCESS, "RtlCreateRegistryKey failed: %08lx\n", status);
status = pRtlCreateRegistryKey(RTL_REGISTRY_ABSOLUTE | RTL_REGISTRY_OPTIONAL, winetestpath.Buffer);
- ok(status == STATUS_SUCCESS, "RtlCreateRegistryKey failed: %08x\n", status);
+ ok(status == STATUS_SUCCESS, "RtlCreateRegistryKey failed: %08lx\n", status);
status = pRtlCreateRegistryKey(RTL_REGISTRY_USER, NULL);
- ok(status == STATUS_SUCCESS, "RtlCreateRegistryKey failed: %08x\n", status);
+ ok(status == STATUS_SUCCESS, "RtlCreateRegistryKey failed: %08lx\n", status);
status = pRtlCreateRegistryKey(RTL_REGISTRY_USER | RTL_REGISTRY_OPTIONAL, NULL);
- ok(status == STATUS_SUCCESS, "RtlCreateRegistryKey failed: %08x\n", status);
+ ok(status == STATUS_SUCCESS, "RtlCreateRegistryKey failed: %08lx\n", status);
status = pRtlCreateRegistryKey(RTL_REGISTRY_USER, empty);
- ok(status == STATUS_SUCCESS, "RtlCreateRegistryKey failed: %08x\n", status);
+ ok(status == STATUS_SUCCESS, "RtlCreateRegistryKey failed: %08lx\n", status);
status = pRtlCreateRegistryKey(RTL_REGISTRY_USER | RTL_REGISTRY_OPTIONAL, empty);
- ok(status == STATUS_SUCCESS, "RtlCreateRegistryKey failed: %08x\n", status);
+ ok(status == STATUS_SUCCESS, "RtlCreateRegistryKey failed: %08lx\n", status);
/* invalid first parameter */
status = pRtlCreateRegistryKey(RTL_REGISTRY_USER+1, winetestpath.Buffer);
- ok(status == STATUS_INVALID_PARAMETER, "RtlCreateRegistryKey unexpected return value: %08x, expected %08x\n", status, STATUS_INVALID_PARAMETER);
+ ok(status == STATUS_INVALID_PARAMETER, "RtlCreateRegistryKey unexpected return value: %08lx, expected %08lx\n", status, STATUS_INVALID_PARAMETER);
status = pRtlCreateRegistryKey((RTL_REGISTRY_USER+1) | RTL_REGISTRY_OPTIONAL, winetestpath.Buffer);
- ok(status == STATUS_INVALID_PARAMETER, "RtlCreateRegistryKey unexpected return value: %08x, expected %08x\n", status, STATUS_INVALID_PARAMETER);
+ ok(status == STATUS_INVALID_PARAMETER, "RtlCreateRegistryKey unexpected return value: %08lx, expected %08lx\n", status, STATUS_INVALID_PARAMETER);
/* invalid second parameter */
status = pRtlCreateRegistryKey(RTL_REGISTRY_ABSOLUTE, NULL);
- ok(status == STATUS_OBJECT_PATH_SYNTAX_BAD, "RtlCreateRegistryKey unexpected return value: %08x, expected %08x\n", status, STATUS_OBJECT_PATH_SYNTAX_BAD);
+ ok(status == STATUS_OBJECT_PATH_SYNTAX_BAD, "RtlCreateRegistryKey unexpected return value: %08lx, expected %08lx\n", status, STATUS_OBJECT_PATH_SYNTAX_BAD);
status = pRtlCreateRegistryKey(RTL_REGISTRY_ABSOLUTE | RTL_REGISTRY_OPTIONAL, NULL);
- ok(status == STATUS_OBJECT_PATH_SYNTAX_BAD, "RtlCreateRegistryKey unexpected return value: %08x, expected %08x\n", status, STATUS_OBJECT_PATH_SYNTAX_BAD);
+ ok(status == STATUS_OBJECT_PATH_SYNTAX_BAD, "RtlCreateRegistryKey unexpected return value: %08lx, expected %08lx\n", status, STATUS_OBJECT_PATH_SYNTAX_BAD);
status = pRtlCreateRegistryKey(RTL_REGISTRY_ABSOLUTE, empty);
- ok(status == STATUS_OBJECT_PATH_SYNTAX_BAD, "RtlCreateRegistryKey unexpected return value: %08x, expected %08x\n", status, STATUS_OBJECT_PATH_SYNTAX_BAD);
+ ok(status == STATUS_OBJECT_PATH_SYNTAX_BAD, "RtlCreateRegistryKey unexpected return value: %08lx, expected %08lx\n", status, STATUS_OBJECT_PATH_SYNTAX_BAD);
status = pRtlCreateRegistryKey(RTL_REGISTRY_ABSOLUTE | RTL_REGISTRY_OPTIONAL, empty);
- ok(status == STATUS_OBJECT_PATH_SYNTAX_BAD, "RtlCreateRegistryKey unexpected return value: %08x, expected %08x\n", status, STATUS_OBJECT_PATH_SYNTAX_BAD);
+ ok(status == STATUS_OBJECT_PATH_SYNTAX_BAD, "RtlCreateRegistryKey unexpected return value: %08lx, expected %08lx\n", status, STATUS_OBJECT_PATH_SYNTAX_BAD);
status = pRtlCreateRegistryKey(RTL_REGISTRY_ABSOLUTE, str.Buffer);
- ok(status == STATUS_OBJECT_NAME_NOT_FOUND, "RtlCreateRegistryKey unexpected return value: %08x, expected %08x\n", status, STATUS_OBJECT_NAME_NOT_FOUND);
+ ok(status == STATUS_OBJECT_NAME_NOT_FOUND, "RtlCreateRegistryKey unexpected return value: %08lx, expected %08lx\n", status, STATUS_OBJECT_NAME_NOT_FOUND);
status = pRtlCreateRegistryKey(RTL_REGISTRY_ABSOLUTE | RTL_REGISTRY_OPTIONAL, str.Buffer);
- ok(status == STATUS_OBJECT_NAME_NOT_FOUND, "RtlCreateRegistryKey unexpected return value: %08x, expected %08x\n", status, STATUS_OBJECT_NAME_NOT_FOUND);
+ ok(status == STATUS_OBJECT_NAME_NOT_FOUND, "RtlCreateRegistryKey unexpected return value: %08lx, expected %08lx\n", status, STATUS_OBJECT_NAME_NOT_FOUND);
/* both parameters invalid */
status = pRtlCreateRegistryKey(RTL_REGISTRY_USER+1, NULL);
- ok(status == STATUS_INVALID_PARAMETER, "RtlCreateRegistryKey unexpected return value: %08x, expected %08x\n", status, STATUS_INVALID_PARAMETER);
+ ok(status == STATUS_INVALID_PARAMETER, "RtlCreateRegistryKey unexpected return value: %08lx, expected %08lx\n", status, STATUS_INVALID_PARAMETER);
status = pRtlCreateRegistryKey((RTL_REGISTRY_USER+1) | RTL_REGISTRY_OPTIONAL, NULL);
- ok(status == STATUS_INVALID_PARAMETER, "RtlCreateRegistryKey unexpected return value: %08x, expected %08x\n", status, STATUS_INVALID_PARAMETER);
+ ok(status == STATUS_INVALID_PARAMETER, "RtlCreateRegistryKey unexpected return value: %08lx, expected %08lx\n", status, STATUS_INVALID_PARAMETER);
pRtlFreeUnicodeString(&str);
}
1
0
22 Mar '22
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/ntdll/tests/port.c | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/dlls/ntdll/tests/port.c b/dlls/ntdll/tests/port.c
index 2406a63d8f1..9c8c26a8174 100644
--- a/dlls/ntdll/tests/port.c
+++ b/dlls/ntdll/tests/port.c
@@ -16,6 +16,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 <stdio.h>
#include <stdarg.h>
@@ -183,10 +184,10 @@ static void ProcessConnectionRequest(union lpc_message *LpcMessage, PHANDLE pAcc
}
status = pNtAcceptConnectPort(pAcceptPortHandle, 0, &LpcMessage->msg, 1, NULL, NULL);
- ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %x\n", status);
+ ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %lx\n", status);
status = pNtCompleteConnectPort(*pAcceptPortHandle);
- ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %x\n", status);
+ ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %lx\n", status);
}
static void ProcessLpcRequest(HANDLE PortHandle, union lpc_message *LpcMessage)
@@ -202,7 +203,7 @@ static void ProcessLpcRequest(HANDLE PortHandle, union lpc_message *LpcMessage)
strcpy((LPSTR)LpcMessage->msg64.Data, REPLY);
status = pNtReplyPort(PortHandle, &LpcMessage->msg);
- ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %x\n", status);
+ ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %lx\n", status);
ok(LpcMessage->msg64.MessageType == LPC_REQUEST,
"Expected LPC_REQUEST, got %d\n", LpcMessage->msg64.MessageType);
ok(!strcmp((LPSTR)LpcMessage->msg64.Data, REPLY),
@@ -217,7 +218,7 @@ static void ProcessLpcRequest(HANDLE PortHandle, union lpc_message *LpcMessage)
strcpy((LPSTR)LpcMessage->msg.Data, REPLY);
status = pNtReplyPort(PortHandle, &LpcMessage->msg);
- ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %x\n", status);
+ ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %lx\n", status);
ok(LpcMessage->msg.MessageType == LPC_REQUEST,
"Expected LPC_REQUEST, got %d\n", LpcMessage->msg.MessageType);
ok(!strcmp((LPSTR)LpcMessage->msg.Data, REPLY),
@@ -239,11 +240,11 @@ static DWORD WINAPI test_ports_client(LPVOID arg)
sqos.EffectiveOnly = TRUE;
status = pNtConnectPort(&PortHandle, &port, &sqos, 0, 0, &len, NULL, NULL);
- todo_wine ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %x\n", status);
+ todo_wine ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %lx\n", status);
if (status != STATUS_SUCCESS) return 1;
status = pNtRegisterThreadTerminatePort(PortHandle);
- ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %x\n", status);
+ ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %lx\n", status);
if (is_wow64)
{
@@ -256,7 +257,7 @@ static DWORD WINAPI test_ports_client(LPVOID arg)
strcpy((LPSTR)LpcMessage->msg64.Data, REQUEST1);
status = pNtRequestPort(PortHandle, &LpcMessage->msg);
- ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %x\n", status);
+ ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %lx\n", status);
ok(LpcMessage->msg64.MessageType == 0, "Expected 0, got %d\n", LpcMessage->msg64.MessageType);
ok(!strcmp((LPSTR)LpcMessage->msg64.Data, REQUEST1),
"Expected %s, got %s\n", REQUEST1, LpcMessage->msg64.Data);
@@ -269,7 +270,7 @@ static DWORD WINAPI test_ports_client(LPVOID arg)
/* Send the message and wait for the reply */
status = pNtRequestWaitReplyPort(PortHandle, &LpcMessage->msg, &out->msg);
- ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %x\n", status);
+ ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %lx\n", status);
ok(!strcmp((LPSTR)out->msg64.Data, REPLY), "Expected %s, got %s\n", REPLY, out->msg64.Data);
ok(out->msg64.MessageType == LPC_REPLY, "Expected LPC_REPLY, got %d\n", out->msg64.MessageType);
}
@@ -284,7 +285,7 @@ static DWORD WINAPI test_ports_client(LPVOID arg)
strcpy((LPSTR)LpcMessage->msg.Data, REQUEST1);
status = pNtRequestPort(PortHandle, &LpcMessage->msg);
- ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %x\n", status);
+ ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %lx\n", status);
ok(LpcMessage->msg.MessageType == 0, "Expected 0, got %d\n", LpcMessage->msg.MessageType);
ok(!strcmp((LPSTR)LpcMessage->msg.Data, REQUEST1),
"Expected %s, got %s\n", REQUEST1, LpcMessage->msg.Data);
@@ -297,7 +298,7 @@ static DWORD WINAPI test_ports_client(LPVOID arg)
/* Send the message and wait for the reply */
status = pNtRequestWaitReplyPort(PortHandle, &LpcMessage->msg, &out->msg);
- ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %x\n", status);
+ ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %lx\n", status);
ok(!strcmp((LPSTR)out->msg.Data, REPLY), "Expected %s, got %s\n", REPLY, out->msg.Data);
ok(out->msg.MessageType == LPC_REPLY, "Expected LPC_REPLY, got %d\n", out->msg.MessageType);
}
@@ -324,7 +325,7 @@ static void test_ports_server( HANDLE PortHandle )
status = pNtReplyWaitReceivePort(PortHandle, NULL, NULL, &LpcMessage->msg);
todo_wine
{
- ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %d(%x)\n", status, status);
+ ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %ld(%lx)\n", status, status);
}
/* STATUS_INVALID_HANDLE: win2k without admin rights will perform an
* endless loop here
@@ -384,7 +385,7 @@ START_TEST(port)
status = pNtCreatePort(&port_handle, &obj, 100, 100, 0);
if (status == STATUS_ACCESS_DENIED) skip("Not enough rights\n");
- else ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %d\n", status);
+ else ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %ld\n", status);
if (status == STATUS_SUCCESS)
{
1
0
22 Mar '22
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/ntdll/tests/pipe.c | 749 ++++++++++++++++++++++++-----------------------
1 file changed, 375 insertions(+), 374 deletions(-)
diff --git a/dlls/ntdll/tests/pipe.c b/dlls/ntdll/tests/pipe.c
index 6940e0020b7..38d1d92b4a9 100644
--- a/dlls/ntdll/tests/pipe.c
+++ b/dlls/ntdll/tests/pipe.c
@@ -16,6 +16,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 <stdio.h>
#include <stdarg.h>
@@ -128,8 +129,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);
}
@@ -201,36 +202,36 @@ static void test_create_invalid(void)
/* create a pipe with FILE_OVERWRITE */
res = pNtCreateNamedPipeFile(&handle, FILE_READ_ATTRIBUTES | SYNCHRONIZE, &attr, &iosb, FILE_SHARE_READ, 4 /*FILE_OVERWRITE*/,
0, 1, 0, 0, 0xFFFFFFFF, 500, 500, &timeout);
- todo_wine ok(res == STATUS_INVALID_PARAMETER, "NtCreateNamedPipeFile returned %x\n", res);
+ todo_wine ok(res == STATUS_INVALID_PARAMETER, "NtCreateNamedPipeFile returned %lx\n", res);
if (!res)
CloseHandle(handle);
/* create a pipe with FILE_OVERWRITE_IF */
res = pNtCreateNamedPipeFile(&handle, FILE_READ_ATTRIBUTES | SYNCHRONIZE, &attr, &iosb, FILE_SHARE_READ, 5 /*FILE_OVERWRITE_IF*/,
0, 1, 0, 0, 0xFFFFFFFF, 500, 500, &timeout);
- todo_wine ok(res == STATUS_INVALID_PARAMETER, "NtCreateNamedPipeFile returned %x\n", res);
+ todo_wine ok(res == STATUS_INVALID_PARAMETER, "NtCreateNamedPipeFile returned %lx\n", res);
if (!res)
CloseHandle(handle);
/* create a pipe with sharing = 0 */
res = pNtCreateNamedPipeFile(&handle, FILE_READ_ATTRIBUTES | SYNCHRONIZE, &attr, &iosb, 0, 2 /*FILE_CREATE*/,
0, 1, 0, 0, 0xFFFFFFFF, 500, 500, &timeout);
- ok(res == STATUS_INVALID_PARAMETER, "NtCreateNamedPipeFile returned %x\n", res);
+ ok(res == STATUS_INVALID_PARAMETER, "NtCreateNamedPipeFile returned %lx\n", res);
if (!res)
CloseHandle(handle);
/* create a pipe without r/w access */
res = pNtCreateNamedPipeFile(&handle, SYNCHRONIZE, &attr, &iosb, FILE_SHARE_READ | FILE_SHARE_WRITE, 2 /*FILE_CREATE*/,
0, 1, 0, 0, 0xFFFFFFFF, 500, 500, &timeout);
- ok(!res, "NtCreateNamedPipeFile returned %x\n", res);
+ ok(!res, "NtCreateNamedPipeFile returned %lx\n", res);
res = pNtQueryInformationFile(handle, &iosb, &info, sizeof(info), FilePipeLocalInformation);
- ok(res == STATUS_ACCESS_DENIED, "NtQueryInformationFile returned %x\n", res);
+ ok(res == STATUS_ACCESS_DENIED, "NtQueryInformationFile returned %lx\n", res);
/* test FILE_CREATE creation disposition */
res = pNtCreateNamedPipeFile(&handle2, SYNCHRONIZE, &attr, &iosb, FILE_SHARE_READ | FILE_SHARE_WRITE, 2 /*FILE_CREATE*/,
0, 1, 0, 0, 0xFFFFFFFF, 500, 500, &timeout);
- todo_wine ok(res == STATUS_ACCESS_DENIED, "NtCreateNamedPipeFile returned %x\n", res);
+ todo_wine ok(res == STATUS_ACCESS_DENIED, "NtCreateNamedPipeFile returned %lx\n", res);
if (!res)
CloseHandle(handle2);
@@ -257,28 +258,28 @@ static void test_create(void)
res = create_pipe(&hserver, 0, sharing[j], 0);
if (res) {
- ok(0, "NtCreateNamedPipeFile returned %x, sharing: %x\n", res, sharing[j]);
+ ok(0, "NtCreateNamedPipeFile returned %lx, sharing: %lx\n", res, sharing[j]);
continue;
}
res = listen_pipe(hserver, hEvent, &iosb, FALSE);
- ok(res == STATUS_PENDING, "NtFsControlFile returned %x\n", res);
+ ok(res == STATUS_PENDING, "NtFsControlFile returned %lx\n", res);
res = pNtQueryInformationFile(hserver, &iosb, &info, sizeof(info), FilePipeLocalInformation);
- ok(!res, "NtQueryInformationFile for server returned %x, sharing: %x\n", res, sharing[j]);
- ok(info.NamedPipeConfiguration == pipe_config[j], "wrong duplex status for pipe: %d, expected %d\n",
+ ok(!res, "NtQueryInformationFile for server returned %lx, sharing: %lx\n", res, sharing[j]);
+ ok(info.NamedPipeConfiguration == pipe_config[j], "wrong duplex status for pipe: %ld, expected %ld\n",
info.NamedPipeConfiguration, pipe_config[j]);
hclient = CreateFileW(testpipe, access[k], 0, 0, OPEN_EXISTING, 0, 0);
if (hclient != INVALID_HANDLE_VALUE) {
res = pNtQueryInformationFile(hclient, &iosb, &info, sizeof(info), FilePipeLocalInformation);
- ok(!res, "NtQueryInformationFile for client returned %x, access: %x, sharing: %x\n",
+ ok(!res, "NtQueryInformationFile for client returned %lx, access: %lx, sharing: %lx\n",
res, access[k], sharing[j]);
- ok(info.NamedPipeConfiguration == pipe_config[j], "wrong duplex status for pipe: %d, expected %d\n",
+ ok(info.NamedPipeConfiguration == pipe_config[j], "wrong duplex status for pipe: %ld, expected %ld\n",
info.NamedPipeConfiguration, pipe_config[j]);
res = listen_pipe(hclient, hEvent, &iosb, FALSE);
- ok(res == STATUS_ILLEGAL_FUNCTION, "expected STATUS_ILLEGAL_FUNCTION, got %x\n", res);
+ ok(res == STATUS_ILLEGAL_FUNCTION, "expected STATUS_ILLEGAL_FUNCTION, got %lx\n", res);
CloseHandle(hclient);
}
@@ -288,10 +289,10 @@ static void test_create(void)
should_succeed &= !!(sharing[j] & FILE_SHARE_READ);
if (should_succeed)
- ok(hclient != INVALID_HANDLE_VALUE, "CreateFile failed for sharing %x, access: %x, GetLastError: %d\n",
+ ok(hclient != INVALID_HANDLE_VALUE, "CreateFile failed for sharing %lx, access: %lx, GetLastError: %ld\n",
sharing[j], access[k], GetLastError());
else
- ok(hclient == INVALID_HANDLE_VALUE, "CreateFile succeeded for sharing %x, access: %x\n", sharing[j], access[k]);
+ ok(hclient == INVALID_HANDLE_VALUE, "CreateFile succeeded for sharing %lx, access: %lx\n", sharing[j], access[k]);
CloseHandle(hserver);
}
@@ -308,20 +309,20 @@ static void test_overlapped(void)
NTSTATUS res;
hEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
- ok(hEvent != INVALID_HANDLE_VALUE, "can't create event, GetLastError: %x\n", GetLastError());
+ ok(hEvent != INVALID_HANDLE_VALUE, "can't create event, GetLastError: %lx\n", GetLastError());
res = create_pipe(&hPipe, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, 0 /* OVERLAPPED */);
- ok(!res, "NtCreateNamedPipeFile returned %x\n", res);
+ ok(!res, "NtCreateNamedPipeFile returned %lx\n", res);
memset(&iosb, 0x55, sizeof(iosb));
res = listen_pipe(hPipe, hEvent, &iosb, TRUE);
- ok(res == STATUS_PENDING, "NtFsControlFile returned %x\n", res);
- ok(U(iosb).Status == 0x55555555, "iosb.Status got changed to %x\n", U(iosb).Status);
+ ok(res == STATUS_PENDING, "NtFsControlFile returned %lx\n", res);
+ ok(U(iosb).Status == 0x55555555, "iosb.Status got changed to %lx\n", U(iosb).Status);
hClient = CreateFileW(testpipe, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, 0, 0);
- ok(hClient != INVALID_HANDLE_VALUE, "can't open pipe, GetLastError: %x\n", GetLastError());
+ ok(hClient != INVALID_HANDLE_VALUE, "can't open pipe, GetLastError: %lx\n", GetLastError());
- ok(U(iosb).Status == 0, "Wrong iostatus %x\n", U(iosb).Status);
+ ok(U(iosb).Status == 0, "Wrong iostatus %lx\n", U(iosb).Status);
ok(WaitForSingleObject(hEvent, 0) == 0, "hEvent not signaled\n");
ok(!ioapc_called, "IOAPC ran too early\n");
@@ -334,19 +335,19 @@ static void test_overlapped(void)
CloseHandle(hClient);
res = create_pipe(&hPipe, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, 0 /* OVERLAPPED */);
- ok(!res, "NtCreateNamedPipeFile returned %x\n", res);
+ ok(!res, "NtCreateNamedPipeFile returned %lx\n", res);
hClient = CreateFileW(testpipe, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, 0, 0);
ok(hClient != INVALID_HANDLE_VALUE || broken(GetLastError() == ERROR_PIPE_BUSY) /* > Win 8 */,
- "can't open pipe, GetLastError: %x\n", GetLastError());
+ "can't open pipe, GetLastError: %lx\n", GetLastError());
if (hClient != INVALID_HANDLE_VALUE)
{
SetEvent(hEvent);
memset(&iosb, 0x55, sizeof(iosb));
res = listen_pipe(hPipe, hEvent, &iosb, TRUE);
- ok(res == STATUS_PIPE_CONNECTED, "NtFsControlFile returned %x\n", res);
- ok(U(iosb).Status == 0x55555555, "iosb.Status got changed to %x\n", U(iosb).Status);
+ ok(res == STATUS_PIPE_CONNECTED, "NtFsControlFile returned %lx\n", res);
+ ok(U(iosb).Status == 0x55555555, "iosb.Status got changed to %lx\n", U(iosb).Status);
ok(!is_signaled(hEvent), "hEvent not signaled\n");
CloseHandle(hClient);
@@ -373,7 +374,7 @@ static DWORD WINAPI thread(PVOID main_thread)
DWORD ret;
userapc_called = FALSE;
ret = pQueueUserAPC(&userapc, main_thread, 0);
- ok(ret, "can't queue user apc, GetLastError: %x\n", GetLastError());
+ ok(ret, "can't queue user apc, GetLastError: %lx\n", GetLastError());
CloseHandle(main_thread);
}
@@ -403,35 +404,35 @@ static void test_alertable(void)
memset(&iosb, 0x55, sizeof(iosb));
hEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
- ok(hEvent != INVALID_HANDLE_VALUE, "can't create event, GetLastError: %x\n", GetLastError());
+ ok(hEvent != INVALID_HANDLE_VALUE, "can't create event, GetLastError: %lx\n", GetLastError());
res = create_pipe(&hPipe, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_SYNCHRONOUS_IO_ALERT);
- ok(!res, "NtCreateNamedPipeFile returned %x\n", res);
+ ok(!res, "NtCreateNamedPipeFile returned %lx\n", res);
/* queue an user apc before calling listen */
userapc_called = FALSE;
ret = pQueueUserAPC(&userapc, GetCurrentThread(), 0);
- ok(ret, "can't queue user apc, GetLastError: %x\n", GetLastError());
+ ok(ret, "can't queue user apc, GetLastError: %lx\n", GetLastError());
res = listen_pipe(hPipe, hEvent, &iosb, TRUE);
- todo_wine ok(res == STATUS_CANCELLED, "NtFsControlFile returned %x\n", res);
+ todo_wine ok(res == STATUS_CANCELLED, "NtFsControlFile returned %lx\n", res);
ok(userapc_called, "user apc didn't run\n");
- ok(U(iosb).Status == 0x55555555, "iosb.Status got changed to %x\n", U(iosb).Status);
+ ok(U(iosb).Status == 0x55555555, "iosb.Status got changed to %lx\n", U(iosb).Status);
ok(WaitForSingleObjectEx(hEvent, 0, TRUE) == WAIT_TIMEOUT, "hEvent signaled\n");
ok(!ioapc_called, "IOAPC ran\n");
/* queue an user apc from a different thread */
hThread = CreateThread(NULL, 0, &thread, pOpenThread(MAXIMUM_ALLOWED, FALSE, GetCurrentThreadId()), 0, 0);
- ok(hThread != INVALID_HANDLE_VALUE, "can't create thread, GetLastError: %x\n", GetLastError());
+ ok(hThread != INVALID_HANDLE_VALUE, "can't create thread, GetLastError: %lx\n", GetLastError());
/* wine_todo: the earlier NtFsControlFile call gets cancelled after the pipe gets set into listen state
instead of before, so this NtFsControlFile will fail STATUS_INVALID_HANDLE */
res = listen_pipe(hPipe, hEvent, &iosb, TRUE);
- todo_wine ok(res == STATUS_CANCELLED, "NtFsControlFile returned %x\n", res);
+ todo_wine ok(res == STATUS_CANCELLED, "NtFsControlFile returned %lx\n", res);
ok(userapc_called, "user apc didn't run\n");
- ok(U(iosb).Status == 0x55555555, "iosb.Status got changed to %x\n", U(iosb).Status);
+ ok(U(iosb).Status == 0x55555555, "iosb.Status got changed to %lx\n", U(iosb).Status);
ok(WaitForSingleObjectEx(hEvent, 0, TRUE) == WAIT_TIMEOUT, "hEvent signaled\n");
ok(!ioapc_called, "IOAPC ran\n");
@@ -446,13 +447,13 @@ static void test_alertable(void)
/* finally try without an apc */
hThread = CreateThread(NULL, 0, &thread, 0, 0, 0);
- ok(hThread != INVALID_HANDLE_VALUE, "can't create thread, GetLastError: %x\n", GetLastError());
+ ok(hThread != INVALID_HANDLE_VALUE, "can't create thread, GetLastError: %lx\n", GetLastError());
res = listen_pipe(hPipe, hEvent, &iosb, TRUE);
- ok(!res, "NtFsControlFile returned %x\n", res);
+ ok(!res, "NtFsControlFile returned %lx\n", res);
ok(open_succeeded, "couldn't open client side pipe\n");
- ok(!U(iosb).Status, "Wrong iostatus %x\n", U(iosb).Status);
+ ok(!U(iosb).Status, "Wrong iostatus %lx\n", U(iosb).Status);
ok(WaitForSingleObject(hEvent, 0) == 0, "hEvent not signaled\n");
WaitForSingleObject(hThread, INFINITE);
@@ -473,23 +474,23 @@ static void test_nonalertable(void)
memset(&iosb, 0x55, sizeof(iosb));
hEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
- ok(hEvent != INVALID_HANDLE_VALUE, "can't create event, GetLastError: %x\n", GetLastError());
+ ok(hEvent != INVALID_HANDLE_VALUE, "can't create event, GetLastError: %lx\n", GetLastError());
res = create_pipe(&hPipe, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_SYNCHRONOUS_IO_NONALERT);
- ok(!res, "NtCreateNamedPipeFile returned %x\n", res);
+ ok(!res, "NtCreateNamedPipeFile returned %lx\n", res);
hThread = CreateThread(NULL, 0, &thread, 0, 0, 0);
- ok(hThread != INVALID_HANDLE_VALUE, "can't create thread, GetLastError: %x\n", GetLastError());
+ ok(hThread != INVALID_HANDLE_VALUE, "can't create thread, GetLastError: %lx\n", GetLastError());
userapc_called = FALSE;
ret = pQueueUserAPC(&userapc, GetCurrentThread(), 0);
- ok(ret, "can't queue user apc, GetLastError: %x\n", GetLastError());
+ ok(ret, "can't queue user apc, GetLastError: %lx\n", GetLastError());
res = listen_pipe(hPipe, hEvent, &iosb, TRUE);
- ok(!res, "NtFsControlFile returned %x\n", res);
+ ok(!res, "NtFsControlFile returned %lx\n", res);
ok(open_succeeded, "couldn't open client side pipe\n");
- ok(!U(iosb).Status, "Wrong iostatus %x\n", U(iosb).Status);
+ ok(!U(iosb).Status, "Wrong iostatus %lx\n", U(iosb).Status);
ok(WaitForSingleObject(hEvent, 0) == 0, "hEvent not signaled\n");
ok(!ioapc_called, "IOAPC ran too early\n");
@@ -515,20 +516,20 @@ static void test_cancelio(void)
NTSTATUS res;
hEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
- ok(hEvent != INVALID_HANDLE_VALUE, "can't create event, GetLastError: %x\n", GetLastError());
+ ok(hEvent != INVALID_HANDLE_VALUE, "can't create event, GetLastError: %lx\n", GetLastError());
res = create_pipe(&hPipe, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, 0 /* OVERLAPPED */);
- ok(!res, "NtCreateNamedPipeFile returned %x\n", res);
+ ok(!res, "NtCreateNamedPipeFile returned %lx\n", res);
memset(&iosb, 0x55, sizeof(iosb));
res = listen_pipe(hPipe, hEvent, &iosb, TRUE);
- ok(res == STATUS_PENDING, "NtFsControlFile returned %x\n", res);
+ ok(res == STATUS_PENDING, "NtFsControlFile returned %lx\n", res);
res = pNtCancelIoFile(hPipe, &cancel_sb);
- ok(!res, "NtCancelIoFile returned %x\n", res);
+ ok(!res, "NtCancelIoFile returned %lx\n", res);
- ok(U(iosb).Status == STATUS_CANCELLED, "Wrong iostatus %x\n", U(iosb).Status);
+ ok(U(iosb).Status == STATUS_CANCELLED, "Wrong iostatus %lx\n", U(iosb).Status);
ok(WaitForSingleObject(hEvent, 0) == 0, "hEvent not signaled\n");
ok(!ioapc_called, "IOAPC ran too early\n");
@@ -542,16 +543,16 @@ static void test_cancelio(void)
if (pNtCancelIoFileEx)
{
res = create_pipe(&hPipe, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, 0 /* OVERLAPPED */);
- ok(!res, "NtCreateNamedPipeFile returned %x\n", res);
+ ok(!res, "NtCreateNamedPipeFile returned %lx\n", res);
memset(&iosb, 0x55, sizeof(iosb));
res = listen_pipe(hPipe, hEvent, &iosb, FALSE);
- ok(res == STATUS_PENDING, "NtFsControlFile returned %x\n", res);
+ ok(res == STATUS_PENDING, "NtFsControlFile returned %lx\n", res);
res = pNtCancelIoFileEx(hPipe, &iosb, &cancel_sb);
- ok(!res, "NtCancelIoFileEx returned %x\n", res);
+ ok(!res, "NtCancelIoFileEx returned %lx\n", res);
- ok(U(iosb).Status == STATUS_CANCELLED, "Wrong iostatus %x\n", U(iosb).Status);
+ ok(U(iosb).Status == STATUS_CANCELLED, "Wrong iostatus %lx\n", U(iosb).Status);
ok(WaitForSingleObject(hEvent, 0) == 0, "hEvent not signaled\n");
CloseHandle(hPipe);
@@ -571,10 +572,10 @@ static void _check_pipe_handle_state(int line, HANDLE handle, ULONG read, ULONG
{
memset(&fpi, 0x55, sizeof(fpi));
res = pNtQueryInformationFile(handle, &iosb, &fpi, sizeof(fpi), FilePipeInformation);
- ok_(__FILE__, line)(!res, "NtQueryInformationFile returned %x\n", res);
- ok_(__FILE__, line)(fpi.ReadMode == read, "Unexpected ReadMode, expected %x, got %x\n",
+ ok_(__FILE__, line)(!res, "NtQueryInformationFile returned %lx\n", res);
+ ok_(__FILE__, line)(fpi.ReadMode == read, "Unexpected ReadMode, expected %lx, got %lx\n",
read, fpi.ReadMode);
- ok_(__FILE__, line)(fpi.CompletionMode == completion, "Unexpected CompletionMode, expected %x, got %x\n",
+ ok_(__FILE__, line)(fpi.CompletionMode == completion, "Unexpected CompletionMode, expected %lx, got %lx\n",
completion, fpi.CompletionMode);
}
}
@@ -604,24 +605,24 @@ static void test_filepipeinfo(void)
/* test with INVALID_HANDLE_VALUE */
res = pNtQueryInformationFile(INVALID_HANDLE_VALUE, &iosb, &fpi, sizeof(fpi), FilePipeInformation);
- ok(res == STATUS_OBJECT_TYPE_MISMATCH, "NtQueryInformationFile returned %x\n", res);
+ ok(res == STATUS_OBJECT_TYPE_MISMATCH, "NtQueryInformationFile returned %lx\n", res);
fpi.ReadMode = 0;
fpi.CompletionMode = 0;
res = pNtSetInformationFile(INVALID_HANDLE_VALUE, &iosb, &fpi, sizeof(fpi), FilePipeInformation);
- ok(res == STATUS_OBJECT_TYPE_MISMATCH, "NtSetInformationFile returned %x\n", res);
+ ok(res == STATUS_OBJECT_TYPE_MISMATCH, "NtSetInformationFile returned %lx\n", res);
/* server end with read-only attributes */
res = pNtCreateNamedPipeFile(&hServer, FILE_READ_ATTRIBUTES | SYNCHRONIZE, &attr, &iosb,
FILE_SHARE_READ | FILE_SHARE_WRITE, 2 /* FILE_CREATE */,
0, 0, 0, 1, 0xFFFFFFFF, 500, 500, &timeout);
- ok(!res, "NtCreateNamedPipeFile returned %x\n", res);
+ ok(!res, "NtCreateNamedPipeFile returned %lx\n", res);
check_pipe_handle_state(hServer, 0, 1);
hClient = CreateFileW(testpipe, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, 0, 0);
ok(hClient != INVALID_HANDLE_VALUE || broken(GetLastError() == ERROR_PIPE_BUSY) /* > Win 8 */,
- "can't open pipe, GetLastError: %x\n", GetLastError());
+ "can't open pipe, GetLastError: %lx\n", GetLastError());
check_pipe_handle_state(hServer, 0, 1);
check_pipe_handle_state(hClient, 0, 0);
@@ -629,7 +630,7 @@ static void test_filepipeinfo(void)
fpi.ReadMode = 0;
fpi.CompletionMode = 0;
res = pNtSetInformationFile(hServer, &iosb, &fpi, sizeof(fpi), FilePipeInformation);
- ok(res == STATUS_ACCESS_DENIED, "NtSetInformationFile returned %x\n", res);
+ ok(res == STATUS_ACCESS_DENIED, "NtSetInformationFile returned %lx\n", res);
check_pipe_handle_state(hServer, 0, 1);
check_pipe_handle_state(hClient, 0, 0);
@@ -637,7 +638,7 @@ static void test_filepipeinfo(void)
fpi.ReadMode = 1; /* invalid on a byte stream pipe */
fpi.CompletionMode = 1;
res = pNtSetInformationFile(hServer, &iosb, &fpi, sizeof(fpi), FilePipeInformation);
- ok(res == STATUS_ACCESS_DENIED, "NtSetInformationFile returned %x\n", res);
+ ok(res == STATUS_ACCESS_DENIED, "NtSetInformationFile returned %lx\n", res);
check_pipe_handle_state(hServer, 0, 1);
check_pipe_handle_state(hClient, 0, 0);
@@ -647,7 +648,7 @@ static void test_filepipeinfo(void)
fpi.ReadMode = 1; /* invalid on a byte stream pipe */
fpi.CompletionMode = 1;
res = pNtSetInformationFile(hClient, &iosb, &fpi, sizeof(fpi), FilePipeInformation);
- ok(res == STATUS_INVALID_PARAMETER, "NtSetInformationFile returned %x\n", res);
+ ok(res == STATUS_INVALID_PARAMETER, "NtSetInformationFile returned %lx\n", res);
}
check_pipe_handle_state(hServer, 0, 1);
@@ -658,7 +659,7 @@ static void test_filepipeinfo(void)
fpi.ReadMode = 0;
fpi.CompletionMode = 1;
res = pNtSetInformationFile(hClient, &iosb, &fpi, sizeof(fpi), FilePipeInformation);
- ok(!res, "NtSetInformationFile returned %x\n", res);
+ ok(!res, "NtSetInformationFile returned %lx\n", res);
}
check_pipe_handle_state(hServer, 0, 1);
@@ -669,12 +670,12 @@ static void test_filepipeinfo(void)
fpi.ReadMode = 0;
fpi.CompletionMode = 2; /* not in range 0-1 */
res = pNtSetInformationFile(hClient, &iosb, &fpi, sizeof(fpi), FilePipeInformation);
- ok(res == STATUS_INVALID_PARAMETER || broken(!res) /* < Vista */, "NtSetInformationFile returned %x\n", res);
+ ok(res == STATUS_INVALID_PARAMETER || broken(!res) /* < Vista */, "NtSetInformationFile returned %lx\n", res);
fpi.ReadMode = 2; /* not in range 0-1 */
fpi.CompletionMode = 0;
res = pNtSetInformationFile(hClient, &iosb, &fpi, sizeof(fpi), FilePipeInformation);
- ok(res == STATUS_INVALID_PARAMETER || broken(!res) /* < Vista */, "NtSetInformationFile returned %x\n", res);
+ ok(res == STATUS_INVALID_PARAMETER || broken(!res) /* < Vista */, "NtSetInformationFile returned %lx\n", res);
}
CloseHandle(hClient);
@@ -684,7 +685,7 @@ static void test_filepipeinfo(void)
fpi.ReadMode = 0;
fpi.CompletionMode = 0;
res = pNtSetInformationFile(hServer, &iosb, &fpi, sizeof(fpi), FilePipeInformation);
- ok(res == STATUS_ACCESS_DENIED, "NtSetInformationFile returned %x\n", res);
+ ok(res == STATUS_ACCESS_DENIED, "NtSetInformationFile returned %lx\n", res);
CloseHandle(hServer);
@@ -692,13 +693,13 @@ static void test_filepipeinfo(void)
res = pNtCreateNamedPipeFile(&hServer, FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES | SYNCHRONIZE, &attr, &iosb,
FILE_SHARE_READ | FILE_SHARE_WRITE, 2 /* FILE_CREATE */,
0, 1, 1, 0, 0xFFFFFFFF, 500, 500, &timeout);
- ok(!res, "NtCreateNamedPipeFile returned %x\n", res);
+ ok(!res, "NtCreateNamedPipeFile returned %lx\n", res);
check_pipe_handle_state(hServer, 1, 0);
hClient = CreateFileW(testpipe, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, 0, 0);
ok(hClient != INVALID_HANDLE_VALUE || broken(GetLastError() == ERROR_PIPE_BUSY) /* > Win 8 */,
- "can't open pipe, GetLastError: %x\n", GetLastError());
+ "can't open pipe, GetLastError: %lx\n", GetLastError());
check_pipe_handle_state(hServer, 1, 0);
check_pipe_handle_state(hClient, 0, 0);
@@ -708,7 +709,7 @@ static void test_filepipeinfo(void)
fpi.ReadMode = 1;
fpi.CompletionMode = 1;
res = pNtSetInformationFile(hClient, &iosb, &fpi, sizeof(fpi), FilePipeInformation);
- ok(!res, "NtSetInformationFile returned %x\n", res);
+ ok(!res, "NtSetInformationFile returned %lx\n", res);
}
check_pipe_handle_state(hServer, 1, 0);
@@ -717,7 +718,7 @@ static void test_filepipeinfo(void)
fpi.ReadMode = 0;
fpi.CompletionMode = 1;
res = pNtSetInformationFile(hServer, &iosb, &fpi, sizeof(fpi), FilePipeInformation);
- ok(!res, "NtSetInformationFile returned %x\n", res);
+ ok(!res, "NtSetInformationFile returned %lx\n", res);
check_pipe_handle_state(hServer, 0, 1);
check_pipe_handle_state(hClient, 1, 1);
@@ -727,12 +728,12 @@ static void test_filepipeinfo(void)
fpi.ReadMode = 0;
fpi.CompletionMode = 2; /* not in range 0-1 */
res = pNtSetInformationFile(hClient, &iosb, &fpi, sizeof(fpi), FilePipeInformation);
- ok(res == STATUS_INVALID_PARAMETER || broken(!res) /* < Vista */, "NtSetInformationFile returned %x\n", res);
+ ok(res == STATUS_INVALID_PARAMETER || broken(!res) /* < Vista */, "NtSetInformationFile returned %lx\n", res);
fpi.ReadMode = 2; /* not in range 0-1 */
fpi.CompletionMode = 0;
res = pNtSetInformationFile(hClient, &iosb, &fpi, sizeof(fpi), FilePipeInformation);
- ok(res == STATUS_INVALID_PARAMETER || broken(!res) /* < Vista */, "NtSetInformationFile returned %x\n", res);
+ ok(res == STATUS_INVALID_PARAMETER || broken(!res) /* < Vista */, "NtSetInformationFile returned %lx\n", res);
}
CloseHandle(hClient);
@@ -742,7 +743,7 @@ static void test_filepipeinfo(void)
fpi.ReadMode = 1;
fpi.CompletionMode = 0;
res = pNtSetInformationFile(hServer, &iosb, &fpi, sizeof(fpi), FilePipeInformation);
- ok(!res, "NtSetInformationFile returned %x\n", res);
+ ok(!res, "NtSetInformationFile returned %lx\n", res);
check_pipe_handle_state(hServer, 1, 0);
@@ -752,27 +753,27 @@ static void test_filepipeinfo(void)
FILE_READ_DATA | FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES | SYNCHRONIZE,
&attr, &iosb, FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_CREATE,
0, 1, 1, 0, 0xFFFFFFFF, 500, 500, &timeout);
- ok(!res, "NtCreateNamedPipeFile returned %x\n", res);
+ ok(!res, "NtCreateNamedPipeFile returned %lx\n", res);
res = NtCreateFile(&hClient, SYNCHRONIZE, &attr, &iosb, NULL, 0,
FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN, 0, NULL, 0 );
- ok(!res, "NtCreateFile returned %x\n", res);
+ ok(!res, "NtCreateFile returned %lx\n", res);
test_file_access(hClient, SYNCHRONIZE);
res = pNtQueryInformationFile(hClient, &iosb, &local_info, sizeof(local_info),
FilePipeLocalInformation);
ok(res == STATUS_ACCESS_DENIED,
- "NtQueryInformationFile(FilePipeLocalInformation) returned: %x\n", res);
+ "NtQueryInformationFile(FilePipeLocalInformation) returned: %lx\n", res);
res = pNtQueryInformationFile(hClient, &iosb, &local_info, sizeof(local_info),
FilePipeInformation);
ok(res == STATUS_ACCESS_DENIED,
- "NtQueryInformationFile(FilePipeInformation) returned: %x\n", res);
+ "NtQueryInformationFile(FilePipeInformation) returned: %lx\n", res);
res = pNtQueryInformationFile(hClient, &iosb, &local_info, sizeof(local_info),
FileNameInformation);
- ok(res == STATUS_SUCCESS, "NtQueryInformationFile(FileNameInformation) returned: %x\n", res);
+ ok(res == STATUS_SUCCESS, "NtQueryInformationFile(FileNameInformation) returned: %lx\n", res);
CloseHandle(hClient);
CloseHandle(hServer);
@@ -782,7 +783,7 @@ static void WINAPI apc( void *arg, IO_STATUS_BLOCK *iosb, ULONG reserved )
{
int *count = arg;
(*count)++;
- ok( !reserved, "reserved is not 0: %x\n", reserved );
+ ok( !reserved, "reserved is not 0: %lx\n", reserved );
}
static void test_peek(HANDLE pipe)
@@ -794,16 +795,16 @@ static void test_peek(HANDLE pipe)
memset(&iosb, 0x55, sizeof(iosb));
status = NtFsControlFile(pipe, NULL, NULL, NULL, &iosb, FSCTL_PIPE_PEEK, NULL, 0, &buf, sizeof(buf));
- ok(!status || status == STATUS_PENDING, "NtFsControlFile failed: %x\n", status);
- ok(!iosb.Status, "iosb.Status = %x\n", iosb.Status);
- ok(buf.ReadDataAvailable == 1, "ReadDataAvailable = %u\n", buf.ReadDataAvailable);
+ ok(!status || status == STATUS_PENDING, "NtFsControlFile failed: %lx\n", status);
+ ok(!iosb.Status, "iosb.Status = %lx\n", iosb.Status);
+ ok(buf.ReadDataAvailable == 1, "ReadDataAvailable = %lu\n", buf.ReadDataAvailable);
ResetEvent(event);
memset(&iosb, 0x55, sizeof(iosb));
status = NtFsControlFile(pipe, event, NULL, NULL, &iosb, FSCTL_PIPE_PEEK, NULL, 0, &buf, sizeof(buf));
- ok(!status || status == STATUS_PENDING, "NtFsControlFile failed: %x\n", status);
- ok(buf.ReadDataAvailable == 1, "ReadDataAvailable = %u\n", buf.ReadDataAvailable);
- ok(!iosb.Status, "iosb.Status = %x\n", iosb.Status);
+ ok(!status || status == STATUS_PENDING, "NtFsControlFile failed: %lx\n", status);
+ ok(buf.ReadDataAvailable == 1, "ReadDataAvailable = %lu\n", buf.ReadDataAvailable);
+ ok(!iosb.Status, "iosb.Status = %lx\n", iosb.Status);
ok(is_signaled(event), "event is not signaled\n");
CloseHandle(event);
@@ -823,7 +824,7 @@ static BOOL create_pipe_pair( HANDLE *read, HANDLE *write, ULONG flags, ULONG ty
| (flags & PIPE_ACCESS_OUTBOUND ? GENERIC_READ : 0)
| FILE_WRITE_ATTRIBUTES, 0,
NULL, OPEN_EXISTING, flags & FILE_FLAG_OVERLAPPED, 0);
- ok(client != INVALID_HANDLE_VALUE, "CreateFile failed (%d)\n", GetLastError());
+ ok(client != INVALID_HANDLE_VALUE, "CreateFile failed (%ld)\n", GetLastError());
if ((type & PIPE_READMODE_MESSAGE) && (flags & PIPE_ACCESS_OUTBOUND))
{
@@ -862,17 +863,17 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
iosb.Information = 0xdeadbeef;
ok( is_signaled( read ), "read handle is not signaled\n" );
status = NtReadFile( read, event, apc, &apc_count, &iosb, buffer, 1, NULL, NULL );
- ok( status == STATUS_PENDING, "wrong status %x\n", status );
+ ok( status == STATUS_PENDING, "wrong status %lx\n", status );
ok( !is_signaled( read ), "read handle is signaled\n" );
ok( !is_signaled( event ), "event is signaled\n" );
- ok( U(iosb).Status == 0xdeadbabe, "wrong status %x\n", U(iosb).Status );
- ok( iosb.Information == 0xdeadbeef, "wrong info %lu\n", iosb.Information );
+ ok( U(iosb).Status == 0xdeadbabe, "wrong status %lx\n", U(iosb).Status );
+ ok( iosb.Information == 0xdeadbeef, "wrong info %Iu\n", iosb.Information );
ok( !apc_count, "apc was called\n" );
ret = WriteFile( write, buffer, 1, &written, NULL );
- ok(ret && written == 1, "WriteFile error %d\n", GetLastError());
+ ok(ret && written == 1, "WriteFile error %ld\n", GetLastError());
/* iosb updated here by async i/o */
- ok( U(iosb).Status == 0, "wrong status %x\n", U(iosb).Status );
- ok( iosb.Information == 1, "wrong info %lu\n", iosb.Information );
+ ok( U(iosb).Status == 0, "wrong status %lx\n", U(iosb).Status );
+ ok( iosb.Information == 1, "wrong info %Iu\n", iosb.Information );
ok( !is_signaled( read ), "read handle is signaled\n" );
ok( is_signaled( event ), "event is not signaled\n" );
ok( !apc_count, "apc was called\n" );
@@ -888,16 +889,16 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
iosb.Information = 0xdeadbeef;
ok( !is_signaled( read ), "read handle is signaled\n" );
status = NtReadFile( read, 0, apc, &apc_count, &iosb, buffer, 1, NULL, NULL );
- ok( status == STATUS_PENDING, "wrong status %x\n", status );
+ ok( status == STATUS_PENDING, "wrong status %lx\n", status );
ok( !is_signaled( read ), "read handle is signaled\n" );
- ok( U(iosb).Status == 0xdeadbabe, "wrong status %x\n", U(iosb).Status );
- ok( iosb.Information == 0xdeadbeef, "wrong info %lu\n", iosb.Information );
+ ok( U(iosb).Status == 0xdeadbabe, "wrong status %lx\n", U(iosb).Status );
+ ok( iosb.Information == 0xdeadbeef, "wrong info %Iu\n", iosb.Information );
ok( !apc_count, "apc was called\n" );
ret = WriteFile( write, buffer, 1, &written, NULL );
- ok(ret && written == 1, "WriteFile error %d\n", GetLastError());
+ ok(ret && written == 1, "WriteFile error %ld\n", GetLastError());
/* iosb updated here by async i/o */
- ok( U(iosb).Status == 0, "wrong status %x\n", U(iosb).Status );
- ok( iosb.Information == 1, "wrong info %lu\n", iosb.Information );
+ ok( U(iosb).Status == 0, "wrong status %lx\n", U(iosb).Status );
+ ok( iosb.Information == 1, "wrong info %Iu\n", iosb.Information );
ok( is_signaled( read ), "read handle is not signaled\n" );
ok( !apc_count, "apc was called\n" );
apc_count = 0;
@@ -912,14 +913,14 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
iosb.Information = 0xdeadbeef;
ResetEvent( event );
ret = WriteFile( write, buffer, 1, &written, NULL );
- ok(ret && written == 1, "WriteFile error %d\n", GetLastError());
+ ok(ret && written == 1, "WriteFile error %ld\n", GetLastError());
test_peek(read);
status = NtReadFile( read, event, apc, &apc_count, &iosb, buffer, 1, NULL, NULL );
- ok( status == STATUS_SUCCESS, "wrong status %x\n", status );
- ok( U(iosb).Status == 0, "wrong status %x\n", U(iosb).Status );
- ok( iosb.Information == 1, "wrong info %lu\n", iosb.Information );
+ ok( status == STATUS_SUCCESS, "wrong status %lx\n", status );
+ ok( U(iosb).Status == 0, "wrong status %lx\n", U(iosb).Status );
+ ok( iosb.Information == 1, "wrong info %Iu\n", iosb.Information );
ok( is_signaled( event ), "event is not signaled\n" );
ok( !apc_count, "apc was called\n" );
SleepEx( 1, FALSE ); /* non-alertable sleep */
@@ -933,7 +934,7 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
iosb.Information = 0xdeadbeef;
ResetEvent( event );
ret = WriteFile( write, buffer, 2, &written, NULL );
- ok(ret && written == 2, "WriteFile error %d\n", GetLastError());
+ ok(ret && written == 2, "WriteFile error %ld\n", GetLastError());
memset( &iosb, 0xcc, sizeof(iosb) );
status = NtFsControlFile( read, NULL, NULL, NULL, &iosb, FSCTL_PIPE_PEEK, NULL, 0, buffer,
@@ -941,29 +942,29 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
if (pipe_type & PIPE_TYPE_MESSAGE)
{
ok( status == STATUS_BUFFER_OVERFLOW || status == STATUS_PENDING,
- "FSCTL_PIPE_PEEK returned %x\n", status );
- ok( U(iosb).Status == STATUS_BUFFER_OVERFLOW, "wrong status %x\n", U(iosb).Status );
+ "FSCTL_PIPE_PEEK returned %lx\n", status );
+ ok( U(iosb).Status == STATUS_BUFFER_OVERFLOW, "wrong status %lx\n", U(iosb).Status );
}
else
{
- ok( !status || status == STATUS_PENDING, "FSCTL_PIPE_PEEK returned %x\n", status );
- ok( U(iosb).Status == 0, "wrong status %x\n", U(iosb).Status );
+ ok( !status || status == STATUS_PENDING, "FSCTL_PIPE_PEEK returned %lx\n", status );
+ ok( U(iosb).Status == 0, "wrong status %lx\n", U(iosb).Status );
}
ok( iosb.Information == FIELD_OFFSET(FILE_PIPE_PEEK_BUFFER, Data[1]),
- "wrong info %lu\n", iosb.Information );
+ "wrong info %Iu\n", iosb.Information );
status = NtReadFile( read, event, apc, &apc_count, &iosb, buffer, 1, NULL, NULL );
if (pipe_type & PIPE_READMODE_MESSAGE)
{
- ok( status == STATUS_BUFFER_OVERFLOW, "wrong status %x\n", status );
- ok( U(iosb).Status == STATUS_BUFFER_OVERFLOW, "wrong status %x\n", U(iosb).Status );
+ ok( status == STATUS_BUFFER_OVERFLOW, "wrong status %lx\n", status );
+ ok( U(iosb).Status == STATUS_BUFFER_OVERFLOW, "wrong status %lx\n", U(iosb).Status );
}
else
{
- ok( status == STATUS_SUCCESS, "wrong status %x\n", status );
- ok( U(iosb).Status == 0, "wrong status %x\n", U(iosb).Status );
+ ok( status == STATUS_SUCCESS, "wrong status %lx\n", status );
+ ok( U(iosb).Status == 0, "wrong status %lx\n", U(iosb).Status );
}
- ok( iosb.Information == 1, "wrong info %lu\n", iosb.Information );
+ ok( iosb.Information == 1, "wrong info %Iu\n", iosb.Information );
ok( is_signaled( event ), "event is not signaled\n" );
ok( !apc_count, "apc was called\n" );
SleepEx( 1, FALSE ); /* non-alertable sleep */
@@ -972,9 +973,9 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
ok( apc_count == 1, "apc not called\n" );
apc_count = 0;
status = NtReadFile( read, event, apc, &apc_count, &iosb, buffer, 1, NULL, NULL );
- ok( status == STATUS_SUCCESS, "wrong status %x\n", status );
- ok( U(iosb).Status == 0, "wrong status %x\n", U(iosb).Status );
- ok( iosb.Information == 1, "wrong info %lu\n", iosb.Information );
+ ok( status == STATUS_SUCCESS, "wrong status %lx\n", status );
+ ok( U(iosb).Status == 0, "wrong status %lx\n", U(iosb).Status );
+ ok( iosb.Information == 1, "wrong info %Iu\n", iosb.Information );
ok( is_signaled( event ), "event is not signaled\n" );
ok( !apc_count, "apc was called\n" );
SleepEx( 1, FALSE ); /* non-alertable sleep */
@@ -988,18 +989,18 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
iosb.Information = 0xdeadbeef;
ok( is_signaled( event ), "event is not signaled\n" ); /* check that read resets the event */
status = NtReadFile( read, event, apc, &apc_count, &iosb, buffer, 2, NULL, NULL );
- ok( status == STATUS_PENDING, "wrong status %x\n", status );
+ ok( status == STATUS_PENDING, "wrong status %lx\n", status );
ok( !is_signaled( event ), "event is signaled\n" );
- ok( U(iosb).Status == 0xdeadbabe, "wrong status %x\n", U(iosb).Status );
- ok( iosb.Information == 0xdeadbeef, "wrong info %lu\n", iosb.Information );
+ ok( U(iosb).Status == 0xdeadbabe, "wrong status %lx\n", U(iosb).Status );
+ ok( iosb.Information == 0xdeadbeef, "wrong info %Iu\n", iosb.Information );
ok( !apc_count, "apc was called\n" );
ret = WriteFile( write, buffer, 1, &written, NULL );
- ok(ret && written == 1, "WriteFile error %d\n", GetLastError());
+ ok(ret && written == 1, "WriteFile error %ld\n", GetLastError());
/* partial read is good enough */
Sleep(1); /* FIXME: needed for wine to run the i/o apc */
ok( is_signaled( event ), "event is not signaled\n" );
- ok( U(iosb).Status == 0, "wrong status %x\n", U(iosb).Status );
- ok( iosb.Information == 1, "wrong info %lu\n", iosb.Information );
+ ok( U(iosb).Status == 0, "wrong status %lx\n", U(iosb).Status );
+ ok( iosb.Information == 1, "wrong info %Iu\n", iosb.Information );
ok( !apc_count, "apc was called\n" );
SleepEx( 1, TRUE ); /* alertable sleep */
ok( apc_count == 1, "apc was not called\n" );
@@ -1010,9 +1011,9 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
iosb.Information = 0xdeadbeef;
CloseHandle( write );
status = NtReadFile( read, event, apc, &apc_count, &iosb, buffer, 1, NULL, NULL );
- ok( status == STATUS_PIPE_BROKEN, "wrong status %x\n", status );
- ok( U(iosb).Status == 0xdeadbabe, "wrong status %x\n", U(iosb).Status );
- ok( iosb.Information == 0xdeadbeef, "wrong info %lu\n", iosb.Information );
+ ok( status == STATUS_PIPE_BROKEN, "wrong status %lx\n", status );
+ ok( U(iosb).Status == 0xdeadbabe, "wrong status %lx\n", U(iosb).Status );
+ ok( iosb.Information == 0xdeadbeef, "wrong info %Iu\n", iosb.Information );
ok( !is_signaled( event ), "event is signaled\n" );
ok( !apc_count, "apc was called\n" );
SleepEx( 1, TRUE ); /* alertable sleep */
@@ -1024,9 +1025,9 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
U(iosb).Status = 0xdeadbabe;
iosb.Information = 0xdeadbeef;
status = NtReadFile( read, (HANDLE)0xdeadbeef, apc, &apc_count, &iosb, buffer, 1, NULL, NULL );
- ok( status == STATUS_INVALID_HANDLE, "wrong status %x\n", status );
- ok( U(iosb).Status == 0xdeadbabe, "wrong status %x\n", U(iosb).Status );
- ok( iosb.Information == 0xdeadbeef, "wrong info %lu\n", iosb.Information );
+ ok( status == STATUS_INVALID_HANDLE, "wrong status %lx\n", status );
+ ok( U(iosb).Status == 0xdeadbabe, "wrong status %lx\n", U(iosb).Status );
+ ok( iosb.Information == 0xdeadbeef, "wrong info %Iu\n", iosb.Information );
ok( !apc_count, "apc was called\n" );
SleepEx( 1, TRUE ); /* alertable sleep */
ok( !apc_count, "apc was called\n" );
@@ -1038,9 +1039,9 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
iosb.Information = 0xdeadbeef;
SetEvent( event );
status = NtReadFile( read, event, apc, &apc_count, &iosb, buffer, 1, NULL, NULL );
- ok( status == STATUS_INVALID_HANDLE, "wrong status %x\n", status );
- ok( U(iosb).Status == 0xdeadbabe, "wrong status %x\n", U(iosb).Status );
- ok( iosb.Information == 0xdeadbeef, "wrong info %lu\n", iosb.Information );
+ ok( status == STATUS_INVALID_HANDLE, "wrong status %lx\n", status );
+ ok( U(iosb).Status == 0xdeadbabe, "wrong status %lx\n", U(iosb).Status );
+ ok( iosb.Information == 0xdeadbeef, "wrong info %Iu\n", iosb.Information );
ok( is_signaled( event ), "event is not signaled\n" ); /* not reset on invalid handle */
ok( !apc_count, "apc was called\n" );
SleepEx( 1, TRUE ); /* alertable sleep */
@@ -1052,15 +1053,15 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
U(iosb).Status = 0xdeadbabe;
iosb.Information = 0xdeadbeef;
status = NtReadFile( read, event, apc, &apc_count, &iosb, buffer, 2, NULL, NULL );
- ok( status == STATUS_PENDING, "wrong status %x\n", status );
+ ok( status == STATUS_PENDING, "wrong status %lx\n", status );
ok( !is_signaled( event ), "event is signaled\n" );
- ok( U(iosb).Status == 0xdeadbabe, "wrong status %x\n", U(iosb).Status );
- ok( iosb.Information == 0xdeadbeef, "wrong info %lu\n", iosb.Information );
+ ok( U(iosb).Status == 0xdeadbabe, "wrong status %lx\n", U(iosb).Status );
+ ok( iosb.Information == 0xdeadbeef, "wrong info %Iu\n", iosb.Information );
ok( !apc_count, "apc was called\n" );
CloseHandle( write );
Sleep(1); /* FIXME: needed for wine to run the i/o apc */
- ok( U(iosb).Status == STATUS_PIPE_BROKEN, "wrong status %x\n", U(iosb).Status );
- ok( iosb.Information == 0, "wrong info %lu\n", iosb.Information );
+ ok( U(iosb).Status == STATUS_PIPE_BROKEN, "wrong status %lx\n", U(iosb).Status );
+ ok( iosb.Information == 0, "wrong info %Iu\n", iosb.Information );
ok( is_signaled( event ), "event is not signaled\n" );
ok( !apc_count, "apc was called\n" );
SleepEx( 1, TRUE ); /* alertable sleep */
@@ -1069,23 +1070,23 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
if (!create_pipe_pair( &read, &write, FILE_FLAG_OVERLAPPED | pipe_flags, pipe_type, 4096 )) return;
ret = DuplicateHandle(GetCurrentProcess(), read, GetCurrentProcess(), &handle, 0, TRUE, DUPLICATE_SAME_ACCESS);
- ok(ret, "Failed to duplicate handle: %d\n", GetLastError());
+ ok(ret, "Failed to duplicate handle: %ld\n", GetLastError());
apc_count = 0;
U(iosb).Status = 0xdeadbabe;
iosb.Information = 0xdeadbeef;
status = NtReadFile( handle, event, apc, &apc_count, &iosb, buffer, 2, NULL, NULL );
- ok( status == STATUS_PENDING, "wrong status %x\n", status );
+ ok( status == STATUS_PENDING, "wrong status %lx\n", status );
ok( !is_signaled( event ), "event is signaled\n" );
- ok( U(iosb).Status == 0xdeadbabe, "wrong status %x\n", U(iosb).Status );
- ok( iosb.Information == 0xdeadbeef, "wrong info %lu\n", iosb.Information );
+ ok( U(iosb).Status == 0xdeadbabe, "wrong status %lx\n", U(iosb).Status );
+ ok( iosb.Information == 0xdeadbeef, "wrong info %Iu\n", iosb.Information );
ok( !apc_count, "apc was called\n" );
/* Cancel by other handle */
status = pNtCancelIoFile( read, &iosb2 );
- ok(status == STATUS_SUCCESS, "failed to cancel by different handle: %x\n", status);
+ ok(status == STATUS_SUCCESS, "failed to cancel by different handle: %lx\n", status);
Sleep(1); /* FIXME: needed for wine to run the i/o apc */
- ok( U(iosb).Status == STATUS_CANCELLED, "wrong status %x\n", U(iosb).Status );
- ok( iosb.Information == 0, "wrong info %lu\n", iosb.Information );
+ ok( U(iosb).Status == STATUS_CANCELLED, "wrong status %lx\n", U(iosb).Status );
+ ok( iosb.Information == 0, "wrong info %Iu\n", iosb.Information );
ok( is_signaled( event ), "event is not signaled\n" );
ok( !apc_count, "apc was called\n" );
SleepEx( 1, TRUE ); /* alertable sleep */
@@ -1095,23 +1096,23 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
U(iosb).Status = 0xdeadbabe;
iosb.Information = 0xdeadbeef;
status = NtReadFile( read, event, apc, &apc_count, &iosb, buffer, 2, NULL, NULL );
- ok( status == STATUS_PENDING, "wrong status %x\n", status );
+ ok( status == STATUS_PENDING, "wrong status %lx\n", status );
ok( !is_signaled( event ), "event is signaled\n" );
- ok( U(iosb).Status == 0xdeadbabe, "wrong status %x\n", U(iosb).Status );
- ok( iosb.Information == 0xdeadbeef, "wrong info %lu\n", iosb.Information );
+ ok( U(iosb).Status == 0xdeadbabe, "wrong status %lx\n", U(iosb).Status );
+ ok( iosb.Information == 0xdeadbeef, "wrong info %Iu\n", iosb.Information );
ok( !apc_count, "apc was called\n" );
/* Close queued handle */
CloseHandle( read );
SleepEx( 1, TRUE ); /* alertable sleep */
- ok( U(iosb).Status == 0xdeadbabe, "wrong status %x\n", U(iosb).Status );
- ok( iosb.Information == 0xdeadbeef, "wrong info %lu\n", iosb.Information );
+ ok( U(iosb).Status == 0xdeadbabe, "wrong status %lx\n", U(iosb).Status );
+ ok( iosb.Information == 0xdeadbeef, "wrong info %Iu\n", iosb.Information );
status = pNtCancelIoFile( read, &iosb2 );
ok(status == STATUS_INVALID_HANDLE, "cancelled by closed handle?\n");
status = pNtCancelIoFile( handle, &iosb2 );
- ok(status == STATUS_SUCCESS, "failed to cancel: %x\n", status);
+ ok(status == STATUS_SUCCESS, "failed to cancel: %lx\n", status);
Sleep(1); /* FIXME: needed for wine to run the i/o apc */
- ok( U(iosb).Status == STATUS_CANCELLED, "wrong status %x\n", U(iosb).Status );
- ok( iosb.Information == 0, "wrong info %lu\n", iosb.Information );
+ ok( U(iosb).Status == STATUS_CANCELLED, "wrong status %lx\n", U(iosb).Status );
+ ok( iosb.Information == 0, "wrong info %Iu\n", iosb.Information );
ok( is_signaled( event ), "event is not signaled\n" );
ok( !apc_count, "apc was called\n" );
SleepEx( 1, TRUE ); /* alertable sleep */
@@ -1128,16 +1129,16 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
U(iosb).Status = 0xdeadbabe;
iosb.Information = 0xdeadbeef;
status = NtReadFile( read, event, apc, &apc_count, &iosb, buffer, 2, NULL, NULL );
- ok( status == STATUS_PENDING, "wrong status %x\n", status );
+ ok( status == STATUS_PENDING, "wrong status %lx\n", status );
ok( !is_signaled( event ), "event is signaled\n" );
- ok( U(iosb).Status == 0xdeadbabe, "wrong status %x\n", U(iosb).Status );
- ok( iosb.Information == 0xdeadbeef, "wrong info %lu\n", iosb.Information );
+ ok( U(iosb).Status == 0xdeadbabe, "wrong status %lx\n", U(iosb).Status );
+ ok( iosb.Information == 0xdeadbeef, "wrong info %Iu\n", iosb.Information );
ok( !apc_count, "apc was called\n" );
status = pNtCancelIoFileEx( read, &iosb, &iosb2 );
ok(status == STATUS_SUCCESS, "Failed to cancel I/O\n");
Sleep(1); /* FIXME: needed for wine to run the i/o apc */
- ok( U(iosb).Status == STATUS_CANCELLED, "wrong status %x\n", U(iosb).Status );
- ok( iosb.Information == 0, "wrong info %lu\n", iosb.Information );
+ ok( U(iosb).Status == STATUS_CANCELLED, "wrong status %lx\n", U(iosb).Status );
+ ok( iosb.Information == 0, "wrong info %Iu\n", iosb.Information );
ok( is_signaled( event ), "event is not signaled\n" );
ok( !apc_count, "apc was called\n" );
SleepEx( 1, TRUE ); /* alertable sleep */
@@ -1148,22 +1149,22 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
U(iosb).Status = 0xdeadbabe;
iosb.Information = 0xdeadbeef;
status = NtReadFile( read, event, apc, &apc_count, &iosb, buffer, 2, NULL, NULL );
- ok( status == STATUS_PENDING, "wrong status %x\n", status );
+ ok( status == STATUS_PENDING, "wrong status %lx\n", status );
ok( !is_signaled( event ), "event is signaled\n" );
- ok( U(iosb).Status == 0xdeadbabe, "wrong status %x\n", U(iosb).Status );
- ok( iosb.Information == 0xdeadbeef, "wrong info %lu\n", iosb.Information );
+ ok( U(iosb).Status == 0xdeadbabe, "wrong status %lx\n", U(iosb).Status );
+ ok( iosb.Information == 0xdeadbeef, "wrong info %Iu\n", iosb.Information );
ok( !apc_count, "apc was called\n" );
status = NtReadFile( read, event, apc, &apc_count, &iosb, buffer, 2, NULL, NULL );
- ok( status == STATUS_PENDING, "wrong status %x\n", status );
+ ok( status == STATUS_PENDING, "wrong status %lx\n", status );
ok( !is_signaled( event ), "event is signaled\n" );
- ok( U(iosb).Status == 0xdeadbabe, "wrong status %x\n", U(iosb).Status );
- ok( iosb.Information == 0xdeadbeef, "wrong info %lu\n", iosb.Information );
+ ok( U(iosb).Status == 0xdeadbabe, "wrong status %lx\n", U(iosb).Status );
+ ok( iosb.Information == 0xdeadbeef, "wrong info %Iu\n", iosb.Information );
ok( !apc_count, "apc was called\n" );
status = pNtCancelIoFileEx( read, &iosb, &iosb2 );
ok(status == STATUS_SUCCESS, "Failed to cancel I/O\n");
Sleep(1); /* FIXME: needed for wine to run the i/o apc */
- ok( U(iosb).Status == STATUS_CANCELLED, "wrong status %x\n", U(iosb).Status );
- ok( iosb.Information == 0, "wrong info %lu\n", iosb.Information );
+ ok( U(iosb).Status == STATUS_CANCELLED, "wrong status %lx\n", U(iosb).Status );
+ ok( iosb.Information == 0, "wrong info %Iu\n", iosb.Information );
ok( is_signaled( event ), "event is not signaled\n" );
ok( !apc_count, "apc was called\n" );
SleepEx( 1, TRUE ); /* alertable sleep */
@@ -1193,14 +1194,14 @@ static void test_transceive(void)
status = NtFsControlFile( caller, event, NULL, NULL, &iosb, FSCTL_PIPE_TRANSCEIVE,
(BYTE*)"test", 4, buffer, sizeof(buffer) );
- ok( status == STATUS_PENDING, "NtFsControlFile(FSCTL_PIPE_TRANSCEIVE) returned %x\n", status);
+ ok( status == STATUS_PENDING, "NtFsControlFile(FSCTL_PIPE_TRANSCEIVE) returned %lx\n", status);
ok( !is_signaled( event ), "event is signaled\n" );
ret = WriteFile( callee, buffer, 2, &written, NULL );
- ok(ret && written == 2, "WriteFile error %d\n", GetLastError());
+ ok(ret && written == 2, "WriteFile error %ld\n", GetLastError());
- ok( U(iosb).Status == 0, "wrong status %x\n", U(iosb).Status );
- ok( iosb.Information == 2, "wrong info %lu\n", iosb.Information );
+ ok( U(iosb).Status == 0, "wrong status %lx\n", U(iosb).Status );
+ ok( iosb.Information == 2, "wrong info %Iu\n", iosb.Information );
ok( is_signaled( event ), "event is not signaled\n" );
CloseHandle( caller );
@@ -1218,7 +1219,7 @@ static void _test_no_queued_completion(unsigned line, HANDLE port)
pov = (void *)0xdeadbeef;
ret = GetQueuedCompletionStatus(port, &num_bytes, &key, &pov, 10);
ok_(__FILE__,line)(!ret && GetLastError() == WAIT_TIMEOUT,
- "GetQueuedCompletionStatus returned %x(%u)\n", ret, GetLastError());
+ "GetQueuedCompletionStatus returned %x(%lu)\n", ret, GetLastError());
}
#define test_queued_completion(a,b,c,d) _test_queued_completion(__LINE__,a,b,c,d)
@@ -1232,11 +1233,11 @@ static void _test_queued_completion(unsigned line, HANDLE port, IO_STATUS_BLOCK
NTSTATUS status;
status = pNtRemoveIoCompletion(port, &key, &value, &iosb, &timeout);
- ok_(__FILE__,line)(status == STATUS_SUCCESS, "NtRemoveIoCompletion returned %x\n", status);
- ok_(__FILE__,line)(value == (ULONG_PTR)io, "value = %lx\n", value);
- ok_(__FILE__,line)(io->Status == expected_status, "Status = %x\n", io->Status);
+ ok_(__FILE__,line)(status == STATUS_SUCCESS, "NtRemoveIoCompletion returned %lx\n", status);
+ ok_(__FILE__,line)(value == (ULONG_PTR)io, "value = %Ix\n", value);
+ ok_(__FILE__,line)(io->Status == expected_status, "Status = %lx\n", io->Status);
ok_(__FILE__,line)(io->Information == expected_information,
- "Information = %lu\n", io->Information);
+ "Information = %Iu\n", io->Information);
}
static void test_completion(void)
@@ -1258,7 +1259,7 @@ static void test_completion(void)
status = pNtQueryInformationFile(pipe, &io, &info, sizeof(info),
FileIoCompletionNotificationInformation);
ok(status == STATUS_SUCCESS || broken(status == STATUS_INVALID_INFO_CLASS),
- "status = %x\n", status);
+ "status = %lx\n", status);
if (status)
{
win_skip("FileIoCompletionNotificationInformation not supported\n");
@@ -1269,52 +1270,52 @@ static void test_completion(void)
memset(&ov, 0, sizeof(ov));
ov.hEvent = CreateEventA(NULL, TRUE, FALSE, NULL);
- ok(ov.hEvent != INVALID_HANDLE_VALUE, "CreateEvent failed, error %u\n", GetLastError());
+ ok(ov.hEvent != INVALID_HANDLE_VALUE, "CreateEvent failed, error %lu\n", GetLastError());
port = CreateIoCompletionPort(client, NULL, 0xdeadbeef, 0);
- ok(port != NULL, "CreateIoCompletionPort failed, error %u\n", GetLastError());
+ ok(port != NULL, "CreateIoCompletionPort failed, error %lu\n", GetLastError());
ret = WriteFile(client, buf, sizeof(buf), &num_bytes, &ov);
- ok(ret, "WriteFile failed, error %u\n", GetLastError());
- ok(num_bytes == sizeof(buf), "expected sizeof(buf), got %u\n", num_bytes);
+ ok(ret, "WriteFile failed, error %lu\n", GetLastError());
+ ok(num_bytes == sizeof(buf), "expected sizeof(buf), got %lu\n", num_bytes);
test_queued_completion(port, (IO_STATUS_BLOCK*)&ov, STATUS_SUCCESS, num_bytes);
status = NtFsControlFile(client, NULL, NULL, &io, &io, FSCTL_PIPE_PEEK,
NULL, 0, &peek_buf, sizeof(peek_buf));
- ok(status == STATUS_PENDING || status == STATUS_SUCCESS, "FSCTL_PIPE_PEEK returned %x\n", status);
+ ok(status == STATUS_PENDING || status == STATUS_SUCCESS, "FSCTL_PIPE_PEEK returned %lx\n", status);
test_queued_completion(port, &io, STATUS_SUCCESS, FIELD_OFFSET(FILE_PIPE_PEEK_BUFFER, Data));
info.Flags = FILE_SKIP_COMPLETION_PORT_ON_SUCCESS;
status = pNtSetInformationFile(client, &io, &info, sizeof(info), FileIoCompletionNotificationInformation);
- ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %08x\n", status);
+ ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %08lx\n", status);
ret = WriteFile(client, buf, sizeof(buf), &num_bytes, &ov);
- ok(ret, "WriteFile failed, error %u\n", GetLastError());
- ok(num_bytes == sizeof(buf), "expected sizeof(buf), got %u\n", num_bytes);
+ ok(ret, "WriteFile failed, error %lu\n", GetLastError());
+ ok(num_bytes == sizeof(buf), "expected sizeof(buf), got %lu\n", num_bytes);
test_no_queued_completion(port);
ret = WriteFile(pipe, buf, sizeof(buf), &num_bytes, &ov);
- ok(ret, "WriteFile failed, error %u\n", GetLastError());
- ok(num_bytes == sizeof(buf), "expected sizeof(buf), got %u\n", num_bytes);
+ ok(ret, "WriteFile failed, error %lu\n", GetLastError());
+ ok(num_bytes == sizeof(buf), "expected sizeof(buf), got %lu\n", num_bytes);
status = NtReadFile(client, NULL, NULL, &io, &io, read_buf, 1, NULL, NULL);
- ok(status == STATUS_BUFFER_OVERFLOW || status == STATUS_PENDING, "status = %x\n", status);
- ok(io.Status == STATUS_BUFFER_OVERFLOW, "Status = %x\n", io.Status);
- ok(io.Information == 1, "Information = %lu\n", io.Information);
+ ok(status == STATUS_BUFFER_OVERFLOW || status == STATUS_PENDING, "status = %lx\n", status);
+ ok(io.Status == STATUS_BUFFER_OVERFLOW, "Status = %lx\n", io.Status);
+ ok(io.Information == 1, "Information = %Iu\n", io.Information);
if(status == STATUS_PENDING) /* win8+ */
test_queued_completion(port, &io, STATUS_BUFFER_OVERFLOW, 1);
else
test_no_queued_completion(port);
status = NtReadFile(client, NULL, NULL, &io, &io, read_buf, sizeof(read_buf), NULL, NULL);
- ok(status == STATUS_SUCCESS, "status = %x\n", status);
- ok(io.Status == STATUS_SUCCESS, "Status = %x\n", io.Status);
- ok(io.Information == sizeof(buf)-1, "Information = %lu\n", io.Information);
+ ok(status == STATUS_SUCCESS, "status = %lx\n", status);
+ ok(io.Status == STATUS_SUCCESS, "Status = %lx\n", io.Status);
+ ok(io.Information == sizeof(buf)-1, "Information = %Iu\n", io.Information);
test_no_queued_completion(port);
status = NtFsControlFile(client, NULL, NULL, &io, &io, FSCTL_PIPE_PEEK,
NULL, 0, &peek_buf, sizeof(peek_buf));
- ok(status == STATUS_PENDING || status == STATUS_SUCCESS, "FSCTL_PIPE_PEEK returned %x\n", status);
+ ok(status == STATUS_PENDING || status == STATUS_SUCCESS, "FSCTL_PIPE_PEEK returned %lx\n", status);
if(status == STATUS_PENDING) /* win8+ */
test_queued_completion(port, &io, STATUS_SUCCESS, FIELD_OFFSET(FILE_PIPE_PEEK_BUFFER, Data));
else
@@ -1322,20 +1323,20 @@ static void test_completion(void)
memset(&io, 0xcc, sizeof(io));
status = NtReadFile(client, ov.hEvent, NULL, &io, &io, read_buf, sizeof(read_buf), NULL, NULL);
- ok(status == STATUS_PENDING, "status = %x\n", status);
+ ok(status == STATUS_PENDING, "status = %lx\n", status);
ok(!is_signaled(ov.hEvent), "event is signtaled\n");
test_no_queued_completion(port);
ret = WriteFile(pipe, buf, sizeof(buf), &num_bytes, NULL);
- ok(ret, "WriteFile failed, error %u\n", GetLastError());
+ ok(ret, "WriteFile failed, error %lu\n", GetLastError());
test_queued_completion(port, &io, STATUS_SUCCESS, sizeof(buf));
ret = WriteFile(pipe, buf, sizeof(buf), &num_bytes, NULL);
- ok(ret, "WriteFile failed, error %u\n", GetLastError());
+ ok(ret, "WriteFile failed, error %lu\n", GetLastError());
status = NtFsControlFile(client, NULL, NULL, &io, &io, FSCTL_PIPE_PEEK,
NULL, 0, &peek_buf, sizeof(peek_buf));
ok(status == STATUS_PENDING || status == STATUS_BUFFER_OVERFLOW,
- "FSCTL_PIPE_PEEK returned %x\n", status);
+ "FSCTL_PIPE_PEEK returned %lx\n", status);
if(status == STATUS_PENDING) /* win8+ */
test_queued_completion(port, &io, STATUS_BUFFER_OVERFLOW, sizeof(peek_buf));
else
@@ -1355,41 +1356,41 @@ static void test_completion(void)
/* no event, APC nor completion: only signals on handle */
memset(&io, 0xcc, sizeof(io));
status = NtReadFile(client, NULL, NULL, NULL, &io, read_buf, sizeof(read_buf), NULL, NULL);
- ok(status == STATUS_PENDING, "status = %x\n", status);
+ ok(status == STATUS_PENDING, "status = %lx\n", status);
ok(!is_signaled(client), "client is signaled\n");
ret = WriteFile(pipe, buf, sizeof(buf), &num_bytes, NULL);
- ok(ret, "WriteFile failed, error %u\n", GetLastError());
+ ok(ret, "WriteFile failed, error %lu\n", GetLastError());
ok(is_signaled(client), "client is signaled\n");
- ok(io.Status == STATUS_SUCCESS, "Status = %x\n", io.Status);
- ok(io.Information == sizeof(buf), "Information = %lu\n", io.Information);
+ ok(io.Status == STATUS_SUCCESS, "Status = %lx\n", io.Status);
+ ok(io.Information == sizeof(buf), "Information = %Iu\n", io.Information);
/* event with no APC nor completion: signals only event */
memset(&io, 0xcc, sizeof(io));
status = NtReadFile(client, event, NULL, NULL, &io, read_buf, sizeof(read_buf), NULL, NULL);
- ok(status == STATUS_PENDING, "status = %x\n", status);
+ ok(status == STATUS_PENDING, "status = %lx\n", status);
ok(!is_signaled(client), "client is signaled\n");
ok(!is_signaled(event), "event is signaled\n");
ret = WriteFile(pipe, buf, sizeof(buf), &num_bytes, NULL);
- ok(ret, "WriteFile failed, error %u\n", GetLastError());
+ ok(ret, "WriteFile failed, error %lu\n", GetLastError());
ok(!is_signaled(client), "client is signaled\n");
ok(is_signaled(event), "event is not signaled\n");
- ok(io.Status == STATUS_SUCCESS, "Status = %x\n", io.Status);
- ok(io.Information == sizeof(buf), "Information = %lu\n", io.Information);
+ ok(io.Status == STATUS_SUCCESS, "Status = %lx\n", io.Status);
+ ok(io.Information == sizeof(buf), "Information = %Iu\n", io.Information);
/* APC with no event: handle is signaled */
ioapc_called = FALSE;
memset(&io, 0xcc, sizeof(io));
status = NtReadFile(client, NULL, ioapc, &io, &io, read_buf, sizeof(read_buf), NULL, NULL);
- ok(status == STATUS_PENDING, "status = %x\n", status);
+ ok(status == STATUS_PENDING, "status = %lx\n", status);
ok(!is_signaled(client), "client is signaled\n");
ret = WriteFile(pipe, buf, sizeof(buf), &num_bytes, NULL);
- ok(ret, "WriteFile failed, error %u\n", GetLastError());
+ ok(ret, "WriteFile failed, error %lu\n", GetLastError());
ok(is_signaled(client), "client is signaled\n");
- ok(io.Status == STATUS_SUCCESS, "Status = %x\n", io.Status);
- ok(io.Information == sizeof(buf), "Information = %lu\n", io.Information);
+ ok(io.Status == STATUS_SUCCESS, "Status = %lx\n", io.Status);
+ ok(io.Information == sizeof(buf), "Information = %Iu\n", io.Information);
ok(!ioapc_called, "ioapc called\n");
SleepEx(0, TRUE);
@@ -1398,53 +1399,53 @@ static void test_completion(void)
/* completion with no completion port: handle signaled */
memset(&io, 0xcc, sizeof(io));
status = NtReadFile(client, NULL, NULL, &io, &io, read_buf, sizeof(read_buf), NULL, NULL);
- ok(status == STATUS_PENDING, "status = %x\n", status);
+ ok(status == STATUS_PENDING, "status = %lx\n", status);
ok(!is_signaled(client), "client is signaled\n");
ret = WriteFile(pipe, buf, sizeof(buf), &num_bytes, NULL);
- ok(ret, "WriteFile failed, error %u\n", GetLastError());
+ ok(ret, "WriteFile failed, error %lu\n", GetLastError());
ok(is_signaled(client), "client is not signaled\n");
port = CreateIoCompletionPort(client, NULL, 0xdeadbeef, 0);
- ok(port != NULL, "CreateIoCompletionPort failed, error %u\n", GetLastError());
+ ok(port != NULL, "CreateIoCompletionPort failed, error %lu\n", GetLastError());
/* skipping completion on success: handle is signaled */
info.Flags = FILE_SKIP_COMPLETION_PORT_ON_SUCCESS;
status = pNtSetInformationFile(client, &io, &info, sizeof(info), FileIoCompletionNotificationInformation);
- ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %08x\n", status);
+ ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %08lx\n", status);
ok(is_signaled(client), "client is not signaled\n");
memset(&io, 0xcc, sizeof(io));
status = NtReadFile(client, NULL, NULL, &io, &io, read_buf, sizeof(read_buf), NULL, NULL);
- ok(status == STATUS_PENDING, "status = %x\n", status);
+ ok(status == STATUS_PENDING, "status = %lx\n", status);
ok(!is_signaled(client), "client is signaled\n");
ret = WriteFile(client, buf, 1, &num_bytes, NULL);
- ok(ret, "WriteFile failed, error %u\n", GetLastError());
+ ok(ret, "WriteFile failed, error %lu\n", GetLastError());
ok(is_signaled(client), "client is not signaled\n");
/* skipping set event on handle: handle is never signaled */
info.Flags = FILE_SKIP_SET_EVENT_ON_HANDLE;
status = pNtSetInformationFile(client, &io, &info, sizeof(info), FileIoCompletionNotificationInformation);
- ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %08x\n", status);
+ ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %08lx\n", status);
ok(!is_signaled(client), "client is not signaled\n");
ret = WriteFile(pipe, buf, sizeof(buf), &num_bytes, NULL);
- ok(ret, "WriteFile failed, error %u\n", GetLastError());
+ ok(ret, "WriteFile failed, error %lu\n", GetLastError());
ok(!is_signaled(client), "client is signaled\n");
test_queued_completion(port, &io, STATUS_SUCCESS, sizeof(buf));
memset(&io, 0xcc, sizeof(io));
status = NtReadFile(client, NULL, NULL, NULL, &io, read_buf, sizeof(read_buf), NULL, NULL);
- ok(status == STATUS_PENDING, "status = %x\n", status);
+ ok(status == STATUS_PENDING, "status = %lx\n", status);
ok(!is_signaled(client), "client is signaled\n");
ret = WriteFile(client, buf, 1, &num_bytes, NULL);
- ok(ret, "WriteFile failed, error %u\n", GetLastError());
+ ok(ret, "WriteFile failed, error %lu\n", GetLastError());
ok(!is_signaled(client), "client is signaled\n");
ret = WriteFile(pipe, buf, sizeof(buf), &num_bytes, NULL);
- ok(ret, "WriteFile failed, error %u\n", GetLastError());
+ ok(ret, "WriteFile failed, error %lu\n", GetLastError());
ok(!is_signaled(client), "client is signaled\n");
CloseHandle(port);
@@ -1477,7 +1478,7 @@ static DWORD WINAPI blocking_thread(void *arg)
for (;;)
{
res = WaitForSingleObject(ctx->wait, 10000);
- ok(res == WAIT_OBJECT_0, "wait returned %x\n", res);
+ ok(res == WAIT_OBJECT_0, "wait returned %lx\n", res);
if (res != WAIT_OBJECT_0) break;
switch(ctx->cmd) {
case BLOCKING_THREAD_WRITE:
@@ -1488,7 +1489,7 @@ static DWORD WINAPI blocking_thread(void *arg)
ok(!is_signaled(ctx->client), "client is signaled\n");
ok(is_signaled(ctx->pipe), "pipe is not signaled\n");
ret = WriteFile(ctx->pipe, buf, 1, &num_bytes, NULL);
- ok(ret, "WriteFile failed, error %u\n", GetLastError());
+ ok(ret, "WriteFile failed, error %lu\n", GetLastError());
break;
case BLOCKING_THREAD_READ:
Sleep(100);
@@ -1498,7 +1499,7 @@ static DWORD WINAPI blocking_thread(void *arg)
ok(!is_signaled(ctx->client), "client is signaled\n");
ok(is_signaled(ctx->pipe), "pipe is not signaled\n");
ret = ReadFile(ctx->pipe, read_buf, 1, &num_bytes, NULL);
- ok(ret, "WriteFile failed, error %u\n", GetLastError());
+ ok(ret, "WriteFile failed, error %lu\n", GetLastError());
break;
case BLOCKING_THREAD_QUIT:
return 0;
@@ -1526,11 +1527,11 @@ static void test_blocking(ULONG options)
ctx.wait = CreateEventW(NULL, FALSE, FALSE, NULL);
ctx.done = CreateEventW(NULL, FALSE, FALSE, NULL);
thread = CreateThread(NULL, 0, blocking_thread, &ctx, 0, 0);
- ok(thread != INVALID_HANDLE_VALUE, "can't create thread, GetLastError: %x\n", GetLastError());
+ ok(thread != INVALID_HANDLE_VALUE, "can't create thread, GetLastError: %lx\n", GetLastError());
status = create_pipe(&ctx.pipe, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE,
options);
- ok(status == STATUS_SUCCESS, "NtCreateNamedPipeFile returned %x\n", status);
+ ok(status == STATUS_SUCCESS, "NtCreateNamedPipeFile returned %lx\n", status);
pRtlInitUnicodeString(&name, testpipe_nt);
attr.Length = sizeof(attr);
@@ -1542,7 +1543,7 @@ static void test_blocking(ULONG options)
status = NtCreateFile(&ctx.client, SYNCHRONIZE | GENERIC_READ | GENERIC_WRITE, &attr, &io,
NULL, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_OPEN,
options, NULL, 0 );
- ok(status == STATUS_SUCCESS, "NtCreateFile returned %x\n", status);
+ ok(status == STATUS_SUCCESS, "NtCreateFile returned %lx\n", status);
ok(is_signaled(ctx.client), "client is not signaled\n");
ok(is_signaled(ctx.pipe), "pipe is not signaled\n");
@@ -1554,14 +1555,14 @@ static void test_blocking(ULONG options)
ctx.event = NULL;
SetEvent(ctx.wait);
status = NtReadFile(ctx.client, NULL, NULL, NULL, &io, read_buf, sizeof(read_buf), NULL, NULL);
- ok(status == STATUS_SUCCESS, "status = %x\n", status);
- ok(io.Status == STATUS_SUCCESS, "Status = %x\n", io.Status);
- ok(io.Information == 1, "Information = %lu\n", io.Information);
+ ok(status == STATUS_SUCCESS, "status = %lx\n", status);
+ ok(io.Status == STATUS_SUCCESS, "Status = %lx\n", io.Status);
+ ok(io.Information == 1, "Information = %Iu\n", io.Information);
ok(is_signaled(ctx.client), "client is not signaled\n");
ok(is_signaled(ctx.pipe), "pipe is not signaled\n");
res = WaitForSingleObject(ctx.done, 10000);
- ok(res == WAIT_OBJECT_0, "wait returned %x\n", res);
+ ok(res == WAIT_OBJECT_0, "wait returned %lx\n", res);
/* blocking read with event and APC */
ioapc_called = FALSE;
@@ -1571,9 +1572,9 @@ static void test_blocking(ULONG options)
SetEvent(ctx.wait);
status = NtReadFile(ctx.client, ctx.event, ioapc, &io, &io, read_buf,
sizeof(read_buf), NULL, NULL);
- ok(status == STATUS_SUCCESS, "status = %x\n", status);
- ok(io.Status == STATUS_SUCCESS, "Status = %x\n", io.Status);
- ok(io.Information == 1, "Information = %lu\n", io.Information);
+ ok(status == STATUS_SUCCESS, "status = %lx\n", status);
+ ok(io.Status == STATUS_SUCCESS, "Status = %lx\n", io.Status);
+ ok(io.Information == 1, "Information = %Iu\n", io.Information);
ok(is_signaled(ctx.event), "event is not signaled\n");
todo_wine
ok(is_signaled(ctx.client), "client is not signaled\n");
@@ -1585,27 +1586,27 @@ static void test_blocking(ULONG options)
ok(ioapc_called, "ioapc not called\n");
res = WaitForSingleObject(ctx.done, 10000);
- ok(res == WAIT_OBJECT_0, "wait returned %x\n", res);
+ ok(res == WAIT_OBJECT_0, "wait returned %lx\n", res);
ioapc_called = FALSE;
CloseHandle(ctx.event);
ctx.event = NULL;
/* blocking flush */
ret = WriteFile(ctx.client, read_buf, 1, &num_bytes, NULL);
- ok(ret, "WriteFile failed, error %u\n", GetLastError());
+ ok(ret, "WriteFile failed, error %lu\n", GetLastError());
ioapc_called = FALSE;
memset(&io, 0xff, sizeof(io));
ctx.cmd = BLOCKING_THREAD_READ;
SetEvent(ctx.wait);
status = NtFlushBuffersFile(ctx.client, &io);
- ok(status == STATUS_SUCCESS, "status = %x\n", status);
- ok(io.Status == STATUS_SUCCESS, "Status = %x\n", io.Status);
- ok(io.Information == 0, "Information = %lu\n", io.Information);
+ ok(status == STATUS_SUCCESS, "status = %lx\n", status);
+ ok(io.Status == STATUS_SUCCESS, "Status = %lx\n", io.Status);
+ ok(io.Information == 0, "Information = %Iu\n", io.Information);
ok(is_signaled(ctx.client), "client is not signaled\n");
res = WaitForSingleObject(ctx.done, 10000);
- ok(res == WAIT_OBJECT_0, "wait returned %x\n", res);
+ ok(res == WAIT_OBJECT_0, "wait returned %lx\n", res);
ok(is_signaled(ctx.pipe), "pipe is not signaled\n");
CloseHandle(ctx.pipe);
@@ -1619,7 +1620,7 @@ static void test_blocking(ULONG options)
ok(is_signaled(ctx.pipe), "pipe is not signaled\n");
ret = WriteFile(ctx.client, read_buf, 1, &num_bytes, NULL);
- ok(ret, "WriteFile failed, error %u\n", GetLastError());
+ ok(ret, "WriteFile failed, error %lu\n", GetLastError());
ok(is_signaled(ctx.client), "client is not signaled\n");
ok(is_signaled(ctx.pipe), "pipe is not signaled\n");
@@ -1629,13 +1630,13 @@ static void test_blocking(ULONG options)
ctx.cmd = BLOCKING_THREAD_READ;
SetEvent(ctx.wait);
status = NtFlushBuffersFile(ctx.client, &io);
- ok(status == STATUS_SUCCESS, "status = %x\n", status);
- ok(io.Status == STATUS_SUCCESS, "Status = %x\n", io.Status);
- ok(io.Information == 0, "Information = %lu\n", io.Information);
+ ok(status == STATUS_SUCCESS, "status = %lx\n", status);
+ ok(io.Status == STATUS_SUCCESS, "Status = %lx\n", io.Status);
+ ok(io.Information == 0, "Information = %Iu\n", io.Information);
/* client signaling is inconsistent in this case */
res = WaitForSingleObject(ctx.done, 10000);
- ok(res == WAIT_OBJECT_0, "wait returned %x\n", res);
+ ok(res == WAIT_OBJECT_0, "wait returned %lx\n", res);
CloseHandle(ctx.pipe);
CloseHandle(ctx.client);
@@ -1643,7 +1644,7 @@ static void test_blocking(ULONG options)
ctx.cmd = BLOCKING_THREAD_QUIT;
SetEvent(ctx.wait);
res = WaitForSingleObject(thread, 10000);
- ok(res == WAIT_OBJECT_0, "wait returned %x\n", res);
+ ok(res == WAIT_OBJECT_0, "wait returned %lx\n", res);
CloseHandle(ctx.wait);
CloseHandle(ctx.done);
@@ -1664,24 +1665,24 @@ static void test_volume_info(void)
memset( buffer, 0xaa, sizeof(buffer) );
memset( &iosb, 0xaa, sizeof(iosb) );
status = pNtQueryVolumeInformationFile( read, &iosb, buffer, sizeof(buffer), FileFsDeviceInformation );
- ok( status == STATUS_SUCCESS, "NtQueryVolumeInformationFile failed: %x\n", status );
- ok( iosb.Status == STATUS_SUCCESS, "got status %#x\n", iosb.Status );
- ok( iosb.Information == sizeof(*device_info), "Information = %lu\n", iosb.Information );
+ ok( status == STATUS_SUCCESS, "NtQueryVolumeInformationFile failed: %lx\n", status );
+ ok( iosb.Status == STATUS_SUCCESS, "got status %#lx\n", iosb.Status );
+ ok( iosb.Information == sizeof(*device_info), "Information = %Iu\n", iosb.Information );
device_info = (FILE_FS_DEVICE_INFORMATION*)buffer;
- ok( device_info->DeviceType == FILE_DEVICE_NAMED_PIPE, "DeviceType = %u\n", device_info->DeviceType );
+ ok( device_info->DeviceType == FILE_DEVICE_NAMED_PIPE, "DeviceType = %lu\n", device_info->DeviceType );
ok( !(device_info->Characteristics & ~FILE_DEVICE_ALLOW_APPCONTAINER_TRAVERSAL),
- "Characteristics = %x\n", device_info->Characteristics );
+ "Characteristics = %lx\n", device_info->Characteristics );
memset( buffer, 0xaa, sizeof(buffer) );
memset( &iosb, 0xaa, sizeof(iosb) );
status = pNtQueryVolumeInformationFile( write, &iosb, buffer, sizeof(buffer), FileFsDeviceInformation );
- ok( status == STATUS_SUCCESS, "NtQueryVolumeInformationFile failed: %x\n", status );
- ok( iosb.Status == STATUS_SUCCESS, "got status %#x\n", iosb.Status );
- ok( iosb.Information == sizeof(*device_info), "Information = %lu\n", iosb.Information );
+ ok( status == STATUS_SUCCESS, "NtQueryVolumeInformationFile failed: %lx\n", status );
+ ok( iosb.Status == STATUS_SUCCESS, "got status %#lx\n", iosb.Status );
+ ok( iosb.Information == sizeof(*device_info), "Information = %Iu\n", iosb.Information );
device_info = (FILE_FS_DEVICE_INFORMATION*)buffer;
- ok( device_info->DeviceType == FILE_DEVICE_NAMED_PIPE, "DeviceType = %u\n", device_info->DeviceType );
+ ok( device_info->DeviceType == FILE_DEVICE_NAMED_PIPE, "DeviceType = %lu\n", device_info->DeviceType );
ok( !(device_info->Characteristics & ~FILE_DEVICE_ALLOW_APPCONTAINER_TRAVERSAL),
- "Characteristics = %x\n", device_info->Characteristics );
+ "Characteristics = %lx\n", device_info->Characteristics );
CloseHandle( read );
CloseHandle( write );
@@ -1696,11 +1697,11 @@ static void _test_file_name_fail(unsigned line, HANDLE pipe, NTSTATUS expected_s
status = NtQueryInformationFile( pipe, &iosb, buffer, 0, FileNameInformation );
ok_(__FILE__,line)( status == STATUS_INFO_LENGTH_MISMATCH,
- "expected STATUS_INFO_LENGTH_MISMATCH, got %#x\n", status );
+ "expected STATUS_INFO_LENGTH_MISMATCH, got %#lx\n", status );
status = NtQueryInformationFile( pipe, &iosb, buffer, sizeof(buffer), FileNameInformation );
todo_wine_if (todo)
- ok_(__FILE__,line)( status == expected_status, "expected %#x, got %#x\n", expected_status, status );
+ ok_(__FILE__,line)( status == expected_status, "expected %#lx, got %#lx\n", expected_status, status );
}
#define test_file_name(a) _test_file_name(__LINE__,a)
@@ -1717,28 +1718,28 @@ static void _test_file_name(unsigned line, HANDLE pipe)
memset( buffer, 0xaa, sizeof(buffer) );
memset( &iosb, 0xaa, sizeof(iosb) );
status = NtQueryInformationFile( pipe, &iosb, buffer, sizeof(buffer), FileNameInformation );
- ok_(__FILE__,line)( status == STATUS_SUCCESS, "NtQueryInformationFile failed: %x\n", status );
- ok_(__FILE__,line)( iosb.Status == STATUS_SUCCESS, "Status = %x\n", iosb.Status );
+ ok_(__FILE__,line)( status == STATUS_SUCCESS, "NtQueryInformationFile failed: %lx\n", status );
+ ok_(__FILE__,line)( iosb.Status == STATUS_SUCCESS, "Status = %lx\n", iosb.Status );
ok_(__FILE__,line)( iosb.Information == sizeof(name_info->FileNameLength) + sizeof(nameW),
- "Information = %lu\n", iosb.Information );
- ok( name_info->FileNameLength == sizeof(nameW), "FileNameLength = %u\n", name_info->FileNameLength );
+ "Information = %Iu\n", iosb.Information );
+ ok( name_info->FileNameLength == sizeof(nameW), "FileNameLength = %lu\n", name_info->FileNameLength );
ok( !memcmp(name_info->FileName, nameW, sizeof(nameW)), "FileName = %s\n", wine_dbgstr_w(name_info->FileName) );
/* too small buffer */
memset( buffer, 0xaa, sizeof(buffer) );
memset( &iosb, 0xaa, sizeof(iosb) );
status = NtQueryInformationFile( pipe, &iosb, buffer, 20, FileNameInformation );
- ok( status == STATUS_BUFFER_OVERFLOW, "NtQueryInformationFile failed: %x\n", status );
- ok( iosb.Status == STATUS_BUFFER_OVERFLOW, "Status = %x\n", iosb.Status );
- ok( iosb.Information == 20, "Information = %lu\n", iosb.Information );
- ok( name_info->FileNameLength == sizeof(nameW), "FileNameLength = %u\n", name_info->FileNameLength );
+ ok( status == STATUS_BUFFER_OVERFLOW, "NtQueryInformationFile failed: %lx\n", status );
+ ok( iosb.Status == STATUS_BUFFER_OVERFLOW, "Status = %lx\n", iosb.Status );
+ ok( iosb.Information == 20, "Information = %Iu\n", iosb.Information );
+ ok( name_info->FileNameLength == sizeof(nameW), "FileNameLength = %lu\n", name_info->FileNameLength );
ok( !memcmp(name_info->FileName, nameW, 16), "FileName = %s\n", wine_dbgstr_w(name_info->FileName) );
/* too small buffer */
memset( buffer, 0xaa, sizeof(buffer) );
memset( &iosb, 0xaa, sizeof(iosb) );
status = NtQueryInformationFile( pipe, &iosb, buffer, 4, FileNameInformation );
- ok( status == STATUS_INFO_LENGTH_MISMATCH, "NtQueryInformationFile failed: %x\n", status );
+ ok( status == STATUS_INFO_LENGTH_MISMATCH, "NtQueryInformationFile failed: %lx\n", status );
}
static HANDLE create_pipe_server(void)
@@ -1747,7 +1748,7 @@ static HANDLE create_pipe_server(void)
NTSTATUS status;
status = create_pipe(&handle, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, 0);
- ok(status == STATUS_SUCCESS, "create_pipe failed: %x\n", status);
+ ok(status == STATUS_SUCCESS, "create_pipe failed: %lx\n", status);
return handle;
}
@@ -1757,7 +1758,7 @@ static HANDLE connect_pipe(HANDLE server)
client = CreateFileW(testpipe, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING,
FILE_FLAG_OVERLAPPED, 0);
- ok(client != INVALID_HANDLE_VALUE, "can't open pipe: %u\n", GetLastError());
+ ok(client != INVALID_HANDLE_VALUE, "can't open pipe: %lu\n", GetLastError());
return client;
}
@@ -1772,9 +1773,9 @@ static HANDLE connect_and_write_pipe(HANDLE server)
client = connect_pipe(server);
res = WriteFile(client, buf, sizeof(buf), &written, NULL);
- ok(res, "WriteFile failed: %u\n", GetLastError());
+ ok(res, "WriteFile failed: %lu\n", GetLastError());
res = WriteFile(server, buf, sizeof(buf), &written, NULL);
- ok(res, "WriteFile failed: %u\n", GetLastError());
+ ok(res, "WriteFile failed: %lu\n", GetLastError());
return client;
}
@@ -1806,10 +1807,10 @@ static void test_pipe_state(HANDLE pipe, BOOL is_server, DWORD state)
expected_status = STATUS_PIPE_BROKEN;
break;
}
- ok(status == expected_status, "status = %x, expected %x in %s state %u\n",
+ ok(status == expected_status, "status = %lx, expected %lx in %s state %lu\n",
status, expected_status, is_server ? "server" : "client", state);
if (!status)
- ok(peek_buf.NamedPipeState == state, "NamedPipeState = %u, expected %u\n",
+ ok(peek_buf.NamedPipeState == state, "NamedPipeState = %lu, expected %lu\n",
peek_buf.NamedPipeState, state);
if (state != FILE_PIPE_CONNECTED_STATE)
@@ -1821,7 +1822,7 @@ static void test_pipe_state(HANDLE pipe, BOOL is_server, DWORD state)
if (!status || status == STATUS_PENDING)
status = io.Status;
ok(status == expected_status,
- "NtFsControlFile(FSCTL_PIPE_TRANSCEIVE) failed in %s state %u: %x\n",
+ "NtFsControlFile(FSCTL_PIPE_TRANSCEIVE) failed in %s state %lu: %lx\n",
is_server ? "server" : "client", state, status);
}
@@ -1829,15 +1830,15 @@ static void test_pipe_state(HANDLE pipe, BOOL is_server, DWORD state)
status = NtFlushBuffersFile(pipe, &io);
if (!is_server && state == FILE_PIPE_DISCONNECTED_STATE)
{
- ok(status == STATUS_PIPE_DISCONNECTED, "status = %x in %s state %u\n",
+ ok(status == STATUS_PIPE_DISCONNECTED, "status = %lx in %s state %lu\n",
status, is_server ? "server" : "client", state);
}
else
{
- ok(status == STATUS_SUCCESS, "status = %x in %s state %u\n",
+ ok(status == STATUS_SUCCESS, "status = %lx in %s state %lu\n",
status, is_server ? "server" : "client", state);
- ok(io.Status == status, "io.Status = %x\n", io.Status);
- ok(!io.Information, "io.Information = %lx\n", io.Information);
+ ok(io.Status == status, "io.Status = %lx\n", io.Status);
+ ok(!io.Information, "io.Information = %Ix\n", io.Information);
}
if (state != FILE_PIPE_CONNECTED_STATE)
@@ -1855,7 +1856,7 @@ static void test_pipe_state(HANDLE pipe, BOOL is_server, DWORD state)
break;
}
status = NtReadFile(pipe, NULL, NULL, NULL, &io, buf, 1, NULL, NULL);
- ok(status == expected_status, "NtReadFile failed in %s state %u: %x\n",
+ ok(status == expected_status, "NtReadFile failed in %s state %lu: %lx\n",
is_server ? "server" : "client", state, status);
}
@@ -1864,7 +1865,7 @@ static void test_pipe_state(HANDLE pipe, BOOL is_server, DWORD state)
memset(&io, 0xcc, sizeof(io));
status = listen_pipe(pipe, NULL, &io, FALSE);
ok(status == (state == FILE_PIPE_CLOSING_STATE ? STATUS_PIPE_CLOSING : STATUS_PIPE_CONNECTED),
- "status = %x in %u state\n", status, state);
+ "status = %lx in %lu state\n", status, state);
}
}
@@ -1881,42 +1882,42 @@ static void test_pipe_with_data_state(HANDLE pipe, BOOL is_server, DWORD state)
status = pNtQueryInformationFile(pipe, &io, &local_info, sizeof(local_info), FilePipeLocalInformation);
if (!is_server && state == FILE_PIPE_DISCONNECTED_STATE)
ok(status == STATUS_PIPE_DISCONNECTED,
- "NtQueryInformationFile(FilePipeLocalInformation) failed in %s state %u: %x\n",
+ "NtQueryInformationFile(FilePipeLocalInformation) failed in %s state %lu: %lx\n",
is_server ? "server" : "client", state, status);
else
ok(status == STATUS_SUCCESS,
- "NtQueryInformationFile(FilePipeLocalInformation) failed in %s state %u: %x\n",
+ "NtQueryInformationFile(FilePipeLocalInformation) failed in %s state %lu: %lx\n",
is_server ? "server" : "client", state, status);
if (!status)
{
- ok(local_info.NamedPipeState == state, "%s NamedPipeState = %u, expected %u\n",
+ ok(local_info.NamedPipeState == state, "%s NamedPipeState = %lu, expected %lu\n",
is_server ? "server" : "client", local_info.NamedPipeState, state);
if (state != FILE_PIPE_DISCONNECTED_STATE && state != FILE_PIPE_LISTENING_STATE)
- ok(local_info.ReadDataAvailable != 0, "ReadDataAvailable, expected non-zero, in %s state %u\n",
+ ok(local_info.ReadDataAvailable != 0, "ReadDataAvailable, expected non-zero, in %s state %lu\n",
is_server ? "server" : "client", state);
else
- ok(local_info.ReadDataAvailable == 0, "ReadDataAvailable, expected zero, in %s state %u\n",
+ ok(local_info.ReadDataAvailable == 0, "ReadDataAvailable, expected zero, in %s state %lu\n",
is_server ? "server" : "client", state);
}
status = pNtQueryInformationFile(pipe, &io, &pipe_info, sizeof(pipe_info), FilePipeInformation);
if (!is_server && state == FILE_PIPE_DISCONNECTED_STATE)
ok(status == STATUS_PIPE_DISCONNECTED,
- "NtQueryInformationFile(FilePipeInformation) failed in %s state %u: %x\n",
+ "NtQueryInformationFile(FilePipeInformation) failed in %s state %lu: %lx\n",
is_server ? "server" : "client", state, status);
else
ok(status == STATUS_SUCCESS,
- "NtQueryInformationFile(FilePipeInformation) failed in %s state %u: %x\n",
+ "NtQueryInformationFile(FilePipeInformation) failed in %s state %lu: %lx\n",
is_server ? "server" : "client", state, status);
status = NtQueryInformationFile(pipe, &io, buf, sizeof(buf), FileNameInformation);
if (!is_server && state == FILE_PIPE_DISCONNECTED_STATE)
ok(status == STATUS_PIPE_DISCONNECTED,
- "NtQueryInformationFile(FileNameInformation) failed: %x\n", status);
+ "NtQueryInformationFile(FileNameInformation) failed: %lx\n", status);
else
todo_wine_if(!is_server && state == FILE_PIPE_CLOSING_STATE)
ok(status == STATUS_SUCCESS,
- "NtQueryInformationFile(FileNameInformation) failed: %x\n", status);
+ "NtQueryInformationFile(FileNameInformation) failed: %lx\n", status);
memset(&peek_buf, 0xcc, sizeof(peek_buf));
memset(&io, 0xcc, sizeof(io));
@@ -1935,10 +1936,10 @@ static void test_pipe_with_data_state(HANDLE pipe, BOOL is_server, DWORD state)
expected_status = STATUS_BUFFER_OVERFLOW;
break;
}
- ok(status == expected_status, "status = %x, expected %x in %s state %u\n",
+ ok(status == expected_status, "status = %lx, expected %lx in %s state %lu\n",
status, expected_status, is_server ? "server" : "client", state);
if (status == STATUS_BUFFER_OVERFLOW)
- ok(peek_buf.NamedPipeState == state, "NamedPipeState = %u, expected %u\n",
+ ok(peek_buf.NamedPipeState == state, "NamedPipeState = %lu, expected %lu\n",
peek_buf.NamedPipeState, state);
switch (state)
@@ -1957,13 +1958,13 @@ static void test_pipe_with_data_state(HANDLE pipe, BOOL is_server, DWORD state)
break;
}
status = NtWriteFile(pipe, NULL, NULL, NULL, &io, buf, 1, NULL, NULL);
- ok(status == expected_status, "NtWriteFile failed in %s state %u: %x\n",
+ ok(status == expected_status, "NtWriteFile failed in %s state %lu: %lx\n",
is_server ? "server" : "client", state, status);
if (state == FILE_PIPE_CLOSING_STATE)
expected_status = STATUS_SUCCESS;
status = NtReadFile(pipe, NULL, NULL, NULL, &io, buf, 1, NULL, NULL);
- ok(status == expected_status, "NtReadFile failed in %s state %u: %x\n",
+ ok(status == expected_status, "NtReadFile failed in %s state %lu: %lx\n",
is_server ? "server" : "client", state, status);
}
@@ -1983,7 +1984,7 @@ static void pipe_for_each_state(HANDLE (*create_server)(void),
test(server, TRUE, FILE_PIPE_LISTENING_STATE);
status = listen_pipe(server, event, &iosb, FALSE);
- ok(status == STATUS_PENDING, "listen_pipe returned %x\n", status);
+ ok(status == STATUS_PENDING, "listen_pipe returned %lx\n", status);
test(server, TRUE, FILE_PIPE_LISTENING_STATE);
client = connect_client(server);
@@ -1997,11 +1998,11 @@ static void pipe_for_each_state(HANDLE (*create_server)(void),
server = create_server();
status = listen_pipe(server, event, &iosb, FALSE);
- ok(status == STATUS_PENDING, "listen_pipe returned %x\n", status);
+ ok(status == STATUS_PENDING, "listen_pipe returned %lx\n", status);
client = connect_client(server);
ret = DisconnectNamedPipe(server);
- ok(ret, "DisconnectNamedPipe failed: %u\n", GetLastError());
+ ok(ret, "DisconnectNamedPipe failed: %lu\n", GetLastError());
test(server, TRUE, FILE_PIPE_DISCONNECTED_STATE);
test(client, FALSE, FILE_PIPE_DISCONNECTED_STATE);
CloseHandle(server);
@@ -2010,17 +2011,17 @@ static void pipe_for_each_state(HANDLE (*create_server)(void),
server = create_server();
status = listen_pipe(server, event, &iosb, FALSE);
- ok(status == STATUS_PENDING, "listen_pipe returned %x\n", status);
+ ok(status == STATUS_PENDING, "listen_pipe returned %lx\n", status);
client = connect_client(server);
CloseHandle(client);
test(server, TRUE, FILE_PIPE_CLOSING_STATE);
ret = DisconnectNamedPipe(server);
- ok(ret, "DisconnectNamedPipe failed: %u\n", GetLastError());
+ ok(ret, "DisconnectNamedPipe failed: %lu\n", GetLastError());
test(server, TRUE, FILE_PIPE_DISCONNECTED_STATE);
status = listen_pipe(server, event, &iosb, FALSE);
- ok(status == STATUS_PENDING, "listen_pipe returned %x\n", status);
+ ok(status == STATUS_PENDING, "listen_pipe returned %lx\n", status);
client = connect_client(server);
test(server, TRUE, FILE_PIPE_CONNECTED_STATE);
test(client, FALSE, FILE_PIPE_CONNECTED_STATE);
@@ -2053,7 +2054,7 @@ static HANDLE create_local_info_test_pipe(void)
status = pNtCreateNamedPipeFile(&pipe, FILE_READ_ATTRIBUTES | SYNCHRONIZE | GENERIC_WRITE,
&attr, &iosb, FILE_SHARE_READ, FILE_CREATE, 0, 1, 0, 0, 1,
100, 200, &timeout);
- ok(status == STATUS_SUCCESS, "NtCreateNamedPipeFile failed: %x\n", status);
+ ok(status == STATUS_SUCCESS, "NtCreateNamedPipeFile failed: %lx\n", status);
return pipe;
}
@@ -2064,7 +2065,7 @@ static HANDLE connect_pipe_reader(HANDLE server)
client = CreateFileW(testpipe, GENERIC_READ | FILE_WRITE_ATTRIBUTES, 0, 0, OPEN_EXISTING,
FILE_FLAG_OVERLAPPED, 0);
- ok(client != INVALID_HANDLE_VALUE, "can't open pipe: %u\n", GetLastError());
+ ok(client != INVALID_HANDLE_VALUE, "can't open pipe: %lu\n", GetLastError());
return client;
}
@@ -2085,34 +2086,34 @@ static void test_pipe_local_info(HANDLE pipe, BOOL is_server, DWORD state)
status = pNtQueryInformationFile(pipe, &iosb, &local_info, sizeof(local_info), FilePipeLocalInformation);
if (!is_server && state == FILE_PIPE_DISCONNECTED_STATE)
ok(status == STATUS_PIPE_DISCONNECTED,
- "NtQueryInformationFile(FilePipeLocalInformation) failed in %s state %u: %x\n",
+ "NtQueryInformationFile(FilePipeLocalInformation) failed in %s state %lu: %lx\n",
is_server ? "server" : "client", state, status);
else
ok(status == STATUS_SUCCESS,
- "NtQueryInformationFile(FilePipeLocalInformation) failed in %s state %u: %x\n",
+ "NtQueryInformationFile(FilePipeLocalInformation) failed in %s state %lu: %lx\n",
is_server ? "server" : "client", state, status);
if (!status)
{
- ok(local_info.NamedPipeType == 1, "NamedPipeType = %u\n", local_info.NamedPipeType);
- ok(local_info.NamedPipeConfiguration == 1, "NamedPipeConfiguration = %u\n",
+ ok(local_info.NamedPipeType == 1, "NamedPipeType = %lu\n", local_info.NamedPipeType);
+ ok(local_info.NamedPipeConfiguration == 1, "NamedPipeConfiguration = %lu\n",
local_info.NamedPipeConfiguration);
- ok(local_info.MaximumInstances == 1, "MaximumInstances = %u\n", local_info.MaximumInstances);
+ ok(local_info.MaximumInstances == 1, "MaximumInstances = %lu\n", local_info.MaximumInstances);
if (!is_server && state == FILE_PIPE_CLOSING_STATE)
ok(local_info.CurrentInstances == 0 || broken(local_info.CurrentInstances == 1 /* winxp */),
- "CurrentInstances = %u\n", local_info.CurrentInstances);
+ "CurrentInstances = %lu\n", local_info.CurrentInstances);
else
ok(local_info.CurrentInstances == 1,
- "CurrentInstances = %u\n", local_info.CurrentInstances);
- ok(local_info.InboundQuota == 100, "InboundQuota = %u\n", local_info.InboundQuota);
- ok(local_info.ReadDataAvailable == 0, "ReadDataAvailable = %u\n",
+ "CurrentInstances = %lu\n", local_info.CurrentInstances);
+ ok(local_info.InboundQuota == 100, "InboundQuota = %lu\n", local_info.InboundQuota);
+ ok(local_info.ReadDataAvailable == 0, "ReadDataAvailable = %lu\n",
local_info.ReadDataAvailable);
- ok(local_info.OutboundQuota == 200, "OutboundQuota = %u\n", local_info.OutboundQuota);
+ ok(local_info.OutboundQuota == 200, "OutboundQuota = %lu\n", local_info.OutboundQuota);
todo_wine
- ok(local_info.WriteQuotaAvailable == (is_server ? 200 : 100), "WriteQuotaAvailable = %u\n",
+ ok(local_info.WriteQuotaAvailable == (is_server ? 200 : 100), "WriteQuotaAvailable = %lu\n",
local_info.WriteQuotaAvailable);
- ok(local_info.NamedPipeState == state, "%s NamedPipeState = %u, expected %u\n",
+ ok(local_info.NamedPipeState == state, "%s NamedPipeState = %lu, expected %lu\n",
is_server ? "server" : "client", local_info.NamedPipeState, state);
- ok(local_info.NamedPipeEnd == is_server, "NamedPipeEnd = %u\n", local_info.NamedPipeEnd);
+ ok(local_info.NamedPipeEnd == is_server, "NamedPipeEnd = %lu\n", local_info.NamedPipeEnd);
/* try to create another, incompatible, instance of pipe */
pRtlInitUnicodeString(&name, testpipe_nt);
@@ -2130,41 +2131,41 @@ static void test_pipe_local_info(HANDLE pipe, BOOL is_server, DWORD state)
&attr, &iosb, FILE_SHARE_WRITE, FILE_CREATE, 0, 0, 0, 0, 1,
100, 200, &timeout);
if (!local_info.CurrentInstances)
- ok(status == STATUS_SUCCESS, "NtCreateNamedPipeFile failed: %x\n", status);
+ ok(status == STATUS_SUCCESS, "NtCreateNamedPipeFile failed: %lx\n", status);
else
- ok(status == STATUS_INSTANCE_NOT_AVAILABLE, "NtCreateNamedPipeFile failed: %x\n", status);
+ ok(status == STATUS_INSTANCE_NOT_AVAILABLE, "NtCreateNamedPipeFile failed: %lx\n", status);
if (!status) CloseHandle(new_pipe);
memset(&iosb, 0xcc, sizeof(iosb));
status = pNtQueryInformationFile(pipe, &iosb, &local_info, sizeof(local_info),
FilePipeLocalInformation);
ok(status == STATUS_SUCCESS,
- "NtQueryInformationFile(FilePipeLocalInformation) failed in %s state %u: %x\n",
+ "NtQueryInformationFile(FilePipeLocalInformation) failed in %s state %lu: %lx\n",
is_server ? "server" : "client", state, status);
if (!is_server && state == FILE_PIPE_CLOSING_STATE)
ok(local_info.CurrentInstances == 0 || broken(local_info.CurrentInstances == 1 /* winxp */),
- "CurrentInstances = %u\n", local_info.CurrentInstances);
+ "CurrentInstances = %lu\n", local_info.CurrentInstances);
else
ok(local_info.CurrentInstances == 1,
- "CurrentInstances = %u\n", local_info.CurrentInstances);
+ "CurrentInstances = %lu\n", local_info.CurrentInstances);
}
memset(&iosb, 0xcc, sizeof(iosb));
status = pNtQueryInformationFile(pipe, &iosb, &pipe_info, sizeof(pipe_info), FilePipeInformation);
if (!is_server && state == FILE_PIPE_DISCONNECTED_STATE)
ok(status == STATUS_PIPE_DISCONNECTED,
- "NtQueryInformationFile(FilePipeLocalInformation) failed in %s state %u: %x\n",
+ "NtQueryInformationFile(FilePipeLocalInformation) failed in %s state %lu: %lx\n",
is_server ? "server" : "client", state, status);
else
ok(status == STATUS_SUCCESS,
- "NtQueryInformationFile(FilePipeLocalInformation) failed in %s state %u: %x\n",
+ "NtQueryInformationFile(FilePipeLocalInformation) failed in %s state %lu: %lx\n",
is_server ? "server" : "client", state, status);
if (!status)
{
- ok(pipe_info.ReadMode == 0, "ReadMode = %u\n", pipe_info.ReadMode);
- ok(pipe_info.CompletionMode == 0, "CompletionMode = %u\n", pipe_info.CompletionMode);
+ ok(pipe_info.ReadMode == 0, "ReadMode = %lu\n", pipe_info.ReadMode);
+ ok(pipe_info.CompletionMode == 0, "CompletionMode = %lu\n", pipe_info.CompletionMode);
}
pipe_info.ReadMode = 0;
@@ -2173,11 +2174,11 @@ static void test_pipe_local_info(HANDLE pipe, BOOL is_server, DWORD state)
status = pNtSetInformationFile(pipe, &iosb, &pipe_info, sizeof(pipe_info), FilePipeInformation);
if (!is_server && state == FILE_PIPE_DISCONNECTED_STATE)
ok(status == STATUS_PIPE_DISCONNECTED,
- "NtQueryInformationFile(FilePipeLocalInformation) failed in %s state %u: %x\n",
+ "NtQueryInformationFile(FilePipeLocalInformation) failed in %s state %lu: %lx\n",
is_server ? "server" : "client", state, status);
else
ok(status == STATUS_SUCCESS,
- "NtQueryInformationFile(FilePipeLocalInformation) failed in %s state %u: %x\n",
+ "NtQueryInformationFile(FilePipeLocalInformation) failed in %s state %lu: %lx\n",
is_server ? "server" : "client", state, status);
}
@@ -2198,7 +2199,7 @@ static void test_file_info(void)
CloseHandle( client );
device = CreateFileA("\\\\.\\pipe", 0, 0, NULL, OPEN_EXISTING, 0, NULL);
- ok(device != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError());
+ ok(device != INVALID_HANDLE_VALUE, "got error %lu\n", GetLastError());
test_file_name_fail( device, STATUS_INVALID_PARAMETER, TRUE );
@@ -2215,14 +2216,14 @@ static PSECURITY_DESCRIPTOR get_security_descriptor(HANDLE handle, BOOL todo)
NULL, 0, &length);
todo_wine_if(todo && status == STATUS_PIPE_DISCONNECTED)
ok(status == STATUS_BUFFER_TOO_SMALL,
- "Failed to query object security descriptor length: %08x\n", status);
+ "Failed to query object security descriptor length: %08lx\n", status);
if(status != STATUS_BUFFER_TOO_SMALL) return NULL;
ok(length != 0, "length = 0\n");
sec_desc = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, length);
status = NtQuerySecurityObject(handle, GROUP_SECURITY_INFORMATION | OWNER_SECURITY_INFORMATION,
sec_desc, length, &length);
- ok(status == STATUS_SUCCESS, "Failed to query object security descriptor: %08x\n", status);
+ ok(status == STATUS_SUCCESS, "Failed to query object security descriptor: %08lx\n", status);
return sec_desc;
}
@@ -2235,16 +2236,16 @@ static TOKEN_OWNER *get_current_owner(void)
BOOL ret;
ret = OpenProcessToken(GetCurrentProcess(), TOKEN_ALL_ACCESS, &token);
- ok(ret, "Failed to get process token: %u\n", GetLastError());
+ ok(ret, "Failed to get process token: %lu\n", GetLastError());
ret = GetTokenInformation(token, TokenOwner, NULL, 0, &length);
ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER,
- "GetTokenInformation failed: %u\n", GetLastError());
- ok(length != 0, "Failed to get token owner information length: %u\n", GetLastError());
+ "GetTokenInformation failed: %lu\n", GetLastError());
+ ok(length != 0, "Failed to get token owner information length: %lu\n", GetLastError());
owner = HeapAlloc(GetProcessHeap(), 0, length);
ret = GetTokenInformation(token, TokenOwner, owner, length, &length);
- ok(ret, "Failed to get token owner information: %u)\n", GetLastError());
+ ok(ret, "Failed to get token owner information: %lu)\n", GetLastError());
CloseHandle(token);
return owner;
@@ -2258,16 +2259,16 @@ static TOKEN_PRIMARY_GROUP *get_current_group(void)
BOOL ret;
ret = OpenProcessToken(GetCurrentProcess(), TOKEN_ALL_ACCESS, &token);
- ok(ret, "Failed to get process token: %u\n", GetLastError());
+ ok(ret, "Failed to get process token: %lu\n", GetLastError());
ret = GetTokenInformation(token, TokenPrimaryGroup, NULL, 0, &length);
ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER,
- "GetTokenInformation failed: %u\n", GetLastError());
- ok(length != 0, "Failed to get primary group token information length: %u\n", GetLastError());
+ "GetTokenInformation failed: %lu\n", GetLastError());
+ ok(length != 0, "Failed to get primary group token information length: %lu\n", GetLastError());
group = HeapAlloc(GetProcessHeap(), 0, length);
ret = GetTokenInformation(token, TokenPrimaryGroup, group, length, &length);
- ok(ret, "Failed to get primary group token information: %u\n", GetLastError());
+ ok(ret, "Failed to get primary group token information: %lu\n", GetLastError());
CloseHandle(token);
return group;
@@ -2281,7 +2282,7 @@ static SID *well_known_sid(WELL_KNOWN_SID_TYPE sid_type)
sid = HeapAlloc(GetProcessHeap(), 0, size);
ret = CreateWellKnownSid(sid_type, NULL, sid, &size);
- ok(ret, "CreateWellKnownSid failed: %u\n", GetLastError());
+ ok(ret, "CreateWellKnownSid failed: %lu\n", GetLastError());
return sid;
}
@@ -2298,7 +2299,7 @@ static void _test_group(unsigned line, HANDLE handle, SID *expected_sid, BOOL to
status = RtlGetGroupSecurityDescriptor(sec_desc, &group_sid, &defaulted);
ok_(__FILE__,line)(status == STATUS_SUCCESS,
- "Failed to query group from security descriptor: %08x\n", status);
+ "Failed to query group from security descriptor: %08lx\n", status);
todo_wine_if(todo)
ok_(__FILE__,line)(EqualSid(group_sid, expected_sid), "SIDs are not equal\n");
@@ -2335,10 +2336,10 @@ static void test_security_info(void)
server = CreateNamedPipeA(PIPENAME, PIPE_ACCESS_DUPLEX | WRITE_OWNER, PIPE_TYPE_BYTE, 10,
0x20000, 0x20000, 0, NULL);
- ok(server != INVALID_HANDLE_VALUE, "CreateNamedPipe failed: %u\n", GetLastError());
+ ok(server != INVALID_HANDLE_VALUE, "CreateNamedPipe failed: %lu\n", GetLastError());
client = CreateFileA(PIPENAME, GENERIC_ALL, 0, NULL, OPEN_EXISTING, 0, NULL);
- ok(client != INVALID_HANDLE_VALUE, "CreateFile failed: %u\n", GetLastError());
+ ok(client != INVALID_HANDLE_VALUE, "CreateFile failed: %lu\n", GetLastError());
test_group(server, process_group->PrimaryGroup, TRUE);
test_group(client, process_group->PrimaryGroup, TRUE);
@@ -2347,7 +2348,7 @@ static void test_security_info(void)
ret = SetSecurityDescriptorGroup(sec_desc, world_sid, FALSE);
ok(ret, "SetSecurityDescriptorGroup failed\n");
status = NtSetSecurityObject(server, GROUP_SECURITY_INFORMATION, sec_desc);
- ok(status == STATUS_SUCCESS, "NtSetSecurityObject failed: %08x\n", status);
+ ok(status == STATUS_SUCCESS, "NtSetSecurityObject failed: %08lx\n", status);
test_group(server, world_sid, FALSE);
test_group(client, world_sid, FALSE);
@@ -2355,14 +2356,14 @@ static void test_security_info(void)
/* new instance of pipe server has the same security descriptor */
server2 = CreateNamedPipeA(PIPENAME, PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE, 10,
0x20000, 0x20000, 0, NULL);
- ok(server2 != INVALID_HANDLE_VALUE, "CreateNamedPipe failed: %u\n", GetLastError());
+ ok(server2 != INVALID_HANDLE_VALUE, "CreateNamedPipe failed: %lu\n", GetLastError());
test_group(server2, world_sid, FALSE);
/* set client group, server changes as well */
ret = SetSecurityDescriptorGroup(sec_desc, local_sid, FALSE);
ok(ret, "SetSecurityDescriptorGroup failed\n");
status = NtSetSecurityObject(server, GROUP_SECURITY_INFORMATION, sec_desc);
- ok(status == STATUS_SUCCESS, "NtSetSecurityObject failed: %08x\n", status);
+ ok(status == STATUS_SUCCESS, "NtSetSecurityObject failed: %08lx\n", status);
test_group(server, local_sid, FALSE);
test_group(client, local_sid, FALSE);
@@ -2375,20 +2376,20 @@ static void test_security_info(void)
server = server2;
client = CreateFileA(PIPENAME, GENERIC_ALL, 0, NULL, OPEN_EXISTING, 0, NULL);
- ok(client != INVALID_HANDLE_VALUE, "CreateFile failed: %u\n", GetLastError());
+ ok(client != INVALID_HANDLE_VALUE, "CreateFile failed: %lu\n", GetLastError());
test_group(client, local_sid, FALSE);
ret = DisconnectNamedPipe(server);
- ok(ret, "DisconnectNamedPipe failed: %u\n", GetLastError());
+ ok(ret, "DisconnectNamedPipe failed: %lu\n", GetLastError());
/* disconnected server may be queried for security info, but client does not */
test_group(server, local_sid, FALSE);
status = NtQuerySecurityObject(client, GROUP_SECURITY_INFORMATION | OWNER_SECURITY_INFORMATION,
NULL, 0, &length);
- ok(status == STATUS_PIPE_DISCONNECTED, "NtQuerySecurityObject returned %08x\n", status);
+ ok(status == STATUS_PIPE_DISCONNECTED, "NtQuerySecurityObject returned %08lx\n", status);
status = NtSetSecurityObject(client, GROUP_SECURITY_INFORMATION, sec_desc);
- ok(status == STATUS_PIPE_DISCONNECTED, "NtQuerySecurityObject returned %08x\n", status);
+ ok(status == STATUS_PIPE_DISCONNECTED, "NtQuerySecurityObject returned %08lx\n", status);
/* attempting to create another pipe instance with specified sd fails */
sec_attr.nLength = sizeof(sec_attr);
@@ -2400,7 +2401,7 @@ static void test_security_info(void)
0x20000, 0x20000, 0, &sec_attr);
todo_wine
ok(server2 == INVALID_HANDLE_VALUE && GetLastError() == ERROR_ACCESS_DENIED,
- "CreateNamedPipe failed: %u\n", GetLastError());
+ "CreateNamedPipe failed: %lu\n", GetLastError());
if (server2 != INVALID_HANDLE_VALUE) CloseHandle(server2);
CloseHandle(server);
@@ -2408,7 +2409,7 @@ static void test_security_info(void)
server = CreateNamedPipeA(PIPENAME, PIPE_ACCESS_DUPLEX | WRITE_OWNER, PIPE_TYPE_BYTE, 10,
0x20000, 0x20000, 0, &sec_attr);
- ok(server != INVALID_HANDLE_VALUE, "CreateNamedPipe failed: %u\n", GetLastError());
+ ok(server != INVALID_HANDLE_VALUE, "CreateNamedPipe failed: %lu\n", GetLastError());
test_group(server, local_sid, FALSE);
CloseHandle(server);
@@ -2448,7 +2449,7 @@ static void test_empty_name(void)
status = NtCreateFile(&hdirectory, GENERIC_READ | SYNCHRONIZE, &attr, &io, NULL, 0,
FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN, 0, NULL, 0 );
- ok(!status, "Got unexpected status %#x.\n", status);
+ ok(!status, "Got unexpected status %#lx.\n", status);
name.Buffer = NULL;
name.Length = 0;
@@ -2459,7 +2460,7 @@ static void test_empty_name(void)
status = pNtCreateNamedPipeFile(&hpipe, GENERIC_READ | FILE_WRITE_ATTRIBUTES | SYNCHRONIZE, &attr,
&io, FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_CREATE, FILE_SYNCHRONOUS_IO_NONALERT,
0, 0, 0, 3, 4096, 4096, &timeout);
- todo_wine ok(status == STATUS_OBJECT_NAME_INVALID, "Got unexpected status %#x.\n", status);
+ todo_wine ok(status == STATUS_OBJECT_NAME_INVALID, "Got unexpected status %#lx.\n", status);
if (!status)
CloseHandle(hpipe);
CloseHandle(hdirectory);
@@ -2469,11 +2470,11 @@ static void test_empty_name(void)
attr.ObjectName = &name;
status = pNtCreateDirectoryObject(&hdirectory, GENERIC_READ | SYNCHRONIZE, &attr);
- todo_wine ok(status == STATUS_OBJECT_TYPE_MISMATCH, "Got unexpected status %#x.\n", status);
+ todo_wine ok(status == STATUS_OBJECT_TYPE_MISMATCH, "Got unexpected status %#lx.\n", status);
status = NtCreateFile(&hdirectory, GENERIC_READ | SYNCHRONIZE, &attr, &io, NULL, 0,
FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN, 0, NULL, 0 );
- ok(!status, "Got unexpected status %#x.\n", status);
+ ok(!status, "Got unexpected status %#lx.\n", status);
name.Buffer = NULL;
name.Length = 0;
@@ -2484,30 +2485,30 @@ static void test_empty_name(void)
status = pNtCreateNamedPipeFile(&hpipe, GENERIC_READ | SYNCHRONIZE, &attr,
&io, FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_CREATE, FILE_SYNCHRONOUS_IO_NONALERT,
0, 0, 0, 3, 4096, 4096, &timeout);
- ok(!status, "Got unexpected status %#x.\n", status);
+ ok(!status, "Got unexpected status %#lx.\n", status);
type_info->TypeName.Buffer = NULL;
status = pNtQueryObject(hpipe, ObjectTypeInformation, type_info, sizeof(buffer), NULL);
- ok(!status, "Got unexpected status %#x.\n", status);
+ ok(!status, "Got unexpected status %#lx.\n", status);
ok(type_info->TypeName.Buffer && !wcscmp(type_info->TypeName.Buffer, L"File"),
"Got unexpected type %s.\n", debugstr_w(type_info->TypeName.Buffer));
status = pNtQueryObject(hpipe, ObjectNameInformation, name_info, sizeof(buffer), NULL);
- ok(status == STATUS_OBJECT_PATH_INVALID, "Got unexpected status %#x.\n", status);
+ ok(status == STATUS_OBJECT_PATH_INVALID, "Got unexpected status %#lx.\n", status);
status = pNtCreateNamedPipeFile(&handle, GENERIC_READ | SYNCHRONIZE, &attr,
&io, FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_OPEN, FILE_SYNCHRONOUS_IO_NONALERT,
0, 0, 0, 1, 4096, 4096, &timeout);
- todo_wine ok(status == STATUS_OBJECT_NAME_NOT_FOUND, "Got unexpected status %#x.\n", status);
+ todo_wine ok(status == STATUS_OBJECT_NAME_NOT_FOUND, "Got unexpected status %#lx.\n", status);
status = pNtCreateNamedPipeFile(&hpipe2, GENERIC_READ | SYNCHRONIZE, &attr,
&io, FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_CREATE, FILE_SYNCHRONOUS_IO_NONALERT,
0, 0, 0, 3, 4096, 4096, &timeout);
- ok(!status, "Got unexpected status %#x.\n", status);
+ ok(!status, "Got unexpected status %#lx.\n", status);
attr.RootDirectory = hpipe;
pRtlInitUnicodeString(&name, L"a");
status = NtCreateFile(&hwrite, GENERIC_WRITE | FILE_WRITE_ATTRIBUTES | SYNCHRONIZE, &attr, &io, NULL, 0,
FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN, FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0 );
- ok(status == STATUS_OBJECT_NAME_INVALID, "Got unexpected status %#x.\n", status);
+ ok(status == STATUS_OBJECT_NAME_INVALID, "Got unexpected status %#lx.\n", status);
name.Buffer = NULL;
name.Length = 0;
@@ -2515,53 +2516,53 @@ static void test_empty_name(void)
attr.RootDirectory = hpipe;
status = NtCreateFile(&hwrite, GENERIC_WRITE | FILE_WRITE_ATTRIBUTES | SYNCHRONIZE, &attr, &io, NULL, 0,
FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN, FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0 );
- ok(!status, "Got unexpected status %#x.\n", status);
+ ok(!status, "Got unexpected status %#lx.\n", status);
type_info->TypeName.Buffer = NULL;
status = pNtQueryObject(hwrite, ObjectTypeInformation, type_info, sizeof(buffer), NULL);
- ok(!status, "Got unexpected status %#x.\n", status);
+ ok(!status, "Got unexpected status %#lx.\n", status);
ok(type_info->TypeName.Buffer && !wcscmp(type_info->TypeName.Buffer, L"File"),
"Got unexpected type %s.\n", debugstr_w(type_info->TypeName.Buffer));
status = pNtQueryObject(hwrite, ObjectNameInformation, name_info, sizeof(buffer), NULL);
- ok(status == STATUS_OBJECT_PATH_INVALID, "Got unexpected status %#x.\n", status);
+ ok(status == STATUS_OBJECT_PATH_INVALID, "Got unexpected status %#lx.\n", status);
attr.RootDirectory = hpipe;
status = NtCreateFile(&handle, GENERIC_READ | SYNCHRONIZE, &attr, &io, NULL, 0,
FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN,
FILE_NON_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0 );
- ok(status == STATUS_PIPE_NOT_AVAILABLE, "Got unexpected status %#x.\n", status);
+ ok(status == STATUS_PIPE_NOT_AVAILABLE, "Got unexpected status %#lx.\n", status);
attr.RootDirectory = hpipe;
status = NtCreateFile(&handle, GENERIC_WRITE | SYNCHRONIZE, &attr, &io, NULL, 0,
FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN, FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0 );
- ok(status == STATUS_PIPE_NOT_AVAILABLE, "Got unexpected status %#x.\n", status);
+ ok(status == STATUS_PIPE_NOT_AVAILABLE, "Got unexpected status %#lx.\n", status);
attr.RootDirectory = hpipe2;
status = NtCreateFile(&hwrite2, GENERIC_WRITE | FILE_WRITE_ATTRIBUTES | SYNCHRONIZE, &attr, &io, NULL, 0,
FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN, FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0 );
- ok(!status, "Got unexpected status %#x.\n", status);
+ ok(!status, "Got unexpected status %#lx.\n", status);
data = 0xdeadbeef;
ret = WriteFile(hwrite, &data, sizeof(data), &length, NULL);
- ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError());
- ok(length == sizeof(data), "Got unexpected length %#x.\n", length);
+ ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError());
+ ok(length == sizeof(data), "Got unexpected length %#lx.\n", length);
data = 0xfeedcafe;
ret = WriteFile(hwrite2, &data, sizeof(data), &length, NULL);
- ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError());
- ok(length == sizeof(data), "Got unexpected length %#x.\n", length);
+ ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError());
+ ok(length == sizeof(data), "Got unexpected length %#lx.\n", length);
data = 0;
ret = ReadFile(hpipe, &data, sizeof(data), &length, NULL);
- ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError());
- ok(length == sizeof(data), "Got unexpected length %#x.\n", length);
- ok(data == 0xdeadbeef, "Got unexpected data %#x.\n", data);
+ ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError());
+ ok(length == sizeof(data), "Got unexpected length %#lx.\n", length);
+ ok(data == 0xdeadbeef, "Got unexpected data %#lx.\n", data);
data = 0;
ret = ReadFile(hpipe2, &data, sizeof(data), &length, NULL);
- ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError());
- ok(length == sizeof(data), "Got unexpected length %#x.\n", length);
- ok(data == 0xfeedcafe, "Got unexpected data %#x.\n", data);
+ ok(ret, "Got unexpected ret %#x, GetLastError() %lu.\n", ret, GetLastError());
+ ok(length == sizeof(data), "Got unexpected length %#lx.\n", length);
+ ok(data == 0xfeedcafe, "Got unexpected data %#lx.\n", data);
CloseHandle(hwrite);
CloseHandle(hpipe);
1
0
22 Mar '22
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/ntdll/tests/path.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/dlls/ntdll/tests/path.c b/dlls/ntdll/tests/path.c
index 5211945437c..dba42688e05 100644
--- a/dlls/ntdll/tests/path.c
+++ b/dlls/ntdll/tests/path.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 "ntdll_test.h"
#include "winnls.h"
@@ -375,7 +376,7 @@ static void test_RtlGetFullPathName_U(void)
file_part = (WCHAR *)0xdeadbeef;
lstrcpyW(rbufferW, deadbeefW);
ret = pRtlGetFullPathName_U(NULL, MAX_PATH, rbufferW, &file_part);
- ok(!ret, "Expected RtlGetFullPathName_U to return 0, got %u\n", ret);
+ ok(!ret, "Expected RtlGetFullPathName_U to return 0, got %lu\n", ret);
ok(!lstrcmpW(rbufferW, deadbeefW),
"Expected the output buffer to be untouched, got %s\n", wine_dbgstr_w(rbufferW));
ok(file_part == (WCHAR *)0xdeadbeef ||
@@ -385,7 +386,7 @@ static void test_RtlGetFullPathName_U(void)
file_part = (WCHAR *)0xdeadbeef;
lstrcpyW(rbufferW, deadbeefW);
ret = pRtlGetFullPathName_U(emptyW, MAX_PATH, rbufferW, &file_part);
- ok(!ret, "Expected RtlGetFullPathName_U to return 0, got %u\n", ret);
+ ok(!ret, "Expected RtlGetFullPathName_U to return 0, got %lu\n", ret);
ok(!lstrcmpW(rbufferW, deadbeefW),
"Expected the output buffer to be untouched, got %s\n", wine_dbgstr_w(rbufferW));
ok(file_part == (WCHAR *)0xdeadbeef ||
@@ -398,7 +399,7 @@ static void test_RtlGetFullPathName_U(void)
pRtlMultiByteToUnicodeN(pathbufW , sizeof(pathbufW), NULL, test->path, strlen(test->path)+1 );
ret = pRtlGetFullPathName_U( pathbufW,MAX_PATH, rbufferW, &file_part);
ok( ret == len || (test->alt_rname && ret == strlen(test->alt_rname)*sizeof(WCHAR)),
- "Wrong result %d/%d for \"%s\"\n", ret, len, test->path );
+ "Wrong result %ld/%d for \"%s\"\n", ret, len, test->path );
ok(pRtlUnicodeToMultiByteN(rbufferA,MAX_PATH,&reslen,rbufferW,(lstrlenW(rbufferW) + 1) * sizeof(WCHAR)) == STATUS_SUCCESS,
"RtlUnicodeToMultiByteN failed\n");
ok(!lstrcmpA(rbufferA,test->rname) || (test->alt_rname && !lstrcmpA(rbufferA,test->alt_rname)),
@@ -580,7 +581,7 @@ static void test_RtlDosPathNameToNtPathName_U(void)
if (pRtlDosPathNameToNtPathName_U_WithStatus)
{
status = pRtlDosPathNameToNtPathName_U_WithStatus(error_paths[i], &nameW, &file_part, NULL);
- ok(status == STATUS_OBJECT_NAME_INVALID, "Got status %#x.\n", status);
+ ok(status == STATUS_OBJECT_NAME_INVALID, "Got status %#lx.\n", status);
}
winetest_pop_context();
@@ -600,7 +601,7 @@ static void test_RtlDosPathNameToNtPathName_U(void)
{
RtlFreeUnicodeString(&nameW);
status = pRtlDosPathNameToNtPathName_U_WithStatus(tests[i].dos, &nameW, &file_part, NULL);
- ok(status == STATUS_SUCCESS, "%s: Got status %#x.\n", debugstr_w(tests[i].dos), status);
+ ok(status == STATUS_SUCCESS, "%s: Got status %#lx.\n", debugstr_w(tests[i].dos), status);
}
ok(!wcscmp(nameW.Buffer, tests[i].nt)
@@ -711,7 +712,7 @@ static void test_nt_names(void)
if (handle) NtClose( handle );
todo_wine_if( tests[i].todo )
ok( status == tests[i].expect || broken( tests[i].broken && status == tests[i].broken ),
- "%u: got %x / %x for %s + %s\n", i, status, tests[i].expect,
+ "%u: got %lx / %lx for %s + %s\n", i, status, tests[i].expect,
debugstr_w( tests[i].root ), debugstr_w( tests[i].name ));
}
}
1
0