mmdevapi: Correctly convert UINT32 to INT64

2012-01-30 Thread Joerg-Cyril . Hoehle
Andrew, thank you very much for finding a bug in my code. I'll have to meditate signed/unsigned conversions for the next months. Perhaps it's my lack of familiarity with the MS-Windows API that had me not find a signed equivalent of UINT32. Indeed there's none in windef.h. So I choose 'long'.

Re: mmdevapi: Correctly convert UINT32 to INT64

2012-01-30 Thread Michael Stefaniuc
Hello Joerg, On 01/30/2012 09:46 AM, joerg-cyril.hoe...@t-systems.com wrote: thank you very much for finding a bug in my code. I'll have to meditate signed/unsigned conversions for the next months. Perhaps it's my lack of familiarity with the MS-Windows API that had me not find a signed

mmdevapi: Correctly convert UINT32 to INT64

2012-01-30 Thread Joerg-Cyril . Hoehle
Michael Stefaniuc wrote: But now I see basestd.h defines LONG32. LONG32 is kinda redundant. LONG is 32bit on all Windows versions on 16bit, 32bit and 64bit Windows. Ah, thank you. However in our particular case, the value that getbuf_last is derived from is UINT32, not UINT, so for symmetry, I

Re: mmdevapi: Correctly convert UINT32 to INT64

2012-01-30 Thread Vitaliy Margolen
On 01/30/2012 03:08 AM, joerg-cyril.hoe...@t-systems.com wrote: Michael Stefaniuc wrote: But now I see basestd.h defines LONG32. LONG32 is kinda redundant. LONG is 32bit on all Windows versions on 16bit, 32bit and 64bit Windows. Ah, thank you. However in our particular case, the value that