How would I do this?

How would I do this?

Post by Michael Covingto » Tue, 05 Oct 1999 04:00:00



I have a Prolog interpreter that can call a DLL using ordinary C calls, but
not ActiveX or COM.

I also have the Microsoft Speech SDK, which is most easily accessed through
an ActiveX object.

What I'd like to do is construct a DLL (preferably in Borland C++ Builder,
but other tools are available) to bridge the gap.  That is, Prolog calls
simple routines in my DLL which then call the speech object.

How should I approach this?  An ActiveX component within a DLL is a new one
on me.

Thanks,

--
Michael A. Covington - Artificial Intelligence Ctr - University of Georgia
http://www.ai.uga.edu/~mc  http://www.CovingtonInnovations.com  <><

 
 
 

How would I do this?

Post by Thomas W. Brow » Tue, 05 Oct 1999 04:00:00



> I have a Prolog interpreter that can call a DLL using ordinary C calls, but
> not ActiveX or COM.

> I also have the Microsoft Speech SDK, which is most easily accessed through
> an ActiveX object.

> What I'd like to do is construct a DLL (preferably in Borland C++ Builder,
> but other tools are available) to bridge the gap.  That is, Prolog calls
> simple routines in my DLL which then call the speech object.

> How should I approach this?  An ActiveX component within a DLL is a new one
> on me.

One way, not too difficult, is to do  #import "<type library name>" in
the DLL source code and use the VC++ smart pointers to create an
instance of the COM object and access properties and methods.  Look into
documentation on #import and _com_ptr_t.

If the ActiveX component is a full control with its own window then you
should add it as a component to your DLL project (Project -> Add To
Project -> Components and Controls).  This creates a full CWnd derived
class that wraps up access to the ActiveX control.

-- Thomas Brown


 
 
 

How would I do this?

Post by Michael Covingto » Tue, 05 Oct 1999 04:00:00


Quote:> If the ActiveX component is a full control with its own window then you
> should add it as a component to your DLL project (Project -> Add To
> Project -> Components and Controls).  This creates a full CWnd derived
> class that wraps up access to the ActiveX control.

There is no such menu item in C++ Builder.  Are you in Visual C++?
Something else?
 
 
 

How would I do this?

Post by Aleksandar Boskovi » Wed, 06 Oct 1999 04:00:00


In BCB, create the DLL (File|New|DLL). In DLL, import type library
(File|Open...). Write your "DLL to COM object mapping" functions.
 
 
 

How would I do this?

Post by Thomas W. Brow » Wed, 06 Oct 1999 04:00:00



> > If the ActiveX component is a full control with its own window then you
> > should add it as a component to your DLL project (Project -> Add To
> > Project -> Components and Controls).  This creates a full CWnd derived
> > class that wraps up access to the ActiveX control.

> There is no such menu item in C++ Builder.  Are you in Visual C++?
> Something else?

Ooops, yes, sorry -- I overlooked your platform in the original post.
I'm afraid I don't know how Borland does it.

-- Thomas Brown

 
 
 

1. Running graphical dos program under dos shell window

I had a program which is written in Pascal that is running in Graphics mode
using the egavga (egavga.bgi) mode. I am trying to run this program under
Windows 95 Dos Prompt Shell in "window" form, which mean that the program is
not running in full screen. This enable me to switch between windows by
using the mouse and monitoring other program while the DOS program is
running.

(My DOS program is running in vga 256 colour 640x480 mode while my windows
setting is 800x600 16.8 million colour mode.)
But when I try to do that, Dos shell reported that the appplcation must
running in full screen mode. I am required to run the program in shell
windows. Is there any way to do that ?

Regards.

2. Emplant 4 sale

3. Borland C++ and DOS 16bit DOS console applications

4. named.stats question

5. Doing DOS INT 31H under Windows

6. SE (37 MHz.) TRAM modules for Octane

7. set title bar of DOS box via DOS program?

8. M-FSK passaband simulation in SimuLink

9. Windows 3.1 DOS box memory mapping with DOS extenders

10. How do I run a DOS program without a DOS Box????

11. Access NT TCP/IP from DOS app, or NT<->DOS IPC

12. DOS-extended apps crash in a DOS window

13. how to run a DOS program without DOS window