I'm trying to revive about 4 year old VPN Client written as a shim and a
virtual adaptor. Installation program does something like this:
1) snetcfg.exe -l .\shimmer.inf -c s -i no_shimmer
followed by
2) install.exe netvpntp.inf *no_vpntp

Those two programs were checked-into code base and compiled as part of the
build. I don't know if they were customized or not.

Now, when I try to run those commands from command line, snetcfg.exe crashes
and install.exe fails. Here are the respective stack trace and failure msgs.

snetcfg.exe crash:

msvcrt!wcscpy+0x8
netcfgx!HrCiInstallFilterDevice+0x192
netcfgx!CFilterDevices::InstallFilterDevicesIfNeeded+0x184
netcfgx!CModifyContext::ApplyChanges+0x5cb
netcfgx!CModifyContext::HrApplyIfOkOrCancel+0x24
netcfgx!CImplINetCfg::Apply+0x2f
snetcfg!HrInstallNetComponent+0x12f
snetcfg!wmain+0x14d
snetcfg!wmainCRTStartup+0x12b
KERNEL32!BaseProcessStart+0x3d


install.exe output:


.\install.exe netvpntp.inf *no_vpntp
Search for Device ID: [*no_vpntp]
Compare device ID: [ACPI\ACPI0003]
Compare device ID: [*ACPI0003]
Compare device ID: [ACPI\PNP0000]
Compare device ID: [*PNP0000]
.......
.......
Compare device ID: [USB\ROOT_HUB]
Compare device ID: [USB\OTHER_ID]
EnumDeviceInfo FAILURE: No more data is available.

GetINFClass FAILURE: The system cannot find the file specified.


Any help on why snetcfg is crashing would be greatly appreciated. Also, is
the failure in install.exe because of snetcfg crash or is there some other
reason ?

I will try to cut and paste .inf files in the next msgs.

thank you very much
Ramesh

here is shimmer.inf file by sirip

sirip
Wed Oct 12 18:13:02 CDT 2005

; -- SHIMMER.INF --
;
[Version]
Signature = "$Windows NT$"
Class = NetService
ClassGUID = {4D36E974-E325-11CE-BFC1-08002BE10318}
Provider = %XXXX%
DriverVer = 05/32/02,4.00.00.0052

[Manufacturer]
%XXXX% = XXXX

[ControlFlags]

[XXXX]
%Shimmer_Desc% = Shimmer.ndi, no_shimmer

[Shimmer.ndi]
AddReg = Shimmer.ndi.AddReg, Shimmer.AddReg
; Note:
; 1. The NCF_* flags are defined in netcfgx.h
; 2. NCF_HAS_UI (0x80) is required only if the filter has a Notify object
; and it supports custom property pages.
Characteristics = 0x490 ; 0x490 = NCF_HAS_UI (0x80) | NCF_FILTER (0x400) |
NCF_N
O_SERVICE (0x10) !!--Filter Specific--!!
CopyFiles = Shimmer.CopyFiles.Init, Shimmer.CopyFiles.Sys,
Shimmer.CopyFil
es.Inf

; ----------------------------------------------------------------------
; File copy
;
[SourceDisksNames]
1=%DiskDescription%,"",,

[SourceDisksFiles]
;shimmer.dll=1
shimmer.sys=1
shimmerm.inf=1

[DestinationDirs]
DefaultDestDir = 12
Shimmer.CopyFiles.Init = 11 ; %windir%\System32
Shimmer.CopyFiles.Sys = 12 ; %windir%\System32\drivers
Shimmer.CopyFiles.Inf = 17 ; %windir%\inf

; Copying of shimmer.dll is required only if the filter has a Notify object
[Shimmer.CopyFiles.Init]
;shimmer.dll,,,2

[Shimmer.CopyFiles.Sys]
shimmer.sys,,,6

[Shimmer.CopyFiles.Inf]
shimmerm.inf,,,6
; ----------------------------------------------------------------------
; Filter Install
;

[Shimmer.ndi.AddReg]
HKR, Ndi, HelpText, , %Shimmer_HELP%

; ----------------------------------------------------------------------
; Keys required if a Notify object is present
; These keys should be omitted if the Filter does not have any Notify object
;
; Note:
; 1. Only include the following lines if your filter has configuration UI
; that needs to be displayed. Otherwise, you should not need a notify
; object.
; 2. If you write your own notifyobject, use a different GUID for ClsID!!
; (Generate this with uuidgen.exe)
;
;HKR, Ndi, ClsID, , {79e86b46-6e2a-11d4-b50d-00a0c9a58854}
;HKR, Ndi, ComponentDll, , shimmer.dll

; ----------------------------------------------------------------------
; !!--Filter Specific--!!
;
; Note:
; 1. Other components may also have UpperRange/LowerRange but for filters
; the value of both of them must be noupper/nolower
; 2. The value FilterClass is required.
; 3. The value Service is required
; 4. FilterDeviceInfId is the InfId of the filter device (miniport) that will
; be installed for each filtered adapter.
; In this case this is no_shimmermp (refer to netsf_m.inf)
;
HKR, Ndi, FilterClass, , failover
HKR, Ndi, FilterDeviceInfFile, , shimmerm.inf
HKR, Ndi, FilterDeviceInfId, , no_shimmermp
HKR, Ndi, Service, , NdisShimTransport
HKR, Ndi\Interfaces, UpperRange, , noupper
HKR, Ndi\Interfaces, LowerRange, , nolower
HKR, Ndi\Interfaces, FilterMediaTypes, , "ethernet, tokenring, fddi, wan"

[Shimmer.AddReg]
; The following key is Required
; The following key is Shimmer specific
;HKR, Parameters, Param1, 0, 4

[Shimmer.Ndi.Remove.Services]
DelService = Shimmer

; ----------------------------------------------------------------------
[Strings]
XXXX = "XXXX"
DiskDescription = "XXXX VPN Client Disk"

Shimmer_Desc = "XXXX VPN Client"
Shimmer_HELP = "XXXX VPN Client"

Here is netvpntp.inf file by sirip

sirip
Wed Oct 12 18:15:01 CDT 2005

; netVPNTP.INF
;
; Dual .INF file for vpntp Network Adapter
;
; Copyright (c) 2000

[version]
signature="$CHICAGO$"
Class=Net
ClassGUID = {4d36e972-e325-11ce-bfc1-08002be10318}
Provider=%Mfg%
Compatible = 1
DriverVer = 05/32/02,4.00.00.0052
; Millenium exclusive suffix
MillenniumPreferred = .me
;CatalogFile = ... add for WHQL ...

[Manufacturer]
%Mfg%=Models

[ControlFlags]
// Note: Uncomment next line if your NIC is not to be installed manually
;ExcludeFromSelect = *NO_VPNTP

[Models]
; DisplayName Section hw-id
; ----------- ------- ------
%*VPNTP.devicedesc%=*vpntp.ndi, *NO_VPNTP

;-------------------------------------------------------------
; Win2K
[*vpntp.ndi.NT]
AddReg = vpntp.w2k.reg, VPNTP.params.reg
CopyFiles = vpntp.w2k.CopyFiles
;
Characteristics = 0x81 ; NCF_ flags

;-------------------------------------------------------------
; Win2K
[*vpntp.ndi.NT.Services]
AddService = vpntp, 2, vpntp.Service, vpntp.EventLog

;-------------------------------------------------------------
; Win2K
[vpntp.w2k.reg]
HKR, Ndi, Service, 0,"VPNTP"
HKR,,NetworkAddress,,004C75696769
HKR, Ndi\Interfaces, UpperRange, 0, "ndis5"
HKR, Ndi\Interfaces, LowerRange, 0, "ethernet"

;-------------------------------------------------------------------------------
; W9X Install Section
;
[*VPNTP.ndi]
AddReg=*VPNTP.ndi.reg, VPNTP.ndi.reg, VPNTP.params.reg
;

;-------------------------------------------------------------------------------
; PnP ID section for W9X
[*VPNTP.ndi.reg]
HKR,Ndi,DeviceID,,"*VPNTP"

[VPNTP.ndi.reg]
; Forced W9X install section
HKR,,DevLoader,,*ndis
HKR,,DeviceVxDs,,vpntp.sys
HKR,,EnumPropPages,,"netdi.dll,EnumPropPages"
HKR,,NetworkAddress,,004C75696769
; NDIS Info
HKR,NDIS,LogDriverName,,"vpntp"
HKR,NDIS,MajorNdisVersion,1,05
HKR,NDIS,MinorNdisVersion,1,00

; Interfaces
HKR,Ndi\Interfaces,DefUpper,,"ndis3,ndis4,ndis5"
HKR,Ndi\Interfaces,UpperRange,,"ndis3,ndis4,ndis5"
HKR, Ndi\Interfaces, LowerRange,,"ethernet"
HKR, Ndi\Interfaces, DefLower,,"ethernet"

; Install sectioins
HKR,Ndi\Install,ndis5,,"vpntp.ndis5"

; Install NDIS
[vpntp.ndis5]
CopyFiles=vpntp.w9x.CopyFiles

[vpntp.w9x.CopyFiles]
vpntp.sys

[vpntp.w2k.CopyFiles]
vpntp.sys

;-----------------------------------------------------------
; Sources
[SourceDisksNames]
99=%vpntp_disk%,"",0

[SourceDisksFiles]
vpntp.sys = 99

;-----------------------------------------------------------
; Destination Dir
[DestinationDirs]
DefaultDestDir =11 ; system dir
vpntp.w9x.CopyFiles =11 ; 9X: windows\system
vpntp.w2k.CopyFiles =12 ; W2K: system32\drivers

;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
; Optional Custom Parameters in the Registry ("Advanced" menu).
[VPNTP.params.reg]
; For example:
;HKR, Ndi\params\Mode, ParamDesc, 0, %Mode%
;HKR, Ndi\params\Mode, type, 0, "enum"
;HKR, Ndi\params\Mode, default, 0, "Default"
;HKR, Ndi\params\Mode\enum, Default, 0, %Mode_basic%
;HKR, Ndi\params\Mode\enum, Cool, 0, %Mode_cool%
;
HKR, NDI\params\MTUSize, ParamDesc, 0, %Mode%
HKR, NDI\params\MTUSize, type, 0, "dword"
HKR, NDI\params\MTUSize, default, 0, 1500
HKR, NDI\params\MTUSize, optional, 0, "1"
HKR, NDI\params\MTUSize, max, 0, 1500
HKR, NDI\params\MTUSize, min, 0, 800
;
;HKR, NDI\params\NetworkAddress, ParamDesc, 0, %NetworkAddress%
;HKR, NDI\params\NetworkAddress, type, 0, "edit"
;HKR, NDI\params\NetworkAddress, LimitText, 0, "12"
;HKR, NDI\params\NetworkAddress, UpperCase, 0, "1"
;HKR, NDI\params\NetworkAddress, default, 0, " "
;HKR, NDI\params\NetworkAddress, optional, 0, "1"

;------------------------------------------------------------
; W2K Service entry, log, etc.
[vpntp.Service]
DisplayName = %vpntp.Service.DispName%
ServiceType = 1 ;%SERVICE_KERNEL_DRIVER%
StartType = 3 ;%SERVICE_DEMAND_START%
ErrorControl = 1 ;%SERVICE_ERROR_NORMAL%
ServiceBinary = %12%\vpntp.sys
LoadOrderGroup = NDIS

[vpntp.EventLog]
AddReg = vpntp.AddEventLog.reg

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

;-------------------------------------------------------------------------------
; Localizable Strings
;
[strings]
Mfg="XXXX"
*VPNTP.DeviceDesc="XXXX Virtual Adapter"
vpntp.devicedesc = "XXXX Virtual Adapter"
vpntp.Service.DispName = "XXXX Virtual Adapter"
NetworkAddress = "Network Address (MAC)"
Mode = "MTU Size"
Mode_basic = "Basic"
Mode_cool = "Cool"
vpntp_disk = "XXXX VPN Client Install Disk"

Here is shimmerm.inf file by sirip

sirip
Wed Oct 12 18:17:09 CDT 2005

; -- SHIMMERM.INF --
;
[Version]
signature = "$Windows NT$"
Class = Net
ClassGUID = {4d36e972-e325-11ce-bfc1-08002be10318}
Provider = %XXXX%
DriverVer = 05/32/02,4.00.00.0052

[ControlFlags]
ExcludeFromSelect = no_shimmermp

[DestinationDirs]
DefaultDestDir=12
; No files to copy

[Manufacturer]
%XXXX% = XXXX

[XXXX]
%ShimmerMP_Desc% = ShimmerMP.ndi, no_shimmermp

[ShimmerMP.ndi]
Characteristics = 0x29 ;NCF_NOT_USER_REMOVABLE | NCF_VIRTUAL | NCF_HIDDEN
CopyFiles =

[ShimmerMP.ndi.Services]
AddService = Shimmer,0x2, ShimmerMP.AddService


[ShimmerMP.AddService]
DisplayName = %ShimmerMP_Desc%
ServiceType = 1 ;SERVICE_KERNEL_DRIVER
StartType = 3 ;SERVICE_DEMAND_START
ErrorControl = 1 ;SERVICE_ERROR_NORMAL
ServiceBinary = %12%\shimmer.sys
LoadOrderGroup = PNP_TDI
AddReg = ShimmerMP.AddService.AddReg


[ShimmerMP.AddService.AddReg]
; ----------------------------------------------------------------------
; Add any miniport-specific parameters here. These are params that your
; filter device is going to use.
;
;HKR, Parameters, ParameterName, 0x10000, "MultiSz", "Parameter", "Value"
;HKR, Parameters, ParameterName2, 0x10001, 4

[Strings]
XXXX = "XXXX"
ShimmerMP_Desc = "XXXX VPN Client Miniport"

[SourceDisksNames]
;None


[SourceDisksFiles]
;None


RE: snetcfg crashing...please help by sirip

sirip
Fri Oct 14 00:00:28 CDT 2005

Somebody, please, please help me....or give me clues on what I can poke/try
around ....

I've been tinkering .INF files, but not making much progress.

thanks


RE: snetcfg crashing...a bit of progress by sirip

sirip
Fri Oct 14 17:46:03 CDT 2005

snetcfg is working fine after I installed a fresh copy of W2K. I don't know
what other drivers were conflicting before.

Install.exe still is giving the same error and is not creating the device.
However, devcon.exe works fine...so, I'm ok for now. Can proceed to next
step...C u all there ;-)

thanks