If the function fails, the return value is NULL. To get extended error information, call GetLastError.
This function typically fails for one of the following reasons:
an invalid parameter value
the system class was registered by a different module
the WH_CBT hook is installed and returns a failure code
the window procedure fails for WM_CREATE or WM_NCCREATE