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.
 
 
 
 
 
 

62 lines
969 B

/////////////////////////////////////////////////////////////////////////////
//
// CAdapterInfo
//
// AdapterInfo.cpp : Implementation of CAdapterInfo
//
#include "PreComp.h"
#include "AdapterInfo.h"
//
//
//
STDMETHODIMP
CAdapterInfo::GetAdapterIndex(
ULONG* pulAdapterIndex
)
{
*pulAdapterIndex = m_nAdapterIndex;
return S_OK;
}
//
//
//
STDMETHODIMP
CAdapterInfo::GetAdapterType(
ALG_ADAPTER_TYPE* pAdapterType
)
{
*pAdapterType = (ALG_ADAPTER_TYPE )m_eType;
return S_OK;
}
//
//
//
STDMETHODIMP
CAdapterInfo::GetAdapterAddresses(
ULONG* pulAddressCount,
ULONG** prgAddresses
)
{
*pulAddressCount = m_nAddressCount;
*prgAddresses = (ULONG*)CoTaskMemAlloc(m_nAddressCount*sizeof(ULONG));
if ( *prgAddresses == NULL )
return ERROR_OUTOFMEMORY;
memcpy(*prgAddresses, m_anAddress, m_nAddressCount*sizeof(ULONG));
return S_OK;
}