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. Can we access session cookies from C++/VC++ code?

Can we access session cookies from C++/VC++ code?

Scheduled Pinned Locked Moved C / C++ / MFC
c++helptutorialquestion
9 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.
  • S Offline
    S Offline
    sarat
    wrote on last edited by
    #1

    Can we access session cookies from C++/VC++ code. How to do that? I need to store data in session cookies when I open any web based client, and I need to access the cookies from VC++ code, I need help in that whether we can Do that? Please somebody can let me know how to do that if there is any solution. Thank you in advance.

    D 1 Reply Last reply
    0
    • S sarat

      Can we access session cookies from C++/VC++ code. How to do that? I need to store data in session cookies when I open any web based client, and I need to access the cookies from VC++ code, I need help in that whether we can Do that? Please somebody can let me know how to do that if there is any solution. Thank you in advance.

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Are you wanting to do it via a BHO, or are you just wanting to open the .txt file?

      "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

      "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

      S 1 Reply Last reply
      0
      • D David Crow

        Are you wanting to do it via a BHO, or are you just wanting to open the .txt file?

        "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

        S Offline
        S Offline
        sarat
        wrote on last edited by
        #3

        I am hosting web browser on a dialog( which is MFC dialog) and navigating to a link ( link ->which is a client to a database of articles) when I open an article in the browser which I hosted on MFC dialog I will save the article id ( somehow I will get it ) in a session cookie. Later on I need to access the session cookie from MFC code. how to do that any idea please? I am using CWebBrowser2 calss object as web browser, and useing CWebBrowser2 ::Navigate2 interface method to navigate to the specified link.

        modified on Wednesday, September 16, 2009 1:01 PM

        D 1 Reply Last reply
        0
        • S sarat

          I am hosting web browser on a dialog( which is MFC dialog) and navigating to a link ( link ->which is a client to a database of articles) when I open an article in the browser which I hosted on MFC dialog I will save the article id ( somehow I will get it ) in a session cookie. Later on I need to access the session cookie from MFC code. how to do that any idea please? I am using CWebBrowser2 calss object as web browser, and useing CWebBrowser2 ::Navigate2 interface method to navigate to the specified link.

          modified on Wednesday, September 16, 2009 1:01 PM

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          sarat wrote:

          ...I will save the article id ( somehow I will get it ) in a session cookie. Later on I need to access the session cookie from MFC code. how to do that any idea please?

          If you have code for creating a cookie, why can't you access it?

          "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

          S 1 Reply Last reply
          0
          • D David Crow

            sarat wrote:

            ...I will save the article id ( somehow I will get it ) in a session cookie. Later on I need to access the session cookie from MFC code. how to do that any idea please?

            If you have code for creating a cookie, why can't you access it?

            "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

            "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

            S Offline
            S Offline
            sarat
            wrote on last edited by
            #5

            I create cookeies thru .aspx page and post it to local machine with another .aspx page. the code is in aspx now i need to access the cookies from MFC code

            D 1 Reply Last reply
            0
            • S sarat

              I create cookeies thru .aspx page and post it to local machine with another .aspx page. the code is in aspx now i need to access the cookies from MFC code

              D Offline
              D Offline
              David Crow
              wrote on last edited by
              #6

              See here.

              "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

              "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

              S 1 Reply Last reply
              0
              • D David Crow

                See here.

                "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

                "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                S Offline
                S Offline
                sarat
                wrote on last edited by
                #7

                Thanx a lot DavidCrow, in that post , i do not understand how to create m_piRequest object before making a call "hr = m_piRequest->get_Cookies(&pDict);" i am not that familier with COM. I googled it : m_piRequest is The IRequest interface pointer ( if am not wrong) please let me know how to create m_piRequest object before start using it, do i need to do cocreate instance? please help me in this. basically.. i am hosting CWebBrowser2 derived class object on a dialog. and using Navigate funtion to navigate to any URL of a web application. I will be createing cookies thru aspx page of the webapplication.

                D 1 Reply Last reply
                0
                • S sarat

                  Thanx a lot DavidCrow, in that post , i do not understand how to create m_piRequest object before making a call "hr = m_piRequest->get_Cookies(&pDict);" i am not that familier with COM. I googled it : m_piRequest is The IRequest interface pointer ( if am not wrong) please let me know how to create m_piRequest object before start using it, do i need to do cocreate instance? please help me in this. basically.. i am hosting CWebBrowser2 derived class object on a dialog. and using Navigate funtion to navigate to any URL of a web application. I will be createing cookies thru aspx page of the webapplication.

                  D Offline
                  D Offline
                  David Crow
                  wrote on last edited by
                  #8

                  sarat wrote:

                  I googled it : m_piRequest is The IRequest interface pointer ( if am not wrong)

                  That is correct.

                  sarat wrote:

                  please let me know how to create m_piRequest object before start using it, do i need to do cocreate instance? please help me in this.

                  See here and here.

                  "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

                  "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                  S 1 Reply Last reply
                  0
                  • D David Crow

                    sarat wrote:

                    I googled it : m_piRequest is The IRequest interface pointer ( if am not wrong)

                    That is correct.

                    sarat wrote:

                    please let me know how to create m_piRequest object before start using it, do i need to do cocreate instance? please help me in this.

                    See here and here.

                    "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

                    "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                    S Offline
                    S Offline
                    sarat
                    wrote on last edited by
                    #9

                    Thank you DavidCrow I am enjoing learning COM..with ur help. but the problem in here is , i donot have "OnStartPage" function and noway it gets called in my application. i have a dialog on that i am hosting a CwebBrowser2 derived class object. i have a button called insert article. when i click on insertarticle button i need to access the cookie. ( When i open any article on the browser, one file called article.aspx will create cookie and assignes article id as its value, which i need to access when i cleick on insert button ) i do not have OnStartPage () function here and cannot get IUnknown* pUnk. what is the solution for the problem.. please help me in this

                    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