v17 VirtualFileSystem support change for binary Addons!
#1
With the upgrade of the windows build environment from vs2013 to vs2015 arrised some issues regarding the filehandling using the crt and / or std libraries (search for UniversalCRT in your language on Microsoft site).

These issues are affecting currently all binary addons coming in form of a .dll file.
The reason is, that kodi overloads all file operations using a wrapper library to redirect calls like fopen / fwrite ... but also std::ofstream (wich are based on top of the low level api functions).

This emulation layer has one benefit: You can open for example Zip files with zip:// or access system foldes using symbolic names like special://.
But it has also one disadvantage: It is currently not working and does sometimes things you don't intended to do.

There is now a pull request waiting, wich will disable this emulation layer for all dlls except some special ones for which this emulation layer was mainly invented: playing DVD's.
DLL-Loader whitelist PR

The removal of this emulation layer from dlls doesn't mean in any way, that you're from that time unable to access the V(irtual)F(ile)S(ystem) of kodi anymore.
The kodi_addon library interface contains all necessary functions to access kodis VFS.

Please let us know, if you have concerns with this step. We'll give our best to support you porting from crt to addon interface.

Thanks!
Reply
#2
Could this emulation layer be extended to game add-ons? Many do not support loading from memory and must have a file path. Would this let them open VFS files?
Reply
#3
Could this be done using the xbmc interface?

Code:
#include "libXBMC_addon.h"

ADDON::CHelper_libXBMC_addon *xbmc = new ADDON::CHelper_libXBMC_addon;

file = xbmc->OpenFile(name, 0);

This example uses the kodi VFS.
I think its much more straightforward using the interface wich is thought for this....
Reply
#4
This emulation layer was only ever available on windows and xbox. On others oses a linker map is used.
Reply

Logout Mark Read Team Forum Stats Members Help
VirtualFileSystem support change for binary Addons!0