Zhiyi Zhang (@zhiyi) commented about dlls/kernel32/tests/file.c:
+}
+static BOOL is_app_enabled_long_path(void) +{
- static WCHAR buffer[10] = { 0 };
- static const WCHAR *trueW = L"true";
- static const WCHAR *longPathAwareW = L"longPathAware";
- static const WCHAR *namespace2016W = L"http://schemas.microsoft.com/SMI/2016/WindowsSettings";
- BOOL ret;
- SIZE_T size;
- if (buffer[0] == 0)
- {
memset( buffer, 0xcc, sizeof(buffer) );
ret = QueryActCtxSettingsW( 0, NULL, namespace2016W, longPathAwareW, buffer, lstrlenW(trueW) + 1, &size );
You can use literal Unicode strings. For example, QueryActCtxSettingsW( 0, NULL, L"http://schemas.microsoft.com/SMI/2016/WindowsSettings", ...)