Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Windows Image Driver Programming Question?

I have two scanners and a Creative Webcam attached to my PC. I am trying to write a raw image capture driver to grab images from one or any of them. I am able to get a list of cameras and all of that and create a device and even get status, but I try to do a RawReadData and I either get an error or no data returned. I suspect that I have to issue a command before I do this, but I can't find any documentation about the vendor-specifc (or generic) commands.

For the application that I am creating, I don't want to use central push, but it doesn't matter unless I can grab data. Are the commands documented anywhere?

Update:

I've already gotten the DDK and have looked at the documentation on RawReadData. I'm calling *that* function properly. I'm just getting no data (on the Webcam) or the function is returning a "Not Ready" error (on the scanner). I suspect that this is because I have failed to issue a command that is required to get the device to respond properly. I don't need Microsoft's docmentation. I have plenty of that. I am looking for what I've left out. Documentation of the Vendor Specific commands or a short code snippet would be very helpful here. I am issuing Lock before and Unlock after the RawReadData call. I've even verified status as "Ready" (within a Lock/Unlock pair) in most cases. This isn't a case of RTFM. I'm actually looking to RTFM. I'm just looking for the FM.

Update 2:

Extending time to answer

1 Answer

Relevance
  • gare
    Lv 5
    1 decade ago
    Favorite Answer

    IStiDevice::RawReadData

    The IStiDevice::RawReadData method reads data from a still image device.

    HRESULT

    RawReadData(

    LPVOID lpBuffer,

    LPDWORD lpdwNumberOfBytes,

    LPOVERLAPPED lpOverlapped

    );

    Parameters

    lpBuffer

    Caller-supplied pointer to a buffer to receive data read from the device.

    lpdwNumberOfBytes

    Caller-supplied pointer to a DWORD. The caller must load the DWORD with the number of bytes in the buffer pointed to by lpBuffer. On return, it will contain the number of bytes actually read.

    lpOverlapped

    Optional, caller-supplied pointer to an OVERLAPPED structure (described in the Platform SDK documentation).

    Return Value

    If the operation succeeds, the method returns S_OK. Otherwise, it returns one of the STIERR-prefixed error codes defined in stierr.h.

    Headers

    Declared in sti.h. Include sti.h.

    Comments

    The IStiDevice::RawReadData method calls IStiUSD::RawReadData, which is exported by vendor-supplied minidrivers.

    Before calling IStiDevice::RawReadData, clients of the IStiDevice COM interface must call IStillImage::CreateDevice to obtain an IStiDevice interface pointer, which provides access to a specified device.

    A call to IStiDevice::RawReadData must be preceded by a call to IStiDevice::LockDevice and followed by a call to IStiDevice::UnLockDevice.

    See Also

    IStiDevice::RawReadCommand

Still have questions? Get your answers by asking now.