[fpc-devel] windows shlobj SIGDN longint
Mattias Gaertner
nc-gaertnma at netcologne.de
Thu Jun 25 00:51:17 CEST 2026
On 6/24/26 22:54, J. Gareth "Kit" Moreton via fpc-devel wrote:
> Hmmm, that's a little bit difficult. What happens if you define the
> constants as, say, "SIGDN_FILESYSPATH = longint($80058000);"?
Then it would compile.
But it seems the C code uses DWord, so why should FPC use longint?
Mattias
>
> Gareth aka. Kit
>
> On 24/06/2026 21:44, Mattias Gaertner via fpc-devel wrote:
>>
>>
>> On 6/24/26 22:35, J. Gareth "Kit" Moreton via fpc-devel wrote:
>>> I think it's deliberately designed that way so such codes are
>>> negative numbers in signed 32-bit.
>>
>> I spotted it because code fails to compile with a range check error.
>>
>> Windows docs says these constants are from an enumeration.
>>
>> Mattias
>>
>>
>>> Gareth aka. Kit
>>>
>>> On 24/06/2026 20:51, Mattias Gaertner via fpc-devel wrote:
>>>> Hi,
>>>>
>>>> Unit shlobj has:
>>>>
>>>> SIGDN = longint;
>>>>
>>>> But the constants are for example:
>>>>
>>>> SIGDN_FILESYSPATH = $80058000;
>>>>
>>>>
>>>> Maybe SIGDN must be DWord?
>>>>
>>>> Mattias
>>>>
>>>> _______________________________________________
>>>> fpc-devel maillist - fpc-devel at lists.freepascal.org
>>>> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
>>>>
>>> _______________________________________________
>>> fpc-devel maillist - fpc-devel at lists.freepascal.org
>>> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
>>
>> _______________________________________________
>> fpc-devel maillist - fpc-devel at lists.freepascal.org
>> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
>>
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
More information about the fpc-devel
mailing list