Nov 4th, 2002, 01:20 PM
WebBrowser BeforeNavigate PostData
Is there a way to decipher the actuazl data in the PostData parameter within the before navigate function? I have searched around and it appears that it is a SAFEARRAY structure, but I have yet to figure out how to crack into it.
If someone can crack this problem, I believe it is a path to automating ( or making program internet interface self learning ) the form submission problems that are consistently posted in these forums.
I would also be interested in any other approach in which I can grab the postdata information after the browser has massaged it, but before it sends it out.
Last edited by VBZeroPlus; Nov 5th, 2002 at 11:00 AM.
Dec 13th, 2002, 01:21 PM
In case anyone is interested, the soilution to my question is actually very easy ( in hindsight ). Here is the core to my solution:
Private Sub WebBrowser1_BeforeNavigate2(ByVal pDisp As Object, URL As Variant, Flags As Variant, TargetFrameName As Variant, PostData As Variant, Headers As Variant, Cancel As Boolean)
Dim TestString As String
If Len(PostData) <> 0 Then
Dim MyVar As Variant
MyVar = PostData
If VarType(MyVar) = (vbArray Or vbByte) Then
Dim Bytes() As Byte
Bytes = MyVar
TestString = ""
For Test = 0 To 500
If Bytes(Test) = 0 Then Exit For
TestString = TestString + Chr(Bytes(Test))
Click Here to Expand Forum to Full Width