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.

108 lines
3.8 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corp., 1991 **/
  4. /**********************************************************************/
  5. /*
  6. lmsrvres.hxx
  7. Class declaration for the LM_SRVRES class.
  8. The LM_SRVRES class is a container for a number of utility
  9. functions pertaining to resources. These functions mainly
  10. deal with collecting various run-time server statistics,
  11. such as counts of open files and print jobs.
  12. FILE HISTORY:
  13. KeithMo 27-Aug-1991 Created.
  14. KeithMo 06-Oct-1991 Win32 Conversion.
  15. ChuckC 01-Dec-1991 Split from SERVER/H, cleanup to remove
  16. stuff that dont belong, no pixel drawing
  17. in this baby.
  18. ChuckC 17-Feb-1992 Code review changes
  19. */
  20. #ifndef _LMSRVRES_HXX
  21. #define _LMSRVRES_HXX
  22. /*************************************************************************
  23. NAME: LM_SRVRES
  24. SYNOPSIS: This class serves as a container for a number of utility
  25. functions used by the Server Manager.
  26. INTERFACE: LM_SRVRES() - Class constructor.
  27. ~LM_SRVRES - Class destructor.
  28. GetResourceCount - Returns the number of open
  29. files, named pipes, comm
  30. queues, print queues, and
  31. "other" (unknown) resources.
  32. GetSessionsCount - Returns the number of active
  33. sessions.
  34. GetPrintJobCount - Returns the number of active
  35. print jobs.
  36. GetOpenCommCount - Returns the number of active
  37. communication queues.
  38. NukeUsersSessions - Nukes a user's session
  39. HISTORY:
  40. KeithMo 27-Aug-1991 Created.
  41. KeithMo 22-Sep-1991 Added SetCaption method.
  42. beng 08-Nov-1991 Unsigned widths
  43. chuckc 01-Dec-1991 Inherit from base, change name.
  44. **************************************************************************/
  45. DLL_CLASS LM_SRVRES : public BASE
  46. {
  47. public:
  48. //
  49. // Usual constructor/destructor goodies.
  50. //
  51. LM_SRVRES();
  52. ~LM_SRVRES();
  53. static APIERR GetResourceCount( const TCHAR * pszServerName,
  54. ULONG * pcOpenFiles,
  55. ULONG * pcFileLocks,
  56. ULONG * pcOpenNamedPipes,
  57. ULONG * pcOpenCommQueues,
  58. ULONG * pcOpenPrintQueues,
  59. ULONG * pcOtherResources );
  60. static APIERR GetSessionsCount( const TCHAR * pszServerName,
  61. ULONG * pcSessions );
  62. #if 0 // not supported in NT product 1
  63. static APIERR GetOpenCommCount( const TCHAR * pszServerName,
  64. ULONG * pcOpenCommPorts );
  65. static APIERR GetPrintJobCount( const TCHAR * pszServerName,
  66. ULONG * pcPrintJobs );
  67. #endif // 0
  68. //
  69. // This method will destroy a particular user's session to
  70. // the target server.
  71. //
  72. static APIERR NukeUsersSession( const TCHAR * pszServerName,
  73. const TCHAR * pszComputerName,
  74. const TCHAR * pszUserName = NULL );
  75. }; // class LM_SRVRES
  76. #endif // _LMSRVRES_HXX