call way collision in C++ and Pascal

解决方案 »

  1.   

    你能在vb中调用返回自定义接口类型的方法,请帮我一下:我使用delphi生成了一个测试用的com
      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方法,如何解决
      
      

  2.   

    我的贴子在http://www.csdn.net/expert/topic/545/545140.xml
      

  3.   

    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.
      

  4.   

    what is safecall?
    I have not see it before in vc or vb
      

  5.   

    safecall if the facility of delphi to ease Com programming
      

  6.   

    在VC使用生成类没有办法识别自定义类型,你可以使用import就可以啦