Question about controlling Windows Services
-
The current header file i have (Winsvc.h) neither contain a definition of the structure "SERVICE_STATUS_PROCESS" nor the function "QueryServiceStatusEx(...)". I am using Visual C++ 6.0. Can any body help me with that? Best Regards, Simos
softgrid wrote:
The current header file i have (Winsvc.h) neither contain a definition of the structure "SERVICE_STATUS_PROCESS" nor the function "QueryServiceStatusEx(...)". I am using Visual C++ 6.0. Can any body help me with that?
Well the documentation says this...
Requirements
Windows NT/2000/XP: Included in Windows 2000 and later.
Header: Declared in Winsvc.h; include Windows.h.
Nibu thomas A Developer Programming tips[^] My site[^]
-
The current header file i have (Winsvc.h) neither contain a definition of the structure "SERVICE_STATUS_PROCESS" nor the function "QueryServiceStatusEx(...)". I am using Visual C++ 6.0. Can any body help me with that? Best Regards, Simos
Download and install a NEWER version of the Platform SDK and make VC point at the new libs and headers - your problem will be solved. The original VC++ headers and libs were out before some of these newer functions, so it is not found in the WinSvc.H that you posess. If you DO find it in your header, check for it bracketed by a WIN32 definition. You need to do something like #define _WIN32 0x0501 or some such value to make it visible. They did this so you could target backlevel versions of OS with a build and be warned if you were 'linking' to functions that did not exist at the time.
Any sufficiently gross incompetence is nearly indistinguishable from malice.