Trace not working in a .NET DLL loaded from VB6 EXE

Posted by Luis on Stack Overflow See other posts from Stack Overflow or by Luis
Published on 2010-02-10T22:40:08Z Indexed on 2010/03/15 4:29 UTC
Read the original article Hit count: 705

Filed under:
|
|
|
|

Hello

I have a .NET DLL that writes to the Trace. But seems that when I call my DLL from a VB6 EXE the trace is not working. I have created an myApp.config file in the EXE folder with the trace configuration, but this does not solves the issue.

I've also tried creating the Trace objects in code,but doesn't work:

Dim _traceSrc as TraceSource= New TraceSource("myTraceSorce")
Dim flListener As FileLogTraceListener = New FileLogTraceListener("myFileLogTraceListener")
Dim tSwitch As SourceSwitch = New SourceSwitch("mySwitch")
tSwitch.Level = _logLevel

If I call my DLL from a .NET EXE it works, even if I dont have the app.config in the EXE folder, becusase I set it in code if the config is not found.

Thanks

© Stack Overflow or respective owner

Related posts about .NET

Related posts about vb.net