Results 1 to 6 of 6

Thread: Passing Pointer to EXE

  1. #1

    Thread Starter
    Hyperactive Member made_of_asp's Avatar
    Join Date
    Jul 2001
    Location
    123 Fake Street
    Posts
    394

    Passing Pointer to EXE

    Hi,

    I need to find a way to pass a pointer as a paramter to EXE file. Is command line sutiable?

    Thanks for any help,
    VS.NET 2003

    Need to email me?

  2. #2
    Frenzied Member Zaei's Avatar
    Join Date
    Jul 2002
    Location
    My own little world...
    Posts
    1,710
    Assuming Windows here. Yes, but you will have to use ReadProcessMemory. Windows actually keeps memory for each process separate, so that a pointer in one process is going to point to different (or invalid) data in another process.

    In fact, Windows passes an hwnd parameter to screen savers when the screen saver is in preview mode, using the command line.

    Z.

  3. #3
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    A window handle isn't a pointer. They're global to all applications.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    A window handle is an offset into an internal table, but the app doesn't need to know about that.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  5. #5
    Frenzied Member Zaei's Avatar
    Join Date
    Jul 2002
    Location
    My own little world...
    Posts
    1,710
    Originally posted by parksie
    A window handle isn't a pointer. They're global to all applications.
    Duh =P. Its just a tidbit of information, with a similar situation =).

    Z.

  6. #6

    Thread Starter
    Hyperactive Member made_of_asp's Avatar
    Join Date
    Jul 2001
    Location
    123 Fake Street
    Posts
    394
    Oh well. I found a way around. It is supposed a pointer to a database class.

    Thanks anyway.
    VS.NET 2003

    Need to email me?

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