Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Registered User SimonJudge's Avatar
    Join Date
    Jul 2005
    Location
    UK
    Posts
    32
    I have a client-server arrangement where the server is doing a RThread::RequestComplete to complete an asynchronous request.

    I am getting the following in the debug messages...

    "*PlatSec* WARNING - Process Isolation check would have failed - Thread xxxxServer.EXE::xxxxServer attempted an prohibited operation. Additional diagnostic message: Attempt to use RThread::RequestComplete on a thread in another process"

    The server currently has capability All - TCB. The emulator currently has Platsec disabled.

    What do I have to do pass the process isolation check?

    Thanks

    Simon Judge

  2. #2
    Super Contributor Paul.Todd's Avatar
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644
    This API function is deprecated in 9.x and should not be used, so I guess you will have to reengineer the code.

    This check is independant of the capabilities.

    AFAIK there is no alternative as I can see it, aside from using RMessage

  3. #3
    Registered User SimonJudge's Avatar
    Join Date
    Jul 2005
    Location
    UK
    Posts
    32
    Paul

    Thanks for the reply. I am using RThread::RequestComplete() to signal to the client that the server process has initialised. Until this happens, it's not safe to use SendReceive() (and hence RMessage).

    What's the recommended way to detect a Server has initialised under 9.1? What mechanism do the built-in servers use under 9.1?

    Thanks

    Simon

  4. #4
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    27,743
    Quote Originally Posted by SimonJudge
    I am using RThread::RequestComplete() to signal to the client that the server process has initialised. Until this happens, it's not safe to use SendReceive() (and hence RMessage).
    It is better (and possible) to use Publish and Subscribe, for example "Speculative publishing".

  5. #5
    Super Contributor Paul.Todd's Avatar
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644
    The recommended way to do this (ok my personal opinion) is to use the Rendezvous functions in RThread and RProcess.

    There are sample in the OS9 and OS7 devkits on it.

  6. #6
    Registered User symbianab's Avatar
    Join Date
    Apr 2006
    Posts
    1
    Like this?
    On the client side:
    TRequestStatus status = KRequestPending;
    RProcess server;
    server.Create(.....); // Create the server process
    server.Rendezvous(status); // Trigger rendezvous on the supplied TRequestStatus objekt

    User::WaitForRequest(status); // Wait for the request to complete

    and on the server side:
    RProcess myProcess; // Get my current process
    myProcess.Rendezvous(err); // Indicate to the calling process/thread that this process has completed startup

  7. #7
    Super Contributor Paul.Todd's Avatar
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644
    After the server.Create, you need a server.Resume() to kick off the process, but thats more or less it.

  8. #8
    Registered User david.caabeiro's Avatar
    Join Date
    Apr 2005
    Location
    Barcelona
    Posts
    1,678
    Yes, definitely RendezVous() is the way to go..

    (symbianab, note also that it's not necessary to set status to KRequestPending manually..I'd even say it's not recommended at all..)

  9. #9
    Super Contributor lenclud's Avatar
    Join Date
    May 2006
    Location
    Germany
    Posts
    593
    Does RProcess::Rendezvous works the other way around?
    So if a process is waiting for a RProcess::Rendezvous on itself and another process is completing the Rendezvous using the first process handle?

    It looks to me like it won't work. I guess I'll have to use P&S and RProperty.

  10. #10
    Super Contributor Paul.Todd's Avatar
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644
    I can't see a use case for a process or thread to rendezvous on itself, it plain does not make sense

    Can you explain further about what you are trying to do?

  11. #11
    Super Contributor lenclud's Avatar
    Join Date
    May 2006
    Location
    Germany
    Posts
    593
    Your typical use case is where one process is completing the Rendezvous using his own handle. So you are sending an integer value across the process boundary to anyone waiting for that process Rendezvous.

    What I'm saying is the the complete Rendezvous function appears to work only if called by the process itself. So a process can't complete Rendezvous on an other process handle only on his own handle. Hope it makes sense.

    All I wanted to do was send an integer from one process to another. I used RProperty and it works just fine.

  12. #12
    Super Contributor Paul.Todd's Avatar
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644
    I think I see the problem.

    For RProcess, one of the Rendezvous functions (the static one) is used to signal the waiting process that it is ready. (This one is called on the server)

    The other Rendezvous function actually sets up the rendezvous call. (This one goes on the client)

    You might want to look at Hamish Willee's etal's excellent tutorial (http://developer.symbian.com/main/do...nOSv9_v1.3.pdf) on how to use rendezvous

  13. #13
    Nokia Developer Champion stenlik's Avatar
    Join Date
    Mar 2004
    Location
    Czech Republic
    Posts
    2,037
    Hi,

    I faced exactly the same problem - I passed client thread id and TRequestStatus wrapped as command line parameters to the server during stratup.
    When server was initialized I opened thread handle using passed id and call RThread::RequestComplete(), so client code continued executing.

    This approach unfortunately causes "process isolation error" on OS9. Happily it offers rendezvous mechanism, which is clean and much more easy-to-use solution. I'm also using it now

    Regards,
    STeN

  14. #14
    Super Contributor paipeng's Avatar
    Join Date
    Jun 2005
    Location
    Berlin
    Posts
    721
    can somebody tell me, how to use the Rendezvous?


    I have an not completed exammple, and need help.

    Thanks

  15. #15
    Nokia Developer Moderator ltomuta's Avatar
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,335
    Quote Originally Posted by Paul.Todd View Post
    You might want to look at Hamish Willee's excellent tutorial (http://developer.symbian.com/main/do...nOSv9_v1.3.pdf) on how to use rendezvous
    have you seen that one?

Page 1 of 2 12 LastLast

Similar Threads

  1. GSM/GPRS Drivers check FAILED
    By hblume in forum Multimodecards
    Replies: 3
    Last Post: 2004-01-28, 21:37
  2. SMS Msg using VB Application
    By gurup83 in forum General Messaging
    Replies: 2
    Last Post: 2002-07-11, 04:48

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved