Windows 2008 R2 driver install problem

Hi
I developed store port driver based on this sample
https://msdn.microsoft.com/en-us/library/windows/hardware/ff567541(v=vs.85).aspx

the driver run and work on windows 8/2012 OS.
When I try to install the driver on Windows 2008R2 OS it fails , I attached the message from event viewer and my INF, Any idea why the driver not installed

and I get this error from event viewer
"Fault bucket , type 0
Event Name: PnPDriverImportError
Response: Not available
Cab Id: 0

Problem signature:
P1: x64
P2: 00000002
P3: vmstor.inf
P4: 09645298c00f38315e8e6678cf532880aa937643

Below attach the inf file

; VMSTOR.INF
;
; Copyright (c) 1998-2011, Microsoft Corporation.

[Version]
Signature=“$WINDOWS NT$”
Class=SCSIAdapter
ClassGUID={4D36E97B-E325-11CE-BFC1-08002BE10318}
Provider=%MSFT%
DriverVer=08/04/2015,14.0.7.703
CatalogFile = vmstor.cat

[DestinationDirs]
DefaultDestDir = 12

[Manufacturer]
%MSFT%=MSFT, NTamd64

[MSFT.NTamd64]
%MPDeviceDesc%=VMSTOR_Device, %rootstr%

[VMSTOR_Device]
CopyFiles=@vmstor.sys

[VMSTOR_Device.HW]
AddReg = VMSTOR_Device_AddReg

[VMSTOR_Device_AddReg]
HKR, “ScsiPort”, “NeedsSystemShutdownNotification”, 0x00010001, 1

[VMSTOR_Device.Services]
AddService = vmstor, %SPSVCINST_ASSOCSERVICE%, VMSTOR_Service_Inst

[SourceDisksNames]
1 = %DiskId1%,

[SourceDisksFiles]
vmstor.sys = 1,

;
;— VMSTOR_Device Coinstaller installation ------
;

[VMSTOR_Device.CoInstallers]
AddReg=VMSTOR_Device_CoInstaller_AddReg
CopyFiles=VMSTOR_Device_CoInstaller_CopyFiles

[SourceDisksFiles]
WdfCoInstaller01011.dll=1, ; make sure the number matches with SourceDisksNames

[VMSTOR_Device_CoInstaller_AddReg]
HKR,CoInstallers32,0x00010000, “WdfCoInstaller01011.dll”

[VMSTOR_Device_CoInstaller_CopyFiles]
WdfCoInstaller01011.dll

[VMSTOR_Device.Wdf]
KmdfService = vmstor, VMSTOR_Device_wdfsect

[VMSTOR_Device_wdfsect]
KmdfLibraryVersion = $(KMDF_VERSION_MAJOR).$(KMDF_VERSION_MINOR)

[VMSTOR_Service_Inst]
DisplayName = %MPDeviceDesc%
ServiceType = %SERVICE_KERNEL_DRIVER%
StartType = %SERVICE_BOOT_START%
ErrorControl = %SERVICE_ERROR_NORMAL%
ServiceBinary = %12%\vmstor.sys
LoadOrderGroup = SCSI Miniport
AddReg = pnpsafe_isa_addreg

[pnpsafe_isa_addreg]
HKR, “Parameters\PnpInterface”, “1”, %REG_DWORD%, 0x00000001
;;;HKR, “Parameters”, “BreakOnEntry”, %REG_DWORD%, 0x00000000
;;;HKR, “Parameters”, “DebugLevel”, %REG_DWORD%, 0x000000ff
;;; The next 2 values will allow a 16 MB virtual harddisk as reported in Disk Manager (diskmgmt.msc).
HKR, “Parameters”, “VirtualDiskSize”, %REG_DWORD%, 0x01000000
HKR, “Parameters”, “PhysicalDiskSize”, %REG_DWORD%, 0x01000000
HKR, “Parameters”, “NbrLUNsperHBA”, %REG_DWORD%, 0x00000002
;;;HKR, “Parameters”, “CombineVirtDisks”, %REG_DWORD%, 0x00000001

[Strings]
MSFT = “NONAME”
SCSIClassName = “SCSI and RAID controllers”
MPDeviceDesc = “Emulated Storage”
DiskId1 = “Virtual Miniport Device Installation Disk #1
rootstr = “root\vmstor”

;*******************************************
;Handy macro substitutions (non-localizable)
SPSVCINST_ASSOCSERVICE = 0x00000002
SERVICE_KERNEL_DRIVER = 1
SERVICE_BOOT_START = 0
SERVICE_ERROR_NORMAL = 1

REG_DWORD = 0x00010001
REG_BINARY = 0x00000001
REG_SZ = 0x00000000

“PnPDriverImportError” kinda sounds like you’re importing something that
doesn’t exist on the older platform. Have you tried running Dependency
Walker?

http://dependencywalker.com/

(Also provided with the WDK, look for depends.exe)

-scott
OSR
@OSRDrivers

wrote in message news:xxxxx@ntdev…

Hi
I developed store port driver based on this sample
https://msdn.microsoft.com/en-us/library/windows/hardware/ff567541(v=vs.85).aspx

the driver run and work on windows 8/2012 OS.
When I try to install the driver on Windows 2008R2 OS it fails , I attached
the message from event viewer and my INF, Any idea why the driver not
installed

and I get this error from event viewer
"Fault bucket , type 0
Event Name: PnPDriverImportError
Response: Not available
Cab Id: 0

Problem signature:
P1: x64
P2: 00000002
P3: vmstor.inf
P4: 09645298c00f38315e8e6678cf532880aa937643

Below attach the inf file

; VMSTOR.INF
;
; Copyright (c) 1998-2011, Microsoft Corporation.

[Version]
Signature=“$WINDOWS NT$”
Class=SCSIAdapter
ClassGUID={4D36E97B-E325-11CE-BFC1-08002BE10318}
Provider=%MSFT%
DriverVer=08/04/2015,14.0.7.703
CatalogFile = vmstor.cat

[DestinationDirs]
DefaultDestDir = 12

[Manufacturer]
%MSFT%=MSFT, NTamd64

[MSFT.NTamd64]
%MPDeviceDesc%=VMSTOR_Device, %rootstr%

[VMSTOR_Device]
CopyFiles=@vmstor.sys

[VMSTOR_Device.HW]
AddReg = VMSTOR_Device_AddReg

[VMSTOR_Device_AddReg]
HKR, “ScsiPort”, “NeedsSystemShutdownNotification”, 0x00010001, 1

[VMSTOR_Device.Services]
AddService = vmstor, %SPSVCINST_ASSOCSERVICE%, VMSTOR_Service_Inst

[SourceDisksNames]
1 = %DiskId1%,

[SourceDisksFiles]
vmstor.sys = 1,

;
;— VMSTOR_Device Coinstaller installation ------
;

[VMSTOR_Device.CoInstallers]
AddReg=VMSTOR_Device_CoInstaller_AddReg
CopyFiles=VMSTOR_Device_CoInstaller_CopyFiles

[SourceDisksFiles]
WdfCoInstaller01011.dll=1, ; make sure the number matches with
SourceDisksNames

[VMSTOR_Device_CoInstaller_AddReg]
HKR,CoInstallers32,0x00010000, “WdfCoInstaller01011.dll”

[VMSTOR_Device_CoInstaller_CopyFiles]
WdfCoInstaller01011.dll

[VMSTOR_Device.Wdf]
KmdfService = vmstor, VMSTOR_Device_wdfsect

[VMSTOR_Device_wdfsect]
KmdfLibraryVersion = $(KMDF_VERSION_MAJOR).$(KMDF_VERSION_MINOR)

[VMSTOR_Service_Inst]
DisplayName = %MPDeviceDesc%
ServiceType = %SERVICE_KERNEL_DRIVER%
StartType = %SERVICE_BOOT_START%
ErrorControl = %SERVICE_ERROR_NORMAL%
ServiceBinary = %12%\vmstor.sys
LoadOrderGroup = SCSI Miniport
AddReg = pnpsafe_isa_addreg

[pnpsafe_isa_addreg]
HKR, “Parameters\PnpInterface”, “1”, %REG_DWORD%, 0x00000001
;;;HKR, “Parameters”, “BreakOnEntry”, %REG_DWORD%, 0x00000000
;;;HKR, “Parameters”, “DebugLevel”, %REG_DWORD%, 0x000000ff
;;; The next 2 values will allow a 16 MB virtual harddisk as reported in
Disk Manager (diskmgmt.msc).
HKR, “Parameters”, “VirtualDiskSize”, %REG_DWORD%, 0x01000000
HKR, “Parameters”, “PhysicalDiskSize”, %REG_DWORD%, 0x01000000
HKR, “Parameters”, “NbrLUNsperHBA”, %REG_DWORD%, 0x00000002
;;;HKR, “Parameters”, “CombineVirtDisks”, %REG_DWORD%, 0x00000001

[Strings]
MSFT = “NONAME”
SCSIClassName = “SCSI and RAID controllers”
MPDeviceDesc = “Emulated Storage”
DiskId1 = “Virtual Miniport Device Installation Disk #1
rootstr = “root\vmstor”

;*******************************************
;Handy macro substitutions (non-localizable)
SPSVCINST_ASSOCSERVICE = 0x00000002
SERVICE_KERNEL_DRIVER = 1
SERVICE_BOOT_START = 0
SERVICE_ERROR_NORMAL = 1

REG_DWORD = 0x00010001
REG_BINARY = 0x00000001
REG_SZ = 0x00000000

Hi
I tried to use dependency walker but didn’t find the missing dependency , any idea how to proceed?

Yes, there is in option you can turn on in gflags called loader snaps that will spit out info in what dynamic link referenced are being processed. You might read http://blogs.msdn.com/b/junfeng/archive/2006/11/20/debugging-loadlibrary-failures.aspx, this works for kernel code too if you set things up right. Googling “loader snaps kernel” should give you good leads.

Jan

On 8/5/15, 10:51 PM, “xxxxx@lists.osr.com on behalf of xxxxx@gmail.com” wrote:

>Hi
>I tried to use dependency walker but didn’t find the missing dependency , any idea how to proceed?
>
>
>—
>NTDEV is sponsored by OSR
>
>Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
>OSR is HIRING!! See http://www.osr.com/careers
>
>For our schedule of WDF, WDM, debugging and other seminars visit:
>http://www.osr.com/seminars
>
>To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Hi
thanks Jan for the reply, I tried to set the flag in kernel tab “show loader snap” , but it fails.
tried to google the tool, but only code user space example, can someone post tutorial or explanation how to set the tools to see driver dependency problem

Is your DriverEntry being called?

Also, did you run Depends on your host machine or your target? You need to
run it on the target…

-scott
OSR
@OSRDrivers

wrote in message news:xxxxx@ntdev…

Hi
thanks Jan for the reply, I tried to set the flag in kernel tab “show loader
snap” , but it fails.
tried to google the tool, but only code user space example, can someone post
tutorial or explanation how to set the tools to see driver dependency
problem

DriverEntry is not being called.
I run depend on the target machine.

Try this http://blogs.msdn.com/b/doronh/archive/2006/03/13/550844.aspx

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Thursday, August 6, 2015 10:17 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Windows 2008 R2 driver install problem

DriverEntry is not being called.
I run depend on the target machine.


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Hi
I used depend and I found that “KeInitializeSpinLock” cause the problem in NTOSKRNL.exe.
For the test I deleted “KeInitializeSpinLock” and run depend and no error where found
How can I solve this issue ?

Another question regarding Dan post, in order to understand module depend using windbg should I use Kernel debug option and then follow the step in your tutorial

For what OS version are you building the driver?

The driver must be built for the version older then it will run on. Violating this rule causes exactly this kind of issues.


Maxim S. Shatskih
Microsoft MVP on File System And Storage
xxxxx@storagecraft.com
http://www.storagecraft.com

wrote in message news:xxxxx@ntdev…
> Hi
> I developed store port driver based on this sample
> https://msdn.microsoft.com/en-us/library/windows/hardware/ff567541(v=vs.85).aspx
>
> the driver run and work on windows 8/2012 OS.
> When I try to install the driver on Windows 2008R2 OS it fails , I attached the message from event viewer and my INF, Any idea why the driver not installed
>
>
> and I get this error from event viewer
> “Fault bucket , type 0
> Event Name: PnPDriverImportError
> Response: Not available
> Cab Id: 0
>
> Problem signature:
> P1: x64
> P2: 00000002
> P3: vmstor.inf
> P4: 09645298c00f38315e8e6678cf532880aa937643
>
>
> Below attach the inf file
>
>
> ; VMSTOR.INF
> ;
> ; Copyright (c) 1998-2011, Microsoft Corporation.
>
> [Version]
> Signature=”$WINDOWS NT$"
> Class=SCSIAdapter
> ClassGUID={4D36E97B-E325-11CE-BFC1-08002BE10318}
> Provider=%MSFT%
> DriverVer=08/04/2015,14.0.7.703
> CatalogFile = vmstor.cat
>
> [DestinationDirs]
> DefaultDestDir = 12
>
> [Manufacturer]
> %MSFT%=MSFT, NTamd64
>
> [MSFT.NTamd64]
> %MPDeviceDesc%=VMSTOR_Device, %rootstr%
>
> [VMSTOR_Device]
> CopyFiles=@vmstor.sys
>
> [VMSTOR_Device.HW]
> AddReg = VMSTOR_Device_AddReg
>
> [VMSTOR_Device_AddReg]
> HKR, “ScsiPort”, “NeedsSystemShutdownNotification”, 0x00010001, 1
>
> [VMSTOR_Device.Services]
> AddService = vmstor, %SPSVCINST_ASSOCSERVICE%, VMSTOR_Service_Inst
>
> [SourceDisksNames]
> 1 = %DiskId1%,
>
> [SourceDisksFiles]
> vmstor.sys = 1,
>
> ;
> ;— VMSTOR_Device Coinstaller installation ------
> ;
>
> [VMSTOR_Device.CoInstallers]
> AddReg=VMSTOR_Device_CoInstaller_AddReg
> CopyFiles=VMSTOR_Device_CoInstaller_CopyFiles
>
> [SourceDisksFiles]
> WdfCoInstaller01011.dll=1, ; make sure the number matches with SourceDisksNames
>
> [VMSTOR_Device_CoInstaller_AddReg]
> HKR,CoInstallers32,0x00010000, “WdfCoInstaller01011.dll”
>
> [VMSTOR_Device_CoInstaller_CopyFiles]
> WdfCoInstaller01011.dll
>
>
> [VMSTOR_Device.Wdf]
> KmdfService = vmstor, VMSTOR_Device_wdfsect
>
> [VMSTOR_Device_wdfsect]
> KmdfLibraryVersion = $(KMDF_VERSION_MAJOR).$(KMDF_VERSION_MINOR)
>
> [VMSTOR_Service_Inst]
> DisplayName = %MPDeviceDesc%
> ServiceType = %SERVICE_KERNEL_DRIVER%
> StartType = %SERVICE_BOOT_START%
> ErrorControl = %SERVICE_ERROR_NORMAL%
> ServiceBinary = %12%\vmstor.sys
> LoadOrderGroup = SCSI Miniport
> AddReg = pnpsafe_isa_addreg
>
> [pnpsafe_isa_addreg]
> HKR, “Parameters\PnpInterface”, “1”, %REG_DWORD%, 0x00000001
> ;;;HKR, “Parameters”, “BreakOnEntry”, %REG_DWORD%, 0x00000000
> ;;;HKR, “Parameters”, “DebugLevel”, %REG_DWORD%, 0x000000ff
> ;;; The next 2 values will allow a 16 MB virtual harddisk as reported in Disk Manager (diskmgmt.msc).
> HKR, “Parameters”, “VirtualDiskSize”, %REG_DWORD%, 0x01000000
> HKR, “Parameters”, “PhysicalDiskSize”, %REG_DWORD%, 0x01000000
> HKR, “Parameters”, “NbrLUNsperHBA”, %REG_DWORD%, 0x00000002
> ;;;HKR, “Parameters”, “CombineVirtDisks”, %REG_DWORD%, 0x00000001
>
> [Strings]
> MSFT = “NONAME”
> SCSIClassName = “SCSI and RAID controllers”
> MPDeviceDesc = “Emulated Storage”
> DiskId1 = “Virtual Miniport Device Installation Disk #1
> rootstr = “root\vmstor”
>
> ; *******************************************
> ;Handy macro substitutions (non-localizable)
> SPSVCINST_ASSOCSERVICE = 0x00000002
> SERVICE_KERNEL_DRIVER = 1
> SERVICE_BOOT_START = 0
> SERVICE_ERROR_NORMAL = 1
>
> REG_DWORD = 0x00010001
> REG_BINARY = 0x00000001
> REG_SZ = 0x00000000
>
>

I would like the driver to run on Windows 2008R2 and windows 2012 R2 ,
The driver must be built for the version older then it will run on? how can configure it

Build for 2008R2/Win7 target OS.


Maxim S. Shatskih
Microsoft MVP on File System And Storage
xxxxx@storagecraft.com
http://www.storagecraft.com

wrote in message news:xxxxx@ntdev…
>I would like the driver to run on Windows 2008R2 and windows 2012 R2 ,
> The driver must be built for the version older then it will run on? how can configure it
>
>

I looked at visual studio 2013 configuration manager i have Win32/X64 - where i configure 2008R2/Win7 target OS?

On 05-Aug-2015 16:58, Scott Noone wrote:

“PnPDriverImportError” kinda sounds like you’re importing something that
doesn’t exist on the older platform. Have you tried running Dependency
Walker?

As I’ve learned recently, “PnPDriverImportError” likely means
some problem with getting a driver package from driver store (or staging)

– pa

Hi
Pavel , as i posted before I used depend and I found that “KeInitializeSpinLock” cause the problem in NTOSKRNL.exe.
For the test I deleted “KeInitializeSpinLock” and run depend and no error where found
How can I compile the project change the project for 2008R2/Win7 target OS.

xxxxx@gmail.com wrote:

Pavel , as i posted before I used depend and I found that “KeInitializeSpinLock” cause the problem in NTOSKRNL.exe.
For the test I deleted “KeInitializeSpinLock” and run depend and no error where found
How can I compile the project change the project for 2008R2/Win7 target OS.

There are two master parameters in every VS project: Platform and
Configuration. In Platform, you have the choice of Win32 vs x64. In
Configuration, a normal project has the choice of Release or Debug, but
a driver project has a longer list of choices: Win7 Release, Win7
Debug, Win8.1 Release, Win8.1 Debug, etc. That’s the choice you need
to tweak.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.