{
#ifdef KSPROXY_TRACE
OutputDebugStringW(L"CInputPin::CreatePinHandle GetSupportedSets failed\n");
+ DebugBreak();
#endif
return hr;
}
{
#ifdef KSPROXY_TRACE
OutputDebugStringW(L"CInputPin::CreatePinHandle LoadProxyPlugins failed\n");
+ DebugBreak();
#endif
return hr;
}
Length = NumProperty + NumMethods + NumEvents;
+ assert(Length);
+
// allocate guid buffer
pGuid = (LPGUID)CoTaskMemAlloc(Length);
if (!pGuid)
NumMethods /= sizeof(GUID);
NumEvents /= sizeof(GUID);
+#ifdef KSPROXY_TRACE
+ WCHAR Buffer[200];
+ swprintf(Buffer, L"CInputPin::GetSupportedSets NumProperty %lu NumMethods %lu NumEvents %lu\n", NumProperty, NumMethods, NumEvents);
+ OutputDebugStringW(Buffer);
+#endif
+
// get all properties
hr = KsSynchronousDeviceControl(m_hPin, IOCTL_KS_PROPERTY, (PVOID)&Property, sizeof(KSPROPERTY), (PVOID)pGuid, Length, &BytesReturned);
if (FAILED(hr))
Length -= BytesReturned;
// get all methods
- if (Length)
+ if (Length && NumMethods)
{
hr = KsSynchronousDeviceControl(m_hPin, IOCTL_KS_METHOD, (PVOID)&Property, sizeof(KSPROPERTY), (PVOID)&pGuid[NumProperty], Length, &BytesReturned);
if (FAILED(hr))
}
// get all events
- if (Length)
+ if (Length && NumEvents)
{
hr = KsSynchronousDeviceControl(m_hPin, IOCTL_KS_ENABLE_EVENT, (PVOID)&Property, sizeof(KSPROPERTY), (PVOID)&pGuid[NumProperty+NumMethods], Length, &BytesReturned);
if (FAILED(hr))
Length -= BytesReturned;
}
-#ifdef KSPROXY_TRACE
- WCHAR Buffer[200];
- swprintf(Buffer, L"NumProperty %lu NumMethods %lu NumEvents %lu\n", NumProperty, NumMethods, NumEvents);
- OutputDebugStringW(Buffer);
-#endif
-
*pOutGuid = pGuid;
*NumGuids = NumProperty+NumEvents+NumMethods;
return S_OK;
{
// store plugin
m_Plugins.push_back(pUnknown);
+DebugBreak();
}
// close key
RegCloseKey(hSubKey);