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. ShellExecute and memory footprint?!

ShellExecute and memory footprint?!

Scheduled Pinned Locked Moved C / C++ / MFC
performancequestion
4 Posts 3 Posters 2 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.
  • D Offline
    D Offline
    djrisc
    wrote on last edited by
    #1

    Hello, When using hotlinks for URL's in a Richedit Control, and then calling ShellExecute as follows: ShellExecute(hWnd, NULL, pszURL, NULL, NULL, SW_SHOWNORMAL); The memory footprint of my executable will go up about 2 1/2 megs. Is there a way to free this memory up after a URL is clicked, or am I implementing something wrong here? Thanks! . djrisc .

    V J 2 Replies Last reply
    0
    • D djrisc

      Hello, When using hotlinks for URL's in a Richedit Control, and then calling ShellExecute as follows: ShellExecute(hWnd, NULL, pszURL, NULL, NULL, SW_SHOWNORMAL); The memory footprint of my executable will go up about 2 1/2 megs. Is there a way to free this memory up after a URL is clicked, or am I implementing something wrong here? Thanks! . djrisc .

      V Offline
      V Offline
      Vincent Ye
      wrote on last edited by
      #2

      I suggest you change the first parameter of ShellExecute from "hWnd" to "NULL".

      D 1 Reply Last reply
      0
      • V Vincent Ye

        I suggest you change the first parameter of ShellExecute from "hWnd" to "NULL".

        D Offline
        D Offline
        djrisc
        wrote on last edited by
        #3

        Thanks for the suggestion. :) Unfortunately the memory footprint still goes up with the first parameter set to NULL. :(( . djrisc .

        1 Reply Last reply
        0
        • D djrisc

          Hello, When using hotlinks for URL's in a Richedit Control, and then calling ShellExecute as follows: ShellExecute(hWnd, NULL, pszURL, NULL, NULL, SW_SHOWNORMAL); The memory footprint of my executable will go up about 2 1/2 megs. Is there a way to free this memory up after a URL is clicked, or am I implementing something wrong here? Thanks! . djrisc .

          J Offline
          J Offline
          Joel Lucsy
          wrote on last edited by
          #4

          I suspect because it has to load a dll (shell32.dll I think). This would not really expand your memory footprint since the memory of the dll is typically shared between all programs. If your using the task manager to view the memory footprint, you have to take what it says with a grain of salt. Joel Lucsy (jjlucsy@ameritech.net)

          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