-
Notifications
You must be signed in to change notification settings - Fork 6
/
EnumSer.htm
172 lines (125 loc) · 5.76 KB
/
EnumSer.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<title>EnumSerialPorts v1.04</title>
</head>
<body bgcolor="#FFFFFF">
<p align="left"><img src="enumser.gif" width="32" height="32"> <font color="#000000"
size="6" face="Arial"><strong>EnumSerialPorts v1.04</strong></font></p>
<p><font color="#000000" face="Arial" size="3">Welcome to EnumSerialPorts, A simple
MFC function to enumerate the serial ports installed on your machine.</font></p>
<p> </p>
<table>
<tr>
<td><font face="Arial"><a href="#Features">Features</a></font></td>
</tr>
<tr>
<td><font face="Arial"><a href="#Usage">Usage</a></font></td>
</tr>
<tr>
<td><font face="Arial"><a href="#Copyright">Copyright</a></font></td>
</tr>
<tr>
<td><font face="Arial"><a href="#History">History</a></font></td>
</tr>
<tr>
<td><font face="Arial"><a href="#APIReference">API Reference</a></font></td>
</tr>
<tr>
<td><font face="Arial"><a href="#Contact">Contacting the Author</a></font></td>
</tr>
</table>
<p> </p>
<p> </p>
<p> </p>
<p><font face="Arial"><a name="Features"></a><big><strong><big>Features</big></strong></big>
</font>
<ul>
<li><font color="#000000" face="Arial" size="3">Simple C style function interface.</font></li>
<li><font color="#000000" face="Arial" size="3">The code works on both Windows 95/98 and NT.
Internally the code calls GetDefaultCommConfig which does not require a call
to open the port.</font></li>
<li><font color="#000000" face="Arial" size="3">The code is fully Unicode compliant and
include Unicode built options in the workspace file.</font></li>
</ul>
<p> </p>
<p> </p>
<p> </p>
<p><a name="Usage"></a><font face="Arial"><big><big><strong>Usage</strong></big></big></font>
<ul>
<li><font color="#000000" face="Arial" size="3">To use the function in your code simply
include enumser.cpp in your project and #include enumser.h in which ever of your modules
needs to make calls to the function.</font></li>
<li><font face="Arial">Your code will need to include MFC either statically or dynamically.</font></li>
<li><font face="Arial">To see the class in action, have a look at the main function in the
module "main.cpp".</font></li>
</ul>
<p> </p>
<p> </p>
<p> </p>
<p><b><font face="Arial" size="5"><a name="Copyright"></a>Copyright</font></b></p>
<ul>
<li><font face="Arial" size="3">You are allowed to include the source code in
any product (commercial, shareware, freeware or otherwise) when your product
is released in binary form.</font></li>
<li><font face="Arial" size="3">You are allowed to modify the source code in
any way you want except you cannot modify the copyright details at the top
of each module.</font></li>
<li><font face="Arial" size="3">If you want to distribute source code with
your application, then you are only allowed to distribute versions released
by the author. This is to maintain a single distribution point for the
source code.</font></li>
</ul>
<p> </p>
<p> </p>
<p> </p>
<p><font face="Arial"><big><a name="History"></a></big><font color="#000000" size="5"><strong>History</strong></font></font></p>
<p><font color="#000000" face="Arial" size="3"><strong>v1.0 (3 November 1998)</strong></font>
<ul>
<li><font color="#000000" face="Arial" size="3">Initial public release.</font></li>
</ul>
<p><font color="#000000" face="Arial" size="3"><strong>v1.01 (23 February 1999)</strong></font>
<ul>
<li><font color="#000000" face="Arial" size="3">Code now uses QueryDosDevice
if running on NT to determine which serial ports are available. This avoids having to open the
ports at all. It should operate a lot faster in addition.</font></li>
</ul>
<p><font color="#000000" face="Arial" size="3"><strong>v1.02 (12 December 1999)</strong></font>
<ul>
<li><font face="Arial">Fixed a problem in the Win9x code path when trying to
detect deactivated IRDA-ports. When trying to open those, you will get the error-code
ERROR_GEN_FAILURE. </font></li>
</ul>
<p><font color="#000000" face="Arial" size="3"><strong>v1.03 (17 May 2000)</strong></font>
<ul>
<li><font face="Arial">Code now uses GetDefaultCommConfig in all cases to detect the ports.</font></li>
</ul>
<p><font color="#000000" face="Arial" size="3"><strong>v1.04 (29 March 2001)</strong></font>
<ul>
<li><font face="Arial"> Reverted code to use CreateFile or QueryDosDevice as it is much faster than using the GetDefaultCommConfig
method.</font></li>
<li><font face="Arial">Updated copyright message.</font></li>
</ul>
<p class="crt"> </p>
<p class="crt"> </p>
<p class="crt"> </p>
<p class="crt"><font face="Arial"><a name="APIReference"></a><big><big><strong>API
Reference</strong></big></big></font></p>
<p><a name="Start"></a><big><strong><font face="Arial">EnumerateSerialPorts</font></strong></big></p>
<p><strong><font face="Arial">void ::EnumerateSerialPorts(CUIntArray& ports);</font></strong></p>
<p><font face="Arial"><strong>Parameters</strong></font></p>
<p><font face="Arial"><em>ports</em> Upon return this array will contain the port numbers
of all the serial ports installed on the computer</font></p>
<p> </p>
<p> </p>
<p> </p>
<p><font face="Arial"><a name="Contact"></a><font color="#000000" size="4"><strong>CONTACTING
THE AUTHOR</strong></font></font></p>
<p><font color="#000000" face="Arial" size="3">PJ Naughter<br>
Email: <a href="mailto:[email protected]">[email protected]</a><br>
Web: <a href="http://www.naughter.com">http://www.naughter.com</a><br>
29 March 2001</font></p>
</body>
</html>