Article View: borland.public.cppbuilder.nativeapi
Article #276Re: WideString to Hexa Decimal Value
From: Hans Galema
Date: Mon, 26 May 2008 18:21
Date: Mon, 26 May 2008 18:21
23 lines
1419 bytes
1419 bytes
bar wrote:
> I think the only way is to Convert Unicode WideString to related Hexadecimal
> numbers
Convert the WideString to an AnsiString containing the hexadecimal
representaion of individual bytes.
WideString WString = ......
AnsiString HexString;
BYTE *bptr = (BYTE*)WString.c_bstr();
while ( *bptr || *(bptr+1) )
{
HexString += IntToHex ( (int)*bptr, 2 );
bptr++;
bptr++;
}
Label6->Caption = HexString;
Technical Details
Message-ID:
<483b007a$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!eweka.nl!lightspeed.eweka.nl!feeder.erje.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<48385c4f@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,89f4225d30e42975 X-Google-Attributes: gid10cc67,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Date: Mon, 26 May 2008 20:21:18 +0200 From: Hans Galema <notusedagain@notusedagain.nl> User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: WideString to Hexa Decimal Value References: <48385c4f@newsgroups.borland.com> In-Reply-To: <48385c4f@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 145.98.201.248 Message-ID: <483b007a$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1211826298 145.98.201.248 (26 May 2008 11:24:58 -0700) Lines: 23 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!eweka.nl!lightspeed.eweka.nl!feeder.erje.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail