PEVerify - "call to .ctor only allowed to initialize this pointer ..."
This error signifies that a constructor (.ctor) should call the constructor for itself or for the type it is extending; however, it is directly calling a different routine. The following code is a rough sketch of the error condition.
class baseT // implicitly derives from Object
{
baseT() { }
}
class derT : baseT
{
derT()
{
Object(); // calling a different constructor than base class
}
}
For my work, changing the call from Object() to baseT() fixed the error.
No comments:
Post a Comment