mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 19:26:32 +00:00
[GDI32] sync GetICMProfileA to wine
svn path=/trunk/; revision=72230
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user