Ruby 2.7.7p221 (2022-11-24 revision 168ec2b1e5ad0e4688e963d9de019557c78feed9)
win32ole_variant_m.c
Go to the documentation of this file.
1#include "win32ole.h"
2
4
6{
7 /*
8 * Document-module: WIN32OLE::VARIANT
9 *
10 * The WIN32OLE::VARIANT module includes constants of VARIANT type constants.
11 * The constants is used when creating WIN32OLE_VARIANT object.
12 *
13 * obj = WIN32OLE_VARIANT.new("2e3", WIN32OLE::VARIANT::VT_R4)
14 * obj.value # => 2000.0
15 *
16 */
18
19 /*
20 * represents VT_EMPTY type constant.
21 */
22 rb_define_const(mWIN32OLE_VARIANT, "VT_EMPTY", RB_INT2FIX(VT_EMPTY));
23
24 /*
25 * represents VT_NULL type constant.
26 */
27 rb_define_const(mWIN32OLE_VARIANT, "VT_NULL", RB_INT2FIX(VT_NULL));
28
29 /*
30 * represents VT_I2 type constant.
31 */
33
34 /*
35 * represents VT_I4 type constant.
36 */
38
39 /*
40 * represents VT_R4 type constant.
41 */
43
44 /*
45 * represents VT_R8 type constant.
46 */
48
49 /*
50 * represents VT_CY type constant.
51 */
53
54 /*
55 * represents VT_DATE type constant.
56 */
57 rb_define_const(mWIN32OLE_VARIANT, "VT_DATE", RB_INT2FIX(VT_DATE));
58
59 /*
60 * represents VT_BSTR type constant.
61 */
62 rb_define_const(mWIN32OLE_VARIANT, "VT_BSTR", RB_INT2FIX(VT_BSTR));
63
64 /*
65 * represents VT_USERDEFINED type constant.
66 */
67 rb_define_const(mWIN32OLE_VARIANT, "VT_USERDEFINED", RB_INT2FIX(VT_USERDEFINED));
68
69 /*
70 * represents VT_PTR type constant.
71 */
73
74 /*
75 * represents VT_DISPATCH type constant.
76 */
77 rb_define_const(mWIN32OLE_VARIANT, "VT_DISPATCH", RB_INT2FIX(VT_DISPATCH));
78
79 /*
80 * represents VT_ERROR type constant.
81 */
82 rb_define_const(mWIN32OLE_VARIANT, "VT_ERROR", RB_INT2FIX(VT_ERROR));
83
84 /*
85 * represents VT_BOOL type constant.
86 */
87 rb_define_const(mWIN32OLE_VARIANT, "VT_BOOL", RB_INT2FIX(VT_BOOL));
88
89 /*
90 * represents VT_VARIANT type constant.
91 */
92 rb_define_const(mWIN32OLE_VARIANT, "VT_VARIANT", RB_INT2FIX(VT_VARIANT));
93
94 /*
95 * represents VT_UNKNOWN type constant.
96 */
97 rb_define_const(mWIN32OLE_VARIANT, "VT_UNKNOWN", RB_INT2FIX(VT_UNKNOWN));
98
99 /*
100 * represents VT_I1 type constant.
101 */
103
104 /*
105 * represents VT_UI1 type constant.
106 */
107 rb_define_const(mWIN32OLE_VARIANT, "VT_UI1", RB_INT2FIX(VT_UI1));
108
109 /*
110 * represents VT_UI2 type constant.
111 */
112 rb_define_const(mWIN32OLE_VARIANT, "VT_UI2", RB_INT2FIX(VT_UI2));
113
114 /*
115 * represents VT_UI4 type constant.
116 */
117 rb_define_const(mWIN32OLE_VARIANT, "VT_UI4", RB_INT2FIX(VT_UI4));
118
119#if (_MSC_VER >= 1300) || defined(__CYGWIN__) || defined(__MINGW32__)
120 /*
121 * represents VT_I8 type constant.
122 */
124
125 /*
126 * represents VT_UI8 type constant.
127 */
128 rb_define_const(mWIN32OLE_VARIANT, "VT_UI8", RB_INT2FIX(VT_UI8));
129#endif
130
131 /*
132 * represents VT_INT type constant.
133 */
134 rb_define_const(mWIN32OLE_VARIANT, "VT_INT", RB_INT2FIX(VT_INT));
135
136 /*
137 * represents VT_UINT type constant.
138 */
139 rb_define_const(mWIN32OLE_VARIANT, "VT_UINT", RB_INT2FIX(VT_UINT));
140
141 /*
142 * represents VT_ARRAY type constant.
143 */
144 rb_define_const(mWIN32OLE_VARIANT, "VT_ARRAY", RB_INT2FIX(VT_ARRAY));
145
146 /*
147 * represents VT_BYREF type constant.
148 */
149 rb_define_const(mWIN32OLE_VARIANT, "VT_BYREF", RB_INT2FIX(VT_BYREF));
150
151}
VALUE rb_define_module_under(VALUE, const char *)
Definition: class.c:810
#define RB_INT2FIX(i)
void rb_define_const(VALUE, const char *, VALUE)
Definition: variable.c:2891
unsigned long VALUE
Definition: ruby.h:102
VALUE cWIN32OLE
Definition: win32ole.c:38
void Init_win32ole_variant_m(void)
VALUE mWIN32OLE_VARIANT