🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.ms-windows.programmer.tools.mfc
3 messages
3 total messages Started by Stephen D. Ayers Mon, 08 Apr 1996 04:46
Catastrophic OLE Error
#71
Author: Stephen D. Ayers
Date: Mon, 08 Apr 1996 04:46
17 lines
1003 bytes
I have built a very small OCX using the VC++ 4.1 project Wizard. The
control supports a single method with no arguments and no return
value.

The VC++ OLE test container tool works fine. It allows me to invoke
methods without difficulty.

However, whenever I try invoking methods on the object from VB, VBA
within Excel, or VC++ clients they all return "OLE Automation error -
Catastrophic failure" after a successful object create.

This is running under NT 4.0 Beta 1.

Am I missing something? Is this the proper way to create OCX objects? 

Thanks,
Re: Catastrophic OLE Error
#75
Author: Chris Marriott
Date: Mon, 08 Apr 1996 16:20
25 lines
1740 bytes
In article <31689491.151762072@newsserv.ctp.com>, "Stephen D. Ayers"
<sayer@ctp.com> writes
>I have built a very small OCX using the VC++ 4.1 project Wizard. The
>control supports a single method with no arguments and no return
>value.
>
>The VC++ OLE test container tool works fine. It allows me to invoke
>methods without difficulty.
>
>However, whenever I try invoking methods on the object from VB, VBA
>within Excel, or VC++ clients they all return "OLE Automation error -
>Catastrophic failure" after a successful object create.

OCXs and OLE Automation are NOT the same thing! It sounds as though
you're attempting to use automation on an object which does not expose
automation interfaces.

Chris

--------------------------------------------------------------------------
 Chris Marriott, Warrington, UK      | Author of SkyMap v3 award-winning 
 chris@chrism.demon.co.uk            | shareware Win31/Win95 planetarium.
            For full info, see http://www.execpc.com/~skymap  
      Author member of Association of Shareware Professionals (ASP) 
-------------------------------------------------------------------------- 
Re: Catastrophic OLE Error
#78
Author: Ola Gunnars
Date: Wed, 10 Apr 1996 06:54
28 lines
1277 bytes
sayer@ctp.com (Stephen D. Ayers) wrote:


>I have built a very small OCX using the VC++ 4.1 project Wizard. The
>control supports a single method with no arguments and no return
>value.

>The VC++ OLE test container tool works fine. It allows me to invoke
>methods without difficulty.

>However, whenever I try invoking methods on the object from VB, VBA
>within Excel, or VC++ clients they all return "OLE Automation error -
>Catastrophic failure" after a successful object create.

>This is running under NT 4.0 Beta 1.

>Am I missing something? Is this the proper way to create OCX objects? 

>Thanks,

How are you using the ocx ...
You must use it in an form and get the object member ...
dim obj as object

set obj = myocxinmyform.object
obj.myfunc()

/Ola
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads