Getting error:
Compiling...
RegEx.iwb
No Errors
Linking...
IWBasic Linker v1.11 Copyright © 2011 Ionic Wind Software
Unresolved external __imp__gmtime64
Error: C:\Program Files\iwbdev\libs\disphelper.lib\disphelper.obj - Unresolved extern __imp__gmtime64
Error: C:\Program Files\iwbdev\libs\disphelper.lib\disphelper.obj - Unresolved extern __imp__mktime64
Error: C:\Program Files\iwbdev\libs\disphelper.lib\disphelper.obj - Unresolved extern __imp__localtime64
Error(s) in linking C:\Documents and Settings\All Users\Documents\IWBasic\MyProgs\RegEx\RegEx.exe
I have looked thru all the files in my LIB directory and can find nothing that defines these Unresolved fields. I am trying to see about doing a REGEX subroutine, but I can't get it to compile without these definitions.
Thanks,
Bill
Have you installed Sapero's header files and have
$use "windowssdk.inc"
at the top of your program?
Added it and still get same errors:
Here is the code:
$include "shlwapi.inc"
$use "windowssdk.inc"
OPENCONSOLE
PRINT "VBS Regular Expression Example"
PRINT "------------------------------"
PRINT strRep("1m2i3n4i5B6a7s8i9c0", "[a-z]", ",")
PRINT strRep("1m2i3n4i5B6a7s8i9c0", "[0-9]","")
IF strMatch("[mini]","1m2i3n4i5B6a7s8i9c0")
PRINT "Pattern Match"
ELSE
PRINT "No Pattern"
ENDIF
PRINT
PRINT "Press Any Key to Exit"
DO
UNTIL INKEY$ <> ""
CLOSECONSOLE
END
'replace in a string
SUB strRep(string strmain,string pattern,string replace),string
string temp
IUnknown regexp = CreateComObject("VBScript.RegExp","")
SetComProperty(regexp,".IgnoreCase = %d",TRUE)
SetComProperty(regexp,".Global = %d",TRUE)
SetComProperty(regexp,".Pattern = %s",pattern)
GetComProperty(regexp,"%s",&temp,".Replace(%s,%s)",strmain,replace)
SysFreeString(temp)
regexp->Release()
RETURN temp
ENDSUB
'finding matches
SUB strMatch(string pattern,string strmain),int
int value
IUnknown regexp = CreateComObject("VBScript.RegExp","")
SetComProperty(regexp,".Pattern = %s",pattern)
SetComProperty(regexp,".IgnoreCase = %d",TRUE)
GetComProperty(regexp,"%b",&value,".Test(%s)",strmain)
regexp->Release()
RETURN value
ENDSUB
Not a lot to it, it just is missing some thing.
Thanks,
Bill
(Trying to keep forum active, so any one checking it out will see that we have things going on, other than waiting for update to new version) I keep trying things. Just not good enough to get some to work.
$use "windowssdk.inc"
was typeo, should have been
$include "windowssdk.inc"
but I get the same errors you do.
I'll see what I can find.
you need to use
$use "msvcrt.lib"
to get it to compile
when it runs it crashes.
afraid I'm not going to be much help with COM objects