3.5.4.1 CHICreateHtml

The CHICreateHtml method takes a file passed as an array of bytes and converts the file into HTML, which is displayed by the specified type of browser.

     CreateHtmlInfo CHICreateHtml(String strLauncherUri, 
                         Byte[] rgbFile, 
                         BrowserType bt, 
                         String strReqFile, 
                         String strTaskName, 
                         Int32 timeout, 
                         bool fReturnFileBits);

strLauncherUri: The URL of the launcher service that performs the conversion. This parameter MUST be set to a value that is 260 or fewer characters in length, and MUST be the URL of a launcher service that implements the IHtmlTrLauncher interface.

rgbFile: The file to be converted. This parameter MUST be set to a non-null value.

bt: The type of browser in which the result file is displayed.

strReqFile: The URL of the file being converted. This parameter MUST be set to a non-null value, MUST be 260 or fewer characters in length, MUST end with a file extension, and MUST NOT contain any of the characters specified in Section 2.2.

strTaskName: The name of the conversion task. This parameter MUST be set to a non-empty value and MUST be 270 or fewer characters in length.

timeout: The number of seconds that the launcher service MUST wait for the conversion application to complete before canceling the conversion. The launcher service MUST cancel the conversion if the conversion application does not complete in the specified amount of time. This parameter MUST be set to a value greater than 0 and less than or equal to 1800.

fReturnFileBits: Specifies whether to return the result file in the m_rgbMainFile member of the CreateHtmlInfo common data type returned by the method. If this parameter is set to true, the result file MUST be returned in the m_rgbMainFile member. If this parameter is set to false, the result file MUST NOT be returned.

Return Value: A CreateHtmlInfo object with information about the result of the conversion. This method MUST return a non-null value. The m_ce property MUST be set to CE_OTHER, which indicates that the conversion failed. As mentioned in section 3.5, this interface is deprecated.

Exceptions Thrown: No exceptions are thrown beyond those thrown by the .NET Remoting Core Protocol as specified in [MS-NRTP].