Re: CreateToolhelp32Snapshot
- From: "Michael Salamone" <mikesa#at#entrek#dot#com>
- Date: Sun, 29 Apr 2007 11:30:13 -0700
A snapshot tries to reserve 1MB of virtual memory. If it can't, or can't commit the first page (or n pages), then you'll get ERROR_NOT_ENOUGH_MEMORY.
My first guess is that you don't have 1MB of contiguous virtual address space in your 32MB process slot, so the reservation is failing.
--
Michael Salamone, eMVP
Entrek Software, Inc.
www.entrek.com
"Yudi" <yudilevi@xxxxxxxxx> wrote in message news:1177861144.662279.324330@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
I'm using the CreateToolhelp32Snapshot in order to enumerate all the
processes in the system and sometimes the function fails on WM5.0 with
error ERROR_NOT_ENOUGH_MEMORY. I tried adding the TH32CS_SNAPNOHEAPS
flag, which did help - now the function only fails 1 out of 30 of the
times, but it still fails.
I'm basically trying to find out if a certain process is currently
running and this seemed like the most reliable way to check that, but
I can't find a way to make it work without errors.
Any idea how to fix that?
Regards,
Yudi
.
- Prev by Date: sqlceConnectionn Is this right way ?
- Next by Date: XML provisioning fails via CAB
- Previous by thread: sqlceConnectionn Is this right way ?
- Next by thread: Re: CreateToolhelp32Snapshot
- Index(es):
Relevant Pages
|