Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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

  • zibadianzibadian Posts: 6,349Member
    : 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.