Module SigCjC_PropExchange.pkg
1//==============================================================================
2// Project : SigCj - VDF Classes for Codejock
3// File : SigCjC_PropExchange.pkg
4// Description : VDF Class for Codejock control
5//
6// Created by : Ian Smith
7// Revision : $Rev: $
8// $Date: $
9// $Author: $
10//
11// Requirements : Visual DataFlex 14.1
12// Codejock SuitePro - Version 13.4.2
13//
14// Copyright : (c) 2009 VDF SIG UK
15// Visual DataFlex Special Interest Group UK.
16// http://www.vdfsig.co.uk/
17// dev@vdfsig.co.uk
18//
19// This file is part of SigCj.
20//
21// SigCj is free software: you can redistribute it and/or modify
22// it under the terms of the GNU Lesser General Public License
23// as published by the Free Software Foundation, either version
24// 2.1 of the License, or (at your option) any later version.
25//
26// SigCj is distributed in the hope that it will be useful, but
27// WITHOUT ANY WARRANTY; without even the implied warranty of
28// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29// GNU Lesser General Public License for more details.
30//
31// If you have the complete SigCj workspace then a copy of the
32// GNU Lesser General Public License is in the Docs folder. If
33// not, see <http://www.gnu.org/licenses/>.
34//
35//==============================================================================
36
37Use FlexCOM20.pkg
38
39Class cSigCjComPropExchange is a cComAutomationObject
40
41 { MethodType=Property DesignTime=False }
42 Function ComValue Returns Variant
43 Variant retVal
44 Get ComProperty of (phDispatchDriver(Self)) 0 OLE_VT_VARIANT to retVal
45 Function_Return retVal
46 End_Function
47
48 { MethodType=Property DesignTime=False }
49 Procedure Set ComValue Variant value
50 Set ComProperty of (phDispatchDriver(Self)) 0 OLE_VT_VARIANT to value
51 End_Procedure
52
53 { MethodType=Property DesignTime=False }
54 Function ComEncoding Returns String
55 String retVal
56 Get ComProperty of (phDispatchDriver(Self)) 11 OLE_VT_BSTR to retVal
57 Function_Return retVal
58 End_Function
59
60 { MethodType=Property DesignTime=False }
61 Procedure Set ComEncoding String value
62 Set ComProperty of (phDispatchDriver(Self)) 11 OLE_VT_BSTR to value
63 End_Procedure
64
65 Function ComCreateAsXML Boolean llLoading String llSection Returns Boolean
66 Handle hDispatchDriver
67 Boolean retVal
68 Get phDispatchDriver to hDispatchDriver
69 Send PrepareParams to hDispatchDriver 2
70 Send DefineParam to hDispatchDriver OLE_VT_BOOL llLoading
71 Send DefineParam to hDispatchDriver OLE_VT_BSTR llSection
72 Get InvokeComMethod of hDispatchDriver 1 OLE_VT_BOOL to retVal
73 Function_Return retVal
74 End_Function
75
76 Function ComCreateAsRegistry Boolean llLoading String llSection Returns Boolean
77 Handle hDispatchDriver
78 Boolean retVal
79 Get phDispatchDriver to hDispatchDriver
80 Send PrepareParams to hDispatchDriver 2
81 Send DefineParam to hDispatchDriver OLE_VT_BOOL llLoading
82 Send DefineParam to hDispatchDriver OLE_VT_BSTR llSection
83 Get InvokeComMethod of hDispatchDriver 2 OLE_VT_BOOL to retVal
84 Function_Return retVal
85 End_Function
86
87 Function ComCreateAsBinaryFile Boolean llLoading String llPath Returns Boolean
88 Handle hDispatchDriver
89 Boolean retVal
90 Get phDispatchDriver to hDispatchDriver
91 Send PrepareParams to hDispatchDriver 2
92 Send DefineParam to hDispatchDriver OLE_VT_BOOL llLoading
93 Send DefineParam to hDispatchDriver OLE_VT_BSTR llPath
94 Get InvokeComMethod of hDispatchDriver 3 OLE_VT_BOOL to retVal
95 Function_Return retVal
96 End_Function
97
98 Function ComLoadFromFile String llPath Returns Boolean
99 Handle hDispatchDriver
100 Boolean retVal
101 Get phDispatchDriver to hDispatchDriver
102 Send PrepareParams to hDispatchDriver 1
103 Send DefineParam to hDispatchDriver OLE_VT_BSTR llPath
104 Get InvokeComMethod of hDispatchDriver 4 OLE_VT_BOOL to retVal
105 Function_Return retVal
106 End_Function
107
108 Procedure ComSaveToFile String llPath
109 Handle hDispatchDriver
110 Get phDispatchDriver to hDispatchDriver
111 Send PrepareParams to hDispatchDriver 1
112 Send DefineParam to hDispatchDriver OLE_VT_BSTR llPath
113 Send InvokeComMethod to hDispatchDriver 5 OLE_VT_VOID
114 End_Procedure
115
116 Function ComGetSection String llSection Returns Variant
117 Handle hDispatchDriver
118 Variant retVal
119 Get phDispatchDriver to hDispatchDriver
120 Send PrepareParams to hDispatchDriver 1
121 Send DefineParam to hDispatchDriver OLE_VT_BSTR llSection
122 Get InvokeComMethod of hDispatchDriver 7 OLE_VT_DISPATCH to retVal
123 Function_Return retVal
124 End_Function
125
126 Procedure ComExchangeString String llPropName String ByRef llValue String llDefaultValue
127 Handle hDispatchDriver
128 Get phDispatchDriver to hDispatchDriver
129 Send PrepareParams to hDispatchDriver 3
130 Send DefineParam to hDispatchDriver OLE_VT_BSTR llPropName
131 Send DefineParam to hDispatchDriver (OLE_VT_BYREF ior OLE_VT_BSTR) llValue
132 Send DefineParam to hDispatchDriver OLE_VT_BSTR llDefaultValue
133 Send InvokeComMethod to hDispatchDriver 8 OLE_VT_VOID
134 End_Procedure
135
136 Procedure ComExchangeInt String llPropName Integer ByRef llValue Integer llDefaultValue
137 Handle hDispatchDriver
138 Get phDispatchDriver to hDispatchDriver
139 Send PrepareParams to hDispatchDriver 3
140 Send DefineParam to hDispatchDriver OLE_VT_BSTR llPropName
141 Send DefineParam to hDispatchDriver (OLE_VT_BYREF ior OLE_VT_I4) llValue
142 Send DefineParam to hDispatchDriver OLE_VT_I4 llDefaultValue
143 Send InvokeComMethod to hDispatchDriver 9 OLE_VT_VOID
144 End_Procedure
145
146 { MethodType=Property DesignTime=False }
147 Function ComLoading Returns Boolean
148 Handle hDispatchDriver
149 Boolean retVal
150 Get phDispatchDriver to hDispatchDriver
151 Get InvokeComMethod of hDispatchDriver 12 OLE_VT_BOOL to retVal
152 Function_Return retVal
153 End_Function
154
155 { MethodType=Property DesignTime=False }
156 Function ComValid Returns Boolean
157 Handle hDispatchDriver
158 Boolean retVal
159 Get phDispatchDriver to hDispatchDriver
160 Get InvokeComMethod of hDispatchDriver 13 OLE_VT_BOOL to retVal
161 Function_Return retVal
162 End_Function
163
164 Procedure ComEmptySection
165 Handle hDispatchDriver
166 Get phDispatchDriver to hDispatchDriver
167 Send InvokeComMethod to hDispatchDriver 14 OLE_VT_VOID
168 End_Procedure
169End_Class
170
171//==============================================================================
172//End of package - SigCjC_PropExchange.pkg
173//==============================================================================
174