Click to See Complete Forum and Search --> : Problem using a COM Object without Set command


arb215
September 13th, 2005, 10:24 PM
Hello. I am a C++ programmer new to VB.

I am trying to use a COM object in VB.NET. I added a reference to it using the VB.NET IDE menu Project/Add Reference… I also wrote Imports statements so that the auto list members feature works. Now I can’t figure out how to use the COM object; the help for the library is for VB6.0 and VB.NET doesn’t have the Set command, so I’m stuck.

To use the COM object in VB6.0, you would code the following:

Dim CC as New ClearCase.Application

Dim Ver as CCVersion

Set Ver = CC.Version(“M:view\vob\file”)


When I get rid of the Set command (not used in .NET), the syntax checker complains that Ver isn’t instantiated. I tried to instantiate Ver using the New keyword, but if I do this, the compiler complains because the CCVersion constructor is Private.

Can I use this COM object in .NET? I need to find a way to create an object of type CCVersion to store the results of CC.Version(). Help please.

Alex