/// <summary> /// The NspiResolveNamesW method takes a set of string values in the Unicode character set and performs ANR on those strings. /// </summary> /// <param name="reserved">A DWORD value that is reserved for future use.</param> /// <param name="stat">A STAT block that describes a logical position in a specific address book container.</param> /// <param name="propTags">The value NULL or a reference to a PropertyTagArray_r containing a list of the proptags of the columns /// that the client requests to be returned for each row returned.</param> /// <param name="wstr">A WStringsArray_r value. It specifies the values on which the client is requesting the server to perform ANR.</param> /// <param name="mids">A PropertyTagArray_r value. On return, it contains a list of Minimal Entry IDs that match the array of strings.</param> /// <param name="rowOfResolveNamesW">A reference to a PropertyRowSet_r structure. It contains the address book container rows that the server returns in response to the request.</param> /// <param name="needRetry">A Boolean value indicates if need to retry to get an expected result. This parameter is designed to avoid meaningless retry when an error response is expected.</param> /// <returns>Status of NSPI method.</returns> public ErrorCodeValue NspiResolveNamesW(uint reserved, STAT stat, PropertyTagArray_r? propTags, WStringsArray_r? wstr, out PropertyTagArray_r? mids, out PropertyRowSet_r? rowOfResolveNamesW, bool needRetry = true) { ErrorCodeValue result; if (this.transport == "ncacn_http" || this.transport == "ncacn_ip_tcp") { result = this.nspiRpcAdapter.NspiResolveNamesW(reserved, stat, propTags, wstr, out mids, out rowOfResolveNamesW, needRetry); } else { result = this.nspiMapiHttpAdapter.ResolveNames(reserved, stat, propTags, wstr, out mids, out rowOfResolveNamesW); } this.VerifyNspiResolveNamesW(result, mids, rowOfResolveNamesW); this.VerifyTransport(); return result; }
/// <summary> /// The NspiResolveNamesW method takes a set of string values in the Unicode character set /// and performs ANR on those strings. /// </summary> /// <param name="reserved">A DWORD value that is reserved for future use.</param> /// <param name="stat">A STAT block that describes a logical position in a specific address book container.</param> /// <param name="propTags">The value NULL or a reference to a PropertyTagArray_r containing a list of the proptags of the columns /// that the client requests to be returned for each row returned.</param> /// <param name="wstr">A WStringsArray_r value. It specifies the values on which the client is requesting the server to perform ANR.</param> /// <param name="mids">A PropertyTagArray_r value. On return, it contains a list of Minimal Entry IDs that match the array of strings.</param> /// <param name="rows">A reference to a PropertyRowSet_r structure. It contains the address book container rows that the server returns in response to the request.</param> /// <returns>Status of NSPI method.</returns> public ErrorCodeValue ResolveNames(uint reserved, STAT stat, PropertyTagArray_r? propTags, WStringsArray_r? wstr, out PropertyTagArray_r? mids, out PropertyRowSet_r? rows) { ErrorCodeValue result; byte[] auxIn = new byte[] { }; ResolveNamesRequestBody resolveNamesRequestBody = new ResolveNamesRequestBody() { Reserved = reserved, HasState = true, State = stat, AuxiliaryBuffer = auxIn, AuxiliaryBufferSize = (uint)auxIn.Length }; if (propTags != null) { LargePropTagArray propetyTags = new LargePropTagArray(); propetyTags.PropertyTagCount = propTags.Value.CValues; propetyTags.PropertyTags = new PropertyTag[propetyTags.PropertyTagCount]; for (int i = 0; i < propTags.Value.CValues; i++) { propetyTags.PropertyTags[i].PropertyId = (ushort)((propTags.Value.AulPropTag[i] & 0xFFFF0000) >> 16); propetyTags.PropertyTags[i].PropertyType = (ushort)(propTags.Value.AulPropTag[i] & 0x0000FFFF); } resolveNamesRequestBody.HasPropertyTags = true; resolveNamesRequestBody.PropertyTags = propetyTags; } else { resolveNamesRequestBody.HasPropertyTags = false; resolveNamesRequestBody.PropertyTags = new LargePropTagArray(); } if (wstr != null) { resolveNamesRequestBody.HasNames = true; resolveNamesRequestBody.Names = wstr.Value; } else { resolveNamesRequestBody.HasNames = false; } ChunkedResponse chunkedResponse = this.SendAddressBookRequest(resolveNamesRequestBody, RequestType.ResolveNames); ResolveNamesResponseBody resolveNamesResponseBody = ResolveNamesResponseBody.Parse(chunkedResponse.ResponseBodyRawData); result = (ErrorCodeValue)resolveNamesResponseBody.ErrorCode; if (resolveNamesResponseBody.RowCount != null) { PropertyRowSet_r newRows = AdapterHelper.ParsePropertyRowSet_r(resolveNamesResponseBody.PropertyTags.Value, resolveNamesResponseBody.RowCount.Value, resolveNamesResponseBody.RowData); rows = newRows; } else { rows = null; } if (resolveNamesResponseBody.HasMinimalIds) { PropertyTagArray_r propertyTagArray = new PropertyTagArray_r(); propertyTagArray.CValues = resolveNamesResponseBody.MinimalIdCount.Value; propertyTagArray.AulPropTag = resolveNamesResponseBody.MinimalIds; mids = propertyTagArray; } else { mids = null; } return result; }