pdfCreateLaunchAction
Create an action that launches an external application or file.
| Exported names | pdfCreateLaunchAction (bare = ANSI) |
|---|---|
| Availability | Partial — compatibility parameters — see Remarks |
Purpose — Create an action that launches an external application or file.
Description — Registers action kind 5 with NewWindow in a and FileName in Text.
Declarations
int32_t __stdcall pdfCreateLaunchAction(PPDF IPDF, int32_t OP, const char* FileName, const char* DefDir, const char* Param, BOOL32 NewWindow);
function pdfCreateLaunchAction(const IPDF: PPDF; OP: Integer; const FileName, DefDir, Param: PAnsiChar; NewWindow: LongBool): Integer; stdcall; external 'LumasPdf.dll';
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle. |
OP | Integer | Accepted for ABI compatibility; not read — see Remarks. |
FileName | PAnsiChar | Target file/application path — stored and serialized. |
DefDir | PAnsiChar | Accepted for ABI compatibility; not read — see Remarks. |
Param | PAnsiChar | Accepted for ABI compatibility; not read — see Remarks. |
NewWindow | BOOL32 | Stored and serialized. |
Return value — 1-based action handle (> 0), or 0 on an invalid handle.
Remarks — compatibility parameters. OP, DefDir, and Param are accepted to match the reference ABI signature but are discarded: only FileName and NewWindow reach the stored action and the serialized /Launch dictionary. If you need a default directory or launch parameters encoded, they are not representable through this call in the current engine. Use pdfCreateLaunchActionEx for the simpler two-argument form with the same effective behavior.
See also — pdfCreateLaunchActionEx
C# (P/Invoke)
public static extern int pdfCreateLaunchAction(IntPtr IPDF, int OP, [MarshalAs(UnmanagedType.LPStr)] string FileName, [MarshalAs(UnmanagedType.LPStr)] string DefDir, [MarshalAs(UnmanagedType.LPStr)] string Param, [MarshalAs(UnmanagedType.Bool)] bool NewWindow);
Object Creation
pdfCreateLaunchAction
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.