hey guys im working on a project where i have to generate an executable containing the byte array of another executable, basicly my program loads a executable and stores all of the corresponding bytes in an array and then i give codedom the source of the executable im going to build and then im looping through the bytearray containing the executable and adding it to the new bytearray in the codedom source before compiling with codedom
is there an easier way to pass a bytearray from program1 to the source of program2 before compiling program2 ?
i should mention that i have split the source into 3 parts so that i could add the bytearray :S to the source string O.o
i have looked over the finished code and there's nothing wrong with it but when im compiling it with codedom i get the folloing error
Error: C\Users\*myname*\AppData\Local\Temp\ycfx9ffp.0.cs(1,246) : error CS0031: Constant value '197185' cannot be converted to a 'byte'
and i have no idea how to debug that string lol :S
this is the loop im using to add bytes to the source:
foreach(byte mybyte in stryker)
{
if (mybyte != stryker[stryker.Length - 1])
part2 += mybyte + ", ";
else
part2 += mybyte;
}
string source = part1 + part2 + part3;