Пример #1
0
/** Releases the twain interface . Need not be called unless you
    want to specifically shut it down.
 */
void TwainIface::ReleaseTwain()
{
    if(IsValidDriver())
    {
        CloseDSM();
        FreeLibrary(m_hTwainDLL);
        m_hTwainDLL = NULL;
        m_pDSMProc  = NULL;
    }
}
Пример #2
0
/** Releases the twain interface . Need not be called unless you
    want to specifically shut it down.
 */
void KSaneWidgetPrivate::ReleaseTwain()
{
    if((m_hTwainDLL && m_pDSMProc))
    {
        CloseDSM();
        FreeLibrary(m_hTwainDLL);
        m_hTwainDLL = NULL;
        m_pDSMProc  = NULL;
    }
}
Пример #3
0
int CTwainSourceManager::UnLoad()
{
	if(State == DSMOpen) CloseDSM();

	if(DSMModule > (HANDLE)VALID_HANDLE)
	{
		FreeLibrary(DSMModule);
	}

	DSMModule = NULL;
	DSMEntry = NULL;
	State = Prepare;

	return 1;
}
Пример #4
0
CTwainSourceManager::~CTwainSourceManager(void)
{
	if(DSMOpen == State) CloseDSM();
	if(DSMLoad == State) UnLoad();
}