1 | // Licensed to the .NET Foundation under one or more agreements. |
2 | // The .NET Foundation licenses this file to you under the MIT license. |
3 | // See the LICENSE file in the project root for more information. |
4 | // |
5 | |
6 | // |
7 | // =========================================================================== |
8 | // File: unknwn.h |
9 | // |
10 | // =========================================================================== |
11 | // simplified unknwn.h for PAL |
12 | |
13 | #include "rpc.h" |
14 | #include "rpcndr.h" |
15 | |
16 | #ifndef __IUnknown_INTERFACE_DEFINED__ |
17 | #define __IUnknown_INTERFACE_DEFINED__ |
18 | |
19 | typedef interface IUnknown IUnknown; |
20 | |
21 | typedef /* [unique] */ IUnknown *LPUNKNOWN; |
22 | |
23 | // 00000000-0000-0000-C000-000000000046 |
24 | EXTERN_C const IID IID_IUnknown; |
25 | |
26 | MIDL_INTERFACE("00000000-0000-0000-C000-000000000046" ) |
27 | IUnknown |
28 | { |
29 | virtual HRESULT STDMETHODCALLTYPE QueryInterface( |
30 | REFIID riid, |
31 | void **ppvObject) = 0; |
32 | |
33 | virtual ULONG STDMETHODCALLTYPE AddRef( void) = 0; |
34 | |
35 | virtual ULONG STDMETHODCALLTYPE Release( void) = 0; |
36 | |
37 | template<class Q> |
38 | HRESULT |
39 | STDMETHODCALLTYPE |
40 | QueryInterface(Q** pp) |
41 | { |
42 | return QueryInterface(__uuidof(Q), (void **)pp); |
43 | } |
44 | }; |
45 | |
46 | #endif // __IUnknown_INTERFACE_DEFINED__ |
47 | |
48 | #ifndef __IClassFactory_INTERFACE_DEFINED__ |
49 | #define __IClassFactory_INTERFACE_DEFINED__ |
50 | |
51 | // 00000001-0000-0000-C000-000000000046 |
52 | EXTERN_C const IID IID_IClassFactory; |
53 | |
54 | MIDL_INTERFACE("00000001-0000-0000-C000-000000000046" ) |
55 | IClassFactory : public IUnknown |
56 | { |
57 | virtual HRESULT STDMETHODCALLTYPE CreateInstance( |
58 | IUnknown *pUnkOuter, |
59 | REFIID riid, |
60 | void **ppvObject) = 0; |
61 | |
62 | virtual HRESULT STDMETHODCALLTYPE LockServer( |
63 | BOOL fLock) = 0; |
64 | }; |
65 | |
66 | #endif // __IClassFactory_INTERFACE_DEFINED__ |
67 | |