/** 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; } }
/** 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; } }
int CTwainSourceManager::UnLoad() { if(State == DSMOpen) CloseDSM(); if(DSMModule > (HANDLE)VALID_HANDLE) { FreeLibrary(DSMModule); } DSMModule = NULL; DSMEntry = NULL; State = Prepare; return 1; }
CTwainSourceManager::~CTwainSourceManager(void) { if(DSMOpen == State) CloseDSM(); if(DSMLoad == State) UnLoad(); }