Re: Can not compile

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Ting (txing_at_optorun.co.jp)
Date: 07/26/04


Date: Mon, 26 Jul 2004 10:27:06 +0900

Thanks for the replies.

Ting

"Ralph" <nt_consulting32@hotmail.com> дÈëÓʼþ
news:uaZh5XYcEHA.3716@TK2MSFTNGP11.phx.gbl...
>
> "Ting" <txing@optorun.co.jp> wrote in message
> news:%23u21LnVcEHA.3512@TK2MSFTNGP12.phx.gbl...
> > I found the reason (superficially) and would like to post it
> > in case someone will find it helpful.
> >
> > The problematic code is:
> > Ubound( gActiveXObj.arrayType1(1).arrayType2(1).arrayType3)
> >
> > the gActiveXObj is an ActiveX EXE object. And Type1 is defined in its
> > class module.
> >
> > And Type2 and Type3 are public types defined in another ActiveX EXE
> > referenced by gActiveXObj.
> >
> > I tried:
> > 1. OK: Type2 and Type3 are moved to the same ActiveX EXE
> project
> > as gActiveXObj
> > 2. OK: Ubound( gActiveXObj.arrayType1(1).arrayType2)
> >
> > 3. OK: Ubound(
> gActiveXObj.arrayType1(1).arrayType2(1).arrayType4)
> > Type4 is of parallel relationship as arrayType3,
> > with minute
> > difference of member numbers and types (single
and
> > integer)
> >
> > Case 3 complicates the effort of explanation.
> >
> > In a word "UBound" causes the VB6 crash. But whatever inside souce code,
> > VB6 IDE should not crash. I did not try newer versions like VS2003, but
> wish
> > Microsoft will correct this definitely unfriendly way of compile.
> >
> >
> > Ting
> >
>
> Glad you found a solution. I know such problems can be maddening to hunt
> down and repair.
>
> M$ documentation doesn't exactly spell it out in detail, but UBound and
> LBound only work with 'regular' arrays. These methods essentially just
read
> the embedded 'count' member contained in the bounded array data type.
> (First integer is the length, the rest the array). It has trouble when it
> has to dereference this value.
>
> I think the following may apply for you situation.
> http://support.microsoft.com/default.aspx?scid=kb;en-us;197190#appliesto
>
> Just for grins...
> http://support.microsoft.com/default.aspx?scid=kb;en-us;186423
>
> hth
> -ralph
>
>



Relevant Pages