FsRtlRegisterUncProvider problem

Hi,
Im having trouble getting FsRtlRegisterUncProvider() to work. The function
returns STATUS_INVALID_PARAMETER (0xC00000E)

Heres the code. The device object is created successfully.

Am I missing something obvious?

Thanks,
Jagannath


RtlInitUnicodeString(&fsDeviceName, L"\Simplefs");

/* Create our file system object, and register it with IO Manager.*/

ntStatus = IoCreateDevice(DriverObject,
0,
&fsDeviceName,
FILE_DEVICE_NETWORK_FILE_SYSTEM,
0,
FALSE,
&fsDevice);
if (!NT_SUCCESS(ntStatus)) {
DbgPrint ((“DriverEntry: Failed to create device object.\n”));
return ntStatus;
}

ntStatus = FsRtlRegisterUncProvider(&gMupHandle, &fsDeviceName, FALSE);
if (!NT_SUCCESS(ntStatus)) {
DbgPrint ((“DriverEntry: Error, registration failed: 0x%X!\n”,
ntStatus));
return ntStatus;
}

You can’t register a UNC provider until you have cleared the
DO_DEVICE_INITIALIZING bit. MUP is going to open your device object (of
course) and if that bit is still set then the open will fail. That may NOT
be the problem, but in the code fragment you sent, that was the first bug
that jumped out at me.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: Jagannath Krishnan [mailto:xxxxx@hotmail.com]
Sent: Tuesday, May 20, 2003 6:02 PM
To: File Systems Developers
Subject: [ntfsd] FsRtlRegisterUncProvider problem

Hi,
Im having trouble getting FsRtlRegisterUncProvider() to work. The function
returns STATUS_INVALID_PARAMETER (0xC00000E)

Heres the code. The device object is created successfully.

Am I missing something obvious?

Thanks,
Jagannath


RtlInitUnicodeString(&fsDeviceName, L"\Simplefs");

/* Create our file system object, and register it with IO Manager.*/

ntStatus = IoCreateDevice(DriverObject,
0,
&fsDeviceName,
FILE_DEVICE_NETWORK_FILE_SYSTEM,
0,
FALSE,
&fsDevice);
if (!NT_SUCCESS(ntStatus)) {
DbgPrint ((“DriverEntry: Failed to create device object.\n”));
return ntStatus;
}

ntStatus = FsRtlRegisterUncProvider(&gMupHandle, &fsDeviceName, FALSE);
if (!NT_SUCCESS(ntStatus)) {
DbgPrint ((“DriverEntry: Error, registration failed: 0x%X!\n”,
ntStatus));
return ntStatus;
}


You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

What OS? NT4?
NT4 requires FsRtlRegisterUncProvider to be called from the system
thread, not the app’s thread.

Max

----- Original Message -----
From: “Jagannath Krishnan”
To: “File Systems Developers”
Sent: Wednesday, May 21, 2003 2:02 AM
Subject: [ntfsd] FsRtlRegisterUncProvider problem

> Hi,
> Im having trouble getting FsRtlRegisterUncProvider() to work. The
function
> returns STATUS_INVALID_PARAMETER (0xC00000E)
>
> Heres the code. The device object is created successfully.
>
> Am I missing something obvious?
>
> Thanks,
> Jagannath
>
> --------------------------------------------------------
>
> RtlInitUnicodeString(&fsDeviceName, L"\Simplefs");
>
> /* Create our file system object, and register it with IO
Manager.*/
>
> ntStatus = IoCreateDevice(DriverObject,
> 0,
> &fsDeviceName,
> FILE_DEVICE_NETWORK_FILE_SYSTEM,
> 0,
> FALSE,
> &fsDevice);
> if (!NT_SUCCESS(ntStatus)) {
> DbgPrint ((“DriverEntry: Failed to create device object.\n”));
> return ntStatus;
> }
>
> ntStatus = FsRtlRegisterUncProvider(&gMupHandle, &fsDeviceName,
FALSE);
> if (!NT_SUCCESS(ntStatus)) {
> DbgPrint ((“DriverEntry: Error, registration failed: 0x%X!\n”,
> ntStatus));
> return ntStatus;
> }
>
> —
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com