ShellExecute in Multi DLL APP not Compiling

As Bruce said the Shellex:Xxxx CSTRING() variables need to be defined some place in scope in the APP. Likely you made them Global. Find them where they work in the other APPs.

IMO there is no need to passGetDesktopWindow() for Window Handle, you can pass a Zero. Another improvement would be to place the 4+ ShellEx: variables inside a GROUP so you can CLEAR(Shellex:Group) to clear them All and not miss one.


Since you are including CWUtil you can call it’s Shell Execute wrapper function OpenUrlLink() which I pasted below so you can see how it works and the parameters. I think you could call as OpenUrlLink('tel:'&CLIP(AGD:TEL), False). This will not pass Show as 3 to Maximize so a bit different but fine IMO.

Rather than define your ShellEx CSTRING variables and call the API Shell Execute what I usually do is create a wrapper function of my own, like below, so I can pass STRINGs and deal with the CSTRINGs in that one procedure.

OpenUrlLink PROCEDURE(STRING urlLink,BYTE forceHttp=1,<STRING path>, <STRING params>)
lWHandle         LONG
lOperation       CSTRING(255)
lFileUrl         CSTRING(255)
lPath            CSTRING(255)
lParam           CSTRING(255)
lShowCmd         LONG(1)
lRetVal          ULONG
 CODE
    IF LEFT(UPPER(urlLink),4)<>'HTTP' AND forceHttp
       lFileUrl    = 'http://'&clip(urlLink)
    ELSE
       lFileUrl    = clip(urlLink)
    END
    lWHandle    = 0{PROP:Handle}!Get the handle of the current window
    lOperation  = 'Open'    
    lPath       = path
    lParam      = params
    lShowCmd    = 1
    lRetVal = SV_ShellExecuteURL(lWHandle,lOperation,lFileUrl,lParam,lPath,lShowCmd)
    
    RETURN lRetVal