Solved

Can anyone get Microsoft's diffmergectl.ocx to work?

Posted on 2004-10-04
11
494 Views
Last Modified: 2010-05-18
MS distribute diffmergectl.ocx as an unsupported tool. It is supposed to allow access to MS Visual sourceSafe's Diff and Merge facilities.
I retrieved the file from the Visual Studion installation disks, placed it in my Visual Studio 6.0 ..\vss\win32 folder and registered it with regsvr32.exe.

However, when I try to instantiate it in a VB script, I get "Catastrophic Error".

Any ideas?
0
Comment
Question by:gerard_odonnell
  • 6
  • 5
11 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 12221414
What do you mean by VB script?  Do you have some source code to show your situation?

Bob
0
 

Author Comment

by:gerard_odonnell
ID: 12222281
Save this text as a file with a .vbs extension and run it using cscript:

Dim Merge
Set Merge = CreateObject("DIFFMERGECTL.ViewerCtrl.1")

If Merge Is Nothing Then
      MsgBox "Nada"
Else
      Merge.AboutBox()
End If

Result:
The AboutBox call results in a "catastrophic failure" message from cscript.
And maybe I am a failure but not a catastrophic one hopefully.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 12225885
Try adding a COM reference to the DiffMerge control.  You should get a COM wrapper class reference in your project reference list.  Then try early-binding this control, instead of late-binding (CreateObject).

Bob
0
 

Author Comment

by:gerard_odonnell
ID: 12230628
Thanks Bob but as far as I know, vb script doesn't support early binding.
If I try to use what I think is early binding e.g  a statement like "Set Merge = New DIFFMERGECTL.ViewerCtrl.1", cscript gives me a VBScript compilation error.

Is it possible that the control does not support automation?
Maybe there is some way to determine from the ocx's type library if it supports automation or has to be instantiated in a control container?
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 12230667
How are you implementing this?  What do you mean by cscript and VBScript?  Are you working with VB.NET?

Bob
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:gerard_odonnell
ID: 12230838
Sorry - let me clarify : I'm hoping to instantiate the diifmerge activeX control via Windows Script Host (WSH) in Windows 2000. I'm using scripting since my knowledge of Visual Basic is very limited and so I can change my script without recompiling a VB application.

cscript.exe is the command-line tool in Windows for running these scripts, which are typically in Microsoft's vbscript or jscript scripting languages.

Maybe what I'm trying to do doesn't make sense but I was hoping to use my script to automate Microsoft Visual SourceSafe in a development environment. I'd like to make a script which can diff source code on a developer's machine against what's in the SourceSafe database. SourceSafe's front end is very limited.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 12230947
Ok, so this is not a VB.NET question.  I can throw all that stuff out the window then.

Do you have an ActiveX container, such as VB6 form?  You need to be able to test if you can place this control in the container.

I haven't seen anyone talking about doing what you are doing, but that doesn't mean that I don't understand.

Bob

0
 

Author Comment

by:gerard_odonnell
ID: 12240867
I can use the control in a container but not from Windows Script Host.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 12241014
That means that this control needs to be sited on a valid ActiveX container, and cannot be instantiated otherwise.

Bob
0
 

Author Comment

by:gerard_odonnell
ID: 12241783
Is there any way to determine from the type library whether this is the case?
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 125 total points
ID: 12241928
No, but if you try to dimension a new variable in VB6, the Diff, Viewer, and VisMerge classes are not available.  

You can place the control on a site, but you can't instantiate one, and I don't think that I know of any way around that one.

Bob
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now