Creates an object that can query registry values
Syntax
HRESULT WINAPI QuerySourceCreateFromKey (
HKEY hKey,
LPCWSTR pwszSubKey,
BOOL shouldCreate,
REFIID riid,
LPVOID* ppInterface
)
Parameters
- hKey
- A handle to an open registry key or a predefined key
- pwszSubKey
- The name of a subkey to open or create
- shouldCreate
- TRUE if the function creates the registry key (uses RegCreateKeyEx) or open it (uses RegOpenKeyEx)
- riid
- The id of the interface pointer to return
- ppInterface
- A pointer to a pointer that receives the returned interface
Return Value
S_OK on success, standard COM error code otherwise
Remarks
Forwards to QuerySourceCreateFromKeyEx as:
HRESULT WInAPI QuerySourceCreateFromKey(HKEY hKey, LPCWSTR pwszSubKey, BOOL shouldCreate, REFIID riid, LPVOID* ppInterface) { return QuerySourceCreateFromKeyEx(hKey, pwszSubKey, shouldCreate, 0, riid, ppInterface); }This function is also known as _QuerySourceCreateFromKey@20.