Share via


WPUCreateSocketHandle (Windows Embedded CE 6.0)

1/6/2010

This function creates a new socket handle.

Syntax

SOCKET WPUCreateSocketHandle(
  DWORD dwCatalogEntryId,
  DWORD_PTR dwContext,
  LPINT lpErrno 
);

Parameters

  • dwCatalogEntryId
    [in] Descriptor identifying the calling service provider. This parameter is used to determine which provider will be called for operations that are performed on the socket, such as WSASend and WSARecv.
  • dwContext
    [in] Context value to associate with the new socket handle.
  • lpErrno
    [out] Pointer to the error code.

Return Value

If no error occurs, this function returns the new socket handle. Otherwise, it returns INVALID_SOCKET, and a specific error code is available in lpErrno.

The following table shows the possible error code.

Error value Description

WSAENOBUFS

Not enough buffers available, too many sockets.

Remarks

This function creates a new socket handle for the specified provider. The handles created by this function are indistinguishable from true file system handles.

Ee494229.collapse(en-US,WinEmbedded.60).gifLayered Service Provider Considerations

A layered service provider may use this function to create the socket handles it exposes to its client.

Requirements

Header ws2spi.h
Library Ws2.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

Winsock SPI Functions
WPUCloseSocketHandle
WPUQuerySocketHandleContext
WSPRecv
WSPSend
WSPStartup