mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
Sync with trunk head (r49139)
svn path=/branches/reactos-yarotows/; revision=49142
This commit is contained in:
@@ -1,11 +1,23 @@
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include <tchar.h>
|
||||
#include <wchar.h>
|
||||
#include <assert.h>
|
||||
#include "doskey.h"
|
||||
|
||||
#define MAX_STRING 2000
|
||||
TCHAR szStringBuf[MAX_STRING];
|
||||
LPTSTR pszExeName = _T("cmd.exe");
|
||||
WCHAR szStringBuf[MAX_STRING];
|
||||
LPWSTR pszExeName = L"cmd.exe";
|
||||
|
||||
/* Function pointers */
|
||||
typedef DWORD (WINAPI *GetConsoleCommandHistoryW_t) (LPWSTR sCommands, DWORD nBufferLength, LPWSTR sExeName);
|
||||
typedef DWORD (WINAPI *GetConsoleCommandHistoryLengthW_t) (LPWSTR sExeName);
|
||||
typedef BOOL (WINAPI *SetConsoleNumberOfCommandsW_t)(DWORD nNumber, LPWSTR sExeName);
|
||||
typedef VOID (WINAPI *ExpungeConsoleCommandHistoryW_t)(LPWSTR sExeName);
|
||||
|
||||
GetConsoleCommandHistoryW_t pGetConsoleCommandHistoryW;
|
||||
GetConsoleCommandHistoryLengthW_t pGetConsoleCommandHistoryLengthW;
|
||||
SetConsoleNumberOfCommandsW_t pSetConsoleNumberOfCommandsW;
|
||||
ExpungeConsoleCommandHistoryW_t pExpungeConsoleCommandHistoryW;
|
||||
|
||||
static VOID SetInsert(DWORD dwFlag)
|
||||
{
|
||||
@@ -18,79 +30,74 @@ static VOID SetInsert(DWORD dwFlag)
|
||||
|
||||
static VOID PrintHistory(VOID)
|
||||
{
|
||||
DWORD Length = GetConsoleCommandHistoryLength(pszExeName);
|
||||
DWORD BufferLength;
|
||||
DWORD Length = pGetConsoleCommandHistoryLengthW(pszExeName);
|
||||
PBYTE HistBuf;
|
||||
TCHAR *Hist;
|
||||
TCHAR *HistEnd;
|
||||
|
||||
/* On Windows, the ANSI version of GetConsoleCommandHistory requires
|
||||
* a buffer twice as large as the actual history length. */
|
||||
BufferLength = Length * (sizeof(WCHAR) / sizeof(TCHAR)) * sizeof(BYTE);
|
||||
WCHAR *Hist;
|
||||
WCHAR *HistEnd;
|
||||
|
||||
HistBuf = HeapAlloc(GetProcessHeap(),
|
||||
HEAP_ZERO_MEMORY,
|
||||
BufferLength);
|
||||
Length);
|
||||
if (!HistBuf) return;
|
||||
Hist = (TCHAR *)HistBuf;
|
||||
HistEnd = (TCHAR *)&HistBuf[Length];
|
||||
Hist = (WCHAR *)HistBuf;
|
||||
HistEnd = (WCHAR *)&HistBuf[Length];
|
||||
|
||||
if (GetConsoleCommandHistory(Hist, BufferLength, pszExeName))
|
||||
for (; Hist < HistEnd; Hist += _tcslen(Hist) + 1)
|
||||
_tprintf(_T("%s\n"), Hist);
|
||||
if (pGetConsoleCommandHistoryW(Hist, Length, pszExeName))
|
||||
for (; Hist < HistEnd; Hist += wcslen(Hist) + 1)
|
||||
wprintf(L"%s\n", Hist);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, HistBuf);
|
||||
}
|
||||
|
||||
static INT SetMacro(LPTSTR definition)
|
||||
static INT SetMacro(LPWSTR definition)
|
||||
{
|
||||
TCHAR *name, *nameend, *text, temp;
|
||||
WCHAR *name, *nameend, *text, temp;
|
||||
|
||||
name = definition;
|
||||
while (*name == _T(' '))
|
||||
while (*name == L' ')
|
||||
name++;
|
||||
|
||||
/* error if no '=' found */
|
||||
if ((nameend = _tcschr(name, _T('='))) != NULL)
|
||||
if ((nameend = wcschr(name, L'=')) != NULL)
|
||||
{
|
||||
text = nameend + 1;
|
||||
while (*text == _T(' '))
|
||||
while (*text == L' ')
|
||||
text++;
|
||||
|
||||
while (nameend > name && nameend[-1] == _T(' '))
|
||||
while (nameend > name && nameend[-1] == L' ')
|
||||
nameend--;
|
||||
|
||||
/* Split rest into name and substitute */
|
||||
temp = *nameend;
|
||||
*nameend = _T('\0');
|
||||
*nameend = L'\0';
|
||||
/* Don't allow spaces in the name, since such a macro would be unusable */
|
||||
if (!_tcschr(name, _T(' ')) && AddConsoleAlias(name, text, pszExeName))
|
||||
if (!wcschr(name, L' ') && AddConsoleAlias(name, text, pszExeName))
|
||||
return 0;
|
||||
*nameend = temp;
|
||||
}
|
||||
|
||||
LoadString(GetModuleHandle(NULL), IDS_INVALID_MACRO_DEF, szStringBuf, MAX_STRING);
|
||||
_tprintf(szStringBuf, definition);
|
||||
wprintf(szStringBuf, definition);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static VOID PrintMacros(LPTSTR pszExeName, LPTSTR Indent)
|
||||
static VOID PrintMacros(LPWSTR pszExeName, LPWSTR Indent)
|
||||
{
|
||||
DWORD Length = GetConsoleAliasesLength(pszExeName);
|
||||
PBYTE AliasBuf;
|
||||
TCHAR *Alias;
|
||||
TCHAR *AliasEnd;
|
||||
WCHAR *Alias;
|
||||
WCHAR *AliasEnd;
|
||||
|
||||
AliasBuf = HeapAlloc(GetProcessHeap(),
|
||||
HEAP_ZERO_MEMORY,
|
||||
Length * sizeof(BYTE));
|
||||
if (!AliasBuf) return;
|
||||
Alias = (TCHAR *)AliasBuf;
|
||||
AliasEnd = (TCHAR *)&AliasBuf[Length];
|
||||
Alias = (WCHAR *)AliasBuf;
|
||||
AliasEnd = (WCHAR *)&AliasBuf[Length];
|
||||
|
||||
if (GetConsoleAliases(Alias, Length * sizeof(BYTE), pszExeName))
|
||||
for (; Alias < AliasEnd; Alias += _tcslen(Alias) + 1)
|
||||
_tprintf(_T("%s%s\n"), Indent, Alias);
|
||||
for (; Alias < AliasEnd; Alias += wcslen(Alias) + 1)
|
||||
wprintf(L"%s%s\n", Indent, Alias);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, AliasBuf);
|
||||
}
|
||||
@@ -99,51 +106,47 @@ static VOID PrintAllMacros(VOID)
|
||||
{
|
||||
DWORD Length = GetConsoleAliasExesLength();
|
||||
PBYTE ExeNameBuf;
|
||||
TCHAR *ExeName;
|
||||
TCHAR *ExeNameEnd;
|
||||
WCHAR *ExeName;
|
||||
WCHAR *ExeNameEnd;
|
||||
|
||||
ExeNameBuf = HeapAlloc(GetProcessHeap(),
|
||||
HEAP_ZERO_MEMORY,
|
||||
Length * sizeof(BYTE));
|
||||
if (!ExeNameBuf) return;
|
||||
ExeName = (TCHAR *)ExeNameBuf;
|
||||
ExeNameEnd = (TCHAR *)&ExeNameBuf[Length];
|
||||
ExeName = (WCHAR *)ExeNameBuf;
|
||||
ExeNameEnd = (WCHAR *)&ExeNameBuf[Length];
|
||||
|
||||
if (GetConsoleAliasExes(ExeName, Length * sizeof(BYTE)))
|
||||
{
|
||||
for (; ExeName < ExeNameEnd; ExeName += _tcslen(ExeName) + 1)
|
||||
for (; ExeName < ExeNameEnd; ExeName += wcslen(ExeName) + 1)
|
||||
{
|
||||
_tprintf(_T("[%s]\n"), ExeName);
|
||||
PrintMacros(ExeName, _T(" "));
|
||||
_tprintf(_T("\n"));
|
||||
wprintf(L"[%s]\n", ExeName);
|
||||
PrintMacros(ExeName, L" ");
|
||||
wprintf(L"\n");
|
||||
}
|
||||
}
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, ExeNameBuf);
|
||||
}
|
||||
|
||||
static VOID ReadFromFile(LPTSTR param)
|
||||
static VOID ReadFromFile(LPWSTR param)
|
||||
{
|
||||
FILE* fp;
|
||||
TCHAR line[MAX_PATH];
|
||||
WCHAR line[MAX_PATH];
|
||||
|
||||
fp = _tfopen(param, _T("r"));
|
||||
fp = _wfopen(param, L"r");
|
||||
if (!fp)
|
||||
{
|
||||
#ifdef UNICODE
|
||||
_wperror(param);
|
||||
#else
|
||||
perror(param);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
while ( _fgetts(line, MAX_PATH, fp) != NULL)
|
||||
while ( fgetws(line, MAX_PATH, fp) != NULL)
|
||||
{
|
||||
/* Remove newline character */
|
||||
TCHAR *end = &line[_tcslen(line) - 1];
|
||||
if (*end == _T('\n'))
|
||||
*end = _T('\0');
|
||||
WCHAR *end = &line[wcslen(line) - 1];
|
||||
if (*end == L'\n')
|
||||
*end = L'\0';
|
||||
|
||||
if (*line)
|
||||
SetMacro(line);
|
||||
@@ -154,43 +157,53 @@ static VOID ReadFromFile(LPTSTR param)
|
||||
}
|
||||
|
||||
/* Get the start and end of the next command-line argument. */
|
||||
static BOOL GetArg(TCHAR **pStart, TCHAR **pEnd)
|
||||
static BOOL GetArg(WCHAR **pStart, WCHAR **pEnd)
|
||||
{
|
||||
BOOL bInQuotes = FALSE;
|
||||
TCHAR *p = *pEnd;
|
||||
p += _tcsspn(p, _T(" \t"));
|
||||
WCHAR *p = *pEnd;
|
||||
p += wcsspn(p, L" \t");
|
||||
if (!*p)
|
||||
return FALSE;
|
||||
*pStart = p;
|
||||
do
|
||||
{
|
||||
if (!bInQuotes && (*p == _T(' ') || *p == _T('\t')))
|
||||
if (!bInQuotes && (*p == L' ' || *p == L'\t'))
|
||||
break;
|
||||
bInQuotes ^= (*p++ == _T('"'));
|
||||
bInQuotes ^= (*p++ == L'"');
|
||||
} while (*p);
|
||||
*pEnd = p;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Remove starting and ending quotes from a string, if present */
|
||||
static LPTSTR RemoveQuotes(LPTSTR str)
|
||||
static LPWSTR RemoveQuotes(LPWSTR str)
|
||||
{
|
||||
TCHAR *end;
|
||||
if (*str == _T('"') && *(end = str + _tcslen(str) - 1) == _T('"'))
|
||||
WCHAR *end;
|
||||
if (*str == L'"' && *(end = str + wcslen(str) - 1) == L'"')
|
||||
{
|
||||
str++;
|
||||
*end = _T('\0');
|
||||
*end = L'\0';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
int
|
||||
_tmain(VOID)
|
||||
wmain(VOID)
|
||||
{
|
||||
/* Get the full command line using GetCommandLine(). We can't just use argv,
|
||||
* because then a parameter like "gotoroot=cd \" wouldn't be passed completely. */
|
||||
TCHAR *pArgStart;
|
||||
TCHAR *pArgEnd = GetCommandLine();
|
||||
WCHAR *pArgStart;
|
||||
WCHAR *pArgEnd = GetCommandLine();
|
||||
HMODULE hKernel32 = LoadLibraryW(L"kernel32.dll");
|
||||
|
||||
/* Get function pointers */
|
||||
pGetConsoleCommandHistoryW = (GetConsoleCommandHistoryW_t)GetProcAddress( hKernel32, "GetConsoleCommandHistoryW");
|
||||
pGetConsoleCommandHistoryLengthW = (GetConsoleCommandHistoryLengthW_t)GetProcAddress( hKernel32, "GetConsoleCommandHistoryLengthW");
|
||||
pSetConsoleNumberOfCommandsW = (SetConsoleNumberOfCommandsW_t)GetProcAddress( hKernel32, "SetConsoleNumberOfCommandsW");
|
||||
pExpungeConsoleCommandHistoryW = (ExpungeConsoleCommandHistoryW_t)GetProcAddress( hKernel32, "ExpungeConsoleCommandHistoryW");
|
||||
|
||||
assert(pGetConsoleCommandHistoryW && pGetConsoleCommandHistoryLengthW &&
|
||||
pSetConsoleNumberOfCommandsW && pSetConsoleNumberOfCommandsW);
|
||||
|
||||
/* Skip the application name */
|
||||
GetArg(&pArgStart, &pArgEnd);
|
||||
@@ -198,55 +211,55 @@ _tmain(VOID)
|
||||
while (GetArg(&pArgStart, &pArgEnd))
|
||||
{
|
||||
/* NUL-terminate this argument to make processing easier */
|
||||
TCHAR tmp = *pArgEnd;
|
||||
*pArgEnd = _T('\0');
|
||||
WCHAR tmp = *pArgEnd;
|
||||
*pArgEnd = L'\0';
|
||||
|
||||
if (!_tcscmp(pArgStart, _T("/?")))
|
||||
if (!wcscmp(pArgStart, L"/?"))
|
||||
{
|
||||
LoadString(GetModuleHandle(NULL), IDS_HELP, szStringBuf, MAX_STRING);
|
||||
_tprintf(szStringBuf);
|
||||
wprintf(szStringBuf);
|
||||
break;
|
||||
}
|
||||
else if (!_tcsnicmp(pArgStart, _T("/EXENAME="), 9))
|
||||
else if (!_wcsnicmp(pArgStart, L"/EXENAME=", 9))
|
||||
{
|
||||
pszExeName = RemoveQuotes(pArgStart + 9);
|
||||
}
|
||||
else if (!_tcsicmp(pArgStart, _T("/H")) ||
|
||||
!_tcsicmp(pArgStart, _T("/HISTORY")))
|
||||
else if (!wcsicmp(pArgStart, L"/H") ||
|
||||
!wcsicmp(pArgStart, L"/HISTORY"))
|
||||
{
|
||||
PrintHistory();
|
||||
}
|
||||
else if (!_tcsnicmp(pArgStart, _T("/LISTSIZE="), 10))
|
||||
else if (!_wcsnicmp(pArgStart, L"/LISTSIZE=", 10))
|
||||
{
|
||||
SetConsoleNumberOfCommands(_ttoi(pArgStart + 10), pszExeName);
|
||||
pSetConsoleNumberOfCommandsW(_wtoi(pArgStart + 10), pszExeName);
|
||||
}
|
||||
else if (!_tcsicmp(pArgStart, _T("/REINSTALL")))
|
||||
else if (!wcsicmp(pArgStart, L"/REINSTALL"))
|
||||
{
|
||||
ExpungeConsoleCommandHistory(pszExeName);
|
||||
pExpungeConsoleCommandHistoryW(pszExeName);
|
||||
}
|
||||
else if (!_tcsicmp(pArgStart, _T("/INSERT")))
|
||||
else if (!wcsicmp(pArgStart, L"/INSERT"))
|
||||
{
|
||||
SetInsert(ENABLE_INSERT_MODE);
|
||||
}
|
||||
else if (!_tcsicmp(pArgStart, _T("/OVERSTRIKE")))
|
||||
else if (!wcsicmp(pArgStart, L"/OVERSTRIKE"))
|
||||
{
|
||||
SetInsert(0);
|
||||
}
|
||||
else if (!_tcsicmp(pArgStart, _T("/M")) ||
|
||||
!_tcsicmp(pArgStart, _T("/MACROS")))
|
||||
else if (!wcsicmp(pArgStart, L"/M") ||
|
||||
!wcsicmp(pArgStart, L"/MACROS"))
|
||||
{
|
||||
PrintMacros(pszExeName, _T(""));
|
||||
PrintMacros(pszExeName, L"");
|
||||
}
|
||||
else if (!_tcsnicmp(pArgStart, _T("/M:"), 3) ||
|
||||
!_tcsnicmp(pArgStart, _T("/MACROS:"), 8))
|
||||
else if (!_wcsnicmp(pArgStart, L"/M:", 3) ||
|
||||
!_wcsnicmp(pArgStart, L"/MACROS:", 8))
|
||||
{
|
||||
LPTSTR exe = RemoveQuotes(_tcschr(pArgStart, _T(':')) + 1);
|
||||
if (!_tcsicmp(exe, _T("ALL")))
|
||||
LPWSTR exe = RemoveQuotes(wcschr(pArgStart, L':') + 1);
|
||||
if (!wcsicmp(exe, L"ALL"))
|
||||
PrintAllMacros();
|
||||
else
|
||||
PrintMacros(exe, _T(""));
|
||||
PrintMacros(exe, L"");
|
||||
}
|
||||
else if (!_tcsnicmp(pArgStart, _T("/MACROFILE="), 11))
|
||||
else if (!_wcsnicmp(pArgStart, L"/MACROFILE=", 11))
|
||||
{
|
||||
ReadFromFile(RemoveQuotes(pArgStart + 11));
|
||||
}
|
||||
|
||||
@@ -23,11 +23,6 @@ BOOL WINAPI AddConsoleAliasA(LPSTR, LPSTR, LPSTR);
|
||||
BOOL WINAPI AddConsoleAliasW(LPWSTR, LPWSTR, LPWSTR);
|
||||
#define AddConsoleAlias TNAME(AddConsoleAlias)
|
||||
#endif
|
||||
#ifndef ExpungeConsoleCommandHistory
|
||||
BOOL WINAPI ExpungeConsoleCommandHistoryA(LPSTR);
|
||||
BOOL WINAPI ExpungeConsoleCommandHistoryW(LPWSTR);
|
||||
#define ExpungeConsoleCommandHistory TNAME(ExpungeConsoleCommandHistory)
|
||||
#endif
|
||||
#ifndef GetConsoleAliases
|
||||
DWORD WINAPI GetConsoleAliasesA(LPSTR, DWORD, LPSTR);
|
||||
DWORD WINAPI GetConsoleAliasesW(LPWSTR, DWORD, LPWSTR);
|
||||
@@ -48,20 +43,5 @@ DWORD WINAPI GetConsoleAliasExesLengthA(VOID);
|
||||
DWORD WINAPI GetConsoleAliasExesLengthW(VOID);
|
||||
#define GetConsoleAliasExesLength TNAME(GetConsoleAliasExesLength)
|
||||
#endif
|
||||
#ifndef GetConsoleCommandHistory
|
||||
DWORD WINAPI GetConsoleCommandHistoryA(LPSTR, DWORD, LPSTR);
|
||||
DWORD WINAPI GetConsoleCommandHistoryW(LPWSTR, DWORD, LPWSTR);
|
||||
#define GetConsoleCommandHistory TNAME(GetConsoleCommandHistory)
|
||||
#endif
|
||||
#ifndef GetConsoleCommandHistoryLength
|
||||
DWORD WINAPI GetConsoleCommandHistoryLengthA(LPSTR);
|
||||
DWORD WINAPI GetConsoleCommandHistoryLengthW(LPWSTR);
|
||||
#define GetConsoleCommandHistoryLength TNAME(GetConsoleCommandHistoryLength)
|
||||
#endif
|
||||
#ifndef SetConsoleNumberOfCommands
|
||||
BOOL WINAPI SetConsoleNumberOfCommandsA(DWORD, LPSTR);
|
||||
BOOL WINAPI SetConsoleNumberOfCommandsW(DWORD, LPWSTR);
|
||||
#define SetConsoleNumberOfCommands TNAME(SetConsoleNumberOfCommands)
|
||||
#endif
|
||||
|
||||
#endif /* RC_INVOKED */
|
||||
|
||||
@@ -30,9 +30,9 @@ STRINGTABLE
|
||||
STRING_PAUSE, "Tryk Enter for at begynde at kopiere\n"
|
||||
STRING_SIMCOPY, "%d fil(er) vil blive kopieret\n"
|
||||
STRING_COPY, "%d fil(er) kopieret\n"
|
||||
STRING_QISDIR, "Er «%s» et filnavn eller katalog\n" \
|
||||
"på destinationen?\n" \
|
||||
"(F - Fil, K - Katalog)\n"
|
||||
STRING_QISDIR, "Er «%s» et filnavn eller katalog\n \
|
||||
på destinationen?\n \
|
||||
(F - Fil, K - Katalog)\n"
|
||||
STRING_SRCPROMPT,"%s? (Ja|Nei)\n"
|
||||
STRING_OVERWRITE,"Overskrive «%s»? (Ja|Nei|Alle)\n"
|
||||
STRING_COPYFAIL, "Kunne ikke kopiere «%s» til «%s»; fejlet med r/c %d\n"
|
||||
|
||||
@@ -33,9 +33,9 @@ STRINGTABLE
|
||||
STRING_PAUSE, "Eingabetaste betätigen, um mit dem Kopieren zu beginnen\n"
|
||||
STRING_SIMCOPY, "%d Datei(en) würden kopiert\n"
|
||||
STRING_COPY, "%d Datei(en) kopiert\n"
|
||||
STRING_QISDIR, "Ist '%s' eine Datei oder ein Verzeichnis\n" \
|
||||
"am Zielsort?\n" \
|
||||
"(D - Datei, V - Verzeichnis)\n"
|
||||
STRING_QISDIR, "Ist '%s' eine Datei oder ein Verzeichnis\n \
|
||||
am Zielsort?\n \
|
||||
(D - Datei, V - Verzeichnis)\n"
|
||||
STRING_SRCPROMPT,"%s? (Ja|Nein)\n"
|
||||
STRING_OVERWRITE,"%s überschreiben? (Ja|Nein|Alle)\n"
|
||||
STRING_COPYFAIL, "Kopieren von '%s' nach '%s' fehlgeschlagen. Fehlernummer: %d\n"
|
||||
|
||||
@@ -30,9 +30,9 @@ STRINGTABLE
|
||||
STRING_PAUSE, "Press <enter> to begin copying\n"
|
||||
STRING_SIMCOPY, "%d file(s) would be copied\n"
|
||||
STRING_COPY, "%d file(s) copied\n"
|
||||
STRING_QISDIR, "Is '%s' a filename or directory\n" \
|
||||
"on the target?\n" \
|
||||
"(F - File, D - Directory)\n"
|
||||
STRING_QISDIR, "Is '%s' a filename or directory\n \
|
||||
on the target?\n \
|
||||
(F - File, D - Directory)\n"
|
||||
STRING_SRCPROMPT,"%s? (Yes|No)\n"
|
||||
STRING_OVERWRITE,"Overwrite %s? (Yes|No|All)\n"
|
||||
STRING_COPYFAIL, "Copying of '%s' to '%s' failed with r/c %d\n"
|
||||
@@ -54,7 +54,7 @@ XCOPY source [dest] [/I] [/S] [/Q] [/F] [/L] [/W] [/T] [/N] [/U]\n\
|
||||
Where:\n\
|
||||
\n\
|
||||
[/I] Assume directory if destination does not exist and copying two or\n\
|
||||
\ more files\n\
|
||||
\tmore files\n\
|
||||
[/S] Copy directories and subdirectories\n\
|
||||
[/E] Copy directories and subdirectories, including any empty ones\n\
|
||||
[/Q] Do not list names during copy, ie quiet.\n\
|
||||
@@ -72,7 +72,7 @@ Where:\n\
|
||||
[/C] Continue even if an error occurs during the copy\n\
|
||||
[/A] Only copy files with archive attribute set\n\
|
||||
[/M] Only copy files with archive attribute set, removes\n\
|
||||
\ archive attribute\n\
|
||||
\tarchive attribute\n\
|
||||
[/D | /D:m-d-y] Copy new files or those modified after the supplied date.\n\
|
||||
\t\tIf no date is supplied, only copy if destination is older\n\
|
||||
\t\tthan source\n\n"
|
||||
|
||||
@@ -33,9 +33,9 @@ STRINGTABLE
|
||||
STRING_PAUSE, "Appuyez sur ENTRÉE pour démarrer la copie\n"
|
||||
STRING_SIMCOPY, "%d fichier(s) seront copiés\n"
|
||||
STRING_COPY, "%d fichier(s) copiés\n"
|
||||
STRING_QISDIR, "« %s » est-il un fichier ou un répertoire\n" \
|
||||
"dans la destination ?\n" \
|
||||
"(F - Fichier, R - Répertoire)\n"
|
||||
STRING_QISDIR, "« %s » est-il un fichier ou un répertoire\n \
|
||||
dans la destination ?\n \
|
||||
(F - Fichier, R - Répertoire)\n"
|
||||
STRING_SRCPROMPT,"%s ? (Oui|Non)\n"
|
||||
STRING_OVERWRITE,"Écraser %s ? (Oui|Non|Tous)\n"
|
||||
STRING_COPYFAIL, "La copie de « %s » vers « %s » a échoué avec le code de retour %d\n"
|
||||
|
||||
@@ -33,9 +33,9 @@ STRINGTABLE
|
||||
STRING_PAUSE, "Premi Invio per iniziare a copiare\n"
|
||||
STRING_SIMCOPY, "%d file sarebbero copiati\n"
|
||||
STRING_COPY, "%d file copiato/i\n"
|
||||
STRING_QISDIR, "'%s' è il nome di un file o una cartella\n" \
|
||||
"nell'obiettivo?\n" \
|
||||
"(F - File, C - Cartella)\n"
|
||||
STRING_QISDIR, "'%s' è il nome di un file o una cartella\n \
|
||||
nell'obiettivo?\n \
|
||||
(F - File, C - Cartella)\n"
|
||||
STRING_SRCPROMPT,"%s? (Sì|No)\n"
|
||||
STRING_OVERWRITE,"Sovrascrivere %s? (Sì|No|Tutti)\n"
|
||||
STRING_COPYFAIL, "La copia di '%s' in '%s' è fallita con r/c %d\n"
|
||||
|
||||
@@ -33,9 +33,9 @@ STRINGTABLE
|
||||
STRING_PAUSE, "コピーを開始するには <enter> を押してください\n"
|
||||
STRING_SIMCOPY, "%d ファイルがコピーされる見込みです。\n"
|
||||
STRING_COPY, "%d ファイルをコピーしました\n"
|
||||
STRING_QISDIR, "送り先の '%s' はファイル名ですか、\n" \
|
||||
"ディレクトリですか?\n" \
|
||||
"(F - ファイル、D - ディレクトリ)\n"
|
||||
STRING_QISDIR, "送り先の '%s' はファイル名ですか、\n \
|
||||
ディレクトリですか?\n \
|
||||
(F - ファイル、D - ディレクトリ)\n"
|
||||
STRING_SRCPROMPT,"%s? (Yes|No)\n"
|
||||
STRING_OVERWRITE,"%s を上書きしますか? (Yes|No|All)\n"
|
||||
STRING_COPYFAIL, "'%s' から '%s' へのコピーは失敗しました。戻り値 %d\n"
|
||||
|
||||
@@ -31,9 +31,9 @@ STRINGTABLE
|
||||
STRING_PAUSE, "<enter> 를 누르면 복사가 시작될 것입니다\n"
|
||||
STRING_SIMCOPY, "%d 파일이 복사될 것입니다\n"
|
||||
STRING_COPY, "%d 파일이 복사되었습니다\n"
|
||||
STRING_QISDIR, "'%s'이 복사할 파일이나 디렉토리?\n" \
|
||||
"입니까?\n" \
|
||||
"(F - 파일, D - 디렉토리)\n"
|
||||
STRING_QISDIR, "'%s'이 복사할 파일이나 디렉토리?\n\
|
||||
입니까?\n\
|
||||
(F - 파일, D - 디렉토리)\n"
|
||||
STRING_SRCPROMPT,"%s? (예|아니오)\n"
|
||||
STRING_OVERWRITE,"%s를 덮어쓰겠습니까? (예|아니오|모두)\n"
|
||||
STRING_COPYFAIL, "Copying of '%s' to '%s' failed with r/c %d\n"
|
||||
@@ -55,7 +55,7 @@ XCOPY
|
||||
Where:\n\
|
||||
\n\
|
||||
[/I] 만약 대상이 존재하지 않는 경우 디렉토리로 가정하고 두개나 더 많은 파일을 \n\
|
||||
\ 복사\n\
|
||||
\t복사\n\
|
||||
[/S] 디렉토리하고 하위 디렉토리 복사\n\
|
||||
[/E] 빈 디렉토리를 포함해서 디렉토리와 하위 디렉토리 복사\n\
|
||||
[/Q] 조용하게 복사되는 파일이나 디렉토리를 표시하지 않고 복사.\n\
|
||||
@@ -73,7 +73,7 @@ Where:\n\
|
||||
[/C] 복사하는 동안에 에러가 발생해도 계속 진행\n\
|
||||
[/A] 오직 압축 속성이 설정되어있는 파일만 복사\n\
|
||||
[/M] 오직 압축 속성을 제거하면서 압축 속성이 설정되어있는\n\
|
||||
\ 파일만 복사\n\
|
||||
\t파일만 복사\n\
|
||||
[/D | /D:m-d-y] 지정된 날짜 후에 수정되거나 새로운 파일 복사.\n\
|
||||
\t\tI만약 어떠한 날짜도 지정되지 않으면,오직 원본보다\n\
|
||||
\t\t대상이 오래된 것만 복사\n\n"
|
||||
|
||||
@@ -33,9 +33,9 @@ STRINGTABLE
|
||||
STRING_PAUSE, "Spauskite <enter> kopijavimui pradėti\n"
|
||||
STRING_SIMCOPY, "bus nukopijuota failų: %d\n"
|
||||
STRING_COPY, "nukopijuota failų: %d\n"
|
||||
STRING_QISDIR, "Ar „%s“ yra failas, ar katalogas,\n" \
|
||||
"ar paskirtis?\n" \
|
||||
"(F - failas, K - katalogas)\n"
|
||||
STRING_QISDIR, "Ar „%s“ yra failas, ar katalogas,\n\
|
||||
ar paskirtis?\n\
|
||||
(F - failas, K - katalogas)\n"
|
||||
STRING_SRCPROMPT,"%s? (Taip|Ne)\n"
|
||||
STRING_OVERWRITE,"Perrašyti %s? (Taip|Ne|Visus)\n"
|
||||
STRING_COPYFAIL, "„%s“ kopijavimas į „%s“ nepavyko su r/c %d\n"
|
||||
|
||||
@@ -32,9 +32,9 @@ STRINGTABLE
|
||||
STRING_PAUSE, "Druk op <enter> om te beginnen met kopiëren\n"
|
||||
STRING_SIMCOPY, "%d bestand(en) zouden worden gekopieerd\n"
|
||||
STRING_COPY, "%d bestand(en) gekopieerd\n"
|
||||
STRING_QISDIR, "Is '%s' een bestand of een map\n" \
|
||||
"op de bestemming?\n" \
|
||||
"(B - Bestand, D - Directory)\n"
|
||||
STRING_QISDIR, "Is '%s' een bestand of een map\n\
|
||||
op de bestemming?\n\
|
||||
(B - Bestand, D - Directory)\n"
|
||||
STRING_SRCPROMPT,"%s? (Ja|Nee)\n"
|
||||
STRING_OVERWRITE,"Overschrijven %s? (Ja|Nee|Alles)\n"
|
||||
STRING_COPYFAIL, "Kopiëren van '%s' naar '%s' mislukt met r/c %d\n"
|
||||
|
||||
@@ -30,9 +30,9 @@ STRINGTABLE
|
||||
STRING_PAUSE, "Trykk Enter for å begynne å kopiere\n"
|
||||
STRING_SIMCOPY, "%d fil(er) ville blitt kopiert\n"
|
||||
STRING_COPY, "%d fil(er) kopiert\n"
|
||||
STRING_QISDIR, "Eer «%s» et filnevn eller katalog\n" \
|
||||
"i målet?\n" \
|
||||
"(F - Fil, K - Katalog)\n"
|
||||
STRING_QISDIR, "Eer «%s» et filnevn eller katalog\n\
|
||||
i målet?\n\
|
||||
(F - Fil, K - Katalog)\n"
|
||||
STRING_SRCPROMPT,"%s? (Ja|Nei)\n"
|
||||
STRING_OVERWRITE,"Skrive over «%s»? (Ja|Nei|Alle)\n"
|
||||
STRING_COPYFAIL, "Klarte ikke kopiere «%s» til «%s»; feilet med r/c %d\n"
|
||||
|
||||
@@ -31,9 +31,9 @@ STRINGTABLE
|
||||
STRING_PAUSE, "Naciśnij <enter> aby rozpocząć kopiowanie\n"
|
||||
STRING_SIMCOPY, "%d plik(ów) zostałoby skopiowanych\n"
|
||||
STRING_COPY, "%d plik(ów) skopiowanych\n"
|
||||
STRING_QISDIR, "Czy '%s' jest nazwą pliku czy katalogu\n" \
|
||||
"docelowego?\n" \
|
||||
"(P - plik, K - katalog)\n"
|
||||
STRING_QISDIR, "Czy '%s' jest nazwą pliku czy katalogu\n\
|
||||
docelowego?\n\
|
||||
(P - plik, K - katalog)\n"
|
||||
STRING_SRCPROMPT,"%s? (Tak|Nie)\n"
|
||||
STRING_OVERWRITE,"Zastąpić %s? (Tak|Nie|Wszystkie)\n"
|
||||
STRING_COPYFAIL, "Kopiowanie '%s' do '%s' nie powiodło się - kod błędu %d\n"
|
||||
@@ -54,8 +54,8 @@ XCOPY
|
||||
\n\
|
||||
Gdzie:\n\
|
||||
\n\
|
||||
[/I] Jeżeli \"cel\" nie istnieje i kopiowane są co najmniej dwa pliki,\n\
|
||||
\tzakłada, że \"cel\" powien być katalogiem\n\
|
||||
[/I] Jeżeli ""cel"" nie istnieje i kopiowane są co najmniej dwa pliki,\n\
|
||||
\tzakłada, że ""cel"" powien być katalogiem\n\
|
||||
[/S] Kopiuje katalogi i podkatalogi\n\
|
||||
[/E] Kopiuje katalogi i podkatalogi, łącznie z pustymi\n\
|
||||
[/Q] Nie wypisuje nazw plików podczas kopiowania (tryb cichy)\n\
|
||||
|
||||
@@ -33,9 +33,9 @@ STRINGTABLE
|
||||
STRING_PAUSE, "Pressione <Enter> para iniciar a cópia\n"
|
||||
STRING_SIMCOPY, "%d arquivo(s) seriam copiado(s)\n"
|
||||
STRING_COPY, "%d arquivo(s) copiado(s)\n"
|
||||
STRING_QISDIR, "'%s' é um arquivo ou diretório\n" \
|
||||
"no alvo?\n" \
|
||||
"(A - Arquivo, D - Directório)\n"
|
||||
STRING_QISDIR, "'%s' é um arquivo ou diretório\n\
|
||||
no alvo?\n\
|
||||
(A - Arquivo, D - Directório)\n"
|
||||
STRING_SRCPROMPT,"%s? (Sim|Não)\n"
|
||||
STRING_OVERWRITE,"Reescrever %s? (Sim|Não|Tudo)\n"
|
||||
STRING_COPYFAIL, "Falha ao copiar '%s' para '%s' com r/c %d\n"
|
||||
@@ -91,9 +91,9 @@ STRINGTABLE
|
||||
STRING_PAUSE, "Carregue <Enter> para iniciar cópia\n"
|
||||
STRING_SIMCOPY, "%d ficheiro(s) seriam copiado(s)\n"
|
||||
STRING_COPY, "%d ficheiro(s) copiado(s)\n"
|
||||
STRING_QISDIR, "'%s' é um ficheiro ou directório\n" \
|
||||
"no alvo?\n" \
|
||||
"(F - Ficheiro, D - Directório)\n"
|
||||
STRING_QISDIR, "'%s' é um ficheiro ou directório\n\
|
||||
no alvo?\n\
|
||||
(F - Ficheiro, D - Directório)\n"
|
||||
STRING_SRCPROMPT,"%s? (Yes|No)\n"
|
||||
STRING_OVERWRITE,"Reescrever %s? (Yes|No|All)\n"
|
||||
STRING_COPYFAIL, "Cópia de '%s' para '%s' falhou com r/c %d\n"
|
||||
|
||||
@@ -50,11 +50,11 @@ STRINGTABLE
|
||||
\n\
|
||||
Sintaxă:\n\
|
||||
XCOPY sursă [destinație] [/I] [/S] [/Q] [/F] [/L] [/W] [/T] [/N] [/U]\n\
|
||||
\ [/R] [/H] [/C] [/P] [/A] [/M] [/E] [/D] [/Y] [/-Y]\n\
|
||||
\t [/R] [/H] [/C] [/P] [/A] [/M] [/E] [/D] [/Y] [/-Y]\n\
|
||||
\nCu:\n\
|
||||
\n\
|
||||
[/I] Creează director dacă destinația nu există și se copiază două sau\n\
|
||||
\ mai multe fișiere\n\
|
||||
\tmai multe fișiere\n\
|
||||
[/S] Copiază directoarele și subdirectoarele\n\
|
||||
[/E] Copiază directoarele și subdirectoarele, inclusiv pe cele goale\n\
|
||||
[/Q] Nu afișa numele în timpul copierii.\n\
|
||||
@@ -72,7 +72,7 @@ XCOPY sursă [destinație] [/I] [/S] [/Q] [/F] [/L] [/W] [/T] [/N] [/U]\n\
|
||||
[/C] Continuă chiar dacă apare o eroare în timpul copierii\n\
|
||||
[/A] Copiază numai fișierele cu atributul de arhivă activat\n\
|
||||
[/M] Copiază numai fișierele cu atributul de arhivă activat, dezactivează\n\
|
||||
\ apoi atributul\n\
|
||||
\tapoi atributul\n\
|
||||
[/D | /D:m-d-y] Copiază fișierele noi sau pe cele modificate după data\n\
|
||||
\t\tspecificată. Dacă nu este specificată nici o dată, copiază\n\
|
||||
\t\tnumai dacă fișierul destinație este mai vechi decât fișierul\n\
|
||||
|
||||
@@ -38,8 +38,8 @@ STRINGTABLE
|
||||
STRING_PAUSE, "Нажмите клавишу <Enter>, чтобы начать копирование.\n"
|
||||
STRING_SIMCOPY, "%d файл(ов) было бы скопировано.\n"
|
||||
STRING_COPY, "%d файл(ов) скопировано.\n"
|
||||
STRING_QISDIR, "'%s' является файлом или папкой?\n" \
|
||||
"(F - Файл, D - Папка)\n"
|
||||
STRING_QISDIR, "'%s' является файлом или папкой?\n\
|
||||
(F - Файл, D - Папка)\n"
|
||||
STRING_SRCPROMPT,"%s? (Yes|No)\n"
|
||||
STRING_OVERWRITE,"Переписать %s? (Yes|No|All)\n"
|
||||
STRING_COPYFAIL, "При копировании '%s' в '%s' произошла ошибка: %d\n"
|
||||
@@ -77,8 +77,8 @@ XCOPY source [dest] [/I] [/S] [/Q] [/F] [/L] [/W] [/T] [/N] [/U]\n\
|
||||
[/R] Перезаписывает файлы, доступные только для чтения.\n\
|
||||
[/H] Копирует скрытые и системные файлы.\n\
|
||||
[/C] Продолжает работу, даже если произошла ошибка.\n\
|
||||
[/A] Копирует только те файлы, для которых установлен атрибут \"архивный\".\n\
|
||||
[/M] Копирует только те файлы, для которых установлен атрибут \"архивный\",\n\
|
||||
[/A] Копирует только те файлы, для которых установлен атрибут ""архивный"".\n\
|
||||
[/M] Копирует только те файлы, для которых установлен атрибут ""архивный"",\n\
|
||||
при этом атрибут удаляется.\n\
|
||||
[/D | /D:m-d-y] Копирует только новые файлы или те, которые были изменены\n\
|
||||
после указанной даты. Если дата не указана, копирует только\n\
|
||||
|
||||
@@ -32,9 +32,9 @@ STRINGTABLE
|
||||
STRING_PAUSE, "Za začetek kopiranja pritisnite <enter>\n"
|
||||
STRING_SIMCOPY, "Prekopiral bom %d datotek\n"
|
||||
STRING_COPY, "Prekopiral sem %d datotek\n"
|
||||
STRING_QISDIR, "Ali je '%s' ime ciljne datoteke\n" \
|
||||
"ali mape?\n" \
|
||||
"(D - Datoteka, M - Mapa)\n"
|
||||
STRING_QISDIR, "Ali je '%s' ime ciljne datoteke\n\
|
||||
ali mape?\n\
|
||||
(D - Datoteka, M - Mapa)\n"
|
||||
STRING_SRCPROMPT,"%s? (Da|Ne)\n"
|
||||
STRING_OVERWRITE,"Ali naj prepišem %s? (Da|Ne|Vse)\n"
|
||||
STRING_COPYFAIL, "Kopiranje '%s' v '%s' ni uspelo (koda napake: %d)\n"
|
||||
@@ -56,7 +56,7 @@ XCOPY izvor [cilj] [/I] [/S] [/Q] [/F] [/L] [/W] [/T] [/N] [/U]\n\
|
||||
Where:\n\
|
||||
\n\
|
||||
[/I] Če cilj ne obstaja in gre za kopiranje dveh ali več datotek, predpostavi,\n\
|
||||
\da je cilj mapa\n\
|
||||
\tda je cilj mapa\n\
|
||||
[/S] Kopiraj mape in podmape\n\
|
||||
[/E] Kopiraj mape in podmape, vključno s praznimi mapami\n\
|
||||
[/Q] Ne izpisuj imen med kopiranjem (tiho).\n\
|
||||
|
||||
@@ -34,8 +34,8 @@ STRINGTABLE
|
||||
STRING_PAUSE, "Натисніть <enter> щоб почати копіювання\n"
|
||||
STRING_SIMCOPY, "%d файл(ів) буде скопійовано\n"
|
||||
STRING_COPY, "%d файл(ів) скопійовано\n"
|
||||
STRING_QISDIR, "'%s' є файлом чи директорією?\n" \
|
||||
"(F - Файл, D - Директорія)\n"
|
||||
STRING_QISDIR, "'%s' є файлом чи директорією?\n\
|
||||
(F - Файл, D - Директорія)\n"
|
||||
STRING_SRCPROMPT,"%s? (Yes|No)\n"
|
||||
STRING_OVERWRITE,"Переписати %s? (Yes|No|All)\n"
|
||||
STRING_COPYFAIL, "Під час копіювання '%s' в '%s' сталась помилка r/c %d\n"
|
||||
@@ -75,7 +75,7 @@ XCOPY source [dest] [/I] [/S] [/Q] [/F] [/L] [/W] [/T] [/N] [/U]\n\
|
||||
[/C] Продовжує роботу, навіть якщо при копіюванні сталася помилка\n\
|
||||
[/A] Копіює лише файли з властивістю АРХІВНИЙ\n\
|
||||
[/M] Копіює лише файли з властивістю АРХІВНИЙ, видаляє\n\
|
||||
\властивість АРХІВНИЙ\n\
|
||||
\tвластивість АРХІВНИЙ\n\
|
||||
[/D | /D:m-d-y] Копіює лише нові файли або ті, які були змінені після вказаної\n\
|
||||
дати. Якщо дата не вказана, копіює лише ті файли, які новіші\n\
|
||||
в початковій папці\n\n"
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
* PURPOSE: Bulgarian Language File for Solitaire
|
||||
* PROGRAMMERS: Daniel "EmuandCo" Reimer ([email protected])
|
||||
*/
|
||||
#include "resource.h"
|
||||
|
||||
LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
* PURPOSE: Catalan Language File for Solitaire
|
||||
* PROGRAMMERS: Daniel "EmuandCo" Reimer ([email protected])
|
||||
*/
|
||||
#include "resource.h"
|
||||
|
||||
LANGUAGE LANG_CATALAN, SUBLANG_DEFAULT
|
||||
|
||||
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
* UPDATED: 2008-11-30 by Kario
|
||||
*/
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
LANGUAGE LANG_CZECH, SUBLANG_DEFAULT
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
* PURPOSE: German Language File for Solitaire
|
||||
* PROGRAMMERS: Daniel "EmuandCo" Reimer ([email protected])
|
||||
*/
|
||||
#include "resource.h"
|
||||
|
||||
LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
* PURPOSE: Greek Language File for Solitaire
|
||||
* PROGRAMMERS: Daniel "EmuandCo" Reimer ([email protected])
|
||||
*/
|
||||
#include "resource.h"
|
||||
|
||||
LANGUAGE LANG_GREEK, SUBLANG_DEFAULT
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
* PURPOSE: English Language File for Solitaire
|
||||
* PROGRAMMERS: Daniel "EmuandCo" Reimer ([email protected])
|
||||
*/
|
||||
#include "resource.h"
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
* PROGRAMMERS: Daniel "EmuandCo" Reimer ([email protected])
|
||||
* ACTUALIZADO: Javier Remacha - 13/01/09
|
||||
*/
|
||||
#include "resource.h"
|
||||
|
||||
LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
* PURPOSE: Basque Language File for Solitaire
|
||||
* PROGRAMMERS: Daniel "EmuandCo" Reimer ([email protected])
|
||||
*/
|
||||
#include "resource.h"
|
||||
|
||||
LANGUAGE LANG_BASQUE, SUBLANG_DEFAULT
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
* PURPOSE: French Language File for Solitaire
|
||||
* PROGRAMMERS: Daniel "EmuandCo" Reimer ([email protected])
|
||||
*/
|
||||
#include "resource.h"
|
||||
|
||||
LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
|
||||
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
* PROGRAMMERS: Daniel "EmuandCo" Reimer ([email protected])
|
||||
* TRANSLATOR: Xxxx00
|
||||
*/
|
||||
#include "resource.h"
|
||||
|
||||
LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT
|
||||
|
||||
|
||||
|
||||
@@ -5,9 +5,6 @@
|
||||
* PURPOSE: Indonesian Language File for Solitaire
|
||||
* TRANSLATOR: Zaenal Mutaqin ([email protected])
|
||||
*/
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT
|
||||
|
||||
|
||||
|
||||
@@ -5,9 +5,6 @@
|
||||
* PURPOSE: Italian Language File for Solitaire (gabriel ilardi)
|
||||
* PROGRAMMERS: Daniel "EmuandCo" Reimer ([email protected])
|
||||
*/
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
* PURPOSE: Japanese Language File for Solitaire
|
||||
* PROGRAMMERS: Daniel "EmuandCo" Reimer ([email protected])
|
||||
*/
|
||||
#include "resource.h"
|
||||
|
||||
LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/*
|
||||
*Korean translation of solitaire by Seungju Kim(manatails007) (www.seungjukim.com)
|
||||
*/
|
||||
#include "resource.h"
|
||||
|
||||
LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
|
||||
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
* PROGRAMMERS: Daniel "EmuandCo" Reimer ([email protected])
|
||||
* TRANSLATORS: Vytis "CMan" Girdþijauskas ([email protected])
|
||||
*/
|
||||
#include "resource.h"
|
||||
|
||||
LANGUAGE LANG_LITHUANIAN, SUBLANG_DEFAULT
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
* PURPOSE: Dutch Language Resource File for Solitaire
|
||||
* TRANSLATOR: Wouter De Vlieger
|
||||
*/
|
||||
#include "resource.h"
|
||||
|
||||
LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL
|
||||
|
||||
|
||||
|
||||
@@ -5,9 +5,6 @@
|
||||
* PURPOSE: Norwegian Language File for Solitaire
|
||||
* TRANSLATOR: LMH1
|
||||
*/
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
* updated by Caemyr ([email protected]), Nov, 2008
|
||||
*/
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
* PURPOSE: Romanian Language File for Solitaire
|
||||
*/
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
|
||||
|
||||
#pragma code_page(65001)
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
// Russian language resource file (Dmitry Chapyshev, 2007-06-10)
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
* DATE OF TR.: 13-07-2007
|
||||
* PROGRAMMERS: Daniel "EmuandCo" Reimer ([email protected])
|
||||
*/
|
||||
#include "resource.h"
|
||||
|
||||
LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
* TRANSLATOR: Sumath Aowsakulsutthi
|
||||
*/
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
LANGUAGE LANG_THAI, SUBLANG_DEFAULT
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
* PURPOSE: Ukraianian Language File for Solitaire
|
||||
* TRANSLATOR: Artem Reznikov
|
||||
*/
|
||||
#include "resource.h"
|
||||
|
||||
LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
* TRANSLATOR: zhangbing <[email protected], [email protected]>
|
||||
*/
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
|
||||
|
||||
|
||||
|
||||
@@ -52,10 +52,10 @@ END
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SPI_NAME "Spider"
|
||||
IDS_SPI_ABOUT "Soltiario Spider di Gregor Schneider\n\nCardLib version 1.0"
|
||||
IDS_SPI_ABOUT "Solitario Spider di Gregor Schneider\n\nCardLib version 1.0"
|
||||
IDS_SPI_QUIT "Chiudere la partita?"
|
||||
IDS_SPI_WIN "Complimenti, hai vinto!"
|
||||
IDS_SPI_DEAL "Deal again?"
|
||||
IDS_SPI_DEAL "Nuova partita?"
|
||||
END
|
||||
|
||||
|
||||
|
||||
@@ -687,53 +687,177 @@ VOID DIALOG_EditTimeDate(VOID)
|
||||
SendMessage(Globals.hEdit, EM_REPLACESEL, TRUE, (LPARAM)szDate);
|
||||
}
|
||||
|
||||
VOID DIALOG_EditWrap(VOID)
|
||||
VOID DoCreateStatusBar(VOID)
|
||||
{
|
||||
static const TCHAR edit[] = _T("edit");
|
||||
DWORD dwStyle;
|
||||
RECT rc, rcstatus;
|
||||
DWORD size;
|
||||
RECT rc;
|
||||
RECT rcstatus;
|
||||
BOOL bStatusBarVisible;
|
||||
|
||||
// Check if status bar object already exists.
|
||||
if (Globals.hStatusBar == NULL)
|
||||
{
|
||||
// Try to create the status bar
|
||||
Globals.hStatusBar = CreateStatusWindow(
|
||||
WS_CHILD | WS_VISIBLE | WS_EX_STATICEDGE,
|
||||
NULL,
|
||||
Globals.hMainWnd,
|
||||
CMD_STATUSBAR_WND_ID);
|
||||
|
||||
if (Globals.hStatusBar == NULL)
|
||||
{
|
||||
ShowLastError();
|
||||
return;
|
||||
}
|
||||
|
||||
// Load the string for formatting column/row text output
|
||||
LoadString(Globals.hInstance, STRING_LINE_COLUMN, Globals.szStatusBarLineCol, MAX_PATH-1);
|
||||
|
||||
// Set the status bar for single-text output
|
||||
SendMessage(Globals.hStatusBar, SB_SIMPLE, (WPARAM)TRUE, (LPARAM)0);
|
||||
}
|
||||
|
||||
// Set status bar visible or not accordind the the settings.
|
||||
if (Globals.bWrapLongLines == TRUE ||
|
||||
Globals.bShowStatusBar == FALSE)
|
||||
{
|
||||
bStatusBarVisible = FALSE;
|
||||
ShowWindow(Globals.hStatusBar, SW_HIDE);
|
||||
}
|
||||
else
|
||||
{
|
||||
bStatusBarVisible = TRUE;
|
||||
ShowWindow(Globals.hStatusBar, SW_SHOW);
|
||||
SendMessage(Globals.hStatusBar, WM_SIZE, 0, 0);
|
||||
}
|
||||
|
||||
// Set check state in show status bar item.
|
||||
if (Globals.bShowStatusBar == TRUE)
|
||||
{
|
||||
CheckMenuItem(Globals.hMenu, CMD_STATUSBAR, MF_BYCOMMAND | MF_CHECKED);
|
||||
}
|
||||
else
|
||||
{
|
||||
CheckMenuItem(Globals.hMenu, CMD_STATUSBAR, MF_BYCOMMAND | MF_UNCHECKED);
|
||||
}
|
||||
|
||||
// Update menu mar with the previous changes
|
||||
DrawMenuBar(Globals.hMainWnd);
|
||||
|
||||
// Sefety test is edit control exists
|
||||
if (Globals.hEdit != NULL)
|
||||
{
|
||||
// Retrieve the sizes of the controls
|
||||
GetClientRect(Globals.hMainWnd, &rc);
|
||||
GetClientRect(Globals.hStatusBar, &rcstatus);
|
||||
|
||||
// If status bar is currently visible, update dimensions of edir control
|
||||
if (bStatusBarVisible)
|
||||
rc.bottom -= (rcstatus.bottom - rcstatus.top);
|
||||
|
||||
// Resize edit control to right size.
|
||||
MoveWindow(Globals.hEdit, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, TRUE);
|
||||
}
|
||||
|
||||
// Update content with current row/column text
|
||||
DIALOG_StatusBarUpdateCaretPos();
|
||||
}
|
||||
|
||||
VOID DoCreateEditWindow(VOID)
|
||||
{
|
||||
DWORD dwStyle;
|
||||
int iSize;
|
||||
LPTSTR pTemp;
|
||||
TCHAR buff[MAX_PATH];
|
||||
|
||||
Globals.bWrapLongLines = !Globals.bWrapLongLines;
|
||||
iSize = 0;
|
||||
|
||||
size = GetWindowTextLength(Globals.hEdit) + 1;
|
||||
pTemp = HeapAlloc(GetProcessHeap(), 0, size * sizeof(WCHAR));
|
||||
if (!pTemp)
|
||||
// If the edit control already exists, try to save its content
|
||||
if (Globals.hEdit != NULL)
|
||||
{
|
||||
// number of chars currently written into the editor.
|
||||
iSize = GetWindowTextLength(Globals.hEdit);
|
||||
|
||||
if (iSize)
|
||||
{
|
||||
// Allocates temporary buffer.
|
||||
pTemp = HeapAlloc(GetProcessHeap(), 0, (iSize + 1) * sizeof(TCHAR));
|
||||
|
||||
if (!pTemp)
|
||||
{
|
||||
ShowLastError();
|
||||
return;
|
||||
}
|
||||
|
||||
// Recover the text into the control.
|
||||
GetWindowText(Globals.hEdit, pTemp, iSize + 1);
|
||||
}
|
||||
|
||||
// Restore original window procedure
|
||||
SetWindowLongPtr(Globals.hEdit, GWLP_WNDPROC, (LONG_PTR)Globals.EditProc);
|
||||
|
||||
// Destroy the edit control
|
||||
DestroyWindow(Globals.hEdit);
|
||||
}
|
||||
|
||||
// Update wrap status into the main menu and recover style flags
|
||||
if (Globals.bWrapLongLines)
|
||||
{
|
||||
dwStyle = EDIT_STYLE_WRAP;
|
||||
EnableMenuItem(Globals.hMenu, CMD_STATUSBAR, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
|
||||
} else {
|
||||
dwStyle = EDIT_STYLE;
|
||||
EnableMenuItem(Globals.hMenu, CMD_STATUSBAR, MF_BYCOMMAND | MF_ENABLED);
|
||||
}
|
||||
|
||||
// Update previous changes
|
||||
DrawMenuBar(Globals.hMainWnd);
|
||||
|
||||
// Create the new edit control
|
||||
Globals.hEdit = CreateWindowEx(
|
||||
WS_EX_CLIENTEDGE,
|
||||
EDIT_CLASS,
|
||||
NULL,
|
||||
dwStyle,
|
||||
CW_USEDEFAULT,
|
||||
CW_USEDEFAULT,
|
||||
CW_USEDEFAULT,
|
||||
CW_USEDEFAULT,
|
||||
Globals.hMainWnd,
|
||||
NULL,
|
||||
Globals.hInstance,
|
||||
NULL);
|
||||
|
||||
if (Globals.hEdit == NULL)
|
||||
{
|
||||
ShowLastError();
|
||||
return;
|
||||
}
|
||||
GetWindowText(Globals.hEdit, pTemp, size);
|
||||
DestroyWindow(Globals.hEdit);
|
||||
GetClientRect(Globals.hMainWnd, &rc);
|
||||
dwStyle = Globals.bWrapLongLines ? EDIT_STYLE_WRAP : EDIT_STYLE;
|
||||
EnableMenuItem(GetMenu(Globals.hMainWnd), CMD_STATUSBAR,
|
||||
MF_BYCOMMAND | (Globals.bWrapLongLines ? MF_DISABLED | MF_GRAYED : MF_ENABLED));
|
||||
if ( Globals.hStatusBar )
|
||||
{
|
||||
if ( Globals.bWrapLongLines )
|
||||
ShowWindow(Globals.hStatusBar, SW_HIDE);
|
||||
else if ( Globals.bShowStatusBar )
|
||||
{
|
||||
GetClientRect(Globals.hStatusBar, &rcstatus);
|
||||
rc.bottom -= (rcstatus.bottom - rcstatus.top);
|
||||
ShowWindow(Globals.hStatusBar, SW_SHOW);
|
||||
}
|
||||
}
|
||||
Globals.hEdit = CreateWindowEx(WS_EX_CLIENTEDGE, edit, NULL, dwStyle,
|
||||
0, 0, rc.right, rc.bottom, Globals.hMainWnd,
|
||||
NULL, Globals.hInstance, NULL);
|
||||
|
||||
SendMessage(Globals.hEdit, WM_SETFONT, (WPARAM)Globals.hFont, FALSE);
|
||||
SendMessage(Globals.hEdit, EM_LIMITTEXT, 0, 0);
|
||||
SetWindowText(Globals.hEdit, pTemp);
|
||||
SetFocus(Globals.hEdit);
|
||||
|
||||
// If some text was previously saved, restore it.
|
||||
if (iSize != 0)
|
||||
{
|
||||
SetWindowText(Globals.hEdit, pTemp);
|
||||
HeapFree(GetProcessHeap(), 0, pTemp);
|
||||
}
|
||||
|
||||
// Sub-class a new window callback for row/column detection.
|
||||
Globals.EditProc = (WNDPROC) SetWindowLongPtr(Globals.hEdit, GWLP_WNDPROC, (LONG_PTR)EDIT_WndProc);
|
||||
_stprintf(buff, Globals.szStatusBarLineCol, 1, 1);
|
||||
SendMessage(Globals.hStatusBar, SB_SETTEXT, SB_SIMPLEID, (LPARAM)buff);
|
||||
HeapFree(GetProcessHeap(), 0, pTemp);
|
||||
DrawMenuBar(Globals.hMainWnd);
|
||||
|
||||
// Create/update status bar
|
||||
DoCreateStatusBar();
|
||||
|
||||
// Finally shows new edit control and set focus into it.
|
||||
ShowWindow(Globals.hEdit, SW_SHOW);
|
||||
SetFocus(Globals.hEdit);
|
||||
}
|
||||
|
||||
VOID DIALOG_EditWrap(VOID)
|
||||
{
|
||||
Globals.bWrapLongLines = !Globals.bWrapLongLines;
|
||||
|
||||
DoCreateEditWindow();
|
||||
}
|
||||
|
||||
VOID DIALOG_SelectFont(VOID)
|
||||
@@ -887,27 +1011,9 @@ VOID DIALOG_StatusBarUpdateCaretPos(VOID)
|
||||
|
||||
VOID DIALOG_ViewStatusBar(VOID)
|
||||
{
|
||||
RECT rc;
|
||||
RECT rcstatus;
|
||||
Globals.bShowStatusBar = !Globals.bShowStatusBar;
|
||||
|
||||
Globals.bShowStatusBar = !Globals.bShowStatusBar;
|
||||
if ( !Globals.hStatusBar )
|
||||
{
|
||||
Globals.hStatusBar = CreateStatusWindow(WS_CHILD | WS_VISIBLE | WS_EX_STATICEDGE, TEXT("test"), Globals.hMainWnd, CMD_STATUSBAR_WND_ID );
|
||||
LoadString(Globals.hInstance, STRING_LINE_COLUMN, Globals.szStatusBarLineCol, MAX_PATH-1);
|
||||
SendMessage(Globals.hStatusBar, SB_SIMPLE, (WPARAM)TRUE, (LPARAM)0);
|
||||
}
|
||||
CheckMenuItem(GetMenu(Globals.hMainWnd), CMD_STATUSBAR,
|
||||
MF_BYCOMMAND | (Globals.bShowStatusBar ? MF_CHECKED : MF_UNCHECKED));
|
||||
DrawMenuBar(Globals.hMainWnd);
|
||||
GetClientRect(Globals.hMainWnd, &rc);
|
||||
GetClientRect(Globals.hStatusBar, &rcstatus);
|
||||
if ( Globals.bShowStatusBar )
|
||||
rc.bottom -= (rcstatus.bottom - rcstatus.top);
|
||||
|
||||
MoveWindow(Globals.hEdit, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, TRUE);
|
||||
ShowWindow(Globals.hStatusBar, Globals.bShowStatusBar);
|
||||
DIALOG_StatusBarUpdateCaretPos();
|
||||
DoCreateStatusBar();
|
||||
}
|
||||
|
||||
VOID DIALOG_HelpContents(VOID)
|
||||
|
||||
@@ -63,3 +63,5 @@ BOOL FileExists(LPCTSTR szFilename);
|
||||
BOOL HasFileExtension(LPCTSTR szFilename);
|
||||
BOOL DoCloseFile(void);
|
||||
void DoOpenFile(LPCTSTR szFileName);
|
||||
VOID DoCreateStatusBar(VOID);
|
||||
VOID DoCreateEditWindow(VOID);
|
||||
|
||||
@@ -29,9 +29,9 @@ static ATOM aFINDMSGSTRING;
|
||||
|
||||
VOID NOTEPAD_EnableSearchMenu()
|
||||
{
|
||||
EnableMenuItem(GetMenu(Globals.hMainWnd), CMD_SEARCH,
|
||||
EnableMenuItem(Globals.hMenu, CMD_SEARCH,
|
||||
MF_BYCOMMAND | ((GetWindowTextLength(Globals.hEdit) == 0) ? MF_DISABLED | MF_GRAYED : MF_ENABLED));
|
||||
EnableMenuItem(GetMenu(Globals.hMainWnd), CMD_SEARCH_NEXT,
|
||||
EnableMenuItem(Globals.hMenu, CMD_SEARCH_NEXT,
|
||||
MF_BYCOMMAND | ((GetWindowTextLength(Globals.hEdit) == 0) ? MF_DISABLED | MF_GRAYED : MF_ENABLED));
|
||||
}
|
||||
|
||||
@@ -334,23 +334,8 @@ static LRESULT WINAPI NOTEPAD_WndProc(HWND hWnd, UINT msg, WPARAM wParam,
|
||||
switch (msg) {
|
||||
|
||||
case WM_CREATE:
|
||||
{
|
||||
static const TCHAR edit[] = _T("edit");
|
||||
RECT rc;
|
||||
GetClientRect(hWnd, &rc);
|
||||
Globals.hEdit = CreateWindowEx(EDIT_EXSTYLE, edit, NULL, Globals.bWrapLongLines ? EDIT_STYLE_WRAP : EDIT_STYLE,
|
||||
0, 0, rc.right, rc.bottom, hWnd,
|
||||
NULL, Globals.hInstance, NULL);
|
||||
if (!Globals.hEdit)
|
||||
return -1;
|
||||
SendMessage(Globals.hEdit, EM_LIMITTEXT, 0, 0);
|
||||
if (Globals.hFont)
|
||||
SendMessage(Globals.hEdit, WM_SETFONT, (WPARAM)Globals.hFont, (LPARAM)TRUE);
|
||||
|
||||
Globals.EditProc = (WNDPROC) SetWindowLongPtr(Globals.hEdit, GWLP_WNDPROC, (LONG_PTR)EDIT_WndProc);
|
||||
|
||||
Globals.hMenu = GetMenu(hWnd);
|
||||
break;
|
||||
}
|
||||
|
||||
case WM_COMMAND:
|
||||
if (HIWORD(wParam) == EN_CHANGE || HIWORD(wParam) == EN_HSCROLL || HIWORD(wParam) == EN_VSCROLL)
|
||||
@@ -386,7 +371,8 @@ static LRESULT WINAPI NOTEPAD_WndProc(HWND hWnd, UINT msg, WPARAM wParam,
|
||||
|
||||
case WM_SIZE:
|
||||
{
|
||||
if (Globals.bShowStatusBar)
|
||||
if (Globals.bShowStatusBar == TRUE &&
|
||||
Globals.bWrapLongLines == FALSE)
|
||||
{
|
||||
RECT rcStatusBar;
|
||||
HDWP hdwp;
|
||||
@@ -413,6 +399,12 @@ static LRESULT WINAPI NOTEPAD_WndProc(HWND hWnd, UINT msg, WPARAM wParam,
|
||||
break;
|
||||
}
|
||||
|
||||
// The entire client area is covered by edit control and by
|
||||
// the status bar. So there is no need to erase main background.
|
||||
// This resolves the horrible fliker effect during windows resizes.
|
||||
case WM_ERASEBKGND:
|
||||
return 1;
|
||||
|
||||
case WM_SETFOCUS:
|
||||
SetFocus(Globals.hEdit);
|
||||
break;
|
||||
@@ -613,6 +605,8 @@ int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE prev, LPTSTR cmdline, int sh
|
||||
ExitProcess(1);
|
||||
}
|
||||
|
||||
DoCreateEditWindow();
|
||||
|
||||
NOTEPAD_InitData();
|
||||
DIALOG_FileNew();
|
||||
|
||||
|
||||
@@ -23,10 +23,11 @@
|
||||
|
||||
#include "notepad_res.h"
|
||||
|
||||
#define EDIT_STYLE_WRAP (WS_CHILD | WS_VISIBLE | WS_VSCROLL \
|
||||
#define EDIT_STYLE_WRAP (WS_CHILD | WS_VSCROLL \
|
||||
| ES_AUTOVSCROLL | ES_MULTILINE | ES_NOHIDESEL)
|
||||
#define EDIT_STYLE (EDIT_STYLE_WRAP | WS_HSCROLL | ES_AUTOHSCROLL)
|
||||
#define EDIT_EXSTYLE (WS_EX_CLIENTEDGE)
|
||||
|
||||
#define EDIT_CLASS _T("EDIT")
|
||||
|
||||
#define MAX_STRING_LEN 255
|
||||
|
||||
@@ -47,6 +48,7 @@ typedef struct
|
||||
HWND hEdit;
|
||||
HWND hStatusBar;
|
||||
HFONT hFont; /* Font used by the edit control */
|
||||
HMENU hMenu;
|
||||
LOGFONT lfFont;
|
||||
BOOL bWrapLongLines;
|
||||
BOOL bShowStatusBar;
|
||||
|
||||
@@ -101,3 +101,5 @@ extern HWND hSizeboxRightBottom;
|
||||
|
||||
extern POINT pointStack[256];
|
||||
extern short pointSP;
|
||||
extern POINT *ptStack;
|
||||
extern int ptSP;
|
||||
|
||||
@@ -12,8 +12,8 @@ ID_MENU MENU
|
||||
BEGIN
|
||||
POPUP "&Soubor"
|
||||
BEGIN
|
||||
MENUITEM "Nový\tCtrl+N", IDM_FILENEW
|
||||
MENUITEM "Otevøít...\tCtrl+O", IDM_FILEOPEN
|
||||
MENUITEM "&Nový\tCtrl+N", IDM_FILENEW
|
||||
MENUITEM "&Otevøít...\tCtrl+O", IDM_FILEOPEN
|
||||
MENUITEM "Uložit\tCtrl+S", IDM_FILESAVE
|
||||
MENUITEM "Uložit jako...", IDM_FILESAVEAS
|
||||
MENUITEM SEPARATOR
|
||||
@@ -60,7 +60,7 @@ BEGIN
|
||||
MENUITEM "800%", IDM_VIEWZOOM800
|
||||
END
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Zobrazit møížku", IDM_VIEWSHOWGRID
|
||||
MENUITEM "Zobrazit møížku\tCtrl+G", IDM_VIEWSHOWGRID
|
||||
MENUITEM "Zobrazit miniaturu", IDM_VIEWSHOWMINIATURE
|
||||
END
|
||||
MENUITEM "Celá obrazovka\tCtrl+F", IDM_VIEWFULLSCREEN
|
||||
|
||||
@@ -284,6 +284,10 @@ endPaintingL(HDC hdc, short x, short y, int fg, int bg)
|
||||
|
||||
placeSelWin();
|
||||
ShowWindow(hSelection, SW_SHOW);
|
||||
/* force refresh of selection contents */
|
||||
SendMessage(hSelection, WM_LBUTTONDOWN, 0, 0);
|
||||
SendMessage(hSelection, WM_MOUSEMOVE, 0, 0);
|
||||
SendMessage(hSelection, WM_LBUTTONUP, 0, 0);
|
||||
}
|
||||
HeapFree(GetProcessHeap(), 0, ptStack);
|
||||
ptStack = NULL;
|
||||
@@ -310,6 +314,10 @@ endPaintingL(HDC hdc, short x, short y, int fg, int bg)
|
||||
|
||||
placeSelWin();
|
||||
ShowWindow(hSelection, SW_SHOW);
|
||||
/* force refresh of selection contents */
|
||||
SendMessage(hSelection, WM_LBUTTONDOWN, 0, 0);
|
||||
SendMessage(hSelection, WM_MOUSEMOVE, 0, 0);
|
||||
SendMessage(hSelection, WM_LBUTTONUP, 0, 0);
|
||||
}
|
||||
break;
|
||||
case TOOL_RUBBER:
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
/* FUNCTIONS ********************************************************/
|
||||
|
||||
void
|
||||
SetWallpaper(TCHAR * FileName, DWORD dwStyle, DWORD dwTile) //FIXME: The pattern (tiled/stretched) is not set
|
||||
SetWallpaper(TCHAR * FileName, DWORD dwStyle, DWORD dwTile) //FIXME: Has to be called 2x to apply the pattern (tiled/stretched) too
|
||||
{
|
||||
SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, (PVOID) FileName, SPIF_UPDATEINIFILE);
|
||||
|
||||
/*HKEY hDesktop;
|
||||
HKEY hDesktop;
|
||||
TCHAR szStyle[3], szTile[3];
|
||||
|
||||
if ((dwStyle > 2) || (dwTile > 2))
|
||||
@@ -39,5 +39,5 @@ SetWallpaper(TCHAR * FileName, DWORD dwStyle, DWORD dwTile) //FIXME: The pat
|
||||
_tcslen(szTile) * sizeof(TCHAR));
|
||||
|
||||
RegCloseKey(hDesktop);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
/* INCLUDES *********************************************************/
|
||||
|
||||
#include <windows.h>
|
||||
#include <commctrl.h>
|
||||
#include <tchar.h>
|
||||
#include "globalvar.h"
|
||||
#include "drawing.h"
|
||||
#include "history.h"
|
||||
@@ -87,6 +89,7 @@ SelectionWinProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
case WM_MOUSEMOVE:
|
||||
if (moving)
|
||||
{
|
||||
TCHAR sizeStr[100];
|
||||
int xDelta;
|
||||
int yDelta;
|
||||
resetToU1();
|
||||
@@ -147,6 +150,9 @@ SelectionWinProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
break;
|
||||
}
|
||||
|
||||
_stprintf(sizeStr, _T("%d x %d"), rectSel_dest[2], rectSel_dest[3]);
|
||||
SendMessage(hStatusBar, SB_SETTEXT, 2, (LPARAM) sizeStr);
|
||||
|
||||
if (action != 0)
|
||||
StretchBlt(hDrawingDC, rectSel_dest[0], rectSel_dest[1], rectSel_dest[2], rectSel_dest[3], hSelDC, 0, 0, GetDIBWidth(hSelBm), GetDIBHeight(hSelBm), SRCCOPY);
|
||||
else
|
||||
@@ -182,6 +188,7 @@ SelectionWinProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
int h = rectSel_dest[3] * zoom / 1000 + 6;
|
||||
xPos = LOWORD(lParam);
|
||||
yPos = HIWORD(lParam);
|
||||
SendMessage(hStatusBar, SB_SETTEXT, 2, (LPARAM) NULL);
|
||||
action = identifyCorner(xPos, yPos, w, h);
|
||||
if (action != 0)
|
||||
SetCursor(LoadCursor(NULL, cursors[action]));
|
||||
|
||||
@@ -151,6 +151,11 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message) /* handle the messages */
|
||||
{
|
||||
case WM_CREATE:
|
||||
ptStack = NULL;
|
||||
ptSP = 0;
|
||||
break;
|
||||
|
||||
case WM_DESTROY:
|
||||
PostQuitMessage(0); /* send a WM_QUIT to the message queue */
|
||||
break;
|
||||
@@ -446,9 +451,7 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
HDC hdc;
|
||||
GetClientRect(hwndMiniature, (LPRECT) &mclient);
|
||||
hdc = GetDC(hwndMiniature);
|
||||
BitBlt(hdc, -min(imgXRes * GetScrollPos(hScrollbox, SB_HORZ) / 10000, imgXRes - mclient[2]),
|
||||
-min(imgYRes * GetScrollPos(hScrollbox, SB_VERT) / 10000, imgYRes - mclient[3]),
|
||||
imgXRes, imgYRes, hDrawingDC, 0, 0, SRCCOPY);
|
||||
BitBlt(hdc, 0, 0, imgXRes, imgYRes, hDrawingDC, 0, 0, SRCCOPY);
|
||||
ReleaseDC(hwndMiniature, hdc);
|
||||
}
|
||||
break;
|
||||
@@ -565,6 +568,24 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_KEYDOWN:
|
||||
if (wParam == VK_ESCAPE)
|
||||
{
|
||||
if (!drawing)
|
||||
{
|
||||
/* Deselect */
|
||||
if ((activeTool == TOOL_RECTSEL) || (activeTool == TOOL_FREESEL))
|
||||
{
|
||||
startPaintingL(hDrawingDC, 0, 0, fgColor, bgColor);
|
||||
whilePaintingL(hDrawingDC, 0, 0, fgColor, bgColor);
|
||||
endPaintingL(hDrawingDC, 0, 0, fgColor, bgColor);
|
||||
ShowWindow(hSelection, SW_HIDE);
|
||||
}
|
||||
}
|
||||
/* FIXME: also cancel current drawing underway */
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_MOUSEMOVE:
|
||||
if (hwnd == hImageArea)
|
||||
{
|
||||
@@ -640,6 +661,8 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
if ((activeTool >= TOOL_TEXT) || (activeTool == TOOL_RECTSEL) || (activeTool == TOOL_FREESEL))
|
||||
{
|
||||
TCHAR sizeStr[100];
|
||||
if ((activeTool >= TOOL_LINE) && (GetAsyncKeyState(VK_SHIFT) < 0))
|
||||
yRel = xRel;
|
||||
_stprintf(sizeStr, _T("%d x %d"), xRel, yRel);
|
||||
SendMessage(hStatusBar, SB_SETTEXT, 2, (LPARAM) sizeStr);
|
||||
}
|
||||
@@ -651,6 +674,8 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
if (activeTool >= TOOL_TEXT)
|
||||
{
|
||||
TCHAR sizeStr[100];
|
||||
if ((activeTool >= TOOL_LINE) && (GetAsyncKeyState(VK_SHIFT) < 0))
|
||||
yRel = xRel;
|
||||
_stprintf(sizeStr, _T("%d x %d"), xRel, yRel);
|
||||
SendMessage(hStatusBar, SB_SETTEXT, 2, (LPARAM) sizeStr);
|
||||
}
|
||||
@@ -783,7 +808,7 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
case IDM_EDITDELETESELECTION:
|
||||
{
|
||||
/* remove selection window and already painted content using undo(),
|
||||
paint Rect for rectangular selections and nothing for freeform selections */
|
||||
paint Rect for rectangular selections and Poly for freeform selections */
|
||||
undo();
|
||||
if (activeTool == TOOL_RECTSEL)
|
||||
{
|
||||
@@ -791,16 +816,23 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
Rect(hDrawingDC, rectSel_dest[0], rectSel_dest[1], rectSel_dest[2] + rectSel_dest[0],
|
||||
rectSel_dest[3] + rectSel_dest[1], bgColor, bgColor, 0, TRUE);
|
||||
}
|
||||
if (activeTool == TOOL_FREESEL)
|
||||
{
|
||||
newReversible();
|
||||
Poly(hDrawingDC, ptStack, ptSP + 1, 0, 0, 2, 0, FALSE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case IDM_EDITSELECTALL:
|
||||
if (activeTool == TOOL_RECTSEL)
|
||||
{
|
||||
startPaintingL(hDrawingDC, 0, 0, fgColor, bgColor);
|
||||
whilePaintingL(hDrawingDC, imgXRes, imgYRes, fgColor, bgColor);
|
||||
endPaintingL(hDrawingDC, imgXRes, imgYRes, fgColor, bgColor);
|
||||
}
|
||||
{
|
||||
HWND hToolbar = FindWindowEx(hToolBoxContainer, NULL, TOOLBARCLASSNAME, NULL);
|
||||
SendMessage(hToolbar, TB_CHECKBUTTON, ID_RECTSEL, MAKELONG(TRUE, 0));
|
||||
SendMessage(hwnd, WM_COMMAND, ID_RECTSEL, 0);
|
||||
startPaintingL(hDrawingDC, 0, 0, fgColor, bgColor);
|
||||
whilePaintingL(hDrawingDC, imgXRes, imgYRes, fgColor, bgColor);
|
||||
endPaintingL(hDrawingDC, imgXRes, imgYRes, fgColor, bgColor);
|
||||
break;
|
||||
}
|
||||
case IDM_EDITCOPYTO:
|
||||
if (GetSaveFileName(&ofn) != 0)
|
||||
SaveDIBToFile(hSelBm, ofn.lpstrFile, hDrawingDC, NULL, NULL, fileHPPM, fileVPPM);
|
||||
@@ -829,23 +861,73 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
case IDM_IMAGEROTATEMIRROR:
|
||||
switch (mirrorRotateDlg())
|
||||
{
|
||||
case 1:
|
||||
newReversible();
|
||||
StretchBlt(hDrawingDC, imgXRes - 1, 0, -imgXRes, imgYRes, hDrawingDC, 0, 0,
|
||||
imgXRes, imgYRes, SRCCOPY);
|
||||
SendMessage(hImageArea, WM_PAINT, 0, 0);
|
||||
case 1: /* flip horizontally */
|
||||
if (IsWindowVisible(hSelection))
|
||||
{
|
||||
SelectObject(hSelDC, hSelMask);
|
||||
StretchBlt(hSelDC, rectSel_dest[2] - 1, 0, -rectSel_dest[2], rectSel_dest[3], hSelDC,
|
||||
0, 0, rectSel_dest[2], rectSel_dest[3], SRCCOPY);
|
||||
SelectObject(hSelDC, hSelBm);
|
||||
StretchBlt(hSelDC, rectSel_dest[2] - 1, 0, -rectSel_dest[2], rectSel_dest[3], hSelDC,
|
||||
0, 0, rectSel_dest[2], rectSel_dest[3], SRCCOPY);
|
||||
/* force refresh of selection contents, used also in case 2 and case 4 */
|
||||
SendMessage(hSelection, WM_LBUTTONDOWN, 0, 0);
|
||||
SendMessage(hSelection, WM_MOUSEMOVE, 0, 0);
|
||||
SendMessage(hSelection, WM_LBUTTONUP, 0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
newReversible();
|
||||
StretchBlt(hDrawingDC, imgXRes - 1, 0, -imgXRes, imgYRes, hDrawingDC, 0, 0,
|
||||
imgXRes, imgYRes, SRCCOPY);
|
||||
SendMessage(hImageArea, WM_PAINT, 0, 0);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
newReversible();
|
||||
StretchBlt(hDrawingDC, 0, imgYRes - 1, imgXRes, -imgYRes, hDrawingDC, 0, 0,
|
||||
imgXRes, imgYRes, SRCCOPY);
|
||||
SendMessage(hImageArea, WM_PAINT, 0, 0);
|
||||
case 2: /* flip vertically */
|
||||
if (IsWindowVisible(hSelection))
|
||||
{
|
||||
SelectObject(hSelDC, hSelMask);
|
||||
StretchBlt(hSelDC, 0, rectSel_dest[3] - 1, rectSel_dest[2], -rectSel_dest[3], hSelDC,
|
||||
0, 0, rectSel_dest[2], rectSel_dest[3], SRCCOPY);
|
||||
SelectObject(hSelDC, hSelBm);
|
||||
StretchBlt(hSelDC, 0, rectSel_dest[3] - 1, rectSel_dest[2], -rectSel_dest[3], hSelDC,
|
||||
0, 0, rectSel_dest[2], rectSel_dest[3], SRCCOPY);
|
||||
SendMessage(hSelection, WM_LBUTTONDOWN, 0, 0);
|
||||
SendMessage(hSelection, WM_MOUSEMOVE, 0, 0);
|
||||
SendMessage(hSelection, WM_LBUTTONUP, 0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
newReversible();
|
||||
StretchBlt(hDrawingDC, 0, imgYRes - 1, imgXRes, -imgYRes, hDrawingDC, 0, 0,
|
||||
imgXRes, imgYRes, SRCCOPY);
|
||||
SendMessage(hImageArea, WM_PAINT, 0, 0);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
newReversible();
|
||||
StretchBlt(hDrawingDC, imgXRes - 1, imgYRes - 1, -imgXRes, -imgYRes, hDrawingDC,
|
||||
0, 0, imgXRes, imgYRes, SRCCOPY);
|
||||
SendMessage(hImageArea, WM_PAINT, 0, 0);
|
||||
case 3: /* rotate 90 degrees */
|
||||
break;
|
||||
case 4: /* rotate 180 degrees */
|
||||
if (IsWindowVisible(hSelection))
|
||||
{
|
||||
SelectObject(hSelDC, hSelMask);
|
||||
StretchBlt(hSelDC, rectSel_dest[2] - 1, rectSel_dest[3] - 1, -rectSel_dest[2], -rectSel_dest[3], hSelDC,
|
||||
0, 0, rectSel_dest[2], rectSel_dest[3], SRCCOPY);
|
||||
SelectObject(hSelDC, hSelBm);
|
||||
StretchBlt(hSelDC, rectSel_dest[2] - 1, rectSel_dest[3] - 1, -rectSel_dest[2], -rectSel_dest[3], hSelDC,
|
||||
0, 0, rectSel_dest[2], rectSel_dest[3], SRCCOPY);
|
||||
SendMessage(hSelection, WM_LBUTTONDOWN, 0, 0);
|
||||
SendMessage(hSelection, WM_MOUSEMOVE, 0, 0);
|
||||
SendMessage(hSelection, WM_LBUTTONUP, 0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
newReversible();
|
||||
StretchBlt(hDrawingDC, imgXRes - 1, imgYRes - 1, -imgXRes, -imgYRes, hDrawingDC,
|
||||
0, 0, imgXRes, imgYRes, SRCCOPY);
|
||||
SendMessage(hImageArea, WM_PAINT, 0, 0);
|
||||
}
|
||||
break;
|
||||
case 5: /* rotate 270 degrees */
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@@ -895,6 +977,7 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
case IDM_VIEWSHOWGRID:
|
||||
showGrid = !showGrid;
|
||||
SendMessage(hImageArea, WM_PAINT, 0, 0);
|
||||
break;
|
||||
case IDM_VIEWSHOWMINIATURE:
|
||||
showMiniature = !showMiniature;
|
||||
|
||||
@@ -159,7 +159,7 @@ BEGIN
|
||||
IDS_CAT_ENGINEER "Scienze"
|
||||
IDS_CAT_FINANCE "Finanza"
|
||||
IDS_CAT_GAMES "Giochi e divertimento"
|
||||
IDS_CAT_GRAPHICS "Graphica"
|
||||
IDS_CAT_GRAPHICS "Grafica"
|
||||
IDS_CAT_INTERNET "Internet & rete"
|
||||
IDS_CAT_LIBS "Librerie"
|
||||
IDS_CAT_OFFICE "Ufficio"
|
||||
@@ -171,7 +171,7 @@ END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_APPTITLE "ReactOS Applications Manager"
|
||||
IDS_APPTITLE "ReactOS Gestione applicazioni"
|
||||
IDS_SEARCH_TEXT "Cerca..."
|
||||
IDS_INSTALL "Installa"
|
||||
IDS_UNINSTALL "Disinstalla"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* TRANSLATOR : Mário Kaèmár /Mario Kacmar/ aka Kario ([email protected])
|
||||
* DATE OF TR.: 29-08-2009
|
||||
* LAST CHANGE: 05-10-2009
|
||||
* LAST CHANGE: 26-07-2010
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT
|
||||
@@ -143,7 +143,7 @@ BEGIN
|
||||
IDS_INFO_INSTALLSRC "\nInstall Source: "
|
||||
IDS_INFO_UNINSTALLSTR "\nUninstall String: "
|
||||
IDS_INFO_MODIFYPATH "\nModify Path: "
|
||||
IDS_INFO_INSTALLDATE "\nInstall Date: "
|
||||
IDS_INFO_INSTALLDATE "\nDátum inštalácie: "
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
@@ -193,6 +193,6 @@ BEGIN
|
||||
IDS_CHOOSE_FOLDER_ERROR "Zvolili ste si neexistujúci prieèinok!"
|
||||
IDS_USER_NOT_ADMIN "Mali by ste by� administrátor pre spustenie ""Manažéra aplikácií systému ReactOS""!"
|
||||
IDS_APP_REG_REMOVE "Naozaj chcete vymaza� údaje o nainštalovanom programe z registrov?"
|
||||
IDS_INFORMATION "Information"
|
||||
IDS_UNABLE_TO_REMOVE "Unable to remove data on the program from the registry!"
|
||||
IDS_INFORMATION "Informácie"
|
||||
IDS_UNABLE_TO_REMOVE "Nie je možné odstráni� z registrov údaje o programe!"
|
||||
END
|
||||
|
||||
@@ -8,7 +8,7 @@ Description = Utility to create and open 7zip, zip, tar, rar and other archive f
|
||||
Size = 0.9M
|
||||
Category = 12
|
||||
URLSite = http://www.7-zip.org/
|
||||
URLDownload = http://ovh.dl.sourceforge.net/sourceforge/sevenzip/7z465.exe
|
||||
URLDownload = http://ovh.dl.sourceforge.net/project/sevenzip/7-Zip/4.65/7z465.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
||||
@@ -32,11 +32,11 @@ URLSite = Nieznana
|
||||
[Section.0419]
|
||||
Name = Драйвер AC97 для VirtualBox
|
||||
Licence = Не указано
|
||||
Description = Разархивируйте содержимое в папку "ReactOS", затем дважды перезагрузите систему.
|
||||
Description = Pазархивируйте содержимое в папку "ReactOS", затем дважды перезагрузите систему.
|
||||
URLSite = Не указано
|
||||
|
||||
[Section.0422]
|
||||
Name = Драйвер AC97 для VirtualBox
|
||||
Licence = Невідома
|
||||
Description = Розархівуйте вміст в теку "ReactOS" після чого двічі перезавантажте систему.
|
||||
Description = Pозархівуйте вміст в теку "ReactOS" після чого двічі перезавантажте систему.
|
||||
URLSite = Не вказано
|
||||
|
||||
@@ -8,7 +8,7 @@ Description = Diablo 2 Shareware. zeckensack's glide wrapper is required to run
|
||||
Size = 132MB
|
||||
Category = 4
|
||||
URLSite = http://www.blizzard.com/diablo2/
|
||||
URLDownload = http://ftp.freenet.de/pub/filepilot/windows/spiele/diabloiidemo.exe
|
||||
URLDownload = http://pub.zoneofgames.ru/demos/diabloiidemo.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
||||
@@ -8,7 +8,7 @@ Description = DOSBox is a DOS emulator.
|
||||
Size = 1.4MB
|
||||
Category = 15
|
||||
URLSite = http://www.dosbox.com/
|
||||
URLDownload = http://ovh.dl.sourceforge.net/sourceforge/dosbox/DOSBox0.74-win32-installer.exe
|
||||
URLDownload = http://ovh.dl.sourceforge.net/project/dosbox/dosbox/0.74/DOSBox0.74-win32-installer.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
||||
@@ -2,47 +2,47 @@
|
||||
|
||||
[Section]
|
||||
Name = Mozilla Firefox 3.6
|
||||
Version = 3.6.7
|
||||
Version = 3.6.10
|
||||
Licence = MPL/GPL/LGPL
|
||||
Description = The most popular and one of the best free Web Browsers out there.
|
||||
Size = 8.2M
|
||||
Size = 8.1M
|
||||
Category = 5
|
||||
URLSite = http://www.mozilla.com/en-US/
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.6.7/win32/en-US/Firefox%20Setup%203.6.7.exe
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.6.10/win32/en-US/Firefox%20Setup%203.6.10.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
Description = Der populärste und einer der besten freien Webbrowser.
|
||||
Size = 8.0M
|
||||
URLSite = http://www.mozilla-europe.org/de/
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.6.7/win32/de/Firefox%20Setup%203.6.7.exe
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.6.10/win32/de/Firefox%20Setup%203.6.10.exe
|
||||
|
||||
[Section.040a]
|
||||
Description = El más popular y uno de los mejores navegadores web gratuitos que hay.
|
||||
Size = 8.0M
|
||||
URLSite = http://www.mozilla-europe.org/es/
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.6.7/win32/es-ES/Firefox%20Setup%203.6.7.exe
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.6.10/win32/es-ES/Firefox%20Setup%203.6.10.exe
|
||||
|
||||
[Section.0414]
|
||||
Description = Mest populære og best også gratis nettleserene der ute.
|
||||
Size = 8.0M
|
||||
URLSite = http://www.mozilla-europe.org/no/
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.6.7/win32/nb-NO/Firefox%20Setup%203.6.7.exe
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.6.10/win32/nb-NO/Firefox%20Setup%203.6.10.exe
|
||||
|
||||
[Section.0415]
|
||||
Description = Najpopularniejsza i jedna z najlepszych darmowych przeglądarek internetowych.
|
||||
Size = 8.9M
|
||||
Size = 8.8M
|
||||
URLSite = http://www.mozilla-europe.org/pl/
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.6.7/win32/pl/Firefox%20Setup%203.6.7.exe
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.6.10/win32/pl/Firefox%20Setup%203.6.10.exe
|
||||
|
||||
[Section.0419]
|
||||
Description = Один из самых популярных и лучших бесплатных браузеров.
|
||||
Size = 8.4M
|
||||
URLSite = http://www.mozilla-europe.org/ru/
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.6.7/win32/ru/Firefox%20Setup%203.6.7.exe
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.6.10/win32/ru/Firefox%20Setup%203.6.10.exe
|
||||
|
||||
[Section.0422]
|
||||
Description = Найпопулярніший та один з кращих безплатних веб-браузерів.
|
||||
Size = 8.4M
|
||||
URLSite = http://www.mozilla-europe.org/uk/
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.6.7/win32/uk/Firefox%20Setup%203.6.7.exe
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.6.10/win32/uk/Firefox%20Setup%203.6.10.exe
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
[Section]
|
||||
Name = FreeBASIC
|
||||
Version = 0.20.0b
|
||||
Version = 0.21.1
|
||||
Licence = GPL/LGPL
|
||||
Description = Open Source BASIC Compiler. The BASIC syntax is compatible to QBASIC.
|
||||
Size = 5.5MB
|
||||
Size = 5.9MB
|
||||
Category = 7
|
||||
URLSite = http://www.freebasic.net/
|
||||
URLDownload = http://ovh.dl.sourceforge.net/sourceforge/fbc/FreeBASIC-v0.20.0b-win32.exe
|
||||
URLDownload = http://freefr.dl.sourceforge.net/project/fbc/Binaries%20-%20Windows/FreeBASIC%200.21.1/FreeBASIC-0.21.1-win32.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
; UTF-8
|
||||
|
||||
[Section]
|
||||
Name = Go-OO
|
||||
Version = 3.2.1-11
|
||||
Licence = LGPL
|
||||
Description = Open Source Office Suite, based on Open Office, but way better.
|
||||
Size = 181.0MB
|
||||
Category = 6
|
||||
URLSite = http://www.go-oo.org/
|
||||
URLDownload = http://go-oo.mirrorbrain.org/stable/win32/3.2.1/GoOo-3.2.1-11.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
Description = Open Source Office Suite, basierend auf Open Office, aber viel besser.
|
||||
|
||||
[Section.040a]
|
||||
Description = La suite de ofimática de código abierto.
|
||||
|
||||
[Section.0415]
|
||||
Description = Otwarty pakiet biurowy.
|
||||
|
||||
[Section.0422]
|
||||
Description = Відкритий офісний пакет.
|
||||
@@ -8,7 +8,7 @@ Description = Breakout Clone using SDL libs.
|
||||
Size = 3.1MB
|
||||
Category = 4
|
||||
URLSite = http://lgames.sourceforge.net/index.php?project=LBreakout2
|
||||
URLDownload = http://ovh.dl.sourceforge.net/sourceforge/lgames/lbreakout2-2.4.1-win32.exe
|
||||
URLDownload = http://ovh.dl.sourceforge.net/project/lgames/binaries/lbreakout2-2.4.1-win32.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
||||
@@ -8,7 +8,7 @@ Description = Panzer General Clone using SDL libs.
|
||||
Size = 2.0MB
|
||||
Category = 4
|
||||
URLSite = http://lgames.sourceforge.net/index.php?project=LGeneral
|
||||
URLDownload = http://ovh.dl.sourceforge.net/sourceforge/lgames/lgeneral-1.1-win32.exe
|
||||
URLDownload = http://ovh.dl.sourceforge.net/project/lgames/binaries/lgeneral-1.1-win32.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
; UTF-8
|
||||
|
||||
[Section]
|
||||
Name = LibreOffice
|
||||
Version = 3.3.0 Beta 1
|
||||
Licence = LGPL
|
||||
Description = Former called OpenOffice. Open Source Office Suite.
|
||||
Size = 138.0MB
|
||||
Category = 6
|
||||
URLSite = http://www.documentfoundation.org/
|
||||
URLDownload = http://download.documentfoundation.org/libreoffice/testing/LO_3.3.0-beta1_Win_x86_install_en-US.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
Description = Vorher bekannt als OpenOffice. Open Source Office Suite.
|
||||
|
||||
[Section.040a]
|
||||
Description = La suite de ofimática de código abierto.
|
||||
|
||||
[Section.0415]
|
||||
Description = Otwarty pakiet biurowy.
|
||||
|
||||
[Section.0422]
|
||||
Description = Відкритий офісний пакет.
|
||||
@@ -8,7 +8,7 @@ Description = Atomix Clone using SDL libs.
|
||||
Size = 1.4MB
|
||||
Category = 4
|
||||
URLSite = http://lgames.sourceforge.net/index.php?project=LMarbles
|
||||
URLDownload = http://ovh.dl.sourceforge.net/sourceforge/lgames/lmarbles-1.0.6-win32.exe
|
||||
URLDownload = http://ovh.dl.sourceforge.net/project/lgames/binaries/lmarbles-1.0.6-win32.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
[Section]
|
||||
Name = MinGW
|
||||
Version = 5.1.6
|
||||
Version = 20100909
|
||||
Licence = Public domain/GPL
|
||||
Description = A Port of the GNU toolchain with GCC, GDB, GNU make, etc.
|
||||
Size = 155kb
|
||||
Size = 568kb
|
||||
Category = 7
|
||||
URLSite = http://mingw.org/
|
||||
URLDownload = http://ovh.dl.sourceforge.net/sourceforge/mingw/MinGW-5.1.6.exe
|
||||
URLDownload = http://ovh.dl.sourceforge.net/project/mingw/Automated%20MinGW%20Installer/mingw-get-inst/mingw-get-inst-20100909/mingw-get-inst-20100909.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
[Section]
|
||||
Name = Miranda IM
|
||||
Version = 0.8.27
|
||||
Version = 0.9.5
|
||||
Licence = GPL
|
||||
Description = Open source multiprotocol instant messaging application - May not work completely.
|
||||
Size = 1.8MB
|
||||
Size = 2.2MB
|
||||
Category = 5
|
||||
URLSite = http://www.miranda-im.org/
|
||||
URLDownload = http://miranda.googlecode.com/files/miranda-im-v0.8.27-unicode.exe
|
||||
URLDownload = http://miranda.googlecode.com/files/miranda-im-v0.9.5-unicode.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
[Section]
|
||||
Name = mIRC
|
||||
Version = 6.35
|
||||
Version = 7.1
|
||||
Licence = Shareware
|
||||
Description = The most popular client for the Internet Relay Chat (IRC).
|
||||
Size = 1.66M
|
||||
Size = 1.8M
|
||||
Category = 5
|
||||
URLSite = http://www.mirc.com/
|
||||
URLDownload = http://mirc.bigchief.dk/mirc635.exe
|
||||
URLDownload = http://download.mirc.com/mirc71.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
[Section]
|
||||
Name = Media Player Classic Home Cinema
|
||||
Version = 1.3.1249
|
||||
Version = 1.4.2499
|
||||
Licence = GPL
|
||||
Description = A media player.
|
||||
Size = 3.0MB
|
||||
Size = 4.9MB
|
||||
Category = 1
|
||||
URLSite = http://mpc-hc.sourceforge.net/
|
||||
URLDownload = http://mesh.dl.sourceforge.net/project/mpc-hc/MPC%20HomeCinema%20-%20Win32/MPC-HC%20v1.3.1249.0_32%20bits/MPC-HomeCinema.1.3.1249.0.%28x86%29.exe
|
||||
URLDownload = http://freefr.dl.sourceforge.net/project/mpc-hc/MPC%20HomeCinema%20-%20Win32/MPC-HC%20v1.4.2499.0_32%20bits/MPC-HomeCinema.1.4.2499.0.x86.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
[Section]
|
||||
Name = OpenTTD
|
||||
Version = 1.0.2
|
||||
Version = 1.0.4
|
||||
Licence = GPL v2
|
||||
Description = Open Source clone of the "Transport Tycoon Deluxe" game engine. You need a copy of Transport Tycoon.
|
||||
Size = 3.5MB
|
||||
Size = 3.4MB
|
||||
Category = 4
|
||||
URLSite = http://www.openttd.org/
|
||||
URLDownload = http://binaries.openttd.org/releases/1.0.2/openttd-1.0.2-windows-win32.exe
|
||||
URLDownload = http://cz.binaries.openttd.org/openttd/binaries/releases/1.0.4/openttd-1.0.4-windows-win32.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
[Section]
|
||||
Name = Opera
|
||||
Version = 10.60
|
||||
Version = 10.62
|
||||
Licence = Freeware
|
||||
Description = The popular Opera Browser with many advanced features and including a Mail and BitTorrent client.
|
||||
Size = 12.7M
|
||||
Category = 5
|
||||
URLSite = http://www.opera.com/
|
||||
URLDownload = http://get4.opera.com/pub/opera/win/1060/int/Opera_1060_int_Setup.exe
|
||||
URLDownload = http://get4.opera.com/pub/opera/win/1062/int/Opera_1062_int_Setup.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
[Section]
|
||||
Name = Python
|
||||
Version = 2.6.5
|
||||
Version = 2.6.6
|
||||
Licence = GPL/LGPL
|
||||
Description = A remarkably powerful dynamic programming language.
|
||||
Size = 14MB
|
||||
Size = 14.5MB
|
||||
Category = 7
|
||||
URLSite = http://www.python.org/
|
||||
URLDownload = http://www.python.org/ftp/python/2.6.5/python-2.6.5.msi
|
||||
URLDownload = http://www.python.org/ftp/python/2.6.6/python-2.6.6.msi
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
||||
@@ -8,7 +8,7 @@ Description = ReMooD is a source port of Doom Legacy. It aims to provide the cla
|
||||
Size = 1.2M
|
||||
Category = 4
|
||||
URLSite = http://remood.sourceforge.net/
|
||||
URLDownload = http://ovh.dl.sourceforge.net/sourceforge/remood/remoodsetup-win32_08a.exe
|
||||
URLDownload = http://ovh.dl.sourceforge.net/project/remood/ReMooD/0.8a/remoodsetup-win32_08a.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
||||
@@ -8,7 +8,7 @@ Description = Allows you to build the ReactOS Source. For more instructions see
|
||||
Size = 13.8MB
|
||||
Category = 7
|
||||
URLSite = http://reactos.org/wiki/Build_Environment
|
||||
URLDownload = http://ovh.dl.sourceforge.net/sourceforge/reactos/RosBE-1.5.1.1.exe
|
||||
URLDownload = http://ovh.dl.sourceforge.net/project/reactos/RosBE-Windows/i386/1.5.1/RosBE-1.5.1.1.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
||||
@@ -8,7 +8,7 @@ Description = Allows you to build the ReactOS ARM Source. For more instructions
|
||||
Size = 11.1MB
|
||||
Category = 7
|
||||
URLSite = http://reactos.org/wiki/Build_Environment/
|
||||
URLDownload = http://ovh.dl.sourceforge.net/sourceforge/reactos/RosBE-ARM-1.0.exe
|
||||
URLDownload = http://ovh.dl.sourceforge.net/project/reactos/RosBE-Windows/arm/1.0/RosBE-ARM-1.0.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
[Section]
|
||||
Name = SciTE
|
||||
Version = 2.12
|
||||
Version = 2.21
|
||||
Licence = Freeware
|
||||
Description = SciTE is a SCIntilla based Text Editor. Originally built to demonstrate Scintilla, it has grown to be a generally useful editor with facilities for building and running programs.
|
||||
Size = 0.6M
|
||||
Category = 7
|
||||
URLSite = http://www.scintilla.org/
|
||||
URLDownload = http://ovh.dl.sourceforge.net/sourceforge/scintilla/Sc212.exe
|
||||
URLDownload = http://kent.dl.sourceforge.net/project/scintilla/SciTE/2.21/Sc221.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
||||
@@ -2,36 +2,31 @@
|
||||
|
||||
[Section]
|
||||
Name = Mozilla SeaMonkey
|
||||
Version = 2.0.6
|
||||
Version = 2.0.8
|
||||
Licence = MPL/GPL/LGPL
|
||||
Description = Mozilla Suite is alive. This is the one and only Browser, Mail, Chat, and Composer bundle you will ever need.
|
||||
Size = 10.1MB
|
||||
Category = 5
|
||||
URLSite = http://www.seamonkey-project.org/
|
||||
URLDownload = http://mozilla.mirror.ac.za/seamonkey/releases/2.0.6/win32/en-US/SeaMonkey%20Setup%202.0.6.exe
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/seamonkey/releases/2.0.8/win32/en-US/SeaMonkey%20Setup%202.0.8.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
Description = Mozilla Suite lebt. Dies ist das einzige Browser-, Mail-, Chat- and Composerwerkzeug-Bundle welches Sie benötigen.
|
||||
Size = 10.0MB
|
||||
URLDownload = http://mozilla.mirror.ac.za/seamonkey/releases/2.0.6/win32/de/SeaMonkey%20Setup%202.0.6.exe
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/seamonkey/releases/2.0.8/win32/de/SeaMonkey%20Setup%202.0.8.exe
|
||||
|
||||
[Section.040a]
|
||||
Description = La suite de Mozilla está viva. Es el primero y único navegador web, gestor de correo, lector de noticias, Chat y editor HTML que necesitarás.
|
||||
Size = 10.0MB
|
||||
URLDownload = http://mozilla.mirror.ac.za/seamonkey/releases/2.0.6/win32/es-ES/SeaMonkey%20Setup%202.0.6.exe
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/seamonkey/releases/2.0.8/win32/es-ES/SeaMonkey%20Setup%202.0.8.exe
|
||||
|
||||
[Section.0415]
|
||||
Description = Pakiet Mozilla żyje. W zestawie: przeglądarka, klient poczty, IRC oraz Edytor HTML - wszystko, czego potrzebujesz.
|
||||
Size = 10.8MB
|
||||
URLDownload = http://mozilla.mirror.ac.za/seamonkey/releases/2.0.6/win32/pl/SeaMonkey%20Setup%202.0.6.exe
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/seamonkey/releases/2.0.8/win32/pl/SeaMonkey%20Setup%202.0.8.exe
|
||||
|
||||
[Section.0419]
|
||||
Description = Продолжение Mozilla Suite. Включает браузер, почтовый клиент, IRC-клиент и HTML-редактор.
|
||||
Size = 10.4MB
|
||||
URLDownload = http://mozilla.mirror.ac.za/seamonkey/releases/2.0.6/win32/ru/SeaMonkey%20Setup%202.0.6.exe
|
||||
|
||||
[Section.0422]
|
||||
Description = Mozilla Suite повернувся. Пакет містить в собі браузер, поштовий клієнт, IRC-клієнт та HTML-редактор.
|
||||
Size = 10.4MB
|
||||
URLDownload = http://mozilla.mirror.ac.za/seamonkey/releases/2.0.6/win32/ru/SeaMonkey%20Setup%202.0.6.exe
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/seamonkey/releases/2.0.8/win32/ru/SeaMonkey%20Setup%202.0.8.exe
|
||||
|
||||
@@ -8,7 +8,7 @@ Description = SMPlayer.
|
||||
Size = 14.2MB
|
||||
Category = 1
|
||||
URLSite = http://smplayer.sourceforge.net/
|
||||
URLDownload = http://downloads.sourceforge.net/project/smplayer/SMPlayer/0.6.9/smplayer-0.6.9-win32.exe
|
||||
URLDownload = http://ovh.dl.sourceforge.net/project/smplayer/SMPlayer/0.6.9/smplayer-0.6.9-win32.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
||||
@@ -2,41 +2,41 @@
|
||||
|
||||
[Section]
|
||||
Name = Mozilla Thunderbird
|
||||
Version = 3.1.1
|
||||
Version = 3.1.4
|
||||
Licence = MPL/GPL/LGPL
|
||||
Description = The most popular and one of the best free Mail Clients out there.
|
||||
Size = 9.0M
|
||||
Category = 5
|
||||
URLSite = http://www.mozilla-europe.org/en/products/thunderbird/
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.1.1/win32/en-US/Thunderbird%20Setup%203.1.1.exe
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.1.4/win32/en-US/Thunderbird%20Setup%203.1.4.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
Description = Der populärste und einer der besten freien Mail-Clients.
|
||||
Size = 8.9M
|
||||
Size = 8.8M
|
||||
URLSite = http://www.mozilla-europe.org/de/products/thunderbird/
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.1.1/win32/de/Thunderbird%20Setup%203.1.1.exe
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.1.4/win32/de/Thunderbird%20Setup%203.1.4.exe
|
||||
|
||||
[Section.040a]
|
||||
Description = El más popular y uno de los mejores clientes mail que hay.
|
||||
Size = 8.8M
|
||||
URLSite = http://www.mozilla-europe.org/es/products/thunderbird/
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.1.1/win32/es-ES/Thunderbird%20Setup%203.1.1.exe
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.1.4/win32/es-ES/Thunderbird%20Setup%203.1.4.exe
|
||||
|
||||
[Section.0415]
|
||||
Description = Najpopularniejszy i jeden z najlepszych darmowych klientów poczty.
|
||||
Size = 9.7M
|
||||
URLSite = http://www.mozilla-europe.org/pl/products/thunderbird/
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.1.1/win32/pl/Thunderbird%20Setup%203.1.1.exe
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.1.4/win32/pl/Thunderbird%20Setup%203.1.4.exe
|
||||
|
||||
[Section.0419]
|
||||
Description = Один из самых популярных и лучших бесплатных почтовых клиентов.
|
||||
Size = 9.2M
|
||||
URLSite = http://www.mozilla-europe.org/ru/products/thunderbird/
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.1.1/win32/ru/Thunderbird%20Setup%203.1.1.exe
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.1.4/win32/ru/Thunderbird%20Setup%203.1.4.exe
|
||||
|
||||
[Section.0422]
|
||||
Description = Найпопулярніший та один з кращих поштових клієнтів.
|
||||
Size = 9.2M
|
||||
URLSite = http://www.mozillamessaging.com/uk/thunderbird/
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.1.1/win32/uk/Thunderbird%20Setup%203.1.1.exe
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.1.4/win32/uk/Thunderbird%20Setup%203.1.4.exe
|
||||
|
||||
@@ -8,7 +8,7 @@ Description = An Open Source bitmap graphics editor geared towards young childre
|
||||
Size = 10MB
|
||||
Category = 3
|
||||
URLSite = http://tuxpaint.org/
|
||||
URLDownload = http://ovh.dl.sourceforge.net/sourceforge/tuxpaint/tuxpaint-0.9.21-win32-installer.exe
|
||||
URLDownload = http://ovh.dl.sourceforge.net/project/tuxpaint/tuxpaint/0.9.21/tuxpaint-0.9.21-win32-installer.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
[Section]
|
||||
Name = µTorrent
|
||||
Version = 2.0.3
|
||||
Version = 2.0.4
|
||||
Licence = Freeware for non-commercial uses
|
||||
Description = Small and fast BitTorrent Client.
|
||||
Size = 320K
|
||||
Category = 5
|
||||
URLSite = http://www.utorrent.com/
|
||||
URLDownload = http://download.utorrent.com/2.0.3/utorrent.exe
|
||||
URLDownload = http://download.utorrent.com/2.0.4/utorrent.exe
|
||||
CDPath = none
|
||||
|
||||
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
[Section]
|
||||
Name = VLC media player
|
||||
Version = 1.1.1
|
||||
Version = 1.1.4
|
||||
Licence = GPL
|
||||
Description = A media player.
|
||||
Size = 18.6MB
|
||||
Size = 18.7MB
|
||||
Category = 1
|
||||
URLSite = http://www.videolan.org/vlc/
|
||||
URLDownload = http://ignum.dl.sourceforge.net/project/vlc/1.1.1/win32/vlc-1.1.1-win32.exe
|
||||
URLDownload = http://ignum.dl.sourceforge.net/project/vlc/1.1.4/win32/vlc-1.1.4-win32.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
||||
@@ -227,8 +227,8 @@ static void SuggestKeys(HKEY hRootKey, LPCTSTR pszKeyPath, LPTSTR pszSuggestions
|
||||
bFound = FALSE;
|
||||
|
||||
/* Check default key */
|
||||
if (RegQueryStringValue(hRootKey, pszKeyPath, NULL,
|
||||
szBuffer, sizeof(szBuffer) / sizeof(szBuffer[0])) == ERROR_SUCCESS)
|
||||
if (QueryStringValue(hRootKey, pszKeyPath, NULL,
|
||||
szBuffer, COUNT_OF(szBuffer)) == ERROR_SUCCESS)
|
||||
{
|
||||
/* Sanity check this key; it cannot be empty, nor can it be a
|
||||
* loop back */
|
||||
@@ -259,8 +259,8 @@ static void SuggestKeys(HKEY hRootKey, LPCTSTR pszKeyPath, LPTSTR pszSuggestions
|
||||
/* Check CLSID key */
|
||||
if (RegOpenKey(hRootKey, pszKeyPath, &hSubKey) == ERROR_SUCCESS)
|
||||
{
|
||||
if (RegQueryStringValue(hSubKey, TEXT("CLSID"), NULL,
|
||||
szBuffer, sizeof(szBuffer) / sizeof(szBuffer[0])) == ERROR_SUCCESS)
|
||||
if (QueryStringValue(hSubKey, TEXT("CLSID"), NULL, szBuffer,
|
||||
COUNT_OF(szBuffer)) == ERROR_SUCCESS)
|
||||
{
|
||||
lstrcpyn(pszSuggestions, TEXT("HKCR\\CLSID\\"), (int) iSuggestionsLength);
|
||||
i = _tcslen(pszSuggestions);
|
||||
@@ -535,8 +535,8 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||
}
|
||||
else
|
||||
{
|
||||
if (RegRenameKey(hRootKey, keyPath, ptvdi->item.pszText) != ERROR_SUCCESS)
|
||||
lResult = FALSE;
|
||||
if (RenameKey(hRootKey, keyPath, ptvdi->item.pszText) != ERROR_SUCCESS)
|
||||
lResult = FALSE;
|
||||
}
|
||||
return lResult;
|
||||
}
|
||||
|
||||
@@ -702,6 +702,91 @@ done:
|
||||
return result;
|
||||
}
|
||||
|
||||
static LONG CopyKey(HKEY hDestKey, LPCTSTR lpDestSubKey, HKEY hSrcKey, LPCTSTR lpSrcSubKey)
|
||||
{
|
||||
LONG lResult;
|
||||
DWORD dwDisposition;
|
||||
HKEY hDestSubKey = NULL;
|
||||
HKEY hSrcSubKey = NULL;
|
||||
DWORD dwIndex, dwType, cbName, cbData;
|
||||
TCHAR szSubKey[256];
|
||||
TCHAR szValueName[256];
|
||||
BYTE szValueData[512];
|
||||
|
||||
FILETIME ft;
|
||||
|
||||
/* open the source subkey, if specified */
|
||||
if (lpSrcSubKey)
|
||||
{
|
||||
lResult = RegOpenKeyEx(hSrcKey, lpSrcSubKey, 0, KEY_ALL_ACCESS, &hSrcSubKey);
|
||||
if (lResult)
|
||||
goto done;
|
||||
hSrcKey = hSrcSubKey;
|
||||
}
|
||||
|
||||
/* create the destination subkey */
|
||||
lResult = RegCreateKeyEx(hDestKey, lpDestSubKey, 0, NULL, 0, KEY_WRITE, NULL,
|
||||
&hDestSubKey, &dwDisposition);
|
||||
if (lResult)
|
||||
goto done;
|
||||
|
||||
/* copy all subkeys */
|
||||
dwIndex = 0;
|
||||
do
|
||||
{
|
||||
cbName = sizeof(szSubKey) / sizeof(szSubKey[0]);
|
||||
lResult = RegEnumKeyEx(hSrcKey, dwIndex++, szSubKey, &cbName, NULL, NULL, NULL, &ft);
|
||||
if (lResult == ERROR_SUCCESS)
|
||||
{
|
||||
lResult = CopyKey(hDestSubKey, szSubKey, hSrcKey, szSubKey);
|
||||
if (lResult)
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
while(lResult == ERROR_SUCCESS);
|
||||
|
||||
/* copy all subvalues */
|
||||
dwIndex = 0;
|
||||
do
|
||||
{
|
||||
cbName = sizeof(szValueName) / sizeof(szValueName[0]);
|
||||
cbData = sizeof(szValueData) / sizeof(szValueData[0]);
|
||||
lResult = RegEnumValue(hSrcKey, dwIndex++, szValueName, &cbName, NULL, &dwType, szValueData, &cbData);
|
||||
if (lResult == ERROR_SUCCESS)
|
||||
{
|
||||
lResult = RegSetValueEx(hDestSubKey, szValueName, 0, dwType, szValueData, cbData);
|
||||
if (lResult)
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
while(lResult == ERROR_SUCCESS);
|
||||
|
||||
lResult = ERROR_SUCCESS;
|
||||
|
||||
done:
|
||||
if (hSrcSubKey)
|
||||
RegCloseKey(hSrcSubKey);
|
||||
if (hDestSubKey)
|
||||
RegCloseKey(hDestSubKey);
|
||||
if (lResult != ERROR_SUCCESS)
|
||||
SHDeleteKey(hDestKey, lpDestSubKey);
|
||||
return lResult;
|
||||
}
|
||||
|
||||
static LONG MoveKey(HKEY hDestKey, LPCTSTR lpDestSubKey, HKEY hSrcKey, LPCTSTR lpSrcSubKey)
|
||||
{
|
||||
LONG lResult;
|
||||
|
||||
if (!lpSrcSubKey)
|
||||
return ERROR_INVALID_FUNCTION;
|
||||
|
||||
lResult = CopyKey(hDestKey, lpDestSubKey, hSrcKey, lpSrcSubKey);
|
||||
if (lResult == ERROR_SUCCESS)
|
||||
SHDeleteKey(hSrcKey, lpSrcSubKey);
|
||||
|
||||
return lResult;
|
||||
}
|
||||
|
||||
BOOL DeleteKey(HWND hwnd, HKEY hKeyRoot, LPCTSTR keyPath)
|
||||
{
|
||||
TCHAR msg[128], caption[128];
|
||||
@@ -732,3 +817,128 @@ done:
|
||||
RegCloseKey(hKey);
|
||||
return result;
|
||||
}
|
||||
|
||||
LONG RenameKey(HKEY hKey, LPCTSTR lpSubKey, LPCTSTR lpNewName)
|
||||
{
|
||||
LPCTSTR s;
|
||||
LPTSTR lpNewSubKey = NULL;
|
||||
LONG Ret = 0;
|
||||
|
||||
if (!lpSubKey)
|
||||
return Ret;
|
||||
|
||||
s = _tcsrchr(lpSubKey, _T('\\'));
|
||||
if (s)
|
||||
{
|
||||
s++;
|
||||
lpNewSubKey = (LPTSTR) HeapAlloc(GetProcessHeap(), 0, (s - lpSubKey + _tcslen(lpNewName) + 1) * sizeof(TCHAR));
|
||||
if (lpNewSubKey != NULL)
|
||||
{
|
||||
memcpy(lpNewSubKey, lpSubKey, (s - lpSubKey) * sizeof(TCHAR));
|
||||
lstrcpy(lpNewSubKey + (s - lpSubKey), lpNewName);
|
||||
lpNewName = lpNewSubKey;
|
||||
}
|
||||
else
|
||||
return ERROR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
Ret = MoveKey(hKey, lpNewName, hKey, lpSubKey);
|
||||
|
||||
if (lpNewSubKey)
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, lpNewSubKey);
|
||||
}
|
||||
return Ret;
|
||||
}
|
||||
|
||||
LONG RenameValue(HKEY hKey, LPCTSTR lpSubKey, LPCTSTR lpDestValue, LPCTSTR lpSrcValue)
|
||||
{
|
||||
LONG lResult;
|
||||
HKEY hSubKey = NULL;
|
||||
DWORD dwType, cbData;
|
||||
BYTE data[512];
|
||||
|
||||
if (lpSubKey)
|
||||
{
|
||||
lResult = RegOpenKey(hKey, lpSubKey, &hSubKey);
|
||||
if (lResult != ERROR_SUCCESS)
|
||||
goto done;
|
||||
hKey = hSubKey;
|
||||
}
|
||||
|
||||
cbData = sizeof(data);
|
||||
lResult = RegQueryValueEx(hKey, lpSrcValue, NULL, &dwType, data, &cbData);
|
||||
if (lResult != ERROR_SUCCESS)
|
||||
goto done;
|
||||
|
||||
lResult = RegSetValueEx(hKey, lpDestValue, 0, dwType, data, cbData);
|
||||
if (lResult != ERROR_SUCCESS)
|
||||
goto done;
|
||||
|
||||
RegDeleteValue(hKey, lpSrcValue);
|
||||
|
||||
done:
|
||||
if (hSubKey)
|
||||
RegCloseKey(hSubKey);
|
||||
return lResult;
|
||||
}
|
||||
|
||||
LONG QueryStringValue(HKEY hKey, LPCTSTR lpSubKey, LPCTSTR lpValueName, LPTSTR pszBuffer, DWORD dwBufferLen)
|
||||
{
|
||||
LONG lResult;
|
||||
HKEY hSubKey = NULL;
|
||||
DWORD cbData, dwType;
|
||||
|
||||
if (lpSubKey)
|
||||
{
|
||||
lResult = RegOpenKey(hKey, lpSubKey, &hSubKey);
|
||||
if (lResult != ERROR_SUCCESS)
|
||||
goto done;
|
||||
hKey = hSubKey;
|
||||
}
|
||||
|
||||
cbData = (dwBufferLen - 1) * sizeof(*pszBuffer);
|
||||
lResult = RegQueryValueEx(hKey, lpValueName, NULL, &dwType, (LPBYTE) pszBuffer, &cbData);
|
||||
if (lResult != ERROR_SUCCESS)
|
||||
goto done;
|
||||
if (dwType != REG_SZ)
|
||||
{
|
||||
lResult = -1;
|
||||
goto done;
|
||||
}
|
||||
|
||||
pszBuffer[cbData / sizeof(*pszBuffer)] = _T('\0');
|
||||
|
||||
done:
|
||||
if (lResult != ERROR_SUCCESS)
|
||||
pszBuffer[0] = _T('\0');
|
||||
if (hSubKey)
|
||||
RegCloseKey(hSubKey);
|
||||
return lResult;
|
||||
}
|
||||
|
||||
BOOL GetKeyName(LPTSTR pszDest, size_t iDestLength, HKEY hRootKey, LPCTSTR lpSubKey)
|
||||
{
|
||||
LPCTSTR pszRootKey;
|
||||
|
||||
if (hRootKey == HKEY_CLASSES_ROOT)
|
||||
pszRootKey = TEXT("HKEY_CLASSES_ROOT");
|
||||
else if (hRootKey == HKEY_CURRENT_USER)
|
||||
pszRootKey = TEXT("HKEY_CURRENT_USER");
|
||||
else if (hRootKey == HKEY_LOCAL_MACHINE)
|
||||
pszRootKey = TEXT("HKEY_LOCAL_MACHINE");
|
||||
else if (hRootKey == HKEY_USERS)
|
||||
pszRootKey = TEXT("HKEY_USERS");
|
||||
else if (hRootKey == HKEY_CURRENT_CONFIG)
|
||||
pszRootKey = TEXT("HKEY_CURRENT_CONFIG");
|
||||
else if (hRootKey == HKEY_DYN_DATA)
|
||||
pszRootKey = TEXT("HKEY_DYN_DATA");
|
||||
else
|
||||
return FALSE;
|
||||
|
||||
if (lpSubKey[0])
|
||||
_sntprintf(pszDest, iDestLength, TEXT("%s\\%s"), pszRootKey, lpSubKey);
|
||||
else
|
||||
_sntprintf(pszDest, iDestLength, TEXT("%s"), pszRootKey);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -19,6 +19,12 @@
|
||||
|
||||
#include <regedit.h>
|
||||
|
||||
#define RSF_WHOLESTRING 0x00000001
|
||||
#define RSF_LOOKATKEYS 0x00000002
|
||||
#define RSF_LOOKATVALUES 0x00000004
|
||||
#define RSF_LOOKATDATA 0x00000008
|
||||
#define RSF_MATCHCASE 0x00010000
|
||||
|
||||
static TCHAR s_szFindWhat[256];
|
||||
static const TCHAR s_szFindFlags[] = _T("FindFlags");
|
||||
static const TCHAR s_szFindFlagsR[] = _T("FindFlagsReactOS");
|
||||
@@ -677,7 +683,7 @@ BOOL FindNext(HWND hWnd)
|
||||
|
||||
if (fSuccess)
|
||||
{
|
||||
RegKeyGetName(szFullKey, COUNT_OF(szFullKey), hKeyRoot, pszFoundSubKey);
|
||||
GetKeyName(szFullKey, COUNT_OF(szFullKey), hKeyRoot, pszFoundSubKey);
|
||||
SelectNode(g_pChildWnd->hTreeWnd, szFullKey);
|
||||
SetValueName(g_pChildWnd->hListWnd, pszFoundValueName);
|
||||
free(pszFoundSubKey);
|
||||
|
||||
@@ -95,7 +95,7 @@ static void OnInitMenu(HWND hWnd)
|
||||
dwIndex = 0;
|
||||
do
|
||||
{
|
||||
cbValueName = sizeof(szValueName) / sizeof(szValueName[0]);
|
||||
cbValueName = COUNT_OF(szValueName);
|
||||
cbValueData = sizeof(abValueData);
|
||||
lResult = RegEnumValue(hKey, dwIndex, szValueName, &cbValueName, NULL, &dwType, abValueData, &cbValueData);
|
||||
if ((lResult == ERROR_SUCCESS) && (dwType == REG_SZ))
|
||||
@@ -278,6 +278,7 @@ static BOOL InitOpenFileName(HWND hWnd, OPENFILENAME* pofn)
|
||||
pofn->lpstrFileTitle = FileTitleBuffer;
|
||||
pofn->nMaxFileTitle = _MAX_PATH;
|
||||
pofn->Flags = OFN_HIDEREADONLY;
|
||||
pofn->lpstrDefExt = TEXT("reg");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -285,38 +286,33 @@ static BOOL ImportRegistryFile(HWND hWnd)
|
||||
{
|
||||
OPENFILENAME ofn;
|
||||
TCHAR Caption[128];
|
||||
LPCTSTR pszKeyPath;
|
||||
HKEY hRootKey;
|
||||
|
||||
InitOpenFileName(hWnd, &ofn);
|
||||
LoadString(hInst, IDS_IMPORT_REG_FILE, Caption, sizeof(Caption)/sizeof(TCHAR));
|
||||
LoadString(hInst, IDS_IMPORT_REG_FILE, Caption, COUNT_OF(Caption));
|
||||
ofn.lpstrTitle = Caption;
|
||||
ofn.Flags |= OFN_ENABLESIZING;
|
||||
/* ofn.lCustData = ;*/
|
||||
if (GetOpenFileName(&ofn)) {
|
||||
/* FIXME - convert to ascii */
|
||||
if (!import_registry_file(ofn.lpstrFile)) {
|
||||
/*printf("Can't open file \"%s\"\n", ofn.lpstrFile);*/
|
||||
FILE *fp = _wfopen(ofn.lpstrFile, L"r");
|
||||
if (fp == NULL || !import_registry_file(fp)) {
|
||||
LPSTR p = GetMultiByteString(ofn.lpstrFile);
|
||||
fprintf(stderr, "Can't open file \"%s\"\n", p);
|
||||
HeapFree(GetProcessHeap(), 0, p);
|
||||
if (fp != NULL)
|
||||
fclose(fp);
|
||||
return FALSE;
|
||||
}
|
||||
#if 0
|
||||
get_file_name(&s, filename, MAX_PATH);
|
||||
if (!filename[0]) {
|
||||
printf("No file name is specified\n%s", usage);
|
||||
return FALSE;
|
||||
/*exit(1);*/
|
||||
}
|
||||
while (filename[0]) {
|
||||
if (!import_registry_file(filename)) {
|
||||
perror("");
|
||||
printf("Can't open file \"%s\"\n", filename);
|
||||
return FALSE;
|
||||
/*exit(1);*/
|
||||
}
|
||||
get_file_name(&s, filename, MAX_PATH);
|
||||
}
|
||||
#endif
|
||||
|
||||
fclose(fp);
|
||||
} else {
|
||||
CheckCommDlgError(hWnd);
|
||||
}
|
||||
|
||||
RefreshTreeView(g_pChildWnd->hTreeWnd);
|
||||
pszKeyPath = GetItemPath(g_pChildWnd->hTreeWnd, 0, &hRootKey);
|
||||
RefreshListView(g_pChildWnd->hListWnd, hRootKey, pszKeyPath);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -384,8 +380,7 @@ BOOL ExportRegistryFile(HWND hWnd)
|
||||
|
||||
/* Figure out which key path we are exporting */
|
||||
pszKeyPath = GetItemPath(g_pChildWnd->hTreeWnd, 0, &hKeyRoot);
|
||||
RegKeyGetName(ExportKeyPath, sizeof(ExportKeyPath) / sizeof(ExportKeyPath[0]),
|
||||
hKeyRoot, pszKeyPath);
|
||||
GetKeyName(ExportKeyPath, COUNT_OF(ExportKeyPath), hKeyRoot, pszKeyPath);
|
||||
|
||||
InitOpenFileName(hWnd, &ofn);
|
||||
LoadString(hInst, IDS_EXPORT_REG_FILE, Caption, sizeof(Caption)/sizeof(TCHAR));
|
||||
@@ -396,44 +391,24 @@ BOOL ExportRegistryFile(HWND hWnd)
|
||||
{
|
||||
ofn.lCustData = (LPARAM) ExportKeyPath;
|
||||
}
|
||||
ofn.Flags = OFN_ENABLETEMPLATE | OFN_EXPLORER | OFN_ENABLEHOOK;
|
||||
ofn.Flags = OFN_ENABLETEMPLATE | OFN_EXPLORER | OFN_ENABLEHOOK | OFN_OVERWRITEPROMPT;
|
||||
ofn.lpfnHook = ExportRegistryFile_OFNHookProc;
|
||||
ofn.lpTemplateName = MAKEINTRESOURCE(IDD_EXPORTRANGE);
|
||||
if (GetSaveFileName(&ofn)) {
|
||||
BOOL result;
|
||||
LPSTR pszExportKeyPath;
|
||||
#ifdef UNICODE
|
||||
CHAR buffer[_MAX_PATH];
|
||||
|
||||
WideCharToMultiByte(CP_ACP, 0, ExportKeyPath, -1, buffer, sizeof(buffer), NULL, NULL);
|
||||
pszExportKeyPath = buffer;
|
||||
#else
|
||||
pszExportKeyPath = ExportKeyPath;
|
||||
#endif
|
||||
|
||||
result = export_registry_key(ofn.lpstrFile, pszExportKeyPath);
|
||||
DWORD format;
|
||||
|
||||
if (ofn.nFilterIndex == 1)
|
||||
format = REG_FORMAT_5;
|
||||
else
|
||||
format = REG_FORMAT_4;
|
||||
result = export_registry_key(ofn.lpstrFile, ExportKeyPath, format);
|
||||
if (!result) {
|
||||
/*printf("Can't open file \"%s\"\n", ofn.lpstrFile);*/
|
||||
LPSTR p = GetMultiByteString(ofn.lpstrFile);
|
||||
fprintf(stderr, "Can't open file \"%s\"\n", p);
|
||||
HeapFree(GetProcessHeap(), 0, p);
|
||||
return FALSE;
|
||||
}
|
||||
#if 0
|
||||
TCHAR filename[MAX_PATH];
|
||||
filename[0] = '\0';
|
||||
get_file_name(&s, filename, MAX_PATH);
|
||||
if (!filename[0]) {
|
||||
printf("No file name is specified\n%s", usage);
|
||||
return FALSE;
|
||||
/*exit(1);*/
|
||||
}
|
||||
if (s[0]) {
|
||||
TCHAR reg_key_name[KEY_MAX_LEN];
|
||||
get_file_name(&s, reg_key_name, KEY_MAX_LEN);
|
||||
export_registry_key((CHAR)filename, reg_key_name);
|
||||
} else {
|
||||
export_registry_key(filename, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
} else {
|
||||
CheckCommDlgError(hWnd);
|
||||
}
|
||||
@@ -543,10 +518,10 @@ BOOL CopyKeyName(HWND hWnd, HKEY hRootKey, LPCTSTR keyName)
|
||||
if (!EmptyClipboard())
|
||||
goto done;
|
||||
|
||||
if (!RegKeyGetName(szBuffer, sizeof(szBuffer) / sizeof(szBuffer[0]), hRootKey, keyName))
|
||||
if (!GetKeyName(szBuffer, COUNT_OF(szBuffer), hRootKey, keyName))
|
||||
goto done;
|
||||
|
||||
hGlobal = GlobalAlloc(GMEM_MOVEABLE, (_tcslen(szBuffer) + 1) * sizeof(TCHAR));
|
||||
hGlobal = GlobalAlloc(GMEM_MOVEABLE, (lstrlen(szBuffer) + 1) * sizeof(TCHAR));
|
||||
if (!hGlobal)
|
||||
goto done;
|
||||
|
||||
@@ -578,21 +553,18 @@ static BOOL CreateNewValue(HKEY hRootKey, LPCTSTR pszKeyPath, DWORD dwType)
|
||||
HKEY hKey;
|
||||
LVFINDINFO lvfi;
|
||||
|
||||
if (RegOpenKey(hRootKey, pszKeyPath, &hKey) != ERROR_SUCCESS)
|
||||
if (RegOpenKeyEx(hRootKey, pszKeyPath, 0, KEY_QUERY_VALUE | KEY_SET_VALUE,
|
||||
&hKey) != ERROR_SUCCESS)
|
||||
return FALSE;
|
||||
|
||||
LoadString(hInst, IDS_NEW_VALUE, szNewValueFormat, sizeof(szNewValueFormat)
|
||||
/ sizeof(szNewValueFormat[0]));
|
||||
LoadString(hInst, IDS_NEW_VALUE, szNewValueFormat, COUNT_OF(szNewValueFormat));
|
||||
|
||||
do
|
||||
{
|
||||
_sntprintf(szNewValue, sizeof(szNewValue) / sizeof(szNewValue[0]),
|
||||
szNewValueFormat, iIndex++);
|
||||
|
||||
wsprintf(szNewValue, szNewValueFormat, iIndex++);
|
||||
cbData = sizeof(data);
|
||||
lResult = RegQueryValueEx(hKey, szNewValue, NULL, &dwExistingType, data, &cbData);
|
||||
}
|
||||
while(lResult == ERROR_SUCCESS);
|
||||
} while(lResult == ERROR_SUCCESS);
|
||||
|
||||
switch(dwType) {
|
||||
case REG_DWORD:
|
||||
@@ -614,8 +586,11 @@ static BOOL CreateNewValue(HKEY hRootKey, LPCTSTR pszKeyPath, DWORD dwType)
|
||||
}
|
||||
memset(data, 0, cbData);
|
||||
lResult = RegSetValueEx(hKey, szNewValue, 0, dwType, data, cbData);
|
||||
RegCloseKey(hKey);
|
||||
if (lResult != ERROR_SUCCESS)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
RefreshListView(g_pChildWnd->hListWnd, hRootKey, pszKeyPath);
|
||||
|
||||
@@ -887,7 +862,7 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (GetFocus() == g_pChildWnd->hTreeWnd)
|
||||
else if (GetFocus() == g_pChildWnd->hTreeWnd)
|
||||
{
|
||||
/* Get focused entry of treeview (if any) */
|
||||
HTREEITEM hItem = TreeView_GetSelection(g_pChildWnd->hTreeWnd);
|
||||
@@ -930,8 +905,8 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
}
|
||||
}
|
||||
} else
|
||||
if (GetFocus() == g_pChildWnd->hTreeWnd)
|
||||
}
|
||||
else if (GetFocus() == g_pChildWnd->hTreeWnd)
|
||||
{
|
||||
if (keyPath == 0 || *keyPath == 0)
|
||||
{
|
||||
@@ -943,7 +918,8 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
RefreshTreeView(g_pChildWnd->hTreeWnd);
|
||||
}
|
||||
}
|
||||
break;
|
||||
break;
|
||||
}
|
||||
case ID_EDIT_NEW_STRINGVALUE:
|
||||
CreateNewValue(hKeyRoot, keyPath, REG_SZ);
|
||||
break;
|
||||
@@ -953,14 +929,12 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
case ID_EDIT_NEW_DWORDVALUE:
|
||||
CreateNewValue(hKeyRoot, keyPath, REG_DWORD);
|
||||
break;
|
||||
case ID_EDIT_NEW_MULTISTRINGVALUE:
|
||||
case ID_EDIT_NEW_MULTISTRINGVALUE:
|
||||
CreateNewValue(hKeyRoot, keyPath, REG_MULTI_SZ);
|
||||
break;
|
||||
case ID_EDIT_NEW_EXPANDABLESTRINGVALUE:
|
||||
case ID_EDIT_NEW_EXPANDABLESTRINGVALUE:
|
||||
CreateNewValue(hKeyRoot, keyPath, REG_EXPAND_SZ);
|
||||
break;
|
||||
|
||||
}
|
||||
case ID_EDIT_FIND:
|
||||
FindDialog(hWnd);
|
||||
break;
|
||||
|
||||
@@ -167,12 +167,12 @@ BEGIN
|
||||
END
|
||||
POPUP ""
|
||||
BEGIN
|
||||
MENUITEM "C&ut", ID_HEXEDIT_CUT
|
||||
MENUITEM "&Copy", ID_HEXEDIT_COPY
|
||||
MENUITEM "&Paste", ID_HEXEDIT_PASTE
|
||||
MENUITEM "&Delete", ID_HEXEDIT_DELETE
|
||||
MENUITEM "&Copia", ID_HEXEDIT_COPY
|
||||
MENUITEM "&Incolla", ID_HEXEDIT_PASTE
|
||||
MENUITEM "&Taglia", ID_HEXEDIT_CUT
|
||||
MENUITEM "&Cancella", ID_HEXEDIT_DELETE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Select &All", ID_HEXEDIT_SELECT_ALL
|
||||
MENUITEM "&Seleziona tutto", ID_HEXEDIT_SELECT_ALL
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* TRANSLATOR : Mário Kaèmár /Mario Kacmar/ aka Kario ([email protected])
|
||||
* DATE OF TR.: 07-07-2008
|
||||
* LAST CHANGE: 28-07-2008
|
||||
* LAST CHANGE: 29-07-2010
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT
|
||||
@@ -68,29 +68,29 @@ BEGIN
|
||||
MENUITEM "Rozšírit&e¾ná re�azcová hodnota", ID_EDIT_NEW_EXPANDABLESTRINGVALUE
|
||||
END
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Oprávnenia...", ID_EDIT_PERMISSIONS
|
||||
MENUITEM "&Oprávnenia...", ID_EDIT_PERMISSIONS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Vymaza�\tDel", ID_EDIT_DELETE
|
||||
MENUITEM "&Premenova�", ID_EDIT_RENAME
|
||||
MENUITEM "&Vymaza�\tDel", ID_EDIT_DELETE
|
||||
MENUITEM "&Premenova�", ID_EDIT_RENAME
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Kopírova� názov k¾úèa", ID_EDIT_COPYKEYNAME
|
||||
MENUITEM "&Kopírova� názov k¾úèa", ID_EDIT_COPYKEYNAME
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&H¾ada�\tCtrl+F", ID_EDIT_FIND
|
||||
MENUITEM "H¾a&da� ïalej\tF3", ID_EDIT_FINDNEXT
|
||||
MENUITEM "&H¾ada�\tCtrl+F", ID_EDIT_FIND
|
||||
MENUITEM "H¾a&da� ïalej\tF3", ID_EDIT_FINDNEXT
|
||||
END
|
||||
POPUP "&Zobrazi�"
|
||||
BEGIN
|
||||
MENUITEM "Stavový &riadok", ID_VIEW_STATUSBAR
|
||||
MENUITEM "Stavový &riadok", ID_VIEW_STATUSBAR
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Rozde&lenie", ID_VIEW_SPLIT
|
||||
MENUITEM "Rozde&lenie", ID_VIEW_SPLIT
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Obnovi�\tF5", ID_VIEW_REFRESH
|
||||
MENUITEM "&Obnovi�\tF5", ID_VIEW_REFRESH
|
||||
END
|
||||
POPUP "&Ob¾úbené"
|
||||
BEGIN
|
||||
MENUITEM "&Prida� k ob¾úbeným", ID_FAVOURITES_ADDTOFAVOURITES
|
||||
MENUITEM "&Prida� k ob¾úbeným", ID_FAVOURITES_ADDTOFAVOURITES
|
||||
, GRAYED
|
||||
MENUITEM "&Odstráni� z ob¾úbených", ID_FAVOURITES_REMOVEFAVOURITE
|
||||
MENUITEM "&Odstráni� z ob¾úbených", ID_FAVOURITES_REMOVEFAVOURITE
|
||||
, GRAYED
|
||||
END
|
||||
POPUP "&Pomocník"
|
||||
@@ -106,36 +106,36 @@ BEGIN
|
||||
POPUP ""
|
||||
BEGIN
|
||||
MENUITEM "&Zmeni�", ID_EDIT_MODIFY
|
||||
MENUITEM "Zmeni� bináre údaje", ID_EDIT_MODIFY_BIN
|
||||
MENUITEM "Zmeni� bináre údaje", ID_EDIT_MODIFY_BIN
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Vymaza�\tDel", ID_EDIT_DELETE
|
||||
MENUITEM "&Premenova�", ID_EDIT_RENAME
|
||||
MENUITEM "&Vymaza�\tDel", ID_EDIT_DELETE
|
||||
MENUITEM "&Premenova�", ID_EDIT_RENAME
|
||||
END
|
||||
POPUP ""
|
||||
BEGIN
|
||||
POPUP "&Nový"
|
||||
BEGIN
|
||||
MENUITEM "&K¾úè", ID_EDIT_NEW_KEY
|
||||
MENUITEM "&K¾úè", ID_EDIT_NEW_KEY
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Re�azcová hodnota", ID_EDIT_NEW_STRINGVALUE
|
||||
MENUITEM "&Binárna hodnota", ID_EDIT_NEW_BINARYVALUE
|
||||
MENUITEM "&DWORD hodnota", ID_EDIT_NEW_DWORDVALUE
|
||||
MENUITEM "&Viacre�azcová hodnota", ID_EDIT_NEW_MULTISTRINGVALUE
|
||||
MENUITEM "Rozšírit&e¾ná re�azcová hodnota", ID_EDIT_NEW_EXPANDABLESTRINGVALUE
|
||||
MENUITEM "&Re�azcová hodnota", ID_EDIT_NEW_STRINGVALUE
|
||||
MENUITEM "&Binárna hodnota", ID_EDIT_NEW_BINARYVALUE
|
||||
MENUITEM "&DWORD hodnota", ID_EDIT_NEW_DWORDVALUE
|
||||
MENUITEM "&Viacre�azcová hodnota", ID_EDIT_NEW_MULTISTRINGVALUE
|
||||
MENUITEM "Rozšírit&e¾ná re�azcová hodnota", ID_EDIT_NEW_EXPANDABLESTRINGVALUE
|
||||
END
|
||||
END
|
||||
POPUP ""
|
||||
BEGIN
|
||||
MENUITEM "Expand/Collapse", ID_TREE_EXPANDBRANCH
|
||||
MENUITEM "Expand/Collapse", ID_TREE_EXPANDBRANCH
|
||||
POPUP "&Nový"
|
||||
BEGIN
|
||||
MENUITEM "&K¾úè", ID_EDIT_NEW_KEY
|
||||
MENUITEM "&K¾úè", ID_EDIT_NEW_KEY
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Re�azcová hodnota", ID_EDIT_NEW_STRINGVALUE
|
||||
MENUITEM "&Binárna hodnota", ID_EDIT_NEW_BINARYVALUE
|
||||
MENUITEM "&DWORD hodnota", ID_EDIT_NEW_DWORDVALUE
|
||||
MENUITEM "&Viacre�azcová hodnota", ID_EDIT_NEW_MULTISTRINGVALUE
|
||||
MENUITEM "Rozšírit&e¾ná re�azcová hodnota", ID_EDIT_NEW_EXPANDABLESTRINGVALUE
|
||||
MENUITEM "&Re�azcová hodnota", ID_EDIT_NEW_STRINGVALUE
|
||||
MENUITEM "&Binárna hodnota", ID_EDIT_NEW_BINARYVALUE
|
||||
MENUITEM "&DWORD hodnota", ID_EDIT_NEW_DWORDVALUE
|
||||
MENUITEM "&Viacre�azcová hodnota", ID_EDIT_NEW_MULTISTRINGVALUE
|
||||
MENUITEM "Rozšírit&e¾ná re�azcová hodnota", ID_EDIT_NEW_EXPANDABLESTRINGVALUE
|
||||
END
|
||||
MENUITEM "&Find", ID_EDIT_FIND
|
||||
MENUITEM SEPARATOR
|
||||
@@ -294,12 +294,12 @@ BEGIN
|
||||
IDS_UNSUPPORTED_TYPE "Can't edit keys of this type (%ld)"
|
||||
IDS_TOO_BIG_VALUE "Hodnota je príliš ve¾ká (%ld)"
|
||||
IDS_MULTI_SZ_EMPTY_STRING "Data of type REG_MULTI_SZ cannot contain empty strings.\nThe empty strings have been removed from the list."
|
||||
IDS_QUERY_DELETE_KEY_ONE "Are you sure you want to delete this key?"
|
||||
IDS_QUERY_DELETE_KEY_MORE "Are you sure you want to delete these keys?"
|
||||
IDS_QUERY_DELETE_KEY_CONFIRM "Confirm Key Delete"
|
||||
IDS_QUERY_DELETE_ONE "Are you sure you want to delete this value?"
|
||||
IDS_QUERY_DELETE_MORE "Are you sure you want to delete these values?"
|
||||
IDS_QUERY_DELETE_CONFIRM "Confirm Value Delete"
|
||||
IDS_QUERY_DELETE_KEY_ONE "Naozaj chcete vymaza� tento k¾úè?"
|
||||
IDS_QUERY_DELETE_KEY_MORE "Naozaj chcete vymaza� tieto k¾úèe?"
|
||||
IDS_QUERY_DELETE_KEY_CONFIRM "Potvrdi� vymazanie k¾úèa"
|
||||
IDS_QUERY_DELETE_ONE "Naozaj chcete vymaza� túto hodnotu?"
|
||||
IDS_QUERY_DELETE_MORE "Naozaj chcete vymaza� tieto hodnoty?"
|
||||
IDS_QUERY_DELETE_CONFIRM "Potvrdi� vymazanie hodnoty"
|
||||
IDS_ERR_DELVAL_CAPTION "Error Deleting Values"
|
||||
IDS_ERR_DELETEVALUE "Unable to delete all specified values!"
|
||||
IDS_ERR_RENVAL_CAPTION "Error Renaming Value"
|
||||
@@ -370,8 +370,7 @@ END
|
||||
*/
|
||||
|
||||
IDD_EXPORTRANGE DIALOGEX DISCARDABLE 50, 50, 370, 50
|
||||
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS |
|
||||
WS_BORDER
|
||||
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
GROUPBOX "Export Range",IDC_STATIC,2,0,366,48
|
||||
|
||||
@@ -455,7 +455,7 @@ BOOL ListWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result)
|
||||
LONG lResult;
|
||||
|
||||
keyPath = GetItemPath(g_pChildWnd->hTreeWnd, 0, &hKeyRoot);
|
||||
lResult = RegRenameValue(hKeyRoot, keyPath, Info->item.pszText, lineinfo->name);
|
||||
lResult = RenameValue(hKeyRoot, keyPath, Info->item.pszText, lineinfo->name);
|
||||
lineinfo->name = realloc(lineinfo->name, (_tcslen(Info->item.pszText)+1)*sizeof(TCHAR));
|
||||
if (lineinfo->name != NULL)
|
||||
_tcscpy(lineinfo->name, Info->item.pszText);
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include <regedit.h>
|
||||
|
||||
BOOL ProcessCmdLine(LPSTR lpCmdLine);
|
||||
BOOL ProcessCmdLine(LPWSTR lpCmdLine);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -143,9 +143,8 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
|
||||
}
|
||||
|
||||
/* Restore position */
|
||||
if (RegQueryStringValue(HKEY_CURRENT_USER, g_szGeneralRegKey,
|
||||
_T("LastKey"),
|
||||
szBuffer, sizeof(szBuffer) / sizeof(szBuffer[0])) == ERROR_SUCCESS)
|
||||
if (QueryStringValue(HKEY_CURRENT_USER, g_szGeneralRegKey, _T("LastKey"),
|
||||
szBuffer, COUNT_OF(szBuffer)) == ERROR_SUCCESS)
|
||||
{
|
||||
SelectNode(g_pChildWnd->hTreeWnd, szBuffer);
|
||||
}
|
||||
@@ -183,31 +182,16 @@ BOOL TranslateChildTabMessage(MSG *msg)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int APIENTRY WinMain(HINSTANCE hInstance,
|
||||
HINSTANCE hPrevInstance,
|
||||
LPSTR lpCmdLine,
|
||||
int nCmdShow)
|
||||
int APIENTRY wWinMain(HINSTANCE hInstance,
|
||||
HINSTANCE hPrevInstance,
|
||||
LPWSTR lpCmdLine,
|
||||
int nCmdShow)
|
||||
{
|
||||
MSG msg;
|
||||
HACCEL hAccel;
|
||||
|
||||
UNREFERENCED_PARAMETER(hPrevInstance);
|
||||
|
||||
/*
|
||||
int hCrt;
|
||||
FILE *hf;
|
||||
AllocConsole();
|
||||
hCrt = _open_osfhandle((long)GetStdHandle(STD_OUTPUT_HANDLE), _O_TEXT);
|
||||
hf = _fdopen(hCrt, "w");
|
||||
*stdout = *hf;
|
||||
setvbuf(stdout, NULL, _IONBF, 0);
|
||||
|
||||
wprintf(L"command line exit, hInstance = %d\n", hInstance);
|
||||
getch();
|
||||
FreeConsole();
|
||||
return 0;
|
||||
*/
|
||||
|
||||
if (ProcessCmdLine(lpCmdLine)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -124,3 +124,10 @@ extern void DestroyMainMenu( void );
|
||||
/* edit.c */
|
||||
extern BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCTSTR valueName, BOOL EditBin);
|
||||
extern BOOL DeleteKey(HWND hwnd, HKEY hKeyRoot, LPCTSTR keyPath);
|
||||
extern LONG RenameKey(HKEY hKey, LPCTSTR lpSubKey, LPCTSTR lpNewName);
|
||||
extern LONG RenameValue(HKEY hKey, LPCTSTR lpSubKey, LPCTSTR lpDestValue, LPCTSTR lpSrcValue);
|
||||
extern LONG QueryStringValue(HKEY hKey, LPCTSTR lpSubKey, LPCTSTR lpValueName, LPTSTR pszBuffer, DWORD dwBufferLen);
|
||||
extern BOOL GetKeyName(LPTSTR pszDest, size_t iDestLength, HKEY hRootKey, LPCTSTR lpSubKey);
|
||||
|
||||
/* security.c */
|
||||
extern BOOL RegKeyEditPermissions(HWND hWndOwner, HKEY hKey, LPCTSTR lpMachine, LPCTSTR lpKeyName);
|
||||
|
||||
+156
-108
@@ -56,7 +56,136 @@ typedef enum {
|
||||
ACTION_UNDEF, ACTION_ADD, ACTION_EXPORT, ACTION_DELETE
|
||||
} REGEDIT_ACTION;
|
||||
|
||||
BOOL PerformRegAction(REGEDIT_ACTION action, LPSTR s);
|
||||
|
||||
const CHAR *getAppName(void)
|
||||
{
|
||||
return "regedit";
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* Copies file name from command line string to the buffer.
|
||||
* Rewinds the command line string pointer to the next non-space character
|
||||
* after the file name.
|
||||
* Buffer contains an empty string if no filename was found;
|
||||
*
|
||||
* params:
|
||||
* command_line - command line current position pointer
|
||||
* where *s[0] is the first symbol of the file name.
|
||||
* file_name - buffer to write the file name to.
|
||||
*/
|
||||
void get_file_name(LPWSTR *command_line, LPWSTR file_name)
|
||||
{
|
||||
WCHAR *s = *command_line;
|
||||
int pos = 0; /* position of pointer "s" in *command_line */
|
||||
file_name[0] = 0;
|
||||
|
||||
if (!s[0]) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (s[0] == L'"') {
|
||||
s++;
|
||||
(*command_line)++;
|
||||
while(s[0] != L'"') {
|
||||
if (!s[0]) {
|
||||
fprintf(stderr, "%s: Unexpected end of file name!\n", getAppName());
|
||||
exit(1);
|
||||
}
|
||||
s++;
|
||||
pos++;
|
||||
}
|
||||
} else {
|
||||
while(s[0] && !iswspace(s[0])) {
|
||||
s++;
|
||||
pos++;
|
||||
}
|
||||
}
|
||||
memcpy(file_name, *command_line, pos * sizeof((*command_line)[0]));
|
||||
/* remove the last backslash */
|
||||
if (file_name[pos - 1] == L'\\') {
|
||||
file_name[pos - 1] = L'\0';
|
||||
} else {
|
||||
file_name[pos] = L'\0';
|
||||
}
|
||||
|
||||
if (s[0]) {
|
||||
s++;
|
||||
pos++;
|
||||
}
|
||||
while(s[0] && iswspace(s[0])) {
|
||||
s++;
|
||||
pos++;
|
||||
}
|
||||
(*command_line) += pos;
|
||||
}
|
||||
|
||||
BOOL PerformRegAction(REGEDIT_ACTION action, LPWSTR s)
|
||||
{
|
||||
switch (action) {
|
||||
case ACTION_ADD: {
|
||||
WCHAR filename[MAX_PATH];
|
||||
FILE *fp;
|
||||
|
||||
get_file_name(&s, filename);
|
||||
if (!filename[0]) {
|
||||
fprintf(stderr, "%s: No file name is specified\n", getAppName());
|
||||
fprintf(stderr, usage);
|
||||
exit(4);
|
||||
}
|
||||
|
||||
while(filename[0]) {
|
||||
fp = _wfopen(filename, L"r");
|
||||
if (fp == NULL)
|
||||
{
|
||||
LPSTR p = GetMultiByteString(filename);
|
||||
perror("");
|
||||
fprintf(stderr, "%s: Can't open file \"%s\"\n", getAppName(), p);
|
||||
HeapFree(GetProcessHeap(), 0, p);
|
||||
exit(5);
|
||||
}
|
||||
import_registry_file(fp);
|
||||
get_file_name(&s, filename);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ACTION_DELETE: {
|
||||
WCHAR reg_key_name[KEY_MAX_LEN];
|
||||
get_file_name(&s, reg_key_name);
|
||||
if (!reg_key_name[0]) {
|
||||
fprintf(stderr, "%s: No registry key is specified for removal\n", getAppName());
|
||||
fprintf(stderr, usage);
|
||||
exit(6);
|
||||
}
|
||||
delete_registry_key(reg_key_name);
|
||||
break;
|
||||
}
|
||||
case ACTION_EXPORT: {
|
||||
WCHAR filename[MAX_PATH];
|
||||
|
||||
filename[0] = _T('\0');
|
||||
get_file_name(&s, filename);
|
||||
if (!filename[0]) {
|
||||
fprintf(stderr, "%s: No file name is specified\n", getAppName());
|
||||
fprintf(stderr, usage);
|
||||
exit(7);
|
||||
}
|
||||
|
||||
if (s[0]) {
|
||||
WCHAR reg_key_name[KEY_MAX_LEN];
|
||||
get_file_name(&s, reg_key_name);
|
||||
export_registry_key(filename, reg_key_name, REG_FORMAT_4);
|
||||
} else {
|
||||
export_registry_key(filename, NULL, REG_FORMAT_4);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
fprintf(stderr, "%s: Unhandled action!\n", getAppName());
|
||||
exit(8);
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Process unknown switch.
|
||||
@@ -65,46 +194,47 @@ BOOL PerformRegAction(REGEDIT_ACTION action, LPSTR s);
|
||||
* chu - the switch character in upper-case.
|
||||
* s - the command line string where s points to the switch character.
|
||||
*/
|
||||
static void error_unknown_switch(char chu, char *s)
|
||||
static void error_unknown_switch(WCHAR chu, LPWSTR s)
|
||||
{
|
||||
if (isalpha(chu)) {
|
||||
fprintf(stderr,"%s: Undefined switch /%c!\n", getAppName(), chu);
|
||||
if (iswalpha(chu)) {
|
||||
fprintf(stderr, "%s: Undefined switch /%c!\n", getAppName(), chu);
|
||||
} else {
|
||||
fprintf(stderr,"%s: Alphabetic character is expected after '%c' "
|
||||
fprintf(stderr, "%s: Alphabetic character is expected after '%c' "
|
||||
"in swit ch specification\n", getAppName(), *(s - 1));
|
||||
}
|
||||
exit(1);
|
||||
}
|
||||
|
||||
BOOL ProcessCmdLine(LPSTR lpCmdLine)
|
||||
BOOL ProcessCmdLine(LPWSTR lpCmdLine)
|
||||
{
|
||||
REGEDIT_ACTION action = ACTION_UNDEF;
|
||||
LPSTR s = lpCmdLine; /* command line pointer */
|
||||
CHAR ch = *s; /* current character */
|
||||
LPWSTR s = lpCmdLine; /* command line pointer */
|
||||
WCHAR ch = *s; /* current character */
|
||||
|
||||
setAppName("regedit");
|
||||
while (ch && ((ch == '-') || (ch == '/'))) {
|
||||
char chu;
|
||||
char ch2;
|
||||
while (ch && ((ch == L'-') || (ch == L'/')))
|
||||
{
|
||||
WCHAR chu;
|
||||
WCHAR ch2;
|
||||
|
||||
s++;
|
||||
ch = *s;
|
||||
ch2 = *(s+1);
|
||||
chu = (CHAR) toupper(ch);
|
||||
if (!ch2 || isspace(ch2)) {
|
||||
if (chu == 'S' || chu == 'V') {
|
||||
ch2 = *(s + 1);
|
||||
chu = (WCHAR)towupper(ch);
|
||||
if (!ch2 || iswspace(ch2)) {
|
||||
if (chu == L'S' || chu == L'V')
|
||||
{
|
||||
/* ignore these switches */
|
||||
} else {
|
||||
switch (chu) {
|
||||
case 'D':
|
||||
case L'D':
|
||||
action = ACTION_DELETE;
|
||||
break;
|
||||
case 'E':
|
||||
case L'E':
|
||||
action = ACTION_EXPORT;
|
||||
break;
|
||||
case '?':
|
||||
fprintf(stderr,usage);
|
||||
exit(0);
|
||||
case L'?':
|
||||
fprintf(stderr, usage);
|
||||
exit(3);
|
||||
break;
|
||||
default:
|
||||
error_unknown_switch(chu, s);
|
||||
@@ -113,13 +243,13 @@ BOOL ProcessCmdLine(LPSTR lpCmdLine)
|
||||
}
|
||||
s++;
|
||||
} else {
|
||||
if (ch2 == ':') {
|
||||
if (ch2 == L':') {
|
||||
switch (chu) {
|
||||
case 'L':
|
||||
case L'L':
|
||||
/* fall through */
|
||||
case 'R':
|
||||
case L'R':
|
||||
s += 2;
|
||||
while (*s && !isspace(*s)) {
|
||||
while (*s && !iswspace(*s)) {
|
||||
s++;
|
||||
}
|
||||
break;
|
||||
@@ -135,7 +265,7 @@ BOOL ProcessCmdLine(LPSTR lpCmdLine)
|
||||
}
|
||||
/* skip spaces to the next parameter */
|
||||
ch = *s;
|
||||
while (ch && isspace(ch)) {
|
||||
while (ch && iswspace(ch)) {
|
||||
s++;
|
||||
ch = *s;
|
||||
}
|
||||
@@ -149,85 +279,3 @@ BOOL ProcessCmdLine(LPSTR lpCmdLine)
|
||||
|
||||
return PerformRegAction(action, s);
|
||||
}
|
||||
|
||||
BOOL PerformRegAction(REGEDIT_ACTION action, LPSTR s)
|
||||
{
|
||||
switch (action) {
|
||||
case ACTION_ADD: {
|
||||
CHAR filename[MAX_PATH];
|
||||
FILE *reg_file;
|
||||
|
||||
get_file_name(&s, filename);
|
||||
if (!filename[0]) {
|
||||
fprintf(stderr,"%s: No file name is specified\n", getAppName());
|
||||
fprintf(stderr,usage);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
while(filename[0]) {
|
||||
reg_file = fopen(filename, "r");
|
||||
if (reg_file) {
|
||||
processRegLines(reg_file, doSetValue);
|
||||
fclose(reg_file);
|
||||
} else {
|
||||
perror("");
|
||||
fprintf(stderr,"%s: Can't open file \"%s\"\n", getAppName(), filename);
|
||||
exit(1);
|
||||
}
|
||||
get_file_name(&s, filename);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ACTION_DELETE: {
|
||||
CHAR reg_key_name[KEY_MAX_LEN];
|
||||
|
||||
get_file_name(&s, reg_key_name);
|
||||
if (!reg_key_name[0]) {
|
||||
fprintf(stderr,"%s: No registry key is specified for removal\n",
|
||||
getAppName());
|
||||
fprintf(stderr,usage);
|
||||
exit(1);
|
||||
}
|
||||
delete_registry_key(reg_key_name);
|
||||
break;
|
||||
}
|
||||
case ACTION_EXPORT: {
|
||||
CHAR filename[MAX_PATH];
|
||||
LPCTSTR pszFilename;
|
||||
#ifdef UNICODE
|
||||
WCHAR filename_wide[MAX_PATH];
|
||||
#endif
|
||||
|
||||
filename[0] = '\0';
|
||||
get_file_name(&s, filename);
|
||||
if (!filename[0]) {
|
||||
fprintf(stderr,"%s: No file name is specified\n", getAppName());
|
||||
fprintf(stderr,usage);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
#ifdef UNICODE
|
||||
MultiByteToWideChar(CP_ACP, 0, filename, -1, filename_wide,
|
||||
sizeof(filename_wide) / sizeof(filename_wide[0]));
|
||||
pszFilename = filename_wide;
|
||||
#else
|
||||
pszFilename = filename;
|
||||
#endif
|
||||
|
||||
if (s[0]) {
|
||||
CHAR reg_key_name[KEY_MAX_LEN];
|
||||
|
||||
get_file_name(&s, reg_key_name);
|
||||
export_registry_key(pszFilename, reg_key_name);
|
||||
} else {
|
||||
export_registry_key(pszFilename, NULL);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
fprintf(stderr,"%s: Unhandled action!\n", getAppName());
|
||||
exit(1);
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE group SYSTEM "../../../tools/rbuild/project.dtd">
|
||||
<group xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<module name="regedit" type="win32gui" installname="regedit.exe">
|
||||
<module name="regedit" type="win32gui" installname="regedit.exe" unicode="yes">
|
||||
<include base="regedit">.</include>
|
||||
<define name="UNICODE" />
|
||||
<define name="_UNICODE" />
|
||||
|
||||
+767
-871
File diff suppressed because it is too large
Load Diff
@@ -17,81 +17,15 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
/******************************************************************************
|
||||
* Defines and consts
|
||||
*/
|
||||
#define KEY_MAX_LEN 1024
|
||||
|
||||
/* Return values */
|
||||
#define SUCCESS 0
|
||||
#define KEY_VALUE_ALREADY_SET 2
|
||||
#define REG_FORMAT_5 1
|
||||
#define REG_FORMAT_4 2
|
||||
|
||||
extern HINSTANCE hInst;
|
||||
|
||||
typedef void (*CommandAPI)(LPSTR lpsLine);
|
||||
|
||||
void doSetValue(LPSTR lpsLine);
|
||||
void doDeleteValue(LPSTR lpsLine);
|
||||
void doCreateKey(LPSTR lpsLine);
|
||||
void doDeleteKey(LPSTR lpsLine);
|
||||
void doRegisterDLL(LPSTR lpsLine);
|
||||
void doUnregisterDLL(LPSTR lpsLine);
|
||||
|
||||
BOOL export_registry_key(const TCHAR *file_name, CHAR *reg_key_name);
|
||||
BOOL import_registry_file(LPTSTR filename);
|
||||
void delete_registry_key(CHAR *reg_key_name);
|
||||
|
||||
void setAppName(const CHAR *name);
|
||||
const CHAR *getAppName(void);
|
||||
|
||||
void processRegLines(FILE *in, CommandAPI command);
|
||||
|
||||
/*
|
||||
* Generic prototypes
|
||||
*/
|
||||
char* getToken(char** str, const char* delims);
|
||||
void get_file_name(CHAR **command_line, CHAR *filename);
|
||||
LPSTR convertHexToHexCSV( BYTE *buf, ULONG len);
|
||||
LPSTR convertHexToDWORDStr( BYTE *buf, ULONG len);
|
||||
LPSTR getRegKeyName(LPSTR lpLine);
|
||||
BOOL getRegClass(LPSTR lpLine, HKEY* hkey);
|
||||
DWORD getDataType(LPSTR *lpValue, DWORD* parse_type);
|
||||
LPSTR getArg(LPSTR arg);
|
||||
HRESULT openKey(LPSTR stdInput);
|
||||
void closeKey(void);
|
||||
|
||||
/*
|
||||
* api setValue prototypes
|
||||
*/
|
||||
void processSetValue(LPSTR cmdline);
|
||||
HRESULT setValue(LPSTR val_name, LPSTR val_data);
|
||||
|
||||
/*
|
||||
* Permission prototypes
|
||||
*/
|
||||
|
||||
BOOL InitializeAclUiDll(VOID);
|
||||
VOID UnloadAclUiDll(VOID);
|
||||
BOOL RegKeyEditPermissions(HWND hWndOwner, HKEY hKey, LPCTSTR lpMachine, LPCTSTR lpKeyName);
|
||||
|
||||
/*
|
||||
* Processing
|
||||
*/
|
||||
LONG RegCopyKey(HKEY hDestKey, LPCTSTR lpDestSubKey, HKEY hSrcKey, LPCTSTR lpSrcSubKey);
|
||||
LONG RegMoveKey(HKEY hDestKey, LPCTSTR lpDestSubKey, HKEY hSrcKey, LPCTSTR lpSrcSubKey);
|
||||
LONG RegRenameKey(HKEY hKey, LPCTSTR lpSubKey, LPCTSTR lpNewName);
|
||||
LONG RegRenameValue(HKEY hKey, LPCTSTR lpSubKey, LPCTSTR lpDestValue, LPCTSTR lpSrcValue);
|
||||
LONG RegQueryStringValue(HKEY hKey, LPCTSTR lpSubKey, LPCTSTR lpValueName, LPTSTR pszBuffer, DWORD dwBufferLen);
|
||||
|
||||
/*
|
||||
* Miscellaneous
|
||||
*/
|
||||
#define RSF_WHOLESTRING 0x00000001
|
||||
#define RSF_LOOKATKEYS 0x00000002
|
||||
#define RSF_LOOKATVALUES 0x00000004
|
||||
#define RSF_LOOKATDATA 0x00000008
|
||||
#define RSF_MATCHCASE 0x00010000
|
||||
|
||||
BOOL RegKeyGetName(LPTSTR pszDest, size_t iDestLength, HKEY hRootKey, LPCTSTR lpSubKey);
|
||||
|
||||
/* EOF */
|
||||
BOOL export_registry_key(WCHAR *file_name, WCHAR *reg_key_name, DWORD format);
|
||||
BOOL import_registry_file(FILE* reg_file);
|
||||
void delete_registry_key(LPTSTR reg_key_name);
|
||||
WCHAR* GetWideString(const char* strA);
|
||||
CHAR* GetMultiByteString(const WCHAR* strW);
|
||||
|
||||
+234
-55
@@ -4,86 +4,265 @@
|
||||
* FILE: base/system/sc/create.c
|
||||
* PURPOSE: Create a service
|
||||
* COPYRIGHT: Copyright 2005 - 2006 Ged Murphy <[email protected]>
|
||||
* Roel Messiant <[email protected]>
|
||||
*
|
||||
*/
|
||||
|
||||
#include "sc.h"
|
||||
|
||||
BOOL Create(LPCTSTR ServiceName, LPCTSTR *ServiceArgs)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
LPCTSTR lpOption;
|
||||
DWORD dwValue;
|
||||
} OPTION_INFO;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
LPCTSTR lpServiceName;
|
||||
LPCTSTR lpDisplayName;
|
||||
DWORD dwServiceType;
|
||||
DWORD dwStartType;
|
||||
DWORD dwErrorControl;
|
||||
LPCTSTR lpBinaryPathName;
|
||||
LPCTSTR lpLoadOrderGroup;
|
||||
DWORD dwTagId;
|
||||
LPCTSTR lpDependencies;
|
||||
LPCTSTR lpServiceStartName;
|
||||
LPCTSTR lpPassword;
|
||||
|
||||
BOOL bTagId;
|
||||
} SERVICE_CREATE_INFO, *LPSERVICE_CREATE_INFO;
|
||||
|
||||
|
||||
static const OPTION_INFO TypeOpts[] =
|
||||
{
|
||||
{ _T("own"), SERVICE_WIN32_OWN_PROCESS },
|
||||
{ _T("share"), SERVICE_WIN32_SHARE_PROCESS },
|
||||
{ _T("interact"), SERVICE_INTERACTIVE_PROCESS },
|
||||
{ _T("kernel"), SERVICE_KERNEL_DRIVER },
|
||||
{ _T("filesys"), SERVICE_FILE_SYSTEM_DRIVER },
|
||||
{ _T("rec"), SERVICE_RECOGNIZER_DRIVER }
|
||||
};
|
||||
|
||||
static const OPTION_INFO StartOpts[] =
|
||||
{
|
||||
{ _T("boot"), SERVICE_BOOT_START },
|
||||
{ _T("system"), SERVICE_SYSTEM_START },
|
||||
{ _T("auto"), SERVICE_AUTO_START },
|
||||
{ _T("demand"), SERVICE_DEMAND_START },
|
||||
{ _T("disabled"), SERVICE_DISABLED }
|
||||
};
|
||||
|
||||
static const OPTION_INFO ErrorOpts[] =
|
||||
{
|
||||
{ _T("normal"), SERVICE_ERROR_NORMAL },
|
||||
{ _T("severe"), SERVICE_ERROR_SEVERE },
|
||||
{ _T("critical"), SERVICE_ERROR_CRITICAL },
|
||||
{ _T("ignore"), SERVICE_ERROR_IGNORE }
|
||||
};
|
||||
|
||||
static const OPTION_INFO TagOpts[] =
|
||||
{
|
||||
{ _T("yes"), TRUE },
|
||||
{ _T("no"), FALSE }
|
||||
};
|
||||
|
||||
|
||||
static BOOL ParseCreateArguments(
|
||||
LPCTSTR *ServiceArgs,
|
||||
INT ArgCount,
|
||||
OUT LPSERVICE_CREATE_INFO lpServiceInfo
|
||||
)
|
||||
{
|
||||
INT i, ArgIndex = 1;
|
||||
|
||||
if (ArgCount < 1)
|
||||
return FALSE;
|
||||
|
||||
ZeroMemory(lpServiceInfo, sizeof(SERVICE_CREATE_INFO));
|
||||
|
||||
lpServiceInfo->lpServiceName = ServiceArgs[0];
|
||||
|
||||
ArgCount--;
|
||||
|
||||
while (ArgCount > 1)
|
||||
{
|
||||
if (!lstrcmpi(ServiceArgs[ArgIndex], _T("type=")))
|
||||
{
|
||||
for (i = 0; i < sizeof(TypeOpts) / sizeof(TypeOpts[0]); i++)
|
||||
if (!lstrcmpi(ServiceArgs[ArgIndex + 1], TypeOpts[i].lpOption))
|
||||
{
|
||||
lpServiceInfo->dwServiceType |= TypeOpts[i].dwValue;
|
||||
break;
|
||||
}
|
||||
|
||||
if (i == sizeof(TypeOpts) / sizeof(TypeOpts[0]))
|
||||
break;
|
||||
}
|
||||
else if (!lstrcmpi(ServiceArgs[ArgIndex], _T("start=")))
|
||||
{
|
||||
for (i = 0; i < sizeof(StartOpts) / sizeof(StartOpts[0]); i++)
|
||||
if (!lstrcmpi(ServiceArgs[ArgIndex + 1], StartOpts[i].lpOption))
|
||||
{
|
||||
lpServiceInfo->dwStartType = StartOpts[i].dwValue;
|
||||
break;
|
||||
}
|
||||
|
||||
if (i == sizeof(StartOpts) / sizeof(StartOpts[0]))
|
||||
break;
|
||||
}
|
||||
else if (!lstrcmpi(ServiceArgs[ArgIndex], _T("error=")))
|
||||
{
|
||||
for (i = 0; i < sizeof(ErrorOpts) / sizeof(ErrorOpts[0]); i++)
|
||||
if (!lstrcmpi(ServiceArgs[ArgIndex + 1], ErrorOpts[i].lpOption))
|
||||
{
|
||||
lpServiceInfo->dwErrorControl = ErrorOpts[i].dwValue;
|
||||
break;
|
||||
}
|
||||
|
||||
if (i == sizeof(ErrorOpts) / sizeof(ErrorOpts[0]))
|
||||
break;
|
||||
}
|
||||
else if (!lstrcmpi(ServiceArgs[ArgIndex], _T("tag=")))
|
||||
{
|
||||
for (i = 0; i < sizeof(TagOpts) / sizeof(TagOpts[0]); i++)
|
||||
if (!lstrcmpi(ServiceArgs[ArgIndex + 1], TagOpts[i].lpOption))
|
||||
{
|
||||
lpServiceInfo->bTagId = TagOpts[i].dwValue;
|
||||
break;
|
||||
}
|
||||
|
||||
if (i == sizeof(TagOpts) / sizeof(TagOpts[0]))
|
||||
break;
|
||||
}
|
||||
else if (!lstrcmpi(ServiceArgs[ArgIndex], _T("binpath=")))
|
||||
{
|
||||
lpServiceInfo->lpBinaryPathName = ServiceArgs[ArgIndex + 1];
|
||||
}
|
||||
else if (!lstrcmpi(ServiceArgs[ArgIndex], _T("group=")))
|
||||
{
|
||||
lpServiceInfo->lpLoadOrderGroup = ServiceArgs[ArgIndex + 1];
|
||||
}
|
||||
else if (!lstrcmpi(ServiceArgs[ArgIndex], _T("depend=")))
|
||||
{
|
||||
lpServiceInfo->lpDependencies = ServiceArgs[ArgIndex + 1];
|
||||
}
|
||||
else if (!lstrcmpi(ServiceArgs[ArgIndex], _T("obj=")))
|
||||
{
|
||||
lpServiceInfo->lpServiceStartName = ServiceArgs[ArgIndex + 1];
|
||||
}
|
||||
else if (!lstrcmpi(ServiceArgs[ArgIndex], _T("displayname=")))
|
||||
{
|
||||
lpServiceInfo->lpDisplayName = ServiceArgs[ArgIndex + 1];
|
||||
}
|
||||
else if (!lstrcmpi(ServiceArgs[ArgIndex], _T("password=")))
|
||||
{
|
||||
lpServiceInfo->lpPassword = ServiceArgs[ArgIndex + 1];
|
||||
}
|
||||
|
||||
ArgIndex += 2;
|
||||
ArgCount -= 2;
|
||||
}
|
||||
|
||||
return (ArgCount == 0);
|
||||
}
|
||||
|
||||
BOOL Create(LPCTSTR *ServiceArgs, INT ArgCount)
|
||||
{
|
||||
SC_HANDLE hSCManager;
|
||||
SC_HANDLE hSc;
|
||||
BOOL bRet = FALSE;
|
||||
|
||||
DWORD dwServiceType = SERVICE_WIN32_OWN_PROCESS;
|
||||
DWORD dwStartType = SERVICE_DEMAND_START;
|
||||
DWORD dwErrorControl = SERVICE_ERROR_NORMAL;
|
||||
LPCTSTR lpBinaryPathName = NULL;
|
||||
LPCTSTR lpLoadOrderGroup = NULL;
|
||||
DWORD dwTagId = 0;
|
||||
LPCTSTR lpDependencies = NULL;
|
||||
LPCTSTR lpServiceStartName = NULL;
|
||||
LPCTSTR lpPassword = NULL;
|
||||
INT i;
|
||||
INT Length;
|
||||
LPTSTR lpBuffer = NULL;
|
||||
SERVICE_CREATE_INFO ServiceInfo;
|
||||
|
||||
/* quick hack to get it working */
|
||||
lpBinaryPathName = *ServiceArgs;
|
||||
|
||||
#ifdef SCDBG
|
||||
_tprintf(_T("service name - %s\n"), ServiceName);
|
||||
_tprintf(_T("display name - %s\n"), ServiceName);
|
||||
_tprintf(_T("service type - %lu\n"), dwServiceType);
|
||||
_tprintf(_T("start type - %lu\n"), dwStartType);
|
||||
_tprintf(_T("error control - %lu\n"), dwErrorControl);
|
||||
_tprintf(_T("Binary path - %s\n"), lpBinaryPathName);
|
||||
_tprintf(_T("load order group - %s\n"), lpLoadOrderGroup);
|
||||
_tprintf(_T("tag - %lu\n"), dwTagId);
|
||||
_tprintf(_T("dependincies - %s\n"), lpDependencies);
|
||||
_tprintf(_T("account start name - %s\n"), lpServiceStartName);
|
||||
_tprintf(_T("account password - %s\n"), lpPassword);
|
||||
#endif
|
||||
|
||||
if (!ServiceName)
|
||||
if (!ParseCreateArguments(ServiceArgs, ArgCount, &ServiceInfo))
|
||||
{
|
||||
CreateUsage();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
hSCManager = OpenSCManager(NULL,
|
||||
NULL,
|
||||
SC_MANAGER_CREATE_SERVICE);
|
||||
if (hSCManager == NULL)
|
||||
if (!ServiceInfo.dwServiceType)
|
||||
ServiceInfo.dwServiceType = SERVICE_WIN32_OWN_PROCESS;
|
||||
|
||||
if (!ServiceInfo.dwStartType)
|
||||
ServiceInfo.dwStartType = SERVICE_DEMAND_START;
|
||||
|
||||
if (!ServiceInfo.dwErrorControl)
|
||||
ServiceInfo.dwErrorControl = SERVICE_ERROR_NORMAL;
|
||||
|
||||
if (ServiceInfo.lpDependencies)
|
||||
{
|
||||
ReportLastError();
|
||||
return FALSE;
|
||||
Length = lstrlen(ServiceInfo.lpDependencies);
|
||||
|
||||
lpBuffer = HeapAlloc(GetProcessHeap(),
|
||||
0,
|
||||
(Length + 2) * sizeof(TCHAR));
|
||||
|
||||
for (i = 0; i < Length; i++)
|
||||
if (ServiceInfo.lpDependencies[i] == _T('/'))
|
||||
lpBuffer[i] = 0;
|
||||
else
|
||||
lpBuffer[i] = ServiceInfo.lpDependencies[i];
|
||||
|
||||
lpBuffer[Length] = 0;
|
||||
lpBuffer[Length + 1] = 0;
|
||||
|
||||
ServiceInfo.lpDependencies = lpBuffer;
|
||||
}
|
||||
|
||||
hSc = CreateService(hSCManager,
|
||||
ServiceName,
|
||||
ServiceName,
|
||||
SERVICE_ALL_ACCESS,
|
||||
dwServiceType,
|
||||
dwStartType,
|
||||
dwErrorControl,
|
||||
lpBinaryPathName,
|
||||
lpLoadOrderGroup,
|
||||
&dwTagId,
|
||||
lpDependencies,
|
||||
lpServiceStartName,
|
||||
lpPassword);
|
||||
#ifdef SCDBG
|
||||
_tprintf(_T("service name - %s\n"), ServiceInfo.lpServiceName);
|
||||
_tprintf(_T("display name - %s\n"), ServiceInfo.lpDisplayName);
|
||||
_tprintf(_T("service type - %lu\n"), ServiceInfo.dwServiceType);
|
||||
_tprintf(_T("start type - %lu\n"), ServiceInfo.dwStartType);
|
||||
_tprintf(_T("error control - %lu\n"), ServiceInfo.dwErrorControl);
|
||||
_tprintf(_T("Binary path - %s\n"), ServiceInfo.lpBinaryPathName);
|
||||
_tprintf(_T("load order group - %s\n"), ServiceInfo.lpLoadOrderGroup);
|
||||
_tprintf(_T("tag - %lu\n"), ServiceInfo.dwTagId);
|
||||
_tprintf(_T("dependencies - %s\n"), ServiceInfo.lpDependencies);
|
||||
_tprintf(_T("account start name - %s\n"), ServiceInfo.lpServiceStartName);
|
||||
_tprintf(_T("account password - %s\n"), ServiceInfo.lpPassword);
|
||||
#endif
|
||||
|
||||
if (hSc == NULL)
|
||||
hSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_CREATE_SERVICE);
|
||||
|
||||
if (hSCManager != NULL)
|
||||
{
|
||||
ReportLastError();
|
||||
hSc = CreateService(hSCManager,
|
||||
ServiceInfo.lpServiceName,
|
||||
ServiceInfo.lpDisplayName,
|
||||
SERVICE_ALL_ACCESS,
|
||||
ServiceInfo.dwServiceType,
|
||||
ServiceInfo.dwStartType,
|
||||
ServiceInfo.dwErrorControl,
|
||||
ServiceInfo.lpBinaryPathName,
|
||||
ServiceInfo.lpLoadOrderGroup,
|
||||
ServiceInfo.bTagId ? &ServiceInfo.dwTagId : NULL,
|
||||
ServiceInfo.lpDependencies,
|
||||
ServiceInfo.lpServiceStartName,
|
||||
ServiceInfo.lpPassword);
|
||||
|
||||
if (hSc != NULL)
|
||||
{
|
||||
_tprintf(_T("[SC] CreateService SUCCESS\n"));
|
||||
|
||||
CloseServiceHandle(hSc);
|
||||
bRet = TRUE;
|
||||
}
|
||||
else
|
||||
ReportLastError();
|
||||
|
||||
CloseServiceHandle(hSCManager);
|
||||
}
|
||||
else
|
||||
{
|
||||
_tprintf(_T("[SC] CreateService SUCCESS\n"));
|
||||
ReportLastError();
|
||||
|
||||
CloseServiceHandle(hSc);
|
||||
CloseServiceHandle(hSCManager);
|
||||
bRet = TRUE;
|
||||
}
|
||||
if (lpBuffer != NULL)
|
||||
HeapFree(GetProcessHeap(), 0, lpBuffer);
|
||||
|
||||
return bRet;
|
||||
}
|
||||
|
||||
+44
-46
@@ -67,11 +67,11 @@ ScControl(LPCTSTR Server, // remote machine name
|
||||
}
|
||||
else if (!lstrcmpi(Command, _T("start")))
|
||||
{
|
||||
ServiceName = *ServiceArgs++;
|
||||
ArgCount--;
|
||||
|
||||
if (ServiceName)
|
||||
if (ArgCount > 0)
|
||||
{
|
||||
ServiceName = *ServiceArgs++;
|
||||
ArgCount--;
|
||||
|
||||
Start(ServiceName,
|
||||
ServiceArgs,
|
||||
ArgCount);
|
||||
@@ -81,11 +81,11 @@ ScControl(LPCTSTR Server, // remote machine name
|
||||
}
|
||||
else if (!lstrcmpi(Command, _T("pause")))
|
||||
{
|
||||
ServiceName = *ServiceArgs++;
|
||||
ArgCount--;
|
||||
|
||||
if (ServiceName)
|
||||
if (ArgCount > 0)
|
||||
{
|
||||
ServiceName = *ServiceArgs++;
|
||||
ArgCount--;
|
||||
|
||||
Control(SERVICE_CONTROL_PAUSE,
|
||||
ServiceName,
|
||||
ServiceArgs,
|
||||
@@ -96,11 +96,11 @@ ScControl(LPCTSTR Server, // remote machine name
|
||||
}
|
||||
else if (!lstrcmpi(Command, _T("interrogate")))
|
||||
{
|
||||
ServiceName = *ServiceArgs++;
|
||||
ArgCount--;
|
||||
|
||||
if (ServiceName)
|
||||
if (ArgCount > 0)
|
||||
{
|
||||
ServiceName = *ServiceArgs++;
|
||||
ArgCount--;
|
||||
|
||||
Control(SERVICE_CONTROL_INTERROGATE,
|
||||
ServiceName,
|
||||
ServiceArgs,
|
||||
@@ -111,11 +111,11 @@ ScControl(LPCTSTR Server, // remote machine name
|
||||
}
|
||||
else if (!lstrcmpi(Command, _T("stop")))
|
||||
{
|
||||
ServiceName = *ServiceArgs++;
|
||||
ArgCount--;
|
||||
|
||||
if (ServiceName)
|
||||
if (ArgCount > 0)
|
||||
{
|
||||
ServiceName = *ServiceArgs++;
|
||||
ArgCount--;
|
||||
|
||||
Control(SERVICE_CONTROL_STOP,
|
||||
ServiceName,
|
||||
ServiceArgs,
|
||||
@@ -126,11 +126,11 @@ ScControl(LPCTSTR Server, // remote machine name
|
||||
}
|
||||
else if (!lstrcmpi(Command, _T("continue")))
|
||||
{
|
||||
ServiceName = *ServiceArgs++;
|
||||
ArgCount--;
|
||||
|
||||
if (ServiceName)
|
||||
if (ArgCount > 0)
|
||||
{
|
||||
ServiceName = *ServiceArgs++;
|
||||
ArgCount--;
|
||||
|
||||
Control(SERVICE_CONTROL_CONTINUE,
|
||||
ServiceName,
|
||||
ServiceArgs,
|
||||
@@ -141,51 +141,49 @@ ScControl(LPCTSTR Server, // remote machine name
|
||||
}
|
||||
else if (!lstrcmpi(Command, _T("delete")))
|
||||
{
|
||||
ServiceName = *ServiceArgs++;
|
||||
ArgCount--;
|
||||
if (ArgCount > 0)
|
||||
{
|
||||
ServiceName = *ServiceArgs++;
|
||||
ArgCount--;
|
||||
|
||||
if (ServiceName)
|
||||
Delete(ServiceName);
|
||||
}
|
||||
else
|
||||
DeleteUsage();
|
||||
}
|
||||
else if (!lstrcmpi(Command, _T("create")))
|
||||
{
|
||||
ServiceName = *ServiceArgs++;
|
||||
ArgCount--;
|
||||
|
||||
if (*ServiceArgs)
|
||||
Create(ServiceName,
|
||||
ServiceArgs);
|
||||
else
|
||||
CreateUsage();
|
||||
Create(ServiceArgs, ArgCount);
|
||||
}
|
||||
else if (!lstrcmpi(Command, _T("control")))
|
||||
{
|
||||
INT CtlValue;
|
||||
|
||||
ServiceName = *ServiceArgs++;
|
||||
ArgCount--;
|
||||
|
||||
CtlValue = _ttoi(ServiceArgs[0]);
|
||||
ServiceArgs++;
|
||||
ArgCount--;
|
||||
|
||||
if (ServiceName)
|
||||
if (ArgCount > 1)
|
||||
{
|
||||
if ((CtlValue >=128) && CtlValue <= 255)
|
||||
{
|
||||
ServiceName = *ServiceArgs++;
|
||||
ArgCount--;
|
||||
|
||||
CtlValue = _ttoi(ServiceArgs[0]);
|
||||
ServiceArgs++;
|
||||
ArgCount--;
|
||||
|
||||
if ((CtlValue >= 128) && (CtlValue <= 255))
|
||||
Control(CtlValue,
|
||||
ServiceName,
|
||||
ServiceArgs,
|
||||
ArgCount);
|
||||
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
ControlUsage();
|
||||
}
|
||||
|
||||
ContinueUsage();
|
||||
else
|
||||
ControlUsage();
|
||||
}
|
||||
else
|
||||
{
|
||||
MainUsage();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
/* control functions */
|
||||
BOOL Start(LPCTSTR ServiceName, LPCTSTR *ServiceArgs, INT ArgCount);
|
||||
BOOL Create(LPCTSTR ServiceName, LPCTSTR *ServiceArgs);
|
||||
BOOL Create(LPCTSTR *ServiceArgs, INT ArgCount);
|
||||
BOOL Delete(LPCTSTR ServiceName);
|
||||
BOOL Control(DWORD Control, LPCTSTR ServiceName, LPCTSTR *Args, INT ArgCount);
|
||||
BOOL Query(LPCTSTR *ServiceArgs, DWORD ArgCount, BOOL bExtended);
|
||||
@@ -29,3 +29,4 @@ VOID ConfigUsage(VOID);
|
||||
VOID DescriptionUsage(VOID);
|
||||
VOID DeleteUsage(VOID);
|
||||
VOID CreateUsage(VOID);
|
||||
VOID ControlUsage(VOID);
|
||||
|
||||
@@ -118,7 +118,7 @@ VOID InterrogateUsage(VOID)
|
||||
VOID StopUsage(VOID)
|
||||
{
|
||||
_tprintf(_T("DESCRIPTION:\n")
|
||||
_T(" Sends an STOP control request to a service.\n")
|
||||
_T(" Sends a STOP control request to a service.\n")
|
||||
_T("USAGE:\n")
|
||||
_T(" sc <server> stop [service name]\n"));
|
||||
}
|
||||
@@ -126,7 +126,7 @@ VOID StopUsage(VOID)
|
||||
VOID ContinueUsage(VOID)
|
||||
{
|
||||
_tprintf(_T("DESCRIPTION:\n")
|
||||
_T(" Sends an CONTINUE control request to a service.\n")
|
||||
_T(" Sends a CONTINUE control request to a service.\n")
|
||||
_T("USAGE:\n")
|
||||
_T(" sc <server> continue [service name]\n"));
|
||||
}
|
||||
@@ -179,3 +179,11 @@ VOID CreateUsage(VOID)
|
||||
_T(" DisplayName= <display name>\n")
|
||||
_T(" password= <password>\n"));
|
||||
}
|
||||
|
||||
VOID ControlUsage(VOID)
|
||||
{
|
||||
_tprintf(_T("DESCRIPTION:\n")
|
||||
_T(" Sends a CONTROL control request to a service.\n")
|
||||
_T("USAGE:\n")
|
||||
_T(" sc <server> control [service name] <value>\n"));
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user