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
29 #include "wine/debug.h"
35 #include "ntdll_misc.h"
36 #include "wine/server.h"
38 WINE_DEFAULT_DEBUG_CHANNEL(ntdll
);
40 /* Structures used by NtConnectPort */
42 typedef struct LpcSectionInfo
48 DWORD ClientBaseAddress
;
49 DWORD ServerBaseAddress
;
50 } LPCSECTIONINFO
, *PLPCSECTIONINFO
;
52 typedef struct LpcSectionMapInfo
56 DWORD ServerBaseAddress
;
57 } LPCSECTIONMAPINFO
, *PLPCSECTIONMAPINFO
;
59 /* Structure used by NtAcceptConnectPort, NtReplyWaitReceivePort */
61 #define MAX_MESSAGE_DATA 328
63 typedef struct LpcMessage
65 WORD ActualMessageLength
;
66 WORD TotalMessageLength
;
68 DWORD ClientProcessId
;
71 DWORD SharedSectionSize
;
72 BYTE MessageData
[MAX_MESSAGE_DATA
];
73 } LPCMESSAGE
, *PLPCMESSAGE
;
79 /******************************************************************************
80 * NtDuplicateToken [NTDLL.@]
81 * ZwDuplicateToken [NTDLL.@]
83 NTSTATUS WINAPI
NtDuplicateToken(
84 IN HANDLE ExistingToken
,
85 IN ACCESS_MASK DesiredAccess
,
86 IN POBJECT_ATTRIBUTES ObjectAttributes
,
87 IN SECURITY_IMPERSONATION_LEVEL ImpersonationLevel
,
88 IN TOKEN_TYPE TokenType
,
91 FIXME("(%p,0x%08lx,%p,0x%08x,0x%08x,%p),stub!\n",
92 ExistingToken
, DesiredAccess
, ObjectAttributes
,
93 ImpersonationLevel
, TokenType
, NewToken
);
94 dump_ObjectAttributes(ObjectAttributes
);
98 /******************************************************************************
99 * NtOpenProcessToken [NTDLL.@]
100 * ZwOpenProcessToken [NTDLL.@]
102 NTSTATUS WINAPI
NtOpenProcessToken(
103 HANDLE ProcessHandle
,
109 TRACE("(%p,0x%08lx,%p)\n", ProcessHandle
,DesiredAccess
, TokenHandle
);
111 SERVER_START_REQ( open_token
)
113 req
->handle
= ProcessHandle
;
115 ret
= wine_server_call( req
);
116 if (!ret
) *TokenHandle
= reply
->token
;
123 /******************************************************************************
124 * NtOpenThreadToken [NTDLL.@]
125 * ZwOpenThreadToken [NTDLL.@]
127 NTSTATUS WINAPI
NtOpenThreadToken(
135 TRACE("(%p,0x%08lx,0x%08x,%p)\n",
136 ThreadHandle
,DesiredAccess
, OpenAsSelf
, TokenHandle
);
138 SERVER_START_REQ( open_token
)
140 req
->handle
= ThreadHandle
;
141 req
->flags
= OPEN_TOKEN_THREAD
;
142 if (OpenAsSelf
) req
->flags
|= OPEN_TOKEN_AS_SELF
;
143 ret
= wine_server_call( req
);
144 if (!ret
) *TokenHandle
= reply
->token
;
151 /******************************************************************************
152 * NtAdjustPrivilegesToken [NTDLL.@]
153 * ZwAdjustGroupsToken [NTDLL.@]
155 * FIXME: parameters unsafe
157 NTSTATUS WINAPI
NtAdjustPrivilegesToken(
158 IN HANDLE TokenHandle
,
159 IN BOOLEAN DisableAllPrivileges
,
160 IN PTOKEN_PRIVILEGES NewState
,
161 IN DWORD BufferLength
,
162 OUT PTOKEN_PRIVILEGES PreviousState
,
163 OUT PDWORD ReturnLength
)
165 FIXME("(%p,0x%08x,%p,0x%08lx,%p,%p),stub!\n",
166 TokenHandle
, DisableAllPrivileges
, NewState
, BufferLength
, PreviousState
, ReturnLength
);
170 /******************************************************************************
171 * NtQueryInformationToken [NTDLL.@]
172 * ZwQueryInformationToken [NTDLL.@]
175 * Buffer for TokenUser:
176 * 0x00 TOKEN_USER the PSID field points to the SID
180 NTSTATUS WINAPI
NtQueryInformationToken(
182 DWORD tokeninfoclass
,
184 DWORD tokeninfolength
,
187 unsigned int len
= 0;
189 FIXME("(%p,%ld,%p,%ld,%p): stub\n",
190 token
,tokeninfoclass
,tokeninfo
,tokeninfolength
,retlen
);
192 switch (tokeninfoclass
)
195 len
= sizeof(TOKEN_USER
) + sizeof(SID
);
198 len
= sizeof(TOKEN_GROUPS
);
200 case TokenPrivileges
:
201 len
= sizeof(TOKEN_PRIVILEGES
);
204 len
= sizeof(TOKEN_OWNER
);
206 case TokenPrimaryGroup
:
207 len
= sizeof(TOKEN_PRIMARY_GROUP
);
209 case TokenDefaultDacl
:
210 len
= sizeof(TOKEN_DEFAULT_DACL
);
213 len
= sizeof(TOKEN_SOURCE
);
216 len
= sizeof (TOKEN_TYPE
);
219 case TokenImpersonationLevel
:
220 case TokenStatistics
:
224 /* FIXME: what if retlen == NULL ? */
227 if (tokeninfolength
< len
)
228 return STATUS_BUFFER_TOO_SMALL
;
230 switch (tokeninfoclass
)
235 TOKEN_USER
* tuser
= tokeninfo
;
236 PSID sid
= (PSID
) (tuser
+ 1);
237 SID_IDENTIFIER_AUTHORITY localSidAuthority
= {SECURITY_NT_AUTHORITY
};
238 RtlInitializeSid(sid
, &localSidAuthority
, 1);
239 *(RtlSubAuthoritySid(sid
, 0)) = SECURITY_INTERACTIVE_RID
;
240 tuser
->User
.Sid
= sid
;
246 TOKEN_GROUPS
*tgroups
= tokeninfo
;
247 SID_IDENTIFIER_AUTHORITY sid
= {SECURITY_NT_AUTHORITY
};
249 /* we need to show admin privileges ! */
250 tgroups
->GroupCount
= 1;
251 tgroups
->Groups
->Attributes
= SE_GROUP_ENABLED
;
252 RtlAllocateAndInitializeSid( &sid
,
254 SECURITY_BUILTIN_DOMAIN_RID
,
255 DOMAIN_ALIAS_RID_ADMINS
,
257 &(tgroups
->Groups
->Sid
));
260 case TokenPrivileges
:
263 TOKEN_PRIVILEGES
*tpriv
= tokeninfo
;
264 tpriv
->PrivilegeCount
= 1;
275 /******************************************************************************
276 * NtQuerySection [NTDLL.@]
278 NTSTATUS WINAPI
NtQuerySection(
279 IN HANDLE SectionHandle
,
280 IN PVOID SectionInformationClass
,
281 OUT PVOID SectionInformation
,
283 OUT PULONG ResultLength
)
285 FIXME("(%p,%p,%p,0x%08lx,%p) stub!\n",
286 SectionHandle
,SectionInformationClass
,SectionInformation
,Length
,ResultLength
);
294 /******************************************************************************
295 * NtCreatePort [NTDLL.@]
296 * ZwCreatePort [NTDLL.@]
298 NTSTATUS WINAPI
NtCreatePort(PHANDLE PortHandle
,POBJECT_ATTRIBUTES ObjectAttributes
,
299 DWORD MaxConnectInfoLength
,DWORD MaxDataLength
,DWORD unknown
)
301 FIXME("(%p,%p,0x%08lx,0x%08lx,0x%08lx),stub!\n",PortHandle
,ObjectAttributes
,
302 MaxConnectInfoLength
,MaxDataLength
,unknown
);
306 /******************************************************************************
307 * NtConnectPort [NTDLL.@]
308 * ZwConnectPort [NTDLL.@]
310 NTSTATUS WINAPI
NtConnectPort(PHANDLE PortHandle
,PUNICODE_STRING PortName
,PVOID Unknown1
,
311 PLPCSECTIONINFO sectionInfo
,PLPCSECTIONMAPINFO mapInfo
,PVOID Unknown2
,
312 PVOID ConnectInfo
,PDWORD pConnectInfoLength
)
314 FIXME("(%p,%s,%p,%p,%p,%p,%p,%p (%ld)),stub!\n",PortHandle
,debugstr_w(PortName
->Buffer
),Unknown1
,
315 sectionInfo
,mapInfo
,Unknown2
,ConnectInfo
,pConnectInfoLength
,pConnectInfoLength
?*pConnectInfoLength
:-1);
316 if(ConnectInfo
&& pConnectInfoLength
)
317 TRACE("\tMessage = %s\n",debugstr_an(ConnectInfo
,*pConnectInfoLength
));
321 /******************************************************************************
322 * NtListenPort [NTDLL.@]
323 * ZwListenPort [NTDLL.@]
325 NTSTATUS WINAPI
NtListenPort(HANDLE PortHandle
,PLPCMESSAGE pLpcMessage
)
327 FIXME("(%p,%p),stub!\n",PortHandle
,pLpcMessage
);
331 /******************************************************************************
332 * NtAcceptConnectPort [NTDLL.@]
333 * ZwAcceptConnectPort [NTDLL.@]
335 NTSTATUS WINAPI
NtAcceptConnectPort(PHANDLE PortHandle
,DWORD Unknown
,PLPCMESSAGE pLpcMessage
,
336 DWORD acceptIt
,DWORD Unknown2
,PLPCSECTIONMAPINFO mapInfo
)
338 FIXME("(%p,0x%08lx,%p,0x%08lx,0x%08lx,%p),stub!\n",PortHandle
,Unknown
,pLpcMessage
,acceptIt
,Unknown2
,mapInfo
);
342 /******************************************************************************
343 * NtCompleteConnectPort [NTDLL.@]
344 * ZwCompleteConnectPort [NTDLL.@]
346 NTSTATUS WINAPI
NtCompleteConnectPort(HANDLE PortHandle
)
348 FIXME("(%p),stub!\n",PortHandle
);
352 /******************************************************************************
353 * NtRegisterThreadTerminatePort [NTDLL.@]
354 * ZwRegisterThreadTerminatePort [NTDLL.@]
356 NTSTATUS WINAPI
NtRegisterThreadTerminatePort(HANDLE PortHandle
)
358 FIXME("(%p),stub!\n",PortHandle
);
362 /******************************************************************************
363 * NtRequestWaitReplyPort [NTDLL.@]
364 * ZwRequestWaitReplyPort [NTDLL.@]
366 NTSTATUS WINAPI
NtRequestWaitReplyPort(HANDLE PortHandle
,PLPCMESSAGE pLpcMessageIn
,PLPCMESSAGE pLpcMessageOut
)
368 FIXME("(%p,%p,%p),stub!\n",PortHandle
,pLpcMessageIn
,pLpcMessageOut
);
371 TRACE("Message to send:\n");
372 TRACE("\tActualMessageLength = %d\n",pLpcMessageIn
->ActualMessageLength
);
373 TRACE("\tTotalMessageLength = %d\n",pLpcMessageIn
->TotalMessageLength
);
374 TRACE("\tMessageType = %ld\n",pLpcMessageIn
->MessageType
);
375 TRACE("\tClientProcessId = %ld\n",pLpcMessageIn
->ClientProcessId
);
376 TRACE("\tClientThreadId = %ld\n",pLpcMessageIn
->ClientThreadId
);
377 TRACE("\tMessageId = %ld\n",pLpcMessageIn
->MessageId
);
378 TRACE("\tSharedSectionSize = %ld\n",pLpcMessageIn
->SharedSectionSize
);
379 TRACE("\tMessageData = %s\n",debugstr_an(pLpcMessageIn
->MessageData
,pLpcMessageIn
->ActualMessageLength
));
384 /******************************************************************************
385 * NtReplyWaitReceivePort [NTDLL.@]
386 * ZwReplyWaitReceivePort [NTDLL.@]
388 NTSTATUS WINAPI
NtReplyWaitReceivePort(HANDLE PortHandle
,PDWORD Unknown
,PLPCMESSAGE pLpcMessageOut
,PLPCMESSAGE pLpcMessageIn
)
390 FIXME("(%p,%p,%p,%p),stub!\n",PortHandle
,Unknown
,pLpcMessageOut
,pLpcMessageIn
);
398 /******************************************************************************
399 * NtSetIntervalProfile [NTDLL.@]
400 * ZwSetIntervalProfile [NTDLL.@]
402 NTSTATUS WINAPI
NtSetIntervalProfile(DWORD x1
,DWORD x2
) {
403 FIXME("(0x%08lx,0x%08lx),stub!\n",x1
,x2
);
407 /******************************************************************************
408 * NtQueryPerformanceCounter [NTDLL.@]
410 NTSTATUS WINAPI
NtQueryPerformanceCounter(
411 IN PLARGE_INTEGER Counter
,
412 IN PLARGE_INTEGER Frequency
)
414 FIXME("(%p, 0%p) stub\n",
419 /******************************************************************************
420 * NtCreateMailslotFile [NTDLL.@]
421 * ZwCreateMailslotFile [NTDLL.@]
423 NTSTATUS WINAPI
NtCreateMailslotFile(DWORD x1
,DWORD x2
,DWORD x3
,DWORD x4
,DWORD x5
,DWORD x6
,DWORD x7
,DWORD x8
)
425 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
);
429 /******************************************************************************
430 * NtQuerySystemInformation [NTDLL.@]
431 * ZwQuerySystemInformation [NTDLL.@]
434 * SystemInformationClass Index to a certain information structure
435 * SystemTimeAdjustmentInformation SYSTEM_TIME_ADJUSTMENT
436 * SystemCacheInformation SYSTEM_CACHE_INFORMATION
437 * SystemConfigurationInformation CONFIGURATION_INFORMATION
438 * observed (class/len):
444 * SystemInformation caller supplies storage for the information structure
445 * Length size of the structure
446 * ResultLength Data written
448 NTSTATUS WINAPI
NtQuerySystemInformation(
449 IN SYSTEM_INFORMATION_CLASS SystemInformationClass
,
450 OUT PVOID SystemInformation
,
452 OUT PULONG ResultLength
)
454 NTSTATUS ret
= STATUS_SUCCESS
;
457 TRACE("(0x%08x,%p,0x%08lx,%p)\n",
458 SystemInformationClass
,SystemInformation
,Length
,ResultLength
);
460 switch (SystemInformationClass
)
462 case SystemBasicInformation
:
464 SYSTEM_BASIC_INFORMATION
* sbi
= (SYSTEM_BASIC_INFORMATION
*)SystemInformation
;
465 if (Length
>= sizeof(*sbi
))
468 sbi
->uKeMaximumIncrement
= 0;
469 sbi
->uPageSize
= 1024; /* FIXME */
470 sbi
->uMmNumberOfPhysicalPages
= 12345; /* FIXME */
471 sbi
->uMmLowestPhysicalPage
= 0; /* FIXME */
472 sbi
->uMmHighestPhysicalPage
= 12345; /* FIXME */
473 sbi
->uAllocationGranularity
= 65536; /* FIXME */
474 sbi
->pLowestUserAddress
= 0; /* FIXME */
475 sbi
->pMmHighestUserAddress
= (void*)~0; /* FIXME */
476 sbi
->uKeActiveProcessors
= 1; /* FIXME */
477 sbi
->bKeNumberProcessors
= 1; /* FIXME */
480 else ret
= STATUS_INFO_LENGTH_MISMATCH
;
483 case SystemPerformanceInformation
:
485 SYSTEM_PERFORMANCE_INFORMATION
* spi
= (SYSTEM_PERFORMANCE_INFORMATION
*)SystemInformation
;
486 if (Length
>= sizeof(*spi
))
488 memset(spi
, 0, sizeof(*spi
)); /* FIXME */
491 else ret
= STATUS_INFO_LENGTH_MISMATCH
;
494 case SystemTimeOfDayInformation
:
496 SYSTEM_TIMEOFDAY_INFORMATION
* sti
= (SYSTEM_TIMEOFDAY_INFORMATION
*)SystemInformation
;
497 if (Length
>= sizeof(*sti
))
499 sti
->liKeBootTime
.QuadPart
= 0; /* FIXME */
500 sti
->liKeSystemTime
.QuadPart
= 0; /* FIXME */
501 sti
->liExpTimeZoneBias
.QuadPart
= 0; /* FIXME */
502 sti
->uCurrentTimeZoneId
= 0; /* FIXME */
506 else ret
= STATUS_INFO_LENGTH_MISMATCH
;
509 case SystemProcessInformation
:
511 SYSTEM_PROCESS_INFORMATION
* spi
= (SYSTEM_PROCESS_INFORMATION
*)SystemInformation
;
512 SYSTEM_PROCESS_INFORMATION
* last
= NULL
;
514 WCHAR procname
[1024];
517 SERVER_START_REQ( create_snapshot
)
519 req
->flags
= SNAP_PROCESS
| SNAP_THREAD
;
520 req
->inherit
= FALSE
;
522 if (!(ret
= wine_server_call( req
))) hSnap
= reply
->handle
;
526 while (ret
== STATUS_SUCCESS
)
528 SERVER_START_REQ( next_process
)
531 req
->reset
= (len
== 0);
532 wine_server_set_reply( req
, procname
, sizeof(procname
) );
533 if (!(ret
= wine_server_call( req
)))
535 wlen
= wine_server_reply_size(reply
) + sizeof(WCHAR
);
536 if (Length
>= len
+ sizeof(*spi
))
538 memset(spi
, 0, sizeof(*spi
));
539 spi
->dwOffset
= sizeof(*spi
);
540 spi
->dwThreadCount
= reply
->threads
;
541 memset(&spi
->ftCreationTime
, 0, sizeof(spi
->ftCreationTime
));
542 /* spi->pszProcessName will be set later on */
543 spi
->dwBasePriority
= reply
->priority
;
544 spi
->dwProcessID
= (DWORD
)reply
->pid
;
545 spi
->dwParentProcessID
= (DWORD
)reply
->ppid
;
546 spi
->dwHandleCount
= reply
->handles
;
547 spi
->dwVirtualBytesPeak
= 0; /* FIXME */
548 spi
->dwVirtualBytes
= 0; /* FIXME */
549 spi
->dwPageFaults
= 0; /* FIXME */
550 spi
->dwWorkingSetPeak
= 0; /* FIXME */
551 spi
->dwWorkingSet
= 0; /* FIXME */
552 spi
->dwUnknown5
= 0; /* FIXME */
553 spi
->dwPagedPool
= 0; /* FIXME */
554 spi
->dwUnknown6
= 0; /* FIXME */
555 spi
->dwNonPagedPool
= 0; /* FIXME */
556 spi
->dwPageFileBytesPeak
= 0; /* FIXME */
557 spi
->dwPrivateBytes
= 0; /* FIXME */
558 spi
->dwPageFileBytes
= 0; /* FIXME */
559 /* spi->ti will be set later on */
560 len
+= sizeof(*spi
) - sizeof(spi
->ti
);
562 else ret
= STATUS_INFO_LENGTH_MISMATCH
;
566 if (ret
!= STATUS_SUCCESS
)
568 if (ret
== STATUS_NO_MORE_FILES
) ret
= STATUS_SUCCESS
;
571 if (Length
>= len
+ wlen
+ spi
->dwThreadCount
* sizeof(THREAD_INFO
))
575 /* set thread info */
576 spi
->dwOffset
+= spi
->dwThreadCount
* sizeof(THREAD_INFO
);
577 len
+= spi
->dwThreadCount
* sizeof(THREAD_INFO
);
579 while (ret
== STATUS_SUCCESS
)
581 SERVER_START_REQ( next_thread
)
584 req
->reset
= (j
== 0);
585 if (!(ret
= wine_server_call( req
)))
588 if (reply
->pid
== spi
->dwProcessID
)
590 /* ftKernelTime, ftUserTime, ftCreateTime;
591 * dwTickCount, dwStartAddress
593 spi
->ti
[i
].dwOwningPID
= reply
->pid
;
594 spi
->ti
[i
].dwThreadID
= reply
->tid
;
595 spi
->ti
[i
].dwCurrentPriority
= reply
->base_pri
+ reply
->delta_pri
;
596 spi
->ti
[i
].dwBasePriority
= reply
->base_pri
;
603 if (ret
== STATUS_NO_MORE_FILES
) ret
= STATUS_SUCCESS
;
605 /* now append process name */
606 spi
->pszProcessName
= (WCHAR
*)((char*)spi
+ spi
->dwOffset
);
607 memcpy( spi
->pszProcessName
, procname
, wlen
- sizeof(WCHAR
) );
608 spi
->pszProcessName
[wlen
/ sizeof(WCHAR
)] = 0;
610 spi
->dwOffset
+= wlen
;
613 spi
= (SYSTEM_PROCESS_INFORMATION
*)((char*)spi
+ spi
->dwOffset
);
615 else ret
= STATUS_INFO_LENGTH_MISMATCH
;
617 if (ret
== STATUS_SUCCESS
&& last
) last
->dwOffset
= 0;
618 if (hSnap
) NtClose(hSnap
);
621 case SystemProcessorPerformanceInformation
:
623 SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION
* sppi
= (SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION
*)SystemInformation
;
624 if (Length
>= sizeof(*sppi
))
626 memset(sppi
, 0, sizeof(*sppi
)); /* FIXME */
629 else ret
= STATUS_INFO_LENGTH_MISMATCH
;
633 case SystemCacheInformation
:
635 SYSTEM_CACHE_INFORMATION
* sci
= (SYSTEM_CACHE_INFORMATION
*)SystemInformation
;
636 if (Length
>= sizeof(*sci
))
638 memset(sci
, 0, sizeof(*sci
)); /* FIXME */
641 else ret
= STATUS_INFO_LENGTH_MISMATCH
;
644 case SystemRegistryQuotaInformation
:
645 /* Something to do with the size of the registry *
646 * Since we don't have a size limitation, fake it *
647 * This is almost certainly wrong. *
648 * This sets each of the three words in the struct to 32 MB, *
649 * which is enough to make the IE 5 installer happy. */
651 SYSTEM_REGISTRY_QUOTA_INFORMATION
* srqi
= (SYSTEM_REGISTRY_QUOTA_INFORMATION
*)SystemInformation
;
652 if (Length
>= sizeof(*srqi
))
654 FIXME("(0x%08x,%p,0x%08lx,%p) faking max registry size of 32 MB\n",
655 SystemInformationClass
,SystemInformation
,Length
,ResultLength
);
656 srqi
->RegistryQuotaAllowed
= 0x2000000;
657 srqi
->RegistryQuotaUsed
= 0x200000;
658 srqi
->Reserved1
= (void*)0x200000;
659 if (ResultLength
) *ResultLength
= sizeof(*srqi
);
661 else ret
= STATUS_INFO_LENGTH_MISMATCH
;
666 FIXME("(0x%08x,%p,0x%08lx,%p) stub\n",
667 SystemInformationClass
,SystemInformation
,Length
,ResultLength
);
668 memset(SystemInformation
, 0, Length
);
669 ret
= STATUS_NOT_IMPLEMENTED
;
671 if (ResultLength
) *ResultLength
= len
;
677 /******************************************************************************
678 * NtCreatePagingFile [NTDLL.@]
679 * ZwCreatePagingFile [NTDLL.@]
681 NTSTATUS WINAPI
NtCreatePagingFile(
682 IN PUNICODE_STRING PageFileName
,
685 OUT PULONG ActualSize
)
687 FIXME("(%p(%s),0x%08lx,0x%08lx,%p),stub!\n",
688 PageFileName
->Buffer
, debugstr_w(PageFileName
->Buffer
),MiniumSize
,MaxiumSize
,ActualSize
);
692 /******************************************************************************
693 * NtDisplayString [NTDLL.@]
695 * writes a string to the nt-textmode screen eg. during startup
697 NTSTATUS WINAPI
NtDisplayString ( PUNICODE_STRING string
)
702 if (!(ret
= RtlUnicodeStringToAnsiString( &stringA
, string
, TRUE
)))
704 MESSAGE( "%.*s", stringA
.Length
, stringA
.Buffer
);
705 RtlFreeAnsiString( &stringA
);
710 /******************************************************************************
711 * NtPowerInformation [NTDLL.@]
714 NTSTATUS WINAPI
NtPowerInformation(DWORD x1
,DWORD x2
,DWORD x3
,DWORD x4
,DWORD x5
)
716 FIXME("(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub\n",x1
,x2
,x3
,x4
,x5
);
720 /******************************************************************************
721 * NtAllocateLocallyUniqueId (NTDLL.@)
723 * FIXME: the server should do that
725 NTSTATUS WINAPI
NtAllocateLocallyUniqueId(PLUID Luid
)
729 FIXME("%p (0x%08lx%08lx)\n", Luid
, luid
.HighPart
, luid
.LowPart
);
734 Luid
->HighPart
= luid
.HighPart
;
735 Luid
->LowPart
= luid
.LowPart
;
737 return STATUS_SUCCESS
;
740 /******************************************************************************
741 * VerSetConditionMask (NTDLL.@)
743 ULONGLONG WINAPI
VerSetConditionMask( ULONGLONG dwlConditionMask
, DWORD dwTypeBitMask
,
744 BYTE dwConditionMask
)
746 if(dwTypeBitMask
== 0)
747 return dwlConditionMask
;
748 dwConditionMask
&= 0x07;
749 if(dwConditionMask
== 0)
750 return dwlConditionMask
;
752 if(dwTypeBitMask
& VER_PRODUCT_TYPE
)
753 dwlConditionMask
|= dwConditionMask
<< 7*3;
754 else if (dwTypeBitMask
& VER_SUITENAME
)
755 dwlConditionMask
|= dwConditionMask
<< 6*3;
756 else if (dwTypeBitMask
& VER_SERVICEPACKMAJOR
)
757 dwlConditionMask
|= dwConditionMask
<< 5*3;
758 else if (dwTypeBitMask
& VER_SERVICEPACKMINOR
)
759 dwlConditionMask
|= dwConditionMask
<< 4*3;
760 else if (dwTypeBitMask
& VER_PLATFORMID
)
761 dwlConditionMask
|= dwConditionMask
<< 3*3;
762 else if (dwTypeBitMask
& VER_BUILDNUMBER
)
763 dwlConditionMask
|= dwConditionMask
<< 2*3;
764 else if (dwTypeBitMask
& VER_MAJORVERSION
)
765 dwlConditionMask
|= dwConditionMask
<< 1*3;
766 else if (dwTypeBitMask
& VER_MINORVERSION
)
767 dwlConditionMask
|= dwConditionMask
<< 0*3;
768 return dwlConditionMask
;