Fw: RE: NdisOpenFile on Win2k

Perhaps you could try using ZwCreateFile(…). That is fairly well
documented in the DDK - the file name and it’s relation to a given root
directory are described by the ObjectAttributes parameter.

Ed Lau

MidCore Software, Inc.
900 Straits Tpke
Middlebury, CT 06762

www.midcore.com

>
> > -----Original Message-----
> > From: Michael Minnick [mailto:xxxxx@sigmatel.com]
> > Sent: Thursday, February 01, 2001 11:41 AM
> > To: NT Developers Interest List
> > Subject: [ntdev] NdisOpenFile on Win2k
> >
> >
> > Is anyone aware of issues with NdisOpenFile() on Win2k (build 2195)?
> > I am trying to open a microcode file to download to a DSP during
> > MiniPortInitialize() in my Ndis5 Miniport driver. The following code
> > works fine on Win98Se but on Win2K it returns
> > NDIS_STATUS_FILE_NOT_FOUND.
> >
> > static NDIS_STRING RomCodeString = NDIS_STRING_CONST(“C:\a.txt”);
> > NdisPrintString(RomCodeString);
> > DbgPrint(“\n”);
> >
> > NdisSetPhysicalAddressLow(HighestAddr, ~0);
> > NdisSetPhysicalAddressHigh(HighestAddr, ~0);
> >
> > NdisOpenFile(&Status,
> > &pAdapter->RomCodeHandle,
> > &pAdapter->RomCodeLength,
> > &RomCodeString,
> > HighestAddr
> > );
> > if (Status != NDIS_STATUS_SUCCESS)
> > {
> > DbgPrint(“Could not open rom code file, status =
> > 0x%x\n”, Status);
> >
> > }
> >
> > I have also tried the string “\DosDevices\C:\a.txt”, but
> > that doesn’t
> >
> > work on Win98Se or Win2K. I am aware that on Win2K an NDIS_STRING is
> > a UNICODE string; RomCodeString looks fine when on both systems when
> > I view it in the debugger or print it out with NdisPrintString().
> >
> > Mike Minnick
> > xxxxx@sigmatel.com
> >
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@stratus.com
> > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> >
>
> —
> You are currently subscribed to ntdev as: xxxxx@midcore.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

Hello,

for a long long time I have used this function in NT 3.51 and my
name for the file was without any path and driver definition,only the
pure file name. The file was in the directory \winnt\system32\drivers.

elli


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