- Offizieller Beitrag
Hi,
nachdem ich die Webcam-UDF von Ludocus etwas erweitert habe, ist sie nun auch sinnvoll nutzbar. (außer Video-Aufzeichnung, die schmiert noch ab - da bin ich noch dran)
Hier mal ein kleines Bsp.:
- Kamera ein/ausschalten
- Toggle Standbild/Livebild
- Schnappschuß (gespeichert wird im @ScriptDir)
- *.avi -Aufzeichnung (Speicherplatz in Einstellungs-INI bestimmbar) <== Bsp. 2 (MyWebcam)
Edit 13.09.2011
Die zweite Anwendung basiert auf der ersten, hat aber zusätzlich auch die Record-Funktion. In der Original-UDF fehlten da die entscheidenden Funktionen um Aufzunehmen ohne dass die Anwendung einfriert. Das Problem ist nun gelöst.
Resultierend daraus ist die Konstantendatei um eine Struktur erweitert. Die Funktionen habe ich jetzt in eine eigene Datei gepackt. Wenn ihr sie nicht im registrierten Include-Ordner speichert, muß zumindest die Konstanten-Datei im selben Ordner, wie die Funktionsdatei gespeichert werden.
Ich habe nur die notwendigen UDF-Funktionen gleich in das Skript gepackt (getrennt in Bsp. MyWebcam). Die Konstanten habe ich jedoch in die "WebcamConstants.au3" ausgelagert.
SimpleWebcamApp
#Region - TimeStamp
; 2011-08-23 16:48:25
#EndRegion - TimeStamp
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <WebcamConstants.au3>
; =============================================================================
; Titel..........: SimpleWebcamApp.au3
; Beschreibung...: Webcam Ein/Aus, Live/Standbild, Schnappschuß (*.bmp) ==> im @ScriptDir
; Version AutoIt.: 3.3.6.1
; Author.........: BugFix
; ...............: Webcam Funktionen von Ludocus und pierrotm777
; ...............: Modifiziert BugFix
; =============================================================================
Opt('GuiOnEventMode', 1)
Opt('MustDeclareVars', 1)
Global $avicap = DllOpen("avicap32.dll")
Global $user = DllOpen("user32.dll")
Global $hWnd_Camera, $idCam, $isCamera = 0, $btCamera, $btFoto, $rLive
[/autoit] [autoit][/autoit] [autoit]$hWnd_Camera = GUICreate('Webcam', 340, 348, -1, -1)
GUISetOnEvent($GUI_EVENT_CLOSE, '_exit', $hWnd_Camera)
; == Capturing für Fenster aktivieren:
$idCam = _WebcamOpen($hWnd_Camera, 10, 10, 320, 240)
$btFoto = GUICtrlCreateButton('Foto', 10, 260, 48, 22)
GUICtrlSetOnEvent(-1, '_Snap')
GUICtrlSetState(-1, $GUI_DISABLE)
$btCamera = GUICtrlCreateButton('Kamera EIN', 10, 315, 120, 25)
GUICtrlSetOnEvent(-1, '_CameraOnOff')
GUICtrlSetColor(-1, 0x008000)
GUICtrlSetFont(-1, 10, 600)
$rLive = GUICtrlCreateRadio('', 155, 322, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetOnEvent(-1, '_PreviewOnOff')
ControlFocus($hWnd_Camera, '', $rLive)
GUICtrlCreateLabel('Live', 175, 319, 60)
GUICtrlSetColor(-1, 0x008000)
GUICtrlSetFont(-1, 10, 600)
GUICtrlCreateRadio('', 230, 322, 17)
GUICtrlSetOnEvent(-1, '_PreviewOnOff')
GUICtrlCreateLabel('Standbild', 250, 319, 75)
GUICtrlSetColor(-1, 0x008000)
GUICtrlSetFont(-1, 10, 600)
WinSetOnTop($hWnd_Camera, '', 1)
GUISetState(@SW_SHOW, $hWnd_Camera)
While True
Sleep(50)
WEnd
Func _exit()
_WebcamClose($idCam)
Exit
EndFunc
Func _CameraOnOff()
; == Kamera (de)aktivieren - Standbild An/Aus
If $isCamera = 0 Then
GUICtrlSetData($btCamera, 'Kamera AUS')
GUICtrlSetColor($btCamera, 0xFF0000)
GUICtrlSetState($btFoto, $GUI_ENABLE)
_WebcamActive($idCam)
Else
GUICtrlSetData($btCamera, 'Kamera EIN')
GUICtrlSetColor($btCamera, 0x008000)
GUICtrlSetState($btFoto, $GUI_DISABLE)
_WebcamInactive($idCam)
EndIf
$isCamera = BitXOR($isCamera, 1)
If $isCamera = 1 Then _PreviewOnOff()
EndFunc
Func _PreviewOnOff()
; == Livebild An/Aus
If Not $isCamera Then
_WebcamActive($idCam)
$isCamera = 1
GUICtrlSetData($btCamera, 'Kamera AUS')
GUICtrlSetColor($btCamera, 0xFF0000)
GUICtrlSetState($btFoto, $GUI_ENABLE)
EndIf
If BitAND(GUICtrlRead($rLive), $GUI_CHECKED) Then
_WebcamPreview($idCam)
Else
_WebcamStopPreview($idCam)
EndIf
EndFunc
Func _Snap()
Local $sFile = @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC & '.bmp', $sSave, $mb
If _WebcamSnap($idCam, @ScriptDir & '\' & $sFile) = 1 Then
WinSetOnTop($hWnd_Camera, '', 0)
While True
Do
$sSave = InputBox('Schnappschuß speichern', 'Bitte Dateinamen eingeben')
If $sSave = '' Then $mb = MsgBox(262180, 'Kein Dateiname vergeben', 'Eingabe Wiederholen?')
Until $sSave <> '' Or $mb = 7
If $sSave = '' Or $mb = 7 Then
WinSetOnTop($hWnd_Camera, '', 1)
FileDelete(@ScriptDir & '\' & $sFile)
Return
EndIf
If StringRight($sSave, 4) <> '.bmp' Then $sSave &= '.bmp'
If FileExists(@ScriptDir & '\' & $sSave) Then
MsgBox(262192, 'Fehler', $sSave & ' existiert bereits!', 3)
Else
ExitLoop
EndIf
WEnd
FileMove(@ScriptDir & '\' & $sFile, @ScriptDir & '\' & $sSave)
EndIf
WinSetOnTop($hWnd_Camera, '', 1)
EndFunc
; ==================== webcam - UDF von Ludocus, BugFix ==========================================================================================
[/autoit] [autoit][/autoit] [autoit];===============================================================================
; Description: Open's a webcam preview screen in your gui
; Syntax: _WebcamOpen($sHwnd, $sLeft, $sTop, $sWidth, $sHeight)
; Parameter(s): $sHwnd - The handle of the gui
; $sLeft - Left coord. of the preview screen
; $sTop - Top coord. of the preview screen
; $sWidth - Width of the preview screen
; $sHeight - Height of the preview screen
; Requirement(s): A webcam
; Return Value(s): On Success - Returns id needed for other controls
; On Failure - Returns -1
; Author(s): Ludocus
; Note(s): None
;===============================================================================
Func _WebcamOpen($sHwnd, $sLeft, $sTop, $sWidth, $sHeight)
Local $cap = DllCall($avicap, "int", "capCreateCaptureWindow", "str", "cap", "int", BitOR($WS_CHILD,$WS_VISIBLE), "int", $sLeft, "int", $sTop, "int", $sWidth, "int", $sHeight, "hwnd", $sHwnd, "int", 1)
If @error Then Return -1
Return $cap[0]
EndFunc
;===============================================================================
; Description: Closes the preview screen created with _WebcamOpen
; Syntax: _WebcamClose($sId)
; Parameter(s): $sId - Id (returned from _WebcamOpen)
; Requirement(s): A webcam
; Return Value(s): On Success - Returns 1
; On Failure - Returns 0
; Author(s): Ludocus
; Note(s): None
;===============================================================================
Func _WebcamClose($sId)
DllCall($user, "int", "SendMessage", "hWnd", $sId, "int", $WM_CAP_SET_PREVIEW, "int", 0, "int", 0);ferme le preview
DllCall($user, "int", "SendMessage", "hWnd", $sId, "int", $WM_CAP_SET_CALLBACK_FRAME, "int", 0, "int", 0);ajout
DllCall($user, "int", "SendMessage", "hWnd", $sId, "int", $WM_CAP_END, "int", 0, "int", 0)
DllClose($user)
If @error Then
Return 0
Else
Return 1
EndIf
EndFunc
;===============================================================================
; Function Name....: _WebcamActive
; Description......: Connects the capture driver for specified webcam-id (default 0) to the capture window (like camera switch on)
; shows freeze image
; Parameter(s).....: $sId - Id (returned from _WebcamOpen)
; $WebCamId - specified webcam-id (default 0)
; Author(s)........: BugFix ( [email='bugfix@autoit.de'][/email] )
;===============================================================================
Func _WebcamActive($sId, $WebCamId=0)
DllCall($user, "int", "SendMessage", "hWnd", $sId, "int", $WM_CAP_DRIVER_CONNECT, "int", $WebCamId , "int", 0)
DllCall($user, "int", "SendMessage", "hWnd", $sId, "int", $WM_CAP_SET_SCALE, "int", 1, "int", 0)
DllCall($user, "int", "SendMessage", "hWnd", $sId, "int", $WM_CAP_SET_OVERLAY, "int", 1, "int", 0)
EndFunc
;===============================================================================
; Function Name....: _WebcamInactive
; Description......: Disonnects the capture driver from the capture window (like camera switch off)
; Parameter(s).....: $sId - Id (returned from _WebcamOpen)
; Author(s)........: BugFix ( [email='bugfix@autoit.de'][/email] )
;===============================================================================
Func _WebcamInactive($sId)
DllCall($user, "int", "SendMessage", "hWnd", $sId, "int", $WM_CAP_DRIVER_DISCONNECT, "int", 0, "int", 0)
EndFunc
;===============================================================================
; Function Name....: _WebcamPreview
; Description......: shows live image in the capture window
; Parameter(s).....: $sId - Id (returned from _WebcamOpen)
; Requirement(s)...: Run _WebcamActive before
; Author(s)........: Ludocus
;===============================================================================
Func _WebcamPreview($sId)
DllCall($user, "int", "SendMessage", "hWnd", $sId, "int", $WM_CAP_SET_PREVIEW, "int", 1, "int", 0)
DllCall($user, "int", "SendMessage", "hWnd", $sId, "int", $WM_CAP_SET_PREVIEWRATE, "int", 15, "int", 0)
EndFunc
;===============================================================================
; Function Name....: _WebcamStopPreview
; Description......: stops the live image in the capture window
; Parameter(s).....: $sId - Id (returned from _WebcamOpen)
; Author(s)........: Ludocus
;===============================================================================
Func _WebcamStopPreview($sId)
DllCall($user, "int", "SendMessage", "hWnd", $sId, "int", $WM_CAP_SET_PREVIEW, "int", 0, "int", 0)
EndFunc
;===============================================================================
; Description: Creates a Snapshot from a webcam
; Syntax: _WebcamSnap($sId, $sFile)
; Parameter(s): $sId - Id (returned from _WebcamOpen)
; $sFile - File to save the snapshot to (*.bmp)
; Requirement(s): A webcam
; Return Value(s): On Success - Returns 1
; On Failure - Returns 0
; Author(s): Ludocus
; Note(s): None
;===============================================================================
Func _WebcamSnap($sId, $sFile)
DllCall($user, "int", "SendMessage", "hWnd", $sId, "int", $WM_CAP_GRAB_FRAME_NOSTOP, "int", 0, "int", 0)
DllCall($user, "int", "SendMessage", "hWnd", $sId, "int", $WM_CAP_FILE_SAVEDIBA, "int", 0, "str", $sFile)
If @error Then
Return 0
Else
Return 1
EndIf
EndFunc
Web_Cam.au3 (v0.1)
#Region - TimeStamp
; 2011-09-13 18:49:24 v 0.1
#EndRegion - TimeStamp
#include-once
#include <WindowsConstants.au3>
#include <WebcamConstants.au3>
;===============================================================================
; Description: Open's a webcam capturing window in your gui
; Syntax: _WebcamOpen($sHwnd, $sLeft, $sTop, $sWidth, $sHeight)
; Parameter(s): $sHwnd - The handle of the gui
; $sLeft - Left coord. of the preview screen
; $sTop - Top coord. of the preview screen
; $sWidth - Width of the preview screen
; $sHeight - Height of the preview screen
; Requirement(s): A webcam
; Return Value(s): On Success - Returns id needed for other controls
; On Failure - Returns -1
; Author(s): Ludocus
; Modified: BugFix ( [email='bugfix@autoit.de'][/email] )
; Note(s): Sets the "fYield" param to 1, that allows user action during capturing (controls not frozen now)
;===============================================================================
Func _WebcamOpen($sHwnd, $sLeft, $sTop, $sWidth, $sHeight)
Local $cap = DllCall($Dll_avicap, "int", "capCreateCaptureWindow", "str", "cap", "int", BitOR($WS_CHILD,$WS_VISIBLE), "int", $sLeft, "int", $sTop, "int", $sWidth, "int", $sHeight, "hwnd", $sHwnd, "int", 1)
If @error Then Return -1
Local $tCAPTUREPARMS = __CAP_GET_SEQUENCE_SETUP($cap[0])
If @error Then Return -1
__CAP_SET_SEQUENCE_SETUP($cap[0], $tCAPTUREPARMS)
If @error Then Return -1
Return $cap[0]
EndFunc
;===============================================================================
; Description: Closes the preview screen created with _WebcamOpen
; Syntax: _WebcamClose($sId)
; Parameter(s): $sId - Id (returned from _WebcamOpen)
; Requirement(s): A webcam
; Return Value(s): On Success - Returns 1
; On Failure - Returns 0
; Author(s): Ludocus
; Note(s): None
;===============================================================================
Func _WebcamClose($sId)
DllCall($Dll_user, "int", "SendMessage", "hWnd", $sId, "int", $WM_CAP_SET_PREVIEW, "int", 0, "int", 0);ferme le preview
DllCall($Dll_user, "int", "SendMessage", "hWnd", $sId, "int", $WM_CAP_SET_CALLBACK_FRAME, "int", 0, "int", 0);ajout
DllCall($Dll_user, "int", "SendMessage", "hWnd", $sId, "int", $WM_CAP_END, "int", 0, "int", 0)
DllClose($Dll_user)
If @error Then
Return 0
Else
Return 1
EndIf
EndFunc
;===============================================================================
; Function Name....: _WebcamActive
; Description......: Connects the capture driver for specified webcam-id (default 0) to the capture window (like camera switch on)
; shows freeze image
; Parameter(s).....: $sId - Id (returned from _WebcamOpen)
; $WebCamId - specified webcam-id (default 0)
; Author(s)........: BugFix ( [email='bugfix@autoit.de'][/email] )
;===============================================================================
Func _WebcamActive($sId, $WebCamId=0)
DllCall($Dll_user, "int", "SendMessage", "hWnd", $sId, "int", $WM_CAP_DRIVER_CONNECT, "int", $WebCamId , "int", 0)
DllCall($Dll_user, "int", "SendMessage", "hWnd", $sId, "int", $WM_CAP_SET_SCALE, "int", 1, "int", 0)
DllCall($Dll_user, "int", "SendMessage", "hWnd", $sId, "int", $WM_CAP_SET_OVERLAY, "int", 1, "int", 0)
EndFunc
;===============================================================================
; Function Name....: _WebcamInactive
; Description......: Disonnects the capture driver from the capture window (like camera switch off)
; Parameter(s).....: $sId - Id (returned from _WebcamOpen)
; Author(s)........: BugFix ( [email='bugfix@autoit.de'][/email] )
;===============================================================================
Func _WebcamInactive($sId)
DllCall($Dll_user, "int", "SendMessage", "hWnd", $sId, "int", $WM_CAP_DRIVER_DISCONNECT, "int", 0, "int", 0)
EndFunc
;===============================================================================
; Function Name....: _WebcamPreview
; Description......: shows live image in the capture window
; Parameter(s).....: $sId - Id (returned from _WebcamOpen)
; Requirement(s)...: Run _WebcamActive before
; Author(s)........: Ludocus
;===============================================================================
Func _WebcamPreview($sId)
DllCall($Dll_user, "int", "SendMessage", "hWnd", $sId, "int", $WM_CAP_SET_PREVIEW, "int", 1, "int", 0)
DllCall($Dll_user, "int", "SendMessage", "hWnd", $sId, "int", $WM_CAP_SET_PREVIEWRATE, "int", 15, "int", 0)
EndFunc
;===============================================================================
; Function Name....: _WebcamStopPreview
; Description......: stops the live image in the capture window
; Parameter(s).....: $sId - Id (returned from _WebcamOpen)
; Author(s)........: Ludocus
;===============================================================================
Func _WebcamStopPreview($sId)
DllCall($Dll_user, "int", "SendMessage", "hWnd", $sId, "int", $WM_CAP_SET_PREVIEW, "int", 0, "int", 0)
EndFunc
;===============================================================================
; Description: Creates a Snapshot from a webcam
; Syntax: _WebcamSnap($sId, $sFile)
; Parameter(s): $sId - Id (returned from _WebcamOpen)
; Requirement(s): A webcam
; Return Value(s): On Success - Returns 1
; On Failure - Returns 0
; Author(s): Ludocus
; Note(s): None
;===============================================================================
Func _WebcamSnap($sId, $sFile)
DllCall($Dll_user, "int", "SendMessage", "hWnd", $sId, "int", $WM_CAP_GRAB_FRAME_NOSTOP, "int", 0, "int", 0)
DllCall($Dll_user, "int", "SendMessage", "hWnd", $sId, "int", $WM_CAP_FILE_SAVEDIBA, "int", 0, "str", $sFile)
If @error Then
Return 0
Else
Return 1
EndIf
EndFunc
;===============================================================================
; Description: Starts recording the webcam to file
; Syntax: _WebcamRecordStart($sId, $sFile)
; Parameter(s): $sId - Id (returned from _WebcamOpen)
; $sFile - File to save the movie to (*.avi)
; Requirement(s): A webcam
; Return Value(s): On Success - Returns 1
; On Failure - Returns 0
; Author(s): Ludocus
; Modified: BugFix ( [email='bugfix@autoit.de'][/email] )
; Note(s): Stop recording by: _WebcamRecordStop($Id, $sFile)
;===============================================================================
Func _WebcamRecordStart($sId, $sFile)
DllCall($Dll_user, "int", "SendMessage", "hWnd", $sId, "int", $WM_CAP_FILE_SET_CAPTURE_FILEA, "int", 0, "str", $sFile)
DllCall($Dll_user, "int", "SendMessage", "hWnd", $sId, "int", $WM_CAP_SEQUENCE, "int", 0, "int", 0)
If @error Then
Return 0
Else
Return 1
EndIf
EndFunc
;===============================================================================
; Description: Stops recording
; Syntax: _WebcamRecordStop($sId)
; Parameter(s): $sId - Id (returned from _WebcamOpen)
; Requirement(s): A webcam
; Return Value(s): On Success - Returns 1
; On Failure - Returns 0
; Author(s): Ludocus
; Note(s): None
;===============================================================================
Func _WebcamRecordStop($sId)
DllCall($Dll_user, "int", "SendMessage", "hWnd", $sId, "int", $WM_CAP_STOP, "int", 0, "int", 0)
If @error Then
Return 0
Else
Return 1
EndIf
EndFunc
;===============================================================================
; Description: De/Activate audio capturing
; Syntax: _WebcamAudioSet($sId [, $iOn])
; Parameter(s): $sId - Id (returned from _WebcamOpen)
; $iOn - 0 or 1 (Default) to switch Off/On
; Requirement(s): A webcam
; Return Value(s): On Success - Returns 1
; On Failure - Returns 0
; Author(s): BugFix ( [email='bugfix@autoit.de'][/email] )
; Note(s): By default in SEQUENCE_SETUP is capturing active
;===============================================================================
Func _WebcamAudioSet($sId, $iOn=1)
If $iOn <> 1 Then $iOn = 0
__CAP_SET_SEQUENCE_SETUP($sId, __CAP_GET_SEQUENCE_SETUP($sId), 'fCaptureAudio=' & $iOn)
If @error Then Return 0
Return 1
EndFunc
; == helper functions:
;===============================================================================
; Description: Reads the values of current capture parameter
; Syntax: __CAP_GET_SEQUENCE_SETUP($sId)
; Return Value(s): On Success - Returns the CAPTUREPARMS-structure
; On Failure - Returns 0, set error
; Author(s): BugFix ( [email='bugfix@autoit.de'][/email] )
;===============================================================================
Func __CAP_GET_SEQUENCE_SETUP($sId)
Local $aParamStruc[24] = [ _
'dwRequestMicroSecPerFrame','fMakeUserHitOKToCapture','wPercentDropForError','fYield','dwIndexSize','wChunkGranularity','fUsingDOSMemory','wNumVideoRequested', _
'fCaptureAudio','wNumAudioRequested','vKeyAbort','fAbortLeftMouse','fAbortRightMouse','fLimitEnabled','wTimeLimit','fMCIControl','fStepMCIDevice','dwMCIStartTime', _
'dwMCIStopTime','fStepCaptureAt2x','wStepCaptureAverageFrames','dwAudioBufferSize','fDisableWriteCache','AVStreamMaster']
Local $tCAPTUREPARMS = DllStructCreate($tagCAPTUREPARMS), $pCAPTUREPARMS = DllStructGetPtr($tCAPTUREPARMS)
Local $ret = DllCall($Dll_user, "int", "SendMessage", "hWnd", $sId, "int", $WM_CAP_GET_SEQUENCE_SETUP, "WPARAM", DllStructGetSize($tCAPTUREPARMS), "LPARAM", $pCAPTUREPARMS)
If @error Then
Return SetError(1,0,0)
Else
;~ For $i = 0 To 23
;~ ConsoleWrite($aParamStruc[$i] & @TAB & DllStructGetData($tCAPTUREPARMS, $aParamStruc[$i]) & @CRLF)
;~ Next
Return $tCAPTUREPARMS
EndIf
EndFunc
;===============================================================================
; Description: Sets one or more values in current capture parameter
; Syntax: __CAP_SET_SEQUENCE_SETUP($sId, $tCAPTUREPARMS [, $vParams=0])
; Parameter(s): $sId - Id (returned from _WebcamOpen)
; $tCAPTUREPARMS - structure from __CAP_GET_SEQUENCE_SETUP
; $vParams - string: "Param=value"; for more than one param use: "Param1=value|Param2=value|Param3=value|.."
; Return Value(s): On Success - Returns 1
; On Failure - Returns 0, set error
; Author(s): BugFix ( [email='bugfix@autoit.de'][/email] )
; Note(s): Meaning of all parameters: http://msdn.microsoft.com/en-us/library/…2(v=VS.85).aspx
;===============================================================================
Func __CAP_SET_SEQUENCE_SETUP($sId, $tCAPTUREPARMS, $vParams=0) ; $vParams: Um nur einen Wert zu ändern "Parametername=Wert" übergeben, mehrere Werte mit "|" abtrennen
Local $aParamStruc[24] = [ _
'dwRequestMicroSecPerFrame','fMakeUserHitOKToCapture','wPercentDropForError','fYield','dwIndexSize','wChunkGranularity','fUsingDOSMemory','wNumVideoRequested', _
'fCaptureAudio','wNumAudioRequested','vKeyAbort','fAbortLeftMouse','fAbortRightMouse','fLimitEnabled','wTimeLimit','fMCIControl','fStepMCIDevice','dwMCIStartTime', _
'dwMCIStopTime','fStepCaptureAt2x','wStepCaptureAverageFrames','dwAudioBufferSize','fDisableWriteCache','AVStreamMaster']
If $vParams == 0 Then
Local $aParam2Set[1] = ['fYield=1'] ; == Default: Erlaubt Nutzereingaben während Capturing
Else
Local $aParam2Set = StringSplit($vParams, '|', 2)
EndIf
Local $aSplit
For $i = 0 To UBound($aParam2Set) -1
$aSplit = StringSplit($aParam2Set[$i], '=')
If $aSplit[0] <> 2 Then ContinueLoop
DllStructSetData($tCAPTUREPARMS, $aSplit[1], $aSplit[2])
Next
Local $pCAPTUREPARMS = DllStructGetPtr($tCAPTUREPARMS)
Local $ret = DllCall($Dll_user, "int", "SendMessage", "hWnd", $sId, "int", $WM_CAP_SET_SEQUENCE_SETUP, "wparam", DllStructGetSize($tCAPTUREPARMS), "lparam", $pCAPTUREPARMS)
If @error Then
Return SetError(1,0,0)
Else
;~ For $i = 0 To 23
;~ ConsoleWrite($aParamStruc[$i] & @TAB & DllStructGetData($tCAPTUREPARMS, $aParamStruc[$i]) & @CRLF)
;~ Next
Return 1
EndIf
EndFunc