ReactOS 0.4.17-dev-243-g1369312
querysrc.cpp File Reference
#include "precomp.h"
#include <shlwapi.h>
#include <shlwapi_undoc.h>
#include <shlobj_undoc.h>
#include <shlguid_undoc.h>
Include dependency graph for querysrc.cpp:

Go to the source code of this file.

Classes

class  CRegistryEnumBase
 
class  CRegistryEnumValues
 
class  CRegistryEnumKeys
 
class  CRegistrySource
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (shell)
 
static HRESULT SHAllocBlob (ULONG cbData, const BYTE *pbData, FLAGGED_BYTE_BLOB **ppBlob)
 
 STDMETHODIMP_ (ULONG) CRegistryEnumBase
 
EXTERN_C HRESULT WINAPI QuerySourceCreateFromKey (_In_ HKEY hKey, _In_opt_ PCWSTR lpSubKey, _In_ BOOL bCreate, _In_ REFIID riid, _Outptr_ PVOID *ppv)
 

Function Documentation

◆ QuerySourceCreateFromKey()

EXTERN_C HRESULT WINAPI QuerySourceCreateFromKey ( _In_ HKEY  hKey,
_In_opt_ PCWSTR  lpSubKey,
_In_ BOOL  bCreate,
_In_ REFIID  riid,
_Outptr_ PVOID ppv 
)

Definition at line 494 of file querysrc.cpp.

500{
501 *ppv = NULL;
502
503 CRegistrySource* pRS = new CRegistrySource();
504
505 HRESULT hr = pRS->Init(hKey, lpSubKey, bCreate);
506 if (SUCCEEDED(hr))
507 hr = pRS->QueryInterface(riid, ppv);
508
509 pRS->Release();
510 return hr;
511}
HRESULT Init(HKEY hKey, PCWSTR pszSubKey, BOOL bCreate)
Definition: querysrc.cpp:259
STDMETHODIMP QueryInterface(REFIID riid, void **ppvObject) override
Definition: querysrc.cpp:270
HRESULT hr
Definition: delayimp.cpp:582
#define NULL
Definition: types.h:112
FxAutoRegKey hKey
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define SUCCEEDED(hr)
Definition: intsafe.h:50
_In_ int _In_ BOOL bCreate
Definition: shlobj.h:1527

Referenced by CRegistrySource::OpenSource().

◆ SHAllocBlob()

static HRESULT SHAllocBlob ( ULONG  cbData,
const BYTE pbData,
FLAGGED_BYTE_BLOB **  ppBlob 
)
static

Definition at line 16 of file querysrc.cpp.

17{
18 FLAGGED_BYTE_BLOB* pBlob =
19 (FLAGGED_BYTE_BLOB*)CoTaskMemAlloc(sizeof(FLAGGED_BYTE_BLOB) + cbData);
20 if (!pBlob)
21 return E_OUTOFMEMORY;
22
23 pBlob->clSize = cbData;
24 if (pbData)
25 CopyMemory(pBlob->abData, pbData, cbData);
26
27 *ppBlob = pBlob;
28 return S_OK;
29}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define S_OK
Definition: intsafe.h:52
void *WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: malloc.c:381
#define CopyMemory
Definition: minwinbase.h:29
_In_opt_ _In_opt_ _In_ _In_ DWORD cbData
Definition: shlwapi.h:761

Referenced by CRegistrySource::QueryValueDirect().

◆ STDMETHODIMP_()

STDMETHODIMP_ ( ULONG  )

Definition at line 169 of file querysrc.cpp.

170{
171 return ::InterlockedIncrement(&m_cRefs);
172}

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( shell  )