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.

84 lines
2.8 KiB

  1. /******************************************************************
  2. ConnShare.h-- Definition of base class from which ConnectionToShare
  3. ConnectionToSession and Connection classes are derived
  4. // Copyright (c) 2000-2001 Microsoft Corporation, All Rights Reserved
  5. *******************************************************************/
  6. #ifndef _CCONNSHARE_
  7. #define _CCONNSHARE_
  8. #ifdef UNICODE
  9. #define TOBSTRT(x) x
  10. #else
  11. #define TOBSTRT(x) _bstr_t(x)
  12. #endif
  13. #if 0
  14. #ifdef WIN9XONLY
  15. #include "svrapi.h"
  16. // max entries of the structure that can be read at a time. #define MAX_ENTRIES 50
  17. #define MAX_ENTRIES 50
  18. // Typedefinition of the structures
  19. typedef struct connection_info_1 CONNECTION_INFO;
  20. typedef struct session_info_1 SESSION_INFO_1;
  21. typedef struct session_info_2 SESSION_INFO_2;
  22. typedef struct session_info_10 SESSION_INFO_10;
  23. typedef struct session_info_50 SESSION_INFO_50;
  24. #endif
  25. #endif // #if 0
  26. #ifdef NTONLY
  27. #include <lm.h>
  28. #include <LMShare.h>
  29. // COnnection INfo Structure Type defininition
  30. typedef CONNECTION_INFO_1 CONNECTION_INFO;
  31. #endif
  32. class CConnShare
  33. {
  34. public:
  35. CConnShare ( ) ;
  36. virtual ~CConnShare () ;
  37. #ifdef NTONLY
  38. HRESULT FindAndSetNTConnection ( LPWSTR t_ShareName, LPCWSTR t_NetName, LPCWSTR t_UserName,
  39. DWORD dwPropertiesReq, CInstance *pInstance, DWORD eOperation );
  40. HRESULT GetNTShares ( CHStringArray &t_Shares );
  41. virtual HRESULT EnumNTConnectionsFromComputerToShare ( LPWSTR a_ComputerName, LPWSTR a_ShareName,
  42. MethodContext *pMethodContext, DWORD dwPropertiesReq ) = 0;
  43. #endif
  44. #if 0
  45. #ifdef WIN9XONLY
  46. HRESULT FindAndSet9XConnection ( LPWSTR t_ShareName, LPCWSTR t_NetName, LPCWSTR t_UserName,
  47. DWORD dwPropertiesReq, CInstance *pInstance, DWORD eOperation );
  48. virtual HRESULT Enum9XConnectionsFromComputerToShare ( LPWSTR a_ComputerName, LPWSTR a_ShareName,
  49. MethodContext *pMethodContext, DWORD dwPropertiesReq ) = 0;
  50. HRESULT Get9XShares ( CHStringArray &t_Shares );
  51. #endif
  52. #endif // #if 0
  53. // These are common methods irrespective of OS
  54. virtual HRESULT LoadInstance ( CInstance *pInstance, LPCWSTR a_Share, LPCWSTR a_Computer, CONNECTION_INFO *pBuf,
  55. DWORD dwPropertiesReq ) = 0;
  56. HRESULT EnumConnectionInfo ( LPWSTR a_ComputerName, LPWSTR a_ShareName, MethodContext *pMethodContext,
  57. DWORD dwPropertiesReq );
  58. HRESULT GetConnectionsKeyVal ( LPCWSTR a_Key, CHString &a_ComputerName, CHString &a_ShareName, CHString &a_UserName );
  59. HRESULT AddToObjectPath ( LPWSTR &a_ObjPathString, LPCWSTR a_AttributeName, LPCWSTR a_AttributeVal );
  60. HRESULT MakeObjectPath ( LPWSTR &a_ObjPathString, LPCWSTR a_ClassName, LPCWSTR a_AttributeName, LPCWSTR a_AttributeVal );
  61. private:
  62. };
  63. #endif