I think you just need to call the wide versions of the external functions