Sample Code

Windows Driver Samples/ NDIS Virtual Miniport Driver/ C++/ 630/ netvmini630.inf/

;-------------------------------------------------------------------------------
; NETVMINI630.INF
;
; Microsoft Virtual Ethernet Adapter
;
; Copyright (c) Microsoft Corporation.  All rights reserved.


[version]
Signature   = "$Windows NT$"
Class       = Net
ClassGUID   = {4d36e972-e325-11ce-bfc1-08002be10318}
Provider    = %Msft%
DriverVer   = 06/22/2010,6.1.7065.0
PnpLockDown = 1
CatalogFile     = netvmini630.cat


[ControlFlags]
ExcludeFromSelect={b85b7c50-6a01-11d2-b841-00c04fad5171}\NetVMini6300

[Manufacturer]
%Msft% = Msft,NTx86,NTia64,NTamd64,NTarm

[Msft]
; Empty section to block legacy operating systems that don't understand TargetOSVersion

[Msft.NTx86]
%NetVMini.DeviceDesc%    = NetVMini.ndi, root\NetVMini630_a ; Root enumerated 
%NetVMini.DeviceDesc%    = NetVMini.ndi, root\NetVMini630_b
%NetVMini.DeviceDesc%    = NetVMini.ndi, root\NetVMini630_c
%NetVMini.DeviceDesc%    = NetVMini.ndi, root\NetVMini630_d
%NetVMini.DeviceDesc%    = NetVMini.ndi, {b85b7c50-6a01-11d2-b841-00c04fad5171}\NetVMini630 ; Toaster Bus enumerated 

[Msft.NTia64]
%NetVMini.DeviceDesc%    = NetVMini.ndi, root\NetVMini630_a ; Root enumerated 
%NetVMini.DeviceDesc%    = NetVMini.ndi, root\NetVMini630_b
%NetVMini.DeviceDesc%    = NetVMini.ndi, root\NetVMini630_c
%NetVMini.DeviceDesc%    = NetVMini.ndi, root\NetVMini630_d
%NetVMini.DeviceDesc%    = NetVMini.ndi, {b85b7c50-6a01-11d2-b841-00c04fad5171}\NetVMini630 ; Toaster Bus enumerated 

[Msft.NTamd64]
%NetVMini.DeviceDesc%    = NetVMini.ndi, root\NetVMini630_a ; Root enumerated 
%NetVMini.DeviceDesc%    = NetVMini.ndi, root\NetVMini630_b
%NetVMini.DeviceDesc%    = NetVMini.ndi, root\NetVMini630_c
%NetVMini.DeviceDesc%    = NetVMini.ndi, root\NetVMini630_d
%NetVMini.DeviceDesc%    = NetVMini.ndi, {b85b7c50-6a01-11d2-b841-00c04fad5171}\NetVMini630 ; Toaster Bus enumerated 

[Msft.NTarm]
%NetVMini.DeviceDesc%    = NetVMini.ndi, root\NetVMini630_a ; Root enumerated 
%NetVMini.DeviceDesc%    = NetVMini.ndi, root\NetVMini630_b
%NetVMini.DeviceDesc%    = NetVMini.ndi, root\NetVMini630_c
%NetVMini.DeviceDesc%    = NetVMini.ndi, root\NetVMini630_d
%NetVMini.DeviceDesc%    = NetVMini.ndi, {b85b7c50-6a01-11d2-b841-00c04fad5171}\NetVMini630 ; Toaster Bus enumerated 


;-------------------------------------------------------------------------------
; Microsoft Virtual Ethernet Adapter
;
[NetVMini.ndi]
Characteristics    = 0x1 ; NCF_VIRTUAL
*IfType            = 0x6 ; IF_TYPE_ETHERNET_CSMACD
*MediaType         = 0x0 ; NdisMedium802_3
*PhysicalMediaType = 14  ; NdisPhysicalMedium802_3
AddReg             = NetVMini.Reg
AddReg		       = NetVMiniReceiveFiltering.Reg
AddReg             = NetVMiniQOS.Reg
CopyFiles          = NetVMini.CopyFiles

[NetVMini.ndi.Services]
AddService         = NetVMini630, 2, NetVMini.Service, NetVMini.EventLog

; Sets up VMQ related parameters
[NetVMiniReceiveFiltering.Reg]
HKR, Ndi\Params\*VMQ,                       ParamDesc,              0, %*VMQ%
HKR, Ndi\Params\*VMQ,                       default,                0, "1"
HKR, Ndi\Params\*VMQ\Enum,                  "0",                    0, %Disabled%
HKR, Ndi\Params\*VMQ\Enum,                  "1",                    0, %Enabled%
HKR, Ndi\Params\*VMQ,                       type,                   0, "enum"
HKR, Ndi\Params\*VMQLookaheadSplit,         ParamDesc,              0, %*VMQLookaheadSplit%
HKR, Ndi\Params\*VMQLookaheadSplit,         default,                0, "1"
HKR, Ndi\Params\*VMQLookaheadSplit\Enum,    "0",                    0, %Disabled%
HKR, Ndi\Params\*VMQLookaheadSplit\Enum,    "1",                    0, %Enabled%
HKR, Ndi\Params\*VMQLookaheadSplit,         type,                   0, "enum"
HKR, Ndi\Params\*VMQVlanFiltering,          ParamDesc,              0, %*VMQVlanFiltering%
HKR, Ndi\Params\*VMQVlanFiltering,          default,                0, "1"
HKR, Ndi\Params\*VMQVlanFiltering\Enum,     "0",                    0, %Disabled%
HKR, Ndi\Params\*VMQVlanFiltering\Enum,     "1",                    0, %Enabled%
HKR, Ndi\Params\*VMQVlanFiltering,          type,                   0, "enum"

; Sets up QOS related parameters
[NetVMiniQOS.Reg]
HKR, Ndi\Params\*QOS,                       ParamDesc,              0, %*QOS%
HKR, Ndi\Params\*QOS,                       default,                0, "1"
HKR, Ndi\Params\*QOS,                       type,                   0, "enum"
HKR, Ndi\Params\*QOS\Enum,                  "0",                    0, %Disabled%
HKR, Ndi\Params\*QOS\Enum,                  "1",                    0, %Enabled%

;*PriorityVLANTag 
HKR, Ndi\Params\*PriorityVLANTag,       ParamDesc, , %*PriorityVLANTag%
HKR, Ndi\Params\*PriorityVLANTag,       default,   , "3"
HKR, Ndi\Params\*PriorityVLANTag,       type,      , "enum"
HKR, Ndi\Params\*PriorityVLANTag\enum,  0,         ,  %PriorityVLANDisabled%
HKR, Ndi\Params\*PriorityVLANTag\enum,  1,         ,  %PriorityEnabled%
HKR, Ndi\Params\*PriorityVLANTag\enum,  2,         ,  %VLANEnabled%
HKR, Ndi\Params\*PriorityVLANTag\enum,  3,         ,  %PriorityVLANEnabled%


;-----------------------------------------------------------------------------
; Microsoft Virtual Miniport Common
;
[NetVMini.Reg]
HKR,    ,                         BusNumber,           0, "0" 
HKR, Ndi,                         Service,             0, "NetVMini630"
HKR, Ndi\Interfaces,              UpperRange,          0, "ndis5"
HKR, Ndi\Interfaces,              LowerRange,          0, "ethernet"

;-----------------------------------------------------------------------------
; Driver and Service Section
;
[NetVMini.CopyFiles]
NetVMini630.sys,,,2

[NetVMini.Service]
DisplayName        = %NetVMini.Service.DispName%
ServiceType        = 1 ;%SERVICE_KERNEL_DRIVER%
StartType          = 3 ;%SERVICE_DEMAND_START%
ErrorControl       = 1 ;%SERVICE_ERROR_NORMAL%
ServiceBinary      = %12%\netvmini630.sys
LoadOrderGroup     = NDIS
AddReg             = TextModeFlags.Reg

[NetVMini.EventLog]
AddReg             = NetVMini.AddEventLog.Reg

[NetVMini.AddEventLog.Reg]
HKR, , EventMessageFile, 0x00020000, "%%SystemRoot%%\System32\netevent.dll"
HKR, , TypesSupported,   0x00010001, 7

[TextModeFlags.Reg]
HKR, , TextModeFlags,    0x00010001, 0x0001

[SourceDisksNames]
1 = %DiskId1%,,,""

[SourceDisksFiles]
netvmini630.sys  = 1,,

;-----------------------------------------------------------------------------
; DestinationDirs
;
[DestinationDirs]
NetVMini.CopyFiles = 12

;-----------------------------------------------------------------------------
; Localizable Strings
;
[Strings]
Msft                         = "Microsoft"                      
NetVMini.DeviceDesc          = "Microsoft Virtual Ethernet Adapter (NDIS 6.30)"
NetVMini.Service.DispName    = "Microsoft Virtual Miniport (NDIS 6.30)"
DiskId1                      = "Microsoft Virtual Miniport Device Installation Disk #1"

*VMQ                         = "Virtual Machine Queues"
*VMQLookaheadSplit           = "Look Ahead Split"
*VMQVlanFiltering            = "VMQ VLAN ID Filtering"
*QOS                         = "NDIS QOS"
*PriorityVLANTag             = "Priority & VLAN"

Disabled                     = "Disabled"
Enabled                      = "Enabled"
PriorityVLANDisabled         = "Priority & VLAN Disabled"
PriorityEnabled              = "Priority Enabled"
VLANEnabled                  = "VLAN Enabled"
PriorityVLANEnabled          = "Priority & VLAN Enabled"

Our Services

  • What our customers say about us?

© 2011-2024 All Rights Reserved. Joya Systems. 4425 South Mopac Building II Suite 101 Austin, TX 78735 Tel: 800-DEV-KERNEL

Privacy Policy. Terms of use. Valid XHTML & CSS