I've moved to v5.4.0 (u) recently and found it very good.
I've managed to port an old, complex script with tons of include files and
preprocessing. I usually use a self-made library (compiled with Delphi
2010) to serve the scripted code, and haven't faced any problems till
today.
Today I tried to move some code excerpts from my Delphi library to Pascal
script and came across a limitation introduced with v5.4.0: no PChar or
PWideChar.
Some Windows API prototypes require PWideChar params to be passed; such
param types cannot be just replaced by String.
Examples:
function SHGetFileInfo (
pszPath: PWideChar <<<<------
dwFileAttributes: DWORD;
var psfi: TSHFileInfo;
cbFileInfo,
uFlags: UINT): DWORD;
procedure SHChangeNotify (
wEventId: Integer;
uFlags: UINT;
dwItem1, dwItem2: Pointer); <<<<------
In SHChangeNotify() when the 2nd param is shcnf_path, dwItem1 must be a
PWideChar(some_path).
For instance:
SHChangeNotify (
shcne_attributes,
shcnf_path or shcnf_flush,
pszPath, // PWideChar(some_path)
nil);
How declare it as import those function?
How to pass the "pszPath" param?
Thanks in advance.