It's controlled via the exchange manager:
// Beam control flag
static Boolean beamPref=0;
//
// Disable Beam Receive if Enabled
//
void DisablePalmBeam() {
IrStatus error;
Word beam_ir_ref;
Word beamLen = sizeof(beamPref);
error = SysLibFind(irLibName, &beam_ir_ref);
if (error != 0) {
return;
}
// Disable "Beam Receive" if enabled
ExgLibControl(beam_ir_ref, irGetScanningMode, &beamPref, &beamLen);
if (beamPref) {
beamPref = 0;
ExgLibControl(beam_ir_ref, irSetScanningMode, &beamPref,
&beamLen);
beamPref = 1;
}
}
//
// Restore Beam Receive if it was enabled
//
void RestorePalmBeam() {
IrStatus error;
Word beam_ir_ref;
Word beamLen = sizeof(beamPref);
if (beamPref != 0) {
// Re-enable "Beam Receive" if it was enabled before
error = SysLibFind(irLibName, &beam_ir_ref);
if (error != 0) {
return;
}
ExgLibControl(beam_ir_ref, irSetScanningMode, &beamPref,
&beamLen);
}
}
-----Original Message-----
From: Charles Morris [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 02, 2001 7:52 PM
To: Palm Developer Forum
Subject: Beam Receive PrefGetPreference bug
I think I have found my first PalmOS bug, or may be it is just a
documentation error. When I use PrefGetPreference to turn off the
prefBeamReceive preference, it doesn't work. Or more precisely, I think it
updates the Preference resource, but this is not where the Preference Panel
saves its Beam Receive On/Off preference. I want my application to be able
to disable a beam receive. The API seems all set to let me do this, but it
doesn't work. The Palm OS source code doesn't show me anything either. Can
anyone tell me how to work around this?
--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/