#pragma once
#ifndef __AFXWIN_H__
#error "include 'stdafx.h' before including this file for PCH"
#endif
#include "resource.h" // main symbols
class CSpeechApp : public CWinApp
{
public:
CSpeechApp();
public:
virtual BOOL InitInstance();
DECLARE_MESSAGE_MAP()
};
// Speech.cpp : Defines the exported functions for the DLL application.
//
#include "stdafx.h"
#include "Speech.h"
#include "PlugIn.h"
#include "afxdialogex.h"
#include "SpeechSetting.h"
BEGIN_MESSAGE_MAP(CSpeechApp, CWinApp)
END_MESSAGE_MAP()
CSpeechApp::CSpeechApp()
{
}
C++ 的初始化入口函数:
// dllmain.cpp : Defines the entry point for the DLL application.
#include "stdafx.h"
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
如果不加则在初始话弹出对话框时总是不能加载成功!