K
Kevin Frey
I have the following situation:
Assembly #1:
class NativeSearchCriteria // NOTE: a native class
{
};
public ref class TheBaseClass
{
public:
virtual void Get_Search_Criteria( NativeSearchCriteria& _Criteria );
};
Assembly #2:
#using <assembly1.dll>
public ref class MyRestriction : TheBaseClass
{
public:
virtual void Get_Search_Criteria( NativeSearchCriteria& _Criteria )
override;
};
Upon compilation of the source-file containing the MyRestriction class, I
get the following error:
warning C4490: 'override' : incorrect use of override specifier;
'Get_Search_Criteria' does not match a base ref class method
'new' or 'override' are only allowed when a matching base method
from a ref class exists
I know for a fact that this is quite doable when there are only managed
types involved, so I think the problem here is related to the presence of a
native type.
Can anyone explain what the problem is, and a solution?
Thanks
Kevin
Assembly #1:
class NativeSearchCriteria // NOTE: a native class
{
};
public ref class TheBaseClass
{
public:
virtual void Get_Search_Criteria( NativeSearchCriteria& _Criteria );
};
Assembly #2:
#using <assembly1.dll>
public ref class MyRestriction : TheBaseClass
{
public:
virtual void Get_Search_Criteria( NativeSearchCriteria& _Criteria )
override;
};
Upon compilation of the source-file containing the MyRestriction class, I
get the following error:
warning C4490: 'override' : incorrect use of override specifier;
'Get_Search_Criteria' does not match a base ref class method
'new' or 'override' are only allowed when a matching base method
from a ref class exists
I know for a fact that this is quite doable when there are only managed
types involved, so I think the problem here is related to the presence of a
native type.
Can anyone explain what the problem is, and a solution?
Thanks
Kevin