PRB: Implements Statement Requires Interface Derived from IDispatch or IUnknown (214483)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 5.0
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
This article was previously published under Q214483 SYMPTOMS
If you create an interface, which is derived from an interface other than IUnknown or IDispatch, this interface cannot be implemented using the Implements statement in Visual Basic. Doing so causes the following compile error:
Compiler error
Bad interface for Implements: interface is derived from another pure interface with non-restricted methods.
CAUSE
In the Visual Basic documentation for "Implements Statement", the following
is stated:
"Visual Basic does not implement derived classes or interfaces."
RESOLUTION
Change your interface definition of the class, deriving it from either IDispatch or IUnknown.
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 5/13/2003 |
---|
Keywords: | kbprb KB214483 |
---|
|