Recent

Author Topic: winceunits \ mmsystem.pp SND_ALIAS_* constants definition problem  (Read 1018 times)

440bx

  • Hero Member
  • *****
  • Posts: 6160
Hello,

In the source file winceunits\mmsystem.pp, the SND_ALIAS_* constant definitions are incorrect.

They are currently defined as:
Code: Pascal  [Select][+][-]
  1.       SND_ALIAS_SYSTEMASTERISK        = SND_ALIAS_START+
  2.                                         (DWORD(AnsiChar('S')) or
  3.                                          DWORD(AnsiChar('*')));
  4.  
  5.       SND_ALIAS_SYSTEMQUESTION        = SND_ALIAS_START+
  6.                                         (DWORD(AnsiChar('S')) or
  7.                                          DWORD(AnsiChar('?')));
  8.  
  9.       SND_ALIAS_SYSTEMHAND            = SND_ALIAS_START+
  10.                                         (DWORD(AnsiChar('S')) or
  11.                                          DWORD(AnsiChar('H')));
  12.  
  13.       SND_ALIAS_SYSTEMEXIT            = SND_ALIAS_START+
  14.                                         (DWORD(AnsiChar('S')) or
  15.                                          DWORD(AnsiChar('E')));
  16.  
  17.       SND_ALIAS_SYSTEMSTART           = SND_ALIAS_START+
  18.                                         (DWORD(AnsiChar('S')) or
  19.                                          DWORD(AnsiChar('S')));
  20.  
  21.       SND_ALIAS_SYSTEMWELCOME         = SND_ALIAS_START+
  22.                                         (DWORD(AnsiChar('S')) or
  23.                                          DWORD(AnsiChar('W')));
  24.  
  25.       SND_ALIAS_SYSTEMEXCLAMATION     = SND_ALIAS_START+
  26.                                         (DWORD(AnsiChar('S')) or
  27.                                          DWORD(AnsiChar('!')));
  28.  
  29.       SND_ALIAS_SYSTEMDEFAULT         = SND_ALIAS_START+
  30.                                         (DWORD(AnsiChar('S')) or
  31.                                          DWORD(AnsiChar('D')));
  32.  
The problem is that the second DWORD should be shifted left 8 and it is not, resulting in an invalid constant.

HTH.

NOTE: the definitions in winunits-base do not have this problem because they are numeric constants directly. IOW, they are correct (at least they look like they are correct - didn't check more than a couple of them.)
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12721
  • FPC developer.
Re: winceunits \ mmsystem.pp SND_ALIAS_* constants definition problem
« Reply #1 on: August 27, 2025, 11:48:04 am »
Maybe endianess related?

I don't know who maintains wince, so better file a bug.

440bx

  • Hero Member
  • *****
  • Posts: 6160
Re: winceunits \ mmsystem.pp SND_ALIAS_* constants definition problem
« Reply #2 on: August 27, 2025, 12:54:26 pm »
I don't know who maintains wince, so better file a bug.
Done.

link: https://gitlab.com/freepascal.org/fpc/source/-/issues/41380
ticket: 41380
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.


440bx

  • Hero Member
  • *****
  • Posts: 6160
Re: winceunits \ mmsystem.pp SND_ALIAS_* constants definition problem
« Reply #4 on: August 27, 2025, 03:34:31 pm »
Great! :)
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

 

TinyPortal © 2005-2018