<script type="text/javascript">
</script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
vb.net 调用c写的dll问题
dll中有一初始化函数,函数的参数是一个用户函数的函数名,vc调用时如下
void Allocate(char** pbuffer, unsigned long* psize)
{
*psize = *psize * 2;
*pbuffer = new char[*psize];
}
SetAllocateFunction(Allocate); //调用用户定义函数 SetAllocateFunction是dll中函数
请问下如何在vb.net中定义此函数,并且给SetAllocateFunction这个函数传递这个函数指针,(传递这个函数的地址)
__________________________________________________________________________
自已顶
__________________________________________________________________________
没有人会?
__________________________________________________________________________
void Allocate(char** pbuffer, unsigned long* psize)
{
*psize = *psize * 2;
*pbuffer = new char[*psize];
}
--------------------------------------
这么多星号没看懂!!
__________________________________________________________________________
vb.net 调用c写的dll问题
dll中有一初始化函数,函数的参数是一个用户函数的函数名,vc调用时如下
void Allocate(char** pbuffer, unsigned long* psize)
{
*psize = *psize * 2;
*pbuffer = new char[*psize];
}
SetAllocateFunction(Allocate); //调用用户定义函数 SetAllocateFunction是dll中函数
请问下如何在vb.net中定义此函数,并且给SetAllocateFunction这个函数传递这个函数指针,(传递这个函数的地址)
__________________________________________________________________________
自已顶
__________________________________________________________________________
没有人会?
__________________________________________________________________________
void Allocate(char** pbuffer, unsigned long* psize)
{
*psize = *psize * 2;
*pbuffer = new char[*psize];
}
--------------------------------------
这么多星号没看懂!!
__________________________________________________________________________