Hi Dan,
If it's an interface, then you can't create an instance of it... You can
create an instance of a class that implements that interface however.
--
HTH,
-- Tom Spink, Über Geek
Please respond to the newsgroup,
so all can benefit
" System.Reflection Master "
==== Converting to 2002 ====
Remove inline declarations
"Dan Holmes" <(E-Mail Removed)> wrote in message
news:#ODv8$(E-Mail Removed)...
> VB won't let me do that. the CIBOMConfig.IB_BOMConfig is underlined green.
> Intellisense didn't prompt for that either. It is just an interface
though.
>
> Dan Holmes
>
> "Tom Spink" <(E-Mail Removed)> wrote in message
> news:%23Wh$(E-Mail Removed)...
> > Hi Dan, try this:
> >
> > Dim cfg As New CIBOMConfig.IB_BOMConfig
> >
> > and then just use 'cfg' as you would
> >
> > --
> > HTH,
> > -- Tom Spink, Über Geek
> >
> > Please respond to the newsgroup,
> > so all can benefit
> >
> > " System.Reflection Master "
> >
> > ==== Converting to 2002 ====
> > Remove inline declarations
> >
> >
> > "Dan Holmes" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > I am creating an aspx application to use our existing COM objects. I
> > > referenced the component correctly and i have it Dimmed correctly.
What
> i
> > > get is "InvalidCastException". Here is the code
> > >
> > > Dim cfg as CIBOMConfig.IB_BOMConfig
> > > Dim o as Object
> > > o = CreateObject("CBOMConfig.IB_BOMConfig")
> > > cfg = o ' error happens here.
> > >
> > > CIBOMConfig.IB_BOMConfig is not the default interface for this
> component.
> > > It is one of the implement statements. I can't figure out how to get
> the
> > > .NET eqivalent of QueryInterface to work. in VB6 the assignment would
> do
> > > it.
> > >
> > > Dan Holmes
> > >
> > >
> >
> >
>
>
|