I have some problems to implement the WSAStartup api function in C#.
this is the portion of code:

public struct WSADATA
{
public int wVersion ;
public int wHighVersion;
public byte[] szDescription ;
public byte[] szSystemStatus ;
public long wMaxSockets;
public long wMAXUDPDG;
public long dwVendorInfo;
} // end of structure
...
[DllImport("wsock32.dll")]
public static extern long WSAStartup(long wVersionRequired, WSADATA lpWSDATA);
....
public bool SocketInitialize()
{
WSADATA WSAD = new WSADATA();

return (WSAStartup (WS_VERSION_REQD, WSAD) == IP_SUCCESS);
}
I think the problem is in the initilization of the WSAD structure.

thank's for your help.