Compiler Warning (level 4) C4682
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

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()
© 2016 Microsoft