Provides the core foundation to initialize and access the Steamworks API.
All of the types listed here are global defines and not associated with any one specific API.
Functions
These are global functions which do not require an interface to set up. You can read more about these functions in the
Steamworks API Overview.
SteamAPI_Init
S_API bool S_CALLTYPE SteamAPI_Init();
Initializes the Steamworks API.
See
Initialization and Shutdown for additional information.
Returns: bool
true indicates that all required interfaces have been acquired and are accessible.
false indicates one of the following conditions:
- The Steam client isn't running. A running Steam client is required to provide implementations of the various Steamworks interfaces.
- The Steam client couldn't determine the App ID of game. If you're running your application from the executable or debugger directly then you must have a
steam_appid.txt
in your game directory next to the executable, with your app ID in it and nothing else. Steam will look for this file in the current working directory. If you are running your executable from a different directory you may need to relocate the steam_appid.txt
file.
- Your application is not running under the same OS user context as the Steam client, such as a different user or administration access level.
- Ensure that you own a license for the App ID on the currently active Steam account. Your game must show up in your Steam library.
- Your App ID is not completely set up, i.e. in
Release State: Unavailable
, or it's missing default packages.
Example:int main()
{
if ( SteamAPI_RestartAppIfNecessary( k_uAppIdInvalid ) ) // Replace with your App ID
{
return 1;
}
if ( !SteamAPI_Init() )
{
printf( "Fatal Error - Steam must be running to play this game (SteamAPI_Init() failed).\n" );
return 1;
}
return 0;
}
SteamAPI_ReleaseCurrentThreadMemory
S_API void S_CALLTYPE SteamAPI_ReleaseCurrentThreadMemory();
Free's the internal Steamworks API memory associated with the calling thread.
Most Steamworks API functions allocate a small amount of thread-local memory for parameter storage, calling this will manually free such memory. This function is called automatically by
SteamAPI_RunCallbacks, so a program that only ever accesses the Steamworks API from a single thread never needs to explicitly call this function.
SteamAPI_RestartAppIfNecessary
S_API bool S_CALLTYPE SteamAPI_RestartAppIfNecessary( uint32 unOwnAppID );
Name | Type | Description |
unOwnAppID | uint32 | The App ID of this title. |
Checks if your executable was launched through Steam and relaunches it through Steam if it wasn't.
See
Initialization and Shutdown for additional information.
Returns: bool
If this returns
true then it starts the Steam client if required and launches your game again through it, and you should quit your process as soon as possible. This effectively runs
steam://run/<AppId>
so it may not relaunch the exact executable that called it, as it will always relaunch from the version installed in your Steam library folder.
If it returns
false, then your game was launched by the Steam client and no action needs to be taken. One exception is if a
steam_appid.txt
file is present then this will return
false regardless. This allows you to develop and test without launching your game through the Steam client. Make sure to remove the
steam_appid.txt
file when uploading the game to your Steam depot!
Example:int main()
{
if ( SteamAPI_RestartAppIfNecessary( k_uAppIdInvalid ) ) // Replace with your App ID
{
return 1;
}
if ( !SteamAPI_Init() )
{
printf( "Fatal Error - Steam must be running to play this game (SteamAPI_Init() failed).\n" );
return 1;
}
return 0;
}
SteamAPI_RunCallbacks
S_API void S_CALLTYPE SteamAPI_RunCallbacks();
Dispatches callbacks and call results to all of the registered listeners.
It's best to call this at >10Hz, the more time between calls, the more potential latency between receiving events or results from the Steamworks API. Most games call this once per render-frame. All registered listener functions will be invoked during this call, in the callers thread context.
SteamAPI_RunCallbacks is safe to call from multiple threads simultaneously, but if you choose to do this, callback code could be executed on any thread. One alternative is to call SteamAPI_RunCallbacks from the main thread only, and call
SteamAPI_ReleaseCurrentThreadMemory regularly on other threads.
SteamAPI_SetMiniDumpComment
S_API void S_CALLTYPE SteamAPI_SetMiniDumpComment( const char *pchMsg );
Name | Type | Description |
pchMsg | const char * | The message to attach to the minidump. This must be null terminated. |
Attaches an arbitrary comment to embed in the minidump.
Some examples that you may want to include are what level the user was playing, how many players on the server, how much memory is free, etc.
This must be called before calling
SteamAPI_WriteMiniDump.
NOTE: Only works on 32bit Windows!
SteamAPI_Shutdown
S_API void S_CALLTYPE SteamAPI_Shutdown();
Shuts down the Steamworks API, releases pointers and frees memory.
You should call this during process shutdown if possible.
This will not unhook the
Steam Overlay from your game as there's no guarantee that your rendering API is done using it.
SteamAPI_WriteMiniDump
S_API void S_CALLTYPE SteamAPI_WriteMiniDump( uint32 uStructuredExceptionCode, void* pvExceptionInfo, uint32 uBuildID );
Name | Type | Description |
uStructuredExceptionCode | uint32 | The structured exception code. |
pvExceptionInfo | void* | The EXCEPTION_POINTERS containing the actual exception information. |
uBuildID | uint32 | A Build ID to track what version of the app submitted this minidump. This is not the same as a Steam build ID and is used only for crash reporting. |
Writes and uploads a minidump to report crashes.
See
Steam Error Reporting for more information.
You can add an optional comment by calling
SteamAPI_SetMiniDumpComment before you call this function.
NOTE: This only supports 32bit Windows.
Example:#ifdef _WIN32
#include <Windows.h>
void MiniDumpFunction( unsigned int nExceptionCode, EXCEPTION_POINTERS *pException )
{
// You can build and set an arbitrary comment to embed in the minidump here,
// maybe you want to put what level the user was playing, how many players on the server,
// how much memory is free, etc...
SteamAPI_SetMiniDumpComment( "Minidump comment: SteamworksExample.exe/n" );
// The 0 here is a build ID, we don't set it
SteamAPI_WriteMiniDump( nExceptionCode, pException, 0 );
}
int RealMain( HINSTANCE hInstance, LPSTR lpCmdLine, int nCmdShow )
{
__debugbreak();
return 0;
}
int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow )
{
// All we do here is call the real main function after setting up our se translator
// this allows us to catch exceptions and report errors to Steam.
//
// Note that you must set your compiler flags correctly to enable structured exception
// handling in order for this particular setup method to work.
if ( IsDebuggerPresent() )
{
// We don't want to mask exceptions (or report them to Steam!) when debugging.
// If you would like to step through the exception handler, attach a debugger
// after running the game outside of the debugger.
return RealMain( lpCmdLine, hInstance, nCmdShow );
}
_set_se_translator( MiniDumpFunction );
try // this try block allows the SE translator to work
{
return RealMain( hInstance, lpCmdLine, nCmdShow );
}
catch( ... )
{
return -1;
}
}
#endif
Structs
These are structs which functions in steam_api may return and/or interact with.
CGameID
The globally unique identifier for Steam Games.
CSteamID
The globally unique identifier for all Steam accounts, Steam groups, Lobbies and Chat rooms.
See
EAccountType and
EUniverse.
Enums
These are enums which are defined for use with steam_api.
EAccountType
Steam account types. This is used internally in
CSteamID.
Name | Value | Description |
k_EAccountTypeInvalid | 0 | Used for invalid Steam IDs. |
k_EAccountTypeIndividual | 1 | Regular user account. |
k_EAccountTypeMultiseat | 2 | Multiseat (e.g. cybercafe) account. |
k_EAccountTypeGameServer | 3 | Persistent (not anonymous) game server account. |
k_EAccountTypeAnonGameServer | 4 | Anonymous game server account. |
k_EAccountTypePending | 5 | Pending. |
k_EAccountTypeContentServer | 6 | Valve internal content server account. |
k_EAccountTypeClan | 7 | Steam Group (clan). |
k_EAccountTypeChat | 8 | Steam group chat or lobby. |
k_EAccountTypeConsoleUser | 9 | Fake Steam ID for local PSN account on PS3 or Live account on 360, etc. |
k_EAccountTypeAnonUser | 10 | Anonymous user account. (Used to create an account or reset a password) |
k_EAccountTypeMax | 11 | Max of 16 items in this field |
EAppOwnershipFlags
Flags that represent the ownership information of an App ID. (Steam Internal usage only)
Name | Value | Description |
k_EAppOwnershipFlags_None | 0x0000 | Unknown. |
k_EAppOwnershipFlags_OwnsLicense | 0x0001 | Owns a license for this app. |
k_EAppOwnershipFlags_FreeLicense | 0x0002 | The user has not paid for the app. |
k_EAppOwnershipFlags_RegionRestricted | 0x0004 | Owns app, but not allowed to play in current region. |
k_EAppOwnershipFlags_LowViolence | 0x0008 | Only owns a low violence version. |
k_EAppOwnershipFlags_InvalidPlatform | 0x0010 | App not supported on current platform. |
k_EAppOwnershipFlags_SharedLicense | 0x0020 | License was shared by an authorized device via Steam Family Sharing. |
k_EAppOwnershipFlags_FreeWeekend | 0x0040 | Owned by a free weekend licenses. |
k_EAppOwnershipFlags_RetailLicense | 0x0080 | Has a retail license for game, (CD-Key etc) (Deprecated) |
k_EAppOwnershipFlags_LicenseLocked | 0x0100 | Shared license is locked (in use) by other user. |
k_EAppOwnershipFlags_LicensePending | 0x0200 | Owns app, but transaction is still pending. Can't install or play yet. |
k_EAppOwnershipFlags_LicenseExpired | 0x0400 | Doesn't own app anymore since license expired. |
k_EAppOwnershipFlags_LicensePermanent | 0x0800 | Permanent license, not shared, or guest or freeweekend etc. |
k_EAppOwnershipFlags_LicenseRecurring | 0x1000 | Recurring license, user is charged periodically. |
k_EAppOwnershipFlags_LicenseCanceled | 0x2000 | Mark as canceled, but might be still active if recurring. |
k_EAppOwnershipFlags_AutoGrant | 0x4000 | Ownership is based on any kind of autogrant license. |
k_EAppOwnershipFlags_PendingGift | 0x8000 | User has pending gift to redeem. |
k_EAppOwnershipFlags_RentalNotActivated | 0x10000 | Rental hasn't been activated yet. |
k_EAppOwnershipFlags_Rental | 0x20000 | Is a rental. |
k_EAppOwnershipFlags_SiteLicense | 0x40000 | Is from a site license |
EAppReleaseState
Release state of an App ID. (Steam Internal usage only)
Name | Value | Description |
k_EAppReleaseState_Unknown | 0 | Unknown, can't get application information, or license info is missing. |
k_EAppReleaseState_Unavailable | 1 | Even if user owns it, they can't see game at all. |
k_EAppReleaseState_Prerelease | 2 | Can be purchased and is visible in games list, nothing else. |
k_EAppReleaseState_PreloadOnly | 3 | Owners can preload app, not play it. |
k_EAppReleaseState_Released | 4 | Owners can download and play app. |
EAppType
App ID type, more info is available on
Types of Applications (Steam Internal usage only)
Name | Value | Description |
k_EAppType_Invalid | 0x000 | Unknown / invalid. |
k_EAppType_Game | 0x001 | Playable game, default type. |
k_EAppType_Application | 0x002 | Software application. |
k_EAppType_Tool | 0x004 | SDKs, editors & dedicated servers. |
k_EAppType_Demo | 0x008 | Game demo. |
k_EAppType_Media_DEPRECATED | 0x010 | Legacy - was used for game trailers, which are now just videos on the web. |
k_EAppType_DLC | 0x020 | Downloadable Content. |
k_EAppType_Guide | 0x040 | Game guide, PDF etc |
k_EAppType_Driver | 0x080 | Hardware driver updater (ATI, Razor etc.) |
k_EAppType_Config | 0x100 | Hidden app used to config Steam features (backpack, sales, etc.) |
k_EAppType_Hardware | 0x200 | S hardware device (Steam Machine, Steam Controller, Steam Link, etc.) |
k_EAppType_Franchise | 0x400 | A hub for collections of multiple apps, eg films, series, games. |
k_EAppType_Video | 0x800 | A video component of either a Film or TVSeries (may be the feature, an episode, preview, making-of, etc.) |
k_EAppType_Plugin | 0x1000 | Plug-in types for other Apps. |
k_EAppType_Music | 0x2000 | Music files. |
k_EAppType_Series | 0x4000 | Container app for video series. |
k_EAppType_Shortcut | 0x40000000 | Just a shortcut, client side only. |
k_EAppType_DepotOnly | 0x80000000 | Placeholder since depots and apps share the same namespace. |
EAuthSessionResponse
Callback return values for the
ValidateAuthTicketResponse_t callback which is posted as a response to
ISteamUser::BeginAuthSession and
ISteamGameServer::BeginAuthSession.
Name | Value | Description |
k_EAuthSessionResponseOK | 0 | Steam has verified the user is online, the ticket is valid and ticket has not been reused. |
k_EAuthSessionResponseUserNotConnectedToSteam | 1 | The user in question is not connected to steam. |
k_EAuthSessionResponseNoLicenseOrExpired | 2 | The user doesn't have a license for this App ID or the ticket has expired. |
k_EAuthSessionResponseVACBanned | 3 | The user is VAC banned for this game. |
k_EAuthSessionResponseLoggedInElseWhere | 4 | The user account has logged in elsewhere and the session containing the game instance has been disconnected. |
k_EAuthSessionResponseVACCheckTimedOut | 5 | VAC has been unable to perform anti-cheat checks on this user. |
k_EAuthSessionResponseAuthTicketCanceled | 6 | The ticket has been canceled by the issuer. |
k_EAuthSessionResponseAuthTicketInvalidAlreadyUsed | 7 | This ticket has already been used, it is not valid. |
k_EAuthSessionResponseAuthTicketInvalid | 8 | This ticket is not from a user instance currently connected to steam. |
k_EAuthSessionResponsePublisherIssuedBan | 9 | The user is banned for this game. The ban came via the web api and not VAC. |
EBeginAuthSessionResult
Results returned from
ISteamUser::BeginAuthSession and
ISteamGameServer::BeginAuthSession.
Name | Value | Description |
k_EBeginAuthSessionResultOK | 0 | Ticket is valid for this game and this Steam ID. |
k_EBeginAuthSessionResultInvalidTicket | 1 | The ticket is invalid. |
k_EBeginAuthSessionResultDuplicateRequest | 2 | A ticket has already been submitted for this Steam ID. |
k_EBeginAuthSessionResultInvalidVersion | 3 | Ticket is from an incompatible interface version. |
k_EBeginAuthSessionResultGameMismatch | 4 | Ticket is not for this game. |
k_EBeginAuthSessionResultExpiredTicket | 5 | Ticket has expired. |
EBroadcastUploadResult
Broadcast upload result from
BroadcastUploadStop_t.
Name | Value | Description |
k_EBroadcastUploadResultNone | 0 | Broadcast state unknown. |
k_EBroadcastUploadResultOK | 1 | Broadcast was good, no problems. |
k_EBroadcastUploadResultInitFailed | 2 | Broadcast init failed. |
k_EBroadcastUploadResultFrameFailed | 3 | Broadcast frame upload failed. |
k_EBroadcastUploadResultTimeout | 4 | Broadcast upload timed out. |
k_EBroadcastUploadResultBandwidthExceeded | 5 | Broadcast send too much data. |
k_EBroadcastUploadResultLowFPS | 6 | Broadcast FPS is too low. |
k_EBroadcastUploadResultMissingKeyFrames | 7 | Broadcast sending not enough key frames. |
k_EBroadcastUploadResultNoConnection | 8 | Broadcast client failed to connect to relay. |
k_EBroadcastUploadResultRelayFailed | 9 | Relay dropped the upload. |
k_EBroadcastUploadResultSettingsChanged | 10 | The client changed broadcast settings. |
k_EBroadcastUploadResultMissingAudio | 11 | Client failed to send audio data. |
k_EBroadcastUploadResultTooFarBehind | 12 | Clients was too slow uploading. |
k_EBroadcastUploadResultTranscodeBehind | 13 | Server failed to keep up with transcode. |
EChatEntryType
Chat Entry Types.
Returned by
ISteamFriends::GetFriendMessage,
ISteamFriends::GetClanChatMessage and
ISteamMatchmaking::GetLobbyChatEntry.
Name | Value | Description |
k_EChatEntryTypeInvalid | 0 | Invalid. |
k_EChatEntryTypeChatMsg | 1 | Normal text message from another user. |
k_EChatEntryTypeTyping | 2 | The other user is typing, not used in multi-user chat. |
k_EChatEntryTypeInviteGame | 3 | Invite from other user into that users current game. |
k_EChatEntryTypeEmote | 4 | Text emote message (Deprecated, should be treated as ChatMsg). |
k_EChatEntryTypeLeftConversation | 6 | A user has left the conversation (closed the chat window). |
k_EChatEntryTypeEntered | 7 | User has entered the conversation, used in multi-user chat and group chat. |
k_EChatEntryTypeWasKicked | 8 | User was kicked (Data: Steam ID of the user performing the kick). |
k_EChatEntryTypeWasBanned | 9 | User was banned (Data: Steam ID of the user performing the ban). |
k_EChatEntryTypeDisconnected | 10 | User disconnected. |
k_EChatEntryTypeHistoricalChat | 11 | A chat message from user's chat history or offline message. |
k_EChatEntryTypeLinkBlocked | 14 | A link was removed by the chat filter. |
EChatRoomEnterResponse
Chat Room Enter Responses.
Name | Value | Description |
k_EChatRoomEnterResponseSuccess | 1 | Success. |
k_EChatRoomEnterResponseDoesntExist | 2 | Chat doesn't exist (probably closed). |
k_EChatRoomEnterResponseNotAllowed | 3 | General Denied - You don't have the permissions needed to join the chat. |
k_EChatRoomEnterResponseFull | 4 | Chat room has reached its maximum size. |
k_EChatRoomEnterResponseError | 5 | Unexpected Error. |
k_EChatRoomEnterResponseBanned | 6 | You are banned from this chat room and may not join. |
k_EChatRoomEnterResponseLimited | 7 | Joining this chat is not allowed because you are a limited user (no value on account). |
k_EChatRoomEnterResponseClanDisabled | 8 | Attempt to join a clan chat when the clan is locked or disabled. |
k_EChatRoomEnterResponseMemberBlockedYou | 10 | Join failed - a user that is in the chat has blocked you from joining. |
k_EChatRoomEnterResponseYouBlockedMember | 11 | Join failed - you have blocked a user that is already in the chat. |
k_EChatRoomEnterResponseRatelimitExceeded | 15 | Join failed - too many join attempts in a very short period of time. |
EChatSteamIDInstanceFlags
Special flags for Chat accounts - they go in the top 8 bits of the Steam ID's "instance", leaving 12 for the actual instances
Name | Value | Description |
k_EChatAccountInstanceMask | 0x00000FFF | Top 8 bits are flags. |
k_EChatInstanceFlagClan | ( k_unSteamAccountInstanceMask + 1 ) >> 1 | The Steam ID is for a Steam group. |
k_EChatInstanceFlagLobby | ( k_unSteamAccountInstanceMask + 1 ) >> 2 | The Steam ID is for a Lobby. |
k_EChatInstanceFlagMMSLobby | ( k_unSteamAccountInstanceMask + 1 ) >> 3 | The Steam ID is for a MMS Lobby. |
EDenyReason
Result values when a client failed to join or has been kicked from a game server. Obtained from
GSClientDeny_t and
GSClientKick_t.
Name | Value | Description |
k_EDenyInvalid | 0 | Unknown. |
k_EDenyInvalidVersion | 1 | The client and server are not the same version. |
k_EDenyGeneric | 2 | Generic. |
k_EDenyNotLoggedOn | 3 | The client is not logged on. |
k_EDenyNoLicense | 4 | The client does not have a license to play this game. |
k_EDenyCheater | 5 | The client is VAC banned. |
k_EDenyLoggedInElseWhere | 6 | The client is logged in elsewhere. |
k_EDenyUnknownText | 7 | |
k_EDenyIncompatibleAnticheat | 8 | |
k_EDenyMemoryCorruption | 9 | |
k_EDenyIncompatibleSoftware | 10 | |
k_EDenySteamConnectionLost | 11 | The server lost connection to steam. |
k_EDenySteamConnectionError | 12 | The server had a general error connecting to Steam. |
k_EDenySteamResponseTimedOut | 13 | The server timed out connecting to Steam. |
k_EDenySteamValidationStalled | 14 | The client has not authed with Steam yet. |
k_EDenySteamOwnerLeftGuestUser | 15 | The owner of the shared game has left, called for each guest of the owner. |
EGameIDType
Used to describe the type of
CGameID.
Name | Value | Description |
k_EGameIDTypeApp | 0 | The Game ID is a regular steam app. |
k_EGameIDTypeGameMod | 1 | The Game ID is a mod. |
k_EGameIDTypeShortcut | 2 | The game ID is a shortcut. |
k_EGameIDTypeP2P | 3 | The game ID is a P2P file. |
ELaunchOptionType
Codes for well defined launch options, corresponds to "Launch Type" in the applications Launch Options which can be found on the
General Installation Settings page.
There is a special function BIsVRLaunchOptionType, to check a the type is any of the VR launch options.
Name | Value | Description |
k_ELaunchOptionType_None | 0 | Unspecified. |
k_ELaunchOptionType_Default | 1 | Runs the app in default mode. |
k_ELaunchOptionType_SafeMode | 2 | Runs the game in safe mode. |
k_ELaunchOptionType_Multiplayer | 3 | Runs the game in multiplayer mode. |
k_ELaunchOptionType_Config | 4 | Runs config tool for this game. |
k_ELaunchOptionType_OpenVR | 5 | Runs game in VR mode using OpenVR. |
k_ELaunchOptionType_Server | 6 | Runs dedicated server for this game. |
k_ELaunchOptionType_Editor | 7 | Runs game editor. |
k_ELaunchOptionType_Manual | 8 | Shows game manual. |
k_ELaunchOptionType_Benchmark | 9 | Runs game benchmark. |
k_ELaunchOptionType_Option1 | 10 | Generic run option, uses description field for game name. |
k_ELaunchOptionType_Option2 | 11 | Generic run option, uses description field for game name. |
k_ELaunchOptionType_Option3 | 12 | Generic run option, uses description field for game name. |
k_ELaunchOptionType_OculusVR | 13 | Runs game in VR mode using the Oculus SDK. |
k_ELaunchOptionType_OpenVROverlay | 14 | Runs an OpenVR dashboard overlay. |
k_ELaunchOptionType_OSVR | 15 | Runs game in VR mode using the OSVR SDK. |
k_ELaunchOptionType_Dialog | 1000 | Show launch options dialog. |
EMarketingMessageFlags
Internal Steam marketing message flags that change how a client should handle them.
Name | Value | Description |
k_EMarketingMessageFlagsNone | 0 | |
k_EMarketingMessageFlagsHighPriority | 1 << 0 | |
k_EMarketingMessageFlagsPlatformWindows | 1 << 1 | |
k_EMarketingMessageFlagsPlatformMac | 1 << 2 | |
k_EMarketingMessageFlagsPlatformLinux | 1 << 3 | |
k_EMarketingMessageFlagsPlatformRestrictions | = | aggregate flags |
ENotificationPosition
Possible positions to have the overlay show notifications in. Used with
ISteamUtils::SetOverlayNotificationPosition.
Name | Value | Description |
k_EPositionTopLeft | 0 | Top left corner. |
k_EPositionTopRight | 1 | Top right corner. |
k_EPositionBottomLeft | 2 | Bottom left corner. |
k_EPositionBottomRight | 3 | Bottom right corner. |
EResult
Steam error result codes.
These are frequently returned by functions, callbacks, and call results from both the Steamworks API and the Web API. An API may return arbitrary EResult codes, refer to the documentation for that API function or callback to see what it could return and what they mean in the context of that API call.
This is similar to Win32's HRESULT type or POSIXs errno.
Name | Value | Description |
k_EResultOK | 1 | Success. |
k_EResultFail | 2 | Generic failure. |
k_EResultNoConnection | 3 | Your Steam client doesn't have a connection to the back-end. |
k_EResultInvalidPassword | 5 | Password/ticket is invalid. |
k_EResultLoggedInElsewhere | 6 | The user is logged in elsewhere. |
k_EResultInvalidProtocolVer | 7 | Protocol version is incorrect. |
k_EResultInvalidParam | 8 | A parameter is incorrect. |
k_EResultFileNotFound | 9 | File was not found. |
k_EResultBusy | 10 | Called method is busy - action not taken. |
k_EResultInvalidState | 11 | Called object was in an invalid state. |
k_EResultInvalidName | 12 | The name was invalid. |
k_EResultInvalidEmail | 13 | The email was invalid. |
k_EResultDuplicateName | 14 | The name is not unique. |
k_EResultAccessDenied | 15 | Access is denied. |
k_EResultTimeout | 16 | Operation timed out. |
k_EResultBanned | 17 | The user is VAC2 banned. |
k_EResultAccountNotFound | 18 | Account not found. |
k_EResultInvalidSteamID | 19 | The Steam ID was invalid. |
k_EResultServiceUnavailable | 20 | The requested service is currently unavailable. |
k_EResultNotLoggedOn | 21 | The user is not logged on. |
k_EResultPending | 22 | Request is pending, it may be in process or waiting on third party. |
k_EResultEncryptionFailure | 23 | Encryption or Decryption failed. |
k_EResultInsufficientPrivilege | 24 | Insufficient privilege. |
k_EResultLimitExceeded | 25 | Too much of a good thing. |
k_EResultRevoked | 26 | Access has been revoked (used for revoked guest passes.) |
k_EResultExpired | 27 | License/Guest pass the user is trying to access is expired. |
k_EResultAlreadyRedeemed | 28 | Guest pass has already been redeemed by account, cannot be used again. |
k_EResultDuplicateRequest | 29 | The request is a duplicate and the action has already occurred in the past, ignored this time. |
k_EResultAlreadyOwned | 30 | All the games in this guest pass redemption request are already owned by the user. |
k_EResultIPNotFound | 31 | IP address not found. |
k_EResultPersistFailed | 32 | Failed to write change to the data store. |
k_EResultLockingFailed | 33 | Failed to acquire access lock for this operation. |
k_EResultLogonSessionReplaced | 34 | The logon session has been replaced. |
k_EResultConnectFailed | 35 | Failed to connect. |
k_EResultHandshakeFailed | 36 | The authentication handshake has failed. |
k_EResultIOFailure | 37 | There has been a generic IO failure. |
k_EResultRemoteDisconnect | 38 | The remote server has disconnected. |
k_EResultShoppingCartNotFound | 39 | Failed to find the shopping cart requested. |
k_EResultBlocked | 40 | A user blocked the action. |
k_EResultIgnored | 41 | The target is ignoring sender. |
k_EResultNoMatch | 42 | Nothing matching the request found. |
k_EResultAccountDisabled | 43 | The account is disabled. |
k_EResultServiceReadOnly | 44 | This service is not accepting content changes right now. |
k_EResultAccountNotFeatured | 45 | Account doesn't have value, so this feature isn't available. |
k_EResultAdministratorOK | 46 | Allowed to take this action, but only because requester is admin. |
k_EResultContentVersion | 47 | A Version mismatch in content transmitted within the Steam protocol. |
k_EResultTryAnotherCM | 48 | The current CM can't service the user making a request, user should try another. |
k_EResultPasswordRequiredToKickSession | 49 | You are already logged in elsewhere, this cached credential login has failed. |
k_EResultAlreadyLoggedInElsewhere | 50 | The user is logged in elsewhere. (Use k_EResultLoggedInElsewhere instead!) |
k_EResultSuspended | 51 | Long running operation has suspended/paused. (eg. content download.) |
k_EResultCancelled | 52 | Operation has been canceled, typically by user. (eg. a content download.) |
k_EResultDataCorruption | 53 | Operation canceled because data is ill formed or unrecoverable. |
k_EResultDiskFull | 54 | Operation canceled - not enough disk space. |
k_EResultRemoteCallFailed | 55 | The remote or IPC call has failed. |
k_EResultPasswordUnset | 56 | Password could not be verified as it's unset server side. |
k_EResultExternalAccountUnlinked | 57 | External account (PSN, Facebook...) is not linked to a Steam account. |
k_EResultPSNTicketInvalid | 58 | PSN ticket was invalid. |
k_EResultExternalAccountAlreadyLinked | 59 | External account (PSN, Facebook...) is already linked to some other account, must explicitly request to replace/delete the link first. |
k_EResultRemoteFileConflict | 60 | The sync cannot resume due to a conflict between the local and remote files. |
k_EResultIllegalPassword | 61 | The requested new password is not allowed. |
k_EResultSameAsPreviousValue | 62 | New value is the same as the old one. This is used for secret question and answer. |
k_EResultAccountLogonDenied | 63 | Account login denied due to 2nd factor authentication failure. |
k_EResultCannotUseOldPassword | 64 | The requested new password is not legal. |
k_EResultInvalidLoginAuthCode | 65 | Account login denied due to auth code invalid. |
k_EResultAccountLogonDeniedNoMail | 66 | Account login denied due to 2nd factor auth failure - and no mail has been sent. |
k_EResultHardwareNotCapableOfIPT | 67 | The users hardware does not support Intel's Identity Protection Technology (IPT). |
k_EResultIPTInitError | 68 | Intel's Identity Protection Technology (IPT) has failed to initialize. |
k_EResultParentalControlRestricted | 69 | Operation failed due to parental control restrictions for current user. |
k_EResultFacebookQueryError | 70 | Facebook query returned an error. |
k_EResultExpiredLoginAuthCode | 71 | Account login denied due to an expired auth code. |
k_EResultIPLoginRestrictionFailed | 72 | The login failed due to an IP restriction. |
k_EResultAccountLockedDown | 73 | The current users account is currently locked for use. This is likely due to a hijacking and pending ownership verification. |
k_EResultAccountLogonDeniedVerifiedEmailRequired | 74 | The logon failed because the accounts email is not verified. |
k_EResultNoMatchingURL | 75 | There is no URL matching the provided values. |
k_EResultBadResponse | 76 | Bad Response due to a Parse failure, missing field, etc. |
k_EResultRequirePasswordReEntry | 77 | The user cannot complete the action until they re-enter their password. |
k_EResultValueOutOfRange | 78 | The value entered is outside the acceptable range. |
k_EResultUnexpectedError | 79 | Something happened that we didn't expect to ever happen. |
k_EResultDisabled | 80 | The requested service has been configured to be unavailable. |
k_EResultInvalidCEGSubmission | 81 | The files submitted to the CEG server are not valid. |
k_EResultRestrictedDevice | 82 | The device being used is not allowed to perform this action. |
k_EResultRegionLocked | 83 | The action could not be complete because it is region restricted. |
k_EResultRateLimitExceeded | 84 | Temporary rate limit exceeded, try again later, different from k_EResultLimitExceeded which may be permanent. |
k_EResultAccountLoginDeniedNeedTwoFactor | 85 | Need two-factor code to login. |
k_EResultItemDeleted | 86 | The thing we're trying to access has been deleted. |
k_EResultAccountLoginDeniedThrottle | 87 | Login attempt failed, try to throttle response to possible attacker. |
k_EResultTwoFactorCodeMismatch | 88 | Two factor authentication (Steam Guard) code is incorrect. |
k_EResultTwoFactorActivationCodeMismatch | 89 | The activation code for two-factor authentication (Steam Guard) didn't match. |
k_EResultAccountAssociatedToMultiplePartners | 90 | The current account has been associated with multiple partners. |
k_EResultNotModified | 91 | The data has not been modified. |
k_EResultNoMobileDevice | 92 | The account does not have a mobile device associated with it. |
k_EResultTimeNotSynced | 93 | The time presented is out of range or tolerance. |
k_EResultSmsCodeFailed | 94 | SMS code failure - no match, none pending, etc. |
k_EResultAccountLimitExceeded | 95 | Too many accounts access this resource. |
k_EResultAccountActivityLimitExceeded | 96 | Too many changes to this account. |
k_EResultPhoneActivityLimitExceeded | 97 | Too many changes to this phone. |
k_EResultRefundToWallet | 98 | Cannot refund to payment method, must use wallet. |
k_EResultEmailSendFailure | 99 | Cannot send an email. |
k_EResultNotSettled | 100 | Can't perform operation until payment has settled. |
k_EResultNeedCaptcha | 101 | The user needs to provide a valid captcha. |
k_EResultGSLTDenied | 102 | A game server login token owned by this token's owner has been banned. |
k_EResultGSOwnerDenied | 103 | Game server owner is denied for some other reason such as account locked, community ban, vac ban, missing phone, etc. |
k_EResultInvalidItemType | 104 | The type of thing we were requested to act on is invalid. |
k_EResultIPBanned | 105 | The IP address has been banned from taking this action. |
k_EResultGSLTExpired | 106 | This Game Server Login Token (GSLT) has expired from disuse; it can be reset for use. |
k_EResultInsufficientFunds | 107 | user doesn't have enough wallet funds to complete the action |
k_EResultTooManyPending | 108 | There are too many of this thing pending already |
ESteamUserStatType
Fields used internally to store user stats.
Name | Value | Description |
k_ESteamUserStatTypeINVALID | 0 | Invalid. |
k_ESteamUserStatTypeINT | 1 | 32-bit int stat. |
k_ESteamUserStatTypeFLOAT | 2 | 32-bit float stat. |
k_ESteamUserStatTypeAVGRATE | 3 | Read as FLOAT, set with count / session length. |
k_ESteamUserStatTypeACHIEVEMENTS | 4 | Standard user achievement. |
k_ESteamUserStatTypeGROUPACHIEVEMENTS | 5 | Deprecated. |
k_ESteamUserStatTypeMAX | 6 | Total number of user stat types, used for sanity checks. |
ETextFilteringContext
Parameter to
ISteamUtils::FilterText.
Name | Value | Description |
k_ETextFilteringContextUnknown | 0 | Unknown context. |
k_ETextFilteringContextGameContent | 1 | Game content, only legally required filtering is performed. |
k_ETextFilteringContextChat | 2 | Chat from another player. |
k_ETextFilteringContextName | 3 | Character or item name. |
EUniverse
Steam universes. Each universe is a self-contained Steam instance.
Name | Value | Description |
k_EUniverseInvalid | 0 | Invalid. |
k_EUniversePublic | 1 | The standard public universe. |
k_EUniverseBeta | 2 | Beta universe used inside Valve. |
k_EUniverseInternal | 3 | Internal universe used inside Valve. |
k_EUniverseDev | 4 | Dev universe used inside Valve. |
k_EUniverseMax | 5 | Total number of universes, used for sanity checks. |
EUserHasLicenseForAppResult
Result of
ISteamUser::UserHasLicenseForApp.
Name | Value | Description |
k_EUserHasLicenseResultHasLicense | 0 | The user has a license for specified app. |
k_EUserHasLicenseResultDoesNotHaveLicense | 1 | The user does not have a license for the specified app. |
k_EUserHasLicenseResultNoAuth | 2 | The user has not been authenticated. |
EVoiceResult
Results for use with the
Steam Voice functions.
Name | Value | Description |
k_EVoiceResultOK | 0 | The call has completed successfully. |
k_EVoiceResultNotInitialized | 1 | The Steam Voice interface has not been initialized. |
k_EVoiceResultNotRecording | 2 | Steam Voice is not currently recording. |
k_EVoiceResultNoData | 3 | There is no voice data available. |
k_EVoiceResultBufferTooSmall | 4 | The provided buffer is too small to receive the data. |
k_EVoiceResultDataCorrupted | 5 | The voice data has been corrupted. |
k_EVoiceResultRestricted | 6 | The user is chat restricted. |
k_EVoiceResultUnsupportedCodec | 7 | Deprecated. |
k_EVoiceResultReceiverOutOfDate | 8 | Deprecated. |
k_EVoiceResultReceiverDidNotAnswer | 9 | Deprecated. |
EVRHMDType
Code points for VR HMD vendors and models. Use the special functions BIsOculusHMD and BIsViveHMD to check for a specific brand.
Name | Value | Description |
k_eEVRHMDType_None | -1 | Unknown vendor and model. |
k_eEVRHMDType_Unknown | 0 | Unknown vendor and model. |
k_eEVRHMDType_HTC_Dev | 1 | Original HTC dev kits. |
k_eEVRHMDType_HTC_VivePre | 2 | HTC Vive Pre dev kits. |
k_eEVRHMDType_HTC_Vive | 3 | HTC Vive Consumer Release. |
k_eEVRHMDType_HTC_Unknown | 20 | Unknown HTC HMD. |
k_eEVRHMDType_Oculus_DK1 | 21 | Oculus Rift Development Kit 1. |
k_eEVRHMDType_Oculus_DK2 | 22 | Oculus Rift Development Kit 2 |
k_eEVRHMDType_Oculus_Rift | 23 | Oculus Rift Consumer Version 1. |
k_eEVRHMDType_Oculus_Unknown | 40 | Unknown Oculus HMD. |
Typedefs
These are typedefs which are defined for use with steam_api.
Name | Base type | Description |
AccountID_t | uint32 | This is used internally in CSteamID to represent a specific user account without caring about what steam universe it's in. |
AppId_t | uint32 | Unique identifier for an app. For more information see the Applications documentation. |
AssetClassId_t | uint64 | Only used internally in Steam. |
BREAKPAD_HANDLE | void * | Used by the internal Steam crash handler interfaces to reference particular installed crash handlers. |
BundleId_t | uint32 | Unique identifier for a bundle. (Only used internally in Steam.) |
CellID_t | uint32 | Only used internally in Steam. |
DepotId_t | uint32 | Unique identifier for a depot. |
GID_t | uint64 | Only used internally in Steam. |
HAuthTicket | uint32 | Handle to an user authentication ticket. Return type of ISteamUser::GetAuthSessionTicket. |
int16 | short | Steam's version of a 16-bit integer, equivalent to int16_t. |
int32 | int | Steam's version of a 32-bit integer, equivalent to int32_t. |
int64 | long long | Steam's version of a 64-bit integer, equivalent to int64_t. |
int8 | signed char | Steam's version of a 8-bit integer, equivalent to int8_t. |
intp | int/long long | Steam's version of a signed type that can hold a pointer, equivalent to intptr_t. (Only used internally in Steam.) |
JobID_t | uint64 | Only used internally in Steam. |
lint64 | long int | Only used internally in Steam. |
ManifestId_t | uint64 | Only used internally in Steam. |
PackageId_t | uint32 | Only used internally in Steam. |
PartnerId_t | uint32 | Only used internally in Steam. |
PhysicalItemId_t | uint32 | Only used internally in Steam. |
RTime32 | uint32 | Steam's version of Unix epoch time. It offers 1 second resolution starting from the epoch, 1970-01-01 00:00:00 +0000 (UTC) |
SteamAPICall_t | uint64 | Unique handle to a Steam API call. If a function returns one of these you must track its status by using the Call Result system. |
TxnID_t | GID_t | Only used internally in Steam. |
uint16 | unsigned short | Steam's version of a 16-bit unsigned integer, equivalent to uint16_t. |
uint32 | unsigned int | Steam's version of a 32-bit unsigned integer, equivalent to uint32_t. |
uint64 | unsigned long long | Steam's version of a 64-bit unsigned integer, equivalent to uint64_t. |
uint8 | unsigned char | Steam's version of a 8-bit unsigned integer, equivalent to uint8_t. |
uintp | unsigned int/unsigned long long | Steam's version of an unsigned type that can hold a pointer, equivalent to uintptr_t. (Only used internally in Steam.) |
ulint64 | unsigned long int | Only used internally in Steam. |
Constants
These are constants which are defined for use with steam_api.
Name | Type | Value | Description |
BREAKPAD_INVALID_HANDLE | int | (BREAKPAD_HANDLE)0 | |
k_cubSaltSize | int | 8 | Only used internally in Steam. |
k_GIDNil | GID_t | 0xffffffffffffffffull | Only used internally in Steam. |
k_HAuthTicketInvalid | HAuthTicket | 0 | An invalid user authentication ticket. |
k_JobIDNil | JobID_t | 0xffffffffffffffffull | Only used internally in Steam. |
k_steamIDLanModeGS | int | CSteamID( | This Steam ID comes from a user game connection to an sv_lan GS |
k_steamIDNil | int | CSteamID() | Generic invalid CSteamID. |
k_steamIDNonSteamGS | int | CSteamID( | This Steam ID can come from a user game connection to a GS that isn't using the steam authentication system but still wants to support the "Join Game" option in the friends list |
k_steamIDNotInitYetGS | int | CSteamID( | This Steam ID can come from a user game connection to a GS that has just booted but hasnt yet even initialized its steam3 component and started logging on. |
k_steamIDOutofDateGS | int | CSteamID( | This Steam ID comes from a user game connection to an out of date GS that hasnt implemented the protocol to provide its Steam ID |
k_TxnIDNil | GID_t | k_GIDNil | Only used internally in Steam. |
k_TxnIDUnknown | GID_t | 0 | Only used internally in Steam. |
k_uAPICallInvalid | SteamAPICall_t | 0x0 | An Invalid Steam API Call handle. |
k_uAppIdInvalid | AppId_t | 0x0 | An Invalid App ID. |
k_uBundleIdInvalid | BundleId_t | 0 | Only used internally in Steam. |
k_uCellIDInvalid | CellID_t | 0xFFFFFFFF | Only used internally in Steam. |
k_uDepotIdInvalid | DepotId_t | 0x0 | An Invalid Depot ID. |
k_ulAssetClassIdInvalid | AssetClassId_t | 0x0 | Only used internally in Steam. |
k_uManifestIdInvalid | ManifestId_t | 0 | Only used internally in Steam. |
k_unSteamAccountIDMask | unsigned int | 0xFFFFFFFF | Used in CSteamID to mask out the AccountID_t. |
k_unSteamAccountInstanceMask | unsigned int | 0x000FFFFF | Used in CSteamID to mask out the account instance. |
k_unSteamUserConsoleInstance | unsigned int | 2 | Used by CSteamID to identify users logged in from a console. |
k_unSteamUserDesktopInstance | unsigned int | 1 | Used by CSteamID to identify users logged in from the desktop client. |
k_unSteamUserWebInstance | unsigned int | 4 | Used by CSteamID to identify users logged in from the web. |
k_uPackageIdFreeSub | PackageId_t | 0x0 | Only used internally in Steam. |
k_uPackageIdInvalid | PackageId_t | 0xFFFFFFFF | Only used internally in Steam. |
k_uPartnerIdInvalid | PartnerId_t | 0 | Only used internally in Steam. |
k_uPhysicalItemIdInvalid | PhysicalItemId_t | 0x0 | Only used internally in Steam. |
QUERY_PORT_ERROR | int | 0xFFFE | We were unable to get the query port for this server. |
QUERY_PORT_NOT_INITIALIZED | int | 0xFFFF | ----------------------------------------------------------------------------- Constants used for query ports. ----------------------------------------------------------------------------- We haven't asked the GS for this query port's actual value yet. |