gameux: Add UninstallGame implementation.

This commit is contained in:
Mariusz Pluciński 2010-09-16 13:55:34 +02:00 committed by Alexandre Julliard
parent 5213d9d07e
commit 95a9bc043e
2 changed files with 18 additions and 4 deletions

View File

@ -991,9 +991,23 @@ static HRESULT WINAPI GameExplorer2Impl_UninstallGame(
IGameExplorer2 *iface,
LPCWSTR binaryGDFPath)
{
HRESULT hr;
GUID instanceId;
GameExplorerImpl *This = impl_from_IGameExplorer2(iface);
FIXME("stub (%p, %s)\n", This, debugstr_w(binaryGDFPath));
return E_NOTIMPL;
TRACE("(%p, %s)\n", This, debugstr_w(binaryGDFPath));
if(!binaryGDFPath)
return E_INVALIDARG;
hr = GAMEUX_FindGameInstanceId(binaryGDFPath, GIS_CURRENT_USER, &instanceId);
if(hr == S_FALSE)
hr = GAMEUX_FindGameInstanceId(binaryGDFPath, GIS_ALL_USERS, &instanceId);
if(hr == S_OK)
hr = GAMEUX_RemoveRegistryRecord(&instanceId);
return hr;
}
static const struct IGameExplorer2Vtbl GameExplorer2ImplVtbl =

View File

@ -646,10 +646,10 @@ void test_install_uninstall_game(void)
_validateGameRegistryKey(__LINE__, GIS_CURRENT_USER, &guid, &applicationId, sExePath, sExeName, TRUE);
hr = IGameExplorer2_UninstallGame(ge2, sExeName);
todo_wine ok(SUCCEEDED(hr), "IGameExplorer2::UninstallGame failed (error 0x%08x)\n", hr);
ok(SUCCEEDED(hr), "IGameExplorer2::UninstallGame failed (error 0x%08x)\n", hr);
}
todo_wine _validateGameRegistryKey(__LINE__, GIS_CURRENT_USER, &guid, &applicationId, sExePath, sExeName, FALSE);
_validateGameRegistryKey(__LINE__, GIS_CURRENT_USER, &guid, &applicationId, sExePath, sExeName, FALSE);
IGameExplorer2_Release(ge2);
}