Problem with Interface Implementation

  • Thread starter Thread starter Hitesh
  • Start date Start date
H

Hitesh

Hi all,
I have created a project which contains an Interface with
few methods in it. I have built it and made the dll.

In another project I have added reference to this dll and
tried to implement the interface. When I am compiling the
second project. It is giving me two errors. Weirdly both
the error are coming for same methodname.

1. '<typename>' must implement '<methodname>' for
interface '<interfacename>'

2. '<methodname>' cannot implement '<methodname>' because
there is no matching function on interface'<interfacename>'

Surprisingly the error is not coming for the rest of the
methods on the interface. I have verified the signature of
the method. Infact I have used the methodname dropdown to
implement the method, which creates signature
automatically.

If anyone have the solution for the problem, please let me
know.

Thanks in advance
Hitesh.
 
Can you post the interface method and the implementation of that method?

-Rob [MVP]
 
Signature in the interface is:

Function MethodName(ByRef strCName As Object, ByRef
strAName As Object, ByRef strAValue As Object, Optional
ByRef strRID As String = Nothing, Optional ByRef strWID As
Object = Nothing, Optional ByRef strLID As Object =
Nothing, Optional ByRef strPID As Object = Nothing)


Implementation code is:


Public Function MethodName(ByRef strCName As Object, ByRef
strAName As Object, ByRef strAValue As Object, Optional
ByRef strRID As String = Nothing, Optional ByRef strWID As
Object = Nothing, Optional ByRef strLID As Object =
Nothing, Optional ByRef strPID As Object = Nothing) As
Object Implements NameSpace.InterfaceName.MethodName


........ My Code is here

End Function


I also tried to change it to Sub (at both places), but it
didn't help.

Thanks in advance for your help.
Hitesh
 
Back
Top