### Get Item Definition Property (Example Usage) Source: https://partner.steamgames.com/doc/api/ISteamInventory?l=bulgarian&language=english Example of how to retrieve a property value. It's recommended to call this twice: first to get the buffer size, then to get the value. ```cpp uint32 valueSize = 0; // First call to get the size GetItemDefinitionProperty( k_SteamItemDef_t_Initial, NULL, NULL, &valueSize ); char* valueBuffer = new char[valueSize]; // Second call to get the value GetItemDefinitionProperty( k_SteamItemDef_t_Initial, "name", valueBuffer, &valueSize ); // Use valueBuffer here... ``` -------------------------------- ### InitGameServer Source: https://partner.steamgames.com/doc/api/ISTeamGameServer?l=german&language=english Initializes the ISteamGameServer instance. This method sets up the game server with essential details like IP addresses, ports, game application ID, and version information. ```APIDOC ## InitGameServer bool InitGameServer( uint32 unIP, uint16 usGamePort, uint16 usQueryPort, uint32 unFlags, AppId_t nGameAppId, const char *pchVersionString ); ### Description Initializes the instance of ISteamGameServer. This function is typically called by `SteamGameServer_Init`. ### Parameters #### Path Parameters - **unIP** (uint32) - Required - The IP address to bind to. Use `INADDR_ANY` to bind to all local IPv4 addresses. - **usGamePort** (uint16) - Required - The port for gameplay connections. - **usQueryPort** (uint16) - Required - The port for server browser duties and info pings. Use `MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE` to enable GameSocketShare mode. - **unFlags** (uint32) - Required - A union of one or more ServerFlags. - **nGameAppId** (AppId_t) - Required - The App ID of the game. - **pchVersionString** (const char *) - Required - The version string of the server (e.g., x.x.x.x). ### Returns - **bool** - Returns true if the game server was successfully initialized and bound to the provided IP/Port; otherwise, false. ### Remarks If GameSocketShare mode is enabled (by passing `MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE` for `usQueryPort`), the game server API will use GameSocketShare mode, requiring the use of `ISteamGameServer::HandleIncomingPacket` and `ISteamGameServer::GetNextOutgoingPacket`. ``` -------------------------------- ### GetAppInstallDir Source: https://partner.steamgames.com/doc/api/ISteamApps?l=english Gets the install folder for a specific AppID, even if the application is not installed. ```APIDOC ## GetAppInstallDir uint32 GetAppInstallDir( AppId_t appID, char *pchFolder, uint32 cchFolderBufferSize ); ### Description Gets the install folder for a specific AppID. This works even if the application is not installed, based on where the game would be installed with the default Steam library location. ### Parameters #### Path Parameters - **appID** (AppId_t) - The App ID to get the install dir for. - **pchFolder** (char *) - The string buffer that the folder path will be copied into. - **cchFolderBufferSize** (uint32) - The size in bytes of the `pchFolder` buffer. ### Returns - **uint32** - Returns the install directory path as a string into the buffer provided in pchFolder and returns the number of bytes that were copied into that buffer. ``` -------------------------------- ### GetLaunchCommandLine Source: https://partner.steamgames.com/doc/api/ISteamApps?l=english&language=english Retrieves the command line used to launch the application. ```APIDOC ## GetLaunchCommandLine ### Description Retrieves the command line used to launch the application. ### Method Not applicable (SDK function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response Returns the command line string. #### Response Example None ``` -------------------------------- ### BInitWorkshopForGameServer Source: https://partner.steamgames.com/doc/api/ISteamUGC?l=brazilian&language=english Initializes the workshop for a game server, specifying a content folder. ```APIDOC ## BInitWorkshopForGameServer ### Description Lets game servers set a specific workshop folder before issuing any UGC commands. This is helpful if you want to support multiple game servers running out of the same install folder. ### Parameters #### Path Parameters - **unWorkshopDepotID** (DepotId_t) - Required - The depot ID of the game server. - **pszFolder** (const char *) - Required - The absolute path to store the workshop content. ### Returns - **bool** - **true** upon success; otherwise, **false** if the calling user is not a game server or if the workshop is currently updating its content. ``` -------------------------------- ### GetAppInstallDir Source: https://partner.steamgames.com/doc/api/ISteamApps?l=czech&language=english Gets the install folder for a specific AppID, even if the application is not installed. ```APIDOC ## GetAppInstallDir uint32 GetAppInstallDir( AppId_t appID, char *pchFolder, uint32 cchFolderBufferSize ); ### Description Gets the install folder for a specific AppID. This works even if the application is not installed, based on where the game would be installed with the default Steam library location. ### Parameters #### Input Parameters - **appID** (AppId_t) - The App ID to get the install dir for. - **pchFolder** (char *) - The string buffer that the folder path will be copied into. - **cchFolderBufferSize** (uint32) - The size in bytes of the `pchFolder` buffer. ### Returns - **uint32**: Returns the install directory path as a string into the buffer provided in pchFolder and returns the number of bytes that were copied into that buffer. ``` -------------------------------- ### LogOn Source: https://partner.steamgames.com/doc/api/ISTeamGameServer?l=polish&language=english Begin process to login to a persistent game server account. ```APIDOC ## LogOn ### Description Begin process to login to a persistent game server account. ### Method N/A (C++ function) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Parameters - **pszToken** (const char *) - Required - Authentication token. ### Request Example N/A ### Response #### Success Response - **void** - This function does not return a value. #### Response Example N/A ``` -------------------------------- ### GetAppInstallDir Source: https://partner.steamgames.com/doc/api/ISteamApps?l=danish&language=english Gets the install folder for a specific AppID, even if the application is not installed. ```APIDOC ## GetAppInstallDir uint32 GetAppInstallDir( AppId_t appID, char *pchFolder, uint32 cchFolderBufferSize ); ### Description Gets the install folder for a specific AppID. This works even if the application is not installed, based on where the game would be installed with the default Steam library location. ### Parameters #### Path Parameters - **appID** (AppId_t) - The App ID to get the install dir for. #### Output Parameters - **pchFolder** (char *) - The string buffer that the folder path will be copied into. - **cchFolderBufferSize** (uint32) - The size in bytes of the `pchFolder` buffer. ### Returns - **uint32**: Returns the install directory path as a string into the buffer provided in pchFolder and returns the number of bytes that were copied into that buffer. ``` -------------------------------- ### GetAppInstallDir Source: https://partner.steamgames.com/doc/api/ISteamApps?l=german&language=english Gets the install folder for a specific AppID. This works even if the application is not installed. ```APIDOC ## GetAppInstallDir ### Description Gets the install folder for a specific AppID. This works even if the application is not installed, based on where the game would be installed with the default Steam library location. ### Method Call ### Parameters #### Path Parameters - **appID** (AppId_t) - The App ID to get the install dir for. - **pchFolder** (char *) - The string buffer that the folder path will be copied into. - **cchFolderBufferSize** (uint32) - The size in bytes of the `pchFolder` buffer. ### Returns - **uint32** - Returns the install directory path as a string into the buffer provided in pchFolder and returns the number of bytes that were copied into that buffer. ``` -------------------------------- ### InitiateGameConnection Source: https://partner.steamgames.com/doc/api/ISteamUser?l=arabic&language=english Starts the state machine for authenticating the game client with the game server. This is part of an older authentication API and should not be mixed with newer methods. It requires a pointer to memory for the authentication token, the size of that memory, the game server's Steam ID, IP address, port, and a flag indicating if the server is secure. ```APIDOC ## InitiateGameConnection ### Description Starts the state machine for authenticating the game client with the game server. This is part of an older authentication API and should not be mixed with newer methods. ### Method int ### Parameters #### Path Parameters - **pAuthBlob** (void *) - Required - A pointer to empty memory that will be filled in with the authentication token. - **cbMaxAuthBlob** (int) - Required - The number of bytes of allocated memory in pBlob. Should be at least 2048 bytes. - **steamIDGameServer** (CSteamID) - Required - The Steam ID of the game server, received from the game server by the client. - **unIPServer** (uint32) - Required - The IP address of the game server in host order, i.e 127.0.0.1 == 0x7f000001. - **usPortServer** (uint16) - Required - The connection port of the game server, in host order. - **bSecure** (bool) - Required - Whether or not the client thinks that the game server is reporting itself as secure (i.e. VAC is running.) ### Returns int - The number of bytes written to pBlob. Returns 0 indicating failure, signifying that the `pAuthBlob` buffer passed in was too small, and the call has failed. ### Notes - When you're done with the connection you must call TerminateGameConnection. - This is part of the old user authentication API and should not be mixed with the new API. ``` -------------------------------- ### Initialize Steam Game Server Source: https://partner.steamgames.com/doc/api/steam_gameserver Initializes the ISteamGameServer interface and sets essential server properties. Use this before logging on. ```c inline bool SteamGameServer_Init( uint32 unIP, uint16 usSteamPort, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString ); ``` -------------------------------- ### GetAppInstallDir Source: https://partner.steamgames.com/doc/api/ISteamApps?l=finnish&language=english Gets the install folder for a specific AppID. This works even if the application is not installed. ```APIDOC ## GetAppInstallDir ### Description Gets the install folder for a specific AppID. This works even if the application is not installed, based on where the game would be installed with the default Steam library location. ### Parameters #### Path Parameters - **appID** (AppId_t) - The App ID to get the install dir for. #### Output Parameters - **pchFolder** (char *) - The string buffer that the folder path will be copied into. - **cchFolderBufferSize** (uint32) - The size in bytes of the `pchFolder` buffer. ### Returns - **uint32** - Returns the install directory path as a string into the buffer provided in pchFolder and returns the number of bytes that were copied into that buffer. ``` -------------------------------- ### InitiateGameConnection Source: https://partner.steamgames.com/doc/api/ISteamUser?l=vietnamese&language=english Starts the state machine for authenticating the game client with the game server. This is part of an older authentication API and should not be mixed with newer methods. It requires a pointer to memory for the authentication token, the maximum size of that memory, the game server's Steam ID, IP address, port, and a flag indicating if the server is secure. ```APIDOC ## InitiateGameConnection ### Description Starts the state machine for authenticating the game client with the game server. It is the client portion of a three-way handshake between the client, the game server, and the steam servers. Note: When done, call TerminateGameConnection. This is part of the old user authentication API. ### Method `int InitiateGameConnection( void *pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure );` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters Table Name| Type| Description ---|---|--- **pAuthBlob**| void *| A pointer to empty memory that will be filled in with the authentication token. **cbMaxAuthBlob**| int| The number of bytes of allocated memory in pBlob. Should be at least 2048 bytes. **steamIDGameServer**| CSteamID| The Steam ID of the game server, received from the game server by the client. **unIPServer**| uint32| The IP address of the game server in host order, i.e 127.0.0.1 == 0x7f000001. **usPortServer**| uint16| The connection port of the game server, in host order. **bSecure**| bool| Whether or not the client thinks that the game server is reporting itself as secure (i.e. VAC is running.) ### Returns int - The number of bytes written to pBlob. Returns 0 indicating failure, signifying that the `pAuthBlob` buffer passed in was too small, and the call has failed. ### Request Example None ### Response #### Success Response (200) None #### Response Example None ``` -------------------------------- ### GetAppInstallDir Source: https://partner.steamgames.com/doc/api/ISteamApps?l=arabic&language=english Gets the install folder for a specific AppID. This works even if the application is not installed. ```APIDOC ## GetAppInstallDir ### Description Gets the install folder for a specific AppID. This works even if the application is not installed, based on where the game would be installed with the default Steam library location. ### Method ``` uint32 GetAppInstallDir( AppId_t appID, char *pchFolder, uint32 cchFolderBufferSize ); ``` ### Parameters #### Path Parameters - **appID** (AppId_t) - The App ID to get the install dir for. - **pchFolder** (char *) - The string buffer that the folder path will be copied into. - **cchFolderBufferSize** (uint32) - The size in bytes of the `pchFolder` buffer. ### Returns - **uint32**: Returns the install directory path as a string into the buffer provided in pchFolder and returns the number of bytes that were copied into that buffer. ``` -------------------------------- ### GetAppInstallDir Source: https://partner.steamgames.com/doc/api/ISteamApps?l=arabic Gets the install folder for a specific AppID. This works even if the application is not installed. ```APIDOC ## GetAppInstallDir uint32 GetAppInstallDir( AppId_t appID, char *pchFolder, uint32 cchFolderBufferSize ); ### Description Gets the install folder for a specific AppID. This works even if the application is not installed, based on where the game would be installed with the default Steam library location. ### Parameters #### Path Parameters - **appID** (AppId_t) - The App ID to get the install dir for. - **pchFolder** (char *) - The string buffer that the folder path will be copied into. - **cchFolderBufferSize** (uint32) - The size in bytes of the `pchFolder` buffer. ### Returns - **uint32** - Returns the install directory path as a string into the buffer provided in pchFolder and returns the number of bytes that were copied into that buffer. ``` -------------------------------- ### GetLaunchCommandLine Source: https://partner.steamgames.com/doc/api/ISteamApps?l=arabic Retrieves the command line arguments used when the game was launched via a Steam URL. This is a secure alternative to OS-level command lines. ```APIDOC ## GetLaunchCommandLine ### Description Gets the command line if the game was launched via Steam URL, e.g. steam://run////. This method is preferable to launching with a command line via the operating system, which can be a security risk. In order for rich presence joins to go through this and not be placed on the OS command line, you must enable "Use launch command line" from the Installation > General page on your app. ### Method Call ### Parameters #### Path Parameters - **pszCommandLine** (char *) - Required - The string buffer that the command line will be copied into. - **cubCommandLine** (int) - Required - The size in bytes of the `pszCommandLine` buffer. ### Returns - **int** - Returns the command line as a string into the buffer provided in pszCommandLine and returns the number of bytes that were copied into that buffer. ### See Also - NewUrlLaunchParameters_t ``` -------------------------------- ### InitGameServer Source: https://partner.steamgames.com/doc/api/ISTeamGameServer?l=english Initializes the ISteamGameServer instance. This method binds the game server to a specified IP and port, sets up ports for gameplay and server browsing, and associates the server with an application ID and version string. ```APIDOC ## InitGameServer bool InitGameServer( uint32 unIP, uint16 usGamePort, uint16 usQueryPort, uint32 unFlags, AppId_t nGameAppId, const char *pchVersionString ); ### Description Initializes the game server instance. This function is typically called by SteamGameServer_Init and is responsible for binding the server to the network interface and port. ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Method N/A (C++ function) ### Endpoint N/A (C++ function) ### Request Example N/A ### Response #### Success Response - **bool**: Returns true if the game server was successfully able to bind to the provided IP/Port; otherwise, false. #### Response Example N/A ``` -------------------------------- ### Get Application Install Directory Source: https://partner.steamgames.com/doc/api/ISteamApps?l=german&language=english Retrieves the installation directory path for a given AppID. This function works even if the app is not installed. ```cpp char szInstallDir[MAX_PATH]; uint32 bytesCopied = SteamApps()->GetAppInstallDir( appID, szInstallDir, sizeof( szInstallDir ) ); if ( bytesCopied > 0 && bytesCopied < sizeof( szInstallDir ) ) { // szInstallDir now contains the path } ``` -------------------------------- ### GetLaunchCommandLine Source: https://partner.steamgames.com/doc/api/ISteamApps?l=danish&language=english Retrieves the command line arguments if the game was launched via a Steam URL. This is a secure alternative to OS-level command lines. ```APIDOC ## GetLaunchCommandLine int GetLaunchCommandLine( char *pszCommandLine, int cubCommandLine ); ### Description Gets the command line if the game was launched via Steam URL, e.g. steam://run////. This method is preferable to launching with a command line via the operating system, which can be a security risk. In order for rich presence joins to go through this and not be placed on the OS command line, you must enable "Use launch command line" from the Installation > General page on your app. ### Parameters #### Path Parameters - **pszCommandLine** (char *) - Required - The string buffer that the command line will be copied into. - **cubCommandLine** (int) - Required - The size in bytes of the `pszCommandLine` buffer. ### Returns - **int** - Returns the command line as a string into the buffer provided in pszCommandLine and returns the number of bytes that were copied into that buffer. ### See Also - NewUrlLaunchParameters_t ``` -------------------------------- ### Get Application Install Directory Source: https://partner.steamgames.com/doc/api/ISteamApps?l=dutch&language=english Retrieves the installation directory path for a given AppID. This function works even if the app is not installed. ```cpp char folder[1024]; SteamApps()->GetAppInstallDir(appID, folder, sizeof(folder)); ``` -------------------------------- ### GetLaunchCommandLine Source: https://partner.steamgames.com/doc/api/ISteamApps?l=finnish&language=english Retrieves the command line arguments if the game was launched via a Steam URL. This is a more secure alternative to OS command lines. ```APIDOC ## GetLaunchCommandLine ### Description Gets the command line if the game was launched via a Steam URL. ### Method (Not specified, likely a C++ method call) ### Parameters #### Path Parameters (None) #### Query Parameters (None) #### Request Body (None) ### Parameters * **pszCommandLine** (char *) - Required - The string buffer that the command line will be copied into. * **cubCommandLine** (int) - Required - The size in bytes of the `pszCommandLine` buffer. ### Returns * **int** - The number of bytes copied into the buffer. The command line is written into `pszCommandLine`. ``` -------------------------------- ### Get Application Install Directory Source: https://partner.steamgames.com/doc/api/ISteamApps?l=czech&language=english Retrieves the installation directory path for a given AppID. This function works even if the app is not installed. ```cpp char folder[256]; SteamApps()->GetAppInstallDir(appID, folder, sizeof(folder)); ``` -------------------------------- ### InitiateGameConnection Source: https://partner.steamgames.com/doc/api/iSteamUser?l=spanish&language=english Starts the state machine for authenticating the game client with the game server. This is part of a three-way handshake between the client, the game server, and Steam servers. Remember to call ISteamUser::TerminateGameConnection when done. ```APIDOC ## InitiateGameConnection ### Description Starts the state machine for authenticating the game client with the game server. This is part of a three-way handshake between the client, the game server, and Steam servers. Remember to call ISteamUser::TerminateGameConnection when done. ### Method int ### Parameters #### Path Parameters - **pAuthBlob** (void *) - Required - A pointer to empty memory that will be filled in with the authentication token. - **cbMaxAuthBlob** (int) - Required - The number of bytes of allocated memory in pBlob. Should be at least 2048 bytes. - **steamIDGameServer** (CSteamID) - Required - The Steam ID of the game server, received from the game server by the client. - **unIPServer** (uint32) - Required - The IP address of the game server in host order, i.e 127.0.0.1 == 0x7f000001. - **usPortServer** (uint16) - Required - The connection port of the game server, in host order. - **bSecure** (bool) - Required - Whether or not the client thinks that the game server is reporting itself as secure (i.e. VAC is running.) ### Returns int - The number of bytes written to pBlob. Returns 0 indicating failure, signifying that the `pAuthBlob` buffer passed in was too small, and the call has failed. ### Notes - This is part of the old user authentication API and should not be mixed with the new API. ``` -------------------------------- ### Get Application Install Directory Source: https://partner.steamgames.com/doc/api/ISteamApps Retrieves the installation directory path for a given AppID. This function works even if the app is not installed. ```cpp char szInstallDir[1024]; if ( SteamApps()->GetAppInstallDir( appID, szInstallDir, sizeof( szInstallDir ) ) > 0 ) { // szInstallDir now contains the install path } ```