NdisOpenFile cant find the file?

hi,
i wonder if someone has any pointers? i am trying to open a file from the
passthru sample of win2k ddk. the following code in the miniport initialize
function results in a NDIS_STATUS_FILE_NOT_FOUND status. what is going
wrong?

NDIS_STATUS myStatus;
NDIS_HANDLE myFileHandle;
UINT fileLength;
NDIS_STRING fileName=NDIS_STRING_CONST(“c:\junk.txt”);
NDIS_PHYSICAL_ADDRESS MinusOne=NDIS_PHYSICAL_ADDRESS_CONST(-1,-1);

NdisOpenFile(&myStatus,&myFileHandle,&fileLength,&fileName,MinusOne);

if(myStatus==NDIS_STATUS_SUCCESS){


}

if(myStatus==NDIS_STATUS_FILE_NOT_FOUND)
KdPrint((“\nFile not found”));

Any suggestions would be much appreciated.
thanx
yasser


MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus

Under NT and W2K, you can’t really specify a path for NdisOpenFile, just a
filename; the implicit directory is %SystemRoot%\System32\drivers.

Good luck,

Thomas F. Divine

www.ndis.com

“Yasser Toor” wrote in message news:xxxxx@ntdev…
>
> hi,
> i wonder if someone has any pointers? i am trying to open a file from the
> passthru sample of win2k ddk. the following code in the miniport
initialize
> function results in a NDIS_STATUS_FILE_NOT_FOUND status. what is going
> wrong?
>
> NDIS_STATUS myStatus;
> NDIS_HANDLE myFileHandle;
> UINT fileLength;
> NDIS_STRING fileName=NDIS_STRING_CONST(“c:\junk.txt”);
> NDIS_PHYSICAL_ADDRESS MinusOne=NDIS_PHYSICAL_ADDRESS_CONST(-1,-1);
>
>
> NdisOpenFile(&myStatus,&myFileHandle,&fileLength,&fileName,MinusOne);
>
> if(myStatus==NDIS_STATUS_SUCCESS){
> …
> …
> }
>
> if(myStatus==NDIS_STATUS_FILE_NOT_FOUND)
> KdPrint((“\nFile not found”));
>
> Any suggestions would be much appreciated.
> thanx
> yasser
>
>
> _________________________________________________________________
> MSN 8 with e-mail virus protection service: 2 months FREE*
> http://join.msn.com/?page=features/virus
>
>
>
>