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