2 * Copyright 2005 Francois Gouget
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #define threading
(model
)
24 #define vi_progid
(str
)
28 helpstring("Active DS Type Library"),
29 uuid(97d25db0
-0363-11cf
-abc4
-02608c9e7553
),
35 importlib
("stdole2.tlb");
39 ADS_RIGHT_DS_CREATE_CHILD
= 0x00000001,
40 ADS_RIGHT_DS_DELETE_CHILD
= 0x00000002,
41 ADS_RIGHT_ACTRL_DS_LIST
= 0x00000004,
42 ADS_RIGHT_DS_SELF
= 0x00000008,
43 ADS_RIGHT_DS_READ_PROP
= 0x00000010,
44 ADS_RIGHT_DS_WRITE_PROP
= 0x00000020,
45 ADS_RIGHT_DS_DELETE_TREE
= 0x00000040,
46 ADS_RIGHT_DS_LIST_OBJECT
= 0x00000080,
47 ADS_RIGHT_DS_CONTROL_ACCESS
= 0x00000100,
49 ADS_RIGHT_DELETE
= 0x00010000,
50 ADS_RIGHT_READ_CONTROL
= 0x00020000,
51 ADS_RIGHT_WRITE_DAC
= 0x00040000,
52 ADS_RIGHT_WRITE_OWNER
= 0x00080000,
53 ADS_RIGHT_SYNCHRONIZE
= 0x00100000,
54 ADS_RIGHT_ACCESS_SYSTEM_SECURITY
= 0x00200000,
56 ADS_RIGHT_GENERIC_ALL
= 0x10000000,
57 ADS_RIGHT_GENERIC_EXECUTE
= 0x20000000,
58 ADS_RIGHT_GENERIC_WRITE
= 0x40000000,
59 ADS_RIGHT_GENERIC_READ
= 0x80000000
64 ADS_SECURE_AUTHENTICATION
= 0x1,
65 ADS_USE_ENCRYPTION
= 0x2,
67 ADS_READONLY_SERVER
= 0x4,
68 ADS_PROMPT_CREDENTIALS
= 0x8,
69 ADS_NO_AUTHENTICATION
= 0x10,
71 ADS_USE_SIGNING
= 0x40,
72 ADS_USE_SEALING
= 0x80,
73 ADS_USE_DELEGATION
= 0x100,
74 ADS_SERVER_BIND
= 0x200,
75 ADS_NO_REFERRAL_CHASING
= 0x400,
76 ADS_AUTH_RESERVED
= 0x80000000
77 } ADS_AUTHENTICATION_ENUM
;
81 ADS_SEARCHPREF_ASYNCHRONOUS
,
82 ADS_SEARCHPREF_DEREF_ALIASES
,
83 ADS_SEARCHPREF_SIZE_LIMIT
,
84 ADS_SEARCHPREF_TIME_LIMIT
,
85 ADS_SEARCHPREF_ATTRIBTYPES_ONLY
,
86 ADS_SEARCHPREF_SEARCH_SCOPE
,
87 ADS_SEARCHPREF_TIMEOUT
,
88 ADS_SEARCHPREF_PAGESIZE
,
89 ADS_SEARCHPREF_PAGED_TIME_LIMIT
,
90 ADS_SEARCHPREF_CHASE_REFERRALS
,
91 ADS_SEARCHPREF_SORT_ON
,
92 ADS_SEARCHPREF_CACHE_RESULTS
,
93 ADS_SEARCHPREF_DIRSYNC
,
94 ADS_SEARCHPREF_TOMBSTONE
,
96 ADS_SEARCHPREF_ATTRIBUTE_QUERY
,
97 ADS_SEARCHPREF_SECURITY_MASK
,
98 ADS_SEARCHPREF_DIRSYNC_FLAG
,
99 ADS_SEARCHPREF_EXTENDED_DN
100 } ADS_SEARCHPREF_ENUM
;
105 ADS_STATUS_INVALID_SEARCHPREF
,
106 ADS_STATUS_INVALID_SEARCHPREFVALUE
113 ADSTYPE_CASE_EXACT_STRING
,
114 ADSTYPE_CASE_IGNORE_STRING
,
115 ADSTYPE_PRINTABLE_STRING
,
116 ADSTYPE_NUMERIC_STRING
,
119 ADSTYPE_OCTET_STRING
,
121 ADSTYPE_LARGE_INTEGER
,
122 ADSTYPE_PROV_SPECIFIC
,
123 ADSTYPE_OBJECT_CLASS
,
124 ADSTYPE_CASEIGNORE_LIST
,
127 ADSTYPE_POSTALADDRESS
,
133 ADSTYPE_REPLICAPOINTER
,
136 ADSTYPE_NT_SECURITY_DESCRIPTOR
,
138 ADSTYPE_DN_WITH_BINARY
,
139 ADSTYPE_DN_WITH_STRING
151 ADS_PASSWORD_ENCODE_REQUIRE_SSL
,
152 ADS_PASSWORD_ENCODE_CLEAR
153 } ADS_PASSWORD_ENCODING_ENUM
;
155 typedef struct _ADS_CASEIGNORE_LIST
157 struct _ADS_CASEIGNORE_LIST
*Next
;
159 } ADS_CASEIGNORE_LIST
;
161 typedef struct _ADS_OCTET_LIST
163 struct _ADS_OCTET_LIST
*Next
;
173 } ADS_PATH
, *PADS_PATH
;
182 typedef ADSTYPEENUM ADSTYPE
;
183 typedef LPWSTR ADS_DN_STRING
;
184 typedef LPWSTR
*PADS_DN_STRING
;
185 typedef LPWSTR ADS_CASE_EXACT_STRING
;
186 typedef LPWSTR
*PADS_CASE_EXACT_STRING
;
187 typedef LPWSTR ADS_CASE_IGNORE_STRING
;
188 typedef LPWSTR
*PADS_CASE_IGNORE_STRING
;
189 typedef LPWSTR ADS_PRINTABLE_STRING
;
190 typedef LPWSTR
*PADS_PRINTABLE_STRING
;
191 typedef LPWSTR ADS_NUMERIC_STRING
;
192 typedef LPWSTR
*PADS_NUMERIC_STRING
;
193 typedef DWORD ADS_BOOLEAN
;
194 typedef DWORD
*LPNDS_BOOLEAN
;
195 typedef DWORD ADS_INTEGER
;
196 typedef DWORD
*PADS_INTEGER
;
197 typedef SYSTEMTIME ADS_UTC_TIME
;
198 typedef SYSTEMTIME
*PADS_UTC_TIME
;
199 typedef LARGE_INTEGER ADS_LARGE_INTEGER
;
200 typedef LARGE_INTEGER
*PADS_LARGE_INTEGER
;
201 typedef LPWSTR ADS_OBJECT_CLASS
;
202 typedef LPWSTR
*PADS_OBJECT_CLASS
;
203 typedef struct _ADS_OCTET_LIST
*PADS_OCTET_LIST
;
204 typedef struct _ADS_CASEIGNORE_LIST
*PADS_CASEIGNORE_LIST
;
205 typedef ADS_STATUSENUM ADS_STATUS
;
206 typedef ADS_SEARCHPREF_ENUM ADS_SEARCHPREF
;
207 typedef HANDLE ADS_SEARCH_HANDLE
;
208 typedef HANDLE *PADS_SEARCH_HANDLE
;
225 LPWSTR PostalAddress
[ 6 ];
226 } ADS_POSTALADDRESS
, *PADS_POSTALADDRESS
;
233 } ADS_TYPEDNAME
, *PADS_TYPEDNAME
;
252 } ADS_NETADDRESS
, *PADS_NETADDRESS
;
260 PADS_NETADDRESS ReplicaAddressHints
;
261 } ADS_REPLICAPOINTER
, *PADS_REPLICAPOINTER
;
265 LPWSTR TelephoneNumber
;
268 } ADS_FAXNUMBER
, *PADS_FAXNUMBER
;
275 } ADS_EMAIL
, *PADS_EMAIL
;
281 } ADS_NT_SECURITY_DESCRIPTOR
;
288 } ADS_DN_WITH_BINARY
, *PADS_DN_WITH_BINARY
;
292 LPWSTR pszStringValue
;
294 } ADS_DN_WITH_STRING
, *PADS_DN_WITH_STRING
;
296 typedef struct _adsvalue
301 ADS_DN_STRING DNString
;
302 ADS_CASE_EXACT_STRING CaseExactString
;
303 ADS_CASE_IGNORE_STRING CaseIgnoreString
;
304 ADS_PRINTABLE_STRING PrintableString
;
305 ADS_NUMERIC_STRING NumericString
;
308 ADS_OCTET_STRING OctetString
;
309 ADS_UTC_TIME UTCTime
;
310 ADS_LARGE_INTEGER LargeInteger
;
311 ADS_OBJECT_CLASS ClassName
;
312 ADS_PROV_SPECIFIC ProviderSpecific
;
313 PADS_CASEIGNORE_LIST pCaseIgnoreList
;
314 PADS_OCTET_LIST pOctetList
;
316 PADS_POSTALADDRESS pPostalAddress
;
317 ADS_TIMESTAMP Timestamp
;
318 ADS_BACKLINK BackLink
;
319 PADS_TYPEDNAME pTypedName
;
321 PADS_NETADDRESS pNetAddress
;
322 PADS_REPLICAPOINTER pReplicaPointer
;
323 PADS_FAXNUMBER pFaxNumber
;
325 ADS_NT_SECURITY_DESCRIPTOR SecurityDescriptor
;
326 PADS_DN_WITH_BINARY pDNWithBinary
;
327 PADS_DN_WITH_STRING pDNWithString
;
329 } ADSVALUE
, *PADSVALUE
;
331 typedef struct ads_searchpref_info
333 ADS_SEARCHPREF dwSearchPref
;
336 } ADS_SEARCHPREF_INFO
, *PADS_SEARCHPREF_INFO
;
338 typedef struct ads_search_column
342 PADSVALUE pADsValues
;
345 } ADS_SEARCH_COLUMN
, *PADS_SEARCH_COLUMN
;
347 typedef struct _ads_object_info
354 } ADS_OBJECT_INFO
, *PADS_OBJECT_INFO
;
356 typedef struct _ads_attr_info
361 PADSVALUE pADsValues
;
363 } ADS_ATTR_INFO
, *PADS_ATTR_INFO
;
367 ADS_SECURITY_INFO_OWNER
= 0x1,
368 ADS_SECURITY_INFO_GROUP
= 0x2,
369 ADS_SECURITY_INFO_DACL
= 0x4,
370 ADS_SECURITY_INFO_SACL
= 0x8
371 } ADS_SECURITY_INFO_ENUM
;
373 /*****************************************************************************
374 * IADsContainer interface
378 uuid(001677d0
-fd16
-11ce
-abc4
-02608c9e7553
)
380 interface IADsContainer
: IDispatch
382 [propget] HRESULT Count
(
383 [out, retval] long *retval);
384 [propget, restricted] HRESULT _NewEnum
(
385 [out, retval] IUnknown
**retval);
386 [propget] HRESULT Filter
(
387 [out, retval] VARIANT *pvFilter
);
388 [propput] HRESULT Filter
(
389 [in] VARIANT vFilter
);
390 [propget] HRESULT Hints
(
391 [out, retval] VARIANT *pvHints
);
392 [propput] HRESULT Hints
(
393 [in] VARIANT vHints
);
395 [in] BSTR bstrClassName
,
396 [in] BSTR bstrRelativeName
,
397 [out, retval] IDispatch
**ppObject
);
399 [in] BSTR bstrClassName
,
400 [in] BSTR bstrRelativeName
,
401 [out, retval] IDispatch
**ppObject
);
403 [in] BSTR bstrClassName
,
404 [in] BSTR bstrRelativeName
);
406 [in] BSTR bstrSourceName
,
407 [in] BSTR bstrNewName
,
408 [out, retval] IDispatch
**ppObject
);
410 [in] BSTR bstrSourceName
,
411 [in] BSTR bstrNewName
,
412 [out, retval] IDispatch
**ppObject
);
415 /*****************************************************************************
420 uuid(FD8256D0
-FD15
-11CE
-ABC4
-02608C9E7553
),
424 interface IADs
: IDispatch
426 [id(0x00000002), propget]
427 HRESULT Name
([out, retval] BSTR* retval);
429 [id(0x00000003), propget]
430 HRESULT Class
([out, retval] BSTR* retval);
432 [id(0x00000004), propget]
433 HRESULT GUID
([out, retval] BSTR* retval);
435 [id(0x00000005), propget]
436 HRESULT ADsPath
([out, retval] BSTR* retval);
438 [id(0x00000006), propget]
439 HRESULT Parent
([out, retval] BSTR* retval);
441 [id(0x00000007), propget]
442 HRESULT Schema
([out, retval] BSTR* retval);
451 HRESULT Get
([in] BSTR bstrName
, [out, retval] VARIANT* pvProp
);
454 HRESULT Put
([in] BSTR bstrName
, [in] VARIANT vProp
);
457 HRESULT GetEx
([in] BSTR bstrName
, [out, retval] VARIANT* pvProp
);
460 HRESULT PutEx
([in] long lnControlCode
, [in] BSTR bstrName
, [in] VARIANT vProp
);
463 HRESULT GetInfoEx
( [in] VARIANT vProperties
, [in] long lnReserved
);
466 /*****************************************************************************
467 * IADsMembers interface
471 uuid(451A0030
-72EC
-11CF
-B03B
-00AA006E0975
),
475 interface IADsMembers
: IDispatch
477 [id(0x00000002), propget]
478 HRESULT Count
([out, retval] long* plCount
);
480 [id(0xfffffffc), propget]
481 HRESULT _NewEnum
([out, retval] IUnknown
** ppEnumerator
);
483 [id(0x00000003), propget]
484 HRESULT Filter
([out, retval] VARIANT* pvFilter
);
486 [id(0x00000003), propput]
487 HRESULT Filter
([in] VARIANT pvFilter
);
490 /*****************************************************************************
491 * IADsGroup interface
495 uuid(27636B00
-410F
-11CF
-B1FF
-02608C9E7553
),
499 interface IADsGroup
: IADs
{
500 [id(0x0000000f), propget]
501 HRESULT Description
([out, retval] BSTR* retval);
503 [id(0x0000000f), propput]
504 HRESULT Description
([in] BSTR retval);
507 HRESULT Members
([out, retval] IADsMembers
** ppMembers
);
510 HRESULT IsMember
([in] BSTR bstrMember
, [out, retval] VARIANT_BOOL* bMember
);
513 HRESULT Add
([in] BSTR bstrNewItem
);
516 HRESULT Remove
([in] BSTR bstrItemToBeRemoved
);
519 /*****************************************************************************
524 uuid(3E37E320
-17E2
-11CF
-ABC4
-02608C9E7553
),
528 interface IADsUser
: IADs
530 [id(0x00000035), propget]
531 HRESULT BadLoginAddress
([out, retval] BSTR* retval);
533 [id(0x00000036), propget]
534 HRESULT BadLoginCount
([out, retval] long* retval);
536 [id(0x00000038), propget]
537 HRESULT LastLogin
([out, retval] DATE
* retval);
539 [id(0x00000039), propget]
540 HRESULT LastLogoff
([out, retval] DATE
* retval);
542 [id(0x0000003a), propget]
543 HRESULT LastFailedLogin
([out, retval] DATE
* retval);
545 [id(0x0000003b), propget]
546 HRESULT PasswordLastChanged
([out, retval] DATE
* retval);
548 [id(0x0000000f), propget]
549 HRESULT Description
([out, retval] BSTR* retval);
551 [id(0x0000000f), propput]
552 HRESULT Description
([in] BSTR retval);
554 [id(0x00000013), propget]
555 HRESULT Division
([out, retval] BSTR* retval);
557 [id(0x00000013), propput]
558 HRESULT Division
([in] BSTR retval);
560 [id(0x0000007a), propget]
561 HRESULT Department
([out, retval] BSTR* retval);
563 [id(0x0000007a), propput]
564 HRESULT Department
([in] BSTR retval);
566 [id(0x00000014), propget]
567 HRESULT EmployeeID
([out, retval] BSTR* retval);
569 [id(0x00000014), propput]
570 HRESULT EmployeeID
([in] BSTR retval);
572 [id(0x00000017), propget]
573 HRESULT FullName
([out, retval] BSTR* retval);
575 [id(0x00000017), propput]
576 HRESULT FullName
([in] BSTR retval);
578 [id(0x00000016), propget]
579 HRESULT FirstName
([out, retval] BSTR* retval);
581 [id(0x00000016), propput]
582 HRESULT FirstName
([in] BSTR retval);
584 [id(0x00000019), propget]
585 HRESULT LastName
([out, retval] BSTR* retval);
587 [id(0x00000019), propput]
588 HRESULT LastName
([in] BSTR retval);
590 [id(0x0000001b), propget]
591 HRESULT OtherName
([out, retval] BSTR* retval);
593 [id(0x0000001b), propput]
594 HRESULT OtherName
([in] BSTR retval);
596 [id(0x00000072), propget]
597 HRESULT NamePrefix
([out, retval] BSTR* retval);
599 [id(0x00000072), propput]
600 HRESULT NamePrefix
([in] BSTR retval);
602 [id(0x00000073), propget]
603 HRESULT NameSuffix
([out, retval] BSTR* retval);
605 [id(0x00000073), propput]
606 HRESULT NameSuffix
([in] BSTR retval);
608 [id(0x00000024), propget]
609 HRESULT Title
([out, retval] BSTR* retval);
611 [id(0x00000024), propput]
612 HRESULT Title
([in] BSTR retval);
614 [id(0x0000001a), propget]
615 HRESULT Manager
([out, retval] BSTR* retval);
617 [id(0x0000001a), propput]
618 HRESULT Manager
([in] BSTR retval);
620 [id(0x00000020), propget]
621 HRESULT TelephoneHome
([out, retval] VARIANT* retval);
623 [id(0x00000020), propput]
624 HRESULT TelephoneHome
([in] VARIANT retval);
626 [id(0x00000021), propget]
627 HRESULT TelephoneMobile
([out, retval] VARIANT* retval);
629 [id(0x00000021), propput]
630 HRESULT TelephoneMobile
([in] VARIANT retval);
632 [id(0x00000022), propget]
633 HRESULT TelephoneNumber
([out, retval] VARIANT* retval);
635 [id(0x00000022), propput]
636 HRESULT TelephoneNumber
([in] VARIANT retval);
638 [id(0x00000011), propget]
639 HRESULT TelephonePager
([out, retval] VARIANT* retval);
641 [id(0x00000011), propput]
642 HRESULT TelephonePager
([in] VARIANT retval);
644 [id(0x00000010), propget]
645 HRESULT FaxNumber
([out, retval] VARIANT* retval);
647 [id(0x00000010), propput]
648 HRESULT FaxNumber
([in] VARIANT retval);
650 [id(0x0000001c), propget]
651 HRESULT OfficeLocations
([out, retval] VARIANT* retval);
653 [id(0x0000001c), propput]
654 HRESULT OfficeLocations
([in] VARIANT retval);
656 [id(0x0000001e), propget]
657 HRESULT PostalAddresses
([out, retval] VARIANT* retval);
659 [id(0x0000001e), propput]
660 HRESULT PostalAddresses
([in] VARIANT retval);
662 [id(0x0000001f), propget]
663 HRESULT PostalCodes
([out, retval] VARIANT* retval);
665 [id(0x0000001f), propput]
666 HRESULT PostalCodes
([in] VARIANT retval);
668 [id(0x00000075), propget]
669 HRESULT SeeAlso
([out, retval] VARIANT* retval);
671 [id(0x00000075), propput]
672 HRESULT SeeAlso
([in] VARIANT retval);
674 [id(0x00000025), propget]
675 HRESULT AccountDisabled
([out, retval] VARIANT_BOOL* retval);
677 [id(0x00000025), propput]
678 HRESULT AccountDisabled
([in] VARIANT_BOOL retval);
680 [id(0x00000026), propget]
681 HRESULT AccountExpirationDate
([out, retval] DATE
* retval);
683 [id(0x00000026), propput]
684 HRESULT AccountExpirationDate
([in] DATE
retval);
686 [id(0x00000029), propget]
687 HRESULT GraceLoginsAllowed
([out, retval] long* retval);
689 [id(0x00000029), propput]
690 HRESULT GraceLoginsAllowed
([in] long retval);
692 [id(0x0000002a), propget]
693 HRESULT GraceLoginsRemaining
([out, retval] long* retval);
695 [id(0x0000002a), propput]
696 HRESULT GraceLoginsRemaining
([in] long retval);
698 [id(0x0000002b), propget]
699 HRESULT IsAccountLocked
([out, retval] VARIANT_BOOL* retval);
701 [id(0x0000002b), propput]
702 HRESULT IsAccountLocked
([in] VARIANT_BOOL retval);
704 [id(0x0000002d), propget]
705 HRESULT LoginHours
([out, retval] VARIANT* retval);
707 [id(0x0000002d), propput]
708 HRESULT LoginHours
([in] VARIANT retval);
710 [id(0x0000002e), propget]
711 HRESULT LoginWorkstations
([out, retval] VARIANT* retval);
713 [id(0x0000002e), propput]
714 HRESULT LoginWorkstations
([in] VARIANT retval);
716 [id(0x0000002f), propget]
717 HRESULT MaxLogins
([out, retval] long* retval);
719 [id(0x0000002f), propput]
720 HRESULT MaxLogins
([in] long retval);
722 [id(0x00000030), propget]
723 HRESULT MaxStorage
([out, retval] long* retval);
725 [id(0x00000030), propput]
726 HRESULT MaxStorage
([in] long retval);
728 [id(0x00000031), propget]
729 HRESULT PasswordExpirationDate
([out, retval] DATE
* retval);
731 [id(0x00000031), propput]
732 HRESULT PasswordExpirationDate
([in] DATE
retval);
734 [id(0x00000032), propget]
735 HRESULT PasswordMinimumLength
([out, retval] long* retval);
737 [id(0x00000032), propput]
738 HRESULT PasswordMinimumLength
([in] long retval);
740 [id(0x00000033), propget]
741 HRESULT PasswordRequired
([out, retval] VARIANT_BOOL* retval);
743 [id(0x00000033), propput]
744 HRESULT PasswordRequired
([in] VARIANT_BOOL retval);
746 [id(0x00000034), propget]
747 HRESULT RequireUniquePassword
([out, retval] VARIANT_BOOL* retval);
749 [id(0x00000034), propput]
750 HRESULT RequireUniquePassword
([in] VARIANT_BOOL retval);
752 [id(0x0000003c), propget]
753 HRESULT EmailAddress
([out, retval] BSTR* retval);
755 [id(0x0000003c), propput]
756 HRESULT EmailAddress
([in] BSTR retval);
758 [id(0x0000003d), propget]
759 HRESULT HomeDirectory
([out, retval] BSTR* retval);
761 [id(0x0000003d), propput]
762 HRESULT HomeDirectory
([in] BSTR retval);
764 [id(0x0000003e), propget]
765 HRESULT Languages
([out, retval] VARIANT* retval);
767 [id(0x0000003e), propput]
768 HRESULT Languages
([in] VARIANT retval);
770 [id(0x0000003f), propget]
771 HRESULT Profile
([out, retval] BSTR* retval);
773 [id(0x0000003f), propput]
774 HRESULT Profile
([in] BSTR retval);
776 [id(0x00000040), propget]
777 HRESULT LoginScript
([out, retval] BSTR* retval);
779 [id(0x00000040), propput]
780 HRESULT LoginScript
([in] BSTR retval);
782 [id(0x00000041), propget]
783 HRESULT Picture
([out, retval] VARIANT* retval);
785 [id(0x00000041), propput]
786 HRESULT Picture
([in] VARIANT retval);
788 [id(0x00000078), propget]
789 HRESULT HomePage
([out, retval] BSTR* retval);
791 [id(0x00000078), propput]
792 HRESULT HomePage
([in] BSTR retval);
795 HRESULT Groups
([out, retval] IADsMembers
** ppGroups
);
798 HRESULT SetPassword
([in] BSTR NewPassword
);
801 HRESULT ChangePassword
([in] BSTR bstrOldPassword
, [in] BSTR bstrNewPassword
);
804 /*****************************************************************************
805 * IDirectorySearch interface
810 uuid(109BA8EC
-92F0
-11D0
-A790
-00C04FD8D5A8
)
812 interface IDirectorySearch
: IUnknown
814 HRESULT SetSearchPreference
([in] PADS_SEARCHPREF_INFO pSearchPrefs
, [in] DWORD dwNumPrefs
);
815 HRESULT ExecuteSearch
([in] LPWSTR pszSearchFilter
, [in] LPWSTR
* pAttributeNames
,
816 [in] DWORD dwNumberAttributes
, [out] PADS_SEARCH_HANDLE phSearchResult
);
817 HRESULT AbandonSearch
([in] ADS_SEARCH_HANDLE phSearchResult
);
818 HRESULT GetFirstRow
([in] ADS_SEARCH_HANDLE hSearchResult
);
819 HRESULT GetNextRow
([in] ADS_SEARCH_HANDLE hSearchResult
);
820 HRESULT GetPreviousRow
([in] ADS_SEARCH_HANDLE hSearchResult
);
821 HRESULT GetNextColumnName
([in] ADS_SEARCH_HANDLE hSearchHandle
, [out] LPWSTR
* ppszColumnName
);
822 HRESULT GetColumn
( [in] ADS_SEARCH_HANDLE hSearchResult
, [in] LPWSTR szColumnName
,
823 [out] PADS_SEARCH_COLUMN pSearchColumn
);
824 HRESULT FreeColumn
([in] PADS_SEARCH_COLUMN pSearchColumn
);
825 HRESULT CloseSearchHandle
([in] ADS_SEARCH_HANDLE hSearchResult
);
828 /*****************************************************************************
829 * IDirectoryObject interface
834 uuid(e798de2c
-22e4
-11d0
-84fe
-00c04fd8d503
)
836 interface IDirectoryObject
: IUnknown
838 HRESULT GetObjectInformation
(PADS_OBJECT_INFO
*info
);
839 HRESULT GetObjectAttributes
(LPWSTR
*names
, DWORD count
, PADS_ATTR_INFO
*attrs
, DWORD
*count_returned
);
840 HRESULT SetObjectAttributes
(PADS_ATTR_INFO attrs
, DWORD count
, DWORD
*count_set
);
841 HRESULT CreateDSObject
(LPWSTR name
, PADS_ATTR_INFO attrs
, DWORD count
, IDispatch
**obj
);
842 HRESULT DeleteDSObject
(LPWSTR name
);
845 /*****************************************************************************
846 * IID_IADsOpenDSObject interface
850 uuid(ddf2891e
-0f9c
-11d0
-8ad4
-00c04fd8d503
),
854 interface IADsOpenDSObject
: IDispatch
856 HRESULT OpenDSObject
([in] BSTR path
, [in] BSTR user
, [in] BSTR password
, [in] long reserved
, [out,retval] IDispatch
**obj
);
859 /*****************************************************************************
860 * IADsPathname interface
864 uuid(d592aed4
-f420
-11d0
-a36e
-00c04fb950dc
),
868 interface IADsPathname
: IDispatch
870 HRESULT Set
(BSTR path
, long type
);
871 HRESULT SetDisplayType
(long type
);
872 HRESULT Retrieve
(long type
, BSTR *path
);
873 HRESULT GetNumElements
(long *count
);
874 HRESULT GetElement
(long index
, BSTR *element
);
875 HRESULT AddLeafElement
(BSTR element
);
876 HRESULT RemoveLeafElement
(void);
877 HRESULT CopyPath
(IDispatch
**path
);
878 HRESULT GetEscapedElement
(long reserved
, BSTR element
, BSTR *str
);
879 HRESULT get_EscapedMode
(long *mode
);
880 HRESULT put_EscapedMode
(long mode
);
883 /*****************************************************************************
884 * IADsADSystemInfo interface
888 uuid(5bb11929
-afd1
-11d2
-9cb9
-0000f87a369e
),
892 interface IADsADSystemInfo
: IDispatch
894 [id(0x00000002), propget]
895 HRESULT UserName
([out, retval] BSTR *retval);
896 [id(0x00000003), propget]
897 HRESULT ComputerName
([out, retval] BSTR *retval);
898 [id(0x00000004), propget]
899 HRESULT SiteName
([out, retval] BSTR *retval);
900 [id(0x00000005), propget]
901 HRESULT DomainShortName
([out, retval] BSTR *retval);
902 [id(0x00000006), propget]
903 HRESULT DomainDNSName
([out, retval] BSTR *retval);
904 [id(0x00000007), propget]
905 HRESULT ForestDNSName
([out, retval] BSTR *retval);
906 [id(0x00000008), propget]
907 HRESULT PDCRoleOwner
([out, retval] BSTR *retval);
908 [id(0x00000009), propget]
909 HRESULT SchemaRoleOwner
([out, retval] BSTR *retval);
910 [id(0x0000000a), propget]
911 HRESULT IsNativeMode
([out, retval] VARIANT_BOOL *retval);
913 HRESULT GetAnyDCName
([out, retval] BSTR *retval);
915 HRESULT GetDCSiteName
([in] BSTR server
, [out, retval] BSTR *retval);
917 HRESULT RefreshSchemaCache
();
919 HRESULT GetTrees
([out, retval] VARIANT *retval);
923 helpstring("AD System Info Object"),
924 uuid(50b6327f
-afd1
-11d2
-9cb9
-0000f87a369e
),
925 progid
("ADSystemInfo"),
930 interface IADsADSystemInfo
;