Link to home
Start Free TrialLog in
Avatar of sandman_br
sandman_br

asked on

Getting network information with Delphi 1

I have to write an app that runs under either a Win 3.11 or Win 95 network. I have to get the user name, computer name and workgroup name from the system. Is there a way to do this that works in both cases? If not, I'd like to know how to get the info under Win 3.11, as I already know how to do that under Win 95.

Thanx
Sandman
ASKER CERTIFIED SOLUTION
Avatar of heathprovost
heathprovost
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
BTW - I forgot to Free the SysIni Objects - you should definitely modify to do that - just add SysIni.Free at the end of each function.  Sorry about that.

Heath
Avatar of sandman_br
sandman_br

ASKER

Hi heath,
your routines worked great. I'd never realize I should look at system.ini because I don't have a machine with WfW around... (go figure).
Too bad I'll have to code two programs to do the same thing.

Sandman
I am still looking for a simple but effective way to determine who is actually logged in.  Can you check something.  Go to a dos prompt while in windows and type "set".  This will display environment variables.  I have a feeling that there is one called "USER" that might be the key to all this.