Bus Driver Question

What’s a bus driver suppose to do for the following three DeviceIO control
requests

IOCTL_MOUNTDEV_LINK_CREATED
IOCTL_VOLUME_ONLINE
IOCTL_UNIQUE_ID_CHANGE_NOTIFY

I am currently having trouble with my storage devices coming up with
multiple symbolic links for each device.
For Instance.

My cdrom driver will come up located in explorer at D: and E:. The device
will only work in E:. When I reboot, the driver’s device is only shown at
E: it should be D:.

The above IOCTLs are the only
IOCTLs my bus driver for these devices do not handle. I am especially
confused with the IOCTL_UNIQUE_ID_CHANGE_NOTIFY IOCTL. I believe I should
not be recieving this IOCTL because my
device is not a removable device. In addition, I do not understand the
parameters and what to do with them for each of these IOCTLs.

1)IOCTL_MOUNTDEV_LINK_CREATED
Input Parameter = It looks like the following
struct
{
USHORT Size: //size of the created Symbolic
Link buffer.
PSTR SymbolicLink; //the actual Symbolic Link
name.
}
Output Parameter = None.

What am I suppose to do with this symbolic link? Am I suppose to call
IoSetDeviceInterfaceState? Or am I suppose to save this Symbolic Link and
other subsequent calls of this IOCTL for later calling
IoSetDeviceInterfaceState during a IOCTL_VOLUME_ONLINE.

2)IOCTL_VOLUME_ONLINE
Input Parameter = None.
Output Parameter = None.

What’s this IOCTL call for? Do I call IoSetDeviceInterfaceState with all
the Symbolic Links given to me with the IOCTL_MOUNTDEV_LINK_CREATED IOCTL?

3)IOCTL_UNIQUE_ID_CHANGE_NOTIFY
This one I am really confused with.

Input Parameter =
typedef struct _MOUNTDEV_UNIQUE_ID {
USHORT UniqueIdLength;
UCHAR UniqueId[1];
} MOUNTDEV_UNIQUE_ID, *PMOUNTDEV_UNIQUE_ID;

Output Parameter =
typedef struct _MOUNTDEV_UNIQUE_ID_CHANGE_NOTIFY_OUTPUT {
ULONG Size;
USHORT OldUniqueIdOffset;
USHORT OldUniqueIdLength;
USHORT NewUniqueIdOffset;
USHORT NewUniqueIdLength;
} MOUNTDEV_UNIQUE_ID_CHANGE_NOTIFY_OUTPUT,
*PMOUNTDEV_UNIQUE_ID_CHANGE_NOTIFY_OUTPUT;

Why is this called. The Input UniqueId looks like the returned Symbolic
Link Name for my call to IoRegisterDeviceInterface with a GUID of
MOUNTDEV_MOUNTED_DEVICE_GUID in my FDO of the bus driver’s device stack.
What the hell is the Old UniqueId and the New UniqueId and why is it
changing? I see no reason for it changing because after all, It’s an Unique
ID to the system.

None of these IOCTLS are documented in the DDK. In addition, there is no
examples of these calls in the DDK src directory.

Thanks In advance,
Joe


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I forgot to mention that my disk driver that is attached to my bus driver
does a BSOD after the
three IOCTLs below are failed by the bus driver. It is occurring in
ntoskrnl.exe. Here is a dump
of the stack

*** Fatal System Error: 0x0000001e
(0xC0000005,0x804B8CC8,0x00000000,0x00000004)

Break instruction exception - code 80000003 (first chance)

A fatal system error has occurred.
Debugger entered on first try; Bugcheck callbacks have not been invoked.

A fatal system error has occurred.

eax=00000003 ebx=0000001e ecx=f901ad28 edx=00000000 esi=c0000005
edi=f901a958
eip=80452e70 esp=f901a914 ebp=f901a940 iopl=0 nv up ei pl zr na po
nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000
efl=00000246
ntoskrnl!RtlpBreakWithStatusInstruction:
80452e70 cc int 3
ChildEBP RetAddr Args to Child
f901a910 8042bcb9 00000003 f901a958 c0000005
ntoskrnl!RtlpBreakWithStatusInstruction
f901a940 8042c068 00000003 80409808 00000000
ntoskrnl!KiBugCheckDebugBreak+0x31
f901acc8 8045249c 00000000 c0000005 804b8cc8 ntoskrnl!KeBugCheckEx+0x37b
f901ace0 8045251c f901ad08 8045cc77 f901ad10
ntoskrnl!PspUnhandledExceptionInSystemThread+0x18
f901bddc 80465b62 8054aca6 80088000 00000000
ntoskrnl!PspSystemThreadStartup+0x5e
00000000 00000000 00000000 00000000 00000000 ntoskrnl!KiThreadStartup+0x16
Bugcheck code 0000001E
Arguments c0000005 804b8cc8 00000000 00000004
ntoskrnl!RtlpBreakWithStatusInstruction:
80452e70 cc int 3
kd> !kdex2x86.strct EXCEPTION_POINTERS f901ad08
Loaded kdex2x86 extension DLL
struct _EXCEPTION_POINTERS (sizeof=8)
+0 struct _EXCEPTION_RECORD *ExceptionRecord = F901B190
+4 struct _CONTEXT *ContextRecord = F901ADE8
kd> !kdextx86.cxr f901ade8

CtxFlags: 00010017
eax=00000004 ebx=fe58c730 ecx=f901b284 edx=00000014 esi=e128e588
edi=fe58c7b8
eip=804b8cc8 esp=f901b258 ebp=f901b264 iopl=0 nv up ei pl nz na pe
nc
vip=0 vif=0
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000
efl=00010202
804b8cc8 663b10 cmp dx,[eax]

kd> !kv
ChildEBP RetAddr Args to Child
f901b264 8044e1e2 00000000 f901b284 00000001
ntoskrnl!ObpLookupDirectoryEntry+0xab
f901b2b4 804957ae 00000000 f901b300 00000040
ntoskrnl!ObpLookupObjectName+0x428
f901b3c4 804c09c9 00000000 fe5e63e0 00000000
ntoskrnl!ObOpenObjectByName+0xc5
f901b420 8054e630 f901b658 00000001 f901b640
ntoskrnl!NtOpenSymbolicLinkObject+0x8f
f901b690 8054d18d f901b84c f901b7e4 8046b02c
ntoskrnl!IopStoreSystemPartitionInformation+0x3a
f901b864 8054d99a 80088000 80088000 000000bb
ntoskrnl!IopCreateArcNames+0x718
f901b8b8 8054c574 80088000 f901ba00 00000000
ntoskrnl!IopInitializeBootDrivers+0x432
f901ba58 8054b35a 80088000 00000000 00000000 ntoskrnl!IoInitSystem+0x5ef
f901bda8 804524f6 80088000 00000000 00000000
ntoskrnl!Phase1Initialization+0x71b
f901bddc 80465b62 8054aca6 80088000 00000000
ntoskrnl!PspSystemThreadStartup+0x69
00000000 00000000 00000000 00000000 00000000 ntoskrnl!KiThreadStartup+0x16

Thanks In advance again,
Joe

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Joe Moriarty
Sent: Friday, January 12, 2001 11:06 AM
To: NT Developers Interest List
Subject: [ntdev] Bus Driver Question

What’s a bus driver suppose to do for the following three DeviceIO control
requests

IOCTL_MOUNTDEV_LINK_CREATED
IOCTL_VOLUME_ONLINE
IOCTL_UNIQUE_ID_CHANGE_NOTIFY

I am currently having trouble with my storage devices coming up with
multiple symbolic links for each device.
For Instance.

My cdrom driver will come up located in explorer at D: and E:. The device
will only work in E:. When I reboot, the driver’s device is only shown at
E: it should be D:.

The above IOCTLs are the only
IOCTLs my bus driver for these devices do not handle. I am especially
confused with the IOCTL_UNIQUE_ID_CHANGE_NOTIFY IOCTL. I believe I should
not be recieving this IOCTL because my
device is not a removable device. In addition, I do not understand the
parameters and what to do with them for each of these IOCTLs.

1)IOCTL_MOUNTDEV_LINK_CREATED
Input Parameter = It looks like the following
struct
{
USHORT Size: //size of the created Symbolic
Link buffer.
PSTR SymbolicLink; //the actual Symbolic Link
name.
}
Output Parameter = None.

What am I suppose to do with this symbolic link? Am I suppose to call
IoSetDeviceInterfaceState? Or am I suppose to save this Symbolic Link and
other subsequent calls of this IOCTL for later calling
IoSetDeviceInterfaceState during a IOCTL_VOLUME_ONLINE.

2)IOCTL_VOLUME_ONLINE
Input Parameter = None.
Output Parameter = None.

What’s this IOCTL call for? Do I call IoSetDeviceInterfaceState with all
the Symbolic Links given to me with the IOCTL_MOUNTDEV_LINK_CREATED IOCTL?

3)IOCTL_UNIQUE_ID_CHANGE_NOTIFY
This one I am really confused with.

Input Parameter =
typedef struct _MOUNTDEV_UNIQUE_ID {
USHORT UniqueIdLength;
UCHAR UniqueId[1];
} MOUNTDEV_UNIQUE_ID, *PMOUNTDEV_UNIQUE_ID;

Output Parameter =
typedef struct _MOUNTDEV_UNIQUE_ID_CHANGE_NOTIFY_OUTPUT {
ULONG Size;
USHORT OldUniqueIdOffset;
USHORT OldUniqueIdLength;
USHORT NewUniqueIdOffset;
USHORT NewUniqueIdLength;
} MOUNTDEV_UNIQUE_ID_CHANGE_NOTIFY_OUTPUT,
*PMOUNTDEV_UNIQUE_ID_CHANGE_NOTIFY_OUTPUT;

Why is this called. The Input UniqueId looks like the returned Symbolic
Link Name for my call to IoRegisterDeviceInterface with a GUID of
MOUNTDEV_MOUNTED_DEVICE_GUID in my FDO of the bus driver’s device stack.
What the hell is the Old UniqueId and the New UniqueId and why is it
changing? I see no reason for it changing because after all, It’s an Unique
ID to the system.

None of these IOCTLS are documented in the DDK. In addition, there is no
examples of these calls in the DDK src directory.

Thanks In advance,
Joe


You are currently subscribed to ntdev as: xxxxx@east.sun.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com