mshtml: Added IHTMLDocument7::getElementsByClassName implementation.
[wine.git] / dlls / ntdll / process.c
blobf615ce2fea7e5d2387c3dd86a6d419e6bf2b3f3e
1 /*
2 * NT basis DLL
4 * This file contains the Nt* API functions of NTDLL.DLL.
5 * In the original ntdll.dll they all seem to just call int 0x2e (down to the NTOSKRNL)
7 * Copyright 1996-1998 Marcus Meissner
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
24 #include "config.h"
26 #include <stdarg.h>
27 #include <stdio.h>
28 #include <stdlib.h>
29 #include <string.h>
30 #include <time.h>
31 #ifdef HAVE_UNISTD_H
32 # include <unistd.h>
33 #endif
35 #include "ntstatus.h"
36 #define WIN32_NO_STATUS
37 #include "wine/debug.h"
38 #include "windef.h"
39 #include "winternl.h"
40 #include "ntdll_misc.h"
41 #include "wine/server.h"
43 #ifdef HAVE_MACH_MACH_H
44 #include <mach/mach.h>
45 #endif
47 WINE_DEFAULT_DEBUG_CHANNEL(ntdll);
49 static ULONG execute_flags = MEM_EXECUTE_OPTION_DISABLE;
52 * Process object
55 /******************************************************************************
56 * NtTerminateProcess [NTDLL.@]
58 * Native applications must kill themselves when done
60 NTSTATUS WINAPI NtTerminateProcess( HANDLE handle, LONG exit_code )
62 NTSTATUS ret;
63 BOOL self;
64 SERVER_START_REQ( terminate_process )
66 req->handle = wine_server_obj_handle( handle );
67 req->exit_code = exit_code;
68 ret = wine_server_call( req );
69 self = !ret && reply->self;
71 SERVER_END_REQ;
72 if (self && handle) _exit( exit_code );
73 return ret;
76 /******************************************************************************
77 * RtlGetCurrentPeb [NTDLL.@]
80 PEB * WINAPI RtlGetCurrentPeb(void)
82 return NtCurrentTeb()->Peb;
85 /***********************************************************************
86 * __wine_make_process_system (NTDLL.@)
88 * Mark the current process as a system process.
89 * Returns the event that is signaled when all non-system processes have exited.
91 HANDLE CDECL __wine_make_process_system(void)
93 HANDLE ret = 0;
94 SERVER_START_REQ( make_process_system )
96 if (!wine_server_call( req )) ret = wine_server_ptr_handle( reply->event );
98 SERVER_END_REQ;
99 return ret;
102 static UINT process_error_mode;
104 #define UNIMPLEMENTED_INFO_CLASS(c) \
105 case c: \
106 FIXME("(process=%p) Unimplemented information class: " #c "\n", ProcessHandle); \
107 ret = STATUS_INVALID_INFO_CLASS; \
108 break
110 ULONG_PTR get_system_affinity_mask(void)
112 ULONG num_cpus = NtCurrentTeb()->Peb->NumberOfProcessors;
113 if (num_cpus >= sizeof(ULONG_PTR) * 8) return ~(ULONG_PTR)0;
114 return ((ULONG_PTR)1 << num_cpus) - 1;
117 #if defined(HAVE_MACH_MACH_H)
119 static void fill_VM_COUNTERS(VM_COUNTERS* pvmi)
121 #if defined(MACH_TASK_BASIC_INFO)
122 struct mach_task_basic_info info;
123 mach_msg_type_number_t infoCount = MACH_TASK_BASIC_INFO_COUNT;
124 if(task_info(mach_task_self(), MACH_TASK_BASIC_INFO, (task_info_t)&info, &infoCount) == KERN_SUCCESS)
126 pvmi->VirtualSize = info.resident_size + info.virtual_size;
127 pvmi->PagefileUsage = info.virtual_size;
128 pvmi->WorkingSetSize = info.resident_size;
129 pvmi->PeakWorkingSetSize = info.resident_size_max;
131 #endif
134 #elif defined(linux)
136 static void fill_VM_COUNTERS(VM_COUNTERS* pvmi)
138 FILE *f;
139 char line[256];
140 unsigned long value;
142 f = fopen("/proc/self/status", "r");
143 if (!f) return;
145 while (fgets(line, sizeof(line), f))
147 if (sscanf(line, "VmPeak: %lu", &value))
148 pvmi->PeakVirtualSize = (ULONG64)value * 1024;
149 else if (sscanf(line, "VmSize: %lu", &value))
150 pvmi->VirtualSize = (ULONG64)value * 1024;
151 else if (sscanf(line, "VmHWM: %lu", &value))
152 pvmi->PeakWorkingSetSize = (ULONG64)value * 1024;
153 else if (sscanf(line, "VmRSS: %lu", &value))
154 pvmi->WorkingSetSize = (ULONG64)value * 1024;
155 else if (sscanf(line, "RssAnon: %lu", &value))
156 pvmi->PagefileUsage += (ULONG64)value * 1024;
157 else if (sscanf(line, "VmSwap: %lu", &value))
158 pvmi->PagefileUsage += (ULONG64)value * 1024;
160 pvmi->PeakPagefileUsage = pvmi->PagefileUsage;
162 fclose(f);
165 #else
167 static void fill_VM_COUNTERS(VM_COUNTERS* pvmi)
169 /* FIXME : real data */
172 #endif
174 /******************************************************************************
175 * NtQueryInformationProcess [NTDLL.@]
176 * ZwQueryInformationProcess [NTDLL.@]
179 NTSTATUS WINAPI NtQueryInformationProcess(
180 IN HANDLE ProcessHandle,
181 IN PROCESSINFOCLASS ProcessInformationClass,
182 OUT PVOID ProcessInformation,
183 IN ULONG ProcessInformationLength,
184 OUT PULONG ReturnLength)
186 NTSTATUS ret = STATUS_SUCCESS;
187 ULONG len = 0;
189 TRACE("(%p,0x%08x,%p,0x%08x,%p)\n",
190 ProcessHandle,ProcessInformationClass,
191 ProcessInformation,ProcessInformationLength,
192 ReturnLength);
194 switch (ProcessInformationClass)
196 UNIMPLEMENTED_INFO_CLASS(ProcessQuotaLimits);
197 UNIMPLEMENTED_INFO_CLASS(ProcessBasePriority);
198 UNIMPLEMENTED_INFO_CLASS(ProcessRaisePriority);
199 UNIMPLEMENTED_INFO_CLASS(ProcessExceptionPort);
200 UNIMPLEMENTED_INFO_CLASS(ProcessAccessToken);
201 UNIMPLEMENTED_INFO_CLASS(ProcessLdtInformation);
202 UNIMPLEMENTED_INFO_CLASS(ProcessLdtSize);
203 UNIMPLEMENTED_INFO_CLASS(ProcessIoPortHandlers);
204 UNIMPLEMENTED_INFO_CLASS(ProcessPooledUsageAndLimits);
205 UNIMPLEMENTED_INFO_CLASS(ProcessWorkingSetWatch);
206 UNIMPLEMENTED_INFO_CLASS(ProcessUserModeIOPL);
207 UNIMPLEMENTED_INFO_CLASS(ProcessEnableAlignmentFaultFixup);
208 UNIMPLEMENTED_INFO_CLASS(ProcessPriorityClass);
209 UNIMPLEMENTED_INFO_CLASS(ProcessWx86Information);
210 UNIMPLEMENTED_INFO_CLASS(ProcessPriorityBoost);
211 UNIMPLEMENTED_INFO_CLASS(ProcessDeviceMap);
212 UNIMPLEMENTED_INFO_CLASS(ProcessSessionInformation);
213 UNIMPLEMENTED_INFO_CLASS(ProcessForegroundInformation);
214 UNIMPLEMENTED_INFO_CLASS(ProcessLUIDDeviceMapsEnabled);
215 UNIMPLEMENTED_INFO_CLASS(ProcessBreakOnTermination);
216 UNIMPLEMENTED_INFO_CLASS(ProcessHandleTracing);
218 case ProcessBasicInformation:
220 PROCESS_BASIC_INFORMATION pbi;
221 const ULONG_PTR affinity_mask = get_system_affinity_mask();
223 if (ProcessInformationLength >= sizeof(PROCESS_BASIC_INFORMATION))
225 if (!ProcessInformation)
226 ret = STATUS_ACCESS_VIOLATION;
227 else if (!ProcessHandle)
228 ret = STATUS_INVALID_HANDLE;
229 else
231 SERVER_START_REQ(get_process_info)
233 req->handle = wine_server_obj_handle( ProcessHandle );
234 if ((ret = wine_server_call( req )) == STATUS_SUCCESS)
236 pbi.ExitStatus = reply->exit_code;
237 pbi.PebBaseAddress = wine_server_get_ptr( reply->peb );
238 pbi.AffinityMask = reply->affinity & affinity_mask;
239 pbi.BasePriority = reply->priority;
240 pbi.UniqueProcessId = reply->pid;
241 pbi.InheritedFromUniqueProcessId = reply->ppid;
244 SERVER_END_REQ;
246 memcpy(ProcessInformation, &pbi, sizeof(PROCESS_BASIC_INFORMATION));
248 len = sizeof(PROCESS_BASIC_INFORMATION);
251 if (ProcessInformationLength > sizeof(PROCESS_BASIC_INFORMATION))
252 ret = STATUS_INFO_LENGTH_MISMATCH;
254 else
256 len = sizeof(PROCESS_BASIC_INFORMATION);
257 ret = STATUS_INFO_LENGTH_MISMATCH;
260 break;
261 case ProcessIoCounters:
263 IO_COUNTERS pii;
265 if (ProcessInformationLength >= sizeof(IO_COUNTERS))
267 if (!ProcessInformation)
268 ret = STATUS_ACCESS_VIOLATION;
269 else if (!ProcessHandle)
270 ret = STATUS_INVALID_HANDLE;
271 else
273 /* FIXME : real data */
274 memset(&pii, 0 , sizeof(IO_COUNTERS));
276 memcpy(ProcessInformation, &pii, sizeof(IO_COUNTERS));
278 len = sizeof(IO_COUNTERS);
281 if (ProcessInformationLength > sizeof(IO_COUNTERS))
282 ret = STATUS_INFO_LENGTH_MISMATCH;
284 else
286 len = sizeof(IO_COUNTERS);
287 ret = STATUS_INFO_LENGTH_MISMATCH;
290 break;
291 case ProcessVmCounters:
293 VM_COUNTERS pvmi;
295 /* older Windows versions don't have the PrivatePageCount field */
296 if (ProcessInformationLength >= FIELD_OFFSET(VM_COUNTERS,PrivatePageCount))
298 if (!ProcessInformation)
299 ret = STATUS_ACCESS_VIOLATION;
300 else
302 memset(&pvmi, 0 , sizeof(VM_COUNTERS));
303 if (ProcessHandle == GetCurrentProcess())
304 fill_VM_COUNTERS(&pvmi);
305 else
307 SERVER_START_REQ(get_process_vm_counters)
309 req->handle = wine_server_obj_handle( ProcessHandle );
310 if (!(ret = wine_server_call( req )))
312 pvmi.PeakVirtualSize = reply->peak_virtual_size;
313 pvmi.VirtualSize = reply->virtual_size;
314 pvmi.PeakWorkingSetSize = reply->peak_working_set_size;
315 pvmi.WorkingSetSize = reply->working_set_size;
316 pvmi.PagefileUsage = reply->pagefile_usage;
317 pvmi.PeakPagefileUsage = reply->peak_pagefile_usage;
320 SERVER_END_REQ;
321 if (ret) break;
324 len = ProcessInformationLength;
325 if (len != FIELD_OFFSET(VM_COUNTERS,PrivatePageCount)) len = sizeof(VM_COUNTERS);
327 memcpy(ProcessInformation, &pvmi, min(ProcessInformationLength,sizeof(VM_COUNTERS)));
330 if (ProcessInformationLength != FIELD_OFFSET(VM_COUNTERS,PrivatePageCount) &&
331 ProcessInformationLength != sizeof(VM_COUNTERS))
332 ret = STATUS_INFO_LENGTH_MISMATCH;
334 else
336 len = sizeof(pvmi);
337 ret = STATUS_INFO_LENGTH_MISMATCH;
340 break;
341 case ProcessTimes:
343 KERNEL_USER_TIMES pti;
345 if (ProcessInformationLength >= sizeof(KERNEL_USER_TIMES))
347 if (!ProcessInformation)
348 ret = STATUS_ACCESS_VIOLATION;
349 else if (!ProcessHandle)
350 ret = STATUS_INVALID_HANDLE;
351 else
353 /* FIXME : User- and KernelTime have to be implemented */
354 memset(&pti, 0, sizeof(KERNEL_USER_TIMES));
356 SERVER_START_REQ(get_process_info)
358 req->handle = wine_server_obj_handle( ProcessHandle );
359 if ((ret = wine_server_call( req )) == STATUS_SUCCESS)
361 pti.CreateTime.QuadPart = reply->start_time;
362 pti.ExitTime.QuadPart = reply->end_time;
365 SERVER_END_REQ;
367 memcpy(ProcessInformation, &pti, sizeof(KERNEL_USER_TIMES));
368 len = sizeof(KERNEL_USER_TIMES);
371 if (ProcessInformationLength > sizeof(KERNEL_USER_TIMES))
372 ret = STATUS_INFO_LENGTH_MISMATCH;
374 else
376 len = sizeof(KERNEL_USER_TIMES);
377 ret = STATUS_INFO_LENGTH_MISMATCH;
380 break;
381 case ProcessDebugPort:
382 len = sizeof(DWORD_PTR);
383 if (ProcessInformationLength == len)
385 if (!ProcessInformation)
386 ret = STATUS_ACCESS_VIOLATION;
387 else if (!ProcessHandle)
388 ret = STATUS_INVALID_HANDLE;
389 else
391 SERVER_START_REQ(get_process_info)
393 req->handle = wine_server_obj_handle( ProcessHandle );
394 if ((ret = wine_server_call( req )) == STATUS_SUCCESS)
396 *(DWORD_PTR *)ProcessInformation = reply->debugger_present ? ~(DWORD_PTR)0 : 0;
399 SERVER_END_REQ;
402 else
403 ret = STATUS_INFO_LENGTH_MISMATCH;
404 break;
405 case ProcessDebugFlags:
406 len = sizeof(DWORD);
407 if (ProcessInformationLength == len)
409 if (!ProcessInformation)
410 ret = STATUS_ACCESS_VIOLATION;
411 else if (!ProcessHandle)
412 ret = STATUS_INVALID_HANDLE;
413 else
415 SERVER_START_REQ(get_process_info)
417 req->handle = wine_server_obj_handle( ProcessHandle );
418 if ((ret = wine_server_call( req )) == STATUS_SUCCESS)
420 *(DWORD *)ProcessInformation = reply->debug_children;
423 SERVER_END_REQ;
426 else
427 ret = STATUS_INFO_LENGTH_MISMATCH;
428 break;
429 case ProcessDefaultHardErrorMode:
430 len = sizeof(process_error_mode);
431 if (ProcessInformationLength == len)
432 memcpy(ProcessInformation, &process_error_mode, len);
433 else
434 ret = STATUS_INFO_LENGTH_MISMATCH;
435 break;
436 case ProcessDebugObjectHandle:
437 /* "These are not the debuggers you are looking for." *
438 * set it to 0 aka "no debugger" to satisfy copy protections */
439 len = sizeof(HANDLE);
440 if (ProcessInformationLength == len)
442 if (!ProcessInformation)
443 ret = STATUS_ACCESS_VIOLATION;
444 else if (!ProcessHandle)
445 ret = STATUS_INVALID_HANDLE;
446 else
448 memset(ProcessInformation, 0, ProcessInformationLength);
449 ret = STATUS_PORT_NOT_SET;
452 else
453 ret = STATUS_INFO_LENGTH_MISMATCH;
454 break;
455 case ProcessHandleCount:
456 if (ProcessInformationLength >= 4)
458 if (!ProcessInformation)
459 ret = STATUS_ACCESS_VIOLATION;
460 else if (!ProcessHandle)
461 ret = STATUS_INVALID_HANDLE;
462 else
464 memset(ProcessInformation, 0, 4);
465 len = 4;
468 if (ProcessInformationLength > 4)
469 ret = STATUS_INFO_LENGTH_MISMATCH;
471 else
473 len = 4;
474 ret = STATUS_INFO_LENGTH_MISMATCH;
476 break;
478 case ProcessAffinityMask:
479 len = sizeof(ULONG_PTR);
480 if (ProcessInformationLength == len)
482 const ULONG_PTR system_mask = get_system_affinity_mask();
484 SERVER_START_REQ(get_process_info)
486 req->handle = wine_server_obj_handle( ProcessHandle );
487 if (!(ret = wine_server_call( req )))
488 *(ULONG_PTR *)ProcessInformation = reply->affinity & system_mask;
490 SERVER_END_REQ;
492 else ret = STATUS_INFO_LENGTH_MISMATCH;
493 break;
495 case ProcessWow64Information:
496 len = sizeof(ULONG_PTR);
497 if (ProcessInformationLength != len) ret = STATUS_INFO_LENGTH_MISMATCH;
498 else if (!ProcessInformation) ret = STATUS_ACCESS_VIOLATION;
499 else if(!ProcessHandle) ret = STATUS_INVALID_HANDLE;
500 else
502 ULONG_PTR val = 0;
504 if (ProcessHandle == GetCurrentProcess()) val = is_wow64;
505 else if (server_cpus & ((1 << CPU_x86_64) | (1 << CPU_ARM64)))
507 SERVER_START_REQ( get_process_info )
509 req->handle = wine_server_obj_handle( ProcessHandle );
510 if (!(ret = wine_server_call( req )))
511 val = (reply->cpu != CPU_x86_64 && reply->cpu != CPU_ARM64);
513 SERVER_END_REQ;
515 *(ULONG_PTR *)ProcessInformation = val;
517 break;
518 case ProcessImageFileName:
519 /* FIXME: this will return a DOS path. Windows returns an NT path. Changing this would require also changing kernel32.QueryFullProcessImageName.
520 * The latter may be harder because of the lack of RtlNtPathNameToDosPathName. */
521 SERVER_START_REQ(get_dll_info)
523 UNICODE_STRING *image_file_name_str = ProcessInformation;
525 req->handle = wine_server_obj_handle( ProcessHandle );
526 req->base_address = 0; /* main module */
527 wine_server_set_reply( req, image_file_name_str ? image_file_name_str + 1 : NULL,
528 ProcessInformationLength > sizeof(UNICODE_STRING) ? ProcessInformationLength - sizeof(UNICODE_STRING) : 0 );
529 ret = wine_server_call( req );
530 if (ret == STATUS_BUFFER_TOO_SMALL) ret = STATUS_INFO_LENGTH_MISMATCH;
532 len = sizeof(UNICODE_STRING) + reply->filename_len;
533 if (ret == STATUS_SUCCESS)
535 image_file_name_str->MaximumLength = image_file_name_str->Length = reply->filename_len;
536 image_file_name_str->Buffer = (PWSTR)(image_file_name_str + 1);
539 SERVER_END_REQ;
540 break;
541 case ProcessExecuteFlags:
542 len = sizeof(ULONG);
543 if (ProcessInformationLength == len)
544 *(ULONG *)ProcessInformation = execute_flags;
545 else
546 ret = STATUS_INFO_LENGTH_MISMATCH;
547 break;
548 default:
549 FIXME("(%p,info_class=%d,%p,0x%08x,%p) Unknown information class\n",
550 ProcessHandle,ProcessInformationClass,
551 ProcessInformation,ProcessInformationLength,
552 ReturnLength);
553 ret = STATUS_INVALID_INFO_CLASS;
554 break;
557 if (ReturnLength) *ReturnLength = len;
559 return ret;
562 /******************************************************************************
563 * NtSetInformationProcess [NTDLL.@]
564 * ZwSetInformationProcess [NTDLL.@]
566 NTSTATUS WINAPI NtSetInformationProcess(
567 IN HANDLE ProcessHandle,
568 IN PROCESSINFOCLASS ProcessInformationClass,
569 IN PVOID ProcessInformation,
570 IN ULONG ProcessInformationLength)
572 NTSTATUS ret = STATUS_SUCCESS;
574 switch (ProcessInformationClass)
576 case ProcessDefaultHardErrorMode:
577 if (ProcessInformationLength != sizeof(UINT)) return STATUS_INVALID_PARAMETER;
578 process_error_mode = *(UINT *)ProcessInformation;
579 break;
580 case ProcessAffinityMask:
582 const ULONG_PTR system_mask = get_system_affinity_mask();
584 if (ProcessInformationLength != sizeof(DWORD_PTR)) return STATUS_INVALID_PARAMETER;
585 if (*(PDWORD_PTR)ProcessInformation & ~system_mask)
586 return STATUS_INVALID_PARAMETER;
587 if (!*(PDWORD_PTR)ProcessInformation)
588 return STATUS_INVALID_PARAMETER;
589 SERVER_START_REQ( set_process_info )
591 req->handle = wine_server_obj_handle( ProcessHandle );
592 req->affinity = *(PDWORD_PTR)ProcessInformation;
593 req->mask = SET_PROCESS_INFO_AFFINITY;
594 ret = wine_server_call( req );
596 SERVER_END_REQ;
597 break;
599 case ProcessPriorityClass:
600 if (ProcessInformationLength != sizeof(PROCESS_PRIORITY_CLASS))
601 return STATUS_INVALID_PARAMETER;
602 else
604 PROCESS_PRIORITY_CLASS* ppc = ProcessInformation;
606 SERVER_START_REQ( set_process_info )
608 req->handle = wine_server_obj_handle( ProcessHandle );
609 /* FIXME Foreground isn't used */
610 req->priority = ppc->PriorityClass;
611 req->mask = SET_PROCESS_INFO_PRIORITY;
612 ret = wine_server_call( req );
614 SERVER_END_REQ;
616 break;
618 case ProcessExecuteFlags:
619 if (ProcessInformationLength != sizeof(ULONG))
620 return STATUS_INVALID_PARAMETER;
621 else if (execute_flags & MEM_EXECUTE_OPTION_PERMANENT)
622 return STATUS_ACCESS_DENIED;
623 else
625 BOOL enable;
626 switch (*(ULONG *)ProcessInformation & (MEM_EXECUTE_OPTION_ENABLE|MEM_EXECUTE_OPTION_DISABLE))
628 case MEM_EXECUTE_OPTION_ENABLE:
629 enable = TRUE;
630 break;
631 case MEM_EXECUTE_OPTION_DISABLE:
632 enable = FALSE;
633 break;
634 default:
635 return STATUS_INVALID_PARAMETER;
637 execute_flags = *(ULONG *)ProcessInformation;
638 VIRTUAL_SetForceExec( enable );
640 break;
642 default:
643 FIXME("(%p,0x%08x,%p,0x%08x) stub\n",
644 ProcessHandle,ProcessInformationClass,ProcessInformation,
645 ProcessInformationLength);
646 ret = STATUS_NOT_IMPLEMENTED;
647 break;
649 return ret;
652 /******************************************************************************
653 * NtFlushInstructionCache [NTDLL.@]
654 * ZwFlushInstructionCache [NTDLL.@]
656 NTSTATUS WINAPI NtFlushInstructionCache(
657 IN HANDLE ProcessHandle,
658 IN LPCVOID BaseAddress,
659 IN SIZE_T Size)
661 static int once;
662 if (!once++)
664 #if defined(__x86_64__) || defined(__i386__)
665 TRACE("%p %p %ld - no-op on x86 and x86_64\n", ProcessHandle, BaseAddress, Size );
666 #else
667 FIXME("%p %p %ld\n", ProcessHandle, BaseAddress, Size );
668 #endif
670 return STATUS_SUCCESS;
673 /******************************************************************
674 * NtOpenProcess [NTDLL.@]
675 * ZwOpenProcess [NTDLL.@]
677 NTSTATUS WINAPI NtOpenProcess(PHANDLE handle, ACCESS_MASK access,
678 const OBJECT_ATTRIBUTES* attr, const CLIENT_ID* cid)
680 NTSTATUS status;
682 SERVER_START_REQ( open_process )
684 req->pid = HandleToULong(cid->UniqueProcess);
685 req->access = access;
686 req->attributes = attr ? attr->Attributes : 0;
687 status = wine_server_call( req );
688 if (!status) *handle = wine_server_ptr_handle( reply->handle );
690 SERVER_END_REQ;
691 return status;
694 /******************************************************************************
695 * NtResumeProcess
696 * ZwResumeProcess
698 NTSTATUS WINAPI NtResumeProcess( HANDLE handle )
700 FIXME("stub: %p\n", handle);
701 return STATUS_NOT_IMPLEMENTED;
704 /******************************************************************************
705 * NtSuspendProcess
706 * ZwSuspendProcess
708 NTSTATUS WINAPI NtSuspendProcess( HANDLE handle )
710 FIXME("stub: %p\n", handle);
711 return STATUS_NOT_IMPLEMENTED;