aboutsummaryrefslogtreecommitdiff
path: root/Src/Wasabi2/utilities.cpp
blob: c40662b9583237d0f339c1cb0645b820019e51ea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#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;
}