I trying to call a Win32Api dll function in Ruby:
LoadTexture = Win32API.new('System/SFML.dll', 'sfml_load_texture', 'p', 'p')
My code calling:
LoadTexture.call("folder/file.png")
My second try to convert data (just work with wchar_t)
buf = ''
for i in 0..filename.size - 1
buf += filename[i] + 0.chr
end
buf += 0.chr * 260
LoadTexture.call(buf)
I get
Failed to load image "=»`¶È; ð¿w c H ". Reason: Unable to open
