mirror of
https://github.com/reactos/wine.git
synced 2024-11-24 12:20:07 +00:00
write.exe: Add a new program that calls wordpad.exe.
This commit is contained in:
parent
cb8a0dd70d
commit
2777a94d4e
2
.gitignore
vendored
2
.gitignore
vendored
@ -936,6 +936,8 @@ programs/wordpad/rsrc.res
|
||||
programs/wordpad/toolbar.bmp
|
||||
programs/wordpad/wordpad
|
||||
programs/wordpad/wordpad.ico
|
||||
programs/write/rsrc.res
|
||||
programs/write/write
|
||||
programs/xcopy/rsrc.res
|
||||
programs/xcopy/xcopy
|
||||
server/wineserver
|
||||
|
@ -493,6 +493,7 @@ ALL_MAKEFILES = \
|
||||
programs/winhelp/Makefile \
|
||||
programs/winver/Makefile \
|
||||
programs/wordpad/Makefile \
|
||||
programs/write/Makefile \
|
||||
programs/xcopy/Makefile \
|
||||
server/Makefile \
|
||||
tools/Makefile \
|
||||
@ -856,6 +857,7 @@ programs/winevdm/Makefile: programs/winevdm/Makefile.in programs/Makeprog.rules
|
||||
programs/winhelp/Makefile: programs/winhelp/Makefile.in programs/Makeprog.rules
|
||||
programs/winver/Makefile: programs/winver/Makefile.in programs/Makeprog.rules
|
||||
programs/wordpad/Makefile: programs/wordpad/Makefile.in programs/Makeprog.rules
|
||||
programs/write/Makefile: programs/write/Makefile.in programs/Makeprog.rules
|
||||
programs/xcopy/Makefile: programs/xcopy/Makefile.in programs/Makeprog.rules
|
||||
server/Makefile: server/Makefile.in Make.rules
|
||||
tools/Makefile: tools/Makefile.in Make.rules
|
||||
|
3
configure
vendored
3
configure
vendored
@ -20936,6 +20936,8 @@ ac_config_files="$ac_config_files programs/winver/Makefile"
|
||||
|
||||
ac_config_files="$ac_config_files programs/wordpad/Makefile"
|
||||
|
||||
ac_config_files="$ac_config_files programs/write/Makefile"
|
||||
|
||||
ac_config_files="$ac_config_files programs/xcopy/Makefile"
|
||||
|
||||
ac_config_files="$ac_config_files server/Makefile"
|
||||
@ -21863,6 +21865,7 @@ do
|
||||
"programs/winhelp/Makefile") CONFIG_FILES="$CONFIG_FILES programs/winhelp/Makefile" ;;
|
||||
"programs/winver/Makefile") CONFIG_FILES="$CONFIG_FILES programs/winver/Makefile" ;;
|
||||
"programs/wordpad/Makefile") CONFIG_FILES="$CONFIG_FILES programs/wordpad/Makefile" ;;
|
||||
"programs/write/Makefile") CONFIG_FILES="$CONFIG_FILES programs/write/Makefile" ;;
|
||||
"programs/xcopy/Makefile") CONFIG_FILES="$CONFIG_FILES programs/xcopy/Makefile" ;;
|
||||
"server/Makefile") CONFIG_FILES="$CONFIG_FILES server/Makefile" ;;
|
||||
"tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
|
||||
|
@ -1894,6 +1894,7 @@ AC_CONFIG_FILES([programs/winevdm/Makefile])
|
||||
AC_CONFIG_FILES([programs/winhelp/Makefile])
|
||||
AC_CONFIG_FILES([programs/winver/Makefile])
|
||||
AC_CONFIG_FILES([programs/wordpad/Makefile])
|
||||
AC_CONFIG_FILES([programs/write/Makefile])
|
||||
AC_CONFIG_FILES([programs/xcopy/Makefile])
|
||||
AC_CONFIG_FILES([server/Makefile])
|
||||
AC_CONFIG_FILES([tools/Makefile])
|
||||
|
@ -45,6 +45,7 @@ SUBDIRS = \
|
||||
winhelp \
|
||||
winver \
|
||||
wordpad \
|
||||
write \
|
||||
xcopy
|
||||
|
||||
# Sub-directories to run make install into
|
||||
@ -85,6 +86,7 @@ INSTALLSUBDIRS = \
|
||||
winhelp \
|
||||
winver \
|
||||
wordpad \
|
||||
write \
|
||||
xcopy
|
||||
|
||||
# Programs to install in bin directory
|
||||
|
26
programs/write/En.rc
Normal file
26
programs/write/En.rc
Normal file
@ -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"
|
||||
}
|
15
programs/write/Makefile.in
Normal file
15
programs/write/Makefile.in
Normal file
@ -0,0 +1,15 @@
|
||||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ../..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = write.exe
|
||||
APPMODE = -mwindows
|
||||
IMPORTS = user32 gdi32 kernel32
|
||||
|
||||
C_SRCS = write.c
|
||||
|
||||
RC_SRCS = rsrc.rc
|
||||
|
||||
@MAKE_PROG_RULES@
|
||||
|
||||
@DEPENDENCIES@ # everything below this line is overwritten by make depend
|
19
programs/write/resources.h
Normal file
19
programs/write/resources.h
Normal file
@ -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
|
24
programs/write/rsrc.rc
Normal file
24
programs/write/rsrc.rc
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
* 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 <windows.h>
|
||||
#include "resources.h"
|
||||
|
||||
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||
|
||||
#include "En.rc"
|
54
programs/write/write.c
Normal file
54
programs/write/write.c
Normal file
@ -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 <stdarg.h>
|
||||
|
||||
#include <windows.h>
|
||||
#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 WinMain(HINSTANCE hInstance, HINSTANCE hOldInstance, LPSTR 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user