Thema: Delphi How to - string in DLL

Einzelnen Beitrag anzeigen

Benutzerbild von jaenicke
jaenicke

Registriert seit: 10. Jun 2003
Ort: Berlin
9.367 Beiträge
 
Delphi 11 Alexandria
 
#4

AW: How to - string in DLL

  Alt 17. Jun 2011, 04:58
You can use PWideChar or PAnsiChar just as the Windows API internally uses too.

If you want to return such a value:
Just give a PWideChar and its size as variable parameter. If the size is not sufficient, you return the size you need. If the size is sufficient you copy the data into the buffer.

This is the way the API manages it. And it works well.
Sebastian Jänicke
Alle eigenen Projekte sind eingestellt, ebenso meine Homepage, Downloadlinks usw. im Forum bleiben aktiv!
  Mit Zitat antworten Zitat