Bewerken

Delen via


DrvQueryColorProfile function (winddiui.h)

The DrvQueryColorProfile function allows a printer interface DLL to specify an ICC profile to use for color management.

Syntax

BOOL DrvQueryColorProfile(
        HANDLE    hPrinter,
  [in]  PDEVMODEW pdevmode,
        ULONG     ulQueryMode,
  [out] VOID      *pvProfileData,
  [out] ULONG     *pcbProfileData,
  [out] FLONG     *pflProfileData
);

Parameters

hPrinter

Caller-supplied printer handle.

[in] pdevmode

Caller-supplied pointer to a DEVMODEW structure.

ulQueryMode

One of the following caller-supplied bit flags, indicating the type of profile to be specified.

Flag Definition
QCP_DEVICEPROFILE The caller is requesting a device profile.
QCP_SOURCEPROFILE The caller is requesting a source profile.

[out] pvProfileData

Caller-supplied pointer to a buffer to receive profile information.

[out] pcbProfileData

Caller-supplied pointer to a value representing the size, in bytes, of the buffer pointed to by pvProfileData.

[out] pflProfileData

One of the following function-supplied bit flags, indicating the type of information the function is returning.

Flag Definition
QCP_PROFILEDISK The function is returning the file name of an ICC profile in the buffer pointed to by pvProfileData.
QCP_PROFILEMEMORY The function is returning profile data in the buffer pointed to by pvProfileData.

Return value

If the operation succeeds, the function returns TRUE; otherwise, it returns FALSE.

Remarks

A printer interface DLL can optionally provide a DrvQueryColorProfile function. If the function is provided, GDI calls it if ICM has been enabled for a print job. The function's purpose is to determine and specify an ICC profile that is appropriate for use with the print job.

If a driver's printer interface DLL does not provide a DrvQueryColorProfile function, or if the function returns FALSE, GDI attempts to find a profile. For more information, see Locating ICC Profiles.

If the output buffer size specified by pcbProfileData is too small, the driver should overwrite the size value supplied by pcbProfileData with the required buffer size, call SetLastError(ERROR_INSUFFICIENT_BUFFER), and return FALSE.

Requirements

Requirement Value
Target Platform Desktop
Header winddiui.h (include Winddiui.h)