DTWAIN_GetActiveDSMPath

DTWAIN_GetActiveDSMPathA

DTWAIN_GetActiveDSMPathW

Top  Previous  Next

The DTWAIN_GetActiveDSMPath gets the full path name of the TWAIN Data Source Manager that is in use.

 

LONG DTWAIN_GetActiveDSMPath (

LPTSTR

szBuffer,

LONG

Maxlen );

 

Parameters


szBuffer

Specifies the address of the character buffer to store the library ath name.  This parameter can also be 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_GetActiveDSMPathA

Unicode version:

DTWAIN_GetActiveDSMPathW

 

 

Comments

The DTWAIN_GetActiveDSMPath function fills szBuffer with the full path of the active TWAIN Data Source Manager (DSM) that is currently being used.

 

If szBuffer is NULL, the length of the DSM path, 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 difference between DTWAIN_GetActiveDSMPath and DTWAIN_GetDSMFullName is that DTWAIN_GetDSMFullName returns the name of the DSM that will be used if the DSM manager is made active, while DTWAIN_GetActiveDSMPath always returns the DSM that is actually the active one.

 

TWAIN State Transitions

None.

 

Prerequisite Function Call(s)

None.


See Also

Retrieving General DTWAIN Information