A quick question:
Does a DLL have it's own private path or do I have to access to the parent class' private path and how can I do that?
How about plugins?
A quick question:
Does a DLL have it's own private path or do I have to access to the parent class' private path and how can I do that?
How about plugins?
Depends - is it pre or post platsec (9.x)?
Download Symbian OS now! [url]http://developer.symbian.org[/url]
It looks like the question was about 9.*., so the answer is "all binary are in the !:\sys\bin\ folder"
Well the question is ambiguous, however what the poster is asking is if UID3 gives the dll access to a folder in \private\<uid3 of dll> or if the dll only has access to uid3 of the hosting process.
In a platsec version the latter is the case so the dll cannot access any private folders aside from the private folder of each instance of the hosting process. If the dll is loaded into 3 different processes then each instance will have access to 3 different uids (the uids of each process that loaded that instance of the dll) Each instance cannot access data in the other instance as they are in seperate processes
Download Symbian OS now! [url]http://developer.symbian.org[/url]
First off, thanks for your comprehensive answers. And the OS version is 9.2 actually...
So, I can access my parent (host) class' private folder from the DLL if I only know the UID of the host, right?
Btw, is there a quick way to get the UID from DLL. Only way I know is to give the UID from host in parameter to DLL when creating the instance of it.
And DLL still has it's own private folder, atleast RFs' PrivatePath() gives private path based on DLL's own UID.
But I cannot create the private path in DLL, since I don't know the drive and can't get it from application name(CEikonEnv::Static()->...)
"So, I can access my parent (host) class' private folder from the DLL if I only know the UID of the host, right?"
- yes, but its easier to use RFs::PrivatePath
Btw, is there a quick way to get the UID from DLL. Only way I know is to give the UID from host in parameter to DLL when creating the instance of it. Why? If you have to use RLibrary::Type()
"And DLL still has it's own private folder, atleast RFs' PrivatePath() gives private path based on DLL's own UID."
If you look in the emulator you will see capability checks failing with things such as you require ALLFILES in order to read that folder
"But I cannot create the private path in DLL, since I don't know the drive and can't get it from application name(CEikonEnv::Static()->...)"
Show some imagination! Try RProcess().FileName()[0] to get the drive letter.
Creating an RProcess object by itself implicitly sets its handle to that of the process that it is currently running under. Good practise dictates that you also need to check the resulting drive letter is not z and if it is then change it to c as you cannot write to ROM drives
Download Symbian OS now! [url]http://developer.symbian.org[/url]
Thanks!
I used my imagination as hard as I could, but still I couldn't form the word: "RProcess" to pop in my head. =P Best I came up with was RApaLsSession, but that somehow doesn't seem to work, most likely I was using wrong UID. RProcess is very handy, atleast it seems, gotta try it out...And keep that z-drive in mind.
There was a typo in my message earlier, what I meant, was how to get host's UID from DLL without giving it as a parameter to DLL.
Also note that in case of private folder actually the secure id is what matters - however SID=UID3 unless you explicitly specify it in your .mmp file.
Anyway, RProcess::SecureId will obviously provide you the correct secure ID in both cases, and RFs::PrivatePath still remains more comfortable.