API referenceCore SDK

pdfCreateLaunchActionEx

Create a launch action from just a file name and new-window

Exported namespdfCreateLaunchActionExA, pdfCreateLaunchActionExW

Purpose — Create a launch action from just a file name and new-window flag (no OS/parameter fields).

Description — Registers action kind 5, identical stored shape to pdfCreateLaunchAction minus the always-dropped OP/DefDir/Param parameters — this is the simpler entry point since it does not advertise fields it will not use.

Declarations

C
int32_t __stdcall pdfCreateLaunchActionExA(PPDF IPDF, const char* FileName, BOOL32 NewWindow);
int32_t __stdcall pdfCreateLaunchActionExW(PPDF IPDF, const wchar_t* FileName, BOOL32 NewWindow);
Delphi
function pdfCreateLaunchActionExA(const IPDF: PPDF; const FileName: PAnsiChar; NewWindow: LongBool): Integer; stdcall; external 'LumasPdf.dll';
function pdfCreateLaunchActionExW(const IPDF: PPDF; const FileName: PWideChar; NewWindow: LongBool): Integer; stdcall; external 'LumasPdf.dll';

Parameters

ParameterTypeDescription
IPDFPPDFInstance handle.
FileNamestringTarget file/application path.
NewWindowBOOL32Stored and serialized.

Return value — 1-based action handle (> 0), or 0 on an invalid handle.

See alsopdfCreateLaunchAction

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfCreateLaunchActionExA(IntPtr IPDF, [MarshalAs(UnmanagedType.LPStr)] string FileName, [MarshalAs(UnmanagedType.Bool)] bool NewWindow);
public static extern int pdfCreateLaunchActionExW(IntPtr IPDF, [MarshalAs(UnmanagedType.LPWStr)] string FileName, [MarshalAs(UnmanagedType.Bool)] bool NewWindow);
Area
Core SDK
Category

Object Creation

Exported names

pdfCreateLaunchActionExA pdfCreateLaunchActionExW

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.