Link to home
Start Free TrialLog in
Avatar of fox404
fox404

asked on

Code for dialing to a server using a modem

Hi All,

Below is the extract of code for dialing to a server using a modem. It is working fine in Win98 but not in Win2000 and XP.

The modem returns a string “Error”.

 

CString m_ServerNum = “9,64809988”;

CString serverCmd = "ATV1Q0DT";

serverCmd = serverCmd+m_ServerNum;

serverCmd.Insert(serverCmd.GetLength(),13);

UINT len = serverCmd.GetLength();

char* StartupStr = (LPTSTR)serverCmd.GetBuffer(len);

 

if (!::WriteFile (hPort, StartupStr, len, &BytesWritten, NULL))

            return ERROR;

ASKER CERTIFIED SOLUTION
Avatar of Jaime Olivares
Jaime Olivares
Flag of Peru image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fox404
fox404

ASKER

Hi Jaime,

I did try this code "WriteFile" in Window98, it is working, but in Windows 2000 and Windows XP it is not working!

Do you have any idea?

Fox404