我做了个dll返回字符串,实现如下:char* __stdcall CALLBACK HelloMsg()
{
char* c="hello!";
return c;
}VB里面调用它:
Text1.Text=HelloMsg();结果什么都不显示,但我无意中在dll里加上一个MessageBox(),发现Text1就可以显示"hello!":char* __stdcall CALLBACK HelloMsg()
{
char* c="hello!";
MessageBox(0,"msg",0,0);
return c;
}
请问这个是什么原因?怎么解决?
{
char* c="hello!";
return c;
}VB里面调用它:
Text1.Text=HelloMsg();结果什么都不显示,但我无意中在dll里加上一个MessageBox(),发现Text1就可以显示"hello!":char* __stdcall CALLBACK HelloMsg()
{
char* c="hello!";
MessageBox(0,"msg",0,0);
return c;
}
请问这个是什么原因?怎么解决?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货