Compiler Warning (level 1) C4911 (Windows CE 5.0)

Windows CE 5.0
Send Feedback

using the 'calling convention' calling convention specified in the interface 'interface'
for method 'class::method'

The compiler checks for the mismatched calling convention and replaces the calling convention specified in the implementing class with the calling convention specified in the interface.

If an application is compiled with an ambient calling convention other than __stdcall and you do not explicitly state what the calling convention is in the implementation, you will also get this warning.

The following code causes this warning:

// compile : cl /c
#undef interface
#pragma keyword("interface", on)

interface IMy {
int __cdecl MyFunc( void );

class x : public IMy {
int __stdcall MyFunc( void ){return 0;};

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.