Figure 7: Enumerating icon resources in a library
__gc class LibraryUser { void UseLibrary() { Using<Library*> library = new Library(S"C:\\Windows\\Explorer.exe", WindowsAPI::LOAD_LIBRARY_AS_DATAFILE); library->EnumResourceNames(WindowsAPI::RT_GROUP_ICON, new WindowsAPI::EnumResNameProc(this, Callback), System::IntPtr::Zero); } bool Callback(System::IntPtr hModule, System::IntPtr pType, System::IntPtr pName, System::IntPtr param) { // Use the icon resource return true; // to keep enumerating } }; End of Figure