用这个方法
if (GetObjectContext = nil) then
begin
OleCheck(CoCreateInstance(CLASS_mtsBooksObj, nil, CLSCTX_INPROC_SERVER or CLSCTX_LOCAL_SERVER, IID_ImtsBooksObj, bookObj)) ;
end
else
begin
GetObjectContext.CreateInstance(CLASS_mtsBooksObj,IID_ImtsBooksObj, bookObj);
end;