MakeDebuggable() 공개 메소드

Makes the assembly debuggable by attaching the DebuggableAttribute to the Assembly. Call immediately before calling WritePEFile.
public MakeDebuggable ( bool allowDebug, bool suppressOpt ) : void
allowDebug bool set true to enable debugging, false otherwise
suppressOpt bool set true to disable optimizations that affect debugging
리턴 void
예제 #1
0
        internal static System.Reflection.Assembly Load(PEFile assembly) {
            MemoryStream binaryStream = new MemoryStream();
            assembly.SetOutputStream(binaryStream);
            assembly.MakeDebuggable(false, false);
            assembly.WritePEFile(false);
            byte[] assemblyBytes = binaryStream.ToArray();

            System.Reflection.Assembly loadedAssembly = System.Reflection.Assembly.Load(assemblyBytes);
            loaded.Add(loadedAssembly);
            return loadedAssembly;
        }