Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

173 lines
5.0 KiB

  1. /**********************************************************************/
  2. /** Microsoft LAN Manager **/
  3. /** Copyright(c) Microsoft Corp., 1991 **/
  4. /**********************************************************************/
  5. /*
  6. * History
  7. * o-SimoP 6/11/91 Created
  8. * o-SimoP 7/02/91 Code Review changes
  9. * terryk 10/07/91 type changes for NT
  10. * terryk 10/21/91 type changes for NT
  11. *
  12. *
  13. */
  14. #ifndef _LMOMOD_HXX_
  15. #define _LMOMOD_HXX_
  16. #include "lmobj.hxx"
  17. #include "string.hxx"
  18. #include "lmoloc.hxx"
  19. /*************************************************************************
  20. NAME: USER_MODALS
  21. SYNOPSIS: User API's modals get/set, level 0
  22. INTERFACE: Construct with server or domain name.
  23. QueryName()
  24. if ok returns pointer to name (given in
  25. constructor).
  26. otherwise NULL.
  27. GetInfo()
  28. Get information about the user_modals.
  29. Returns an error code, which is NERR_Success
  30. on success.
  31. WriteInfo()
  32. Write information about the user_modals.
  33. Returns an error code, which is NERR_Success
  34. on success.
  35. QueryMinPasswdLen()
  36. Returns minpasswdlen if ok.
  37. Otherwise -1.
  38. QueryMaxPasswdAge()
  39. Returns maxpasswdage if ok.
  40. Otherwise 0.
  41. QueryMinPasswdAge()
  42. Returns minpasswdage if ok.
  43. Otherwise -1.
  44. QueryForceLogoff()
  45. Returns force logoff time if ok.
  46. Otherwise 0.
  47. QueryPasswdHistLen()
  48. Returns passwd history lenght if ok.
  49. otherwise -1.
  50. SetMinPasswdLen()
  51. SetMaxPasswdAge()
  52. SetMinPasswdAge()
  53. SetForceLogoff()
  54. SetPasswdHistLen()
  55. Set information about the USER_MODALS object.
  56. Returns ERROR_GEN_FAILURE if USER_MODALS obj not valid
  57. ERROR_INVALID_PARAM if input param invalid
  58. NERR_Success if ok.
  59. PARENT: LM_OBJ
  60. HISTORY:
  61. o-simop 06/11/91 Created
  62. **************************************************************************/
  63. DLL_CLASS USER_MODALS : public LM_OBJ
  64. {
  65. private:
  66. LOCATION _loc;
  67. UINT _uMinPasswdLen;
  68. ULONG _ulMaxPasswdAge;
  69. ULONG _ulMinPasswdAge;
  70. ULONG _ulForceLogoff;
  71. UINT _uPasswdHistLen;
  72. public:
  73. USER_MODALS( const TCHAR * pszDomain );
  74. virtual const TCHAR * QueryName() const;
  75. virtual APIERR GetInfo();
  76. virtual APIERR WriteInfo();
  77. UINT QueryMinPasswdLen( VOID ) const;
  78. ULONG QueryMaxPasswdAge( VOID ) const;
  79. ULONG QueryMinPasswdAge( VOID ) const;
  80. ULONG QueryForceLogoff( VOID ) const;
  81. UINT QueryPasswdHistLen( VOID ) const;
  82. APIERR SetMinPasswdLen( UINT uMinLen );
  83. APIERR SetMaxPasswdAge( ULONG ulMaxAge );
  84. APIERR SetMinPasswdAge( ULONG ulMinAge );
  85. APIERR SetForceLogoff( ULONG ulForceLogoff );
  86. APIERR SetPasswdHistLen( UINT uHistLen );
  87. };
  88. /*************************************************************************
  89. NAME: USER_MODALS_3
  90. SYNOPSIS: User API's modals get/set, level 3 (account lockout)
  91. INTERFACE: Construct with server or domain name.
  92. QueryName()
  93. if ok returns pointer to name (given in
  94. constructor).
  95. otherwise NULL.
  96. GetInfo()
  97. Get information about the user_modals.
  98. Returns an error code, which is NERR_Success
  99. on success.
  100. WriteInfo()
  101. Write information about the user_modals.
  102. Returns an error code, which is NERR_Success
  103. on success.
  104. PARENT: LM_OBJ
  105. HISTORY:
  106. jonn 12/23/93 Created
  107. **************************************************************************/
  108. DLL_CLASS USER_MODALS_3 : public LM_OBJ
  109. {
  110. private:
  111. LOCATION _loc;
  112. DWORD _dwDuration;
  113. DWORD _dwObservation;
  114. DWORD _dwThreshold;
  115. public:
  116. USER_MODALS_3( const TCHAR * pszDomain );
  117. virtual const TCHAR * QueryName() const;
  118. virtual APIERR GetInfo();
  119. virtual APIERR WriteInfo();
  120. DWORD QueryDuration( VOID ) const;
  121. DWORD QueryObservation( VOID ) const;
  122. DWORD QueryThreshold( VOID ) const;
  123. APIERR SetDuration( DWORD dwDuration );
  124. APIERR SetObservation( DWORD dwObservation );
  125. APIERR SetThreshold( DWORD dwThreshold );
  126. };
  127. #endif // _LMOMOD_HXX_