ReactOS 0.4.15-dev-7931-gfd331f1
clientimc.c File Reference
#include "precomp.h"
Include dependency graph for clientimc.c:

Go to the source code of this file.

Functions

 START_TEST (clientimc)
 

Function Documentation

◆ START_TEST()

START_TEST ( clientimc  )

Definition at line 22 of file clientimc.c.

23{
24 DWORD dwCode;
26
27 pClientImc->hInputContext = (HANDLE)ImmCreateIMCC(4);
28 pClientImc->cLockObj = 2;
29 pClientImc->dwFlags = 0x40;
30 RtlInitializeCriticalSection(&pClientImc->cs);
31 ok_long(ImmGetIMCCSize((HIMCC)pClientImc->hInputContext), 4);
32
33 ImmUnlockClientImc(pClientImc);
34 ok_long(pClientImc->cLockObj, 1);
35 ok_long(ImmGetIMCCSize((HIMCC)pClientImc->hInputContext), 4);
36
37 dwCode = 0;
39 {
40 ImmUnlockClientImc(pClientImc);
41 }
43 {
44 dwCode = _SEH2_GetExceptionCode();
45 }
48
49 ok_long(pClientImc->cLockObj, 0);
50 ok_long(ImmGetIMCCSize((HIMCC)pClientImc->hInputContext), 0);
51
52 HeapFree(GetProcessHeap(), 0, pClientImc);
53}
#define ok_long(expression, result)
Definition: atltest.h:133
DWORD HIMCC
Definition: dimm.idl:76
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
VOID WINAPI ImmUnlockClientImc(PCLIENTIMC pClientImc)
Definition: imm.c:983
HIMCC WINAPI ImmCreateIMCC(DWORD size)
Definition: utils.c:1178
DWORD WINAPI ImmGetIMCCSize(HIMCC imcc)
Definition: utils.c:1236
#define _SEH2_END
Definition: filesup.c:22
#define _SEH2_TRY
Definition: filesup.c:19
unsigned long DWORD
Definition: ntddk_ex.h:95
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
NTSYSAPI NTSTATUS NTAPI RtlInitializeCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
#define STATUS_ACCESS_VIOLATION
Definition: ntstatus.h:242
#define _SEH2_GetExceptionCode()
Definition: pseh2_64.h:159
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:34
RTL_CRITICAL_SECTION cs
Definition: imm32_undoc.h:120
HANDLE hInputContext
Definition: imm32_undoc.h:116
PVOID HANDLE
Definition: typedefs.h:73