'DEV_0050, "LSI Adapter, SAS 3000 series, 4-port with 1064 -StorPort"
'DEV_0054, "LSI Adapter, SAS 3000 series, 8-port with 1068 -StorPort"
'DEV_0056, "LSI Adapter, SAS 3000 series, 4-port with 1064E -StorPort"
'DEV_0058, "LSI Adapter, SAS 3000 series, 8-port with 1068E -StorPort"
'DEV_0062, "LSI Adapter, SAS 3000 series, 8-port with 1078 -StorPort"
' Reference SCM_2.2_Support_Matrix_04-28-08.xls
' from Hui SH Yang/China/IBM 2009-07-14 09:38
'ServeRAID-AR10is - Bletchley Park ----megaraid-sas
'ServeRAID-MR10i - Fareham ----megaraid-sas
'ServeRAID-MR10k - Elliot Key ----megaraid-sas
'ServeRAID-MR10M - Morgantown ----megaraid-sas
'ServeRAID-MR10il - Richwood ----megaraid-sas
'Stingray ----megaraid-sas
'Blade SAS Connectivity Card - Meteor ----mptsas
'Blade SAS Expansion Card - Raleigh ----mptsas
'LSI 1064 SAS ----mptsas
'LSI 1064e SAS ----mptsas
'LSI 1078 SAS ----mptsas
'LSI SAS HBA - Winterhaven ----mptsas
'SAS/SATA RAID Kit - Tempest ----mptsas
'SAS/SATA RAID Kit - Tempest+ ----mptsas
'ServeRAID-BR10i - Ruskin ----mptsas
'ServeRAID-BR10ie - Leadville ----mptsas
Dim oAPI, oBag, swFlag
Dim debug, oReg,RC_Code, ScriptName, EventID
ScriptName = "$Config/ScriptName$"
SetLocale("en-us")
debug = -1
Set oReg = GetObject("winmgmts://localhost/root/default:StdRegProv")
If (not(oReg is nothing)) Then
RC_Code = oReg.GetStringValue(HKEY_LOCAL_MACHINE, DEBUG_INFO_KEY, DEBUG_LEVEL_NAME, debug)
If ( RC_Code<>0) Then
debug = -1
End If
End If
Set oAPI = SCOMCreateObject("MOM.ScriptAPI")
$Config/ScriptBody$
Sub LogDebugString(debugString, debugLevel)
If (Int(debug) >= Int(debugLevel)) Then
Call oAPI.LogScriptEvent(ScriptName, EventID, DebugLevelToLogLevel(debugLevel), debugString)
End If
End Sub
Function DebugLevelToLogLevel(debugLevel)
DebugLevelToLogLevel = 4
If debugLevel <= 1 then
DebugLevelToLogLevel = 1
ElseIF debugLevel <= 3 then
DebugLevelToLogLevel = 2
Else
DebugLevelToLogLevel = 4
End If
End Function
Function IsRSAIIDaemonHealthy()
Call LogDebugString("Entering IsRSAIIDaemonHealthy", INFO_LEVEL_FUNCTION)
IsRSAIIDaemonHealthy = -1
Dim iResult, oSWCollection, oObjectItem
iResult = GetWMIObjectCollection(CIMV2_NAMESPACE, SERVICE_CIMV2_CLASS, oSWCollection)
If (iResult > 0) Then
For Each oObjectItem in oSWCollection
If InStr(oObjectItem.Name, "ibmspsvc") <> 0 Then
If Instr(oObjectItem.State, "Running") <> 0 Then
Call LogDebugString("RSAII Daemon Healthy", INFO_LEVEL_DETAIL)
IsRSAIIDaemonHealthy = 1
Exit For
End If
End If
Next
End If
If IsRSAIIDaemonHealthy = -1 Then
Call LogDebugString("RSAII Daemon not Healthy!", INFO_LEVEL)
End If
End Function
Function BMCPresented()
Dim bWS08, bInACPI, bInSMBIOS
Dim osVersion, spVersion
Dim oObjectItem, oManagementTargetCollection, iResult
Const BMC_ACPIINFO = "ACPI\IPI"
If GetOSInfo(osVersion, spVersion) < 0 Then
Call LogDebugString("Could not get OS Info", ERROR_LEVEL)
End If
If(StrComp(osVersion, "6.0.0000") >= 0) Then
'Windows 2008 or later
Call LogDebugString("OS is Windows 2008 or later", INFO_LEVEL_DETAIL)
bWS08 = 1
End If
iResult = GetWMIObjectCollection(CIMV2_NAMESPACE, PNPENTITY_CIMV2_CLASS, oManagementTargetCollection)
If (iResult > 0) Then
For Each oObjectItem in oManagementTargetCollection
If (InStr(CStr(oObjectItem.DeviceID), BMC_ACPIINFO) <> 0) Then
'BMCPresented = 1
bInACPI = 1
Call LogDebugString("BMC Presented in ACPI", INFO_LEVEL_DETAIL)
Exit For
End If
Next
End If
iResult = GetWMIObjectCollection(WMI_NAMESPACE, SMBIOS_TABLE_WMI_CLASS, oManagementTargetCollection)
If (iResult > 0 ) Then
iResult = wmiRawSMBiosCountRecords( oManagementTargetCollection, IPMI_SMBIOS_RECORD_TYPE )
If iResult > 0 Then
'BMCPresented = 2
bInSMBIOS = 1
Call LogDebugString("BMC Presented in SMBIOS, but BIOS need update", INFO_LEVEL_DETAIL)
End If
End If
If bWS08 > 0 And bInACPI > 0 Then
BMCPresented = 1
ElseIf bWS08 > 0 And bInACPI < 0 And bInSMBIOS > 0 Then
BMCPresented = 3 ' need update
ElseIf bWS08 < 0 And bInSMBIOS > 0 Then
BMCPresented = 2
End If
If BMCPresented <0 Then
Call LogDebugString("BMC not Presented", INFO_LEVEL)
End If
End Function
Dim iResult, oCollection, oObjectItem
'Get OS and SP version info
iResult = GetWMIObjectCollection(CIMV2_NAMESPACE, OS_CIMV2_CLASS, oCollection)
If (iResult > 0) Then
For Each oObjectItem in oCollection
If InStr(oObjectItem.Manufacturer, "Microsoft Corporation") <> 0 Then
osVersion = oObjectItem.Version
spVersion = oObjectItem.ServicePackMajorVersion
GetOSInfo = 1
Exit For
End If
Next
Else
Call LogDebugString("Could not get OS Info", ERROR_LEVEL)
End If
End Function
Function IsWin2k3r2()
Call LogDebugString("Entering IsWin2k3r2", INFO_LEVEL_FUNCTION)
IsWin2k3r2 = 0
Dim iResult, oCollection, oObjectItem, osVersion
'Get OS and SP version info
iResult = GetWMIObjectCollection(CIMV2_NAMESPACE, OS_CIMV2_CLASS, oCollection)
If (iResult > 0) Then
For Each oObjectItem in oCollection
If InStr(oObjectItem.Manufacturer, "Microsoft Corporation") <> 0 Then
osVersion = oObjectItem.Version
if ( IsRegExpMatched(osVersion, "^5\.2\.") ) then
If InStr(oObjectItem.OtherTypeDescription, "R2") Then
IsWin2k3r2 = 1
Call LogDebugString("IsWin2k3r2 - Win2k3 r2 - osVersion: " & oObjectItem.Version & _
" - R number: " & oObjectItem.OtherTypeDescription & _
" - SP: " & oObjectItem.ServicePackMajorVersion, INFO_LEVEL_DETAIL)
Exit For
End If
End If
End If
Next
Else
Call LogDebugString("IsWin2k3r2 - Could not get OS Info", WARNING_LEVEL)
End If
Call LogDebugString("End of IsWin2k3r2 - Return: " & IsWin2k3r2, INFO_LEVEL_FUNCTION)
End Function
' [d504936/byou: added for AddIncompatibleBag()]
Function RSAPresented()
Call LogDebugString("Entering RSAPresented", INFO_LEVEL)
RSAPresented = -1
iResult = GetWMIObjectCollection(CIMV2_NAMESPACE, PNPENTITY_CIMV2_CLASS, oManagementTargetCollection)
If (iResult > 0) Then
For Each oObjectItem in oManagementTargetCollection
If (InStr(CStr(oObjectItem.DeviceID), RSA_USBINFO_NOSTORAGE) <> 0) or (InStr(CStr(oObjectItem.DeviceID), RSA_USBINFO_WSTORAGE) <> 0) Then
RSAPresented = 1
Call LogDebugString("RSA Presented", INFO_LEVEL)
Exit Function
End If
Next
End If
Call LogDebugString("RSA not Presented", INFO_LEVEL)
End Function
Function wmiRawSMBiosCountRecords( colRawSMBIOSes, thisRecordType )
dim nMatches
nMatches = 0
dim smbiosTable
for each smbiosTable in colRawSMBIOSes
dim recordType, recordLen, recordHnd
do while ( tablePos < tableSize )
' Look up the type in the formatted section.
recordType = tableData( tablePos )
recordLen = tableData( tablePos+1 )
recordHnd = tableData( tablePos+3 )*256 + tableData( tablePos+2 )
'g_oLOG.LogTrace( "smbios record (pos " & tablePos & "): " & _
' "type = " & recordType & ", " & _
' "len = " & recordLen & ", " & _
' "handle = " & recordHnd )
if ( recordType = thisRecordType ) then
nMatches = nMatches + 1
end if
tablePos = tablePos + recordLen
' Skip over the unformatted section (of null-terminated strings).
do
do until ( tableData(tablePos) = 0 )
tablePos = tablePos + 1
loop
tablePos = tablePos + 1 ' Skip the string terminater.
if ( tableData(tablePos) = 0 ) then
exit do ' Now the string sec terminates.
end if
tablePos = tablePos + 1 ' Skip the 1st (non-null) char.
loop
tablePos = tablePos + 1 ' Skip the section terminator.
loop
' g_oLOG.LogTrace( "smbios table ends at pos " & tablePos & _
' " (size = " & tableSize & ")" )
next
wmiRawSMBiosCountRecords = nMatches
End Function
Function GetAccurateName(ByVal RawName)
'This function is used to remove the """ characters in the file's name string
'Input "xxxxxxxx.xxx"
'Output xxxxxxxx.xxx
Dim tmpName,Name
tmpName = Replace(RawName, """", " ")
Call LogDebugString(tmpName, INFO_LEVEL)
Name = Trim(tmpName)
GetAccurateName = Name
End Function
Function IsRegExpMatched(ByVal strTarget, ByVal strRegExp)
'This function is to see if the specified string matches the given regular expression;
'it returns True if matched; False if not.
IsRegExpMatched = -1
Dim oRegExp
Set oRegExp = New RegExp
oRegExp.IgnoreCase = False
oRegExp.Pattern = strRegExp
IsRegExpMatched = oRegExp.Test(strTarget)
End Function
Function GetWMIObjectCollection(ByVal oNameSpace, ByVal oClassName, ByRef oObjectCollection)
Call LogDebugString("Entering GetWMIObjectCollection(" + oNameSpace + ":" + oClassName + ")", INFO_LEVEL)
GetWMIObjectCollection = -1
Dim e
Set e = New Error
On Error Resume Next
Set oObjectCollection = GetObject("winmgmts:{impersonationLevel=impersonate}//" & _
"." & "/" & oNameSpace & ":" & oClassName).Instances_
'Check WMI communications...
If (oObjectCollection is nothing) Then
Call LogDebugString("No " + oClassName + " class in the namespace", WARNING_LEVEL_DEV)
Exit Function
End If
If (oObjectCollection.Count = 0) Then 'Try to count system instances...
Call LogDebugString("No instance on " + oClassName, WARNING_LEVEL_DEV)
GetWMIObjectCollection = 0
Exit Function
Else
If (Err.number <> 0) Then
Call LogDebugString("Error on accessing " + oClassName, WARNING_LEVEL_DEV)
Exit Function
Else
GetWMIObjectCollection = 1
End If
End If
End Function
Function QueryWMIObjectCollection(ByVal oNameSpace, ByVal oWQL, ByRef oObjectCollection)
Call LogDebugString("Entering QueryWMIObjectCollection", INFO_LEVEL_FUNCTION)
QueryWMIObjectCollection = -1
Dim e
Set e = New Error
On Error Resume Next
Set oObjectCollection = GetObject("winmgmts:{impersonationLevel=impersonate}//./" & oNameSpace ).ExecQuery(oWQL)
WScript.Echo "oObjectCollection.Count" + CStr(oObjectCollection.Count)
Call LogDebugString("oObjectCollection.Count" + CStr(oObjectCollection.Count), INFO_LEVEL_DETAIL)
'Check WMI communications...
If (oObjectCollection is nothing) Then
Call LogDebugString("No " + oClassName + " class in the namespace", INFO_LEVEL)
Exit Function
End If
If (oObjectCollection.Count = 0) Then 'Try to count system instances...
Call LogDebugString("No instance on " + oClassName, WARNING_LEVEL_DEV)
QueryWMIObjectCollection = 0
Exit Function
Else
If (Err.number <> 0) Then
Call LogDebugString("Error on accessing " + oClassName, WARNING_LEVEL_DEV)
Exit Function
Else
QueryWMIObjectCollection = 1
End If
End If
End Function
Function SCOMCreateObject(ByVal sProgramId)
Dim oError
Set oError = New Error
On Error Resume Next
Set SCOMCreateObject = CreateObject(sProgramId)
oError.Save
On Error Goto 0
If (oError.Number <> 0) Then
Call LogDebugString("Error to create object", ERROR_LEVEL)
WScript.Quit
End If
End Function
Function ChangeString(ByRef sName)
Dim temp
ChangeString = sName
temp = Replace(sName,"{","")
temp = Replace(temp,"}","")
ChangeString = temp
End Function
Function licKeyValidate( byVal sFeatureId )
' Description:
' Validates the OS instance or IMM oriented license key
' of the given feature of the localhost?
' Possible Return Code:
' 1, if valid but about to expire (in 14 days).
' 0, if valid.
' -1, if no license key is installed.
' -2, if the license key was already expired.
' -3, if the license key is invalid (integrity broken).
' -10, if the IMM-oriented license key was recently changed
' and needs to be reprocessed first.
licKeyValidate = CInt(licKeyValidateRegValue())
End Function
'FOR THE DEBUG ONLY
Function licKeyValidateRegValue()
Dim oReg, rcCode, iWinEventFiltering
'Dim iWinEventFiltering, set this value to 1 means turn off this filter. 0, turn on.
iWinEventFiltering = "-1"
Set oReg = GetObject("winmgmts://localhost/root/default:StdRegProv")
If (not(oReg is nothing)) Then
Dim szValue
rcCode = oReg.GetStringValue(HKEY_LOCAL_MACHINE, WINEVENT_LICENSE_KEY, WINEVENT_LICENSE_NAME, szValue)
If (Not(IsNull(szValue))) Then
iWinEventFiltering = szValue
End If
End If
licKeyValidateRegValue = iWinEventFiltering
''' The registry provider should have already been initialized globally
''' in this script. The LicManager class depends on oReg as a global.
'Set oReg = GetObject("winmgmts://localhost/root/default:StdRegProv")
If (not(oReg is nothing)) Then
Dim oLicValidator, aLicLevelERs, oBestLevelER
Set oLicValidator = new LicManager
Call oLicValidator.LoadFromRegistry()
aLicLevelERs = oLicValidator.LevelERs
If IsArray(aLicLevelERs) Then
'sLicTok = oLicValidator.LicenseToken
Call oLicValidator.FindBestFeatLevel(oBestLevelER)
If Not IsNull(oBestLevelER) Then
sLicLevel = oBestLevelER.ToString()
rcCode = 1
Else
Call LogDebugString("The best matched feature level could " + _
"not be obtained on this server", WARNING_LEVEL)
End If
Else
Call LogDebugString("No feature levels activated on this Lenovo License Server", WARNING_LEVEL)
End If
If(TrialInfo=1)Then
If(sLicLevel<>"255.0")Then
sLicLevel="Trial,left "& TrialDays &" days"
rcCode = 1
End If
End If
'If (Not(IsNull(sLicLevel)) And Not(IsEmpty(sLicLevel))) Then
' rcCode = 1
'Else
' sLicLevel = "None"
' rcCode = -1
'End If
'
'If (Not(IsNull(sLicTok)) And Not(IsEmpty(sLicTok))) Then
' rcCode = 1
'Else
' sLicTok = "None"
' rcCode = -1
'End If
End If
GetEndpointLic = rcCode
End Function
'Return:
'1:Yes,trial license available
'-1:No,trial license invalid
'Const IBMHWMP_LICENSE_KEY = "SOFTWARE\IBM\Systems Management Integrations\LicenseEndpoint"
Const IBMHWMP_TRIAL_LICENSE_TOKEN_NAME = "TrialActivation"
Function GetEndpointTrialInfo(ByRef sTrialInfo)
set oReg = GetObject( "winmgmts:{impersonationLevel=impersonate}!" & _
"//./root/default:StdRegProv")
call oReg.GetStringValue( HKEY_LOCAL_MACHINE, LenovoHWMP_LICENSE_KEY, IBMHWMP_TRIAL_LICENSE_TOKEN_NAME, sTrialDays )
if IsNull(sTrialDays) Or IsEmpty(sTrialDays) then
call oReg.GetStringValue( HKEY_LOCAL_MACHINE, IBMHWMP_LICENSE_KEY, IBMHWMP_TRIAL_LICENSE_TOKEN_NAME, sTrialDays )
End if
if IsNull(sTrialDays) Or IsEmpty(sTrialDays) then
rcCode=-1
sTrialInfo = "None"
else
rcCode=1
sTrialInfo=sTrialDays
End if
GetEndpointTrialInfo = rcCode
End Function
class LicManager
private m_aLevelERs
public property get LevelERs
LevelERs = m_aLevelERs
end property
private m_sLicToken
public property get LicenseToken
LicenseToken = m_sLicToken
end property
private sub Class_Initialize()
m_aLevelERs = null
m_sLicToken = ""
end sub
if isNull( aKeyEntryNames ) or not(isArray( aKeyEntryNames )) then
Call LogDebugString(".. LicManager: loading from registry key '" + _
IBMHWMP_LICENSE_KEY + "'", INFO_LEVEL_FUNCTION)
Call oReg.EnumValues( HKEY_LOCAL_MACHINE, IBMHWMP_LICENSE_KEY, _
aKeyEntryNames, aKeyEntryTypes )
licenseFlag = 0
end if
if isNull( aKeyEntryNames ) or not(isArray( aKeyEntryNames )) then
exit sub
end if
Call LogDebugString(".. LicManager: # of registry value entries = " + _
CStr(UBound(aKeyEntryNames)+1), INFO_LEVEL_DETAIL)
dim ii
for ii=0 to UBound(aKeyEntryNames)
if 1 = aKeyEntryTypes( ii ) then ' 1 = REG_SZ
if IBMHWMP_LICENSE_TOKEN_NAME = aKeyEntryNames(ii) then
dim sLevelERsEncoded, sLevelERsDecoded, asSplitERs
if licenseFlag = 1 then
call oReg.GetStringValue( HKEY_LOCAL_MACHINE, LenovoHWMP_LICENSE_KEY, _
aKeyEntryNames(ii), sLevelERsEncoded )
else
call oReg.GetStringValue( HKEY_LOCAL_MACHINE, IBMHWMP_LICENSE_KEY, _
aKeyEntryNames(ii), sLevelERsEncoded )
end if
if IsNull(sLevelERsEncoded) Or IsEmpty(sLevelERsEncoded) then
call LogDebugString("!! LicManager: Registry value " + _
aKeyEntryNames(ii) + " null or empty", ERROR_LEVEL)
else
call LogDebugString(".. LicManager: " + aKeyEntryNames(ii) + _
"='" + sLevelERsEncoded + "'", INFO_LEVEL_DETAIL)
m_sLicToken = sLevelERsEncoded
sLevelERsDecoded = fDecode(sLevelERsEncoded)
call LogDebugString(".. LicManager: " + aKeyEntryNames(ii) + _
"='" + sLevelERsDecoded + "' [Decoded]", INFO_LEVEL_DETAIL)
asSplitERs = split(sLevelERsDecoded, vbTab)
if UBound(asSplitERs) >= 0 then
dim jj
for jj=0 to UBound(asSplitERs)
call LogDebugString(".. LicManager: Retrieved '" + _
asSplitERs(jj) + "'", INFO_LEVEL_DETAIL)
dim oLevelER
set oLevelER = new FeatLevelER
if 0 <= oLevelER.ParseLevelER( asSplitERs(jj) ) then
if 0 = nLevelsLoaded then
m_aLevelERs = array( 0 ) ' create a 1-element array of '0'
else
redim preserve m_aLevelERs( nLevelsLoaded )
end if
set m_aLevelERs( nLevelsLoaded ) = oLevelER
nLevelsLoaded = nLevelsLoaded + 1
call LogDebugString(">> LicManager: Parsed " + _
oLevelER.ToString(), INFO_LEVEL)
end if
next
end if
end if
end if
end if
next
end sub ' LoadFromRegistry
public sub FindBestFeatLevel( byRef oBestLevelER )
oBestLevelER = null
if not( isArray( m_aLevelERs ) ) then
exit sub
end if
if UBound(m_aLevelERs) >= 0 then
dim ii, oLevelER
set oBestLevelER = m_aLevelERs(0)
for ii=1 to UBound(m_aLevelERs)
set oLevelER = m_aLevelERs(ii)
if (oLevelER.LevelMajor > oBestLevelER.LevelMajor) Or _
(oLevelER.LevelMajor = oBestLevelER.LevelMajor And _
oLevelER.LevelMinor > oBestLevelER.LevelMinor) then
set oBestLevelER = oLevelER
end if
next
end if
end sub
end class
class FeatLevelER
private m_levelMajor
private m_levelMinor
public property get LevelMajor
LevelMajor = m_levelMajor
end property
public property get LevelMinor
LevelMinor = m_levelMinor
end property
private sub Class_Initialize()
end sub
public function ParseLevelER( byVal sEntryValue )
dim retCode
retCode = 0
on error resume next
dim asSplit
asSplit = split( sEntryValue, "." )
if UBound(asSplit) <> 1 then
call LogDebugString("!! FeatLevelER.ParseLevelER: unexpected number of items in " + _
"feature level record (" + UBound(asSplit) + ")", ERROR_LEVEL)
retCode = -1
else
m_levelMajor = CInt(asSplit(0))
m_levelMinor = CInt(asSplit(1))
call LogDebugString(".. FeatLevelER.ParseLevelER: MajorVersion = " + _
CStr(m_levelMajor) + ", MinorVersion = " + CStr(m_levelMinor), INFO_LEVEL_DETAIL)
end if
on error goto 0
ParseLevelER = retCode
end function
public function ToString()
ToString = CStr(m_levelMajor) + "." + CStr(m_levelMinor)
end function
end class
' N.B. fDecode() is a verbatim copy of the one in HW MP.
' <twoffer> Can this be referenced instead of copied? </twoffer>
Function fDecode(sStringToDecode)
'This function will decode a Base64 encoded string and returns the decoded string.
Const CharList = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
Dim iDataLength, sOutputString, iGroupInitialCharacter
sStringToDecode = Replace(Replace(Replace(sStringToDecode, vbCrLf, ""), vbTab, ""), " ", "")
iDataLength = Len(sStringToDecode)
If iDataLength Mod 4 <> 0 Then
fDecode = "Bad string passed to fDecode() function."
Exit Function
End If
For iGroupInitialCharacter = 1 To iDataLength Step 4
Dim iDataByteCount, iCharacterCounter, sCharacter, iData, iGroup, sPreliminaryOutString
iDataByteCount = 3
iGroup = 0
For iCharacterCounter = 0 To 3
sCharacter = Mid(sStringToDecode, iGroupInitialCharacter + iCharacterCounter, 1)
If sCharacter = "=" Then
iDataByteCount = iDataByteCount - 1
iData = 0
Else
iData = InStr(1, CharList, sCharacter, 0) - 1
If iData = -1 Then
fDecode = "Bad string passed to fDecode() function."
Exit Function
End If
End If
iGroup = 64 * iGroup + iData
Next
iGroup = Hex(iGroup)
iGroup = String(6 - Len(iGroup), "0") & iGroup
sPreliminaryOutString = Chr(CByte("&H" & Mid(iGroup, 1, 2))) & Chr(CByte("&H" & Mid(iGroup, 3, 2))) & Chr(CByte("&H" & Mid(iGroup, 5, 2)))
sOutputString = sOutputString & Left(sPreliminaryOutString, iDataByteCount)
Next
fDecode = sOutputString
End Function
Class Error
Private lNumber
Private sSource
Private sDescription
Private sHelpContext
Private sHelpFile
Public Sub Save()
lNumber = Err.number
sSource = Err.Source
sDescription = Err.Description
sHelpContext = Err.HelpContext
sHelpFile = Err.helpfile
End Sub
Public Sub Raise()
Err.Raise lNumber, sSource, sDescription, sHelpFile, sHelpContext
End Sub
Public Sub Clear()
lNumber = 0
sSource = ""
sDescription = ""
sHelpContext = ""
sHelpFile = ""
End Sub
Public Default Property Get Number()
Number = lNumber
End Property
Public Property Get Source()
Source = sSource
End Property
Public Property Get Description()
Description = sDescription
End Property
Public Property Get HelpContext()
HelpContext = sHelpContext
End Property
Public Property Get HelpFile()
HelpFile = sHelpFile
End Property
End Class