driver install

Hello all,
I’m working on some NDIS protocol drivers. I’m facing some issues.
Could someone give me some feedbacks on this.

  1. I need to install the driver at runtime,in case it is not already
    installed. There is a sample code in the win2k ddk on this. However
    it requires me to pass a Device ID to it. Can someone tell me what
    id is this?

  2. Also my driver setup contains two files:
    mydriver.inf and mydriver.sys. This installs fine on a
    win 2k/XP platform , however when I try to install it on a Win 98
    platform , I get some errors during install. Do I need to change the
    contents in the INF file…? Also can I use .sys files for my driver on
    Win98 or do I need to create a .vxd file?

Thankyou,
Avinash

Avinash,

Copied below is a modified version of the NDISUIO protocol driver INF
that will install that driver in Windows 98. Also, be aware that the
string that is passed to your driver’s bind handler will be an ANSI
string. If you only use that pointer to turn around and call
NdisOpenAdapter you’ll be fine. However, if you manipulate it at all
(like NDISUIO does to save a copy), you will need to be aware of this
difference. You could merge this INF with your existing INF to make a
multi-platform INF that will install the driver in 9X and 2K/XP with the
same INF. Or you can use this INF standalone.

You will also notice the DeviceID in the INF.

Bryan S. Burgin
xxxxx@microsoft.com

This posting is provided “AS IS” with no warranties, and confers no
rights.

; NDISUIO.INF
;
; NDISUIO Transport
;
; Copyright 2001, Microsoft Corporation

[version]
signature=“$CHICAGO$”
Class=NetTrans
provider=%V_MS%

[Manufacturer]
%V_MS%=MS

[MS]
%NDISUIO.DeviceDesc%= NDISUIO.ndi, NDISUIO

;***********************************************************************
*****
; NDISUIO
;***********************************************************************
*****
[NDISUIO.ndi]
CopyFiles=NDISUIO.CopyFiles
AddReg=NDISUIO.ndi.reg
DeviceID=NDISUIO
MaxInstance=8

[NDISUIO.ndi.reg]
HKR,Ndi,DeviceID,NDISUIO
HKR,Ndi,MaxInstance,8
;;;HKR,Ndi,NdiInstaller,“MyNdi.dll,MyNdiProc”

; NDIS info
HKR,NDIS,LogDriverName,“NDISUIO”
HKR,NDIS,MajorNdisVersion,1,05
HKR,NDIS,MinorNdisVersion,1,00

; Interfaces
HKR,Ndi\Interfaces,DefUpper,“”
HKR,Ndi\Interfaces,DefLower,“ndis3,ndis4,ndis5”
HKR,Ndi\Interfaces,UpperRange,“”
HKR,Ndi\Interfaces,LowerRange,“ndis3,ndis4,ndis5”

; Install-Remove Sections
HKR,Ndi\Install,“NDISUIO.Install”
HKR,Ndi\Remove,“NDISUIO.Remove”

; Context help
HKR,Ndi,HelpText,%NDISUIO_HELP%

[NDISUIO.Install]
AddReg=NDISUIO.AddReg
DelReg=NDISUIO.Ins.DelReg
CopyFiles=NDISUIO.CopyFiles

[NDISUIO.AddReg]
HKR,DevLoader,*ndis,*ntkern
HKR,DeviceVxDs,“ndisuio.sys”

[NDISUIO.CopyFiles]
ndisuio.sys

[NDISUIO.Remove]
DelReg=NDISUIO.Rmv.DelReg
DelFiles=NDISUIO.CopyFiles

[NDISUIO.Rmv.DelReg]

;***********************************************************************
*****
; Destination Directories
;***********************************************************************
*****
[DestinationDirs]
NDISUIO.CopyFiles = 11 ; LDID_SYS

[SourceDisksNames]

[SourceDisksFiles]

;***********************************************************************
*****
; Localizable Strings
;***********************************************************************
*****
[strings]
V_MS=“Microsoft”
V_CLASSNAME=“Network Protocol”

; Devices
NDISUIO.DeviceDesc=“Sample NDISUIO Protocol Driver”

; Parameters
PARAM_YES=“Yes”
PARAM_NO=“No”
PARAM_OFF=“Off”
PARAM_NONE=“None”

; Context help
NDISUIO_HELP=“Sample Protocol Driver”

-----Original Message-----
From: xxxxx@gric.com [mailto:xxxxx@gric.com]
Sent: Wednesday, September 04, 2002 11:52 PM
To: NT Developers Interest List
Subject: [ntdev] driver install

Hello all,
I’m working on some NDIS protocol drivers. I’m facing some issues.
Could someone give me some feedbacks on this.

  1. I need to install the driver at runtime,in case it is not already
    installed. There is a sample code in the win2k ddk on this. However
    it requires me to pass a Device ID to it. Can someone tell me what
    id is this?

  2. Also my driver setup contains two files:
    mydriver.inf and mydriver.sys. This installs fine on a
    win 2k/XP platform , however when I try to install it on a Win 98
    platform , I get some errors during install. Do I need to change the
    contents in the INF file…? Also can I use .sys files for my driver on
    Win98 or do I need to create a .vxd file?

Thankyou,
Avinash


You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to %%email.unsub%%