UnregisterClass (class,0) is legal

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

 



I don't know the details (because of course Microsoft don't tell us) but it
is possible to unregister a class using a hInstance of 0.
 <<diff30.txt>> 
Bill Medland (medbi01@accpac.com)
It is legal to call UnregisterClass with an hInstance of zero.

Index: wine/windows/class.c
===================================================================
RCS file: /home/wine/wine/windows/class.c,v
retrieving revision 1.43
diff -u -r1.43 class.c
--- wine/windows/class.c	2001/11/16 18:11:43	1.43
+++ wine/windows/class.c	2001/11/19 19:30:39
@@ -409,7 +409,7 @@
     USER_Lock();
     if (atom &&
         (classPtr = CLASS_FindClassByAtom( atom, hInstance )) &&
-        (classPtr->hInstance == hInstance))
+        (!hInstance || classPtr->hInstance == hInstance))
     {
         ret = CLASS_FreeClass( classPtr );
     }

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

  Powered by Linux