Snooping on second instance

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Thu Jul 12 16:05:48 CDT 2001


Hallo,

it seems that we should not overwrite values gather in an earlier call to
SNOOP_GetProcAddress. So if an earlier call initialized it ( visible by
fun->name !=0 ), leave the entries as is.

Changelog:
	relay32/snoop.c: SNOOP_GetProcAddress
	Don't touch already initialized fun-entries

Bye
-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

===File /spare/bon/snoop.patch==============================
Index: wine/relay32/snoop.c
===================================================================
RCS file: /home/wine/wine/relay32/snoop.c,v
retrieving revision 1.42
diff -u -r1.42 snoop.c
--- wine/relay32/snoop.c	2001/05/24 18:43:16	1.42
+++ wine/relay32/snoop.c	2001/07/12 20:58:31
@@ -194,12 +194,15 @@
 		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);
 }
 
============================================================




More information about the wine-patches mailing list