#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2013
    Posts
    9
    Rep Power
    0

    Access to variables in another window


    I want to write a monitor program that can monitor the variables in another totally separate program running in another window. I am writing both programs so I know the name and type of each variable.

    Example: I start a VB program called Clock and it simply displays the time. Inside that program are three variables called hours, minutes, seconds

    I start another vb program called monitor. It needs to detect the clock program and monitor the three variables.

    This is just one of many possible examples. What I really want is to be able to configure the monitor program so that it can monitor variables in any program that I write. And I want to do this outside the debug environment.

    I don't need the specific code although that would be nice. What I need is the process to go about detecting if a specified program is running and then gain access to the known variables inside it.

    Thanks
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Posts
    289
    Rep Power
    44
    Variable names are non-existent in a compiled program. They are just pointers to memory addresses that vary every time the program is loaded. The only way I know of to do what you are asking is to write a .DLL program and expose the functions that will return the information you seek. That's what happens when you declare a system function and make a call to it.

    J.A Coutts
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2013
    Posts
    9
    Rep Power
    0
    Thanks, I'll give that some thought.

IMN logo majestic logo threadwatch logo seochat tools logo