Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
kthomp24 Absent Member.
Absent Member.
2020 views

Calling Web Browser from Thin Client

Jump to solution

I have the below in a project:

77 SW-SHOW   USAGE IS UNSIGNED-INT  VALUE IS 5.
01 OPEN-COMMAND.
     05 FILLER           PIC  X(04)   VALUE IS "OPEN".
     05 FILLER           PIC  X(01)   VALUE IS X"00".

01 WS-ADDRESS    PIC X(250) VALUE "http:\\www.google.com".

-----------------------------------------------------------------------------

           CALL "@[DISPLAY]:shell32.dll".
           CALL "@[DISPLAY]:ShellExecuteA" USING
                BY VALUE 0,
                BY REFERENCE OPEN-COMMAND,
                BY REFERENCE WS-ADDRESS,
                NULL,
                NULL,
                BY VALUE SW-SHOW.
           CANCEL "@[DISPLAY]:ShellExecuteA".
           CANCEL "@[DISPLAY]:shell32.dll".

When this logic is called from a desktop application (minus the @[DISPLAY]:) it works perfectly, logic hits and web browser is opened to the correct page.  Once we add the @[DISPLAY]: to the statements and call this program using Thin Client it will pull up the web browser to the correct page, but the application hangs and never gets to the first CANCEL statement.

Does anyone have any clues as to what might be the issue?

0 Likes
1 Solution

Accepted Solutions
kthomp24 Absent Member.
Absent Member.

RE: Calling Web Browser from Thin Client

Jump to solution

Thanks for all that thought about an answer...we did figure out our issue.

Thanks.

View solution in original post

0 Likes
4 Replies
kthomp24 Absent Member.
Absent Member.

RE: Calling Web Browser from Thin Client

Jump to solution

Thanks for all that thought about an answer...we did figure out our issue.

Thanks.

View solution in original post

0 Likes
buggabill Absent Member.
Absent Member.

RE: Calling Web Browser from Thin Client

Jump to solution

I was wondering if you cared to share what your solution was so that if I or others had the same problem in the future, we could look to this post for some answers.  Thanks!

0 Likes
kthomp24 Absent Member.
Absent Member.

RE: Calling Web Browser from Thin Client

Jump to solution

We needed to add the following line before the CALL to shell32.dll:

          SET ENVIRONMENT "DLL-CONVENTION" TO 1.

0 Likes
buggabill Absent Member.
Absent Member.

RE: Calling Web Browser from Thin Client

Jump to solution

There is another way as well that worked for us.  I cannot remember where it was suggested whether on the forum here or in an incident report, but doing the call to load the dll with the @WINAPI at the end like so:

77 SW-SHOW   USAGE IS UNSIGNED-INT  VALUE IS 5.
01 OPEN-COMMAND.
     05 FILLER           PIC  X(04)   VALUE IS "OPEN".
     05 FILLER           PIC  X(01)   VALUE IS X"00".

01 WS-ADDRESS    PIC X(250) VALUE "http:\\www.google.com".

-----------------------------------------------------------------------------

           CALL "@[DISPLAY]:shell32.dll@WINAPI".
           CALL "@[DISPLAY]:ShellExecuteA" USING
                BY VALUE 0,
                BY REFERENCE OPEN-COMMAND,
                BY REFERENCE WS-ADDRESS,
                NULL,
                NULL,
                BY VALUE SW-SHOW.
           CANCEL "@[DISPLAY]:ShellExecuteA".
           CANCEL "@[DISPLAY]:shell32.dll".


works very well for us and gets rid of the need to set DLL_CONVENTION to a 1.  It also seemed to be a bit more reliable as well.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.