Clear interfaces and dangling pointers on steam shutdown

This commit is contained in:
Garry Newman 2019-05-10 14:08:17 +01:00
parent 69773bb033
commit f014681cc4
24 changed files with 763 additions and 0 deletions

View File

@ -43,6 +43,40 @@ namespace Steamworks
_GetLaunchCommandLine = Marshal.GetDelegateForFunctionPointer<FGetLaunchCommandLine>( Marshal.ReadIntPtr( VTable, 208) );
_BIsSubscribedFromFamilySharing = Marshal.GetDelegateForFunctionPointer<FBIsSubscribedFromFamilySharing>( Marshal.ReadIntPtr( VTable, 216) );
}
internal override void Shutdown()
{
base.Shutdown();
_BIsSubscribed = null;
_BIsLowViolence = null;
_BIsCybercafe = null;
_BIsVACBanned = null;
_GetCurrentGameLanguage = null;
_GetAvailableGameLanguages = null;
_BIsSubscribedApp = null;
_BIsDlcInstalled = null;
_GetEarliestPurchaseUnixTime = null;
_BIsSubscribedFromFreeWeekend = null;
_GetDLCCount = null;
_BGetDLCDataByIndex = null;
_InstallDLC = null;
_UninstallDLC = null;
_RequestAppProofOfPurchaseKey = null;
_GetCurrentBetaName = null;
_MarkContentCorrupt = null;
_GetInstalledDepots = null;
_GetAppInstallDir = null;
_BIsAppInstalled = null;
_GetAppOwner = null;
_GetAppOwner_Windows = null;
_GetLaunchQueryParam = null;
_GetDlcDownloadProgress = null;
_GetAppBuildId = null;
_RequestAllProofOfPurchaseKeys = null;
_GetFileDetails = null;
_GetLaunchCommandLine = null;
_BIsSubscribedFromFamilySharing = null;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]

View File

@ -94,6 +94,91 @@ namespace Steamworks
_IsClanOfficialGameGroup = Marshal.GetDelegateForFunctionPointer<FIsClanOfficialGameGroup>( Marshal.ReadIntPtr( VTable, 568) );
_GetNumChatsWithUnreadPriorityMessages = Marshal.GetDelegateForFunctionPointer<FGetNumChatsWithUnreadPriorityMessages>( Marshal.ReadIntPtr( VTable, 576) );
}
internal override void Shutdown()
{
base.Shutdown();
_GetPersonaName = null;
_SetPersonaName = null;
_GetPersonaState = null;
_GetFriendCount = null;
_GetFriendByIndex = null;
_GetFriendByIndex_Windows = null;
_GetFriendRelationship = null;
_GetFriendPersonaState = null;
_GetFriendPersonaName = null;
_GetFriendGamePlayed = null;
_GetFriendPersonaNameHistory = null;
_GetFriendSteamLevel = null;
_GetPlayerNickname = null;
_GetFriendsGroupCount = null;
_GetFriendsGroupIDByIndex = null;
_GetFriendsGroupName = null;
_GetFriendsGroupMembersCount = null;
_GetFriendsGroupMembersList = null;
_HasFriend = null;
_GetClanCount = null;
_GetClanByIndex = null;
_GetClanByIndex_Windows = null;
_GetClanName = null;
_GetClanTag = null;
_GetClanActivityCounts = null;
_DownloadClanActivityCounts = null;
_GetFriendCountFromSource = null;
_GetFriendFromSourceByIndex = null;
_GetFriendFromSourceByIndex_Windows = null;
_IsUserInSource = null;
_SetInGameVoiceSpeaking = null;
_ActivateGameOverlay = null;
_ActivateGameOverlayToUser = null;
_ActivateGameOverlayToWebPage = null;
_ActivateGameOverlayToStore = null;
_SetPlayedWith = null;
_ActivateGameOverlayInviteDialog = null;
_GetSmallFriendAvatar = null;
_GetMediumFriendAvatar = null;
_GetLargeFriendAvatar = null;
_RequestUserInformation = null;
_RequestClanOfficerList = null;
_GetClanOwner = null;
_GetClanOwner_Windows = null;
_GetClanOfficerCount = null;
_GetClanOfficerByIndex = null;
_GetClanOfficerByIndex_Windows = null;
_GetUserRestrictions = null;
_SetRichPresence = null;
_ClearRichPresence = null;
_GetFriendRichPresence = null;
_GetFriendRichPresenceKeyCount = null;
_GetFriendRichPresenceKeyByIndex = null;
_RequestFriendRichPresence = null;
_InviteUserToGame = null;
_GetCoplayFriendCount = null;
_GetCoplayFriend = null;
_GetCoplayFriend_Windows = null;
_GetFriendCoplayTime = null;
_GetFriendCoplayGame = null;
_JoinClanChatRoom = null;
_LeaveClanChatRoom = null;
_GetClanChatMemberCount = null;
_GetChatMemberByIndex = null;
_GetChatMemberByIndex_Windows = null;
_SendClanChatMessage = null;
_GetClanChatMessage = null;
_IsClanChatAdmin = null;
_IsClanChatWindowOpenInSteam = null;
_OpenClanChatWindowInSteam = null;
_CloseClanChatWindowInSteam = null;
_SetListenForFriendsMessages = null;
_ReplyToFriendMessage = null;
_GetFriendMessage = null;
_GetFollowerCount = null;
_IsFollowing = null;
_EnumerateFollowingList = null;
_IsClanPublic = null;
_IsClanOfficialGameGroup = null;
_GetNumChatsWithUnreadPriorityMessages = null;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]

View File

@ -60,6 +60,57 @@ namespace Steamworks
_AssociateWithClan = Marshal.GetDelegateForFunctionPointer<FAssociateWithClan>( Marshal.ReadIntPtr( VTable, 336) );
_ComputeNewPlayerCompatibility = Marshal.GetDelegateForFunctionPointer<FComputeNewPlayerCompatibility>( Marshal.ReadIntPtr( VTable, 344) );
}
internal override void Shutdown()
{
base.Shutdown();
_InitGameServer = null;
_SetProduct = null;
_SetGameDescription = null;
_SetModDir = null;
_SetDedicatedServer = null;
_LogOn = null;
_LogOnAnonymous = null;
_LogOff = null;
_BLoggedOn = null;
_BSecure = null;
_GetSteamID = null;
_GetSteamID_Windows = null;
_WasRestartRequested = null;
_SetMaxPlayerCount = null;
_SetBotPlayerCount = null;
_SetServerName = null;
_SetMapName = null;
_SetPasswordProtected = null;
_SetSpectatorPort = null;
_SetSpectatorServerName = null;
_ClearAllKeyValues = null;
_SetKeyValue = null;
_SetGameTags = null;
_SetGameData = null;
_SetRegion = null;
_SendUserConnectAndAuthenticate = null;
_CreateUnauthenticatedUserConnection = null;
_CreateUnauthenticatedUserConnection_Windows = null;
_SendUserDisconnect = null;
_BUpdateUserData = null;
_GetAuthSessionTicket = null;
_BeginAuthSession = null;
_EndAuthSession = null;
_CancelAuthTicket = null;
_UserHasLicenseForApp = null;
_RequestUserGroupStatus = null;
_GetGameplayStats = null;
_GetServerReputation = null;
_GetPublicIP = null;
_HandleIncomingPacket = null;
_GetNextOutgoingPacket = null;
_EnableHeartbeats = null;
_SetHeartbeatInterval = null;
_ForceHeartbeat = null;
_AssociateWithClan = null;
_ComputeNewPlayerCompatibility = null;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]

View File

@ -24,6 +24,21 @@ namespace Steamworks
_ClearUserAchievement = Marshal.GetDelegateForFunctionPointer<FClearUserAchievement>( Marshal.ReadIntPtr( VTable, 64) );
_StoreUserStats = Marshal.GetDelegateForFunctionPointer<FStoreUserStats>( Marshal.ReadIntPtr( VTable, 72) );
}
internal override void Shutdown()
{
base.Shutdown();
_RequestUserStats = null;
_GetUserStat1 = null;
_GetUserStat2 = null;
_GetUserAchievement = null;
_SetUserStat1 = null;
_SetUserStat2 = null;
_UpdateUserAvgRateStat = null;
_SetUserAchievement = null;
_ClearUserAchievement = null;
_StoreUserStats = null;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]

View File

@ -51,6 +51,48 @@ namespace Steamworks
_SetProperty4 = Marshal.GetDelegateForFunctionPointer<FSetProperty4>( Marshal.ReadIntPtr( VTable, 280) );
_SubmitUpdateProperties = Marshal.GetDelegateForFunctionPointer<FSubmitUpdateProperties>( Marshal.ReadIntPtr( VTable, 288) );
}
internal override void Shutdown()
{
base.Shutdown();
_GetResultStatus = null;
_GetResultItems = null;
_GetResultItemProperty = null;
_GetResultTimestamp = null;
_CheckResultSteamID = null;
_DestroyResult = null;
_GetAllItems = null;
_GetItemsByID = null;
_SerializeResult = null;
_DeserializeResult = null;
_GenerateItems = null;
_GrantPromoItems = null;
_AddPromoItem = null;
_AddPromoItems = null;
_ConsumeItem = null;
_ExchangeItems = null;
_TransferItemQuantity = null;
_SendItemDropHeartbeat = null;
_TriggerItemDrop = null;
_TradeItems = null;
_LoadItemDefinitions = null;
_GetItemDefinitionIDs = null;
_GetItemDefinitionProperty = null;
_RequestEligiblePromoItemDefinitionsIDs = null;
_GetEligiblePromoItemDefinitionIDs = null;
_StartPurchase = null;
_RequestPrices = null;
_GetNumItemsWithPrices = null;
_GetItemsWithPrices = null;
_GetItemPrice = null;
_StartUpdateProperties = null;
_RemoveProperty = null;
_SetProperty1 = null;
_SetProperty2 = null;
_SetProperty3 = null;
_SetProperty4 = null;
_SubmitUpdateProperties = null;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]

View File

@ -55,6 +55,52 @@ namespace Steamworks
_SetLobbyOwner = Marshal.GetDelegateForFunctionPointer<FSetLobbyOwner>( Marshal.ReadIntPtr( VTable, 288) );
_SetLinkedLobby = Marshal.GetDelegateForFunctionPointer<FSetLinkedLobby>( Marshal.ReadIntPtr( VTable, 296) );
}
internal override void Shutdown()
{
base.Shutdown();
_GetFavoriteGameCount = null;
_GetFavoriteGame = null;
_AddFavoriteGame = null;
_RemoveFavoriteGame = null;
_RequestLobbyList = null;
_AddRequestLobbyListStringFilter = null;
_AddRequestLobbyListNumericalFilter = null;
_AddRequestLobbyListNearValueFilter = null;
_AddRequestLobbyListFilterSlotsAvailable = null;
_AddRequestLobbyListDistanceFilter = null;
_AddRequestLobbyListResultCountFilter = null;
_AddRequestLobbyListCompatibleMembersFilter = null;
_GetLobbyByIndex = null;
_GetLobbyByIndex_Windows = null;
_CreateLobby = null;
_JoinLobby = null;
_LeaveLobby = null;
_InviteUserToLobby = null;
_GetNumLobbyMembers = null;
_GetLobbyMemberByIndex = null;
_GetLobbyMemberByIndex_Windows = null;
_GetLobbyData = null;
_SetLobbyData = null;
_GetLobbyDataCount = null;
_GetLobbyDataByIndex = null;
_DeleteLobbyData = null;
_GetLobbyMemberData = null;
_SetLobbyMemberData = null;
_SendLobbyChatMsg = null;
_GetLobbyChatEntry = null;
_RequestLobbyData = null;
_SetLobbyGameServer = null;
_GetLobbyGameServer = null;
_SetLobbyMemberLimit = null;
_GetLobbyMemberLimit = null;
_SetLobbyType = null;
_SetLobbyJoinable = null;
_GetLobbyOwner = null;
_GetLobbyOwner_Windows = null;
_SetLobbyOwner = null;
_SetLinkedLobby = null;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]

View File

@ -31,6 +31,28 @@ namespace Steamworks
_ServerRules = Marshal.GetDelegateForFunctionPointer<FServerRules>( Marshal.ReadIntPtr( VTable, 120) );
_CancelServerQuery = Marshal.GetDelegateForFunctionPointer<FCancelServerQuery>( Marshal.ReadIntPtr( VTable, 128) );
}
internal override void Shutdown()
{
base.Shutdown();
_RequestInternetServerList = null;
_RequestLANServerList = null;
_RequestFriendsServerList = null;
_RequestFavoritesServerList = null;
_RequestHistoryServerList = null;
_RequestSpectatorServerList = null;
_ReleaseRequest = null;
_GetServerDetails = null;
_CancelQuery = null;
_RefreshQuery = null;
_IsRefreshing = null;
_GetServerCount = null;
_RefreshServer = null;
_PingServer = null;
_PlayerDetails = null;
_ServerRules = null;
_CancelServerQuery = null;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]

View File

@ -23,6 +23,20 @@ namespace Steamworks
_SetVolume = Marshal.GetDelegateForFunctionPointer<FSetVolume>( Marshal.ReadIntPtr( VTable, 56) );
_GetVolume = Marshal.GetDelegateForFunctionPointer<FGetVolume>( Marshal.ReadIntPtr( VTable, 64) );
}
internal override void Shutdown()
{
base.Shutdown();
_BIsEnabled = null;
_BIsPlaying = null;
_GetPlaybackStatus = null;
_Play = null;
_Pause = null;
_PlayPrevious = null;
_PlayNext = null;
_SetVolume = null;
_GetVolume = null;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]

View File

@ -37,6 +37,34 @@ namespace Steamworks
_GetSocketConnectionType = Marshal.GetDelegateForFunctionPointer<FGetSocketConnectionType>( Marshal.ReadIntPtr( VTable, 160) );
_GetMaxPacketSize = Marshal.GetDelegateForFunctionPointer<FGetMaxPacketSize>( Marshal.ReadIntPtr( VTable, 168) );
}
internal override void Shutdown()
{
base.Shutdown();
_SendP2PPacket = null;
_IsP2PPacketAvailable = null;
_ReadP2PPacket = null;
_AcceptP2PSessionWithUser = null;
_CloseP2PSessionWithUser = null;
_CloseP2PChannelWithUser = null;
_GetP2PSessionState = null;
_GetP2PSessionState_Windows = null;
_AllowP2PPacketRelay = null;
_CreateListenSocket = null;
_CreateP2PConnectionSocket = null;
_CreateConnectionSocket = null;
_DestroySocket = null;
_DestroyListenSocket = null;
_SendDataOnSocket = null;
_IsDataAvailableOnSocket = null;
_RetrieveDataFromSocket = null;
_IsDataAvailable = null;
_RetrieveData = null;
_GetSocketInfo = null;
_GetListenSocketInfo = null;
_GetSocketConnectionType = null;
_GetMaxPacketSize = null;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]

View File

@ -43,6 +43,40 @@ namespace Steamworks
_CreateHostedDedicatedServerListenSocket = Marshal.GetDelegateForFunctionPointer<FCreateHostedDedicatedServerListenSocket>( Marshal.ReadIntPtr( VTable, 216) );
_RunCallbacks = Marshal.GetDelegateForFunctionPointer<FRunCallbacks>( Marshal.ReadIntPtr( VTable, 224) );
}
internal override void Shutdown()
{
base.Shutdown();
_CreateListenSocketIP = null;
_ConnectByIPAddress = null;
_CreateListenSocketP2P = null;
_ConnectP2P = null;
_AcceptConnection = null;
_CloseConnection = null;
_CloseListenSocket = null;
_SetConnectionUserData = null;
_GetConnectionUserData = null;
_SetConnectionName = null;
_GetConnectionName = null;
_SendMessageToConnection = null;
_FlushMessagesOnConnection = null;
_ReceiveMessagesOnConnection = null;
_ReceiveMessagesOnListenSocket = null;
_GetConnectionInfo = null;
_GetQuickConnectionStatus = null;
_GetDetailedConnectionStatus = null;
_GetListenSocketAddress = null;
_CreateSocketPair = null;
_GetIdentity = null;
_ReceivedRelayAuthTicket = null;
_FindRelayAuthTicketForServer = null;
_ConnectToHostedDedicatedServer = null;
_GetHostedDedicatedServerPort = null;
_GetHostedDedicatedServerPOPID = null;
_GetHostedDedicatedServerAddress = null;
_CreateHostedDedicatedServerListenSocket = null;
_RunCallbacks = null;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]

View File

@ -31,6 +31,28 @@ namespace Steamworks
_GetConfigValueInfo = Marshal.GetDelegateForFunctionPointer<FGetConfigValueInfo>( Marshal.ReadIntPtr( VTable, 120) );
_GetFirstConfigValue = Marshal.GetDelegateForFunctionPointer<FGetFirstConfigValue>( Marshal.ReadIntPtr( VTable, 128) );
}
internal override void Shutdown()
{
base.Shutdown();
_GetLocalPingLocation = null;
_EstimatePingTimeBetweenTwoLocations = null;
_EstimatePingTimeFromLocalHost = null;
_ConvertPingLocationToString = null;
_ParsePingLocationString = null;
_CheckPingDataUpToDate = null;
_IsPingMeasurementInProgress = null;
_GetPingToDataCenter = null;
_GetDirectPingToPOP = null;
_GetPOPCount = null;
_GetPOPList = null;
_GetLocalTimestamp = null;
_SetDebugOutputFunction = null;
_SetConfigValue = null;
_GetConfigValue = null;
_GetConfigValueInfo = null;
_GetFirstConfigValue = null;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]

View File

@ -20,6 +20,17 @@ namespace Steamworks
_BIsFeatureBlocked = Marshal.GetDelegateForFunctionPointer<FBIsFeatureBlocked>( Marshal.ReadIntPtr( VTable, 32) );
_BIsFeatureInBlockList = Marshal.GetDelegateForFunctionPointer<FBIsFeatureInBlockList>( Marshal.ReadIntPtr( VTable, 40) );
}
internal override void Shutdown()
{
base.Shutdown();
_BIsParentalLockEnabled = null;
_BIsParentalLockLocked = null;
_BIsAppBlocked = null;
_BIsAppInBlockList = null;
_BIsFeatureBlocked = null;
_BIsFeatureInBlockList = null;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]

View File

@ -30,6 +30,27 @@ namespace Steamworks
_GetBeaconLocationData = Marshal.GetDelegateForFunctionPointer<FGetBeaconLocationData>( Marshal.ReadIntPtr( VTable, 88) );
_GetBeaconLocationData_Windows = Marshal.GetDelegateForFunctionPointer<FGetBeaconLocationData_Windows>( Marshal.ReadIntPtr( VTable, 88) );
}
internal override void Shutdown()
{
base.Shutdown();
_GetNumActiveBeacons = null;
_GetBeaconByIndex = null;
_GetBeaconDetails = null;
_GetBeaconDetails_Windows = null;
_JoinParty = null;
_GetNumAvailableBeaconLocations = null;
_GetAvailableBeaconLocations = null;
_GetAvailableBeaconLocations_Windows = null;
_CreateBeacon = null;
_CreateBeacon_Windows = null;
_OnReservationCompleted = null;
_CancelReservation = null;
_ChangeNumOpenSlots = null;
_DestroyBeacon = null;
_GetBeaconLocationData = null;
_GetBeaconLocationData_Windows = null;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]

View File

@ -68,6 +68,41 @@ namespace Steamworks
// EnumeratePublishedWorkshopFiles is deprecated - 416
_UGCDownloadToLocation = Marshal.GetDelegateForFunctionPointer<FUGCDownloadToLocation>( Marshal.ReadIntPtr( VTable, 424) );
}
internal override void Shutdown()
{
base.Shutdown();
_FileWrite = null;
_FileRead = null;
_FileWriteAsync = null;
_FileReadAsync = null;
_FileReadAsyncComplete = null;
_FileForget = null;
_FileDelete = null;
_FileShare = null;
_SetSyncPlatforms = null;
_FileWriteStreamOpen = null;
_FileWriteStreamWriteChunk = null;
_FileWriteStreamClose = null;
_FileWriteStreamCancel = null;
_FileExists = null;
_FilePersisted = null;
_GetFileSize = null;
_GetFileTimestamp = null;
_GetSyncPlatforms = null;
_GetFileCount = null;
_GetFileNameAndSize = null;
_GetQuota = null;
_IsCloudEnabledForAccount = null;
_IsCloudEnabledForApp = null;
_SetCloudEnabledForApp = null;
_UGCDownload = null;
_GetUGCDownloadProgress = null;
_GetUGCDetails = null;
_UGCRead = null;
_GetCachedUGCCount = null;
_UGCDownloadToLocation = null;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]

View File

@ -23,6 +23,20 @@ namespace Steamworks
_IsScreenshotsHooked = Marshal.GetDelegateForFunctionPointer<FIsScreenshotsHooked>( Marshal.ReadIntPtr( VTable, 56) );
_AddVRScreenshotToLibrary = Marshal.GetDelegateForFunctionPointer<FAddVRScreenshotToLibrary>( Marshal.ReadIntPtr( VTable, 64) );
}
internal override void Shutdown()
{
base.Shutdown();
_WriteScreenshot = null;
_AddScreenshotToLibrary = null;
_TriggerScreenshot = null;
_HookScreenshots = null;
_SetLocation = null;
_TagUser = null;
_TagPublishedFile = null;
_IsScreenshotsHooked = null;
_AddVRScreenshotToLibrary = null;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]

View File

@ -92,6 +92,89 @@ namespace Steamworks
_GetAppDependencies = Marshal.GetDelegateForFunctionPointer<FGetAppDependencies>( Marshal.ReadIntPtr( VTable, 592) );
_DeleteItem = Marshal.GetDelegateForFunctionPointer<FDeleteItem>( Marshal.ReadIntPtr( VTable, 600) );
}
internal override void Shutdown()
{
base.Shutdown();
_CreateQueryUserUGCRequest = null;
_CreateQueryAllUGCRequest1 = null;
_CreateQueryAllUGCRequest2 = null;
_CreateQueryUGCDetailsRequest = null;
_SendQueryUGCRequest = null;
_GetQueryUGCResult = null;
_GetQueryUGCResult_Windows = null;
_GetQueryUGCPreviewURL = null;
_GetQueryUGCMetadata = null;
_GetQueryUGCChildren = null;
_GetQueryUGCStatistic = null;
_GetQueryUGCNumAdditionalPreviews = null;
_GetQueryUGCAdditionalPreview = null;
_GetQueryUGCNumKeyValueTags = null;
_GetQueryUGCKeyValueTag = null;
_ReleaseQueryUGCRequest = null;
_AddRequiredTag = null;
_AddExcludedTag = null;
_SetReturnOnlyIDs = null;
_SetReturnKeyValueTags = null;
_SetReturnLongDescription = null;
_SetReturnMetadata = null;
_SetReturnChildren = null;
_SetReturnAdditionalPreviews = null;
_SetReturnTotalOnly = null;
_SetReturnPlaytimeStats = null;
_SetLanguage = null;
_SetAllowCachedResponse = null;
_SetCloudFileNameFilter = null;
_SetMatchAnyTag = null;
_SetSearchText = null;
_SetRankedByTrendDays = null;
_AddRequiredKeyValueTag = null;
_RequestUGCDetails = null;
_CreateItem = null;
_StartItemUpdate = null;
_SetItemTitle = null;
_SetItemDescription = null;
_SetItemUpdateLanguage = null;
_SetItemMetadata = null;
_SetItemVisibility = null;
_SetItemTags = null;
_SetItemTags_Windows = null;
_SetItemContent = null;
_SetItemPreview = null;
_SetAllowLegacyUpload = null;
_RemoveItemKeyValueTags = null;
_AddItemKeyValueTag = null;
_AddItemPreviewFile = null;
_AddItemPreviewVideo = null;
_UpdateItemPreviewFile = null;
_UpdateItemPreviewVideo = null;
_RemoveItemPreview = null;
_SubmitItemUpdate = null;
_GetItemUpdateProgress = null;
_SetUserItemVote = null;
_GetUserItemVote = null;
_AddItemToFavorites = null;
_RemoveItemFromFavorites = null;
_SubscribeItem = null;
_UnsubscribeItem = null;
_GetNumSubscribedItems = null;
_GetSubscribedItems = null;
_GetItemState = null;
_GetItemInstallInfo = null;
_GetItemDownloadInfo = null;
_DownloadItem = null;
_BInitWorkshopForGameServer = null;
_SuspendDownloads = null;
_StartPlaytimeTracking = null;
_StopPlaytimeTracking = null;
_StopPlaytimeTrackingForAllItems = null;
_AddDependency = null;
_RemoveDependency = null;
_AddAppDependency = null;
_RemoveAppDependency = null;
_GetAppDependencies = null;
_DeleteItem = null;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]

View File

@ -45,6 +45,42 @@ namespace Steamworks
_BIsPhoneRequiringVerification = Marshal.GetDelegateForFunctionPointer<FBIsPhoneRequiringVerification>( Marshal.ReadIntPtr( VTable, 224) );
_GetMarketEligibility = Marshal.GetDelegateForFunctionPointer<FGetMarketEligibility>( Marshal.ReadIntPtr( VTable, 232) );
}
internal override void Shutdown()
{
base.Shutdown();
_GetHSteamUser = null;
_BLoggedOn = null;
_GetSteamID = null;
_GetSteamID_Windows = null;
_InitiateGameConnection = null;
_TerminateGameConnection = null;
_TrackAppUsageEvent = null;
_GetUserDataFolder = null;
_StartVoiceRecording = null;
_StopVoiceRecording = null;
_GetAvailableVoice = null;
_GetVoice = null;
_DecompressVoice = null;
_GetVoiceOptimalSampleRate = null;
_GetAuthSessionTicket = null;
_BeginAuthSession = null;
_EndAuthSession = null;
_CancelAuthTicket = null;
_UserHasLicenseForApp = null;
_BIsBehindNAT = null;
_AdvertiseGame = null;
_RequestEncryptedAppTicket = null;
_GetEncryptedAppTicket = null;
_GetGameBadgeLevel = null;
_GetPlayerSteamLevel = null;
_RequestStoreAuthURL = null;
_BIsPhoneVerified = null;
_BIsTwoFactorEnabled = null;
_BIsPhoneIdentifying = null;
_BIsPhoneRequiringVerification = null;
_GetMarketEligibility = null;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]

View File

@ -57,6 +57,54 @@ namespace Steamworks
_GetGlobalStatHistory1 = Marshal.GetDelegateForFunctionPointer<FGetGlobalStatHistory1>( Marshal.ReadIntPtr( VTable, Config.Os == OsType.Windows ? 336 : 328 ) );
_GetGlobalStatHistory2 = Marshal.GetDelegateForFunctionPointer<FGetGlobalStatHistory2>( Marshal.ReadIntPtr( VTable, Config.Os == OsType.Windows ? 328 : 336 ) );
}
internal override void Shutdown()
{
base.Shutdown();
_RequestCurrentStats = null;
_GetStat1 = null;
_GetStat2 = null;
_SetStat1 = null;
_SetStat2 = null;
_UpdateAvgRateStat = null;
_GetAchievement = null;
_SetAchievement = null;
_ClearAchievement = null;
_GetAchievementAndUnlockTime = null;
_StoreStats = null;
_GetAchievementIcon = null;
_GetAchievementDisplayAttribute = null;
_IndicateAchievementProgress = null;
_GetNumAchievements = null;
_GetAchievementName = null;
_RequestUserStats = null;
_GetUserStat1 = null;
_GetUserStat2 = null;
_GetUserAchievement = null;
_GetUserAchievementAndUnlockTime = null;
_ResetAllStats = null;
_FindOrCreateLeaderboard = null;
_FindLeaderboard = null;
_GetLeaderboardName = null;
_GetLeaderboardEntryCount = null;
_GetLeaderboardSortMethod = null;
_GetLeaderboardDisplayType = null;
_DownloadLeaderboardEntries = null;
_DownloadLeaderboardEntriesForUsers = null;
_GetDownloadedLeaderboardEntry = null;
_UploadLeaderboardScore = null;
_AttachLeaderboardUGC = null;
_GetNumberOfCurrentPlayers = null;
_RequestGlobalAchievementPercentages = null;
_GetMostAchievedAchievementInfo = null;
_GetNextMostAchievedAchievementInfo = null;
_GetAchievementAchievedPercent = null;
_RequestGlobalStats = null;
_GetGlobalStat1 = null;
_GetGlobalStat2 = null;
_GetGlobalStatHistory1 = null;
_GetGlobalStatHistory2 = null;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]

View File

@ -44,6 +44,41 @@ namespace Steamworks
_IsVRHeadsetStreamingEnabled = Marshal.GetDelegateForFunctionPointer<FIsVRHeadsetStreamingEnabled>( Marshal.ReadIntPtr( VTable, 224) );
_SetVRHeadsetStreamingEnabled = Marshal.GetDelegateForFunctionPointer<FSetVRHeadsetStreamingEnabled>( Marshal.ReadIntPtr( VTable, 232) );
}
internal override void Shutdown()
{
base.Shutdown();
_GetSecondsSinceAppActive = null;
_GetSecondsSinceComputerActive = null;
_GetConnectedUniverse = null;
_GetServerRealTime = null;
_GetIPCountry = null;
_GetImageSize = null;
_GetImageRGBA = null;
_GetCSERIPPort = null;
_GetCurrentBatteryPower = null;
_GetAppID = null;
_SetOverlayNotificationPosition = null;
_IsAPICallCompleted = null;
_GetAPICallFailureReason = null;
_GetAPICallResult = null;
_RunFrame = null;
_GetIPCCallCount = null;
_SetWarningMessageHook = null;
_IsOverlayEnabled = null;
_BOverlayNeedsPresent = null;
_CheckFileSignature = null;
_ShowGamepadTextInput = null;
_GetEnteredGamepadTextLength = null;
_GetEnteredGamepadTextInput = null;
_GetSteamUILanguage = null;
_IsSteamRunningInVR = null;
_SetOverlayNotificationInset = null;
_IsSteamInBigPictureMode = null;
_StartVRDashboard = null;
_IsVRHeadsetStreamingEnabled = null;
_SetVRHeadsetStreamingEnabled = null;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]

View File

@ -18,6 +18,15 @@ namespace Steamworks
_GetOPFSettings = Marshal.GetDelegateForFunctionPointer<FGetOPFSettings>( Marshal.ReadIntPtr( VTable, 16) );
_GetOPFStringForApp = Marshal.GetDelegateForFunctionPointer<FGetOPFStringForApp>( Marshal.ReadIntPtr( VTable, 24) );
}
internal override void Shutdown()
{
base.Shutdown();
_GetVideoURL = null;
_IsBroadcasting = null;
_GetOPFSettings = null;
_GetOPFStringForApp = null;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]

View File

@ -47,6 +47,26 @@ namespace Steamworks
RunCallbacksAsync();
}
static List<SteamInterface> openIterfaces = new List<SteamInterface>();
internal static void WatchInterface( SteamInterface steamInterface )
{
if ( openIterfaces.Contains( steamInterface ) )
throw new System.Exception( "openIterfaces already contains interface!" );
openIterfaces.Add( steamInterface );
}
internal static void ShutdownInterfaces()
{
foreach ( var e in openIterfaces )
{
e.Shutdown();
}
openIterfaces.Clear();
}
public static Action<Exception> OnCallbackException;
public static bool IsValid => initialized;
@ -66,6 +86,7 @@ namespace Steamworks
initialized = false;
ShutdownInterfaces();
SteamApps.Shutdown();
SteamUtils.Shutdown();
SteamParental.Shutdown();

View File

@ -82,6 +82,26 @@ namespace Steamworks
RunCallbacksAsync();
}
static List<SteamInterface> openIterfaces = new List<SteamInterface>();
internal static void WatchInterface( SteamInterface steamInterface )
{
if ( openIterfaces.Contains( steamInterface ) )
throw new System.Exception( "openIterfaces already contains interface!" );
openIterfaces.Add( steamInterface );
}
internal static void ShutdownInterfaces()
{
foreach ( var e in openIterfaces )
{
e.Shutdown();
}
openIterfaces.Clear();
}
public static void Shutdown()
{
Event.DisposeAllServer();
@ -90,6 +110,7 @@ namespace Steamworks
_internal = null;
ShutdownInterfaces();
SteamNetworkingUtils.Shutdown();
SteamNetworkingSockets.Shutdown();

View File

@ -46,6 +46,7 @@ namespace Steamworks
throw new System.Exception( $"Invalid VTable for {InterfaceName}" );
InitInternals();
SteamClient.WatchInterface( this );
}
public void InitServer()
@ -61,6 +62,7 @@ namespace Steamworks
throw new System.Exception( $"Invalid VTable for server {InterfaceName}" );
InitInternals();
SteamServer.WatchInterface( this );
}
public virtual void InitUserless()
@ -77,6 +79,13 @@ namespace Steamworks
InitInternals();
}
internal virtual void Shutdown()
{
Self = IntPtr.Zero;
VTable = IntPtr.Zero;
}
public abstract void InitInternals();

View File

@ -115,6 +115,33 @@ namespace Generator
}
}
EndBlock();
StartBlock( $"internal override void Shutdown()" );
{
WriteLine( $"base.Shutdown();" );
WriteLine( "" );
for ( int i = 0; i < clss.Functions.Count; i++ )
{
var func = clss.Functions[i];
var returnType = BaseType.Parse( func.ReturnType );
var args = func.Arguments.Select( x => BaseType.Parse( x.Value, x.Key ) ).ToArray();
var windowsSpecific = NeedsWindowsSpecificFunction( func, returnType, args );
if ( Cleanup.IsDeprecated( $"{clss.Name}.{func.Name}" ) )
continue;
WriteLine( $"_{func.Name} = null;" );
if ( windowsSpecific )
{
WriteLine( $"_{func.Name}_Windows = null;" );
}
}
}
EndBlock();
}
private bool NeedsWindowsSpecificFunction( CodeParser.Class.Function func, BaseType returnType, BaseType[] args )