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.
 
 
 
 
 
 

204 lines
3.2 KiB

//+---------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1992 - 1994.
//
// File: shrinfo.hxx
//
// Contents: Lanman SHARE_INFO encapsulation
//
// History: 21-Feb-95 BruceFo Created
//
//----------------------------------------------------------------------------
#ifndef __SHRINFO_HXX__
#define __SHRINFO_HXX__
//
// Valid flags:
//
#define SHARE_FLAG_ADDED 1
#define SHARE_FLAG_REMOVE 2
#define SHARE_FLAG_MODIFY 3
#include "dlink.hxx"
class CShareInfo : public CDoubleLink
{
DECLARE_SIG;
friend class CSharingPropertyPage; // for m_next
public:
CShareInfo(); // create new info
CShareInfo(IN SHARE_INFO_502* pInfo); // cache existing info
HRESULT
InitInstance(
VOID
);
~CShareInfo();
NET_API_STATUS
Commit(
IN PWSTR pszMachine
);
//
// "Get" methods
//
SHARE_INFO_502*
GetShareInfo(
VOID
);
PWSTR
GetNetname(
VOID
);
DWORD
GetType(
VOID
);
PWSTR
GetRemark(
VOID
);
DWORD
GetMaxUses(
VOID
);
PWSTR
GetPath(
VOID
);
PSECURITY_DESCRIPTOR
GetSecurityDescriptor(
VOID
);
//
// "Set" methods
//
HRESULT
SetNetname(
IN PWSTR pszNetname
);
HRESULT
SetType(
IN DWORD dwType
);
HRESULT
SetRemark(
IN PWSTR pszRemark
);
HRESULT
SetMaxUses(
IN DWORD dwMaxUses
);
HRESULT
SetPath(
IN PWSTR pszPath
);
// Set... makes a copy of the argument
HRESULT
SetSecurityDescriptor(
IN PSECURITY_DESCRIPTOR pSecDesc
);
// Transfer... takes ownership of "new BYTE[]" memory
HRESULT
TransferSecurityDescriptor(
IN PSECURITY_DESCRIPTOR pSecDesc
);
//
// Other Get/Set methods -- not SHARE_INFO_502 data
//
ULONG
GetFlag(
VOID
);
VOID
SetDirtyFlag(
ULONG flag
);
HRESULT
Copy(
IN SHARE_INFO_502* pInfo
);
#if DBG == 1
VOID
Dump(
IN PWSTR pszCaption
);
#endif // DBG == 1
BOOL
TakeOwn(
VOID
);
void
SetCacheFlags (
DWORD dwFlags
);
DWORD
GetCacheFlags (
VOID
) const;
NET_API_STATUS
ReadCacheFlags(
VOID
);
private:
bool m_bCachingSupported;
NET_API_STATUS
WriteCacheFlags(
VOID
);
//
// Main object data
//
BOOL m_bOwn;
ULONG m_flags;
SHARE_INFO_502* m_pInfo;
DWORD m_dwCacheFlags;
};
//
// Helper API
//
VOID
DeleteShareInfoList(
IN CShareInfo* pShareInfoList,
IN BOOL fDeleteDummyHeadNode = FALSE
);
#endif // __SHRINFO_HXX__