首页 > 其他 > 详细

Theos tweak MSHookFunction

时间:2014-12-08 12:14:07      阅读:1095      评论:0      收藏:0      [点我收藏+]
#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);
}

Theos tweak MSHookFunction

原文:http://www.cnblogs.com/qq378829867/p/4150604.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!