mirror of
https://github.com/reactos/reactos.git
synced 2025-07-04 02:41:21 +00:00
[GDI32] sync GetICMProfileA to wine
svn path=/trunk/; revision=72230
This commit is contained in:
parent
69a268849d
commit
3f62a5f7f8
1 changed files with 8 additions and 1 deletions
|
@ -144,11 +144,18 @@ GetICMProfileA(
|
||||||
DWORD buflen = MAX_PATH;
|
DWORD buflen = MAX_PATH;
|
||||||
BOOL ret = FALSE;
|
BOOL ret = FALSE;
|
||||||
|
|
||||||
if (!hdc || !pBufSize || !pszFilename) return FALSE;
|
if (!hdc || !pBufSize) return FALSE;
|
||||||
|
|
||||||
if (GetICMProfileW(hdc, &buflen, filenameW))
|
if (GetICMProfileW(hdc, &buflen, filenameW))
|
||||||
{
|
{
|
||||||
ULONG len = WideCharToMultiByte(CP_ACP, 0, filenameW, -1, NULL, 0, NULL, NULL);
|
ULONG len = WideCharToMultiByte(CP_ACP, 0, filenameW, -1, NULL, 0, NULL, NULL);
|
||||||
|
|
||||||
|
if (!pszFilename)
|
||||||
|
{
|
||||||
|
*pBufSize = len;
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (*pBufSize >= len)
|
if (*pBufSize >= len)
|
||||||
{
|
{
|
||||||
WideCharToMultiByte(CP_ACP, 0, filenameW, -1, pszFilename, *pBufSize, NULL, NULL);
|
WideCharToMultiByte(CP_ACP, 0, filenameW, -1, pszFilename, *pBufSize, NULL, NULL);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue