gameux: Add IGameExplorer2 implementation stub.
This commit is contained in:
parent
152fbc1c3f
commit
5aed3941ee
|
@ -31,12 +31,13 @@
|
|||
WINE_DEFAULT_DEBUG_CHANNEL(gameux);
|
||||
|
||||
/*
|
||||
* IGameExplorer implementation
|
||||
* GameExplorer implementation
|
||||
*/
|
||||
|
||||
typedef struct _GameExplorerImpl
|
||||
{
|
||||
const struct IGameExplorerVtbl *lpGameExplorerVtbl;
|
||||
const struct IGameExplorer2Vtbl *lpGameExplorer2Vtbl;
|
||||
LONG ref;
|
||||
} GameExplorerImpl;
|
||||
|
||||
|
@ -45,6 +46,21 @@ static inline GameExplorerImpl *impl_from_IGameExplorer(IGameExplorer *iface)
|
|||
return (GameExplorerImpl*)((char*)iface - FIELD_OFFSET(GameExplorerImpl, lpGameExplorerVtbl));
|
||||
}
|
||||
|
||||
static inline IGameExplorer* IGameExplorer_from_impl(GameExplorerImpl* This)
|
||||
{
|
||||
return (struct IGameExplorer*)&This->lpGameExplorerVtbl;
|
||||
}
|
||||
|
||||
static inline GameExplorerImpl *impl_from_IGameExplorer2(IGameExplorer2 *iface)
|
||||
{
|
||||
return (GameExplorerImpl*)((char*)iface - FIELD_OFFSET(GameExplorerImpl, lpGameExplorer2Vtbl));
|
||||
}
|
||||
|
||||
static inline IGameExplorer2* IGameExplorer2_from_impl(GameExplorerImpl* This)
|
||||
{
|
||||
return (struct IGameExplorer2*)&This->lpGameExplorer2Vtbl;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI GameExplorerImpl_QueryInterface(
|
||||
IGameExplorer *iface,
|
||||
REFIID riid,
|
||||
|
@ -59,7 +75,11 @@ static HRESULT WINAPI GameExplorerImpl_QueryInterface(
|
|||
if(IsEqualGUID(riid, &IID_IUnknown) ||
|
||||
IsEqualGUID(riid, &IID_IGameExplorer))
|
||||
{
|
||||
*ppvObject = iface;
|
||||
*ppvObject = IGameExplorer_from_impl(This);
|
||||
}
|
||||
else if(IsEqualGUID(riid, &IID_IGameExplorer2))
|
||||
{
|
||||
*ppvObject = IGameExplorer2_from_impl(This);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -158,6 +178,68 @@ static const struct IGameExplorerVtbl GameExplorerImplVtbl =
|
|||
GameExplorerImpl_VerifyAccess
|
||||
};
|
||||
|
||||
|
||||
static HRESULT WINAPI GameExplorer2Impl_QueryInterface(
|
||||
IGameExplorer2 *iface,
|
||||
REFIID riid,
|
||||
void **ppvObject)
|
||||
{
|
||||
GameExplorerImpl *This = impl_from_IGameExplorer2(iface);
|
||||
return GameExplorerImpl_QueryInterface(IGameExplorer_from_impl(This), riid, ppvObject);
|
||||
}
|
||||
|
||||
static ULONG WINAPI GameExplorer2Impl_AddRef(IGameExplorer2 *iface)
|
||||
{
|
||||
GameExplorerImpl *This = impl_from_IGameExplorer2(iface);
|
||||
return GameExplorerImpl_AddRef(IGameExplorer_from_impl(This));
|
||||
}
|
||||
|
||||
static ULONG WINAPI GameExplorer2Impl_Release(IGameExplorer2 *iface)
|
||||
{
|
||||
GameExplorerImpl *This = impl_from_IGameExplorer2(iface);
|
||||
return GameExplorerImpl_Release(IGameExplorer_from_impl(This));
|
||||
}
|
||||
|
||||
static HRESULT WINAPI GameExplorer2Impl_CheckAccess(
|
||||
IGameExplorer2 *iface,
|
||||
LPCWSTR binaryGDFPath,
|
||||
BOOL *pHasAccess)
|
||||
{
|
||||
GameExplorerImpl *This = impl_from_IGameExplorer2(iface);
|
||||
FIXME("stub (%p, %s, %p)\n", This, debugstr_w(binaryGDFPath), pHasAccess);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI GameExplorer2Impl_InstallGame(
|
||||
IGameExplorer2 *iface,
|
||||
LPCWSTR binaryGDFPath,
|
||||
LPCWSTR installDirectory,
|
||||
GAME_INSTALL_SCOPE installScope)
|
||||
{
|
||||
GameExplorerImpl *This = impl_from_IGameExplorer2(iface);
|
||||
FIXME("stub (%p, %s, %s, 0x%x)\n", This, debugstr_w(binaryGDFPath), debugstr_w(installDirectory), installScope);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI GameExplorer2Impl_UninstallGame(
|
||||
IGameExplorer2 *iface,
|
||||
LPCWSTR binaryGDFPath)
|
||||
{
|
||||
GameExplorerImpl *This = impl_from_IGameExplorer2(iface);
|
||||
FIXME("stub (%p, %s)\n", This, debugstr_w(binaryGDFPath));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const struct IGameExplorer2Vtbl GameExplorer2ImplVtbl =
|
||||
{
|
||||
GameExplorer2Impl_QueryInterface,
|
||||
GameExplorer2Impl_AddRef,
|
||||
GameExplorer2Impl_Release,
|
||||
GameExplorer2Impl_InstallGame,
|
||||
GameExplorer2Impl_UninstallGame,
|
||||
GameExplorer2Impl_CheckAccess
|
||||
};
|
||||
|
||||
/*
|
||||
* Construction routine
|
||||
*/
|
||||
|
@ -175,6 +257,7 @@ HRESULT GameExplorer_create(
|
|||
return E_OUTOFMEMORY;
|
||||
|
||||
pGameExplorer->lpGameExplorerVtbl = &GameExplorerImplVtbl;
|
||||
pGameExplorer->lpGameExplorer2Vtbl = &GameExplorer2ImplVtbl;
|
||||
pGameExplorer->ref = 1;
|
||||
|
||||
*ppObj = (IUnknown*)(&pGameExplorer->lpGameExplorerVtbl);
|
||||
|
|
Loading…
Reference in New Issue