I've found some code that uses _ConnectEx and not the normal ConnectEx.
Is there a difference?
In fact I've noticed that Microsoft have some other function calls that are preceded by an underscore. What is the motivation for that?
ConnectEx
isn't a normal exported function. In fact it's not exported by name at all. If you read the docs for it you find:
The function pointer for the ConnectEx function must be obtained at run time by making a call to the WSAIoctl function with the SIO_GET_EXTENSION_FUNCTION_POINTER opcode specified. The input buffer passed to the WSAIoctl function must contain WSAID_CONNECTEX, a globally unique identifier (GUID) whose value identifies the ConnectEx extension function. On success, the output returned by the WSAIoctl function contains a pointer to the ConnectEx function.
So I would say that the code you have seen is simply using a variable called _ConnectEx
to store the function address.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.