Right, I don't really know how to phrase this question, as my issue is quite strange.
Basically, I am using a DLL which is injected into another program. The DLL then includes some of the header files within the program it is in. I should be able to do this because it's what I'm told is the right approach by a tutorial I am following.
However, my issue is not with the code itself, more so with the compiler which is spitting out 'cannot include file 'xyz'. No such file or directory exists' as the header files I wish to include are not accessible to the program at that time.
I think what I need is something to override this error and force the compiler to compile, however, seeing as it is such an obscure issue, I don't know the solution and can't seem to find it on the internet.
The DLL then includes some of the header files within the program it is in.
It is important that you understand that this is not what is actually happening.
No such file or directory exists'
This issue is an easy one. The compiler cannot find the header you've included within it's given search path. You're either not including the right sub-folder or you've misspelled the headers name. There are other possibilities but those are the two most common mistakes.
If you are referring to that part about "what is actually happening" then allow me to clarify. The code gets compiled into your DLL, then your DLL is linked to the executable. Injecting the DLL into a host process makes the code in your DLL available to call from within the memory space of the host process. The two binary files remain distinctly separate entities. I guess I want to make sure you understand that DLL injection can't be used for something like hot patching.
The tutorial is probably fine. There are enough anonymous bullies on the internet that live to rip people apart for the simplest mistakes that broken tutorials don't stay up for very long. Double check the spelling of your included header files and make sure that they exist within the compilers search path.
I supposed that you could also link to the tutorial and one of us could tell you if it is broken or not.