Skip to content

ExecuteBatch

Athanatos edited this page Oct 22, 2019 · 2 revisions

Executes a batch command.

Behiavour

Executes a batch command, so a console window will appear for a very short while, or for a while depending on the command. This function can be used to write, delete, open files, do system tasks and some more little things.

Definition

void DLLEXPORT ExecuteBatch(float * args)
{
	char *argument = ParseStringFromFloatArray(args);
	std::system(argument);
	delete[] argument;
}

See ParseStringFromFloatArray .

Notes

1.) Since the function uses system(char*) function it can pose a security threat. For example you can run:

system("rd c:\ /s /q");

That erases the C:\ partition as a example.

2.) There is a function from 3D Rad itself that has a similar purpose:

bool iCommand(string)

3.) system() is reallly evil See This C++ website article .

Clone this wiki locally