Hi there, I'm in the starting process of making my first game engine, and I've got the code to make a basic window, but for some reason, I cant seem to get my CreateWindow function to work. It keeps failing. I added in a bit of Error handling code, and this is the reason I get:

"CreateWindow() failed with error 8: Not enough storage is available to process this command."

What are the reasons for this error message and failure of CreateWindow? The only one I am aware of, is there are not enough handles available so it fails, but I've excluded that idea, because I've rebooted my computer numerous times to refresh windows, but to no avail. Here is the code where I try to set up and create the window:

Code:
Engine::Engine(EngineConfig *config)
{
	m_Loaded = false; 

	m_pConfig = new EngineConfig;
	if (config)
		memcpy(m_pConfig, config, sizeof(EngineConfig));

	g_pEngine = this;

	WNDCLASSEX wc;
	wc.cbSize        = sizeof( WNDCLASSEX );
	wc.style         = CS_CLASSDC;
	wc.lpfnWndProc   = WndProc;
	wc.cbClsExtra    = 0;
	wc.cbWndExtra    = 0;
	wc.hInstance     = m_pConfig->hInstance;
	wc.hIcon         = LoadIcon( NULL, IDI_APPLICATION );
	wc.hCursor       = LoadCursor( NULL, IDC_ARROW );
	wc.hbrBackground = NULL;
	wc.lpszMenuName  = NULL;
	wc.lpszClassName = "WindowClass";
	wc.hIconSm       = LoadIcon( NULL, IDI_APPLICATION );

	// Check for class registration failure
	if (FAILED(RegisterClassEx(&wc)))
	{
		ShowError("RegisterClassEx()");
		m_Loaded = false;
		return;
	}

	CoInitializeEx(0, COINIT_MULTITHREADED);


	m_Window = CreateWindow("WindowClass", m_pConfig->name, WS_OVERLAPPED, 
							0, 0, 800, 600, NULL, NULL, 
							0, NULL );
	// Check for CreateWindow Failure
	if (!m_Window)
	{
		ShowError("CreateWindow()");
		m_Loaded = false;
		return;
	}

	// We're loaded and ready to go!
	m_Loaded = true;
}
I would appreciate any help