firmlyfly

I want to mute the ring of incoming call My platform is pocketpc 2003 / EVC4.0 SP4
I tested the following method , but not success.
1--> use mixerSetControlDetails , but mixerGetNumDevs return zero , so mixerOpen and mixerSetControlDetails failed
2--> DeviceIoControl , Guess , not success now
3---> phoneOpen->phoneSetRing , as MSDN said , dwNumRingModes(obtained by phoneGetDevCaps) is Zero £¬ the ring mode of the phone cannot be controlled £¬ failed
4---> phoneOpen->phoneSetRing , I got one request identifier , but no any effection. failed
5--->waveOutOpen->waveOutSetVolume(hWo,0) or waveOutSetVolume(0,0) , no error report , but no mute the speaker .


anyone has any ideas about this Is it possible to mute rings of incoming call
thanks


Re: Smart Devices Native C++ Development How to mute rings of incoming call?

Srikanth Bogadapati

Hi,

This forum is primarily monitored by Visual Studio for devices group. Please check this link for more appropriate forums for this type of queries.

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=286724&SiteID=1

Thanks

Srikanth Bogadapati






Re: Smart Devices Native C++ Development How to mute rings of incoming call?

firmlyfly

This question confused me several days. and get a hint , and following is my method. :)

1/ Registry incoming call ring value settings -> HKEY_CURRENT_USER\ControlPanel\SoundCategories\Ring\InitVol

So Just set InitVol to 0 , and then we can mute the incoming call .

2/ codes:

HKEY hKey = NULL;

DWORD dwDisposition = 0;
DWORD dwType = REG_DWORD;
DWORD dwDataSize = 0;
DWORD volume=0;


RegCreateKeyEx(
        HKEY_CURRENT_USER,
         _T("ControlPanel\\SoundCategories\\Ring"),
         0, NULL, 0, KEY_ALL_ACCESS, NULL, &hKey, &dwDisposition);
/* 
 RegQueryValueEx(
          hKey, _T("InitVol"), 0, &dwType,
          (PBYTE)&ringVol, &dwDataSize);
*/
 
RegSetValueEx(hKey , _T("InitVol") , 0 , dwType , (unsigned char*)&volume , sizeof(DWORD));

RegCloseKey(hKey);

3/ maybe , It could not working sometimes , like Smartphone / window mobile 5.0 system , you program need digital signed.

Thanks!