home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / BC_502 / RTLWIN32.PAK / SPORDER.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  2.0 KB  |  77 lines

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