Mobile API Reference  MicroStrategy 2019
Msi_ole2.h
Go to the documentation of this file.
1 // File: ole2.h
2 // Date: 10th July 2001
3 // Author: Will Hurwood
4 // Modified by: Liqun Jin
5 //
6 // Copyright (C) 2001 MicroStrategy Incorporated
7 // All rights reserved
8 
9 // This header file stands in for the standard 'ole2.h' header file used in VC++
10 // We make minimal effort to declare symbols and functions in the same file as
11 // used in Windows.
12 
13 // This file is used to declare functions like CoCreateInstance that C++ code
14 // uses to communicate with COM code. This in the COM SDK in Windows terminology.
15 
16 #ifndef __OLE2_H__
17 #define __OLE2_H__
18 
19 #include "MsiCOM/MsiCOM/MsiCOM.h"
20 
23 #include "PDCHeader/PDCwinerror.h"
24 
25 // These macros are used in declaration of COM SDK functions
26 #define WINOLEAPI STDAPI
27 #define WINOLEAPI_(type) STDAPI_(type)
28 
30 
31 // VC++ extension uses __declspec to associate GUID with class
32 // We rarely make use of this in our code but standard headers declare this symbol
33 #ifndef WIN32
34 #define __declspec(x)
35 #endif // WIN32
36 
37 
38 
39 
41 // Enumerations
42 
43 // Enumeration used by CoCreateInstance
44 typedef enum tagCLSCTX {
54 } CLSCTX;
55 
56 // COM initialization flags; passed to CoInitialize.
57 typedef enum tagCOINIT {
58  COINIT_APARTMENTTHREADED = 0x2, // Apartment model
59  COINIT_MULTITHREADED = 0x0, // OLE calls objects on any thread.
60  COINIT_DISABLE_OLE1DDE = 0x4, // Don't use DDE for Ole1 support.
61  COINIT_SPEED_OVER_MEMORY = 0x8 // Trade memory for speed.
62 } COINIT;
63 
64 
66 // Selected COM SDK functions
67 
68 // Create an instance of a COM object
70  LPUNKNOWN pUnkOuter,
71  DWORD dwClsContext,
72  REFIID riid,
73  LPVOID FAR* ppv);
74 
75 // Get the class object for a COM object
77  DWORD dwClsContext,
78  LPVOID pvReserved,
79  REFIID riid,
80  LPVOID FAR* ppv);
81 
82 // Start up and shut down COM on a thread
85 WINOLEAPI_(void) DLL_MSICOM_EXIM CoUninitialize(void);
86 
87 
88 #endif /* __OLE2_H__ */
#define WINOLEAPI
Definition: Msi_ole2.h:26
IUnknown __RPC_FAR * LPUNKNOWN
Definition: Msi_oaidl.h:53
Definition: Msi_ole2.h:58
Definition: Msi_ole2.h:60
#define REFCLSID
Definition: PDCwtypes.h:328
WINOLEAPI DLL_MSICOM_EXIM CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID riid, LPVOID FAR *ppv)
Definition: Msi_ole2.h:47
Definition: Msi_ole2.h:61
Definition: Msi_ole2.h:46
WINOLEAPI DLL_MSICOM_EXIM CoInitialize(LPVOID pvReserved)
void * LPVOID
Definition: PDCwtypes.h:136
enum tagCLSCTX CLSCTX
REFIID LPVOID * ppv
Definition: Msi_atlbase.h:90
#define WINOLEAPI_(type)
Definition: Msi_ole2.h:27
Definition: Msi_ole2.h:50
Definition: Msi_ole2.h:49
REFIID riid
Definition: Msi_atlbase.h:90
Definition: Msi_ole2.h:53
Definition: Msi_ole2.h:52
Definition: Msi_ole2.h:45
Definition: Msi_ole2.h:48
#define DLL_MSICOM_EXIM
Definition: MsiCOM.h:19
WINOLEAPI DLL_MSICOM_EXIM CoGetClassObject(REFCLSID rclsid, DWORD dwClsContext, LPVOID pvReserved, REFIID riid, LPVOID FAR *ppv)
WINOLEAPI DLL_MSICOM_EXIM CoInitializeEx(LPVOID pvReserved, DWORD dwCoInit)
enum tagCOINIT COINIT
#define FAR
Definition: PDCwtypes.h:68
Definition: Msi_ole2.h:51
Definition: Msi_ole2.h:59
unsigned long DWORD
Definition: PDCwtypes.h:121
#define REFIID
Definition: PDCwtypes.h:321
tagCLSCTX
Definition: Msi_ole2.h:44
tagCOINIT
Definition: Msi_ole2.h:57