I am trying to convert an exe to dll and manually call the main
function from the DLL in my C++ program.
The main function in the code of this exe (generated from another C++ program) looks like this:
int main(int argc, char* argv[])
Now, in my C++ program, earlier I was passing the command line arguments to this exe as follows:
system(somexe test.txt test1.txt test2.txt);
The int argc
and argv array
are automatically then passed to the exe program. However, I am not sure as to how I would be passing the above parameters if I have to call this function manually. Do I have to manually generate an array everytime with these parameters, and also manually pass the number of elements in this array?