T
trackboy
Unregistered / Unconfirmed
GUEST, unregistred user!
在doc_class中调用vss_class的方法:
private
vss:Ivss_class;
.....
function Tdoc_class.get(id: Integer;
state: WordBool): OleVariant;
var
filename:string;
filepath:string;
begin
//创建vss_class
OleCheck(ObjectContext.CreateInstance(CLASS_vss_class,IID_Ivss_class,vss));
filename:='test.doc';
filepath:='c:/'+filename;
vss.get_data(filename,filepath);
在vss_class的create中添加初始化代码,但是不起作用,是不是方法不对??
constructor Tvss_class.create;
begin
//以下语句都不起作用
self.vss_class:=CreateOLEObject('SourceSafe.0');
self.set_user('ssl','');
self.vss_path:='$/test/';
self.vss_open('//proxy/vss_data/srcsafe.ini');
end;
private
vss:Ivss_class;
.....
function Tdoc_class.get(id: Integer;
state: WordBool): OleVariant;
var
filename:string;
filepath:string;
begin
//创建vss_class
OleCheck(ObjectContext.CreateInstance(CLASS_vss_class,IID_Ivss_class,vss));
filename:='test.doc';
filepath:='c:/'+filename;
vss.get_data(filename,filepath);
在vss_class的create中添加初始化代码,但是不起作用,是不是方法不对??
constructor Tvss_class.create;
begin
//以下语句都不起作用
self.vss_class:=CreateOLEObject('SourceSafe.0');
self.set_user('ssl','');
self.vss_path:='$/test/';
self.vss_open('//proxy/vss_data/srcsafe.ini');
end;