home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Compilers / digital marsC compier / dm / include / win32 / Sporder.h < prev    next >
Encoding:
Text File  |  1996-08-08  |  1.9 KB  |  74 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.  
  20.  
  21. int
  22. WSPAPI
  23. WSCWriteProviderOrder (
  24.     IN LPDWORD lpwdCatalogEntryId,
  25.     IN DWORD dwNumberOfEntries
  26.     );
  27. /*++
  28.  
  29. Routine Description:
  30.  
  31.     Reorder existing WinSock2 service providers.  The order of the service
  32.     providers determines their priority in being selected for use.  The
  33.     sporder.exe tool will show you the installed provider and their ordering,
  34.     Alternately, WSAEnumProtocols(), in conjunction with this function,
  35.     will allow you to write your own tool.
  36.  
  37. Arguments:
  38.  
  39.     lpwdCatalogEntryId  [in]
  40.       An array of CatalogEntryId elements as found in the WSAPROTOCOL_INFO
  41.       structure.  The order of the CatalogEntryId elements is the new
  42.       priority ordering for the service providers.
  43.  
  44.     dwNumberOfEntries  [in]
  45.       The number of elements in the lpwdCatalogEntryId array.
  46.  
  47.  
  48. Return Value:
  49.  
  50.     ERROR_SUCCESS   - the service providers have been reordered.
  51.     WSAEINVAL       - input parameters were bad, no action was taken.
  52.     ERROR_BUSY      - the routine is being called by another thread or process.
  53.     any registry error code
  54.  
  55.  
  56. Comments:
  57.  
  58.     Here are scenarios in which the WSCWriteProviderOrder function may fail:
  59.  
  60.       The dwNumberOfEntries is not equal to the number of registered service
  61.       providers.
  62.  
  63.       The lpwdCatalogEntryId contains an invalid catalog ID.
  64.  
  65.       The lpwdCatalogEntryId does not contain all valid catalog IDs exactly
  66.       1 time.
  67.  
  68.       The routine is not able to access the registry for some reason
  69.       (e.g. inadequate user persmissions)
  70.  
  71.       Another process (or thread) is currently calling the routine.
  72.  
  73. --*/
  74.