DTWAIN_GetSourceProductFamily

Top  Previous  Next

The DTWAIN_GetSourceProductFamily gets a Source's product family.

 

LONG DTWAIN_GetSourceProductFamily (

DTWAIN_SOURCE

Source,

LPTSTR

szBuffer

LONG

Maxlen );

 

Parameters

Source

Specifies a TWAIN Source.

 

szBuffer

Specifies the address of the character buffer to store the product family 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

ANSI version:

DTWAIN_GetSourceProductFamilyA

Unicode version:

DTWAIN_GetSourceProductFamilyW

 

Comments

The DTWAIN_GetSourceProductFamily function fills szBuffer with the Product Family 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 family 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 product family name.

 

TWAIN State Transitions

None.

 

Prerequisite Function Call(s)

DTWAIN_SysInitialize

Either of these functions can be used to get the Source:

DTWAIN Source Selection Function

or

DTWAIN_EnumSources

 

See Also

Source Information Functions