home *** CD-ROM | disk | FTP | other *** search
- typedef struct tagPROTOSET{
- LPSTR dwnload; // pointer to download dir
- LPSTR upload; // pointer to upload dir
- BYTE FAR *aspfxfer; // pointer to aspect file xfer flag
- BYTE should_gif; // user wants gif files
- BYTE xfer_dup_new; // duplicate new files
- BYTE xfer_del_aborts; // delete aborts
- BYTE xfer_relaxed; // relaxed timing
- LPSTR bigbuff; // fixed pointer to first 10240 bytes of hPBits
- LPSTR bigptr; // variable pointer to bigbuf bytes
- LPSTR cbuff; // cbuff = bigbuff+10240, fixed pointer to last 1033 bytes of hPBits
- int bdiag; // flag set if XFER status dialog box is desired
- HWND hDlg1; // handle to XFER status dialog box
- int hCommFile; // handle to open xfer file
- LPSTR fileptr; // pointer to file data in hCommFile
- WORD fdate; // DOS file date format of hCommFile
- WORD fftime; // DOS file time format of hCommFile
- char szRcvFile[20]; // Filename of received file (all but b-plus)
- char XferFile[128]; // full pathname received file ( b-plus)
- char szFullPath[128]; // full pathname for every protocol
- char szTempDir[128];
- char szTempName[20]; // temp filename, used in ShowXferBox
- int errorcnt; // number of errors occured during xfer
- int nackcount; // number of time nack txed or recieved during xfer
- int blocksdone; // number of record blocks xfered
- int bCancel; // Flag for user desire to cancel xfer
- DWORD xwaittime; // timeout period for protocol xfers
- int xcount; // number of rcved record bytes on xfer
- DWORD flen; // total expected bytes of received file
- long tflen;
- DWORD runcnt; // total bytes of existing file, for calulating xfer rate (runcnt-tflen) is used
- int rec_len; // length of record
- int rec_no; // current rec_no being xfered
- int (FAR PASCAL *FlushCommW)(int,int);
- int (FAR PASCAL *ReadCommW)(int, LPSTR, int);
- int (FAR PASCAL *WriteCommW)(int, LPSTR, int);
- int (FAR PASCAL *GetCommErrorW)(int);
- int (FAR PASCAL *SetCommBreakW)(int);
- int (FAR PASCAL *ClearCommBreakW)(int);
- int (FAR PASCAL *SetCommStateW)(DCB FAR *);
- int (FAR PASCAL *GetCommStateW)(int, DCB FAR *);
- int (FAR PASCAL *EscapeCommFunctionW)(int, int);
- int (FAR PASCAL *UngetCommCharW)(int, char);
-
- void (FAR PASCAL *EndXfer)(void); // End of xfer
- int (FAR PASCAL *FeedDisplay)(BYTE); // Feed gif viewer a byte
- void (FAR PASCAL *startgif)(void); // Start gif viewer
- void (FAR PASCAL *ShowXferBox)(int); // Display file xfer status box
- void (FAR PASCAL *TimeToGo)(void); // Update time of xfer in xfer status box
- void (FAR PASCAL *StatusLineDirect)(LPSTR); // Statusline funtion call
- int setup;
- char dll_auto[12];
-
- //char temp[66];
-
- int datalen;
- int Aborting;
- DWORD no_char_wait;
- int retries;
- int pcstate;
- int bbegin;
- int end_record;
- int bpos;
- BYTE crc;
- int rcnt;
- char temp[45];
- }PROTOSET;
-
- typedef struct tagMAIN{
- HWND hWnd; // Handle to rghWnd[MAINWIN]
- HANDLE hCid; // Handle to Open Comm Port
- COMSTAT comstat; // open comm status
- DCB dcb; // DCB of open comm port
- int gifstate; // switch state for online gif viewer
- HWND hSTATUSWnd; // Handle to Status window
- char szTempName[128]; // temp filename, used in ShowXferBox
- }MAIN;
-
- typedef struct ADVANCEDSET
- {
- UINT fRcvFileSelect :1; // default 0
- UINT fSendFileSelect :1; // default 0
- UINT fRecLength128 :1; // default 0
- UINT fChecksum :1; // default 0
- UINT fDummy :4; // default 0
- } ADVANCEDSET;
-
-
- BOOL FAR PASCAL LibMain(HANDLE,WORD,WORD,LPSTR );
- WORD FAR PASCAL GET_DLL_CAPS( LPSTR );
- void FAR PASCAL ADVANCED_DLL( PROTOSET FAR *, MAIN FAR *, HWND, LPSTR );
- BOOL FAR PASCAL STARTDLL_XFER( PROTOSET FAR *, MAIN FAR *, HWND, LPSTR, int, int );
- int FAR PASCAL DLL_XFER( PROTOSET FAR *, MAIN FAR *, HWND, LPSTR, int );
- void FAR PASCAL WEP(int);
-
- BOOL FAR PASCAL SetupDlgProc( HWND, WORD, WORD, LONG );
- void RXING(void);
- void WAITACK(void);
- void NOCHAR(void);
- void StartXRecord(int, LPSTR);
- int WaitingForAck(void);
- int GetXRecord(void);
- BOOL MoreCharacters(void);
- void ymodem_tx(void);
- void End_It(int);
- void StatusLine(WORD,LPSTR);
- void LastError(int);
- BOOL FileRxTX(int, LPSTR);
-
-
- extern FAR PASCAL getftime( int );
- extern FAR PASCAL getfdate( int );
-
- #define SOH 1
- #define STX 2
- #define EOT 4
- #define ACK 6
- #define NAK 21
- #define CANCEL 24
-
- #define IDX_WAITACK 1
- #define IDX_ACK 2
- #define IDX_TERMINATE 3
- #define IDX_NOCHAR 4
- #define IDX_EOT 5
- #define IDX_RXING 6
- #define IDX_TXING 7
-
-
- #define ID_ERR 300
- #define ID_BLKNO 301
- #define ID_PERCENT 302
- #define ID_UARTERR 303
- #define ID_FILENAME 305
- #define IDS_LASTERROR 1300
- #define IDS_SETUP 1500
-
- // dll protocol capabilities
- #define DLL_CAP_SHOWXFER 0x0020
- #define DLL_CAP_MULTISEND 0x0002
- #define DLL_CAP_AUTODOWNLOAD 0x0001
- #define DLL_CAP_PWOPENFILE 0x0004
- #define DLL_CAP_RCVNEEDNAME 0x0008
- #define DLL_CAP_ADVANCED 0x0080
-
- #define ASP_PROT_SUCCESS 2
- #define ASP_PROT_FAIL 3
-