Exemplo n.º 1
0
BOOL 
APIENTRY 
DllMain(HANDLE hModule, DWORD  dwReason, LPVOID lpReserved)
{
	switch (dwReason)
	{
	case DLL_PROCESS_ATTACH:

		XDbgInit(_T("NDMSICA"));
		XDbgLoadSettingsFromRegistry(
			_T("Software\\NDAS\\NDMSICA"),
			HKEY_CURRENT_USER);

		DBGPRT_INFO(_FT("NDMSICA.DLL Process Attach\n"));
		break;

	case DLL_THREAD_ATTACH:

		DBGPRT_INFO(_FT("NDMSICA.DLL Thread Attach\n"));
		break;

	case DLL_THREAD_DETACH:

		DBGPRT_INFO(_FT("NDMSICA.DLL Thread Detach\n"));
		break;

	case DLL_PROCESS_DETACH:

		DBGPRT_INFO(_FT("NDMSICA.DLL Process Detach\n"));
		XDbgCleanup();
		break;
	}
	return TRUE;
}
Exemplo n.º 2
0
BOOL 
APIENTRY 
DllMain(
	HANDLE hModule, 
	DWORD  dwReason, 
	LPVOID lpReserved)
{
	switch (dwReason)
	{
	case DLL_PROCESS_ATTACH:

		InitProcessData();

		XDbgInit(_T("NDASUSER"));
		XDbgLoadSettingsFromRegistry(
			_T("Software\\NDAS\\NDASUSER"),
			HKEY_CURRENT_USER);

		DBGPRT_INFO(_FT("NDASUSER.DLL Process Attach\n"));

		_pEventSubscriber = new CNdasEventSubscriber();

		break;

	case DLL_THREAD_ATTACH:
		DBGPRT_INFO(_FT("NDASUSER.DLL Thread Attach\n"));
		break;
	case DLL_THREAD_DETACH:
		DBGPRT_INFO(_FT("NDASUSER.DLL Thread Detach\n"));
		break;
	case DLL_PROCESS_DETACH:

		if (NULL != _pxdbgSystemDebugOutput) {
			delete _pxdbgSystemDebugOutput;
		}

		XDbgCleanup();
		CleanupProcessData();
		DBGPRT_INFO(_FT("NDASUSER.DLL Process Detach\n"));

		delete _pEventSubscriber;

		break;
	}
    return TRUE;
}
Exemplo n.º 3
0
BOOL 
APIENTRY 
DllMain(
	HINSTANCE hModule, 
	DWORD  dwReason, 
	LPVOID lpReserved)
{
	switch (dwReason)
	{
	case DLL_PROCESS_ATTACH:

		XDbgInit(_T("NDUPDATE"));
		XDbgLoadSettingsFromRegistry(
			_T("Software\\NDAS\\NDUpdate"),
			HKEY_CURRENT_USER);

		DBGPRT_INFO(_FT(DLL_NAME) _T(" Process Attach\n"));

		_NdasUpdateDllInstance = hModule;

		break;

	case DLL_THREAD_ATTACH:

		DBGPRT_INFO(_FT(DLL_NAME) _T(" Thread Attach\n"));
		break;

	case DLL_THREAD_DETACH:

		DBGPRT_INFO(_FT(DLL_NAME) _T(" Thread Detach\n"));
		break;

	case DLL_PROCESS_DETACH:
		DBGPRT_INFO(_FT(DLL_NAME) _T(" Process Detach\n"));

		XDbgCleanup();
		break;
	}
    return TRUE;
}