OLE-Error when using RegExp object from vbscript.dll via ActiveX

forum.td.development (2005-2010)
StefanM
Germany
Posts: 674
Joined: 10 Aug 2018, 15:57
Location: Bavaria

OLE-Error when using RegExp object from vbscript.dll via ActiveX

Post by StefanM » 16 Mar 2009, 11:33

 Posted by:  Stefan Misch 

Hi,

has anybody of you ever used the RegExp-object (version 5.5) from
vbcript.dll (version 5.7.0.5730)? I generated the APL using the
ActiveX-Wizzard of TD3.1. I can initialize the COM object using the
Create( ) method. I can call the PropSetPattern method but I get a 80020009
error without any further text when calling Execute( ) to analize a string.

Googling brought no details. I'm assuming that either this DLL has a
nonstandard IDispatch interface or some security problem regarding
vbscript.dll. I already un-/registered the DLL using regsvr32.exe.

TIA,
Stefan

StefanM
Germany
Posts: 674
Joined: 10 Aug 2018, 15:57
Location: Bavaria

OLE-Error when using RegExp object from vbscript.dll via ActiveX

Post by StefanM » 16 Mar 2009, 12:45

 Posted by:  Stefan Misch 


Again me,

I wrote a small test app in VBA in Excel and this works. So that means that
the DLL itsself is correctly registered and working. If there is a security
problem, then Excel/VBA should also be affected. So the problem seems to be
just on TD3.1's side ...

Stefan Beltrame

OLE-Error when using RegExp object from vbscript.dll via ActiveX

Post by Stefan Beltrame » 16 Mar 2009, 22:59

 Posted by:  Stefan Beltrame 

Hi Stefan

This occurs when you set an invalid expression. For example missing a
closing ']'

Fails:
'[a-zA-Z0-9+'

Correct:
'[a-zA-Z0-9]+'

Remember also to replace a backslash ('\') in the expression by two
backslashes ('\\').

Regards
Stefan

StefanM
Germany
Posts: 674
Joined: 10 Aug 2018, 15:57
Location: Bavaria

OLE-Error when using RegExp object from vbscript.dll via ActiveX

Post by StefanM » 17 Mar 2009, 00:49

 Posted by:  Stefan Misch 

Hi Stefan, too

as the regexp is rather complex I had one of those many "\" not replaced
by "\\". As I tested this with another tool and VBA there was no need to
replace the backslashes. Somehow I always made some error when doubling
the backslashes... Argh!

Wouldn't it be great if this RegExp thing would be a bit more
communicative...

Thanks for pointing me in the right direction!

Stefan

Return to “td.development”

Who is online

Users browsing this forum: [Ccbot] and 0 guests