4 class COleAutomationControl
: public CObject
7 COleAutomationControl ();
8 ~COleAutomationControl ();
9 bool CreateObject (char* ProgId
);
10 DISPID
GetDispatchId (char* Name
);
11 bool GetProperty (char* Name
);
12 bool GetProperty (DISPID DispatchId
);
13 bool PutProperty (char* Name
, LPCTSTR Format
, ...);
14 bool PutProperty (DISPID DispatchId
, LPCTSTR Format
, ...);
15 bool Method (char* Name
, LPCTSTR Format
= NULL
, ...);
16 bool Method (DISPID DispatchId
, LPCTSTR Format
= NULL
, ...);
21 return m_pDispatch
? true : false;
32 EXCEPINFO
* GetExceptionInfo ()
34 return &m_ExceptionInfo
;
36 LPVARIANT
GetResultVariant ()
38 return &m_VariantResult
;
42 bool Invoke (WORD Flags
, char* Name
, LPCTSTR Format
, va_list ArgList
);
43 bool Invoke (WORD Flags
, DISPID DispatchId
, LPCTSTR Format
, va_list ArgList
);
46 IDispatch
* m_pDispatch
;
49 EXCEPINFO m_ExceptionInfo
;
50 VARIANTARG m_VariantResult
;
54 #define FROM_OLE_STRING(str) str
55 #define FROM_OLE_STRING_BUF(str,buf) str
56 #define TO_OLE_STR(str) str
57 #define TO_OLE_STR_BUF(str,buf) str
60 #define FROM_OLE_STR(str) ConvertToAnsi(str)
61 #define FROM_OLE_STR_BUF(str,buf) ConvertToAnsiBuf(str,buf)
62 char* ConvertToAnsi (OLECHAR
* sUnicode
);
63 char* ConvertToAnsiBuf (OLECHAR
* sUnicode
, char* Buf
);
64 #define TO_OLE_STR(str) ConvertToUnicode(str)
65 #define TO_OLE_STR_BUF(str,buf) ConvertToUnicodeBuf(str,buf)
66 OLECHAR
* ConvertToUnicode (char* sAscii
);
67 OLECHAR
* ConvertToUnicodeBuf (char* sAscii
, OLECHAR
* Buf
);
68 // Maximum length of string that can be converted between Ansi & Unicode
69 #define MAX_OLE_STR 500
73 #endif // __OLEAUT_H__