Solved

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

Posted on 2004-10-04
11
530 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
[X]
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
  • 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
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
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…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

632 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