What about just using a string?  and midB?

Tim


> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of
> Rubber Chicken Software Co.
> Sent: Monday, February 05, 2007 5:11 PM
> To: REALbasic NUG
> Subject: Re: Copying Byte Arrays
>
>
> At 06:48 PM 2/5/2007, you wrote:
>
> >Actualy sounds to me like you might want to consider using a
> >memoryblock instead.
>
> That's sort of the backdoor. I'm trying to use lots of VB code pasted
> to RB, which uses byte arrays, and trying to avoid changing them to
> memory blocks. I'm completely used to using Byte Arrays as buffers.
>
> VB has a way of obtaining the pointer from a byte array; in fact, you
> just pass the first (or whatever) element to RtlMoveMemory in the C
> runtime, the Declare in VB interprets that as a pointer. Pointers in
> VB can be used, you just can't do anything directly to them. You
> receive a pointer to pass it. I'm just looking for it in the first place.
>
> So presently there is no way of getting a pointer to an element in a
> Byte Array in RB?
>
> >Also a simple benchmark might give you the answer.
>
> True, but I already know the outcome (could be wrong though).
>
> >I'd be interested to know if memoryblocks and memcpy beats simply
> >looping round the byte array in the normal fashion.
>
> I'll try, at least.
>
> >You cannot get pointers to an RB array. They are reference based only.
>
> RB knows them, so somehow they could be exposed?
>
> >If you want to play with pointers you have to be dealing with
> memoryblocks
> >and/or ptrs  derived from Declares.
>
> See above.
>
> * * * * * * * * * * * * * * * * * * * * * * * * * * *
> | Garth Hjelte                                      |
> | Customer Service Representative, President        |
> | Chicken Systems, Inc, Rubber Chicken Software Co. |
> | 714 5th Street SE                                 |
> | Willmar, MN 56201 USA                             |
> |                                                   |
> | 800-8-PRO-EPS    Toll Free Order Line (US Only)   |
> | 320-235-9798     Tech Support, Sampler Questions  |
> |                  International Line               |
> | 360-838-7689     Fax                              |
> | Product Sales:   [EMAIL PROTECTED]             |
> | Product Support: [EMAIL PROTECTED]           |
> | Sampler Q+A:     [EMAIL PROTECTED]                |
> | Web Page:        www.chickensys.com               |
> * * * * * * * * * * * * * * * * * * * * * * * * * * *
>
> _______________________________________________
> Unsubscribe:
> <[EMAIL PROTECTED]>
>
> REAL Software has decided to consolidate this mailing list with
> the online Forums.  On Monday, February 12, 2007, this mailing
> list will no longer be active.  We encourage you to continue your
> REALbasic and REAL SQL Server discussions on the Forums.  If you
> are not presently a member of the forum, please sign up today at
> <http://forums.realsoftware.com>.
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.432 / Virus Database: 268.17.26/670 - Release Date:
> 2/5/2007 2:04 PM
>
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.26/670 - Release Date: 2/5/2007
2:04 PM

_______________________________________________
Unsubscribe:
<[EMAIL PROTECTED]>

REAL Software has decided to consolidate this mailing list with the online 
Forums.  On Monday, February 12, 2007, this mailing list will no longer be 
active.  We encourage you to continue your REALbasic and REAL SQL Server 
discussions on the Forums.  If you are not presently a member of the forum, 
please sign up today at <http://forums.realsoftware.com>.

Reply via email to