Configuring (GPRS) connections (programmatically)

Fellow Experts,

Assuming a freshly installed Windows Mobile 2003/2005 device, I need to programmatically add/configure connections. I think the settings are normally done through the Settings / Connections / "Add a new modem connection" menu, so I figured there must be a way to let an application do that.

My question is two-fold:
1a. Can I get some specific pointers on which methods/API's I should look into to accomplish this (i.e. not just "TAPI" or something but necessary methods)?

1b. Partially or fully working examples?

I'm looking to add a GPRS / UMTS connection, and later also a WiFi connection (but that probably needs to be a different Q, if somebody knows this though I can setup that Q for points). Shouldn't be that difficult but it's a short term thing..
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

OnixExpAuthor Commented:
Found this example in the SDK:

BOOL GetPhonebookEntries (HWND hDlgWnd)
  int index;
  DWORD dwSize, dwEntries;
  HWND hWndListBox;

  // Allocate an array of RASENTRYNAME structures. Assume
  // no more than 20 entries to be configured on the
  // Windows CE-based device.

  if (!(lpRasEntryName = new RASENTRYNAME [20]))
    MessageBox (hDlgWnd, TEXT("Not enough memory"), szTitle, MB_OK);
    return FALSE;

  // Initialize the dwSize member of the first RASENTRYNAME structure
  // in the array to the size of the structure to identify
  // the version of the structure being passed.
  lpRasEntryName[0].dwSize = sizeof (RASENTRYNAME);

  // Size of the array, in bytes
  dwSize = sizeof (RASENTRYNAME) * 20;

  // List all entry names in a remote access Phone book.
  if ((RasEnumEntries (
          NULL,               // Reserved, must be NULL
          NULL,               // Phone book is stored in the Windows CE
                              // registry.
          lpRasEntryName,     // Pointer to structure to receive entries
          &dwSize,            // Size of lpRasEntryName, in bytes
          &dwEntries)) != 0)  // Number of entries placed in array
    MessageBox (hDlgWnd, TEXT("Could not obtain RAS entries"), szTitle,
    return FALSE;

  // Get the HWND of the list box control.
  hWndListBox = GetDlgItem (hDlgWnd, IDC_RASNAMES);

  // Remove all items from a list box.
  SendMessage (hWndListBox, LB_RESETCONTENT, 0, 0);

  // Add the names of each RAS connection to the list box.
  for (index = 0; index < (int)dwEntries; ++index)
    SendMessage (hWndListBox, LB_INSERTSTRING, index,

  return TRUE;

So it seems like I've foudn the answer to my questions.
Closed, 500 points refunded.
Community Support Moderator

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Smartphone Programming

From novice to tech pro — start learning today.