IBidiRequest::GetOutputData method

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

Syntax

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

Parameters

dwIndex

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

ppszSchema

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

pdwType

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

Value Meaning
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.

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.

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 Error Handling.

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

   
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