Debugging C++ event sinks

Debugging C++ event sinks

Post by Eva Platte » Sat, 15 Feb 2003 08:44:20



Has anybody been able to debug event sinks using the
Visual Studio C++?

For my event sink's COM application, on the Advanced page,
I selected the "Launch in de*" checkbox.  But, then I
get an error message when I try to create an event
registration.  If I deselect it, no problem.

Thanks,
Eva

 
 
 

Debugging C++ event sinks

Post by Gary McDonnel » Sat, 15 Feb 2003 23:59:05


I've found the best way to debug event sinks and other COM+ applications
that don't have a user interface is to add code that writes to a log file at
every step you're concerned about. It may sound old school, but it is
extremely effective for me!

Gary McDonnell
www.turbogeeks.com


Has anybody been able to debug event sinks using the
Visual Studio C++?

For my event sink's COM application, on the Advanced page,
I selected the "Launch in de*" checkbox.  But, then I
get an error message when I try to create an event
registration.  If I deselect it, no problem.

Thanks,
Eva

 
 
 

Debugging C++ event sinks

Post by Olivier MATRO » Thu, 20 Feb 2003 18:47:26


Definitely, you can !

I'm using Visual C++ 7 :

1) Install & register you Sink DLL with debug informations on the target
machine
2) Run Visual C+ Remote debug monitor on target machine
3) In visual C++ on dev machine, choose Debug/Processes...
4) Attach to "inetinfo.exe" process on target machine
5) Set breakpoints in your code
6) Fire you sink
7) Enjoy !


> I've found the best way to debug event sinks and other COM+ applications
> that don't have a user interface is to add code that writes to a log file
at
> every step you're concerned about. It may sound old school, but it is
> extremely effective for me!

> Gary McDonnell
> www.turbogeeks.com



> Has anybody been able to debug event sinks using the
> Visual Studio C++?

> For my event sink's COM application, on the Advanced page,
> I selected the "Launch in de*" checkbox.  But, then I
> get an error message when I try to create an event
> registration.  If I deselect it, no problem.

> Thanks,
> Eva

 
 
 

1. Properly debug an Exchange 2000 event sink using VS6

Note to future forgetful self:  you want to debug an E2K event sink in
vs6.  You've created the COM+ object and registered it.  Now you try
debugging it and it gives you the following error:

System error &H80004015:  Class is configured to run as a security id
different from the caller.

WTF?  Well, one cause for this that doesn't seem to be mentioned in
any other newsgroup posts or MS Knowledge Base articles is that you
could be trying to debug it via a Terminal Services session!  Doh!
Quick solutions are to go to the system console and log on
interactively (as the same user as the COM+ object is set to run
under, if applicable) and debug it from there or via Terminal
Services, or install pcAnywhere and debug it via that.  If you're
unusally patient and/or lazy, you could just wait for someone to
rebuild the E2K server using Windows 2003.  Then you could connect to
it via Remote Desktop and get the same effect.  However, you can't do
it via Terminal Services when nobody is logged into the machine
interactively (locally)...when logged into a machine via Terminal
Services, you're logged in under a special account.  I could go into
more detail, but it's not really necessary.

Thanks to Dave Mills for helping me remember!

2. Exchange Server slows down

3. debugging event sink in VC++

4. Message Size Limitations

5. Event Sink VB debugging

6. Can I add a "@" in the login ID?

7. runtime error in an event sink calling a Component runnig in debug mode

8. MTA doesn't want to listen over RPC - HELP

9. remote debugging of event sink

10. debugging event sinks

11. SMTP Event Sink with C++

12. about : HOWTO: Create an Exchange 2000 Store Event Sink in Visual C++

13. Problem programmatically registering event sink in C++