|
#include <windows.h>
#include "sof/instantiation/ObjectCreator.h"
#include "sof/framework/remote/corba/IRemoteBundleActivator.h"
#include "sof/util/logging/LoggerFactory.h"
#include "sof/util/logging/Logger.h"
#define DLL extern "C" __declspec(dllexport)
using namespace std;
using namespace sof::framework::remote::corba;
using namespace sof::instantiation;
using namespace sof::framework;
using namespace sof::util::logging;
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
if(ul_reason_for_call==DLL_THREAD_ATTACH)
{
LoggerFactory::getLogger( "Test" ).log( Logger::DEBUG, "[bundle1_dll#DllMain] Called, dll thread attach." );
}
if(ul_reason_for_call==DLL_THREAD_DETACH)
{
LoggerFactory::getLogger( "Test" ).log( Logger::DEBUG, "[bundle1_dll#DllMain] Called, dll thread detach." );
}
if(ul_reason_for_call==DLL_PROCESS_ATTACH)
{
LoggerFactory::getLogger( "Test" ).log( Logger::DEBUG, "[bundle1_dll#DllMain] Called, dll process attach." );
}
if(ul_reason_for_call==DLL_PROCESS_DETACH)
{
LoggerFactory::getLogger( "Test" ).log( Logger::DEBUG, "[bundle1_dll#DllMain] Called, dll process detach." );
}
LoggerFactory::getLogger( "Test" ).log( Logger::DEBUG, "[bundle1_dll#DllMain] Left." );
return TRUE;
}
DLL IRemoteBundleActivator* createObject( const string &className )
{
ObjectCreator<IRemoteBundleActivator> OC_BUNDLE_ACTIVATOR;
LoggerFactory::getLogger( "Test" ).log( Logger::DEBUG, "[bundle1_dll#createObject] Loading instance of class '%1'.", className );
return OC_BUNDLE_ACTIVATOR.createObject( className );
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.