Enumerating Symbol Modules
The following code lists the modules that have been loaded by the SymLoadModule64 or SymInitialize function. The SymEnumerateModules64 function requires a callback function, which will be called once for each module loaded. In this example, EnumModules is an implementation of the callback function. The example assumes you have initialized the symbol handler using the code in Initializing the Symbol Handler.
BOOL CALLBACK EnumModules( LPSTR ModuleName, DWORD64 BaseOfDll, PVOID UserContext ) { printf("%08X %s\n", BaseOfDll, ModuleName); return TRUE; } if (SymEnumerateModules64(hProcess, EnumModules, NULL)) { // SymEnumerateModules64 returned success } else { // SymEnumerateModules64 failed error = GetLastError(); printf("SymEnumerateModules64 returned error : %d\n", error); }
Send comments about this topic to Microsoft
Build date: 9/25/2007
© 2007 Microsoft Corporation. All rights reserved.