| View previous topic :: View next topic |
| Author |
Message |
Thomas Malchar Guest
|
Posted: Sat Aug 09, 2003 11:14 am Post subject: How can I send a message between a ActiveX-Com-Object and a |
|
|
Hi,
I need to communicate between a ActiveX-COM-Object (written in Delphi) and a
Delphi application. I use SendMessage with WM_COPYDATA.
I can send the message from the ActiveX to the application, but how can I
send back my data with WM_COPYDATA to the ActiveX. Which handle have the
ActiveX?
Thanks for help.
Regards,
Thomas
|
|
| Back to top |
|
 |
Michael Kelly Guest
|
Posted: Sat Aug 09, 2003 4:22 pm Post subject: Re: How can I send a message between a ActiveX-Com-Object an |
|
|
On Sat, 9 Aug 2003 13:14:52 +0200, "Thomas Malchar" <malchar (AT) mafis (DOT) de> wrote:
| Quote: | I can send the message from the ActiveX to the application, but how can I
send back my data with WM_COPYDATA to the ActiveX. Which handle have the
ActiveX?
|
See TActiveXControl.Control.Handle
--
"I don't want to belong to any club that would have me as a member."
-- Groucho Marx
|
|
| Back to top |
|
 |
Thomas Malchar Guest
|
Posted: Sat Aug 09, 2003 6:44 pm Post subject: Re: How can I send a message between a ActiveX-Com-Object an |
|
|
| Quote: | See TActiveXControl.Control.Handle
|
I have a TAutoObject with has no Control.Handle. See following code:
type
TSendTest = class(TAutoObject, ISendTest)
private
function SendData(hWindow: HWND; sData: string): boolean;
end;
|
|
| Back to top |
|
 |
Michael Kelly Guest
|
Posted: Sun Aug 10, 2003 3:51 pm Post subject: Re: How can I send a message between a ActiveX-Com-Object an |
|
|
On Sat, 9 Aug 2003 20:44:13 +0200, "Thomas Malchar" <malchar (AT) mafis (DOT) de> wrote:
| Quote: | See TActiveXControl.Control.Handle
I have a TAutoObject with has no Control.Handle. See following code:
type
TSendTest = class(TAutoObject, ISendTest)
private
function SendData(hWindow: HWND; sData: string): boolean;
end;
|
If it doesn't have a handle then you can't send a Windows message.
Use TActiveXControl instead.
--
"I don't want to belong to any club that would have me as a member."
-- Groucho Marx
|
|
| Back to top |
|
 |
Maynard Philbrook Guest
|
Posted: Tue Aug 19, 2003 6:14 pm Post subject: Re: How can I send a message between a ActiveX-Com-Object an |
|
|
since the WM_COPYDATA does send you a pointer to obtain the data i can
only assume that if you follow a protocol you can make sure there would be
enough room in the buffer that was created from the X control to allow you to
simply modify the contents on return..
thus the X control can check for messages or info coming back from your
app.
ect..
so if you were to create lets say a fixed 1024 byte buffer using some
1 byte protocol to talk to each the X control can initiate the buffer, when it
needs
to check your app for any possible data it can send lets say an inquiry Byte ..
the app would alter this buffer and send back data if there is data changing
the
protocol byte to reflect the type of response.
Thomas Malchar wrote:
| Quote: | Hi,
I need to communicate between a ActiveX-COM-Object (written in Delphi) and a
Delphi application. I use SendMessage with WM_COPYDATA.
I can send the message from the ActiveX to the application, but how can I
send back my data with WM_COPYDATA to the ActiveX. Which handle have the
ActiveX?
Thanks for help.
Regards,
Thomas
|
--
To See what real programmers do in their spare time visit
http://jamie12.home.mindspring.com
home of PC bit software ..
Please send comments about my work .
|
|
| Back to top |
|
 |
|