DTWAIN_GetLightSources

Top  Previous  Next

The DTWAIN_GetLightSources retrieves the current light path (reflective or transmissive).

 

DTWAIN_BOOL DTWAIN_GetLightSources (

DTWAIN_SOURCE

Source,

LPDTWAIN_ARRAY

LightSources );

 

Parameters

Source

An open TWAIN Source.

 

pLightPath

Pointer to DTWAIN_ARRAY of currently used light sources.

 

 

Return Values

The return value is TRUE if successful.  Otherwise FALSE is returned.

 

Comments

The DTWAIN_GetLightSources function gets the current light sources being used.  The light source determines which lamp will be used when acquiring an image (some devices have multiple lamps).  On return, LightSources will be filled with the currently used light sources.

 

The DTWAIN_GetLightSources function differs from DTWAIN_EnumLightSourcesin that DTWAIN_GetLightSources returns only the light sources that will be used, while DTWAIN_EnumLightSources returns all of the light sources that are available.

 

Example:

 

void Func( )

{

   DTWAIN_ARRAY LightSources;

   DTWAIN_SOURCE Source;

   LONG numLightSources;

   //...

   DTWAIN_GetLightSources( Source, &LightSources );

   numLightSources = DTWAIN_ArrayGetCount( LightSources );

   //...

   DTWAIN_ArrayDestroy( LightSources );

}

 

TWAIN State Transitions

The Source must be in State 4. or higher

 

Prerequisite Function Call(s)

DTWAIN_SysInitialize

DTWAIN Source Selection Function

 

See Also

Color Lamp Selection