-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDllMain.cpp
More file actions
53 lines (41 loc) · 1.35 KB
/
DllMain.cpp
File metadata and controls
53 lines (41 loc) · 1.35 KB
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
//////////////////////////////////////////////////////////////////////
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED
// TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// Copyright (C) 2003 Microsoft Corporation. All rights reserved.
//
// DllMain.cpp
//
// DllMain module entry point.
//
//////////////////////////////////////////////////////////////////////
#include "Globals.h"
#include "TextService.h"
#include "CandidateWindow.h"
//+---------------------------------------------------------------------------
//
// DllMain
//
//----------------------------------------------------------------------------
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID pvReserved)
{
switch (dwReason)
{
case DLL_PROCESS_ATTACH:
g_hInst = hInstance;
if (!InitializeCriticalSectionAndSpinCount(&g_cs, 0))
return FALSE;
// register candidate window class.
CCandidateWindow::_InitWindowClass();
break;
case DLL_PROCESS_DETACH:
// unregister candidate window class.
CCandidateWindow::_UninitWindowClass();
DeleteCriticalSection(&g_cs);
break;
}
return TRUE;
}