Exemplo n.º 1
0
VOID RequestElevation()
{
	if(IsElevated())
		return;

	if(!xmrstak::params::inst().allowUAC)
	{
		printer::inst()->print_msg(L0, "The miner needs to run as administrator, but you passed --noUAC option. Please remove it or set use_slow_memory to always.");
		win_exit();
		return;
	}

	SelfElevate(xmrstak::params::inst().minerArg0, xmrstak::params::inst().minerArgs);
}
Exemplo n.º 2
0
int PASCAL 
WinMain(HANDLE hInstance, HANDLE hPrevInstance, LPSTR lpszCmdLine, int cmdShow)
{
	WNDCLASS wndclass;

	char modulename[MAXSTR];

	/* Initialize the list of open Windows devices */
	gdev_win_open_list = 0;

	/* copy the hInstance into a variable so it can be used */
	phInstance = hInstance;

        /* start up the text window */
	_ScreenSize.y = 50;
	_InitEasyWin();

	/* fix up the EasyWindows window provided by Borland */
	GetModuleFileName(hInstance, (LPSTR) modulename, MAXSTR);
	hwndeasy = FindWindow("BCEasyWin", modulename);
	SetWindowText(hwndeasy, szAppName);            /* change title */
	SetClassWord(hwndeasy, GCW_HICON, LoadIcon(hInstance, "texticon"));

	/* if this is the first Ghostscript then register the window class */
	/* for graphics */
	if (!hPrevInstance) {
		wndclass.style = CS_HREDRAW | CS_VREDRAW;
		wndclass.lpfnWndProc = WndProc;
		wndclass.cbClsExtra = 0;
		wndclass.cbWndExtra = 0;
		wndclass.hInstance = hInstance;
		wndclass.hIcon = LoadIcon(hInstance,"grpicon");
		wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
		wndclass.hbrBackground = GetStockObject(WHITE_BRUSH);
		wndclass.lpszMenuName = NULL;
		wndclass.lpszClassName = szAppName;
		RegisterClass(&wndclass);
	}

	(void) atexit(win_exit); /* setup exit handler */

	main(_argc, _argv, environ);

	/* never reached */
	win_exit(); 
	return 0;
}
Exemplo n.º 3
0
void	make_ku(t_lx *mlx)
{
  if (mlx->or[NO] == 1)
    {
      if (mlx->map[mlx->y - 1][mlx->x] == 0)
	mlx->y--;
      else if (mlx->map[mlx->y - 1][mlx->x] == 2)
	win_exit(mlx);
    }
  else if (mlx->or[NE] == 1)
    {
      if (mlx->map[mlx->y - 1][mlx->x + 1] == 0)
	{
	  mlx->x++;
	  mlx->y--;
	}
    }
  else if (mlx->or[EA] == 1)
    {
      if (mlx->map[mlx->y][mlx->x + 1] == 0)
	mlx->x++;
    }
  make_ku_2(mlx);
}