Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #3266

Convert Byte Array to String

From nicktekhne@googlemail.com
Newsgroups comp.lang.clipper.visual-objects
Subject Convert Byte Array to String
Date 2012-03-29 03:06 -0700
Organization http://groups.google.com
Message-ID <27581644.2180.1333015566790.JavaMail.geo-discussion-forums@vbvd13> (permalink)

Show all headers | View raw


I have to convert a Byte Array returned from an ActiveX control into a string to save into a memo field (it's actually a .DOC format document from a word processor control).

I can do this and it works fine:

LOCAL uValue AS USUAL
LOCAL cResult AS STRING
LOCAL i,dwLen AS DWORD
uValue:=oControl:SaveToMemory(9,FALSE)
cResult:=""
dwLen:=ALEN(uValue)
FOR i:=1 UPTO dwLen
    cResult+=CHR(uValue[i])
NEXT 	
RETURN cResult

I just wonder if it's the fastest method, or whether there's a better way... I want to make this as efficient as possible.

TIA

Nick

Back to comp.lang.clipper.visual-objects | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Convert Byte Array to String nicktekhne@googlemail.com - 2012-03-29 03:06 -0700
  Re: Convert Byte Array to String nicktekhne@googlemail.com - 2012-03-30 04:21 -0700

csiph-web