在李维的经典的delphi的ado/mts的第九章里面,在一个mts/com+对象里面调用另一个对象的时候,在olecheck(objectcontext.createinstance(....,..,..))总是出错,怎么回事?各位大侠?是不是要引用一个单元?还是
源码:
var bookobj:Imtsbooksobj;
    aps:Iappserver;
    options:Tgetrecordoptions;
    ...
begin
if verifycookie(vcookie) then
    begin
        try
           olecheck (objectcontext.createinstanceclass_mtsbooksobj,iid_Imtsbooksobj,bookobj));
......
help ???

解决方案 »

  1.   

    没有声明的标识符,undeclared identifier,问题是怎么得到这个函数在那个unit里面啊?谢谢回应。
      

  2.   

    查帮助阿,笨
    Unit
    ComObjCategory
    COM utilitiesprocedure OleCheck(ECode: HResult);DescriptionOleCheck is used to wrap many COM routines, so that if that routine fails, users will have an opportunity to handle it in the resulting exception that is raised.If ECode is a value less than zero, OleCheck raises an EOleSysError exception that specifies the error code.