From 574a10efb770cc09f69e0e4f366f2276a711d7ea Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Sat, 14 Jul 2001 00:43:57 +0000 Subject: [PATCH] SNOOP_GetProcAddress: don't touch already initialized fun-entries. --- relay32/snoop.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/relay32/snoop.c b/relay32/snoop.c index 56c9fea4ca5..2dcadd99912 100644 --- a/relay32/snoop.c +++ b/relay32/snoop.c @@ -194,12 +194,15 @@ SNOOP_GetProcAddress(HMODULE hmod,LPCSTR name,DWORD ordinal,FARPROC origfun) { return origfun; assert(ordinal < dll->nrofordinals); fun = dll->funs+ordinal; - if (!fun->name) fun->name = HEAP_strdupA(GetProcessHeap(),0,name); - fun->lcall = 0xe8; - /* NOTE: origreturn struct member MUST come directly after snoopentry */ - fun->snoopentry = (char*)SNOOP_Entry-((char*)(&fun->nrofargs)); - fun->origfun = origfun; - fun->nrofargs = -1; + if (!fun->name) + { + fun->name = HEAP_strdupA(GetProcessHeap(),0,name); + fun->lcall = 0xe8; + /* NOTE: origreturn struct member MUST come directly after snoopentry */ + fun->snoopentry = (char*)SNOOP_Entry-((char*)(&fun->nrofargs)); + fun->origfun = origfun; + fun->nrofargs = -1; + } return (FARPROC)&(fun->lcall); }