----------------------------------------------------------- New Message on BDOTNET
----------------------------------------------------------- From: raagz Message 2 in Discussion Hi Jhonny, Check this links http://www.msdn.microsoft.com/vstudio/previous/ssafe/using/articles/ Code Samples http://msdn.microsoft.com/vstudio/previous/ssafe/downloads/samples/ http://msdn.microsoft.com/library/default.asp?URL=/library/techart/vssauto.htm Also here is the sample code I'm assuming you've added a reference to SourceSafeTypeLib already. I also suggest a "using SourceSafeTypeLib;" statement, or for VB users, I think it is "import". Quick start to VSS Automation with .NET: // start with a new database object IVSSDatabase vssdb = new VSSDatabaseClass(); // now open it vssdb.Open(strIni, strUser, strPassword); // now you can get users and their rights for a project VSSUser user = vssdb.get_User(username); int rights = user.get_ProjectRights(strProject); // or get a project or file VSSItem vssItem = _vssdb.get_VSSItem(strItem, bDeleted); // then get a specific version of this item, where version // can be a specific version number, a date, or a label. See the // documentation on this one as the value here can be interpreted // in several different ways. Specifically, if you label can in any way // be interpreted as a date, then it probably will and you won't get // what you want. VSSItem vssVersionItem = vssItem.get_Version(version); // You can also get collections of items and then iterate over them IVSSItems items = vssItem.get_Items(bIncludeDeleted); foreach(VSSItem tmpItem in items) { // do stuff on each item here //see docs for what properties/methods are available string name = tmpItem.Name; string version = tmpItem.VersionNumber; // etc... } // Or iterate over all of the versions of an item foreach(IVSSVersion objVersion in vssItem.get_Versions(flags)) { // do stuff on each version Hope this helps you. Thanks Raghavendra ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/BDOTNET/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]
