60900

60900



Displays the window as a minimized window. Tłiis value is similar to SW_SHOWMINIMIZED, except the window is not activated.

SVV_SHO\VNA

Displays tlie window in its current size and position. Tliis value is similar to SW_SH O W, except tlie window is not activated.

SW_SH O WNO ACTIVATE

Displays a window in its most recent size and position. Tliis value is similar to SW_SHOWNORM AL, except the window is not activated.

SW_ SHOWNORMAL

Activates and displays a window. If tlie window is minimized or maximized, the system restones it to its original size and position. An application should speeify tliis flag when displaying tlie window for the first time.

Return Value

If the function succeeds, tlie return value is greater than 31.

If the function fails, tlie return value is one of tlie following error values.

Return c«te''value_

o

E R ROR_B AD.FORM AT E R ROR_FŁE_NOT_FOU ND E R ROR_PATH _NOT_FOU ND


Deseń ptiou_

The system is out of memory or resomres.

The .exe file is invalid

The specified file was not found.

The specified patii was not found

Remarks

The WinExec function retums when tlie started process calls the GetMessage function or a time-out limit is reached. To avoid waiting for the time out delay, cali tlie GetMessage function as soon as possible in any process started by a cali to WinExec.

Security Remarks

The executable na me is treated as the first white space-delimited string in lpCmdLine. If the executable or patii name lias a space in it, there is a risk that a different executable could be run because of the way the function parses spaces. The following example is dangerous because the function will attempt to run " Program. exe", if it exists, instead of "MyApp.exe".

WinExec(”C: "Program FilesWMyApp",...)

If a malicious user were to create an application called "Program.exe" on a system, any program that incorrectly calls WinExec using the Program Files directory will run tliis application instead of the intended application.

To avoid tliis problem, use CreateProcess ratlier than \VinExec. However, if you must use WinExec for legacy reasons, make surę the application name is enclosed in quotation marks as shown in the example below.

WinExec("\"C:\\Program Files\\MyApp.exe\" -L -S",...)

Example

YVinExec(" M yOtherProgram. exe", SW_SH OWNORM AL);

// Runs MyOtherProgram in normal window WinExec("notepad.exe Program.cpp", SH_SHOW);

// Runs notepad wliich opens Program.cpp



Wyszukiwarka

Podobne podstrony:
00043 D1700e75ed9e1e1afbfb3d368d6e171 42 Molnau detection. This value is not reached until the 30th
lii SHELL MOVITOOLS® File Startup Parameters Display Extras Window Help f Main Menu E 3 • i g
% Agi lent VEE ProIM File Edit View Debug Flow Device System I/O Data Display Excel Window Help■ l)
Agitent VEE Pro File Edit View Debug Flow Device System I/O Data Display Excel Window Help Propertie
Agitent VEE Pro File Edit View Debug Flow Device System I/O Data Display Excel Window Help 6 £{ • “i
% Agi lent VEE Pro File Edit View Debug Flow Device System I/O Data Display Excel Window Help► II ■
s&h 141 STRENGTH AND HEALTH 141 BALANCING Tliis is not as bard as it looks, aml all it uceds is prac
35317 ss 032 SPECIAL★ ★ ★ APOLLON WRIST STRAPS cut to display the forearms, as wam by myself, can be
Kenwood378 _Drostoauto.holm.ru 1    Pross ihe CLK button to display the disc titlo o
NPL Report MATC(A) 164 curves coincide for displacements less than ~125 pm. For higher levels of dis
the bagasse of 7738 ± 100 kj/kg, as received. However, in most sugar mills, it is not possible to ca
Kenwood378 _Drostoauto.holm.ru 1    Pross ihe CLK button to display the disc titlo o
i iCountries, such as the U.K., that did not initially implement widespread testing have now develop

więcej podobnych podstron