Errata for

Win32 API Programming with Visual Basic

by Steven Roman

To determine the printing of your book, look in the lower right corner of the copyright page, opposite the ISBN. If there is no date there, then you have the first printing.

I would like to appologize for the errors that appear in the first printing of this book. While some of the errors are mine, it is unfortunate that in this case the production process introduced a great many additional errors, some of which are quite embarrassing. In any case, here is a list of the most significant errors.

Return to computer books' main page
Return to Roman Press Home Page

In Second Printing

Page 76: First bullet point

The OUT paramter should be a VC++ (signed) CHAR parameter (rather than an unsigned CHAR type). We are going from a VC++ signed CHAR type to a VB (unsigned) Byte type.

Corrected in Second Printing

Page 15: Para 4

replace sentence "These files have extension EXE or DLL." with "PE files include EXE and DLL files, as well as OCX, DRV and other files."

Page 18: First line after section heading "The Basics"

First line should read: "Here are some basic facts about C++ language syntax:"

Page 39: last para

change “raise an API error” to “raise an error in VB”

Page 49: para beginning “Thus, TCHAR and TBYTE”

replace last phrase “CHAR, which, in turn, is a synonym for char” with “char and unsigned char, respectively.”

Page 76-77:

In the entire section entitled “Converting Between Word Lengths” there are five occurrences of the number -5. All of these should be changed to -32765.

Page 96: just before the section head “Dealing with IN Parameters”

Delete the sentence that begins “First, let us talk about…”

Page 96: second to last para

The first sentence in this para should be:

We should also note that the FindWindow function allows one (but not both) of its parameters to be set to the null string which, in Win32, is a null pointer (that is, a pointer that contains the value 0).

Page 103: first display

change PTSTR to LPTSTR

Page 103 and 104: Figure references and figure captions are incorrect.

On page 103:
  1. insert “(see Figure 6-8)” after the word “lpsz” in the sentence “We create an initial BSTR string buffer for lpsz, say:”
  2. move para numbered “2.” to follow Fig 6-8 and change reference to Figure 6-8 to Figure 6-9
  3. change caption of Figure 6-8 to “The Initial BSTR”
On page 104:
  1. move Figure 6-9 to the top of the page
  2. change caption for Figure 6-9 to “The temporary ABSTR”
  3. in para numbered “3.” change the reference to Figure 6-9 to a reference to Figure 6-10
  4. in para numbered “4.” delete words “As Figure 6-10 shows,” at beginning of para.
  5. move para numbered “4.” to follow Figure 6-10

Page 119: last para

replace sentence “For instance, the GetSystemDirectory…” with “The functions are defined as follows:”

Page 136: first para in section “A Complete Example”

Add the following sentence to the end of the para:

The GetException function below just returns the symbolic constant from Table 8.1 when given the constant’s value.

Page 163:

The heading “Getting a process handle…” should begin “A: Getting a process handle…”. The letter "A" is a reference to Figure 11-1.

Page 166:

The heading “Module Filenames and…” should begin “B: Module Filenames and…”. The letter "B" is a reference to Figure 11-1.

Page 169:

The heading “Getting the Current Process ID” should be “C: Getting the Current Process ID”. The letter "C" is a reference to Figure 11-1.

Page 169:

The heading “Getting the Process ID from a Window” should be “D: Getting the Process ID from a Window”. The letter "D" is a reference to Figure 11-1.

Page 170:

The heading “Getting Module names and Handles” should be “E: Getting Module names and Handles”. The letter "E" is a reference to Figure 11-1.

Page 179:

The first paragraph should be replaced by:

Note that, by comparing the memory maps for a process under Windows NT and Windows 95/98, it is possible to see that Windows 95/98 puts the Win32 (and other) system DLLs in a different location than Windows NT. For example, under Windows NT, KERNEL32.DLL is just under the 2GB mark, which is in the area of memory reserved for applications. However, under Windows 95/98, this DLL is at the 3GB mark, in the area of memory reserved for the operating system.

Page 179:

Delete last sentence on page.

Page 180:

Replace the first sentence by:

The first method is the simplest, but works only if the application has a uniquely identifiable top level window caption that does not change.

Page 184: lower middle of page

The line beginning “This DLL has a single,…” change “lUsageCount” to “giUsageCount”

Page 202: First para in section Mutexes

In the first para, the words signaled and nonsignaled got reversed. The paragraph should read: A mutex is a kernel object that can be used to synchronize threads running is different processes. A mutex may or may not be owned by some thread. If a mutex is owned by a thread, then the mutex is nonsignaled. If the mutex is not owned by any thread, the mutex is signaled. In other words, for a mutex, owned is equivalent to nonsignaled.

Page 242: in figure

At the top of the figure (PE Signature) then two “Ohs” in the boxes should be zeros

Page 263: first line

Change “Microsoft Windows" to “Windows’ windows”.

Page 317:

In last line of first para, the word "processing" should be "processes".

Page 318: second to last para

Change “In this case, all windows in the calling process only…” to “In this case, all windows of the specified class in the calling process only…”

Page 318: last para

Third line: change “new call” to “new class”

Last line: change “existing class” to “existing window or class”

Page 334:

heading “basmRpiHook” should be “basRpiHook”

Return to computer books' main page
Return to Roman Press Home Page