# Function Reference

# _WinAPI_UnregisterClass

Unregisters a window class, freeing the memory required for the class

#include <WinAPISysWin.au3>
_WinAPI_UnregisterClass ( $sClass [, $hInstance = 0] )

## Parameters

$sClass | A null-terminated string or a class atom. If $sClass is a string, it specifies the window class name. This class name must have been registered by a previous call to the _WinAPI_RegisterClass() or _WinAPI_RegisterClassEx() function. If this parameter is an atom, it must be in the low-order word of $sClass; the high-order word must be zero.
$hInstance | [optional] Handle to the instance of the module that created the class.

## Return Value

Success: | True
Failure: | False

## Remarks

Before calling this function, an application must destroy all windows created with the specified class.
All window classes that an application registers are unregistered when it terminates.

## Related

_WinAPI_RegisterClass, _WinAPI_RegisterClassEx

## See Also

Search UnregisterClass in MSDN Library.