yah014 发表于 2005-6-4 09:28:47

<P>调用后输出直接为1,但是中间的创建窗口,连接设备等的语句都没有运行。</P>
<P>程序如下:
HANDLE ghInstance; // application instance
HWND hwndMain; // main window handle
HWND hwndSelCapDrvDlg; // Select the capture driver dialog
CAPDRIVERCAPS CapDrvCaps; // driver capabilities</P>

<P>BOOL _stdcall DllMain( HINSTANCE histDLL,
                     DWORDfdwReason,
                     LPVOID lpReserved
)
{
    return TRUE;
}</P>
<P>
long int _declspec(dllexport) CaptureBMP()
{
hwndMain = capCreateCaptureWindow(
      "Super Video",
      WS_CHILD|WS_VISIBLE,
      0,
      0,
      320,
      240,
      NULL,
      1
       );
int sel = 0;
SendMessage( hwndMain, WM_CAP_DRIVER_CONNECT, sel, 0L);
char name;
strcpy(name,"Bpic");
strcat(name,".bmp");
capFileSaveDIB(hwndMain, name);
SendMessage(hwndMain,WM_SYSCOMMAND,SC_CLOSE,0);
return 1;</P>
<P>}
</P>

bright 发表于 2005-6-5 00:34:16

呵呵,你在编译的时候有个东东忘记选了吧:),再看看吧,自已捡查出来的比我们告诉你的要有用一些哦
页: [1]
查看完整版本: