views:

40

answers:

0

I just getting started using IMetaDataEmit to write some .NET IL. I'm having trouble getting the mdTypeRef for a System.Byte (which I would like to use to declare a byte array on the stack). Here is my attempt.

metaDataEmit->DefineTypeRefByName(NULL, L"System.Byte", &byteToken);

This throws an error message that says "Could not load type 'System.Byte' from assembly '[the assembly that I am writing IL to]'."