TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Maria.Albuerne.Gonzalez
NA
2
0
calling c# from COM
Jun 23 2004 12:12 PM
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; } }
Reply
Answers (
0
)
Open Excel worksheet inside form
Working with C# and Outlook 2003