Compare commits

..

30 Commits

Author SHA1 Message Date
Hervé Poussineau
f1171128ca [NTOS:EX] HACK: on livecd, disable security features in NtSystemDebugControl
WinDBG can do some local debugging using 'windbg -kl'. In that case,
WinDBG tries to directly use NtSystemDebugControl. If this function
returns an error, WinDBG extracts a driver from its resources.
WinDBG will send IOCTLs to this driver, and this driver will call
KdSystemDebugControl.

However, on livecd (where %SYSTEMROOT% is read-only), WinDBG is unable
to extract the driver from its resources, and can't use the driver to
call KdSystemDebugControl.

As a work-around, allow all control classes in NtSystemDebugControl
in case of livecd.
WinDBG local debugging now also works on livecd (windbg -kl).
2025-01-28 17:13:18 +01:00
Hervé Poussineau
daa34596d8 [NTOS:KD64] Fix freezes on first chance exception when KDBG is enabled and KdIgnoreUmExceptions is TRUE
This fixes the following use case:
- Execute 'kdbgctrl.exe -du'
- Execute 'kdbgctrl.exe -cu'
- See that last command never finishes
2025-01-28 17:13:17 +01:00
Hermès Bélusca-Maïto
ae70120a18 [NTOS:KD64] Add a missing KdEnteredDebugger reset in KdExitDebugger() 2025-01-28 17:13:17 +01:00
Hervé Poussineau
a269aae455 [NTOS:EX] Implement NtSystemDebugControl: SysDbgGetKdBlockEnable/SysDbgSetKdBlockEnable 2025-01-28 17:13:15 +01:00
Hervé Poussineau
e6c20b5446 [NTOS:EX] Implement NtSystemDebugControl: SysDbgGetKdUmExceptionEnable/SysDbgSetKdUmExceptionEnable 2025-01-28 17:13:14 +01:00
Hervé Poussineau
b5f4a928ae [NTOS:EX] Implement NtSystemDebugControl: SysDbgGetPrintBufferSize 2025-01-28 17:13:13 +01:00
Hervé Poussineau
7a5d450218 [NTOS:EX] Implement NtSystemDebugControl: SysDbgGetAutoKdEnable/SysDbgSetAutoKdEnable 2025-01-28 17:13:11 +01:00
Hervé Poussineau
698eaaceda [NTOS:EX] Implement NtSystemDebugControl: SysDbgEnableKernelDebugger/SysDbgDisableKernelDebugger 2025-01-28 17:13:10 +01:00
Hervé Poussineau
55d91fccdf [NTOS:EX] Implement NtSystemDebugControl: SysDbgBreakPoint 2025-01-28 17:13:08 +01:00
Hervé Poussineau
936e7a8b36 [NTOS:KD64] Implement KdSystemDebugControl: SysDbgCheckLowMemory 2025-01-28 17:13:08 +01:00
Hervé Poussineau
c570cbf5cd [NTOS:KD64] Implement KdSystemDebugControl: SysDbgReadBusData/SysDbgWriteBusData 2025-01-28 17:13:07 +01:00
Hervé Poussineau
2d378eeeb7 [NTOS:KD64] Implement KdSystemDebugControl: SysDbgReadMsr/SysDbgWriteMsr 2025-01-28 17:13:06 +01:00
Hervé Poussineau
a8e03d6da9 [NTOS:KD64] Implement KdSystemDebugControl: SysDbgReadIoSpace/SysDbgWriteIoSpace 2025-01-28 17:13:05 +01:00
Hervé Poussineau
d27c012891 [NTOS:KD64] Implement KdSystemDebugControl: SysDbgReadControlSpace/SysDbgWriteControlSpace 2025-01-28 17:13:03 +01:00
Hervé Poussineau
1bec6a3094 [NTOS:KD64] Implement KdSystemDebugControl: SysDbgReadPhysical/SysDbgWritePhysical 2025-01-28 17:13:01 +01:00
Hervé Poussineau
7974e47690 [NTOS:KD64] Implement KdSystemDebugControl: SysDbgReadVirtual/SysDbgWriteVirtual 2025-01-28 17:13:00 +01:00
Hervé Poussineau
51e13a366a [NTOS:KD64] Implement KdSystemDebugControl: SysDbgQueryVersion 2025-01-28 17:12:57 +01:00
Hervé Poussineau
1c0d5734dd [NTOS:EX] In NtSystemDebugControl, check for SeDebugPrivilege 2025-01-28 17:12:56 +01:00
Hervé Poussineau
bdfc074a41 [NTOS:EX] Improve NtSystemDebugControl
- Add SEH probing for user buffer
- Mark some classes as i386 only
- Explicitly return STATUS_NOT_IMPLEMENTED on disabled classes (must use KdSystemDebugControl instead)
- Explicitly return STATUS_NOT_IMPLEMENTED on not implemented classes
- Return STATUS_INVALID_INFO_CLASS on all other classes
2025-01-28 17:12:55 +01:00
Hervé Poussineau
9cb25e62b3 [NTOS:KD64] Improve KdSystemDebugControl
- Explicitly return STATUS_NOT_IMPLEMENTED on not implemented classes
- Return STATUS_INVALID_INFO_CLASS on all other classes
2025-01-28 17:12:54 +01:00
Hermès Bélusca-Maïto
8eda8b69d5 [NTOS:EX:KD64] Add Doxygen documentation for Nt/KdSystemDebugControl.
Based from external documentation:
https://www.ivanlef0u.tuxfamily.org/?p=21
https://www.ivanlef0u.tuxfamily.org/?p=382
http://pds8.egloos.com/pds/200807/09/51/Subverting_Windows_2003_Service_Pack_1_Kernel_Integrity_Protection.pdf
http://www.nynaeve.net/?p=114
https://media.defcon.org/DEF%20CON%2030/DEF%20CON%2030%20presentations/Eran%20Segal%20-%20The%20COW%20%28Container%20On%20Windows%29%20Who%20Escaped%20the%20Silo.pdf
https://vidstromlabs.com/blog/memory-dumping-with-ntsystemdebugcontrol/
https://www.kernelmode.info/forum/viewtopic0aa3.html?t=5317
2025-01-28 17:12:53 +01:00
Hermès Bélusca-Maïto
5fc675515b [NDK][NTOS:EX:KD64] Add SAL annotations to Kd/Nt/ZwSystemDebugControl. 2025-01-28 17:12:51 +01:00
Hermès Bélusca-Maïto
b1407aae4c [NTOS:KD64] Simplify some code in debugging helpers 2025-01-28 17:12:50 +01:00
Hermès Bélusca-Maïto
20179408eb [NTOS:KD64] Add annotations to debugger control routines used in Kd/Nt/ZwSystemDebugControl 2025-01-28 17:12:48 +01:00
Hervé Poussineau
bef9e57cf7 [NTOS:MM] Allow not providing MMDBG_COPY_UNSAFE in MmDbgCopyMemory
Replace an assert by a log, as this works most of the times.
2025-01-28 17:12:47 +01:00
Hervé Poussineau
5948011612 [NTOS:EX] Allow calling ExLockUserBuffer up to DISPATCH_LEVEL 2025-01-28 17:12:46 +01:00
Hervé Poussineau
402a2b1401 [NTOS:EX] Add prototypes for ExLockUserBuffer/ExUnlockUserBuffer 2025-01-28 17:12:45 +01:00
Hermès Bélusca-Maïto
f416c4f16e [NDK] SYSDBG: Add SysDbgKdPullRemoteFile enum value and structure (Win10 19041+)
From https://github.com/processhacker/phnt/
2025-01-28 17:12:43 +01:00
Hermès Bélusca-Maïto
06bf42d900 [NDK] SYSDBG: Add SysDbgGetLiveKernelDump enum value and structures for kernel live dump.
For more information, see:
https://crashdmp.wordpress.com/2014/08/04/livedump-1-0-is-available/
https://github.com/lilhoser/livedump
https://gary-nebbett.blogspot.com/2016/04/examining-windows-kernel-mode-stacks.html
https://github.com/processhacker/phnt
2025-01-28 17:12:42 +01:00
Hermès Bélusca-Maïto
e2a3da5a13 [NDK] SYSDBG: Add versioning info for Vista+ commands. 2025-01-28 17:12:34 +01:00
1026 changed files with 29388 additions and 71502 deletions

View File

@@ -1,19 +0,0 @@
{
"indentation": {
"type": "spaces",
"size": 4
},
"lineLength": 100,
"braceStyle": "allman",
"namingConventions": {
"functions": {
"public": "PascalCase",
"private": "_PascalCase"
},
"variables": {
"local": "camelCase",
"global": "PascalCase",
"constants": "UPPER_CASE"
}
}
}

View File

@@ -1,52 +0,0 @@
{
"editor": {
"defaultFormatter": null
},
"[c,cpp]": {
"editor": {
"tabSize": 4,
"insertSpaces": true,
"detectIndentation": false,
"trimAutoWhitespace": true,
"formatOnSave": false,
"formatOnType": true,
"defaultFormatter": "clang-format",
"rulers": [100],
"wordWrap": "off"
}
},
"files": {
"associations": {
"*.c": "c",
"*.h": "c",
"*.cpp": "cpp",
"*.hpp": "cpp"
},
"encoding": "utf8",
"trimTrailingWhitespace": true,
"insertFinalNewline": true,
"exclude": {
"**/.git": true,
"compile_commands.json": true,
"output-*": true,
"modules/optional": true,
"modules/3rdparty": true,
"modules/bootcd_extras": true,
"modules/livecd_extras": true,
"modules/hybridcd_extras": true,
"modules/[Aa][Hh][Kk]_[Tt]ests": true,
".cache": true,
".cproject": true,
".DS_Store": true,
".project": true,
".settings": true,
".vscode": true,
"sdk/tools/winesync/winesync.cfg": true,
"**/build": true,
"**/obj": true,
"**/bin": true,
"**/*.o": true,
"**/*.obj": true
}
}
}

View File

@@ -1,46 +0,0 @@
{
"projectType": "reactos",
"language": {
"c": {
"standard": "c99",
"warnings": ["all", "error", "pedantic", "unused"],
"formatter": "clang-format",
"linter": "clang-tidy"
},
"cpp": {
"standard": "c++11",
"warnings": ["all", "error", "pedantic", "unused"],
"formatter": "clang-format",
"linter": "clang-tidy"
}
},
"codingStyle": "reactos",
"formatOnSave": false,
"lintOnSave": false,
"paths": {
"source": [
"base",
"boot",
"dll",
"drivers",
"hal",
"ntoskrnl",
"subsystems",
"win32ss"
],
"include": [
"sdk/include"
],
"docs": [
"**/*.md",
"media/doc/*.md",
"media/doc/*.txt"
],
"tests": [
"modules/rostests"
],
"build": [
"output-*"
]
}
}

3
.gitattributes vendored
View File

@@ -30,9 +30,6 @@
*.TXT text
*.y text
# Files with these extensions must always have LF (Unix) line endings.
*.sh text eol=lf
# Files with these extensions end up in the built ReactOS system, so they
# need to have CRLF line endings.
*.bat text eol=crlf

View File

@@ -17,8 +17,3 @@ _Use a TODO when your pull request is Work in Progress._
- [ ]
- [ ]
## Testbot runs (Filled in by Devs)
- [ ] KVM x86:
- [ ] KVM x64:

2
.gitignore vendored
View File

@@ -13,5 +13,3 @@ modules/[Aa][Hh][Kk]_[Tt]ests
.settings
.vscode
sdk/tools/winesync/winesync.cfg
.cursor/cache/
.cursor/logs/

View File

@@ -157,10 +157,7 @@ if(NOT CMAKE_CROSSCOMPILING)
set(NATIVE_TARGETS asmpp bin2c widl gendib cabman fatten hpp isohybrid mkhive mkisofs obj2bin spec2def geninc mkshelllink utf16le xml2sdb)
if(NOT MSVC)
list(APPEND NATIVE_TARGETS pefixup)
if (ARCH STREQUAL "i386")
list(APPEND NATIVE_TARGETS rsym)
endif()
list(APPEND NATIVE_TARGETS rsym pefixup)
endif()
install(TARGETS ${NATIVE_TARGETS})

View File

@@ -338,11 +338,6 @@
amd64/ @tkreuzer
/boot/freeldr/freeldr/arch/realmode/amd64.S @tkreuzer
# Wine DirectX
# M: The_DarkFire_, Justin Miller
# S: Upstream
/dll/directx/wine/ @DarkFire01
# Translations
# This is the list of translation teams in ReactOS GitHub organization.
# If you want to be part of one - hit us at https://chat.reactos.org/

View File

@@ -1,356 +0,0 @@
# Coding Style
This article describes general coding style guidelines, which should be used for new ReactOS code. These guidelines apply exclusively to C and C++ source files. The Members of ReactOS agreed on this document in the October 2013 meeting.
As much existing ReactOS code as possible should be converted to this style unless there are reasons against doing this (like if the code is going to be rewritten from scratch in the near future). See [Notes on reformatting existing code](#notes-on-reformatting-existing-code) for more details.
Code synchronized with other sources (like Wine) must not be rewritten. [3rd Party Files.txt](https://github.com/reactos/reactos/blob/master/media/doc/3rd%20Party%20Files.txt) and [WINESYNC.txt](https://github.com/reactos/reactos/blob/master/media/doc/WINESYNC.txt) files can be used for tracking synchronized files.
## File Structure
1. Every ReactOS source code file should include a file header like this:
```
/*
* PROJECT: ReactOS Kernel
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Does cool things like Memory Management
* COPYRIGHT: Copyright 2017 Arno Nymous <abc@mailaddress.com>
* Copyright 2017 Mike Blablabla <mike@blabla.com>
*/
```
Please use SPDX license identifiers available at https://spdx.org/licenses.
This makes our source file parseable by licensing tools!
You should add yourself to the `COPYRIGHT` section of a file if you did a major contribution to it and could take responsibility for the whole file or a part of it. Not more than 3 people shall be in that list for each file.
`FILE` line of the old header should be removed.
2. [Doxygen](https://doxygen.reactos.org/) documentation generator is used for ReactOS codebase, so use a proper header for functions, see [API Documentation](https://reactos.org/wiki/Documentation_Guidelines#API_Documentation) for details.
## Indentation and line width
1. Line width must be at most **100 characters**.
2. Do not add a space or tab at the end of any line.
3. Indent with **4 spaces**, don't use tabs!
4. Indent both a case label and the case statement of a switch statement.
**Right:**
```c
switch (Condition)
{
case 1:
DoSomething();
break;
case 2:
{
DoMany();
ManyMore();
OtherThings();
break;
}
}
```
**Wrong:**
```c
switch(Condition)
{
case 1:
DoSomething();
break;
case 2:
DoMany();
ManyMore();
OtherThings();
break;
}
```
5. When a function call does not fit onto a line, align arguments like this:
```c
FunctionCall(arg1,
arg2,
arg3);
```
6. Function headers should have this format (preserving the order as in the example):
```c
static // scope identifier
CODE_SEG("PAGE") // section placement
// other attributes
BOOLEAN // return type
FASTCALL // calling convention
IsOdd(
_In_ UINT32 Number);
```
## Spacing
1. Do not use spaces around unary operators.
**Right:** `i++;`
**Wrong:** `i ++;`
2. Place spaces around binary and ternary operators.
**Right:** `a = b + c;`
**Wrong:** `a=b+c;`
3. Do not place spaces before comma and semicolon.
**Right:**
```c
for (int i = 0; i < 5; i++)
DoSomething();
func1(a, b);
```
**Wrong:**
```c
for (int i = 0; i < 5 ; i++)
DoSomething();
func1(a , b) ;
```
4. Place spaces between control statements and their parentheses.
**Right:**
```c
if (Condition)
DoSomething();
```
**Wrong:**
```c
if(Condition)
DoSomething();
```
5. Do not place spaces between a function and its parentheses, or between a parenthesis and its content.
**Right:**
```c
func(a, b);
```
**Wrong:**
```c
func (a, b);
func( a, b );
```
## Line breaking
1. Each statement should get its own line.
**Right:**
```c
x++;
y++;
if (Condition)
DoSomething();
```
**Wrong:**
```c
x++; y++;
if (Condition) DoSomething();
```
## Braces
1. Always put braces (`{` and `}`) on their own lines.
2. One-line control clauses may use braces, but this is not a requirement. An exception are one-line control clauses including additional comments.
**Right:**
```c
if (Condition)
DoSomething();
if (Condition)
{
DoSomething();
}
if (Condition)
{
// This is a comment
DoSomething();
}
if (A_Very || (Very && Long || Condition) &&
On_Many && Lines)
{
DoSomething();
}
if (Condition)
DoSomething();
else
DoSomethingElse();
if (Condition)
{
DoSomething();
}
else
{
DoSomethingElse();
YetAnother();
}
```
**Wrong:**
```c
if (Condition) {
DoSomething();
}
if (Condition)
// This is a comment
DoSomething();
if (A_Very || (Very && Long || Condition) &&
On_Many && Lines)
DoSomething();
if (Condition)
DoSomething();
else {
DoSomethingElse();
YetAnother();
}
```
## Control structures
1. Don't use inverse logic in control clauses.
**Right:** `if (i == 1)`
**Wrong:** `if (1 == i)`
2. Avoid too many levels of cascaded control structures. Prefer a "linear style" over a "tree style". Use `goto` when it helps to make the code cleaner (e.g. for cleanup paths).
**Right:**
```c
if (!func1())
return;
i = func2();
if (i == 0)
return;
j = func3();
if (j == 1)
return;
...
```
**Wrong:**
```c
if (func1())
{
i = func2();
if (func2())
{
j = func3();
if (func3())
{
...
}
}
}
```
## Naming
1. Capitalize names of variables and functions. Hungarian Notation may be used when developing for Win32, but it is not required. If you don't use it, the first letter of a name must be a capital too (no lowerCamelCase). Do not use underscores as separators either.
**Right:**
```c
PLIST_ENTRY FirstEntry;
VOID NTAPI IopDeleteIoCompletion(PVOID ObjectBody);
PWSTR pwszTest;
```
**Wrong:**
```c
PLIST_ENTRY first_entry;
VOID NTAPI iop_delete_io_completion(PVOID objectBody);
PWSTR pwsztest;
```
2. Avoid abbreviating function and variable names, use descriptive verbs where possible.
3. Precede boolean values with meaningful verbs like "is" and "did" if possible and if it fits the usage.
**Right:**
```c
BOOLEAN IsValid;
BOOLEAN DidSendData;
```
**Wrong:**
```c
BOOLEAN Valid;
BOOLEAN SentData;
```
## Commenting
1. Avoid line-wasting comments, which could fit into a single line.
**Right:**
```c
// This is a one-line comment
/* This is a C-style comment */
// This is a comment over multiple lines.
// We don't define any strict rules for it.
```
**Wrong:**
```c
//
// This comment wastes two lines
//
```
## Null, false and 0
1. The null pointer should be written as `NULL`. In the rare case that your environment recommends a different null pointer (e.g. C++11 `nullptr`), you may use this one of course. Just don't use the value `0`.
2. Win32/NT Boolean values should be written as `TRUE` and `FALSE`. In the rare case that you use C/C++ `bool` variables, you should write them as `true` and `false`.
3. When you need to terminate ANSI or OEM string, or check for its terminator, use `ANSI_NULL`. If the string is Unicode or Wide string, use `UNICODE_NULL`.
## Notes on reformatting existing code
- Never totally reformat a file and put a code change into it. Do this in separate commits.
- If a commit only consists of formatting changes, say this clearly in the commit message by preceding it with *[FORMATTING]*.
## Other points
- Do not use `LARGE_INTEGER`/`ULARGE_INTEGER` unless needed for using APIs. Use `INT64`/`UINT64` instead
- Use `#pragma once` instead of guard defines in headers
- Don't specify a calling convention for a function unless required (usually for APIs or exported symbols)
## Using an automatic code style tool
TO BE ADDED BY User:Zefklop
## Points deliberately left out
Additional ideas were suggested during the discussion of this document, but a consensus couldn't be reached on them. Therefore we refrain from enforcing any rules on these points:
- TO BE ADDED BY User:Hbelusca
## See also
- [Kernel Coding Style](https://reactos.org/wiki/Kernel_Coding_Style)
- [GNU Indent](https://reactos.org/wiki/GNU_Indent)

View File

@@ -7,8 +7,8 @@
---
<p align=center>
<a href="https://reactos.org/project-news/reactos-0415-released/">
<img alt="ReactOS 0.4.15 Release" src="https://img.shields.io/badge/release-0.4.15-0688CB.svg"></a>
<a href="https://reactos.org/project-news/reactos-0414-released/">
<img alt="ReactOS 0.4.14 Release" src="https://img.shields.io/badge/release-0.4.14-0688CB.svg"></a>
<a href="https://reactos.org/download/">
<img alt="Download ReactOS" src="https://img.shields.io/badge/download-latest-0688CB.svg"></a>
<a href="https://sourceforge.net/projects/reactos/">

View File

@@ -3,7 +3,6 @@ add_subdirectory(atactl)
add_subdirectory(cacls)
add_subdirectory(calc)
add_subdirectory(charmap)
add_subdirectory(cleanmgr)
add_subdirectory(clipbrd)
add_subdirectory(cmdutils)
add_subdirectory(control)

View File

@@ -1,9 +0,0 @@
project(cleanmgr)
# The main application
add_subdirectory(cleanmgr)
# Cleanup handlers
#add_subdirectory(dataclen) # Data Driven Cleaner

View File

@@ -1,212 +0,0 @@
/*
* PROJECT: ReactOS Disk Cleanup
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: CCleanupHandler implementation
* COPYRIGHT: Copyright 2023-2025 Mark Jansen <mark.jansen@reactos.org>
*/
#include "cleanmgr.h"
CCleanupHandler::CCleanupHandler(CRegKey &subKey, const CStringW &keyName, const GUID &guid)
: hSubKey(subKey)
, KeyName(keyName)
, Guid(guid)
, dwFlags(0)
, Priority(0)
, StateFlags(0)
, SpaceUsed(0)
, ShowHandler(true)
, hIcon(NULL)
{
}
CCleanupHandler::~CCleanupHandler()
{
Deactivate();
::DestroyIcon(hIcon);
}
void
CCleanupHandler::Deactivate()
{
if (Handler)
{
DWORD dwFlags = 0;
Handler->Deactivate(&dwFlags);
if (dwFlags & EVCF_REMOVEFROMLIST)
UNIMPLEMENTED_DBGBREAK();
}
}
bool
CCleanupHandler::Initialize(LPCWSTR pcwszVolume)
{
if (FAILED_UNEXPECTEDLY(
::CoCreateInstance(Guid, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARG(IEmptyVolumeCache, &Handler))))
{
return false;
}
DWORD dwSize = sizeof(Priority);
if (hSubKey.QueryBinaryValue(L"Priority", &Priority, &dwSize) != ERROR_SUCCESS)
{
if (hSubKey.QueryDWORDValue(L"Priority", Priority) != ERROR_SUCCESS)
Priority = 200;
}
dwSize = sizeof(StateFlags);
if (hSubKey.QueryDWORDValue(L"StateFlags", StateFlags) != ERROR_SUCCESS)
StateFlags = 0;
WCHAR PathBuffer[MAX_PATH] = {};
ULONG nChars = _countof(PathBuffer);
if (hSubKey.QueryStringValue(L"IconPath", PathBuffer, &nChars) != ERROR_SUCCESS)
{
CStringW Tmp;
WCHAR GuidStr[50] = {};
if (StringFromGUID2(Guid, GuidStr, _countof(GuidStr)))
{
Tmp.Format(L"CLSID\\%s\\DefaultIcon", GuidStr);
CRegKey clsid;
nChars = _countof(PathBuffer);
if (clsid.Open(HKEY_CLASSES_ROOT, Tmp, KEY_READ) != ERROR_SUCCESS ||
clsid.QueryStringValue(NULL, PathBuffer, &nChars) != ERROR_SUCCESS)
{
PathBuffer[0] = UNICODE_NULL;
}
}
}
if (!PathBuffer[0])
StringCchCopyW(PathBuffer, _countof(PathBuffer), L"%systemroot%\\system32\\shell32.dll");
int Index = 0;
WCHAR *ptr = wcschr(PathBuffer, L',');
if (ptr)
{
*ptr++ = UNICODE_NULL;
Index = wcstol(ptr, NULL, 10);
}
HICON Large, Small;
UINT Result = ExtractIconExW(PathBuffer, Index, &Large, &Small, 1);
if (Result < 1)
Result = ExtractIconExW(L"%systemroot%\\system32\\shell32.dll", 0, &Large, &Small, 1);
if (Result >= 1)
{
hIcon = Small;
if (!hIcon)
{
hIcon = Large;
}
else
{
::DestroyIcon(Large);
}
}
// These options should come from the command line
// dwFlags |= EVCF_SETTINGSMODE;
// dwFlags |= EVCF_OUTOFDISKSPACE;
CComPtr<IEmptyVolumeCache2> spHandler2;
HRESULT hr = Handler->QueryInterface(IID_PPV_ARG(IEmptyVolumeCache2, &spHandler2));
if (SUCCEEDED(hr))
{
hr = spHandler2->InitializeEx(
hSubKey, pcwszVolume, KeyName, &wszDisplayName, &wszDescription, &wszBtnText, &dwFlags);
if (FAILED_UNEXPECTEDLY(hr))
return false;
// No files to clean will return S_FALSE;
if (hr != S_OK)
return false;
}
else
{
// Observed behavior:
// When Initialize is called, wszDescription is actually pointing to data
// wszDescription.AllocateBytes(0x400u);
hr = Handler->Initialize(hSubKey, pcwszVolume, &wszDisplayName, &wszDescription, &dwFlags);
if (FAILED_UNEXPECTEDLY(hr))
return false;
// No files to clean will return S_FALSE;
if (hr != S_OK)
return false;
CComPtr<IPropertyBag> spBag;
WCHAR GuidStr[50] = {};
nChars = _countof(GuidStr);
if (hSubKey.QueryStringValue(L"PropertyBag", GuidStr, &nChars) == ERROR_SUCCESS)
{
GUID guid = {};
if (!FAILED_UNEXPECTEDLY(CLSIDFromString(GuidStr, &guid)))
{
FAILED_UNEXPECTEDLY(
CoCreateInstance(guid, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARG(IPropertyBag, &spBag)));
}
}
ReadProperty(L"Display", spBag, wszDisplayName);
ReadProperty(L"Description", spBag, wszDescription);
if (dwFlags & EVCF_HASSETTINGS)
{
ReadProperty(L"AdvancedButtonText", spBag, wszBtnText);
}
}
if ((dwFlags & EVCF_ENABLEBYDEFAULT) && !(StateFlags & HANDLER_STATE_SELECTED))
{
StateFlags |= HANDLER_STATE_SELECTED;
}
// For convenience
if (!wszDisplayName)
SHStrDupW(KeyName, &wszDisplayName);
return true;
}
void
CCleanupHandler::ReadProperty(LPCWSTR Name, IPropertyBag *pBag, CComHeapPtr<WCHAR> &storage)
{
if (storage)
return;
if (pBag)
{
CComVariant tmp;
tmp.vt = VT_BSTR;
HRESULT hr = pBag->Read(Name, &tmp, NULL);
if (!FAILED_UNEXPECTEDLY(hr) && tmp.vt == VT_BSTR)
{
SHStrDupW(tmp.bstrVal, &storage);
}
}
if (!storage)
{
WCHAR TmpStr[0x200] = {};
DWORD dwSize = _countof(TmpStr);
if (hSubKey.QueryStringValue(Name, TmpStr, &dwSize) == ERROR_SUCCESS)
{
WCHAR ResolvedStr[0x200] = {};
SHLoadIndirectString(TmpStr, ResolvedStr, _countof(ResolvedStr), NULL);
SHStrDupW(ResolvedStr, &storage);
}
}
}
BOOL
CCleanupHandler::HasSettings() const
{
return !!(dwFlags & EVCF_HASSETTINGS);
}
BOOL
CCleanupHandler::DontShowIfZero() const
{
return !!(dwFlags & EVCF_DONTSHOWIFZERO);
}

View File

@@ -1,48 +0,0 @@
/*
* PROJECT: ReactOS Disk Cleanup
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: CCleanupHandler definition
* COPYRIGHT: Copyright 2023-2025 Mark Jansen <mark.jansen@reactos.org>
*/
#define HANDLER_STATE_SELECTED 1
struct CCleanupHandler
{
CCleanupHandler(CRegKey &subKey, const CStringW &keyName, const GUID &guid);
~CCleanupHandler();
void Deactivate();
bool
Initialize(LPCWSTR pcwszVolume);
void
ReadProperty(LPCWSTR Name, IPropertyBag *pBag, CComHeapPtr<WCHAR> &storage);
BOOL
HasSettings() const;
BOOL
DontShowIfZero() const;
CRegKey hSubKey;
CStringW KeyName;
GUID Guid;
CComHeapPtr<WCHAR> wszDisplayName;
CComHeapPtr<WCHAR> wszDescription;
CComHeapPtr<WCHAR> wszBtnText;
CStringW IconPath;
DWORD dwFlags;
DWORD Priority;
DWORD StateFlags;
CComPtr<IEmptyVolumeCache> Handler;
DWORDLONG SpaceUsed;
bool ShowHandler;
HICON hIcon;
};

View File

@@ -1,163 +0,0 @@
/*
* PROJECT: ReactOS Disk Cleanup
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: CCleanupHandlerList implementation
* COPYRIGHT: Copyright 2023-2025 Mark Jansen <mark.jansen@reactos.org>
*/
#include "cleanmgr.h"
void CCleanupHandlerList::LoadHandlers(WCHAR Drive)
{
m_DriveStr.Format(L"%c:", Drive);
CRegKey VolumeCaches;
if (VolumeCaches.Open(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\VolumeCaches", KEY_READ) != ERROR_SUCCESS)
return;
LONG ItemIndex = 0;
WCHAR szKeyName[MAX_PATH];
WCHAR wszVolume[] = { Drive, L':', L'\\', UNICODE_NULL };
while (TRUE)
{
DWORD dwSize = _countof(szKeyName);
if (VolumeCaches.EnumKey(ItemIndex++, szKeyName, &dwSize) != ERROR_SUCCESS)
{
break;
}
CRegKey hSubKey;
if (hSubKey.Open(VolumeCaches, szKeyName, KEY_READ) == ERROR_SUCCESS)
{
WCHAR GuidStr[50] = {};
dwSize = _countof(GuidStr);
if (hSubKey.QueryStringValue(NULL, GuidStr, &dwSize) != ERROR_SUCCESS)
{
continue;
}
GUID guid = {};
if (FAILED_UNEXPECTEDLY(CLSIDFromString(GuidStr, &guid)))
continue;
CCleanupHandler* handler = new CCleanupHandler(hSubKey, szKeyName, guid);
if (!handler->Initialize(wszVolume))
{
delete handler;
continue;
}
m_Handlers.AddTail(handler);
}
}
// Sort handlers
BOOL fChanged = m_Handlers.GetCount() > 0;
while (fChanged)
{
fChanged = FALSE;
for (size_t n = 0; n < m_Handlers.GetCount() - 1; n++)
{
POSITION leftPos = m_Handlers.FindIndex(n);
POSITION rightPos = m_Handlers.FindIndex(n+1);
CCleanupHandler* left = m_Handlers.GetAt(leftPos);
CCleanupHandler* right = m_Handlers.GetAt(rightPos);
if (right->Priority < left->Priority)
{
m_Handlers.SwapElements(leftPos, rightPos);
fChanged = TRUE;
}
else if (right->Priority == left->Priority)
{
CStringW leftStr(left->wszDisplayName);
if (leftStr.Compare(right->wszDisplayName) > 0)
{
m_Handlers.SwapElements(leftPos, rightPos);
fChanged = TRUE;
}
}
}
}
}
DWORDLONG
CCleanupHandlerList::ScanDrive(IEmptyVolumeCacheCallBack *picb)
{
CProgressDlg progress;
CString Caption;
Caption.Format(IDS_CALCULATING, m_DriveStr.GetString());
CStringW Title(MAKEINTRESOURCE(IDS_DISK_CLEANUP));
progress.Start((DWORD)m_Handlers.GetCount(), Title, Caption);
int ItemIndex = 0;
DWORDLONG TotalSpaceUsed = 0;
ForEach(
[&](CCleanupHandler *current)
{
Caption.Format(IDS_SCANNING, current->wszDisplayName.m_pData);
progress.Step(++ItemIndex, Caption);
HRESULT hr = current->Handler->GetSpaceUsed(&current->SpaceUsed, picb);
if (FAILED_UNEXPECTEDLY(hr))
{
current->ShowHandler = false;
current->StateFlags &= ~HANDLER_STATE_SELECTED;
return;
}
if (current->SpaceUsed == 0 && current->DontShowIfZero())
{
current->ShowHandler = false;
current->StateFlags &= ~HANDLER_STATE_SELECTED;
}
TotalSpaceUsed += current->SpaceUsed;
});
progress.Stop();
return TotalSpaceUsed;
}
void
CCleanupHandlerList::ExecuteCleanup(IEmptyVolumeCacheCallBack *picb)
{
CProgressDlg progress;
CString Caption;
Caption.Format(IDS_CLEANING_CAPTION, m_DriveStr.GetString());
DWORD TotalSelected = 0;
ForEach(
[&](CCleanupHandler *current)
{
if (current->StateFlags & HANDLER_STATE_SELECTED)
TotalSelected++;
});
CStringW Title(MAKEINTRESOURCE(IDS_DISK_CLEANUP));
progress.Start(TotalSelected, Title, Caption);
int ItemIndex = 0;
ForEach(
[&](CCleanupHandler *current)
{
if (!(current->StateFlags & HANDLER_STATE_SELECTED))
return;
Caption.Format(IDS_CLEANING, current->wszDisplayName.m_pData);
progress.Step(++ItemIndex, Caption);
// If there is nothing to clean, we might get STG_E_NOMOREFILES
if (current->SpaceUsed > 0)
{
HRESULT hr = current->Handler->Purge(-1, picb);
if (FAILED_UNEXPECTEDLY(hr))
return;
}
});
progress.Stop();
}

View File

@@ -1,31 +0,0 @@
/*
* PROJECT: ReactOS Disk Cleanup
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: CCleanupHandlerList definition
* COPYRIGHT: Copyright 2023-2025 Mark Jansen <mark.jansen@reactos.org>
*/
class CCleanupHandlerList
{
private:
CAtlList<CCleanupHandler *> m_Handlers;
CStringW m_DriveStr;
public:
void LoadHandlers(WCHAR Drive);
DWORDLONG ScanDrive(IEmptyVolumeCacheCallBack* picb);
void ExecuteCleanup(IEmptyVolumeCacheCallBack *picb);
template<typename Fn>
void ForEach(Fn callback)
{
for (POSITION it = m_Handlers.GetHeadPosition(); it; m_Handlers.GetNext(it))
{
CCleanupHandler *current = m_Handlers.GetAt(it);
callback(current);
}
}
};

View File

@@ -1,54 +0,0 @@
/*
* PROJECT: ReactOS Disk Cleanup
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: CEmptyVolumeCacheCallBack definition / implementation
* COPYRIGHT: Copyright 2023-2025 Mark Jansen <mark.jansen@reactos.org>
*/
// We don't really use this, but some windows handlers crash without it
struct CEmptyVolumeCacheCallBack
: public IEmptyVolumeCacheCallBack
{
STDMETHOD_(ULONG, AddRef)() throw()
{
return 2;
}
STDMETHOD_(ULONG, Release)() throw()
{
return 1;
}
STDMETHOD(QueryInterface)(
REFIID riid,
_COM_Outptr_ void** ppvObject) throw()
{
if (riid == IID_IUnknown || riid == IID_IEmptyVolumeCacheCallBack)
{
*ppvObject = (IUnknown*)this;
return S_OK;
}
*ppvObject = NULL;
return E_NOINTERFACE;
}
STDMETHODIMP ScanProgress(
_In_ DWORDLONG dwlSpaceUsed,
_In_ DWORD dwFlags,
_In_ LPCWSTR pcwszStatus) override
{
DPRINT("dwlSpaceUsed: %lld, dwFlags: %x\n", dwlSpaceUsed, dwFlags);
return S_OK;
}
STDMETHODIMP PurgeProgress(
_In_ DWORDLONG dwlSpaceFreed,
_In_ DWORDLONG dwlSpaceToFree,
_In_ DWORD dwFlags,
_In_ LPCWSTR pcwszStatus) override
{
DPRINT("dwlSpaceFreed: %lld, dwlSpaceToFree: %lld, dwFlags: %x\n", dwlSpaceFreed, dwlSpaceToFree, dwFlags);
return S_OK;
}
};

View File

@@ -1,19 +0,0 @@
add_executable(cleanmgr
cleanmgr.cpp
cleanmgr.h
cleanmgr.rc
resource.h
CEmptyVolumeCacheCallBack.hpp
CProgressDlg.hpp
CSelectDriveDlg.cpp
CCleanupHandler.cpp
CCleanupHandler.hpp
CCleanupHandlerList.cpp
CCleanupHandlerList.hpp
)
set_module_type(cleanmgr win32gui UNICODE)
target_link_libraries(cleanmgr uuid cpprt atl_classes)
add_importlibs(cleanmgr shlwapi oleaut32 ole32 shell32 comctl32 user32 advapi32 msvcrt kernel32 ntdll)
add_dependencies(cleanmgr psdk)
add_cd_file(TARGET cleanmgr DESTINATION reactos/system32 FOR all)

View File

@@ -1,50 +0,0 @@
/*
* PROJECT: ReactOS Disk Cleanup
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Progress dialog implementation
* COPYRIGHT: Copyright 2023-2025 Mark Jansen <mark.jansen@reactos.org>
*/
#pragma once
class CProgressDlg
{
CComPtr<IProgressDialog> m_spProgress;
DWORD m_dwTotal = 0;
public:
~CProgressDlg()
{
Stop();
}
void Start(DWORD dwTotalSteps, LPCWSTR Title, LPCWSTR Text)
{
HRESULT hr = CoCreateInstance(CLSID_ProgressDialog, NULL, CLSCTX_INPROC, IID_PPV_ARG(IProgressDialog, &m_spProgress));
if (FAILED_UNEXPECTEDLY(hr))
return;
m_dwTotal = dwTotalSteps;
m_spProgress->SetTitle(Title);
m_spProgress->SetLine(2, Text, TRUE, NULL);
m_spProgress->StartProgressDialog(NULL, NULL, PROGDLG_NOMINIMIZE, NULL);
m_spProgress->SetProgress(0, m_dwTotal);
}
void Step(DWORD dwProgress, LPCWSTR Text)
{
m_spProgress->SetProgress(dwProgress, m_dwTotal);
m_spProgress->SetLine(1, Text, TRUE, NULL);
}
void Stop()
{
if (m_spProgress)
{
m_spProgress->StopProgressDialog();
m_spProgress.Release();
}
}
};

View File

@@ -1,67 +0,0 @@
/*
* PROJECT: ReactOS Disk Cleanup
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Drive selection dialog
* COPYRIGHT: Copyright 2023-2025 Mark Jansen <mark.jansen@reactos.org>
*/
#include "cleanmgr.h"
class CSelectDriveDlg : public CDialogImpl<CSelectDriveDlg>
{
public:
enum { IDD = IDD_SELECTDRIVE };
BEGIN_MSG_MAP(CSelectDriveDlg)
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
COMMAND_ID_HANDLER(IDOK, OnEndDialog)
COMMAND_ID_HANDLER(IDCANCEL, OnEndDialog)
END_MSG_MAP()
CSelectDriveDlg()
:m_SelectedDrive(UNICODE_NULL)
{
}
LRESULT OnInitDialog(UINT, WPARAM, LPARAM, BOOL&)
{
CWindow cbo = GetDlgItem(IDC_DRIVES);
WCHAR VolumeNameBuffer[MAX_PATH + 1];
CStringW Tmp;
for (WCHAR Drive = 'A'; Drive <= 'Z'; ++Drive)
{
WCHAR RootPathName[] = { Drive,':','\\',0 };
UINT Type = GetDriveTypeW(RootPathName);
if (Type == DRIVE_FIXED)
{
GetVolumeInformationW(RootPathName, VolumeNameBuffer, _countof(VolumeNameBuffer), 0, 0, 0, 0, 0);
Tmp.Format(L"%s (%.2s)", VolumeNameBuffer, RootPathName);
int index = (int)cbo.SendMessage(CB_ADDSTRING, NULL, (LPARAM)Tmp.GetString());
cbo.SendMessage(CB_SETITEMDATA, index, Drive);
}
}
cbo.SendMessage(CB_SETCURSEL, 0);
return 1;
}
LRESULT OnEndDialog(WORD, WORD wID, HWND, BOOL&)
{
CWindow cbo = GetDlgItem(IDC_DRIVES);
m_SelectedDrive = (WCHAR)cbo.SendMessage(CB_GETITEMDATA, cbo.SendMessage(CB_GETCURSEL));
EndDialog(wID);
return 0;
}
WCHAR m_SelectedDrive;
};
void
SelectDrive(WCHAR &Drive)
{
CSelectDriveDlg dlgSelectDrive;
if (dlgSelectDrive.DoModal() == IDOK)
{
Drive = dlgSelectDrive.m_SelectedDrive;
}
}

View File

@@ -1,296 +0,0 @@
/*
* PROJECT: ReactOS Disk Cleanup
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Disk cleanup entrypoint
* COPYRIGHT: Copyright 2023-2025 Mark Jansen <mark.jansen@reactos.org>
*/
#include "cleanmgr.h"
// for listview with extend style LVS_EX_CHECKBOXES, State image 1 is the unchecked box, and state image 2 is the
// checked box. see this: https://docs.microsoft.com/en-us/windows/win32/controls/extended-list-view-styles
#define STATEIMAGETOINDEX(x) (((x)&LVIS_STATEIMAGEMASK) >> 12)
#define STATEIMAGE_UNCHECKED 1
#define STATEIMAGE_CHECKED 2
struct CCleanMgrProperties :
public CPropertyPageImpl<CCleanMgrProperties>
{
enum { IDD = IDD_PROPERTIES_MAIN };
CWindow m_HandlerListControl;
WCHAR m_Drive;
DWORDLONG m_TotalSpaceUsed;
CCleanupHandlerList* m_HandlerList;
bool m_IgnoreChanges = true;
CCleanMgrProperties(WCHAR Drive, DWORDLONG TotalSpaceUsed, CCleanupHandlerList *handlerList)
: m_Drive(Drive)
, m_TotalSpaceUsed(TotalSpaceUsed)
, m_HandlerList(handlerList)
{
}
int OnApply()
{
CStringW Title(MAKEINTRESOURCE(IDS_DISK_CLEANUP));
CStringW Text(MAKEINTRESOURCE(IDS_CONFIRM_DELETE));
if (MessageBoxW(Text, Title, MB_YESNO | MB_ICONQUESTION) != IDYES)
return PSNRET_INVALID;
return PSNRET_NOERROR;
}
LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
HICON hIcon = (HICON)::LoadImageW(
_AtlBaseModule.GetResourceInstance(), MAKEINTRESOURCEW(IDI_CLEANMGR), IMAGE_ICON, 0, 0,
LR_DEFAULTSIZE | LR_SHARED);
SendDlgItemMessage(IDC_DISKICON, STM_SETICON, (WPARAM)hIcon);
m_HandlerListControl = GetDlgItem(IDC_HANDLERLIST);
RECT rc;
m_HandlerListControl.GetClientRect(&rc);
rc.right -= GetSystemMetrics(SM_CXVSCROLL);
LV_COLUMN column = {};
column.mask = LVCF_FMT | LVCF_WIDTH;
column.fmt = LVCFMT_LEFT;
column.cx = rc.right * 80 / 100;
ListView_InsertColumn(m_HandlerListControl, 0, &column);
column.fmt = LVCFMT_RIGHT;
column.cx = rc.right * 20 / 100;
ListView_InsertColumn(m_HandlerListControl, 1, &column);
HIMAGELIST hImagelist = ImageList_Create(16, 16, ILC_MASK | ILC_COLOR32, 1, 1);
ListView_SetImageList(m_HandlerListControl, hImagelist, LVSIL_SMALL);
ListView_SetExtendedListViewStyleEx(m_HandlerListControl, LVS_EX_CHECKBOXES | LVS_EX_FULLROWSELECT, LVS_EX_CHECKBOXES | LVS_EX_FULLROWSELECT);
m_HandlerList->ForEach(
[&](CCleanupHandler *current)
{
if (!current->ShowHandler)
return;
LV_ITEM item = {};
item.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM;
item.lParam = (LPARAM)current;
item.pszText = (LPWSTR)current->wszDisplayName;
item.iItem = ListView_GetItemCount(m_HandlerListControl);
item.iImage = ImageList_AddIcon(hImagelist, current->hIcon);
item.iItem = ListView_InsertItem(m_HandlerListControl, &item);
ListView_SetCheckState(
m_HandlerListControl, item.iItem, !!(current->StateFlags & HANDLER_STATE_SELECTED));
item.mask = LVIF_TEXT;
WCHAR ByteSize[100] = {};
StrFormatByteSizeW(current->SpaceUsed, ByteSize, _countof(ByteSize));
ListView_SetItemText(m_HandlerListControl, item.iItem, 1, ByteSize);
});
// Now we should start responding to changes
m_IgnoreChanges = false;
// Select the first item
ListView_SetItemState(m_HandlerListControl, 0, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED);
UpdateSpaceUsed();
return TRUE;
}
CCleanupHandler* GetHandler(int Index)
{
LVITEMW item = {};
item.iItem = Index;
if (item.iItem >= 0)
{
item.mask = LVIF_PARAM;
ListView_GetItem(m_HandlerListControl, &item);
return (CCleanupHandler*)item.lParam;
}
return nullptr;
}
LRESULT OnDetails(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
{
CCleanupHandler *handler = GetHandler(ListView_GetNextItem(m_HandlerListControl, -1, LVIS_FOCUSED));
if (handler)
{
handler->Handler->ShowProperties(m_hWnd);
}
return 0L;
}
LRESULT OnHandlerItemchanged(int idCtrl, LPNMHDR pnmh, BOOL& bHandled)
{
if (idCtrl == IDC_HANDLERLIST)
{
// We are still initializing, don't respond to changes just yet!
if (m_IgnoreChanges)
return 0L;
LPNMLISTVIEW pnic = (LPNMLISTVIEW)pnmh;
// We only care about state changes
if (!(pnic->uChanged & LVIF_STATE))
return 0L;
INT ItemIndex = pnic->iItem;
if (ItemIndex == -1 || ItemIndex >= ListView_GetItemCount(pnic->hdr.hwndFrom))
{
return 0L;
}
bool GotSelected = (pnic->uNewState & LVIS_SELECTED) && !(pnic->uOldState & LVIS_SELECTED);
if (GotSelected)
{
CWindow DetailsButton = GetDlgItem(IDC_DETAILS);
CCleanupHandler* handler = (CCleanupHandler*)pnic->lParam;
SetDlgItemText(IDC_DESCRIPTION, handler->wszDescription ? handler->wszDescription : L"");
if (handler->HasSettings())
{
DetailsButton.ShowWindow(SW_SHOW);
DetailsButton.SetWindowText(handler->wszBtnText);
}
else
{
DetailsButton.ShowWindow(SW_HIDE);
}
}
int iOldState = STATEIMAGETOINDEX(pnic->uOldState);
int iNewState = STATEIMAGETOINDEX(pnic->uNewState);
if ((iOldState ^ iNewState) == (STATEIMAGE_UNCHECKED ^ STATEIMAGE_CHECKED))
{
CCleanupHandler* handler = (CCleanupHandler*)pnic->lParam;
if (iNewState == STATEIMAGE_CHECKED)
handler->StateFlags |= HANDLER_STATE_SELECTED;
else
handler->StateFlags &= ~HANDLER_STATE_SELECTED;
UpdateSpaceUsed();
}
}
return 0L;
}
void UpdateSpaceUsed()
{
CStringW tmp;
WCHAR ByteSize[100];
StrFormatByteSizeW(m_TotalSpaceUsed, ByteSize, _countof(ByteSize));
tmp.Format(IDS_TOTAL_CLEANABLE_CAPTION, ByteSize, m_Drive);
SetDlgItemText(IDC_TOTAL_CLEANABLE, tmp);
DWORDLONG SelectedGained = 0;
m_HandlerList->ForEach(
[&](CCleanupHandler *current)
{
if (current->StateFlags & HANDLER_STATE_SELECTED)
{
SelectedGained += current->SpaceUsed;
}
});
StrFormatByteSizeW(SelectedGained, ByteSize, _countof(ByteSize));
SetDlgItemText(IDC_SELECTED_GAINED, ByteSize);
}
BEGIN_MSG_MAP(CCleanMgrProperties)
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
COMMAND_ID_HANDLER(IDC_DETAILS, OnDetails)
NOTIFY_HANDLER(IDC_HANDLERLIST, LVN_ITEMCHANGED, OnHandlerItemchanged)
CHAIN_MSG_MAP(CPropertyPageImpl<CCleanMgrProperties>) // Allow the default handler to call 'OnApply' etc
END_MSG_MAP()
};
class CCleanMgrModule : public ATL::CAtlExeModuleT< CCleanMgrModule >
{
public:
WCHAR m_Drive = UNICODE_NULL;
bool ParseCommandLine(
_In_z_ LPCTSTR lpCmdLine,
_Out_ HRESULT* pnRetCode) throw()
{
int argc = 0;
CLocalPtr<LPWSTR> argv(CommandLineToArgvW(lpCmdLine, &argc));
for (int n = 1; n < argc; ++n)
{
if ((argv[n][0] == '/' || argv[n][0] == '-') && towlower(argv[n][1]) == 'd')
{
if (iswalpha(argv[n][2]))
{
m_Drive = towupper(argv[n][2]);
continue;
}
if ((n + 1) < argc)
{
m_Drive = towupper(argv[n + 1][0]);
++n;
continue;
}
}
}
*pnRetCode = S_OK;
return true;
}
HRESULT Run(_In_ int nShowCmd) throw()
{
if (m_Drive == UNICODE_NULL)
{
SelectDrive(m_Drive);
}
if (m_Drive == UNICODE_NULL)
return E_FAIL;
CCleanupHandlerList Handlers;
CEmptyVolumeCacheCallBack CacheCallBack;
Handlers.LoadHandlers(m_Drive);
DWORDLONG TotalSpaceUsed = Handlers.ScanDrive(&CacheCallBack);
CCleanMgrProperties cleanMgr(m_Drive, TotalSpaceUsed, &Handlers);
HPROPSHEETPAGE hpsp[1] = { cleanMgr.Create() };
PROPSHEETHEADERW psh = { };
psh.dwSize = sizeof(psh);
psh.dwFlags = PSH_NOAPPLYNOW | PSH_USEICONID | PSH_NOCONTEXTHELP;
psh.hInstance = _AtlBaseModule.GetResourceInstance();
psh.pszIcon = MAKEINTRESOURCEW(IDI_CLEANMGR);
CStringW Title;
Title.Format(IDS_PROPERTIES_MAIN_TITLE, m_Drive);
psh.pszCaption = Title;
psh.nPages = _countof(hpsp);
psh.phpage = hpsp;
if (PropertySheetW(&psh) >= 1)
{
Handlers.ExecuteCleanup(&CacheCallBack);
}
return S_OK;
}
};
CCleanMgrModule _AtlModule;
extern "C" int WINAPI wWinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/,
LPWSTR /*lpCmdLine*/, int nShowCmd)
{
return _AtlModule.WinMain(nShowCmd);
}

View File

@@ -1,66 +0,0 @@
/*
* PROJECT: ReactOS Disk Cleanup
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Main header file
* COPYRIGHT: Copyright 2023-2025 Mark Jansen <mark.jansen@reactos.org>
*/
#pragma once
#ifndef STRICT
#define STRICT
#endif
#define _ATL_APARTMENT_THREADED
#define _ATL_NO_AUTOMATIC_NAMESPACE
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
#define ATL_NO_ASSERT_ON_DESTROY_NONEXISTENT_WINDOW
#define _FORCENAMELESSUNION
#include <ndk/rtlfuncs.h>
#include <windef.h>
#include <winbase.h>
#include <shlobj.h>
#include <shlwapi.h>
#include <atlbase.h>
#include <atlcom.h>
#include <atlstr.h>
#include <strsafe.h>
#include <emptyvc.h>
#include <atlcoll.h>
using namespace ATL;
#define NDEBUG
#include <reactos/debug.h>
#include <reactos/shellutils.h>
#include <ui/rosdlgs.h>
template <class T> class CLocalPtr
: public CHeapPtr<T, CLocalAllocator>
{
public:
CLocalPtr() throw()
{
}
explicit CLocalPtr(_In_ T* pData) throw() :
CHeapPtr<T, CLocalAllocator>(pData)
{
}
};
#include "resource.h"
#include "CProgressDlg.hpp"
#include "CCleanupHandler.hpp"
#include "CCleanupHandlerList.hpp"
#include "CEmptyVolumeCacheCallBack.hpp"
// CSelectDriveDlg.cpp
void
SelectDrive(WCHAR &Drive);

View File

@@ -1,64 +0,0 @@
/*
* PROJECT: ReactOS Disk Cleanup
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Resources
* COPYRIGHT: Copyright 2023-2025 Mark Jansen <mark.jansen@reactos.org>
*/
#include <windef.h>
#include <winuser.h>
#include <commctrl.h>
#include "resource.h"
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Disk Cleanup"
#define REACTOS_STR_INTERNAL_NAME "cleanmgr"
#define REACTOS_STR_ORIGINAL_FILENAME "cleanmgr.exe"
#include <reactos/version.rc>
#include <reactos/manifest_exe.rc>
IDI_CLEANMGR ICON "resources/cleanmgr.ico"
#pragma code_page(65001)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
STRINGTABLE
BEGIN
IDS_PROPERTIES_MAIN_TITLE "Disk Cleanup for (%c:)"
IDS_TOTAL_CLEANABLE_CAPTION "You can use Disk Cleanup to free up to %s of disk space on (%c:)."
IDS_DISK_CLEANUP "Disk Cleanup"
IDS_CONFIRM_DELETE "Are you sure you want to delete these files permanently?"
IDS_CALCULATING "Disk Cleanup is calculating how much space can be gained on (%s)."
IDS_SCANNING "Scanning: %s"
IDS_CLEANING_CAPTION "Disk Cleanup is cleaning up files on %s."
IDS_CLEANING "Cleaning: %s"
END
IDD_PROPERTIES_MAIN DIALOGEX 0, 0, 235, 215
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Disk Cleanup"
FONT 8, "MS Shell Dlg", 400, 0, 0x0
BEGIN
CONTROL "",IDC_DISKICON,"Static",SS_ICON,6,6,20,20
LTEXT "You can use Disk Cleanup to free up to 0.0MB of disk space on drive C.",IDC_TOTAL_CLEANABLE,36,6,192,18
LTEXT "Files to delete:",IDC_STATIC,6,30,222,8
CONTROL "",IDC_HANDLERLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOCOLUMNHEADER | WS_BORDER | WS_TABSTOP,6,42,222,66
LTEXT "Total amount of disk space gained:",IDC_STATIC,6,114,144,8
RTEXT "",IDC_SELECTED_GAINED,156,114,73,8
GROUPBOX "Description",IDC_STATIC,6,126,222,84
LTEXT "",IDC_DESCRIPTION,12,138,210,54
PUSHBUTTON "Details...",IDC_DETAILS,150,192,74,14
END
IDD_SELECTDRIVE DIALOGEX 0, 0, 177, 74
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Disk Cleanup - Select Drive"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "OK",IDOK,30,48,50,14
PUSHBUTTON "E&xit",IDCANCEL,96,48,50,14
LTEXT "Select the drive to clean up.",IDC_STATIC,12,6,150,8
COMBOBOX IDC_DRIVES,12,24,150,90,CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
END

View File

@@ -1,30 +0,0 @@
/*
* PROJECT: ReactOS Disk Cleanup
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Resource definitions
* COPYRIGHT: Copyright 2023-2025 Mark Jansen <mark.jansen@reactos.org>
*/
#define IDC_STATIC -1
#define IDI_CLEANMGR 100
#define IDD_PROPERTIES_MAIN 200
#define IDC_DISKICON 201
#define IDC_TOTAL_CLEANABLE 202
#define IDC_HANDLERLIST 203
#define IDC_SELECTED_GAINED 204
#define IDC_DESCRIPTION 205
#define IDC_DETAILS 206
#define IDD_SELECTDRIVE 220
#define IDC_DRIVES 221
#define IDS_PROPERTIES_MAIN_TITLE 1000
#define IDS_TOTAL_CLEANABLE_CAPTION 1001
#define IDS_DISK_CLEANUP 1002
#define IDS_CONFIRM_DELETE 1003
#define IDS_CALCULATING 1004
#define IDS_SCANNING 1005
#define IDS_CLEANING_CAPTION 1006
#define IDS_CLEANING 1007

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

View File

@@ -2,14 +2,12 @@
include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils)
list(APPEND SOURCE
asn.cpp
certutil.cpp
hashfile.cpp
certutil.c
precomp.h)
add_executable(certutil ${SOURCE})
set_module_type(certutil win32cui UNICODE)
target_link_libraries(certutil conutils ${PSEH_LIB})
add_importlibs(certutil crypt32 advapi32 msvcrt kernel32)
add_importlibs(certutil advapi32 msvcrt kernel32)
add_pch(certutil precomp.h SOURCE)
add_cd_file(TARGET certutil DESTINATION reactos/system32 FOR all)

View File

@@ -1,508 +0,0 @@
/*
* PROJECT: ReactOS certutil
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: CertUtil asn implementation
* COPYRIGHT: Copyright 2020 Mark Jansen (mark.jansen@reactos.org)
*
* NOTES:
* To keep it simple, Tag and Class are combined in one identifier
* See for more details:
* https://en.wikipedia.org/wiki/X.690#BER_encoding
* https://www.strozhevsky.com/free_docs/asn1_by_simple_words.pdf
* http://mikk.net/~chris/asn1.pdf
*
* And for a test suite:
* https://github.com/YuryStrozhevsky/asn1-test-suite
*/
#include "precomp.h"
#include <math.h>
#include <wincrypt.h>
#include <stdlib.h>
#define ASN_TAG_IS_CONSTRUCTED 0x20
#define ASN_TAG_BITSTRING 0x03
#define ASN_TAG_OCTET_STRING 0x04
#define ASN_TAG_OBJECT_ID 0x06
#define ASN_TAG_SEQUENCE_RAW 0x10
#define ASN_TAG_SET_RAW 0x11
#define ASN_TAG_SEQUENCE 0x30
#define ASN_TAG_SET 0x31
#define ASN_TAG_CONTEXT_SPECIFIC 0x80
#define ASN_TAG_CONTEXT_SPECIFIC_N(n) (ASN_TAG_CONTEXT_SPECIFIC | (n))
#define ASN_TAG_OPTIONAL 0xA0
#define ASN_TAG_OPTIONAL_N(n) (ASN_TAG_OPTIONAL | (n))
/* NOTE: These names are not the names listed in f.e. the wikipedia pages,
they are made to look like MS's names for this */
LPCWSTR TagToName(DWORD dwTag)
{
switch (dwTag)
{
case 0x0: return L"EOC";
case 0x1: return L"BOOL";
case 0x2: return L"INTEGER";
case ASN_TAG_BITSTRING: return L"BIT_STRING";
case ASN_TAG_OCTET_STRING: return L"OCTET_STRING";
case 0x5: return L"NULL";
case ASN_TAG_OBJECT_ID: return L"OBJECT_ID";
case 0x7: return L"Object Descriptor";
case 0x8: return L"EXTERNAL";
case 0x9: return L"REAL";
case 0xA: return L"ENUMERATED";
case 0xB: return L"EMBEDDED PDV";
case 0xC: return L"UTF8String";
case 0xD: return L"RELATIVE-OID";
case 0xE: return L"TIME";
case 0xF: return L"Reserved";
case ASN_TAG_SEQUENCE_RAW: __debugbreak(); return L"SEQUENCE_RAW";
case ASN_TAG_SET_RAW: __debugbreak(); return L"SET_RAW";
case 0x12: return L"NumericString";
case 0x13: return L"PRINTABLE_STRING";
case 0x14: return L"T61String";
case 0x15: return L"VideotexString";
case 0x16: return L"IA5String";
case 0x17: return L"UTC_TIME";
case 0x18: return L"GeneralizedTime";
case 0x19: return L"GraphicString";
case 0x1A: return L"VisibleString";
case 0x1B: return L"GeneralString";
case 0x1C: return L"UniversalString";
case 0x1D: return L"CHARACTER STRING";
case 0x1E: return L"BMPString";
case 0x1F: return L"DATE";
case 0x20: return L"CONSTRUCTED";
case ASN_TAG_SEQUENCE: return L"SEQUENCE";
case ASN_TAG_SET: return L"SET";
case ASN_TAG_CONTEXT_SPECIFIC_N(0): return L"CONTEXT_SPECIFIC[0]";
case ASN_TAG_CONTEXT_SPECIFIC_N(1): return L"CONTEXT_SPECIFIC[1]";
case ASN_TAG_CONTEXT_SPECIFIC_N(2): return L"CONTEXT_SPECIFIC[2]";
case ASN_TAG_CONTEXT_SPECIFIC_N(3): return L"CONTEXT_SPECIFIC[3]";
case ASN_TAG_CONTEXT_SPECIFIC_N(4): return L"CONTEXT_SPECIFIC[4]";
case ASN_TAG_CONTEXT_SPECIFIC_N(5): return L"CONTEXT_SPECIFIC[5]";
case ASN_TAG_CONTEXT_SPECIFIC_N(6): return L"CONTEXT_SPECIFIC[6]";
case ASN_TAG_CONTEXT_SPECIFIC_N(7): return L"CONTEXT_SPECIFIC[7]";
case ASN_TAG_CONTEXT_SPECIFIC_N(8): return L"CONTEXT_SPECIFIC[8]";
case ASN_TAG_CONTEXT_SPECIFIC_N(9): return L"CONTEXT_SPECIFIC[9]";
/* Experiments show that Windows' certutil only goes up to 9 */
case ASN_TAG_OPTIONAL_N(0): return L"OPTIONAL[0]";
case ASN_TAG_OPTIONAL_N(1): return L"OPTIONAL[1]";
case ASN_TAG_OPTIONAL_N(2): return L"OPTIONAL[2]";
case ASN_TAG_OPTIONAL_N(3): return L"OPTIONAL[3]";
case ASN_TAG_OPTIONAL_N(4): return L"OPTIONAL[4]";
case ASN_TAG_OPTIONAL_N(5): return L"OPTIONAL[5]";
case ASN_TAG_OPTIONAL_N(6): return L"OPTIONAL[6]";
case ASN_TAG_OPTIONAL_N(7): return L"OPTIONAL[7]";
case ASN_TAG_OPTIONAL_N(8): return L"OPTIONAL[8]";
case ASN_TAG_OPTIONAL_N(9): return L"OPTIONAL[9]";
/* Experiments show that Windows' certutil only goes up to 9 */
default:
return L"???";
}
}
BOOL Move(DWORD dwLen, PBYTE& pData, DWORD& dwSize)
{
if (dwSize < dwLen)
return FALSE;
pData += dwLen;
dwSize -= dwLen;
return TRUE;
}
BOOL ParseTag(PBYTE& pData, DWORD& dwSize, DWORD& dwTagAndClass)
{
if (dwSize == 0)
return FALSE;
/* Is this a long form? */
if ((pData[0] & 0x1f) != 0x1f)
{
/* No, so extract the tag and class (in one identifier) */
dwTagAndClass = pData[0];
return Move(1, pData, dwSize);
}
DWORD dwClass = (pData[0] & 0xE0) >> 5;
dwTagAndClass = 0;
DWORD n;
for (n = 1; n < dwSize; ++n)
{
dwTagAndClass <<= 7;
dwTagAndClass |= (pData[n] & 0x7f);
if (!(pData[n] & 0x80))
{
break;
}
}
Move(n, pData, dwSize);
/* Any number bigger than this, we shift data out! */
if (n > 4)
return FALSE;
/* Just drop this in the hightest bits*/
dwTagAndClass |= (dwClass << (32-3));
return TRUE;
}
BOOL ParseLength(PBYTE& pData, DWORD& dwSize, DWORD& dwLength)
{
if (dwSize == 0)
return FALSE;
if (!(pData[0] & 0x80))
{
dwLength = pData[0];
return Move(1, pData, dwSize);
}
DWORD dwBytes = pData[0] & 0x7f;
if (dwBytes == 0 || dwBytes > 8 || dwBytes + 1 > dwSize)
{
return FALSE;
}
dwLength = 0;
for (DWORD n = 0; n < dwBytes; ++n)
{
dwLength <<= 8;
dwLength += pData[1 + n];
}
return Move(dwBytes + 1, pData, dwSize);
}
DWORD HexDump(PBYTE pRoot, PBYTE pData, DWORD dwSize, PWSTR wszPrefix)
{
while (TRUE)
{
SIZE_T Address = pData - pRoot;
ConPrintf(StdOut, L"%04x: ", Address);
ConPuts(StdOut, wszPrefix);
for (DWORD n = 0; n < min(dwSize, 0x10); ++n)
{
ConPrintf(StdOut, L"%02x ", pData[n]);
}
if (dwSize <= 0x10)
break;
Move(0x10, pData, dwSize);
ConPuts(StdOut, L"\n");
}
return 3 * dwSize;
}
void PrintTag(PBYTE pRoot, PBYTE pHeader, DWORD dwTag, DWORD dwTagLength, PBYTE pData, PWSTR wszPrefix)
{
DWORD dwRemainder = HexDump(pRoot, pHeader, pData - pHeader, wszPrefix);
LPCWSTR wszTag = TagToName(dwTag);
DWORD dwPadding = dwRemainder + wcslen(wszPrefix);
while (dwPadding > 50)
dwPadding -= 50;
ConPrintf(StdOut, L"%*s; %s (%x Bytes)\n", 50 - dwPadding, L"", wszTag, dwTagLength);
}
struct OID_NAMES
{
CHAR* Oid;
LPCWSTR Names[20];
DWORD NumberOfNames;
};
BOOL WINAPI CryptOIDEnumCallback(_In_ PCCRYPT_OID_INFO pInfo, _Inout_opt_ void *pvArg)
{
OID_NAMES* Names = (OID_NAMES*)pvArg;
if (pInfo && pInfo->pszOID && !_stricmp(pInfo->pszOID, Names->Oid))
{
if (Names->NumberOfNames < RTL_NUMBER_OF(Names->Names))
{
for (DWORD n = 0; n < Names->NumberOfNames; ++n)
{
// We already have this..
if (!_wcsicmp(Names->Names[n], pInfo->pwszName))
return TRUE;
}
Names->Names[Names->NumberOfNames++] = pInfo->pwszName;
}
}
return TRUE;
}
void PrintOID(PBYTE pRoot, PBYTE pHeader, PBYTE pData, DWORD dwSize, PWSTR wszPrefix)
{
/* CryptFindOIDInfo expects the OID to be in ANSI.. */
CHAR szOID[250];
CHAR* ptr = szOID;
size_t cchRemaining = RTL_NUMBER_OF(szOID);
/* CryptFindOIDInfo just returns the first, we want multiple */
OID_NAMES Names = {0};
if (dwSize == 0)
return;
DWORD dwValue = 0, count = 0;
for (DWORD n = 0; n < dwSize; ++n)
{
dwValue <<= 7;
dwValue |= pData[n] & 0x7f;
if (pData[n] & 0x80)
{
if (++count >= 4)
break;
continue;
}
count = 0;
/* First & second octet have a special encoding */
if (ptr == szOID)
{
DWORD id1 = dwValue / 40;
DWORD id2 = dwValue % 40;
/* The first one can only be 0, 1 or 2, so handle special case: tc24.ber */
if (id1 > 2)
{
id2 += (id1 - 2) * 40;
id1 = 2;
}
StringCchPrintfExA(ptr, cchRemaining, &ptr, &cchRemaining, 0, "%d.%d", id1, id2);
}
else
{
StringCchPrintfExA(ptr, cchRemaining, &ptr, &cchRemaining, 0, ".%d", dwValue);
}
dwValue = 0;
}
if (dwValue || count)
{
/* We cannot format this, so just add abort */
return;
}
SIZE_T Address = pData - pRoot;
/* Pad with spaces instead of printing the address again */
DWORD addrDigits = (DWORD)log10((double)Address) + 1;
ConPrintf(StdOut, L"%*s ", max(addrDigits, 4), L"");
ConPrintf(StdOut, L"%s; %S", wszPrefix, szOID);
Names.Oid = szOID;
/* The order does not match a naive call with '0'... */
CryptEnumOIDInfo(0, 0, &Names, CryptOIDEnumCallback);
for (DWORD n = 0; n < Names.NumberOfNames; ++n)
{
if (n == 0)
ConPrintf(StdOut, L" %s", Names.Names[n]);
else if (n == 1)
ConPrintf(StdOut, L" (%s", Names.Names[n]);
else
ConPrintf(StdOut, L" / %s", Names.Names[n]);
}
ConPrintf(StdOut, L"%s\n", Names.NumberOfNames > 1 ? L")" : L"");
}
BOOL ParseAsn(PBYTE pRoot, PBYTE pData, DWORD dwSize, PWSTR wszPrefix, BOOL fPrint)
{
while (dwSize)
{
PBYTE pHeader = pData;
DWORD dwTagAndClass;
if (!ParseTag(pData, dwSize, dwTagAndClass))
{
if (fPrint)
ConPrintf(StdOut, L"CertUtil: -asn command failed to parse tag near 0x%x\n", pHeader - pRoot);
return FALSE;
}
DWORD dwTagLength;
if (!ParseLength(pData, dwSize, dwTagLength))
{
if (fPrint)
ConPrintf(StdOut, L"CertUtil: -asn command failed to parse tag length near 0x%x\n", pHeader - pRoot);
return FALSE;
}
if (dwTagLength > dwSize)
{
if (fPrint)
ConPrintf(StdOut, L"CertUtil: -asn command malformed tag length near 0x%x\n", pHeader - pRoot);
return FALSE;
}
if (fPrint)
PrintTag(pRoot, pHeader, dwTagAndClass, dwTagLength, pData, wszPrefix);
size_t len = wcslen(wszPrefix);
StringCchCatW(wszPrefix, MAX_PATH, dwTagLength != dwSize ? L"| " : L" ");
if (dwTagAndClass & ASN_TAG_IS_CONSTRUCTED)
{
if (!ParseAsn(pRoot, pData, dwTagLength, wszPrefix, fPrint))
{
return FALSE;
}
}
else
{
if (fPrint)
{
/* Special case for a bit string / octet string */
if ((dwTagAndClass == ASN_TAG_BITSTRING || dwTagAndClass == ASN_TAG_OCTET_STRING) && dwTagLength)
{
if (dwTagAndClass == ASN_TAG_BITSTRING)
{
/* First, we print the 'unused bits' field of the bit string */
HexDump(pRoot, pData, 1, wszPrefix);
ConPuts(StdOut, L"\n");
/* Move past it */
Move(1, pData, dwSize);
dwTagLength--;
}
/* Do we have any data left? */
if (dwTagLength)
{
/* Try to parse this as ASN */
if (ParseAsn(pRoot, pData, dwTagLength, wszPrefix, FALSE))
{
/* We succeeded, this _could_ be ASN, so display it as if it is */
if (!ParseAsn(pRoot, pData, dwTagLength, wszPrefix, TRUE))
{
/* Uhhh, did someone edit the data? */
ConPrintf(StdOut, L"CertUtil: -asn command unexpected failure parsing tag near 0x%x\n", pData - pRoot);
return FALSE;
}
/* Move past what we just parsed */
Move(dwTagLength, pData, dwSize);
/* Lie about this so that we don't also print a hexdump */
dwTagLength = 0;
}
}
}
/* Is there any data (left) to print? */
if (dwTagLength)
{
HexDump(pRoot, pData, dwTagLength, wszPrefix);
ConPuts(StdOut, L"\n");
StringCchCatW(wszPrefix, MAX_PATH, L" ");
/* Do we have additional formatters? */
switch (dwTagAndClass)
{
case ASN_TAG_OBJECT_ID:
PrintOID(pRoot, pHeader, pData, dwTagLength, wszPrefix);
break;
default:
break;
}
}
}
}
wszPrefix[len] = '\0';
if (!Move(dwTagLength, pData, dwSize))
{
/* This should not be possible, it was checked before! */
return FALSE;
}
}
return TRUE;
}
BOOL asn_dump(LPCWSTR Filename)
{
HANDLE hFile = CreateFileW(Filename, GENERIC_READ, FILE_SHARE_READ, NULL,
OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN, NULL);
if (hFile == INVALID_HANDLE_VALUE)
{
ConPrintf(StdOut, L"CertUtil: -asn command failed to open: %d\n", GetLastError());
return FALSE;
}
DWORD dwSize = GetFileSize(hFile, NULL);
if (dwSize == INVALID_FILE_SIZE)
{
ConPrintf(StdOut, L"CertUtil: -asn command failed to get file size: %d\n", GetLastError());
CloseHandle(hFile);
return FALSE;
}
if (dwSize == 0)
{
ConPrintf(StdOut, L"CertUtil: -asn command got an empty file\n");
CloseHandle(hFile);
return FALSE;
}
PBYTE pData = (PBYTE)LocalAlloc(0, dwSize);
if (!pData)
{
ConPrintf(StdOut, L"CertUtil: -asn command failed to allocate: %d\n", GetLastError());
CloseHandle(hFile);
return FALSE;
}
DWORD cbRead;
BOOL fRead = ReadFile(hFile, pData, dwSize, &cbRead, NULL);
DWORD dwErr = GetLastError();
CloseHandle(hFile);
if (!fRead || cbRead != dwSize)
{
ConPrintf(StdOut, L"CertUtil: -asn command failed to read: %d\n", dwErr);
LocalFree(pData);
return FALSE;
}
WCHAR Buffer[MAX_PATH] = {0};
BOOL fSucceeded = ParseAsn(pData, pData, dwSize, Buffer, TRUE);
LocalFree(pData);
return fSucceeded;
}

View File

@@ -1,8 +1,10 @@
/*
* PROJECT: ReactOS certutil
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: CertUtil hashfile implementation
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: CertUtil stub
* COPYRIGHT: Copyright 2020 Mark Jansen (mark.jansen@reactos.org)
*
* Note: Only -hashfile is implemented for now, the rest is not present!
*/
#include "precomp.h"
@@ -10,7 +12,7 @@
#include <stdlib.h>
BOOL hash_file(LPCWSTR Filename)
static BOOL hash_file(LPCWSTR Filename)
{
HCRYPTPROV hProv;
BOOL bSuccess = FALSE;
@@ -85,3 +87,69 @@ BOOL hash_file(LPCWSTR Filename)
return bSuccess;
}
static void print_usage()
{
ConPuts(StdOut, L"Verbs:\n");
ConPuts(StdOut, L" -hashfile -- Display cryptographic hash over a file\n");
ConPuts(StdOut, L"\n");
ConPuts(StdOut, L"CertUtil -? -- Display a list of all verbs\n");
ConPuts(StdOut, L"CertUtil -hashfile -? -- Display help text for the 'hashfile' verb\n");
}
int wmain(int argc, WCHAR *argv[])
{
int n;
/* Initialize the Console Standard Streams */
ConInitStdStreams();
if (argc == 1) /* i.e. no commandline arguments given */
{
print_usage();
return EXIT_SUCCESS;
}
for (n = 1; n < argc; ++n)
{
if (!_wcsicmp(argv[n], L"-?"))
{
print_usage();
return EXIT_SUCCESS;
}
else if (!_wcsicmp(argv[n], L"-hashfile"))
{
if (argc == 3)
{
if (!_wcsicmp(argv[n+1], L"-?"))
{
print_usage();
return EXIT_SUCCESS;
}
else
{
if (!hash_file(argv[n+1]))
{
/* hash_file prints the failure itself */
return EXIT_FAILURE;
}
ConPuts(StdOut, L"CertUtil: -hashfile command completed successfully\n");
return EXIT_SUCCESS;
}
}
else
{
ConPrintf(StdOut, L"CertUtil: -hashfile expected 1 argument, got %d\n", argc - 2);
return EXIT_FAILURE;
}
}
else
{
ConPrintf(StdOut, L"CertUtil: Unknown verb: %s\n", argv[n]);
return EXIT_FAILURE;
}
}
return EXIT_SUCCESS;
}

View File

@@ -1,107 +0,0 @@
/*
* PROJECT: ReactOS certutil
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: CertUtil commandline handling
* COPYRIGHT: Copyright 2020 Mark Jansen (mark.jansen@reactos.org)
*
* Note: Only -hashfile and -asn are implemented for now, the rest is not present!
*/
#include "precomp.h"
#include <wincrypt.h>
#include <stdlib.h>
typedef struct
{
LPCWSTR Name;
BOOL (*pfn)(LPCWSTR Filename);
} Verb;
Verb verbs[] = {
{ L"hashfile", hash_file },
{ L"asn", asn_dump },
};
static void print_usage()
{
ConPuts(StdOut, L"Verbs:\n");
ConPuts(StdOut, L" -hashfile -- Display cryptographic hash over a file\n");
ConPuts(StdOut, L" -asn -- Display ASN.1 encoding of a file\n");
ConPuts(StdOut, L"\n");
ConPuts(StdOut, L"CertUtil -? -- Display a list of all verbs\n");
ConPuts(StdOut, L"CertUtil -hashfile -? -- Display help text for the 'hashfile' verb\n");
}
Verb* MatchVerb(LPCWSTR arg)
{
if (arg[0] != '-' && arg[0] != '/')
return NULL;
for (size_t n = 0; n < RTL_NUMBER_OF(verbs); ++n)
{
if (!_wcsicmp(verbs[n].Name, arg + 1))
{
return verbs + n;
}
}
return NULL;
}
int wmain(int argc, WCHAR *argv[])
{
int n;
/* Initialize the Console Standard Streams */
ConInitStdStreams();
if (argc == 1) /* i.e. no commandline arguments given */
{
print_usage();
return EXIT_SUCCESS;
}
for (n = 1; n < argc; ++n)
{
if (!_wcsicmp(argv[n], L"-?"))
{
print_usage();
return EXIT_SUCCESS;
}
Verb* verb = MatchVerb(argv[n]);
if (verb)
{
if (argc != 3)
{
ConPrintf(StdOut, L"CertUtil: -%s expected 1 argument, got %d\n", verb->Name, argc - 2);
return EXIT_FAILURE;
}
if (!_wcsicmp(argv[n+1], L"-?"))
{
print_usage();
return EXIT_SUCCESS;
}
if (!verb->pfn(argv[n+1]))
{
/* The verb prints the failure */
return EXIT_FAILURE;
}
ConPrintf(StdOut, L"CertUtil: -%s command completed successfully\n", verb->Name);
return EXIT_SUCCESS;
}
else
{
ConPrintf(StdOut, L"CertUtil: Unknown verb: %s\n", argv[n]);
return EXIT_FAILURE;
}
}
return EXIT_SUCCESS;
}

View File

@@ -7,14 +7,10 @@
#include <windef.h>
#include <winbase.h>
#include <strsafe.h>
#include <winreg.h>
#include <winuser.h>
#include <conutils.h>
BOOL hash_file(LPCWSTR Filename);
BOOL asn_dump(LPCWSTR Filename);
#endif /* __CERTUTIL_PRECOMP_H */

View File

@@ -2,40 +2,40 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
IDS_USAGE "Compare deux fichiers ou un ensemble de fichiers et affiche les différences\n\
entre eux.\n\
IDS_USAGE "Compares two files or sets of files and displays the differences between\n\
them.\n\
\n\
FC [/A] [/C] [/L] [/LBn] [/N] [/OFF[LINE]] [/T] [/U] [/W] [/nnnn]\n\
[drive1:][path1]filename1 [drive2:][path2]filename2\n\
FC /B [drive1:][path1]filename1 [drive2:][path2]filename2\n\
\n\
/A Affiche uniquement la première et la dernière ligne pour chaque ensemble de différences.\n\
/B Effectue une comparaison binaire.\n\
/C Ne tient pas compte de la casse des lettres.\n\
/L Compare les fichiers sous forme de texte ASCII.\n\
/LBn Définit le nombre maximal de différences consécutives\n\
au nombre de lignes spécifié (par défaut : 100).\n\
/N Affiche les numéros de ligne sur une comparaison ASCII.\n\
/OFF[LINE] N'ignore pas les fichiers ayant l'attribut hors-ligne.\n\
/T Ne transforme pas les tabulations en espaces (par défaut : transformer).\n\
/U Compare les fichiers en tant que fichiers texte UNICODE.\n\
/W Compresse les espaces blancs (tabulations et espaces) pour la comparaison.\n\
/nnnn Spécifie le nombre de lignes consécutives qui doivent correspondre\n\
après une différence (par défaut : 2).\n\
/A Displays only first and last lines for each set of differences.\n\
/B Performs a binary comparison.\n\
/C Disregards the case of letters.\n\
/L Compares files as ASCII text.\n\
/LBn Sets the maximum consecutive mismatches to the specified\n\
number of lines (default: 100).\n\
/N Displays the line numbers on an ASCII comparison.\n\
/OFF[LINE] Doesn't skip files with offline attribute set.\n\
/T Doesn't expand tabs to spaces (default: expand).\n\
/U Compare files as UNICODE text files.\n\
/W Compresses white space (tabs and spaces) for comparison.\n\
/nnnn Specifies the number of consecutive lines that must match\n\
after a mismatch (default: 2).\n\
[drive1:][path1]filename1\n\
Spécifie le premier fichier ou ensemble de fichiers à comparer.\n\
Specifies the first file or set of files to compare.\n\
[drive2:][path2]filename2\n\
Spécifie le second fichier ou ensemble de fichiers à comparer.\n"
IDS_NO_DIFFERENCE "FC: Aucune différence constatée\n"
IDS_LONGER_THAN "FC: %ls plus grand que %ls\n"
IDS_COMPARING "Compare les fichiers %ls et %ls\n"
IDS_OUT_OF_MEMORY "FC: Dépassement de mémoire\n"
IDS_CANNOT_READ "FC: Ne peut pas lire depuis %ls\n"
IDS_INVALID_SWITCH "FC: Option invalide\n"
IDS_CANNOT_OPEN "FC: Ne peut pas ouvrir %ls - Fichier ou répertoire inexistant\n"
IDS_NEEDS_FILES "FC: Nombre insuffisant de fichiers spécifiés\n"
IDS_CANT_USE_WILDCARD "Les caractères joker ('*' et '?') ne sont pas encore supportés\n"
IDS_DIFFERENT "FC: Les fichiers %ls et %ls sont différents\n"
IDS_TOO_LARGE "FC: Fichier %ls trop grand\n"
IDS_RESYNC_FAILED "La resynchronisation a échoué. Les fichiers sont trop différents.\n"
Specifies the second file or set of files to compare.\n"
IDS_NO_DIFFERENCE "FC: no differences encountered\n"
IDS_LONGER_THAN "FC: %ls longer than %ls\n"
IDS_COMPARING "Comparing files %ls and %ls\n"
IDS_OUT_OF_MEMORY "FC: Out of memory\n"
IDS_CANNOT_READ "FC: cannot read from %ls\n"
IDS_INVALID_SWITCH "FC: Invalid Switch\n"
IDS_CANNOT_OPEN "FC: cannot open %ls - No such file or folder\n"
IDS_NEEDS_FILES "FC: Insufficient number of file specifications\n"
IDS_CANT_USE_WILDCARD "Wildcard ('*' and '?') are not supported yet\n"
IDS_DIFFERENT "FC: File %ls and %ls are different\n"
IDS_TOO_LARGE "FC: File %ls too large\n"
IDS_RESYNC_FAILED "Resync failed. Files are too different.\n"
END

View File

@@ -2,7 +2,7 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
STRINGTABLE
{
STRING_USAGE, "Usage: taskkill [/?] [/f] [/im Prozess Name | /pid Prozess ID] [/t]\n"
STRING_USAGE, "Usage: taskkill [/?] [/f] [/im Prozess Name | /pid Prozess ID]\n"
STRING_INVALID_OPTION, "Fehler: Unbekannte oder ungülige Kommandozeilenoption angegeben.\n"
STRING_INVALID_PARAM, "Fehler: Ungültiger Kommandozeilenparameter angegeben.\n"
STRING_MISSING_OPTION, "Fehler: Eine der Optionen /im oder /pid muss angegeben werden.\n"
@@ -16,9 +16,6 @@ STRINGTABLE
STRING_ENUM_FAILED, "Fehler: Prozessliste kann nicht aufgebaut werden.\n"
STRING_TERMINATE_FAILED, "Fehler: Prozess ""%1"" kann nicht beendet werden.\n"
STRING_SELF_TERMINATION, "Fehler: Der Prozess kann sich nicht selbst beenden.\n"
STRING_CLOSE_CHILD, "Close message sent to top-level windows of process with PID %1!u!, child of PID %2!u!.\n"
STRING_TERM_CHILD, "Process with PID %1!u! was forcibly terminated, child of PID %2!u!.\n"
STRING_TERM_CHILD_FAILED, "Error: Unable to terminate process with PID %1!u!, child of PID %2!u!.\n"
STRING_PARAM_TOO_MUCH, "Error: Invalid syntax. '%1' option is not allowed more than '%2!d!' time(s).\n"
STRING_INVALID_SYNTAX, "Error: Invalid syntax.\n"
}

View File

@@ -2,7 +2,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
STRINGTABLE
{
STRING_USAGE, "Usage: taskkill [/?] [/f] [/im ProcessName | /pid ProcessID] [/t]\n"
STRING_USAGE, "Usage: taskkill [/?] [/f] [/im ProcessName | /pid ProcessID]\n"
STRING_INVALID_OPTION, "Error: Unknown or invalid command line option specified.\n"
STRING_INVALID_PARAM, "Error: Invalid command line parameter specified.\n"
STRING_MISSING_OPTION, "Error: One of options /im or /pid must be specified.\n"
@@ -16,9 +16,6 @@ STRINGTABLE
STRING_ENUM_FAILED, "Error: Unable to enumerate the process list.\n"
STRING_TERMINATE_FAILED, "Error: Unable to terminate process ""%1"".\n"
STRING_SELF_TERMINATION, "Error: Process self-termination is not permitted.\n"
STRING_CLOSE_CHILD, "Close message sent to top-level windows of process with PID %1!u!, child of PID %2!u!.\n"
STRING_TERM_CHILD, "Process with PID %1!u! was forcibly terminated, child of PID %2!u!.\n"
STRING_TERM_CHILD_FAILED, "Error: Unable to terminate process with PID %1!u!, child of PID %2!u!.\n"
STRING_PARAM_TOO_MUCH, "Error: Invalid syntax. '%1' option is not allowed more than '%2!d!' time(s).\n"
STRING_INVALID_SYNTAX, "Error: Invalid syntax.\n"
}

View File

@@ -9,7 +9,7 @@ LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL
STRINGTABLE
{
STRING_USAGE, "Uso: taskkill [/?] [/f] [/im NomeProcesso | /pid IDProcesso] [/t]\n"
STRING_USAGE, "Uso: taskkill [/?] [/f] [/im NomeProcesso | /pid IDProcesso]\n"
STRING_INVALID_OPTION, "Errore: L'opzione specificata è invalida o sconosciuta.\n"
STRING_INVALID_PARAM, "Errore: Il parametro di comando a riga è invalido.\n"
STRING_MISSING_OPTION, "Errore: Specifica una delle opzioni /im oppure /pid.\n"
@@ -23,9 +23,6 @@ STRINGTABLE
STRING_ENUM_FAILED, "Errore: Impossibile enumerare la lista dei processi.\n"
STRING_TERMINATE_FAILED, "Errore: Impossibile terminare il processo ""%1"".\n"
STRING_SELF_TERMINATION, "Errore: L'auto-terminazione non è consentita.\n"
STRING_CLOSE_CHILD, "Close message sent to top-level windows of process with PID %1!u!, child of PID %2!u!.\n"
STRING_TERM_CHILD, "Process with PID %1!u! was forcibly terminated, child of PID %2!u!.\n"
STRING_TERM_CHILD_FAILED, "Error: Unable to terminate process with PID %1!u!, child of PID %2!u!.\n"
STRING_PARAM_TOO_MUCH, "Error: Invalid syntax. '%1' option is not allowed more than '%2!d!' time(s).\n"
STRING_INVALID_SYNTAX, "Error: Invalid syntax.\n"
}

View File

@@ -9,7 +9,7 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
STRINGTABLE
{
STRING_USAGE, "Sposób użycia: taskkill [/?] [/f] [/im nazwa_procesu | /pid id_procesu] [/t]\n"
STRING_USAGE, "Sposób użycia: taskkill [/?] [/f] [/im nazwa_procesu | /pid id_procesu]\n"
STRING_INVALID_OPTION, "Błąd: Określono nieznaną lub nieprawidłową opcję.\n"
STRING_INVALID_PARAM, "Błąd: Nieprawidłowy parametr.\n"
STRING_MISSING_OPTION, "Błąd: Nie określono opcji /im ani /pid.\n"
@@ -23,9 +23,6 @@ STRINGTABLE
STRING_ENUM_FAILED, "Błąd: Nie można wyliczyć listy procesów.\n"
STRING_TERMINATE_FAILED, "Błąd: Nie można zakończyć procesu ""%1"".\n"
STRING_SELF_TERMINATION, "Błąd: Proces nie może zakończyć sam siebie.\n"
STRING_CLOSE_CHILD, "Close message sent to top-level windows of process with PID %1!u!, child of PID %2!u!.\n"
STRING_TERM_CHILD, "Process with PID %1!u! was forcibly terminated, child of PID %2!u!.\n"
STRING_TERM_CHILD_FAILED, "Error: Unable to terminate process with PID %1!u!, child of PID %2!u!.\n"
STRING_PARAM_TOO_MUCH, "Błąd: Nieprawidłowa składnia. Opcja '%1' nie jest dozwolona więcej niż '%2!d!' razy.\n"
STRING_INVALID_SYNTAX, "Błąd: Nieprawidłowa składnia.\n"
}

View File

@@ -10,7 +10,7 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
STRINGTABLE
{
STRING_USAGE, "Utilizare: taskkill [/?] [/f] [/im NumeProces | /pid IdProces] [/t]\n"
STRING_USAGE, "Utilizare: taskkill [/?] [/f] [/im NumeProces | /pid IdProces]\n"
STRING_INVALID_OPTION, "Eroare: Opțiune specificată nevalidă sau necunoscută.\n"
STRING_INVALID_PARAM, "Eroare: Parametrul de comandă specificat este nevalid.\n"
STRING_MISSING_OPTION, "Eroare: Trebuie specificată una dintre opțiunile /im sau /pid.\n"
@@ -24,9 +24,6 @@ STRINGTABLE
STRING_ENUM_FAILED, "Eroare: Nu se poate enumera lista de procese.\n"
STRING_TERMINATE_FAILED, "Eroare: Procesul «%1» nu poate fi oprit.\n"
STRING_SELF_TERMINATION, "Eroare: Auto-terminarea nu este permisă.\n"
STRING_CLOSE_CHILD, "Close message sent to top-level windows of process with PID %1!u!, child of PID %2!u!.\n"
STRING_TERM_CHILD, "Process with PID %1!u! was forcibly terminated, child of PID %2!u!.\n"
STRING_TERM_CHILD_FAILED, "Error: Unable to terminate process with PID %1!u!, child of PID %2!u!.\n"
STRING_PARAM_TOO_MUCH, "Eroare: Sintaxă nevalidă. Opțiunea '%1' nu este permisă mai mult de '%2!d!' dată(dăți).\n"
STRING_INVALID_SYNTAX, "Eroare: Sintaxă nevalidă.\n"
}

View File

@@ -4,7 +4,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
STRINGTABLE
{
STRING_USAGE, "Использование: TASKKILL [/F] [/IM <образ> | /PID <процесс>] [/t]\n"
STRING_USAGE, "Использование: TASKKILL [/F] [/IM <образ> | /PID <процесс>]\n"
STRING_INVALID_OPTION, "Ошибка: Указаны неверные параметры командной строки.\n"
STRING_INVALID_PARAM, "Ошибка: Указаны неверные параметры командной строки.\n"
STRING_MISSING_OPTION, "Ошибка: Должен быть указан параметр /im или /pid.\n"
@@ -18,9 +18,6 @@ STRINGTABLE
STRING_ENUM_FAILED, "Ошибка: Не удается получить список процессов.\n"
STRING_TERMINATE_FAILED, "Ошибка: Не удается завершить процесс ""%1"".\n"
STRING_SELF_TERMINATION, "Ошибка: Процесс не может завершить сам себя.\n"
STRING_CLOSE_CHILD, "Close message sent to top-level windows of process with PID %1!u!, child of PID %2!u!.\n"
STRING_TERM_CHILD, "Process with PID %1!u! was forcibly terminated, child of PID %2!u!.\n"
STRING_TERM_CHILD_FAILED, "Error: Unable to terminate process with PID %1!u!, child of PID %2!u!.\n"
STRING_PARAM_TOO_MUCH, "Ошибка: Неверный синтаксис. Нельзя использовать опцию '%1' больше '%2!d!' раз(а).\n"
STRING_INVALID_SYNTAX, "Ошибка: Неверный синтаксис.\n"
}

View File

@@ -6,7 +6,7 @@ LANGUAGE LANG_ALBANIAN, SUBLANG_NEUTRAL
STRINGTABLE
{
STRING_USAGE, "Usage: taskkill [/?] [/f] [/im ProcessName | /pid ProcessID] [/t]\n"
STRING_USAGE, "Usage: taskkill [/?] [/f] [/im ProcessName | /pid ProcessID]\n"
STRING_INVALID_OPTION, "Gabim: Panjohur ose i pavlefshëm opsioni linjes komandes i specifikuar.\n"
STRING_INVALID_PARAM, "Gabim: Pavlefshëm parametri i specifikuar ne linjen e komandes.\n"
STRING_MISSING_OPTION, "Gabim: Njera nga opsionet /im ose /pid duhet te specifikohet.\n"
@@ -20,9 +20,6 @@ STRINGTABLE
STRING_ENUM_FAILED, "Gabim: Në pamundësi për të numëruar listën proceseve.\n"
STRING_TERMINATE_FAILED, "Gabim: Pamundur mbyllja e proceseve ""%1"".\n"
STRING_SELF_TERMINATION, "Gabim: Procesi vetë-përfundimi nuk është i lejuar.\n"
STRING_CLOSE_CHILD, "Close message sent to top-level windows of process with PID %1!u!, child of PID %2!u!.\n"
STRING_TERM_CHILD, "Process with PID %1!u! was forcibly terminated, child of PID %2!u!.\n"
STRING_TERM_CHILD_FAILED, "Error: Unable to terminate process with PID %1!u!, child of PID %2!u!.\n"
STRING_PARAM_TOO_MUCH, "Error: Invalid syntax. '%1' option is not allowed more than '%2!d!' time(s).\n"
STRING_INVALID_SYNTAX, "Error: Invalid syntax.\n"
}

View File

@@ -4,7 +4,7 @@ LANGUAGE LANG_TURKISH, SUBLANG_NEUTRAL
STRINGTABLE
{
STRING_USAGE, "Kullanım: taskkill [/?] [/f] [/im işlem adı | /pid işlem kimliği] [/t]\n"
STRING_USAGE, "Kullanım: taskkill [/?] [/f] [/im işlem adı | /pid işlem kimliği]\n"
STRING_INVALID_OPTION, "Hata: Bilinmeyen veya geçersiz komut satırı seçeneği belirtildi.\n"
STRING_INVALID_PARAM, "Hata: Geçersiz komut satırı değişkeni belirtildi.\n"
STRING_MISSING_OPTION, "Hata: /im ve /pid seçeneklerinden biri belirtilmeli.\n"
@@ -18,9 +18,6 @@ STRINGTABLE
STRING_ENUM_FAILED, "Hata: İşlem numaralandırılamıyor.\n"
STRING_TERMINATE_FAILED, "Hata: ""%1"" işlemi sonlandırılamıyor.\n"
STRING_SELF_TERMINATION, "Hata: İşlemi kendi kendine sonlandırmaya izin verilmedi.\n"
STRING_CLOSE_CHILD, "Close message sent to top-level windows of process with PID %1!u!, child of PID %2!u!.\n"
STRING_TERM_CHILD, "Process with PID %1!u! was forcibly terminated, child of PID %2!u!.\n"
STRING_TERM_CHILD_FAILED, "Error: Unable to terminate process with PID %1!u!, child of PID %2!u!.\n"
STRING_PARAM_TOO_MUCH, "Hata: Geçersiz sözdizimi. '%1' seçeneğine '%2!d!'den fazla kez izin verilmiyor..\n"
STRING_INVALID_SYNTAX, "Hata: Geçersiz sözdizimi.\n"
}

View File

@@ -7,7 +7,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
STRINGTABLE
{
STRING_USAGE, "用法taskkill [/?] [/f] [/im 进程名称 | /pid 进程 ID] [/t]\n"
STRING_USAGE, "用法taskkill [/?] [/f] [/im 进程名称 | /pid 进程 ID]\n"
STRING_INVALID_OPTION, "错误:指定了未知或无效的命令行选项。\n"
STRING_INVALID_PARAM, "错误:指定了无效的命令行参数。\n"
STRING_MISSING_OPTION, "错误:必须指定选项 /im 或 /pid。\n"
@@ -21,9 +21,6 @@ STRINGTABLE
STRING_ENUM_FAILED, "错误:无法枚举进程列表。\n"
STRING_TERMINATE_FAILED, "错误:无法终止进程“%1”。\n"
STRING_SELF_TERMINATION, "错误:不允许终止自身。\n"
STRING_CLOSE_CHILD, "Close message sent to top-level windows of process with PID %1!u!, child of PID %2!u!.\n"
STRING_TERM_CHILD, "Process with PID %1!u! was forcibly terminated, child of PID %2!u!.\n"
STRING_TERM_CHILD_FAILED, "Error: Unable to terminate process with PID %1!u!, child of PID %2!u!.\n"
STRING_PARAM_TOO_MUCH, "错误:无效语法。选项“%1”不允许超过“%2!d!”次。\n"
STRING_INVALID_SYNTAX, "错误:无效语法。\n"
}

View File

@@ -11,7 +11,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL
STRINGTABLE
{
STRING_USAGE, "用法: taskkill [/?] [/f] [/im 處理程序名稱 | /pid PID] [/t]\n"
STRING_USAGE, "用法: taskkill [/?] [/f] [/im 處理程序名稱 | /pid PID]\n"
STRING_INVALID_OPTION, "錯誤: 指定了不明或不正確的命令列選項。\n"
STRING_INVALID_PARAM, "錯誤: 指定了不正確的命令列參數。\n"
STRING_MISSING_OPTION, "錯誤: 必須指定選項 /im 或 /pid 的其中之一。\n"
@@ -25,9 +25,6 @@ STRINGTABLE
STRING_ENUM_FAILED, "錯誤: 無法列舉處理程序清單。\n"
STRING_TERMINATE_FAILED, "錯誤: 無法終止處理程序 '%1'。\n"
STRING_SELF_TERMINATION, "錯誤: 處理程序不允許自我終止。\n"
STRING_CLOSE_CHILD, "Close message sent to top-level windows of process with PID %1!u!, child of PID %2!u!.\n"
STRING_TERM_CHILD, "Process with PID %1!u! was forcibly terminated, child of PID %2!u!.\n"
STRING_TERM_CHILD_FAILED, "Error: Unable to terminate process with PID %1!u!, child of PID %2!u!.\n"
STRING_PARAM_TOO_MUCH, "錯誤: 無效的語法。'%1' 選項不允許超過 '%2!d!' 次。\n"
STRING_INVALID_SYNTAX, "錯誤: 無效的語法。\n"
}

View File

@@ -23,7 +23,6 @@
#include <stdlib.h>
#include <windows.h>
#include <psapi.h>
#include <tlhelp32.h>
#include <wine/debug.h>
#include <wine/unicode.h>
@@ -32,7 +31,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(taskkill);
static BOOL force_termination = FALSE;
static BOOL kill_child_processes = FALSE;
static WCHAR **task_list;
static unsigned int task_count;
@@ -232,74 +230,11 @@ static BOOL get_process_name_from_pid(DWORD pid, WCHAR *buf, DWORD chars)
* A PID of zero causes taskkill to warn about the inability to terminate
* system processes. */
static BOOL get_pid_creation_time(DWORD pid, FILETIME *time)
{
HANDLE process = INVALID_HANDLE_VALUE;
FILETIME t1 = { 0 }, t2 = { 0 }, t3 = { 0 };
process = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid);
if (!process)
{
return FALSE;
}
if (!GetProcessTimes(process, time, &t1, &t2, &t3))
{
CloseHandle(process);
return FALSE;
}
CloseHandle(process);
return TRUE;
}
static void send_close_messages_tree(DWORD ppid)
{
FILETIME parent_creation_time = { 0 };
HANDLE h = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
PROCESSENTRY32W pe = { 0 };
pe.dwSize = sizeof(PROCESSENTRY32W);
if (!get_pid_creation_time(ppid, &parent_creation_time) || !h)
{
CloseHandle(h);
return;
}
if (Process32FirstW(h, &pe))
{
do
{
FILETIME child_creation_time = { 0 };
struct pid_close_info info = { pe.th32ProcessID };
if (!get_pid_creation_time(pe.th32ProcessID, &child_creation_time))
{
continue;
}
// Compare creation time to avoid reuse PID, thanks to @ThFabba
if (pe.th32ParentProcessID == ppid &&
CompareFileTime(&parent_creation_time, &child_creation_time) < 0)
{
// Use recursion to browse all child processes
send_close_messages_tree(pe.th32ProcessID);
EnumWindows(pid_enum_proc, (LPARAM)&info);
if (info.found)
{
taskkill_message_printfW(STRING_CLOSE_CHILD, pe.th32ProcessID, ppid);
}
}
} while (Process32NextW(h, &pe));
}
CloseHandle(h);
}
#ifndef __REACTOS__
static int send_close_messages(void)
{
DWORD *pid_list, pid_list_size, *pkill_list;
DWORD *pid_list, pid_list_size;
DWORD self_pid = GetCurrentProcessId();
unsigned int i;
int status_code = 0;
@@ -311,17 +246,10 @@ static int send_close_messages(void)
return 1;
}
pkill_list = HeapAlloc(GetProcessHeap(), 0, pid_list_size * sizeof(DWORD));
if (!pkill_list)
return 1;
for (i = 0; i < task_count; i++)
{
WCHAR *p = task_list[i];
BOOL is_numeric = TRUE;
DWORD pkill_size = 0, index = 0;
memset(pkill_list, 0, pid_list_size * sizeof(DWORD));
/* Determine whether the string is not numeric. */
while (*p)
@@ -333,43 +261,9 @@ static int send_close_messages(void)
}
}
// Find processes to kill
if (is_numeric)
{
WCHAR ps_name[MAX_PATH] = { 0 };
if (get_process_name_from_pid(atoiW(task_list[i]), ps_name, MAX_PATH))
{
pkill_list[pkill_size] = atoiW(task_list[i]);
pkill_size++;
}
}
else
{
for (index = 0; index < pid_list_size; index++)
{
WCHAR process_name[MAX_PATH];
if (get_process_name_from_pid(pid_list[index], process_name, MAX_PATH) &&
!strcmpiW(process_name, task_list[i]))
{
pkill_list[pkill_size] = pid_list[index];
pkill_size++;
}
}
}
// Can't find any process same as name or PID
if (pkill_size == 0)
{
taskkill_message_printfW(STRING_SEARCH_FAILED, task_list[i]);
status_code = 128;
continue;
}
// Try to send close messages to process in `pkill_list`
for (index = 0; index < pkill_size; index++)
{
DWORD pid = pkill_list[index];
WCHAR process_name[MAX_PATH] = { 0 };
DWORD pid = atoiW(task_list[i]);
struct pid_close_info info = { pid };
if (pid == self_pid)
@@ -379,90 +273,63 @@ static int send_close_messages(void)
continue;
}
// Send close messages to child first
if (kill_child_processes)
{
send_close_messages_tree(pid);
}
get_process_name_from_pid(pid, process_name, MAX_PATH);
EnumWindows(pid_enum_proc, (LPARAM)&info);
if (info.found)
taskkill_message_printfW(STRING_CLOSE_PID_SEARCH, pid);
else
{
if (is_numeric)
taskkill_message_printfW(STRING_SEARCH_FAILED, task_list[i]);
status_code = 128;
}
}
else
{
DWORD index;
BOOL found_process = FALSE;
for (index = 0; index < pid_list_size; index++)
{
WCHAR process_name[MAX_PATH];
if (get_process_name_from_pid(pid_list[index], process_name, MAX_PATH) &&
!strcmpiW(process_name, task_list[i]))
{
taskkill_message_printfW(STRING_CLOSE_PID_SEARCH, pid);
}
else
{
taskkill_message_printfW(STRING_CLOSE_PROC_SRCH, process_name, pid);
struct pid_close_info info = { pid_list[index] };
found_process = TRUE;
if (pid_list[index] == self_pid)
{
taskkill_message(STRING_SELF_TERMINATION);
status_code = 1;
continue;
}
EnumWindows(pid_enum_proc, (LPARAM)&info);
taskkill_message_printfW(STRING_CLOSE_PROC_SRCH, process_name, pid_list[index]);
}
}
if (!found_process)
{
taskkill_message_printfW(STRING_SEARCH_FAILED, task_list[i]);
status_code = 128;
}
}
}
HeapFree(GetProcessHeap(), 0, pkill_list);
HeapFree(GetProcessHeap(), 0, pid_list);
return status_code;
}
static void terminate_process_tree(DWORD ppid)
{
FILETIME parent_creation_time = { 0 };
HANDLE h = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
PROCESSENTRY32W pe = { 0 };
pe.dwSize = sizeof(PROCESSENTRY32W);
if (!get_pid_creation_time(ppid, &parent_creation_time) || !h)
{
CloseHandle(h);
return;
}
if (Process32FirstW(h, &pe))
{
do
{
FILETIME child_creation_time = { 0 };
if (!get_pid_creation_time(pe.th32ProcessID, &child_creation_time))
{
continue;
}
// Compare creation time to avoid reuse PID, thanks to @ThFabba
if (pe.th32ParentProcessID == ppid &&
CompareFileTime(&parent_creation_time, &child_creation_time) < 0)
{
HANDLE process = INVALID_HANDLE_VALUE;
// Use recursion to browse all child processes
terminate_process_tree(pe.th32ProcessID);
process = OpenProcess(PROCESS_TERMINATE, FALSE, pe.th32ProcessID);
if (!process)
{
continue;
}
if (!TerminateProcess(process, 0))
{
taskkill_message_printfW(STRING_TERM_CHILD_FAILED, pe.th32ProcessID, ppid);
CloseHandle(process);
continue;
}
taskkill_message_printfW(STRING_TERM_CHILD, pe.th32ProcessID, ppid);
CloseHandle(process);
}
} while (Process32NextW(h, &pe));
}
CloseHandle(h);
}
#endif // __REACTOS__
#ifdef __REACTOS__
static int terminate_processes(BOOL force_termination)
#else
static int terminate_processes(void)
#endif
{
DWORD *pid_list, pid_list_size, *pkill_list;
DWORD *pid_list, pid_list_size;
DWORD self_pid = GetCurrentProcessId();
unsigned int i;
int status_code = 0;
@@ -474,17 +341,10 @@ static int terminate_processes(void)
return 1;
}
pkill_list = HeapAlloc(GetProcessHeap(), 0, pid_list_size * sizeof(DWORD));
if (!pkill_list)
return 1;
for (i = 0; i < task_count; i++)
{
WCHAR *p = task_list[i];
BOOL is_numeric = TRUE;
DWORD pkill_size = 0, index = 0;
memset(pkill_list, 0, pid_list_size * sizeof(DWORD));
/* Determine whether the string is not numeric. */
while (*p)
@@ -496,44 +356,12 @@ static int terminate_processes(void)
}
}
// Find processes to kill
if (is_numeric)
{
WCHAR ps_name[MAX_PATH] = { 0 };
if (get_process_name_from_pid(atoiW(task_list[i]), ps_name, MAX_PATH))
{
pkill_list[pkill_size] = atoiW(task_list[i]);
pkill_size++;
}
}
else
{
for (index = 0; index < pid_list_size; index++)
{
WCHAR process_name[MAX_PATH];
if (get_process_name_from_pid(pid_list[index], process_name, MAX_PATH) &&
!strcmpiW(process_name, task_list[i]))
{
pkill_list[pkill_size] = pid_list[index];
pkill_size++;
}
}
}
// Can't find any process same as name or PID
if (!pkill_size)
{
taskkill_message_printfW(STRING_SEARCH_FAILED, task_list[i]);
status_code = 128;
continue;
}
// Try to terminate to process in `pkill_list`
for (index = 0; index < pkill_size; index++)
{
DWORD pid = pkill_list[index];
WCHAR process_name[MAX_PATH] = { 0 };
HANDLE process = INVALID_HANDLE_VALUE;
DWORD pid = atoiW(task_list[i]);
#ifndef __REACTOS__
HANDLE process;
#endif
if (pid == self_pid)
{
@@ -542,14 +370,13 @@ static int terminate_processes(void)
continue;
}
// Terminate child first
if (kill_child_processes)
#ifdef __REACTOS__
if (force_termination)
{
terminate_process_tree(pid);
}
HANDLE process;
#endif
process = OpenProcess(PROCESS_TERMINATE, FALSE, pid);
if (get_process_name_from_pid(pid, process_name, MAX_PATH) && !process)
if (!process)
{
taskkill_message_printfW(STRING_SEARCH_FAILED, task_list[i]);
status_code = 128;
@@ -558,25 +385,102 @@ static int terminate_processes(void)
if (!TerminateProcess(process, 0))
{
taskkill_message_printfW(STRING_TERMINATE_FAILED, process_name);
taskkill_message_printfW(STRING_TERMINATE_FAILED, task_list[i]);
status_code = 1;
CloseHandle(process);
continue;
}
if (is_numeric)
{
taskkill_message_printfW(STRING_TERM_PID_SEARCH, pid);
taskkill_message_printfW(STRING_TERM_PID_SEARCH, pid);
CloseHandle(process);
#ifdef __REACTOS__
}
else
{
taskkill_message_printfW(STRING_TERM_PROC_SEARCH, process_name, pid);
struct pid_close_info info = { pid };
EnumWindows(pid_enum_proc, (LPARAM)&info);
if (info.found)
taskkill_message_printfW(STRING_CLOSE_PID_SEARCH, pid);
else
{
taskkill_message_printfW(STRING_SEARCH_FAILED, task_list[i]);
status_code = 128;
}
}
#endif
}
else
{
DWORD index;
BOOL found_process = FALSE;
for (index = 0; index < pid_list_size; index++)
{
WCHAR process_name[MAX_PATH];
if (get_process_name_from_pid(pid_list[index], process_name, MAX_PATH) &&
!strcmpiW(process_name, task_list[i]))
{
#ifdef __REACTOS__
found_process = TRUE;
#else
HANDLE process;
#endif
if (pid_list[index] == self_pid)
{
taskkill_message(STRING_SELF_TERMINATION);
status_code = 1;
continue;
}
#ifdef __REACTOS__
if (force_termination)
{
HANDLE process;
#endif
process = OpenProcess(PROCESS_TERMINATE, FALSE, pid_list[index]);
if (!process)
{
taskkill_message_printfW(STRING_SEARCH_FAILED, task_list[i]);
status_code = 128;
continue;
}
if (!TerminateProcess(process, 0))
{
taskkill_message_printfW(STRING_TERMINATE_FAILED, task_list[i]);
status_code = 1;
CloseHandle(process);
continue;
}
#ifndef __REACTOS__
found_process = TRUE;
#endif
taskkill_message_printfW(STRING_TERM_PROC_SEARCH, task_list[i], pid_list[index]);
CloseHandle(process);
#ifdef __REACTOS__
}
else
{
struct pid_close_info info = { pid_list[index] };
EnumWindows(pid_enum_proc, (LPARAM)&info);
taskkill_message_printfW(STRING_CLOSE_PROC_SRCH, process_name, pid_list[index]);
}
#endif
}
}
if (!found_process)
{
taskkill_message_printfW(STRING_SEARCH_FAILED, task_list[i]);
status_code = 128;
}
CloseHandle(process);
}
}
HeapFree(GetProcessHeap(), 0, pkill_list);
HeapFree(GetProcessHeap(), 0, pid_list);
return status_code;
}
@@ -631,6 +535,10 @@ static int get_argument_type(WCHAR* argument)
return OP_PARAM_INVALID;
}
/* FIXME
argument T not supported
*/
static BOOL process_arguments(int argc, WCHAR* argv[])
{
BOOL has_im = FALSE, has_pid = FALSE, has_help = FALSE;
@@ -704,14 +612,7 @@ static BOOL process_arguments(int argc, WCHAR* argv[])
}
case OP_PARAM_TERMINATE_CHILD:
{
if (kill_child_processes == TRUE)
{
// -t already specified
taskkill_message_printfW(STRING_PARAM_TOO_MUCH, argv[i], 1);
taskkill_message(STRING_USAGE);
return FALSE;
}
kill_child_processes = TRUE;
WINE_FIXME("argument T not supported\n");
break;
}
case OP_PARAM_INVALID:
@@ -790,8 +691,8 @@ static BOOL process_arguments(int argc, WCHAR *argv[])
argdata++;
if (!strcmpiW(opTerminateChildren, argdata))
kill_child_processes = TRUE;
else if (!strcmpiW(opForceTerminate, argdata))
WINE_FIXME("argument T not supported\n");
if (!strcmpiW(opForceTerminate, argdata))
force_termination = TRUE;
/* Options /IM and /PID appear to behave identically, except for
* the fact that they cannot be specified at the same time. */
@@ -850,10 +751,14 @@ int wmain(int argc, WCHAR *argv[])
return 1;
}
#ifdef __REACTOS__
status_code = terminate_processes(force_termination);
#else
if (force_termination)
status_code = terminate_processes();
else
status_code = send_close_messages();
#endif
HeapFree(GetProcessHeap(), 0, task_list);
return status_code;

View File

@@ -35,8 +35,6 @@
#define STRING_ENUM_FAILED 112
#define STRING_TERMINATE_FAILED 113
#define STRING_SELF_TERMINATION 114
#define STRING_CLOSE_CHILD 115
#define STRING_TERM_CHILD 116
#define STRING_TERM_CHILD_FAILED 117
#define STRING_PARAM_TOO_MUCH 118
#define STRING_INVALID_SYNTAX 119
#define STRING_PARAM_TOO_MUCH 115
#define STRING_INVALID_SYNTAX 116

View File

@@ -50,7 +50,7 @@ où :\n\
[/A] Copie uniquement les fichiers qui ont l'attribut archive défini\n\
[/M] Copie uniquement les fichiers qui ont l'attribut archive défini ; supprime\n\
\tensuite l'attribut\n\
[/K] Copie les attributs de fichiers. Sans ce paramètre les attributs ne sont pas conservés.\n\
[/K] Copy file attributes, without this attributes are not preserved.\n\
[/D | /D:m-d-y] Copie uniquement les nouveaux fichiers, ou ceux modifiés après la date spécifiée.\n\
\t\tSi aucune date n'est spécifiée, copie uniquement lorsque le fichier de destination est plus ancien\n\
\t\tque le fichier source\n\n"

View File

@@ -40,9 +40,6 @@
#ifdef LANGUAGE_IT_IT
#include "lang/it-IT.rc"
#endif
#ifdef LANGUAGE_JA_JP
#include "lang/ja-JP.rc"
#endif
#ifdef LANGUAGE_PL_PL
#include "lang/pl-PL.rc"
#endif

View File

@@ -1,7 +0,0 @@
LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_APP_TITLE "ReactOS クラッシュレポーター"
IDS_USER_ALERT_MESSAGE "アプリケーション %ls がクラッシュしました。このクラッシュに関する情報は次の場所に保存されました:\n\n%ls"
END

View File

@@ -3,7 +3,7 @@
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Romanian resource file
* TRANSLATORS: Copyright 2011-2019 Ștefan Fulea <stefan.fulea@mail.com>
* Copyright 2023-2025 Andrei Miloiu <miloiuandrei@gmail.com>
* Copyright 2023 Andrei Miloiu <miloiuandrei@gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
@@ -11,22 +11,22 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
IDD_MAIN_DIALOG DIALOGEX 0, 0, 478, 280
STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP |
WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU
CAPTION "Instrument de diagnosticare ReactX"
CAPTION "Diagnostic ReactX"
FONT 8, "MS Shell Dlg"
BEGIN
CONTROL "Tab1", IDC_TAB_CONTROL, "SysTabControl32", WS_TABSTOP, 2, 2, 474, 250
PUSHBUTTON "&Ajutor", IDC_BUTTON_HELP, 2, 260, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_DISABLED
DEFPUSHBUTTON "&Pagina următoare", IDC_BUTTON_NEXT, 187, 260, 120, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "&Salvare a tuturor informațiilor…", IDC_BUTTON_SAVE_INFO, 311, 260, 110, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_DISABLED
PUSHBUTTON "Î&nchidere", IDC_BUTTON_EXIT, 425, 260, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "&Manual…", IDC_BUTTON_HELP, 2, 260, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_DISABLED
DEFPUSHBUTTON "&Următorul compartiment", IDC_BUTTON_NEXT, 187, 260, 120, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "S&alvare informații…", IDC_BUTTON_SAVE_INFO, 311, 260, 110, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_DISABLED
PUSHBUTTON "Î&nchide", IDC_BUTTON_EXIT, 425, 260, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
END
IDD_SYSTEM_DIALOG DIALOGEX 0, 0, 462, 220
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Acest instrument raportează informații detaliate despre componentele ReactX și driverele instalate pe sistem.", IDC_STATIC, 5, 0, 443, 17
LTEXT "Dacă întâmpinați o problemă cu ReactX și știți ce este, atunci faceți clic pe fila corespunzătoare de mai sus. Dacă nu, puteți face clic pe butonul ""Pagina următoare"" de mai jos pentru a vizita fiecare pagină în succesiune.", IDC_STATIC, 5, 15, 443, 25
LTEXT "Acest instrument oferă informații detaliate despre componentele ReactX și drivere instalate în sistem.", IDC_STATIC, 5, 0, 443, 17
LTEXT "Dacă aveți la cunoștință careva probleme la o anumită categorie, mergeți la compartimentul corespunzător de mai sus. Altfel, puteți utiliza butonul „Următorul compartiment” de mai jos pentru a trece secvențial prin fiecare categorie.", IDC_STATIC, 5, 15, 443, 25
GROUPBOX "Informații despre sistem", IDC_STATIC, 5, 35, 452, 150, SS_RIGHT
LTEXT "Data/Ora curentă:", IDC_STATIC, 70, 50, 80, 10, SS_RIGHT
LTEXT "Numele calculatorului:", IDC_STATIC, 70, 60, 80, 10, SS_RIGHT
@@ -60,11 +60,11 @@ BEGIN
GROUPBOX "Dispozitiv", IDC_STATIC, 5, 0, 250, 95
RTEXT "Nume:", IDC_STATIC, 20, 10, 70, 10
RTEXT "Producător:", IDC_STATIC, 20, 20, 70, 10
RTEXT "Tipul chip-ului:", IDC_STATIC, 20, 30, 70, 10
RTEXT "Tipul DAC:", IDC_STATIC, 20, 40, 70, 10
RTEXT "Mem. tot. aprox.:", IDC_STATIC, 20, 50, 70, 10
RTEXT "Mod afișare curentă:", IDC_STATIC, 20, 60, 70, 10
RTEXT "Monitor:", IDC_STATIC, 20, 70, 70, 10
RTEXT "Tipul cipului:", IDC_STATIC, 20, 30, 70, 10
RTEXT "Tipul CDA:", IDC_STATIC, 20, 40, 70, 10
RTEXT "Memorie aprox.:", IDC_STATIC, 20, 50, 70, 10
RTEXT "Afișare curentă:", IDC_STATIC, 20, 60, 70, 10
RTEXT "Ecran:", IDC_STATIC, 20, 70, 70, 10
EDITTEXT IDC_STATIC_ADAPTER_ID, 95, 10, 150, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
EDITTEXT IDC_STATIC_ADAPTER_VENDOR, 95, 20, 150, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
EDITTEXT IDC_STATIC_ADAPTER_CHIP, 95, 30, 150, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
@@ -73,10 +73,10 @@ BEGIN
EDITTEXT IDC_STATIC_ADAPTER_MODE, 95, 60, 150, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
EDITTEXT IDC_STATIC_ADAPTER_MONITOR, 95, 70, 150, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
GROUPBOX "Driver", IDC_STATIC, 260, 0, 197, 95
RTEXT "Driver principal:", IDC_STATIC, 275, 10, 55, 10
RTEXT "Driver primar:", IDC_STATIC, 275, 10, 55, 10
RTEXT "Versiune:", IDC_STATIC, 275, 20, 55, 10
RTEXT "Dată:", IDC_STATIC, 275, 30, 55, 10
RTEXT "Logo WHQL:", IDC_STATIC, 275, 40, 55, 10
RTEXT "Semnăt. WHQL:", IDC_STATIC, 275, 40, 55, 10
RTEXT "Mini-VDD:", IDC_STATIC, 275, 50, 55, 10
RTEXT "VDD:", IDC_STATIC, 275, 60, 55, 10
RTEXT "Versiune DDI:", IDC_STATIC, 275, 70, 55, 10
@@ -87,18 +87,18 @@ BEGIN
EDITTEXT IDC_STATIC_ADAPTER_MINIVDD, 335, 50, 120, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
EDITTEXT IDC_STATIC_ADAPTER_VDD, 335, 60, 120, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
EDITTEXT IDC_STATIC_ADAPTER_DDI, 335, 70, 120, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
GROUPBOX "Caracteristici ReactX", IDC_STATIC, 5, 97, 452, 70
GROUPBOX "Funcționalități ReactX", IDC_STATIC, 5, 97, 452, 70
RTEXT "Accelerare DirectDraw:", IDC_STATIC, 15, 115, 110, 12
RTEXT "Accelerare Direct3D:", IDC_STATIC, 15, 130, 110, 12
RTEXT "Accelerare a texturilor AGP:", IDC_STATIC, 15, 145, 110, 12
RTEXT "Accelerare Textură AGP:", IDC_STATIC, 15, 145, 110, 12
LTEXT "", IDC_STATIC_DDSTATE, 130, 115, 40, 10
LTEXT "", IDC_STATIC_D3DSTATE, 130, 130, 40, 10
LTEXT "", IDC_STATIC_AGPSTATE, 130, 145, 40, 10
PUSHBUTTON "Activare", IDC_BUTTON_DDRAW, 170, 112, 60, 14, WS_DISABLED
PUSHBUTTON "Activare", IDC_BUTTON_D3D, 170, 128, 60, 14, WS_DISABLED
PUSHBUTTON "Activare", IDC_BUTTON_AGP, 170, 144, 60, 14, WS_DISABLED
PUSHBUTTON "Testare DirectDraw", IDC_BUTTON_TESTDD, 250, 112, 80, 14
PUSHBUTTON "Testare Direct3D", IDC_BUTTON_TEST3D, 250, 128, 80, 14
PUSHBUTTON "Activează", IDC_BUTTON_DDRAW, 170, 112, 60, 14, WS_DISABLED
PUSHBUTTON "Activează", IDC_BUTTON_D3D, 170, 128, 60, 14, WS_DISABLED
PUSHBUTTON "Activează", IDC_BUTTON_AGP, 170, 144, 60, 14, WS_DISABLED
PUSHBUTTON "Testează DirectDraw", IDC_BUTTON_TESTDD, 250, 112, 80, 14
PUSHBUTTON "Testează Direct3D", IDC_BUTTON_TEST3D, 250, 128, 80, 14
GROUPBOX "Note", IDC_STATIC, 5, 170, 452, 50
EDITTEXT IDC_TEXT_INFO, 15, 182, 432, 30, ES_LEFT | WS_BORDER | ES_READONLY | WS_TABSTOP
END
@@ -124,7 +124,7 @@ BEGIN
RTEXT "Nume:", IDC_STATIC, 275, 10, 55, 10
RTEXT "Versiune:", IDC_STATIC, 275, 20, 55, 10
RTEXT "Dată:", IDC_STATIC, 275, 30, 55, 10
RTEXT "Logo WHQL:", IDC_STATIC, 275, 40, 55, 10
RTEXT "Semnătură WHQL:", IDC_STATIC, 275, 40, 55, 10
RTEXT "Alte fișiere:", IDC_STATIC, 275, 50, 55, 10
RTEXT "Furnizor:", IDC_STATIC, 275, 60, 55, 10
EDITTEXT IDC_STATIC_DSOUND_DRIVER, 335, 10, 100, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
@@ -133,10 +133,10 @@ BEGIN
EDITTEXT IDC_STATIC_DSOUND_LOGO, 335, 40, 100, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
EDITTEXT IDC_STATIC_DSOUND_FILES, 335, 50, 100, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
EDITTEXT IDC_STATIC_ADAPTER_PROVIDER, 335, 60, 100, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
GROUPBOX "Caracteristici ReactX", IDC_STATIC, 5, 97, 452, 70
GROUPBOX "Funcționalități ReactX", IDC_STATIC, 5, 97, 452, 70
CONTROL "", IDC_SLIDER_DSOUND, "msctls_trackbar32", TBS_BOTTOM | TBS_AUTOTICKS | WS_TABSTOP, 110, 125, 80, 17
RTEXT "Hardware de sunet\nNivel de accelerare:", IDC_STATIC, 10, 125, 90, 20, WS_DISABLED
PUSHBUTTON "Testare DirectSound", IDC_BUTTON_TESTDSOUND, 270, 125, 80, 14, WS_DISABLED
RTEXT "Echipament de sunet\nNivel de accelerare::", IDC_STATIC, 10, 125, 90, 20, WS_DISABLED
PUSHBUTTON "Testează DirectSound", IDC_BUTTON_TESTDSOUND, 270, 125, 80, 14, WS_DISABLED
GROUPBOX "Note", IDC_STATIC, 5, 170, 452, 50
EDITTEXT IDC_TEXT_DSOUNDINFO, 15, 182, 432, 30, ES_LEFT | WS_BORDER | ES_READONLY | WS_TABSTOP
END
@@ -148,13 +148,13 @@ BEGIN
RTEXT "Colecție de MIDI DLS generală:", IDC_STATIC, 0, 0, 100, 10
EDITTEXT IDC_MIDI_DLS_COLLECTION, 105, 0, 250, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
GROUPBOX "Porturi de muzică", IDC_STATIC, 5, 10, 452, 85
GROUPBOX "Caracteristici ReactX", IDC_STATIC, 5, 97, 452, 70
GROUPBOX "Funcționalități ReactX", IDC_STATIC, 5, 97, 452, 70
LTEXT "Port de accelerare implicit:", IDC_STATIC, 15, 120, 95, 17
LTEXT "", IDC_STATIC_DEFAULT_PORT_ACCELERATION, 115, 120, 50, 10
PUSHBUTTON "Dezactivează", IDC_BUTTON_DISABLEDMUSIC, 75, 135, 80, 14, WS_DISABLED
LTEXT "Testare utilizare port:", IDC_STATIC, 180, 105, 100, 10
LISTBOX IDC_DMUSIC_TEST_LIST, 180, 115, 180, 45, LBS_NOINTEGRALHEIGHT | LBS_EXTENDEDSEL | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Testare DirectMusic", IDC_BUTTON_TESTDMUSIC, 370, 145, 80, 14, WS_DISABLED
PUSHBUTTON "Testează DirectMusic", IDC_BUTTON_TESTDMUSIC, 370, 145, 80, 14, WS_DISABLED
GROUPBOX "Note", IDC_STATIC, 5, 170, 452, 50
EDITTEXT IDC_MUSIC_NOTES, 15, 182, 432, 30, ES_LEFT | WS_BORDER | ES_READONLY | WS_TABSTOP
END
@@ -176,12 +176,12 @@ IDD_NETWORK_DIALOG DIALOGEX 0, 0, 462, 220
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 8, "MS Shell Dlg"
BEGIN
GROUPBOX "Furnizori de servicii DirectPlay înregistrați", IDC_STATIC, 5, 0, 452, 75
GROUPBOX "Furnizori înregistrați de servicii DirectPlay", IDC_STATIC, 5, 0, 452, 75
CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 15, 12, 432, 55
GROUPBOX "Aplicații Lobbyable DirectPlay înregistrate", IDC_STATIC, 5, 77, 452, 55
GROUPBOX "Caracteristici ReactX", IDC_STATIC, 5, 133, 452, 35
GROUPBOX "Aplicații înregistrate pentru DirectPlay", IDC_STATIC, 5, 77, 452, 55
GROUPBOX "Funcționalități ReactX", IDC_STATIC, 5, 133, 452, 35
PUSHBUTTON "Opțiuni de voce DirectPlay", IDC_BUTTON_VOICE_OPTIONS, 10, 145, 90, 14, WS_DISABLED
PUSHBUTTON "Testare DirectPlay", IDC_BUTTON_TESTDPLAY, 130, 145, 80, 14, WS_DISABLED
PUSHBUTTON "Testează DirectPlay", IDC_BUTTON_TESTDPLAY, 130, 145, 80, 14, WS_DISABLED
GROUPBOX "Note", IDC_STATIC, 5, 170, 452, 50
EDITTEXT IDC_NETWORK_NOTES, 15, 182, 432, 30, ES_LEFT | WS_BORDER | ES_READONLY | WS_TABSTOP
END
@@ -190,73 +190,73 @@ IDD_HELP_DIALOG DIALOGEX 0, 0, 462, 220
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Încă nu găsiți informațiile pe care le căutați? Iată câteva lucruri suplimentare pe care le puteți face:", IDC_STATIC, 5, 0, 300, 10
LTEXT "Încă nu ați găsit informația necesară? Iată câteva lucruri suplimentare pe care le puteți face:", IDC_STATIC, 5, 0, 300, 10
PUSHBUTTON "Informații de sistem", IDC_BUTTON_SYSINFO, 5, 20, 80, 14, WS_DISABLED
LTEXT "Afișează informații suplimentare de sistem", IDC_STATIC, 90, 23, 300, 10
PUSHBUTTON "Ajust. rata de împrosp.", IDC_BUTTON_DDRAW_REFRESH, 5, 40, 80, 14, WS_DISABLED
LTEXT "Ignoră rata de reîmprospătare pentru DirectDraw", IDC_STATIC, 90, 43, 300, 10
LTEXT "Afișează informații suplimantare de sistem", IDC_STATIC, 90, 23, 300, 10
PUSHBUTTON "Ajustează rata de împrospătare", IDC_BUTTON_DDRAW_REFRESH, 5, 40, 80, 14, WS_DISABLED
LTEXT "Ajustează rata de împrospătare pentru DirectDraw", IDC_STATIC, 90, 43, 300, 10
END
STRINGTABLE
BEGIN
IDS_MAIN_DIALOG "Instrument de diagnosticare ReactX"
IDS_MAIN_DIALOG "Diagnostic ReactX"
IDS_SYSTEM_DIALOG "Sistem"
IDS_DISPLAY_DIALOG "Afișaj"
IDS_DISPLAY_DIALOG "Ecran"
IDS_SOUND_DIALOG "Sunet"
IDS_MUSIC_DIALOG "Muzică"
IDS_INPUT_DIALOG "Intrare"
IDS_INPUT_DIALOG "Intrări"
IDS_NETWORK_DIALOG "Rețea"
IDS_HELP_DIALOG "Ajutor"
IDS_FORMAT_MB "%I64uMB de RAM"
IDS_FORMAT_SWAP "%I64u (de) MB folosit (folosiți), %I64u (de) MB disponibil(i)"
IDS_FORMAT_UNIPROC "%s (%u CPU)"
IDS_FORMAT_MPPROC "%s (%u CPUs)"
IDS_VERSION_UNKNOWN "Versiune necunoscută"
IDS_HELP_DIALOG "Asistență"
IDS_FORMAT_MB "%I64u Mo memorie"
IDS_FORMAT_SWAP "%I64u Mo utilizată, %I64u Mo disponibilă"
IDS_FORMAT_UNIPROC "%s (%u procesor)"
IDS_FORMAT_MPPROC "%s (%u procesoare)"
IDS_VERSION_UNKNOWN "Versiune neidentificată"
IDS_DEVICE_STATUS_ATTACHED "Conectat"
IDS_DEVICE_STATUS_MISSING "Deconectat"
IDS_DEVICE_STATUS_UNKNOWN "Necunoscut"
IDS_DEVICE_NAME "Numele dispozitivului"
IDS_DEVICE_STATUS_UNKNOWN "Neidentificat"
IDS_DEVICE_NAME "Nume dispozitiv"
IDS_DEVICE_STATUS "Stare"
IDS_DEVICE_CONTROLLER "ID controller-ului"
IDS_DEVICE_MANUFACTURER "ID-ul producătorului"
IDS_DEVICE_PRODUCT "ID-ul produsului"
IDS_DEVICE_FORCEFEEDBACK "Forțare a driverului de feedback"
IDS_DEVICE_CONTROLLER "ID controlor"
IDS_DEVICE_MANUFACTURER "ID producător"
IDS_DEVICE_PRODUCT "ID produs"
IDS_DEVICE_FORCEFEEDBACK "Forțează reacția driverului"
IDS_NOT_APPLICABLE "n/a"
IDS_OPTION_YES "Da"
IDS_DIRECTPLAY_COL_NAME1 "Nume"
IDS_DIRECTPLAY_COL_NAME2 "Registru"
IDS_DIRECTPLAY_COL_NAME3 "Fișier"
IDS_DIRECTPLAY_COL_NAME4 "Versiune"
IDS_DIRECTPLAY8_MODEMSP "Furnizor de servicii de modem DirectPlay8"
IDS_DIRECTPLAY8_SERIALSP "Furnizor de servicii seriale DirectPlay8"
IDS_DIRECTPLAY8_IPXSP "Furnizor de servicii DirectPlay8 IPX"
IDS_DIRECTPLAY8_TCPSP "DirectPlay8 TCP/IP Service Provider"
IDS_DIRECTPLAY8_MODEMSP "Furnizor de serviciu Modem-DirectPlay8"
IDS_DIRECTPLAY8_SERIALSP "Furnizor de serviciu Serial-DirectPlay8"
IDS_DIRECTPLAY8_IPXSP "Furnizor de serviciu IPX-DirectPlay8"
IDS_DIRECTPLAY8_TCPSP "Furnizor de serviciu TCP/IP-DirectPlay8"
IDS_DIRECTPLAY_TCPCONN "Conexiune de Internet TCP/IP pentru DirectPlay"
IDS_DIRECTPLAY_IPXCONN "Conexiune IPX pentru DirectPlay"
IDS_DIRECTPLAY_MODEMCONN "Conexiune de modem pentru DirectPlay"
IDS_DIRECTPLAY_SERIALCONN "Conexiune serială pentru DirectPlay"
IDS_REG_SUCCESS "OK"
IDS_DIRECTPLAY_MODEMCONN "Conexiune Modem pentru DirectPlay"
IDS_DIRECTPLAY_SERIALCONN "Conexiune Serială pentru DirectPlay"
IDS_REG_SUCCESS "Î&nchide"
IDS_REG_FAIL "Eroare"
IDS_DDTEST_ERROR "Testul de randare DirectDraw a eșuat.\nVă rugăm să consultați notele pentru mai multe informații."
IDS_DDTEST_DESCRIPTION "Acesta va porni testarea interfeței DirectDraw. Doriți să continuați?"
IDS_DDPRIMARY_DESCRIPTION "Acest test va folosi DirectDraw pentru a desena pe suprafața principală.\nAr trebui desenate dreptunghiuri alb-negru. Doriți să continuați?"
IDS_DDPRIMARY_RESULT "Ați văzut dreptunghiuri alb-negru?"
IDS_DDOFFSCREEN_DESCRIPTION "Acest test va folosi DirectDraw pentru a desena un tampon în afara ecranului. Ar trebui desenat un dreptunghi alb în mișcare. Doriți să continuați?"
IDS_DDOFFSCREEN_RESULT "Ați văzut dreptunghi alb în mișcare?"
IDS_DDFULLSCREEN_DESCRIPTION "Acest test va folosi DirectDraw pentru a desena în modul ecran complet. Ar trebui desenat un dreptunghi alb în mișcare. Doriți să continuați?"
IDS_DDFULLSCREEN_RESULT "Ați văzut dreptunghi alb în mișcare în modul ecran complet?"
IDS_FORMAT_ADAPTER_MEM "%u (de) MB"
IDS_FORMAT_ADAPTER_MODE "%d x %d (%u (de) biți)(%uHz)"
IDS_DDTEST_ERROR "Testul a eșuat!"
IDS_DDTEST_DESCRIPTION "Urmează testele de interfață DirectDraw. Continuați?"
IDS_DDPRIMARY_DESCRIPTION "Testul următor va utiliza DirectDraw pentru a desena dreptunghiuri albe și negre pe suprafața primară. Continuați?"
IDS_DDPRIMARY_RESULT "Dreptunghiurile albe și negre au fost vizibile?"
IDS_DDOFFSCREEN_DESCRIPTION "Testul următor va utiliza DirectDraw pentru desenarea unui dreptunghi alb în mișcare utilizând o memorie tampon din afara ecranului. Continuați?"
IDS_DDOFFSCREEN_RESULT "Dreptunghiul alb în mișcare a fost vizibil?"
IDS_DDFULLSCREEN_DESCRIPTION "Testul următor va utiliza DirectDraw pentru desenarea unui dreptunghi alb în mișcare utilizând tot ecranul. Continuați?"
IDS_DDFULLSCREEN_RESULT "Pe ecranul complet, dreptunghiul alb în mișcare a fost vizibil?"
IDS_FORMAT_ADAPTER_MEM "%u Mo"
IDS_FORMAT_ADAPTER_MODE "%d x %d (%u biți)(%uHz)"
IDS_OPTION_NO "Nu"
IDS_D3DTEST_DESCRIPTION "Acesta va porni testarea interfeței Direct3D. Doriți să continuați?"
IDS_D3DTEST_D3Dx "Acest test va folosi interfața Direct3D %u accelerată hardware."
IDS_OS_VERSION "%s %s (%d.%d, Subversiunea %d)"
IDS_D3DTEST_DESCRIPTION "Urmează testul de interfață Direct3D. Continuați?"
IDS_D3DTEST_D3Dx "Testul următor va utiliza interfața Direct3D %u cu accelerare de echipament fizic."
IDS_OS_VERSION "%s %s (%d.%d, Build %d)"
IDS_DMUSIC_DESC "Descriere"
IDS_DMUSIC_TYPE "Tip"
IDS_DMUSIC_KERNEL "Modul nucleu"
IDS_DMUSIC_IO "I/E"
IDS_DMUSIC_DLS "Suportă DLS"
IDS_DMUSIC_KERNEL "Mod nucleu"
IDS_DMUSIC_IO "In/Ex"
IDS_DMUSIC_DLS "DLS de suport"
IDS_DMUSIC_EXT "Extern"
IDS_DMUSIC_PORT "Port implicit"
IDS_DDDISABLE_MSG "Acesta va dezactiva toată accelerarea hardware pentru DirectDraw pe toate dispozitivele de afișare.\nDoriți să continuați?\n"
IDS_DDDISABLE_MSG "Accelerările fizice DirectDraw vor fi dezactivate pentru toate dispozitivele.\nDoriți să continuați?\n"
END

View File

@@ -40,9 +40,6 @@
#ifdef LANGUAGE_IT_IT
#include "lang/it-IT.rc"
#endif
#ifdef LANGUAGE_JA_JP
#include "lang/ja-JP.rc"
#endif
#ifdef LANGUAGE_LT_LT
#include "lang/lt-LT.rc"
#endif

View File

@@ -1,13 +0,0 @@
LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_USAGE "FINDSTR: 文字列を含むファイルのすべての行を出力します。\n\n\
FIND [ /C ] [ /I ] [ /N ] [ /V ] ""文字列"" [ ファイル... ]\n\
/C 文字列を含む行の個数を数えます\n\
/I 大文字小文字を無視します\n\
/N 表示される行に1から番号を付けます\n\
/V 文字列を含まない行を出力します"
IDS_NO_SUCH_FILE "FINDSTR: %s: そのようなファイルはありません\n"
IDS_CANNOT_OPEN "FINDSTR: %s: ファイルが開けません\n"
END

View File

@@ -18,12 +18,12 @@ BEGIN
IDS_ERROR_NOMEM "Mémoire insuffisante pour terminer l'opération."
IDS_ERROR_NOFONT "Le fichier %1 n'est pas un fichier de polices valide."
IDS_ERROR_NOCLASS "Impossible d'initialiser la classe de fenêtre."
IDS_ERROR_ISINSTALLED "Cette police est déjà installée !"
IDS_ERROR_FONTCPY "Échec lors de la copie du fichier police !"
IDS_ERROR_OPENKEY "Échec lors de l'ouverture de la clé de registre de la police !"
IDS_ERROR_REGISTER "Échec lors de l'enregistrement de la nouvelle police !"
IDS_SUCCESS "Succès"
IDS_COMPLETED "Installation de la police effectuée."
IDS_ERROR_ISINSTALLED "This font is already installed!"
IDS_ERROR_FONTCPY "Failed to copy the font file!"
IDS_ERROR_OPENKEY "Failed to open the fonts registry key!"
IDS_ERROR_REGISTER "Failed to register the new font!"
IDS_SUCCESS "Success"
IDS_COMPLETED "Font installation completed."
IDS_FILTER_LIST "Toutes polices supportées (*.fon;*.fnt;*.ttf;*.ttc;*.otf;*.otc)\0*.fon;*.fnt;*.ttf;*.ttc;*.otf;*.otc\0\
Fichier de polices (*.fon;*.fnt)\0*.fon;*.fnt\0\
Fichier de polices TrueType (*.ttf)\0*.ttf\0\

View File

@@ -1,11 +1,7 @@
/*
* PROJECT: ReactOS Solitaire
* LICENSE: Freeware, permission to use under Public Domain
* PURPOSE: Czech resource file
* TRANSLATORS: Copyright 2008 Radek Liška (Black_Fox) <radekliska@gmail.com>
* Copyright 2008 Mário Kačmár <kario@szm.sk>
* Copyright 2011-2017 Kamil Horníček <kamil.hornicek@reactos.org>
* Copyright 2024 Václav Zouzalík (Venca24) <vaclav.zouzalik@seznam.cz>
/* FILE: applications/games/solitaire/lang/cs-CZ.rc
* PURPOSE: Czech Language File
* TRANSLATOR: Radek Liska aka Black_Fox (radekliska at gmail dot com)
* UPDATED: 2008-11-30 by Kario
*/
LANGUAGE LANG_CZECH, SUBLANG_DEFAULT
@@ -17,13 +13,13 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT
CAPTION "Možnosti"
FONT 8, "MS Shell Dlg"
BEGIN
GROUPBOX "Sejmout", -1, 7, 7, 90, 40
GROUPBOX "Karty", -1, 7, 7, 90, 40
AUTORADIOBUTTON "Sejmout &jednu", IDC_OPT_DRAWONE, 14, 19, 70, 10, WS_GROUP | WS_TABSTOP
AUTORADIOBUTTON "Sejmout &tři", IDC_OPT_DRAWTHREE, 14, 32, 70, 10
GROUPBOX "Skórování", -1, 100, 7, 75, 53
GROUPBOX "Scoring", -1, 100, 7, 75, 53
AUTORADIOBUTTON "&Standard", IDC_OPT_STANDARD, 107, 19, 60, 10, WS_GROUP | WS_TABSTOP
AUTORADIOBUTTON "&Vegas", IDC_OPT_VEGAS, 107, 32, 60, 10
AUTORADIOBUTTON "Žá&dné", IDC_OPT_NOSCORE, 107, 45, 60, 10
AUTORADIOBUTTON "&None", IDC_OPT_NOSCORE, 107, 45, 60, 10
AUTOCHECKBOX "Zobrazit č&as", IDC_OPT_SHOWTIME, 7 ,51 ,65 ,10, WS_TABSTOP
AUTOCHECKBOX "Stavový řád&ek", IDC_OPT_STATUSBAR, 7, 66, 64, 10, WS_TABSTOP
AUTOCHECKBOX "&Ponechat skóre", IDC_OPT_KEEPSCORE, 100, 66, 65, 10, WS_TABSTOP
@@ -59,7 +55,7 @@ BEGIN
IDS_SOL_NAME "Solitaire"
IDS_SOL_ABOUT "Solitaire by J Brown\nCardLib verze 1.0"
IDS_SOL_QUIT "Ukončit rozehranou hru?"
IDS_SOL_WIN "Gratulujeme, zvítězili jste!"
IDS_SOL_WIN "Gratulujeme, zvítězili jste!!"
IDS_SOL_DEAL "Rozdat znova?"
IDS_SOL_SCORE "Skóre: %d"
IDS_SOL_TIME "Čas: %d"
@@ -73,8 +69,8 @@ BEGIN
BEGIN
MENUITEM "&Rozdat\tF2", IDM_GAME_NEW
MENUITEM SEPARATOR
MENUITEM "&Zpět", IDM_GAME_UNDO, GRAYED
MENUITEM "Ru&b karet...", IDM_GAME_DECK
MENUITEM "&Undo", IDM_GAME_UNDO, GRAYED
MENUITEM "Rub& karet...", IDM_GAME_DECK
MENUITEM "&Možnosti...", IDM_GAME_OPTIONS
MENUITEM SEPARATOR
MENUITEM "&Konec", IDM_GAME_EXIT

View File

@@ -18,7 +18,7 @@ BEGIN
END
POPUP "&View"
BEGIN
MENUITEM "&Mode fenêtre unique", IDM_SWITCHVIEW
MENUITEM "Single-Window &Mode", IDM_SWITCHVIEW
END
POPUP "Périp&hérique"
BEGIN

View File

@@ -9,23 +9,23 @@ BEGIN
MENUITEM SEPARATOR
MENUITEM "終了(&E)", IDM_EXIT
END
POPUP "再生(&P)"
POPUP "&Play"
BEGIN
MENUITEM "再生/再開(&P)\tCtrl+P", IDC_PLAY
MENUITEM "停止(&O)\tCtrl+S", IDC_STOP
MENUITEM "Play/&Pause\tCtrl+P", IDC_PLAY
MENUITEM "St&op\tCtrl+S", IDC_STOP
MENUITEM SEPARATOR
MENUITEM "リピート(&T)\tCtrl+T", IDM_REPEAT
MENUITEM "Repea&t\tCtrl+T", IDM_REPEAT
END
POPUP "表示(&V)"
POPUP "&View"
BEGIN
MENUITEM "単一ウィンドウモード(&M)", IDM_SWITCHVIEW
MENUITEM "Single-Window &Mode", IDM_SWITCHVIEW
END
POPUP "デバイス(&D)"
POPUP "&Device"
BEGIN
MENUITEM SEPARATOR
MENUITEM "プロパティ(&P)", IDM_DEVPROPS
MENUITEM "&Properties", IDM_DEVPROPS
MENUITEM SEPARATOR
MENUITEM "音量調節(&V)", IDM_VOLUMECTL
MENUITEM "&Volume Control", IDM_VOLUMECTL
END
POPUP "ヘルプ(&H)"
BEGIN
@@ -44,14 +44,14 @@ END
STRINGTABLE
BEGIN
IDS_MODE_UNKNOWN "不明"
IDS_MODE_OPEN "開きました"
IDS_MODE_STOP "停止中"
IDS_MODE_PLAY "再生中"
IDS_MODE_PAUSE "一時停止中"
IDS_MODE_RECORD "録音中"
IDS_MODE_SEEK "シーク中"
IDS_MODE_NOT_READY "準備ができていません"
IDS_MODE_UNKNOWN "Unknown"
IDS_MODE_OPEN "Opened"
IDS_MODE_STOP "Stopped"
IDS_MODE_PLAY "Playing"
IDS_MODE_PAUSE "Paused"
IDS_MODE_RECORD "Recording"
IDS_MODE_SEEK "Seeking"
IDS_MODE_NOT_READY "Not ready"
IDS_ALL_TYPES_FILTER "すべてのサポートされたファイル"
IDS_TOOLTIP_PLAY "再生"
IDS_TOOLTIP_STOP "停止"
@@ -60,8 +60,8 @@ BEGIN
IDS_TOOLTIP_SEEKBACK "後ろへシーク"
IDS_TOOLTIP_SEEKFORW "前へシーク"
IDS_TOOLTIP_FORWARD "前へスキップ"
IDS_TOOLTIP_PAUSE "一時停止"
IDS_TOOLTIP_PAUSE "Pause"
IDS_APPTITLE "ReactOS マルチメディア プレーヤー"
IDS_PLAY "再生"
IDS_DEFAULTMCIERRMSG "このエラーの説明はありません。"
IDS_DEFAULTMCIERRMSG "No description is available for this error."
END

View File

@@ -1,171 +0,0 @@
LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
IDD_MSCONFIG_DIALOG DIALOGEX 0, 0, 378, 220
STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP |
WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU
CAPTION "システム構成プログラム"
FONT 9, "MS UI Gothic"
BEGIN
CONTROL "Tab1", IDC_TAB, "SysTabControl32", WS_TABSTOP, 2, 2, 374, 195
DEFPUSHBUTTON "OK", IDOK, 211, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "ヘルプ(&H)", IDC_BTN_HELP, 2, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "キャンセル", IDCANCEL, 267, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "適用", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
END
IDD_STARTUP_PAGE DIALOGEX 0, 0, 362, 175
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 9, "MS UI Gothic"
BEGIN
CONTROL "List3", IDC_STARTUP_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL |
LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 2, 1, 360, 148
PUSHBUTTON "すべて有効化(&A)", IDC_BTN_STARTUP_ACTIVATE, 223, 155, 66, 14
PUSHBUTTON "すべて無効化(&D)", IDC_BTN_STARTUP_DEACTIVATE, 295, 155, 66, 14
END
IDD_SYSTEM_PAGE DIALOGEX 0, 0, 362, 175
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 9, "MS UI Gothic"
BEGIN
CONTROL "", IDC_SYSTEM_TREE, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES |
TVS_LINESATROOT | TVS_EDITLABELS | TVS_SHOWSELALWAYS | WS_CHILD |
WS_VISIBLE | WS_BORDER | WS_TABSTOP, 2, 1, 280, 148
PUSHBUTTON "上へ(&U)", IDC_BTN_SYSTEM_UP, 290, 5, 66, 14
PUSHBUTTON "下へ(&D)", IDC_BTN_SYSTEM_DOWN, 290, 25, 66, 14
PUSHBUTTON "有効化(&E)", IDC_BTN_SYSTEM_ENABLE, 290, 50, 66, 14
PUSHBUTTON "無効化(&I)", IDC_BTN_SYSTEM_DISABLE, 290, 70, 66, 14
PUSHBUTTON "検索(&F)", IDC_BTN_SYSTEM_FIND, 290, 95, 66, 14
PUSHBUTTON "新規(&N)", IDC_BTN_SYSTEM_NEW, 290, 115, 66, 14
PUSHBUTTON "編集(&T)", IDC_BTN_SYSTEM_EDIT, 290, 135, 66, 14
PUSHBUTTON "すべて有効化(&B)", IDC_BTN_SYSTEM_ACTIVATE, 123, 155, 66, 14
PUSHBUTTON "すべて無効化(&L)", IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14
END
IDD_TOOLS_PAGE DIALOGEX 0, 0, 362, 175
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 9, "MS UI Gothic"
BEGIN
CONTROL "List2", IDC_TOOLS_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL |
LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 2, 1, 360, 134
EDITTEXT IDC_TOOLS_CMDLINE, 1, 139, 360, 12, ES_READONLY
PUSHBUTTON "実行(&R)", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
END
IDD_SERVICES_PAGE DIALOGEX 0, 0, 362, 175
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 9, "MS UI Gothic"
BEGIN
CONTROL "List1", IDC_SERVICES_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL |
LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 2, 1, 360, 148
PUSHBUTTON "すべて有効化(&A)", IDC_BTN_SERVICES_ACTIVATE, 223, 155, 66, 14
PUSHBUTTON "すべて無効化(&D)", IDC_BTN_SERVICES_DEACTIVATE, 295, 155, 66, 14
END
IDD_GENERAL_PAGE DIALOGEX 0, 0, 362, 175
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 9, "MS UI Gothic"
BEGIN
GROUPBOX "起動の種類の選択", -1, 10, 10, 340, 150, 0, WS_EX_TRANSPARENT
CONTROL "通常起動(&N) - すべてのデバイスドライバとサービスを読み込む", IDC_CBX_NORMAL_START, "Button", 0x50010009, 20, 30, 260, 10
CONTROL "診断的起動(&D) - 基本的なデバイスとサービスのみを読み込む", IDC_CBX_DIAGNOSTIC_START, "Button", 0x50010009, 20, 45, 260, 10
CONTROL "選択的起動(&E)", IDC_CBX_SELECTIVE_STARTUP, "Button", 0x50010009, 20, 60, 260, 10
AUTOCHECKBOX "ファイル SYSTEM.INI を処理(&R)", IDC_CBX_SYSTEM_INI, 30, 80, 260, 10
AUTOCHECKBOX "システムサービスの読み込み(&L)", IDC_CBX_SYSTEM_SERVICE, 30, 95, 260, 10
AUTOCHECKBOX "スタートアップ項目を読み込む(&O)", IDC_CBX_STARTUP_ITEM, 30, 110, 260, 10
END
IDD_FREELDR_PAGE DIALOGEX 0, 0, 362, 175
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 9, "MS UI Gothic"
BEGIN
LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL
PUSHBUTTON "すべての起動パスを確認する(&C)", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 70, 12
PUSHBUTTON "デフォルトにする(&S)", IDC_BTN_SET_DEFAULT_BOOT, 100, 65, 70, 12
PUSHBUTTON "上へ(&U)", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12
PUSHBUTTON "下へ(&D)", IDC_BTN_MOVE_DOWN_BOOT_OPTION, 280, 65, 70, 12
GROUPBOX "起動オプション", -1, 10, 80, 250, 90, 0, WS_EX_TRANSPARENT
CHECKBOX "/SA&FEBOOT", IDC_CBX_SAFE_BOOT, 15, 90, 55, 10
CHECKBOX "/&NOGUIBOOT", IDC_CBX_NO_GUI_BOOT, 15, 105, 60, 10
CHECKBOX "/&BOOTLOG", IDC_CBX_BOOT_LOG, 15, 120, 50, 10
CHECKBOX "/BAS&EVIDEO", IDC_CBX_BASE_VIDEO, 15, 135, 55, 10
CHECKBOX "/S&OS", IDC_CBX_SOS, 15, 150, 50, 10
PUSHBUTTON "詳細オプション(&V)...", IDC_BTN_ADVANCED_OPTIONS, 100, 150, 70, 12
LTEXT "タイムアウト(&T):", -1, 280, 91, 30, 10
EDITTEXT IDC_TXT_BOOT_TIMEOUT, 310, 90, 25, 12, ES_LEFT
LTEXT "秒", -1, 340, 91, 15, 10
END
IDD_FREELDR_ADVANCED_PAGE DIALOGEX 0, 0, 175, 175
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 9, "MS UI Gothic"
BEGIN
CHECKBOX "/&MAXMEM=", IDC_CBX_MAX_MEM, 10, 10, 50, 10
EDITTEXT IDC_TXT_MAX_MEM, 80, 10, 60, 12
CONTROL "", IDC_SCR_MAX_MEM, "msctls_updown32", 0x50000000, 140, 10, 11, 11
CHECKBOX "/&NUMPROC=", IDC_CBX_NUM_PROC, 10, 25, 50, 10
COMBOBOX IDC_DRP_NUM_PROC, 80, 25, 60, 10, CBS_DROPDOWNLIST | CBS_SORT | WS_CHILD | WS_VISIBLE | WS_TABSTOP
CHECKBOX "/&PCILOCK", IDC_CBX_PCI_LOCK, 10, 40, 50, 10
CHECKBOX "/P&ROFILE", IDC_CBX_PROFILE, 10, 55, 50, 10
CHECKBOX "/&IRQ", IDC_CBX_IRQ, 10, 70, 40, 12
EDITTEXT IDC_TXT_IRQ, 80, 70, 60, 12, ES_LEFT
CHECKBOX "/&DEBUG", IDC_CBX_DEBUG, 10, 85, 40, 10
CHECKBOX "/D&EBUGPORT", IDC_CBX_DEBUG_PORT, 20, 100, 60, 10
COMBOBOX IDC_DRP_DEBUG_PORT, 80, 100, 60, 10, CBS_DROPDOWNLIST | CBS_SORT | WS_CHILD | WS_VISIBLE | WS_TABSTOP
CHECKBOX "/&BAUDRATE", IDC_CBX_BAUD_RATE, 20, 115, 50, 10
COMBOBOX IDC_DRP_DRP_BAUD_RATE, 80, 115, 60, 10, CBS_DROPDOWNLIST | CBS_SORT | WS_CHILD | WS_VISIBLE | WS_TABSTOP
CHECKBOX "/&CHANNEL", IDC_CBX_CHANNEL, 20, 130, 50, 10
EDITTEXT IDC_TXT_CHANNEL, 80, 130, 60, 12, ES_LEFT
CONTROL "", IDC_SCR_CHANNEL, "msctls_updown32", 0x50000000, 140, 130, 11, 11
PUSHBUTTON "OK", IDC_OK, 20, 160, 50, 12
PUSHBUTTON "キャンセル", IDC_CANCEL, 100, 160, 50, 12
END
STRINGTABLE
BEGIN
IDS_MSCONFIG "システム構成プログラム"
IDS_TAB_GENERAL "一般"
IDS_TAB_SYSTEM "SYSTEM.INI"
IDS_TAB_FREELDR "FREELDR.INI"
IDS_TAB_SERVICES "サービス"
IDS_TAB_STARTUP "スタートアップ"
IDS_TAB_TOOLS "ツール"
END
STRINGTABLE
BEGIN
IDS_SERVICES_COLUMN_SERVICE "サービス"
IDS_SERVICES_COLUMN_REQ "必要"
IDS_SERVICES_COLUMN_VENDOR "ベンダー"
IDS_SERVICES_COLUMN_STATUS "状態"
END
STRINGTABLE
BEGIN
IDS_TOOLS_COLUMN_NAME "名前"
IDS_TOOLS_COLUMN_DESCR "説明"
IDS_TOOLS_CMD_NAME "コンソール"
IDS_TOOLS_CMD_DESCR ""
IDS_TOOLS_CMD_CMD "cmd.exe"
IDS_TOOLS_INFO_NAME "バージョン"
IDS_TOOLS_INFO_DESCR "バージョン情報を表示します。"
IDS_TOOLS_INFO_CMD "winver.exe"
IDS_TOOLS_REGEDIT_NAME "レジストリ エディタ"
IDS_TOOLS_REGEDIT_DESCR "レジストリ エディタを開きます。"
IDS_TOOLS_REGEDIT_CMD "regedit.exe"
IDS_TOOLS_SYSDM_NAME "システムプロパティ"
IDS_TOOLS_SYSDM_DESCR "このコンピューターに関する情報を表示します。"
IDS_TOOLS_SYSDM_CMD "control.exe"
IDS_TOOLS_SYSDM_PARAM "sysdm.cpl"
IDS_STARTUP_COLUMN_ELEMENT "要素"
IDS_STARTUP_COLUMN_CMD "コマンド"
IDS_STARTUP_COLUMN_PATH "パス"
END
STRINGTABLE
BEGIN
IDS_SERVICES_STATUS_RUNNING "実行中"
IDS_SERVICES_STATUS_STOPPED "停止"
IDS_SERVICES_YES "はい"
IDS_SERVICES_UNKNOWN "不明"
END

View File

@@ -54,9 +54,6 @@ IDI_APPICON ICON "res/msconfig.ico"
#ifdef LANGUAGE_IT_IT
#include "lang/it-IT.rc"
#endif
#ifdef LANGUAGE_JA_JP
#include "lang/ja-JP.rc"
#endif
#ifdef LANGUAGE_KO_KR
#include "lang/ko-KR.rc"
#endif

View File

@@ -28,11 +28,11 @@ BEGIN
CONTROL "Exécuter le fichier &WIN.INI", IDC_CBX_WIN_INI, "Button", BS_AUTO3STATE | WS_TABSTOP, 35, 98, 316, 10
CONTROL "C&harger les services système", IDC_CBX_LOAD_SYSTEM_SERVICES, "Button", BS_AUTO3STATE | WS_TABSTOP, 35, 110, 316, 10
CONTROL "&Charger les éléments de démarrage", IDC_CBX_LOAD_STARTUP_ITEMS, "Button", BS_AUTO3STATE | WS_TABSTOP, 35, 122, 316, 10
CONTROL "&Utiliser la configuration de démarrage d'origine", IDC_CBX_USE_ORIGINAL_BOOTCFG, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 35, 134, 316, 10
CONTROL "&Utiliser la configuration de démarrage dorigine", IDC_CBX_USE_ORIGINAL_BOOTCFG, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 35, 134, 316, 10
PUSHBUTTON "Exéc&uter la restauration du système", IDC_BTN_SYSTEM_RESTORE_START, 146, 156, 124, 14
PUSHBUTTON "E&xtraire le fichier...", IDC_BTN_FILE_EXTRACTION, 275, 156, 85, 14
GROUPBOX "Sélection du mode de démarrage ", IDC_STATIC, 5, 5, 356, 145
LTEXT "Charger tous les pilotes de périphérique et tous les services", IDC_STATIC, 25, 30, 322, 10
LTEXT "Charger tous les pilotes de périphériques et tous les services", IDC_STATIC, 25, 30, 322, 10
LTEXT "Charger seulement les pilotes de périphérique et les services de base", IDC_STATIC, 25, 58, 322, 10
END

View File

@@ -1978,7 +1978,6 @@ EnumEventsThread(IN LPVOID lpParameter)
BOOL bResult = TRUE; /* Read succeeded */
HANDLE hProcessHeap = GetProcessHeap();
PSID pLastSid = NULL;
INT nItems;
UINT uStep = 0, uStepAt = 0, uPos = 0;
@@ -1998,12 +1997,11 @@ EnumEventsThread(IN LPVOID lpParameter)
SYSTEMTIME time;
LVITEMW lviEventItem;
EnableEventDetailsButtons(hwndEventDetails, FALSE);
/* Save the current event log filter globally */
EventLogFilter_AddRef(EventLogFilter);
ActiveFilter = EventLogFilter;
/** HACK!! **/
EventLog = EventLogFilter->EventLogs[0];
@@ -2265,8 +2263,6 @@ Quit:
/* All events loaded */
Cleanup:
nItems = ListView_GetItemCount(hwndListView);
EnableEventDetailsButtons(hwndEventDetails, (nItems > 0));
ShowWindow(hwndStatusProgress, SW_HIDE);
SendMessageW(hwndListView, LVM_PROGRESS, 0, FALSE);
@@ -3041,22 +3037,6 @@ InitInstance(HINSTANCE hInstance)
HIMAGELIST hSmall;
LVCOLUMNW lvc = {0};
WCHAR szTemp[256];
INT iColumn;
static const struct
{
WORD width;
WORD uID;
} columnItems[] =
{
{ 90, IDS_COLUMNTYPE },
{ 70, IDS_COLUMNDATE },
{ 70, IDS_COLUMNTIME },
{ 150, IDS_COLUMNSOURCE },
{ 100, IDS_COLUMNCATEGORY },
{ 60, IDS_COLUMNEVENT },
{ 120, IDS_COLUMNUSER },
{ 100, IDS_COLUMNCOMPUTER },
};
/* Create the main window */
rs = Settings.wpPos.rcNormalPosition;
@@ -3200,13 +3180,69 @@ InitInstance(HINSTANCE hInstance)
/* Now set up the listview with its columns */
lvc.mask = LVCF_TEXT | LVCF_WIDTH;
lvc.cx = 90;
LoadStringW(hInstance,
IDS_COLUMNTYPE,
szTemp,
ARRAYSIZE(szTemp));
lvc.pszText = szTemp;
for (iColumn = 0; iColumn < ARRAYSIZE(columnItems); ++iColumn)
{
lvc.cx = columnItems[iColumn].width;
LoadStringW(hInstance, columnItems[iColumn].uID, szTemp, ARRAYSIZE(szTemp));
ListView_InsertColumn(hwndListView, iColumn, &lvc);
}
ListView_InsertColumn(hwndListView, 0, &lvc);
lvc.cx = 70;
LoadStringW(hInstance,
IDS_COLUMNDATE,
szTemp,
ARRAYSIZE(szTemp));
lvc.pszText = szTemp;
ListView_InsertColumn(hwndListView, 1, &lvc);
lvc.cx = 70;
LoadStringW(hInstance,
IDS_COLUMNTIME,
szTemp,
ARRAYSIZE(szTemp));
lvc.pszText = szTemp;
ListView_InsertColumn(hwndListView, 2, &lvc);
lvc.cx = 150;
LoadStringW(hInstance,
IDS_COLUMNSOURCE,
szTemp,
ARRAYSIZE(szTemp));
lvc.pszText = szTemp;
ListView_InsertColumn(hwndListView, 3, &lvc);
lvc.cx = 100;
LoadStringW(hInstance,
IDS_COLUMNCATEGORY,
szTemp,
ARRAYSIZE(szTemp));
lvc.pszText = szTemp;
ListView_InsertColumn(hwndListView, 4, &lvc);
lvc.cx = 60;
LoadStringW(hInstance,
IDS_COLUMNEVENT,
szTemp,
ARRAYSIZE(szTemp));
lvc.pszText = szTemp;
ListView_InsertColumn(hwndListView, 5, &lvc);
lvc.cx = 120;
LoadStringW(hInstance,
IDS_COLUMNUSER,
szTemp,
ARRAYSIZE(szTemp));
lvc.pszText = szTemp;
ListView_InsertColumn(hwndListView, 6, &lvc);
lvc.cx = 100;
LoadStringW(hInstance,
IDS_COLUMNCOMPUTER,
szTemp,
ARRAYSIZE(szTemp));
lvc.pszText = szTemp;
ListView_InsertColumn(hwndListView, 7, &lvc);
/* Initialize the save Dialog */
ZeroMemory(&sfn, sizeof(sfn));

View File

@@ -792,11 +792,6 @@ EventDetailsCtrl(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
pData->EventLogFilter = DetailInfo->EventLogFilter;
pData->iEventItem = DetailInfo->iEventItem;
}
else
{
pData->iEventItem = -1;
}
pData->bDisplayWords = FALSE;
pData->hMonospaceFont = CreateMonospaceFont();
@@ -843,26 +838,31 @@ EventDetailsCtrl(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
case IDC_NEXT:
{
BOOL bPrev = (LOWORD(wParam) == IDC_PREVIOUS);
INT iItem, iSel, nItems = ListView_GetItemCount(hwndListView);
WCHAR szText[200];
if (nItems <= 0) /* No items? */
break;
INT iItem, iSel;
/* Select the previous/next item from our current one */
iItem = ListView_GetNextItem(hwndListView, -1, LVNI_ALL | LVNI_SELECTED);
iItem = ListView_GetNextItem(hwndListView, iItem,
(bPrev ? LVNI_ABOVE : LVNI_BELOW));
if (iItem < 0 || iItem >= nItems)
iItem = ListView_GetNextItem(hwndListView,
pData->iEventItem,
bPrev ? LVNI_ABOVE : LVNI_BELOW);
if (iItem == -1)
{
LoadStringW(hInst,
(bPrev ? IDS_CONTFROMEND : IDS_CONTFROMBEGINNING),
szText, _countof(szText));
if (MessageBoxW(hDlg, szText, szTitle, MB_YESNO | MB_ICONQUESTION) == IDNO)
// TODO: Localization.
if (MessageBoxW(hDlg,
bPrev
? L"You have reached the beginning of the event log. Do you want to continue from the end?"
: L"You have reached the end of the event log. Do you want to continue from the beginning?",
szTitle,
MB_YESNO | MB_ICONQUESTION)
== IDNO)
{
break;
}
/* Determine from where to restart */
iItem = (bPrev ? (nItems - 1) : 0);
if (bPrev)
iItem = ListView_GetItemCount(hwndListView) - 1;
else
iItem = 0;
}
/*
@@ -959,11 +959,3 @@ CreateEventDetailsCtrl(HINSTANCE hInstance,
MAKEINTRESOURCEW(IDD_EVENTDETAILS_CTRL),
hParentWnd, EventDetailsCtrl, lParam);
}
VOID
EnableEventDetailsButtons(HWND hWnd, BOOL bEnable)
{
EnableDlgItem(hWnd, IDC_PREVIOUS, bEnable);
EnableDlgItem(hWnd, IDC_NEXT, bEnable);
EnableDlgItem(hWnd, IDC_COPY, bEnable);
}

View File

@@ -7,7 +7,8 @@
* Copyright 2016-2022 Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
*/
#pragma once
#ifndef _EVTDETCTL_H_
#define _EVTDETCTL_H_
/* Optional structure passed by pointer
* as LPARAM to CreateEventDetailsCtrl() */
@@ -25,4 +26,4 @@ CreateEventDetailsCtrl(HINSTANCE hInstance,
HWND hParentWnd,
LPARAM lParam);
VOID EnableEventDetailsButtons(HWND hWnd, BOOL bEnable);
#endif /* _EVTDETCTL_H_ */

View File

@@ -167,8 +167,6 @@ BEGIN
IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?"
IDS_RESTOREDEFAULTS "Do you want to restore all settings for this log to their default values?"
IDS_EVENTSTRINGIDNOTFOUND "Не е намерено описанието на събитие ( %lu ) в източник ( %s ). Възможно е местият компютър да няма нужните сведения в регистъра или DLL файловет, нужни за показване на съобщения от отдалечен компютър.\n\nThe following information is part of the event:\n\n"
IDS_CONTFROMBEGINNING "You have reached the end of the event log. Do you want to continue from the beginning?"
IDS_CONTFROMEND "You have reached the beginning of the event log. Do you want to continue from the end?"
END
STRINGTABLE

View File

@@ -167,8 +167,6 @@ BEGIN
IDS_CLEAREVENTS_MSG "Chcete tento protokol před odstraněním uložit?"
IDS_RESTOREDEFAULTS "Do you want to restore all settings for this log to their default values?"
IDS_EVENTSTRINGIDNOTFOUND "Popis ID události ( %lu ) zdroj ( %s ) nebyl nalezen. Místní počítač neobsahuje potřebné informace v registru nebo chybí DLL soubory pro zobrazení zpráv ze vzdáleného počítače.\n\nThe following information is part of the event:\n\n"
IDS_CONTFROMBEGINNING "You have reached the end of the event log. Do you want to continue from the beginning?"
IDS_CONTFROMEND "You have reached the beginning of the event log. Do you want to continue from the end?"
END
STRINGTABLE

View File

@@ -168,8 +168,6 @@ BEGIN
IDS_CLEAREVENTS_MSG "Möchten Sie dieses Protokoll vor dem Löschen speichern?"
IDS_RESTOREDEFAULTS "Möchten Sie alle Einstellungen für dieses Protokoll wieder auf die Standardwerte zurücksetzen?"
IDS_EVENTSTRINGIDNOTFOUND "Die Bezeichnung für die Ereignis-ID ( %lu ) in der Quelle ( %s ) kann nicht gefunden werden. Es könnte sein, dass der lokale Computer die notwendigen Registry Einträge oder Nachrichten DLLs, um Nachrichten entfernter Computer anzuzeigen, nicht besitzt.\n\nDas Ereignis enthält folgende Informationen:\n\n"
IDS_CONTFROMBEGINNING "You have reached the end of the event log. Do you want to continue from the beginning?"
IDS_CONTFROMEND "You have reached the beginning of the event log. Do you want to continue from the end?"
END
STRINGTABLE

View File

@@ -167,8 +167,6 @@ BEGIN
IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?"
IDS_RESTOREDEFAULTS "Do you want to restore all settings for this log to their default values?"
IDS_EVENTSTRINGIDNOTFOUND "The description for Event ID ( %lu ) in Source ( %s ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer.\n\nThe following information is part of the event:\n\n"
IDS_CONTFROMBEGINNING "You have reached the end of the event log. Do you want to continue from the beginning?"
IDS_CONTFROMEND "You have reached the beginning of the event log. Do you want to continue from the end?"
END
STRINGTABLE

View File

@@ -169,8 +169,6 @@ BEGIN
IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?"
IDS_RESTOREDEFAULTS "Do you want to restore all settings for this log to their default values?"
IDS_EVENTSTRINGIDNOTFOUND "The description for Event ID ( %lu ) in Source ( %s ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer.\n\nThe following information is part of the event:\n\n"
IDS_CONTFROMBEGINNING "You have reached the end of the event log. Do you want to continue from the beginning?"
IDS_CONTFROMEND "You have reached the beginning of the event log. Do you want to continue from the end?"
END
STRINGTABLE

View File

@@ -170,8 +170,6 @@ BEGIN
IDS_CLEAREVENTS_MSG "¿Desea guardar este registro de eventos antes de borrarlo?"
IDS_RESTOREDEFAULTS "Do you want to restore all settings for this log to their default values?"
IDS_EVENTSTRINGIDNOTFOUND "No se pudo recuperar la descripción para el evento con ID ( %lu ) y origen ( %s ). El equipo local puede no tener la información necesaria en el registro o las DLLs necesarias para mostrar los mensajes de un equipo remoto.\n\nLa siguiente información es parte del evento:\n\n"
IDS_CONTFROMBEGINNING "You have reached the end of the event log. Do you want to continue from the beginning?"
IDS_CONTFROMEND "You have reached the beginning of the event log. Do you want to continue from the end?"
END
STRINGTABLE

View File

@@ -50,12 +50,12 @@ IDM_EVENTWR_CTX MENU
BEGIN
POPUP ""
BEGIN
MENUITEM "&Ouvrir le journal d'événements...", IDM_OPEN_EVENTLOG
MENUITEM "Enregistrer le journal d'événements &sous...", IDM_SAVE_EVENTLOG
MENUITEM "&Open Event Log...", IDM_OPEN_EVENTLOG
MENUITEM "&Save Event Log as...", IDM_SAVE_EVENTLOG
MENUITEM SEPARATOR
MENUITEM "&Effacer tous les événements", IDM_CLEAR_EVENTS
MENUITEM "&Renommer\tF2", IDM_RENAME_EVENTLOG
MENUITEM "&Paramètres du journal...", IDM_EVENTLOG_SETTINGS
MENUITEM "&Clear all Events", IDM_CLEAR_EVENTS
MENUITEM "&Rename\tF2", IDM_RENAME_EVENTLOG
MENUITEM "Log Se&ttings...", IDM_EVENTLOG_SETTINGS
END
END
@@ -168,8 +168,6 @@ BEGIN
IDS_CLEAREVENTS_MSG "Voulez-vous enregistrer ce journal d'événements avant de l'effacer ?"
IDS_RESTOREDEFAULTS "Voulez-vous vraiment réinitialiser tous les paramètres pour ce journal aux valeurs par défaut ?"
IDS_EVENTSTRINGIDNOTFOUND "La description pour l'événement d'ID ( %lu ) dans la source ( %s ) ne peut être trouvée. L'ordinateur local pourrait ne pas avoir les informations registres nécessaires ou les fichiers DLL de message pour afficher les messages depuis un ordinateur distant.\n\nLes informations suivantes font partie de l'événement :\n\n"
IDS_CONTFROMBEGINNING "You have reached the end of the event log. Do you want to continue from the beginning?"
IDS_CONTFROMEND "You have reached the beginning of the event log. Do you want to continue from the end?"
END
STRINGTABLE

View File

@@ -167,8 +167,6 @@ BEGIN
IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?"
IDS_RESTOREDEFAULTS "Do you want to restore all settings for this log to their default values?"
IDS_EVENTSTRINGIDNOTFOUND "The description for Event ID ( %lu ) in Source ( %s ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer.\n\nThe following information is part of the event:\n\n"
IDS_CONTFROMBEGINNING "You have reached the end of the event log. Do you want to continue from the beginning?"
IDS_CONTFROMEND "You have reached the beginning of the event log. Do you want to continue from the end?"
END
STRINGTABLE

View File

@@ -168,8 +168,6 @@ BEGIN
IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?"
IDS_RESTOREDEFAULTS "Do you want to restore all settings for this log to their default values?"
IDS_EVENTSTRINGIDNOTFOUND "La descrizione per l'ID evento ( %lu ) proveniente da ( %s ) non può essere trovata. Il computer locale potrebbe non avere le informazioni sul registry necessarie o i file DLL con i messaggi necessari per la visualizzazione da un computer remoto.\n\nThe following information is part of the event:\n\n"
IDS_CONTFROMBEGINNING "You have reached the end of the event log. Do you want to continue from the beginning?"
IDS_CONTFROMEND "You have reached the beginning of the event log. Do you want to continue from the end?"
END
STRINGTABLE

View File

@@ -168,8 +168,6 @@ BEGIN
IDS_CLEAREVENTS_MSG "このイベントをクリアする前に保存したいですか?"
IDS_RESTOREDEFAULTS "すべての設定をデフォルトに戻しますか?"
IDS_EVENTSTRINGIDNOTFOUND "イベント ID (%lu) (ソース %s 内) に関する説明が見つかりませんでした。 リモート コンピュータからメッセージを表示するために必要なレジストリ情報またはメッセージ DLL ファイルがローカル コンピュータにない可能性があります。\n\n次の情報はイベントの一部です:\n\n"
IDS_CONTFROMBEGINNING "イベント ログの最後に到達しました。最初から続けますか?"
IDS_CONTFROMEND "イベント ログの先頭に到達しました。最後から続けますか?"
END
STRINGTABLE

View File

@@ -167,8 +167,6 @@ BEGIN
IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?"
IDS_RESTOREDEFAULTS "Do you want to restore all settings for this log to their default values?"
IDS_EVENTSTRINGIDNOTFOUND "( %s ) 의 이벤트ID ( %lu ) 에 대한 설명을 찾을 수 없습니다. 로컬 컴퓨터가 원격 컴퓨터의 메세지를 표시하는데 필요한 레지스트리나 DLL 파일을 가지지 않고 있을수 있습니다.\n\nThe following information is part of the event:\n\n"
IDS_CONTFROMBEGINNING "You have reached the end of the event log. Do you want to continue from the beginning?"
IDS_CONTFROMEND "You have reached the beginning of the event log. Do you want to continue from the end?"
END
STRINGTABLE

View File

@@ -167,8 +167,6 @@ BEGIN
IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?"
IDS_RESTOREDEFAULTS "Do you want to restore all settings for this log to their default values?"
IDS_EVENTSTRINGIDNOTFOUND "Beskrivelsen for Hendelse ID ( %lu ) i kilden ( %s ) kan ikke bli finnet. Lokale datamaskinen har ikke nødvendige register informasjon eller melding DLL filer for å vise melding fra en fjern datamaskin.\n\nThe following information is part of the event:\n\n"
IDS_CONTFROMBEGINNING "You have reached the end of the event log. Do you want to continue from the beginning?"
IDS_CONTFROMEND "You have reached the beginning of the event log. Do you want to continue from the end?"
END
STRINGTABLE

View File

@@ -170,8 +170,6 @@ BEGIN
IDS_CLEAREVENTS_MSG "Czy chcesz zapisać dziennik zdarzeń przed czyszczeniem?"
IDS_RESTOREDEFAULTS "Czy chcesz przywrócić wszystkie ustawienia tego dziennika do wartości domyślnych?"
IDS_EVENTSTRINGIDNOTFOUND "Opis zdarzenia dla danego numeru ID ( %lu ) nie został odnaleziony w źródle ( %s ). Ten komputer może nie miec wystarczających informacji w rejestrze, albo bibliotek DLL, aby wyświetlić wiadomości z komputera zdalnego.\n\nThe following information is part of the event:\n\n"
IDS_CONTFROMBEGINNING "You have reached the end of the event log. Do you want to continue from the beginning?"
IDS_CONTFROMEND "You have reached the beginning of the event log. Do you want to continue from the end?"
END
STRINGTABLE

View File

@@ -167,8 +167,6 @@ BEGIN
IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?"
IDS_RESTOREDEFAULTS "Do you want to restore all settings for this log to their default values?"
IDS_EVENTSTRINGIDNOTFOUND "A descrição para Event ID ( %lu ) em Fonte ( %s ) não foi encontrado. O computador local talvez não possua a informação de registro necessária ou mensagem de arquivos DLL para exibir mensagens de um computador remoto.\n\nThe following information is part of the event:\n\n"
IDS_CONTFROMBEGINNING "You have reached the end of the event log. Do you want to continue from the beginning?"
IDS_CONTFROMEND "You have reached the beginning of the event log. Do you want to continue from the end?"
END
STRINGTABLE

View File

@@ -167,8 +167,6 @@ BEGIN
IDS_CLEAREVENTS_MSG "Deseja guardar este registo de eventos antes de limpar?"
IDS_RESTOREDEFAULTS "Tem a certeza de que pretende repor todas definições deste registo para os valores predefinidos?"
IDS_EVENTSTRINGIDNOTFOUND "A descrição do ID de Evento ( %lu ) na Origem ( %s ) não foi encontrado. O computador local talvez não possua a informação de registo necessária ou os ficheiros DLL necessárias para apresentar mensagens de um computador remoto.\n\nA informação seguinte é parte do evento:\n\n"
IDS_CONTFROMBEGINNING "You have reached the end of the event log. Do you want to continue from the beginning?"
IDS_CONTFROMEND "You have reached the beginning of the event log. Do you want to continue from the end?"
END
STRINGTABLE

View File

@@ -169,8 +169,6 @@ BEGIN
IDS_CLEAREVENTS_MSG "Doriți să salvați acest jurnal de evenimente înainte de a-l închide?"
IDS_RESTOREDEFAULTS "Doriți să restabiliți toate setările pentru acest jurnal la valorile lor implicite?"
IDS_EVENTSTRINGIDNOTFOUND "Imposibil de găsit descrierea evenimentului cu ID-ul ( %lu ) în sursa ( %s ). Este posibil ca computerul local să nu aibă informațiile de registru necesare sau fișierele DLL de mesaje pentru a afișa mesaje de la un computer la distanță.\n\nUrmătoarele informații fac parte din eveniment:\n\n"
IDS_CONTFROMBEGINNING "You have reached the end of the event log. Do you want to continue from the beginning?"
IDS_CONTFROMEND "You have reached the beginning of the event log. Do you want to continue from the end?"
END
STRINGTABLE

View File

@@ -171,8 +171,6 @@ BEGIN
IDS_CLEAREVENTS_MSG "Вы хотите сохранить журнал событий перед очисткой?"
IDS_RESTOREDEFAULTS "Do you want to restore all settings for this log to their default values?"
IDS_EVENTSTRINGIDNOTFOUND "Не найдено описание для события с кодом ( %lu ) в источнике ( %s ). Возможно, на локальном компьютере нет нужных данных в реестре или файлов DLL сообщений для отображения сообщений удаленного компьютера.\n\nСледующая информация часть события:\n\n"
IDS_CONTFROMBEGINNING "You have reached the end of the event log. Do you want to continue from the beginning?"
IDS_CONTFROMEND "You have reached the beginning of the event log. Do you want to continue from the end?"
END
STRINGTABLE

View File

@@ -167,8 +167,6 @@ BEGIN
IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?"
IDS_RESTOREDEFAULTS "Do you want to restore all settings for this log to their default values?"
IDS_EVENTSTRINGIDNOTFOUND "Popis pre udalosť ID ( %lu ) zo zdroja ( %s ) nebol nájdený. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer.\n\nThe following information is part of the event:\n\n"
IDS_CONTFROMBEGINNING "You have reached the end of the event log. Do you want to continue from the beginning?"
IDS_CONTFROMEND "You have reached the beginning of the event log. Do you want to continue from the end?"
END
STRINGTABLE

View File

@@ -167,8 +167,6 @@ BEGIN
IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?"
IDS_RESTOREDEFAULTS "Do you want to restore all settings for this log to their default values?"
IDS_EVENTSTRINGIDNOTFOUND "Përshkrimi për ngjarjet ID ( %lu ) në burim ( %s ) nuk gjindet. Kompjuter vendas mund të mos ketë informacionin e regjistrit te nevojshem ose mesazhin për dokumentat DLL për të shfaqur nga një kompjuter në distancë.\n\nThe following information is part of the event:\n\n"
IDS_CONTFROMBEGINNING "You have reached the end of the event log. Do you want to continue from the beginning?"
IDS_CONTFROMEND "You have reached the beginning of the event log. Do you want to continue from the end?"
END
STRINGTABLE

View File

@@ -167,8 +167,6 @@ BEGIN
IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?"
IDS_RESTOREDEFAULTS "Do you want to restore all settings for this log to their default values?"
IDS_EVENTSTRINGIDNOTFOUND "Beskrivning av Händelse ID ( %lu ) i källan ( %s ) kan inte hittas. Lokal dator har inte nödvendig registerinformation eller meddelander DLL filer for å vise meddelander från en fjärr dator.\n\nThe following information is part of the event:\n\n"
IDS_CONTFROMBEGINNING "You have reached the end of the event log. Do you want to continue from the beginning?"
IDS_CONTFROMEND "You have reached the beginning of the event log. Do you want to continue from the end?"
END
STRINGTABLE

View File

@@ -168,8 +168,6 @@ BEGIN
IDS_CLEAREVENTS_MSG "Silmeden önce bu olay kaydını kaydetmek ister misiniz?"
IDS_RESTOREDEFAULTS "Bu günlük için tüm ayarları varsayılan değerlerine geri yüklemek istiyor musunuz?"
IDS_EVENTSTRINGIDNOTFOUND "( %s ) kaynağındaki ( %lu ) olay kimliği için açıklama bulunamıyor. Yerel bilgisayarda, uzak bilgisayardan iletileri görüntülemesi için gerekli Kayıt Defteri bilgisi veya ileti DLL dosyaları olmayabilir.\n\nAşağıdaki bilgi olayın parçasıdır:\n\n"
IDS_CONTFROMBEGINNING "You have reached the end of the event log. Do you want to continue from the beginning?"
IDS_CONTFROMEND "You have reached the beginning of the event log. Do you want to continue from the end?"
END
STRINGTABLE

View File

@@ -169,8 +169,6 @@ BEGIN
IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?"
IDS_RESTOREDEFAULTS "Do you want to restore all settings for this log to their default values?"
IDS_EVENTSTRINGIDNOTFOUND "Опис для Ідентифікатора події ( %lu ) за джерелом ( %s ) не знайдено. Локальний комп'ютер може не мати необхідної інформації в реєстрі чи DLL файлів повідомлень для відображення повідомлень, що надходять від віддаленого комп'ютера.\n\nThe following information is part of the event:\n\n"
IDS_CONTFROMBEGINNING "You have reached the end of the event log. Do you want to continue from the beginning?"
IDS_CONTFROMEND "You have reached the beginning of the event log. Do you want to continue from the end?"
END
STRINGTABLE

View File

@@ -169,8 +169,6 @@ BEGIN
IDS_CLEAREVENTS_MSG "你想要在清除之前保存此事件日志吗?"
IDS_RESTOREDEFAULTS "你想要将这个日志的所有设置恢复为默认值吗?"
IDS_EVENTSTRINGIDNOTFOUND "无法找到来源(%s中的事件 ID%lu的描述。本地计算机可能没有显示来自远程计算机的消息所必需的注册表信息或消息 DLL 文件。\n\n下面的信息是事件的一部分\n\n"
IDS_CONTFROMBEGINNING "You have reached the end of the event log. Do you want to continue from the beginning?"
IDS_CONTFROMEND "You have reached the beginning of the event log. Do you want to continue from the end?"
END
STRINGTABLE

View File

@@ -168,8 +168,6 @@ BEGIN
IDS_CLEAREVENTS_MSG "您想在清除之前儲存這個事件記錄嗎?"
IDS_RESTOREDEFAULTS "您要將這個記錄的所有設定還原至預設值嗎?"
IDS_EVENTSTRINGIDNOTFOUND "找不到來源(%s中的事件 ID%lu的描述。本地電腦可能沒有顯示來自遠端電腦訊息所需的註冊表資訊或訊息 DLL 檔。\n\n下列資訊是部分事件\n\n"
IDS_CONTFROMBEGINNING "You have reached the end of the event log. Do you want to continue from the beginning?"
IDS_CONTFROMEND "You have reached the beginning of the event log. Do you want to continue from the end?"
END
STRINGTABLE

View File

@@ -168,8 +168,6 @@ BEGIN
IDS_CLEAREVENTS_MSG "您要在清除之前儲存此事件記錄嗎?"
IDS_RESTOREDEFAULTS "您要這個記錄的所有設定還原至預設值嗎?"
IDS_EVENTSTRINGIDNOTFOUND "找不到來源(%s中的事件 ID%lu的描述。本地電腦可能沒有顯示來自遠端電腦消息所必需的註冊表資訊或消息 DLL 檔。\n\n下列資訊是部分事件\n\n"
IDS_CONTFROMBEGINNING "You have reached the end of the event log. Do you want to continue from the beginning?"
IDS_CONTFROMEND "You have reached the beginning of the event log. Do you want to continue from the end?"
END
STRINGTABLE

View File

@@ -105,8 +105,6 @@
#define IDS_CLEAREVENTS_MSG 110
#define IDS_EVENTSTRINGIDNOTFOUND 111
#define IDS_RESTOREDEFAULTS 112
#define IDS_CONTFROMBEGINNING 113
#define IDS_CONTFROMEND 114
#define IDS_USAGE 120
#define IDS_EVENTLOGFILE 121

View File

@@ -96,52 +96,52 @@ BEGIN
END
IDD_LOGON DIALOGEX 6, 6, 253, 232
CAPTION "ログオン"
FONT 9, "MS UI Gothic", 0, 0
CAPTION "Log On"
FONT 8, "MS Shell Dlg", 0, 0
STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP
BEGIN
LTEXT "ログオン ユーザー:", IDC_STATIC, 7, 7, 238, 8
AUTORADIOBUTTON "ローカル システム アカウント(&L)", IDC_LOGON_SYSTEMACCOUNT, 7, 22, 238, 10, BS_TOP | BS_MULTILINE | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP
AUTORADIOBUTTON "このアカウント(&T):", IDC_LOGON_THISACCOUNT, 7, 52, 60, 10, BS_TOP | BS_MULTILINE | WS_CHILD | WS_VISIBLE
AUTOCHECKBOX "サービスがデスクトップと対話できるようにする(&W)", IDC_LOGON_INTERACTIVE, 18, 34, 227, 10, WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP | BS_TOP | BS_MULTILINE
LTEXT "Log on as:", IDC_STATIC, 7, 7, 238, 8
AUTORADIOBUTTON "&Local System account", IDC_LOGON_SYSTEMACCOUNT, 7, 22, 238, 10, BS_TOP | BS_MULTILINE | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP
AUTORADIOBUTTON "&This account:", IDC_LOGON_THISACCOUNT, 7, 52, 60, 10, BS_TOP | BS_MULTILINE | WS_CHILD | WS_VISIBLE
AUTOCHECKBOX "Allo&w service to interact with desktop", IDC_LOGON_INTERACTIVE, 18, 34, 227, 10, WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP | BS_TOP | BS_MULTILINE
EDITTEXT IDC_LOGON_ACCOUNTNAME, 72, 50, 103, 14, ES_LEFT | ES_AUTOHSCROLL | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_GROUP | WS_TABSTOP
PUSHBUTTON "参照(&B)...", IDC_LOGON_SEARCH, 185, 50, 60, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
LTEXT "パスワード(&P):", IDC_LOGON_PW1TEXT, 18, 71, 33, 8, WS_CHILD | WS_VISIBLE | WS_DISABLED | WS_GROUP
PUSHBUTTON "&Browse...", IDC_LOGON_SEARCH, 185, 50, 60, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
LTEXT "&Password:", IDC_LOGON_PW1TEXT, 18, 71, 33, 8, WS_CHILD | WS_VISIBLE | WS_DISABLED | WS_GROUP
EDITTEXT IDC_LOGON_PASSWORD1, 72, 68, 104, 14, ES_LEFT | ES_PASSWORD | ES_AUTOHSCROLL | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP
LTEXT "パスワードの確認(&C):", IDC_LOGON_PW2TEXT, 18, 84, 47, 18, WS_CHILD | WS_VISIBLE | WS_DISABLED | WS_GROUP
LTEXT "&Confirm password:", IDC_LOGON_PW2TEXT, 18, 84, 47, 18, WS_CHILD | WS_VISIBLE | WS_DISABLED | WS_GROUP
EDITTEXT IDC_LOGON_PASSWORD2, 72, 86, 104, 14, ES_LEFT | ES_PASSWORD | ES_AUTOHSCROLL | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP
LTEXT "以下のハードウェア プロファイルに対してこのサービスを有効または無効にすることができます:", IDC_STATIC, 7, 114, 210, 8, WS_CHILD | WS_VISIBLE | WS_GROUP
LTEXT "You can enable or disable this service for the hardware profiles listed below:", IDC_STATIC, 7, 114, 210, 8, WS_CHILD | WS_VISIBLE | WS_GROUP
CONTROL "", IDC_LOGON_HWPROFILE, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_GROUP | WS_TABSTOP, 7, 124, 238, 65
PUSHBUTTON "有効にする(&E)", IDC_LOGON_HWENABLE, 116, 197, 60, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_DISABLED
PUSHBUTTON "無効にする(&D)", IDC_LOGON_HWDISABLE, 185, 197, 60, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_DISABLED
PUSHBUTTON "&Enable", IDC_LOGON_HWENABLE, 116, 197, 60, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_DISABLED
PUSHBUTTON "&Disable", IDC_LOGON_HWDISABLE, 185, 197, 60, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_DISABLED
END
IDD_RECOVERY DIALOGEX 6, 6, 253, 232
CAPTION "回復"
FONT 9, "MS UI Gothic", 0, 0
CAPTION "Recovery"
FONT 8, "MS Shell Dlg", 0, 0
STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP
BEGIN
LTEXT "このサービスが失敗した場合のコンピュータの応答を選択します。", IDC_STATIC, 7, 7, 238, 8
LTEXT "最初の失敗(&F):", IDC_STATIC, 7, 24, 92, 8
LTEXT "Select the computer's response if this service fails.", IDC_STATIC, 7, 7, 238, 8
LTEXT "&First failure:", IDC_STATIC, 7, 24, 92, 8
COMBOBOX IDC_FIRST_FAILURE, 104, 22, 141, 147, WS_CHILD | WS_VISIBLE | WS_TABSTOP | CBS_DROPDOWNLIST
LTEXT "二番目の失敗(&S):", IDC_STATIC, 7, 41, 92, 8
LTEXT "&Second failure:", IDC_STATIC, 7, 41, 92, 8
COMBOBOX IDC_SECOND_FAILURE, 104, 39, 141, 147, WS_CHILD | WS_VISIBLE | WS_TABSTOP | CBS_DROPDOWNLIST
LTEXT "その後の失敗:", IDC_STATIC, 7, 58, 92, 8
LTEXT "Subsequent failures:", IDC_STATIC, 7, 58, 92, 8
COMBOBOX IDC_SUBSEQUENT_FAILURES, 104, 56, 141, 147, WS_CHILD | WS_VISIBLE | WS_TABSTOP | CBS_DROPDOWNLIST
LTEXT "失敗カウンタのリセット(&O):", IDC_STATIC, 7, 75, 72, 8
LTEXT "Reset fail c&ounter after:", IDC_STATIC, 7, 75, 72, 8
EDITTEXT IDC_RESET_TIME, 104, 73, 40, 13, WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP | ES_LEFT | ES_AUTOHSCROLL | ES_NUMBER
LTEXT "日後", IDC_STATIC, 150, 75, 95, 8
LTEXT "サービスの再開(&V):", IDC_RESTART_TEXT1, 7, 92, 92, 8
LTEXT "days", IDC_STATIC, 150, 75, 95, 8
LTEXT "Restart ser&vice after:", IDC_RESTART_TEXT1, 7, 92, 92, 8
EDITTEXT IDC_RESTART_TIME, 104, 90, 40, 13, WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP | ES_LEFT | ES_AUTOHSCROLL | ES_NUMBER
LTEXT "分後", IDC_RESTART_TEXT2, 150, 92, 95, 8
GROUPBOX "プログラムを実行する", IDC_RUN_GROUPBOX, 7, 108, 238, 80
LTEXT "プログラム(&P):", IDC_RUN_TEXT1, 14, 121, 168, 8
LTEXT "minutes", IDC_RESTART_TEXT2, 150, 92, 95, 8
GROUPBOX "Run program", IDC_RUN_GROUPBOX, 7, 108, 238, 80
LTEXT "&Program:", IDC_RUN_TEXT1, 14, 121, 168, 8
EDITTEXT IDC_PROGRAM, 14, 131, 165, 14
PUSHBUTTON "参照(&B)...", IDC_BROWSE_PROGRAM, 180, 131, 58, 14
LTEXT "コマンドライン引数(&C):", IDC_RUN_TEXT2, 14, 155, 108, 8
PUSHBUTTON "&Browse...", IDC_BROWSE_PROGRAM, 180, 131, 58, 14
LTEXT "&Command line parameters:", IDC_RUN_TEXT2, 14, 155, 108, 8
EDITTEXT IDC_PARAMETERS, 128, 152, 110, 14
AUTOCHECKBOX "失敗回数をコマンドラインの末尾に追加する(&E) (/fail=%1%)", IDC_ADD_FAILCOUNT, 14, 171, 219, 10, WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_TOP | BS_MULTILINE
PUSHBUTTON "コンピュータの再起動オプション(&R)...", IDC_RESTART_OPTIONS, 116, 197, 129, 14
AUTOCHECKBOX "Append fail count to &end of command line (/fail=%1%)", IDC_ADD_FAILCOUNT, 14, 171, 219, 10, WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_TOP | BS_MULTILINE
PUSHBUTTON "&Restart Computer Options...", IDC_RESTART_OPTIONS, 116, 197, 129, 14
END
IDD_DLG_DEPEND DIALOGEX 6, 6, 253, 225
@@ -324,14 +324,14 @@ END
STRINGTABLE
BEGIN
IDS_NO_ACTION "何もしない"
IDS_RESTART_SERVICE "サービスを再起動する"
IDS_RUN_PROGRAM "プログラムを実行する"
IDS_RESTART_COMPUTER "コンピュータを再起動"
IDS_NO_ACTION "Take no action"
IDS_RESTART_SERVICE "Restart the Service"
IDS_RUN_PROGRAM "Run a Program"
IDS_RESTART_COMPUTER "Restart the Computer"
END
STRINGTABLE
BEGIN
IDS_NOT_SAME_PASSWORD "パスワードが同じではありません!"
IDS_INVALID_PASSWORD "有効なパスワードを入力してください。"
IDS_NOT_SAME_PASSWORD "The Passwords are not the same!"
IDS_INVALID_PASSWORD "Enter a valid Password!"
END

View File

@@ -16,11 +16,16 @@ CCanvasWindow::CCanvasWindow()
, m_hitCanvasSizeBox(HIT_NONE)
, m_ptOrig { -1, -1 }
{
m_ahbmCached[0] = m_ahbmCached[1] = NULL;
m_rcResizing.SetRectEmpty();
}
CCanvasWindow::~CCanvasWindow()
{
if (m_ahbmCached[0])
::DeleteObject(m_ahbmCached[0]);
if (m_ahbmCached[1])
::DeleteObject(m_ahbmCached[1]);
}
RECT CCanvasWindow::GetBaseRect()
@@ -114,30 +119,16 @@ VOID CCanvasWindow::zoomTo(INT newZoom, LONG left, LONG top)
Invalidate(TRUE);
}
BOOL CCanvasWindow::DoDraw(HDC hDC, RECT& rcClient, RECT& rcPaint)
VOID CCanvasWindow::DoDraw(HDC hDC, RECT& rcClient, RECT& rcPaint)
{
// This is the target area we have to draw on
CRect rcCanvasDraw;
rcCanvasDraw.IntersectRect(&rcClient, &rcPaint);
// Calculate image size
CRect rcImage;
GetImageRect(rcImage);
SIZE sizeImage = { imageModel.GetWidth(), imageModel.GetHeight() };
// We use a memory bitmap to reduce flickering
HBITMAP hbmCache1 = CreateDIBWithProperties(rcClient.right, rcClient.bottom);
if (!hbmCache1)
return FALSE; // Out of memory
HBITMAP hbmCache2 = CreateDIBWithProperties(sizeImage.cx, sizeImage.cy);
if (!hbmCache2)
{
::DeleteObject(hbmCache1);
return FALSE; // Out of memory
}
HDC hdcMem0 = ::CreateCompatibleDC(hDC);
HGDIOBJ hbm0Old = ::SelectObject(hdcMem0, hbmCache1);
m_ahbmCached[0] = CachedBufferDIB(m_ahbmCached[0], rcClient.right, rcClient.bottom);
HGDIOBJ hbm0Old = ::SelectObject(hdcMem0, m_ahbmCached[0]);
// Fill the background on hdcMem0
::FillRect(hdcMem0, &rcCanvasDraw, (HBRUSH)(COLOR_APPWORKSPACE + 1));
@@ -147,6 +138,11 @@ BOOL CCanvasWindow::DoDraw(HDC hDC, RECT& rcClient, RECT& rcPaint)
if (!selectionModel.m_bShow && !::IsWindowVisible(textEditWindow))
drawSizeBoxes(hdcMem0, &rcBase, FALSE, &rcCanvasDraw);
// Calculate image size
CRect rcImage;
GetImageRect(rcImage);
SIZE sizeImage = { imageModel.GetWidth(), imageModel.GetHeight() };
// Calculate the target area on the image
CRect rcImageDraw = rcCanvasDraw;
CanvasToImage(rcImageDraw);
@@ -158,7 +154,8 @@ BOOL CCanvasWindow::DoDraw(HDC hDC, RECT& rcClient, RECT& rcPaint)
// hdcMem1 <-- imageModel
HDC hdcMem1 = ::CreateCompatibleDC(hDC);
HGDIOBJ hbm1Old = ::SelectObject(hdcMem1, hbmCache2);
m_ahbmCached[1] = CachedBufferDIB(m_ahbmCached[1], sizeImage.cx, sizeImage.cy);
HGDIOBJ hbm1Old = ::SelectObject(hdcMem1, m_ahbmCached[1]);
::BitBlt(hdcMem1, rcImageDraw.left, rcImageDraw.top, rcImageDraw.Width(), rcImageDraw.Height(),
imageModel.GetDC(), rcImageDraw.left, rcImageDraw.top, SRCCOPY);
@@ -211,10 +208,6 @@ BOOL CCanvasWindow::DoDraw(HDC hDC, RECT& rcClient, RECT& rcPaint)
// Clean up hdcMem0
::SelectObject(hdcMem0, hbm0Old);
::DeleteDC(hdcMem0);
::DeleteObject(hbmCache2);
::DeleteObject(hbmCache1);
return TRUE;
}
VOID CCanvasWindow::updateScrollRange()
@@ -698,22 +691,9 @@ LRESULT CCanvasWindow::OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bH
RECT rcClient;
GetClientRect(&rcClient);
static BOOL s_bShowedOutOfMemory = FALSE; // Don't show "Out Of Memory" message multiple time
PAINTSTRUCT ps;
HDC hDC = BeginPaint(&ps);
if (DoDraw(hDC, rcClient, ps.rcPaint))
{
s_bShowedOutOfMemory = FALSE;
}
else if (!s_bShowedOutOfMemory)
{
ShowOutOfMemory();
s_bShowedOutOfMemory = TRUE;
imageModel.ClearHistory(); // Reduce memory usage
}
DoDraw(hDC, rcClient, ps.rcPaint);
EndPaint(&ps);
return 0;
}

View File

@@ -57,11 +57,12 @@ public:
protected:
HITTEST m_hitCanvasSizeBox;
POINT m_ptOrig; // The origin of drag start
HBITMAP m_ahbmCached[2]; // The cached buffer bitmaps
CRect m_rcResizing; // Resizing rectagle
HITTEST CanvasHitTest(POINT pt);
RECT GetBaseRect();
BOOL DoDraw(HDC hDC, RECT& rcClient, RECT& rcPaint);
VOID DoDraw(HDC hDC, RECT& rcClient, RECT& rcPaint);
VOID OnHVScroll(WPARAM wParam, INT fnBar);
LRESULT OnSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);

View File

@@ -230,7 +230,6 @@ HBITMAP InitializeImage(LPCWSTR name, LPWIN32_FIND_DATAW pFound, BOOL isFile)
if (hBitmap == NULL)
{
ShowOutOfMemory();
imageModel.ClearHistory();
return NULL;
}

View File

@@ -130,7 +130,6 @@ void ImageModel::PushImageForUndo()
if (hbm == NULL)
{
ShowOutOfMemory();
ClearHistory();
return;
}
@@ -144,7 +143,6 @@ void ImageModel::PushImageForUndo(HBITMAP hbm)
if (hbm == NULL)
{
ShowOutOfMemory();
ClearHistory();
return;
}
@@ -203,7 +201,6 @@ void ImageModel::Crop(int nWidth, int nHeight, int nOffsetX, int nOffsetY)
if (!hbmNew)
{
ShowOutOfMemory();
ClearHistory();
return;
}

View File

@@ -44,7 +44,7 @@ BEGIN
MENUITEM "&Copier\tCtrl+C", IDM_EDITCOPY
MENUITEM "C&oller\tCtrl+V", IDM_EDITPASTE
MENUITEM SEPARATOR
MENUITEM "Ro&gner la sélection", IDM_CROPSELECTION
MENUITEM "Crop &selection", IDM_CROPSELECTION
MENUITEM "&Effacer la sélection\tDel", IDM_EDITDELETESELECTION
MENUITEM "&Inverser la sélection", IDM_EDITINVERTSELECTION
MENUITEM "&Sélectionner tout\tCtrl+A", IDM_EDITSELECTALL
@@ -110,7 +110,7 @@ BEGIN
MENUITEM "&Copier\tCtrl+C", IDM_EDITCOPY
MENUITEM "C&oller\tCtrl+V", IDM_EDITPASTE
MENUITEM SEPARATOR
MENUITEM "Ro&gner la sélection", IDM_CROPSELECTION
MENUITEM "Crop &selection", IDM_CROPSELECTION
MENUITEM "&Effacer la sélection\tDel", IDM_EDITDELETESELECTION
MENUITEM "&Sélectionner tout\tCtrl+A", IDM_EDITSELECTALL
MENUITEM SEPARATOR
@@ -269,8 +269,8 @@ BEGIN
IDS_UNDERLINE "Underline"
IDS_VERTICAL "Vertical"
IDS_PRINTRES "%d x %d pixel/cm"
IDS_CANTPASTE "Échec lors de la copie depuis le presse-papiers. Les données sont soit incorrectes soit non supportées."
IDS_SAVEERROR "Échec lors de la sauvegarde dans le fichier :\n\n%s"
IDS_CANTSENDMAIL "Échec lors de l'envoi d'un mail."
IDS_LOSECOLOR "Les informations de couleurs vont être perdues dans cette opération. Êtes-vous sûr de continuer ?"
IDS_CANTPASTE "Failed to paste from the clipboard. The data format is either incorrect or not supported."
IDS_SAVEERROR "Failed to save the bitmap to file:\n\n%s"
IDS_CANTSENDMAIL "Failed to send a mail."
IDS_LOSECOLOR "The color information will be lost in this operation. Are you sure to proceed?"
END

View File

@@ -957,14 +957,9 @@ LRESULT CMainWindow::OnCommand(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bH
HBITMAP hbmCopy = selectionModel.GetSelectionContents();
HGLOBAL hGlobal = BitmapToClipboardDIB(hbmCopy);
if (hGlobal)
{
::SetClipboardData(CF_DIB, hGlobal);
}
else
{
ShowOutOfMemory();
imageModel.ClearHistory();
}
::DeleteObject(hbmCopy);
}
@@ -1098,7 +1093,6 @@ LRESULT CMainWindow::OnCommand(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bH
if (!hbmSelection)
{
ShowOutOfMemory();
imageModel.ClearHistory();
break;
}
SaveDIBToFile(hbmSelection, szFileName, FALSE);

View File

@@ -55,7 +55,7 @@ BEGIN
IDS_HIGHCOLOR15 "32,768 Couleurs (15 bit)"
IDS_HIGHCOLOR16 "65,536 Couleurs (16 bit)"
IDS_HIGHCOLOR24 "16,777,216 Couleurs (24 bit)"
IDS_HIGHCOLOR32 "La plus haute qualité (32 bit)"
IDS_HIGHCOLOR32 "Highest Quality (32 bit)"
IDS_PIXEL "%lux%lu Pixels"
IDS_FULLSCREEN "Plein écran"
IDS_BROWSESERVER "<Parcourir pour plus...>"

View File

@@ -32,7 +32,7 @@ Options :\n\
IDS_CTRL_C "Ctrl-C\n"
IDS_NO_RESOURCES "Ressources libres disponibles insuffisantes.\n"
IDS_MISSING_ADDRESS "L'adresse IP doit être spécifiée.\n"
IDS_MISSING_VALUE "Une valeur doit être spécifiée pour l'option %s.\n"
IDS_MISSING_VALUE "Une valeur doit être spécifie pour l'option %s.\n"
IDS_BAD_OPTION "Option incorrecte %s.\n"
IDS_BAD_PARAMETER "Paramètre incorrect %s.\n"
IDS_BAD_VALUE "Valeur incorrecte pour l'option %s, elle doit être entre %u et %u.\n"

View File

@@ -432,11 +432,7 @@ Ping(void)
exit(1);
}
/* Windows ping utility fills the optional data field with
* ASCII characters from 'a' to 'w', wrapping back around
* until SendBuffer is full. */
for (ULONG i = 0; i < RequestSize; i++)
((PUCHAR)SendBuffer)[i] = (UCHAR)('a' + (i % ('w' - 'a' + 1)));
ZeroMemory(SendBuffer, RequestSize);
}
if (Family == AF_INET6)
@@ -487,7 +483,6 @@ Ping(void)
ReplyBuffer, ReplySize, Timeout);
}
/* TODO: Compare ReplyBuffer data to SendBuffer. */
free(SendBuffer);
if (Status == 0)

View File

@@ -8,7 +8,7 @@ Usage: tracert [-d] [-h sauts_max] [-j liste_dhôtes] [-w délai] nom_de_la_cibl
Options :\n\
-d Ne pas résoudre les adresses en noms d'hôtes.\n\
-h sauts_max Nombre de sauts maximum pour atteindre la cible.\n\
-j liste_dhôtes Itinéraire source imprécis dans la liste d'hôtes.\n\
-j liste_dhôtes Intinéraire source imprécis dans la liste d'hôtes.\n\
-w délai Délai d'expiration en millisecondes pour chaque réponse.\n\
-4 Force l'utilisation d'IPv4.\n\
-6 Force l'utilisation d'IPv6.\n\

View File

@@ -25,7 +25,7 @@ BEGIN
POPUP "&Fichier"
BEGIN
MENUITEM "&Nouveau\tCtrl+N", CMD_NEW
MENUITEM "Nouvelle &fenêtre\tCtrl+Shift+N", CMD_NEW_WINDOW
MENUITEM "New &Window\tCtrl+Shift+N", CMD_NEW_WINDOW
MENUITEM "&Ouvrir\tCtrl+O", CMD_OPEN
MENUITEM "&Enregistrer\tCtrl+S", CMD_SAVE
MENUITEM "Enregistrer &sous...", CMD_SAVE_AS
@@ -75,35 +75,35 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | DS_CONTEXTHELP
FONT 8, "MS Shell Dlg"
CAPTION "Page Setup"
BEGIN
GROUPBOX "Aperçu", 0, 240, 6, 120, 153, BS_GROUPBOX
GROUPBOX "Preview", 0, 240, 6, 120, 153, BS_GROUPBOX
CONTROL "", rct1, "Static", SS_WHITERECT, 260, 42, 80, 80
CONTROL "", rct2, "Static", SS_GRAYRECT, 340, 46, 4, 80
CONTROL "", rct3, "Static", SS_GRAYRECT, 264, 122, 80, 4
GROUPBOX "Papier", grp2, 8, 6, 224, 56, BS_GROUPBOX
LTEXT "&Taille :", stc2, 16, 22, 36, 8
GROUPBOX "Paper", grp2, 8, 6, 224, 56, BS_GROUPBOX
LTEXT "&Size:", stc2, 16, 22, 36, 8
COMBOBOX cmb2, 64, 20, 160, 160, CBS_SIMPLE | CBS_DROPDOWN | CBS_SORT | WS_GROUP | WS_TABSTOP | WS_VSCROLL
LTEXT "&Source :", stc3, 16, 42, 36, 8
LTEXT "&Tray:", stc3, 16, 42, 36, 8
COMBOBOX cmb3, 64, 40, 160, 160, CBS_SIMPLE | CBS_DROPDOWN | CBS_SORT | WS_GROUP | WS_TABSTOP | WS_VSCROLL
GROUPBOX "Orientation", grp1, 8, 66, 64, 56, BS_GROUPBOX
AUTORADIOBUTTON "P&ortrait", rad1, 16, 80, 52, 12, WS_GROUP | WS_TABSTOP
AUTORADIOBUTTON "Pa&ysage", rad2, 16, 100, 52, 12
GROUPBOX "Marges", grp4, 80, 66, 152, 56, BS_GROUPBOX
LTEXT "&Gauche :", stc15, 88, 82, 30, 8
AUTORADIOBUTTON "&Portrait", rad1, 16, 80, 52, 12, WS_GROUP | WS_TABSTOP
AUTORADIOBUTTON "&Landscape", rad2, 16, 100, 52, 12
GROUPBOX "Borders", grp4, 80, 66, 152, 56, BS_GROUPBOX
LTEXT "L&eft:", stc15, 88, 82, 30, 8
EDITTEXT edt4, 119, 80, 36, 12, WS_TABSTOP | WS_GROUP | WS_BORDER
LTEXT "&Droite :", stc16, 159, 82, 30, 8
LTEXT "&Right:", stc16, 159, 82, 30, 8
EDITTEXT edt6, 190, 80, 36, 12, WS_TABSTOP | WS_GROUP | WS_BORDER
LTEXT "&Haut :", stc17, 88, 102, 30, 8
LTEXT "T&op:", stc17, 88, 102, 30, 8
EDITTEXT edt5, 119, 100, 36, 12, WS_TABSTOP | WS_GROUP | WS_BORDER
LTEXT "&Bas :", stc18, 159, 102, 30, 8
LTEXT "&Bottom:", stc18, 159, 102, 30, 8
EDITTEXT edt7, 190, 100, 36, 12, WS_TABSTOP | WS_GROUP | WS_BORDER
LTEXT "&En-tête :", 0x140, 8, 132, 40, 15
LTEXT "&Header:", 0x140, 8, 132, 40, 15
EDITTEXT 0x141, 58, 130, 173, 12, WS_BORDER | WS_TABSTOP | ES_AUTOHSCROLL
LTEXT "&Pied de page :", 0x142, 8, 149, 40, 15
LTEXT "&Footer:", 0x142, 8, 149, 40, 15
EDITTEXT 0x143, 58, 147, 173, 12, WS_BORDER | WS_TABSTOP | ES_AUTOHSCROLL
PUSHBUTTON "Aide", IDHELP, 8, 170, 50, 14
PUSHBUTTON "Help", IDHELP, 8, 170, 50, 14
DEFPUSHBUTTON "OK", IDOK, 198, 170, 50, 14, BS_PUSHBUTTON
PUSHBUTTON "Annuler", IDCANCEL, 254, 170, 50, 14
PUSHBUTTON "&Imprimante...", psh3, 310, 170, 50, 14
PUSHBUTTON "Cancel", IDCANCEL, 254, 170, 50, 14
PUSHBUTTON "P&rinter...", psh3, 310, 170, 50, 14
END
/* Dialog 'Encoding' */
@@ -135,8 +135,8 @@ CAPTION "Now printing"
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
FONT 8, "MS Shell Dlg"
BEGIN
CTEXT "Le travail d'impression démarre...", IDC_PRINTING_STATUS, 5, 10, 150, 15
CTEXT "(Nom de fichier)", IDC_PRINTING_FILENAME, 5, 35, 150, 15
CTEXT "Print job is starting...", IDC_PRINTING_STATUS, 5, 10, 150, 15
CTEXT "(Filename)", IDC_PRINTING_FILENAME, 5, 35, 150, 15
CTEXT "Page %u", IDC_PRINTING_PAGE, 5, 55, 150, 15
PUSHBUTTON "Annuler", IDCANCEL, 50, 75, 60, 20
END
@@ -176,12 +176,12 @@ de la mémoire."
STRING_LINE_COLUMN "Ligne %d, colonne %d"
STRING_PRINTERROR "Impossible d'imprimer le fichier '%s'.\n\nVérifiez que l'imprimante est allumée et correctement configurée."
STRING_DEFAULTFONT "Lucida Console"
STRING_LINE_NUMBER_OUT_OF_RANGE "Le numéro de ligne spécifié est hors limite."
STRING_NOWPRINTING "Impression de la page en cours..."
STRING_PRINTCANCELING "Le travail d'impression est en train d'être annulé..."
STRING_PRINTCOMPLETE "L'impression a été effectuée avec succès."
STRING_PRINTCANCELED "L'impression a été annulée."
STRING_PRINTFAILED "L'impression a échoué."
STRING_LINE_NUMBER_OUT_OF_RANGE "The specified line number is out of range."
STRING_NOWPRINTING "Now printing page..."
STRING_PRINTCANCELING "The print job is being canceled..."
STRING_PRINTCOMPLETE "Printing is successfully done."
STRING_PRINTCANCELED "Printing has been canceled."
STRING_PRINTFAILED "Printing failed."
STRING_TEXT_DOCUMENT "Document Texte"
STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n"

View File

@@ -10,40 +10,40 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
IDR_OSK_MENU MENU
BEGIN
POPUP "Fichier"
POPUP "File"
BEGIN
MENUITEM "&Quitter", IDM_EXIT
MENUITEM "&Exit", IDM_EXIT
END
POPUP "Clavier"
POPUP "Keyboard"
BEGIN
MENUITEM "Clavier étendu", IDM_ENHANCED_KB, CHECKED
MENUITEM "Clavier standard", IDM_STANDARD_KB
MENUITEM "Enhanced Keyboard", IDM_ENHANCED_KB, CHECKED
MENUITEM "Standard Keyboard", IDM_STANDARD_KB
MENUITEM SEPARATOR
MENUITEM "Disposition régulière", IDM_REG_LAYOUT, CHECKED, GRAYED
MENUITEM "Disposition en blocs", IDM_BLOCK_LAYOUT, GRAYED
MENUITEM "Regular Layout", IDM_REG_LAYOUT, CHECKED, GRAYED
MENUITEM "Block Layout", IDM_BLOCK_LAYOUT, GRAYED
MENUITEM SEPARATOR
MENUITEM "101 touches", IDM_101_KEYS, CHECKED, GRAYED
MENUITEM "102 touches", IDM_102_KEYS, GRAYED
MENUITEM "106 touches", IDM_106_KEYS, GRAYED
MENUITEM "101 keys", IDM_101_KEYS, CHECKED, GRAYED
MENUITEM "102 keys", IDM_102_KEYS, GRAYED
MENUITEM "106 keys", IDM_106_KEYS, GRAYED
END
POPUP "Settings"
BEGIN
MENUITEM "Toujours au premier plan", IDM_ON_TOP, CHECKED
MENUITEM "Always on Top", IDM_ON_TOP, CHECKED
MENUITEM SEPARATOR
MENUITEM "&Son sur le clic", IDM_CLICK_SOUND
MENUITEM "&Use Click Sound", IDM_CLICK_SOUND
MENUITEM SEPARATOR
MENUITEM "&Mode de frappe...", IDM_TYPE_MODE, GRAYED
MENUITEM "&Typing Mode...", IDM_TYPE_MODE, GRAYED
MENUITEM SEPARATOR
MENUITEM "&Police...", IDM_FONT
MENUITEM "&Font...", IDM_FONT
END
POPUP "Help"
BEGIN
MENUITEM "&Aide", IDM_HELP_TOPICS, GRAYED
MENUITEM "&Help Topics", IDM_HELP_TOPICS, GRAYED
MENUITEM SEPARATOR
MENUITEM "À &propos du Clavier visuel...", IDM_ABOUT
MENUITEM "&About On-Screen Keyboard...", IDM_ABOUT
END
END
@@ -61,7 +61,7 @@ END
STRINGTABLE
BEGIN
IDS_OSK "Clavier visuel"
IDS_OSK "On-Screen Keyboard"
IDS_AUTHORS "Copyright Denis Robert"
IDS_NUMLOCK "Num"
IDS_CAPSLOCK "Caps"

View File

@@ -10,14 +10,6 @@
#include "rapps.h"
#include "appview.h"
static inline AppsCategories
ClampAvailableCategory(AppsCategories Category)
{
if (Category <= ENUM_LASTCATEGORY)
return Category;
return ENUM_CAT_OTHER; // Treat future categories we don't know as Other
}
CAppInfo::CAppInfo(const CStringW &Identifier, AppsCategories Category)
: szIdentifier(Identifier), iCategory(Category)
{
@@ -32,7 +24,7 @@ CAvailableApplicationInfo::CAvailableApplicationInfo(
const CStringW &PkgName,
AppsCategories Category,
const CPathW &BasePath)
: CAppInfo(PkgName, ClampAvailableCategory(Category)), m_Parser(Parser), m_ScrnshotRetrieved(false), m_LanguagesLoaded(false)
: CAppInfo(PkgName, Category), m_Parser(Parser), m_ScrnshotRetrieved(false), m_LanguagesLoaded(false)
{
m_Parser->GetString(L"Name", szDisplayName);
m_Parser->GetString(L"Version", szDisplayVersion);
@@ -171,16 +163,16 @@ CAvailableApplicationInfo::LicenseString()
LicenseType licenseType;
if (IsKnownLicenseType(IntBuffer))
licenseType = static_cast<LicenseType>(IntBuffer);
else
licenseType = LICENSE_NONE;
if (licenseType == LICENSE_NONE || licenseType == LICENSE_FREEWARE)
{
licenseType = static_cast<LicenseType>(IntBuffer);
}
else
{
licenseType = LICENSE_NONE;
if (szLicenseString.CompareNoCase(L"Freeware") == 0)
{
licenseType = LICENSE_FREEWARE;
szLicenseString = L""; // Don't display as "Freeware (Freeware)"
szLicenseString = L"";
}
}
@@ -596,7 +588,7 @@ CInstalledApplicationInfo::GetInstallerType() const
BOOL
CInstalledApplicationInfo::UninstallApplication(UninstallCommandFlags Flags)
{
if (GetInstallerType() == INSTALLER_GENERATE && (Flags & UCF_SAMEPROCESS))
if (GetInstallerType() == INSTALLER_GENERATE)
{
return UninstallGenerated(*this, Flags);
}

View File

@@ -15,7 +15,6 @@ using namespace Gdiplus;
HICON g_hDefaultPackageIcon = NULL;
static int g_DefaultPackageIconILIdx = I_IMAGENONE;
UINT g_IconSize = 0;
// **** Menu helpers ****
@@ -956,22 +955,19 @@ CAppInfoDisplay::Create(HWND hwndParent)
}
VOID
CAppInfoDisplay::ShowAppInfo(CAppInfo &Info, bool OnlyUpdateText)
CAppInfoDisplay::ShowAppInfo(CAppInfo *Info)
{
if (!OnlyUpdateText)
CStringW ScrnshotLocation;
if (Info->RetrieveScreenshot(ScrnshotLocation))
{
CStringW ScrnshotLocation;
if (Info.RetrieveScreenshot(ScrnshotLocation))
{
ScrnshotPrev->DisplayImage(ScrnshotLocation);
}
else
{
ScrnshotPrev->DisplayEmpty();
}
ScrnshotPrev->DisplayImage(ScrnshotLocation);
}
else
{
ScrnshotPrev->DisplayEmpty();
}
ResizeChildren();
Info.ShowAppInfo(RichEdit);
Info->ShowAppInfo(RichEdit);
}
void
@@ -1064,11 +1060,9 @@ AsyncLoadIconProc(LPVOID Param)
if (task->TaskId == g_AsyncIconTaskId)
{
HICON hIcon;
HICON *phBigIcon = SettingsInfo.bSmallIcons ? NULL : &hIcon;
HICON *phSmallIcon = phBigIcon ? NULL : &hIcon;
if (!task->Parse)
hIcon = (HICON)LoadImageW(NULL, task->Location, IMAGE_ICON, g_IconSize, g_IconSize, LR_LOADFROMFILE);
else if (!ExtractIconExW(task->Location, PathParseIconLocationW(task->Location), phBigIcon, phSmallIcon, 1))
hIcon = (HICON)LoadImageW(NULL, task->Location, IMAGE_ICON, 0, 0, LR_LOADFROMFILE | LR_DEFAULTSIZE);
else if (!ExtractIconExW(task->Location, PathParseIconLocationW(task->Location), &hIcon, NULL, 1))
hIcon = NULL;
if (hIcon)
@@ -1395,14 +1389,13 @@ CAppsListView::SetDisplayAppType(APPLICATION_VIEW_TYPE AppType)
if (!g_hDefaultPackageIcon)
{
ImageList_Destroy(m_hImageListView);
g_IconSize = GetSystemMetrics(SettingsInfo.bSmallIcons ? SM_CXSMICON : SM_CXICON);
g_IconSize = max(g_IconSize, 8);
UINT IconSize = GetSystemMetrics(SM_CXICON);
UINT ilc = GetSystemColorDepth() | ILC_MASK;
m_hImageListView = ImageList_Create(g_IconSize, g_IconSize, ilc, 0, 1);
m_hImageListView = ImageList_Create(IconSize, IconSize, ilc, 0, 1);
SetImageList(m_hImageListView, LVSIL_SMALL);
SetImageList(m_hImageListView, LVSIL_NORMAL);
g_hDefaultPackageIcon = (HICON)LoadImageW(hInst, MAKEINTRESOURCEW(IDI_MAIN),
IMAGE_ICON, g_IconSize, g_IconSize, LR_SHARED);
IMAGE_ICON, IconSize, IconSize, LR_SHARED);
}
ImageList_RemoveAll(m_hImageListView);
@@ -1812,22 +1805,6 @@ CApplicationView::SetRedraw(BOOL bRedraw)
m_ListView->SetRedraw(bRedraw);
}
void
CApplicationView::RefreshAvailableItem(PCWSTR PackageName)
{
if (ApplicationViewType != AppViewTypeAvailableApps || !PackageName)
return;
CAppInfo *pApp;
for (UINT i = 0; (pApp = (CAppInfo*)m_ListView->GetItemData(i)) != NULL; ++i)
{
if (pApp->szIdentifier.CompareNoCase(PackageName) == 0)
{
RefreshDetailsPane(*pApp, true);
break;
}
}
}
void
CApplicationView::SetFocusOnSearchBar()
{
@@ -2157,12 +2134,6 @@ CApplicationView::RestoreListSelection(const RESTORELISTSELECTION &Restore)
}
}
VOID
CApplicationView::RefreshDetailsPane(CAppInfo &Info, bool OnlyUpdateText)
{
m_AppsInfo->ShowAppInfo(Info, OnlyUpdateText);
}
// this function is called when a item of listview get focus.
// CallbackParam is the param passed to listview when adding the item (the one getting focus now).
VOID
@@ -2171,7 +2142,7 @@ CApplicationView::ItemGetFocus(LPVOID CallbackParam)
if (CallbackParam)
{
CAppInfo *Info = static_cast<CAppInfo *>(CallbackParam);
RefreshDetailsPane(*Info);
m_AppsInfo->ShowAppInfo(Info);
if (ApplicationViewType == AppViewTypeInstalledApps)
{

Some files were not shown because too many files have changed in this diff Show More