So, erster Teil der Geschichte ist fertig.
Also zumindest soweit, dass ich mit der Kamera Fotos machen kann, im Interval, den ich einstelle usw. usw.....
Microsoft bietet in der wiaaut.dll noch eine Funktion, um die Bilder von der Kamera, bzw. dem Bildübertragungsgerät an den PC zu übertragen.
Das wäre bei Windows XP z. B. der Punkt "Bilder kopieren" im Fenster der Kamera.
Um diese Funktion nutzen zu können, muss man ein Object namens "Item" erstellen. Dieses Object soll als "Item" definiert werden.
Naja, damit komme ich nun aber nicht wirklich klar.
Der Code dafür in VB sähe so aus:
Code: Alles auswählen
Item item = device.Execute
Dim item As Item = device.ExecuteCommand(CommandID.wiaCommandTakePicture)
For Each format As String In item.Formats
If (format = jpegGuid) Then
Dim imagefile As WIA.ImageFile = CType(item.Transfer(format),WIA.ImageFile)
filename = GetFreeFileName
If (String.IsNullOrEmpty(filename) = false) Then
imagefile.SaveFile(filename)
End If
Me.picLastImage.Load(filename)
Return filename
End If
Next
Der msdn-Teil von der wiaaut sähe so aus:
http://msdn.microsoft.com/en-us/library ... S.85).aspx
Code: Alles auswählen
Syntax
object.Transfer( _
[FormatID As String]) As Variant
Parameters
FormatID
Optional. String value that specifies one of the FormatID Constants that indicates the requested image format.
{00000000-0000-0000-0000-000000000000}
Default. Unspecified format.
Return Value
Returns an ImageFile object in the format specified in FormatID, if the device supports that format; otherwise this method uses the preferred format for this imaging device.
Ich habe nun schon sogut wie alles ausprobiert und bin noch nicht wirklich fündig geworden, bzw. habe noch nicht wirklich das KnowHow für diese "Anwendung" in COMate.
Daher würde ich mich sehr freuen, wenn ihr mir da auch nochmal weiterhelfen könntet.