PATCH: typelib debug/invoke

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

License: LGPL
Changelog:
	Added some debugoutput functions for TYPEATTR, IDLDESC, VARDESC.
	Support more parameters in _invoke (needed for
	IDispatch::Invoke in the marshaller)

Index: typelib.c
===================================================================
RCS file: /home/wine/wine/dlls/oleaut32/typelib.c,v
retrieving revision 1.70
diff -u -r1.70 typelib.c
--- typelib.c	4 Jun 2002 00:50:11 -0000	1.70
+++ typelib.c	7 Jun 2002 22:06:01 -0000
@@ -878,14 +878,14 @@
     }
 }
 
-static void dump_ELEMDESC(ELEMDESC *edesc) {
+void dump_ELEMDESC(ELEMDESC *edesc) {
   char buf[200];
   dump_TypeDesc(&edesc->tdesc,buf);
   MESSAGE("\t\ttdesc.vartype %d (%s)\n",edesc->tdesc.vt,buf);
   MESSAGE("\t\tu.parmadesc.flags %x\n",edesc->u.paramdesc.wParamFlags);
   MESSAGE("\t\tu.parmadesc.lpex %p\n",edesc->u.paramdesc.pparamdescex);
 }
-static void dump_FUNCDESC(FUNCDESC *funcdesc) {
+void dump_FUNCDESC(FUNCDESC *funcdesc) {
   int i;
   MESSAGE("memid is %08lx\n",funcdesc->memid);
   for (i=0;i<funcdesc->cParams;i++) {
@@ -920,6 +920,45 @@
   MESSAGE("\tcParamsOpt: %d\n", funcdesc->cParamsOpt);
   MESSAGE("\twFlags: %x\n", funcdesc->wFuncFlags);
 }
+
+void dump_IDLDESC(IDLDESC *idl) {
+  MESSAGE("\t\twIdlflags: %d\n",idl->wIDLFlags);
+}
+
+static char * typekind_desc[] =
+{
+	"TKIND_ENUM",
+	"TKIND_RECORD",
+	"TKIND_MODULE",
+	"TKIND_INTERFACE",
+	"TKIND_DISPATCH",
+	"TKIND_COCLASS",
+	"TKIND_ALIAS",
+	"TKIND_UNION",
+	"TKIND_MAX"
+};
+
+void dump_TYPEATTR(TYPEATTR *tattr) {
+  char buf[200];
+  MESSAGE("\tguid: %s\n",debugstr_guid(&tattr->guid));
+  MESSAGE("\tlcid: %ld\n",tattr->lcid);
+  MESSAGE("\tmemidConstructor: %ld\n",tattr->memidConstructor);
+  MESSAGE("\tmemidDestructor: %ld\n",tattr->memidDestructor);
+  MESSAGE("\tschema: %s\n",debugstr_w(tattr->lpstrSchema));
+  MESSAGE("\tsizeInstance: %ld\n",tattr->cbSizeInstance);
+  MESSAGE("\tkind:%s\n", typekind_desc[tattr->typekind]);
+  MESSAGE("\tcFuncs: %d\n", tattr->cFuncs);
+  MESSAGE("\tcVars: %d\n", tattr->cVars);
+  MESSAGE("\tcImplTypes: %d\n", tattr->cImplTypes);
+  MESSAGE("\tcbSizeVft: %d\n", tattr->cbSizeVft);
+  MESSAGE("\tcbAlignment: %d\n", tattr->cbAlignment);
+  MESSAGE("\twTypeFlags: %d\n", tattr->wTypeFlags);
+  MESSAGE("\tVernum: %d.%d\n", tattr->wMajorVerNum,tattr->wMinorVerNum);
+  dump_TypeDesc(&tattr->tdescAlias,buf);
+  MESSAGE("\ttypedesc: %s\n", buf);
+  dump_IDLDESC(&tattr->idldescType);
+}
+
 static void dump_TLBFuncDescOne(TLBFuncDesc * pfd)
 {
   int i;
@@ -1076,19 +1115,6 @@
     }
 }
 
-static char * typekind_desc[] =
-{
-	"TKIND_ENUM",
-	"TKIND_RECORD",
-	"TKIND_MODULE",
-	"TKIND_INTERFACE",
-	"TKIND_DISPATCH",
-	"TKIND_COCLASS",
-	"TKIND_ALIAS",
-	"TKIND_UNION",
-	"TKIND_MAX"
-};
-
 static void dump_TypeInfo(ITypeInfoImpl * pty)
 {
     TRACE("%p ref=%u\n", pty, pty->ref);
@@ -1103,6 +1129,16 @@
     dump_TLBImplType(pty->impltypelist);
 }
 
+void dump_VARDESC(VARDESC *v)
+{
+    MESSAGE("memid %d\n",v->memid);
+    MESSAGE("lpstrSchema %s\n",debugstr_w(v->lpstrSchema));
+    MESSAGE("oInst %d\n",v->u.oInst);
+    dump_ELEMDESC(&(v->elemdescVar));
+    MESSAGE("wVarFlags %lx\n",v->wVarFlags);
+    MESSAGE("varkind %d\n",v->varkind);
+}
+
 static TYPEDESC stndTypeDesc[VT_LPWSTR+1]=
 {
     /* VT_LPWSTR is largest type that */
@@ -4010,6 +4046,16 @@
 	case 7: {
 		DWORD (WINAPI *xfunc)(DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD) = func;
 		res = xfunc(args[0],args[1],args[2],args[3],args[4],args[5],args[6]);
+		break;
+	}
+	case 8: {
+		DWORD (WINAPI *xfunc)(DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD) = func;
+		res = xfunc(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7]);
+		break;
+	}
+	case 9: {
+		DWORD (WINAPI *xfunc)(DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD) = func;
+		res = xfunc(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8]);
 		break;
 	}
 	default:


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux