FIX: Setsockopt() for Winsock over Appletalk Returns Error (129062)



The information in this article applies to:

  • Microsoft Win32 Software Development Kit (SDK) 3.5

This article was previously published under Q129062

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:
  • The setsockopt() function uses the zone name returned by getsockopt() (also found by looking at the control panel network entry) with the SO_LOOKUP_MYZONE option.
  • The zone name is supplied to setsockopt() with the SO_REGISTER_NAME option.
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).

Modification Type:MajorLast Reviewed:10/15/2002
Keywords:kbAPI kbBug kbnetwork kbOSWinNT351fix kbWinsock KB129062