mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-15 07:06:11 -04:00
188 lines
8.5 KiB
C++
188 lines
8.5 KiB
C++
// WARNING: Please don't edit this file. It was generated by C++/WinRT
|
|
// v2.0.250303.1
|
|
|
|
#pragma once
|
|
#ifndef WINRT_Microsoft_Windows_Security_AccessControl_H
|
|
#define WINRT_Microsoft_Windows_Security_AccessControl_H
|
|
#include "winrt/base.h"
|
|
static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.250303.1"),
|
|
"Mismatched C++/WinRT headers.");
|
|
#define CPPWINRT_VERSION "2.0.250303.1"
|
|
#include "winrt/impl/Microsoft.Windows.Security.AccessControl.2.h"
|
|
namespace winrt::impl {
|
|
template <typename D>
|
|
auto consume_Microsoft_Windows_Security_AccessControl_ISecurityDescriptorHelpersStatics<
|
|
D>::
|
|
GetSddlForAppContainerNames(
|
|
array_view<winrt::Microsoft::Windows::Security::AccessControl::
|
|
AppContainerNameAndAccess const>
|
|
accessRequests,
|
|
param::hstring const& principalStringSid,
|
|
uint32_t principalAccessMask) const {
|
|
void* result{};
|
|
if constexpr (!std::is_same_v<
|
|
D, winrt::Microsoft::Windows::Security::AccessControl::
|
|
ISecurityDescriptorHelpersStatics>) {
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<
|
|
winrt::Microsoft::Windows::Security::AccessControl::
|
|
ISecurityDescriptorHelpersStatics,
|
|
D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type =
|
|
*(abi_t<winrt::Microsoft::Windows::Security::AccessControl::
|
|
ISecurityDescriptorHelpersStatics>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->GetSddlForAppContainerNames(
|
|
accessRequests.size(), get_abi(accessRequests),
|
|
*(void**)(&principalStringSid), principalAccessMask, &result));
|
|
} else {
|
|
auto const _winrt_abi_type =
|
|
*(abi_t<winrt::Microsoft::Windows::Security::AccessControl::
|
|
ISecurityDescriptorHelpersStatics>**)this;
|
|
check_hresult(_winrt_abi_type->GetSddlForAppContainerNames(
|
|
accessRequests.size(), get_abi(accessRequests),
|
|
*(void**)(&principalStringSid), principalAccessMask, &result));
|
|
}
|
|
return hstring{result, take_ownership_from_abi};
|
|
}
|
|
template <typename D>
|
|
auto consume_Microsoft_Windows_Security_AccessControl_ISecurityDescriptorHelpersStatics<
|
|
D>::
|
|
GetSecurityDescriptorBytesFromAppContainerNames(
|
|
array_view<winrt::Microsoft::Windows::Security::AccessControl::
|
|
AppContainerNameAndAccess const>
|
|
accessRequests,
|
|
param::hstring const& principalStringSid,
|
|
uint32_t principalAccessMask) const {
|
|
uint32_t result_impl_size{};
|
|
uint8_t* result{};
|
|
if constexpr (!std::is_same_v<
|
|
D, winrt::Microsoft::Windows::Security::AccessControl::
|
|
ISecurityDescriptorHelpersStatics>) {
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<
|
|
winrt::Microsoft::Windows::Security::AccessControl::
|
|
ISecurityDescriptorHelpersStatics,
|
|
D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type =
|
|
*(abi_t<winrt::Microsoft::Windows::Security::AccessControl::
|
|
ISecurityDescriptorHelpersStatics>**)&_winrt_casted_result;
|
|
check_hresult(
|
|
_winrt_abi_type->GetSecurityDescriptorBytesFromAppContainerNames(
|
|
accessRequests.size(), get_abi(accessRequests),
|
|
*(void**)(&principalStringSid), principalAccessMask,
|
|
&result_impl_size, &result));
|
|
} else {
|
|
auto const _winrt_abi_type =
|
|
*(abi_t<winrt::Microsoft::Windows::Security::AccessControl::
|
|
ISecurityDescriptorHelpersStatics>**)this;
|
|
check_hresult(
|
|
_winrt_abi_type->GetSecurityDescriptorBytesFromAppContainerNames(
|
|
accessRequests.size(), get_abi(accessRequests),
|
|
*(void**)(&principalStringSid), principalAccessMask,
|
|
&result_impl_size, &result));
|
|
}
|
|
return com_array<uint8_t>{result, result_impl_size, take_ownership_from_abi};
|
|
}
|
|
#ifndef WINRT_LEAN_AND_MEAN
|
|
template <typename D>
|
|
struct produce<D, winrt::Microsoft::Windows::Security::AccessControl::
|
|
ISecurityDescriptorHelpersStatics>
|
|
: produce_base<D, winrt::Microsoft::Windows::Security::AccessControl::
|
|
ISecurityDescriptorHelpersStatics> {
|
|
int32_t __stdcall GetSddlForAppContainerNames(
|
|
uint32_t __accessRequestsSize,
|
|
struct
|
|
struct_Microsoft_Windows_Security_AccessControl_AppContainerNameAndAccess*
|
|
accessRequests,
|
|
void* principalStringSid, uint32_t principalAccessMask,
|
|
void** result) noexcept final try {
|
|
clear_abi(result);
|
|
typename D::abi_guard guard(this->shim());
|
|
*result = detach_from<hstring>(this->shim().GetSddlForAppContainerNames(
|
|
array_view<winrt::Microsoft::Windows::Security::AccessControl::
|
|
AppContainerNameAndAccess const>(
|
|
reinterpret_cast<
|
|
winrt::Microsoft::Windows::Security::AccessControl::
|
|
AppContainerNameAndAccess const*>(accessRequests),
|
|
reinterpret_cast<
|
|
winrt::Microsoft::Windows::Security::AccessControl::
|
|
AppContainerNameAndAccess const*>(accessRequests) +
|
|
__accessRequestsSize),
|
|
*reinterpret_cast<hstring const*>(&principalStringSid),
|
|
principalAccessMask));
|
|
return 0;
|
|
} catch (...) {
|
|
return to_hresult();
|
|
}
|
|
int32_t __stdcall GetSecurityDescriptorBytesFromAppContainerNames(
|
|
uint32_t __accessRequestsSize,
|
|
struct
|
|
struct_Microsoft_Windows_Security_AccessControl_AppContainerNameAndAccess*
|
|
accessRequests,
|
|
void* principalStringSid, uint32_t principalAccessMask,
|
|
uint32_t* __resultSize, uint8_t** result) noexcept final try {
|
|
clear_abi(result);
|
|
typename D::abi_guard guard(this->shim());
|
|
std::tie(*__resultSize, *result) =
|
|
detach_abi(this->shim().GetSecurityDescriptorBytesFromAppContainerNames(
|
|
array_view<winrt::Microsoft::Windows::Security::AccessControl::
|
|
AppContainerNameAndAccess const>(
|
|
reinterpret_cast<
|
|
winrt::Microsoft::Windows::Security::AccessControl::
|
|
AppContainerNameAndAccess const*>(accessRequests),
|
|
reinterpret_cast<
|
|
winrt::Microsoft::Windows::Security::AccessControl::
|
|
AppContainerNameAndAccess const*>(accessRequests) +
|
|
__accessRequestsSize),
|
|
*reinterpret_cast<hstring const*>(&principalStringSid),
|
|
principalAccessMask));
|
|
return 0;
|
|
} catch (...) {
|
|
return to_hresult();
|
|
}
|
|
};
|
|
#endif
|
|
} // namespace winrt::impl
|
|
WINRT_EXPORT namespace winrt::Microsoft::Windows::Security::AccessControl {
|
|
inline auto SecurityDescriptorHelpers::GetSddlForAppContainerNames(
|
|
array_view<winrt::Microsoft::Windows::Security::AccessControl::
|
|
AppContainerNameAndAccess const>
|
|
accessRequests,
|
|
param::hstring const& principalStringSid, uint32_t principalAccessMask) {
|
|
return impl::call_factory<SecurityDescriptorHelpers,
|
|
ISecurityDescriptorHelpersStatics>(
|
|
[&](ISecurityDescriptorHelpersStatics const& f) {
|
|
return f.GetSddlForAppContainerNames(
|
|
accessRequests, principalStringSid, principalAccessMask);
|
|
});
|
|
}
|
|
inline auto
|
|
SecurityDescriptorHelpers::GetSecurityDescriptorBytesFromAppContainerNames(
|
|
array_view<winrt::Microsoft::Windows::Security::AccessControl::
|
|
AppContainerNameAndAccess const>
|
|
accessRequests,
|
|
param::hstring const& principalStringSid, uint32_t principalAccessMask) {
|
|
return impl::call_factory<SecurityDescriptorHelpers,
|
|
ISecurityDescriptorHelpersStatics>(
|
|
[&](ISecurityDescriptorHelpersStatics const& f) {
|
|
return f.GetSecurityDescriptorBytesFromAppContainerNames(
|
|
accessRequests, principalStringSid, principalAccessMask);
|
|
});
|
|
}
|
|
}
|
|
namespace std {
|
|
#ifndef WINRT_LEAN_AND_MEAN
|
|
template <>
|
|
struct hash<winrt::Microsoft::Windows::Security::AccessControl::
|
|
ISecurityDescriptorHelpersStatics> : winrt::impl::hash_base {};
|
|
template <>
|
|
struct hash<winrt::Microsoft::Windows::Security::AccessControl::
|
|
SecurityDescriptorHelpers> : winrt::impl::hash_base {};
|
|
#endif
|
|
#ifdef __cpp_lib_format
|
|
#endif
|
|
} // namespace std
|
|
#endif
|