winprefs v0.3.2
A registry exporter for programmers.
Loading...
Searching...
No Matches
constants.c
1const size_t CMD_MAX_COMMAND_LENGTH = 8191;
2const size_t POWERSHELL_MAX_COMMAND_LENGTH = 32764;
3const size_t MAX_KEY_LENGTH = 255;
4const size_t MAX_VALUE_NAME = 16383;
5const size_t WL = sizeof(wchar_t);
6const wchar_t *AUTOMATIC_COMMIT_MESSAGE_PREFIX = L"Automatic commit @ ";
7
8const wchar_t *POWERSHELL_CODE_TEMPLATE =
9 L"if (!(Test-Path '%ls')) { New-Item -Path '%ls' -Force | Out-Null } New-ItemProperty "
10 L"-LiteralPath '%ls' -Name '%ls' -PropertyType %ls -Force -Value %ls";
11
12const wchar_t *C_SHARP_REGISTRY_SET_VALUE_TEMPLATE =
13 L"Registry.SetValue(\"%ls\\\\%ls\", \"%ls\", %ls%ls);";
14
15const size_t SIZEOF_C_PREAMBLE = 44;
16const char *C_PREAMBLE = "DWORD dnum;\nQWORD qnum;\nunsigned char data;\n";
17const wchar_t *C_REGSETKEYVALUEW_TEMPLATE_SZ =
18 L"RegSetKeyValue(%ls, TEXT(\"%ls\"), TEXT(\"%ls\"), %ls, TEXT(\"%ls\"), %ld);";
19const wchar_t *C_REGSETKEYVALUEW_TEMPLATE_BINARY =
20 L"data = %ls; RegSetKeyValue(%ls, TEXT(\"%ls\"), TEXT(\"%ls\"), REG_BINARY, (LPCVOID)&data, "
21 L"%ld);";
22const wchar_t *KEYWORD_DWORD = L"DWORD";
23const wchar_t *KEYWORD_QWORD = L"QWORD";
24const wchar_t *C_REGSETKEYVALUEW_TEMPLATE_NUMERIC =
25 L"%lsnum = %ls; RegSetKeyValue(%ls, TEXT(\"%ls\"), TEXT(\"%ls\"), %ls, (LPCVOID)&%lsnum, "
26 L"sizeof(%ls));";
27const wchar_t *C_REGSETKEYVALUEW_TEMPLATE_NONE =
28 L"RegSetKeyValue(%ls, TEXT(\"%ls\"), TEXT(\"%ls\"), REG_NONE, NULL, 0);";