标签:io ar os on bs cti amp tt br
#import "substrate.h" static FILE * (*s_orig_fopen) ( const char * filename, const char * mode ); static FILE * my_fopen ( const char * filename, const char * mode ){ return s_orig_fopen(filename, mode); } static void entry(void) __attribute__ ((constructor)); static void entry(void) { MSHookFunction(fopen, my_fopen, &s_orig_fopen); }
OR
#import "substrate.h"
static FILE * (*s_orig_fopen) ( const char * filename, const char * mode );
static FILE * my_fopen ( const char * filename, const char * mode ){
return s_orig_fopen(filename, mode);
}
%ctor {
MSHookFunction(fopen, my_fopen, &s_orig_fopen);
}
标签:io ar os on bs cti amp tt br
原文地址:http://www.cnblogs.com/qq378829867/p/4150604.html