应该可以用,
你用这个函数 WSADuplicateSocket
The Windows Sockets WSADuplicateSocket function returns a WSAPROTOCOL_INFO structure that can be used to create a new socket descriptor for a shared socket.
int WSADuplicateSocket (
SOCKET s,
DWORD dwProcessId,
LPWSAPROTOCOL_INFO lpProtocolInfo
);
Parameters
s
[in] Specifies the local socket descriptor.
dwProcessId
[in] Specifies the ID of the target process for which the shared socket will be used.
lpProtocolInfo
[out] A pointer to a buffer allocated by the client that is large enough to contain a WSAPROTOCOL_INFO structure. The service provider copies the protocol info structure contents to this buffer.