Share via


CHICreateHtml(String, Byte[], Microsoft.HtmlTrans.BrowserType, String, String, Int32, Boolean) Method

The CHICreateHtml method of the IHtmlTrLauncher interface starts the process of converting a document to HTML format for viewing in the browser by a user who does not have the appropriate client application or viewer installed.

Parameters

strLauncherUri   Specifies the server hosting the launcher application by using the value returned by the StrGetLauncher method of the IHtmlTrLoadBalancer interface.

rgbFile   The binary contents of the source file.

bt   Specifies the target browser type by using a constant from the BrowserType enumeration.

strReqFile   The URL of the document to convert.

strTaskName   The document conversion task name, which the load balancer uses to keep track of the request.

timeout   The time in seconds before the document conversion times out.

fReturnFileBits   Specifies whether to return the binary contents of the converted file (that is, the HTML output) in the rgbMainFile and rgrgbThicketFiles properties of the instance of the CreateHtmlInfo class returned by the CHICreateHtml method.

Return Value

Microsoft.HtmlTrans.CreateHtmlInfo The HTML output of the conversion process is returned in an instance of the CreateHtmlInfo class, which also contains information about any conversion error that occurred and about additional supporting files that may be part of the output.

Remarks

The CHICreateHtml method starts the process of converting a document to HTML format and returns the HTML output to Microsoft Windows SharePoint Services to forward to the user.

Example

The following code example shows a simple version of handler page code that calls implementations of the IHtmlTrLoadBalancer and IHtmlTrLauncher interfaces, converts a document by using the CHICreateHtml method, and writes the output of the conversion process to a file.

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security