From the under the sub lootin, return the allocation value is a right way.
You are much better if you use a convert from the file written in C language.
Microsoft WindowsAPI must be return value error number as "int" in their specification.
Nnumber administration is well for the all like any support calling and telling someone.
1: https://waitrudweber.hatenablog.com/entry/2022/06/06/195303
*
- | - | - | - | - | - | - | - |
int | waveInOpen | LPHWAVEIN phwi | UINT uDeviceID | * | * | * | |
We can say they are kind for the people and we don't usually see the param names the above bolds.
2: http://2: https://docs.microsoft.com/en-us/windows/win32/api/mmeapi/nf-mmeapi-waveinopen