+ rc = RegOpenKeyExW(HKEY_LOCAL_MACHINE,
+ L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon",
+ 0,
+ KEY_QUERY_VALUE,
+ &hKey);
+ if (rc == ERROR_SUCCESS)
+ {
+ ReadRegSzValue(hKey,
+ L"LegalNoticeCaption",
+ &LegalNotice.pszCaption);
+
+ ReadRegSzValue(hKey,
+ L"LegalNoticeText",
+ &LegalNotice.pszText);
+
+ RegCloseKey(hKey);
+ }
+
+ if (LegalNotice.pszCaption != NULL && wcslen(LegalNotice.pszCaption) != 0 &&
+ LegalNotice.pszText != NULL && wcslen(LegalNotice.pszText) != 0)
+ {
+ pgContext->pWlxFuncs->WlxDialogBoxParam(pgContext->hWlx,
+ pgContext->hDllInstance,
+ MAKEINTRESOURCEW(IDD_LEGALNOTICE_DLG),
+ GetDesktopWindow(),
+ LegalNoticeDialogProc,
+ (LPARAM)&LegalNotice);
+ }
+
+ if (LegalNotice.pszCaption != NULL)
+ HeapFree(GetProcessHeap(), 0, LegalNotice.pszCaption);
+
+ if (LegalNotice.pszText != NULL)
+ HeapFree(GetProcessHeap(), 0, LegalNotice.pszText);
+