I don’t think you should return anything. The ClaimDevice function doesn’t
do anything with it, only the return status matters. That’s how I read it.
Maybe they just forgot to delete that line 
I do this in my driver:
…
switch(…)
{
…
// Claim device
case SRB_FUNCTION_CLAIM_DEVICE:
TRACE(( “PDO - SRB_FUNCTION_CLAIM_DEVICE\n”));
Srb->SrbStatus = SRB_STATUS_SUCCESS;
status = STATUS_SUCCESS;
ioInformation = 0;
break;
…
}
…
Irp->IoStatus.Status = status;
Irp->IoStatus.Information = ioInformation;
IoCompleteRequest (Irp, IO_NO_INCREMENT);
return status;
Zoltan
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.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
Hi,
This is not very good idea return success to every claim device request.
The code have to be a little bit more complex (return success to the first
caller only and clear internal claimed flag after storage PnP stack
rebuilds).
Regards,
Anton Kolomyeytsev
CoolDev.Com - Toolkits for Network & Storage Kernel Software Developers
“KoolSockets” & “KoolStorage” - TDI Client, Kernel Sockets, iSCSI port
www.CoolDev.Com xxxxx@CoolDev.Com xxxxx@CoolDev.Com
On 09/28/01, “” wrote:
> I don’t think you should return anything. The ClaimDevice function doesn’t
> do anything with it, only the return status matters. That’s how I read it.
> Maybe they just forgot to delete that line 
>
> I do this in my driver:
>
> …
> switch(…)
> {
> …
> // Claim device
> case SRB_FUNCTION_CLAIM_DEVICE:
> TRACE(( “PDO - SRB_FUNCTION_CLAIM_DEVICE\n”));
> Srb->SrbStatus = SRB_STATUS_SUCCESS;
> status = STATUS_SUCCESS;
> ioInformation = 0;
> break;
> …
> }
> …
> Irp->IoStatus.Status = status;
> Irp->IoStatus.Information = ioInformation;
> IoCompleteRequest (Irp, IO_NO_INCREMENT);
>
> return status;
>
> Zoltan
>
>
>
> _________________________________________________________
>
> Do You Yahoo!?
>
> Get your free @yahoo.com address at http://mail.yahoo.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
—
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