136 lines
2.1 KiB
C++
136 lines
2.1 KiB
C++
#define MAX_ENTRIES 20
|
|
|
|
typedef struct _propentry{
|
|
DWORD dwSyntaxId;
|
|
LPWSTR pszPropName;
|
|
struct _propentry *pNext;
|
|
} PROPENTRY, *PPROPENTRY;
|
|
|
|
PPROPENTRY
|
|
CopyPropList(
|
|
PPROPENTRY pPropList
|
|
);
|
|
|
|
HRESULT
|
|
FindProperty(
|
|
PPROPENTRY pPropList,
|
|
LPWSTR pszPropName,
|
|
PDWORD pdwSyntaxId
|
|
);
|
|
|
|
|
|
PPROPENTRY
|
|
CreatePropertyEntry(
|
|
LPWSTR pszPropertyName,
|
|
DWORD dwSyntaxId
|
|
);
|
|
|
|
void
|
|
FreePropertyEntry(
|
|
PPROPENTRY pPropName
|
|
);
|
|
|
|
void
|
|
FreePropertyList(
|
|
PPROPENTRY pPropList
|
|
);
|
|
|
|
PPROPENTRY
|
|
GeneratePropertyList(
|
|
LPWSTR_LIST lpMandatoryProps,
|
|
LPWSTR_LIST lpOptionalProps
|
|
);
|
|
|
|
|
|
PPROPENTRY
|
|
GenerateAttrIdList(
|
|
NDS_CONTEXT_HANDLE hADsContext,
|
|
LPWSTR_LIST lpMandatoryProps,
|
|
LPWSTR_LIST lpOptionalProps
|
|
);
|
|
|
|
typedef struct _classentry{
|
|
BOOL bInUse;
|
|
SYSTEMTIME st;
|
|
WCHAR szTreeName[MAX_PATH];
|
|
WCHAR szClassName[MAX_PATH];
|
|
PPROPENTRY pPropList;
|
|
}CLASSENTRY, *PCLASSENTRY;
|
|
|
|
class CClassCache {
|
|
|
|
public:
|
|
|
|
HRESULT
|
|
CClassCache::
|
|
addentry(
|
|
LPWSTR pszTreeName,
|
|
LPWSTR pszClassName,
|
|
PPROPENTRY pPropList
|
|
);
|
|
|
|
HRESULT
|
|
CClassCache::
|
|
findentry(
|
|
LPWSTR pszTreeName,
|
|
LPWSTR pszClassName,
|
|
PDWORD pdwIndex
|
|
);
|
|
|
|
HRESULT
|
|
CClassCache::
|
|
getentry(
|
|
LPWSTR pszTreeName,
|
|
LPWSTR pszClassName,
|
|
PPROPENTRY * ppPropList
|
|
);
|
|
|
|
CClassCache::
|
|
CClassCache();
|
|
|
|
CClassCache::
|
|
~CClassCache();
|
|
|
|
static
|
|
HRESULT
|
|
CClassCache::
|
|
CreateClassCache(
|
|
CClassCache FAR * FAR * ppClassCache
|
|
);
|
|
|
|
DWORD
|
|
CClassCache::
|
|
IsOlderThan(
|
|
DWORD i,
|
|
DWORD j
|
|
);
|
|
|
|
|
|
protected:
|
|
|
|
DWORD _dwMaxCacheSize;
|
|
|
|
CLASSENTRY _ClassEntries[MAX_ENTRIES];
|
|
|
|
CRITICAL_SECTION _cs;
|
|
|
|
};
|
|
|
|
HRESULT
|
|
ValidatePropertyinCache(
|
|
LPWSTR pszTreeName,
|
|
LPWSTR pszClassName,
|
|
LPWSTR pszPropName,
|
|
CCredentials& Credentials,
|
|
PDWORD pdwSyntaxId
|
|
);
|
|
|
|
|
|
HRESULT
|
|
NdsGetClassInformation(
|
|
LPWSTR pszTreeName,
|
|
LPWSTR pszClassName,
|
|
CCredentials& Credentials,
|
|
PPROPENTRY * ppPropList
|
|
);
|