Définitions IDL de jonction de domaine hors connexion
Description
Les structures de données ODJ (Jointure de domaine hors connexion) ne sont pas définies dans un fichier d’en-tête C\C++. Au lieu de cela, les structures sont définies au format IDL (Interface Definition Language) qui, après la compilation, sont utilisées pour la sérialisation et la désérialisation. Sur la plateforme Windows, la sérialisation et la désérialisation de ces structures sont gérées automatiquement par les API Win32 suivantes :
NetRequestProvisioningPackageInstall
Dans certaines situations, par exemple l’interopérabilité avec des plateformes non Windows, il peut être nécessaire d’effectuer une sérialisation et une désérialisation manuelles. Cette rubrique contient des définitions pour toutes les structures de données ODJ dans une unité de compilation IDL unique et est incluse pour la configuration. Une définition de fichier de configuration d’application (ACF) correspondante est également définie. Ce contenu n’est fourni dans aucun sdk. Par conséquent, le contenu ci-dessous doit être copié dans votre code et compilé avec un compilateur IDL. Le compilateur IDL génère les fonctions stub de sérialisation\désérialisation nécessaires, qui sont ensuite liées à votre application. Pour plus d’informations sur le fonctionnement de la sérialisation et de la désérialisation des types, consultez Sérialisation de type.
Reportez-vous aux sections de structure individuelles pour obtenir une documentation détaillée sur les membres.
Si vous utilisez le compilateur Microsoft MIDL, vous devez spécifier les indicateurs suivants pour optimiser la compatibilité :
/char unsigned
/ms_ext
/c_ext
Fichier IDL ODJ
include "dsgetdc.h";
interface ODJ
{
typedef struct _ODJ_BLOB
{
ULONG ulODJFormat;
ULONG cbBlob;
[size_is(cbBlob)] PBYTE pBlob;
} ODJ_BLOB, *PODJ_BLOB;
typedef struct _ODJ_PROVISION_DATA
{
ULONG ulVersion;
ULONG ulcBlobs;
[size_is(ulcBlobs)] PODJ_BLOB pBlobs;
} ODJ_PROVISION_DATA;
typedef ODJ_PROVISION_DATA *PODJ_PROVISION_DATA;
typedef struct _OP_BLOB
{
ULONG cbBlob;
[size_is(cbBlob)] PBYTE pBlob;
} OP_BLOB, *POP_BLOB;
typedef struct _OP_PACKAGE_PART
{
GUID PartType;
ULONG ulFlags;
OP_BLOB Part;
OP_BLOB Extension;
} OP_PACKAGE_PART, *POP_PACKAGE_PART;
typedef struct _OP_PACKAGE_PART_COLLECTION
{
ULONG cParts;
[size_is(cParts)] POP_PACKAGE_PART pParts;
OP_BLOB Extension;
} OP_PACKAGE_PART_COLLECTION, *POP_PACKAGE_PART_COLLECTION;
typedef struct _OP_PACKAGE
{
GUID EncryptionType;
OP_BLOB EncryptionContext;
OP_BLOB WrappedPartCollection;
ULONG cbDecryptedPartCollection;
OP_BLOB Extension;
} OP_PACKAGE, *POP_PACKAGE;
typedef struct _SID_IDENTIFIER_AUTHORITY
{
UCHAR Value[6];
} SID_IDENTIFIER_AUTHORITY, *PSID_IDENTIFIER_AUTHORITY;
typedef struct _ODJ_SID
{
UCHAR Revision;
UCHAR SubAuthorityCount;
SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
[size_is(SubAuthorityCount)] ULONG SubAuthority[*];
} ODJ_SID, *PODJ_SID;
typedef struct _ODJ_UNICODE_STRING
{
USHORT Length;
USHORT MaximumLength;
[size_is(MaximumLength/2), length_is(Length/2)] PWSTR Buffer;
} ODJ_UNICODE_STRING, *PODJ_UNICODE_STRING;
typedef struct _ODJ_POLICY_DNS_DOMAIN_INFO
{
ODJ_UNICODE_STRING Name;
ODJ_UNICODE_STRING DnsDomainName;
ODJ_UNICODE_STRING DnsForestName;
GUID DomainGuid;
PODJ_SID Sid;
} ODJ_POLICY_DNS_DOMAIN_INFO;
typedef struct _ODJ_WIN7BLOB
{
[string] wchar_t *lpDomain;
[string] wchar_t *lpMachineName;
[string] wchar_t *lpMachinePassword;
ODJ_POLICY_DNS_DOMAIN_INFO DnsDomainInfo;
DOMAIN_CONTROLLER_INFOW DcInfo;
DWORD Options;
} ODJ_WIN7BLOB;
typedef ODJ_WIN7BLOB *PODJ_WIN7BLOB;
cpp_quote("#define OP_JP2_FLAG_PERSISTENTSITE 0x00000001")
typedef struct _OP_JOINPROV2_PART
{
DWORD dwFlags;
[string] wchar_t *lpNetbiosName;
[string] wchar_t *lpSiteName;
[string] wchar_t *lpPrimaryDNSDomain;
DWORD dwReserved;
[string] wchar_t *lpReserved;
} OP_JOINPROV2_PART, *POP_JOINPROV2_PART;
typedef struct _OP_JOINPROV3_PART
{
DWORD Rid;
[string] wchar_t *lpSid;
} OP_JOINPROV3_PART, *POP_JOINPROV3_PART;
typedef struct _OP_JOINPROV4_PART
{
DWORD Rid;
[string] wchar_t *lpSid;
GUID ObjectGuid;
} OP_JOINPROV4_PART, *POP_JOINPROV4_PART;
typedef struct _OP_POLICY_ELEMENT
{
[string] wchar_t *pKeyPath;
[string] wchar_t *pValueName;
ULONG ulValueType;
ULONG cbValueData;
[size_is(cbValueData)] PBYTE pValueData;
} OP_POLICY_ELEMENT, *POP_POLICY_ELEMENT;
typedef struct _OP_POLICY_ELEMENT_LIST
{
[string] wchar_t *pSource;
ULONG ulRootKeyId;
ULONG cElements;
[size_is(cElements)] POP_POLICY_ELEMENT pElements;
} OP_POLICY_ELEMENT_LIST, *POP_POLICY_ELEMENT_LIST;
typedef struct _OP_POLICY_PART
{
ULONG cElementLists;
[size_is(cElementLists)] POP_POLICY_ELEMENT_LIST pElementLists;
OP_BLOB Extension;
} OP_POLICY_PART, *POP_POLICY_PART;
typedef struct _OP_CERT_PFX_STORE
{
[string] wchar_t *pTemplateName;
ULONG ulPrivateKeyExportPolicy;
[string] wchar_t *pPolicyServerUrl;
ULONG ulPolicyServerUrlFlags;
[string] wchar_t *pPolicyServerId;
ULONG cbPfx;
[size_is(cbPfx)] PBYTE pPfx;
} OP_CERT_PFX_STORE, *POP_CERT_PFX_STORE;
typedef struct _OP_CERT_SST_STORE
{
ULONG StoreLocation;
[string] wchar_t *pStoreName;
ULONG cbSst;
[size_is(cbSst)] PBYTE pSst;
} OP_CERT_SST_STORE, *POP_CERT_SST_STORE;
typedef struct _OP_CERT_PART
{
ULONG cPfxStores;
[size_is(cPfxStores)] POP_CERT_PFX_STORE pPfxStores;
ULONG cSstStores;
[size_is(cSstStores)] POP_CERT_SST_STORE pSstStores;
OP_BLOB Extension;
} OP_CERT_PART, *POP_CERT_PART;
}
Fichier ODJ ACF
[
// If necessary for your application, see MIDL documentation for alternatives to explicit_handle
explicit_handle
]
interface ODJ
{
typedef [encode, decode] PODJ_WIN7BLOB;
typedef [encode, decode] POP_JOINPROV2_PART;
typedef [encode, decode] POP_JOINPROV3_PART;
typedef [encode, decode] POP_JOINPROV4_PART;
typedef [encode, decode] PODJ_PROVISION_DATA;
typedef [encode, decode] POP_PACKAGE_PART;
typedef [encode, decode] POP_PACKAGE_PART_COLLECTION;
typedef [encode, decode] POP_PACKAGE;
typedef [encode, decode] POP_POLICY_PART;
typedef [encode, decode] POP_CERT_PART;
}
Voir aussi
Microsoft Interface Definition Language
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour