//MyRegularDll.hclass CMyRegularDllApp : public CWinApp
{
public:
CMyRegularDllApp(); int ok;
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMyRegularDllApp)
//}}AFX_VIRTUAL //{{AFX_MSG(CMyRegularDllApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};------------------
//MyRegularDll.cppextern "C" BOOL PASCAL EXPORT ExportedFunction(int a)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
// normal function body here
ok=a;
return true;
}比如我想在以上函数中调用CMyRegularDllApp::ok成员函数;
但是,我这样写,不成功,说"error C2065: 'ok' : undeclared identifier"
{
public:
CMyRegularDllApp(); int ok;
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMyRegularDllApp)
//}}AFX_VIRTUAL //{{AFX_MSG(CMyRegularDllApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};------------------
//MyRegularDll.cppextern "C" BOOL PASCAL EXPORT ExportedFunction(int a)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
// normal function body here
ok=a;
return true;
}比如我想在以上函数中调用CMyRegularDllApp::ok成员函数;
但是,我这样写,不成功,说"error C2065: 'ok' : undeclared identifier"
解决方案 »
- 关于CArray传值方式发生运行时错误
- 关于随机生成文件名,除了用rand()我还能用GUID来随机么?
- 解析xml时候,CreateInstance,报错显式无法创建DOMDocument对象,没有注册类别(急!)
- GetStockObject
- 如何在richedit里复制粘贴图文数据
- 通用对话框资源中,文件查找结束时有无法预知的错误.
- LINK : warning LNK4089: all references to "qt-mt321.dll" discarded by /OPT:REF
- 关于异常处理的简单问题?
- 我准备自学vc++,高手给点建议吧
- 我想演示冒泡排序的过程
- 简单问题:LICENSE 中文应该叫什么?
- 努力学习软件开发还要学习英语,英语高手来指点英语四级学习方法,大量散分。。。
{
AFX_MANAGE_STATE(AfxGetStaticModuleState()); // normal function body here
theApp.ok(); return TRUE;
}
{
AFX_MANAGE_STATE(AfxGetStaticModuleState()); // normal function body here
theApp.ok(); return TRUE;
}