/// <summary>
        /// Get all properties of a folder object.
        /// </summary>
        /// <param name="inputHandle">The handle specified the folder RopGetPropertiesAll Rop operation performs on.</param>
        /// <param name="responseSOHTable">Server objects handles in RopGetPropertiesSpecificResponse.</param>
        /// <returns>RopGetPropertiesAllResponse object.</returns>
        public RopGetPropertiesAllResponse GetFolderPropertiesAll(uint inputHandle, ref List <List <uint> > responseSOHTable)
        {
            object ropResponse = new object();
            RopGetPropertiesAllRequest request = new RopGetPropertiesAllRequest
            {
                RopId             = (byte)RopId.RopGetPropertiesAll,
                LogonId           = Constants.CommonLogonId,
                InputHandleIndex  = 0,
                PropertySizeLimit = ushort.MaxValue,
                WantUnicode       = 0x01
            };

            this.ExcuteRopCall((ISerializable)request, inputHandle, ref ropResponse, ref responseSOHTable, ref this.rawData);
            RopGetPropertiesAllResponse response = (RopGetPropertiesAllResponse)ropResponse;

            if (0x00000000 == response.ReturnValue)
            {
                this.VerifyGetFolderPropertiesAll(response);
            }

            return(response);
        }
        public void MSOXCROPS_S12_TC02_TestFailRPCForMaxPcbOut()
        {
            this.CheckTransportIsSupported();

            if (Common.IsRequirementEnabled(454509, this.Site))
            {
                this.cropsAdapter.RpcConnect(
                    Common.GetConfigurationPropertyValue("SutComputerName", this.Site),
                    ConnectionType.PrivateMailboxServer,
                    Common.GetConfigurationPropertyValue("UserEssdn", this.Site),
                    Common.GetConfigurationPropertyValue("Domain", this.Site),
                    Common.GetConfigurationPropertyValue("UserName", this.Site),
                    Common.GetConfigurationPropertyValue("PassWord", this.Site));

                // Define data for properties
                string dataForProperties = string.Empty;
                dataForProperties += TestSuiteBase.DataForProperties;
                dataForProperties += TestSuiteBase.DataForProperties;
                dataForProperties += TestSuiteBase.DataForProperties;
                dataForProperties += TestSuiteBase.DataForProperties;
                dataForProperties += TestSuiteBase.DataForProperties;
                dataForProperties += TestSuiteBase.DataForProperties;
                dataForProperties += TestSuiteBase.DataForProperties;
                dataForProperties += TestSuiteBase.DataForProperties;

                int loopCounter = (LoopCounter / Encoding.ASCII.GetBytes(dataForProperties).Length) + 1;

                #region Common operations for RopGetStreamSize,RopSetStreamSize and RopSeekStream

                // Log on to a private mailbox.
                RopLogonResponse logonResponse = Logon(LogonType.Mailbox, this.userDN, out inputObjHandle);

                // Add the debug information
                Site.Log.Add(LogEntryKind.Debug, "Call GetCreatedMessageHandle method to create a message and get its handle.");

                // Call GetCreatedMessageHandle method to create a message and get its handle.
                uint messageHandle = GetCreatedMessageHandle(logonResponse.FolderIds[4], inputObjHandle);

                // Call GetOpenedStreamHandle method to open stream and get its handle.
                uint streamObjectHandle;

                for (int i = 0; i < loopCounter; i++)
                {
                    // Add the debug information
                    Site.Log.Add(LogEntryKind.Debug, "Call GetOpenedStreamHandle method to open stream and get its handle:loop counter i={0}", i);

                    streamObjectHandle = this.GetOpenedStreamHandle(
                        messageHandle,
                        (ushort)(this.propertyDictionary[PropertyNames.UserSpecified].PropertyId + i));

                    // Add the debug information
                    Site.Log.Add(LogEntryKind.Debug, "Call WriteStream method to write stream:loop counter i={0}", i);

                    // Call WriteStream method to write stream.
                    this.WriteStream(streamObjectHandle, dataForProperties);

                    // Add the debug information
                    Site.Log.Add(LogEntryKind.Debug, "Call CommitStream method to commit source stream:loop counter i={0}", i);

                    // Call CommitStream method to commit source stream.
                    this.CommitStream(streamObjectHandle);

                    #region Release the stream.
                    RopReleaseRequest releaseRequest;

                    releaseRequest.RopId   = (byte)RopId.RopRelease;
                    releaseRequest.LogonId = TestSuiteBase.LogonId;

                    // Set InputHandleIndex to 0x0, which specifies the location in the Server object handle table
                    // where the handle for the input Server object is stored.
                    releaseRequest.InputHandleIndex = TestSuiteBase.InputHandleIndex0;

                    // Add the debug information
                    Site.Log.Add(LogEntryKind.Debug, "Begin to send the RopRelease request.");

                    // Send a RopRelease request to release all resources associated with the Server object.
                    this.responseSOHs = cropsAdapter.ProcessSingleRop(
                        releaseRequest,
                        streamObjectHandle,
                        ref this.response,
                        ref this.rawData,
                        RopResponseType.SuccessResponse);
                    #endregion
                }

                // Add the debug information
                Site.Log.Add(LogEntryKind.Debug, "Call SaveMessage method to save message.");

                // Call SaveMessage method to save message.
                this.SaveMessage(messageHandle);

                #endregion

                #region Check 0x40000 as the maximum value of pcbout.

                // Here will check counter with 0x40000 to ensure the response payload be bigger than 0x40000.
                if (this.counter <= MS_OXCROPSAdapter.MaxPcbOut)
                {
                    return;
                }

                RopGetPropertiesAllRequest getPropertiesAllRequest = new RopGetPropertiesAllRequest
                {
                    RopId             = (byte)RopId.RopGetPropertiesAll,
                    LogonId           = TestSuiteBase.LogonId,
                    InputHandleIndex  = TestSuiteBase.InputHandleIndex0,
                    PropertySizeLimit = TestSuiteBase.PropertySizeLimit,
                    WantUnicode       = (ushort)Zero
                };

                // Add the debug information
                Site.Log.Add(LogEntryKind.Debug, "Begin to send the RopGetPropertiesAll request.");

                // Send the RopGetPropertiesAll request and verify RPC error response.
                this.responseSOHs = cropsAdapter.ProcessSingleRopWithOptionResponseBufferSize(
                    getPropertiesAllRequest,
                    messageHandle,
                    ref this.response,
                    ref this.rawData,
                    RopResponseType.RPCError,
                    MS_OXCROPSAdapter.MaxPcbOut);

                #endregion
            }
            else
            {
                Site.Assert.Inconclusive("This case runs only under Exchange 2010, since Exchange 2007 and Exchange 2013 do not support fail the RPC with 0x0000047D, if one of the ROP responses will not fit in the ROP output buffer when the pcbOut parameter of EcDoRpcExt2 is set to the maximum value.");
            }
        }