- FMIFS: QueryDeviceInformation(): Use more specific types and improve documentation.
Follow-up to commit 4838d7bd56.
- FORMAT: wmain():
* Zero the correct variable. Addendum to commit c5a9f22d4e.
* No need to zero the whole volumeName array. Follow-up to commit 358fecdcf0.
- Increase the output buffer for context and group help texts.
- Use a heap buffers to load and format the command help texts.
- Pass the full command name to FormatMessage to make help output work with WinXP helpers.
- Adjust the internal help texts accordingly.
- Replace the recursive command line interpreter by a state machine.
- Simplify the help functions.
This enables us to run 'interface ip' or 'interface ip show config' in a single command.
- Validate the opened `WinSta0_DesktopSwitch` handle;
- Don't pass the `ahEvents` array containing a NULL pointer to
`MsgWaitForMultipleObjects()`, but provide the correct number
of non-NULL handles, otherwise the function fails and the code
ends up busy-looping.
- Validate the `MsgWaitForMultipleObjects()` result: bail out if
`WAIT_FAILED` is returned.
- Validate the event index passed to `CRegWatcher::InitEvent()`
and `CRegWatcher::OnEvent()`.
- Rename `WATCHENTRY_MAX` to `WI_REGEVTS_MAX` and add it in the
`WATCH_INDEX` enumeration.
- Fix some code comments.
MSI, Inno and NSIS installers are automatically detected (also if they are nested by ExeInZip). Others can specify command line switches in the rapps-db package.
Commit 51ee32f5f8 moved the `WNetClearConnections()` in the main
Winlogon thread, where it now runs.
`WNetClearConnections()` calls a 3rd-party module (nfs41_np.dll)
that invokes `kernel32!OutputDebugStringA()`.
The SEH usage pattern in `OutputDebugStringA()`, when compiled with
GCC and PSEH, generates an erroneous chain of exception handlers, that,
when running in an execution environment like that of winlogon.exe,
triggers a crash. See CORE-20316 for more details and testing.
As a temporary measure, hackfix away the problem by surrounding the
`WNetClearConnections()` call in a `_SEH2_TRY/_SEH2_EXCEPT` block
(the net effect is to "add" the missing exception handler entry).
Hack for commit 51ee32f5f8
CORE-20307 CORE-20309 CORE-20316
- Add the context stack including the PUSHD and POPD commands.
- Add the required changes to the HELP command and command execution to support the context stack.
- Add support for sub helpers.