Ejemplo n.º 1
0
        /// <summary>
        /// Builds a set of CustomSectionAttributes flags from an ObjectNodeSection.
        /// </summary>
        private CustomSectionAttributes GetCustomSectionAttributes(ObjectNodeSection section)
        {
            CustomSectionAttributes attributes = 0;

            switch (section.Type)
            {
            case SectionType.Executable:
                attributes |= CustomSectionAttributes.Executable;
                break;

            case SectionType.ReadOnly:
                attributes |= CustomSectionAttributes.ReadOnly;
                break;

            case SectionType.Writeable:
                attributes |= CustomSectionAttributes.Writeable;
                break;
            }

            return(attributes);
        }
Ejemplo n.º 2
0
 private static extern bool CreateCustomSection(IntPtr objWriter, string sectionName, CustomSectionAttributes attributes, string comdatName);
Ejemplo n.º 3
0
 private static extern void SetCodeSectionAttribute(IntPtr objWriter, string sectionName, CustomSectionAttributes attributes = 0, string comdatName = null);
Ejemplo n.º 4
0
 private static extern bool CreateCustomSection(IntPtr objWriter, string sectionName, CustomSectionAttributes attributes, string comdatName);
Ejemplo n.º 5
0
 public void CreateCustomSection(string sectionName, CustomSectionAttributes attributes)
 {
     CreateCustomSection(_nativeObjectWriter, sectionName, attributes);
 }
Ejemplo n.º 6
0
 public void CreateCustomSection(string sectionName, CustomSectionAttributes attributes)
 {
     CreateCustomSection(_nativeObjectWriter, sectionName, attributes);
 }