IQueryAssociations::GetData method
Searches for and retrieves file or protocol association-related binary data from the registry.
Syntax
HRESULT GetData( [in] ASSOCF flags, [in] ASSOCDATA data, [in, optional] LPCWSTR pwszExtra, [out, optional] void *pvOut, [in, out, optional] DWORD *pcbOut );
Parameters
- flags [in]
-
Type: ASSOCF
The ASSOCF value that can be used to control the search.
- data [in]
-
Type: ASSOCDATA
The ASSOCDATA value that specifies the type of data that is to be returned.
- pwszExtra [in, optional]
-
Type: LPCWSTR
A pointer to an optional, null-terminated Unicode string with information about the location of the data. It is normally set to a Shell verb such as open. Set this parameter to NULL if it is not used.
- pvOut [out, optional]
-
Type: void*
A pointer to a value that, when this method returns successfully, receives the requested data value.
- pcbOut [in, out, optional]
-
Type: DWORD*
A pointer to a value that, when this method is called, holds the size of pvOut, in bytes. When this method returns successfully, the value contains the size of the data actually retrieved.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Examples
The following example demonstrates the use of IQueryAssociations::GetData to determine whether the FTA_NoRemove or FTA_NoNewVerb flags are set.
IQueryAssociations *passoc; HRESULT hr = AssocCreate(CLSID_QueryAssociations, IID_PPV_ARGS(&passoc)); if (SUCCEEDED(hr)) { hr = passoc->Init(NULL, pszType, NULL, NULL); if (SUCCEEDED(hr)) { DWORD dwEditFlags; ULONG cb = sizeof(dwEditFlags); hr = passoc->GetData(NULL, ASSOCDATA_EDITFLAGS, NULL, &dwEditFlags, &cb); if (SUCCEEDED(hr)) { if (dwEditFlags & FTA_NoRemove) { // ... } if (dwEditFlags & FTA_NoNewVerb) { // ... } } } passoc->Release(); }
Requirements
|
Minimum supported client |
Windows 2000 Professional, Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also