How to expose mixed class as COM class [modified typo rectified]
-
I am at an initial stage of converting a mixed class to make it COM class. (and eventually a complete project) I googled a bit but have found information only for managed(C#) class. Typically the mixed class would look like
// (in .h file)
namespace MyNameSpace
{
public __gc class CPoint
{
public:
CPoint();
~CPoint();
CPoint(float x, float y, float z);
__property void set_X(float x){ m_pPoint->m_x = x; }
__property float get_X() {return m_pPoint->m_x;}
public private:
// some functions here
};I have to expose this class as a COM class. I need an interface too. But not sure how to do this. Any link or information will be very helpful.
modified on Monday, May 19, 2008 5:59 AM
-
I am at an initial stage of converting a mixed class to make it COM class. (and eventually a complete project) I googled a bit but have found information only for managed(C#) class. Typically the mixed class would look like
// (in .h file)
namespace MyNameSpace
{
public __gc class CPoint
{
public:
CPoint();
~CPoint();
CPoint(float x, float y, float z);
__property void set_X(float x){ m_pPoint->m_x = x; }
__property float get_X() {return m_pPoint->m_x;}
public private:
// some functions here
};I have to expose this class as a COM class. I need an interface too. But not sure how to do this. Any link or information will be very helpful.
modified on Monday, May 19, 2008 5:59 AM