docs

Home All functions Categories

vuShellExDelay(pFile, pParams, pWork, ShowCmd, DelayMS)

vuShellExDelay(*CSTRING pFile, *CSTRING pParams, *CSTRING pWork, LONG ShowCmd, LONG DelayMS), LONG

Description

Runs an external program using the Windows shell with optional parameters and working directory after a specified delay.

Function Separate File/Params Working Folder Delay Wait Notes
vuShell No No No No Simple shell launch that honors Windows file associations.
vuShellDelay No No Yes No Shell launch after a startup delay.
vuShellEx Yes Yes No No Preferred shell launch when you want file and parameters passed separately.
vuShellExDelay Yes Yes Yes No Shell launch with separate parameters plus startup delay.

Parameters

Parameter Data Type Description
pFile *CSTRING Path to the file or executable to run.
pParams *CSTRING Optional command-line parameters to pass.
pWork *CSTRING Working directory for the process.
ShowCmd LONG Window show mode (see Windows SW_* constants).
DelayMS LONG Delay in milliseconds before the launch begins.

CSTRING size note: CSTRING(1024) in this example is a caller-side declaration, not an unlimited-length guarantee. This function copies the relevant path, parameter, or working-folder text into internal 1,024-byte null-terminated buffer(s), so each copied value must fit (up to 1,023 characters plus its null byte). Longer input may be truncated; Windows can impose additional restrictions. See CSTRING Sizes and Buffer Capacity.

Returns

A LONG value indicating the result:

Example

FilePath   CSTRING(1024)
Params     CSTRING(1024)
WorkFolder CSTRING(1024)
ShowCmd    LONG
DelayMS    LONG
Ret        LONG

FilePath   = 'C:\Temp\Readme.txt'
Params     = ''
WorkFolder = ''
ShowCmd    = 1
DelayMS    = 1500

Ret = vuShellExDelay(FilePath, Params, WorkFolder, ShowCmd, DelayMS)

Notes

Home All functions Categories