|
-
Jun 11th, 2002, 11:34 PM
#1
Thread Starter
New Member
COM+ / MTS problem
I'm having some trouble with a dll I've created. I created it initially to work in COM+, and when it's put into Component Services on Win2K or WinXP, it works just fine. But now I need to be able to make it work in MTS as well.
I've been told that the COM+ Services Type Library is compatible with the MTS Type Library and so it should work if I just add my dll into MTS on NT Server the same way I added it into Component Services, but when I try I get an error message saying "One or more files contain type libraries that could not be read". According to the MSDN, this error message means that the registry entry for mtxas.dll is missing or corrupt and it should be re-registered. After re-registering, however, I still have the problem.
Can anybody help me get around this? I'm developing in VB6 on Windows XP Professional, and want to be able to put my components into MTS on NT Server 4, if that makes any difference.
Thanks
-
Jun 18th, 2002, 10:58 PM
#2
I can't say that I know for sure that COM+ and MTS are compatible in any way. Your dll currently is referencing the COMSvcsLib.dll and actually installing it into the MTS environment might not be the best thing. Even MSDN can be quirky.
You would almost have to develop on a machine that has MTS installed on it and more than likely that would be NT or Win98. This is a bit tricky.
-
Jun 18th, 2002, 11:05 PM
#3
Thread Starter
New Member
Actually I eventually found a way to make it work. I had to remove the "Implements ObjectControl" line from my code, and take out all references to the ObjectContext object. It limits the functionality a bit, since I can't use the COM+ transaction methods like SetAbort and SetComplete, but I can at least create and use my objects.
Not an ideal solution, but good enough to get the job done.
-
Jul 5th, 2002, 10:05 PM
#4
New Member
U can't have a component that runs on both MTS and COM+ if u use early bound to reference them.
Instead of create a reference to comsvcs.dll or mtxas.dll u need to reference them with CreateObject accordly with OS that the component is running.
Something like:
If Win2000 Then
objCOM = CreateObject(COMSVCSLib.IMTxAS)
Else
objCOM = CreateObject(MTxAS.??????)
End If
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|