mirror of
https://github.com/BeneficialCode/WinArk
synced 2026-08-09 12:00:31 +00:00
19 lines
481 B
C++
19 lines
481 B
C++
#include "stdafx.h"
|
|
#include "WinStationObjectType.h"
|
|
|
|
WinStationObjectType::WinStationObjectType(int index, PCWSTR name) : ObjectType(index, name) {
|
|
}
|
|
|
|
CString WinStationObjectType::GetDetails(HANDLE hObject) {
|
|
CString details;
|
|
::EnumDesktops((HWINSTA)hObject, [](auto name, auto d) {
|
|
*((CString*)d) += CString(", ") + name;
|
|
return TRUE;
|
|
}, reinterpret_cast<LPARAM>(&details));
|
|
|
|
if (!details.IsEmpty()) {
|
|
details = L"Desktops: " + details.Mid(2);
|
|
}
|
|
return details;
|
|
}
|