PtrToStringUTF8() public static method

public static PtrToStringUTF8 ( IntPtr nativeUtf8 ) : string
nativeUtf8 System.IntPtr
return string
 /// <summary>
 /// <para> Get achievement name iAchievement in [0,GetNumAchievements)</para>
 /// </summary>
 public static string GetAchievementName(uint iAchievement)
 {
     InteropHelp.TestIfAvailableClient();
     return(InteropHelp.PtrToStringUTF8(NativeMethods.ISteamUserStats_GetAchievementName(iAchievement)));
 }
 /// <summary>
 /// <para>/ Get info about a configuration value.  Returns the name of the value,</para>
 /// <para>/ or NULL if the value doesn't exist.  Other output parameters can be NULL</para>
 /// <para>/ if you do not need them.</para>
 /// </summary>
 public static string GetConfigValueInfo(ESteamNetworkingConfigValue eValue, out ESteamNetworkingConfigDataType pOutDataType, out ESteamNetworkingConfigScope pOutScope)
 {
     InteropHelp.TestIfAvailableClient();
     return(InteropHelp.PtrToStringUTF8(NativeMethods.ISteamNetworkingUtils_GetConfigValueInfo(CSteamAPIContext.GetSteamNetworkingUtils(), eValue, out pOutDataType, out pOutScope)));
 }
 /// <summary>
 /// <para> Get a local path to art for on-screen glyph for a particular origin</para>
 /// </summary>
 public static string GetGlyphForActionOrigin(EControllerActionOrigin eOrigin)
 {
     InteropHelp.TestIfAvailableClient();
     return(InteropHelp.PtrToStringUTF8(NativeMethods.ISteamController_GetGlyphForActionOrigin(eOrigin)));
 }
 /// <summary>
 /// <para> Get a local path to art for on-screen glyph for a particular Xbox controller origin.</para>
 /// </summary>
 public static string GetGlyphForXboxOrigin(EXboxOrigin eOrigin)
 {
     InteropHelp.TestIfAvailableClient();
     return(InteropHelp.PtrToStringUTF8(NativeMethods.ISteamController_GetGlyphForXboxOrigin(CSteamAPIContext.GetSteamController(), eOrigin)));
 }
 public static string GetAvailableGameLanguages()
 {
     InteropHelp.TestIfAvailableClient();
     return(InteropHelp.PtrToStringUTF8(NativeMethods.ISteamApps_GetAvailableGameLanguages()));
 }
Beispiel #6
0
 private void InternalOnRulesResponded(IntPtr thisptr, IntPtr pchRule, IntPtr pchValue)
 {
     m_RulesResponded(InteropHelp.PtrToStringUTF8(pchRule), InteropHelp.PtrToStringUTF8(pchValue));
 }
Beispiel #7
0
 /// <summary>
 /// <para> returns the language the steam client is running in, you probably want ISteamApps::GetCurrentGameLanguage instead, this is for very special usage cases</para>
 /// </summary>
 public static string GetSteamUILanguage()
 {
     InteropHelp.TestIfAvailableGameServer();
     return(InteropHelp.PtrToStringUTF8(NativeMethods.ISteamGameServerUtils_GetSteamUILanguage()));
 }
 /// <summary>
 /// <para> returns the name another user - guaranteed to not be NULL.</para>
 /// <para> same rules as GetFriendPersonaState() apply as to whether or not the user knowns the name of the other user</para>
 /// <para> note that on first joining a lobby, chat room or game server the local user will not known the name of the other users automatically; that information will arrive asyncronously</para>
 /// </summary>
 public static string GetFriendPersonaName(CSteamID steamIDFriend)
 {
     InteropHelp.TestIfAvailableClient();
     return(InteropHelp.PtrToStringUTF8(NativeMethods.ISteamFriends_GetFriendPersonaName(steamIDFriend)));
 }
Beispiel #9
0
 /// <summary>
 /// <para> returns the 2 digit ISO 3166-1-alpha-2 format country code this client is running in (as looked up via an IP-to-location database)</para>
 /// <para> e.g "US" or "UK".</para>
 /// </summary>
 public static string GetIPCountry()
 {
     InteropHelp.TestIfAvailableClient();
     return(InteropHelp.PtrToStringUTF8(NativeMethods.ISteamUtils_GetIPCountry()));
 }
Beispiel #10
0
 public static string GetLobbyMemberData(CSteamID steamIDLobby, CSteamID steamIDUser, string pchKey)
 {
     InteropHelp.TestIfAvailableClient();
     using InteropHelp.UTF8StringHandle pchKey2 = new InteropHelp.UTF8StringHandle(pchKey);
     return(InteropHelp.PtrToStringUTF8(NativeMethods.ISteamMatchmaking_GetLobbyMemberData(CSteamAPIContext.GetSteamMatchmaking(), steamIDLobby, steamIDUser, pchKey2)));
 }
 // Returns nullptr if not generic string type
 public string GetGenericString()
 {
     return(InteropHelp.PtrToStringUTF8(NativeMethods.SteamAPI_SteamNetworkingIdentity_GetGenericString(ref this)));
 }
 /// <summary>
 /// <para> returns the local players name - guaranteed to not be NULL.</para>
 /// <para> this is the same name as on the users community profile page</para>
 /// <para> this is stored in UTF-8 format</para>
 /// <para> like all the other interface functions that return a char *, it's important that this pointer is not saved</para>
 /// <para> off; it will eventually be free'd or re-allocated</para>
 /// </summary>
 public static string GetPersonaName()
 {
     InteropHelp.TestIfAvailableClient();
     return(InteropHelp.PtrToStringUTF8(NativeMethods.ISteamFriends_GetPersonaName(CSteamAPIContext.GetSteamFriends())));
 }
 /// <summary>
 /// <para> accesses old friends names - returns an empty string when their are no more items in the history</para>
 /// </summary>
 public static string GetFriendPersonaNameHistory(CSteamID steamIDFriend, int iPersonaName)
 {
     InteropHelp.TestIfAvailableClient();
     return(InteropHelp.PtrToStringUTF8(NativeMethods.ISteamFriends_GetFriendPersonaNameHistory(CSteamAPIContext.GetSteamFriends(), steamIDFriend, iPersonaName)));
 }
 public static string GetClanTag(CSteamID steamIDClan)
 {
     InteropHelp.TestIfAvailableClient();
     return(InteropHelp.PtrToStringUTF8(NativeMethods.ISteamFriends_GetClanTag(steamIDClan)));
 }
Beispiel #15
0
 /// <summary>
 /// <para> Get a local path to a PNG file for the provided origin's glyph.</para>
 /// </summary>
 public static string GetGlyphPNGForActionOrigin(EInputActionOrigin eOrigin, ESteamInputGlyphSize eSize, uint unFlags)
 {
     InteropHelp.TestIfAvailableClient();
     return(InteropHelp.PtrToStringUTF8(NativeMethods.ISteamInput_GetGlyphPNGForActionOrigin(CSteamAPIContext.GetSteamInput(), eOrigin, eSize, unFlags)));
 }
 public static string GetFriendRichPresenceKeyByIndex(CSteamID steamIDFriend, int iKey)
 {
     InteropHelp.TestIfAvailableClient();
     return(InteropHelp.PtrToStringUTF8(NativeMethods.ISteamFriends_GetFriendRichPresenceKeyByIndex(steamIDFriend, iKey)));
 }
Beispiel #17
0
 /// <summary>
 /// <para> Returns a localized string (from Steam's language setting) for the specified origin.</para>
 /// </summary>
 public static string GetStringForActionOrigin(EInputActionOrigin eOrigin)
 {
     InteropHelp.TestIfAvailableClient();
     return(InteropHelp.PtrToStringUTF8(NativeMethods.ISteamInput_GetStringForActionOrigin(CSteamAPIContext.GetSteamInput(), eOrigin)));
 }
Beispiel #18
0
 private void InternalOnAddPlayerToList(IntPtr name, int nScore, float flTimePlayed)
 {
     _AddPlayerToList(InteropHelp.PtrToStringUTF8(name), nScore, flTimePlayed);
 }
Beispiel #19
0
 /// <summary>
 /// <para> Returns a localized string (from Steam's language setting) for the user-facing action name corresponding to the specified handle</para>
 /// </summary>
 public static string GetStringForAnalogActionName(InputAnalogActionHandle_t eActionHandle)
 {
     InteropHelp.TestIfAvailableClient();
     return(InteropHelp.PtrToStringUTF8(NativeMethods.ISteamInput_GetStringForAnalogActionName(CSteamAPIContext.GetSteamInput(), eActionHandle)));
 }
Beispiel #20
0
 public static string GetFileNameAndSize(int iFile, out int pnFileSizeInBytes)
 {
     InteropHelp.TestIfAvailableClient();
     return(InteropHelp.PtrToStringUTF8(NativeMethods.ISteamRemoteStorage_GetFileNameAndSize(iFile, out pnFileSizeInBytes)));
 }
Beispiel #21
0
 /// <summary>
 /// <para> Get the name of the session client device</para>
 /// <para> This returns NULL if the sessionID is not valid</para>
 /// </summary>
 public static string GetSessionClientName(RemotePlaySessionID_t unSessionID)
 {
     InteropHelp.TestIfAvailableClient();
     return(InteropHelp.PtrToStringUTF8(NativeMethods.ISteamRemotePlay_GetSessionClientName(CSteamAPIContext.GetSteamRemotePlay(), unSessionID)));
 }
 private void InternalOnAddPlayerToList(IntPtr thisptr, IntPtr pchName, int nScore, float flTimePlayed)
 {
     m_AddPlayerToList(InteropHelp.PtrToStringUTF8(pchName), nScore, flTimePlayed);
 }
 public static string GetAvailableGameLanguages()
 {
     InteropHelp.TestIfAvailableGameServer();
     return(InteropHelp.PtrToStringUTF8(NativeMethods.ISteamApps_GetAvailableGameLanguages(CSteamGameServerAPIContext.GetSteamApps())));
 }
Beispiel #24
0
 /// <summary>
 /// <para> returns the language the steam client is running in, you probably want ISteamApps::GetCurrentGameLanguage instead, this is for very special usage cases</para>
 /// </summary>
 public static string GetSteamUILanguage()
 {
     InteropHelp.TestIfAvailableClient();
     return(InteropHelp.PtrToStringUTF8(NativeMethods.ISteamUtils_GetSteamUILanguage(CSteamAPIContext.GetSteamUtils())));
 }
 /// <summary>
 /// <para> Returns nickname the current user has set for the specified player. Returns NULL if the no nickname has been set for that player.</para>
 /// </summary>
 public static string GetPlayerNickname(CSteamID steamIDPlayer)
 {
     InteropHelp.TestIfAvailableClient();
     return(InteropHelp.PtrToStringUTF8(NativeMethods.ISteamFriends_GetPlayerNickname(steamIDPlayer)));
 }
 /// <summary>
 /// <para> returns the 2 digit ISO 3166-1-alpha-2 format country code this client is running in (as looked up via an IP-to-location database)</para>
 /// <para> e.g "US" or "UK".</para>
 /// </summary>
 public static string GetIPCountry()
 {
     InteropHelp.TestIfAvailableGameServer();
     return(InteropHelp.PtrToStringUTF8(NativeMethods.ISteamUtils_GetIPCountry(CSteamGameServerAPIContext.GetSteamUtils())));
 }
 /// <summary>
 /// <para> returns the name for the given friends group (NULL in the case of invalid friends group IDs)</para>
 /// </summary>
 public static string GetFriendsGroupName(FriendsGroupID_t friendsGroupID)
 {
     InteropHelp.TestIfAvailableClient();
     return(InteropHelp.PtrToStringUTF8(NativeMethods.ISteamFriends_GetFriendsGroupName(friendsGroupID)));
 }
Beispiel #28
0
 /// <summary>
 /// <para> returns the name of a leaderboard</para>
 /// </summary>
 public static string GetLeaderboardName(SteamLeaderboard_t hSteamLeaderboard)
 {
     InteropHelp.TestIfAvailableClient();
     return(InteropHelp.PtrToStringUTF8(NativeMethods.ISteamUserStats_GetLeaderboardName(hSteamLeaderboard)));
 }
Beispiel #29
0
 public static string GetLaunchQueryParam(string pchKey)
 {
     InteropHelp.TestIfAvailableGameServer();
     using InteropHelp.UTF8StringHandle pchKey2 = new InteropHelp.UTF8StringHandle(pchKey);
     return(InteropHelp.PtrToStringUTF8(NativeMethods.ISteamApps_GetLaunchQueryParam(CSteamGameServerAPIContext.GetSteamApps(), pchKey2)));
 }