Exemplo n.º 1
0
        internal static SafeRpcMemoryHandle MarshalPropValueCollection(ICollection <PropValue> properties)
        {
            SafeRpcMemoryHandle safeRpcMemoryHandle = new SafeRpcMemoryHandle();

            safeRpcMemoryHandle.Allocate(PropValue.GetBytesToMarshal(properties));
            PropValue.MarshalToNative(properties, safeRpcMemoryHandle);
            return(safeRpcMemoryHandle);
        }
Exemplo n.º 2
0
        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);
        }