SQAUtil.sbl
上一篇 / 下一篇 2007-01-05 16:49:01 / 个人分类:Robot技术
'$include "DpConst.sbh"51Testing软件测试网y7w_j1i_"T
#jLAQg(]s0Declare Function LCSdatapool_open Lib "rtlcs.dll" (ByVal pszDpName$, ByVal dwFlags&) As Long51Testing软件测试网} q'L2\"PN+mOJ#}
Declare Function TSSErrorDetail Lib "rttss.dll" (ByVal pszErrText$, dwLen&) As Long
,r"G R5WI(p0Const SQA_DP_WRAP = &H0000000251Testing软件测试网yK:s{oZZF"{H
Const SQA_DP_NOWRAP = &H00000020
\)Pj(S/`m0Const SQA_DP_SHARED = &H00000004
X)^@ZJOs1G{0Const SQA_DP_PRIVATE = &H00000040
G,Nc8c(j9jN051Testing软件测试网 U~q0E%G([QI
' The last error number returned from the LCSdatapool_position_value and
`4fpwpKAEa0' LCSdatapool_name_value functions.
T+X5g#r${wp0Const LCS_LAST_VALUE_ERROR = -351Testing软件测试网1bm n0YS6~ \
51Testing软件测试网ZPw jU~ ~
Declare Function LCSdatapool_position_value Lib "rtlcs.dll" (ByVal dwDpId&, ByVal dwColIndex&) As Long
j0O*o6jS(Rp/TO0Declare Function LCSdatapool_name_value Lib "rtlcs.dll" (ByVal dwDpId&, ByVal sColName As String) As Long
`,@(?4hMU;vh6[0Declare Function Dplstrlen Lib "kernel32" Alias "lstrlenA" (ByVal lpString As Long) As Long
5y;hK|{'O0f(c0Declare Function Dplstrcpy Lib "kernel32" Alias "lstrcpyA" (ByVal lpString1 As String, ByVal lpString2 As Long) As Long51Testing软件测试网2M j-V]iXq5j)`i3} e
51Testing软件测试网0e A8KP4rf k
' ----------------------------------------------------------------------------51Testing软件测试网 rm ~)I(@ C}b
Const SQA_DIR_RUNFILES = 1 ' Install Directory
6S |a"} U"I{D051Testing软件测试网!}t [7rt5f
Declare Function UTLGetDir Lib "rtxutil.dll" (ByVal DirType%, ByVal lpszPath$, ByVal cch&) As Integer51Testing软件测试网\3h&T/`k Yx
Function SQAGetDir (iDirType as Integer) as String51Testing软件测试网/tlO[+ee6t E&g
' Returns standard directories used by SQA Suite apps
N)n$O(Z:EC0 Dim sDirPath as String, Result as Integer51Testing软件测试网z.`nHp(u#BXp
sDirPath = Space$(260)
7mY JA a l0 Result = UTLGetDir(iDirType, sDirPath, 260)51Testing软件测试网'I~m @5x
sDirPath = Left$(sDirPath, InStr(sDirPath,Chr$(0)) - 1)51Testing软件测试网@0Q tp)^Vd
If (Right$(sDirPath, 1) <> "\") Then sDirPath = sDirPath + "\"51Testing软件测试网UR(t(~}` m.a+Ry
SQAGetDir = sDirPath
YO%C)MNFq0End Function
e N.C7|?#M-l0' ----------------------------------------------------------------------------51Testing软件测试网B3v4Y UVA_He1w,v
Function SQAGetPropertyNames( objectRec As String, propertyNames() as String) As Integer
(P^#oDW)?1_6c0 Dim ret%
?uW p#t0 Dim sList as Variant51Testing软件测试网O3\ Y$G!Zh;DN9]J {-e
ret = SQAGetPropertyList( objectRec, sList)
m8w-| y&L!Z,Q)GuN4\0 If ret <> sqaSuccess Then
N)@4gzdE,E0 SQAGetPropertyNames = ret
/U'n-G1G0Z2Aa0 Exit Function
u]I/c*Z'L!DF}6~0 End If
9t Q%_4Q(mqB N/x0
B@A|7a+{7Qp#J0 Dim cObj%
c:R8m4A*{!^A"JPX0 cObj = SQAGetListCount( sList )
[Yu&e xE!~9W0 ReDim propertyNames( 0 To cObj-1 )
]*gP M:a$n3Q!V0
,a:J8S;MZX3tu7F4C0 Dim i%
1I_uR5kr[4g0 Dim vName as Variant
5U$Y(rfY7K'YL,o0 For i = 0 to cObj-1
/H#R!u A@*^AC0 ret = SQAGetListItem( sList, i, vName)
%oH#rD}MT$A|0 If ret <> sqaSuccess Then51Testing软件测试网X8q9Iy4tP\2{
SQAGetPropertyNames = ret
FW Yn#t0 Exit Function51Testing软件测试网#F;j~A.r*I ZU:X6}yO:D
End If51Testing软件测试网C(c0H1z4I.|d$I:d7~.o
propertyNames(i) = vName
5M2W {Tu:C;U8^0 Next i51Testing软件测试网uc(A3E N[b
51Testing软件测试网.s:B_(f;r\'zZ
SQAGetPropertyNames = sqaSuccess51Testing软件测试网4om!Gs9XmuC9e
51Testing软件测试网(L.B#f(gw6f7b
End Function
0B7wJ7j@s:@NR0' ----------------------------------------------------------------------------51Testing软件测试网c|y8y4Rl
Function SQAGetChildren( objectRec As String, childRec() as String) As Integer
[(_P/ksH#h0 Dim ret%51Testing软件测试网?1?q8c,H9l
Dim sList as Variant51Testing软件测试网 bV{0E+G
Dim parentPrefix as Variant51Testing软件测试网0yS*@HW"rM&@b
[/HE R)A|pM0 ret = SQAGetProperty( objectRec, "FullRecognition", parentPrefix )51Testing软件测试网C"raa"~2k2N O*R
If ret <> sqaSuccess Then
"q9r.Mb:ea]0 SQAGetChildren = ret
qe G.X@\(}p1~2]a0 Exit Function
sw Uwf7| Po/?0 End If51Testing软件测试网yS#P+]7?*Q(^h~!i
parentPrefix = parentPrefix + ";\;"51Testing软件测试网C2q:cpQ7`~2w5_
51Testing软件测试网4ple X3L|Q
ret = SQAGetChildList( objectRec, sList)51Testing软件测试网 NSq2{+d0AVHv
If ret <> sqaSuccess Then
)oh:E;l:s/Icn0 SQAGetChildren = ret
@ti"LJN%vf+K.p ni0 Exit Function
P$S:M;dSl2L;?0 End If51Testing软件测试网 UTKD8K
51Testing软件测试网p-L4~}#K)O
Dim cObj%51Testing软件测试网.V!X3T$NL&k
cObj = SQAGetListCount( sList )51Testing软件测试网_8MOc[h`e
ReDim childRec( 0 To cObj-1 )
5Q'P\G{"sH|;rdF+h0
F/rG:b XlS0 Dim i%51Testing软件测试网&j|&h*{.p nv
Dim vName as Variant
-rI&Ix,{v6tn~ E'~0 For i = 0 to cObj-151Testing软件测试网)q3^l;w8Ny OFNY
ret = SQAGetListItem( sList, i, vName)
r(W-m^Z DOZ P?0 If ret <> sqaSuccess Then51Testing软件测试网KiX/c6Z2P-m#m
SQAGetChildren = ret
Ue?}y)p&q0 Exit Function
.x5J~&p?1y |g0 End If51Testing软件测试网9L%b?!u9O"H
childRec(i) = parentPrefix + vName51Testing软件测试网[9U/sk+b ty2D
Next i
a[:?,a\ c-ztf0
s,e YrD!K(A:kv0 SQAGetChildren = sqaSuccess51Testing软件测试网,MUIi,`t9a
51Testing软件测试网%Jb$s5ng:T1d'e
End Function
P {[*Vvw0' ----------------------------------------------------------------------------51Testing软件测试网3a-|!_ [ AH-F)tY
Function SQAGetPropertyArrayAsString( objectRec As String, propertyName as String, propertyValues() as String) As Integer
1VA n?S0
&RY%zLO1xU2x$?"IC0 Dim ret%
e6P'A']2@Qn0 Dim val$
K!P!k QNu$h3K0 Dim i%, p_sub_i$51Testing软件测试网7@(Cs7?(]:o1J^
Dim cProp%
F)B#Lb [x.Z!_0
6a [F4}^-P8g0 ret = SQAGetPropertyArraySize( objectRec, propertyName, cProp )51Testing软件测试网&`za5\hS:HdV
If ret <> sqaSuccess Then51Testing软件测试网,fTxZ NZ#[(j
SQAGetPropertyArrayAsString = ret51Testing软件测试网CJU'w yN"_}&r/h
Exit Function
(D7S#\&QKS$S:x0 End If
{^z&hj w"t1y$C0
M-q7{$Z,?0 ReDim Preserve propertyValues( 0 To cProp-1 )
{+A:Hl\X _t0b0
gLE P7Hj5j.{0 For i = 0 to cProp-151Testing软件测试网!kf$Avg l'j
p_sub_i = propertyName+"("+str(i)+")"51Testing软件测试网uY"w5ioBx Zo
51Testing软件测试网2]1Fg w4n:m Z){ |P
ret = SQAGetPropertyAsString( objectRec, p_sub_i, val)51Testing软件测试网nFwMN D3K
If ret <> sqaSuccess Then51Testing软件测试网 vBn4V)o$t3I2y|+t
SQAGetPropertyArrayAsString = ret
p v0W5TD_5k.` z0 Exit Function
7m6Kv[ g(]0 End If
|8a5py:H$E!WRSP0 propertyValues(i) = val
,Gm.Yu+j _G.E Sz4R0
{,WX a4c[3{)X+L0 Next i 51Testing软件测试网/R`v8wH8|8V(o6A n:[
lA%F$n9S@N0Cb0FR0 SQAGetPropertyArrayAsString = sqaSuccess
z+ygu NY0
e]fI}&Agy4Ut0End Function
I)v b*D0M!H0' ----------------------------------------------------------------------------
MP Z] D6T|0Function SQAGetPropertyArray( objectRec As String, propertyName as String, propertyValues() as Variant) As Integer
uXg0O2`Qf]+buHy0
p&]O q'Um/x0 Dim ret%
bB9Tsn+d+wgG0 Dim val as Variant
D(nFg7T.l0 Dim i%, p_sub_i$51Testing软件测试网,oL!In/_ k3Z8D xg
Dim cProp%51Testing软件测试网8gEHz,l
51Testing软件测试网b4F7V2ol-U
ret = SQAGetPropertyArraySize( objectRec, propertyName, cProp )
'E"h9q.W%W hM0 If ret <> sqaSuccess Then
j3NA e&A0 SQAGetPropertyArray = ret
;H&?,F7J j:C{-C0 Exit Function51Testing软件测试网9Z w s(og
End If
'o.zk5H%]2K U051Testing软件测试网O2zd!j0e\)s
If cProp>0 then
*CNjm$e/r0 ReDim propertyValues( 0 To cProp-1 )51Testing软件测试网n@.l!?.G
End if
&V{| K BnI:I0
Lr8p| x9d&Um0 For i = 0 to cProp-151Testing软件测试网/T1w(Q Q'u)|x6h#[
p_sub_i = propertyName+"("+str(i)+")"
Sf'j;Fjq w0
%Nso},i%_!W2Ze0 ret = SQAGetProperty( objectRec, p_sub_i, val)
9[Bza'\[9c-LG7`0 If ret <> sqaSuccess Then51Testing软件测试网6Y/F |?x @~!}
SQAGetPropertyArray = ret51Testing软件测试网 k5fK3})cUi
Exit Function51Testing软件测试网9NhC6FHMi
End If51Testing软件测试网-?3f5Z)_T/kqS
propertyValues(i) = val51Testing软件测试网7@?MTV
E0t |3fI eL6}6m'Zj0 Next i 51Testing软件测试网/J]`"e9z1L
51Testing软件测试网'R'D*ix5J{G*KE*Z]
SQAGetPropertyArray = sqaSuccess51Testing软件测试网9x}4k[7f jZ^end
51Testing软件测试网6S#^eU6K:n-N(b(f2]
End Function
l#W,|f/T:Kl0' ----------------------------------------------------------------------------
Fmg a8[!R4J%J0Function SQADatapoolOpen (pszDpName As String, Optional bWrap As Variant, Optional nSequence As Variant, Optional bExclusive As Variant) As Long51Testing软件测试网'H%A}` [RUx6lVB
Dim lResult As Long
w hI-qU,n2J`0 Dim dwFlag As Long51Testing软件测试网+e_\ ZAQ4X
Dim lLength As Long
{-T!J$u(M v/G0 Dim sErrText As String
7vkOz+K|0
6GDq6Q(DIR#nu0 lResult = sqaDpSuccess
&r4Q RL;jT1L0 ' Set the optional parameters to defaults if missing51Testing软件测试网p/]3|~z4Rd0D
If IsMissing(bWrap) = -1 Then
w(WSOS4Up"^0 bWrap = false51Testing软件测试网I2Hi:`l%u
End If
wtnb9g%@;n0 If IsMissing(nSequence) = -1 Then51Testing软件测试网]~0P4d9z
nSequence = SQA_DP_SEQUENTIAL
2P:]J%nO,w pX D0 End If51Testing软件测试网J4[u n5FS ]U
If IsMissing(bExclusive) = -1 Then51Testing软件测试网4H`XrG$k+[h
bExclusive = false
/IaxP2|$j3O2_\{0 End If51Testing软件测试网#lf}{)w-N}:e
51Testing软件测试网5j(g[P5a#_2M
' Check if the optional parameter is correct type
wgp:f UKA0 If Not VarType(bWrap) = 2 And Not VarType(bWrap) = 3 Then51Testing软件测试网;Y.L!k%aM3UkF
lResult = sqaDpInvalidArgument51Testing软件测试网q7| ^D7`iQ7O
End If
4Q.Y A4I m(J0 If Not VarType(nSequence) = 2 And Not VarType(nSequence) = 3 Then
.gqL?/R1[-P`0 lResult = sqaDpInvalidArgument
#jLAQg(]s0Declare Function LCSdatapool_open Lib "rtlcs.dll" (ByVal pszDpName$, ByVal dwFlags&) As Long51Testing软件测试网} q'L2\"PN+mOJ#}
Declare Function TSSErrorDetail Lib "rttss.dll" (ByVal pszErrText$, dwLen&) As Long
,r"G R5WI(p0Const SQA_DP_WRAP = &H0000000251Testing软件测试网yK:s{oZZF"{H
Const SQA_DP_NOWRAP = &H00000020
\)Pj(S/`m0Const SQA_DP_SHARED = &H00000004
X)^@ZJOs1G{0Const SQA_DP_PRIVATE = &H00000040
G,Nc8c(j9jN051Testing软件测试网 U~q0E%G([QI
' The last error number returned from the LCSdatapool_position_value and
`4fpwpKAEa0' LCSdatapool_name_value functions.
T+X5g#r${wp0Const LCS_LAST_VALUE_ERROR = -351Testing软件测试网1bm n0YS6~ \
51Testing软件测试网ZPw jU~ ~
Declare Function LCSdatapool_position_value Lib "rtlcs.dll" (ByVal dwDpId&, ByVal dwColIndex&) As Long
j0O*o6jS(Rp/TO0Declare Function LCSdatapool_name_value Lib "rtlcs.dll" (ByVal dwDpId&, ByVal sColName As String) As Long
`,@(?4hMU;vh6[0Declare Function Dplstrlen Lib "kernel32" Alias "lstrlenA" (ByVal lpString As Long) As Long
5y;hK|{'O0f(c0Declare Function Dplstrcpy Lib "kernel32" Alias "lstrcpyA" (ByVal lpString1 As String, ByVal lpString2 As Long) As Long51Testing软件测试网2M j-V]iXq5j)`i3} e
51Testing软件测试网0e A8KP4rf k
' ----------------------------------------------------------------------------51Testing软件测试网 rm ~)I(@ C}b
Const SQA_DIR_RUNFILES = 1 ' Install Directory
6S |a"} U"I{D051Testing软件测试网!}t [7rt5f
Declare Function UTLGetDir Lib "rtxutil.dll" (ByVal DirType%, ByVal lpszPath$, ByVal cch&) As Integer51Testing软件测试网\3h&T/`k Yx
Function SQAGetDir (iDirType as Integer) as String51Testing软件测试网/tlO[+ee6t E&g
' Returns standard directories used by SQA Suite apps
N)n$O(Z:EC0 Dim sDirPath as String, Result as Integer51Testing软件测试网z.`nHp(u#BXp
sDirPath = Space$(260)
7mY JA a l0 Result = UTLGetDir(iDirType, sDirPath, 260)51Testing软件测试网'I~m @5x
sDirPath = Left$(sDirPath, InStr(sDirPath,Chr$(0)) - 1)51Testing软件测试网@0Q tp)^Vd
If (Right$(sDirPath, 1) <> "\") Then sDirPath = sDirPath + "\"51Testing软件测试网UR(t(~}` m.a+Ry
SQAGetDir = sDirPath
YO%C)MNFq0End Function
e N.C7|?#M-l0' ----------------------------------------------------------------------------51Testing软件测试网B3v4Y UVA_He1w,v
Function SQAGetPropertyNames( objectRec As String, propertyNames() as String) As Integer
(P^#oDW)?1_6c0 Dim ret%
?uW p#t0 Dim sList as Variant51Testing软件测试网O3\ Y$G!Zh;DN9]J {-e
ret = SQAGetPropertyList( objectRec, sList)
m8w-| y&L!Z,Q)GuN4\0 If ret <> sqaSuccess Then
N)@4gzdE,E0 SQAGetPropertyNames = ret
/U'n-G1G0Z2Aa0 Exit Function
u]I/c*Z'L!DF}6~0 End If
9t Q%_4Q(mqB N/x0
B@A|7a+{7Qp#J0 Dim cObj%
c:R8m4A*{!^A"JPX0 cObj = SQAGetListCount( sList )
[Yu&e xE!~9W0 ReDim propertyNames( 0 To cObj-1 )
]*gP M:a$n3Q!V0
,a:J8S;MZX3tu7F4C0 Dim i%
1I_uR5kr[4g0 Dim vName as Variant
5U$Y(rfY7K'YL,o0 For i = 0 to cObj-1
/H#R!u A@*^AC0 ret = SQAGetListItem( sList, i, vName)
%oH#rD}MT$A|0 If ret <> sqaSuccess Then51Testing软件测试网X8q9Iy4tP\2{
SQAGetPropertyNames = ret
FW Yn#t0 Exit Function51Testing软件测试网#F;j~A.r*I ZU:X6}yO:D
End If51Testing软件测试网C(c0H1z4I.|d$I:d7~.o
propertyNames(i) = vName
5M2W {Tu:C;U8^0 Next i51Testing软件测试网uc(A3E N[b
51Testing软件测试网.s:B_(f;r\'zZ
SQAGetPropertyNames = sqaSuccess51Testing软件测试网4om!Gs9XmuC9e
51Testing软件测试网(L.B#f(gw6f7b
End Function
0B7wJ7j@s:@NR0' ----------------------------------------------------------------------------51Testing软件测试网c|y8y4Rl
Function SQAGetChildren( objectRec As String, childRec() as String) As Integer
[(_P/ksH#h0 Dim ret%51Testing软件测试网?1?q8c,H9l
Dim sList as Variant51Testing软件测试网 bV{0E+G
Dim parentPrefix as Variant51Testing软件测试网0yS*@HW"rM&@b
[/HE R)A|pM0 ret = SQAGetProperty( objectRec, "FullRecognition", parentPrefix )51Testing软件测试网C"raa"~2k2N O*R
If ret <> sqaSuccess Then
"q9r.Mb:ea]0 SQAGetChildren = ret
qe G.X@\(}p1~2]a0 Exit Function
sw Uwf7| Po/?0 End If51Testing软件测试网yS#P+]7?*Q(^h~!i
parentPrefix = parentPrefix + ";\;"51Testing软件测试网C2q:cpQ7`~2w5_
51Testing软件测试网4ple X3L|Q
ret = SQAGetChildList( objectRec, sList)51Testing软件测试网 NSq2{+d0AVHv
If ret <> sqaSuccess Then
)oh:E;l:s/Icn0 SQAGetChildren = ret
@ti"LJN%vf+K.p ni0 Exit Function
P$S:M;dSl2L;?0 End If51Testing软件测试网 UTKD8K
51Testing软件测试网p-L4~}#K)O
Dim cObj%51Testing软件测试网.V!X3T$NL&k
cObj = SQAGetListCount( sList )51Testing软件测试网_8MOc[h`e
ReDim childRec( 0 To cObj-1 )
5Q'P\G{"sH|;rdF+h0
F/rG:b XlS0 Dim i%51Testing软件测试网&j|&h*{.p nv
Dim vName as Variant
-rI&Ix,{v6tn~ E'~0 For i = 0 to cObj-151Testing软件测试网)q3^l;w8Ny OFNY
ret = SQAGetListItem( sList, i, vName)
r(W-m^Z DOZ P?0 If ret <> sqaSuccess Then51Testing软件测试网KiX/c6Z2P-m#m
SQAGetChildren = ret
Ue?}y)p&q0 Exit Function
.x5J~&p?1y |g0 End If51Testing软件测试网9L%b?!u9O"H
childRec(i) = parentPrefix + vName51Testing软件测试网[9U/sk+b ty2D
Next i
a[:?,a\ c-ztf0
s,e YrD!K(A:kv0 SQAGetChildren = sqaSuccess51Testing软件测试网,MUIi,`t9a
51Testing软件测试网%Jb$s5ng:T1d'e
End Function
P {[*Vvw0' ----------------------------------------------------------------------------51Testing软件测试网3a-|!_ [ AH-F)tY
Function SQAGetPropertyArrayAsString( objectRec As String, propertyName as String, propertyValues() as String) As Integer
1VA n?S0
&RY%zLO1xU2x$?"IC0 Dim ret%
e6P'A']2@Qn0 Dim val$
K!P!k QNu$h3K0 Dim i%, p_sub_i$51Testing软件测试网7@(Cs7?(]:o1J^
Dim cProp%
F)B#Lb [x.Z!_0
6a [F4}^-P8g0 ret = SQAGetPropertyArraySize( objectRec, propertyName, cProp )51Testing软件测试网&`za5\hS:HdV
If ret <> sqaSuccess Then51Testing软件测试网,fTxZ NZ#[(j
SQAGetPropertyArrayAsString = ret51Testing软件测试网CJU'w yN"_}&r/h
Exit Function
(D7S#\&QKS$S:x0 End If
{^z&hj w"t1y$C0
M-q7{$Z,?0 ReDim Preserve propertyValues( 0 To cProp-1 )
{+A:Hl\X _t0b0
gLE P7Hj5j.{0 For i = 0 to cProp-151Testing软件测试网!kf$Avg l'j
p_sub_i = propertyName+"("+str(i)+")"51Testing软件测试网uY"w5ioBx Zo
51Testing软件测试网2]1Fg w4n:m Z){ |P
ret = SQAGetPropertyAsString( objectRec, p_sub_i, val)51Testing软件测试网nFwMN D3K
If ret <> sqaSuccess Then51Testing软件测试网 vBn4V)o$t3I2y|+t
SQAGetPropertyArrayAsString = ret
p v0W5TD_5k.` z0 Exit Function
7m6Kv[ g(]0 End If
|8a5py:H$E!WRSP0 propertyValues(i) = val
,Gm.Yu+j _G.E Sz4R0
{,WX a4c[3{)X+L0 Next i 51Testing软件测试网/R`v8wH8|8V(o6A n:[
lA%F$n9S@N0Cb0FR0 SQAGetPropertyArrayAsString = sqaSuccess
z+ygu NY0
e]fI}&Agy4Ut0End Function
I)v b*D0M!H0' ----------------------------------------------------------------------------
MP Z] D6T|0Function SQAGetPropertyArray( objectRec As String, propertyName as String, propertyValues() as Variant) As Integer
uXg0O2`Qf]+buHy0
p&]O q'Um/x0 Dim ret%
bB9Tsn+d+wgG0 Dim val as Variant
D(nFg7T.l0 Dim i%, p_sub_i$51Testing软件测试网,oL!In/_ k3Z8D xg
Dim cProp%51Testing软件测试网8gEHz,l
51Testing软件测试网b4F7V2ol-U
ret = SQAGetPropertyArraySize( objectRec, propertyName, cProp )
'E"h9q.W%W hM0 If ret <> sqaSuccess Then
j3NA e&A0 SQAGetPropertyArray = ret
;H&?,F7J j:C{-C0 Exit Function51Testing软件测试网9Z w s(og
End If
'o.zk5H%]2K U051Testing软件测试网O2zd!j0e\)s
If cProp>0 then
*CNjm$e/r0 ReDim propertyValues( 0 To cProp-1 )51Testing软件测试网n@.l!?.G
End if
&V{| K BnI:I0
Lr8p| x9d&Um0 For i = 0 to cProp-151Testing软件测试网/T1w(Q Q'u)|x6h#[
p_sub_i = propertyName+"("+str(i)+")"
Sf'j;Fjq w0
%Nso},i%_!W2Ze0 ret = SQAGetProperty( objectRec, p_sub_i, val)
9[Bza'\[9c-LG7`0 If ret <> sqaSuccess Then51Testing软件测试网6Y/F |?x @~!}
SQAGetPropertyArray = ret51Testing软件测试网 k5fK3})cUi
Exit Function51Testing软件测试网9NhC6FHMi
End If51Testing软件测试网-?3f5Z)_T/kqS
propertyValues(i) = val51Testing软件测试网7@?MTV
E0t |3fI eL6}6m'Zj0 Next i 51Testing软件测试网/J]`"e9z1L
51Testing软件测试网'R'D*ix5J{G*KE*Z]
SQAGetPropertyArray = sqaSuccess51Testing软件测试网9x}4k[7f jZ^end
51Testing软件测试网6S#^eU6K:n-N(b(f2]
End Function
l#W,|f/T:Kl0' ----------------------------------------------------------------------------
Fmg a8[!R4J%J0Function SQADatapoolOpen (pszDpName As String, Optional bWrap As Variant, Optional nSequence As Variant, Optional bExclusive As Variant) As Long51Testing软件测试网'H%A}` [RUx6lVB
Dim lResult As Long
w hI-qU,n2J`0 Dim dwFlag As Long51Testing软件测试网+e_\ ZAQ4X
Dim lLength As Long
{-T!J$u(M v/G0 Dim sErrText As String
7vkOz+K|0
6GDq6Q(DIR#nu0 lResult = sqaDpSuccess
&r4Q RL;jT1L0 ' Set the optional parameters to defaults if missing51Testing软件测试网p/]3|~z4Rd0D
If IsMissing(bWrap) = -1 Then
w(WSOS4Up"^0 bWrap = false51Testing软件测试网I2Hi:`l%u
End If
wtnb9g%@;n0 If IsMissing(nSequence) = -1 Then51Testing软件测试网]~0P4d9z
nSequence = SQA_DP_SEQUENTIAL
2P:]J%nO,w pX D0 End If51Testing软件测试网J4[u n5FS ]U
If IsMissing(bExclusive) = -1 Then51Testing软件测试网4H`XrG$k+[h
bExclusive = false
/IaxP2|$j3O2_\{0 End If51Testing软件测试网#lf}{)w-N}:e
51Testing软件测试网5j(g[P5a#_2M
' Check if the optional parameter is correct type
wgp:f UKA0 If Not VarType(bWrap) = 2 And Not VarType(bWrap) = 3 Then51Testing软件测试网;Y.L!k%aM3UkF
lResult = sqaDpInvalidArgument51Testing软件测试网q7| ^D7`iQ7O
End If
4Q.Y A4I m(J0 If Not VarType(nSequence) = 2 And Not VarType(nSequence) = 3 Then
.gqL?/R1[-P`0 lResult = sqaDpInvalidArgument