zoukankan      html  css  js  c++  java
  • Theos tweak MSHookFunction

    #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);
    }
  • 相关阅读:
    hdu 6201 dfs
    Oulipo POJ
    Kitchen Measurements UVALive
    Surf Gym
    hoj 13969 Racing Gems
    分块
    分块学习资料
    Jam's problem again HDU
    树的点分治
    Census UVA
  • 原文地址:https://www.cnblogs.com/qq378829867/p/4150604.html
Copyright © 2011-2022 走看看