Some time ago I speculated about the purpose of a rather mysterious inf
file entry called PageAliases and promised I would report when I
verified my speculations. What I have shown is this. Given a rather
straight-forward inf file section:
[MyDevice.NT.Interfaces]
AddInterface=%KSCATEGORY_CAPTURE%,GLOBAL,MyDevice.Interface
[MyDevice.Interface]
AddReg=MyDevice.Intf.AddReg
[MyDevice.Intf.AddReg]
HKR,,CLSID,,%ProxyVCap.CLSID%
HKR,,FriendlyName,,%MyDevice.DeviceDesc%
You can add a PageAliases entry like this:
[MyDevice.Intf.AddReg]
HKR,,CLSID,,%ProxyVCap.CLSID%
HKR,,FriendlyName,,%USB\VID_05D0&PID_FFF4.DeviceDesc%
HKR,PageAliases,"{71F96464-78F3-11d0-A18C-00A0C9118956}",1, \
21,E8,C2,3D, 13,47, d2,11, 0xba, 0x41, \
0x0, 0xa0, 0xc9, 0xd, 0x2b, 0x5
The first GUID is the GUID for the property page that you want to alias.
In this case, 71F96464-78F3-11d0-A18C-00A0C9118956, we are replacing the
standard Video Proc Amp page.
The remainder of the entry is the REG_BINARY expression for the GUID of
the replacement page. This is the same format as used by the IID key in
the more commonly seen
HKLM,System\CurrentControlSet\Control\MediaInterfaces section of the
registry.
Of course, the replacement GUID must be registered as a COM server:
HKCR,CLSID\%MyProcAmpPPage.CLSID%,,,%MyProcAmpPPage.FriendlyName%
HKCR,CLSID\%MyProcAmpPPage.CLSID%\InprocServer32,,,%MyPPLib%
HKCR,CLSID\%MyProcAmpPPage.CLSID%\InprocServer32,ThreadingModel,,Both
And just to be clear about the format of the second PageAliases GUID:
[Strings]
MyProcAmpPPage.CLSID= {3DC2E821-4713-11d2-BA41-00A0C90D2B05}
These inf file settings will globally replace the original property page
with the replacement page. Based on my original speculation, this
replacement should be system wide. The behaviour has been confirmed
with graphedit and amcap so I assume it is in fact system wide.
Furthermore, it is confined to only your device. Other devices using
the original property page are not overridden.
Moreover, if you flub the construction of the replacement property page
in your CreateInstance function (for example *phr=E_NOTIMPL; return
NULL;), the page does not show up at all. This may be a bit hacky,
perhaps depending on the implementation of the callers (although perhaps
not), but I think it would allow you to do something like merge the
controls of a standard page into a seperate page that you have
constructed - for whatever reason you might want to do such a thing.
Again, this works under both amcap and graphedit.
While this facility is ripe for abuse, it does seem to be something that
might be useful on certain occasions.
Regards,
Tom