Author Topic: HENCODE is a process handle, but its typedef is DWORD  (Read 149 times)

fmcoder

  • Posts: 486
Hello Ian,

The doc says:
Quote
When an encoder is used (not writing plain PCM), the returned handle is the encoder's process handle

But in header file the HENCODE type is defined like this
typedef DWORD HENCODE;      // encoder handle

I guess this could potentially cause problems on Win64 because process handle is of type HANDLE which is 64-bit unsigned int on Win64 platform.

Can you please check this?

saga

  • Posts: 2787
https://learn.microsoft.com/en-us/windows/win32/winauto/32-bit-and-64-bit-interoperability

Process handles and window handles are guaranteed / required to be interoperable between 32-bit and 64-bit processes, so their upper 32 bits are unused.