Article View: borland.public.cppbuilder.nativeapi
Article #2057Re: Getting computer sid, problems with LookupAccountName
From: Bob Gonder
Date: Thu, 26 Apr 2007 13:39
Date: Thu, 26 Apr 2007 13:39
11 lines
1402 bytes
1402 bytes
Mike Collins wrote:
> AnsiString szComputerName;
> szComputerName.SetLength(MAX_COMPUTERNAME_LENGTH + 1);
> DWORD dwSize = szComputerName.Length();
> if (GetComputerName(szComputerName.c_str(), &dwSize))
> {
> szComputerName = szComputerName + "$"; <- Never gets appended...
szComputerName is still MAX_COMPUTERNAME_LENGTH + 1in size, now you
are adding "$" at position MAX_COMPUTERNAME_LENGTH + 2
Technical Details
Message-ID:
<ena1339g3rq2kunv8eqca5hd4pfqes1p3t@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<462bc454@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,bd7990a8e1a7b3b1 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Getting computer sid, problems with LookupAccountName Date: Thu, 26 Apr 2007 06:39:19 -0700 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <ena1339g3rq2kunv8eqca5hd4pfqes1p3t@4ax.com> References: <462bc454@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 67.77.147.157 X-Trace: newsgroups.borland.com 1177594758 67.77.147.157 (26 Apr 2007 06:39:18 -0700) Lines: 13 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail