CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2012
    Posts
    99

    question about RPC

    so i know RPC is based on extending the notion of conventional, or local procedure calling, so that the called procedure need not exist in the same address space as the calling procedure. The two processes may be on the same system, or they may be on different systems with a network connecting them.

    so here's what i want to do:
    i'll have 3 programs in total: a UI for the user (the client), a service, and the other program i want to control
    all the client does is basically connect to the service
    the service listens for the connection and will then connect to the other program
    the client should then to able to access this program (the program i'm trying to control should appear on the user's/client's screen)
    i can't edit any code in the other program...

    basically the whole point of this is i should be able to access the other program from any where by just using the client
    so the client could be on any computer anywhere and be able to control this program (but not the whole program just a part of)

    i want to use c++ and the service is a windows service so is RPC a good way to achieve this?

  2. #2
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,620

    Re: question about RPC

    What you intend to do is automation. RPC stands for Remote Procedure Call, and the main idea is remote invocation of some code that is published some special way for such invocation. The ideas are orthogonal. You may automate without RPC, and you may use RPC for things other than automation.

    You might have IPC in mind that stands for Inter-Process Communication, which really takes place when client communicates to service in your case.
    Best regards,
    Igor

  3. #3
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    4,626

    Re: question about RPC

    or to put it another way.

    RPC is a method for 2 processes possibly on another computer to communicate with eachother. It requires that both processes have been purpose-created to handle the RPC calls you're wanting to do. RPC by itself is not a means to remotely control any program on another pc.


    What you ask could probably be achieved with RDP (terminal server) and as such not even require you to write any code. There are alternatives to RDP that allow you to remote control apps on another PC. the RDP protocol uses RPC for it's communication layer. There are things like VNC and even websites like showmypc.com that offer means to (temporarily) assume control of someone's pc.

  4. #4
    Join Date
    Mar 2012
    Posts
    99

    Re: question about RPC

    no i don't want to control the whole computer... just this one part of a program

  5. #5
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    4,626

    Re: question about RPC

    if terminal solutions aren't working out for you.

    then you will need to figure out how to programmatically control that one program. This doesn't involve RPC at all, it's either messing around with messages, input/output queues, and potentially trying to "read" what the program is actually doing. Possibly even monitoring devices, directories etc. This is what igor called "automation", but that's a narrow description. Automation only deals with the "making the other app do something", the "figuring out what the other app is doing/has actually done" is the harder part of it. This can be very hard if you have to deal with 'unpredictable' error conditions.


    Once you have the automation and feedback sorted, then you can create the RPC calls so you can (remotely) activate those bits of "programmatical control" from another computer.

Tags for this Thread

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured