Module FlexCOM20_Base.pkg
1//
2// Flexcom support for automation (cComAutomationObject).
3// If you want activeX and document objects use FlexCom20.pkg
4//
5
6Use Windows.pkg
7Use ComTypes.pkg
8
9
10// In fmac
11//
12//#REPLACE U_DFCOMIDISPATCHDRIVER |CI107
13//#REPLACE U_DFCOMDOCUMENTOBJECT |CI108
14//#REPLACE U_DFCOMACTIVEXCONTROL |CI109
15//#REPLACE U_DFCOMDESIGNCONTROL |CI110
16//#REPLACE U_DFCOMAUTOMATIONOBJECT |CI111
17
18//#REPLACE GET_PSPROGID |CI$0554
19//#REPLACE SET_PSPROGID |CI$0555
20//#REPLACE GET_pvComObject |CI$0556
21//#REPLACE SET_pvComObject |CI$0557
22//#REPLACE MSG_CREATECOMOBJECT |CI$0558
23//#REPLACE MSG_RELEASECOMOBJECT |CI$0559
24//#REPLACE MSG_COMADDREF |CI$055a
25//#REPLACE GET_COMQUERYINTERFACE |CI$055b
26//#REPLACE MSG_PREPAREPARAMS |CI$055c
27//#REPLACE MSG_DEFINEPARAM |CI$055d
28//#REPLACE GET_INVOKECOMMETHOD |CI$055e
29//#REPLACE MSG_INVOKECOMMETHOD |CI$055e
30//#REPLACE GET_COMPROPERTY |CI$055f
31//#REPLACE SET_COMPROPERTY |CI$0560
32//#REPLACE MSG_REGISTERCOMEVENT |CI$0561
33//#REPLACE MSG_DISPLAYPROPERTYSHEET |CI$0565
34//#REPLACE MSG_CREATECOMOBJECTFROMFILE |CI$0566
35//#REPLACE MSG_SAVETOFILE |CI$0567
36//#REPLACE MSG_SAVETORESOURCEFILE |CI$0568
37//#REPLACE GET_PSRESOURCEFILE |CI$0569
38//#REPLACE SET_PSRESOURCEFILE |CI$056a
39//#REPLACE GET_PSRESOURCENAME |CI$056b
40//#REPLACE SET_PSRESOURCENAME |CI$056c
41//#REPLACE SET_PSRESOURCEDATA |CI$056d
42//#REPLACE GET_PEAUTOCREATE |CI$056e
43//#REPLACE SET_PEAUTOCREATE |CI$056f
44//#REPLACE GET_PSLICENSEKEY |CI$0570
45//#REPLACE SET_PSLICENSEKEY |CI$0571
46//#REPLACE MSG_REGISTERPROPERTYCHANGEEVENT |CI$0572
47//#REPLACE GET_PHDISPATCHDRIVER |CI$0573
48//#REPLACE MSG_ONCREATE |CI$0575
49//#REPLACE GET_COMLOADPICTURE |CI$0577
50//#REPLACE GET_COMACTIVEOBJECT |CI$0578
51
52#REPLACE nothing (NoValue())
53
54//Enumerations for the peAutoCreate property
55//acNoAutoCreate - Do not automatically instantiate the COM object upon VDF object creation.
56//You must manually instantiate the COM object using CreateComObject. This is the default
57//for cComAutomation.
58Define acNoAutoCreate for 0
59//acAutoCreate - Automatically instantiate the COM object upon VDF object creation.
60//You won't need to manually instantiate the COM object. This is the default
61//for cComActiveXControl
62Define acAutoCreate for 1
63//acDeferredAutoCreate - Automatically instantiate the COM object during Page_Object,
64//and automatically destroy the COM object during Page_Delete. Use this setting only
65//if acAutoCreate causes problems.
66Define acDeferredAutoCreate for 2
67
68{ ClassLibrary=Common ClassType=Abstract }
69{ HelpTopic=cComAutomationObject }
70Class cComAutomationObject Is a DFComAutomationObject
71 Procedure Construct_Object
72 Forward Send Construct_Object
73 Send RegisterComEvents
74 End_Procedure
75
76 // It is expected that the Com class will augment this with useful event definitions
77 { Visibility=Private }
78 Procedure RegisterComEvents
79 End_Procedure
80
81 // Attach the DF object to com automation object via progId.
82 // returns: Boolean bSuccess if Ok, If not ok, pcComObject is set to null
83 Function AttachActiveObject Returns Boolean
84 String sProgId
85 Variant vComObject
86 Boolean bSuccess
87 Get psProgID to sProgId
88 Get ComActiveObject sProgId to vComObject
89 Set pvComObject to vComObject
90 Move (Not(IsNullComObject(vComObject))) to bSuccess // success of variant is not null
91 Function_Return bSuccess
92 End_Function
93
94 // returns true if the control is created.
95 { MethodType=Function }
96 Function IsComObjectCreated Returns Boolean
97 Variant vComObject
98 Get pvComObject to vComObject
99 Function_Return (Not(IsNullComObject(vComObject)))
100 End_Function
101
102End_Class
103
104