Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Compiler Warning (level 4) C4682
Collapse the table of content
Expand the table of content

Compiler Warning (level 4) C4682

Error Message

'parameter' : no directional parameter attribute specified, defaulting to [in]

A method on a parameter in an attributed interface does not have one of the directional attributes: in or out. The parameter defaults to in.

This warning is off by default. See Compiler Warnings That Are Off by Default for more information.

The following sample generates C4682:

// C4682.cpp
// compile with: /W4
#pragma warning(default : 4682)
#include <windows.h>

[ library_block, object, uuid("c54ad59d-d516-41dd-9acd-afda17565c2b") ]
__interface IMyIface : IUnknown
   HRESULT f1(int i, int *pi); // C4682
   // try the following line
   // HRESULT f1([in] int i, [in] int *pi);

int main()

Community Additions

© 2015 Microsoft