Steamworks Documentation
ISteamAppTicket Interface
Interface to get app ownership data. This is used by the Steam DRM wrapper to let it ask about ownership with greater confidence.

This should never be needed in most cases.


NOTE: ISteamAppTicket does not expose a global accessor function. You must access it through ISteamClient::GetISteamGenericInterface.


uint32 GetAppOwnershipTicketData( uint32 nAppID, void *pvBuffer, uint32 cbBufferLength, uint32 *piAppId, uint32 *piSteamId, uint32 *piSignature, uint32 *pcbSignature );
nAppIDuint32The app ID to get the ticket data for.
pvBuffervoid *The raw buffer where the ownership ticket data will be copied into.
cbBufferLengthuint32This should be the length of pvBuffer.
piAppIduint32 *Returns an offset to get the app ID out of the buffer.
piSteamIduint32 *Returns an offset to get the Steam ID out of the buffer.
piSignatureuint32 *Returns an offset to get the signature out of the buffer.
pcbSignatureuint32 *Returns the length of the signature.

Hand out a reasonable "future proof" view of an app ownership ticket for a given app ID.

Returns: uint32
The amount of bytes copied into pvBuffer or 0 if the buffer was too small.

void GetAppOwnershipTicketDataExample() { ISteamAppTicket* SteamAppTicket = (ISteamAppTicket*)SteamClient()->GetISteamGenericInterface( SteamAPI_GetHSteamUser(), SteamAPI_GetHSteamPipe(), STEAMAPPTICKET_INTERFACE_VERSION ); const int k_bufferLength = 256; const int k_signatureLength = 128; char buffer[k_bufferLength]; uint32 iAppID; uint32 iSteamID; uint32 iSignature; uint32 cbSignature; uint32 ret = SteamAppTicket->GetAppOwnershipTicketData( 480, buffer, k_bufferLength, &iAppID, &iSteamID, &iSignature, &cbSignature ); printf( "ret: %d\n", ret ); if( ret > 0 ) { printf( "iAppID offset: %d\n", iAppID ); printf( "iSteamID offset: %d\n", iSteamID ); printf( "iSignature offset: %d\n", iSignature ); printf( "cbSignature length: %d\n\n", cbSignature ); AppId_t appID; memcpy( &appID, &buffer[iAppID], sizeof(AppId_t) ); printf( "App ID: %d\n", appID); CSteamID steamID; memcpy( &steamID, &buffer[iSteamID], sizeof(CSteamID) ); printf( "Steam ID: %lld\n", steamID.ConvertToUint64() ); char signature[k_signatureLength]; memcpy_s( signature, k_signatureLength, &buffer[iSignature], cbSignature ); } }


These are constants which are defined for use with ISteamAppTicket.