Advertisement

07.05.2008 at 05:56AM PDT, ID: 23540587
[x]
Attachment Details

loging and retrieve some data from SSL enabled site

Asked by ozi_lion in Delphi Programming, Delphi Programming Language

Tags: Delphi, Pascal, FireFox3, IE7, TWebBrowser, https://www.turkiyefinans.com.tr/isube/gn.html

Hello,

I am trying to login and retriving some data from my application using TWebBrowser component. The page i am trying to login is SSL site and has frames in its html. I have used the solution on this thread [url]http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_20317800.html#a7123963[/url] and managed to send data to standart html coded pages and itsnot important whether its SSL enabled but this time i get error "Access violation at address .." error at the line "OleCheck(pDispatch.QueryInterface(IID_IHTMLFormElement, FormElement));" and process is stopping. I have tried to modify the code for frames as below

function FillFrameFormField(Browser:TWebBrowser; FieldName, FieldValue: String): Boolean;
var WebDoc : IHTMLDocument2;
    pDispatch : IDISPATCH;
    FormCollection : IHTMLFramesCollection2;
    FormElement : IHTMLFormElement;
    FormItem : IHTMLElement;
    InputElement : IHTMLInputElement;
begin
     Result:=FALSE;
     OleCheck(Browser.Document.QueryInterface(IID_IHTMLDocument2, WebDoc));
     FormCollection := WebDoc.Get_Frames;
     pDispatch := FormCollection.item(0);
     OleCheck(pDispatch.QueryInterface(IID_IHTMLFrameElement, FormElement));
     pDispatch := FormElement.item(FieldName, 0);
     OleCheck(pDispatch.QueryInterface(IID_IHTMLFrameSetElement, FormItem));
     if FormItem.QueryInterface(IID_IHTMLInputElement, InputElement) = 0 then
     begin
        if InputElement.Get_type_ = 'text' then begin
           InputElement.Set_value(FieldValue);
           Result:=TRUE;
        end;
     end;
end;
 
but when i compile the code it gives eror of " [DCC Error] UWeb.pas(76): E2033 Types of actual and formal var parameters must be identical " at line "pDispatch := FormCollection.item(0);"

if anyone can help me on this i will be very appricated.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
function FillFormField(Browser:TWebBrowser; FieldName, FieldValue: String): Boolean;
var WebDoc : IHTMLDocument2;
    pDispatch : IDISPATCH;
    FormCollection : IHTMLElementCollection;
    FormElement : IHTMLFormElement;
    FormItem : IHTMLElement;
    InputElement : IHTMLInputElement;
begin
     Result:=FALSE;
     OleCheck(Browser.Document.QueryInterface(IID_IHTMLDocument2, WebDoc));
     FormCollection := WebDoc.Get_forms;
     pDispatch := FormCollection.item(0, 0);
     OleCheck(pDispatch.QueryInterface(IID_IHTMLFormElement, FormElement));
     pDispatch := FormElement.item(FieldName, 0);
     OleCheck(pDispatch.QueryInterface(IID_IHTMLElement, FormItem));
     if FormItem.QueryInterface(IID_IHTMLInputElement, InputElement) = 0 then
     begin
        if InputElement.Get_type_ = 'text' then begin
           InputElement.Set_value(FieldValue);
           Result:=TRUE;
        end;
     end;
end;
 
Keywords: loging and retrieve some data from SS…
 
Loading Advertisement...
 
[+][-]07.07.2008 at 12:18AM PDT, ID: 21943151

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.10.2008 at 12:29AM PDT, ID: 21971176

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.10.2008 at 01:08AM PDT, ID: 21971312

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.17.2008 at 03:12AM PDT, ID: 22023860

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.17.2008 at 03:19AM PDT, ID: 22023886

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.17.2008 at 09:05AM PDT, ID: 22026968

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Delphi Programming, Delphi Programming Language
Tags: Delphi, Pascal, FireFox3, IE7, TWebBrowser, https://www.turkiyefinans.com.tr/isube/gn.html
Sign Up Now!
Solution Provided By: ziolko
Participating Experts: 1
Solution Grade: B
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628