Recent Entries: |
|
|
|
|
|
|
Handspring Undocumented APIs
|
So if you have ever developed for the Treos, you may have run into the fact that there are some functions that just aren't available in the PhnLib SDK. One such function that I found missing the other day was a function to hang up a phone call that was already taking place.
So, as is my usual pattern, when I need to find something, I headed to Google groups, the Palm developer site and the PalmSource/Access developer web site. None of these turned up anything. Ugh. I started to get worried. Next, as is my usual custom, I headed to the header files to do some digging.
After poking around for a while in the headers, I found a tantalizingly named trap in HsPhoneTraps.h called 'PhnLibTrapDisconnect'. For some strange reaon, the folks at Palm/Handspring neglected to include this function in the SDK, but included the system trap for it.
This was a fantastic find, and after a bit more poking and testing, I found some code that would work. Simply declare this function prototype somewhere in your headers:
extern Err PhnLibDisconnect(UInt16 refNum, UInt16 line)
PHN_LIB_TRAP (PhnLibTrapDisconnect);
And then you will be free to disconnect whichever of the two lines you would like. One caveat that I would offer, however is that there may be additional variables required by this function so to be safe try calling the function like this:
char stackProtector[16];
Err err = PhnLibDisconnect(phnLibRef, 0);
As long as your compiler doesn't optimize it away, the 'char stackProtector[16]' right before you call the function should protect you just a bit from any stack issues that could arise from not having the right function signature.
Of course, you should use this snippet at your own risk, but I do sincerely hope that you find it useful. I certainly have. And as always, if you have additional info or comments about this, feel free to drop me a quick note. I always love good emails.
-Jon
|
Submitted by bosshogg on Wednesday the 26th of July 2006, at 11:16 pm
|
Posting Malaise
|
So, it's been a while since I've posted anything of significance. This isn't to say that I don't have ideas floating around in my head; it's just that putting together a whole technical post seems to take an exorbitant amount of time.
I've also noticed this in other people's technical blogs: Russell Beattie, Ben Combee, and Bram Cohen are just examples of the general disinterest in blogging that I've noticed. Certainly Ben remains prolific in his personal blog, but it's been over a year since he's had any activity in his technical one.
Why is that? Are Engineers simply fickle with fads and the blog is yet another to lose our interest? I still read other people's blogs (when they post), but only if the RSS feed looks interesting to me. Otherwise, I simply mark it as read and move on.
Oh, don't get me wrong. I have things to say, like the fact that some of my code is now being used to detect whales for the U.S. Navy (how weird is that?) or about how to programatically dismiss dialogs on the Palm OS, or about how .Net 2.0 Forms are diabolically slow. But quite frankly, those kinds of posts take time, and will have to wait for later.
Cheers,
-Jon
|
Submitted by bosshogg on Wednesday the 19th of July 2006, at 10:44 am
|
|
 
|
|