Esempio n. 1
0
 // checks if a local Steam client is running
 public static bool IsSteamRunning()
 {
     InteropHelp.TestIfPlatformSupported();
     return(NativeMethods.SteamAPI_IsSteamRunning());
 }
Esempio n. 2
0
 // Many Steam API functions allocate a small amount of thread-local memory for parameter storage.
 // SteamAPI_ReleaseCurrentThreadMemory() will free API memory associated with the calling thread.
 // This function is also called automatically by SteamAPI_RunCallbacks(), so a single-threaded
 // program never needs to explicitly call this function.
 public static void ReleaseCurrentThreadMemory()
 {
     InteropHelp.TestIfPlatformSupported();
     NativeMethods.SteamAPI_ReleaseCurrentThreadMemory();
 }
Esempio n. 3
0
        //----------------------------------------------------------------------------------------------------------------------------------------------------------//
        //	steam callback and call-result helpers
        //
        //	The following macros and classes are used to register your application for
        //	callbacks and call-results, which are delivered in a predictable manner.
        //
        //	STEAM_CALLBACK macros are meant for use inside of a C++ class definition.
        //	They map a Steam notification callback directly to a class member function
        //	which is automatically prototyped as "void func( callback_type *pParam )".
        //
        //	CCallResult is used with specific Steam APIs that return "result handles".
        //	The handle can be passed to a CCallResult object's Set function, along with
        //	an object pointer and member-function pointer. The member function will
        //	be executed once the results of the Steam API call are available.
        //
        //	CCallback and CCallbackManual classes can be used instead of STEAM_CALLBACK
        //	macros if you require finer control over registration and unregistration.
        //
        //	Callbacks and call-results are queued automatically and are only
        //	delivered/executed when your application calls SteamAPI_RunCallbacks().
        //----------------------------------------------------------------------------------------------------------------------------------------------------------//

        // SteamAPI_RunCallbacks is safe to call from multiple threads simultaneously,
        // but if you choose to do this, callback code may be executed on any thread.
        public static void RunCallbacks()
        {
            InteropHelp.TestIfPlatformSupported();
            NativeMethods.SteamAPI_RunCallbacks();
        }
Esempio n. 4
0
 public static void Shutdown()
 {
     InteropHelp.TestIfPlatformSupported();
     NativeMethods.SteamAPI_Shutdown();
 }
Esempio n. 5
0
 // SteamAPI_RestartAppIfNecessary ensures that your executable was launched through Steam.
 //
 // Returns true if the current process should terminate. Steam is now re-launching your application.
 //
 // Returns false if no action needs to be taken. This means that your executable was started through
 // the Steam client, or a steam_appid.txt file is present in your game's directory (for development).
 // Your current process should continue if false is returned.
 //
 // NOTE: If you use the Steam DRM wrapper on your primary executable file, this check is unnecessary
 // since the DRM wrapper will ensure that your application was launched properly through Steam.
 public static bool RestartAppIfNecessary(AppId_t unOwnAppID)
 {
     InteropHelp.TestIfPlatformSupported();
     return(NativeMethods.SteamAPI_RestartAppIfNecessary(unOwnAppID));
 }
Esempio n. 6
0
 public static uint GetTicketIssueTime(byte[] rgubTicketDecrypted, uint cubTicketDecrypted)
 {
     InteropHelp.TestIfPlatformSupported();
     return(NativeMethods.SteamEncryptedAppTicket_GetTicketIssueTime(rgubTicketDecrypted, cubTicketDecrypted));
 }
Esempio n. 7
0
 public static bool BUserIsVacBanned(byte[] rgubTicketDecrypted, uint cubTicketDecrypted)
 {
     InteropHelp.TestIfPlatformSupported();
     return(NativeMethods.BUserIsVacBanned(rgubTicketDecrypted, cubTicketDecrypted));
 }
Esempio n. 8
0
 public static void GetTicketSteamID(byte[] rgubTicketDecrypted, uint cubTicketDecrypted, out CSteamID psteamID)
 {
     InteropHelp.TestIfPlatformSupported();
     NativeMethods.GetTicketSteamID(rgubTicketDecrypted, cubTicketDecrypted, out psteamID);
 }
Esempio n. 9
0
 public static uint GetTicketAppID(byte[] rgubTicketDecrypted, uint cubTicketDecrypted)
 {
     InteropHelp.TestIfPlatformSupported();
     return(NativeMethods.GetTicketAppID(rgubTicketDecrypted, cubTicketDecrypted));
 }
Esempio n. 10
0
 public static HSteamUser GetHSteamUser()
 {
     InteropHelp.TestIfPlatformSupported();
     return((HSteamUser)NativeMethods.SteamGameServer_GetHSteamUser());
 }
Esempio n. 11
0
 public static bool BDecryptTicket(byte[] rgubTicketEncrypted, uint cubTicketEncrypted, byte[] rgubTicketDecrypted, ref uint pcubTicketDecrypted, byte[] rgubKey, int cubKey)
 {
     InteropHelp.TestIfPlatformSupported();
     return(NativeMethods.BDecryptTicket(rgubTicketEncrypted, cubTicketEncrypted, rgubTicketDecrypted, ref pcubTicketDecrypted, rgubKey, cubKey));
 }
Esempio n. 12
0
 public static CSteamID GetSteamID()
 {
     InteropHelp.TestIfPlatformSupported();
     return((CSteamID)NativeMethods.SteamGameServer_GetSteamID());
 }
Esempio n. 13
0
 public static bool BSecure()
 {
     InteropHelp.TestIfPlatformSupported();
     return(NativeMethods.SteamGameServer_BSecure());
 }
 // [Steamworks.NET] This is for Ease of use, since we don't need to care about the differences between them in C#.
 public static bool Init()
 {
     InteropHelp.TestIfPlatformSupported();
     return(NativeMethods.SteamAPI_InitSafe());
 }
Esempio n. 15
0
 // returns the HSteamUser of the last user to dispatch a callback
 public static HSteamUser GetHSteamUserCurrent()
 {
     InteropHelp.TestIfPlatformSupported();
     return((HSteamUser)NativeMethods.Steam_GetHSteamUserCurrent());
 }
Esempio n. 16
0
 public static bool BUserOwnsAppInTicket(byte[] rgubTicketDecrypted, uint cubTicketDecrypted, AppId_t nAppID)
 {
     InteropHelp.TestIfPlatformSupported();
     return(NativeMethods.BUserOwnsAppInTicket(rgubTicketDecrypted, cubTicketDecrypted, nAppID));
 }
Esempio n. 17
0
 // returns the pipe we are communicating to Steam with
 public static HSteamPipe GetHSteamPipe()
 {
     InteropHelp.TestIfPlatformSupported();
     return((HSteamPipe)NativeMethods.SteamAPI_GetHSteamPipe());
 }
Esempio n. 18
0
 public static bool BIsTicketForApp(byte[] rgubTicketDecrypted, uint cubTicketDecrypted, AppId_t nAppID)
 {
     InteropHelp.TestIfPlatformSupported();
     return(NativeMethods.SteamEncryptedAppTicket_BIsTicketForApp(rgubTicketDecrypted, cubTicketDecrypted, nAppID));
 }