elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Únete al Grupo Steam elhacker.NET


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  .NET (C#, VB.NET, ASP)
| | | |-+  Programación Visual Basic (Moderadores: LeandroA, seba123neo)
| | | | |-+  error en codigo
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: error en codigo  (Leído 2,085 veces)
elguast

Desconectado Desconectado

Mensajes: 110


Ver Perfil
error en codigo
« en: 27 Junio 2008, 14:04 pm »

hola alguien me puede ayudar con este codigo me da error


Dim temp As Long
hwdc = capCreateCaptureWindow("CapWindow", ws_child Or ws_visible, _
0, 0, 320, 240, Picture1.hWnd, 0)
If (hwdc <> 0) Then
webcam = "Si"
temp = DestroyWindow(hwdc)
temp = SendMessage(hwdc, WM_CAP_DRIVER_DISCONNECT, 0&, 0&)
DoEvents
Else
webcam = "No"
End If


En línea

Xerok1!

Desconectado Desconectado

Mensajes: 228



Ver Perfil
Re: error en codigo
« Respuesta #1 en: 27 Junio 2008, 14:09 pm »

Asimple vista creo que no has definido la funcion capCreateCaptureWindow...

Salu2!


En línea

[Firma]Esperando haber si acaba el concurso de firmas y la pongo[/Firma]
cobein


Desconectado Desconectado

Mensajes: 759



Ver Perfil WWW
Re: error en codigo
« Respuesta #2 en: 27 Junio 2008, 14:25 pm »

No creo que sea la mejor forma de hacerlo... pero

Código
  1. Option Explicit
  2.  
  3. Private Declare Function capCreateCaptureWindow Lib "avicap32.dll" Alias "capCreateCaptureWindowA" (ByVal lpszWindowName As String, ByVal dwStyle As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hWndParent As Long, ByVal nID As Long) As Long
  4. Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByRef lParam As Any) As Long
  5. Private Declare Function DestroyWindow Lib "user32.dll" (ByVal hwnd As Long) As Long
  6.  
  7. Private Const WM_CAP_START As Long = &H400
  8. Private Const WM_CAP_DRIVER_DISCONNECT As Long = (WM_CAP_START + 11)
  9. Private Const WM_CAP_DRIVER_CONNECT As Long = (WM_CAP_START + 10)
  10.  
  11. Private Sub Form_Load()
  12.    Debug.Print IsWebCamPresent
  13. End Sub
  14.  
  15. Private Function IsWebCamPresent() As Boolean
  16.    Dim lRet As Long
  17.    lRet = capCreateCaptureWindow(vbNullString, 0, 0, 0, 0, 0, 0, 0)
  18.    If Not lRet = 0 Then
  19.        If SendMessage(lRet, WM_CAP_DRIVER_CONNECT, ByVal 0&, ByVal 0&) Then
  20.            Call SendMessage(lRet, WM_CAP_DRIVER_DISCONNECT, ByVal 0&, ByVal 0&)
  21.            IsWebCamPresent = True
  22.        End If
  23.        Call DestroyWindow(lRet)
  24.    End If
  25. End Function
  26.  
En línea

http://www.advancevb.com.ar
Más Argentino que el morcipan
Aguante el Uvita tinto, Tigre, Ford y seba123neo
Karcrack es un capo.
elguast

Desconectado Desconectado

Mensajes: 110


Ver Perfil
Re: error en codigo
« Respuesta #3 en: 27 Junio 2008, 19:58 pm »

muchas gracias por la ayuda
En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Error en codigo C
Programación C/C++
Søra 8 4,495 Último mensaje 14 Diciembre 2010, 18:30 pm
por Garfield07
Error de facebook? (CODIGO)
Dudas Generales
rdzlcs 7 8,708 Último mensaje 29 Diciembre 2010, 17:47 pm
por Garfield07
¿Error código?
Programación C/C++
Constantinoplero 3 6,155 Último mensaje 3 Noviembre 2011, 22:39 pm
por Constantinoplero
error de codigo
PHP
Choclito 1 1,535 Último mensaje 22 Diciembre 2011, 01:21 am
por Keyen Night
error codigo de red
Dispositivos Móviles (PDA's, Smartphones, Tablets)
franci91 0 1,826 Último mensaje 3 Octubre 2012, 18:50 pm
por franci91
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines