Logged in as Guest   Fri, Mar. 12th, 4:50 AM.      
Visitor Map
Recent Entries:
My Dev Setup Lately
Three Ways To Randomize on the iPhone
How to Remove .svn Directories On a Mac
How To Detect The iPhone Simulator
iPhoneMom Likes Doodle Games!
Updates To the Doodle Games Line
Three Jacks Now Tweets
Second iPhone App Submitted For Approval!
Pinch Media Analytics for iPhone
New iPhone Game Coming Soon!

Archive:
January - 2010
November - 2009
October - 2009
September - 2009
August - 2009
July - 2009
June - 2009
April - 2009
March - 2009
January - 2009
May - 2008
April - 2008
March - 2008
October - 2007
August - 2007
July - 2007
June - 2007
May - 2007
April - 2007
December - 2006
November - 2006
September - 2006
August - 2006
July - 2006
March - 2006
February - 2006
January - 2006
December - 2005
November - 2005
October - 2005
September - 2005
August - 2005
July - 2005
June - 2005
May - 2005
April - 2005
February - 2005
January - 2005
December - 2004
November - 2004
October - 2004
September - 2004
August - 2004
July - 2004
June - 2004
May - 2004
April - 2004
March - 2004

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