Author: akhaldi
Date: Sun Dec 1 15:57:34 2013
New Revision: 61181
URL:
http://svn.reactos.org/svn/reactos?rev=61181&view=rev
Log:
[IMM32]
* Sync with Wine 1.7.1.
CORE-7469
Modified:
trunk/reactos/dll/win32/imm32/CMakeLists.txt
trunk/reactos/dll/win32/imm32/imm.c
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/imm32/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/imm32/CMakeLists…
==============================================================================
--- trunk/reactos/dll/win32/imm32/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/imm32/CMakeLists.txt [iso-8859-1] Sun Dec 1 15:57:34 2013
@@ -1,10 +1,9 @@
+include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
add_definitions(-D__WINESRC__)
remove_definitions(-D_WIN32_WINNT=0x502)
add_definitions(-D_WIN32_WINNT=0x600)
-
-include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
spec2def(imm32.dll imm32.spec ADD_IMPORTLIB)
@@ -13,9 +12,7 @@
${CMAKE_CURRENT_BINARY_DIR}/imm32_stubs.c
${CMAKE_CURRENT_BINARY_DIR}/imm32.def)
-add_library(imm32 SHARED
- ${SOURCE}
- version.rc)
+add_library(imm32 SHARED ${SOURCE} version.rc)
if(MSVC)
# FIXME:
http://www.cmake.org/Bug/view.php?id=12998
Modified: trunk/reactos/dll/win32/imm32/imm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/imm32/imm.c?rev=…
==============================================================================
--- trunk/reactos/dll/win32/imm32/imm.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/imm32/imm.c [iso-8859-1] Sun Dec 1 15:57:34 2013
@@ -37,12 +37,6 @@
#include <wine/list.h>
WINE_DEFAULT_DEBUG_CHANNEL(imm);
-
-typedef struct tagIMCCInternal
-{
- DWORD dwLock;
- DWORD dwSize;
-} IMCCInternal;
#define MAKE_FUNCPTR(f) typeof(f) * p##f
typedef struct _tagImmHkl{
@@ -413,6 +407,7 @@
IMM_FreeThreadData();
break;
case DLL_PROCESS_DETACH:
+ if (lpReserved) break;
IMM_FreeThreadData();
IMM_FreeAllImmHkl();
TlsFree(tlsIndex);
@@ -2632,8 +2627,9 @@
BOOL WINAPI ImmUnlockIMC(HIMC hIMC)
{
InputContextData *data = hIMC;
- data->dwLock--;
- return (data->dwLock!=0);
+ if (data->dwLock)
+ data->dwLock--;
+ return TRUE;
}
/***********************************************************************
@@ -2650,15 +2646,7 @@
*/
HIMCC WINAPI ImmCreateIMCC(DWORD size)
{
- IMCCInternal *internal;
- int real_size = size + sizeof(IMCCInternal);
-
- internal = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, real_size);
- if (internal == NULL)
- return NULL;
-
- internal->dwSize = size;
- return internal;
+ return GlobalAlloc(GMEM_ZEROINIT | GMEM_MOVEABLE, size);
}
/***********************************************************************
@@ -2666,8 +2654,7 @@
*/
HIMCC WINAPI ImmDestroyIMCC(HIMCC block)
{
- HeapFree(GetProcessHeap(),0,block);
- return NULL;
+ return GlobalFree(block);
}
/***********************************************************************
@@ -2675,11 +2662,7 @@
*/
LPVOID WINAPI ImmLockIMCC(HIMCC imcc)
{
- IMCCInternal *internal;
- internal = imcc;
-
- internal->dwLock ++;
- return internal + 1;
+ return GlobalLock(imcc);
}
/***********************************************************************
@@ -2687,11 +2670,7 @@
*/
BOOL WINAPI ImmUnlockIMCC(HIMCC imcc)
{
- IMCCInternal *internal;
- internal = imcc;
-
- internal->dwLock --;
- return (internal->dwLock!=0);
+ return GlobalUnlock(imcc);
}
/***********************************************************************
@@ -2699,10 +2678,7 @@
*/
DWORD WINAPI ImmGetIMCCLockCount(HIMCC imcc)
{
- IMCCInternal *internal;
- internal = imcc;
-
- return internal->dwLock;
+ return GlobalFlags(imcc) & GMEM_LOCKCOUNT;
}
/***********************************************************************
@@ -2710,15 +2686,7 @@
*/
HIMCC WINAPI ImmReSizeIMCC(HIMCC imcc, DWORD size)
{
- IMCCInternal *internal,*newone;
- int real_size = size + sizeof(IMCCInternal);
-
- internal = imcc;
-
- newone = HeapReAlloc(GetProcessHeap(), 0, internal, real_size);
- newone->dwSize = size;
-
- return newone;
+ return GlobalReAlloc(imcc, size, GMEM_ZEROINIT | GMEM_MOVEABLE);
}
/***********************************************************************
@@ -2726,10 +2694,7 @@
*/
DWORD WINAPI ImmGetIMCCSize(HIMCC imcc)
{
- IMCCInternal *internal;
- internal = imcc;
-
- return internal->dwSize;
+ return GlobalSize(imcc);
}
/***********************************************************************
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] Sun Dec 1 15:57:34 2013
@@ -84,7 +84,7 @@
reactos/dll/win32/ieframe # Synced to Wine-1.7.1
reactos/dll/win32/imaadp32.acm # Synced to Wine-1.7.1
reactos/dll/win32/imagehlp # Synced to Wine-1.7.1
-reactos/dll/win32/imm32 # Synced to Wine-1.5.19
+reactos/dll/win32/imm32 # Synced to Wine-1.7.1
reactos/dll/win32/inetcomm # Synced to Wine-1.7.1
reactos/dll/win32/inetmib1 # Synced to Wine-1.7.1
reactos/dll/win32/initpki # Synced to Wine-1.7.1