Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of SteamApiPatcher v0.1.0
BepInEx/patchers/SteamApiPatcher.dll
Decompiled 10 months agousing System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx.Logging; using Microsoft.CodeAnalysis; using Mono.Cecil; using Mono.Cecil.Cil; using Mono.Collections.Generic; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("SteamApiPatcher")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("0.1.0.0")] [assembly: AssemblyInformationalVersion("0.1.0+004661f21b08237308d5d0de0d0337037a1d916f")] [assembly: AssemblyProduct("Steam API Patcher")] [assembly: AssemblyTitle("SteamApiPatcher")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.1.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace SteamApiPatcher { public class Patcher { private const string GUID = "com.smrkn.steam-api-patcher"; private const string NAME = "Steam API Patcher"; private const string VERSION = "0.1.0"; internal static ManualLogSource Logger; private static Stream? _patched; public static IEnumerable<string> TargetDLLs { get; } static Patcher() { TargetDLLs = new string[1] { "Facepunch.Steamworks.Win64.dll" }; Logger = Logger.CreateLogSource("Steam API Patcher"); Logger.LogInfo((object)"Initializing Steam API Patcher v0.1.0"); } [DllImport("kernel32", SetLastError = true)] private static extern IntPtr LoadLibrary(string lpFileName); public static void Initialize() { string lpFileName = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "steam_api64_v161.dll"); Logger.LogInfo((object)"Attempting to patch steam_api64.dll"); if (LoadLibrary(lpFileName) == IntPtr.Zero) { Logger.LogError((object)"Failed to load steam_api64.dll"); } else { Logger.LogInfo((object)"Newer steam_api64.dll loaded successfully."); } } public static void Patch(ref AssemblyDefinition assembly) { Logger.LogInfo((object)"Attempting to patch Facepunch.Steamworks.Win64.dll"); _patched = File.Open(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Facepunch.Steamworks.Win64.dll"), FileMode.Open, FileAccess.Read); AssemblyDefinition val = AssemblyDefinition.ReadAssembly(_patched); PatchSteamImports(val); PatchConnectionManager(val); PatchSocketManager(val); PatchSteamUser(val); PatchConnection(val); val.Name = assembly.Name; val.Write(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "patchwork.dll")); assembly = val; Logger.LogInfo((object)"Facepunch.Steamworks.Win64.dll patched successfully."); } private static int PatchAllNestedTypes(TypeDefinition type) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) int num = 0; Enumerator<MethodDefinition> enumerator = type.Methods.GetEnumerator(); try { while (enumerator.MoveNext()) { PInvokeInfo pInvokeInfo = enumerator.Current.PInvokeInfo; if (pInvokeInfo != null && pInvokeInfo.Module != null) { ModuleReference module = pInvokeInfo.Module; string a = ((module != null) ? module.Name : null); if (string.Equals(a, "steam_api64", StringComparison.OrdinalIgnoreCase) || string.Equals(a, "steam_api64.dll", StringComparison.OrdinalIgnoreCase)) { pInvokeInfo.Module.Name = "steam_api64_v161"; num++; } } } } finally { ((IDisposable)enumerator).Dispose(); } Enumerator<TypeDefinition> enumerator2 = type.NestedTypes.GetEnumerator(); try { while (enumerator2.MoveNext()) { TypeDefinition current = enumerator2.Current; num += PatchAllNestedTypes(current); } return num; } finally { ((IDisposable)enumerator2).Dispose(); } } private static void PatchSteamImports(AssemblyDefinition assembly) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) ModuleDefinition mainModule = assembly.MainModule; int num = 0; Enumerator<TypeDefinition> enumerator = mainModule.Types.GetEnumerator(); try { while (enumerator.MoveNext()) { TypeDefinition current = enumerator.Current; num += PatchAllNestedTypes(current); } } finally { ((IDisposable)enumerator).Dispose(); } if (num > 0) { Logger.LogInfo((object)"Successfully patched Steam API; now using v161"); return; } Logger.LogError((object)"Failed to patch Steam API; aborting patching"); throw new Exception("Failed to patch Steam API"); } private static void PatchConnection(AssemblyDefinition assembly) { //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Expected O, but got Unknown //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Expected O, but got Unknown //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) TypeDefinition type = assembly.MainModule.GetType("Steamworks.Data.Connection"); if (type == null) { Logger.LogError((object)"Failed to find Steamworks.Data.Connection type in assembly."); return; } MethodDefinition val = ((IEnumerable<MethodDefinition>)type.Methods).First((MethodDefinition m) => ((MemberReference)m).Name == "SendMessage" && ((MethodReference)m).Parameters.Count == 3 && ((MemberReference)((ParameterReference)((MethodReference)m).Parameters[0]).ParameterType).FullName == "System.Byte[]" && ((MemberReference)((ParameterReference)((MethodReference)m).Parameters[1]).ParameterType).FullName == "Steamworks.Data.SendType" && ((MemberReference)((ParameterReference)((MethodReference)m).Parameters[2]).ParameterType).FullName == "System.UInt16"); if (val != null) { Logger.LogInfo((object)"Patching Connection.SendMessage method"); MethodDefinition val2 = new MethodDefinition("SendMessage", (MethodAttributes)134, assembly.MainModule.ImportReference(((MethodReference)val).ReturnType)); TypeReference parameterType = ((ParameterReference)((MethodReference)val).Parameters[0]).ParameterType; TypeReference parameterType2 = ((ParameterReference)((MethodReference)val).Parameters[1]).ParameterType; ((MethodReference)val2).Parameters.Add(new ParameterDefinition("data", (ParameterAttributes)0, assembly.MainModule.ImportReference(parameterType))); ((MethodReference)val2).Parameters.Add(new ParameterDefinition("sendType", (ParameterAttributes)0, assembly.MainModule.ImportReference(parameterType2))); ILProcessor iLProcessor = val2.Body.GetILProcessor(); iLProcessor.Emit(OpCodes.Ldarg_0); iLProcessor.Emit(OpCodes.Ldarg_1); iLProcessor.Emit(OpCodes.Ldarg_2); iLProcessor.Emit(OpCodes.Ldc_I4_0); iLProcessor.Emit(OpCodes.Conv_U2); iLProcessor.Emit(OpCodes.Call, assembly.MainModule.ImportReference((MethodReference)(object)val)); iLProcessor.Emit(OpCodes.Ret); val2.Body.MaxStackSize = 3; type.Methods.Add(val2); } } private static void PatchSteamUser(AssemblyDefinition assembly) { //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Expected O, but got Unknown //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) TypeDefinition type = assembly.MainModule.GetType("Steamworks.SteamClient"); TypeDefinition type2 = assembly.MainModule.GetType("Steamworks.SteamUser"); MethodDefinition getMethod = ((IEnumerable<PropertyDefinition>)type.Properties).First((PropertyDefinition p) => ((MemberReference)p).Name == "SteamId").GetMethod; MethodDefinition val = ((IEnumerable<MethodDefinition>)type2.Methods).First((MethodDefinition m) => ((MemberReference)m).Name == "GetAuthSessionTicket" && ((MethodReference)m).Parameters.Count == 1); if (val != null) { Logger.LogInfo((object)"Patching SteamUser.GetAuthSessionTicket method"); MethodDefinition val2 = new MethodDefinition("GetAuthSessionTicket", (MethodAttributes)150, (TypeReference)(object)assembly.MainModule.GetType("Steamworks.AuthTicket")); ILProcessor iLProcessor = val2.Body.GetILProcessor(); iLProcessor.Emit(OpCodes.Call, assembly.MainModule.ImportReference((MethodReference)(object)getMethod)); iLProcessor.Emit(OpCodes.Call, assembly.MainModule.ImportReference((MethodReference)(object)val)); iLProcessor.Emit(OpCodes.Ret); type2.Methods.Add(val2); } } private static void PatchConnectionManager(AssemblyDefinition assembly) { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Expected O, but got Unknown //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Expected O, but got Unknown //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) TypeDefinition type = assembly.MainModule.GetType("Steamworks.ConnectionManager"); MethodDefinition val = ((IEnumerable<MethodDefinition>)type.Methods).First((MethodDefinition m) => ((MemberReference)m).Name == "Receive" && ((MethodReference)m).Parameters.Count == 2); if (val != null) { Logger.LogInfo((object)"Patching ConnectionManager.Receive method"); MethodDefinition val2 = new MethodDefinition("Receive", (MethodAttributes)134, assembly.MainModule.TypeSystem.Void); ((MethodReference)val2).Parameters.Add(new ParameterDefinition("bufferSize", (ParameterAttributes)0, assembly.MainModule.TypeSystem.Int32)); ILProcessor iLProcessor = val2.Body.GetILProcessor(); iLProcessor.Emit(OpCodes.Ldarg_0); iLProcessor.Emit(OpCodes.Ldarg_1); iLProcessor.Emit(OpCodes.Ldc_I4_0); iLProcessor.Emit(OpCodes.Call, assembly.MainModule.ImportReference((MethodReference)(object)val)); iLProcessor.Emit(OpCodes.Pop); iLProcessor.Emit(OpCodes.Ret); type.Methods.Add(val2); } MethodDefinition val3 = ((IEnumerable<MethodDefinition>)type.Methods).First((MethodDefinition m) => ((MemberReference)m).Name == "Close" && ((MethodReference)m).Parameters.Count == 3 && ((MemberReference)((ParameterReference)((MethodReference)m).Parameters[1]).ParameterType).FullName == "System.Int32" && ((MemberReference)((ParameterReference)((MethodReference)m).Parameters[2]).ParameterType).FullName == "System.String"); if (val3 != null) { Logger.LogInfo((object)"Patching ConnectionManager.Close method"); MethodDefinition val4 = new MethodDefinition("Close", (MethodAttributes)134, assembly.MainModule.TypeSystem.Void); ILProcessor iLProcessor2 = val4.Body.GetILProcessor(); iLProcessor2.Emit(OpCodes.Ldarg_0); iLProcessor2.Emit(OpCodes.Ldc_I4_0); iLProcessor2.Emit(OpCodes.Ldc_I4_0); iLProcessor2.Emit(OpCodes.Ldstr, "Closing connection"); iLProcessor2.Emit(OpCodes.Call, assembly.MainModule.ImportReference((MethodReference)(object)val3)); iLProcessor2.Emit(OpCodes.Ret); val4.Body.MaxStackSize = 4; type.Methods.Add(val4); } } private static void PatchSocketManager(AssemblyDefinition assembly) { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Expected O, but got Unknown //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) TypeDefinition type = assembly.MainModule.GetType("Steamworks.SocketManager"); MethodDefinition val = ((IEnumerable<MethodDefinition>)type.Methods).First((MethodDefinition m) => ((MemberReference)m).Name == "Receive" && ((MethodReference)m).Parameters.Count == 2); if (val != null) { Logger.LogInfo((object)"Patching SocketManager.Receive method"); MethodDefinition val2 = new MethodDefinition("Receive", (MethodAttributes)134, assembly.MainModule.TypeSystem.Void); ((MethodReference)val2).Parameters.Add(new ParameterDefinition("bufferSize", (ParameterAttributes)0, assembly.MainModule.TypeSystem.Int32)); ILProcessor iLProcessor = val2.Body.GetILProcessor(); iLProcessor.Emit(OpCodes.Ldarg_0); iLProcessor.Emit(OpCodes.Ldarg_1); iLProcessor.Emit(OpCodes.Ldc_I4_0); iLProcessor.Emit(OpCodes.Call, assembly.MainModule.ImportReference((MethodReference)(object)val)); iLProcessor.Emit(OpCodes.Pop); iLProcessor.Emit(OpCodes.Ret); type.Methods.Add(val2); } } public static void Finish() { _patched?.Dispose(); } } }
BepInEx/patchers/Facepunch.Steamworks.Win64.dll
Decompiled 10 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Net; using System.Net.Sockets; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysis; using Steamworks.Data; using Steamworks.Ugc; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETFramework,Version=v4.6", FrameworkDisplayName = ".NET Framework 4.6")] [assembly: AssemblyCompany("Garry Newman")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("2.4.1")] [assembly: AssemblyInformationalVersion("1.0.0+b4d3a65f8686b40bb6ea09241f78ac0aa9f23753")] [assembly: AssemblyProduct("Facepunch.Steamworks.Win64")] [assembly: AssemblyTitle("Facepunch.Steamworks.Win64")] [assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/Facepunch/Facepunch.Steamworks.git")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class IsReadOnlyAttribute : Attribute { } } namespace Steamworks { internal struct CallResult<T> : INotifyCompletion where T : struct, ICallbackData { private SteamAPICall_t call; private ISteamUtils utils; private bool server; public bool IsCompleted { get { bool pbFailed = false; if (utils.IsAPICallCompleted(call, ref pbFailed) || pbFailed) { return true; } return false; } } public CallResult(SteamAPICall_t call, bool server) { this.call = call; this.server = server; utils = (server ? SteamSharedClass<SteamUtils>.InterfaceServer : SteamSharedClass<SteamUtils>.InterfaceClient) as ISteamUtils; if (utils == null) { utils = SteamSharedClass<SteamUtils>.Interface as ISteamUtils; } } public void OnCompleted(Action continuation) { if (IsCompleted) { continuation(); } else { Dispatch.OnCallComplete<T>(call, continuation, server); } } public T? GetResult() { bool pbFailed = false; if (!utils.IsAPICallCompleted(call, ref pbFailed) || pbFailed) { return null; } T val = default(T); int dataSize = val.DataSize; IntPtr intPtr = Marshal.AllocHGlobal(dataSize); try { if (!utils.GetAPICallResult(call, intPtr, dataSize, (int)val.CallbackType, ref pbFailed) || pbFailed) { Dispatch.OnDebugCallback?.Invoke(val.CallbackType, "!GetAPICallResult or failed", server); return null; } Dispatch.OnDebugCallback?.Invoke(val.CallbackType, Dispatch.CallbackToString(val.CallbackType, intPtr, dataSize), server); return (T)Marshal.PtrToStructure(intPtr, typeof(T)); } finally { Marshal.FreeHGlobal(intPtr); } } internal CallResult<T> GetAwaiter() { return this; } } internal interface ICallbackData { CallbackType CallbackType { get; } int DataSize { get; } } public class AuthTicket : IDisposable { public byte[] Data; public uint Handle; public void Cancel() { if (Handle != 0) { SteamUser.Internal.CancelAuthTicket(Handle); } Handle = 0u; Data = null; } public void Dispose() { Cancel(); } } public static class Dispatch { [StructLayout(LayoutKind.Sequential, Pack = 8)] internal struct CallbackMsg_t { public HSteamUser m_hSteamUser; public CallbackType Type; public IntPtr Data; public int DataSize; } private struct ResultCallback { public Action continuation; public bool server; } private struct Callback { public Action<IntPtr> action; public bool server; } public static Action<CallbackType, string, bool> OnDebugCallback; public static Action<Exception> OnException; private static bool runningFrame = false; private static List<Action<IntPtr>> actionsToCall = new List<Action<IntPtr>>(); private static Dictionary<ulong, ResultCallback> ResultCallbacks = new Dictionary<ulong, ResultCallback>(); private static Dictionary<CallbackType, List<Callback>> Callbacks = new Dictionary<CallbackType, List<Callback>>(); internal static HSteamPipe ClientPipe { get; set; } internal static HSteamPipe ServerPipe { get; set; } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl)] internal static extern void SteamAPI_ManualDispatch_Init(); [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl)] internal static extern void SteamAPI_ManualDispatch_RunFrame(HSteamPipe pipe); [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.I1)] internal static extern bool SteamAPI_ManualDispatch_GetNextCallback(HSteamPipe pipe, [In][Out] ref CallbackMsg_t msg); [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.I1)] internal static extern bool SteamAPI_ManualDispatch_FreeLastCallback(HSteamPipe pipe); internal static void Init() { SteamAPI_ManualDispatch_Init(); } internal static void Frame(HSteamPipe pipe) { if (runningFrame) { return; } try { runningFrame = true; SteamAPI_ManualDispatch_RunFrame(pipe); SteamNetworkingUtils.OutputDebugMessages(); CallbackMsg_t msg = default(CallbackMsg_t); while (SteamAPI_ManualDispatch_GetNextCallback(pipe, ref msg)) { try { ProcessCallback(msg, pipe == ServerPipe); } finally { SteamAPI_ManualDispatch_FreeLastCallback(pipe); } } } catch (Exception obj) { OnException?.Invoke(obj); } finally { runningFrame = false; } } private static void ProcessCallback(CallbackMsg_t msg, bool isServer) { OnDebugCallback?.Invoke(msg.Type, CallbackToString(msg.Type, msg.Data, msg.DataSize), isServer); if (msg.Type == CallbackType.SteamAPICallCompleted) { ProcessResult(msg); } else { if (!Callbacks.TryGetValue(msg.Type, out var value)) { return; } actionsToCall.Clear(); foreach (Callback item in value) { if (item.server == isServer) { actionsToCall.Add(item.action); } } foreach (Action<IntPtr> item2 in actionsToCall) { item2(msg.Data); } actionsToCall.Clear(); } } internal static string CallbackToString(CallbackType type, IntPtr data, int expectedsize) { if (!CallbackTypeFactory.All.TryGetValue(type, out var value)) { return $"[{type} not in sdk]"; } object obj = data.ToType(value); if (obj == null) { return "[null]"; } string text = ""; FieldInfo[] fields = value.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (fields.Length == 0) { return "[no fields]"; } int num = fields.Max((FieldInfo x) => x.Name.Length) + 1; if (num < 10) { num = 10; } FieldInfo[] array = fields; foreach (FieldInfo fieldInfo in array) { int num2 = num - fieldInfo.Name.Length; if (num2 < 0) { num2 = 0; } text += $"{new string(' ', num2)}{fieldInfo.Name}: {fieldInfo.GetValue(obj)}\n"; } return text.Trim(new char[1] { '\n' }); } private static void ProcessResult(CallbackMsg_t msg) { SteamAPICallCompleted_t steamAPICallCompleted_t = msg.Data.ToType<SteamAPICallCompleted_t>(); if (!ResultCallbacks.TryGetValue(steamAPICallCompleted_t.AsyncCall, out var value)) { OnDebugCallback?.Invoke((CallbackType)steamAPICallCompleted_t.Callback, "[no callback waiting/required]", arg3: false); return; } ResultCallbacks.Remove(steamAPICallCompleted_t.AsyncCall); value.continuation(); } internal static async void LoopClientAsync() { while (ClientPipe != 0) { Frame(ClientPipe); await Task.Delay(16); } } internal static async void LoopServerAsync() { while (ServerPipe != 0) { Frame(ServerPipe); await Task.Delay(32); } } internal static void OnCallComplete<T>(SteamAPICall_t call, Action continuation, bool server) where T : struct, ICallbackData { ResultCallbacks[call.Value] = new ResultCallback { continuation = continuation, server = server }; } internal static void Install<T>(Action<T> p, bool server = false) where T : ICallbackData { CallbackType callbackType = default(T).CallbackType; if (!Callbacks.TryGetValue(callbackType, out var value)) { value = new List<Callback>(); Callbacks[callbackType] = value; } value.Add(new Callback { action = delegate(IntPtr x) { p(x.ToType<T>()); }, server = server }); } internal static void ShutdownServer() { ServerPipe = 0; foreach (KeyValuePair<CallbackType, List<Callback>> callback in Callbacks) { Callbacks[callback.Key].RemoveAll((Callback x) => x.server); } ResultCallbacks = ResultCallbacks.Where((KeyValuePair<ulong, ResultCallback> x) => !x.Value.server).ToDictionary((KeyValuePair<ulong, ResultCallback> x) => x.Key, (KeyValuePair<ulong, ResultCallback> x) => x.Value); } internal static void ShutdownClient() { ClientPipe = 0; foreach (KeyValuePair<CallbackType, List<Callback>> callback in Callbacks) { Callbacks[callback.Key].RemoveAll((Callback x) => !x.server); } ResultCallbacks = ResultCallbacks.Where((KeyValuePair<ulong, ResultCallback> x) => x.Value.server).ToDictionary((KeyValuePair<ulong, ResultCallback> x) => x.Key, (KeyValuePair<ulong, ResultCallback> x) => x.Value); } } internal static class SteamAPI { internal static class Native { [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl)] public static extern SteamAPIInitResult SteamInternal_SteamAPI_Init([MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pszInternalCheckInterfaceVersions, IntPtr pOutErrMsg); [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl)] public static extern void SteamAPI_Shutdown(); [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl)] public static extern HSteamPipe SteamAPI_GetHSteamPipe(); [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.I1)] public static extern bool SteamAPI_RestartAppIfNecessary(uint unOwnAppID); } internal static SteamAPIInitResult Init(string pszInternalCheckInterfaceVersions, out string pOutErrMsg) { using Helpers.Memory memory = Helpers.Memory.Take(); SteamAPIInitResult result = Native.SteamInternal_SteamAPI_Init(pszInternalCheckInterfaceVersions, memory.Ptr); pOutErrMsg = Helpers.MemoryToString(memory.Ptr); return result; } internal static void Shutdown() { Native.SteamAPI_Shutdown(); } internal static HSteamPipe GetHSteamPipe() { return Native.SteamAPI_GetHSteamPipe(); } internal static bool RestartAppIfNecessary(uint unOwnAppID) { return Native.SteamAPI_RestartAppIfNecessary(unOwnAppID); } } internal static class SteamGameServer { internal static class Native { [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl)] public static extern void SteamGameServer_RunCallbacks(); [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl)] public static extern void SteamGameServer_Shutdown(); [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl)] public static extern HSteamPipe SteamGameServer_GetHSteamPipe(); } internal static void RunCallbacks() { Native.SteamGameServer_RunCallbacks(); } internal static void Shutdown() { Native.SteamGameServer_Shutdown(); } internal static HSteamPipe GetHSteamPipe() { return Native.SteamGameServer_GetHSteamPipe(); } } internal static class SteamInternal { internal static class Native { [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl)] public static extern SteamAPIInitResult SteamInternal_GameServer_Init_V2(uint unIP, ushort usGamePort, ushort usQueryPort, int eServerMode, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersionString, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pszInternalCheckInterfaceVersions, IntPtr pOutErrMsg); } internal static SteamAPIInitResult GameServer_Init(uint unIP, ushort usGamePort, ushort usQueryPort, int eServerMode, string pchVersionString, string pszInternalCheckInterfaceVersions, out string pOutErrMsg) { using Helpers.Memory memory = Helpers.Memory.Take(); SteamAPIInitResult result = Native.SteamInternal_GameServer_Init_V2(unIP, usGamePort, usQueryPort, eServerMode, pchVersionString, pszInternalCheckInterfaceVersions, memory.Ptr); pOutErrMsg = Helpers.MemoryToString(memory.Ptr); return result; } } public enum CallbackType { SteamServersConnected = 101, SteamServerConnectFailure = 102, SteamServersDisconnected = 103, ClientGameServerDeny = 113, GSPolicyResponse = 115, IPCFailure = 117, LicensesUpdated = 125, ValidateAuthTicketResponse = 143, MicroTxnAuthorizationResponse = 152, EncryptedAppTicketResponse = 154, GetAuthSessionTicketResponse = 163, GameWebCallback = 164, StoreAuthURLResponse = 165, MarketEligibilityResponse = 166, DurationControl = 167, GetTicketForWebApiResponse = 168, GSClientApprove = 201, GSClientDeny = 202, GSClientKick = 203, GSClientAchievementStatus = 206, GSGameplayStats = 207, GSClientGroupStatus = 208, GSReputation = 209, AssociateWithClanResult = 210, ComputeNewPlayerCompatibilityResult = 211, PersonaStateChange = 304, GameOverlayActivated = 331, GameServerChangeRequested = 332, GameLobbyJoinRequested = 333, AvatarImageLoaded = 334, ClanOfficerListResponse = 335, FriendRichPresenceUpdate = 336, GameRichPresenceJoinRequested = 337, GameConnectedClanChatMsg = 338, GameConnectedChatJoin = 339, GameConnectedChatLeave = 340, DownloadClanActivityCountsResult = 341, JoinClanChatRoomCompletionResult = 342, GameConnectedFriendChatMsg = 343, FriendsGetFollowerCount = 344, FriendsIsFollowing = 345, FriendsEnumerateFollowingList = 346, SetPersonaNameResponse = 347, UnreadChatMessagesChanged = 348, OverlayBrowserProtocolNavigation = 349, EquippedProfileItemsChanged = 350, EquippedProfileItems = 351, FavoritesListChanged = 502, LobbyInvite = 503, LobbyEnter = 504, LobbyDataUpdate = 505, LobbyChatUpdate = 506, LobbyChatMsg = 507, LobbyGameCreated = 509, LobbyMatchList = 510, LobbyKicked = 512, LobbyCreated = 513, PSNGameBootInviteResult = 515, FavoritesListAccountsUpdated = 516, IPCountry = 701, LowBatteryPower = 702, SteamAPICallCompleted = 703, SteamShutdown = 704, CheckFileSignature = 705, GamepadTextInputDismissed = 714, AppResumingFromSuspend = 736, FloatingGamepadTextInputDismissed = 738, FilterTextDictionaryChanged = 739, DlcInstalled = 1005, NewUrlLaunchParameters = 1014, AppProofOfPurchaseKeyResponse = 1021, FileDetailsResult = 1023, TimedTrialStatus = 1030, UserStatsReceived = 1101, UserStatsStored = 1102, UserAchievementStored = 1103, LeaderboardFindResult = 1104, LeaderboardScoresDownloaded = 1105, LeaderboardScoreUploaded = 1106, NumberOfCurrentPlayers = 1107, UserStatsUnloaded = 1108, GSStatsUnloaded = 1108, UserAchievementIconFetched = 1109, GlobalAchievementPercentagesReady = 1110, LeaderboardUGCSet = 1111, GlobalStatsReceived = 1112, P2PSessionRequest = 1202, P2PSessionConnectFail = 1203, SteamNetConnectionStatusChangedCallback = 1221, SteamNetAuthenticationStatus = 1222, SteamNetworkingFakeIPResult = 1223, SteamNetworkingMessagesSessionRequest = 1251, SteamNetworkingMessagesSessionFailed = 1252, SteamRelayNetworkStatus = 1281, RemoteStorageFileShareResult = 1307, RemoteStoragePublishFileResult = 1309, RemoteStorageDeletePublishedFileResult = 1311, RemoteStorageEnumerateUserPublishedFilesResult = 1312, RemoteStorageSubscribePublishedFileResult = 1313, RemoteStorageEnumerateUserSubscribedFilesResult = 1314, RemoteStorageUnsubscribePublishedFileResult = 1315, RemoteStorageUpdatePublishedFileResult = 1316, RemoteStorageDownloadUGCResult = 1317, RemoteStorageGetPublishedFileDetailsResult = 1318, RemoteStorageEnumerateWorkshopFilesResult = 1319, RemoteStorageGetPublishedItemVoteDetailsResult = 1320, RemoteStoragePublishedFileSubscribed = 1321, RemoteStoragePublishedFileUnsubscribed = 1322, RemoteStoragePublishedFileDeleted = 1323, RemoteStorageUpdateUserPublishedItemVoteResult = 1324, RemoteStorageUserVoteDetails = 1325, RemoteStorageEnumerateUserSharedWorkshopFilesResult = 1326, RemoteStorageSetUserPublishedFileActionResult = 1327, RemoteStorageEnumeratePublishedFilesByUserActionResult = 1328, RemoteStoragePublishFileProgress = 1329, RemoteStoragePublishedFileUpdated = 1330, RemoteStorageFileWriteAsyncComplete = 1331, RemoteStorageFileReadAsyncComplete = 1332, RemoteStorageLocalFileChange = 1333, GSStatsReceived = 1800, GSStatsStored = 1801, HTTPRequestCompleted = 2101, HTTPRequestHeadersReceived = 2102, HTTPRequestDataReceived = 2103, ScreenshotReady = 2301, ScreenshotRequested = 2302, SteamInputDeviceConnected = 2801, SteamInputDeviceDisconnected = 2802, SteamInputConfigurationLoaded = 2803, SteamInputGamepadSlotChange = 2804, SteamUGCQueryCompleted = 3401, SteamUGCRequestUGCDetailsResult = 3402, CreateItemResult = 3403, SubmitItemUpdateResult = 3404, ItemInstalled = 3405, DownloadItemResult = 3406, UserFavoriteItemsListChanged = 3407, SetUserItemVoteResult = 3408, GetUserItemVoteResult = 3409, StartPlaytimeTrackingResult = 3410, StopPlaytimeTrackingResult = 3411, AddUGCDependencyResult = 3412, RemoveUGCDependencyResult = 3413, AddAppDependencyResult = 3414, RemoveAppDependencyResult = 3415, GetAppDependenciesResult = 3416, DeleteItemResult = 3417, UserSubscribedItemsListChanged = 3418, WorkshopEULAStatus = 3420, PlaybackStatusHasChanged = 4001, VolumeHasChanged = 4002, MusicPlayerWantsVolume = 4011, MusicPlayerSelectsQueueEntry = 4012, MusicPlayerSelectsPlaylistEntry = 4013, MusicPlayerRemoteWillActivate = 4101, MusicPlayerRemoteWillDeactivate = 4102, MusicPlayerRemoteToFront = 4103, MusicPlayerWillQuit = 4104, MusicPlayerWantsPlay = 4105, MusicPlayerWantsPause = 4106, MusicPlayerWantsPlayPrevious = 4107, MusicPlayerWantsPlayNext = 4108, MusicPlayerWantsShuffled = 4109, MusicPlayerWantsLooped = 4110, MusicPlayerWantsPlayingRepeatStatus = 4114, HTML_BrowserReady = 4501, HTML_NeedsPaint = 4502, HTML_StartRequest = 4503, HTML_CloseBrowser = 4504, HTML_URLChanged = 4505, HTML_FinishedRequest = 4506, HTML_OpenLinkInNewTab = 4507, HTML_ChangedTitle = 4508, HTML_SearchResults = 4509, HTML_CanGoBackAndForward = 4510, HTML_HorizontalScroll = 4511, HTML_VerticalScroll = 4512, HTML_LinkAtPosition = 4513, HTML_JSAlert = 4514, HTML_JSConfirm = 4515, HTML_FileOpenDialog = 4516, HTML_NewWindow = 4521, HTML_SetCursor = 4522, HTML_StatusText = 4523, HTML_ShowToolTip = 4524, HTML_UpdateToolTip = 4525, HTML_HideToolTip = 4526, HTML_BrowserRestarted = 4527, BroadcastUploadStart = 4604, BroadcastUploadStop = 4605, GetVideoURLResult = 4611, GetOPFSettingsResult = 4624, SteamInventoryResultReady = 4700, SteamInventoryFullUpdate = 4701, SteamInventoryDefinitionUpdate = 4702, SteamInventoryEligiblePromoItemDefIDs = 4703, SteamInventoryStartPurchaseResult = 4704, SteamInventoryRequestPricesResult = 4705, SteamParentalSettingsChanged = 5001, SearchForGameProgressCallback = 5201, SearchForGameResultCallback = 5202, RequestPlayersForGameProgressCallback = 5211, RequestPlayersForGameResultCallback = 5212, RequestPlayersForGameFinalResultCallback = 5213, SubmitPlayerResultResultCallback = 5214, EndGameResultCallback = 5215, JoinPartyCallback = 5301, CreateBeaconCallback = 5302, ReservationNotificationCallback = 5303, ChangeNumOpenSlotsCallback = 5304, AvailableBeaconLocationsUpdated = 5305, ActiveBeaconsUpdated = 5306, SteamRemotePlaySessionConnected = 5701, SteamRemotePlaySessionDisconnected = 5702, SteamRemotePlayTogetherGuestInvite = 5703, SteamTimelineGamePhaseRecordingExists = 6001, SteamTimelineEventRecordingExists = 6002 } internal static class CallbackTypeFactory { internal static Dictionary<CallbackType, Type> All = new Dictionary<CallbackType, Type> { { CallbackType.SteamServersConnected, typeof(SteamServersConnected_t) }, { CallbackType.SteamServerConnectFailure, typeof(SteamServerConnectFailure_t) }, { CallbackType.SteamServersDisconnected, typeof(SteamServersDisconnected_t) }, { CallbackType.ClientGameServerDeny, typeof(ClientGameServerDeny_t) }, { CallbackType.GSPolicyResponse, typeof(GSPolicyResponse_t) }, { CallbackType.IPCFailure, typeof(IPCFailure_t) }, { CallbackType.LicensesUpdated, typeof(LicensesUpdated_t) }, { CallbackType.ValidateAuthTicketResponse, typeof(ValidateAuthTicketResponse_t) }, { CallbackType.MicroTxnAuthorizationResponse, typeof(MicroTxnAuthorizationResponse_t) }, { CallbackType.EncryptedAppTicketResponse, typeof(EncryptedAppTicketResponse_t) }, { CallbackType.GetAuthSessionTicketResponse, typeof(GetAuthSessionTicketResponse_t) }, { CallbackType.GameWebCallback, typeof(GameWebCallback_t) }, { CallbackType.StoreAuthURLResponse, typeof(StoreAuthURLResponse_t) }, { CallbackType.MarketEligibilityResponse, typeof(MarketEligibilityResponse_t) }, { CallbackType.DurationControl, typeof(DurationControl_t) }, { CallbackType.GetTicketForWebApiResponse, typeof(GetTicketForWebApiResponse_t) }, { CallbackType.GSClientApprove, typeof(GSClientApprove_t) }, { CallbackType.GSClientDeny, typeof(GSClientDeny_t) }, { CallbackType.GSClientKick, typeof(GSClientKick_t) }, { CallbackType.GSClientAchievementStatus, typeof(GSClientAchievementStatus_t) }, { CallbackType.GSGameplayStats, typeof(GSGameplayStats_t) }, { CallbackType.GSClientGroupStatus, typeof(GSClientGroupStatus_t) }, { CallbackType.GSReputation, typeof(GSReputation_t) }, { CallbackType.AssociateWithClanResult, typeof(AssociateWithClanResult_t) }, { CallbackType.ComputeNewPlayerCompatibilityResult, typeof(ComputeNewPlayerCompatibilityResult_t) }, { CallbackType.PersonaStateChange, typeof(PersonaStateChange_t) }, { CallbackType.GameOverlayActivated, typeof(GameOverlayActivated_t) }, { CallbackType.GameServerChangeRequested, typeof(GameServerChangeRequested_t) }, { CallbackType.GameLobbyJoinRequested, typeof(GameLobbyJoinRequested_t) }, { CallbackType.AvatarImageLoaded, typeof(AvatarImageLoaded_t) }, { CallbackType.ClanOfficerListResponse, typeof(ClanOfficerListResponse_t) }, { CallbackType.FriendRichPresenceUpdate, typeof(FriendRichPresenceUpdate_t) }, { CallbackType.GameRichPresenceJoinRequested, typeof(GameRichPresenceJoinRequested_t) }, { CallbackType.GameConnectedClanChatMsg, typeof(GameConnectedClanChatMsg_t) }, { CallbackType.GameConnectedChatJoin, typeof(GameConnectedChatJoin_t) }, { CallbackType.GameConnectedChatLeave, typeof(GameConnectedChatLeave_t) }, { CallbackType.DownloadClanActivityCountsResult, typeof(DownloadClanActivityCountsResult_t) }, { CallbackType.JoinClanChatRoomCompletionResult, typeof(JoinClanChatRoomCompletionResult_t) }, { CallbackType.GameConnectedFriendChatMsg, typeof(GameConnectedFriendChatMsg_t) }, { CallbackType.FriendsGetFollowerCount, typeof(FriendsGetFollowerCount_t) }, { CallbackType.FriendsIsFollowing, typeof(FriendsIsFollowing_t) }, { CallbackType.FriendsEnumerateFollowingList, typeof(FriendsEnumerateFollowingList_t) }, { CallbackType.SetPersonaNameResponse, typeof(SetPersonaNameResponse_t) }, { CallbackType.UnreadChatMessagesChanged, typeof(UnreadChatMessagesChanged_t) }, { CallbackType.OverlayBrowserProtocolNavigation, typeof(OverlayBrowserProtocolNavigation_t) }, { CallbackType.EquippedProfileItemsChanged, typeof(EquippedProfileItemsChanged_t) }, { CallbackType.EquippedProfileItems, typeof(EquippedProfileItems_t) }, { CallbackType.FavoritesListChanged, typeof(FavoritesListChanged_t) }, { CallbackType.LobbyInvite, typeof(LobbyInvite_t) }, { CallbackType.LobbyEnter, typeof(LobbyEnter_t) }, { CallbackType.LobbyDataUpdate, typeof(LobbyDataUpdate_t) }, { CallbackType.LobbyChatUpdate, typeof(LobbyChatUpdate_t) }, { CallbackType.LobbyChatMsg, typeof(LobbyChatMsg_t) }, { CallbackType.LobbyGameCreated, typeof(LobbyGameCreated_t) }, { CallbackType.LobbyMatchList, typeof(LobbyMatchList_t) }, { CallbackType.LobbyKicked, typeof(LobbyKicked_t) }, { CallbackType.LobbyCreated, typeof(LobbyCreated_t) }, { CallbackType.PSNGameBootInviteResult, typeof(PSNGameBootInviteResult_t) }, { CallbackType.FavoritesListAccountsUpdated, typeof(FavoritesListAccountsUpdated_t) }, { CallbackType.IPCountry, typeof(IPCountry_t) }, { CallbackType.LowBatteryPower, typeof(LowBatteryPower_t) }, { CallbackType.SteamAPICallCompleted, typeof(SteamAPICallCompleted_t) }, { CallbackType.SteamShutdown, typeof(SteamShutdown_t) }, { CallbackType.CheckFileSignature, typeof(CheckFileSignature_t) }, { CallbackType.GamepadTextInputDismissed, typeof(GamepadTextInputDismissed_t) }, { CallbackType.AppResumingFromSuspend, typeof(AppResumingFromSuspend_t) }, { CallbackType.FloatingGamepadTextInputDismissed, typeof(FloatingGamepadTextInputDismissed_t) }, { CallbackType.FilterTextDictionaryChanged, typeof(FilterTextDictionaryChanged_t) }, { CallbackType.DlcInstalled, typeof(DlcInstalled_t) }, { CallbackType.NewUrlLaunchParameters, typeof(NewUrlLaunchParameters_t) }, { CallbackType.AppProofOfPurchaseKeyResponse, typeof(AppProofOfPurchaseKeyResponse_t) }, { CallbackType.FileDetailsResult, typeof(FileDetailsResult_t) }, { CallbackType.TimedTrialStatus, typeof(TimedTrialStatus_t) }, { CallbackType.UserStatsReceived, typeof(UserStatsReceived_t) }, { CallbackType.UserStatsStored, typeof(UserStatsStored_t) }, { CallbackType.UserAchievementStored, typeof(UserAchievementStored_t) }, { CallbackType.LeaderboardFindResult, typeof(LeaderboardFindResult_t) }, { CallbackType.LeaderboardScoresDownloaded, typeof(LeaderboardScoresDownloaded_t) }, { CallbackType.LeaderboardScoreUploaded, typeof(LeaderboardScoreUploaded_t) }, { CallbackType.NumberOfCurrentPlayers, typeof(NumberOfCurrentPlayers_t) }, { CallbackType.UserStatsUnloaded, typeof(UserStatsUnloaded_t) }, { CallbackType.UserAchievementIconFetched, typeof(UserAchievementIconFetched_t) }, { CallbackType.GlobalAchievementPercentagesReady, typeof(GlobalAchievementPercentagesReady_t) }, { CallbackType.LeaderboardUGCSet, typeof(LeaderboardUGCSet_t) }, { CallbackType.GlobalStatsReceived, typeof(GlobalStatsReceived_t) }, { CallbackType.P2PSessionRequest, typeof(P2PSessionRequest_t) }, { CallbackType.P2PSessionConnectFail, typeof(P2PSessionConnectFail_t) }, { CallbackType.SteamNetConnectionStatusChangedCallback, typeof(SteamNetConnectionStatusChangedCallback_t) }, { CallbackType.SteamNetAuthenticationStatus, typeof(SteamNetAuthenticationStatus_t) }, { CallbackType.SteamNetworkingFakeIPResult, typeof(SteamNetworkingFakeIPResult_t) }, { CallbackType.SteamNetworkingMessagesSessionRequest, typeof(SteamNetworkingMessagesSessionRequest_t) }, { CallbackType.SteamNetworkingMessagesSessionFailed, typeof(SteamNetworkingMessagesSessionFailed_t) }, { CallbackType.SteamRelayNetworkStatus, typeof(SteamRelayNetworkStatus_t) }, { CallbackType.RemoteStorageFileShareResult, typeof(RemoteStorageFileShareResult_t) }, { CallbackType.RemoteStoragePublishFileResult, typeof(RemoteStoragePublishFileResult_t) }, { CallbackType.RemoteStorageDeletePublishedFileResult, typeof(RemoteStorageDeletePublishedFileResult_t) }, { CallbackType.RemoteStorageEnumerateUserPublishedFilesResult, typeof(RemoteStorageEnumerateUserPublishedFilesResult_t) }, { CallbackType.RemoteStorageSubscribePublishedFileResult, typeof(RemoteStorageSubscribePublishedFileResult_t) }, { CallbackType.RemoteStorageEnumerateUserSubscribedFilesResult, typeof(RemoteStorageEnumerateUserSubscribedFilesResult_t) }, { CallbackType.RemoteStorageUnsubscribePublishedFileResult, typeof(RemoteStorageUnsubscribePublishedFileResult_t) }, { CallbackType.RemoteStorageUpdatePublishedFileResult, typeof(RemoteStorageUpdatePublishedFileResult_t) }, { CallbackType.RemoteStorageDownloadUGCResult, typeof(RemoteStorageDownloadUGCResult_t) }, { CallbackType.RemoteStorageGetPublishedFileDetailsResult, typeof(RemoteStorageGetPublishedFileDetailsResult_t) }, { CallbackType.RemoteStorageEnumerateWorkshopFilesResult, typeof(RemoteStorageEnumerateWorkshopFilesResult_t) }, { CallbackType.RemoteStorageGetPublishedItemVoteDetailsResult, typeof(RemoteStorageGetPublishedItemVoteDetailsResult_t) }, { CallbackType.RemoteStoragePublishedFileSubscribed, typeof(RemoteStoragePublishedFileSubscribed_t) }, { CallbackType.RemoteStoragePublishedFileUnsubscribed, typeof(RemoteStoragePublishedFileUnsubscribed_t) }, { CallbackType.RemoteStoragePublishedFileDeleted, typeof(RemoteStoragePublishedFileDeleted_t) }, { CallbackType.RemoteStorageUpdateUserPublishedItemVoteResult, typeof(RemoteStorageUpdateUserPublishedItemVoteResult_t) }, { CallbackType.RemoteStorageUserVoteDetails, typeof(RemoteStorageUserVoteDetails_t) }, { CallbackType.RemoteStorageEnumerateUserSharedWorkshopFilesResult, typeof(RemoteStorageEnumerateUserSharedWorkshopFilesResult_t) }, { CallbackType.RemoteStorageSetUserPublishedFileActionResult, typeof(RemoteStorageSetUserPublishedFileActionResult_t) }, { CallbackType.RemoteStorageEnumeratePublishedFilesByUserActionResult, typeof(RemoteStorageEnumeratePublishedFilesByUserActionResult_t) }, { CallbackType.RemoteStoragePublishFileProgress, typeof(RemoteStoragePublishFileProgress_t) }, { CallbackType.RemoteStoragePublishedFileUpdated, typeof(RemoteStoragePublishedFileUpdated_t) }, { CallbackType.RemoteStorageFileWriteAsyncComplete, typeof(RemoteStorageFileWriteAsyncComplete_t) }, { CallbackType.RemoteStorageFileReadAsyncComplete, typeof(RemoteStorageFileReadAsyncComplete_t) }, { CallbackType.RemoteStorageLocalFileChange, typeof(RemoteStorageLocalFileChange_t) }, { CallbackType.GSStatsReceived, typeof(GSStatsReceived_t) }, { CallbackType.GSStatsStored, typeof(GSStatsStored_t) }, { CallbackType.HTTPRequestCompleted, typeof(HTTPRequestCompleted_t) }, { CallbackType.HTTPRequestHeadersReceived, typeof(HTTPRequestHeadersReceived_t) }, { CallbackType.HTTPRequestDataReceived, typeof(HTTPRequestDataReceived_t) }, { CallbackType.ScreenshotReady, typeof(ScreenshotReady_t) }, { CallbackType.ScreenshotRequested, typeof(ScreenshotRequested_t) }, { CallbackType.SteamInputDeviceConnected, typeof(SteamInputDeviceConnected_t) }, { CallbackType.SteamInputDeviceDisconnected, typeof(SteamInputDeviceDisconnected_t) }, { CallbackType.SteamInputConfigurationLoaded, typeof(SteamInputConfigurationLoaded_t) }, { CallbackType.SteamInputGamepadSlotChange, typeof(SteamInputGamepadSlotChange_t) }, { CallbackType.SteamUGCQueryCompleted, typeof(SteamUGCQueryCompleted_t) }, { CallbackType.SteamUGCRequestUGCDetailsResult, typeof(SteamUGCRequestUGCDetailsResult_t) }, { CallbackType.CreateItemResult, typeof(CreateItemResult_t) }, { CallbackType.SubmitItemUpdateResult, typeof(SubmitItemUpdateResult_t) }, { CallbackType.ItemInstalled, typeof(ItemInstalled_t) }, { CallbackType.DownloadItemResult, typeof(DownloadItemResult_t) }, { CallbackType.UserFavoriteItemsListChanged, typeof(UserFavoriteItemsListChanged_t) }, { CallbackType.SetUserItemVoteResult, typeof(SetUserItemVoteResult_t) }, { CallbackType.GetUserItemVoteResult, typeof(GetUserItemVoteResult_t) }, { CallbackType.StartPlaytimeTrackingResult, typeof(StartPlaytimeTrackingResult_t) }, { CallbackType.StopPlaytimeTrackingResult, typeof(StopPlaytimeTrackingResult_t) }, { CallbackType.AddUGCDependencyResult, typeof(AddUGCDependencyResult_t) }, { CallbackType.RemoveUGCDependencyResult, typeof(RemoveUGCDependencyResult_t) }, { CallbackType.AddAppDependencyResult, typeof(AddAppDependencyResult_t) }, { CallbackType.RemoveAppDependencyResult, typeof(RemoveAppDependencyResult_t) }, { CallbackType.GetAppDependenciesResult, typeof(GetAppDependenciesResult_t) }, { CallbackType.DeleteItemResult, typeof(DeleteItemResult_t) }, { CallbackType.UserSubscribedItemsListChanged, typeof(UserSubscribedItemsListChanged_t) }, { CallbackType.WorkshopEULAStatus, typeof(WorkshopEULAStatus_t) }, { CallbackType.PlaybackStatusHasChanged, typeof(PlaybackStatusHasChanged_t) }, { CallbackType.VolumeHasChanged, typeof(VolumeHasChanged_t) }, { CallbackType.MusicPlayerWantsVolume, typeof(MusicPlayerWantsVolume_t) }, { CallbackType.MusicPlayerSelectsQueueEntry, typeof(MusicPlayerSelectsQueueEntry_t) }, { CallbackType.MusicPlayerSelectsPlaylistEntry, typeof(MusicPlayerSelectsPlaylistEntry_t) }, { CallbackType.MusicPlayerRemoteWillActivate, typeof(MusicPlayerRemoteWillActivate_t) }, { CallbackType.MusicPlayerRemoteWillDeactivate, typeof(MusicPlayerRemoteWillDeactivate_t) }, { CallbackType.MusicPlayerRemoteToFront, typeof(MusicPlayerRemoteToFront_t) }, { CallbackType.MusicPlayerWillQuit, typeof(MusicPlayerWillQuit_t) }, { CallbackType.MusicPlayerWantsPlay, typeof(MusicPlayerWantsPlay_t) }, { CallbackType.MusicPlayerWantsPause, typeof(MusicPlayerWantsPause_t) }, { CallbackType.MusicPlayerWantsPlayPrevious, typeof(MusicPlayerWantsPlayPrevious_t) }, { CallbackType.MusicPlayerWantsPlayNext, typeof(MusicPlayerWantsPlayNext_t) }, { CallbackType.MusicPlayerWantsShuffled, typeof(MusicPlayerWantsShuffled_t) }, { CallbackType.MusicPlayerWantsLooped, typeof(MusicPlayerWantsLooped_t) }, { CallbackType.MusicPlayerWantsPlayingRepeatStatus, typeof(MusicPlayerWantsPlayingRepeatStatus_t) }, { CallbackType.HTML_BrowserReady, typeof(HTML_BrowserReady_t) }, { CallbackType.HTML_NeedsPaint, typeof(HTML_NeedsPaint_t) }, { CallbackType.HTML_StartRequest, typeof(HTML_StartRequest_t) }, { CallbackType.HTML_CloseBrowser, typeof(HTML_CloseBrowser_t) }, { CallbackType.HTML_URLChanged, typeof(HTML_URLChanged_t) }, { CallbackType.HTML_FinishedRequest, typeof(HTML_FinishedRequest_t) }, { CallbackType.HTML_OpenLinkInNewTab, typeof(HTML_OpenLinkInNewTab_t) }, { CallbackType.HTML_ChangedTitle, typeof(HTML_ChangedTitle_t) }, { CallbackType.HTML_SearchResults, typeof(HTML_SearchResults_t) }, { CallbackType.HTML_CanGoBackAndForward, typeof(HTML_CanGoBackAndForward_t) }, { CallbackType.HTML_HorizontalScroll, typeof(HTML_HorizontalScroll_t) }, { CallbackType.HTML_VerticalScroll, typeof(HTML_VerticalScroll_t) }, { CallbackType.HTML_LinkAtPosition, typeof(HTML_LinkAtPosition_t) }, { CallbackType.HTML_JSAlert, typeof(HTML_JSAlert_t) }, { CallbackType.HTML_JSConfirm, typeof(HTML_JSConfirm_t) }, { CallbackType.HTML_FileOpenDialog, typeof(HTML_FileOpenDialog_t) }, { CallbackType.HTML_NewWindow, typeof(HTML_NewWindow_t) }, { CallbackType.HTML_SetCursor, typeof(HTML_SetCursor_t) }, { CallbackType.HTML_StatusText, typeof(HTML_StatusText_t) }, { CallbackType.HTML_ShowToolTip, typeof(HTML_ShowToolTip_t) }, { CallbackType.HTML_UpdateToolTip, typeof(HTML_UpdateToolTip_t) }, { CallbackType.HTML_HideToolTip, typeof(HTML_HideToolTip_t) }, { CallbackType.HTML_BrowserRestarted, typeof(HTML_BrowserRestarted_t) }, { CallbackType.BroadcastUploadStart, typeof(BroadcastUploadStart_t) }, { CallbackType.BroadcastUploadStop, typeof(BroadcastUploadStop_t) }, { CallbackType.GetVideoURLResult, typeof(GetVideoURLResult_t) }, { CallbackType.GetOPFSettingsResult, typeof(GetOPFSettingsResult_t) }, { CallbackType.SteamInventoryResultReady, typeof(SteamInventoryResultReady_t) }, { CallbackType.SteamInventoryFullUpdate, typeof(SteamInventoryFullUpdate_t) }, { CallbackType.SteamInventoryDefinitionUpdate, typeof(SteamInventoryDefinitionUpdate_t) }, { CallbackType.SteamInventoryEligiblePromoItemDefIDs, typeof(SteamInventoryEligiblePromoItemDefIDs_t) }, { CallbackType.SteamInventoryStartPurchaseResult, typeof(SteamInventoryStartPurchaseResult_t) }, { CallbackType.SteamInventoryRequestPricesResult, typeof(SteamInventoryRequestPricesResult_t) }, { CallbackType.SteamParentalSettingsChanged, typeof(SteamParentalSettingsChanged_t) }, { CallbackType.SearchForGameProgressCallback, typeof(SearchForGameProgressCallback_t) }, { CallbackType.SearchForGameResultCallback, typeof(SearchForGameResultCallback_t) }, { CallbackType.RequestPlayersForGameProgressCallback, typeof(RequestPlayersForGameProgressCallback_t) }, { CallbackType.RequestPlayersForGameResultCallback, typeof(RequestPlayersForGameResultCallback_t) }, { CallbackType.RequestPlayersForGameFinalResultCallback, typeof(RequestPlayersForGameFinalResultCallback_t) }, { CallbackType.SubmitPlayerResultResultCallback, typeof(SubmitPlayerResultResultCallback_t) }, { CallbackType.EndGameResultCallback, typeof(EndGameResultCallback_t) }, { CallbackType.JoinPartyCallback, typeof(JoinPartyCallback_t) }, { CallbackType.CreateBeaconCallback, typeof(CreateBeaconCallback_t) }, { CallbackType.ReservationNotificationCallback, typeof(ReservationNotificationCallback_t) }, { CallbackType.ChangeNumOpenSlotsCallback, typeof(ChangeNumOpenSlotsCallback_t) }, { CallbackType.AvailableBeaconLocationsUpdated, typeof(AvailableBeaconLocationsUpdated_t) }, { CallbackType.ActiveBeaconsUpdated, typeof(ActiveBeaconsUpdated_t) }, { CallbackType.SteamRemotePlaySessionConnected, typeof(SteamRemotePlaySessionConnected_t) }, { CallbackType.SteamRemotePlaySessionDisconnected, typeof(SteamRemotePlaySessionDisconnected_t) }, { CallbackType.SteamRemotePlayTogetherGuestInvite, typeof(SteamRemotePlayTogetherGuestInvite_t) }, { CallbackType.SteamTimelineGamePhaseRecordingExists, typeof(SteamTimelineGamePhaseRecordingExists_t) }, { CallbackType.SteamTimelineEventRecordingExists, typeof(SteamTimelineEventRecordingExists_t) } }; } internal class ISteamAppList : SteamInterface { internal ISteamAppList(bool IsGameServer) { SetupInterface(IsGameServer); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr SteamAPI_SteamAppList_v001(); public override IntPtr GetUserInterfacePointer() { return SteamAPI_SteamAppList_v001(); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamAppList_GetNumInstalledApps")] private static extern uint _GetNumInstalledApps(IntPtr self); internal uint GetNumInstalledApps() { return _GetNumInstalledApps(Self); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamAppList_GetInstalledApps")] private static extern uint _GetInstalledApps(IntPtr self, [In][Out] AppId[] pvecAppID, uint unMaxAppIDs); internal uint GetInstalledApps([In][Out] AppId[] pvecAppID, uint unMaxAppIDs) { return _GetInstalledApps(Self, pvecAppID, unMaxAppIDs); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamAppList_GetAppName")] private static extern int _GetAppName(IntPtr self, AppId nAppID, IntPtr pchName, int cchNameMax); internal int GetAppName(AppId nAppID, out string pchName) { Helpers.Memory m = Helpers.TakeMemory(); try { int result = _GetAppName(Self, nAppID, m, 32768); pchName = Helpers.MemoryToString(m); return result; } finally { ((IDisposable)m).Dispose(); } } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamAppList_GetAppInstallDir")] private static extern int _GetAppInstallDir(IntPtr self, AppId nAppID, IntPtr pchDirectory, int cchNameMax); internal int GetAppInstallDir(AppId nAppID, out string pchDirectory) { Helpers.Memory m = Helpers.TakeMemory(); try { int result = _GetAppInstallDir(Self, nAppID, m, 32768); pchDirectory = Helpers.MemoryToString(m); return result; } finally { ((IDisposable)m).Dispose(); } } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamAppList_GetAppBuildId")] private static extern int _GetAppBuildId(IntPtr self, AppId nAppID); internal int GetAppBuildId(AppId nAppID) { return _GetAppBuildId(Self, nAppID); } } internal class ISteamApps : SteamInterface { public const string Version = "STEAMAPPS_INTERFACE_VERSION008"; internal ISteamApps(bool IsGameServer) { SetupInterface(IsGameServer); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr SteamAPI_SteamApps_v008(); public override IntPtr GetUserInterfacePointer() { return SteamAPI_SteamApps_v008(); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_BIsSubscribed")] [return: MarshalAs(UnmanagedType.I1)] private static extern bool _BIsSubscribed(IntPtr self); internal bool BIsSubscribed() { return _BIsSubscribed(Self); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_BIsLowViolence")] [return: MarshalAs(UnmanagedType.I1)] private static extern bool _BIsLowViolence(IntPtr self); internal bool BIsLowViolence() { return _BIsLowViolence(Self); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_BIsCybercafe")] [return: MarshalAs(UnmanagedType.I1)] private static extern bool _BIsCybercafe(IntPtr self); internal bool BIsCybercafe() { return _BIsCybercafe(Self); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_BIsVACBanned")] [return: MarshalAs(UnmanagedType.I1)] private static extern bool _BIsVACBanned(IntPtr self); internal bool BIsVACBanned() { return _BIsVACBanned(Self); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_GetCurrentGameLanguage")] private static extern Utf8StringPointer _GetCurrentGameLanguage(IntPtr self); internal string GetCurrentGameLanguage() { return _GetCurrentGameLanguage(Self); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_GetAvailableGameLanguages")] private static extern Utf8StringPointer _GetAvailableGameLanguages(IntPtr self); internal string GetAvailableGameLanguages() { return _GetAvailableGameLanguages(Self); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_BIsSubscribedApp")] [return: MarshalAs(UnmanagedType.I1)] private static extern bool _BIsSubscribedApp(IntPtr self, AppId appID); internal bool BIsSubscribedApp(AppId appID) { return _BIsSubscribedApp(Self, appID); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_BIsDlcInstalled")] [return: MarshalAs(UnmanagedType.I1)] private static extern bool _BIsDlcInstalled(IntPtr self, AppId appID); internal bool BIsDlcInstalled(AppId appID) { return _BIsDlcInstalled(Self, appID); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_GetEarliestPurchaseUnixTime")] private static extern uint _GetEarliestPurchaseUnixTime(IntPtr self, AppId nAppID); internal uint GetEarliestPurchaseUnixTime(AppId nAppID) { return _GetEarliestPurchaseUnixTime(Self, nAppID); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_BIsSubscribedFromFreeWeekend")] [return: MarshalAs(UnmanagedType.I1)] private static extern bool _BIsSubscribedFromFreeWeekend(IntPtr self); internal bool BIsSubscribedFromFreeWeekend() { return _BIsSubscribedFromFreeWeekend(Self); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_GetDLCCount")] private static extern int _GetDLCCount(IntPtr self); internal int GetDLCCount() { return _GetDLCCount(Self); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_BGetDLCDataByIndex")] [return: MarshalAs(UnmanagedType.I1)] private static extern bool _BGetDLCDataByIndex(IntPtr self, int iDLC, ref AppId pAppID, [MarshalAs(UnmanagedType.U1)] ref bool pbAvailable, IntPtr pchName, int cchNameBufferSize); internal bool BGetDLCDataByIndex(int iDLC, ref AppId pAppID, [MarshalAs(UnmanagedType.U1)] ref bool pbAvailable, out string pchName) { Helpers.Memory m = Helpers.TakeMemory(); try { bool result = _BGetDLCDataByIndex(Self, iDLC, ref pAppID, ref pbAvailable, m, 32768); pchName = Helpers.MemoryToString(m); return result; } finally { ((IDisposable)m).Dispose(); } } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_InstallDLC")] private static extern void _InstallDLC(IntPtr self, AppId nAppID); internal void InstallDLC(AppId nAppID) { _InstallDLC(Self, nAppID); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_UninstallDLC")] private static extern void _UninstallDLC(IntPtr self, AppId nAppID); internal void UninstallDLC(AppId nAppID) { _UninstallDLC(Self, nAppID); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_RequestAppProofOfPurchaseKey")] private static extern void _RequestAppProofOfPurchaseKey(IntPtr self, AppId nAppID); internal void RequestAppProofOfPurchaseKey(AppId nAppID) { _RequestAppProofOfPurchaseKey(Self, nAppID); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_GetCurrentBetaName")] [return: MarshalAs(UnmanagedType.I1)] private static extern bool _GetCurrentBetaName(IntPtr self, IntPtr pchName, int cchNameBufferSize); internal bool GetCurrentBetaName(out string pchName) { Helpers.Memory m = Helpers.TakeMemory(); try { bool result = _GetCurrentBetaName(Self, m, 32768); pchName = Helpers.MemoryToString(m); return result; } finally { ((IDisposable)m).Dispose(); } } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_MarkContentCorrupt")] [return: MarshalAs(UnmanagedType.I1)] private static extern bool _MarkContentCorrupt(IntPtr self, [MarshalAs(UnmanagedType.U1)] bool bMissingFilesOnly); internal bool MarkContentCorrupt([MarshalAs(UnmanagedType.U1)] bool bMissingFilesOnly) { return _MarkContentCorrupt(Self, bMissingFilesOnly); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_GetInstalledDepots")] private static extern uint _GetInstalledDepots(IntPtr self, AppId appID, [In][Out] DepotId_t[] pvecDepots, uint cMaxDepots); internal uint GetInstalledDepots(AppId appID, [In][Out] DepotId_t[] pvecDepots, uint cMaxDepots) { return _GetInstalledDepots(Self, appID, pvecDepots, cMaxDepots); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_GetAppInstallDir")] private static extern uint _GetAppInstallDir(IntPtr self, AppId appID, IntPtr pchFolder, uint cchFolderBufferSize); internal uint GetAppInstallDir(AppId appID, out string pchFolder) { Helpers.Memory m = Helpers.TakeMemory(); try { uint result = _GetAppInstallDir(Self, appID, m, 32768u); pchFolder = Helpers.MemoryToString(m); return result; } finally { ((IDisposable)m).Dispose(); } } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_BIsAppInstalled")] [return: MarshalAs(UnmanagedType.I1)] private static extern bool _BIsAppInstalled(IntPtr self, AppId appID); internal bool BIsAppInstalled(AppId appID) { return _BIsAppInstalled(Self, appID); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_GetAppOwner")] private static extern SteamId _GetAppOwner(IntPtr self); internal SteamId GetAppOwner() { return _GetAppOwner(Self); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_GetLaunchQueryParam")] private static extern Utf8StringPointer _GetLaunchQueryParam(IntPtr self, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchKey); internal string GetLaunchQueryParam([MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchKey) { return _GetLaunchQueryParam(Self, pchKey); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_GetDlcDownloadProgress")] [return: MarshalAs(UnmanagedType.I1)] private static extern bool _GetDlcDownloadProgress(IntPtr self, AppId nAppID, ref ulong punBytesDownloaded, ref ulong punBytesTotal); internal bool GetDlcDownloadProgress(AppId nAppID, ref ulong punBytesDownloaded, ref ulong punBytesTotal) { return _GetDlcDownloadProgress(Self, nAppID, ref punBytesDownloaded, ref punBytesTotal); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_GetAppBuildId")] private static extern int _GetAppBuildId(IntPtr self); internal int GetAppBuildId() { return _GetAppBuildId(Self); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_RequestAllProofOfPurchaseKeys")] private static extern void _RequestAllProofOfPurchaseKeys(IntPtr self); internal void RequestAllProofOfPurchaseKeys() { _RequestAllProofOfPurchaseKeys(Self); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_GetFileDetails")] private static extern SteamAPICall_t _GetFileDetails(IntPtr self, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pszFileName); internal CallResult<FileDetailsResult_t> GetFileDetails([MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pszFileName) { return new CallResult<FileDetailsResult_t>(_GetFileDetails(Self, pszFileName), base.IsServer); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_GetLaunchCommandLine")] private static extern int _GetLaunchCommandLine(IntPtr self, IntPtr pszCommandLine, int cubCommandLine); internal int GetLaunchCommandLine(out string pszCommandLine) { Helpers.Memory m = Helpers.TakeMemory(); try { int result = _GetLaunchCommandLine(Self, m, 32768); pszCommandLine = Helpers.MemoryToString(m); return result; } finally { ((IDisposable)m).Dispose(); } } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_BIsSubscribedFromFamilySharing")] [return: MarshalAs(UnmanagedType.I1)] private static extern bool _BIsSubscribedFromFamilySharing(IntPtr self); internal bool BIsSubscribedFromFamilySharing() { return _BIsSubscribedFromFamilySharing(Self); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_BIsTimedTrial")] [return: MarshalAs(UnmanagedType.I1)] private static extern bool _BIsTimedTrial(IntPtr self, ref uint punSecondsAllowed, ref uint punSecondsPlayed); internal bool BIsTimedTrial(ref uint punSecondsAllowed, ref uint punSecondsPlayed) { return _BIsTimedTrial(Self, ref punSecondsAllowed, ref punSecondsPlayed); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_SetDlcContext")] [return: MarshalAs(UnmanagedType.I1)] private static extern bool _SetDlcContext(IntPtr self, AppId nAppID); internal bool SetDlcContext(AppId nAppID) { return _SetDlcContext(Self, nAppID); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_GetNumBetas")] private static extern int _GetNumBetas(IntPtr self, ref int pnAvailable, ref int pnPrivate); internal int GetNumBetas(ref int pnAvailable, ref int pnPrivate) { return _GetNumBetas(Self, ref pnAvailable, ref pnPrivate); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_GetBetaInfo")] [return: MarshalAs(UnmanagedType.I1)] private static extern bool _GetBetaInfo(IntPtr self, int iBetaIndex, ref uint punFlags, ref uint punBuildID, IntPtr pchBetaName, int cchBetaName, IntPtr pchDescription, int cchDescription); internal bool GetBetaInfo(int iBetaIndex, ref uint punFlags, ref uint punBuildID, out string pchBetaName, out string pchDescription) { Helpers.Memory m = Helpers.TakeMemory(); try { Helpers.Memory m2 = Helpers.TakeMemory(); try { bool result = _GetBetaInfo(Self, iBetaIndex, ref punFlags, ref punBuildID, m, 32768, m2, 32768); pchBetaName = Helpers.MemoryToString(m); pchDescription = Helpers.MemoryToString(m2); return result; } finally { ((IDisposable)m2).Dispose(); } } finally { ((IDisposable)m).Dispose(); } } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_SetActiveBeta")] [return: MarshalAs(UnmanagedType.I1)] private static extern bool _SetActiveBeta(IntPtr self, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchBetaName); internal bool SetActiveBeta([MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchBetaName) { return _SetActiveBeta(Self, pchBetaName); } } internal class ISteamClient : SteamInterface { internal ISteamClient(bool IsGameServer) { SetupInterface(IsGameServer); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_CreateSteamPipe")] private static extern HSteamPipe _CreateSteamPipe(IntPtr self); internal HSteamPipe CreateSteamPipe() { return _CreateSteamPipe(Self); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_BReleaseSteamPipe")] [return: MarshalAs(UnmanagedType.I1)] private static extern bool _BReleaseSteamPipe(IntPtr self, HSteamPipe hSteamPipe); internal bool BReleaseSteamPipe(HSteamPipe hSteamPipe) { return _BReleaseSteamPipe(Self, hSteamPipe); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_ConnectToGlobalUser")] private static extern HSteamUser _ConnectToGlobalUser(IntPtr self, HSteamPipe hSteamPipe); internal HSteamUser ConnectToGlobalUser(HSteamPipe hSteamPipe) { return _ConnectToGlobalUser(Self, hSteamPipe); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_CreateLocalUser")] private static extern HSteamUser _CreateLocalUser(IntPtr self, ref HSteamPipe phSteamPipe, AccountType eAccountType); internal HSteamUser CreateLocalUser(ref HSteamPipe phSteamPipe, AccountType eAccountType) { return _CreateLocalUser(Self, ref phSteamPipe, eAccountType); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_ReleaseUser")] private static extern void _ReleaseUser(IntPtr self, HSteamPipe hSteamPipe, HSteamUser hUser); internal void ReleaseUser(HSteamPipe hSteamPipe, HSteamUser hUser) { _ReleaseUser(Self, hSteamPipe, hUser); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamUser")] private static extern IntPtr _GetISteamUser(IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion); internal IntPtr GetISteamUser(HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion) { return _GetISteamUser(Self, hSteamUser, hSteamPipe, pchVersion); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamGameServer")] private static extern IntPtr _GetISteamGameServer(IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion); internal IntPtr GetISteamGameServer(HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion) { return _GetISteamGameServer(Self, hSteamUser, hSteamPipe, pchVersion); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_SetLocalIPBinding")] private static extern void _SetLocalIPBinding(IntPtr self, ref SteamIPAddress unIP, ushort usPort); internal void SetLocalIPBinding(ref SteamIPAddress unIP, ushort usPort) { _SetLocalIPBinding(Self, ref unIP, usPort); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamFriends")] private static extern IntPtr _GetISteamFriends(IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion); internal IntPtr GetISteamFriends(HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion) { return _GetISteamFriends(Self, hSteamUser, hSteamPipe, pchVersion); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamUtils")] private static extern IntPtr _GetISteamUtils(IntPtr self, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion); internal IntPtr GetISteamUtils(HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion) { return _GetISteamUtils(Self, hSteamPipe, pchVersion); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamMatchmaking")] private static extern IntPtr _GetISteamMatchmaking(IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion); internal IntPtr GetISteamMatchmaking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion) { return _GetISteamMatchmaking(Self, hSteamUser, hSteamPipe, pchVersion); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamMatchmakingServers")] private static extern IntPtr _GetISteamMatchmakingServers(IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion); internal IntPtr GetISteamMatchmakingServers(HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion) { return _GetISteamMatchmakingServers(Self, hSteamUser, hSteamPipe, pchVersion); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamGenericInterface")] private static extern IntPtr _GetISteamGenericInterface(IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion); internal IntPtr GetISteamGenericInterface(HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion) { return _GetISteamGenericInterface(Self, hSteamUser, hSteamPipe, pchVersion); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamUserStats")] private static extern IntPtr _GetISteamUserStats(IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion); internal IntPtr GetISteamUserStats(HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion) { return _GetISteamUserStats(Self, hSteamUser, hSteamPipe, pchVersion); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamGameServerStats")] private static extern IntPtr _GetISteamGameServerStats(IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion); internal IntPtr GetISteamGameServerStats(HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion) { return _GetISteamGameServerStats(Self, hSteamuser, hSteamPipe, pchVersion); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamApps")] private static extern IntPtr _GetISteamApps(IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion); internal IntPtr GetISteamApps(HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion) { return _GetISteamApps(Self, hSteamUser, hSteamPipe, pchVersion); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamNetworking")] private static extern IntPtr _GetISteamNetworking(IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion); internal IntPtr GetISteamNetworking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion) { return _GetISteamNetworking(Self, hSteamUser, hSteamPipe, pchVersion); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamRemoteStorage")] private static extern IntPtr _GetISteamRemoteStorage(IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion); internal IntPtr GetISteamRemoteStorage(HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion) { return _GetISteamRemoteStorage(Self, hSteamuser, hSteamPipe, pchVersion); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamScreenshots")] private static extern IntPtr _GetISteamScreenshots(IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion); internal IntPtr GetISteamScreenshots(HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion) { return _GetISteamScreenshots(Self, hSteamuser, hSteamPipe, pchVersion); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamGameSearch")] private static extern IntPtr _GetISteamGameSearch(IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion); internal IntPtr GetISteamGameSearch(HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion) { return _GetISteamGameSearch(Self, hSteamuser, hSteamPipe, pchVersion); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetIPCCallCount")] private static extern uint _GetIPCCallCount(IntPtr self); internal uint GetIPCCallCount() { return _GetIPCCallCount(Self); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_SetWarningMessageHook")] private static extern void _SetWarningMessageHook(IntPtr self, IntPtr pFunction); internal void SetWarningMessageHook(IntPtr pFunction) { _SetWarningMessageHook(Self, pFunction); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_BShutdownIfAllPipesClosed")] [return: MarshalAs(UnmanagedType.I1)] private static extern bool _BShutdownIfAllPipesClosed(IntPtr self); internal bool BShutdownIfAllPipesClosed() { return _BShutdownIfAllPipesClosed(Self); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamHTTP")] private static extern IntPtr _GetISteamHTTP(IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion); internal IntPtr GetISteamHTTP(HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion) { return _GetISteamHTTP(Self, hSteamuser, hSteamPipe, pchVersion); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamController")] private static extern IntPtr _GetISteamController(IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion); internal IntPtr GetISteamController(HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion) { return _GetISteamController(Self, hSteamUser, hSteamPipe, pchVersion); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamUGC")] private static extern IntPtr _GetISteamUGC(IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion); internal IntPtr GetISteamUGC(HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion) { return _GetISteamUGC(Self, hSteamUser, hSteamPipe, pchVersion); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamMusic")] private static extern IntPtr _GetISteamMusic(IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion); internal IntPtr GetISteamMusic(HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion) { return _GetISteamMusic(Self, hSteamuser, hSteamPipe, pchVersion); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamMusicRemote")] private static extern IntPtr _GetISteamMusicRemote(IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion); internal IntPtr GetISteamMusicRemote(HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion) { return _GetISteamMusicRemote(Self, hSteamuser, hSteamPipe, pchVersion); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamHTMLSurface")] private static extern IntPtr _GetISteamHTMLSurface(IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion); internal IntPtr GetISteamHTMLSurface(HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion) { return _GetISteamHTMLSurface(Self, hSteamuser, hSteamPipe, pchVersion); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamInventory")] private static extern IntPtr _GetISteamInventory(IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion); internal IntPtr GetISteamInventory(HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion) { return _GetISteamInventory(Self, hSteamuser, hSteamPipe, pchVersion); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamVideo")] private static extern IntPtr _GetISteamVideo(IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion); internal IntPtr GetISteamVideo(HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion) { return _GetISteamVideo(Self, hSteamuser, hSteamPipe, pchVersion); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamParentalSettings")] private static extern IntPtr _GetISteamParentalSettings(IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion); internal IntPtr GetISteamParentalSettings(HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion) { return _GetISteamParentalSettings(Self, hSteamuser, hSteamPipe, pchVersion); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamInput")] private static extern IntPtr _GetISteamInput(IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion); internal IntPtr GetISteamInput(HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion) { return _GetISteamInput(Self, hSteamUser, hSteamPipe, pchVersion); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamParties")] private static extern IntPtr _GetISteamParties(IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion); internal IntPtr GetISteamParties(HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion) { return _GetISteamParties(Self, hSteamUser, hSteamPipe, pchVersion); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamRemotePlay")] private static extern IntPtr _GetISteamRemotePlay(IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion); internal IntPtr GetISteamRemotePlay(HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchVersion) { return _GetISteamRemotePlay(Self, hSteamUser, hSteamPipe, pchVersion); } } internal class ISteamController : SteamInterface { public const string Version = "SteamController008"; internal ISteamController(bool IsGameServer) { SetupInterface(IsGameServer); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr SteamAPI_SteamController_v008(); public override IntPtr GetUserInterfacePointer() { return SteamAPI_SteamController_v008(); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_Init")] [return: MarshalAs(UnmanagedType.I1)] private static extern bool _Init(IntPtr self); internal bool Init() { return _Init(Self); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_Shutdown")] [return: MarshalAs(UnmanagedType.I1)] private static extern bool _Shutdown(IntPtr self); internal bool Shutdown() { return _Shutdown(Self); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_RunFrame")] private static extern void _RunFrame(IntPtr self); internal void RunFrame() { _RunFrame(Self); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_GetConnectedControllers")] private static extern int _GetConnectedControllers(IntPtr self, [In][Out] ControllerHandle_t[] handlesOut); internal int GetConnectedControllers([In][Out] ControllerHandle_t[] handlesOut) { return _GetConnectedControllers(Self, handlesOut); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_GetActionSetHandle")] private static extern ControllerActionSetHandle_t _GetActionSetHandle(IntPtr self, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pszActionSetName); internal ControllerActionSetHandle_t GetActionSetHandle([MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pszActionSetName) { return _GetActionSetHandle(Self, pszActionSetName); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_ActivateActionSet")] private static extern void _ActivateActionSet(IntPtr self, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle); internal void ActivateActionSet(ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle) { _ActivateActionSet(Self, controllerHandle, actionSetHandle); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_GetCurrentActionSet")] private static extern ControllerActionSetHandle_t _GetCurrentActionSet(IntPtr self, ControllerHandle_t controllerHandle); internal ControllerActionSetHandle_t GetCurrentActionSet(ControllerHandle_t controllerHandle) { return _GetCurrentActionSet(Self, controllerHandle); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_ActivateActionSetLayer")] private static extern void _ActivateActionSetLayer(IntPtr self, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle); internal void ActivateActionSetLayer(ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle) { _ActivateActionSetLayer(Self, controllerHandle, actionSetLayerHandle); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_DeactivateActionSetLayer")] private static extern void _DeactivateActionSetLayer(IntPtr self, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle); internal void DeactivateActionSetLayer(ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle) { _DeactivateActionSetLayer(Self, controllerHandle, actionSetLayerHandle); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_DeactivateAllActionSetLayers")] private static extern void _DeactivateAllActionSetLayers(IntPtr self, ControllerHandle_t controllerHandle); internal void DeactivateAllActionSetLayers(ControllerHandle_t controllerHandle) { _DeactivateAllActionSetLayers(Self, controllerHandle); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_GetActiveActionSetLayers")] private static extern int _GetActiveActionSetLayers(IntPtr self, ControllerHandle_t controllerHandle, [In][Out] ControllerActionSetHandle_t[] handlesOut); internal int GetActiveActionSetLayers(ControllerHandle_t controllerHandle, [In][Out] ControllerActionSetHandle_t[] handlesOut) { return _GetActiveActionSetLayers(Self, controllerHandle, handlesOut); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_GetDigitalActionHandle")] private static extern ControllerDigitalActionHandle_t _GetDigitalActionHandle(IntPtr self, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pszActionName); internal ControllerDigitalActionHandle_t GetDigitalActionHandle([MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pszActionName) { return _GetDigitalActionHandle(Self, pszActionName); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_GetDigitalActionData")] private static extern DigitalState _GetDigitalActionData(IntPtr self, ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle); internal DigitalState GetDigitalActionData(ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle) { return _GetDigitalActionData(Self, controllerHandle, digitalActionHandle); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_GetDigitalActionOrigins")] private static extern int _GetDigitalActionOrigins(IntPtr self, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerDigitalActionHandle_t digitalActionHandle, ref ControllerActionOrigin originsOut); internal int GetDigitalActionOrigins(ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerDigitalActionHandle_t digitalActionHandle, ref ControllerActionOrigin originsOut) { return _GetDigitalActionOrigins(Self, controllerHandle, actionSetHandle, digitalActionHandle, ref originsOut); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_GetAnalogActionHandle")] private static extern ControllerAnalogActionHandle_t _GetAnalogActionHandle(IntPtr self, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pszActionName); internal ControllerAnalogActionHandle_t GetAnalogActionHandle([MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pszActionName) { return _GetAnalogActionHandle(Self, pszActionName); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_GetAnalogActionData")] private static extern AnalogState _GetAnalogActionData(IntPtr self, ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle); internal AnalogState GetAnalogActionData(ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle) { return _GetAnalogActionData(Self, controllerHandle, analogActionHandle); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_GetAnalogActionOrigins")] private static extern int _GetAnalogActionOrigins(IntPtr self, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerAnalogActionHandle_t analogActionHandle, ref ControllerActionOrigin originsOut); internal int GetAnalogActionOrigins(ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerAnalogActionHandle_t analogActionHandle, ref ControllerActionOrigin originsOut) { return _GetAnalogActionOrigins(Self, controllerHandle, actionSetHandle, analogActionHandle, ref originsOut); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_GetGlyphForActionOrigin")] private static extern Utf8StringPointer _GetGlyphForActionOrigin(IntPtr self, ControllerActionOrigin eOrigin); internal string GetGlyphForActionOrigin(ControllerActionOrigin eOrigin) { return _GetGlyphForActionOrigin(Self, eOrigin); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_GetStringForActionOrigin")] private static extern Utf8StringPointer _GetStringForActionOrigin(IntPtr self, ControllerActionOrigin eOrigin); internal string GetStringForActionOrigin(ControllerActionOrigin eOrigin) { return _GetStringForActionOrigin(Self, eOrigin); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_StopAnalogActionMomentum")] private static extern void _StopAnalogActionMomentum(IntPtr self, ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction); internal void StopAnalogActionMomentum(ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction) { _StopAnalogActionMomentum(Self, controllerHandle, eAction); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_GetMotionData")] private static extern MotionState _GetMotionData(IntPtr self, ControllerHandle_t controllerHandle); internal MotionState GetMotionData(ControllerHandle_t controllerHandle) { return _GetMotionData(Self, controllerHandle); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_TriggerHapticPulse")] private static extern void _TriggerHapticPulse(IntPtr self, ControllerHandle_t controllerHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec); internal void TriggerHapticPulse(ControllerHandle_t controllerHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec) { _TriggerHapticPulse(Self, controllerHandle, eTargetPad, usDurationMicroSec); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_TriggerRepeatedHapticPulse")] private static extern void _TriggerRepeatedHapticPulse(IntPtr self, ControllerHandle_t controllerHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags); internal void TriggerRepeatedHapticPulse(ControllerHandle_t controllerHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags) { _TriggerRepeatedHapticPulse(Self, controllerHandle, eTargetPad, usDurationMicroSec, usOffMicroSec, unRepeat, nFlags); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_TriggerVibration")] private static extern void _TriggerVibration(IntPtr self, ControllerHandle_t controllerHandle, ushort usLeftSpeed, ushort usRightSpeed); internal void TriggerVibration(ControllerHandle_t controllerHandle, ushort usLeftSpeed, ushort usRightSpeed) { _TriggerVibration(Self, controllerHandle, usLeftSpeed, usRightSpeed); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_SetLEDColor")] private static extern void _SetLEDColor(IntPtr self, ControllerHandle_t controllerHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags); internal void SetLEDColor(ControllerHandle_t controllerHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags) { _SetLEDColor(Self, controllerHandle, nColorR, nColorG, nColorB, nFlags); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_ShowBindingPanel")] [return: MarshalAs(UnmanagedType.I1)] private static extern bool _ShowBindingPanel(IntPtr self, ControllerHandle_t controllerHandle); internal bool ShowBindingPanel(ControllerHandle_t controllerHandle) { return _ShowBindingPanel(Self, controllerHandle); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_GetInputTypeForHandle")] private static extern InputType _GetInputTypeForHandle(IntPtr self, ControllerHandle_t controllerHandle); internal InputType GetInputTypeForHandle(ControllerHandle_t controllerHandle) { return _GetInputTypeForHandle(Self, controllerHandle); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_GetControllerForGamepadIndex")] private static extern ControllerHandle_t _GetControllerForGamepadIndex(IntPtr self, int nIndex); internal ControllerHandle_t GetControllerForGamepadIndex(int nIndex) { return _GetControllerForGamepadIndex(Self, nIndex); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_GetGamepadIndexForController")] private static extern int _GetGamepadIndexForController(IntPtr self, ControllerHandle_t ulControllerHandle); internal int GetGamepadIndexForController(ControllerHandle_t ulControllerHandle) { return _GetGamepadIndexForController(Self, ulControllerHandle); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_GetStringForXboxOrigin")] private static extern Utf8StringPointer _GetStringForXboxOrigin(IntPtr self, XboxOrigin eOrigin); internal string GetStringForXboxOrigin(XboxOrigin eOrigin) { return _GetStringForXboxOrigin(Self, eOrigin); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_GetGlyphForXboxOrigin")] private static extern Utf8StringPointer _GetGlyphForXboxOrigin(IntPtr self, XboxOrigin eOrigin); internal string GetGlyphForXboxOrigin(XboxOrigin eOrigin) { return _GetGlyphForXboxOrigin(Self, eOrigin); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_GetActionOriginFromXboxOrigin")] private static extern ControllerActionOrigin _GetActionOriginFromXboxOrigin(IntPtr self, ControllerHandle_t controllerHandle, XboxOrigin eOrigin); internal ControllerActionOrigin GetActionOriginFromXboxOrigin(ControllerHandle_t controllerHandle, XboxOrigin eOrigin) { return _GetActionOriginFromXboxOrigin(Self, controllerHandle, eOrigin); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_TranslateActionOrigin")] private static extern ControllerActionOrigin _TranslateActionOrigin(IntPtr self, InputType eDestinationInputType, ControllerActionOrigin eSourceOrigin); internal ControllerActionOrigin TranslateActionOrigin(InputType eDestinationInputType, ControllerActionOrigin eSourceOrigin) { return _TranslateActionOrigin(Self, eDestinationInputType, eSourceOrigin); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamController_GetControllerBindingRevision")] [return: MarshalAs(UnmanagedType.I1)] private static extern bool _GetControllerBindingRevision(IntPtr self, ControllerHandle_t controllerHandle, ref int pMajor, ref int pMinor); internal bool GetControllerBindingRevision(ControllerHandle_t controllerHandle, ref int pMajor, ref int pMinor) { return _GetControllerBindingRevision(Self, controllerHandle, ref pMajor, ref pMinor); } } internal class ISteamFriends : SteamInterface { public const string Version = "SteamFriends017"; internal ISteamFriends(bool IsGameServer) { SetupInterface(IsGameServer); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr SteamAPI_SteamFriends_v017(); public override IntPtr GetUserInterfacePointer() { return SteamAPI_SteamFriends_v017(); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetPersonaName")] private static extern Utf8StringPointer _GetPersonaName(IntPtr self); internal string GetPersonaName() { return _GetPersonaName(Self); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_SetPersonaName")] private static extern SteamAPICall_t _SetPersonaName(IntPtr self, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchPersonaName); internal CallResult<SetPersonaNameResponse_t> SetPersonaName([MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Steamworks.Utf8StringToNative")] string pchPersonaName) { return new CallResult<SetPersonaNameResponse_t>(_SetPersonaName(Self, pchPersonaName), base.IsServer); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetPersonaState")] private static extern FriendState _GetPersonaState(IntPtr self); internal FriendState GetPersonaState() { return _GetPersonaState(Self); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendCount")] private static extern int _GetFriendCount(IntPtr self, int iFriendFlags); internal int GetFriendCount(int iFriendFlags) { return _GetFriendCount(Self, iFriendFlags); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendByIndex")] private static extern SteamId _GetFriendByIndex(IntPtr self, int iFriend, int iFriendFlags); internal SteamId GetFriendByIndex(int iFriend, int iFriendFlags) { return _GetFriendByIndex(Self, iFriend, iFriendFlags); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendRelationship")] private static extern Relationship _GetFriendRelationship(IntPtr self, SteamId steamIDFriend); internal Relationship GetFriendRelationship(SteamId steamIDFriend) { return _GetFriendRelationship(Self, steamIDFriend); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendPersonaState")] private static extern FriendState _GetFriendPersonaState(IntPtr self, SteamId steamIDFriend); internal FriendState GetFriendPersonaState(SteamId steamIDFriend) { return _GetFriendPersonaState(Self, steamIDFriend); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendPersonaName")] private static extern Utf8StringPointer _GetFriendPersonaName(IntPtr self, SteamId steamIDFriend); internal string GetFriendPersonaName(SteamId steamIDFriend) { return _GetFriendPersonaName(Self, steamIDFriend); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendGamePlayed")] [return: MarshalAs(UnmanagedType.I1)] private static extern bool _GetFriendGamePlayed(IntPtr self, SteamId steamIDFriend, ref FriendGameInfo_t pFriendGameInfo); internal bool GetFriendGamePlayed(SteamId steamIDFriend, ref FriendGameInfo_t pFriendGameInfo) { return _GetFriendGamePlayed(Self, steamIDFriend, ref pFriendGameInfo); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendPersonaNameHistory")] private static extern Utf8StringPointer _GetFriendPersonaNameHistory(IntPtr self, SteamId steamIDFriend, int iPersonaName); internal string GetFriendPersonaNameHistory(SteamId steamIDFriend, int iPersonaName) { return _GetFriendPersonaNameHistory(Self, steamIDFriend, iPersonaName); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendSteamLevel")] private static extern int _GetFriendSteamLevel(IntPtr self, SteamId steamIDFriend); internal int GetFriendSteamLevel(SteamId steamIDFriend) { return _GetFriendSteamLevel(Self, steamIDFriend); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetPlayerNickname")] private static extern Utf8StringPointer _GetPlayerNickname(IntPtr self, SteamId steamIDPlayer); internal string GetPlayerNickname(SteamId steamIDPlayer) { return _GetPlayerNickname(Self, steamIDPlayer); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendsGroupCount")] private static extern int _GetFriendsGroupCount(IntPtr self); internal int GetFriendsGroupCount() { return _GetFriendsGroupCount(Self); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendsGroupIDByIndex")] private static extern FriendsGroupID_t _GetFriendsGroupIDByIndex(IntPtr self, int iFG); internal FriendsGroupID_t GetFriendsGroupIDByIndex(int iFG) { return _GetFriendsGroupIDByIndex(Self, iFG); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendsGroupName")] private static extern Utf8StringPointer _GetFriendsGroupName(IntPtr self, FriendsGroupID_t friendsGroupID); internal string GetFriendsGroupName(FriendsGroupID_t friendsGroupID) { return _GetFriendsGroupName(Self, friendsGroupID); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendsGroupMembersCount")] private static extern int _GetFriendsGroupMembersCount(IntPtr self, FriendsGroupID_t friendsGroupID); internal int GetFriendsGroupMembersCount(FriendsGroupID_t friendsGroupID) { return _GetFriendsGroupMembersCount(Self, friendsGroupID); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendsGroupMembersList")] private static extern void _GetFriendsGroupMembersList(IntPtr self, FriendsGroupID_t friendsGroupID, [In][Out] SteamId[] pOutSteamIDMembers, int nMembersCount); internal void GetFriendsGroupMembersList(FriendsGroupID_t friendsGroupID, [In][Out] SteamId[] pOutSteamIDMembers, int nMembersCount) { _GetFriendsGroupMembersList(Self, friendsGroupID, pOutSteamIDMembers, nMembersCount); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_HasFriend")] [return: MarshalAs(UnmanagedType.I1)] private static extern bool _HasFriend(IntPtr self, SteamId steamIDFriend, int iFriendFlags); internal bool HasFriend(SteamId steamIDFriend, int iFriendFlags) { return _HasFriend(Self, steamIDFriend, iFriendFlags); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetClanCount")] private static extern int _GetClanCount(IntPtr self); internal int GetClanCount() { return _GetClanCount(Self); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetClanByIndex")] private static extern SteamId _GetClanByIndex(IntPtr self, int iClan); internal SteamId GetClanByIndex(int iClan) { return _GetClanByIndex(Self, iClan); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetClanName")] private static extern Utf8StringPointer _GetClanName(IntPtr self, SteamId steamIDClan); internal string GetClanName(SteamId steamIDClan) { return _GetClanName(Self, steamIDClan); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetClanTag")] private static extern Utf8StringPointer _GetClanTag(IntPtr self, SteamId steamIDClan); internal string GetClanTag(SteamId steamIDClan) { return _GetClanTag(Self, steamIDClan); } [DllImport("steam_api64", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetClanActivityCounts")] [return: MarshalAs(UnmanagedType.I1)] private static extern bool _GetClanActivityCounts(IntPtr self, SteamId steamIDClan, ref int pnOnline, ref int pnInGame, ref int pnChatting); internal bool GetClanActivityCounts(SteamId steamIDClan, ref int pnOnline, ref int pnInGame, ref int pnChatting) { return _GetClanActivityCounts(Self, steamIDClan, ref pnOnline, ref pnInGame, ref pnChatting); } [DllIm