FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour ActiveX DLL Functions
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM

ActiveX DLL Functions

Posted: Thu Aug 09, 2007 01:02 PM

Hi Everybody,

I have an ActiveX DLL that I need to call functions from.

I have not tried any ActiveX before and do not know where to start.

Can someone give me some pointers as to how to call functions inside an ActiveX DLL.

Thanks,

Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

ActiveX DLL Functions

Posted: Thu Aug 09, 2007 01:24 PM

Jeff,

Please make a search for TActiveX in these forums.

There are many examples

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

ActiveX DLL Functions

Posted: Thu Aug 09, 2007 01:27 PM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM

ActiveX DLL Functions

Posted: Thu Aug 09, 2007 06:21 PM

Antonio,

I've been looking at the different posts but I can not see how I tell my program that I want to use MyFile.DLL.

It looks like once I get that figured out I would be using commands like:

oActiveX:DO("MyFunction")

Is that correct?

Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM

ActiveX DLL Functions

Posted: Thu Aug 09, 2007 06:31 PM

I guess step one is:

hPOX := LoadLibrary("\DLL\MyFile.DLL")

But how do I setup the oActiveX object?

Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

ActiveX DLL Functions

Posted: Thu Aug 09, 2007 07:50 PM

Jeff,

The first step is to know the PROGID (is a string) of the ActiveX that you are going to use.

i.e. for Microsoft Excell the progid is "OWC11.Spreadsheet"

Whats the activex that you are going to use ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM

ActiveX DLL Functions

Posted: Thu Aug 09, 2007 08:21 PM

it is a 3rd party ActiveX that is used to control a medical device.

Any idea on how I would find the PROGID.

I looked at the DLL file with OleView (via the ITypeLib Viewer) but I can not see anything that looks like the ID.

Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

ActiveX DLL Functions

Posted: Thu Aug 09, 2007 08:43 PM

Jeff,

Don't you have access to that ActiveX docs ?

You can also use its GUID instead of its PROGID ( http://en.wikipedia.org/wiki/Globally_Unique_Identifier ) which usually looks as a long sequence of numbers separated by "-" and between "{" and "}"

Have you tried to instantiate the ActiveX from VB and review its properties ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

ActiveX DLL Functions

Posted: Thu Aug 09, 2007 09:28 PM

Try this:

828B8942-5924-4BD3-963D-20786181A6A4

EMG

Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM

ActiveX DLL Functions

Posted: Thu Aug 09, 2007 10:49 PM

When I try to do:

oPulseOX = TActiveX():New( oMainWnd, "{828B8942-5924-4BD3-963D-20786181A6A4}" )

I get an empty white box in the upper left corner and the windows error:

EzSat.exe has encountered a problem and needs to close. We are sorry for the inconvenience.

Is there something I need to link into my app?

Thanks,

Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

ActiveX DLL Functions

Posted: Thu Aug 09, 2007 11:52 PM

Jeff,

Do you get an error.log file ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM

ActiveX DLL Functions

Posted: Fri Aug 10, 2007 12:11 AM

Sorry, no error.log file is generated.

Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

ActiveX DLL Functions

Posted: Fri Aug 10, 2007 12:31 AM

Jeff,

Have you tried that ActiveX with Visual Basic ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM

ActiveX DLL Functions

Posted: Fri Aug 10, 2007 01:05 AM

Antonio,

I have no way to test with Vb.

Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

ActiveX DLL Functions

Posted: Fri Aug 10, 2007 01:11 AM

Jeff,

I am no ActiveX expert, but if I remember correctly ActiveX components have to be registered in the registry. You might do a Google on it.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10