Commit graph

455 commits

Author SHA1 Message Date
Eric Kohl d22bf76977 [SCHEDSVC]
Add a loop at the end of SchedServiceMain that will run until a stop event is signaled. This loop will be used to run the schduled jobs.

svn path=/trunk/; revision=74981
2017-06-10 10:51:49 +00:00
Eric Kohl 5ec31693b0 [SCHEDSVC]
Avoid JOBs overrunning in LoadJobs().
- Define JOB_NAME_LENGTH and use it instead of hardcoded values.
Based on a patch by Victor Martinez Calvo.
CORE-13389

svn path=/trunk/; revision=74944
2017-06-07 17:45:05 +00:00
Eric Kohl dd0e23b691 Avoid attempts to reinstall a driver on reboot when a previous attempt has already failed.
[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
2017-04-17 11:34:08 +00:00
Eric Kohl 6de65ddcea [SCHEDSVC]
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
2017-04-15 10:33:29 +00:00
Eric Kohl 645f25c4dd [SCHEDSVC]
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
2017-04-14 21:16:37 +00:00
Eric Kohl 46a9b5557e [UMPNPMGR]
Implement most of PNP_GetServerSideDeviceInstallFlags().

svn path=/trunk/; revision=74294
2017-04-10 19:12:17 +00:00
Eric Kohl d1fa8b8908 [SCHEDSVC]
Add missing file. Sorry!

svn path=/trunk/; revision=74290
2017-04-09 10:03:20 +00:00
Eric Kohl 7d242dfe4c [UMPNPMGR]
Use SendMessageW() to broadcast WM_DEVICECHANGE messages because BroadcastSystemMessageW() does not seem to work.

svn path=/trunk/; revision=74289
2017-04-09 08:51:03 +00:00
Eric Kohl a1b2032688 [SCHEDSVC]
Implement storing and loading of jobs in the registry.

svn path=/trunk/; revision=74288
2017-04-09 08:47:10 +00:00
Giannis Adamopoulos afd47c09cf [SHSVCS] -Add the module that should host the theme service. Implement ThemeWaitForServiceReady and ThemeWatchForStart. These are already called by our msgina and are responsible for starting themes in the session.
svn path=/trunk/; revision=74279
2017-04-07 13:01:42 +00:00
Eric Kohl 048ad653f4 [SCHEDSVC]
Implement NetsJobEnum.

svn path=/trunk/; revision=74272
2017-04-02 20:47:48 +00:00
Eric Kohl 0309c0644e [SCEDSVC]
- Implement a simple job list.
- Implement NetrJobAdd, NetrJobDel and NetrJobGetInfo.

svn path=/trunk/; revision=74262
2017-04-01 22:54:30 +00:00
Eric Kohl 15a480bb44 [UMPNPMGR]
Broadcast a WM_DEVICECHANGE message on device arrrival and removal.
CORE-12977

svn path=/trunk/; revision=74259
2017-04-01 08:07:39 +00:00
Eric Kohl 0448b0da4e [UMPNPMGR]
Fix a property id for a call to NtPlugPlayControl().

svn path=/trunk/; revision=74021
2017-03-01 21:52:20 +00:00
Eric Kohl fcd6f24ca0 [SCHEDSVC]
Set service status to SERVICE_STOP_PENDING before setting it to SERVICE_STOPPED.

svn path=/trunk/; revision=74020
2017-03-01 21:48:15 +00:00
Amine Khaldi 79111c35e6 * Revert r73869 because wmi was mentioned nowhere in CORE-9111, nor in our tree restructure wiki, nor any developers discussions. This is the ReactOS trunk, not a branch.
svn path=/trunk/; revision=73870
2017-02-21 09:04:05 +00:00
Hermès Bélusca-Maïto 9f59e28a23 [WMI]: Gather all the user-mode components of WMI inside base/wmi/, as part of the ReactOS source code tree restructure. This gives an idea how this can be done for other ReactOS components.
CORE-9111

svn path=/trunk/; revision=73869
2017-02-20 23:28:09 +00:00
Kamil Hornicek dba6b1c35c [EVENTLOG]
- Silence some debug prints. This commit bears the "Hermès' seal of approval".

svn path=/trunk/; revision=73858
2017-02-20 14:45:03 +00:00
Eric Kohl 8c77497afc [UMPNPMGR]
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
2017-02-13 22:59:40 +00:00
Kamil Hornicek ac044acb7d [UMPNPMGR]
- Fix a possible null pointer dereference. CID 515158

svn path=/trunk/; revision=73770
2017-02-11 10:34:35 +00:00
Hermès Bélusca-Maïto 826536350c [RPCSS][THMSVC]: Perform the internal cleanup tasks before calling SetServiceStatus with 'dwCurrentState = SERVICE_STOPPED', because otherwise (if internal cleanup is done after calling SetServiceStatus) the SCM could kill the service in the middle of its cleanup tasks.
[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
2017-02-06 16:56:32 +00:00
Thomas Faber d41a3f0e64 [DHCPCSVC]
- Addendum to r69652: Avoid some more "Operands don't affect result" warnings. CID 515151, 515152, 515153

svn path=/trunk/; revision=73635
2017-01-30 13:43:21 +00:00
Eric Kohl a6eabc0043 [SETUPAPI]
Partial implementation of CMP_RegisterNotification and CMP_UnregisterNotification.

[UMPNPMGR]
Partial implementation of PNP_RegisterNotification and PNP_UnregisterNotification.

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

svn path=/trunk/; revision=73394
2016-11-27 11:14:25 +00:00
Hermès Bélusca-Maïto 0dfecf815d [NTOS:IO][INCLUDES][EVENTLOG]: Fix support for event logging through the "ErrorLogPort" LPC. See the details in CORE-12301 #resolve
svn path=/trunk/; revision=73167
2016-11-07 13:29:09 +00:00
Amine Khaldi d12708671c [BASE] Spelling fixes by Josh Soref. CORE-12286
svn path=/trunk/; revision=73133
2016-11-05 14:55:55 +00:00
Colin Finck fcaeb4d6a4 [PRINTING]
Finally merge my branch "colins-printing-for-freedom", giving us an initial implementation of a Win32-compatible Printing Stack (localmon, localspl, spoolss, spoolsv, winspool)
You can now send raw data to parallel port printers using documented Win32 API. An example application is in my "winspool_print" commandline tool merged to rosapps.
ReactOS folks, thanks for your support during the development of this, making my bachelor's thesis a reality! :)

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

CORE-10489

svn path=/trunk/; revision=73039
2016-10-26 12:37:27 +00:00
Hermès Bélusca-Maïto 1f9c38b3b9 [EVTLIB]: Create a EvtLib library for manipulating the event log file format from anywhere.
[EVENTLOG]: Make usage of this library.
CORE-11868 #resolve #comment Committed in r73035.

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

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

svn path=/trunk/; revision=73034
2016-10-25 23:32:20 +00:00
Thomas Faber 4b9d31d916 [PSDK]
- ksmedia.h requires ks.h to be included first. Based on a patch by Lee Schroeder.
CORE-6783

svn path=/trunk/; revision=72963
2016-10-13 09:21:57 +00:00
Amine Khaldi b183bab8f7 [DHCPCSVC] Add registry key for DHCP domain if present in DHCP reply. By Peter Hater. CORE-10440
svn path=/trunk/; revision=72697
2016-09-16 13:40:21 +00:00
Amine Khaldi dd7d00f90d [RPCSS] Sync with Wine Staging 1.9.16. CORE-11866
svn path=/trunk/; revision=72446
2016-08-23 19:34:57 +00:00
Hermès Bélusca-Maïto a2b693dfc4 [EVENTLOG]
- Get rid of MyHeap.
- Continue using safe string functions.
- Allow event logs themselves to be their own source. And store the full list of log sources in the "Sources" registry multi-string value.
- Correctly compute the number of records.
- Correctly return the event number and the write timestamp of reported events.
- Use a helper function for ElfrReportEventW/A and for ElfrReportEventAndSourceW that is now implemented.
- Rewrite the file.c functions using NT-APIs almost exclusively for file operations.
- Modify the logic of LogfReadEvents so that a RecordNumber == 0 in sequential read mode means we need to determine where to start the read operation, depending on whether a forwards-read or a backwards-read is performed. The log handle's CurrentRecord member is therefore initialized to 0 before usage.
- Adjust LogfAllocAndBuildNewRecord to take in input the event generation timestamp.
- Do not "compute" the RecordNumber of the new event in LogfAllocAndBuildNewRecord; it will be consistently assigned by LogfWriteRecord.
- Correctly initialize the OldestRecordNumber to zero for new (empty) logs.
- Perform extensive log validity checks when opening existing logs: log header and EOF record as well as boundary checks.
- Rewrite almost of the functions to support event log wrapping (see https://msdn.microsoft.com/en-us/library/windows/desktop/bb309026(v=vs.85).aspx ) and splitted records. Now our event logs are not corrupted anymore, and are readable under Windows 2k/xp/2k3/Vista+.
- As a consequence of supporting wrapping event logs we need to iterate through them at loading time in order to locate the valid EOF record (indeed it may happen that the log header is not correctly synced, and its Start/EndOffsets are invalid. The EOF record offsets contain on the other way the correct values).

The file.c fixes are a bit still work-in-progress, but the bulk of the code works. It is extensively tested in situ in my local VM since 2 months now.

CORE-11843 #resolve

svn path=/trunk/; revision=72236
2016-08-16 21:08:15 +00:00
Hermès Bélusca-Maïto f7cb5ca5c0 [EVENTLOG]
- Use NT functions to retrieve timestamps for events.
- Log kernel events with the current computer name.
- Don't hardcode variables types for sizeofs.
- Add type-checks for the data to be retrieved from the registry, and use default values in case the values do not exist or are invalid.
- Use ULONG_PTR to perform pointer arithmetics.
- Use string-safe functions for copy/concatenation.
- Cache EventLog source for eventlog service self-logging.
- Unlock the LogFile in LogfClearFile.
- Fix rounding in LogfAllocAndBuildNewRecord.
- Verify ELF handle validity in ElfrGetLogInformation.
- Implement IELF_HANDLE_rundown to correctly cleanup ELF handles when client apps shut down. Adapt also the parameter of ElfDeleteEventLogHandle for reusing it there.
- Update some code formatting.
CORE-11842 #resolve

I don't completely touch file.c as it contains most of my upcoming eventlog fixes...

svn path=/trunk/; revision=72213
2016-08-12 19:14:55 +00:00
Hermès Bélusca-Maïto 275590c74e [EVENTLOG]: Fix also ElfrChangeNotify here. Addendum to r72211. Must fix the build.
CORE-11839

svn path=/trunk/; revision=72212
2016-08-12 17:25:36 +00:00
Hermès Bélusca-Maïto f29075b129 [DHCPSVC]: It's a service, move it in the correct directory.
svn path=/trunk/; revision=71592
2016-06-07 23:14:58 +00:00
Amine Khaldi 08a0346e9f [SDK] One step further towards ReactOS source code tree restructure: the sdk folder that groups includes, libraries and tools. CORE-9111
svn path=/trunk/; revision=71184
2016-04-20 12:36:25 +00:00
Eric Kohl 6592d7d424 [WLANSVC]
Add the version information for the WLAN Service.
Patch by Lee Schroeder.
CORE-10836 #resolve #comment Thanks a lot!

svn path=/trunk/; revision=70698
2016-02-07 20:08:08 +00:00
Amine Khaldi bf8725c77d [RPCSS] Sync with Wine Staging 1.7.55. CORE-10536
svn path=/trunk/; revision=70124
2015-11-26 22:46:39 +00:00
Sylvain Petreolle 6c4eee79d5 [UMPNPMGR]
Improve traces.

svn path=/trunk/; revision=69884
2015-11-14 13:28:03 +00:00
Sylvain Petreolle b86a4b8e83 Fix 0x%lu specifier in our skeleton service and its only user tcpsvcs.
svn path=/trunk/; revision=69437
2015-10-03 22:38:05 +00:00
Stefan Ginsberg 6b5b096ee2 Fix a load of assumptions about default calling convention, a lot more remain.
svn path=/trunk/; revision=69242
2015-09-15 13:15:28 +00:00
Amine Khaldi 37b4177aee [SERVICES] Improve the FILE header section. Brought to you by Adam Stachowicz. CORE-10114
svn path=/trunk/; revision=69194
2015-09-12 10:58:07 +00:00
Eric Kohl e2952ec3d1 [UMPNPMGR]
Implement first part of PNP_GetDeviceList and PNP_GetDeviceListSize.

svn path=/trunk/; revision=68083
2015-06-08 23:29:59 +00:00
Colin Finck d5fd7aaa19 - Add my proposed directory tree for the components involved in printing.
- Remove some Wine-imported components which are either entirely not usable for us or only implement so few functions that it's easier to completely reimplement them.
- Move "localui" (Wine-imported) and "spoolsv" (ReactOS stub) to the new directories.

svn path=/branches/colins-printing-for-freedom/; revision=67543
2015-05-04 13:21:13 +00:00
Eric Kohl 60e0daa326 [SRVSVC]
Implement NetrRemoteTOD.
CORE-5423 #resolve #comment Committed in r67210.

svn path=/trunk/; revision=67210
2015-04-15 21:04:43 +00:00
Eric Kohl fdc0506420 [SRVSVC]
Add the Server service and its interface definition files.



svn path=/trunk/; revision=67196
2015-04-14 20:59:34 +00:00
Thomas Faber 9b7e229a23 [UMPNPMGR][NEWDEV]
- Actually create the "InstallEvent" as an event and use it to communicate success from newdev back to umpnpmgr. This works better than checking the process exit code from rundll32 (which always returns 0).
CORE-9477 #resolve

svn path=/trunk/; revision=67025
2015-04-03 18:30:37 +00:00
Eric Kohl 218064f15d [SCHEDSVC]
Start work on the seceduler service.

[NETAPI32]
Implement the scheduler service client functions.

svn path=/trunk/; revision=66862
2015-03-22 21:57:55 +00:00
Christoph von Wittich 6ea4a782ee [WLANSVC]
fix a typo
spotted by Eric

svn path=/trunk/; revision=66668
2015-03-13 19:09:32 +00:00
Hermès Bélusca-Maïto 42c3492b5c Revert tree-restructure attempt: r66583, r66582, r66581, r66578, sauf ntdll changes, r66576 and r66575 sauf mvdm changes (ok with Aleksander).
svn path=/trunk/; revision=66588
2015-03-06 14:33:02 +00:00