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

[VC++] Size of a "twain message"

Forums › TWAIN Classic › [VC++] Size of a "twain message"

  • This topic has 0 replies, 1 voice, and was last updated 14 years, 2 months ago by gennaro_mac.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • November 17, 2006 at 2:20 pm #22040 Reply
    gennaro_mac
    Participant
    • Topics - 4
    • Replies - 3
    • Total Posts - 7

    Hi everybody,

    I’m working on a wrapper for a twain driver building a virtual twain driver that open when an open msg comes another twain driver. It seems that is impossibile that a twain source open another twain source (I posted many posts about this argument).
    What to do? Well when the triplet comes on me source, I write her value into a binary file. An external program that is waiting for this file read it and make a call to the DSMEnty(dg, dat, msg, lpData) (this is an example). I read the resoult and I write it into another binary file that i read from the source will read and gived to the application calling.
    Well … the problem is that the lpData value is a TW_MEMREF (that is a LPVOID). My idea is to convert it into a string and write the string into a file.
    But the problem is that now I allocate up to 1mb to a string because I don’t know the exact size of the lpData variable.

    Is there in Windows (API with VC++ 6.0) a function that give me the exact size of a variable in memory?

    Thank you a lot, and excuse me for my maccheroni-english … I’m Italian!

  • Author
    Posts
Viewing 1 post (of 1 total)
Reply To: [VC++] Size of a "twain message"
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.