Here's a quick way for switching the speaker on/off in .NETCF
[DllImport("ossvcs.dll", EntryPoint = "#218")]
static extern int SetSpeakerMode(uint mode);
void EnableSpeakerPhone()
{
SetSpeakerMode(1);
}
void DisableSpeakerPhone()
{
SetSpeakerMode(0);
}
Unfortunately, ossvcs.dll is not documented and might not exist in the future. But for now, it pretty much works in all devices I've tried
No comments:
Post a Comment