Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ManagedToNativeComInteropStubAttribute Constructor (Type^, String^)

.NET Framework (current version)
 

Initializes a new instance of the ManagedToNativeComInteropStubAttribute class with the specified class type and method name.

Namespace:   System.Runtime.InteropServices
Assembly:  mscorlib (in mscorlib.dll)

public:
ManagedToNativeComInteropStubAttribute(
	Type^ classType,
	String^ methodName
)

Parameters

classType
Type: System::Type^

The class that contains the required stub method.

methodName
Type: System::String^

The name of the stub method.

Exception Condition
ArgumentException

The stub method is not in the same assembly as the interface that contains the managed interop method.

-or-

classType is a generic type.

-or-

classType is an interface.

ArgumentException

methodName cannot be found.

-or-

The method is not static or non-generic.

-or-

The method's parameter list does not match the expected parameter list for the stub.

MethodAccessException

The interface that contains the managed interop method has no access to the stub method, because the stub method has private or protected accessibility, or because of a security issue.

.NET Framework
Available since 4.0
Return to top
Show:
© 2017 Microsoft