###Function###
DllCall

###Description###
Dynamically calls a function in a DLL.

###Syntax###
DllCall ( "dll", "return type", "function" [, "type1", param1 [, "type n", param n]] )

###Parameters###
@@ParamTable@@
dll
	The filename of the DLL to use. eg. "user32.dll".  A handle obtained from DllOpen can also be used (See Remarks).
return type
	The return type of the function (see below).
function
	The name of the function in the DLL to call, eg. "MessageBox"
type
	[optional] The type of the parameter (see remarks).
param
	[optional] The actual parameter (see remarks).
@@End@@


###ReturnValue###
See remarks.

###Remarks###
If a dll filename is given then the DLL is automatically loaded and then closed at the end of the call.  If you want to manually control the loading and unloading of the DLL then you should use DllOpen and DllClose and use a handle instead of a filename in this function.

You can have as many "types" and "param" as you like.  See the examples below that use a number of parameters.

Valid Types are:

@@ParamTable@@
<b>Type</b>
	<b>Details</b>
none
	no value (only valid for return type - equivalent to void in C)
short
	a 16 bit integer
int
	a 32 bit integer
long
	a 32 bit integer
short_ptr
	a pointer to a 16 bit integer 
int_ptr
	a pointer to a 32 bit integer
long_ptr
	a pointer to a 32 bit integer
str
	a string
wstr
	a wide character string (converted to/from an ANSI string during the call)
hwnd
	a window handle
ptr
	a general pointer (void *)
@@End@@

If the function call fails then @error is set to 1.  Otherwise an array is returned that contains the function return value and a copy of all the parameters (including parameters that the function may have modified).
$return[0] = function return value
$return[1] = param1
$return[2] = param2
...
$return[n] = paramn


###Related###
Keine.


###Example###
@@IncludeExample@@
