← [Back to Twitter thread index](../README.md) --- title: "Following the succession (thanks) of re-trying WASAPI using this example which h" author: "NOTimothyLottes" handle: "@NOTimothyLottes" post_url: "https://x.com/NOTimothyLottes/status/2073096069529907441" post_id: "2073096069529907441" timestamp: "2026-07-03 17:26:33" post_count: 6 reply_count: 1 repost_count: 0 like_count: 8 view_count: 1123 --- # @NOTimothyLottes — Following the succession (thanks) of re-trying WASAPI using this example which h ## Post 1 (2026-07-03 17:26:33) Following the succession (thanks) of re-trying WASAPI using this example which has been pre-minimized and de-C++'ed: https://gist.github.com/mmozeiko/5a5b168e61aff4c1eaec0381da62808f#file-win32_wasapi-h - But I'm missing something on how to get the C++ as C linking to function (cross compiling), doesn't easily work out of the box. ![Media 1](./media/2073096069529907441_1.png) ## Post 2 (2026-07-03 17:37:48) — reply to Post 1 Of course I'm missing the magic header that does the real work ... curious how messy this will get ![Media 1](./media/2073098899896598550_1.jpg) ## Post 3 (2026-07-03 18:22:17) — reply to Post 2 So instead of the massive "mmdeviceapi.h" mess-ware, I defined a stupid CPP_(object,virtual_function_number) macro. This way I just have to write down the index in the VT table for the specific virtual function ... ![Media 1](./media/2073110092447203466_1.png) ## Post 4 (2026-07-03 18:27:11) — reply to Post 3 Here is initial bring up, function call by function call. No headers, and no C++. The magic of typecasting at usage IC4_(CPP_(... is that I don't ever have to build the headers. That is at least working out well. I do line by line to test in Wine, defer fail handling until later ![Media 1](./media/2073111326981783629_1.png) ## Post 5 (2026-07-03 18:35:35) — reply to Post 4 More on bring-up. I just run and check visually for output in the console (this time 'B055'). Since compile times are under a second, it is super fast to check as I go. Easy to see how much code bloat there is for C++ this way (doing it manually). ![Media 1](./media/2073113441959616958_1.png) ## Post 6 (2026-07-03 18:39:26) — reply to Post 5 Example below of how much header bloat I'm factoring out using my simple macros ![Media 1](./media/2073114409270997497_1.png)