'KCMLDdeLoad(sModule$, sProgram$)

Checks to see if the server sModule$ is running, if not it launches the program sProgram$.

Deprecated

This function is deprecated and may be removed in a future release.

Arguments

STR()sModule$[in] Server module.
STR()sProgram$[in] Server executable.

Returns

If successful, this function will return 0. If an error occurs, then -1 is returned.

Syntax

The following definition is built into KCML. You do not have to include it in your own code.

$DECLARE 'KCMLDdeLoad(STR(), STR())

Remarks

This checks to see if the server module$ is running, if not it launches the program program$. Unless this call is made to load the appropriate DDE server, then any attempt to open a conversation will fail. If the program is not already loaded, then the function will attempt to find it, searching in the following places (in order):

  1. The current directory
  2. The Windows directory
  3. The Windows SYSTEM directory
  4. The directory containing the executable file for the current task
  5. The directories listed in the PATH environment variable
  6. Any directories mapped in a network

Kclient will attempt to load the program and display it as an icon. If you wish to load the program normally, or maximised (full screen) you can $DECLARE the WinExec() API call.

Example

The following example will attempt to load Microsoft Excel:

ret = 'KCMLDdeLoad("excel", "excel.exe")
IF ret == 0 THEN PRINT "Loaded OK" : ELSE PRINT "Cannot load"

Further Information

IntroducedKCML 5.00
CompatibilityKClient

See Also

KCMLDDEServerInit, KCMLDdeAddTopic, KCMLDdeClose, KCMLDdeDestroy, KCMLDdeExec, KCMLDdeInit, KCMLDdeOpen, KCMLDdePoke, KCMLDdeRequest

Index of internal $DECLARE functions