????????????Dll??????????
???????????? ???????[ 2014/6/23 14:20:43 ] ???????????????? ???????? ???????
????????????????????
??????1????VS2010?????->???->????????Win32???
??????2????????????“Win32Dll”????????????????????????Dll??????????????????????????
???????????????Dll???????????????Dll???д?????????????????????????C++?????д??????????????д?????????????????
????1.??Win32Dll.h?е???CWin32Dll ??????
class WIN32DLL_API CWin32Dll {
public:
CWin32Dll(void);
// TODO: ???????????????
private:
int m_nVar;
std::string m_strVar;
public:
void set(int );
void printfValue();
void set_str(const std::string &);
void printf_str();
};
extern WIN32DLL_API int nWin32Dll;
//????????????????????????????????
WIN32DLL_API void printfValue(const int &);
WIN32DLL_API int fnWin32Dll(void);
|
????2.????????????????????????????????????????Win32Dll.cpp?е???????
CWin32Dll::CWin32Dll()
{
return;
}
void CWin32Dll::set(int v)
{
m_nVar = v;
}
void CWin32Dll::printfValue()
{
std::cout << m_nVar << std::endl;
}
void CWin32Dll::set_str(const std::string &str)
{
m_strVar = str;
}
void CWin32Dll::printf_str()
{
std::cout << m_strVar << std::endl;
}
void printfValue(const int &v)
{
std::cout << v << std::endl;
}
|
?????????????????????б?????????????Debug?????????????????.Dll?????.lib???
??????

???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11