DrvQueryColorProfile

DrvQueryColorProfile function

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.

pdevmode [in]

Caller-supplied pointer to a DEVMODEW structure.

ulQueryMode

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

FlagDefinition

QCP_DEVICEPROFILE

The caller is requesting a device profile.

QCP_SOURCEPROFILE

The caller is requesting a source profile.

 

pvProfileData [out]

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

pcbProfileData [out]

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

pflProfileData [out]

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

FlagDefinition

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

Target platform

Header

Winddiui.h (include Winddiui.h)

 

 

Send comments about this topic to Microsoft

Show:
© 2016 Microsoft