InnoSetup 6.x no more recognizes PChar

888 views
Skip to first unread message

ezi...@tin.it

unread,
Feb 17, 2020, 1:07:00 PM2/17/20
to innosetup
After a new HD formatting I have updated Innosetup from 5.x to 6.0.3.

In the [Code] section I have a Function:

function FunctionThatReturnsStrings: PChar;

always compiled without problems with old versions. Now I get the error: "Unknown type: PChar"

Why?

pchar.jpg

Luís César Zanetti

unread,
Feb 17, 2020, 3:16:20 PM2/17/20
to inno...@googlegroups.com
Inno seup version 6.x is just UNICODE (Does not have ANSI version) .
In inno setup unicode the type equivalent to PChar is called PAnsiChar.
Add at the beginning of the code section in your script:

#ifdef UNICODE
type
   PChar = PAnsiChar;
#endif

--
You received this message because you are subscribed to the Google Groups "innosetup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to innosetup+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/innosetup/54a633d9-35d4-4535-8831-0170f936663b%40googlegroups.com.

ezi...@tin.it

unread,
Feb 17, 2020, 3:44:48 PM2/17/20
to innosetup
It works perfectly !! Ty :)
Reply all
Reply to author
Forward
0 new messages