Compare commits

...

1094 Commits

Author SHA1 Message Date
Hermès Bélusca-Maïto
7d7a459001 - Port the last welcome.exe change from r73658.
- Fix the path to welcome settings for the FOSDEM CD.
- Add the welcome.exe localized customizations for FOSDEM 2017 CD.

svn path=/branches/ReactOS-0.4.4-FOSDEM2017/; revision=73659
2017-02-01 04:07:02 +00:00
Hermès Bélusca-Maïto
2c1648e5f9 Port commit r73656 : welcome.ini configuration.
svn path=/branches/ReactOS-0.4.4-FOSDEM2017/; revision=73657
2017-02-01 03:16:08 +00:00
Hermès Bélusca-Maïto
9ffcd6f25a [WELCOME]: Follow-up to r73590: Load a "welcome.ini" configuration file inside the path of the welcome.exe application, if present, that specifies few default values to use for the interface, as well as the path (possibly relative) to a subdirectory containing ini files specifying localized resources for the interface.
[BOOTDATA]: Add a default "welcome.ini" file to the build, only for hybrid-cds. The ini files containing the localized resources are automatically converted to UTF-16 prior to inclusion in the hybridcd.

svn path=/trunk/; revision=73656
2017-02-01 03:12:56 +00:00
Hermès Bélusca-Maïto
9b9a5609dd Port commit r73654 "Fix the dependencies for the hybridcd".
svn path=/branches/ReactOS-0.4.4-FOSDEM2017/; revision=73655
2017-02-01 02:20:46 +00:00
Hermès Bélusca-Maïto
229958ea1d [CMAKE]: Fix the dependencies for the hybridcd.
svn path=/trunk/; revision=73654
2017-02-01 02:18:30 +00:00
Hermès Bélusca-Maïto
85c2c6dd94 [FREELDR]: HACK: Manually reduce the size of the temporary heap from 32MB down to 10MB, because, in some situations (e.g. Bochs, or real HW, see CORE-12694), FreeLDR fails when creating the temporary heap with an "out of memory" error. First investigations seem to show that it's because FreeLDR cannot find a contiguous memory area of such size...
More investigations are in order.
I strongly think that this heap size should not be hardcoded, but instead computed, taking into account for the memory availability on a given system.

svn path=/branches/ReactOS-0.4.4-FOSDEM2017/; revision=73653
2017-01-31 23:02:16 +00:00
Hermès Bélusca-Maïto
6bb13bc0d3 Port trunk commit r73651.
svn path=/branches/ReactOS-0.4.4-FOSDEM2017/; revision=73652
2017-01-31 22:08:35 +00:00
Hermès Bélusca-Maïto
103ff5a0b0 [ISOMBR]: Pad isombr.S to the size expected by the 'isohybrid' tool.
svn path=/trunk/; revision=73651
2017-01-31 22:08:19 +00:00
Hermès Bélusca-Maïto
2a3428d7d1 Port the following FREELDR trunk fixes:
- Add missing checks for allocation failure in DetectSerialPointerPeripheral and DetectPS2Mouse. Patch by Serge Gautherie. CORE-12623 (r73608).
- Correctly check for buffer overflow in DetectPnpBios. Patch by Serge Gautherie. CORE-12623 (r73617).

Port the following FREELDR improvements:
- Code cleanup/simplifications: revisions 73606,73610,73611,73616,73618, as a prelude to...
- ... a fix so that CD-ROM disks are correctly recognized, even if they hold a MBR in their sector 0 (required for HybridUSB "technology"): commit r73621. CORE-12692

svn path=/branches/ReactOS-0.4.4-FOSDEM2017/; revision=73650
2017-01-31 21:07:45 +00:00
Hermès Bélusca-Maïto
128f19486c Port the following trunk fixes:
[NTOS:MM]: Support MmSpecialPoolTag == '*' to mean all tags. By Serge Gautherie. CORE-12711 (r73607).
[CMAKE]: Add missing target-level dependency when passing a target to add_rostests_file (r73613).
[CALC]: Do not push memory stores onto the operation stack since they can't be acted upon. Based on a patch by Katayama Hirofumi MZ. CORE-12325 (r73620).
[TREE]: Rework the utility (use explicit UNICODE, use WIN32 types, remove useless dependency to user32...), and add support for console ConUtils streams. CORE-12677 (r73622).
[CMD]: The 'type' command can open & display files opened with write access. Patch by 'mjw', CORE-12602 (r73623).

svn path=/branches/ReactOS-0.4.4-FOSDEM2017/; revision=73649
2017-01-31 20:55:30 +00:00
Hermès Bélusca-Maïto
0118cfff6b Port the following trunk fixes:
[FRAMEDYN]: Fix integer overflow checks. CID 1101981, 1248380, 1248381 (r73633).
[PSDK]: Remove incorrect bit masking from IsRecognizedPartition & IsContainerPartition. CID 1341188 (r73634).
[DHCPCSVC]: Addendum to r69652: Avoid some more "Operands don't affect result" warnings. CID 515151, 515152, 515153 (r73635).
[FREELDR]: Correctly check for vertical retrace in PcVideoSync. CID 513066 (r73636).
[MSPAINT]: Add missing break in CMainWindow::OnCommand/IDM_FORMATICONBAR. CID 1322024 (r73642).
[BOOTLIB]: Correctly check for floppy devices in BlockIoEfiGetDeviceInformation. CID 1341189 (r73643).

svn path=/branches/ReactOS-0.4.4-FOSDEM2017/; revision=73648
2017-01-31 20:48:41 +00:00
Hermès Bélusca-Maïto
434e256e43 [REACTOS-FOSDEM2017]: Sync with ROS 0.4.4 branch. In particular the following fixes/hacks:
- Apply the Wordpad related hack from CORE-5823 by Jared Smudde (r73624).
- Disable COMMAND.COM debugging messages. CORE-10710 (r73625).
- Add a hack by Thomas to avoid MmGetPhysicalAddress failures during USB transfers. CORE-9224 (r73627).
- Apply the patch that allows us to dynamically change the resolution by resizing in VirtualBox. CORE-6742 (r73628).
- Revert some shell32 work (revisions 73436, 73591 and 73599) on Giannis request to avoid any potential last minute regressions. CORE-12700 (r73629).
- Revert revisions 72835 and 72839 to avoid the FsRtlIsNameInExpressionPrivate crash from CORE-12121. (r73630).
- Mask WndProc exceptions CORE-11915 (r73631).

and the trunk commits:
- Replace some animations with RLE-8 compressed ones; courtesy Jared Smudde. Thanks! CORE-11643 (r73601).
- Some improvements for FreeLdr (r73596).
- The ISOBOOT USB functionality by Colin Finck (r73594 and r73595).
- And other commits (after r73522).

svn path=/branches/ReactOS-0.4.4-FOSDEM2017/; revision=73647
2017-01-31 19:53:27 +00:00
Hermès Bélusca-Maïto
9eef31a413 [ROSAPPS]: Update with trunk r73645.
svn path=/branches/ReactOS-0.4.4-FOSDEM2017/; revision=73646
2017-01-31 19:45:13 +00:00
Hermès Bélusca-Maïto
dd1295246d [BOOTDATA][FREELDR]
- By default, boot the livecd without the kernel debugger enabled, but...
- ... augment the FreeLdr "Debugging Mode" option with serial+screen debug ports, so that, if someone wants to run ReactOS with the kernel debugger on real hardware, without serial port, (s)he still can do it and see the debug output.
I do that, until FreeLdr can support run-time editing boot options of existing boot menu entries.

svn path=/branches/ReactOS-0.4.4-FOSDEM2017/; revision=73645
2017-01-31 19:36:15 +00:00
Hermès Bélusca-Maïto
9ea9b7db36 [WALLPAPERS]: Addendum to r73638:
- Second version of the FOSDEM 2017 wallpapers, with better aligned logos.
- Since the FOSDEM wallpaper displays better when not being stretched but centered, use instead centered-style wallpaper.

svn path=/branches/ReactOS-0.4.4-FOSDEM2017/; revision=73644
2017-01-31 19:29:05 +00:00
Thomas Faber
7eb46b4d50 [BOOTLIB]
- Correctly check for floppy devices in BlockIoEfiGetDeviceInformation. CID 1341189.

svn path=/trunk/; revision=73643
2017-01-31 13:15:29 +00:00
Thomas Faber
ea461699aa [MSPAINT]
- Add missing break in CMainWindow::OnCommand/IDM_FORMATICONBAR. CID 1322024.

svn path=/trunk/; revision=73642
2017-01-31 12:53:39 +00:00
Thomas Faber
ed174701c8 [LIBWINE]
- Fix broken indentation (-Wmisleading-indentation)

svn path=/trunk/; revision=73641
2017-01-31 12:46:37 +00:00
Hermès Bélusca-Maïto
8b8de8b853 [VERSION]: Addendum to r73588: correctly report the version as 0.4.4 (FOSDEM2017RC).
svn path=/branches/ReactOS-0.4.4-FOSDEM2017/; revision=73640
2017-01-30 22:59:38 +00:00
Hermès Bélusca-Maïto
45d79c2a20 [NTOS]: Modify the ReactOS boot logo for the FOSDEM 2017 edition, based upon an idea by Jared Smudde.
You were numerous to participate to its selection; I thank you all!

svn path=/branches/ReactOS-0.4.4-FOSDEM2017/; revision=73639
2017-01-30 22:50:03 +00:00
Hermès Bélusca-Maïto
c0f99c646f [WALLPAPERS]
- Update the wallpapers for FOSDEM 2017.
- Since we don't have any mechanism at the moment to preselect a non-bitmap wallpaper to use, I'm forced to convert the wallpaper we want to use to bitmap first, and then add its entry into the registry (I cannot just use the jpg file in the registry). See r66772.

svn path=/branches/ReactOS-0.4.4-FOSDEM2017/; revision=73638
2017-01-30 22:24:44 +00:00
Thomas Faber
5eebde25c0 [ACPI]
- Fix some broken indentation (and GCC6 -Wmisleading-indentation warnings with it)

svn path=/trunk/; revision=73637
2017-01-30 19:20:54 +00:00
Thomas Faber
ceeeea30e1 [FREELDR]
- Correctly check for vertical retrace in PcVideoSync. CID 513066.

svn path=/trunk/; revision=73636
2017-01-30 13:50:10 +00:00
Thomas Faber
d41a3f0e64 [DHCPCSVC]
- Addendum to r69652: Avoid some more "Operands don't affect result" warnings. CID 515151, 515152, 515153

svn path=/trunk/; revision=73635
2017-01-30 13:43:21 +00:00
Thomas Faber
2a53c5f4b0 [PSDK]
- Remove incorrect bit masking from IsRecognizedPartition & IsContainerPartition. CID 1341188.

svn path=/trunk/; revision=73634
2017-01-30 13:33:46 +00:00
Thomas Faber
c8ec5e1a66 [FRAMEDYN]
- Fix integer overflow checks. CID 1101981, 1248380, 1248381

svn path=/trunk/; revision=73633
2017-01-30 13:15:41 +00:00
Thomas Faber
dacd843616 [NDK]
- Add missing lpctypes.h include in lpcfuncs.h
- Fix some file header comments

svn path=/trunk/; revision=73632
2017-01-30 11:45:51 +00:00
Hermès Bélusca-Maïto
96fc9a41f8 [PING]: Convert ping to use ConStreams. Also fix file redirection.
CORE-12122 #resolve

svn path=/trunk/; revision=73626
2017-01-29 20:29:28 +00:00
Hermès Bélusca-Maïto
0ad9e5d154 [CMD]: The 'type' command can open & display files opened with write access.
svn path=/trunk/; revision=73623
2017-01-29 17:45:34 +00:00
Hermès Bélusca-Maïto
c8a8975faf [TREE]: Rework the utility (use explicit UNICODE, use WIN32 types, remove useless dependency to user32...), and add support for console ConUtils streams.
CORE-12677 #resolve

svn path=/trunk/; revision=73622
2017-01-29 16:51:23 +00:00
Hermès Bélusca-Maïto
ff5f825f59 [FREELDR]
- Simplify the implementation of the 'DiskGetBootPath' function;
- Cache the retrived freeldr boot path (corresponding to a given 'FrldrBootDrive' number);
- Introduce a 'DiskIsCdRomDrive' function to attempt to fix CORE-12692 .

svn path=/trunk/; revision=73621
2017-01-29 15:43:12 +00:00
Thomas Faber
841f48d8f2 [CALC]
- Do not push memory stores onto the operation stack since they can't be acted upon. Based on a patch by Katayama Hirofumi MZ.
CORE-12325 #resolve

svn path=/trunk/; revision=73620
2017-01-29 14:25:28 +00:00
Hermès Bélusca-Maïto
a5fd03e6e1 [SHELL32]: Fix build on *sane* compilers (wth, is that an assignment without the equal sign, or a called constructor, missing its parentheses?!).
svn path=/trunk/; revision=73619
2017-01-29 13:48:39 +00:00
Hermès Bélusca-Maïto
9a649094dc [FREELDR]: Part 3 of my local changes merging:
- Remove the DiskVtbl functions (machxbox.c) of the XBOX and share them instead with those of the PC, since they are basically the same.
  They just however differ by which 'DiskGetPartitionEntry' function they use. To cope with this, 'DiskGetPartitionEntry' becomes a pointer
  to either the default function 'DiskGetMbrPartitionEntry' (which indeed assumes a MBR-layout, see partition.c), or the special function
  'XboxDiskGetPartitionEntry' in the case of partitionless XBOX disks.
  Note that, by the way, partition.c should in the future support GPT-layout disks as well...
- The boot devices pre-initialization code can also be shared as well, thus getting rid of 'XboxInitializeBootDevices', because we note that
  this is exactly what the (old) XBOX version of 'DetectBiosDisks' did at its beginning.
- But then, we can also share 'DetectBiosDisks' XBOX code with its PC version, and also *fix* the PC code version as well!
  'DetectSystem' and 'DetectBiosDisks' are therefore merged *as they should be*. Thanks to the boot devices pre-initialization code that has
  run before the hardware detection, 'DetectBiosDisks' can just use the cached information.
- Now we correctly initialize the PC root HW system configuration key: we first create it, then, after the bios disks (floppies + HDDs) are enumerated
  we set the BIOS INT13h disk data to the system key's configuration data.

svn path=/trunk/; revision=73618
2017-01-29 02:35:28 +00:00
Thomas Faber
17990b28a2 [FREELDR]
- Correctly check for buffer overflow in DetectPnpBios. Patch by Serge Gautherie.
CORE-12623 #resolve

svn path=/trunk/; revision=73617
2017-01-29 00:00:22 +00:00
Hermès Bélusca-Maïto
dde1f97a02 [FREELDR]: More local changes merging, part 2/x:
- Move the HW detection code specific to the PC architecture from hardware.c to machpc.c, keeping in hardware.c the code that is shared between PC and XBOX.
- Move what remained of i386disk.c into pcdisk.c (specific to PC architecture) + code formatting.
- Move what remained of xboxhw.c into machxbox.c (specific to XBOX architecture); we discover that some code related to disk management is actually shared with PC architecture (in hwdisk.c): hwdisk.c therefore contains disk-management routines common to both PC & XBOX.
- xboxdisk.c: Code formatting only.
- Cleanup in disk.c/disk.h

svn path=/trunk/; revision=73616
2017-01-28 23:47:35 +00:00
Mark Jansen
8c8c4f495c [EXPLORER] Re-save the start menu banner so that we can display it again (and touch the .rc so it will be used).
svn path=/trunk/; revision=73615
2017-01-28 23:05:04 +00:00
Giannis Adamopoulos
36f927df20 [SHELL32] - CDefView: When dragging an item it shouldn't interact with itself. So you can move a folder in itself. Highlight the item that we are dragging over if it can accept the item that is being dragged.
svn path=/trunk/; revision=73614
2017-01-28 21:43:53 +00:00
Thomas Faber
334e885321 [CMAKE]
- Add missing target-level dependency when passing a target to add_rostests_file

svn path=/trunk/; revision=73613
2017-01-28 21:41:12 +00:00
David Quintana
87b6094ea0 [EXPLORER]
* Recreated the start menu banner as a SVG file in Inkscape.
* Deleted old PSD (Photoshop) files.
* Replaced the explorer banner BMP with one exported by Inkscape from the SVG file.
The end result is slightly sharper text, but otherwise identical.

svn path=/trunk/; revision=73612
2017-01-28 21:11:39 +00:00
Hermès Bélusca-Maïto
fd61c08de6 Fix build.
svn path=/trunk/; revision=73611
2017-01-28 20:11:38 +00:00
Hermès Bélusca-Maïto
ca27ff05fc [FREELDR]: Gently merge my local changes, part 1/x:
- Adjust the prototype of DiskGetBootPath;
- Add back 1 HW helper function.

svn path=/trunk/; revision=73610
2017-01-28 20:06:03 +00:00
Thomas Faber
2c8cb9c285 [FREELDR]
- Add missing checks for allocation failure in DetectSerialPointerPeripheral and DetectPS2Mouse. Patch by Serge Gautherie.
CORE-12623

svn path=/trunk/; revision=73608
2017-01-28 13:55:50 +00:00
Thomas Faber
7d54bdf9cc [NTOS:MM]
- Support MmSpecialPoolTag == '*' to mean all tags. By Serge Gautherie.
CORE-12711 #resolve

svn path=/trunk/; revision=73607
2017-01-28 13:08:19 +00:00
Hermès Bélusca-Maïto
081ba36892 [FREELDR]
- Use 'DiskReadBufferSize' instead of hardcoded values in hwdisk.c
- Transform reactos_arc_disk_info into a ARC_DISK_SIGNATURE_EX structure, so that its conversion into a ARC list in winldr.c becomes a bit simpler.
- In winldr.c:
  * In case we fail to either open the SYSTEM hive or scan it, bail out with an error message, instead of trying to continue loading ROS.
  * Fix an old comment related to ACPI;
- In memory.c/h: Do some cleanup (in particular, just use the MachXXX macros instead of also defining functions with the same names as the macros, and which just redirect into the virtual table).

svn path=/trunk/; revision=73606
2017-01-27 14:43:41 +00:00
Amine Khaldi
9bbe22afa8 [HIDPARSE][HIDPARSER][LIBUSB][USBHUB] Merge USB stack improvements by Vardan Mikayelyan in GSoC.
svn path=/trunk/; revision=73605
2017-01-27 11:09:36 +00:00
Amine Khaldi
92d1110c00 [STORAHCI] Merge Storport Miniport driver by Aman Priyadarshi in GSoC.
svn path=/trunk/; revision=73604
2017-01-27 10:11:30 +00:00
Hermès Bélusca-Maïto
8d91d51710 [SHELL32]: Replace some animations with RLE-8 compressed ones; courtesy Jared Smudde. Thanks!
CORE-11643

svn path=/trunk/; revision=73601
2017-01-27 01:07:47 +00:00
Giannis Adamopoulos
3dc773f430 [SDK] -rosctrls.h: Add GetItemPosition and SetItemPosition methods in CListView.
svn path=/trunk/; revision=73600
2017-01-26 17:03:35 +00:00
Giannis Adamopoulos
3938ea389a [SHELL32] -CDefView: Implement moving icons around. Note that the positions are never stored so a refresh returns them to their initial position.
svn path=/trunk/; revision=73599
2017-01-26 16:48:52 +00:00
Hermès Bélusca-Maïto
95aa925ed9 [EXPLORER]: Update the Start Menu banner for FOSDEM 2017, thanks to Jared Smudde!
svn path=/branches/ReactOS-0.4.4-FOSDEM2017/; revision=73598
2017-01-26 00:09:25 +00:00
Hermès Bélusca-Maïto
40768427f8 [FREELDR]: Fix GCCLin compilation (#if'd 0 an unused static function; I keep it there still in case it can become useful later).
svn path=/trunk/; revision=73597
2017-01-25 22:50:46 +00:00
Hermès Bélusca-Maïto
bf571b10a0 [XDK]: Do not always redefine the ASSERT(MSG) macros with the NT_xxx ones, especially for the FreeLdr/... bootloader (where we don't use WinDbg for debugging, yet), because in this case the int 0x2c is hardly informative. We fall back to the good old RtlAssert which displays an assertion failure string in the default debug output port (e.g. serial), and then does an int 0x03.
[FREELDR]
- "static"-ify some printing helper functions;
- hide the textmode cursor before blue-screening;
- disable interrupts before hanging forever.

svn path=/trunk/; revision=73596
2017-01-25 22:43:04 +00:00
Colin Finck
9ec5efa4f7 [ISOHYBRID]
Import the isohybrid tool from http://repo.or.cz/syslinux.git/tree/138e850fab106b5235178848b3e0d33e25f4d3a2:/utils

I had to add a lot of glue code (getopt, err/errx/warn/warnx) to get it to compile under all our build platforms Windows, Linux and macOS.
GPT/Mac partition support is disabled at the moment (look for REACTOS_ISOHYBRID_EFI_MAC_SUPPORT), that would need a portable libuuid.
A fix for correctly opening ISOs as binary and not text-mode has been implemented and already sent upstream.

ISOs are not being patched automatically yet due to CORE-12692

CORE-12648

svn path=/trunk/; revision=73595
2017-01-24 22:53:20 +00:00
Colin Finck
29bebdf5b3 [BOOTSECT]
Overhaul our ISO boot sector:
- Add another entry point for hybrid booting (called by isombr) and the hybrid signature needed for isohybrid.
- Import latest isolinux.asm "API" from http://repo.or.cz/syslinux.git/blob/8bbb10b70905339b7ca6b58d6833b6a95ab03dae:/core/isolinux.asm (latest version to date) and http://repo.or.cz/syslinux.git/blob/9141c603930ef23da1e08e487a0c26750fbb4fbe:/core/isolinux.asm (latest version that came with all functions in ASM).
  Among other things, this brings us getlinsec_ebios (for reading setupldr.sys in hybrid/MBR mode) and BrokenAwardHack (for working around broken Award BIOSes)
- Fix upstream getlinsec_ebios to load files >64K.
- Load the HDD boot sector directly to 0x7C00 instead of trackbuf. This way, we don't have to load it again when the user decides to boot from HDD.
- Check for the 0xAA55 signature to decide if the HDD contains a valid MBR. This was done differently and inconsistently for isoboot and isobtrt.
- Adapt the file and comment style to ReactOS guidelines. Add meaningful comments to our main code. Remove stuff that was just taken from isolinux.asm, but makes no sense for our version.
- Remove DEBUG_MESSAGES ifdef. There is no chance they can ever fit into the 2K sector with all the added features. Debugging can still happen using Bochs or adding specific messages.

Tested with Bochs, QEMU, VMware, VirtualBox and four real computers.
Many thanks to Hermès for all the helpful suggestions and additional investigations! :)

CORE-12648

svn path=/trunk/; revision=73594
2017-01-24 22:45:37 +00:00
Robert Naumann
b2c245865a [SUBST] improve/fix German translation. Patch by "Joefish". CORE-12654 #resolve
svn path=/trunk/; revision=73593
2017-01-24 22:22:58 +00:00
Robert Naumann
07392e555e [HELP] Small grammar correction. Based on parch by Doug Lyons. CORE-12669 #resolve
svn path=/trunk/; revision=73592
2017-01-24 22:18:24 +00:00
Giannis Adamopoulos
2e07736507 [SHELL32]
- CDefaultContextMenu: Fix the implementation of the QueryContextMenu to respect how IContextMenu should function. Don't ignore idCmdFirst and idCmdLast parameters. Return a correct HRESULT. For now I'm not sure how 0 cmd ids should be handled and if the standard menu items should also be affected by these parameters.

svn path=/trunk/; revision=73591
2017-01-24 16:35:36 +00:00
Hermès Bélusca-Maïto
b40958162a [WELCOME]
- Start implementing the possibility of customizing the Welcome.exe utility using configuration INI files (e.g. what we would do for FOSDEM, CLT, etc...)
- Resources cleanup.

svn path=/trunk/; revision=73590
2017-01-24 14:42:07 +00:00
Hermès Bélusca-Maïto
9e499d4fb4 [i8042prt]: Yet another hack for Dell Latitude E4310 for touchpad.
CORE-12434

svn path=/trunk/; revision=73589
2017-01-24 00:58:52 +00:00
Hermès Bélusca-Maïto
09dc089cfe [BOOTDATA]
- Flatten out the ISO layout for hybridcd (otherwise some problems appear for the livecd: see r66114 for more details).
- Add user-friendly boot menu.

[README]: Update the ReadMe.txt for FOSDEM 2017.

[VERSION]: Adjust version to 0.4.4-RC FOSDEM 2017.

svn path=/branches/ReactOS-0.4.4-FOSDEM2017/; revision=73588
2017-01-23 12:45:51 +00:00
Eric Kohl
44f312e477 [FREELDR]
Add VESA DDC detection and EDID read code. Work in progress.

svn path=/trunk/; revision=73587
2017-01-22 15:03:11 +00:00
Jérôme Gardou
b63e5725ae [CDFS]
- Reduce stack usage by manipulating UNICODE_STRINGS we are given instead of copying it a gazillion times
 - Do not assume said strings are null-terminated

svn path=/trunk/; revision=73586
2017-01-22 11:55:29 +00:00
Eric Kohl
b9b510dbc1 [ADVAPI32]
Add I_ScIsSecurityProcess() stub.

svn path=/trunk/; revision=73585
2017-01-21 11:57:43 +00:00
Hermès Bélusca-Maïto
a7253195cd [PSDK]: Add the declarations for IsNetDrive, DriveType and RealDriveType functions (from shell32).
svn path=/trunk/; revision=73584
2017-01-19 19:39:53 +00:00
Hermès Bélusca-Maïto
7b725d5d8f [SHELL32]: Follow-ups to r73579 and r73580: use PathYetAnotherMakeUniqueName.
CORE-12684

svn path=/trunk/; revision=73583
2017-01-18 23:47:38 +00:00
Hermès Bélusca-Maïto
47df3c243f [SHELL32]: Code formatting only.
svn path=/trunk/; revision=73582
2017-01-18 23:44:46 +00:00
Hermès Bélusca-Maïto
1f1f5a4c49 [SHELL32]: Remove trailing whitespace.
svn path=/trunk/; revision=73581
2017-01-18 21:03:46 +00:00
Hermès Bélusca-Maïto
a770bf5f98 Fix a bug introduced in r73579.
CORE-12684

svn path=/trunk/; revision=73580
2017-01-18 12:59:35 +00:00
Hermès Bélusca-Maïto
99b6de6618 [SHELL32]: Fix the "CNewMenu.cpp:432: Unexpected failure 80070002." debug line that appears when one tries to create a new file using the explorer (note: did not happen for new directories).
CORE-12684 #resolve #comment Fixed in r73579.

svn path=/trunk/; revision=73579
2017-01-18 12:48:50 +00:00
Hermès Bélusca-Maïto
a3aa3fb107 [SHELL32]
- Now that we correctly handle the shell link data block list with APIs, no need to hack an extra zeroed DWORD at the end of shortcut files!
- Fix the display of the shortcut target location: this typically displays the (last) directory where the target resides. Addendum for r53624, r54957 and CORE-5730 CORE-6104

svn path=/trunk/; revision=73578
2017-01-18 11:51:42 +00:00
Hermès Bélusca-Maïto
ef268d1301 [SYSSETUP][SHORTCUTS.INF]: Follow-up of r71049 and CORE-11020 :
- Make more shortcuts start from the user directory;
- The desktop shortcut of the ReadMe file should not use an icon location, so that the shell correctly retrieves the icon to display from the type of the file (in our case, .txt).
- Make the necessary adjustments in syssetup/install.c :
  * opt-out setting the icon location;
  * in addition, since we now support shell link targets containing environment variables, don't always expand the target path before setting up the shortcut, but do it just in the case we have to compute a suitable working directory.

svn path=/trunk/; revision=73577
2017-01-18 00:19:12 +00:00
Hermès Bélusca-Maïto
766a0d27df [SHELL32]: CShellLink fixups Part 2:
- Add COM inheritance for interfaces IExtractIconA/W, and add in comment the missing other ones, the ordering of which is given by the apitests/com/shell32.
- Add proper support for the extra data block list (which is added at the end of the .lnk files), by using the API from shlwapi.dll: SH[Read|Write|Free]DataBlockList, SH[Add|Find|Remove]DataBlock.
- Using this support, getting/setting the MSI data block becomes as simple as child's play, and opens the possibility for implementing support for the other types of blocks.
- This in particular enables support for paths with environment variables for the link's target and icon: CORE-9236 #resolve
- Fix all the "shell32_winetest shelllink" tests: CORE-7158 #resolve
  Some of the fixes are inspired from a patch by Katayama Hirofumi MZ.
- Fix all the "shell32_apitest CShellLink" tests *but* those calling IExtractIcon::GetIconLocation().
- Implement a hackish substitute to the shell32!PathResolve API until someone writes a correct one (see the code & the FIXMEs for some ideas), possibly using the SHELL_xxx helpers in Wine's shellpath.c.
- In CFSExtractIcon_CreateInstance: Because IShellLink::GetIconLocation can return no icon location, in case none is specified in the .lnk (proved by apitests), we have to call the shell link's IExtractIcon::GetIconLocation in order to retrieve the icon of its target (yes, some shortcuts are made like that, e.g. Notepad++ 6.9 one...).

- More fixes...
- ... and a lot of documentation added in the code for you!

CORE-12682

svn path=/trunk/; revision=73576
2017-01-17 23:53:55 +00:00
Giannis Adamopoulos
ef0d1d640c [KERNEL32_APITEST] -Make FindActCtxSectionStringW test less strict.
svn path=/trunk/; revision=73575
2017-01-17 23:11:11 +00:00
Giannis Adamopoulos
8896e6a8c4 [KERNEL32_APITEST] -Try to avoid crashes in DefaultActCtx test.
svn path=/trunk/; revision=73574
2017-01-17 22:40:36 +00:00
Hermès Bélusca-Maïto
0aeb3f07b1 [SHELL32]: CShellLink fixups Part 1:
- Use STDMETHODCALLTYPE for the interface methods calling convention;
- Use the naming convention "m_Member" for the class members (note that I haven't applied the convention for some members: because they will go away in the next commits);
- Use _countof() where needed;
- Make the ANSI CShellLink::GetIconLocation call the UNICODE version;
- Move some functions around to put them closer to the functions that call them;
- Very minor code formatting.
CORE-12682

svn path=/trunk/; revision=73573
2017-01-17 21:32:18 +00:00
Giannis Adamopoulos
749f780aef [KERNEL32_APITEST] -Add redir2dep.manifest to the testdata.
svn path=/trunk/; revision=73572
2017-01-17 19:41:26 +00:00
Giannis Adamopoulos
74365d512d [KERNEL32_APITEST] -Fix gcc build
svn path=/trunk/; revision=73571
2017-01-17 19:24:29 +00:00
Hermès Bélusca-Maïto
57ba1bd2d4 [SHELL32]
- Use explicit unicode SHFILEINFOW structure (where needed);
- In CFSExtractIcon_CreateInstance, use _countof instead of hardcoding the MAX_PATHs; add some FIXMEs about the 'flags' parameter;
- Code formatting in CExtractIcon.cpp.

svn path=/trunk/; revision=73570
2017-01-17 19:16:50 +00:00
Giannis Adamopoulos
c799fd3e4f [regtest.cmd] -RENAME parameter in add_rostests_file doesn't have any effect on the name of the installed file so rename sine files manually before starting tests.
svn path=/trunk/; revision=73569
2017-01-17 19:13:12 +00:00
Giannis Adamopoulos
1dc1c3f7ef [KERNEL32_APITEST]
- Fix and enable tests for redirection support in LoadLibraryExW.
- Add tests for the default activation context that is active for every process.

svn path=/trunk/; revision=73568
2017-01-17 19:11:05 +00:00
Hermès Bélusca-Maïto
c31e1f67a6 [PSDK]: Update shlobj.h:
- Define Logo3-related symbols only when NTDDI_VERSION < NTDDI_LONGHORN (Vista);
- In the SHELL_LINK_DATA_FLAGS enumeration, some symbols are defined for Vista+ only;
- Update the comment for EXP_LOGO3_ID_SIG;
- The PRF_TRYPROGRAMEXTENSIONS define is actually the combination of PRF_EXECUTABLE and PRF_VERIFYEXISTS;
- Add PRF_REQUIREABSOLUTE and fix PRF_DONTFINDLNK typo.

svn path=/trunk/; revision=73567
2017-01-17 15:30:57 +00:00
Hermès Bélusca-Maïto
9dda28415f [INCLUDES]: Add in shlwapi_undoc.h the exported-by-ordinal-only shlwapi functions SH[Add|Remove|Find]DataBlock, SH[Write|Read|Free]DataBlockList, and SHExpandEnvironmentStrings[ForUser]A/W . Will be used later.
CORE-12682

svn path=/trunk/; revision=73566
2017-01-17 15:16:06 +00:00
Hermès Bélusca-Maïto
a05881c135 [SHLWAPI]
- Fix SHAddDataBlock function signature & return value.
- Back this up by updating the corresponding wine test.
Send upstream, I will remove the __REACTOS__ markups once this is merged in Wine.

svn path=/trunk/; revision=73565
2017-01-17 15:09:18 +00:00
Hermès Bélusca-Maïto
855bcceefc [SHLWAPI]: Follow-up on r73527 and r73529: Use WINVER conditional to separate old-Win2k3 and new-Vista+ behaviours of PathIsUNCA/W.
CORE-12653

svn path=/trunk/; revision=73564
2017-01-16 22:34:22 +00:00
Hermès Bélusca-Maïto
e525ccdb5f [SHELL32_APITEST]
- Use smart COM pointers (thanks Mark ;)
- Add other tests for testing non-existing files in existing directories.

svn path=/trunk/; revision=73563
2017-01-16 18:02:43 +00:00
Hermès Bélusca-Maïto
a471a57006 [SHELL32_APITEST]: Add more tests to see how IShellLink::Get/SetIconLocation interacts with IExtractIcon::GetIconLocation.
svn path=/trunk/; revision=73562
2017-01-16 17:27:44 +00:00
Hermès Bélusca-Maïto
5db91c84a0 Comply to GCCLin rules.
svn path=/trunk/; revision=73561
2017-01-16 16:35:01 +00:00
Hermès Bélusca-Maïto
5ccf3c01a4 [SHELL32_APITEST]: Add some tests for GetIconLocation. Show also that CShellLink inherits from IExtractIcon(A/W).
svn path=/trunk/; revision=73560
2017-01-16 16:22:40 +00:00
Hermès Bélusca-Maïto
a6b1351921 [SHELL32_APITEST]
- Fix the names of some expected return values get from the APIs;
- Move a bit the TestShellLink() function.
- When displaying hexadecimal, prepend the "0x" string (otherwise, when you see: "hr = 10", is it 10 in decimal or in hex??)
- Call CoUninitialize() at the end of the tests.

svn path=/trunk/; revision=73559
2017-01-16 16:17:59 +00:00
Pierre Schweitzer
8a75088c41 [SHELL32]
Fix truncated French text in File Properties dialog.
Patch by Katayama Hirofumi MZ.

CORE-12554

svn path=/trunk/; revision=73558
2017-01-15 17:20:17 +00:00
Pierre Schweitzer
efce805bfc [INTL]
Fix truncated French text in Languages dialog.
Patch by Katayama Hirofumi MZ.

CORE-12366

svn path=/trunk/; revision=73557
2017-01-15 14:24:11 +00:00
Pierre Schweitzer
404456b319 [SHELL32]
Fix truncated French text in Open With dialog.
Patch by Katayama Hirofumi MZ.

CORE-12556

svn path=/trunk/; revision=73556
2017-01-15 14:15:55 +00:00
Colin Finck
709dfc61a2 [BOOTSECT]
Add a simple MBR boot sector that chainloads the El Torito BIOS Boot Sector of the ReactOS ISO.
This is our equivalent to syslinux's isohdpfx.S and will be used as input for the soon to be imported "isohybrid" patching tool.

Largely untested Work In Progress towards CORE-12648

svn path=/trunk/; revision=73555
2017-01-15 12:31:47 +00:00
Giannis Adamopoulos
e4ffdbb8a7 [NTDLL_APITEST] -Create a copy of the test in testdata and add along three empty files: ntdll_apitest.exe.local, shell32.dll and test.dll. Make the test start the subprocess from testdata to avoid any kind of interference of the .local to all the other tests. The empty dlls are needed there because there is no way to rename the files while adding them to the cab file like we do with NAME_ON_CD and creating them at runtime is not reliable as caching can cause random failures.
svn path=/trunk/; revision=73554
2017-01-15 11:51:06 +00:00
Pierre Schweitzer
8fc83b30af [UBTRFS]
[BTRFSLIB]
As suggested by Peter, bring back the btrfslib and make use of it in ubtrfs.
This will allow code reuse especially for people having plans with btrfs and usetup ;-)

CORE-12617

svn path=/trunk/; revision=73553
2017-01-15 10:58:38 +00:00
Giannis Adamopoulos
f2d49d7a05 Fix a line that I forgot to finish editing.
svn path=/trunk/; revision=73552
2017-01-15 00:49:47 +00:00
Giannis Adamopoulos
1442edd291 [NTDLL_APITEST]
- Add more tests for RtlDosApplyFileIsolationRedirection_Ustr. Unfortunately creating .local files and making it have instant effect seems to be impossible. So I added tests for .local than can be enabled to show that this is indeed the behaviour but I have disabled them to avoid random failed tests.

svn path=/trunk/; revision=73551
2017-01-15 00:42:10 +00:00
Mark Jansen
90999f0373 [PRINTUI] Properly stub bPrinterSetup. Patch by Jared Smudde. CORE-12600 #resolve #comment Thanks!
svn path=/trunk/; revision=73550
2017-01-15 00:15:22 +00:00
Mark Jansen
523a1a5589 SHLWAPI_APITEST: Add tests for StrFormatByteSizeW. Patch by Doug Lyons. CORE-12661 #resolve
svn path=/trunk/; revision=73549
2017-01-15 00:04:16 +00:00
Eric Kohl
50a627eb56 [ADVAPI32]
Implement LsaQueryInfoTrustedDomain() and LsaQueryTrustedDomainInfo().

svn path=/trunk/; revision=73548
2017-01-14 18:10:42 +00:00
Eric Kohl
eb31df80a7 [ADVAPI32]
Implement I_ScPnPGetServiceName().

svn path=/trunk/; revision=73547
2017-01-14 15:17:29 +00:00
Hermès Bélusca-Maïto
48f148bba8 [KERNEL32]: Fix (old-style) annotations.
svn path=/trunk/; revision=73546
2017-01-14 01:59:10 +00:00
Hermès Bélusca-Maïto
736b7b86f6 [SHLWAPI_APITEST]: Use the 'add_rostests_file' command from Colin ;)
svn path=/trunk/; revision=73545
2017-01-13 22:12:22 +00:00
Hermès Bélusca-Maïto
cd7c1882ed [SHLWAPI_APITEST]
- Add tests for PathIsUNCServer and PathIsUNCServerShare, by Jared Smudde. Thanks! ROSTESTS-258 #resolve
- Simplify the code: Since those functions (as well as PathIsUNC) are public and exported by name, we can directly load the apitest with shlwapi and call the APIs directly (no need for explicit LoadLibrary & GetProcAddress).

svn path=/trunk/; revision=73544
2017-01-13 21:55:25 +00:00
James Tabor
bfd112dafa - Fix leak.
svn path=/trunk/; revision=73543
2017-01-13 19:35:36 +00:00
Hermès Bélusca-Maïto
a11a51af76 FTSU GCCLin.
svn path=/trunk/; revision=73542
2017-01-13 19:09:11 +00:00
Hermès Bélusca-Maïto
7f0502d36e [SHELL32_APITEST]: Improve a bit the output of the CShellLink test.
svn path=/trunk/; revision=73541
2017-01-13 19:00:33 +00:00
Colin Finck
e1a81c6804 [CMAKE]
Call the NAME_ON_CD parameter RENAME (because it's not tied to a CD/ISO) and simplify the implementation.

svn path=/trunk/; revision=73540
2017-01-13 16:39:33 +00:00
Colin Finck
4536560a1d [LOCALSPL_APITEST]
Disable fpGetPrintProcessorDirectory tests that use PSEH.
For some reason, they can only be run once and corrupt something inside spoolsv, so that spoolsv needs to be restarted afterwards.

svn path=/trunk/; revision=73539
2017-01-13 16:15:13 +00:00
Giannis Adamopoulos
12796f8786 [KERNEL32_APITEST] - Add tests for LoadLibraryExW to test its ability to load a redirected dll. Do not include it in the build until a way is found for it to be compiled properly.
svn path=/trunk/; revision=73538
2017-01-13 15:33:38 +00:00
Giannis Adamopoulos
192c5b7ac3 [CMakeMacros.cmake] - Add NAME_ON_CD parameter to add_rostests_file to make it possible to select a different name for a file.
svn path=/trunk/; revision=73537
2017-01-13 15:15:55 +00:00
Hermès Bélusca-Maïto
a20fc53659 [SHLWAPI_APITEST]: Commit few tests for PathUnExpandEnvStrings.
svn path=/trunk/; revision=73536
2017-01-13 14:51:25 +00:00
Colin Finck
d5122b7e7b [KMTESTS]
Temporarily disable kmtests for "rostests_install" (and subsequently the WHS-Testbot) as long as kmtest:ExPools crashes the machine and I have to reboot it manually.

svn path=/trunk/; revision=73535
2017-01-13 11:20:52 +00:00
Colin Finck
0a08074364 Only generate installation rules for rostests if the ROSTESTS_INSTALL environment variable is defined.
svn path=/trunk/; revision=73534
2017-01-13 09:43:12 +00:00
Colin Finck
da200b3a2c [ROSTESTS]
- Add a function "add_rostests_file" that calls both add_cd_file() and install() accordingly for regression tests.
  Use this function everywhere in rostests where add_cd_file() was used previously. This puts tests always in the right place on CD and also generates proper installation rules for them.
- Add a custom target "rostests_install" that performs an "install" on all rostests components.

This finally gives us a convenient and reliable way to copy all regression tests and their dependencies into a single directory (specified by the ROSTESTS_INSTALL environment variable).
Will be used on the WHS-Testbot to let it finally run each and every test.

CORE-12401
ONLINE-441

svn path=/trunk/; revision=73533
2017-01-13 09:24:15 +00:00
James Tabor
6d7fcc4bab [NtUser]
- Fix menu surfing while using MS Office 2003. See CORE-12085 and CORE-12071.

svn path=/trunk/; revision=73532
2017-01-13 04:06:24 +00:00
Hermès Bélusca-Maïto
633f34d7c4 Use wine_dbgstr_w as Jared did originally (I hate this macro because it displays strings in 'C'-language form instead of in natural way).
svn path=/trunk/; revision=73531
2017-01-13 00:33:46 +00:00
Hermès Bélusca-Maïto
ee9c290085 /me slaps GCCLin.
svn path=/trunk/; revision=73530
2017-01-13 00:20:50 +00:00
Hermès Bélusca-Maïto
aea802c64c [SHLWAPI]: On Windows 2003, tests show that strings starting with "\\?" are considered UNC, while on Windows Vista+ this is not the case anymore.
Select Win2k3 behaviour: revert r54542 (and add a note).
CORE-12653 #resolve

svn path=/trunk/; revision=73529
2017-01-13 00:18:51 +00:00
Hermès Bélusca-Maïto
58c3357ad1 Make GCC happy.
svn path=/trunk/; revision=73528
2017-01-13 00:13:38 +00:00
Hermès Bélusca-Maïto
c785b8f077 [SHLWAPI_APITEST]: New test for PathIsUNC function, by Jared Smudde. Thanks!
ROSTESTS-256 #resolve

svn path=/trunk/; revision=73527
2017-01-13 00:06:12 +00:00
Giannis Adamopoulos
6fc550ad47 [NTDLL] -Add preliminary tests for RtlDosApplyFileIsolationRedirection_Ustr.
svn path=/trunk/; revision=73526
2017-01-12 11:21:04 +00:00
Hermès Bélusca-Maïto
1a345aab0c Fix build.
svn path=/trunk/; revision=73525
2017-01-11 20:06:47 +00:00
Hermès Bélusca-Maïto
a000763117 [SHELL32]: Partly restore code (AddCommasW function) that was implemented in r33953 but removed in the next revision r33954.
svn path=/trunk/; revision=73524
2017-01-11 20:02:14 +00:00
Hermès Bélusca-Maïto
22726a1e1c [SHELL32]: Replay commit r41711 (was lost during shell32 C++ translation).
svn path=/trunk/; revision=73523
2017-01-11 19:28:48 +00:00
Colin Finck
4485b549ba Remove the USE_MKISOFS switch and make mkisofs our one and only ISO creation tool.
CDMake is moved to rosapps as per Hermès' wish, but not added to the build.

svn path=/trunk/; revision=73521
2017-01-11 12:16:25 +00:00
Colin Finck
04c65f7051 [MKISOFS]
Update mkisofs to schily-2016-12-14 giving us the following features:
- Support for -duplicates-once to store duplicate files in the tree only once in the filesystem (see also CORE-9266)
  I've enabled this for the hybridcd target where it actually saves us 25 MB.
- Proper System-ID "Win32/MinGW" and "Win32/MSVC" under Windows hosts depending on the compiler

CORE-12578

svn path=/trunk/; revision=73520
2017-01-11 11:56:36 +00:00
Hermès Bélusca-Maïto
e8127690bb [SETUP][SYSSETUP]: Export a 'InstallWindowsNt' function from syssetup.dll (with Windows-compatible signature) instead of our private 'InstallReactOS' and 'InstallLiveCD', and call it from setup.exe. This allows using our setup.exe on Windows & vice-versa for testing purposes. In syssetup.dll, the choice of installing ReactOS or starting the LiveCD interface is done by checking the command-line given to 'InstallWindowsNt' (using the existing switches).
Inspired from Jared's patch in CORE-12615.

svn path=/trunk/; revision=73519
2017-01-10 16:55:15 +00:00
Hermès Bélusca-Maïto
c24dcb3ff2 [USERENV]
- Split the huge "InitializeProfiles" function into itself and a helper "CreateStandardProfile", the latter is called to set up the "Default User" and "All Users" profile directories & registry settings.
- Use StringSafe functions where needed.
- Some of the shell registry values (the multimedia ones in particular) and the Fonts folder path, are not set by userenv.dll but are set by shell32.dll when it is registered during 2nd stage setup.

[SHELL32]: The above-mentioned shell reg vals are already there, but few have different translations than the ones that were in userenv. Translators, please review & fix if needed!

[SYSSETUP]: It is syssetup.dll which sets up the 'Program Files' & 'Common Files' directories & registry values at 2nd stage setup, as done on Windows' setup. Move the code that did this from our userenv to syssetup.

svn path=/trunk/; revision=73518
2017-01-10 15:28:49 +00:00
Mark Jansen
e8801e23b6 [WIN32SS] Don't trigger ProbeForWrite when retrieving caret size from co_IntDrawCaret, fix unlocking in failure path. CORE-10308
svn path=/trunk/; revision=73517
2017-01-09 21:12:00 +00:00
Pierre Schweitzer
657d78a387 [SHELL32]
Stub support for BtrFS helper.

CORE-12617

svn path=/trunk/; revision=73516
2017-01-09 21:01:22 +00:00
Pierre Schweitzer
1a74d78001 [FMIFS]
Register the BtrFS helper

CORE-12617

svn path=/trunk/; revision=73515
2017-01-09 20:59:22 +00:00
Pierre Schweitzer
21f976c9ff [BTRFSLIB]
Drop that lib. It's been superseeded by r73513

CORE-12617

svn path=/trunk/; revision=73514
2017-01-09 20:56:55 +00:00
Pierre Schweitzer
568b75b342 [UBTRFS]
Import the ubtrfs DLL from the BtrFS project.

CORE-12617

svn path=/trunk/; revision=73513
2017-01-09 20:52:44 +00:00
Pierre Schweitzer
5ebe380166 [SHELL32]
When selecting any FAT filesystem on format dialog, uncheck & disable compression control. It's not supported by this FS.

svn path=/trunk/; revision=73512
2017-01-08 17:26:14 +00:00
Pierre Schweitzer
7a29e16fbd [PSDK]
Define Button_SetElevationRequiredState() and BCM_SETSHIELD.
Reviewed by Giannis.

CORE-12617

svn path=/trunk/; revision=73511
2017-01-07 20:23:50 +00:00
Pierre Schweitzer
d3e43b0f5f [DDK]
Define IDE_COMMAND_IDENTIFY

CORE-12617

svn path=/trunk/; revision=73510
2017-01-07 20:20:21 +00:00
Giannis Adamopoulos
6d0f733ac7 [KERNEL32_APITEST] - Use the full path to the manifest files when testing FindActCtxSectionStringW. This is needed because in most cases they are not in the current directory.
svn path=/trunk/; revision=73509
2017-01-06 22:06:53 +00:00
Giannis Adamopoulos
9624a5e18b [KERNEL32_APITEST] -Keep improving the skip checks.
svn path=/trunk/; revision=73508
2017-01-06 21:25:53 +00:00
Giannis Adamopoulos
7475839d64 [KERNEL32_APITEST] - Skip more stuff hoping to fix a crash that I can't reproduce locally.
svn path=/trunk/; revision=73507
2017-01-06 21:13:46 +00:00
Giannis Adamopoulos
c2c4d46671 [KERNEL32_APITEST] -Add some more checks to avoid a crash (the ones I originally added were not enough).
svn path=/trunk/; revision=73506
2017-01-06 20:43:58 +00:00
Giannis Adamopoulos
2bebddf5ee [KERNEL32_APITEST] -Add tests for FindActCtxSectionStringW.
svn path=/trunk/; revision=73505
2017-01-06 18:48:15 +00:00
Daniel Reimer
ca45c6e795 [RAPPS]
Fix broken links and checksums by new mirrors/new version update.

svn path=/trunk/; revision=73503
2017-01-05 00:16:22 +00:00
Hermès Bélusca-Maïto
096143cb2f Happy New Year 2017 to ReactOS people!
svn path=/trunk/; revision=73502
2017-01-03 15:35:31 +00:00
Eric Kohl
ade0d2cda5 [SERVICES]
- Add loading (not used yet) and unloading of user profiles.
- Create the service password secret name and pass it to LogonUserW.
Patch by Hermès BÉLUSCA - MAÏTO.

svn path=/trunk/; revision=73501
2017-01-02 20:45:36 +00:00
Pierre Schweitzer
d915c39751 [MPR]
Import Wine commit:
- 96a93ee608b2919d1a8f583002e8262ef54a6743, Enumerate connections capability before looking for functions entry points.

svn path=/trunk/; revision=73500
2017-01-02 20:16:14 +00:00
Sylvain Petreolle
83f928948d [INF]
Correctly install the ACPI AC Adapter driver.

Happy new year.

svn path=/trunk/; revision=73499
2017-01-01 17:35:22 +00:00
Pierre Schweitzer
3049f1a5b4 [BTRFS]
Sync btrfs to 0.8.

CORE-12617

svn path=/trunk/; revision=73498
2017-01-01 17:12:12 +00:00
Pierre Schweitzer
3175ed2860 [XDK]
Add the PsGetThreadProcess() prototype

CORE-12617

svn path=/trunk/; revision=73497
2017-01-01 16:58:15 +00:00
Pierre Schweitzer
47b3314130 [SDK]
Implement the rtlver library with RtlIsNtDdiVersionAvailable(). Will be used later on by BtrFS driver.
Reference: https://msdn.microsoft.com/en-us/library/windows/hardware/ff561954(v=vs.85).aspx

CORE-12617

svn path=/trunk/; revision=73496
2017-01-01 16:44:40 +00:00
Eric Kohl
754b0a7362 [LSASRV]
Return proper status codes, indicating no available AD, for most trusted domain functions. 

svn path=/trunk/; revision=73495
2017-01-01 14:10:02 +00:00
Eric Kohl
7cec4c47db [ADVAPI32]
- Implement LsaEnumerateTrustedDomains and LsaEnumerateTrustedDomainsEx.
- Mark LsaGetRemoteUserName and LsaLookupPrivilegeDisplayName as implemented.

svn path=/trunk/; revision=73494
2017-01-01 13:12:03 +00:00
Eric Kohl
2c10751e87 [USERENV]
- Move functionality from CreateUserProfileW to CreateUserProfileExW.
- Implement CreateUserProfileExA and fix CreateUserProfileA.

svn path=/trunk/; revision=73493
2016-12-31 15:20:50 +00:00
Mark Jansen
e01de74720 [APPHELP] Simplify SdbTagToString.
svn path=/trunk/; revision=73492
2016-12-30 21:31:14 +00:00
Mark Jansen
2549b1ebe7 [KERNEL32] Fix a typo in IsShimInfrastructureDisabled.
svn path=/trunk/; revision=73491
2016-12-30 20:54:47 +00:00
Pierre Schweitzer
3f0da1835a [SHELL32]
Revert r72888 (aka, remove a hack :-)).
This is no longer required thanks to r73489.

ROSAPPS-303
CORE-11757

svn path=/trunk/; revision=73490
2016-12-30 20:33:40 +00:00
Pierre Schweitzer
68bcda65e2 [MPR]
Enumerate connections capability before looking for functions entry points.
This is a major fix, because it allows VBoxSF to work without a hack, and without necessarily make a connection from the NP to the VBoxSF driver.

Already sent upstream.

ROSAPPS-303
CORE-11757

svn path=/trunk/; revision=73489
2016-12-30 20:30:28 +00:00
Mark Jansen
3fb8dc2d64 [SERVICES] Addendum to r73487: Fix the build.
svn path=/trunk/; revision=73488
2016-12-27 18:10:52 +00:00
Hermès Bélusca-Maïto
0ce031f74d [SERVICES]: Addendum to r73486: Start all services within LocalSystem account as a temporary measure in trunk until we completely support per-service account logging.
CORE-12541, CORE-12279

svn path=/trunk/; revision=73487
2016-12-27 15:26:01 +00:00
Hermès Bélusca-Maïto
a35a785b11 [SERVICES]: Add a *temporary* hack, as part of CORE-12541 and CORE-12279, that manually creates and loads the "LocalService" and "NetworkService" accounts and user profiles (and their registry hives), inspired from code from userenv.dll . This is done here until services can be correctly logged into the "LocalService" or "NetworkService" accounts (Eric is working on that), and their user profiles automatically properly created. When this is OK the hack will be removed and a proper call to "LoadUserProfile" in the code will be done where needed.
svn path=/trunk/; revision=73486
2016-12-27 15:06:23 +00:00
Hermès Bélusca-Maïto
1de5731e1e [ADVAPI32][LSA][IDL]: Fix the parameter type of some functions + fix associated LSA IDL file (ref: https://msdn.microsoft.com/en-us/library/cc234411.aspx )
svn path=/trunk/; revision=73484
2016-12-25 15:47:51 +00:00
Hermès Bélusca-Maïto
2a8a023851 [XDK][RTL]: Fix parameter of RtlUnicodeStringToCountedOemString (see r51875); add RtlUpcaseUnicodeStringToAnsiString into XDK.
svn path=/trunk/; revision=73483
2016-12-25 15:06:31 +00:00
James Tabor
c7dd36d8e1 [NtGDI]
- Turn off debug DC Bounds spam.

svn path=/trunk/; revision=73482
2016-12-23 18:42:47 +00:00
James Tabor
7f0fc1252d [NtGDI]
- Turn off debug DC Bounds spam.

svn path=/trunk/; revision=73481
2016-12-23 17:40:09 +00:00
Hermès Bélusca-Maïto
35f9007fc4 [KERNEL32]: Addendum to r73479: display the file that failed to be opened before releasing SxsWin32RelativePath as PathName might be equal to SxsWin32RelativePath.RelativeName. Spotted by Mark Jansen (actually he got it right at the beginning :) )
svn path=/trunk/; revision=73480
2016-12-23 11:43:21 +00:00
Hermès Bélusca-Maïto
a01ab28f62 [KERNEL32]: Improve SxS DPRINT info, based on Mark Jansen's suggestion. CORE-10524
svn path=/trunk/; revision=73479
2016-12-22 22:37:26 +00:00
Mark Jansen
21a0d64aa3 [CMD] Show the executed command in the title, do not restore the old title when it is modified. CORE-12586
svn path=/trunk/; revision=73478
2016-12-22 21:25:37 +00:00
Mark Jansen
11e9d57a30 [BOOTDATA] Update AHKAppTests.cmd to check all drives for the AHK-Tests. CORE-12597 #resolve
svn path=/trunk/; revision=73477
2016-12-22 20:51:38 +00:00
James Tabor
bb5564609a [Win32SS]
- Implement DC Bounds support. It's close to what wine does and passes thousands of tests. Still WIP. See CORE-11582.

svn path=/trunk/; revision=73476
2016-12-22 17:34:58 +00:00
James Tabor
527c11cf4d [Win32SS|RTL]
- Fix clipping for Draw Text. Inspired by Katayama Hirofumi MZ patch and ComCtl32/RichEd20/UxThmems. See CORE-2201.

svn path=/trunk/; revision=73475
2016-12-22 16:39:33 +00:00
James Tabor
7761bf28ba [User32|RTL]
- Move TEXT_TabbedTextOut back into User32.

svn path=/trunk/; revision=73474
2016-12-22 06:51:32 +00:00
Mark Jansen
bd37cb261c [KERNEL32] Re-enable Safer and AppCompat checks in CreateProcessInternalW. CORE-12585
svn path=/trunk/; revision=73473
2016-12-20 19:51:44 +00:00
James Tabor
974a6b6921 [NtGDI]
- Quick Hax to fix gray font anti-aliasing rendering, see CORE-7721.

svn path=/trunk/; revision=73472
2016-12-19 20:13:17 +00:00
James Tabor
8f83c019d3 [User32]
- Patch by Katayama Hirofumi MZ : DrawFrameControl draws bad, correct centering while drawing radio buttons. See CORE-12573.

svn path=/trunk/; revision=73471
2016-12-19 16:41:32 +00:00
James Tabor
30ff1f1032 [User32]
- Patch by Roman Pi?l : Fix buffer overflow in EDIT_EM_ReplaceSel().

svn path=/trunk/; revision=73470
2016-12-19 16:37:44 +00:00
James Tabor
1140838644 [User32]
- Patch by Andrey Gusev : Add support for WS_EX_RIGHT style.

svn path=/trunk/; revision=73469
2016-12-19 16:36:12 +00:00
James Tabor
833738127d [User32_API]
- Patch by Katayama Hirofumi MZ : Add a test for Next Dialog Item for radio buttons.

svn path=/trunk/; revision=73468
2016-12-19 16:28:42 +00:00
Amine Khaldi
ed41960b74 [RPCRT4] Properly stub RpcMgmtInqServerPrincName{A,W}. Tested by Jared Smudde. CORE-12465
svn path=/trunk/; revision=73467
2016-12-18 20:04:19 +00:00
Amine Khaldi
0d96052ca1 [INCLUDE] Fix a WIN32_WINNT => _WIN32_WINNT typo in some comments. Spotted by Serge Gautherie. CORE-12580
svn path=/trunk/; revision=73466
2016-12-18 17:57:51 +00:00
Mark Jansen
f1167250a0 [ATL][ATL_APITEST] Add GetEnvironmentVariable to CString. CORE-12581
svn path=/trunk/; revision=73465
2016-12-17 19:38:08 +00:00
Mark Jansen
71d5b09683 [SDK] Add Resolution/Bitdepth shims + layers to the appcompat database. CORE-11927 #resolve
svn path=/trunk/; revision=73464
2016-12-16 22:13:01 +00:00
Mark Jansen
f3f43843fe [ACGENRAL] Implement the DisableThemes shim. CORE-11927
svn path=/trunk/; revision=73463
2016-12-16 22:05:58 +00:00
Mark Jansen
b7add401e9 [ACLAYERS] Implement Force8BitColor and Force640x480 shims. CORE-11927
svn path=/trunk/; revision=73462
2016-12-16 21:54:06 +00:00
Mark Jansen
3da415c457 [SHIMLIB] Shim helper functions keep a list of used shims, so that events can be forwarded. CORE-11329
svn path=/trunk/; revision=73461
2016-12-16 19:18:26 +00:00
Giannis Adamopoulos
fa047badd1 [PSDK] -Add some definitions needed by the previous commit.
svn path=/trunk/; revision=73460
2016-12-16 10:39:16 +00:00
Giannis Adamopoulos
668ef9aa19 [SHELL32] - CNetFolder: Fix opening items which was broken after having a callback for the default context menu became mandatory.
svn path=/trunk/; revision=73459
2016-12-16 10:31:13 +00:00
Hermès Bélusca-Maïto
a54d1167e4 [APITESTS]: Add a test for userenv.dll API Load/UnloadUserProfile.
CORE-12541

svn path=/trunk/; revision=73458
2016-12-15 18:44:47 +00:00
Hermès Bélusca-Maïto
17b4930a9d [NETAPI32]: Fix misusage of a pointer, that caused a crash when using the command "net localgroup". Address one of the problems described in CORE-11081.
Note that those ((ULONG_PTR)the_pointer + sizeof(type_pointed_by_the_pointer)) could be somewhat short cut into: (the_pointer + 1) (with the_pointer being of type *type_pointed_by_the_pointer). But anyway...

svn path=/trunk/; revision=73457
2016-12-15 14:45:58 +00:00
Hermès Bélusca-Maïto
ea3f263fca [NET]: Correct one entry in the help list of commands.
svn path=/trunk/; revision=73456
2016-12-15 13:00:06 +00:00
Robert Naumann
399406609d [MSTSC] Decrease the size of the header font as it was cropped in some languages.
svn path=/trunk/; revision=73455
2016-12-14 21:10:35 +00:00
Mark Jansen
f62aa585d6 [USRMGR] Load 32bit icons for groups tab. Patch by Jared Smudde. CORE-12547 #resolve #comment Thanks!
svn path=/trunk/; revision=73454
2016-12-14 20:33:39 +00:00
Mark Jansen
3180d93edf [APPSHIM_APITEST] Update display mode shim tests to show some difference in versions + add extra tests. CORE-11927
svn path=/trunk/; revision=73453
2016-12-14 19:19:57 +00:00
Mark Jansen
80d548b608 [REGEDIT] Make the UpdateStatusBar function actually update the statusbar, instead of sending garbage to the treeview. CORE-10803
svn path=/trunk/; revision=73452
2016-12-13 21:47:22 +00:00
James Tabor
c88489858d [User32]
- Patch by Katayama Hirofumi MZ : DrawFrameControl draws bad. See CORE-12573.

svn path=/trunk/; revision=73451
2016-12-13 17:49:34 +00:00
James Tabor
d41da9f33b [User32]
- Sync/Port wine UI code for drawing.

svn path=/trunk/; revision=73450
2016-12-13 17:27:37 +00:00
Pierre Schweitzer
0afae481fa [NET/USE]
On enumeration, don't print raw status

svn path=/trunk/; revision=73449
2016-12-11 10:23:02 +00:00
Pierre Schweitzer
332071647d [NET/USE]
Get rid of COUNT_OF

svn path=/trunk/; revision=73448
2016-12-11 09:15:16 +00:00
Pierre Schweitzer
fb4e02aa90 [NET/USE]
Allow some strings to be translated

svn path=/trunk/; revision=73447
2016-12-11 09:01:22 +00:00
Pierre Schweitzer
270d0ba79a [NET/USE]
In case of an error, display the error message.

svn path=/trunk/; revision=73446
2016-12-10 22:12:53 +00:00
Thomas Faber
762bec692a [KMTESTS]
- Add a missing newline

svn path=/trunk/; revision=73445
2016-12-10 11:59:41 +00:00
Giannis Adamopoulos
744f1fb179 [SHELL32]
- Add a separate string for the unknown file types and rename the first column to Name from File.
- Note to translators: Please update translations based on the changes in the English strings.
Patch by Amber.
CORE-12530

svn path=/trunk/; revision=73444
2016-12-09 21:31:23 +00:00
Giannis Adamopoulos
14a6ac2ce8 [BOOT] LiveCD: Create all profile subdirectories that Shell wants. Patch by Serge Gautherie. CORE-12527
svn path=/trunk/; revision=73443
2016-12-09 20:40:52 +00:00
Giannis Adamopoulos
7e9b3d61c0 [SETUPAPI] - Add missing error checks in do_file_copyW. Patch by Carlo Bramini. CORE-12471
svn path=/trunk/; revision=73442
2016-12-09 18:39:11 +00:00
Giannis Adamopoulos
3bee65b985 [USETUP] -Fix setting the language id when compiling for a single language. CORE-10958
svn path=/trunk/; revision=73441
2016-12-09 18:30:50 +00:00
Hermès Bélusca-Maïto
74b479fa67 [USERENV]
- Use a better variable type for the 'Environment' parameter of SetUserEnvironmentVariable, AppendUserEnvironmentVariable, SetUserEnvironment, SetSystemEnvironment, so as to avoid useless casts.
- Add old-style parameter annotations for exported functions (at least);
- Add an implementation comment about setting HOMEDRIVE/HOMEPATH;
- Use ARRAYSIZE() instead of hardcoded buffer sizes;
- Don't say that GetShortPathNameW() failed when it succeeds;
- Use standard capitalization for hardcoded environment variables.

svn path=/trunk/; revision=73440
2016-12-08 16:12:59 +00:00
Hermès Bélusca-Maïto
b0107a6173 [USERENV]: Code formatting
svn path=/trunk/; revision=73439
2016-12-08 16:08:59 +00:00
Giannis Adamopoulos
d6e721c82f [SHELL32] - CDefView: Remove some todo comments that are done.
svn path=/trunk/; revision=73438
2016-12-07 15:43:17 +00:00
Giannis Adamopoulos
af810e862f [SHELL32] - Initialize the shell icon cache only when needed or when FileIconInit is called (and not in the DllMain of shell32)
svn path=/trunk/; revision=73436
2016-12-07 00:10:43 +00:00
Hermès Bélusca-Maïto
0b5c61d493 [SERVICES]: Addendum to r73433 for ScmStartUserModeService:
- Use the correct capitalization for the desktop name (to be consistent with all the rest of our code);
- Fix DPRINT1 order of arguments;
- Reorganize a bit the code to avoid the memory leak if ImpersonateLoggedOnUser fails and the environment block was already allocated (caught by Ged Murphy).
CORE-12414

svn path=/trunk/; revision=73435
2016-12-06 23:01:27 +00:00
Mark Jansen
54e99fcd1b [SHELL32] Don't call CoInitialize in DllMain, bad things happen when calling into dll's that are being loaded! CORE-12443 #comment Please retest!
svn path=/trunk/; revision=73434
2016-12-06 21:18:17 +00:00
Eric Kohl
cce01fa95c [SERVICES]
Create a new environment block when a service process is started.
Patch by Hermès BÉLUSCA - MAÏTO.
CORE-12414

svn path=/trunk/; revision=73433
2016-12-06 17:29:30 +00:00
Hermès Bélusca-Maïto
c5e734fdd8 Fix for source code file header, sorry for commit noise.
svn path=/trunk/; revision=73432
2016-12-05 16:38:11 +00:00
Hermès Bélusca-Maïto
aadba539ce [ADVAPI32_APITEST]: Test for a (correctly initialized) service process environment block, that should contain both ALLUSERSPROFILE and USERPROFILE environment variables.
CORE-12414

svn path=/trunk/; revision=73431
2016-12-05 16:36:06 +00:00
Hermès Bélusca-Maïto
8e18f1fbd9 [ADVAPI32_APITEST]: Add a small helper lib 'svchlp' for common routines for test-services embedded in api tests. Taken & heavily adapted from Jacek Caban's services_service test and Thomas Faber's ServiceArgs.c (the latter will be able to use 'svchlp' when it'll be ready).
CORE-12414

svn path=/trunk/; revision=73430
2016-12-05 16:22:30 +00:00
Sylvain Petreolle
ab777da1ae [BROWSEUI]
Fix CShellBrowser window class name,
shown by shell32:progman_dde and AHK_Diablo_1.0:1.install

svn path=/trunk/; revision=73429
2016-12-04 23:33:19 +00:00
Hermès Bélusca-Maïto
2299a44489 [NTDLL]: Export _wcstoui64 (as done in Win2k3). Prototype from msvcrt. CORE-12534
svn path=/trunk/; revision=73428
2016-12-04 22:52:03 +00:00
Hermès Bélusca-Maïto
b193d7bdfb [NTDLL]: Add proper stubs for EtwpGetTraceBuffer and EtwpSetHWConfigFunction, needed for CORE-12534.
[NTDLL][ADVAPI32]: Improve the prototypes for EtwReceiveNotificationsA/WmiReceiveNotificationsA and EtwReceiveNotificationsW/WmiReceiveNotificationsW.

svn path=/trunk/; revision=73427
2016-12-04 22:44:37 +00:00
Hermès Bélusca-Maïto
23e508dc18 [ADVAPI32_APITEST]: Rename the 'LockDatabase' test to 'LockServiceDatabase' to better match the name of the API.
svn path=/trunk/; revision=73426
2016-12-04 18:41:46 +00:00
Hermès Bélusca-Maïto
8cd23c3dc0 [USERENV]: Use ARRAYSIZE instead of hardcoding the sizes of the static buffers.
svn path=/trunk/; revision=73425
2016-12-04 18:28:33 +00:00
Mark Jansen
a55106da83 [DESK] Fix theme preview for Win7. Patch by Carlo Bramini. CORE-10076 #resolve #comment Thanks!
svn path=/trunk/; revision=73424
2016-12-04 16:52:22 +00:00
Eric Kohl
46bbe29d9e [INCLUDE]
Add  CreateUserProfileExA and  CreateUserProfileExW prototypes to userenv.h.

svn path=/trunk/; revision=73423
2016-12-04 15:56:44 +00:00
Mark Jansen
f0d4850705 [APPSHIM_APITEST] Add tests for the DisableThemes shim. CORE-11927
svn path=/trunk/; revision=73422
2016-12-04 15:33:28 +00:00
Mark Jansen
d39ff22033 [APPSHIM_APITEST] Add tests for display mode shims. CORE-11927
svn path=/trunk/; revision=73421
2016-12-03 21:24:47 +00:00
Eric Kohl
16093a084c [SERVICES]
- Code cleanup.
- ScmCreateOrReferenceServiceImage() and ScmDereferenceServiceImage(): Close the logon token and service process handles properly.
- ScmStartUserModeService(): Store the service process handle in the SERVICE_IMAGE struct.
Patch by Hermès BÉLUSCA - MAÏTO.

svn path=/trunk/; revision=73420
2016-12-03 14:33:07 +00:00
Eric Kohl
3e44ec76e4 [SERVICES]
Tiny fixes.
One fix found by Serge Gautherie.

svn path=/trunk/; revision=73419
2016-12-03 13:54:11 +00:00
Eric Kohl
3ee27dbe81 [SERVICES]
Add more parameter checks to RChangeServiceConfigW().

svn path=/trunk/; revision=73418
2016-12-03 12:55:29 +00:00
Eric Kohl
ae1c49c382 [SERVICES]
Implement large parts of RI_ScGetCurrentGroupStateW.

svn path=/trunk/; revision=73417
2016-12-03 12:48:44 +00:00
Eric Kohl
974f97cce5 [SERVICES]
- Get rid of the obsolete USE_SERVICE_START_PENDING option.
- Services do not accept any command when they are in SERVICE_START_PENDING state.
Patch by Hermès BÉLUSCA - MAÏTO.

svn path=/trunk/; revision=73416
2016-12-03 09:33:03 +00:00
Robert Naumann
3d7ae255a1 [TIMEDATE] Update/Fix German and French resource files. Patch by Joachim Henze and Kyle Katarn. CORE-12369
svn path=/trunk/; revision=73415
2016-12-02 22:36:21 +00:00
Robert Naumann
327d464e0c [RAPPS][USERINIT][HIVECLS] Add/Update Italian translation. Patches by Carlo Bramini. Thanks. CORE-9725 #comment rapps_new and usrmgr were not appliable, please check your patches. The others were committed in r73414
svn path=/trunk/; revision=73414
2016-12-02 22:22:28 +00:00
Hermès Bélusca-Maïto
0d21c76ef1 [ROSTESTS]: advapi32_apitest: Add a test to extensively test services command-line arguments. By Thomas Faber.
[ADVAPI32]: Correctly set up both the ANSI and UNICODE service command-line arguments. Adapted from a patch by Thomas Faber. Thanks!

[SERVICES]
- Correctly pack the service command-line arguments in the control packet structure. In particular, the offsets stored in the vector are relative to the beginning of the vector (and not relative to the previous offset ^^). Improve comments...
- Fix the definition of the SCM_CONTROL_PACKET control packet structure to make it Win2k3-compatible, so that we can use Win2k3' advapi32.dll or services.exe on ReactOS and vice-versa.

CORE-9235 CORE-9838

svn path=/trunk/; revision=73413
2016-12-02 20:01:29 +00:00
Robert Naumann
b687b6775f [NETSHELL]Add Japanese translation. Patch by Katayama Hirofumi MZ. Thanks. CORE-12514
svn path=/trunk/; revision=73412
2016-12-01 21:09:47 +00:00
Robert Naumann
e5d67ba90e [RUNONCE] Add Italian translation. Patch by Carlo Bramini. Thanks. CORE-12488
svn path=/trunk/; revision=73411
2016-12-01 21:06:38 +00:00
Mark Jansen
7b0c55ea0c This does not belong here.
svn path=/trunk/; revision=73410
2016-11-30 20:39:06 +00:00
Mark Jansen
0744770ebe [NETSHELL] Implement NcIsValidConnectionName + tests. Patch by Jared Smudde, modified by me. CORE-11320 #resolve
svn path=/trunk/; revision=73409
2016-11-30 20:31:50 +00:00
Giannis Adamopoulos
f9e5da10de Fix build.
svn path=/trunk/; revision=73408
2016-11-29 18:01:35 +00:00
Giannis Adamopoulos
4c9e684463 [SHELL32] - CDefViewBckgrndMenu: Shell_MergeMenus doesn't handle items added by shell extensions correctly so let the folder IContextMenu add its items directly in the menu. CORE-12508
svn path=/trunk/; revision=73407
2016-11-29 17:56:04 +00:00
Giannis Adamopoulos
29310d6f92 [SHELL32] - CDefaultContextMenu::QueryContextMenu : Implement CMF_VERBSONLY flag (needs tests). CORE-11488 (and all its duplicates)
svn path=/trunk/; revision=73406
2016-11-29 15:44:19 +00:00
Giannis Adamopoulos
99548a5a34 [SHELL32]
- CDefViewBckgrndMenu : Add class to handle the background menu of the CDefView and handle stuff that previously were handled by CDefaultContextMenu. Let the shell folders fill their own part of the background context menu.
- CDefView: Create a CDefViewBckgrndMenu instead of a CDefaultContextMenu which was completely wrong.
- CDesktopFolder, CFSFolder: Implement returning the background context menu in CreateViewObject. Note that I am not completely sure that the callback should be adding the Properties item.
- CDefaultContextMenu: Remove code that was moved to CDefViewBckgrndMenu and try to improve the overzealous debug prints regarding the shell extensions.
CORE-12410, CORE-12472

svn path=/trunk/; revision=73405
2016-11-29 15:38:55 +00:00
Giannis Adamopoulos
aab0fd5e9d [SHELL32_APITEST] -Test if CFSFolder::GetUIObjectOf can return an IDataObject for 0 cidl.
svn path=/trunk/; revision=73404
2016-11-29 13:27:21 +00:00
James Tabor
8fc6f71e55 [Win32SS]
- Revert HAX : Fix validating region with null. See CORE-12169 and related issues.

svn path=/trunk/; revision=73403
2016-11-28 16:48:39 +00:00
Hermès Bélusca-Maïto
d73bbf218c [SERVICES]:
- Fix build.
- Remove now deprecated code (since we use RPC for service commands since revision r13xxx).

svn path=/trunk/; revision=73402
2016-11-27 20:44:09 +00:00
Hermès Bélusca-Maïto
49284f4696 [SERVICES]
- The new ScmDeleteServiceKey (r73400) and the already existing ScmDeleteRegKey are the same functions: remove the old ScmDeleteRegKey and use ScmDeleteServiceKey instead AND rename ScmDeleteServiceKey to ScmDeleteRegKey (as it can be used generically within services.exe).
- Call RegDeleteKeyW for the subkey after we have closed its opened handle.

svn path=/trunk/; revision=73401
2016-11-27 20:39:10 +00:00
Eric Kohl
a96ca3a4c1 [SERVICES]
Delete service registry keys recursively.

svn path=/trunk/; revision=73400
2016-11-27 20:12:39 +00:00
Pierre Schweitzer
bb759c3378 [NTOSKRNL]
Don't leak FO reference on failure.
Fixes kmtest:NtCreateSection unloading.
Dedicated to Thomas.

CORE-11819
CORE-12475

svn path=/trunk/; revision=73399
2016-11-27 20:11:30 +00:00
Mark Jansen
26627a49b0 [APPHELP][APPHELP_APITEST] Stub ApphelpCheckShellObject + add tests, based on the work of Mislav Blažević. CORE-12476
svn path=/trunk/; revision=73398
2016-11-27 18:33:21 +00:00
Eric Kohl
7fe41a4b39 [SERVICES]
RQueryServiceStatusEx and REnumServicesStatusExW: This way it make a lot more sense!

svn path=/trunk/; revision=73397
2016-11-27 15:49:05 +00:00
Eric Kohl
183b495907 [SERVICES]
REnumServicesStatusExW/W and RQueryServiceStatusEx should not return a non-zero process ID for a stopped service.

svn path=/trunk/; revision=73396
2016-11-27 15:24:49 +00:00
Pierre Schweitzer
444775e662 [KMTESTS:MM]
Test FCB header fields: FileSize, ValidDataLength

CORE-11819
CORE-12475

svn path=/trunk/; revision=73395
2016-11-27 13:39:01 +00:00
Eric Kohl
a6eabc0043 [SETUPAPI]
Partial implementation of CMP_RegisterNotification and CMP_UnregisterNotification.

[UMPNPMGR]
Partial implementation of PNP_RegisterNotification and PNP_UnregisterNotification.

CORE-12217 #comment This should fix one of the issues.

svn path=/trunk/; revision=73394
2016-11-27 11:14:25 +00:00
Pierre Schweitzer
a3dbf1b448 [KMTESTS:MM]
Playing with EOF shouldn't make you forget EOL!
Addendum to r73392

svn path=/trunk/; revision=73393
2016-11-27 10:56:40 +00:00
Pierre Schweitzer
695beeee78 [KMTESTS:MM]
Check the first byte is really null, in spite of the hack writing.

CORE-11819
CORE-12475

svn path=/trunk/; revision=73392
2016-11-27 10:49:33 +00:00
Pierre Schweitzer
22f4acf925 [NTOSKRNL]
Don't write random byte. Force a value so that it can be easily recognized.

CORE-11819
CORE-12475

svn path=/trunk/; revision=73391
2016-11-27 10:27:43 +00:00
Robert Naumann
3bbcc2cbbe [TRANSLATION] Massive resource maintenance update. 2 oatches by Ștefan Fulea. Thank you! CORE-12326
svn path=/trunk/; revision=73390
2016-11-27 00:15:02 +00:00
Robert Naumann
01d077b3e0 [MODE] Add Russiam Translation. Based on a patch by Nikolay Burshtyn. Thank you. CORE-12202
svn path=/trunk/; revision=73389
2016-11-26 23:58:07 +00:00
Robert Naumann
0cc4d22bd3 [USETUP] Update Russian translation. Patch by Nikolay Burshtyn. Thank you! CORE-12154
svn path=/trunk/; revision=73388
2016-11-26 23:47:36 +00:00
Robert Naumann
ef4075bbc4 [GETUNAME] Update Definitions for GetUName to Unicode 8.0. Patch by Baruch Rutman. Thanks a lot! CORE-10722
svn path=/trunk/; revision=73387
2016-11-26 23:25:14 +00:00
Robert Naumann
e993655cf8 [SHELL32] Update Japanese translation. Patch by Katayama Hirofumi MZ. Thank you!
svn path=/trunk/; revision=73386
2016-11-26 23:10:22 +00:00
Robert Naumann
9b73cb030e [SETUP/REACTOS] Add Japanese translation. Patch by Katayama Hirofumi MZ. Thank you. CORE-12459
svn path=/trunk/; revision=73385
2016-11-26 23:05:54 +00:00
Pierre Schweitzer
3ff70dc5d5 [NTOSKRNL]
A hack has gained enough XP and levels up! Congratulations to the MmCreateSection() in charge of forcing file cache initialization.
As show by kmtest:NtCreateSection tests and real world FSD (starting with MS FastFAT and Ext2Fsd), caching of a file can be initialized rather late (ie, on first effective read/write).
That means that our current hack is totally opless on newly created files with 0-size where the IRP_MJ_READ is most of the time opless too.
The hack, thanks to its level up, can now force a write (1-byte) in case read was unsuccessful and end of file.
In other words, this is the hack of a hack (and a hack v2).
It fixes a few failing kmtests.
Thomas, Peter, please retry the FSDs on which you are currently working on and report. Thanks :-)

CORE-11819
CORE-12475

svn path=/trunk/; revision=73384
2016-11-26 22:39:08 +00:00
Thomas Faber
89c3520c86 [PSDK][XDK]
- Automatically define __ROS_LONG64__ on LP64 systems. This makes no difference for ROS but makes things easier for downstream users of our headers.
 Patch by Cat Zimmermann.

svn path=/trunk/; revision=73383
2016-11-26 18:33:08 +00:00
Amine Khaldi
fb4c861add [WINMM] Properly stub some gfx* functions for Windows mmsys. Addendum to r73381. CORE-12466
svn path=/trunk/; revision=73382
2016-11-26 18:20:25 +00:00
Mark Jansen
0c81653dc2 [WINMM] Stub some gfx* functions for Windows mmsys. Patch by Jared Smudde. CORE-12466 #resolve #comment Thanks!
svn path=/trunk/; revision=73381
2016-11-26 18:12:08 +00:00
Thomas Faber
7e8e4427bf [SHDOCVW]
- Improve stub for _GetStdLocation. Patch by Jared Smudde.
CORE-12467 #resolve

svn path=/trunk/; revision=73380
2016-11-26 17:55:23 +00:00
Pierre Schweitzer
6ca897b261 [SHELL32]
Don't truncate text in French translation.
Patch by Joachim Henze (reactosfanboy)

CORE-12308

svn path=/trunk/; revision=73379
2016-11-26 10:07:57 +00:00
Pierre Schweitzer
7837d0dd2b [NTOSKRNL]
Revert r73376.

CORE-12238

svn path=/trunk/; revision=73378
2016-11-25 22:39:49 +00:00
Mark Jansen
3008f14a0d [REGEDIT] Do not try to dereference a pointer when it is NULL. CORE-11915
svn path=/trunk/; revision=73377
2016-11-25 22:16:39 +00:00
Pierre Schweitzer
b671384719 [NTOSKRNL]
Remove old hacks which seem no longer required

svn path=/trunk/; revision=73376
2016-11-25 21:47:34 +00:00
Christoph von Wittich
4cc7823baf [WINSTA] fix declaration of WinStationQueryInformationA
svn path=/trunk/; revision=73375
2016-11-25 12:48:55 +00:00
Colin Finck
c4a61ec7f2 Fix GCC build
svn path=/trunk/; revision=73374
2016-11-24 19:35:08 +00:00
Colin Finck
65212f3682 [LOCALSPL]
Tests show that the Print Provider functions are less forgiving and expect winspool.drv and spoolss.dll to perform the necessary sanity checks.
Also they don't default to the current environment if none was supplied as pEnvironment. Change our functions accordingly to pass the tests.

[LOCALSPL_APITEST]
Add a test to prove that spoolss.dll isn't just a forwarder, but also performs some sanity checks even though winspool.drv and localspl.dll also do.
This rather belongs to spoolss_apitest. But it needs to be tested inside the Spooler Server Process and it's not worth it to copy all the DLL injection code to spoolss_apitest just for a single test.

[SPOOLSS]
Check for an invalid buffer in GetPrintProcessorDirectoryW.

[WINSPOOL]
* Check the level before the RPC call in GetPrintProcessorDirectoryW.
* Supply our current environment if the caller didn't give any in EnumPrintProcessorsW and GetPrintProcessorDirectoryW.
* Implement GetPrintProcessorDirectoryA.

[WINSPOOL_APITEST]
Prove that pcbNeeded isn't touched when calling GetPrintProcessorDirectoryW with an invalid level.


ReactOS now passes all API tests for GetPrintProcessorDirectoryA and GetPrintProcessorDirectoryW. These tests also cover all known behaviors of both functions.
CORE-12399

svn path=/trunk/; revision=73373
2016-11-24 19:24:27 +00:00
James Tabor
03c1491725 [Win32SS]
- HAX : Fix paint message spam. See CORE-12169 and related issues.

svn path=/trunk/; revision=73372
2016-11-24 18:18:28 +00:00
Colin Finck
fbf2c84e20 [SPOOLSS]
Fix CONTAINING_RECORD calls for spoolss functions that map directly to localspl.
An innovative way to fail the RPC stack...

CORE-12449

svn path=/trunk/; revision=73371
2016-11-24 14:38:39 +00:00
Amine Khaldi
4a949013d2 [MSTSC] Addendum to r73368. Peter, please review. CORE-9321
svn path=/trunk/; revision=73370
2016-11-24 11:16:56 +00:00
Amine Khaldi
05ea8d2099 [README.WINE] Mark some DX dlls as synced with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73369
2016-11-24 10:59:01 +00:00
Peter Hater
a26ebfa365 [MSTSC] Add schannel based SSL implementation. CORE-9321
svn path=/trunk/; revision=73368
2016-11-24 10:56:09 +00:00
Sylvain Petreolle
c253b1d7bc [INCLUDES/WINE][DBGHELP]
Remove the rbtree.h difference with Wine Staging 1.9.23. CORE-12409


svn path=/trunk/; revision=73367
2016-11-23 21:33:54 +00:00
Amine Khaldi
f445cac180 [D3DX9_33] We don't need these here as d3dx9_36 already has them.
svn path=/trunk/; revision=73366
2016-11-23 18:43:17 +00:00
Amine Khaldi
8eb8e09554 [UXTHEME] Reduce difference with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73365
2016-11-23 18:38:48 +00:00
Pierre Schweitzer
46fc7b685b [LOCALMON]
Add French translation.

CORE-12363

svn path=/trunk/; revision=73364
2016-11-23 18:29:40 +00:00
Amine Khaldi
42eafa71ae [CDFS] Fix a thinko.
svn path=/trunk/; revision=73363
2016-11-23 18:27:07 +00:00
Pierre Schweitzer
c3b22d159c [FASTFAT]
In IRP_MJ_QUERY_INFORMATION/IRP_MJ_SET_INFORMATION, handle the case when we receive buggy FO without FCB.
This fixes bugchecks when using FileSpy.

CORE-12448

svn path=/trunk/; revision=73362
2016-11-23 18:21:03 +00:00
Amine Khaldi
07d9832b5f [WININET_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73361
2016-11-23 18:11:04 +00:00
Amine Khaldi
f11a6d6c2c [WININET] Sync with Wine Staging 1.9.23. CORE-12409
4695681 wininet: add ParseX509EncodedCertificateForListBoxEntry stub (try 2)
e3e4fc6 wininet: Add support for INTERNET_OPTION_SETTINGS_CHANGED in InternetSetOption.
4a728d2 wininet: Allow INTERNET_OPTION_SETTINGS_CHANGED on connections.
8478c72 wininet: Resize buffer when call to InternetCanonicalizeUrlW fails in InternetCrackUrlW.
3d6da00 wininet: Handle INTERNET_INVALID_PORT_NUMBER in HttpOpenRequest.
dee155f wininet: Replacing header fields should fail if they do not exist yet.
efd7d44 wininet: Strip filename if no path is set in cookie.
65f5d89 wininet: Silence wininet no support on this platform message.
3cb027c wininet: Increase buffer in _test_status_code to avoid potential potential overflow.
7e84143 wininet: Don't crash by debug printing too long URLs.
7d9a439 wininet: Don't return available data sizes larger than the read buffer.

svn path=/trunk/; revision=73360
2016-11-23 18:09:57 +00:00
James Tabor
6f403240d9 [User32]
- Fix dialog pop up flicker. Regression from 73333.

svn path=/trunk/; revision=73359
2016-11-23 15:42:05 +00:00
Amine Khaldi
58a1e88856 [WINHTTP_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73358
2016-11-23 12:00:25 +00:00
Amine Khaldi
4a404e8b55 [WINHTTP] Sync with Wine Staging 1.9.23. CORE-12409
e27ff36 winhttp: Added WINHTTP_OPTION_CLIENT_CERT_CONTEXT option stub.
9bc3e96 winhttp: Added WINHTTP_OPTION_MAX_CONNS_PER_SERVER and WINHTTP_OPTION_MAX_CONNS_PER_1_0_SERVER options stub.
c8b166e winhttp: Also pass hostname to jsproxy.
668d429 winhttp: Indicate that WinHttpCrackUrl should return string pointers.
985443e winhttp: Don't perform buffer size tests for components that don't pass buffer in WinHttpCrackUrl.
17b4abf winhttp: Validate the port number in WinHttpCrackUrl.
1d07f89 winhttp: Set required buffer length for all components in WinHttpCrackUrl.
6c0fdc0 winhttp: Prevent console spamming in get_system_proxy_autoconfig_url.

svn path=/trunk/; revision=73357
2016-11-23 11:59:10 +00:00
Thomas Faber
8c2649b3fe [ACPI]
- Do not assert phys in AcpiOsMapMemory. Patch by Giovanni Mascellani (gio at debian dot org).
CORE-12444 #resolve

svn path=/trunk/; revision=73356
2016-11-23 11:57:52 +00:00
Amine Khaldi
f5a2b4ee5d [JSCRIPT_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73355
2016-11-23 10:09:03 +00:00
Amine Khaldi
a7a057e3a2 [JSCRIPT] Sync with Wine Staging 1.9.23. Dedicated to Ged. CORE-12409
7af3f65 jscript: Add more jsdisp_t to Instance helpers.
55f6e3c jscript: Use the existing helpers to get from a jsdisp_t to an Instance.
0f21353 jscript: Use wine_rb_tree to store local variables in compiler_ctx_t.
fc1ae4f jscript: Use CONTAINING_RECORD() to get from a field to a struct.
57291c4 jscript: Simplify create_utc_string and add basic tests.
20d5bba jscript: Simplify date_to_string and add basic tests.
4d67ffd jscript: Allocate string of correct size in Date toLocaleDateString method.
79f18d0 jscript: Properly handle \0 characters in Array join method.
fd07a15 jscript: Allocate string of correct size in Date toTimeString method.
1c3e0dd jscript: Properly handle \0 characters in String indexOf method.
54e6736 jscript: Properly handle \0 characters in String to{Lower,Upper}Case methods.
1842082 jscript: Do not include terminating \0 in result returned by Date_toLocale{Date,Time}String.
69437af jscript: Change prototype of jsstr_alloc_buf and fix some error handling issues.
d36ae56 jscript: Fix definition of JSSTR_MAX_LENGTH.
7369836 jscript: Simplify jsstr_release implementation.

svn path=/trunk/; revision=73354
2016-11-23 10:06:56 +00:00
Amine Khaldi
e98102ef8a [CRYPT32] Bring back the code path that had r64026 and r66349 until we adapt our changes to the new code. CORE-12409 CORE-12446
svn path=/trunk/; revision=73353
2016-11-23 09:22:56 +00:00
Ged Murphy
dc7472be71 [NTOS]
- Fix an assert in MiFindExportedRoutineByName to be something more like what the original author probably wanted to do.
- This allows FileSpy to run successfully with the legacy filter driver
- https://postimg.org/image/7z73xy4pd/

svn path=/trunk/; revision=73352
2016-11-22 22:30:55 +00:00
Amine Khaldi
e6d204ac42 [WINDOWSCODECS] Addendum to r73303. CORE-12409
svn path=/trunk/; revision=73351
2016-11-22 18:10:59 +00:00
Amine Khaldi
9a6c74a856 [DBGHELP] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73350
2016-11-22 18:03:01 +00:00
Amine Khaldi
595348341e [INCLUDES/WINE] Attempt to please the linux builder.
svn path=/trunk/; revision=73349
2016-11-22 17:42:41 +00:00
Amine Khaldi
c4dbe78cac [INCLUDES/WINE] Update rbtree.h. [D3DCOMPILER_43][DBGHELP][WINED3D] Reflect the rbtree.h changes. CORE-12409
svn path=/trunk/; revision=73348
2016-11-22 17:23:40 +00:00
Amine Khaldi
81461b5470 [CRYPT32_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73347
2016-11-22 17:09:34 +00:00
Amine Khaldi
112dfc045f [CRYPT32] Sync with Wine Staging 1.9.23. Jérôme, please review as we no longer have r64026 and r66349 with this. CORE-12409
svn path=/trunk/; revision=73346
2016-11-22 17:05:59 +00:00
Amine Khaldi
2324378c5e [OLEDLG] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73345
2016-11-22 13:14:51 +00:00
Amine Khaldi
6b17088fa1 [RPCRT4_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73344
2016-11-22 13:13:22 +00:00
Amine Khaldi
0f3ce680b5 [RPCRT4] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73343
2016-11-22 13:11:44 +00:00
Peter Hater
2dc688c68b [WSHTCPIP] Implement SIO_GET_INTERFACE_LIST by Andreas Maier aka andy-123. Thanks. CORE-10343
svn path=/trunk/; revision=73342
2016-11-22 12:45:41 +00:00
Amine Khaldi
b0a8d568d9 [OLE32] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73341
2016-11-22 12:30:48 +00:00
Amine Khaldi
6c3bba2b11 [MSI_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73340
2016-11-22 12:26:43 +00:00
Amine Khaldi
687517808b [MSI] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73339
2016-11-22 12:25:27 +00:00
Amine Khaldi
08824abdc1 [COMDLG32_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73338
2016-11-22 12:17:19 +00:00
Amine Khaldi
9bf7b57fd1 [COMDLG32] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73337
2016-11-22 12:15:51 +00:00
Amine Khaldi
722d054541 [COMCTL32_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73336
2016-11-22 12:11:38 +00:00
Amine Khaldi
fe25cf50e9 [COMCTL32] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73335
2016-11-22 12:10:28 +00:00
James Tabor
b45fe0d55c [Win32SS]
- Patch by Katayama Hirofumi MZ : Improves NC_IconForWindow function. See CORE-12129.

svn path=/trunk/; revision=73334
2016-11-22 04:46:58 +00:00
James Tabor
20637bd50c [User32]
- Fix dialog pop up crash due to loop.
- Sync/Port from wine head, not sure about Staging.

svn path=/trunk/; revision=73333
2016-11-22 03:57:48 +00:00
James Tabor
4027329c6a [User32]
- Patch by Katayama Hirofumi MZ  : Improve task switcher's appearance.
-    Debugged Alt+Esc
-    Pixel perfect
-    Implemented "Display Item Shifting"
-    Added comments.

svn path=/trunk/; revision=73332
2016-11-22 03:54:55 +00:00
Hermès Bélusca-Maïto
ff16e0a2fc [LSASRV]: Use LsapAllocateHeapZero to initialize the AllocateLsaHeap member of the LSA auth DispatchTable. Should fix login (this means some of the code calling DispatchTable->AllocateLsaHeap expect zero-initialized memory). Addendum to r73330.
CORE-12432

svn path=/trunk/; revision=73331
2016-11-21 14:42:14 +00:00
Hermès Bélusca-Maïto
4fc25ae9f2 [LSASRV]: Implement a simplified version of LsaIAllocateHeap / LsaIAllocateHeapZero / LsaIFreeHeap.
CORE-12432

svn path=/trunk/; revision=73330
2016-11-20 23:53:49 +00:00
Hermès Bélusca-Maïto
a310f53b84 [LSASRV]: Whitespace fixes only.
svn path=/trunk/; revision=73329
2016-11-20 23:53:10 +00:00
Pierre Schweitzer
9951d766cc [KMTESTS:MM]
This tests doesn't fail anylonger on ReactOS (not sure which rev fixed it)

ROSTESTS-108

svn path=/trunk/; revision=73328
2016-11-20 20:58:22 +00:00
Pierre Schweitzer
d36b97a1dc [NTOSKRNL]
When we're really not able to init cache for creating a file section, return the appropriate status code

svn path=/trunk/; revision=73327
2016-11-20 20:55:17 +00:00
Pierre Schweitzer
49691778cd [KMTESTS:MM]
Thanks to r73325, these tests don't deadlock anymore on ReactOS. Enable them again (aka, revert r73227).

ROSTESTS-248

svn path=/trunk/; revision=73326
2016-11-20 18:42:15 +00:00
Pierre Schweitzer
d3a5befca6 [NTOSKRNL]
When creating a new VACB, compare file offset to section size and not to file size.
This fixes regression from r73199 where file size isn't changed anylonger, but section size is.

CORE-12430
ROSTESTS-248

svn path=/trunk/; revision=73325
2016-11-20 18:39:17 +00:00
Amine Khaldi
d14a8724c0 [UNIATA] Update to v0.46e1. CORE-11451
svn path=/trunk/; revision=73324
2016-11-20 15:58:03 +00:00
Pierre Schweitzer
c5ad9e290c [NTOSKRNL]
Use the appropriated macro to check for pending operations. NFC
ROSTESTS-248

svn path=/trunk/; revision=73323
2016-11-20 10:51:26 +00:00
Thomas Faber
c037053a34 [NOTEPAD]
- Update the window title on Save. Based on a patch by Thomas Csovcsity.
CORE-12423 #resolve

svn path=/trunk/; revision=73322
2016-11-20 09:16:19 +00:00
Mark Jansen
cef870285c [CMD] Wait for commands to exit when run with /C or /K. CORE-12402 #resolve
svn path=/trunk/; revision=73321
2016-11-18 19:53:40 +00:00
Amine Khaldi
bc95e1f73c [WSHOM_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73320
2016-11-17 23:56:32 +00:00
Amine Khaldi
d65aa5dd2f [RSAENH_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73319
2016-11-17 23:54:08 +00:00
Amine Khaldi
a02e2eb1aa [SCRRUN_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73318
2016-11-17 23:52:31 +00:00
Amine Khaldi
1f354adf5e [SETUPAPI_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73317
2016-11-17 23:49:54 +00:00
Amine Khaldi
12edc3f68c [IMM32_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73316
2016-11-17 23:47:11 +00:00
Amine Khaldi
a16217bd9d [REGEDIT_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73315
2016-11-17 23:39:22 +00:00
Amine Khaldi
bcbf704a5d [GDI32_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73314
2016-11-17 23:36:54 +00:00
Amine Khaldi
1fd943c142 [PSDK] Add missing WINHTTP_NO_CLIENT_CERT_CONTEXT.
svn path=/trunk/; revision=73313
2016-11-17 23:32:39 +00:00
Amine Khaldi
01e37dce52 [XMLLITE_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73312
2016-11-17 23:31:04 +00:00
Amine Khaldi
5947a69517 [XMLLITE] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73311
2016-11-17 23:30:21 +00:00
Amine Khaldi
b623cc77d2 [XINPUT1_3_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73310
2016-11-17 23:29:18 +00:00
Amine Khaldi
fef2774bdd [XINPUT1_3] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73309
2016-11-17 23:28:41 +00:00
Amine Khaldi
ed898f91d4 [PSDK] Update xinput.h. CORE-12409
svn path=/trunk/; revision=73308
2016-11-17 23:27:31 +00:00
Amine Khaldi
a63f1b60f6 [WINTRUST_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73307
2016-11-17 23:26:31 +00:00
Amine Khaldi
d4491e333c [WINTRUST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73306
2016-11-17 23:25:53 +00:00
Amine Khaldi
0f78def92f [WINEMP3.ACM] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73305
2016-11-17 23:24:47 +00:00
Amine Khaldi
b81dc9c21f [WINDOWSCODECS_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73304
2016-11-17 23:23:38 +00:00
Amine Khaldi
c3af8cc0b7 [WINDOWSCODECS] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73303
2016-11-17 23:22:42 +00:00
Amine Khaldi
8209287044 [PSDK] Add missing WINCODEC_ERR_UNKNOWNIMAGEFORMAT.
svn path=/trunk/; revision=73302
2016-11-17 23:20:00 +00:00
Amine Khaldi
0d6ecb3255 [WBOMPROX_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73301
2016-11-17 23:19:20 +00:00
Amine Khaldi
610f6533b9 [WBOMPROX] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73300
2016-11-17 23:18:42 +00:00
Amine Khaldi
fa6326df88 [VBSCRIPT_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73299
2016-11-17 23:16:08 +00:00
Amine Khaldi
a8e3a0bea0 [VBSCRIPT] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73298
2016-11-17 23:15:02 +00:00
Amine Khaldi
d110b7df27 [USP10_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73297
2016-11-17 23:13:43 +00:00
Amine Khaldi
8c9854691e [USP10] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73296
2016-11-17 23:13:09 +00:00
Amine Khaldi
10570fa49e [URLMON_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73295
2016-11-17 23:11:50 +00:00
Amine Khaldi
01cc187f9e [URLMON] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73294
2016-11-17 23:10:44 +00:00
Amine Khaldi
129d8806b0 [T2EMBED] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73293
2016-11-17 23:09:21 +00:00
Amine Khaldi
32cb9ee335 [STI] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73292
2016-11-17 23:08:33 +00:00
Amine Khaldi
06ccd81758 [SHLWAPI_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73291
2016-11-17 23:07:24 +00:00
Amine Khaldi
7c6c0e06c6 [SHLWAPI] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73290
2016-11-17 23:06:15 +00:00
Amine Khaldi
0b209bd3b4 [RICHED20_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73289
2016-11-17 23:05:13 +00:00
Amine Khaldi
534805b248 [RICHED20] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73288
2016-11-17 23:04:08 +00:00
Amine Khaldi
757b0ecb88 [QMGR] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73287
2016-11-17 23:01:19 +00:00
Amine Khaldi
e1e4c63781 [OLEAUT32_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73286
2016-11-17 22:59:30 +00:00
Amine Khaldi
9d4be48ab8 [OLEAUT32] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73285
2016-11-17 22:58:15 +00:00
Amine Khaldi
90dbda7271 [ODBC32] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73284
2016-11-17 22:55:42 +00:00
Amine Khaldi
69581680df [MSVFW32] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73283
2016-11-17 22:54:16 +00:00
Amine Khaldi
7a050e50e5 [MSIMTF] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73282
2016-11-17 22:52:27 +00:00
Amine Khaldi
3720284204 [MSCTF_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73281
2016-11-17 22:50:52 +00:00
Amine Khaldi
6202dba74a [MSCTF] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73280
2016-11-17 22:50:15 +00:00
Amine Khaldi
bc96e9183b [MSACM32_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73279
2016-11-17 22:49:19 +00:00
Amine Khaldi
d98c0d0d23 [MSACM32] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73278
2016-11-17 22:48:39 +00:00
Amine Khaldi
8004c858f3 [MMDEVAPI_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73277
2016-11-17 22:47:02 +00:00
Amine Khaldi
a418a747f9 [MMDEVAPI] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73276
2016-11-17 22:45:24 +00:00
Amine Khaldi
e0a9bb0739 [INSENG] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73275
2016-11-17 22:44:24 +00:00
Amine Khaldi
4e2fae0c10 [PSDK] Update inseng.idl. CORE-12409
svn path=/trunk/; revision=73274
2016-11-17 22:42:31 +00:00
Amine Khaldi
a2a3c645f6 [INETCOMM_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73273
2016-11-17 22:39:46 +00:00
Amine Khaldi
b42373406d [INETCOMM] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73272
2016-11-17 22:39:08 +00:00
Amine Khaldi
35d175df70 [GDIPLUS_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73271
2016-11-17 22:37:09 +00:00
Amine Khaldi
3c5dbe9f1f [GDIPLUS] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73270
2016-11-17 22:35:44 +00:00
Amine Khaldi
3e8eeb6c2e [PSDK] Update gdipluscolormatrix.h, gdiplusenums.h and gdiplusflat.h CORE-12409
svn path=/trunk/; revision=73269
2016-11-17 22:31:42 +00:00
Amine Khaldi
d10ad38516 [FUSION_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73268
2016-11-17 22:28:40 +00:00
Amine Khaldi
48bef33818 [FUSION] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73267
2016-11-17 22:27:46 +00:00
Amine Khaldi
9f128bf796 [CABINET] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73266
2016-11-17 22:26:11 +00:00
Amine Khaldi
d23c9ec3c5 [CMD_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73265
2016-11-17 22:23:43 +00:00
Colin Finck
aa84b232e5 [LOCALSPL_APITEST]
Add a test for fpGetPrintProcessorDirectory, the actual worker function inside localspl.dll at the end of the call chain.
With that final test, we should have enough information to implement 100% compatible versions of GetPrintProcessorDirectoryA/W and fpGetPrintProcessorDirectory.

[WINSPOOL_APITEST]
Initialize some more variables with bogus values to verify that they have actually changed.

Next step for CORE-12399

svn path=/trunk/; revision=73264
2016-11-17 22:23:28 +00:00
Amine Khaldi
180da765bc [BCRYPT_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73263
2016-11-17 22:22:21 +00:00
Amine Khaldi
cab4d92ac6 [BOOTDATA] Add FIPSAlgorithmPolicy registry value for bcrypt tests.
svn path=/trunk/; revision=73262
2016-11-17 22:21:35 +00:00
Amine Khaldi
7831d346b7 [BCRYPT] Sync with Wine Staging 1.9.23. The mbedtls code paths are brought to you by Peter Hater. CORE-12409
svn path=/trunk/; revision=73261
2016-11-17 22:13:28 +00:00
Amine Khaldi
7d40a4c98e [MBEDTLS] Export some needed functions for bcrypt. By Peter Hater.
svn path=/trunk/; revision=73260
2016-11-17 22:09:11 +00:00
Amine Khaldi
38e3f17430 [PSDK] Update bcrypt.h. CORE-12409
svn path=/trunk/; revision=73259
2016-11-17 22:07:42 +00:00
Amine Khaldi
a0293288a2 [AVIFIL32_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73258
2016-11-17 22:06:10 +00:00
Amine Khaldi
0c2925fa09 [AVIFIL32] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73257
2016-11-17 22:05:29 +00:00
Amine Khaldi
340722145f [QUARTZ] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73256
2016-11-17 22:03:51 +00:00
Amine Khaldi
22687f1551 [DMUSIC] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73255
2016-11-17 22:02:00 +00:00
Amine Khaldi
a5b9d1f8e8 [DINPUT_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73254
2016-11-17 22:00:07 +00:00
Amine Khaldi
ff822fa7da [D3DRM_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73253
2016-11-17 21:59:05 +00:00
Amine Khaldi
65c4e72403 [DINPUT] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73252
2016-11-17 21:57:53 +00:00
Amine Khaldi
540093496e [PSDK] Add missing DI_WRITEPROTECT and DIPROP_PRODUCTNAME.
svn path=/trunk/; revision=73251
2016-11-17 21:56:53 +00:00
Amine Khaldi
b4b72c9302 [D3DRM] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73250
2016-11-17 21:52:34 +00:00
Amine Khaldi
e5a3cf92da [AMSTREAM] Sync with Wine Staging 1.9.23. CORE-12409
svn path=/trunk/; revision=73249
2016-11-17 21:43:18 +00:00
Colin Finck
e12ad8d673 [WINSPOOL_APITEST]
GetPrintProcessorDirectory.c: fix 4 error messages (s/cbNeeded/cbTemp/).
By Serge Gautherie

svn path=/trunk/; revision=73248
2016-11-17 21:30:45 +00:00
Colin Finck
5fd4223870 [WINPRINT_APITEST]
Load all functions to test dynamically from either winprint.dll in the Print Processor Directory (for ReactOS and NT6) or localspl.dll in the system path (for NT5).
Should fix winprint_apitest on ReactOS and Windows Server 2003.

svn path=/trunk/; revision=73247
2016-11-17 21:24:07 +00:00
Mark Jansen
9beec30ba3 [CMD] Wait for the spawned application to exit while executing a batch script. Patch by Joachim Henze. CORE-12402
svn path=/trunk/; revision=73246
2016-11-17 20:47:23 +00:00
Mark Jansen
20421c1d49 [SHELL32] Don't crash on an empty shortcut. CORE-12331 #resolve
svn path=/trunk/; revision=73245
2016-11-17 19:50:45 +00:00
Giannis Adamopoulos
81047f4a8b [PSDK] - shlobj.h: Add some flags that are needed to let shell32 compile.
svn path=/trunk/; revision=73244
2016-11-17 14:51:02 +00:00
Giannis Adamopoulos
1d4fcbf920 [SHELL32]
- CDefaultContextMenu: Add rudimentary support for callbacks so as to let folders have item specific commands and remove all item specific code from this class.
- Implement context menu callbacks for CFSFolder, CRegFolder, CDrivesFolder in order to let them handle the properties item and let the CDrivesFolder add and handle the Format item itself.

svn path=/trunk/; revision=73243
2016-11-17 14:35:19 +00:00
Amine Khaldi
bdf445d754 [WLANAPI_APITEST] Bring these tests back home.
svn path=/trunk/; revision=73242
2016-11-17 13:46:36 +00:00
Peter Hater
9cbc4837b7 [MSAFD] Fix WSPSelect heap corruption and don't repeat sockets if they are in different fd_sets.
CORE-12324

svn path=/trunk/; revision=73241
2016-11-17 12:57:32 +00:00
Amine Khaldi
7408b63c91 [NOTEPAD] Fix a typo. Spotted by Laur Florin. CORE-12405
svn path=/trunk/; revision=73240
2016-11-17 11:56:16 +00:00
Colin Finck
e53a72c351 [LOCALSPL_APITEST]
Fix some NULL vs. INVALID_HANDLE_VALUE checks.
Now localspl_apitest.exe should properly quit when it cannot find its DLL.

svn path=/trunk/; revision=73239
2016-11-16 14:59:01 +00:00
Colin Finck
8f3b3eb6e2 [WINSPOOL_APITEST]
Add tests for GetPrintProcessorDirectoryA and another one for GetPrintProcessorDirectoryW.
Tested against Windows Server 2003 SP2.

Step 1 for CORE-12399

svn path=/trunk/; revision=73238
2016-11-16 08:54:54 +00:00
Giannis Adamopoulos
6cf2a9fc0e [SHELL32]
- Implement filling in needed keys passed to CDefFolderMenu_Create2.
- CDefaultContextMenu: Remove the code that filled the array of keys as this is now moved to the implementation of the shell folder.

svn path=/trunk/; revision=73237
2016-11-15 20:14:56 +00:00
Giannis Adamopoulos
46512f3a37 [SHELL32] - Accept NULL pidl in CRegFolder::GetDisplayNameOf. CORE-12317
svn path=/trunk/; revision=73236
2016-11-15 14:25:05 +00:00
Giannis Adamopoulos
4a5fe31949 [SHELL32_APITEST] - Add a test for CShellDesktop to show what breaks the select folder dialog.
svn path=/trunk/; revision=73235
2016-11-15 14:08:57 +00:00
Hermès Bélusca-Maïto
42d50ca091 [LSASRV]: Revert part of r73233: GetModuleHandle(NULL) retrieves the exe module in which the dll is loaded, not the dll instance itself. (an alternative might be to use the hinstance from DllMain...). Thanks Thomas for having pointed this to me.
svn path=/trunk/; revision=73234
2016-11-14 18:57:18 +00:00
Hermès Bélusca-Maïto
a0cb636ee3 [LSASRV]
- No need to hardcode the name of the dll in the GetModuleHandleW call;
- Use ARRAYSIZE instead of hardcoding string buffer sizes;
- When initializing the "Network Sid", use the correct localized string.

svn path=/trunk/; revision=73233
2016-11-14 16:19:22 +00:00
Hermès Bélusca-Maïto
076082358a [LSASRV]
- Remove trailing whitespace;
- Tabs --> Spaces;
- Don't always hardcode parameters sizeofs;
- Use ARRAYSIZE where applicable;
- Use UNICODE_NULL

svn path=/trunk/; revision=73232
2016-11-14 16:17:42 +00:00
Peter Hater
e27a5768be [MSAFD] When out of band data is inlined, calling WSPRecv/WSPRecvFrom with flag MSG_OOB is invalid, return WSAEINVAL. CORE-12104
svn path=/trunk/; revision=73231
2016-11-14 14:10:48 +00:00
Amine Khaldi
02a4d63dc1 [LOCALMON] Russian translation by Nikolay Burshtyn aka amber. CORE-12363
svn path=/trunk/; revision=73230
2016-11-14 11:18:11 +00:00
Amine Khaldi
4aa6b2e9d3 [LOCALMON] Italian translation by Carlo Bramini. CORE-12363
svn path=/trunk/; revision=73229
2016-11-14 10:58:53 +00:00
Mark Jansen
1a9744d406 [ADVAPI32][ADVAPI32_APITEST] Fix incorrect parameter output uncovered by CORE-12333 #comment Please retest!
svn path=/trunk/; revision=73228
2016-11-13 18:11:14 +00:00
Thomas Faber
a9805facab [KMTESTS:MM]
- Skip NtCreateSection tests since they hang on testbot.
ROSTESTS-248

svn path=/trunk/; revision=73227
2016-11-13 16:42:16 +00:00
Amine Khaldi
5c2f126896 [DRIVERS] Spelling fixes by Josh Soref. CORE-12286
svn path=/trunk/; revision=73226
2016-11-13 15:31:39 +00:00
Thomas Faber
c2b131e793 [WS2_32_APITEST]
- Skip nonblocking tests since they hang on testbot
ROSTESTS-247

svn path=/trunk/; revision=73225
2016-11-13 14:54:06 +00:00
Thomas Faber
ce14a59aa5 [KMTESTS:RTL]
- Silence a GCC5+ warning
CORE-11794

svn path=/trunk/; revision=73224
2016-11-13 12:19:05 +00:00
Thomas Faber
28126afb8e [ATL]
- Don't return values from void functions.
CORE-11794

svn path=/trunk/; revision=73223
2016-11-13 11:51:02 +00:00
Pierre Schweitzer
58576e2c5b [EXPLORER]
Translate last bits of the task parameters in French.
CORE-12385

svn path=/trunk/; revision=73221
2016-11-13 10:33:23 +00:00
Thomas Faber
37e99b9f99 [CMAKE]
- Use CMake 3.4's <INCLUDES> rule variable in addition to <FLAGS>.
CORE-12373 #resolve

svn path=/trunk/; revision=73220
2016-11-13 10:19:22 +00:00
Thomas Faber
273a731496 [CMAKE]
- We require automatic generation of phony targets for now. Set the corresponding CMake 3.3+ policy (CMP0058).
CORE-12373

svn path=/trunk/; revision=73219
2016-11-13 09:57:30 +00:00
Amine Khaldi
4eb205b6f5 [WINSPOOL] Properly export GetPrinterDriverDirectoryA as a stub. CORE-12375
svn path=/trunk/; revision=73218
2016-11-12 22:59:55 +00:00
Amine Khaldi
c443191b84 [WINSPOOL] Properly export GetPrintProcessorDirectoryA as a stub. CORE-12375
svn path=/trunk/; revision=73217
2016-11-12 22:32:14 +00:00
Amine Khaldi
4297c7b0b6 [DLLS] Spelling fixes by Josh Soref. CORE-12286
svn path=/trunk/; revision=73216
2016-11-12 21:53:33 +00:00
Amine Khaldi
1072717a60 [BOOT] Spelling fixes by Josh Soref. CORE-12286
svn path=/trunk/; revision=73215
2016-11-12 20:53:49 +00:00
Amine Khaldi
aca585d81e [TIMEDATE] Make the custom clock control aware of the theming. By Carlo Bramini. CORE-12079
svn path=/trunk/; revision=73214
2016-11-12 20:24:07 +00:00
Giannis Adamopoulos
8c25d803dd [SHELL32_APITEST] -Test the IPersistFolder3 interface of CFSFolder.
svn path=/trunk/; revision=73213
2016-11-12 15:38:33 +00:00
Giannis Adamopoulos
f563a3856b [SHELL32_APITEST]
- Add tests for the Initialize method for CDesktopFolder and CDrivesFolder.
- Add tests for CFSFolder to see how it behaves whhile not initialized.

svn path=/trunk/; revision=73212
2016-11-12 14:54:12 +00:00
Thomas Faber
67cbaa5a02 [PSEH3]
- Avoid trying to disable 'declaration after statement' warnings in C++
CORE-11794

svn path=/trunk/; revision=73211
2016-11-12 14:52:58 +00:00
Thomas Faber
790c388fd1 [SHELL32_APITEST]
- Don't compare a pointer to S_OK
CORE-11794

svn path=/trunk/; revision=73210
2016-11-12 12:43:02 +00:00
Thomas Faber
df216319db [MSWSOCK]
- Remove broken 'inline' specifiers
CORE-11794

svn path=/trunk/; revision=73209
2016-11-12 12:23:49 +00:00
Pierre Schweitzer
d121793bd6 [SNDREC32]
Don't double free buffers in case of failure

svn path=/trunk/; revision=73208
2016-11-12 09:24:09 +00:00
Hermès Bélusca-Maïto
3d204aa2b1 [EVENTVWR]: Fix translation for "Information" event type: it is really in singular, not plural.
svn path=/trunk/; revision=73207
2016-11-12 01:29:05 +00:00
Hermès Bélusca-Maïto
b98bfc8583 [MSVCRT]: Implement and export _wtof, based on Wine and existing code; patch by Amine Khaldi.
CORE-12335 #resolve
CORE-9312 #comment Please retest with r73206

svn path=/trunk/; revision=73206
2016-11-11 23:32:29 +00:00
Hermès Bélusca-Maïto
ed21369043 [MSAFD]
- In C, void functions should better have 'VOID' mentioned in their prototypes.
- Simplify GetCurrentTimeInSeconds code.

svn path=/trunk/; revision=73205
2016-11-11 21:37:09 +00:00
Hermès Bélusca-Maïto
47cea24f67 [MSAFD]: Addendum to r73203.
svn path=/trunk/; revision=73204
2016-11-11 21:25:02 +00:00
Hermès Bélusca-Maïto
80ba74a493 [MSAFD]: Convert tabs to spaces.
svn path=/trunk/; revision=73203
2016-11-11 21:19:13 +00:00
Pierre Schweitzer
cc6674b4d1 [NTOSKRNL]
Don't redefine RTL_NUMBER_OF

svn path=/trunk/; revision=73202
2016-11-11 18:16:43 +00:00
Christoph von Wittich
37cc16189d [PSDK] small fixes for dns headers
svn path=/trunk/; revision=73201
2016-11-11 14:21:55 +00:00
Pierre Schweitzer
2fdacdbbd6 [KMTESTS:MM]
Bugfix for IRP_MJ_SET_INFORMATION/FileEndOfFileInformation: really set the information. The test still works fine in Windows and still fails hard in ReactOS.

svn path=/trunk/; revision=73200
2016-11-11 10:44:51 +00:00
Pierre Schweitzer
e01923caaa [NTOSKRNL]
In MmCreateDataFileSection(), when maximum size is higher than file size, don't deal with its allocation size, just move EOF.
This was shown by NtCreateSection() tests.

svn path=/trunk/; revision=73199
2016-11-10 21:17:21 +00:00
Pierre Schweitzer
6db40277dc [KMTESTS:MM]
Add tests for the NtCreateSection functions which mimic some of the behavior that can be exposed by FSDs (late init, too small files, and so on).
It was designed in W2K3.

svn path=/trunk/; revision=73198
2016-11-10 21:02:48 +00:00
Peter Hater
ad99a6f7fd [MSAFD] Implement SO_CONNECT_TIME. CORE-12104
svn path=/trunk/; revision=73197
2016-11-10 17:55:00 +00:00
Thomas Faber
429d685816 [HOST-TOOLS]
- Fix some GCC6 warnings

svn path=/trunk/; revision=73196
2016-11-10 15:34:25 +00:00
Peter Hater
373bee1800 [WS2_32_APITESTS] Add nonblocking tests
svn path=/trunk/; revision=73195
2016-11-10 15:13:19 +00:00
Peter Hater
ec87a34342 [WS2_32_APITESTS] Add more WSAAsync tests
svn path=/trunk/; revision=73194
2016-11-10 15:00:44 +00:00
Peter Hater
b3bee8c862 [WS2_32_APITEST] Use test.winehq.org insteadof reactos.org. These days main reactos page is too big.
svn path=/trunk/; revision=73193
2016-11-10 14:23:49 +00:00
Peter Hater
a32e890392 [MSAFD] Fix for WSPStringToAddressA/W wine tests. CORE-12104
svn path=/trunk/; revision=73192
2016-11-10 11:15:14 +00:00
Thomas Faber
d26b1ff847 [FASTFAT]
- Generate LFNs for files containing non-ASCII characters in their names.
CORE-8617 #resolve

svn path=/trunk/; revision=73191
2016-11-10 11:04:29 +00:00
Thomas Faber
ac5bba8ea8 [NTDLL_APITEST]
- Add tests for RtlIsNameLegalDOS8Dot3 and RtlUpcaseUnicodeStringToCountedOemString with the ® sign.
CORE-8617

svn path=/trunk/; revision=73190
2016-11-10 10:18:25 +00:00
Giannis Adamopoulos
8632758e52 [SHELL32] - CStartMenu: Add missing checks for failure and make some checks noisy. CORE-12300
svn path=/trunk/; revision=73189
2016-11-10 09:34:14 +00:00
Giannis Adamopoulos
0125f9192d [SHELL32] - CMenuBand: Don't accept a NULL shell folder in SetShellFolder. Should fix a test and possibly CORE-12300.
svn path=/trunk/; revision=73188
2016-11-10 08:10:28 +00:00
Giannis Adamopoulos
d2812c3e70 [SHELL32]
- Make some checks for failure in CDefView and CDefaultContextMenu noisy.

svn path=/trunk/; revision=73187
2016-11-10 08:05:13 +00:00
Mark Jansen
f6c36fb82e and of course also rename the test itself...
svn path=/trunk/; revision=73186
2016-11-09 23:23:50 +00:00
Mark Jansen
cae3a4455e Rename shlexec.cpp to ShellExecuteEx.cpp as suggested by Thomas.
svn path=/trunk/; revision=73185
2016-11-09 23:18:23 +00:00
Thomas Faber
03d2a4b809 [PROPSYS_WINETEST]
- Fix VS2010 build

svn path=/trunk/; revision=73184
2016-11-09 22:55:16 +00:00
Mark Jansen
c707b2d936 addendum to r73180 (aka, fix the build)
svn path=/trunk/; revision=73183
2016-11-09 22:24:42 +00:00
Mark Jansen
813cc3f137 [SHELL32] Automatically add the .exe extension for App Paths in ShellExecuteEx. Patch by Yaroslav Veremenko. CORE-12049
svn path=/trunk/; revision=73182
2016-11-09 22:18:33 +00:00
Hermès Bélusca-Maïto
1d2fe2375a [EVENTVWR]: Adjust some menu keyboard shortcuts.
svn path=/trunk/; revision=73181
2016-11-09 22:14:20 +00:00
Mark Jansen
353c67c0d4 [SHELL32_APITEST] Add some tests for ShellExecuteEx showing extension completion with the App Paths registry key. Patch by Yaroslav Veremenko. CORE-12049
svn path=/trunk/; revision=73180
2016-11-09 22:13:26 +00:00
Christoph von Wittich
d4c71dda90 [PSDK] fix DNS_RECORDW definition
svn path=/trunk/; revision=73179
2016-11-09 21:29:09 +00:00
Hermès Bélusca-Maïto
54c7babbb3 [EXPLORER]: Add missing keyboard shortcuts for some commands.
svn path=/trunk/; revision=73178
2016-11-09 18:03:19 +00:00
Peter Hater
38d1fdf118 [MSAFD] Fix possible memory corruption in WSPIoctl. Brought to you by Andreas Maier aka andy-123. Thanks.
CORE-12322

svn path=/trunk/; revision=73177
2016-11-09 12:05:48 +00:00
Peter Hater
781673fa3d [MSAFD] Minor changes. Code style fixes. tabs->spaces. CORE-12104
svn path=/trunk/; revision=73176
2016-11-09 11:49:55 +00:00
Giannis Adamopoulos
2c118e1890 [BROWSEUI]
- CAddressBand: Call the SetOwner method with NULL parameter to CAddressEditBox to let it know that it should deinitialize.
- CAddressEditBox: Release the connection with the browse window and release the pointer to the site during deinitialization.
- CInternetToolbar: Destroy the toolbar and release pointers when CloseDW method gets called.
- CBaseBar: Destroy the window when SetClient is called with NULL parameter.
- CToolbarProxy: Add a Destroy method to release resources because we hold a pointer to the CInternetToolbar.
- CShellBrowser: When storing the pointer  to the new basebar add a new reference because we directly change the pointer in the smart pointer and not the smart pointer itself. Destroy the toolbar proxy and properly release all references to containted objects. Also expect the reference count of the shell view to reach zero after the internet toolbar gets freed because it also keeps a reference.

This should fix all the leaking objects and windows when closing the shell browser. It should also fix CORE-12066.

svn path=/trunk/; revision=73175
2016-11-08 23:38:42 +00:00
Christoph von Wittich
a0aeb266fa [PSDK] add some missing DNS structures, add incomplete dnsrslvr.idl
svn path=/trunk/; revision=73174
2016-11-08 12:27:55 +00:00
Christoph von Wittich
4c9e70a899 [PSDK] disable SAL for WIDL as well
svn path=/trunk/; revision=73173
2016-11-08 11:33:54 +00:00
Thomas Faber
602c2dd81e [USETUP]
- Critical errors are worth a debug print
CORE-11819

svn path=/trunk/; revision=73172
2016-11-08 09:40:05 +00:00
Hermès Bélusca-Maïto
a9c9bed2e2 [NTOS]: Fix MmPt and DOPE tags.
svn path=/trunk/; revision=73171
2016-11-07 20:41:24 +00:00
Hermès Bélusca-Maïto
98ffc124f5 [NTOS:IO]: IopCreateDriver(): Set the returned DriverObject value only in case of success.
svn path=/trunk/; revision=73170
2016-11-07 15:51:56 +00:00
Hermès Bélusca-Maïto
12e8ef0213 [TCPIP]
- Enable logging now that IoWriteErrorLogEntry works.
- Check for log event size before calling IoAllocateErrorLogEntry.
- Reduce code indentation in the logging function.

svn path=/trunk/; revision=73169
2016-11-07 15:48:34 +00:00
Hermès Bélusca-Maïto
323bd18771 [NTOS:IO]: An improvement for the total log size check (addendum to r73167).
svn path=/trunk/; revision=73168
2016-11-07 13:57:11 +00:00
Hermès Bélusca-Maïto
0dfecf815d [NTOS:IO][INCLUDES][EVENTLOG]: Fix support for event logging through the "ErrorLogPort" LPC. See the details in CORE-12301 #resolve
svn path=/trunk/; revision=73167
2016-11-07 13:29:09 +00:00
Hermès Bélusca-Maïto
824c5e07c0 [NTOS:LPC]
- Capture the ServerView/ClientView *only* when those pointers are not NULL.
- Fix a LpcRequest vs. CapturedLpcRequest in a call to LpcpMoveMessage. Caught by Thomas. CORE-7371 CR-100

svn path=/trunk/; revision=73166
2016-11-07 12:35:09 +00:00
Peter Hater
09207124de [MSAFD] Implement SOL_SOCKET/SO_ERROR. CORE-12104
svn path=/trunk/; revision=73165
2016-11-07 08:50:31 +00:00
Hermès Bélusca-Maïto
f197af7358 [NTOS:LPC]
- Fix the usage, or add support (for NtSecureConnectPort based on patches by Alexander Andrejevic, and for NtReplyPort, NtReplyWaitReceivePortEx, NtListenPort by me) for capturing user-mode parameters and using SEH in LPC functions.
CORE-7371 #resolve
- Make NtSecureConnectPort call SeQueryInformationToken, now that the latter is implemented since r73122.
- Fix ObDereferenceObject usage for Port vs. ClientPort in NtSecureConnectPort.
- ObCloseHandle certainly needs to be called with the actual 'PreviousMode'.

svn path=/trunk/; revision=73164
2016-11-07 01:24:24 +00:00
Hermès Bélusca-Maïto
a066c5bbb0 [NTOS:LPC]: Fix the function prototypes (reference: Process Hacker + how the parameters are used in the code).
[NOTS][NDK]: Fix whitespace in header files.
[XDK]: Define PORT_MAXIMUM_MESSAGE_LENGTH before actually using it in the different IO_ERROR_LOG_xxx #defines, for consistency purposes.

svn path=/trunk/; revision=73163
2016-11-07 01:06:24 +00:00
Hermès Bélusca-Maïto
06807aee1b [NTOS:LPC]: Improve the lisibility of some functions:
- Group together the local parameters used for capturing user variables;
- Add some space between the list of parameters and the beginning of the code proper;
- Rename some variables or move some code to make some different functions look more similar (helps in finding functionality-similar functions in the code);
- Improve some comments;
- Whitespace fixes;
- Few code formatting.
- Use a ExFreePoolWithTag instead of ExFreePool, but otherwise no other functional code changes.

svn path=/trunk/; revision=73162
2016-11-07 00:55:34 +00:00
Giannis Adamopoulos
bb59ec3e6e [SHELL32]
- CShellLink: Zero the pointer to mDropTarget by releasing the smart pointer instead of just releasing the object. This lead to a crash every time CShellLink::DragLeave was called.
CORE-11956

svn path=/trunk/; revision=73161
2016-11-06 23:34:22 +00:00
Giannis Adamopoulos
f4a1861aab [SHELL32]
- SHOpenFolderAndSelectItems: Take into account buggy applications like firefox that like to pass full pidls in a PCUITEMID_CHILD_ARRAY.

svn path=/trunk/; revision=73160
2016-11-06 22:25:02 +00:00
Giannis Adamopoulos
b183748a87 [SHELL32]
- Hackplement SHOpenFolderAndSelectItems by using the /select parameter of explorer.exe and selecting only the first of the requested items.
- Implement the "Find Target" button in the properties dialog of shortcuts to use SHOpenFolderAndSelectItems so as we can test it.
Based on the patch of Joachim Henze (reactosfanboy).
CORE-9367 

svn path=/trunk/; revision=73159
2016-11-06 21:51:46 +00:00
Giannis Adamopoulos
0814bc5358 [SHELL32]
- CDefView: Correct the check for SVSI_EDIT because SVSI_EDIT implies SVSI_SELECT. This actualyl fixes SVSI_SELECT to not cause a rename.

[BROWSEUI]
- ExplorerMessageLoop: Implement the /select parameter for explorer.

svn path=/trunk/; revision=73158
2016-11-06 20:47:21 +00:00
Giannis Adamopoulos
3c58a339dc [SHELL32]
- CDesktopBrowser: The flags that SHOpenNewFrame takes are the same that SHExplorerParseCmdLine returns, not the SBSP_ ones.

[BROWSEUI]
- Move the hack to fill the parsed pidl if none was found to SHCreateFromDesktop.
- Convert the SH_EXPLORER_CMDLINE_FLAG_E flag to a SBSP_EXPLOREMODE and pass it to the CShellBrowser.

svn path=/trunk/; revision=73157
2016-11-06 20:13:17 +00:00
Giannis Adamopoulos
ce0d9e3727 [COM_APITEST]
- The new interfaces are not registered in the registry
- Add a few interfaces that were discovered for CLSID_Printers and CLSID_QueryAssociations.

svn path=/trunk/; revision=73156
2016-11-06 18:04:58 +00:00
Giannis Adamopoulos
d0aa105b59 [COM_APITEST]
- Test for the undocumented interfaces that were added recently.

svn path=/trunk/; revision=73155
2016-11-06 17:17:57 +00:00
Giannis Adamopoulos
55ed87f042 [SHLGUID_UNDOC.H] -Add several undocumented interfaces taken from http://www.geoffchappell.com/studies/windows/shell/shell32/interfaces/index.htm
svn path=/trunk/; revision=73154
2016-11-06 15:47:35 +00:00
Thomas Faber
42ce59cdd2 [KMTESTS]
- Complete IRPs with STATUS_INVALID_DEVICE_REQUEST by default.
CORE-12295 #resolve

svn path=/trunk/; revision=73153
2016-11-06 15:26:39 +00:00
Hermès Bélusca-Maïto
4ce821ad14 [EVTLIB]: Don't spam the log with "add new record" lines.
svn path=/trunk/; revision=73152
2016-11-06 15:26:20 +00:00
Thomas Faber
fa7d321cf7 [MKISOFS]
- Fix build with VS2010 and 2012
CORE-11988

svn path=/trunk/; revision=73151
2016-11-06 14:57:13 +00:00
Johannes Anderwald
99e69d6761 [USBAUDIO]
- partly implement GetDataRangeIndexForFormat

svn path=/trunk/; revision=73150
2016-11-06 13:59:39 +00:00
Thomas Faber
0c93077425 [PSEH]
- Correctly restore the old frame pointer when unwinding in _except_handler3.
CORE-12283 #resolve

svn path=/trunk/; revision=73149
2016-11-06 11:49:19 +00:00
Thomas Faber
52adca06a9 [KMTESTS:RTL]
- Add a test checking stack frame correctness in a nested __finally handler
CORE-12283

svn path=/trunk/; revision=73148
2016-11-06 09:31:09 +00:00
Giannis Adamopoulos
034a3f9f20 [SHELL32]
- Only specific shell folders are supposed to return their display name. Consequently, only CRegFolder reads the registry now to get the display name of items.

svn path=/trunk/; revision=73147
2016-11-05 19:55:29 +00:00
Thomas Faber
f2495ba422 [ASM]
- Addendum to r73145 aka fix build

svn path=/trunk/; revision=73146
2016-11-05 18:34:44 +00:00
Thomas Faber
2c8f2ae901 [PSEH]
- Make _except_handler3 human-readable
CORE-12283

svn path=/trunk/; revision=73145
2016-11-05 18:33:50 +00:00
Thomas Faber
7eea8b9401 [CRT]
- Avoid 'except' as a variable name in math.h, for compatibility with SEH tests

svn path=/trunk/; revision=73144
2016-11-05 18:27:30 +00:00
Mark Jansen
91a67de356 [ADVAPI32] Set REG_NONE type in RegQueryValueExW with certain failure cases. Patch by Victor Martinez Calvo. CORE-9666 #resolve #comment Thanks!
svn path=/trunk/; revision=73143
2016-11-05 17:46:30 +00:00
Mark Jansen
5cccca79c2 [ADVAPI32_APITEST] Add tests for RegQueryValueExW. Patch by Victor Martinez Calvo. ROSTESTS-171 #resolve #comment Thanks!
svn path=/trunk/; revision=73142
2016-11-05 17:43:24 +00:00
Mark Jansen
f52999c41e [MKISOFS] Silence progress spam.
svn path=/trunk/; revision=73141
2016-11-05 17:28:00 +00:00
Giannis Adamopoulos
3412b511c1 [SHELL32]
- Make most dll dependencies to be delay loaded just like windows.

svn path=/trunk/; revision=73140
2016-11-05 17:04:15 +00:00
Giannis Adamopoulos
55f2b129e3 [SHELL32]
- Add missing resource strings for the description of some shell folders.

svn path=/trunk/; revision=73139
2016-11-05 16:45:41 +00:00
Johannes Anderwald
35e6d1e851 [USBAUDIO]
- store remaining audio bytes in a common buffer, which will be sent on next request
- fixes some of audio distortion issues

svn path=/trunk/; revision=73138
2016-11-05 16:38:59 +00:00
Giannis Adamopoulos
f7841638f6 [SHELL32]
- Properly add Printers folder in Control Panel.
CORE-12193

svn path=/trunk/; revision=73137
2016-11-05 16:33:24 +00:00
Mark Jansen
0fe87b6c3c [SHELL32] Improve the choose icon dialog. Patch by Jared Smudde, edited by me. CORE-11792 #resolve
Translators, please check this dialog in your language, some text is changed!

svn path=/trunk/; revision=73136
2016-11-05 16:12:09 +00:00
Thomas Faber
4221bc4d2d [CRT]
- Remove SEH code that's duplicated in the pseh library.
CORE-12283

svn path=/trunk/; revision=73135
2016-11-05 16:05:02 +00:00
Giannis Adamopoulos
072c1d16c8 [SHELL32]
CDesktopBrowser: Forward the parameters pased in CDesktopBrowser::BrowseObject to SHOpenNewFrame. Thus the same parameters are eventually passed to CShellBrowser::Initialize.

[BROWSEUI]
CShellBrowser: Handle SBSP_EXPLOREMODE flag so as to show the tree view when the user selects the Explore option from the context menu.

svn path=/trunk/; revision=73134
2016-11-05 15:05:00 +00:00
Amine Khaldi
d12708671c [BASE] Spelling fixes by Josh Soref. CORE-12286
svn path=/trunk/; revision=73133
2016-11-05 14:55:55 +00:00
Giannis Adamopoulos
86fb59915f [BROWSEUI]
- CShellBrowser: Add some checks for failures that we re missing.
- CAddressEditBox: Add some checks for failures that we re missing.
- SHCreateFromDesktop: Actually create the proxy desktop window when needed and keep its handle and prefer it when we try to find the proxy desktop window.
- Wake the message queue of the proxy desktop after a browser thread exits so the proxy desktop can exit when the last browser thread exits.
- Add a hack to prefer to show my documents if we ended up trying to open a browser window with a NULL pidl. This is a hack that is needed because SHExplorerParseCmdLine is broken.
- Finally this fixes using "explorer /separate" and also fixes the separate process to exit when the last browser gets closed (this fix also applies to filebrowser.exe which no longer lives forever).
CORE-12168

svn path=/trunk/; revision=73132
2016-11-05 14:40:55 +00:00
Giannis Adamopoulos
7731fea285 [BROWSEUI]
- CAddressEditBox: Implement handling relative paths in the addressbar of explore in addition to absolute paths.

svn path=/trunk/; revision=73130
2016-11-05 00:09:51 +00:00
Giannis Adamopoulos
6cd367f86e [BROWSEUI]
- CShellBrowser: Add a standard ShellObjectCreatorInit constructor and make its initializer take a pidl and flags.
- Move BrowserThreadProc to desktopipc.cpp where the lifetime of the browser thread will be managed.

svn path=/trunk/; revision=73129
2016-11-04 23:56:02 +00:00
Giannis Adamopoulos
24fcf531e7 [SHELL32]
- Implement comparing child items in CompareIDs method of our IShellFolder immplementation in shell32 as this is the expected behaviour according to tests and documentation.
- This was removed after each folder got its own implementation (we used a single one from wine that did handle it).
May fix CORE-12106.

svn path=/trunk/; revision=73128
2016-11-04 23:11:29 +00:00
Johannes Anderwald
c86e482415 [SDK]
- fix build
- thanks learn_more

svn path=/trunk/; revision=73127
2016-11-04 18:38:07 +00:00
Johannes Anderwald
ad98e4a993 [SDK]
- add newline

svn path=/trunk/; revision=73126
2016-11-04 18:14:40 +00:00
Johannes Anderwald
d84d3c799f [SDK]
- add prototypes

svn path=/trunk/; revision=73125
2016-11-04 18:12:00 +00:00
Johannes Anderwald
20ff103b96 [USBAUDIO]
- fix buffer calculation for usb headsets
- usb headsets now partially work with usbaudio in win2k3

svn path=/trunk/; revision=73124
2016-11-04 18:07:44 +00:00
Peter Hater
f3d71d8a6b [MSAFD] Check params on WSAAceept. CORE-12104
svn path=/trunk/; revision=73123
2016-11-04 18:03:15 +00:00
Hermès Bélusca-Maïto
15d77be6fd [NTOS]
- accesschk.c: Remove redundant SepAccessCheck/SepAccessCheckEx pair of private functions; instead just rename SepAccessCheckEx into SepAccessCheck and use it directly in the code. NOTE: SepAccessCheck is *incomplete* (in particular it doesn't retrieve the information needed to initialize the 'Privileges' parameter).
- sid.c: Comments formatting fix.
- token.c:
  * Finish to implement SeQueryInformationToken . This function is really the same as NtQueryInformationToken but without all the stuff needed for user-mode buffer access protection.
  * Some code simplifications in NtQueryInformationToken.
  I need this to fix a "FIXME: Use SeQueryInformationToken" in some code I'm also fixing (& commit later).

[NDK]: Fix parameter types and add annotations to RtlCopySidAndAttributesArray.

[KMTESTS:NTOS_SE]
- Reenable the 'SeQueryInfoToken' test.
- Show that SeQueryInformationToken doesn't support 4 token information classes, which are supported only by NtQueryInformationToken.
- Fix calling of SeAccessCheck. In particular the 'Privileges' parameter is not allocated by the caller, but instead is allocated by SeAccessCheck *and* returned to the caller (who then must free the buffer using SeFreePrivileges). This fixes the encountered BSODs that leaded to disabling preventively the test in r59178.
- Minor code cleaning.

svn path=/trunk/; revision=73122
2016-11-04 17:52:32 +00:00
Giannis Adamopoulos
3430268b90 [SHELL32_APITEST]
- Add extensive tests for SHParseDisplayName. I tried to add as many as possible  but this list of tests is still incomplete. In the meantime I discovered interesting stuff like the "shell:system" path which if you enter in the run dialog will open the system32 folder. I tried to test parsing protocols like ftp paths but couldn't find wht it should look like yet. Afaik all protocol except for the shell protocol like the one mentioned before should be parsed by CInternet class as noted in the appropriate comment in the tests.

svn path=/trunk/; revision=73121
2016-11-04 17:31:53 +00:00
Peter Hater
7f3c674aee [MSAFD] Disable setting blocking mode if there are WSPAsyncSelect or WSPEventSelect pending calls. CORE-12104
svn path=/trunk/; revision=73120
2016-11-04 09:38:21 +00:00
Amine Khaldi
509c345083 [NETCFGX] Compensate for the proper widths until we have sane font support. Suggestion by Jim, patch by Doug Lyons. CORE-12094
svn path=/trunk/; revision=73117
2016-11-04 09:28:44 +00:00
Pierre Schweitzer
a343648323 [NTOSKRNL]
In IoWritePartitionTableEx(), don't return STATUS_SUCCESS when we cannot write GPT to higher partitions count than space available; return STATUS_INVALID_PARAMETER.

svn path=/trunk/; revision=73114
2016-11-03 21:49:55 +00:00
Pierre Schweitzer
82425d713b [DISK]
Don't overflow when computing disk size.
Patch by Vort.

CORE-12261

svn path=/trunk/; revision=73113
2016-11-03 21:38:56 +00:00
Pierre Schweitzer
ec670d6c25 [NTOSKRNL]
For now, disable broken code in FstubReadPartitionTableEFI(). In its current state, it wrongly assumes backup GPT is broken and thus attempts to fix main GPT (?!).
Furthermore, it appears Windows 2K3 doesn't perform such checks, nor such GPT rewritings in FstubReadPartitionTableEFI().

CORE-12261

svn path=/trunk/; revision=73112
2016-11-03 21:13:30 +00:00
Hermès Bélusca-Maïto
cfbf8660bc [WHOAMI]: Use the conutils (stream) library for console output (see also r65894).
CORE-8965 CORE-10504

svn path=/trunk/; revision=73111
2016-11-03 16:30:48 +00:00
Hermès Bélusca-Maïto
79c7b07668 [CONUTILS]: Remove that overengineered splitted library stuff, and just rely on the splitting of the source code files instead. This is simpler and does the same job as I wanted to do initially (thanks Amine and Thomas for the feedback).
CORE-10504 #resolve
[APPS]: Use again just the conutils library.
The effect of these two modifications above is to partly revert r73024 (the code splitting remains on the contrary).
[CMAKE]: Remove the "evil workaround" (revert r73027). See CORE-12206 for more details.

svn path=/trunk/; revision=73110
2016-11-03 15:47:45 +00:00
Peter Hater
ee601ad450 [TCPIP] Always copy back bind IP in connection. Spotted by Thomas. Thanks
CORE-12152

svn path=/trunk/; revision=73109
2016-11-03 14:53:00 +00:00
Thomas Faber
bdcecff0be [USETUP]
- A fatal error when creating the install directory is worth a DPRINT1
CORE-11819

svn path=/trunk/; revision=73108
2016-11-03 14:14:19 +00:00
Johannes Anderwald
92338e37d3 [USBAUDIO]
- frequencies may appear unsorted, handle that

svn path=/trunk/; revision=73107
2016-11-03 13:44:01 +00:00
Johannes Anderwald
e8322d1fb7 [USBAUDIO]
- include controls from logical channels
- process selector unit descriptors
- automatic gain is KSNODETYPE_AGC

svn path=/trunk/; revision=73106
2016-11-03 13:26:45 +00:00
Hermès Bélusca-Maïto
698798ac5c [BOOTDATA]: Fix the indentation of the file(..) commands, noted by Thomas.
svn path=/trunk/; revision=73105
2016-11-02 21:49:50 +00:00
Hermès Bélusca-Maïto
1562869a7a [BOOTDATA]: Diverse improvements for mkisofs support and ISO image configuration:
- Make our build system create the required empty directory for mkisofs, instead. (It's not the purpose of the SVN to hold special files/directories just to make host tools happy; instead it's the job of the buld system to create them.)
- Place the boot files (catalog & co.) preferably at the beginning of the ISO image (it makes ISO image analysis easier, and is back-compatible with cdmake & oscdimg & windows ISOs): use the build system to generate the mkisofs sorting file. See the CMakeLists.txt for more details.
- Set in one place the ISO manufacturer & volume name strings so that it makes easier to bulk-change them (and makes features like CORE-12233 a bit easier to maintain).
- The EFI image must be set up with no emulation mode! (See section "12.3.2.1 ISO-9660 and El Torito" of the UEFI spec v2.4 errata B, for example).

[MKISOFS]: Add some useful offline documentation.

CORE-11988

svn path=/trunk/; revision=73104
2016-11-02 21:43:46 +00:00
Pierre Schweitzer
5bcce07fd7 [NDK]
Properly export functions for C++ code

svn path=/trunk/; revision=73103
2016-11-02 19:46:46 +00:00
Pierre Schweitzer
1e3e451c22 [BTRFS]
Enable the BTRFS shell registration

svn path=/trunk/; revision=73102
2016-11-02 19:40:50 +00:00
Pierre Schweitzer
f7dfa0ee35 [DOC]
Update sync status reading BTRFS

svn path=/trunk/; revision=73101
2016-11-02 19:38:39 +00:00
Pierre Schweitzer
7f4d8362bf [BTRFS]
Import the BTRFS driver shell extension. It allows having a finer control on btrfs volumes.
Note that not everything works in ReactOS and its usage may lead to bugchecks...

CORE-10892

svn path=/trunk/; revision=73100
2016-11-02 19:36:59 +00:00
Amine Khaldi
e9a079b458 [CHARMAP_NEW] Fix a copy pasta.
svn path=/trunk/; revision=73099
2016-11-02 19:19:17 +00:00
Amine Khaldi
968516f86d [SERVMAN] Sort out header inclusions.
svn path=/trunk/; revision=73098
2016-11-02 18:55:51 +00:00
Mark Jansen
b42f4fa34d [SETUPAPI] Forward pSetup[Malloc|Realloc|Free] to My[Malloc|Realloc|Free] as wine does. Spotted by Jared Smudde. CORE-12262
svn path=/trunk/; revision=73097
2016-11-02 18:31:46 +00:00
Peter Hater
0c396fc83e [MSAFD] Add more checks for lpErrno. Rearrange start of some functions to avoid creation and disposal of event of socket handle or parameter(s) is wrong. Other small changes
CORE-12104

svn path=/trunk/; revision=73096
2016-11-02 15:36:26 +00:00
Peter Hater
494db7a55d [TCPIP] Copy back unicast IP if broadcast is specified for listen.
CORE-12152

svn path=/trunk/; revision=73095
2016-11-02 11:24:08 +00:00
Johannes Anderwald
2a33de20a4 [USBAUDIO]
- remove setting InstancesNecessary as it causes problems with KsStudio
- start implementing support for usb headsets
- use endpoint address in UsbAudioSetFormat
- rewrite USBAudioSelectAudioStreamingInterface to select the interface based on the format index chosen

svn path=/trunk/; revision=73094
2016-11-02 09:55:18 +00:00
Pierre Schweitzer
79e0de2faf [MPR]
Implement saved connections restoration.
This is a bit hackish for now: it should only be attempted once, when the DLL is loaded on session login. Right now, it's attempt each time the DLL is loaded (ie, even when a program linking to it is started). This is to be fixed later on. So far, it brings the intended feature.

Now, you can create a connection with net use, save it, and reboot: it will be restored on the session opening.

CORE-11757

svn path=/trunk/; revision=73093
2016-10-31 21:27:02 +00:00
Pierre Schweitzer
fdc18e536d [MPR]
Delete saved connection on disconnection if asked (even though the resource wasn't connected).
This allows net use to properly remove connections it may have created.

CORE-11757

svn path=/trunk/; revision=73092
2016-10-31 21:20:32 +00:00
Pierre Schweitzer
c397981db2 [MPR]
Allow saving connections when using WNetUseConnection(), WNetAddConnection2().
It makes the "net use /persistent" switch working (ie, saving connection - not restoring connections).

CORE-11757

svn path=/trunk/; revision=73091
2016-10-31 21:17:46 +00:00
Johannes Anderwald
9b3c3d78a1 [USBAUDIO]
- initialize pin with correct flags
- enumerate all dataranges for an input / output terminal

svn path=/trunk/; revision=73090
2016-10-31 20:45:23 +00:00
Jérôme Gardou
eb0d4a0a16 [KERNEL32_WINETEST]
- Guard page and ATL thunks tests work fine. Enable them.
ROSTESTS-155 #resolve

svn path=/trunk/; revision=73089
2016-10-31 11:51:50 +00:00
James Tabor
07bc9a400d [User32]
- Leave Dialog Procedure calls protected with SEH, the same as windows.
- See CORE-12182, CORE-12111 and related issues.

svn path=/trunk/; revision=73088
2016-10-31 01:18:43 +00:00
Hermès Bélusca-Maïto
8793f1b4c6 [NTVDM]: Properly fixes build. Addendum to r73082, supersedes r73084.
CORE-10340

svn path=/trunk/; revision=73085
2016-10-30 20:27:05 +00:00
Mark Jansen
8657be9fb4 Addendum to r73082
svn path=/trunk/; revision=73084
2016-10-30 19:52:53 +00:00
Mark Jansen
22ba0b5aa5 [APPHELP][APPHELP_APITEST] Update db apitests to succeed from 2k3 to 10, paving the way for the next set of tests.
- Support 2k3 and Vista+ versions of the SDBQUERYRESULT structure.
- Add tests for SdbFindFirstNamedTag, SdbTagIDToTagRef, SdbGetLayerTagRef
- Implement SdbFindFirstNamedTag, SdbTagIDToTagRef, SdbGetLayerTagRef
- Add a version resource to apphelp, so that we can use it to identify which tests to use.

svn path=/trunk/; revision=73083
2016-10-30 19:39:43 +00:00
Hermès Bélusca-Maïto
705f7ce49e Art work commit:
[PIFMGR]: Update the 16-colour version of the computer icon.
[NTVDM]: Add the tangoified versions of the NTVDM computer icon by Ismael Ferreras Morezuelas. Also update the Tango PC-AT and XT icons.
CORE-10340 #resolve #comment Committed in r73082, thanks to you all!

svn path=/trunk/; revision=73082
2016-10-30 19:02:15 +00:00
Hermès Bélusca-Maïto
ecddd01a74 [BTRFS]: Fix compilation with MSVC too, as we don't have the 'FileFsSectorSizeInformation' FS information class in our headers (this is some Win8+ stuff).
CORE-12223 #comment MSVC compilation fixed in r73078 ('FileFsSectorSizeInformation' absent in our headers).

svn path=/trunk/; revision=73078
2016-10-30 14:14:27 +00:00
Mark Jansen
082463978d [REGSVR32] Disable error message boxes while loading a dll. CORE-12209
svn path=/trunk/; revision=73077
2016-10-30 11:50:10 +00:00
Thomas Faber
6acbbeddf8 [MKISOFS]
- Fix Win64 build -- the define is _WIN32, not WIN32.
CORE-11988

svn path=/trunk/; revision=73076
2016-10-30 09:44:29 +00:00
Pierre Schweitzer
97d164005c [RPCRT4]
Import Wine commit (by Alexandre Julliard):
- 7b0c2cdbcd64cffa2f5c5a37f55799b114132b59, Remove noisy fixme.

svn path=/trunk/; revision=73075
2016-10-30 09:17:42 +00:00
Peter Hater
55d4688b34 Revert r73068 and r73070
Current tests are obviously not enough to declare them OK.
I'll add more tests first

svn path=/trunk/; revision=73074
2016-10-30 05:58:02 +00:00
Thomas Faber
78ad433718 [FASTFAT]
- Only lock down the user buffer in the non-cached read/write case. CcCopyRead/CcCopyWrite takes care of this in the cached case, and does not impose a size limit like an MDL does.
CORE-12132 #resolve

svn path=/trunk/; revision=73072
2016-10-29 20:30:49 +00:00
Thomas Faber
a51ac2be8c [NTDLL_APITEST]
- Add a test for NtReadFile, also covering buffer size too large for an MDL
CORE-12132

svn path=/trunk/; revision=73071
2016-10-29 20:14:16 +00:00
Peter Hater
0a11d5e9a2 [MSAFD] Implement async connect
CORE-12152 #resolve

svn path=/trunk/; revision=73070
2016-10-29 18:38:27 +00:00
Peter Hater
9817764e06 [MSAFD][WS2_32] Better WSASocket parameters check
CORE-12104

svn path=/trunk/; revision=73068
2016-10-29 18:22:22 +00:00
Pierre Schweitzer
e75da19bb3 [BTRFS]
Sync btrfs to 0.7.

CORE-12223

svn path=/trunk/; revision=73062
2016-10-29 17:05:10 +00:00
Pierre Schweitzer
210d27427c [DDK]
Define IDENTIFY_DEVICE_DATA (from MSDN).

CORE-12223

svn path=/trunk/; revision=73061
2016-10-29 16:53:45 +00:00
Thomas Faber
b6d3cf9388 [MKISOFS]
- Fix VS 2015 build
CORE-11988

svn path=/trunk/; revision=73060
2016-10-29 11:54:19 +00:00
Thomas Faber
8d77737ce9 [NTDLL_APITEST]
- Add tests for NtWriteFile with buffer sizes larger than an MDL can describe.
CORE-12132

svn path=/trunk/; revision=73059
2016-10-29 11:39:07 +00:00
Thomas Faber
ba1509ef9e [KMTESTS:IO]
- Add a test case for trying to open a file "inside" a file to IoFilesystem
ROSTESTS-135

svn path=/trunk/; revision=73058
2016-10-29 11:20:58 +00:00
Benedikt Freisen
3d592530f4 [MSPAINT] refactor RegistrySettings::SetWallpaper, also changing its signature to make it more usable
svn path=/trunk/; revision=73055
2016-10-28 19:48:25 +00:00
Peter Hater
85f275a284 [MSAFD] Fix handle counting in WSPSelect and improve TDI request according to MSDN.
CORE-12104

svn path=/trunk/; revision=73054
2016-10-28 16:37:39 +00:00
Peter Hater
b21dc336da Fix build
svn path=/trunk/; revision=73053
2016-10-28 07:11:20 +00:00
Peter Hater
c05f8b29ef [WS2_32_APITESTS] Add tests for WSAAsync original by Miroslav Mastný. Converted to api test by me.
CORE-12152 #resolve #comment Thanks

svn path=/trunk/; revision=73052
2016-10-28 07:01:16 +00:00
Colin Finck
96877abf85 [MKISOFS]
Import a minimal version of the highly portable mkisofs tool from schily-2016-10-27 (https://sf.net/projects/schilytools) and use it for creating ReactOS ISOs from now on.

mkisofs is the de-facto standard ISO creation tool on most platforms and actively maintained.
Compared to cdmake, its features have matured and it adds ISO9660:1999 support among many other things.
I can import its UDF features as soon as we need them.

mkisofs has been integrated into our buildsystem in the sdk/tools/mkisofs folder with these subfolders:
* "reactos"
  Host-specific include files that are usually generated by the upstream buildsystem. For us, I have handcrafted them to be enough for mkisofs and compatible with Windows, Linux and Mac OS X.
  Follow the original layout of the generated files whenever you have to edit these.
* "schilytools"
  Contains the actual mkisofs code and dependencies while maintaining the original directory layout.
  Only synchronize with newer versions, but never modify. Submit patches upstream instead :)

ISOs are now being built with a single ISO9660:1999 filesystem instead of classic ISO9660 + Joliet.
For the moment, you can switch back to cdmake using -DUSE_MKISOFS:BOOL=0 on the CMake commandline. cdmake will be completely removed in about a month if no problems occur.

CORE-11988

svn path=/trunk/; revision=73051
2016-10-27 22:51:59 +00:00
Thomas Faber
f642128e8f [PROGMAN]
- Fix MSVC warnings
- Use strsafe printf

svn path=/trunk/; revision=73050
2016-10-27 10:21:13 +00:00
Hermès Bélusca-Maïto
3d8a01fc0d [DESK.CPL]: Fix "antiali(a)sed" typo, caught by DopefishJustin; complete the other translations.
svn path=/trunk/; revision=73049
2016-10-27 00:07:29 +00:00
Hermès Bélusca-Maïto
72d0c2396c [README.WINE]: After Colin's print merging in r73039, some files are not WINE-synced anymore: localspl, spoolss; ntprint is completely removed now (will be reimplemented later on). The only remaining file is localui.dll, that is now found under win32ss/printing/monitors/localmon/ui/.
CORE-10489

svn path=/trunk/; revision=73048
2016-10-26 22:54:05 +00:00
Hermès Bélusca-Maïto
688b18d88c [WINSPOOL_PRINT]: Improve the test application:
- Do not hardcode the test file name, but instead take it from the command line (and add a Usage() function);
- Do not use a too large fixed-size buffer to read & print the file, but instead use a correctly-size buffer, get the file size, and then do a loop to read data from the file by chunks & send it to the printer.

svn path=/trunk/; revision=73047
2016-10-26 22:43:53 +00:00
Hermès Bélusca-Maïto
b5beb7dffc Fix a comment.
svn path=/trunk/; revision=73046
2016-10-26 22:06:02 +00:00
Hermès Bélusca-Maïto
c3363cb938 [DESK.CPL]: Patch by Ismael Ferreras Morezuelas:
Implement all the controls in the ``Effects'' section of desk.cpl, except 'Big icons'; make the comboboxes slightly wider; rename user-facing ``ClearType'' to ``FreeType Antialised'' as a nod to the supporting library while avoiding patented and trademarked words.
CORE-10606

svn path=/trunk/; revision=73045
2016-10-26 22:02:24 +00:00
Hermès Bélusca-Maïto
60cf552825 [DESK.CPL]: Fix trailing whitespace, some indent + code formatting style.
svn path=/trunk/; revision=73044
2016-10-26 21:14:39 +00:00
Hermès Bélusca-Maïto
682cc491e7 [EVENTVWR]
- Fix FormatMessage flags sanitization.
- Use "LANG_USER_DEFAULT" instead of MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT) (these are the same, but one is shorter than the other).
- In case LookupAccountSidW fails to retrieve the user name of an associated SID, use ConvertSidToStringSidW to get the SID string directly and display it, instead of claiming there is no associated user for a given event.
- In addition to display (in the status bar) the number of events in the selected log, display the number of events actually listed. This can be useful when events filtering will be completely implemented, and it can be also useful for detecting possible corrupted logs where the number of enumerable events is different (less) than the total number of events in the log...
==> To translators: please update the translations!
CORE-11637

svn path=/trunk/; revision=73043
2016-10-26 20:32:11 +00:00
Johannes Anderwald
1ac7d54efd [USBAUDIO]
- implement audio volume property handler

svn path=/trunk/; revision=73042
2016-10-26 18:09:19 +00:00
Colin Finck
3720040f9d [LOCALUI]
Replace the "localui.dll" from my branch with the newer version in trunk.
This is one of the very few (if not the only) printing component that we can continue to sync with WINE, because it only uses Win32 API to communicate with the Local Port Monitor (localmon.dll in our implementation).

svn path=/trunk/; revision=73040
2016-10-26 12:47:39 +00:00
Colin Finck
fcaeb4d6a4 [PRINTING]
Finally merge my branch "colins-printing-for-freedom", giving us an initial implementation of a Win32-compatible Printing Stack (localmon, localspl, spoolss, spoolsv, winspool)
You can now send raw data to parallel port printers using documented Win32 API. An example application is in my "winspool_print" commandline tool merged to rosapps.
ReactOS folks, thanks for your support during the development of this, making my bachelor's thesis a reality! :)

Documentation/Thesis: https://svn.reactos.org/reactos/trunk/documentation/articles/Printing%20Stack%20Thesis/thesis.pdf
Video: https://www.youtube.com/watch?v=cNzePucTOLY

CORE-10489

svn path=/trunk/; revision=73039
2016-10-26 12:37:27 +00:00
Kamil Hornicek
2c8607a700 [WIN32K]
- fix a typo in the default logical palette copy
- fix color table computation for 8 bpp in GreGetDIBitsInternal (formula taken from gdi32:bitmap winetest)

svn path=/trunk/; revision=73038
2016-10-26 10:21:46 +00:00
Hermès Bélusca-Maïto
c51f0d6551 And the usual thing... "fix build".
svn path=/trunk/; revision=73036
2016-10-25 23:57:35 +00:00
Hermès Bélusca-Maïto
1f9c38b3b9 [EVTLIB]: Create a EvtLib library for manipulating the event log file format from anywhere.
[EVENTLOG]: Make usage of this library.
CORE-11868 #resolve #comment Committed in r73035.

[EVENTLOG]: Protect the global handle table with a lock as it seems to me that this needs serialization. Please notify me if you think this is not actually necessary (and I'll revert that in case).

svn path=/trunk/; revision=73035
2016-10-25 23:50:31 +00:00
Hermès Bélusca-Maïto
34a06851d3 [EVENTLOG]
- Update code source files headers.
- Use explicit unicode functions for RegOpen/Query/SetXXX and safe-string APIs.
- Use GetSystemWindowsDirectoryW where needed instead of GetWindowsDirectoryW (TS-safe).
- Fix some variable names & types.
- Improve some DPRINTs.

svn path=/trunk/; revision=73034
2016-10-25 23:32:20 +00:00
Johannes Anderwald
496573473b [USBAUDIO]
- implement mute control property handler

svn path=/trunk/; revision=73033
2016-10-25 19:20:09 +00:00
Kamil Hornicek
fe5595d60d [GDI32]
- comply with MSDN and stop enumerating font families as soon as the user provided callback returns zero
- fixes bunch of user32:sysparams tests which rely on this

svn path=/trunk/; revision=73032
2016-10-25 17:08:05 +00:00
Peter Hater
263afc07c3 [WSHTCPIP] Don't return NO_ERROR in unimplemented WSHIoctl. It only confuses programs. Return WSAEINVAL. CORE-12104
svn path=/trunk/; revision=73031
2016-10-25 09:23:40 +00:00
Peter Hater
ca5719a178 [MSAFD] Implement WSPIoctl overlapped. CORE-12162 #resolve
svn path=/trunk/; revision=73030
2016-10-25 07:54:00 +00:00
Jérôme Gardou
04442ae74c [NTOS/MM]
- Arch striking again : take everywhere into account the +1 offset introduced in r72988
CORE-12047

svn path=/trunk/; revision=73029
2016-10-23 18:59:42 +00:00
Aleksandar Andrejevic
1ef056a0ed [NTVDM:VBE]: Don't crash if the video mode is invalid.
svn path=/trunk/; revision=73028
2016-10-23 17:21:58 +00:00
Hermès Bélusca-Maïto
6fcebba53b [CMAKE]: Introduce a evil workaround for the problem described in CORE-12205/CORE-12206, that was unveiled by commit r73024. CMake gurus, please review & make suggestions! :)
svn path=/trunk/; revision=73027
2016-10-22 22:51:34 +00:00
Hermès Bélusca-Maïto
00a8b0a3c8 [WLANCONF]: Addendum to r73024.
svn path=/trunk/; revision=73026
2016-10-22 22:15:10 +00:00
Hermès Bélusca-Maïto
6f5d03b414 [MORE]: Rewrite almost completely the MORE command, taking advantage of the console pager functionality of the ConUtils library (see CORE-10504 and commit r73024).
- When displaying files, display the percentage of file read so far in the "Continue" prompt. Otherwise (when being piped or feeded from StdIn), just display the "Continue" prompt without percentage.
- Try to detect the text file encoding (ANSI, UTF16-BE/BE w/ or w/o BOM; UTF-8 to do!!) before displaying it. See the code for more details.

NOTE that the other functionalities of more (being able to scroll one line at a time, other command-line switches, etc...) are still not implemented yet.

svn path=/trunk/; revision=73025
2016-10-22 22:07:28 +00:00
Hermès Bélusca-Maïto
eb198b854d [CONUTILS]
- Introduce new functionalities related to console streams, a console screen management api (almost stubbed), a console pager api (adapted from code from CMD). This new functionality will be used in the future. See CORE-10504 for more details.
- As this library is therefore growing up, split it in small parts (sublibraries) that can be used, with the following dependency scheme: base utils (standalone); streams depending on base; screen depending on streams; pager depending on screen.

[APPS]: As a result, modify the CMakeLists of the different apps that use conutils to make them depend on the correct sublibrary.

svn path=/trunk/; revision=73024
2016-10-22 21:54:29 +00:00
Hermès Bélusca-Maïto
26cf82fa5b [MODE]: Forgot this change too (related to kbd rate before delay).
svn path=/trunk/; revision=73023
2016-10-22 21:46:58 +00:00
Hermès Bélusca-Maïto
0c5fc9b3b5 [CLIP]: Check read status before number of bytes read. Update main resource file.
[COMP]: Code style fix; remove an unused define.
[EVENTCREATE]: Remove an unused define.

[HELP]
- Remove unneeded headers; minor code formatting.
- Remove an unused define.
- Add placeholder Czech resource translation.

[MODE]: Update translation (part 2/x); show the keyboard rate before the delay.

svn path=/trunk/; revision=73022
2016-10-22 21:42:13 +00:00
Johannes Anderwald
a3f82b7d7b [KS]
- enable topology property handlers

svn path=/trunk/; revision=73021
2016-10-22 19:52:51 +00:00
Johannes Anderwald
5dc6c5bb88 [USBAUDIO]
- fix warnings & leaks based on Thomas feedback

svn path=/trunk/; revision=73020
2016-10-22 12:34:03 +00:00
Mark Jansen
d0b74180b2 [FRAGINATOR] Silence a ton of warnings.
svn path=/trunk/; revision=73019
2016-10-22 12:13:34 +00:00
Mark Jansen
9efe78ac9f [OLE32] Stub and export CoGetCancelObject. CORE-12199
svn path=/trunk/; revision=73018
2016-10-22 12:03:33 +00:00
Johannes Anderwald
3e7f31ebe1 - implement MMixerGetDeviceNameWithComponentId, which retrieves the device name via component id
- start implement MMixerHandleTopologyFilter, does not yet fully work

svn path=/trunk/; revision=73017
2016-10-21 21:26:12 +00:00
Johannes Anderwald
a9a9930090 [USBAUDIO]
- implement retrieving string descriptor of product and store it in registry.

svn path=/trunk/; revision=73016
2016-10-21 21:15:01 +00:00
Hermès Bélusca-Maïto
6357011e41 [ADVAPI32_APITEST]: I wasn't alone for writing these tests!
svn path=/trunk/; revision=73015
2016-10-21 21:08:54 +00:00
Johannes Anderwald
3423877df1 [USBCCGP]
- fix invalid device descriptor for composite usb devices

svn path=/trunk/; revision=73014
2016-10-21 20:52:40 +00:00
Hermès Bélusca-Maïto
6672ea6af0 [MODE]: Adjust german resources.
svn path=/trunk/; revision=73013
2016-10-21 20:48:26 +00:00
Robert Naumann
dbf62b106c [MODE] add initial German translation. needs completition!!!
svn path=/trunk/; revision=73012
2016-10-21 20:44:38 +00:00
Peter Hater
08744dfc42 [WS2_32_APITESTS] Add tests for SIO_GET_INTERFACE_LIST. Brought to you by Andreas Maier. Thanks.
Minor modifications by me on comparison and expected flags.
ROSTESTS-246

svn path=/trunk/; revision=73011
2016-10-21 16:47:38 +00:00
Amine Khaldi
3315eae709 [ACPPAGE] Remove unneeded initialization. Should make the x64 bot a tiny bit happier. Spotted by Mark Jansen.
svn path=/trunk/; revision=73010
2016-10-21 09:48:00 +00:00
Amine Khaldi
8a6585ff73 [PSDK] Add missing RpcBindingServerFromClient.
svn path=/trunk/; revision=73009
2016-10-21 09:26:11 +00:00
Amine Khaldi
d61d2809de [URLMON] Stub and export HlinkGoForward(). CORE-12196
svn path=/trunk/; revision=73008
2016-10-21 09:03:45 +00:00
Amine Khaldi
a4cfe8d2da [RPCRT4_WINETEST] Addendum to r73006.
svn path=/trunk/; revision=73007
2016-10-21 09:02:08 +00:00
Amine Khaldi
c0e27b85ab [RPCRT4] Import Wine commit 01290cd by Colin and Christoph: Implement RpcBindingServerFromClient and populate NetworkAddr for each transport.
svn path=/trunk/; revision=73006
2016-10-21 09:01:35 +00:00
Pierre Schweitzer
708359754c [MPR]
Import Wine commit:
- d9c9d9b10f58844a780d8bfc9ed1b6713e37d487, Implement connected resources enumeration.

CORE-11757

svn path=/trunk/; revision=73005
2016-10-21 05:28:29 +00:00
Mark Jansen
a29538f1b9 [WINETESTS] Rename generated_i386.c to generated.c, adjust the CMakeLists.txt accordingly.
svn path=/trunk/; revision=73004
2016-10-20 21:44:12 +00:00
Mark Jansen
9fabe9b420 [SDK] Fix our Delayload notify hook for MSVC x64
svn path=/trunk/; revision=73003
2016-10-20 21:08:17 +00:00
Mark Jansen
a62945fc94 [APPHELP_APITEST] This should not be here.
svn path=/trunk/; revision=73002
2016-10-20 21:03:38 +00:00
Hermès Bélusca-Maïto
252f96e3b1 [KS]: Fix annotations, etc.
svn path=/trunk/; revision=73001
2016-10-20 20:44:02 +00:00
Johannes Anderwald
b8e67c826c [PSDK]
- add missing definition

svn path=/trunk/; revision=73000
2016-10-20 20:29:30 +00:00
Johannes Anderwald
3b8ab07631 [KS]
- implement support for KSPROPSETID_General

svn path=/trunk/; revision=72999
2016-10-20 20:02:43 +00:00
Hermès Bélusca-Maïto
38933ca790 [CMD]: Documentation improvement: we actually support two types of filename completions, windows-cmd like (the default one), and "bash-style" one (that is available through a compile switch). I prefer calling it "bash-style" over "unix-style" because this style of completion looks like the one from the GNU ReadLine library, that is used by Bash, which is not exclusive to unix per se...
svn path=/trunk/; revision=72998
2016-10-20 16:51:07 +00:00
Hermès Bélusca-Maïto
99ef1a3353 [KERNEL32]: Mark Get/SetEnvironmentVariableA/W as hotpatchable since it's needed for Clink 0.4.8 (<rant>btw, if GCC was able to set exported stdcall functions as hotpatchable at a global level, as MSVC does, those "DECLSPEC_HOTPATCH" hacks would not be necessary! </rant>)
svn path=/trunk/; revision=72997
2016-10-19 22:26:04 +00:00
Hermès Bélusca-Maïto
7f59e9a13c [MODE]
- Localization of output based on a patch by Lee Schroeder, but where I haven't modified yet the output localization of errors.
- Dynamically underline the headers of the device status reports (by me).
CORE-12178

svn path=/trunk/; revision=72996
2016-10-19 17:04:29 +00:00
Hermès Bélusca-Maïto
d259d035bc [MODE]
- Rearrange ResizeTextConsole so that it correctly computes the Top & Bottom parts of the window size rectangle;
- Fix its return type;
- Display an error if we failed resizing the console;
- Clear the screen before resizing the console, as the real MODE.COM does.
- Fix a parsing error in SetConsoleStateOld and in SetConsoleCPState.

svn path=/trunk/; revision=72995
2016-10-19 15:04:42 +00:00
Hermès Bélusca-Maïto
4c38c9a07e [MODE]: Code style changes + remove unused parameter for ResizeTextConsole.
svn path=/trunk/; revision=72994
2016-10-19 15:00:32 +00:00
Hermès Bélusca-Maïto
2e6eddbc97 [CONSRV]
- Call TermGetLargestConsoleWindowSize to obtain the largest console window size allowed on the system, and use it for GetConsoleScreenBufferInfo and for SetConsoleWindowInfo too, where it is used to check if the given user window size is not too large.
- Improve GuiGetLargestConsoleWindowSize for multi-monitor situations.
- Remove the redundant definition of GetScreenBufferSizeUnits in guiterm.c (it already exists in conwnd.c).

svn path=/trunk/; revision=72993
2016-10-18 23:51:59 +00:00
Hermès Bélusca-Maïto
be43197190 [CONSRV]: Code style changes only.
svn path=/trunk/; revision=72992
2016-10-18 23:45:19 +00:00
Pierre Schweitzer
a8e3f3a292 [PSDK]
Replace error codes that don't even exist in MS headers (but they are referenced on MSDN?!)
Replace their usage in code

svn path=/trunk/; revision=72991
2016-10-18 20:32:50 +00:00
Jérôme Gardou
3a5149de3e [NTOS/MM]
- Let the zero page thread decide itself whether it is active or not.
 - Raise the low memory limit for our good old balancer
 - Allow the balancer thread to wait for a page to be freed, with a lower limit than for "regular" page faults
 - Let ARM3 notify RosMm when a page gets freed
CORE-12047 #comment Whole patch got in in r72988, 72989 and 72990

svn path=/trunk/; revision=72990
2016-10-18 20:19:00 +00:00
Jérôme Gardou
63bbaff803 [NTOS/MM]
Miscellaneous fixes for legacy Mm section implementation
 - Always allocate a private page for IMAGE_SCN_CNT_UNINITIALIZED_DATA
 - Make sure a shared page is present before writing on a COW mapping and making a private copy.
 - Fix a race condition : when paging out a file section, old Mm lists all of the process maps, removing them one after the other and lowering the page reference count in the process. Sometimes a page fault occur in the process, the mapping is added, but the page refcount is not bumped because it requires locking the corresponding segment. Manage page refcount under segment lock.
CORE-12047

svn path=/trunk/; revision=72989
2016-10-18 20:01:18 +00:00
Jérôme Gardou
d46dd383f6 [NTOS/MM]
- Do not allocate zeroed pagefile entries for legacy Mm
CORE-12047

svn path=/trunk/; revision=72988
2016-10-18 19:55:22 +00:00
Jérôme Gardou
72c8ed3670 [FASTFAT]
- Acquire Paging IO Resource shared when performing paged writes 
Greenlighted by Pierre and tests.
CORE-12184 #resolve 

svn path=/trunk/; revision=72987
2016-10-18 19:28:16 +00:00
Pierre Schweitzer
6fa7ff1eba [PSDK]
Make DECLARE_CONST_UNICODE_STRING() work with something else than MSVC

svn path=/trunk/; revision=72986
2016-10-18 18:28:45 +00:00
Hermès Bélusca-Maïto
0508cc702d [KERNEL32_APITEST]: SetConsoleWindowInfo test:
- Improve the checks done for the tests;
- Add a new test (Test7) that tests the allowed console window sizes wrt. the csbi.dwMaximumWindowSize size.

svn path=/trunk/; revision=72985
2016-10-18 17:44:23 +00:00
Hermès Bélusca-Maïto
76c73fc423 [CONSRV]: Fixes for SetConsoleWindowInfo, where one notices that again the MSDN documentation on SetConsoleWindowInfo is partially wrong.
This makes all the kernel32_apitest:SetConsoleWindowInfo tests pass now.
Also, notify the console window about the size change.

svn path=/trunk/; revision=72984
2016-10-18 17:16:57 +00:00
Hermès Bélusca-Maïto
0d6632cdfb [CONSRV]: Minor fixes:
- Use GetSystemWindowsDirectoryW instead of GetWindowsDirectoryW inside "TranslateConsoleName";
- Don't add scrollbars by default to the console window when it's being created;
- Fix the 2nd parameter of MapVirtualKeyW call;
- Two code style changes in text.c and tuiterm.c.

svn path=/trunk/; revision=72983
2016-10-18 17:12:57 +00:00
Hermès Bélusca-Maïto
916943b1c4 [KERNEL32_APITEST]: Imprrove the SetConsoleWindowInfo test (add a new test case, and now correctly restores the console size after all the tests are done).
svn path=/trunk/; revision=72982
2016-10-18 16:08:34 +00:00
Hermès Bélusca-Maïto
ae221a8274 [KERNEL32_APITEST]: Commit a test for SetConsoleWindowInfo.
svn path=/trunk/; revision=72981
2016-10-18 15:35:06 +00:00
Hermès Bélusca-Maïto
533d9d5f59 [MODE]: Numerous fixes for the MODE utility:
- Parse the command line the same peculiar way as Windows' mode.com tool. This is certainly done such as to be backwards-compatible with MS-DOS' tool.
- Fix serial port string parsing, based on Wine's dll/win32/kernel32/wine/comm.c code. Note that the BuildCommDCB kernel32 API has the same syntax :)
- Implement support for MODE CON codepage, as well as screen size and typematic settings. Screen size code is based on NTVDM's one and will be subject to fixes later on.

MISSING stuff:
- LPT/COM port redirection.
- Localization :)

CORE-12176 #resolve
CORE-7998 CORE-8001

svn path=/trunk/; revision=72980
2016-10-17 22:19:22 +00:00
Johannes Anderwald
cad3120307 [WDMAUD]
- fix a bug in WdmAudControlDeviceType
- clear handle value when opening device interface key fails

svn path=/trunk/; revision=72979
2016-10-17 19:03:01 +00:00
Peter Hater
39544b234b [MSAFD] Add some parameter checks on send/recv based on wine tests. CORE-12104
svn path=/trunk/; revision=72978
2016-10-17 15:24:43 +00:00
Mark Jansen
ee50a9c889 [ATL][ATL_APITEST] Implementation / fixes for varions CRegKey functions, by Katayama Hirofumi MZ. CORE-11746 #resolve
svn path=/trunk/; revision=72977
2016-10-17 12:50:54 +00:00
Thomas Faber
14a0d23f4c [KMTESTS:OB]
- Add a test for the NT directory structure's ACLs
CORE-9184

svn path=/trunk/; revision=72976
2016-10-17 09:28:15 +00:00
Thomas Faber
85fa521728 [NTOS:CM]
- Ignore the KEY_WOW64_32KEY and KEY_WOW64_64KEY flags in NtOpenKey/NtCreateKey, as shown by tests.
CORE-9691 #resolve

svn path=/trunk/; revision=72975
2016-10-15 20:16:47 +00:00
Thomas Faber
0d36dcef60 [NTDLL_APITEST]
- Show that NtOpenKey and NtCreateKey accept, but ignore, KEY_WOW64_32KEY and KEY_WOW64_64KEY
CORE-9691

svn path=/trunk/; revision=72974
2016-10-15 18:33:21 +00:00
Johannes Anderwald
9bd7a7db6d [USBAUDIO]
- implement building topology connections

svn path=/trunk/; revision=72973
2016-10-15 17:56:44 +00:00
Benedikt Freisen
38d01b32ac [MSPAINT]
- fix an odd quirk that resulted from Paint setting wallpaper and wallpaper style in the wrong order
- add the flag SPIF_SENDWININICHANGE

Setting wallpapers now works, whenever the OS natively supports the respective file format for wallpapers.

svn path=/trunk/; revision=72972
2016-10-15 11:44:15 +00:00
Johannes Anderwald
5c2a0471bd [USBAUDIO]
- partly implement BuildUSBAudioFilterTopology

svn path=/trunk/; revision=72971
2016-10-14 22:08:28 +00:00
Johannes Anderwald
1c43c34853 [USBAUDIO]
- partly implement UsbAudioPinDataIntersect

svn path=/trunk/; revision=72970
2016-10-14 13:26:22 +00:00
Johannes Anderwald
4b5428d521 [USBAUDIO]
- specify processings flags in filter descriptor
- implement processing workers
- move code for initializing irp & urb into single function
- usbaudio now successfully captures audio in win2k3.

svn path=/trunk/; revision=72969
2016-10-14 10:35:19 +00:00
Amine Khaldi
25b64d3c35 [SHELL32] Add two missing AVIs. By Jared Smudde. CORE-11641
svn path=/trunk/; revision=72968
2016-10-13 21:46:39 +00:00
Amine Khaldi
e3d7748688 [EVENTVWR][EXPLORER][SHELL32] Russian translation update by Sergey Stopkin. CORE-12153
svn path=/trunk/; revision=72967
2016-10-13 21:39:37 +00:00
Peter Hater
a82f4b1f38 [MSAFD] Implement WSPGetOverlappedResult. Reviewed by Thomas and Art. Thanks! CORE-12134 #resolve
svn path=/trunk/; revision=72966
2016-10-13 20:30:42 +00:00
Mark Jansen
24100643a9 [NETCFGX] RegQueryValueExW accepts a size in bytes, not TCHARS. Also, this local buffer probably shouldnt be used. Uncovered by Victor Martinez Calvo. CORE-9665
svn path=/trunk/; revision=72965
2016-10-13 19:57:29 +00:00
Thomas Faber
6031bd0162 [KMTESTS:IO]
- Add a test for the maximum data length for MDLs
CORE-12132

svn path=/trunk/; revision=72964
2016-10-13 12:28:01 +00:00
Thomas Faber
4b9d31d916 [PSDK]
- ksmedia.h requires ks.h to be included first. Based on a patch by Lee Schroeder.
CORE-6783

svn path=/trunk/; revision=72963
2016-10-13 09:21:57 +00:00
Thomas Faber
1da8f46087 [PSDK]
- Add some KS definitions. Patch by Lee Schroeder
CORE-6783

svn path=/trunk/; revision=72962
2016-10-13 08:53:11 +00:00
Thomas Faber
6a96846321 [MSHTML_WINETEST]
- Re-enable skipped htmldoc tests.
ROSTESTS-113 #resolve

svn path=/trunk/; revision=72961
2016-10-12 21:10:04 +00:00
Thomas Faber
7f94fb8b3d [REGDUMP]
- Fix a buffer overflow. Patch by Víctor Martínez Calvo.
ROSTESTS-203 #resolve

svn path=/trunk/; revision=72960
2016-10-12 12:41:31 +00:00
Thomas Faber
3d2b354712 [USER32]
- Remove IsBadWritePtr hack. Patch by Katayama Hirofumi MZ.
CORE-12136 #resolve

svn path=/trunk/; revision=72959
2016-10-12 12:07:44 +00:00
Hermès Bélusca-Maïto
8fb10f0eea [WINETESTS/SETUPAPI]: setupapi/tests: Determine path to system32 directory at runtime. Synced from Wine-Staging commit 92510a34ed9ec67fec4e580a5c73b8b53c216734
ROSTESTS-234 #comment Updated in r72958.

svn path=/trunk/; revision=72958
2016-10-12 11:36:16 +00:00
Peter Hater
a0257c8b37 [WS2_32_APITESTS] Add super simple WSARecv tests used to test WSAGetOverlappedResult. ROSTESTS-197
svn path=/trunk/; revision=72957
2016-10-11 10:48:47 +00:00
Hermès Bélusca-Maïto
5bcbde18ec [CMD]: Fix the "TYPE" command so that it doesn't interpret the optional /P switch as a filename.
svn path=/trunk/; revision=72956
2016-10-10 19:17:03 +00:00
Hermès Bélusca-Maïto
b408826a0b [CMD]
- Improve the screen pager so that it looks a bit more like MORE's one: display full screen pages, where only the last line contains the "press any key..." prompt, and erase this prompt when a key is pressed and before displaying the other screen page.
- GetScreenSize parameters are pointers (so use NULL instead of 0);
- Use ARRAYSIZE instead of hardcoding buffer number of elements;
- Simplify PrintInfoLine() (use read-only resource string buffer returned by LoadString instead of a temporary buffer, since we are just interested in the counted string).

svn path=/trunk/; revision=72955
2016-10-10 19:15:07 +00:00
Hermès Bélusca-Maïto
8fbd67bc4a [CMD]
- Fix typo in STRING_MEMMORY_xxx symbols (memmory -> memory);
- Remove the trailing newline for the STRING_MISC_HELP1 page prompt, as part of reworking it a bit (see next commit);
- Code formatting in type.c as I'll touch it after.

svn path=/trunk/; revision=72954
2016-10-10 19:11:15 +00:00
Peter Hater
05f82b6443 [MSAFD] We support AF_INET,SOCK_RAW,IPPROTO_RAW and IF_INET,SOCK_RAW,IPPROTO_TCP triples also. Enable them in winsock mapping registry. CORE-12104
svn path=/trunk/; revision=72953
2016-10-10 08:00:20 +00:00
Peter Hater
81eb620cc0 [MSAFD] We support SOCK_RAW and IPPROTO_RAW also. CORE-12104
svn path=/trunk/; revision=72952
2016-10-10 07:57:34 +00:00
Peter Hater
f58ddd3b46 [WINHTTP] Properly initialize winsock. Based on wine tests CORE-12104
svn path=/trunk/; revision=72951
2016-10-10 06:54:56 +00:00
Peter Hater
0ebbe83388 [WININET] initialize winsock with proper version. Based on wine tests CORE-12104
svn path=/trunk/; revision=72950
2016-10-10 06:52:40 +00:00
Peter Hater
9017581a14 [WS2_32_APITESTS] Fix helper by not shutting down send. This way it breaks the test on windows also.
svn path=/trunk/; revision=72949
2016-10-10 06:48:56 +00:00
Peter Hater
91a772cfd5 [MSAFD] Fix some return codes and better parameter checks based on wine tests CORE-12104
svn path=/trunk/; revision=72948
2016-10-10 06:38:52 +00:00
Mark Jansen
aef3f9c467 RegQueryValueExW and RegQueryValueExA calls accept bytes. Patch by Victor Martinez Calvo. CORE-9665 #comment Thanks!
svn path=/trunk/; revision=72947
2016-10-09 20:58:08 +00:00
Mark Jansen
fc0c290789 [MSCONFIG_NEW|SETUP/WELCOME] Capitalize "os" in "ReactOS" part 4 by Adam Stachowicz CORE-9558 #resolve #comment Last patch applied, thanks!
svn path=/trunk/; revision=72946
2016-10-09 20:20:10 +00:00
Benedikt Freisen
2a5f64604f [MSPAINT] get rid of all _stprintf occurrences and the respective magic number sized TCHAR arrays
svn path=/trunk/; revision=72945
2016-10-09 11:42:37 +00:00
Hermès Bélusca-Maïto
84a2080689 [EVENTCREATE]: Update turkish translation, by Erdem Ersoy.
CORE-12120 #resolve #comment Committed, thanks!

svn path=/trunk/; revision=72944
2016-10-08 19:43:16 +00:00
Hermès Bélusca-Maïto
8dd8a9d989 [PING]
- Use a dynamic-allocated buffer with FormatMessageW, fixes messages disappearance (eg. ping help in russian). CORE-12108 #comment Fixed in r72943.
- Remove the unneeded 1-line function "Usage" and instead just directly call the corresponding PrintString function.

svn path=/trunk/; revision=72943
2016-10-08 14:48:18 +00:00
Hermès Bélusca-Maïto
d03fd72465 [DEVMGR]: Fix spacing around "ReactOS" in translated strings.
svn path=/trunk/; revision=72942
2016-10-08 14:20:22 +00:00
Hermès Bélusca-Maïto
8b0c046e3c [FLTMC]: Resource strings do not need to be explicitely NULL-terminated, as ATL helpers know how to deal with them.
svn path=/trunk/; revision=72941
2016-10-08 14:05:06 +00:00
Hermès Bélusca-Maïto
2bc77973f5 [FORMAT]: Fix ukrainian translation by Vort.
svn path=/trunk/; revision=72940
2016-10-08 13:55:30 +00:00
Hermès Bélusca-Maïto
3d9c96162e Fix commit synchronization issue (that's what happens when you work on a patch that somebody else worked on in parallel!!)
svn path=/trunk/; revision=72939
2016-10-08 13:13:38 +00:00
Hermès Bélusca-Maïto
8b14a4a88a [TRANSLATIONS]: Russian translation update by Sergey Stopkin.
CORE-12108 #comment Спасибо!

svn path=/trunk/; revision=72938
2016-10-08 13:12:35 +00:00
Amine Khaldi
aec4ce26d4 [TRANSLATIONS] Russian translation update by Sergey Stopkin. CORE-12108
svn path=/trunk/; revision=72937
2016-10-08 12:57:53 +00:00
Amine Khaldi
d550219e4c [PING] German translation by Joachim Henze. CORE-12117
svn path=/trunk/; revision=72936
2016-10-08 12:50:15 +00:00
Thomas Faber
628956f819 [GDI32]
- Remove handling of BS_DIBPATTERN8X8 in CreateBrushIndirect. Fixes the last gdi32:brush winetest failure. Patch by Víctor Martínez Calvo.
CORE-9673 #resolve

svn path=/trunk/; revision=72935
2016-10-08 08:28:08 +00:00
Mark Jansen
c9c3a517b2 [MSGINA] Fix the order of checking for a valid / visible window, spotted by 'leha-bot' CORE-12028
svn path=/trunk/; revision=72934
2016-10-07 23:11:17 +00:00
Hermès Bélusca-Maïto
330db984fe [DISKPART][NET][WLANCONF]
Make those command tools use the console uilities library, aka. solve all those problems of wrong characters on the console...
CORE-10584 #resolve

[CONUTILS]: Remove the now unneeded compatibility defines.
CORE-10504

svn path=/trunk/; revision=72933
2016-10-07 22:50:32 +00:00
Hermès Bélusca-Maïto
4c4b769ef2 [LOGOFF]: Code formatting fixes, including tabs vs. spaces.
svn path=/trunk/; revision=72932
2016-10-07 22:08:20 +00:00
Hermès Bélusca-Maïto
0b335753ce [CONUTILS]: Fix build:
- Commit the *Puts functions.
- Fix __stdcall that needs to be read __cdecl for variadic functions.

svn path=/trunk/; revision=72931
2016-10-07 21:57:59 +00:00
Hermès Bélusca-Maïto
cc5ded3854 [CACLS][CLIP][COMP][EVENTCREATE][HELP][LOGOFF][SHUTDOWN][CHKDSK][FORMAT][SUBST]
- Use Puts functions where needed;
- Fix a __stdcall that needs to be read __cdecl for a variadic function.

[CACLS]
Fix some resources so that the strings can hold on the width of a standard console screen (80 chars).

svn path=/trunk/; revision=72930
2016-10-07 21:57:12 +00:00
Hermès Bélusca-Maïto
bf2828383e Fix build.
svn path=/trunk/; revision=72929
2016-10-07 20:44:15 +00:00
Hermès Bélusca-Maïto
bc065fb271 [CACLS][CLIP][COMP][HELP][LOGOFF][SHUTDOWN][CHKDSK][FORMAT][SUBST]
Make those command tools use the console uilities library, aka. solve all those problems of wrong characters on the console...
Nitpickers may notice that at some places, the usage of a "Puts"-like function would be better than Printf. Don't worry, I'm on it, it's for another commit.
CORE-10504
CORE-11909 #resolve

svn path=/trunk/; revision=72928
2016-10-07 20:37:36 +00:00
Mark Jansen
2ff4f82972 [NETID] Cleanup the spec file. Patch by Jared Smudde. CORE-11309 #resolve
svn path=/trunk/; revision=72927
2016-10-07 18:40:45 +00:00
Christoph von Wittich
ee7a3fece4 [MSAFD] Implement WSPDuplicateSocket. By Peter Hater. CORE-12092
svn path=/trunk/; revision=72926
2016-10-07 17:51:03 +00:00
Johannes Anderwald
eb204e920d [USBAUDIO]
- use IoInitializeIrp over IoAllocateIrp
- reinitialize irp and urb when resubmitting it
- usbaudio now successfully transfers stream irps (not yet fully working)

svn path=/trunk/; revision=72925
2016-10-07 17:30:27 +00:00
Christoph von Wittich
4c5f898585 [WS2_32] fix various ws2_32:sock failures with return codes. By Peter Hater. CORE-12104
svn path=/trunk/; revision=72924
2016-10-07 16:17:49 +00:00
Thomas Faber
d47e800182 [DWNL]
- Handle arbitrary console buffer width in write_status
CORE-10228 #resolve

svn path=/trunk/; revision=72923
2016-10-07 15:25:20 +00:00
Hermès Bélusca-Maïto
f239ca0f04 [KD]
- When enabling or disabling the kernel debugger and setting the KdDebuggerEnabled flag, also update the corresponding user-mode flag in SharedUserData->KdDebuggerEnabled.
- Turn KdpGetMemorySizeInMBs into a INIT_FUNCTION.
- Print kernel command line & ARC paths even in debug log file mode.

[KD64]
WinKD: Also print our nice ReactOS debug header (version, # of processors & memory MB, kernel command line and ARC paths).

svn path=/trunk/; revision=72922
2016-10-06 19:01:33 +00:00
Amine Khaldi
9593c338c3 [CONUTILS] Addendum to r72913. CORE-10504
svn path=/trunk/; revision=72921
2016-10-06 14:20:16 +00:00
Hermès Bélusca-Maïto
fe98303465 [RAPPS(_NEW)][SETUP]: Last russian translation fixes, by Kudratov Olimjon, amber, and Sergey Stopkin.
CORE-11510 CORE-11636 #resolve #comment Fixed in r72920, thanks to you all!

svn path=/trunk/; revision=72920
2016-10-06 12:51:05 +00:00
Hermès Bélusca-Maïto
baf0c710d8 [RAPPS_NEW]: Whitespace fix in taiwan chinese language.
svn path=/trunk/; revision=72919
2016-10-06 12:48:37 +00:00
Hermès Bélusca-Maïto
5f68ab2401 [RAPPS][RAPPS_NEW]: Try to not hardcode types of variables in sizeofs, and use _countof where possible.
svn path=/trunk/; revision=72918
2016-10-06 12:22:32 +00:00
Amine Khaldi
894fa45ad2 [WS2_32_WINETEST] Sync with Wine Staging 1.9.20.
svn path=/trunk/; revision=72917
2016-10-06 11:15:59 +00:00
Thomas Faber
e8109a02b4 [SYSSETUP]
- Install the DHCP client service as part of nettcpip.inf. This ensures it does not try to run before tcpip is installed.
CORE-12011 #resolve

svn path=/trunk/; revision=72916
2016-10-06 10:57:29 +00:00
Daniel Reimer
48a354d428 [INF]
Update Root CAs removing "Juur-SK", "EBG Elektronik Sertifika Hizmet Saglayicisi" and "IGC/A"

svn path=/trunk/; revision=72915
2016-10-05 22:53:24 +00:00
Daniel Reimer
f37012d4bd [FONTS]
Next time I will update the doc folder, too...

svn path=/trunk/; revision=72914
2016-10-05 22:48:51 +00:00
Hermès Bélusca-Maïto
89db25b0b1 [CONUTILS]: Create a C library for console output/input functions, last-error messages display, etc. to be used for all of our internal command-line utilities. Useless user32.dll dependencies are removed thanks to this lib. Currently only output functions are supported.
CORE-10504

[EVENTCREATE]: Adapt EventCreate to use ConUtils library, as an example of how to use this library.

svn path=/trunk/; revision=72913
2016-10-05 17:40:22 +00:00
Hermès Bélusca-Maïto
b881e7c859 [KERNEL32]: Improve RtlUnwind spec export.
svn path=/trunk/; revision=72912
2016-10-05 17:30:56 +00:00
Hermès Bélusca-Maïto
699e9b4328 [INCLUDES/CRT]: Fix the definition of 'stderr' (that we have wrong since r38292); move it next to the _iob definition.
svn path=/trunk/; revision=72911
2016-10-05 14:30:59 +00:00
Amine Khaldi
5290f6cf12 [MSAFD] Fix socket address length returned in WSPAccept. By Peter Hater. CORE-8549
svn path=/trunk/; revision=72910
2016-10-05 09:39:12 +00:00
Amine Khaldi
cd930de18d [WS2_32] Fix returned size of socketaddr on accepting connection. By Peter Hater. CORE-8549
svn path=/trunk/; revision=72909
2016-10-05 09:37:52 +00:00
Amine Khaldi
c3b215936d [WS2_32_APITEST] Add tests for getnameinfo. By Peter Hater. CORE-8549
svn path=/trunk/; revision=72908
2016-10-05 09:33:03 +00:00
Sylvain Petreolle
9c1da77024 [NtUser]
Revert r72905.

svn path=/trunk/; revision=72907
2016-10-05 08:46:30 +00:00
Colin Finck
a0c5f491cd Add a directory guaranteed to be empty :)
Needed for CORE-11988 to add arbitrary empty directories to the ISO image using mkisofs.
This change can't be expressed in a patch, so I have to do it right here.

svn path=/trunk/; revision=72906
2016-10-04 23:12:55 +00:00
Sylvain Petreolle
63a22e2a2f [NtUser]
Turn an ERR into a TRACE.

svn path=/trunk/; revision=72905
2016-10-04 21:45:39 +00:00
Amine Khaldi
b00ebb4709 [MSAFD] Fix some error translations by Peter Hater. CORE-7487
svn path=/trunk/; revision=72904
2016-10-04 18:36:00 +00:00
Amine Khaldi
fed5729c81 [WS2_32_WINETEST] Enable test_address_list_query() again, now that CORE-12000 is resolved.
svn path=/trunk/; revision=72903
2016-10-04 18:32:09 +00:00
Amine Khaldi
12aba472ef [MSAFD] Partial implementation of SIO_ADDRESS_LIST_QUERY by Peter Hater. CORE-12000
svn path=/trunk/; revision=72902
2016-10-04 18:27:17 +00:00
Thomas Faber
bf8b336ec9 [USER32_APITEST]
- Fix build

svn path=/trunk/; revision=72901
2016-10-04 15:37:25 +00:00
Thomas Faber
0a783e0ff3 [USER32_APITEST]
- Extend GetUserObjectInformation tests by adding tests for UOI_NAME on the default as well as custom window stations/desktops.
CORE-12073

svn path=/trunk/; revision=72900
2016-10-04 15:14:30 +00:00
Colin Finck
dc5f65c8d9 [HOST_TOOLS]
Defining -fshort-wchar globally for all host tools breaks every possibility to interact with the host's Unicode support for some operating systems with 4 byte wchar_t (like Mac OS X).
Let's better define no additional global flags and only add -fshort-wchar for the host modules that really need a 2-byte wchar_t for writing ReactOS data files. These are cmlibhost, inflibhost, mkhive and xml2sdb.

Also add -Wno-multichar only for cmlibhost, where it's required.

In preparation for CORE-11988

svn path=/trunk/; revision=72899
2016-10-04 12:37:52 +00:00
Amine Khaldi
2a4fd5b529 [ADNS][DNSAPI] Fix a local resolving regression that led to some browsers crashing after startup. By Peter Hater. CORE-12072 CORE-12088
svn path=/trunk/; revision=72898
2016-10-04 07:55:15 +00:00
Hermès Bélusca-Maïto
1c4750792d [CLIPBRD][EVENTVWR][MPLAY32][WELCOME][SYSDM]
Fix the ShowLastWin32Error helpers:
- don't display the last error string if it's ERROR_SUCCESS (since the code usually expects to display the last error message in case of errors);
- *always* call FormatMessage with the FORMAT_MESSAGE_IGNORE_INSERTS flag enabled. Indeed if it happens that the message string associated to an error ID contains insert parameter placeholders, and since we don't give here FormatMessage any argument array, the call would result into a crash without this flag.

svn path=/trunk/; revision=72897
2016-10-03 12:22:29 +00:00
Alex Ionescu
eb94308bbb [NTOS]: Handle two complex failure paths, one of which is apparently easily reproducible by ntdll:om test (I'm guessing some invalid object attribute). Thanks to Amine and lentin. Haven't tested this, but hopefully fixes things (and doesn't leak).
svn path=/trunk/; revision=72896
2016-10-03 03:30:11 +00:00
Hermès Bélusca-Maïto
58d0c0b704 [EVENTCREATE]: Update the english, russian & turkish translations:
- Translate a string into english (that I forgot to do: english & turkish);
- Fix the allowed event ID range mentioned in the help (russian);
- The event log names should not be localized (turkish).

svn path=/trunk/; revision=72895
2016-10-02 21:49:03 +00:00
Amine Khaldi
5a80dc6298 [EVENTCREATE] Attempt to fix unrecognized escape sequence issue. Sergey please review. CORE-12069
svn path=/trunk/; revision=72894
2016-10-02 20:40:06 +00:00
Amine Khaldi
b0887ed28d [TRANSLATIONS] Turkish translation update by Erdem Ersoy. CORE-12089
svn path=/trunk/; revision=72893
2016-10-02 20:37:58 +00:00
Amine Khaldi
b88d0f18e9 [EVENTCREATE][PING] Russian translation update by Sergey Stopkin. CORE-12069
svn path=/trunk/; revision=72892
2016-10-02 19:26:45 +00:00
Giannis Adamopoulos
8a0defef3d [SHELL32]
- CNetFolder: Use the Folder class for the items shown. The same is done in shell extensions (in windows) that use the CDefaultContextMenu and want the Open and Explore verbs to be shown. This behaviour was first discovered by gigaherz when ntobjshex was tested in windows.
CORE-12086

svn path=/trunk/; revision=72891
2016-10-02 13:22:01 +00:00
Johannes Anderwald
1cfbbff51a [USBAUDIO]
- edit allocator framing struct to match endpoint requirements
- implement partly PinCaptureProcess, not yet working

svn path=/trunk/; revision=72890
2016-10-02 13:08:23 +00:00
Johannes Anderwald
160d7c5b1e [SDK]
- add missing definitions

svn path=/trunk/; revision=72889
2016-10-02 09:15:13 +00:00
Pierre Schweitzer
67cf4907ae [SHELL32]
When parsing the UNC names, start the connection to allow the user to browse the net folder immediately.
This is required for network providers which require the connections to be started before browsing (as VBoxNP).

This is likely a hack.

ROSAPPS-303
CORE-11757

svn path=/trunk/; revision=72888
2016-10-02 08:46:30 +00:00
Thomas Faber
bbc1b9deba [RTL]
- Only check for MBCS lead bytes in RtlIsTextUnicode if specifically requested
CORE-12027 #resolve for real this time

svn path=/trunk/; revision=72887
2016-10-02 08:34:30 +00:00
Hermès Bélusca-Maïto
e294510fcd [EVENTCREATE]: Update the lang files & make 1 stylistic change + remove trailing whitespace. No functionality changes.
svn path=/trunk/; revision=72886
2016-10-01 23:06:23 +00:00
Hermès Bélusca-Maïto
098c7ec631 [DISKPART]: Harmonize the source file info headers. No code changes.
svn path=/trunk/; revision=72885
2016-10-01 22:58:21 +00:00
Hermès Bélusca-Maïto
3eea4e5f2d [FORMAT]: Fix some resources.
svn path=/trunk/; revision=72884
2016-10-01 21:00:16 +00:00
Benedikt Freisen
66a9815a4e [MSPAINT]
- change type of haccel from HANDLE to HACCEL
- port registry code to ATL::CRegKey, which -- through its destructor -- should prevent handle leaks
- rename some parameters and variables
- incorporate some changes suggested by Carlo Bramini in CORE-12080

svn path=/trunk/; revision=72883
2016-10-01 20:04:43 +00:00
James Tabor
fb8f6fd2aa [NtUser]
- Turn off debug information.

svn path=/trunk/; revision=72882
2016-10-01 19:01:04 +00:00
James Tabor
0b4b25d0ed [User32_wineTest]
- Enable skipped test_activateapp tests.

svn path=/trunk/; revision=72881
2016-10-01 18:51:46 +00:00
James Tabor
d8c3f23447 [NtUser]
- Fix lockup while testing wine test_activateapp (all the tests including the ones commented out). Reordered focus functions to eliminate recursions. Fix ROSTESTS-208.

svn path=/trunk/; revision=72880
2016-10-01 18:48:02 +00:00
Thomas Faber
69ce708392 [ADVAPI32]
- Return ERROR_MORE_DATA instead of ERROR_BUFFER_OVERFLOW from RegEnumKeyExW in case the name or class buffer is too small.
CORE-12030 #resolve

svn path=/trunk/; revision=72879
2016-10-01 16:44:21 +00:00
Mark Jansen
cf6ff20079 [SHELL32] New shortcut overlay icon, fixed Folder Options Dialog icon, and other minor icon fixes by Jared Smudde. CORE-11414 #resolve #comment Thanks!
svn path=/trunk/; revision=72878
2016-10-01 16:35:14 +00:00
Mark Jansen
51a51d3174 [EXPLORER] Make the 'Remove' button in classic start menu properties spawn the remove dialog. Patch by Jared Smudde. CORE-12076 #resolve #comment Thanks!
svn path=/trunk/; revision=72877
2016-10-01 15:57:29 +00:00
Thomas Faber
3a5e3ae774 [ADVAPI32_APITEST]
- Add a test for RegEnumKeyExW showing that it should return ERROR_MORE_DATA instead of ERROR_BUFFER_OVERFLOW when the name buffer is too small. Based on a patch by Doug Lyons.
CORE-12030

svn path=/trunk/; revision=72876
2016-10-01 14:41:41 +00:00
Amine Khaldi
254a9ba114 [SHELL32] Disconnect dialog improvements by Jared Smudde. CORE-11864
svn path=/trunk/; revision=72875
2016-10-01 09:50:53 +00:00
Amine Khaldi
b5806e39e8 [NETSHELL][SAMSRV][SYSSETUP] Fix some misspellings. By Coburn on IRC and Jared Smudde. CORE-12013
svn path=/trunk/; revision=72874
2016-10-01 09:43:24 +00:00
Thomas Faber
531ee01590 [NTOS:EX]
- Acquire ProcessLock before accessing a process's thread list in NtQuerySystemInformation/SystemProcessInformation. Patch by Volodymyr Shcherbyna.
CORE-12001 #resolve

svn path=/trunk/; revision=72873
2016-10-01 09:03:47 +00:00
Amine Khaldi
10cdda5bf5 [MSTSC] Japanese translation improvements by Katayama Hirofumi MZ. CORE-12067
svn path=/trunk/; revision=72872
2016-10-01 08:38:01 +00:00
Thomas Faber
c77ad2e9b5 [WIN32K:NTGDI]
- Handle arbitrary-length DEVMODEW structures in NtGdiOpenDCW. Patch by Katayama Hirofumi MZ with small changes by me.
CORE-12068 #resolve

svn path=/trunk/; revision=72871
2016-10-01 08:25:35 +00:00
Dmitry Chapyshev
c60a62e0de [NTOS:FSRTL] Handle failure case
svn path=/trunk/; revision=72870
2016-09-30 17:33:19 +00:00
Thomas Faber
076a3c9cb7 [NTOS:MM]
- Get rid of MiNonPagedSystemSize, which is misleading because MmNumberOfSystemPtes can change throughout the startup process, thus invalidating this size variable
- Correctly reserve the system PTE space and nonpaged pool expansion space in MiInitSystemMemoryAreas
Should fix the remaining "Bad PTE" bug checks when running out of kernel address space.
CORE-11533 #resolve
CORE-11160 CORE-10611 CORE-11926 CORE-11873 CORE-11554 #comment This should be fixed with r72869, please retest.

svn path=/trunk/; revision=72869
2016-09-30 15:58:23 +00:00
Amine Khaldi
8e21414853 [DNSAPI_APITEST] Add more tests for DnsQuery_A/W. By Peter Hater. ROSTESTS-242
svn path=/trunk/; revision=72868
2016-09-30 15:23:25 +00:00
Amine Khaldi
040de105cc [ADNS][DNSAPI][MSWSOCK] Several fixes and improvements to DnsQuery and co, detailed in CORE-11394. This also fixes CORE-7441, many tests in dnsapi:DnsQuery, ws2_32:getaddrinfo and more. Brought to you by Peter Hater.
svn path=/trunk/; revision=72867
2016-09-30 15:19:29 +00:00
Johannes Anderwald
bc741955ed - fix bugs in USBAudioSelectAudioStreamingInterface
svn path=/trunk/; revision=72866
2016-09-30 09:57:42 +00:00
Johannes Anderwald
8895dae5d0 [USBAUDIO]
- implement GetMaxPacketSizeForInterface, UsbAudioAllocCaptureUrbIso, InitCapturePin

svn path=/trunk/; revision=72865
2016-09-29 22:19:34 +00:00
Daniel Reimer
ad3aa035db [RAPPS_NEW]
When Internet connection is down. Rapps does not generate any msg by Rama Teja Gampa
+ GIT -> SVN Patch manual translation
+ Bitrot fixes
+ Tabs -> Spaces fixes
CORE-10980 #resolve #comment Committed, thx ^^

svn path=/trunk/; revision=72864
2016-09-29 21:31:11 +00:00
Daniel Reimer
8ff30df6f3 [RAPPS]
Translate missing string

svn path=/trunk/; revision=72863
2016-09-29 21:25:36 +00:00
Daniel Reimer
60153818ab [ROSAPPS]
Russian translation update by Sergey Stopkin
ROSAPPS-333 #resolve #comment Committed, thx ^^

svn path=/trunk/; revision=72862
2016-09-29 21:02:07 +00:00
Daniel Reimer
91d63bd669 [PING]
Russian translation update by Sergey Stopkin + lil build fix by me
CORE-12019 #resolve #comment Committed, thx ^^ Beware of " in string blocks though, these are "" then

svn path=/trunk/; revision=72861
2016-09-29 20:59:03 +00:00
Daniel Reimer
30abd4f6ee [POWERCFG]
Bug fix and improvements to PowerCfg applet by Carlo Bramini
CORE-11801 #resolve #comment Committed, thx ^^

svn path=/trunk/; revision=72860
2016-09-29 20:54:58 +00:00
Daniel Reimer
c3df272d43 [3DTEXT]
3d Text Screensaver pt-BR translation by Lucas Raziel
CORE-11672 #resolve #comment Committed, thx ^^

svn path=/trunk/; revision=72859
2016-09-29 20:46:14 +00:00
Mark Jansen
137402a3be [DXDIAG] Fix DirectDraw test titles & 16bit icon. Patch by Jared Smudde. CORE-11054 #resolve #comment Thanks!
svn path=/trunk/; revision=72858
2016-09-29 20:29:59 +00:00
Johannes Anderwald
8363fc0f08 [USBAUDIO]
- fix bug in UsbAudioSetFormat

svn path=/trunk/; revision=72857
2016-09-29 19:25:31 +00:00
Hermès Bélusca-Maïto
a8badad1fa [EVENTCREATE]: Check for a better last error after the GetModuleFileNameW call.
svn path=/trunk/; revision=72856
2016-09-29 17:42:20 +00:00
Hermès Bélusca-Maïto
fbebe613b7 Temporarily switch the message file to English language to try to "fix" windmc compilation on linux host (*of course*, this problem didn't happen on the "GNU windmc (GNU Binutils) 2.23.51.20121208" provided in RosBE 2.1.3 for Windows, nor with MC.EXE from MSVC...)
svn path=/trunk/; revision=72855
2016-09-29 16:58:02 +00:00
Hermès Bélusca-Maïto
efc5b376b4 [EVENTCREATE]: Implement the EventCreate command-line tool, which allows reporting custom user events in event logs, by using the old-school NT <= 2k3 logging API.
More information in the JIRA report and in the source code (eventcreate.c).
The generator (evtmsggen) for the event message string templates file "evtmsgstr.mc" is also provided.
CORE-12065 #resolve

svn path=/trunk/; revision=72854
2016-09-29 16:49:27 +00:00
Amine Khaldi
1fbf90a712 [TRANSLATIONS] Turkish translation update by Erdem Ersoy. CORE-12039
svn path=/trunk/; revision=72853
2016-09-29 11:33:25 +00:00
Benedikt Freisen
0e026443cf [PSDK][GDIPLUS]
Make previously untested GDI+ C++ wrappers compilable.  This involves:
- adding the respective headers to gdiplus.h in a sensible order
- adding forward-declarations
- adding friend-declarations, so that the wrapper functions in those classes can access the private GpXXX members
- const-qualifying the getters in class Color
- adding the EmfToWmfBitsFlags enum
- commenting out bits that use unavailable flatapi functions
- commenting out bits that for some reason the compiler does not like
- the typical typo/data type fixes that untested code tends to need
- moving the Font class within the same header to fulfill dependencies
- adding private GpXXX members to otherwise unimplemented classes
- adding a data-members-only implementation of SizeF

svn path=/trunk/; revision=72852
2016-09-29 11:15:10 +00:00
Amine Khaldi
6a6a58912e [IPHLPAPI][KERNEL32] Revert r72722 and apply a proper fix based on tests. By Peter Hater. CORE-10440 ROSTESTS-243
svn path=/trunk/; revision=72851
2016-09-29 10:49:30 +00:00
Amine Khaldi
d3aebbcedc [RTL] Demote this print as we'll be notified when failure occurs.
svn path=/trunk/; revision=72850
2016-09-29 10:00:07 +00:00
Amine Khaldi
c27310bf96 [KERNEL32_APITEST] Add tests that reveal how the GetComputerNameEx fix in r72722 was not proper. By Peter Hater. ROSTESTS-243
svn path=/trunk/; revision=72849
2016-09-29 09:44:57 +00:00
Thomas Faber
1ff9c7f40d [RAPPS]
- Avoid an unintended fall-through and document and intended one in DownloadProgressProc. CID 1341273 (rapps), 1363531 (rapps_new)

svn path=/trunk/; revision=72848
2016-09-29 09:36:33 +00:00
Thomas Faber
e5645b55eb [WIN32K:NTUSER]
- Add missing break in DefWndStartSizeMove. CID 513489
CORE-12064 #resolve

svn path=/trunk/; revision=72847
2016-09-29 08:23:26 +00:00
Hermès Bélusca-Maïto
4b67338a7f [REACTOS]: Do not gather all the generated message resource files in the same directory (sdk/include/reactos/), so that to avoid potential file collisions, but instead place them into their respective per-target directories.
CORE-12062 #resolve

[RAPPS_NEW]: Fix rapps_new message header & resource files inclusion.

[ROSTESTS]: Adjust the CMakeLists files in accordance.

svn path=/trunk/; revision=72846
2016-09-28 23:20:20 +00:00
Dmitry Chapyshev
fb4cb1c8c5 [SHLWAPI] Try to fix regression
svn path=/trunk/; revision=72845
2016-09-28 21:44:01 +00:00
Mark Jansen
8ab805c96c [DEGMGR] Revert r65406, this is not a leak. CORE-9716 #comment Please retest!
svn path=/trunk/; revision=72844
2016-09-28 21:05:39 +00:00
Johannes Anderwald
ff46d90618 [USBAUDIO]
- implement USBAudioSelectAudioStreamingInterface

svn path=/trunk/; revision=72843
2016-09-28 20:31:32 +00:00
Hermès Bélusca-Maïto
d1faa1a99f Addendum to r72841.
svn path=/trunk/; revision=72842
2016-09-28 20:22:33 +00:00
Hermès Bélusca-Maïto
9c77bd1cb7 Use set_module_type() with module type == "module" instead of specifying that the entrypoint is 0, for resource-only dlls.
svn path=/trunk/; revision=72841
2016-09-28 20:21:31 +00:00
Dmitry Chapyshev
0140e3bf68 [KERNEL32] Add check for Flags parameter.
* Fixes 124 tests for kernel32:WideCharToMultiByte

svn path=/trunk/; revision=72840
2016-09-28 19:53:43 +00:00
Dmitry Chapyshev
d507b7555e [NTOS:FSRTL] Rework FsRtlIsDbcsInExpression for correct parsing some expressions
* Fixes 1 test for kmtest:FsRtlExpression

svn path=/trunk/; revision=72839
2016-09-28 19:01:10 +00:00
Mark Jansen
7d865c5974 [KERNEL32] Mute WC_COMPOSITECHECK DPRINT1. CORE-12058 #resolve
svn path=/trunk/; revision=72838
2016-09-28 17:33:36 +00:00
James Tabor
eb207003e7 [Win32SS]
- Fix menu crash, marking the menu object destroyed if the access count is more than one. Must remember these are not GDI objects. Expect a retooling of user objects soon. Set CORE-11892.

svn path=/trunk/; revision=72837
2016-09-28 16:51:53 +00:00
Amine Khaldi
d0e5925de2 [IPHLPAPI_APITEST] Add some tests for GetNetworkParams. By Peter Hater. ROSTESTS-244
svn path=/trunk/; revision=72836
2016-09-28 14:27:48 +00:00
Dmitry Chapyshev
d04540ff98 [NTOS:FSRTL] Rework FsRtlIsNameInExpressionPrivate for correct parsing some expressions
* Fixes 1 test for kmtest:FsRtlExpression and 15 tests for kernel32:file

svn path=/trunk/; revision=72835
2016-09-27 23:00:20 +00:00
Giannis Adamopoulos
1b795376fc [SHELL32]
- CDesktopBrowser: Implement support for multiple monitors. This needs to be disabled since we don't support LVM_SETWORKAREAS in comctl32 yet. Till then confine the desktop window in the default monitor.

svn path=/trunk/; revision=72834
2016-09-27 22:53:39 +00:00
Johannes Anderwald
17cc431d33 [USBAUDIO]
- improve guid mess a bit
- thanks amine 

svn path=/trunk/; revision=72833
2016-09-27 19:56:54 +00:00
Johannes Anderwald
8112191cdb [USBAUDIO]
- implement USBAudioFilterCreate
- partly implement USBAudioPinCreate, USBAudioPinSetDataFormat

svn path=/trunk/; revision=72832
2016-09-27 19:20:00 +00:00
Amine Khaldi
96d5ff4d93 [PING] Minor fixes by Tim Crawford. Please see CORE-12022 for the list of changes.
svn path=/trunk/; revision=72831
2016-09-27 18:37:45 +00:00
Mark Jansen
105f70b1fe [ATL_APITEST] Remove dependency on rpcrt4. CORE-10029
svn path=/trunk/; revision=72830
2016-09-27 18:20:20 +00:00
Amine Khaldi
2735832354 [DNSAPI_APITEST] Add some tests for DnsQuery_A/W. By Peter Hater. ROSTESTS-242
svn path=/trunk/; revision=72829
2016-09-27 18:00:03 +00:00
Thomas Faber
b12f9a0545 [SHELL32]
- Work around what appears to be a bug in the VS 2010 resource compiler (it failed without an error message when processing this file)

svn path=/trunk/; revision=72828
2016-09-27 17:14:39 +00:00
Thomas Faber
16b33b45ab [ATL_APITEST]
- Fix MSVC build

svn path=/trunk/; revision=72827
2016-09-27 16:51:39 +00:00
Daniel Reimer
deb1abff20 [RAPPS]
ooops

svn path=/trunk/; revision=72826
2016-09-27 05:46:09 +00:00
James Tabor
5cb2406405 [NtUser]
- Need more information from callbacks.

svn path=/trunk/; revision=72825
2016-09-27 01:14:49 +00:00
Hermès Bélusca-Maïto
99b8a71b9d [USERINIT]: Addendum to r72823 (sorry for the redundant commits): Fix a use without initialization warning for the 'Success' variable: initialize it to TRUE so that we by default do not perform the main menu loop (in livecd mode).
svn path=/trunk/; revision=72824
2016-09-26 22:52:04 +00:00
Hermès Bélusca-Maïto
3f6ca86312 [USERINIT]: Usability commit: when in LiveCD mode, if we cannot start the shell or the installer, display again the main menu.
svn path=/trunk/; revision=72823
2016-09-26 22:49:13 +00:00
Hermès Bélusca-Maïto
6c90c67259 [USERINIT]: Addendum to r72821 + demote to WARNing the displayed message if the installer could not be started.
svn path=/trunk/; revision=72822
2016-09-26 22:47:25 +00:00
Hermès Bélusca-Maïto
0a81885192 [USERINIT]
- Use explicit unicode functions where possible.
- Use ARRAYSIZE(foo) instead of sizeof(foo)/sizeof(foo[0]).
- Don't hardcode some buffer sizes.
- Try reducing level of code indentation in some functions.
- Make StartShell and StartInstaller return a boolean (TRUE: success; FALSE: failure). Will be needed in the next commit.
- Remove a useless "#pragma warning".

svn path=/trunk/; revision=72821
2016-09-26 22:42:56 +00:00
Mark Jansen
ed8515d7ed [ATL][ATL_APITEST] Implement some basic functionality for CComVariant + tests. CORE-12041
Also adds Detach() to CComBSTR.

svn path=/trunk/; revision=72820
2016-09-26 20:50:36 +00:00
Benedikt Freisen
7c6b473efc [MSPAINT]
- port load and save to ATL::CImage
- let CImage generate the filter lists for the dialogs
- add menu entries "From Scanner or Camera..." and "Send..." (no functionality)
- add menu entries for most recently used files using ATL::CPath and ATL::CString
- manage list of most recently used files in registry using ATL::CRegKey
- use CString in some places instead of TCHAR arrays

Use of CImage for load/save adds support for all GDI+ formats but breaks import/export of dots per meter/inch values.

svn path=/trunk/; revision=72819
2016-09-26 19:53:42 +00:00
Benedikt Freisen
dcea2a97b2 [ATL][ROSTESTS] Tests for: CImage: Add GetImporterFilterString and GetExporterFilterString. Patch by Katayama Hirofumi MZ, CORE-10029
svn path=/trunk/; revision=72818
2016-09-26 19:15:40 +00:00
Benedikt Freisen
61c3571160 [ATL] CImage: Add GetImporterFilterString and GetExporterFilterString. Patch by Katayama Hirofumi MZ, CORE-10029
svn path=/trunk/; revision=72817
2016-09-26 19:08:20 +00:00
Daniel Reimer
d894f5d843 [RAPPS]
Bugfix to correctly identify the size of the programs in RAPPS for the Russian language by amber
CORE-11847 #resolve #comment Committed, thx.
App Manager - NirLauncher has a broken link by Ken Rochard
CORE-11718 #resolve #comment Committed, thx.
App Manager - Audacity has a broken link by Ken Rochard
CORE-11719 #resolve #comment Committed, thx.
Downgrade Python 3.5 to Python 3.4 (if it works) in Rapps by David Kleuker
CORE-11342 #resolve #comment Committed, thx.
App Manager - Libre Office 5.1.3 has a broken link by Ken Rochard
CORE-11670 #resolve #comment Committed, thx.
[RAPPS-DB] Click-N-Type Virtual Keyboard version is wrong by reactosfanboy
CORE-11243 #resolve #comment Committed, thx.

svn path=/trunk/; revision=72816
2016-09-26 18:42:16 +00:00
Benedikt Freisen
b2b90f6342 [ATL]
- implement CStringT::LoadString(UINT nID) via LoadString(_AtlBaseModule.GetResourceInstance(), nID)

[FLTMC]
- add target_link_libraries(fltmc atlnew) so that the linker finds _AtlBaseModule

svn path=/trunk/; revision=72815
2016-09-26 17:50:07 +00:00
Eric Kohl
2f75d2cf5a [LSASRV]
Store the domain name and user SID in the session too.

svn path=/trunk/; revision=72814
2016-09-26 16:28:10 +00:00
Benedikt Freisen
a5bb3a9997 [ATL] cstringt.h: Uncomment and complete Format(UINT nFormatID, ...). It still uses a LoadString-stub, though.
svn path=/trunk/; revision=72813
2016-09-26 14:11:50 +00:00
Dmitry Chapyshev
75df465bbf [NTOS:KE] Use variable instead function calling
svn path=/trunk/; revision=72812
2016-09-26 12:31:26 +00:00
Dmitry Chapyshev
aac32378ed [NTOS:KE] Added *Thread versions of macros with ASSERT(_Thread == KeGetCurrentThread()). Use new macros in _KeAcquireGuardedMutex, _KeReleaseGuardedMutex, _KeTryToAcquireGuardedMutex. Thanks Alex!
svn path=/trunk/; revision=72811
2016-09-26 12:03:57 +00:00
Thomas Faber
4e21017693 [KERNEL32]
- Handle UTF-16 surrogate pairs in IntWideCharToMultiByteUTF8.
CORE-12042 #resolve

svn path=/trunk/; revision=72810
2016-09-26 10:12:58 +00:00
Thomas Faber
8abd9a0386 [KERNEL32_APITEST]
- Add a test for WideCharToMultiByte with CP_UTF8
CORE-12042

svn path=/trunk/; revision=72809
2016-09-26 10:06:55 +00:00
Giannis Adamopoulos
a4aafe9309 [SHELL32]
- CDefView: Overhaul the code that filled the menu bar of explorer. Fill the arrange as menu with the column names from the shell folders instead of hardcoding them. Check the selected arrange mode and view mode in the menu bar and in the context menu. Make the items in the file menu to actually work. It is possible to arrange the icons from the context menu now. 
- Note to translators: Please check that the changes that I did in the 31 resource files make sense. Also note that the "Arrange Icons" menu now is called "Arrange Icons As".

svn path=/trunk/; revision=72808
2016-09-26 00:43:21 +00:00
Robert Naumann
5895908402 [SHELL32]Swedish translation by Andreas Bjerkeholt CORE-12040
svn path=/trunk/; revision=72807
2016-09-25 22:53:05 +00:00
Jérôme Gardou
14628d18e5 [KDGDB]
- Fix a stupid typo, causing all threads to have the same backtrace.

svn path=/trunk/; revision=72806
2016-09-25 22:33:48 +00:00
Benedikt Freisen
844f4e8868 [ATL] atlpath.h: This looked like a bug.
svn path=/trunk/; revision=72805
2016-09-25 21:14:23 +00:00
Benedikt Freisen
ee95d592f0 [ATL] Add atlpath.h, which provides the CPathT class template and the classes CPath, CPathA and CPathW. CORE-12034
svn path=/trunk/; revision=72804
2016-09-25 19:58:22 +00:00
Jérôme Gardou
7b8651cd90 [SDK/GCC_INTRIN]
- Update __invlpg instrinsic for x86_64 compatibility

svn path=/trunk/; revision=72803
2016-09-25 18:35:52 +00:00
Dmitry Chapyshev
28e32eb784 [RTL] Capture parameters with using SEH. Fixes new test for ntdll:RtlAllocateHeap
svn path=/trunk/; revision=72802
2016-09-25 17:05:52 +00:00
Dmitry Chapyshev
92e7c0979a [NTDLL_APITEST] Add test for invalid pointer
svn path=/trunk/; revision=72801
2016-09-25 16:57:55 +00:00
Thomas Faber
3e357794f9 [NTOS:PO]
- Protect against invalid user mode pointers in NtPowerInformation

svn path=/trunk/; revision=72800
2016-09-25 13:46:18 +00:00
Dmitry Chapyshev
7986e05dd7 [NTOS:PO] Stubpliment ProcessorInformation case in NtPowerInformation. Fixes 1 test for ntdll:info
svn path=/trunk/; revision=72799
2016-09-25 13:03:06 +00:00
Benedikt Freisen
9c2f0f7e3a [ATL] atltime.h: fix assertion: hours of a day are in the range 0-23, not 0-59
svn path=/trunk/; revision=72798
2016-09-25 09:33:56 +00:00
Thomas Faber
44408ed371 [RTL]
- Avoid dereferencing a NULL pointer in RtlIsTextUnicode
CORE-12027 #resolve

svn path=/trunk/; revision=72797
2016-09-25 08:25:45 +00:00
Hermès Bélusca-Maïto
558f564017 [EVENTVWR]: Turkish translation update by Erdem Ersoy.
CORE-12031 #resolve #comment Committed, thanks!

svn path=/trunk/; revision=72796
2016-09-24 23:21:05 +00:00
Benedikt Freisen
40e80da24a [SDK][ATL] Add header atltime.h and prerequisites in atlsimpstr.h and atlstr.h. CORE-12023
svn path=/trunk/; revision=72795
2016-09-24 18:01:49 +00:00
Mark Jansen
5fbd6598b7 [MSGINA] Prevent an infinite loop in ShellDimScreen. CORE-12028
svn path=/trunk/; revision=72794
2016-09-24 14:15:23 +00:00
Christoph von Wittich
6476277b5c [CRYPTNET] don't try to prepend a drive letter when there is one already
svn path=/trunk/; revision=72793
2016-09-24 12:19:35 +00:00
Christoph von Wittich
940cde001f [CRYPTNET] disable broken code
svn path=/trunk/; revision=72792
2016-09-24 11:39:17 +00:00
Johannes Anderwald
23829f32f6 [LIBUSBAUDIO]
- delete unused code

svn path=/trunk/; revision=72791
2016-09-24 11:24:07 +00:00
Johannes Anderwald
ceb3c692f3 [USBAUDIO]
- allocate filter descriptor
- fixes hang in win2k3

svn path=/trunk/; revision=72790
2016-09-24 11:17:32 +00:00
Eric Kohl
3c7d74d9d9 [LSASRV]
LsapSetLogonSessionData: Set the logon type and the user name of the selected session.
LsapGetLogonSessionData: Fix the session data marshalling code.
Now we can retrieve the logon type and user name of the logon sessions.

svn path=/trunk/; revision=72789
2016-09-24 09:38:17 +00:00
Dmitry Chapyshev
fdef947fd3 [NTOSKRNL] Add missed _SEH2_YIELD's
svn path=/trunk/; revision=72788
2016-09-24 09:34:09 +00:00
Dmitry Chapyshev
f250bb4eb6 [NTOSKRNL] Remove unneeded sanity checks
svn path=/trunk/; revision=72787
2016-09-24 09:30:06 +00:00
Dmitry Chapyshev
ae49423a04 [ACPPAGE] Update Russian translation
svn path=/trunk/; revision=72786
2016-09-24 09:25:13 +00:00
Johannes Anderwald
5da8ac035d [USBAUDIO]
- add pin dispatch routines

svn path=/trunk/; revision=72785
2016-09-24 08:35:25 +00:00
Christoph von Wittich
fa4bc0ad15 [DNSAPI] sync record.c with wine 1.9.19
svn path=/trunk/; revision=72784
2016-09-24 07:32:25 +00:00
Johannes Anderwald
ebc30bc7c1 [USBAUDIO]
- fix build with gcc

svn path=/trunk/; revision=72783
2016-09-23 22:14:21 +00:00
Johannes Anderwald
f9d6dccd9c [USBAUDIO]
- fix warnings
- implement UsbAudioGetDataRanges for filter descriptor

svn path=/trunk/; revision=72782
2016-09-23 22:07:24 +00:00
Johannes Anderwald
885506056c [USBAUDIO]
- start implementing USBAudioPinBuildDescriptors

svn path=/trunk/; revision=72781
2016-09-23 19:53:19 +00:00
Johannes Anderwald
d034494c4d [KS]
- fix gcc build

svn path=/trunk/; revision=72780
2016-09-23 19:10:44 +00:00
Johannes Anderwald
2380a6ec54 [KS]
- make a copy of KSFILTER_DESCRIPTOR as it might have been allocated from the stack
- always initialize object bag in filter factory 

svn path=/trunk/; revision=72779
2016-09-23 18:35:15 +00:00
Giannis Adamopoulos
ed87e2056d [SHELL32]
- CPrinterFolder: Use the printer icon for printers not the icon for printers folder.

svn path=/trunk/; revision=72778
2016-09-23 15:51:53 +00:00
Dmitry Chapyshev
4a71e9a2bc [SETUPAPI] Implement freeing memory in SetupDiDestroyClassImageList function. Based on patch from CircularTriangle06. Thanks! See CORE-11668
svn path=/trunk/; revision=72777
2016-09-22 21:39:25 +00:00
Giannis Adamopoulos
76bf27c021 [SHELL32]
- SHCreateDefaultContextMenu: Since our shell folders don't pass the array of class keys needed, populate this array right in SHCreateDefaultContextMenu. This code should later be moved to the shell folders so as to make CDefaultContextMenu.cpp agnostic to the kind of items it handles.
- CDefaultContextMenu: Simplify filling the menu by making use of the array of keys passed in the DEFCONTEXTMENU struct.

svn path=/trunk/; revision=72776
2016-09-22 21:34:14 +00:00
Giannis Adamopoulos
05f4321160 [SHELL32]
- CDefaultContextMenu: Simplify some really superfluous code and add more checks for bogus parameters. Create the data object using GetUIObjectOf instead of SHCreateDataObject. Each sell folder should be able to use its own special data object.

svn path=/trunk/; revision=72775
2016-09-22 19:54:15 +00:00
Dmitry Chapyshev
32705690e7 [NLS] Add 1146 and 21025 code pages
svn path=/trunk/; revision=72774
2016-09-22 18:16:30 +00:00
Dmitry Chapyshev
e12d8ec40d [NLS] Add missed code pages
svn path=/trunk/; revision=72773
2016-09-22 18:14:07 +00:00
Giannis Adamopoulos
3fc6a9d6f0 [HIVECLS.INF]
- Drive property page is registered by sehll32.

svn path=/trunk/; revision=72772
2016-09-22 16:48:12 +00:00
Giannis Adamopoulos
adffe02e6f [SHELL32]
- Handle failure in SHELL32_CompareDetails.

svn path=/trunk/; revision=72771
2016-09-22 16:22:44 +00:00
Giannis Adamopoulos
c6db4d179c [SHELL32]
- COpenWithMenu: Don't try to close the same registry key twice.

svn path=/trunk/; revision=72770
2016-09-22 16:14:07 +00:00
Giannis Adamopoulos
e00840033e [SHELL32]
- HCR_GetFolderAttributes already calls GetAttributesOf when needed, calling it when it is not needed can lead to crashes.

svn path=/trunk/; revision=72769
2016-09-22 16:09:28 +00:00
Christoph von Wittich
ef8e98a485 [SHELL32] implement CreateViewWindow3 and fix CreateViewWindow2
svn path=/trunk/; revision=72768
2016-09-22 14:28:44 +00:00
Eric Kohl
e5d301366c [LSASRV]
LsapGetLogonSessionData: Marshall the session data before sending them to the client.

[SECUR32]
LsaConnectUntrusted: Wait for the authentication thread.
LsaGetLogonSessionData: Unmarshall the session data after receiving them from the server.

svn path=/trunk/; revision=72767
2016-09-22 11:27:05 +00:00
Benedikt Freisen
770c7d7cb0 [MSPAINT] Lets
svn path=/trunk/; revision=72766
2016-09-22 10:03:32 +00:00
Amine Khaldi
5d8bf427ca [PING] Rewrite ping. It now uses the Icmp* functions in iphlpapi, supports IPv4 and IPv6, and adds more options than available in the current ReactOS ping. Brought to you by Tim Crawford. CORE-10573
svn path=/trunk/; revision=72765
2016-09-22 08:10:47 +00:00
Christoph von Wittich
e0f1966727 [SHELL32] revert 72685 the testman hang wasn't related
svn path=/trunk/; revision=72764
2016-09-21 19:51:35 +00:00
Mark Jansen
2d582ff542 [CRT] Fix __getmainargs parsing for a commandline ending with spaces. Patch by Yaroslav Veremenko CORE-9199 #comment Thanks, please re-test!
svn path=/trunk/; revision=72763
2016-09-21 19:34:42 +00:00
Mark Jansen
6ee0488c6d [CRT_APITEST] Add tests for __getmainargs, testing a commandline ending with spaces. Patch by Yaroslav Veremenko CORE-9199
svn path=/trunk/; revision=72762
2016-09-21 19:26:47 +00:00
Mark Jansen
1d08fd530f [NETSHELL] Register some COM interfaces to fix a few tests. Patch by Jared Smudde. CORE-12016 #resolve #comment Thanks!
svn path=/trunk/; revision=72761
2016-09-21 19:04:07 +00:00
Mark Jansen
37e073b675 [NETSHELL.RGS] set eol-style so that hopefully the patchbot will eat a patch without choking on it.
svn path=/trunk/; revision=72760
2016-09-21 17:55:35 +00:00
Amine Khaldi
51d329b7e1 [IPHLPAPI] Fix all testIcmpSendEcho tests. By Peter Hater. Please see CORE-11993 for the list of changes.
svn path=/trunk/; revision=72759
2016-09-21 15:53:17 +00:00
Hermès Bélusca-Maïto
640e1bacfc [LSALIB]: Fix build (and 2 dprints in the process).
svn path=/trunk/; revision=72758
2016-09-21 14:02:54 +00:00
Eric Kohl
1b6257ac3f [LSASRV]
Revert all pointless changes from r72751.

svn path=/trunk/; revision=72757
2016-09-21 10:49:40 +00:00
Eric Kohl
73975f8f4a [LSALIB]
- LsaRegisterLogonProcess: Wait for the LSA_AUTHENTICATION_INITIALIZED event.
- LsaDeregisterLogonProcess: Use ZwClose to close the port handle.

svn path=/trunk/; revision=72756
2016-09-21 10:27:06 +00:00
Eric Kohl
dff8dfadb8 [LSASRV]
Open/Create and set the \\SECURITY\\LSA_AUTHENTICATION_INITIALIZED event after the LsaAuthenticationPort has been created.

svn path=/trunk/; revision=72755
2016-09-21 07:27:18 +00:00
Eric Kohl
0b423f6a54 [LSALIB][SECUR32]
- Move LsaConnectUntrusted() from sdk/lib/lsalib/lsa.c to dll/win32/secur32/lsalpc.c as it is not exported from ntoskrnl.
- Remove obsolete code from lsalib.

svn path=/trunk/; revision=72754
2016-09-21 06:19:22 +00:00
Eric Kohl
1df78f4892 [LSALIB]
LsaRegisterLogonProcess: Do not wait for \\SECURITY\\LSA_AUTHENTICATION_INITIALIZED to get signaled as it breaks the boot.

svn path=/trunk/; revision=72753
2016-09-21 06:11:02 +00:00
Eric Kohl
d307723a72 [NTOSKRNL]
- Move the session notification routines from se/lsa.c to se/srm.c.
- Get rid of se/lsa.c.

svn path=/trunk/; revision=72752
2016-09-21 04:57:25 +00:00
Hermès Bélusca-Maïto
9bc48b336f [SECUR32][NTOS]: Update the LSA export signatures for the functions that are implemented in the "lsalib" library.
[LSALIB]
- Add old-school annotations (as we currently do in our main .c code of our stuff).
- Mention that LsaConnectUntrusted is not an API that is exported (& implemented) by ntoskrnl.
- For LsaRegisterLogonProcess, we first wait for the LSA server to be ready (by waiting on its initialization event). This is TODO for LsaConnectUntrusted on the contrary.

[LSALIB][NTOS]
Usa the lsalib as the implementation of the LSA functions exported by ntoskrnl. But for that we need to recompile the lsalib as a library that can be used from inside ntoskrnl, because it needs some functions that are normally exported by ntos. For this purpose I add the library target "ntlsalib" (which also specify different #defines), to differentiate it from the (user-mode) "lsalib" one that is used by secur32.dll (Amine, if you have a better idea on how to do that, please let me know!).

svn path=/trunk/; revision=72751
2016-09-20 23:43:16 +00:00
Amine Khaldi
7d07b21168 [WS2_32] The current ws2_32 served us well, but it's time for ws2_32_new to shine. It took slightly more than 7 years since Ged brought-in Alex' impressive work on this module, and thanks to the great follow-up work by Peter Hater, Andreas Maier, Thomas Faber and everyone else involved in the effort, we now have a chance to retire ws2_32 in favor of ws2_32_new. The test results speak for the excellent achievements, and this serves as a platform to continue inspecting and fixing the remaining test failures. Thank you all for a job well done! Please see CORE-10440 for a summary of the changes performed in this commit.
svn path=/trunk/; revision=72750
2016-09-20 16:51:28 +00:00
Amine Khaldi
840345bf57 [MSAFD] Don't assume SOL_SOCKET is the only socket level. By Peter Hater. CORE-10440 CORE-12008
svn path=/trunk/; revision=72749
2016-09-20 16:31:53 +00:00
Amine Khaldi
e4af4ccb22 [ETC/SERVICES] Update services file as expected by the tests. By Peter Hater. CORE-10440
svn path=/trunk/; revision=72748
2016-09-20 09:45:02 +00:00
Amine Khaldi
e9878b1c6a [IPHLPAPI] Don't (de)initialize ws2 on dll process (attach/detach), do it on IcmpCreateFile/IcmpCloseHandle instead, due to the circular dependency ws2_32 -> mswsock -> dnsapi(adns lib) -> iphlpapi -> ws2_32. This creates 2 references to ws2_32 and ws2_32 can't cleanup on WSACleanup. By Peter Hater. CORE-10440
svn path=/trunk/; revision=72747
2016-09-20 09:42:51 +00:00
Amine Khaldi
b257841ecd [MSAFD] Move WSAAddressToStringA/W and WSAStringToAddressA/W in msafd protocol provider from ws2_32. Other small fixes for return codes. By Peter Hater. CORE-10440
svn path=/trunk/; revision=72746
2016-09-20 08:12:44 +00:00
James Tabor
e38d2daa32 [NtUser]
- Use send message only and fix return for WM_NC/ACTIVATE. See CORE-11979 and CORE-11324.

svn path=/trunk/; revision=72745
2016-09-20 02:00:18 +00:00
Johannes Anderwald
f5f288f652 [USBAUDIO]
- fix minor bugs
- start implementing filter context

svn path=/trunk/; revision=72744
2016-09-19 18:40:44 +00:00
Amine Khaldi
d35ce60785 [PSDK] Apply our headers style to winwlx.h. Supersedes and fixes the "fix whitespace" part of r72741.
svn path=/trunk/; revision=72743
2016-09-19 17:04:27 +00:00
Hermès Bélusca-Maïto
d4b08aa9bb Revert 2 small changes that I didn't want to do.
svn path=/trunk/; revision=72742
2016-09-19 15:51:13 +00:00
Hermès Bélusca-Maïto
9121ca5711 [PSDK]: Add annotations & fix whitespace.
svn path=/trunk/; revision=72741
2016-09-19 15:49:45 +00:00
Dmitry Chapyshev
ab60ef617a [KERNEL32] Sync other functions with Wine 1.9.17
* Fixes 1 test for kernel32:locale

svn path=/trunk/; revision=72740
2016-09-19 11:28:20 +00:00
Dmitry Chapyshev
b44173c769 [KERNEL32] Sync GetStringTypeW with Wine
* Fixes 255 tests for kernel32:locale

svn path=/trunk/; revision=72739
2016-09-19 10:11:19 +00:00
Thomas Faber
8970909ad9 [AFD]
- Fix MDL leak in failure case of AfdGetSockName. Patch by Volodymyr Shcherbyna. CID 1322161.
CORE-11096 #resolve

svn path=/trunk/; revision=72738
2016-09-19 08:15:24 +00:00
Hermès Bélusca-Maïto
9481be0824 [WINLOGON]
- CreateUserEnvironment: if user impersonation fails, just fail the call.
- SetDefaultLanguage: Use the *correct* HKEY_CURRENT_USER key to retrieve the lang., that is, first impersonate the user, then, call RegOpenCurrentUser. We do that because otherwise calling RegOpenKey(Ex) for HKEY_CURRENT_USER just uses the process cached value of HKEY_CURRENT_USER, which does not change *even if* one impersonates an user.

[MSGINA]
- Correctly impersonate the user when opening & initializing the shutdown dialog (in the same way as winlogon does), i.e. call ImpersonateLoggedOnUser and use RegOpenCurrentUser.
- Fill few (but not all) code holes in WlxScreenSaverNotify.

svn path=/trunk/; revision=72737
2016-09-18 23:32:02 +00:00
Hermès Bélusca-Maïto
4b29ab5690 [NTOS]: Code formatting only.
svn path=/trunk/; revision=72736
2016-09-18 23:28:32 +00:00
Amine Khaldi
0fc28afe45 [MSWSOCK] Partially implement Name Service Provider in mswsock. Brought to you by Andreas Maier aka andy-123 with small fixes by Peter Hater and formatting by me. CORE-10024 CORE-10440
svn path=/trunk/; revision=72735
2016-09-18 21:21:28 +00:00
Dmitry Chapyshev
be31da9af7 [KERNEL32] - Remove unneded checks (these values can be received from table). - We have to insert UNICODE_NULL if it is the end of string or in string contains 0.
* Fixes 12 tests for kernel32:codepage

svn path=/trunk/; revision=72734
2016-09-18 21:10:07 +00:00
Dmitry Chapyshev
a7c123661e [KERNEL32] Add missed type-casting
* Fixes 28 tests for kernel32:codepage

svn path=/trunk/; revision=72733
2016-09-18 20:11:05 +00:00
Hermès Bélusca-Maïto
f8ff1c2126 [MSGINA]
- Do not hardcode buffer sizes in function calls, and use _countof when needed.
- Use explicit unicode functions where possible.
- No need to have 342687 versions of the shutdown dialog in msgina, only one is sufficient. The help button should be either shown or hidden, depending on whom is calling the dialog (shell or winlogon) (this is TODO!)
- Therefore, no need to have twice the (almost) same code for the shutdown dialog.
- Fix & rework said code.
- The old duplicated shutdown dialog now becomes the "template" for the "Luna-XP-style Shut Down dialog" (implementation TODO!)
- Reenable the WM_ACTIVATE code that was added in r72720 and temporarily disabled in r72721.
CORE-7559 #comment Numerous fixes committed in r72732.

svn path=/trunk/; revision=72732
2016-09-18 19:37:25 +00:00
Hermès Bélusca-Maïto
c7afe8dea0 [SHELL32]: Code formatting only.
svn path=/trunk/; revision=72731
2016-09-18 19:36:05 +00:00
Dmitry Chapyshev
d0228d56b4 [KERNEL32] Implement MB_ERR_INVALID_CHARS flag for DBCS codepages
* Fixes 3 tests for kernel32:codepage

svn path=/trunk/; revision=72730
2016-09-18 18:21:30 +00:00
Dmitry Chapyshev
84351186d5 [KERNEL32] Implement MB_USEGLYPHCHARS flag for MultiByteToWideChar. Add checks for "Private Use" characters. More correct checks for input parameters.
* Fixes 6 tests for kernel32:codepage

svn path=/trunk/; revision=72729
2016-09-18 17:26:59 +00:00
Amine Khaldi
dc52ede2f3 [WS2_32_WINETEST] Disable test_address_list_query() as the ioctl is not supported yet by winsock helper dll (wshtcpip.dll) and the test is assuming there is info returned which is wrong and crashes. By Peter Hater. CORE-10440 CORE-12000
svn path=/trunk/; revision=72728
2016-09-18 16:20:20 +00:00
Amine Khaldi
0040a2fd32 [ADNS] Use dynamic memory for network info and set domain for searches. By Peter Hater. CORE-10440
svn path=/trunk/; revision=72727
2016-09-18 16:07:29 +00:00
Amine Khaldi
6086defd15 [DNSAPI] Request adns to search servers and domains. By Peter Hater. CORE-10440
svn path=/trunk/; revision=72726
2016-09-18 14:25:39 +00:00
Johannes Anderwald
ad787661bb [USBAUDIO]
- start implementing init routines
- not yet added to build

svn path=/trunk/; revision=72725
2016-09-18 14:24:21 +00:00
Johannes Anderwald
956b933a71 try fix build
svn path=/trunk/; revision=72724
2016-09-18 14:11:47 +00:00
Johannes Anderwald
1b15d09a65 [PSDK]
- add missing definitions

svn path=/trunk/; revision=72723
2016-09-18 14:02:22 +00:00
Amine Khaldi
15b97111e6 [KERNEL32] Try to read 'DhcpDomain' registry value if present, otherwise return 'Domain' one, when domain part is requested from GetComputerNameEx(). By Peter Hater. CORE-10440
svn path=/trunk/; revision=72722
2016-09-18 12:55:45 +00:00
Hermès Bélusca-Maïto
b33dfb3ede [MSGINA][SHELL32]: Temporarily disable the WM_ACTIVATE check because it blocks for whatever reason the dialog to properly close and return its correct return value when the user selects e.g. "Shutdown" and validate by pressing "OK" (effectively disables commit r72720).
svn path=/trunk/; revision=72721
2016-09-17 23:07:46 +00:00
Hermès Bélusca-Maïto
99dcff252e [MSGINA][SHELL32]: Now that CORE-11979 is fixed, automatically close the logoff/shutdown dialog as soon as the user deactivates the window (focus lost) by e.g. pressing Alt-Tab.
svn path=/trunk/; revision=72720
2016-09-17 22:44:50 +00:00
Hermès Bélusca-Maïto
a1895a9da6 [XDK][MSGINA]: Consistency codestyle fixes.
[SHELL32]
- Use explicit unicode functions;
- Use _countof instead of sizeof(foo)/sizeof(foo[0]);
- Enable the shutdown privilege when we need it, and disable as soon as possible (code taken from taskmgr).

svn path=/trunk/; revision=72719
2016-09-17 22:39:54 +00:00
Hermès Bélusca-Maïto
b5fc396ab8 [MSGINA]: Code style fixes:
- Use explicit unicode functions;
- Just use the hdc field of the PAINTSTRUCT initialized by BeginPaint instead of introducing yet another hdc variable;
- Use SetDlgItemTextW instead of GetDlgItem + SetWindowTextW;
- Don't hardcode buffer sizes in functions calls;
- Use _countof instead of sizeof(foo)/sizeof(foo[0]);
- Avoid using raw 'int' variables where possible;
- Remove trailing whitespace.
...

svn path=/trunk/; revision=72718
2016-09-17 22:04:54 +00:00
Dmitry Chapyshev
40f2bef33b [NLS] Update NLS files. Part 5/x
svn path=/trunk/; revision=72717
2016-09-17 21:45:39 +00:00
Dmitry Chapyshev
4969288a3b [NLS] Add source data for NLS-files
svn path=/trunk/; revision=72716
2016-09-17 21:18:13 +00:00
Hermès Bélusca-Maïto
f76faf799a [NTVDM]: Update README.
svn path=/trunk/; revision=72715
2016-09-17 21:12:03 +00:00
Dmitry Chapyshev
20e9303118 [NLS] Update NLS files. Part 4/x
svn path=/trunk/; revision=72714
2016-09-17 21:08:09 +00:00
Dmitry Chapyshev
3855dc8d24 [NLS] Add source data for 10000, 10006, 10007, 10029, 10079, 10081 codepages
svn path=/trunk/; revision=72713
2016-09-17 20:54:14 +00:00
Hermès Bélusca-Maïto
d0c02243d2 [NTVDM]: Add new icons:
- Tango-style icons by Henry Tang Ih and Jared Smudde, arranged by myself for PC-XT and AT style;
- ROS-DOS & VDM-DOS (copied from pifmgr.dll) by DSP2015
CORE-10340

svn path=/trunk/; revision=72712
2016-09-17 20:50:08 +00:00
Dmitry Chapyshev
67862907fb [NLS] Update NLS files. Part 3/x
svn path=/trunk/; revision=72711
2016-09-17 20:48:40 +00:00
Dmitry Chapyshev
4e4d86df9c [NLS] Add source data for 1006, 1026, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258 codepages
svn path=/trunk/; revision=72710
2016-09-17 20:27:00 +00:00
Dmitry Chapyshev
cc3ce56acd [NLS] Update NLS file for 037, 500, 874, 875 codepages
svn path=/trunk/; revision=72709
2016-09-17 20:17:04 +00:00
Dmitry Chapyshev
40a137dfa8 [TXT2NLS] TransUniDefaultChar has to be received from WideCharTable. TransDefaultChar has to be received from MultiByteTable (or from DBCS table)
svn path=/trunk/; revision=72708
2016-09-17 20:03:13 +00:00
Dmitry Chapyshev
c75bd6ee1e [NLS] Add source data for 037, 424, 500, 874, 875 codepages
svn path=/trunk/; revision=72707
2016-09-17 19:27:16 +00:00
Dmitry Chapyshev
0dff1696a2 [NLS] Update NLS files. Part 1/x
svn path=/trunk/; revision=72706
2016-09-17 19:01:54 +00:00
Mark Jansen
d1a6ea86f7 [ATL] Do not corrupt the internal state of the CSimpleArray when allocation fails. Patch by Katayama Hirofumi MZ. CORE-11946 #comment Committed, thanks!
svn path=/trunk/; revision=72705
2016-09-17 17:54:16 +00:00
Dmitry Chapyshev
ea13a8e917 [NLS2TXT] Add missed check for default char
[TXT2NLS] Size of glyph table in words (create_nls uses wrong size)

svn path=/trunk/; revision=72704
2016-09-17 14:04:32 +00:00
Dmitry Chapyshev
fc49388a2a [NLS] Update nls files for 437 and 775 codepages
* Fixes 16 tests for ntdll:RtlGenerate8dot3Name

svn path=/trunk/; revision=72703
2016-09-17 12:41:29 +00:00
Dmitry Chapyshev
25dc758375 [NLS] Added source data for NLS files (generated by nls2txt from our files)
svn path=/trunk/; revision=72702
2016-09-17 12:29:49 +00:00
Dmitry Chapyshev
0d8a2edf6b [TXT2NLS] Write correct size for wide char table
svn path=/trunk/; revision=72701
2016-09-17 12:18:28 +00:00
Dmitry Chapyshev
942c4eff2d [ROSAPPS] Add initial version txt2nls file converter (DBCS codepages not supported yet)
svn path=/trunk/; revision=72700
2016-09-17 01:02:53 +00:00
James Tabor
cb199a866c [NtUser]
- Use desktop thread list to search for related active desktop threads. See CORE-11983.

svn path=/trunk/; revision=72699
2016-09-16 23:58:51 +00:00
Hermès Bélusca-Maïto
6e3b5e1ee2 [PIFMGR]: Update the 16-colour format of some icons; add new icons.
CORE-10253

svn path=/trunk/; revision=72698
2016-09-16 23:17:06 +00:00
Amine Khaldi
b183bab8f7 [DHCPCSVC] Add registry key for DHCP domain if present in DHCP reply. By Peter Hater. CORE-10440
svn path=/trunk/; revision=72697
2016-09-16 13:40:21 +00:00
Thomas Faber
bae3687192 [NTDLL_WINETEST]
- Skip exception test on WHS-Testbot... because problems...
ROSTESTS-240

svn path=/trunk/; revision=72696
2016-09-16 09:33:54 +00:00
Dmitry Chapyshev
8e08a3b453 [NLS2TXT] Remove unneeded imports
svn path=/trunk/; revision=72695
2016-09-15 21:47:22 +00:00
Dmitry Chapyshev
d4e7d0c0ff [GETUNAME] Add import library for nls2txt
svn path=/trunk/; revision=72694
2016-09-15 21:17:03 +00:00
Dmitry Chapyshev
3f3ae1f05b [ROSAPPS] Add NLS to TXT file converter
svn path=/trunk/; revision=72693
2016-09-15 21:13:26 +00:00
Dmitry Chapyshev
434964f61d [RTL] Add internal RtlpDowncaseUnicodeChar function and use instead RtlDowncaseUnicodeChar internally in RTL. RtlMultiAppendUnicodeStringBuffer parameters are specified (it is documented on: http://undoc.airesoft.co.uk/ntdll.dll/RtlMultiAppendUnicodeStringBuffer.php)
svn path=/trunk/; revision=72692
2016-09-15 20:40:29 +00:00
Dmitry Chapyshev
ce4186a1eb [RTL] Add internal RtlpUpcaseUnicodeChar function and use instead RtlUpcaseUnicodeChar internally in RTL
svn path=/trunk/; revision=72691
2016-09-15 20:05:26 +00:00
Mark Jansen
406bb0105f [SYSSETUP][UNATTENDED] Remove dead code for VmwInst. Found by Jared Smudde.
svn path=/trunk/; revision=72690
2016-09-15 19:58:29 +00:00
Mark Jansen
af4f582986 [ATL_APITEST] Update CImage apitest to be in line with the CSimpleArray / CSimpleMap tests. Patch from Katayama Hirofumi MZ. CORE-11946 #resolve #comment Thanks!
svn path=/trunk/; revision=72689
2016-09-15 19:42:45 +00:00
Mark Jansen
639a2c725d [ATL][ATL_APITEST] Implemente CSimpleArray + CSimpleMap. Based on a patch from Katayama Hirofumi MZ. CORE-11946
Most of the code is from Katayama Hirofumi MZ, the placement new / delete is written by me, based on a hint from Giannis.

svn path=/trunk/; revision=72688
2016-09-15 19:41:03 +00:00
Dmitry Chapyshev
f648131f93 [RTL] Add missed IN/OUT/OPTIONAL/PAGED_CODE_RTL
svn path=/trunk/; revision=72687
2016-09-15 19:35:59 +00:00
Dmitry Chapyshev
3c4a2b6d93 [RTL] Formatting only
svn path=/trunk/; revision=72686
2016-09-15 19:17:47 +00:00
Christoph von Wittich
c18c4aa282 [SHELL32] try to fix testman hang, by "breaking" CreateViewWindow2 again
svn path=/trunk/; revision=72685
2016-09-15 16:12:50 +00:00
Christoph von Wittich
a4ff747ee4 [SHELL32] halfplement CreateViewWindow2 (SHELLVIEWID not handled yet)
svn path=/trunk/; revision=72684
2016-09-15 15:09:22 +00:00
Thomas Faber
b64b5f76db [LIBUSB]
- Correctly fail IRP_MN_START_DEVICE if PnpStart failed. Spotted by Vadim Galyant.
CORE-11929 #resolve

svn path=/trunk/; revision=72683
2016-09-15 13:37:26 +00:00
Thomas Faber
a2d24bde65 [NTOS:IO]
- Avoid IRP allocation failure in IopDeleteFile and IopCloseFile. Based on a patch by Volodymyr Shcherbyna.
CORE-11959

svn path=/trunk/; revision=72682
2016-09-15 13:25:20 +00:00
Thomas Faber
f2599dd576 [FASTFAT]
- Acquire DirResource before MainResource in DoQuery to keep locking order consistent and avoid deadlocks. Patch by Volodymyr Shcherbyna with small modification by me.
CORE-11959 CORE-11652

svn path=/trunk/; revision=72681
2016-09-15 13:12:02 +00:00
Christoph von Wittich
a35a286182 [LSASRV] check correct variable for NULL
svn path=/trunk/; revision=72680
2016-09-15 08:41:17 +00:00
Hermès Bélusca-Maïto
368cd76efb Of course, as soon as you see such typos in our code, you can be 90% sure they are repeated elsewhere. And indeed they are. Fix the typos in our code (I leave them in the 3rd party code).
Concerning the fix in the NDK header I've checked that publicly available information about this structure (NirSoft website, Windows Internals book, Windows symbols...) has the member correctly named.

svn path=/trunk/; revision=72679
2016-09-14 22:51:55 +00:00
Amine Khaldi
a957a1d35d [INF] Fix some spelling errors. By Josh Soref. CORE-11986
svn path=/trunk/; revision=72678
2016-09-14 21:30:34 +00:00
Amine Khaldi
7b41c2ebbf [TRANSLATIONS] One step further towards improving our translations. Brought to you by Josh Soref aka timeless. CORE-11985
svn path=/trunk/; revision=72677
2016-09-14 20:38:53 +00:00
James Tabor
585f434ff4 [NtUser]
- Remove unneeded code and information, the problem is in focus.c:SFW. See CORE-11324.

svn path=/trunk/; revision=72676
2016-09-14 14:35:03 +00:00
James Tabor
9e1cd0b7ff [NtUser]
- Fix recursion issues, CORE-8780 and CORE-11979. See CORE-11324 for breakage.

svn path=/trunk/; revision=72675
2016-09-14 14:15:46 +00:00
Thomas Faber
503cf310ad [NTOS]
- Return pool quota before freeing IRPs to a lookaside list
CORE-11962 #resolve

svn path=/trunk/; revision=72674
2016-09-14 12:45:45 +00:00
Thomas Faber
aac3bbc746 [TCPIP]
- Don't try to mark IRPs as pending when they might already be completed. For simplicity, always pend them instead.
CORE-11962

svn path=/trunk/; revision=72673
2016-09-14 11:46:19 +00:00
Amine Khaldi
7d478eb667 [IP] Avoid use-after-free of IPDATAGRAM_REASSEMBLY structures. By Roel Messiant. CORE-11889
svn path=/trunk/; revision=72672
2016-09-14 10:09:02 +00:00
Amine Khaldi
d87e3543c1 [PSDK] Add PFE_EXPORT_FUNC.
svn path=/trunk/; revision=72671
2016-09-14 10:04:40 +00:00
Amine Khaldi
fd3e47079c [FREETYPE] Update to v2.7.0. CORE-11639
svn path=/trunk/; revision=72670
2016-09-14 10:01:27 +00:00
Amine Khaldi
019c2ecb53 [MEDIA/INF] Add raw transport provider from msafd. By Peter Hater. CORE-10440
svn path=/trunk/; revision=72669
2016-09-14 08:55:23 +00:00
Dmitry Chapyshev
a4cd19ec42 [RTL]
- Use correct checks for illegal chars
- Build context and 8.3 name on the basis of it (context can be already presented)

* Fixes 34 tests for ntdll:RtlGenerate8dot3Name (remained 16 tests will be fixed after correction of a problem with NLS files)

svn path=/trunk/; revision=72668
2016-09-14 00:31:30 +00:00
Hermès Bélusca-Maïto
f693e1e83a [PIFMGR]
- Add new icons by DSP2003 under CC-BY-SA 4.0 International License Terms (the .ico and the original .png files).
- Use DSP2003's icons wherever possible, otherwise fallback to "alternative" icons or to the placeholder icon. The aim is to finally convert or create all the remaining icons using DSP2003's style.
CORE-10253

svn path=/trunk/; revision=72667
2016-09-13 21:46:47 +00:00
Pierre Schweitzer
7d2b56ccb0 [NTDLL_APITEST]
RtlGenerate8dot3Name: show that we don't deal correctly with checksums while generating short names.

Dedicated to Christoph

svn path=/trunk/; revision=72666
2016-09-13 09:57:52 +00:00
Mark Jansen
02b4119836 [SHELL32] Do not try to call a NULL m_pSF2Parent. CORE-11969 #comment Please retest!
svn path=/trunk/; revision=72662
2016-09-12 18:05:22 +00:00
Aleksandar Andrejevic
c6f8d6fe2c [KS]
The "Add" routine is optional in the KSDEVICE_DISPATCH structure.
KsDevice.Descriptor should be initialized even if there is no device dispatch.


svn path=/trunk/; revision=72661
2016-09-12 03:59:04 +00:00
Hermès Bélusca-Maïto
4fa77bfbc3 [NTDLL]: Fix misspelling.
svn path=/trunk/; revision=72660
2016-09-11 20:40:41 +00:00
Dmitry Chapyshev
6dd9ac5dc5 [USER32] We have to use the copy of DEVMODEA structure (having size expanded on dmDriverExtra) for support of extra data of the driver
svn path=/trunk/; revision=72659
2016-09-11 20:11:35 +00:00
Dmitry Chapyshev
5e9b9699a6 [USER32_APITEST] Add tests for EnumDisplaySettingsA
svn path=/trunk/; revision=72658
2016-09-11 19:50:16 +00:00
Dmitry Chapyshev
35d777891f [USER32] We have to use the copy of DEVMODEW structure (having size expanded on dmDriverExtra) for support of extra data of the driver
* Fixes 16 tests for EnumDisplaySettings

svn path=/trunk/; revision=72657
2016-09-11 19:05:27 +00:00
Christoph von Wittich
0ec1c73cbf [WIN32K] set lasterror in NtGdiCombineRgn
svn path=/trunk/; revision=72656
2016-09-11 17:27:59 +00:00
Dmitry Chapyshev
10c7e5cb30 [NtUser] Try to fix tests for user32:EnumDisplaySettings
svn path=/trunk/; revision=72655
2016-09-11 16:13:46 +00:00
Christoph von Wittich
db1b0cb26d [KERNEL32] set ExitCode when terminating threads in ExitProcess as well
svn path=/trunk/; revision=72654
2016-09-11 13:22:33 +00:00
Christoph von Wittich
63df102547 [WIN32K] add missing parameter check in NtGdiArcInternal
svn path=/trunk/; revision=72653
2016-09-11 09:01:04 +00:00
James Tabor
4e415d8996 [USER32] - Sync with Wine Staging 1.9.18.
svn path=/trunk/; revision=72652
2016-09-11 00:58:12 +00:00
James Tabor
3e15c24d4c [USER32] - Sync with Wine Staging 1.9.18.
svn path=/trunk/; revision=72651
2016-09-11 00:58:00 +00:00
James Tabor
cf98f01e86 [USER32] - Sync with Wine Staging 1.9.18.
svn path=/trunk/; revision=72650
2016-09-11 00:57:38 +00:00
Dmitry Chapyshev
50ce1f1694 [NtUser] Unnecessary check is removed and correct value of an error code is returned
* Fixes 2 tests for win32knt_apitest:NtUserEnumDisplaySettings

svn path=/trunk/; revision=72649
2016-09-10 22:30:53 +00:00
Dmitry Chapyshev
0bbd5c592b [NtUser] Fix 3 new tests for GET/SET NONCLIENTMETRICS, MINIMIZEDMETRICS, ICONMETRICS
svn path=/trunk/; revision=72648
2016-09-10 18:39:40 +00:00
Dmitry Chapyshev
5d2a362dda [WIN32KNT_APITEST] Add some tests for GET/SET NONCLIENTMETRICS, MINIMIZEDMETRICS, ICONMETRICS. It is checked in win2k3
svn path=/trunk/; revision=72647
2016-09-10 18:36:56 +00:00
Dmitry Chapyshev
47b4a945d2 [NtUser]
- Initialize cbSize for animationinfo
- Use widechar versions of structures

svn path=/trunk/; revision=72646
2016-09-10 17:58:32 +00:00
Dmitry Chapyshev
3776d19ec9 [WIN32KNT_APITEST]
- Remove wrong tests. Win2k3 ignores the size of structure for GET/SET NONCLIENTMETRICS, MINIMIZEDMETRICS, ICONMETRICS

[NtUser]
- Remove wrong checks

svn path=/trunk/; revision=72645
2016-09-10 16:17:35 +00:00
Eric Kohl
796aa0f7b3 [NTOSKRNL]
Fix lock/unlock order in SeLockSubjectContext/SeUnlockSubjectContext.
Patch by  Volodymyr Shcherbyna.
CORE-11966 #resolve #comment Thanks a lot!

svn path=/trunk/; revision=72644
2016-09-10 13:54:16 +00:00
Christoph von Wittich
e44c624a3e [CRT] sync ischira.c to wine 1.9.16
svn path=/trunk/; revision=72643
2016-09-10 11:40:54 +00:00
Christoph von Wittich
acc28413a5 [CRT] fix build
svn path=/trunk/; revision=72642
2016-09-10 07:18:50 +00:00
Christoph von Wittich
2899d91c28 [CRT] sync wtoi64.c with wine 1.9.16
svn path=/trunk/; revision=72641
2016-09-10 06:52:50 +00:00
Christoph von Wittich
d38c74fa76 [SETUPAPI] sync diskspace.c with wine 1.9.16
svn path=/trunk/; revision=72640
2016-09-10 06:20:10 +00:00
Dmitry Chapyshev
e0009ad353 [NtUser]
- Initialize cbSize filed for HIGHCONTRASTW
- SOUNDSENTRY -> SOUNDSENTRYW
- Add checks of size for SPI_GETHIGHCONTRAST and SPI_SETHIGHCONTRAST

svn path=/trunk/; revision=72639
2016-09-09 23:03:42 +00:00
Dmitry Chapyshev
0774f98a1b [NtUser]
- LPICONMETRICS -> LPICONMETRICSW

svn path=/trunk/; revision=72638
2016-09-09 22:39:25 +00:00
Amine Khaldi
87c6f4541c [WIN32K] Fix the size passed to UserSystemParametersInfo(). Addresses test issues revealed by r72636.
svn path=/trunk/; revision=72637
2016-09-09 22:26:55 +00:00
Dmitry Chapyshev
3d5e037772 [WIN32KNT_APITEST]
- Fix copypasta

[NTUSER]
- User's buffer has to be checked before check of size parameters, differently we cannot safely check the sizes of structures

svn path=/trunk/; revision=72636
2016-09-09 20:44:34 +00:00
Dmitry Chapyshev
5b62af8967 [WIN32NT_APITEST]
- Add some tests for NtUserSystemParametersInfo

svn path=/trunk/; revision=72635
2016-09-09 20:27:31 +00:00
Christoph von Wittich
f5f84ed231 [CRT] add #ifdef for easier syncing
svn path=/trunk/; revision=72634
2016-09-09 17:40:53 +00:00
Christoph von Wittich
a9a1a8f8bd [CRT] sync strxfrm.c to wine-1.9.16
svn path=/trunk/; revision=72633
2016-09-09 17:22:29 +00:00
Christoph von Wittich
77685fe543 [CRT] _strtoi64_l should crash on NULL pointer
svn path=/trunk/; revision=72632
2016-09-09 16:54:55 +00:00
James Tabor
2fa1533cf4 [NtGDI]
- Remove unneeded return sets.

svn path=/trunk/; revision=72630
2016-09-09 15:12:04 +00:00
Aman Priyadarshi
e991c925c8 Minor changes for ATAPI Srb Functions
svn path=/branches/GSoC_2016/AHCI/; revision=72330
2016-08-18 18:03:26 +00:00
Aman Priyadarshi
f1f2cc1bc4 Added Port Reset for non Idle ports
FIXED missing VendorId, RevisionId and SerialNo

svn path=/branches/GSoC_2016/AHCI/; revision=72219
2016-08-14 12:54:10 +00:00
Aman Priyadarshi
6f2ba170ae Fixed write crashes, write support working. Tested on win2k3 sp2 vmware sata
svn path=/branches/GSoC_2016/AHCI/; revision=72005
2016-07-26 15:38:14 +00:00
Aman Priyadarshi
c903cda7aa Added write support, next operation code 53 27.
svn path=/branches/GSoC_2016/AHCI/; revision=72002
2016-07-26 14:15:15 +00:00
Aman Priyadarshi
e51f406055 Handled SCSIOP_MODE_SENSE, Fixes made to maxLba count.
FileSystem detection is still not working :/

svn path=/branches/GSoC_2016/AHCI/; revision=71999
2016-07-25 19:50:09 +00:00
Aman Priyadarshi
60e957af7b Handled SCSIOP_TEST_UNIT_READY
Changed Default status to SRB_STATUS_INVALID_REQUEST
Added support for 48bits in GetLba function

svn path=/branches/GSoC_2016/AHCI/; revision=71996
2016-07-25 11:09:25 +00:00
Aman Priyadarshi
71e41b01c6 Fixed SrbExtension == NULL bug! :D
svn path=/branches/GSoC_2016/AHCI/; revision=71988
2016-07-24 12:41:07 +00:00
Aman Priyadarshi
05153b057d Completed SCSIOP_READ_CAPACITY, SCSIOP_REPORT_LUNS, SCSIOP_READ
Updated INQUIRY Fields
Code Fixes
Stable, Tested, AHCI-Detection and Read working

svn path=/branches/GSoC_2016/AHCI/; revision=71987
2016-07-23 22:53:15 +00:00
Aman Priyadarshi
93ea028360 Implemented Dpc Routine, managed Srb functions and some code fixes!
svn path=/branches/GSoC_2016/AHCI/; revision=71969
2016-07-19 16:50:59 +00:00
Aman Priyadarshi
b86b9221d4 - Handled DET = 03h case.
- Registered (Interrupt enable and SERR clear) working port.
Everything is working now! :D

svn path=/branches/GSoC_2016/AHCI/; revision=71822
2016-07-05 16:51:17 +00:00
Aman Priyadarshi
49f68f18d2 - Fixed Offset Issue (VendorId and Reversed space offset in Memory Registers)
- DET = 03h Device is Ready!
- Fixed some warnings

svn path=/branches/GSoC_2016/AHCI/; revision=71810
2016-07-04 20:20:25 +00:00
Aman Priyadarshi
b6081b04fc Debugging Port Device Status Check
svn path=/branches/GSoC_2016/AHCI/; revision=71809
2016-07-04 19:01:07 +00:00
Aman Priyadarshi
68e6647b7f - Completed Interrupt Handler Routine
- Added Inquiry Completion Routine
Check Notes.txt

svn path=/branches/GSoC_2016/AHCI/; revision=71705
2016-06-30 16:04:50 +00:00
Aman Priyadarshi
2cb1b3c60d Next: Interrupt Handler for completed FIS commands.
Notes.txt

svn path=/branches/GSoC_2016/AHCI/; revision=71681
2016-06-27 12:58:04 +00:00
Aman Priyadarshi
b8af2c6014 Implemented AhciBuild_PRDT
svn path=/branches/GSoC_2016/AHCI/; revision=71659
2016-06-22 16:08:45 +00:00
Aman Priyadarshi
ca8a828d02 Please look at notes.txt for implementation and progress status.
svn path=/branches/GSoC_2016/AHCI/; revision=71655
2016-06-20 11:49:22 +00:00
Aman Priyadarshi
b27dbd3e4b fixed portCount boundary problem :D
svn path=/branches/GSoC_2016/AHCI/; revision=71650
2016-06-16 21:14:03 +00:00
Aman Priyadarshi
5b776020ae - Fixed CMakeLists issues reported by hbelusca
- Fixed ROS name issue reported by hbelusca
- Handled non fatal device error interrupts
- AhciProcessIO Implemented
- code clean

svn path=/branches/GSoC_2016/AHCI/; revision=71647
2016-06-16 17:02:55 +00:00
Aman Priyadarshi
dcf485d6f3 Added AHCI_Global_HBA_CAP_S64A support
Added AhciProcessIO
Added RC file
Added CMAKE file
And Some fixes

svn path=/branches/GSoC_2016/AHCI/; revision=71641
2016-06-15 17:07:26 +00:00
Aman Priyadarshi
c9f49ee82b Code Review #2
svn path=/branches/GSoC_2016/AHCI/; revision=71607
2016-06-10 08:27:20 +00:00
Aman Priyadarshi
dc4ae1e279 changes after code review
svn path=/branches/GSoC_2016/AHCI/; revision=71605
2016-06-09 23:47:19 +00:00
Aman Priyadarshi
d8c1347c02 Added AhciHwInterrupt -- Round Robin Implementation (SharedPort)
Added Support Function AhciInterruptHandler
Added DeviceInquiryRequest
- Need to implement EVPD.
SRB_FUNCTION_EXECUTE_SCSI for cdb->CDB10.OperationCode != SCSIOP_INQUIRY

svn path=/branches/GSoC_2016/AHCI/; revision=71589
2016-06-07 18:06:51 +00:00
Aman Priyadarshi
d4c9e20b36 AHCI-SATA Interface almost ready.
- tested on VM.
- need to implement Interrupt Routine (MessagePerPort) and ATA/ATAPI Based SCSI Query.

svn path=/branches/GSoC_2016/AHCI/; revision=71588
2016-06-07 11:05:32 +00:00
Aman Priyadarshi
37fd8e78e1 Added INF File for driver installation with minimal configuration.
Device Detection and Initialization working -- tested on VMware.
StorPortAllocatePool not working, so asked Storport to allocate all memory just after loading up the driver -- Bad idea (will change it later).

svn path=/branches/GSoC_2016/AHCI/; revision=71530
2016-06-05 12:40:49 +00:00
Aman Priyadarshi
7a17550c7d - Added all HwStor Initialization Required Functions
- Driver loaded successfully
- Added Debug stubs

svn path=/branches/GSoC_2016/AHCI/; revision=71511
2016-06-04 12:52:38 +00:00
Aman Priyadarshi
f7890a371a AhciFindAdapter Completed
- Added AhciZeroMemory
- Added AhciAllocateResourceForAdapter
- Added AhciPortInitialize

Compile Status : OK

svn path=/branches/GSoC_2016/AHCI/; revision=71506
2016-06-03 15:54:21 +00:00
Aman Priyadarshi
c62ab931ac Required changes to meet community coding style.
svn path=/branches/GSoC_2016/AHCI/; revision=71500
2016-06-02 14:43:56 +00:00
Aman Priyadarshi
a60737f997 == Storahci driver
- Added DriverEntry
- Added AhciFindAdapter : Need to add code for port initialization.
- Compile : OK
- Test : NOT TESTED

svn path=/branches/GSoC_2016/AHCI/; revision=71499
2016-06-02 14:13:06 +00:00
Pierre Schweitzer
321bcc056d Create the AHCI branch for Aman's work
svn path=/branches/GSoC_2016/AHCI/; revision=71203
2016-04-24 20:17:09 +00:00
Colin Finck
5c6fa5db16 [WINSPOOL]
Additional tests show that IsValidDevmodeA/W actually does a lot more than I previously thought.
Implement the missing known features and test this little function to death in winspool_apitest to cover each and every possible call.
They pass on ReactOS, Windows Server 2003 and Windows 8.1.

Credits and many thanks go to Mark Jansen for the additional tests!

svn path=/branches/colins-printing-for-freedom/; revision=70595
2016-01-15 04:36:31 +00:00
Colin Finck
866bb7c041 [WINSPOOL]
Forgot to remove the StartDocPrinterA stub.

svn path=/branches/colins-printing-for-freedom/; revision=70506
2016-01-06 05:25:01 +00:00
Colin Finck
9af0f5d061 [WINSPOOL]
- Implement StartDocPrinterA.
- Fix an uninitialized access in StartDocPrinterW.
- Make OpenPrinterA and StartDocPrinterA consistent.

svn path=/branches/colins-printing-for-freedom/; revision=70505
2016-01-06 05:15:44 +00:00
Colin Finck
3d7b3309c1 [WINSPOOL]
Add and fully implement IsValidDevmodeA and IsValidDevmodeW.

[WINSPOOL_APITEST]
Add tests for IsValidDevmodeA and IsValidDevmodeW covering the entire functions.

svn path=/branches/colins-printing-for-freedom/; revision=70503
2016-01-06 04:31:53 +00:00
Colin Finck
c4f47d3a1f [SKIPLIST]
Add a missing dependency to psdk for the skiplist code.
Work in this branch continues as long as Trunk still serves a purpose for the 0.4.0 release.

svn path=/branches/colins-printing-for-freedom/; revision=70502
2016-01-06 02:31:14 +00:00
Colin Finck
37f713c79d [SKIPLIST]
The Park-Miller Lehmer Random Number Generator only outputs 31 uniformly distributed random bits. Bit 32 is always zero.
Fix the code accordingly.

This limits the maximum number of Skiplist levels to 31, but we only use 16 anyway so far.

svn path=/branches/colins-printing-for-freedom/; revision=68991
2015-09-04 14:03:00 +00:00
Colin Finck
8d6cd613e3 [WINSPOOL_PRINT]
Make winspool_print print a file to the "Dummy Printer On LPT1".

We're now able to print RAW data through the native Win32 Spooler APIs.
https://youtu.be/cNzePucTOLY

svn path=/branches/colins-printing-for-freedom/; revision=68567
2015-07-23 17:48:17 +00:00
Colin Finck
78cb041bec [WINSPOOL]
Stub some functions properly to get unicows.dll to compile again.

svn path=/branches/colins-printing-for-freedom/; revision=68552
2015-07-22 17:59:46 +00:00
Colin Finck
309215ece6 [LOCALSPL]
This is where things get dirty. StartDocPort of the Print Monitor needs the Printer Name and Job ID of the job to print on this port.
But StartDocPort is called by LocalStartDocPrinter, whose parameters are fixed and don't include this information.
Therefore, I have no way to pass these parameters to a port handle directly. Instead, I need to store a pointer to the job in the port structure itself and let the next port handle pick up this information in LocalStartDocPrinter.

Surprisingly, Windows doesn't seem to do any better here. For testing, I stalled execution inside my own Print Processor and called StartDocPrinter from another thread.
It then picked up and "stole" the stored job information. When the Print Processor resumed execution, the job information wasn't present anymore and its StartDocPrinter call crashed. So even Windows definitely stores this information only for a single StartDocPrinter call.

Having solved this, I could finally implement OpenPrinter, StartDocPrinter, ReadPrinter, WritePrinter and ClosePrinter for Port handles as well as OpenPrinter and ClosePrinter for Xcv handles.

svn path=/branches/colins-printing-for-freedom/; revision=68550
2015-07-22 12:44:22 +00:00
Colin Finck
03a88ff715 [LOCALSPL]
Stalling execution of the Print Processor under Windows reveals that the status flag JOB_STATUS_PRINTING is only set right before calling PrintDocumentOnPrintProcessor.

svn path=/branches/colins-printing-for-freedom/; revision=68549
2015-07-22 09:21:20 +00:00
Colin Finck
e29440dd47 [WINPRINT]
Add traces

svn path=/branches/colins-printing-for-freedom/; revision=68511
2015-07-21 13:19:14 +00:00
Colin Finck
09db4c602e [LOCALMON, LOCALSPL]
Fix a nasty stack corruption due to a *ppwsz[cch] vs. (*ppwsz)[cch] case.
But actually, we don't even need this line for null-terminating the string at all, because we operate on zero-initialized buffers. Remove it in another location as well.

svn path=/branches/colins-printing-for-freedom/; revision=68510
2015-07-21 10:46:29 +00:00
Colin Finck
3c798d7107 [SPOOLSS]
Rewrite RevertToPrinterSelf and ImpersonatePrinterClient.
In contrast to what I first thought, they shall also work when the thread has no impersonation token. This occurs for example when spooler functions are called from a thread that doesn't originate from a RPC request.
The rewritten functions also provide proper error codes.

The native behaviour of these functions was verified through API Monitoring under Windows.

svn path=/branches/colins-printing-for-freedom/; revision=68472
2015-07-20 16:15:52 +00:00
Colin Finck
087c85a5d3 It's bugfixing time!
[LOCALSPL]
- A Print Job has more optional fields than I thought. Only do a wcslen on them if they are not NULL.
- Make the code for checking changed fields more robust. Add checks for NULL to the Find and Compare functions.
- Fix some wrong parameters given to CopyMemory.
- Set the pPort field of a LOCAL_PRINTER structure.

[WINSPOOL]
Only pass the datatype from the DOC_INFO_1W structure of StartDocPrinterW to SetJobW if it's not NULL.
For StartDocPrinterW, this means that the datatype shall not be changed while SetJobW would return ERROR_INVALID_DATATYPE if none was passed.

svn path=/branches/colins-printing-for-freedom/; revision=68471
2015-07-20 15:21:03 +00:00
Colin Finck
9995ecdc6c [WINSPOOL]
Bugfix: winspool.drv shall only do local connections for now.
Even if wszName may include a computer name that needs to be extracted in the future, it must in no way be directly passed as the NetworkAddr parameter.
Fixes problems when using the spooler components with the "ncacn_np" protocol or with Windows' rpcrt4.dll.

svn path=/branches/colins-printing-for-freedom/; revision=68417
2015-07-18 14:31:20 +00:00
Colin Finck
e00279af25 Merge r68232 to get Windows' rpcrt4.dll to work under ReactOS.
svn path=/branches/colins-printing-for-freedom/; revision=68416
2015-07-18 12:29:25 +00:00
Colin Finck
0cdf412093 [WINSPOOL]
Bugfix: hPrinter is a PSPOOLER_HANDLE for all winspool functions. The hPrinter member of a SPOOLER_HANDLE is only passed to RPC calls.

svn path=/branches/colins-printing-for-freedom/; revision=68414
2015-07-17 15:11:34 +00:00
Colin Finck
6b968b2143 [SPOOLSV, WINSPOOL]
Add MarshallUp/MarshallDown functions for ADDJOB_INFO_1W as well.

svn path=/branches/colins-printing-for-freedom/; revision=68413
2015-07-17 15:09:31 +00:00
Colin Finck
e50cdc21c6 [WINSPOOL]
The pDevModeContainer parameter of _RpcOpenPrinter is not optional, but its contents may be null.
You can see this in the IDL file (pDevModeContainer is not marked with the "unique" attribute) or refer to https://msdn.microsoft.com/en-us/library/cc244808.aspx

svn path=/branches/colins-printing-for-freedom/; revision=68412
2015-07-17 14:34:23 +00:00
Colin Finck
6c77426a71 [HIVESYS]
Add registry entries for all developed printing components along with a dummy printer on LPT1.
These entries are enough to boot up the spooler.

svn path=/branches/colins-printing-for-freedom/; revision=68411
2015-07-17 14:20:12 +00:00
Colin Finck
d42dc06719 [LOCALSPL]
- Bugfix: A cb value includes the terminating null-character, a cch value does not. Fix the conversion.
- Bugfix: Properly calculate the required buffer size in LocalGetPrintProcessorDirectory and properly copy the string.

svn path=/branches/colins-printing-for-freedom/; revision=68410
2015-07-17 14:18:22 +00:00
Colin Finck
c8574e64e1 [LOCALSPL]
Report any error that occured inside _OpenEnvironment.

svn path=/branches/colins-printing-for-freedom/; revision=68409
2015-07-17 13:00:49 +00:00
Colin Finck
a758d604df [SPOOLSV, WINSPOOL]
- Add RPC calls, proper marshalling and exports for all implemented functions.
- Move the spoolsv stubs into categories, so that future implementations in winspool, spoolsv, spoolss and localspl can follow a consistent naming scheme.

svn path=/branches/colins-printing-for-freedom/; revision=68408
2015-07-17 10:57:10 +00:00
Colin Finck
c3a6132e37 [FORMATTING]
Tabs -> Spaces

svn path=/branches/colins-printing-for-freedom/; revision=68407
2015-07-16 15:24:40 +00:00
Colin Finck
30af627761 Merge r67713 and r67936 (Eric's parport driver) from trunk
svn path=/branches/colins-printing-for-freedom/; revision=68406
2015-07-16 15:12:50 +00:00
Colin Finck
ba2134dd1e [LOCALSPL, WINSPOOL]
Partially implement the whole StartDocPrinter, StartPagePrinter, ReadPrinter, WritePrinter, EndPagePrinter, EndDocPrinter, ClosePrinter group of functions.
They behave very differently based on whether spooled printing is enabled, whether it's a local or remote call, etc. Most information was gained by observing callchains under Windows.

So far, only the spooled path is implemented, the others need more investigation first.
Many other TODOs remain as well, see the comments.

Also make some more comments Doxygen-aware :)

svn path=/branches/colins-printing-for-freedom/; revision=68405
2015-07-16 15:03:47 +00:00
Colin Finck
f848e96f26 [SPOOLSV]
Implement the RPC calls for EnumMonitors, EnumPorts, ClosePrinter, EndDocPrinter, EndPagePrinter, ReadPrinter, StartDocPrinter, StartPagePrinter and WritePrinter.

svn path=/branches/colins-printing-for-freedom/; revision=68404
2015-07-16 13:59:20 +00:00
Colin Finck
843622e20a [LOCALMON]
- Bugfix: Unset bStartedDoc in LocalmonEndDocPort so that new documents can be started again.
- Bugfix: Use CREATE_ALWAYS instead of OPEN_ALWAYS for CreateFileW to truncate any existing output file before writing a new document into it.

svn path=/branches/colins-printing-for-freedom/; revision=68403
2015-07-15 18:45:37 +00:00
Colin Finck
afb3ba35d8 [LOCALMON]
My idea to just care about COM, FILE: and LPT ports was too short-sighted.
Apart from selecting a FILE: port that prompts for the output filename at printing, you can also add a port "C:\bla.txt" to always output into that particular file.
Even shared network printers can be added as a local port "\\COMPUTERNAME\PrinterName" (and Windows even does that when auto-adding printers found on the network). Note that this is the exception though, shared network printers are normally handled by a different component.

Our localmon now handles all valid ports found in the registry.
Port name checks were modified to be extra-picky and not let any false positives happen (e.g. trying to print into a file starting with "LPT" shouldn't be treated as printing to an LPT port)

svn path=/branches/colins-printing-for-freedom/; revision=68402
2015-07-15 18:15:33 +00:00
Colin Finck
1f52401541 [WINPRINT]
Bugfix: The Printer Name with Port is given through the parameter pPrinterName, not the pPrinterName field of the pPrintProcessorOpenData structure.

svn path=/branches/colins-printing-for-freedom/; revision=68401
2015-07-15 15:53:04 +00:00
Colin Finck
2e94fb273d [LOCALSPL]
- Rewrite LocalOpenPrinter to also properly support opening Port and Xcv handles.
- Manage a list of Ports and their associated Print Monitors.
- const-ify some parameters.

svn path=/branches/colins-printing-for-freedom/; revision=68397
2015-07-13 10:18:07 +00:00
Colin Finck
7ed643eb9c [LOCALSPL]
Bugfix: Copy the full DevMode including the extra data by the driver.

svn path=/branches/colins-printing-for-freedom/; revision=68379
2015-07-08 12:35:35 +00:00
Colin Finck
b83f56253b [LOCALSPL]
- Initialize all Print Monitors on startup and keep a list of them.
- Implement LocalEnumMonitors and LocalEnumPorts.
- Check the result of the initialization functions.

[SPOOLSS]
- Implement support for multiple Print Providers.
  Initialize them on startup and keep a list here as well.
- Implement all functions that had simple stubs in the C code. This still needs to be done for the remaining functions stubbed in the .spec file.
  But generally spoken, this always boils down to 3 cases:
    * Forward the call to the Local Spooler (for general functions like GetPrintProcessorDirectory).
    * Forward the call to the Print Provider we used for OpenPrinter (for functions like SetJob).
    * Forward the call to all Print Providers and collect the results (for functions like EnumPrinters).

svn path=/branches/colins-printing-for-freedom/; revision=68375
2015-07-07 17:06:48 +00:00
Colin Finck
91eab8a77a [LOCALMON]
- Bugfix: LocalmonClosePort must only free the memory for virtual file ports. Other port entries are reused.
- Bugfix: Set the port type to PortType_OtherLPT in all conditions that ít's not a physical LPT port.
- Synchronize access to the port lists.
- Keep a list of open Xcv handles as well to properly close them on shutdown.
- Add traces to all monitor functions for easier debugging. (requires DEBUGCHANNEL=+localmon environment variable)

svn path=/branches/colins-printing-for-freedom/; revision=68364
2015-07-07 10:30:30 +00:00
Colin Finck
75f2cf5f6f [LOCALMON]
Implement a Local Port Monitor for COM, FILE: and LPT ports, usable as a drop-in replacement for the Windows original.
Fully implements opening, enumerating and closing ports, starting and ending documents as well as reading and writing to ports along with Xcv data transfer between Port Monitor and Port Monitor UI.
Does not support IrDA printers unlike the Windows original, sorry guys :-P

The Windows Local Port Monitor is partly documented in an ancient DDK sample.
Additional information was gathered through API monitoring.

TODO:
- AddPort, DeletePort and PortIsValid Xcv functions need to be implemented.
- A real privilege check needs to be added to LocalmonXcvOpenPort.
- TESTING TESTING TESTING (under Windows) and fixing bugs.

To test it under Windows:
- Copy the compiled "localmon.dll" to the system32 directory.
- Open regedit.exe and move to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\Local Port.
- Replace "localspl.dll" by "localmon.dll" for the "Driver" value.

[SPOOLSS]
- Properly stub EnumPortsW to let localmon compile.

svn path=/branches/colins-printing-for-freedom/; revision=68356
2015-07-06 12:41:06 +00:00
Colin Finck
d2c73472d0 [PSDK]
Source our winspool.h from MinGW-w64.
Our current version was still based on MinGW w32api from 2005 and missing lots of definitions added ages ago.

svn path=/branches/colins-printing-for-freedom/; revision=68355
2015-07-06 09:57:09 +00:00
Colin Finck
259a6572ae [LOCALSPL, WINPRINT]
Bugfix: All functions returning multiple elements must only set *pcReturned to the element count on success!
Currently, this was also done when querying the needed buffer size. But for this case, *pcReturned just has to be zeroed.

svn path=/branches/colins-printing-for-freedom/; revision=68335
2015-07-03 09:06:35 +00:00
Colin Finck
86dbf40cd1 [LOCALSPL]
Bugfix: The RegEnum* functions take the buffer size _including_ the terminating null character as input and only return the actual data length _without_ the terminating null character as output.

svn path=/branches/colins-printing-for-freedom/; revision=68324
2015-06-30 16:08:16 +00:00
Colin Finck
aef3b57f55 [LOCALSPL, WINPRINT]
Bugfix: I want to dereference the pointer and then increment its value, not increment the pointer address.

svn path=/branches/colins-printing-for-freedom/; revision=68323
2015-06-30 16:02:26 +00:00
Colin Finck
6574de04e3 [LOCALSPL]
Bugfix: The last entry in a doubly linked list (LIST_ENTRY structure) is actually the head element again, not NULL!

svn path=/branches/colins-printing-for-freedom/; revision=68322
2015-06-30 15:54:42 +00:00
Colin Finck
14711237a1 [LOCALSPL]
- Partly implement LocalScheduleJob.
- Set the default status to JOB_STATUS_SPOOLING in LocalAddJob.
- Fix file sharing flags in ReadJobShadowFile and WriteJobShadowFile.

[SPOOLSS, SPOOLSV, WINSPOOL]
- Forward the newly implemented ScheduleJob call all the way down to localspl.dll.
- Stub ReadPrinter.

[WINPRINT]
Implement a very simple RAW Print Processor that just takes the input and forwards it to the Print Monitor. This one doesn't even do pausing or multiple copies yet.
The implementation includes:
- Implemented ClosePrintProcessor, OpenPrintProcessor and PrintDocumentOnPrintProcessor (apart from the previously implemented EnumPrintProcessorDatatypesW).
- Stubbed ControlPrintProcessor and GetPrintProcessorCapabilities.

svn path=/branches/colins-printing-for-freedom/; revision=68304
2015-06-28 15:51:32 +00:00
Colin Finck
b0bc4bb807 [LOCALSPL]
- Write the shadow file after changing job details.
- dwUnknown2 in the shadow file header is actually the offset of the Print Processor Parameters.
- Process all known fields of the shadow file in ReadJobShadowFile and WriteJobShadowFile.

svn path=/branches/colins-printing-for-freedom/; revision=68292
2015-06-27 15:37:14 +00:00
Colin Finck
03bc6a133e [SPOOLSS, SPOOLSV, WINSPOOL]
Connect AddJobW, EnumJobsW, GetJobW and SetJobW from winspool.drv over spoolsv.exe and spoolss.dll to the implemented functions in localspl.dll (including marshalling the involved structures down and up).
I decided to not use my recently implemented MarshallDownStructure API here and rather do the pointer math in place as this is simpler and faster.

svn path=/branches/colins-printing-for-freedom/; revision=68288
2015-06-27 12:36:45 +00:00
Colin Finck
3218c2067a [LOCALSPL]
Implement LocalEnumJobs the easy way by using the new Skiplist function LookupNodeByIndexSkiplist and calling _LocalGetJobLevelX for each job.
This required changes in _LocalGetJobLevelX, so that the strings are now copied in reverse to the end of the buffer while the structure is copied to the start. By preserving the pointers after each call, the function can be called multiple times.

svn path=/branches/colins-printing-for-freedom/; revision=68264
2015-06-25 15:27:38 +00:00
Colin Finck
84416a465a [SKIPLIST]
- Add a LookupNodeByIndexSkiplist function and a small test for it in skiplist_test.
- Remove a redundant double-set in LookupElementSkiplist.

Yes, we now have one lookup function that accepts search criteria and returns an element and another one that accepts an index and returns a SKIPLIST_NODE.
It's simply because I have exactly these two cases :)
You're free to implement the two missing functions or refactor this code another way.

svn path=/branches/colins-printing-for-freedom/; revision=68262
2015-06-25 13:12:01 +00:00
Colin Finck
7aef841dea [LOCALSPL]
- Implement LocalSetJob for Level 1 and 2.
- Add pPrintProcessor, pwszPrintProcessorParameters and pwszStatus members to the LOCAL_JOB structure and use them in LocalAddJob, LocalGetJob and LocalSetJob.
- Fix naming of some LOCAL_JOB members.

svn path=/branches/colins-printing-for-freedom/; revision=68259
2015-06-25 12:29:18 +00:00
Colin Finck
fe48c72925 [SPOOLSS]
Halfplement and document the undocumented but exported MarshallDownStructure API.
Information about this API was exclusively gained by writing a custom XML file for rohitab.com's API Monitor and monitoring calls under Windows.

I could figure out the parameters passed to the function, but don't really know what most of them are for.
For me, the function does what it should and what I will soon need it for, but without making use of cbSize, cbPerElementSize, cbStructureSize and bSomeBoolean.
A Code Review and additional hints are highly appreciated! My XML file for the API Monitor is available on request.

svn path=/branches/colins-printing-for-freedom/; revision=68253
2015-06-24 16:26:33 +00:00
Colin Finck
587d83f1e3 Addendum to r68248
svn path=/branches/colins-printing-for-freedom/; revision=68252
2015-06-24 16:20:13 +00:00
Colin Finck
794f62a466 [SPOOLSV, WINSPOOL]
Local Communication between winspool.drv and spoolsv.exe happens using the ncalrpc protocol. The ncacn_np endpoint is only available when sharing a printer. It's then used for receiving a remote call from win32spl.dll.
Reference: http://www.hsc.fr/ressources/articles/win_net_srv/msrpc_spoolss.html

This fixes e.g. testing a _RpcOpenPrinter call from our winspool.drv to a local printer under Windows.

svn path=/branches/colins-printing-for-freedom/; revision=68248
2015-06-24 09:51:29 +00:00
Colin Finck
7e4bcf78c4 [WINSPOOL]
Don't rely on pure magic to transmit the error code of the RPC call to the calling application. Instead use SetLastError on the return value of the call (this is what all these DWORD return values are for!)

[SPOOLSV]
For every RPC function, return the error code of the called Spooler Router function instead of the error code of RpcRevertToSelf.

[LOCALSPL, WINPRINT]
- Change the code structure in every function called from the Spooler Router to always set an error code, especially ERROR_SUCCESS on success.
- Store Attributes and Status values for a local printer.
- Fail in LocalAddJob if an invalid handle has been supplied or the printer is set to do direct printing.

svn path=/branches/colins-printing-for-freedom/; revision=68247
2015-06-23 13:46:14 +00:00
Colin Finck
5df5a009e2 [SPOOLSS] [SPOOLSV] [WINSPOOL]
- Add RPC calls in winspool, Router calls in spoolsv and Local Spooler calls in spoolss for most of the APIs I've implemented in localspl.
  This is still Work-In-Progress and missing some sanity checks, but a first step into something usable from the documented Spooler API side.
- Separate APIs into individual source files just like I did for localspl.

svn path=/branches/colins-printing-for-freedom/; revision=68237
2015-06-22 14:31:47 +00:00
Colin Finck
9be537abb7 [LOCALSPL]
- Get rid of the Generic Tables entirely and make use of the new Skiplist for the Global Job List, the Printer's Job List and the Printer List.
  Use a doubly linked-list for the Print Processors (there won't be many) and just save the information returned from the Print Processor's EnumPrintProcessorDatatypesW instead of putting it in another structure.
- Implement LocalAddJob and LocalGetJob (with full JOB_INFO_1W and JOB_INFO_2W support)
  This makes use of the element index in the new Skiplist implementation to retrieve the position of the job in the list.
- Do some changes to LocalStartDocPrinter, though this will make use of LocalAddJob in the future.
- Make some global variables static again.

svn path=/branches/colins-printing-for-freedom/; revision=68195
2015-06-19 15:21:30 +00:00
Colin Finck
a4d50f82ff [LOCALSPL_APITEST]
Put the calls that eventually give us the function pointers to localspl into a separate procedure GetLocalsplFuncs to enable further tests easily.

svn path=/branches/colins-printing-for-freedom/; revision=68194
2015-06-19 15:05:58 +00:00
Colin Finck
1793014ec3 [RPCRT4]
Add a lazy stub for RpcBindingServerFromClient to get my upcoming localspl changes to compile.
This needs further attention later.

svn path=/branches/colins-printing-for-freedom/; revision=68193
2015-06-19 15:00:41 +00:00
Colin Finck
f1377fcb7c [SKIPLIST]
Verify that SKIPLIST_LEVELS is in the required range using C_ASSERTs (thanks to Thomas for the hint!)

svn path=/branches/colins-printing-for-freedom/; revision=68192
2015-06-19 12:33:45 +00:00
Colin Finck
86ad9580b1 [SKIPLIST]
Add my implementation of an efficient Skiplist. A Skiplist can do insertion, deletion and lookups in O(log N) on average just like balanced trees.
It features simpler algorithms though due to purely relying on probabilistic balancing at insertion and not on rebalancing with every modification.

This simple structure allowed me to implement some additions on top of the standard algorithms:
* Storing distances between elements on each level to efficiently return the index of the element in the Skiplist when doing a lookup.
* InsertTailElementSkiplist to explicitly insert an element at the end of the Skiplist.
  This needs no comparisons and is useful when you can be sure that the new element would be inserted at the end (e.g. for a new print job in the queue with default priority).

More features are easily possible, but for now I limited features on those needed for my Local Spooler work.

Some references on Skiplists:
* ftp://ftp.cs.umd.edu/pub/skipLists/skiplists.pdf
* http://drum.lib.umd.edu/bitstream/1903/544/2/CS-TR-2286.1.pdf

svn path=/branches/colins-printing-for-freedom/; revision=68191
2015-06-19 10:27:46 +00:00
Colin Finck
888171ae18 [LOCALSPL_APITEST]
It's only the second disabled test, which is causing trouble for us, so reactivate the first one.
This also confirms that the problem is not related to SEH.

svn path=/branches/colins-printing-for-freedom/; revision=68104
2015-06-10 21:49:49 +00:00
Colin Finck
1e363204d6 [LOCALSPL_APITEST]
- Add more tests for fpEnumPrinters.
  For some reason, using SEH here works only once. We experience a hang in the testing process when you run the test again for a second time without restarting spoolsv. Needs more investigation.
- Ensure that the spooler service is running before starting any testing.
- Do proper cleanup in every case.

[LOCALSPL]
- Implement LocalEnumPrinters level 1 based on the API-Tests.
- Use DllAllocSplMem/DllFreeSplMem instead of HeapAlloc/HeapFree.
- Use AllocSplStr with DllFreeSplStr now that DuplicateStringW is gone.
- Use _countof where applicable.

[SPOOLSS]
- Found out that I was not the only one needing a wcsdup equivalent. My DuplicateStringW from localspl is actually exported as AllocSplStr in spoolss.
  This is actually part of a range of undocumented memory functions in spoolss, so implement and document AllocSplStr, DllAllocSplMem, DllFreeSplMem, DllFreeSplStr, ReallocSplMem and ReallocSplStr.
  Information about some of them was gathered through black box testing and DDK samples (down to Win95 DDK), which at least contained prototypes of them.
- Implement SplInitializeWinSpoolDrv based on the API-Test and simply return FALSE for SplIsUpgrade.

[SPOOLSS_APITEST]
- Add a test for ReallocSplStr, which was actually the most undocumented function of spoolss' memory functions.

[WINSPOOL]
SplInitializeWinSpoolDrv shows that we can't just auto-assign an ordinal to all winspool.drv functions. We even need to export some nameless functions by ordinal only.
Redo the whole .spec file based on the ordinals found in Windows Server 2003's winspool.drv. Trust WINE for the nameless stubs.

svn path=/branches/colins-printing-for-freedom/; revision=68089
2015-06-09 13:22:25 +00:00
Colin Finck
f2a66788f8 [LOCALSPL_APITEST]
Write an API-Test for localspl.dll. As the original localspl.dll from Windows Server 2003 relies on proper initialization inside spoolsv.exe, we cannot test it standalone as usual.
To make testing possible anyway, this program basically does four things:

  - Injecting our testing code into spoolsv.exe.
  - Registering and running us as a service in the SYSTEM security context like spoolsv.exe, so that injection is possible at all.
  - Sending the test name and receiving the console output over named pipes.
  - Redirecting the received console output to stdout again, so it looks and feels like a standard API-Test.

Nevertheless, the testing code in fpEnumPrinters.c is still written like a usual test. The known ok(), skip(), etc. macros can be used as usual, their output is just redirected through the named pipes.
Thanks to Thomas for giving me the tip about injecting code into spoolsv! :)

svn path=/branches/colins-printing-for-freedom/; revision=68080
2015-06-08 17:15:44 +00:00
Colin Finck
19839c646c [SPOOLSS_APITEST]
Add a test for SplInitializeWinSpoolDrv verifying that Wine's XP-compatible implementation of this function also works for 2003 (and that we're going to need some nameless exports by ordinals in winspool.drv...)

svn path=/branches/colins-printing-for-freedom/; revision=68035
2015-06-06 12:32:30 +00:00
Colin Finck
1e4d261c62 [PRINTING]
Add an include directory for all printing components containing definitions not found in the public headers.
For now, that's just PackStrings in spoolss.h.

[SPOOLSS_APITEST]
Use the new spoolss.h header.

[WINPRINT_APITEST]
Add an API-Test for the winprint Print Processor, so far for its EnumPrintProcessorDatatypesW function. Tests succeed in Windows Server 2003.
winspool.drv also provides functions that go into winprint.dll, but as these tests show, they behave slightly different in terms of error codes due to the involved RPC and routing.
Windows Server 2003 has winprint functions in localspl.dll, so you have to copy its localspl.dll to winprint.dll for testing.

[WINPRINT]
- Use PackStrings to simplify the code.
- Fix test failures.

svn path=/branches/colins-printing-for-freedom/; revision=68025
2015-06-05 18:16:51 +00:00
Colin Finck
ecd7f83ffb [SPOOLSS]
In an attempt to simplify the code for further functions that return information structures, implement and document the undocumented PackStrings function.
Hints were taken from an XP DDK sample and own testing.

[SPOOLSS_APITEST]
Add some tests for PackStrings that succeed under Windows Server 2003.

svn path=/branches/colins-printing-for-freedom/; revision=68023
2015-06-05 15:52:39 +00:00
Colin Finck
af0a3b64a9 [WINSPOOL_APITEST]
- Add tests for EnumPrinters
- Fix a test for EnumPrintProcessorDatatypes

svn path=/branches/colins-printing-for-freedom/; revision=68007
2015-06-04 12:19:06 +00:00
Colin Finck
99b62ed313 [WINSPOOL_APITEST]
Make the tests actually succeed under Windows Server 2003.

svn path=/branches/colins-printing-for-freedom/; revision=67884
2015-05-24 16:55:20 +00:00
Colin Finck
beaa69af38 Time to commit some Work-In-Progress stuff before my diff gets too large..
[LOCALSPL]
- Begin work on the Local Spooler. Return a structure with function pointers in InitializePrintProvidor.
- Design and document internal structures for managing LocalSpl Handles, Printer Handles, Printers, Print Jobs and Print Processors.
  Manage Printers and Print Processors in Generic Tables, with one Job Queue per Printer managed as a Doubly Linked List.
- Implement LocalOpenPrinter, LocalEnumPrintProcessorDatatypes, LocalEnumPrintProcessors, LocalGetPrintProcessorDirectory, with focus on catching all corner cases.
  Currently working on LocalStartDocPrinter.
- Build upon the documentation at http://www.undocprint.org/formats/winspool/shd to read and write .SHD files.

[WINPRINT]
Begin work on the Standard Print Processor. Implement EnumPrintProcessorDatatypesW.

[WINSPOOL_APITEST]
Add an API Test for winspool.drv, currently testing some corner cases of ClosePrinter, EnumPrintProcessorDatatypesW, GetPrintProcessorDirectoryW, OpenPrinterW, StartDocPrinterW.
TODO: Find a way to actually test the localspl.dll functions instead of only winspool.drv. This DLL doesn't like to be tested standalone under Windows, e.g. without being used through spoolsv/spoolss.

[SPOOLSS]
Implement InitializeRouter by calling the InitializePrintProvidor function of localspl there.
This function should later also initialize further Print Providers.

[SPOOLSV]
Call InitializeRouter when starting up the service.

[WINSPOOL]
Add dummy functions for EnumPrintProcessorDatatypesA/EnumPrintProcessorDatatypesW.

[All modules]
Fix printf format specifiers for errors (%lu) and statuses (%ld).

svn path=/branches/colins-printing-for-freedom/; revision=67847
2015-05-22 15:29:07 +00:00
Colin Finck
9a3f634ff7 [WINSPOOL]
- Use GdiConvertToDevmodeW instead of duplicating code.
- Fix the spec2def call here as well.

svn path=/branches/colins-printing-for-freedom/; revision=67816
2015-05-17 17:19:37 +00:00
Colin Finck
b6a75bda5d spec2def requires the DLL filename and not the module name in its parameters.
Fixes delay-importing spoolss.dll.

svn path=/branches/colins-printing-for-freedom/; revision=67705
2015-05-13 07:03:05 +00:00
Colin Finck
4510858390 - Fix the importlib order for the GNU linker according to Amine's suggestion.
- Add PSEH for winspool.

svn path=/branches/colins-printing-for-freedom/; revision=67694
2015-05-12 14:56:54 +00:00
Colin Finck
2ffd28325a - Add a dummy winspool.drv SpoolerInit doing an RPC call to a dummy RpcSpoolerInit, which itself passes the call to a dummy spoolss.dll SpoolerInit.
This serves as an example to show how I expect most spooler functions to work.
- Implement the publicly exported and fundamental RevertToPrinterSelf and ImpersonatePrinterClient spoolss.dll functions.
- Fix WINSPOOL_HANDLE_bind.
- Fix build with GCC.

svn path=/branches/colins-printing-for-freedom/; revision=67693
2015-05-12 14:43:25 +00:00
Colin Finck
26cb1650bc [SPOOLSV]
Add stubs for all RPC functions of the winspool interface.

svn path=/branches/colins-printing-for-freedom/; revision=67665
2015-05-11 14:14:50 +00:00
Colin Finck
3e53fe49e9 - Add all publicly available information about the spoolsv RPC interface of Windows Server 2003 to the winspool.idl file.
Another reference: http://www.hsc.fr/ressources/articles/win_net_srv/msrpc_spoolss.html
- Put this file in the public domain as it's just collected interface information from various sources without any real code.

svn path=/branches/colins-printing-for-freedom/; revision=67662
2015-05-11 13:37:23 +00:00
Colin Finck
3551e3ab45 Fix copying of structure values in OpenPrinterA
svn path=/branches/colins-printing-for-freedom/; revision=67577
2015-05-06 13:00:08 +00:00
Colin Finck
1ea68e0e6d - Add the first bits of the winspool/spoolsv/spoolss interface in a WIDL-compatible format.
References:
     - https://git.samba.org/?p=samba.git;a=blob;f=librpc/idl/spoolss.idl;hb=618af83d1bd07b12a9acc88b0d2111cab7a8bb2b
     - https://msdn.microsoft.com/en-us/library/cc244649.aspx
- Replace our stubbed spoolsv by a new basic implementation that already creates a thread to serve RPC requests.
- Add stubbed versions of localmon, localspl, spoolss, winprint, winspool matching the exports of the Windows Server 2003 DLLs.
  localmon and winprint are part of localspl in Windows Server 2003. I took the freedom of putting these distinct components into separate DLLs (as it's done for localmon in NT4 and for winprint in Win7).
- Implement some stubs myself to fix the build (e.g. comdlg32 uses some functions).
- Implement OpenPrinterA and OpenPrinterW in winspool. This is just ANSI-to-Unicode conversion and a RPC call.
- Remove the Wine-imported ntprint, this one also needs a complete rewrite once we're at this point.

svn path=/branches/colins-printing-for-freedom/; revision=67576
2015-05-06 12:47:20 +00:00
Colin Finck
6635670794 Fix PRINTER_DEFAULTSA and PRINTER_DEFAULTSW structures
svn path=/branches/colins-printing-for-freedom/; revision=67575
2015-05-06 12:17:39 +00:00
Colin Finck
f67a62efe5 Add a little test program "winspool_print" that just prints a single line of unformatted text.
This line will arrive as RAW data in the printing stack, so it doesn't need any processing through GDI and serves as a good test for the very basic printing components.

svn path=/branches/colins-printing-for-freedom/; revision=67544
2015-05-04 13:39:07 +00:00
Colin Finck
d5fd7aaa19 - Add my proposed directory tree for the components involved in printing.
- Remove some Wine-imported components which are either entirely not usable for us or only implement so few functions that it's easier to completely reimplement them.
- Move "localui" (Wine-imported) and "spoolsv" (ReactOS stub) to the new directories.

svn path=/branches/colins-printing-for-freedom/; revision=67543
2015-05-04 13:21:13 +00:00
3454 changed files with 587495 additions and 66693 deletions

View File

@@ -16,6 +16,11 @@ if(POLICY CMP0051)
cmake_policy(SET CMP0051 NEW)
endif()
if(POLICY CMP0058)
# Ninja requires custom command byproducts to be explicit
cmake_policy(SET CMP0058 OLD)
endif()
project(REACTOS)
# Versioning
@@ -35,7 +40,6 @@ set(CMAKE_SKIP_PREPROCESSED_SOURCE_RULES TRUE)
set(CMAKE_SKIP_ASSEMBLY_SOURCE_RULES TRUE)
set(CMAKE_COLOR_MAKEFILE OFF)
#set_property(GLOBAL PROPERTY RULE_MESSAGES OFF)
set(CMAKE_SKIP_INSTALL_RULES ON)
if(NOT DEFINED NEW_STYLE_BUILD)
set(NEW_STYLE_BUILD TRUE)
@@ -94,8 +98,6 @@ if(NOT CMAKE_CROSSCOMPILING)
add_definitions(/D_ALLOW_KEYWORD_MACROS)
endif()
add_definitions(/Dinline=__inline)
else()
add_compile_flags("-fshort-wchar -Wno-multichar")
endif()
include_directories(sdk/include/host)
@@ -108,9 +110,9 @@ if(NOT CMAKE_CROSSCOMPILING)
if(NOT NEW_STYLE_BUILD)
if(NOT MSVC)
export(TARGETS bin2c widl gendib cabman cdmake fatten hpp mkhive obj2bin spec2def geninc rsym mkshelllink utf16le xml2sdb FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- )
export(TARGETS bin2c widl gendib cabman fatten hpp isohybrid mkhive mkisofs obj2bin spec2def geninc rsym mkshelllink utf16le xml2sdb FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- )
else()
export(TARGETS bin2c widl gendib cabman cdmake fatten hpp mkhive obj2bin spec2def geninc mkshelllink utf16le xml2sdb FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- )
export(TARGETS bin2c widl gendib cabman fatten hpp isohybrid mkhive mkisofs obj2bin spec2def geninc mkshelllink utf16le xml2sdb FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- )
endif()
endif()
@@ -235,6 +237,7 @@ else()
${REACTOS_BINARY_DIR}/sdk/include/dxsdk
${REACTOS_BINARY_DIR}/sdk/include/ddk
${REACTOS_BINARY_DIR}/sdk/include/reactos
${REACTOS_BINARY_DIR}/sdk/include/reactos/mc
sdk/include/crt
sdk/include/ddk
sdk/include/ndk

View File

@@ -91,14 +91,14 @@ void print_help() {
" will switch device at Scsi2, bus 1, taget_id 1 to UDMA0 mode\n"
" atactl -h -d 30 c1:b0:d0:l0 \n"
" will hide Master (d0:l0) device on secondary (c1:b0) IDE channel\n"
" and lock i/o on this channel for 30 seconds to ensure safity\n"
" and lock i/o on this channel for 30 seconds to ensure safety\n"
" of removal process"
"------\n"
"Device address format:\n"
"\n"
"s<controller id> number of controller in system. Is assigned during hardware\n"
" detection. Usually s0/s1 are ATA Pri/Sec.\n"
" Note, due do NT internal desing ATA controllers are represented\n"
" Note, due do NT internal design ATA controllers are represented\n"
" as SCSI controllers.\n"
"b<bus id> For ATA controllers it is channel number.\n"
" Note, usually onboard controller is represented as 2 legacy\n"
@@ -1283,7 +1283,7 @@ ata_scan(
to.WaitForPhysicalLink = lock;
to.Flags = unhide ? UNIATA_ADD_FLAGS_UNHIDE : 0;
printf("Scaning bus for new devices.\n");
printf("Scanning bus for new devices.\n");
if(lock) {
printf("You have %d seconds to connect device.\n", lock);
}

View File

@@ -1,6 +1,8 @@
list(APPEND SOURCE cacls.c cacls.rc)
add_executable(cacls ${SOURCE})
include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils)
add_executable(cacls cacls.c cacls.rc)
set_module_type(cacls win32cui UNICODE)
target_link_libraries(cacls conutils ${PSEH_LIB})
add_importlibs(cacls advapi32 user32 shell32 msvcrt kernel32)
add_cd_file(TARGET cacls DESTINATION reactos/system32 FOR all)

View File

@@ -33,155 +33,17 @@ static GENERIC_MAPPING FileGenericMapping =
};
static
INT
LengthOfStrResource(IN HINSTANCE hInst,
IN UINT uID)
static VOID
PrintError(DWORD dwError)
{
HRSRC hrSrc;
HGLOBAL hRes;
LPWSTR lpName, lpStr;
if (dwError == ERROR_SUCCESS)
return;
if (hInst == NULL)
{
hInst = GetModuleHandle(NULL);
}
/* There are always blocks of 16 strings */
lpName = (LPWSTR)MAKEINTRESOURCE((uID >> 4) + 1);
/* Find the string table block */
hrSrc = FindResourceW(hInst, lpName, (LPWSTR)RT_STRING);
if (hrSrc)
{
hRes = LoadResource(hInst, hrSrc);
if (hRes)
{
lpStr = LockResource(hRes);
if (lpStr)
{
UINT x;
/* Find the string we're looking for */
uID &= 0xF; /* position in the block, same as % 16 */
for (x = 0; x < uID; x++)
{
lpStr += (*lpStr) + 1;
}
/* Found the string */
return (int)(*lpStr);
}
}
}
return -1;
ConMsgPuts(StdErr, FORMAT_MESSAGE_FROM_SYSTEM,
NULL, dwError, LANG_USER_DEFAULT);
}
static
INT
AllocAndLoadString(OUT LPTSTR *lpTarget,
IN HINSTANCE hInst,
IN UINT uID)
{
INT ln;
ln = LengthOfStrResource(hInst,
uID);
if (ln++ > 0)
{
(*lpTarget) = (LPTSTR)HeapAlloc(GetProcessHeap(),
0,
ln * sizeof(TCHAR));
if ((*lpTarget) != NULL)
{
INT Ret;
Ret = LoadString(hInst,
uID,
*lpTarget,
ln);
if (!Ret)
{
HeapFree(GetProcessHeap(),
0,
*lpTarget);
}
return Ret;
}
}
return 0;
}
static
VOID
PrintHelp(VOID)
{
LPTSTR szHelp;
if (AllocAndLoadString(&szHelp,
NULL,
IDS_HELP) != 0)
{
_tprintf(_T("%s"),
szHelp);
HeapFree(GetProcessHeap(),
0,
szHelp);
}
}
static
VOID
PrintErrorMessage(IN DWORD dwError)
{
LPTSTR szError;
if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_IGNORE_INSERTS |
FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
dwError,
MAKELANGID(LANG_NEUTRAL,
SUBLANG_DEFAULT),
(LPTSTR)&szError,
0,
NULL) != 0)
{
_tprintf(_T("%s"),
szError);
LocalFree((HLOCAL)szError);
}
}
static
DWORD
LoadAndPrintString(IN HINSTANCE hInst,
IN UINT uID)
{
TCHAR szTemp[255];
DWORD Len;
Len = (DWORD)LoadString(hInst,
uID,
szTemp,
sizeof(szTemp) / sizeof(szTemp[0]));
if (Len != 0)
{
_tprintf(_T("%s"),
szTemp);
}
return Len;
}
static
BOOL
static BOOL
PrintFileDacl(IN LPTSTR FilePath,
IN LPTSTR FileName)
{
@@ -199,10 +61,8 @@ PrintFileDacl(IN LPTSTR FilePath,
return FALSE;
}
_tcscpy(FullFileName,
FilePath);
_tcscat(FullFileName,
FileName);
_tcscpy(FullFileName, FilePath);
_tcscat(FullFileName, FileName);
/* find out how much memory we need */
if (!GetFileSecurity(FullFileName,
@@ -318,8 +178,7 @@ BuildSidString:
}
/* print the file name or space */
_tprintf(_T("%s "),
FullFileName);
ConPrintf(StdOut, L"%s ", FullFileName);
/* attempt to map the SID to a user name */
if (AceIndex == 0)
@@ -335,35 +194,29 @@ BuildSidString:
/* print the domain and/or user if possible, or the SID string */
if (Name != NULL && Domain[0] != _T('\0'))
{
_tprintf(_T("%s\\%s:"),
Domain,
Name);
ConPrintf(StdOut, L"%s\\%s:", Domain, Name);
IndentAccess = (DWORD)_tcslen(Domain) + _tcslen(Name);
}
else
{
LPTSTR DisplayString = (Name != NULL ? Name : SidString);
_tprintf(_T("%s:"),
DisplayString);
ConPrintf(StdOut, L"%s:", DisplayString);
IndentAccess = (DWORD)_tcslen(DisplayString);
}
/* print the ACE Flags */
if (Ace->Header.AceFlags & CONTAINER_INHERIT_ACE)
{
IndentAccess += LoadAndPrintString(NULL,
IDS_ABBR_CI);
IndentAccess += ConResPuts(StdOut, IDS_ABBR_CI);
}
if (Ace->Header.AceFlags & OBJECT_INHERIT_ACE)
{
IndentAccess += LoadAndPrintString(NULL,
IDS_ABBR_OI);
IndentAccess += ConResPuts(StdOut, IDS_ABBR_OI);
}
if (Ace->Header.AceFlags & INHERIT_ONLY_ACE)
{
IndentAccess += LoadAndPrintString(NULL,
IDS_ABBR_IO);
IndentAccess += ConResPuts(StdOut, IDS_ABBR_IO);
}
IndentAccess += 2;
@@ -375,13 +228,11 @@ BuildSidString:
{
if (AccessMask == FILE_ALL_ACCESS)
{
LoadAndPrintString(NULL,
IDS_ABBR_NONE);
ConResPuts(StdOut, IDS_ABBR_NONE);
}
else
{
LoadAndPrintString(NULL,
IDS_DENY);
ConResPuts(StdOut, IDS_DENY);
goto PrintSpecialAccess;
}
}
@@ -389,24 +240,20 @@ BuildSidString:
{
if (AccessMask == FILE_ALL_ACCESS)
{
LoadAndPrintString(NULL,
IDS_ABBR_FULL);
ConResPuts(StdOut, IDS_ABBR_FULL);
}
else if (!(Ace->Mask & (GENERIC_READ | GENERIC_EXECUTE)) &&
AccessMask == (FILE_GENERIC_READ | FILE_EXECUTE))
{
LoadAndPrintString(NULL,
IDS_ABBR_READ);
ConResPuts(StdOut, IDS_ABBR_READ);
}
else if (AccessMask == (FILE_GENERIC_READ | FILE_GENERIC_WRITE | FILE_EXECUTE | DELETE))
{
LoadAndPrintString(NULL,
IDS_ABBR_CHANGE);
ConResPuts(StdOut, IDS_ABBR_CHANGE);
}
else if (AccessMask == FILE_GENERIC_WRITE)
{
LoadAndPrintString(NULL,
IDS_ABBR_WRITE);
ConResPuts(StdOut, IDS_ABBR_WRITE);
}
else
{
@@ -446,38 +293,32 @@ BuildSidString:
{STANDARD_RIGHTS_ALL, IDS_STANDARD_RIGHTS_ALL},
};
LoadAndPrintString(NULL,
IDS_ALLOW);
ConResPuts(StdOut, IDS_ALLOW);
PrintSpecialAccess:
LoadAndPrintString(NULL,
IDS_SPECIAL_ACCESS);
ConResPuts(StdOut, IDS_SPECIAL_ACCESS);
/* print the special access rights */
x = sizeof(AccessRights) / sizeof(AccessRights[0]);
x = ARRAYSIZE(AccessRights);
while (x-- != 0)
{
if ((Ace->Mask & AccessRights[x].Access) == AccessRights[x].Access)
{
_tprintf(_T("\n%s "),
FullFileName);
for (x2 = 0;
x2 < IndentAccess;
x2++)
ConPrintf(StdOut, L"\n%s ", FullFileName);
for (x2 = 0; x2 < IndentAccess; x2++)
{
_tprintf(_T(" "));
ConPuts(StdOut, L" ");
}
LoadAndPrintString(NULL,
AccessRights[x].uID);
ConResPuts(StdOut, AccessRights[x].uID);
}
}
_tprintf(_T("\n"));
ConPuts(StdOut, L"\n");
}
}
_tprintf(_T("\n"));
ConPuts(StdOut, L"\n");
/* free up all resources */
if (Name != NULL)
@@ -541,7 +382,7 @@ GetPathOfFile(LPTSTR FilePath, LPCTSTR pszFiles)
*pch = 0;
if (!GetFullPathName(FilePath, MAX_PATH, FullPath, NULL))
{
PrintErrorMessage(GetLastError());
PrintError(GetLastError());
return FALSE;
}
lstrcpyn(FilePath, FullPath, MAX_PATH);
@@ -549,7 +390,7 @@ GetPathOfFile(LPTSTR FilePath, LPCTSTR pszFiles)
attrs = GetFileAttributes(FilePath);
if (attrs == 0xFFFFFFFF || !(attrs & FILE_ATTRIBUTE_DIRECTORY))
{
PrintErrorMessage(ERROR_DIRECTORY);
PrintError(ERROR_DIRECTORY);
return FALSE;
}
}
@@ -591,7 +432,7 @@ PrintDaclsOfFiles(LPCTSTR pszFiles)
LastError = GetLastError();
if (LastError == ERROR_ACCESS_DENIED)
{
PrintErrorMessage(LastError);
PrintError(LastError);
if (!OptionC)
{
FindClose(hFind);
@@ -599,17 +440,21 @@ PrintDaclsOfFiles(LPCTSTR pszFiles)
}
}
else
{
break;
}
}
else
_tprintf(_T("\n"));
{
ConPuts(StdOut, L"\n");
}
} while(FindNextFile(hFind, &FindData));
LastError = GetLastError();
FindClose(hFind);
if (LastError != ERROR_NO_MORE_FILES)
{
PrintErrorMessage(LastError);
PrintError(LastError);
return FALSE;
}
@@ -771,7 +616,7 @@ ChangeACLsOfFiles(LPCTSTR pszFiles)
LastError = GetLastError();
if (LastError == ERROR_ACCESS_DENIED)
{
PrintErrorMessage(LastError);
PrintError(LastError);
if (!OptionC)
{
FindClose(hFind);
@@ -788,7 +633,7 @@ ChangeACLsOfFiles(LPCTSTR pszFiles)
if (LastError != ERROR_NO_MORE_FILES)
{
PrintErrorMessage(LastError);
PrintError(LastError);
return FALSE;
}
@@ -826,7 +671,7 @@ ChangeACLsOfFilesInCurDir(LPCTSTR pszFiles)
LastError = GetLastError();
if (LastError == ERROR_ACCESS_DENIED)
{
PrintErrorMessage(LastError);
PrintError(LastError);
if (!OptionC)
{
FindClose(hFind);
@@ -843,7 +688,7 @@ ChangeACLsOfFilesInCurDir(LPCTSTR pszFiles)
if (LastError != ERROR_NO_MORE_FILES)
{
PrintErrorMessage(LastError);
PrintError(LastError);
return FALSE;
}
@@ -872,7 +717,7 @@ ChangeACLsOfFilesInCurDir(LPCTSTR pszFiles)
LastError = GetLastError();
if (LastError == ERROR_ACCESS_DENIED)
{
PrintErrorMessage(LastError);
PrintError(LastError);
if (!OptionC)
{
FindClose(hFind);
@@ -889,26 +734,29 @@ ChangeACLsOfFilesInCurDir(LPCTSTR pszFiles)
if (LastError != ERROR_NO_MORE_FILES)
{
PrintErrorMessage(LastError);
PrintError(LastError);
return FALSE;
}
return TRUE;
}
int
__cdecl
_tmain(int argc, const TCHAR *argv[])
int _tmain(int argc, const TCHAR *argv[])
{
INT i;
LPTSTR pch;
BOOL InvalidParameter = FALSE;
/* Initialize the Console Standard Streams */
ConInitStdStreams();
if (argc <= 1)
{
PrintHelp();
ConResPuts(StdOut, IDS_HELP);
return 0;
}
// FIXME: Convert to proper parsing, with support for /?
/*
* parse command line options
*/
@@ -991,8 +839,8 @@ _tmain(int argc, const TCHAR *argv[])
if (InvalidParameter)
{
PrintErrorMessage(ERROR_INVALID_PARAMETER);
PrintHelp();
PrintError(ERROR_INVALID_PARAMETER);
ConResPuts(StdOut, IDS_HELP);
return 1;
}

View File

@@ -23,7 +23,8 @@ CACLS όνομα_αρχείου [/T] [/E] [/C] [/G χρήστης:άδειες [
C Αλλαγή (εγγραφή)\n\
F Πλήρης έλεγχος\n\
/D user Αποτροπή χρήστη από προσπέλαση.\n\
Τα Wildcards μπορούν να χρησιμοποιηθούν για να προσδιορίσουν παραπαπάνω από ένα αρχεία στην εντολή.\n\
Τα Wildcards μπορούν να χρησιμοποιηθούν για να προσδιορίσουν παραπαπάνω από\n\
ένα αρχεία στην εντολή.\n\
Μπορείτε να προσδιορίσετε παρπαάνω από έναν χρήστη στην εντολή.\n\n\
Abbreviations:\n\
CI - Container Inherit.\n\

View File

@@ -18,7 +18,8 @@ CACLS archivo [/T] [/E] [/C] [/G user:perm [...]] [/R usuario [...]]\n\
W Escribir\n\
C Cambiar (escribir)\n\
F Control total\n\
/R usuario Revoca los derechos de acceso al usuario especificado (unicamente válido con /E).\n\
/R usuario Revoca los derechos de acceso al usuario especificado\n\
(unicamente válido con /E).\n\
/P user:perm Reemplaza los derechos de acceso del usuario especificado.\n\
Perm puede ser: N Ninguno\n\
R Leer\n\

View File

@@ -15,7 +15,8 @@ CACLS nomfichier [/T] [/E] [/C] [/G user:perm [...]] [/R user [...]]\n\
W Écriture\n\
C Modification (Écriture)\n\
F Contrôle total\n\
/R user Supprime les droits d'accès de l'utilisateur spécifié (valide uniquement avec /E).\n\
/R user Supprime les droits d'accès de l'utilisateur spécifié\n\
(valide uniquement avec /E).\n\
/P user:perm Remplace les droits d'accès de l'utilisateur spécifié.\n\
Perm peut valoir : N Aucun \n\
R Lecture\n\
@@ -23,7 +24,8 @@ CACLS nomfichier [/T] [/E] [/C] [/G user:perm [...]] [/R user [...]]\n\
C Modification (Écriture)\n\
F Contrôle total\n\
/D user Interdit l'accès à l'utilisateur spécifié.\n\
Il est possible d'utiliser des caractères joker pour sélectionner plus d'un fichier avec une commande.\n\
Il est possible d'utiliser des caractères joker pour sélectionner plus d'un\n\
fichier avec une commande.\n\
Il est possible de spécifier plus d'un utilisateur dans une commande.\n\n\
Abréviations:\n\
CI - Héritage du conteneur.\n\

View File

@@ -2,7 +2,9 @@ LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
IDS_HELP "ACL's (Access Control Lists, toegangslijsten) van bestanden weergeven\nof bewerken\n\nCACLS bestandsnaam [/T] [/E] [/C] [/G gebr:toeg] [/R gebruiker [...]]\n\
IDS_HELP "ACL's (Access Control Lists, toegangslijsten) van bestanden weergeven\n\
of bewerken\n\n\
CACLS bestandsnaam [/T] [/E] [/C] [/G gebr:toeg] [/R gebruiker [...]]\n\
[/P gebr:toeg [...]] [/D gebruiker [...]]\n\
bestandsnaam ACL's weergeven.\n\
/T ACL's wijzigen van opgegeven bestanden in\n\

View File

@@ -24,7 +24,8 @@ CACLS nazwa pliku [/T] [/E] [/C] [/G użytkownik:dostęp [...]] [/R użytkownik
W Zapis\n\
C Zmiana (zapis)\n\
F Pełny dostęp\n\
/R użytkownik Odwołuje prawa dostępu określonemu użytkownikowi (działa tylko z opcją /E).\n\
/R użytkownik Odwołuje prawa dostępu określonemu użytkownikowi\n\
(działa tylko z opcją /E).\n\
/P użytkownik:dostęp Edytuje prawa dostępu określonego użytkownika.\n\
Poziom dostępu:\n\
N Brak\n\
@@ -33,7 +34,8 @@ CACLS nazwa pliku [/T] [/E] [/C] [/G użytkownik:dostęp [...]] [/R użytkownik
C Zmiana (zapis)\n\
F Pełny dostęp\n\
/D użytkownik Odbiera prawa dostępu określonemu użytkownikowi.\n\
W jednym poleceniu można edytować prawa dostępu do wielu plików, używając symboli wieloznacznych.\n\
W jednym poleceniu można edytować prawa dostępu do wielu plików, używając\n\
symboli wieloznacznych.\n\
W jednym poleceniu można edytować prawa dostępu wielu użytkowników.\n\n\
Skróty:\n\
CI - Dziedziczenie kontenera.\n\

View File

@@ -1,4 +1,4 @@
/* Ștefan Fulea (stefan dot fulea at mail dot md) */
/* Translator: Ștefan Fulea (stefan dot fulea at mail dot md) */
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
STRINGTABLE
@@ -26,8 +26,8 @@ CACLS nume_fișier [/T] [/E] [/C] [/G utilizator:acces [...]]\n\
C De modificare (scriere)\n\
F Deplin\n\
/D utilizator Interzice accesul pentru utilizatorul specificat.\n\
Se pot specifica mai multe fișiere utilizând metacaractere.\n\
Pot fi specificați mai mulți utilizatori în aceiași comandă.\n\n\
Utilizând metacaractere pot fi specificate mai multe fișiere.\n\
În aceiași comandă pot fi specificați mai mulți utilizatori.\n\n\
Abrevieri:\n\
CI - Moștenire container.\n\
ACE moștenită de directoare.\n\

View File

@@ -2,11 +2,14 @@
#define _CACLS_PRECOMP_H
#include <stdarg.h>
#include <tchar.h>
#include <windef.h>
#include <winbase.h>
#include <winuser.h>
#include <winuser.h> // For CharPrev
#include <sddl.h>
#include <tchar.h>
#include <conutils.h>
#include "resource.h"

View File

@@ -331,7 +331,7 @@ It deletes the current calculation and all sub expressions.
Shortcut from keyboard: ESC
F-E
It enables or it disables the fixed scietific notation.
It enables or it disables the fixed scientific notation.
Shortcut from keyboard: V
0 1 2 3 4 5 6 7 8 9

View File

@@ -331,7 +331,7 @@ BEGIN
END
POPUP "&Help"
BEGIN
MENUITEM "&Help topics", IDM_HELP_HELP
MENUITEM "&Help Topics", IDM_HELP_HELP
MENUITEM SEPARATOR
MENUITEM "&About ReactOS Calc", IDM_HELP_ABOUT
END
@@ -364,7 +364,7 @@ BEGIN
END
POPUP "&Help"
BEGIN
MENUITEM "&Help topics", IDM_HELP_HELP
MENUITEM "&Help Topics", IDM_HELP_HELP
MENUITEM SEPARATOR
MENUITEM "&About ReactOS Calc", IDM_HELP_ABOUT
END
@@ -387,7 +387,7 @@ BEGIN
END
POPUP "&Help"
BEGIN
MENUITEM "&Help topics", IDM_HELP_HELP
MENUITEM "&Help Topics", IDM_HELP_HELP
MENUITEM SEPARATOR
MENUITEM "&About ReactOS Calc", IDM_HELP_ABOUT
END

View File

@@ -320,14 +320,14 @@ BEGIN
MENUITEM "&Bilimlik", IDM_VIEW_SCIENTIFIC
MENUITEM "&Dönüştürme", IDM_VIEW_CONVERSION
MENUITEM SEPARATOR
MENUITEM "&Onaltılık\tİ5", IDM_VIEW_HEX, CHECKED
MENUITEM "O&nluk\tİ6", IDM_VIEW_DEC, CHECKED
MENUITEM "&Sekizlik\tİ7", IDM_VIEW_OCT, CHECKED
MENUITEM "&İkilik\tİ8", IDM_VIEW_BIN, CHECKED
MENUITEM "&Onaltılık\tF5", IDM_VIEW_HEX, CHECKED
MENUITEM "O&nluk\tF6", IDM_VIEW_DEC, CHECKED
MENUITEM "&Sekizlik\tF7", IDM_VIEW_OCT, CHECKED
MENUITEM "&İkilik\tF8", IDM_VIEW_BIN, CHECKED
MENUITEM SEPARATOR
MENUITEM "D&erece\tİ2", IDM_VIEW_DEG, CHECKED
MENUITEM "&Radyan\tİ3", IDM_VIEW_RAD, CHECKED
MENUITEM "&Gradyan\tİ4", IDM_VIEW_GRAD, CHECKED
MENUITEM "D&erece\tF2", IDM_VIEW_DEG, CHECKED
MENUITEM "&Radyan\tF3", IDM_VIEW_RAD, CHECKED
MENUITEM "&Gradyan\tF4", IDM_VIEW_GRAD, CHECKED
MENUITEM SEPARATOR
MENUITEM "B&asamakları Takımla", IDM_VIEW_GROUP, CHECKED
END
@@ -352,15 +352,15 @@ BEGIN
MENUITEM "&Bilimlik", IDM_VIEW_SCIENTIFIC
MENUITEM "&Dönüştürme", IDM_VIEW_CONVERSION
MENUITEM SEPARATOR
MENUITEM "&Onaltılık\tİ5", IDM_VIEW_HEX, CHECKED
MENUITEM "O&nluk\tİ6", IDM_VIEW_DEC, CHECKED
MENUITEM "&Sekizlik\tİ7", IDM_VIEW_OCT, CHECKED
MENUITEM "&İkilik\tİ8", IDM_VIEW_BIN, CHECKED
MENUITEM "&Onaltılık\tF5", IDM_VIEW_HEX, CHECKED
MENUITEM "O&nluk\tF6", IDM_VIEW_DEC, CHECKED
MENUITEM "&Sekizlik\tF7", IDM_VIEW_OCT, CHECKED
MENUITEM "&İkilik\tF8", IDM_VIEW_BIN, CHECKED
MENUITEM SEPARATOR
MENUITEM "Dö&rtlü Sözcük\tİ12", IDM_VIEW_QWORD, CHECKED
MENUITEM "İ&kili Sözcük\tİ2", IDM_VIEW_DWORD, CHECKED
MENUITEM "Sö&zcük\tİ3", IDM_VIEW_WORD, CHECKED
MENUITEM "&Çoklu\tİ4", IDM_VIEW_BYTE, CHECKED
MENUITEM "Dö&rtlü Sözcük\tF12", IDM_VIEW_QWORD, CHECKED
MENUITEM "İ&kili Sözcük\tF2", IDM_VIEW_DWORD, CHECKED
MENUITEM "Sö&zcük\tF3", IDM_VIEW_WORD, CHECKED
MENUITEM "&Çoklu\tF4", IDM_VIEW_BYTE, CHECKED
MENUITEM SEPARATOR
MENUITEM "B&asamakları Takımla", IDM_VIEW_GROUP, CHECKED
END

View File

@@ -314,7 +314,7 @@ void run_operator(calc_node_t *result,
calc.is_nan = TRUE;
} else {
operator_list[operation].op_i(&dc, &da, &db);
/* apply final limitator to result */
/* apply final limiter to result */
apply_int_mask(&dc);
}

View File

@@ -300,7 +300,7 @@ void run_operator(calc_node_t *result,
operator_list[operation].op_f(&result->number, &a->number, &b->number);
} else {
operator_list[operation].op_i(&result->number, &a->number, &b->number);
/* apply final limitator to result */
/* apply final limiter to result */
apply_int_mask(&result->number);
}
}

View File

@@ -11,7 +11,7 @@ void prepare_rpn_result_2(calc_number_t *rpn, TCHAR *buffer, int size, int base)
break;
case IDC_RADIO_DEC:
/*
* Modifed from 17 to 16 for fixing this bug:
* Modified from 17 to 16 for fixing this bug:
* 14+14+6.3+6.3= 40.5999999 instead of 40.6
* So, it's probably better to leave the least
* significant digit out of the display.
@@ -25,7 +25,7 @@ void prepare_rpn_result_2(calc_number_t *rpn, TCHAR *buffer, int size, int base)
TCHAR *ptr, *dst;
ptr = buffer + _stprintf(buffer, TEXT("%#*.*f"), width, ((MAX_LD_WIDTH-width-1)>=0) ? MAX_LD_WIDTH-width-1 : 0, rpn->f);
/* format sring ensures there is a '.': */
/* format string ensures there is a '.': */
dst = _tcschr(buffer, TEXT('.'));
while (--ptr > dst)
if (*ptr != TEXT('0'))

View File

@@ -34,7 +34,7 @@
* Corrected precision underflow/overflow when working with trigonometric functions.
* cbrt() function is not used if compiling into ReactOS build system.
* Resources are moved into /res directory.
* Added new (partial) support for other languages: bulgarian, spanish, german, dutch, polish, russian, slovak, ukraianian.
* Added new (partial) support for other languages: bulgarian, spanish, german, dutch, polish, russian, slovak, ukrainian.
* Decimal precision of number with standard layout has been limited to 16 digits because the output display is smaller here (GMP version only).
* Fixed buffer overflow with function update_lcd_display().
* The decimal point is now preserved when switching to temporary scientific notation.

View File

@@ -212,8 +212,8 @@ static const function_table_t function_table[] = {
{ IDC_BUTTON_DMS, MODIFIER_INV, 1, rpn_dec2dms, rpn_dms2dec, NULL, NULL },
{ IDC_BUTTON_FE, 0, 1, run_fe, NULL, NULL, NULL },
{ IDC_BUTTON_DAT, 0, 1, run_dat_sta, NULL, NULL, NULL, },
{ IDC_BUTTON_MP, MODIFIER_INV, 1, run_mp, run_mm, NULL, NULL, },
{ IDC_BUTTON_MS, MODIFIER_INV, 1, run_ms, run_mw, NULL, NULL, },
{ IDC_BUTTON_MP, MODIFIER_INV|NO_CHAIN, 1, run_mp, run_mm, NULL, NULL, },
{ IDC_BUTTON_MS, MODIFIER_INV|NO_CHAIN, 1, run_ms, run_mw, NULL, NULL, },
{ IDC_BUTTON_CANC, NO_CHAIN, 0, run_canc, NULL, NULL, NULL, },
{ IDC_BUTTON_RIGHTPAR, NO_CHAIN, 1, run_rpar, NULL, NULL, NULL, },
{ IDC_BUTTON_LEFTPAR, NO_CHAIN, 0, run_lpar, NULL, NULL, NULL, },
@@ -435,7 +435,7 @@ KeyboardHookProc(int nCode, WPARAM wParam, LPARAM lParam)
static void update_lcd_display(HWND hwnd)
{
/*
* muliply size of calc.buffer by 2 because it may
* multiply size of calc.buffer by 2 because it may
* happen that separator is used between each digit.
* Also added little additional space for dot and '\0'.
*/

View File

@@ -58,7 +58,7 @@ extern void LoadSettings(void)
if (RegOpenKeyEx(HKEY_CURRENT_USER, g_szGeneralRegKey, 0, KEY_READ, &hKey) == ERROR_SUCCESS)
{
TCHAR szBuffer[MAX_PATH];
DWORD dwAdvanChecked;
DWORD dwAdvancedChecked;
unsigned long type = REG_DWORD, size = 1024;
/* Restore last selected font */
@@ -89,9 +89,9 @@ extern void LoadSettings(void)
}
}
RegQueryValueEx(hKey, _T("Advanced"), NULL, &type, (LPBYTE)&dwAdvanChecked, &size);
RegQueryValueEx(hKey, _T("Advanced"), NULL, &type, (LPBYTE)&dwAdvancedChecked, &size);
if(dwAdvanChecked == TRUE)
if(dwAdvancedChecked == TRUE)
SendDlgItemMessage(hCharmapDlg, IDC_CHECK_ADVANCED, BM_CLICK, MF_CHECKED, 0);
RegCloseKey(hKey);

View File

@@ -69,7 +69,7 @@ CGridView::SetFont(
)
{
// Create a temperary container for the new font
// Create a temporary container for the new font
CurrentFont NewFont = { 0 };
NewFont.FontName = FontName;
@@ -224,7 +224,7 @@ CGridView::OnSize(
SWP_NOZORDER | SWP_SHOWWINDOW);
// Get the client area we can draw on. The position we set above includes
// a scrollbar which we obvioulsy can't draw on. GetClientRect gives us
// a scrollbar which we obviously can't draw on. GetClientRect gives us
// the size without the scroll, and it's more efficient than getting the
// scroll metrics and calculating the size from that
RECT ClientRect;

View File

@@ -1,8 +1,7 @@
/*
* PROJECT: ReactOS Device Managment
* PROJECT: ReactOS Character Map
* LICENSE: GPL - See COPYING in the top level directory
* FILE: base/applications/mscutils/devmgmt/devmgmt.c
* PURPOSE: Bootstrap for the device manager
* FILE: base/applications/charmap/charmap.cpp
* COPYRIGHT: Copyright 2006 Ged Murphy <gedmurphy@gmail.com>
*/

View File

@@ -10,7 +10,7 @@ BEGIN
POPUP "&File"
BEGIN
MENUITEM "&Open...", CMD_OPEN
MENUITEM "Save &as...", CMD_SAVE_AS
MENUITEM "Save &As...", CMD_SAVE_AS
MENUITEM SEPARATOR
MENUITEM "E&xit", CMD_EXIT
END

View File

@@ -45,17 +45,17 @@ BEGIN
STRING_CF_UNKNOWN "Неизвестный формат"
STRING_CF_TEXT "Текст"
STRING_CF_BITMAP "Точечный рисунок"
STRING_CF_OEMTEXT "OEM текст"
STRING_CF_UNICODETEXT "Юникод текст"
STRING_CF_DIB "DIB точечный рисунок"
STRING_CF_LOCALE "Locale Data"
STRING_CF_ENHMETAFILE "Enhanced Metafile"
STRING_CF_METAFILEPICT "Metafile"
STRING_CF_OEMTEXT "Текст в кодировке OEM"
STRING_CF_UNICODETEXT "Текст в кодировке Юникод"
STRING_CF_DIB "Аппаратно-независимый точечный рисунок (DIB)"
STRING_CF_LOCALE "Языковые данные"
STRING_CF_ENHMETAFILE "Расширенный метафайл"
STRING_CF_METAFILEPICT "Метафайл"
STRING_CF_PALETTE "Цветовая палитра"
STRING_CF_DIBV5 "DIB точечный рисунок (Версия 5)"
STRING_CF_SYLK "Symbolic Link Format"
STRING_CF_DIF "Data Interchange Format"
STRING_CF_HDROP "Drop Data"
STRING_CF_DIBV5 "Аппаратно-независимый точечный рисунок (DIB) (Версия 5)"
STRING_CF_SYLK "Формат символических ссылок"
STRING_CF_DIF "Формат обмена данными"
STRING_CF_HDROP "Очистить данные"
END
STRINGTABLE

View File

@@ -2,7 +2,7 @@
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Clipboard Viewer
* FILE: base/applications/clipbrd/scrollutils.c
* PURPOSE: Scrolling releated helper functions.
* PURPOSE: Scrolling related helper functions.
* PROGRAMMERS: Ricardo Hanke
*/

View File

@@ -2,7 +2,7 @@
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Clipboard Viewer
* FILE: base/applications/clipbrd/scrollutils.h
* PURPOSE: Scrolling releated helper functions.
* PURPOSE: Scrolling related helper functions.
* PROGRAMMERS: Ricardo Hanke
*/

View File

@@ -14,9 +14,21 @@ void ShowLastWin32Error(HWND hwndParent)
LPWSTR lpMsgBuf = NULL;
dwError = GetLastError();
if (dwError == ERROR_SUCCESS)
return;
if (!FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
dwError,
LANG_USER_DEFAULT,
(LPWSTR)&lpMsgBuf,
0, NULL))
{
return;
}
FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
NULL, dwError, 0, (LPWSTR)&lpMsgBuf, 0, NULL);
MessageBoxW(hwndParent, lpMsgBuf, NULL, MB_OK | MB_ICONERROR);
LocalFree(lpMsgBuf);
}

View File

@@ -3,6 +3,7 @@ add_subdirectory(comp)
add_subdirectory(cscript)
add_subdirectory(dbgprint)
add_subdirectory(doskey)
add_subdirectory(eventcreate)
add_subdirectory(find)
add_subdirectory(help)
add_subdirectory(hostname)

View File

@@ -1,5 +1,8 @@
include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils)
add_executable(clip clip.c clip.rc)
set_module_type(clip win32cui UNICODE)
add_importlibs(clip user32 msvcrt kernel32 advapi32)
target_link_libraries(clip conutils ${PSEH_LIB})
add_importlibs(clip advapi32 user32 msvcrt kernel32)
add_cd_file(TARGET clip DESTINATION reactos/system32 FOR all)

View File

@@ -12,31 +12,17 @@
#include <winbase.h>
#include <winuser.h>
#include <conutils.h>
#include "resource.h"
static void PrintError(void)
VOID PrintError(DWORD dwError)
{
DWORD dwError;
LPWSTR lpMsgBuf = NULL;
dwError = GetLastError();
if (dwError == NO_ERROR)
if (dwError == ERROR_SUCCESS)
return;
FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
NULL, dwError, 0, (LPWSTR)&lpMsgBuf, 0, NULL);
wprintf(L"%s", lpMsgBuf);
LocalFree(lpMsgBuf);
}
static void PrintResourceString(UINT uID)
{
WCHAR buff[500];
if (LoadStringW(GetModuleHandle(NULL), uID, buff, ARRAYSIZE(buff)))
{
wprintf(L"%s", buff);
}
ConMsgPuts(StdErr, FORMAT_MESSAGE_FROM_SYSTEM,
NULL, dwError, LANG_USER_DEFAULT);
}
static BOOL IsDataUnicode(HGLOBAL hGlobal)
@@ -61,28 +47,27 @@ int wmain(int argc, wchar_t** argv)
LPBYTE lpBuffer;
SIZE_T dwSize = 0;
/* Initialize the Console Standard Streams */
hInput = GetStdHandle(STD_INPUT_HANDLE);
ConInitStdStreams();
/* Check for usage */
if (argc > 1 && wcsncmp(argv[1], L"/?", 2) == 0)
{
PrintResourceString(IDS_HELP);
ConResPuts(StdOut, IDS_HELP);
return 0;
}
if (GetFileType(hInput) == FILE_TYPE_CHAR)
{
PrintResourceString(IDS_USAGE);
ConResPuts(StdOut, IDS_USAGE);
return 0;
}
/* Initialize a growable buffer for holding clipboard data */
hBuffer = GlobalAlloc(GMEM_MOVEABLE | GMEM_ZEROINIT, 4096);
if (!hBuffer)
{
PrintError();
return -1;
}
goto Failure;
/*
* Read data from the input stream by chunks of 4096 bytes
@@ -92,7 +77,7 @@ int wmain(int argc, wchar_t** argv)
{
lpBuffer = GlobalLock(hBuffer);
if (!lpBuffer)
goto cleanup;
goto Failure;
bStatus = ReadFile(hInput, lpBuffer + dwSize, 4096, &dwBytesRead, NULL);
dwSize += dwBytesRead;
@@ -100,11 +85,11 @@ int wmain(int argc, wchar_t** argv)
hTemp = GlobalReAlloc(hBuffer, GlobalSize(hBuffer) + 4096, GMEM_ZEROINIT);
if (!hTemp)
goto cleanup;
goto Failure;
hBuffer = hTemp;
}
while (dwBytesRead > 0 && bStatus);
while (bStatus && dwBytesRead > 0);
/*
* Resize the buffer to the total size of data read.
@@ -118,7 +103,7 @@ int wmain(int argc, wchar_t** argv)
/* Attempt to open the clipboard */
if (!OpenClipboard(NULL))
goto cleanup;
goto Failure;
/* Empty it, copy our data, then close it */
@@ -138,8 +123,8 @@ int wmain(int argc, wchar_t** argv)
CloseClipboard();
return 0;
cleanup:
GlobalFree(hBuffer);
PrintError();
Failure:
if (hBuffer) GlobalFree(hBuffer);
PrintError(GetLastError());
return -1;
}

View File

@@ -2,9 +2,11 @@
#include "resource.h"
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Clip Command"
#define REACTOS_STR_INTERNAL_NAME "clip"
#define REACTOS_STR_ORIGINAL_FILENAME "clip.exe"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Clip Command"
#define REACTOS_STR_INTERNAL_NAME "clip"
#define REACTOS_STR_ORIGINAL_FILENAME "clip.exe"
#include <reactos/version.rc>
/* UTF-8 */

View File

@@ -1,5 +1,8 @@
include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils)
add_executable(comp comp.c comp.rc)
set_module_type(comp win32cui UNICODE)
add_importlibs(comp user32 msvcrt kernel32)
target_link_libraries(comp conutils ${PSEH_LIB})
add_importlibs(comp msvcrt kernel32)
add_cd_file(TARGET comp DESTINATION reactos/system32 FOR all)

View File

@@ -1,273 +1,245 @@
/*
* ReactOS Win32 Applications
* Copyright (C) 2005 ReactOS Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* PROJECT: ReactOS Comp utility
* COPYRIGHT: See COPYING in the top level directory
* FILE: base/applications/cmdutils/comp/comp.c
* PURPOSE: Compares the contents of two files
* PROGRAMMERS: Ged Murphy (gedmurphy@gmail.com)
*/
#include <stdio.h>
#include <stdlib.h>
// #include <string.h>
// #include <wchar.h>
#include <assert.h>
#define WIN32_NO_STATUS
#include <windef.h>
#include <winbase.h>
#include <winuser.h>
#include "resource.h"
#define STRBUF 1024
VOID PrintResourceString(INT resID, ...)
{
WCHAR bufSrc[RC_STRING_MAX_SIZE];
WCHAR bufFormatted[RC_STRING_MAX_SIZE];
CHAR bufFormattedOem[RC_STRING_MAX_SIZE];
va_list args;
va_start(args, resID);
if (LoadStringW(GetModuleHandleW(NULL), resID, bufSrc, ARRAYSIZE(bufSrc)))
vswprintf(bufFormatted, bufSrc, args);
else
swprintf(bufFormatted, L"Resource loading error!");
CharToOemW(bufFormatted, bufFormattedOem);
fputs(bufFormattedOem, stdout);
va_end(args);
}
/* getline: read a line, return length */
INT GetBuff(PBYTE buff, FILE* in)
{
return fread(buff, sizeof(BYTE), STRBUF, in);
}
INT FileSize(FILE* fd)
{
INT result = -1;
if (fseek(fd, 0, SEEK_END) == 0 && (result = ftell(fd)) != -1)
{
/* Restoring file pointer */
rewind(fd);
}
return result;
}
/* Print program usage */
VOID Usage(VOID)
{
PrintResourceString(IDS_HELP);
}
int wmain (int argc, WCHAR* argv[])
{
INT i;
/* File pointers */
FILE *fp1 = NULL;
FILE *fp2 = NULL;
INT BufLen1, BufLen2;
PBYTE Buff1 = NULL;
PBYTE Buff2 = NULL;
WCHAR File1[_MAX_PATH + 1], // File paths
File2[_MAX_PATH + 1];
BOOL bAscii = FALSE, // /A switch
bLineNos = FALSE; // /L switch
UINT LineNumber;
UINT Offset;
INT FileSizeFile1;
INT FileSizeFile2;
INT NumberOfOptions = 0;
INT FilesOK = 1;
INT Status = EXIT_SUCCESS;
/* Parse command line for options */
for (i = 1; i < argc; i++)
{
if (argv[i][0] == L'/')
{
switch (argv[i][1])
{
case L'A':
bAscii = TRUE;
NumberOfOptions++;
break;
case L'L':
bLineNos = TRUE;
NumberOfOptions++;
break;
case L'?':
Usage();
return EXIT_SUCCESS;
default:
PrintResourceString(IDS_INVALIDSWITCH, argv[i][1]);
Usage();
return EXIT_FAILURE;
}
}
}
if (argc - NumberOfOptions == 3)
{
wcsncpy(File1, argv[1 + NumberOfOptions], _MAX_PATH);
wcsncpy(File2, argv[2 + NumberOfOptions], _MAX_PATH);
}
else
{
PrintResourceString(IDS_BADSYNTAX);
return EXIT_FAILURE;
}
Buff1 = (PBYTE)malloc(STRBUF);
if (Buff1 == NULL)
{
wprintf(L"Can't get free memory for Buff1\n");
Status = EXIT_FAILURE;
goto Cleanup;
}
Buff2 = (PBYTE)malloc(STRBUF);
if (Buff2 == NULL)
{
wprintf(L"Can't get free memory for Buff2\n");
Status = EXIT_FAILURE;
goto Cleanup;
}
if ((fp1 = _wfopen(File1, L"rb")) == NULL)
{
PrintResourceString(IDS_FILEERROR, File1);
Status = EXIT_FAILURE;
goto Cleanup;
}
if ((fp2 = _wfopen(File2, L"rb")) == NULL)
{
PrintResourceString(IDS_FILEERROR, File2);
Status = EXIT_FAILURE;
goto Cleanup;
}
PrintResourceString(IDS_COMPARING, File1, File2);
FileSizeFile1 = FileSize(fp1);
if (FileSizeFile1 == -1)
{
PrintResourceString(IDS_FILESIZEERROR, File1);
Status = EXIT_FAILURE;
goto Cleanup;
}
FileSizeFile2 = FileSize(fp2);
if (FileSizeFile2 == -1)
{
PrintResourceString(IDS_FILESIZEERROR, File2);
Status = EXIT_FAILURE;
goto Cleanup;
}
if (FileSizeFile1 != FileSizeFile2)
{
PrintResourceString(IDS_SIZEDIFFERS);
Status = EXIT_FAILURE;
goto Cleanup;
}
LineNumber = 1;
Offset = 0;
while (1)
{
BufLen1 = GetBuff(Buff1, fp1);
BufLen2 = GetBuff(Buff2, fp2);
if (ferror(fp1) || ferror(fp2))
{
PrintResourceString(IDS_READERROR);
Status = EXIT_FAILURE;
goto Cleanup;
}
if (!BufLen1 && !BufLen2)
break;
assert(BufLen1 == BufLen2);
for (i = 0; i < BufLen1; i++)
{
if (Buff1[i] != Buff2[i])
{
FilesOK = 0;
/* Reporting here a mismatch */
if (bLineNos)
{
PrintResourceString(IDS_MISMATCHLINE, LineNumber);
}
else
{
PrintResourceString(IDS_MISMATCHOFFSET, Offset);
}
if (bAscii)
{
PrintResourceString(IDS_ASCIIDIFF, 1, Buff1[i]);
PrintResourceString(IDS_ASCIIDIFF, 2, Buff2[i]);
}
else
{
PrintResourceString(IDS_HEXADECIMALDIFF, 1, Buff1[i]);
PrintResourceString(IDS_HEXADECIMALDIFF, 2, Buff2[i]);
}
}
Offset++;
if (Buff1[i] == '\n')
LineNumber++;
}
}
if (FilesOK)
PrintResourceString(IDS_MATCH);
Cleanup:
if (fp2)
fclose(fp2);
if (fp1)
fclose(fp1);
if (Buff2)
free(Buff2);
if (Buff1)
free(Buff1);
return Status;
}
/* EOF */
/*
* ReactOS Win32 Applications
* Copyright (C) 2005 ReactOS Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* PROJECT: ReactOS Comp utility
* COPYRIGHT: See COPYING in the top level directory
* FILE: base/applications/cmdutils/comp/comp.c
* PURPOSE: Compares the contents of two files
* PROGRAMMERS: Ged Murphy (gedmurphy@gmail.com)
*/
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#define WIN32_NO_STATUS
#include <windef.h>
#include <winbase.h>
#include <conutils.h>
#include "resource.h"
#define STRBUF 1024
/* getline: read a line, return length */
INT GetBuff(PBYTE buff, FILE* in)
{
return fread(buff, sizeof(BYTE), STRBUF, in);
}
INT FileSize(FILE* fd)
{
INT result = -1;
if (fseek(fd, 0, SEEK_END) == 0 && (result = ftell(fd)) != -1)
{
/* Restoring file pointer */
rewind(fd);
}
return result;
}
int wmain(int argc, WCHAR* argv[])
{
INT i;
/* File pointers */
FILE *fp1 = NULL;
FILE *fp2 = NULL;
INT BufLen1, BufLen2;
PBYTE Buff1 = NULL;
PBYTE Buff2 = NULL;
WCHAR File1[_MAX_PATH + 1], // File paths
File2[_MAX_PATH + 1];
BOOL bAscii = FALSE, // /A switch
bLineNos = FALSE; // /L switch
UINT LineNumber;
UINT Offset;
INT FileSizeFile1;
INT FileSizeFile2;
INT NumberOfOptions = 0;
INT FilesOK = 1;
INT Status = EXIT_SUCCESS;
/* Initialize the Console Standard Streams */
ConInitStdStreams();
/* Parse command line for options */
for (i = 1; i < argc; i++)
{
if (argv[i][0] == L'/')
{
switch (towlower(argv[i][1]))
{
case L'a':
bAscii = TRUE;
NumberOfOptions++;
break;
case L'l':
bLineNos = TRUE;
NumberOfOptions++;
break;
case L'?':
ConResPuts(StdOut, IDS_HELP);
return EXIT_SUCCESS;
default:
ConResPrintf(StdErr, IDS_INVALIDSWITCH, argv[i][1]);
ConResPuts(StdOut, IDS_HELP);
return EXIT_FAILURE;
}
}
}
if (argc - NumberOfOptions == 3)
{
wcsncpy(File1, argv[1 + NumberOfOptions], _MAX_PATH);
wcsncpy(File2, argv[2 + NumberOfOptions], _MAX_PATH);
}
else
{
ConResPuts(StdErr, IDS_BADSYNTAX);
return EXIT_FAILURE;
}
Buff1 = (PBYTE)malloc(STRBUF);
if (Buff1 == NULL)
{
ConPuts(StdErr, L"Can't get free memory for Buff1\n");
Status = EXIT_FAILURE;
goto Cleanup;
}
Buff2 = (PBYTE)malloc(STRBUF);
if (Buff2 == NULL)
{
ConPuts(StdErr, L"Can't get free memory for Buff2\n");
Status = EXIT_FAILURE;
goto Cleanup;
}
if ((fp1 = _wfopen(File1, L"rb")) == NULL)
{
ConResPrintf(StdErr, IDS_FILEERROR, File1);
Status = EXIT_FAILURE;
goto Cleanup;
}
if ((fp2 = _wfopen(File2, L"rb")) == NULL)
{
ConResPrintf(StdErr, IDS_FILEERROR, File2);
Status = EXIT_FAILURE;
goto Cleanup;
}
ConResPrintf(StdOut, IDS_COMPARING, File1, File2);
FileSizeFile1 = FileSize(fp1);
if (FileSizeFile1 == -1)
{
ConResPrintf(StdErr, IDS_FILESIZEERROR, File1);
Status = EXIT_FAILURE;
goto Cleanup;
}
FileSizeFile2 = FileSize(fp2);
if (FileSizeFile2 == -1)
{
ConResPrintf(StdErr, IDS_FILESIZEERROR, File2);
Status = EXIT_FAILURE;
goto Cleanup;
}
if (FileSizeFile1 != FileSizeFile2)
{
ConResPuts(StdOut, IDS_SIZEDIFFERS);
Status = EXIT_FAILURE;
goto Cleanup;
}
LineNumber = 1;
Offset = 0;
while (1)
{
BufLen1 = GetBuff(Buff1, fp1);
BufLen2 = GetBuff(Buff2, fp2);
if (ferror(fp1) || ferror(fp2))
{
ConResPuts(StdErr, IDS_READERROR);
Status = EXIT_FAILURE;
goto Cleanup;
}
if (!BufLen1 && !BufLen2)
break;
assert(BufLen1 == BufLen2);
for (i = 0; i < BufLen1; i++)
{
if (Buff1[i] != Buff2[i])
{
FilesOK = 0;
/* Reporting here a mismatch */
if (bLineNos)
ConResPrintf(StdOut, IDS_MISMATCHLINE, LineNumber);
else
ConResPrintf(StdOut, IDS_MISMATCHOFFSET, Offset);
if (bAscii)
{
ConResPrintf(StdOut, IDS_ASCIIDIFF, 1, Buff1[i]);
ConResPrintf(StdOut, IDS_ASCIIDIFF, 2, Buff2[i]);
}
else
{
ConResPrintf(StdOut, IDS_HEXADECIMALDIFF, 1, Buff1[i]);
ConResPrintf(StdOut, IDS_HEXADECIMALDIFF, 2, Buff2[i]);
}
}
Offset++;
if (Buff1[i] == '\n')
LineNumber++;
}
}
if (FilesOK)
ConResPuts(StdOut, IDS_MATCH);
Cleanup:
if (fp2)
fclose(fp2);
if (fp1)
fclose(fp1);
if (Buff2)
free(Buff2);
if (Buff1)
free(Buff1);
return Status;
}
/* EOF */

View File

@@ -1,4 +1,4 @@
/* Ștefan Fulea (stefan dot fulea at mail dot md) */
/* Translator: Ștefan Fulea (stefan dot fulea at mail dot md) */
LANGUAGE LANG_ROMANIAN, SUBLANG_DEFAULT
STRINGTABLE
@@ -11,9 +11,9 @@ COMP [/L] [/A] [data1] [data2]\n\n\
/L Afișează numărul liniei pentru diferențe.\n"
IDS_INVALIDSWITCH "Parametru nevalid - /%c\n"
IDS_BADSYNTAX "Sintaxă eronată\n"
IDS_FILEERROR "Nu se poate găsi/deschide fișierul: %s\n"
IDS_COMPARING "Se compară %s și %s...\n"
IDS_FILESIZEERROR "Nu se poate determina dimensiunea fișierului: %s\n"
IDS_FILEERROR "Nu poate fi găsit/deschis fișierul: %s\n"
IDS_COMPARING "%s este comparat cu %s...\n"
IDS_FILESIZEERROR "Eroare la determinarea dimensiunii fișierului: %s\n"
IDS_SIZEDIFFERS "Fișierele au dimensiuni diferite.\n"
IDS_READERROR "Eroare la citirea fișierelor.\n"
IDS_MISMATCHLINE "Diferență identificată la linia %d\n"

View File

@@ -1,7 +1,5 @@
#pragma once
#define RC_STRING_MAX_SIZE 4096
#define IDS_HELP 100
#define IDS_INVALIDSWITCH 101
#define IDS_BADSYNTAX 102

View File

@@ -0,0 +1,12 @@
include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils)
## The message string templates are in ANSI to reduce binary size
add_message_headers(ANSI evtmsgstr.mc)
add_executable(eventcreate eventcreate.c eventcreate.rc)
set_module_type(eventcreate win32cui UNICODE)
add_dependencies(eventcreate evtmsgstr)
target_link_libraries(eventcreate conutils ${PSEH_LIB})
add_importlibs(eventcreate advapi32 msvcrt kernel32)
add_cd_file(TARGET eventcreate DESTINATION reactos/system32 FOR all)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,32 @@
#include <windef.h>
#include "resource.h"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS EventCreate Command"
#define REACTOS_STR_INTERNAL_NAME "eventcreate"
#define REACTOS_STR_ORIGINAL_FILENAME "eventcreate.exe"
#include <reactos/version.rc>
/* Message Table resource for the message string templates */
#include <evtmsgstr.rc>
/* UTF-8 */
#pragma code_page(65001)
#ifdef LANGUAGE_EN_US
#include "lang/en-US.rc"
#endif
#ifdef LANGUAGE_FR_FR
#include "lang/fr-FR.rc"
#endif
#ifdef LANGUAGE_RO_RO
#include "lang/ro-RO.rc"
#endif
#ifdef LANGUAGE_RU_RU
#include "lang/ru-RU.rc"
#endif
#ifdef LANGUAGE_TR_TR
#include "lang/tr-TR.rc"
#endif

View File

@@ -0,0 +1,105 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS EventCreate Command
* FILE: base/applications/cmdutils/eventcreate/evtmsggen.c
* PURPOSE: Generator for the event message string templates file.
* Creates the message string file in the current directory.
* PROGRAMMER: Hermes Belusca-Maito
*
* You can compile this generator:
* with GCC : $ gcc -o evtmsggen.exe evtmsggen.c
* with MSVC: $ cl evtmsggen.c (or: $ cl /Fe"evtmsggen.exe" evtmsggen.c)
*/
#include <stdio.h>
/*
* Enable/disable this option to use "English" for the message table language.
* The default behaviour when the option is disabled selects "Neutral" language.
*/
// #define ENGLISH
/* The default End-Of-Line control for the message file */
#define EOL "\r\n"
static void usage(char* name)
{
fprintf(stdout, "Usage: %s ID_min ID_max outfile.mc\n", name);
}
int main(int argc, char* argv[])
{
FILE* outFile;
unsigned int id_min, id_max;
unsigned int i;
/* Validate the arguments */
if (argc != 4)
{
usage(argv[0]);
return -1;
}
id_min = (unsigned int)atoi(argv[1]);
id_max = (unsigned int)atoi(argv[2]);
if (id_min > id_max)
{
fprintf(stderr, "ERROR: Min ID %u cannot be strictly greater than Max ID %u !\n", id_min, id_max);
return -1;
}
/* Open the file */
outFile = fopen(argv[3], "wb");
if (!outFile)
{
fprintf(stderr, "ERROR: Could not create output file '%s'.\n", argv[3]);
return -1;
}
/* Generate the file */
/* Write the header */
fprintf(outFile,
";/*" EOL
"; * %s" EOL
"; * Contains event message string templates for the EventCreate Command." EOL
"; *" EOL
"; * This file is autogenerated, do not edit." EOL
"; * Generated with:" EOL
"; * %s %u %u %s" EOL
"; */" EOL
EOL
#ifdef ENGLISH
"LanguageNames=(English=0x409:MSG00409)" EOL
#else
"LanguageNames=(Neutral=0x0000:MSG00000)" EOL
#endif
"MessageIdTypedef=DWORD" EOL
EOL,
argv[3],
argv[0], id_min /* argv[1] */, id_max /* argv[2] */, argv[3]);
/* Write the message string templates */
for (i = id_min; i <= id_max; ++i)
{
fprintf(outFile,
"MessageId=0x%X" EOL
#ifdef ENGLISH
"Language=English" EOL
#else
"Language=Neutral" EOL
#endif
"%%1" EOL
"." EOL
EOL,
i);
}
/* Close the file */
fclose(outFile);
return 0;
}
/* EOF */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,69 @@
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
STRINGTABLE
BEGIN
IDS_USAGE "Type ""EVENTCREATE /?"" for usage information.\n"
IDS_HELP "\n\
EVENTCREATE [/S computer [/U [domain\\]user [/P password]]] /ID EventID\n\
{[/L logname] | [/SO source]} /T type /C category /D description\n\
\n\
Description:\n\
This tool enables an administrator to create a custom event in\n\
a specified event log.\n\
\n\
Parameters:\n\
/S computer Specifies the remote computer where to connect.\n\
\n\
/U [domain\\]user Specifies the user account under which the command\n\
should execute.\n\
\n\
/P [password] Specifies the password of the user account.\n\
Prompts for input if omitted.\n\
\n\
/L logname Specifies the name of the log where the event will be\n\
created. The valid names are:\n\
Application, System, Security\n\
(the latter is reserved only for the SYSTEM account).\n\
\n\
/SO source Specifies the source name to use for the event\n\
(if not specified, the default source name\n\
will be 'eventcreate').\n\
A valid source can be any string and should represent\n\
the application or the component that is generating\n\
the event.\n\
\n\
/T type Specifies the type of event to create.\n\
The valid types are: SUCCESS, ERROR, WARNING,\n\
INFORMATION.\n\
\n\
/C category Specifies the event category (integer) for the event.\n\
\n\
/ID EventID Specifies the event ID for the event. This must be\n\
an integer between 0 and 65535.\n\
\n\
/D description Specifies the description to use for the newly\n\
created event.\n\
\n\
/? Displays this help screen.\n\
"
IDS_INVALIDSWITCH "Invalid switch - '%s'.\n"
IDS_BADSYNTAX_0 "Bad command line syntax.\n"
IDS_BADSYNTAX_1 "Bad command line syntax. The option '%s' requires a value.\n"
IDS_BADSYNTAX_2 "Bad command line syntax. The value for the option '%s' cannot be empty.\n"
IDS_BADSYNTAX_3 "Bad command line syntax. The value '%s' is not allowed for the option '%s'.\n"
IDS_BADSYNTAX_4 "Bad command line syntax. The value cannot be specified for the option '%s'.\n"
IDS_BADSYNTAX_5 "Bad command line syntax. The option '%s' is not allowed more than %lu times.\n"
IDS_BADSYNTAX_6 "Bad command line syntax. The mandatory option '%s' is absent.\n"
// IDS_BADSYNTAX_7 "Bad command line syntax. The value for the option '%s' is outside the allowed range.\n"
IDS_BADSYNTAX_7 "Bad command line syntax. The value for the option '%s' must be between %d and %d.\n"
IDS_LOG_NOT_FOUND "The log '%s' does not exist. Cannot create the event.\n"
IDS_SOURCE_NOCREATE "The new source cannot be created because the log name is not specified.\nPlease use the /L switch to specify the log name.\n"
IDS_SOURCE_EXISTS "The source already exists in the log '%s' and cannot be duplicated.\n"
IDS_SOURCE_NOT_CUSTOM "The Source parameter is used to identify the custom scripts/applications\n(not the installed applications).\n"
IDS_SUCCESS_1 "Operation successful: an event of type '%s' has been created in the log '%s'.\n"
IDS_SUCCESS_2 "Operation successful: an event of type '%s' has been created with the source '%s'.\n"
IDS_SUCCESS_3 "Operation successful: an event of type '%s' has been created\nin the log '%s' with the source '%s'.\n"
IDS_SWITCH_UNIMPLEMENTED "The option '%s' is not currently supported, sorry for the inconvenience!\n"
END

View File

@@ -0,0 +1,70 @@
LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
IDS_USAGE "Entrez ""EVENTCREATE /?"" pour afficher la syntaxe.\n"
IDS_HELP "\n\
EVENTCREATE [/S système [/U utilisateur [/P mot_de_passe]]] /ID id_événement\n\
{[/L journal] | [/SO source]} /T type /C catégorie /D description\n\
\n\
Description :\n\
Cet outil permet à un administrateur de créer un événement ayant un\n\
message et un identificateur personnalisés dans un journal d'événements\n\
spécifié.\n\
\n\
Liste de paramètres :\n\
/S système Spécifie le système distant auquel se connecter.\n\
\n\
/U [domaine\\]utili. Spécifie le contexte de l'utilisateur\n\
sous lequel la commande doit s'exécuter.\n\
\n\
/P [mot_de_passe] Spécifie le mot de passe du contexte\n\
utilisateur donné. Il est demandé s'il est omis.\n\
\n\
/L journal Spécifie le journal d'événement dans lequel\n\
l'événementest créé. Les noms valides sont :\n\
Application, System, Security\n\
(le dernier est réservé seulement pour le compte\n\
SYSTEM).\n\
\n\
/SO source Spécifie la source devant être utilisée pour\n\
l'événement (s'il n'est pas spécifié, la valeur\n\
par défaut de la source sera 'eventcreate').\n\
Une source valide peut être une chaîne et doit\n\
représenter l'application ou le composant qui génère\n\
l'événement.\n\
\n\
/T type Spécifie le type d'événement à créer.\n\
Les types autorisés sont : SUCCESS, ERROR, WARNING,\n\
INFORMATION.\n\
\n\
/C catégorie Spécifie la catégorie de l'événement (nombre entier).\n\
\n\
/ID identificateur Spécifie l'ID de l'événement. Un identificateur\n\
peut être un nombre entier compris entre 0 et 65535.\n\
\n\
/D description Spécifie la description du nouvel événement.\n\
\n\
/? Affiche cet écran d'aide.\n\
"
IDS_INVALIDSWITCH "Option invalide - '%s'.\n"
IDS_BADSYNTAX_0 "Syntaxe incorrecte.\n"
IDS_BADSYNTAX_1 "Syntaxe incorrecte. L'option '%s' requiert une valeur.\n"
IDS_BADSYNTAX_2 "Syntaxe incorrecte. La valeur pour l'option '%s' ne peut pas être vide.\n"
IDS_BADSYNTAX_3 "Syntaxe incorrecte. La valeur '%s' n'est pas autorisée pour l'option '%s'.\n"
IDS_BADSYNTAX_4 "Syntaxe incorrecte. La valeur ne peut pas être spécifiée pour l'option '%s'.\n"
IDS_BADSYNTAX_5 "Syntaxe incorrecte. L'option '%s' n'est pas autorisée plus de %lu fois.\n"
IDS_BADSYNTAX_6 "Syntaxe incorrecte. L'option obligatoire '%s' est absente.\n"
// IDS_BADSYNTAX_7 "Syntaxe incorrecte. La valeur pour l'option '%s' est en dehors de la plage autorisée.\n"
IDS_BADSYNTAX_7 "Syntaxe incorrecte. La valeur pour l'option '%s' doit être comprise entre %d et %d.\n"
IDS_LOG_NOT_FOUND "Le journal '%s' n'existe pas. Impossible de créer l'événement.\n"
IDS_SOURCE_NOCREATE "La nouvelle source ne peut être créée car le nom du journal n'est pas spécifié.\nUtilisez le commutateur /L pour spécifier le nom du journal.\n"
IDS_SOURCE_EXISTS "La source existe déjà dans le journal '%s' et ne peut pas être dupliquée.\n"
IDS_SOURCE_NOT_CUSTOM "Le paramètre Source est utilisé pour identifier les scripts/applications\npersonnalisées (pas les applications installées).\n"
IDS_SUCCESS_1 "Opération réussie : un événement de type '%s' a été créé dans le journal '%s'.\n"
IDS_SUCCESS_2 "Opération réussie : un événement de type '%s' a été créé avec la source '%s'.\n"
IDS_SUCCESS_3 "Opération réussie : un événement de type '%s' a été créé\ndans le journal '%s' avec la source '%s'.\n"
IDS_SWITCH_UNIMPLEMENTED "L'option '%s' n'est pas supporté pour le moment, désolé pour le désagrément!\n"
END

View File

@@ -0,0 +1,71 @@
/* Translator: Ștefan Fulea (stefan dot fulea at mail dot md) */
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
IDS_USAGE "Tastați «EVENTCREATE /?» pentru informații de utilizare.\n"
IDS_HELP "\n\
EVENTCREATE [/S calculator [/U [domeniu\\]nume [/P parolă]]]\n\
/ID id_eveniment {[/L nume_jurnal] | [/SO sursă]}\n\
/T tip /C categorie /D descriere\n\
\n\
Descriere:\n\
Acest instrument oferă unui administrator crearea unui eveniment\n\
particular într-un jurnal de evenimente specificat.\n\
\n\
Parametri:\n\
/S calculator Specifică sistemul la care se face conectarea.\n\
\n\
/U [domeniu\\]nume Numele contului de utilizator sub care va fi\n\
executată comanda.\n\
\n\
/P [parolă] Specifică parola contului de utilizator.\n\
Va fi cerută la prompt în cazul omiterii.\n\
\n\
/L nume_jurnal Specifică numele jurnalului în care evenimentul va fi\n\
creat. Numele valide sunt:\n\
Application, System, Security\n\
(ultimul este rezervat doar pentru contul SYSTEM).\n\
\n\
/SO sursă Specifică numele sursei utilizate pentru eveniment.\n\
(Dacă nu e specificat, numele implicit al sursei va\n\
fi «eventcreate».)\n\
O sursă validă poate fi orice șir de caractere și ar\n\
trebui să reprezinte aplicația sau evenimentul care\n\
generează evenimentul.\n\
\n\
/T tip Specifică tipul de eveniment creat.\n\
Tipurile valide sunt: SUCCESS, ERROR, WARNING,\n\
INFORMATION.\n\
\n\
/C categorie Specifică categoria de eveniment (ca număr întreg).\n\
\n\
/ID id_eveniment Specifică numărul de identificare pentru eveniment.\n\
Acesta trebuie să fie un număr între 0 și 65535.\n\
\n\
/D descriere Specifică o descriere pentru evenimentul nou creat.\n\
\n\
/? Afișează acest manual de utilizare.\n\
"
IDS_INVALIDSWITCH "Parametru eronat - «%s».\n"
IDS_BADSYNTAX_0 "Comandă cu sintaxă eronată.\n"
IDS_BADSYNTAX_1 "Comandă cu sintaxă eronată. Opțiunea «%s» necesită o valoare.\n"
IDS_BADSYNTAX_2 "Comandă cu sintaxă eronată. Valoarea pentru opțiunea «%s» nu poate fi omisă.\n"
IDS_BADSYNTAX_3 "Comandă cu sintaxă eronată. Valoarea «%s» nu este permisă pentru opțiunea «%s».\n"
IDS_BADSYNTAX_4 "Comandă cu sintaxă eronată. Valoarea dată nu poate fi specificată pentru opțiunea «%s».\n"
IDS_BADSYNTAX_5 "Comandă cu sintaxă eronată. Opțiunea «%s» nu este permisă mai mult de %lu ori.\n"
IDS_BADSYNTAX_6 "Comandă cu sintaxă eronată. Opțiunea obligatorie «%s» a fost omisă.\n"
// IDS_BADSYNTAX_7 "Comandă cu sintaxă eronată. Valoarea pentru opțiunea «%s» este în afara domeniului permis.\n"
IDS_BADSYNTAX_7 "Comandă cu sintaxă eronată. Valoarea pentru opțiunea «%s» trebuie să fie între %d și %d.\n"
IDS_LOG_NOT_FOUND "Jurnalul «%s» nu există. Evenimentul nu poate fi creat.\n"
IDS_SOURCE_NOCREATE "Sursa nu poate fi creată deoarece numele de jurnal nu este specificat.\nUtilizați parametrul /L pentru a specifica un nume de jurnal.\n"
IDS_SOURCE_EXISTS "Sursa deja există în jurnalul «%s» și nu poate fi duplicată.\n"
IDS_SOURCE_NOT_CUSTOM "Parametrul de sursă este utilizat pentru a identifica scripturi/aplicații particularizate (nicidecum aplicații instalate).\n"
IDS_SUCCESS_1 "Operație realizată: un eveniment de tip «%s» a fost creat în jurnalul «%s».\n"
IDS_SUCCESS_2 "Operație realizată: un eveniment de tip «%s» a fost creat cu sursa «%s».\n"
IDS_SUCCESS_3 "Operație realizată: un eveniment de tip «%s» a fost creat în jurnalul «%s» cu sursa «%s».\n"
IDS_SWITCH_UNIMPLEMENTED "Opțiunea «%s» nu este acceptată deocamdată!\n"
END

View File

@@ -0,0 +1,68 @@
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_USAGE "Введите ""EVENTCREATE /?"" для получения справки по использованию.\n"
IDS_HELP "\n\
EVENTCREATE [/S система [/U [домен\\]пользователь [/P пароль]]] /ID код_события\n\
{[/L имя_журнала] | [/SO источник]} /T тип /C категория /D описание\n\
\n\
Описание:\n\
Эта команда позволяет администратору создать запись об особом событии \n\
в указанном журнале событий.\n\
\n\
Список параметров:\n\
/S система Определяет удаленную систему для подключения.\n\
\n\
/U [домен\\]польз. Определяет контекст пользователя, под которым\n\
выполняется данная команда.\n\
\n\
/P [пароль] Задает пароль для данного контекста пользователя.\n\
Запрашивает ввод пароля, если он не был задан.\n\
\n\
/L журнал Журнал в котором будет создано событие.\n\
Доступными именами являются:\n\
Application, System, Security\n\
(последний зарезервирован только для учетной записи SYSTEM).\n\
\n\
/SO источник Задает имя источника, используемого для события\n\
(если не указано, то по умолчанию имя источника\n\
будет 'eventcreate').\n\
Допустимым источником является любая строка, представляющая\n\
приложение или компонент, который генерирует\n\
событие.\n\
\n\
/T тип Тип создаваемого события.\n\
Допустимыми типами являются: SUCCESS, ERROR, WARNING,\n\
INFORMATION.\n\
\n\
/C категория Определяет категорию события (число) для события.\n\
\n\
/ID код_события Код события для этого события. Допустимым кодом\n\
является число в диапазоне от 0 до 65535.\n\
\n\
/D описание Описание для создаваемого события.\n\
\n\
/? Показать эту справку.\n\
"
IDS_INVALIDSWITCH "Неправильный параметр или аргумент - '%s'.\n"
IDS_BADSYNTAX_0 "Синтаксическая ошибка.\n"
IDS_BADSYNTAX_1 "Синтаксическая ошибка. Для параметра '%s' должно быть указано значение.\n"
IDS_BADSYNTAX_2 "Синтаксическая ошибка. Значение опции '%s' не может быть пустым.\n"
IDS_BADSYNTAX_3 "Синтаксическая ошибка. Значение '%s' является недопустимым для опции '%s'.\n"
IDS_BADSYNTAX_4 "Синтаксическая ошибка. Для опции '%s' не может быть указано значение.\n"
IDS_BADSYNTAX_5 "Синтаксическая ошибка. Опция '%s' не допускается более чем %lu раз.\n"
IDS_BADSYNTAX_6 "Синтаксическая ошибка. Отсутствует обязательный параметр '%s'.\n"
// IDS_BADSYNTAX_7 "Синтаксическая ошибка. Значение для опции '%s' за пределами разрешенного диапазона.\n"
IDS_BADSYNTAX_7 "Синтаксическая ошибка. Значение для опции '%s' должно быть в диапазоне от %d до %d.\n"
IDS_LOG_NOT_FOUND "Журнал '%s' не существует. Не удалось создать событие.\n"
IDS_SOURCE_NOCREATE "Новый источник не может быть создан, поскольку имя журнала не указано.\nИспользуйте параметр /L чтобы указать имя журнала.\n"
IDS_SOURCE_EXISTS "Источник уже существует в журнале '%s' и не может быть продублирован.\n"
IDS_SOURCE_NOT_CUSTOM "Параметр Источник используется для идентификации сценариев/программ\nпользовательских приложений (не установленных приложений).\n"
IDS_SUCCESS_1 "Операция выполнена успешно: событие с типом '%s' было успешно создано в журнале '%s'.\n"
IDS_SUCCESS_2 "Операция выполнена успешно: событие с типом '%s' было успешно создано с источником '%s'.\n"
IDS_SUCCESS_3 "Операция выполнена успешно: событие с типом '%s' было успешно создано\nв журнале '%s' с источником '%s'.\n"
IDS_SWITCH_UNIMPLEMENTED "Опция '%s' не поддерживается, приносим извинения за возможное неудобство!\n"
END

View File

@@ -0,0 +1,72 @@
/* TRANSLATOR: 2016 Erdem Ersoy (eersoy93) (erdemersoy@live.com) */
LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_USAGE "Kullanım bilgisi için ""EVENTCREATE /?"" yazınız.\n"
IDS_HELP "\n\
EVENTCREATE [/S bilgisayar [/U [etki alanı\\]kullanıcı [/P şifre]]] \n\
/ID olay kimliği {[/L kayıt adı] | [/SO kaynak]} /T tür /C ulam\n\
/D tanım\n\
\n\
Tanım:\n\
Bu araç, bir yöneticiye belirli bir olay kaydı içinde husûsî bir olay\n\
oluşturmayı sağlar.\n\
\n\
Değişkenler:\n\
/S bilgisayar Bağlanacak uzak bilgisayarı belirtir.\n\
\n\
/U [etki alanı\\]kullanıcı Altında komutun çalışacağı kullanıcı hesâbını\n\
belirtir.\n\
\n\
/P [şifre] Kullanıcı hesâbının şifresini belirtir.\n\
Kullanılmazsa girdi için sorar.\n\
\n\
/L kayıt adı Oluşturulacak olayın kayıt adını belirtir.\n\
Geçerli adlar şunlardır:\n\
Application, System, Security\n\
(İkincisi yalnızca DİZGE hesâbına ayrılmıştır.)\n\
\n\
/SO kaynak Olay için kullanılacak kaynak adını belirtir.\n\
(Belirtilmezse ön tanımlı kaynak adı\n\
'eventcreate' olacaktır.)\n\
Geçerli bir kaynak, rastgele bir dizgi olabilir ve olayı\n\
oluşturan uygulamayı veyâ bileşeni belirtmelidir.\n\
\n\
/T tür Oluşturulacak olayın türünü belirtir.\n\
Geçerli türler: SUCCESS, ERROR, WARNING,\n\
INFORMATION.\n\
\n\
/C ulam Olaya göre olay ulamını (tamsayı) belirtir.\n\
\n\
/ID olay kimliği Olaya göre olay kimliğini belirtir. Bu\n\
0 ile 65535 arasında bir tamsayı olmalıdır.\n\
\n\
/D tanım Yeni oluşturulan olay için kullanılacak\n\
tanımı belirtir.\n\
\n\
/? Bu yardım görüntülüğünü görüntüler.\n\
"
IDS_INVALIDSWITCH "Geçersiz değişken - ""%s"".\n"
IDS_BADSYNTAX_0 "Geçersiz komut yatacı yazımı.\n"
IDS_BADSYNTAX_1 "Geçersiz komut yatacı yazımı. ""%s"" seçeneği bir değer gerektirir.\n"
IDS_BADSYNTAX_2 "Geçersiz komut yatacı yazımı. ""%s"" seçeneği için değer boş olamaz.\n"
IDS_BADSYNTAX_3 "Geçersiz komut yatacı yazımı. Değer ""%s"", ""%s"" seçeneği için izin verilmedi.\n"
IDS_BADSYNTAX_4 "Geçersiz komut yatacı yazımı. ""%s"" seçeneği için değer belirtilemiyor.\n"
IDS_BADSYNTAX_5 "Geçersiz komut yatacı yazımı. ""%s"" seçeneğine %lu kezden çok izin verilmiyor.\n"
IDS_BADSYNTAX_6 "Geçersiz komut yatacı yazımı. Zorunlu ""%s"" seçeneği yok.\n"
// IDS_BADSYNTAX_7 "Geçersiz komut yatacı yazımı. ""%s"" seçeneği için değer izin verilen aralığın dışında.\n"
IDS_BADSYNTAX_7 "Geçersiz komut yatacı yazımı. ""%s"" seçeneği için değer %d ile %d arasında olmalı.\n"
IDS_LOG_NOT_FOUND """%s"" kaydı yok. Olay oluşturulamıyor.\n"
IDS_SOURCE_NOCREATE "Kayıt adı belirtilmediğinden yeni kaynak oluşturulamıyor.\nKayıt adını belirtmek için lütfen /L seçeneğini kullanınız.\n"
IDS_SOURCE_EXISTS "Kaynak ""%s"" kaydında önceden var ve çoğaltılamaz.\n"
IDS_SOURCE_NOT_CUSTOM "Kaynak değişkeni, husûsî betikleri veyâ husûsî uygulamaları\n(kurulu uygulamaları değil) belirlemek için kullanılıyor.\n"
IDS_SUCCESS_1 "İşlem başarılı: ""%s"" türünde bir olay ""%s"" kaydında oluşturuldu.\n"
IDS_SUCCESS_2 "İşlem başarılı: ""%s"" türünde bir olay ""%s"" kaynağıyla oluşturuldu.\n"
IDS_SUCCESS_3 "İşlem başarılı: ""%s"" türünde bir olay ""%s"" kaydında ""%s"" kaynağıyla oluşturuldu.\n"
IDS_SWITCH_UNIMPLEMENTED """%s"" seçeneği şimdilik desteklenmiyor, sıkıntı için üzgünüm!\n"
END

View File

@@ -0,0 +1,24 @@
#pragma once
#define IDS_USAGE 100
#define IDS_HELP 101
#define IDS_INVALIDSWITCH 102
#define IDS_BADSYNTAX_0 103
#define IDS_BADSYNTAX_1 104
#define IDS_BADSYNTAX_2 105
#define IDS_BADSYNTAX_3 106
#define IDS_BADSYNTAX_4 107
#define IDS_BADSYNTAX_5 108
#define IDS_BADSYNTAX_6 109
#define IDS_BADSYNTAX_7 110
#define IDS_LOG_NOT_FOUND 120
#define IDS_SOURCE_NOCREATE 121
#define IDS_SOURCE_EXISTS 122
#define IDS_SOURCE_NOT_CUSTOM 123
#define IDS_SUCCESS_1 130
#define IDS_SUCCESS_2 131
#define IDS_SUCCESS_3 132
#define IDS_SWITCH_UNIMPLEMENTED 135

View File

@@ -1,6 +1,9 @@
include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils)
add_executable(cmd_help help.c help.rc)
set_module_type(cmd_help win32cui UNICODE)
add_importlibs(cmd_help user32 msvcrt kernel32)
target_link_libraries(cmd_help conutils ${PSEH_LIB})
add_importlibs(cmd_help msvcrt kernel32)
set_target_properties(cmd_help PROPERTIES OUTPUT_NAME "help")
add_cd_file(TARGET cmd_help DESTINATION reactos/system32 FOR all)

View File

@@ -7,38 +7,21 @@
* Hermes Belusca-Maito (hermes.belusca@sfr.fr)
*/
#include <stdio.h>
#include <stdlib.h>
#include <wchar.h>
#define WIN32_NO_STATUS
#include <windef.h>
#include <winbase.h>
#include <winuser.h>
#include <wincon.h>
#include <strsafe.h>
#include <conutils.h>
#include "help.h"
#include "resource.h"
VOID PrintResourceString(INT resID, ...)
{
WCHAR bufSrc[RC_STRING_MAX_SIZE];
WCHAR bufFormatted[RC_STRING_MAX_SIZE];
CHAR bufFormattedOem[RC_STRING_MAX_SIZE];
va_list args;
va_start(args, resID);
LoadStringW(GetModuleHandleW(NULL), resID, bufSrc, ARRAYSIZE(bufSrc));
vswprintf(bufFormatted, bufSrc, args);
CharToOemW(bufFormatted, bufFormattedOem);
fputs(bufFormattedOem, stdout);
va_end(args);
}
BOOL IsInternalCommand(LPCWSTR Cmd)
static BOOL
IsInternalCommand(PCWSTR Cmd)
{
size_t i;
int res;
@@ -73,24 +56,27 @@ int wmain(int argc, WCHAR* argv[])
{
WCHAR CmdLine[CMDLINE_LENGTH];
/* Initialize the Console Standard Streams */
ConInitStdStreams();
/*
* If the user hasn't asked for specific help,
* then print out the list of available commands.
*/
if (argc <= 1)
{
PrintResourceString(IDS_HELP1);
PrintResourceString(IDS_HELP2);
ConResPuts(StdOut, IDS_HELP1);
ConResPuts(StdOut, IDS_HELP2);
return 0;
}
/*
* Bad usage (too much options) or we use the /? switch.
* Display help for the help command.
* Display help for the HELP command.
*/
if ((argc > 2) || (wcscmp(argv[1], L"/?") == 0))
{
PrintResourceString(IDS_USAGE);
ConResPuts(StdOut, IDS_USAGE);
return 0;
}
@@ -100,7 +86,7 @@ int wmain(int argc, WCHAR* argv[])
*/
if (!IsInternalCommand(argv[1]))
{
PrintResourceString(IDS_NO_ENTRY, argv[1]);
ConResPrintf(StdOut, IDS_NO_ENTRY, argv[1]);
return 0;
}
@@ -108,7 +94,7 @@ int wmain(int argc, WCHAR* argv[])
* Run "<command> /?" in the current command processor.
*/
StringCbPrintfW(CmdLine, sizeof(CmdLine), L"%ls /?", argv[1]);
_flushall();
return _wsystem(CmdLine);
}

View File

@@ -5,9 +5,9 @@
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Command Line Help Utility"
#define REACTOS_STR_INTERNAL_NAME "help"
#define REACTOS_STR_ORIGINAL_FILENAME "help.exe"
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Command Line Help Utility"
#define REACTOS_STR_INTERNAL_NAME "help"
#define REACTOS_STR_ORIGINAL_FILENAME "help.exe"
#include <reactos/version.rc>
/* UTF-8 */

View File

@@ -0,0 +1,73 @@
LANGUAGE LANG_CZECH, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_NO_ENTRY "This command is not supported by the help utility.\nTry ""%s /?""\n."
END
STRINGTABLE
BEGIN
IDS_USAGE "Provides Help information for ReactOS commands.\n\n\
HELP [command]\n\n\
command - Display help information for this command.\n"
IDS_HELP1 "List of all available commands (+ description)\n\n\
help command\n\
command /? For more information on a specific command\n\n\
? List all available commands (without description).\n\
ALIAS Sets, removes or shows aliases.\n\
ATTRIB Displays or changes file attributes.\n\
BEEP Beep the speaker.\n\
CALL Calls one batch program from another.\n\
CD Displays the name of or changes the current directory.\n\
CHCP Displays or sets the active code page number.\n\
CHOICE Waits for the user to choose one of a set of choices.\n\
CLS Clears the screen.\n\
CMD Starts a new instance of the ReactOS command interpreter.\n\
COLOR Sets the default console foreground and background colors.\n\
COPY Copies one or more files to another location.\n\
DATE Displays or sets the date.\n\
DELETE Deletes one or more files.\n\
DIR Displays a list of files and subdirectories in a directory.\n\
ECHO Displays messages, or turns command echoing on or off.\n\
ERASE Deletes one or more files.\n\
EXIT Quits the CMD.EXE program (command interpreter).\n\
FOR Runs a specified command for each file in a set of files.\n\
FREE (free) disc space.\n\
GOTO Directs the ReactOS command interpreter to a labeled line in\n\
a batch program.\n\
HELP Provides Help information for ReactOS commands.\n\
HISTORY List all commands which has been used\n\
IF Performs conditional processing in batch programs.\n\
LABEL Creates, changes, or deletes the volume label of a disk.\n\
MD Creates a directory.\n\
MKDIR Creates a directory.\n\
MKLINK Creates a filesystem link object.\n\
MOVE Moves one or more files from one directory to another\n\
directory.\n\
PATH Displays or sets a search path for executable files.\n\
PAUSE Suspends processing of a batch file and displays a message.\n\
POPD Restores the previous value of the current directory saved by\n\
PUSHD.\n\
PROMPT Changes the command prompt.\n\
PUSHD Saves the current directory then changes it.\n\
RD Removes a directory.\n\
REM Records comments (remarks) in batch files.\n\
REN Renames a file or files.\n\
RENAME Renames a file or files.\n\
REPLACE Replaces files.\n\
RMDIR Removes a directory.\n\
SCREEN Move cursor and optionally print text.\n\
SET Displays, sets, or removes ReactOS environment variables.\n\
SHIFT Shifts the position of replaceable parameters in batch files.\n"
IDS_HELP2 "START Starts a separate window to run a specified program or command.\n\
Executes command.\n\
TIME Displays or sets the system time.\n\
TIMER Allow the use of ten stopwatches.\n\
TITLE Sets the window title for a CMD.EXE session.\n\
TYPE Displays the contents of a text file.\n\
VER Displays the ReactOS version.\n\
VERIFY Tells ReactOS whether to verify that your files are written\n\
correctly to a disk.\n\
VOL Displays a disk volume label and serial number.\n"
END

View File

@@ -38,7 +38,7 @@ FREE (free) disc space.\n\
GOTO Directs the ReactOS command interpreter to a labeled line in\n\
a batch program.\n\
HELP Provides Help information for ReactOS commands.\n\
HISTORY List all commands which has been used\n\
HISTORY Lists all commands which have been used.\n\
IF Performs conditional processing in batch programs.\n\
LABEL Creates, changes, or deletes the volume label of a disk.\n\
MD Creates a directory.\n\

View File

@@ -18,7 +18,7 @@ HELP [komut]\n\n\
? Tüm kullanılabilir komutları dizelgele (tanımlar olmadan).\n\
ALIAS Başka adları ayarlar, siler ya da gösterir.\n\
ATTRIB Kütük öz niteliklerini görüntüler ya da değiştirir.\n\
BEEP Hoparlörden ""biip"" sesi çıkart.\n\
BEEP Hoparlörden ""bip"" sesi çıkart.\n\
CALL Bir toplu iş izlencesini bir başkasından çağırır.\n\
CD Şimdiki dizinin adını görüntüler ya da şimdiki dizini değiştirir.\n\
CHCP Etkin kod sayfası numarasını görüntüler ya da ayarlar.\n\

View File

@@ -1,7 +1,5 @@
#pragma once
#define RC_STRING_MAX_SIZE 4096
#define IDS_USAGE 100
#define IDS_HELP1 101
#define IDS_HELP2 102

View File

@@ -1,6 +1,9 @@
include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils)
add_executable(mode mode.c mode.rc)
set_module_type(mode win32cui UNICODE)
set_target_properties(mode PROPERTIES SUFFIX ".com")
target_link_libraries(mode conutils ${PSEH_LIB})
add_importlibs(mode user32 msvcrt kernel32)
set_target_properties(mode PROPERTIES SUFFIX ".com")
add_cd_file(TARGET mode DESTINATION reactos/system32 FOR all)

View File

@@ -0,0 +1,68 @@
LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
IDS_USAGE "Konfiguriert Geräte im System.\n\n\
Gerätestatus: MODE [Gerät] [/STATUS]\n\
Serieller Anschluss: MODE COMm[:] [BAUD=b] [PARITY=p] [DATA=d] [STOP=s]\n\
[to=on|off] [xon=on|off] [odsr=on|off]\n\
[octs=on|off] [dtr=on|off|hs]\n\
[rts=on|off|hs|tg] [idsr=on|off]\n\
Druckausgabe umleiten: MODE LPTn[:]=COMm[:]\n\
Codepage auswählen: MODE CON[:] CP SELECT=yyy\n\
Codepagestatus: MODE CON[:] CP [/STATUS]\n\
Anzeigemodus: MODE CON[:] [COLS=c] [LINES=n]\n\
Tastaturwiederholrate: MODE CON[:] [RATE=r DELAY=d]\n"
IDS_QUERY_SERIAL_FOUND " Serieller Anschluss gefunden - %s\n"
IDS_QUERY_PRINTER_FOUND " Drucker gefunden - %s\n"
IDS_QUERY_PARALLEL_FOUND " Paralleler Anschluss gefunden - %s\n"
IDS_QUERY_DOSDEV_FOUND " Found DOS device - %s\n"
// IDS_QUERY_MISC_FOUND " Found other device - %s\n"
// IDS_QUERY_DEVICE_FOUND " Found %s device - %s\n"
// IDS_SERIAL "serial"
// IDS_PRINTER "parallel"
// IDS_OTHER "other"
END
STRINGTABLE
BEGIN
IDS_DEVICE_STATUS_HEADER "Status von Gerät %s:"
IDS_COM_STATUS_BAUD " Baud: %ld\n"
IDS_COM_STATUS_PARITY " Parität: %s\n"
IDS_COM_STATUS_DATA_BITS " Datenbits: %d\n"
IDS_COM_STATUS_STOP_BITS " Stopbits: %s\n"
IDS_COM_STATUS_TIMEOUT " Timeout: %s\n"
IDS_COM_STATUS_XON_XOFF " XON/XOFF: %s\n"
IDS_COM_STATUS_CTS_HANDSHAKING " CTS handshaking: %s\n"
IDS_COM_STATUS_DSR_HANDSHAKING " DSR handshaking: %s\n"
IDS_COM_STATUS_DSR_SENSITIVITY " DSR sensitivity: %s\n"
IDS_COM_STATUS_DTR_CIRCUIT " DTR circuit: %s\n"
IDS_COM_STATUS_RTS_CIRCUIT " RTS circuit: %s\n"
IDS_CONSOLE_STATUS_LINES " Zeilen: %d\n"
IDS_CONSOLE_STATUS_COLS " Spalten: %d\n"
IDS_CONSOLE_KBD_RATE " Wiederholrate: %ld\n"
IDS_CONSOLE_KBD_DELAY " Verzögerungszeit: %ld\n"
IDS_CONSOLE_CODEPAGE " Codepage: %d\n"
IDS_PRINTER_OUTPUT_NOT_REROUTED " Druckausgabe wird nicht umgeleitet.\n"
IDS_PRINTER_OUTPUT_REROUTED_SERIAL " Druckausgabe wird an seriellen Anschluss %s umgeleitet.\n"
END
STRINGTABLE
BEGIN
IDS_ERROR_QUERY_DEVICES "ERROR: Unable to query DOS devices (0x%lx).\n"
IDS_ERROR_QUERY_DEVICES_FORM " QueryDosDeviceW(%s) returned unrecognised form %s.\n"
IDS_ERROR_SET_PARALLEL_STATE "SetParallelState(%d) - DefineDosDevice(%s) (0x%lx)\n"
IDS_ERROR_INVALID_PARAMETER "ERROR: Unzulässiger Parameter - %s\n"
IDS_ERROR_ILLEGAL_DEVICE_NAME "ERROR: Unzulässiger Gerätename - %s (0x%lx)\n"
IDS_ERROR_STATUS_GET_DEVICE "ERROR: Failed to get the status for device COM%d:\n"
IDS_ERROR_STATUS_SET_DEVICE "ERROR: Failed to set the status for device COM%d:\n"
IDS_ERROR_INVALID_PARITY_BITS "ERROR: Invalid value for Parity Bits %d:\n"
IDS_ERROR_INVALID_STOP_BITS "ERROR: Invalid value for Stop Bits %d:\n"
IDS_ERROR_NO_MEMORY "ERROR: Not enough memory.\n"
IDS_ERROR_SCREEN_LINES_COL "ERROR: The screen cannot be set to the number of lines and columns specified.\n"
END

View File

@@ -0,0 +1,68 @@
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_USAGE "Configure System Devices.\n\n\
Device Status: MODE [device] [/STATUS]\n\
Serial port: MODE COMm[:] [BAUD=b] [PARITY=p] [DATA=d] [STOP=s]\n\
[to=on|off] [xon=on|off] [odsr=on|off]\n\
[octs=on|off] [dtr=on|off|hs]\n\
[rts=on|off|hs|tg] [idsr=on|off]\n\
Redirect printing: MODE LPTn[:]=COMm[:]\n\
Select code page: MODE CON[:] CP SELECT=yyy\n\
Code page status: MODE CON[:] CP [/STATUS]\n\
Display mode: MODE CON[:] [COLS=c] [LINES=n]\n\
Typematic rate: MODE CON[:] [RATE=r DELAY=d]\n"
IDS_QUERY_SERIAL_FOUND " Found serial device - %s\n"
IDS_QUERY_PRINTER_FOUND " Found printer device - %s\n"
IDS_QUERY_PARALLEL_FOUND " Found parallel device - %s\n"
IDS_QUERY_DOSDEV_FOUND " Found DOS device - %s\n"
// IDS_QUERY_MISC_FOUND " Found other device - %s\n"
// IDS_QUERY_DEVICE_FOUND " Found %s device - %s\n"
// IDS_SERIAL "serial"
// IDS_PRINTER "parallel"
// IDS_OTHER "other"
END
STRINGTABLE
BEGIN
IDS_DEVICE_STATUS_HEADER "Status for device %s:"
IDS_COM_STATUS_BAUD " Baud: %ld\n"
IDS_COM_STATUS_PARITY " Parity: %s\n"
IDS_COM_STATUS_DATA_BITS " Data Bits: %d\n"
IDS_COM_STATUS_STOP_BITS " Stop Bits: %s\n"
IDS_COM_STATUS_TIMEOUT " Timeout: %s\n"
IDS_COM_STATUS_XON_XOFF " XON/XOFF: %s\n"
IDS_COM_STATUS_CTS_HANDSHAKING " CTS handshaking: %s\n"
IDS_COM_STATUS_DSR_HANDSHAKING " DSR handshaking: %s\n"
IDS_COM_STATUS_DSR_SENSITIVITY " DSR sensitivity: %s\n"
IDS_COM_STATUS_DTR_CIRCUIT " DTR circuit: %s\n"
IDS_COM_STATUS_RTS_CIRCUIT " RTS circuit: %s\n"
IDS_CONSOLE_STATUS_LINES " Lines: %d\n"
IDS_CONSOLE_STATUS_COLS " Columns: %d\n"
IDS_CONSOLE_KBD_RATE " Keyboard rate: %ld\n"
IDS_CONSOLE_KBD_DELAY " Keyboard delay: %ld\n"
IDS_CONSOLE_CODEPAGE " Code page: %d\n"
IDS_PRINTER_OUTPUT_NOT_REROUTED " Printer output is not being rerouted.\n"
IDS_PRINTER_OUTPUT_REROUTED_SERIAL " Printer output is being rerouted to serial port %s.\n"
END
STRINGTABLE
BEGIN
IDS_ERROR_QUERY_DEVICES "ERROR: Unable to query DOS devices (0x%lx).\n"
IDS_ERROR_QUERY_DEVICES_FORM " QueryDosDeviceW(%s) returned unrecognised form %s.\n"
IDS_ERROR_SET_PARALLEL_STATE "SetParallelState(%d) - DefineDosDevice(%s) (0x%lx)\n"
IDS_ERROR_INVALID_PARAMETER "ERROR: Invalid parameter - %s\n"
IDS_ERROR_ILLEGAL_DEVICE_NAME "ERROR: Illegal device name - %s (0x%lx)\n"
IDS_ERROR_STATUS_GET_DEVICE "ERROR: Failed to get the status for device COM%d:\n"
IDS_ERROR_STATUS_SET_DEVICE "ERROR: Failed to set the status for device COM%d:\n"
IDS_ERROR_INVALID_PARITY_BITS "ERROR: Invalid value for Parity Bits %d:\n"
IDS_ERROR_INVALID_STOP_BITS "ERROR: Invalid value for Stop Bits %d:\n"
IDS_ERROR_NO_MEMORY "ERROR: Not enough memory.\n"
IDS_ERROR_SCREEN_LINES_COL "ERROR: The screen cannot be set to the number of lines and columns specified.\n"
END

View File

@@ -0,0 +1,75 @@
/* Ștefan Fulea (stefan dot fulea at mail dot md) */
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
IDS_USAGE "Configurează dispozitive de sistem.\n\n\
Interogarea stării unui dispozitiv:\n\
MODE [dispozitiv] [/STATUS]\n\n\
Configurarea portului serial:\n\
MODE COMm[:] [BAUD=b] [PARITY=p] [DATA=d] [STOP=s]\n\
[to=on|off] [xon=on|off] [odsr=on|off]\n\
[octs=on|off] [dtr=on|off|hs]\n\
[rts=on|off|hs|tg] [idsr=on|off]\n\n\
Redirecția portului paralel:\n\
MODE LPTn[:]=COMm[:]\n\n\
Selecția unui cod de pagină:\n\
MODE CON[:] CP SELECT=yyy\n\n\
Starea codului de pagină:\n\
MODE CON[:] CP [/STATUS]\n\n\
Modul de afișare:\n\
MODE CON[:] [COLS=c] [LINES=n]\n\n\
Rata de repetiție la menținerea unei taste apăsate:\n\
MODE CON[:] [RATE=r DELAY=d]\n"
IDS_QUERY_SERIAL_FOUND " Depistat dispozitiv la portul serial - %s\n"
IDS_QUERY_PRINTER_FOUND " Depistat dispozitiv de imprimare - %s\n"
IDS_QUERY_PARALLEL_FOUND " Depistat dispozitiv la portul paralel - %s\n"
IDS_QUERY_DOSDEV_FOUND " Depistat dispozitiv de tip DOS - %s\n"
// IDS_QUERY_MISC_FOUND " Found other device - %s\n"
// IDS_QUERY_DEVICE_FOUND " Found %s device - %s\n"
// IDS_SERIAL "serial"
// IDS_PRINTER "parallel"
// IDS_OTHER "other"
END
STRINGTABLE
BEGIN
IDS_DEVICE_STATUS_HEADER "Starea pentru dispozitivul %s:"
IDS_COM_STATUS_BAUD " Rata de modulare: %ld\n"
IDS_COM_STATUS_PARITY " Paritate: %s\n"
IDS_COM_STATUS_DATA_BITS " Biți de date: %d\n"
IDS_COM_STATUS_STOP_BITS " Biți delimitori: %s\n"
IDS_COM_STATUS_TIMEOUT " Timp de expirare: %s\n"
IDS_COM_STATUS_XON_XOFF " XON/XOFF: %s\n"
IDS_COM_STATUS_CTS_HANDSHAKING " Inițiere CTS: %s\n"
IDS_COM_STATUS_DSR_HANDSHAKING " Inițiere DSR: %s\n"
IDS_COM_STATUS_DSR_SENSITIVITY " Senzitivitate DSR: %s\n"
IDS_COM_STATUS_DTR_CIRCUIT " Circuit DTR: %s\n"
IDS_COM_STATUS_RTS_CIRCUIT " Circuit RTS: %s\n"
IDS_CONSOLE_STATUS_LINES " Linii: %d\n"
IDS_CONSOLE_STATUS_COLS " Coloane: %d\n"
IDS_CONSOLE_KBD_DELAY " Întârziere taste: %ld\n"
IDS_CONSOLE_KBD_RATE " Rată taste: %ld\n"
IDS_CONSOLE_CODEPAGE " Cod de pagină: %d\n"
IDS_PRINTER_OUTPUT_NOT_REROUTED " Ieșirea de imprimantă nu este redirecționată.\n"
IDS_PRINTER_OUTPUT_REROUTED_SERIAL " Ieșirea de imprimantă este redirecționată către portul %s.\n"
END
STRINGTABLE
BEGIN
IDS_ERROR_QUERY_DEVICES "EROARE: Dispozitivul DOS (0x%lx) nu poate fi interogat.\n"
IDS_ERROR_QUERY_DEVICES_FORM " QueryDosDeviceW(%s) a returnat un formular nerecunoscut %s.\n"
IDS_ERROR_SET_PARALLEL_STATE "SetParallelState(%d) - DefineDosDevice(%s) (0x%lx)\n"
IDS_ERROR_INVALID_PARAMETER "EROARE: Parametru nevalid - %s\n"
IDS_ERROR_ILLEGAL_DEVICE_NAME "EROARE: Nume eronat de dispozitiv - %s (0x%lx)\n"
IDS_ERROR_STATUS_GET_DEVICE "EROARE: Nu poate fi determinată starea dispozitivului COM%d:\n"
IDS_ERROR_STATUS_SET_DEVICE "EROARE: Nu poate fi schimbată starea pentru dispozitivul COM%d:\n"
IDS_ERROR_INVALID_PARITY_BITS "EROARE: Valoare eronată pentru biții de paritate %d:\n"
IDS_ERROR_INVALID_STOP_BITS "EROARE: Valoare eronată pentru biții delimitori %d:\n"
IDS_ERROR_NO_MEMORY "ERAORE: Nu există suficientă memorie.\n"
END

View File

@@ -0,0 +1,67 @@
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_USAGE "Настройка системных устройств.\n\n\
Состояние устройства: MODE [device] [/STATUS]\n\
Последовательный порт: MODE COMm[:] [BAUD=b] [PARITY=p] [DATA=d] [STOP=s]\n\
[to=on|off] [xon=on|off] [odsr=on|off]\n\
[octs=on|off] [dtr=on|off|hs]\n\
[rts=on|off|hs|tg] [idsr=on|off]\n\
Переадресация печати: MODE LPTn[:]=COMm[:]\n\
Выбор кодовой страницы: MODE CON[:] CP SELECT=yyy\n\
Вывод кодовой страницы: MODE CON[:] CP [/STATUS]\n\
Режим работы экрана: MODE CON[:] [COLS=c] [LINES=n]\n\
Ввод с клавиатуры: MODE CON[:] [RATE=r DELAY=d]\n"
IDS_QUERY_SERIAL_FOUND " Найдено последовательное устройство - %s\n"
IDS_QUERY_PRINTER_FOUND " Найдено устройство печати - %s\n"
IDS_QUERY_PARALLEL_FOUND " Найдено параллельное устройство - %s\n"
IDS_QUERY_DOSDEV_FOUND " Найдено устройство DOS - %s\n"
// IDS_QUERY_MISC_FOUND " Найдено другое устройство - %s\n"
// IDS_QUERY_DEVICE_FOUND " Найдено %s устройство - %s\n"
// IDS_SERIAL "последовательное"
// IDS_PRINTER "параллельное"
// IDS_OTHER "другое"
END
STRINGTABLE
BEGIN
IDS_DEVICE_STATUS_HEADER "Состояние устройства %s:"
IDS_COM_STATUS_BAUD " Скорость: %ld\n"
IDS_COM_STATUS_PARITY " Четность: %s\n"
IDS_COM_STATUS_DATA_BITS " Биты данных: %d\n"
IDS_COM_STATUS_STOP_BITS " Стоповые биты: %s\n"
IDS_COM_STATUS_TIMEOUT " Таймаут: %s\n"
IDS_COM_STATUS_XON_XOFF " XON/XOFF: %s\n"
IDS_COM_STATUS_CTS_HANDSHAKING " Синхронизация CTS: %s\n"
IDS_COM_STATUS_DSR_HANDSHAKING " Синхронизация DSR: %s\n"
IDS_COM_STATUS_DSR_SENSITIVITY " Чувствительность DSR: %s\n"
IDS_COM_STATUS_DTR_CIRCUIT " Цепь DTR: %s\n"
IDS_COM_STATUS_RTS_CIRCUIT " Цепь RTS: %s\n"
IDS_CONSOLE_STATUS_LINES " Строки: %d\n"
IDS_CONSOLE_STATUS_COLS " Столбцы: %d\n"
IDS_CONSOLE_KBD_DELAY " Скорость клавиатуры: %ld\n"
IDS_CONSOLE_KBD_RATE " Задержка клавиатуры: %ld\n"
IDS_CONSOLE_CODEPAGE " Кодовая страница: %d\n"
IDS_PRINTER_OUTPUT_NOT_REROUTED " Вывод принтера не переадресован.\n"
IDS_PRINTER_OUTPUT_REROUTED_SERIAL " Вывод принтера переадресован на последовательный порт %s.\n"
END
STRINGTABLE
BEGIN
IDS_ERROR_QUERY_DEVICES "ERROR: Unable to query DOS devices (0x%lx).\n"
IDS_ERROR_QUERY_DEVICES_FORM " QueryDosDeviceW(%s) returned unrecognised form %s.\n"
IDS_ERROR_SET_PARALLEL_STATE "SetParallelState(%d) - DefineDosDevice(%s) (0x%lx)\n"
IDS_ERROR_INVALID_PARAMETER "ERROR: Invalid parameter - %s\n"
IDS_ERROR_ILLEGAL_DEVICE_NAME "ERROR: Illegal device name - %s (0x%lx)\n"
IDS_ERROR_STATUS_GET_DEVICE "ERROR: Failed to get the status for device COM%d:\n"
IDS_ERROR_STATUS_SET_DEVICE "ERROR: Failed to set the status for device COM%d:\n"
IDS_ERROR_INVALID_PARITY_BITS "ERROR: Invalid value for Parity Bits %d:\n"
IDS_ERROR_INVALID_STOP_BITS "ERROR: Invalid value for Stop Bits %d:\n"
IDS_ERROR_NO_MEMORY "ERROR: Not enough memory.\n"
END

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,26 @@
#include <windef.h>
#include "resource.h"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Mode Utility"
#define REACTOS_STR_INTERNAL_NAME "mode"
#define REACTOS_STR_ORIGINAL_FILENAME "mode.com"
#include <reactos/version.rc>
/* UTF-8 */
#pragma code_page(65001)
#ifdef LANGUAGE_DE_DE
#include "lang/de-DE.rc"
#endif
#ifdef LANGUAGE_EN_US
#include "lang/en-US.rc"
#endif
#ifdef LANGUAGE_RO_RO
#include "lang/ro-RO.rc"
#endif
#ifdef LANGUAGE_RU_RU
#include "lang/ru-RU.rc"
#endif

View File

@@ -0,0 +1,48 @@
#ifndef RESOURCE_H
#define RESOURCE_H
#define IDS_USAGE 0
#define IDS_QUERY_SERIAL_FOUND 1
#define IDS_QUERY_PRINTER_FOUND 2
#define IDS_QUERY_PARALLEL_FOUND 3
// #define IDS_QUERY_MISC_FOUND 4
#define IDS_QUERY_DOSDEV_FOUND 4
// #define IDS_QUERY_DEVICE_FOUND 1
// #define IDS_SERIAL 2
// #define IDS_PRINTER 3
// #define IDS_OTHER 4
#define IDS_DEVICE_STATUS_HEADER 5
#define IDS_COM_STATUS_BAUD 6
#define IDS_COM_STATUS_PARITY 7
#define IDS_COM_STATUS_DATA_BITS 8
#define IDS_COM_STATUS_STOP_BITS 9
#define IDS_COM_STATUS_TIMEOUT 10
#define IDS_COM_STATUS_XON_XOFF 11
#define IDS_COM_STATUS_CTS_HANDSHAKING 12
#define IDS_COM_STATUS_DSR_HANDSHAKING 13
#define IDS_COM_STATUS_DSR_SENSITIVITY 14
#define IDS_COM_STATUS_DTR_CIRCUIT 15
#define IDS_COM_STATUS_RTS_CIRCUIT 16
#define IDS_CONSOLE_STATUS_LINES 17
#define IDS_CONSOLE_STATUS_COLS 18
#define IDS_CONSOLE_KBD_RATE 19
#define IDS_CONSOLE_KBD_DELAY 20
#define IDS_CONSOLE_CODEPAGE 21
#define IDS_PRINTER_OUTPUT_NOT_REROUTED 22
#define IDS_PRINTER_OUTPUT_REROUTED_SERIAL 23
#define IDS_ERROR_QUERY_DEVICES 24
#define IDS_ERROR_QUERY_DEVICES_FORM 25
#define IDS_ERROR_SET_PARALLEL_STATE 26
#define IDS_ERROR_INVALID_PARAMETER 27
#define IDS_ERROR_ILLEGAL_DEVICE_NAME 28
#define IDS_ERROR_STATUS_GET_DEVICE 29
#define IDS_ERROR_STATUS_SET_DEVICE 30
#define IDS_ERROR_INVALID_PARITY_BITS 31
#define IDS_ERROR_INVALID_STOP_BITS 32
#define IDS_ERROR_NO_MEMORY 33
#define IDS_ERROR_SCREEN_LINES_COL 34
#endif /* RESOURCE_H */

View File

@@ -1,6 +1,11 @@
PROJECT(more)
include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils)
add_executable(more more.c more.rc)
set_module_type(more win32cui)
set_module_type(more win32cui UNICODE)
target_link_libraries(more conutils ${PSEH_LIB})
add_importlibs(more advapi32 user32 msvcrt kernel32)
set_target_properties(more PROPERTIES SUFFIX ".com")
add_importlibs(more user32 msvcrt kernel32)
add_cd_file(TARGET more DESTINATION reactos/system32 FOR all)

View File

@@ -9,6 +9,7 @@ BEGIN
[Устройство:][Път]Файлово име Файл, чието съдържание да бъде показано.\n\
Команда\t\t Команда, чийто изход да бъде показан.\n\n\
При въпроса ""-- Продължаване --"" натиснете произволен клавиш, за показаване на следващата страница.\n"
IDS_CONTINUE " -- Продължаване (100%) -- "
IDS_FILE_ACCESS "Няма достъп до файл %s."
IDS_CONTINUE "-- Продължаване --"
IDS_CONTINUE_PROGRESS "-- Продължаване (%d%%) --"
IDS_FILE_ACCESS "Няма достъп до файл %s.\n"
END

View File

@@ -9,6 +9,7 @@ BEGIN
[Unitat:][Ruta]Nom del fitxer Un fitxer, el contingut del qual serà mostrat.\n\
Instrucció\t\t Una instrucció, el resultat de la qual serà mostrada.\n\n\
Al visualitzar ""-- Continua --"" heu de premer qualsevol tecla per visualitzar la següent pàgina.\n"
IDS_CONTINUE " -- Continua (100%) -- "
IDS_FILE_ACCESS "No puc accedir al fitxer %s."
IDS_CONTINUE "-- Continua --"
IDS_CONTINUE_PROGRESS "-- Continua (%d%%) --"
IDS_FILE_ACCESS "No puc accedir al fitxer %s.\n"
END

View File

@@ -16,6 +16,7 @@ BEGIN
Příkaz\t\t Příkaz, jehož výstup bude zobrazen.\n\n\
Při výzvě ""-- Pokračovat --"" lze stisknout libovolnou klávesu\n\
pro zobrazení další stránky.\n"
IDS_CONTINUE " -- Pokračovat (100%) -- "
IDS_FILE_ACCESS "Nelze získat přístup k souboru %s."
IDS_CONTINUE "-- Pokračovat --"
IDS_CONTINUE_PROGRESS "-- Pokračovat (%d%%) --"
IDS_FILE_ACCESS "Nelze získat přístup k souboru %s.\n"
END

View File

@@ -10,6 +10,7 @@ BEGIN
Befehl\t\t Ein Befehl, dessen Ausgabe angezeigt werden soll.\n\n\
An der Eingabeaufforderung ""-- Fortsetzung --"" kann eine beliebige\n\
Taste gedrückt werden, um die nächste Seite anzuzeigen.\n"
IDS_CONTINUE " -- Fortsetzung (100%) -- "
IDS_FILE_ACCESS "Auf die Datei %s kann nicht zugegriffen werden."
IDS_CONTINUE "-- Fortsetzung --"
IDS_CONTINUE_PROGRESS "-- Fortsetzung (%d%%) --"
IDS_FILE_ACCESS "Auf die Datei %s kann nicht zugegriffen werden.\n"
END

View File

@@ -9,6 +9,7 @@ BEGIN
[Δίσκος:][Μονοπάτι]Όνομα αρχείου Το αρχείο, τα δεδομένα του οποίου θα εμφανιστούν.\n\
Εντολή\t\t Η εντολή, της οποίας η έξοδος θα εμφανιστεί.\n\n\
Στη γραμμή εντολών ""-- Συνέχεια --"" μπορείτε να πατήσετε οποιοδήποτε κουμπί για να δείτε την επόμενη σελίδα.\n"
IDS_CONTINUE " -- Συνέχεια (100%) -- "
IDS_FILE_ACCESS "Δεν ήταν δυνατή η προσπέλαση του αρχείου %s."
IDS_CONTINUE "-- Συνέχεια --"
IDS_CONTINUE_PROGRESS "-- Συνέχεια (%d%%) --"
IDS_FILE_ACCESS "Δεν ήταν δυνατή η προσπέλαση του αρχείου %s.\n"
END

View File

@@ -9,6 +9,7 @@ BEGIN
[Drive:][Path]File name A file, whose content shall be displayed.\n\
Command\t\t A command, whose output shall be displayed.\n\n\
At the prompt ""-- Continue --"" you can press any key to show the next page.\n"
IDS_CONTINUE " -- Continue (100%) -- "
IDS_FILE_ACCESS "Cannot access the file %s."
IDS_CONTINUE "-- Continue --"
IDS_CONTINUE_PROGRESS "-- Continue (%d%%) --"
IDS_FILE_ACCESS "Cannot access the file %s.\n"
END

View File

@@ -9,6 +9,7 @@ BEGIN
[Unidad:][Ruta]Nombre del archivo Un archivo, cuyo contenido pueda ser mostrado.\n\
Comando\t\t Un comando, cuya salida pueda ser mostrada.\n\n\
Al visualizar ""-- Continuar --"" presione cualquier tecla para mostrar la siguiente página.\n"
IDS_CONTINUE " -- Continuar (100%) -- "
IDS_FILE_ACCESS "No se puede acceder al fichero %s."
IDS_CONTINUE "-- Continuar --"
IDS_CONTINUE_PROGRESS "-- Continuar (%d%%) --"
IDS_FILE_ACCESS "No se puede acceder al fichero %s.\n"
END

View File

@@ -9,6 +9,7 @@ BEGIN
[Lecteur:][Chemin]Nom du fichier Un fichier, dont le contenu sera affiché.\n\
Commande\t\t Une commande, dont la sortie sera affichée.\n\n\
À l'invite ""-- Continuer --"" Vous pouvez appuyer sur n'importe quelle touche pour afficher la page suivante.\n"
IDS_CONTINUE " -- Continuer (100%) -- "
IDS_FILE_ACCESS "Impossible d'accéder au fichier %s."
IDS_CONTINUE "-- Continuer --"
IDS_CONTINUE_PROGRESS "-- Continuer (%d %%) --"
IDS_FILE_ACCESS "Impossible d'accéder au fichier %s.\n"
END

View File

@@ -9,6 +9,7 @@ BEGIN
[Drive:][Path]File Il file da visualizzare.\n\
Comando\t\t Il comando di cui l'output dev'essere visualizzato.\n\n\
Alla richiesta ""-- Continua --"" premere un tasto qualsiasi per visualizzare la pagina successiva.\n"
IDS_CONTINUE " -- Continua (100%) -- "
IDS_FILE_ACCESS "Impossibile accedere al file %s."
IDS_CONTINUE "-- Continua --"
IDS_CONTINUE_PROGRESS "-- Continua (%d%%) --"
IDS_FILE_ACCESS "Impossibile accedere al file %s.\n"
END

View File

@@ -21,6 +21,7 @@ BEGIN
būti atvaizduotas.\n\n\
Pasirodžius raginimui ""-- Toliau --"" spauskite bet kurį klavišą, kad\n\
pamatytumėte sekantį puslapį.\n"
IDS_CONTINUE " -- Toliau (100%) -- "
IDS_FILE_ACCESS "Nepavyko atverti bylos %s."
IDS_CONTINUE "-- Toliau --"
IDS_CONTINUE_PROGRESS "-- Toliau (%d%%) --"
IDS_FILE_ACCESS "Nepavyko atverti bylos %s.\n"
END

View File

@@ -9,6 +9,7 @@ BEGIN
[Stasjon:][Mappe]Filnavn En fil, Velg innhold som skal vises.\n\
Command\t\t En kommando, Velg output som skal vises.\n\n\
At the prompt ""-- Fortsett --"" du kan trykke en tast for å vise neste side.\n"
IDS_CONTINUE " -- Fortsett (100%) -- "
IDS_FILE_ACCESS "Får ikke tilgang til filen %s."
IDS_CONTINUE "-- Fortsett --"
IDS_CONTINUE_PROGRESS "-- Fortsett (%d%%) --"
IDS_FILE_ACCESS "Får ikke tilgang til filen %s.\n"
END

View File

@@ -17,6 +17,7 @@ BEGIN
[Napęd:][Ścieżka]Nazwa pliku Plik, którego zawartość ma być wyświetlona.\n\
Polecenie\t\t Polecenie, którego wynik ma być wyświetlony.\n\n\
Po wyświetleniu ""-- Kontynuuj --"" możesz nacisnąć dowolny klawisz, aby przejść do następnej strony.\n"
IDS_CONTINUE " -- Kontynuuj (100%) -- "
IDS_FILE_ACCESS "Brak dostępu do pliku: %s."
IDS_CONTINUE "-- Kontynuuj --"
IDS_CONTINUE_PROGRESS "-- Kontynuuj (%d%%) --"
IDS_FILE_ACCESS "Brak dostępu do pliku: %s.\n"
END

View File

@@ -18,6 +18,7 @@ BEGIN
Comandă Comanda a cărei ieșire va fi afișată.\n\n\
La vederea sugestiei ""-- Continuă --"" veți apăsa o tastă pentru afișarea\n\
următoarei pagini.\n"
IDS_CONTINUE " -- Continuă (100%) -- "
IDS_FILE_ACCESS "Fișierul «%s» nu poate fi accesat!"
IDS_CONTINUE "-- Continuă --"
IDS_CONTINUE_PROGRESS "-- Continuă (%d%%) --"
IDS_FILE_ACCESS "Fișierul «%s» nu poate fi accesat!\n"
END

View File

@@ -17,6 +17,7 @@ BEGIN
[диск:][путь]имя_файла Файл, отображаемый по фрагментам.\n\
имя_команды Команда, вывод которой отображается на экране.\n\n\
При запросе ""-- Продолжить --"" вы можете нажать любую клавишу для отображения следующего экрана.\n"
IDS_CONTINUE " -- Продолжить (100%) -- "
IDS_FILE_ACCESS "Нет доступа к файлу %s."
IDS_CONTINUE "-- Продолжить --"
IDS_CONTINUE_PROGRESS "-- Продолжить (%d%%) --"
IDS_FILE_ACCESS "Нет доступа к файлу %s.\n"
END

View File

@@ -14,6 +14,7 @@ BEGIN
Príkaz\t\t Príkaz, ktorého výstup má byť zobrazený.\n\n\
Pri výzve ""-- Pokračujte --"" môžete stlačiť ľubovoľný kláves\n\
k zobrazeniu nasledujúcej stránky.\n"
IDS_CONTINUE " -- Pokračujte (100%) -- "
IDS_FILE_ACCESS "Neviem získať prístup k súboru %s."
IDS_CONTINUE "-- Pokračujte --"
IDS_CONTINUE_PROGRESS "-- Pokračujte (%d%%) --"
IDS_FILE_ACCESS "Neviem získať prístup k súboru %s.\n"
END

View File

@@ -13,6 +13,7 @@ BEGIN
[Drive:][Path]File name Nje dokument, përmbajtja e të cilit do të shfaqet.\n\
Komandë\t\t Nje komande, nxjerrja e te cilit do të shfaqet.\n\n\
At the prompt ""-- Vazhdo --"" ju mund të shtypni çfarëdo butoni për të vazhduar në faqen tjetër.\n"
IDS_CONTINUE " -- Vazhdo (100%) -- "
IDS_FILE_ACCESS "Nuk mund të aksesoj dokumentin %s."
IDS_CONTINUE "-- Vazhdo --"
IDS_CONTINUE_PROGRESS "-- Vazhdo (%d%%) --"
IDS_FILE_ACCESS "Nuk mund të aksesoj dokumentin %s.\n"
END

View File

@@ -16,6 +16,7 @@ BEGIN
[Enhet:][Mapp]Filnamn En fil, Välj innehåll som skall visas.\n\
Kommando\t\t Ett kommando, Välj vad som skall visas.\n\n\
vid prompten ""-- Fortsätt --"" du kan trycka valfri knapp för att visa nästa sida.\n"
IDS_CONTINUE " -- Fortsätt (100%) -- "
IDS_FILE_ACCESS "Får inte tillgång till filen %s."
IDS_CONTINUE "-- Fortsätt --"
IDS_CONTINUE_PROGRESS "-- Fortsätt (%d%%) --"
IDS_FILE_ACCESS "Får inte tillgång till filen %s.\n"
END

View File

@@ -11,6 +11,7 @@ BEGIN
[Sürücü:][Yol]Kütük adı İçeriği görüntülenecek bir kütük.\n\
Komut\t\t Çıkışı görüntülenecek bir komut.\n\n\
İstemde ""-- Sürdür --"" ile bir sonraki sayfayı göstermek için rastgele bir düğmeye basabilirsiniz.\n"
IDS_CONTINUE " -- Sürdür (%100) -- "
IDS_FILE_ACCESS "%s kütüğüne erişilemiyor."
IDS_CONTINUE "-- Sürdür --"
IDS_CONTINUE_PROGRESS "-- Sürdür (%%%d) --"
IDS_FILE_ACCESS "%s kütüğüne erişilemiyor.\n"
END

View File

@@ -17,6 +17,7 @@ BEGIN
[Диск:][Шлях]Ім'я_файлу Файл, вмiст якого треба вивести на екран.\n\
Command\t\t Команда, результат роботи якої треба вивести на екран.\n\n\
На запрошення ""-- Далi --"" Ви можете натиснути будь-яку клавiшу щоб побачити наступну сторiнку.\n"
IDS_CONTINUE " -- Далi (100%) -- "
IDS_FILE_ACCESS "Не можу отримати доступ до файла %s."
IDS_CONTINUE "-- Далi --"
IDS_CONTINUE_PROGRESS "-- Далi (%d%%) --"
IDS_FILE_ACCESS "Не можу отримати доступ до файла %s.\n"
END

View File

@@ -11,6 +11,7 @@ BEGIN
[驱动器:][路径]文件名 一个将要被如此显示内容的文件。\n\
命令\t\t 一个输出将要被如此显示的命令。\n\n\
在 ""-- 继续 --"" 的提示出现时你可以按任意键来显示下一页。\n"
IDS_CONTINUE " -- 继续 (100%) -- "
IDS_FILE_ACCESS "无法访问文件 %s。"
IDS_CONTINUE "-- 继续 --"
IDS_CONTINUE_PROGRESS "-- 继续 (%d%%) --"
IDS_FILE_ACCESS "无法访问文件 %s。\n"
END

View File

@@ -11,6 +11,7 @@ BEGIN
[磁碟機:][路徑]檔案名 一個將要被如此顯示內容的檔案。\n\
命令\t\t 一個輸出將要被如此顯示的命令。\n\n\
在 ""-- 繼續 --"" 的提示出現時你可以按任意鍵來顯示下一頁。\n"
IDS_CONTINUE " -- 繼續 (100%) -- "
IDS_FILE_ACCESS "無法訪問檔案 %s。"
IDS_CONTINUE "-- 繼續 --"
IDS_CONTINUE_PROGRESS "-- 繼續 (%d%%) --"
IDS_FILE_ACCESS "無法訪問檔案 %s。\n"
END

View File

@@ -1,3 +1,14 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS More Command
* FILE: base/applications/cmdutils/more/more.c
* PURPOSE: Displays text stream from STDIN or from an arbitrary number
* of files to STDOUT, with screen capabilities (more than CAT,
* but less than LESS ^^).
* PROGRAMMERS: Paolo Pantaleo
* Timothy Schepens
* Hermes Belusca-Maito (hermes.belusca@sfr.fr)
*/
/*
* MORE.C - external command.
*
@@ -5,209 +16,616 @@
*
* 26 Sep 1999 - Paolo Pantaleo <paolopan@freemail.it>
* started
*
* Oct 2003 - Timothy Schepens <tischepe at fastmail dot fm>
* use window size instead of buffer size.
*/
#include <stdio.h>
#include <malloc.h>
#include <tchar.h>
#include <windef.h>
#include <winbase.h>
#include <winnls.h>
#include <winuser.h>
#include <wincon.h>
#include <conutils.h>
#include "resource.h"
static TCHAR szCont[128];
static DWORD szContLength;
static HINSTANCE hApp;
/* PagePrompt statistics for the current file */
DWORD dwFileSize; // In bytes
DWORD dwSumReadBytes, dwSumReadChars;
// The average number of bytes per character is equal to
// dwSumReadBytes / dwSumReadChars. Note that dwSumReadChars
// will never be == 0 when ConWritePaging (and possibly PagePrompt)
// is called.
/*handle for file and console*/
HANDLE hStdIn;
HANDLE hStdOut;
HANDLE hStdErr;
/* Handles for file and console */
HANDLE hFile = INVALID_HANDLE_VALUE;
HANDLE hStdIn, hStdOut;
HANDLE hKeyboard;
static VOID
GetScreenSize (PSHORT maxx, PSHORT maxy)
static BOOL
__stdcall
PagePrompt(PCON_PAGER Pager, DWORD Done, DWORD Total)
{
CONSOLE_SCREEN_BUFFER_INFO csbi;
HANDLE hInput = ConStreamGetOSHandle(StdIn);
DWORD dwMode;
KEY_EVENT_RECORD KeyEvent;
GetConsoleScreenBufferInfo (hStdOut, &csbi);
*maxx = (csbi.srWindow.Right - csbi.srWindow.Left) + 1;
*maxy = (csbi.srWindow.Bottom - csbi.srWindow.Top) - 4;
}
static
VOID ConOutPuts (LPTSTR szText)
{
DWORD dwWritten;
WriteFile (GetStdHandle (STD_OUTPUT_HANDLE), szText, _tcslen(szText), &dwWritten, NULL);
WriteFile (GetStdHandle (STD_OUTPUT_HANDLE), "\n", 1, &dwWritten, NULL);
}
static VOID
ConInKey (VOID)
{
INPUT_RECORD ir;
DWORD dwRead;
do
{
ReadConsoleInput (hKeyboard, &ir, 1, &dwRead);
if ((ir.EventType == KEY_EVENT) &&
(ir.Event.KeyEvent.bKeyDown == TRUE))
return;
}
while (TRUE);
}
static VOID
WaitForKey (VOID)
{
DWORD dwWritten;
WriteFile (hStdErr, szCont , szContLength, &dwWritten, NULL);
ConInKey();
WriteFile (hStdErr, _T("\n"), 1, &dwWritten, NULL);
// FlushConsoleInputBuffer (hConsoleIn);
}
//INT CommandMore (LPTSTR cmd, LPTSTR param)
int main (int argc, char **argv)
{
SHORT maxx,maxy;
SHORT line_count=0,ch_count=0;
DWORD i, last;
HANDLE hFile = INVALID_HANDLE_VALUE;
TCHAR szFullPath[MAX_PATH];
TCHAR szMsg[1024];
/*reading/writing buffer*/
TCHAR *buff;
/*bytes written by WriteFile and ReadFile*/
DWORD dwRead,dwWritten;
/*ReadFile() return value*/
BOOL bRet;
hStdIn = GetStdHandle(STD_INPUT_HANDLE);
hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
hStdErr = GetStdHandle(STD_ERROR_HANDLE);
hApp = GetModuleHandle(NULL);
buff=malloc(4096);
if (!buff)
{
ConOutPuts(_T("Error: no memory"));
return 1;
}
if (argc > 1 && _tcsncmp (argv[1], _T("/?"), 2) == 0)
{
if (LoadString(hApp, IDS_USAGE, buff, 4096 / sizeof(TCHAR)) < (int)(4096 / sizeof(TCHAR)))
{
CharToOem(buff, buff);
ConOutPuts(buff);
}
free(buff);
return 0;
}
hKeyboard = CreateFile (_T("CONIN$"), GENERIC_READ|GENERIC_WRITE,
0,NULL,OPEN_ALWAYS,0,0);
GetScreenSize(&maxx,&maxy);
FlushConsoleInputBuffer (hKeyboard);
if(argc > 1)
{
GetFullPathNameA(argv[1], MAX_PATH, szFullPath, NULL);
hFile = CreateFile (szFullPath,
GENERIC_READ,
0,
NULL,
OPEN_EXISTING,
0,
0);
if (hFile == INVALID_HANDLE_VALUE)
{
if (LoadString(hApp, IDS_FILE_ACCESS, szMsg, sizeof(szMsg) / sizeof(TCHAR)) < (int)(sizeof(szMsg) / sizeof(TCHAR)))
{
_stprintf(buff, szMsg, szFullPath);
CharToOem(buff, buff);
ConOutPuts(buff);
}
free(buff);
return 0;
}
}
else
{
hFile = hStdIn;
}
if (!LoadString(hApp, IDS_CONTINUE, szCont, sizeof(szCont) / sizeof(TCHAR)))
/*
* Just use the simple prompt if the file being displayed is the STDIN,
* otherwise use the prompt with progress percentage.
*
* The progress percentage is evaluated as follows.
* So far we have read a total of 'dwSumReadBytes' bytes from the file.
* Amongst those is the latest read chunk of 'dwReadBytes' bytes, to which
* correspond a number of 'dwReadChars' characters with which we have called
* ConWritePaging who called PagePrompt. We then have: Total == dwReadChars.
* During this ConWritePaging call the PagePrompt was called after 'Done'
* number of characters over 'Total'.
* It should be noted that for 'dwSumReadBytes' number of bytes read it
* *roughly* corresponds 'dwSumReadChars' number of characters. This is
* because there may be some failures happening during the conversion of
* the bytes read to the character string for a given encoding.
* Therefore the number of characters displayed on screen is equal to:
* dwSumReadChars - Total + Done ,
* but the best corresponding approximed number of bytes would be:
* dwSumReadBytes - (Total - Done) * (dwSumReadBytes / dwSumReadChars) ,
* where the ratio is the average number of bytes per character.
* The percentage is then computed relative to the total file size.
*/
if (hFile == hStdIn)
{
/* Shouldn't happen, so exit */
free(buff);
ConResPuts(Pager->Screen->Stream, IDS_CONTINUE);
}
else
{
ConResPrintf(Pager->Screen->Stream, IDS_CONTINUE_PROGRESS,
// (dwSumReadChars - Total + Done) * 100 / dwFileSize
(dwSumReadBytes - (Total - Done) *
(dwSumReadBytes / dwSumReadChars)) * 100 / dwFileSize
);
}
// TODO: Implement prompt read line!
// FIXME: Does not support TTY yet!
/* RemoveBreakHandler */
SetConsoleCtrlHandler(NULL, TRUE);
/* ConInDisable */
GetConsoleMode(hInput, &dwMode);
dwMode &= ~ENABLE_PROCESSED_INPUT;
SetConsoleMode(hInput, dwMode);
do
{
// FIXME: Does not support TTY yet!
// ConInKey(&KeyEvent);
INPUT_RECORD ir;
DWORD dwRead;
do
{
ReadConsoleInput(hInput, &ir, 1, &dwRead);
}
while ((ir.EventType != KEY_EVENT) || (!ir.Event.KeyEvent.bKeyDown));
/* Got our key, return to caller */
KeyEvent = ir.Event.KeyEvent;
}
while ((KeyEvent.wVirtualKeyCode == VK_SHIFT) ||
(KeyEvent.wVirtualKeyCode == VK_MENU) ||
(KeyEvent.wVirtualKeyCode == VK_CONTROL));
/* AddBreakHandler */
SetConsoleCtrlHandler(NULL, FALSE);
/* ConInEnable */
GetConsoleMode(hInput, &dwMode);
dwMode |= ENABLE_PROCESSED_INPUT;
SetConsoleMode(hInput, dwMode);
/*
* Erase the full line where the cursor is, and move
* the cursor back to the beginning of the line.
*/
ConClearLine(Pager->Screen->Stream);
if ((KeyEvent.wVirtualKeyCode == VK_ESCAPE) ||
((KeyEvent.wVirtualKeyCode == L'C') &&
(KeyEvent.dwControlKeyState & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED))))
{
/* We break, output a newline */
WCHAR ch = L'\n';
ConStreamWrite(Pager->Screen->Stream, &ch, 1);
return FALSE;
}
return TRUE;
}
/*
* See base/applications/cmdutils/clip/clip.c!IsDataUnicode()
* and base/applications/notepad/text.c!ReadText() for more details.
* Also some good code example can be found at:
* https://github.com/AutoIt/text-encoding-detect
*/
typedef enum
{
ENCODING_ANSI = 0,
ENCODING_UTF16LE = 1,
ENCODING_UTF16BE = 2,
ENCODING_UTF8 = 3
} ENCODING;
static BOOL
IsDataUnicode(
IN PVOID Buffer,
IN DWORD BufferSize,
OUT ENCODING* Encoding OPTIONAL,
OUT PDWORD SkipBytes OPTIONAL)
{
PBYTE pBytes = Buffer;
ENCODING encFile = ENCODING_ANSI;
DWORD dwPos = 0;
/*
* See http://archives.miloush.net/michkap/archive/2007/04/22/2239345.html
* for more details about the algorithm and the pitfalls behind it.
* Of course it would be actually great to make a nice function that
* would work, once and for all, and put it into a library.
*/
/* Look for Byte Order Marks */
if ((BufferSize >= 2) && (pBytes[0] == 0xFF) && (pBytes[1] == 0xFE))
{
encFile = ENCODING_UTF16LE;
dwPos = 2;
}
else if ((BufferSize >= 2) && (pBytes[0] == 0xFE) && (pBytes[1] == 0xFF))
{
encFile = ENCODING_UTF16BE;
dwPos = 2;
}
else if ((BufferSize >= 3) && (pBytes[0] == 0xEF) && (pBytes[1] == 0xBB) && (pBytes[2] == 0xBF))
{
encFile = ENCODING_UTF8;
dwPos = 3;
}
else
{
/*
* Try using statistical analysis. Do not rely on the return value of
* IsTextUnicode as we can get FALSE even if the text is in UTF-16 BE
* (i.e. we have some of the IS_TEXT_UNICODE_REVERSE_MASK bits set).
* Instead, set all the tests we want to perform, then just check
* the passed tests and try to deduce the string properties.
*/
/*
* This mask contains the 3 highest bits from IS_TEXT_UNICODE_NOT_ASCII_MASK
* and the 1st highest bit from IS_TEXT_UNICODE_NOT_UNICODE_MASK.
*/
#define IS_TEXT_UNKNOWN_FLAGS_MASK ((7 << 13) | (1 << 11))
/* Flag out the unknown flags here, the passed tests will not have them either */
INT Tests = (IS_TEXT_UNICODE_NOT_ASCII_MASK |
IS_TEXT_UNICODE_NOT_UNICODE_MASK |
IS_TEXT_UNICODE_REVERSE_MASK | IS_TEXT_UNICODE_UNICODE_MASK)
& ~IS_TEXT_UNKNOWN_FLAGS_MASK;
INT Results;
IsTextUnicode(Buffer, BufferSize, &Tests);
Results = Tests;
/*
* As the IS_TEXT_UNICODE_NULL_BYTES or IS_TEXT_UNICODE_ILLEGAL_CHARS
* flags are expected to be potentially present in the result without
* modifying our expectations, filter them out now.
*/
Results &= ~(IS_TEXT_UNICODE_NULL_BYTES | IS_TEXT_UNICODE_ILLEGAL_CHARS);
/*
* NOTE: The flags IS_TEXT_UNICODE_ASCII16 and
* IS_TEXT_UNICODE_REVERSE_ASCII16 are not reliable.
*
* NOTE2: Check for potential "bush hid the facts" effect by also
* checking the original results (in 'Tests') for the absence of
* the IS_TEXT_UNICODE_NULL_BYTES flag, as we may presumably expect
* that in UTF-16 text there will be at some point some NULL bytes.
* If not, fall back to ANSI. This shows the limitations of using the
* IsTextUnicode API to perform such tests, and the usage of a more
* improved encoding detection algorithm would be really welcome.
*/
if (!(Results & IS_TEXT_UNICODE_NOT_UNICODE_MASK) &&
!(Results & IS_TEXT_UNICODE_REVERSE_MASK) &&
(Results & IS_TEXT_UNICODE_UNICODE_MASK) &&
(Tests & IS_TEXT_UNICODE_NULL_BYTES))
{
encFile = ENCODING_UTF16LE;
dwPos = (Results & IS_TEXT_UNICODE_SIGNATURE) ? 2 : 0;
}
else
if (!(Results & IS_TEXT_UNICODE_NOT_UNICODE_MASK) &&
!(Results & IS_TEXT_UNICODE_UNICODE_MASK) &&
(Results & IS_TEXT_UNICODE_REVERSE_MASK) &&
(Tests & IS_TEXT_UNICODE_NULL_BYTES))
{
encFile = ENCODING_UTF16BE;
dwPos = (Results & IS_TEXT_UNICODE_REVERSE_SIGNATURE) ? 2 : 0;
}
else
{
/*
* Either 'Results' has neither of those masks set, as it can be
* the case for UTF-8 text (or ANSI), or it has both as can be the
* case when analysing pure binary data chunk. This is therefore
* invalid and we fall back to ANSI encoding.
* FIXME: In case of failure, assume ANSI (as long as we do not have
* correct tests for UTF8, otherwise we should do them, and at the
* very end, assume ANSI).
*/
encFile = ENCODING_ANSI; // ENCODING_UTF8;
dwPos = 0;
}
}
if (Encoding)
*Encoding = encFile;
if (SkipBytes)
*SkipBytes = dwPos;
return (encFile != ENCODING_ANSI);
}
/*
* Adapted from base/shell/cmd/misc.c!FileGetString(), but with correct
* text encoding support. Also please note that similar code should be
* also used in the CMD.EXE 'TYPE' command.
* Contrary to CMD's FileGetString() we do not stop at new-lines.
*
* Read text data from a file and convert it from a given encoding to UTF-16.
*
* IN OUT PVOID pCacheBuffer and IN DWORD CacheBufferLength :
* Implementation detail so that the function uses an external user-provided
* buffer to store the data temporarily read from the file. The function
* could have used an internal buffer instead. The length is in number of bytes.
*
* IN OUT PWSTR* pBuffer and IN OUT PDWORD pnBufferLength :
* Reallocated buffer containing the string data converted to UTF-16.
* In input, contains a pointer to the original buffer and its length.
* In output, contains a pointer to the reallocated buffer and its length.
* The length is in number of characters.
*
* At first call to this function, pBuffer can be set to NULL, in which case
* when the function returns the pointer will point to a valid buffer.
* After the last call to this function, free the pBuffer pointer with:
* HeapFree(GetProcessHeap(), 0, *pBuffer);
*
* If Encoding is set to ENCODING_UTF16LE or ENCODING_UTF16BE, since we are
* compiled in UNICODE, no extra conversion is performed and therefore
* pBuffer is unused (remains unallocated) and one can directly use the
* contents of pCacheBuffer as it is expected to contain valid UTF-16 text.
*
* OUT PDWORD pdwReadBytes : Number of bytes read from the file (optional).
* OUT PDWORD pdwReadChars : Corresponding number of characters read (optional).
*/
static BOOL
FileGetString(
IN HANDLE hFile,
IN ENCODING Encoding,
IN OUT PVOID pCacheBuffer,
IN DWORD CacheBufferLength,
IN OUT PWCHAR* pBuffer,
IN OUT PDWORD pnBufferLength,
OUT PDWORD pdwReadBytes OPTIONAL,
OUT PDWORD pdwReadChars OPTIONAL)
{
BOOL Success;
UINT CodePage = (UINT)-1;
DWORD dwReadBytes;
INT len;
// ASSERT(pCacheBuffer && (CacheBufferLength > 0));
// ASSERT(CacheBufferLength % 2 == 0); // Cache buffer length MUST BE even!
// ASSERT(pBuffer && pnBufferLength);
/* Always reset the retrieved number of bytes/characters */
if (pdwReadBytes) *pdwReadBytes = 0;
if (pdwReadChars) *pdwReadChars = 0;
Success = ReadFile(hFile, pCacheBuffer, CacheBufferLength, &dwReadBytes, NULL);
if (!Success || dwReadBytes == 0)
return FALSE;
if (pdwReadBytes) *pdwReadBytes = dwReadBytes;
if ((Encoding == ENCODING_ANSI) || (Encoding == ENCODING_UTF8))
{
/* Conversion is needed */
if (Encoding == ENCODING_ANSI)
CodePage = GetConsoleCP(); // CP_ACP; // FIXME: Cache GetConsoleCP() value.
else // if (Encoding == ENCODING_UTF8)
CodePage = CP_UTF8;
/* Retrieve the needed buffer size */
len = MultiByteToWideChar(CodePage, 0, pCacheBuffer, dwReadBytes,
NULL, 0);
if (len == 0)
{
/* Failure, bail out */
return FALSE;
}
/* Initialize the conversion buffer if needed... */
if (*pBuffer == NULL)
{
*pnBufferLength = len;
*pBuffer = HeapAlloc(GetProcessHeap(), 0, *pnBufferLength * sizeof(WCHAR));
if (*pBuffer == NULL)
{
// *pBuffer = NULL;
*pnBufferLength = 0;
// WARN("DEBUG: Cannot allocate memory for *pBuffer!\n");
// ConErrFormatMessage(GetLastError());
return FALSE;
}
}
/* ... or reallocate only if the new length is greater than the old one */
else if (len > *pnBufferLength)
{
PWSTR OldBuffer = *pBuffer;
*pnBufferLength = len;
*pBuffer = HeapReAlloc(GetProcessHeap(), 0, *pBuffer, *pnBufferLength * sizeof(WCHAR));
if (*pBuffer == NULL)
{
/* Do not leak old buffer */
HeapFree(GetProcessHeap(), 0, OldBuffer);
// *pBuffer = NULL;
*pnBufferLength = 0;
// WARN("DEBUG: Cannot reallocate memory for *pBuffer!\n");
// ConErrFormatMessage(GetLastError());
return FALSE;
}
}
/* Now perform the conversion proper */
len = MultiByteToWideChar(CodePage, 0, pCacheBuffer, dwReadBytes,
*pBuffer, len);
dwReadBytes = len;
}
else
{
/*
* No conversion needed, just convert from big to little endian if needed.
* pBuffer and pnBufferLength are left untouched and pCacheBuffer can be
* directly used.
*/
PWCHAR pWChars = pCacheBuffer;
DWORD i;
dwReadBytes /= sizeof(WCHAR);
if (Encoding == ENCODING_UTF16BE)
{
for (i = 0; i < dwReadBytes; i++)
{
/* Equivalent to RtlUshortByteSwap: reverse high/low bytes */
pWChars[i] = MAKEWORD(HIBYTE(pWChars[i]), LOBYTE(pWChars[i]));
}
}
// else if (Encoding == ENCODING_UTF16LE), we are good, nothing to do.
}
/* Return the number of characters (dwReadBytes is converted) */
if (pdwReadChars) *pdwReadChars = dwReadBytes;
return TRUE;
}
// INT CommandMore(LPTSTR cmd, LPTSTR param)
int wmain(int argc, WCHAR* argv[])
{
// FIXME this stuff!
CON_SCREEN Screen = {StdOut};
CON_PAGER Pager = {&Screen, 0};
int i;
BOOL bRet, bContinue;
ENCODING Encoding;
DWORD SkipBytes = 0;
#define FileCacheBufferSize 4096
PVOID FileCacheBuffer = NULL;
PWCHAR StringBuffer = NULL;
DWORD StringBufferLength = 0;
DWORD dwReadBytes, dwReadChars;
TCHAR szFullPath[MAX_PATH];
hStdIn = GetStdHandle(STD_INPUT_HANDLE);
hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
/* Initialize the Console Standard Streams */
ConStreamInit(StdIn , GetStdHandle(STD_INPUT_HANDLE) , UTF8Text, INVALID_CP);
ConStreamInit(StdOut, GetStdHandle(STD_OUTPUT_HANDLE), UTF8Text, INVALID_CP);
ConStreamInit(StdErr, GetStdHandle(STD_ERROR_HANDLE) , UTF8Text, INVALID_CP);
/*
* Bad usage (too much options) or we use the /? switch.
* Display help for the MORE command.
*/
if (argc > 1 && wcscmp(argv[1], L"/?") == 0)
{
ConResPuts(StdOut, IDS_USAGE);
return 0;
}
// FIXME: Parse all the remaining parameters.
// Then the file list can be found at the very end.
// FIXME2: Use the PARSER api that can be found in EVENTCREATE.
// NOTE: We might try to duplicate the ConOut for read access... ?
hKeyboard = CreateFileW(L"CONIN$", GENERIC_READ|GENERIC_WRITE,
FILE_SHARE_READ|FILE_SHARE_WRITE, NULL,
OPEN_EXISTING, 0, NULL);
FlushConsoleInputBuffer(hKeyboard);
ConStreamSetOSHandle(StdIn, hKeyboard);
FileCacheBuffer = HeapAlloc(GetProcessHeap(), 0, FileCacheBufferSize);
if (!FileCacheBuffer)
{
ConPuts(StdErr, L"Error: no memory\n");
CloseHandle(hKeyboard);
return 1;
}
szContLength = _tcslen(szCont);
/* Special case where we run 'MORE' without any argument: we use STDIN */
if (argc <= 1)
{
/*
* Assign STDIN handle to hFile so that the page prompt function will
* know the data comes from STDIN, and will take different actions.
*/
hFile = hStdIn;
/* Update the statistics for PagePrompt */
dwFileSize = 0;
dwSumReadBytes = dwSumReadChars = 0;
do
{
bRet = ReadFile(hFile,buff,4096,&dwRead,NULL);
/* We suppose we read text from the file */
for(last=i=0;i<dwRead && bRet;i++)
{
ch_count++;
if(buff[i] == _T('\n') || ch_count == maxx)
{
ch_count=0;
line_count++;
if (line_count == maxy)
/* For STDIN we always suppose we are in ANSI mode */
// SetFilePointer(hFile, 0, NULL, FILE_BEGIN);
Encoding = ENCODING_ANSI; // ENCODING_UTF8;
bContinue = ConPutsPaging(&Pager, PagePrompt, TRUE, L"");
if (!bContinue)
goto Quit;
do
{
bRet = FileGetString(hFile, Encoding,
FileCacheBuffer, FileCacheBufferSize,
&StringBuffer, &StringBufferLength,
&dwReadBytes, &dwReadChars);
if (!bRet || dwReadBytes == 0 || dwReadChars == 0)
{
line_count = 0;
WriteFile(hStdOut,&buff[last], i-last+1, &dwWritten, NULL);
last=i+1;
FlushFileBuffers (hStdOut);
WaitForKey ();
/* We failed at reading the file, bail out */
break;
}
}
}
if (last<dwRead && bRet)
WriteFile(hStdOut,&buff[last], dwRead-last, &dwWritten, NULL);
}
while(dwRead>0 && bRet);
/* Update the statistics for PagePrompt */
dwSumReadBytes += dwReadBytes;
dwSumReadChars += dwReadChars;
free (buff);
CloseHandle (hKeyboard);
if (hFile != hStdIn)
CloseHandle (hFile);
bContinue = ConWritePaging(&Pager, PagePrompt, FALSE,
StringBuffer, dwReadChars);
/* If we Ctrl-C/Ctrl-Break, stop everything */
if (!bContinue)
goto Quit;
}
while (bRet && dwReadBytes > 0);
goto Quit;
}
return 0;
/* We have files: read them and output them to STDOUT */
for (i = 1; i < argc; i++)
{
GetFullPathNameW(argv[i], ARRAYSIZE(szFullPath), szFullPath, NULL);
hFile = CreateFileW(szFullPath,
GENERIC_READ,
FILE_SHARE_READ,
NULL,
OPEN_EXISTING,
0, // FILE_ATTRIBUTE_NORMAL,
NULL);
if (hFile == INVALID_HANDLE_VALUE)
{
ConResPrintf(StdErr, IDS_FILE_ACCESS, szFullPath);
continue;
}
/* We currently do not support files too big */
dwFileSize = GetFileSize(hFile, NULL);
if (dwFileSize == INVALID_FILE_SIZE)
{
ConPuts(StdErr, L"ERROR: Invalid file size!\n");
CloseHandle(hFile);
continue;
}
/* We suppose we read text from the file */
/* Check whether the file is UNICODE and retrieve its encoding */
SetFilePointer(hFile, 0, NULL, FILE_BEGIN);
bRet = ReadFile(hFile, FileCacheBuffer, FileCacheBufferSize, &dwReadBytes, NULL);
IsDataUnicode(FileCacheBuffer, dwReadBytes, &Encoding, &SkipBytes);
SetFilePointer(hFile, SkipBytes, NULL, FILE_BEGIN);
/* Update the statistics for PagePrompt */
dwSumReadBytes = dwSumReadChars = 0;
bContinue = ConPutsPaging(&Pager, PagePrompt, TRUE, L"");
if (!bContinue)
{
CloseHandle(hFile);
goto Quit;
}
do
{
bRet = FileGetString(hFile, Encoding,
FileCacheBuffer, FileCacheBufferSize,
&StringBuffer, &StringBufferLength,
&dwReadBytes, &dwReadChars);
if (!bRet || dwReadBytes == 0 || dwReadChars == 0)
{
/*
* We failed at reading the file, bail out and
* continue with the other files.
*/
break;
}
/* Update the statistics for PagePrompt */
dwSumReadBytes += dwReadBytes;
dwSumReadChars += dwReadChars;
if ((Encoding == ENCODING_UTF16LE) || (Encoding == ENCODING_UTF16BE))
{
bContinue = ConWritePaging(&Pager, PagePrompt, FALSE,
FileCacheBuffer, dwReadChars);
}
else
{
bContinue = ConWritePaging(&Pager, PagePrompt, FALSE,
StringBuffer, dwReadChars);
}
/* If we Ctrl-C/Ctrl-Break, stop everything */
if (!bContinue)
{
CloseHandle(hFile);
goto Quit;
}
}
while (bRet && dwReadBytes > 0);
CloseHandle(hFile);
}
Quit:
if (StringBuffer) HeapFree(GetProcessHeap(), 0, StringBuffer);
HeapFree(GetProcessHeap(), 0, FileCacheBuffer);
CloseHandle(hKeyboard);
return 0;
}
/* EOF */

View File

@@ -2,13 +2,16 @@
#include "resource.h"
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS More Command"
#define REACTOS_STR_INTERNAL_NAME "more"
#define REACTOS_STR_ORIGINAL_FILENAME "more.com"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS More Command"
#define REACTOS_STR_INTERNAL_NAME "more"
#define REACTOS_STR_ORIGINAL_FILENAME "more.com"
#include <reactos/version.rc>
/* UTF-8 */
#pragma code_page(65001)
#ifdef LANGUAGE_BG_BG
#include "lang/bg-BG.rc"
#endif
@@ -71,4 +74,4 @@
#endif
#ifdef LANGUAGE_ZH_TW
#include "lang/zh-TW.rc"
#endif
#endif

View File

@@ -2,4 +2,5 @@
#define IDS_USAGE 100
#define IDS_CONTINUE 101
#define IDS_FILE_ACCESS 102
#define IDS_CONTINUE_PROGRESS 102
#define IDS_FILE_ACCESS 103

View File

@@ -15,7 +15,7 @@ STRINGTABLE
STRING_SUCCESS, "Operația a fost îndeplinită cu succes\n"
STRING_INVALID_KEY, "Eroare: Nume de cheie nevalid\n"
STRING_INVALID_CMDLINE, "Eroare: Parametri nevalizi pentru linia de comandă\n"
STRING_NO_REMOTE, "Eroare: Nu se pot adăuga chei pe calculatorul de la distanță\n"
STRING_NO_REMOTE, "Eroare: Nu pot fi adăugate chei într-un calculator la distanță\n"
STRING_CANNOT_FIND, "Eroare: Sistemul nu a putut găsi cheia sau valoarea de registru specificată\n"
STRING_UNSUPPORTED_TYPE, "Eroare: Tip nerecunoscut\n"
STRING_MISSING_INTEGER, "reg: Opțiunea [/d] trebuie să fie urmată de un număr valid întreg\n"
@@ -31,12 +31,12 @@ STRINGTABLE
STRING_DELETE_VALUEALL, "Sigur doriți ștergerea tuturor valorilor de registru din «%1»?"
STRING_DELETE_SUBKEY, "Sigur doriți ștergerea cheii de registru «%1»?"
STRING_INVALID_STRING, "reg: Opțiunea [/d] trebuie urmată de un șir valid\n"
STRING_VALUEALL_FAILED, "reg: Nu se pot șterge toate valorile de registru din «%1». A survenit o eroare neașteptată.\n"
STRING_GENERAL_FAILURE, "reg: Nu se poate completa operația specificată. A survenit o eroare neașteptată.\n"
STRING_VALUEALL_FAILED, "reg: Nu au putut fi șterse toate valorile de registru din «%1». A survenit o eroare neașteptată.\n"
STRING_GENERAL_FAILURE, "reg: Operația specificată nu a putut fi efectuată. A survenit o eroare neașteptată.\n"
STRING_MATCHES_FOUND, "Căutare efectuată. Numărul de potriviri găsite: %1!d!\n"
STRING_INVALID_SYNTAX, "reg: Sintaxă nerespectată. "
STRING_INVALID_OPTION, "reg: Opțiune nevalidă [%1]. "
STRING_REG_HELP, "Tastați «REG /?» pentru mai multe informații.\n"
STRING_FUNC_HELP, "Tastați «REG %1 /?» pentru mai multe informații.\n"
STRING_VALUE_NOT_SET, "(value not set)"
STRING_VALUE_NOT_SET, "(valoare nealocată)"
}

View File

@@ -14,7 +14,7 @@ STRINGTABLE
STRING_UNSUPPORTED_TYPE, "Ошибка: Неподдерживаемый тип\n"
STRING_MISSING_INTEGER, "Ошибка: Задайте допустимое целочисленное значение параметра [/d]\n"
STRING_MISSING_HEXDATA, "Ошибка: Задайте допустимое шестнадцатеричное значение параметра [/d]\n"
STRING_UNHANDLED_TYPE, "reg: Unhandled registry data type [/t 0x%1!x!, /d %2]\n"
STRING_UNHANDLED_TYPE, "reg: Неизвестный тип данных реестра [/t 0x%1!x!, /d %2]\n"
STRING_OVERWRITE_VALUE, "Параметр '%1' уже существует. Заменить?"
STRING_YESNO, "(Y-да/N-нет)"
STRING_YES, "Y"
@@ -24,9 +24,9 @@ STRINGTABLE
STRING_DELETE_VALUE, "Удалить раздел реестра '%1' без возможности восстановления?"
STRING_DELETE_VALUEALL, "Удалить все параметры из раздела реестра '%1'?"
STRING_DELETE_SUBKEY, "Удалить параметр реестра '%1' без возможности восстановления?"
STRING_INVALID_STRING, "reg: The option [/d] must be followed by a valid string\n"
STRING_VALUEALL_FAILED, "reg: Unable to delete all registry values in '%1'. An unexpected error occurred.\n"
STRING_GENERAL_FAILURE, "reg: Unable to complete the specified operation. An unexpected error occurred.\n"
STRING_INVALID_STRING, "reg: Опция [/d] должна сопровождаться допустимой строкой\n"
STRING_VALUEALL_FAILED, "reg: Невозможно удалить все значения реестра в '%1'. Произошла непредвиденная ошибка.\n"
STRING_GENERAL_FAILURE, "reg: Не удалось выполнить указанную операцию. Произошла непредвиденная ошибка.\n"
STRING_MATCHES_FOUND, "Поиск завершен. Количество совпадений: %1!d!\n"
STRING_INVALID_SYNTAX, "Ошибка: Неверный синтаксис. "
STRING_INVALID_OPTION, "Ошибка: Недопустимый аргумент или параметр [%1]. "

View File

@@ -34,5 +34,5 @@ STRINGTABLE
STRING_INVALID_OPTION, "reg: Geçersiz seçenek [%1]. "
STRING_REG_HELP, "Yardım için ""REG /?"" yazınız.\n"
STRING_FUNC_HELP, "Yardım için ""REG %1 /?"" yazınız.\n"
STRING_VALUE_NOT_SET, "(value not set)"
STRING_VALUE_NOT_SET, "(Değer belirlenmemiş.)"
}

View File

@@ -14,8 +14,8 @@ STRINGTABLE
STRING_CLOSE_PROC_SRCH, "Către fereastra procesului «%1» cu PID %2!u! a fost emis un mesaj de închidere.\n"
STRING_TERM_PID_SEARCH, "Procesul cu PID %1!u! a fost oprit în mod forțat.\n"
STRING_TERM_PROC_SEARCH, "Procesul «%1» cu PID %2!u! a fost oprit în mod forțat.\n"
STRING_SEARCH_FAILED, "Eroare: Nu se poate găsi procesul «%1».\n"
STRING_ENUM_FAILED, "Eroare: Nu se poate enumera lista de procese.\n"
STRING_SEARCH_FAILED, "Eroare: Procesul «%1» nu poate fi găsit.\n"
STRING_ENUM_FAILED, "Eroare: Procesele nu au putut fi enumerate.\n"
STRING_TERMINATE_FAILED, "Eroare: Procesul «%1» nu poate fi oprit.\n"
STRING_SELF_TERMINATION, "Eroare: Auto-terminarea nu este permisă.\n"
}

View File

@@ -1,6 +1,9 @@
include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils)
add_executable(tree tree.c tree.rc)
set_module_type(tree win32cui UNICODE)
target_link_libraries(tree conutils ${PSEH_LIB})
add_importlibs(tree msvcrt kernel32)
set_target_properties(tree PROPERTIES SUFFIX ".com")
add_importlibs(tree user32 msvcrt kernel32)
add_cd_file(TARGET tree DESTINATION reactos/system32 FOR all)

View File

@@ -1,45 +1,30 @@
/*
/*
* PROJECT: ReactOS
* LICENSE: GNU GPLv2 only as published by the Free Software Foundation
* PURPOSE: Implements tree.com functionality similar to Windows
* PURPOSE: Implements tree.com command similar to Windows
* PROGRAMMERS: Asif Bahrainwala (asif_bahrainwala@hotmail.com)
*/
#include <stdio.h>
#include <stdlib.h>
#include <windef.h>
#include <winbase.h>
#include <winuser.h>
#include <conutils.h>
#include "resource.h"
#define STR_MAX 2048
static void GetDirectoryStructure(wchar_t* strPath, UINT width, const wchar_t* prevLine);
static VOID GetDirectoryStructure(PWSTR strPath, UINT width, PCWSTR prevLine);
/* if this flag is set to true, files will also be listed */
/* If this flag is set to true, files will also be listed within the folder structure */
BOOL bShowFiles = FALSE;
/* if this flag is true, ASCII characters will be used instead of UNICODE ones */
/* If this flag is true, ASCII characters will be used instead of UNICODE ones */
BOOL bUseAscii = FALSE;
/*
* This takes strings from a resource string table
* and outputs it to the console.
*/
VOID PrintResourceString(INT resID, ...)
{
WCHAR tmpBuffer[STR_MAX];
CHAR tmpBufferA[STR_MAX];
va_list arg_ptr;
va_start(arg_ptr, resID);
LoadStringW(GetModuleHandle(NULL), resID, tmpBuffer, STR_MAX);
CharToOemW(tmpBuffer, tmpBufferA);
vfprintf(stdout, tmpBufferA, arg_ptr);
va_end(arg_ptr);
}
/**
* @name: HasSubFolder
*
@@ -47,20 +32,20 @@ VOID PrintResourceString(INT resID, ...)
* Must specify folder name
*
* @return
* true if folder has sub folders, else will return false
* true if folder has sub-folders, else will return false
*/
static BOOL HasSubFolder(const wchar_t *strPath1)
static BOOL HasSubFolder(PCWSTR strPath1)
{
BOOL ret = FALSE;
WIN32_FIND_DATA FindFileData;
WIN32_FIND_DATAW FindFileData;
HANDLE hFind = NULL;
static wchar_t strPath[STR_MAX] = L"";
static WCHAR strPath[STR_MAX] = L"";
ZeroMemory(strPath, sizeof(strPath));
wcscat(strPath, strPath1);
wcscat(strPath, L"\\*.");
hFind = FindFirstFile(strPath, &FindFileData);
hFind = FindFirstFileW(strPath, &FindFileData);
do
{
if (FindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
@@ -71,11 +56,11 @@ static BOOL HasSubFolder(const wchar_t *strPath1)
continue;
}
ret = TRUE; //found subfolder
ret = TRUE; // Sub-folder found
break;
}
}
while (FindNextFile(hFind, &FindFileData));
while (FindNextFileW(hFind, &FindFileData));
FindClose(hFind);
return ret;
@@ -100,22 +85,22 @@ static BOOL HasSubFolder(const wchar_t *strPath1)
* @return
* void
*/
static void DrawTree(const wchar_t* strPath,
const WIN32_FIND_DATA *arrFolder,
static VOID DrawTree(PCWSTR strPath,
const WIN32_FIND_DATAW* arrFolder,
const size_t szArr,
UINT width,
const wchar_t *prevLine,
PCWSTR prevLine,
BOOL drawfolder)
{
BOOL bHasSubFolder = HasSubFolder(strPath);
UINT i = 0;
/* this will format the spaces required for correct formatting */
/* This will format the spaces required for correct formatting */
for (i = 0; i < szArr; ++i)
{
wchar_t *consoleOut = (wchar_t*)malloc(sizeof(wchar_t) * STR_MAX);
PWSTR consoleOut = (PWSTR)malloc(STR_MAX * sizeof(WCHAR));
UINT j = 0;
static wchar_t str[STR_MAX];
static WCHAR str[STR_MAX];
/* As we do not seem to have the _s functions properly set up, use the non-secure version for now */
//wcscpy_s(consoleOut, STR_MAX, L"");
@@ -125,15 +110,14 @@ static void DrawTree(const wchar_t* strPath,
for (j = 0; j < width - 1; ++j)
{
/* if the previous line has '├' or '│' then the current line will
/* If the previous line has '├' or '│' then the current line will
add '│' to continue the connecting line */
if ((BYTE)prevLine[j] == 195 || (BYTE)prevLine[j] == 179 ||
(BYTE)prevLine[j] == L'+' || (BYTE)prevLine[j] == L'|')
if (prevLine[j] == L'\x251C' || prevLine[j] == L'\x2502' ||
prevLine[j] == L'+' || prevLine[j] == L'|')
{
if (!bUseAscii)
{
wchar_t a[] = {179, 0};
wcscat(consoleOut, a);
wcscat(consoleOut, L"\x2502");
}
else
{
@@ -150,27 +134,27 @@ static void DrawTree(const wchar_t* strPath,
{
if (drawfolder)
{
/* will add '├───Folder name */
/* Add '├───Folder name' (\xC3\xC4\xC4\xC4 or \x251C\x2500\x2500\x2500) */
if (bUseAscii)
wsprintf(str, L"+---%s", (wchar_t*)arrFolder[i].cFileName);
swprintf(str, L"+---%s", arrFolder[i].cFileName);
else
wsprintf(str, L"%c%c%c%c%s", 195, 196, 196, 196, (wchar_t*)arrFolder[i].cFileName);
swprintf(str, L"\x251C\x2500\x2500\x2500%s", arrFolder[i].cFileName);
}
else
{
if (bHasSubFolder)
{
/* will add '│ FileNamw' //thie line is added to connect
the belowfolder sub structure */
/* Add '│ FileName' (\xB3 or \x2502) */
// This line is added to connect the below-folder sub-structure
if (bUseAscii)
wsprintf(str,L"| %s", (wchar_t*)arrFolder[i].cFileName);
swprintf(str, L"| %s", arrFolder[i].cFileName);
else
wsprintf(str,L"%c %s", 179, (wchar_t*)arrFolder[i].cFileName);
swprintf(str, L"\x2502 %s", arrFolder[i].cFileName);
}
else
{
/* will add ' FileNamw' */
wsprintf(str,L" %s", (wchar_t*)arrFolder[i].cFileName);
/* Add ' FileName' */
swprintf(str, L" %s", arrFolder[i].cFileName);
}
}
}
@@ -178,44 +162,44 @@ static void DrawTree(const wchar_t* strPath,
{
if (drawfolder)
{
/* '└───Folder name' */
/* '└───Folder name' (\xC0\xC4\xC4\xC4 or \x2514\x2500\x2500\x2500) */
if (bUseAscii)
wsprintf(str, L"\\---%s", (wchar_t*)arrFolder[i].cFileName);
swprintf(str, L"\\---%s", arrFolder[i].cFileName);
else
wsprintf(str, L"%c%c%c%c%s", 192, 196, 196, 196, (wchar_t*)arrFolder[i].cFileName);
swprintf(str, L"\x2514\x2500\x2500\x2500%s", arrFolder[i].cFileName);
}
else
{
if (bHasSubFolder)
{
/* '│ FileName' */
/* '│ FileName' (\xB3 or \x2502) */
if (bUseAscii)
wsprintf(str, L"| %s", (wchar_t*)arrFolder[i].cFileName);
swprintf(str, L"| %s", arrFolder[i].cFileName);
else
wsprintf(str, L"%c %s", 179, (wchar_t*)arrFolder[i].cFileName);
swprintf(str, L"\x2502 %s", arrFolder[i].cFileName);
}
else
{
/* ' FileName' */
wsprintf(str, L" %s", (wchar_t*)arrFolder[i].cFileName);
swprintf(str, L" %s", arrFolder[i].cFileName);
}
}
}
wcscat(consoleOut, str);
wprintf(L"%s\n", consoleOut);
ConPrintf(StdOut, L"%s\n", consoleOut);
if (drawfolder)
{
wchar_t *str = (wchar_t*)malloc(STR_MAX * sizeof(wchar_t));
ZeroMemory(str, STR_MAX * sizeof(wchar_t));
PWSTR str = (PWSTR)malloc(STR_MAX * sizeof(WCHAR));
ZeroMemory(str, STR_MAX * sizeof(WCHAR));
wcscat(str, strPath);
wcscat(str, L"\\");
wcscat(str, arrFolder[i].cFileName);
GetDirectoryStructure(str, width + 4, consoleOut);
wcscat(str, strPath);
wcscat(str, L"\\");
wcscat(str, arrFolder[i].cFileName);
GetDirectoryStructure(str, width + 4, consoleOut);
free(str);
free(str);
}
free(consoleOut);
}
@@ -235,27 +219,27 @@ static void DrawTree(const wchar_t* strPath,
* @return
* void
*/
static void
GetDirectoryStructure(wchar_t* strPath, UINT width, const wchar_t* prevLine)
static VOID
GetDirectoryStructure(PWSTR strPath, UINT width, PCWSTR prevLine)
{
WIN32_FIND_DATA FindFileData;
WIN32_FIND_DATAW FindFileData;
HANDLE hFind = NULL;
//DWORD err = 0;
/* will fill up with names of all sub folders */
WIN32_FIND_DATA *arrFolder = NULL;
/* Fill up with names of all sub-folders */
WIN32_FIND_DATAW *arrFolder = NULL;
UINT arrFoldersz = 0;
/* will fill up with names of all sub folders */
WIN32_FIND_DATA *arrFile = NULL;
/* Fill up with names of all sub-folders */
WIN32_FIND_DATAW *arrFile = NULL;
UINT arrFilesz = 0;
ZeroMemory(&FindFileData, sizeof(FindFileData));
{
static wchar_t tmp[STR_MAX] = L"";
static WCHAR tmp[STR_MAX] = L"";
ZeroMemory(tmp, sizeof(tmp));
wcscat(tmp, strPath);
wcscat(tmp, L"\\*.*");
hFind = FindFirstFile(tmp, &FindFileData);
hFind = FindFirstFileW(tmp, &FindFileData);
//err = GetLastError();
}
@@ -271,7 +255,7 @@ GetDirectoryStructure(wchar_t* strPath, UINT width, const wchar_t* prevLine)
continue;
++arrFoldersz;
arrFolder = (WIN32_FIND_DATA*)realloc(arrFolder, arrFoldersz * sizeof(FindFileData));
arrFolder = (WIN32_FIND_DATAW*)realloc(arrFolder, arrFoldersz * sizeof(FindFileData));
if (arrFolder == NULL)
exit(-1);
@@ -282,7 +266,7 @@ GetDirectoryStructure(wchar_t* strPath, UINT width, const wchar_t* prevLine)
else
{
++arrFilesz;
arrFile = (WIN32_FIND_DATA*)realloc(arrFile, arrFilesz * sizeof(FindFileData));
arrFile = (WIN32_FIND_DATAW*)realloc(arrFile, arrFilesz * sizeof(FindFileData));
if(arrFile == NULL)
exit(-1);
@@ -290,17 +274,17 @@ GetDirectoryStructure(wchar_t* strPath, UINT width, const wchar_t* prevLine)
arrFile[arrFilesz - 1] = FindFileData;
}
}
while (FindNextFile(hFind, &FindFileData));
while (FindNextFileW(hFind, &FindFileData));
FindClose(hFind);
if (bShowFiles)
{
/* will free(arrFile) */
/* Will free(arrFile) */
DrawTree(strPath, arrFile, arrFilesz, width, prevLine, FALSE);
}
/* will free(arrFile) */
/* Will free(arrFile) */
DrawTree(strPath, arrFolder, arrFoldersz, width, prevLine, TRUE);
free(arrFolder);
@@ -314,18 +298,21 @@ GetDirectoryStructure(wchar_t* strPath, UINT width, const wchar_t* prevLine)
* @return
* error /success value
*/
int wmain( int argc, wchar_t *argv[])
int wmain(int argc, WCHAR* argv[])
{
DWORD dwSerial = 0;
wchar_t t = 0;
wchar_t *strPath = NULL;
WCHAR t = 0;
PWSTR strPath = NULL;
DWORD sz = 0;
//wchar_t *context = NULL;
wchar_t *driveLetter = NULL;
//PWSTR context = NULL;
PWSTR driveLetter = NULL;
int i;
/* parse the command line */
/* Initialize the Console Standard Streams */
ConInitStdStreams();
/* Parse the command line */
for (i = 1; i < argc; ++i)
{
if (argv[i][0] == L'-' || argv[i][0] == L'/')
@@ -333,49 +320,51 @@ int wmain( int argc, wchar_t *argv[])
switch (towlower(argv[i][1]))
{
case L'?':
/* will print help and exit after */
PrintResourceString(IDS_USAGE);
/* Print help and exit after */
ConResPuts(StdOut, IDS_USAGE);
return 0;
case L'f':
/* if set to true, will populate all the files within the folder structure */
bShowFiles = TRUE;
break;
case L'a':
bUseAscii = TRUE;
break;
default:
break;
}
}
else
{
/* this must be path to some folder */
/* This must be path to some folder */
/* will set the current directory for this executable */
/* Set the current directory for this executable */
BOOL b = SetCurrentDirectoryW(argv[i]);
if (b == FALSE)
{
PrintResourceString(IDS_NO_SUBDIRECTORIES);
ConResPuts(StdOut, IDS_NO_SUBDIRECTORIES);
return 1;
}
}
}
PrintResourceString(IDS_FOLDER_PATH);
ConResPuts(StdOut, IDS_FOLDER_PATH);
GetVolumeInformation(NULL, NULL, 0, &dwSerial, NULL, NULL, NULL, 0);
PrintResourceString(IDS_VOL_SERIAL, dwSerial >> 16, dwSerial & 0xffff);
GetVolumeInformationW(NULL, NULL, 0, &dwSerial, NULL, NULL, NULL, 0);
ConResPrintf(StdOut, IDS_VOL_SERIAL, dwSerial >> 16, dwSerial & 0xffff);
/* get the buffer size */
sz = GetCurrentDirectory(1, &t);
sz = GetCurrentDirectoryW(1, &t);
/* must not return before calling delete[] */
strPath = (wchar_t*)malloc(sizeof(wchar_t) * sz);
strPath = (PWSTR)malloc(sz * sizeof(WCHAR));
/* get the current directory */
GetCurrentDirectory(sz, strPath);
GetCurrentDirectoryW(sz, strPath);
/* get the drive letter , must not return before calling delete[] */
driveLetter = (wchar_t*)malloc(sizeof(wchar_t) * sz);
driveLetter = (PWSTR)malloc(sz * sizeof(WCHAR));
/* As we do not seem to have the _s functions properly set up, use the non-secure version for now */
//wcscpy_s(driveLetter,sz,strPath);
@@ -383,15 +372,15 @@ int wmain( int argc, wchar_t *argv[])
wcscpy(driveLetter, strPath);
wcstok(driveLetter, L":");
wprintf(L"%s:.\n", driveLetter);
ConPrintf(StdOut, L"%s:.\n", driveLetter);
free(driveLetter);
/* get the sub directories within this current folder */
/* get the sub-directories within this current folder */
GetDirectoryStructure(strPath, 1, L" ");
free(strPath);
wprintf(L"\n");
ConPuts(StdOut, L"\n");
return 0;
}

View File

@@ -1,5 +1,8 @@
include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils)
add_executable(whoami whoami.c whoami.rc)
set_module_type(whoami win32cui UNICODE)
target_link_libraries(whoami conutils ${PSEH_LIB})
add_importlibs(whoami user32 secur32 advapi32 msvcrt kernel32)
add_cd_file(TARGET whoami DESTINATION reactos/system32 FOR all)

View File

@@ -1,3 +1,4 @@
/* Translator: Ștefan Fulea (stefan dot fulea at mail dot md) */
LANGUAGE LANG_ROMANIAN, SUBLANG_DEFAULT
STRINGTABLE
@@ -29,8 +30,8 @@ BEGIN
IDS_UNKNOWN_DESCRIPTION "???"
IDS_STATE_ENABLED "Activat"
IDS_STATE_DISABLED "Dezactivat"
IDS_ERROR_UPN "EROARE: Nu se poate obține Numele Principal al Utilizatorului (UPN) deoarece\n utilizatorul actualmente autentificat nu este un un utilizator de domeniu.\n"
IDS_ERROR_FQDN "EROARE: Nu se poate obține Numele Complet Distinctiv Calificat (FQDN) deoarece\nutilizatorul actualmente autentificat nu este un un utilizator de domeniu.\n"
IDS_ERROR_UPN "EROARE: Numele Principal al Utilizatorului (UPN) nu poate fi obținut deoarece\n utilizatorul actualmente autentificat nu este un un utilizator de domeniu.\n"
IDS_ERROR_FQDN "EROARE: Numele Complet Distinctiv Calificat (FQDN) nu poate fi obținut\ndeoarece utilizatorul actualmente autentificat nu este un un utilizator\nde domeniu.\n"
IDS_ERROR_VALUEXPECTED "EROARE: Sintaxă eronată. Este așteptată o valoare pentru «/fo».\nTastați ""WHOAMI /?"" pentru informații de utilizare.\n"
IDS_ERROR_VALUENOTALLOWED "EROARE: Sintaxă eronată. Valoarea «%s» nu este permisă pentru opțiunea «/fo».\nTastați ""WHOAMI /?"" pentru informații de utilizare.\n"
IDS_ERROR_1TIMES "EROARE: Sintaxă eronată. Utilizarea opțiunii «%s» nu este permisă mai mult de o\nsingură dată.\nTastați ""WHOAMI /?"" pentru informații de utilizare.\n"
@@ -39,8 +40,8 @@ BEGIN
IDS_ERROR_NH_LIST "EROARE: Opțiunea /NH nu poate fi utilizată în formatul LIST.\nTastați ""WHOAMI /?"" pentru informații de utilizare.\n"
IDS_HELP "DESCRIERE:\n\
Afișează informațiile de utilizator, de grup, și de privilegii pentru un\n\
utilizator autentificat local. Dacă nu sunt furnizate argumente, se vor afișa\n\
numele și domeniul utilizatorului curent.\n\
utilizator autentificat local. Dacă nu sunt furnizate argumente, vor fi\n\
afișate numele și domeniul utilizatorului curent.\n\
\n\
Formatele disponibile pentru opțiunea «/fo» sunt «csv», «list», și «table».\n\
Argumentul «/nh» ascunde anteturile. Datele sunt implicit afișate tabelar.\n\

View File

@@ -6,69 +6,16 @@
* PROGRAMMERS: Ismael Ferreras Morezuelas (swyterzone+ros@gmail.com)
*/
#define SECURITY_WIN32
#include <security.h>
#include <sddl.h>
#include <strsafe.h>
#include <conutils.h>
#include "resource.h"
/* Unicode (W) to ANSI OEM wrapper function, as console and Unicode don't mix well, sigh */
static void WhoamiOemConversion_printf(const WCHAR *lpSourceFormatW, ...)
{
CHAR *lpBufferA = NULL;
WCHAR *lpBufferW = NULL;
UINT Size;
va_list Args;
/* first let's find out the final output'ed length of the wprintf routine */
va_start(Args, lpSourceFormatW);
Size = _vscwprintf(lpSourceFormatW, Args);
va_end(Args);
/* allocate a proportional memory chunk taking into account the char width */
lpBufferW = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (Size + 1) * sizeof(WCHAR));
if (!lpBufferW)
return;
/* do wprintf to this newly allocated buffer of ours */
va_start(Args, lpSourceFormatW);
_vsnwprintf(lpBufferW, Size, lpSourceFormatW, Args);
va_end(Args);
/* allocate a similarly sized buffer for the ANSI/OEM version of our string */
lpBufferA = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (Size + 1) * sizeof(CHAR));
if (!lpBufferA)
{
HeapFree(GetProcessHeap(), 0, lpBufferW);
return;
}
/* convert our Unicode/Wide char string into a proper ANSI/OEM
string that our console may understand, at least in theory */
CharToOemBuffW(lpBufferW,
lpBufferA,
Size);
/* print the converted OEM string into the console's output and call it a day */
printf("%s", lpBufferA);
/* clean everything up */
HeapFree(GetProcessHeap(), 0, lpBufferW);
HeapFree(GetProcessHeap(), 0, lpBufferA);
}
#define wprintf WhoamiOemConversion_printf
#define wprintf(...) ConPrintf(StdOut, ##__VA_ARGS__)
BOOL NoHeader = FALSE;
UINT NoHeaderArgCount = 0;
@@ -194,7 +141,6 @@ void WhoamiPrintHeader(int HeaderId)
while (Length--)
wprintf(L"-");
/* _putws seems to be broken in ReactOS' CRT ??? */
wprintf(L"\n\n");
}
@@ -718,13 +664,16 @@ int WhoamiPriv(void)
int wmain(int argc, WCHAR* argv[])
{
INT i;
BYTE WamBit = 0;
#define WAM_USER 1<<0
#define WAM_GROUPS 1<<1
#define WAM_PRIV 1<<2
INT i;
BYTE WamBit = 0;
/* Initialize the Console Standard Streams */
ConInitStdStreams();
/* * * * * * * * * * * * * * * *
* A: no parameters whatsoever */

View File

@@ -5,7 +5,7 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
STRINGTABLE
{
STRING_CMDLINE_NOT_SUPPORTED, "Eroare: Comandă nerecunoscută.\n"
STRING_ALIAS_NOT_FOUND, "Eroare: Nu se poate găsi alias.\n"
STRING_ALIAS_NOT_FOUND, "Eroare: Alias necunoscut.\n"
STRING_INVALID_QUERY, "Eroare: Cerere nevalidă.\n"
STRING_INVALID_PATH, "Conținutul din «PATH» este sintactic nevalid.\n"
}

View File

@@ -1,4 +1,4 @@
/* Ștefan Fulea (stefan dot fulea at mail dot md) */
/* Translator: Ștefan Fulea (stefan dot fulea at mail dot md) */
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
STRINGTABLE
@@ -10,7 +10,7 @@ STRINGTABLE
STRING_COPY, "%1!d! fișier(e) copiat(e)\n"
STRING_QISDIR, "«%1» este un nume de fișier sau un director\ndin destinație?\n(F - Fișier, D - Director)\n"
STRING_SRCPROMPT,"%1? (Da|Nu)\n"
STRING_OVERWRITE,"Se suprascrie %1? (Da|Nu|Toate)\n"
STRING_OVERWRITE,"Suprascrieți %1? (Da|Nu|Toate)\n"
STRING_COPYFAIL, "Copierea «%1» în «%2» a eșuat cu cod de retur %3!d!\n"
STRING_OPENFAIL, "Deschiderea «%1» a eșuat\n"
STRING_READFAIL, "Citirea «%1» a eșuat\n"
@@ -28,7 +28,7 @@ XCOPY sursă [destinație] [/I] [/S] [/Q] [/F] [/L] [/W] [/T] [/N] [/U]\n\
\t [/R] [/H] [/C] [/P] [/A] [/M] [/E] [/D] [/Y] [/-Y]\n\
\nCu:\n\
\n\
[/I] Creează director dacă destinația nu există și se copiază două sau\n\
[/I] Creează director dacă destinația nu există și copiază două sau\n\
\tmai multe fișiere.\n\
[/S] Copiază directoarele și subdirectoarele.\n\
[/E] Copiază directoarele și subdirectoarele, inclusiv pe cele goale.\n\

View File

@@ -11,8 +11,8 @@ STRINGTABLE
STRING_COPY, "%1!d! файл(ов) скопировано.\n"
STRING_QISDIR, "'%1' является файлом или папкой?\n\
(F - Файл, D - Папка)\n"
STRING_SRCPROMPT,"%1? (Yes|No)\n"
STRING_OVERWRITE,"Переписать %1? (Yes|No|All)\n"
STRING_SRCPROMPT,"%1? (Yes-Да|No-Нет)\n"
STRING_OVERWRITE,"Переписать %1? (Yes-Да|No-Нет|All-Все)\n"
STRING_COPYFAIL, "При копировании '%1' в '%2' произошла ошибка: %3!d!\n"
STRING_OPENFAIL, "Невозможно открыть '%1'\n"
STRING_READFAIL, "При чтении '%1' произошла ошибка\n"

View File

@@ -31,7 +31,7 @@ BOOL StartDDTest(HWND hWnd, HINSTANCE hInstance, INT resTestDescription, INT res
WCHAR szError[256];
BOOL Result;
LoadStringW(hInstance, IDS_DDTEST_TITLE, szCaption, sizeof(szCaption) / sizeof(WCHAR));
LoadStringW(hInstance, IDS_MAIN_DIALOG, szCaption, sizeof(szCaption) / sizeof(WCHAR));
LoadStringW(hInstance, IDS_DDTEST_ERROR, szError, sizeof(szError) / sizeof(WCHAR));
LoadStringW(hInstance, resTestDescription, szTestDescription, sizeof(szTestDescription) / sizeof(WCHAR));
LoadStringW(hInstance, resResult, szResult, sizeof(szResult) / sizeof(WCHAR));
@@ -103,7 +103,7 @@ VOID DDTests()
}
LoadStringW(hInstance, IDS_DDTEST_DESCRIPTION, szDescription, sizeof(szDescription) / sizeof(WCHAR));
LoadStringW(hInstance, IDS_DDTEST_DESCRIPTION, szCaption, sizeof(szCaption) / sizeof(WCHAR));
LoadStringW(hInstance, IDS_MAIN_DIALOG, szCaption, sizeof(szCaption) / sizeof(WCHAR));
if(MessageBox(NULL, szDescription, szCaption, MB_YESNO | MB_ICONQUESTION) == IDNO)
return;

View File

@@ -256,5 +256,5 @@ BEGIN
IDS_DMUSIC_DLS "DLS de suport"
IDS_DMUSIC_EXT "Extern"
IDS_DMUSIC_PORT "Port implicit"
IDS_DDDISABLE_MSG "Se vor dezactiva toate accelerările fizice DirectDraw pentru toate dispozitivele.\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

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