Sharing some info with all DLLs pulled into a process

Posted by JBRWilkinson on Stack Overflow See other posts from Stack Overflow or by JBRWilkinson
Published on 2010-04-21T10:51:12Z Indexed on 2010/04/21 10:53 UTC
Read the original article Hit count: 209

Filed under:
|
|
|
|

Hi all,

We've got an Enterprise system which has many processes (EXEs, services, DCOM servers, COM+ apps, ISAPI, MMC snapins) all of which make use of many COM components. We've recently seen failures in some of the customer deployments, but are finding it hard to troubleshoot the cause.

In order to track down the problem, we've augmented the entire source with logging statements where errors occur.

In order to identify which logs came from what processes, the C++ logging code (compiled into all components) uses the EXE name to name the log. This is good for some cases, but not all - COM+ apps, ISAPI and MMC snapins all have system EXE names and the logs end up interleaved.

I saw this post about shared data sections which might help, but what I don't understand is who decides what goes in the shared section. Is there any way I can guarantee that a particular piece of code writes into the shared section before anyone else reads it?

Or is there a better solution to this problem?

© Stack Overflow or respective owner

Related posts about win32

Related posts about visual-c++