Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

641 lines
18 KiB

  1. /////////////////////////////////////////
  2. // File: RWPost.cpp
  3. //
  4. //////////////////////////////////////////
  5. //#define STRICT
  6. // Include Files
  7. //
  8. //Modifications :
  9. //MDX1 03/11/99 Suresh
  10. // In SendHTTPData() the MSID will be got from Cookie
  11. // it will no longer be red from the Registry
  12. //
  13. //
  14. #include <windows.h>
  15. #include <windowsx.h>
  16. #include <stdio.h>
  17. #include "resource.h"
  18. #include "Ithread.h"
  19. #include "icw.h"
  20. #include "util.h"
  21. #include "tcp.h"
  22. #include "rw_common.h"
  23. #include "dconv.h"
  24. #include "RwPost.h"
  25. #include "mcm.h"
  26. #include "ATK_RAS.h"
  27. #include "tcp.h"
  28. #define CONNECTION_TIME_OUT 1000 * 60
  29. #define MAX_PROXY_AUTH_RETRY 2
  30. static CInternetThread theInternetClass;
  31. extern BOOL bOemDllLoaded;
  32. extern HANDLE hOemDll;
  33. static DWORD dwConnectionStatus = DIALUP_NOT_REQUIRED;
  34. extern DWORD InvokePost(HWND hWnd,CInternetThread *p);
  35. void InitializeInetThread(HINSTANCE hIns)
  36. {
  37. theInternetClass.Initialize(hIns);
  38. }
  39. //
  40. // Returns
  41. // DIALUP_NOT_REQUIRED : Use Network for tx
  42. // DIALUP_REQUIRED : Use Dialupo for Tx
  43. // RWZ_ERROR_NOTCPIP : No TCP/IPO
  44. // CONNECTION_CANNOT_BE_ESTABLISHED : No modem or RAS setup
  45. DWORD CheckInternetConnectivityExists(HWND hWnd, HINSTANCE hInstance)
  46. {
  47. static int iAuthRetry =0; // Retry count for the number of times to invoke Proxy Auth Dlg
  48. static CHAR szProxyServer[MAX_PATH];
  49. CHAR szProxySettings[MAX_PATH];
  50. static int iChkInternetConnection = 0;
  51. static DWORD sdwConnectionStatus = CONNECTION_CANNOT_BE_ESTABLISHED;
  52. BOOL bNeedsReboot;
  53. BOOL bRet;
  54. DWORD dwPingStatus;
  55. DWORD dwError= RWZ_NOERROR;
  56. BOOL bProxyExists;
  57. MODEMSTATUS mStatus;
  58. DWORD dwTimeOut = CONNECTION_TIME_OUT;
  59. int iProxyPort;
  60. TCHAR szUserName[48] = _T(""),
  61. szPassword[48] = _T("");
  62. int iDisableAutoDial;
  63. iDisableAutoDial=1;
  64. if( sdwConnectionStatus == DIALUP_NOT_REQUIRED )
  65. return DIALUP_NOT_REQUIRED;
  66. if( sdwConnectionStatus == DIALUP_REQUIRED )
  67. return DIALUP_REQUIRED;
  68. // Disable Auto Dial only
  69. // if there are not active Dialup Connection
  70. //
  71. if( ATK_IsRasDllOk() == RAS_DLL_LOADED )
  72. {
  73. if( IsDialupConnectionActive() )
  74. {
  75. iDisableAutoDial=0;
  76. }
  77. }
  78. if(iDisableAutoDial)
  79. {
  80. DisableAutoDial();// Disable the Auto Dial
  81. }
  82. // Ping Current Host to check if TCP is
  83. // installed /configured.
  84. //
  85. // if it is for the first time
  86. // RWZ_PINGSTATUS_NOTCPIP : if no socket library or get hostname fails
  87. // RWZ_PINGSTATUS_SUCCESS : if gethostname and ping is successful
  88. // RWZ_PINGSTATUS_FAIL : if gethostname is succesful and ping via icmp fails
  89. dwPingStatus = PingHost();
  90. RW_DEBUG <<"\n Ping To Host (40: No TCP/IP 41: Success 42: Failure)=: " << dwPingStatus << flush;
  91. if (dwPingStatus == RWZ_PINGSTATUS_NOTCPIP )
  92. {
  93. return RWZ_ERROR_NOTCPIP;
  94. }
  95. if( dwPingStatus == RWZ_PINGSTATUS_SUCCESS ){
  96. bProxyExists = theInternetClass.GetSystemProxyServer(szProxyServer,MAX_PATH, &iProxyPort);
  97. if (1 /*bProxyExists*/)
  98. {
  99. //theInternetClass.GetSystemProxySettings(szProxySettings,MAX_PATH);
  100. //theInternetClass.SetSystemProxySettings(szProxySettings);
  101. theInternetClass.SetSystemProxySettings("itgproxy");
  102. if(1 /*Ping(szProxyServer)*/)
  103. {
  104. DWORD dwChkSite;
  105. int iExit;
  106. iExit =0;
  107. RW_DEBUG <<"\n Ping Success" << flush;
  108. theInternetClass.m_UserName[0] = _T('\0');
  109. theInternetClass.m_Password[0] = _T('\0');
  110. do {
  111. dwChkSite = ChkSiteAvailability(hWnd, theInternetClass.m_strIISServer,
  112. dwTimeOut,
  113. (LPTSTR) theInternetClass.GetProxyServer(),
  114. theInternetClass.m_UserName,theInternetClass.m_Password);
  115. RW_DEBUG <<"\n After ChkSiteAvailability : " << dwChkSite << flush;
  116. if( dwChkSite == RWZ_SITE_REQUIRES_AUTHENTICATION) {
  117. if( iAuthRetry++ > MAX_PROXY_AUTH_RETRY) {
  118. iExit =1;
  119. }
  120. // Modified on 2/4/98
  121. // No Need to call our Proxy Auth Dlg insted use
  122. // InternetErrorDlg() to invoke Auth Dlg
  123. //if(GetProxyAuthenticationInfo(hInstance,ConvertToUnicode(szProxyServer),
  124. // theInternetClass.m_UserName,theInternetClass.m_Password)) {
  125. //}
  126. }else {
  127. // Exit because Connectivity is OK
  128. iExit = 1;
  129. }
  130. }while(!iExit);
  131. if( dwChkSite == RWZ_SITE_CONNECTED)
  132. {
  133. theInternetClass.m_dwAccessType = INTERNET_OPEN_TYPE_PRECONFIG;
  134. // Modified on 2/4/98to use the PRECONFIGIED rather than the PROXY specified by
  135. // the user programatically
  136. // The INTERNET_OPEN_TYPE_PROXY is changed .....
  137. // This change is done in order for IE Auth Dlg
  138. dwError = DIALUP_NOT_REQUIRED;
  139. sdwConnectionStatus = DIALUP_NOT_REQUIRED;
  140. dwConnectionStatus = DIALUP_NOT_REQUIRED;
  141. goto ExitChk;
  142. }
  143. }
  144. }
  145. // No Procy so check for connection using existing LAN
  146. // already opened Dialup Connection
  147. // Set to NULL Proxy
  148. //
  149. theInternetClass.SetProxyServer("",80);// Set it To Null
  150. theInternetClass.m_dwAccessType = INTERNET_OPEN_TYPE_DIRECT;
  151. if( ATK_IsRasDllOk() == RAS_DLL_LOADED )
  152. {
  153. if( IsDialupConnectionActive() )
  154. {
  155. // Already Dialup COnnection is Active
  156. dwError = DIALUP_NOT_REQUIRED;
  157. sdwConnectionStatus = DIALUP_NOT_REQUIRED;
  158. dwConnectionStatus = DIALUP_NOT_REQUIRED;
  159. goto ExitChk;
  160. }
  161. }
  162. //
  163. // Check Lan Connection
  164. bRet = CheckHostName( ConvertToANSIString(theInternetClass.m_strIISServer));
  165. if(bRet)
  166. {
  167. theInternetClass.m_dwAccessType = INTERNET_OPEN_TYPE_DIRECT;
  168. if(ChkSiteAvailability(NULL, theInternetClass.m_strIISServer,
  169. dwTimeOut,
  170. _T(""),szUserName,szPassword))
  171. {
  172. dwError = DIALUP_NOT_REQUIRED;
  173. sdwConnectionStatus = DIALUP_NOT_REQUIRED;
  174. dwConnectionStatus = DIALUP_NOT_REQUIRED;
  175. goto ExitChk;
  176. }
  177. }
  178. }
  179. dwError = DIALUP_REQUIRED;
  180. sdwConnectionStatus = DIALUP_REQUIRED;
  181. dwConnectionStatus = DIALUP_NOT_REQUIRED;
  182. theInternetClass.m_dwAccessType = INTERNET_OPEN_TYPE_DIRECT;
  183. RW_DEBUG << "\n Before MDMCHK..." << flush;
  184. //MDMCHK:
  185. // Install Modem
  186. //
  187. /**bNeedsReboot = theInternetClass.InstallModem(hWnd);
  188. if(bNeedsReboot)
  189. {
  190. // ?????
  191. // This will be abnormally terminating the Registration Wizard,
  192. // So support modem installation in OS which dosent call for a reboot
  193. }
  194. **/
  195. mStatus = MSDetectModemTAPI(hInstance);
  196. if(mStatus != kMsModemOk )
  197. {
  198. dwError = CONNECTION_CANNOT_BE_ESTABLISHED;
  199. sdwConnectionStatus = CONNECTION_CANNOT_BE_ESTABLISHED;
  200. }
  201. if(dwError == DIALUP_REQUIRED )
  202. {
  203. // Load RASPAI32.DLL and Exit if it can not be loaded
  204. if( ATK_IsRasDllOk() != RAS_DLL_LOADED )
  205. {
  206. //
  207. dwError = CONNECTION_CANNOT_BE_ESTABLISHED;
  208. sdwConnectionStatus = CONNECTION_CANNOT_BE_ESTABLISHED;
  209. #ifdef _LOG_IN_FILE
  210. RW_DEBUG << "\n RASAPI32.DLL NOT FOUND ...";
  211. #endif
  212. }
  213. }
  214. ExitChk:
  215. #ifdef _LOG_IN_FILE
  216. RW_DEBUG <<"\n Chk Connection ( 1 = via NTWK, 2 = DIalup , 3 = Problem) " << dwError << flush;
  217. #endif
  218. theInternetClass.UnLoadInetCfgDll();
  219. return dwError;
  220. }
  221. //
  222. // Returns
  223. // DIALUP_NOT_REQUIRED : Use Network for tx
  224. // DIALUP_REQUIRED : Use Dialupo for Tx
  225. // RWZ_ERROR_NOTCPIP : No TCP/IPO
  226. // CONNECTION_CANNOT_BE_ESTABLISHED : No modem or RAS setup
  227. DWORD CheckInternetConnectivityExistsOldLogic(HWND hWnd, HINSTANCE hInstance)
  228. {
  229. static int iAuthRetry =0; // Retry count for the number of times to invoke Proxy Auth Dlg
  230. static CHAR szProxyServer[MAX_PATH];
  231. CHAR szProxySettings[MAX_PATH];
  232. static int iChkInternetConnection = 0;
  233. static DWORD sdwConnectionStatus = CONNECTION_CANNOT_BE_ESTABLISHED;
  234. BOOL bNeedsReboot;
  235. BOOL bRet;
  236. DWORD dwPingStatus;
  237. DWORD dwError= RWZ_NOERROR;
  238. BOOL bProxyExists;
  239. MODEMSTATUS mStatus;
  240. DWORD dwTimeOut = CONNECTION_TIME_OUT;
  241. int iProxyPort;
  242. TCHAR szUserName[48] = _T(""),
  243. szPassword[48] = _T("");
  244. int iDisableAutoDial;
  245. iDisableAutoDial=1;
  246. if( sdwConnectionStatus == DIALUP_NOT_REQUIRED )
  247. return DIALUP_NOT_REQUIRED;
  248. if( sdwConnectionStatus == DIALUP_REQUIRED )
  249. return DIALUP_REQUIRED;
  250. // Disable Auto Dial only
  251. // if there are not active Dialup Connection
  252. //
  253. if( ATK_IsRasDllOk() == RAS_DLL_LOADED )
  254. {
  255. if( IsDialupConnectionActive() )
  256. {
  257. iDisableAutoDial=0;
  258. }
  259. }
  260. if(iDisableAutoDial)
  261. {
  262. DisableAutoDial();// Disable the Auto Dial
  263. }
  264. // Ping Current Host to check if TCP is
  265. // installed /configured.
  266. //
  267. // if it is for the first time
  268. // RWZ_PINGSTATUS_NOTCPIP : if no socket library or get hostname fails
  269. // RWZ_PINGSTATUS_SUCCESS : if gethostname and ping is successful
  270. // RWZ_PINGSTATUS_FAIL : if gethostname is succesful and ping via icmp fails
  271. dwPingStatus = PingHost();
  272. RW_DEBUG <<"\n Ping To Host (40: No TCP/IP 41: Success 42: Failure)=: " << dwPingStatus << flush;
  273. if (dwPingStatus == RWZ_PINGSTATUS_NOTCPIP )
  274. {
  275. return RWZ_ERROR_NOTCPIP;
  276. }
  277. if( dwPingStatus == RWZ_PINGSTATUS_SUCCESS ){
  278. bProxyExists = theInternetClass.GetSystemProxyServer(szProxyServer,MAX_PATH, &iProxyPort);
  279. if (bProxyExists)
  280. {
  281. theInternetClass.GetSystemProxySettings(szProxySettings,MAX_PATH);
  282. theInternetClass.SetSystemProxySettings(szProxySettings);
  283. if(Ping(szProxyServer))
  284. {
  285. DWORD dwChkSite;
  286. int iExit;
  287. iExit =0;
  288. RW_DEBUG <<"\n Ping Success" << flush;
  289. theInternetClass.m_UserName[0] = _T('\0');
  290. theInternetClass.m_Password[0] = _T('\0');
  291. do {
  292. dwChkSite = ChkSiteAvailability(hWnd, theInternetClass.m_strIISServer,
  293. dwTimeOut,
  294. (LPTSTR) theInternetClass.GetProxyServer(),
  295. theInternetClass.m_UserName,theInternetClass.m_Password);
  296. RW_DEBUG <<"\n After ChkSiteAvailability : " << dwChkSite << flush;
  297. if( dwChkSite == RWZ_SITE_REQUIRES_AUTHENTICATION) {
  298. if( iAuthRetry++ > MAX_PROXY_AUTH_RETRY) {
  299. iExit =1;
  300. }
  301. // Modified on 2/4/98
  302. // No Need to call our Proxy Auth Dlg insted use
  303. // InternetErrorDlg() to invoke Auth Dlg
  304. //if(GetProxyAuthenticationInfo(hInstance,ConvertToUnicode(szProxyServer),
  305. // theInternetClass.m_UserName,theInternetClass.m_Password)) {
  306. //}
  307. }else {
  308. // Exit because Connectivity is OK
  309. iExit = 1;
  310. }
  311. }while(!iExit);
  312. if( dwChkSite == RWZ_SITE_CONNECTED)
  313. {
  314. theInternetClass.m_dwAccessType = INTERNET_OPEN_TYPE_PRECONFIG;
  315. // Modified on 2/4/98to use the PRECONFIGIED rather than the PROXY specified by
  316. // the user programatically
  317. // The INTERNET_OPEN_TYPE_PROXY is changed .....
  318. // This change is done in order for IE Auth Dlg
  319. dwError = DIALUP_NOT_REQUIRED;
  320. sdwConnectionStatus = DIALUP_NOT_REQUIRED;
  321. dwConnectionStatus = DIALUP_NOT_REQUIRED;
  322. goto ExitChk;
  323. }
  324. }
  325. }
  326. // No Procy so check for connection using existing LAN
  327. // already opened Dialup Connection
  328. // Set to NULL Proxy
  329. //
  330. theInternetClass.SetProxyServer("",80);// Set it To Null
  331. theInternetClass.m_dwAccessType = INTERNET_OPEN_TYPE_DIRECT;
  332. if( ATK_IsRasDllOk() == RAS_DLL_LOADED )
  333. {
  334. if( IsDialupConnectionActive() )
  335. {
  336. // Already Dialup COnnection is Active
  337. dwError = DIALUP_NOT_REQUIRED;
  338. sdwConnectionStatus = DIALUP_NOT_REQUIRED;
  339. dwConnectionStatus = DIALUP_NOT_REQUIRED;
  340. goto ExitChk;
  341. }
  342. }
  343. //
  344. // Check Lan Connection
  345. bRet = CheckHostName( ConvertToANSIString(theInternetClass.m_strIISServer));
  346. if(bRet)
  347. {
  348. theInternetClass.m_dwAccessType = INTERNET_OPEN_TYPE_DIRECT;
  349. if(ChkSiteAvailability(NULL, theInternetClass.m_strIISServer,
  350. dwTimeOut,
  351. _T(""),szUserName,szPassword))
  352. {
  353. dwError = DIALUP_NOT_REQUIRED;
  354. sdwConnectionStatus = DIALUP_NOT_REQUIRED;
  355. dwConnectionStatus = DIALUP_NOT_REQUIRED;
  356. goto ExitChk;
  357. }
  358. }
  359. }
  360. dwError = DIALUP_REQUIRED;
  361. sdwConnectionStatus = DIALUP_REQUIRED;
  362. dwConnectionStatus = DIALUP_NOT_REQUIRED;
  363. theInternetClass.m_dwAccessType = INTERNET_OPEN_TYPE_DIRECT;
  364. RW_DEBUG << "\n Before MDMCHK..." << flush;
  365. //MDMCHK:
  366. // Install Modem
  367. //
  368. bNeedsReboot = theInternetClass.InstallModem(hWnd);
  369. if(bNeedsReboot)
  370. {
  371. // ?????
  372. // This will be abnormally terminating the Registration Wizard,
  373. // So support modem installation in OS which dosent call for a reboot
  374. }
  375. mStatus = MSDetectModemTAPI(hInstance);
  376. if(mStatus != kMsModemOk )
  377. {
  378. dwError = CONNECTION_CANNOT_BE_ESTABLISHED;
  379. sdwConnectionStatus = CONNECTION_CANNOT_BE_ESTABLISHED;
  380. }
  381. if(dwError == DIALUP_REQUIRED )
  382. {
  383. // Load RASPAI32.DLL and Exit if it can not be loaded
  384. if( ATK_IsRasDllOk() != RAS_DLL_LOADED )
  385. {
  386. //
  387. dwError = CONNECTION_CANNOT_BE_ESTABLISHED;
  388. sdwConnectionStatus = CONNECTION_CANNOT_BE_ESTABLISHED;
  389. #ifdef _LOG_IN_FILE
  390. RW_DEBUG << "\n RASAPI32.DLL NOT FOUND ...";
  391. #endif
  392. }
  393. }
  394. ExitChk:
  395. #ifdef _LOG_IN_FILE
  396. RW_DEBUG <<"\n Chk Connection ( 1 = via NTWK, 2 = DIalup , 3 = Problem) " << dwError << flush;
  397. #endif
  398. theInternetClass.UnLoadInetCfgDll();
  399. return dwError;
  400. }
  401. DWORD SendHTTPData(HWND hWnd, HINSTANCE hInstance)
  402. {
  403. char czB [MAX_BUFFER + 1]; // Buffer for Tx
  404. DWORD dwBufSize = MAX_BUFFER;
  405. DWORD dwOemBufSize;
  406. DWORD dwRet;
  407. _TCHAR szValue[256];
  408. DWORD dwTimeOut = CONNECTION_TIME_OUT;
  409. // MDX : 03/11/99
  410. // Get MSID From Cookie , No need to check from Registry
  411. #ifdef _LOG_IN_FILE
  412. RW_DEBUG << "\n*******Getting Cookie********\n"<< flush;
  413. #endif
  414. if(dwConnectionStatus == DIALUP_REQUIRED){
  415. ChkSiteAvailability(hWnd, theInternetClass.m_strIISServer,
  416. dwTimeOut,
  417. NULL,
  418. theInternetClass.m_UserName,
  419. theInternetClass.m_Password);
  420. }
  421. else{
  422. ChkSiteAvailability(hWnd, theInternetClass.m_strIISServer,
  423. dwTimeOut,
  424. (LPTSTR) theInternetClass.GetProxyServer(),
  425. theInternetClass.m_UserName,
  426. theInternetClass.m_Password);
  427. }
  428. SetMSID(hInstance);
  429. dwRet = PrepareRegWizTxbuffer(hInstance, czB, &dwBufSize);
  430. dwOemBufSize = MAX_BUFFER - dwBufSize;
  431. dwRet = OemTransmitBuffer(hInstance,czB + dwBufSize,&dwOemBufSize);
  432. dwBufSize += dwOemBufSize;
  433. switch(dwRet)
  434. {
  435. case RWZ_NOERROR:
  436. theInternetClass.SetBuffer(czB, dwBufSize+1);
  437. theInternetClass.SetSSLFlag(TRUE);
  438. dwRet = theInternetClass.PostData(hWnd);
  439. // dwRet = InvokePost(hWnd, &theInternetClass);
  440. #ifdef _LOG_IN_FILE
  441. RW_DEBUG << "\n PostData() returned: "<<dwRet << flush;
  442. #endif
  443. if( dwRet == RWZ_POST_FAILURE || dwRet == RWZ_POST_WITH_SSL_FAILURE)
  444. {
  445. // Try posting without SSL only for the modem
  446. //if(dwConnectionStatus == DIALUP_REQUIRED)
  447. //{
  448. #ifdef _LOG_IN_FILE
  449. RW_DEBUG << "\n Posting Failure : Sending Data without SSL" << flush;
  450. #endif
  451. theInternetClass.SetSSLFlag(FALSE);
  452. dwRet = theInternetClass.PostData(hWnd);
  453. //dwRet = InvokePost(hWnd, &theInternetClass);
  454. //}
  455. }
  456. #ifdef _LOG_IN_FILE
  457. RW_DEBUG << "\n Success ... \t" << dwRet << flush;
  458. RW_DEBUG <<"\n\n\nBuffer\t\t*[" << czB << "]" << flush;
  459. #endif
  460. break;
  461. case RWZ_NO_INFO_AVAILABLE :
  462. #ifdef _LOG_IN_FILE
  463. RW_DEBUG << _T("\n No Info Available ") << flush;
  464. #endif
  465. break;
  466. case RWZ_INVALID_INFORMATION :
  467. #ifdef _LOG_IN_FILE
  468. RW_DEBUG << _T("\n Invalid Info " ) << flush;
  469. #endif
  470. break;
  471. case RWZ_BUFFER_SIZE_INSUFFICIENT :
  472. #ifdef _LOG_IN_FILE
  473. RW_DEBUG <<_T("\n Buffer Length In Sufficient ...") << dwRet;
  474. RW_DEBUG <<_T("\n\n\nBuffer\t\t") << czB;
  475. #endif
  476. break;
  477. case RWZ_INTERNAL_ERROR :
  478. #ifdef _LOG_IN_FILE
  479. RW_DEBUG << _T("\n Internal Error ....") ;
  480. #endif
  481. default:
  482. break;
  483. }
  484. #ifdef _LOG_IN_FILE
  485. RW_DEBUG << flush;
  486. #endif
  487. return dwRet;
  488. }
  489. /*DWORD PostHTTPData(HINSTANCE hInstance)
  490. {
  491. DWORD dwRet = RWZ_POST_FAILURE;
  492. DWORD dwRetStatus;
  493. dwRetStatus = CheckWithDisplayInternetConnectivityExists(hInstance,2);
  494. switch (dwRetStatus)
  495. {
  496. case DIALUP_NOT_REQUIRED :
  497. if ((dwRet = PostDataWithWindowMessage(hInstance))
  498. == RWZ_POST_SUCCESS){
  499. ;
  500. }
  501. else {
  502. }
  503. break;
  504. case DIALUP_REQUIRED :
  505. dwRet=DialogBoxParam(hInstance, MAKEINTRESOURCE(IDD_DIAL), NULL,FDlgProc,
  506. (LPARAM)hInstance);
  507. if(dwRet == -1 ) {
  508. // Error in creating the Dialogue
  509. }
  510. switch ( dwRet) {
  511. case RWZ_ERROR_LOCATING_MSN_FILES :
  512. #ifdef _LOG_IN_FILE
  513. RW_DEBUG << "\n Signup :Error Locating MSN File " << flush;
  514. #endif
  515. break;
  516. case RWZ_ERROR_LOCATING_DUN_FILES :
  517. #ifdef _LOG_IN_FILE
  518. RW_DEBUG << "\n Signup :Error Locating DUN File " << flush;
  519. #endif
  520. break;
  521. case RWZ_ERROR_MODEM_IN_USE :
  522. #ifdef _LOG_IN_FILE
  523. RW_DEBUG << "\n Signup :Error Modem Already in use by another Application " << flush;
  524. #endif
  525. break;
  526. case RWZ_ERROR_MODEM_CFG_ERROR:
  527. #ifdef _LOG_IN_FILE
  528. RW_DEBUG << "\n Signup :Modem Configuration Error " << flush;
  529. #endif
  530. case RWZ_ERROR_TXFER_CANCELLED_BY_USER :
  531. #ifdef _LOG_IN_FILE
  532. RW_DEBUG << "\n Signup :HTTP Post Cancelled by User " << flush;
  533. #endif
  534. break;
  535. case RWZ_ERROR_SYSTEMERROR :
  536. #ifdef _LOG_IN_FILE
  537. RW_DEBUG << "\n Signup : System Resource Allocation Error " << flush;
  538. #endif
  539. break;
  540. case RWZ_ERROR_NODIALTONE :
  541. #ifdef _LOG_IN_FILE
  542. RW_DEBUG << "\n Signup : Modem Error No Dialtone " << flush;
  543. #endif
  544. break;
  545. default :
  546. break;
  547. }
  548. case CONNECTION_CANNOT_BE_ESTABLISHED :
  549. default :
  550. // It is unexpected . ? to Do
  551. break;
  552. }
  553. return dwRet;
  554. }
  555. **/