Author: janderwald
Date: Tue Apr 6 17:47:15 2010
New Revision: 46751
URL:
http://svn.reactos.org/svn/reactos?rev=46751&view=rev
Log:
[MSDVBNP]
- Register BDA Filter components
Modified:
trunk/reactos/dll/directx/msdvbnp/msdvbnp.cpp
Modified: trunk/reactos/dll/directx/msdvbnp/msdvbnp.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/msdvbnp/msdvbn…
==============================================================================
--- trunk/reactos/dll/directx/msdvbnp/msdvbnp.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/msdvbnp/msdvbnp.cpp [iso-8859-1] Tue Apr 6 17:47:15 2010
@@ -86,6 +86,24 @@
return hr;
}
+VOID
+RegisterBDAComponent(
+ HKEY hFilter,
+ LPCWSTR ComponentClsid,
+ LPCWSTR ComponentName)
+{
+ HKEY hComp;
+
+ // create network provider filter key
+ if (RegCreateKeyExW(hFilter, ComponentClsid, 0, NULL, 0, KEY_WRITE, NULL, &hComp,
NULL) == ERROR_SUCCESS)
+ {
+ // store class id
+ RegSetValueExW(hComp, L"CLSID", 0, REG_SZ, (const BYTE*)ComponentClsid,
(wcslen(ComponentClsid)+1) * sizeof(WCHAR));
+ RegSetValueExW(hComp, L"FriendlyName", 0, REG_SZ, (const
BYTE*)ComponentName, (wcslen(ComponentName)+1) * sizeof(WCHAR));
+ RegCloseKey(hComp);
+ }
+}
+
extern "C"
KSDDKAPI
HRESULT
@@ -95,7 +113,7 @@
ULONG Index = 0;
LPOLESTR pStr;
HRESULT hr = S_OK;
- HKEY hClass, hKey, hSubKey, hProvider, hInstance;
+ HKEY hClass, hKey, hSubKey, hProvider, hInstance, hFilter;
static LPCWSTR ModuleName = L"msdvbnp.ax";
static LPCWSTR ThreadingModel = L"Both";
@@ -124,6 +142,21 @@
return E_FAIL;
}
RegCloseKey(hProvider);
+
+ /* open active movie filter category key */
+ if (RegCreateKeyExW(hClass,
L"{da4e3da0-d07d-11d0-bd50-00a0c911ce86}\\Instance", 0, NULL, 0, KEY_WRITE,
NULL, &hFilter, NULL) != ERROR_SUCCESS)
+ {
+ RegCloseKey(hClass);
+ RegCloseKey(hInstance);
+ return E_FAIL;
+ }
+
+ RegisterBDAComponent(hFilter, L"{71985F4A-1CA1-11d3-9CC8-00C04F7971E0}",
L"BDA Playback Filter");
+ RegisterBDAComponent(hFilter, L"{71985F4B-1CA1-11D3-9CC8-00C04F7971E0}",
L"BDA Network Providerss");
+ RegisterBDAComponent(hFilter, L"{71985F48-1CA1-11d3-9CC8-00C04F7971E0}",
L"BDA Source Filter");
+ RegisterBDAComponent(hFilter, L"{A2E3074F-6C3D-11D3-B653-00C04F79498E}",
L"BDA Transport Information Renderers");
+ RegisterBDAComponent(hFilter, L"{FD0A5AF4-B41D-11d2-9C95-00C04F7971E0}",
L"BDA Receiver Component");
+ RegCloseKey(hKey);
do
{
@@ -150,6 +183,9 @@
RegCloseKey(hKey);
}
+
+
+
CoTaskMemFree(pStr);
Index++;
}while(InterfaceTable[Index].lpfnCI != 0);