RE: What is missing here? (read Registry from DriverE ntry )

I meant “never mind”! Sunday evening is not the best time to work :-)))

Vladimir

-----Original Message-----
From: Chtchetkine, Vladimir [mailto:xxxxx@starbase.com]
Sent: Sunday, April 28, 2002 7:55 PM
To: NT Developers Interest List
Subject: [ntdev] RE: What is missing here? (read Registry from DriverEntry )

Newer mind :slight_smile:

Vladimir

-----Original Message-----
From: Chtchetkine, Vladimir [mailto:xxxxx@starbase.com]
Sent: Sunday, April 28, 2002 7:27 PM
To: NT Developers Interest List
Subject: [ntdev] What is missing here? (read Registry from DriverEntry)

HANDLE hKey;
OBJECT_ATTRIBUTES aObjAttr;
UNICODE_STRING aKeyName;
NTSTATUS status;

hKey = NULL;

RtlInitUnicodeString( &aKeyName,
L"\Registry\Machine\Software\MyApp\Driver");
InitializeObjectAttributes( &aObjAttr, &aKeyName, (OBJ_KERNEL_HANDLE |
OBJ_CASE_INSENSITIVE), NULL, NULL);

status = ZwOpenKey( &hKey, KEY_QUERY_VALUE, NULL );

When ZwOpenKey returns “status” is always STATUS_ACCESS_VIOLATION (C0000005)

I wander why? I call this function within DriverEntry and my driver is
loaded at system time.

TIA,

Vladimir


You are currently subscribed to ntdev as: xxxxx@Starbase.com
To unsubscribe send a blank email to %%email.unsub%%


You are currently subscribed to ntdev as: xxxxx@Starbase.com
To unsubscribe send a blank email to %%email.unsub%%