Probelmi con AVICAP32.DLL

lunedì 03 dicembre 2007 - 11.36

gianka Profilo | Newbie

Ciao a tutti, sto sviluppando un'applicazione che s'interfaccia con la webcam, solo ho un problema che non so come risolverlo.

Per interfacciarmi utilizzo la libreria AVICAP32.DLL solo che non so bene come settare i parametri per ottenere il massimo della risoluzione dalla mia webcam(1.3 Mpxl).

In seguito vi scrivo il codice che ho utilizzato per usare la dll... GRAZIE MILLE CIAOOO!!!

public static short WM_CAP = 1024;

public static long WM_USER = 1024;

public static int WM_CAP_DRIVER_CONNECT = WM_CAP + 10;

public static int WM_CAP_DRIVER_DISCONNECT = WM_CAP + 11;

public static int WM_CAP_EDIT_COPY = WM_CAP + 30;

public static long WM_CAP_FILE_SAVEDIB = WM_USER + 25;

public static long WM_CAP_FILE_SAVEAS = WM_USER + 23;

public static int WM_CAP_SET_PREVIEW = WM_CAP + 50;

public static int WM_CAP_SET_PREVIEWRATE = WM_CAP + 52;

public static int WM_CAP_SET_SCALE = WM_CAP + 53;

public static int WS_CHILD = 1073741824;

public static int WS_VISIBLE = 268435456;

public static short SWP_NOMOVE = 2;

public static short SWP_NOSIZE = 1;

public static short SWP_NOZORDER = 4;

public static short HWND_BOTTOM = 1;

[DllImport("USER32.DLL")]

public static extern int SendMessageA
( int hwnd,
int wMsg,
int wParam,
[MarshalAs(UnmanagedType.AsAny)] object lParam);

[DllImport("USER32.DLL")]

public static extern int SetWindowPos
( int hwnd,
int hWndInsertAfter,
int x,
int y,
int cx,
int cy,
int wFlags);

[DllImport("AVICAP32.dll")]

public static extern int capCreateCaptureWindowA
(string lpszWindowName,
int dwStyle,
int x,
int y,
int nWidth,
short nHeight,
int hWndParent,
int nID);

[DllImport("AVICAP32.dll")]

public static extern bool capGetDriverDescriptionA
(
short wDriver,
string lpszName,
int cbName,
string lpszVer,
int cbVer);

[DllImport("USER32.DLL")]
public static extern bool DestroyWindow(int hwnd);

Partecipa anche tu! Registrati!
Hai bisogno di aiuto ?
Perchè non ti registri subito?

Dopo esserti registrato potrai chiedere
aiuto sul nostro Forum oppure aiutare gli altri

Consulta le Stanze disponibili.

Registrati ora !
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5