Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

WSADATA (Structures)
 
.
Summary
The WSADATA structure contains information about the Windows Sockets implementation

C# Definition:

     [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
    internal struct WSAData
    {
        internal Int16 version;
        internal Int16 highVersion;
    [StructLayout(LayoutKind.Sequential)]
    public struct WSADATA
    {
      const int WSADESCRIPTION_LEN=256;
      const int WSASYS_STATUS_LEN=128;

        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 257)] internal String description;
      public short wVersion;
      public short wHighVersion;
      [MarshalAs(UnmanagedType.ByValTStr, SizeConst = WSADESCRIPTION_LEN + 1)]
      public string szDescription;
      [MarshalAs(UnmanagedType.ByValTStr, SizeConst = WSASYS_STATUS_LEN + 1)]
      public string szSystemStatus;
      [Obsolete] // Ignored for v2.0 and above
      public int wMaxSockets;
      [Obsolete] // Ignored for v2.0 and above
      public int wMAXUDPDG;
      public IntPtr dwVendorInfo;
    }

        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 129)] internal String systemStatus;

///

/// public int wMaxSockets;

/// should be

/// public ushort wMaxSockets;

///

///

/// public int wMAXUDPDG;

/// should be

/// public ushort wMAXUDPDG;

///

/// Changed by Mike Petrichenko (http://www.btframework.com)

        internal Int16 maxSockets;
        internal Int16 maxUdpDg;
        internal IntPtr vendorInfo;
    }

User-Defined Field Types:

None.

Notes:

dwVendorInfo is now unused (Winsock 2.0 and above)

Documentation
WSADATA on MSDN

Please edit this page!

Do you have...

  • helpful tips?
  • corrections to the existing content?
  • alternate definitions?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing any supporting types needed.

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions