SMsgError = alien.defstruct{
{"cmdLen", "ulong"},
{"cmd", "ulong"},
{"deviceType","byte"},
{"deviceNo","byte"},
{"errNo","short"},
{"errStr", "char",256},
{"errType","byte"}
}
Note the optional third element in the struct´s definition.
Now you can:
local instance=SMsgError:new()
instance.errStr="This is a severe error..."
Example:
Now you can:
errStr is padded with NUL-bytes. You can also