Fragment
05-06-2008, 06:18 PM
Navigating the user's default browser to a website
Here is a code, that you can put in a button, or anything you want, and it will navigate the user's default web browser to the website you put in there.
Here is the code:
AnsiString a = "open";
AnsiString b = "http://www.dxth4x.com/";
AnsiString c = " ";
ShellExecute(0, a.c_str(), b.c_str(), c.c_str(),c.c_str(),SW_MAXIMIZE);
Short, sweet and simple. It's good for making credits, that way, if you release a hack, all the lechers will know that it came from our website.
Launching an executable
In this tutorial, I will be explaining how you can make windows execute a program, given the directory.
I am using warrock as an example.
STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
ZeroMemory( &pi, sizeof(pi) );
CreateProcess(NULL,
"C:\\Program Files\\WarRock\\WRLauncher.exe", /*The file path*/
/*Also, remember that in C++, a '\' can only be represented by '\\'*/
NULL,
NULL,
false,
0,
NULL,
"C:\\Program Files\\WarRock", /*The containing folder*/
&si,
&pi);
Now, your hack can have a button that says LAUNCH WARROCK.
With warrock, this is easy, since all copies of the game install to the same directory.
Here is a code, that you can put in a button, or anything you want, and it will navigate the user's default web browser to the website you put in there.
Here is the code:
AnsiString a = "open";
AnsiString b = "http://www.dxth4x.com/";
AnsiString c = " ";
ShellExecute(0, a.c_str(), b.c_str(), c.c_str(),c.c_str(),SW_MAXIMIZE);
Short, sweet and simple. It's good for making credits, that way, if you release a hack, all the lechers will know that it came from our website.
Launching an executable
In this tutorial, I will be explaining how you can make windows execute a program, given the directory.
I am using warrock as an example.
STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
ZeroMemory( &pi, sizeof(pi) );
CreateProcess(NULL,
"C:\\Program Files\\WarRock\\WRLauncher.exe", /*The file path*/
/*Also, remember that in C++, a '\' can only be represented by '\\'*/
NULL,
NULL,
false,
0,
NULL,
"C:\\Program Files\\WarRock", /*The containing folder*/
&si,
&pi);
Now, your hack can have a button that says LAUNCH WARROCK.
With warrock, this is easy, since all copies of the game install to the same directory.