I'm trying to make a Windows application but I get the error in the title.

I am running Windows XP Professional and using VC++ 2008.

Here is how I call my code:

WNDCLASSEX wcex;

    wcex.cbSize        = sizeof(WNDCLASSEX);
    wcex.style         = 0;
    wcex.lpfnWndProc   = WndProc;
    wcex.cbClsExtra    = 0;
    wcex.cbWndExtra    = 0;
	wcex.hInstance     = windowinfo.hInstance;
    wcex.hIcon         = NULL;
    wcex.hCursor       = LoadCursor(NULL, IDC_ARROW);

        wcex.hbrBackground	= (HBRUSH)(COLOR_WINDOW+1);

	wcex.lpszMenuName	= 0;
	wcex.lpszClassName	= L"Engine_Window";
	wcex.hIconSm		= 0;

	RegisterClassEx(&wcex);

	RECT clientSize;
	clientSize.top = 0;
	clientSize.left = 0;
	clientSize.right = 800;
	clientSize.bottom = 600;

	DWORD style = WS_POPUP | WS_SYSMENU | WS_BORDER | WS_CAPTION | WS_CLIPCHILDREN | WS_CLIPSIBLINGS;

	windowinfo.hWnd = CreateWindowEx(0, L"Engine_Window", L"Quarantine Engine",
		style, windowLeft, windowTop, realWidth, realHeight, NULL, NULL, windowinfo.hInstance, NULL);

I supose your project is WIN32 and you include windows.h (winuser.h)?!?

Yes, it's a Win32 DLL project, and I've included windows.h.

That is just shoot in the dark, but check your RegisterClassEx function.
DLL must unregister its classes when it is unloaded.

What should I check for in RegisterClassEx?

When I look at the return value of CreateWindow it returns an error code meaning "Paramater not correct" so I checked the return of RegisterClassEx and it returned an error code meaning "System cannot find the file specified" any ideas?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.