First place, I embedded into my C# project an unmanaged EXE (pdftotext.exe, actually). I wrote a method to call it using the traditional:
Assembly assembly = Assembly.GetExecutingAssembly();
Stream stream = assembly.GetManifestResourceStream(assembly.GetName().Name +".pdftotext.exe");
byte[] ba = new byte[stream.Length];
stream.Read(ba, 0, ba.Length);
I worked perfectly, until I decided to build a library to hold all my functions, including this one. Accordingly, I embedded the unmanaged EXE into my new DLL. Now I try to call the method from my project, but it stops in byte[ba] as 'stream' would have 'null' value. Any help would be appreciated, because I'm currently lost.