Skip to content
Newer
Older
100644 60 lines (44 sloc) 2.16 KB
ee99867 @ccgus oh geeze
authored Mar 4, 2009
1 /*******************************************************************************
2 mach_inject_bundle.h
3 Copyright (c) 2005 Jonathan 'Wolf' Rentzsch: <http://rentzsch.com>
4 Some rights reserved: <http://creativecommons.org/licenses/by/2.0/>
5
6 ***************************************************************************/
7
8 /***************************************************************************//**
9 @mainpage mach_inject_bundle
10 @author Jonathan 'Wolf' Rentzsch: <http://rentzsch.com>
11
12 Higher-level interface for mach_inject. This framework, intended to be
13 embedded into your application, allows you to "inject and forget" an
14 arbitrary bundle into an arbitrary process. It supplies the primitive code
15 block that gets squirted across the address spaces
16 (mach_inject_bundle_stub), which was the trickiest thing to write.
17
18 It's a Cocoa framework right now, but I intend to make it usable from Carbon
19 apps as well. Indeed, it already may be -- it doesn't use Cocoa or
20 Objective-C at all. I just haven't tried yet.
21
22 @todo Supply a higher-level interface to specifying processes than just a
23 process ID. I'm thinking offering lookup via application ID
24 ("com.apple.Finder") and via type/creator ('FNDR', 'MACS').
25
26 ***************************************************************************/
27
28 #ifndef _mach_inject_bundle_
29 #define _mach_inject_bundle_
30
31 #include <sys/types.h>
32 #include <mach/error.h>
33
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 #define err_mach_inject_bundle_couldnt_load_framework_bundle (err_local|1)
39 #define err_mach_inject_bundle_couldnt_find_injection_bundle (err_local|2)
40 #define err_mach_inject_bundle_couldnt_load_injection_bundle (err_local|3)
41 #define err_mach_inject_bundle_couldnt_find_inject_entry_symbol (err_local|4)
42
43 /***************************************************************************//**
44
45
46 @param bundlePackageFileSystemRepresentation -> Required pointer
47 @param pid ->
48 @result <- mach_error_t
49
50 ***************************************************************************/
51
52 mach_error_t
53 mach_inject_bundle_pid(
54 const char *bundlePackageFileSystemRepresentation,
55 pid_t pid );
56
57 #ifdef __cplusplus
58 }
59 #endif
60 #endif // _mach_inject_bundle_
Something went wrong with that request. Please try again.