mirror of
https://github.com/reactos/reactos.git
synced 2025-07-04 02:01:21 +00:00
[MSCMS] Sync with Wine Staging 4.18. CORE-16441
This commit is contained in:
parent
bd98e58af4
commit
eb856c3564
4 changed files with 66 additions and 24 deletions
|
@ -96,8 +96,8 @@
|
||||||
@ stub WcsGetDefaultRenderingIntent
|
@ stub WcsGetDefaultRenderingIntent
|
||||||
@ stdcall WcsGetUsePerUserProfiles(wstr long ptr)
|
@ stdcall WcsGetUsePerUserProfiles(wstr long ptr)
|
||||||
@ stub WcsGpCanInstallOrUninstallProfiles
|
@ stub WcsGpCanInstallOrUninstallProfiles
|
||||||
@ stub WcsOpenColorProfileA
|
@ stdcall WcsOpenColorProfileA(ptr ptr ptr long long long long)
|
||||||
@ stub WcsOpenColorProfileW
|
@ stdcall WcsOpenColorProfileW(ptr ptr ptr long long long long)
|
||||||
@ stub WcsSetCalibrationManagementState
|
@ stub WcsSetCalibrationManagementState
|
||||||
@ stub WcsSetDefaultColorProfile
|
@ stub WcsSetDefaultColorProfile
|
||||||
@ stub WcsSetDefaultRenderingIntent
|
@ stub WcsSetDefaultRenderingIntent
|
||||||
|
|
|
@ -918,7 +918,11 @@ BOOL WINAPI EnumColorProfilesA( PCSTR machine, PENUMTYPEA record, PBYTE buffer,
|
||||||
*p = 0;
|
*p = 0;
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
}
|
}
|
||||||
else ret = FALSE;
|
else
|
||||||
|
{
|
||||||
|
SetLastError( ERROR_INSUFFICIENT_BUFFER );
|
||||||
|
ret = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
*size = totalsize;
|
*size = totalsize;
|
||||||
if (number) *number = count;
|
if (number) *number = count;
|
||||||
|
@ -1044,7 +1048,11 @@ BOOL WINAPI EnumColorProfilesW( PCWSTR machine, PENUMTYPEW record, PBYTE buffer,
|
||||||
*p = 0;
|
*p = 0;
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
}
|
}
|
||||||
else ret = FALSE;
|
else
|
||||||
|
{
|
||||||
|
SetLastError( ERROR_INSUFFICIENT_BUFFER );
|
||||||
|
ret = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
*size = totalsize;
|
*size = totalsize;
|
||||||
if (number) *number = count;
|
if (number) *number = count;
|
||||||
|
@ -1327,6 +1335,18 @@ BOOL WINAPI UninstallColorProfileW( PCWSTR machine, PCWSTR profile, BOOL delete
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static BOOL profile_AtoW( const PROFILE *in, PROFILE *out )
|
||||||
|
{
|
||||||
|
int len;
|
||||||
|
if (!in->pProfileData) return FALSE;
|
||||||
|
len = MultiByteToWideChar( CP_ACP, 0, in->pProfileData, -1, NULL, 0 );
|
||||||
|
if (!(out->pProfileData = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) return FALSE;
|
||||||
|
out->cbDataSize = len * sizeof(WCHAR);
|
||||||
|
MultiByteToWideChar( CP_ACP, 0, in->pProfileData, -1, out->pProfileData, len );
|
||||||
|
out->dwType = in->dwType;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* OpenColorProfileA [MSCMS.@]
|
* OpenColorProfileA [MSCMS.@]
|
||||||
*
|
*
|
||||||
|
@ -1335,6 +1355,7 @@ BOOL WINAPI UninstallColorProfileW( PCWSTR machine, PCWSTR profile, BOOL delete
|
||||||
HPROFILE WINAPI OpenColorProfileA( PPROFILE profile, DWORD access, DWORD sharing, DWORD creation )
|
HPROFILE WINAPI OpenColorProfileA( PPROFILE profile, DWORD access, DWORD sharing, DWORD creation )
|
||||||
{
|
{
|
||||||
HPROFILE handle = NULL;
|
HPROFILE handle = NULL;
|
||||||
|
PROFILE profileW;
|
||||||
|
|
||||||
TRACE( "( %p, 0x%08x, 0x%08x, 0x%08x )\n", profile, access, sharing, creation );
|
TRACE( "( %p, 0x%08x, 0x%08x, 0x%08x )\n", profile, access, sharing, creation );
|
||||||
|
|
||||||
|
@ -1344,25 +1365,9 @@ HPROFILE WINAPI OpenColorProfileA( PPROFILE profile, DWORD access, DWORD sharing
|
||||||
if (profile->dwType & PROFILE_MEMBUFFER)
|
if (profile->dwType & PROFILE_MEMBUFFER)
|
||||||
return OpenColorProfileW( profile, access, sharing, creation );
|
return OpenColorProfileW( profile, access, sharing, creation );
|
||||||
|
|
||||||
if (profile->dwType & PROFILE_FILENAME)
|
if (!profile_AtoW( profile, &profileW )) return FALSE;
|
||||||
{
|
|
||||||
UINT len;
|
|
||||||
PROFILE profileW;
|
|
||||||
|
|
||||||
profileW.dwType = profile->dwType;
|
|
||||||
|
|
||||||
len = MultiByteToWideChar( CP_ACP, 0, profile->pProfileData, -1, NULL, 0 );
|
|
||||||
profileW.pProfileData = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
|
|
||||||
|
|
||||||
if (profileW.pProfileData)
|
|
||||||
{
|
|
||||||
profileW.cbDataSize = len * sizeof(WCHAR);
|
|
||||||
MultiByteToWideChar( CP_ACP, 0, profile->pProfileData, -1, profileW.pProfileData, len );
|
|
||||||
|
|
||||||
handle = OpenColorProfileW( &profileW, access, sharing, creation );
|
handle = OpenColorProfileW( &profileW, access, sharing, creation );
|
||||||
HeapFree( GetProcessHeap(), 0, profileW.pProfileData );
|
HeapFree( GetProcessHeap(), 0, profileW.pProfileData );
|
||||||
}
|
|
||||||
}
|
|
||||||
return handle;
|
return handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1546,3 +1551,39 @@ BOOL WINAPI WcsEnumColorProfilesSize( WCS_PROFILE_MANAGEMENT_SCOPE scope, ENUMTY
|
||||||
SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
|
SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* WcsOpenColorProfileA [MSCMS.@]
|
||||||
|
*/
|
||||||
|
HPROFILE WINAPI WcsOpenColorProfileA( PROFILE *cdm, PROFILE *camp, PROFILE *gmmp, DWORD access, DWORD sharing,
|
||||||
|
DWORD creation, DWORD flags )
|
||||||
|
{
|
||||||
|
PROFILE cdmW, campW = {0}, gmmpW = {0};
|
||||||
|
HPROFILE ret = NULL;
|
||||||
|
|
||||||
|
TRACE( "%p, %p, %p, %08x, %08x, %08x, %08x\n", cdm, camp, gmmp, access, sharing, creation, flags );
|
||||||
|
|
||||||
|
if (!cdm || !profile_AtoW( cdm, &cdmW )) return NULL;
|
||||||
|
if (camp && !profile_AtoW( camp, &campW )) goto done;
|
||||||
|
if (gmmp && !profile_AtoW( gmmp, &gmmpW )) goto done;
|
||||||
|
|
||||||
|
ret = WcsOpenColorProfileW( &cdmW, &campW, &gmmpW, access, sharing, creation, flags );
|
||||||
|
|
||||||
|
done:
|
||||||
|
HeapFree( GetProcessHeap(), 0, cdmW.pProfileData );
|
||||||
|
HeapFree( GetProcessHeap(), 0, campW.pProfileData );
|
||||||
|
HeapFree( GetProcessHeap(), 0, gmmpW.pProfileData );
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* WcsOpenColorProfileW [MSCMS.@]
|
||||||
|
*/
|
||||||
|
HPROFILE WINAPI WcsOpenColorProfileW( PROFILE *cdm, PROFILE *camp, PROFILE *gmmp, DWORD access, DWORD sharing,
|
||||||
|
DWORD creation, DWORD flags )
|
||||||
|
{
|
||||||
|
TRACE( "%p, %p, %p, %08x, %08x, %08x, %08x\n", cdm, camp, gmmp, access, sharing, creation, flags );
|
||||||
|
FIXME("no support for WCS profiles\n" );
|
||||||
|
|
||||||
|
return OpenColorProfileW( cdm, access, sharing, creation );
|
||||||
|
}
|
||||||
|
|
|
@ -48,6 +48,7 @@ static DWORD from_bmformat( BMFORMAT format )
|
||||||
case BM_GRAY: ret = TYPE_GRAY_8; break;
|
case BM_GRAY: ret = TYPE_GRAY_8; break;
|
||||||
case BM_xRGBQUADS: ret = TYPE_ARGB_8; break;
|
case BM_xRGBQUADS: ret = TYPE_ARGB_8; break;
|
||||||
case BM_xBGRQUADS: ret = TYPE_ABGR_8; break;
|
case BM_xBGRQUADS: ret = TYPE_ABGR_8; break;
|
||||||
|
case BM_KYMCQUADS: ret = TYPE_KYMC_8; break;
|
||||||
default:
|
default:
|
||||||
if (!quietfixme)
|
if (!quietfixme)
|
||||||
{
|
{
|
||||||
|
|
|
@ -105,7 +105,7 @@ dll/win32/msacm32 # Synced to WineStaging-4.18
|
||||||
dll/win32/msacm32.drv # Synced to WineStaging-3.3
|
dll/win32/msacm32.drv # Synced to WineStaging-3.3
|
||||||
dll/win32/msadp32.acm # Synced to WineStaging-4.0
|
dll/win32/msadp32.acm # Synced to WineStaging-4.0
|
||||||
dll/win32/mscat32 # Synced to WineStaging-4.18
|
dll/win32/mscat32 # Synced to WineStaging-4.18
|
||||||
dll/win32/mscms # Synced to WineStaging-4.0
|
dll/win32/mscms # Synced to WineStaging-4.18
|
||||||
dll/win32/mscoree # Synced to Wine-1.5.4
|
dll/win32/mscoree # Synced to Wine-1.5.4
|
||||||
dll/win32/msctf # Synced to WineStaging-4.0
|
dll/win32/msctf # Synced to WineStaging-4.0
|
||||||
dll/win32/msftedit # Synced to WineStaging-3.3
|
dll/win32/msftedit # Synced to WineStaging-3.3
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue