DTWAIN_GetTempFileDirectory

Top  Previous  Next

The DTWAIN_GetTempFileDirectory gets the directory that will be used by DTWAIN when creating temporary files.

 

LONG DTWAIN_GetTempFileDirectory (

LPTSTR

szBuffer

LONG

Maxlen );

 

Parameters

 

szBuffer

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

ANSI version:

DTWAIN_GetTempFileDirectoryA

Unicode version:

DTWAIN_GetTempFileDirectoryW

 

Comments

The DTWAIN_GetTempFileDirectory function returns the directory where DTWAIN will create temporary files.  See DTWAIN_SetTempFileDirectory for more information.

 

This function fills szBuffer with the name of the directory. The MaxLen argument is the maximum number of characters to copy to szBuffer, including the trailing null character.

 

If szBuffer is NULL, the length of the directory 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.

 

TWAIN State Transitions

None.

 

Prerequisite Function Call(s)

DTWAIN_SysInitialize