ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
September 2013
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
16 participants
554 discussions
Start a n
N
ew thread
[hbelusca] 60296: [NTOS] - Implement PsGetCurrentThreadProcess, PsGetCurrentThreadProcessId and PsGetCurrentThreadTeb based on their non-current versions. - Fix PsGetThreadSessionId to call MmGetSe...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sat Sep 21 20:46:42 2013 New Revision: 60296 URL:
http://svn.reactos.org/svn/reactos?rev=60296&view=rev
Log: [NTOS] - Implement PsGetCurrentThreadProcess, PsGetCurrentThreadProcessId and PsGetCurrentThreadTeb based on their non-current versions. - Fix PsGetThreadSessionId to call MmGetSessionId. - Fix the return value type of PsGetJobSessionId. - Remove an unneeded cast. Modified: trunk/reactos/ntoskrnl/ntoskrnl.spec trunk/reactos/ntoskrnl/ps/job.c trunk/reactos/ntoskrnl/ps/query.c trunk/reactos/ntoskrnl/ps/thread.c Modified: trunk/reactos/ntoskrnl/ntoskrnl.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ntoskrnl.spec?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ntoskrnl.spec [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ntoskrnl.spec [iso-8859-1] Sat Sep 21 20:46:42 2013 @@ -963,11 +963,11 @@ @ stdcall PsGetCurrentThread() KeGetCurrentThread @ stdcall PsGetCurrentThreadId() @ stdcall PsGetCurrentThreadPreviousMode() -;PsGetCurrentThreadProcess -;PsGetCurrentThreadProcessId +@ stdcall PsGetCurrentThreadProcess() +@ stdcall PsGetCurrentThreadProcessId() @ stdcall PsGetCurrentThreadStackBase() @ stdcall PsGetCurrentThreadStackLimit() -;PsGetCurrentThreadTeb +@ stdcall PsGetCurrentThreadTeb() @ stdcall PsGetCurrentThreadWin32Thread() ;PsGetCurrentThreadWin32ThreadAndEnterCriticalRegion @ stdcall PsGetJobLock(ptr) Modified: trunk/reactos/ntoskrnl/ps/job.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/job.c?rev=6029…
============================================================================== --- trunk/reactos/ntoskrnl/ps/job.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ps/job.c [iso-8859-1] Sat Sep 21 20:46:42 2013 @@ -527,12 +527,12 @@ /* * @implemented */ -PVOID +ULONG NTAPI PsGetJobSessionId ( PEJOB Job ) { ASSERT(Job); - return (PVOID)Job->SessionId; + return Job->SessionId; } Modified: trunk/reactos/ntoskrnl/ps/query.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/query.c?rev=60…
============================================================================== --- trunk/reactos/ntoskrnl/ps/query.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ps/query.c [iso-8859-1] Sat Sep 21 20:46:42 2013 @@ -419,7 +419,7 @@ _SEH2_TRY { /* Write back the Session ID */ - SessionInfo->SessionId = PtrToUlong(PsGetProcessSessionId(Process)); + SessionInfo->SessionId = PsGetProcessSessionId(Process); } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { Modified: trunk/reactos/ntoskrnl/ps/thread.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/thread.c?rev=6…
============================================================================== --- trunk/reactos/ntoskrnl/ps/thread.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ps/thread.c [iso-8859-1] Sat Sep 21 20:46:42 2013 @@ -669,8 +669,38 @@ /* * @implemented */ +ULONG +NTAPI +PsGetThreadFreezeCount(IN PETHREAD Thread) +{ + return Thread->Tcb.FreezeCount; +} + +/* + * @implemented + */ +BOOLEAN +NTAPI +PsGetThreadHardErrorsAreDisabled(IN PETHREAD Thread) +{ + return Thread->HardErrorsAreDisabled ? TRUE : FALSE; +} + +/* + * @implemented + */ HANDLE NTAPI +PsGetThreadId(IN PETHREAD Thread) +{ + return Thread->Cid.UniqueThread; +} + +/* + * @implemented + */ +HANDLE +NTAPI PsGetCurrentThreadId(VOID) { return PsGetCurrentThread()->Cid.UniqueThread; @@ -679,61 +709,51 @@ /* * @implemented */ +PEPROCESS +NTAPI +PsGetThreadProcess(IN PETHREAD Thread) +{ + return Thread->ThreadsProcess; +} + +/* + * @implemented + */ +PEPROCESS +NTAPI +PsGetCurrentThreadProcess(VOID) +{ + return PsGetCurrentThread()->ThreadsProcess; +} + +/* + * @implemented + */ +HANDLE +NTAPI +PsGetThreadProcessId(IN PETHREAD Thread) +{ + return Thread->Cid.UniqueProcess; +} + +/* + * @implemented + */ +HANDLE +NTAPI +PsGetCurrentThreadProcessId(VOID) +{ + return PsGetCurrentThread()->Cid.UniqueProcess; +} + +/* + * @implemented + */ ULONG NTAPI -PsGetThreadFreezeCount(IN PETHREAD Thread) -{ - return Thread->Tcb.FreezeCount; -} - -/* - * @implemented - */ -BOOLEAN -NTAPI -PsGetThreadHardErrorsAreDisabled(IN PETHREAD Thread) -{ - return Thread->HardErrorsAreDisabled ? TRUE : FALSE; -} - -/* - * @implemented - */ -HANDLE -NTAPI -PsGetThreadId(IN PETHREAD Thread) -{ - return Thread->Cid.UniqueThread; -} - -/* - * @implemented - */ -PEPROCESS -NTAPI -PsGetThreadProcess(IN PETHREAD Thread) -{ - return Thread->ThreadsProcess; -} - -/* - * @implemented - */ -HANDLE -NTAPI -PsGetThreadProcessId(IN PETHREAD Thread) -{ - return Thread->Cid.UniqueProcess; -} - -/* - * @implemented - */ -HANDLE -NTAPI PsGetThreadSessionId(IN PETHREAD Thread) { - return (HANDLE)Thread->ThreadsProcess->Session; + return MmGetSessionId(Thread->ThreadsProcess); } /* @@ -749,11 +769,31 @@ /* * @implemented */ +PTEB +NTAPI +PsGetCurrentThreadTeb(VOID) +{ + return PsGetCurrentThread()->Tcb.Teb; +} + +/* + * @implemented + */ PVOID NTAPI PsGetThreadWin32Thread(IN PETHREAD Thread) { return Thread->Tcb.Win32Thread; +} + +/* + * @implemented + */ +PVOID +NTAPI +PsGetCurrentThreadWin32Thread(VOID) +{ + return PsGetCurrentThread()->Tcb.Win32Thread; } /* @@ -825,16 +865,6 @@ IN BOOLEAN HardErrorsAreDisabled) { Thread->HardErrorsAreDisabled = HardErrorsAreDisabled; -} - -/* - * @implemented - */ -PVOID -NTAPI -PsGetCurrentThreadWin32Thread(VOID) -{ - return PsGetCurrentThread()->Tcb.Win32Thread; } /*
11 years, 3 months
1
0
0
0
[akhaldi] 60295: [MSCMS_WINETEST] * Sync with Wine 1.7.1. CORE-7469
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Sep 21 20:44:00 2013 New Revision: 60295 URL:
http://svn.reactos.org/svn/reactos?rev=60295&view=rev
Log: [MSCMS_WINETEST] * Sync with Wine 1.7.1. CORE-7469 Modified: trunk/rostests/winetests/mscms/CMakeLists.txt trunk/rostests/winetests/mscms/profile.c trunk/rostests/winetests/mscms/testlist.c Modified: trunk/rostests/winetests/mscms/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mscms/CMakeList…
============================================================================== --- trunk/rostests/winetests/mscms/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/winetests/mscms/CMakeLists.txt [iso-8859-1] Sat Sep 21 20:44:00 2013 @@ -1,10 +1,5 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) add_executable(mscms_winetest profile.c testlist.c) -target_link_libraries(mscms_winetest wine) set_module_type(mscms_winetest win32cui) -add_importlibs(mscms_winetest advapi32 msvcrt kernel32 ntdll) +add_importlibs(mscms_winetest msvcrt kernel32) add_cd_file(TARGET mscms_winetest DESTINATION reactos/bin FOR all) Modified: trunk/rostests/winetests/mscms/profile.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mscms/profile.c…
============================================================================== --- trunk/rostests/winetests/mscms/profile.c [iso-8859-1] (original) +++ trunk/rostests/winetests/mscms/profile.c [iso-8859-1] Sat Sep 21 20:44:00 2013 @@ -254,17 +254,16 @@ ok( !ret, "GetColorProfileElement() succeeded (%d)\n", GetLastError() ); size = 0; - ret = pGetColorProfileElement( handle, tag, 0, &size, NULL, &ref ); - ok( !ret && size > 0, "GetColorProfileElement() succeeded (%d)\n", GetLastError() ); + ok( !ret, "GetColorProfileElement() succeeded\n" ); + ok( size > 0, "wrong size\n" ); + + /* Functional checks */ size = sizeof(buffer); - - /* Functional checks */ - ret = pGetColorProfileElement( handle, tag, 0, &size, buffer, &ref ); - ok( ret && size > 0, "GetColorProfileElement() failed (%d)\n", GetLastError() ); - + ok( ret, "GetColorProfileElement() failed %u\n", GetLastError() ); + ok( size > 0, "wrong size\n" ); ok( !memcmp( buffer, expect, sizeof(expect) ), "Unexpected tag data\n" ); pCloseColorProfile( handle ); @@ -1054,18 +1053,16 @@ /* Functional checks */ size = sizeof(data); - ret = pSetColorProfileElement( handle, tag, 0, &size, data ); - ok( ret, "SetColorProfileElement() failed (%d)\n", GetLastError() ); + ok( ret, "SetColorProfileElement() failed %u\n", GetLastError() ); size = sizeof(buffer); - ret = pGetColorProfileElement( handle, tag, 0, &size, buffer, &ref ); - ok( ret && size > 0, "GetColorProfileElement() failed (%d)\n", GetLastError() ); + ok( ret, "GetColorProfileElement() failed %u\n", GetLastError() ); + ok( size > 0, "wrong size\n" ); ok( !memcmp( data, buffer, sizeof(data) ), - "Unexpected tag data, expected %s, got %s (%d)\n", - data, buffer, GetLastError() ); + "Unexpected tag data, expected %s, got %s (%u)\n", data, buffer, GetLastError() ); pCloseColorProfile( handle ); } Modified: trunk/rostests/winetests/mscms/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mscms/testlist.…
============================================================================== --- trunk/rostests/winetests/mscms/testlist.c [iso-8859-1] (original) +++ trunk/rostests/winetests/mscms/testlist.c [iso-8859-1] Sat Sep 21 20:44:00 2013 @@ -1,10 +1,7 @@ /* Automatically generated file; DO NOT EDIT!! */ -#define WIN32_LEAN_AND_MEAN -#include <windows.h> - #define STANDALONE -#include "wine/test.h" +#include <wine/test.h> extern void func_profile(void);
11 years, 3 months
1
0
0
0
[akhaldi] 60294: [MSCMS] * Sync with Wine 1.7.1. CORE-7469
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Sep 21 20:43:42 2013 New Revision: 60294 URL:
http://svn.reactos.org/svn/reactos?rev=60294&view=rev
Log: [MSCMS] * Sync with Wine 1.7.1. CORE-7469 Modified: trunk/reactos/dll/win32/mscms/CMakeLists.txt trunk/reactos/dll/win32/mscms/handle.c trunk/reactos/dll/win32/mscms/icc.c trunk/reactos/dll/win32/mscms/mscms_main.c trunk/reactos/dll/win32/mscms/mscms_priv.h trunk/reactos/dll/win32/mscms/profile.c trunk/reactos/dll/win32/mscms/stub.c trunk/reactos/dll/win32/mscms/transform.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/mscms/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mscms/CMakeLists…
============================================================================== --- trunk/reactos/dll/win32/mscms/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mscms/CMakeLists.txt [iso-8859-1] Sat Sep 21 20:43:42 2013 @@ -11,12 +11,11 @@ profile.c stub.c transform.c - version.rc ${CMAKE_CURRENT_BINARY_DIR}/mscms_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/mscms.def) -add_library(mscms SHARED ${SOURCE}) +add_library(mscms SHARED ${SOURCE} version.rc) set_module_type(mscms win32dll) target_link_libraries(mscms wine) -add_importlibs(mscms msvcrt advapi32 kernel32 ntdll) +add_importlibs(mscms advapi32 msvcrt kernel32 ntdll) add_cd_file(TARGET mscms DESTINATION reactos/system32 FOR all) Modified: trunk/reactos/dll/win32/mscms/handle.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mscms/handle.c?r…
============================================================================== --- trunk/reactos/dll/win32/mscms/handle.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mscms/handle.c [iso-8859-1] Sat Sep 21 20:43:42 2013 @@ -31,17 +31,17 @@ //#include "mscms_priv.h" -#ifdef HAVE_LCMS - -static CRITICAL_SECTION MSCMS_handle_cs; -static CRITICAL_SECTION_DEBUG MSCMS_handle_cs_debug = -{ - 0, 0, &MSCMS_handle_cs, - { &MSCMS_handle_cs_debug.ProcessLocksList, - &MSCMS_handle_cs_debug.ProcessLocksList }, - 0, 0, { (DWORD_PTR)(__FILE__ ": MSCMS_handle_cs") } +#ifdef HAVE_LCMS2 + +static CRITICAL_SECTION mscms_handle_cs; +static CRITICAL_SECTION_DEBUG mscms_handle_cs_debug = +{ + 0, 0, &mscms_handle_cs, + { &mscms_handle_cs_debug.ProcessLocksList, + &mscms_handle_cs_debug.ProcessLocksList }, + 0, 0, { (DWORD_PTR)(__FILE__ ": mscms_handle_cs") } }; -static CRITICAL_SECTION MSCMS_handle_cs = { &MSCMS_handle_cs_debug, -1, 0, 0, 0, 0 }; +static CRITICAL_SECTION mscms_handle_cs = { &mscms_handle_cs_debug, -1, 0, 0, 0, 0 }; static struct profile *profiletable; static struct transform *transformtable; @@ -61,19 +61,19 @@ transformtable = NULL; num_transform_handles = 0; - DeleteCriticalSection( &MSCMS_handle_cs ); + DeleteCriticalSection( &mscms_handle_cs ); } struct profile *grab_profile( HPROFILE handle ) { DWORD_PTR index; - EnterCriticalSection( &MSCMS_handle_cs ); + EnterCriticalSection( &mscms_handle_cs ); index = (DWORD_PTR)handle - 1; if (index > num_profile_handles) { - LeaveCriticalSection( &MSCMS_handle_cs ); + LeaveCriticalSection( &mscms_handle_cs ); return NULL; } return &profiletable[index]; @@ -81,19 +81,19 @@ void release_profile( struct profile *profile ) { - LeaveCriticalSection( &MSCMS_handle_cs ); + LeaveCriticalSection( &mscms_handle_cs ); } struct transform *grab_transform( HTRANSFORM handle ) { DWORD_PTR index; - EnterCriticalSection( &MSCMS_handle_cs ); + EnterCriticalSection( &mscms_handle_cs ); index = (DWORD_PTR)handle - 1; if (index > num_transform_handles) { - LeaveCriticalSection( &MSCMS_handle_cs ); + LeaveCriticalSection( &mscms_handle_cs ); return NULL; } return &transformtable[index]; @@ -101,7 +101,7 @@ void release_transform( struct transform *transform ) { - LeaveCriticalSection( &MSCMS_handle_cs ); + LeaveCriticalSection( &mscms_handle_cs ); } static HPROFILE alloc_profile_handle( void ) @@ -112,7 +112,7 @@ for (index = 0; index < num_profile_handles; index++) { - if (!profiletable[index].iccprofile) return (HPROFILE)(index + 1); + if (!profiletable[index].data) return (HPROFILE)(index + 1); } if (!profiletable) { @@ -135,14 +135,14 @@ { HPROFILE handle; - EnterCriticalSection( &MSCMS_handle_cs ); + EnterCriticalSection( &mscms_handle_cs ); if ((handle = alloc_profile_handle())) { DWORD_PTR index = (DWORD_PTR)handle - 1; - memcpy( &profiletable[index], profile, sizeof(struct profile) ); - } - LeaveCriticalSection( &MSCMS_handle_cs ); + profiletable[index] = *profile; + } + LeaveCriticalSection( &mscms_handle_cs ); return handle; } @@ -151,12 +151,12 @@ DWORD_PTR index; struct profile *profile; - EnterCriticalSection( &MSCMS_handle_cs ); + EnterCriticalSection( &mscms_handle_cs ); index = (DWORD_PTR)handle - 1; if (index > num_profile_handles) { - LeaveCriticalSection( &MSCMS_handle_cs ); + LeaveCriticalSection( &mscms_handle_cs ); return FALSE; } profile = &profiletable[index]; @@ -165,11 +165,11 @@ { if (profile->access & PROFILE_READWRITE) { - DWORD written, size = MSCMS_get_profile_size( profile->iccprofile ); + DWORD written; if (SetFilePointer( profile->file, 0, NULL, FILE_BEGIN ) || - !WriteFile( profile->file, profile->iccprofile, size, &written, NULL ) || - written != size) + !WriteFile( profile->file, profile->data, profile->size, &written, NULL ) || + written != profile->size) { ERR( "Unable to write color profile\n" ); } @@ -177,11 +177,11 @@ CloseHandle( profile->file ); } cmsCloseProfile( profile->cmsprofile ); - HeapFree( GetProcessHeap(), 0, profile->iccprofile ); + HeapFree( GetProcessHeap(), 0, profile->data ); memset( profile, 0, sizeof(struct profile) ); - LeaveCriticalSection( &MSCMS_handle_cs ); + LeaveCriticalSection( &mscms_handle_cs ); return TRUE; } @@ -216,14 +216,14 @@ { HTRANSFORM handle; - EnterCriticalSection( &MSCMS_handle_cs ); + EnterCriticalSection( &mscms_handle_cs ); if ((handle = alloc_transform_handle())) { DWORD_PTR index = (DWORD_PTR)handle - 1; - memcpy( &transformtable[index], transform, sizeof(struct transform) ); - } - LeaveCriticalSection( &MSCMS_handle_cs ); + transformtable[index] = *transform; + } + LeaveCriticalSection( &mscms_handle_cs ); return handle; } @@ -232,12 +232,12 @@ DWORD_PTR index; struct transform *transform; - EnterCriticalSection( &MSCMS_handle_cs ); + EnterCriticalSection( &mscms_handle_cs ); index = (DWORD_PTR)handle - 1; if (index > num_transform_handles) { - LeaveCriticalSection( &MSCMS_handle_cs ); + LeaveCriticalSection( &mscms_handle_cs ); return FALSE; } transform = &transformtable[index]; @@ -245,8 +245,8 @@ cmsDeleteTransform( transform->cmstransform ); memset( transform, 0, sizeof(struct transform) ); - LeaveCriticalSection( &MSCMS_handle_cs ); + LeaveCriticalSection( &mscms_handle_cs ); return TRUE; } -#endif /* HAVE_LCMS */ +#endif /* HAVE_LCMS2 */ Modified: trunk/reactos/dll/win32/mscms/icc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mscms/icc.c?rev=…
============================================================================== --- trunk/reactos/dll/win32/mscms/icc.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mscms/icc.c [iso-8859-1] Sat Sep 21 20:43:42 2013 @@ -31,75 +31,90 @@ //#include "mscms_priv.h" -#ifdef HAVE_LCMS +#ifdef HAVE_LCMS2 -static inline void MSCMS_adjust_endianness32( ULONG *ptr ) +static inline void adjust_endianness32( ULONG *ptr ) { #ifndef WORDS_BIGENDIAN *ptr = RtlUlongByteSwap(*ptr); #endif } -void MSCMS_get_profile_header( const icProfile *iccprofile, PROFILEHEADER *header ) +void get_profile_header( const struct profile *profile, PROFILEHEADER *header ) { unsigned int i; - memcpy( header, iccprofile, sizeof(PROFILEHEADER) ); + memcpy( header, profile->data, sizeof(PROFILEHEADER) ); /* ICC format is big-endian, swap bytes if necessary */ for (i = 0; i < sizeof(PROFILEHEADER) / sizeof(ULONG); i++) - MSCMS_adjust_endianness32( (ULONG *)header + i ); + adjust_endianness32( (ULONG *)header + i ); } -void MSCMS_set_profile_header( icProfile *iccprofile, const PROFILEHEADER *header ) +void set_profile_header( const struct profile *profile, const PROFILEHEADER *header ) { unsigned int i; - icHeader *iccheader = (icHeader *)iccprofile; - memcpy( iccheader, header, sizeof(icHeader) ); + memcpy( profile->data, header, sizeof(PROFILEHEADER) ); /* ICC format is big-endian, swap bytes if necessary */ - for (i = 0; i < sizeof(icHeader) / sizeof(ULONG); i++) - MSCMS_adjust_endianness32( (ULONG *)iccheader + i ); + for (i = 0; i < sizeof(PROFILEHEADER) / sizeof(ULONG); i++) + adjust_endianness32( (ULONG *)profile->data + i ); } -DWORD MSCMS_get_tag_count( const icProfile *iccprofile ) +static BOOL get_adjusted_tag( const struct profile *profile, TAGTYPE type, cmsTagEntry *tag ) { - ULONG count = iccprofile->count; + DWORD i, num_tags = *(DWORD *)(profile->data + sizeof(cmsICCHeader)); + cmsTagEntry *entry; + ULONG sig; - MSCMS_adjust_endianness32( &count ); - return count; + adjust_endianness32( &num_tags ); + for (i = 0; i < num_tags; i++) + { + entry = (cmsTagEntry *)(profile->data + sizeof(cmsICCHeader) + sizeof(DWORD) + i * sizeof(*tag)); + sig = entry->sig; + adjust_endianness32( &sig ); + if (sig == type) + { + tag->sig = sig; + tag->offset = entry->offset; + tag->size = entry->size; + adjust_endianness32( &tag->offset ); + adjust_endianness32( &tag->size ); + return TRUE; + } + } + return FALSE; } -void MSCMS_get_tag_by_index( icProfile *iccprofile, DWORD index, icTag *tag ) +BOOL get_tag_data( const struct profile *profile, TAGTYPE type, DWORD offset, void *buffer, DWORD *len ) { - icTag *tmp = (icTag *)((char *)iccprofile->data + index * sizeof(icTag)); + cmsTagEntry tag; - tag->sig = tmp->sig; - tag->offset = tmp->offset; - tag->size = tmp->size; + if (!get_adjusted_tag( profile, type, &tag )) return FALSE; - MSCMS_adjust_endianness32( &tag->sig ); - MSCMS_adjust_endianness32( &tag->offset ); - MSCMS_adjust_endianness32( &tag->size ); + if (!buffer) offset = 0; + if (offset > tag.size) return FALSE; + if (*len < tag.size - offset || !buffer) + { + *len = tag.size - offset; + return FALSE; + } + memcpy( buffer, profile->data + tag.offset + offset, tag.size - offset ); + *len = tag.size - offset; + return TRUE; } -void MSCMS_get_tag_data( const icProfile *iccprofile, const icTag *tag, DWORD offset, void *buffer ) +BOOL set_tag_data( const struct profile *profile, TAGTYPE type, DWORD offset, const void *buffer, DWORD *len ) { - memcpy( buffer, (const char *)iccprofile + tag->offset + offset, tag->size - offset ); + cmsTagEntry tag; + + if (!get_adjusted_tag( profile, type, &tag )) return FALSE; + + if (offset > tag.size) return FALSE; + *len = min( tag.size - offset, *len ); + memcpy( profile->data + tag.offset + offset, buffer, *len ); + return TRUE; } -void MSCMS_set_tag_data( icProfile *iccprofile, const icTag *tag, DWORD offset, const void *buffer ) -{ - memcpy( (char *)iccprofile + tag->offset + offset, buffer, tag->size - offset ); -} - -DWORD MSCMS_get_profile_size( const icProfile *iccprofile ) -{ - DWORD size = ((const icHeader *)iccprofile)->size; - - MSCMS_adjust_endianness32( &size ); - return size; -} - -#endif /* HAVE_LCMS */ +#endif /* HAVE_LCMS2 */ Modified: trunk/reactos/dll/win32/mscms/mscms_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mscms/mscms_main…
============================================================================== --- trunk/reactos/dll/win32/mscms/mscms_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mscms/mscms_main.c [iso-8859-1] Sat Sep 21 20:43:42 2013 @@ -36,20 +36,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(mscms); -#ifdef HAVE_LCMS -static int lcms_error_handler( int error, const char *text ) +#ifdef HAVE_LCMS2 +static void lcms_error_handler(cmsContext ctx, cmsUInt32Number error, const char *text) { - switch (error) - { - case LCMS_ERRC_WARNING: - case LCMS_ERRC_RECOVERABLE: - case LCMS_ERRC_ABORTED: - WARN("%d %s\n", error, debugstr_a(text)); - return 1; - default: - ERR("unknown error %d %s\n", error, debugstr_a(text)); - return 0; - } + TRACE("%u %s\n", error, debugstr_a(text)); } #endif @@ -61,12 +51,13 @@ { case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls( hinst ); -#ifdef HAVE_LCMS - cmsSetErrorHandler( lcms_error_handler ); +#ifdef HAVE_LCMS2 + cmsSetLogErrorHandler( lcms_error_handler ); #endif break; case DLL_PROCESS_DETACH: -#ifdef HAVE_LCMS + if (reserved) break; +#ifdef HAVE_LCMS2 free_handle_tables(); #endif break; Modified: trunk/reactos/dll/win32/mscms/mscms_priv.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mscms/mscms_priv…
============================================================================== --- trunk/reactos/dll/win32/mscms/mscms_priv.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mscms/mscms_priv.h [iso-8859-1] Sat Sep 21 20:43:42 2013 @@ -18,54 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifdef HAVE_LCMS - -/* These basic Windows types are defined in lcms.h when compiling on - * a non-Windows platform (why?), so they would normally not conflict - * with anything included earlier. But since we are building Wine they - * most certainly will have been defined before we include lcms.h. - * The preprocessor comes to the rescue. - */ - -#define BYTE LCMS_BYTE -#define LPBYTE LCMS_LPBYTE -#define WORD LCMS_WORD -#define LPWORD LCMS_LPWORD -#define DWORD LCMS_DWORD -#define LPDWORD LCMS_LPDWORD -#define BOOL LCMS_BOOL -#define LPSTR LCMS_LPSTR -#define LPVOID LCMS_LPVOID - -#undef cdecl -#undef FAR - -#undef ZeroMemory -#undef CopyMemory - -#undef LOWORD -#undef HIWORD -#undef MAX_PATH - -#ifdef HAVE_LCMS_LCMS_H -#include <lcms/lcms.h> -#else -#include <lcms.h> -#endif - -/* Funny thing is lcms.h defines DWORD as an 'unsigned long' whereas Wine - * defines it as an 'unsigned int'. To avoid compiler warnings we use a - * preprocessor define for DWORD and LPDWORD to get back Wine's original - * (typedef) definitions. - */ - -#undef BOOL -#undef DWORD -#undef LPDWORD - -#define BOOL BOOL -#define DWORD DWORD -#define LPDWORD LPDWORD +#ifdef HAVE_LCMS2 +#include <lcms2.h> /* A simple structure to tie together a pointer to an icc profile, an lcms * color profile handle and a Windows file handle. If the profile is memory @@ -76,9 +30,10 @@ struct profile { - HANDLE file; - DWORD access; - icProfile *iccprofile; + HANDLE file; + DWORD access; + char *data; + DWORD size; cmsHPROFILE cmsprofile; }; @@ -101,14 +56,11 @@ extern void free_handle_tables( void ) DECLSPEC_HIDDEN; -extern DWORD MSCMS_get_tag_count( const icProfile *iccprofile ) DECLSPEC_HIDDEN; -extern void MSCMS_get_tag_by_index( icProfile *iccprofile, DWORD index, icTag *tag ) DECLSPEC_HIDDEN; -extern void MSCMS_get_tag_data( const icProfile *iccprofile, const icTag *tag, DWORD offset, void *buffer ) DECLSPEC_HIDDEN; -extern void MSCMS_set_tag_data( icProfile *iccprofile, const icTag *tag, DWORD offset, const void *buffer ) DECLSPEC_HIDDEN; -extern void MSCMS_get_profile_header( const icProfile *iccprofile, PROFILEHEADER *header ) DECLSPEC_HIDDEN; -extern void MSCMS_set_profile_header( icProfile *iccprofile, const PROFILEHEADER *header ) DECLSPEC_HIDDEN; -extern DWORD MSCMS_get_profile_size( const icProfile *iccprofile ) DECLSPEC_HIDDEN; +extern BOOL get_tag_data( const struct profile *, TAGTYPE, DWORD, void *, DWORD * ) DECLSPEC_HIDDEN; +extern BOOL set_tag_data( const struct profile *, TAGTYPE, DWORD, const void *, DWORD * ) DECLSPEC_HIDDEN; +extern void get_profile_header( const struct profile *, PROFILEHEADER * ) DECLSPEC_HIDDEN; +extern void set_profile_header( const struct profile *, const PROFILEHEADER * ) DECLSPEC_HIDDEN; -#endif /* HAVE_LCMS */ +#endif /* HAVE_LCMS2 */ -extern const char *MSCMS_dbgstr_tag(DWORD) DECLSPEC_HIDDEN; +extern const char *dbgstr_tag(DWORD) DECLSPEC_HIDDEN; Modified: trunk/reactos/dll/win32/mscms/profile.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mscms/profile.c?…
============================================================================== --- trunk/reactos/dll/win32/mscms/profile.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mscms/profile.c [iso-8859-1] Sat Sep 21 20:43:42 2013 @@ -37,17 +37,15 @@ //#include "mscms_priv.h" -#define IS_SEPARATOR(ch) ((ch) == '\\' || (ch) == '/') - -static void MSCMS_basename( LPCWSTR path, LPWSTR name ) +static void basename( LPCWSTR path, LPWSTR name ) { INT i = lstrlenW( path ); - while (i > 0 && !IS_SEPARATOR(path[i - 1])) i--; + while (i > 0 && path[i - 1] != '\\' && path[i - 1] != '/') i--; lstrcpyW( name, &path[i] ); } -static inline LPWSTR MSCMS_strdupW( LPCSTR str ) +static inline LPWSTR strdupW( LPCSTR str ) { LPWSTR ret = NULL; if (str) @@ -59,7 +57,7 @@ return ret; } -const char *MSCMS_dbgstr_tag( DWORD tag ) +const char *dbgstr_tag( DWORD tag ) { return wine_dbg_sprintf( "'%c%c%c%c'", (char)(tag >> 24), (char)(tag >> 16), (char)(tag >> 8), (char)(tag) ); @@ -138,7 +136,7 @@ } RegCreateKeyExW( HKEY_LOCAL_MACHINE, icmW, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &icm_key, NULL ); - MSCMS_basename( file, basenameW ); + basename( file, basenameW ); sprintfW( classW, fmtW, (header.phClass >> 24) & 0xff, (header.phClass >> 16) & 0xff, (header.phClass >> 8) & 0xff, header.phClass & 0xff ); @@ -339,10 +337,8 @@ PVOID buffer, PBOOL ref ) { BOOL ret = FALSE; -#ifdef HAVE_LCMS +#ifdef HAVE_LCMS2 struct profile *profile = grab_profile( handle ); - DWORD i, count; - icTag tag; TRACE( "( %p, 0x%08x, %d, %p, %p, %p )\n", handle, type, offset, size, buffer, ref ); @@ -353,30 +349,17 @@ release_profile( profile ); return FALSE; } - count = MSCMS_get_tag_count( profile->iccprofile ); - - for (i = 0; i < count; i++) - { - MSCMS_get_tag_by_index( profile->iccprofile, i, &tag ); - - if (tag.sig == type) - { - if ((tag.size - offset) > *size || !buffer) - { - *size = (tag.size - offset); - release_profile( profile ); - return FALSE; - } - MSCMS_get_tag_data( profile->iccprofile, &tag, offset, buffer ); - - *ref = FALSE; /* FIXME: calculate properly */ - release_profile( profile ); - return TRUE; - } - } + if (!get_tag_data( profile, type, offset, buffer, size )) + { + release_profile( profile ); + return FALSE; + } + ret = get_tag_data( profile, type, offset, buffer, size ); + *ref = cmsTagLinkedTo( profile->cmsprofile, type ) != 0; release_profile( profile ); - -#endif /* HAVE_LCMS */ + return ret; + +#endif /* HAVE_LCMS2 */ return ret; } @@ -401,10 +384,10 @@ BOOL WINAPI GetColorProfileElementTag( HPROFILE handle, DWORD index, PTAGTYPE type ) { BOOL ret = FALSE; -#ifdef HAVE_LCMS +#ifdef HAVE_LCMS2 struct profile *profile = grab_profile( handle ); - DWORD count; - icTag tag; + cmsInt32Number num_tags; + cmsTagSignature sig; TRACE( "( %p, %d, %p )\n", handle, index, type ); @@ -415,19 +398,20 @@ release_profile( profile ); return FALSE; } - count = MSCMS_get_tag_count( profile->iccprofile ); - if (index > count || index < 1) + num_tags = cmsGetTagCount( profile->cmsprofile ); + if (num_tags < 0 || index > num_tags || index < 1) { release_profile( profile ); return FALSE; } - MSCMS_get_tag_by_index( profile->iccprofile, index - 1, &tag ); - *type = tag.sig; - + if ((sig = cmsGetTagSignature( profile->cmsprofile, index - 1 ))) + { + *type = sig; + ret = TRUE; + } release_profile( profile ); - ret = TRUE; - -#endif /* HAVE_LCMS */ + +#endif /* HAVE_LCMS2 */ return ret; } @@ -452,7 +436,7 @@ BOOL WINAPI GetColorProfileFromHandle( HPROFILE handle, PBYTE buffer, PDWORD size ) { BOOL ret = FALSE; -#ifdef HAVE_LCMS +#ifdef HAVE_LCMS2 struct profile *profile = grab_profile( handle ); PROFILEHEADER header; @@ -465,7 +449,7 @@ release_profile( profile ); return FALSE; } - MSCMS_get_profile_header( profile->iccprofile, &header ); + get_profile_header( profile, &header ); if (!buffer || header.phSize > *size) { @@ -475,13 +459,13 @@ } /* No endian conversion needed */ - memcpy( buffer, profile->iccprofile, header.phSize ); - *size = header.phSize; + memcpy( buffer, profile->data, profile->size ); + *size = profile->size; release_profile( profile ); ret = TRUE; -#endif /* HAVE_LCMS */ +#endif /* HAVE_LCMS2 */ return ret; } @@ -503,7 +487,7 @@ */ BOOL WINAPI GetColorProfileHeader( HPROFILE handle, PPROFILEHEADER header ) { -#ifdef HAVE_LCMS +#ifdef HAVE_LCMS2 struct profile *profile = grab_profile( handle ); TRACE( "( %p, %p )\n", handle, header ); @@ -515,14 +499,13 @@ release_profile( profile ); return FALSE; } - MSCMS_get_profile_header( profile->iccprofile, header ); - + get_profile_header( profile, header ); release_profile( profile ); return TRUE; #else return FALSE; -#endif /* HAVE_LCMS */ +#endif /* HAVE_LCMS2 */ } /****************************************************************************** @@ -542,8 +525,9 @@ BOOL WINAPI GetCountColorProfileElements( HPROFILE handle, PDWORD count ) { BOOL ret = FALSE; -#ifdef HAVE_LCMS +#ifdef HAVE_LCMS2 struct profile *profile = grab_profile( handle ); + cmsInt32Number num_tags; TRACE( "( %p, %p )\n", handle, count ); @@ -554,12 +538,14 @@ release_profile( profile ); return FALSE; } - *count = MSCMS_get_tag_count( profile->iccprofile ); - + if ((num_tags = cmsGetTagCount( profile->cmsprofile )) >= 0) + { + *count = num_tags; + ret = TRUE; + } release_profile( profile ); - ret = TRUE; - -#endif /* HAVE_LCMS */ + +#endif /* HAVE_LCMS2 */ return ret; } @@ -684,7 +670,7 @@ return TRUE; } -static BOOL MSCMS_header_from_file( LPCWSTR file, PPROFILEHEADER header ) +static BOOL header_from_file( LPCWSTR file, PPROFILEHEADER header ) { BOOL ret; PROFILE profile; @@ -726,7 +712,7 @@ return ret; } -static BOOL MSCMS_match_profile( PENUMTYPEW rec, PPROFILEHEADER hdr ) +static BOOL match_profile( PENUMTYPEW rec, PPROFILEHEADER hdr ) { if (rec->dwFields & ET_DEVICENAME) { @@ -747,36 +733,36 @@ } if (rec->dwFields & ET_DEVICECLASS) { - FIXME( "ET_DEVICECLASS: %s\n", MSCMS_dbgstr_tag(rec->dwMediaType) ); + FIXME( "ET_DEVICECLASS: %s\n", dbgstr_tag(rec->dwMediaType) ); } if (rec->dwFields & ET_CMMTYPE) { - TRACE( "ET_CMMTYPE: %s\n", MSCMS_dbgstr_tag(rec->dwCMMType) ); + TRACE( "ET_CMMTYPE: %s\n", dbgstr_tag(rec->dwCMMType) ); if (rec->dwCMMType != hdr->phCMMType) return FALSE; } if (rec->dwFields & ET_CLASS) { - TRACE( "ET_CLASS: %s\n", MSCMS_dbgstr_tag(rec->dwClass) ); + TRACE( "ET_CLASS: %s\n", dbgstr_tag(rec->dwClass) ); if (rec->dwClass != hdr->phClass) return FALSE; } if (rec->dwFields & ET_DATACOLORSPACE) { - TRACE( "ET_DATACOLORSPACE: %s\n", MSCMS_dbgstr_tag(rec->dwDataColorSpace) ); + TRACE( "ET_DATACOLORSPACE: %s\n", dbgstr_tag(rec->dwDataColorSpace) ); if (rec->dwDataColorSpace != hdr->phDataColorSpace) return FALSE; } if (rec->dwFields & ET_CONNECTIONSPACE) { - TRACE( "ET_CONNECTIONSPACE: %s\n", MSCMS_dbgstr_tag(rec->dwConnectionSpace) ); + TRACE( "ET_CONNECTIONSPACE: %s\n", dbgstr_tag(rec->dwConnectionSpace) ); if (rec->dwConnectionSpace != hdr->phConnectionSpace) return FALSE; } if (rec->dwFields & ET_SIGNATURE) { - TRACE( "ET_SIGNATURE: %s\n", MSCMS_dbgstr_tag(rec->dwSignature) ); + TRACE( "ET_SIGNATURE: %s\n", dbgstr_tag(rec->dwSignature) ); if (rec->dwSignature != hdr->phSignature) return FALSE; } if (rec->dwFields & ET_PLATFORM) { - TRACE( "ET_PLATFORM: %s\n", MSCMS_dbgstr_tag(rec->dwPlatform) ); + TRACE( "ET_PLATFORM: %s\n", dbgstr_tag(rec->dwPlatform) ); if (rec->dwPlatform != hdr->phPlatform) return FALSE; } if (rec->dwFields & ET_PROFILEFLAGS) @@ -786,12 +772,12 @@ } if (rec->dwFields & ET_MANUFACTURER) { - TRACE( "ET_MANUFACTURER: %s\n", MSCMS_dbgstr_tag(rec->dwManufacturer) ); + TRACE( "ET_MANUFACTURER: %s\n", dbgstr_tag(rec->dwManufacturer) ); if (rec->dwManufacturer != hdr->phManufacturer) return FALSE; } if (rec->dwFields & ET_MODEL) { - TRACE( "ET_MODEL: %s\n", MSCMS_dbgstr_tag(rec->dwModel) ); + TRACE( "ET_MODEL: %s\n", dbgstr_tag(rec->dwModel) ); if (rec->dwModel != hdr->phModel) return FALSE; } if (rec->dwFields & ET_ATTRIBUTES) @@ -808,7 +794,7 @@ } if (rec->dwFields & ET_CREATOR) { - TRACE( "ET_CREATOR: %s\n", MSCMS_dbgstr_tag(rec->dwCreator) ); + TRACE( "ET_CREATOR: %s\n", dbgstr_tag(rec->dwCreator) ); if (rec->dwCreator != hdr->phCreator) return FALSE; } return TRUE; @@ -857,17 +843,17 @@ memcpy( &recordW, record, sizeof(ENUMTYPEA) ); if (record->pDeviceName) { - deviceW = MSCMS_strdupW( record->pDeviceName ); + deviceW = strdupW( record->pDeviceName ); if (!(recordW.pDeviceName = deviceW)) goto exit; } - fileW = MSCMS_strdupW( data.cFileName ); + fileW = strdupW( data.cFileName ); if (!fileW) goto exit; - ret = MSCMS_header_from_file( fileW, &header ); + ret = header_from_file( fileW, &header ); if (ret) { - match = MSCMS_match_profile( &recordW, &header ); + match = match_profile( &recordW, &header ); if (match) { len = sizeof(char) * (lstrlenA( data.cFileName ) + 1); @@ -888,17 +874,17 @@ while (FindNextFileA( find, &data )) { - fileW = MSCMS_strdupW( data.cFileName ); + fileW = strdupW( data.cFileName ); if (!fileW) goto exit; - ret = MSCMS_header_from_file( fileW, &header ); + ret = header_from_file( fileW, &header ); if (!ret) { HeapFree( GetProcessHeap(), 0, fileW ); continue; } - match = MSCMS_match_profile( &recordW, &header ); + match = match_profile( &recordW, &header ); if (match) { char **tmp = HeapReAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, @@ -1001,10 +987,10 @@ profiles = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WCHAR *) + 1 ); if (!profiles) goto exit; - ret = MSCMS_header_from_file( data.cFileName, &header ); + ret = header_from_file( data.cFileName, &header ); if (ret) { - match = MSCMS_match_profile( record, &header ); + match = match_profile( record, &header ); if (match) { len = sizeof(WCHAR) * (lstrlenW( data.cFileName ) + 1); @@ -1023,10 +1009,10 @@ while (FindNextFileW( find, &data )) { - ret = MSCMS_header_from_file( data.cFileName, &header ); + ret = header_from_file( data.cFileName, &header ); if (!ret) continue; - match = MSCMS_match_profile( record, &header ); + match = match_profile( record, &header ); if (match) { WCHAR **tmp = HeapReAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, @@ -1129,7 +1115,7 @@ if (!GetColorDirectoryW( machine, dest, &size )) return FALSE; - MSCMS_basename( profile, base ); + basename( profile, base ); lstrcatW( dest, slash ); lstrcatW( dest, base ); @@ -1158,10 +1144,8 @@ BOOL WINAPI IsColorProfileTagPresent( HPROFILE handle, TAGTYPE type, PBOOL present ) { BOOL ret = FALSE; -#ifdef HAVE_LCMS +#ifdef HAVE_LCMS2 struct profile *profile = grab_profile( handle ); - DWORD i, count; - icTag tag; TRACE( "( %p, 0x%08x, %p )\n", handle, type, present ); @@ -1172,21 +1156,11 @@ release_profile( profile ); return FALSE; } - count = MSCMS_get_tag_count( profile->iccprofile ); - - for (i = 0; i < count; i++) - { - MSCMS_get_tag_by_index( profile->iccprofile, i, &tag ); - - if (tag.sig == type) - { - *present = ret = TRUE; - break; - } - } + *present = cmsIsTag( profile->cmsprofile, type ); release_profile( profile ); - -#endif /* HAVE_LCMS */ + ret = TRUE; + +#endif /* HAVE_LCMS2 */ return ret; } @@ -1207,7 +1181,7 @@ BOOL WINAPI IsColorProfileValid( HPROFILE handle, PBOOL valid ) { BOOL ret = FALSE; -#ifdef HAVE_LCMS +#ifdef HAVE_LCMS2 struct profile *profile = grab_profile( handle ); TRACE( "( %p, %p )\n", handle, valid ); @@ -1219,10 +1193,10 @@ release_profile( profile ); return FALSE; } - if (profile->iccprofile) ret = *valid = TRUE; + if (profile->data) ret = *valid = TRUE; release_profile( profile ); -#endif /* HAVE_LCMS */ +#endif /* HAVE_LCMS2 */ return ret; } @@ -1247,10 +1221,8 @@ PVOID buffer ) { BOOL ret = FALSE; -#ifdef HAVE_LCMS +#ifdef HAVE_LCMS2 struct profile *profile = grab_profile( handle ); - DWORD i, count; - icTag tag; TRACE( "( %p, 0x%08x, %d, %p, %p )\n", handle, type, offset, size, buffer ); @@ -1261,28 +1233,11 @@ release_profile( profile ); return FALSE; } - count = MSCMS_get_tag_count( profile->iccprofile ); - - for (i = 0; i < count; i++) - { - MSCMS_get_tag_by_index( profile->iccprofile, i, &tag ); - - if (tag.sig == type) - { - if (offset > tag.size) - { - release_profile( profile ); - return FALSE; - } - MSCMS_set_tag_data( profile->iccprofile, &tag, offset, buffer ); - - release_profile( profile ); - return TRUE; - } - } + ret = set_tag_data( profile, type, offset, buffer, size ); release_profile( profile ); - -#endif /* HAVE_LCMS */ + return ret; + +#endif /* HAVE_LCMS2 */ return ret; } @@ -1301,7 +1256,7 @@ */ BOOL WINAPI SetColorProfileHeader( HPROFILE handle, PPROFILEHEADER header ) { -#ifdef HAVE_LCMS +#ifdef HAVE_LCMS2 struct profile *profile = grab_profile( handle ); TRACE( "( %p, %p )\n", handle, header ); @@ -1313,14 +1268,13 @@ release_profile( profile ); return FALSE; } - MSCMS_set_profile_header( profile->iccprofile, header ); - + set_profile_header( profile, header ); release_profile( profile ); return TRUE; #else return FALSE; -#endif /* HAVE_LCMS */ +#endif /* HAVE_LCMS2 */ } /****************************************************************************** @@ -1441,10 +1395,11 @@ */ HPROFILE WINAPI OpenColorProfileW( PPROFILE profile, DWORD access, DWORD sharing, DWORD creation ) { -#ifdef HAVE_LCMS +#ifdef HAVE_LCMS2 cmsHPROFILE cmsprofile = NULL; - icProfile *iccprofile = NULL; + char *data = NULL; HANDLE handle = INVALID_HANDLE_VALUE; + DWORD size; TRACE( "( %p, 0x%08x, 0x%08x, 0x%08x )\n", profile, access, sharing, creation ); @@ -1454,14 +1409,15 @@ { /* FIXME: access flags not implemented for memory based profiles */ - if (!(iccprofile = HeapAlloc( GetProcessHeap(), 0, profile->cbDataSize ))) return NULL; - memcpy( iccprofile, profile->pProfileData, profile->cbDataSize ); - - cmsprofile = cmsOpenProfileFromMem( iccprofile, profile->cbDataSize ); + if (!(data = HeapAlloc( GetProcessHeap(), 0, profile->cbDataSize ))) return NULL; + memcpy( data, profile->pProfileData, profile->cbDataSize ); + + cmsprofile = cmsOpenProfileFromMem( data, profile->cbDataSize ); + size = profile->cbDataSize; } else if (profile->dwType == PROFILE_FILENAME) { - DWORD size, read, flags = 0; + DWORD read, flags = 0; TRACE( "profile file: %s\n", debugstr_w( profile->pProfileData ) ); @@ -1494,32 +1450,27 @@ WARN( "Unable to open color profile %u\n", GetLastError() ); return NULL; } - if ((size = GetFileSize( handle, NULL )) == INVALID_FILE_SIZE) { ERR( "Unable to retrieve size of color profile\n" ); CloseHandle( handle ); return NULL; } - - iccprofile = HeapAlloc( GetProcessHeap(), 0, size ); - if (!iccprofile) + if (!(data = HeapAlloc( GetProcessHeap(), 0, size ))) { ERR( "Unable to allocate memory for color profile\n" ); CloseHandle( handle ); return NULL; } - - if (!ReadFile( handle, iccprofile, size, &read, NULL ) || read != size) + if (!ReadFile( handle, data, size, &read, NULL ) || read != size) { ERR( "Unable to read color profile\n" ); CloseHandle( handle ); - HeapFree( GetProcessHeap(), 0, iccprofile ); + HeapFree( GetProcessHeap(), 0, data ); return NULL; } - - cmsprofile = cmsOpenProfileFromMem( iccprofile, size ); + cmsprofile = cmsOpenProfileFromMem( data, size ); } else { @@ -1530,16 +1481,21 @@ if (cmsprofile) { struct profile profile; - - profile.file = handle; - profile.access = access; - profile.iccprofile = iccprofile; + HPROFILE hprof; + + profile.file = handle; + profile.access = access; + profile.data = data; + profile.size = size; profile.cmsprofile = cmsprofile; - return create_profile( &profile ); - } - -#endif /* HAVE_LCMS */ + if ((hprof = create_profile( &profile ))) return hprof; + HeapFree( GetProcessHeap(), 0, data ); + cmsCloseProfile( cmsprofile ); + } + CloseHandle( handle ); + +#endif /* HAVE_LCMS2 */ return NULL; } @@ -1558,11 +1514,11 @@ BOOL WINAPI CloseColorProfile( HPROFILE profile ) { BOOL ret = FALSE; -#ifdef HAVE_LCMS +#ifdef HAVE_LCMS2 TRACE( "( %p )\n", profile ); ret = close_profile( profile ); -#endif /* HAVE_LCMS */ - return ret; -} +#endif /* HAVE_LCMS2 */ + return ret; +} Modified: trunk/reactos/dll/win32/mscms/stub.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mscms/stub.c?rev…
============================================================================== --- trunk/reactos/dll/win32/mscms/stub.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mscms/stub.c [iso-8859-1] Sat Sep 21 20:43:42 2013 @@ -139,21 +139,21 @@ BOOL WINAPI RegisterCMMA( PCSTR machine, DWORD id, PCSTR dll ) { - FIXME( "( %p, %s, %p ) stub\n", machine, MSCMS_dbgstr_tag(id), dll ); + FIXME( "( %p, %s, %p ) stub\n", machine, dbgstr_tag(id), dll ); return TRUE; } BOOL WINAPI RegisterCMMW( PCWSTR machine, DWORD id, PCWSTR dll ) { - FIXME( "( %p, %s, %p ) stub\n", machine, MSCMS_dbgstr_tag(id), dll ); + FIXME( "( %p, %s, %p ) stub\n", machine, dbgstr_tag(id), dll ); return TRUE; } BOOL WINAPI SelectCMM( DWORD id ) { - FIXME( "(%s) stub\n", MSCMS_dbgstr_tag(id) ); + FIXME( "(%s) stub\n", dbgstr_tag(id) ); return TRUE; } @@ -192,14 +192,14 @@ BOOL WINAPI UnregisterCMMA( PCSTR machine, DWORD id ) { - FIXME( "( %p, %s ) stub\n", machine, MSCMS_dbgstr_tag(id) ); + FIXME( "( %p, %s ) stub\n", machine, dbgstr_tag(id) ); return TRUE; } BOOL WINAPI UnregisterCMMW( PCWSTR machine, DWORD id ) { - FIXME( "( %p, %s ) stub\n", machine, MSCMS_dbgstr_tag(id) ); - - return TRUE; -} + FIXME( "( %p, %s ) stub\n", machine, dbgstr_tag(id) ); + + return TRUE; +} Modified: trunk/reactos/dll/win32/mscms/transform.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mscms/transform.…
============================================================================== --- trunk/reactos/dll/win32/mscms/transform.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mscms/transform.c [iso-8859-1] Sat Sep 21 20:43:42 2013 @@ -36,14 +36,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(mscms); -#ifdef HAVE_LCMS +#ifdef HAVE_LCMS2 static DWORD from_profile( HPROFILE profile ) { PROFILEHEADER header; GetColorProfileHeader( profile, &header ); - TRACE( "color space: 0x%08x %s\n", header.phDataColorSpace, MSCMS_dbgstr_tag( header.phDataColorSpace ) ); + TRACE( "color space: 0x%08x %s\n", header.phDataColorSpace, dbgstr_tag( header.phDataColorSpace ) ); switch (header.phDataColorSpace) { @@ -68,6 +68,8 @@ case BM_RGBTRIPLETS: return TYPE_RGB_8; case BM_BGRTRIPLETS: return TYPE_BGR_8; case BM_GRAY: return TYPE_GRAY_8; + case BM_xRGBQUADS: return TYPE_ARGB_8; + case BM_xBGRQUADS: return TYPE_ABGR_8; default: if (quietfixme == 0) { @@ -96,7 +98,7 @@ } } -#endif /* HAVE_LCMS */ +#endif /* HAVE_LCMS2 */ /****************************************************************************** * CreateColorTransformA [MSCMS.@] @@ -141,7 +143,7 @@ HPROFILE target, DWORD flags ) { HTRANSFORM ret = NULL; -#ifdef HAVE_LCMS +#ifdef HAVE_LCMS2 struct transform transform; struct profile *dst, *tgt = NULL; cmsHPROFILE cmsinput, cmsoutput, cmstarget = NULL; @@ -160,7 +162,7 @@ intent = space->lcsIntent > 3 ? INTENT_PERCEPTUAL : space->lcsIntent; TRACE( "lcsIntent: %x\n", space->lcsIntent ); - TRACE( "lcsCSType: %s\n", MSCMS_dbgstr_tag( space->lcsCSType ) ); + TRACE( "lcsCSType: %s\n", dbgstr_tag( space->lcsCSType ) ); TRACE( "lcsFilename: %s\n", debugstr_w( space->lcsFilename ) ); in_format = TYPE_RGB_16; @@ -181,7 +183,7 @@ if (tgt) release_profile( tgt ); release_profile( dst ); -#endif /* HAVE_LCMS */ +#endif /* HAVE_LCMS2 */ return ret; } @@ -205,7 +207,7 @@ PDWORD intents, DWORD nintents, DWORD flags, DWORD cmm ) { HTRANSFORM ret = NULL; -#ifdef HAVE_LCMS +#ifdef HAVE_LCMS2 cmsHPROFILE *cmsprofiles, cmsconvert = NULL; struct transform transform; struct profile *profile0, *profile1; @@ -237,7 +239,7 @@ { /* insert a conversion profile for pairings that lcms doesn't handle */ if (out_format == TYPE_RGB_16) cmsconvert = cmsCreate_sRGBProfile(); - if (out_format == TYPE_Lab_16) cmsconvert = cmsCreateLabProfile( NULL ); + if (out_format == TYPE_Lab_16) cmsconvert = cmsCreateLab2Profile( NULL ); } cmsprofiles = HeapAlloc( GetProcessHeap(), 0, (nprofiles + 1) * sizeof(cmsHPROFILE) ); @@ -263,7 +265,7 @@ release_profile( profile0 ); release_profile( profile1 ); -#endif /* HAVE_LCMS */ +#endif /* HAVE_LCMS2 */ return ret; } @@ -282,13 +284,13 @@ BOOL WINAPI DeleteColorTransform( HTRANSFORM handle ) { BOOL ret = FALSE; -#ifdef HAVE_LCMS +#ifdef HAVE_LCMS2 TRACE( "( %p )\n", handle ); ret = close_transform( handle ); -#endif /* HAVE_LCMS */ +#endif /* HAVE_LCMS2 */ return ret; } @@ -319,7 +321,7 @@ DWORD outputstride, PBMCALLBACKFN callback, ULONG data ) { BOOL ret = FALSE; -#ifdef HAVE_LCMS +#ifdef HAVE_LCMS2 struct transform *transform = grab_transform( handle ); TRACE( "( %p, %p, 0x%08x, 0x%08x, 0x%08x, 0x%08x, %p, 0x%08x, 0x%08x, %p, 0x%08x )\n", @@ -333,7 +335,7 @@ release_transform( transform ); ret = TRUE; -#endif /* HAVE_LCMS */ +#endif /* HAVE_LCMS2 */ return ret; } @@ -357,7 +359,7 @@ BOOL WINAPI TranslateColors( HTRANSFORM handle, PCOLOR in, DWORD count, COLORTYPE input_type, PCOLOR out, COLORTYPE output_type ) { -#ifdef HAVE_LCMS +#ifdef HAVE_LCMS2 BOOL ret = TRUE; struct transform *transform = grab_transform( handle ); cmsHTRANSFORM xfrm; @@ -462,7 +464,7 @@ release_transform( transform ); return ret; -#else /* HAVE_LCMS */ +#else /* HAVE_LCMS2 */ return FALSE; -#endif /* HAVE_LCMS */ -} +#endif /* HAVE_LCMS2 */ +} Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sat Sep 21 20:43:42 2013 @@ -108,7 +108,7 @@ reactos/dll/win32/msacm32 # Synced to Wine-1.7.1 reactos/dll/win32/msadp32.acm # Synced to Wine-1.7.1 reactos/dll/win32/mscat32 # Synced to Wine-1.7.1 -reactos/dll/win32/mscms # Synced to Wine-1.5.4 +reactos/dll/win32/mscms # Synced to Wine-1.7.1 reactos/dll/win32/mscoree # Synced to Wine-1.5.4 reactos/dll/win32/msctf # Synced to Wine-1.5.4 reactos/dll/win32/msftedit # Synced to Wine-1.5.19
11 years, 3 months
1
0
0
0
[hbelusca] 60293: [NTOS]: Fix declaration and definition of PsGetProcessSessionId: indeed, as PsGetCurrentProcessSessionId, we should call MmGetSessionId to retrieve the real process session id.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sat Sep 21 20:14:22 2013 New Revision: 60293 URL:
http://svn.reactos.org/svn/reactos?rev=60293&view=rev
Log: [NTOS]: Fix declaration and definition of PsGetProcessSessionId: indeed, as PsGetCurrentProcessSessionId, we should call MmGetSessionId to retrieve the real process session id. Modified: trunk/reactos/include/ndk/psfuncs.h trunk/reactos/ntoskrnl/ps/process.c Modified: trunk/reactos/include/ndk/psfuncs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/psfuncs.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/psfuncs.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/psfuncs.h [iso-8859-1] Sat Sep 21 20:14:22 2013 @@ -199,7 +199,8 @@ _In_ PEPROCESS Process ); -HANDLE +NTKERNELAPI +ULONG NTAPI PsGetProcessSessionId( _In_ PEPROCESS Process Modified: trunk/reactos/ntoskrnl/ps/process.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/process.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ps/process.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ps/process.c [iso-8859-1] Sat Sep 21 20:14:22 2013 @@ -1147,11 +1147,11 @@ /* * @implemented */ -HANDLE +ULONG NTAPI PsGetProcessSessionId(PEPROCESS Process) { - return (HANDLE)Process->Session; + return MmGetSessionId(Process); } /*
11 years, 3 months
1
0
0
0
[hbelusca] 60292: [NTOS] - Stubplement ObDeleteCapturedInsertInfo, which was added in Win2k3 (and is present in Vista+) and in Win2k SP4, according to http://www.geoffchappell.com/studies/windows/k...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sat Sep 21 19:52:44 2013 New Revision: 60292 URL:
http://svn.reactos.org/svn/reactos?rev=60292&view=rev
Log: [NTOS] - Stubplement ObDeleteCapturedInsertInfo, which was added in Win2k3 (and is present in Vista+) and in Win2k SP4, according to
http://www.geoffchappell.com/studies/windows/km/ntoskrnl/history/names50sp4…
. Its prototype come from
http://hi.baidu.com/_achillis/item/422140888137cb834514cf08
(this is a chinese article explaining some of the changes in the Object Manager from Windows XP to 7). - Stubplement ObSetHandleAttributes, which was added in NT 5.1 (XP) (see
http://www.geoffchappell.com/studies/windows/km/ntoskrnl/history/names51.htm
); its prototype is given in
http://processhacker.sourceforge.net/doc/ntfill_8h.html#a7f6e063aedf2354a73…
. Its second parameter, a pointer to a OBJECT_HANDLE_FLAG_INFORMATION structure, according to its definition in
http://processhacker.sourceforge.net/doc/struct___o_b_j_e_c_t___h_a_n_d_l_e…
, appears to correspond to our OBJECT_HANDLE_ATTRIBUTE_INFORMATION structure defined in
http://git.reactos.org/?p=reactos.git;a=blob;f=reactos/include/ndk/obtypes.…
. Those functions are needed by Win2k3's win32k.sys . Modified: trunk/reactos/ntoskrnl/ntoskrnl.spec trunk/reactos/ntoskrnl/ob/obhandle.c trunk/reactos/ntoskrnl/ob/oblife.c Modified: trunk/reactos/ntoskrnl/ntoskrnl.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ntoskrnl.spec?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ntoskrnl.spec [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ntoskrnl.spec [iso-8859-1] Sat Sep 21 19:52:44 2013 @@ -899,7 +899,7 @@ @ stdcall ObCloseHandle(ptr long) @ stdcall ObCreateObject(long ptr ptr long ptr long long long ptr) @ stdcall ObCreateObjectType(ptr ptr ptr ptr) -;ObDeleteCapturedInsertInfo +@ stdcall ObDeleteCapturedInsertInfo(ptr) @ stdcall ObDereferenceObject(ptr) @ stdcall -arch=i386,arm ObDereferenceObjectDeferDelete(ptr) @ stdcall ObDereferenceSecurityDescriptor(ptr long) @@ -918,7 +918,7 @@ @ stdcall ObReferenceObjectByPointer(ptr long ptr long) @ stdcall ObReferenceSecurityDescriptor(ptr long) @ stdcall ObReleaseObjectSecurity(ptr long) -;ObSetHandleAttributes@12 +@ stdcall ObSetHandleAttributes(ptr ptr long) @ stdcall ObSetSecurityDescriptorInfo(ptr ptr ptr ptr long ptr) @ stdcall ObSetSecurityObjectByPointer(ptr long ptr) @ fastcall ObfDereferenceObject(ptr) Modified: trunk/reactos/ntoskrnl/ob/obhandle.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obhandle.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ob/obhandle.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ob/obhandle.c [iso-8859-1] Sat Sep 21 19:52:44 2013 @@ -3172,6 +3172,36 @@ } /*++ +* @name ObSetHandleAttributes +* @implemented NT5.1 +* +* The ObSetHandleAttributes routine <FILLMEIN> +* +* @param Handle +* <FILLMEIN>. +* +* @param HandleFlags +* <FILLMEIN>. +* +* @param PreviousMode +* <FILLMEIN>. +* +* @return <FILLMEIN>. +* +* @remarks None. +* +*--*/ +NTSTATUS +NTAPI +ObSetHandleAttributes(IN HANDLE Handle, + IN POBJECT_HANDLE_ATTRIBUTE_INFORMATION HandleFlags, + IN KPROCESSOR_MODE PreviousMode) +{ + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; +} + +/*++ * @name ObCloseHandle * @implemented NT5.1 * Modified: trunk/reactos/ntoskrnl/ob/oblife.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/oblife.c?rev=6…
============================================================================== --- trunk/reactos/ntoskrnl/ob/oblife.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ob/oblife.c [iso-8859-1] Sat Sep 21 19:52:44 2013 @@ -1271,6 +1271,14 @@ VOID NTAPI +ObDeleteCapturedInsertInfo(IN PVOID Object) +{ + UNIMPLEMENTED; + return; +} + +VOID +NTAPI ObpDeleteObjectType(IN PVOID Object) { ULONG i;
11 years, 3 months
1
0
0
0
[akhaldi] 60291: [MSCAT32] * Sync with Wine 1.7.1. CORE-7469
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Sep 21 19:51:32 2013 New Revision: 60291 URL:
http://svn.reactos.org/svn/reactos?rev=60291&view=rev
Log: [MSCAT32] * Sync with Wine 1.7.1. CORE-7469 Modified: trunk/reactos/dll/win32/mscat32/CMakeLists.txt trunk/reactos/dll/win32/mscat32/main.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/mscat32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mscat32/CMakeLis…
============================================================================== --- trunk/reactos/dll/win32/mscat32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mscat32/CMakeLists.txt [iso-8859-1] Sat Sep 21 19:51:32 2013 @@ -1,8 +1,6 @@ add_definitions(-D__WINESRC__) - include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) - spec2def(mscat32.dll mscat32.spec) list(APPEND SOURCE @@ -10,7 +8,6 @@ ${CMAKE_CURRENT_BINARY_DIR}/mscat32.def) add_library(mscat32 SHARED ${SOURCE}) - set_module_type(mscat32 win32dll) target_link_libraries(mscat32 wine) add_importlibs(mscat32 wintrust msvcrt kernel32 ntdll) Modified: trunk/reactos/dll/win32/mscat32/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mscat32/main.c?r…
============================================================================== --- trunk/reactos/dll/win32/mscat32/main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mscat32/main.c [iso-8859-1] Sat Sep 21 19:51:32 2013 @@ -38,11 +38,6 @@ if (fdwReason == DLL_PROCESS_ATTACH) { DisableThreadLibraryCalls( hinstDLL ); - /* FIXME: Initialisation */ - } - else if (fdwReason == DLL_PROCESS_DETACH) - { - /* FIXME: Cleanup */ } return TRUE; Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sat Sep 21 19:51:32 2013 @@ -107,7 +107,7 @@ reactos/dll/win32/mprapi # Synced to Wine-1.5.19 reactos/dll/win32/msacm32 # Synced to Wine-1.7.1 reactos/dll/win32/msadp32.acm # Synced to Wine-1.7.1 -reactos/dll/win32/mscat32 # Synced to Wine-1.5.19 +reactos/dll/win32/mscat32 # Synced to Wine-1.7.1 reactos/dll/win32/mscms # Synced to Wine-1.5.4 reactos/dll/win32/mscoree # Synced to Wine-1.5.4 reactos/dll/win32/msctf # Synced to Wine-1.5.4
11 years, 3 months
1
0
0
0
[akhaldi] 60290: [MSADP32.ACM] * Sync with Wine 1.7.1. CORE-7469
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Sep 21 19:48:33 2013 New Revision: 60290 URL:
http://svn.reactos.org/svn/reactos?rev=60290&view=rev
Log: [MSADP32.ACM] * Sync with Wine 1.7.1. CORE-7469 Modified: trunk/reactos/dll/win32/msadp32.acm/CMakeLists.txt trunk/reactos/dll/win32/msadp32.acm/msadp32.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/msadp32.acm/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msadp32.acm/CMak…
============================================================================== --- trunk/reactos/dll/win32/msadp32.acm/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msadp32.acm/CMakeLists.txt [iso-8859-1] Sat Sep 21 19:48:33 2013 @@ -9,10 +9,8 @@ ${CMAKE_CURRENT_BINARY_DIR}/msadp32.def) add_library(msadp32.acm SHARED ${SOURCE}) - set_module_type(msadp32.acm win32dll) set_target_properties(msadp32.acm PROPERTIES SUFFIX "") target_link_libraries(msadp32.acm wine) add_importlibs(msadp32.acm winmm user32 msvcrt kernel32 ntdll) -add_dependencies(msadp32.acm psdk) add_cd_file(TARGET msadp32.acm DESTINATION reactos/system32 FOR all) Modified: trunk/reactos/dll/win32/msadp32.acm/msadp32.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msadp32.acm/msad…
============================================================================== --- trunk/reactos/dll/win32/msadp32.acm/msadp32.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msadp32.acm/msadp32.c [iso-8859-1] Sat Sep 21 19:48:33 2013 @@ -380,7 +380,7 @@ aftd->dwFormatTagIndex = 1; /* WAVE_FORMAT_ADPCM is bigger than PCM */ break; } - /* fall thru */ + /* fall through */ case ACM_FORMATTAGDETAILSF_FORMATTAG: switch (aftd->dwFormatTag) { Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sat Sep 21 19:48:33 2013 @@ -106,7 +106,7 @@ reactos/dll/win32/mpr # Synced to Wine-1.7.1 reactos/dll/win32/mprapi # Synced to Wine-1.5.19 reactos/dll/win32/msacm32 # Synced to Wine-1.7.1 -reactos/dll/win32/msadp32.acm # Synced to Wine-1.5.19 +reactos/dll/win32/msadp32.acm # Synced to Wine-1.7.1 reactos/dll/win32/mscat32 # Synced to Wine-1.5.19 reactos/dll/win32/mscms # Synced to Wine-1.5.4 reactos/dll/win32/mscoree # Synced to Wine-1.5.4
11 years, 3 months
1
0
0
0
[aandrejevic] 60289: [SOFT386] Implement the MOV AL/AX/EAX, off16/32 and MOV off16/32, AL/AX/EAX instructions.
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Sat Sep 21 18:44:59 2013 New Revision: 60289 URL:
http://svn.reactos.org/svn/reactos?rev=60289&view=rev
Log: [SOFT386] Implement the MOV AL/AX/EAX, off16/32 and MOV off16/32, AL/AX/EAX instructions. Modified: branches/ntvdm/lib/soft386/opcodes.c branches/ntvdm/lib/soft386/opcodes.h Modified: branches/ntvdm/lib/soft386/opcodes.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/soft386/opcodes.c?rev…
============================================================================== --- branches/ntvdm/lib/soft386/opcodes.c [iso-8859-1] (original) +++ branches/ntvdm/lib/soft386/opcodes.c [iso-8859-1] Sat Sep 21 18:44:59 2013 @@ -184,10 +184,10 @@ Soft386OpcodePopFlags, Soft386OpcodeSahf, Soft386OpcodeLahf, - NULL, // TODO: OPCODE 0xA0 NOT SUPPORTED - NULL, // TODO: OPCODE 0xA1 NOT SUPPORTED - NULL, // TODO: OPCODE 0xA2 NOT SUPPORTED - NULL, // TODO: OPCODE 0xA3 NOT SUPPORTED + Soft386OpcodeMovAlOffset, + Soft386OpcodeMovEaxOffset, + Soft386OpcodeMovOffsetAl, + Soft386OpcodeMovOffsetEax, NULL, // TODO: OPCODE 0xA4 NOT SUPPORTED NULL, // TODO: OPCODE 0xA5 NOT SUPPORTED NULL, // TODO: OPCODE 0xA6 NOT SUPPORTED @@ -4639,3 +4639,196 @@ return FALSE; } + +SOFT386_OPCODE_HANDLER(Soft386OpcodeMovAlOffset) +{ + BOOLEAN Size = State->SegmentRegs[SOFT386_REG_CS].Size; + ULONG Offset; + + /* Make sure this is the right instruction */ + ASSERT(Opcode == 0xA0); + + if (State->PrefixFlags & SOFT386_PREFIX_OPSIZE) + { + /* The OPSIZE prefix toggles the size */ + Size = !Size; + } + + if (Size) + { + if (!Soft386FetchDword(State, &Offset)) + { + /* Exception occurred */ + return FALSE; + } + } + else + { + USHORT WordOffset; + + if (!Soft386FetchWord(State, &WordOffset)) + { + /* Exception occurred */ + return FALSE; + } + + Offset = (ULONG)WordOffset; + } + + /* Read from memory */ + return Soft386ReadMemory(State, + (State->PrefixFlags & SOFT386_PREFIX_SEG) ? + State->SegmentOverride : SOFT386_REG_DS, + Offset, + FALSE, + &State->GeneralRegs[SOFT386_REG_EAX].LowByte, + sizeof(UCHAR)); +} + +SOFT386_OPCODE_HANDLER(Soft386OpcodeMovEaxOffset) +{ + BOOLEAN Size = State->SegmentRegs[SOFT386_REG_CS].Size; + + /* Make sure this is the right instruction */ + ASSERT(Opcode == 0xA1); + + if (State->PrefixFlags & SOFT386_PREFIX_OPSIZE) + { + /* The OPSIZE prefix toggles the size */ + Size = !Size; + } + + if (Size) + { + ULONG Offset; + + if (!Soft386FetchDword(State, &Offset)) + { + /* Exception occurred */ + return FALSE; + } + + /* Read from memory */ + return Soft386ReadMemory(State, + (State->PrefixFlags & SOFT386_PREFIX_SEG) ? + State->SegmentOverride : SOFT386_REG_DS, + Offset, + FALSE, + &State->GeneralRegs[SOFT386_REG_EAX].Long, + sizeof(ULONG)); + } + else + { + USHORT Offset; + + if (!Soft386FetchWord(State, &Offset)) + { + /* Exception occurred */ + return FALSE; + } + + /* Read from memory */ + return Soft386ReadMemory(State, + (State->PrefixFlags & SOFT386_PREFIX_SEG) ? + State->SegmentOverride : SOFT386_REG_DS, + Offset, + FALSE, + &State->GeneralRegs[SOFT386_REG_EAX].LowWord, + sizeof(USHORT)); + } +} + +SOFT386_OPCODE_HANDLER(Soft386OpcodeMovOffsetAl) +{ + BOOLEAN Size = State->SegmentRegs[SOFT386_REG_CS].Size; + ULONG Offset; + + /* Make sure this is the right instruction */ + ASSERT(Opcode == 0xA2); + + if (State->PrefixFlags & SOFT386_PREFIX_OPSIZE) + { + /* The OPSIZE prefix toggles the size */ + Size = !Size; + } + + if (Size) + { + if (!Soft386FetchDword(State, &Offset)) + { + /* Exception occurred */ + return FALSE; + } + } + else + { + USHORT WordOffset; + + if (!Soft386FetchWord(State, &WordOffset)) + { + /* Exception occurred */ + return FALSE; + } + + Offset = (ULONG)WordOffset; + } + + /* Write to memory */ + return Soft386WriteMemory(State, + (State->PrefixFlags & SOFT386_PREFIX_SEG) ? + State->SegmentOverride : SOFT386_REG_DS, + Offset, + &State->GeneralRegs[SOFT386_REG_EAX].LowByte, + sizeof(UCHAR)); +} + +SOFT386_OPCODE_HANDLER(Soft386OpcodeMovOffsetEax) +{ + BOOLEAN Size = State->SegmentRegs[SOFT386_REG_CS].Size; + + /* Make sure this is the right instruction */ + ASSERT(Opcode == 0xA3); + + if (State->PrefixFlags & SOFT386_PREFIX_OPSIZE) + { + /* The OPSIZE prefix toggles the size */ + Size = !Size; + } + + if (Size) + { + ULONG Offset; + + if (!Soft386FetchDword(State, &Offset)) + { + /* Exception occurred */ + return FALSE; + } + + /* Write to memory */ + return Soft386WriteMemory(State, + (State->PrefixFlags & SOFT386_PREFIX_SEG) ? + State->SegmentOverride : SOFT386_REG_DS, + Offset, + &State->GeneralRegs[SOFT386_REG_EAX].Long, + sizeof(ULONG)); + } + else + { + USHORT Offset; + + if (!Soft386FetchWord(State, &Offset)) + { + /* Exception occurred */ + return FALSE; + } + + /* Write to memory */ + return Soft386WriteMemory(State, + (State->PrefixFlags & SOFT386_PREFIX_SEG) ? + State->SegmentOverride : SOFT386_REG_DS, + Offset, + &State->GeneralRegs[SOFT386_REG_EAX].LowWord, + sizeof(USHORT)); + } +} Modified: branches/ntvdm/lib/soft386/opcodes.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/soft386/opcodes.h?rev…
============================================================================== --- branches/ntvdm/lib/soft386/opcodes.h [iso-8859-1] (original) +++ branches/ntvdm/lib/soft386/opcodes.h [iso-8859-1] Sat Sep 21 18:44:59 2013 @@ -132,5 +132,9 @@ SOFT386_OPCODE_HANDLER(Soft386OpcodeCall); SOFT386_OPCODE_HANDLER(Soft386OpcodeJmp); SOFT386_OPCODE_HANDLER(Soft386OpcodeJmpAbs); +SOFT386_OPCODE_HANDLER(Soft386OpcodeMovAlOffset); +SOFT386_OPCODE_HANDLER(Soft386OpcodeMovEaxOffset); +SOFT386_OPCODE_HANDLER(Soft386OpcodeMovOffsetAl); +SOFT386_OPCODE_HANDLER(Soft386OpcodeMovOffsetEax); #endif // _OPCODES_H_
11 years, 3 months
1
0
0
0
[hbelusca] 60288: [CSRSS]: Improve two dprints.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sat Sep 21 18:38:30 2013 New Revision: 60288 URL:
http://svn.reactos.org/svn/reactos?rev=60288&view=rev
Log: [CSRSS]: Improve two dprints. Modified: trunk/reactos/subsystems/win32/csrss/csrss.c Modified: trunk/reactos/subsystems/win32/csrss/csrss.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/csr…
============================================================================== --- trunk/reactos/subsystems/win32/csrss/csrss.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/csrss/csrss.c [iso-8859-1] Sat Sep 21 18:38:30 2013 @@ -60,7 +60,7 @@ if (!NT_SUCCESS(Status)) { /* Raise a hard error */ - DPRINT1("CSRSS: Could not raise IOPL: %x\n", Status); + DPRINT1("CSRSS: Could not raise IOPL, Status: 0x%08lx\n", Status); #if 0 Status = NtRaiseHardError(STATUS_IO_PRIVILEGE_FAILED, 0, @@ -76,7 +76,7 @@ if (!NT_SUCCESS(Status)) { /* Kill us */ - DPRINT1("CSRSS: CsrServerInitialization failed:% lx\n", Status); + DPRINT1("CSRSS: Unable to initialize server, Status: 0x%08lx\n", Status); NtTerminateProcess(NtCurrentProcess(), Status); }
11 years, 3 months
1
0
0
0
[hbelusca] 60287: [BASESRV] Stubplement BaseSrvNlsLogon and BaseSrvNlsUpdateRegistryCache needed by Windows-2k3's WINSRV.DLL . Their return value types are unknown, but the number of parameters was...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sat Sep 21 18:25:02 2013 New Revision: 60287 URL:
http://svn.reactos.org/svn/reactos?rev=60287&view=rev
Log: [BASESRV] Stubplement BaseSrvNlsLogon and BaseSrvNlsUpdateRegistryCache needed by Windows-2k3's WINSRV.DLL . Their return value types are unknown, but the number of parameters was obtained by reading
http://wcwp.googlecode.com/svn/trunk/wcwp/bin/masm32/include/basesrv.inc
. Modified: trunk/reactos/subsystems/win/basesrv/basesrv.spec trunk/reactos/subsystems/win/basesrv/nls.c Modified: trunk/reactos/subsystems/win/basesrv/basesrv.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win/basesrv/bas…
============================================================================== --- trunk/reactos/subsystems/win/basesrv/basesrv.spec [iso-8859-1] (original) +++ trunk/reactos/subsystems/win/basesrv/basesrv.spec [iso-8859-1] Sat Sep 21 18:25:02 2013 @@ -1,2 +1,4 @@ @ stdcall BaseSetProcessCreateNotify(ptr) +@ stdcall BaseSrvNlsLogon(ptr) +@ stdcall BaseSrvNlsUpdateRegistryCache(ptr ptr) @ stdcall ServerDllInitialization(ptr) Modified: trunk/reactos/subsystems/win/basesrv/nls.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win/basesrv/nls…
============================================================================== --- trunk/reactos/subsystems/win/basesrv/nls.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win/basesrv/nls.c [iso-8859-1] Sat Sep 21 18:25:02 2013 @@ -350,4 +350,23 @@ return Status; } +/* PUBLIC APIS ****************************************************************/ + +NTSTATUS +NTAPI +BaseSrvNlsLogon(DWORD Unknown) +{ + DPRINT1("%s(%lu) not yet implemented\n", __FUNCTION__, Unknown); + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +NTAPI +BaseSrvNlsUpdateRegistryCache(DWORD Unknown1, + DWORD Unknown2) +{ + DPRINT1("%s(%lu, %lu) not yet implemented\n", __FUNCTION__, Unknown1, Unknown2); + return STATUS_NOT_IMPLEMENTED; +} + /* EOF */
11 years, 3 months
1
0
0
0
← Newer
1
...
17
18
19
20
21
22
23
...
56
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Results per page:
10
25
50
100
200