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

Problems with exit from scaner Dll

Forums › TWAIN Classic › Problems with exit from scaner Dll

  • This topic has 0 replies, 1 voice, and was last updated 14 years, 3 months ago by CodeWriter.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • October 23, 2006 at 11:18 am #22027 Reply
    CodeWriter
    Participant
    • Topics - 1
    • Replies - 0
    • Total Posts - 1

    ❓
    Hi everybody. I have a problem in my dinamic library, which calling twain_32.dll. I wrote Dll in IDE C++ Builder 5. Problem happen when i close window working dll and try working in application, which called my dll.
    Window in this application is suspensioning and not reply for actions mouse or keyboard.

    This programming code my library:

    extern HANDLE TwainInst;

    //check exists twain_32.dll
    TwainExists();

    //function scanning
    ….

    HANDLE dib = TwainGetImage(Handle);

    if ( dib == 0 )
    return false;
    try
    {
    Bitmap=new Graphics::TBitmap();
    LPBITMAPINFO bmi = (LPBITMAPINFO)::GlobalLock(dib);
    Bitmap->Height = bmi->bmiHeader.biHeight;
    Bitmap->Width = bmi->bmiHeader.biWidth;
    SetDIBits(Bitmap->Canvas->Handle,Bitmap->Handle, 0,
    (UINT) bmi->bmiHeader.biHeight,
    (Byte*)((Byte*)bmi + sizeof(BITMAPINFOHEADER)),
    bmi, DIB_RGB_COLORS );
    }
    __finally
    {
    ::GlobalUnlock( dib );
    ::GlobalFree( dib );
    }

    //Free library
    …
    FreeLibrary( TwainInst );

    What is wrong with it? Sorry for my bad English.

  • Author
    Posts
Viewing 1 post (of 1 total)
Reply To: Problems with exit from scaner Dll
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.