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. Memory Usage in ExecWB

Memory Usage in ExecWB

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++htmlperformancequestion
14 Posts 4 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 Shivarudrayya H

    Hi, I developed an application in MFC dialog, where i am printing the Html page using ExecWB command. The problem is, initially my application memory consumption is low. But when i call print command (ExecWB) the memory usage rises tremendously. But for further execution of command its stable..!! I am not getting whats the exact problem is..?? Plz help me in this regard.. Thanx in advance.

    Reagards Shiva

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

    Maybe it's something internal to the ExecWB() function.

    "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

    "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

    S 2 Replies Last reply
    0
    • S Shivarudrayya H

      Hi, I developed an application in MFC dialog, where i am printing the Html page using ExecWB command. The problem is, initially my application memory consumption is low. But when i call print command (ExecWB) the memory usage rises tremendously. But for further execution of command its stable..!! I am not getting whats the exact problem is..?? Plz help me in this regard.. Thanx in advance.

      Reagards Shiva

      R Offline
      R Offline
      Rajesh R Subramanian
      wrote on last edited by
      #3

      Can you show us what ExecWB() is doing?

      Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

      S 1 Reply Last reply
      0
      • S Shivarudrayya H

        Hi, I developed an application in MFC dialog, where i am printing the Html page using ExecWB command. The problem is, initially my application memory consumption is low. But when i call print command (ExecWB) the memory usage rises tremendously. But for further execution of command its stable..!! I am not getting whats the exact problem is..?? Plz help me in this regard.. Thanx in advance.

        Reagards Shiva

        CPalliniC Offline
        CPalliniC Offline
        CPallini
        wrote on last edited by
        #4

        I don't see any problem there. Don't you like such a behaviour? BTW What is ExecWB?

        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
        This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

        In testa che avete, signor di Ceprano?

        D 1 Reply Last reply
        0
        • R Rajesh R Subramanian

          Can you show us what ExecWB() is doing?

          Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

          S Offline
          S Offline
          Shivarudrayya H
          wrote on last edited by
          #5

          someobj.ExecWB(OLECMDID_PRINT, 0 , NULL, NULL); I used MS-WebBrowser ocx(CWebBrowser2)

          Reagards Shiva

          R 1 Reply Last reply
          0
          • S Shivarudrayya H

            someobj.ExecWB(OLECMDID_PRINT, 0 , NULL, NULL); I used MS-WebBrowser ocx(CWebBrowser2)

            Reagards Shiva

            R Offline
            R Offline
            Rajesh R Subramanian
            wrote on last edited by
            #6

            Whoops! I thought you had a different ExecWB() in your own namespace and asked for that code. I think agree with what David has said above.

            Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

            1 Reply Last reply
            0
            • CPalliniC CPallini

              I don't see any problem there. Don't you like such a behaviour? BTW What is ExecWB?

              If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
              This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

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

              CPallini wrote:

              BTW What is ExecWB?

              It's a method of both IWebBrowser2 and CHtmlView.

              "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

              "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

              CPalliniC S 2 Replies Last reply
              0
              • D David Crow

                CPallini wrote:

                BTW What is ExecWB?

                It's a method of both IWebBrowser2 and CHtmlView.

                "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

                "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                CPalliniC Offline
                CPalliniC Offline
                CPallini
                wrote on last edited by
                #8

                :)

                If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

                In testa che avete, signor di Ceprano?

                S 1 Reply Last reply
                0
                • D David Crow

                  Maybe it's something internal to the ExecWB() function.

                  "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

                  "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                  S Offline
                  S Offline
                  Shivarudrayya H
                  wrote on last edited by
                  #9

                  Do u have any idea or solution how to overcome this problem..?

                  Reagards Shiva

                  1 Reply Last reply
                  0
                  • D David Crow

                    Maybe it's something internal to the ExecWB() function.

                    "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

                    "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                    S Offline
                    S Offline
                    Shivarudrayya H
                    wrote on last edited by
                    #10

                    void CWebBrowser2::ExecWB(long cmdID, long cmdexecopt, VARIANT* pvaIn, VARIANT* pvaOut) { static BYTE parms[] = VTS_I4 VTS_I4 VTS_PVARIANT VTS_PVARIANT; InvokeHelper(0x1f6, DISPATCH_METHOD, VT_EMPTY, NULL, parms, cmdID, cmdexecopt, pvaIn, pvaOut); } Actually its internally calling 'InvokeHelper' which may b using some stack..

                    Reagards Shiva

                    1 Reply Last reply
                    0
                    • CPalliniC CPallini

                      :)

                      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

                      S Offline
                      S Offline
                      Shivarudrayya H
                      wrote on last edited by
                      #11

                      What might be going wrong?? is it starting any new Process??? if yes, can i stop it? This ExecWb takin up huge memory (~20MB). i am sure about the huge number i mentioned (checked it in Task manager's Memory Usage - windowsXP). Any help is most appreciated or is there any other way that I can Print the html document (I am using CWebBrowser2).

                      Reagards Shiva

                      CPalliniC 1 Reply Last reply
                      0
                      • S Shivarudrayya H

                        What might be going wrong?? is it starting any new Process??? if yes, can i stop it? This ExecWb takin up huge memory (~20MB). i am sure about the huge number i mentioned (checked it in Task manager's Memory Usage - windowsXP). Any help is most appreciated or is there any other way that I can Print the html document (I am using CWebBrowser2).

                        Reagards Shiva

                        CPalliniC Offline
                        CPalliniC Offline
                        CPallini
                        wrote on last edited by
                        #12

                        Shivarudrayya H wrote:

                        What might be going wrong??

                        Probably nothing.

                        Shivarudrayya H wrote:

                        is it starting any new Process???

                        Probably not, since you see a huge increment of your application memory usage.

                        Shivarudrayya H wrote:

                        his ExecWb takin up huge memory (~20MB).

                        Why bother about. After all, it is doing the job for you.

                        Shivarudrayya H wrote:

                        Any help is most appreciated or is there any other way that I can Print the html document (I am using CWebBrowser2).

                        I don't know a lightweight approach, I'm not an expert about. Maybe CWebBroweser2 support some kind of configuration, but it is only a guess. :)

                        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                        This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

                        In testa che avete, signor di Ceprano?

                        1 Reply Last reply
                        0
                        • D David Crow

                          CPallini wrote:

                          BTW What is ExecWB?

                          It's a method of both IWebBrowser2 and CHtmlView.

                          "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

                          "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                          S Offline
                          S Offline
                          Shivarudrayya H
                          wrote on last edited by
                          #13

                          What might be going wrong?? is it starting any new Process??? if yes, can i stop it? This ExecWb takin up huge memory (~20MB). i am sure about the huge number i mentioned (checked it in Task manager's Memory Usage - windowsXP). Any help is most appreciated or is there any other way that I can Print the html document (I am using CWebBrowser2).

                          Reagards Shiva

                          D 1 Reply Last reply
                          0
                          • S Shivarudrayya H

                            What might be going wrong?? is it starting any new Process??? if yes, can i stop it? This ExecWb takin up huge memory (~20MB). i am sure about the huge number i mentioned (checked it in Task manager's Memory Usage - windowsXP). Any help is most appreciated or is there any other way that I can Print the html document (I am using CWebBrowser2).

                            Reagards Shiva

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

                            Shivarudrayya H wrote:

                            This ExecWb takin up huge memory (~20MB).

                            And why does this concern you?

                            Shivarudrayya H wrote:

                            ...(checked it in Task manager's Memory Usage - windowsXP).

                            Which can be deceiving. Read this, especially the last part.

                            "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

                            "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                            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