WM 6.5 - Hide / Kill CProg.exe - Windows Mobile Development and Hacking General

Hi, i know this question might pops up every now and then. Tried hard to find a solution but still can't find anything workable. Here's my issue:
I'm developing an app for Windows Mobile 6.5 (With TAPI 2.0), using Motorola MC65 as target device, that would allow user to make calls and answer calls. For outgoing calls i have no problem whatsoever. For incoming calls, the OS default call answering screen (CProg.exe) will pop up when there's a call coming in.
After googling for solutions and trial and error a whole lot, here's what i did so far:
1. Use lineSetAppPriority to set my app to the top priority for handling incoming call. The call returns 0 (means success) but still the CProg will try to handle the incoming calls. Checked that the application name is correct as well.
2. Tried using FindWindow and SetForegroundWindow to hide the CProg. It works, when there's incoming call, the CProg will be hidden and my app is shown. However the button on my app couldn't be accessed as i think the focus or countrol is still with CProg. Tried using Focus() on my app and still not working.
3. Tried replace the CProg with an empty executable. After restart, my phone can't even access the radio network. Usually when booted up the device will prompt me for the SIM card's pin number, but this is not the case here. Tried calling in and operator's telling me can't reach the line.
Just wondering is there anyone, at all, that has encountered this issue before and get over it?
Thank you.

Related

replace the caller ID notification screen

Hi,
I need to develope an application that basically replaces the caller ID screen that pops up when you have an incoming call and show some more information on the caller, then let the user answer or decline the call.
any help on where to look first (or maybe code snipets if i'm lucky) highly appreciated.
Cheers,
Shafa
I think you may have a hard time if it is truly a seperate application you wish to write. I have written a program to try to be used at the same time as cprog.exe and when that incoming call window comes up nothing I have tryed will let the user interact with any windows I create. You could stop that process but most users will not want to do this. I ended up having my program automatically determine if it wants to accept the incoming call and answer it itself. This was particularly anoying because my incoming call interest was set to data only and cprog dose not normally even register an incoming call that is purly data. But after I had initialized tapi with my settings cproc unexpectedly shared the same interest for incoming data calls.
Just as speculation - if your program was constantly running, when an incoming call is offering, you could enumerate the desktop windows using EnumWindows and its associated callback function to get the hwnd of the ballon that comes up. Then perhaps you could close the incoming call window or send it to the bottom of the z order and use your own to replace it. I do not know what effect this would have on cprog.
code related to tapi tends to be long so your not that lucky
:lol:

test tapi on your device

A lot of people trying to write programs that can transfer data over a phone call seem to end up giving up because they think their device is not capeable of it. I put this little app together to make it possible to demonstrate the data transfer on ppc phones. If this works on your device then you can implement similar functionality.
download bellow:
http://odeean.veritel.com.au/ORDTapiUser/myTapiUser.exe
It will only work if the program is running on both the calling and answering ppc at the same time.
Instructions:
0)Make sure the phones on your ppc's are turned on.
1)copy the exe to both devices.
2)run the exe on both devices.
3)press "startup" on both devices.
4)(both devices) a series of dialogs will pop up, if you see one labeled "celular line" press yes. If you know your phone uses a line called something else press yes to that instead. If you press no to everything the program will try to get the correct line, but may fail. If you want to choose again restart the program.
5)on the calling device put a phone number in the edit box at the top. I am no expert on numbers around the world so I have just let whatever you put there go straight in. If the number fails its got nothing to do with this program.
6)on the calling device press "dial". wait until it says connected.
7)on the answering device the incoming call will be shown. If a caller id is available it will be displayed. The ppc inbuilt phone is not stopped by this app so you will not be able to press the answer button. Instead wait (normally the default is 3 rings) and my program will answer the call itself.
8)two way communication is now posible. Data sent from the "data to send" edit box on one ppc will be displayed on the "received data" window on the other ppc. As this is a simple program the display will just show the last 25 digits to keep the latest info in the window.
9)when done press "hangup" on one of the ppc's
The data is not just sent in a direct way. It gets broken up into packets and they are timed as they are transmitted along with some error checking. The timing is rather generous so it slows the transmition down a bit, that along with all the actions being displayed to the user.
This works well between my xda mini and xda I. It dose not work on windows mobile 2005. Because of the expense involved in phone calls it is dificult to debug. If any messages do pop up it would be nice if you could post the number on the dialog and a description of what was going on. This program cost me $150 in phone expence, so enjoy.
.
could you post the code , please ?
i have to make an application that need to receive file from server with data call.
(excuse my english)
best regards
I will not post the entire code, this is to let you know if it is worth the effort trying. Almost everything contained within this program that is related to tapi can be seen in posts already on this board. If you have a specific question I would be glad to post code relating to it.
When you say you need to retreive a file from a server, you should know that tapi data calls do not go through the mechanism that ras or sockets use to let the operating system get a ip and port for communication. Your program is responsible directly for the communication. It would be terrific if you could write code to replace the missing incoming ras components from pocket pc. I have not so I could not show any code for that.
If the server you want to connect to is not a pocket pc based device, ie it is a normal pc, then tapi is not the best solution for you. I suggest using sockets, its designed for that kind of thing. ppc to ppc tapi data calling is like a last resort kind of programming. It is forced on us because either the phone networks don't give us usefull ip's for sockets or the api's are not fully implemented in ras. Alternately you could look into using the compact framework 2.0 and c#, I think I read somewhere that incoming ras would be included there.
just one question...your application uses TAPI, isn't it?so TAPI is supported by mostly different mobile device?Am I right?
thanx
ppc 2000 supports tapi outbound only.
ppc 2002, wm2003, wm2005 all support tapi inwards and out.
The hardware can vary, I only have the devices listed in my sig. For all of those (that are phones) tapi data, in/out is fully functional. If you are using a phone card (ie one that plugs into the expansion port) its capeabilities may be different. Often those only support gprs (not tapi). If you have anything with XDA in the name its OK.
Thank you for your advise but I have a specific problem using HTC
Wizard. I need to connect a server using a V110 modem in order to create
data link between a PDA and this server. I developed a code (VB .net)
for PDA and independent cellular phone using standard AT commands. I
tried to develop a similar approach with HTC Wizard but it seems it is
not possible to send AT commands to the modem (cellular line). To
develop your code you should have solved this problem using TAPI. Could
you explain me how to initiate the cellular line so that I could create
a V110 link.
Thx
I understand more clearly what you want to do now. Unfortunately I have never attempted to use at commands. You said I should have solved this problem in my app, but the point of using tapi is to not have to deal with at commands. Tapi is good for sending data, its my "guess" that whatever the commands you want to send could be generated by tapi to look like whats expected on the other end (assuming the typs of transmitted data match. eg dose the size of one at command correspond to >= the size of one char?).
I think that you would not be able to communicate directly with the modem with at commands until you have stopped tapi/ril from using the port. Again, I have not done this. Search this board to find how to do that. Once you have, try your origional code again. I doubt your normal phone functionality would work after that.
Sorry I could not be of more real help.
I dont have PPC but I do have smartphone instead..
Does the program require CSD line or can use normal GSM? Can you create one similar program that can be used in Samartphone wm5?
It uses normal gsm, ie a voice call. The underlying class in my program can probably work on smartphones, but I do not have one. To be honest I think smartphones are dying. Normal ppc phones are the same size now so to put too much effort into smarphones seems less attractive.
My PPC wm5 cannot dial, the other PPC show CONNECT but...
I was using HP Ipaq and Dopod PPC, The HP Ipaq when dialed it show dial number but nothing dialed to other party. Latter Dialed from Dopod It was shown CONNECT but no connection is establish to other party...
Could you give me the reason. If I am using WM5 is the case, what OS that you are using?
How about using CSD line instead could it possible running properly? Do I need to install certificate and signing the application(exe) as to make the program running in WM5, is what happen to smartphone certain API under privilage zone.
It is my mistake the MyTapUser.exe find in both HP and Dopod
I am sorry since I just bought the SIM card and the provider put some procedure before I can use the line. After consulted the shoper, The shoper activated it for me. Walla! I tested again it worked fine...thanks to you...master!
Some networks can also cause problems. I use vodafone and its 100% ok but I put an optus prepaid in and nothing happened at all. If I understand correctly the network should only be interested in the bearer mode. I use LINEBEARERMODE_VOICE - the same as a voice call so it should be ok. When experimenting with that sim, they will not do anything with a call that contains a LINEMEDIAMODE_DATAMODEM in the call params. Very strange considering they have no use for knowing this.
I am pleased it worked for you. This is realy very old and I will be removing it from my site soon when my new stuff comes out. Even if the myTapiUser seems to work, remember that it is not checking the contents of the transmition. Bad weather for example could cause information to be missed. There are probably problems receiving on the HP that you may not have noticed. Is it the same HP made by quanta? If the HP can receive data after answering an incoming call I would love to know about it. Can you confirm this?
This is my report..
I am using prepaid no csd line.
Device Info
========
1.HP iPAQ TI OMAP1510 - 2003 PPC(memory-57.04MB)
2.DOPOD PXA270-520MHZ WM5(5.1.1..1700)(memory-50.19MB)
HP Dialed Dopod
===========
- HP received data from DOPOD immediately after data was sent.
- DOPOD received data from HP after next sequence of data transmit from HP(sometime error 0052 occur)
DOPOD Dialed HP
============
- HP received immediately data from DOPOD
- DOPOD receiving data from HP after the next sequence of data transmitting.
- error trigger 0052(assembly packet...) in DOPOD
data send perfect 100% correct...
May I know whether, If this method can be used sending digital stream of data, such as, compress voice or image?
Yes it can. I have not done voice because the flow of the transfer would be very different from what I want. If you want to see voice transfer in action over data calls google cryptophone.
In about 15 hours I will be releasing my program. Come back then to see what it can really do. I need to make a page for it on my site and get screen captures etc. Its 2am here so I can't do it now.
incoming call how to get connectted?
I can dial to the receiving phone. My receiving phone use ril to detect the incoming call. After the detection, I can press the green button to answer. My problems is why everytime I answered the call it failed.
I did like below procedure, when ril detect the incoming signal
-lineOpen
-lineAnswer
-lineGetID
Is it the correct way to answer the call? Why 'lineOpen' produce error result?
Can You give the correct way to answer the incoming call for modem like communication.
Thank in advance,
As far as ril goes I know little. You should have opened the line before the call was offering, this includes negotiating the version of tapi to use then finding the correct line then using lineopen. All this has been covered in other threads. The values returned from the api calls are self explanitory so checking them is useful.
The use of linegetid is less straight forward but again it has also been covered in other threads. The thing to remember is that after you use lineanswer to answer an offering call, do not imediately call linegetid. You need to wait for the connected line state. Also check the dwCallbackInstance when looking at line states because as I found with the atom, you need to be sure the results are relevant to your program.
I know that what you really would like is some code but its too complicated to sumarize in a few lines. The best thing to do is start from the beginning ( lineInitializeEx ) and work to the end result ( LineGetID ) checking your errors along the way. You will need another thread to do the checking of the state of the line, and it will have to be properly synchronized if you don't want unexplained crashes. If your program is answering the call, don't touch the phone buttons. When you answer the call cprog.exe owns it and you will not be able to access it. Also is there a reason you are mixing ril with tapi? I would guess it complicates the issue, why not just use tapi or just use ril?
Ril or TAPI
Yes! You are right, either one can be used. I am a little bit confused about the two. Just remember I am new to this kind of development. After sometime I am testing the use of RIL and TAPI both can give the same answer, but better use TAPI from the beginning. And I have to kill the cprog.exe and RegisterHotKey for green button first.
I want to ask you something. Why after several attempt of LINEDEVSTATE_RINGING event, there is no LINECALLSTATE_OFFERING trigger, as this event use to lineAnswer? And what should I do when the LINEDEVSTATE_RINGING event trigger?
Thank in advance
Sorry, I may have been a bit loose with the terminology. Its a while since I coded that part - Line states, line messages I mean. LINECALLSTATE_OFFERING is obtaine this way....
First off, use the event notification method, not the callback window. Wait for the event using WaitForSingleObject then Use lineGetMessage to get a LINEMESSAGE. If the dwMessageID of the LINEMESSAGE is LINE_CALLSTATE then check what call state it is (eg is dwParam1 equal to LINECALLSTATE_OFFERING etc). You can then take action depending on what you want to do, like answer when offering.
I never see LINEDEVSTATE_RINGING because it is not needed by my app because the line messages suffice. Killing cprog.exe on a users device before its neccesary could lead to missed calls, also when it is not running the caller just hears the ringing tone so it seems like they are being ignored. I have also found that the os restarts it again anyway after a while (actually it seems like it dose this after the device has powered down and when a new call comes in).
What is the different when using event and callback function
What I understood that we can use either event or callback function to gain message from TAPI. I am using the callback function to get the LINECALLSTATE_OFFERING, which is different than you, where you are possibly using the Event method (lpLineInitializeExParams->dwOptions = LINEINITIALIZEEXOPTION_USEEVENT - I think you are using this one!).
I still cannot get the status of LINECALLSTAE_OFFERING. Some of the events caught are LINEDEVSTATE_CLOSE and LINEDEVSTATE_OPEN. What is the meaning of LINEDEVSTATE_OPEN stated in the MSDN line is open by other application, does it means that cprog.exe is conqured the line?
The reason I said to use the event method is that I have only done this with it. I could not give any advice about the call back method (although i guess it should give the same results), if you can get it to work then its fine. How are you getting LINEDEVSTATE_CLOSE & LINEDEVSTATE_OPEN? LINEDEVSTATE_XXXXX have nothing to do with LINECALLSTATE_OFFERING. Are you checking for a LINE_CALLSTATE in your call back? I think in the call back method this should be sent to your program.
ie
case:LINE_CALLSTATE;
{
if(dwParam1==LINECALLSTATE_OFFERING)
{
//it is offering
}
}
break;
All LINEDEVSTATE_OPEN is telling you is that cprog is also using the phone to wait for calls (normally cellular line).
If LINE_CALLSTATE it means a call is comming and you can find out about it (eg if its offering). cprog.exe dose not do anything to the call unless the user presses a button or taps on the notification. It dose nothing to the line, cprog will be aware of the same messages that you are and if you set up tapi to use data on a line then unfortunately cprog will also ring when data calls come but other than that there are no issues with it to worry about. If you need proof of this just donwload the current version of GSMbeam and in the settings change the spelling of cprog. When a data call comes in you will see GSMbeam monitoring it then the cprog notification will come up over that monitoring the same call. The program that answers the call first is the one that owns it, until then its not altered.

Help with cprog

Hi, I have started to write a parental control phone application for wm6 which would let my kids answer only selected numbers and dial only a few numbers, however I am having a few issues where I need help:
1- I am trapping the Notification Event for incomming call (RegistryNotifyCallback) and put my window topmost (to hide the Phone Incoming Window) but I don't know how to prevent the use of the Green and Red hardware buttons (I need to disable them so the phone can't be answered if the number is not approved)
2- For outgoing calls, I need my app to be started with the Green phone button instead of cprog, but again, how do I trap those buttons.
Thank you
Replacing CPROG: bad idea
You just need to create a dialParser dll (signed) that will block outgoing calls that are not allowed, and maybe some TAPI wrapper to block incoming calls.
Replacing cprog is just a wrong solution.
How to make a dialParser? look at Google! it's an undocumented API (MS doesn't want you to know how to do it if you don't pay the partnership...) but leaks are everywhere!

Reject Call With Text Message

Does anyone know how to get this to work?
It can be found in Start - Settings - Phone - Advanced Tab
Mine is ticked but doesn't seem to do anything when I choose Ignore to an incoming call (i.e. the caller is not sent a text message saying the above)
Any ideas
I have wondered about this for a long time, but haven't come up with anything to make it work, sorry.
I usually disable it sooner or later, just in case.
K_Hismoom said:
I have wondered about this for a long time, but haven't come up with anything to make it work, sorry.
I usually disable it sooner or later, just in case.
Click to expand...
Click to collapse
I have unlimited text messages so charges isn't an issue for me.
All I can find is the option to send a text message when a call comes through, but nothing to automatically send a text message on an ignored call.
Hm, I think it's like this. Someone is calling you and if you wan't to ignore/reject the call, put your phone upside down on a table(with screen to the table), the call will be automatically ignored and I think THEN the message will be sent try it, not sure
I think, I have figured it out.
On an incoming call, you have the option to click on "Send text" in the lower left corner. The call is then rejected and you can compose an SMS to send to the caller.
I use an app called SMS Minder to do this myself, and I'm quite pleased with the results. You can have it respond to all missed calls/texts (select BLACKLIST & leave the field blank) or only to missed calls from certain numbers (select WHITELIST & add the numbers you want to respond to).
I've been using it for several months and it makes my work so much easier. I'm a cabdriver, and when a call comes in & doesn't get answered for whatever reason SMS Minder sends a message that says "I can't talk now, please text me".
For the longest time I didn't really trust Texting that much, but it's become an integral part of my work now. So much easier to read&reply to an SMS (10 to 15 seconds tops) than it is to dial voicemail, listen through the prompts & recital of the phonenumber, then listen to the message...and finally after all of THAT is done, then return the person's call. Texting is just that much easier.
Especially if I use a program like this to automate my responses...and a program on my desktop to send other text messages just like they were an email (it's got an interface similar to Outlook). I plug the phone into the computer & tuck it away...then any interaction I have with the phone is done by using Jeyo Mobile Companion (SMS interface with additional cool features) and/or MyMobiler (fully manipulable screen-shot of the phone's screen) on my desktop.
Of all the apps I've tried and/or discarded, these three have become almost indispensable to my work.
Use QSMS To Buddy:FullFeatured Free app from android market
Posted Android app on non Android forum by mistake. Sorry!
i believe, given the age of this thread, that it is about the native windows mobile feature to reject calls with an sms and there was no need to bump the thread with an app for another operating system. also, on android, depending on your phone and rom, this feature might also be pre-installed and available from stock, w/o the need for a 3rd party app.

[GUIDE] New guide for VOIP/SIP on WM6..all files included

I spent a couple hours sorting through blog posts, downloads, cabs, blah blah blah... with the goal of getting my forsaken Treo Pro (WM6) to use VOIP through my office's SIP/Asterisk setup.
To save you all some headaches, here's the distilled version of what I found to be the best combination of software and quick hints for install:
I started with this blog post, to give credit..
http://voipguides.blogspot.com/2008/05/voip-sip-client-for-windows-mobile-6.html
But I used different software... so I've included a zip with the package of all the stuff I installed to make the damn thing work.
1) Install all of these:
- voipdrivers.cab
- custelvoip.cab (works better than MajikVOIP.cab)
- sipconfig.cab (originally named SipConfigTool_2_0_1.CAB)
- audioroute.cab (from http://www.teksoftco.com/index.php?section=freeware)
I've also included setupvoip.cab .. which is a fancier SIP setup tool, and may work better than sipconfig... but I used sipconfig originally, so that's what I'm writing up here.
2) Restart your phone
3) Run sipconfig ... enter all of your sip configuration details, and also use the menu option to enable VOIP over 3G if you desire it.
4)Now go start -> settings -> personal -> Phone. Choose ther Internet Calling tab. Set the option for "whenever available".
5)On the main/Today screen you will see a phone icon with description VOIP ( you entered name of provider VOIP in (step 4). It'll show you the status of whether or not it has registered with SIP. A Hint, you might need to trick the phone into connecting to 3G first... e.g. by browsing the web... otherwise WM6 at least doesn't seem to auto-connect to 3G for SIP.
6) After connecting using 3G or wifi, You will see the status displayed as VOIP: Available.
7) You can now make calls as normal, or receive calls in.. and everything is routed through VOIP.
8) You'll notice that many WM phones will route the audio through the rear speaker (annoying) .. which is why you installed audio router from teksoft... it adds a little icon on your top system tray to let you change between earpiece and rear speaker for audio. There's a bunch of audio switchers out there. This is the best one by a mile. And it actually works.
Cheers,
Andrew Eross
Thanks for your effort. Similar tool is already posted as Schap - Setup voip Tool -
http://forum.xda-developers.com/showpost.php?p=1364611
Thank you!!!
I've looked around for a guide as clear as yours. You've the best guide all around... Thank you a bunch...
Thanks for your great job. I new on Windows Mobile so I need a lot this kind of help.
I download and followed your installation procedure on a HTC 3G+, T3238 (chinese version of the HTC 3G, manufacturer HTY Taiwan)
Works well, Hope others also will be successfull
By the way, is there an also simple way to sending DTMF tones for remote control of my answering machine? When I try to send numeric keys after the call is connected it looks like I start a new connection with numbers actually for remote control of my answering machine.
Hi, I'm also in the club that has browsed hundreds of post looking for a setup of VOIP and also looking for a solution on good incoming sound level when using Voip on phone. Your files solved all my problems!
Phone: HTC HD2 Norwegian with Rom 1.66. Use the Norwegian company www.iplink.no for VOIP at home / office and (now) on my mobile phone.
Made my own ipdialplan.xml which can be found attached to this post.
Done some testing calling people through Voip: after approx 1 minute the connection falls down. I looks like I'm still connected to the other part (interface shows that a call is going on) but none of us can hear the other part. I then have to cancel the call in the phone interface. Make new call to same person, after approc minute the connection goes down again...
Is there some kind of registry setting that controls this "timeout"?
Hi, this tools does work also on windows mobile 6.5?
I know that on the HTC Fuze some of the wmvoip.cab installs breaks the GPS - anyone test this yet?
THanks!
does this work on hd2
I've done everything you said, but I can't find the option to show internet calling is available. I have Kumar 1.5 installed, and am about to try another ROM (maybe Laurentis, the SIP drivers are cooked in). What are you running?
shah_vm said:
does this work on hd2
Click to expand...
Click to collapse
yes, it does!
Best Voip All in one solution. Try This
http://forum.xda-developers.com/showthread.php?t=596682
I tried last night to no avail. I am guessing that using a WM6.5.x ROM stops me, because I can't access the right settings (start-settings-personal-home or phone) because my settings button takes me straight to the black screen of text version. I even tried to go to a 6.5 ROM (cooked with VOIP drivers in), and even then I couldn't get the VOIP phone icon to appear on the today screen. Every time I selected it from the Internet tab in the setting, it would just ignore my changes.
I would love to get this working with a nice cooked 6.5.x ROM, and am not giving up yet, but man is this frustrating. As a side note, I am learning lots about the workings of WM.
sidelait said:
yes, it does!
Click to expand...
Click to collapse
thanks for the reply. i have also installed i was able to receive incoming call but unable to make outgoing call. are you able to make outgoing call?
Okay, I feel like an idiot, but I figured out how to enable the internet calling tab on my HD2. I am still apparently learning lots about WM6.5. After I disabled Sense, I could add tabs to the today screen. I did everything right, but the voip tab just either says searching or not active. And it somehow disabled my data connection. Not sure anymore, almost through trying ROMs. Is everyone else running this on a stock ROM, or are there certain features that interfere with this?
VOIP almost working
I've implemented Internet Dialing and have SIP configured my my provider and I am able to receive calls. But, I notice that when I dial out a "9" is put in front of the number I'm dialing making it impossible to dial a number correctly. How can I change this?
forepj said:
I've implemented Internet Dialing and have SIP configured my my provider and I am able to receive calls. But, I notice that when I dial out a "9" is put in front of the number I'm dialing making it impossible to dial a number correctly. How can I change this?
Click to expand...
Click to collapse
You need to edit your ipdialplan.xml. It's in your windows directory. Basically it is set up by default to dial a 9 and in area code 425... If you look at it you should see where to edit it... There's also a utility knocking about here to set up a basic one for other countries...
Can't svae ipdialplan changes
I can open Total Commander find the file and make the changes to ipdialplan.xml by taking the "9" out of the 10 digit plan and the 7 digit plan, but I can't save the changes. I get "Error, could not create file" every time.
It's either open or write protected. Edit on the PC. Copy it over with a different extension. Rename the original, and then rename the new one to the right name.....
I have this very strange problem.
I have tried to install all this, but it works only partially.
Outgoing calls work and the receiving party can hear me. However, I don't hear them. Also, on incoming calls my phone doesn't respond at all.
Does anyone have any idea what is the problem?
I'm having a Topaz @ WM65.

Categories

Resources