/// <summary> /// Open a specified message in specified folder. /// </summary> /// <param name="messageId">The specified message ID.</param> /// <param name="folderId">The specified folder ID.</param> /// <param name="openModeFlags">OpenModeFlags for RopOpenMessage.</param> /// <returns>The response of RopOpenMessage ROP operation.</returns> protected RopOpenMessageResponse OpenMessage(ulong messageId, ulong folderId, MessageOpenModeFlags openModeFlags) { RopOpenFolderRequest openFolderRequest = new RopOpenFolderRequest { RopId = (byte)RopId.RopOpenFolder, LogonId = Constants.CommonLogonId, InputHandleIndex = Constants.CommonInputHandleIndex, OutputHandleIndex = Constants.CommonOutputHandleIndex, OpenModeFlags = (byte)FolderOpenModeFlags.None, FolderId = folderId }; RopOpenFolderResponse openFolderResponse = this.Adapter.OpenFolder(openFolderRequest, this.LogonHandle, ref this.responseHandles); uint folderHandle = this.responseHandles[0][openFolderResponse.OutputHandleIndex]; RopOpenMessageRequest openMessageRequest = new RopOpenMessageRequest(); object ropResponse = null; openMessageRequest.RopId = (byte)RopId.RopOpenMessage; openMessageRequest.LogonId = Constants.CommonLogonId; openMessageRequest.InputHandleIndex = Constants.CommonInputHandleIndex; openMessageRequest.OutputHandleIndex = Constants.CommonOutputHandleIndex; openMessageRequest.OpenModeFlags = (byte)openModeFlags; openMessageRequest.FolderId = folderId; openMessageRequest.MessageId = messageId; openMessageRequest.CodePageId = 0x0fff; this.Adapter.DoRopCall(openMessageRequest, folderHandle, ref ropResponse, ref this.responseHandles); return (RopOpenMessageResponse)ropResponse; }
/// <summary> /// Open a specific message. /// </summary> /// <param name="folderId">The folder Id of specific folder that contains specific message.</param> /// <param name="messageId">The message id of specific message.</param> /// <param name="objectHandle">A Server object handle.</param> /// <param name="openFlags">The OpenModeFlags value.</param> /// <param name="openMessageResponse">The response of RopOpenMessage.</param> /// <returns>A Server object handle of specific message.</returns> protected uint OpenSpecificMessage(ulong folderId, ulong messageId, uint objectHandle, MessageOpenModeFlags openFlags, out RopOpenMessageResponse openMessageResponse) { RopOpenMessageRequest openMessageRequest = new RopOpenMessageRequest() { RopId = (byte)RopId.RopOpenMessage, LogonId = CommonLogonId, // The logonId 0x00 is associated with this operation. InputHandleIndex = CommonInputHandleIndex, // This index specifies the location 0x00 in the Server Object Handle Table where the handle for the input Server Object is stored. OutputHandleIndex = CommonOutputHandleIndex, // This index specifies the location 0x01 in the Server Object Handle Table where the handle for the output Server Object is stored. CodePageId = 0x0FFF, // Code page of Logon object is used FolderId = folderId, // Open the message in INBOX folder in which message is created. OpenModeFlags = (byte)openFlags, // The message will be opened as read-only. MessageId = messageId // Open the saved message }; this.ResponseSOHs = this.MSOXCMSGAdapter.DoRopCall(openMessageRequest, objectHandle, ref this.response, ref this.rawData, GetPropertiesFlags.None); openMessageResponse = (RopOpenMessageResponse)this.response; Site.Assert.AreEqual<uint>(TestSuiteBase.Success, openMessageResponse.ReturnValue, "Call RopOpenMessage should success."); return this.ResponseSOHs[0][openMessageRequest.OutputHandleIndex]; }
/// <summary> /// Open a specified message in specified folder. /// </summary> /// <param name="messageId">The specified message ID.</param> /// <param name="folderId">The specified folder ID.</param> /// <param name="openModeFlags">OpenModeFlags for RopOpenMessage.</param> /// <returns>The response of RopOpenMessage ROP operation.</returns> protected RopOpenMessageResponse OpenMessage(ulong messageId, ulong folderId, MessageOpenModeFlags openModeFlags) { RopOpenFolderRequest openFolderRequest = new RopOpenFolderRequest { RopId = (byte)RopId.RopOpenFolder, LogonId = Constants.CommonLogonId, InputHandleIndex = Constants.CommonInputHandleIndex, OutputHandleIndex = Constants.CommonOutputHandleIndex, OpenModeFlags = (byte)FolderOpenModeFlags.None, FolderId = folderId }; RopOpenFolderResponse openFolderResponse = this.Adapter.OpenFolder(openFolderRequest, this.LogonHandle, ref this.responseHandles); uint folderHandle = this.responseHandles[0][openFolderResponse.OutputHandleIndex]; RopOpenMessageRequest openMessageRequest = new RopOpenMessageRequest(); object ropResponse = null; openMessageRequest.RopId = (byte)RopId.RopOpenMessage; openMessageRequest.LogonId = Constants.CommonLogonId; openMessageRequest.InputHandleIndex = Constants.CommonInputHandleIndex; openMessageRequest.OutputHandleIndex = Constants.CommonOutputHandleIndex; openMessageRequest.OpenModeFlags = (byte)openModeFlags; openMessageRequest.FolderId = folderId; openMessageRequest.MessageId = messageId; openMessageRequest.CodePageId = 0x0fff; this.Adapter.DoRopCall(openMessageRequest, folderHandle, ref ropResponse, ref this.responseHandles); return((RopOpenMessageResponse)ropResponse); }
/// <summary> /// Open a specific message. /// </summary> /// <param name="folderId">The folder Id of specific folder that contains specific message.</param> /// <param name="messageId">The message id of specific message.</param> /// <param name="objectHandle">A Server object handle.</param> /// <param name="openFlags">The OpenModeFlags value.</param> /// <returns>A Server object handle of specific message.</returns> protected uint OpenSpecificMessage(ulong folderId, ulong messageId, uint objectHandle, MessageOpenModeFlags openFlags) { RopOpenMessageResponse openMessageResponse; return this.OpenSpecificMessage(folderId, messageId, objectHandle, openFlags, out openMessageResponse); }