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

  1. //+-----------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (c) Microsoft Corporation 1991 - 1998
  6. //
  7. // File:        secext.h
  8. //
  9. // Contents:    Security function prototypes for functions not part of
  10. //              the security support provider interface (secsuppr.h)
  11. //
  12. //
  13. // History:     22 Dec 92   RichardW    Created
  14. //
  15. //------------------------------------------------------------------------
  16.  
  17. #ifndef __SECEXT_H__
  18. #pragma option push -b -a8 -pc -A- /*P_O_Push_S*/
  19. #define __SECEXT_H__
  20.  
  21.  
  22. typedef struct _SecurityUserData {
  23.     SECURITY_STRING UserName;           // User name
  24.     SECURITY_STRING LogonDomainName;    // Domain the user logged on to
  25.     SECURITY_STRING LogonServer;        // Server that logged the user on
  26.     PSID            pSid;               // SID of user
  27. } SecurityUserData, * PSecurityUserData;
  28.  
  29. #define UNDERSTANDS_LONG_NAMES  1
  30. #define NO_LONG_NAMES           2
  31.  
  32.  
  33. HRESULT SEC_ENTRY
  34. GetSecurityUserInfo(
  35.     IN PLUID LogonId,
  36.     IN ULONG Flags,
  37.     OUT PSecurityUserData * UserInformation
  38.     );
  39.  
  40.  
  41.  
  42. SECURITY_STATUS SEC_ENTRY
  43. IsLogonOkay(unsigned long   fBlock);
  44.  
  45.  
  46.  
  47. //
  48. // Credential Management types and APIs
  49. //
  50.  
  51. //
  52. // SaveCredentials
  53. //
  54.  
  55. SECURITY_STATUS SEC_ENTRY
  56. SaveCredentials (
  57.     PCredHandle     pCredHandle,
  58.     unsigned long   cbCredentials,
  59.     unsigned char * pbCredentials
  60.     );
  61.  
  62.  
  63. //
  64. // GetCredentials
  65. //
  66.  
  67. SECURITY_STATUS SEC_ENTRY
  68. GetCredentials (
  69.     PCredHandle      pCredHandle,
  70.     unsigned long *  pcbCredentials,
  71.     unsigned char *  ppbCredentials
  72.     );
  73.  
  74.  
  75. //
  76. // DeleteCredentials
  77. //
  78.  
  79. SECURITY_STATUS SEC_ENTRY
  80. DeleteCredentials (
  81.     PCredHandle      pCredHandle,
  82.     unsigned long    cbKey,
  83.     unsigned char *  pbKey
  84.     );
  85.  
  86.  
  87. //
  88. // FormatCredentials
  89. //
  90.  
  91. SECURITY_STATUS SEC_ENTRY
  92. FormatCredentials(
  93.     LPWSTR          pszPackageName,
  94.     ULONG           cbCredentials,
  95.     PUCHAR          pbCredentials,
  96.     PULONG          pcbFormattedCreds,
  97.     PUCHAR *        ppbFormattedCreds);
  98.  
  99. typedef enum _SecStateDelta {
  100.     SecStateStatic,             // The state is not changing
  101.     SecStateChange,             // Req:  change state
  102.     SecStateComplete,           // Req:  complete state change
  103.     SecStateAbort,              // Req:  abort state change (revert)
  104.     SecStateChanging            // The state is changing
  105. } SecStateDelta, * PSecStateDelta;
  106.  
  107. typedef enum _SecState {
  108.     SecStateStandalone,         // Not connected to a domain
  109.     SecStateDisconnected,       // Joined, but no active connection
  110.     SecStateJoined,             // Joined, active connection
  111.     SecStateDC                  // Domain controller
  112. } SecurityState, * PSecurityState;
  113.  
  114. SECURITY_STATUS SEC_ENTRY
  115. SecChangeState(
  116.     PWSTR           pszDomainName,  // Domain (for SecStateDelta)
  117.     SecStateDelta   StateChange,    // State change type
  118.     SecurityState   State);         // State type
  119.  
  120. SECURITY_STATUS SEC_ENTRY
  121. SecQueryState(
  122.     PSecurityState  pState,
  123.     PSecStateDelta  pStateChange);
  124.  
  125. #define SECURITY_CONTROL_NAME                       L"SPMgr"
  126. #define SECURITY_CONTROL_REFRESH                    100
  127. #define SECURITY_CONTROL_UPDATE_MACHINE_JP_PROPS    101
  128. #define SECURITY_CONTROL_RELOAD_LOCAL_POLICY        102
  129.  
  130.  
  131.  
  132. //
  133. // this should map a SECURITY_STATUS to an NTSTATUS, but there is
  134. // no guarantee that NTSTATUS is defined. MMS 10/38/94
  135. //
  136.  
  137. SECURITY_STATUS SEC_ENTRY
  138. MapSecurityError( SECURITY_STATUS hrValue );
  139.  
  140.  
  141. #pragma option pop /*P_O_Pop*/
  142. #endif // __SECEXT_H__
  143.