|Top Previous Next|
The DTWAIN_AcquireBuffered function starts the acquisition of images from a TWAIN Source.
DTWAIN_ARRAY DTWAIN_AcquireBuffered (
Specifies a selected TWAIN Source.
Specifies the pixel type of the image
Specifies the number of pages to acquire.
Specifies whether the Source displays the default User Interface.
Specifies whether the Source should be automatically closed when the User Interface is closed.
Points to a variable that will be filled in with an error status value.
If the function succeeds and the Twain Mode is DTWAIN_MODAL, a DTWAIN_ARRAY describing the attempted acquisitions is returned. If the function succeeds and the Twain mode is DTWAIN_MODELESS, a non-zero value is returned. On failure, the function returns NULL.
The DTWAIN_AcquireBuffered function starts the image acquisition device. The images are acquired using the Buffered Transfer Mode. If the Source supports compressed files for buffered transfers, the DTWAIN_SetCompressionType function can be used to set the compression type. For example, if the Source supports JPEG compressed images, the following would be done:
DTWAIN_SetCompressionType( Source, DTWAIN_CP_JPEG, TRUE );
DTWAIN_AcquireBuffered( Source, ... );
For compressed mode, the returned DTWAIN_ARRAY defines raw image data and not Device Independent Bitmaps. If compression is used, capturing the DTWAIN_TN_TRANSFERDONE notification and calling DTWAIN_GetCompressionSize should be done to get the size in bytes of the acquired image. Your application will need this information if your application desires to save the image to a file. Optionally, your application can also access each strip of data that has been acquired by capturing the DTWAIN_TN_TRANSFERSTRIPDONE notification.
DTWAIN_AcquireBuffered differs from DTWAIN_AcquireNative only in the way the image transfer is done by the Source. See DTWAIN_AcquireNative for more information on the arguments to the DTWAIN_AcquireBuffered function.
TWAIN State Transitions
State 4(if Source is not opened)
State 4 (if Source is closed after acquisitions)
Prerequisite Function Call(s)