public NspiStatus GetTemplateInfo(NspiGetTemplateInfoFlags flags, int type, string dn, int codePage, int localeId, out PropRow row) { SafeRpcMemoryHandle rowHandle; NspiStatus templateInfo = this.client.GetTemplateInfo(flags, type, dn, codePage, localeId, out rowHandle); row = NspiClient.GetRowAndDisposeHandle(rowHandle); return(templateInfo); }
public NspiStatus QueryColumns(NspiQueryColumnsFlags flags, out PropTag[] propTags) { int[] propTagsAsInts; NspiStatus result = this.client.QueryColumns((int)flags, out propTagsAsInts); propTags = NspiClient.GetPropTagArrayFromIntArray(propTagsAsInts); return(result); }
public NspiStatus GetPropList(NspiGetPropListFlags flags, int mid, int codePage, out PropTag[] props) { this.MarshalStatToNative(); int[] propTagsAsInts; NspiStatus propList = this.client.GetPropList(flags, mid, codePage, out propTagsAsInts); this.MarshalNativeToStat(); props = NspiClient.GetPropTagArrayFromIntArray(propTagsAsInts); return(propList); }
public NspiStatus GetHierarchyInfo(NspiGetHierarchyInfoFlags flags, ref uint version, out PropRowSet rowset) { this.MarshalStatToNative(); SafeRpcMemoryHandle rowsetHandle; NspiStatus hierarchyInfo = this.client.GetHierarchyInfo(flags, this.statHandle.DangerousGetHandle(), ref version, out rowsetHandle); this.MarshalNativeToStat(); rowset = NspiClient.GetRowSetAndDisposeHandle(rowsetHandle); return(hierarchyInfo); }
public NspiStatus GetProps(NspiGetPropsFlags flags, IList <PropTag> propTags, out PropRow row) { int[] intArrayFromPropTagArray = NspiClient.GetIntArrayFromPropTagArray(propTags); this.MarshalStatToNative(); SafeRpcMemoryHandle rowHandle; NspiStatus props = this.client.GetProps(flags, this.statHandle.DangerousGetHandle(), intArrayFromPropTagArray, out rowHandle); this.MarshalNativeToStat(); row = NspiClient.GetRowAndDisposeHandle(rowHandle); return(props); }
public NspiStatus QueryRows(NspiQueryRowsFlags flags, int[] mids, int count, IList <PropTag> propTags, out PropRowSet rowset) { int[] intArrayFromPropTagArray = NspiClient.GetIntArrayFromPropTagArray(propTags); this.MarshalStatToNative(); SafeRpcMemoryHandle rowsetHandle; NspiStatus result = this.client.QueryRows(flags, this.statHandle.DangerousGetHandle(), mids, count, intArrayFromPropTagArray, out rowsetHandle); this.MarshalNativeToStat(); rowset = NspiClient.GetRowSetAndDisposeHandle(rowsetHandle); return(result); }
public NspiStatus ModProps(IList <PropTag> propTags, PropRow row) { int[] intArrayFromPropTagArray = NspiClient.GetIntArrayFromPropTagArray(propTags); NspiStatus result; using (SafeRpcMemoryHandle safeRpcMemoryHandle = new SafeRpcMemoryHandle(row.GetBytesToMarshal())) { SafeRpcMemoryHandle safeRpcMemoryHandle2 = NspiMarshal.MarshalPropValueCollection(row.Properties); row.MarshalledPropertiesHandle = safeRpcMemoryHandle2; safeRpcMemoryHandle.AddAssociatedHandle(safeRpcMemoryHandle2); row.MarshalToNative(safeRpcMemoryHandle); this.MarshalStatToNative(); NspiStatus nspiStatus = this.client.ModProps(this.statHandle.DangerousGetHandle(), intArrayFromPropTagArray, safeRpcMemoryHandle.DangerousGetHandle()); this.MarshalNativeToStat(); result = nspiStatus; } return(result); }
public NspiStatus SeekEntries(PropValue propValue, int[] mids, IList <PropTag> propTags, out PropRowSet rowset) { int[] intArrayFromPropTagArray = NspiClient.GetIntArrayFromPropTagArray(propTags); IList <PropValue> list = new List <PropValue>(); list.Add(propValue); NspiStatus result; using (SafeRpcMemoryHandle safeRpcMemoryHandle = new SafeRpcMemoryHandle(propValue.GetBytesToMarshal())) { PropValue.MarshalToNative(list, safeRpcMemoryHandle); this.MarshalStatToNative(); SafeRpcMemoryHandle rowsetHandle; NspiStatus nspiStatus = this.client.SeekEntries(this.statHandle.DangerousGetHandle(), safeRpcMemoryHandle.DangerousGetHandle(), mids, intArrayFromPropTagArray, out rowsetHandle); this.MarshalNativeToStat(); rowset = NspiClient.GetRowSetAndDisposeHandle(rowsetHandle); result = nspiStatus; } return(result); }
public NspiStatus GetMatches(Restriction restriction, object propName, int maxRows, IList <PropTag> propTags, out int[] mids, out PropRowSet rowset) { NspiStatus result; using (SafeRpcMemoryHandle safeRpcMemoryHandle = new SafeRpcMemoryHandle()) { if (restriction != null) { safeRpcMemoryHandle.Allocate(restriction.GetBytesToMarshalNspi()); restriction.MarshalToNativeNspi(safeRpcMemoryHandle); } int[] intArrayFromPropTagArray = NspiClient.GetIntArrayFromPropTagArray(propTags); this.MarshalStatToNative(); SafeRpcMemoryHandle rowsetHandle; NspiStatus matches = this.client.GetMatches(this.statHandle.DangerousGetHandle(), safeRpcMemoryHandle.DangerousGetHandle(), IntPtr.Zero, maxRows, intArrayFromPropTagArray, out mids, out rowsetHandle); this.MarshalNativeToStat(); rowset = NspiClient.GetRowSetAndDisposeHandle(rowsetHandle); result = matches; } return(result); }
public NspiStatus ResolveNames(byte[][] names, IList <PropTag> propTags, out ResolveResult[] results, out PropRowSet rowset) { int[] intArrayFromPropTagArray = NspiClient.GetIntArrayFromPropTagArray(propTags); this.MarshalStatToNative(); int[] array; SafeRpcMemoryHandle rowsetHandle; NspiStatus result = this.client.ResolveNames(this.statHandle.DangerousGetHandle(), intArrayFromPropTagArray, names, out array, out rowsetHandle); this.MarshalNativeToStat(); rowset = NspiClient.GetRowSetAndDisposeHandle(rowsetHandle); if (array != null) { results = new ResolveResult[array.Length]; for (int i = 0; i < array.Length; i++) { results[i] = (ResolveResult)array[i]; } } else { results = null; } return(result); }