Thank you Ladislav. Sorry for insufficient information. I have added the
following routine in fspylib.c & called.
#if WINVER < 0x0501
NTSTATUS AttachToFileSystemByName(
PUNICODE_STRING FileSystemName
)
{
PDEVICE_OBJECT fsDeviceObject = NULL;
PDRIVER_OBJECT FsDriverObject = NULL;
NTSTATUS Status = STATUS_SUCCESS;
PNAME_CONTROL devName;
NTSTATUS status;
status = NLAllocateNameControl( &devName,
&gFileSpyNameBufferLookasideList );
// Reference object by name
if(NT_SUCCESS(Status))
{
Status = ObReferenceObjectByName(FileSystemName,
OBJ_CASE_INSENSITIVE,
NULL,
0,
NULL,
KernelMode,
NULL,
&FsDriverObject);
}
// If success, attach to all devices owned by the file system driver
if(NT_SUCCESS(Status))
{
for(fsDeviceObject = FsDriverObject->DeviceObject;
fsDeviceObject != NULL;
fsDeviceObject = fsDeviceObject->NextDevice)
{
if(fsDeviceObject->DeviceType ==
FILE_DEVICE_CD_ROM_FILE_SYSTEM||
fsDeviceObject->DeviceType ==
FILE_DEVICE_DISK_FILE_SYSTEM||
fsDeviceObject->DeviceType ==
FILE_DEVICE_FILE_SYSTEM ||
fsDeviceObject->DeviceType ==
FILE_DEVICE_NETWORK_FILE_SYSTEM)
{
Status =
SpyAttachToFileSystemDevice(fsDeviceObject,devName);
}
}
}
// Dereference the object pointer
if(fsDeviceObject!=NULL)
ObDereferenceObject(fsDeviceObject);
return Status;
}
#endif
I got the BSOD with following error.
STOP 0x000001E ( 0xC0000005,0x804B3096,0x00000000, 0x00000068)
KMODE_EXCEPTION_NOT_HANDLED
*Address 804B3096 base at 80400000, Datestamp 384d9b17 - ntoskrnl.exe
Is that enough??
Thanks in advance
Best Regards,
C.Ilango
Ladislav Zezula wrote:
> Problem is I have to attach all volumes without user intervention.
> Which is discussed earlier but no clear solution. As the link below
> uses ObReferenceObjectByName. There is a bug in that routine. Please,
> Can anyone help me out.
This is just another “I have written a driver and it does not work” post.
Welcome to the club.
Now seriously: If you really want someone to help, you have to provide
a description, not just “There’s a bug”. Does it crash ?
Or does is deadlock, return error status, or … ?
L.
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@srishtisoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com