【发布时间】:2011-10-28 13:27:46
【问题描述】:
我在非托管 c++ 中有许多 cpp 文件,我想使用 P\Invoke 从 vb .net 访问这些文件的类方法,为此我编写了 C 包装器来公开类方法。谁能帮助我,如何围绕 C++ 代码编写一个 c 包装器。我正在复制我的文件的一些代码,请帮我为这些函数编写 c 包装器。
#include "StdAfx.h"
#include "Verify.h"
Verify::Verify(void)
:_verified(false)
{
}
Verify::~Verify(void)
{
}
void Verify::SetVerified(bool value)
{
_verified = value;
}
bool Verify::GetVerified(void) const
{
_verified;
}
void Verify::SetFailurePoint(std::basic_string<TCHAR> const & value)
{
_failurePoint = value;
}
std::basic_string<TCHAR> const & Verify::GetFailurePoint(void) const
{
return _failurePoint;
}
【问题讨论】:
标签: wrapper