Admin Production ni-theme
Current Publication

OpenDocumentInDefaultViewer

LabWindows/CVI

OpenDocumentInDefaultViewer

int OpenDocumentInDefaultViewer (const char documentFilename[], int windowDisplay);

Purpose

Opens a document in its default viewer. This function has the same effect as double–clicking a document in Windows Explorer.

You can register file types and their default viewers in Windows Explorer by selecting the File Types tab in the Folder Options dialog box.

Parameters

Input
Name Type Description
documentFilename const char[] The full path to the document that you want to open.
windowDisplay int Specifies how the document will be opened.

Return Value

Name Type Description
status int Returns 0 if the function succeeds. Otherwise, returns a toolbox error code.

Additional Information

Library: Programmer's Toolbox

Include file: toolbox\toolbox.h

LabWindows/CVI compatibility: LabWindows/CVI 6.0 and later

Example

Refer to activex\word\wordrpt.cws for an example of using the OpenDocumentInDefaultViewer function.