Hello! I'm writting a little utility which shows current main volume when it is changed with multimedia keyboard. Actually it opens mixer and listens for MM_MIXM_CONTROL_CHANGE event like sndvol32 do. The probmlem is that I need to read current volume by calling mixerGetControlDetails from winmm.dll and this call always gives me error with code 1 (MIXERR_INVALCONTROL). I've written same code in Delphi and it works. I compared memory for required MIXERCONTROLDETAILS structure in delphi and fasm binaries - they are the same (except for last member since it is a pointer to another int variable). I can not understand where is the problem. Maybe someone will help me a bit? Full source can be seen here - http://hexmode.org/zInfox32.Asm
Thanks in advance!