HTTP alternative ?

HTTP alternative ?

Postby TimStone » Fri Aug 01, 2014 7:21 pm

Consider the following code:

Code: Select all  Expand view


            Local oHttp:=TIpClientHttp():new("https://www.testserver.com/1", .F. )    

            IF .NOT. oHttp:open()
                        MsgAlert( "Connection error:", oHttp:lastErrorMessage( ) )
                        RETURN
            ENDIF

            oHttp:Post( cXml)

            cRet :=  oHttp:readAll( )
            oHttp:close()

 


This code works fine with xHarbour.com, and with my FWH / Harbour / VC 2013 builds ( using UE Studio makefile ).

It also builds inside Visual Studio 2013. However, when I try to then start the program in which it is linked, I get an error:
The procedure entry point BIO_clear_flags could not be located in the dynamic link library ..... ( the path to the .exe I'm trying to run ).

By commenting out just this code, all is fine.

My build uses hbtipssl.lib which is where I believe the class is contained. Perhaps there is another library that I should be using for this to be OK.

Any ideas on this issue would be greatly appreciated. Also, any suggestions for an althernative approach would be appreciated.

Using FWH 14.06 / Harbour / Visual Studio 2013 Pro.

Thanks everyone.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2909
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: HTTP alternative ?

Postby Antonio Linares » Sat Aug 02, 2014 2:25 am

Tim,

Please analize your EXE using PEinfo.exe:

https://bitbucket.org/fivetech/fivewin-contributions/downloads/peinfo.exe

And review the imports section. There BIO_clear_flags should appear imported from a module, and thats the module that we are looking for :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41396
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: HTTP alternative ?

Postby Rick Lipkin » Sat Aug 02, 2014 1:38 pm

Tim

Are you just trying to automate code to open a website ?? If so, consider this code using active X and Internet Explorer.

Rick lipkin

Code: Select all  Expand view


Local IE

TRY
   IE := CreateObject("InternetExplorer.Application")
CATCH
      try
         IE:Quit()
     catch
     end try
 
     SysReFresh()
     RETURN(.F.)
END TRY

IE:Visible := .t.   // or false if you do not want the browser to show

cUrl := "https://www.testserver.com/1"

IE:Navigate( cURL )

Do While IE:Readystate <> 4
   SysWait(1)
   SysRefresh()
   Loop
Enddo

// do what you want to do
//
//

IE:Quit()

Return(nil)
 
User avatar
Rick Lipkin
 
Posts: 2634
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: HTTP alternative ?

Postby Enrico Maria Giordano » Sat Aug 02, 2014 1:44 pm

Rick,

Rick Lipkin wrote:
Code: Select all  Expand view
Do While IE:Readystate <> 4
   SysWait(1)
   SysRefresh()
   Loop
Enddo


Loop statement is redundant here. :-)

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8372
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: HTTP alternative ?

Postby TimStone » Sat Aug 02, 2014 2:41 pm

Please note I am transacting with this webstie. The code is opening the site ( not visible) posting an XML doc, then reading the response and opening the web browser to view the result.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2909
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: HTTP alternative ?

Postby TimStone » Sat Aug 02, 2014 8:05 pm

The problem is pretty well defined.

Using the code in my original post, I receive an error entering BIO_clear_flags. Using PE, I do not see this referenced at all in the .exe.

Considering all of the factors involved, the BIO_clear_flags appears related to the OpenSSL standard, and may have it's roots there. I'm thinking there is a .lib file missing, or incorrect, within the harbour files.

Further thoughts would be appreciated.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2909
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: HTTP alternative ?

Postby Antonio Linares » Sat Aug 02, 2014 8:45 pm

Tim,

If you send me your EXE I will review it here. Without inspecting it myself I can't think of any other reason for such error.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41396
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: HTTP alternative ?

Postby Antonio Linares » Sun Aug 03, 2014 10:59 pm

Tim,

Here it is:

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41396
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: HTTP alternative ?

Postby Antonio Linares » Sun Aug 03, 2014 11:01 pm

Tim,

If you are linking a libeay32.lib, then it seems as you are using a wrong one
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41396
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: HTTP alternative ?

Postby TimStone » Mon Aug 04, 2014 12:31 am

It would appear I have to match the .lib and .dll files ...

I've been working on it ... need to get beyond this issue.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2909
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: HTTP alternative ?

Postby Antonio Linares » Mon Aug 04, 2014 3:31 am

Tim,

As libeay32.lib is an import library (it does not contain code, only references to the DLL), we can easily build it from libeay32.dll :-)

Remember:

implib.exe libeay32.lib libeay32.dll
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41396
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: HTTP alternative ?

Postby TimStone » Mon Aug 04, 2014 3:22 pm

Remember, we are working with Microsoft Visual Studio here ...
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2909
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: HTTP alternative ?

Postby Antonio Linares » Mon Aug 04, 2014 4:14 pm

Tim,

Where did you get your libeay32.lib from ? Is it the one from Visual Studio ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41396
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: HTTP alternative ?

Postby TimStone » Mon Aug 04, 2014 4:40 pm

I'm having a hard time finding where it originally came from.

You sent me the hb_ssl.lib file which requires it. It comes with ssleay32.lib also.

It is NOT included in any of the Microsoft distribution files.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2909
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: HTTP alternative ?

Postby TimStone » Mon Aug 04, 2014 4:42 pm

I will start a new thread and see if we can find the origin in our usage.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2909
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Eroni, Horizon and 34 guests