|
December 2006: example application updated from UIQ 3 beta SDK to final UIQ 3 SDK
This is an example of building and using a dynamic library in your UIQ 3 applications. We've received feedback that some developers were experiencing problems when installing this sort of application on the P990 smartphone and we hope that the information below helps.
Download example application>>
Here is how you should build this application:
Build for emulator:
- From command line in folder \MyDllApp\group:
- bldmake bldfiles
- abld build winscw udeb
- abld freeze winscw
- abld build winscw udeb
- In Codewarrior:
- import and build TestDLL first
- import, build and start HelloWorld
Build for Sony Ericsson P990 smartphone:
- From command line in folder \MyDllApp\group:
- bldmake bldfiles
- abld build gcce urel
- abld freeze gcce
- abld build gcce urel
- makesis HelloWorld_gcce.pkg
Important things to remember and check:
- » UIQ 3 SDK » Symbian OS v9.1 » Symbian OS Tools And Utilities » Build tools guide » How to build DLLs
- If you have some problems with the application, check "Troubleshooting building and installing P990 UIQ 3 applications" for clues about what could be wrong. Try commenting out most functionality to find out what causes problems.
- Use proper UIDs received from Symbian Signed.
- If you experience problems with the keyword EXPORTUNFROZEN, try this workaround to freeze the DLL, and then build for gcce. The keyword EXPORTUNFROZEN should be removed from the mmp file.
- Important issues related to capabilities for both application and library:
- Dll needs to have at least the same capabilities as the application that tries to use it.
- Dll need to have as many capabilities as possible so applications can use it: "Shared libraries that export a static interface will need to have capabilities such that all its users may load them".
- Platform Security information from Symbian – read pdf here>>
Rule 2: A process cannot load a DLL with less capabilities than itself…DLL capabilities do only reflect a level of trust…DLL capabilities do not authorise anything… DLL code runs at process' capabilities level… DLL can have more capabilities than process
- You can test this using this example (capability NetworkServices used by this application does not require the application to be signed - at installation, the user will be asked for permission):
- As the application is built initially, neither "exe" nor "dll" uses capabilities. The application can be installed and started on the P990 smartphone.
- If you add a capability to an "exe" only (simply uncomment "CAPABILITY" in .mmp file), rebuild and install on the P990, you'll get the error: "Application couldn't be started".
- If you add a capability also to the "dll", rebuild and install the application, you can see that it will start without any problems.
More information:
|