Vesselin,
>> I want to use the ExgControl to enable the beam reception.
>
>I don't think that it can be used for such purposes.
Actually, ExgControl is the proper thing to use. If you look at the
documentaion on prefBeamReceive under the PrefSetPreference api, you will find:
"This preference is currently not used. Instead, use the ExgControl
function with one of the constants described in IR Control Constants."
Here is what I used to enable beam reception
// Enable IR beaming and return former state
Boolean EnablePalmBeam() {
IrStatus error;
Boolean Pref;
UInt16 beam_ir_ref;
UInt16 beamLen = sizeof( Pref );
error = SysLibFind( irLibName, &beam_ir_ref );
if ( error != errNone )
return 0;
// Get current state of IR beaming
ExgLibControl( beam_ir_ref, irGetScanningMode, &Pref, &beamLen );
// If it is off, switch it on but return original Pref value
if ( Pref == 0 )
{
Pref = 1;
ExgLibControl( beam_ir_ref, irSetScanningMode, &Pref, &beamLen
);
Pref = 0;
}
return Pref;
}
Hope this helps.
Doug
--
For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palmos.com/dev/support/forums/