Which cpabilities are required ?
| Tue, 2008-10-07 11:32 | |
|
Hi All, I am using S60 3rd edition sdk(FP1). I have two application . 1] App1 : This application is using one mytest.dll for getting the data. When we install this application on device the mytest.dll is goes in :\sys\bin. This application ( App1 ) works fine. 2] App2; This app have GUI and using that mytest.dll for getting the data . This application have basic capabilities NETWORKSERVICES READUSERDATA WRITEUSERDATA LOCALSERVICES UserEnvironment when i install this app on device it is successfully installed but when i tried to launch to gives "Unable to execute file for security reason (-46)" Queries : Thanks And Regards, |
|






Forum posts: 672
Capabilities are process specific, that is, are related to your application (exe), not to the dll. Dll is loaded into the app's process and is able to access the application specific capabilities on the device. So the app capabilities matter. If the dll tries to use capabilites the application does not have, it cannot access those functionalities. Is the dll requiring any capabilities the application does not have?
Edit: it is also true what is said below. Make sure the dll has equal or more capabilities the apps using it have. Otherwise the apps cannot load the dll with more caps than the app. But it is also true that if the dll actually does try to use a function with a required capability the exe does not have, then this does not work either. I hope I am getting this out right, these darn caps...
Forum posts: 114
If the DLL is missing any of the capabilities of the APP then the application can not be started.
Check that the DLL is having atleast all the capabilities of the application.
In order that the application can load the dll, the dll must have the capabilities "NETWORKSERVICES READUSERDATA WRITEUSERDATA LOCALSERVICES UserEnvironment". It may have other capabilities in addition to this. The capabilities of the dll must be superset of that of app.
Chao,
Raghav
Forum posts: 159
"1] for using that mytest.dll in App2 needs same set of capabilities that are used in mytest.dll?"
You haven't said what the relationship, if any, between mytest.dll and mytest2.dll is so how can we answer this?
Typically DLLs have All-TCB and then when loaded their actual operating set of capabilites becomes that of the loading exe.
Forum posts: 98
Hi All,
First of all Thanks every one for your valuable replies .
Ref Numpty Alert :
Both applications ( App1 and App2 ) are using same dll. There is no mytest2.dll. But dll have some internal functionality or have some function calls that required these capabilities such as AllFiles etc.
I have included that dll in App2 application's mmp file but not in package because it is already present on device that i m using.
because App1 is already installed on my device and it is packaging that mytest.dll .
App1 works fine using that dll.
Waiting for reply.
Thanks And Regards,
Yogesh Bhople
Forum posts: 159
Give your dll the capabilities All-TCB then it will capable of being loaded by both apps.
Forum posts: 98
Hi All,
Thanks guys for reply.
Ref Andreas :
But it is also true that if the dll actually does try to use a function with a required capability the exe does not have, then this does not work either.
I agreed with Andreas.I found one link regarding this issue.
http://wiki.forum.nokia.com/index.php/TSS000454_-_DLL_capability_model_in_a_secure_platform
With Ref to above link:A DLL capability does not grant the DLL access to any capability-restricted resources (not even if the DLL has ALL -TCB). For that access you will need a process with ALL -TCB capabilities. DLL capabilities only reflect the level of trust, so that the loading process can be sure that the DLL it is capable of loading has been tested to be trusted with the set of capabilities that the process has.
Conclusion :
"Process(.exe) must have super set of capabilities than dll ."
Anybody having any comment on this then please reply.
Thanks And regards,
Yogesh Bhople
Forum posts: 672
I'd summarize that
a) give your dll as much capabilities as possible, all -tcb is often recommended.
b) give your exe the capabilities actually used by it and the dlls the exe uses
a), because otherwise the many apps using your dll may notice that they (some of them) cannot load a dll since the dll has too little capabilities.
b), because otherwise your app does not run (the process (app) tries to use functionality (by code in a dll) which it (the exe) has no capabilities to do).
Forum posts: 159
""Process(.exe) must have super set of capabilities than dll .""
No, the other way around. Superset means greater set. Subset means smaller set.
If the exe has more capabilites than the dll then then the dll won't load.