Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Could I get a Function Address in a Remote Process

Could I get a Function Address in a Remote Process

Scheduled Pinned Locked Moved Visual Basic
question
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Billypon
    wrote on last edited by
    #1

    Could I get a Function Address in a Remote Process? And how could I do?

    D 1 Reply Last reply
    0
    • B Billypon

      Could I get a Function Address in a Remote Process? And how could I do?

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      You don't. The address would be meaningless on any machine other than the one the function is actually running on. So the question because, why would you even need it?

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007

      B 1 Reply Last reply
      0
      • D Dave Kreskowiak

        You don't. The address would be meaningless on any machine other than the one the function is actually running on. So the question because, why would you even need it?

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007

        B Offline
        B Offline
        Billypon
        wrote on last edited by
        #3

        Now I have to use a API to do something. It need a address of function, which in the third process.

        D 1 Reply Last reply
        0
        • B Billypon

          Now I have to use a API to do something. It need a address of function, which in the third process.

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          Billypon wrote:

          It need a address of function, which in the third process.

          Which won't do you any good because an address cannot be called on a remote machine. You can only give an API function an address on the LOCAL machine to call. You cannot give it an address on a remote machine. There's simply no way to represent that. Now, you have to have a proxy running on the machines. On the local machine, the address you give the API function will be a delegate on the local machine in a proxy. This proxy marshals the call to a remote component that calls the real method on the remote. The API function won't know anything about the remote machine.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007

          B 1 Reply Last reply
          0
          • D Dave Kreskowiak

            Billypon wrote:

            It need a address of function, which in the third process.

            Which won't do you any good because an address cannot be called on a remote machine. You can only give an API function an address on the LOCAL machine to call. You cannot give it an address on a remote machine. There's simply no way to represent that. Now, you have to have a proxy running on the machines. On the local machine, the address you give the API function will be a delegate on the local machine in a proxy. This proxy marshals the call to a remote component that calls the real method on the remote. The API function won't know anything about the remote machine.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                 2006, 2007

            B Offline
            B Offline
            Billypon
            wrote on last edited by
            #5

            No! It means both of the two process are run in the local machine which i say

            D 1 Reply Last reply
            0
            • B Billypon

              No! It means both of the two process are run in the local machine which i say

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #6

              It STILL won't do you any good because each process runs in it's own address space! Think of it this way. Each process thinks it's the only one running under Windows and has access to up to 2 GB's of RAM. The address you get for the function doesn't apply because it sits in a different address space.

              A guide to posting questions on CodeProject[^]
              Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                   2006, 2007

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups