Implement COM interface 
Author Message
 Implement COM interface

Implements ASPTypeLibrary.IVariantDictionary

Would this be possible in VB.NET?

I did implement this interface and I also have this method...

Public Function GetEnumerator() As Collections.IEnumerator Implements
ASPTypeLibrary.IVariantDictionary.GetEnumerator

End Function

But this error stays: 'ASPSessionNet.VariantDictionary' needs to implement
'Overridable Function GetEnumerator() As IEnumerator' for interface
'System.Collections.IEnumerable'.



Sat, 20 Dec 2003 22:47:32 GMT  
 Implement COM interface
Guess...

Public Function GetEnumerator() As Collections.IEnumerator Implements
ASPTypeLibrary.IVariantDictionary.GetEnumerator,
System.Collections.IEnumerable.GetEnumerator

--
Jonathan Allen


Quote:

> Implements ASPTypeLibrary.IVariantDictionary

> Would this be possible in VB.NET?

> I did implement this interface and I also have this method...

> Public Function GetEnumerator() As Collections.IEnumerator Implements
> ASPTypeLibrary.IVariantDictionary.GetEnumerator

> End Function

> But this error stays: 'ASPSessionNet.VariantDictionary' needs to implement
> 'Overridable Function GetEnumerator() As IEnumerator' for interface
> 'System.Collections.IEnumerable'.



Sun, 21 Dec 2003 05:06:33 GMT  
 Implement COM interface
Good guess, your code works. I would not have guessed this myself, this
syntax is really not obvious...

This must be a bug in Beta 2 because VB generates the function bodies itself
after you click the implementation procedures in the properties list...

--
Egbert Nierop


Quote:
> Guess...

> Public Function GetEnumerator() As Collections.IEnumerator Implements
> ASPTypeLibrary.IVariantDictionary.GetEnumerator,
> System.Collections.IEnumerable.GetEnumerator

> --
> Jonathan Allen



> > Implements ASPTypeLibrary.IVariantDictionary

> > Would this be possible in VB.NET?

> > I did implement this interface and I also have this method...

> > Public Function GetEnumerator() As Collections.IEnumerator Implements
> > ASPTypeLibrary.IVariantDictionary.GetEnumerator

> > End Function

> > But this error stays: 'ASPSessionNet.VariantDictionary' needs to
implement
> > 'Overridable Function GetEnumerator() As IEnumerator' for interface
> > 'System.Collections.IEnumerable'.



Sun, 21 Dec 2003 16:50:12 GMT  
 Implement COM interface
I don't think it is a bug, but rather it is just too stupid to know that you
want both interfaces wired to the same method. Which is ok in my mind, as I
don't want to see a repeat of Word. (As far as I'm concerned, if they keep
adding to the Auto-format and Auto-correct Word will be completely useless
in a version or two.)

--
Jonathan Allen


Quote:
> Good guess, your code works. I would not have guessed this myself, this
> syntax is really not obvious...

> This must be a bug in Beta 2 because VB generates the function bodies
itself
> after you click the implementation procedures in the properties list...

> --
> Egbert Nierop



> > Guess...

> > Public Function GetEnumerator() As Collections.IEnumerator Implements
> > ASPTypeLibrary.IVariantDictionary.GetEnumerator,
> > System.Collections.IEnumerable.GetEnumerator

> > --
> > Jonathan Allen



Tue, 23 Dec 2003 01:49:40 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Implement COM interface...

2. Implementing COM Interfaces that have events

3. IMPLEMENTING AN INTERFACE MADE FROM ANOTHER INTERFACE

4. Implementing an interface made from another interface

5. IMPLEMENTING AN INTERFACE MADE FROM ANOTHER INTERFACE

6. Implementing an interface made from another interface

7. Newbiw COM Question - COM Interface?

8. Confused by COM terminology: interfaces, coclasses, and COM classes

9. COM Interfaces, VB6 COM Servers, Automation Clients

10. Implementing IUnknown interface in Access 2000 class

11. Implementing interfaces

12. Implementing the IEnumerator interface in my custom class

 

 
Powered by phpBB® Forum Software