C
Chris
Hello,
I'm creating a small plugin interface for my future .NET DLL's. This
interface is written in C# primarily for C# dlls. However, in one
particular instance, I have to plugin a C++ dll. How do I use the following
interface that is written in C# in C++ (I have limited experience with VC++
and am just learning .net)?
Thanks in advance!
Chris
using System;
namespace PlugIn
{
public interface IPlugin
{
Int32 Add(Int32 a, Int32 b);
string Name{get;set;}
IPluginHost Host{get;set;}
}
/// <summary>
/// The host
/// </summary>
public interface IPluginHost
{
bool Register(IPlugin ipi);
}
}
In the .h file of the C++ project, do I just add the ": public IPlugin"
clause to the class definition? What else is necessary?
// test.h
#pragma once
using namespace System;
namespace test
{
public __gc class Class1 : public IPlugin
{
// TODO: Add your methods for this class here.
};
}
I'm creating a small plugin interface for my future .NET DLL's. This
interface is written in C# primarily for C# dlls. However, in one
particular instance, I have to plugin a C++ dll. How do I use the following
interface that is written in C# in C++ (I have limited experience with VC++
and am just learning .net)?
Thanks in advance!
Chris
using System;
namespace PlugIn
{
public interface IPlugin
{
Int32 Add(Int32 a, Int32 b);
string Name{get;set;}
IPluginHost Host{get;set;}
}
/// <summary>
/// The host
/// </summary>
public interface IPluginHost
{
bool Register(IPlugin ipi);
}
}
In the .h file of the C++ project, do I just add the ": public IPlugin"
clause to the class definition? What else is necessary?
// test.h
#pragma once
using namespace System;
namespace test
{
public __gc class Class1 : public IPlugin
{
// TODO: Add your methods for this class here.
};
}