reactos/base/applications/taskmgr/run.c
Hermès Bélusca-Maïto c706222f3f
[TASKMGR] Fix the license. Turns out it's LGPL-2.1-or-later from the texts.
Caught by Stanislav. Sorry for the oversight!
2023-06-15 19:45:23 +02:00

38 lines
1.2 KiB
C

/*
* PROJECT: ReactOS Task Manager
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
* PURPOSE: Run Task.
* COPYRIGHT: Copyright 1999-2001 Brian Palmer <brianp@reactos.org>
* Copyright 2005 Klemens Friedl <frik85@reactos.at>
*/
#include "precomp.h"
void TaskManager_OnFileNew(void)
{
HMODULE hShell32;
RUNFILEDLG RunFileDlg;
WCHAR szTitle[40];
WCHAR szText[256];
/* Load language strings from resource file */
LoadStringW(hInst, IDS_CREATENEWTASK, szTitle, sizeof(szTitle) / sizeof(szTitle[0]));
LoadStringW(hInst, IDS_CREATENEWTASK_DESC, szText, sizeof(szText) / sizeof(szText[0]));
hShell32 = LoadLibraryW(L"SHELL32.DLL");
RunFileDlg = (RUNFILEDLG)(FARPROC)GetProcAddress(hShell32, (LPCSTR)61);
/* Show "Run..." dialog */
if (RunFileDlg)
{
HICON hIcon = LoadIconW(hInst, MAKEINTRESOURCEW(IDI_TASKMANAGER));
/* NOTE - don't check whether running on win 9x or NT, let's just
assume that a unicode build only runs on NT */
RunFileDlg(hMainWnd, hIcon, NULL, szTitle, szText, RFF_CALCDIRECTORY);
DeleteObject(hIcon);
}
FreeLibrary(hShell32);
}