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
1.9 KiB

//
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1996-2001
//
// Author: AdamEd
// Date: January 2000
//
// Abstractions for directory service layer
//
//
//---------------------------------------------------------------------
#if !defined(_DSAPI_HXX_)
#define _DSAPI_HXX_
//*************************************************************
//
// class CServerContext
//
// Purpose: Stores server name and credentials for
// accessing the server
//
//
// Notes: This class should only be used in short-lived
// administrative command line tools since it
// stores credentials -- a different solution
// should be used if alternative credentials
// are to be used in a service or a tool that
// involves some amount of user input
//
//*************************************************************
class CServerContext
{
public:
CServerContext();
~CServerContext();
HRESULT
Initialize(
WCHAR* wszServerName );
HRESULT
Initialize(
CServerContext* pServerContext );
BOOL
Compare( CServerContext* pServerContext );
WCHAR*
GetServerName();
private:
WCHAR* _wszServerName;
};
HRESULT
DSGetAndValidateColumn(
HANDLE hDSObject,
ADS_SEARCH_HANDLE hSearchHandle,
ADSTYPE ADsType,
LPWSTR pszColumnName,
PADS_SEARCH_COLUMN pColumn
);
HRESULT DSAccessCheck(
PSECURITY_DESCRIPTOR pSD,
PRSOPTOKEN pRsopUserToken,
BOOL* pbAccessAllowed
);
HRESULT
DSServerOpenDSObject(
CServerContext* pServerContext,
LPWSTR pszDNName,
LONG lFlags,
PHANDLE phDSObject
);
#endif // _DSAPI_HXX_