VB Script Wrapper Class - generate safe VBScript wrapper functions - Windows XP

analogstereo.com

Looking for: VB Script Wrapper Class?


VB Script Wrapper Class

This is a wrapper of "VBScript.RegExp
" or an example of how to use "RegExp" in VC++.
I have implemented some often used methods. You can add any more as you need.

The VBScript.RegExp
's performance is better than JScript.RegExp
, but VBScript.RegExp
did not provide 'lastIndex
' property, so I selected VBScript.RegExp
in VC++ and implemented 'lastIndex
' by myself. I supply a convenient class RegExp
, and the style is like JScript.RegExp
.

When you use the regexp.h and regexp.cpp, do not forget to call CoInitializeEx
or RegExp re; re.IgnoreCase( TRUE ); re.compile( _T("\w([\d.]*)(\w+)") ); re.exec( _T("I f3454ind it, f567.56ind it again") ); cout << re.index << _T(" ~ ") << re.lastIndex << endl; cout << (LPCTSTR)re.SubMatch( 0 ) << endl; cout << (LPCTSTR)re.SubMatch( 1 ) << endl << endl; Recommended resolution

Persist Object
<script language="vbscript" runat=server>
class persist
'***********************************************************************************
'*** 04/12/02 TOM LANG Persist Object
'*** vbscript wrapper class used to save form information
'***********************************************************************************
' *** USER MANUAL
'***********************************************************************************
'set objPersist = new persist 'init object
'objPersist.nameSpace = "myAppName" 'to prevent name collisions with other sub apps
'objPersist.store name, value
'value=objPersist.fetch name
'set ovalue=objPersist.fetch oName 'gets an object
'objPersist.clear name 'set value to empty string
'objPersist.remove name 'removes name from collection
'objPersist.removeAll 'removes all info from collection
'set objPersist=nothing
'***********************************************************************************
'Note: error handling is light due to the relative stability of working with session
'variables. Error handling should proBably be added if switching the data store
'to a file or dB.
'***********************************************************************************

'Private members
private m_strErrorDescription
private m_obj 'this obj will be persisted
private m_strNameSpace 'namespace to prevent variable name collision

'class initialization
private sub class_initialize
m_strNameSpace="pso_" 'default namespace
m_strErrorDescription=""
end sub

private sub class_terminate
'code to be run when obj is set to nothing
end sub

'Public interface
public function store(key, value)
'store information contained in parameter
if isobject(value) then
set session(m_strNameSpace & key)=value
else
session(m_strNameSpace & key)=value
end if
end function

public function fetch(key)
'retreive info from data store (use instead of retrieve)
if isobject(session(m_strNameSpace & key))=true then
set fetch=session(m_strNameSpace & key)
else
fetch=session(m_strNameSpace &key)
end if
end function

public function retreive(key)
'same as fetch. kept to be compatible with previous vs.
'NEW development should use fetch method
if isobject(session(m_strNameSpace & key))=true then
set retreive=session(m_strNameSpace & key)
else
retreive=session(m_strNameSpace & key)
end if
end function

Communicate and collaborate with anyone, anywhere, any time.
Secure, interactive and on-demand web conferencing is waiting for you and it's FREE for 14-days!
Share documents, make presentations, demonstrate products and services, and collaborate like never before
Start a secure web conferencing meeting from the comfort of your desktop instantly, with just a click of the mouse
Web Conferencing, iNetVu, Linkstar, XM Satellite Radio, Sirius Satellite Radio iDirect their numbers are growing at an amazing rate. Iridium Satellite Phone is the only provider of truly global satellite voice and data solutions with complete coverage of the earth (including oceans, airways and Polar Regions).
public function removeAll()
'removes all items from existence
for each itm in session.Contents
if cStr(ucase(left(itm, len(m_strNameSpace))))=cStr(ucase(m_strNameSpace)) then
if isobject(session(itm))=true then
set session(itm)=nothing 'removes item from memory
end if
Session.Contents.Remove(itm) 'removes it from collection
end if
next
end function

public function remove(key)
on error resume next
if isobject(session(m_strNameSpace & key))=true then
set session(m_strNameSpace & key)=nothing 'removes item from memory
end if
Session.Contents.Remove(cStr(m_strNameSpace & key)) 'removes it from collection
m_strNameSpace=Err.Description
end function

public function clear(key)
'set key to empty string
if isobject(session(m_strNameSpace & key)) then
set session(m_strNameSpace & key)=nothing
end if
session(m_strNameSpace & key)=""
end function

public property let nameSpace (strNameSpace)
'prevent variable collisions by providing (sub)application name
m_strNameSpace=strNameSpace
end property

public property get errorDescription
'user friendly error message
errorDescription = m_strErrorDescription
end property

end class

</script>



VALUE-PRICED CAR INSURANCE FROM THE COMPANIES YOU CAN TRUST!
In cities, towns and remote locations, mini satellite dishes point attentively to the Southern sky. Emblazoned with names like DirecTv, ExpressVu, DirecWay, Web Conferencing, iNetVu, Linkstar, XM Satellite Radio, Sirius Satellite Radio iDirect their numbers are growing at an amazing rate. Iridium Satellite Phone is the only provider of truly global satellite voice and data solutions with complete coverage of the earth (including oceans, airways and Polar Regions). Get the latest buzz on Free satellite tv systems - including the features and benefits that make them today's ultimate television viewing experience.(Get Dish) Ever wonder why these satellite dish systems are in such great demand? Does high speed internet service or digital television programming via satellite intrigue you?
If you've never heard of Cheap VoIP, get ready to change the way you think about long-distance phone calls. VoIP, or Voice over Internet Protocol, is a method for taking analog audio signals and turning them into digital data (IP packets) that can be transmitted over the Internet.

VB Script Wrapper Class related reviews

Alpine CD Players
Alpine CDM 7874 CD Player
Alpine CVA 1006 CD Player
Alpine MRD M1000 Amplifier
Alpine DVA 7996 dvd Receiver
Alpine DVA 5205 dvd receiver
Alpine CDA 7873 CD Player
Alpine CDE 7870 CD Player
Alpine NVE N852A Navigation System
Alpine CDA9807 CD Player
Alpine TDM 7561 Cassette Player
Alpine TDM 7580 Cassette Player
Alpine CDA 7863 CD Player
Alpine CDA 9855 CD Player
Nakamichi cassette decks
Nakamichi Dragon cassette deck
Nakamichi 1000 cassette deck
Nakamichi ZX7 cassette deck
Nakamichi BX 300 cassette deck
Nakamichi CD300 CD Player
Nakamichi CD400 CD Player
Nakamichi CD500 CD Player
Nakamichi CD700 CD Player
Nakamichi MB75 CD Player
Nakamichi MB100 CD Player
Nakamichi VU29 Display
Pioneer CD Players
Pioneer DEH P8000R CD Player
Pioneer DEHP77MP CD Player
Pioneer DEH P560MP CD Player
Pioneer DEH P2500 CD Player
Pioneer DEH P350 CD Player
Pioneer DEH P2000 CD Player
Pioneer DEH16 CD Player
Pioneer DEH1700 CD Player
C Media AC97 Audio Device Driver
This device cannot start code 10
VB Script Wrapper Class

Google
Web analogstereo.com

Miele Vacuum Cleaner







analogstereo.com is an independent resource for VB Script Wrapper Class
| Site Map |
analogstereo.com is ©2001 - 2005 High Park LLC. All Rights Reserved. Terms of Use | Privacy Policy
Valid xhtml | css

Apple Store