In your dialog replace
SendMessage hlb LB_ADDSTRING 0 d.FileName
with
SendMessageW hlb LB_ADDSTRING 0 @d.FileName
or
LB_Add hlb d.FileName
SendMessage hlb LB_ADDSTRING 0 d.FileName
with
SendMessageW hlb LB_ADDSTRING 0 @d.FileName
or
LB_Add hlb d.FileName