rendered paste body// ToggleService.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include <service.h>#include <string.h>int _tmain(int argc, _TCHAR* argv[]){ //if(argc < 1) //return 1; bool res = true;/* HKEY Services, myService; PWSTR thefeed; BYTE *result = (BYTE*)malloc(50); BYTE *resulta = (BYTE*)malloc(50); wchar_t resd[50]; memset(&resd, 0, sizeof(resd)); DWORD buffer; if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"Services", 0, 0, &Services) != ERROR_SUCCESS) return 1; if(RegOpenKeyEx(Services, argv[1], 0, 0, &myService) != ERROR_SUCCESS) return 1; RegQueryValueEx(myService, L"Prefix", NULL, NULL, result, &buffer); wcsncpy(resd, (wchar_t*)result, 20); wcscpy(thefeed, resd); wcscat(thefeed, L":"); RegQueryValueEx(myService, L"Index", NULL, NULL, resulta, &buffer); wcscat(thefeed, ((wchar_t*)resulta)+0x30);*/ HANDLE hnd = GetServiceHandle(L"SEN0:", 0, 0); if(hnd == INVALID_HANDLE_VALUE) ActivateService(L"HTCSENSOR", 0); else res = DeregisterService(hnd); if(res == true) return 0; return 1;}