FS2_Open
Open source remastering of the Freespace 2 engine
vasync.h
Go to the documentation of this file.
1 /*==========================================================================;
2  *
3  * Copyright (C) 1996-1997 Microsoft Corporation. All Rights Reserved.
4  *
5  * File: async.h
6  * Content: AsyncData object include file
7  ***************************************************************************/
8 
9 #ifndef __ASYNC_INCLUDED__
10 #define __ASYNC_INCLUDED__
11 
12 
13 #include <ole2.h> // for DECLARE_INTERFACE and HRESULT
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif /* __cplusplus */
18 
19 /*
20  * GUIDS used by DPAsyncData objects
21  */
22 
23 // {47BCD7E0-2E89-11d0-A889-00A0C905433C}
24 DEFINE_GUID(IID_IDPAsyncData, 0x47bcd7e0, 0x2e89, 0x11d0, 0xa8, 0x89, 0x0, 0xa0, 0xc9, 0x5, 0x43, 0x3c);
25 
26 
27 /****************************************************************************
28  *
29  * IDPAsyncData Structures
30  *
31  * Various structures used to invoke DPAsyncData.
32  *
33  ****************************************************************************/
34 
35 typedef struct IDPAsyncData FAR *LPDPASYNCDATA;
36 
37 
38 /****************************************************************************
39  *
40  * IDPAsyncData Interface
41  *
42  ****************************************************************************/
43 
44 #undef INTERFACE
45 #define INTERFACE IDPAsyncData
46 DECLARE_INTERFACE_( IDPAsyncData, IUnknown )
47 {
48  /* IUnknown Methods */
49  STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
50  STDMETHOD_(ULONG,AddRef) (THIS) PURE;
51  STDMETHOD_(ULONG,Release) (THIS) PURE;
52 
53  /* IDPAsyncData Methods */
54  STDMETHOD(AddItem) (THIS_ LPDWORD, LPVOID, DWORD) PURE;
55  STDMETHOD(Cancel) (THIS) PURE;
56  STDMETHOD(GetFlags) (THIS_ LPDWORD) PURE;
57  STDMETHOD(GetItem) (THIS_ DWORD, LPVOID *) PURE;
58  STDMETHOD(GetItemCount) (THIS_ LPDWORD) PURE;
59  STDMETHOD(GetStatus) (THIS_ LPDWORD, LPDWORD, HRESULT *) PURE;
60  STDMETHOD(IsSnapshotCurrent) (THIS) PURE;
61  STDMETHOD(RefreshSnapshot) (THIS) PURE;
62  STDMETHOD(RemoveItem) (THIS_ DWORD) PURE;
63  STDMETHOD(SetFlags) (THIS_ DWORD) PURE;
64  STDMETHOD(SetItem) (THIS_ DWORD, LPVOID, DWORD) PURE;
65  STDMETHOD(SetStatus) (THIS_ DWORD) PURE;
66  STDMETHOD(SetStatusEvent) (THIS_ DWORD, HANDLE) PURE;
67 };
68 
69 
70 /****************************************************************************
71  *
72  * IDPAsyncData interface macros
73  *
74  ****************************************************************************/
75 
76 #if !defined(__cplusplus) || defined(CINTERFACE)
77 
78 #define IDPAsyncData_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
79 #define IDPAsyncData_AddRef(p) (p)->lpVtbl->AddRef(p)
80 #define IDPAsyncData_Release(p) (p)->lpVtbl->Release(p)
81 #define IDPAsyncData_AddItem(p) (p)->lpVtbl->AddItem(p)
82 #define IDPAsyncData_Cancel(p) (p)->lpVtbl->Cancel(p)
83 #define IDPAsyncData_GetItem(p,a,b) (p)->lpVtbl->GetItem(p,a,b)
84 #define IDPAsyncData_GetItemCount(p,a) (p)->lpVtbl->GetItemCount(p,a)
85 #define IDPAsyncData_GetStatus(p,a,b,c) (p)->lpVtbl->GetStatus(p,a,b,c)
86 #define IDPAsyncData_IsSnapshotCurrent(p) (p)->lpVtbl->IsSnapshotCurrent(p)
87 #define IDPAsyncData_RefreshSnapshot(p) (p)->lpVtbl->RefreshSnapshot(p)
88 #define IDPAsyncData_RemoveItem(p) (p)->lpVtbl->RemoveItem(p)
89 #define IDPAsyncData_SetFlags(p) (p)->lpVtbl->SetFlags(p)
90 #define IDPAsyncData_SetItem(p) (p)->lpVtbl->SetItem(p)
91 #define IDPAsyncData_SetStatus(p) (p)->lpVtbl->SetStatus(p)
92 #define IDPAsyncData_SetStatusEvent(p,a,b) (p)->lpVtbl->SetStatusEvent(p,a,b)
93 
94 #else /* C++ */
95 
96 #define IDPAsyncData_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
97 #define IDPAsyncData_AddRef(p) (p)->AddRef()
98 #define IDPAsyncData_Release(p) (p)->Release()
99 #define IDPAsyncData_AddItem(p) (p)->AddItem()
100 #define IDPAsyncData_Cancel(p) (p)->Cancel()
101 #define IDPAsyncData_GetItem(p,a,b) (p)->GetItem(a,b)
102 #define IDPAsyncData_GetItemCount(p,a) (p)->GetItemCount(a)
103 #define IDPAsyncData_GetStatus(p,a,b,c) (p)->GetStatus(a,b,c)
104 #define IDPAsyncData_IsSnapshotCurrent(p) (p)->IsSnapshotCurrent()
105 #define IDPAsyncData_RefreshSnapshot(p) (p)->RefreshSnapshot()
106 #define IDPAsyncData_RemoveItem(p) (p)->RemoveItem()
107 #define IDPAsyncData_SetFlags(p) (p)->SetFlags()
108 #define IDPAsyncData_SetItem(p) (p)->SetItem()
109 #define IDPAsyncData_SetStatus(p) (p)->SetStatus()
110 #define IDPAsyncData_SetStatusEvent(p,a,b) (p)->SetStatusEvent(a,b)
111 
112 #endif
113 
114 
115 /****************************************************************************
116  *
117  * AsyncData Flags
118  *
119  ****************************************************************************/
120 
121 /*
122  * This flag is set if the ItemData is ANSI. If it is not set, the ItemData
123  * is either Unicode or doesn't contain any string information.
124  */
125 #define DPASYNCDATA_ANSI (0x00000001)
126 
127 
128 #ifdef __cplusplus
129 };
130 #endif /* __cplusplus */
131 
132 #endif /* __ASYNC_INCLUDED__ */
unsigned long * LPDWORD
Definition: config.h:90
DECLARE_INTERFACE_(IDPAsyncData, IUnknown)
Definition: vasync.h:46
unsigned long DWORD
Definition: config.h:90
struct IDPAsyncData FAR * LPDPASYNCDATA
Definition: vasync.h:35
long HRESULT
Definition: vddraw.h:115
#define FAR
Definition: config.h:77
#define IUnknown
Definition: vddraw.h:28
typedef LPVOID
Definition: vddraw.h:119
DEFINE_GUID(IID_IDPAsyncData, 0x47bcd7e0, 0x2e89, 0x11d0, 0xa8, 0x89, 0x0, 0xa0, 0xc9, 0x5, 0x43, 0x3c)
void * HANDLE
Definition: config.h:106