some Nt vs. Zw fixes; these functions shouldn't be used in ntoskrnl but since they're shared there's a chance they could be used

svn path=/trunk/; revision=17992
This commit is contained in:
Thomas Bluemel 2005-09-22 23:50:38 +00:00
parent da28a303cc
commit c7781723f8
2 changed files with 7 additions and 7 deletions

View file

@ -266,7 +266,7 @@ RtlSetCurrentDirectory_U(PUNICODE_STRING dir)
NULL, NULL,
NULL); NULL);
Status = NtOpenFile (&handle, Status = ZwOpenFile (&handle,
SYNCHRONIZE | FILE_TRAVERSE, SYNCHRONIZE | FILE_TRAVERSE,
&Attr, &Attr,
&iosb, &iosb,
@ -281,12 +281,12 @@ RtlSetCurrentDirectory_U(PUNICODE_STRING dir)
} }
/* don't keep the directory handle open on removable media */ /* don't keep the directory handle open on removable media */
if (NT_SUCCESS(NtQueryVolumeInformationFile( handle, &iosb, &device_info, if (NT_SUCCESS(ZwQueryVolumeInformationFile( handle, &iosb, &device_info,
sizeof(device_info), FileFsDeviceInformation )) && sizeof(device_info), FileFsDeviceInformation )) &&
(device_info.Characteristics & FILE_REMOVABLE_MEDIA)) (device_info.Characteristics & FILE_REMOVABLE_MEDIA))
{ {
DPRINT1("don't keep the directory handle open on removable media\n"); DPRINT1("don't keep the directory handle open on removable media\n");
NtClose( handle ); ZwClose( handle );
handle = 0; handle = 0;
} }
@ -302,7 +302,7 @@ RtlSetCurrentDirectory_U(PUNICODE_STRING dir)
0, 0,
MAX_PATH*sizeof(WCHAR)+sizeof(ULONG)); MAX_PATH*sizeof(WCHAR)+sizeof(ULONG));
Status = NtQueryInformationFile(handle, Status = ZwQueryInformationFile(handle,
&iosb, &iosb,
filenameinfo, filenameinfo,
MAX_PATH*sizeof(WCHAR)+sizeof(ULONG), MAX_PATH*sizeof(WCHAR)+sizeof(ULONG),
@ -357,7 +357,7 @@ RtlSetCurrentDirectory_U(PUNICODE_STRING dir)
if (cd->Handle) if (cd->Handle)
NtClose(cd->Handle); ZwClose(cd->Handle);
cd->Handle = handle; cd->Handle = handle;
/* append trailing \ if missing */ /* append trailing \ if missing */
@ -961,7 +961,7 @@ RtlDoesFileExists_U(IN PWSTR FileName)
CurDir.Handle, CurDir.Handle,
NULL); NULL);
Status = NtQueryAttributesFile (&Attr, &Info); Status = ZwQueryAttributesFile (&Attr, &Info);
RtlFreeUnicodeString(&NtFileName); RtlFreeUnicodeString(&NtFileName);

View file

@ -325,7 +325,7 @@ RtlEncodePointer(IN PVOID Pointer)
ULONG Cookie; ULONG Cookie;
NTSTATUS Status; NTSTATUS Status;
Status = NtQueryInformationProcess(NtCurrentProcess(), Status = ZwQueryInformationProcess(NtCurrentProcess(),
ProcessCookie, ProcessCookie,
&Cookie, &Cookie,
sizeof(Cookie), sizeof(Cookie),