Your problem is the use of the sizeof function.  It returns the size (in
bytes) of a data type.
Since kStaticChar is a pointer to a char, sizeof(kStaticChar) will return 4
(I think).  You should be able to see this in the debugger.

I think that you wanted to say this: int size = StrLen( kStaticChar);

Hope that helps,

Brian.


"Baiss E. Magnusson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> Hi,
>
> I can't seem to move memory as in the following:
>
>   Byte*   _from[1];
> const static char kStaticChar[] = {"blah blah blah"};
>
> int size = sizeof( kStaticChar );
>
> _from[0] = new Byte( size );
>
> MemMove( _from[0], kStaticChar, size ); // *** fails
>
> StrNCopy( (CharPtr)_from[0], kStaticChar, size ); //
> *** also fails
>
>
> I would think that either <MemMove> or <StrNCopy> would do.
> --
> --  Baiss
>
>





-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to