Wrox Programmer Forums
|
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 17th, 2003, 03:08 PM
Registered User
 
Join Date: Jun 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Launch Visual SourceSafe

I was wondering how to launch Visual SourceSafe within a VB application? I tried the following code:

Dim VSSApp As Object
Set VSSApp = GetObject("", "SSEXP.application")

SSEXP.exe is the SourceSafe executable, however I am not sure what to call in order to launch it. I included the reference to SourceSafeTypeLib, however this dll does not give me the capability to create the object. I get the error ActiveX component cannot create object. Any help is appreciated.

Thanks,
Sheena :)
 
Old July 17th, 2003, 05:18 PM
Ned Ned is offline
Authorized User
 
Join Date: Jun 2003
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sheena,
Here find the code to launch the SourceSafe application.
Cheers,
-Ned

    Dim ReturnValue As Integer
    'Open the SourceSafe application from the specified path
    If Len(Dir("C:\Microsoft Visual Studio\VSS\win32\SSEXP.EXE")) > 0 Then
        ReturnValue = Shell("C:\Microsoft Visual Studio\VSS\win32\SSEXP.EXE", 1)
        AppActivate ReturnValue ' Activate the window
    End If


Quote:
quote:Originally posted by sheenaacre02
 I was wondering how to launch Visual SourceSafe within a VB application? I tried the following code:

Dim VSSApp As Object
Set VSSApp = GetObject("", "SSEXP.application")

SSEXP.exe is the SourceSafe executable, however I am not sure what to call in order to launch it. I included the reference to SourceSafeTypeLib, however this dll does not give me the capability to create the object. I get the error ActiveX component cannot create object. Any help is appreciated.

Thanks,
Sheena :)
-Ned
 
Old July 17th, 2003, 05:37 PM
Registered User
 
Join Date: Jun 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Ned,

But unfortunately, I didn't specify that other people will be using this code (it's an add-in) and I want to launch visual sourcesafe without the pathname being hardcoded. The shell function works great when launching it from my computer but I now need to find a function that will search the registry for the path (since it varies on each computer) and then use that pathname variable. Something like this Shell(pathname).

Any ideas?
Thanks
 
Old July 17th, 2003, 07:06 PM
Authorized User
 
Join Date: Jun 2003
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Sheena,

You can get the installation path in the key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudi o\6.0\Setup\Microsoft Visual SourceSafe\ProductDir"

Stéphane Lajoie





Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual SourceSafe 2005 questions? MSByrnes Other Programming Languages 1 January 7th, 2008 02:45 AM
Visual Sourcesafe somnath.kartic ASP.NET 2.0 Professional 4 January 10th, 2007 05:09 PM
sourcesafe jay schumacher VB.NET 2002/2003 Basics 0 April 19th, 2006 01:11 PM
SourceSafe Error Fuad VB How-To 1 November 25th, 2004 06:34 AM
Using SourceSafe with ASP.NET Alaric VS.NET 2002/2003 2 October 3rd, 2003 03:28 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.