REGKEYEX.CPP

/*------------------------------------------------*\ 
*
*Copyright (c) 1997 Microsoft Corporation
*
*Module Name:
*
*regkeyex.cpp
*
*Abstract:
*
*Implementation of CRegKeyEx class
*
\*------------------------------------------------*/


#include "regkeyex.h"


LONG CRegKeyEx::QueryValue(LPTSTR tsBuffer,
DWORD *pdwBufLen,
LPCTSTR tsValueName)
{
DWORDdwType = NULL;
LONGlRes;

lRes = RegQueryValueEx(m_hKey,
(LPTSTR) tsValueName,
NULL,
&dwType,
(LPBYTE) tsBuffer,
pdwBufLen);

if (ERROR_SUCCESS == lRes)
{
if (REG_SZ != dwType)
lRes = E_FAIL;
}

return(lRes);
}