Firstly, thanks for your help.

I got the modem fired up for dialling up. I can make a call to my mobile phone already.

I got an enquiry about the RasDial function. What I want to do is after the RasDial function is executed, the code will jump to the next line and continue running, with the modem stayed connected (to the other device). What happen right now is that after dialling up the modem, it connects but then just hangs there (I thought it is still stuck within the RasDial function), doing nothing.

I have done some research in the MSDN library about the RasDial function but I am totally confused about it. What is the parameter LPVOID lpvNotifier about? What is the use of RasDialFunc()? How can I use that? What does a callback function do and when does that happen?

Here is my code:
rdParams.dwSize = sizeof(RASDIALPARAMS);
rdParams.szEntryName[0] = '\0';
lstrcpy(rdParams.szPhoneNumber, szPhoneNumberToDial);
rdParams.szCallbackNumber[0] = '\0';
lstrcpy( rdParams.szUserName, szUserName );
lstrcpy( rdParams.szPassword, szPassword );
rdParams.szDomain[0] = '\0';

DWORD dwRet = RasDial(NULL, NULL, &rdParams, 0L, NULL, &hRasConn);

Thanks again.