Example #1
0
        internal Win32ResourceName(IntPtr namePointer, Win32ResourceType parentType)
        {
            Languages  = new List <Win32ResourceLanguage>();
            ParentType = parentType;

            Int32 nameInt; String nameStr;

            Win32ResourceHelper.GetId(namePointer, out nameInt, out nameStr);
            NameInt = nameInt; NameStr = nameStr;

            if (NameInt > -1)
            {
                FriendlyName = NameInt.ToString(Cult.InvariantCulture);
            }
            else
            {
                FriendlyName = NameStr;
            }
        }
Example #2
0
        /// <summary>Constructs a Win32 resource type based on a Win32 resource type LPCTSTR.</summary>
        internal Win32ResourceType(IntPtr typePointer, Win32Image parentImage)
        {
            Names       = new List <Win32ResourceName>();
            ParentImage = parentImage;

            Int32 typeInt; String typeStr;

            Win32ResourceHelper.GetId(typePointer, out typeInt, out typeStr);
            TypeInt = typeInt; TypeStr = typeStr;

            if (TypeInt > -1)
            {
                FriendlyName = Win32ResourceHelper.GetTypeFriendlyName(TypeInt);
            }
            else
            {
                FriendlyName = TypeStr;              // TODO: W3b.TextFilters.TitleCase the friendly name
            }
        }