DTWAIN_GetCurrentTwainTriplet

Top  Previous  Next

The DTWAIN_GetCurrentTwainTriplet allows an application to determine the current TWAIN triplet that is sent to the TWAIN Data Source Manager (DSM).

 

DTWAIN_BOOL DTWAIN_GetCurrentTwainTriplet (

TW_IDENTITY*

pAppID,

TW_IDENTITY*

pSourceId,

LPLONG

pDG,

LPLONG

pDAT,

LPLONG

pMSG,

LPLONG64

pData );

 

Parameters

pAppID

A pointer to a TW_IDENTITY structure that represents the application ID, or NULL.

 

pSourceId

A pointer to a TW_IDENTITY structure that represents the Source ID, or NULL.

 

pDG

Pointer to the Data Group of TWAIN Triplet, or NULL.

 

pDAT

Pointer to the Data of TWAIN Triplet, or NULL.

 

pMSG

    Pointer to the Message of TWAIN Triplet, or NULL

 

pData                                

    Pointer to the extra data required by TWAIN Triplet, or NULL.

 

 

Return Values

TRUE if successful, FALSE otherwise.  If the function returns FALSE, call DTWAIN_GetLastError() to get extended information.

 

Comments

The DTWAIN_GetCurrentTwainTriplet function allows an application to determine the TWAIN triplet (DG / DAT / MSG) that will be sent the the TWAIN Data Source Manager (DSM). 


This function is meaningful only when the DTWAIN_TN_TWAINTRIPLETBEGIN and DTWAIN_TN_TWAINTRIPLETEND notifications are sent to the the application.  When these notifications are sent, within the notification handler, the application can call DTWAIN_GetCurrentTwainTriplet to determine the triplet that will be sent, and/or the triplet that was sent, depending on the notification code that was used.


On return of DTWAIN_GetCurrentTwainTriplet, all of the parameters to DTWAIN_GetCurrentTwainTriplet are filled in with the current TWAIN triplet information, unless the respective parameter is NULL.


Note that the first two parameters, pAppID and pSourceID requires the application to send a pointer to a TW_IDENTITY structure, which is a basic structure defined by the TWAIN standard.  If you are using C or C++, this structure is defined in the header file twain.h.  If you are using another language, the language may have this structure defined which you can use.  If this structure is not defined, your application should pass NULL as the arguments to pAppID and pSourceId.


The pData parameter represents a pointer to extra data that the triplet needs to perform the Twain function. This value depends on the DG, DAT, and MSG parameters.  Consult the Twain specification to see what value is placed here.

 

 

TWAIN State Transitions

Any state

 

Prerequisite Function Call(s)

DTWAIN_SysInitialize

 

See Also

Low-Level DTWAIN functions