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?

2
  • 1
    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 :-) ? Commented Apr 23, 2012 at 19:47
  • 3
    In my case this would probably be enough but I would like to learn how to properly add my own imports on OS X. Commented Apr 23, 2012 at 19:50

1 Answer 1

12

It's just a plain C function:

procedure NSBeep; cdecl;
  external '/System/Library/Frameworks/AppKit.framework/AppKit' name '_NSBeep';
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks! I almost got it but I was missing the last '/AppKit' in the external and it didn't work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.