Hi,
I wrote NDIS Protocol Driver based on NDISUIO DDK sample.
It works fine but only under "Administrators" accounts.
Under normal user ("Power Users", "Backup Operators") CreateFile() fails with error 5 (access denied).
NDISUIO does the same.
I called MS Technical Support and the guy there trying to tell me that all communication drivers work only under Admin.???
Does not seem to make any sence.
After unsuccessful programmatic attempt to AdjustPriviledges() LogonUser() ImpersonateLoggedonUser()...
I have tried to change INF, but with no success (I could be wrong there).
Sorry for rather long post,
Thanks,
Alexei
Here how modified NDISUIO.inf it looks like:
;-------------------------------------------------------------------------
; NDISUIO.INF -- NDIS Usermode I/O Driver
;
; Copyright (c) 2000, Microsoft Corporation
;-------------------------------------------------------------------------
[version]
Signature = "$Windows NT$"
Class = NetTrans
ClassGUID = {4d36e975-e325-11ce-bfc1-08002be10318}
Provider = %Msft%
LayoutFile = layout.inf
[Manufacturer]
%Msft%=MSFT
[MSFT]
%NDISUIO_Desc%=Install, MS_NDISUIO
;-------------------------------------------------------------------------
; Installation Section
;-------------------------------------------------------------------------
[Install]
AddReg=Inst_Ndi
;changed by AK to make it visible and removable
;Characteristics=0x28 ; NCF_HIDDEN | NCF_NOT_USER_REMOVABLE
Characteristics=0x0 ; NCF_USER_REMOVABLE
CopyFiles=CpyFiles_Sys
;added by AK as an attempt to rovide all access to everybody
Security="D:(A;;GA;;;WD)"
;-------------------------------------------------------------------------
; Ndi installation support
;-------------------------------------------------------------------------
[Inst_Ndi]
HKR,Ndi,Service,,"Ndisuio"
HKR,Ndi,HelpText,,%NDISUIO_HelpText%
HKR, Ndi\Interfaces, UpperRange,, noupper
HKR,"Ndi\Interfaces","LowerRange",,"ndis5,ndis4,ndis5_uio"
;added by AK as an attempt to rovide all access to everybody
[Inst_Ndi.Security]
"D:(A;;GA;;;WD)"
;-------------------------------------------------------------------------
; Service installation support
;-------------------------------------------------------------------------
[Install.Services]
AddService=Ndisuio,,NDISUIO_Service_Inst
[Ndisuio_Service_Inst]
DisplayName = %NDISUIO_Desc%
ServiceType = 1 ;SERVICE_KERNEL_DRIVER
StartType = 3 ;SERVICE_MANUAL_START
ErrorControl = 1 ;SERVICE_ERROR_NORMAL
ServiceBinary = %12%\ndisuio.sys
LoadOrderGroup = NDIS
Description = %NDISUIO_Desc%
[Install.Remove.Services]
DelService=Ndisuio
;-------------------------------------------------------------------------
; Declare Destination Directories for file copy/deletion
;-------------------------------------------------------------------------
[DestinationDirs]
CpyFiles_Sys = 12 ; DIRID_DRIVERS
;-------------------------------------------------------------------------
; Files to Copy/Delete - Referenced by Install and Remove sections above
;-------------------------------------------------------------------------
[CpyFiles_Sys]
Ndisuio.sys,,,2
[Strings]
Msft = "Microsoft"
NDISUIO_Desc = "NDIS Usermode I/O Protocol"
NDISUIO_HelpText = "A driver to support user-mode I/O on NDIS devices"