[Autogenerated] the first thing we're going to do is to
create a Dll something to inject.
I'm going to right click here and create a new project this time we need the
DLL projects we can use the desktop wizard to create a DLL.
So let's call that injected DLL just to make it like super obvious,
create And I want to create a Dll here.
Let me just select the Dll here and we don't really need anything else here.
But let's just click OK.
We can use a pre compiled header and even export some
symbols but we don't really need that.
Just to prove that the DLL can be injected is injected into some
process so you can see a project has been created for us.
And the only thing that we have here of interest is the deal and main function.
That's the function that's going to be called
multiple times in the lifetime of DLL,
one of which is when it's being attached to a process.
When it's loaded into a process,
this DLL process attached is going to be invoked.
So this is what I want to do something in order to prove
that in fact everything we're doing here is going to work
or at least seems to work.
So I'm just going to use a simple message box function here in
order to indicate that were within this process.
So in order to do that,
I want to display some text which contains the process I d just to
prove that it is coming from this particular process.
So I'm going to do some work here by adding a C.
String for some text and for that I'm going to just include a T L
str here to get that C string available to me.
And then I'm going to use a simple format.
That's one way of doing that.
We could do that in in other ways.
I'm going to use format here and simply provide some message
like message from injected DLL in process and this is where I'm
going to paste in the process I.
D.
That we're in get current process IDE Once we've done
that we have the proof that we need,
let's just have a simple title like injected the DLL and MB icon
information will be good enough to show information,
icon.
Essentially we're done.
It's just a matter of doing something very simple just to prove that in fact
we are able to be part of a new process if all goes well.
So there is some error here for the compiler doesn't really like all
these cases being skipped because we're defining new variables here just
for simplistic and just get rid of all the others because we don't really
need them for any kind of capacity.
So now that we have a deal all ready to go,
we can move over to the next stage which is to create our injecting process