TWAIN Working Group

Newsletter Signup
Donate
Help keep TWAIN free
  • About TWAIN
    • What’s New?
    • News
    • Events
    • Membership
    • Consider a Donation
    • Contact Us
  • Why TWAIN?
  • Developers
    • Driver Developer
    • Application Developer
    • TWAIN Features
    • Specification & Tools
    • Self Certification Process
  • Support Forums
  • Scanner End-User
  • Find Certified Drivers
    • Facebook
    • LinkedIn
    • Vimeo

location of mydriver.ds

Forums › TWAIN Classic › location of mydriver.ds

  • This topic has 9 replies, 3 voices, and was last updated 13 years, 8 months ago by gabe.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • July 16, 2007 at 8:45 am #22172 Reply
    r0d
    Participant
    • Topics - 2
    • Replies - 5
    • Total Posts - 7

    Hello,

    For the moment, the dll of my twain driver (renamed as mydriver.ds) is localized in C:/Windows/twain_32

    I’d like to put it in another place. For example, in “D:/temp” folder. But if I do that, the Twain source manager don’t find it.

    How can I move my .ds file, making sure that the source manager will find it?

    Thank you in advance.
    R.P.

    July 16, 2007 at 9:26 am #23918 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    the closest thing i’ve heard of (and granted this isn’t going to very close) is a post titled “Multiple Scanners” where stoops (who was never heard from again after this post) said he could get multiple devices of the same type plugged in at the same time and was manipulating the registry to get it done. If there is a solution to what you’re trying to do, I think it is in that direction – otherwise I would say, no you need to have your driver under %windir%twain_32 like everybody else.

    why would want to do this? (just curious)

    July 16, 2007 at 10:02 am #23919 Reply
    r0d
    Participant
    • Topics - 2
    • Replies - 5
    • Total Posts - 7

    Ok, thank you.

    @gabe wrote:

    why would want to do this? (just curious)

    Because of stupid client specifications. 😥
    (specifications are stupid, not the client… )well, sometimes i wonder…

    July 16, 2007 at 10:08 am #23920 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    I wonder if your spec would allow you to put a really simple dll in %windir%twain_32 that uses loadlibrary to the other location where all of the logic resides (and are you asking about localization or location? – sounds like you’re asking about location.)

    .

    July 16, 2007 at 11:56 am #23921 Reply
    r0d
    Participant
    • Topics - 2
    • Replies - 5
    • Total Posts - 7

    Yes, i’m talking about location. Sorry for my approximative english 😳

    Actually, the specs allows me to put any files only in the folder in witch the all application will be installed, typically “C:/Program Files/TheApp”.

    July 26, 2007 at 1:09 pm #23922 Reply
    Vankir
    Participant
    • Topics - 3
    • Replies - 7
    • Total Posts - 10

    As I understand this requirement is a critical if your application works on VISTA because to copy anything to Windows folder on VISTA your application has to have administrative rights

    July 26, 2007 at 3:35 pm #23923 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    yeah, but _everything_ that installs (setup.exe, *.msi, etc) requires admin rights in Vista if uac is enabled (or I misunderstood) (..again)
    How does that change anything? The install goes thru with admin rights and the driver gets copied.

    July 26, 2007 at 3:55 pm #23924 Reply
    Vankir
    Participant
    • Topics - 3
    • Replies - 7
    • Total Posts - 10

    I think you are wrong, installer (as any other program) can request administrative rights or doesnt request them for example if it just copy files to local folder. Also some application based on .NET are distributed using ClickOnce technology without msi and setup files and without administrative rights and working in partial trust environment. Imaging following case when administrator installed scanner with hardware and twain drivers after that user came and run application which just copy files and its own twain driver (for image processing for example) in local folder…

    July 26, 2007 at 4:05 pm #23925 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    yeah, I could be wrong – It wouldn’t be the first or last time, but I’ve seen a aweful lot of threads complaining that you *always* get the uac popup in Vista for installs and I’ve seen a fair number of threads about troubles with uac doing the same thing for click once. But none of this is really the point (and I don’t mind being wrong or corrected) as the thread was about if or how to change the location of the ds files for twain, seems that we’ve rambled away from the question. Wonder if he ever got a workaround for the original question.

    I had some half baked ideas about copying twain_32 into the app directory and loading that version, but I didn’t have time to check if that would work or if they were too many dependencys for it to be anything other than a poor|awkward solution.

    August 2, 2007 at 9:47 am #23926 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    reading thru the spec (again)(again) and this caught my eye on pg 110 of the twain2d.pdf:

    Naming and Location
    The DLL’s file name must end with a .DS extension. The Source Manager recursively searches
    for your Source in the TWAIN sub-directory of the Windows directory
    (typically
    C:WINDOWS on Windows 95/98, or C:WINNT on Windows NT). To reduce the chance for
    naming collisions, each Source should create a sub-directory beneath TWAIN, giving it a name
    relevant to their product. The Source DLLs are placed there. Supporting files may be placed
    there as well, but since this is a system directory which may only be modifiable by the System
    Administrator, Sources must not write any information into this directory after the installation.

    So this makes me wonder how clever the source manager is. Does it recursively search in the twain sub-directory (hardcoded to look under %windir% first) or is it maybe slightly less clever just searching recursively ‘twain_32 ‘ from the current directory…

    Seems like this would be easy to test by copying %windir%twain_32.dll to the app directory, adding a subdirectory to the app directory named twain_32 and putting you ds in there and using loadlibrary pointing to the application specific twain_32.dll.

    any takers?

    .

  • Author
    Posts
Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: location of mydriver.ds
Your information:




Quick Links

Service Providers
TWAIN Support Forums
Membership
Contact Us
Privacy Policy

Newsletter Signup

TWAIN Working Group Family

TWAIN Working Group
TWAIN Direct®
TWAIN Resources
TWAIN Certified Drivers
PDF/raster

  • Facebook
  • GitHub
  • LinkedIn
  • Vimeo

Recent Topics

  • TWAIN for dental imaging integration
  • PDF/R For who and where?
  • Making searchable PDF with PDF/R
  • Backward compatibility with PDF/A and traditional PDF
  • could not open the twain source. Make sure there is a valid source for your sca
  • Quarterly Newsletter
  • TWAIN Working Group Membership
  • Logo Usage
  • TWAIN License
  • Contact Us
Privacy Policy • Privacy Tools • Copyright © 2021 TWAIN Working Group • by iHwy, LLC • Log in

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.