marlersoft / zigwin32

Zig bindings for Win32 generated by https://github.com/marlersoft/zigwin32gen
MIT License
234 stars 30 forks source link

Possibly unimplemented feature? #1

Closed lukebayes closed 3 years ago

lukebayes commented 3 years ago

Thanks for the great library!

Here's a rough version of the code that I'm trying to run.

I'm very new to Zig and Win32 COM APIs, and there are almost certainly problems in here, so any tips are appreciated.

const std = @import("std");
const win32 = @import("win32");

const print = std.debug.print;

usingnamespace win32.media.audio.core_audio;
usingnamespace win32.media.audio.direct_music;
usingnamespace win32.storage.structured_storage;
usingnamespace win32.system.com;
usingnamespace win32.system.properties_system;
usingnamespace win32.system.system_services;
usingnamespace win32.zig;

const ApiError = error{
    Failure,
};

pub const AudioDevice = struct {
    name: []const u8 = DEFAULT_DEVICE_NAME,
};

pub fn getDefaultDevice() !AudioDevice {
    var status: i32 = 0;

    const config_value = @enumToInt(COINIT_APARTMENTTHREADED) | @enumToInt(COINIT_DISABLE_OLE1DDE);
    status = CoInitialize(null); // CoInitializeEx(null, @intToEnum(COINIT, config_value));
    if (FAILED(status)) {
        print("CoInitialize FAILED: {d}\n", .{status});
        return ApiError.Failure;
    }
    defer CoUninitialize();

    var enumerator: *IMMDeviceEnumerator = undefined;
    status = CoCreateInstance(CLSID_MMDeviceEnumerator, null, CLSCTX_ALL, IID_IMMDeviceEnumerator, @ptrCast(**c_void, &enumerator));
    if (FAILED(status)) {
        print("CoCreateInstance FAILED: {d}\n", .{status});
        return ApiError.Failure;
    }
    // defer enumerator.IMMDeviceEnumerator_Release(); // No such method

    print("pre enumerator: {s}\n", .{enumerator});

    var device: *IMMDevice = undefined;
    status = enumerator.IMMDeviceEnumerator_GetDefaultAudioEndpoint(EDataFlow.eCapture, ERole.eCommunications, &device);
    if (FAILED(status)) {
        print("DEVICE STATUS: {d}\n", .{status});
        return ApiError.Failure;
    }
    // defer device.IMMDevice_Release(); // No such method

    var properties: *IPropertyStore = undefined;
    status = device.IMMDevice_OpenPropertyStore(STGM_READ, &properties);
    if (FAILED(status)) {
        print("DEVICE PROPS: {d}\n", .{status});
        return ApiError.Failure;
    }

    var count: u32 = 0;
    status = properties.IPropertyStore_GetCount(&count);
    if (FAILED(status)) {
        print("GetCount failed: {d}\n", .{status});
        return ApiError.Failure;
    }

    var index: u32 = 0;
    while (index < count - 1) : (index += 1) {
        var propKey: PROPERTYKEY = undefined;
        var propValue: PROPVARIANT = undefined;

        print("index: {d}\n", .{index});
        status = properties.IPropertyStore_GetAt(index, &propKey);
        if (FAILED(status)) {
            print("Failed to getAt {x}\n", .{status});
            return ApiError.Failure;
        }
        print("Looping propeties with: {s}\n", .{propKey});
        // The following line fails with a stack trace (pasted below)
        status = properties.IPropertyStore_GetValue(&propKey, &propValue);
    }

    // print("post device: {s}\n", .{device.IMMDevice_GetId()});

    return AudioDevice{};
}

pub fn main() u8 {
    print("Loaded\n", .{});
    _ = getDefaultDevice() |err| { print("err: {x}\n", .{err}); };
    return 0;
}

Here's the stack trace that I get when running this in Wine:

pre enumerator: IMMDeviceEnumerator{ .vtable = VTable{ .base = VTable{ .QueryInterface = fn(*const .win32.win32.system.com.IUnknown, *const .win32.win32.zig.Guid, **c_void) callconv(.C) i32@7f86ec871980, .AddRef = fn(*const .win32.win32.system.com.IUnknown) callconv(.C) u32@7f86ec870e10, .Release = fn(*const .win32.win32.system.com.IUnknown) callconv(.C) u32@7f86ec875120 }, .EnumAudioEndpoints = fn(*const .win32.win32.media.audio.core_audio.IMMDeviceEnumerator, .win32.win32.media.audio.core_audio.EDataFlow, u32, **.win32.win32.media.audio.core_audio.IMMDeviceCollection) callconv(.C) i32@7f86ec871160, .GetDefaultAudioEndpoint = fn(*const .win32.win32.media.audio.core_audio.IMMDeviceEnumerator, .win32.win32.media.audio.core_audio.EDataFlow, .win32.win32.media.audio.core_audio.ERole, **.win32.win32.media.audio.core_audio.IMMDevice) callconv(.C) i32@7f86ec872890, .GetDevice = fn(*const .win32.win32.media.audio.core_audio.IMMDeviceEnumerator, [*:0]const u16, **.win32.win32.media.audio.core_audio.IMMDevice) callconv(.C) i32@7f86ec86fdd0, .RegisterEndpointNotificationCallback = fn(*const .win32.win32.media.audio.core_audio.IMMDeviceEnumerator, *.win32.win32.media.audio.core_audio.IMMNotificationClient) callconv(.C) i32@7f86ec870690, .UnregisterEndpointNotificationCallback = fn(*const .win32.win32.media.audio.core_audio.IMMDeviceEnumerator, *.win32.win32.media.audio.core_audio.IMMNotificationClient) callconv(.C) i32@7f86ec8712b0 } }
index: 0
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@112f6b8, .pid = 2 }
thread 9 panic: integer overflow
/home/lukebayes/Projects/eightamps/maple-sdk/zig/src/platform_win.zig:76:34: 0x140002403 in platform_win.AudioApi()::platform_win.AudioApi().getDefaultDevice (console.o)
Panicked during a panic. Aborting.
wine: Unhandled exception 0x80000003 in thread 9 at address 000000014000298A (thread 0009), starting debugger...
002c:fixme:dbghelp:elf_search_auxv can't find symbol in module
002c:fixme:dbghelp:elf_search_auxv can't find symbol in module
002c:fixme:dbghelp:elf_search_auxv can't find symbol in module
002c:fixme:dbghelp:elf_search_auxv can't find symbol in module
002c:fixme:dbghelp:elf_search_auxv can't find symbol in module
002c:fixme:dbghelp:elf_search_auxv can't find symbol in module
002c:fixme:dbghelp:elf_search_auxv can't find symbol in module
002c:fixme:dbghelp:elf_search_auxv can't find symbol in module
002c:fixme:dbghelp:elf_search_auxv can't find symbol in module
002c:fixme:dbghelp:elf_search_auxv can't find symbol in module
002c:fixme:dbghelp:elf_search_auxv can't find symbol in module
002c:fixme:dbghelp:elf_search_auxv can't find symbol in module
002c:fixme:dbghelp:elf_search_auxv can't find symbol in module
002c:fixme:dbghelp:elf_search_auxv can't find symbol in module
002c:fixme:dbghelp:elf_search_auxv can't find symbol in module
002c:fixme:dbghelp:elf_search_auxv can't find symbol in module
002c:fixme:dbghelp:elf_search_auxv can't find symbol in module
002c:fixme:dbghelp:elf_search_auxv can't find symbol in module
002c:fixme:dbghelp:elf_search_auxv can't find symbol in module
002c:fixme:dbghelp_msc:codeview_fetch_type Cannot locate type 24
0x000000014000298a std.os.abort+0xa in console: int     $3
Modules:
Module  Address                                 Debug info      Name (84 modules)
ELF             7b000000-        7b0e2000       Deferred        kernelbase<elf>
  \-PE          7b010000-        7b0e2000       \               kernelbase
ELF             7b400000-        7b68b000       Dwarf           kernel32<elf>
  \-PE          7b420000-        7b68b000       \               kernel32
ELF             7bc00000-        7befb000       Deferred        ntdll<elf>
  \-PE          7bc20000-        7befb000       \               ntdll
ELF             7c000000-        7c005000       Deferred        <wine-loader>
PE             140000000-       140058000       PDB             console
ELF         7f86ebf7f000-    7f86ebfa2000       Deferred        libgpg-error.so.0
ELF         7f86ebfa2000-    7f86ebfbe000       Deferred        libresolv.so.2
ELF         7f86ebfbe000-    7f86ec069000       Deferred        libvorbisenc.so.2
ELF         7f86ec069000-    7f86ec097000       Deferred        libvorbis.so.0
ELF         7f86ec097000-    7f86ec0a4000       Deferred        libogg.so.0
ELF         7f86ec0a4000-    7f86ec0e2000       Deferred        libflac.so.8
ELF         7f86ec0e2000-    7f86ec0ff000       Deferred        libnsl.so.1
ELF         7f86ec0ff000-    7f86ec21d000       Deferred        libgcrypt.so.20
ELF         7f86ec21d000-    7f86ec23e000       Deferred        liblz4.so.1
ELF         7f86ec23e000-    7f86ec253000       Deferred        libapparmor.so.1
ELF         7f86ec253000-    7f86ec459000       Deferred        libasyncns.so.0
ELF         7f86ec459000-    7f86ec4d6000       Deferred        libsndfile.so.1
ELF         7f86ec4d6000-    7f86ec585000       Deferred        libsystemd.so.0
ELF         7f86ec585000-    7f86ec5d6000       Deferred        libdbus-1.so.3
ELF         7f86ec5d6000-    7f86ec658000       Deferred        libpulsecommon-13.99.so
ELF         7f86ec658000-    7f86ec6ad000       Deferred        libpulse.so.0
ELF         7f86ec6cb000-    7f86ec702000       Deferred        winepulse<elf>
  \-PE      7f86ec6d0000-    7f86ec702000       \               winepulse
ELF         7f86ec702000-    7f86ec85c000       Deferred        oleaut32<elf>
  \-PE      7f86ec730000-    7f86ec85c000       \               oleaut32
ELF         7f86ec85c000-    7f86ec884000       Deferred        mmdevapi<elf>
  \-PE      7f86ec860000-    7f86ec884000       \               mmdevapi
ELF         7f86ec8ca000-    7f86ec8d2000       Deferred        libxfixes.so.3
ELF         7f86ec8d2000-    7f86ec8df000       Deferred        libxcursor.so.1
ELF         7f86ec8df000-    7f86ec8f1000       Deferred        libxi.so.6
ELF         7f86ec8f1000-    7f86ec8f6000       Deferred        libxcomposite.so.1
ELF         7f86ec8f6000-    7f86ec903000       Deferred        libxrandr.so.2
ELF         7f86ec903000-    7f86ecb0d000       Deferred        libxrender.so.1
ELF         7f86ecb0d000-    7f86ecb14000       Deferred        libxxf86vm.so.1
ELF         7f86ecb14000-    7f86ecb19000       Deferred        libxinerama.so.1
ELF         7f86ecb19000-    7f86ecba4000       Deferred        setupapi<elf>
  \-PE      7f86ecb30000-    7f86ecba4000       \               setupapi
ELF         7f86ecba4000-    7f86ecbbe000       Deferred        libbsd.so.0
ELF         7f86ecbbe000-    7f86ecbc6000       Deferred        libxdmcp.so.6
ELF         7f86ecbc6000-    7f86ecbcc000       Deferred        libxau.so.6
ELF         7f86ecbcc000-    7f86ecbf6000       Deferred        libxcb.so.1
ELF         7f86ecbf6000-    7f86ecd33000       Deferred        libx11.so.6
ELF         7f86ecd33000-    7f86ecd48000       Deferred        libxext.so.6
ELF         7f86ecd4d000-    7f86ecd58000       Deferred        librt.so.1
ELF         7f86ecd58000-    7f86ecd64000       Deferred        libwrap.so.0
ELF         7f86ecd66000-    7f86ece2f000       Deferred        winex11<elf>
  \-PE      7f86ecd80000-    7f86ece2f000       \               winex11
ELF         7f86ece2f000-    7f86ece55000       Deferred        imm32<elf>
  \-PE      7f86ece40000-    7f86ece55000       \               imm32
ELF         7f86ecee4000-    7f86eceed000       Deferred        libuuid.so.1
ELF         7f86eceed000-    7f86ecf1b000       Deferred        libexpat.so.1
ELF         7f86ecf1b000-    7f86ecf62000       Deferred        libfontconfig.so.1
ELF         7f86ecf62000-    7f86ecf7e000       Deferred        libz.so.1
ELF         7f86ecf7e000-    7f86ecfb6000       Deferred        libpng16.so.16
ELF         7f86ecfb6000-    7f86ed075000       Deferred        libfreetype.so.6
ELF         7f86ed075000-    7f86ed0a5000       Deferred        libtinfo.so.6
ELF         7f86ed0a5000-    7f86ed0ce000       Deferred        libncurses.so.6
ELF         7f86ed0ec000-    7f86ed183000       Deferred        rpcrt4<elf>
  \-PE      7f86ed100000-    7f86ed183000       \               rpcrt4
ELF         7f86ed183000-    7f86ed27a000       Deferred        msvcrt<elf>
  \-PE      7f86ed1a0000-    7f86ed27a000       \               msvcrt
ELF         7f86ed27a000-    7f86ed432000       Deferred        gdi32<elf>
  \-PE      7f86ed290000-    7f86ed432000       \               gdi32
ELF         7f86ed432000-    7f86ed6cd000       Deferred        user32<elf>
  \-PE      7f86ed450000-    7f86ed6cd000       \               user32
ELF         7f86ed6cd000-    7f86ed76a000       Deferred        advapi32<elf>
  \-PE      7f86ed6e0000-    7f86ed76a000       \               advapi32
ELF         7f86ed86a000-    7f86ed9de000       Deferred        ole32<elf>
  \-PE      7f86ed890000-    7f86ed9de000       \               ole32
ELF         7f86ee8bc000-    7f86ee8d0000       Deferred        libnss_files.so.2
ELF         7f86eead0000-    7f86eeaf9000       Deferred        liblzma.so.5
ELF         7f86eeaf9000-    7f86eeb14000       Deferred        libgcc_s.so.1
ELF         7f86eeb14000-    7f86eec63000       Deferred        libm.so.6
ELF         7f86eec63000-    7f86eec80000       Deferred        libunwind.so.8
ELF         7f86eec82000-    7f86eec88000       Deferred        libdl.so.2
ELF         7f86eec88000-    7f86eee7a000       Deferred        libc.so.6
ELF         7f86eee7a000-    7f86eee9d000       Deferred        libpthread.so.0
ELF         7f86eeea3000-    7f86eeebb000       Deferred        version<elf>
  \-PE      7f86eeeb0000-    7f86eeebb000       \               version
ELF         7f86eeebb000-    7f86ef05e000       Dwarf           libwine.so.1
ELF         7f86ef060000-    7f86ef090000       Deferred        ld-linux-x86-64.so.2
Threads:
process  tid      prio (all id:s are in hex)
00000008 (D) Z:\home\lukebayes\Projects\eightamps\maple-sdk\zig\dist\console.exe
        0000002d    0
        0000002a    0
        00000009    0 <==
0000000e services.exe
        00000023    0
        0000001a    0
        00000015    0
        00000014    0
        00000013    0
        00000010    0
        0000000f    0
00000011 plugplay.exe
        00000017    0
        00000016    0
        00000012    0
00000018 winedevice.exe
        00000020    0
        0000001d    0
        0000001c    0
        0000001b    0
        00000019    0
0000001e explorer.exe
        00000029    0
        00000028    0
        00000027    0
        0000001f    0
00000021 winedevice.exe
        00000026    0
        00000025    0
        00000024    0
        00000022    0
System information:
    Wine build: wine-5.0 (Ubuntu 5.0-3ubuntu1)
    Platform: x86_64
    Version: Windows 7
    Host system: Linux
    Host version: 5.8.0-53-generic

I did notice this in structured_storage.zig:

pub const PROPVARIANT = extern struct {
    Anonymous: _Anonymous_e__Union,
    const _Anonymous_e__Union = u32; // TODO: generate this nested type!
};

Any help is appreciated, and nice work on this library!

marler8997 commented 3 years ago

I took your code and with some tweeks compiled it and ran it on windows and got the output below. Not sure what that exception is. It's possible this is a problem with Wine. Also I have not implemented nested types like you saw, that could also be the cause. If you want to provide me with a project or just code to reproduce your issue exactly, I could help more.

Loaded
pre enumerator: IMMDeviceEnumerator{ .vtable = VTable{ .base = VTable{ .QueryInterface = fn(*const .win32.win32.system.com.IUnknown, 
*const .win32.win32.zig.Guid, **c_void) callconv(.C) i32@7ffb14448470, .AddRef = fn(*const .win32.win32.system.com.IUnknown) callconv(.C) u32@7ffb144481f0, .Release = fn(*const .win32.win32.system.com.IUnknown) callconv(.C) u32@7ffb14432510 }, .EnumAudioEndpoints = 
fn(*const .win32.win32.media.audio.core_audio.IMMDeviceEnumerator, .win32.win32.media.audio.core_audio.EDataFlow, u32, **.win32.win32.media.audio.core_audio.IMMDeviceCollection) callconv(.C) i32@7ffb1443d0a0, .GetDefaultAudioEndpoint = fn(*const .win32.win32.media.audio.core_audio.IMMDeviceEnumerator, .win32.win32.media.audio.core_audio.EDataFlow, .win32.win32.media.audio.core_audio.ERole, **.win32.win32.media.audio.core_audio.IMMDevice) callconv(.C) i32@7ffb14449430, .GetDevice = fn(*const .win32.win32.media.audio.core_audio.IMMDeviceEnumerator, [*:0]const u16, **.win32.win32.media.audio.core_audio.IMMDevice) callconv(.C) i32@7ffb1443b780, .RegisterEndpointNotificationCallback = fn(*const .win32.win32.media.audio.core_audio.IMMDeviceEnumerator, *.win32.win32.media.audio.core_audio.IMMNotificationClient) callconv(.C) i32@7ffb14436510, .UnregisterEndpointNotificationCallback = fn(*const .win32.win32.media.audio.core_audio.IMMDeviceEnumerator, *.win32.win32.media.audio.core_audio.IMMNotificationClient) callconv(.C) i32@7ffb144327f0 } }
index: 0
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 15 }
index: 1
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 37 }
index: 2
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 2 }
index: 3
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 6 }
index: 4
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 2 }
index: 5
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 3 }
index: 6
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 100 }
index: 7
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 2 }
index: 8
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 1 }
index: 9
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 24 }
index: 10
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 0 }
index: 11
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 8 }
index: 12
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 12 }
index: 13
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 0 }
index: 14
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 24 }
index: 15
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 27 }
index: 16
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 1 }
index: 17
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 1 }
index: 18
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 2 }
index: 19
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 2 }
index: 20
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 0 }
index: 21
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 2 }
index: 22
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 3 }
index: 23
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 4 }
index: 24
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 5 }
index: 25
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 6 }
index: 26
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 7 }
index: 27
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 8 }
index: 28
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 1 }
index: 29
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 0 }
index: 30
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 0 }
index: 31
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 1 }
index: 32
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 0 }
index: 33
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 2 }
index: 34
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 2 }
index: 35
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 3 }
index: 36
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 0 }
index: 37
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 3 }
index: 38
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 1 }
index: 39
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 2 }
index: 40
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 5 }
index: 41
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 5 }
index: 42
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 9 }
index: 43
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 9 }
index: 44
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 10 }
index: 45
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 10 }
index: 46
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 1 }
index: 47
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 14 }
index: 48
Looping propeties with: PROPERTYKEY{ .fmtid = Guid@d9ecbff430, .pid = 2 }
marler8997 commented 3 years ago

P.S. if you're code is using a type that requires a nested type, I might take it and include it in the project for a regression test and then I can implemented nested types with that test.

marler8997 commented 3 years ago

Ok I got this to compile and reproduced the error with Wine. You have indeed ran into an unimplemented feature. I'll see if I can get this implemented.

marler8997 commented 3 years ago

Ok I've implemented nested types. You can see the diff here: https://github.com/marlersoft/zigwin32/commit/8d98f745a274ddeb49f0baac13966fe402a21b3d

I've also added an example based on your code here: https://github.com/marlersoft/zigwin32gen/blob/main/examples/wasapi.zig

Update your zigwin32 repo and let me know if it's working now.

lukebayes commented 3 years ago

I just verified the fix, and it's working great!

Awesome work!

FWIW, I just gave you a shout out on the twitterererers...

https://twitter.com/lukebayes/status/1397190953836982272

:-)