Who sent the message?

i have 2 applications communicating between each other.
one will send a password/username/etc. to the other.

and i want that only specific application may request these data from the second application.

i send the request with:
[code]
h:=FindWindow('TLoader',nil)
if h <> 0 then SendMessage(h,WM_ACCESSREQUEST,0,1);
[/code]



how can the receiver identify the sender application?
the msg argument doesn't have such a property.

[code]
procedure OnAccessRequest(var msg: TMessage); message WM_ACCESSREQUEST;
[/code]






Comments

  • : i have 2 applications communicating between each other.
    : one will send a password/username/etc. to the other.
    :
    : and i want that only specific application may request these data from the second application.
    :
    : i send the request with:
    : [code]
    : h:=FindWindow('TLoader',nil)
    : if h <> 0 then SendMessage(h,WM_ACCESSREQUEST,0,1);
    : [/code]
    :
    :
    :
    : how can the receiver identify the sender application?
    : the msg argument doesn't have such a property.
    :
    : [code]
    : procedure OnAccessRequest(var msg: TMessage); message WM_ACCESSREQUEST;
    : [/code]
    :
    :
    :
    :
    :
    :
    :
    You could use the lParam or wParam for that.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion