LogWriter.Dispose method not available in c++

Topics: Building and extending application blocks, General discussion, Logging Application Block
Feb 14, 2010 at 2:43 AM

Hi,

I am using the logging block with a rolling flat file listener in a c++ project. All works fine, until I try to call the Dispose() method on my logWriter object. Looking in the Microsoft documentation, I see that this method is listed as "virtual void Dispose() sealed"

Is there any way for me to reference this method? Without it, the program keeps generating new files with a GUID appended to the beginning of the file name, unless I manually kill the service that's running my program.

Alternatively, is there another solution to my problem?

Thanks a lot,

cgib11

Feb 15, 2010 at 1:52 AM

Hi,

Have you tried the delete keyword? http://www.atalasoft.com/cs/blogs/stevehawley/archive/2008/08/01/managed-c-and-idisposable.aspx

 

Valiant Dudan
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com

Feb 15, 2010 at 2:48 AM

that did it!!

thanks a million!! I've been breaking my head on this for ages!!!

P.S. compliments on the quickest and most on-target support forum I've ever seen! :)