G
gywlily
Unregistered / Unconfirmed
GUEST, unregistred user!
李维<<ADO/MTS/COM+高级程序设计>> P406页 为什么老是报错: Invalid data packet ??? 代码如下 ( 积分: 30 )<br />这是中间层的一个接口方法, CLASS_mtsBooksObj是另一个COM+对象的ClassID,
IID_ImtsBooksObj 是接口ID,请问哪里有错??? 感谢
我的QQ:20950081 MSN: gywmail@hotmail.com
procedure TmtsSecurityObj.GetBooks(vCookie: OleVariant;
var vDatas: OleVariant);
var
bookObj: ImtsBooksObj;
iRecOut: Integer;
Option : TGetRecordOptions;
OwnerData: OleVariant;
Params: OleVariant;
begin
if True then
begin
try
OleCheck(ObjectContext.CreateInstance(CLASS_mtsBooksObj, IID_ImtsBooksObj, bookObj));
//////////////////////////////////就是这一句报错, bookObj 没有返回值
Option := [grMetaData, grReset];
vDatas := bookObj.AS_GetRecords('DataSetProvider1', -1, iRecOut, byte(Option), '',Params, OwnerData);
SetComplete;
except
SetAbort;
end;
end
end;
IID_ImtsBooksObj 是接口ID,请问哪里有错??? 感谢
我的QQ:20950081 MSN: gywmail@hotmail.com
procedure TmtsSecurityObj.GetBooks(vCookie: OleVariant;
var vDatas: OleVariant);
var
bookObj: ImtsBooksObj;
iRecOut: Integer;
Option : TGetRecordOptions;
OwnerData: OleVariant;
Params: OleVariant;
begin
if True then
begin
try
OleCheck(ObjectContext.CreateInstance(CLASS_mtsBooksObj, IID_ImtsBooksObj, bookObj));
//////////////////////////////////就是这一句报错, bookObj 没有返回值
Option := [grMetaData, grReset];
vDatas := bookObj.AS_GetRecords('DataSetProvider1', -1, iRecOut, byte(Option), '',Params, OwnerData);
SetComplete;
except
SetAbort;
end;
end
end;