----------------------------------------
-- Microsoft DirectX Ada binding lib --
-- File : gameux.ads --
-- Translator:Dongfeng.Gu,2018/11/03 --
-- Mail: 515639@qq.com --
-- Progress:100% --
----------------------------------------
with Ada.Characters.Handling; use Ada.Characters.Handling;
with win32; use win32;
with win32.windef; use win32.windef;
with win32.rpcdce; use win32.rpcdce;
with win32.objbase; use win32.objbase;
with win32.Oleauto; use win32.Oleauto;
with audiodefs; use audiodefs; -- for uuidof
package gameux is
type LPLPWSTR is access all LPWSTR;
subtype LPUCHAR is win32.PUCHAR;
REQUIRED_RPCNDR_H_VERSION : constant := 475;
REQUIRED_RPCSAL_H_VERSION : constant := 100;
type IGameExplorer;
type LPIGameExplorer is access all IGameExplorer;
type LPLPIGameExplorer is access all LPIGameExplorer;
subtype LPGameExplorer is LPIGameExplorer;
subtype LPLPGameExplorer is LPLPIGameExplorer;
type IGameStatistics;
type LPIGameStatistics is access all IGameStatistics;
type LPLPIGameStatistics is access all LPIGameStatistics;
subtype LPGameStatistics is LPIGameStatistics;
subtype LPLPGameStatistics is LPLPIGameStatistics;
type IGameStatisticsMgr;
type LPIGameStatisticsMgr is access all IGameStatisticsMgr;
type LPLPIGameStatisticsMgr is access all LPIGameStatisticsMgr;
subtype LPGameStatisticsMgr is LPIGameStatisticsMgr;
subtype LPLPGameStatisticsMgr is LPLPIGameStatisticsMgr;
type IGameExplorer2;
type LPIGameExplorer2 is access all IGameExplorer2;
type LPLPIGameExplorer2 is access all LPIGameExplorer2;
subtype LPGameExplorer2 is LPIGameExplorer2;
subtype LPLPGameExplorer2 is LPLPIGameExplorer2;
ID_GDF_XML : constant String:= "__GDF_XML";
ID_GDF_THUMBNAIL : constant String:= "__GDF_THUMBNAIL";
ID_ICON_ICO : constant String:= "__ICON_ICO";
ID_GDF_XML_STR : constant Wide_String:=To_Wide_String("__GDF_XML");
ID_GDF_THUMBNAIL_STR : constant Wide_String:= To_Wide_String("__GDF_THUMBNAIL");
type GAME_INSTALL_SCOPE is (GIS_NOT_INSTALLED,
GIS_CURRENT_USER,
GIS_ALL_USERS);
for GAME_INSTALL_SCOPE use (GIS_NOT_INSTALLED=>1,
GIS_CURRENT_USER=>2,
GIS_ALL_USERS=>3);
type LPGAME_INSTALL_SCOPE is access GAME_INSTALL_SCOPE;
IID_IGameExplorer : constant win32.rpcdce.GUID:=uuidof("E7B2FB72-D728-49B3-A5F2-18EBF5F1349E");
type IGameExplorer is record
QueryInterface:access function(This:LPIGameExplorer;riid:REFIID;ppvObject:LPLPvoid) return HRESULT with Convention=>Stdcall;
AddRef:access function(This:LPIGameExplorer) return ULONG with Convention=>Stdcall;
Release:access function(This:LPIGameExplorer) return ULONG with Convention=>Stdcall;
AddGame:access function(This:LPIGameExplorer;bstrGDFBinaryPath:BSTR;bstrGameInstallDirectory:BSTR;installScope:GAME_INSTALL_SCOPE;pguidInstanceID:LPGUID) return HRESULT with Convention=>Stdcall;
RemoveGame:access function(This:LPIGameExplorer;guidInstanceID:GUID) return HRESULT with Convention=>Stdcall;
UpdateGame:access function(This:LPIGameExplorer;guidInstanceID:GUID) return HRESULT with Convention=>Stdcall;
VerifyAccess:access function(This:LPIGameExplorer;bstrGDFBinaryPath:BSTR;pfHasAccess:LPBOOL) return HRESULT with Convention=>Stdcall;
end record;
type GAMESTATS_OPEN_TYPE is (GAMESTATS_OPEN_OPENORCREATE,
GAMESTATS_OPEN_OPENONLY);
for GAMESTATS_OPEN_TYPE use (GAMESTATS_OPEN_OPENORCREATE=>0,
GAMESTATS_OPEN_OPENONLY=>1);
type LPGAMESTATS_OPEN_TYPE is access all GAMESTATS_OPEN_TYPE;
type GAMESTATS_OPEN_RESULT is (GAMESTATS_OPEN_CREATED,
GAMESTATS_OPEN_OPENED);
for GAMESTATS_OPEN_RESULT use (GAMESTATS_OPEN_CREATED=>0,
GAMESTATS_OPEN_OPENED=>1);
type LPGAMESTATS_OPEN_RESULT is access all GAMESTATS_OPEN_RESULT;
IID_IGameStatistics : constant win32.rpcdce.GUID:=uuidof("3887C9CA-04A0-42ae-BC4C-5FA6C7721145");
type IGameStatistics is record
QueryInterface:access function(This:LPIGameStatistics;riid:REFIID;ppvObject:LPLPvoid) return HRESULT with Convention=>Stdcall;
AddRef:access function(This:LPIGameStatistics) return ULONG with Convention=>Stdcall;
Release:access function(This:LPIGameStatistics) return ULONG with Convention=>Stdcall;
GetMaxCategoryLength:access function(This:LPIGameStatistics;cch:LPUINT) return HRESULT with Convention=>Stdcall;
GetMaxNameLength:access function(This:LPIGameStatistics;cch:LPUINT) return HRESULT with Convention=>Stdcall;
GetMaxValueLength:access function(This:LPIGameStatistics;cch:LPUINT) return HRESULT with Convention=>Stdcall;
GetMaxCategories:access function(This:LPIGameStatistics;pMax:LPWORD) return HRESULT with Convention=>Stdcall;
GetMaxStatsPerCategory:access function(This:LPIGameStatistics;pMax:LPWORD) return HRESULT with Convention=>Stdcall;
SetCategoryTitle:access function(This:LPIGameStatistics;categoryIndex:WORD;title:LPCWSTR) return HRESULT with Convention=>Stdcall;
GetCategoryTitle:access function(This:LPIGameStatistics;categoryIndex:WORD;pTitle:LPLPWSTR) return HRESULT with Convention=>Stdcall;
GetStatistic:access function(This:LPIGameStatistics;categoryIndex:WORD;statIndex:WORD;pName:LPLPWSTR;pValue:LPLPWSTR) return HRESULT with Convention=>Stdcall;
SetStatistic:access function(This:LPIGameStatistics;categoryIndex:WORD;statIndex:WORD;name:LPCWSTR;value:LPCWSTR) return HRESULT with Convention=>Stdcall;
Save:access function(This:LPIGameStatistics;trackChanges:BOOL) return HRESULT with Convention=>Stdcall;
SetLastPlayedCategory:access function(This:LPIGameStatistics;categoryIndex:UINT) return HRESULT with Convention=>Stdcall;
GetLastPlayedCategory:access function(This:LPIGameStatistics;pCategoryIndex:LPUINT) return HRESULT with Convention=>Stdcall;
end record;
IID_IGameStatisticsMgr : constant win32.rpcdce.GUID:=uuidof("AFF3EA11-E70E-407d-95DD-35E612C41CE2");
type IGameStatisticsMgr is record
QueryInterface:access function(This:LPIGameStatisticsMgr;riid:REFIID;ppvObject:LPLPvoid) return HRESULT with Convention=>Stdcall;
AddRef:access function(This:LPIGameStatisticsMgr) return ULONG with Convention=>Stdcall;
Release:access function(This:LPIGameStatisticsMgr) return ULONG with Convention=>Stdcall;
GetGameStatistics:access function(This:LPIGameStatisticsMgr;GDFBinaryPath:LPCWSTR;openType:GAMESTATS_OPEN_TYPE;pOpenResult:LPGAMESTATS_OPEN_RESULT;ppiStats:LPLPIGameStatistics) return HRESULT with Convention=>Stdcall;
RemoveGameStatistics:access function(This:LPIGameStatisticsMgr;GDFBinaryPath:LPCWSTR) return HRESULT with Convention=>Stdcall;
end record;
IID_IGameExplorer2 : constant win32.rpcdce.GUID:=uuidof("86874AA7-A1ED-450d-A7EB-B89E20B2FFF3");
type IGameExplorer2 is record
QueryInterface:access function(This:LPIGameExplorer2;riid:REFIID;ppvObject:LPLPvoid) return HRESULT with Convention=>Stdcall;
AddRef:access function(This:LPIGameExplorer2) return ULONG with Convention=>Stdcall;
Release:access function(This:LPIGameExplorer2) return ULONG with Convention=>Stdcall;
InstallGame:access function(This:LPIGameExplorer2;binaryGDFPath:LPCWSTR;installDirectory:LPCWSTR;installScope:GAME_INSTALL_SCOPE) return HRESULT with Convention=>Stdcall;
UninstallGame:access function(This:LPIGameExplorer2;binaryGDFPath:LPCWSTR) return HRESULT with Convention=>Stdcall;
CheckAccess:access function(This:LPIGameExplorer2;binaryGDFPath:LPCWSTR;pHasAccess:LPBOOL) return HRESULT with Convention=>Stdcall;
end record;
LIBID_gameuxLib : constant win32.rpcdce.GUID with Import,external_name=>"LIBID_gameuxLib";
CLSID_GameExplorer : constant win32.rpcdce.GUID:=uuidof("9A5EA990-3034-4D6F-9128-01F3C61022BC");
CLSID_GameStatistics : constant win32.rpcdce.GUID:=uuidof("DBC85A2C-C0DC-4961-B6E2-D28B62C11AD4");
-- __RPC_USER ?
function BSTR_UserMarshal(Arg1:LPULONG;Arg2:LPUCHAR;Arg3:LPBSTR) return ULONG with Import,Convention=>stdcall,external_name=>"BSTR_UserMarshal";
function BSTR_UserMarshal(Arg1:LPULONG;Arg2:LPUCHAR;Arg3:LPBSTR) return PUCHAR with Import,Convention=>stdcall,external_name=>"BSTR_UserMarshal";
function BSTR_UserUnmarshal(Arg1:LPUlong;Arg2:LPUchar;Arg3:LPBSTR) return PUCHAR with Import,Convention=>stdcall,external_name=>"BSTR_UserUnmarshal";
procedure BSTR_UserFree(Arg1:LPUlong;Arg2:LPBSTR) with Import,Convention=>stdcall,external_name=>"BSTR_UserFree";
function BSTR_UserMarshal64(Arg1:LPUlong;Arg2:LPUchar;Arg3:LPBSTR) return ULONG with Import,Convention=>stdcall,external_name=>"BSTR_UserMarshal64";
function BSTR_UserMarshal64(Arg1:LPUlong;Arg2:LPUchar;Arg3:LPBSTR) return PUCHAR with Import,Convention=>stdcall,external_name=>"BSTR_UserMarshal64";
function BSTR_UserUnmarshal64(Arg1:LPUlong;Arg2:LPUchar;Arg3:LPBSTR) return PUCHAR with Import,Convention=>stdcall,external_name=>"BSTR_UserUnmarshal64";
procedure BSTR_UserFree64(Arg1:LPUlong;Arg2:LPBSTR) with Import,Convention=>stdcall,external_name=>"BSTR_UserFree64";
--
-- THE END.
--
end gameux;