/////////////////////////////////////////////////////////////////////
// Project Name:   [ CDX Application Wizard - CDXAppWiz ]
// Source File:    [ CDXAppWiz.cpp ]
// Author:         [ Michael Rich - istan@alltel.net ]
// Contributions:  [ Ioannis Karagiorgos, Bil Simser ]
// Revision:       [ 1.00 ]
/////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include <afxdllx.h>
#include "CDXAppWiz.h"
#include "CDXAppWizaw.h"

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

static AFX_EXTENSION_MODULE CDXAppWizDLL = { NULL, NULL };

extern "C" int APIENTRY
DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
	if (dwReason == DLL_PROCESS_ATTACH)
	{
		TRACE0("CDXAPPWIZ.AWX Initializing!\n");
		
		// Extension DLL one-time initialization
		AfxInitExtensionModule(CDXAppWizDLL, hInstance);

		// Insert this DLL into the resource chain
		new CDynLinkLibrary(CDXAppWizDLL);

		// Register this custom AppWizard with MFCAPWZ.DLL
		SetCustomAppWizClass(&CDXAppWizaw);
	}
	else if (dwReason == DLL_PROCESS_DETACH)
	{
		TRACE0("CDXAPPWIZ.AWX Terminating!\n");

		// Terminate the library before destructors are called
		AfxTermExtensionModule(CDXAppWizDLL);
	}
	return 1;   // ok
}
