Showing posts with label EXE files. Show all posts
Showing posts with label EXE files. Show all posts

Friday, September 08, 2006

Running EXE file on the S60 2nd Edition


Use this code for the 2nd edition. Note that the first half of the if statement is just so that the code works on the emulator. This is because the emulator uses a Dynamic Link Library (DLL), therefore we need to employ library functions. However the overall outcome is the same.


TRequestStatus start;
TServerStart starter(start);

#ifdef __WINS__ // On the Windows emulator the process is a DLL
RLibrary lib;
lib.Load(KBinaryName, BinaryUid);
TLibraryFunction export1 = lib.Lookup(1);
TThreadFunction threadFunction = reinterpret_cast (export1());
TName name(KBinaryName);
// Randomness ensures a unique thread name
name.AppendNum(Math::Random(), EHex);

// Now create the server thread
const TInt KMinHeapSize=0x1000;
const TInt KMaxHeapSize=0x1000000;
RThread thread;
thread.Create(name, threadFunction, KDefaultStackSize,
&starter, &lib, NULL,KMinHeapSize, KMaxHeapSize, EOwnerProcess);
lib.Close();
#else // Phone hardware
RProcess process;
process.Create(KBinaryName,starter.AsCommand(), BinaryUid);
#endif

Running EXE file on S60 3rd Edition

This code only works on S60 3rd Edition.
You can use it to invoke an executable from with your application. Make sure you cleanup after yourself and don't leave any rouge applications running in the background.


RProcess server;
server.Create(KServerName, KNullDesC);

CApaCommandLine* commandLine = CApaCommandLine::NewL();
commandLine->SetExecutableNameL(KExecutableName);
commandLine->SetProcessEnvironmentL(server);

RApaLsSession ApaSession;
ApaSession.Connect();
ApaSession.StartApp(*commandLine);
ApaSession.Close();

delete commandLine;

Friday, July 14, 2006

File Explorer Tricks for Series60 phones


* How to reset the operator logo :

1) go to the following dir :

c:\system\apps\phone\oplogo

1) delete any file in this directory

3) restart the phone

* to make a screenshot on a Nokia 3650, 6600 :

1) use the pencil key + '0'
2) the screenshot is saved in C:\NOKIA\IMAGES\FE_img\

* to make a screenshot on a SX1 :

1) use the shift key + '0'
2) the screenshot is saved in C:\NOKIA\IMAGES\FE_img\

* remember, there are some shortcuts :

: copy
: show path (scroll with joystick left/right)
: PageUp
: cut
:
*not yet used*
: top of the list
: paste
:
*not yet used*
: PageDown
: Mark / Unmark a file
: go to root
: file properties
: delete a file

* running exe files :

With version 1.13,in the directory of FExplorer a console exe file : EXETEST.EXE (you can run it), the purpose is only to test if FExplorer can run EXE files on your phone.

* restoring the last path in views :

After leaving the 'about box', 'settings' or the 'editor' view, if FExplorer return to the root directory, check that the 'save last path' in the settings is 'ON', not only this settings is used when leaving FExplorer but i's also used in all the differents 'views' (06/03/2005).

* how to switch between the text/hex viewer :

Simply, go to the settings and choose the viewer type : text or hex (06/05/2005).