<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[NppPluginNET 64-bit?]]></title><description><![CDATA[<p dir="auto">It looks like despite there many many plugins <strong>using</strong> NppPluginNet (originally by UFO?), there has been no maintenance and/or “authoritative” repo for the .Net plugin base/example since v0.7 about 5 years ago… So I have a couple questions:</p>
<ul>
<li>Does anyone know of a shared/maintained repo for this project?</li>
<li>Does anyone know what needs to be done, if anything, to get it to work compiled for 64-bit, for the 64-bit version of Notepad++?
<ul>
<li>Does anyone know whether there’s a good way to get debugging information out of the plugin loading process, to get an idea of what any errors might be?</li>
</ul>
</li>
</ul>
<p dir="auto">I’ve made a couple minor attempts in this direction, but without much success:</p>
<ul>
<li>I’ve switched from the included  (unversioned) DllExport to the NuGet package (UnmanagedExports v1.2.7)<br />
** This works - the project compiles, and the resulting plugin DLL works like it did before</li>
<li>I’ve tried to change the compilation target to x64, and that compiles successfully, but the resulting plugin DLL does not load in Notepad++ 64-bit - I get the usual “Failed to load”; “&lt;plugin dll&gt; is not compatible with the current version of Notepad++”</li>
</ul>
<p dir="auto">I’m guessing there some data type issues, some Ints that need to be changed to Longs etc (presumably in NppPluginNetBase and/or NppPluginNetHelper), but I’m distinctly ignorant in this area.</p>
<p dir="auto">I’ll update this thread with the relevant code changes and any additional info I gather, but in the meantime I already wanted to open the discussion.</p>
<p dir="auto">Thanks for any insight!</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/12633/npppluginnet-64-bit</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Jul 2026 05:15:44 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/12633.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 30 Oct 2016 15:35:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to NppPluginNET 64-bit? on Mon, 13 Feb 2017 20:36:06 GMT]]></title><description><![CDATA[<p dir="auto">Just released a new and improved 64bit version <a href="https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net/releases" rel="nofollow ugc">https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net/releases</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/21838</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/21838</guid><dc:creator><![CDATA[Kasper Graversen]]></dc:creator><pubDate>Mon, 13 Feb 2017 20:36:06 GMT</pubDate></item><item><title><![CDATA[Reply to NppPluginNET 64-bit? on Tue, 07 Feb 2017 20:58:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/greenzest" aria-label="Profile: greenzest">@<bdi>greenzest</bdi></a> said:</p>
<p dir="auto">I think the latest merged pull request takes care of this <a href="https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net/commit/a9c44746380ca3af7a147a5466342c632e2b0d80" rel="nofollow ugc">https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net/commit/a9c44746380ca3af7a147a5466342c632e2b0d80</a><br />
happy to hear your thoughts :)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/21646</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/21646</guid><dc:creator><![CDATA[Kasper Graversen]]></dc:creator><pubDate>Tue, 07 Feb 2017 20:58:14 GMT</pubDate></item><item><title><![CDATA[Reply to NppPluginNET 64-bit? on Mon, 28 Nov 2016 19:53:43 GMT]]></title><description><![CDATA[<p dir="auto">This code has been taken over by UFO but I really never found the time to really get into it. You are more than welcome to fix the code. My interest is for the moment merely to be able to compile my plugins with VS2015.</p>
<p dir="auto">After discussing with the author of Scintilla and not being able to reach the author of N++ it seems no one is interested in cleaning up the zest pool of mess called the api to N++ and Scintilla. A lot of really nice stuff could come out of taking a more structured/generative approach benefiting plugin packs of all languages. But no interest is to be traced from those authors…</p>
]]></description><link>https://community.notepad-plus-plus.org/post/19527</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/19527</guid><dc:creator><![CDATA[Kasper Graversen]]></dc:creator><pubDate>Mon, 28 Nov 2016 19:53:43 GMT</pubDate></item><item><title><![CDATA[Reply to NppPluginNET 64-bit? on Sun, 27 Nov 2016 10:09:02 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/kasper-graversen" aria-label="Profile: Kasper-Graversen">@<bdi>Kasper-Graversen</bdi></a> ,</p>
<p dir="auto">As fas as I can tell (I didn’t try your version!) you will have the following problems with your version :</p>
<ul>
<li>Your plugin will register its functions array but you will not correctly receive the notifications from npp/scintilla (all header.code will be at 0)</li>
<li>Calls to sendmessage might cause the program to freeze as stated in the pinvoke page :</li>
</ul>
<pre><code>2) NEVER use "int" or "integer" as lParam. Your code WILL crash on 64-bit windows. ONLY use IntPtr, a "ref" structure, or an "out" structure.

3) NEVER use "bool", "int", or "integer" as the return value. Your core WILL crash on 64-bit windows. ONLY use IntPtr. It's not safe to use bool - pInvoke cannot marshal an IntPtr to a boolean.
</code></pre>
<p dir="auto">regards</p>
]]></description><link>https://community.notepad-plus-plus.org/post/19499</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/19499</guid><dc:creator><![CDATA[greenzest]]></dc:creator><pubDate>Sun, 27 Nov 2016 10:09:02 GMT</pubDate></item><item><title><![CDATA[Reply to NppPluginNET 64-bit? on Sat, 26 Nov 2016 20:45:55 GMT]]></title><description><![CDATA[<p dir="auto">hi all I’ve released <a href="https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net/releases/tag/0.93.87" rel="nofollow ugc">https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net/releases/tag/0.93.87</a>  but <a class="plugin-mentions-user plugin-mentions-a" href="/user/greenzest" aria-label="Profile: greenzest">@<bdi>greenzest</bdi></a>  comment perhaps reveals another version should be released soon? ;)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/19495</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/19495</guid><dc:creator><![CDATA[Kasper Graversen]]></dc:creator><pubDate>Sat, 26 Nov 2016 20:45:55 GMT</pubDate></item><item><title><![CDATA[Reply to NppPluginNET 64-bit? on Sat, 26 Nov 2016 15:56:34 GMT]]></title><description><![CDATA[<p dir="auto">I don’t know if this will be helpful to anyone but…</p>
<p dir="auto">You will also need to make the following modification for your C# plugin to work on x64 :</p>
<ul>
<li>Change from int to IntPtr in the notification structure (compare what you have to what’s below)</li>
</ul>
<pre><code class="language-C#">    [StructLayout(LayoutKind.Sequential)]
    public struct Sci_NotifyHeader {
        /* Compatible with Windows NMHDR.
         * hwndFrom is really an environment specific window handle or pointer
         * but most clients of Scintilla.h do not have this type visible. */
        public IntPtr hwndFrom;
        public IntPtr idFrom;
        public uint code;
    }

    [StructLayout(LayoutKind.Sequential)]
    public struct SCNotification {
        public Sci_NotifyHeader nmhdr;
        public int position; /* SCN_STYLENEEDED, SCN_MODIFIED, SCN_DWELLSTART, SCN_DWELLEND */
        public int ch; /* SCN_CHARADDED, SCN_KEY */
        public int modifiers; /* SCN_KEY */
        public int modificationType; /* SCN_MODIFIED */
        public IntPtr text; /* SCN_MODIFIED, SCN_USERLISTSELECTION, SCN_AUTOCSELECTION */
        public int length; /* SCN_MODIFIED */
        public int linesAdded; /* SCN_MODIFIED */
        public int message; /* SCN_MACRORECORD */
        public IntPtr wParam; /* SCN_MACRORECORD */
        public IntPtr lParam; /* SCN_MACRORECORD */
        public int line; /* SCN_MODIFIED */
        public int foldLevelNow; /* SCN_MODIFIED */
        public int foldLevelPrev; /* SCN_MODIFIED */
        public int margin; /* SCN_MARGINCLICK */
        public int listType; /* SCN_USERLISTSELECTION */
        public int x; /* SCN_DWELLSTART, SCN_DWELLEND */
        public int y; /* SCN_DWELLSTART, SCN_DWELLEND */
        public int token; /* SCN_MODIFIED with SC_MOD_CONTAINER */
        public int annotationLinesAdded; /* SC_MOD_CHANGEANNOTATION */
        public int updated; /* SCN_UPDATEUI */
        public int listCompletionMethod; /* SCN_AUTOCSELECTION, SCN_AUTOCCOMPLETED, SCN_USERLISTSELECTION */
    }
</code></pre>
<ul>
<li>modify your sendmessage P/Invoke to NO LONGER use int or bool (see <a href="http://www.pinvoke.net/default.aspx/user32.SendMessage" rel="nofollow ugc">this page</a>); instead use the following signature :</li>
</ul>
<pre><code class="language-C#">[DllImport("user32.dll", CharSet = CharSet.Auto)]
static extern IntPtr SendMessage(IntPtr hWnd, UInt32 Msg, IntPtr wParam, IntPtr lParam);
</code></pre>
<p dir="auto">For information, i post the modifications on my end to make it work :<br />
<a href="https://github.com/jcaillon/3P/commit/63d0f408489605cbaefe50d4565515ef70959e2e#diff-009e4601aad253f284d4f65fdba02937" rel="nofollow ugc">https://github.com/jcaillon/3P/commit/63d0f408489605cbaefe50d4565515ef70959e2e#diff-009e4601aad253f284d4f65fdba02937</a><br />
<a href="https://github.com/jcaillon/3P/commit/63d0f408489605cbaefe50d4565515ef70959e2e#diff-e465f2e4346ecedd11f61657df6d2415" rel="nofollow ugc">https://github.com/jcaillon/3P/commit/63d0f408489605cbaefe50d4565515ef70959e2e#diff-e465f2e4346ecedd11f61657df6d2415</a><br />
<a href="https://github.com/jcaillon/3P/commit/63d0f408489605cbaefe50d4565515ef70959e2e#diff-a583b7dff72eb31fe063a30da70a3313" rel="nofollow ugc">https://github.com/jcaillon/3P/commit/63d0f408489605cbaefe50d4565515ef70959e2e#diff-a583b7dff72eb31fe063a30da70a3313</a></p>
<p dir="auto">En last thing, I do use UnmanagedExport version 1.2.7.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/19492</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/19492</guid><dc:creator><![CDATA[greenzest]]></dc:creator><pubDate>Sat, 26 Nov 2016 15:56:34 GMT</pubDate></item><item><title><![CDATA[Reply to NppPluginNET 64-bit? on Tue, 08 Nov 2016 20:03:38 GMT]]></title><description><![CDATA[<p dir="auto">As mentioned above probably also an update of the included dllexport is necessary for real x64 usability. At</p>
<p dir="auto"><a href="https://www.nuget.org/packages/UnmanagedExports" rel="nofollow ugc">https://www.nuget.org/packages/UnmanagedExports</a></p>
<p dir="auto">the latest version there is 1.2.7. The followup nuget package with a somehow different structure is available in version 1.5 at:</p>
<p dir="auto"><a href="https://www.nuget.org/packages/DllExport/" rel="nofollow ugc">https://www.nuget.org/packages/DllExport/</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/19110</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/19110</guid><dc:creator><![CDATA[chcg]]></dc:creator><pubDate>Tue, 08 Nov 2016 20:03:38 GMT</pubDate></item><item><title><![CDATA[Reply to NppPluginNET 64-bit? on Tue, 08 Nov 2016 10:44:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/chcg" aria-label="Profile: chcg">@<bdi>chcg</bdi></a>  Great.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/19084</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/19084</guid><dc:creator><![CDATA[Kasper Graversen]]></dc:creator><pubDate>Tue, 08 Nov 2016 10:44:52 GMT</pubDate></item><item><title><![CDATA[Reply to NppPluginNET 64-bit? on Sat, 05 Nov 2016 00:36:07 GMT]]></title><description><![CDATA[<p dir="auto">Created <a href="https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net/pull/19" rel="nofollow ugc">https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net/pull/19</a> therefore.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/19039</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/19039</guid><dc:creator><![CDATA[chcg]]></dc:creator><pubDate>Sat, 05 Nov 2016 00:36:07 GMT</pubDate></item><item><title><![CDATA[Reply to NppPluginNET 64-bit? on Fri, 04 Nov 2016 23:54:51 GMT]]></title><description><![CDATA[<p dir="auto">Caused by problematic pointer arithmetic in</p>
<pre><code>    public void Add(FuncItem funcItem)
</code></pre>
<p dir="auto">and<br />
public void RefreshItems()</p>
<p dir="auto">in  class FuncItems in NppPluginNETHelper.cs, like:</p>
<pre><code>        IntPtr ptrPosNewItem = (IntPtr)((int)newPointer + oldSize);
</code></pre>
<p dir="auto">So the cast to int from type IntPtr shortens the pointer for X64, see e.g.</p>
<p dir="auto"><a href="https://blogs.msdn.microsoft.com/jaredpar/2008/11/11/properly-incrementing-an-intptr/" rel="nofollow ugc">https://blogs.msdn.microsoft.com/jaredpar/2008/11/11/properly-incrementing-an-intptr/</a><br />
or<br />
<a href="https://stackoverflow.com/questions/1866236/add-offset-to-intptr" rel="nofollow ugc">https://stackoverflow.com/questions/1866236/add-offset-to-intptr</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/19038</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/19038</guid><dc:creator><![CDATA[chcg]]></dc:creator><pubDate>Fri, 04 Nov 2016 23:54:51 GMT</pubDate></item><item><title><![CDATA[Reply to NppPluginNET 64-bit? on Mon, 31 Oct 2016 09:43:44 GMT]]></title><description><![CDATA[<p dir="auto">One of your questions is <em>“Does anyone know whether there’s a good way to get debugging information out of the plugin loading process, to get an idea of what any errors might be?”</em>. I wrote a <strong>try</strong>…<strong>catch</strong> around part of the plugin start up code and write the results into a buffer. Not the best approach but a workaround for use during plugin development. See more details on <a href="http://stackoverflow.com/a/28692231/546871" rel="nofollow ugc">Stack Overflow</a>.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/18925</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/18925</guid><dc:creator><![CDATA[AdrianHHH]]></dc:creator><pubDate>Mon, 31 Oct 2016 09:43:44 GMT</pubDate></item><item><title><![CDATA[Reply to NppPluginNET 64-bit? on Sun, 30 Oct 2016 16:01:01 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">Does anyone know of a shared/maintained repo for this project?</p>
</blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/kasper-graversen" aria-label="Profile: Kasper-Graversen">@<bdi>Kasper-Graversen</bdi></a> has done some great work updating it. <a href="https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net" rel="nofollow ugc">https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net</a></p>
<p dir="auto">As to your other questions, I can’t say since I don’t use C#.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/18918</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/18918</guid><dc:creator><![CDATA[dail]]></dc:creator><pubDate>Sun, 30 Oct 2016 16:01:01 GMT</pubDate></item></channel></rss>