fs/_tests/fsLog/dll.cpp

Go to the documentation of this file.
00001 
00002 //---------------------------------------------------------------------------
00003 #include <fs/sys/fsLog.h>
00004 
00005 #include <cassert>
00006 #include <windows.h>
00007 //---------------------------------------------------------------------------
00008 BOOL WINAPI DllMain(HINSTANCE, DWORD reason, LPVOID)
00009 {
00010     switch(reason)
00011     {
00012         case DLL_PROCESS_ATTACH:
00013         {
00014             FS_LOG("o.DLL The module has just been attached.");
00015             FS_LOG("o.DLL Still logs only into the log history...");
00016             break;
00017         }
00018     }
00019 
00020     return TRUE;
00021 }
00022 //---------------------------------------------------------------------------
00023 extern "C" void __declspec(dllexport) BindAppLog(fs::sys::Log_t *pAppLog,
00024  bool bBind)
00025 {
00026     assert(pAppLog);
00027     fs::sys::ModLog().SetTgt(bBind ? pAppLog : 0);
00028 }
00029 //---------------------------------------------------------------------------
00030 extern "C" int __declspec(dllexport) SomeDllFunc(int nVal)
00031 {
00032     FS_LOG("o.DLL SomeDllFunc(%d) has just been called.", nVal);
00033     return nVal + 1;
00034 }
00035 //---------------------------------------------------------------------------

FipS' Code (Thu Feb 15 22:43:35 2007) - (c) Filip STOKLAS (FipS) - [ www ] [ Guest Book ]