How to call NSBeep from Delphi
Asked Answered
N

1

14

I'm looking for a MessageBeep replacement on the OS X. It seems that the proper function to call would be NSBeep but it is not supported by XE2 RTL.

How do I call NSBeep from Delphi application?

Norword answered 23/4, 2012 at 19:43 Comment(2)
What about to use the Beep instead ? However I have no idea what they mean with the note On MAC OS the Beep routine has limited functionality, does it mean it does less than beep :-) ?Swinson
In my case this would probably be enough but I would like to learn how to properly add my own imports on OS X.Norword
P
12

It's just a plain C function:

procedure NSBeep; cdecl;
  external '/System/Library/Frameworks/AppKit.framework/AppKit' name '_NSBeep';
Propagate answered 23/4, 2012 at 20:33 Comment(1)
Thanks! I almost got it but I was missing the last '/AppKit' in the external and it didn't work.Norword

© 2022 - 2024 — McMap. All rights reserved.