RhetoricalRuvim said:
The thing with that is that I use the MASM32 assembler for the server. Would the answer differ much, if I asked the question in the C/C++ forum (because I know Win32 programming is very similar with both, assembly and C/C++)?
If you are writing a server, then just create the logic to store the vars your server needs/creates, AFAIK windows does not have a "remote IP" environment var (Maybe windows server does)... so when the remote connects to your server app, get the ip and save to a config file or a database...
What does C/C++ have to do with anything? Cause if you can do Win32 in C, then you sure as hell can do it in Assembly (might not be as easy but you can do it) C++ is a different story...
What you can do is call SetEnvironmentVariable and try creating RemoteIP for the user logged in... if you want it system wide, have admin rights and create a RemoteIP in HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment then do something like:
.data
szEnviron BYTE "Environment", 0
.code
invoke SendMessage, HWND_BROADCAST, WM_SETTINGCHANGE, 0, offset szEnviron
to notify the apps and system you changed/created a setting