About a week ago, I complained that my video capture driver wasn’t
working properly in DirectShow because kswdmcap.ax had not been
registered, even though I had done Include=KSCAPTUR.inf and
Needs=KSCAPTUR.Registration.NT. I now – finally – believe I know what
is going on here. It is a bug (perhaps several) in KSCAPTUR.INF. My
story can act as a cautionary tale for others.
I had noticed that, on many of the systems that failed, the proxy trio
of kstvtune.ax, kswdmcap.ax, and ksxbar.ax were located in
system32\drivers instead of system32. I thought that was an unusual
place to find them, but I thought maybe someone at some OEM had made an
unusual decision. In retrospect, I now see that this was the root
symptom of the problem.
My INF file had this section:
[DestinationDirs]
DefaultDestDir=12
vidousb.CopyFiles=12
vidousb.Proxy.CopyFiles=11
vidoldr.CopyFiles=12
Since I explicitly specify locations for all of my CopyFiles sections,
the DefaultDestDir isn’t used, so I just left it at a convenient spot.
The standard KSCAPTUR.INF has these two sections:
[DestinationDirs]
DefaultDestDir=11
VfWWDM32.DelFile=10 ; delete windows\vfwwdm32.dll on Windows upgrade
ColorspaceCodecs.CopyCodec=11
…
[Filters.Files]
kstvtune.ax
ksxbar.ax
kswdmcap.ax
vidcap.ax
Note here that the all-important [Filters.Files] section IS NOT
MENTIONED in [DestinationDirs], thereby violating Microsoft’s own rules
for INF files. That is the root of the problem. The
[KSCAPTUR.Registration.NT] section that I call in with Needs does a
CopyFiles on [Filters.Files]. Because that section is not mentioned in
[DestinationDirs], the system used **MY** DefaultDestDir, which happens
to be 12, which is system32\drivers.
None of the registration records in KSCAPTUR.INF specify a path (like
%11%\kswdmcap.ax). They just mention the file name. That compounds the
bug. That means that, when an application goes to create an instance of
one of their objects, the system searches the PATH to find the DLL, and
system32\drivers is not on the path. Failure.
The short-term solution for me is to change my DefaultDestDir from 12 to
11, but clearly KSCAPTUR.INF should be fixed. I haven’t checked Vista
for this, but I assume it is the same.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.