How can I pass a char * from C dll to VB
Here is sample code:
void Cfunc(char *buffer,int len)
{
BSTR buf_bstr = SysAllocString((BSTR)buffer);
VBptr.VBfunc(buf_bstr,len);
}
This function is not working, In actual some other values are sent to the VB rather than the actual value.
Could anyone please suggest a solution?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…