win32ole 1.8.9 → 1.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/.document +4 -0
  3. data/{LICENSE.txt → BSDL} +3 -3
  4. data/COPYING +56 -0
  5. data/ext/win32ole/.document +1 -0
  6. data/ext/win32ole/win32ole.c +70 -134
  7. data/ext/win32ole/win32ole_error.c +13 -4
  8. data/ext/win32ole/win32ole_event.c +26 -25
  9. data/ext/win32ole/win32ole_method.c +64 -63
  10. data/ext/win32ole/win32ole_param.c +57 -56
  11. data/ext/win32ole/win32ole_record.c +26 -25
  12. data/ext/win32ole/win32ole_type.c +73 -69
  13. data/ext/win32ole/win32ole_typelib.c +38 -37
  14. data/ext/win32ole/win32ole_variable.c +19 -18
  15. data/ext/win32ole/win32ole_variant.c +34 -33
  16. data/ext/win32ole/win32ole_variant_m.c +7 -5
  17. data/lib/win32ole/property.rb +15 -3
  18. data/lib/win32ole.rb +1 -2
  19. data/{ext/win32ole/sample → sample/win32ole}/olegen.rb +2 -2
  20. metadata +22 -31
  21. data/.git-blame-ignore-revs +0 -7
  22. data/.github/dependabot.yml +0 -6
  23. data/.github/workflows/windows.yml +0 -24
  24. data/.gitignore +0 -8
  25. data/Gemfile +0 -7
  26. data/Rakefile +0 -19
  27. data/bin/console +0 -14
  28. data/bin/setup +0 -8
  29. data/rakelib/changelogs.rake +0 -34
  30. data/rakelib/epoch.rake +0 -5
  31. data/rakelib/sync_tool.rake +0 -6
  32. data/rakelib/version.rake +0 -45
  33. data/win32ole.gemspec +0 -22
  34. /data/{ext/win32ole/sample → sample/win32ole}/excel1.rb +0 -0
  35. /data/{ext/win32ole/sample → sample/win32ole}/excel2.rb +0 -0
  36. /data/{ext/win32ole/sample → sample/win32ole}/excel3.rb +0 -0
  37. /data/{ext/win32ole/sample → sample/win32ole}/ie.rb +0 -0
  38. /data/{ext/win32ole/sample → sample/win32ole}/ieconst.rb +0 -0
  39. /data/{ext/win32ole/sample → sample/win32ole}/ienavi.rb +0 -0
  40. /data/{ext/win32ole/sample → sample/win32ole}/ienavi2.rb +0 -0
  41. /data/{ext/win32ole/sample → sample/win32ole}/oledirs.rb +0 -0
  42. /data/{ext/win32ole/sample → sample/win32ole}/xml.rb +0 -0
@@ -1,9 +1,9 @@
1
1
  #include "win32ole.h"
2
2
 
3
3
  /*
4
- * Document-class: WIN32OLE_EVENT
4
+ * Document-class: WIN32OLE::Event
5
5
  *
6
- * <code>WIN32OLE_EVENT</code> objects controls OLE event.
6
+ * +WIN32OLE::Event+ objects controls OLE event.
7
7
  */
8
8
 
9
9
  RUBY_EXTERN void rb_write_error_str(VALUE mesg);
@@ -974,13 +974,13 @@ ev_advise(int argc, VALUE *argv, VALUE self)
974
974
 
975
975
  /*
976
976
  * call-seq:
977
- * WIN32OLE_EVENT.new(ole, event) #=> WIN32OLE_EVENT object.
977
+ * new(ole, event) #=> WIN32OLE::Event object.
978
978
  *
979
979
  * Returns OLE event object.
980
980
  * The first argument specifies WIN32OLE object.
981
981
  * The second argument specifies OLE event name.
982
982
  * ie = WIN32OLE.new('InternetExplorer.Application')
983
- * ev = WIN32OLE_EVENT.new(ie, 'DWebBrowserEvents')
983
+ * ev = WIN32OLE::Event.new(ie, 'DWebBrowserEvents')
984
984
  */
985
985
  static VALUE
986
986
  fev_initialize(int argc, VALUE *argv, VALUE self)
@@ -1004,7 +1004,7 @@ ole_msg_loop(void)
1004
1004
 
1005
1005
  /*
1006
1006
  * call-seq:
1007
- * WIN32OLE_EVENT.message_loop
1007
+ * message_loop
1008
1008
  *
1009
1009
  * Translates and dispatches Windows message.
1010
1010
  */
@@ -1052,7 +1052,7 @@ ev_on_event(int argc, VALUE *argv, VALUE self, VALUE is_ary_arg)
1052
1052
 
1053
1053
  /*
1054
1054
  * call-seq:
1055
- * WIN32OLE_EVENT#on_event([event]){...}
1055
+ * on_event([event]){...}
1056
1056
  *
1057
1057
  * Defines the callback event.
1058
1058
  * If argument is omitted, this method defines the callback of all events.
@@ -1061,12 +1061,12 @@ ev_on_event(int argc, VALUE *argv, VALUE self, VALUE is_ary_arg)
1061
1061
  * use `return' or :return.
1062
1062
  *
1063
1063
  * ie = WIN32OLE.new('InternetExplorer.Application')
1064
- * ev = WIN32OLE_EVENT.new(ie)
1064
+ * ev = WIN32OLE::Event.new(ie)
1065
1065
  * ev.on_event("NavigateComplete") {|url| puts url}
1066
1066
  * ev.on_event() {|ev, *args| puts "#{ev} fired"}
1067
1067
  *
1068
1068
  * ev.on_event("BeforeNavigate2") {|*args|
1069
- * ...
1069
+ * # ...
1070
1070
  * # set true to BeforeNavigate reference argument `Cancel'.
1071
1071
  * # Cancel is 7-th argument of BeforeNavigate,
1072
1072
  * # so you can use 6 as key of hash instead of 'Cancel'.
@@ -1075,7 +1075,7 @@ ev_on_event(int argc, VALUE *argv, VALUE self, VALUE is_ary_arg)
1075
1075
  * {:Cancel => true} # or {'Cancel' => true} or {6 => true}
1076
1076
  * }
1077
1077
  *
1078
- * ev.on_event(...) {|*args|
1078
+ * ev.on_event(event_name) {|*args|
1079
1079
  * {:return => 1, :xxx => yyy}
1080
1080
  * }
1081
1081
  */
@@ -1087,14 +1087,14 @@ fev_on_event(int argc, VALUE *argv, VALUE self)
1087
1087
 
1088
1088
  /*
1089
1089
  * call-seq:
1090
- * WIN32OLE_EVENT#on_event_with_outargs([event]){...}
1090
+ * on_event_with_outargs([event]){...}
1091
1091
  *
1092
1092
  * Defines the callback of event.
1093
1093
  * If you want modify argument in callback,
1094
- * you could use this method instead of WIN32OLE_EVENT#on_event.
1094
+ * you could use this method instead of WIN32OLE::Event#on_event.
1095
1095
  *
1096
1096
  * ie = WIN32OLE.new('InternetExplorer.Application')
1097
- * ev = WIN32OLE_EVENT.new(ie)
1097
+ * ev = WIN32OLE::Event.new(ie)
1098
1098
  * ev.on_event_with_outargs('BeforeNavigate2') {|*args|
1099
1099
  * args.last[6] = true
1100
1100
  * }
@@ -1107,18 +1107,18 @@ fev_on_event_with_outargs(int argc, VALUE *argv, VALUE self)
1107
1107
 
1108
1108
  /*
1109
1109
  * call-seq:
1110
- * WIN32OLE_EVENT#off_event([event])
1110
+ * off_event([event])
1111
1111
  *
1112
1112
  * removes the callback of event.
1113
1113
  *
1114
1114
  * ie = WIN32OLE.new('InternetExplorer.Application')
1115
- * ev = WIN32OLE_EVENT.new(ie)
1115
+ * ev = WIN32OLE::Event.new(ie)
1116
1116
  * ev.on_event('BeforeNavigate2') {|*args|
1117
1117
  * args.last[6] = true
1118
1118
  * }
1119
- * ...
1119
+ * # ...
1120
1120
  * ev.off_event('BeforeNavigate2')
1121
- * ...
1121
+ * # ...
1122
1122
  */
1123
1123
  static VALUE
1124
1124
  fev_off_event(int argc, VALUE *argv, VALUE self)
@@ -1145,16 +1145,16 @@ fev_off_event(int argc, VALUE *argv, VALUE self)
1145
1145
 
1146
1146
  /*
1147
1147
  * call-seq:
1148
- * WIN32OLE_EVENT#unadvise -> nil
1148
+ * unadvise -> nil
1149
1149
  *
1150
- * disconnects OLE server. If this method called, then the WIN32OLE_EVENT object
1150
+ * disconnects OLE server. If this method called, then the WIN32OLE::Event object
1151
1151
  * does not receive the OLE server event any more.
1152
1152
  * This method is trial implementation.
1153
1153
  *
1154
1154
  * ie = WIN32OLE.new('InternetExplorer.Application')
1155
- * ev = WIN32OLE_EVENT.new(ie)
1156
- * ev.on_event() {...}
1157
- * ...
1155
+ * ev = WIN32OLE::Event.new(ie)
1156
+ * ev.on_event() { something }
1157
+ * # ...
1158
1158
  * ev.unadvise
1159
1159
  *
1160
1160
  */
@@ -1201,7 +1201,7 @@ evs_length(void)
1201
1201
 
1202
1202
  /*
1203
1203
  * call-seq:
1204
- * WIN32OLE_EVENT#handler=
1204
+ * handler=
1205
1205
  *
1206
1206
  * sets event handler object. If handler object has onXXX
1207
1207
  * method according to XXX event, then onXXX method is called
@@ -1212,7 +1212,7 @@ evs_length(void)
1212
1212
  * called and 1-st argument is event name.
1213
1213
  *
1214
1214
  * If handler object has onXXX method and there is block
1215
- * defined by WIN32OLE_EVENT#on_event('XXX'){},
1215
+ * defined by <code>on_event('XXX'){}</code>,
1216
1216
  * then block is executed but handler object method is not called
1217
1217
  * when XXX event occurs.
1218
1218
  *
@@ -1230,7 +1230,7 @@ evs_length(void)
1230
1230
  *
1231
1231
  * handler = Handler.new
1232
1232
  * ie = WIN32OLE.new('InternetExplorer.Application')
1233
- * ev = WIN32OLE_EVENT.new(ie)
1233
+ * ev = WIN32OLE::Event.new(ie)
1234
1234
  * ev.on_event("StatusTextChange") {|*args|
1235
1235
  * puts "this block executed."
1236
1236
  * puts "handler.onStatusTextChange method is not called."
@@ -1246,7 +1246,7 @@ fev_set_handler(VALUE self, VALUE val)
1246
1246
 
1247
1247
  /*
1248
1248
  * call-seq:
1249
- * WIN32OLE_EVENT#handler
1249
+ * handler
1250
1250
  *
1251
1251
  * returns handler object.
1252
1252
  *
@@ -1265,6 +1265,7 @@ Init_win32ole_event(void)
1265
1265
  rb_gc_register_mark_object(ary_ole_event);
1266
1266
  id_events = rb_intern("events");
1267
1267
  cWIN32OLE_EVENT = rb_define_class_under(cWIN32OLE, "Event", rb_cObject);
1268
+ /* Alias of WIN32OLE::Event, for the backward compatibility */
1268
1269
  rb_define_const(rb_cObject, "WIN32OLE_EVENT", cWIN32OLE_EVENT);
1269
1270
  rb_define_singleton_method(cWIN32OLE_EVENT, "message_loop", fev_s_msg_loop, 0);
1270
1271
  rb_define_alloc_func(cWIN32OLE_EVENT, fev_s_allocate);
@@ -216,9 +216,9 @@ create_win32ole_method(ITypeInfo *pTypeInfo, VALUE name)
216
216
  }
217
217
 
218
218
  /*
219
- * Document-class: WIN32OLE_METHOD
219
+ * Document-class: WIN32OLE::Method
220
220
  *
221
- * <code>WIN32OLE_METHOD</code> objects represent OLE method information.
221
+ * +WIN32OLE::Method+ objects represent OLE method information.
222
222
  */
223
223
 
224
224
  static VALUE
@@ -251,16 +251,16 @@ folemethod_s_allocate(VALUE klass)
251
251
 
252
252
  /*
253
253
  * call-seq:
254
- * WIN32OLE_METHOD.new(ole_type, method) -> WIN32OLE_METHOD object
254
+ * WIN32OLE::Method.new(ole_type, method) -> WIN32OLE::Method object
255
255
  *
256
- * Returns a new WIN32OLE_METHOD object which represents the information
256
+ * Returns a new WIN32OLE::Method object which represents the information
257
257
  * about OLE method.
258
- * The first argument <i>ole_type</i> specifies WIN32OLE_TYPE object.
258
+ * The first argument <i>ole_type</i> specifies WIN32OLE::Type object.
259
259
  * The second argument <i>method</i> specifies OLE method name defined OLE class
260
- * which represents WIN32OLE_TYPE object.
260
+ * which represents WIN32OLE::Type object.
261
261
  *
262
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
263
- * method = WIN32OLE_METHOD.new(tobj, 'SaveAs')
262
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbook')
263
+ * method = WIN32OLE::Method.new(tobj, 'SaveAs')
264
264
  */
265
265
  static VALUE
266
266
  folemethod_initialize(VALUE self, VALUE oletype, VALUE method)
@@ -277,19 +277,19 @@ folemethod_initialize(VALUE self, VALUE oletype, VALUE method)
277
277
  }
278
278
  }
279
279
  else {
280
- rb_raise(rb_eTypeError, "1st argument should be WIN32OLE_TYPE object");
280
+ rb_raise(rb_eTypeError, "1st argument should be WIN32OLE::Type object");
281
281
  }
282
282
  return obj;
283
283
  }
284
284
 
285
285
  /*
286
286
  * call-seq:
287
- * WIN32OLE_METHOD#name
287
+ * name
288
288
  *
289
289
  * Returns the name of the method.
290
290
  *
291
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
292
- * method = WIN32OLE_METHOD.new(tobj, 'SaveAs')
291
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbook')
292
+ * method = WIN32OLE::Method.new(tobj, 'SaveAs')
293
293
  * puts method.name # => SaveAs
294
294
  *
295
295
  */
@@ -317,11 +317,11 @@ ole_method_return_type(ITypeInfo *pTypeInfo, UINT method_index)
317
317
 
318
318
  /*
319
319
  * call-seq:
320
- * WIN32OLE_METHOD#return_type
320
+ * return_type
321
321
  *
322
322
  * Returns string of return value type of method.
323
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
324
- * method = WIN32OLE_METHOD.new(tobj, 'Add')
323
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
324
+ * method = WIN32OLE::Method.new(tobj, 'Add')
325
325
  * puts method.return_type # => Workbook
326
326
  *
327
327
  */
@@ -351,11 +351,11 @@ ole_method_return_vtype(ITypeInfo *pTypeInfo, UINT method_index)
351
351
 
352
352
  /*
353
353
  * call-seq:
354
- * WIN32OLE_METHOD#return_vtype
354
+ * return_vtype
355
355
  *
356
356
  * Returns number of return value type of method.
357
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
358
- * method = WIN32OLE_METHOD.new(tobj, 'Add')
357
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
358
+ * method = WIN32OLE::Method.new(tobj, 'Add')
359
359
  * puts method.return_vtype # => 26
360
360
  *
361
361
  */
@@ -385,12 +385,12 @@ ole_method_return_type_detail(ITypeInfo *pTypeInfo, UINT method_index)
385
385
 
386
386
  /*
387
387
  * call-seq:
388
- * WIN32OLE_METHOD#return_type_detail
388
+ * return_type_detail
389
389
  *
390
390
  * Returns detail information of return value type of method.
391
391
  * The information is array.
392
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
393
- * method = WIN32OLE_METHOD.new(tobj, 'Add')
392
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
393
+ * method = WIN32OLE::Method.new(tobj, 'Add')
394
394
  * p method.return_type_detail # => ["PTR", "USERDEFINED", "Workbook"]
395
395
  */
396
396
  static VALUE
@@ -437,11 +437,11 @@ ole_method_invoke_kind(ITypeInfo *pTypeInfo, UINT method_index)
437
437
 
438
438
  /*
439
439
  * call-seq:
440
- * WIN32OLE_METHOD#invkind
440
+ * invkind
441
441
  *
442
442
  * Returns the method invoke kind.
443
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
444
- * method = WIN32OLE_METHOD.new(tobj, 'Add')
443
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
444
+ * method = WIN32OLE::Method.new(tobj, 'Add')
445
445
  * puts method.invkind # => 1
446
446
  *
447
447
  */
@@ -455,13 +455,13 @@ folemethod_invkind(VALUE self)
455
455
 
456
456
  /*
457
457
  * call-seq:
458
- * WIN32OLE_METHOD#invoke_kind
458
+ * invoke_kind
459
459
  *
460
460
  * Returns the method kind string. The string is "UNKNOWN" or "PROPERTY"
461
461
  * or "PROPERTY" or "PROPERTYGET" or "PROPERTYPUT" or "PROPERTYPPUTREF"
462
462
  * or "FUNC".
463
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
464
- * method = WIN32OLE_METHOD.new(tobj, 'Add')
463
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
464
+ * method = WIN32OLE::Method.new(tobj, 'Add')
465
465
  * puts method.invoke_kind # => "FUNC"
466
466
  */
467
467
  static VALUE
@@ -494,11 +494,11 @@ ole_method_visible(ITypeInfo *pTypeInfo, UINT method_index)
494
494
 
495
495
  /*
496
496
  * call-seq:
497
- * WIN32OLE_METHOD#visible?
497
+ * visible?
498
498
  *
499
499
  * Returns true if the method is public.
500
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
501
- * method = WIN32OLE_METHOD.new(tobj, 'Add')
500
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
501
+ * method = WIN32OLE::Method.new(tobj, 'Add')
502
502
  * puts method.visible? # => true
503
503
  */
504
504
  static VALUE
@@ -575,11 +575,11 @@ ole_method_event(ITypeInfo *pTypeInfo, UINT method_index, VALUE method_name)
575
575
 
576
576
  /*
577
577
  * call-seq:
578
- * WIN32OLE_METHOD#event?
578
+ * event?
579
579
  *
580
580
  * Returns true if the method is event.
581
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
582
- * method = WIN32OLE_METHOD.new(tobj, 'SheetActivate')
581
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbook')
582
+ * method = WIN32OLE::Method.new(tobj, 'SheetActivate')
583
583
  * puts method.event? # => true
584
584
  *
585
585
  */
@@ -597,11 +597,11 @@ folemethod_event(VALUE self)
597
597
 
598
598
  /*
599
599
  * call-seq:
600
- * WIN32OLE_METHOD#event_interface
600
+ * event_interface
601
601
  *
602
602
  * Returns event interface name if the method is event.
603
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
604
- * method = WIN32OLE_METHOD.new(tobj, 'SheetActivate')
603
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbook')
604
+ * method = WIN32OLE::Method.new(tobj, 'SheetActivate')
605
605
  * puts method.event_interface # => WorkbookEvents
606
606
  */
607
607
  static VALUE
@@ -655,12 +655,12 @@ ole_method_helpstring(ITypeInfo *pTypeInfo, UINT method_index)
655
655
 
656
656
  /*
657
657
  * call-seq:
658
- * WIN32OLE_METHOD#helpstring
658
+ * helpstring
659
659
  *
660
660
  * Returns help string of OLE method. If the help string is not found,
661
661
  * then the method returns nil.
662
- * tobj = WIN32OLE_TYPE.new('Microsoft Internet Controls', 'IWebBrowser')
663
- * method = WIN32OLE_METHOD.new(tobj, 'Navigate')
662
+ * tobj = WIN32OLE::Type.new('Microsoft Internet Controls', 'IWebBrowser')
663
+ * method = WIN32OLE::Method.new(tobj, 'Navigate')
664
664
  * puts method.helpstring # => Navigates to a URL or file.
665
665
  *
666
666
  */
@@ -686,12 +686,12 @@ ole_method_helpfile(ITypeInfo *pTypeInfo, UINT method_index)
686
686
 
687
687
  /*
688
688
  * call-seq:
689
- * WIN32OLE_METHOD#helpfile
689
+ * helpfile
690
690
  *
691
691
  * Returns help file. If help file is not found, then
692
692
  * the method returns nil.
693
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
694
- * method = WIN32OLE_METHOD.new(tobj, 'Add')
693
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
694
+ * method = WIN32OLE::Method.new(tobj, 'Add')
695
695
  * puts method.helpfile # => C:\...\VBAXL9.CHM
696
696
  */
697
697
  static VALUE
@@ -717,11 +717,11 @@ ole_method_helpcontext(ITypeInfo *pTypeInfo, UINT method_index)
717
717
 
718
718
  /*
719
719
  * call-seq:
720
- * WIN32OLE_METHOD#helpcontext
720
+ * helpcontext
721
721
  *
722
722
  * Returns help context.
723
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
724
- * method = WIN32OLE_METHOD.new(tobj, 'Add')
723
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
724
+ * method = WIN32OLE::Method.new(tobj, 'Add')
725
725
  * puts method.helpcontext # => 65717
726
726
  */
727
727
  static VALUE
@@ -748,11 +748,11 @@ ole_method_dispid(ITypeInfo *pTypeInfo, UINT method_index)
748
748
 
749
749
  /*
750
750
  * call-seq:
751
- * WIN32OLE_METHOD#dispid
751
+ * dispid
752
752
  *
753
753
  * Returns dispatch ID.
754
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
755
- * method = WIN32OLE_METHOD.new(tobj, 'Add')
754
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
755
+ * method = WIN32OLE::Method.new(tobj, 'Add')
756
756
  * puts method.dispid # => 181
757
757
  */
758
758
  static VALUE
@@ -779,11 +779,11 @@ ole_method_offset_vtbl(ITypeInfo *pTypeInfo, UINT method_index)
779
779
 
780
780
  /*
781
781
  * call-seq:
782
- * WIN32OLE_METHOD#offset_vtbl
782
+ * offset_vtbl
783
783
  *
784
784
  * Returns the offset ov VTBL.
785
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
786
- * method = WIN32OLE_METHOD.new(tobj, 'Add')
785
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
786
+ * method = WIN32OLE::Method.new(tobj, 'Add')
787
787
  * puts method.offset_vtbl # => 40
788
788
  */
789
789
  static VALUE
@@ -810,11 +810,11 @@ ole_method_size_params(ITypeInfo *pTypeInfo, UINT method_index)
810
810
 
811
811
  /*
812
812
  * call-seq:
813
- * WIN32OLE_METHOD#size_params
813
+ * size_params
814
814
  *
815
815
  * Returns the size of arguments of the method.
816
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
817
- * method = WIN32OLE_METHOD.new(tobj, 'SaveAs')
816
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbook')
817
+ * method = WIN32OLE::Method.new(tobj, 'SaveAs')
818
818
  * puts method.size_params # => 11
819
819
  *
820
820
  */
@@ -842,11 +842,11 @@ ole_method_size_opt_params(ITypeInfo *pTypeInfo, UINT method_index)
842
842
 
843
843
  /*
844
844
  * call-seq:
845
- * WIN32OLE_METHOD#size_opt_params
845
+ * size_opt_params
846
846
  *
847
847
  * Returns the size of optional parameters.
848
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
849
- * method = WIN32OLE_METHOD.new(tobj, 'SaveAs')
848
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbook')
849
+ * method = WIN32OLE::Method.new(tobj, 'SaveAs')
850
850
  * puts method.size_opt_params # => 4
851
851
  */
852
852
  static VALUE
@@ -892,11 +892,11 @@ ole_method_params(ITypeInfo *pTypeInfo, UINT method_index)
892
892
 
893
893
  /*
894
894
  * call-seq:
895
- * WIN32OLE_METHOD#params
895
+ * params
896
896
  *
897
- * returns array of WIN32OLE_PARAM object corresponding with method parameters.
898
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
899
- * method = WIN32OLE_METHOD.new(tobj, 'SaveAs')
897
+ * returns array of WIN32OLE::Param object corresponding with method parameters.
898
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbook')
899
+ * method = WIN32OLE::Method.new(tobj, 'SaveAs')
900
900
  * p method.params # => [Filename, FileFormat, Password, WriteResPassword,
901
901
  * ReadOnlyRecommended, CreateBackup, AccessMode,
902
902
  * ConflictResolution, AddToMru, TextCodepage,
@@ -912,7 +912,7 @@ folemethod_params(VALUE self)
912
912
 
913
913
  /*
914
914
  * call-seq:
915
- * WIN32OLE_METHOD#inspect -> String
915
+ * inspect -> String
916
916
  *
917
917
  * Returns the method name with class name.
918
918
  *
@@ -920,7 +920,7 @@ folemethod_params(VALUE self)
920
920
  static VALUE
921
921
  folemethod_inspect(VALUE self)
922
922
  {
923
- return default_inspect(self, "WIN32OLE_METHOD");
923
+ return default_inspect(self, "WIN32OLE::Method");
924
924
  }
925
925
 
926
926
  VALUE cWIN32OLE_METHOD;
@@ -928,6 +928,7 @@ VALUE cWIN32OLE_METHOD;
928
928
  void Init_win32ole_method(void)
929
929
  {
930
930
  cWIN32OLE_METHOD = rb_define_class_under(cWIN32OLE, "Method", rb_cObject);
931
+ /* Alias of WIN32OLE::Method, for the backward compatibility */
931
932
  rb_define_const(rb_cObject, "WIN32OLE_METHOD", cWIN32OLE_METHOD);
932
933
  rb_define_alloc_func(cWIN32OLE_METHOD, folemethod_s_allocate);
933
934
  rb_define_method(cWIN32OLE_METHOD, "initialize", folemethod_initialize, 2);