windows-nt/Source/XPSP1/NT/ds/security/ntmarta/newsrc/lmsctx.h
2020-09-26 16:20:57 +08:00

89 lines
1.6 KiB
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//+---------------------------------------------------------------------------
//
// Microsoft Windows NT Security
// Copyright (C) Microsoft Corporation, 1997 - 1998
//
// File: lmsctx.h
//
// Contents: NT Marta LanMan share context class
//
// History: 4-1-1999 kirtd Created
//
//----------------------------------------------------------------------------
#if !defined(__LMSCTX_H__)
#define __LMSCTX_H__
#include <windows.h>
#include <lmsh.h>
#include <assert.h>
//
// CLMShareContext. This represents a LanMan share object to the NT Marta
// infrastructure
//
class CLMShareContext
{
public:
//
// Construction
//
CLMShareContext ();
~CLMShareContext ();
DWORD InitializeByName (LPCWSTR pObjectName, ACCESS_MASK AccessMask);
//
// Dispatch methods
//
DWORD AddRef ();
DWORD Release ();
DWORD GetLMShareProperties (
PMARTA_OBJECT_PROPERTIES pProperties
);
DWORD GetLMShareRights (
SECURITY_INFORMATION SecurityInfo,
PSECURITY_DESCRIPTOR* ppSecurityDescriptor
);
DWORD SetLMShareRights (
SECURITY_INFORMATION SecurityInfo,
PSECURITY_DESCRIPTOR pSecurityDescriptor
);
private:
//
// Reference count
//
DWORD m_cRefs;
//
// Parsed machine and share
//
LPWSTR m_pwszMachine;
LPWSTR m_pwszShare;
};
//
// Private functions
//
DWORD
LMShareContextParseLMShareName (
LPCWSTR pwszName,
LPWSTR* ppMachine,
LPWSTR* ppLMShare
);
#endif