summaryrefslogtreecommitdiff
path: root/alf/alf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'alf/alf.cpp')
-rw-r--r--alf/alf.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/alf/alf.cpp b/alf/alf.cpp
index 917008a..25dcd21 100644
--- a/alf/alf.cpp
+++ b/alf/alf.cpp
@@ -124,6 +124,23 @@ ALF_BuildUniqueName(TCHAR *buf, const TCHAR *prefix, ULONG_PTR uniquifier)
}
void
+ALF_BuildUniqueNameW(WCHAR *buf, const WCHAR *prefix, ULONG_PTR uniquifier)
+{
+ int prefixlen = lstrlenW(prefix);
+ CopyMemory(buf, prefix, (SIZE_T)prefixlen * sizeof(*prefix));
+
+ int numlen = sizeof(LONG_PTR)*2;
+ int i = numlen - 1;
+ while (i >= 0) {
+ buf[prefixlen + i] = L"0123456789ABCDEF"[uniquifier & 0xf];
+ uniquifier >>= 4;
+ i--;
+ }
+
+ buf[prefixlen + numlen] = 0;
+}
+
+void
ALF_DestroyWindow(HWND win)
{
DestroyWindow(win);