Not able to assign a string to a string property in a defined struct
Please help on how to fix this.
Thanks
I was able to reproduce with the following code:
Function Test1()
{
var MyStructID =
DLL["DefineType"]("MyStruct",
vt_lpstr,
"First",
vt_i4,
"Second",
vt_i4,
"Third");
var A1 =
DLL["New"]("MyStruct", 2);
A1["Item"](0)["First"] = "Hello" // Catastrophic error
A1["Item"](0)["Second"] = 200;
A1["Item"](0)["Third"] = 300;
A1["Item"](1)["First"] = 101;
A1["Item"](1)["Second"] = 201;
A1["Item"](1)["Third"] = 301;
}
Function Test1()
{
var MyStructID =
DLL["DefineType"]("MyStruct",
vt_lpstr,
"First",
vt_i4,
"Second",
vt_i4,
"Third");
var A1 =
DLL["New"]("MyStruct", 2);
// This produce
catastrophic error
A1["Item"](0)["First"] =
DLL["New"]("LPSTR", 256);
A1["Item"](0)["First"]["Text"] =
"Hello"
A1["Item"](0)["Second"] = 200;
A1["Item"](0)["Third"] = 300;
A1["Item"](1)["First"] = 101;
A1["Item"](1)["Second"] = 201;
A1["Item"](1)["Third"] = 301;
A1["Item"](2)["First"] = 102;
}