I implemented a .NET DLL with COM visibility (VB.NET):
Public Class Processer Implements IProcesser
Public Sub processASpecificThing(ByVal param As String) _
Implements IProcesser.processAThing
' [...]
End Sub
End Class
Below the Interface definition. For some reasons I exposed a method with a different name in the interface.
Imports System.Runtime.InteropServices
Imports System.ComponentModel
<InterfaceType(ComInterfaceType.InterfaceIsDual)> _
Public Interface IProcesser
Sub processAThing(ByVal param As String)
End Interface
The project is configured to set the Assembly as COM visible. If I understood correctly InterfaceIsDual
let the Interface be visible at early binding as well as at late binding.
In a VB6 project, this works:
Dim aProcesser as IProcesser
Set aProcesser = New Processer
aProcesser.processAThing "param" ' Call by the *Interface* method name
In a VB6 project or an ASP classic VBScript page, this fails:
Dim aProcesser
Set aProcesser = CreateObject("ProcessLib.Processer")
' Call by the *Interface* method name
aProcesser.processAThing "param" ' [FAIL]
' Call by the *Interface* method name
aProcesser.processASpecificThing "param" ' [SUCCESS]
The failing line leads to the error message:
Object Doesn't Support this Property or Method
The real context of this question is an ASP classic page. I use a late binding to avoid adding a METADATA
header in the ASP file (I believe it's the only way, but not tested yet).
Sounds like the interface is not accessible. Why does that problem occur and how could I make the interface accessible with ?