I have a legacy application that I've ported to the Symbian S60 3rd Edition FP[12] environment, and it runs on a Nokia N95. This legacy app uses the conventional main(argc, argv); I've wrapped the call to my main() with a C++ harness that snags the arguments:
CCommandLineArguments *cmdline = CCommandLineArguments::NewLC();
TInt count = cmdline->Count();
and then loops to pass them through to my main(). When run through the eshell in the emulator, this works great. Unfortunately I don't have an eshell for the N95.

I have tried writing a simple GUI wrapper, first with WRT, but there is a bug (https://xdabug001.ext.nokia.com/bugz...ug.cgi?id=6650 ) that gets in the way of that working. The application starts, but it sees none of the arguments passed.

So I wrote another GUI wrapper, based on the filebrowser example. When I get to selecting the file I want to process, I do this:
      TInt result;
      RApaLsSession apaSession;
      CApaCommandLine *command = CApaCommandLine::NewLC();

      _LIT(KAppFilename, "mylegacyapp");
      _LIT8(KOption_f, "-f\\Data\\myfile.foo");

      // Construct the command to start page.
      command->SetExecutableNameL( KAppFilename );
      command->SetCommandL( EApaCommandRunWithoutViews );
      command->SetTailEndL( KOption_f );

      result = apaSession.StartApp( *command );
And once again, the legacy application starts, but it doesn't see my arguments! Is this another manifestation of the same bug I uncovered in WRT, or is there a different (and correct) way for me to either pass the arguments from the GUI app or to get them from within the harness for my legacy app?