Esempio n. 1
0
 /// <summary>
 /// <para> retrieves the ISteamGameServer interface associated with the handle</para>
 /// </summary>
 public static IntPtr GetISteamGameServer(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion)
 {
     InteropHelp.TestIfAvailableClient();
     using (var pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion)) {
         return(NativeMethods.ISteamClient_GetISteamGameServer(CSteamAPIContext.GetSteamClient(), hSteamUser, hSteamPipe, pchVersion2));
     }
 }
Esempio n. 2
0
 public static void TestIfAvailableClient()
 {
     TestIfPlatformSupported();
     if (CSteamAPIContext.GetSteamClient() == IntPtr.Zero && !CSteamAPIContext.Init())
     {
         throw new InvalidOperationException("Steamworks is not initialized.");
     }
 }
 public static void TestIfAvailableClient()
 {
     TestIfPlatformSupported();
     if (CSteamAPIContext.GetSteamClient() == System.IntPtr.Zero)
     {
         if (CSteamAPIContext.Init() != FailureReason.None)
         {
             throw new System.InvalidOperationException("Steamworks is not initialized.");
         }
     }
 }
Esempio n. 4
0
 public static IntPtr GetISteamUtils(HSteamPipe hSteamPipe, string pchVersion)
 {
     InteropHelp.TestIfAvailableClient();
     using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion);
     return(NativeMethods.ISteamClient_GetISteamUtils(CSteamAPIContext.GetSteamClient(), hSteamPipe, pchVersion2));
 }
Esempio n. 5
0
 public static HSteamPipe CreateSteamPipe()
 {
     InteropHelp.TestIfAvailableClient();
     return((HSteamPipe)NativeMethods.ISteamClient_CreateSteamPipe(CSteamAPIContext.GetSteamClient()));
 }
Esempio n. 6
0
 public static void SetLocalIPBinding(ref SteamIPAddress_t unIP, ushort usPort)
 {
     InteropHelp.TestIfAvailableClient();
     NativeMethods.ISteamClient_SetLocalIPBinding(CSteamAPIContext.GetSteamClient(), ref unIP, usPort);
 }
Esempio n. 7
0
 public static void ReleaseUser(HSteamPipe hSteamPipe, HSteamUser hUser)
 {
     InteropHelp.TestIfAvailableClient();
     NativeMethods.ISteamClient_ReleaseUser(CSteamAPIContext.GetSteamClient(), hSteamPipe, hUser);
 }
Esempio n. 8
0
 public static HSteamUser CreateLocalUser(out HSteamPipe phSteamPipe, EAccountType eAccountType)
 {
     InteropHelp.TestIfAvailableClient();
     return((HSteamUser)NativeMethods.ISteamClient_CreateLocalUser(CSteamAPIContext.GetSteamClient(), out phSteamPipe, eAccountType));
 }
Esempio n. 9
0
 public static HSteamUser ConnectToGlobalUser(HSteamPipe hSteamPipe)
 {
     InteropHelp.TestIfAvailableClient();
     return((HSteamUser)NativeMethods.ISteamClient_ConnectToGlobalUser(CSteamAPIContext.GetSteamClient(), hSteamPipe));
 }
Esempio n. 10
0
 public static bool BShutdownIfAllPipesClosed()
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamClient_BShutdownIfAllPipesClosed(CSteamAPIContext.GetSteamClient()));
 }
Esempio n. 11
0
 public static void SetWarningMessageHook(SteamAPIWarningMessageHook_t pFunction)
 {
     InteropHelp.TestIfAvailableClient();
     NativeMethods.ISteamClient_SetWarningMessageHook(CSteamAPIContext.GetSteamClient(), pFunction);
 }
Esempio n. 12
0
 public static uint GetIPCCallCount()
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamClient_GetIPCCallCount(CSteamAPIContext.GetSteamClient()));
 }
Esempio n. 13
0
 public static bool BReleaseSteamPipe(HSteamPipe hSteamPipe)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamClient_BReleaseSteamPipe(CSteamAPIContext.GetSteamClient(), hSteamPipe));
 }