Software Development Network>> Visual C++>> Using a C# Library from C++ applications
make the C# project - a COM Component.
for this create an interface like
give the guid here
[Guid("")]
public interface iTest
{
bool Test();
}
now implement this
give the CLSID here (within the quotes)
[Guid(""})
public class CTest : ITest
public bool Test(){
//....do here
in the project properties make the option for register as COM interop to yes.
then use regasm tool for registering the dll and creating the tlb.
regasm -1 test.dll /tlb:test.tlb
Now in VC++
import mscore.dll
then import test.tlb
that's it. Now u can use CoCreateInstance to create the object of ITest.
Regards,
Sudeesh
Using a C# Library from C++ applications
ineedhelp1222
Robert duario
make the C# project - a COM Component.
for this create an interface like
give the guid here
[Guid("")]
public interface iTest
{
bool Test();
}
now implement this
give the CLSID here (within the quotes)
[Guid(""})
public class CTest : ITest
{
public bool Test(){
//....do here
}
}
in the project properties make the option for register as COM interop to yes.
then use regasm tool for registering the dll and creating the tlb.
regasm -1 test.dll /tlb:test.tlb
Now in VC++
import mscore.dll
then import test.tlb
that's it. Now u can use CoCreateInstance to create the object of ITest.
Regards,
Sudeesh