// IQ_Comm.h #ifndef IQ_Comm_h #define IQ_Comm_h #if defined(_WINDOWS) || defined(WIN32) typedef LPSTR IQ_Dir; typedef LPSTR IQ_Str; #else // MAC typedef FSSpecPtr IQ_Dir; typedef char* IQ_Str; #endif typedef struct tagListNode { struct tagListNode *nextnode; char szFileName[1]; } LISTNODE; // General Return Codes #define IQ_ENDOFLIST 0 #define IQ_SUCCESS 1 #define IQ_INVALID_ARGS 2 #define IQ_FAIL 3 #define IQ_ALREADYINLIST 4 #define IQ_MISSINGPARAMETER 5 #define IQ_INVALIDCCNUMBER 6 #define IQ_FILENOTFOUND 7 #define IQ_INITNOTCALLED 8 #define IQ_CANCEL 9 #define IQ_TOOSMALL 10 #define IQ_DIRNOTFOUND 11 // For CreateTransString // #define IQ_REGISTER 0x0001 #define IQ_CREDIT 0x0002 #define IQ_SERIAL 0x0004 #define IQ_DEBUG 0x0008 // Process Return Codes // #define IQ_USER_CANCELLED 1000 #define IQ_SUCCESSFUL 1001 #define IQ_FAILED 1002 #define IQ_MD_INPROGRESS 2000 #define IQ_MD_NOMODEM 2010 #define IQ_MD_NOPHONE 2020 #define IQ_MD_SUCCESS 2030 #define IQ_DIAG_INET_INPROGRESS 3000 #define IQ_DIAG_INET_NOWINSOCK 3010 #define IQ_DIAG_INET_NOIQINETDLL 3020 #define IQ_DIAG_INET_SUCCESS 3030 #define IQ_CALL_INPROGRESS 4000 #define IQ_CALL_NEEDMD 4010 #define IQ_CALL_NOUPLOAD 4020 #define IQ_CALL_NODOWNLOAD 4030 #define IQ_CALL_NOLOGIN 4040 #define IQ_CALL_SENDFAILED 4050 #define IQ_CALL_RECVFAILED 4060 #define IQ_CALL_NOINIT 4070 #define IQ_CALL_ALREADYREG 4080 #define IQ_CALL_SUCCESS 4090 #define IQ_CALL_INET_NOFTPDLL 5000 #define IQ_CALL_INET_NOFTPPROC 5010 #define IQ_CALL_INET_NOWINSOCK 5020 #define IQ_CALL_INET_NOWINSOCKPROC 5030 #define IQ_CALL_INET_BADINDEX 5040 #define IQ_CALL_INET_CONSTARTFAIL 5050 #define IQ_CALL_INET_CONNOSOCK 5060 #define IQ_CALL_INET_NOINITPROC 5070 #define IQ_CALL_INET_ERROR 5080 #define IQ_CALL_INET_SUCCESS 5090 #define FUNC_IDLE 0 #define FUNC_MD 1 #define FUNC_FTP_DIAG 2 #define FUNC_REGGIE 3 #define FUNC_FTP_REGGIE 4 #define FUNC_GENERIC 5 #define FUNC_FTP_GENERIC 6 #define FUNC_FEEDBACK 7 #define FUNC_FTP_FEEDBAC 8 #define FUNC_NEWREGGIE 9 // Progress Codes // #define S_IQCOM_FTPDIAGBEGIN 1000 #define S_IQCOM_FTPREGBEGIN 2000 #define S_IQCOM_FTPCHECKCAP 2010 #define S_IQCOM_FTPINIT 2020 #define S_IQCOM_FTPCONNECT 2030 #define S_IQCOM_FTPSENDFILE 2040 #define S_IQCOM_FTPRECVFILE 2050 #define S_IQCOM_FTPDISCON 2060 #define S_IQCOM_FTPSUCCESS 2070 #define S_IQCOM_FTPUNSUCCESS 2080 #define S_IQCOM_FTPUNDOC 2090 #define S_IQCOM_MDBEGIN 3000 #define S_IQCOM_MDLOOK1 3010 #define S_IQCOM_MDLOOK2 3020 #define S_IQCOM_MDLOOK3 3030 #define S_IQCOM_MDLOOK4 3040 #define S_IQCOM_MDRESET1 3050 #define S_IQCOM_MDRESET2 3060 #define S_IQCOM_MDRESET3 3070 #define S_IQCOM_MDRESET4 3080 #define S_IQCOM_MDCHECKMAX 3090 #define S_IQCOM_MDCHECKRATE 3100 #define S_IQCOM_MDCHECKPHONE 3110 #define S_IQCOM_MDIDENMFG 3120 #define S_IQCOM_MDENHANCED 3130 #define S_IQCOM_MDIDENCOMP 3140 #define S_IQCOM_MDUNDOC 3150 #define S_IQCOM_REGBEGIN 4000 #define S_IQCOM_REGDIALING 4010 #define S_IQCOM_REGSIGNING 4020 #define S_IQCOM_REGSENDREG 4030 #define S_IQCOM_REGRECVING 4040 #define S_IQCOM_REGLOGOFF 4050 #define S_IQCOM_FINISHED 5000 ////////////////////////////////////////////////////////////////////////////// // // IQ_Diagnostics // // Get System Information // #define IQ_DIAG_MODEM 1 #define IQ_DIAG_MODEMANDPHONE 2 #define IQ_DIAG_INTERNET 3 #define CNT(x) (sizeof(x)/sizeof(x[0])) // // int FAR PASCAL IQ_Diagnostics(HWND hWnd, long lDiagType); // Parameters: // diagType - Type of communication to diagnose // // Returns: // // 0 - Failed // 1 - Process Started // // #if VERSION3 #pragma message("VERSION3") #endif #ifdef VERSION3 int FAR PASCAL IQ_AddUploadFile(LPSTR lpszFileName); int FAR PASCAL IQ_GetUploadFileList(int nFirstNext, LPSTR lpszReturn, int nLen); void FAR PASCAL IQ_ResetUploadFile(); #endif int FAR PASCAL IQ_GetDownloadFileList(int nFirstNext, LPSTR lpszReturn, int nLen); #ifdef WIN32 void FAR PASCAL IQ_TAPIRegisterDialog(HINSTANCE hModule, LPCTSTR lpTemplate); #endif void FAR PASCAL IQ_Shutdown(BOOL bUninstall); ////////////////////////////////////////////////////////////////////////////// // // IQ_Initialize // // int FAR PASCAL IQ_Initialize(IQ_Dir szProgDir, IQ_Dir szDataDir, IQ_Str szInitFile, IQ_Str szDataFile); // // Parameters: // // progDir - Program Directory, contains all read only files. // (.EXE, .DLL, etc.) // // dataDir - Data Directory, contains all read/write files. // (.INI, .DAT, etc.) // // initFile - Name of INI file to use for initialization and reference. // (this file lives in Data Directory) // // Returns: // // 0 - Failed // 1 - Process Started // // int FAR PASCAL IQ_CreateTransString(int nFunctions, LPSTR szString, int nStringLen); ////////////////////////////////////////////////////////////////////////////// // // IQ_Status // // int FAR PASCAL IQ_Status(LPLONG lStatusCode, LPLONG lDescriptionCode); // // Returns: // // 0 - DLL is busy // 1 - DLL is not busy // // statusCode - Address of long to hold function status. // // descriptionCode - Address of long to hold the extended description code. // // ////////////////////////////////////////////////////////////////////////////// // // IQ_Transaction // // #define IQ_TRANS_MODEMREG 1 #define IQ_TRANS_MODEMFDBK 2 #define IQ_TRANS_MODEMGEN 3 #define IQ_TRANS_INTERNET 4 // int FAR PASCAL IQ_Transfer(HWND hWnd, int nCallType, LPSTR lpszBucket, LPSTR lpszVerb); // // Parameters: // connectType - Type of connection to Pipeline Host // // Returns: // // 0 - Failed // 1 - Process Started // // void FAR PASCAL IQ_Cancel(); //BOOL FAR PASCAL IQ_SetRegionCity(IQ_Str szRegionName, IQ_Str szCityName); BOOL FAR PASCAL IQ_SetRegion(IQ_Str szRegionName); BOOL FAR PASCAL IQ_SetCity(IQ_Str szCityName); int FAR PASCAL IQ_LanguageName(long lFirstNext, IQ_Str szLanguageName, int nLanguageNameLength); BOOL FAR PASCAL IQ_SetLanguage(IQ_Str szLanguageName); ////////////////////////////////////////////////////////////////////////////// // // IQ_Transaction // #define IQ_FIRST 1 #define IQ_NEXT 2 // int FAR PASCAL IQ_RegionName(long lFirstNext, IQ_Str szRegionName, int nRegionNameLength); // Parameters: // // firstNext - The first or successive call // // // Returns: // // 0 - Failed // 1 - Process Started // // regionName - Name from the Region list. // void FAR PASCAL IQ_SetCallBackWindow(HWND hWnd, WORD nMessage); ////////////////////////////////////////////////////////////////////////////// int FAR PASCAL IQ_CityName(long lFirstNext, IQ_Str szRegionName, IQ_Str szCityName, int nCityNameLength); // Parameters: // // firstNext - The first or successive call // // regionName - Name of Region obtained from IQ_RegionName // // Returns: // // 0 - Failed // 1 - Process Started // // cityName - Name from the City List. // int PASCAL FAR IQ_GetStringTranslation(long iqState, LPSTR lpString, int nLen); int FAR PASCAL IQ_SetCreditInfo( IQ_Str lpszCardNumber, IQ_Str lpszExpirationMonth, IQ_Str lpszExpirationYear, IQ_Str lpszChargeAmount, IQ_Str lpszNameOnCard, IQ_Str lpszBillAdd1, IQ_Str lpszBillAdd2, IQ_Str lpszCity, IQ_Str lpszState, IQ_Str lpszZip ); void FAR PASCAL IQ_CollectSystemInfo(IQ_Str lpszPassedName); #endif // #ifndef IQ_Comm_h // IQ_UTL.C int WINAPI IQ_Print(HWND hWnd, LPSTR lpszFmtFile, LPSTR szWmfFile); int WINAPI IQ_SpawnAndWait(LPSTR lpszCmdLine, UINT wCmd); int FAR PASCAL IQ_DialogToFile(HWND hWnd, LPSTR lpszSection, int nIgnoreCount, LPINT lpnIgnoreIds); int FAR PASCAL IQ_FileToDialog(HWND hWnd, LPSTR lpszSection); int FAR PASCAL IQ_SetReminder(LPSTR szPassedFileName,LPSTR szPassedKey,LPSTR szProgram,LPSTR szSKU, int nDays,int nPassedMinutes); int FAR PASCAL IQ_ClearReminder(LPSTR szPassedFileName, LPSTR szKey,LPSTR szSKU,BOOL bKillRobot); int FAR PASCAL IQ_ScheduleReminder(LPSTR szPassedFileName,LPSTR szPassedKey,LPSTR szProgram, LPSTR szSKU, char cStartDay, char cStartMonth, char cStartYear, char cEndDay, char cEndMonth, char cEndYear, char cCalMethod, LPSTR szCalArray, char cFrequency); void FAR PASCAL AddItemToLogFile(LPCSTR lpPathName); HFILE FAR PASCAL log_lcreat(LPCSTR lpPathName,int iAttribute); void FAR PASCAL DeleteLogFiles(void); int FAR PASCAL IQ_Affinity(void);