Stub implementations for GetICMProfileW, SetICMProfile{A,W},

UpdateICMRegKey{A,W}.
Forward UpdateICMRegKey to UpdateICMRegKeyA.
This commit is contained in:
Hans Leidekker 2004-12-27 17:23:17 +00:00 committed by Alexandre Julliard
parent 273137cc2c
commit feef8957b9
3 changed files with 83 additions and 16 deletions

View File

@ -226,8 +226,8 @@
@ stdcall GetGlyphOutlineW(long long long ptr long ptr ptr)
@ stub GetGlyphOutlineWow
@ stdcall GetGraphicsMode(long)
@ stdcall GetICMProfileA(long ptr ptr)
@ stub GetICMProfileW
@ stdcall GetICMProfileA(long ptr str)
@ stdcall GetICMProfileW(long ptr wstr)
@ stub GetKerningPairs
@ stdcall GetKerningPairsA(long long ptr)
@ stdcall GetKerningPairsW(long long ptr)
@ -363,8 +363,8 @@
@ stub SetFontEnumeration
@ stdcall SetGraphicsMode(long long)
@ stdcall SetICMMode(long long)
@ stdcall SetICMProfileA (long ptr)
@ stub SetICMProfileW
@ stdcall SetICMProfileA(long str)
@ stdcall SetICMProfileW(long wstr)
@ stdcall SetLayout(long long)
@ stub SetMagicColors
@ stdcall SetMapMode(long long)
@ -408,9 +408,9 @@
@ stub UnloadNetworkFonts
@ stdcall UnrealizeObject(long)
@ stdcall UpdateColors(long)
@ stub UpdateICMRegKey
@ stub UpdateICMRegKeyA
@ stub UpdateICMRegKeyW
@ stdcall UpdateICMRegKey(long str str long) UpdateICMRegKeyA
@ stdcall UpdateICMRegKeyA(long str str long)
@ stdcall UpdateICMRegKeyW(long wstr wstr long)
@ stdcall WidenPath(long)
@ stub gdiPlaySpoolStream
@ extern pfnRealizePalette

View File

@ -927,34 +927,60 @@ VOID WINAPI SetMagicColors16(HDC16 hDC, COLORREF color, UINT16 index)
* How does Windows assign these? Some registry key?
*/
#define WINEICM "winefake.icm" /* easy-to-identify fake filename */
/*********************************************************************/
BOOL WINAPI GetICMProfileA(HDC hDC, LPDWORD lpcbName, LPSTR lpszFilename)
{
DWORD callerLen;
static const char icm[] = "winefake.icm";
FIXME("(%p, %p, %p): partial stub\n", hDC, lpcbName, lpszFilename);
callerLen = *lpcbName;
/* all 3 behaviors require the required buffer size to be set */
*lpcbName = strlen(WINEICM);
*lpcbName = sizeof(icm);
/* behavior 1: if lpszFilename is NULL, return size of string and no error */
if ((DWORD)lpszFilename == (DWORD)0x00000000)
return TRUE;
if (!lpszFilename) return TRUE;
/* behavior 2: if buffer size too small, return size of string and error */
if (callerLen < strlen(WINEICM))
if (callerLen < sizeof(icm))
{
SetLastError(ERROR_INSUFFICIENT_BUFFER);
return FALSE;
}
/* behavior 3: if buffer size OK and pointer not NULL, copy and return size */
strcpy(lpszFilename, WINEICM);
memcpy(lpszFilename, icm, sizeof(icm));
return TRUE;
}
BOOL WINAPI GetICMProfileW(HDC hDC, LPDWORD lpcbName, LPWSTR lpszFilename)
{
DWORD callerLen;
static const WCHAR icm[] = { 'w','i','n','e','f','a','k','e','.','i','c','m', 0 };
FIXME("(%p, %p, %p): partial stub\n", hDC, lpcbName, lpszFilename);
callerLen = *lpcbName;
/* all 3 behaviors require the required buffer size to be set */
*lpcbName = sizeof(icm) / sizeof(WCHAR);
/* behavior 1: if lpszFilename is NULL, return size of string and no error */
if (!lpszFilename) return TRUE;
/* behavior 2: if buffer size too small, return size of string and error */
if (callerLen < sizeof(icm)/sizeof(WCHAR))
{
SetLastError(ERROR_INSUFFICIENT_BUFFER);
return FALSE;
}
/* behavior 3: if buffer size OK and pointer not NULL, copy and return size */
memcpy(lpszFilename, icm, sizeof(icm));
return TRUE;
}
@ -967,3 +993,35 @@ BOOL WINAPI SetICMProfileA(HDC hDC, LPSTR lpszFilename)
FIXME("hDC %p filename '%s': stub!\n", hDC, debugstr_a(lpszFilename));
return TRUE; /* success */
}
/**********************************************************************
* SetICMProfileA [GDI32.@]
*
*/
BOOL WINAPI SetICMProfileW(HDC hDC, LPWSTR lpszFilename)
{
FIXME("hDC %p filename '%s': stub!\n", hDC, debugstr_w(lpszFilename));
return TRUE; /* success */
}
/**********************************************************************
* UpdateICMRegKeyA [GDI32.@]
*
*/
BOOL WINAPI UpdateICMRegKeyA(DWORD dwReserved, LPSTR lpszCMID, LPSTR lpszFileName, UINT nCommand)
{
FIXME("(0x%08lx, %s, %s, 0x%08x): stub!\n", dwReserved, debugstr_a(lpszCMID),
debugstr_a(lpszFileName), nCommand);
return TRUE; /* success */
}
/**********************************************************************
* UpdateICMRegKeyW [GDI32.@]
*
*/
BOOL WINAPI UpdateICMRegKeyW(DWORD dwReserved, LPWSTR lpszCMID, LPWSTR lpszFileName, UINT nCommand)
{
FIXME("(0x%08lx, %s, %s, 0x%08x): stub!\n", dwReserved, debugstr_w(lpszCMID),
debugstr_w(lpszFileName), nCommand);
return TRUE; /* success */
}

View File

@ -3391,6 +3391,9 @@ DWORD WINAPI GetGlyphOutlineA(HDC,UINT,UINT,LPGLYPHMETRICS,DWORD,LPVOID,cons
DWORD WINAPI GetGlyphOutlineW(HDC,UINT,UINT,LPGLYPHMETRICS,DWORD,LPVOID,const MAT2*);
#define GetGlyphOutline WINELIB_NAME_AW(GetGlyphOutline)
INT WINAPI GetGraphicsMode(HDC);
BOOL WINAPI GetICMProfileA(HDC,LPDWORD,LPSTR);
BOOL WINAPI GetICMProfileW(HDC,LPDWORD,LPWSTR);
#define GetICMProfile WINELIB_NAME_AW(GetICMProfile)
DWORD WINAPI GetKerningPairsA(HDC,DWORD,LPKERNINGPAIR);
DWORD WINAPI GetKerningPairsW(HDC,DWORD,LPKERNINGPAIR);
#define GetKerningPairs WINELIB_NAME_AW(GetKerningPairs)
@ -3534,6 +3537,9 @@ INT WINAPI SetDIBitsToDevice(HDC,INT,INT,DWORD,DWORD,INT,
HENHMETAFILE WINAPI SetEnhMetaFileBits(UINT,const BYTE *);
INT WINAPI SetGraphicsMode(HDC,INT);
INT WINAPI SetICMMode(HDC,INT);
BOOL WINAPI SetICMProfileA(HDC,LPSTR);
BOOL WINAPI SetICMProfileW(HDC,LPWSTR);
#define SetICMProfile WINELIB_NAME_AW(SetICMProfile)
DWORD WINAPI SetLayout(HDC,DWORD);
INT WINAPI SetMapMode(HDC,INT);
DWORD WINAPI SetMapperFlags(HDC,DWORD);
@ -3579,6 +3585,9 @@ BOOL WINAPI TranslateCharsetInfo(LPDWORD,LPCHARSETINFO,DWORD);
BOOL WINAPI TransparentBlt(HDC,int,int,int,int,HDC,int,int,int,int,UINT);
BOOL WINAPI UnrealizeObject(HGDIOBJ);
BOOL WINAPI UpdateColors(HDC);
BOOL WINAPI UpdateICMRegKeyA(DWORD,LPSTR,LPSTR,UINT);
BOOL WINAPI UpdateICMRegKeyW(DWORD,LPWSTR,LPWSTR,UINT);
#define UpdateICMRegKey WINELIB_NAME_AW(UpdateICMRegKey)
BOOL WINAPI WidenPath(HDC);
BOOL WINAPI PolyTextOutA(HDC,PPOLYTEXTA,INT);
BOOL WINAPI PolyTextOutW(HDC,PPOLYTEXTW,INT);