d2d1: Split overlapping bezier control triangles.
[wine.git] / dlls / ntdll / om.c
blob1279f2bb4c60b110dfe0762c63252bc4514bcbb3
1 /*
2 * Object management functions
4 * Copyright 1999, 2000 Juergen Schmied
5 * Copyright 2005 Vitaliy Margolen
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #include "config.h"
24 #include <stdarg.h>
25 #include <stdlib.h>
26 #include <string.h>
27 #ifdef HAVE_IO_H
28 # include <io.h>
29 #endif
30 #ifdef HAVE_UNISTD_H
31 # include <unistd.h>
32 #endif
34 #include "ntstatus.h"
35 #define WIN32_NO_STATUS
36 #include "wine/debug.h"
37 #include "windef.h"
38 #include "winternl.h"
39 #include "ntdll_misc.h"
40 #include "wine/server.h"
42 WINE_DEFAULT_DEBUG_CHANNEL(ntdll);
46 * Generic object functions
49 /******************************************************************************
50 * NtQueryObject [NTDLL.@]
51 * ZwQueryObject [NTDLL.@]
53 NTSTATUS WINAPI NtQueryObject(IN HANDLE handle,
54 IN OBJECT_INFORMATION_CLASS info_class,
55 OUT PVOID ptr, IN ULONG len, OUT PULONG used_len)
57 NTSTATUS status;
59 TRACE("(%p,0x%08x,%p,0x%08x,%p)\n", handle, info_class, ptr, len, used_len);
61 if (used_len) *used_len = 0;
63 switch (info_class)
65 case ObjectBasicInformation:
67 POBJECT_BASIC_INFORMATION p = ptr;
69 if (len < sizeof(*p)) return STATUS_INVALID_BUFFER_SIZE;
71 SERVER_START_REQ( get_object_info )
73 req->handle = wine_server_obj_handle( handle );
74 status = wine_server_call( req );
75 if (status == STATUS_SUCCESS)
77 memset( p, 0, sizeof(*p) );
78 p->GrantedAccess = reply->access;
79 p->PointerCount = reply->ref_count;
80 p->HandleCount = reply->handle_count;
81 if (used_len) *used_len = sizeof(*p);
84 SERVER_END_REQ;
86 break;
87 case ObjectNameInformation:
89 OBJECT_NAME_INFORMATION* p = ptr;
90 ANSI_STRING unix_name;
92 /* first try as a file object */
94 if (!(status = server_get_unix_name( handle, &unix_name )))
96 UNICODE_STRING nt_name;
98 if (!(status = wine_unix_to_nt_file_name( &unix_name, &nt_name )))
100 if (len < sizeof(*p))
101 status = STATUS_INFO_LENGTH_MISMATCH;
102 else if (len < sizeof(*p) + nt_name.MaximumLength)
103 status = STATUS_BUFFER_OVERFLOW;
104 else
106 p->Name.Buffer = (WCHAR *)(p + 1);
107 p->Name.Length = nt_name.Length;
108 p->Name.MaximumLength = nt_name.MaximumLength;
109 memcpy( p->Name.Buffer, nt_name.Buffer, nt_name.MaximumLength );
111 if (used_len) *used_len = sizeof(*p) + nt_name.MaximumLength;
112 RtlFreeUnicodeString( &nt_name );
114 RtlFreeAnsiString( &unix_name );
115 break;
117 else if (status != STATUS_OBJECT_TYPE_MISMATCH) break;
119 /* not a file, treat as a generic object */
121 SERVER_START_REQ( get_object_info )
123 req->handle = wine_server_obj_handle( handle );
124 if (len > sizeof(*p)) wine_server_set_reply( req, p + 1, len - sizeof(*p) );
125 status = wine_server_call( req );
126 if (status == STATUS_SUCCESS)
128 if (!reply->total) /* no name */
130 if (sizeof(*p) > len) status = STATUS_INFO_LENGTH_MISMATCH;
131 else memset( p, 0, sizeof(*p) );
132 if (used_len) *used_len = sizeof(*p);
134 else if (sizeof(*p) + reply->total + sizeof(WCHAR) > len)
136 if (used_len) *used_len = sizeof(*p) + reply->total + sizeof(WCHAR);
137 status = STATUS_INFO_LENGTH_MISMATCH;
139 else
141 ULONG res = wine_server_reply_size( reply );
142 p->Name.Buffer = (WCHAR *)(p + 1);
143 p->Name.Length = res;
144 p->Name.MaximumLength = res + sizeof(WCHAR);
145 p->Name.Buffer[res / sizeof(WCHAR)] = 0;
146 if (used_len) *used_len = sizeof(*p) + p->Name.MaximumLength;
150 SERVER_END_REQ;
152 break;
153 case ObjectTypeInformation:
155 OBJECT_TYPE_INFORMATION *p = ptr;
157 SERVER_START_REQ( get_object_type )
159 req->handle = wine_server_obj_handle( handle );
160 if (len > sizeof(*p)) wine_server_set_reply( req, p + 1, len - sizeof(*p) );
161 status = wine_server_call( req );
162 if (status == STATUS_SUCCESS)
164 if (!reply->total) /* no name */
166 if (sizeof(*p) > len) status = STATUS_INFO_LENGTH_MISMATCH;
167 else memset( p, 0, sizeof(*p) );
168 if (used_len) *used_len = sizeof(*p);
170 else if (sizeof(*p) + reply->total + sizeof(WCHAR) > len)
172 if (used_len) *used_len = sizeof(*p) + reply->total + sizeof(WCHAR);
173 status = STATUS_INFO_LENGTH_MISMATCH;
175 else
177 ULONG res = wine_server_reply_size( reply );
178 p->TypeName.Buffer = (WCHAR *)(p + 1);
179 p->TypeName.Length = res;
180 p->TypeName.MaximumLength = res + sizeof(WCHAR);
181 p->TypeName.Buffer[res / sizeof(WCHAR)] = 0;
182 if (used_len) *used_len = sizeof(*p) + p->TypeName.MaximumLength;
186 SERVER_END_REQ;
188 break;
189 case ObjectDataInformation:
191 OBJECT_DATA_INFORMATION* p = ptr;
193 if (len < sizeof(*p)) return STATUS_INVALID_BUFFER_SIZE;
195 SERVER_START_REQ( set_handle_info )
197 req->handle = wine_server_obj_handle( handle );
198 req->flags = 0;
199 req->mask = 0;
200 status = wine_server_call( req );
201 if (status == STATUS_SUCCESS)
203 p->InheritHandle = (reply->old_flags & HANDLE_FLAG_INHERIT) != 0;
204 p->ProtectFromClose = (reply->old_flags & HANDLE_FLAG_PROTECT_FROM_CLOSE) != 0;
205 if (used_len) *used_len = sizeof(*p);
208 SERVER_END_REQ;
210 break;
211 default:
212 FIXME("Unsupported information class %u\n", info_class);
213 status = STATUS_NOT_IMPLEMENTED;
214 break;
216 return status;
219 /******************************************************************
220 * NtSetInformationObject [NTDLL.@]
221 * ZwSetInformationObject [NTDLL.@]
224 NTSTATUS WINAPI NtSetInformationObject(IN HANDLE handle,
225 IN OBJECT_INFORMATION_CLASS info_class,
226 IN PVOID ptr, IN ULONG len)
228 NTSTATUS status;
230 TRACE("(%p,0x%08x,%p,0x%08x)\n", handle, info_class, ptr, len);
232 switch (info_class)
234 case ObjectDataInformation:
236 OBJECT_DATA_INFORMATION* p = ptr;
238 if (len < sizeof(*p)) return STATUS_INVALID_BUFFER_SIZE;
240 SERVER_START_REQ( set_handle_info )
242 req->handle = wine_server_obj_handle( handle );
243 req->flags = 0;
244 req->mask = HANDLE_FLAG_INHERIT | HANDLE_FLAG_PROTECT_FROM_CLOSE;
245 if (p->InheritHandle) req->flags |= HANDLE_FLAG_INHERIT;
246 if (p->ProtectFromClose) req->flags |= HANDLE_FLAG_PROTECT_FROM_CLOSE;
247 status = wine_server_call( req );
249 SERVER_END_REQ;
251 break;
252 default:
253 FIXME("Unsupported information class %u\n", info_class);
254 status = STATUS_NOT_IMPLEMENTED;
255 break;
257 return status;
260 /******************************************************************************
261 * NtQuerySecurityObject [NTDLL.@]
263 * An ntdll analogue to GetKernelObjectSecurity().
266 NTSTATUS WINAPI
267 NtQuerySecurityObject(
268 IN HANDLE Object,
269 IN SECURITY_INFORMATION RequestedInformation,
270 OUT PSECURITY_DESCRIPTOR pSecurityDescriptor,
271 IN ULONG Length,
272 OUT PULONG ResultLength)
274 PISECURITY_DESCRIPTOR_RELATIVE psd = pSecurityDescriptor;
275 NTSTATUS status;
276 unsigned int buffer_size = 512;
277 BOOLEAN need_more_memory;
279 TRACE("(%p,0x%08x,%p,0x%08x,%p)\n",
280 Object, RequestedInformation, pSecurityDescriptor, Length, ResultLength);
284 char *buffer = RtlAllocateHeap(GetProcessHeap(), 0, buffer_size);
285 if (!buffer)
286 return STATUS_NO_MEMORY;
288 need_more_memory = FALSE;
290 SERVER_START_REQ( get_security_object )
292 req->handle = wine_server_obj_handle( Object );
293 req->security_info = RequestedInformation;
294 wine_server_set_reply( req, buffer, buffer_size );
295 status = wine_server_call( req );
296 if (status == STATUS_SUCCESS)
298 struct security_descriptor *sd = (struct security_descriptor *)buffer;
299 if (reply->sd_len)
301 *ResultLength = sizeof(SECURITY_DESCRIPTOR_RELATIVE) +
302 sd->owner_len + sd->group_len + sd->sacl_len + sd->dacl_len;
303 if (Length >= *ResultLength)
305 psd->Revision = SECURITY_DESCRIPTOR_REVISION;
306 psd->Sbz1 = 0;
307 psd->Control = sd->control | SE_SELF_RELATIVE;
308 psd->Owner = sd->owner_len ? sizeof(SECURITY_DESCRIPTOR_RELATIVE) : 0;
309 psd->Group = sd->group_len ? sizeof(SECURITY_DESCRIPTOR_RELATIVE) + sd->owner_len : 0;
310 psd->Sacl = sd->sacl_len ? sizeof(SECURITY_DESCRIPTOR_RELATIVE) + sd->owner_len + sd->group_len : 0;
311 psd->Dacl = sd->dacl_len ? sizeof(SECURITY_DESCRIPTOR_RELATIVE) + sd->owner_len + sd->group_len + sd->sacl_len : 0;
312 /* owner, group, sacl and dacl are the same type as in the server
313 * and in the same order so we copy the memory in one block */
314 memcpy((char *)pSecurityDescriptor + sizeof(SECURITY_DESCRIPTOR_RELATIVE),
315 buffer + sizeof(struct security_descriptor),
316 sd->owner_len + sd->group_len + sd->sacl_len + sd->dacl_len);
318 else
319 status = STATUS_BUFFER_TOO_SMALL;
321 else
323 *ResultLength = sizeof(SECURITY_DESCRIPTOR_RELATIVE);
324 if (Length >= *ResultLength)
326 memset(psd, 0, sizeof(*psd));
327 psd->Revision = SECURITY_DESCRIPTOR_REVISION;
328 psd->Control = SE_SELF_RELATIVE;
330 else
331 status = STATUS_BUFFER_TOO_SMALL;
334 else if (status == STATUS_BUFFER_TOO_SMALL)
336 buffer_size = reply->sd_len;
337 need_more_memory = TRUE;
340 SERVER_END_REQ;
341 RtlFreeHeap(GetProcessHeap(), 0, buffer);
342 } while (need_more_memory);
344 return status;
348 /******************************************************************************
349 * NtDuplicateObject [NTDLL.@]
350 * ZwDuplicateObject [NTDLL.@]
352 NTSTATUS WINAPI NtDuplicateObject( HANDLE source_process, HANDLE source,
353 HANDLE dest_process, PHANDLE dest,
354 ACCESS_MASK access, ULONG attributes, ULONG options )
356 NTSTATUS ret;
357 SERVER_START_REQ( dup_handle )
359 req->src_process = wine_server_obj_handle( source_process );
360 req->src_handle = wine_server_obj_handle( source );
361 req->dst_process = wine_server_obj_handle( dest_process );
362 req->access = access;
363 req->attributes = attributes;
364 req->options = options;
366 if (!(ret = wine_server_call( req )))
368 if (dest) *dest = wine_server_ptr_handle( reply->handle );
369 if (reply->closed && reply->self)
371 int fd = server_remove_fd_from_cache( source );
372 if (fd != -1) close( fd );
376 SERVER_END_REQ;
377 return ret;
380 /* Everquest 2 / Pirates of the Burning Sea hooks NtClose, so we need a wrapper */
381 NTSTATUS close_handle( HANDLE handle )
383 NTSTATUS ret;
384 int fd = server_remove_fd_from_cache( handle );
386 SERVER_START_REQ( close_handle )
388 req->handle = wine_server_obj_handle( handle );
389 ret = wine_server_call( req );
391 SERVER_END_REQ;
392 if (fd != -1) close( fd );
393 return ret;
396 /**************************************************************************
397 * NtClose [NTDLL.@]
399 * Close a handle reference to an object.
401 * PARAMS
402 * Handle [I] handle to close
404 * RETURNS
405 * Success: ERROR_SUCCESS.
406 * Failure: An NTSTATUS error code.
408 NTSTATUS WINAPI NtClose( HANDLE Handle )
410 return close_handle( Handle );
414 * Directory functions
417 /**************************************************************************
418 * NtOpenDirectoryObject [NTDLL.@]
419 * ZwOpenDirectoryObject [NTDLL.@]
421 * Open a namespace directory object.
423 * PARAMS
424 * DirectoryHandle [O] Destination for the new directory handle
425 * DesiredAccess [I] Desired access to the directory
426 * ObjectAttributes [I] Structure describing the directory
428 * RETURNS
429 * Success: ERROR_SUCCESS.
430 * Failure: An NTSTATUS error code.
432 NTSTATUS WINAPI NtOpenDirectoryObject( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr)
434 NTSTATUS ret;
436 if (!handle) return STATUS_ACCESS_VIOLATION;
437 if ((ret = validate_open_object_attributes( attr ))) return ret;
439 TRACE("(%p,0x%08x,%s)\n", handle, access, debugstr_ObjectAttributes(attr));
441 SERVER_START_REQ(open_directory)
443 req->access = access;
444 req->attributes = attr->Attributes;
445 req->rootdir = wine_server_obj_handle( attr->RootDirectory );
446 if (attr->ObjectName)
447 wine_server_add_data( req, attr->ObjectName->Buffer, attr->ObjectName->Length );
448 ret = wine_server_call( req );
449 *handle = wine_server_ptr_handle( reply->handle );
451 SERVER_END_REQ;
452 return ret;
455 /******************************************************************************
456 * NtCreateDirectoryObject [NTDLL.@]
457 * ZwCreateDirectoryObject [NTDLL.@]
459 * Create a namespace directory object.
461 * PARAMS
462 * DirectoryHandle [O] Destination for the new directory handle
463 * DesiredAccess [I] Desired access to the directory
464 * ObjectAttributes [I] Structure describing the directory
466 * RETURNS
467 * Success: ERROR_SUCCESS.
468 * Failure: An NTSTATUS error code.
470 NTSTATUS WINAPI NtCreateDirectoryObject(PHANDLE DirectoryHandle, ACCESS_MASK DesiredAccess,
471 OBJECT_ATTRIBUTES *attr )
473 NTSTATUS ret;
474 data_size_t len;
475 struct object_attributes *objattr;
477 if (!DirectoryHandle) return STATUS_ACCESS_VIOLATION;
478 TRACE("(%p,0x%08x,%s)\n", DirectoryHandle, DesiredAccess, debugstr_ObjectAttributes(attr));
480 if ((ret = alloc_object_attributes( attr, &objattr, &len ))) return ret;
482 SERVER_START_REQ(create_directory)
484 req->access = DesiredAccess;
485 wine_server_add_data( req, objattr, len );
486 ret = wine_server_call( req );
487 *DirectoryHandle = wine_server_ptr_handle( reply->handle );
489 SERVER_END_REQ;
491 RtlFreeHeap( GetProcessHeap(), 0, objattr );
492 return ret;
495 /******************************************************************************
496 * NtQueryDirectoryObject [NTDLL.@]
497 * ZwQueryDirectoryObject [NTDLL.@]
499 * Read information from a namespace directory.
501 * PARAMS
502 * handle [I] Handle to a directory object
503 * buffer [O] Buffer to hold the read data
504 * size [I] Size of the buffer in bytes
505 * single_entry [I] If TRUE, return a single entry, if FALSE, return as many as fit in the buffer
506 * restart [I] If TRUE, start scanning from the start, if FALSE, scan from Context
507 * context [I/O] Indicates what point of the directory the scan is at
508 * ret_size [O] Caller supplied storage for the number of bytes written (or NULL)
510 * RETURNS
511 * Success: ERROR_SUCCESS.
512 * Failure: An NTSTATUS error code.
514 NTSTATUS WINAPI NtQueryDirectoryObject(HANDLE handle, PDIRECTORY_BASIC_INFORMATION buffer,
515 ULONG size, BOOLEAN single_entry, BOOLEAN restart,
516 PULONG context, PULONG ret_size)
518 NTSTATUS ret;
520 if (restart) *context = 0;
522 if (single_entry)
524 if (size <= sizeof(*buffer) + 2*sizeof(WCHAR)) return STATUS_BUFFER_OVERFLOW;
526 SERVER_START_REQ( get_directory_entry )
528 req->handle = wine_server_obj_handle( handle );
529 req->index = *context;
530 wine_server_set_reply( req, buffer + 1, size - sizeof(*buffer) - 2*sizeof(WCHAR) );
531 if (!(ret = wine_server_call( req )))
533 buffer->ObjectName.Buffer = (WCHAR *)(buffer + 1);
534 buffer->ObjectName.Length = reply->name_len;
535 buffer->ObjectName.MaximumLength = reply->name_len + sizeof(WCHAR);
536 buffer->ObjectTypeName.Buffer = (WCHAR *)(buffer + 1) + reply->name_len/sizeof(WCHAR) + 1;
537 buffer->ObjectTypeName.Length = wine_server_reply_size( reply ) - reply->name_len;
538 buffer->ObjectTypeName.MaximumLength = buffer->ObjectTypeName.Length + sizeof(WCHAR);
539 /* make room for the terminating null */
540 memmove( buffer->ObjectTypeName.Buffer, buffer->ObjectTypeName.Buffer - 1,
541 buffer->ObjectTypeName.Length );
542 buffer->ObjectName.Buffer[buffer->ObjectName.Length/sizeof(WCHAR)] = 0;
543 buffer->ObjectTypeName.Buffer[buffer->ObjectTypeName.Length/sizeof(WCHAR)] = 0;
544 (*context)++;
547 SERVER_END_REQ;
548 if (ret_size)
549 *ret_size = buffer->ObjectName.MaximumLength + buffer->ObjectTypeName.MaximumLength + sizeof(*buffer);
551 else
553 FIXME("multiple entries not implemented\n");
554 ret = STATUS_NOT_IMPLEMENTED;
557 return ret;
561 * Link objects
564 /******************************************************************************
565 * NtOpenSymbolicLinkObject [NTDLL.@]
566 * ZwOpenSymbolicLinkObject [NTDLL.@]
568 * Open a namespace symbolic link object.
570 * PARAMS
571 * LinkHandle [O] Destination for the new symbolic link handle
572 * DesiredAccess [I] Desired access to the symbolic link
573 * ObjectAttributes [I] Structure describing the symbolic link
575 * RETURNS
576 * Success: ERROR_SUCCESS.
577 * Failure: An NTSTATUS error code.
579 NTSTATUS WINAPI NtOpenSymbolicLinkObject( HANDLE *handle, ACCESS_MASK access,
580 const OBJECT_ATTRIBUTES *attr)
582 NTSTATUS ret;
584 TRACE("(%p,0x%08x,%s)\n", handle, access, debugstr_ObjectAttributes(attr));
586 if (!handle) return STATUS_ACCESS_VIOLATION;
587 if ((ret = validate_open_object_attributes( attr ))) return ret;
589 SERVER_START_REQ(open_symlink)
591 req->access = access;
592 req->attributes = attr->Attributes;
593 req->rootdir = wine_server_obj_handle( attr->RootDirectory );
594 if (attr->ObjectName)
595 wine_server_add_data( req, attr->ObjectName->Buffer, attr->ObjectName->Length );
596 ret = wine_server_call( req );
597 *handle = wine_server_ptr_handle( reply->handle );
599 SERVER_END_REQ;
600 return ret;
603 /******************************************************************************
604 * NtCreateSymbolicLinkObject [NTDLL.@]
605 * ZwCreateSymbolicLinkObject [NTDLL.@]
607 * Open a namespace symbolic link object.
609 * PARAMS
610 * SymbolicLinkHandle [O] Destination for the new symbolic link handle
611 * DesiredAccess [I] Desired access to the symbolic link
612 * ObjectAttributes [I] Structure describing the symbolic link
613 * TargetName [I] Name of the target symbolic link points to
615 * RETURNS
616 * Success: ERROR_SUCCESS.
617 * Failure: An NTSTATUS error code.
619 NTSTATUS WINAPI NtCreateSymbolicLinkObject(OUT PHANDLE SymbolicLinkHandle,IN ACCESS_MASK DesiredAccess,
620 POBJECT_ATTRIBUTES attr, PUNICODE_STRING TargetName)
622 NTSTATUS ret;
623 data_size_t len;
624 struct object_attributes *objattr;
626 if (!SymbolicLinkHandle || !attr || !TargetName) return STATUS_ACCESS_VIOLATION;
627 if (!TargetName->Buffer) return STATUS_INVALID_PARAMETER;
629 TRACE("(%p,0x%08x,%s -> %s)\n", SymbolicLinkHandle, DesiredAccess,
630 debugstr_ObjectAttributes(attr), debugstr_us(TargetName));
632 if ((ret = alloc_object_attributes( attr, &objattr, &len ))) return ret;
634 SERVER_START_REQ(create_symlink)
636 req->access = DesiredAccess;
637 wine_server_add_data( req, objattr, len );
638 wine_server_add_data(req, TargetName->Buffer, TargetName->Length);
639 ret = wine_server_call( req );
640 *SymbolicLinkHandle = wine_server_ptr_handle( reply->handle );
642 SERVER_END_REQ;
644 RtlFreeHeap( GetProcessHeap(), 0, objattr );
645 return ret;
648 /******************************************************************************
649 * NtQuerySymbolicLinkObject [NTDLL.@]
650 * ZwQuerySymbolicLinkObject [NTDLL.@]
652 * Query a namespace symbolic link object target name.
654 * PARAMS
655 * handle [I] Handle to a symbolic link object
656 * target [O] Destination for the symbolic link target
657 * length [O] Size of returned data
659 * RETURNS
660 * Success: ERROR_SUCCESS.
661 * Failure: An NTSTATUS error code.
663 NTSTATUS WINAPI NtQuerySymbolicLinkObject( HANDLE handle, PUNICODE_STRING target, PULONG length )
665 NTSTATUS ret;
667 TRACE("(%p,%p,%p)\n", handle, target, length );
669 if (!target) return STATUS_ACCESS_VIOLATION;
671 SERVER_START_REQ(query_symlink)
673 req->handle = wine_server_obj_handle( handle );
674 if (target->MaximumLength >= sizeof(WCHAR))
675 wine_server_set_reply( req, target->Buffer, target->MaximumLength - sizeof(WCHAR) );
676 if (!(ret = wine_server_call( req )))
678 target->Length = wine_server_reply_size(reply);
679 target->Buffer[target->Length / sizeof(WCHAR)] = 0;
680 if (length) *length = reply->total + sizeof(WCHAR);
682 else if (length && ret == STATUS_BUFFER_TOO_SMALL) *length = reply->total + sizeof(WCHAR);
684 SERVER_END_REQ;
685 return ret;
688 /******************************************************************************
689 * NtAllocateUuids [NTDLL.@]
691 NTSTATUS WINAPI NtAllocateUuids(
692 PULARGE_INTEGER Time,
693 PULONG Range,
694 PULONG Sequence)
696 FIXME("(%p,%p,%p), stub.\n", Time, Range, Sequence);
697 return 0;
700 /**************************************************************************
701 * NtMakeTemporaryObject [NTDLL.@]
702 * ZwMakeTemporaryObject [NTDLL.@]
704 * Make a permanent object temporary.
706 * PARAMS
707 * Handle [I] handle to permanent object
709 * RETURNS
710 * Success: STATUS_SUCCESS.
711 * Failure: An NTSTATUS error code.
713 NTSTATUS WINAPI NtMakeTemporaryObject( HANDLE Handle )
715 FIXME("(%p), stub.\n", Handle);
716 return STATUS_SUCCESS;