Jump to content

Detection webcam :(


Recommended Posts

I'd probably start with something like this

$StructName = DllStructCreate("char[1024]")
$StructDesc = DllStructCreate("char[1024]")

For $i = 0 To 9
    $aRslt = DllCall("Avicap32.dll", "bool", "capGetDriverDescription", "dword", $i, "ptr", DllStructGetPtr($StructName), "dword", DllStructGetSize($StructName), "ptr", DllStructGetPtr($StructDesc), "dword", DllStructGetSize($StructDesc))
    If @error Then
        Exit (MsgBox(0, "DllCall Error", @error))
    EndIf
    If $aRslt[0] Then
        ConsoleWrite(DllStructGetData($StructName, 1) & @LF & DllStructGetData($StructDesc, 1) & @LF & @LF)
    EndIf
Next

EDIT:

I get no results from this, but I have no webcams, so I cannot say if it works one way or the other.

But the idea is, if you have webcam drivers installed, it's likely you have a webcam installed.

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

I'd probably start with something like this

$StructName = DllStructCreate("char[1024]")
$StructDesc = DllStructCreate("char[1024]")

For $i = 0 To 9
$aRslt = DllCall("Avicap32.dll", "bool", "capGetDriverDescription", "dword", $i, "ptr", DllStructGetPtr($StructName), "dword", DllStructGetSize($StructName), "ptr", DllStructGetPtr($StructDesc), "dword", DllStructGetSize($StructDesc))
If @error Then
Exit (MsgBox(0, "DllCall Error", @error))
EndIf
If $aRslt[0] Then
ConsoleWrite(DllStructGetData($StructName, 1) & @LF & DllStructGetData($StructDesc, 1) & @LF & @LF)
EndIf
Next

EDIT:

I get no results from this, but I have no webcams, so I cannot say if it works one way or the other.

But the idea is, if you have webcam drivers installed, it's likely you have a webcam installed.

OMG WORK LIKE A CHARM THANK YOU JohnOn YOURE A LEGEND :wub::D:ILA3:

Another question

Edited by JustBegun
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...