46 L"SOFTWARE\\Microsoft\\Shared Tools\\MSConfig",
47 L"HideEssentialServiceWarning",
58 L"SOFTWARE\\Microsoft\\Shared Tools\\MSConfig",
59 L"HideEssentialServiceWarning",
138 DWORD dwType = 0, dwBufSize = 0;
174 DWORD dwStartType = 0;
180 pContextParams->
time = disableDate;
201 if (hService ==
NULL)
204 DWORD dwBytesNeeded = 0;
209 if (!lpServiceConfig)
224 unsigned int argc = 0;
253 if (bHideOSVendorServices)
272 bAddServiceToList =
TRUE;
273 bIsModifiedService =
TRUE;
279 if (!bAddServiceToList)
281 if (!bIsServiceEnabled)
284 KeysQueryTable[0].
QueryRoutine = GetRegistryKeyedDisabledServicesQueryRoutine;
288 bAddServiceToList =
params.bIsPresent;
293 ValuesQueryTable[0].
QueryRoutine = GetRegistryValuedDisabledServicesQueryRoutine;
297 bAddServiceToList =
params.bIsPresent;
302 bAddServiceToList =
TRUE;
306 if (bAddServiceToList)
318 if (!lpServiceFailureActions)
332 ( lpServiceFailureActions &&
333 (lpServiceFailureActions->
cActions >= 1) &&
338 MemFree(lpServiceFailureActions);
362 if (!bIsServiceEnabled)
394 delete reinterpret_cast<ServiceItem*
>(lvitem.lParam);
395 lvitem.lParam =
NULL;
419 DWORD dwBytesNeeded = 0;
420 DWORD dwNumServices = 0;
434 for (
DWORD i = 0 ;
i < dwNumServices ; ++
i)
460 size_t itemLength = 0;
513 pSvcItem =
reinterpret_cast<ServiceItem*
>(truc.lParam);
526 if (bOldState == bNewState)
533 if (bNewState ==
FALSE)
537 else if (bNewState ==
TRUE)
546 OutputDebugString(
_T(
"(1) \"WTF: What The Fukhurmajalmahamadahaldeliya ?!\" (The Dictator, Sacha Baron Cohen)\n"));
552 if (bNewState ==
TRUE)
556 else if (bNewState ==
FALSE)
565 OutputDebugString(
_T(
"(2) \"WTF: What The Fukhurmajalmahamadahaldeliya ?!\" (The Dictator, Sacha Baron Cohen)\n"));
594#define OP(a, b) ((a) == (b) ? (a) : 2)
599 uRootCheckState =
OP(uRootCheckState,
temp);
602 if (uRootCheckState == 0)
607 else if (uRootCheckState == 1)
612 else if (uRootCheckState == 2)
646 size_t itemLength = 0;
910 if (hService ==
NULL)
916 DWORD dwBytesNeeded = 0;
921 if (!lpServiceConfig)
934 KeysQueryTable[0].
QueryRoutine = GetRegistryKeyedDisabledServicesQueryRoutine;
941 ValuesQueryTable[0].
QueryRoutine = GetRegistryValuedDisabledServicesQueryRoutine;
949 ChangeServiceConfigW(hService,
SERVICE_NO_CHANGE,
params.dwStartType,
SERVICE_NO_CHANGE,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL);
954 CAtlStringW serviceRegKey(
L"SOFTWARE\\Microsoft\\Shared Tools\\MSConfig\\services\\");
955 serviceRegKey += svcName;
999 ChangeServiceConfigW(hService,
SERVICE_NO_CHANGE,
SERVICE_DISABLED,
SERVICE_NO_CHANGE,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL);
1002 CAtlStringW serviceRegKey(
L"SOFTWARE\\Microsoft\\Shared Tools\\MSConfig\\services\\");
1003 serviceRegKey += svcName;
#define IDC_BTN_SERVICES_ACTIVATE
#define IDS_SERVICES_STATUS_STOPPED
#define IDS_SERVICES_COLUMN_VENDOR
#define IDS_SERVICES_COLUMN_SERVICE
#define IDS_SERVICES_COLUMN_REQ
#define IDC_SERVICES_LIST
#define IDC_BTN_SERVICES_DEACTIVATE
#define IDS_SERVICES_STATUS_RUNNING
#define IDS_SERVICES_COLUMN_STATUS
BOOL ListView_SortEx(HWND hListView, int iSortingColumn, int iSortedColumn)
#define IDD_REQUIRED_SERVICES_DISABLING_DIALOG
#define IDS_SERVICES_COLUMN_DATEDISABLED
#define IDC_CBX_REQSVCSDIS_NO_MSG_ANYMORE
#define IDC_STATIC_REQSVCSDIS_INFO
#define IDC_CBX_SERVICES_MASK_PROPRIETARY_SVCS
#define IDC_STATIC_SERVICES_WARNING
LPWSTR FormatDateTime(IN LPSYSTEMTIME pDateTime)
BOOL MemFree(IN PVOID lpMem)
VOID FreeDateTime(IN LPWSTR lpszDateTime)
PVOID MemAlloc(IN DWORD dwFlags, IN SIZE_T dwBytes)
LPWSTR GetExecutableVendor(IN LPCWSTR lpszFilename)
#define LoadResourceString(hInst, uID)
#define RegCloseKey(hKey)
#define UM_CHECKSTATECHANGE
LONG WINAPI RegDeleteKeyW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey)
VOID WINAPI GetLocalTime(OUT LPSYSTEMTIME lpSystemTime)
static const WCHAR AddService[]
DWORD FormatString(DWORD dwFlags, HINSTANCE hInstance, DWORD dwStringId, DWORD dwLanguageId, LPWSTR lpBuffer, DWORD nSize, va_list *Arguments)
GLenum const GLfloat * params
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_In_ GUID _In_ PVOID ValueData
static const struct newhuff ht[]
#define ListView_Sort(hListView, iSortingColumn)
#define PSN_QUERYINITIALFOCUS
const LPCWSTR IDS_WINDOWS
const LPCWSTR IDS_MICROSOFT
BOOL bIsPreVistaOSVersion
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ PNDIS_STRING SubKeyName
_In_ PCWSTR _Inout_ _At_ QueryTable EntryContext
#define REG_OPTION_NON_VOLATILE
#define UNREFERENCED_PARAMETER(P)
#define PropSheet_Changed(d, w)
#define PropSheet_CancelToClose(d)
#define ListView_InsertItem(hwnd, pitem)
#define ListView_SetItemState(hwndLV, i, data, mask)
#define ListView_InsertColumn(hwnd, iCol, pcol)
#define ListView_SetCheckState(hwndLV, i, fCheck)
#define ListView_GetNextItem(hwnd, i, flags)
#define ListView_SubItemHitTest(hwnd, plvhti)
#define LVS_EX_CHECKBOXES
#define LVS_EX_FULLROWSELECT
#define ListView_SetExtendedListViewStyle(hwndLV, dw)
#define ListView_GetSelectionMark(hwnd)
#define ListView_DeleteAllItems(hwnd)
#define ListView_SetItemText(hwndLV, i, iSubItem_, pszText_)
#define ListView_GetCheckState(hwndLV, i)
#define LVHT_ONITEMSTATEICON
#define ListView_GetItem(hwnd, pitem)
#define ListView_GetExtendedListViewStyle(hwndLV)
LRESULT RegQueryRegistryKeys(IN HKEY hRootKey, IN LPCWSTR KeyName, IN PQUERY_REGISTRY_KEYS_TABLE QueryTable, IN PVOID Context)
LRESULT RegQueryRegistryValues(IN HKEY hRootKey, IN LPCWSTR KeyName, IN PQUERY_REGISTRY_VALUES_TABLE QueryTable, IN PVOID Context)
LONG RegSetDWORDValue(IN HKEY hKey, IN LPCWSTR lpSubKey OPTIONAL, IN LPCWSTR lpValue OPTIONAL, IN BOOL bCreateKeyIfDoesntExist, IN DWORD dwData)
LONG RegGetDWORDValue(IN HKEY hKey, IN LPCWSTR lpSubKey OPTIONAL, IN LPCWSTR lpValue OPTIONAL, OUT LPDWORD lpData OPTIONAL)
#define QUERY_REGISTRY_VALUES_ROUTINE(fnName)
#define QUERY_REGISTRY_KEYS_ROUTINE(fnName)
SC_HANDLE WINAPI OpenSCManagerW(LPCWSTR lpMachineName, LPCWSTR lpDatabaseName, DWORD dwDesiredAccess)
SC_HANDLE WINAPI OpenServiceW(SC_HANDLE hSCManager, LPCWSTR lpServiceName, DWORD dwDesiredAccess)
BOOL WINAPI QueryServiceConfigW(SC_HANDLE hService, LPQUERY_SERVICE_CONFIGW lpServiceConfig, DWORD cbBufSize, LPDWORD pcbBytesNeeded)
BOOL WINAPI ChangeServiceConfigW(SC_HANDLE hService, DWORD dwServiceType, DWORD dwStartType, DWORD dwErrorControl, LPCWSTR lpBinaryPathName, LPCWSTR lpLoadOrderGroup, LPDWORD lpdwTagId, LPCWSTR lpDependencies, LPCWSTR lpServiceStartName, LPCWSTR lpPassword, LPCWSTR lpDisplayName)
BOOL WINAPI EnumServicesStatusExW(SC_HANDLE hSCManager, SC_ENUM_TYPE InfoLevel, DWORD dwServiceType, DWORD dwServiceState, LPBYTE lpServices, DWORD cbBufSize, LPDWORD pcbBytesNeeded, LPDWORD lpServicesReturned, LPDWORD lpResumeHandle, LPCWSTR pszGroupName)
BOOL WINAPI CloseServiceHandle(SC_HANDLE hSCObject)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_CRTIMP wchar_t *__cdecl wcsncpy(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
_Check_return_ _CRTIMP size_t __cdecl wcscspn(_In_z_ const wchar_t *_Str, _In_z_ const wchar_t *_Control)
DWORD GetServicesActivation(VOID)
static void UpdateBtnStates(HWND hDlg)
static HWND hServicesListCtrl
BOOL HideEssentialServiceWarning(VOID)
static CAtlList< CAtlStringW > userModificationsList
INT_PTR CALLBACK RequiredServicesDisablingDialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
static BOOL RegisterNoMsgAnymore(VOID)
BOOL SetServicesActivation(DWORD dwState)
static HWND hServicesPage
static void ClearServicesList(void)
static BOOL ValidateItem(int index, BOOL bNewState, BOOL bDisplayErrors)
static BOOL bMaskProprietarySvcs
INT_PTR CALLBACK ServicesPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
LPTSTR FindSubStrI(LPCTSTR str, LPCTSTR strSearch)
ServiceItem(const LPCWSTR lpszSvcName, BOOL bIsEnabled, BOOL bIsRequired)
CAtlStringW m_lpszSvcName
PQUERY_REGISTRY_KEYS_ROUTINE QueryRoutine
PQUERY_REGISTRY_VALUES_ROUTINE QueryRoutine
HRESULT WINAPI SetWindowTheme(_In_ HWND hwnd, _In_ LPCWSTR pszSubAppName, _In_ LPCWSTR pszSubIdList)
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ ULONG _Out_opt_ PULONG _Out_opt_ PULONG ValueType
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ ULONG ValueLength
#define OutputDebugString
#define Button_GetCheck(hwndCtl)
#define HKEY_LOCAL_MACHINE
#define HKEY_CURRENT_USER
#define SERVICE_STATE_ALL
LPENUM_SERVICE_STATUS_PROCESSA LPENUM_SERVICE_STATUS_PROCESS
LPSERVICE_FAILURE_ACTIONSA LPSERVICE_FAILURE_ACTIONS
#define SC_MANAGER_ENUMERATE_SERVICE
#define SERVICE_NO_CHANGE
#define SERVICE_CHANGE_CONFIG
QUERY_SERVICE_CONFIGA * LPQUERY_SERVICE_CONFIG
#define SERVICE_CONFIG_FAILURE_ACTIONS
#define QueryServiceConfig2
#define SC_MANAGER_ALL_ACCESS
#define SERVICE_QUERY_CONFIG
DWORD WINAPI GetMessagePos(void)
#define GetWindowTextLength
#define DialogBoxW(i, t, p, f)
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
HWND WINAPI GetParent(_In_ HWND)
#define MB_ICONINFORMATION
#define MAKEINTRESOURCEW(i)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)