Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

MTS and debugging

Posted on 2000-03-21
8
Medium Priority
?
228 Views
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?
Thanks!
0
Comment
Question by:ekc
  • 4
  • 3
8 Comments
 
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
0
 
LVL 5

Author Comment

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

Expert Comment

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

So u'r registry will look like

MyComputer\LocalMachine\Software\Microsoft\TransactionServer\Debug\RunWithoutContext

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



0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 2643429
ekc:
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.
0
 
LVL 5

Author Comment

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

Author Comment

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

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 400 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.
0
 
LVL 5

Author Comment

by:ekc
ID: 2847758
Comment accepted as answer
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

782 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