本文整理汇总了C#中PEAPI.MetaData.AddToBlobHeap方法的典型用法代码示例。如果您正苦于以下问题:C# MetaData.AddToBlobHeap方法的具体用法?C# MetaData.AddToBlobHeap怎么用?C# MetaData.AddToBlobHeap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PEAPI.MetaData
的用法示例。
在下文中一共展示了MetaData.AddToBlobHeap方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BuildTables
internal sealed override void BuildTables(MetaData md)
{
md.AddToTable(MDTable.CustomAttribute, this);
if (byteVal == null) {
valIx = 0;
return;
}
BinaryWriter bw = new BinaryWriter(new MemoryStream());
bw.Write(byteVal);
MemoryStream str = (MemoryStream)bw.BaseStream;
valIx = md.AddToBlobHeap(str.ToArray());
}
示例2: GetSigIx
internal override uint GetSigIx(MetaData md)
{
MemoryStream sig = new MemoryStream();
TypeSig(sig);
return md.AddToBlobHeap(sig.ToArray());
}
示例3: GetBlobIndex
internal sealed override uint GetBlobIndex(MetaData md)
{
if (!addedToBlobHeap) {
byte [] b = Encoding.Unicode.GetBytes (val);
blobIndex = md.AddToBlobHeap(b);
addedToBlobHeap = true;
}
return blobIndex;
}
示例4: BuildTables
internal sealed override void BuildTables(MetaData md)
{
if (done) return;
MemoryStream sig = new MemoryStream();
sig.WriteByte((byte)callConv);
MetaData.CompressNum(numPars+numOptPars,sig);
returnType.TypeSig(sig);
for (int i=0; i < numPars; i++) {
parameters[i].TypeSig(sig);
}
sigIx = md.AddToBlobHeap(sig.ToArray());
if (numOptPars > 0) {
sig.WriteByte(Sentinel);
for (int i=0; i < numOptPars; i++) {
optParams[i].TypeSig(sig);
}
}
done = true;
}
示例5: TypeSpec
internal TypeSpec(Type aType, MetaData md)
{
MemoryStream sig = new MemoryStream();
aType.TypeSig(sig);
sigIx = md.AddToBlobHeap(sig.ToArray());
tabIx = MDTable.TypeSpec;
}
示例6: FileRef
internal FileRef(uint nameIx, byte[] hashBytes, bool metaData,
bool entryPoint, MetaData md) {
if (!metaData) flags = NoMetaData;
if (entryPoint) md.SetEntryPoint(this);
this.nameIx = nameIx;
hashIx = md.AddToBlobHeap(hashBytes);
tabIx = MDTable.File;
}