I have a feeling that you are probably “barking up the wrong tree”. However,
here goes.
First of all, CreateFile simply cannot be used to load .SYS drivers on
Windows 98. Sorry. It can be used to open them after they are loaded, but
not to load them…
If you are trying to load a .SYS driver on Windows 98 it should be of one of
several special “Windows Driver Model” (WDM) or “miniport” types.
If it is a WDM driver, then the installation is fairly complex at first
glance. Books like Walter Oney’s “Programming for the Windows Driver Model”
give fairly clear introductory descriptions. In addition, you may be able to
decipher the DDK documentation and examine the “toaster” WDM sample to get
on your feet.
WDM drivers are almost always associated with hardware, and are loaded using
a “Plug-And-Play” mechanism that involve bus drivers, etc.
Since you are using VtoolsD, perhaps you also have DriverWorks. There may be
some WDM samples there, although I have not looked.
However, if my memory serves you are probably more interested in NDIS
drivers.
NDIS drivers on Windows 98 are loaded by the NDIS wrapper. The drill is to
build an appropriate .INF file and install the NDIS miniport driver using
the Network Control Panel Applet (NCPA). Having done this instalation, NDIS
will detect your miniport’s hardware and load your driver in a fashion
similar to PnP WDM’s.
If, for some bizzare reason, you are interested in dynamically loading a
.SYS NDIS protocol driver, then there is one additional option that can be
made to work. That is to use the NtKernLoadDriver VxD service. This can only
be called (AFAIK) from a helper VxD.
That’s all the help I have. Don’t ask me for more…
Good luck,
Thomas F. Divine
PCAUSA - Toolkits & Resources For Network Software Developers
NDIS Protocol - NDIS Intermediate - TDI Client/Filter
http: - http:
----- Original Message -----
From: “??? ???”
To: “NT Developers Interest List”
Cc: ; <“mailto:m"@yahoo.com
Sent: Friday, November 09, 2001 2:57 AM
Subject: [ntdev] Re: CreateFile on win98
> I have tried to change hFile=CreateFile(TEXT(”\\.\MYDRIVER")…
> to hFile=CreateFile(TEXT(“\\.\\MYDRIVER”)…but it still fails.
> GetLastError return 2. I have checked the name ,
> I have changed
> #define NT_DEVICE_NAME L"\Device\MYDRIVER"
> #define DOS_DEVICE_NAME L"\DosDevices\MYDRIVER"
> to
> #define NT_DEVICE_NAME L"\Device\MYDRIVER"
> #define DOS_DEVICE_NAME L"\DosDevices\DOS_MYDRIVER".
> But CreateFile strill returns fail. My driver is .sys. In MSDN
documents,on
> win98,
> to open a vxd ,you can use hFile=CreateFile(TEXT(“\\.\MYDRIVER”)…
,it
> means to open MYDRIVER.vxd. How can I open .sys file ?
> I can see all device names with softice command “device”. But it can’t
> see the symboliclink names. I want to know whether the symboliclink names
> exist on win98 or not?
> thanks for your help.
> zhaoling
>
—
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</http:></http:>