At 11:39 AM -0700 7/22/02, Ralph Krausse wrote:
>     I would like to modify the emulator to do some custom stuff, for
>example I would like to, if possible to call a function in my palm
>application from the emulator. I have managed to put a button on the
>emulator and when I click it, I would like it to call my
>foobar("hello"); function in my palm prc that is running. Can this be
>done?

Because Ralph also sent this to me via private e-mail, I replied to 
it before knowing that he'd also posted it publicly.  Here is a 
slightly edited version of the relevant part of my reply:

At 1:56 PM -0700 7/22/02, Keith Rollin wrote:
>>So here is my question and I will make it short. I want the
>>emulator to be able to call a function in my palm application. IE, I
>>have a function in my palm application call void foobar(char* pszdata).
>>Lets say all it does is display the pszdata in a message box. I have
>>place a button on my emulator and am now trying to figure out how I
>>could have the emulator call that function. Possible?
>
>Anything is possible.  If by "place a button on my emulator" you 
>mean that you've modified Poser's source code to recognize and react 
>to a button, then you don't necessarily need to take that route. 
>Instead, you might be able to use the RPC mechanism (following the 
>example provided by the Perl scripts that come with Poser) to call 
>SysAppLaunch, targeting your application and sending a custom 
>command code.  The parameter block provided with that custom code 
>could be the string you want to display.
>
>If you actually do want to take the "add a button to Poser" approach 
>(or perhaps add a menu item instead), then the underlying source 
>code would have to do something similar.  Follow the existing 
>examples to suspend emulation, call SysAppLaunch with the custom 
>values, and then resume emulation.
>
>In general, without knowing the address of foobar(), there's no way 
>to invoke it.
>
>-- Keith

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

Reply via email to