Profiling with DLL

I use the Visual Studio 2022 Performance Profiler to measure CPU usage for my Xojo app.

It works fine. Except, after calling any .dll function, the VS2022 Performance Profiler no longer gets any stack information from that point on.

The simplest possible way to reproduce this is to build a bare bones DLL with one function:

extern "C" __declspec(dllexport) void __stdcall do_nothing() { }

Then call it from Xojo as follows:

declare sub do_nothing lib "my_dll.dll" () 
do_nothing

After the call to do_nothing, VS2022 Performance Profiler can no longer retrieve any stack information.

Any thoughts how to fix this?

I believe you’ll need to point VS at the dll