1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 #include "chrome_frame/crash_reporting/nt_loader.h"
8 #include "base/logging.h"
12 LDR_DATA_TABLE_ENTRY
* GetLoaderEntry(HMODULE module
) {
13 // Make sure we own the loader's lock on entry here.
14 DCHECK(OwnsCriticalSection(GetLoaderLock()));
15 PEB
* peb
= GetCurrentPeb();
17 LIST_ENTRY
* head
= &peb
->Ldr
->InLoadOrderModuleList
;
18 for (LIST_ENTRY
* entry
= head
->Flink
; entry
!= head
; entry
= entry
->Flink
) {
19 LDR_DATA_TABLE_ENTRY
* ldr_entry
=
20 CONTAINING_RECORD(entry
, LDR_DATA_TABLE_ENTRY
, InLoadOrderLinks
);
22 if (reinterpret_cast<HMODULE
>(ldr_entry
->DllBase
) == module
)
29 } // namespace nt_loader