Urgent! Help me for RasDial() under WinCE programming.
I wrote an application using eVC++3.0 under WinCE/PocketPC, but it can't dialup connection to internet like under Win2000.
See attached file (same source code for WinCE & Win2000):
(1) RasDial_Win.zip; dialup connection to internet, it's work very well!
(2) RasDial_WinCE.zip; same code as RasDial_win.zip,but it's not work???!!
under WinCE, OS sends WM_RASDIALEVENT to notifier window. if you'll see inside MFC sources, you'll find that there is special treatment for this message in CDialog class. Thus you should change default handling in PreTranslateMessage function of your dialog class
Thanks for your help. You are great!
It's a great help to me.
the application is working very well now under PocketPC PDA, and show me the "connected" message.
But there is another Question that I can't find DUN icon on system tray, when I open IE (Internet Explorer) Browser, the PDA begin dialup to internet again, Could you tell me what happened?
I guess whether RasDial() function under WinCE could not build PPP to internet? How would i do?
I quite agree with what you said about RasDail() with PPP.
But How could I put DUN(Dial-UP Network) icon on PDA's system tray when RasDial() function showed "connected" message?
> First, When I have dialed to internet manually on PDA, Then I open IE Browser, there will be not open the internet DialUp Dialog, but open directly the web page what i inputted.
> Another way: First, When I have ran RasDial_WinCE application, and I saw the "connected" message on status text, Then I open IE Browser, there will be open the internet DialUp Dialog, means that IE Browser think the internet connection have not build yet.
which WinCE version do you use? it's important because there is significant difference between PocketPC 2000 and PocketPC 2002, because the last one use Connection Manager API to connect to anywhere, RasDial here doesn't work so far
i saw some example of using Connection Manager API at Microsoft site, under SmartPhone section I suppose, so please just search for it, unfortunately I have no ready example
as for InternetDial, you may check it with WinCE help. I don't use it because I don't use Pocket IE, just tcp/ip-based (tcp, ftp, http)or serial communications under wild WinCE world
InternetDial function seems to be declared but not presented in wininet.lib so better don't use it. as for Connection Manager example, check out CMHelper sample in PocketPC 2002 sample folder or see attachment
I have downloaded the CMHelper sample,and built to EXE file. the EXE file can work well on PDA running Pocket PC 2002.
When I press the "Connect" button in CMHelper application, It can automatic open DUN(Dial-up Network) Dialog Box of PDA system default, and connected to internet.
But there is other Question: I can't control ConnectionManager API that connect to internet with my specified (or selected) internet connection or device. don't like my attached file in my previous post that used RasDial() or InternetDial() func.
in fact, I need simply to new(create) a internet connection and select it, then open DUN Dialog Box of PDA system default. finally can dialup connection to internet and show connected icon on PDA's system tray.
The CMHelper sample is a very useful, because it can open DUN Dialog Box of PDA system default and connect to internet.
But there is only one Question that I can't specified internet connection name (or named internet Entry name) to it.
CMHelper automatically dialup to internet out of control.
I have to beg your help again! Thank you again.
and I will read those topic about Connection Manager API in earnest.
i suppose you may try to search in device registry where it stores connection information. via GUI it's done in 'Connections' stuff, but matter of fact that if you will create your own entry through RAS functions - you wont see them under 'Connections'\Internet or Work dialogs. but opposite is correct: phone book entry created via Windows will be successfully enumerated with RAS functions. Thus, WinCE 2002 saves some additonal info somewhere. Unfortunately I haven't had time to investigate PocketPC registry. Please let me know if you'll have some progress on this way.
I have found the registry setting for default ConnMgr internet connection on PocketPC 2002.
Here is the registry key:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ConnMgr\Providers\{EF097F4C-DC4B-4c98-8FF6-AEF805DC0E8E}\HTTP]
"SrcId"="{F1A66900-BF1F-512F-8405-30406A6A92DE}"
//{F1A66900-BF1F-512F-8405-30406A6A92DE} is the default connection DestId for example
If We modify this registry key, CMhelp will automatically dialup and connect to internet with different (internet) connection setting.
I have tried manually to change this registy key many times, all times is all right.
Next step, I need to program for creating(new) a internet connection on PocketPC 2002.
Another thing:
please see the attached file about notifications Under Pocket PC 2002.
Is it helpful for RasDial API to dial-up to internet?
because of : "Under Pocket PC 2002 users can now be notified of events via notifications. These can either be just an icon that appears on the navigation bar that a user must click on to get further information or a bubble that appears."
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.