Bonjour Paul
fiads est une interface IADS que l'on trouve dans ActiveDs_TLB (une bibliothèque de type importé depuis c:\Windows\System32\activeds.tlb)
elle permet de manipuler les objets active directory
la fonction Get permet de retourner un attribut de l'objet active directory
donc çà retourne différent type de données ( texte, numérique, date, ...)
voici le détail de l'interface
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
|
// *********************************************************************//
// Interface : IADs
// Indicateurs : (4416) Dual OleAutomation Dispatchable
// GUID : {FD8256D0-FD15-11CE-ABC4-02608C9E7553}
// *********************************************************************//
IADs = interface(IDispatch)
['{FD8256D0-FD15-11CE-ABC4-02608C9E7553}']
function Get_Name: WideString; safecall;
function Get_Class_: WideString; safecall;
function Get_GUID: WideString; safecall;
function Get_ADsPath: WideString; safecall;
function Get_Parent: WideString; safecall;
function Get_Schema: WideString; safecall;
procedure GetInfo; safecall;
procedure SetInfo; safecall;
function Get(const bstrName: WideString): OleVariant; safecall;
procedure Put(const bstrName: WideString; vProp: OleVariant); safecall;
function GetEx(const bstrName: WideString): OleVariant; safecall;
procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); safecall;
procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); safecall;
property Name: WideString read Get_Name;
property Class_: WideString read Get_Class_;
property GUID: WideString read Get_GUID;
property ADsPath: WideString read Get_ADsPath;
property Parent: WideString read Get_Parent;
property Schema: WideString read Get_Schema;
end; |
Cela fonctionne correctement en 32/64bits pour une bonne partie des types de données
sauf quand c'est un GUID j'avais trouvé le code pour convertir le GUID en String
mais le compilateur 64 ne semble pas l’apprécier
GUIDToString ( tguid ( vresultat ) )
petit détail du type TGUID de l'unité system
1 2 3 4 5 6 7 8 9 10 11 12 13
|
PGUID = ^TGUID;
TGUID = record
D1: Cardinal;
D2: Word;
D3: Word;
D4: array[0..7] of Byte;
class operator Equal(const Left, Right: TGUID): Boolean;
class operator NotEqual(const Left, Right: TGUID): Boolean;
class function Empty: TGUID; static;
class function Create(const Data; BigEndian: Boolean = False): TGUID; overload; static;
class function Create(const Data: array of Byte; AStartIndex: Cardinal; BigEndian: Boolean = False): TGUID; overload; static;
end; |
Partager