I used the following code to retrieve the LOCALE_FONTSIGNATURE value for Sinhala and print it to a text file (I used GetLocaleInfoA because MinGW was returning an error saying that GetLocaleInfoEx could not be found). I was able to retrieve the LOCALE_SSCRIPTS value on Windows using this method as well by replacing LOCALE_FONTSIGNATURE with LOCALE_SSCRIPTS in GetLocaleInfoA:

#include <windows.h>
#include <winnls.h>
#include <fstream>

using namespace std;

int main()
{
    ofstream ofs ("locale.txt", std::ofstream::out);
    char s[100];
    GetLocaleInfoA(MAKELCID(MAKELANGID(LANG_SINHALESE, SUBLANG_SINHALESE_SRI_LANKA), SORT_DEFAULT), LOCALE_FONTSIGNATURE, s, 100);
    ofs << s << endl;
    ofs.close();
}

I then used hexdump to get the following from the output file:

0000000 0a0d
0000002

How should this be converted to the format used in the NLS files?