Implemented _ultow() and export [Nt/Zw]QueryVolumeInformationFile().
[wine] / dlls / ntdll / nt.c
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)
6  *
7  * Copyright 1996-1998 Marcus Meissner
8  */
9
10 #include <stdio.h>
11 #include <stdlib.h>
12 #include <string.h>
13 #include <time.h>
14 #include "debugtools.h"
15
16 #include "ntddk.h"
17 #include "ntdll_misc.h"
18 #include "server.h"
19
20 DEFAULT_DEBUG_CHANNEL(ntdll);
21
22 /*
23  *      Timer object
24  */
25  
26 /**************************************************************************
27  *              NtCreateTimer                           [NTDLL.87]
28  */
29 NTSTATUS WINAPI NtCreateTimer(
30         OUT PHANDLE TimerHandle,
31         IN ACCESS_MASK DesiredAccess,
32         IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
33         IN TIMER_TYPE TimerType)
34 {
35         FIXME("(%p,0x%08lx,%p,0x%08x) stub\n",
36         TimerHandle,DesiredAccess,ObjectAttributes, TimerType);
37         dump_ObjectAttributes(ObjectAttributes);
38         return 0;
39 }
40 /**************************************************************************
41  *              NtSetTimer                              [NTDLL.221]
42  */
43 NTSTATUS WINAPI NtSetTimer(
44         IN HANDLE TimerHandle,
45         IN PLARGE_INTEGER DueTime,
46         IN PTIMERAPCROUTINE TimerApcRoutine,
47         IN PVOID TimerContext,
48         IN BOOLEAN WakeTimer,
49         IN ULONG Period OPTIONAL,
50         OUT PBOOLEAN PreviousState OPTIONAL)
51 {
52         FIXME("(0x%08x,%p,%p,%p,%08x,0x%08lx,%p) stub\n",
53         TimerHandle,DueTime,TimerApcRoutine,TimerContext,WakeTimer,Period,PreviousState);
54         return 0;
55 }
56
57 /******************************************************************************
58  * NtQueryTimerResolution [NTDLL.129]
59  */
60 NTSTATUS WINAPI NtQueryTimerResolution(DWORD x1,DWORD x2,DWORD x3) 
61 {
62         FIXME("(0x%08lx,0x%08lx,0x%08lx), stub!\n",x1,x2,x3);
63         return 1;
64 }
65
66 /*
67  *      Process object
68  */
69
70 /******************************************************************************
71  *  NtTerminateProcess                  [NTDLL.] 
72  *
73  *  Native applications must kill themselves when done
74  */
75 NTSTATUS WINAPI NtTerminateProcess( HANDLE handle, LONG exit_code )
76 {
77     NTSTATUS ret;
78     BOOL self;
79     SERVER_START_REQ
80     {
81         struct terminate_process_request *req = server_alloc_req( sizeof(*req), 0 );
82         req->handle    = handle;
83         req->exit_code = exit_code;
84         ret = server_call_noerr( REQ_TERMINATE_PROCESS );
85         self = !ret && req->self;
86     }
87     SERVER_END_REQ;
88     if (self) exit( exit_code );
89     return ret;
90 }
91
92 /******************************************************************************
93 *  NtQueryInformationProcess            [NTDLL.] 
94 *
95 */
96 NTSTATUS WINAPI NtQueryInformationProcess(
97         IN HANDLE ProcessHandle,
98         IN PROCESSINFOCLASS ProcessInformationClass,
99         OUT PVOID ProcessInformation,
100         IN ULONG ProcessInformationLength,
101         OUT PULONG ReturnLength)
102 {
103         FIXME("(0x%08x,0x%08x,%p,0x%08lx,%p),stub!\n",
104                 ProcessHandle,ProcessInformationClass,ProcessInformation,ProcessInformationLength,ReturnLength
105         );
106         /* "These are not the debuggers you are looking for." */
107         if (ProcessInformationClass == ProcessDebugPort)
108             /* set it to 0 aka "no debugger" to satisfy copy protections */
109             memset(ProcessInformation,0,ProcessInformationLength);
110
111         return 0;
112 }
113
114 /******************************************************************************
115  * NtSetInformationProcess [NTDLL.207]
116  */
117 NTSTATUS WINAPI NtSetInformationProcess(
118         IN HANDLE ProcessHandle,
119         IN PROCESSINFOCLASS ProcessInformationClass,
120         IN PVOID ProcessInformation,
121         IN ULONG ProcessInformationLength)
122 {
123         FIXME("(0x%08x,0x%08x,%p,0x%08lx) stub\n",
124         ProcessHandle,ProcessInformationClass,ProcessInformation,ProcessInformationLength);
125         return 0;
126 }
127
128 /*
129  *      Thread
130  */
131
132 /******************************************************************************
133  *  NtResumeThread      [NTDLL] 
134  */
135 NTSTATUS WINAPI NtResumeThread(
136         IN HANDLE ThreadHandle,
137         IN PULONG SuspendCount) 
138 {
139         FIXME("(0x%08x,%p),stub!\n",
140         ThreadHandle,SuspendCount);
141         return 0;
142 }
143
144
145 /******************************************************************************
146  *  NtTerminateThread   [NTDLL] 
147  */
148 NTSTATUS WINAPI NtTerminateThread( HANDLE handle, LONG exit_code )
149 {
150     NTSTATUS ret;
151     BOOL self, last;
152
153     SERVER_START_REQ
154     {
155         struct terminate_thread_request *req = server_alloc_req( sizeof(*req), 0 );
156         req->handle    = handle;
157         req->exit_code = exit_code;
158         ret = server_call_noerr( REQ_TERMINATE_THREAD );
159         self = !ret && req->self;
160         last = req->last;
161     }
162     SERVER_END_REQ;
163
164     if (self)
165     {
166         if (last) exit( exit_code );
167         else SYSDEPS_ExitThread( exit_code );
168     }
169     return ret;
170 }
171
172
173 /******************************************************************************
174 *  NtQueryInformationThread             [NTDLL.] 
175 *
176 */
177 NTSTATUS WINAPI NtQueryInformationThread(
178         IN HANDLE ThreadHandle,
179         IN THREADINFOCLASS ThreadInformationClass,
180         OUT PVOID ThreadInformation,
181         IN ULONG ThreadInformationLength,
182         OUT PULONG ReturnLength)
183 {
184         FIXME("(0x%08x,0x%08x,%p,0x%08lx,%p),stub!\n",
185                 ThreadHandle, ThreadInformationClass, ThreadInformation,
186                 ThreadInformationLength, ReturnLength);
187         return 0;
188 }
189
190 /******************************************************************************
191  *  NtSetInformationThread              [NTDLL] 
192  */
193 NTSTATUS WINAPI NtSetInformationThread(
194         HANDLE ThreadHandle,
195         THREADINFOCLASS ThreadInformationClass,
196         PVOID ThreadInformation,
197         ULONG ThreadInformationLength)
198 {
199         FIXME("(0x%08x,0x%08x,%p,0x%08lx),stub!\n",
200         ThreadHandle, ThreadInformationClass, ThreadInformation, ThreadInformationLength);
201         return 0;
202 }
203
204 /*
205  *      Token
206  */
207
208 /******************************************************************************
209  *  NtDuplicateToken            [NTDLL] 
210  */
211 NTSTATUS WINAPI NtDuplicateToken(
212         IN HANDLE ExistingToken,
213         IN ACCESS_MASK DesiredAccess,
214         IN POBJECT_ATTRIBUTES ObjectAttributes,
215         IN SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,
216         IN TOKEN_TYPE TokenType,
217         OUT PHANDLE NewToken)
218 {
219         FIXME("(0x%08x,0x%08lx,%p,0x%08x,0x%08x,%p),stub!\n",
220         ExistingToken, DesiredAccess, ObjectAttributes,
221         ImpersonationLevel, TokenType, NewToken);
222         dump_ObjectAttributes(ObjectAttributes);
223         return 0;
224 }
225
226 /******************************************************************************
227  *  NtOpenProcessToken          [NTDLL] 
228  */
229 NTSTATUS WINAPI NtOpenProcessToken(
230         HANDLE ProcessHandle,
231         DWORD DesiredAccess, 
232         HANDLE *TokenHandle) 
233 {
234         FIXME("(0x%08x,0x%08lx,%p): stub\n",
235         ProcessHandle,DesiredAccess, TokenHandle);
236         *TokenHandle = 0xcafe;
237         return 0;
238 }
239
240 /******************************************************************************
241  *  NtOpenThreadToken           [NTDLL] 
242  */
243 NTSTATUS WINAPI NtOpenThreadToken(
244         HANDLE ThreadHandle,
245         DWORD DesiredAccess, 
246         BOOLEAN OpenAsSelf,
247         HANDLE *TokenHandle) 
248 {
249         FIXME("(0x%08x,0x%08lx,0x%08x,%p): stub\n",
250         ThreadHandle,DesiredAccess, OpenAsSelf, TokenHandle);
251         *TokenHandle = 0xcafe;
252         return 0;
253 }
254
255 /******************************************************************************
256  *  NtAdjustPrivilegesToken             [NTDLL] 
257  *
258  * FIXME: parameters unsafe
259  */
260 NTSTATUS WINAPI NtAdjustPrivilegesToken(
261         IN HANDLE TokenHandle,
262         IN BOOLEAN DisableAllPrivileges,
263         IN PTOKEN_PRIVILEGES NewState,
264         IN DWORD BufferLength,
265         OUT PTOKEN_PRIVILEGES PreviousState,
266         OUT PDWORD ReturnLength)
267 {
268         FIXME("(0x%08x,0x%08x,%p,0x%08lx,%p,%p),stub!\n",
269         TokenHandle, DisableAllPrivileges, NewState, BufferLength, PreviousState, ReturnLength);
270         return 0;
271 }
272
273 /******************************************************************************
274 *  NtQueryInformationToken              [NTDLL.156] 
275 *
276 * NOTES
277 *  Buffer for TokenUser:
278 *   0x00 TOKEN_USER the PSID field points to the SID
279 *   0x08 SID
280 *
281 */
282 NTSTATUS WINAPI NtQueryInformationToken(
283         HANDLE token,
284         DWORD tokeninfoclass, 
285         LPVOID tokeninfo,
286         DWORD tokeninfolength,
287         LPDWORD retlen ) 
288 {
289     unsigned int len = 0;
290
291     FIXME("(%08x,%ld,%p,%ld,%p): stub\n",
292           token,tokeninfoclass,tokeninfo,tokeninfolength,retlen);
293
294     switch (tokeninfoclass)
295     {
296     case TokenUser:
297         len = sizeof(TOKEN_USER) + sizeof(SID);
298         break;
299     case TokenGroups:
300         len = sizeof(TOKEN_GROUPS);
301         break;
302     case TokenPrivileges:
303         len = sizeof(TOKEN_PRIVILEGES);
304         break;
305     case TokenOwner:
306         len = sizeof(TOKEN_OWNER);
307         break;
308     case TokenPrimaryGroup:
309         len = sizeof(TOKEN_PRIMARY_GROUP);
310         break;
311     case TokenDefaultDacl:
312         len = sizeof(TOKEN_DEFAULT_DACL);
313         break;
314     case TokenSource:
315         len = sizeof(TOKEN_SOURCE);
316         break;
317     case TokenType:
318         len = sizeof (TOKEN_TYPE);
319         break;
320 #if 0
321     case TokenImpersonationLevel:
322     case TokenStatistics:
323 #endif /* 0 */
324     }
325
326     /* FIXME: what if retlen == NULL ? */
327     *retlen = len;
328
329     if (tokeninfolength < len)
330         return STATUS_BUFFER_TOO_SMALL;
331
332     switch (tokeninfoclass)
333     {
334     case TokenUser:
335         if( tokeninfo )
336         {
337             TOKEN_USER * tuser = tokeninfo;
338             PSID sid = (PSID) (tuser + 1);
339             SID_IDENTIFIER_AUTHORITY localSidAuthority = {SECURITY_NT_AUTHORITY};
340             RtlInitializeSid(sid, &localSidAuthority, 1);
341             *(RtlSubAuthoritySid(sid, 0)) = SECURITY_INTERACTIVE_RID;
342             tuser->User.Sid = sid;
343         }
344         break;
345     case TokenGroups:
346         if (tokeninfo)
347         {
348             TOKEN_GROUPS *tgroups = tokeninfo;
349             SID_IDENTIFIER_AUTHORITY sid = {SECURITY_NT_AUTHORITY};
350
351             /* we need to show admin privileges ! */
352             tgroups->GroupCount = 1;
353             RtlAllocateAndInitializeSid( &sid,
354                                          2,
355                                          SECURITY_BUILTIN_DOMAIN_RID,
356                                          DOMAIN_ALIAS_RID_ADMINS,
357                                          0, 0, 0, 0, 0, 0,
358                                          &(tgroups->Groups->Sid));
359         }
360         break;
361     case TokenPrivileges:
362         if (tokeninfo)
363         {
364             TOKEN_PRIVILEGES *tpriv = tokeninfo;
365             tpriv->PrivilegeCount = 1;
366         }
367         break;
368     }
369     return 0;
370 }
371
372 /*
373  *      Section
374  */
375  
376 /******************************************************************************
377  *  NtCreateSection     [NTDLL] 
378  */
379 NTSTATUS WINAPI NtCreateSection(
380         OUT PHANDLE SectionHandle,
381         IN ACCESS_MASK DesiredAccess,
382         IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
383         IN PLARGE_INTEGER MaximumSize OPTIONAL,
384         IN ULONG SectionPageProtection OPTIONAL,
385         IN ULONG AllocationAttributes,
386         IN HANDLE FileHandle OPTIONAL)
387 {
388         FIXME("(%p,0x%08lx,%p,%p,0x%08lx,0x%08lx,0x%08x) stub\n",
389         SectionHandle,DesiredAccess, ObjectAttributes,
390         MaximumSize,SectionPageProtection,AllocationAttributes,FileHandle);
391         dump_ObjectAttributes(ObjectAttributes);
392         return 0;
393 }
394
395 /******************************************************************************
396  *  NtOpenSection       [NTDLL] 
397  */
398 NTSTATUS WINAPI NtOpenSection(
399         PHANDLE SectionHandle,
400         ACCESS_MASK DesiredAccess,
401         POBJECT_ATTRIBUTES ObjectAttributes)
402 {
403         FIXME("(%p,0x%08lx,%p),stub!\n",
404         SectionHandle,DesiredAccess,ObjectAttributes);
405         dump_ObjectAttributes(ObjectAttributes);
406         return 0;
407 }
408
409 /******************************************************************************
410  *  NtQuerySection      [NTDLL] 
411  */
412 NTSTATUS WINAPI NtQuerySection(
413         IN HANDLE SectionHandle,
414         IN PVOID SectionInformationClass,
415         OUT PVOID SectionInformation,
416         IN ULONG Length,
417         OUT PULONG ResultLength)
418 {
419         FIXME("(0x%08x,%p,%p,0x%08lx,%p) stub!\n",
420         SectionHandle,SectionInformationClass,SectionInformation,Length,ResultLength);
421         return 0;
422 }
423
424 /******************************************************************************
425  * NtMapViewOfSection   [NTDLL] 
426  * FUNCTION: Maps a view of a section into the virtual address space of a process
427  *
428  * ARGUMENTS:
429  *  SectionHandle       Handle of the section
430  *  ProcessHandle       Handle of the process
431  *  BaseAddress         Desired base address (or NULL) on entry
432  *                      Actual base address of the view on exit
433  *  ZeroBits            Number of high order address bits that must be zero
434  *  CommitSize          Size in bytes of the initially committed section of the view
435  *  SectionOffset       Offset in bytes from the beginning of the section to the beginning of the view
436  *  ViewSize            Desired length of map (or zero to map all) on entry 
437                         Actual length mapped on exit
438  *  InheritDisposition  Specified how the view is to be shared with
439  *                      child processes
440  *  AllocateType        Type of allocation for the pages
441  *  Protect             Protection for the committed region of the view
442  */
443 NTSTATUS WINAPI NtMapViewOfSection(
444         HANDLE SectionHandle,
445         HANDLE ProcessHandle,
446         PVOID* BaseAddress,
447         ULONG ZeroBits,
448         ULONG CommitSize,
449         PLARGE_INTEGER SectionOffset,
450         PULONG ViewSize,
451         SECTION_INHERIT InheritDisposition,
452         ULONG AllocationType,
453         ULONG Protect)
454 {
455         FIXME("(0x%08x,0x%08x,%p,0x%08lx,0x%08lx,%p,%p,0x%08x,0x%08lx,0x%08lx) stub\n",
456         SectionHandle,ProcessHandle,BaseAddress,ZeroBits,CommitSize,SectionOffset,
457         ViewSize,InheritDisposition,AllocationType,Protect);
458         return 0;
459 }
460
461 /*
462  *      ports
463  */
464
465 /******************************************************************************
466  *  NtCreatePort                [NTDLL] 
467  */
468 NTSTATUS WINAPI NtCreatePort(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5) 
469 {
470         FIXME("(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4,x5);
471         return 0;
472 }
473
474 /******************************************************************************
475  *  NtConnectPort               [NTDLL] 
476  */
477 NTSTATUS WINAPI NtConnectPort(DWORD x1,PUNICODE_STRING uni,DWORD x3,DWORD x4,DWORD x5,DWORD x6,DWORD x7,DWORD x8) 
478 {
479         FIXME("(0x%08lx,%s,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",
480         x1,debugstr_w(uni->Buffer),x3,x4,x5,x6,x7,x8);
481         return 0;
482 }
483
484 /******************************************************************************
485  *  NtListenPort                [NTDLL] 
486  */
487 NTSTATUS WINAPI NtListenPort(DWORD x1,DWORD x2) 
488 {
489         FIXME("(0x%08lx,0x%08lx),stub!\n",x1,x2);
490         return 0;
491 }
492
493 /******************************************************************************
494  *  NtAcceptConnectPort [NTDLL] 
495  */
496 NTSTATUS WINAPI NtAcceptConnectPort(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6) 
497 {
498         FIXME("(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4,x5,x6);
499         return 0;
500 }
501
502 /******************************************************************************
503  *  NtCompleteConnectPort       [NTDLL] 
504  */
505 NTSTATUS WINAPI NtCompleteConnectPort(DWORD x1) 
506 {
507         FIXME("(0x%08lx),stub!\n",x1);
508         return 0;
509 }
510
511 /******************************************************************************
512  *  NtRegisterThreadTerminatePort       [NTDLL] 
513  */
514 NTSTATUS WINAPI NtRegisterThreadTerminatePort(DWORD x1) 
515 {
516         FIXME("(0x%08lx),stub!\n",x1);
517         return 0;
518 }
519
520 /******************************************************************************
521  *  NtRequestWaitReplyPort              [NTDLL] 
522  */
523 NTSTATUS WINAPI NtRequestWaitReplyPort(DWORD x1,DWORD x2,DWORD x3) 
524 {
525         FIXME("(0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3);
526         return 0;
527 }
528
529 /******************************************************************************
530  *  NtReplyWaitReceivePort      [NTDLL] 
531  */
532 NTSTATUS WINAPI NtReplyWaitReceivePort(DWORD x1,DWORD x2,DWORD x3,DWORD x4) 
533 {
534         FIXME("(0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4);
535         return 0;
536 }
537
538 /*
539  *      Misc
540  */
541
542  /******************************************************************************
543  *  NtSetIntervalProfile        [NTDLL] 
544  */
545 NTSTATUS WINAPI NtSetIntervalProfile(DWORD x1,DWORD x2) {
546         FIXME("(0x%08lx,0x%08lx),stub!\n",x1,x2);
547         return 0;
548 }
549
550 /******************************************************************************
551  *  NtQueryPerformanceCounter   [NTDLL] 
552  */
553 NTSTATUS WINAPI NtQueryPerformanceCounter(
554         IN PLARGE_INTEGER Counter,
555         IN PLARGE_INTEGER Frequency) 
556 {
557         FIXME("(%p, 0%p) stub\n",
558         Counter, Frequency);
559         return 0;
560 }
561
562 /******************************************************************************
563  *  NtCreateMailslotFile        [NTDLL] 
564  */
565 NTSTATUS WINAPI NtCreateMailslotFile(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6,DWORD x7,DWORD x8) 
566 {
567         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);
568         return 0;
569 }
570
571 /******************************************************************************
572  * NtQuerySystemInformation [NTDLL.168]
573  *
574  * ARGUMENTS:
575  *  SystemInformationClass      Index to a certain information structure
576  *      SystemTimeAdjustmentInformation SYSTEM_TIME_ADJUSTMENT
577  *      SystemCacheInformation          SYSTEM_CACHE_INFORMATION
578  *      SystemConfigurationInformation  CONFIGURATION_INFORMATION
579  *      observed (class/len): 
580  *              0x0/0x2c
581  *              0x12/0x18
582  *              0x2/0x138
583  *              0x8/0x600
584  *              0x25/0xc
585  *  SystemInformation   caller supplies storage for the information structure
586  *  Length              size of the structure
587  *  ResultLength        Data written
588  */
589 NTSTATUS WINAPI NtQuerySystemInformation(
590         IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
591         OUT PVOID SystemInformation,
592         IN ULONG Length,
593         OUT PULONG ResultLength)
594 {
595     switch(SystemInformationClass)
596     {
597     case 0x25:
598         /* Something to do with the size of the registry             *
599          * Since we don't have a size limitation, fake it            *
600          * This is almost certainly wrong.                           *
601          * This sets each of the three words in the struct to 32 MB, *
602          * which is enough to make the IE 5 installer happy.         */
603         FIXME("(0x%08x,%p,0x%08lx,%p) faking max registry size of 32 MB\n",
604               SystemInformationClass,SystemInformation,Length,ResultLength);
605         *(DWORD *)SystemInformation = 0x2000000;
606         *(((DWORD *)SystemInformation)+1) = 0x200000;
607         *(((DWORD *)SystemInformation)+2) = 0x200000;
608         break;
609
610     default:
611         FIXME("(0x%08x,%p,0x%08lx,%p) stub\n",
612               SystemInformationClass,SystemInformation,Length,ResultLength);
613         ZeroMemory (SystemInformation, Length);
614     }
615
616     return STATUS_SUCCESS;
617 }
618
619
620 /******************************************************************************
621  *  NtCreatePagingFile          [NTDLL] 
622  */
623 NTSTATUS WINAPI NtCreatePagingFile(
624         IN PUNICODE_STRING PageFileName,
625         IN ULONG MiniumSize,
626         IN ULONG MaxiumSize,
627         OUT PULONG ActualSize)
628 {
629         FIXME("(%p(%s),0x%08lx,0x%08lx,%p),stub!\n",
630         PageFileName->Buffer, debugstr_w(PageFileName->Buffer),MiniumSize,MaxiumSize,ActualSize);
631         return 0;
632 }
633
634 /******************************************************************************
635  *  NtDisplayString                             [NTDLL.95] 
636  * 
637  * writes a string to the nt-textmode screen eg. during startup
638  */
639 NTSTATUS WINAPI NtDisplayString ( PUNICODE_STRING string )
640 {
641     STRING stringA;
642     NTSTATUS ret;
643
644     if (!(ret = RtlUnicodeStringToAnsiString( &stringA, string, TRUE )))
645     {
646         MESSAGE( "%.*s", stringA.Length, stringA.Buffer );
647         RtlFreeAnsiString( &stringA );
648     }
649     return ret;
650 }
651
652 /******************************************************************************
653  *  NtPowerInformation                          [NTDLL] 
654  * 
655  */
656 NTSTATUS WINAPI NtPowerInformation(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5)
657 {
658         FIXME("(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub\n",x1,x2,x3,x4,x5);
659         return 0;
660 }
661
662 /******************************************************************************
663  *  NtAllocateLocallyUniqueId
664  *
665  * FIXME: the server should do that
666  */
667 NTSTATUS WINAPI NtAllocateLocallyUniqueId(PLUID Luid)
668 {
669         static LUID luid;
670
671         FIXME("%p (0x%08lx%08lx)\n", Luid, luid.DUMMYSTRUCTNAME.HighPart, luid.DUMMYSTRUCTNAME.LowPart);
672
673         luid.QuadPart++;
674         
675         Luid->QuadPart = luid.QuadPart;
676         return STATUS_SUCCESS;
677 }