Update Scintilla to 4.0.4
[TortoiseGit.git] / ext / scintilla / win32 / ScintillaDLL.cxx
blobb7fb418be28e143a993a05707c6682b6ffb4b7c4
1 // Scintilla source code edit control
2 /** @file ScintillaDLL.cxx
3 ** DLL entry point for Scintilla.
4 **/
5 // Copyright 1998-2018 by Neil Hodgson <neilh@scintilla.org>
6 // The License.txt file describes the conditions under which this software may be distributed.
8 #undef _WIN32_WINNT
9 #define _WIN32_WINNT 0x0500
10 #undef WINVER
11 #define WINVER 0x0500
12 #include <windows.h>
14 #include "Scintilla.h"
15 #include "ScintillaWin.h"
17 extern "C"
18 __declspec(dllexport)
19 sptr_t __stdcall Scintilla_DirectFunction(
20 ScintillaWin *sci, UINT iMessage, uptr_t wParam, sptr_t lParam) {
21 return Scintilla::DirectFunction(sci, iMessage, wParam, lParam);
24 extern "C" int APIENTRY DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpvReserved) {
25 //Platform::DebugPrintf("Scintilla::DllMain %d %d\n", hInstance, dwReason);
26 if (dwReason == DLL_PROCESS_ATTACH) {
27 if (!Scintilla_RegisterClasses(hInstance))
28 return FALSE;
29 } else if (dwReason == DLL_PROCESS_DETACH) {
30 if (lpvReserved == NULL) {
31 Scintilla::ResourcesRelease(true);
34 return TRUE;