|
1 | 1 | using System;
|
2 |
| -using System.IO; |
3 |
| -using System.Text; |
4 |
| -using System.Drawing; |
5 | 2 | using System.Collections;
|
6 |
| -using System.Windows.Forms; |
7 | 3 | using System.Collections.Generic;
|
| 4 | +using System.ComponentModel; |
| 5 | +using System.Drawing; |
| 6 | +using System.Drawing.Printing; |
| 7 | +using System.IO; |
8 | 8 | using System.Runtime.InteropServices;
|
| 9 | +using System.Text; |
| 10 | +using System.Windows.Forms; |
9 | 11 | using ScintillaNet.Configuration;
|
10 |
| -using System.Drawing.Printing; |
11 | 12 | using PluginCore.FRService;
|
12 | 13 | using PluginCore.Utilities;
|
13 | 14 | using PluginCore.Managers;
|
@@ -231,9 +232,15 @@ public ScintillaControl(string fullpath)
|
231 | 232 | hwndScintilla = CreateWindowEx(0, "Scintilla", "", WS_CHILD_VISIBLE_TABSTOP, 0, 0, this.Width, this.Height, this.Handle, 0, new IntPtr(0), null);
|
232 | 233 | directPointer = (IntPtr)SlowPerform(2185, 0, 0);
|
233 | 234 | IntPtr sciFunctionPointer = GetProcAddress(new HandleRef(null, lib), "Scintilla_DirectFunction");
|
234 |
| -/* if (sciFunctionPointer == IntPtr.Zero) |
235 |
| - throw new Win32Exception(Resources.Exception_CannotCreateDirectFunction, new Win32Exception(Marshal.GetLastWin32Error())); |
236 |
| -*/ |
| 235 | + if (sciFunctionPointer == IntPtr.Zero) |
| 236 | + sciFunctionPointer = GetProcAddress(new HandleRef(null, lib), "_Scintilla_DirectFunction@16"); |
| 237 | + |
| 238 | + if (sciFunctionPointer == IntPtr.Zero) |
| 239 | + { |
| 240 | + string msg = "The Scintilla module has no export for the 'Scintilla_DirectFunction' procedure."; |
| 241 | + throw new Win32Exception(msg, new Win32Exception(Marshal.GetLastWin32Error())); |
| 242 | + } |
| 243 | + |
237 | 244 | _sciFunction = (Perform)Marshal.GetDelegateForFunctionPointer(
|
238 | 245 | sciFunctionPointer,
|
239 | 246 | typeof(Perform));
|
|
0 commit comments