For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.

Tells the caller that if there is an error when calling that function, then the caller can then call GetLastError to retrieve the error code.


The usesgetlasterror C++ attribute has the same functionality as the usesgetlasterror MIDL attribute.

See the idl_module example for a sample of how to use usesgetlasterror.

Attribute Context

Applies tomodule attribute
Required attributesNone
Invalid attributesNone

For more information about the attribute contexts, see Attribute Contexts.

IDL Attributes
Attributes Samples