コード例 #1
0
        public IVTPatcherResult Patch()
        {
            var rids = md.GetCustomAttributeRidList(Table.Assembly, 1);

            if (rids.Length == 0)
            {
                return(IVTPatcherResult.NoCustomAttributes);
            }

            if (FindIVT(rids, out var foundIVT, out uint ivtBlobOffset))
            {
                Array.Copy(ivtBlob, 0, data, ivtBlobOffset, ivtBlob.Length);
                return(IVTPatcherResult.OK);
            }

            if (!foundIVT)
            {
                return(IVTPatcherResult.NoIVTs);
            }
            return(IVTPatcherResult.IVTBlobTooSmall);
        }