I have create a Com Object with delphi5, and VB6 can not call its method returning BSTR.I use safecall if I define the method Type library Editor HRESULT _stdcall getString([out, retval] BSTR strValue ) Interface getString:WideString;safecall; Implement getString:WideString;safecall; the vb6 class browser will crashed when browse the classif I define the method Type library Editor BSTR _stdcall getString( void ); Interface getString:WideString;safecall; Implement getString:WideString;safecall; it will invoke a access violation error when i call the method.what is wrong with me? I will highly appreciate your help. thanks.
what is safecall? I have not see it before in vc or vb
safecall if the facility of delphi to ease Com programming
TestComParam
有3个方法
getInteger return 1
getString return "String"
getObject return self/this
生成了一个Activex dll Library
在delphi中引入这个dll后使用这三个方法都正常
而在Vb6中引入这个dll后只有getInteger方法正常,其他都导致异常,请高手指点
我测试的源码在 http://www.webstar.com.cn/download/testcom.zip下载
请指点为什么在vb中不能正确使用getString:和getObject方法,如何解决
if I define the method
Type library Editor
HRESULT _stdcall getString([out, retval] BSTR strValue )
Interface
getString:WideString;safecall;
Implement
getString:WideString;safecall;
the vb6 class browser will crashed when browse the classif I define the method
Type library Editor
BSTR _stdcall getString( void );
Interface
getString:WideString;safecall;
Implement
getString:WideString;safecall;
it will invoke a access violation error when i call the method.what is wrong with me? I will highly appreciate your help. thanks.
I have not see it before in vc or vb