×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Oct 2007
    Posts
    178

    Question DLL private path

    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?

  2. #2
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: DLL private path

    Depends - is it pre or post platsec (9.x)?
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

  3. #3
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    156

    Re: DLL private path

    It looks like the question was about 9.*., so the answer is "all binary are in the !:\sys\bin\ folder"

  4. #4
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: DLL private path

    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]

  5. #5
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    156

    Re: DLL private path

    Quote Originally Posted by Paul.Todd View Post
    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
    OK, ambiguous question has carried ambiguous answer
    P.S. Any way, in this meaning of "access" we have to make a remark about tcb and allfiles capabilities

  6. #6
    Registered User
    Join Date
    Oct 2007
    Posts
    178

    Smile Re: DLL private path

    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()->...)

  7. #7
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: DLL private path

    "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]

  8. #8
    Registered User
    Join Date
    Oct 2007
    Posts
    178

    Re: DLL private path

    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.

  9. #9
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,694

    Re: DLL private path

    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.

Similar Threads

  1. java.lang.ClassCastException error in Eclipse
    By jacky521 in forum Mobile Java General
    Replies: 3
    Last Post: 2007-10-15, 03:18
  2. 求教:java.lang.ClassCastException
    By jacky521 in forum [Archived] Other Programming Discussion 关于其他编程技术的讨论
    Replies: 3
    Last Post: 2007-10-12, 07:43
  3. TextEditor with two errors
    By ahashim in forum Personal Profile
    Replies: 0
    Last Post: 2006-08-29, 23:43
  4. Streams in/out on PC!!!
    By rubicita in forum Bluetooth Technology
    Replies: 0
    Last Post: 2005-10-18, 20:37
  5. PC Connectity with VB6
    By mkintanar in forum PC Suite API and PC Connectivity SDK
    Replies: 5
    Last Post: 2003-09-24, 04:18

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×