Article

From:
To:
Jordan Russell
Subject:
Re: Importing functions with PWideChar params in v5.4.0
Newsgroup:
jrsoftware.innosetup

Re: Importing functions with PWideChar params in v5.4.0

Thank you, Jordan!


Jordan Russell wrote:
> On 12/10/2010 9:03 PM, Paulo Fran__a Lacerda wrote:
>> 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.
> 
> That's actually a limitation of the Unicode version of ROPS...
> 
>> 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;
> 
> "String" should work fine there.
> 
>> 
>>      procedure SHChangeNotify (
>>        wEventId: Integer; 
>>        uFlags: UINT; 
>>        dwItem1, dwItem2: Pointer);    <<<<------
> 
> And there too. Use '' if you need to pass nil.
FYI: Phrase searches are enclosed in either single or double quotes
 
 
Originally created by
Tamarack Associates
Thu, 28 Mar 2024 08:56:34 UTC
Copyright © 2009-2024
HREF Tools Corp.