Hello and welcome to this video.
In this video, I'm going to show you an improvement to the DNA injector going down to this project.
Then you have the action version two and zippi pulling the melody and.
So that's opening.
Take a look.
The only difference I make is the DNA injector does file.
So let's open it if not back.
Plus, plus.
Previously we have this here, which is static.
It means we have to actually copy this path and manually put it in here.
So now I change the code to make it automatic.
I put this new function called Get Tough to do now.
Get back together automatically.
Detect the Ghaffar.
I need to do is make sure this is the same for the.
S this far India injector, and you automatically detect it in the same in the same order.
So you didn't have to go in copy this path and B.C. here like this.
So how does this get past the hour?
First, I've already taken up this array and make it a global variable.
We need up here and here just before you do anything in the main function, the first thing you do is
you get back to the air so that you will construct this path for you.
And here is the definition I use the Microsoft Windows API call and get current day three, they get
cut in the rectory function retrieves the current directory for the current process.
It has got two parameters, the buffer linked to LSD buffer.
So the buffer line is 256 because the array for extremist 256 file, you can make it longer if you want.
And the second parameter is actually string Izell, which is this one.
So I put this as a second parameter here.
Once you got the current dietary EBC to the string part.
Yeah.
And then in the next function, I use a string function to obtain this Microsoft pind have string to
the path.
So in the end, you will get a full path containing your and Microsoft Bendern in this format.
But we the double stick that back.
So let me run this and show you how it works.
You can compile it in a normal manner.
So if you want a company, we just copy the path.
Open the.
Xixi for Netiv to command from a TV space, right click to change directory, hit, enter, and then
you can compile the new DNA injector using the same compiler script.
After compiling, you can run it, you know, usually do you inject it into it and you can see the merits
of being boxer.
So this nine here.
But did you print for you after the game like this?
So this line is coming from this spring.
Year after year.
So in print for you, the result of string concatenation, which was done by the string cat.
So I hope this improvement makes it easy for you guys.
So now you don't have to worry about having to copy that path and manually inserted here.
All you need to do is put your gear file in the same directory.
So, yes, he injector.
And in the future, I soon be using the machine to of the game, which can automatically detect idea.
See you in the next lesson.
Thank you for watching.