SetOutlineOpenFileA

Outlines

Description

The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to SetOutlineOpenFile and string arguments are interpreted using the current SetAnsiMode code page

Sets the outline item (bookmark) to open a file when it is clicked.

Syntax

Delphi

Function DLSetOutlineOpenFileA(InstanceID, OutlineID: Integer; FileName: PAnsiChar): Integer;

DLL

int DLSetOutlineOpenFileA(int InstanceID, int OutlineID, const char * FileName);

Parameters

OutlineIDThe ID of the outline as returned by the NewOutline function. Alternatively, use the GetOutlineID function to get a valid outline ID.
FileNameThe file to open when the outline is clicked. This should be in a specific format. Back slashes should be converted to forward slashes and the drive, if any, should be specified as just the drive letter between forward slashes without a colon. For example, the file "c:\my documents\hello.pdf" should be specified as "/c/my documents/hello.pdf". Relative path names are valid, including paths that include the ".." operator to move up a directory.

Return values

0The OutlineID was invalid
1The outline destination was set successfully