<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>pnotepad.org forums &#187; Topic: Building demo Extension</title>
		<link>http://pnotepad.org/forums/topic/592</link>
		<description>Programmer&#039;s Notepad Forums</description>
		<language>en-US</language>
		<pubDate>Thu, 09 Feb 2012 06:28:25 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.3</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://pnotepad.org/forums/search.php</link>
		</textInput>
		<atom:link href="http://pnotepad.org/forums/rss/topic/592" rel="self" type="application/rss+xml" />

		<item>
                        <title>Building demo Extension (simon)</title>
			<link>http://pnotepad.org/forums/topic/592#post-2113</link>
			<pubDate>Wed, 27 May 2009 20:37:35 +0000</pubDate>
			<dc:creator>simon</dc:creator>
			<guid isPermaLink="false">2113@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Yes, I'm really looking forward to the VS2010 C++ enhancements. I have it installed at work and plan to get the beta onto my laptop too and have a go building PN with it.
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Building demo Extension (NickDMax)</title>
			<link>http://pnotepad.org/forums/topic/592#post-2112</link>
			<pubDate>Wed, 27 May 2009 17:13:53 +0000</pubDate>
			<dc:creator>NickDMax</dc:creator>
			<guid isPermaLink="false">2112@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Ah! You know I have VS6, and VS 2003 professional, and 2008 express and none are good enough. Yet I really don't want to buy 2008 with 2010 already peeking around the corner as I am very interested in the C++0x extensions so I really would rather hold out.
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Building demo Extension (simon)</title>
			<link>http://pnotepad.org/forums/topic/592#post-2111</link>
			<pubDate>Wed, 27 May 2009 13:41:52 +0000</pubDate>
			<dc:creator>simon</dc:creator>
			<guid isPermaLink="false">2111@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;You mentioned above that you're using VS2008 express, and I've never tried to get PN to build with the express version. Last time I checked the express version doesn't include the full ATL distribution which means that WTL (the UI library PN uses) won't build properly - this would explain the _Module errors. It's annoying, but it means that without a paid-for edition you can only build PN extensions and not the full code.
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Building demo Extension (NickDMax)</title>
			<link>http://pnotepad.org/forums/topic/592#post-2110</link>
			<pubDate>Wed, 27 May 2009 03:40:34 +0000</pubDate>
			<dc:creator>NickDMax</dc:creator>
			<guid isPermaLink="false">2110@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Thanks... I have been trying to compile PN as well with little success. I am not at that computer to share the errors (something to do with undefined _Module in atl and wpt errors). Basically I have had very little success with VS2008 and this project. :) but thanks for the SDK update! At the moment that is more my concern -- I figure I will try my hand at an extension.
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Building demo Extension (simon)</title>
			<link>http://pnotepad.org/forums/topic/592#post-2102</link>
			<pubDate>Tue, 26 May 2009 12:24:59 +0000</pubDate>
			<dc:creator>simon</dc:creator>
			<guid isPermaLink="false">2102@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;I built a VS2008 extension over the weekend, and had some problems with the existing demo project - the release build configuration doesn't reference the .def file so doesn't export the PN loading points properly. This means PN can't load the plugin properly. I changed this in my test project and got the plugin working ok. I'll update the SDK soon.
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Building demo Extension (simon)</title>
			<link>http://pnotepad.org/forums/topic/592#post-2097</link>
			<pubDate>Wed, 20 May 2009 14:19:14 +0000</pubDate>
			<dc:creator>simon</dc:creator>
			<guid isPermaLink="false">2097@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Glad to hear you got it working, although it's weird that you needed to build Debug in order to get the extension to work. I would have hoped that it would work either way - and certainly release would be preferable.&#60;/p&#62;
&#60;p&#62;I'll have a go at using VS2008 for this myself some time, I've only used 2005 so far.
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Building demo Extension (NickDMax)</title>
			<link>http://pnotepad.org/forums/topic/592#post-2096</link>
			<pubDate>Wed, 20 May 2009 12:43:22 +0000</pubDate>
			<dc:creator>NickDMax</dc:creator>
			<guid isPermaLink="false">2096@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Got everything working. The problem really just was the Debug build vs the release build. Thanks for the help.
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Building demo Extension (NickDMax)</title>
			<link>http://pnotepad.org/forums/topic/592#post-2093</link>
			<pubDate>Wed, 20 May 2009 02:27:31 +0000</pubDate>
			<dc:creator>NickDMax</dc:creator>
			<guid isPermaLink="false">2093@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Ah... If I use a release build it will not load, but a debug build does.&#60;/p&#62;
&#60;p&#62;I have revision 974 headers: extiface.h, IOptions.h, pnextstring.h, and allocator.h
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Building demo Extension (NickDMax)</title>
			<link>http://pnotepad.org/forums/topic/592#post-2092</link>
			<pubDate>Wed, 20 May 2009 02:23:32 +0000</pubDate>
			<dc:creator>NickDMax</dc:creator>
			<guid isPermaLink="false">2092@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Well here is the irritating part: When attached to the debugger it worked. Well is still put up the &#38;quot;Didn't Work!&#38;quot; message box but at least I know that the process ran. So apparently the dll was not getting loaded.
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Building demo Extension (simon)</title>
			<link>http://pnotepad.org/forums/topic/592#post-2087</link>
			<pubDate>Tue, 19 May 2009 14:46:55 +0000</pubDate>
			<dc:creator>simon</dc:creator>
			<guid isPermaLink="false">2087@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;You should be able to set the debugger in visual studio to start PN and see it load your dll. You can then put a breakpoint on the init function and see if it's being called. Which version of PN are you trying against, 970? You should make sure you have an up-to-date extiface.h from the main PN tree (the published SDK needs updating). It sounds like you've done that, but I wanted to make sure you had the right files.
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Building demo Extension (NickDMax)</title>
			<link>http://pnotepad.org/forums/topic/592#post-2084</link>
			<pubDate>Tue, 19 May 2009 04:46:24 +0000</pubDate>
			<dc:creator>NickDMax</dc:creator>
			<guid isPermaLink="false">2084@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;tried updating headers to the latest code on the SVN -- no change.
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Building demo Extension (NickDMax)</title>
			<link>http://pnotepad.org/forums/topic/592#post-2083</link>
			<pubDate>Tue, 19 May 2009 03:38:33 +0000</pubDate>
			<dc:creator>NickDMax</dc:creator>
			<guid isPermaLink="false">2083@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;So I have been trying to get the demo extension built and so far have had no success. I followed the instructions on the wiki and indeed the dll seems to be picked up (I can't update it when pn.exe is running), but it does not show up on the extensions page. &#60;/p&#62;
&#60;p&#62;I also tried just a blank version of the template with the same results.&#60;/p&#62;
&#60;p&#62;Are there any debugging features? anyway to tell if the extension was not successfully initialized?&#60;/p&#62;
&#60;p&#62;I am using VC++ Express 2008 (Win32) in release mode.&#60;/p&#62;
&#60;p&#62;My current debugging code (since it was not working):&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;bool __stdcall pn_init_extension(int iface_version, extensions::IPN* pn)
{
	::MessageBox(NULL, _T(&#38;quot;Made it here...&#38;quot;), _T(&#38;quot;Demo Plugin&#38;quot;), MB_OK);
	if(iface_version != PN_EXT_IFACE_VERSION) {
		::MessageBox(NULL, _T(&#38;quot;Didn&#38;#39;t Work!&#38;quot;), _T(&#38;quot;Demo Plugin&#38;quot;), MB_ICONERROR &#124; MB_OK);
		return false;
	}

	//g_pn = pn;

	// Do your initialisation stuff here...
	//pn-&#38;gt;GetGlobalOutputWindow()-&#38;gt;AddToolOutput(&#38;quot;Hello from the demo extension!&#38;quot;);

	//extensions::IAppEventSinkPtr appSink(new AppEventSink());
	//pn-&#38;gt;AddEventSink(appSink);

	//Menu menu;
	//pn-&#38;gt;AddPluginMenuItems(&#38;amp;menu);
	::MessageBox(NULL, _T(&#38;quot;It Worked!&#38;quot;), _T(&#38;quot;Demo Plugin&#38;quot;), MB_ICONERROR &#124; MB_OK);
	return true;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I built (release), I ran &#38;quot;pn.exe --findexts&#38;quot;, I ran pn -- no message boxes, no line item in the extensions list.&#60;/p&#62;
&#60;p&#62;any thoughts?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>

