troubleshooting Question

WIA Automation problems

Avatar of sparkythedog
sparkythedogFlag for Canada asked on
System Programming
7 Comments1 Solution595 ViewsLast Modified:
Hi everybody,
I am trying to use the WIA Automation Layer to show the
Photo Printing Wizard for a photo file in C++.

I embedded a CommonDialog COM object from wiaaut.dll into
my MFC app, and generated a C++ wrapper for it using VC++ 6.

Here is my code:

      CoInitialize( NULL );

      ICommonDialog cmDlg;

      VARIANT pVariant;
      VariantClear(&pVariant);
      pVariant.vt = VT_BSTR;
      CString tmp = "D:\\DSC01132.JPG";
      pVariant.bstrVal = tmp.AllocSysString();
      cmDlg.ShowPhotoPrintingWizard(&pVariant);

      CoUninitialize();

but the wizard doesn't appear.
Anyone can help me with this?

Thanks,
S-


ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros