tinystar - 2004-09-10

I use this code to open the Webcam (Genius VideoCAM Live), but i failed. Can anyone tell me why?
(Driver is ok)

    PVideoInputDevice grabberDevice;
    PStringList devices = grabberDevice.GetDeviceNames();
    PString deviceName;
    if (!devices.IsEmpty()){
        deviceName = devices[0];
        PVideoInputDevice * grabber = NULL;
        grabber = new PVideoInputDevice();
        if (grabber->Open(deviceName, FALSE)){
            MessageBox("Fail to open!");
        if(grabber) delete grabber;
        MessageBox("No device!");