Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CWebBrowser2 related help please

CWebBrowser2 related help please

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++comquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gangar
    wrote on last edited by
    #1

    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.

    B 1 Reply Last reply
    0
    • G gangar

      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.

      B Offline
      B Offline
      bob16972
      wrote on last edited by
      #2

      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.

      G 1 Reply Last reply
      0
      • B bob16972

        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.

        G Offline
        G Offline
        gangar
        wrote on last edited by
        #3

        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?

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups