CWebBrowser2 related help please
-
Hello, Our application developed using VC++ with COM. Our new requirement is to launch user written ASP forms from our application. To achieve this I added CWebbrowser2 control in our dialog and launched ASP pages using Navigate method. The problem is that we need to pass some input data to these ASP pages before it diplayed in CwebBrowser. This input is to fill out some fields on ASP form.I tried to pass this by appending input string to URL, but there is 2083 characters limit on URL. Is there anyway I can pass huge input string to ASP? I tried to use PostData parameter in CwebBrowser.Navigate(...) method but no success. I am also open to any alternative approach for my requirement other than CWebbrowser2 control. Advance thanks to responders.
-
Hello, Our application developed using VC++ with COM. Our new requirement is to launch user written ASP forms from our application. To achieve this I added CWebbrowser2 control in our dialog and launched ASP pages using Navigate method. The problem is that we need to pass some input data to these ASP pages before it diplayed in CwebBrowser. This input is to fill out some fields on ASP form.I tried to pass this by appending input string to URL, but there is 2083 characters limit on URL. Is there anyway I can pass huge input string to ASP? I tried to use PostData parameter in CwebBrowser.Navigate(...) method but no success. I am also open to any alternative approach for my requirement other than CWebbrowser2 control. Advance thanks to responders.
-
gangar wrote:
I tried to use PostData parameter in CwebBrowser.Navigate(...) method but no success
That is the way to do it. Don't give up too easily. SafeArrays are a pain in the behind but a necessity if you want to post data.
bob16972 wrote:
SafeArrays are a pain in the behind but a necessity if you want to post data.
Thanks bob for your reply. I built postdata param as follows: CComVariant postData("MyInput=My Custom Input"); char* postDataString = "MyInput=My Custom Input"; int len = strlen(postDataString); postData.vt = VT_ARRAY; postData.parray = SafeArrayCreateVector(VT_UI1, 0, len); void HUGEP* safeData; SafeArrayAccessData(postData.parray, &safeData); memcpy(safeData, postDataString, len); SafeArrayUnaccessData(postData.parray); May be i am doing something wrong on ASP side to retrieve this postdata. I am novice in ASP. Can somebody tell me ASP command to retrieve it?