Hi Jose,
ZwQueryDir… isn’t exported from the NT 4 kernel so u cant just call it
like u’d call IoCreateDevice() or something.
Can I call NtQueryDirectoryObject. (I see that winobj uses
NtQueryDirectoryObjecty). If so what are its parameters.
on win2k u’ve coded either the prototype or the parameters passed to
zwquerydir… incorrectly. can’t tell without seeing what u did. Finally,
crashing the OS is >almost always considered wrong.
I am attaching the code
Please take a look.
Tahnks and regards
Jeseem
mailto:xxxxx@hotmail.com
HANDLE hRootDir = NULL; // declared global
NTSTATUS OpenRootDirectory()
{
NTSTATUS Status = STATUS_SUCCESS;
OBJECT_ATTRIBUTES ObjAttr;
UNICODE_STRING FileName;
do
{
RtlInitUnicodeString(&FileName,L"\");
InitializeObjectAttributes ( &ObjAttr, &FileName,
OBJ_CASE_INSENSITIVE,
NULL, NULL );
Status = ZwOpenDirectoryObject(&hRootDir,DIRECTORY_QUERY,&ObjAttr);
if (STATUS_SUCCESS != Status) break;
Status = GetDirectoryList(hRootDir);
}while(0);
return Status;
}
NTSTATUS GetDirectoryList( HANDLE hDir)
{
NTSTATUS Status = STATUS_SUCCESS;
char c[300] = {0};
ULONG ulRetLength=0;
Status =
ZwQueryDirectoryObject(hDir,(PVOID)&c[0],150,FALSE,FALSE,NULL,&ulRetLength);
return Status;
}
----- Original Message -----
From: Jose Flores
To: NT Developers Interest List
Sent: Friday, December 29, 2000 7:13 AM
Subject: [ntdev] RE: ZwQueryDirectoryObject
ZwQueryDir… isn’t exported from the NT 4 kernel so u cant just call it
like u’d call IoCreateDevice() or something.
on win2k u’ve coded either the prototype or the parameters passed to
zwquerydir… incorrectly. can’t tell without seeing what u did. Finally,
crashing the OS is almost always considered wrong.
-----Original Message-----
From: Jeseem S [mailto:xxxxx@hotmail.com]
Sent: Thursday, December 28, 2000 7:23 PM
To: NT Developers Interest List
Subject: [ntdev] ZwQueryDirectoryObject
Hi,
I am trying to call ZwQueryDirectoryObject.
However in NT4.0 my driver fails to load if I use this call.
In Win2K the call crashes the OS.
Any Ideas on what I am doing wrong?
Regards
Jeseem
mailto:xxxxx@hotmail.com
You are currently subscribed to ntdev as: xxxxx@timesn.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: xxxxx@hotmail.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com