Share via


IGameExplorer2::InstallGame Method

The InstallGame interface installs the title if the user is not blocked by parental controls.

Syntax

HRESULT InstallGame(
         LPCWSTR binaryGDFPath,
         LPCWSTR installDirectory,
         GAME_INSTALL_SCOPE installScope
)

Parameters

  • binaryGDFPath
    [in] String that contains the fully qualified path of the binary that contains the game definition file (GDF). The GDF must be present in the default resource location
  • installDirectory
    [in] String that contains the fully qualified path to the root of the game installation folder. If the installation is an update, installDirectory is ignored.
  • installScope
    [in] Member of the GAME_INSTALL_SCOPE enumeration, which specifies whether the title is being installed for all users or just the current user. If the installation is an update, installScope is ignored.

Return Value

Returns S_OK on success. E_ACCESSDENIED if the game is blocked by parental controls. Returns E_INVALIDARG if the required binaryGDFPath properties are not set, the GDF is a previous version (v1) resource, or if binaryGDFPath is NULL.

Remarks

Calls IGameExplorer::VerifyAccess in order to ensure the user is able to run the title. If the user is blocked by parental controls, E_ACCESSDENIED is returned. In the case where the binaryGDFPath is already registered the only the path to the GDF is used and a call is made to IGameExplorer::UpdateGame (update case), if it is not already present a call is made to IGameExplorer::AddGame.

Requirements

Header: Declared in gameux.h.

See Also

IGameExplorer2::UninstallGame
IGameExplorer2