internal static SafeRpcMemoryHandle MarshalRow(PropRow row) { if (row == null) { return(null); } SafeRpcMemoryHandle safeRpcMemoryHandle = new SafeRpcMemoryHandle(); SafeRpcMemoryHandle safeRpcMemoryHandle2 = NspiMarshal.MarshalPropValueCollection(row.Properties); row.MarshalledPropertiesHandle = safeRpcMemoryHandle2; safeRpcMemoryHandle.AddAssociatedHandle(safeRpcMemoryHandle2); safeRpcMemoryHandle.Allocate(row.GetBytesToMarshal()); row.MarshalToNative(safeRpcMemoryHandle); return(safeRpcMemoryHandle); }
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); }