Pakku Posted June 11, 2006 Share Posted June 11, 2006 (edited) hi,i want to use the twain dll (click here to download the dll) to scan a image from my scanner to a file.i found some visual basic (.net) scripts but i can't find out how to do it in AutoItthe scripts i found:visual basic scriptvisual basic .net scriptcan someone find out what i have to put in DllCall("dll","return type","function",["type1","param1",["type n", "param n"]])Thanks, Edited November 16, 2010 by Pakku How can someone use Windows without using AutoIt?That one would properly don't know how to handle a computer!My scripts:Send files over internetKind of RSS reader3Draw ProUDF: convert a character string to a binary one and backCalculate PiCommand line downloader (Youtube/Google video)Set the transparency of a window just by hitting a key!Secure your pcOther things:My filemanMy profilePM me Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 11, 2006 Moderators Share Posted June 11, 2006 If you have the API calls, then use this "brief" tutorial:http://www.autoitscript.com/forum/index.ph...indpost&p=49822 Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Pakku Posted June 11, 2006 Author Share Posted June 11, 2006 (edited) hi,that's the big problem, what are the API calls?or where can i find them?EDIT: oke i found these sites but i don't understand any of these:http://www.herdsoft.com/ti/davincie/twai8v5a.htmhttp://www.herdsoft.com/ti/davincie/twai8v5a.htmhttp://www.dynarithmic.com/onlinehelp/dtwain/index.html Edited November 16, 2010 by Pakku How can someone use Windows without using AutoIt?That one would properly don't know how to handle a computer!My scripts:Send files over internetKind of RSS reader3Draw ProUDF: convert a character string to a binary one and backCalculate PiCommand line downloader (Youtube/Google video)Set the transparency of a window just by hitting a key!Secure your pcOther things:My filemanMy profilePM me Link to comment Share on other sites More sharing options...
nfwu Posted June 11, 2006 Share Posted June 11, 2006 Any documentation for the DLL? Or any C++ header files? #) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
Pakku Posted June 11, 2006 Author Share Posted June 11, 2006 (edited) @nfwuyou mean this:http://www.twain.org/devfiles/twain.hi found it on this site:http://www.twain.org/ Edited November 16, 2010 by Pakku How can someone use Windows without using AutoIt?That one would properly don't know how to handle a computer!My scripts:Send files over internetKind of RSS reader3Draw ProUDF: convert a character string to a binary one and backCalculate PiCommand line downloader (Youtube/Google video)Set the transparency of a window just by hitting a key!Secure your pcOther things:My filemanMy profilePM me Link to comment Share on other sites More sharing options...
nfwu Posted June 12, 2006 Share Posted June 12, 2006 (edited) Thanks for that, just what I needed. #) edit: wtf? I glanced at the header file and got bombarded with a lot of structs and defines! Anyone else wanna figure this out, I'll provide only the necessary lines of code: expandcollapse popup/**************************************************************************** * Entry Points * ****************************************************************************/ /********************************************************************** * Function: DSM_Entry, the only entry point into the Data Source Manager. * * Parameters: * pOrigin Identifies the source module of the message. This could * identify an Application, a Source, or the Source Manager. * * pDest Identifies the destination module for the message. * This could identify an application or a data source. * If this is NULL, the message goes to the Source Manager. * * DG The Data Group. * Example: DG_IMAGE. * * DAT The Data Attribute Type. * Example: DAT_IMAGEMEMXFER. * * MSG The message. Messages are interpreted by the destination module * with respect to the Data Group and the Data Attribute Type. * Example: MSG_GET. * * pData A pointer to the data structure or variable identified * by the Data Attribute Type. * Example: (TW_MEMREF)&ImageMemXfer * where ImageMemXfer is a TW_IMAGEMEMXFER structure. * * Returns: * ReturnCode * Example: TWRC_SUCCESS. * ********************************************************************/ /* Don't mangle the name "DSM_Entry" if we're compiling in C++! */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #ifdef _MSWIN_ TW_UINT16 FAR PASCAL DSM_Entry( pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_UINT32 DG, TW_UINT16 DAT, TW_UINT16 MSG, TW_MEMREF pData); typedef TW_UINT16 (FAR PASCAL *DSMENTRYPROC)(pTW_IDENTITY, pTW_IDENTITY, TW_UINT32, TW_UINT16, TW_UINT16, TW_MEMREF); #else /* _MSWIN_ */ FAR PASCAL TW_UINT16 DSM_Entry( pTW_IDENTITY pOrigin, pTW_IDENTITY pDest, TW_UINT32 DG, TW_UINT16 DAT, TW_UINT16 MSG, TW_MEMREF pData); typedef TW_UINT16 (*DSMENTRYPROC)(pTW_IDENTITY, pTW_IDENTITY, TW_UINT32, TW_UINT16, TW_UINT16, TW_MEMREF); #endif /* _MSWIN_ */ #ifdef __cplusplus } #endif /* cplusplus */ /********************************************************************** * Function: DS_Entry, the entry point provided by a Data Source. * * Parameters: * pOrigin Identifies the source module of the message. This could * identify an application or the Data Source Manager. * * DG The Data Group. * Example: DG_IMAGE. * * DAT The Data Attribute Type. * Example: DAT_IMAGEMEMXFER. * * MSG The message. Messages are interpreted by the data source * with respect to the Data Group and the Data Attribute Type. * Example: MSG_GET. * * pData A pointer to the data structure or variable identified * by the Data Attribute Type. * Example: (TW_MEMREF)&ImageMemXfer * where ImageMemXfer is a TW_IMAGEMEMXFER structure. * * Returns: * ReturnCode * Example: TWRC_SUCCESS. * * Note: * The DSPROC type is only used by an application when it calls * a Data Source directly, bypassing the Data Source Manager. * ********************************************************************/ /* Don't mangle the name "DS_Entry" if we're compiling in C++! */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #ifdef _MSWIN_ #ifdef _WIN32 __declspec(dllexport) TW_UINT16 FAR PASCAL DS_Entry (pTW_IDENTITY pOrigin, TW_UINT32 DG, TW_UINT16 DAT, TW_UINT16 MSG, TW_MEMREF pData); #else /* _WIN32 */ TW_UINT16 FAR PASCAL DS_Entry (pTW_IDENTITY pOrigin, TW_UINT32 DG, TW_UINT16 DAT, TW_UINT16 MSG, TW_MEMREF pData); #endif /* _WIN32 */ typedef TW_UINT16 (FAR PASCAL *DSENTRYPROC) (pTW_IDENTITY pOrigin, TW_UINT32 DG, TW_UINT16 DAT, TW_UINT16 MSG, TW_MEMREF pData); #else /* _MSWIN_ */ FAR PASCAL TW_UINT16 DS_Entry( pTW_IDENTITY pOrigin, TW_UINT32 DG, TW_UINT16 DAT, TW_UINT16 MSG, TW_MEMREF pData); typedef TW_UINT16 (*DSENTRYPROC)(pTW_IDENTITY, TW_UINT32, TW_UINT16, TW_UINT16, TW_MEMREF); #endif /* _MSWIN_ */ #ifdef __cplusplus } #endif /* cplusplus */ /* SDH - 02/08/95 - TWUNK */ /* Force 32-bit twain to use same packing of twain structures as existing */ /* 16-bit twain. This allows 16/32-bit thunking. */ #ifdef WIN32 #ifdef __BORLANDC__ //(Mentor June 13, 1996) if we're using a Borland compiler #pragma option -a. //(Mentor October 30, 1996) switch back to original alignment #else //(Mentor June 13, 1996) if NOT using a Borland compiler #pragma pack (pop, before_twain) #endif //(Mentor June 13, 1996) #else /* WIN32 */ #endif /* WIN32 */ Sorry, but I can see no other functions other than 2 entry points. Are you sure that this is the header file? #) Edited June 12, 2006 by nfwu TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
Pakku Posted June 12, 2006 Author Share Posted June 12, 2006 (edited) no i don't. i don't know nothing about dll or the header files but thanks for what you have done now. but what the main point of this topic is to scan an image with the scanner. what i thought is to use a dll (the twain dll) but there are maybe other ways. any suggestions? Edited November 16, 2010 by Pakku How can someone use Windows without using AutoIt?That one would properly don't know how to handle a computer!My scripts:Send files over internetKind of RSS reader3Draw ProUDF: convert a character string to a binary one and backCalculate PiCommand line downloader (Youtube/Google video)Set the transparency of a window just by hitting a key!Secure your pcOther things:My filemanMy profilePM me Link to comment Share on other sites More sharing options...
johnvarenda Posted December 4, 2009 Share Posted December 4, 2009 hi...I too experience the same problem.But your link helped me a lot to learn about this API.Thanks.....................data entry indiaIf you have the API calls, then use this "brief" tutorial:http://www.autoitscript.com/forum/index.ph...indpost&p=49822 Link to comment Share on other sites More sharing options...
Ontosy Posted August 7, 2012 Share Posted August 7, 2012 this is working: $a = DllCall("eztw32.dll", "int", "TWAIN_AcquireToFilename", "int", "0", "str", "") Link to comment Share on other sites More sharing options...
Virgilio1 Posted January 13, 2013 Share Posted January 13, 2013 this is working: $a = DllCall("eztw32.dll", "int", "TWAIN_AcquireToFilename", "int", "0", "str", "") How do I do to pass the name of the file that I want to create? Link to comment Share on other sites More sharing options...
buzonjl Posted January 9, 2015 Share Posted January 9, 2015 (edited) I put this one $a = DllCall(@ScriptDir&"eztw32.dll", "int", "TWAIN_AcquireToFilename", "int", "0", "str", "d:123.jpg") and I got the file d:123.jpg Edited January 9, 2015 by buzonjl Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now