/***************************************************************************
**
**    $Header$
**
**    $Log$
** 
****************************************************************************/

// bptdll.cpp : Defines the class behaviors for the application.
//

#include "stdafx.h"
#include "bptdll.h"


#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// Initialization of MFC Extension DLL

#include <afxdllx.h>    // standard MFC Extension DLL routines

#define new DEBUG_NEW

static AFX_EXTENSION_MODULE NEAR extensionDLL = { NULL, NULL };

extern "C" int CALLBACK LibMain(HINSTANCE hInstance, WORD, WORD, LPSTR)
{
	// Extension DLL one-time initialization - do not allocate memory here,
	// use the TRACE or ASSERT macros or call MessageBox
	AfxInitExtensionModule(::extensionDLL, hInstance);

	return 1;   // OK
}

// Exported DLL initialization is run in context of running application
extern "C" void WINAPI InitDLL_BreakpointServer()
{
	// create a new CDynLinkLibrary for this app
	new CDynLinkLibrary(::extensionDLL);

	// add other initialization here
}

HINSTANCE BptGetDLLHandle()
{
	// Get the current DLL module handle
	return ::extensionDLL.hModule;
}
