Como faço para retornar uma string da DLL para o Inno Setup Pascal Script

Eu tenho duas funções C em uma DLL que são definidas no arquivo de definição e são exportadas para uso no Inno Setup.

char* __stdcall GetName()
{
        return "Kishore";
}
void __stdcall getName(char* strName)
{
     strcpy(strName, "Kishore");
}

O código Inno Setup carregará a DLL personalizada e chamará a função / procedimento para retornar os nomes

{ Inno Setup script }
[Code]
procedure  getName(MacAddress: String);
external 'getName@files:MyDll.dll stdcall setuponly';

function  GetName():PAnsiChar;
external 'GetName@files:MyDll.dll stdcall setuponly';

function NextButtonClick(CurPage: Integer): Boolean;
var
  StrName: String;
begin
  SetLength(StrName,15);    
  getName(StrName); { displaying only single character }
  StrName := GetName(); { this call is crashing }
end

Como recuperar o nome no script Inno Setup sem travar?

questionAnswers(1)

yourAnswerToTheQuestion