###User Defined Function###
_MemoryClose

###Description###
Closes the process handle opened by using _MemoryOpen.

###Syntax###
_MemoryClose($ah_Handle)

###Parameters###
@@ParamTable@@
$ah_Handle
	An array containing the Dll handle and the handle of the open process returned by _MemoryOpen.
@@End@@

###ReturnValue###
@@ReturnTable@@
Success:	1.
Failure:	0.
@Error:		0 = No error.
		1 = Invalid $ah_Handle.
		2 = Unable to close the process handle.
@@End@@


###Remarks###
None.


###Related###
_MemoryOpen, _MemoryRead, _MemoryWrite, _MemoryPointerRead, _MemoryPointerWrite


###Example###
@@IncludeExample@@
;This example creates a sample GUI and shows how to use _MemoryOpen
;and _MemoryClose to open and close access to it's memory data.
#include <Memory.au3>

;create a sample GUI 
GUICreate("Sample", 160, 80)
GUICtrlCreateLabel("Dll Handle = ", 5, 5)
GUICtrlCreateLabel("Open Process Handle = ", 5, 25)
$CloseGUI = GUICtrlCreateButton("Close", 55, 55, 50, 20)
GUISetState()

;get the process ID of the process
$ProcessID = WinGetProcess("Sample")

;obtain the Dll handle, the process handle, and enable memory access
$ProcessInformation = _MemoryOpen($ProcessID)

GUICtrlCreateLabel($ProcessInformation[0], 70, 5) ; Open process handle
GUICtrlCreateLabel($ProcessInformation[1], 125, 25) ; Dll handle

;close the process handle and disable memory access
_MemoryClose($ProcessInformation)

While(1)
	Sleep(50)
	$msg = GUIGetMsg()
	If $msg = $CloseGUI Then Exit
WEnd
@@End@@