hi,trouble by using com in C#

  • Thread starter Thread starter wangwanxin1
  • Start date Start date
W

wangwanxin1

hi,everyone,I devloped a com with ATL,and prepare to use it in C#,that interface defination as below:
interface ITestWords : IDispatch{
[id(DISPID_NEWENUM), propget] HRESULT _NewEnum([out, retval] IUnknown** ppUnk);
[id(DISPID_VALUE), propget] HRESULT Item([in] long Index,[out, retval] VARIANT* pVal);
[id(0x00000001), propget] HRESULT Count([out, retval] long * pVal);
};
but only method count can be shown in C#,the others can't,and in VB or VB.NET,it worked correctly.
How can I get the reason? how can I settle this problem? thanx so much,waiting on line!

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 
but only method count can be shown in C#,the others can't,and in VB or VB.NET,it worked correctly.
How can I get the reason? how can I settle this problem? thanx so much,waiting on line!

The Item property is probably translated to an indexer for C#, so you
access it with indexing syntax (obj[index] rather than
obj.Item(index)).



Mattias
 
Back
Top