MTS and debugging

Posted on 2000-03-21
Last Modified: 2013-11-25
I have problems with trying to debug an ActiveX DLL, which is supposed to run under MTS.
Function ObjectControl_Activate() is never called, so my object can't obtain ObjectContext, and later I can't create ather object using oContext.CreateInstance()...
Is it possible obtain ObjectContext in debugging mode and how?
Question by:ekc
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 2640588
Try to code simply CreateInstance instead if oContext.CreateInstance, this should work during debugging (CreateInstance is replaced by CreateObject) and during runtime inside of MTS the adequate Context object is used

Author Comment

ID: 2641583
I know that, but would like to know if it is possible to debug in MTS enviroment, with ObjectContext and all...

Expert Comment

ID: 2641828
can u try to add this key in u'r registry --
in MyComputer\LocalMachine\Software\Microsoft\TransactionServer\

So u'r registry will look like


hope this solves u'r problem!!!!!!!!!

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 2643429
It is not possible to debug in MTS environment + VB, if you want to debug, the only thing u can do is:
Write to a Log (NT/FILE/DB). This is annoying, but the onyl way I know.

Author Comment

ID: 2664487
Unfortunately, I've tried that registry update some time ago, but it didn't help.

Author Comment

ID: 2664493
could you explain me your solution, a little bit more detailed.
Thank you...
LVL 143

Accepted Solution

Guy Hengel [angelIII / a3] earned 100 total points
ID: 2675592
In your component, you have log your activity to either the NT Log, or an Flat file (which is fastest) or eventually to a Database (which can be queried later). What exactly to log depends on what you are trying to debug: usually, i have one component that indicates what is being debugged, and there all the components query this information. If debugging mode is activated for a module/component/function, then the component will write the logging information, otherwise not. This is the general auditing method, but it will cost time to activate this functionality.
To log in NT Log, you normally have the App.Log method (use StartLog and EndLog to enable the logging)
The file logging can easily be done in a small sub which writes a string to a file (i usually name the file using the date of the day, to avoid getting huge files and being able to manage these files better)
The database Log has the unconvenient, that you need a database connection (and thus the connect information) plus it makes much more overhead, but it presents the great advantage to be queryable afterwards.

Author Comment

ID: 2847758
Comment accepted as answer

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month4 days, 11 hours left to enroll

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question