Hello @loop123123 , Welcome to Microsoft Q&A!
As far as I'm concerned,
- you can define a structure or a class for the Win32 structure. Use
ref const
for immutable Struct only to optimize Performance, See Parameters. - even further, you can write an overload of the winrt::box_value function for the Win32 structure like winrt::hstring.
Thank you.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.