When i use the logger with vc++ 2005.i got an unkown software excpetion.
while compiling i get only these warnings
..\ready_for_use\LoggerWrapper.cpp(31) : warning C4996: '_vsnprintf' was declared deprecated
C:\Program Files\Microsoft Visual Studio 8\VC\include\stdio.h(339) : see declaration of '_vsnprintf'
Message: 'This function or variable may be unsafe. Consider using _vsnprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
..\ready_for_use\LoggerWrapper.cpp(64) : warning C4244: 'argument' : conversion from 'time_t' to 'long', possible loss of data
I've been able to resolve some of the compiler and linker errors. However im bumping against the following issue which i could't figure out.
.\LoggerAddIn.odl(19) : warning MIDL2015 : failed to load tlb in importlib: : devshl.dll
.\LoggerAddIn.odl(20) : warning MIDL2015 : failed to load tlb in importlib: : ide\devdbg.pkg
.\LoggerAddIn.odl(54) : error MIDL2337 : unsatisfied forward declaration : IApplicationEvents [ Coclass 'ApplicationEvents' ]
I've been searching on the internet. The only thing i found is that the difference between 2003 and 2005 is the absence of these files in 2005(devshl.dll). I couldn't find any solution for this problem . Maybe u can help?
This logging system was made before knowing anything about 2003 and 2005 IDEs. So I didn't made any testing on them. Now, I'm so sorry to admit it, it's a little bit obsolete. I'll dig into the problem and solve it for you if you really need it, but I think log4xxx system it's much more stable, tested, and offers much more features than this system. the xxx part is replaceble by J,c++,net,etc. So you have now log4J (the logger I've tried to mimic with this system), log4C++, log4net (VB# and c#). log4xxx was available only for java when I've developed this system for c++ developers.
Here is the home page of log4xxxx. I'm sure you will choose it!!!
They also have great examples of using it and tons of documentation. Plus a few forums....
So, bottom line.... if you have some work based on it, I'll will make it work for you 100%. If you want to begin a new project and need a logging system, I strongly recomand you log4xxx. (they now have support for php.... looooool ) )
When calling a function in a static library or DLL that takes a wchar_t type (note that BSTR and LPWSTR resolve to wchar_t*), you may get an LNK2001 unresolved external symbol error.
This error is caused by the /Zc:wchar_t compiler option, which is set to on by default in new MFC projects. This option causes the compiler to treat wchar_t as a native type. Before Visual C++ .NET, wchar_t was treated as an unsigned short.
If the main project and library do not use the same setting for /Zc:wchar_t, this will cause a mismatch of function signatures. To avoid this problem, rebuild the library with the /Zc:wchar_t compiler option, or turn it off in the main project using the Treat wchar_t as Built-in Type setting on the Language property page in the Property Pages dialog box.
I don't have a lot of experience with out of proc COM servers - are you doing anything to prevent the server from shutting down if there are still handlers in the handlers array?
I'm thinking that one client could create a handler (say a file log) and others could use it, but that only works if the server is prevented from shutting down when the handler array has entries in it. If you are preventing shutdown, can you point me to the code that does this? If not, do you think it would be easy to add code that prevents the server from going away if the handlers array is not empty?
Tha logger was designed to shutdown automatically after the last client application exited. In fact I didn't add any code for doing this. This is the normal behaviour of a COM object: delete itself from the memory if nobody is using it. But if you want to keep the logger running you can start it manually before the application. This way it will run after the application exited.
Adding code to tell the logger to keep running if it was spawned from an application it is a interesting feature. Where to add this code? I realy don't know but I will investigate as soon as possible.
First let me say THANKS for this amazing logger, it makes life so much easier!
Now a question regarding the logger manager. I use VS6 and I write a code with MFC (Dialog based application that runs a C++ code for testing Genetic algorithms ... something for school).
Anyway: after the application exits, the Manager is still up and cannot be turned off or closed unless I do it violently from the task manager.
I know that COM should unregister and die when it is not use... so why oh why is it still on?
i use windows XP home addition SP 3
Last Visit: 31-Dec-99 18:00 Last Update: 28-Jul-15 21:08