Changeset 4285 for trunk/include


Ignore:
Timestamp:
Sep 20, 2000, 11:32:58 PM (25 years ago)
Author:
hugh
Message:

Implemented Serial APIs

Location:
trunk/include
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/HandleManager.h

    r4183 r4285  
    1 /* $Id: HandleManager.h,v 1.23 2000-09-04 02:31:42 bird Exp $ */
     1/* $Id: HandleManager.h,v 1.24 2000-09-20 21:32:56 hugh Exp $ */
    22
    33/*
     
    3636#endif
    3737
    38 #ifndef __WINE_WINDEF_H
    39 
    40 typedef struct tagDCB
    41 {
    42     DWORD DCBlength;
    43     DWORD BaudRate;
    44     unsigned fBinary               :1;
    45     unsigned fParity               :1;
    46     unsigned fOutxCtsFlow          :1;
    47     unsigned fOutxDsrFlow          :1;
    48     unsigned fDtrControl           :2;
    49     unsigned fDsrSensitivity       :1;
    50     unsigned fTXContinueOnXoff     :1;
    51     unsigned fOutX                 :1;
    52     unsigned fInX                  :1;
    53     unsigned fErrorChar            :1;
    54     unsigned fNull                 :1;
    55     unsigned fRtsControl           :2;
    56     unsigned fAbortOnError         :1;
    57     unsigned fDummy2               :17;
    58     WORD wReserved;
    59     WORD XonLim;
    60     WORD XoffLim;
    61     BYTE ByteSize;
    62     BYTE Parity;
    63     BYTE StopBits;
    64     char XonChar;
    65     char XoffChar;
    66     char ErrorChar;
    67     char EofChar;
    68     char EvtChar;
    69 } DCB, *LPDCB;
    70 
    71 #endif
    72 
    7338
    7439//LPSECURITY_ATTRIBUTES
     
    289254                                     BOOL                       fAlertable);
    290255
    291 DWORD  HMMsgWaitForMultipleObjects  (DWORD                      nCount,
    292                                      HANDLE                    *pHandles,
    293                                      BOOL                       fWaitAll,
    294                                      DWORD                      dwMilliseconds,
    295                                      DWORD                      dwWakeMask);
     256DWORD  HMMsgWaitForMultipleObjects  (DWORD      nCount,
     257                                     HANDLE            *pHandles,
     258                                     BOOL       fWaitAll,
     259                                     DWORD      dwMilliseconds,
     260                                     DWORD      dwWakeMask);
    296261
    297262BOOL HMDeviceIoControl              (HANDLE hDevice,
     
    351316                                     DWORD                      dwFileOffsetLow,
    352317                                     DWORD                      dwNumberOfBytesToMap,
    353                                      LPVOID                     lpBaseAddress);
     318                   LPVOID                     lpBaseAddress);
    354319
    355320BOOL HMDuplicateHandle(HANDLE  srcprocess,
     
    362327                       DWORD   fdwOdinOptions = 0);
    363328
    364 #define DUPLICATE_SHARE_DENYNONE        1
    365 #define DUPLICATE_SHARE_READ            2
    366 #define DUPLICATE_ACCESS_READ           4
    367 #define DUPLICATE_ACCESS_WRITE          8
    368 #define DUPLICATE_ACCESS_READWRITE      (DUPLICATE_ACCESS_WRITE|DUPLICATE_ACCESS_READ)
     329#define DUPLICATE_SHARE_DENYNONE  1
     330#define DUPLICATE_SHARE_READ    2
     331#define DUPLICATE_ACCESS_READ     4
     332#define DUPLICATE_ACCESS_WRITE    8
     333#define DUPLICATE_ACCESS_READWRITE    (DUPLICATE_ACCESS_WRITE|DUPLICATE_ACCESS_READ)
    369334
    370335//SvL: Used internally by memory mapped class
     
    381346                         HANDLE *TokenHandle);
    382347
    383 BOOL HMSetupComm(HANDLE hFile, DWORD dwInQueue, DWORD dwOutQueue);
    384 
    385 BOOL HMGetCommState(INT hCommDev, LPDCB lpdcb);
     348BOOL HMCommSetupComm(HANDLE hFile, DWORD dwInQueue, DWORD dwOutQueue);
     349
     350BOOL HMCommGetCommState(HANDLE hCommDev, LPDCB lpdcb);
     351BOOL HMCommWaitCommEvent( HANDLE hCommDev,
     352                          LPDWORD lpfdwEvtMask,
     353                          LPOVERLAPPED lpo);
     354
     355BOOL HMCommGetCommProperties( HANDLE hCommDev,
     356                              LPCOMMPROP lpcmmp);
     357
     358BOOL HMCommGetCommMask( HANDLE hCommDev,
     359                        LPDWORD lpfdwEvtMask);
     360
     361BOOL HMCommSetCommMask( HANDLE hCommDev,
     362                        DWORD fdwEvtMask);
     363
     364BOOL HMCommPurgeComm( HANDLE hCommDev,
     365                      DWORD fdwAction);
     366
     367BOOL HMCommClearCommError( HANDLE hCommDev,
     368                           LPDWORD lpdwErrors,
     369                           LPCOMSTAT lpcst);
     370
     371BOOL HMCommSetCommState( HANDLE hCommDev,
     372                         LPDCB lpdcb);
     373
     374BOOL HMCommGetCommModemStatus( HANDLE hFile,
     375                               LPDWORD lpModemStat );
     376
     377BOOL HMCommGetCommTimeouts( HANDLE hCommDev,
     378                            LPCOMMTIMEOUTS lpctmo);
     379
     380BOOL HMCommSetCommTimeouts( HANDLE hCommDev,
     381                            LPCOMMTIMEOUTS lpctmo);
     382
     383BOOL HMCommTransmitCommChar( HANDLE hFile,
     384                             CHAR cChar );
     385
     386BOOL HMCommSetCommConfig( HANDLE hCommDev,
     387                          LPCOMMCONFIG lpCC,
     388                          DWORD dwSize );
     389
     390BOOL HMCommSetCommBreak( HANDLE hFile );
     391
     392BOOL HMCommGetCommConfig( HANDLE hCommDev,
     393                          LPCOMMCONFIG lpCC,
     394                          LPDWORD lpdwSize );
     395
     396BOOL HMCommEscapeCommFunction( HANDLE hFile,
     397                               UINT dwFunc );
     398
     399BOOL HMCommSetupComm( HANDLE hFile,
     400                      DWORD dwInQueue,
     401                      DWORD dwOutQueue);
     402
     403BOOL HMCommClearCommBreak(HANDLE hFile);
     404
     405BOOL HMCommSetDefaultCommConfig( HANDLE hCOM,
     406                                 LPCOMMCONFIG lpCC,
     407                                 DWORD dwSize);
     408
     409BOOL HMCommGetDefaultCommConfig( HANDLE hCOM,
     410                                 LPCOMMCONFIG lpCC,
     411                                 LPDWORD lpdwSize);
    386412
    387413HANDLE HMCreateThread(LPSECURITY_ATTRIBUTES  lpsa,
  • trunk/include/OS2WIN.H

    r2694 r4285  
    1 /* $Id: OS2WIN.H,v 1.8 2000-02-09 13:40:21 sandervl Exp $ */
     1/* $Id: OS2WIN.H,v 1.9 2000-09-20 21:32:56 hugh Exp $ */
    22#ifndef _OS2WIN_H
    3 #define _OS2WIN_H
     3  #define _OS2WIN_H
    44
    55#ifdef OS2_INCLUDED
    6 #include <win32type.h>
     6  #include <win32type.h>
    77#else
    8 #include <odin.h>
    9 
    10 #include <windef.h>
    11 #include <winbase.h>
    12 #include <wingdi.h>
    13 #include <winuser.h>
    14 #include <winerror.h>
    15 #include <commdlg.h>
    16 #include <ddeml.h>
    17 #include <mmsystem.h>
     8  #include <odin.h>
     9
     10  #include <windef.h>
     11  #include <winbase.h>
     12  #include <wingdi.h>
     13  #include <winuser.h>
     14  #include <winerror.h>
     15  #include <commdlg.h>
     16  #include <ddeml.h>
     17  #include <mmsystem.h>
    1818#endif
    1919
  • trunk/include/win32type.h

    r3707 r4285  
    1 /* $Id: win32type.h,v 1.40 2000-06-14 13:19:44 sandervl Exp $ */
     1/* $Id: win32type.h,v 1.41 2000-09-20 21:32:58 hugh Exp $ */
    22
    33/*
     
    570570} RECT, *PRECT, *LPRECT;
    571571typedef const RECT *LPCRECT;
     572#else
     573typedef RECT *PRECT;
     574typedef const RECT *LPCRECT;
    572575#endif
    573576
    574577
    575578typedef struct _RGNDATAHEADER {
    576     DWORD       dwSize;
    577     DWORD       iType;
    578     DWORD       nCount;
    579     DWORD       nRgnSize;
    580     RECT        rcBound;
     579    DWORD dwSize;
     580    DWORD iType;
     581    DWORD nCount;
     582    DWORD nRgnSize;
     583    RECT  rcBound;
    581584} RGNDATAHEADER,*LPRGNDATAHEADER;
    582585
    583586typedef struct _RGNDATA {
    584     RGNDATAHEADER       rdh;
    585     char                Buffer[1];
     587    RGNDATAHEADER rdh;
     588    char    Buffer[1];
    586589} RGNDATA,*PRGNDATA,*LPRGNDATA;
    587590
     
    701704                                                         LPOVERLAPPED lpOverlapped);
    702705
     706#endif
     707
     708// COMport defines
     709
     710#ifndef __WINE_WINBASE_H
     711/*
     712 Serial provider type
     713 */
     714#define SP_SERIALCOMM ((DWORD)0x00000001)
     715/*
     716 Provider SubTypes
     717 */
     718#define PST_UNSPECIFIED     ((DWORD)0x00000000)
     719#define PST_RS232           ((DWORD)0x00000001)
     720#define PST_PARALLELPORT    ((DWORD)0x00000002)
     721#define PST_RS422           ((DWORD)0x00000003)
     722#define PST_RS423           ((DWORD)0x00000004)
     723#define PST_RS449           ((DWORD)0x00000005)
     724#define PST_MODEM           ((DWORD)0x00000006)
     725#define PST_FAX             ((DWORD)0x00000021)
     726#define PST_SCANNER         ((DWORD)0x00000022)
     727#define PST_NETWORK_BRIDGE  ((DWORD)0x00000100)
     728#define PST_LAT             ((DWORD)0x00000101)
     729#define PST_TCPIP_TELNET    ((DWORD)0x00000102)
     730#define PST_X25             ((DWORD)0x00000103)
     731/*
     732 Provider Caps
     733 */
     734#define PCF_DTRDSR          ((DWORD)0x00000001)
     735#define PCF_RTSCTS          ((DWORD)0x00000002)
     736#define PCF_RLSD            ((DWORD)0x00000004)
     737#define PCF_PARITY_CHECK    ((DWORD)0x00000008)
     738#define PCF_XONXOFF         ((DWORD)0x00000010)
     739#define PCF_SETXCHAR        ((DWORD)0x00000020)
     740#define PCF_TOTALTIMEOUTS   ((DWORD)0x00000040)
     741#define PCF_INITTIMEOUTS    ((DWORD)0x00000080)
     742#define PCF_SPECIALCHARS    ((DWORD)0x00000100)
     743#define PCF_16BITMODE       ((DWORD)0x00000200)
     744
     745/*
     746 Provider setable parameters
     747 */
     748#define SP_PARITY          ((DWORD)0x00000001)
     749#define SP_BAUD            ((DWORD)0x00000002)
     750#define SP_DATABITS        ((DWORD)0x00000004)
     751#define SP_STOPBIT         ((DWORD)0x00000008)
     752#define SP_HANDSHAKEING    ((DWORD)0x00000010)
     753#define SP_PARITY_CHECK    ((DWORD)0x00000020)
     754#define SP_RLSD            ((DWORD)0x00000040)
     755/*
     756 Settable baudrates in the provider
     757*/
     758#define BAUD_075           ((DWORD)0x00000001)
     759#define BAUD_110           ((DWORD)0x00000002)
     760#define BAUD_134_5         ((DWORD)0x00000004)
     761#define BAUD_150           ((DWORD)0x00000008)
     762#define BAUD_300           ((DWORD)0x00000010)
     763#define BAUD_600           ((DWORD)0x00000020)
     764#define BAUD_1200          ((DWORD)0x00000040)
     765#define BAUD_1800          ((DWORD)0x00000080)
     766#define BAUD_2400          ((DWORD)0x00000100)
     767#define BAUD_4800          ((DWORD)0x00000200)
     768#define BAUD_7200          ((DWORD)0x00000400)
     769#define BAUD_9600          ((DWORD)0x00000800)
     770#define BAUD_14400         ((DWORD)0x00001000)
     771#define BAUD_19200         ((DWORD)0x00002000)
     772#define BAUD_38400         ((DWORD)0x00004000)
     773#define BAUD_56K           ((DWORD)0x00008000)
     774#define BAUD_128K          ((DWORD)0x00010000)
     775#define BAUD_115200        ((DWORD)0x00020000)
     776#define BAUD_57600         ((DWORD)0x00040000)
     777#define BAUD_USER          ((DWORD)0x10000000)
     778
     779#define CBR_110 0xFF10
     780#define CBR_300 0xFF11
     781#define CBR_600 0xFF12
     782#define CBR_1200        0xFF13
     783#define CBR_2400        0xFF14
     784#define CBR_4800        0xFF15
     785#define CBR_9600        0xFF16
     786#define CBR_14400       0xFF17
     787#define CBR_19200       0xFF18
     788#define CBR_38400       0xFF1B
     789#define CBR_56000       0xFF1F
     790#define CBR_128000      0xFF23
     791#define CBR_256000      0xFF27
     792
     793/*
     794 Setable Databits
     795 */
     796#define DATABITS_5         ((DWORD)0x00000001)
     797#define DATABITS_6         ((DWORD)0x00000002)
     798#define DATABITS_7         ((DWORD)0x00000004)
     799#define DATABITS_8         ((DWORD)0x00000008)
     800#define DATABITS_16        ((DWORD)0x00000010)
     801#define DATABITS_16X       ((DWORD)0x00000020)
     802
     803/*
     804 Setable Stop and Parity Bits
     805 */
     806
     807#define STOPBITS_10       ((DWORD)0x00000001)
     808#define STOPBITS_15       ((DWORD)0x00000002)
     809#define STOPBITS_20       ((DWORD)0x00000004)
     810#define PARITY_NONE       ((DWORD)0x00000100)
     811#define PARITY_ODD        ((DWORD)0x00000200)
     812#define PARITY_EVEN       ((DWORD)0x00000400)
     813#define PARITY_MARK       ((DWORD)0x00000800)
     814#define PARITY_SPACE      ((DWORD)0x00001000)
     815
     816#define STOPBITS_10       ((DWORD)0x00000001)
     817#define STOPBITS_15       ((DWORD)0x00000002)
     818#define STOPBITS_20       ((DWORD)0x00000004)
     819#define PARITY_NONE       ((DWORD)0x00000100)
     820#define PARITY_ODD        ((DWORD)0x00000200)
     821#define PARITY_EVEN       ((DWORD)0x00000400)
     822#define PARITY_MARK       ((DWORD)0x00000800)
     823#define PARITY_SPACE      ((DWORD)0x00001000)
     824
     825#define NOPARITY        0
     826#define ODDPARITY       1
     827#define EVENPARITY      2
     828#define MARKPARITY      3
     829#define SPACEPARITY     4
     830#define ONESTOPBIT      0
     831#define ONE5STOPBITS    1
     832#define TWOSTOPBITS     2
     833
     834/* Modem Status Flags */
     835#define MS_CTS_ON           ((DWORD)0x0010)
     836#define MS_DSR_ON           ((DWORD)0x0020)
     837#define MS_RING_ON          ((DWORD)0x0040)
     838#define MS_RLSD_ON          ((DWORD)0x0080)
     839
     840#define RTS_CONTROL_DISABLE     0
     841#define RTS_CONTROL_ENABLE      1
     842#define RTS_CONTROL_HANDSHAKE   2
     843#define RTS_CONTROL_TOGGLE      3
     844
     845#define DTR_CONTROL_DISABLE     0
     846#define DTR_CONTROL_ENABLE      1
     847#define DTR_CONTROL_HANDSHAKE   2
     848
     849#define CSTF_CTSHOLD    0x01
     850#define CSTF_DSRHOLD    0x02
     851#define CSTF_RLSDHOLD   0x04
     852#define CSTF_XOFFHOLD   0x08
     853#define CSTF_XOFFSENT   0x10
     854#define CSTF_EOF        0x20
     855#define CSTF_TXIM       0x40
     856
     857
     858#define IGNORE          0
     859#define INFINITE16      0xFFFF
     860#define INFINITE      0xFFFFFFFF
     861
     862#define CE_RXOVER       0x0001
     863#define CE_OVERRUN      0x0002
     864#define CE_RXPARITY     0x0004
     865#define CE_FRAME        0x0008
     866#define CE_BREAK        0x0010
     867#define CE_CTSTO        0x0020
     868#define CE_DSRTO        0x0040
     869#define CE_RLSDTO       0x0080
     870#define CE_TXFULL       0x0100
     871#define CE_PTO          0x0200
     872#define CE_IOE          0x0400
     873#define CE_DNS          0x0800
     874#define CE_OOP          0x1000
     875#define CE_MODE 0x8000
     876
     877#define IE_BADID        -1
     878#define IE_OPEN -2
     879#define IE_NOPEN        -3
     880#define IE_MEMORY       -4
     881#define IE_DEFAULT      -5
     882#define IE_HARDWARE     -10
     883#define IE_BYTESIZE     -11
     884#define IE_BAUDRATE     -12
     885
     886#define EV_RXCHAR       0x0001
     887#define EV_RXFLAG       0x0002
     888#define EV_TXEMPTY      0x0004
     889#define EV_CTS          0x0008
     890#define EV_DSR          0x0010
     891#define EV_RLSD 0x0020
     892#define EV_BREAK        0x0040
     893#define EV_ERR          0x0080
     894#define EV_RING 0x0100
     895#define EV_PERR 0x0200
     896#define EV_CTSS 0x0400
     897#define EV_DSRS 0x0800
     898#define EV_RLSDS        0x1000
     899#define EV_RINGTE       0x2000
     900#define EV_RingTe       EV_RINGTE
     901
     902#define SETXOFF 1
     903#define SETXON          2
     904#define SETRTS          3
     905#define CLRRTS          4
     906#define SETDTR          5
     907#define CLRDTR          6
     908#define RESETDEV        7
     909#define SETBREAK        8
     910#define CLRBREAK        9
     911
     912#define GETBASEIRQ      10
     913
     914/* Purge functions for Comm Port */
     915#define PURGE_TXABORT       0x0001  /* Kill the pending/current writes to the
     916                                       comm port */
     917#define PURGE_RXABORT       0x0002  /*Kill the pending/current reads to
     918                                     the comm port */
     919#define PURGE_TXCLEAR       0x0004  /* Kill the transmit queue if there*/
     920#define PURGE_RXCLEAR       0x0008  /* Kill the typeahead buffer if there*/
     921
     922
     923
     924typedef struct _COMMPROP {
     925    WORD wPacketLength;
     926    WORD wPacketVersion;
     927    DWORD dwServiceMask;
     928    DWORD dwReserved1;
     929    DWORD dwMaxTxQueue;
     930    DWORD dwMaxRxQueue;
     931    DWORD dwMaxBaud;
     932    DWORD dwProvSubType;
     933    DWORD dwProvCapabilities;
     934    DWORD dwSettableParams;
     935    DWORD dwSettableBaud;
     936    WORD wSettableData;
     937    WORD wSettableStopParity;
     938    DWORD dwCurrentTxQueue;
     939    DWORD dwCurrentRxQueue;
     940    DWORD dwProvSpec1;
     941    DWORD dwProvSpec2;
     942    WCHAR wcProvChar[1];
     943} COMMPROP,*LPCOMMPROP;
     944
     945#ifndef INCL_OS2MM
     946
     947typedef struct tagCOMSTAT
     948{
     949    // DWORD status;
     950    unsigned fCtsHold:1;
     951    unsigned fDsrHold:1;
     952    unsigned fRlsdHold:1;
     953    unsigned fXoffHold:1;
     954    unsigned fXoffSend:1;
     955    unsigned fEof:1;
     956    unsigned fTxim:1;
     957    unsigned fReserved:25;
     958    DWORD cbInQue;
     959    DWORD cbOutQue;
     960} COMSTAT,*LPCOMSTAT;
     961
     962typedef struct tagDCB
     963{
     964    DWORD DCBlength;
     965    DWORD BaudRate;
     966    unsigned fBinary               :1;
     967    unsigned fParity               :1;
     968    unsigned fOutxCtsFlow          :1;
     969    unsigned fOutxDsrFlow          :1;
     970    unsigned fDtrControl           :2;
     971    unsigned fDsrSensitivity       :1;
     972    unsigned fTXContinueOnXoff     :1;
     973    unsigned fOutX                 :1;
     974    unsigned fInX                  :1;
     975    unsigned fErrorChar            :1;
     976    unsigned fNull                 :1;
     977    unsigned fRtsControl           :2;
     978    unsigned fAbortOnError         :1;
     979    unsigned fDummy2               :17;
     980    WORD wReserved;
     981    WORD XonLim;
     982    WORD XoffLim;
     983    BYTE ByteSize;
     984    BYTE Parity;
     985    BYTE StopBits;
     986    char XonChar;
     987    char XoffChar;
     988    char ErrorChar;
     989    char EofChar;
     990    char EvtChar;
     991} DCB, *LPDCB;
     992
     993
     994
     995typedef struct tagCOMMTIMEOUTS {
     996        DWORD   ReadIntervalTimeout;
     997        DWORD   ReadTotalTimeoutMultiplier;
     998        DWORD   ReadTotalTimeoutConstant;
     999        DWORD   WriteTotalTimeoutMultiplier;
     1000        DWORD   WriteTotalTimeoutConstant;
     1001} COMMTIMEOUTS,*LPCOMMTIMEOUTS;
     1002
     1003typedef struct _COMMCONFIG {
     1004    DWORD dwSize;
     1005    WORD wVersion;
     1006    WORD wReserved;
     1007    DCB dcb;
     1008    DWORD dwProviderSubType;
     1009    DWORD dwProviderOffset;
     1010    DWORD dwProviderSize;
     1011    WCHAR wcProviderData[1];
     1012} COMMCONFIG,*LPCOMMCONFIG;
     1013#endif // INCL_OS2MM
    7031014#endif
    7041015
Note: See TracChangeset for help on using the changeset viewer.