diff options
Diffstat (limited to 'Assembly_Firstpass/Steamworks/SteamAppList.cs')
-rw-r--r-- | Assembly_Firstpass/Steamworks/SteamAppList.cs | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/Assembly_Firstpass/Steamworks/SteamAppList.cs b/Assembly_Firstpass/Steamworks/SteamAppList.cs new file mode 100644 index 0000000..fcdfb7f --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamAppList.cs @@ -0,0 +1,45 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +public static class SteamAppList +{ + public static uint GetNumInstalledApps() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamAppList_GetNumInstalledApps(CSteamAPIContext.GetSteamAppList()); + } + + public static uint GetInstalledApps(AppId_t[] pvecAppID, uint unMaxAppIDs) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamAppList_GetInstalledApps(CSteamAPIContext.GetSteamAppList(), pvecAppID, unMaxAppIDs); + } + + public static int GetAppName(AppId_t nAppID, out string pchName, int cchNameMax) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal(cchNameMax); + int num = NativeMethods.ISteamAppList_GetAppName(CSteamAPIContext.GetSteamAppList(), nAppID, intPtr, cchNameMax); + pchName = ((num != -1) ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return num; + } + + public static int GetAppInstallDir(AppId_t nAppID, out string pchDirectory, int cchNameMax) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal(cchNameMax); + int num = NativeMethods.ISteamAppList_GetAppInstallDir(CSteamAPIContext.GetSteamAppList(), nAppID, intPtr, cchNameMax); + pchDirectory = ((num != -1) ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return num; + } + + public static int GetAppBuildId(AppId_t nAppID) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamAppList_GetAppBuildId(CSteamAPIContext.GetSteamAppList(), nAppID); + } +} |