程序单步执行没问题,点f9却会死掉,程序只有两句代码,没有循环。望见教!

解决方案 »

  1.   

    Recorder1.InitDeviceW(Recorder1.Handle);
    Recorder1.StartCapture(1,'abc.mpg');
      

  2.   

    Recorder1.InitDeviceW(Recorder1.Handle);
    Application.ProcessMessage; //這樣呢?? 不行加個循環
    Recorder1.StartCapture(1,'abc.mpg');
      

  3.   

    有没有用到多线程?有没有进行同步处理?
    可以用OutputDebugString输出调试信息看看:
    Recorder1.InitDeviceW(Recorder1.Handle);
    OutputDebugString('InitDeviceW finished');
    Recorder1.StartCapture(1,'abc.mpg');
    OutputDebugString(StartCapture finished');运行DebugView(网上找),然后运行程序(注意,不能在调试状态下运行,也就是说不能在delphi下运行),看看DebugView截获的调试信息,就知道哪个函数死掉了。