#include <WinAPIFiles.au3>
Local $MapFile = _WinAPI_OpenFileMapping('DataExchangeFile')
If Not $MapFile Then Exit
Local $PosFile = _WinAPI_MapViewOfFile($MapFile)
Local $StructFile = DllStructCreate('wchar string[512];int id[10]', $PosFile)
Local $Form2 = GUICreate("Form2", 548, 315, -1, -1)
Local $Label1 = GUICtrlCreateLabel("Label1", 56, 32, 332, 17)
Local $Label2 = GUICtrlCreateLabel("Label2", 56, 72, 340, 17)
Local $Label3 = GUICtrlCreateLabel("Label3", 56, 120, 332, 17)
Local $Label4 = GUICtrlCreateLabel("Label4", 56, 160, 332, 17)
Local $Label5 = GUICtrlCreateLabel("Label5", 52, 210, 332, 17)
GUISetState()
While 1
Switch GUIGetMsg()
Case -3
Exit
Case $Label1
DllStructSetData($StructFile, 'string', GUICtrlRead($Label1))
DllStructSetData($StructFile, 'id', $Label1)
Case $Label2
DllStructSetData($StructFile, 'string', GUICtrlRead($Label2))
DllStructSetData($StructFile, 'id', $Label2)
Case $Label3
DllStructSetData($StructFile, 'string', GUICtrlRead($Label3))
DllStructSetData($StructFile, 'id', $Label3)
Case $Label4
DllStructSetData($StructFile, 'string', GUICtrlRead($Label4))
DllStructSetData($StructFile, 'id', $Label4)
Case $Label5
DllStructSetData($StructFile, 'string', GUICtrlRead($Label5))
DllStructSetData($StructFile, 'id', $Label5)
EndSwitch
WEnd