I am using a minimally modified version of the "A basic Windows service in C++" sample, located here: https://code.msdn.microsoft.com/windows ... e-cacf4948
The Service compiles and runs fine. At this point, the Service is just the Service skeleton provided by that sample. I'm trying to add logic that locates my wxWidgets application, but am having zero luck...
I have tried both EnumWindows() and EnumDesktopWindows() with different Service Users ("LocalSystem", "NT AUTHORITY\\LocalService", & my own account) and in every case a series of window names are generated, but no where near the actual number of desktop windows I have, and never my wxWidgets application.
I actually have one other wxWidgets app running, multiple Google Chrome browser windows, multiple ms windows cmd shells, Visual Studio, Outlook, Skype, the Event Lister, and Notepad++ (not to mention 6 different File Browser windows) and NONE of these show up in any cases of my Service's call to EnumWindows() or EnumDesktopWindows().
When trying with Service Users "LocalSystem" or "NT AUTHORITY\\LocalService" I do set the Service to interact with the desktop. Makes no difference...
I have some log messages:
Where you see "window title:" that is the output from EnumDesktopWindows(). I get the same listing from EnumWindows(). Of those 8 "windows" listed, none are my desktop applications. So, I'm confused...Just entered wmain.
Attempting Service Start...
CServiceBase::Run
CServiceBase::ServiceMain
CServiceBase::Start
window title: Windows Push Notifications Platform, window class: PushNotificationsPowerManagement
window title: CWNPTransportImpl, window class: WNPGeneric
window title: DeviceMsgListenerWnd, window class: DeviceMsgListenerWndCls
window title: CWNPTransportImpl, window class: WNPGeneric
window title: OfficePowerManagerWindow, window class: OfficePowerManagerWindow
GetWindowTextLength() returned 0! Window class: IpOverUsbDeviceNotificationWindowClass
window title: NvContainerWindowClass00000B38, window class: NvContainerWindowClass00000B38
window title: HID Input Service, window class: HidServClass
CServiceBase::Start: I think we're running!!!
Anyone have any ideas here?