Home   Index   About
Ultimate Pack


Custom Search
Overview
Group
Quick Info

Windows NT
Yes
Win95
Yes
Win32s
No
Import Library
-
Header File
winbase.h
Unicode
No
Platform Notes
None

COMMPROP

The COMMPROP structure is used by the GetCommProperties function to return information about a given communications driver.

typedef struct _COMMPROP { // cmmp

WORD wPacketLength; // packet size, in bytes

WORD wPacketVersion; // packet version

DWORD dwServiceMask; // services implemented

DWORD dwReserved1; // reserved

DWORD dwMaxTxQueue; // max Tx bufsize, in bytes

DWORD dwMaxRxQueue; // max Rx bufsize, in bytes

DWORD dwMaxBaud; // max baud rate, in bps

DWORD dwProvSubType; // specific provider type

DWORD dwProvCapabilities; // capabilities supported

DWORD dwSettableParams; // changable parameters

DWORD dwSettableBaud; // allowable baud rates

WORD wSettableData; // allowable byte sizes

WORD wSettableStopParity; // stop bits/parity allowed

DWORD dwCurrentTxQueue; // Tx buffer size, in bytes

DWORD dwCurrentRxQueue; // Rx buffer size, in bytes

DWORD dwProvSpec1; // provider-specific data

DWORD dwProvSpec2; // provider-specific data

WCHAR wcProvChar[1]; // provider-specific data

} COMMPROP;

Members

wPacketLength

Specifies the size, in bytes, of the entire data packet, regardless of the amount of data requested.

wPacketVersion

Specifies the version of the structure.

dwServiceMask

Specifies a bitmask indicating which services are implemented by this provider. The SP_SERIALCOMM value is always specified for communications providers, including modem providers.

dwReserved1

Reserved; do not use.

dwMaxTxQueue

Specifies the maximum size, in bytes, of the driver's internal output buffer. A value of zero indicates that no maximum value is imposed by the serial provider.

dwMaxRxQueue

Specifies the maximum size, in bytes, of the driver's internal input buffer. A value of zero indicates that no maximum value is imposed by the serial provider.

dwMaxBaud

Specifies the maximum allowable baud rate, in bits per second (bps). This member can be one of the following values:

Value
Meaning
BAUD_075
75 bps
BAUD_110
110 bps
BAUD_134_5
134.5 bps
BAUD_150
150 bps
BAUD_300
300 bps
BAUD_600
600 bps
BAUD_1200
1200 bps
BAUD_1800
1800 bps
BAUD_2400
2400 bps
BAUD_4800
4800 bps
BAUD_7200
7200 bps
BAUD_9600
9600 bps
BAUD_14400
14400 bps
BAUD_19200
19200 bps
BAUD_38400
38400 bps
BAUD_56K
56K bps
BAUD_57600
57600 bps
BAUD_115200
115200 bps
BAUD_128K
128K bps
BAUD_USER
Programmable baud rates available

dwProvSubType

Specifies the specific communications provider type:

Value
Meaning
PST_FAX
FAX device
PST_LAT
LAT protocol
PST_MODEM
Modem device
PST_NETWORK_BRIDGE
Unspecified network bridge
PST_PARALLELPORT
Parallel port
PST_RS232
RS-232 serial port
PST_RS422
RS-422 port
PST_RS423
RS-423 port
PST_RS449
RS-449 port
PST_SCANNER
Scanner device
PST_TCPIP_TELNET
TCP/IP TelnetŪ protocol
PST_UNSPECIFIED
Unspecified
PST_X25
X.25 standards

dwProvCapabilities

Specifies a bitmask indicating the capabilities offered by the provider. This member can be one of the following values:

Value
Meaning
PCF_16BITMODE
Special 16-bit mode supported
PCF_DTRDSR
DTR (data-terminal-ready)/DSR (data-set-ready) supported
PCF_INTTIMEOUTS
Interval time-outs supported
PCF_PARITY_CHECK
Parity checking supported
PCF_RLSD
RLSD (receive-line-signal-detect) supported
PCF_RTSCTS
RTS (request-to-send)/CTS (clear-to-send) supported
PCF_SETXCHAR
Settable XON/XOFF supported
PCF_SPECIALCHARS
Special character support provided
PCF_TOTALTIMEOUTS
Total (elapsed) time-outs supported
PCF_XONXOFF
XON/XOFF flow control supported

dwSettableParams

Specifies a bitmask indicating the communications parameter that can be changed. This member can be one of the following values:

Value
Meaning
SP_BAUD
Baud rate
SP_DATABITS
Data bits
SP_HANDSHAKING
Handshaking (flow control)
SP_PARITY
Parity
SP_PARITY_CHECK
Parity checking
SP_RLSD
RLSD (receive-line-signal-detect)
SP_STOPBITS
Stop bits

dwSettableBaud

Specifies a bitmask indicating the baud rates that can be used. For values, see the dwMaxBaud member.

wSettableData

Specifies a bitmask indicating the number of data bits that can be set. This member can be one of the following values:

Value
Meaning
DATABITS_5
5 data bits
DATABITS_6
6 data bits
DATABITS_7
7 data bits
DATABITS_8
8 data bits
DATABITS_16
16 data bits
DATABITS_16X
Special wide path through serial hardware lines

wSettableStopParity

Specifies a bitmask indicating the stop bit and parity settings that can be selected. This member can be one of the following values:

Value
Meaning
STOPBITS_10
  1. stop bit
STOPBITS_15
  1. 5 stop bits
STOPBITS_20
  1. stop bits
PARITY_NONE
No parity
PARITY_ODD
Odd parity
PARITY_EVEN
Even parity
PARITY_MARK
Mark parity
PARITY_SPACE
Space parity

dwCurrentTxQueue

Specifies the size, in bytes, of the driver's internal output buffer. A value of zero indicates that the value is unavailable.

dwCurrentRxQueue

Specifies the size, in bytes, of the driver's internal input buffer. A value of zero indicates that the value is unavailable.

dwProvSpec1

Specifies provider-specific data. Applications should ignore this member unless they have detailed information about the format of the data required by the provider.

Set this member to COMMPROP_INITIALIZED before calling the GetCommProperties function to indicate that the wPacketLength member is already valid.

dwProvSpec2

Specifies provider-specific data. Applications should ignore this member unless they have detailed information about the format of the data required by the provider.

wcProvChar

Specifies provider-specific data. Applications should ignore this member unless they have detailed information about the format of the data required by the provider.

Remarks

The contents of the dwProvSpec1, dwProvSpec2, and wcProvChar members depend on the provider subtype (specified by the dwProvSubType member).

If the provider subtype is PST_MODEM, these members are used as follows:

Value
Meaning
dwProvSpec1
Not used.
dwProvSpec2
Not used.
wcProvChar
Contains a MODEMDEVCAPS structure.

See Also

GetCommProperties


Last news from Greatis Software

Nostalgia .Net     Nostalgia .Net     .Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes.  More »

Recommended software for developers

Ultimate Pack for Delphi and C++ Builder     Ultimate Pack     Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price.  More »

Form Designer .Net     Form Designer .Net     Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro!  More »

Print Suite .Net     Print Suite .Net     Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available  More »

Gradient Controls .Net     Gradient Controls .Net     Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available  More »

iGrid     Greatis iGrid     iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors.  More »


All the contacts and projects

Dmitry Vasiliev (just.dmitry)

Related Links

Software for Visual Studio .NET developers
Software for Delphi and C++ Builder developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET

More Online Helps

Win32 Programmer's Reference
Win32 Multimedia Programmer's Reference
OLE Programmer's Reference
Microsoft Windows Pen API Programmer's Reference
Microsoft Windows Sockets 2 Reference
Microsoft Windows Telephony API (TAPI) Programmer's Reference
Unix Manual Pages

Free Tech Secrets ;) Copyright © 2008-2011 Free Tech Secrets ;) greatis just4fun network just4fun