How can I use DIFx API to install class filter driver like

Hi,

I have a class filter driver using a independent INF file like ClasFilt
sample INF file. How can I use DIFx API to install such driver?

Thanks
Wayne

Can you be more specific? The class filter is a legacy driver so you need to
set the legacy flag. If this is a WDF driver you also need to add the WDF
section to the inf file and need to call the WDF coinstaller in your install
program.

Bill Wandel

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]
On Behalf Of Wayne Gong
Sent: Thursday, April 16, 2009 11:05 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] How can I use DIFx API to install class filter driver like

Hi,

I have a class filter driver using a independent INF file like ClasFilt
sample INF file. How can I use DIFx API to install such driver?

Thanks
Wayne


NTDEV is sponsored by OSR

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

My class filter driver inf file is based on ClasFilt sample inf file.
It’s a filter driver above on PCI bus. It’s WDM driver. I have tried to
install such filter driver as what have done for other function driver.
It can work for win2k3 but cannot for win2k8. It looks like that DIFx
API cannot execute AddService and AddRegister inf sector, just execute
DefaultInstall section. So I cannot find properly register keys in
HLKM\System\Services. Then my filter driver cannot work fine on win2k8.

Thanks
Wayne

Bill Wandel wrote:

Can you be more specific? The class filter is a legacy driver so you need to
set the legacy flag. If this is a WDF driver you also need to add the WDF
section to the inf file and need to call the WDF coinstaller in your install
program.

Bill Wandel

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]
On Behalf Of Wayne Gong
Sent: Thursday, April 16, 2009 11:05 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] How can I use DIFx API to install class filter driver like

Hi,

I have a class filter driver using a independent INF file like ClasFilt
sample INF file. How can I use DIFx API to install such driver?

Thanks
Wayne


NTDEV is sponsored by OSR

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


NTDEV is sponsored by OSR

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 Wayne. As far as I know, Difx api won’t work for this case. Look at the source code for DevCon and use it to write your own app to do this using the various SeupDi APIs.

Wayne,

The AddService and AddRegister sections should be part of the
DefaultInstall.
I just tried installing a class filter on 64 bit W2K8 using the DIFx API. It
worked. I used DriverPackageInstallW(infPath, DRIVER_PACKAGE_LEGACY_MODE,
NULL, &needReboot). The driver installed and the class registry entries were
made. I confirmed that the driver was loaded after a reboot by checking the
devices with Device Manager. My filter filters more than one class.

I don’t see any advantage using DIFx over the similar setup API function.
Using the InstallHinfSection setup API call specifying the default section
works just as well and doesn’t require the DIFxAPI dll.

Bill Wandel

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]
On Behalf Of Wayne Gong
Sent: Saturday, April 18, 2009 12:11 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How can I use DIFx API to install class filter driver
like

My class filter driver inf file is based on ClasFilt sample inf file.
It’s a filter driver above on PCI bus. It’s WDM driver. I have tried to
install such filter driver as what have done for other function driver.
It can work for win2k3 but cannot for win2k8. It looks like that DIFx API
cannot execute AddService and AddRegister inf sector, just execute
DefaultInstall section. So I cannot find properly register keys in
HLKM\System\Services. Then my filter driver cannot work fine on win2k8.

Thanks
Wayne

Bill Wandel wrote:

Can you be more specific? The class filter is a legacy driver so you
need to set the legacy flag. If this is a WDF driver you also need to
add the WDF section to the inf file and need to call the WDF
coinstaller in your install program.

Bill Wandel

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]
On Behalf Of Wayne Gong
Sent: Thursday, April 16, 2009 11:05 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] How can I use DIFx API to install class filter driver
like

Hi,

I have a class filter driver using a independent INF file like
ClasFilt sample INF file. How can I use DIFx API to install such driver?

Thanks
Wayne


NTDEV is sponsored by OSR

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


NTDEV is sponsored by OSR

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


NTDEV is sponsored by OSR

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 Bill,

Thanks for your clarification.

In my driver installer, also use DriverPackageInstall to install my
class filter driver, but it looks like doesn’t work. AddRegister and
AddService section doesn’t executed at all. Please help me to check my
inf file to see is anything wrong with it. Thanks.

— My INF file –
;/*++
;
;Copyright Description
;
;–*/
[Version]
Signature=“$WINDOWS NT$”
Provider=%ORACLE%
Class=System
ClassGuid={4D36E97D-E325-11CE-BFC1-08002BE10318}
DriverPackageType=ClassFilter
CatalogFile=“OvmWinPV.cat”
DriverVer=04/20/2009,1.0.4.0

[SourceDisksFiles]
xenhide.sys = 1

[SourceDisksNames.x86]
1 = %Disk1%,.\i386

[SourceDisksNames.amd64]
1 = %Disk1%,.\amd64

[SourceDisksNames]
1 = %Disk1%,.\i386

[DestinationDirs]
DefaultDestDir = 12

[DefaultInstall.NT]
CopyFiles = @xenhide.sys
AddReg = XenHide_AddReg

[XenHide_AddReg]
HKLM,
System\CurrentControlSet\Control\Class{4D36E97D-E325-11CE-BFC1-08002BE10318},
UpperFilters, 0x00010008, xenhide

[DefaultInstall.NT.Services]
AddService = XenHide, , XenHide_Service_Inst

[XenHide_Service_Inst]
DisplayName = %XenHide.SvcDesc%
ServiceType = 1
StartType = 0
ErrorControl = 1
ServiceBinary = %12%\xenhide.sys

[Strings]
ORACLE = “Oracle Corporation”
Disk1 = “Virtual Hide Driver Installation Disk”
XenHide.SvcDesc = “Oracle VM Virtual Hide Driver”
REG_EXPAND_SZ = 0x00020000
REG_DWORD = 0x00010001

– End –

ChkInf log:

Warnings:
Line 0: (W22.1.9998) NOTE: The ChkInf tool does not verify the WDF
sections and directives of the INF file.
Line 11: (W22.1.2202) Unrecognized directive: DriverPackageType
Line 35: (W22.1.2213) INF files should not set registry entries under
‘HKLM,System\CurrentControlSet\Control\Class’.

Thanks
Wayne

Bill Wandel wrote:

Wayne,

The AddService and AddRegister sections should be part of the
DefaultInstall.
I just tried installing a class filter on 64 bit W2K8 using the DIFx API. It
worked. I used DriverPackageInstallW(infPath, DRIVER_PACKAGE_LEGACY_MODE,
NULL, &needReboot). The driver installed and the class registry entries were
made. I confirmed that the driver was loaded after a reboot by checking the
devices with Device Manager. My filter filters more than one class.

I don’t see any advantage using DIFx over the similar setup API function.
Using the InstallHinfSection setup API call specifying the default section
works just as well and doesn’t require the DIFxAPI dll.

Bill Wandel

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]
On Behalf Of Wayne Gong
Sent: Saturday, April 18, 2009 12:11 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How can I use DIFx API to install class filter driver
like

My class filter driver inf file is based on ClasFilt sample inf file.
It’s a filter driver above on PCI bus. It’s WDM driver. I have tried to
install such filter driver as what have done for other function driver.
It can work for win2k3 but cannot for win2k8. It looks like that DIFx API
cannot execute AddService and AddRegister inf sector, just execute
DefaultInstall section. So I cannot find properly register keys in
HLKM\System\Services. Then my filter driver cannot work fine on win2k8.

Thanks
Wayne

Bill Wandel wrote:

> Can you be more specific? The class filter is a legacy driver so you
> need to set the legacy flag. If this is a WDF driver you also need to
> add the WDF section to the inf file and need to call the WDF
> coinstaller in your install program.
>
> Bill Wandel
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com]
> On Behalf Of Wayne Gong
> Sent: Thursday, April 16, 2009 11:05 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] How can I use DIFx API to install class filter driver
> like
>
> Hi,
>
> I have a class filter driver using a independent INF file like
> ClasFilt sample INF file. How can I use DIFx API to install such driver?
>
> Thanks
> Wayne
>
> —
> NTDEV is sponsored by OSR
>
> 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
>
>
> —
> NTDEV is sponsored by OSR
>
> 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
>
>


NTDEV is sponsored by OSR

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


NTDEV is sponsored by OSR

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

The only thing that I see wrong in your inf is the Class and ClassGuid
should be a name and GUID that you make up. It should not be an existing
name and guid. This is not what is stopping your install.
I don’t have a cat file so my tests do not include one.

You should step back and try to install the class filter sample.

Bill Wandel

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]
On Behalf Of Wayne Gong
Sent: Monday, April 20, 2009 12:09 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How can I use DIFx API to install class filter driver
like

Hi Bill,

Thanks for your clarification.

In my driver installer, also use DriverPackageInstall to install my class
filter driver, but it looks like doesn’t work. AddRegister and AddService
section doesn’t executed at all. Please help me to check my inf file to see
is anything wrong with it. Thanks.

— My INF file –
;/*++
;
;Copyright Description
;
;–*/
[Version]
Signature=“$WINDOWS NT$”
Provider=%ORACLE%
Class=System
ClassGuid={4D36E97D-E325-11CE-BFC1-08002BE10318}
DriverPackageType=ClassFilter
CatalogFile=“OvmWinPV.cat”
DriverVer=04/20/2009,1.0.4.0

[SourceDisksFiles]
xenhide.sys = 1

[SourceDisksNames.x86]
1 = %Disk1%,.\i386

[SourceDisksNames.amd64]
1 = %Disk1%,.\amd64

[SourceDisksNames]
1 = %Disk1%,.\i386

[DestinationDirs]
DefaultDestDir = 12

[DefaultInstall.NT]
CopyFiles = @xenhide.sys
AddReg = XenHide_AddReg

[XenHide_AddReg]
HKLM,
System\CurrentControlSet\Control\Class{4D36E97D-E325-11CE-BFC1-08002BE10318
},
UpperFilters, 0x00010008, xenhide

[DefaultInstall.NT.Services]
AddService = XenHide, , XenHide_Service_Inst

[XenHide_Service_Inst]
DisplayName = %XenHide.SvcDesc%
ServiceType = 1
StartType = 0
ErrorControl = 1
ServiceBinary = %12%\xenhide.sys

[Strings]
ORACLE = “Oracle Corporation”
Disk1 = “Virtual Hide Driver Installation Disk”
XenHide.SvcDesc = “Oracle VM Virtual Hide Driver”
REG_EXPAND_SZ = 0x00020000
REG_DWORD = 0x00010001

– End –

ChkInf log:

Warnings:
Line 0: (W22.1.9998) NOTE: The ChkInf tool does not verify the WDF sections
and directives of the INF file.
Line 11: (W22.1.2202) Unrecognized directive: DriverPackageType Line 35:
(W22.1.2213) INF files should not set registry entries under
‘HKLM,System\CurrentControlSet\Control\Class’.

Thanks
Wayne

Bill Wandel wrote:

Wayne,

The AddService and AddRegister sections should be part of the
DefaultInstall.
I just tried installing a class filter on 64 bit W2K8 using the DIFx
API. It worked. I used DriverPackageInstallW(infPath,
DRIVER_PACKAGE_LEGACY_MODE, NULL, &needReboot). The driver installed
and the class registry entries were made. I confirmed that the driver
was loaded after a reboot by checking the devices with Device Manager. My
filter filters more than one class.

I don’t see any advantage using DIFx over the similar setup API function.
Using the InstallHinfSection setup API call specifying the default
section works just as well and doesn’t require the DIFxAPI dll.

Bill Wandel

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]
On Behalf Of Wayne Gong
Sent: Saturday, April 18, 2009 12:11 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How can I use DIFx API to install class filter
driver like

My class filter driver inf file is based on ClasFilt sample inf file.
It’s a filter driver above on PCI bus. It’s WDM driver. I have tried
to install such filter driver as what have done for other function driver.
It can work for win2k3 but cannot for win2k8. It looks like that DIFx
API cannot execute AddService and AddRegister inf sector, just execute
DefaultInstall section. So I cannot find properly register keys in
HLKM\System\Services. Then my filter driver cannot work fine on win2k8.

Thanks
Wayne

Bill Wandel wrote:

> Can you be more specific? The class filter is a legacy driver so you
> need to set the legacy flag. If this is a WDF driver you also need to
> add the WDF section to the inf file and need to call the WDF
> coinstaller in your install program.
>
> Bill Wandel
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com]
> On Behalf Of Wayne Gong
> Sent: Thursday, April 16, 2009 11:05 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] How can I use DIFx API to install class filter
> driver like
>
> Hi,
>
> I have a class filter driver using a independent INF file like
> ClasFilt sample INF file. How can I use DIFx API to install such driver?
>
> Thanks
> Wayne
>
> —
> NTDEV is sponsored by OSR
>
> 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
>
>
> —
> NTDEV is sponsored by OSR
>
> 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
>
>


NTDEV is sponsored by OSR

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


NTDEV is sponsored by OSR

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


NTDEV is sponsored by OSR

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

Have you tried installing it with DPInst.exe (which is also part of the DIFx
tool set)? DPInst and DIFxAPI use the same install engine underneath.
DPInst.exe also generates a log file (DPInst.log) and that might help
diagnose the problem. Once you solve the problem, you could go back to using
DIFxAPI.

“Wayne Gong” wrote in message news:xxxxx@ntdev…
> Hi Bill,
>
> Thanks for your clarification.
>
> In my driver installer, also use DriverPackageInstall to install my class
> filter driver, but it looks like doesn’t work. AddRegister and AddService
> section doesn’t executed at all. Please help me to check my inf file to
> see is anything wrong with it. Thanks.
>
> — My INF file –
> ;/++
> ;
> ;Copyright Description
> ;
> ;–
/
> [Version]
> Signature=“$WINDOWS NT$”
> Provider=%ORACLE%
> Class=System
> ClassGuid={4D36E97D-E325-11CE-BFC1-08002BE10318}
> DriverPackageType=ClassFilter
> CatalogFile=“OvmWinPV.cat”
> DriverVer=04/20/2009,1.0.4.0
>
> [SourceDisksFiles]
> xenhide.sys = 1
>
> [SourceDisksNames.x86]
> 1 = %Disk1%,.\i386
>
> [SourceDisksNames.amd64]
> 1 = %Disk1%,.\amd64
>
> [SourceDisksNames]
> 1 = %Disk1%,.\i386
>
> [DestinationDirs]
> DefaultDestDir = 12
>
> [DefaultInstall.NT]
> CopyFiles = @xenhide.sys
> AddReg = XenHide_AddReg
>
> [XenHide_AddReg]
> HKLM,
> System\CurrentControlSet\Control\Class{4D36E97D-E325-11CE-BFC1-08002BE10318},
> UpperFilters, 0x00010008, xenhide
>
> [DefaultInstall.NT.Services]
> AddService = XenHide, , XenHide_Service_Inst
>
> [XenHide_Service_Inst]
> DisplayName = %XenHide.SvcDesc%
> ServiceType = 1
> StartType = 0
> ErrorControl = 1
> ServiceBinary = %12%\xenhide.sys
>
> [Strings]
> ORACLE = “Oracle Corporation”
> Disk1 = “Virtual Hide Driver Installation Disk”
> XenHide.SvcDesc = “Oracle VM Virtual Hide Driver”
> REG_EXPAND_SZ = 0x00020000
> REG_DWORD = 0x00010001
>
> – End –
>
> ChkInf log:
>
> Warnings:
> Line 0: (W22.1.9998) NOTE: The ChkInf tool does not verify the WDF
> sections and directives of the INF file.
> Line 11: (W22.1.2202) Unrecognized directive: DriverPackageType
> Line 35: (W22.1.2213) INF files should not set registry entries under
> ‘HKLM,System\CurrentControlSet\Control\Class’.
>
>
>
> Thanks
> Wayne
>
> Bill Wandel wrote:
>> Wayne,
>>
>> The AddService and AddRegister sections should be part of the
>> DefaultInstall.
>> I just tried installing a class filter on 64 bit W2K8 using the DIFx API.
>> It
>> worked. I used DriverPackageInstallW(infPath, DRIVER_PACKAGE_LEGACY_MODE,
>> NULL, &needReboot). The driver installed and the class registry entries
>> were
>> made. I confirmed that the driver was loaded after a reboot by checking
>> the
>> devices with Device Manager. My filter filters more than one class.
>>
>> I don’t see any advantage using DIFx over the similar setup API function.
>> Using the InstallHinfSection setup API call specifying the default
>> section
>> works just as well and doesn’t require the DIFxAPI dll.
>>
>> Bill Wandel
>>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com]
>> On Behalf Of Wayne Gong
>> Sent: Saturday, April 18, 2009 12:11 PM
>> To: Windows System Software Devs Interest List
>> Subject: Re: [ntdev] How can I use DIFx API to install class filter
>> driver
>> like
>>
>> My class filter driver inf file is based on ClasFilt sample inf file.
>> It’s a filter driver above on PCI bus. It’s WDM driver. I have tried to
>> install such filter driver as what have done for other function driver.
>> It can work for win2k3 but cannot for win2k8. It looks like that DIFx API
>> cannot execute AddService and AddRegister inf sector, just execute
>> DefaultInstall section. So I cannot find properly register keys in
>> HLKM\System\Services. Then my filter driver cannot work fine on win2k8.
>>
>> Thanks
>> Wayne
>>
>>
>> Bill Wandel wrote:
>>
>>> Can you be more specific? The class filter is a legacy driver so you
>>> need to set the legacy flag. If this is a WDF driver you also need to
>>> add the WDF section to the inf file and need to call the WDF coinstaller
>>> in your install program.
>>>
>>> Bill Wandel
>>>
>>> -----Original Message-----
>>> From: xxxxx@lists.osr.com
>>> [mailto:xxxxx@lists.osr.com]
>>> On Behalf Of Wayne Gong
>>> Sent: Thursday, April 16, 2009 11:05 PM
>>> To: Windows System Software Devs Interest List
>>> Subject: [ntdev] How can I use DIFx API to install class filter driver
>>> like
>>>
>>> Hi,
>>>
>>> I have a class filter driver using a independent INF file like ClasFilt
>>> sample INF file. How can I use DIFx API to install such driver?
>>>
>>> Thanks
>>> Wayne
>>>
>>> —
>>> NTDEV is sponsored by OSR
>>>
>>> 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
>>>
>>>
>>> —
>>> NTDEV is sponsored by OSR
>>>
>>> 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
>>>
>>
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> 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
>>
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> 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
>>
>
>