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: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

If I recall correctly, this function prefixes your file name with something
like “%SYSTEMROOT%\System32\Drivers”. Isn’t that both clever and
undocumented? There probably is some knowledgebase article that explains
this.

Mark Roddy
xxxxx@hollistech.com
www.hollistech.com
WindowsNT Windows 2000 Consulting Services

-----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: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com