Click to See Complete Forum and Search --> : Error starting an ActivX Dll


pueromane
November 21st, 1999, 05:44 AM
Hi All
I have written a simple ActivX Dll in Vb and want to use it from an other VB Program. But when I call a function from the Dll I get the following Error:

Run-time error '403':

Class does not support Automation or does not support expected interface

Can Anyone tell me what I have done wrong.

Karel Kabelac
December 15th, 1999, 06:06 PM
This message is displayed when an error generated with the Raise method or Error statement doesn't correspond to an error defined by Visual Basic for Applications. It is also returned by the Error function forarguments that don't correspond to errors defined by Visual Basic for Applications. Thus it may be an error you defined, or one that is defined by an object, includinghost applications like Microsoft Excel, Visual Basic, and so on. For example, Visual Basic forms generate form-related errors that can't be generated from code simply by specifying a number as an argument to the Raise method or Error statement.

Sukumar
December 16th, 1999, 09:43 PM
Hi there,
If u r unable to access the DLL by referencing it from Projects menu in VB, then try another method by directly declaring it in your VB module and using it in your application.

Declare public Sub <Procedure_Name>() "Dllname with path" Alias "Alias Name of the API - optional" (formal parameters)



Tryout with this type of calling the API from the DLL.

Bye
Suku