Hi,
I’m having some problems figuring out the correct way to add a custom device
property page to a generic system device class (i.e. where I don’t provide a
driver, and such that the property page will appear for all devices in that
class). For example, I would like to add my own custom property page for the
CDROM and DiskDrive classes.
The OSR article on this (http://www.osronline.com/article.cfm?id=27) refers
to the EnumPropPages32 mechanism via ClassInstall32 / the Registry. However,
there are already entries registered for the devices I’m interested in, and
nowhere can I find any documentation indicating how to add more than 1
custom property page through this mechanism - it’s not a REG_MULTI_SZ, and
all the entries I can find on my default Windows install only have 1 value
here.
The “proper” way to add property sheets now seems to be to use a CoInstaller
(http://msdn2.microsoft.com/en-us/library/ms790151.aspx), but I can’t see
how to do this without a device driver - all the examples (including
Toaster) seem to rely on a device driver with which to associate the
co-installer.
Can anyone give me some pointers as to where to start on this?
Thanks in advance,
Chris.
You want a class coinstaller, and http://msdn2.microsoft.com/en-us/library/ms790164.aspx tells you how to register it.
Thanks… I’ve tried using a class coinstaller with the INF code from that
reference to add a custom property page for the system Disk class, but my
property page is still not showing up in Device Manager. My code is simply a
copy of the Toaster coinstaller sample.
Using DebugView, I can see my coinstaller DLL being sent a
DIF_ADDPROPERTYPAGE_ADVANCED, and all of the steps in the handler seem to be
correct (unchanged from Toaster, except for some extra debug to trace it
through, and entirely consistent with the documentation for
DIF_ADDPROPERTYPAGE_ADVANCED as far as I can tell). According to my debug,
both the SetupDiGetClassInstallParams() and SetupDiSetClassInstallParams()
calls succeed, the property page is created by CreatePropertySheetPage and I
get a non-zero handle back… but the page never appears in the dialog box -
only the standard General/Driver/Details tabs.
Any suggestions what I might be missing here, or how I can debug it further?
Thanks in advance,
Chris.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Bob Kjelgaard
Sent: 13 April 2007 16:02
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Adding a PropertyPage to a generic system class
You want a class coinstaller, and
http://msdn2.microsoft.com/en-us/library/ms790164.aspx tells you how to
register it.
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
I’ve done a little more experimentation and things seem to be even worse
than I thought.
I noticed that with my coinstaller registered (as the an extra string in the
MULTI_SZ for the Disk system class), the “Policies” and “Volumes” tabs do
not appear on disk devices in Device Manager. Without my coinstaller, they
appear as normal.
I’ve even tried turning my coinstaller into a no-op (immediately returning
either ERROR_DI_DO_DEFAULT or NO_ERROR in response to
DI_ADDPROPERTYPAGE_ADVANCED), but this also causes the Policies/Volumes tabs
to disappear!
Chris.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Chris Smith
Sent: 20 April 2007 22:41
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Adding a PropertyPage to a generic system class
Thanks… I’ve tried using a class coinstaller with the INF code from that
reference to add a custom property page for the system Disk class, but my
property page is still not showing up in Device Manager. My code is simply a
copy of the Toaster coinstaller sample.
Using DebugView, I can see my coinstaller DLL being sent a
DIF_ADDPROPERTYPAGE_ADVANCED, and all of the steps in the handler seem to be
correct (unchanged from Toaster, except for some extra debug to trace it
through, and entirely consistent with the documentation for
DIF_ADDPROPERTYPAGE_ADVANCED as far as I can tell). According to my debug,
both the SetupDiGetClassInstallParams() and SetupDiSetClassInstallParams()
calls succeed, the property page is created by CreatePropertySheetPage and I
get a non-zero handle back… but the page never appears in the dialog box -
only the standard General/Driver/Details tabs.
Any suggestions what I might be missing here, or how I can debug it further?
Thanks in advance,
Chris.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Bob Kjelgaard
Sent: 13 April 2007 16:02
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Adding a PropertyPage to a generic system class
You want a class coinstaller, and
http://msdn2.microsoft.com/en-us/library/ms790164.aspx tells you how to
register it.
Does your “resources” load ? The MMC plugin needs “_DllMainCRTStartup” as ( exported ) DLL entry point to get the resources out of
your binary.
Christiaan
----- Original Message -----
From: “Chris Smith”
To: “Windows System Software Devs Interest List”
Sent: Saturday, April 21, 2007 1:19 AM
Subject: RE: [ntdev] Adding a PropertyPage to a generic system class
> I’ve done a little more experimentation and things seem to be even worse
> than I thought.
>
> I noticed that with my coinstaller registered (as the an extra string in the
> MULTI_SZ for the Disk system class), the “Policies” and “Volumes” tabs do
> not appear on disk devices in Device Manager. Without my coinstaller, they
> appear as normal.
>
> I’ve even tried turning my coinstaller into a no-op (immediately returning
> either ERROR_DI_DO_DEFAULT or NO_ERROR in response to
> DI_ADDPROPERTYPAGE_ADVANCED), but this also causes the Policies/Volumes tabs
> to disappear!
>
>
> Chris.
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Chris Smith
> Sent: 20 April 2007 22:41
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] Adding a PropertyPage to a generic system class
>
> Thanks… I’ve tried using a class coinstaller with the INF code from that
> reference to add a custom property page for the system Disk class, but my
> property page is still not showing up in Device Manager. My code is simply a
> copy of the Toaster coinstaller sample.
>
> Using DebugView, I can see my coinstaller DLL being sent a
> DIF_ADDPROPERTYPAGE_ADVANCED, and all of the steps in the handler seem to be
> correct (unchanged from Toaster, except for some extra debug to trace it
> through, and entirely consistent with the documentation for
> DIF_ADDPROPERTYPAGE_ADVANCED as far as I can tell). According to my debug,
> both the SetupDiGetClassInstallParams() and SetupDiSetClassInstallParams()
> calls succeed, the property page is created by CreatePropertySheetPage and I
> get a non-zero handle back… but the page never appears in the dialog box -
> only the standard General/Driver/Details tabs.
>
> Any suggestions what I might be missing here, or how I can debug it further?
>
>
> Thanks in advance,
>
> Chris.
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Bob Kjelgaard
> Sent: 13 April 2007 16:02
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] Adding a PropertyPage to a generic system class
>
> You want a class coinstaller, and
> http://msdn2.microsoft.com/en-us/library/ms790164.aspx tells you how to
> register it.
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
DLLENTRY in the “sources” file is _DllMainCRTStartup, and I see a
DLL_PROCESS_ATTACH call into my DllMain when the property sheet is requested
from Device Manager. Is there a way I can tell if the resources actually
were loaded?
Chris.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Christiaan
Ghijselinck
Sent: 21 April 2007 07:01
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Adding a PropertyPage to a generic system class
Does your “resources” load ? The MMC plugin needs “_DllMainCRTStartup” as (
exported ) DLL entry point to get the resources out of
your binary.
Christiaan
----- Original Message -----
From: “Chris Smith”
To: “Windows System Software Devs Interest List”
Sent: Saturday, April 21, 2007 1:19 AM
Subject: RE: [ntdev] Adding a PropertyPage to a generic system class
> I’ve done a little more experimentation and things seem to be even worse
> than I thought.
>
> I noticed that with my coinstaller registered (as the an extra string in
the
> MULTI_SZ for the Disk system class), the “Policies” and “Volumes” tabs do
> not appear on disk devices in Device Manager. Without my coinstaller, they
> appear as normal.
>
> I’ve even tried turning my coinstaller into a no-op (immediately returning
> either ERROR_DI_DO_DEFAULT or NO_ERROR in response to
> DI_ADDPROPERTYPAGE_ADVANCED), but this also causes the Policies/Volumes
tabs
> to disappear!
>
>
> Chris.
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Chris Smith
> Sent: 20 April 2007 22:41
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] Adding a PropertyPage to a generic system class
>
> Thanks… I’ve tried using a class coinstaller with the INF code from that
> reference to add a custom property page for the system Disk class, but my
> property page is still not showing up in Device Manager. My code is simply
a
> copy of the Toaster coinstaller sample.
>
> Using DebugView, I can see my coinstaller DLL being sent a
> DIF_ADDPROPERTYPAGE_ADVANCED, and all of the steps in the handler seem to
be
> correct (unchanged from Toaster, except for some extra debug to trace it
> through, and entirely consistent with the documentation for
> DIF_ADDPROPERTYPAGE_ADVANCED as far as I can tell). According to my debug,
> both the SetupDiGetClassInstallParams() and SetupDiSetClassInstallParams()
> calls succeed, the property page is created by CreatePropertySheetPage and
I
> get a non-zero handle back… but the page never appears in the dialog box
-
> only the standard General/Driver/Details tabs.
>
> Any suggestions what I might be missing here, or how I can debug it
further?
>
>
> Thanks in advance,
>
> Chris.
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Bob Kjelgaard
> Sent: 13 April 2007 16:02
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] Adding a PropertyPage to a generic system class
>
> You want a class coinstaller, and
> http://msdn2.microsoft.com/en-us/library/ms790164.aspx tells you how to
> register it.
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.463 / Virus Database: 269.5.5/769 - Release Date: 19/04/2007
17:56
>> Is there a way I can tell if the resources actually
were loaded?
Probably yes, but unknown to me . Be sure that your “DllMain” is called “_DllMainCRTStartup” too …
i.e.
extern “C”
BOOL APIENTRY _DllMainCRTStartup ( HANDLE hDll, DWORD dwReason, LPVOID lpReserved )
{
…
}
Christiaan
----- Original Message -----
From: “Chris Smith”
To: “Windows System Software Devs Interest List”
Sent: Saturday, April 21, 2007 8:48 AM
Subject: RE: [ntdev] Adding a PropertyPage to a generic system class
> DLLENTRY in the “sources” file is _DllMainCRTStartup, and I see a
> DLL_PROCESS_ATTACH call into my DllMain when the property sheet is requested
> from Device Manager. Is there a way I can tell if the resources actually
> were loaded?
>
> Chris.
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Christiaan
> Ghijselinck
> Sent: 21 April 2007 07:01
> To: Windows System Software Devs Interest List
> Subject: Re: [ntdev] Adding a PropertyPage to a generic system class
>
>
> Does your “resources” load ? The MMC plugin needs “_DllMainCRTStartup” as (
> exported ) DLL entry point to get the resources out of
> your binary.
>
> Christiaan
>
>
> ----- Original Message -----
> From: “Chris Smith”
> To: “Windows System Software Devs Interest List”
> Sent: Saturday, April 21, 2007 1:19 AM
> Subject: RE: [ntdev] Adding a PropertyPage to a generic system class
>
>
>> I’ve done a little more experimentation and things seem to be even worse
>> than I thought.
>>
>> I noticed that with my coinstaller registered (as the an extra string in
> the
>> MULTI_SZ for the Disk system class), the “Policies” and “Volumes” tabs do
>> not appear on disk devices in Device Manager. Without my coinstaller, they
>> appear as normal.
>>
>> I’ve even tried turning my coinstaller into a no-op (immediately returning
>> either ERROR_DI_DO_DEFAULT or NO_ERROR in response to
>> DI_ADDPROPERTYPAGE_ADVANCED), but this also causes the Policies/Volumes
> tabs
>> to disappear!
>>
>>
>> Chris.
>>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of Chris Smith
>> Sent: 20 April 2007 22:41
>> To: Windows System Software Devs Interest List
>> Subject: RE: [ntdev] Adding a PropertyPage to a generic system class
>>
>> Thanks… I’ve tried using a class coinstaller with the INF code from that
>> reference to add a custom property page for the system Disk class, but my
>> property page is still not showing up in Device Manager. My code is simply
> a
>> copy of the Toaster coinstaller sample.
>>
>> Using DebugView, I can see my coinstaller DLL being sent a
>> DIF_ADDPROPERTYPAGE_ADVANCED, and all of the steps in the handler seem to
> be
>> correct (unchanged from Toaster, except for some extra debug to trace it
>> through, and entirely consistent with the documentation for
>> DIF_ADDPROPERTYPAGE_ADVANCED as far as I can tell). According to my debug,
>> both the SetupDiGetClassInstallParams() and SetupDiSetClassInstallParams()
>> calls succeed, the property page is created by CreatePropertySheetPage and
> I
>> get a non-zero handle back… but the page never appears in the dialog box
> -
>> only the standard General/Driver/Details tabs.
>>
>> Any suggestions what I might be missing here, or how I can debug it
> further?
>>
>>
>> Thanks in advance,
>>
>> Chris.
>>
>>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of Bob Kjelgaard
>> Sent: 13 April 2007 16:02
>> To: Windows System Software Devs Interest List
>> Subject: RE: [ntdev] Adding a PropertyPage to a generic system class
>>
>> You want a class coinstaller, and
>> http://msdn2.microsoft.com/en-us/library/ms790164.aspx tells you how to
>> register it.
>>
>>
>>
>> —
>> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>>
>> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.463 / Virus Database: 269.5.5/769 - Release Date: 19/04/2007
> 17:56
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer