wined3d: Pass a wined3d_device_context to wined3d_cs_emit_blt_sub_resource().
[wine/zf.git] / dlls / ntdll / nt.c
blob3d7063caa1dbcf098c5b15f28fcc87e313f0867f
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
24 #include <string.h>
25 #include <stdarg.h>
26 #include <stdio.h>
27 #include <stdlib.h>
29 #define NONAMELESSUNION
30 #include "ntstatus.h"
31 #define WIN32_NO_STATUS
32 #include "wine/debug.h"
33 #include "windef.h"
34 #include "winternl.h"
35 #include "ntdll_misc.h"
36 #include "ddk/wdm.h"
38 WINE_DEFAULT_DEBUG_CHANNEL(ntdll);
41 * Token
45 * Misc
48 /***********************************************************************
49 * RtlIsProcessorFeaturePresent [NTDLL.@]
51 BOOLEAN WINAPI RtlIsProcessorFeaturePresent( UINT feature )
53 return feature < PROCESSOR_FEATURE_MAX && user_shared_data->ProcessorFeatures[feature];
56 /******************************************************************************
57 * RtlGetNativeSystemInformation [NTDLL.@]
59 NTSTATUS WINAPI /* DECLSPEC_HOTPATCH */ RtlGetNativeSystemInformation(
60 IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
61 OUT PVOID SystemInformation,
62 IN ULONG Length,
63 OUT PULONG ResultLength)
65 FIXME( "semi-stub, SystemInformationClass %#x, SystemInformation %p, Length %#x, ResultLength %p.\n",
66 SystemInformationClass, SystemInformation, Length, ResultLength );
68 /* RtlGetNativeSystemInformation function is the same as NtQuerySystemInformation on some Win7
69 * versions but there are differences for earlier and newer versions, at least:
70 * - HighestUserAddress field for SystemBasicInformation;
71 * - Some information classes are not supported by RtlGetNativeSystemInformation. */
72 return NtQuerySystemInformation( SystemInformationClass, SystemInformation, Length, ResultLength );
75 /******************************************************************************
76 * VerSetConditionMask (NTDLL.@)
78 ULONGLONG WINAPI VerSetConditionMask( ULONGLONG dwlConditionMask, DWORD dwTypeBitMask,
79 BYTE dwConditionMask)
81 if(dwTypeBitMask == 0)
82 return dwlConditionMask;
83 dwConditionMask &= 0x07;
84 if(dwConditionMask == 0)
85 return dwlConditionMask;
87 if(dwTypeBitMask & VER_PRODUCT_TYPE)
88 dwlConditionMask |= dwConditionMask << 7*3;
89 else if (dwTypeBitMask & VER_SUITENAME)
90 dwlConditionMask |= dwConditionMask << 6*3;
91 else if (dwTypeBitMask & VER_SERVICEPACKMAJOR)
92 dwlConditionMask |= dwConditionMask << 5*3;
93 else if (dwTypeBitMask & VER_SERVICEPACKMINOR)
94 dwlConditionMask |= dwConditionMask << 4*3;
95 else if (dwTypeBitMask & VER_PLATFORMID)
96 dwlConditionMask |= dwConditionMask << 3*3;
97 else if (dwTypeBitMask & VER_BUILDNUMBER)
98 dwlConditionMask |= dwConditionMask << 2*3;
99 else if (dwTypeBitMask & VER_MAJORVERSION)
100 dwlConditionMask |= dwConditionMask << 1*3;
101 else if (dwTypeBitMask & VER_MINORVERSION)
102 dwlConditionMask |= dwConditionMask << 0*3;
103 return dwlConditionMask;