Microsoft.Protocols.TestSuites.MS_OXORULE.MS_OXORULEAdapter.RopCreateFolder C# (CSharp) Method

RopCreateFolder() public method

This ROP creates a new subfolder.
public RopCreateFolder ( uint handle, string displayName, string comment, RopCreateFolderResponse &createFolderResponse ) : uint
handle uint Handle to operate.
displayName string This value specifies the name of the created folder. .
comment string This value specifies the folder comment that is associated with the created folder.
createFolderResponse Microsoft.Protocols.TestSuites.Common.RopCreateFolderResponse Response of this ROP.
return uint
        public uint RopCreateFolder(uint handle, string displayName, string comment, out RopCreateFolderResponse createFolderResponse)
        {
            this.rawData = null;
            this.response = null;
            this.responseSOHs = null;

            RopCreateFolderRequest createFolderRequest;

            createFolderRequest.RopId = 0x1C;
            createFolderRequest.LogonId = 0x0;
            createFolderRequest.InputHandleIndex = 0x0;
            createFolderRequest.OutputHandleIndex = 0x01;

            // Generic folder
            createFolderRequest.FolderType = 0x01;

            // FALSE
            createFolderRequest.UseUnicodeStrings = 0x0;

            // non-zero(TRUE)
            createFolderRequest.OpenExisting = 0xFF;

            // FALSE
            createFolderRequest.Reserved = 0x0;
            createFolderRequest.DisplayName = Encoding.ASCII.GetBytes(displayName + "\0");
            createFolderRequest.Comment = Encoding.ASCII.GetBytes(comment + "\0");
            this.responseSOHs = this.DoRPCCall(createFolderRequest, handle, ref this.response, ref this.rawData);
            createFolderResponse = (RopCreateFolderResponse)this.response;
            uint folderHandle = this.responseSOHs[0][createFolderResponse.OutputHandleIndex];

            return folderHandle;
        }