用.net开发了一个dll.在delphi7中调用。
已经import type library.然后调用CreateComObject时报错
"Arithmetic result exceeded 32 bits"
不知道什么原因。

解决方案 »

  1.   

    这是idl的内容:
    [
      uuid(A3C6916D-358E-3AC9-949A-BF23A38AD45A),
      version(1.0),
        custom({0F21F359-AB84-41E8-9A78-36D110E6D2F9}, "Ti30ComLib.Communication")
    ]
    coclass Communication {
        interface _Object;
        [default] interface ITi30ComLib;
        [default, source] dispinterface EventInterface;
    };
      

  2.   

    delphi code:
    var
    com:ITi30ComLib;
    begin
    // com := CreateComObject(CLASS_Communication);
    com := CoCommunication.Create;
    end;