Closed
Bug 228576
Opened 22 years ago
Closed 14 years ago
[ActiveX] Can't read PostData with 'BeforeNavigate2' function
Categories
(Core Graveyard :: Embedding: ActiveX Wrapper, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: oblottin, Unassigned)
References
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.5) Gecko/20031007
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.5) Gecko/20031007
I write a program with Delphi. I use last version of Mozilla ActiveX Component
(v1.5). With a call of 'BeforeNavigate2' function, i don't know how to read
values of PostData. Type of PostData is OleVariant. I send POST data is my HTML
page. Impossible to read as string. With IE component my tests are OK. What's
the problem.
PS : My english is not good (i'm french).
Reproducible: Always
Steps to Reproduce:
Delphi code :
-------------
procedure TfrmNavigation.BrowserBeforeNavigate2(ASender: TObject; const pDisp:
IDispatch; var URL, Flags, TargetFrameName, PostData, Headers: OleVariant; var
Cancel: WordBool);
var
data : string;
begin
data := {unknow_function} (PostData) // how to convert postdata as string ?
ShowMessage (data);
end;
Actual Results:
nothing, empty
Comment 1•22 years ago
|
||
*** Bug 228575 has been marked as a duplicate of this bug. ***
Updated•22 years ago
|
Severity: blocker → normal
The variant should be a 1 dimensional SAFEARRAY of bytes but currently it is not
supplied in the call to BeforeNavigate2. There is a TODO in
CWebBrowserContainer::OnStartURIOpen for that.
The Navigate2 *does* support postdata however.
Relevant Documentation:
http://msdn.microsoft.com/workshop/browser/webbrowser/reference/ifaces/iwebbrowser2/navigate2.asp
http://support.microsoft.com/default.aspx?kbid=174923
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Can't read PostData with 'BeforeNavigate2' function → [ActiveX] Can't read PostData with 'BeforeNavigate2' function
try something like this:
PostVari := PostData; //Put the OleVariant to Variant
i := 0;
StrPostData := '';
if VarIsArray(PostData) then
begin
for I := 0 to VarArrayHighBound(PostData, 1) do
begin
try
//ShowMessage(intToStr(vartype(PostVari[i])));
bch := PostVari[i]; //read byte from Variant and force it to byte
except
bch := 0;
end;
if bch = 0 then break; // NULL Terminator or exception better get out of here
strpostdata := strpostdata + Chr(bch); //Add each Byte to StrPostData as string
end;
Body.Lines.Text := strpostdata;
// verb auf POST setzen, wenn POST daten vorhanden
Name.Text := 'POST';
end
Updated•16 years ago
|
QA Contact: dunn5557 → activex
Comment 4•14 years ago
|
||
The ActiveX embedding API was removed in bug 662023 and friends, making this INVALID.
[Filter bugspam on activexinvalid]
Assignee: adamlock → nobody
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → INVALID
| Assignee | ||
Updated•13 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•