FIX: Setsockopt() for Winsock over Appletalk Returns Error

ID: Q129062

The information in this article applies to

SYMPTOMS

After you open a socket of type SOCK_STREAM by using the ATPROTO_ADSP protocol, and bind to a dynamic socket, the setsockopt() function fails under these conditions:

Error code 10022 (WSAINVAL :Invalid Argument) is returned on calling GetLastError().

RESOLUTION

Instead of passing the string returned by getsockopt() for the zone name, use the character "*" for the ZoneName member of the WSH_REGISTER_NAME struct. For example, use this:

   WSH_REGISTER_NAME regName;
   ........
   strcpy( regName.ZoneName, "*");

instead of this:

   strcpy( regName.ZoneName, "BLDG/1");

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This problem was corrected in Windows NT 3.51.

REFERENCES

Windows Sockets for Appletalk (SFMWSHAT.WRI version 1.2).

Additional query words:

Keywords          : kbnetwork kbAPI kbNTOS350bug kbNTOS351fix kbSDKPlatform kbWinsock kbGrpNet 
Issue type        : kbbug
Solution Type     : kbfix

Last Reviewed: July 31, 1998