Siva, You don't send anything explicitly through RAS. Instead, you use RAS to set up a TCP/IP connection over which your data packects will be sent and received. Think of RAS as connecting your PDA to a TCP/IP network. When your RAS connection is active, you can use HTTP, FTP or other protocol to exchange data. Handling RAS itself is not very complex, and involves the use of the RAS* APIs and the WM_RASDIALEVENT message. This message is used as a notifier to a specific window to help monitor RAS dialing events. If you are using MFC, handle it like this:
LRESULT CDlgRas::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
//
// Special check for WM_RASDIALEVENT message
//
if(message == WM_RASDIALEVENT)
{
return OnRasDialEvent(wParam, lParam);
}
return CDialog::WindowProc(message, wParam, lParam);
}
Here is an outline of the sequence to dial through a RAS connection: RasEnumConnections checks if there are any open RAS connections (you can only have one). If there is a connection open, check if it is the one you want with RasGetConnectStatus. To open the RAS connection, use RasGetDialParams, followed by RasDial. In this API, use the window that will receive the WM_RASDIALEVENT messages. To close the RAS connection, use RasHangUp. If you want to read some serious discussion on how RAS works under Windows CE 3.0, read "Windows CE 3.0 Application Programming" by Nick Grattan and Marshall Brain, from Prentice Hall. Good luck!