Archived
1
0
This repository has been archived on 2024-10-17. You can view files and clone it, but cannot push or open issues or pull requests.
winamp/Src/Wasabi2/utilities.cpp
2024-09-24 14:54:57 +02:00

19 lines
418 B
C++

#include "main.h"
int NXURICreateWithUTF16(nx_uri_t *out, const wchar_t *utf16)
{
nx_string_t nx_filename = 0;
nx_uri_t uri_filename = 0;
int ret = NXStringCreateWithUTF16(&nx_filename, utf16);
if (ret != NErr_Success)
return ret;
ret = NXURICreateWithNXString(&uri_filename, nx_filename);
NXStringRelease(nx_filename);
if (ret != NErr_Success)
return ret;
*out = uri_filename;
return NErr_Success;
}