"Roderick Colenbrander" thunderbird2k@gmx.net writes:
+static ULONG WINAPI DI8CF_AddRef(LPCLASSFACTORY iface) {
- LockModule();
- return 2;
+}
+static ULONG WINAPI DI8CF_Release(LPCLASSFACTORY iface) {
- UnlockModule();
- return 1;
+}
You need to track the lifetime of the created objects with LockModule, not the refcount of the class factory, that's useless.