Opis funkcji

Nasza ocena:

5
Pobrań: 14
Wyświetleń: 798
Komentarze: 0
Notatek.pl

Pobierz ten dokument za darmo

Podgląd dokumentu
Opis funkcji - strona 1 Opis funkcji - strona 2 Opis funkcji - strona 3

Fragment notatki:

WinExec Function
Runs the specified application.
Note: This function is provided only for compatibility with 16-bit Windows. Applications should use the CreateProcess function. Syntax UINT WINAPI WinExec(
__in LPCSTR lpCmdLine,
__in UINT uCmdShow
);
Parameters lpCmdLine [in] The command line (file name plus optional parameters) for the application to be executed. If the name of the executable file in the lpCmdLine parameter does not contain a directory path, the system searches for the executable file in this sequence:
1. The directory from which the application loaded.
2. The current directory.
3. The Windows system directory (GetSystemDirectory).
4. The Windows directory (GetWindowsDirectory).
5. The directories listed in the PATH environment variable.
uCmdShow [in] Specifies how the window is to be shown. This parameter is ignored the first time an application calls ShowWindow, if the program that launched the application provides a STARTUPINFO structure. Otherwise, the first time ShowWindow is called, the value should be the value obtained by the WinMain function in its nCmdShow parameter. In subsequent calls, this parameter can be one of the following values.
SW_FORCEMINIMIZE
Windows 2000/XP: Minimizes a window, even if the thread that owns the window is not responding. This flag should only be used when minimizing windows from a different thread.
SW_HIDE
Hides the window and activates another window.
SW_MAXIMIZE
Maximizes the specified window.
SW_MINIMIZE
Minimizes the specified window and activates the next top-level window in the Z order.
SW_RESTORE
Activates and displays the window. If the window is minimized or maximized, the system restores it to its original size and position. An application should specify this flag when restoring a minimized window.
SW_SHOW
Activates the window and displays it in its current size and position. SW_SHOWDEFAULT
Sets the show state based on the SW_ value specified in the STARTUPINFO structure passed to the CreateProcess function by the program that started the application. SW_SHOWMAXIMIZED
Activates the window and displays it as a maximized window.
SW_SHOWMINIMIZED
Activates the window and displays it as a minimized window.
SW_SHOWMINNOACTIVE
Displays the window as a minimized window. This value is similar to SW_SHOWMINIMIZED, except the window is not activated.
SW_SHOWNA
Displays the window in its current size and position. This value is similar to SW_SHOW, except the window is not activated.


(…)

… PROCESS_QUERY_LIMITED_INFORMATION access right and the PROCESS_VM_READ access right. For more information, see Process Security and Access Rights.
Windows Server 2003 and Windows XP/2000: The handle must have the PROCESS_QUERY_INFORMATION and PROCESS_VM_READ access rights.
ppsmemCounters [out]
A pointer to the PROCESS_MEMORY_COUNTERS or PROCESS_MEMORY_COUNTERS_EX structure that receives information about the memory usage of the…
… SetPriorityClass).
PROCESS_SET_QUOTA Required to set memory limits using SetProcessWorkingSetSize.
PROCESS_SUSPEND_RESUME Required to suspend or resume a process.
PROCESS_TERMINATE Required to terminate a process using TerminateProcess.
PROCESS_VM_OPERATION Required to perform an operation on the address space of a process (see VirtualProtectEx and WriteProcessMemory).
PROCESS_VM_READ Required to read memory in a process using ReadProcessMemory.
PROCESS_VM_WRITE Required to write to memory in a process using WriteProcessMemory.
SYNCHRONIZE Required to wait for the process to terminate using the wait functions.
TerminateProcess Function
Terminates the specified process and all of its threads.
Syntax
BOOL WINAPI TerminateProcess(
__in HANDLE hProcess,
__in UINT uExitCode
);
Parameters
hProcess [in]
A handle to the…
…. Może się to zdarzyć w przypadku wielokrotnego zamykania tego samego uchwytu lub próby zamknięcia uchwytu zwróconego przez funkcję FindFirstFile.
Uwagi
Funkcja CloseHandle zamyka uchwyty następujących obiektów:
Access token, Communications device, Console input, Console screen buffer, Event, File, File mapping, Job, Mailslot, Memory resource notification, Mutex, Named pipe, Pipe, Process, Semaphore, Socket, Thread…
… CloseHandle. Uchwyt zwrócony funkcją FindFirstFile zamyka się wywołując funkcję FindClose.
EnumProcesses Function
Retrieves the process identifier for each process object in the system.
Syntax
BOOL WINAPI EnumProcesses(
__out DWORD *pProcessIds,
__in DWORD cb,
__out DWORD *pBytesReturned
);
Parameters
pProcessIds [out]
A pointer to an array that receives the list of process identifiers.
cb [in]
The size of…
… wymaga uchwytu do procesu, pod warunkiem posiadania odpowiednich uprawnień.
Po zakończeniu pracy z uchwytem należy go zwolnić za pomocą funkcji CloseHandle.
(*)
The following table lists the standard access rights used by all objects.
Value Meaning DELETE Required to delete the object.
READ_CONTROL Required to read information in the security descriptor for the object, not including the information in…
… spent one second in kernel mode, this function will fill the FILETIME structure specified by lpKernelTime with a 64-bit value of ten million. That is the number of 100-nanosecond units in one second.
GetPerformanceInfo Function
Retrieves the performance values contained in the PERFORMANCE_INFORMATION structure.
Syntax
BOOL WINAPI GetPerformanceInfo(
__out PPERFORMANCE_INFORMATION…
... zobacz całą notatkę



Komentarze użytkowników (0)

Zaloguj się, aby dodać komentarz