Add basic disk support with mounting/unmounting images in NTVDM:
- basic disk controller (at the moment this is just a collection of helper functions. A real HW emulation will come later on).
- INT 13h services for the BIOS.
At the moment, the images to be mounted are hardcoded in disk.c. Please see disk.c for examples of how to use the function. This will be reworked to allow user choice without having to recompile NTVDM.
CORE-10262 #resolve
svn path=/trunk/; revision=69365
Misc trap/interrupt fixes:
- Stub legacy KiGetTickCountHandler (INT 2A) to fail instead of breakpointing. We have made it so far without it, and if someone finds something that actually uses this instead of Win32's GetTickCount we can add it then. Raises the bar of making ReactOS breakpoint from 2 bytes to 4.
- Bugcheck with the right status code in case Kei386EoiHelper is called (which means you are trying to load a Windows HAL which we totally do not support right now).
- Use Ke* instead of Kf* in C code for IRQL routines.
svn path=/trunk/; revision=69362
- Don't hardcode magic values of characters if they have C escape codes.
- Print an extra newline on call to the Ctrl-C handler, as it is done on real DOS.
- Use a do{}while loop which loops while we don't have read a CR character.
svn path=/trunk/; revision=69361
DosReadFile echoes the line feed when it encounters it.
A backspace should delete the '^' sign for special characters.
svn path=/trunk/; revision=69360
Fix DOS character device I/O. Implement CON line buffering.
Make sure INT 21h functions 01h, 06h, 07h, 08h, 0Ah and 3Fh work as expected
for CON input.
svn path=/trunk/; revision=69356
[EX] Remove "KeGetCurrentProcess" and just use the EPROCESS Pcb member for type correctness instead of inventing a new macro to hide the casting.
[PS] Remove stray INIT_FUNCTION (doesn't do much on a prototype).
[IO] Define _IO_DEBUG_ to 0 again after someone forgot to leave it on 4 years ago (only bloated the code since IopTraceLevel was 0 anyway).
svn path=/trunk/; revision=69354
Add more tests for IoCreateFile(), this time purely dealing with symlinks reparse points.
They won't run on ReactOS (obviously) as we don't have RW NTFS support.
On Windows, they show interesting results....
With Windows 2003, creating the symlink is allowed and works, but then Windows is totally unable to deal with it and keeps complaining about an unhandled reparse tag.
The only way to open it is to open the reparse point itself. Not that working symlinks... Not sure which part is not able to handle the said reparse tag. NTFS? Io?
With Windows Vista+, it just works fine. Symlink is created & functionnal.
Broken logic!
svn path=/trunk/; revision=69353
Add a test for CORE-10188 (which was fixed by Thomas in r69236).
It is based on Nikita Pechenkin's patch with a few modifications by me to avoid race condition on start (and avoid flappy test) and to match more closely our coding style
ROSTESTS-190 #resolve #comment Committed in r69351. Thanks!
svn path=/trunk/; revision=69351
- Use ROS-style paths for include files.
- Fixup its CMakeFiles for C++11 compilation under GCC (done the way we did for other C++ projects).
- Add a VS project for DEVMGR to make Ged happy.
[ATL]
Start C++ fixups:
- Add 'placement new' operator.
- Add some missing functions (that were not caught by MSVC compilation because we atm. accept function usage without the existence of its actual code...).
More to follow...
svn path=/trunk/; revision=69348
[NTOSKRNL]: Add a helper function such that user-mode cannot pass certain kernel-only object attributes to ObOpenObjectByPointer.
[NTOSKRNL]: Make \Device\PhysicalMemory OBJ_KERNEL_EXCLUSIVE
[NTOSKRNL]: Deny access to user-mode when opening a handle to an object with OBJ_KERNEL_EXCLUSIVE
[NTOSKRNL]: Fix NtOpenProcess, NtOpenThread, NtOpenThreadTokenEx, NtOpenProcessTokenEx to use the helper function. Should fix Rtl using OBJ_KERNEL_HANDLE in user-mode.
Thanks to ThFabba for finding out these bugs, and the hbelusca for adding a missing check to NtOpenProcessTokenEx.
svn path=/trunk/; revision=69340
- Fix ZF and CF flags setting in function INT 2Fh, AX=1214h.
- Use CreateEventW explicitely.
- Set the VdmTaskEvent event at startup. This allows user input by default (even if we don't run our own DOS) in NTVDM. Fixes keyboard input not working when testing boot&usage of MSDOS 6.
svn path=/trunk/; revision=69339
Aside question: we have a "nmidebug" driver in \drivers\base\. In it is a NMI callback "NmiDbgCallback". I was wondering what "((void(*)())&KiBugCheckData[4])();" should do, according to the surrounding code, since in some conditions this code path is actually run: http://i.imgur.com/TUsEr5p.jpg
svn path=/trunk/; revision=69337
- Properly free handles in driver (spotted by Thomas)
- Remove dead code in driver (spotted by Thomas)
- Send an IOCTL to stop on symlinks to allow more precise tests
svn path=/trunk/; revision=69336
- Fix devmgmt.exe to correctly build and link against devmgr.dll
- This is a temp exe that just calls DeviceManager_ExecuteW. This will later be replaced by mmc.exe and devmgmt.msc
svn path=/trunk/; revision=69334
- Add support for CAtlString and all its supporting base classes.
- It doesn't do much more than assign wchat_t arrarys and call LoadString, but it's a full base to start adding more methods as people decide to.
svn path=/trunk/; revision=69332
- Add a few helper functions: SH_ParseGuidDisplayName, SHELL32_SetNameOfGuidItem, SHELL32_GetDetailsOfGuidItem.
- SHELL32_SetNameOfGuidItem is based on a patch for CORE-5995
- Use the helpers in CControlPanelFolder, CDesktopFolder and CDrivesFolder. Implements getting the comment and renaming registry items in these folders and share some more code.
svn path=/trunk/; revision=69328
[NTOSKRNL]: Actually apply the foreground priority boost to threads in a foreground process.
[NTOSKRNL]: Correctly handle the case where the quantum length and fixed/variable flag are set to "default", instead of falling back into the server case.
Thanks to WINSRV doing the right thing, ReactOS console apps now receive the priority separation boost. However, my tests show that it doesn't last as long as it should on Windows (quantums too short? bug in priority decrement?). Also, since Win32k.sys doesn't tell the kernel about foreground GUI apps, they don't get the boost. Someone needs to add a NtSetInformationProcess call in whatever win32k function determines active focus.
Dedicated to ThFabba who needs to write some tests ;-)
svn path=/trunk/; revision=69324
- Do not hardcode the number of XMS memory blocks that can map the HMA. It should be function of the MAX_ADDRESS value of our emulator.
- Require that MAX_ADDRESS should be greater or equal than 1 MB.
svn path=/trunk/; revision=69323
Extend the IoCreateFile tests with two parts tests.
First part properly checks for opening/reparse handling on mount points (and ideally on symlinks, see below).
The other part checks for proper handling of the IO_STOP_ON_SYMLINK parameter.
Regarding symlink, I'm clearly not convinced that what I did is correct (hence the failure on both W2K3 & ROS). It seems to me that symlink resolution is up to the FSD and not to IO which only handles mount point traversal.
If someone (Alex?) can confirm/infirm and give more insight, that's more than welcome.
svn path=/trunk/; revision=69322
- Build the properties as C++
- Rearrange the folder structure
- The whole thing now builds and runs from VS (with a few hacks). CMake next
svn path=/trunk/; revision=69320
- Add a helper HCR_GetClassName function to load the name of a reg folder to a STRRET
- Further simplify CAdminToolsFolder, CFontsFolder and CMyDocsFolder
svn path=/trunk/; revision=69319