Jon,
For starters, you are going to want to read up on the section of the
MSDN documentation titled "Exposing .NET Framework Components to COM",
located at:
http://msdn2.microsoft.com/en-us/library/zsfww439(VS.80).aspx
As for your particular interfaces (IInternetProtocolRoot,
IInternetProtocolSink, and IInternetProtocol), you are going to have to
define those in your code (with the appropriate marshaling attributes, which
are specified in the link above) and then access them appropriately.
You might also want to look in the header/idl files that these are
defined in, as you will need the IID (interface ids) in order to define them
in .NET.
Looking athttp://
www.pinvoke.net, there are definitions for the
interfaces you need:
IInternetProtocol -http://
www.pinvoke.net/default.aspx/Interfaces/IInternetProtocol.html
IInternetProtocolRoot -http://
www.pinvoke.net/default.aspx/Interfaces/IInternetProtocolRoot....
IInternetProtocolSink -http://
www.pinvoke.net/default.aspx/Interfaces/IInternetProtocolSink....
You can use these definitions, and then just focus on the
implementation.
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
From what I gather, I need:
IInternetProtocolRoot::Start
IInternetProtocolSink::ReportProgress
IInternetProtocolSink::ReportData
IInternetProtocol::Read
...the problem is, I've never worked with COM interfaces before, and I
have no idea how I would write this. Even more general code that
showed how to implement COM interfaces would be helpful.
--Jon
Those are pretty much the resources you will have to implement. There
are no .NET conversions, but because of the ability to expose .NET types
to
COM (and implement COM interfaces) you are able to do this in .NET. What
are the interfaces that you have to implement?
- Show quoted text -- Hide quoted text -
- Show quoted text -