Hmm, I opted out for WM_COPYDATA instead. The problem is now, how does one communicate with a service if services dont have a WndProc. Does this mean that the only optional route is to use pipes instead?
EDIT: Apperently u can register a window using the bare bones. nothing but the WndProc filled into WinClassEx struct.
// Register class
WinClass.cbSize = sizeof(WNDCLASSEX);
WinClass.style = NULL;//CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
WinClass.lpfnWndProc = (WNDPROC) WndProc;
WinClass.cbClsExtra = 0;
WinClass.cbWndExtra = 0;
WinClass.hInstance = NULL;//hInstance;
WinClass.hIcon = NULL;//LoadIcon(hInstance, (LPCTSTR) "APP_ICON");
WinClass.hCursor = NULL;//LoadCursor(NULL, IDC_ARROW);
WinClass.hbrBackground = NULL;
WinClass.lpszMenuName = 0;
WinClass.lpszClassName = "bar";
WinClass.hIconSm = NULL;//LoadIcon(hInstance, (LPCTSTR) "APP_ICON");
// Register the window
HWND me = CreateWindowEx(WS_EX_APPWINDOW, "bar", "bar", WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
I have all the essential stuff commented out that would make a window usable. The fact that its 0 by 0 pixels big and doesnt even have a pointer to the instance of itself.
So if i put this in my service code, It should register the class and ill be able to send the messages into the WndProc of the service????