Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. C / C++ / MFC
  3. RasDial Problem

RasDial Problem

Scheduled Pinned Locked Moved C / C++ / MFC
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Matt James
    wrote on last edited by
    #1

    I am trying to use RasDial to establish an internet connection, but am getting an error that I don't understand. Here is the code that I am using: RASDIALPARAMS dialParams; DWORD dwRes; CString cs; char szError[50]; dialParams.dwSize = sizeof( RASDIALPARAMS ); strcpy( dialParams.szEntryName, "" ); strcpy( dialParams.szPhoneNumber, "szPhone" ); strcpy( dialParams.szCallbackNumber, "" ); strcpy( dialParams.szUserName, "szUser" ); strcpy( dialParams.szPassword, "szPW" ); strcpy( dialParams.szDomain, "" ); dwRes = RasDial( NULL, NULL, &dialParams, 0, NULL, &m_hRasConn ); if( dwRes == 0 ) {      m_list.AddString( "Success." ); } else {      RasGetErrorString( dwRes, szError, sizeof(szError) );      cs.Format( "Error: #%d = %s - Handle: %s", dwRes, szError, (m_hRasConn == NULL) ? "NULL" : "Non-NULL" );      m_list.AddString( cs ); } The error that I'm getting is that it "Cannot find phonebook entry." My understanding is that this makes no sense, since in Win98, phonebooks are not valid and should be ignored. I've checked the article at http://www.codeproject.com/internet/dialup.asp, but my code seems identical to that example. Does anyone have any suggestions? Thanks, Matt J

    M 1 Reply Last reply
    0
    • M Matt James

      I am trying to use RasDial to establish an internet connection, but am getting an error that I don't understand. Here is the code that I am using: RASDIALPARAMS dialParams; DWORD dwRes; CString cs; char szError[50]; dialParams.dwSize = sizeof( RASDIALPARAMS ); strcpy( dialParams.szEntryName, "" ); strcpy( dialParams.szPhoneNumber, "szPhone" ); strcpy( dialParams.szCallbackNumber, "" ); strcpy( dialParams.szUserName, "szUser" ); strcpy( dialParams.szPassword, "szPW" ); strcpy( dialParams.szDomain, "" ); dwRes = RasDial( NULL, NULL, &dialParams, 0, NULL, &m_hRasConn ); if( dwRes == 0 ) {      m_list.AddString( "Success." ); } else {      RasGetErrorString( dwRes, szError, sizeof(szError) );      cs.Format( "Error: #%d = %s - Handle: %s", dwRes, szError, (m_hRasConn == NULL) ? "NULL" : "Non-NULL" );      m_list.AddString( cs ); } The error that I'm getting is that it "Cannot find phonebook entry." My understanding is that this makes no sense, since in Win98, phonebooks are not valid and should be ignored. I've checked the article at http://www.codeproject.com/internet/dialup.asp, but my code seems identical to that example. Does anyone have any suggestions? Thanks, Matt J

      M Offline
      M Offline
      Masaaki Onishi
      wrote on last edited by
      #2

      Hello, the codegurus around the world.;) I think that you should put any name in szEntryName. If you put szEntryName as "", it means no entry phonebook. Have a nice day! -Masaaki Onishi-

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups