Commit 4615f4db authored by Michael Müller's avatar Michael Müller Committed by Alexandre Julliard

mfplat: Implement MFTUnregister.

parent 993f5936
......@@ -164,6 +164,44 @@ HRESULT WINAPI MFTRegister(CLSID clsid, GUID category, LPWSTR name, UINT32 flags
}
/***********************************************************************
* MFTUnregister (mfplat.@)
*/
HRESULT WINAPI MFTUnregister(CLSID clsid)
{
WCHAR buffer[64], category[MAX_PATH];
HKEY htransform, hcategory, htmp;
DWORD size = MAX_PATH;
DWORD index = 0;
TRACE("(%s)\n", debugstr_guid(&clsid));
GUIDToString(buffer, &clsid);
if (!RegOpenKeyW(HKEY_CLASSES_ROOT, transform_keyW, &htransform))
{
RegDeleteKeyW(htransform, buffer);
RegCloseKey(htransform);
}
if (!RegOpenKeyW(HKEY_CLASSES_ROOT, categories_keyW, &hcategory))
{
while (RegEnumKeyExW(hcategory, index, category, &size, NULL, NULL, NULL, NULL) == ERROR_SUCCESS)
{
if (!RegOpenKeyW(hcategory, category, &htmp))
{
RegDeleteKeyW(htmp, buffer);
RegCloseKey(htmp);
}
size = MAX_PATH;
index++;
}
RegCloseKey(hcategory);
}
return S_OK;
}
/***********************************************************************
* MFStartup (mfplat.@)
*/
HRESULT WINAPI MFStartup(ULONG version, DWORD flags)
......
......@@ -140,7 +140,7 @@
@ stdcall MFTRegister(int128 int128 wstr long long ptr long ptr ptr)
@ stub MFTRegisterLocal
@ stub MFTRegisterLocalByCLSID
@ stub MFTUnregister
@ stdcall MFTUnregister(int128)
@ stub MFTUnregisterLocal
@ stub MFTUnregisterLocalByCLSID
@ stub MFTraceError
......
......@@ -39,6 +39,7 @@ HRESULT WINAPI MFTRegister(CLSID clsid, GUID category, LPWSTR name, UINT32 flags
HRESULT WINAPI MFShutdown(void);
HRESULT WINAPI MFStartup(ULONG version, DWORD flags);
HRESULT WINAPI MFUnlockPlatform(void);
HRESULT WINAPI MFTUnregister(CLSID clsid);
HRESULT WINAPI MFGetPluginControl(IMFPluginControl**);
#endif /* __WINE_MFAPI_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment