locked
CreateToolhelp32Snapshot failed, how to resolve? RRS feed

  • Question

  • Hi,

      Now I have met a problem, when I use the CreateToolhelp32Snapshot  function to get a snapshot of the processes, it   sometimes  fails.

     I use GetLastError to find the error number is 8: Not enough storage is available to process this command.

     But  my phone has enough storage.

     Can any one help me? Or give me some tips?

     Thanks!
    Monday, May 25, 2009 9:09 AM

Answers

  • Maybe this entry from my blog may help you: use the TH32CS_SNAPNOHEAPS flag.
    João Paulo Figueira (Device Application Development MVP)
    Monday, May 25, 2009 10:29 AM

All replies

  • Maybe this entry from my blog may help you: use the TH32CS_SNAPNOHEAPS flag.
    João Paulo Figueira (Device Application Development MVP)
    Monday, May 25, 2009 10:29 AM

  • Now It works very well.

    Thank you very much for your answers !

    Tuesday, May 26, 2009 3:51 AM
  • This is another question I want to ask?

    I can't find the define of TH32CS_SNAPNOHEAPS in the thhelp32.h.

    So I defined it  by myself.

    And It works very well , too.

    But I want to know why Microsoft doesn't define it?
    Tuesday, May 26, 2009 3:55 AM