如何将exe应用程序转换为dll [英] How to convert exe application to dll
本文介绍了如何将exe应用程序转换为dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Visual C ++中有Windows应用程序(.exe),因此必须将其转换为dll.我将配置类型->动态库(.dll)更改为我的项目,并在共享dll中使用mfc->使用mfc.当我构建项目时,将创建MYDLL.dll.我创建了一个控制台应用程序来测试MYDLL,但我没有如何调用MYDLL.你能帮我吗?
我的MYDLL源代码:
I have a windows application(.exe) in visual c++ so I must convert it to dll. I change to my project the configuration type->dynamic library(.dll) and To use of mfc->use mfc in a shared dll. When I build the project creates MYDLL.dll. I create a console application to test MYDLL but I dont how to call MYDLL. Could you help me?
My source code of MYDLL:
BEGIN_MESSAGE_MAP(CStressTestApp, CWinApp)
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()
CStressTestApp::CStressTestApp()
{
}
CStressTestApp theApp;
BOOL CStressTestApp::InitInstance()
{
InitCommonControls();
CWinApp::InitInstance();
AfxEnableControlContainer();
SetRegistryKey(_T("¥»Ύχ AppWizard ©²£¥ΝΊΐ³¥Ξµ{¦΅"));
CStressTestDlg dlg;
m_pMainWnd = &dlg;
INT_PTR nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
}
else if (nResponse == IDCANCEL)
{
}
return FALSE;
}
推荐答案
要生成dll,您需要编写与应用程序无关的代码.
并需要提供对该文件的引用
to make dll, u need to write application independent code.
and need to give references to that file
这篇关于如何将exe应用程序转换为dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文