Click here to Skip to main content
15,897,371 members
Articles / Desktop Programming / Win32

File Resource Management Library (.NET)

Rate me:
Please Sign up or sign in to vote.
4.82/5 (27 votes)
16 Sep 2009CPOL14 min read 134.5K   2.6K   113  
A .NET implementation of a file resource management, with complete support for VS_VERSIONINFO version resources.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>What's New</title>
    <style type="text/css">
        body
        {
            color: #000000;
            font-family: Arial;
            font-size: 75%;
        }
        a
        {
            font-family: Arial;
            text-decoration: none;
        }
        code
        {
            color: #b22222;
            font-family: Courier New;
        }
    </style>
</head>
<body>
    <h3>
        1.2 (TBD)</h3>
    <p>
        <b>New Features</b></p>
    <ul>
        <li>Added support for <code>RT_MANIFEST</code>, Windows SxS XML resources.</li>
        <li>Added support for <code>RT_GROUP_CURSOR</code> and <code>RT_CURSOR</code> cursor
            resources, including loading .cur files and manipulating hotspot information.</li>
        <li>Added support for <code>RT_BITMAP</code>, bitmap resources.</li>
        <li>Added support for <code>RT_DIALOG</code>, dialog resources.</li>
        <li>Added support for <code>RT_STRING</code>, string resources.</li>
        <li>Added support for <code>RT_MENU</code>, menu resources.</li>
        <li>Added support for <code>RT_ACCELERATOR</code>, accelerator resources.</li>
        <li>Added limited support for <code>RT_FONTDIR</code> and <code>RT_FONT</code>, font
            resources.</li>
    </ul>
    <p>
        <b>Misc</b></p>
    <ul>
        <li>Added support for version resources with an omitted <code>VS_FIXEDFILEINFO</code>.</li>
        <li>Added <code>Resource.TypeName</code> that provides a string representation of the
            resource type.</li>
        <li>Added <code>StringTable.CodePage</code> and <code>StringTable.LanguageID</code>
            properties.</li>
        <li>Added <code>GenericResource.Data</code> read-only data bytes for unsupported resource
            types.</li>
        <li>Interface change: renamed <code>StringResource</code> to <code>StringTableEntry</code>
            to accommodate for actual string resource support.</li>
        <li>Interface change: added <code>ResourceId</code> that represents well-known and custom
            resources alike and provides comparison and hashing that works for all resource
            Id types. Both <code>Resource.Name</code> and <code>Resource.Type</code> now return
            <code>ResourceId</code> and public interfaces that accepted an <code>IntPtr</code>
            now require a <code>ResourceId</code>.</li>
        <li>Interface change: <code>GroupIconResource</code> was renamed to <code>IconDirectoryResource</code>.</li>
        <li><code>Resource.Name</code> is no longer read-only.</li>
        <li><code>IconImage</code> was extended and renamed to <code>DeviceIndependentBitmap</code>.
            The latter supports separating mask and color, etc.</li>
        <li>Automatically appending a second null-terminator to <code>StringResource</code>
            when required. Internal storage is now always with two null terminators.</li>
        <li>Added VersionResource.ToString() that returns a standard resource file string representation
            of the version resource and all its tables.</li>
    </ul>
    <p>
        <b>Bugs</b></p>
    <ul>
        <li>Bug: error deleting an English version resource which was loaded as language-neutral.</li>
        <li>Bug: custom resources with literal string names return an invalid value in <code>
            Resource.Name</code> and <code>Resource.Type</code>.</li>
        <li>Bug: <code>StringResource</code> length in its header is incorrect after the value
            is updated.</li>
        <li>Bug: <code>VersionResource.Write</code> erroneously included padding in the structure
            size.</li>
    </ul>
    <h3>
        1.1 (2009-02-19)</h3>
    <ul>
        <li>First release off <a href="http://resourcelib.codeplex.com">CodePlex</a>.</li>
        <li>Added support for <code>RT_GROUP_ICON</code> and <code>RT_ICON</code>, icon resources.</li>
    </ul>
    <h3>
        1.0 (2008-06-30)</h3>
    <ul>
        <li>First release, <a href="http://www.codeproject.com/KB/library/ResourceLib.aspx">
            CodeProject Article</a>.</li>
        <li>Support for <code>RT_VERSION</code> and <code>VS_VERSIONINFO</code>, version resources.</li>
    </ul>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
dB.
Team Leader Application Security Inc., www.appsecinc.com
United States United States
Daniel Doubrovkine has been in software engineering for twelve years and is currently development manager at Application Security Inc. in New York City. He has been involved in many software ventures, including Xo3 and Vestris Inc, was a development lead at Microsoft Corp. in Redmond, and director of Engineering at Visible Path Corp. in New York City. Daniel also builds and runs a foodie website, http://www.foodcandy.com.

Comments and Discussions