GetColorDirectoryW function (icm.h)

Note

This API may be unavailable in future releases. We encourage new and existing software to use other APIs for color profile interactions. Please refer to the below table for some examples.

Scenario Mechanism
Enumerating all installed profiles Use WcsEnumColorProfilesSize and WcsEnumColorProfiles, or EnumColorProfilesW
Installing/Uninstalling color profiles Use InstallColorProfileW/UninstallColorProfileW
Opening a color profile file directly Use OpenColorProfileW with dwType=PROFILE_FILENAME in the PROFILE struct parameter.
Or use WcsOpenColorProfileW. Icm.h contains many APIs that accept the returned HPROFILE for color profile manipulation

Retrieves the path of the Windows COLOR directory on a specified machine.

Syntax

BOOL GetColorDirectoryW(
  PCWSTR pMachineName,
  PWSTR  pBuffer,
  PDWORD pdwSize
);

Parameters

pMachineName

Reserved; must be NULL. This parameter is intended to point to the name of the machine on which the profile is to be installed. A NULL pointer indicates the local machine.

pBuffer

Points to the buffer in which the color directory path is to be placed.

pdwSize

Points to a variable containing the size in bytes of the buffer pointed to by pBuffer. On return, the variable contains the size of the buffer actually used or needed.

Return value

If this function succeeds, the return value is TRUE.

If this function fails, the return value is FALSE. For extended error information, call GetLastError.

Remarks

Per-user/LUA support

Color directory is still system-wide. This function is executable in LUA context.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Header icm.h
Library Mscms.lib
DLL Mscms.dll

See also