Tyler Durden
Tyler Durden

Reputation: 1228

Making a function in a c++ project with clr support to be interopable

In my C# project, I wish to interop a function that is defined in a clr project. I usually use

 __declspec( dllexport )

in the function definition in the case of a native c++ project. How do I make the function interopable for a clr project?

Upvotes: 0

Views: 63

Answers (1)

Matt Smith
Matt Smith

Reputation: 17444

Make the ref class public and the method you want to call public. Then reference the project from your C# project.

Upvotes: 2

Related Questions