sentry-dotnet
sentry-dotnet copied to clipboard
Explore Windows specific APIs for extra context
If there are useful context data available through Win32, we could get that data when net5-windows
for example. Consider cswin32
for binding.
There are also UWP APIs available, for example: https://github.com/getsentry/sentry-xamarin/issues/92
GetSystemInfo
function and SystemInfo
structure look interesting/useful:
typedef struct _SYSTEM_INFO {
union {
DWORD dwOemId;
struct {
WORD wProcessorArchitecture;
WORD wReserved;
} DUMMYSTRUCTNAME;
} DUMMYUNIONNAME;
DWORD dwPageSize;
LPVOID lpMinimumApplicationAddress;
LPVOID lpMaximumApplicationAddress;
DWORD_PTR dwActiveProcessorMask;
DWORD dwNumberOfProcessors;
DWORD dwProcessorType;
DWORD dwAllocationGranularity;
WORD wProcessorLevel;
WORD wProcessorRevision;
} SYSTEM_INFO, *LPSYSTEM_INFO;
No need to limit this to net5-windows
, can just check the current platform and call WinAPI only if on Windows. It's not like we expose any public API, it's all internal anyway.
this will be re-examined if we ever need a windows specific target for other requirements