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.
 
 
 
 
 
 

125 lines
2.1 KiB

#pragma once
#include <set>
//---------------------------------------------------------------------------
// Domain Account Class
//---------------------------------------------------------------------------
class CDomainAccount
{
public:
CDomainAccount() :
m_lUserAccountControl(0)
{
}
CDomainAccount(const CDomainAccount& r) :
m_strADsPath(r.m_strADsPath),
m_strName(r.m_strName),
m_strUserPrincipalName(r.m_strUserPrincipalName),
m_strSamAccountName(r.m_strSamAccountName),
m_strDnsHostName(r.m_strDnsHostName),
m_lUserAccountControl(r.m_lUserAccountControl)
{
}
~CDomainAccount()
{
}
//
_bstr_t GetADsPath() const
{
return m_strADsPath;
}
void SetADsPath(_bstr_t strPath)
{
m_strADsPath = strPath;
}
_bstr_t GetName() const
{
return m_strName;
}
void SetName(_bstr_t strName)
{
m_strName = strName;
}
_bstr_t GetUserPrincipalName() const
{
return m_strUserPrincipalName;
}
void SetUserPrincipalName(_bstr_t strName)
{
m_strUserPrincipalName = strName;
}
_bstr_t GetSamAccountName() const
{
return m_strSamAccountName;
}
void SetSamAccountName(_bstr_t strName)
{
m_strSamAccountName = strName;
}
_bstr_t GetDnsHostName() const
{
return m_strDnsHostName;
}
void SetDnsHostName(_bstr_t strName)
{
m_strDnsHostName = strName;
}
long GetUserAccountControl() const
{
return m_lUserAccountControl;
}
void SetUserAccountControl(long lUserAccountControl)
{
m_lUserAccountControl = lUserAccountControl;
}
//
bool operator <(const CDomainAccount& r) const
{
return (m_strADsPath < r.m_strADsPath);
}
protected:
_bstr_t m_strADsPath;
_bstr_t m_strName;
_bstr_t m_strUserPrincipalName;
_bstr_t m_strSamAccountName;
_bstr_t m_strDnsHostName;
long m_lUserAccountControl;
};
//---------------------------------------------------------------------------
// Domain Accounts Class
//---------------------------------------------------------------------------
class CDomainAccounts :
public std::set<CDomainAccount>
{
public:
CDomainAccounts() {}
};