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

It is possible to create a source that will open another?

Forums › TWAIN Classic › It is possible to create a source that will open another?

  • This topic has 4 replies, 3 voices, and was last updated 14 years, 8 months ago by gennaro_mac.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • July 26, 2006 at 10:13 am #21983 Reply
    gennaro_mac
    Participant
    • Topics - 4
    • Replies - 3
    • Total Posts - 7

    Hi people, excuse me for by bad english, I have a “simple” question:

    it’s possible to create a twain source that will open another source installed on my computer?

    I have this situation … I have installed a twain driver for a Fujitzu scanner, but I must open my own driver to do some things and not the Fujitzu’s one.

    Another question … if I implements a DS as a simple C DLL, i have no handle to any window … how can I create a valid handle to a window inner this DLL?

    Thank you a lot to everybody!

    July 27, 2006 at 6:29 am #23466 Reply
    Kaij
    Participant
    • Topics - 9
    • Replies - 132
    • Total Posts - 141

    No, a source can not call another source as all DS calls go via the DSM which can only have one actice source.

    The window handle has to com from the calling application.

    Best regards,
    kaij

    July 27, 2006 at 7:33 am #23467 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    >it’s possible to create a twain source that will open another source installed on my computer?

    yeah, you’re just building 2 projects.

    >how can I create a valid handle to a window inner this DLL?

    create a a native window, use its handle.

    but i think you have at least one other largish issue if you follow this design. the driver for your scanner is occationally going to want to display some errors as dialogs that you’ll have to have one of your projects handle. for an example, unplug your device then try to scan with a twain app. I bet you get a dialog – and when your code does the opening part in twain you won’t get a twain return code telling your app that there is a problem until _after_ you click on the dialog. i had a similar situation and ended up using cbtHooks to deal with it, but truthfully its a hassle becasue i have to have info about the dialogs that i want supressed and every once in a while a driver update comes with a slightly different dialog.

    July 27, 2006 at 3:37 pm #23468 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    @Kaij wrote:

    No, a source can not call another source as all DS calls go via the DSM which can only have one actice source.

    ..then how does remotesoft work? i’m maybe willing to believe that this can’t be worked around, but i lean heavily toward this being something that can made to happen.

    @Kaij wrote:

    The window handle has to com from the calling application.

    there exist solutions where the calling app doesn’t have to provide the handle

    July 28, 2006 at 9:40 am #23469 Reply
    gennaro_mac
    Participant
    • Topics - 4
    • Replies - 3
    • Total Posts - 7

    Thank you everybody for the information, and excuse me for the banal request but as you can see from my nick I’m new to Windows programming. Well, if I have to create a dll-own native window, how can I do this? I see a lot of example to create a window in a winapps, where I have as main’s parametere an “HINSTANCE hInstance”. Can I use the “HINSTANCE hModule” of the DllMain?

    Thank you a lot!

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: It is possible to create a source that will open another?
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

  • Sports betting Bonus Code
  • 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.