At 09:47 2003-1-25 -0500, you wrote:
I keep getting an error when I attempt to set the owner of a structure to send with AppCallWithCommand. Consider the following:First, when you use SysUIAppSwitch (which AppCallWithCommand calls), you should pass a self-contained chunk of memory to the other app, not one with embedded pointers. So, for this struct, it would be better to just define it as a chunk of memory with two NUL-terminated strings, rather than as a C struct with two pointers. You will have to pack and unpack this, but it will make the code a lot safer, especially with Palm OS 5 or later.
typedef struct{
char *StrOne;
char *StrTwo;
} MyParamsType;
I use MemPtrNew to allocate memory for the structure, then for the two strings. After filling what ever info I need into the strings, I attempt to set the owner of the two strings followed by the structure to 0. This is where the error comes. None of them work. What could possibly be going wrong?
--
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
