Results 1 to 7 of 7

Thread: readprocessmemory

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    readprocessmemory

    I followed this tutorial, but readprocessmemory spikes up explorer process memory each time it is called. What could be the reason and how to resolve that?

    http://www.vbforums.com/showthread.p...ar-button-text

  2. #2
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: readprocessmemory

    In that link, post #3, line 68 is what I suspect is the faulty line:

    Suggest changing from: VirtualFreeEx 0, lpCaption, 0, MEM_RELEASE
    to: VirtualFreeEx hProcess, lpCaption, 0, MEM_RELEASE

    How now?
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    Re: readprocessmemory

    Quote Originally Posted by LaVolpe View Post
    In that link, post #3, line 68 is what I suspect is the faulty line:

    Suggest changing from: VirtualFreeEx 0, lpCaption, 0, MEM_RELEASE
    to: VirtualFreeEx hProcess, lpCaption, 0, MEM_RELEASE

    How now?
    Tried that and still failing.

  4. #4
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: readprocessmemory

    That line of code should've helped. You may have other areas in your code that is not freeing the memory?

    You said this time, still failing? What is failing? Is this being run on a 64 bit O/S?
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    Re: readprocessmemory

    Quote Originally Posted by LaVolpe View Post
    That line of code should've helped. You may have other areas in your code that is not freeing the memory?

    You said this time, still failing? What is failing? Is this being run on a 64 bit O/S?
    Yes 64 bit, and explorer.exe memory still spikes up.

  6. #6
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: readprocessmemory

    Quote Originally Posted by vbbit View Post
    Yes 64 bit, and explorer.exe memory still spikes up.
    I don't have access to a 64 bit machine so I can't offer any possible solutions. I don't know if part of the problem is talking between 32 & 64 bit processes using readprocessmemory or not. Haven't done any research as to whether the pointers & data would be cleaned up as expected.

    Are you using the exact code at that link? If not, may want to show us your complete routine that you are using?
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  7. #7
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: readprocessmemory

    In that link, I see another problem. Probably a dead issue for now, but one of the constants is declared wrong.

    Line 34: Const MEM_RELEASE = &H8000
    should be: Const MEM_RELEASE = &H8000&
    That trailing ampersand is huge in this case
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width