54 lines
1.4 KiB
C++
54 lines
1.4 KiB
C++
//////////////////////////////////////////////////////////////////////
|
|
//
|
|
// 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;
|
|
}
|