Making It All Accessible
Once you've chosen a spot to put your interface definition you have to do the hard part of translating it to c# compatible data types. In the case of our example component the translation is pretty simple and direct. In your own components you'll likely run into scenarios that require a bit of thought but, you're a good programmer and can figure it out when the time comes.
For the time being, I'll provide you with a proper definition just to make sure you know what's going on and can't come back saying that it doesn't work ;) Putting It To Use
Now that we've got everything in place there's just one more thing left to do.. We need to write a method that accesses our interface method and returns a System.Drawing.Image object from the XPCom component. Just for the sake of completeness, I'll provide a working method that you can employ in your own application.
This concludes the tutorial. Hopefully you've learned something useful and will continue to build and even share your custom components with other MozNET users. If there's enough interest in the subject, Se7en Soft will create and host a gallery where you can share your custom components with others.Last Page