Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 760093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T15:40:31+00:00 2026-05-14T15:40:31+00:00

On Windows there a few libraries that allow you to intercept calls to DLLs:

  • 0

On Windows there a few libraries that allow you to intercept calls to DLLs:

http://www.codeproject.com/kb/system/hooksys.aspx

Is it possible to do this on Mac OS? If so, how is it done?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T15:40:32+00:00Added an answer on May 14, 2026 at 3:40 pm

    The answer depends on whether you want to do this in your own application or systemwide. In your own application, it’s pretty easy; the dynamic linker provides features such as DYLD_INSERT_LIBRARIES. If you’re doing this for debugging/instrumentation purposes, also check out DTrace.

    You can replace Objective-C method implementations with method swizzling, e.g. JRSwizzle or Apple’s method_exchangeImplementations (10.5+).

    If you want to modify library behavior systemwide, you’re going to need to load into other processes’ address spaces.

    • Two loading mechanisms originally designed for other purposes (input managers and scripting additions) are commonly abused for this purpose, but I wouldn’t really recommend them.
    • mach_inject/mach_override are an open-source set of libraries for loading code and replacing function implementations, respectively; however, you’re responsible for writing your own application which uses the libraries. (Also, take a look at this answer; you need special permissions to inject code into other processes.)

    Please keep in mind that application patching/code injection for non-debugging purposes is strongly discouraged by Apple and some Mac users (and developers) are extremely critical of the practice. Much of this criticism is poorly informed, but there have been a number of legitimately poorly written “plug-ins” (particularly those which patch Safari) that have been implicated in application crashes and problems. Code defensively.

    (Disclaimer: I am the author of a (free) APE module and an application which uses mach_inject.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There are a few windows service projects in our codebase that follow this model,
BITS, the Windows background intelligent transfer service. Looks like there are a few C#
Is there something like SESSION in Windows application? I want to store a few
Are there Windows API functions that allows reading what the current password policy is?
I am aware that there were similar questions in past few years, but after
I have Core static library, a few Component static libraries that relays on the
I have a few libraries I use in my project that are unsigned. Because
I remember a few years ago(2002) there was a multipartite virus that could be
Are there any free, GCC-compatible suites for Windows that generate standalone executables without external
I'm running a few different windows command scripts that all reference the same directory.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.