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

Reply To: Scanning directly into a file

Forums › TWAIN Classic › Scanning directly into a file › Reply To: Scanning directly into a file

January 22, 2008 at 12:56 pm #24287
ZiggyShort
Participant
  • Topics - 4
  • Replies - 16
  • Total Posts - 20

I succeed in setting up the capability via:

TwCapability cap2 = new TwCapability(TwCap.IXferMech, (short) TwXferMech.FILE);
rc = DScap(appid, srcds, TwDG.Control, TwDAT.Capability, TwMSG.Set, cap2);

rc returns success.

I still get a failure later on in

rc = DSsetupFileXfer(appid, srcds, TwDG.Control, TwDAT.SetupFileXfer, TwMSG.Set, twsfFile);

Where DSsetupFileXfer is:

[DllImport(“twain_32.dll”, EntryPoint = “#1”)]
private static extern TwRC DSsetupFileXfer([In, Out] TwIdentity origin, [In] TwIdentity dest, TwDG dg, TwDAT dat, TwMSG msg, TwSetupFileXfers sfxfr);

I have setup TwSetupFileXfers as follows:
internal class TwSetupFileXfers
{
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=256)]
public Byte[] FileName = new Byte[256]; /* File to contain data */
public UInt16 Format; /* A TWFF_xxxx constant */
public IntPtr VrefNum; /* Used for Macintosh only */
}

How do I get an error message back?

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