Brian Hooper
Brian Hooper

Reputation: 22054

Class_Terminate in VB6 Implementations

Following on from this question Does a VB6 class have a destructor? , I am attempting to create a Class_Terminate method in a class that implements an interface. But I can't find any way to get it to compile, since the method name

MyImplementation_Class_Terminate

perforce includes an underscore character, which one can't have in implementation method names (according to this http://msdn.microsoft.com/en-us/library/aa262287(VS.60).aspx).

Does anyone know what I should do to get this to work?

Upvotes: 0

Views: 829

Answers (1)

MarkJ
MarkJ

Reputation: 30398

The Class_Terminate method isn't part of the interface.

''In class MyInterface
Public Sub Method()  '' method on the interface
End Sub 

''In class MyImplementation
Implements MyInterface 
Private Sub MyInterface_Method() 
End Sub

Private Sub Class_Terminate()
End Sub

Upvotes: 5

Related Questions