Fixed header dependencies to be fully compatible with the Windows
[wine/multimedia.git] / dlls / ntdll / nt.c
blob3fc3b0d01f3a3d9417be36d61d8521f6fe0cfa22
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 #include <stdarg.h>
25 #include <stdio.h>
26 #include <stdlib.h>
27 #include <string.h>
28 #include <time.h>
29 #include "wine/debug.h"
31 #include "windef.h"
32 #include "winbase.h"
33 #include "winreg.h"
34 #include "winternl.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
44 DWORD Length;
45 HANDLE SectionHandle;
46 DWORD Param1;
47 DWORD SectionSize;
48 DWORD ClientBaseAddress;
49 DWORD ServerBaseAddress;
50 } LPCSECTIONINFO, *PLPCSECTIONINFO;
52 typedef struct LpcSectionMapInfo
54 DWORD Length;
55 DWORD SectionSize;
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;
67 DWORD MessageType;
68 DWORD ClientProcessId;
69 DWORD ClientThreadId;
70 DWORD MessageId;
71 DWORD SharedSectionSize;
72 BYTE MessageData[MAX_MESSAGE_DATA];
73 } LPCMESSAGE, *PLPCMESSAGE;
76 * Process object
79 /******************************************************************************
80 * NtTerminateProcess [NTDLL.@]
82 * Native applications must kill themselves when done
84 NTSTATUS WINAPI NtTerminateProcess( HANDLE handle, LONG exit_code )
86 NTSTATUS ret;
87 BOOL self;
88 SERVER_START_REQ( terminate_process )
90 req->handle = handle;
91 req->exit_code = exit_code;
92 ret = wine_server_call( req );
93 self = !ret && reply->self;
95 SERVER_END_REQ;
96 if (self) exit( exit_code );
97 return ret;
100 /******************************************************************************
101 * NtQueryInformationProcess [NTDLL.@]
102 * ZwQueryInformationProcess [NTDLL.@]
105 NTSTATUS WINAPI NtQueryInformationProcess(
106 IN HANDLE ProcessHandle,
107 IN PROCESSINFOCLASS ProcessInformationClass,
108 OUT PVOID ProcessInformation,
109 IN ULONG ProcessInformationLength,
110 OUT PULONG ReturnLength)
112 NTSTATUS ret = STATUS_SUCCESS;
113 ULONG len = 0;
115 switch (ProcessInformationClass) {
116 case ProcessDebugPort:
117 /* "These are not the debuggers you are looking for." */
118 /* set it to 0 aka "no debugger" to satisfy copy protections */
119 if (ProcessInformationLength == 4)
121 memset(ProcessInformation,0,ProcessInformationLength);
122 len = 4;
124 else
125 ret = STATUS_INFO_LENGTH_MISMATCH;
126 break;
127 case ProcessWow64Information:
128 if (ProcessInformationLength == 4)
130 memset(ProcessInformation,0,ProcessInformationLength);
131 len = 4;
133 else
134 ret = STATUS_INFO_LENGTH_MISMATCH;
135 break;
136 default:
137 FIXME("(%p,0x%08x,%p,0x%08lx,%p),stub!\n",
138 ProcessHandle,ProcessInformationClass,
139 ProcessInformation,ProcessInformationLength,
140 ReturnLength
142 break;
145 if (ReturnLength)
146 *ReturnLength = len;
148 return ret;
151 /******************************************************************************
152 * NtSetInformationProcess [NTDLL.@]
153 * ZwSetInformationProcess [NTDLL.@]
155 NTSTATUS WINAPI NtSetInformationProcess(
156 IN HANDLE ProcessHandle,
157 IN PROCESSINFOCLASS ProcessInformationClass,
158 IN PVOID ProcessInformation,
159 IN ULONG ProcessInformationLength)
161 FIXME("(%p,0x%08x,%p,0x%08lx) stub\n",
162 ProcessHandle,ProcessInformationClass,ProcessInformation,ProcessInformationLength);
163 return 0;
167 * Thread
170 /******************************************************************************
171 * NtSetInformationThread [NTDLL.@]
172 * ZwSetInformationThread [NTDLL.@]
174 NTSTATUS WINAPI NtSetInformationThread(
175 HANDLE ThreadHandle,
176 THREADINFOCLASS ThreadInformationClass,
177 PVOID ThreadInformation,
178 ULONG ThreadInformationLength)
180 FIXME("(%p,0x%08x,%p,0x%08lx),stub!\n",
181 ThreadHandle, ThreadInformationClass, ThreadInformation, ThreadInformationLength);
182 return 0;
186 * Token
189 /******************************************************************************
190 * NtDuplicateToken [NTDLL.@]
191 * ZwDuplicateToken [NTDLL.@]
193 NTSTATUS WINAPI NtDuplicateToken(
194 IN HANDLE ExistingToken,
195 IN ACCESS_MASK DesiredAccess,
196 IN POBJECT_ATTRIBUTES ObjectAttributes,
197 IN SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,
198 IN TOKEN_TYPE TokenType,
199 OUT PHANDLE NewToken)
201 FIXME("(%p,0x%08lx,%p,0x%08x,0x%08x,%p),stub!\n",
202 ExistingToken, DesiredAccess, ObjectAttributes,
203 ImpersonationLevel, TokenType, NewToken);
204 dump_ObjectAttributes(ObjectAttributes);
205 return 0;
208 /******************************************************************************
209 * NtOpenProcessToken [NTDLL.@]
210 * ZwOpenProcessToken [NTDLL.@]
212 NTSTATUS WINAPI NtOpenProcessToken(
213 HANDLE ProcessHandle,
214 DWORD DesiredAccess,
215 HANDLE *TokenHandle)
217 NTSTATUS ret;
219 TRACE("(%p,0x%08lx,%p)\n", ProcessHandle,DesiredAccess, TokenHandle);
221 SERVER_START_REQ( open_token )
223 req->handle = ProcessHandle;
224 req->flags = 0;
225 ret = wine_server_call( req );
226 if (!ret) *TokenHandle = reply->token;
228 SERVER_END_REQ;
230 return ret;
233 /******************************************************************************
234 * NtOpenThreadToken [NTDLL.@]
235 * ZwOpenThreadToken [NTDLL.@]
237 NTSTATUS WINAPI NtOpenThreadToken(
238 HANDLE ThreadHandle,
239 DWORD DesiredAccess,
240 BOOLEAN OpenAsSelf,
241 HANDLE *TokenHandle)
243 NTSTATUS ret;
245 TRACE("(%p,0x%08lx,0x%08x,%p)\n",
246 ThreadHandle,DesiredAccess, OpenAsSelf, TokenHandle);
248 SERVER_START_REQ( open_token )
250 req->handle = ThreadHandle;
251 req->flags = OPEN_TOKEN_THREAD;
252 if (OpenAsSelf) req->flags |= OPEN_TOKEN_AS_SELF;
253 ret = wine_server_call( req );
254 if (!ret) *TokenHandle = reply->token;
256 SERVER_END_REQ;
258 return ret;
261 /******************************************************************************
262 * NtAdjustPrivilegesToken [NTDLL.@]
263 * ZwAdjustGroupsToken [NTDLL.@]
265 * FIXME: parameters unsafe
267 NTSTATUS WINAPI NtAdjustPrivilegesToken(
268 IN HANDLE TokenHandle,
269 IN BOOLEAN DisableAllPrivileges,
270 IN PTOKEN_PRIVILEGES NewState,
271 IN DWORD BufferLength,
272 OUT PTOKEN_PRIVILEGES PreviousState,
273 OUT PDWORD ReturnLength)
275 FIXME("(%p,0x%08x,%p,0x%08lx,%p,%p),stub!\n",
276 TokenHandle, DisableAllPrivileges, NewState, BufferLength, PreviousState, ReturnLength);
277 return 0;
280 /******************************************************************************
281 * NtQueryInformationToken [NTDLL.@]
282 * ZwQueryInformationToken [NTDLL.@]
284 * NOTES
285 * Buffer for TokenUser:
286 * 0x00 TOKEN_USER the PSID field points to the SID
287 * 0x08 SID
290 NTSTATUS WINAPI NtQueryInformationToken(
291 HANDLE token,
292 DWORD tokeninfoclass,
293 LPVOID tokeninfo,
294 DWORD tokeninfolength,
295 LPDWORD retlen )
297 unsigned int len = 0;
299 FIXME("(%p,%ld,%p,%ld,%p): stub\n",
300 token,tokeninfoclass,tokeninfo,tokeninfolength,retlen);
302 switch (tokeninfoclass)
304 case TokenUser:
305 len = sizeof(TOKEN_USER) + sizeof(SID);
306 break;
307 case TokenGroups:
308 len = sizeof(TOKEN_GROUPS);
309 break;
310 case TokenPrivileges:
311 len = sizeof(TOKEN_PRIVILEGES);
312 break;
313 case TokenOwner:
314 len = sizeof(TOKEN_OWNER);
315 break;
316 case TokenPrimaryGroup:
317 len = sizeof(TOKEN_PRIMARY_GROUP);
318 break;
319 case TokenDefaultDacl:
320 len = sizeof(TOKEN_DEFAULT_DACL);
321 break;
322 case TokenSource:
323 len = sizeof(TOKEN_SOURCE);
324 break;
325 case TokenType:
326 len = sizeof (TOKEN_TYPE);
327 break;
328 #if 0
329 case TokenImpersonationLevel:
330 case TokenStatistics:
331 #endif /* 0 */
334 /* FIXME: what if retlen == NULL ? */
335 *retlen = len;
337 if (tokeninfolength < len)
338 return STATUS_BUFFER_TOO_SMALL;
340 switch (tokeninfoclass)
342 case TokenUser:
343 if( tokeninfo )
345 TOKEN_USER * tuser = tokeninfo;
346 PSID sid = (PSID) (tuser + 1);
347 SID_IDENTIFIER_AUTHORITY localSidAuthority = {SECURITY_NT_AUTHORITY};
348 RtlInitializeSid(sid, &localSidAuthority, 1);
349 *(RtlSubAuthoritySid(sid, 0)) = SECURITY_INTERACTIVE_RID;
350 tuser->User.Sid = sid;
352 break;
353 case TokenGroups:
354 if (tokeninfo)
356 TOKEN_GROUPS *tgroups = tokeninfo;
357 SID_IDENTIFIER_AUTHORITY sid = {SECURITY_NT_AUTHORITY};
359 /* we need to show admin privileges ! */
360 tgroups->GroupCount = 1;
361 tgroups->Groups->Attributes = SE_GROUP_ENABLED;
362 RtlAllocateAndInitializeSid( &sid,
364 SECURITY_BUILTIN_DOMAIN_RID,
365 DOMAIN_ALIAS_RID_ADMINS,
366 0, 0, 0, 0, 0, 0,
367 &(tgroups->Groups->Sid));
369 break;
370 case TokenPrivileges:
371 if (tokeninfo)
373 TOKEN_PRIVILEGES *tpriv = tokeninfo;
374 tpriv->PrivilegeCount = 1;
376 break;
378 return 0;
382 * Section
385 /******************************************************************************
386 * NtQuerySection [NTDLL.@]
388 NTSTATUS WINAPI NtQuerySection(
389 IN HANDLE SectionHandle,
390 IN PVOID SectionInformationClass,
391 OUT PVOID SectionInformation,
392 IN ULONG Length,
393 OUT PULONG ResultLength)
395 FIXME("(%p,%p,%p,0x%08lx,%p) stub!\n",
396 SectionHandle,SectionInformationClass,SectionInformation,Length,ResultLength);
397 return 0;
401 * ports
404 /******************************************************************************
405 * NtCreatePort [NTDLL.@]
406 * ZwCreatePort [NTDLL.@]
408 NTSTATUS WINAPI NtCreatePort(PHANDLE PortHandle,POBJECT_ATTRIBUTES ObjectAttributes,
409 DWORD MaxConnectInfoLength,DWORD MaxDataLength,DWORD unknown)
411 FIXME("(%p,%p,0x%08lx,0x%08lx,0x%08lx),stub!\n",PortHandle,ObjectAttributes,
412 MaxConnectInfoLength,MaxDataLength,unknown);
413 return 0;
416 /******************************************************************************
417 * NtConnectPort [NTDLL.@]
418 * ZwConnectPort [NTDLL.@]
420 NTSTATUS WINAPI NtConnectPort(PHANDLE PortHandle,PUNICODE_STRING PortName,PVOID Unknown1,
421 PLPCSECTIONINFO sectionInfo,PLPCSECTIONMAPINFO mapInfo,PVOID Unknown2,
422 PVOID ConnectInfo,PDWORD pConnectInfoLength)
424 FIXME("(%p,%s,%p,%p,%p,%p,%p,%p (%ld)),stub!\n",PortHandle,debugstr_w(PortName->Buffer),Unknown1,
425 sectionInfo,mapInfo,Unknown2,ConnectInfo,pConnectInfoLength,pConnectInfoLength?*pConnectInfoLength:-1);
426 if(ConnectInfo && pConnectInfoLength)
427 TRACE("\tMessage = %s\n",debugstr_an(ConnectInfo,*pConnectInfoLength));
428 return 0;
431 /******************************************************************************
432 * NtListenPort [NTDLL.@]
433 * ZwListenPort [NTDLL.@]
435 NTSTATUS WINAPI NtListenPort(HANDLE PortHandle,PLPCMESSAGE pLpcMessage)
437 FIXME("(%p,%p),stub!\n",PortHandle,pLpcMessage);
438 return 0;
441 /******************************************************************************
442 * NtAcceptConnectPort [NTDLL.@]
443 * ZwAcceptConnectPort [NTDLL.@]
445 NTSTATUS WINAPI NtAcceptConnectPort(PHANDLE PortHandle,DWORD Unknown,PLPCMESSAGE pLpcMessage,
446 DWORD acceptIt,DWORD Unknown2,PLPCSECTIONMAPINFO mapInfo)
448 FIXME("(%p,0x%08lx,%p,0x%08lx,0x%08lx,%p),stub!\n",PortHandle,Unknown,pLpcMessage,acceptIt,Unknown2,mapInfo);
449 return 0;
452 /******************************************************************************
453 * NtCompleteConnectPort [NTDLL.@]
454 * ZwCompleteConnectPort [NTDLL.@]
456 NTSTATUS WINAPI NtCompleteConnectPort(HANDLE PortHandle)
458 FIXME("(%p),stub!\n",PortHandle);
459 return 0;
462 /******************************************************************************
463 * NtRegisterThreadTerminatePort [NTDLL.@]
464 * ZwRegisterThreadTerminatePort [NTDLL.@]
466 NTSTATUS WINAPI NtRegisterThreadTerminatePort(HANDLE PortHandle)
468 FIXME("(%p),stub!\n",PortHandle);
469 return 0;
472 /******************************************************************************
473 * NtRequestWaitReplyPort [NTDLL.@]
474 * ZwRequestWaitReplyPort [NTDLL.@]
476 NTSTATUS WINAPI NtRequestWaitReplyPort(HANDLE PortHandle,PLPCMESSAGE pLpcMessageIn,PLPCMESSAGE pLpcMessageOut)
478 FIXME("(%p,%p,%p),stub!\n",PortHandle,pLpcMessageIn,pLpcMessageOut);
479 if(pLpcMessageIn)
481 TRACE("Message to send:\n");
482 TRACE("\tActualMessageLength = %d\n",pLpcMessageIn->ActualMessageLength);
483 TRACE("\tTotalMessageLength = %d\n",pLpcMessageIn->TotalMessageLength);
484 TRACE("\tMessageType = %ld\n",pLpcMessageIn->MessageType);
485 TRACE("\tClientProcessId = %ld\n",pLpcMessageIn->ClientProcessId);
486 TRACE("\tClientThreadId = %ld\n",pLpcMessageIn->ClientThreadId);
487 TRACE("\tMessageId = %ld\n",pLpcMessageIn->MessageId);
488 TRACE("\tSharedSectionSize = %ld\n",pLpcMessageIn->SharedSectionSize);
489 TRACE("\tMessageData = %s\n",debugstr_an(pLpcMessageIn->MessageData,pLpcMessageIn->ActualMessageLength));
491 return 0;
494 /******************************************************************************
495 * NtReplyWaitReceivePort [NTDLL.@]
496 * ZwReplyWaitReceivePort [NTDLL.@]
498 NTSTATUS WINAPI NtReplyWaitReceivePort(HANDLE PortHandle,PDWORD Unknown,PLPCMESSAGE pLpcMessageOut,PLPCMESSAGE pLpcMessageIn)
500 FIXME("(%p,%p,%p,%p),stub!\n",PortHandle,Unknown,pLpcMessageOut,pLpcMessageIn);
501 return 0;
505 * Misc
508 /******************************************************************************
509 * NtSetIntervalProfile [NTDLL.@]
510 * ZwSetIntervalProfile [NTDLL.@]
512 NTSTATUS WINAPI NtSetIntervalProfile(DWORD x1,DWORD x2) {
513 FIXME("(0x%08lx,0x%08lx),stub!\n",x1,x2);
514 return 0;
517 /******************************************************************************
518 * NtQueryPerformanceCounter [NTDLL.@]
520 NTSTATUS WINAPI NtQueryPerformanceCounter(
521 IN PLARGE_INTEGER Counter,
522 IN PLARGE_INTEGER Frequency)
524 FIXME("(%p, 0%p) stub\n",
525 Counter, Frequency);
526 return 0;
529 /******************************************************************************
530 * NtCreateMailslotFile [NTDLL.@]
531 * ZwCreateMailslotFile [NTDLL.@]
533 NTSTATUS WINAPI NtCreateMailslotFile(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6,DWORD x7,DWORD x8)
535 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);
536 return 0;
539 /******************************************************************************
540 * NtQuerySystemInformation [NTDLL.@]
541 * ZwQuerySystemInformation [NTDLL.@]
543 * ARGUMENTS:
544 * SystemInformationClass Index to a certain information structure
545 * SystemTimeAdjustmentInformation SYSTEM_TIME_ADJUSTMENT
546 * SystemCacheInformation SYSTEM_CACHE_INFORMATION
547 * SystemConfigurationInformation CONFIGURATION_INFORMATION
548 * observed (class/len):
549 * 0x0/0x2c
550 * 0x12/0x18
551 * 0x2/0x138
552 * 0x8/0x600
553 * 0x25/0xc
554 * SystemInformation caller supplies storage for the information structure
555 * Length size of the structure
556 * ResultLength Data written
558 NTSTATUS WINAPI NtQuerySystemInformation(
559 IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
560 OUT PVOID SystemInformation,
561 IN ULONG Length,
562 OUT PULONG ResultLength)
564 switch(SystemInformationClass)
566 case 0x25:
567 /* Something to do with the size of the registry *
568 * Since we don't have a size limitation, fake it *
569 * This is almost certainly wrong. *
570 * This sets each of the three words in the struct to 32 MB, *
571 * which is enough to make the IE 5 installer happy. */
572 FIXME("(0x%08x,%p,0x%08lx,%p) faking max registry size of 32 MB\n",
573 SystemInformationClass,SystemInformation,Length,ResultLength);
574 *(DWORD *)SystemInformation = 0x2000000;
575 *(((DWORD *)SystemInformation)+1) = 0x200000;
576 *(((DWORD *)SystemInformation)+2) = 0x200000;
577 break;
579 default:
580 FIXME("(0x%08x,%p,0x%08lx,%p) stub\n",
581 SystemInformationClass,SystemInformation,Length,ResultLength);
582 ZeroMemory (SystemInformation, Length);
585 return STATUS_SUCCESS;
589 /******************************************************************************
590 * NtCreatePagingFile [NTDLL.@]
591 * ZwCreatePagingFile [NTDLL.@]
593 NTSTATUS WINAPI NtCreatePagingFile(
594 IN PUNICODE_STRING PageFileName,
595 IN ULONG MiniumSize,
596 IN ULONG MaxiumSize,
597 OUT PULONG ActualSize)
599 FIXME("(%p(%s),0x%08lx,0x%08lx,%p),stub!\n",
600 PageFileName->Buffer, debugstr_w(PageFileName->Buffer),MiniumSize,MaxiumSize,ActualSize);
601 return 0;
604 /******************************************************************************
605 * NtDisplayString [NTDLL.@]
607 * writes a string to the nt-textmode screen eg. during startup
609 NTSTATUS WINAPI NtDisplayString ( PUNICODE_STRING string )
611 STRING stringA;
612 NTSTATUS ret;
614 if (!(ret = RtlUnicodeStringToAnsiString( &stringA, string, TRUE )))
616 MESSAGE( "%.*s", stringA.Length, stringA.Buffer );
617 RtlFreeAnsiString( &stringA );
619 return ret;
622 /******************************************************************************
623 * NtPowerInformation [NTDLL.@]
626 NTSTATUS WINAPI NtPowerInformation(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5)
628 FIXME("(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub\n",x1,x2,x3,x4,x5);
629 return 0;
632 /******************************************************************************
633 * NtAllocateLocallyUniqueId (NTDLL.@)
635 * FIXME: the server should do that
637 NTSTATUS WINAPI NtAllocateLocallyUniqueId(PLUID Luid)
639 static LUID luid;
641 FIXME("%p (0x%08lx%08lx)\n", Luid, luid.HighPart, luid.LowPart);
643 luid.LowPart++;
644 if (luid.LowPart==0)
645 luid.HighPart++;
646 Luid->HighPart = luid.HighPart;
647 Luid->LowPart = luid.LowPart;
649 return STATUS_SUCCESS;
652 /******************************************************************************
653 * VerSetConditionMask (NTDLL.@)
655 ULONGLONG WINAPI VerSetConditionMask( ULONGLONG dwlConditionMask, DWORD dwTypeBitMask,
656 BYTE dwConditionMask)
658 if(dwTypeBitMask == 0)
659 return dwlConditionMask;
660 dwConditionMask &= 0x07;
661 if(dwConditionMask == 0)
662 return dwlConditionMask;
664 if(dwTypeBitMask & VER_PRODUCT_TYPE)
665 dwlConditionMask |= dwConditionMask << 7*3;
666 else if (dwTypeBitMask & VER_SUITENAME)
667 dwlConditionMask |= dwConditionMask << 6*3;
668 else if (dwTypeBitMask & VER_SERVICEPACKMAJOR)
669 dwlConditionMask |= dwConditionMask << 5*3;
670 else if (dwTypeBitMask & VER_SERVICEPACKMINOR)
671 dwlConditionMask |= dwConditionMask << 4*3;
672 else if (dwTypeBitMask & VER_PLATFORMID)
673 dwlConditionMask |= dwConditionMask << 3*3;
674 else if (dwTypeBitMask & VER_BUILDNUMBER)
675 dwlConditionMask |= dwConditionMask << 2*3;
676 else if (dwTypeBitMask & VER_MAJORVERSION)
677 dwlConditionMask |= dwConditionMask << 1*3;
678 else if (dwTypeBitMask & VER_MINORVERSION)
679 dwlConditionMask |= dwConditionMask << 0*3;
680 return dwlConditionMask;