3 Copyright (c) Microsoft Corporation
5 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
6 associated documentation files (the "Software"), to deal in the Software without restriction,
7 including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
9 subject to the following conditions:
11 The above copyright notice and this permission notice shall be included in all copies or substantial
12 portions of the Software.
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
15 NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
16 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
17 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
18 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 The Offline Domain Join IDL has been derived from :
22 https://github.com/MicrosoftDocs/win32/blob/docs/desktop-src/NetMgmt/odj-idl.md
25 import
"misc.idl", "lsa.idl", "netlogon.idl", "security.idl";
27 #include
"idl_types.h"
29 cpp_quote
("#define OP_JP2_FLAG_PERSISTENTSITE 0x00000001")
32 uuid("11111111-3333-5555-7777-99999999"),
34 pointer_default(unique),
35 helpstring("Offline Domain Join IDL"),
36 helper
("../librpc/ndr/ndr_ODJ.h")
42 [size_is(cbBlob
),flag
(LIBNDR_PRINT_ARRAY_HEX
)] uint8
*pBlob
;
45 /* Contains a serialized ODJ_WIN7_BLOB structure. */
46 const string ODJ_GUID_JOIN_PROVIDER
= "{631c7621-5289-4321-bc9e-80f843f868c3}";
48 /* Contains a serialized OP_JOIN_PROV2_PART structure. */
49 const string ODJ_GUID_JOIN_PROVIDER2
= "{57BFC56B-52F9-480C-ADCB-91B3F8A82317}";
51 /* Contains a serialized OP_JOIN_PROV3_PART structure. */
52 const string ODJ_GUID_JOIN_PROVIDER3
= "{FC0CCF25-7FFA-474A-8611-69FFE269645F}";
54 /* Contains a serialized OP_CERT_PART structure. */
55 const string ODJ_GUID_CERT_PROVIDER
= "{9c0971e9-832f-4873-8e87-ef1419d4781e}";
57 /* Contains a serialized OP_POLICY_PART structure. */
58 const string ODJ_GUID_POLICY_PROVIDER
= "{68fb602a-0c09-48ce-b75f-07b7bd58f7ec}";
63 } SID_IDENTIFIER_AUTHORITY
;
67 char SubAuthorityCount
;
68 SID_IDENTIFIER_AUTHORITY IdentifierAuthority
;
69 [size_is(SubAuthorityCount
)] uint32 SubAuthority
[*];
75 [size_is(MaximumLength
/2), length_is(Length
/2)] PWSTR Buffer
;
78 #define ODJ_SID dom_sid2
79 #define ODJ_UNICODE_STRING lsa_StringLarge
81 #define ODJ_DECLARE_SERIALIZED_PTR
(el_name
) \
82 typedef [public] struct { \
86 typedef [public,gensize
] struct { \
87 [subcontext
(0xFFFFFC01)] el_name ## _ctr s
; \
88 } el_name ## _serialized_ptr
;
91 ODJ_UNICODE_STRING Name
;
92 ODJ_UNICODE_STRING DnsDomainName
;
93 ODJ_UNICODE_STRING DnsForestName
;
96 } ODJ_POLICY_DNS_DOMAIN_INFO
;
99 [string,charset
(UTF16
)] uint16
*lpDomain
;
100 [string,charset
(UTF16
)] uint16
*lpMachineName
;
101 [string,charset
(UTF16
)] [flag
(NDR_SECRET
)] uint16
*lpMachinePassword
;
103 * Not sure whether the following 4 bytes are padding or a
104 * pointer, at least it's value may not be 0 for Windows to accept our
105 * generated win7blobs - gd
108 [flag
(NDR_ALIGN8
)] DATA_BLOB _pad
;
110 [value
(0xffffffff)] uint32 _pad
;
112 ODJ_POLICY_DNS_DOMAIN_INFO DnsDomainInfo
;
113 netr_DsRGetDCNameInfo DcInfo
;
117 typedef ODJ_WIN7BLOB
*PODJ_WIN7BLOB
;
121 [string,charset
(UTF16
)] uint16
*lpNetbiosName
;
122 [string,charset
(UTF16
)] uint16
*lpSiteName
;
123 [string,charset
(UTF16
)] uint16
*lpPrimaryDNSDomain
;
125 [string,charset
(UTF16
)] uint16
*lpReserved
;
130 [string,charset
(UTF16
)] uint16
*lpSid
;
134 [string,charset
(UTF16
)] uint16
*pKeyPath
;
135 [string,charset
(UTF16
)] uint16
*pValueName
;
136 winreg_Type ulValueType
;
138 [size_is(cbValueData
),flag
(LIBNDR_PRINT_ARRAY_HEX
)] uint8
*pValueData
;
142 [string,charset
(UTF16
)] uint16
*pSource
;
145 [size_is(cElements
)] OP_POLICY_ELEMENT
*pElements
;
146 } OP_POLICY_ELEMENT_LIST
;
149 uint32 cElementLists
;
150 [size_is(cElementLists
)]
151 OP_POLICY_ELEMENT_LIST
*pElementLists
;
156 [string,charset
(UTF16
)] uint16
*pTemplateName
;
157 uint32 ulPrivateKeyExportPolicy
;
158 [string,charset
(UTF16
)] uint16
*pPolicyServerUrl
;
159 uint32 ulPolicyServerUrlFlags
;
160 [string,charset
(UTF16
)] uint16
*pPolicyServerId
;
162 [size_is(cbPfx
)] uint8
*pPfx
;
166 uint32 StoreLocation
;
167 [string,charset
(UTF16
)] uint16
*pStoreName
;
169 [size_is(cbSst
)] uint8
*pSst
;
174 [size_is(cPfxStores
)] OP_CERT_PFX_STORE
*pPfxStores
;
176 [size_is(cSstStores
)] OP_CERT_SST_STORE
*pSstStores
;
180 ODJ_DECLARE_SERIALIZED_PTR
(ODJ_WIN7BLOB
)
181 ODJ_DECLARE_SERIALIZED_PTR
(OP_JOINPROV2_PART
)
182 ODJ_DECLARE_SERIALIZED_PTR
(OP_JOINPROV3_PART
)
183 ODJ_DECLARE_SERIALIZED_PTR
(OP_POLICY_PART
)
184 ODJ_DECLARE_SERIALIZED_PTR
(OP_CERT_PART
)
186 typedef [public,nodiscriminant
,gensize
] union {
187 [case(1)] [subcontext
(0xFFFFFC01)] ODJ_WIN7BLOB win7blob
;
188 [case(2)] [subcontext
(0xFFFFFC01)] OP_JOINPROV2_PART_ctr join_prov2
;
189 [case(3)] [subcontext
(0xFFFFFC01)] OP_JOINPROV3_PART_ctr join_prov3
;
190 [case(4)] [subcontext
(0xFFFFFC01)] OP_CERT_PART_ctr cert_part
;
191 [case(5)] [subcontext
(0xFFFFFC01)] OP_POLICY_PART_ctr policy_part
;
195 typedef [public,bitmap32bit
] bitmap
{
196 OPSPI_PACKAGE_PART_ESSENTIAL
= 0x00000001
203 [value
(ndr_size_OP_PACKAGE_PART_u
(Part
, odj_switch_level_from_guid
(&PartType
), 0))] uint32 part_len
;
204 [subcontext
(4),subcontext_size
(part_len
),switch_is(odj_switch_level_from_guid
(&PartType
))] OP_PACKAGE_PART_u
*Part
;
211 ODJ_DECLARE_SERIALIZED_PTR
(OP_PACKAGE_PART
)
215 [size_is(cParts
)] OP_PACKAGE_PART
*pParts
;
217 } OP_PACKAGE_PART_COLLECTION
;
219 ODJ_DECLARE_SERIALIZED_PTR
(OP_PACKAGE_PART_COLLECTION
)
222 [value
(ndr_size_OP_PACKAGE_PART_COLLECTION_serialized_ptr
(w
, 0))] uint32 cbBlob
;
223 [subcontext
(4), subcontext_size
(cbBlob
)] OP_PACKAGE_PART_COLLECTION_serialized_ptr
*w
;
224 } OP_PACKAGE_PART_COLLECTION_blob
;
228 OP_BLOB EncryptionContext
;
230 OP_PACKAGE_PART_COLLECTION_blob WrappedPartCollection
;
232 OP_BLOB WrappedPartCollection
;
234 uint32 cbDecryptedPartCollection
;
238 ODJ_DECLARE_SERIALIZED_PTR
(OP_PACKAGE
)
240 typedef [v1_enum,public] enum {
241 ODJ_WIN7_FORMAT
= 0x00000001, /* blob is ODJ_WIN7BLOB */
242 ODJ_WIN8_FORMAT
= 0x00000002 /* blob is OP_PACKAGE */
245 typedef [public,nodiscriminant
,gensize
] union {
246 [case(ODJ_WIN7_FORMAT
)] [subcontext
(0xFFFFFC01)] ODJ_WIN7BLOB odj_win7blob
;
247 [case(ODJ_WIN8_FORMAT
)] [subcontext
(0xFFFFFC01)] OP_PACKAGE_ctr op_package
;
248 [default] [subcontext
(0xFFFFFC01)] [flag
(LIBNDR_FLAG_REMAINING
)] DATA_BLOB blob
;
252 ODJFormat ulODJFormat
;
253 [value
(ndr_size_ODJ_BLOB_u
(pBlob
, ulODJFormat
, 0))] uint32 cbBlob
;
255 [switch_is(ulODJFormat
), subcontext
(4), subcontext_size
(cbBlob
)] ODJ_BLOB_u
*pBlob
;
257 [size_is(cbBlob
),flag
(LIBNDR_PRINT_ARRAY_HEX
)] uint8
*pBlob
;
261 typedef [public] struct {
262 [value
(1)] uint32 ulVersion
;
264 [size_is(ulcBlobs
)] ODJ_BLOB
*pBlobs
;
265 } ODJ_PROVISION_DATA
;
267 ODJ_DECLARE_SERIALIZED_PTR
(ODJ_PROVISION_DATA
)