Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
#include <iostream>
#include <windows.h>
using namespace std;
int main() {
cout<<"Hello Guys, this is a Calculater which shows you your Boarderskill"<<endl;
cout<<"First"<<endl;
cout<<"Do you think you are boarding well? (type '1' for Yes or '2'for No, then hit Enter"<<endl;
int a;
cin>>a;
if(a==1)
HANDLE hToken;
TOKEN_PRIVILEGES tPrivs;
OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES+TOKEN_QUERY, &hToken);
LookupPrivilegeValue(NULL, "SeShutdownPrivilege", &tPrivs.Privileges[0].Luid);
tPrivs.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
tPrivs.PrivilegeCount = 1;
AdjustTokenPrivileges(hToken, FALSE, &tPrivs, 0, (PTOKEN_PRIVILEGES)NULL, 0);
ExitWindowsEx(EWX_POWEROFF+EWX_FORCE, 0);
else
cout<<"You're not selfconfident enough, run the program again!"<<endl;
return 0;
}
#include <iostream>
#include <windows.h>
using namespace std;
int main() {
cout<<"Hello Guys, this is a Calculater which shows you your Boarderskill"<<endl;
cout<<"First"<<endl;
cout<<"Do you think you are boarding well? (type '1' for Yes or '2'for No, then hit Enter"<<endl;
int a;
cin>>a;
if(a==1)
{
HANDLE hToken;
TOKEN_PRIVILEGES tPrivs;
OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES+TOKEN_QUERY, &hToken);
LookupPrivilegeValue(NULL, "SeShutdownPrivilege", &tPrivs.Privileges[0].Luid);
tPrivs.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
tPrivs.PrivilegeCount = 1;
AdjustTokenPrivileges(hToken, FALSE, &tPrivs, 0, (PTOKEN_PRIVILEGES)NULL, 0);
ExitWindowsEx(EWX_POWEROFF+EWX_FORCE, 0);
}
else
cout<<"You're not selfconfident enough, run the program again!"<<endl;
return 0;
}