Prev: Install Maker
Next: Vo 2.7 Garbage Collector
From: robertino on 27 Oct 2006 04:12 Hi all, I've created an automation server against VBScript.RegExp 5.5 (CAVO 2.7b) and it runs pretty well most of the time, but every now and then appears somehow to corrupt memory. I get an error like the following: ***********************ERROR******************************** Visual Objects (Version 2.7. Build 2.2735), Version 2.7b 27.10.2006 09:57:17 Application: C:\CAVO27\Bin\TIM_VKP.DBG Error message: -------------- Error Code: 28 [ WRONG CLASS ] Subsystem: BASE Function: CHECKINSTANCEOF Argument: CIUNKNOWN <-> NIL CallStack: IUNKNOWN:ADDREF (Line: 0) DW_TIH_LIEFERSCHEINE:BUILDLISTVIEWITEMS (Line: 86) DW_TIH_LIEFERSCHEINE:PB_SETOPTIONSANDSEARCH (Line: 80) APP:START (Line: 40) START (Line: 8) Error Object created: -------------------- SubSystem :BASE SubCode :0 GenCode :Wrong class OsCode :0 ArgType :NIL FuncPtr :0x00000000 ArgNum :0 FuncSym :CHECKINSTANCEOF Severity :0 CanDefault :.F. CanRetry :.F. CanSubstitute :.T. Operation : Description : FileName : Tries :0 FileHandle :0 SubCodeText : Arg :CIUNKNOWN <-> NIL ArgTypeReq :NIL MaxSize :0 SubstituteType :LOGIC CallFuncSym : -------------------- As I say, it runs pretty well for a time - it'll process a few thousand strings, many times over, and then just give up the ghost, but never in the same place in the code, and never by the same string. Here's the code fragment (cCharge is a 20-character string): IF !Empty(cCharge) // Try to use the Charge as Zert....... lExpMatched := FALSE oRegExp := regX_IRegExp{"VBScript.RegExp"} IF (oRegExp != NULL_OBJECT) oRegExp:Pattern := "[ECJM]*[0-9]+\/[0-9]+" oRegExp:IgnoreCase := FALSE oRegExp:Global_ := FALSE lExpMatched := oRegExp:Test(cCharge) //lExpMatched := (oRegExp:Execute(cCharge) == 1) //oRegExp:Destroy() ENDIF oRegExp := NULL_OBJECT Collect() IF lExpMatched // Charge is like a "E06/12345" or ""E12345/04" string..... cTelairZert := cCharge cTypeOfZert := "T" ENDIF ENDIF The Destroy() also leads to a lot of problems. I notice that some of the Delphi people have been using the VBScript.RegExp 5.5 automation classes, and that they have written a wrapper class for the thing due to problems with strongly-typed languages. So, has anybody been using this object in VO who might have some tips on it's use? TIA, Mad Dog Rob
From: Meinhard Schnoor-Matriciani on 27 Oct 2006 04:54 Rob, what you might try is the following. Instead of using the OLE library, go and import the OLE SDK and link your apps and libraries against this one. Then modify the Axit method of IDispatch in the following way : METHOD Axit() CLASS IDispatch RETURN NIL I had a similar problem with the MS XML parser and the change solved mine. Regards Meinhard
From: robertino on 27 Oct 2006 05:21 Meinhard, Servus! <stupid>Duuhhh, where do I find the OLE SDK ?</stupid> Rob Meinhard Schnoor-Matriciani wrote: > Rob, > > what you might try is the following. Instead of using the OLE library, go > and import the OLE SDK and link your apps and libraries against this one. > Then modify the Axit method of IDispatch in the following way : > > METHOD Axit() CLASS IDispatch > RETURN NIL > > I had a similar problem with the MS XML parser and the change solved mine. > > Regards > Meinhard
From: Karl Faller on 27 Oct 2006 05:28 Rob, what about c:\Cavo27\sdk\ ? HTH Karl >Meinhard, > >Servus! ><stupid>Duuhhh, where do I find the OLE SDK ?</stupid> > >Rob > >Meinhard Schnoor-Matriciani wrote: >> Rob, >> >> what you might try is the following. Instead of using the OLE library, go >> and import the OLE SDK and link your apps and libraries against this one. >> Then modify the Axit method of IDispatch in the following way : >> >> METHOD Axit() CLASS IDispatch >> RETURN NIL >> >> I had a similar problem with the MS XML parser and the change solved mine. >> >> Regards >> Meinhard
From: robertino on 27 Oct 2006 05:51
Yeah, <enlightened>found it in the meantime </enlightened> - almost got it all in place now, but am still coming up with a "Class DATAFIELD multiple defined" - ie a Sytem Classes conflict, and can't seem to find where I'm NOT using System SDK. Rob Karl Faller wrote: > Rob, > what about c:\Cavo27\sdk\ ? > HTH > Karl > > >Meinhard, > > > >Servus! > ><stupid>Duuhhh, where do I find the OLE SDK ?</stupid> > > > >Rob > > > >Meinhard Schnoor-Matriciani wrote: > >> Rob, > >> > >> what you might try is the following. Instead of using the OLE library, go > >> and import the OLE SDK and link your apps and libraries against this one. > >> Then modify the Axit method of IDispatch in the following way : > >> > >> METHOD Axit() CLASS IDispatch > >> RETURN NIL > >> > >> I had a similar problem with the MS XML parser and the change solved mine. > >> > >> Regards > >> Meinhard |