[fpc-pascal]Win32: converting lptstr to string

Marco van de Voort marcov at stack.nl
Thu Apr 22 18:23:00 CEST 2004


> >  How do I convert a lptstr var (win32) to a string var ?
> 
> lptstr is just a PChar. Use the usual method you use for PChar...
> 
> Y := StrPas( X ); 
> 
> Y := String(X);
> 
> Would probably both work in Delphi mode - though StrPas is more universal.

strpas will introduce a 255 char limit.




More information about the fpc-pascal mailing list