Article View: borland.public.cppbuilder.nativeapi
Article #12483Re: API - Random error retrieving File Version
From: Remy Lebeau (TeamB)
Date: Mon, 08 Dec 2003 17:57
Date: Mon, 08 Dec 2003 17:57
28 lines
1583 bytes
1583 bytes
"Alain R." <no.valid@email.com> wrote in message
news:3fd42976$1@newsgroups.borland.com...
> lpBuffer = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, dwSize );
I would suggest using GlobalAlloc() instead:
lpBuffer = GlobalAlloc( GPTR, dwSize );
//...
GlobalFree( lpBuffer );
> LPVOID lpStr;
I would suggest you use a char* instead:
char *lpStr;
//...
VerQueryValue(lpBuffer, TypeInformation.c_str() , (LPVOID*)&lpStr,
&dwLength );
//...
sCompanyName = lpStr;
// or sCompanyName = AnsiString(lpStr, dwLength);
//...
sFileVersion = lpStr;
// or sFileVersion = AnsiString(lpStr, dwLength);
Gambit
Technical Details
Message-ID:
<3fd4ba79$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3fd42976$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,59dc320eac75a4ea X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-12-08 10:09:56 PST From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3fd42976$1@newsgroups.borland.com> Subject: Re: API - Random error retrieving File Version Date: Mon, 8 Dec 2003 09:57:34 -0800 Lines: 30 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.23.78.224 Message-ID: <3fd4ba79$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1070905977 67.23.78.224 (8 Dec 2003 09:52:57 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail