Article View: borland.public.cppbuilder.nativeapi
Article #11668Re: Heap
From: Arthur Jelsma
Date: Wed, 28 Jan 2004 21:58
Date: Wed, 28 Jan 2004 21:58
24 lines
1848 bytes
1848 bytes
I discovered my problem. I walked the processes first looking for my applications name and then walked the modules using the PID. When I walked the modules I found that the MODULEENTRY32 structure contained what I wanted. "Arthur Jelsma" <jelsma@wapa.gov> wrote: > >On a Windows 2000 machine with BCB5 Pro, I am trying to walk >the heap of my application. I use the following API call to >snapshot the heap: > >hdlSnp = CreateToolhelp32Snapshot( TH32CS_SNAPHEAPLIST, 0 ) > >I then use Heap32ListFirst, Heap32First, Heap32Next, and >Heap32ListNext to walk the heap. However, I am seeing address >data from HEAPENTRY32 which is not consistant with the memory >display of PrcView (v3.7.3.1) for my application. I use 0 in >CreateToolhelp32Snapshot to force it to use the current process. >Any ideas as to what I may be doing wrong? Note the memory >display from PrcView is consistent with addresses I am seeing >in my application. Thanks for any help and insight that you >can give me. >
Technical Details
Message-ID:
<40183eb2$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<401699bd$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,227c4d2e6944c6c0 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-01-28 15:10:46 PST From: "Arthur Jelsma" <jelsma@wapa.gov> Sender: "Arthur Jelsma" <jelsma@wapa.gov> Reply-To: "Arthur Jelsma" <jelsma@wapa.gov> Subject: Re: Heap Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 207.109.125.201 References: <401699bd$1@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <40183eb2$1@newsgroups.borland.com> Date: 28 Jan 2004 14:58:58 -0700 X-Trace: newsgroups.borland.com 1075330738 207.105.83.66 (28 Jan 2004 14:58:58 -0700) Lines: 25 Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail