#include $ezDebug = 1 ;obtain console debug messages _EZTwain_Start() ;load Easy Twain Classic library _EZTwain_LoadSourceManager() ;load source ;_EZTwain_DeviceSelect() ; use to open GUI to select Twain device _EZTwain_DeviceOpen() ; open default Twain device ;_EZTwain_DeviceSetDPI(600) ;used to get image DPI _EZTwain_DeviceAcquire_File("d:\test.bmp") ; Scan image and save as a BMP file ;$hDIB = _EZTwain_DeviceAcquire_DIB() ; Used to scan file and save in memory as DIB image _EZTwain_Stop() ; Clean up and unload DLL