Commit 8349a9f5 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

mscms: Create a copy of memory based profiles.

parent 6e7b5347
...@@ -1371,7 +1371,6 @@ HPROFILE WINAPI OpenColorProfileW( PPROFILE profile, DWORD access, DWORD sharing ...@@ -1371,7 +1371,6 @@ HPROFILE WINAPI OpenColorProfileW( PPROFILE profile, DWORD access, DWORD sharing
cmsHPROFILE cmsprofile = NULL; cmsHPROFILE cmsprofile = NULL;
icProfile *iccprofile = NULL; icProfile *iccprofile = NULL;
HANDLE handle = INVALID_HANDLE_VALUE; HANDLE handle = INVALID_HANDLE_VALUE;
DWORD size;
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 );
...@@ -1381,14 +1380,14 @@ HPROFILE WINAPI OpenColorProfileW( PPROFILE profile, DWORD access, DWORD sharing ...@@ -1381,14 +1380,14 @@ HPROFILE WINAPI OpenColorProfileW( PPROFILE profile, DWORD access, DWORD sharing
{ {
/* FIXME: access flags not implemented for memory based profiles */ /* FIXME: access flags not implemented for memory based profiles */
iccprofile = profile->pProfileData; if (!(iccprofile = HeapAlloc( GetProcessHeap(), 0, profile->cbDataSize ))) return NULL;
size = profile->cbDataSize; memcpy( iccprofile, profile->pProfileData, profile->cbDataSize );
cmsprofile = cmsOpenProfileFromMem( iccprofile, size ); cmsprofile = cmsOpenProfileFromMem( iccprofile, profile->cbDataSize );
} }
else if (profile->dwType == PROFILE_FILENAME) else if (profile->dwType == PROFILE_FILENAME)
{ {
DWORD read, flags = 0; DWORD size, read, flags = 0;
TRACE( "profile file: %s\n", debugstr_w( (WCHAR *)profile->pProfileData ) ); TRACE( "profile file: %s\n", debugstr_w( (WCHAR *)profile->pProfileData ) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment