Пример #1
0
HOOK_FUNCTION hook_InternetConnectW		= {szWininet, szInternetConnectW, &my_InternetConnectW, NULL};

HOOK_FUNCTION hook_HttpQueryInfoA		= {szWininet, szHttpQueryInfoA, &my_HttpQueryInfoA, NULL};
HOOK_FUNCTION hook_HttpQueryInfoW		= {szWininet, szHttpQueryInfoW, &my_HttpQueryInfoW, NULL};

HOOK_FUNCTION hook_HttpAddRequestHeadersA		= {szWininet, szHttpAddRequestHeadersA, &my_HttpAddRequestHeadersA, NULL};
HOOK_FUNCTION hook_HttpAddRequestHeadersW		= {szWininet, szHttpAddRequestHeadersW, &my_HttpAddRequestHeadersW, NULL};

#ifdef _IE_DISABLE_REDIRECT
HOOK_FUNCTION hook_HttpOpenRequestW		= {szWininet, szHttpOpenRequestW, &my_HttpOpenRequestW, NULL};
#endif


// Hook descriptors
static HOOK_DESCRIPTOR IeIatHooks[] = {
	DEFINE_HOOK(&hook_InternetReadFile, HF_TYPE_IAT | HF_PATCH_NAME),
	DEFINE_HOOK(&hook_InternetWriteFile, HF_TYPE_IAT | HF_PATCH_NAME),
	DEFINE_HOOK(&hook_InternetReadFileExA, HF_TYPE_IAT | HF_PATCH_NAME),
	DEFINE_HOOK(&hook_InternetReadFileExW, HF_TYPE_IAT | HF_PATCH_NAME),
	DEFINE_HOOK(&hook_HttpSendRequestA, HF_TYPE_IAT | HF_PATCH_NAME),
	DEFINE_HOOK(&hook_HttpSendRequestW, HF_TYPE_IAT | HF_PATCH_NAME),
	DEFINE_HOOK(&hook_HttpQueryInfoA, HF_TYPE_IAT | HF_PATCH_NAME),
	DEFINE_HOOK(&hook_HttpQueryInfoW, HF_TYPE_IAT | HF_PATCH_NAME),
	DEFINE_HOOK(&hook_HttpAddRequestHeadersA, HF_TYPE_IAT | HF_PATCH_NAME),
	DEFINE_HOOK(&hook_HttpAddRequestHeadersW, HF_TYPE_IAT | HF_PATCH_NAME),
	DEFINE_HOOK(&hook_InternetConnectA, HF_TYPE_IAT | HF_PATCH_NAME),
	DEFINE_HOOK(&hook_InternetConnectW, HF_TYPE_IAT | HF_PATCH_NAME),
	DEFINE_HOOK(&hook_InternetQueryDataAvailable, HF_TYPE_IAT | HF_PATCH_NAME),
#ifdef _IE_DISABLE_REDIRECT
	DEFINE_HOOK(&hook_HttpOpenRequestW, HF_TYPE_IAT | HF_PATCH_NAME),
#endif
Пример #2
0
/*! \brief Create the (gschem core hook) Scheme module.
 * \par Function Description
 * Defines some hooks in the (gschem core hook) module.  These hooks
 * allow Scheme callbacks to be triggered on certain gschem actions.
 * For a description of the arguments and behaviour of these hooks,
 * please see ../scheme/gschem/hook.scm.
 */
static void
init_module_gschem_core_hook ()
{

#include "g_hook.x"

#define DEFINE_HOOK(name) \
  do { \
    scm_c_define (name, scm_make_hook (scm_from_int (1)));      \
    scm_c_export (name, NULL); \
  } while (0)

  DEFINE_HOOK ("%add-objects-hook");
  DEFINE_HOOK ("%remove-objects-hook");
  DEFINE_HOOK ("%move-objects-hook");
  DEFINE_HOOK ("%mirror-objects-hook");
  DEFINE_HOOK ("%rotate-objects-hook");
  DEFINE_HOOK ("%paste-objects-hook");
  DEFINE_HOOK ("%attach-attribs-hook");
  DEFINE_HOOK ("%detach-attribs-hook");
  DEFINE_HOOK ("%select-objects-hook");
  DEFINE_HOOK ("%deselect-objects-hook");
  DEFINE_HOOK ("%new-page-hook");
}
Пример #3
0
/*! \brief Create the (gschem core hook) Scheme module.
 * \par Function Description
 * Defines some hooks in the (gschem core hook) module.  These hooks
 * allow Scheme callbacks to be triggered on certain gschem actions.
 * For a description of the arguments and behaviour of these hooks,
 * please see ../scheme/gschem/hook.scm.
 */
static void
init_module_gschem_core_hook ()
{

#include "g_hook.x"

#define DEFINE_HOOK(name,arity)                      \
  do { \
    scm_c_define (name, scm_make_hook (scm_from_int (arity)));      \
    scm_c_export (name, NULL); \
  } while (0)

  DEFINE_HOOK ("%add-objects-hook",1);
  DEFINE_HOOK ("%copy-objects-hook",1);
  DEFINE_HOOK ("%remove-objects-hook",1);
  DEFINE_HOOK ("%move-objects-hook",1);
  DEFINE_HOOK ("%mirror-objects-hook",1);
  DEFINE_HOOK ("%rotate-objects-hook",1);
  DEFINE_HOOK ("%paste-objects-hook",1);
  DEFINE_HOOK ("%attach-attribs-hook",1);
  DEFINE_HOOK ("%detach-attribs-hook",1);
  DEFINE_HOOK ("%select-objects-hook",1);
  DEFINE_HOOK ("%deselect-objects-hook",1);
  DEFINE_HOOK ("%new-page-hook",1);
  DEFINE_HOOK ("%action-property-hook",3);
  DEFINE_HOOK ("%bind-keys-hook",3);
}