How can I program the speakerphone on a pocketpc running Windows Mobile 6.5?

61 Views Asked by At

Thanks to Josef who put me onto the right track for coding Windows Mobile 6.5 phone support.

I have found some more tricks which I would like to share. Yes, I know it is old technology, but there are many devices being sold that still run mobile 6.5. So: How can I program the speakerphone on a pocketpc running Windows Mobile 6.5 in .NET Compact Framework 3.5 in VB.NET?

1

There are 1 best solutions below

7
John Agar On

This is very simple once you know how. You call the DLL file ossvcs, but this DLL file exports functions by ordinal numbers, not by names.

See http://msdn.developer-works.com/article/12376405/Reject+Call for more details. The code follows:

<DllImport("ossvcs.dll", EntryPoint:="#218")> _
Private Shared Sub setSpeaker(ByVal sValue As Integer)
End Sub

' Call setSpeaker(1) to turn on and setSpeaker(0) to turn off.
' If you set the speaker on when you create the line than it will always turn the speaker on for every call made