Article View: borland.public.cppbuilder.nativeapi
Article #13568Re: GetComputerName
From: Remy Lebeau (TeamB)
Date: Fri, 03 Oct 2003 16:36
Date: Fri, 03 Oct 2003 16:36
15 lines
1350 bytes
1350 bytes
"Phil V" <pvalentine_REMOVE_THIS_@_REMOVE_THIS_vislink.com> wrote in message
news:3f7d93c6@newsgroups.borland.com...
> Can someone please show me the correct way to use GetComputerName.
char buffer[MAX_COMPUTERNAME_LENGTH+1] = {0}
DWORD dwSize = sizeof(buffer);
if( GetComputerName(buffer, &dwSize) )
// use buffer as needed
else
// error
Gambit
Technical Details
Message-ID:
<3f7da52c@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3f7d93c6@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,99405605c0ac6d85 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-10-03 09:40:40 PST From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f7d93c6@newsgroups.borland.com> Subject: Re: GetComputerName Date: Fri, 3 Oct 2003 09:36:19 -0700 Lines: 17 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 67.22.137.75 Message-ID: <3f7da52c@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1065198892 67.22.137.75 (3 Oct 2003 09:34:52 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail