API documentation says that RegEnumKeyEx, RegEnumValue and RegQueryInfoKey takes the size of the buffers as characters.