Main Page | File List | File Members | Related Pages

mach_inject.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002     mach_inject.h
00003         Copyright (c) 2003-2005 Jonathan 'Wolf' Rentzsch: <http://rentzsch.com>
00004         Some rights reserved: <http://creativecommons.org/licenses/by/2.0/>
00005 
00006     ***************************************************************************/
00007     
00008 /***************************************************************************/
00020 #ifndef     _mach_inject_
00021 #define     _mach_inject_
00022 
00023 #include <sys/types.h>
00024 #include <mach/error.h>
00025 #include <mach/vm_types.h>
00026 #include <stddef.h> // for ptrdiff_t
00027 
00028 #ifdef  __cplusplus
00029     extern  "C" {
00030 #endif
00031 
00032 #define err_threadEntry_image_not_found         (err_local|1)
00033 
00034 #define INJECT_ENTRY        injectEntry
00035 #define INJECT_ENTRY_SYMBOL "injectEntry"
00036 
00037 typedef void    (*mach_inject_entry)( ptrdiff_t codeOffset, void *paramBlock,
00038                 size_t paramSize );
00039     
00040 /***************************************************************************/
00056     mach_error_t
00057 mach_inject(
00058         const mach_inject_entry threadEntry,
00059         const void              *paramBlock,
00060         size_t                  paramSize,
00061         pid_t                   targetProcess,
00062         vm_size_t               stackSize );
00063 
00064 /***************************************************************************/
00075     mach_error_t
00076 machImageForPointer(
00077         const void *pointer,
00078         const void **image,
00079         unsigned long *size );
00080 
00081 #ifdef  __cplusplus
00082     }
00083 #endif
00084 #endif  //  _mach_inject_

Generated on Sun Jun 12 22:08:05 2005 for mach_inject by doxygen 1.3.4