Back

// PSLCore.cpp : Implementation of CPSLCore

#include "stdafx.h"
#include "PSLCore.h"

CPSLCore::CPSLCore()
{
   m_sRegPath = _T("");
}

HRESULT CPSLCore::FinalConstruct()
{
   return S_OK;
}

void CPSLCore::FinalRelease()
{
}

void CPSLCore::Initialize(LPCTSTR sRegPath)
{
   m_sRegPath = sRegPath;
}

////////////////////////////////////////////////////////////////////////
// Interface Implementation;
////////////////////////////////////////////////////////////////////////

STDMETHODIMP CPSLCore::get_Frequency(long * pValue)
{
   PSL_BEGIN

   *pValue = 0;
   CRegKey key;
   if(key.Open(HKEY_LOCAL_MACHINE, m_sRegPath, KEY_READ) == ERROR_SUCCESS)
   {
      DWORD dwValue = 0;
      if(key.QueryDWORDValue(_T("~MHz"), dwValue) == ERROR_SUCCESS)
         *pValue = dwValue;
      key.Close();
   }

   PSL_END
}

Top