Page 1 of 1

ActiveX program

Posted: Sat Jul 21, 2007 12:02 pm
by Dave Zowasky
Hello All,

I was wondering if it is possible to make FWH program listen and respond to another programs activex calls to it?

Thanks

Posted: Sat Jul 21, 2007 2:52 pm
by Antonio Linares
Dave,

Without having further details about what you need to do, you may review Windows msg WM_COPYDATA. There is a working sample at samples\copydata_16_32

the WM_COPYDATA message is sent when an application passes data to another application

WM_COPYDATA
wParam = (WPARAM) (HWND) hwnd; // handle of sending window
lParam = (LPARAM) (PCOPYDATASTRUCT) pcds; // pointer to structure with data

Parameters

hwnd
Identifies the window passing the data.

pcds
Points to a COPYDATASTRUCT structure that contains the data to be passed.

Return Values

If the receiving application processes this message, it should return TRUE; otherwise, it should return FALSE.

Remarks

An application must use the SendMessage function to send this message, not the PostMessage function.
The data being passed must not contain pointers or other references to objects not accessible to the application receiving the data.
While this message is being sent, the referenced data must not be changed by another thread of the sending process.
The receiving application should consider the data read-only. The pcds parameter is valid only during the processing of the message. The receiving application should not free the memory referenced by pcds. If the receiving application must access the data after SendMessage returns, it must copy the data into a local buffer.

See Also

PostMessage, SendMessage, COPYDATASTRUCT

Posted: Sat Jul 21, 2007 2:53 pm
by Antonio Linares
Also, you can use sockets.

Please review samples\sockserv.prg and sockcli.prg

Posted: Sun Jul 22, 2007 10:52 am
by Dave Zowasky
Antonio,

I will give a good look at the program you mentioned.

It may be what I am looking for.

Thanks

Posted: Sun Jul 22, 2007 12:26 pm
by Dave Zowasky
OK

I think I can pose my question better.


I looked at the fwcopy16 program and it may be a part of the answer to my question.

If I have an application (A) that is residing on the C drive as an exe and I wanted to make an activex call to that application from another application (B) that I am running.

Two questions.

Does application (A) need to be running or registered with operating system in any way?

And in application (B) what syntax would I use to call it?


example like:

oActiveX1 = TActiveX():New( oWnd, "Shell.Explorer" )

oPdf = TActiveX():New( oWnd, "AcroPDF.PDF" )



Let me know if I am way off.

Thanks

Posted: Tue Jul 24, 2007 12:59 pm
by Antonio Linares
Dave,

What you describe seems possible to be implemented.

If you provide us some more exact details then we may be able to provide you more help

Posted: Tue Jul 24, 2007 3:21 pm
by R.F.
PMJI, I remember I saw in xHarbour.com website that the commercial version of xHarbour support ActiveX server, I mean, that you can turn your xHabour application into an ActiveX server, not only an ActiveX client.

Take a look into www.xharbour.com

Posted: Thu Aug 23, 2007 6:20 pm
by Dave Zowasky
Rene,

I will take a look, that sounds like what I am talking about.

Thanks