User Guide

466
OLE Automation Function Reference
AddShortcutEx
Adds a shortcut to a particular component or feature. This function is identical to the
AddShortcut function, except that the last parameter is a pointer to a VARIANT type for
VBScript compatibility. The VARIANT type is BSTR.
Function
Prototype
BSTR AddShortcut(short sShortcutType, BSTR szFileOrCommand, BSTR szFeature, BSTR
szName, BSTR szDirectory, BSTR szArgs, BSTR szDescription, BSTR szWorkingDir, long
lHotKey, short sShowWindow, short sIconNumber, BSTR szFeatureComponent, short iType,
BSTR FAR* pszComponentKey)
Parameters sShortcutType:
1 for advertised
2 for file in installation
3 for command line
szFileOrCommand: filekey if file in install or command line
szFeature: feature for advertised shortcut
szName: name of shortcut (as it shows in start menu)
szDirectory: destination directory of shortcut
szArgs: arguments to shortcut call
szDescription: shortcut description
szWorkingDir: working directory of shortcut
lHotKey: hot key
sShowWindow: display for application:
3 for maximized
7 for minimized
sIconNumber: number of icons in .EXE to show
szFeatureComponent: feature or component name to which to add key
iType:
0 for feature
1 for component
pszComponentKey: return value of the component to which registry key was added
Return Value Key to row of new shortcut key