1use ctypes::{c_long, c_void};
7use shared::guiddef::REFIID;
8use shared::minwindef::{BYTE, DWORD};
9use shared::winerror::HRESULT;
10use shared::wtypes::BSTR;
11use um::unknwnbase::{IUnknown, IUnknownVtbl};
12use um::wbemcli::{IWbemCallResult, IWbemContext, IWbemObjectSink, IWbemServices};
13use um::winnt::{LPCWSTR, LPWSTR};
14ENUM!{enum WBEM_LOGIN_TYPE {
17 WBEM_FLAG_INPROC_LOGIN = 0,
18 WBEM_FLAG_LOCAL_LOGIN = 1,
19 WBEM_FLAG_REMOTE_LOGIN = 2,
20 WBEM_AUTHENTICATION_METHOD_MASK = 0xf,
21 WBEM_FLAG_USE_MULTIPLE_CHALLENGES = 0x10,
22}}
23pub type WBEM_128BITS = *mut BYTE;
24DEFINE_GUID!{IID_IWbemTransport,
27 0x553fe584, 0x2156, 0x11d0, 0xb6, 0xae, 0x00, 0xaa, 0x00, 0x32, 0x40, 0xc7}
28RIDL!{#[uuid(0x553fe584, 0x2156, 0x11d0, 0xb6, 0xae, 0x00, 0xaa, 0x00, 0x32, 0x40, 0xc7)]
29interface IWbemTransport(IWbemTransportVtbl): IUnknown(IUnknownVtbl) {
30 fn Initialize() -> HRESULT,
31}}
32DEFINE_GUID!{IID_IWbemLevel1Login,
34 0xf309ad18, 0xd86a, 0x11d0, 0xa0, 0x75, 0x00, 0xc0, 0x4f, 0xb6, 0x88, 0x20}
35RIDL!{#[uuid(0xf309ad18, 0xd86a, 0x11d0, 0xa0, 0x75, 0x00, 0xc0, 0x4f, 0xb6, 0x88, 0x20)]
36interface IWbemLevel1Login(IWbemLevel1LoginVtbl): IUnknown(IUnknownVtbl) {
37 fn EstablishPosition(
38 wszLocaleList: LPWSTR,
39 dwNumLocales: DWORD,
40 reserved: *mut DWORD,
41 ) -> HRESULT,
42 fn RequestChallenge(
43 wszNetworkResource: LPWSTR,
44 wszUser: LPWSTR,
45 Nonce: WBEM_128BITS,
46 ) -> HRESULT,
47 fn WBEMLogin(
48 wszPreferredLocale: LPWSTR,
49 AccessToken: WBEM_128BITS,
50 lFlags: c_long,
51 pCtx: *mut IWbemContext,
52 ppNamespace: *mut *mut IWbemServices,
53 ) -> HRESULT,
54 fn NTLMLogin(
55 wszNetworkResource: LPWSTR,
56 wszPreferredLocale: LPWSTR,
57 lFlags: c_long,
58 pCtx: *mut IWbemContext,
59 ppNamespace: *mut *mut IWbemServices,
60 ) -> HRESULT,
61}}
62DEFINE_GUID!{IID_IWbemConnectorLogin,
64 0xd8ec9cb1, 0xb135, 0x4f10, 0x8b, 0x1b, 0xc7, 0x18, 0x8b, 0xb0, 0xd1, 0x86}
65RIDL!{#[uuid(0xd8ec9cb1, 0xb135, 0x4f10, 0x8b, 0x1b, 0xc7, 0x18, 0x8b, 0xb0, 0xd1, 0x86)]
66interface IWbemConnectorLogin(IWbemConnectorLoginVtbl): IUnknown(IUnknownVtbl) {
67 fn ConnectorLogin(
68 wszNetworkResource: LPWSTR,
69 wszPreferredLocale: LPWSTR,
70 lFlags: c_long,
71 pCtx: *mut IWbemContext,
72 riid: REFIID,
73 pInterface: *mut *mut c_void,
74 ) -> HRESULT,
75}}
76DEFINE_GUID!{IID_IWbemAddressResolution,
78 0xf7ce2e12, 0x8c90, 0x11d1, 0x9e, 0x7b, 0x00, 0xc0, 0x4f, 0xc3, 0x24, 0xa8}
79RIDL!{#[uuid(0xf7ce2e12, 0x8c90, 0x11d1, 0x9e, 0x7b, 0x00, 0xc0, 0x4f, 0xc3, 0x24, 0xa8)]
80interface IWbemAddressResolution(IWbemAddressResolutionVtbl): IUnknown(IUnknownVtbl) {
81 fn Resolve(
82 wszNamespacePath: LPWSTR,
83 wszAddressType: LPWSTR,
84 pdwAddressLength: *mut DWORD,
85 pabBinaryAddress: *mut *mut BYTE,
86 ) -> HRESULT,
87}}
88DEFINE_GUID!{CLSID_WbemLevel1Login,
89 0x8BC3F05E, 0xD86B, 0x11d0, 0xA0, 0x75, 0x00, 0xC0, 0x4F, 0xB6, 0x88, 0x20}
90DEFINE_GUID!{CLSID_WbemLocalAddrRes,
93 0xA1044801, 0x8F7E, 0x11d1, 0x9E, 0x7C, 0x00, 0xC0, 0x4F, 0xC3, 0x24, 0xA8}
94DEFINE_GUID!{CLSID_WbemUninitializedClassObject,
97 0x7a0227f6, 0x7108, 0x11d1, 0xad, 0x90, 0x00, 0xc0, 0x4f, 0xd8, 0xfd, 0xff}
98DEFINE_GUID!{IID_IWbemClientTransport,
102 0xf7ce2e11, 0x8c90, 0x11d1, 0x9e, 0x7b, 0x00, 0xc0, 0x4f, 0xc3, 0x24, 0xa8}
103RIDL!{#[uuid(0xf7ce2e11, 0x8c90, 0x11d1, 0x9e, 0x7b, 0x00, 0xc0, 0x4f, 0xc3, 0x24, 0xa8)]
104interface IWbemClientTransport(IWbemClientTransportVtbl): IUnknown(IUnknownVtbl) {
105 fn ConnectServer(
106 strAddressType: BSTR,
107 dwBinaryAddressLength: DWORD,
108 abBinaryAddress: *mut BYTE,
109 strNetworkResource: BSTR,
110 strUser: BSTR,
111 strPassword: BSTR,
112 strLocale: BSTR,
113 lSecurityFlags: c_long,
114 strAuthority: BSTR,
115 pCtx: *mut IWbemContext,
116 ppNamespace: *mut *mut IWbemServices,
117 ) -> HRESULT,
118}}
119DEFINE_GUID!{IID_IWbemClientConnectionTransport,
121 0xa889c72a, 0xfcc1, 0x4a9e, 0xaf, 0x61, 0xed, 0x07, 0x13, 0x33, 0xfb, 0x5b}
122RIDL!{#[uuid(0xa889c72a, 0xfcc1, 0x4a9e, 0xaf, 0x61, 0xed, 0x07, 0x13, 0x33, 0xfb, 0x5b)]
123interface IWbemClientConnectionTransport(IWbemClientConnectionTransportVtbl):
124 IUnknown(IUnknownVtbl) {
125 fn Open(
126 strAddressType: BSTR,
127 dwBinaryAddressLength: DWORD,
128 abBinaryAddress: *mut BYTE,
129 strObject: BSTR,
130 strUser: BSTR,
131 strPassword: BSTR,
132 strLocale: BSTR,
133 lFlags: c_long,
134 pCtx: *mut IWbemContext,
135 riid: REFIID,
136 pInterface: *mut *mut c_void,
137 pCallRes: *mut *mut IWbemCallResult,
138 ) -> HRESULT,
139 fn OpenAsync(
140 strAddressType: BSTR,
141 dwBinaryAddressLength: DWORD,
142 abBinaryAddress: *mut BYTE,
143 strObject: BSTR,
144 strUser: BSTR,
145 strPassword: BSTR,
146 strLocale: BSTR,
147 lFlags: c_long,
148 pCtx: *mut IWbemContext,
149 riid: REFIID,
150 pResponseHandler: *mut IWbemObjectSink,
151 ) -> HRESULT,
152 fn Cancel(
153 lFlags: c_long,
154 pHandler: *mut IWbemObjectSink,
155 ) -> HRESULT,
156}}
157DEFINE_GUID!{CLSID_WbemDCOMTransport,
158 0xF7CE2E13, 0x8C90, 0x11d1, 0x9E, 0x7B, 0x00, 0xC0, 0x4F, 0xC3, 0x24, 0xA8}
159DEFINE_GUID!{IID_IWbemConstructClassObject,
163 0x9ef76194, 0x70d5, 0x11d1, 0xad, 0x90, 0x00, 0xc0, 0x4f, 0xd8, 0xfd, 0xff}
164RIDL!{#[uuid(0x9ef76194, 0x70d5, 0x11d1, 0xad, 0x90, 0x00, 0xc0, 0x4f, 0xd8, 0xfd, 0xff)]
165interface IWbemConstructClassObject(IWbemConstructClassObjectVtbl): IUnknown(IUnknownVtbl) {
166 fn SetInheritanceChain(
167 lNumAntecedents: c_long,
168 awszAntecedents: *mut LPWSTR,
169 ) -> HRESULT,
170 fn SetPropertyOrigin(
171 wszPropertyName: LPCWSTR,
172 lOriginIndex: c_long,
173 ) -> HRESULT,
174 fn SetMethodOrigin(
175 wszMethodName: LPCWSTR,
176 lOriginIndex: c_long,
177 ) -> HRESULT,
178 fn SetServerNamespace(
179 wszServer: LPCWSTR,
180 wszNamespace: LPCWSTR,
181 ) -> HRESULT,
182}}
183