SCSI miniport driver?

I?m just started to work with DDK, and I?d like to write a virtual disk.
I know I need to write a SCSI miniport driver.

  1. What is the minimum req. for a SCSI miniport driver? I created my
    first SCSI miniport driver based on win2k DDK sample, but I cannot
    install it. Device manager shows a yellow ?!? on the icon and the error
    code is 31. But it seems none of my code is called. Maybe my inf file is
    wrong !?

  2. I f I have my minidriver, how can I tell the PnP manager, a new disk
    is ?mounted?, and create the /device/Harddiskxx ?

Regards,

Zoltan

xxxxx@yahoo.com

Ps: I?d appreciate any sample code

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Srinivasa Rao
Deevi
Sent: Wednesday, June 20, 2001 8:13 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Doubt in using IoIntializeIrp ?

Thanks Eliyas.

I want the driver to work on Win2K and 9x systems . Is there any
alternate way other than using IoReuseIrp and include wdm.h ?

Thanks and regards
srinivas
-----Original Message-----
From: Eliyas Yakub [mailto:xxxxx@microsoft.com]
Sent: Wednesday, June 20, 2001 6:09 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Doubt in using IoIntializeIrp ?
You shouldn?t include both. You either include wdm.h or ntddk.h. You
include wdm.h if you want the driver to work on Win2K and 9x systems. If
you include ntddk.h, the driver will only work on Win2k and above.

-Eliyas

-----Original Message-----
From: Srinivasa Rao Deevi [mailto:xxxxx@Transilica.com]
Sent: Wednesday, June 20, 2001 5:26 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Doubt in using IoIntializeIrp ?

Thanks Eliyas !

if I remove the header file “wdm.h” and include only “ntddk.h” it works
. If I include both then it gives the error . Is there any I reason why
I should not add both ?

Thanks and regards
srinivas

-----Original Message-----
From: Eliyas Yakub [mailto:xxxxx@microsoft.com]
Sent: Wednesday, June 20, 2001 3:36 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Doubt in using IoIntializeIrp ?
The sample code is wrong. This sample has been removed from the XP DDK.
This article
(http://support.microsoft.com/support/kb/articles/q195/3/94.asp)
explains why you shouldn’t call IoInitilizaIrp on an IRP allocated by
IoAllocateIrp.

IoReuseIrp should work. Make sure you aren’t making spelling or caps
mistake in the function name.

-Eliyas

-----Original Message-----
From: Srinivasa Rao Deevi
Sent: Tue 6/19/2001 8:57 PM
To: NT Developers Interest List
Cc:
Subject: [ntdev] Doubt in using IoIntializeIrp ?
Hi all

In the example provided in DDK documentation the following allocates the
IRP
and Initializes with IoInitializeIrp but ddk documentation says it
should
not be done that way . When I am trying to use IoReuseIrp I am getting
linker error . Anybody can suggest something about this ?

C:\NTDDK\SRC\wdm\videocap\usbcamd\iso.c(588)

irp = IoAllocateIrp(stackSize,
FALSE);
if (irp == NULL) {
USBCAMD_KdPrint(MIN_TRACE, (“Failed to create an IRP.\n”));
return irp;
}

IoInitializeIrp(irp,
IoSizeOfIrp(stackSize),
stackSize);

nextStack = IoGetNextIrpStackLocation(irp);
ASSERT(nextStack != NULL);

nextStack->Parameters.Others.Argument1 = Urb;
nextStack->Parameters.DeviceIoControl.IoControlCode =
IOCTL_INTERNAL_USB_SUBMIT_URB;
nextStack->MajorFunction = IRP_MJ_INTERNAL_DEVICE_CONTROL;

IoSetCompletionRoutine(irp,
CompletionRoutine,
TransferExtension,
TRUE,
TRUE,
TRUE);

DDK Documentation says :
Comments
Drivers use IoInitializeIrp to initialize IRPs the driver allocated as
raw
memory. Drivers must not call IoInitializeIrp on an IRP that was
allocated
by IoAllocateIrp. Drivers must not use IoInitializeIrp to reinitialize
an
already initialized IRP. Instead, use IoReuseIrp.

Thanks in advance
srinivas


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

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

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

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

You are currently subscribed to ntdev as: xxxxx@yahoo.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