http://bugs.winehq.org/show_bug.cgi?id=7414
Summary: Feature Request: provide SharedUserData area + accessors Product: Wine Version: unspecified Platform: PC OS/Version: Windows NT Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: wine-kernel AssignedTo: wine-bugs@winehq.org ReportedBy: focht@gmx.net
Hello,
while trying to implement kernel32/ntdll COM+ info related stubs which use NtGetSystemInformation/NtSetSystemInformation() i noticed the complete absense of "SharedUserData" structure which is mapped into every usermode process at 0x7FFE0000h on Windows NT+ (accessed by windows native api).
Does there exist an equivalent system global structure to store that kind of information (cached data copy) Otherwise one has use function static or module local "fake" data or execute some registry reads/writes every time.
I would like to use the structure defined like windbg outputs on WinXP SP2:
--- snip --- windbg session:
dt _KUSER_SHARED_DATA +0x000 TickCountLow : Uint4B +0x004 TickCountMultiplier : Uint4B +0x008 InterruptTime : _KSYSTEM_TIME +0x014 SystemTime : _KSYSTEM_TIME +0x020 TimeZoneBias : _KSYSTEM_TIME +0x02c ImageNumberLow : Uint2B +0x02e ImageNumberHigh : Uint2B +0x030 NtSystemRoot : [260] Uint2B +0x238 MaxStackTraceDepth : Uint4B +0x23c CryptoExponent : Uint4B +0x240 TimeZoneId : Uint4B +0x244 Reserved2 : [8] Uint4B +0x264 NtProductType : _NT_PRODUCT_TYPE +0x268 ProductTypeIsValid : UChar +0x26c NtMajorVersion : Uint4B +0x270 NtMinorVersion : Uint4B +0x274 ProcessorFeatures : [64] UChar +0x2b4 Reserved1 : Uint4B +0x2b8 Reserved3 : Uint4B +0x2bc TimeSlip : Uint4B +0x2c0 AlternativeArchitecture : _ALTERNATIVE_ARCHITECTURE_TYPE +0x2c8 SystemExpirationDate : _LARGE_INTEGER +0x2d0 SuiteMask : Uint4B +0x2d4 KdDebuggerEnabled : UChar +0x2d5 NXSupportPolicy : UChar +0x2d8 ActiveConsoleId : Uint4B +0x2dc DismountCount : Uint4B +0x2e0 ComPlusPackage : Uint4B +0x2e4 LastSystemRITEventTickCount : Uint4B +0x2e8 NumberOfPhysicalPages : Uint4B +0x2ec SafeBootMode : UChar +0x2f0 TraceLogging : Uint4B +0x2f8 TestRetInstruction : Uint8B +0x300 SystemCall : Uint4B +0x304 SystemCallReturn : Uint4B +0x308 SystemCallPad : [3] Uint8B +0x320 TickCount : _KSYSTEM_TIME +0x320 TickCountQuad : Uint8B +0x330 Cookie : Uint4B --- snip ---
The only reference now is include\ddk\wdm.h (defines struct _KUSER_SHARED_DATA)
I googled a bit and found it was used in ntdll/loader.c for a short time (test patch?) but no reference is found nowadays. Why is it gone or not used? It provides quick access (cache) to global data.
Regards