wiasReadPropBin function (wiamdef.h)

The wiasReadPropBin function retrieves a binary-data property value from a WIA item.

Syntax

HRESULT wiasReadPropBin(
  [in]            BYTE   *pWiasContext,
                  PROPID propid,
  [out]           BYTE   **ppbVal,
  [out, optional] BYTE   **ppbValOld,
                  BOOL   bMustExist
);

Parameters

[in] pWiasContext

Pointer to a WIA item context.

propid

Specifies the property identifier.

[out] ppbVal

Pointer to a memory location that receives the address of a buffer allocated by this function. Upon return, the buffer contains the property's binary data.

[out, optional] ppbValOld

Pointer to a memory location that receives the address of a buffer allocated by the minidriver. Upon return, the buffer contains the previous value of the property's binary data. If this information is not needed, this parameter can be set to NULL.

bMustExist

Indicates whether the property must exist. If set to TRUE, the property must exist; if set to FALSE, the property does not have to exist.

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 allocates a buffer and stores its address in the ppbVal parameter. The minidriver must free the buffer by calling CoTaskMemFree.

Requirements

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

See also

wiasReadPropFloat

wiasReadPropGuid

wiasReadPropLong

wiasReadPropStr

wiasWritePropBin