Doron,
I thought I was installing a device lower level filter via SetupDiSetDeviceRegistryProperty, according to MSDN (https://msdn.microsoft.com/en-us/library/windows/hardware/ff552169(v=vs.85).aspx):
The SetupDiSetDeviceRegistryProperty function sets a Plug and Play device property for a device.
At a minimum, we would like to request that the hub get reset via requesting the parent port to be reset and to be able to send commands to the hub itself.
Setupapi.dev.log doesn’t say anything. I.e., no entries are recorded to it.
It makes sense about the requests being forwarded to the host controller FDO, as it doesn’t make sense to forward through potentially 4 more hub devnodes if the device is 5 hubs deep.
The code for installing/uninstalling the lower level filter driver is as follows if you are interested:
void
Callback(In HDEVINFO hDevInfo, In PSP_DEVINFO_DATA pSpDevInfoData, In PVOID Context)
{
PCMD_LINE_ARGS pArgs = (PCMD_LINE_ARGS)Context;
BOOL bResult;
DWORD propertyBufferSize = (DWORD)(wcslen(pArgs->DriverName) + 1) * sizeof(WCHAR);
SP_PROPCHANGE_PARAMS pcp;
printf(“In callback. %snstalling %ws as the lower level filter driver for VID/PID 0x%04x/0x%04x\n”,
pArgs->bInstall ? “I” : “Uni”,
pArgs->DriverName,
pArgs->VendorID,
pArgs->ProductID);
if (pArgs->bInstall)
{
bResult = SetupDiSetDeviceRegistryProperty(hDevInfo, pSpDevInfoData, SPDRP_LOWERFILTERS, (const BYTE *)pArgs->DriverName, propertyBufferSize);
}
else
{
bResult = SetupDiSetDeviceRegistryProperty(hDevInfo, pSpDevInfoData, SPDRP_LOWERFILTERS, NULL, 0);
}
if (bResult)
{
printf(“SetupDiSetDeviceRegistryProperty succeeded\n”);
}
else
{
DisplayError(“SetupDiSetDeviceRegistryProperty”);
}
pcp.ClassInstallHeader.cbSize = sizeof(SP_CLASSINSTALL_HEADER);
pcp.ClassInstallHeader.InstallFunction = DIF_PROPERTYCHANGE;
pcp.StateChange = DICS_PROPCHANGE;
pcp.Scope = DICS_FLAG_CONFIGSPECIFIC;
pcp.HwProfile = 0;
bResult = SetupDiSetClassInstallParams(hDevInfo, pSpDevInfoData, &pcp.ClassInstallHeader, sizeof(pcp));
if (bResult)
{
printf(“SetupDiSetClassInstallParams succeeded\n”);
}
else
{
DisplayError(“SetupDiSetClassInstallParams”);
}
if (bResult)
{
bResult = SetupDiCallClassInstaller(DIF_PROPERTYCHANGE, hDevInfo, pSpDevInfoData);
if (bResult)
{
printf(“SetupDiCallClassInstaller succeeded\n”);
}
else
{
DisplayError(“SetupDiCallClassInstaller”);
}
}
printf(“Exiting\n”);
}
Don,
Thanks. I can see that there is a lot to this, but I don’t even have the driver loaded at all yet.