В итоге вот так работает
X++:
Binary text = new Binary(200);
Binary len = new Binary(4);
;
dllFunction = new DLLFunction(DLL, 'GetFIOPadegAS');
dllFunction.returns(ExtTypes::DWord);
dllFunction.arg(ExtTypes::String,
ExtTypes::String,
ExtTypes::String,
ExtTypes::DWord,
ExtTypes::Pointer,
ExtTypes::Pointer);
len.dWord(0, 200);
dllFunction.call("Иванов", "Иван", "Иванович", 5, text, len);
info(text.string(0));