1. Vijay Jha
  2. PowerBuilder
  3. Wednesday, 21 December 2022 12:47 PM UTC

Hey there,

 

I was using below in an event to launch an URL in a report window

inet iinet_base

GetContextService("Internet", iinet_base)

iinet_base.HyperlinkToURL()

 

but, as INET is an obsolete our client doesn't want this to continue and therefore we are looking for the replacement. we are using PB 2022 build 1878 and came to know that HTTPClinet will be the replacement although there is no replacement for HyperLinkToURL() as of now. We tried with GetURL,PostURL and couple of other things like ShellExecute etc but,none of things working. 

Can anyone help me with the sample code , if possible ?

I dont want anything related with default browser etc. as what we want is to open a link in any browser alternatively, we are okay to put a pdf and a link to that report.

 

I also tried couple of solution given by appeon folks and unfortunately, no luck :(

 

Thanks

Vijay Jha Accepted Answer Pending Moderation
  1. Wednesday, 28 December 2022 05:21 AM UTC
  2. PowerBuilder
  3. # 1

Hi John Fauss ,
I have one concern with your solution, like you used ieframe.dll for IE Browser and now we are making changes for MSEDGE. When I am making changes for MSEDGE it is working all good even with ieframe.dll. I tried connecting with MS for the corresponding DLL for MSEDGE but, could not get the same.
Do you have any suggestion on the same ?
Currently I am creating function taking MSEDGE.EXE into consideration and using the same IEFRAME.DLL and it is working :)
Thanks.

Comment
  1. John Fauss
  2. Wednesday, 28 December 2022 18:12 PM UTC
I'm not entirely sure I understand your question/concern. The only mention of ieframe.dll in the CodeXchange sample app is to handle a special case where, for unknown reasons, Windows MAY report the default browser as an entry point in the Windows system DLL named "ieframe.dll", but I believe this occurs only in certain cases when Internet Explorer is the user's default web browser application. I have NO idea why Windows does this or under what conditions it does this, I only know it can happen. That is why I checked this special condition in the code and substitute "iexplore.exe" for the name of the default web browser application if and when it occurs.

I tried to be extremely clear both in the write-up and in the code that my ability to extensively test the sample application under many conditions was (and is) limited. Therefore, you need to test it rigorously under the same conditions as what your customers use. However, if you do find a problem and can describe the circumstances and conditions under which the problem occurs, I would be very interested and appreciative of learning those details.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 21 December 2022 12:58 PM UTC
  2. PowerBuilder
  3. # 2

Hi Vijay;

  The HyperLinkToURL command replacement will be a new feature in the upcoming PB 2022 R2 release coming out next year.

  PS: the GetContextService() approach is the very old EAServer way of coding. That was replaced long ago by using the standard Create() command. For example:

Inet  lo_inet 

lo_Inet = Create inet 

Regards ... Chris 

Comment
  1. John Fauss
  2. Wednesday, 21 December 2022 14:29 PM UTC
@Vijay - I believe you're making this way too hard for yourself. See my response to your other, recent question. Obtain the path and name of the user's default browser application, then use the PowerScript Run function or Roland's RunAndWait (ShellExecuteEx Windows API function) to run the browser application and pass it the path/name of the PDF file. The example program I noted in your other thread does exactly this, mimicking a Hyperlink control.
  1. Helpful 4
  1. Vijay Jha
  2. Monday, 26 December 2022 08:36 AM UTC
Hi John,

Today I have created a function similar you attached in my previous question f_getdefaultwebbrowser() and updated my event with Run function. Our URL is opening as expected now and its working. We are waiting for the final confirmation from our client. Lets see if we can go with this and can wait for the replacment of hyperlinktourl() in R2 next year :)

Thanks for all the support , Thank you Chris, Armeen,Roland.
  1. Helpful
  1. Vijay Jha
  2. Wednesday, 28 December 2022 05:20 AM UTC
Hi John Fauss ,

I have one concern with your solution, like you used ieframe.dll for IE Browser and now we are making changes for MSEDGE. When I am making changes for MSEDGE it is working all good even with ieframe.dll. I tried connecting with MS for the corresponding DLL for MSEDGE but, could not get the same.

Do you have any suggestion on the same ?

Currently I am creating function taking MSEDGE.EXE into consideration and using the same IEFRAME.DLL and it is working :)

Thanks.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.