[Error] Unit1.pas(38): Type not allowed in OLE Automation call
还是不行

解决方案 »

  1.   

    try
     oleMapInfo  := CreateOLEObject('MapInfo.Application');
    except
      showmessage('aa');
    end;
      theResponder := Tautomationtest.create;
      //下面这行报错
      oleMapInfo.SetCallback(theResponder as Tautomationtest);   Str(panel1.Handle, sWinHand);
      msgString := 'Set Next Document Parent '
     + sWinHand + ' Style 1';
      oleMapInfo.Do(msgString);
      msgString := 'Set Application Window '
     + sWinHand;
      oleMapInfo.Do(msgString);
    //打开地图并显示,
      msgString := 'Run Application "'
     + ExtractFilePath(Application.EXEName) + 'test.wor"';
      oleMapInfo.Do(msgString);
    这是我的程序
      

  2.   

    谁有delphi调用mapinfo的例子吗〉发我一个好吗?
    [email protected]
      

  3.   

    那就肯定是你调用的参数有误
    你可以看看那个对象里面的方法应该调用什么,传入什么类型
    你是否确认你以前用其他方法使用这个成功过
    我没有用过mapinfo