The WSCWriteProviderOrder function is used to reorder the available transport providers. The order of the protocols determines the priority of a protocol when being enumerated or selected for us.
int WSCWriteProviderOrder (
LPDWORD lpwdCatalogEntryId,
DWORD dwNumberOfEntries
);
The order in which transport service providers are initially installed governs the order in which they are enumerated through WSCEnumProtocols at the service provider interface, or through WSAEnumProtocols at the application interface. More importantly, this order also governs the order in which protocols and service providers are considered when a client requests creation of a socket based on its address family, type, and protocol identifier. Windows Sockets 2 includes an applet called SPORDER.EXE that allows the catalog of installed protocols to be re-ordered interactively after protocols have already been installed. Windows Sockets 2 also includes an auxiliary DLL, SPORDER.DLL, that exports this procedural interface for re-ordering protocols. This interface can be imported by linking with SPORDER.LIB.
Here are scenarios in which the WSCWriteProviderOrder function can fail.
The function returns ERROR_SUCCESS (0) if the routine is successful. Otherwise it returns a specific error code as follows.
WSAEINVAL | Input parameters were bad, no action was taken. |
ERROR_BUSY | The routine is being called by another thread or process. |
(other) | The routine may return any registry error code. |
Windows NT: Yes
Windows: Yes
Windows CE: Unsupported.
Header: Declared in sporder.h.
Import Library: Included as a resource in sporder.dll.