Lukas Kurz
banner
shortdev.de
Lukas Kurz
@shortdev.de
Fullstack @dot.net developer
Last thing to do: Guess some names based on the values and we're done!

```
struct SendDataProgress {
NearShareStatus Status;
UInt64 TotalBytes;
UInt64 SentBytes;
UInt32 TotalFiles;
UInt32 SentFiles;
};
```
September 5, 2025 at 2:03 PM
Voila:

```
pinterface({b5d036d7-e297-498f-ba60-0289e76e23dd};enum(NearShareStatus;i4);struct(SendDataProgress;enum(NearShareStatus;i4);u8;u8;u4;u4))
```
September 5, 2025 at 2:03 PM
Because the iid of a generic interface in the #WinRT type-system is the uuid5 of it's signature, we can brute-force the layout of `SendDataProgress` by matching against the known iid (40772286-cf1a-5cbd-9d74-4137587691d5).
September 5, 2025 at 2:03 PM
Based on the published debugging-symbols, we know that `ShareDataWithProgressAsync` returns an instance of `IAsyncOperationWithProgress<NearShareStatus, SendDataProgress>`.

`NearShareStatus` is a simple enum, but `SendDataProgress` is a struct with unknown layout.
September 5, 2025 at 2:03 PM
The logic for Nearby Sharing on Windows is implemented in `cdprt.dll` and can be called via `ShareSenderBroker.ShareDataWithProgressAsync`.

Sadly, this method is not documented so we have to use some reverse-engineering magic to use this api.
September 5, 2025 at 2:03 PM
Fortunately the #nearshare beacon format is not on the default deny list!

cs.android.com/android/plat...
Search and explore code
cs.android.com
August 13, 2025 at 1:08 PM
All apps using the Windows.Gaming.Input namespace will search the registry for mappings and detect the Stadia Controller.
August 3, 2025 at 7:23 PM
By generating the layout with code like that has the benefit of .NET hotreload.

0.5s hotreload vs 30s rebuild is not too bad 😎

Still not Jetpack Compose though...
June 7, 2025 at 9:38 AM