I am trying to replicate the tree style view in Source Safe into my application in vb.net... I have already added the COM objects and connected to Source Safe database successfully... What i need is the method to populate the tree view with Source Safe files.... The logic to populate it and other necessary info... Can anyone HELP me???
I have inserted the tree view in my form
I have added the COM object for source safe
I have connected to source safe 'srcsafe.ini' file for database connection
I know i can use recursive program to fetch all the files in source safe
The only problem is i don't know about source safe functions. I have tried the MSDN website and read about all the properties of source safe. But how i use them, need some example.
And about flags in source safe, what i need to do to those flags when i perform the source safe functions from my application .
And how can i make the user restrictions like in source safe to my application
]
Asked
Active
Viewed 691 times
-1

Vidhyasaghar
- 45
- 1
- 9
-
What do you mean by the COM objects? Are these COM objects that communicate with VSS? The only ways I've worked with VSS is either through the GUI or the command line. If you're talking about a third-party COM object then you need to look at the documentation for it. If you're talking about VSS itself, I'm not aware of any way to programatically access it outside of the command line. – Tim Jun 30 '13 at 18:12
-
Yes COM object that can communicate with VSS, the Microsoft Source Safe 8.0 Type Library... I have studied the documents and functions in them. What i need to know is the functions to check in, check out, move, delete, etc. And how to operate the flags in them, i also want to know that if i make a change in VSS database(like checking out a file) will it be automatically updated in the database or do i need to set some kind of flag for it. – Vidhyasaghar Jul 01 '13 at 02:10
-
Can you provide a link for the documentation you're using? I'm not getting a whole lot of meaningful hits from Google on this. Also, what version of VSS are you using? – Tim Jul 01 '13 at 06:39
1 Answers
1
Here is documentation on VSS Automation. I had another link but it appears to be broken now.
http://msdn.microsoft.com/en-us/library/bb509341(v=vs.80).aspx
To work with VSS you would first create an instance of the VSSDatabaseClass class and call its Open method:
Dim vssDatabase As String = "\\server\somepath\srcsafe.ini"
Dim ssdb As new VSSDatabaseClass()
ssdb.Open(vssDatabase, userName, password)
The two methods that you will use most often are get_VSSItem() and get_Items(). These will return a singile VSSItem (which is a file or project) or a collection of items. So to get the root project of the database, you would use code such as this:
Dim root As IVSSItem = ssdb.getVSSItem("$/", False)
The Type property of a VSSItem indicates if the item is a project or file. If it is a project, you can get its child items using get_Items:
If root.Type = 0 Then 'Type = 0 means it's a project
Dim items As IVSSItems = root.get_Items(False)
For Each item As IVSSItem In items
If item.Type = 0 Then
'item is a project
Else
'item is a file
End If
Next
End If
I hope this gets you started.

Chris Dunaway
- 10,974
- 4
- 36
- 48