PERWAPI.MetaDataOut.AddResource C# (CSharp) Méthode

AddResource() private méthode

private AddResource ( byte resBytes ) : uint
resBytes byte
Résultat uint
        internal uint AddResource(byte[] resBytes)
        {
            if (resources == null) resources = new ArrayList();
            resources.Add(resBytes);
            uint offset = resourcesSize;
            resourcesSize += (uint)resBytes.Length + 4;
            return offset;
        }

Usage Example

Exemple #1
0
 /*----------------------------- internal functions ------------------------------*/
 internal override sealed void BuildTables(MetaDataOut md)
 {
     md.AddToTable(MDTable.ManifestResource,this);
     nameIx = md.AddToStringsHeap(mrName);
     if (resourceBytes != null) {
         if (impl != null)
             throw new Exception("ERROR:  Manifest Resource has byte value and file reference");
         fileOffset = md.AddResource(resourceBytes);
     } else {
         if (impl == null)
             throw new Exception("ERROR:  Manifest Resource has no implementation or value");
         impl.BuildMDTables(md);
     }
 }