ReactOS 0.4.17-dev-683-g0dafdc5
querysrc.cpp File Reference
#include "precomp.h"
#include <shlwapi.h>
#include <shlwapi_undoc.h>
#include <shlobj_undoc.h>
#include <shlguid_undoc.h>
#include <new>
#include "evalcmd.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)
 
EXTERN_C BOOL WINAPI GUIDFromStringW (LPCWSTR idstr, CLSID *id)
 
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

◆ GUIDFromStringW()

EXTERN_C BOOL WINAPI GUIDFromStringW ( LPCWSTR  idstr,
CLSID id 
)

Definition at line 2542 of file ordinal.c.

2543{
2544 return SUCCEEDED(CLSIDFromString((LPCOLESTR)idstr, id));
2545}
HRESULT WINAPI CLSIDFromString(LPCOLESTR str, LPCLSID clsid)
Definition: combase.c:1470
#define SUCCEEDED(hr)
Definition: intsafe.h:50

Referenced by CRegistrySource::QueryValueGuid().

◆ 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 577 of file querysrc.cpp.

583{
584 *ppv = NULL;
585
586 CRegistrySource* pRS = new(std::nothrow) CRegistrySource();
587 if (!pRS)
588 return E_OUTOFMEMORY;
589
590 HRESULT hr = pRS->Init(hKey, lpSubKey, bCreate);
591 if (SUCCEEDED(hr))
592 hr = pRS->QueryInterface(riid, ppv);
593
594 pRS->Release();
595 return hr;
596}
HRESULT Init(HKEY hKey, PCWSTR pszSubKey, BOOL bCreate)
Definition: querysrc.cpp:286
STDMETHODIMP QueryInterface(REFIID riid, void **ppvObject) override
Definition: querysrc.cpp:297
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
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
_In_ int _In_ BOOL bCreate
Definition: shlobj.h:1536

Referenced by CAssocApplicationElement::_InitSource(), CAssocFolderElement::_InitSource(), CAssocStarElement::_InitSource(), _QuerySourceCreateFromKey(), AssocCreateElementOnKeyInternal(), CRegistrySource::OpenSource(), and Test_ShellElement_ExplicitSource().

◆ SHAllocBlob()

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

Definition at line 20 of file querysrc.cpp.

21{
22 FLAGGED_BYTE_BLOB* pBlob =
23 (FLAGGED_BYTE_BLOB*)CoTaskMemAlloc(sizeof(FLAGGED_BYTE_BLOB) + cbData);
24 if (!pBlob)
25 return E_OUTOFMEMORY;
26
27 pBlob->clSize = cbData;
28 if (pbData)
29 CopyMemory(pBlob->abData, pbData, cbData);
30
31 *ppBlob = pBlob;
32 return S_OK;
33}
void *WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: malloc.c:381
#define S_OK
Definition: intsafe.h:52
#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 196 of file querysrc.cpp.

197{
198 return ::InterlockedIncrement(&m_cRefs);
199}

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( shell  )