IBidiRequest::GetOutputData method (bidispl.h)

The GetOutputData method gets the specified output data coming back from the printer.

Syntax

HRESULT GetOutputData(
  [in]  const DWORD dwIndex,
  [out] LPWSTR      *ppszSchema,
  [out] DWORD       *pdwType,
  [out] BYTE        **ppData,
  [out] ULONG       *uSize
);

Parameters

[in] dwIndex

A zero-based index of the output data that is requested. For more information, see Remarks.

[out] ppszSchema

A pointer to a NULL-terminated string that receives the schema string. The caller must call the CoTaskMemFree function to free this pointer.

[out] pdwType

A pointer to a variable that receives the type of the output data. This parameter can be one of the following values.

Value Description
BIDI_NULL No data.
BIDI_INT Integer data.
BIDI_FLOAT Floating-point number.
BIDI_BOOL TRUE or FALSE
BIDI_STRING Unicode character string.
BIDI_TEXT Non-localizable Unicode string.
BIDI_ENUM Enumeration data in the form of a Unicode string.
BIDI_BLOB Binary data.

[out] ppData

A pointer to the variable that receives a pointer to the byte array containing the output data. The buffer is allocated by the COM interface to store the output data. The caller is responsible for calling CoTaskMemFree to free the buffer.

[out] uSize

A pointer to a variable that receives the size of the byte array specified by **ppData.

Return value

The method returns one of the following values. For more information about COM error codes, see COM Error Codes.

Return code Description
S_OK The operation was successfully carried out.
E_HANDLE The interface handle was invalid.
E_POINTER At least one of the pointer variable parameters did not reference a valid memory location.
None of the above The HRESULT contains an error code corresponding to the last error.

Remarks

A single bidi request can have multiple results. The application calls GetEnumCount to get the number of results from the bidi request.

If an application calls GetOutputData with the same index twice, the interface allocates two different buffers and thus the application must free both buffers.

Requirements

Requirement Value
Minimum supported client Windows XP
Minimum supported server Windows Server 2003
Target Platform Desktop
Header bidispl.h
DLL Bidispl.dll

See also

Bidirectional Communication Interfaces

Bidirectional Communication Schema

GetEnumCount

IBidiRequest