Announcement

Collapse
No announcement yet.

null character in string

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • null character in string

    Is there any way to have a null character in a string that I pass to a DLL in DLL.CallFunction? E.g.,
    Code:
      arg = "null character at end\0"
    or
    Code:
      arg = "null character at end"..String.Char(0x00);
    There does not appear to be although supposedly LUA does recognize the null character.

    I am using SUF 9.5.

    Thanks.

  • #2
    The help file states that DLL.CallFunction() expects null-terminated strings. If you include a null character in the string, the action fails (the argument won't be passed properly to the DLL and will possibly cause a crash). Sadly, this action does not allow you to pass a null - if you need this, you have to build some workaround into the DLL, for example using Base64 decoding.

    Ulrich

    Comment

    Working...
    X