<?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; ip address</title>
	<atom:link href="http://wizard-soft.com/blog/tag/ip-address/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>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>
	</channel>
</rss>

