Commit Graph

168 Commits

Author SHA1 Message Date
Juan Lang e3dbbd1435 shell32: Use a helper function for executing a found executable. 2007-11-19 12:53:46 +01:00
Juan Lang 645802d748 shell32: Dynamically allocate directory buffer. 2007-11-19 12:53:33 +01:00
Juan Lang fd12e340cf shell32: Use helper function to translate ID list. 2007-11-19 12:53:09 +01:00
Juan Lang 865a40651d shell32: Use a helper function for executing a class. 2007-11-19 12:52:51 +01:00
Juan Lang f53abfcee1 shell32: Dynamically allocate buffer for command parameters. 2007-11-19 12:52:33 +01:00
Alexandre Julliard 14eb294a48 shell32: Pass some of the ShellExecute flags through InvokeCommand. 2007-11-13 21:34:28 +01:00
Andrew Talbot e7636c13e5 shell32: Constify some variables. 2007-10-31 12:39:54 +01:00
Rob Shearman 94074ad31e shell32: Don't use the working directory passed into ShellExecute* functions if it isn't valid. 2007-08-31 19:16:50 +02:00
Kirill K. Smirnov 728bfd6d58 shell32: Add support for SEE_MASK_NO_CONSOLE flag. 2007-07-16 22:54:42 +02:00
Misha Koshelev 9be151c2e9 shell32: Conform to native in SHELL_ArgifyW for unquoted %1 in registry keys. 2007-06-18 12:15:51 +02:00
Misha Koshelev efb92561e6 shell32: Handle default DDE application names. 2007-05-30 11:46:06 +02:00
Misha Koshelev cfa87660a7 shell32: Fix execute_from_key to conform to native behavior. 2007-05-30 11:44:20 +02:00
Dmitry Timoshkov 3c9e7a7f33 wine: Switch to using 'long' for INT_PTR type for 64-bit compatibility. 2007-05-25 20:37:56 +02:00
Marcus Meissner 29700766ea shell32: Avoid potential 1 byte overflow. 2007-05-17 13:20:25 +02:00
Hans Leidekker 395ba3b945 shell32: Add a stub implementation for OpenAs_RunDLL. 2007-04-19 11:56:16 +02:00
Ken Thomases 49c8388a98 shell32: Don't break file path at spaces in ShellExecuteEx if quoted. 2007-04-18 13:47:29 +02:00
Andrew Talbot 388fe7e371 shell32: Declare some functions static. 2007-02-07 11:03:28 +01:00
Andrew Talbot 8246b6cd30 shell32: Remove unused function. 2007-02-06 13:19:22 +01:00
Francois Gouget 4abebb8eb5 shell32: There is no need to check strings for NULL when using debugstr_w().
Also don't put single quotes around '%s' in that case.
2007-01-18 12:55:40 +01:00
Francois Gouget df299b7305 shell32: Replace numeric literals with the proper constant. 2006-12-14 20:24:31 +01:00
Francois Gouget df9715b1b0 shell32: Fix FindExecutableW() to not check if lpResult after using it. It's supposed to cause a segfault anyway.
Use SE_ERR_FNF rather than a numeric literal.
2006-12-14 12:45:27 +01:00
Francois Gouget 2538fa319a shell32: Add some documentation for FindExecutableW(). 2006-12-14 12:45:21 +01:00
Francois Gouget 71e5f3c116 shell32: Fix FindExecutable() to return the executable path, not the whole command. 2006-12-14 12:45:15 +01:00
James Hawkins 44b0b462cb shell32: Move a NULL pointer check before the place where we dereference the pointer. 2006-12-04 12:22:46 +01:00
Francois Gouget 9fefaa87a9 shell32: Remove unused parameters from SHELL_FindExecutableByOperation(). 2006-11-24 11:48:35 +01:00
Francois Gouget 138e12b3d2 shell32: Add missing '\n' to Wine trace. 2006-11-08 12:10:39 +01:00
Aric Stewart 3f9a168f47 shell32: Have SHELL_ArgifyW respect the length of the buffer passed in and report a needed buffer size. 2006-11-06 14:11:57 +01:00
Aric Stewart 3490cb81ed shell32: Create dynamic buffers for expanded enviroment strings to allow for parameters and such longer than MAX_PATH.
With help from Michael Moss.
2006-11-06 14:10:55 +01:00
Hans Leidekker 89e1d29482 shell32: Win64 printf format warning fixes. 2006-10-09 12:45:02 +02:00
James Hawkins 7b89ff88e8 janitorial: Remove redundant NULL checks before SHFree. 2006-10-07 17:52:59 +02:00
Andrew Talbot 30806fc00c shell32: Cast-qual warnings fix. 2006-10-02 11:55:26 +02:00
Francois Gouget 9607151e38 shell32: Fix computation of default verb.
Compute the default verb as documented on MSDN instead of blindly
assuming it is 'open'. This fixes the WordViewer association in some
cases.
2006-06-26 13:05:12 +02:00
Francois Gouget 2d7ef72cf0 shell32: Remove dead code in SHELL_FindExecutable(). 2006-06-16 11:32:11 +02:00
Jonathan Ernst 360a3f9142 Update the address of the Free Software Foundation. 2006-05-23 14:11:13 +02:00
Jacek Caban 150bd5442c shell32: Don't crash in SHELL_ExecuteW if psei->lpDirectory is NULL. 2006-04-14 19:37:02 +02:00
Jacek Caban 4b5125a79c shell32: Allocate wszApplicationName on the heap as it may be longer than MAX_PATH. 2006-04-12 20:56:57 +02:00
Dmitry Timoshkov 52645e1144 shell32: Add parameter formatting rule to the command line if there isn't any. 2006-03-14 18:49:43 +01:00
Eric Pouech 1be2e1edef shell32: Fixes for bugs found by valgrind on shell32 tests harness.
- read strings from left to right (PathGetDriveNumberW)
- don't access buffers before they are filled (SHGetPathFromIDListW)
- fill buffers & variables on all paths (SHELL_FindExecutable)
- handle error condition (unix_fs)
- don't shoot in the blind for AW APIs (tests/shelllink.c)
2006-02-22 12:04:02 +01:00
Dmitry Timoshkov 22204c2c80 shell32: execute_from_key should fallback to a DDE exec only if the
command to execute from is not found in the registry.
Pass already found executable name to dde_connect.
2006-02-01 12:29:39 +01:00
Ge van Geldorp a8d1e6e068 shell32: Fix directory execution.
Only use the Folder class handler if we're actually executing a
folder.
2006-01-12 13:31:45 +01:00
Martin Fuchs 041039390a Fix context menu handling for more than one entry in order to repair
.lnk-file execution: Don't break at the first non-matching entry.
2005-11-30 18:26:32 +01:00
Ge van Geldorp 72ed6eae4c Other code in shlexec.c (e.g. the extension handling code in
ShellExecute_GetClassKey) expects sei->lpFile to not be enclosed in
quotes.
2005-11-28 17:29:58 +01:00
Dmitry Timoshkov 84d4fc5e03 Unconditionally fall back to ANSI DDE APIs in ShellExecute if current
emulated Windows version is Win9x, Excel refuses to communicate with a
unicode client in win9x mode.
2005-11-11 10:54:07 +00:00
Mike McCormack 32d5240178 Invoke shortcuts through IContextMenu, rather than trying to access
them directly.
2005-11-03 11:33:57 +00:00
Dmitry Timoshkov 8cd388f398 Use appropriate DDE APIs (ANSI or unicode) for ShellExecuteA/W, Excel
2000 depends on that.
2005-10-18 14:11:17 +00:00
Martin Fuchs 803146d220 Simplify 'sei' structure initialization in ShellExecuteA/W. 2005-10-03 11:02:47 +00:00
Ge van Geldorp 5b7da80911 Fix execution of Control Panel items. 2005-09-12 12:10:57 +00:00
Dmitry Timoshkov 4cc1c14005 Pass a locally modified version of SHELLEXECUTEINFO to
IShellExecuteHookW_Execute, this should pass through at least
sei_tmp.nShow retrieved from an .lnk file (fStartup).
2005-09-08 18:54:52 +00:00
Kevin Koltzau 95a173a52b Fix warnings in 64bit. 2005-09-02 11:32:17 +00:00
Francois Gouget 0b5cc286e3 Fix ShellExecute("\"foo.doc\"") for Internet Explorer 6.
Update the conformance tests accordingly.
Tweak a trace because it's very confusing to see the path with no
escaped quotes in ShellExecuteA() and then with escaped quotes in
ShellExecuteExW32() (due to debugstr_w()).
2005-08-17 09:53:30 +00:00
Francois Gouget df6ed2f4e8 Fix the return value of SHELL_Argify() so it once again returns true
if a '%1' or equivalent placeholder was found. This fixes
ShellExecuteEx(lpFile="foo.txt", lpClass="txtfile").
2005-08-11 17:04:31 +00:00
Francois Gouget efe2bbd0ec Fix handling of SEE_MASK_CLASSNAME and SEE_MASK_CLASSKEY. They are not
disjoint flags.
2005-08-11 10:29:44 +00:00
Francois Gouget 28dc5a8afc Assorted spelling fixes. 2005-07-11 10:59:41 +00:00
Michael Jung 81b7509f3b Use SHGetPathFromIDList instead of SHELL32_GetPathFromIDList. 2005-06-14 19:17:41 +00:00
Juan Lang f12eadf7bf - only log unsupported flags in ShellExecute
- environment variables are expanded, so SEE_MASK_DOENVSUBST is
  supported
2005-05-14 11:06:54 +00:00
Peter Berg Larsen 6e3bcb5a54 Replace strncpy with memcpy or lstrcpyn. 2005-04-18 10:30:55 +00:00
Francois Gouget 93416cdaf7 Assorted spelling fixes. 2005-03-23 13:15:18 +00:00
Aric Stewart 984931bd09 For ShellExecuteExA we need to copy out the hProcess value from the W
structure.
2005-03-17 20:50:53 +00:00
Ge van Geldorp a912c2a885 Error numbers >= 32 are to be expected. 2005-02-14 11:03:21 +00:00
Michael Stefaniuc 5ad7d858e0 Do not check for non NULL pointer before HeapFree'ing it. It's
redundant.
2004-12-23 17:06:43 +00:00
Alexandre Julliard 758b2887e9 Remove some no longer needed AW functions. 2004-12-17 19:20:07 +00:00
Jon Griffiths f82272c92f Remove unneeded headers to reduce unneeded rebuilds. 2004-12-16 14:35:55 +00:00
Ge van Geldorp 9b399da426 - Don't double-quote an already double-quoted argument.
- Properly increment the fmt pointer.
2004-10-21 20:59:25 +00:00
Francois Gouget 486d020c1b Don't define COBJMACROS in objbase.h.
Update the Wine sources accordingly.
2004-10-07 03:06:48 +00:00
Jens Collin 9e679d3675 Added lookup of environment vars in SHELL_ArgifyW. 2004-09-14 20:14:09 +00:00
Ge van Geldorp 225c8e6c57 Handle shell link files contained in double quotes. 2004-08-16 23:18:36 +00:00
Francois Gouget 1117e69c14 SHELL_ExecuteW() passes a Unicode environment to CreateProcessW() so
it must specify the CREATE_UNICODE_ENVIRONMENT flag. Also the
SHELL_ExecuteW32() functions will always be called with a Unicode
environment so adjust their prototype accordingly.
2004-06-15 18:27:50 +00:00
Dmitry Timoshkov a98f0dffa6 Fix warnings introduced by my last patch. 2004-06-15 17:02:46 +00:00
Dmitry Timoshkov d321561ba4 Restore default "open" functionality of ShellExecute. 2004-06-15 00:44:14 +00:00
Dmitry Timoshkov 7c1ae16431 Ignore DdeClientTransaction error in ShellExecute. 2004-06-14 19:32:32 +00:00
Dmitry Timoshkov 5567887fd3 Add support for quoting "file://%1" like format strings. 2004-06-14 17:54:24 +00:00
Dmitry Timoshkov 85ef456512 Fix the DDE PFNCALLBACK prototype. 2004-04-26 23:29:44 +00:00
Dmitry Timoshkov 61daaf8bd3 Fix a bug in ShellExecute which called DdeCreateStringHandleW with a
wrong parameter. Revert previous erroneous fix.
2004-04-23 21:32:17 +00:00
Huw Davies 180045676b DdeClientTransaction returns zero on error. 2004-04-22 23:46:35 +00:00
Martin Fuchs c01e515815 Check for folders in ShellExecute(). 2004-04-13 00:18:45 +00:00
Martin Fuchs 6223fdc9f2 - rename 'wszCommandline' to 'wszParameters'
- separate out command line arguments from executable file name
2004-04-12 23:12:51 +00:00
Francois Gouget 0217bfdfed Assorted spelling fixes. 2004-04-12 22:08:23 +00:00
Francois Gouget e7427e13af Cleanup the handling of the extension in SHELL_FindExecutable():
- Eliminate the corresponding fixed-size buffer which removes the
  limitation to 3 character extensions.
- Fix handling of the trailing '.' case.
- Do a case-insensitive check for the extension in win.ini.
Increase the size of the command buffer to 1024.
2004-04-09 19:04:03 +00:00
Martin Fuchs df0a00edd8 Resolve shell shortcuts and process ID lists in ShellExecute()
functions.
2004-04-07 03:49:51 +00:00
Martin Fuchs 3abf44f10a Optimization: null terminate string buffers instead of filling them
completely with 0.
2004-04-05 21:06:16 +00:00
Rolf Kalbermatter dfe99d49c5 Use named constant instead of a simple number (gets rid of signed
warning too).
2004-04-01 21:00:23 +00:00
Martin Fuchs 02dd8c3601 Call IShellExecuteHook interface for ShellExecute() calls with ID
lists.
2004-03-27 20:41:20 +00:00
Martin Fuchs 906be1dcb0 - Fix handling of %2, %3, ... and lower case format characters in
SHELL_ArgifyW().
- Move "%I" expansion from ShellExecuteEx() into common function
  SHELL_ArgifyW().
- Pass buffer length to SHELL_FindExecutable().
- FIXME comment for len paramater in SHELL_ArgifyW().

Ge van Geldorp <ge@gse.nl>
- Add double quotation marks unless we already have them (e.g.: "%1"
  %* for exefile).
- Remove unnecessary double quotation marks and command line arguments.
2004-03-26 02:29:12 +00:00
Rein Klazes d09edf800b In SHELL_ExecuteW, if a new current directory is specified, change to
it before calling CreateProcess so that it will find the correct
executable.
2004-03-19 01:52:30 +00:00
Martin Fuchs a06f76d6f9 Expand environment strings in command, parameter and directory strings
of ShellExecuteExW32().
2004-03-18 04:04:29 +00:00
Martin Fuchs 7b48ddcbba Enumerate all "shell\<verb>\command" entries in the registry instead
of searching only for "shell\open\command" entries.
2004-03-04 20:34:38 +00:00
Martin Fuchs 4a2731a781 Fix buffer length usage for RegQueryValueW() calls at various places. 2004-03-03 05:26:30 +00:00
Huw Davies bc811a2489 Add a missing '\\'. 2004-03-01 23:11:53 +00:00
Martin Fuchs 46fceb19f3 Set error code ERROR_DDE_FAIL if the DDE connection failed in
ShellExecute().
2004-03-01 21:22:25 +00:00
Dmitry Timoshkov ccc57b323d Translate the returned hInstApp from the unicode worker function. 2004-02-12 20:04:09 +00:00
Alexandre Julliard e025c59051 Fixed HCR_GetExecuteCommandW() behavior with a class name (based on a
patch by Martin Fuchs).
Removed a couple of no longer used functions.
2004-01-16 23:06:25 +00:00
Marcelo Duarte 003465415f - Get rid of W->A calls for shlexec.
- Implementation of FindExecutableW.
2004-01-15 06:13:57 +00:00
Francois Gouget 640cc3f3e1 Assorted spelling fixes. 2004-01-06 22:08:33 +00:00
Ge van Geldorp fc5134d52e Enclose application name in double quotation marks, as it may contain
spaces.
2003-12-30 19:20:11 +00:00
Marcelo Duarte 36002739c7 - Implementation of HCR_GetExecuteCommandExW for internal use.
- New inline function  __SHCloneStrAtoW.
2003-12-10 00:39:31 +00:00
Alexandre Julliard 2d13956285 The "Path" value of the "App Paths" entry should be handled in
ShellExecute by changing PATH in the new process, instead of being
done in SearchPath.
2003-09-26 04:35:01 +00:00
Alexandre Julliard e37c6e18d0 Fixed header dependencies to be fully compatible with the Windows
headers (with help from Dimitrie O. Paun).
2003-09-05 23:08:26 +00:00
Francois Gouget c5f775a9c7 Typos/spelling fixes. 2003-06-18 03:30:39 +00:00
Ulrich Czekalla 52b732dd0d Handle SEE_MASK_CLASSKEY case for ShellExecute. 2003-05-19 23:07:49 +00:00
Aric Stewart 07c649bf1b Added support for the %L escape. 2003-05-19 18:55:26 +00:00