Well as long as we're coming up with alternatives:
 - Read HKEY_CURRENT_USER\Software\Valve\Steam\LastGameNameUsed
 - Enumerate HKEY_CURRENT_USER\Software\Valve\Steam\Users for a matching
friends\PersonaName value
   - The keys under Users are account IDs. You can use them to get a
SteamID.

Infallible? Hardly. But it's the best out-of-game, no-steam-dlls solution I
could come up with besides mucking around in the blob file.

If you know where Steam is installed
(HKEY_CURRENT_USER\Software\Valve\Steam\SteamPath), you can load
steamclient.dll and get the SteamID easy. If you want more details, reply
and ask.

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Darien Hager
Sent: Monday, January 04, 2010 1:06 PM
To: Discussion of Half-Life Programming
Subject: Re: [hlcoders] How to find SteamID

Just to toss out an alternative... I think the "current user name" is 
probably somewhere in the clientregistry.blob file after the user is 
logged-in... but parsing that thing directly isn't very fun and likely 
won't be as stable making your own exe/dll. (I'm working on phasing out 
some clientregistry-using code for those reasons.)

--Darien

Alexander Hirsch wrote:
> It does work. I did some stuff with that already.
> The code down there is just on top of my head though. Still, should
> work like that.
>
>   


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to