Solved

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

Posted on 2004-10-04
11
484 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

759 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

21 Experts available now in Live!

Get 1:1 Help Now