0
0
mirror of https://gitlab.winehq.org/wine/wine-staging.git synced 2025-09-12 18:50:20 -07:00
Files
patches
Compiler_Warnings
Coverity
Exagear
Pipelight
Staging
advapi-LsaLookupPrivilegeName
advapi32-GetExplicitEntriesFromAclW
advapi32-LsaLookupSids
advapi32-SetSecurityInfo
advapi32-WinBuiltinAnyPackageSid
api-ms-win-Stub_DLLs
avifil32-AVIFile_Proxies
avifil32-IGetFrame_fnSetFormat
avifile.dll16-AVIStreamGetFrame
bcrypt-Improvements
browseui-Progress_Dialog
combase-RoApi
comctl32-Button_Theming
comctl32-Listview_DrawItem
comctl32-TTM_ADDTOOLW
comdlg32-lpstrFileTitle
configure-Absolute_RPATH
configure-OSMesa
crypt32-CMS_Certificates
crypt32-Certificate_Check
crypt32-CryptUnprotectMemory
crypt32-MS_Root_Certs
crypt32-SHA_OIDs
d3d10_1-Forwards
d3d11-Deferred_Context
d3d11-ID3D11Texture1D
d3d11-ResolveSubresource
d3d8-ValidateShader
d3d9-DesktopWindow
d3d9-Tests
d3dx9_25-ID3DXEffect
d3dx9_36-BumpLuminance
d3dx9_36-CloneEffect
d3dx9_36-D3DXCreateTeapot
d3dx9_36-D3DXDisassembleShader
d3dx9_36-D3DXStubs
d3dx9_36-DDS
d3dx9_36-DXTn
d3dx9_36-DrawText
d3dx9_36-Dummy_Skininfo
d3dx9_36-Filter_Warnings
d3dx9_36-FindNextValidTechnique
d3dx9_36-GetShaderSemantics
d3dx9_36-Optimize_Inplace
d3dx9_36-Texture_Align
d3dx9_36-UpdateSkinnedMesh
dbghelp-Debug_Symbols
ddraw-D3DFINDDEVICERESULT
ddraw-Device_Caps
ddraw-EnumSurfaces
ddraw-Fix_Typos
ddraw-FlipToGDISurface
ddraw-IDirect3DTexture2_Load
ddraw-Rendering_Targets
ddraw-Silence_FIXMEs
ddraw-Write_Vtable
devenum-AudioCompressorCategory
dinput-Initialize
dmusic-SynthPort_IKsControl
dsound-EAX
dsound-Fast_Mixer
dsound-Revert_Cleanup
dxdiagn-Display_Information
dxdiagn-Enumerate_DirectSound
dxdiagn-GetChildContainer_Leaf_Nodes
dxgi-GammaRamp
dxgi-MakeWindowAssociation
dxva2-Video_Decoder
explorer-Video_Registry_Key
fonts-Missing_Fonts
fsutil-Stub_Program
gdi32-GetCharacterPlacement
gdi32-Lazy_Font_Initialization
gdi32-MultiMonitor
gdi32-Path_Metafile
gdi32-Symbol_Truetype_Font
gdiplus-DC_Handling
gdiplus-Grayscale_PNG
gdiplus-Performance-Improvements
hal-KeQueryPerformanceCounter
hnetcfg-INetFwAuthorizedApplication
ieframe-IViewObject-Draw
iexplore-Revert_ProductVersion
imagehlp-BindImageEx
imagehlp-Cleanup
imagehlp-ImageLoad
imm32-IMMDisableLegacyIME
inseng-Implementation
iphlpapi-System_Ping
iphlpapi-TCP_Table
kernel32-COMSPEC
kernel32-CopyFileEx
kernel32-Cwd_Startup_Info
kernel32-Debugger
kernel32-FindFirstFile
kernel32-GetPackageFullName
kernel32-GetShortPathName
kernel32-K32GetPerformanceInfo
kernel32-LocaleNameToLCID
kernel32-Locale_Definitions
kernel32-Misalign_Workaround
kernel32-MoveFile
kernel32-Named_Pipe
kernel32-NeedCurrentDirectoryForExePath
kernel32-PE_Loader_Fixes
kernel32-Processor_Group
kernel32-Profile
kernel32-SCSI_Sysfs
kernel32-SetFileCompletionNotificationModes
kernel32-SetFileInformationByHandle
kernel32-TimezoneInformation_Registry
kernel32-UmsStubs
kernel32-VerifyVersionInfo
krnl386.exe16-GDT_LDT_Emulation
krnl386.exe16-Invalid_Console_Handles
krnl386.exe16-_lclose16
libs-Debug_Channel
libs-Unicode_Collation
makedep-PARENTSPEC
mfplat-MFTRegister
mmsystem.dll16-MIDIHDR_Refcount
mountmgr-DosDevices
mpr-WNetGetUniversalNameW
mscoree-CorValidateImage
mshtml-HTMLLocation_put_hash
msi-msi_vcl_get_cost
msidb-Implementation
msvcr120-_SetWinRTOutOfMemoryExceptionCallback
msvcrt-Math_Precision
msvfw32-ICGetDisplayFormat
ntdll-APC_Performance
ntdll-APC_Start_Process
ntdll-Activation_Context
ntdll-ApiSetMap
ntdll-ApiSetQueryApiSetPresence
ntdll-Attach_Process_DLLs
ntdll-CLI_Images
ntdll-DOS_Attributes
ntdll-Dealloc_Thread_Stack
ntdll-DeviceType_Systemroot
ntdll-DllOverrides_WOW64
ntdll-DllRedirects
ntdll-Exception
ntdll-FileDispositionInformation
ntdll-FileFsFullSizeInformation
ntdll-FileFsVolumeInformation
ntdll-FileNameInformation
ntdll-Fix_Alignment
ntdll-Grow_Virtual_Heap
ntdll-HashLinks
ntdll-Heap_FreeLists
ntdll-Hide_Wine_Exports
ntdll-Interrupt-0x2e
ntdll-Junction_Points
ntdll-LDR_MODULE
ntdll-LdrEnumerateLoadedModules
ntdll-LdrGetDllHandle
ntdll-Loader_Machine_Type
ntdll-NtAccessCheck
ntdll-NtAllocateUuids
ntdll-NtQueryEaFile
ntdll-NtQueryInformationJobObject
ntdll-NtQuerySection
ntdll-NtQueryVirtualMemory
ntdll-NtSetInformationToken
ntdll-NtSetLdtEntries
ntdll-NtSuspendProcess
ntdll-Pipe_SpecialCharacters
ntdll-ProcessImageFileNameWin32
ntdll-ProcessPriorityClass
ntdll-ProcessQuotaLimits
ntdll-Purist_Mode
ntdll-RtlCaptureStackBackTrace
ntdll-RtlGetUnloadEventTraceEx
ntdll-RtlIpStringToAddress_Stubs
ntdll-RtlIpStringToAddress_Tests
ntdll-RtlQueryPackageIdentity
ntdll-RunlevelInformationInActivationContext
ntdll-Serial_Port_Detection
ntdll-Stack_Guard_Page
ntdll-Stack_Overflow
ntdll-Status_Mapping
ntdll-Syscall_Wrappers
ntdll-SystemInterruptInformation
ntdll-SystemRecommendedSharedDataAlignment
ntdll-SystemRoot_Symlink
ntdll-ThreadTime
ntdll-Thread_Stack
ntdll-Threading
ntdll-User_Shared_Data
ntdll-Virtual_Memory_Stack
ntdll-WRITECOPY
ntdll-Wait_User_APC
ntdll-WriteWatches
ntdll-Zero_mod_name
ntdll-_aulldvrm
ntdll-call_thread_func_wrapper
ntdll-x86_64_Builtin_Frames
ntoskrnl-DriverTest
ntoskrnl-Stubs
nvapi-Stub_DLL
nvcuda-CUDA_Support
nvcuvid-CUDA_Video_Support
nvencodeapi-Video_Encoder
ole32-HGLOBALStream
ole32-OleGetIconOfFile
ole32-STGPROP
oleaut32-CreateTypeLib
oleaut32-DispCallFunc
oleaut32-ITypeInfo_fnInvoke
oleaut32-LoadTypeLibEx
oleaut32-Load_Save_EMF
oleaut32-OLEPictureImpl_SaveAsFile
oleaut32-OleLoadPicture
oleaut32-OleLoadPictureFile
oleaut32-TKIND_COCLASS
oleaut32-Vtable_Offset
oleaut32-x86_64_Marshaller
opengl32-Revert_Disable_Ext
opengl32-glDebugMessageCallback
qcap-O_CLOEXEC
quartz-MediaSeeking_Positions
quartz-Silence_FIXMEs
riched20-Class_Tests
riched20-IText_Interface
secur32-Zero_Buffer_Length
server-ClipCursor
server-CreateProcess_ACLs
server-Desktop_Refcount
server-FileEndOfFileInformation
server-File_Permissions
server-Inherited_ACLs
server-Key_State
server-LABEL_SECURITY_INFORMATION
server-Map_EXDEV_Error
server-Misc_ACL
server-Object_Types
server-PeekMessage
server-Pipe_ObjectName
server-Realtime_Priority
server-Registry_Notifications
server-Shared_Memory
server-Signal_Thread
server-Stored_ACLs
server-Timestamp_Compat
setupapi-DelReg
setupapi-DiskSpaceList
setupapi-Display_Device
setupapi-HSPFILEQ_Check_Type
setupapi-SP_COPY_IN_USE_NEEDS_REBOOT
setupapi-SetupDiGetDeviceInterfaceDetail
setupapi-SetupPromptForDisk
sfc-SfcGetNextProtectedFile
shdocvw-ParseURLFromOutsideSource_Tests
shell32-Context_Menu
shell32-File_Property_Dialog
shell32-FolderItemsImpl_get_Count
shell32-Icons
shell32-Microsoft_Windows_Themes
shell32-NewMenu_Interface
shell32-Placeholder_Icons
shell32-Progress_Dialog
shell32-RunDLL_CallEntry16
shell32-SFGAO_HASSUBFOLDER
shell32-SHCreateSessionKey
0001-shell32-Implement-SHCreateSessionKey.patch
shell32-SHFileOperation_Move
shell32-SHFileOperation_Win9x
shell32-Toolbar_Bitmaps
shell32-UnixFS
shlwapi-AssocGetPerceivedType
shlwapi-SHAddDataBlock
shlwapi-SHMapHandle
shlwapi-UrlCombine
stdole32.idl-Typelib
stdole32.tlb-SLTG_Typelib
taskmgr-Memory_Usage
user.exe16-CONTAINING_RECORD
user.exe16-DlgDirList
user32-Auto_Radio_Button
user32-Combobox_WM_SIZE
user32-DM_SETDEFID
user32-DialogBoxParam
user32-Dialog_Focus
user32-Dialog_Paint_Event
user32-DrawMenuItem
user32-DrawTextExW
user32-GetAutoRotationState
user32-GetSystemMetrics
user32-Groupbox_Rectangle
user32-Invalidate_Key_State
user32-LR_LOADFROMFILE
user32-ListBox_Size
user32-MessageBox_WS_EX_TOPMOST
user32-Mouse_Message_Hwnd
user32-PNG_Support
user32-Refresh_MDI_Menus
user32-ScrollWindowEx
user32-Sorted_Listbox
user32-WM_MEASUREITEM
user32-lpCreateParams
uxtheme-CloseThemeClass
uxtheme-GTK_Theming
vcomp-_vcomp_for_static_init
version-GetFileVersionInfoSizeExW
version-VerFindFileA
version-VerQueryValue
virtdisk-GetStorageDependencyInformation
vulkan-Vulkan_Implementation
wbemdisp-ISWbemSecurity
wbemprox-Printer
wbemprox-Win32_VideoController
wevtapi-EvtNext
widl-SLTG_Typelib_Support
windowscodecs-32bppGrayFloat
windowscodecs-32bppPRGBA
windowscodecs-GIF_Encoder
windowscodecs-IMILBitmapSource
windowscodecs-IWICPalette_InitializeFromBitmap
windowscodecs-Palette_Images
windowscodecs-TIFF_Support
windowscodecs-WICCreateBitmapFromSection
wine.inf-Directory_ContextMenuHandlers
wine.inf-Dummy_CA_Certificate
wine.inf-Performance
wine.inf-ProfileList_UserSID
wine.inf-WMP_12
wineboot-DriveSerial
wineboot-HKEY_DYN_DATA
wineboot-ProxySettings
wineboot-drivers_etc_Stubs
winecfg-Libraries
winecfg-Staging
winecfg-Unmounted_Devices
wined3d-1DTextures
wined3d-Accounting
wined3d-CSMT_Helper
wined3d-CSMT_Main
wined3d-DXTn
wined3d-GTX_560M
wined3d-Limit_Vram
wined3d-QUERY_Stubs
wined3d-Revert_Buffer_Upload
wined3d-Revert_Pixel_Center_Offset
wined3d-Silence_FIXMEs
wined3d-WINED3DFMT_R32G32_UINT
wined3d-buffer_create
wined3d-check_format_support
winedbg-Process_Arguments
winedevice-Fix_Relocation
winemenubuilder-Desktop_Icon_Path
winemp3.acm-MPEG3_StreamOpen
wineps.drv-PostScript_Fixes
winepulse-PulseAudio_Support
winex11-CandidateWindowPos
winex11-DefaultDisplayFrequency
winex11-Limited_Resolutions
winex11-MWM_Decorations
winex11-SC_KEYMENU
winex11-UpdateLayeredWindow
winex11-WM_WINDOWPOSCHANGING
winex11-Window_Groups
winex11-Window_Style
winex11-XEMBED
winex11-_NET_ACTIVE_WINDOW
winex11-wglShareLists
winhlp32-Flex_Workaround
winhttp-Accept_Headers
winhttp-System_Proxy_Autoconfig
wininet-Cleanup
wininet-Http_Decoding
wininet-InternetCrackUrlW
wininet-Internet_Settings
wininet-ParseX509EncodedCertificateForListBoxEntry
wininet-Redirect
winmm-Delay_Import_Depends
winmm-mciSendCommandA
wintrust-WinVerifyTrust
wpcap-Dynamic_Linking
wpcap-Several_Fixes
ws2_32-APC_Performance
ws2_32-Connect_Time
ws2_32-Tests
ws2_32-TransmitFile
ws2_32-WSACleanup
ws2_32-WriteWatches
ws2_32-getsockopt
wtsapi32-EnumerateProcesses
wtsapi32-WTSQueryUserToken
wuauserv-Dummy_Service
wusa-MSU_Package_Installer
xaudio2_7-Abandon_Albufs
xinput9_1_0-Parentsrc
Makefile
gitapply.sh
patchinstall.sh
staging
.gitignore
LICENSE.md
README.md
precommit-hook.sh
wine-staging/patches/shell32-SHCreateSessionKey/0001-shell32-Implement-SHCreateSessionKey.patch
Sebastian Lackner 5c0d70c70e Rebase against 1316520a8029c0a99b358d1cd754294634d1855a.
[ntoskrnl-METHOD_OUT_DIRECT]
Removed patch to implement support for METHOD_OUT_DIRECT ioctls (accepted
upstream).

[wined3d-CSMT_Main]
Temporarily disable patchset.
2016-10-30 23:15:48 +01:00

90 lines
3.3 KiB
Diff

From b91e77db01f842164dd0ec593ad6bf433ad46c5e Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Mon, 17 Feb 2014 11:52:46 +0900
Subject: shell32: Implement SHCreateSessionKey.
This implementation is based on the Geoff Chappell description,
and it seems to be enough for the application I have here.
---
dlls/shell32/shellreg.c | 36 +++++++++++++++++++++++++++++++++---
dlls/shell32/tests/shellole.c | 8 ++++----
2 files changed, 37 insertions(+), 7 deletions(-)
diff --git a/dlls/shell32/shellreg.c b/dlls/shell32/shellreg.c
index 356ec4e..fff1b91 100644
--- a/dlls/shell32/shellreg.c
+++ b/dlls/shell32/shellreg.c
@@ -148,13 +148,43 @@ HRESULT WINAPI SHRegCloseKey (HKEY hkey)
return RegCloseKey( hkey );
}
+static const char session_reg_key[] = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\SessionInfo\\";
+
+static BOOL WINAPI create_session_key(INIT_ONCE *once, void *param, void **context)
+{
+ static const char desktop_guid[] = "__wine_display_device_guid";
+ ATOM guid_atom;
+ HKEY hkey_session;
+ LPWSTR session_reg_str = param;
+
+ guid_atom = HandleToULong(GetPropA(GetDesktopWindow(), desktop_guid));
+ if (!guid_atom) return FALSE;
+
+ MultiByteToWideChar(CP_ACP, 0, session_reg_key, sizeof(session_reg_key), session_reg_str, sizeof(session_reg_key));
+
+ if (!GlobalGetAtomNameW(guid_atom, session_reg_str + sizeof(session_reg_key) - 1, 39))
+ return FALSE;
+
+ if (RegCreateKeyExW(HKEY_CURRENT_USER, session_reg_str, 0, NULL,
+ REG_OPTION_VOLATILE, KEY_WRITE, NULL, &hkey_session, NULL))
+ return FALSE;
+
+ RegCloseKey(hkey_session);
+ TRACE("session key %s\n", debugstr_w(session_reg_str));
+ return TRUE;
+}
+
/*************************************************************************
* SHCreateSessionKey [SHELL32.723]
*
*/
HRESULT WINAPI SHCreateSessionKey(REGSAM access, HKEY *hkey)
{
- FIXME("stub: %d %p\n", access, hkey);
- *hkey = NULL;
- return E_NOTIMPL;
+ static INIT_ONCE init_once = INIT_ONCE_STATIC_INIT;
+ static WCHAR session_reg_str[sizeof(session_reg_key) + 39];
+
+ InitOnceExecuteOnce(&init_once, create_session_key, session_reg_str, NULL);
+
+ TRACE("using session key %s\n", debugstr_w(session_reg_str));
+ return RegOpenKeyExW(HKEY_CURRENT_USER, session_reg_str, 0, access, hkey);
}
diff --git a/dlls/shell32/tests/shellole.c b/dlls/shell32/tests/shellole.c
index be10733..72e0f31 100644
--- a/dlls/shell32/tests/shellole.c
+++ b/dlls/shell32/tests/shellole.c
@@ -877,14 +877,14 @@ static void test_SHCreateSessionKey(void)
hkey = (HKEY)0xdeadbeef;
hr = pSHCreateSessionKey(0, &hkey);
todo_wine ok(hr == E_ACCESSDENIED, "got 0x%08x\n", hr);
- ok(hkey == NULL, "got %p\n", hkey);
+ todo_wine ok(hkey == NULL, "got %p\n", hkey);
hr = pSHCreateSessionKey(KEY_READ, &hkey);
- todo_wine ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
hr = pSHCreateSessionKey(KEY_READ, &hkey2);
- todo_wine ok(hr == S_OK, "got 0x%08x\n", hr);
- todo_wine ok(hkey != hkey2, "got %p, %p\n", hkey, hkey2);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hkey != hkey2, "got %p, %p\n", hkey, hkey2);
RegCloseKey(hkey);
RegCloseKey(hkey2);
--
2.9.0