Skip to content

Instantly share code, notes, and snippets.

@Sak32009
Last active September 2, 2023 20:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sak32009/61d60e457451054937a8470e64fea897 to your computer and use it in GitHub Desktop.
Save Sak32009/61d60e457451054937a8470e64fea897 to your computer and use it in GitHub Desktop.
$SteamApiDLLFPath = $args[0]
$InterfacesFPath = "cdx_interfaces.txt"
if ( !($SteamApiDLLFPath) ) {
$SteamApiDLLFPath = "steam_api.dll"
if ( !(Test-Path $SteamApiDLLFPath) ) {
$SteamApiDLLFPath = "steam_api64.dll"
}
}
if ( !(Test-Path $SteamApiDLLFPath) ) {
Write-Host "Failed to find $SteamApiDLLFPath" -ForegroundColor Red
Return 1
}
if ( Test-Path $InterfacesFPath ) {
Remove-Item $InterfacesFPath -Force
}
function Find-Interface($KeyName, $Interface) {
$str = Select-String -Pattern "$Interface[0-9]{3}" -Path $SteamApiDLLFPath
if ($str.Matches) {
$out = "$($KeyName)=$($str.Matches)"
Write-Host $out
Write-Output $out | Out-File -Append -FilePath $InterfacesFPath
}
}
Find-Interface SteamApps STEAMAPPS_INTERFACE_VERSION
Find-Interface SteamAppList STEAMAPPLIST_INTERFACE_VERSION
Find-Interface SteamClient SteamClient
Find-Interface SteamContentServer SteamContentServer
Find-Interface SteamController SteamController
Find-Interface SteamFriends SteamFriends
Find-Interface SteamGameServer SteamGameServer
Find-Interface SteamGameServerStats SteamGameServerStats
Find-Interface SteamHTMLSurface STEAMHTMLSURFACE_INTERFACE_VERSION_
Find-Interface SteamHTTP STEAMHTTP_INTERFACE_VERSION
Find-Interface SteamInput SteamInput
Find-Interface SteamInventory STEAMINVENTORY_INTERFACE_V
Find-Interface SteamMasterServerUpdater SteamMasterServerUpdater
Find-Interface SteamMatchGameSearch SteamMatchGameSearch
Find-Interface SteamMatchMaking SteamMatchMaking
Find-Interface SteamMatchMakingServers SteamMatchMakingServers
Find-Interface SteamMusic STEAMMUSIC_INTERFACE_VERSION
Find-Interface SteamMusicRemote STEAMMUSICREMOTE_INTERFACE_VERSION
Find-Interface SteamNetworking SteamNetworking
Find-Interface SteamNetworkingUpdater SteamNetworkingUpdater
Find-Interface SteamParties SteamParties
Find-Interface SteamParentalSettings STEAMPARENTALSETTINGS_INTERFACE_VERSION
Find-Interface SteamRemotePlay STEAMREMOTEPLAY_INTERFACE_VERSION
Find-Interface SteamRemoteStorage STEAMREMOTESTORAGE_INTERFACE_VERSION
Find-Interface SteamScreenshots STEAMSCREENSHOTS_INTERFACE_VERSION
Find-Interface SteamUGC STEAMUGC_INTERFACE_VERSION
Find-Interface SteamUnifiedMessages STEAMUNIFIEDMESSAGES_INTERFACE_VERSION
Find-Interface SteamUser SteamUser
Find-Interface SteamUserStats STEAMUSERSTATS_INTERFACE_VERSION
Find-Interface SteamUtils SteamUtils
Find-Interface SteamVideo STEAMVIDEO_INTERFACE_V
@L0v3craft
Copy link

Thanks! This is much useful ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment