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];
        MessageBox((LPCTSTR)deviceName);
        PVideoInputDevice * grabber = NULL;
        grabber = new PVideoInputDevice();
        if (grabber->Open(deviceName, FALSE)){
            grabber->Start();
        }else{
            MessageBox("Fail to open!");
        }
        if(grabber) delete grabber;
    }else{
        MessageBox("No device!");
    }