summaryrefslogtreecommitdiff
path: root/ext/win32ole/win32ole.h
diff options
context:
space:
mode:
authorsuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-15 11:36:12 +0000
committersuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-15 11:36:12 +0000
commitcd3d7fe846d4671671612658c9f76ce1ec4c3d56 (patch)
tree88af6fc248ba50407446d090966f42e62ee8fe0e /ext/win32ole/win32ole.h
parent3e759ed78d99193260ddda9b8dd80bc5710509fc (diff)
* ext/win32ole/win32ole.c: seperate WIN32OLE_EVENT src from
win32ole.c. * ext/win32ole/win32ole.h: ditto. * ext/win32ole/win32ole_event.c: ditto. * ext/win32ole/win32ole_event.h: ditto. * ext/win32ole/depend: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/win32ole/win32ole.h')
-rw-r--r--ext/win32ole/win32ole.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/ext/win32ole/win32ole.h b/ext/win32ole/win32ole.h
index 672e3472f3..880fe86466 100644
--- a/ext/win32ole/win32ole.h
+++ b/ext/win32ole/win32ole.h
@@ -108,6 +108,17 @@
#define OLE_GET_TYPEATTR(X, Y) ((X)->lpVtbl->GetTypeAttr((X), (Y)))
#define OLE_RELEASE_TYPEATTR(X, Y) ((X)->lpVtbl->ReleaseTypeAttr((X), (Y)))
+struct oledata {
+ IDispatch *pDispatch;
+};
+
+#define OLEData_Get_Struct(obj, pole) {\
+ Data_Get_Struct(obj, struct oledata, pole);\
+ if(!pole->pDispatch) {\
+ rb_raise(rb_eRuntimeError, "failed to get Dispatch Interface");\
+ }\
+}
+
VALUE cWIN32OLE;
LCID cWIN32OLE_lcid;
@@ -119,6 +130,7 @@ VALUE reg_get_val(HKEY hkey, const char *subkey);
VALUE reg_get_val2(HKEY hkey, const char *subkey);
void ole_initialize(void);
VALUE default_inspect(VALUE self, const char *class_name);
+char *ole_wc2mb(LPWSTR pw);
VALUE ole_wc2vstr(LPWSTR pw, BOOL isfree);
#define WC2VSTR(x) ole_wc2vstr((x), TRUE)
@@ -141,6 +153,7 @@ HRESULT typelib_from_val(VALUE obj, ITypeLib **pTypeLib);
#include "win32ole_variable.h"
#include "win32ole_method.h"
#include "win32ole_param.h"
+#include "win32ole_event.h"
#include "win32ole_variant.h"
#include "win32ole_record.h"
#include "win32ole_error.h"