English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

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?

2006-11-21 08:25:44 · 1 answers · asked by Mich Ravera 3 in Computers & Internet Programming & Design

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.

2006-11-21 08:51:51 · update #1

Extending time to answer

2006-11-27 09:20:12 · update #2

1 answers

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

2006-11-21 08:30:56 · answer #1 · answered by gare 5 · 0 0

fedest.com, questions and answers