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.

66 lines
1.8 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows NT **/
  3. /** Copyright(c) Microsoft Corp., 1992 **/
  4. /**********************************************************************/
  5. /*
  6. * This module contains the class, API_SESSION, which creates a
  7. * session from one NT machine to another using either the user's
  8. * current credentials, or, if that fails, the NULL session.
  9. *
  10. * History
  11. * thomaspa 08/04/92 Created
  12. */
  13. #ifndef _APISESS_HXX_
  14. #define _APISESS_HXX_
  15. #include "base.hxx"
  16. /**********************************************************\
  17. NAME: API_SESSION (apisess)
  18. SYNOPSIS:
  19. Creates a session from one NT machine to another using
  20. either the user's current credentials, or, if that fails,
  21. the NULL session. This is done by setting up a NetUse
  22. to IPC$
  23. INTERFACE: (public)
  24. API_SESSION(): constructor
  25. ~API_SESSION(): destructor
  26. PARENT: BASE
  27. NOTES:
  28. If a session already exists to the given server, then the
  29. credentials used to set up that session will remain in
  30. effect. This is because the NetUse that is set here
  31. will piggyback on the existing session.
  32. if fNullSessionOK is TRUE (guest privilege OK), then only
  33. the NULL session will be connected.
  34. HISTORY:
  35. thomaspa 07/04/92 Created
  36. Johnl 03/12/92 Added fNullSessionOK
  37. \**********************************************************/
  38. DLL_CLASS API_SESSION : public BASE
  39. {
  40. private:
  41. NLS_STR * _pnlsRemote; // UNC path representing the connection
  42. public:
  43. API_SESSION( const TCHAR * pszServer, BOOL fNullSessionOK = FALSE );
  44. ~API_SESSION();
  45. };
  46. #endif // _APISESS_HXX_