diff --git a/reactos/boot/bootdata/packages/reactos.dff b/reactos/boot/bootdata/packages/reactos.dff index 14498b5478a..8be8de3397e 100644 --- a/reactos/boot/bootdata/packages/reactos.dff +++ b/reactos/boot/bootdata/packages/reactos.dff @@ -509,6 +509,7 @@ modules\rosapps\templates\dialog.exe 1 optional modules\rosapps\templates\mdi.exe 1 optional modules\rosapps\winefile\winefile.exe 1 optional modules\rosapps\winver\winver.exe 1 optional +modules\rosapps\write\write.exe 1 optional modules\rostests\winetests\advapi32\advapi32_winetest.exe 7 optional modules\rostests\winetests\cabinet\cabinet_winetest.exe 7 optional modules\rostests\winetests\comctl32\comctl32_winetest.exe 7 optional diff --git a/rosapps/directory.rbuild b/rosapps/directory.rbuild index ffcec8f7821..87959c5c86b 100644 --- a/rosapps/directory.rbuild +++ b/rosapps/directory.rbuild @@ -112,4 +112,8 @@ + + + + \ No newline at end of file diff --git a/rosapps/write/En.rc b/rosapps/write/En.rc new file mode 100644 index 00000000000..5215db51dc8 --- /dev/null +++ b/rosapps/write/En.rc @@ -0,0 +1,26 @@ +/* + * English language support + * + * Copyright (C) 2007 Mikolaj Zalewski + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT + +STRINGTABLE +{ + IDS_FAILED, "Starting Wordpad failed" +} diff --git a/rosapps/write/Ko.rc b/rosapps/write/Ko.rc new file mode 100644 index 00000000000..f78ea13b286 --- /dev/null +++ b/rosapps/write/Ko.rc @@ -0,0 +1,27 @@ +/* + * Korean language support + * + * Copyright (C) 2007 Mikolaj Zalewski + * Copyright (C) 2008 YunSong Hwang(ȲÀ±¼º)(hys545@dreamwiz.com) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT + +STRINGTABLE +{ + IDS_FAILED, "¿öµåÆÐµå ½ÃÀÛ ½ÇÆÐÇÔ" +} diff --git a/rosapps/write/resources.h b/rosapps/write/resources.h new file mode 100644 index 00000000000..e99e5b19a40 --- /dev/null +++ b/rosapps/write/resources.h @@ -0,0 +1,19 @@ +/* + * Copyright 2007 Mikolaj Zalewski + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define IDS_FAILED 101 diff --git a/rosapps/write/rsrc.rc b/rosapps/write/rsrc.rc new file mode 100644 index 00000000000..cff89d934f8 --- /dev/null +++ b/rosapps/write/rsrc.rc @@ -0,0 +1,27 @@ +/* + * Copyright 2007 Mikolaj Zalewski + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include + +#include "resources.h" + +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL + +#include "En.rc" +#include "Ko.rc" diff --git a/rosapps/write/write.c b/rosapps/write/write.c new file mode 100644 index 00000000000..a6116da482a --- /dev/null +++ b/rosapps/write/write.c @@ -0,0 +1,54 @@ +/* + * Write.exe - this program only calls wordpad.exe + * + * Copyright 2007 by Mikolaj Zalewski + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define WIN32_LEAN_AND_MEAN + +#include + +#include +#include "resources.h" + +static const WCHAR SZ_BACKSLASH[] = {'\\',0}; +static const WCHAR SZ_WORDPAD[] = {'w','o','r','d','p','a','d','.','e','x','e',0}; + +int CALLBACK wWinMain(HINSTANCE hInstance, HINSTANCE hOldInstance, LPWSTR szCmdParagraph, int res) +{ + WCHAR path[MAX_PATH]; + STARTUPINFOW stinf; + PROCESS_INFORMATION info; + + if (!GetSystemDirectoryW(path, MAX_PATH - 1 - lstrlenW(SZ_WORDPAD))) + goto failed; + if (path[lstrlenW(path) - 1] != '\\') + lstrcatW(path, SZ_BACKSLASH); + lstrcatW(path, SZ_WORDPAD); + + stinf.cb = sizeof(STARTUPINFO); + GetStartupInfoW(&stinf); + + if (!CreateProcessW(path, GetCommandLineW(), NULL, NULL, FALSE, 0, NULL, NULL, &stinf, &info)) + goto failed; + return 0; + +failed: + LoadStringW(GetModuleHandle(NULL), IDS_FAILED, path, MAX_PATH); + MessageBoxW(NULL, path, NULL, MB_OK|MB_ICONERROR); + return 1; +} diff --git a/rosapps/write/write.rbuild b/rosapps/write/write.rbuild new file mode 100644 index 00000000000..53be5abd578 --- /dev/null +++ b/rosapps/write/write.rbuild @@ -0,0 +1,14 @@ + + + + . + + 0x0600 + 0x0501 + kernel32 + user32 + advapi32 + shell32 + write.c + rsrc.rc +