이번에 하는 프로젝트에서 지정된 프로세스의 힙을 얻어 탐색해보려고 합니다.

사용해야 하는 함수들은 찾아냈는데요. 어떤 순서로 사용해야 하는지 감이 잘 안오네요;;

함수들은 다음과 같습니다. msdn에 잇는 내용입니다. 링크 - http://windowssdk.msdn.microsoft.com/en-us/library/ms686832.aspx

CreateToolhelp32Snapshot  Takes a snapshot of the specified processes, as well as the heaps, modules, and threads used by these processes.
Heap32First                       Retrieves information about the first block of a heap that has been allocated by a process.
Heap32ListFirst                   Retrieves information about the first heap that has been allocated by a specified process.
Heap32ListNext                  Retrieves information about the next heap that has been allocated by a process.
Heap32Next                      Retrieves information about the next block of a heap that has been allocated by a process.

영어를 해석해보고 순서를 추측해보자면
1. CreateToolhelp32Snapshot
2. Heap32ListFirst
while(){  
   3. Heap32First
   while(){
      4. Heap32Next(반복)
   }
   5. Heap32ListNext
}

일것 같아서 해봤는데 3번 처음에서 멈춰버리네요. 조언 좀 부탁드립니다~