I have a struct called "userData", with a char* member, called "in".  I 
allocate some memory, put some text into it, create an instance of userData, 
and set userData->in equal to the new memory I've allocated.  Effectively I've 
done this:

char *text = MemPtrNew( 20 );
userData *ud = new userData;
StrCopy( text, "bob" );  // put some text into it
ud->in = text;

Now I want to pass that ud as the userData parameter (second parameter), and 
call PceNativeCall (which calls the ARM code I've written that takes this 
userData).  By this time I've successfully gotten the ARM code I've written as 
a resource, and I pass that in the first parameter to PceNativeCall.

Within the ARM code I reversed the endian of the "in" pointer (like you're 
supposed to) and I put some debugger outputs to check to see if "in" is still 
pointing to the text that says "bob".  It isn't.  The address of "in" in the 
ARM code is in fact the same address as the "in" in the 68k code, where I 
assign "bob" to it, but within the ARM code, the memory "in" points to just has 
NULL (0 values) in it.

Is it not possible, then, for ARM code and 68K code to look at the same dynamic 
memory?  Must they have their own, separate dynamic memories?  Any light anyone 
can shed on this problem I would greatly appreciate.  Thanks!

-Zack
-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to