Allocate VPB in file system filter driver

Hi!
Is there some way to allocate a new VPB in a file system filter driver. I
tried the next but it doesn’t work:

NewVpb = ExAllocatePool( NonPagedPool, sizeof( VPB );
RtlZeroMemory( NewVpb, sizeof( VPB ) );
IoAcquireVpbSpinLock( &SavedIrql );
NewVpb->Type = IO_TYPE_VPB;
NewVpb->Size = sizeof( VPB );
NewVpb->RealDevice = MyRealDeviceObject;
NewVpb->DeviceObject = NULL;
NewVpb->Flags &= ~VPB_MOUNTED;
IoReleaseVpbSpinLock( SavedIrql );

Do you have any ideas ???
Thanks!


Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at
http://profiles.msn.com.

You don’t need to acquire Vpb spin lock in the time
of its creation but only when you want to change
the Vpb pointer in some physical device object or
when you want to change some flag in any active Vpb.

Also the line
NewVpb->Flags &= ~VPB_MOUNTED;
has no effect because you have previously zeroed all the Vpb.

Also you yourself must free old Vpb after you have
changed the Vpb pointer in the device object.

For some interesting ideas try to look into FASTFAT sources
(looking for any Vpb word or ’ bpV’ for allocating and initializing)

Hope this helps
Paul

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Jack Brown
Sent: Wednesday, October 11, 2000 12:12 PM
To: File Systems Developers
Subject: [ntfsd] Allocate VPB in file system filter driver

Hi!
Is there some way to allocate a new VPB in a file system filter driver.
I
tried the next but it doesn’t work:

NewVpb = ExAllocatePool( NonPagedPool, sizeof( VPB );
RtlZeroMemory( NewVpb, sizeof( VPB ) );
IoAcquireVpbSpinLock( &SavedIrql );
NewVpb->Type = IO_TYPE_VPB;
NewVpb->Size = sizeof( VPB );
NewVpb->RealDevice = MyRealDeviceObject;
NewVpb->DeviceObject = NULL;
NewVpb->Flags &= ~VPB_MOUNTED;
IoReleaseVpbSpinLock( SavedIrql );

Do you have any ideas ???
Thanks!


_
Get Your Private, Free E-mail from MSN Hotmail at
http://www.hotmail.com.

Share information about yourself, create your own public profile at
http://profiles.msn.com.


You are currently subscribed to ntfsd as: xxxxx@compelson.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)