How to use C+++ ATL template calss in C#
-
I am migrating a C++ application to .NET. In C++ ,I have an template class which uses some ATL library classes for eg. template< class T > class MyBaseClass: public IConnectionPointContainerImpl, public IPersistStorageImpl, public IPersistPropertyBagImpl, { } Now i need to use this call in my new C# .net project where my new .NET call will get derive from above MyBaseClass . Please let me know how can i archive this ??? Is this possible to use a template class which uses some ATL libraray classes directly in C# ? `chiman
-
I am migrating a C++ application to .NET. In C++ ,I have an template class which uses some ATL library classes for eg. template< class T > class MyBaseClass: public IConnectionPointContainerImpl, public IPersistStorageImpl, public IPersistPropertyBagImpl, { } Now i need to use this call in my new C# .net project where my new .NET call will get derive from above MyBaseClass . Please let me know how can i archive this ??? Is this possible to use a template class which uses some ATL libraray classes directly in C# ? `chiman
You can't. You'd have to write a C++/CLI wrapper aroudn your class and use that in your C# app.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009...