Microsoft KB Archive/163407

= How To Use OLE Automation with Visual SourceSafe =

Article ID: 163407

Article Last Modified on 7/13/2004

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition
 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 6.0 Professional Edition
 * Microsoft Visual SourceSafe 5.0 Standard Edition

-



This article was previously published under Q163407



SUMMARY
Visual SourceSafe version 5.0 is an OLE automation server and can be called programmatically from within Visual FoxPro. This article describes how to invoke the OLE server and demonstrates some simple functionality.



MORE INFORMATION
Assuming that Visual SourceSafe Version 5.0 is installed, and that Tastrade.pjx has been added to a SourceSafe database, the following code sample will check out main.prg to the current Visual FoxPro default directory: oSSafe = CREATEOBJECT("SourceSafe")

* Syntax is object.open(path to srcsafe.ini, username, password) oSSafe.open("C:\vss\srcsafe.ini","guest","")

* The next 2 lines show some of the object's properties ? oSSafe.username ? oSSafe.currentproject

* The next line assumes FoxApps is the Visual SourceSafe project and * Tastrade is a subproject oFile = oSSafe.vssitem("$/FoxApps/Tastrade/main.prg") oFile.Checkout oFile.Checkin For more information on the Visual SourceSafe object model, you can use a tool such as the Visual Basic object browser. Documentation is also available on the World Wide Web at:

http://www.microsoft.com/ssafe

Keywords: kbhowto kbinterop kbautomation KB163407

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.