Page 1 of 1

Launching an Irrlicht program with parameters

Posted: Mon Sep 12, 2005 8:26 am
by Didine
How to execute an irrlicht program witch have received an external parameter like a file name. For example, MyMenu test.bsp ?
I'm using the system function but after, I don't know how to do in the target app.

Many thx

Posted: Mon Sep 12, 2005 11:54 am
by cpprules
WinMain() or main() takes external paramters example:

int WINAPI WinMain(HINSTANCE hinstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)

Posted: Mon Sep 12, 2005 12:07 pm
by Fred
Search Google - all the information you need is out there.

Posted: Tue Sep 13, 2005 6:56 am
by Didine
Sorry, I gave a wrong description of my problem.

I'm using the folowing code with a default parameter for my test :

Code: Select all

int main(char *MyFile="test.bsp")
...
  IAnimatedMesh* mesh = smgr->getMesh(MyFile);
Of course, the program is crashing, but I don't know how to do that.

Thx
:(

Posted: Tue Sep 13, 2005 7:02 am
by Dances
try using something other than char like stringw or wchar_t