|HWND||A handle to the application window.||mandatory|
|MajorNum||Application Version Number.||1|
|MinorNum||Application minor verson number (revision).||0|
|Language||User language (TWLG_* constant)||TWLG_USA|
|Country||User Country (TWCY_* constant)||TWCY_USA|
|Info||Information (string).||TWAIN Python Interface 188.8.131.52 10/02/2002|
|ProductName||Client product name (string)||TWAIN Python Interface|
|ProtocolMajor||Protocol Major version (TWON_PROTOCOLMAJOR).||TWON_PROTOCOLMAJOR|
|ProtocolMinor||Protocol Minor version (TWON_PROTOCOLMINOR).||TWON_PROTOCOLMINOR|
|SupportedGroups||Data Groups supported, i.e. images/audio.||DG_IMAGE | DG_CONTROL|
|Manufacturer||Sofware producers.||Kevin Gill|
|ProductFamily||Sofware information.||TWAIN Python Interface|
This method returns a single parameter, which is a SourceManger object. On failure it raises the following exceptions:
|excSMLoadFileFailed||The SourceManger DLL TWAIN_32.DLL could not be loaded. This dll should be in your windows directory if TWAIN is installed. Check your software installation for your device.|
|excSMGetProcAddressFailed||Could not locate the entry point in the TWAIN_32.DLL. Check to see if you have the right DLL in your windows directory.|
|excSMOpenFailed||Could not open the connection to the SourceManager. A return code should be returned in the exc_info. Check this against the TWRC_* constants for detailed information on the error.|
Be aware that there is a risk associated with using this method. Passing incorrect data may result in memory corruption.
|datagroup||Data Group identifier. One of the DG_* constants.||mandatory|
|dataitemid||Data Item Type identifier. One of the DAT_* constants.||mandatory|
|messageid||The command to be performed. One of the MSG_* constants.||mandatory|
|message||The data for the operation. This should be built up using the struct python module. In many of the operations, the result is returned in this buffer.||mandatory|
|pfnCallback||The function to be invoked. The function should expect a single parameter, which is the event which caused it to be called.||mandatory|
Returns a dictionary containing the configuration information for the SourceManager. This is our configuration in the twain sub-system.
Disconnects from the TWAIN sub-system. This function is called automatically by the source manager destructor. It is provided as a separate function to give finer-grained control over the disconnection and dll unloading.