public IntPtr GetISteamGameServer(HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringToNative))] string pchVersion) { var returnValue = _GetISteamGameServer(Self, hSteamUser, hSteamPipe, pchVersion); return(returnValue); }
internal static bool Init() { HSteamUser hSteamUser = SteamAPI.GetHSteamUser(); HSteamPipe hSteamPipe = SteamAPI.GetHSteamPipe(); if (hSteamPipe == (HSteamPipe)0) { return(false); } using (InteropHelp.UTF8StringHandle ver = new InteropHelp.UTF8StringHandle("SteamClient020")) { m_pSteamClient = NativeMethods.SteamInternal_CreateInterface(ver); } if (m_pSteamClient == IntPtr.Zero) { return(false); } m_pSteamUser = SteamClient.GetISteamUser(hSteamUser, hSteamPipe, "SteamUser021"); if (m_pSteamUser == IntPtr.Zero) { return(false); } m_pSteamFriends = SteamClient.GetISteamFriends(hSteamUser, hSteamPipe, "SteamFriends017"); if (m_pSteamFriends == IntPtr.Zero) { return(false); } m_pSteamUtils = SteamClient.GetISteamUtils(hSteamPipe, "SteamUtils009"); if (m_pSteamUtils == IntPtr.Zero) { return(false); } m_pSteamMatchmaking = SteamClient.GetISteamMatchmaking(hSteamUser, hSteamPipe, "SteamMatchMaking009"); if (m_pSteamMatchmaking == IntPtr.Zero) { return(false); } m_pSteamMatchmakingServers = SteamClient.GetISteamMatchmakingServers(hSteamUser, hSteamPipe, "SteamMatchMakingServers002"); if (m_pSteamMatchmakingServers == IntPtr.Zero) { return(false); } m_pSteamUserStats = SteamClient.GetISteamUserStats(hSteamUser, hSteamPipe, "STEAMUSERSTATS_INTERFACE_VERSION012"); if (m_pSteamUserStats == IntPtr.Zero) { return(false); } m_pSteamApps = SteamClient.GetISteamApps(hSteamUser, hSteamPipe, "STEAMAPPS_INTERFACE_VERSION008"); if (m_pSteamApps == IntPtr.Zero) { return(false); } m_pSteamNetworking = SteamClient.GetISteamNetworking(hSteamUser, hSteamPipe, "SteamNetworking006"); if (m_pSteamNetworking == IntPtr.Zero) { return(false); } m_pSteamRemoteStorage = SteamClient.GetISteamRemoteStorage(hSteamUser, hSteamPipe, "STEAMREMOTESTORAGE_INTERFACE_VERSION014"); if (m_pSteamRemoteStorage == IntPtr.Zero) { return(false); } m_pSteamScreenshots = SteamClient.GetISteamScreenshots(hSteamUser, hSteamPipe, "STEAMSCREENSHOTS_INTERFACE_VERSION003"); if (m_pSteamScreenshots == IntPtr.Zero) { return(false); } m_pSteamGameSearch = SteamClient.GetISteamGameSearch(hSteamUser, hSteamPipe, "SteamMatchGameSearch001"); if (m_pSteamGameSearch == IntPtr.Zero) { return(false); } m_pSteamHTTP = SteamClient.GetISteamHTTP(hSteamUser, hSteamPipe, "STEAMHTTP_INTERFACE_VERSION003"); if (m_pSteamHTTP == IntPtr.Zero) { return(false); } m_pController = SteamClient.GetISteamController(hSteamUser, hSteamPipe, "SteamController007"); if (m_pController == IntPtr.Zero) { return(false); } m_pSteamUGC = SteamClient.GetISteamUGC(hSteamUser, hSteamPipe, "STEAMUGC_INTERFACE_VERSION014"); if (m_pSteamUGC == IntPtr.Zero) { return(false); } m_pSteamAppList = SteamClient.GetISteamAppList(hSteamUser, hSteamPipe, "STEAMAPPLIST_INTERFACE_VERSION001"); if (m_pSteamAppList == IntPtr.Zero) { return(false); } m_pSteamMusic = SteamClient.GetISteamMusic(hSteamUser, hSteamPipe, "STEAMMUSIC_INTERFACE_VERSION001"); if (m_pSteamMusic == IntPtr.Zero) { return(false); } m_pSteamMusicRemote = SteamClient.GetISteamMusicRemote(hSteamUser, hSteamPipe, "STEAMMUSICREMOTE_INTERFACE_VERSION001"); if (m_pSteamMusicRemote == IntPtr.Zero) { return(false); } m_pSteamHTMLSurface = SteamClient.GetISteamHTMLSurface(hSteamUser, hSteamPipe, "STEAMHTMLSURFACE_INTERFACE_VERSION_005"); if (m_pSteamHTMLSurface == IntPtr.Zero) { return(false); } m_pSteamInventory = SteamClient.GetISteamInventory(hSteamUser, hSteamPipe, "STEAMINVENTORY_INTERFACE_V003"); if (m_pSteamInventory == IntPtr.Zero) { return(false); } m_pSteamVideo = SteamClient.GetISteamVideo(hSteamUser, hSteamPipe, "STEAMVIDEO_INTERFACE_V002"); if (m_pSteamVideo == IntPtr.Zero) { return(false); } m_pSteamParentalSettings = SteamClient.GetISteamParentalSettings(hSteamUser, hSteamPipe, "STEAMPARENTALSETTINGS_INTERFACE_VERSION001"); if (m_pSteamParentalSettings == IntPtr.Zero) { return(false); } m_pSteamInput = SteamClient.GetISteamInput(hSteamUser, hSteamPipe, "SteamInput001"); if (m_pSteamInput == IntPtr.Zero) { return(false); } m_pSteamParties = SteamClient.GetISteamParties(hSteamUser, hSteamPipe, "SteamParties002"); if (m_pSteamParties == IntPtr.Zero) { return(false); } m_pSteamRemotePlay = SteamClient.GetISteamRemotePlay(hSteamUser, hSteamPipe, "STEAMREMOTEPLAY_INTERFACE_VERSION001"); if (m_pSteamRemotePlay == IntPtr.Zero) { return(false); } using (InteropHelp.UTF8StringHandle pszVersion = new InteropHelp.UTF8StringHandle("SteamNetworkingUtils003")) { m_pSteamNetworkingUtils = ((NativeMethods.SteamInternal_FindOrCreateUserInterface(hSteamUser, pszVersion) != IntPtr.Zero) ? NativeMethods.SteamInternal_FindOrCreateUserInterface(hSteamUser, pszVersion) : NativeMethods.SteamInternal_FindOrCreateGameServerInterface(hSteamUser, pszVersion)); } if (m_pSteamNetworkingUtils == IntPtr.Zero) { return(false); } using (InteropHelp.UTF8StringHandle pszVersion2 = new InteropHelp.UTF8StringHandle("SteamNetworkingSockets008")) { m_pSteamNetworkingSockets = NativeMethods.SteamInternal_FindOrCreateUserInterface(hSteamUser, pszVersion2); } if (m_pSteamNetworkingSockets == IntPtr.Zero) { return(false); } return(true); }
/// <summary> /// <para> removes an allocated user</para> /// <para> NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling</para> /// </summary> public static void ReleaseUser(HSteamPipe hSteamPipe, HSteamUser hUser) { InteropHelp.TestIfAvailableGameServer(); NativeMethods.ISteamClient_ReleaseUser(CSteamGameServerAPIContext.GetSteamClient(), hSteamPipe, hUser); }
public void ReleaseUser(HSteamPipe hSteamPipe, HSteamUser hUser) { _ReleaseUser(Self, hSteamPipe, hUser); }
/// removes an allocated user /// NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling public static void ReleaseUser(HSteamPipe hSteamPipe, HSteamUser hUser) { }
/// returns the a generic interface public static IntPtr GetISteamGenericInterface(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) { return(IntPtr.Zero); }
internal static FailureReason Init() { HSteamUser hSteamUser = SteamAPI.GetHSteamUser(); HSteamPipe hSteamPipe = SteamAPI.GetHSteamPipe(); var failureReason = FailureReason.None; if (hSteamPipe == (HSteamPipe)0) { failureReason |= FailureReason.hSteamPipe; } using (var pchVersionString = new InteropHelp.UTF8StringHandle(Constants.STEAMCLIENT_INTERFACE_VERSION)) { m_pSteamClient = NativeMethods.SteamInternal_CreateInterface(pchVersionString); } if (m_pSteamClient == IntPtr.Zero) { failureReason |= FailureReason.m_pSteamClient; } m_pSteamUser = SteamClient.GetISteamUser(hSteamUser, hSteamPipe, Constants.STEAMUSER_INTERFACE_VERSION); if (m_pSteamUser == IntPtr.Zero) { failureReason |= FailureReason.m_pSteamUser; } m_pSteamFriends = SteamClient.GetISteamFriends(hSteamUser, hSteamPipe, Constants.STEAMFRIENDS_INTERFACE_VERSION); if (m_pSteamFriends == IntPtr.Zero) { failureReason |= FailureReason.m_pSteamFriends; } m_pSteamUtils = SteamClient.GetISteamUtils(hSteamPipe, Constants.STEAMUTILS_INTERFACE_VERSION); if (m_pSteamUtils == IntPtr.Zero) { failureReason |= FailureReason.m_pSteamUtils; } m_pSteamMatchmaking = SteamClient.GetISteamMatchmaking(hSteamUser, hSteamPipe, Constants.STEAMMATCHMAKING_INTERFACE_VERSION); if (m_pSteamMatchmaking == IntPtr.Zero) { failureReason |= FailureReason.m_pSteamMatchmaking; } m_pSteamMatchmakingServers = SteamClient.GetISteamMatchmakingServers(hSteamUser, hSteamPipe, Constants.STEAMMATCHMAKINGSERVERS_INTERFACE_VERSION); if (m_pSteamMatchmakingServers == IntPtr.Zero) { failureReason |= FailureReason.m_pSteamMatchmakingServers; } m_pSteamUserStats = SteamClient.GetISteamUserStats(hSteamUser, hSteamPipe, Constants.STEAMUSERSTATS_INTERFACE_VERSION); if (m_pSteamUserStats == IntPtr.Zero) { failureReason |= FailureReason.m_pSteamUserStats; } m_pSteamApps = SteamClient.GetISteamApps(hSteamUser, hSteamPipe, Constants.STEAMAPPS_INTERFACE_VERSION); if (m_pSteamApps == IntPtr.Zero) { failureReason |= FailureReason.m_pSteamApps; } m_pSteamNetworking = SteamClient.GetISteamNetworking(hSteamUser, hSteamPipe, Constants.STEAMNETWORKING_INTERFACE_VERSION); if (m_pSteamNetworking == IntPtr.Zero) { failureReason |= FailureReason.m_pSteamNetworking; } m_pSteamRemoteStorage = SteamClient.GetISteamRemoteStorage(hSteamUser, hSteamPipe, Constants.STEAMREMOTESTORAGE_INTERFACE_VERSION); if (m_pSteamRemoteStorage == IntPtr.Zero) { failureReason |= FailureReason.m_pSteamRemoteStorage; } m_pSteamScreenshots = SteamClient.GetISteamScreenshots(hSteamUser, hSteamPipe, Constants.STEAMSCREENSHOTS_INTERFACE_VERSION); if (m_pSteamScreenshots == IntPtr.Zero) { failureReason |= FailureReason.m_pSteamScreenshots; } m_pSteamGameSearch = SteamClient.GetISteamGameSearch(hSteamUser, hSteamPipe, Constants.STEAMGAMESEARCH_INTERFACE_VERSION); if (m_pSteamGameSearch == IntPtr.Zero) { failureReason |= FailureReason.m_pSteamGameSearch; } m_pSteamHTTP = SteamClient.GetISteamHTTP(hSteamUser, hSteamPipe, Constants.STEAMHTTP_INTERFACE_VERSION); if (m_pSteamHTTP == IntPtr.Zero) { failureReason |= FailureReason.m_pSteamHTTP; } m_pSteamUGC = SteamClient.GetISteamUGC(hSteamUser, hSteamPipe, Constants.STEAMUGC_INTERFACE_VERSION); if (m_pSteamUGC == IntPtr.Zero) { failureReason |= FailureReason.m_pSteamUGC; } m_pSteamAppList = SteamClient.GetISteamAppList(hSteamUser, hSteamPipe, Constants.STEAMAPPLIST_INTERFACE_VERSION); if (m_pSteamAppList == IntPtr.Zero) { failureReason |= FailureReason.m_pSteamAppList; } m_pSteamMusic = SteamClient.GetISteamMusic(hSteamUser, hSteamPipe, Constants.STEAMMUSIC_INTERFACE_VERSION); if (m_pSteamMusic == IntPtr.Zero) { failureReason |= FailureReason.m_pSteamMusic; } m_pSteamMusicRemote = SteamClient.GetISteamMusicRemote(hSteamUser, hSteamPipe, Constants.STEAMMUSICREMOTE_INTERFACE_VERSION); if (m_pSteamMusicRemote == IntPtr.Zero) { failureReason |= FailureReason.m_pSteamMusicRemote; } m_pSteamHTMLSurface = SteamClient.GetISteamHTMLSurface(hSteamUser, hSteamPipe, Constants.STEAMHTMLSURFACE_INTERFACE_VERSION); if (m_pSteamHTMLSurface == IntPtr.Zero) { failureReason |= FailureReason.m_pSteamHTMLSurface; } m_pSteamInventory = SteamClient.GetISteamInventory(hSteamUser, hSteamPipe, Constants.STEAMINVENTORY_INTERFACE_VERSION); if (m_pSteamInventory == IntPtr.Zero) { failureReason |= FailureReason.m_pSteamInventory; } m_pSteamVideo = SteamClient.GetISteamVideo(hSteamUser, hSteamPipe, Constants.STEAMVIDEO_INTERFACE_VERSION); if (m_pSteamVideo == IntPtr.Zero) { failureReason |= FailureReason.m_pSteamVideo; } m_pSteamParentalSettings = SteamClient.GetISteamParentalSettings(hSteamUser, hSteamPipe, Constants.STEAMPARENTALSETTINGS_INTERFACE_VERSION); if (m_pSteamParentalSettings == IntPtr.Zero) { failureReason |= FailureReason.m_pSteamParentalSettings; } m_pSteamInput = SteamClient.GetISteamInput(hSteamUser, hSteamPipe, Constants.STEAMINPUT_INTERFACE_VERSION); if (m_pSteamInput == IntPtr.Zero) { failureReason |= FailureReason.m_pSteamInput; } m_pSteamParties = SteamClient.GetISteamParties(hSteamUser, hSteamPipe, Constants.STEAMPARTIES_INTERFACE_VERSION); if (m_pSteamParties == IntPtr.Zero) { failureReason |= FailureReason.m_pSteamParties; } m_pSteamRemotePlay = SteamClient.GetISteamRemotePlay(hSteamUser, hSteamPipe, Constants.STEAMREMOTEPLAY_INTERFACE_VERSION); if (m_pSteamRemotePlay == IntPtr.Zero) { failureReason |= FailureReason.m_pSteamRemotePlay; } using (var pchVersionString = new InteropHelp.UTF8StringHandle(Constants.STEAMNETWORKINGUTILS_INTERFACE_VERSION)) { m_pSteamNetworkingUtils = NativeMethods.SteamInternal_FindOrCreateUserInterface(hSteamUser, pchVersionString) != IntPtr.Zero ? NativeMethods.SteamInternal_FindOrCreateUserInterface(hSteamUser, pchVersionString) : NativeMethods.SteamInternal_FindOrCreateGameServerInterface(hSteamUser, pchVersionString); } if (m_pSteamNetworkingUtils == IntPtr.Zero) { failureReason |= FailureReason.m_pSteamNetworkingUtils; } using (var pchVersionString = new InteropHelp.UTF8StringHandle(Constants.STEAMNETWORKINGSOCKETS_INTERFACE_VERSION)) { m_pSteamNetworkingSockets = NativeMethods.SteamInternal_FindOrCreateUserInterface(hSteamUser, pchVersionString); } if (m_pSteamNetworkingSockets == IntPtr.Zero) { failureReason |= FailureReason.m_pSteamNetworkingSockets; } using (var pchVersionString = new InteropHelp.UTF8StringHandle(Constants.STEAMNETWORKINGMESSAGES_INTERFACE_VERSION)) { m_pSteamNetworkingMessages = NativeMethods.SteamInternal_FindOrCreateUserInterface(hSteamUser, pchVersionString); } if (m_pSteamNetworkingMessages == IntPtr.Zero) { failureReason |= FailureReason.m_pSteamNetworkingMessages; } return(failureReason); }
/// inventory public static IntPtr GetISteamInventory(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion) { return(IntPtr.Zero); }
internal void ReleaseUser(HSteamPipe hSteamPipe, HSteamUser hUser) { _ReleaseUser(Self, hSteamPipe, hUser); }
internal static bool Init() { HSteamUser hSteamUser = GameServer.GetHSteamUser(); HSteamPipe hSteamPipe = GameServer.GetHSteamPipe(); if (hSteamPipe == (HSteamPipe)0) { return(false); } using (InteropHelp.UTF8StringHandle ver = new InteropHelp.UTF8StringHandle("SteamClient020")) { m_pSteamClient = NativeMethods.SteamInternal_CreateInterface(ver); } if (m_pSteamClient == IntPtr.Zero) { return(false); } m_pSteamGameServer = SteamGameServerClient.GetISteamGameServer(hSteamUser, hSteamPipe, "SteamGameServer013"); if (m_pSteamGameServer == IntPtr.Zero) { return(false); } m_pSteamUtils = SteamGameServerClient.GetISteamUtils(hSteamPipe, "SteamUtils009"); if (m_pSteamUtils == IntPtr.Zero) { return(false); } m_pSteamNetworking = SteamGameServerClient.GetISteamNetworking(hSteamUser, hSteamPipe, "SteamNetworking006"); if (m_pSteamNetworking == IntPtr.Zero) { return(false); } m_pSteamGameServerStats = SteamGameServerClient.GetISteamGameServerStats(hSteamUser, hSteamPipe, "SteamGameServerStats001"); if (m_pSteamGameServerStats == IntPtr.Zero) { return(false); } m_pSteamHTTP = SteamGameServerClient.GetISteamHTTP(hSteamUser, hSteamPipe, "STEAMHTTP_INTERFACE_VERSION003"); if (m_pSteamHTTP == IntPtr.Zero) { return(false); } m_pSteamInventory = SteamGameServerClient.GetISteamInventory(hSteamUser, hSteamPipe, "STEAMINVENTORY_INTERFACE_V003"); if (m_pSteamInventory == IntPtr.Zero) { return(false); } m_pSteamUGC = SteamGameServerClient.GetISteamUGC(hSteamUser, hSteamPipe, "STEAMUGC_INTERFACE_VERSION014"); if (m_pSteamUGC == IntPtr.Zero) { return(false); } m_pSteamApps = SteamGameServerClient.GetISteamApps(hSteamUser, hSteamPipe, "STEAMAPPS_INTERFACE_VERSION008"); if (m_pSteamApps == IntPtr.Zero) { return(false); } using (InteropHelp.UTF8StringHandle pszVersion = new InteropHelp.UTF8StringHandle("SteamNetworkingUtils003")) { m_pSteamNetworkingUtils = ((NativeMethods.SteamInternal_FindOrCreateUserInterface(hSteamUser, pszVersion) != IntPtr.Zero) ? NativeMethods.SteamInternal_FindOrCreateUserInterface(hSteamUser, pszVersion) : NativeMethods.SteamInternal_FindOrCreateGameServerInterface(hSteamUser, pszVersion)); } if (m_pSteamNetworkingUtils == IntPtr.Zero) { return(false); } using (InteropHelp.UTF8StringHandle pszVersion2 = new InteropHelp.UTF8StringHandle("SteamNetworkingSockets008")) { m_pSteamNetworkingSockets = NativeMethods.SteamInternal_FindOrCreateGameServerInterface(hSteamUser, pszVersion2); } if (m_pSteamNetworkingSockets == IntPtr.Zero) { return(false); } return(true); }
internal IntPtr GetISteamRemotePlay(HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringToNative))] string pchVersion) { var returnValue = _GetISteamRemotePlay(Self, hSteamUser, hSteamPipe, pchVersion); return(returnValue); }
private static extern IntPtr _GetISteamRemotePlay(IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringToNative))] string pchVersion);
public static IntPtr GetISteamMatchmakingServers(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) { InteropHelp.TestIfAvailableGameServer(); using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); return(NativeMethods.ISteamClient_GetISteamMatchmakingServers(CSteamGameServerAPIContext.GetSteamClient(), hSteamUser, hSteamPipe, pchVersion2)); }
/// game search public static IntPtr GetISteamGameSearch(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion) { return(IntPtr.Zero); }
// Exposes the ISteamUnifiedMessages interface public static IntPtr GetISteamUnifiedMessages(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion) { InteropHelp.TestIfAvailableClient(); return(NativeMethods.ISteamClient_GetISteamUnifiedMessages(hSteamuser, hSteamPipe, pchVersion)); }
/// Music Player Remote public static IntPtr GetISteamMusicRemote(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion) { return(IntPtr.Zero); }
// returns the a generic interface public static IntPtr GetISteamGenericInterface(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) { InteropHelp.TestIfAvailableClient(); return(NativeMethods.ISteamClient_GetISteamGenericInterface(hSteamUser, hSteamPipe, pchVersion)); }
/// Parental controls public static IntPtr GetISteamParentalSettings(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion) { return(IntPtr.Zero); }
/// <summary> /// <para> removes an allocated user</para> /// <para> NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling</para> /// </summary> public static void ReleaseUser(HSteamPipe hSteamPipe, HSteamUser hUser) { InteropHelp.TestIfAvailableClient(); NativeMethods.ISteamClient_ReleaseUser(hSteamPipe, hUser); }
/// returns the ISteamMatchmakingServers interface public static IntPtr GetISteamMatchmakingServers(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) { return(IntPtr.Zero); }
public static explicit operator int(HSteamUser that) => default; // 0x0000000180322710-0x00000001803232A0 public bool Equals(HSteamUser other) => default; // 0x0000000180016320-0x0000000180016330
/// returns the ISteamUserStats interface public static IntPtr GetISteamUserStats(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) { return(IntPtr.Zero); }
public bool Equals(HSteamUser other) => default; // 0x0000000180016320-0x0000000180016330 public int CompareTo(HSteamUser other) => default; // 0x000000018002AC90-0x000000018002ACA0
public static extern void _ReleaseUser(IntPtr self, HSteamPipe hSteamPipe, HSteamUser hUser);
internal static bool Init() { HSteamUser hSteamUser = SteamAPI.GetHSteamUser(); HSteamPipe hSteamPipe = SteamAPI.GetHSteamPipe(); if (hSteamPipe == (HSteamPipe)0) { return(false); } using (var pchVersionString = new InteropHelp.UTF8StringHandle(Constants.STEAMCLIENT_INTERFACE_VERSION)) { m_pSteamClient = NativeMethods.SteamInternal_CreateInterface(pchVersionString); } if (m_pSteamClient == IntPtr.Zero) { return(false); } m_pSteamUser = SteamClient.GetISteamUser(hSteamUser, hSteamPipe, Constants.STEAMUSER_INTERFACE_VERSION); if (m_pSteamUser == IntPtr.Zero) { return(false); } m_pSteamFriends = SteamClient.GetISteamFriends(hSteamUser, hSteamPipe, Constants.STEAMFRIENDS_INTERFACE_VERSION); if (m_pSteamFriends == IntPtr.Zero) { return(false); } m_pSteamUtils = SteamClient.GetISteamUtils(hSteamPipe, Constants.STEAMUTILS_INTERFACE_VERSION); if (m_pSteamUtils == IntPtr.Zero) { return(false); } m_pSteamMatchmaking = SteamClient.GetISteamMatchmaking(hSteamUser, hSteamPipe, Constants.STEAMMATCHMAKING_INTERFACE_VERSION); if (m_pSteamMatchmaking == IntPtr.Zero) { return(false); } m_pSteamMatchmakingServers = SteamClient.GetISteamMatchmakingServers(hSteamUser, hSteamPipe, Constants.STEAMMATCHMAKINGSERVERS_INTERFACE_VERSION); if (m_pSteamMatchmakingServers == IntPtr.Zero) { return(false); } m_pSteamUserStats = SteamClient.GetISteamUserStats(hSteamUser, hSteamPipe, Constants.STEAMUSERSTATS_INTERFACE_VERSION); if (m_pSteamUserStats == IntPtr.Zero) { return(false); } m_pSteamApps = SteamClient.GetISteamApps(hSteamUser, hSteamPipe, Constants.STEAMAPPS_INTERFACE_VERSION); if (m_pSteamApps == IntPtr.Zero) { return(false); } m_pSteamNetworking = SteamClient.GetISteamNetworking(hSteamUser, hSteamPipe, Constants.STEAMNETWORKING_INTERFACE_VERSION); if (m_pSteamNetworking == IntPtr.Zero) { return(false); } m_pSteamRemoteStorage = SteamClient.GetISteamRemoteStorage(hSteamUser, hSteamPipe, Constants.STEAMREMOTESTORAGE_INTERFACE_VERSION); if (m_pSteamRemoteStorage == IntPtr.Zero) { return(false); } m_pSteamScreenshots = SteamClient.GetISteamScreenshots(hSteamUser, hSteamPipe, Constants.STEAMSCREENSHOTS_INTERFACE_VERSION); if (m_pSteamScreenshots == IntPtr.Zero) { return(false); } m_pSteamGameSearch = SteamClient.GetISteamGameSearch(hSteamUser, hSteamPipe, Constants.STEAMGAMESEARCH_INTERFACE_VERSION); if (m_pSteamGameSearch == IntPtr.Zero) { return(false); } m_pSteamHTTP = SteamClient.GetISteamHTTP(hSteamUser, hSteamPipe, Constants.STEAMHTTP_INTERFACE_VERSION); if (m_pSteamHTTP == IntPtr.Zero) { return(false); } m_pController = SteamClient.GetISteamController(hSteamUser, hSteamPipe, Constants.STEAMCONTROLLER_INTERFACE_VERSION); if (m_pController == IntPtr.Zero) { return(false); } m_pSteamUGC = SteamClient.GetISteamUGC(hSteamUser, hSteamPipe, Constants.STEAMUGC_INTERFACE_VERSION); if (m_pSteamUGC == IntPtr.Zero) { return(false); } m_pSteamAppList = SteamClient.GetISteamAppList(hSteamUser, hSteamPipe, Constants.STEAMAPPLIST_INTERFACE_VERSION); if (m_pSteamAppList == IntPtr.Zero) { return(false); } m_pSteamMusic = SteamClient.GetISteamMusic(hSteamUser, hSteamPipe, Constants.STEAMMUSIC_INTERFACE_VERSION); if (m_pSteamMusic == IntPtr.Zero) { return(false); } m_pSteamMusicRemote = SteamClient.GetISteamMusicRemote(hSteamUser, hSteamPipe, Constants.STEAMMUSICREMOTE_INTERFACE_VERSION); if (m_pSteamMusicRemote == IntPtr.Zero) { return(false); } m_pSteamHTMLSurface = SteamClient.GetISteamHTMLSurface(hSteamUser, hSteamPipe, Constants.STEAMHTMLSURFACE_INTERFACE_VERSION); if (m_pSteamHTMLSurface == IntPtr.Zero) { return(false); } m_pSteamInventory = SteamClient.GetISteamInventory(hSteamUser, hSteamPipe, Constants.STEAMINVENTORY_INTERFACE_VERSION); if (m_pSteamInventory == IntPtr.Zero) { return(false); } m_pSteamVideo = SteamClient.GetISteamVideo(hSteamUser, hSteamPipe, Constants.STEAMVIDEO_INTERFACE_VERSION); if (m_pSteamVideo == IntPtr.Zero) { return(false); } m_pSteamParentalSettings = SteamClient.GetISteamParentalSettings(hSteamUser, hSteamPipe, Constants.STEAMPARENTALSETTINGS_INTERFACE_VERSION); if (m_pSteamParentalSettings == IntPtr.Zero) { return(false); } m_pSteamInput = SteamClient.GetISteamInput(hSteamUser, hSteamPipe, Constants.STEAMINPUT_INTERFACE_VERSION); if (m_pSteamInput == IntPtr.Zero) { return(false); } m_pSteamParties = SteamClient.GetISteamParties(hSteamUser, hSteamPipe, Constants.STEAMPARTIES_INTERFACE_VERSION); if (m_pSteamParties == IntPtr.Zero) { return(false); } m_pSteamRemotePlay = SteamClient.GetISteamRemotePlay(hSteamUser, hSteamPipe, Constants.STEAMREMOTEPLAY_INTERFACE_VERSION); if (m_pSteamRemotePlay == IntPtr.Zero) { return(false); } return(true); }
public static extern IntPtr _GetISteamGameServer(IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringToNative))] string pchVersion);
internal static bool Init() { HSteamUser hSteamUser = GameServer.GetHSteamUser(); HSteamPipe hSteamPipe = GameServer.GetHSteamPipe(); if (hSteamPipe == (HSteamPipe)0) { return(false); } using (var pchVersionString = new InteropHelp.UTF8StringHandle(Constants.STEAMCLIENT_INTERFACE_VERSION)) { m_pSteamClient = NativeMethods.SteamInternal_CreateInterface(pchVersionString); } if (m_pSteamClient == IntPtr.Zero) { return(false); } m_pSteamGameServer = SteamGameServerClient.GetISteamGameServer(hSteamUser, hSteamPipe, Constants.STEAMGAMESERVER_INTERFACE_VERSION); if (m_pSteamGameServer == IntPtr.Zero) { return(false); } m_pSteamUtils = SteamGameServerClient.GetISteamUtils(hSteamPipe, Constants.STEAMUTILS_INTERFACE_VERSION); if (m_pSteamUtils == IntPtr.Zero) { return(false); } m_pSteamNetworking = SteamGameServerClient.GetISteamNetworking(hSteamUser, hSteamPipe, Constants.STEAMNETWORKING_INTERFACE_VERSION); if (m_pSteamNetworking == IntPtr.Zero) { return(false); } m_pSteamGameServerStats = SteamGameServerClient.GetISteamGameServerStats(hSteamUser, hSteamPipe, Constants.STEAMGAMESERVERSTATS_INTERFACE_VERSION); if (m_pSteamGameServerStats == IntPtr.Zero) { return(false); } m_pSteamHTTP = SteamGameServerClient.GetISteamHTTP(hSteamUser, hSteamPipe, Constants.STEAMHTTP_INTERFACE_VERSION); if (m_pSteamHTTP == IntPtr.Zero) { return(false); } m_pSteamInventory = SteamGameServerClient.GetISteamInventory(hSteamUser, hSteamPipe, Constants.STEAMINVENTORY_INTERFACE_VERSION); if (m_pSteamInventory == IntPtr.Zero) { return(false); } m_pSteamUGC = SteamGameServerClient.GetISteamUGC(hSteamUser, hSteamPipe, Constants.STEAMUGC_INTERFACE_VERSION); if (m_pSteamUGC == IntPtr.Zero) { return(false); } m_pSteamApps = SteamGameServerClient.GetISteamApps(hSteamUser, hSteamPipe, Constants.STEAMAPPS_INTERFACE_VERSION); if (m_pSteamApps == IntPtr.Zero) { return(false); } return(true); }
public static IntPtr GetISteamMusicRemote(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion) { InteropHelp.TestIfAvailableClient(); using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); return(NativeMethods.ISteamClient_GetISteamMusicRemote(CSteamAPIContext.GetSteamClient(), hSteamuser, hSteamPipe, pchVersion2)); }
internal static bool Init() { HSteamUser hSteamUser = SteamAPI.GetHSteamUser(); HSteamPipe hSteamPipe = SteamAPI.GetHSteamPipe(); if (hSteamPipe == (HSteamPipe)0) { return(false); } using (var pchVersionString = new InteropHelp.UTF8StringHandle(Constants.STEAMCLIENT_INTERFACE_VERSION)) { m_pSteamClient = NativeMethods.SteamInternal_CreateInterface(pchVersionString); } if (m_pSteamClient == IntPtr.Zero) { return(false); } m_pSteamUser = SteamClient.GetISteamUser(hSteamUser, hSteamPipe, Constants.STEAMUSER_INTERFACE_VERSION); if (m_pSteamUser == IntPtr.Zero) { return(false); } m_pSteamFriends = SteamClient.GetISteamFriends(hSteamUser, hSteamPipe, Constants.STEAMFRIENDS_INTERFACE_VERSION); if (m_pSteamFriends == IntPtr.Zero) { return(false); } m_pSteamUtils = SteamClient.GetISteamUtils(hSteamPipe, Constants.STEAMUTILS_INTERFACE_VERSION); if (m_pSteamUtils == IntPtr.Zero) { return(false); } m_pSteamMatchmaking = SteamClient.GetISteamMatchmaking(hSteamUser, hSteamPipe, Constants.STEAMMATCHMAKING_INTERFACE_VERSION); if (m_pSteamMatchmaking == IntPtr.Zero) { return(false); } m_pSteamMatchmakingServers = SteamClient.GetISteamMatchmakingServers(hSteamUser, hSteamPipe, Constants.STEAMMATCHMAKINGSERVERS_INTERFACE_VERSION); if (m_pSteamMatchmakingServers == IntPtr.Zero) { return(false); } m_pSteamUserStats = SteamClient.GetISteamUserStats(hSteamUser, hSteamPipe, Constants.STEAMUSERSTATS_INTERFACE_VERSION); if (m_pSteamUserStats == IntPtr.Zero) { return(false); } m_pSteamApps = SteamClient.GetISteamApps(hSteamUser, hSteamPipe, Constants.STEAMAPPS_INTERFACE_VERSION); if (m_pSteamApps == IntPtr.Zero) { return(false); } m_pSteamNetworking = SteamClient.GetISteamNetworking(hSteamUser, hSteamPipe, Constants.STEAMNETWORKING_INTERFACE_VERSION); if (m_pSteamNetworking == IntPtr.Zero) { return(false); } m_pSteamRemoteStorage = SteamClient.GetISteamRemoteStorage(hSteamUser, hSteamPipe, Constants.STEAMREMOTESTORAGE_INTERFACE_VERSION); if (m_pSteamRemoteStorage == IntPtr.Zero) { return(false); } m_pSteamScreenshots = SteamClient.GetISteamScreenshots(hSteamUser, hSteamPipe, Constants.STEAMSCREENSHOTS_INTERFACE_VERSION); if (m_pSteamScreenshots == IntPtr.Zero) { return(false); } m_pSteamHTTP = SteamClient.GetISteamHTTP(hSteamUser, hSteamPipe, Constants.STEAMHTTP_INTERFACE_VERSION); if (m_pSteamHTTP == IntPtr.Zero) { return(false); } // Unified Messages are deprecated in latest Steamworks. Additionally, this API fails to initialize on Mac platforms. // If this problem should become evident on other platforms, it may be wise to remove this entire section of code for // those platforms (if not all) as well. #if !UNITY_EDITOR_OSX && !UNITY_STANDALONE_OSX m_pSteamUnifiedMessages = SteamClient.GetISteamUnifiedMessages(hSteamUser, hSteamPipe, Constants.STEAMUNIFIEDMESSAGES_INTERFACE_VERSION); if (m_pSteamUnifiedMessages == IntPtr.Zero) { return(false); } #endif m_pController = SteamClient.GetISteamController(hSteamUser, hSteamPipe, Constants.STEAMCONTROLLER_INTERFACE_VERSION); if (m_pController == IntPtr.Zero) { return(false); } m_pSteamUGC = SteamClient.GetISteamUGC(hSteamUser, hSteamPipe, Constants.STEAMUGC_INTERFACE_VERSION); if (m_pSteamUGC == IntPtr.Zero) { return(false); } m_pSteamAppList = SteamClient.GetISteamAppList(hSteamUser, hSteamPipe, Constants.STEAMAPPLIST_INTERFACE_VERSION); if (m_pSteamAppList == IntPtr.Zero) { return(false); } m_pSteamMusic = SteamClient.GetISteamMusic(hSteamUser, hSteamPipe, Constants.STEAMMUSIC_INTERFACE_VERSION); if (m_pSteamMusic == IntPtr.Zero) { return(false); } m_pSteamMusicRemote = SteamClient.GetISteamMusicRemote(hSteamUser, hSteamPipe, Constants.STEAMMUSICREMOTE_INTERFACE_VERSION); if (m_pSteamMusicRemote == IntPtr.Zero) { return(false); } m_pSteamHTMLSurface = SteamClient.GetISteamHTMLSurface(hSteamUser, hSteamPipe, Constants.STEAMHTMLSURFACE_INTERFACE_VERSION); if (m_pSteamHTMLSurface == IntPtr.Zero) { return(false); } m_pSteamInventory = SteamClient.GetISteamInventory(hSteamUser, hSteamPipe, Constants.STEAMINVENTORY_INTERFACE_VERSION); if (m_pSteamInventory == IntPtr.Zero) { return(false); } m_pSteamVideo = SteamClient.GetISteamVideo(hSteamUser, hSteamPipe, Constants.STEAMVIDEO_INTERFACE_VERSION); if (m_pSteamVideo == IntPtr.Zero) { return(false); } m_pSteamParentalSettings = SteamClient.GetISteamParentalSettings(hSteamUser, hSteamPipe, Constants.STEAMPARENTALSETTINGS_INTERFACE_VERSION); if (m_pSteamParentalSettings == IntPtr.Zero) { return(false); } return(true); }