Usage of DLL Custum Data Structure (VBS)
The following code generates an Err when a string is affected to the structure field called tTmpParam.sKeyword. May you tell me the correct syntax to use in order to handle this tTmpParam.sKeyword field?
Thank you in advance.
Dim typeParamId2
typeParamId2 = DLL.DefineType("typeParam2",_
vt_lpstr, "sKeyword",_
vt_lpstr, "sValue",_
vt_i4, "ivalue")
Sub AfficheParam
'----------------------------------------------------------------------------------------
On Error Resume Next
'----------------------------------------------------------------------------------------
Dim tTmpParam, tempstr
Set tTmpParam = DLL.New("typeParam2")
Set tempstr = DLL.New("LPSTR",256)
Set tTmpParam.sKeyword = DLL.New("LPSTR",256)
tTmpParam.ivalue = 15
MsgBox Cstr(tTmpParam.ivalue)
tempstr.Text = "MessageTempStr"
MsgBox tempstr.Text
tTmpParam.sKeyword.Text = "MessagesKeyword"
MsgBox tTmpParam.sKeyword.Text
MsgBox "Error : " & Err & Err.Description
End Sub