]> git.cworth.org Git - apitrace/blobdiff - trace.py
Define all D2D/DWRITE GUIDs
[apitrace] / trace.py
index 831af98640fb6970f143060fd430adf0939eee6d..bd977724484de670baffa9f5b2305531f4edc0f4 100644 (file)
--- a/trace.py
+++ b/trace.py
@@ -542,9 +542,11 @@ class Tracer:
     def wrapIid(self, riid, out):
             print '    if (%s && *%s) {' % (out.name, out.name)
             print '        if (*%s == m_pInstance) {' % (out.name,)
+            print '            AddRef();'
+            print '            m_pInstance->Release();'
             print '            *%s = this;' % (out.name,)
             print '        }'
-            for iface in self.api.interfaces:
+            for iface in self.api.getAllInterfaces():
                 print r'        else if (%s == IID_%s) {' % (riid.name, iface.name)
                 print r'            *%s = new Wrap%s((%s *) *%s);' % (out.name, iface.name, iface.name, out.name)
                 print r'        }'