Changeset 4663 for zzuf


Ignore:
Timestamp:
Oct 4, 2010, 11:37:41 PM (9 years ago)
Author:
Sam Hocevar
Message:

Remove useless code for Win32 diversions.

Location:
zzuf/trunk/src/libzzuf
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/src/libzzuf/lib-load.h

    r4659 r4663  
    5151zzuf_table_t;
    5252
    53 #   define DIVERT(x) { "kernel32.dll", #x, \
    54                       (void **)&x##_orig, (void *)x##_new }
    55 #   define DIVERT_END { NULL, NULL, NULL, NULL }
    56 
    57 extern zzuf_table_t table_stream[],
    58                     table_win32[];
     53extern zzuf_table_t table_win32[];
    5954
    6055#else
    6156#   error no function diversion system for this platform
    6257#endif
    63 
  • zzuf/trunk/src/libzzuf/lib-stream.c

    r4657 r4663  
    11461146}
    11471147#endif
    1148 
    1149 /* Win32 function table */
    1150 #if defined _WIN32
    1151 zzuf_table_t table_stream[] =
    1152 {
    1153     DIVERT(fopen),
    1154     DIVERT(fread),
    1155     DIVERT(fclose),
    1156     DIVERT_END
    1157 };
    1158 #endif
    1159 
  • zzuf/trunk/src/libzzuf/lib-win32.c

    r4662 r4663  
    114114/* Win32 function table */
    115115#if defined _WIN32
     116#   define DIVERT(x) { "kernel32.dll", #x, \
     117                      (void **)&x##_orig, (void *)x##_new }
     118#   define DIVERT_END { NULL, NULL, NULL, NULL }
     119
    116120zzuf_table_t table_win32[] =
    117121{
  • zzuf/trunk/src/libzzuf/sys.c

    r4656 r4663  
    9494    static zzuf_table_t *list[] =
    9595    {
    96         table_stream,
    9796        table_win32,
    9897    };
     
    140139
    141140                /* FIXME: The StarCraft 2 hack uses two methods for function
    142                     * diversion. See HookSsdt() and HookHotPatch(). */
     141                 * diversion. See HookSsdt() and HookHotPatch(). */
    143142                VirtualProtect(func, sizeof(func), PAGE_EXECUTE_READWRITE, &dummy);
    144143                WriteProcessMemory(GetCurrentProcess(), func, &diversion->new,
     
    151150}
    152151#endif
    153 
Note: See TracChangeset for help on using the changeset viewer.