Network Programming for Microsoft Windows, Second Edition Comments And Corrections (815128)



The information in this article applies to:

  • MSPRESS Network Programming for Microsoft Windows, Second Edition, ISBN 0-7356-1579-9

SUMMARY

This article contains comments, corrections, and information about known errors relating to the Microsoft Press book Network Programming for Microsoft Windows, Second Edition, 0-7356-1579-9.

The following topics are covered:

  • Page 33: Correction To Code
  • Page 33: Error In Code Sample
  • Page 299: Error In Code Sample
  • Page 370: Incorrect Reference To Template.cpp

MORE INFORMATION

Page 33: Correction To Code

On page 33, about halfway down the page, replace:
bind(ReceivingSocket, (SOCKADDR *)&SenderAddr, sizeof(SenderAddr));

with:
bind(ReceivingSocket, (SOCKADDR *)&ReceiverAddr, sizeof(ReceiverAddr));

Page 33: Error In Code Sample

There is an error in the code sample on page 33.

Change:
bind(ReceivingSocket, (SOCKADDR *)&SenderAddr, sizeof(SenderAddr));

To:
bind(ReceivingSocket, (SOCKADDR *)& ReceiverAddr, sizeof(ReceiverAddr));


Page 299: Error In Code Sample

There is an error in the code sample on page 299.

Change:
PCHAR  *addr; 

if (hostent->h_aliases)
{
    addr = hostent->h_aliases = 
    (PCHAR)((DWORD_PTR)hostent->h_aliases + (PCHAR)hostent);
   while (addr)
   {
        addr = (PCHAR)((DWORD_PTR)addr + (PCHAR *)hostent);
        addr++;
    }
}

To:
PCHAR  *addr;

if (hostent->h_aliases)
{
    addr = hostent->h_aliases = 
    (PCHAR)((DWORD)hostent->h_aliases + (PCHAR)hostent);
   while (*addr)
   {
        *addr = (PCHAR)((DWORD)*addr + (PCHAR *)hostent);
        addr++;
    }
}

Page 370: Incorrect Reference To Template.cpp

Page 370 refers to a sample template named Template.cpp.

The correct name of this sample file is QOSTemplate.cpp.

Microsoft Press is committed to providing informative and accurate books. All comments and corrections listed above are ready for inclusion in future printings of this book. If you have a later printing of this book, it may already contain most or all of the above corrections.

Modification Type:MinorLast Reviewed:8/27/2004
Keywords:kbdocerr KB815128 kbAudEndUser