home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 May / PCP163A.iso / Runimage / Cbuilder4 / Include / SPORDER.H < prev    next >
Encoding:
C/C++ Source or Header  |  1999-01-26  |  2.1 KB  |  81 lines

  1. #pragma option push -b -a8 -pc -A- /*P_O_Push_S*/
  2. /*++
  3.  
  4. Copyright 1996 - 1997 Microsoft Corporation
  5.  
  6. Module Name:
  7.  
  8.     sporder.h
  9.  
  10. Abstract:
  11.  
  12.     This header prototypes the 32-Bit Windows functions that are used
  13.     to change the order or WinSock2 transport service providers and
  14.     name space providers.
  15.  
  16. Revision History:
  17.  
  18. --*/
  19.  
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23.  
  24. int
  25. WSPAPI
  26. WSCWriteProviderOrder (
  27.     IN LPDWORD lpwdCatalogEntryId,
  28.     IN DWORD dwNumberOfEntries
  29.     );
  30. /*++
  31.  
  32. Routine Description:
  33.  
  34.     Reorder existing WinSock2 service providers.  The order of the service
  35.     providers determines their priority in being selected for use.  The
  36.     sporder.exe tool will show you the installed provider and their ordering,
  37.     Alternately, WSAEnumProtocols(), in conjunction with this function,
  38.     will allow you to write your own tool.
  39.  
  40. Arguments:
  41.  
  42.     lpwdCatalogEntryId  [in]
  43.       An array of CatalogEntryId elements as found in the WSAPROTOCOL_INFO
  44.       structure.  The order of the CatalogEntryId elements is the new
  45.       priority ordering for the service providers.
  46.  
  47.     dwNumberOfEntries  [in]
  48.       The number of elements in the lpwdCatalogEntryId array.
  49.  
  50.  
  51. Return Value:
  52.  
  53.     ERROR_SUCCESS   - the service providers have been reordered.
  54.     WSAEINVAL       - input parameters were bad, no action was taken.
  55.     ERROR_BUSY      - the routine is being called by another thread or process.
  56.     any registry error code
  57.  
  58.  
  59. Comments:
  60.  
  61.     Here are scenarios in which the WSCWriteProviderOrder function may fail:
  62.  
  63.       The dwNumberOfEntries is not equal to the number of registered service
  64.       providers.
  65.  
  66.       The lpwdCatalogEntryId contains an invalid catalog ID.
  67.  
  68.       The lpwdCatalogEntryId does not contain all valid catalog IDs exactly
  69.       1 time.
  70.  
  71.       The routine is not able to access the registry for some reason
  72.       (e.g. inadequate user persmissions)
  73.  
  74.       Another process (or thread) is currently calling the routine.
  75.  
  76. --*/
  77.  
  78. #ifdef __cplusplus
  79. }
  80. #endif#pragma option pop /*P_O_Pop*/
  81.