docs

Home All functions Categories

vuShell(FileName)

vuShell(*CSTRING), Long

Description

Runs a file with its associated executable. For example, opening a Word document will launch Microsoft Word.

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
FileName *CSTRING Fully qualified path and name of the file to run.

CSTRING size note: The CSTRING(260) declaration in the example is illustrative, but vuShell() copies the filename into an internal %MAX_PATH buffer. Declaring a larger caller-side CSTRING will not increase that internal capacity. See CSTRING Sizes and Buffer Capacity.

Returns

A LONG value containing the instance handle of the application that was run.

Example

FileName  CSTRING(260)
AppHandle LONG

FileName = 'MyDocument.doc'
AppHandle = vuShell(FileName)

IF AppHandle
  MESSAGE('Application launched successfully.')
ELSE
  MESSAGE('Failed to launch application.')
END

Notes

Home All functions Categories