summaryrefslogtreecommitdiff
path: root/ruby_1_8_5/ext/win32ole/doc/win32ole.rd
blob: c563ce5d5b19324396671e6a6155f5742f926f7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
=begin
= Win32OLE extension module

== WIN32OLE 
=== Constants
: VERSION
    The version number of WIN32OLE.

: ARGV
    The argument of the method invoked recently.
    This constant is used to get value of argument 
    when the argument is passed by reference.

=== Class Method
: connect(oleserver)
   returns running OLE automation object or WIN32OLE object from moniker.

: const_load(ole [,obj])
   defines the constants of OLE automation
   server as 'obj' class constants. If 'obj' omitted, the default
   is WIN32OLE.

: new(oleserver)
   returns OLE Automation object.

: ole_free(obj)
   invokes Release method of Dispatch interface of WIN32OLE object.
   This method should not be used because this method exists for debugging WIN32OLE.

: ole_reference_count(obj)
   returns reference counter of Dispatch interface.
   This method should not be used because this method exists for debugging WIN32OLE.

: ole_show_help(info [,helpcontext])
   displays helpfile.
   The first argument specifies WIN32OLE_TYPE object or WIN32OLE_METHOD object 
   or helpfile.

=== Method
: self[property]
   gets property of OLE object.

: self[property]=
   sets property of OLE object.

: _invoke(dispid, args, types)
   runs the early binding method.
   The dispid specifies Dispatch ID, args specifies the array of arguments,
   types specifies array of the type of arguments.

: each {...}
   Iterates over each item of OLE collection which has IEnumVARIANT
   interface.

: invoke(method, args,...)
   runs OLE method.

: ole_func_methods
   returns array of WIN32OLE_METHOD object which corresponds with function.

: ole_get_methods
   returns array of WIN32OLE_METHOD object which corresponds with get properties.

: ole_method(method)
   returns WIN32OLE_METHOD object which coreesponds with method 
   which specified by argument.

: ole_method_help(method)
   alias of ole_method.

: ole_methods
   returns WIN32OLE_METHOD object which coreesponds with method.

: ole_obj_help
   returns WIN32OLE_TYPE object.

: ole_put_methods
   returns array of WIN32OLE_METHOD object which corresponds with put properties.

: setproperty(property, key, val)
   set property of OLE object. 
   This method is used when the property has argument.

   For example, in VB
     obj.item("key") = val
   in Win32OLE
     obj.setproperty("item", "key", val)


== WIN32OLE_EVENT class

=== Class Method

: new(ole, interface)
   The new class method creates OLE event sink object to connect ole.
   The ole must be WIN32OLE object, and interface is the interface
   name of event.

: message_loop
    The message_loop class method translates and dispatches Windows 
    message.

=== Method
: on_event([event]){...}
    defines the callback of event.
    If event omitted, defines the callback of all events.

: on_event_with_outargs([event]) {...}
    defines the callback of event.
    If you want modify argument in callback, 

== WIN32OLE_METHOD

=== Class Methods
: new(win32ole_type, method)    
   creates WIN32OLE_METHOD object.

=== Methods
: dispid
   returns Dispatch ID.

: event?
   returns true if the method is event.

: event_interface
   returns interface name of event if the method is event.

: helpcontext
   returns help context.

: helpfile
   returns help file.

: invkind
   returns invkind.

: invoke_kind
   returns invoke kind string.

: name
   returns name of method.

: offset_vtbl
   returns the offset of Vtbl.

: params
   returns array of WIN32OLE_PARAM object.

: return_type
   returns string of return value type of method.

: return_vtype
   returns number of return value type of method.

: return_type_detail
   returns detail information of return value type of method.

: size_params
   returns the size of arguments.

: size_opt_params
   returns the size of optional arguments.

: visible?
   returns true if the method is public.

== WIN32OLE_PARAM
: default
   returns default value.

: input?
   returns true if argument is input.

: optional?
   returns true if argument is optional.

: output?
   returns true if argument is output.

: name
   returns name.

: ole_type
   returns type of argument.

: ole_type_detail
   returns detail information of type of argument.

: retval?
   returns true if argument is return value.

== WIN32OLE_TYPE
=== Class Methods
: new(typelibrary, class)
    returns WIN32OLE_TYPE object.

: ole_classes(typelibrary)
    returns array of WIN32OLE_TYPE objects defined by Type Library.

: progids
    returns array of ProgID.

: typelibs
    returns array of type libraries.

=== Methods
: guid
   returns GUID.

: helpfile
   returns helpfile.

: helpcontext
   returns helpcontext.

: helpstring
   returns help string.

: major_version
   returns major version.

: minor_version
   returns minor version.

: name
   returns name.

: ole_methods
   returns array of WIN32OLE_METHOD objects.

: ole_type
   returns type of class.

: progid
   returns ProgID if it exists. If not found, then returns nil.

: src_type
   returns source class when the OLE class is 'Alias'.

: typekind
   returns number which represents type.

: variables
   returns array of variables defined in OLE class.

: visible?
   returns true if the OLE class is public.

== WIN32OLE_VARIABLE
=== Methods
: name
   returns the name.

: ole_type
   returns type

: ole_type_detail
   returns detail information of type.

: value
   returns value.

: variable_kind
   returns variable kind string.

: varkind
   returns the number which represents variable kind.

== WIN32OLE::VARIANT
=== Constants
  *VT_I4
  *VT_R4
  *VT_R8
  *VT_CY
  *VT_DATE
  *VT_BSTR
  *VT_USERDEFINED
  *VT_PTR
  *VT_DISPATCH
  *VT_ERROR
  *VT_BOOL
  *VT_VARIANT
  *VT_UNKNOWN
  *VT_I1
  *VT_UI1
  *VT_UI2
  *VT_UI4
  *VT_INT
  *VT_UINT
  *VT_ARRAY
  *VT_BYREF

=end