• Welcome to Valhalla Legends Archive.
 

Enumerating DLL Resource names

Started by MyndFyre, October 19, 2005, 12:20 PM

Previous topic - Next topic

MyndFyre

I needed to enumerate resource names and types in the *.msstyles files (they're just DLLs), so I took it upon myself to figure it out.  Here's what I found:


using System;
using System.IO;
using System.Text;
using System.Runtime.InteropServices;

public enum ResourceType : ushort
{
Cursor = 1,
Bitmap = 2,
Icon = 3,
Menu = 4,
Dialog = 5,
String = 6,
FontDir = 7,
Font = 8,
Accelerator = 9,
RCData = 10,
MessageTable = 11,
GroupCursor = 12,
GroupIcon = 14,
Version = 16,
PlugPlay = 19,
Vxd = 20,
AnimatedCursor = 21,
AnimatedIcon = 22,
Html = 23,
Manifest = 24
}

public delegate bool EnumResTypeProc(
IntPtr hModule,
IntPtr lpType,
IntPtr lParam
);

public delegate bool EnumResNameProc(
IntPtr hModule,
IntPtr lpszType,
IntPtr lpszName,
IntPtr lParam
);

public sealed class Kernel32
{
private Kernel32()
{

}

[DllImport("kernel32.dll")]
public static extern int GetLastError();

[DllImport("kernel32.dll")]
public static extern IntPtr FindResource(
IntPtr hModule,
string lpName,
string lpType
);

[DllImport("kernel32.dll")]
public static extern IntPtr LoadResource(
IntPtr hModule,
IntPtr hRsrc
);

[DllImport("kernel32.dll", CallingConvention=CallingConvention.StdCall)]
public static extern bool EnumResourceTypes(
IntPtr hModule,
[MarshalAs(UnmanagedType.FunctionPtr)] EnumResTypeProc lpEnumFunc,
IntPtr lParam
);

[DllImport("kernel32.dll")]
public static extern bool EnumResourceNames(
IntPtr hModule,
IntPtr lpType,
[MarshalAs(UnmanagedType.FunctionPtr)] EnumResNameProc lpEnumFunc,
IntPtr lParam
);

[DllImport("kernel32.dll")]
public static extern IntPtr LoadLibrary(string lpFileName);

[DllImport("kernel32.dll")]
public static extern bool FreeLibrary(IntPtr hModule);
}

public class StyleResourceEnumerator
{
private StringBuilder m_sb;
private string m_res;

public StyleResourceEnumerator(string resourceFile)
{
if (!File.Exists(resourceFile))
throw new FileNotFoundException("The resource file was not found.", resourceFile);

m_res = resourceFile;
m_sb = new StringBuilder();
}

public void Enumerate()
{
IntPtr hModule = Kernel32.LoadLibrary(m_res);
if (hModule == IntPtr.Zero)
throw new Exception("LoadLibrary failed.");

if (!Kernel32.EnumResourceTypes(hModule,
new EnumResTypeProc(EnumResourceTypeCallback),
IntPtr.Zero))
{
throw new Exception("EnumResourceTypes failed with error code " + Kernel32.GetLastError().ToString("x8") + ".");
}

Kernel32.FreeLibrary(hModule);
}

protected virtual bool EnumResourceNameCallback(
IntPtr hModule,
IntPtr lpType,
IntPtr lpName,
IntPtr lParam
)
{
if (((int)lpName & 0xffff0000) != 0)
{
string lpszName = Marshal.PtrToStringAnsi(lpName);
m_sb.AppendFormat("Name: {0}{1}", lpszName, Environment.NewLine);
}
else
{
m_sb.AppendFormat("Name: {0:x4}{1}", (ushort)((int)lpType & 0xffff), Environment.NewLine);
}

return true;
}

protected virtual bool EnumResourceTypeCallback(
IntPtr hModule,
IntPtr lpType,
IntPtr lParam
)
{
if (((int)lpType & 0xffff0000) != 0)
{
string lpszType = Marshal.PtrToStringAnsi(lpType);
m_sb.AppendFormat("Type: {0}{1}", lpszType, Environment.NewLine);
}
else
{
ushort type = (ushort)((int)lpType & 0xffff);
m_sb.AppendFormat("Type: {0:x4} ({2}){1}", type, Environment.NewLine, ((ResourceType)type).ToString());
}

if (!Kernel32.EnumResourceNames(hModule,
lpType,
new EnumResNameProc(EnumResourceNameCallback),
lParam))
{
throw new Exception("EnumResourceNames failed with error code " + Kernel32.GetLastError().ToString("x8") + ".");
}

return true;
}

public override string ToString()
{
return m_sb.ToString();
}

}


Sample output from the StyleResourceEnumerator.ToString() method:

Type: COLORNAMES
Name: 9f40
Type: COMBODATA
Name: COMBO
Type: FILERESNAMES
Name: 9f40
Type: MINDEPTH
Name: 9f40
Type: ORIGFILENAMES
Name: 9f40
Type: PACKTHEM_VERSION
Name: 9f40
Type: SIZENAMES
Name: 9f40
Type: TEXTFILE
Name: EXTRALARGEBLUE_INI
Name: EXTRALARGEHOMESTEAD_INI
Name: EXTRALARGEMETALLIC_INI
Name: LARGEFONTSBLUE_INI
Name: LARGEFONTSHOMESTEAD_INI
Name: LARGEFONTSMETALLIC_INI
Name: NORMALBLUE_INI
Name: NORMALHOMESTEAD_INI
Name: NORMALMETALLIC_INI
Name: THEMES_INI
Type: 0002 (Bitmap)
Name: BLUE_BALLOONCLOSE_BMP
Name: BLUE_BUTTON_BMP
Name: BLUE_CAPTIONBUTTON_BMP
Name: BLUE_CHECKBOX13_BMP
Name: BLUE_CHECKBOX16_BMP
Name: BLUE_CHECKBOX25_BMP
Name: BLUE_CHEVRON_BMP
Name: BLUE_CLOSEBUTTON_BMP
Name: BLUE_CLOSEGLYPH19_BMP
Name: BLUE_CLOSEGLYPH23_BMP
Name: BLUE_CLOSEGLYPH6_BMP
Name: BLUE_CLOSEGLYPH9_BMP
Name: BLUE_CLOSEGLYPH_BMP
Name: BLUE_COMBOBUTTONGLYPH_BMP
Name: BLUE_COMBOBUTTON_BMP
Name: BLUE_EXPLORERBARHEADERBACKGROUND_BMP
Name: BLUE_EXPLORERBARHEADERCLOSE_BMP
Name: BLUE_EXPLORERBARHEADERPIN_BMP
Name: BLUE_EXPLORERBARTOOLBARBACKGROUND_BMP
Name: BLUE_EXPLORERBARTOOLBARBUTTONSSPLITDROPDOWN_BMP
Name: BLUE_EXPLORERBARTOOLBARBUTTONSSPLIT_BMP
Name: BLUE_EXPLORERBARTOOLBARBUTTONS_BMP
Name: BLUE_FIELDOUTLINEBLUE_BMP
Name: BLUE_FRAMEBOTTOM_BMP
Name: BLUE_FRAMECAPTIONMIN_BMP
Name: BLUE_FRAMECAPTIONSIZING_BMP
Name: BLUE_FRAMECAPTION_BMP
Name: BLUE_FRAMELEFT_BMP
Name: BLUE_FRAMEMAXIMIZED_BMP
Name: BLUE_FRAMERIGHT_BMP
Name: BLUE_GRIPPERVERT_BMP
Name: BLUE_GRIPPER_BMP
Name: BLUE_GROUPBOX_BMP
Name: BLUE_HELPGLYPH19_BMP
Name: BLUE_HELPGLYPH23_BMP
Name: BLUE_HELPGLYPH6_BMP
Name: BLUE_HELPGLYPH9_BMP
Name: BLUE_HELPGLYPH_BMP
Name: BLUE_IE_PERSONALBARMENU_BMP
Name: BLUE_LISTVIEWHEADERBACKGROUND_BMP
Name: BLUE_LISTVIEWHEADER_BMP
Name: BLUE_MAXIMIZEGLYPH19_BMP
Name: BLUE_MAXIMIZEGLYPH23_BMP
Name: BLUE_MAXIMIZEGLYPH6_BMP
Name: BLUE_MAXIMIZEGLYPH9_BMP
Name: BLUE_MAXIMIZEGLYPH_BMP
Name: BLUE_MDICAPTIONBUTTON_BMP
Name: BLUE_MDIGLYPHCLOSE_BMP
Name: BLUE_MDIGLYPHMINIMIZE_BMP
Name: BLUE_MDIGLYPHRESTORE_BMP
Name: BLUE_MINIMIZEGLYPH19_BMP
Name: BLUE_MINIMIZEGLYPH23_BMP
Name: BLUE_MINIMIZEGLYPH6_BMP
Name: BLUE_MINIMIZEGLYPH9_BMP
Name: BLUE_MINIMIZEGLYPH_BMP
Name: BLUE_NORMALGROUPBACKGROUND_BMP
Name: BLUE_NORMALGROUPCOLLAPSE_BMP
Name: BLUE_NORMALGROUPEXPAND_BMP
Name: BLUE_NORMALGROUPHEAD_BMP
Name: BLUE_PLACEBARBACKGROUND_BMP
Name: BLUE_PLACEBARBUTTONS_BMP
Name: BLUE_PROGRESSCHUNKVERT_BMP
Name: BLUE_PROGRESSCHUNK_BMP
Name: BLUE_PROGRESSTRACKVERT_BMP
Name: BLUE_PROGRESSTRACK_BMP
Name: BLUE_RADIOBUTTON13_BMP
Name: BLUE_RADIOBUTTON16_BMP
Name: BLUE_RADIOBUTTON25_BMP
Name: BLUE_RESIZEGRIP2_BMP
Name: BLUE_RESTOREGLYPH19_BMP
Name: BLUE_RESTOREGLYPH23_BMP
Name: BLUE_RESTOREGLYPH6_BMP
Name: BLUE_RESTOREGLYPH9_BMP
Name: BLUE_RESTOREGLYPH_BMP
Name: BLUE_SCROLLARROWGLYPHSSMALL_BMP
Name: BLUE_SCROLLARROWGLYPHS_BMP
Name: BLUE_SCROLLARROWS_BMP
Name: BLUE_SCROLLSHAFTHORIZONTAL_BMP
Name: BLUE_SCROLLSHAFTVERTICAL_BMP
Name: BLUE_SCROLLTHUMBGRIPPERHORIZONTAL_BMP
Name: BLUE_SCROLLTHUMBGRIPPERVERTICAL_BMP
Name: BLUE_SCROLLTHUMBHORIZONTAL_BMP
Name: BLUE_SCROLLTHUMBVERTICAL_BMP
Name: BLUE_SEPARATORVERT_BMP
Name: BLUE_SEPARATOR_BMP
Name: BLUE_SLIDERTRACK_BMP
Name: BLUE_SMALLCLOSEBUTTON_BMP
Name: BLUE_SMALLCLOSEGLYPH_BMP
Name: BLUE_SMALLFRAMECAPTIONSIZING_BMP
Name: BLUE_SMALLFRAMECAPTION_BMP
Name: BLUE_SPECIALGROUPBACKGROUND_BMP
Name: BLUE_SPECIALGROUPCOLLAPSE_BMP
Name: BLUE_SPECIALGROUPEXPAND_BMP
Name: BLUE_SPECIALGROUPHEAD_BMP
Name: BLUE_SPINBUTTONBACKGROUNDDOWN_BMP
Name: BLUE_SPINBUTTONBACKGROUNDLEFT_BMP
Name: BLUE_SPINBUTTONBACKGROUNDRIGHT_BMP
Name: BLUE_SPINBUTTONBACKGROUNDUP_BMP
Name: BLUE_SPINDOWNGLYPH_BMP
Name: BLUE_SPINLEFTGLYPH_BMP
Name: BLUE_SPINRIGHTGLYPH_BMP
Name: BLUE_SPINUPGLYPH_BMP
Name: BLUE_STARTBUTTON_BMP
Name: BLUE_STARTGROUPBACKGROUND_BMP
Name: BLUE_STARTGROUPNEWAPPBUTTON_BMP
Name: BLUE_STARTGROUPSEPERATOR_BMP
Name: BLUE_STARTGROUPTOOLBARBUTTON_BMP
Name: BLUE_STARTPANELLOGOFFBACKGROUND_BMP
Name: BLUE_STARTPANELLOGOFFBUTTONSHOT_BMP
Name: BLUE_STARTPANELLOGOFFBUTTONS_BMP
Name: BLUE_STARTPANELMFUBACKGROUND_BMP
Name: BLUE_STARTPANELMOREPROGARROWHOT_BMP
Name: BLUE_STARTPANELMOREPROGARROW_BMP
Name: BLUE_STARTPANELMOREPROGBACKGROUND_BMP
Name: BLUE_STARTPANELPLACESBACKGROUND_BMP
Name: BLUE_STARTPLACESSEPARATOR_BMP
Name: BLUE_STARTPROGRAMSSEPARATOR_BMP
Name: BLUE_STARTUSERPANEL_BMP
Name: BLUE_STATUSBACKGROUND_BMP
Name: BLUE_STATUSPANE_BMP
Name: BLUE_TABBACKGROUND133_BMP
Name: BLUE_TABBACKGROUND_BMP
Name: BLUE_TABITEMBOTH_BMP
Name: BLUE_TABITEMLEFT_BMP
Name: BLUE_TABITEMRIGHT_BMP
Name: BLUE_TABITEMTOPBOTH_BMP
Name: BLUE_TABITEMTOPLEFT_BMP
Name: BLUE_TABITEMTOPRIGHT_BMP
Name: BLUE_TABITEMTOP_BMP
Name: BLUE_TABITEM_BMP
Name: BLUE_TABPANEEDGE_BMP
Name: BLUE_TASKBANDBACKGROUND_BMP
Name: BLUE_TASKBANDBUTTONNOEDGEVERTICAL_BMP
Name: BLUE_TASKBANDBUTTONNOEDGE_BMP
Name: BLUE_TASKBANDBUTTONVERTICAL_BMP
Name: BLUE_TASKBANDBUTTON_BMP
Name: BLUE_TASKBANDFLASHBUTTONGROUPMENU_BMP
Name: BLUE_TASKBANDFLASHBUTTON_BMP
Name: BLUE_TASKBANDHOVER_BMP
Name: BLUE_TASKBANDSCROLLARROWGLYPHS_BMP
Name: BLUE_TASKBANDSCROLLARROWS_BMP
Name: BLUE_TASKBANDSCROLLSHAFTHORIZONTAL_BMP
Name: BLUE_TASKBANDSCROLLSHAFTVERTICAL_BMP
Name: BLUE_TASKBANDSCROLLTHUMBGRIPPERHORIZONTAL_BMP
Name: BLUE_TASKBANDSCROLLTHUMBGRIPPERVERTICAL_BMP
Name: BLUE_TASKBANDSCROLLTHUMBHORIZONTAL_BMP
Name: BLUE_TASKBANDSCROLLTHUMBVERTICAL_BMP
Name: BLUE_TASKBARBACKGROUNDVERTICAL_BMP
Name: BLUE_TASKBARBACKGROUND_BMP
Name: BLUE_TASKBARCHEVRONVERT_BMP
Name: BLUE_TASKBARCHEVRON_BMP
Name: BLUE_TASKBARGRIPPERVERTICAL_BMP
Name: BLUE_TASKBARGRIPPER_BMP
Name: BLUE_TASKBARSIZINGBARBOTTOM_BMP
Name: BLUE_TASKBARSIZINGBARLEFT_BMP
Name: BLUE_TASKBARSIZINGBARRIGHT_BMP
Name: BLUE_TASKBARSIZINGBARTOP_BMP
Name: BLUE_TASKBARTRAYVERTICAL_BMP
Name: BLUE_TASKBARTRAY_BMP
Name: BLUE_TOOLBARBACKGROUND_BMP
Name: BLUE_TOOLBARBUTTONSSPLITDROPDOWNGLYPH_BMP
Name: BLUE_TOOLBARBUTTONSSPLITDROPDOWN_BMP
Name: BLUE_TOOLBARBUTTONSSPLIT_BMP
Name: BLUE_TOOLBARBUTTONS_BMP
Name: BLUE_TOOLBARGRIPPERVERT_BMP
Name: BLUE_TOOLBARGRIPPER_BMP
Name: BLUE_TRACKBARDOWN13_BMP
Name: BLUE_TRACKBARDOWN16_BMP
Name: BLUE_TRACKBARDOWN25_BMP
Name: BLUE_TRACKBARHORIZONTAL_BMP
Name: BLUE_TRACKBARLEFT13_BMP
Name: BLUE_TRACKBARLEFT16_BMP
Name: BLUE_TRACKBARLEFT25_BMP
Name: BLUE_TRACKBARRIGHT13_BMP
Name: BLUE_TRACKBARRIGHT16_BMP
Name: BLUE_TRACKBARRIGHT25_BMP
Name: BLUE_TRACKBARUP13_BMP
Name: BLUE_TRACKBARUP16_BMP
Name: BLUE_TRACKBARUP25_BMP
Name: BLUE_TRACKBARVERTICAL_BMP
Name: BLUE_TRAYCHEVRONHORIZONTALOPEN_BMP
Name: BLUE_TRAYCHEVRONHORIZONTAL_BMP
Name: BLUE_TREEEXPANDCOLLAPSE_BMP
Name: BLUE_USERTILEBACKGROUND_BMP
Name: HOMESTEAD_BALLOONCLOSE_BMP
Name: HOMESTEAD_BUTTON_BMP
Name: HOMESTEAD_CAPTIONBUTTON_BMP
Name: HOMESTEAD_CHECKBOX13_BMP
Name: HOMESTEAD_CHECKBOX16_BMP
Name: HOMESTEAD_CHECKBOX25_BMP
Name: HOMESTEAD_CHEVRON_BMP
Name: HOMESTEAD_CLOSEBUTTON_BMP
Name: HOMESTEAD_CLOSEGLYPH19_BMP
Name: HOMESTEAD_CLOSEGLYPH23_BMP
Name: HOMESTEAD_CLOSEGLYPH6_BMP
Name: HOMESTEAD_CLOSEGLYPH9_BMP
Name: HOMESTEAD_CLOSEGLYPH_BMP
Name: HOMESTEAD_COMBOBUTTONGLYPH_BMP
Name: HOMESTEAD_COMBOBUTTON_BMP
Name: HOMESTEAD_EXPLORERBARHEADERBACKGROUND_BMP
Name: HOMESTEAD_EXPLORERBARHEADERCLOSE_BMP
Name: HOMESTEAD_EXPLORERBARHEADERPIN_BMP
Name: HOMESTEAD_EXPLORERBARTOOLBARBACKGROUND_BMP
Name: HOMESTEAD_EXPLORERBARTOOLBARBUTTONSSPLITDROPDOWN_BMP
Name: HOMESTEAD_EXPLORERBARTOOLBARBUTTONSSPLIT_BMP
Name: HOMESTEAD_EXPLORERBARTOOLBARBUTTONS_BMP
Name: HOMESTEAD_FIELDOUTLINEBLUE_BMP
Name: HOMESTEAD_FRAMEBOTTOM_BMP
Name: HOMESTEAD_FRAMECAPTIONMIN_BMP
Name: HOMESTEAD_FRAMECAPTIONSIZING_BMP
Name: HOMESTEAD_FRAMECAPTION_BMP
Name: HOMESTEAD_FRAMELEFT_BMP
Name: HOMESTEAD_FRAMEMAXIMIZED_BMP
Name: HOMESTEAD_FRAMERIGHT_BMP
Name: HOMESTEAD_GRIPPERVERT_BMP
Name: HOMESTEAD_GRIPPER_BMP
Name: HOMESTEAD_GROUPBOX_BMP
Name: HOMESTEAD_HELPGLYPH19_BMP
Name: HOMESTEAD_HELPGLYPH23_BMP
Name: HOMESTEAD_HELPGLYPH6_BMP
Name: HOMESTEAD_HELPGLYPH9_BMP
Name: HOMESTEAD_HELPGLYPH_BMP
Name: HOMESTEAD_IE_PERSONALBARMENU_BMP
Name: HOMESTEAD_LISTVIEWHEADERBACKGROUND_BMP
Name: HOMESTEAD_LISTVIEWHEADER_BMP
Name: HOMESTEAD_MAXIMIZEGLYPH19_BMP
Name: HOMESTEAD_MAXIMIZEGLYPH23_BMP
Name: HOMESTEAD_MAXIMIZEGLYPH6_BMP
Name: HOMESTEAD_MAXIMIZEGLYPH9_BMP
Name: HOMESTEAD_MAXIMIZEGLYPH_BMP
Name: HOMESTEAD_MDICAPTIONBUTTON_BMP
Name: HOMESTEAD_MDIGLYPHCLOSE_BMP
Name: HOMESTEAD_MDIGLYPHMINIMIZE_BMP
Name: HOMESTEAD_MDIGLYPHRESTORE_BMP
Name: HOMESTEAD_MINIMIZEGLYPH19_BMP
Name: HOMESTEAD_MINIMIZEGLYPH23_BMP
Name: HOMESTEAD_MINIMIZEGLYPH6_BMP
Name: HOMESTEAD_MINIMIZEGLYPH9_BMP
Name: HOMESTEAD_MINIMIZEGLYPH_BMP
Name: HOMESTEAD_NORMALGROUPBACKGROUND_BMP
Name: HOMESTEAD_NORMALGROUPCOLLAPSE_BMP
Name: HOMESTEAD_NORMALGROUPEXPAND_BMP
Name: HOMESTEAD_NORMALGROUPHEAD_BMP
Name: HOMESTEAD_PLACEBARBACKGROUND_BMP
Name: HOMESTEAD_PLACEBARBUTTONS_BMP
Name: HOMESTEAD_PROGRESSCHUNKVERT_BMP
Name: HOMESTEAD_PROGRESSCHUNK_BMP
Name: HOMESTEAD_PROGRESSTRACKVERT_BMP
Name: HOMESTEAD_PROGRESSTRACK_BMP
Name: HOMESTEAD_RADIOBUTTON13_BMP
Name: HOMESTEAD_RADIOBUTTON16_BMP
Name: HOMESTEAD_RADIOBUTTON25_BMP
Name: HOMESTEAD_RESIZEGRIP2_BMP
Name: HOMESTEAD_RESTOREGLYPH19_BMP
Name: HOMESTEAD_RESTOREGLYPH23_BMP
Name: HOMESTEAD_RESTOREGLYPH6_BMP
Name: HOMESTEAD_RESTOREGLYPH9_BMP
Name: HOMESTEAD_RESTOREGLYPH_BMP
Name: HOMESTEAD_SCROLLARROWGLYPHSSMALL_BMP
Name: HOMESTEAD_SCROLLARROWGLYPHS_BMP
Name: HOMESTEAD_SCROLLARROWS_BMP
Name: HOMESTEAD_SCROLLSHAFTHORIZONTAL_BMP
Name: HOMESTEAD_SCROLLSHAFTVERTICAL_BMP
Name: HOMESTEAD_SCROLLTHUMBGRIPPERHORIZONTAL_BMP
Name: HOMESTEAD_SCROLLTHUMBGRIPPERVERTICAL_BMP
Name: HOMESTEAD_SCROLLTHUMBHORIZONTAL_BMP
Name: HOMESTEAD_SCROLLTHUMBVERTICAL_BMP
Name: HOMESTEAD_SEPARATORVERT_BMP
Name: HOMESTEAD_SEPARATOR_BMP
Name: HOMESTEAD_SLIDERTRACK_BMP
Name: HOMESTEAD_SMALLCLOSEBUTTON_BMP
Name: HOMESTEAD_SMALLCLOSEGLYPH_BMP
Name: HOMESTEAD_SMALLFRAMECAPTIONSIZING_BMP
Name: HOMESTEAD_SMALLFRAMECAPTION_BMP
Name: HOMESTEAD_SPECIALGROUPBACKGROUND_BMP
Name: HOMESTEAD_SPECIALGROUPCOLLAPSE_BMP
Name: HOMESTEAD_SPECIALGROUPEXPAND_BMP
Name: HOMESTEAD_SPECIALGROUPHEAD_BMP
Name: HOMESTEAD_SPINBUTTONBACKGROUNDDOWN_BMP
Name: HOMESTEAD_SPINBUTTONBACKGROUNDLEFT_BMP
Name: HOMESTEAD_SPINBUTTONBACKGROUNDRIGHT_BMP
Name: HOMESTEAD_SPINBUTTONBACKGROUNDUP_BMP
Name: HOMESTEAD_SPINDOWNGLYPH_BMP
Name: HOMESTEAD_SPINLEFTGLYPH_BMP
Name: HOMESTEAD_SPINRIGHTGLYPH_BMP
Name: HOMESTEAD_SPINUPGLYPH_BMP
Name: HOMESTEAD_STARTBUTTON_BMP
Name: HOMESTEAD_STARTGROUPBACKGROUND_BMP
Name: HOMESTEAD_STARTGROUPNEWAPPBUTTON_BMP
Name: HOMESTEAD_STARTGROUPSEPERATOR_BMP
Name: HOMESTEAD_STARTGROUPTOOLBARBUTTON_BMP
Name: HOMESTEAD_STARTPANELLOGOFFBACKGROUND_BMP
Name: HOMESTEAD_STARTPANELLOGOFFBUTTONSHOT_BMP
Name: HOMESTEAD_STARTPANELLOGOFFBUTTONS_BMP
Name: HOMESTEAD_STARTPANELMFUBACKGROUND_BMP
Name: HOMESTEAD_STARTPANELMOREPROGARROWHOT_BMP
Name: HOMESTEAD_STARTPANELMOREPROGARROW_BMP
Name: HOMESTEAD_STARTPANELMOREPROGBACKGROUND_BMP
Name: HOMESTEAD_STARTPANELPLACESBACKGROUND_BMP
Name: HOMESTEAD_STARTPLACESSEPARATOR_BMP
Name: HOMESTEAD_STARTPROGRAMSSEPARATOR_BMP
Name: HOMESTEAD_STARTUSERPANEL_BMP
Name: HOMESTEAD_STATUSBACKGROUND_BMP
Name: HOMESTEAD_STATUSPANE_BMP
Name: HOMESTEAD_TABBACKGROUND133_BMP
Name: HOMESTEAD_TABBACKGROUND_BMP
Name: HOMESTEAD_TABITEMBOTH_BMP
Name: HOMESTEAD_TABITEMLEFT_BMP
Name: HOMESTEAD_TABITEMRIGHT_BMP
Name: HOMESTEAD_TABITEMTOPBOTH_BMP
Name: HOMESTEAD_TABITEMTOPLEFT_BMP
Name: HOMESTEAD_TABITEMTOPRIGHT_BMP
Name: HOMESTEAD_TABITEMTOP_BMP
Name: HOMESTEAD_TABITEM_BMP
Name: HOMESTEAD_TABPANEEDGE_BMP
Name: HOMESTEAD_TASKBANDBACKGROUND_BMP
Name: HOMESTEAD_TASKBANDBUTTONNOEDGEVERTICAL_BMP
Name: HOMESTEAD_TASKBANDBUTTONNOEDGE_BMP
Name: HOMESTEAD_TASKBANDBUTTONVERTICAL_BMP
Name: HOMESTEAD_TASKBANDBUTTON_BMP
Name: HOMESTEAD_TASKBANDFLASHBUTTONGROUPMENU_BMP
Name: HOMESTEAD_TASKBANDFLASHBUTTON_BMP
Name: HOMESTEAD_TASKBANDHOVER_BMP
Name: HOMESTEAD_TASKBANDSCROLLARROWGLYPHS_BMP
Name: HOMESTEAD_TASKBANDSCROLLARROWS_BMP
Name: HOMESTEAD_TASKBANDSCROLLSHAFTHORIZONTAL_BMP
Name: HOMESTEAD_TASKBANDSCROLLSHAFTVERTICAL_BMP
Name: HOMESTEAD_TASKBANDSCROLLTHUMBGRIPPERHORIZONTAL_BMP
Name: HOMESTEAD_TASKBANDSCROLLTHUMBGRIPPERVERTICAL_BMP
Name: HOMESTEAD_TASKBANDSCROLLTHUMBHORIZONTAL_BMP
Name: HOMESTEAD_TASKBANDSCROLLTHUMBVERTICAL_BMP
Name: HOMESTEAD_TASKBARBACKGROUNDVERTICAL_BMP
Name: HOMESTEAD_TASKBARBACKGROUND_BMP
Name: HOMESTEAD_TASKBARCHEVRONVERT_BMP
Name: HOMESTEAD_TASKBARCHEVRON_BMP
Name: HOMESTEAD_TASKBARGRIPPERVERTICAL_BMP
Name: HOMESTEAD_TASKBARGRIPPER_BMP
Name: HOMESTEAD_TASKBARSIZINGBARBOTTOM_BMP
Name: HOMESTEAD_TASKBARSIZINGBARLEFT_BMP
Name: HOMESTEAD_TASKBARSIZINGBARRIGHT_BMP
Name: HOMESTEAD_TASKBARSIZINGBARTOP_BMP
Name: HOMESTEAD_TASKBARTRAYVERTICAL_BMP
Name: HOMESTEAD_TASKBARTRAY_BMP
Name: HOMESTEAD_TOOLBARBACKGROUND_BMP
Name: HOMESTEAD_TOOLBARBUTTONSSPLITDROPDOWNGLYPH_BMP
Name: HOMESTEAD_TOOLBARBUTTONSSPLITDROPDOWN_BMP
Name: HOMESTEAD_TOOLBARBUTTONSSPLIT_BMP
Name: HOMESTEAD_TOOLBARBUTTONS_BMP
Name: HOMESTEAD_TOOLBARGRIPPERVERT_BMP
Name: HOMESTEAD_TOOLBARGRIPPER_BMP
Name: HOMESTEAD_TRACKBARDOWN13_BMP
Name: HOMESTEAD_TRACKBARDOWN16_BMP
Name: HOMESTEAD_TRACKBARDOWN25_BMP
Name: HOMESTEAD_TRACKBARHORIZONTAL_BMP
Name: HOMESTEAD_TRACKBARLEFT13_BMP
Name: HOMESTEAD_TRACKBARLEFT16_BMP
Name: HOMESTEAD_TRACKBARLEFT25_BMP
Name: HOMESTEAD_TRACKBARRIGHT13_BMP
Name: HOMESTEAD_TRACKBARRIGHT16_BMP
Name: HOMESTEAD_TRACKBARRIGHT25_BMP
Name: HOMESTEAD_TRACKBARUP13_BMP
Name: HOMESTEAD_TRACKBARUP16_BMP
Name: HOMESTEAD_TRACKBARUP25_BMP
Name: HOMESTEAD_TRACKBARVERTICAL_BMP
Name: HOMESTEAD_TRAYCHEVRONHORIZONTALOPEN_BMP
Name: HOMESTEAD_TRAYCHEVRONHORIZONTAL_BMP
Name: HOMESTEAD_TREEEXPANDCOLLAPSE_BMP
Name: HOMESTEAD_USERTILEBACKGROUND_BMP
Name: METALLIC_BALLOONCLOSE_BMP
Name: METALLIC_BUTTON_BMP
Name: METALLIC_CAPTIONBUTTON_BMP
Name: METALLIC_CHECKBOX13_BMP
Name: METALLIC_CHECKBOX16_BMP
Name: METALLIC_CHECKBOX25_BMP
Name: METALLIC_CHEVRON_BMP
Name: METALLIC_CLOSEBUTTON_BMP
Name: METALLIC_CLOSEGLYPH19_BMP
Name: METALLIC_CLOSEGLYPH23_BMP
Name: METALLIC_CLOSEGLYPH6_BMP
Name: METALLIC_CLOSEGLYPH9_BMP
Name: METALLIC_CLOSEGLYPH_BMP
Name: METALLIC_COMBOBUTTONGLYPH_BMP
Name: METALLIC_COMBOBUTTON_BMP
Name: METALLIC_EXPLORERBARHEADERBACKGROUND_BMP
Name: METALLIC_EXPLORERBARHEADERCLOSE_BMP
Name: METALLIC_EXPLORERBARHEADERPIN_BMP
Name: METALLIC_EXPLORERBARTOOLBARBACKGROUND_BMP
Name: METALLIC_EXPLORERBARTOOLBARBUTTONSSPLITDROPDOWN_BMP
Name: METALLIC_EXPLORERBARTOOLBARBUTTONSSPLIT_BMP
Name: METALLIC_EXPLORERBARTOOLBARBUTTONS_BMP
Name: METALLIC_FIELDOUTLINEBLUE_BMP
Name: METALLIC_FRAMEBOTTOM_BMP
Name: METALLIC_FRAMECAPTIONMIN_BMP
Name: METALLIC_FRAMECAPTIONSIZING_BMP
Name: METALLIC_FRAMECAPTION_BMP
Name: METALLIC_FRAMELEFT_BMP
Name: METALLIC_FRAMEMAXIMIZED_BMP
Name: METALLIC_FRAMERIGHT_BMP
Name: METALLIC_GRIPPERVERT_BMP
Name: METALLIC_GRIPPER_BMP
Name: METALLIC_GROUPBOX_BMP
Name: METALLIC_HELPGLYPH19_BMP
Name: METALLIC_HELPGLYPH23_BMP
Name: METALLIC_HELPGLYPH6_BMP
Name: METALLIC_HELPGLYPH9_BMP
Name: METALLIC_HELPGLYPH_BMP
Name: METALLIC_IE_PERSONALBARMENU_BMP
Name: METALLIC_LISTVIEWHEADERBACKGROUND_BMP
Name: METALLIC_LISTVIEWHEADER_BMP
Name: METALLIC_MAXIMIZEGLYPH19_BMP
Name: METALLIC_MAXIMIZEGLYPH23_BMP
Name: METALLIC_MAXIMIZEGLYPH6_BMP
Name: METALLIC_MAXIMIZEGLYPH9_BMP
Name: METALLIC_MAXIMIZEGLYPH_BMP
Name: METALLIC_MDICAPTIONBUTTON_BMP
Name: METALLIC_MDIGLYPHCLOSE_BMP
Name: METALLIC_MDIGLYPHMINIMIZE_BMP
Name: METALLIC_MDIGLYPHRESTORE_BMP
Name: METALLIC_MINIMIZEGLYPH19_BMP
Name: METALLIC_MINIMIZEGLYPH23_BMP
Name: METALLIC_MINIMIZEGLYPH6_BMP
Name: METALLIC_MINIMIZEGLYPH9_BMP
Name: METALLIC_MINIMIZEGLYPH_BMP
Name: METALLIC_NORMALGROUPBACKGROUND_BMP
Name: METALLIC_NORMALGROUPCOLLAPSE_BMP
Name: METALLIC_NORMALGROUPEXPAND_BMP
Name: METALLIC_NORMALGROUPHEAD_BMP
Name: METALLIC_PLACEBARBACKGROUND_BMP
Name: METALLIC_PLACEBARBUTTONS_BMP
Name: METALLIC_PROGRESSCHUNKVERT_BMP
Name: METALLIC_PROGRESSCHUNK_BMP
Name: METALLIC_PROGRESSTRACKVERT_BMP
Name: METALLIC_PROGRESSTRACK_BMP
Name: METALLIC_RADIOBUTTON13_BMP
Name: METALLIC_RADIOBUTTON16_BMP
Name: METALLIC_RADIOBUTTON25_BMP
Name: METALLIC_RESIZEGRIP2_BMP
Name: METALLIC_RESTOREGLYPH19_BMP
Name: METALLIC_RESTOREGLYPH23_BMP
Name: METALLIC_RESTOREGLYPH6_BMP
Name: METALLIC_RESTOREGLYPH9_BMP
Name: METALLIC_RESTOREGLYPH_BMP
Name: METALLIC_SCROLLARROWGLYPHSSMALL_BMP
Name: METALLIC_SCROLLARROWGLYPHS_BMP
Name: METALLIC_SCROLLARROWS_BMP
Name: METALLIC_SCROLLSHAFTHORIZONTAL_BMP
Name: METALLIC_SCROLLSHAFTVERTICAL_BMP
Name: METALLIC_SCROLLTHUMBGRIPPERHORIZONTAL_BMP
Name: METALLIC_SCROLLTHUMBGRIPPERVERTICAL_BMP
Name: METALLIC_SCROLLTHUMBHORIZONTAL_BMP
Name: METALLIC_SCROLLTHUMBVERTICAL_BMP
Name: METALLIC_SEPARATORVERT_BMP
Name: METALLIC_SEPARATOR_BMP
Name: METALLIC_SLIDERTRACK_BMP
Name: METALLIC_SMALLCLOSEBUTTON_BMP
Name: METALLIC_SMALLCLOSEGLYPH_BMP
Name: METALLIC_SMALLFRAMECAPTIONSIZING_BMP
Name: METALLIC_SMALLFRAMECAPTION_BMP
Name: METALLIC_SPECIALGROUPBACKGROUND_BMP
Name: METALLIC_SPECIALGROUPCOLLAPSE_BMP
Name: METALLIC_SPECIALGROUPEXPAND_BMP
Name: METALLIC_SPECIALGROUPHEAD_BMP
Name: METALLIC_SPINBUTTONBACKGROUNDDOWN_BMP
Name: METALLIC_SPINBUTTONBACKGROUNDLEFT_BMP
Name: METALLIC_SPINBUTTONBACKGROUNDRIGHT_BMP
Name: METALLIC_SPINBUTTONBACKGROUNDUP_BMP
Name: METALLIC_SPINDOWNGLYPH_BMP
Name: METALLIC_SPINLEFTGLYPH_BMP
Name: METALLIC_SPINRIGHTGLYPH_BMP
Name: METALLIC_SPINUPGLYPH_BMP
Name: METALLIC_STARTBUTTON_BMP
Name: METALLIC_STARTGROUPBACKGROUND_BMP
Name: METALLIC_STARTGROUPNEWAPPBUTTON_BMP
Name: METALLIC_STARTGROUPSEPERATOR_BMP
Name: METALLIC_STARTGROUPTOOLBARBUTTON_BMP
Name: METALLIC_STARTPANELLOGOFFBACKGROUND_BMP
Name: METALLIC_STARTPANELLOGOFFBUTTONSHOT_BMP
Name: METALLIC_STARTPANELLOGOFFBUTTONS_BMP
Name: METALLIC_STARTPANELMFUBACKGROUND_BMP
Name: METALLIC_STARTPANELMOREPROGARROWHOT_BMP
Name: METALLIC_STARTPANELMOREPROGARROW_BMP
Name: METALLIC_STARTPANELMOREPROGBACKGROUND_BMP
Name: METALLIC_STARTPANELPLACESBACKGROUND_BMP
Name: METALLIC_STARTPLACESSEPARATOR_BMP
Name: METALLIC_STARTPROGRAMSSEPARATOR_BMP
Name: METALLIC_STARTUSERPANEL_BMP
Name: METALLIC_STATUSBACKGROUND_BMP
Name: METALLIC_STATUSPANE_BMP
Name: METALLIC_TABBACKGROUND133_BMP
Name: METALLIC_TABBACKGROUND_BMP
Name: METALLIC_TABITEMBOTH_BMP
Name: METALLIC_TABITEMLEFT_BMP
Name: METALLIC_TABITEMRIGHT_BMP
Name: METALLIC_TABITEMTOPBOTH_BMP
Name: METALLIC_TABITEMTOPLEFT_BMP
Name: METALLIC_TABITEMTOPRIGHT_BMP
Name: METALLIC_TABITEMTOP_BMP
Name: METALLIC_TABITEM_BMP
Name: METALLIC_TABPANEEDGE_BMP
Name: METALLIC_TASKBANDBACKGROUND_BMP
Name: METALLIC_TASKBANDBUTTONNOEDGEVERTICAL_BMP
Name: METALLIC_TASKBANDBUTTONNOEDGE_BMP
Name: METALLIC_TASKBANDBUTTONVERTICAL_BMP
Name: METALLIC_TASKBANDBUTTON_BMP
Name: METALLIC_TASKBANDFLASHBUTTONGROUPMENU_BMP
Name: METALLIC_TASKBANDFLASHBUTTON_BMP
Name: METALLIC_TASKBANDHOVER_BMP
Name: METALLIC_TASKBANDSCROLLARROWGLYPHS_BMP
Name: METALLIC_TASKBANDSCROLLARROWS_BMP
Name: METALLIC_TASKBANDSCROLLSHAFTHORIZONTAL_BMP
Name: METALLIC_TASKBANDSCROLLSHAFTVERTICAL_BMP
Name: METALLIC_TASKBANDSCROLLTHUMBGRIPPERHORIZONTAL_BMP
Name: METALLIC_TASKBANDSCROLLTHUMBGRIPPERVERTICAL_BMP
Name: METALLIC_TASKBANDSCROLLTHUMBHORIZONTAL_BMP
Name: METALLIC_TASKBANDSCROLLTHUMBVERTICAL_BMP
Name: METALLIC_TASKBARBACKGROUNDVERTICAL_BMP
Name: METALLIC_TASKBARBACKGROUND_BMP
Name: METALLIC_TASKBARCHEVRONVERT_BMP
Name: METALLIC_TASKBARCHEVRON_BMP
Name: METALLIC_TASKBARGRIPPERVERTICAL_BMP
Name: METALLIC_TASKBARGRIPPER_BMP
Name: METALLIC_TASKBARSIZINGBARBOTTOM_BMP
Name: METALLIC_TASKBARSIZINGBARLEFT_BMP
Name: METALLIC_TASKBARSIZINGBARRIGHT_BMP
Name: METALLIC_TASKBARSIZINGBARTOP_BMP
Name: METALLIC_TASKBARTRAYVERTICAL_BMP
Name: METALLIC_TASKBARTRAY_BMP
Name: METALLIC_TOOLBARBACKGROUND_BMP
Name: METALLIC_TOOLBARBUTTONSSPLITDROPDOWNGLYPH_BMP
Name: METALLIC_TOOLBARBUTTONSSPLITDROPDOWN_BMP
Name: METALLIC_TOOLBARBUTTONSSPLIT_BMP
Name: METALLIC_TOOLBARBUTTONS_BMP
Name: METALLIC_TOOLBARGRIPPERVERT_BMP
Name: METALLIC_TOOLBARGRIPPER_BMP
Name: METALLIC_TRACKBARDOWN13_BMP
Name: METALLIC_TRACKBARDOWN16_BMP
Name: METALLIC_TRACKBARDOWN25_BMP
Name: METALLIC_TRACKBARHORIZONTAL_BMP
Name: METALLIC_TRACKBARLEFT13_BMP
Name: METALLIC_TRACKBARLEFT16_BMP
Name: METALLIC_TRACKBARLEFT25_BMP
Name: METALLIC_TRACKBARRIGHT13_BMP
Name: METALLIC_TRACKBARRIGHT16_BMP
Name: METALLIC_TRACKBARRIGHT25_BMP
Name: METALLIC_TRACKBARUP13_BMP
Name: METALLIC_TRACKBARUP16_BMP
Name: METALLIC_TRACKBARUP25_BMP
Name: METALLIC_TRACKBARVERTICAL_BMP
Name: METALLIC_TRAYCHEVRONHORIZONTALOPEN_BMP
Name: METALLIC_TRAYCHEVRONHORIZONTAL_BMP
Name: METALLIC_TREEEXPANDCOLLAPSE_BMP
Name: METALLIC_USERTILEBACKGROUND_BMP
Type: 0006 (String)
Name: 0006
Name: 0006
Name: 0006
Name: 0006
Name: 0006
Name: 0006
Name: 0006
Name: 0006
Name: 0006
Name: 0006
Name: 0006
Name: 0006
Name: 0006
Name: 0006
Name: 0006
Name: 0006
Name: 0006
Name: 0006
Name: 0006
Name: 0006
Name: 0006
Name: 0006
Name: 0006
Name: 0006
Type: 0010 (Version)
Name: 0010


I don't know, just thought it might be interesting to someone.  Of interest includes the Marshal.PtrToStringAnsi function.

Also of note: I originally specified the callback delegats to accept a string variable for lpType and lpName, because the Win32 API specifies that they're LPCTSTR and LPTSTR, respectively.  I was getting a weird error (0x000003e9 I believe, or something like that) which, when looked up, said Invalid Memory Access.  I tried a few things, and a sample indicated that they're not always strings (they might be built-in resource type identifiers, as indicated by the ResourceType enumeration).  So I changed them to IntPtr and conditionally use the Marshal.PtrToStringAnsi function when I know it's a string.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.