Is exist way to launch and stop cocos2d-x from marmalade application?

is exist way to launch and stop cocos2d-x from marmalade application?

I would like create application where cocos2d-x runs as separate view/screen.
I mean that for this app will necessary mix IwNui and cocos2dx but they don’t need work together on one screen.

I have some ideas about it:

  1. I created AppDelegate::Run() with code from CCApplication::Run().
    This is looks like good place to run/stop cocos2dx.

  2. CCDirector::sharedDirector()>end it’s responsible for stop and shutdown application.
    I found what exit point located in CCEGLView::release(), it’s stop application by s3eDeviceRequestQuit().
    After I deleted of the s3eDeviceRequestQuit() line, sharedDirector()->end() become stop cocos2dx without killing application.

Some of cocos2d-x classes has a static variables(flags) which is controling the initialization process.
So after cocos2d-x application stoped and destroyed,
these static vars stay exist and so at next launch cocos2d-x can’t launch correctly.