TheSwamp

Code Red => .NET => Topic started by: GUIDO ROOMS on December 17, 2014, 06:33:44 AM

Title: Using com and net together
Post by: GUIDO ROOMS on December 17, 2014, 06:33:44 AM
maybe a stupid question, but i searched and couldn't find anything about it, so here goes:
when using the net api, there seems to be nothing which prevents me from using the com api at the same time, not even in one and the same transaction. but where are the pitfalls when doing that? what happens when the transaction is rolled back, for example?
is there any documentation about things like that?
Title: Re: Using com and net together
Post by: MickD on December 17, 2014, 04:45:18 PM
I'm not sure about transactions (I think they would work ok in this case) but I have worked on a project with legacy COM code and the main problem you will face is 32/64bit issues, you don't have this problem with .net. With COM you will need 2 builds to handle both.

It is tempting to use the older COM api as it's more like a DSL and easy to use but with a bit of planning you can build your own DSL for your project to handle things like adding objects to the database etc so the code flows a bit better and keeps the boiler plate to a minimum.
Try and resist the temptation to use COM and you will be far better off down the track when it comes time for maintenance and adding new functionality.
Cheers.
Title: Re: Using com and net together
Post by: It's Alive! on December 18, 2014, 01:26:55 AM
^ this, GUIDs can change,  so you may need to recompile for different releases / platforms.