CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    Join Date
    Mar 2003
    Posts
    14

    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???!!


    Thanks for any suggestion!
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2003
    Location
    Cambridge, UK
    Posts
    752
    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
    Cheers,

    Alex
    Please rate this post if you find it helpful

  3. #3
    Join Date
    Mar 2003
    Posts
    14

    Thank alex_gusev for your help.

    Hi,alex_gusev

    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?

    Thank you for your suggestion!

    Regards,

    Owen Fang

  4. #4
    Join Date
    Jan 2003
    Location
    Cambridge, UK
    Posts
    752
    hi,

    RasDial establishes PPP, but you need to check what's Internet Options says, i.e. like at Desktop which connection method IE uses currently
    Cheers,

    Alex
    Please rate this post if you find it helpful

  5. #5
    Join Date
    Mar 2003
    Posts
    14
    Thank you for your help!

    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.

    Regards,

    Owen Fang

  6. #6
    Join Date
    Jan 2003
    Location
    Cambridge, UK
    Posts
    752
    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
    Cheers,

    Alex
    Please rate this post if you find it helpful

  7. #7
    Join Date
    Mar 2003
    Posts
    14

    Thanks a lot.

    Thanks for your help!

    O, I use PocketPC 2002. You are great!

    Would you give me an example use Connection Manager API on PocketPC 2002? Thank you very much!

    And, Do you have other function can work under PocketPC 2000 and PocketPC 2002 together?

    Did PocketPC 2000 and PocketPC 2002 support InternetDial()function?

    Thanks a lot.

    Regards,
    Owen Fang

  8. #8
    Join Date
    Jan 2003
    Location
    Cambridge, UK
    Posts
    752
    hi,

    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
    Cheers,

    Alex
    Please rate this post if you find it helpful

  9. #9
    Join Date
    Mar 2003
    Posts
    14

    Thanks a lot!

    Thanks a lot!

    I ready to use InternetDial() function to implement Dial-UP connection to internet Under WinCE/PocketPC PDA.

    I wrote two samples of same code that used InternetDial() function for both Win2000 and WinCE/PocketPC.

    please see the attached file.

    The application for Win2000 can be build successfully and work very well on Win2000.
    But the application for WinCE/PocketPC can't build successfully.

    Would you help me to try it?
    Thanks again!

    Regards,
    Owen Fang


    below is the report of building error:

    Deleting intermediate files and output files for project 'InternetDial_WinCE - Win32 (WCE x86) Release'.
    --------------------Configuration: InternetDial_WinCE - Win32 (WCE x86) Release--------------------
    Compiling resources...
    Compiling...
    StdAfx.cpp
    Compiling...
    InternetDial_WinCE.cpp
    InternetDial_WinCEDlg.cpp
    Generating Code...
    Linking...
    Creating library X86Rel/InternetDial_WinCE.lib and object X86Rel/InternetDial_WinCE.exp
    InternetDial_WinCEDlg.obj : error LNK2019: unresolved external symbol __imp__InternetDial referenced in function "protected: void __thiscall CInternetDial_WinCEDlg::OnButton1(void)" (?OnButton1@CInternetDial_WinCEDlg@@IAEXXZ)
    X86Rel/InternetDial_WinCE.exe : fatal error LNK1120: 1 unresolved externals
    Error executing link.exe.

    InternetDial_WinCE.exe - 2 error(s), 0 warning(s)
    Attached Files Attached Files

  10. #10
    Join Date
    Mar 2003
    Posts
    14

    Hi,alex_gusev,Would you help to try InternetDial() function?

    Hi,alex_gusev,Would you help to try InternetDial() function?

    Please see previous post!

    Regards,
    Owen Fang

  11. #11
    Join Date
    Jan 2003
    Location
    Cambridge, UK
    Posts
    752
    hi,

    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
    Attached Files Attached Files
    Cheers,

    Alex
    Please rate this post if you find it helpful

  12. #12
    Join Date
    Mar 2003
    Posts
    14

    Hi,alex_gusev

    Hi,alex_gusev

    Thanks you for your help.

    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.

    Regards.
    Owen Fang

  13. #13
    Join Date
    Jan 2003
    Location
    Cambridge, UK
    Posts
    752
    hi,

    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.
    Cheers,

    Alex
    Please rate this post if you find it helpful

  14. #14
    Join Date
    Mar 2003
    Posts
    14
    Hi, alex_gusev

    thanks a lot.

    I will read those topic about Connection Manager API in earnest, and investigate PocketPC registry later.

    If I have some progress, I will tell to you immediately.

    Thank you for help again.


    Regards,
    Owen Fang

  15. #15
    Join Date
    Mar 2003
    Posts
    14

    [Hi, alex_gusev] About registry

    Hi, alex_gusev

    thanks a lot for your help.

    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."

    How do you think about it ?

    Thank you for your help again.

    Regards,
    Owen Fang
    Attached Files Attached Files

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured