annotate src/VisVim/OleAut.h @ 18029:72524e906658 v8.1.2010

patch 8.1.2010: new file uses old style comments Commit: https://github.com/vim/vim/commit/9490b9a61cf1f1f3fa9758663a33124ea9f71c87 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Sep 8 17:20:12 2019 +0200 patch 8.1.2010: new file uses old style comments Problem: New file uses old style comments. Solution: Change to new style comments. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/4910)
author Bram Moolenaar <Bram@vim.org>
date Sun, 08 Sep 2019 17:30:03 +0200
parents 3fc0f57ecb91
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 #ifndef __OLEAUT_H__
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 #define __OLEAUT_H__
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 class COleAutomationControl : public CObject
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 public:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 COleAutomationControl ();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 ~COleAutomationControl ();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 bool CreateObject (char* ProgId);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 DISPID GetDispatchId (char* Name);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 bool GetProperty (char* Name);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 bool GetProperty (DISPID DispatchId);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 bool PutProperty (char* Name, LPCTSTR Format, ...);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 bool PutProperty (DISPID DispatchId, LPCTSTR Format, ...);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 bool Method (char* Name, LPCTSTR Format = NULL, ...);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 bool Method (DISPID DispatchId, LPCTSTR Format = NULL, ...);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 void DeleteObject ();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 void ErrDiag ();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 bool IsCreated ()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 return m_pDispatch ? true : false;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 bool IsAlive ();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 HRESULT GetResult ()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 return m_hResult;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 UINT GetErrArgNr ()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 return m_nErrArg;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 EXCEPINFO* GetExceptionInfo ()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 return &m_ExceptionInfo;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 LPVARIANT GetResultVariant ()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 return &m_VariantResult;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 protected:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 bool Invoke (WORD Flags, char* Name, LPCTSTR Format, va_list ArgList);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 bool Invoke (WORD Flags, DISPID DispatchId, LPCTSTR Format, va_list ArgList);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 protected:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 IDispatch* m_pDispatch;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 HRESULT m_hResult;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 UINT m_nErrArg;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 EXCEPINFO m_ExceptionInfo;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 VARIANTARG m_VariantResult;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 };
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 #ifdef UNICODE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 #define FROM_OLE_STRING(str) str
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 #define FROM_OLE_STRING_BUF(str,buf) str
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 #define TO_OLE_STR(str) str
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 #define TO_OLE_STR_BUF(str,buf) str
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 #define MAX_OLE_STR 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 #else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 #define FROM_OLE_STR(str) ConvertToAnsi(str)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 #define FROM_OLE_STR_BUF(str,buf) ConvertToAnsiBuf(str,buf)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 char* ConvertToAnsi (OLECHAR* sUnicode);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 char* ConvertToAnsiBuf (OLECHAR* sUnicode, char* Buf);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 #define TO_OLE_STR(str) ConvertToUnicode(str)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 #define TO_OLE_STR_BUF(str,buf) ConvertToUnicodeBuf(str,buf)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 OLECHAR* ConvertToUnicode (char* sAscii);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 OLECHAR* ConvertToUnicodeBuf (char* sAscii, OLECHAR* Buf);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 // Maximum length of string that can be converted between Ansi & Unicode
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 #define MAX_OLE_STR 500
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 #endif // __OLEAUT_H__