Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8426845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T04:38:20+00:00 2026-06-10T04:38:20+00:00

I’m new to WIA. I somehow managed to get a device listing, select my

  • 0

I’m new to WIA. I somehow managed to get a device listing, select my device and enumerate this device for an image item. But now, when I try to transfer an image, I’m stuck. If I use the root item for data transfer pWiaDataTransfer->idtGetData returns a HRESULT of 0x8000FFFF (E_UNEXPECTED), if I use the image item (there are only two items ‘root’ and ‘top’ on my device) it fails when I obtain the storage interface. I thought maybe I needed to obtain the storage interface from ‘root’ and the data transfer interface from ‘top’ but that also fails (when I try to obtain the data transfer interface). I then get 0x80004002 (E_NOINTERFACE – No such interface supported.). Here is the code:

HRESULT TransferWiaItem( IWiaItem *pWiaItem, IWiaItem *pWiaItem2 )
{
    IWiaPropertyStorage *pWiaPropertyStorage = NULL;
    HRESULT hr = pWiaItem->QueryInterface( IID_IWiaPropertyStorage, (void**)&pWiaPropertyStorage );
    if( SUCCEEDED( hr ) )
    {
        PROPSPEC PropSpec[2] = {0};
        PROPVARIANT PropVariant[2] = {0};
        const ULONG c_nPropCount = sizeof(PropVariant)/sizeof(PropVariant[0]);
        GUID guidOutputFormat = WiaImgFmt_BMP;
        PropSpec[0].ulKind = PRSPEC_PROPID;
        PropSpec[0].propid = WIA_IPA_FORMAT;
        PropSpec[1].ulKind = PRSPEC_PROPID;
        PropSpec[1].propid = WIA_IPA_TYMED;
        PropVariant[0].vt = VT_CLSID;
        PropVariant[0].puuid = &guidOutputFormat;
        PropVariant[1].vt = VT_I4;
        PropVariant[1].lVal = TYMED_FILE;
        hr = pWiaPropertyStorage->WriteMultiple( c_nPropCount, PropSpec, PropVariant, WIA_IPA_FIRST );
        if( SUCCEEDED( hr ) )
        {
            IWiaDataTransfer *pWiaDataTransfer = NULL;
            hr = pWiaItem2->QueryInterface( IID_IWiaDataTransfer, (void**)&pWiaDataTransfer );
            if( SUCCEEDED( hr ) )
            {
                CWiaDataCallback *pCallback = new CWiaDataCallback;
                if( pCallback )
                {
                    IWiaDataCallback *pWiaDataCallback = NULL;
                    hr = pCallback->QueryInterface( IID_IWiaDataCallback, (void**)&pWiaDataCallback );
                    if( SUCCEEDED( hr ) )
                    {
                        STGMEDIUM stgMedium = {0};
                        stgMedium.tymed = TYMED_FILE;
                        hr = pWiaDataTransfer->idtGetData( &stgMedium, pWiaDataCallback );
                        ...

Where pWiaItem is the ‘root’ item and pWiaItem2 is the ‘top’ item.

Anybody have a clue what is going on here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T04:38:22+00:00Added an answer on June 10, 2026 at 4:38 am

    The solution is to enumerate the items of the ‘root’ WiaItem in the local context again. I did this in an init method and stored the pointer to the ‘top’, somehow it seemed so that it got invalidated and the HRESULT did not reflect that. After I changed the code, so that the ‘top’ WiaItem gets identified right before I use it, everything went fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
This could be a duplicate question, but I have no idea what search terms
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I want use html5's new tag to play a wav file (currently only supported

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

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.