Fixed NtQueryInformationProcess to return correct information and
[wine/multimedia.git] / dlls / ntdll / nt.c
blob228dc1218c65f6ef8c216027f0f218115090c5eb
1 /*
2 * NT basis DLL
3 *
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 #include <stdio.h>
25 #include <stdlib.h>
26 #include <string.h>
27 #include <time.h>
28 #include "wine/debug.h"
30 #include "ntddk.h"
31 #include "ntdll_misc.h"
32 #include "wine/server.h"
34 WINE_DEFAULT_DEBUG_CHANNEL(ntdll);
37 * Timer object
40 /**************************************************************************
41 * NtCreateTimer [NTDLL.@]
42 * ZwCreateTimer [NTDLL.@]
44 NTSTATUS WINAPI NtCreateTimer(
45 OUT PHANDLE TimerHandle,
46 IN ACCESS_MASK DesiredAccess,
47 IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
48 IN TIMER_TYPE TimerType)
50 FIXME("(%p,0x%08lx,%p,0x%08x) stub\n",
51 TimerHandle,DesiredAccess,ObjectAttributes, TimerType);
52 dump_ObjectAttributes(ObjectAttributes);
53 return 0;
55 /**************************************************************************
56 * NtSetTimer [NTDLL.@]
57 * ZwSetTimer [NTDLL.@]
59 NTSTATUS WINAPI NtSetTimer(
60 IN HANDLE TimerHandle,
61 IN PLARGE_INTEGER DueTime,
62 IN PTIMERAPCROUTINE TimerApcRoutine,
63 IN PVOID TimerContext,
64 IN BOOLEAN WakeTimer,
65 IN ULONG Period OPTIONAL,
66 OUT PBOOLEAN PreviousState OPTIONAL)
68 FIXME("(0x%08x,%p,%p,%p,%08x,0x%08lx,%p) stub\n",
69 TimerHandle,DueTime,TimerApcRoutine,TimerContext,WakeTimer,Period,PreviousState);
70 return 0;
73 /******************************************************************************
74 * NtQueryTimerResolution [NTDLL.@]
76 NTSTATUS WINAPI NtQueryTimerResolution(DWORD x1,DWORD x2,DWORD x3)
78 FIXME("(0x%08lx,0x%08lx,0x%08lx), stub!\n",x1,x2,x3);
79 return 1;
83 * Process object
86 /******************************************************************************
87 * NtTerminateProcess [NTDLL.@]
89 * Native applications must kill themselves when done
91 NTSTATUS WINAPI NtTerminateProcess( HANDLE handle, LONG exit_code )
93 NTSTATUS ret;
94 BOOL self;
95 SERVER_START_REQ( terminate_process )
97 req->handle = handle;
98 req->exit_code = exit_code;
99 ret = wine_server_call( req );
100 self = !ret && reply->self;
102 SERVER_END_REQ;
103 if (self) exit( exit_code );
104 return ret;
107 /******************************************************************************
108 * NtQueryInformationProcess [NTDLL.@]
109 * ZwQueryInformationProcess [NTDLL.@]
112 NTSTATUS WINAPI NtQueryInformationProcess(
113 IN HANDLE ProcessHandle,
114 IN PROCESSINFOCLASS ProcessInformationClass,
115 OUT PVOID ProcessInformation,
116 IN ULONG ProcessInformationLength,
117 OUT PULONG ReturnLength)
119 NTSTATUS ret = STATUS_SUCCESS;
120 ULONG len = 0;
122 switch (ProcessInformationClass) {
123 case ProcessDebugPort:
124 /* "These are not the debuggers you are looking for." */
125 /* set it to 0 aka "no debugger" to satisfy copy protections */
126 if (ProcessInformationLength == 4)
128 memset(ProcessInformation,0,ProcessInformationLength);
129 len = 4;
131 else
132 ret = STATUS_INFO_LENGTH_MISMATCH;
133 break;
134 default:
135 FIXME("(0x%08x,0x%08x,%p,0x%08lx,%p),stub!\n",
136 ProcessHandle,ProcessInformationClass,
137 ProcessInformation,ProcessInformationLength,
138 ReturnLength
140 break;
143 if (ReturnLength)
144 *ReturnLength = len;
146 return ret;
149 /******************************************************************************
150 * NtSetInformationProcess [NTDLL.@]
151 * ZwSetInformationProcess [NTDLL.@]
153 NTSTATUS WINAPI NtSetInformationProcess(
154 IN HANDLE ProcessHandle,
155 IN PROCESSINFOCLASS ProcessInformationClass,
156 IN PVOID ProcessInformation,
157 IN ULONG ProcessInformationLength)
159 FIXME("(0x%08x,0x%08x,%p,0x%08lx) stub\n",
160 ProcessHandle,ProcessInformationClass,ProcessInformation,ProcessInformationLength);
161 return 0;
165 * Thread
168 /******************************************************************************
169 * NtResumeThread [NTDLL.@]
170 * ZwResumeThread [NTDLL.@]
172 NTSTATUS WINAPI NtResumeThread(
173 IN HANDLE ThreadHandle,
174 IN PULONG SuspendCount)
176 FIXME("(0x%08x,%p),stub!\n",
177 ThreadHandle,SuspendCount);
178 return 0;
182 /******************************************************************************
183 * NtTerminateThread [NTDLL.@]
184 * ZwTerminateThread [NTDLL.@]
186 NTSTATUS WINAPI NtTerminateThread( HANDLE handle, LONG exit_code )
188 NTSTATUS ret;
189 BOOL self, last;
191 SERVER_START_REQ( terminate_thread )
193 req->handle = handle;
194 req->exit_code = exit_code;
195 ret = wine_server_call( req );
196 self = !ret && reply->self;
197 last = reply->last;
199 SERVER_END_REQ;
201 if (self)
203 if (last) exit( exit_code );
204 else SYSDEPS_ExitThread( exit_code );
206 return ret;
210 /******************************************************************************
211 * NtQueryInformationThread [NTDLL.@]
212 * ZwQueryInformationThread [NTDLL.@]
215 NTSTATUS WINAPI NtQueryInformationThread(
216 IN HANDLE ThreadHandle,
217 IN THREADINFOCLASS ThreadInformationClass,
218 OUT PVOID ThreadInformation,
219 IN ULONG ThreadInformationLength,
220 OUT PULONG ReturnLength)
222 FIXME("(0x%08x,0x%08x,%p,0x%08lx,%p),stub!\n",
223 ThreadHandle, ThreadInformationClass, ThreadInformation,
224 ThreadInformationLength, ReturnLength);
225 return 0;
228 /******************************************************************************
229 * NtSetInformationThread [NTDLL.@]
230 * ZwSetInformationThread [NTDLL.@]
232 NTSTATUS WINAPI NtSetInformationThread(
233 HANDLE ThreadHandle,
234 THREADINFOCLASS ThreadInformationClass,
235 PVOID ThreadInformation,
236 ULONG ThreadInformationLength)
238 FIXME("(0x%08x,0x%08x,%p,0x%08lx),stub!\n",
239 ThreadHandle, ThreadInformationClass, ThreadInformation, ThreadInformationLength);
240 return 0;
244 * Token
247 /******************************************************************************
248 * NtDuplicateToken [NTDLL.@]
249 * ZwDuplicateToken [NTDLL.@]
251 NTSTATUS WINAPI NtDuplicateToken(
252 IN HANDLE ExistingToken,
253 IN ACCESS_MASK DesiredAccess,
254 IN POBJECT_ATTRIBUTES ObjectAttributes,
255 IN SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,
256 IN TOKEN_TYPE TokenType,
257 OUT PHANDLE NewToken)
259 FIXME("(0x%08x,0x%08lx,%p,0x%08x,0x%08x,%p),stub!\n",
260 ExistingToken, DesiredAccess, ObjectAttributes,
261 ImpersonationLevel, TokenType, NewToken);
262 dump_ObjectAttributes(ObjectAttributes);
263 return 0;
266 /******************************************************************************
267 * NtOpenProcessToken [NTDLL.@]
268 * ZwOpenProcessToken [NTDLL.@]
270 NTSTATUS WINAPI NtOpenProcessToken(
271 HANDLE ProcessHandle,
272 DWORD DesiredAccess,
273 HANDLE *TokenHandle)
275 FIXME("(0x%08x,0x%08lx,%p): stub\n",
276 ProcessHandle,DesiredAccess, TokenHandle);
277 *TokenHandle = 0xcafe;
278 return 0;
281 /******************************************************************************
282 * NtOpenThreadToken [NTDLL.@]
283 * ZwOpenThreadToken [NTDLL.@]
285 NTSTATUS WINAPI NtOpenThreadToken(
286 HANDLE ThreadHandle,
287 DWORD DesiredAccess,
288 BOOLEAN OpenAsSelf,
289 HANDLE *TokenHandle)
291 FIXME("(0x%08x,0x%08lx,0x%08x,%p): stub\n",
292 ThreadHandle,DesiredAccess, OpenAsSelf, TokenHandle);
293 *TokenHandle = 0xcafe;
294 return 0;
297 /******************************************************************************
298 * NtAdjustPrivilegesToken [NTDLL.@]
299 * ZwAdjustGroupsToken [NTDLL.@]
301 * FIXME: parameters unsafe
303 NTSTATUS WINAPI NtAdjustPrivilegesToken(
304 IN HANDLE TokenHandle,
305 IN BOOLEAN DisableAllPrivileges,
306 IN PTOKEN_PRIVILEGES NewState,
307 IN DWORD BufferLength,
308 OUT PTOKEN_PRIVILEGES PreviousState,
309 OUT PDWORD ReturnLength)
311 FIXME("(0x%08x,0x%08x,%p,0x%08lx,%p,%p),stub!\n",
312 TokenHandle, DisableAllPrivileges, NewState, BufferLength, PreviousState, ReturnLength);
313 return 0;
316 /******************************************************************************
317 * NtQueryInformationToken [NTDLL.@]
318 * ZwQueryInformationToken [NTDLL.@]
320 * NOTES
321 * Buffer for TokenUser:
322 * 0x00 TOKEN_USER the PSID field points to the SID
323 * 0x08 SID
326 NTSTATUS WINAPI NtQueryInformationToken(
327 HANDLE token,
328 DWORD tokeninfoclass,
329 LPVOID tokeninfo,
330 DWORD tokeninfolength,
331 LPDWORD retlen )
333 unsigned int len = 0;
335 FIXME("(%08x,%ld,%p,%ld,%p): stub\n",
336 token,tokeninfoclass,tokeninfo,tokeninfolength,retlen);
338 switch (tokeninfoclass)
340 case TokenUser:
341 len = sizeof(TOKEN_USER) + sizeof(SID);
342 break;
343 case TokenGroups:
344 len = sizeof(TOKEN_GROUPS);
345 break;
346 case TokenPrivileges:
347 len = sizeof(TOKEN_PRIVILEGES);
348 break;
349 case TokenOwner:
350 len = sizeof(TOKEN_OWNER);
351 break;
352 case TokenPrimaryGroup:
353 len = sizeof(TOKEN_PRIMARY_GROUP);
354 break;
355 case TokenDefaultDacl:
356 len = sizeof(TOKEN_DEFAULT_DACL);
357 break;
358 case TokenSource:
359 len = sizeof(TOKEN_SOURCE);
360 break;
361 case TokenType:
362 len = sizeof (TOKEN_TYPE);
363 break;
364 #if 0
365 case TokenImpersonationLevel:
366 case TokenStatistics:
367 #endif /* 0 */
370 /* FIXME: what if retlen == NULL ? */
371 *retlen = len;
373 if (tokeninfolength < len)
374 return STATUS_BUFFER_TOO_SMALL;
376 switch (tokeninfoclass)
378 case TokenUser:
379 if( tokeninfo )
381 TOKEN_USER * tuser = tokeninfo;
382 PSID sid = (PSID) (tuser + 1);
383 SID_IDENTIFIER_AUTHORITY localSidAuthority = {SECURITY_NT_AUTHORITY};
384 RtlInitializeSid(sid, &localSidAuthority, 1);
385 *(RtlSubAuthoritySid(sid, 0)) = SECURITY_INTERACTIVE_RID;
386 tuser->User.Sid = sid;
388 break;
389 case TokenGroups:
390 if (tokeninfo)
392 TOKEN_GROUPS *tgroups = tokeninfo;
393 SID_IDENTIFIER_AUTHORITY sid = {SECURITY_NT_AUTHORITY};
395 /* we need to show admin privileges ! */
396 tgroups->GroupCount = 1;
397 RtlAllocateAndInitializeSid( &sid,
399 SECURITY_BUILTIN_DOMAIN_RID,
400 DOMAIN_ALIAS_RID_ADMINS,
401 0, 0, 0, 0, 0, 0,
402 &(tgroups->Groups->Sid));
404 break;
405 case TokenPrivileges:
406 if (tokeninfo)
408 TOKEN_PRIVILEGES *tpriv = tokeninfo;
409 tpriv->PrivilegeCount = 1;
411 break;
413 return 0;
417 * Section
420 /******************************************************************************
421 * NtCreateSection [NTDLL.@]
422 * ZwCreateSection [NTDLL.@]
424 NTSTATUS WINAPI NtCreateSection(
425 OUT PHANDLE SectionHandle,
426 IN ACCESS_MASK DesiredAccess,
427 IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
428 IN PLARGE_INTEGER MaximumSize OPTIONAL,
429 IN ULONG SectionPageProtection OPTIONAL,
430 IN ULONG AllocationAttributes,
431 IN HANDLE FileHandle OPTIONAL)
433 FIXME("(%p,0x%08lx,%p,%p,0x%08lx,0x%08lx,0x%08x) stub\n",
434 SectionHandle,DesiredAccess, ObjectAttributes,
435 MaximumSize,SectionPageProtection,AllocationAttributes,FileHandle);
436 dump_ObjectAttributes(ObjectAttributes);
437 return 0;
440 /******************************************************************************
441 * NtOpenSection [NTDLL.@]
442 * ZwOpenSection [NTDLL.@]
444 NTSTATUS WINAPI NtOpenSection(
445 PHANDLE SectionHandle,
446 ACCESS_MASK DesiredAccess,
447 POBJECT_ATTRIBUTES ObjectAttributes)
449 FIXME("(%p,0x%08lx,%p),stub!\n",
450 SectionHandle,DesiredAccess,ObjectAttributes);
451 dump_ObjectAttributes(ObjectAttributes);
452 return 0;
455 /******************************************************************************
456 * NtQuerySection [NTDLL.@]
458 NTSTATUS WINAPI NtQuerySection(
459 IN HANDLE SectionHandle,
460 IN PVOID SectionInformationClass,
461 OUT PVOID SectionInformation,
462 IN ULONG Length,
463 OUT PULONG ResultLength)
465 FIXME("(0x%08x,%p,%p,0x%08lx,%p) stub!\n",
466 SectionHandle,SectionInformationClass,SectionInformation,Length,ResultLength);
467 return 0;
470 /******************************************************************************
471 * NtMapViewOfSection [NTDLL.@]
472 * ZwMapViewOfSection [NTDLL.@]
473 * FUNCTION: Maps a view of a section into the virtual address space of a process
475 * ARGUMENTS:
476 * SectionHandle Handle of the section
477 * ProcessHandle Handle of the process
478 * BaseAddress Desired base address (or NULL) on entry
479 * Actual base address of the view on exit
480 * ZeroBits Number of high order address bits that must be zero
481 * CommitSize Size in bytes of the initially committed section of the view
482 * SectionOffset Offset in bytes from the beginning of the section to the beginning of the view
483 * ViewSize Desired length of map (or zero to map all) on entry
484 Actual length mapped on exit
485 * InheritDisposition Specified how the view is to be shared with
486 * child processes
487 * AllocateType Type of allocation for the pages
488 * Protect Protection for the committed region of the view
490 NTSTATUS WINAPI NtMapViewOfSection(
491 HANDLE SectionHandle,
492 HANDLE ProcessHandle,
493 PVOID* BaseAddress,
494 ULONG ZeroBits,
495 ULONG CommitSize,
496 PLARGE_INTEGER SectionOffset,
497 PULONG ViewSize,
498 SECTION_INHERIT InheritDisposition,
499 ULONG AllocationType,
500 ULONG Protect)
502 FIXME("(0x%08x,0x%08x,%p,0x%08lx,0x%08lx,%p,%p,0x%08x,0x%08lx,0x%08lx) stub\n",
503 SectionHandle,ProcessHandle,BaseAddress,ZeroBits,CommitSize,SectionOffset,
504 ViewSize,InheritDisposition,AllocationType,Protect);
505 return 0;
509 * ports
512 /******************************************************************************
513 * NtCreatePort [NTDLL.@]
514 * ZwCreatePort [NTDLL.@]
516 NTSTATUS WINAPI NtCreatePort(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5)
518 FIXME("(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4,x5);
519 return 0;
522 /******************************************************************************
523 * NtConnectPort [NTDLL.@]
524 * ZwConnectPort [NTDLL.@]
526 NTSTATUS WINAPI NtConnectPort(DWORD x1,PUNICODE_STRING uni,DWORD x3,DWORD x4,DWORD x5,DWORD x6,DWORD x7,DWORD x8)
528 FIXME("(0x%08lx,%s,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",
529 x1,debugstr_w(uni->Buffer),x3,x4,x5,x6,x7,x8);
530 return 0;
533 /******************************************************************************
534 * NtListenPort [NTDLL.@]
535 * ZwListenPort [NTDLL.@]
537 NTSTATUS WINAPI NtListenPort(DWORD x1,DWORD x2)
539 FIXME("(0x%08lx,0x%08lx),stub!\n",x1,x2);
540 return 0;
543 /******************************************************************************
544 * NtAcceptConnectPort [NTDLL.@]
545 * ZwAcceptConnectPort [NTDLL.@]
547 NTSTATUS WINAPI NtAcceptConnectPort(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6)
549 FIXME("(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4,x5,x6);
550 return 0;
553 /******************************************************************************
554 * NtCompleteConnectPort [NTDLL.@]
555 * ZwCompleteConnectPort [NTDLL.@]
557 NTSTATUS WINAPI NtCompleteConnectPort(DWORD x1)
559 FIXME("(0x%08lx),stub!\n",x1);
560 return 0;
563 /******************************************************************************
564 * NtRegisterThreadTerminatePort [NTDLL.@]
565 * ZwRegisterThreadTerminatePort [NTDLL.@]
567 NTSTATUS WINAPI NtRegisterThreadTerminatePort(DWORD x1)
569 FIXME("(0x%08lx),stub!\n",x1);
570 return 0;
573 /******************************************************************************
574 * NtRequestWaitReplyPort [NTDLL.@]
575 * ZwRequestWaitReplyPort [NTDLL.@]
577 NTSTATUS WINAPI NtRequestWaitReplyPort(DWORD x1,DWORD x2,DWORD x3)
579 FIXME("(0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3);
580 return 0;
583 /******************************************************************************
584 * NtReplyWaitReceivePort [NTDLL.@]
585 * ZwReplyWaitReceivePort [NTDLL.@]
587 NTSTATUS WINAPI NtReplyWaitReceivePort(DWORD x1,DWORD x2,DWORD x3,DWORD x4)
589 FIXME("(0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4);
590 return 0;
594 * Misc
597 /******************************************************************************
598 * NtSetIntervalProfile [NTDLL.@]
599 * ZwSetIntervalProfile [NTDLL.@]
601 NTSTATUS WINAPI NtSetIntervalProfile(DWORD x1,DWORD x2) {
602 FIXME("(0x%08lx,0x%08lx),stub!\n",x1,x2);
603 return 0;
606 /******************************************************************************
607 * NtQueryPerformanceCounter [NTDLL.@]
609 NTSTATUS WINAPI NtQueryPerformanceCounter(
610 IN PLARGE_INTEGER Counter,
611 IN PLARGE_INTEGER Frequency)
613 FIXME("(%p, 0%p) stub\n",
614 Counter, Frequency);
615 return 0;
618 /******************************************************************************
619 * NtCreateMailslotFile [NTDLL.@]
620 * ZwCreateMailslotFile [NTDLL.@]
622 NTSTATUS WINAPI NtCreateMailslotFile(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6,DWORD x7,DWORD x8)
624 FIXME("(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4,x5,x6,x7,x8);
625 return 0;
628 /******************************************************************************
629 * NtQuerySystemInformation [NTDLL.@]
630 * ZwQuerySystemInformation [NTDLL.@]
632 * ARGUMENTS:
633 * SystemInformationClass Index to a certain information structure
634 * SystemTimeAdjustmentInformation SYSTEM_TIME_ADJUSTMENT
635 * SystemCacheInformation SYSTEM_CACHE_INFORMATION
636 * SystemConfigurationInformation CONFIGURATION_INFORMATION
637 * observed (class/len):
638 * 0x0/0x2c
639 * 0x12/0x18
640 * 0x2/0x138
641 * 0x8/0x600
642 * 0x25/0xc
643 * SystemInformation caller supplies storage for the information structure
644 * Length size of the structure
645 * ResultLength Data written
647 NTSTATUS WINAPI NtQuerySystemInformation(
648 IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
649 OUT PVOID SystemInformation,
650 IN ULONG Length,
651 OUT PULONG ResultLength)
653 switch(SystemInformationClass)
655 case 0x25:
656 /* Something to do with the size of the registry *
657 * Since we don't have a size limitation, fake it *
658 * This is almost certainly wrong. *
659 * This sets each of the three words in the struct to 32 MB, *
660 * which is enough to make the IE 5 installer happy. */
661 FIXME("(0x%08x,%p,0x%08lx,%p) faking max registry size of 32 MB\n",
662 SystemInformationClass,SystemInformation,Length,ResultLength);
663 *(DWORD *)SystemInformation = 0x2000000;
664 *(((DWORD *)SystemInformation)+1) = 0x200000;
665 *(((DWORD *)SystemInformation)+2) = 0x200000;
666 break;
668 default:
669 FIXME("(0x%08x,%p,0x%08lx,%p) stub\n",
670 SystemInformationClass,SystemInformation,Length,ResultLength);
671 ZeroMemory (SystemInformation, Length);
674 return STATUS_SUCCESS;
678 /******************************************************************************
679 * NtCreatePagingFile [NTDLL.@]
680 * ZwCreatePagingFile [NTDLL.@]
682 NTSTATUS WINAPI NtCreatePagingFile(
683 IN PUNICODE_STRING PageFileName,
684 IN ULONG MiniumSize,
685 IN ULONG MaxiumSize,
686 OUT PULONG ActualSize)
688 FIXME("(%p(%s),0x%08lx,0x%08lx,%p),stub!\n",
689 PageFileName->Buffer, debugstr_w(PageFileName->Buffer),MiniumSize,MaxiumSize,ActualSize);
690 return 0;
693 /******************************************************************************
694 * NtDisplayString [NTDLL.@]
696 * writes a string to the nt-textmode screen eg. during startup
698 NTSTATUS WINAPI NtDisplayString ( PUNICODE_STRING string )
700 STRING stringA;
701 NTSTATUS ret;
703 if (!(ret = RtlUnicodeStringToAnsiString( &stringA, string, TRUE )))
705 MESSAGE( "%.*s", stringA.Length, stringA.Buffer );
706 RtlFreeAnsiString( &stringA );
708 return ret;
711 /******************************************************************************
712 * NtPowerInformation [NTDLL.@]
715 NTSTATUS WINAPI NtPowerInformation(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5)
717 FIXME("(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub\n",x1,x2,x3,x4,x5);
718 return 0;
721 /******************************************************************************
722 * NtAllocateLocallyUniqueId (NTDLL.@)
724 * FIXME: the server should do that
726 NTSTATUS WINAPI NtAllocateLocallyUniqueId(PLUID Luid)
728 static LUID luid;
730 FIXME("%p (0x%08lx%08lx)\n", Luid, luid.HighPart, luid.LowPart);
732 luid.LowPart++;
733 if (luid.LowPart==0)
734 luid.HighPart++;
735 Luid->HighPart = luid.HighPart;
736 Luid->LowPart = luid.LowPart;
738 return STATUS_SUCCESS;