Show/Hide Toolbars

XSharp

This error will be thrown if an interface method has CLIPPER calling convention and the implementation does not have that convention, or vice versa.

This usually occurs when the interface is declared in an assembly where compiler option /vo5 (Implicit clipper calling convention) has a different setting then the app where the interface is implemented.

Assume the following code in one assembly

 

// compiled with /vo5-
INTERFACE IProvider
  METHOD DoSomething() AS VOID
END INTERFACE

 

 

And this implementation in another assembly

 

// compiled with /vo5+
CLASS MyProvider IMPLEMENTS IProvider
  METHOD DoSomething() AS VOID
     ? "Done"
END INTERFACE

 

 

At first site the implementation looks OK but because the implementation is compiled with /VO5 then the method will actually be compiled as follows:

 

CLASS MyProvider IMPLEMENTS IProvider
  METHOD DoSomething(aArgs PARAMS USUAL[]) AS VOID
     ? "Done"
END INTERFACE

 

 

By writing it like this it is immediately clear that the implementation is quite different from the definition in the interface