<?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>Messy Mind &#187; gffi</title>
	<atom:link href="http://www.messy-mind.net/tag/gffi/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.messy-mind.net</link>
	<description>Welcome to the tangle in my head.</description>
	<lastBuildDate>Wed, 09 Nov 2011 22:39:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>GFFI</title>
		<link>http://www.messy-mind.net/2009/gffi/</link>
		<comments>http://www.messy-mind.net/2009/gffi/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 07:00:40 +0000</pubDate>
		<dc:creator>Clam</dc:creator>
				<category><![CDATA[Game Maker]]></category>
		<category><![CDATA[call]]></category>
		<category><![CDATA[dll]]></category>
		<category><![CDATA[ffi]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[gffi]]></category>
		<category><![CDATA[gm]]></category>
		<category><![CDATA[maker]]></category>

		<guid isPermaLink="false">http://www.messy-mind.net/2009/gffi/</guid>
		<description><![CDATA[GFFI – Game Maker Foreign Function Interface
GFFI is a dll that allows you to call functions from other dlls.
It is much more flexible than external_call, supporting
all the basic data types in C, as well as providing advanced features for
working with structs and arrays. There are no restrictions on the
number of string arguments (or any other [...]]]></description>
			<content:encoded><![CDATA[<p>GFFI – Game Maker Foreign Function Interface</p>
<p>GFFI is a dll that allows you to call functions from other dlls.<br />
It is much more flexible than external_call, supporting<br />
all the basic data types in C, as well as providing advanced features for<br />
working with structs and arrays. There are no restrictions on the<br />
number of string arguments (or any other argument type for that matter)<br />
other than Game Maker’s 16 argument limit (this can be worked around<br />
in future if the need is there). The functionality provided is similar<br />
to Python’s ctypes module and .NET’s P/Invoke system.</p>
<p>The speed should be comparable to external_call. There is slightly more overhead<br />
due to the dynamic nature of the code, which uses transparent type conversion<br />
and intelligent assembly code. Through the use of Gmapi, all the<br />
functions available for use are inserted as a builtin GM function. There is no<br />
interpreted code involved once you call a GFFI function. Nearly all the scripts<br />
provided are placeholders to avoid syntax errors, they also contain documentation.</p>
<p>I hope people find this DLL useful, I used it as an opportunity to learn some C<br />
(and then hastily tacked on a C++ library).<br />
I’ve included a few basic examples of usage – it’s perfect for making a few<br />
WinAPI calls without writing an ad-hoc wrapper dll.</p>
<p>Update: I released this just before GM8 came out. I just added support for GM8 as well.</p>
<p><a href="http://www.messy-mind.net/uploads/2009/12/gffi-1.1.zip">GFFI 1.1</a></p>
<img src="http://www.messy-mind.net/?ak_action=api_record_view&id=490&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.messy-mind.net/2009/gffi/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

