Thread View: borland.public.cppbuilder.multimedia
1 messages
1 total messages
Started by Sea Biscuit
Mon, 24 Apr 2006 09:33
How to convert OleVariant to WIA's ImageFile ?
Author: Sea Biscuit
Date: Mon, 24 Apr 2006 09:33
Date: Mon, 24 Apr 2006 09:33
36 lines
2366 bytes
2366 bytes
Hi, everybody:
I try to Acquire Images from Digital Camera through Windows Images
Acciqusition Automation Layer 2.0(
http://www.microsoft.com/downloads/details.aspx?FamilyID=a332a77a-01b...
) in C++ Builder 6.0.
I've successfully get the primitive control of camera, like the
following code:
WideString sComand = "{AF933CAC-ACAD-11D2-A093-00C04F72DC3C}";
IDevicePtr s4 = wiadlg->ShowSelectDevice( CameraDeviceType,
true, false );
IItem* itm = s4->ExecuteCommand( sCommand.c_bstr() );
sCommand = "{B96B3CAE-0728-11D3-.....}";
TVariant v = itm->Transfer( sCommand.c_bstr() );
now, I got Image File data in v, how could i convert it to
WIA's ImageFile.
In the example provided by microsoft in c#, the code is just
like this:
ImageFile file = itm->Transfer( ..... );
file->SaveToFile("c:\\aaa.jpg");
But if i write code like this in cb6, a compiling error will
erose and say that
ImageFile is a abstract class, and can not be instanced here.
How could i solve this problem and save my image file to disk
?
Are there anybody who have successfully implemented WIA Automation
Layer in CB6?
Thanks for your help.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads