GetCapabilityFromFile method (Twain Control)

C++ Builder example

Delphi 4.0 example

 

Builder Syntax

int GetCapabilityFromFile(HTWAINTEMPLATEFILE hFile, ppTW_CAPABILITY ppCapability, unsigned uIndex);

Delphi Syntax

Function GetCapabilityFromFile (hFile: HTWAINTEMPLATEFILE; ppCapability: ppTW_CAPABILITY; uIndex: L_UINT ): L_INT;

Overview

Refer to Handling Template Files.

Remarks

Gets the capability, at the specified index, in the specified file.

To get a capability stored in a file; the file must be opened for reading by calling OpenTemplateFile method. The user must declare a variable of type pTW_CAPABILITY and pass the address of this to the method. This parameter will be updated with a pointer to the capability at the specified index.

Note:

If the method is successful, the user must do the following:

image\sqrblit.gif Free the container of the TW_CAPABILITY structure by calling FreeContainer method.

image\sqrblit.gif Free the value referenced by the contents of the ppCapability using GlobalUnlock and GlobalFree.

See Also

Elements:

OpenTemplateFile method, AddCapabilityToFile method, ShowTemplateDlg method, GetNumOfCapsInFile method, CloseTemplateFile method, InitSession method, EndSession method.

Topics:

TWAIN Functionality: Capabilities.