I intend to develop a CCW for a C# class in Visual Studio 6 (C++) according to the instructions I have found in several articles.
I have successfully included the C# class in my code , and I can even created the object
pointer to the class and been able to compile it.
But I am not able to find any of the the functions I have defined and implemented in the C# class.
Is there any special attribute you must set before the functions you want to export ? In the
examples I saw , at least, there is not ....
I would appreciate if somebody can explain what I am doing wrong...
-------------------------------------------------------------
#import "..\DummyTData\bin\Debug\TData.tlb" rename_namespace("TDATA")
class ATL_NO_VTABLE CComSQLData :
public CComObjectRootEx,
public CComCoClass,
public IDispatchImpl
{
public:
TDATA::_CComSQLDataPtr pTData;
CComSQLData()
{
pTData.CreateInstance("TData.CComSQLData");
pTData->GetData("lkdfj"); <-- this line does not work .... It can't find function in class library
}
Btw .. C# classlibrary looks like this:
namespace TData
{
interface IComSQLData
{
void SetData( string Column, string sData);
string GetData( string bstrColumn);
}
public class CComSQLData: IComSQLData
{
public void SetData(string Column, string sData)
{
}
public string GetData(string Column)
{
return null;
}
}