Author Topic: Using com and net together  (Read 1731 times)

0 Members and 1 Guest are viewing this topic.

GUIDO ROOMS

  • Guest
Using com and net together
« 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?

MickD

  • King Gator
  • Posts: 3636
  • (x-in)->[process]->(y-out) ... simples!
Re: Using com and net together
« Reply #1 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.
"Programming is really just the mundane aspect of expressing a solution to a problem."
- John Carmack

"Short cuts make long delays,' argued Pippin.”
- J.R.R. Tolkien

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8702
  • AKA Daniel
Re: Using com and net together
« Reply #2 on: December 18, 2014, 01:26:55 AM »
^ this, GUIDs can change,  so you may need to recompile for different releases / platforms.