View Full Version : What changed in FlexCom2?
David Martinko
23-Feb-2005, 03:27 AM
I am looking at some code where the old way was to get the iDispatch then
get the Pointer to this value and pass it to an API.
Now I want to use the ComAutomation and I don't have a LPDispatch. I am
supposed to use the pvComObject now, but this is a Variant and it isn't
working. What do I do?
--
David Martinko
Redeemed Software
248-535-7495
RedeemedSoftware(SHIFT+2)Hotmail(PERIOD)com
Chris Spencer
23-Feb-2005, 04:10 AM
Most Automation objects have a method to get their children as a variant.
Once the variant is retrived (this is the Automation side) you need to
create a VDF object of the appropriate object and set is pvComObject to the
retrived variant.
EG
Class cCrystalReport Is A cComReport
Procedure Construct_Object
Forward Send Construct_Object
Property Handle phExportOptions 0
Set peAutoCreate to acAutoCreate
End_procedure
Function ExportObject returns handle
handle hOptions
Variant vOptions // variant
dataType
Get phExportOptions to hOptions
if (hOptions = 0) Begin
Get Create U_ExportOptions_TUF to hOptions // Create a
VDF Object
Get ComExportOptions to vOptions // Get
the ExportOprions (COM) to a Variant
Set pvComObject of hOptions to vOptions //' Attach
VDF object and Variant together
Set phExportOptions to hOptions
end
Function_return hOptions
end_function
Chris Spencer
TUFware System
"David Martinko" <RedeemedSoftware@Hotmail.com> wrote in message
news:qa8fFGYGFHA.4924@dacmail.dataaccess.com...
>I am looking at some code where the old way was to get the iDispatch then
>get the Pointer to this value and pass it to an API.
>
> Now I want to use the ComAutomation and I don't have a LPDispatch. I am
> supposed to use the pvComObject now, but this is a Variant and it isn't
> working. What do I do?
>
>
>
> --
> David Martinko
> Redeemed Software
> 248-535-7495
> RedeemedSoftware(SHIFT+2)Hotmail(PERIOD)com
>
>
>
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.