-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtypes.go
58 lines (52 loc) · 1.7 KB
/
types.go
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
package comutil
import "github.com/go-ole/go-ole"
// CLSCTX MSDN: https://msdn.microsoft.com/en-us/library/ms693716
// CoAuthInfo represents the COAUTHINFO structure expected by the Windows COM
// api. It is a low-level structure that is used behind the scenes by the
// object creation functions.
//
// MSDN: https://msdn.microsoft.com/library/ms688552
type CoAuthInfo struct {
AuthenticationService uint32
AuthorizationService uint32
ServerPrincipalName *int16
AuthenticationLevel uint32
ImpersonationLevel uint32
AuthIdentityData *CoAuthIdentity
Capabilities uint32
}
// CoAuthIdentity represents the COAUTHITDENTIY structure expected by the Windows
// COM api. It is a low-level structure that is used behind the scenes by the
// object creation functions.
//
// MSDN: https://msdn.microsoft.com/library/ms693358
type CoAuthIdentity struct {
User *uint16
UserLength uint32
Domain *uint16
DomainLength uint32
Password *uint16
PasswordLength uint32
Flags uint32
}
// CoServerInfo represents the COSERVERINFO structure expected by the Windows
// COM api. It is a low-level structure that is used behind the scenes by the
// object creation functions.
//
// MSDN: https://msdn.microsoft.com/library/ms687322
type CoServerInfo struct {
_ uint32 // reserved
Name *int16
AuthInfo *CoAuthInfo
_ uint32 // reserved
}
// MultiQI represents the MULTI_QI structure expected by the Windows COM api.
// It is a low-level structure that is used behind the scenes by the
// object creation functions.
//
// MSDN: https://msdn.microsoft.com/library/ms687289
type MultiQI struct {
IID *ole.GUID
Interface *ole.IUnknown
HR uintptr
}