Home › Forums › TWAIN Classic › how to obtain the full twain driver filepath from get source
- This topic has 2 replies, 2 voices, and was last updated 16 years, 4 months ago by eneate.
- AuthorPosts
Hi
Does anyone know how I can retrieve the full filepath of the twain driver from the select source twain dialogs. I need tobe able to set the default twain device from a vb application by writing the new path to the windows registry. I can get the name of the device but not the full filepath
why? just curious here, I’m sure you have a reason, but If you are able to select a given source from within your code without user interaction regardless of the system default (and you are), and if you can use the built in ‘select source’ dialog to let the user update the system default it seems that you could just check the regkey after the user has set the default and later your app could reset the key to the previously selected value,.. but again I don’t see very many cases (aside from the odd helper utility app) that need to maintain the system default.
.
Hi
Ive found a solution which works. I have to change this as I’m accessing an external program which will only call the default device. I have no control. So I need to set the selected default in the registry before I call the external application. When I run my own calls I just call the device by index which is easy.
To make this work I get the user to use the select source to access the chosen dive. The select source then writes the full filepath into the registry file, I then read this path from the registry file and write it into my programms ini file. Then when I access the external app I read the filepath from my ini file and write it to the registry enabling the source tobe selected as required. It works fine thanks for the feedback.- AuthorPosts