I am rolling out a little wrapper for ClearCase 3.2.1 on NT clients. Using
the below mentioned unsupported CAL in VB6. The interface works well and I
have noticed performance improvements over spawning a command prompts for
each command. The draw back are...
* CAL 3.2.1 is NOT supported. It works, but don't bother to call tech
support. Not supported means no tech support.
* Some functions I never got to work. OK really just one, "cleartool
mkattr -replace...", but I'm guessing there are probably others.
Frustrating that the syntax works in the command prompt but not in the CAL.
I spawn a command prompt for this one command.
* The format of the returned results are different than the command
prompt results. Not bad just different.
If I had it to over again I would have written it in C++ because the little
wrapper isn't so little any more. And I use system features that I end up
jumping through hoops to get with VB.
I did have to check 'ClearCase Automation Library 3.2' in the
Project:Reference list that was found at C:\WINNT\System32\ccauto.dll. I'm
guessing it was placed there by the ClearCase 3.2.1 installer.
Here's the heart of the VB application
It opens an object, ClearCase.ClearTool
It passes a cmd to ClearCase.ClearTool.CmdExec and returns an Output
The command may fail (CtError), in which case, Output is set to an error
message and the ClearTool function returns FALSE
Public Function ClearTool(Cmd As String, Optional Output As String = "") As
Boolean
Dim CT As ClearCase.ClearTool
ClearTool = True
Set CT = CreateObject("ClearCase.ClearTool")
On Error GoTo CtError
Output = CT.CmdExec(Cmd)
Exit Function
CtError:
Output = "Error - " & Err.Description & ", " & Output & vbCrLf & " for
the following ClearCase.ClearTool command" & vbCrLf & Cmd
ClearTool = False
Resume Next
End Function
Snippet of code that uses the above function...
If Not ClearTool("startview " & toView, Result) Then
MsgBox GetMVFS & "\" & toView & " failed to start!"
Exit Function
End If
If you have gotten this far I guess your really interested in using the CAL.
I have a small application which I found valuable in developing my CAL. It
is a VB application which allows a command string input and passes that
string to the CAL. The output is displayed in another box. Email me if you
would like the source code or application. (Warning about the application
request. My install shield experiences have been marginal at best. Needed
DLL /OCX files are commonly missing.)
Good Luck.
-----Original Message-----
From: Echlin, Jamie [mailto:jechlin@SPSS.COM
Sent: Thursday, January 20, 2000 6:50 AM
To: 'GMussbacher@Atronic.com'; cciug@Rational.Com
Subject: RE: [cciug] API functions
The CAL (clearcase automation layer) was there in 3.2.1, it's just very
aneamic, and unsupported. If you can't upgrade to 4.0 then you can use the
3.2.1 CAL. As I remember it has a single object ClearTool, with a single
method CmdExec, which as you would guess is equivalent to spawning a
cleartool process. The server is implemented in the ccauto.dll file. Use
oleview or something to generate an .idl file.
If you use it you can avoid the command prompt windows, and you might get a
slight performance increase too.
HTH, jamie
-----Original Message-----
From: GMussbacher@Atronic.com [mailto:GMussbacher@Atronic.com
Sent: 20 January 2000 13:01
To: cciug@Rational.Com
Subject: [cciug] API functions
Importance: High
Hi together!
Is there anyone out there, who wrote a program in Visual C++ or with an
other program, that
uses API calls from ClearCase. The idea is to write a programm that will
call a lot of ClearTool
Shell commands without poping up a lot of "screen destroying" command shell
windows.
Rational Support said that this would be done by an API called CAL in
ClearCase 4.0.
But we are still using ClearCase 3.2.1 on NT.
Thanks
Guenter Mussbacher
Configuration Manager at ATRONIC Int GmbH
Austria
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This archive was generated by hypermail 2b29 : Sun May 06 2001 - 00:22:32 EDT