Basic scrollArea work, win32 sound controlpanel shortcut

This commit is contained in:
Hane 2024-03-26 19:00:34 +01:00
commit a373c706ac
12 changed files with 159 additions and 13 deletions

View file

@ -689,6 +689,32 @@ Overseer::Overseer() { //: epsc(deviceEnumerator, playbackDevices){
if(FAILED(deviceEnumerator->RegisterEndpointNotificationCallback(((IMMNotificationClient*)&epsc)))) { log_debugcpp("when no enchufas......"); }
}
void Overseer::openControlPanel() {
STARTUPINFOEXW startupConfig;
PROCESS_INFORMATION processInfo;
SecureZeroMemory(&startupConfig, sizeof(STARTUPINFOEXW));
SecureZeroMemory(&startupConfig.StartupInfo, sizeof(STARTUPINFOW));
startupConfig.StartupInfo.cb = sizeof(STARTUPINFOEXW);
SecureZeroMemory(&processInfo, sizeof(PROCESS_INFORMATION));
std::wstring command = L"rundll32 shell32, Control_RunDLL mmsys.cpl";
if(CreateProcessW(
NULL,
(wchar_t*)command.c_str(),
NULL,
NULL,
false,
CREATE_UNICODE_ENVIRONMENT,
NULL,
NULL,
(LPSTARTUPINFOW)&startupConfig,
&processInfo
) == true) {
CloseHandle(processInfo.hProcess);
CloseHandle(processInfo.hThread);
}
}
NGuid Overseer::getGuid() {
return guid;
}