@@ -1383,6 +1383,18 @@ inline HMODULE LoadGuiModule()
13831383 return LoadLibraryExW (epGuiPath , NULL , LOAD_LIBRARY_AS_DATAFILE );
13841384}
13851385
1386+ /*MIDL_INTERFACE("e329db7a-e2f4-4d74-f1b5-9d75b80a5e46")
1387+ IStartLayoutResolver : IUnknown
1388+ {
1389+ }*/
1390+
1391+ DEFINE_GUID (IID_IStartLayoutResolver , 0xE329DB7A , 0xE2F4 , 0x4D74 , 0xF1 , 0xB5 , 0x9D , 0x75 , 0xB8 , 0x0A , 0x5E , 0x46 );
1392+
1393+ /*class DECLSPEC_UUID("7bd7ab1c-f2c5-60c2-8d00-c2e50336a954")
1394+ StartLayoutFactory;*/
1395+
1396+ DEFINE_GUID (CLSID_StartLayoutFactory , 0x7BD7AB1C , 0xF2C5 , 0x60C2 , 0x8D , 0x00 , 0xC2 , 0xE5 , 0x03 , 0x36 , 0xA9 , 0x54 );
1397+
13861398inline BOOL DoesWindows10StartMenuExist ()
13871399{
13881400 if (!IsWindows11 ())
@@ -1391,15 +1403,46 @@ inline BOOL DoesWindows10StartMenuExist()
13911403 wchar_t szPath [MAX_PATH ];
13921404 GetWindowsDirectoryW (szPath , MAX_PATH );
13931405 wcscat_s (szPath , MAX_PATH , L"\\SystemApps\\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\\StartUI.dll" );
1394- if (FileExistsW (szPath ))
1395- return TRUE;
1406+ BOOL bRet = FileExistsW (szPath );
1407+ if (!bRet )
1408+ {
1409+ GetWindowsDirectoryW (szPath , MAX_PATH );
1410+ wcscat_s (szPath , MAX_PATH , L"\\SystemApps\\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\\StartUI_.dll" );
1411+ bRet = FileExistsW (szPath );
1412+ }
13961413
1397- GetWindowsDirectoryW (szPath , MAX_PATH );
1398- wcscat_s (szPath , MAX_PATH , L"\\SystemApps\\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\\StartUI_.dll" );
1399- if (FileExistsW (szPath ))
1400- return TRUE;
1414+ if (bRet )
1415+ {
1416+ #ifdef __cplusplus
1417+ IUnknown * pStartLayoutResolver ;
1418+ HRESULT hr = CoCreateInstance (
1419+ CLSID_StartLayoutFactory , nullptr , CLSCTX_INPROC_SERVER , IID_IStartLayoutResolver ,
1420+ (void * * )& pStartLayoutResolver );
1421+ if (SUCCEEDED (hr ))
1422+ {
1423+ pStartLayoutResolver -> Release ();
1424+ }
1425+ else
1426+ {
1427+ bRet = FALSE;
1428+ }
1429+ #else
1430+ IUnknown * pStartLayoutResolver ;
1431+ HRESULT hr = CoCreateInstance (
1432+ & CLSID_StartLayoutFactory , NULL , CLSCTX_INPROC_SERVER , & IID_IStartLayoutResolver ,
1433+ (void * * )& pStartLayoutResolver );
1434+ if (SUCCEEDED (hr ))
1435+ {
1436+ pStartLayoutResolver -> lpVtbl -> Release (pStartLayoutResolver );
1437+ }
1438+ else
1439+ {
1440+ bRet = FALSE;
1441+ }
1442+ #endif
1443+ }
14011444
1402- return FALSE ;
1445+ return bRet ;
14031446}
14041447
14051448inline BOOL IsStockWindows10TaskbarAvailable ()
0 commit comments