You should not use DuplicateHandle to duplicate handles to the following objects: Sockets. No error is returned, but the duplicate handle may not be recognized by Winsock at the target process. To duplicate a socket handle, use the WSADuplicateSocket function.