CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2006
    Posts
    148

    LPARAM of user defined message

    Hi all,

    I am working with an external application (not my application)

    This application posts a user defined message to perform a task. I have captured the message with help of spy++.

    It contains some value in its lparam parameter which remains same during the application life ie. on restarting the application the lparam of the message changes.

    If I try to send the same message (with the same value of LPARAM) to that application, it performs the same task.

    Now the question is
    how to find out that where this LPARAM parameter of the message is pointing to?

    Thanx for any kind of help...

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: LPARAM of user defined message

    In general it is not possible.
    Victor Nijegorodov

  3. #3
    Join Date
    Jul 2002
    Posts
    2,543

    Re: LPARAM of user defined message

    If application source code is not available, the only way to to read Assembly code.

  4. #4
    Join Date
    Jun 2010
    Location
    Germany
    Posts
    2,675

    Re: LPARAM of user defined message

    The fact that the value changes with every new start of the app in question looks like the LPARAM value is some kind of handle. If it is a window handle, there's a chance that you might find out to which window of the app it belongs using Spy++, and then use FindWindow() or FindWindowEx() in your app to get its current handle.

    HTH
    I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.

    This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.

  5. #5
    Join Date
    Jun 2006
    Posts
    148

    Re: LPARAM of user defined message

    Quote Originally Posted by Alex F View Post
    If application source code is not available, the only way to to read Assembly code.
    How can i do it with reading the assembly code.

    Can you pls explore it.

    Thanx

  6. #6
    Join Date
    Jun 2006
    Posts
    148

    Re: LPARAM of user defined message

    Quote Originally Posted by Eri523 View Post
    The fact that the value changes with every new start of the app in question looks like the LPARAM value is some kind of handle. If it is a window handle, there's a chance that you might find out to which window of the app it belongs using Spy++, and then use FindWindow() or FindWindowEx() in your app to get its current handle.
    I have checked the window handles with spy++, but didnt found any window having the value equal to lparam.

    Is it possible that it is pointing to some function in the dll?

    Thanx

  7. #7
    Join Date
    Jun 2010
    Location
    Germany
    Posts
    2,675

    Re: LPARAM of user defined message

    Quote Originally Posted by shail2k4 View Post
    Is it possible that it is pointing to some function in the dll?
    I think that's unlikely. DLL function pointers are usually obtained using GetProcAddress() (unless the DLL is linked at load time) and I don't see any potential reason to pass them along with a message.
    I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.

    This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.

  8. #8
    Join Date
    Jul 2002
    Posts
    2,543

    Re: LPARAM of user defined message

    Program which converts executable to Assembly is called disassembler. You can find free disassemblers making Google search. But if you ask this, I guess you don't know Assembly language, and cannot follow this way.

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

    Re: LPARAM of user defined message

    It could be a window handle
    It could be a pointer to something
    It could be a unique random value generated at program startup
    it could be a registered message
    it could be an Atom handle
    it could be god knows what...

    Without a description, you're either going to be into a lot of debugging, or going to be stuck on this project.

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