Re: check camera availability



Dnia 13-12-2007 o 05:45:05 kudva <prabhakarkudva@xxxxxxxxx> napisał:

Hi

i need to figure out if a windows mobile 2005 device has a camera or
not? is there a direct api to check for camera availability? Although
i know u can always find it out from the registry but an api would
always be better.

Try this:


GUID guidCamera = {0xCB998A05, 0x122C, 0x4166, 0x84, 0x6A, 0x93, 0x3E, 0x4D, 0x7E, 0x3C, 0x86};
DEVMGR_DEVICE_INFORMATION devInfo;
devInfo.dwSize = sizeof(devInfo);

HANDLE deviceHandle = FindFirstDevice(DeviceSearchByGuid, &guidCamera, &devInfo);
if (deviceHandle == INVALID_HANDLE_VALUE)
{
// no success
}

If no success, you can also use FindNextDevice, to make sure, that device has no built-in camera.


--
T.M.
.



Relevant Pages

  • Time for Ron to take a long holiday?
    ... to avoid bursting into tears on camera. ... In the past at Lewis' success on ...
    (rec.autos.sport.f1)
  • Re: Lunar eclipse pix
    ... I have had plenty success shooting the Moon, ... The camera, as is yours, is ... automatically puts the camera in the long exposure mode needed for dim ... I posted a link to a higher res picture in my ...
    (sci.astro.amateur)
  • Re: USB Camera - Mount and Fetch
    ... > I have a mobile Webcam that runs on batteries and comes from an obscure ... I do not need to use the camera as an proper Webcam. ... > seemed to get me closer to success. ... final standard then look for the discontinued directory on a suse mirror ...
    (alt.os.linux.suse)
  • Re: Astrophotography
    ... If you own a camera capable of keeping the shutter up for say 15 sec, ... The higher your score, the higher your success. ... many as you can of your chosen object. ...
    (sci.astro.amateur)
  • Re: compact zoom cameras
    ... The other day my beloved Digimax camera froze up. ... The lens made a little burp but refused to open. ... Success was when ordinary batteries delivering a full 6 volts were used instead of the ni-cad pack which delivered less than 6V. ...
    (uk.misc)