The leading provider of version control solution and TWAIN SDK

How to troubleshoot by setting TWAINDSM environment variable?

By setting an environment variable you can create a log file from the DSM that may help narrow down the issue.

Please follow the steps below:

1. Rename the twain_32.dll (under C:\Windows) to twain_32.dll_1 or any other names.

By default, your TWAIN application will use twain_32.dll rather than TWAINDSM.dll. To force the TWAINDSM to be used to create the log, we need to delete (or just rename) twain_32.dll.

NOTE:
If you got the following message when renaming twain_32.dll, please refer to FAQ (the bottom of the article).


2. Set an environment for TWAINDSM

Right click "My Computer" | Properties | (Advanced system settings) |Advanced tab | click on "Environment Variables", New

variable name: TWAINDSM_LOG
variable value: D:\twain.log



OK| OK| OK.


3. Run TWAIN Application. If debugging using a IDE, like Visual Studio, restart it.

4. Navigate to the path you specified in "variable value" to see if the log file has been created. You can view the log file for troubleshooting. Or, you can send the log file to nettwain@dynamsoft.com. We willl check it for you.

FAQ:
I got "You need to provide administrator permission to rename to file" when renaming the twain_32.dll.

[Solution]
1. Right click on twain_32.dll | Properties | Security tab | click on "Advanced" | Owner tab | click on "Edit" | hightlight the current user in the list | OK | OK.


2. Back to the "Security" tab | click "Edit" | hightlight the current user | add permissions | OK.


3. You should be able to rename the DLL now.




Article Details

Last Updated
21st o November, 2011

Would you like to...

Print this page Print this page

Email this page Email this page

Post a comment Post a comment

Subscribe me

Add to favorites Add to favorites

Remove Highlighting Remove Highlighting

Edit this Article

Quick Edit

Export to PDF

User Opinions (0 votes)

No users have voted.

How would you rate this answer?



Thank you for rating this answer.

Related Articles

No related articles were found.

Attachments

No attachments were found.

Visitor Comments

No visitor comments posted. Post a comment

Post a comment

To post a comment for this article, simply complete the form below. Fields marked with an asterisk are required.
   Name:
   Email:
* Comment:
* Enter the code below:
 

Continue