-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwrtbase.idl
More file actions
75 lines (70 loc) · 2.34 KB
/
Copy pathwrtbase.idl
File metadata and controls
75 lines (70 loc) · 2.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// There's an inspectable.idl
// https://github.com/tpn/winsdk-10/blob/master/Include/10.0.16299.0/winrt/inspectable.idl
// but the format is a mixture of C and idl, so define it here in plain idl
enum TrustLevel
{
BaseTrust = 0,
PartialTrust = 1,
FullTrust = 2
};
[
object,
uuid(AF86E2E0-B12D-4c6a-9C5A-D7AA65101E90),
pointer_default(unique)
]
interface IInspectable : IUnknown
{
HRESULT GetIids([out] ULONG *iidCount, [out] IID **iids);
HRESULT GetRuntimeClassName( [out] HSTRING *className);
HRESULT GetTrustLevel([out] TrustLevel *trustLevel);
}
// https://learn.microsoft.com/en-us/windows/win32/api/objidlbase/nn-objidlbase-iagileobject
// This is a marker-only interface, it doesn't have methods
[
object,
uuid(94EA2B94-E9CC-49E0-C0FF-EE64CA8F5B90),
pointer_default(unique)
]
interface IAgileObject : IUnknown
{
}
// https://github.com/tpn/winsdk-10/blob/master/Include/10.0.16299.0/winrt/AsyncInfo.idl
// https://github.com/tpn/winsdk-10/blob/master/Include/10.0.16299.0/winrt/asyncinfo.h
enum AsyncStatus
{
Started = 0,
Completed = 1,
Canceled = 2,
Error = 3
};
[
object,
uuid(00000036-0000-0000-C000-000000000046),
pointer_default(unique)
]
interface IAsyncInfo : IInspectable
{
[propget] HRESULT Id([out, retval] UINT32 *id);
[propget] HRESULT Status([out, retval] AsyncStatus *status);
[propget] HRESULT ErrorCode([out,retval] HRESULT *errorCode);
HRESULT Cancel();
HRESULT Close();
}
// https://learn.microsoft.com/en-us/uwp/api/windows.foundation.iasyncoperation-1?view=winrt-22621
[
object,
uuid(2680336571, 58438, 17634, 170, 97, 156, 171, 143, 99, 106, 242)
pointer_default(unique)
]
interface IAsyncOperation : IAsyncInfo
{
}
// https://learn.microsoft.com/en-us/uwp/api/windows.foundation.typedeventhandler-2?view=winrt-22621
// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.FoundationContract, 65536)]
// [Windows.Foundation.Metadata.Guid(2648818996, 27361, 4576, 132, 225, 24, 169, 5, 188, 197, 63)]
// template <typename TSender, typename TResult> class TypedEventHandler : MulticastDelegate
[uuid(2648818996, 27361, 4576, 132, 225, 24, 169, 5, 188, 197, 63)]
interface ITypedEventHandler : IUnknown
{
HRESULT Invoke([in] IInspectable *sender, [in] IInspectable *args);
}