78 references to UnsafeNativeMethods
System.DirectoryServices (78)
System\DirectoryServices\ActiveDirectory\DomainController.cs (2)
386
System.DirectoryServices.
UnsafeNativeMethods
.IADsLargeInteger ridPool = (System.DirectoryServices.
UnsafeNativeMethods
.IADsLargeInteger)roleObjectEntry.Properties[PropertyManager.RIDAvailablePool].Value!;
System\DirectoryServices\DirectoryEntry.cs (32)
26
private
UnsafeNativeMethods
.IAds? _adsObject;
118
_adsObject = adsObject as
UnsafeNativeMethods
.IAds;
151
internal
UnsafeNativeMethods
.IAds AdsObject
184
internal
UnsafeNativeMethods
.IAdsContainer ContainerObject
189
return (
UnsafeNativeMethods
.IAdsContainer)_adsObject;
246
return _adsObject is
UnsafeNativeMethods
.IAdsContainer;
448
if (!(AdsObject is
UnsafeNativeMethods
.IAdsObjectOptions))
457
if (_adsObject is
UnsafeNativeMethods
.IAdsObjectOptions2)
467
unmanagedResult = ((
UnsafeNativeMethods
.IAdsObjectOptions2)_adsObject).GetOption(8, out o);
483
((
UnsafeNativeMethods
.IAdsObjectOptions2)_adsObject).SetOption(8, value);
528
int hr =
UnsafeNativeMethods
.ADsOpenObject(pathToUse, GetUsername(), GetPassword(), (int)_authenticationType, ref g, out value);
537
_adsObject = (
UnsafeNativeMethods
.IAds)value;
681
if (!(AdsObject is
UnsafeNativeMethods
.IAdsDeleteOps))
684
UnsafeNativeMethods
.IAdsDeleteOps entry = (
UnsafeNativeMethods
.IAdsDeleteOps)AdsObject;
798
if (result is
UnsafeNativeMethods
.IAds)
872
if (!(newParent.AdsObject is
UnsafeNativeMethods
.IAdsContainer))
912
_adsObject = (
UnsafeNativeMethods
.IAds)newEntry;
1082
if (!(NativeObject is
UnsafeNativeMethods
.IAdsPropertyList))
1085
UnsafeNativeMethods
.IAdsPropertyList list = (
UnsafeNativeMethods
.IAdsPropertyList)NativeObject;
1087
UnsafeNativeMethods
.IAdsPropertyEntry propertyEntry = (
UnsafeNativeMethods
.IAdsPropertyEntry)list.GetPropertyItem(SecurityDescriptorProperty, (int)AdsType.ADSTYPE_OCTET_STRING);
1113
UnsafeNativeMethods
.IAdsPropertyValue propertyValue = (
UnsafeNativeMethods
.IAdsPropertyValue)values[0];
1138
UnsafeNativeMethods
.IAdsPropertyValue sDValue = (
UnsafeNativeMethods
.IAdsPropertyValue)new
UnsafeNativeMethods
.PropertyValue();
1143
UnsafeNativeMethods
.IAdsPropertyEntry newSDEntry = (
UnsafeNativeMethods
.IAdsPropertyEntry)new
UnsafeNativeMethods
.PropertyEntry();
1150
((
UnsafeNativeMethods
.IAdsPropertyList)NativeObject).PutPropertyItem(newSDEntry);
System\DirectoryServices\DirectoryEntryConfiguration.cs (13)
22
return (ReferralChasingOption)((
UnsafeNativeMethods
.IAdsObjectOptions)_entry.AdsObject).GetOption((int)AdsOptions.ADS_OPTION_REFERRALS);
32
((
UnsafeNativeMethods
.IAdsObjectOptions)_entry.AdsObject).SetOption((int)AdsOptions.ADS_OPTION_REFERRALS, value);
40
return (SecurityMasks)((
UnsafeNativeMethods
.IAdsObjectOptions)_entry.AdsObject).GetOption((int)AdsOptions.ADS_OPTION_SECURITY_MASK);
47
((
UnsafeNativeMethods
.IAdsObjectOptions)_entry.AdsObject).SetOption((int)AdsOptions.ADS_OPTION_SECURITY_MASK, value);
55
return (int)((
UnsafeNativeMethods
.IAdsObjectOptions)_entry.AdsObject).GetOption((int)AdsOptions.ADS_OPTION_PAGE_SIZE);
62
((
UnsafeNativeMethods
.IAdsObjectOptions)_entry.AdsObject).SetOption((int)AdsOptions.ADS_OPTION_PAGE_SIZE, value);
70
return (int)((
UnsafeNativeMethods
.IAdsObjectOptions)_entry.AdsObject).GetOption((int)AdsOptions.ADS_OPTION_PASSWORD_PORTNUMBER);
74
((
UnsafeNativeMethods
.IAdsObjectOptions)_entry.AdsObject).SetOption((int)AdsOptions.ADS_OPTION_PASSWORD_PORTNUMBER, value);
82
return (PasswordEncodingMethod)((
UnsafeNativeMethods
.IAdsObjectOptions)_entry.AdsObject).GetOption((int)AdsOptions.ADS_OPTION_PASSWORD_METHOD);
89
((
UnsafeNativeMethods
.IAdsObjectOptions)_entry.AdsObject).SetOption((int)AdsOptions.ADS_OPTION_PASSWORD_METHOD, value);
96
return (string)((
UnsafeNativeMethods
.IAdsObjectOptions)_entry.AdsObject).GetOption((int)AdsOptions.ADS_OPTION_SERVERNAME);
103
int val = (int)((
UnsafeNativeMethods
.IAdsObjectOptions)_entry.AdsObject).GetOption((int)AdsOptions.ADS_OPTION_MUTUAL_AUTH_STATUS);
120
((
UnsafeNativeMethods
.IAdsObjectOptions)_entry.AdsObject).SetOption((int)AdsOptions.ADS_OPTION_QUOTA, accountName);
System\DirectoryServices\DirectorySearcher.cs (6)
613
UnsafeNativeMethods
.IAds adsObject = clonedRoot.AdsObject;
614
if (!(adsObject is
UnsafeNativeMethods
.IDirectorySearch))
628
UnsafeNativeMethods
.IDirectorySearch adsSearch = (
UnsafeNativeMethods
.IDirectorySearch)adsObject;
659
private unsafe void SetSearchPreferences(
UnsafeNativeMethods
.IDirectorySearch adsSearch, bool findMoreThanOne)
895
private static unsafe void DoSetSearchPrefs(
UnsafeNativeMethods
.IDirectorySearch adsSearch, AdsSearchPreferenceInfo[] prefs)
System\DirectoryServices\PropertyCollection.cs (14)
54
if (!(_entry.AdsObject is
UnsafeNativeMethods
.IAdsPropertyList))
59
UnsafeNativeMethods
.IAdsPropertyList propList = (
UnsafeNativeMethods
.IAdsPropertyList)_entry.AdsObject;
102
if (!(_entry.AdsObject is
UnsafeNativeMethods
.IAdsPropertyList))
111
_ = (
UnsafeNativeMethods
.IAdsPropertyList)entryToUse.AdsObject;
224
hr = ((
UnsafeNativeMethods
.IAdsPropertyList)_entry.AdsObject).Next(out prop);
234
_currentPropName = ((
UnsafeNativeMethods
.IAdsPropertyEntry)prop).Name;
249
((
UnsafeNativeMethods
.IAdsPropertyList)_entry.AdsObject).Reset();
317
UnsafeNativeMethods
.IAdsPropertyList propList = (
UnsafeNativeMethods
.IAdsPropertyList)propCollection._entry.AdsObject;
318
return propCollection[((
UnsafeNativeMethods
.IAdsPropertyEntry)propList.Item(CurrentIndex)).Name];
347
UnsafeNativeMethods
.IAdsPropertyList propList = (
UnsafeNativeMethods
.IAdsPropertyList)propCollection._entry.AdsObject;
349
return ((
UnsafeNativeMethods
.IAdsPropertyEntry)propList.Item(CurrentIndex)).Name;
System\DirectoryServices\SchemaNameCollection.cs (2)
216
private readonly
UnsafeNativeMethods
.IAdsContainer _obj;
217
internal FilterDelegateWrapper(
UnsafeNativeMethods
.IAdsContainer wrapped)
System\DirectoryServices\SearchResultCollection.cs (9)
19
private
UnsafeNativeMethods
.IDirectorySearch? _searchObject;
67
internal
UnsafeNativeMethods
.IDirectorySearch SearchObject =>
68
_searchObject ??= (
UnsafeNativeMethods
.IDirectorySearch)_rootEntry.AdsObject; // get it only once
363
if (hr !=
UnsafeNativeMethods
.S_ADS_NOMORE_ROWS)
366
if (hr ==
UnsafeNativeMethods
.INVALID_FILTER)
387
if (hr ==
UnsafeNativeMethods
.S_ADS_NOMORE_ROWS || hr ==
UnsafeNativeMethods
.SIZE_LIMIT_EXCEEDED)
390
if (hr ==
UnsafeNativeMethods
.S_ADS_NOMORE_ROWS)
423
if (hr ==
UnsafeNativeMethods
.INVALID_FILTER)