14 sprintf(strhr,
" HRESULT error code:0x%08x\n ", (
unsigned)hr);
16 dwCount = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
17 FORMAT_MESSAGE_FROM_SYSTEM |
18 FORMAT_MESSAGE_IGNORE_INSERTS,
20 MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US),
21 (LPTSTR)&p_msg, 0,
NULL);
23 dwCount = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
24 FORMAT_MESSAGE_FROM_SYSTEM |
25 FORMAT_MESSAGE_IGNORE_INSERTS,
27 (LPTSTR)&p_msg, 0,
NULL);
31 while (p_msg <
term) {
37 if (p_msg[0] !=
'\0') {
55 err_msg = ole_hresult2msg(hr);
VALUE rb_define_class(const char *, VALUE)
Defines a top-level class.
void rb_exc_raise(VALUE mesg)
Raises an exception in the current thread.
VALUE rb_exc_new_str(VALUE, VALUE)
typedef HRESULT(STDAPICALLTYPE FNCOCREATEINSTANCEEX)(REFCLSID
VALUE eWIN32OLERuntimeError
VALUE eWIN32OLEQueryInterfaceError
void Init_win32ole_error(void)
void ole_raise(HRESULT hr, VALUE ecs, const char *fmt,...)