Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

IDL rout parameter of a method in Lua

Callers of a method with a rout parameter must specify the length of the output string as an input parameter. For example:

interface IFoo
{
  AEEResult Process(rout string name);
};

is used as:

local empty, lenReq = foo:Process(0)
assert(empty == "")
assert(lenReq == 6)  -- From [in] example
local filled, lenReq = foo:Process(lenReq)
assert(filled == "Hello!")
assert(lenReq == 6)