This code fails on the Treo 650!  Sometimes it returns TRUE when no headset is 
plugged in but most ALL of the time it returns FALSE when there IS a headset 
connected.  The same code works flawlessly on the Treo 600.  What's up with 
that?  Does anyone know an alternate way to query to see if there is a headset 
plugged into the Treo?

Boolean
CheckForHeadSet()
{
        UInt16 PhoneLibRefNum;
        Boolean Connected = false;
        
        if (HsGetPhoneLibrary (&PhoneLibRefNum)) {
                return (false);
        }
        
        PhnLibGetHeadsetConnectedInfo(PhoneLibRefNum, &Connected);

        PhnLibClose (PhoneLibRefNum);
        
        return(Connected);
}
-- 
For information on using the Palm Developer Forums, or to unsubscribe, please 
see http://www.palmos.com/dev/support/forums/

Reply via email to