wiasGetContextFromName function (wiamdef.h)

The wiasGetContextFromName function retrieves the item context for an item name.

Syntax

HRESULT wiasGetContextFromName(
  [in]  BYTE *pWiasContext,
        LONG lFlags,
  [in]  BSTR bstrName,
  [out] BYTE **ppWiasContext
);

Parameters

[in] pWiasContext

Pointer to a WIA item context.

lFlags

Reserved for system use and should be set to 0.

[in] bstrName

Specifies the name of the context that is being searched for.

[out] ppWiasContext

Pointer to a memory location that receives the address of the WIA item context.

Return value

On success, the function returns S_OK.

If the function fails, it returns a standard COM error or one of the WIA error codes.

Remarks

This function searches for item contexts whose WIA_IPA_FULL_ITEM_NAME property matches bstrName. Note that this property is different from WIA_IPA_ITEM_NAME, which does not contain path information.

This function should be used by minidrivers when they need to move from one application item context to another, given the item's name. The names of the application items come from their corresponding driver items, which the minidriver creates and names.

Requirements

Requirement Value
Target Platform Desktop
Header wiamdef.h (include Wiamdef.h)
Library Wiaservc.lib
DLL Wiaservc.dll

See also

wiasGetRootItem