Thread: BeforeNavigate2 event and PostData

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Jan 2006
    Location
    Latvia
    Posts
    102

    BeforeNavigate2 event and PostData

    I'm capturing the BeforeNavigate2 event of a WebBrowser control and I tried to edit the PostData parameter from here, but it won't send my updated data (just sends the original PostData).
    Code:
    void BeforeNavigate2(IDispatch *pDisp, VARIANT * url,VARIANT * Flags,VARIANT * TargetFrameName,
     VARIANT * PostData,VARIANT * Headers,  VARIANT_BOOL * Cancel) 
    {
    		SAFEARRAY* psa = (SAFEARRAY*)SendMessage(msgForward, WM_USER+0xdead,
    			(WPARAM)0, (LPARAM)PostData->pvarVal->parray); //retrieves modified post data into psa
    		SafeArrayCopyData(psa, PostData->pvarVal->parray); //applies the modified data
    }
    I've made sure it all works in debugger, isn't this the place where modifications of PostData before request can be made?
    Last edited by Overlord; 11-08-2008 at 08:48 PM.

Popular pages Recent additions subscribe to a feed