10 LPLOGCOLORSPACEW lplcpw
,
14 LOGCOLORSPACEEXW lcpeexw
;
16 if ((lplcpw
->lcsSignature
!= LCS_SIGNATURE
) ||
17 (lplcpw
->lcsVersion
!= 0x400) ||
18 (lplcpw
->lcsSize
!= sizeof(LOGCOLORSPACEW
)))
20 SetLastError(ERROR_INVALID_COLORSPACE
);
23 RtlCopyMemory(&lcpeexw
.lcsColorSpace
, lplcpw
, sizeof(LOGCOLORSPACEW
));
25 return NtGdiCreateColorSpace(&lcpeexw
);
34 LPLOGCOLORSPACEW lplcpw
37 return IntCreateColorSpaceW(lplcpw
, FALSE
);
47 LPLOGCOLORSPACEA lplcpa
52 if ((lplcpa
->lcsSignature
!= LCS_SIGNATURE
) ||
53 (lplcpa
->lcsVersion
!= 0x400) ||
54 (lplcpa
->lcsSize
!= sizeof(LOGCOLORSPACEA
)))
56 SetLastError(ERROR_INVALID_COLORSPACE
);
60 lcpw
.lcsSignature
= lplcpa
->lcsSignature
;
61 lcpw
.lcsVersion
= lplcpa
->lcsVersion
;
62 lcpw
.lcsSize
= sizeof(LOGCOLORSPACEW
);
63 lcpw
.lcsCSType
= lplcpa
->lcsCSType
;
64 lcpw
.lcsIntent
= lplcpa
->lcsIntent
;
65 lcpw
.lcsEndpoints
= lplcpa
->lcsEndpoints
;
66 lcpw
.lcsGammaRed
= lplcpa
->lcsGammaRed
;
67 lcpw
.lcsGammaGreen
= lplcpa
->lcsGammaGreen
;
68 lcpw
.lcsGammaBlue
= lplcpa
->lcsGammaBlue
;
70 RtlMultiByteToUnicodeN( lcpw
.lcsFilename
,
74 strlen(lplcpa
->lcsFilename
) + 1);
76 return IntCreateColorSpaceW(&lcpw
, FALSE
);
84 GetColorSpace(HDC hDC
)
88 if (!GdiGetHandleUserData(hDC
, GDI_OBJECT_TYPE_DC
, (PVOID
)&pDc_Attr
))
90 SetLastError(ERROR_INVALID_HANDLE
);
93 return pDc_Attr
->hColorSpace
;
107 HCOLORSPACE rhCS
= GetColorSpace(hDC
);
109 if (GDI_HANDLE_GET_TYPE(hDC
) == GDI_OBJECT_TYPE_DC
)
111 if (NtGdiSetColorSpace(hDC
, hCS
)) return rhCS
;
114 if (GDI_HANDLE_GET_TYPE(hDC
) != GDI_OBJECT_TYPE_METADC
)
116 PLDC pLDC
= GdiGetLDC(hDC
);
119 SetLastError(ERROR_INVALID_HANDLE
);
122 if (pLDC
->iType
== LDC_EMFLDC
)
143 WCHAR filenameW
[MAX_PATH
];
144 DWORD buflen
= MAX_PATH
;
147 if (!hdc
|| !pBufSize
) return FALSE
;
149 if (GetICMProfileW(hdc
, &buflen
, filenameW
))
151 ULONG len
= WideCharToMultiByte(CP_ACP
, 0, filenameW
, -1, NULL
, 0, NULL
, NULL
);
159 if (*pBufSize
>= len
)
161 WideCharToMultiByte(CP_ACP
, 0, filenameW
, -1, pszFilename
, *pBufSize
, NULL
, NULL
);
164 else SetLastError(ERROR_INSUFFICIENT_BUFFER
);
183 if (!hdc
|| !size
|| !filename
) return FALSE
;
186 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
202 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
218 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
235 * FIXME - call NtGdiEnumICMProfiles with NULL for lpstrBuffer
236 * to find out how big a buffer we need. Then allocate that buffer
237 * and call NtGdiEnumICMProfiles again to have the buffer filled.
239 * Finally, step through the buffer ( MULTI-SZ recommended for format ),
240 * and convert each string to ANSI, calling the user's callback function
241 * until we run out of strings or the user returns FALSE
245 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
257 ICMENUMPROCW lpEnumICMProfilesFunc
,
262 * FIXME - call NtGdiEnumICMProfiles with NULL for lpstrBuffer
263 * to find out how big a buffer we need. Then allocate that buffer
264 * and call NtGdiEnumICMProfiles again to have the buffer filled.
266 * Finally, step through the buffer ( MULTI-SZ recommended for format ),
267 * and call the user's callback function until we run out of strings or
268 * the user returns FALSE
271 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
289 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
307 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
321 /*FIXME: Assume that ICM is always off, and cannot be turned on */
322 if (iEnableICM
== ICM_OFF
) return ICM_OFF
;
323 if (iEnableICM
== ICM_ON
) return 0;
324 if (iEnableICM
== ICM_QUERY
) return ICM_OFF
;
327 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);