computername:
http://delphi.about.com/cs/adptips2002/a/bltip0102_3.htm
windows version:
http://delphi.about.com/cs/adptips2000/a/bltip1100_2.htm
regards
Andries
Roberto Freitas <[EMAIL PROTECTED]> wrote: Hi, I use this function to get computer name on Win 98:
function Computer_Name(CName: PChar): PChar;
var
Registro : TRegistry;
i : ShortInt;
S : String;
begin
result := CName;
Registro := TRegistry.Create;
try
Registro.RootKey := HKEY_LOCAL_MACHINE;
if Registro.OpenKey
('\System\CurrentControlSet\Services\VxD\VNETSUP', False) then
begin
S := Registro.ReadString('ComputerName');
if (Length(S) > 0) then
for i := 1 to Length(S) do
begin
CName^ := S[i];
Inc(CName);
end;
Registro.CloseKey;
end;
finally
Registro.Free;
end;
CName^ := #0;
end;
It works fine with Win 98.
What changes are necessary in order to work properly also with Win
2000 and Win XP?
How can I know what operational system is running on the computer?
-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]
SPONSORED LINKS
C programming language Computer programming languages Java programming language The c programming language C programming language Concept of programming language
---------------------------------
YAHOO! GROUPS LINKS
Visit your group "delphi-en" on the web.
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
---------------------------------
---------------------------------
Get amazing travel prices for air and hotel in one click on Yahoo! FareChase
[Non-text portions of this message have been removed]
-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]
SPONSORED LINKS
| C programming language | Computer programming languages | Java programming language |
| The c programming language | C programming language | Concept of programming language |
YAHOO! GROUPS LINKS
- Visit your group "delphi-en" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

