DTWAIN_GetSourceProductName |
Top Previous Next |
The DTWAIN_GetSourceProductName gets a Source's product name.
LONG DTWAIN_GetSourceProductName (
Parameters Source Specifies a TWAIN Source.
szBuffer Specifies the address of the character buffer to store the product name or NULL.
MaxLen Specifies the maximum number of characters to copy to szBuffer.
Return Values If the function succeeds, the number of characters copied to szBuffer is returned. If the function fails, DTWAIN_FAILURE1 is returned.
Character specific version
Comments The DTWAIN_GetSourceProductName function fills szBuffer with the Product Name associated with the Source Source The MaxLen argument is the maximum number of characters to copy to szBuffer, including the trailing null character. For example, if you want to return a maximum of 10 visible characters, the MaxLen argument should be 11 (one more to store the terminating NULL).
If szBuffer is NULL, the length of the product name, plus 1 for the trailing NULL, is returned. The MaxLen argument is ignored and no characters are copied to szBuffer. You can use this method to determine the total number of characters needed to store the entire name.
The Product Name is the name that is displayed in the list of Source Names in the TWAIN 'Select Source' dialog box. You can then use the Product Name in the DTWAIN_SelectSourceByName function to select the Source
TWAIN State Transitions None.
Prerequisite Function Call(s) Either of these functions can be used to get the Source: DTWAIN Source Selection Function or
See Also |