nullschritt, there seems to be a problem after the GDI+ initialising part in your code which results in AutoIt crashing. I modified it (a lot) to check for the errors:
; *** Start added by AutoIt3Wrapper ***
#include <GUIConstantsEx.au3>
; *** End added by AutoIt3Wrapper ***
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Add_Constants=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GUIConstants.au3>
#include <Webcam.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
#include <WinAPI.au3>
#include <WindowsConstants.au3>
#include <GDIPlus.au3>
#include <Memory.au3>
$gui = GUICreate("Webcam UDF Test",320,240)
_WebcamInit()
$camcontrol = _Webcam($gui,320,240,0,0)
GUISetState(@SW_SHOW)
Global $i = 1
While 1
$i = $i+1
Sleep(1000)
_MyFunc()
WEnd
Func _MyFunc()
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then
_WebcamStop()
Exit
EndIf
_WebcamSnapShot(@ScriptDir & "\snap" & $i & ".bmp")
EndFunc