home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / windows / c / wmseri / wmserial.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-03  |  1.6 KB  |  91 lines

  1. #define USER_DISCONNECT    101
  2. #define WM_CONNECT     WM_USER
  3.  
  4. #define QBUFFSIZE      4096
  5.  
  6. #define COMPORT        "COM2"
  7. #define BAUDRATE       "2400"
  8. #define PARITY         "N"
  9. #define DATABITS       "8"
  10. #define STOPBITS       "1"
  11.  
  12.  
  13. // Globals
  14. #ifdef _MAIN
  15.  
  16. int nActiveComPort;
  17. BOOL bConnected;
  18. BOOL bEcho = FALSE;
  19.  
  20. #else
  21.  
  22. extern int nActiveComPort;
  23. extern BOOL bConnected;
  24. extern BOOL bEcho;
  25.  
  26. #endif
  27.  
  28.  
  29. // Function declarations
  30.  
  31.  
  32. // Window functions ( WMSERIAL.C )
  33.  
  34. HWND InitWinApp(HANDLE hInstance, HANDLE hPrevious,
  35.                LPSTR lpszCmdLine, int nCmdShow);
  36.  
  37. LRESULT CALLBACK _export WndProc (HWND hWnd, UINT message, 
  38.                                   WPARAM wParam, LPARAM lParam);
  39.  
  40.  
  41.  
  42. // Process Comm Notification Procedure ( WNOTIFY.C )
  43.  
  44. int ProcessCommNotify(HWND hWnd, int nComID, int nNotification);
  45.  
  46.  
  47.  
  48. // High level communication functions ( WCONNECT.C )
  49.  
  50. BOOL Connect(HWND);
  51. BOOL Dial(void);
  52. void Disconnect(void);
  53.  
  54.  
  55.  
  56. // Modem functions ( WMODEM.C )
  57.  
  58. BOOL InitModem(HWND hWnd, int nComID);
  59. int GetModemResponse(int nComID, LPSTR szDest, int nMaxLength, int Wait);
  60. int HangUpModem(int nComID);
  61.  
  62.  
  63.  
  64. // Com Port functions ( WCOM.C )
  65.  
  66. int InitComPort( HWND hWnd, LPSTR ComName );
  67. int CloseComPort( int nComID );
  68. int ReadComPort( int nComID , LPSTR Data , int nMaxLength );
  69. int WriteComPort( int nComID , LPSTR Data , int nLength );
  70. int CheckComPort( int nComID , COMSTAT *Status );
  71.  
  72.  
  73.  
  74. // TTY functions ( WTTY.C )
  75.  
  76. void TTYInit( HWND hWnd );
  77. void TTYSetFocus( void );
  78. void TTYWriteScreen( LPSTR lpOutString );
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.