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

OpenDSM fails when run from Citrix client

Forums › TWAIN Classic › OpenDSM fails when run from Citrix client

  • This topic has 16 replies, 2 voices, and was last updated 3 days, 19 hours ago by Boscoawr.
Viewing 2 posts - 16 through 17 (of 17 total)
← 1 2
  • Author
    Posts
  • October 30, 2008 at 3:35 pm #24576 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    sloppy code example that has worked for me in the past,


    BOOL IdHitThat::LoadSourceManager(BOOL bProfileAware)
    {
    wchar_t s[MAX_PATH];
    CString szSM = _T("");

    if (twState >= 2) {
    return TRUE; // SM already loaded
    }

    if (bProfileAware) {

    GetWindowsDirectory(s, sizeof(s)); /* GetWindowsDirectory is user specific in Citrix & TS */

    } else {

    GetSystemWindowsDirectory(s, sizeof(s));
    }

    szSM = s;

    if ( szSM[szSM.GetLength() -1] != '\' ) {
    szSM.Append(_T("\"));
    }

    szSM.Append((CString)DSM_FILENAME);

    hDSMDLL = LoadLibrary(szSM);
    if (hDSMDLL == NULL) {

    std::cout << "LoadLibrary: failed" << szSM;
    hDSMDLL = NULL;
    }

    if (hDSMDLL != NULL) {
    lpDSM_Entry = (DSMENTRYPROC)GetProcAddress(hDSMDLL, DSM_ENTRYPOINT);
    if (lpDSM_Entry) {
    twState = 2;
    } else {
    std::cout << "LoadSourceManager: FAIL. Unable to GetProcAddress.n";
    FreeLibrary(hDSMDLL);
    hDSMDLL = NULL;
    }
    } else {
    lpDSM_Entry = NULL;
    }

    if (twState != 2 ) {
    std::cout << "LoadSourceManager: FAIL.n";
    }

    return (twState >= 2);

    }
    February 11, 2019 at 10:28 am #50818 Reply
    Gary Ilg
    • Topics - 93
    • Replies - 183
    • Total Posts - 276

    Hello,

    I am having a similar issue with Citrix except, (using Twack_32) I can open the source manager the first time, but once the source manager is closed, attempting to open the source manager again gives an error.

    Has anyone had this experience?

    Regards,
    Gary

  • Author
    Posts
Viewing 2 posts - 16 through 17 (of 17 total)
← 1 2
Reply To: Reply #24568 in OpenDSM fails when run from Citrix client
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

  • EPSON V600 TWAIN and WIA on Windows 10
  • When and how to use WaitForEvents command ?
  • Problem enumerating list of installed scanners in windows server 2012
  • Failed to create TWAIN progress! Error code is 1260.
  • To get the list of scanners from javascript client side (browser)
  • 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.