* :--------------------------------------- * ------------------------: Copybook for CreateShortcut. * : * : See the documentation for details. * :--------------------------------------- * * To use: * * COPY WIN32API. * COPY SHORTCUT. * . * . * ------------------------: Typical call to create a shortcut * : on the desktop to a program * * SET SHCUT-SHOWNORMAL TO TRUE. * MOVE 'C:\MYPROG.EXE' TO SHCUT-TARGET . * MOVE 'Launch MyProgram' TO SHCUT-NAME. * * ------------------------: Call the API to create the shortcut * * SET FUNC-CREATESHORTCUT TO TRUE. * CALL 'GSWINAPI' USING WIN32API-PARMS * SHORTCUT-PARMS * WIN32API-B * WIN32API-C * WIN32API-D * WIN32API-E * WIN32API-F. * * ---------------------------------------------------------------- * * Calling Parameters...: * 01 SHORTCUT-PARMS. * : Show state of the new application. 05 SHCUT-CMDSHOW PIC S9(9) COMP-5 VALUE 1. 88 SHCUT-HIDE VALUE 0. 88 SHCUT-SHOWNORMAL VALUE 1. 88 SHCUT-SHOWMINIMIZED VALUE 2. 88 SHCUT-SHOWMAXIMIZED VALUE 3. 88 SHCUT-SHOWNOACTIVATE VALUE 4. 88 SHCUT-SHOWMINNOACTIVE VALUE 7. * : This is the name of the shortcut file * : (MINUS THE EXTENSION). Its also the * : name that appears on the desktop * : below the shortcut. 05 SHCUT-NAME PIC X(50). * * : This is the directory where the * : shortcut is to be located. * : Leave this low-values to place the * : shortcut on the desktop. * : * : Use the GetFolderPath API to find the * : exact location of common folders. For * : example to have your application start * : each time a user logs in you would use * : GetFolderPath to find the location for * : the user's Startup folder and create * : a link there. * : Will be returned with actual directory 05 SHCUT-LOCATION PIC X(250) VALUE LOW-VALUES. * * : This is the working directory in which * : the program invoked will run. * : Leave it low values to let windows * : decide (usually defaults to the * : windows directory). 05 SHCUT-WORKING-DIR PIC X(250) VALUE LOW-VALUES. * * : This is the path-spec and file name * : of the executable that this shortcut * : invokes. No command tail arguments. * : If left low-values, it will default to * : your main program. * : (This need not be an Exe. Can be any * : file. Such shortcuts launch default * : prog for that particular file type). 05 SHCUT-TARGET PIC X(250) VALUE LOW-VALUES. * * : Command line arguments needed by the * : shortcut are included here. 05 SHCUT-COMMAND-ARGS PIC X(250) VALUE LOW-VALUES. * * : These two fields specify the icon to * : be used for this shortcut. If left * : low-values, the icon will be taken * : from the Target (if any). * : If another exe/dll is listed, windows * : will use the Nth icon in said file. 05 SHCUT-ICON VALUE LOW-VALUES. 10 SHCUT-ICON-FILE PIC X(250). 10 SHCUT-ICON-NUMBER PIC 9(9) COMP-5.