<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Wizard Software - All things Delphi (and some PHP) &#187; Delphi</title>
	<atom:link href="http://wizard-soft.com/blog/tag/delphi/feed/" rel="self" type="application/rss+xml" />
	<link>http://wizard-soft.com/blog</link>
	<description>Delphi, Pascal, PHP, programming and (Wizard) Software</description>
	<lastBuildDate>Tue, 01 Dec 2009 06:36:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Firefox Addons, XUL, XPCOM, Delphi and a few headaches</title>
		<link>http://wizard-soft.com/blog/2009/11/30/firefox-addons-xul-xpcom-delphi-and-a-few-headaches/</link>
		<comments>http://wizard-soft.com/blog/2009/11/30/firefox-addons-xul-xpcom-delphi-and-a-few-headaches/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 12:40:00 +0000</pubDate>
		<dc:creator>Softy</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[graabr]]></category>
		<category><![CDATA[addons]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[XPCOM]]></category>
		<category><![CDATA[XUL]]></category>

		<guid isPermaLink="false">http://wizard-soft.com/blog/?p=151</guid>
		<description><![CDATA[I wanted to share some information on creating Firefox addons/extensions (or however you care to refer to them). Not any old Firefox addons but XPCOM addons. It&#8217;s taken a couple of weeks of evening work to turn my Graabr Delphi application (www.graabr.com) into a Firefox Addon. Why bother?  Audience, I guess.
Anyhow, creating a non-XPCOM addon [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to share some information on creating Firefox addons/extensions (or however you care to refer to them). Not any old Firefox addons but XPCOM addons. It&#8217;s taken a couple of weeks of evening work to turn my Graabr Delphi application (<a href="http://graabr.com">www.graabr.com</a>) into a Firefox Addon. Why bother?  Audience, I guess.</p>
<p>Anyhow, creating a non-XPCOM addon using javascript is relatively straightforward. But, an XPCOM is a different story. You need some Delphi-friendly Firefox header files which do not appear up-to-date. You also need a whole lot of patience. I found lots of snippets of info on Delphi XPCOM, but most &#8216;answers&#8217; only raised further issues. Eventually, I rebuilt Graabr as a Delphi dll with three exposed interfaces. That is not enough for Firefox though. You cannot simply call a Delphi dll from Firefox, not without all the Firefox libs. So, what next? A download of the now free Visual C++ 2008 Express Edition (<a href="http://http://www.microsoft.com/Express/VC/">http://www.microsoft.com/Express/VC/</a>). Incidentally, and one for another post, why is Delphi 2010 so expensive? After download and install, a lot of googling to get a XLRunner sample working in C++. Then, build a C++ dll wrapper, compatible with Firefox around the Delphi DLL. And voila, problem solved. Here is a link to the finished Graabr add-on:</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/52178/">https://addons.mozilla.org/en-US/firefox/addon/52178/</a></p>
<p>So, how does everything hang together? Well, after creating the extension framework, or environment, with all the required folders, files, etc (see here: <a href="https://developer.mozilla.org/en/Building_an_Extension">https://developer.mozilla.org/en/Building_an_Extension</a>), I created a small javascript app. which interfaces between Firefox and the C++ DLL. You can examine the source of this file by looking in the FF extension folder.  The javascript calls the C++ DLL which in turn calls the good old Delphi DLL where all the screen grabbing, uploading, etc work is done.  After creating the environment, files, structure, etc, you zip it all up into a .xpi file (zippy as they call it) and upload it to FireFox addons.</p>
<p>Oh, it&#8217;s oh so simple <img src='http://wizard-soft.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://wizard-soft.com/blog/2009/11/30/firefox-addons-xul-xpcom-delphi-and-a-few-headaches/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting the local ip address with Delphi</title>
		<link>http://wizard-soft.com/blog/2009/03/22/getting-the-local-ip-address-with-delphi/</link>
		<comments>http://wizard-soft.com/blog/2009/03/22/getting-the-local-ip-address-with-delphi/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 12:34:04 +0000</pubDate>
		<dc:creator>Softy</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[ip address]]></category>

		<guid isPermaLink="false">http://wizard-soft.com/blog/?p=109</guid>
		<description><![CDATA[Ever wanted to get your computer&#8217;s local ip address?  Well here&#8217;s a code snippet to help you along!
{&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;}
function LocalIP: string;
type
TaPInAddr = array[0..10] of PInAddr;
PaPInAddr = ^TaPInAddr;
var
phe: PHostEnt;
pptr: PaPInAddr;
Buffer: array[0..63] of Char;
I: Integer;
GInitData: TWSAData;
begin
WSAStartup($101, GInitData);
Result := &#8221;;
GetHostName(Buffer, SizeOf(Buffer));
phe := GetHostByName(buffer);
if phe = nil then Exit;
pPtr := PaPInAddr(phe^.h_addr_list);
I := 0;
while pPtr^[I] &#60;&#62; nil do
begin
Result := inet_ntoa(pptr^[I]^);
Inc(I);
end;
WSACleanup;
end;
]]></description>
			<content:encoded><![CDATA[<p>Ever wanted to get your computer&#8217;s local ip address?  Well here&#8217;s a code snippet to help you along!</p>
<blockquote><p>{&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;}</p>
<p>function LocalIP: string;<br />
type<br />
TaPInAddr = array[0..10] of PInAddr;<br />
PaPInAddr = ^TaPInAddr;<br />
var<br />
phe: PHostEnt;<br />
pptr: PaPInAddr;<br />
Buffer: array[0..63] of Char;<br />
I: Integer;<br />
GInitData: TWSAData;</p>
<p>begin<br />
WSAStartup($101, GInitData);<br />
Result := &#8221;;<br />
GetHostName(Buffer, SizeOf(Buffer));<br />
phe := GetHostByName(buffer);<br />
if phe = nil then Exit;</p>
<p>pPtr := PaPInAddr(phe^.h_addr_list);</p>
<p>I := 0;</p>
<p>while pPtr^[I] &lt;&gt; nil do<br />
begin<br />
Result := inet_ntoa(pptr^[I]^);<br />
Inc(I);<br />
end;</p>
<p>WSACleanup;<br />
end;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://wizard-soft.com/blog/2009/03/22/getting-the-local-ip-address-with-delphi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No Delphi Programmer should be without this resource</title>
		<link>http://wizard-soft.com/blog/2009/01/02/hello-world/</link>
		<comments>http://wizard-soft.com/blog/2009/01/02/hello-world/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 09:49:36 +0000</pubDate>
		<dc:creator>Softy</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://wizard-soft.com/blog/?p=1</guid>
		<description><![CDATA[Time and time again my google delphi search leads me to this excellent resource of information on programming and the fundamentals of Delphi:
http://www.delphibasics.co.uk/index.html
Thanks Neil for a truly useful resource!
]]></description>
			<content:encoded><![CDATA[<p>Time and time again my google delphi search leads me to this excellent resource of information on programming and the fundamentals of Delphi:</p>
<p><a href="http://www.delphibasics.co.uk/index.html" target="_blank">http://www.delphibasics.co.uk/index.html</a></p>
<p>Thanks Neil for a truly useful resource!</p>
]]></content:encoded>
			<wfw:commentRss>http://wizard-soft.com/blog/2009/01/02/hello-world/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

