Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2004-10-04
11
512 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

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
 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

840 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