Hi,
it simply allocates space for a UNICODE_STRING structure.
At return, the regPath variable is initialized as a pointer to this
structure.
Then, it fills UNICODE_STRING fields.
This is done in sermdep.c as follows:
(Note that Buffer space is allocated int third line)
if (regPath) {
regPath->MaximumLength = RegistryPath->Length +
sizeof(UNICODE_NULL);
regPath->Length = RegistryPath->Length;
regPath->Buffer = ExAllocatePool(NonPagedPool,
regPath->MaximumLength);
if (regPath->Buffer) {
RtlZeroMemory(regPath->Buffer,
regPath->MaximumLength);
RtlMoveMemory(regPath->Buffer,
RegistryPath->Buffer,
RegistryPath->Length);
etc.
-----Original Message-----
From: David Mensik
Sent: lunes 12 de junio de 2000 20:59
To: File Systems Developers
Subject: [ntfsd] IoAllocateDriverObjectExtension (fwd)
Hi all,
what this function means, when:
NTSTATUS
IoAllocateDriverObjectExtension(
IN PDRIVER_OBJECT DriverObject,
IN PVOID ClientIdentificationAddress,
IN ULONG DriverObjectExtensionSize,
OUT PVOID *DriverObjectExtension
);
DriverObjectExtension
Points to, on completion, the allocated context area.
But the code (implementation is: )
PUNICODE_STRING regPath;
status = IoAllocateDriverObjectExtension(DriverObject,
(PVOID) 1,
sizeof(UNICODE_STRING),
(PVOID *) ®Path);
How can I understand this?
I can create DriverExtension and save pointer to registry path?
This code is from MS DDK sermdep.c (serial mouse port driver)
Ozon
******************************************
* David Mensik
* student of Palacky University
*
* e-mail: xxxxx@seznam.cz
* www: http://www.inf.upol.cz/~mensikd
* icq: 19658607
******************************************
You are currently subscribed to ntfsd as: xxxxx@pandasoftware.es
To unsubscribe send a blank email to $subst(‘Email.Unsub’)