mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +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;
|
||||
BOOL ret = FALSE;
|
||||
|
||||
if (!hdc || !pBufSize || !pszFilename) return FALSE;
|
||||
if (!hdc || !pBufSize) return FALSE;
|
||||
|
||||
if (GetICMProfileW(hdc, &buflen, filenameW))
|
||||
{
|
||||
ULONG len = WideCharToMultiByte(CP_ACP, 0, filenameW, -1, NULL, 0, NULL, NULL);
|
||||
|
||||
if (!pszFilename)
|
||||
{
|
||||
*pBufSize = len;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (*pBufSize >= len)
|
||||
{
|
||||
WideCharToMultiByte(CP_ACP, 0, filenameW, -1, pszFilename, *pBufSize, NULL, NULL);
|
||||
|
|
Loading…
Reference in a new issue