pdfCreateLaunchActionEx
Create a launch action from just a file name and new-window
| Exported names | pdfCreateLaunchActionExA, 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
int32_t __stdcall pdfCreateLaunchActionExA(PPDF IPDF, const char* FileName, BOOL32 NewWindow);
int32_t __stdcall pdfCreateLaunchActionExW(PPDF IPDF, const wchar_t* FileName, BOOL32 NewWindow);
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
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle. |
FileName | string | Target file/application path. |
NewWindow | BOOL32 | Stored and serialized. |
Return value — 1-based action handle (> 0), or 0 on an invalid handle.
See also — pdfCreateLaunchAction
C# (P/Invoke)
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);
Object Creation
pdfCreateLaunchActionExA
pdfCreateLaunchActionExW
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.