IWSDUdpAddress::SetSockaddr method (wsdbase.h)

Sets the socket address information.

Syntax

HRESULT SetSockaddr(
  [in] const SOCKADDR_STORAGE *pSockAddr
);

Parameters

[in] pSockAddr

Pointer to a SOCKADDR_STORAGE structure.

Return value

Possible return values include, but are not limited to, the following:

Return code Description
S_OK
Method completed successfully.
E_INVALIDARG
pSockAddr is NULL.
E_OUTOFMEMORY
Insufficient memory to complete the operation.
HRESULT_FROM_WIN32(WSAEINVAL)
The specified address is not a valid socket address, or no transport provider supports the indicated address family.
HRESULT_FROM_WIN32(WSANOTINITIALISED)
The Winsock 2 DLL has not been initialized. The application must first call WSAStartup to initialize Winsock 2.
HRESULT_FROM_WIN32(WSAENOBUFS)
No buffer space available.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header wsdbase.h (include Wsdapi.h)
DLL Wsdapi.dll

See also

IWSDUdpAddress