T
trackboy
Unregistered / Unconfirmed
GUEST, unregistred user!
在pb中可以用以下代码实现先要注册vssapi.dll)
//创建ole对象
iole_vss=create oleobject
iole_vss_item=create oleobject
//创建总的vss的automation对象
iole_vss.ConnectToNewObject("SourceSafe.0")
iole_vss.open("d:/vss_data/srcsafe.ini","admin","")
//创建对应具体vss文档的操作对象
ll_result=iole_vss_item.connecttonewobject("VSSItem")
改成delphi:
var
iole_vss: variant;
iole_vss_item:variant;
begin
iole_vss:=CreateOLEObject('SourceSafe.0');
iole_vss.open('d:/vss_data/srcsafe.ini,'admin','');
iole_vss_item:=CreateOLEObject('VSSItem');
...........
最后一句报错"EOleSysError:尚未调用CoInitialize",不知何解,欢迎大家来讨论,3q
//创建ole对象
iole_vss=create oleobject
iole_vss_item=create oleobject
//创建总的vss的automation对象
iole_vss.ConnectToNewObject("SourceSafe.0")
iole_vss.open("d:/vss_data/srcsafe.ini","admin","")
//创建对应具体vss文档的操作对象
ll_result=iole_vss_item.connecttonewobject("VSSItem")
改成delphi:
var
iole_vss: variant;
iole_vss_item:variant;
begin
iole_vss:=CreateOLEObject('SourceSafe.0');
iole_vss.open('d:/vss_data/srcsafe.ini,'admin','');
iole_vss_item:=CreateOLEObject('VSSItem');
...........
最后一句报错"EOleSysError:尚未调用CoInitialize",不知何解,欢迎大家来讨论,3q