Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Com+ question

Status
Not open for further replies.

thendrickson

Programmer
Apr 14, 2004
226
US
Can anybody point me to a good tutorial on creating a dll using Com+

I have created dlls in the past with no problems but I am being told there are many differences in how dlls are written for Com +.

I just need a quick overview by tomorrow morning and only as it reates to creating a COM + dll

 
Sorry, I'm a bit late, it's already tomorrow. However. COM+ is basically (note basically) COM/DCOM merged with MTS (Microsoft Transaction Server). MTS evolved originally as a means of providing transactional behavior that is beyond the scope of a given transaction-based DBMS. For example, what if you had a set of savings accounts in an Oracle database, and related checking accounts in an SQL Server database? If you wanted to transfer money from one account to the other, you'd have to include it in a transaction--you'd need to both debit one account and credit the other, or do neither. MTS allows you to include multiple data stores in a single transaction.

As MTS evolved, it began to include other functionality such as connection pooling. Eventually, the technology merged with COM/DCOM to become COM+.

The way that MTS works is that your DLL's CLASSID is altered in the registry to point to mtx.exe instead of your dll file. In order to do this, you have to register your dll as a COM+ object.

In order for your COM+ component to behave well in the MTS world, you need to change the way you write things a bit.
Read up on SetComplete, SetAbort, CreateInstance, and the ObjectContext interface. Here are a few links (the first one has a little bit of code that can get you started):

Here's a book that might be good:
HTH

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top