- Fix last error value returned from GdiSelectPen for invalid DCs. Fixes the last test failure in gdi32:gdiobj. Patch by Katayama Hirofumi MZ.
CORE-13132 #resolve
svn path=/trunk/; revision=74419
- Avoid two cases of uninitialized variable use in GetEventUserName. Based on a patch by Víctor Martínez Calvo. CID 1401250
CORE-12798 #resolve
svn path=/trunk/; revision=74418
- Display the informative CP-change message on stdout, using the *output* code page (and not the input CP);
- Correctly update the local codepage cache;
- Display the informative CP-change message when the CP change succeeded;
- Add source comments + informative TODO for what remains to be done.
svn path=/trunk/; revision=74416
- Slightly update the description of CP 28599;
- Add descriptions for CPs 28600, 28603, 28604 and 28606;
- Add CP 856 "OEM - Hebrew PC" (which differs from OEM Hebrew CP 862).
Note that while we also have codepages 424, 878 and 1006, I don't add their description because:
- CP 424 is actually CP 20424 "IBM EBCDIC - Hebrew" on Windows (documented in the resource files);
- CP 878 is actually CP 20866 "Russian - KOI8" on Windows (documented in the resource files);
- CP 1006 seems to be "IBM Arabic" according to Wine, but I don't know its corresponding number on Windows.
svn path=/trunk/; revision=74414
- Rework GetLocalisedText helper such that it looks more like LoadStringW. Also, if the string is not found (either because there is no associated string table, or because its resource length is zero), then return zero.
Otherwise we return the correct number of characters copied into the user buffer, not counting the NULL terminator.
This fixes the blank strings showing in the list of codepage user-friendly names in the console properties dialog.
- Simplify the code of NLS_GetGeoFriendlyName: we can directly use the user-provided buffer to retrieve the string.
Addendum to r65157.
CORE-13130 #resolve
svn path=/trunk/; revision=74413
- Touch the virtual address of DMA buffers before calling MmGetPhysicalAddress on them. This ensures page directories are correctly set up for the current process context, and fixes random DMA operation failures ("MM:MmGetPhysicalAddressFailed"). This is not a hack -- using MmGetPhysicalAddress for DMA in the first place is.
CORE-9224 #resolve
svn path=/trunk/; revision=74408
- Button, Trakbar: Send WM_CTLCOLORBTN or WM_CTLCOLORSTATIC and use their return value to paint the control despite the fact that DrawThemeParentBackground was called as well.
Part of the fix for CORE-12978
svn path=/trunk/; revision=74406
- Use a helper function "AddFontToList" to add font names into the font list;
- Use string-safe functions where needed.
svn path=/trunk/; revision=74405
- In PDEVOBJ_vRefreshModeList, restore the current mode pointer, ppdev->pdmwDev, to a valid value.
CORE-13097 #resolve
svn path=/trunk/; revision=74404
Fix heap corruption in EnumDisplaySettingsExA/W:
- Do not overwrite the user-provided buffer size in dmDriverExtra
- Fix broken pointer arithmetic
CORE-13097
svn path=/trunk/; revision=74403
Display a list of available code pages, as done on Windows (NT/2k/2k3/Vista/7/8, when a CJK language is selected, and as always done on Windows 10 for all languages).
But contrary to Windows, do not limit this list to only CJK + CP-437 codepages, but list *all* the available CPs, retrieved from the registry. These CPs are also those available when using the "chcp" or "mode con cp" commands.
And contrary to Windows (where this is done only for the general console properties), always allow the user to view or change the code page even from the console properties dialog.
[CONSRV]: Support changing the current code page from the console properties dialog.
CORE-12451
svn path=/trunk/; revision=74397
- Make a copy of the service list where service and display name strings are separately allocated. We need this to update the service names rather than reload the list when the display name is changed.
- Write the display name, description or binary path to the registry when the user changed them.
- Disable the Edit button after it has been clicked.
- Do not add the service name to the argument vector in the call to StartServiceW. Services.exe already add the service name to the vector.
CORE-12743
svn path=/trunk/; revision=74394
Implement all corner cases of handling the Name parameter in EnumPrinters. This can be done in a common way for all levels.
Fixes more tests.
svn path=/trunk/; revision=74393
- In NtMapViewOfSection, check for address alignment after validating the handles. This fixes the tests from the previous commit, but is also necessary because information about the section object is necessary to avoid the alignment checks for physical memory sections.
CORE-13113
svn path=/trunk/; revision=74391
- Show that NtMapViewOfSection validates section and process handles before checking base address alignment
CORE-13113
svn path=/trunk/; revision=74390
- Check for ROS section object before accessing the AllocationAttributes member in NtMapViewOfSection, since ARM3 sections use a different structure.
CORE-13113
svn path=/trunk/; revision=74389
- Enable MEM_RESERVED test in SimpleErrorChecks() since it no longer asserts. Patch by Serge Gautherie.
ROSTESTS-109 #resolve
svn path=/trunk/; revision=74386
- Remove an unneeded header inclusion;
- Fix a sizeof invocation;
- RegEnumKeyExW and RegEnumValueW take their fourth parameter (size of key / value name, resp.) as a size in number of *characters* (and not in number of bytes);
- Add a missing RegCloseKey call in LocaleList_Create.
svn path=/trunk/; revision=74385
- Never use special pool for prototype PTEs. Avoids "(PointerPte >= (PMMPTE)MmPagedPoolStart) && (PointerPte <= (PMMPTE)MmPagedPoolEnd)" assertion failure in MiDecrementShareCount.
CORE-11474
svn path=/trunk/; revision=74378
- After ObCreateObject+ObInsertObject a handle close is enough to destroy the object, so do not dereference it in addition. Fixes use after free.
CORE-11474
svn path=/trunk/; revision=74375
- Remove tests that cause pool buffer overflows. NtQueryVolumeInformationFile does not validate buffer length for kernel mode callers, so passing an invalid length is not a good test.
CORE-11474
svn path=/trunk/; revision=74374
- Use the number of WCHARs, not the number of ANSI chars in GetCharABCWidthsA. Fixes stack corruption when running gdi32_winetest:font
CORE-11474
svn path=/trunk/; revision=74372
- In RealSystemParametersInfoA/SPI_GETDESKWALLPAPER, write the ansi wallpaper path directly into the user's buffer instead of using an allocation (and overrunning it). Fixes crash when running user32_winetest:sysparams with DPH.
Tangential to CORE-13097
svn path=/trunk/; revision=74370
This e.g. fixes display for the backslash symbol in CJK languages (that should appear as the Chinese "yuan" / Japanese "yen" currency symbol ¥, or the Korean "won" currency symbol ₩).
CORE-12451
svn path=/trunk/; revision=74366
When the driver installation fails, set the CONFIGFLAG_FAILEDINSTALL flag only if the user checked the 'Do not show this dialog anymore' checkbox.
CORE-13095
svn path=/trunk/; revision=74363
Load, display and store the computer description.
Patch by Grzegorz Araminowicz.
- Moved most of the code into separate functions and got rid of its deeply nested structure.
- Added some notification code, so that the Apply button gets enabled when the user changes the description.
CORE-12337
svn path=/trunk/; revision=74362
Fix automatic resolution change when resizing the VirtualBox window. Based on a patch by Ismael Ferreras Morezuelas.
- Provide a function, PDEVOBJ_vRefreshModeList, to reload the list of display modes
- Call PDEVOBJ_vRefreshModeList from UserEnumDisplaySettings to get an updated list of modes each time
CORE-6742 #resolve
svn path=/trunk/; revision=74360
- Split populating the display mode list out from EngpRegisterGraphicsDevice, into its own function, EngpPopulateDeviceModeList. Based on a patch by Ismael Ferreras Morezuelas.
CORE-6742
svn path=/trunk/; revision=74359
- Respect the TruncateSize parameter in CcUninitializeCacheMap. Avoids "freeing dirty VACB" messages for cache views beyond the end of the file.
CORE-12893 #resolve
svn path=/trunk/; revision=74358
Don't include inttypes.h, which isn't available on MSVC < 2013. Add the 4 needed typedefs to reactos_support_code.h instead.
Fixes CORE-13031
svn path=/trunk/; revision=74351
[NEWDEV]
Set the CONFIGFLAG_FAILEDINSTALL flag in the new hardware wizards welcome page and remove it only when the driver was successfully installed.
[UMPNPMGR]
Do not invoke the device installer if the devices CONFIGFLAG_FAILEDINSTALL flag is set.
svn path=/trunk/; revision=74348
- Refactor LocalEnumPrinters to make it ready for supporting additional levels.
- Correctly handle all passed flags for Level 1 queries to the Local Print Provider.
- Introduce strsafe functions to LocalEnumPrinters in a way that actually makes the code smaller. To be done in other parts too.
- Use PackStrings in LocalEnumPrinters to simplify the code.
- Return the correct 3 strings in the Description field of Level 1 queries. That also introduces the "Location" field.
- Remove debug spam in _OpenEnvironment.
[SPOOLSV]
- Make use of the newly implemented AlignRpcPtr/UndoAlignRpcPtr. Fixes a test.
[WINSPOOL]
- Dismiss invalid levels already in EnumPrintersW and zero the input buffer here (but not in localspl). Verified by a test.
EnumPrintersW for Level 1 should be fully supported now.
svn path=/trunk/; revision=74324
Add ASSERTs, improve documentation and the variety of tests for AlignRpcPtr/UndoAlignRpcPtr.
Based on comments by Serge Gautherie.
svn path=/trunk/; revision=74323
- Update to version 0.46e3 (and fix up the version numbers)
- Un-"fix" insignificant typo corrections that only serve to make syncing harder
CORE-13032 #resolve
CORE-11894 CORE-11277 CORE-12909
svn path=/trunk/; revision=74319
- In Wait_thread_proc, prioritize the cancel event over the wait object. This avoids executing the callback again after RtlDeregisterWait has been called.
Fixes ThemeStartCallback being called twice, causing a double free.
CORE-13074 #resolve
svn path=/trunk/; revision=74318
Insert a job into the start list when it is loaded or added. Remove it from the start list when it gets deleted. The start list is sorted by start time.
svn path=/trunk/; revision=74317
Calculate the next start time of a job and store it in the job object. DaysOfMonth and DaysOfWeek are not taken into account yet.
svn path=/trunk/; revision=74315
- Remove the ShellObjectCreator templates that allowed the caller to pass an arbitrary interface pointer. Leaving only the templates that take an void ** ppv parameter means that the callers are forced to use IID_PPV_ARG. This makes it less likely to have a pointer to an wrong interface.
- Fix the callers to always use IID_PPV_ARG.
- Rewrite the ShellObjectCreator templates to create the objects using the ATL CreateInstance thus allowing internal ATL methods to be called.
[BROWSEUI]
-Let CBandSite_CreateInstance take an additional parameter for the outer object since CBandSite is aggregatable. Create the object using the ATL creator class.
svn path=/trunk/; revision=74314
- Rename the settings structure to something more meaningful for using it for all taskbar related settings
- define some default settings
- check checkboxes with settings values in the properties window
- move saving the settings to an own function which will be implemented later
svn path=/trunk/; revision=74307
- Gracefully handle page faults during V86 code execution. This is a bit of a hack because with our limited use of V86 code it is unclear how a page fault can even occur.
CORE-12993 #resolve
svn path=/trunk/; revision=74305
- Make decoding of the error code more obvious in KiTrap0EHandler
- Avoid or make explicit some signed/unsigned conversions
svn path=/trunk/; revision=74304
Patch by Lesan Ilie:
- Avoid over-allocating the DEVICE_RELATIONS structure in HidClassPDO_CreatePDO
- Allocate device relations from paged pool
CORE-13052 #resolve
svn path=/trunk/; revision=74302
- Fix leaks in ExtractFile and avoid double frees from failure cases of AddFile. Patch by Serge Gautherie.
CORE-7307 #resolve
svn path=/trunk/; revision=74301
- Ensure null termination of the method name passed to AcpiEvaluateObject in Bus_PDO_EvalMethod. Spotted by ReactCoder.
CORE-13068 #resolve
svn path=/trunk/; revision=74300
Implement the undocumented AlignRpcPtr and UndoAlignRpcPtr functions used by many Rpc* functions in spoolsv according to traced callchains.
I could reverse engineer them entirely using rohitab.com's API Monitor and black-box testing.
I also add documented tests covering all cases I found out. We now pass 17/17 tests on Windows Server 2003 and ReactOS.
Also const-ify a parameter in PackStrings.
svn path=/trunk/; revision=74297
- Move device map code into a separate file.
- Create and inherit device maps instead of using a single global device map.
svn path=/trunk/; revision=74296
[SHELLMENU] -Remove second copy of CBandSite. It was originally added here to be tested in windows but now it is hosted in a proper static link.
svn path=/trunk/; revision=74293
- This will be linked to rshell in order to implement support for additional toolbars in the taskbar as well as floating toolbars.
- In the future more classes will be added in this static lib including: CISFBand (which implements a dockable toolbar that shows the contents of a shell folder), CQuickLinks (a special CISFBand), CDeskBarApp (a special CBaseBar that implements the floating host for toolbars) and perhaps more.
svn path=/trunk/; revision=74292
Addendum to r74263:
- Really only warn once in MmLockPageableDataSection/MmUnlockPageableImageSection, not on every 256th call
svn path=/trunk/; revision=74291
- This is based on the prototype I found in a sample app on codeproject. I don't really know what the unknown parameters are for but I haven't found anything yet passing different values. Almost all of the code is from the drawing code from uxtheme with the only difference that in uxtheme UXTHEME_DrawImageBackground reads several values from the theme but his takes them as parameters. I don't see any reason to spend time understanding what these are for. I found what the draw flags are for by passing different values in the test application and trying to replicate the parameters that UXTHEME_DrawImageBackground need. I decided to keep the naming like that since it is almost verbatim wine code. At some point it should be moved to win32k however.
CORE-4420
svn path=/trunk/; revision=74280
Replaced the mockup image with a more up-to-date version, and added the "source" .PSD file it was created from. Someday I'll get around to to turning this into the actual theme. Someday.
svn path=/trunk/; revision=74264
[UXTHEME] -Pass the correct parameter to PaintMenuBar. Draw the edge of WS_EX_CLIENTEDGE even if the window has a themed frame.
svn path=/trunk/; revision=74260
- Addendum to r73892: Don't free the output buffer on success in USBSTOR_SendIrp. Spotted (again) by curiousone
CORE-12970 #resolve
svn path=/trunk/; revision=74245
- Make sure to disable interrupts each iteration of the idle loop, since IdleFunction can leave them enabled.
CORE-12985 #resolve
svn path=/trunk/; revision=74235
Fixes all but 2 tests in setupapi_winetest:parser.
e8aa851 setupapi: Fix parsing of inf files containing garbage at the beginning of the file.
svn path=/trunk/; revision=74233
- CTaskSwitchWnd: Use the height of the start button as minimum height in horizontal mode.
- CTrayClockWnd: Actually process WM_THEMECHANGED message.
- CTaskSwitchWnd: Use SM_CYSIZE as the height of the buttons of the toolbar.
- CStartButton: Simplify calculating the minimum size of the button.
- CTrayWindow: Don't use IsThemeActive. Checking if OpenThemeData returned non null is enough.
svn path=/trunk/; revision=74231
Implement code to show and hide the power and volume icons in the notification area aka systray.
Control panel applications send WM_USR+220 messages to the systray window in order to show or hide an icon in the systray. The wParam parameter identifies the icon: 1=power, 4=volume. The lParam parameter indicates the new icon status: 0:show, 1:hide.
Control panel applications also send WM_USER+221 messages to the systray window in order to retrieve the current status of a systray icon. The wParam parameter identifies the icon, just like in the WM_SUER+220 messages. The lParam parameter is ignored. The return value indicates the status of the icon: 1:visible, 0:hidden.
svn path=/trunk/; revision=74225
- CTrayBandSite: Rename its constructor to CTrayBandSite_CreateInstance. Let the CTrayWindow create the CTasksBand and pass it to the constructor. Use a standard com interface to see if the tasks band was added while loading and don't use an explorer specific interface for it. Make CTrayBandSite::_Init a bit clearer.
- CTrayWindow: Implement the IOleWindow interface and create the CTaskBand before creating the CTrayBandSite. Then use standard com interfaces to get their respective HRND.
- CTaskBand: Rename its constructor to CTaskBand_CreateInstance. Remove a hack that was using its IOleWindow to act like the IOleWindow of the CTrayWindow during the creation of the CTrayBandSite. This is possible since the IOleWindow of the CTrayWindow is passed to the SetDeskBarSite method of CTrayBandSite.
svn path=/trunk/; revision=74224
- Simplify the mess with the font handling in explorer. Make it respond to changes in the system metrics and use the correct fonts.
- Make CheckTrayWndPosition resize the taskbar based on the optimal size that the rebar returns.
- Without losing my sanity (yet), I managed to make it have exactly the same size as windows explorer when I run it in windows with the classic theme.
- Themes still aren't sized perfectly. Running on ros shows lots of bugs in our common controls.
svn path=/trunk/; revision=74221
- Move Mesa 3D to "Libraries"
- Clarify what this library is for and how to use it.
- Add Czech translation.
[OPENGLCFG]
- Add Czech translation.
svn path=/trunk/; revision=74211
- Add a custom build of the Mesa 3D Graphics Library. This build contains mesa, gallium and llvmpipe. It provides an enormous performance boost over the software implementation present in opengl32.
- This is meant for platforms with missing, outdated or broken HW OpenGl acceleration.
- Thanks Daniel for helping with the Rapps stuff!
svn path=/trunk/; revision=74209
- Add a simple applet to set a custom OGL ICD or force the use of the built in software implementation.
- It can be used to set the DEBUGCHANNEL to +opengl,+wgl to make obtaining debug info more user friendly.
svn path=/trunk/; revision=74208
Disclaimer: This code is ReactOS specific and is the complete opposite of what Windows does (tm):
- Add the option to override the default OpenGL driver by a custom driver or to force the use of the built-in software implementation.
- This will allow some more flexibility when running games / apps that depend on OGL.
- This code needs a special entry in the registry so opengl32 behaves as usual by default.
svn path=/trunk/; revision=74207
- Replace ARRAYSIZE() by _countof().
- Implement parsing of days per month schedule information for the /every and /next options.
- Print days per month schedule information.
svn path=/trunk/; revision=74202
6053db9 winhttp: Fix handling of Accept headers.
c43dd19 winhttp: Add __WINE_ALLOC_SIZE attributes to heap_xxx() functions.
5b9beca winhttp: Fix some spec file entries.
542998e winhttp: Accept NULL buffer for size queries in WinHttpCreateUrl.
ec35394 winhttp: Handle EINTR from connect and poll.
613e239 winhttp: Use return value of sprintf() instead of calling strlen() and simplify code.
svn path=/trunk/; revision=74197
Implement the AT command:
- The /every and /next options are not supported yet.
- The 12 hour time format cannot be parsed yet.
svn path=/trunk/; revision=74190
- Avoid an uninitialized variable in BlpDisplayReinitialize. Patch by Victor Martinez Calvo. CID 1363648.
CORE-11692 #resolve
svn path=/trunk/; revision=74184
Implement fontview /p parameter support.
Patch by amber. Patch was slightly modified by me in order to open the print dialog automatically.
CORE-12944 #resolve #comment Thanks a lot!
svn path=/trunk/; revision=74183
- Clean up the DriverContext that was dirtied by the CSQ
The do while(0) thing feels a bit weird. I can only assume it was done so a 'break' will unlock before returning.
svn path=/trunk/; revision=74176
Indeed the RTL/NDK/whatever always explicitely uses ANSI and/or UNICODE string types where needed (and do not depend on tchar.h stuff).
It is up to the given application to explicitely specify (in its CMakeLists.txt or elsewhere) whether it wants to define UNICODE or not.
--> Fix the problem of having the UNICODE define magically being defined after including some NDK header.
[DNSAPI][USER32_APITEST]: Explicitely use UNICODE functions where needed (and as was already done in other parts of the code).
svn path=/trunk/; revision=74172
IopGetDeviceRelations:
- Use captured parameters to probe for write.
- Do not check IopInitiatePnpIrp for STATUS_PENDING.
svn path=/trunk/; revision=74167
- Allocate all of the kernel objects security descriptor and the dos devices security descriptor from the paged pool, instead of just the ACLs.
- Replace special security descriptor free routines by calls to ExFreePoolWithTag.
- Replace the TAG_OB_DIR_SD by TAG_SD.
svn path=/trunk/; revision=74157
- Draw static text elements with a transparent background, so that they acquire the correct background color of the wizard window.
- Modify the check for the header bitmap, as the header's hbmHeader is initialized also if the flag PSH_HEADER but not PSH_USEHBMHEADER is set (see function PROPSHEET_LoadWizardBitmaps).
- Add a check for header's hbmWatermark so that the watermark is drawn only when a valid bitmap handle is present.
- Fix a copy-pasta error when drawing the header's subtitle.
CORE-12912 #comment Patch for the wizard visual problem sent upstream.
CORE-12823
svn path=/trunk/; revision=74136
This should remove the unwanted 1st-chance exceptions caught when debugging Office 2010 installation, that calls from time to time lstrlen with NULL pointers.
svn path=/trunk/; revision=74119
We detect that the NULL pointer is handled separately because no exception is generated, contrary to when the function is called with truly invalid pointers.
I thank Mark for having mentioned the vectored exception handling to me, needed to catch first-chance exceptions.
svn path=/trunk/; revision=74118
Update mkisofs to schily-2017-02-16, which comes with the following fixes:
- Fix null termination in libschily's Win32 implementation of opendir (submitted upstream by me).
The bug was triggered when building an ISO from a directory instead of a graft-points (.lst) file.
- Prevent -duplicates-once from being used together with -cache-inodes. These options exclude each other.
svn path=/trunk/; revision=74112
440b921 riched20: Return proper interface pointers.
e63cea5 riched20: A spelling fix in a comment.
9f37f6a riched20: Check for NULL in fnTextSrv_TxSetText and add test.
svn path=/trunk/; revision=74108
51e1a08 inetcomm: Return S_FALSE if no data is returned in IInternetProtocol::Read.
0672bfa inetcomm: Added support for decoding quoted-printable data.
07af9d0 inetcomm: Added mhtml binding tests.
cf8e259 inetcomm: Added support for binding mhtml protocol handler.
3f644cb inetcomm: Added IInternetProtocolInfo::CombineUrl implementation.
37792a2 inetcomm: Added MimeOleObjectFromMoniker semi-stub implementation.
242cbb1 inetcomm: Added tests reading MHTML page as MIME message.
eb0bd22 inetcomm: Removed unneeded type check in init_content_type.
56dc246 inetcomm: Read content encoding from MIME header.
dec243f inetcomm: Don't include headers in data stream in create_sub_body.
3ccba10 inetcomm: Properly handle boundary in the beginning of body stream in create_body_offset_list.
9c01a94 inetcomm: Use relative seek in copy_headers_to_buf.
915acd6 inetcomm: Added support for decoding base64 in IMimeBody::GetData.
0b80666 inetcomm: Return a new instance of stream in IMimeBody::GetData.
393512d inetcomm: Don't restore base stream position in sub stream Read.
bb5056e inetcomm: Moved sub_stream_t implementation before MimeBody implementation.
a1d0c6d inetcomm: Added COM aggregation support to MimeHtmlProtocol object.
fe3e5b9 inetcomm: Added IInternetProtocolInfo stub implementation.
6832273 inetcomm: Added MimeHtmlProtocol stub implementation.
d5d9aa3 inetcomm: Register mhtml protocol handler.
svn path=/trunk/; revision=74105
- Define and use a pool tag for directory security descriptors.
- Use a custom security descriptor to create the KernelObjects directory.
svn path=/trunk/; revision=74103
818b141 gdiplus: Add support for more image color formats.
f8f0a35 gdiplus: Implement GdipInitializePalette. (v2)
973bba9 gdiplus: Ignore an externally set DC clipping region.
650b8d0 gdiplus: Ignore an externally set DC origin.
e100661 gdiplus: Add GdipCreateHBITMAPFromBitmap tests when bitmap bits are locked.
b58276a gdiplus: Reimplement GdipCreateHBITMAPFromBitmap so it can work on locked bitmaps.
5673d82 gdiplus: GpBitmap can be only locked once, get rid of numlocks field.
0eaaa15 gdiplus: Make GpBitmap->bitmapbits access thread safe.
4e685eb gdiplus: Added GdipGetCustomLineCapType().
36bb9d9 gdiplus: Fix some spec file entries.
f870708 gdiplus: Make some GdipDraw*Path() functions static.
046fc19 gdiplus: Fix memory leak in format_string_callback error path.
5018594 gdiplus: Create the FontFamily before checking for duplicates.
0d6a4b0 gdiplus: Don't include rotated fonts in the installed font collection.
svn path=/trunk/; revision=74098
23607d0 ole32: Implement returning a name in IEnumSTATPROPSTG.
5cf1db5 ole32: Support reading VT_BOOL, VT_R8 and VT_I8 into propery storage.
591c9c8 ole32: Correctly parse unicode property storage dictionaries.
93a8ede ole32: Add a __WINE_ALLOC_SIZE attribute to heap_alloc().
182fad8 ole32: Call GetClipboardFormatName with the correct parameters.
e31dd0f ole32: Use a HWND_MESSAGE window for the clipboard.
c85eaae ole32: Only trace a clipboard format name if it has one.
77e566a ole32: Don't set zero-size clipboard data, this no longer works.
svn path=/trunk/; revision=74094
e07d20f comdlg32: Don't crash if an IShellFolder could not be created.
bd1b3c1 comdlg32: Use localized "Path does not exist" string.
1707df3 comdlg32: Delay OleInitialize() until after file dialog window is created.
6c4aaf7 comdlg32: Always use original Open File dialog template.
eff2ecc comdlg32: Avoid some superfluous pointer casts.
svn path=/trunk/; revision=74092
cc055c4 comctl32: Add support for PSPCB_ADDREF/PSPCB_RELEASE callback notifications. (v2)
83cde06 comctl32/propsheet: Implement PSM_SETHEADERSUBTITLE.
ce9c06b comctl32/propsheet: Implement PSM_SETHEADERTITLE.
1a750f7 comctl32/propsheet: Add helpers to do string duplication.
14a6c98 comctl32/pager: Don't block window size changes.
a6661ba comctl32/propsheet: Added PSM_INSERTPAGE implementation.
34dd326 comctl32/propsheet: Only use header bitmap when asked for it.
6eafebe comctl32/propsheet: Force wizard header if any of pages has title/subtitle.
70c9a96 comctl32: Fix some more spec file entries.
2dd0fb8 comctl32: Correctly set the colour table for ILC_COLOR4 and ILC_COLOR8 imagelists.
a0e73a1 comctl32/syslink: Don't use exported StrCmpNIW().
970029b comctl32/toolbar: Fix TB_SETDRAWTEXTFLAGS handler.
99913e8 comctl32: Fix some spec file entries.
9d404dd comctl32/propsheet: Double size of a template buffer passed to PSCB_PRECREATE.
bb1d68e comctl32/trackbar: Fix TBM_SETRANGEMAX handling when new limit is less than current min boundary.
26067cc comctl32/toolbar: Protect from NULL pointer access in TB_GETBUTTONINFOW handler.
a6aabe0 comctl32/trackbar: Update thumb unconditionally on TBM_SETTICFREQ.
c7c8994 comctl32: Recompute the text width if necessary.
3ed6ba5 comctl32: Set the text and bkgnd colours to the default before the item pre-paint notification.
8915404 comctl32: Use wine_dbgstr_point in TRACES.
svn path=/trunk/; revision=74090
fe50dbf msi: Do not sign extend after multiplying.
c659222 msi: Fix some spec file entries.
167de42 msi: Make reg_get_{multi}sz() static.
f5e4dad msi: Fix handling of NULL buffer in MsiGetProductPropertyW() (Coverity).
3b5b3ef msi: Fix MSIREG_OpenUserComponentsKey and MSIREG_DeleteUpgradeCodesKey for Wow64.
5ac0242 msi: Correctly size packagecode as it's an unsquashed guid.
svn path=/trunk/; revision=74087
b85c2f7 rpcrt4: Fix some spec file entries.
042b41d rpcrt4: Avoid potential overflow in rpcrt4_protseq_ncacn_np_open_endpoint.
c32cd11 rpcrt4: Acquire new credential handle for each connection.
da05dfd rpcrt4: Store security package name in rpc_server_registered_auth_info.
f8450fa rpcrt4: Handle NULL binding in RpcBindingInqAuthClient{,Ex}.
svn path=/trunk/; revision=74085
- Fix pointers verification in WSALookupServiceNextW and WSALookupServiceNextA;
- In WSALookupServiceNextA: Perform extra checks to see whether we failed the first local buffer allocation, and if so, retrieve the needed size by calling a first time WSALookupServiceNextW, then reallocate the temp buffer and redo a WSALookupServiceNextW call (if it still fails, then we bail out).
CID 513448.
svn path=/trunk/; revision=74068
- Check whether WsNcLoadProvider really succeeded in loading a provider in WsNcGetCatalogFromProviderId, and return appropriate error code.
- In WsNqLookupServiceBegin, initialize CatalogEntry to NULL prior to calling WsNcGetCatalogFromProviderId, and check for success or failure of WsNqAddProvider (and fail in accordance).
svn path=/trunk/; revision=74067
- Let require explicit semicolons when using the Ws***(Un)Lock macros (and thus remove the semicolon from their definition).
svn path=/trunk/; revision=74066
CmpSecurityMethod:
- Lock and unlock the Hive and the KCB.
- Fail, if we try to access a key that has been marked for deletion.
svn path=/trunk/; revision=74060
- Support integrating Intel's DC21x4 network card driver (for Hyper-V/VirtualPC) into our ISOs until we have our own.
CORE-8724
svn path=/trunk/; revision=74055
- Make device instance paths unique if necessary (by adding the parent ID prefix), regardless of the return status from IRP_MN_QUERY_ID/BusQueryInstanceID. Support for this IRP is optional in most cases, and a failure status just indicates no instance id information is needed by the driver stack.
Major thanks to Vadim Galyant for debugging this and identifying the root cause.
CORE-12732 CORE-12818 CORE-12745 CORE-12733 CORE-12717 CORE-12735
svn path=/trunk/; revision=74053
- Use UNICODE_STRINGs in IopCreateDeviceInstancePath instead of messing around with unsafe string functions and stack buffers
svn path=/trunk/; revision=74052
Add a missing ACE(SeAliasAdminsSid / GENERIC_ALL) to the SePublicDefaultDacl ACL. This fixes a kmtest:ObSecurity failure.
svn path=/trunk/; revision=74050
Fix IopGetParentIdPrefix:
- Do not include null terminator in UNICODE_STRING::Length
- Use pool tagging
- Use strsafe printf
- Avoid a magic number
svn path=/trunk/; revision=74049
- Improve use of local variables in IopCreateDeviceInstancePath and IopActionInterrogateDeviceStack
- Improve debug prints in IopCreateDeviceInstancePath. By Vadim Galyant
- Fix formatting in IopGetParentIdPrefix
svn path=/trunk/; revision=74048
- GreGetDIBitsInternal:
- Prevent an access violation in DIB_FreeConvertedBitmapInfo by initializing the bit count before calling DIB_ConvertBitmapInfo and setting clrUsed.
- Validate input parameters and return correct values - only return number of scan lines if bits are not null and bpp is not zero. Otherwise return 1 on success.
- We now pass more gdi32:GetDIBits and gdi32:bitmap tests.
CORE-9270
svn path=/trunk/; revision=74046
- Turn the "!memcmp(ptr1, ptr2, sizeof(GUID))" into IsEqualGUID(ptr1, ptr2) macro calls (aka. make code readable);
this also allowed me to discover a logical bug in the GUID comparison in WsNcUpdateNamespaceList.
- Fix few comments, and rename some goto labels to make their meaning clearer (they are not only taken for error code paths,
but also on regular path, for cleanup before returning from the function).
CORE-12880
svn path=/trunk/; revision=74045
- Perform success checks in WsAsyncCheckAndInitThread, in particular, check whether Context is correctly allocated,
and check whether the WsAsyncThread was correctly started up. In case of failure, perform the necessary cleanup,
including calling WSACleanup().
- Check also the returned error code of WSAStartup. Fixes CID 1101934.
- Fix logic mess-up in WsNqLookupServiceNext when updating NsQuery->ActiveProvider;
- Fix copy-pasta errors (using 'lpafpProtocols' instead of 'lpcsaBuffer') in CopyQuerySetIndirectA and CopyQuerySetIndirectW,
that triggered CID 513446 + CID 513447 (CopyQuerySetIndirectA), and CID 513444 + CID 513445 (CopyQuerySetIndirectW).
- Check for 'lpdwBufferLength' pointer validity in WSALookupServiceNextW;
- Check for 'lpdwBufferLength' and 'lpqsResults' pointers validity in WSALookupServiceNextA, and dereference lpdwBufferLength only afterwards.
- Check for return value of RegCreateKeyEx in WsOpenRegistryRoot(), fixes CID 715923.
svn path=/trunk/; revision=74044
- Check for NULL pointers after HeapAlloc calls, in the constructor functions, before initializing members of created objects;
- Add a bunch of missing HeapFree in the corresponding destructor functions.
In particular, fix the root cause of CID 1401152 in WsTpDelete: missing HeapFree call.
CORE-12880
svn path=/trunk/; revision=74043
- Use IsListEmpty where needed;
- Initialize NextEntry using Catalog->ProtocolList after the lock on the catalog has been acquired;
- Rearrange WsNqLookupServiceNext to reduce the code indent level; also, convert the construct "if (var) { do { ... } while (var); }" into a mere "while (var) { ... }";
- WsNqPreviousProvider: the "next" provider is the previous one...;
- WsNqAddProvider: Use a more standard name for the boolean return value;
- Fix the annotation of MapUnicodeQuerySetToAnsi;
- Factor out setting the SetLastError WSALookupServiceBeginA.
svn path=/trunk/; revision=74041
[USETUP] Add Font Substitutions for Franklin Gothic and MS Trebuchet CORE-12878 CORE-12877
Now Luna uses better fonts but the font styles are still not used.
svn path=/trunk/; revision=74040
- Always set the default value in SetDefaultHandler, otherwise it's impossible to create a default association if the key for some reason already exists. This is consistent with what Windows does.
svn path=/trunk/; revision=74039
Fix size checking for IOCTL_DISK_GET_DRIVE_GEOMETRY_EX, and only copy what's possible to fit in the buffer.
Also, make the code a bit more readable.
CORE-12858
svn path=/trunk/; revision=74027
Fix unbootable system after recreating the boot partition
Patch by Wim Hueskens.
CORE-11232 #resolve #comment Thanks a lot!
svn path=/trunk/; revision=74019
Implementation of the install button.
Patch by Baruch Rutman.
Fixes by Eric Kohl.
CORE-7355 #resolve #comment Thanks a lot!
svn path=/trunk/; revision=74006
- Capture the ObjectFlags to be set in a local variable,
- Then copy its contents in the mem area pointed by pvInformation *under the SEH block*! This allows:
* protection if pvInformation is an invalid pointer;
* avoid to run the "RtlCopyMemory(pvInformation, pvData, nDataSize);" afterwards with pvData == NULL.
svn path=/trunk/; revision=74005
07e3181 wininet: Fix some spec file entries.
725b55d wininet: Get rid of no longer needed INTERNET_INVALID_PORT_NUMBER in get_server.
0d22e43 wininet: Handle INTERNET_INVALID_PORT_NUMBER in HttpOpenRequest.
8c39694 wininet: Changed usage of UrlEscapeW to fit winapi behavior.
b3d12a1 wininet: Canonicalize URL in HttpOpenRequest.
47ff954 wininet: Use return value of sprintf() instead of calling strlen() and simplify code.
svn path=/trunk/; revision=74000
Define the language specific keyboard layout first. The US keyboard layout should always be the last one (aka fallback). Other languages will probably need the same fix!
CORE-10064 #resolve
svn path=/trunk/; revision=73996
Missing italian translations in ReactOS.
CORE-9725 #resolve #comment Thanks a lot for making this mess! Please don't ever reopen this task again! Create a new one instead!
svn path=/trunk/; revision=73993
455f5f2 xmllite: Handle char references within text nodes.
33d8a32 xmllite/reader: Handle NULL node type argument in Read().
1ed0631 xmllite/reader: Handle NULL argument in GetNodeType().
dcf1469 xmllite: A spelling fix in a comment.
f900879 xmllite: Hr was uninitialized in error path (Coverity).
831c202 xmllite: Add maintainer entry.
682d4f1 xmllite: Allow prefixed element names.
9b98d69 xmllite: Fix setting local name when parsing QName.
20c575e xmllite: Improve GetValue() for namespace definition nodes.
13afa65 xmllite: Implement GetNamespaceUri().
249b7a9 xmllite: Free prefix and local name too when clearing element list.
585735a xmllite: Update prefix when moving to first attribute.
0575a4b xmllite: Use a helper to move to first attribute to avoid extra traces.
65ee2b7 xmllite: Keep namespace list updated when going through document tree.
18d6def xmllite: Keep a list of namespace definitions.
635c409 xmllite: Store prefix for elements.
f185dd5 xmllite: Store empty element fields separately.
a39251b xmllite: Improve writer methods tracing.
65cbc12 xmllite: Parse URLs in `DOCTYPE PUBLIC` DTDs.
svn path=/trunk/; revision=73989
9743328 wldap32: Add an error message and an explanation for the lack of error constants.
c7e46b7 wldap32: Use return value of sprintf() instead of hardcoding the number of written characters.
svn path=/trunk/; revision=73983
5e23535 wbemprox: Add DriverDate for Win32_VideoController.
f9321fa wbemprox: Add InstalledDisplayDrivers for Win32_VideoController.
df6e20e wbemprox: Add Status for Win32_VideoController.
9a2a366 wbemprox: Add ConfigManagerErrorCode for Win32_VideoController.
af7e5f7 wbemprox: Provide DeviceID, Location and PortName for printers.
92168c4 wbemprox: Add a partial implementation of Win32_IP4RouteTable.
d11a07e wbemprox: Don't define USE_WS_PREFIX on MinGW.
f2c0054 wbemprox: Only include matching rows in the table row count.
a254572 wbemprox: Return the machine ID for Win32_ComputerSystemProduct.UUID on Linux.
9842bf3 wbemprox: Return a non-null UUID for Win32_ComputerSystemProduct.UUID if nothing better is available.
b05928a wbemprox: Implement Win32_PhysicalMemory.MemoryType.
710abd6 wbemprox: Implement Win32_OperatingSystem.TotalVirtualMemorySize.
svn path=/trunk/; revision=73979
Add a generic processor driver that does nothing but provide a proper CPU device name (FriendlyName) to the registry.
CORE-5960 #resolve
svn path=/trunk/; revision=73967
e2a4974 quartz: Downgrade FIXME->WARN.
c6a4811 quartz: Clean up another trace for consistency.
ff36b5c quartz: A couple of spelling fixes in comments.
ac59a68 quartz: Don't write past end of d3d9 buffer.
478feea quartz: Keep This/iface order in TRACEs for consistency.
97405fc quartz: Add tests for IBasicVideo.
5cdb0b5 quartz: Use wine_dbgstr_longlong() to trace REFERENCE_TIME.
89d4e14 quartz: Take MP3 padding bit into account when calculating the block size.
svn path=/trunk/; revision=73938
7603e85 dplayx: Don't print an error when no Lobby Providers are found.
7ae50b2 dplayx: Fix multiple assigments to the same lvalue (coccinellery).
svn path=/trunk/; revision=73936
f921b63 dinput: Do not wait for hook thread startup in IDirectInput8::Initialize.
f9b4be5 dinput: Allocate correct amount of memory in IDirectInput8AImpl_EnumDevicesBySemantics.
04bddb6 dinput: Give correct count of devices still to be enumerated.
8339de0 dinput: Simplify JoystickWImpl_Unacquire for Linux.
27f4568 dinput: DISFFC_RESET will not release the effects.
2d2d833 dinput: Downgrade a FIXME to WARN in JoystickWImpl_SendForceFeedbackCommand.
cc37322 dinput: Fix GetEffectStatus for Linux when effect was not downloaded.
6bb2c4c dinput: Skip events that are not useful currently.
49d4261 dinput: Spelling and case fixes in comments.
svn path=/trunk/; revision=73934
a663fe94 cabinet: Set index of folder in FDICopy callback.
1f7d144 cabinet: Make Extract fail on read-only files.
af86bdc cabinet: Make Extract overwrite existing files.
3273dff cabinet: Properly initialize internal fci structure (Valgrind).
svn path=/trunk/; revision=73929
- Avoid a crash in IoFilesystem on Windows when using a free kernel with ntfs. Querying FileAllInformation with any size below sizeof(FILE_ALL_INFORMATION) is considered illegal, so only do it on checked builds (which have a size check).
svn path=/trunk/; revision=73921
Spotted with kmtest:IoFilesystem: these checks are not performed in free builds for kernel callers and are delegated to the FSD.
svn path=/trunk/; revision=73920
- We do support sleep states (namely, S5), so don't force aborting sleep transitions. Fixes ACPI shutdown broken by r73918.
CORE-12833
svn path=/trunk/; revision=73919
Add Gecko Engine which can only be installed once during 1st stage, because someone thought this was a good idea. Now you can get it later, too.
svn path=/trunk/; revision=73916
- Implement CM_Get_Class_Registry_PropertyA().
- Move mapping of poperty type to registry value type into a separate function and use it in CM_Get_Class_Registry_PropertyA(), CM_Set_DevNode_Registry_Property_ExA() and CM_Set_DevNode_Registry_Property_ExW().
svn path=/trunk/; revision=73904
- Adding support for multiple font formats (including collections)
- Choosing a font based on weights as documented
- Adding support for loading fonts from memory
- Share font faces
- Emulation of Italic and Bold
- Support for Underline and Strike-out
- Localized font names
- Fix GetFontResourceInfoW
- Fix Registry settings
- Fix multiple font properties
svn path=/trunk/; revision=73900
- (Fix) Check for integer count overflow (per Thomas suggestion),
- (Hack#1) Signal the particular calling case (where pwc == NULL == pgi and cwc == 0), as discovered by the testcase of r73894,
- (Hack#2) Return error when cwc == 0 alone (triggered by e.g. Word 2010).
svn path=/trunk/; revision=73895
The particular case "GetGlyphIndicesW(hdc, NULL, 0, NULL, 0)" is used by Word 2010 (and other apps) when opening the font combolist, and seems to be undocumented.
CORE-12825
CORE-6621 CORE-12279
svn path=/trunk/; revision=73894
Fixes some FIXMEs in the code encountered while investigating the origin of "err: NtUserSetWindowPos bad window handle!" messages.
Reviewed by James Tabor.
CORE-12819
svn path=/trunk/; revision=73889
- Prevent a null to be passed to UserDereferenceObject in UserSetCursorIconData. CID 1321971
- Make the status check in co_IntCallSentMessageCallback less useless. CID 1322014
- Prevent a null pointer dereference in a trace in IntCreateClass. CID 514617
svn path=/trunk/; revision=73879
- Consider the return value from IntFillArc in IntArc. CID 1237076
- Remove an useless check in ENTRY_ReferenceEntryByHandle CID 731587
- Prevent an unlikely memory leak in PATH_WidenPath. CID 716634
- Minor cleanup.
svn path=/trunk/; revision=73878
- Fix a possible null pointer dereference in GetGlyphOutlineA. CID 513747
- SetDIBits should not accept null bitmap info at all. CID 513425
- Don't set the pdwResult pointer itself to null in TADC_GetAndSetDCDWord. CID 1321970
svn path=/trunk/; revision=73877
- If an appication hangs other than suspended use Hung test to prevent locking the whole system. Quick fix for CORE-10078.
svn path=/trunk/; revision=73876
This is not a problem on Wine, because they run on Linux distributions, most of which have Samba available. But this is not the case on Windows / ReactOS, so few adaptations were needed: in the dispatcher.c code, the fork_helper function was partially rewritten around CreateProcess to start the ntlm_auth utility (I try to use maximally the CRT to not have to rewrite other functions). This works great.
But then, to make this NTLM layer working on ReactOS, one has to find a Windows build of Samba. Here is one: http://smithii.com/samba . This is a Samba 3.0.23c build. You need to follow *exactly* the manual installation steps to make it work (actually, everything up to "Step 6" included, i.e. running smbsetup.cmd). This means in particular to copy Samba into C:\Program Files\samba, as this path is also hardcoded into the executables.
As the Wine's NTLM layer expects Samba 3.0.25+, I manually downgraded the expected version, which appears to still work nice for the needs of Office 2010 installation.
You can now play with it and try to install Office 2010.
CORE-12601 #comment Wine's NTLM layer committed in r73868 as an interim step towards a proper implementation.
CORE-12279
svn path=/trunk/; revision=73868
- Don't try to delete the pattern bitmap in UserInitialize.
- Set the correct owner before deleting the update region in co_UserFreeWindow.
- Fixes some "Trying to delete global object" debug prints.
svn path=/trunk/; revision=73855
- Avoid a potential double free in InitializePrintMonitor2. CID 1401299
- Avoid a use after free in LocalmonClosePort. CID 1401298
svn path=/trunk/; revision=73835
Modify ReadVolumeLabel() so that it is able to read the volume label, even without using the VCB, the root FCB, Cc, the universe.
This is important, because in case of device verifying, you cannot rely on these elements anylonger, but you need to read the label.
A readme has been attached to the function, to indicate how to call it (I wish I could have put more asserts!). It's ugly, I know.
This allows fixing a FIXME in VfatVerify(): we can also check the volume label for FATX volumes.
The FIXME comment was misleading: MS FastFAT doesn't make any checksum or whatever of FAT root. Let's not do it.
svn path=/trunk/; revision=73830
- Make the "Open with" dialog start in Program Files as is done in Windows (doesn't really changes anything because comdlg32 doesn't expand environment variables).
svn path=/trunk/; revision=73823
Generalize the usage of functions pointers for FatX vs Fat specific code (direntry).
This should also help speeding up FastFAT.
svn path=/trunk/; revision=73822
In the FCB, get rid of the FCB_IS_FATX_ENTRY flag. It makes no sense to have it on each and every file as the VCB already has such flag
svn path=/trunk/; revision=73821
More FastFAT cleanup.
Except a light performances boost due to useless checks removal in read/write and to some functions inlining
More to follow...
svn path=/trunk/; revision=73819
- The pattern bitmap can get deleted during the GDI cleanup for process before the brush itself.
- Gets rid of some of those pesky "GreDeleteObject: Trying to delete invalid object" debug prints.
svn path=/trunk/; revision=73812
- Use the official libtiff 4.0.3 def file to determine exported functions (instead of exporting everything in GCC builds, nothing in MSVC builds)
- Remove unused ROS-diffs
CORE-6898 CORE-12275
svn path=/trunk/; revision=73811
- Addendum to r73626. Convert the print specifiers too so that ping doesn't only output the old specifiers themselves.
svn path=/trunk/; revision=73810
-Fix a couple of cases where we use the versioned class atom instead of the non versioned one.
[USER32]
- Add support for versioned classes in RegisterClassExWOWW, GetClassInfoExW, GetClassInfoExA, UnregisterClassA, UnregisterClassW, and User32CreateWindowEx
- Make ClassNameToVersion return the name of the versioned class and the library name that implements it while preserving a hack that lets user32 know which classes are registered by comctl32 (this is needed because the default activation context doesn't contain the non versioned classes yet).
- Make VersionRegisterClass to load the specified library and make it register its classes which is used when the class is not registered yet but its manifest is active.
svn path=/trunk/; revision=73806
- Add and install a manifest for comctl32 version 5.82.
- Since our comctl32 tries to imitate both version 5 and version 6, register its classes twice, once while having the version 6 manifest active and once when having the version 5 active.
- Register the themed versions of the built in controls while having the version 6 manifest active (and register them as global classes). This breaks theming of built in controls until versioned classes get implemented.
- Do not try to subclass the dialog class. This is incorrect and can lead to problems like in CORE-8534, CORE-12727, CORE-8387. This removes the background texture of the themed tabs which will be implemented in the future in uxtheme using api hooks.
This breaks a great deal of theming but keep in mind that it is in the middle of a transition to have them implemented correctly without the terrible side effects (broken ansi conversion, not always using themes for built in controls. However comctl32 is now ready for versioned classes to be enabled.
CORE-12285
svn path=/trunk/; revision=73803
[BOOTLIB]: Correctly bias access to GDT/IDT registers by 2 bytes since this is a 48-bit instruction. The loaded GDT/IDT was previously invalid and causing random GPFs.
[BOOTLIB]: Fix EfiStall in protected mode. It was previously not stalling.
[BOOTLIB]: Fix calculation in MmMapPhysicalAddress
[BOOTLIB]: Fix missing goto in MmSelectMappingAddress which broke the function in real mode.
[BOOTLIB]: Fix incorrect ranges in MmSelectMappingAddress.
[BOOTLIB]: Fix incorrect offset calculation in MmSelectMappingAddress.
Now hitting (as expected), unimplemented virtual code path in BlMmMapPhysicalAddressEx.
svn path=/trunk/; revision=73801
[BOOTLIB]: Implement MmSelectMappingAddress and fix its prototype.
[BOOTLIB]: Implement MmPapPageAllocatorExtend and fix MmPapAllocatePagesInRange to use it.
We are trying to choose VA 0 for PA 0x8000 and currently fail due to conflicts. TBD.
svn path=/trunk/; revision=73797
PNP_GetDeviceList and PNP_GetDeviceListSize:
- Do not return CR_CALL_NOT_IMPLEMENTED by default.
- pulLength is counted in characters, not in bytes!
- Use the correct Relations value for PowerRelations.
[NDK]
Add the PowerRelations value to a comment.
[DEVMGR]
CM_Get_Device_ID_List_Size_ExW and CM_Get_Device_ID_List_ExW count the buffer length in characters, not in bytes!
svn path=/trunk/; revision=73796
In order to make VfatVerify() work on something else than floppies, ask for change count when issuing IOCTL_DISK_CHECK_VERIFY
svn path=/trunk/; revision=73793
- Fix a possible null pointer dereference. CID 731448
- Check string length before copying into a fixed size buffer. CID 515207
- Bail out of _CmdWndProc if keyPath is null. CID 1102164
- Use strsafe functions. CID 1102477
svn path=/trunk/; revision=73776
- Patch by Dmitry Timoshkov : Fix groupbox rectangle calculation in the button's WM_SETTEXT handler. BUTTON_CalcLabelRect should use the button font. Otherwise WM_SETTEXT handler gets wrong rectangle to erase an old text.
- Fixes CORE-12464.
svn path=/trunk/; revision=73768
- Attempt to speed up loading and displaying logs in EnumEventsThread:
- Rewriting the code fix an infinite loop that could happen under low memory conditions (this potentially speeds things up quite a lot).
- Remove ListView subclassing - sorry Hermès but not only it keeps constantly redrawing under Windows but also adds too much overhead.
- Don't read the event log records one by one but in chunks of roughly 0x7ffff bytes (maximum size allowed).
- Use poor man's "caching" of the event user name (optimizing/caching rest of the stuff in the loop didn't yield any significant speed up).
Result: Loading ~40000 records under Win7 went from 4.5 minutes to 65 seconds.
svn path=/trunk/; revision=73749
[BOOTLIB]: Implement MmPapAllocatePagesInRange when virtual memory is being enabled.
What's left now is implementing extension for the PA allocator when VM is enabled.
svn path=/trunk/; revision=73742
- Fix some DPRINTs;
- Add parameter validation in CreateUserProfileExW;
- Return the directory path of the created profile in CreateUserProfileExW, if the user wants it;
- Add value type validation for RegQueryValueExW calls;
- Use ARRAYSIZE where needed;
- Add parameter validation in GetAllUsersProfileDirectoryA, GetDefaultUserProfileDirectoryA;
- Correctly return error code in GetAllUsersProfileDirectoryW, GetDefaultUserProfileDirectoryW, GetProfilesDirectoryW and GetUserProfileDirectoryW. Should fix the userenv_apitest:GetProfileDirs tests.
svn path=/trunk/; revision=73737
[BOOTLIB]: Implement Mmx86MapInitStructure and most of Mmx86InitializeMemoryMap.
[BOOTLIB]: Continue implementation of MmDefInitializeTranslation.
[BOOTLIB]: More explicitly mark paths which are not yet implemented for paging mode yet (but only on compilers that don't give compiler errors when trying to use __FUNCTION__.
svn path=/trunk/; revision=73734
Take the volume label into account when comparing the FAT volumes in case of a verify.
This helps avoiding remounting every removable device on verify. Current hack is only kept for FATX volumes for now.
svn path=/trunk/; revision=73733
- Remove old file comment header (the code license is already present in COPYING in the main directory);
- Fix DPRINT;
- Use new-style annotations for exported APIs.
svn path=/trunk/; revision=73728
[SVCHOST][WINLOGON][LSASRV][SAMSRV]: Use the SDK-defined constant RPC_C_PROTSEQ_MAX_REQS_DEFAULT instead of hardcoding its value in the RpcServerUseProtseqEpW calls.
svn path=/trunk/; revision=73726
[BOOTLIB]: Implement EfiAllocatePages, EfiFreePages for Protected Mode.
[BOOTLIB]: Fix a "Todo" in MmFwGetMemoryMap: We now free the EFI buffer used for the memory map itself, and unmap it from the memory map (which would show it as 'in-use' while we're dumping it).
svn path=/trunk/; revision=73722
[BOOTLIB]: Hack EfiPrintf temporarily so we can get print outs even in "Protected mode".
[ROSLOAD]: Begin implementation. First, many bootlib fixes needed.
svn path=/trunk/; revision=73720
[BOOTLIB]: Fix bug in MmMdFindDescriptorFromMdl.
[BOOTLIB]: Implement MmFwFreePages.
[BOOTLIB]: Implement most of MmPapFreePhysicalPages. The rest is coming next.
[BOOTMGR]: Add test for alloc/free.
svn path=/trunk/; revision=73716
- Modify the VfatHasFileSystem() so that it allows a DO_VERIFY_VOLUME override, when required
- Fix the implementation of VfatVerify() so that it actually really does the job it's supposed to do:
- it will now use the appropriate DO for verification (lower DO and not volume DO)
- it will properly clear the DO_VERIFY_VOLUME flag
- Introduce a hack in VfatVerify() so that in case of removal media, if FATInfo is the same, it forces a dismount
Effects of this commit:
- It properly fixes CORE-9988. That means if a FAT media changes, now FastFAT properly handles it, and does not go to a code path producing (expected!) BSODs
- The hack introduces a hacky way to make ReactOS remount FAT floppies when changed
In short, changing FAT floppy in ReactOS doesn't make it BSOD any longer.
CORE-9988
svn path=/trunk/; revision=73709
- Don't fall through to the default label. CID 515166
[NTUSER]
- Fix a copypasta.
[USER32]
- Fix computing of HKL for layouts with Layout id.
- Don't call NtUserLoadKeyboardLayoutEx with bogus keyboard layout id.
- Ideally LoadKeyboardLayout should return the default system layout on failure - to be continued.
svn path=/trunk/; revision=73708
-CExplorerBand: Commit the last part of the work submitted by Sylvain Deverre. Sorry for not committing all this time. Unfortunately some parts were changed and some parts don't work well and we need to debug it a bit.
CORE-10838
svn path=/trunk/; revision=73706
- Implement View tab in Folder options dialog.
CORE-12540
Patch by Katayama Hirofumi MZ with a tiny improvement by me to refresh explorer in a better way.
svn path=/trunk/; revision=73703
- remove logically dead code in SetupDiGetClassImageIndex, CID 500046
- prevent null pointer dereference in SetupDiGetClassDevPropertySheetsA, CID 500676
- use strsafe functions in SETUP_CreateDevicesListFromEnumerator, CID 514263
- fix a check and adjust the logic in SetupDiLoadClassIcon to remove dead code and possible null pointer dereference CID 1250279, CID 1250287
svn path=/trunk/; revision=73669
- Fix a(n) (im)possible buffer overrun. Just a defensive measure in case some future work on calc would trigger this. CID 716050
svn path=/trunk/; revision=73668
- Check for failure when calling SetupDiGetActualSectionToInstallW so we don't pass garbage to SetupInstallFromInfSectionW. CID 715920
svn path=/trunk/; revision=73663
[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
- 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
- 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
- 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
- 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
* 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
- Add missing checks for allocation failure in DetectSerialPointerPeripheral and DetectPS2Mouse. Patch by Serge Gautherie.
CORE-12623
svn path=/trunk/; revision=73608
- 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
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
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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
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
[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
- 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
- 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
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
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
- 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
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
- 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
When selecting any FAT filesystem on format dialog, uncheck & disable compression control. It's not supported by this FS.
svn path=/trunk/; revision=73512
- 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
- Implement LsaEnumerateTrustedDomains and LsaEnumerateTrustedDomainsEx.
- Mark LsaGetRemoteUserName and LsaLookupPrivilegeDisplayName as implemented.
svn path=/trunk/; revision=73494
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
- Patch by Katayama Hirofumi MZ : DrawFrameControl draws bad, correct centering while drawing radio buttons. See CORE-12573.
svn path=/trunk/; revision=73471
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
- 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
- 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
- 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
[NTDLL][ADVAPI32]: Improve the prototypes for EtwReceiveNotificationsA/WmiReceiveNotificationsA and EtwReceiveNotificationsW/WmiReceiveNotificationsW.
svn path=/trunk/; revision=73427
- 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
- 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
[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
- 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
- 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
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
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
- 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
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
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
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
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
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
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
- 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
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
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
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
- 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
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
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
- 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
- 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
- We require automatic generation of phony targets for now. Set the corresponding CMake 3.3+ policy (CMP0058).
CORE-12373
svn path=/trunk/; revision=73219
- 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
- In C, void functions should better have 'VOID' mentioned in their prototypes.
- Simplify GetCurrentTimeInSeconds code.
svn path=/trunk/; revision=73205
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
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
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
- 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
- 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
- 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
- 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
[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
- 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
- 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
- SHOpenFolderAndSelectItems: Take into account buggy applications like firefox that like to pass full pidls in a PCUITEMID_CHILD_ARRAY.
svn path=/trunk/; revision=73160
- 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
- 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
- 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
- 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
- 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
- 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
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
- 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
- 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
- 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
- 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
- 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
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
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
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
- 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
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
- 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
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
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
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
- Leave Dialog Procedure calls protected with SEH, the same as windows.
- See CORE-12182, CORE-12111 and related issues.
svn path=/trunk/; revision=73088
- 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
[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
- 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
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
- 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
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
- 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
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
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
- 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
[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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
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
- 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
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
- Acquire Paging IO Resource shared when performing paged writes
Greenlighted by Pierre and tests.
CORE-12184 #resolve
svn path=/trunk/; revision=72987
- 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
This makes all the kernel32_apitest:SetConsoleWindowInfo tests pass now.
Also, notify the console window about the size change.
svn path=/trunk/; revision=72984
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
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
- 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
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
- 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
- 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
- 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
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
- 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
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
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
- 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
- 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
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
- 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
- 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
- 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
- Acquire ProcessLock before accessing a process's thread list in NtQuerySystemInformation/SystemProcessInformation. Patch by Volodymyr Shcherbyna.
CORE-12001 #resolve
svn path=/trunk/; revision=72873
- 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
- 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
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
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
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
- Avoid an unintended fall-through and document and intended one in DownloadProgressProc. CID 1341273 (rapps), 1363531 (rapps_new)
svn path=/trunk/; revision=72848
- 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
- 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
- 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
- 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
- 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
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
- 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
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
- 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
- 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
- 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
- HCR_GetFolderAttributes already calls GetAttributesOf when needed, calling it when it is not needed can lead to crashes.
svn path=/trunk/; revision=72769
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
- LsaRegisterLogonProcess: Wait for the LSA_AUTHENTICATION_INITIALIZED event.
- LsaDeregisterLogonProcess: Use ZwClose to close the port handle.
svn path=/trunk/; revision=72756
Open/Create and set the \\SECURITY\\LSA_AUTHENTICATION_INITIALIZED event after the LsaAuthenticationPort has been created.
svn path=/trunk/; revision=72755
- 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
LsaRegisterLogonProcess: Do not wait for \\SECURITY\\LSA_AUTHENTICATION_INITIALIZED to get signaled as it breaks the boot.
svn path=/trunk/; revision=72753
[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
- 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
- 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
[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
- 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
- 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
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
- Avoid IRP allocation failure in IopDeleteFile and IopCloseFile. Based on a patch by Volodymyr Shcherbyna.
CORE-11959
svn path=/trunk/; revision=72682
- 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
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
- 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
- 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
- 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
RtlGenerate8dot3Name: show that we don't deal correctly with checksums while generating short names.
Dedicated to Christoph
svn path=/trunk/; revision=72666
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
Fix lock/unlock order in SeLockSubjectContext/SeUnlockSubjectContext.
Patch by Volodymyr Shcherbyna.
CORE-11966 #resolve #comment Thanks a lot!
svn path=/trunk/; revision=72644
- 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
- Fix Path issues, Sync/Port wine. See CORE-4990 (Fill Path painting?), CORE-9612 (Fixed) and CORE-11916 (Fixed). Maybe more.
- Pen width might be related to another issue outside Path. See CORE-2527.
svn path=/trunk/; revision=72625
- Gracefully handle NULL clipbrd in clipbrd_wndproc. This is probably not the right fix, but avoids crashing for now.
CORE-11905
svn path=/trunk/; revision=72622
- Use ExAcquirePushLockShared instead ExAcquirePushLockExclusive (and move it outside enumeration)
- Don't leave a enumeration at ReqSize > Size. It is used for calculation of the size
- ObjectHeader->Type field currupted and I do not know who spoils it. Commented.
- Remove unneeded SEH
svn path=/trunk/; revision=72608
- We can now swap the 2k3 fltmgr with ours and successfully boot windows, so we can use the same name from here on.
- Start type is still demand as I've not done too much testing in ros, but it seems to be boot and run fine, so can be changed to boot start for anyone wanting to experiment a bit.
svn path=/trunk/; revision=72597
- Set correct major and minor versions
- Update the cmakelist file
- Export FltRegisterFilter and FltUnregisterFilter
- Minor cleanup
svn path=/trunk/; revision=72596
- Add stubs for context registration
- Add dispatch and device control handlers
- Implement the load IOCTL. We can now load minifilters with 'fltmc load <myfilter>'
svn path=/trunk/; revision=72595
- Properly handle requests that were sent directly to the fltmgr instead of sending them down the stack
- Add a separate callback for IRP_MJ_DEVICE_CONTROL and forward them on to an internal handler
- We can now open a handle to the fltmgr and send IOCTLs down to it.
svn path=/trunk/; revision=72593
- On load, open a handle to fltmgr, not the target driver...
- Fixup the load data we send to the fltmgr to be the same Windows layout. We need to copy this interface to allow component sharing between windows and ros.
- Move IOCTLs to shared header
svn path=/trunk/; revision=72591
- SdbGetMatchingExe, SdbInitDatabase partial implementation by Mislav Blažević
- Tests by me, they pass on vista - win10. (Win2k3 has another struct layout)
- Move shared test functions to a common header
- SdbTagRefToTagID misses functionality related to multiple databases, but that is not supported anywhere yet.
svn path=/trunk/; revision=72549
- The order of operations is changed
- Added check on availability of a '.' with a length of name of 8 and more characters (In 8.3 filename has to be a '.')
- Lead DBCS cannot precede the end of a filename
* Fixes 90 tests for kmtest FsRtlLegal
svn path=/trunk/; revision=72539
- ConvertBitmapInfo returns value of the cjInfoSize variable. We should not ignore this value. Checks are added
- The call of CalculateColorTableSize is not necessary, its value was already returned by ConvertBitmapInfo.
* Fixes 9 tests for gdi32_apitest CreateDIBitmap
svn path=/trunk/; revision=72534
- Better report kernel stack (real back traces for all threads!)
- Support reporting loaded libraries (== drivers, hal, etc.). You can even debug KDGDB inside KDGDB :-)
- A few improvements here and there
CORE-8531
svn path=/trunk/; revision=72533
- Use ProbeForRead instead ProbeForWrite (ProbeForWrite is a behavior which was in win2000)
- Set returned length after checking buffer size (ntdll_apitest NtQueryInformationProcess has tests only for ProcessTimes, but I checked other cases and always Length is set after check of the size)
* Fixes 4 tests in ntdll_apitest NtQueryInformationProcess (all NtQueryInformationProcess tests passed now)
svn path=/trunk/; revision=72532
- Show our URLs using https.
- Add a "FAQ" section to point to the corresponding website URL; feel free to improve the section!
svn path=/trunk/; revision=72527
- Patch by Sebastian Lackner : Do not block sending/posting WM_NOTIFY messages.
- Sync/Port : Fix more msg:msg_queue:test_notify_message results.
svn path=/trunk/; revision=72525
- Patch by Sebastian Gasiorek : Fix incorrect placement of the text in the Tab buttons. Implement TA_UPDATECP. See CORE-1578 and CORE-11415.
svn path=/trunk/; revision=72521
Chain-4 addressing isn't really the same as packed-pixel addressing.
Also, fix a bug in the optimized odd/even mode reading code.
svn path=/trunk/; revision=72514
- Failure if does not come to an end a way with a symbol '\' (exception - a path of a looks like 'C:')
* Fixes 2 tests for kernel32_apitest GetDriveType (all tests for GetDriveType passed now)
svn path=/trunk/; revision=72512
- Initialization of a string before obtaining information
* Fixes 2 tests for kernel32_apitest GetComputerNameEx (all tests passed now)
svn path=/trunk/; revision=72511
- The Condition parameter every time is compared to VER_EQUAL, but does not change thus. This behavior wrong. We have to receive new Condition every time
* Fixes 7 tests in kernel32_winetest version (all tests passed now)
svn path=/trunk/; revision=72509
- Blocking of the user buffer before obtaining information
- Use of ObpGetHandleObject macro for receiving ObjectHeader
- Remove duplicate NULL pointer check for HandleTableEntry
svn path=/trunk/; revision=72506
Our kernel32.lib already exports all of the console API and in particular the console history API, so we can directly link doskey against it and use them, instead of delay-loading at runtime. We just need to add their prototypes in the source code since they are not declared by wincon.h by default.
svn path=/trunk/; revision=72504
Don't forget to adapt the console attaching code to the new transposed video
memory, and certainly don't forget to make sure the ScanlineSizeLatch and
StartAddressLatch have the correct values before calling VgaVerticalRetrace.
svn path=/trunk/; revision=72498
- Shuffle parameter chacks in NtMapViewOfSection to make kmtest pass more of them
- Restore previously lost check on ZeroBits against 21. Use the architecture specific define
- Better check for ZeroBits and ViewSize
svn path=/trunk/; revision=72497
- Do not mask exceptions from WndProc. If this makes programs crash, fine, fix it, but DON'T HIDE BUGS.
- Use a wrappper (like wine does) to handle procs with bad calling conventions
ROSTESTS-155 : Please retest, user32 got in the way and masked the exception handler the wine test installed
svn path=/trunk/; revision=72495
- Properly chain events when reading a page from disk, aka don't wait on events allocated on the stack of another thread
- Use proper type pointers, compilers sometimes help making things right
svn path=/trunk/; revision=72493
- Use ExpLookupHandleTableEntry function for enumerate handles of process
- Filling handle information
- Setting ReqSize value before check of the size
* Fixes 2 tests ntdll_winetest info
svn path=/trunk/; revision=72491
- Implement IS_TEXT_UNICODE_ILLEGAL_CHARS and IS_TEXT_UNICODE_ASCII16 flags
* It fixes 7 tests for the IsTextUnicode function in advapi32_apitest. All tests passed now
svn path=/trunk/; revision=72486
- Return the correct pointer when handling TargetDeviceRelation, and avoid unnecessarily allocating from NonPagedPool. Patch by Vardan Mikayelyan, merged from r72376.
svn path=/trunk/; revision=72485
- Implement IS_TEXT_UNICODE_REVERSE_ASCII16, IS_TEXT_UNICODE_REVERSE_STATISTICS flags
- Fix IS_TEXT_UNICODE_STATISTICS
* It fixes 2 tests for RtlIsTextUnicode function. Now all rtlstr in winetest are passed successfully
svn path=/trunk/; revision=72476
Update the PCI hardware IDs database. Extracted from the pci.ids database from http://pci-ids.ucw.cz/ from 2016-08-26 03:15:02
Maintained by Albert Pool, Martin Mares, and other volunteers from the PCI ID Project at http://pci-ids.ucw.cz/.
CORE-11903 #resolve
svn path=/trunk/; revision=72475
Properly implement the vertical retrace interval. The starting address and the
scanline size are calculated at the start, and the actual update is performed at
the end. This allows software to change the pixel panning and some other
parameters during the vertical retrace.
Also, normalize the CRTC register names.
svn path=/trunk/; revision=72474
- Keep the control area as being created through the whole creation process in MmCreateArm3Section
- Use the segment length to find a suitable place for SEC_BASED sections
- Properly remove the global section node when deleting a based section
CORE-11900 #resolve
svn path=/trunk/; revision=72472
- Fix ZeroBits check in NtMapViewOfSection
- Implement handling MEM_DOS_LIM AllocationType
This fixes all but a few NtMapViewOfSection (due to some temp file not being removed) wine tests + tests from 72468
svn path=/trunk/; revision=72469
- Add a ugly and grotesque hack to give "o" back to RtlAssert so that we actually break on ASSERTs
- Check for the breakpoint instruction for deciding when to move forward the ProgramCounter. This is OK since KD removes all breakpoints set when hitting a soft BP
svn path=/trunk/; revision=72467
Implement the extended wrapping control (64 KB / 1 MB).
Transpose the video memory so that it corresponds to chain-4 and packed-pixel
modes. This allows us to optimize video memory access, since the majority of all
SVGA modes are packed-pixel. Only VgaReadMemory has been optimized so far.
svn path=/trunk/; revision=72464
Japanese translations for the following libraries: browseui, credui, ieframe,
iernonce, msports, msvfw32, mycomput, oleacc, samsrv, serialui, shimgvw, and
wldap32.
Patch by Katayama Hirofumi MZ. Thanks!
CORE-11884 #resolve #comment Committed in revision r72452.
svn path=/trunk/; revision=72452
- Remove invalid "ServiceType" registry value of the MPU401 driver.
- Fix MUP driver group.
- Fix MountMgr driver group.
- Fix rosfltmgr driver group.
- Add "Base" group list (until we have it inside some driver inf).
- Add tags for acpi, pci, null, beep and ksecdd drivers.
svn path=/trunk/; revision=72450
- CTrayWindow: Reorganise the code in logical groups to make it more readable. Move command handlers at the top of the file followed by the code that manages moving and resizing the taskbar. After that is code that paints the taskbar and the implementation of the ITrayWindow interface which I really doubt if it is needed. Finally at the bottom are the message handlers.
svn path=/trunk/; revision=72440
Implement starting address extensions, scanline offset extensions and memory
address extensions.
No more 64 KB memory banks. The code now uses SVGA_BANK_SIZE (1 MB) for
everything.
svn path=/trunk/; revision=72436
- Implement setting and removing breakpoints
- Implement single-stepping
- Only get past the breakpoint instruction when it comes from RtlpBreakWithStatus
- Implement writing to memory
- Always send the thread raising the exception to GDB to avoid confusing it
- Let GDB find the program counter alone by querying the registers (support was already there before.)
- Properly escape special characters on input
Ladies and gentlemen : the almost-fully functional GDB stub. (still no real multi-process support :-( )
To enable , in CMakeCache.txt :
- Set GDB:BOOL=TRUE
- Set _WINKD_:BOOL=TRUE
- Set KDBG:BOOL=FALSE
To do : give GDB the list of loaded drivers. Loading ntoskrnl.exe symbols at 0x80801000 already does a good enough job.
Default output is on COM1. Can be configure to any othe COM port with usual kernel options.
Hope you'll like it as much as I do ;-)
svn path=/trunk/; revision=72435
- Convert all *.mc files to UTF16 LE (without BOM) at build
- Use unicode flag in windmc/mc for source files
- Switch UNICODE_SOURCE files to UNICODE (must check for the presence of regression tests)
svn path=/trunk/; revision=72431
- Defer the changing of the window region while setting the window position.
- Patch based on Stefano Toncich work. See CORE-6897 and possibly CORE-7229.
svn path=/trunk/; revision=72429
- CMenuBand: Do not open the context menu on mouse down but on mouse up.
- Patch by Joachim Henze (reactosfanboy)
CORE-10830
svn path=/trunk/; revision=72401
- Use ExpandEnvironmentStringsW instead of PathUnExpandEnvStringsW in the pick icon dialog.
- Patch by Jared Smudde.
CORE-10962
svn path=/trunk/; revision=72399
- Properly invalidate service handles when closing/freeing them
Dedicated to Hermès and any regression chaser. FalsePositives--
svn path=/trunk/; revision=72396
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
- tested on VM.
- need to implement Interrupt Routine (MessagePerPort) and ATA/ATAPI Based SCSI Query.
svn path=/branches/GSoC_2016/AHCI/; revision=71588
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
- Added DriverEntry
- Added AhciFindAdapter : Need to add code for port initialization.
- Compile : OK
- Test : NOT TESTED
svn path=/branches/GSoC_2016/AHCI/; revision=71499
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
- Implement StartDocPrinterA.
- Fix an uninitialized access in StartDocPrinterW.
- Make OpenPrinterA and StartDocPrinterA consistent.
svn path=/branches/colins-printing-for-freedom/; revision=70505
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
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
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
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
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
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
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
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
[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
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
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
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
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
- 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
- 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
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
- 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
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
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
- 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
- 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
- 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
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
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
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
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
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
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
- 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
- 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
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
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
- 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
- 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
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
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
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
- 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
- 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
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
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
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
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
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
- 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
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
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
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
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
[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
- Use GdiConvertToDevmodeW instead of duplicating code.
- Fix the spec2def call here as well.
svn path=/branches/colins-printing-for-freedom/; revision=67816
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
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
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
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
- 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
5293 changed files with 708582 additions and 109094 deletions
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"
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"
// 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"
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.