word_count.cpp

来自「可以自动计算一段英文中的单词数目! 可以自动计算一段英文中的单词数目! 可以」· C++ 代码 · 共 41 行

CPP
41
字号
// word_count.cpp : Defines the initialization routines for the DLL.
//

#include "stdafx.h"
#include <afxdllx.h>
#include "word_count.h"
#include "word_countaw.h"

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

static AFX_EXTENSION_MODULE Word_countDLL = { NULL, NULL };

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

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

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

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

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?