Compare commits

...

1205 Commits

Author SHA1 Message Date
Jason Filby
011b958ced new rev
svn path=/branches/prep0016/; revision=1287
2000-08-06 12:34:24 +00:00
David Welch
672e92ac14 Bandaid for application crashes on startup problem.
svn path=/branches/prep0016/; revision=1280
2000-08-01 22:36:57 +00:00
Eric Kohl
5c5116a074 Implemented LdrGetProcedureAddress()
Fixed ntdll initalization using a call to LdrInitializeThunk()

svn path=/branches/prep0016/; revision=1274
2000-07-24 23:38:05 +00:00
Emanuele Aliberti
f009614bd9 Added some stubs to kernel32.dll and fixed some symbols in the exports table.
svn path=/branches/prep0016/; revision=1273
2000-07-24 21:20:38 +00:00
Eric Kohl
20f29b6e09 Implemented/activated peb locking
svn path=/branches/prep0016/; revision=1272
2000-07-22 11:44:24 +00:00
David Welch
f4842ef725 Fixed TEB allocation problem
Improved critical section code
Removed spinlock problem
Added additional heap debugging code

svn path=/branches/prep0016/; revision=1271
2000-07-21 22:06:35 +00:00
The ReactOS Team
7e16db1f43 This commit was manufactured by cvs2svn to create branch 'prep0016'.
svn path=/branches/prep0016/; revision=1266
2000-07-11 04:40:00 +00:00
Phillip Susi
fb416bf8e2 Updated shell.exe to be console mode aware
svn path=/trunk/; revision=1265
2000-07-11 04:40:00 +00:00
Phillip Susi
cc05ca5acb Implemented console modes
svn path=/trunk/; revision=1264
2000-07-11 04:09:25 +00:00
Phillip Susi
041f614e06 Minor bug fix
svn path=/trunk/; revision=1263
2000-07-11 04:08:43 +00:00
Phillip Susi
510af07f3c Removed calls to ExAllocatePool so code can be used in components that do not link to ntoskrnl.exe
svn path=/trunk/; revision=1262
2000-07-11 04:02:45 +00:00
Eric Kohl
85c3d3799b Moved interrupt code from hal into kernel
Implemented missing interrupt functions

svn path=/trunk/; revision=1261
2000-07-10 21:55:49 +00:00
Rex Jolliff
b4f80cb2e6 added files to be ignored
svn path=/trunk/; revision=1260
2000-07-09 17:34:05 +00:00
Rex Jolliff
a6613e4b6f added cvsignore file so that dir gets created
svn path=/trunk/; revision=1259
2000-07-09 17:32:49 +00:00
Rex Jolliff
f48fc3a954 added some files to be ignored by cvs
svn path=/trunk/; revision=1258
2000-07-09 17:31:32 +00:00
Eric Kohl
e97ef012de Fixed typos
svn path=/trunk/; revision=1257
2000-07-08 18:49:24 +00:00
David Welch
68375602c1 *** empty log message ***
svn path=/trunk/; revision=1256
2000-07-08 16:53:33 +00:00
Eric Kohl
fb7b00bd59 Added check for valid DC
svn path=/trunk/; revision=1255
2000-07-08 09:46:32 +00:00
Eric Kohl
0afbea5a1c Added checks for loaded drivers
svn path=/trunk/; revision=1254
2000-07-07 11:59:11 +00:00
Eric Kohl
8353127423 Fixed a typo
svn path=/trunk/; revision=1253
2000-07-07 11:56:04 +00:00
Eric Kohl
25557b0457 Added dist target
svn path=/trunk/; revision=1252
2000-07-07 11:55:02 +00:00
David Welch
8689a5cfe9 Corrected bug where user32.a wasn't being cleaned
Corrected bugs in paging implementation
Began work on MPW thread

svn path=/trunk/; revision=1251
2000-07-07 10:30:57 +00:00
Eric Kohl
0ea1d03808 Separated close request
Fixed bugs in create request

svn path=/trunk/; revision=1250
2000-07-07 02:14:14 +00:00
Eric Kohl
a20a2dd801 Implemented vpb spinlock
svn path=/trunk/; revision=1249
2000-07-07 02:10:50 +00:00
Phillip Susi
b81629c2a0 More DbgPrint to DPRINT changes, Implimented support for deleting DCs, causing switch back to text mode, and another change from nonpaged to paged pool
svn path=/trunk/; revision=1248
2000-07-07 01:20:53 +00:00
Phillip Susi
4568d2fd4c Converted more DbgPrints to DPRINT and allocate bitmaps from paged pool instead of non paged
svn path=/trunk/; revision=1247
2000-07-07 01:19:02 +00:00
Phillip Susi
96e4bf5c1f Bug fixes to win32k
svn path=/trunk/; revision=1246
2000-07-07 01:18:04 +00:00
Phillip Susi
418efd5de8 Implimented switch back to text mode after gditest
svn path=/trunk/; revision=1245
2000-07-07 01:16:50 +00:00
Phillip Susi
aa9ca10d75 One should not say the device does not exist causing the driver to fail to load... how the hell did this work before?
svn path=/trunk/; revision=1244
2000-07-07 01:06:35 +00:00
Phillip Susi
21489b923a Implimented reset to text mode
svn path=/trunk/; revision=1243
2000-07-07 01:05:33 +00:00
Phillip Susi
61ed9441a3 Converted a bunch of DbgPrint() calls to DPRINT()
svn path=/trunk/; revision=1242
2000-07-07 01:02:11 +00:00
Phillip Susi
a1ff5576a5 Implimented switch back to text mode after gditest
svn path=/trunk/; revision=1241
2000-07-07 00:59:41 +00:00
Phillip Susi
001c73ed14 Fixed ps code to terminate threads correctly
svn path=/trunk/; revision=1240
2000-07-07 00:49:02 +00:00
Phillip Susi
3ca24a2c2a Fixed [Ke/Nt]WaitForMultipleObjects() bug
svn path=/trunk/; revision=1239
2000-07-07 00:46:35 +00:00
Phillip Susi
db1ccdf290 Fixes to timeout code
svn path=/trunk/; revision=1238
2000-07-07 00:45:37 +00:00
Phillip Susi
84f943edc6 Fixed ps bug, proper termination of threads
svn path=/trunk/; revision=1237
2000-07-07 00:44:07 +00:00
Phillip Susi
67d46de5d3 Fixed typeo that was breaking NtReadFile() with async reads
svn path=/trunk/; revision=1236
2000-07-07 00:42:58 +00:00
Phillip Susi
10c1321106 Do not clean up mdl on paging requests, as the mm needs it still
svn path=/trunk/; revision=1235
2000-07-07 00:41:36 +00:00
Phillip Susi
7bf98ea309 Set IRP_PAGING_IO on mdl ( paging ) requests
svn path=/trunk/; revision=1234
2000-07-07 00:40:49 +00:00
Phillip Susi
2b37b9beea Exported NtOpenEvent()
svn path=/trunk/; revision=1233
2000-07-07 00:39:24 +00:00
Phillip Susi
194e86b860 Implimented DeleteDC()
svn path=/trunk/; revision=1232
2000-07-07 00:38:17 +00:00
Phillip Susi
2f1d0bf882 Minor fixes, enabled return to text mode
svn path=/trunk/; revision=1231
2000-07-07 00:36:36 +00:00
Phillip Susi
017479a5f0 Fixed left out paremter error
svn path=/trunk/; revision=1230
2000-07-06 20:53:27 +00:00
David Welch
d26222f310 Added experimental paging out code (wouldn't activate until the system is
out of memory)
Added stress test application (consumes memory)
Corrected mutex implementation
Moved csrss startup into kernel32 to avoid ugly messages on startup

svn path=/trunk/; revision=1229
2000-07-06 14:34:52 +00:00
Eric Kohl
671c1bc412 Append the '.exe' extension automatically
svn path=/trunk/; revision=1228
2000-07-05 18:07:08 +00:00
Eric Kohl
bea48dda7a Fixed 'cd \' bug
svn path=/trunk/; revision=1227
2000-07-05 18:05:21 +00:00
Phillip Susi
2946fd90c7 Removed duplicate and incorrect declaration for KeRaiseUserException
svn path=/trunk/; revision=1226
2000-07-04 20:02:35 +00:00
David Welch
f801003a51 Compilation fixes
svn path=/trunk/; revision=1225
2000-07-04 11:11:06 +00:00
David Welch
d351d182ef Added working set functions
Seperated memory manager initialization
Seperated trap functions
Removed process/thread definitions from ddk headers
Changed indentation back to sane style (please don't change)

svn path=/trunk/; revision=1224
2000-07-04 08:52:47 +00:00
Eric Kohl
9caffc49ae Fixed RtlNtStatusToDosError()
Implemented some more functions

svn path=/trunk/; revision=1223
2000-07-04 01:30:18 +00:00
Eric Kohl
bad7efb0e7 Final macro fixes
Minor fixes

svn path=/trunk/; revision=1222
2000-07-02 17:33:15 +00:00
Eric Kohl
add4b2d35b Simplified driver initialization
svn path=/trunk/; revision=1221
2000-07-02 10:54:41 +00:00
Eric Kohl
73437d2939 Fixed more macros
Merged/moved/deleted some files

svn path=/trunk/; revision=1220
2000-07-02 10:50:48 +00:00
David Welch
ed53dc2acc Removed unused header file
Fixed compilation errors resulting from header file changes
Fixed vga driver compilation under unix
Patched up use of *deprecated* inb/outb interfaces in vga driver

svn path=/trunk/; revision=1219
2000-07-01 23:18:59 +00:00
Eric Kohl
83e4b66c10 Fixed Ps macros
svn path=/trunk/; revision=1218
2000-07-01 22:38:15 +00:00
Eric Kohl
6abd233802 Replaced boot_param by LOADER_PARAMETER_BLOCK
Added missing dpc functions
Fixed some Ke macros

svn path=/trunk/; revision=1217
2000-07-01 18:27:03 +00:00
Emanuele Aliberti
95f8770ae2 Minor changes.
svn path=/trunk/; revision=1216
2000-07-01 17:07:02 +00:00
Eric Kohl
f3e6819471 Added hal dispatch tables.
Implemented PhysicalDrive links.
Started drive letter assignment.

svn path=/trunk/; revision=1214
2000-06-30 22:53:32 +00:00
David Welch
cc95f73421 Made header file usage more consistent
Tried to reduce dependancies between layers by moving ntoskrnl's private
header files inside its directory
Removed the need to include windows.h for ddk code
Removed obsolete testing code

svn path=/trunk/; revision=1213
2000-06-29 23:35:53 +00:00
David Welch
109fef6e75 Corrected bug when booting with loadros
Began work on fixing up APCs.

svn path=/trunk/; revision=1212
2000-06-27 19:20:45 +00:00
David Welch
17e1656941 Documented parts of the page fault path and flagged some possible locking
issues.
Implemented waiting on page i/o.

svn path=/trunk/; revision=1211
2000-06-26 19:41:43 +00:00
David Welch
fcf9dcd627 Fixed bug.
svn path=/trunk/; revision=1210
2000-06-25 17:41:01 +00:00
David Welch
6e00280f38 Removed from redundant files from the mm directory
Added some preliminary work on the pager
Fixed ntoskrnl/mm/npool.c (This may have been the cause of the
problems reported with loading win32k.sys)
Fixed problems with reporting space used to store physical page
information
Added code to support MmSafeCopy{To/From}User interface work
(untested)
Added Event member of the PHYSICAL_PAGE structure to implement Philip
Susi's suggestion
Reworked section page-in code (not really tested)
Replaced inline string functions with gcc builtins to make debugging easier

svn path=/trunk/; revision=1209
2000-06-25 03:59:17 +00:00
Emanuele Aliberti
a8ed3ed57e Fixed a path problem in the makefile that Phillip reported a few days ago.
Unix paths are handled correctly by DOS and Win32 kernels, but NOT by
command.com and cmd.exe shells. Therefore, when a path is to be handed to
a shell, use \ but when you hand it to any other program, use / instead.

svn path=/trunk/; revision=1208
2000-06-24 09:02:02 +00:00
Eric Kohl
3d2ca25cb4 Added counting physical discs
Fixed a compiler warning

svn path=/trunk/; revision=1207
2000-06-19 22:15:50 +00:00
Eric Kohl
57fc573524 Removed invalid includes
svn path=/trunk/; revision=1206
2000-06-19 16:42:31 +00:00
Eric Kohl
88cf03e85b Use SystemRoot link instead of LdrGetSystemDirectory()
svn path=/trunk/; revision=1205
2000-06-18 17:40:35 +00:00
Eric Kohl
5b2343f9f1 Not used any longer
svn path=/trunk/; revision=1204
2000-06-18 17:39:57 +00:00
Eric Kohl
539b0a1259 Fixed typo and added freetype dir to clean target
svn path=/trunk/; revision=1203
2000-06-18 17:37:57 +00:00
Eric Kohl
9f1e56d438 Implemented IoAttachDeviceByPointer() and IoGetDeviceObjectPointer().
svn path=/trunk/; revision=1202
2000-06-18 15:23:40 +00:00
Eric Kohl
44bdd793c1 Changed list functions to macros (or static inline functions).
svn path=/trunk/; revision=1201
2000-06-18 15:21:53 +00:00
Jason Filby
e3b8762528 Small change and removed unnecessary files
svn path=/trunk/; revision=1200
2000-06-18 12:29:32 +00:00
Jason Filby
943db2de5a Math functions required by win32k
svn path=/trunk/; revision=1199
2000-06-18 12:26:26 +00:00
Jason Filby
dd085499e8 Altered to use new and smaller math.c
svn path=/trunk/; revision=1198
2000-06-18 12:25:42 +00:00
Jason Filby
991cde2c53 Makefile changes for win32k
svn path=/trunk/; revision=1197
2000-06-18 12:25:00 +00:00
Jason Filby
669a590c02 Commented out test code that prevented compilation
svn path=/trunk/; revision=1196
2000-06-18 12:24:22 +00:00
Emanuele Aliberti
b441b2ed03 Base files for a compatible MSVCRT.DLL.
Currently useless.

svn path=/trunk/; revision=1195
2000-06-18 10:57:42 +00:00
David Welch
9d3cd59f17 Corrected build problem
svn path=/trunk/; revision=1194
2000-06-17 23:58:53 +00:00
Phillip Susi
e6bcb9741d Forgot to seek before trying to read back data, and added a check for the data integrity
svn path=/trunk/; revision=1193
2000-06-17 22:04:49 +00:00
Phillip Susi
4e91635e4a Fixed several erronious checks to detect things such as eof on directories too, not just files
svn path=/trunk/; revision=1192
2000-06-17 22:04:08 +00:00
Phillip Susi
274c4db921 Added missing DPRINT
svn path=/trunk/; revision=1191
2000-06-17 22:03:23 +00:00
Phillip Susi
ea455bcfce Fixed bug that fails to update files entries in the root, and added some error checking
svn path=/trunk/; revision=1190
2000-06-17 22:02:09 +00:00
Phillip Susi
8eb69e31d4 Fixed code that checks for a deleted directory entry ( which is really used to find a free entry ) to accept a blank ( never before used ) entry as free
svn path=/trunk/; revision=1189
2000-06-17 22:00:46 +00:00
Jason Filby
a32b900658 temporary float and math support
svn path=/trunk/; revision=1188
2000-06-16 21:13:18 +00:00
Jason Filby
ea1da2be56 missing updates
svn path=/trunk/; revision=1187
2000-06-16 20:58:56 +00:00
Jason Filby
efd7fbb22e missed update
svn path=/trunk/; revision=1186
2000-06-16 20:50:31 +00:00
Jason Filby
a25a8e2e02 GDI Improvements
svn path=/trunk/; revision=1185
2000-06-16 07:36:10 +00:00
Jason Filby
77ef48e705 VGA display driver improvements
svn path=/trunk/; revision=1184
2000-06-16 07:28:20 +00:00
Jason Filby
0b34b1b746 GDI improvements
svn path=/trunk/; revision=1183
2000-06-16 07:25:41 +00:00
Eric Kohl
94c0c4bab2 Improved symbolic links (reparsing).
Implemented SystemRoot and DosDevices links.

svn path=/trunk/; revision=1182
2000-06-15 18:39:25 +00:00
Eric Kohl
fb6c04efbd Implemented IoDeleteSymbolicLink() and NtCreateSymbolicLinkObject().
svn path=/trunk/; revision=1181
2000-06-13 15:51:13 +00:00
Eric Kohl
19e66992de Added cache manager prototypes.
Fixed Io macros.
Fixed and exported more hal functions.

svn path=/trunk/; revision=1180
2000-06-12 14:57:10 +00:00
Emanuele Aliberti
65a13ef159 Return type KIRQL fixed to allow compilation.
svn path=/trunk/; revision=1179
2000-06-09 22:22:32 +00:00
Eric Kohl
3cd7d0dcd3 Moved some functions into the hal.
Replaced some functions by macros.

svn path=/trunk/; revision=1178
2000-06-09 20:07:20 +00:00
Eric Kohl
0aac416a18 Update after server failure.
Fixed STDCALL issues in Ex functions.

svn path=/trunk/; revision=1177
2000-06-07 13:05:09 +00:00
Eric Kohl
d40e55b4e1 Fixed STDCALL issues in Ex functions
svn path=/trunk/; revision=1176
2000-06-05 22:12:06 +00:00
Eric Kohl
64c33bb910 Fixed STDCALL issues in Ke functions
Renamed KiTimerInterrupt() to KeUpdateSystemTime()
Added KeNumberProcessors variable

svn path=/trunk/; revision=1175
2000-06-04 19:51:05 +00:00
Emanuele Aliberti
077ac93718 Type definitions and macros previously in ntoskrnl/nt/port.c moved
in include/internal/port.h .

svn path=/trunk/; revision=1174
2000-06-04 17:32:44 +00:00
Emanuele Aliberti
9464b7005d Made and new ntoskrnl/lpc directory for the LPC subsystem.
Moved ntoskrnl/nt/port.c in ntoskrnl/lpc and split code into
smaller pieces. Little cleanup.

svn path=/trunk/; revision=1173
2000-06-04 17:27:39 +00:00
Eric Kohl
6d5e353126 Fixed clean target (didn't delete all .o files)
svn path=/trunk/; revision=1172
2000-06-04 17:15:47 +00:00
Eric Kohl
ceed9a079e Fixed paths
svn path=/trunk/; revision=1171
2000-06-04 17:14:25 +00:00
Eric Kohl
abc6758e63 Updated Ps* functions
Implemented PsGetVersion()

svn path=/trunk/; revision=1170
2000-06-03 21:36:32 +00:00
Emanuele Aliberti
8123995861 Minor changes.
svn path=/trunk/; revision=1169
2000-06-03 14:47:33 +00:00
Emanuele Aliberti
7fbe844acc Minor changes to kernel32.
svn path=/trunk/; revision=1168
2000-05-30 23:41:06 +00:00
Emanuele Aliberti
f53d713f9a Renamed NTDLL.RtlNtStatusToDosError() RtlNtStatusToDosErrorNoTeb().
Added NTDLL.RtlNtStatusToDosError() that calls RtlNtStatusToDosErrorNoTeb().
Still not understood why RtlNtStatusToDosError() stores in the TEB the given NtStatus.

svn path=/trunk/; revision=1167
2000-05-30 22:25:10 +00:00
Emanuele Aliberti
3918e5583d Added handle type to object name translation in qsi.
svn path=/trunk/; revision=1166
2000-05-28 17:44:53 +00:00
David Welch
279b8390a0 Fix for issue with closing non-existent or already closed handle
svn path=/trunk/; revision=1165
2000-05-27 12:48:59 +00:00
David Welch
06784b2b11 Added etags target
svn path=/trunk/; revision=1164
2000-05-26 14:25:50 +00:00
Phillip Susi
9f7a5635de big work on the console front
svn path=/trunk/; revision=1163
2000-05-26 06:06:42 +00:00
Phillip Susi
97f4345422 fixed color info
svn path=/trunk/; revision=1162
2000-05-26 06:06:05 +00:00
Phillip Susi
232a66904f big work on the console front
svn path=/trunk/; revision=1161
2000-05-26 05:43:33 +00:00
Phillip Susi
1410c2b0a4 a few fixes to the shell
svn path=/trunk/; revision=1160
2000-05-26 05:38:42 +00:00
Eric Kohl
dd76e08c86 Implemented:
- dbg functions
 - RtlFreeUserThreadStack()
 - rtl nls functions
 - rtl process heaps functions
Improved .def and .edf files

svn path=/trunk/; revision=1159
2000-05-25 15:55:35 +00:00
David Welch
3e519811c4 More bug fixes.
svn path=/trunk/; revision=1158
2000-05-24 22:29:38 +00:00
David Welch
1001fb267c Updated clean targets in various places
svn path=/trunk/; revision=1157
2000-05-14 13:10:01 +00:00
Emanuele Aliberti
6bd8ebc9e2 Added ifdef to skip a piece of code commited by mistake (I am still working on it, sorry!).
svn path=/trunk/; revision=1156
2000-05-14 09:34:14 +00:00
Emanuele Aliberti
0726ddaa11 Fixed bug reported by Michael Rich in kernel32 compilation.
svn path=/trunk/; revision=1155
2000-05-14 09:31:05 +00:00
Eric Kohl
f5c8f9fdab Added FLOPPY and DIST targets
svn path=/trunk/; revision=1154
2000-05-13 17:34:15 +00:00
Emanuele Aliberti
d7b4fba550 IoSetThreadHardErrorMode().
svn path=/trunk/; revision=1153
2000-05-13 14:56:47 +00:00
David Welch
598c0f3b1f Fixed typo.
svn path=/trunk/; revision=1152
2000-05-13 14:21:44 +00:00
David Welch
d173c588c7 Some fixes.
Began work on implementing named pipes.

svn path=/trunk/; revision=1151
2000-05-13 13:51:08 +00:00
Eric Kohl
1d034b8c4e Fixed typos in IoGetStackLimits()
svn path=/trunk/; revision=1150
2000-05-13 10:39:23 +00:00
Eric Kohl
3086566400 Fixed IoGetStackLimits()
svn path=/trunk/; revision=1149
2000-05-13 01:48:59 +00:00
Eric Kohl
17e86aad5d Implemented RtlCustomCPxx functions
svn path=/trunk/; revision=1148
2000-05-13 01:48:01 +00:00
Eric Kohl
bb665e58b7 Fixed some more ntoskrnl exports
svn path=/trunk/; revision=1147
2000-05-09 21:31:01 +00:00
Eric Kohl
5c644fe59b Fixed or added exported object type variables
svn path=/trunk/; revision=1146
2000-05-09 16:16:07 +00:00
Eric Kohl
a3160d79cd Implemented IOCTL to draw screen buffer
Changed screen buffer from array of bytes to array of CHAR_INFO

svn path=/trunk/; revision=1145
2000-05-08 23:27:52 +00:00
Eric Kohl
34010a1fcb Fixed ntoskrnl makefile
svn path=/trunk/; revision=1144
2000-05-07 23:04:43 +00:00
Emanuele Aliberti
78a6c60acd Some STDCALL/FASTCALL added in Ex code.
NTOSKRNL's makefile revised with redundant passes removed.

svn path=/trunk/; revision=1142
2000-05-01 14:15:03 +00:00
Emanuele Aliberti
fdf480d262 objdir made compilable.
svn path=/trunk/; revision=1141
2000-05-01 13:53:43 +00:00
Phillip Susi
32ea00da50 NtTerminateProcess did not terminate the current thread if it was a member of the process being terminated
svn path=/trunk/; revision=1140
2000-04-28 17:29:42 +00:00
Emanuele Aliberti
537f82fd1a A fix in the SYSTEM_HANDLE_INFORMATION structure.
svn path=/trunk/; revision=1139
2000-04-27 23:39:49 +00:00
Emanuele Aliberti
b13b811b5f I forgot to update the code that uses SYSTEM_TIME_INFORMATION.
svn path=/trunk/; revision=1138
2000-04-26 06:56:12 +00:00
Emanuele Aliberti
b3ea65f0e4 Partially implemented (handlers only)
NTOSKRNL.NtQuerySystemInformation() and
NTOSKRNL.NtSetSystemInformation().

---

Partially implemented (kernel32/process/proc.c)

KERNEL32.GetPriorityClass(),
KERNEL32.SetPriorityClass() and
NTDLL.CsrSetPriorityClass() (stub only).

Renamed (in include/csrss/csrss.h) priority
class macros:

#define CSR_PRIORITY_CLASS_NORMAL	(0x10)
#define CSR_PRIORITY_CLASS_IDLE		(0x20)
#define CSR_PRIORITY_CLASS_HIGH		(0x40)
#define CSR_PRIORITY_CLASS_REALTIME	(0x80)

---

Implemented (kernel32/misc/error.c)

#include <kernel32/error.h>

DWORD
STDCALL
SetLastErrorByStatus (
	NTSTATUS	Status
	);

to replace SetLastError(RtlNtStatusToDosError(Status))
in KERNEL32, and fixed

KERNEL32.SetLastError()
KERNEL32.GetLastError()

to use the field in NT_TEB (LastError is per thread
not per process).

---

Implemented (lib/kernel32/sysinfo.c) GetSystemInfo()
(to be completed).

---

Fixed rosapps/sysutils/makefile to use ROS import
libraries.

---

Added QSI to the system utilities set. The target is
writing a tool that can be used to query as much system
information as possible from user mode (to be finished
and tested only under nt4sp4/x86; it was NOT tested
under ROS: it crashes immediately and needs
NtQuerySystemInformation implemented!).

svn path=/trunk/; revision=1137
2000-04-25 23:22:57 +00:00
Phillip Susi
0c4a5f1e06 NtDeviceIoControllFile() was not specifying IoFileObjectType as the object type when referencing the file handle
svn path=/trunk/; revision=1136
2000-04-24 04:17:55 +00:00
Phillip Susi
5fea099598 Do not set std handles when AllocConsole() fails, I swear I fixed this before...
svn path=/trunk/; revision=1135
2000-04-24 01:52:24 +00:00
Phillip Susi
23b59ecccb Disabled debug prints
svn path=/trunk/; revision=1134
2000-04-23 18:01:21 +00:00
Phillip Susi
cbf17cd791 Disabled debug prints
svn path=/trunk/; revision=1133
2000-04-23 17:55:21 +00:00
Phillip Susi
0bb8878fc1 Dumped anoying debug print
svn path=/trunk/; revision=1132
2000-04-23 17:52:44 +00:00
Phillip Susi
0d569ee50b Added a event handle to reply struct
svn path=/trunk/; revision=1131
2000-04-23 17:51:35 +00:00
Phillip Susi
de82241cb1 Added declaration for InterlockedCompareExchange
svn path=/trunk/; revision=1130
2000-04-23 17:50:47 +00:00
Phillip Susi
7928fc621a Switched to CREATE_NEW_CONSOLE from DETACHED_PROCESS
svn path=/trunk/; revision=1129
2000-04-23 17:49:07 +00:00
Phillip Susi
cdd3a57119 Whole new win32 console support, with multiple virtual consoles and scrollback support
svn path=/trunk/; revision=1128
2000-04-23 17:44:53 +00:00
Phillip Susi
4f6c860da3 Was reporting geometry backwards, and needed to add a raw output mode
svn path=/trunk/; revision=1127
2000-04-23 17:42:57 +00:00
Phillip Susi
6ac6c50282 Patched up console code a bit
svn path=/trunk/; revision=1126
2000-04-23 17:41:40 +00:00
Phillip Susi
66780d1d02 CreateProcess was eating the flags, had to pass them on
svn path=/trunk/; revision=1125
2000-04-23 17:40:52 +00:00
Phillip Susi
ee3307e21d Fixed up Critical Section code
svn path=/trunk/; revision=1124
2000-04-20 05:29:27 +00:00
Phillip Susi
b01b3e0e97 Replaced a -- with an InterlockedDecrement
svn path=/trunk/; revision=1123
2000-04-17 03:09:04 +00:00
Eric Kohl
8b7920f796 Added some rtl functions
svn path=/trunk/; revision=1122
2000-04-15 23:14:32 +00:00
Eric Kohl
86a1100180 Implemented debugger functions
svn path=/trunk/; revision=1121
2000-04-14 01:50:38 +00:00
Boudewijn Dekker
4542601468 applied fixes to make a user32.dll
code is based on wine.

svn path=/trunk/; revision=1120
2000-04-13 20:59:11 +00:00
Boudewijn Dekker
99fb26fc8b .
svn path=/trunk/; revision=1119
2000-04-12 22:41:51 +00:00
Eric Kohl
7910a00791 Added kernel_parameters to boot_param
svn path=/trunk/; revision=1118
2000-04-12 17:34:27 +00:00
Jason Filby
93d95d8063 Fixed EngFreeMem def
svn path=/trunk/; revision=1117
2000-04-11 20:56:11 +00:00
Jason Filby
04a84d5ab8 Implemented DrvCopybits
Minor fixes

svn path=/trunk/; revision=1116
2000-04-10 20:17:34 +00:00
Eric Kohl
5b7a3113d5 Added system and isa bus handler
svn path=/trunk/; revision=1115
2000-04-09 15:58:13 +00:00
Eric Kohl
db593a0fb7 Fixed compiler warnings
svn path=/trunk/; revision=1114
2000-04-08 23:35:27 +00:00
Eric Kohl
51db0e6fed Moved KeStallExecutionProcessor() into HAL.
Added some security functions.

svn path=/trunk/; revision=1113
2000-04-08 19:10:50 +00:00
Eric Kohl
55c5bbf0be Fixed bug in COPY command
svn path=/trunk/; revision=1112
2000-04-08 14:50:47 +00:00
Phillip Susi
4be5d21243 Correted path to be system32 instead of system
svn path=/trunk/; revision=1111
2000-04-07 22:59:38 +00:00
Phillip Susi
fe9a733457 Removed LoadLibraryW from kernel32.edf, as it seems to not have an implementation and so would not compile. Wonder where the implementation whent?
svn path=/trunk/; revision=1110
2000-04-07 21:45:32 +00:00
Eric Kohl
654c8e7d00 Added more time functions
svn path=/trunk/; revision=1109
2000-04-07 12:45:22 +00:00
David Welch
53e0232c6c Began seperation of machine-dependant/independant sections of memory
manager
Did some more work on the dce/rpc implementation
Corrected loadros so the kernel can no longer write to read-only areas
of memory
Corrected alignment and size of initial stack

svn path=/trunk/; revision=1108
2000-04-07 02:24:03 +00:00
Eric Kohl
e3ce7008d7 Moved debug functions
svn path=/trunk/; revision=1107
2000-04-06 17:23:52 +00:00
Eric Kohl
9d90e8c107 Added some more security functions
svn path=/trunk/; revision=1106
2000-04-06 02:29:57 +00:00
Eric Kohl
48c46844eb Added hal functions
Fixed se functions

svn path=/trunk/; revision=1105
2000-04-05 15:52:45 +00:00
Eric Kohl
05bf1339f9 Added ace, acl and sid functions
svn path=/trunk/; revision=1104
2000-04-05 01:41:01 +00:00
David Welch
d54e68673b Correct LPC implementation
Removed thread leak in csrss
Added notification of port closing

svn path=/trunk/; revision=1103
2000-04-03 21:54:42 +00:00
Jason Filby
eb1f2f9bd1 Implemented DrvPaint and DrvBitBlt
Added tests for new routines
Minor fixes

svn path=/trunk/; revision=1102
2000-04-03 19:55:33 +00:00
Emanuele Aliberti
3b0f32720d Mm subsystem exports table complete.
svn path=/trunk/; revision=1101
2000-04-02 13:32:43 +00:00
Jason Filby
fccf1c26a7 All video related files now loaded by win32k
svn path=/trunk/; revision=1100
2000-04-02 13:09:50 +00:00
Jason Filby
b8d0ffaf38 Use NonPagedPool in EngAllocMem for now
svn path=/trunk/; revision=1099
2000-04-02 12:44:57 +00:00
Emanuele Aliberti
49f35db9e8 Version info for Named Pipe fs driver.
svn path=/trunk/; revision=1098
2000-04-01 14:20:21 +00:00
Emanuele Aliberti
1fc2971156 Version info for Minix driver.
svn path=/trunk/; revision=1097
2000-04-01 14:19:48 +00:00
Emanuele Aliberti
cdbe762497 Version info for ext2fs driver.
svn path=/trunk/; revision=1096
2000-04-01 14:19:07 +00:00
Jason Filby
248fe1f79d Implemented basic VGA routines
Implemented Eng\DrvLineTo

svn path=/trunk/; revision=1095
2000-04-01 12:31:29 +00:00
David Welch
9d6388ae05 Corrected mutex implementation
Added proper locking to the memory managment

svn path=/trunk/; revision=1093
2000-03-29 13:11:55 +00:00
Phillip Susi
3bd2a11130 Fixed typeo preventing compilation
svn path=/trunk/; revision=1092
2000-03-29 03:15:11 +00:00
David Welch
1be4f77bcb Corrected the handle generation algorithm in the kernel and csrss
Did some work on services.exe
Did some work on the service functions in advapi32
Made some progress in implementing npfs
Implemented a basic grammar for midl

svn path=/trunk/; revision=1091
2000-03-26 22:00:10 +00:00
Emanuele Aliberti
758ba695e1 Io subsystem clean-up. Every exported symbols is not STDCALL.
NtCreateFile renamed IoCreateFile and Nt{Create,Open}File call IoCreateFile.
Io data items added (to be fixed).

svn path=/trunk/; revision=1090
2000-03-26 19:38:32 +00:00
David Welch
79eff41abb Connected standard input/output to the console
Removed from superfluous assertions
Changed the ide read and write commands to work with bochs
Corrected bug in the csrss server

svn path=/trunk/; revision=1089
2000-03-24 22:25:39 +00:00
David Welch
0bd4cf0cbf Updated the minix driver
Moved console handling into csrss
Gave each process a name for debugging purposes

svn path=/trunk/; revision=1088
2000-03-22 18:36:00 +00:00
Eric Kohl
a1c9a520cf Modified kernel initialization sequence
Enabled bus handlers

svn path=/trunk/; revision=1087
2000-03-20 18:00:55 +00:00
Eric Kohl
dc3956d8ac Added some more status codes
svn path=/trunk/; revision=1086
2000-03-19 15:57:39 +00:00
Eric Kohl
802301d861 Implemented bus handler functions (not working yet)
Several STDCALL fixes

svn path=/trunk/; revision=1085
2000-03-19 13:35:38 +00:00
Eric Kohl
9887130ab7 Implemented bus handler functions (not working yet)
svn path=/trunk/; revision=1084
2000-03-19 13:33:39 +00:00
Eric Kohl
d4fc70afdc Implemented VideoPortDebugPrint()
svn path=/trunk/; revision=1083
2000-03-19 13:31:37 +00:00
Eric Kohl
bd02ee978f Added SYSTEM_TIME_INFORMATION
svn path=/trunk/; revision=1082
2000-03-19 13:30:30 +00:00
Emanuele Aliberti
bc30557a61 Some clean-up in ntoskrnl/mm. MmAllocateSection prototype moved in
internal/mm.h.

svn path=/trunk/; revision=1081
2000-03-19 09:14:52 +00:00
Eric Kohl
56132bfb44 Fixed path bugs
svn path=/trunk/; revision=1080
2000-03-18 19:55:53 +00:00
Jason Filby
c4ecfc894c Added forgotten .h files
svn path=/trunk/; revision=1079
2000-03-18 18:39:44 +00:00
Emanuele Aliberti
d6f6aad9e7 qsort in NTOSKRNL and some STDCALL declarations.
svn path=/trunk/; revision=1078
2000-03-18 15:12:19 +00:00
Eric Kohl
5e7a2202d1 Oops...
svn path=/trunk/; revision=1077
2000-03-18 14:37:43 +00:00
Eric Kohl
2c6fae9c20 Added image functions
Include pe.h in windows.h to avoid conflicts

svn path=/trunk/; revision=1076
2000-03-18 14:02:01 +00:00
Eric Kohl
1042f1ae27 Added security descriptor functions
svn path=/trunk/; revision=1075
2000-03-18 13:48:24 +00:00
Eric Kohl
753cb16c91 Fixed compiler warnings
svn path=/trunk/; revision=1074
2000-03-18 02:39:39 +00:00
Jason Filby
5d99a8740a last mod...
svn path=/trunk/; revision=1073
2000-03-17 22:19:44 +00:00
Jason Filby
1ba7343b1c Additional modifications
svn path=/trunk/; revision=1072
2000-03-17 22:14:31 +00:00
Jason Filby
2adbc636a8 Additional modifications
svn path=/trunk/; revision=1071
2000-03-17 21:56:43 +00:00
Jason Filby
c404283ff4 Additional modifications
svn path=/trunk/; revision=1070
2000-03-17 21:49:32 +00:00
Eric Kohl
d9d3272dc6 Fixed compiler warning
svn path=/trunk/; revision=1069
2000-03-17 21:46:41 +00:00
Jason Filby
690a781452 Added eng files
svn path=/trunk/; revision=1068
2000-03-17 21:44:02 +00:00
Jason Filby
e1d6086025 Miniport driver now loaded from win32k
Display and miniport drivers can now talk to each other
Sets the VGA video mode

svn path=/trunk/; revision=1067
2000-03-17 21:02:59 +00:00
Eric Kohl
40ee84e997 Oops! Typos...
svn path=/trunk/; revision=1066
2000-03-16 21:50:56 +00:00
Eric Kohl
ef5f880bac Fixed ANSI <--> Unicode conversions
svn path=/trunk/; revision=1065
2000-03-16 21:50:11 +00:00
David Welch
6088637c5e Oops.
svn path=/trunk/; revision=1064
2000-03-16 20:50:48 +00:00
Eric Kohl
0344745e30 Fixed a confusing error message
svn path=/trunk/; revision=1063
2000-03-16 20:02:44 +00:00
David Welch
337952bfb9 Implemented setting the fs register to point to the TEB
svn path=/trunk/; revision=1062
2000-03-16 18:44:57 +00:00
Eric Kohl
15c9809105 Fixed ANSI/OEM <--> Unicode conversions
svn path=/trunk/; revision=1061
2000-03-16 01:14:58 +00:00
Eric Kohl
b820741431 Fixed WIN32_FIND_DATA[A/W] structs and resulting bugs
svn path=/trunk/; revision=1060
2000-03-15 23:13:29 +00:00
Eric Kohl
67200bd4f9 Fixed ANSI/OEM <--> Unicode conversions
svn path=/trunk/; revision=1059
2000-03-15 18:30:30 +00:00
Eric Kohl
b2eb99d9f7 Obsolete!
svn path=/trunk/; revision=1058
2000-03-15 18:29:50 +00:00
Eric Kohl
9658579d48 Fixed ANSI/OEM <--> Unicode conversions
svn path=/trunk/; revision=1057
2000-03-15 12:25:47 +00:00
Eric Kohl
1c5d2b7204 Fixed ANSI/OEM <--> Unicode conversions
svn path=/trunk/; revision=1056
2000-03-14 23:09:23 +00:00
David Welch
fbfce3bc03 Updated install script
svn path=/trunk/; revision=1055
2000-03-13 23:16:46 +00:00
Eric Kohl
045a3dfdd2 Unused characters in long file name buffers (directory slots) must be filled with 0xFFFF.
svn path=/trunk/; revision=1054
2000-03-13 17:58:06 +00:00
Eric Kohl
2ef0c4177b Fixed a bug in rtlGetFullPathName_U()
svn path=/trunk/; revision=1053
2000-03-13 17:54:23 +00:00
Eric Kohl
6865b783cc Fixed file creation date and time
Implemented synchronization of all FATs (FAT16 only)
Fixed bug in directory creation

svn path=/trunk/; revision=1052
2000-03-12 23:28:59 +00:00
Eric Kohl
15094179f1 Add MD command
svn path=/trunk/; revision=1051
2000-03-12 23:24:51 +00:00
Eric Kohl
d9a0a586a8 Updated INTERFACE_TYPE
svn path=/trunk/; revision=1050
2000-03-12 01:22:37 +00:00
Eric Kohl
afa23cb264 Added some security functions
svn path=/trunk/; revision=1049
2000-03-12 01:18:18 +00:00
Eric Kohl
9488b3031c Fixed lots of status values
svn path=/trunk/; revision=1048
2000-03-12 01:15:09 +00:00
Emanuele Aliberti
a665da497e NTOKRNL.FsRtl notification and cache tunnels stubs added.
Possibly fixed the win32k.sys import error reported by Jason.

svn path=/trunk/; revision=1047
2000-03-11 00:51:36 +00:00
Emanuele Aliberti
f1d9e95a84 NTOSKRNL.FsRtl opportunistic lock stubs added.
svn path=/trunk/; revision=1046
2000-03-10 22:09:17 +00:00
Eric Kohl
91d68b2e7b Fixed compiler warning
svn path=/trunk/; revision=1045
2000-03-10 13:46:27 +00:00
Jason Filby
200afa376d Add VGA display driver
svn path=/trunk/; revision=1044
2000-03-10 12:45:45 +00:00
Jason Filby
836456a97d Small fix
svn path=/trunk/; revision=1043
2000-03-10 12:39:53 +00:00
Jason Filby
10f82cf988 Implemented DRIVER_BuildDDIFunctions
svn path=/trunk/; revision=1042
2000-03-09 21:04:10 +00:00
Eric Kohl
bf4806c502 Added time related functions
svn path=/trunk/; revision=1041
2000-03-09 16:01:25 +00:00
Eric Kohl
89871935c1 Implemented bitmap functions
svn path=/trunk/; revision=1040
2000-03-09 00:14:10 +00:00
Emanuele Aliberti
c3f375c672 win32k.sys exports script.
svn path=/trunk/; revision=1039
2000-03-08 22:39:04 +00:00
Emanuele Aliberti
267e86b00e Version info added to Eric's edit port.
svn path=/trunk/; revision=1038
2000-03-08 22:38:01 +00:00
Emanuele Aliberti
b129b2caea Some minor fixes.
svn path=/trunk/; revision=1037
2000-03-08 22:37:04 +00:00
Jason Filby
3da0b018e5 Moved display driver and got win32k loading it's entry point.
svn path=/trunk/; revision=1036
2000-03-08 21:23:14 +00:00
Eric Kohl
e2eb8c1697 Added more bitmap functions
Fixed some STDCALL issues

svn path=/trunk/; revision=1035
2000-03-08 01:55:34 +00:00
Eric Kohl
a12836346f Improved keyboard handling code
Fixed problems with differnet console sizes
Started function renaming

svn path=/trunk/; revision=1034
2000-03-08 01:49:37 +00:00
Emanuele Aliberti
1eed2a945a Added .Type and .Size attributes to the IRP object: so far nothing
seems broken.
Added __stdcall to some Io subsystem functions.
Attempt to implement IoIsOperationSynchronous().

svn path=/trunk/; revision=1033
2000-03-06 01:02:30 +00:00
Eric Kohl
79d0e047eb Added D-Flat/32 library
svn path=/trunk/; revision=1032
2000-03-05 19:58:08 +00:00
Emanuele Aliberti
2634e901be NTOSKRNL.FSRtl MDL stubs added.
svn path=/trunk/; revision=1031
2000-03-05 19:17:43 +00:00
Eric Kohl
9eac680002 Implemented kernel parameter line
Some kernel debugger improvements

svn path=/trunk/; revision=1030
2000-03-04 22:03:32 +00:00
Emanuele Aliberti
51df161b78 *** empty log message ***
svn path=/trunk/; revision=1029
2000-03-04 20:45:34 +00:00
Eric Kohl
2b0d467176 Moved spinlock.c and head.s from 'hal/x86' to 'ke'.
This is needed for the hal separation.

svn path=/trunk/; revision=1028
2000-03-04 13:44:59 +00:00
Eric Kohl
92857818cb Added bitmaps
Added some Rtl string functions
Various changes

svn path=/trunk/; revision=1026
2000-03-03 00:48:50 +00:00
Eric Kohl
fd304f0ef5 Fixed compiler warnings
svn path=/trunk/; revision=1025
2000-03-03 00:34:54 +00:00
Emanuele Aliberti
ef5b0066c7 *** empty log message ***
svn path=/trunk/; revision=1024
2000-03-01 23:41:35 +00:00
Emanuele Aliberti
395fb3c86f NTOSKRNL.FsRtlAllocate functions.
svn path=/trunk/; revision=1023
2000-03-01 22:52:28 +00:00
Eric Kohl
76f55a8a93 Fixed mp driver initialization bug and some other ones
svn path=/trunk/; revision=1022
2000-03-01 03:25:11 +00:00
Emanuele Aliberti
d53eeb0cee Added help command to shell.exe.
Minor changes.

svn path=/trunk/; revision=1021
2000-02-29 23:57:47 +00:00
Eric Kohl
c37b4fd7f1 Fixed some unicode initialization bugs
svn path=/trunk/; revision=1020
2000-02-27 18:01:44 +00:00
Eric Kohl
c0ad0d9b02 Added 'Path' and 'windir' system environment variables
svn path=/trunk/; revision=1019
2000-02-27 15:47:17 +00:00
Eric Kohl
853d9d4ae2 Fixed bugs in RtlExpandEnvironmentStrings_U() and RtlSetEnvironmentVariable()
svn path=/trunk/; revision=1018
2000-02-27 15:45:57 +00:00
Eric Kohl
6eb7010078 Fixed bugs in '%wZ' string output
svn path=/trunk/; revision=1017
2000-02-27 15:43:58 +00:00
Jason Filby
48db9468eb Minor fixes
svn path=/trunk/; revision=1016
2000-02-27 11:04:36 +00:00
Eric Kohl
fa81b6d260 Improved csrss (doesn't crash any more)
Improved kernel debugger code
Various minor improvements

svn path=/trunk/; revision=1015
2000-02-27 02:12:07 +00:00
Eric Kohl
012968e3dc Removed obsolete header include
svn path=/trunk/; revision=1014
2000-02-26 23:20:50 +00:00
Emanuele Aliberti
debfec7180 Some __stdcall declarations in ntoskrnl/hal.
A new include/ddk/kdfuncs.h header.

svn path=/trunk/; revision=1013
2000-02-26 22:41:35 +00:00
Emanuele Aliberti
4b80eae220 File locking NTOSKRNL.FsRtl stubs.
svn path=/trunk/; revision=1012
2000-02-26 16:22:27 +00:00
Boudewijn Dekker
ad382b39b3 changed struct FILE_OBJECT* to struct _FILE_OBJECT* at line 154
svn path=/trunk/; revision=1011
2000-02-26 09:58:06 +00:00
Eric Kohl
89875c3a44 Improved RtlCreateUserProcess()
svn path=/trunk/; revision=1010
2000-02-25 23:58:57 +00:00
Emanuele Aliberti
8f1ea8477c FsRtl stubs for DBCS names handling.
svn path=/trunk/; revision=1009
2000-02-25 23:27:51 +00:00
Eric Kohl
26253d8e9b Fixed PEB related bugs
svn path=/trunk/; revision=1008
2000-02-25 00:35:06 +00:00
Eric Kohl
0723b7c345 Removed useless debug messages and header files
svn path=/trunk/; revision=1007
2000-02-25 00:34:12 +00:00
Emanuele Aliberti
ac8c87276f Minor changes.
svn path=/trunk/; revision=1006
2000-02-24 23:38:26 +00:00
Emanuele Aliberti
00a4935163 *** empty log message ***
svn path=/trunk/; revision=1005
2000-02-24 23:31:27 +00:00
Emanuele Aliberti
9dc1aa60cb Changes for FsRtl added functions.
svn path=/trunk/; revision=1004
2000-02-24 23:27:52 +00:00
Emanuele Aliberti
9f87d15938 More stubs for NTOSKRNL.FsRtl: file name handling.
svn path=/trunk/; revision=1003
2000-02-24 23:25:16 +00:00
Eric Kohl
d7de328d0c Replaced direct io space mapping by call to MmMapIoSpace()
svn path=/trunk/; revision=1002
2000-02-24 13:16:40 +00:00
Eric Kohl
6165746875 Added gdi test program gditest.exe
svn path=/trunk/; revision=1001
2000-02-22 20:58:26 +00:00
Eric Kohl
7b02da36f7 Added GdiDllInitialize()
svn path=/trunk/; revision=1000
2000-02-22 20:55:57 +00:00
Eric Kohl
f8fe1ea0b1 Added W32kInitialize service (orig. name NtGdiInit)
svn path=/trunk/; revision=999
2000-02-22 20:53:11 +00:00
Eric Kohl
213e8b569c Fixed minor bugs interrupt_service2e()
svn path=/trunk/; revision=998
2000-02-22 20:50:07 +00:00
Rex Jolliff
5db4e55264 added support for shadow syscall table
svn path=/trunk/; revision=997
2000-02-22 07:27:30 +00:00
Eric Kohl
7cb2e823a0 Fixed minor bugs. 'ddk/ntddk.h' MUST ALWAYS be included FIST!!!!!
svn path=/trunk/; revision=996
2000-02-22 02:02:08 +00:00
Eric Kohl
d1341007cf Changed RtlCopyMemory() from function to macro
Improved system service table code

svn path=/trunk/; revision=995
2000-02-21 22:44:37 +00:00
Emanuele Aliberti
151f2f646e WIN32K Kernel API main include file (replaces win32k/win32k.h).
svn path=/trunk/; revision=994
2000-02-21 00:50:17 +00:00
Emanuele Aliberti
7d3fded0ba Added little prog. that builds the WIN32K.SYS service table
and the stubs to be used in GDI32.DLL.
Converted to __stdcall every W32k... call in WIN32K.SYS.
Fixed the entry point in GDI32.DLL.
WARNING: the thing compiles, but Jason reports it does not work as is
(he tested a preliminary stub piece of code).
Perhaps changing it (as Phillip proposes) or fixing it to make WIN32K.SYS
work the NT way is required (Hernan, are you there: I did not understand
well how the additional service tables work). Feel free to change it.

svn path=/trunk/; revision=993
2000-02-20 22:52:50 +00:00
Eric Kohl
b9bb1744aa Fixed bugs in process parameter and environment code
svn path=/trunk/; revision=992
2000-02-19 19:37:13 +00:00
Eric Kohl
e632116bee Fixed buggy RtlCompareString() and RtlCompareUnicodeString()
svn path=/trunk/; revision=991
2000-02-19 19:31:41 +00:00
Eric Kohl
f28a023c99 Fixed a bug - memmove() couldn't handle overlapping buffers
svn path=/trunk/; revision=990
2000-02-19 17:18:34 +00:00
Eric Kohl
b0780ae5d6 Fixed environment implementation
Fixed current directory implementation

svn path=/trunk/; revision=989
2000-02-18 01:01:06 +00:00
Eric Kohl
6bea08705e Fixed minor bugs and removed fixed start directory
svn path=/trunk/; revision=988
2000-02-18 00:53:11 +00:00
Eric Kohl
6708f0b87e Fixed environment implementation
Fixed current directory implementation

svn path=/trunk/; revision=987
2000-02-18 00:51:03 +00:00
Emanuele Aliberti
f0175145d6 Untested raw implementation of MultiByteToWideChar().
svn path=/trunk/; revision=986
2000-02-14 22:10:46 +00:00
David Welch
3cd2fc22d7 Fixed compilation bug
Made a start on some documentation in info format

svn path=/trunk/; revision=985
2000-02-14 14:13:34 +00:00
Boudewijn Dekker
b49921cb96 impl. NtGetTickCount
svn path=/trunk/; revision=984
2000-02-14 10:27:40 +00:00
David Welch
c110a36a78 Moved user-process loading into ZwCreateProcess
svn path=/trunk/; revision=983
2000-02-13 16:05:19 +00:00
Eric Kohl
ca7bca8f84 Fixed a bug in NtQueryVirtualMemory()
svn path=/trunk/; revision=982
2000-02-06 15:52:04 +00:00
Eric Kohl
5f71c29e2c Fixed _wcsnicmp()
svn path=/trunk/; revision=981
2000-02-05 23:46:14 +00:00
Eric Kohl
326a3cd58b Added some string functions
Added security descriptor functions
Implemented environment functions
Implemented current directory functions

svn path=/trunk/; revision=980
2000-02-05 16:08:49 +00:00
Eric Kohl
18c0c85dd8 Added CHECKPOINT macro
svn path=/trunk/; revision=978
2000-02-03 22:45:11 +00:00
Phillip Susi
480136bdf4 Fixed loader bugs, still needs reworked to create multiple sections
svn path=/trunk/; revision=977
2000-02-03 21:34:14 +00:00
Paolo Pantaleo
16ef6ef2af history command added and some minor changes to history interface
svn path=/trunk/; revision=976
2000-02-01 18:29:11 +00:00
Eric Kohl
33258c166f Fixed a stdcall bug
svn path=/trunk/; revision=975
2000-01-31 20:26:15 +00:00
Eric Kohl
f09ef9894a Fixed an invalid printf() format type
svn path=/trunk/; revision=974
2000-01-31 20:25:43 +00:00
Eric Kohl
19e258120e Fixed compiler warnings
svn path=/trunk/; revision=973
2000-01-31 20:24:41 +00:00
Eric Kohl
7c3e6e80c1 Fixed METAFILEPICT bug
svn path=/trunk/; revision=972
2000-01-31 20:23:54 +00:00
Hernan Ochoa
5dc3ee0414 Added $Id Tag for commit info
svn path=/trunk/; revision=971
2000-01-30 20:55:51 +00:00
Hernan Ochoa
90579ae67f Added $Id Tag for commit info
svn path=/trunk/; revision=970
2000-01-30 17:02:44 +00:00
Phillip Susi
5dff1d9789 ignore errors deleting files for make clean
svn path=/trunk/; revision=969
2000-01-29 20:32:12 +00:00
Hernan Ochoa
337692832a Added parameters checking, help, and some information about
when the program was compiled.

svn path=/trunk/; revision=968
2000-01-29 19:20:26 +00:00
David Welch
d633bd8168 Changed the loader so ZwCreateProcess now maps ntdll into memory
svn path=/trunk/; revision=967
2000-01-27 08:56:50 +00:00
Jason Filby
980d94c760 *** empty log message ***
svn path=/trunk/; revision=966
2000-01-26 21:10:16 +00:00
David Welch
d24a48cd94 More improvements to LPC code
Updated TEB structure
Changed selectors value to be closer to nt
Some bugfixes

svn path=/trunk/; revision=965
2000-01-26 10:07:30 +00:00
Phillip Susi
52404fd1c8 Fixed bug in IO manager that caused crash when trying to open a file on a non existant device
Fixed memory leaks in object manager

svn path=/trunk/; revision=964
2000-01-25 06:31:25 +00:00
Emanuele Aliberti
3a18299c0f Coders directory updated.
svn path=/trunk/; revision=963
2000-01-23 22:52:57 +00:00
Phillip Susi
c41488b99a Fixed syntax error
svn path=/trunk/; revision=962
2000-01-23 19:36:41 +00:00
Hernan Ochoa
3cd7e191a4 now NTOSKRNL exports KeServiceDescriptorTable just like
NT's NTOSKRNL does.

svn path=/trunk/; revision=961
2000-01-23 15:21:25 +00:00
Hernan Ochoa
185d2be0f1 added definitions for SSDT, SSPT, KeServiceDescriptorTable,
KeServiceDescriptorTableShadow, KeAddSystemService(),
KE_SERVIDE_DESCRIPTOR_TABLE_ENTRY.

svn path=/trunk/; revision=960
2000-01-23 15:19:05 +00:00
Hernan Ochoa
55bb357489 changed syscall tables. now it mimics NT style.
it has a SSDT a SSPT, a KeServiceDescriptorTable and a
KeServiceDescriptorTableShadow. modified the code
inside the int2e_handler() to use the new syscall tables.

svn path=/trunk/; revision=959
2000-01-23 15:17:06 +00:00
Hernan Ochoa
65a742ceaa changed syscall tables. now it mimics NT style.
it has a SSDT a SSPT, a KeServiceDescriptorTable and a
KeServiceDescriptorTableShadow. genntdll now also generates
some useful defines about min syscall number, max
syscall number, and number of syscalls.

svn path=/trunk/; revision=958
2000-01-23 15:14:42 +00:00
Phillip Susi
1220167730 New Read/Write File IO test utility
svn path=/trunk/; revision=957
2000-01-23 09:04:30 +00:00
Phillip Susi
2001008199 Fixed OutputDebugString() to use the new int 2D debug service
Moved include of rules.mak up to top so it picks up the HOST variable from there

svn path=/trunk/; revision=956
2000-01-23 08:16:20 +00:00
Emanuele Aliberti
74131ebded Added error reporting to lpcsrv and lpcclt.
svn path=/trunk/; revision=955
2000-01-22 22:22:48 +00:00
Emanuele Aliberti
5415f6f333 Fixed a stupid bug in time conversion code that generated abnormally high
build numbers.

svn path=/trunk/; revision=954
2000-01-22 14:25:48 +00:00
Phillip Susi
0ab77c8e74 Fixed a broken DPRINT
svn path=/trunk/; revision=953
2000-01-22 00:04:56 +00:00
Phillip Susi
51445f2db1 Made symbolic links permanent the proper way, with the perm flag, rather than leaking a refcount
svn path=/trunk/; revision=952
2000-01-21 23:59:53 +00:00
Phillip Susi
4d393f112a darnit... another debug print.. someone kick me
svn path=/trunk/; revision=951
2000-01-21 23:27:47 +00:00
Phillip Susi
a706ca2b64 Ooops... forgot some debug prints ( embarassed )
svn path=/trunk/; revision=950
2000-01-21 23:17:47 +00:00
Phillip Susi
e4008de214 Fixed makefile to include rules.mak first, so it gets the settings in there right
Fixed path parsing for \\.\

svn path=/trunk/; revision=949
2000-01-21 23:06:26 +00:00
Eric Kohl
2a24d175bf Replaced calls to aprintf() or dprintf() by DPRINT()
Removed old debugging code

svn path=/trunk/; revision=948
2000-01-20 22:57:01 +00:00
Eric Kohl
b6c944afcc Added missing format types to vfprintf()
Implemented vfwprintf()

svn path=/trunk/; revision=947
2000-01-20 22:49:12 +00:00
Emanuele Aliberti
90617da53d Minor changes.
svn path=/trunk/; revision=946
2000-01-20 22:14:45 +00:00
Emanuele Aliberti
b6de29fefb Two more FsRtl stubs.
svn path=/trunk/; revision=945
2000-01-20 22:14:08 +00:00
Emanuele Aliberti
8b078f86ae Updated fsfuncs.h with latest stubs prototypes.
svn path=/trunk/; revision=944
2000-01-20 22:11:48 +00:00
Eric Kohl
1b92b852eb Cleanup
Added '%I64' format type

svn path=/trunk/; revision=943
2000-01-19 19:48:20 +00:00
Eric Kohl
072eed4ad3 Fixed compiler warning
svn path=/trunk/; revision=942
2000-01-19 19:47:15 +00:00
Eric Kohl
75f2f5b22e Fixed ugly bug in the serial debugging code
svn path=/trunk/; revision=941
2000-01-19 16:24:15 +00:00
Rex Jolliff
90e1f4cbf9 changes to support v15 release
svn path=/trunk/; revision=939
2000-01-19 07:05:04 +00:00
Eric Kohl
921363d647 Changed debug output to use INT 2D
svn path=/trunk/; revision=938
2000-01-18 12:04:45 +00:00
Eric Kohl
8234dea660 Changed debug output to use INT 2D
Ooops! This one was missing! Sorry!

svn path=/trunk/; revision=937
2000-01-18 11:04:53 +00:00
Eric Kohl
88cb154d19 Changed debug output to use INT 2D
svn path=/trunk/; revision=936
2000-01-17 21:02:50 +00:00
Phillip Susi
faac123528 fixed tab completion with long file names
svn path=/trunk/; revision=935
2000-01-17 02:17:50 +00:00
Emanuele Aliberti
e857e97df1 Some more stubs for NDIS.SYS.
svn path=/trunk/; revision=934
2000-01-16 18:32:34 +00:00
Emanuele Aliberti
d508a1f0bf Added two missing names.
svn path=/trunk/; revision=933
2000-01-16 18:31:48 +00:00
Eric Kohl
013fc117b8 Added missing features and functions
Cleaned confusing file naming

svn path=/trunk/; revision=932
2000-01-14 02:23:25 +00:00
Eric Kohl
3d1f2d98ba Added missing printf() functions
Changed format %w to %S and %W to %wZ

svn path=/trunk/; revision=931
2000-01-12 19:05:32 +00:00
Eric Kohl
de66c40007 Disabled debugging messages
svn path=/trunk/; revision=930
2000-01-11 17:33:44 +00:00
Eric Kohl
6cc53dd4b3 Fixed process parameters
Simplified current directory code
Added %C and %S formats to printf()
Changed %w to %S
Fixed compiler warnings

svn path=/trunk/; revision=929
2000-01-11 17:32:13 +00:00
Eric Kohl
fb7f4582cd Fixed ctype and Rtl functions
svn path=/trunk/; revision=928
2000-01-11 01:16:50 +00:00
Emanuele Aliberti
a11a76eaef Some more NTOSKRNL.FsRtl stubs.
svn path=/trunk/; revision=927
2000-01-10 22:46:38 +00:00
Eric Kohl
be132afdf2 Added DbgPrint()
Fixed some Rtl functions
Added missing printf() and wprintf() functions

svn path=/trunk/; revision=926
2000-01-10 20:34:41 +00:00
Eric Kohl
686387f8e0 Removed fixed screen size code
svn path=/trunk/; revision=925
2000-01-09 23:16:41 +00:00
Eric Kohl
492a608e06 Fixed hal display bug
svn path=/trunk/; revision=924
2000-01-09 21:39:07 +00:00
Emanuele Aliberti
fd411d8b8c New year in c/r string.
svn path=/trunk/; revision=923
2000-01-08 16:17:50 +00:00
Eric Kohl
6f3d53f751 Added reading screen sizes from crt controller
svn path=/trunk/; revision=922
2000-01-07 18:57:33 +00:00
Emanuele Aliberti
462fe323eb A few more return structures for NtQuerySystemInformation
svn path=/trunk/; revision=921
2000-01-06 13:17:48 +00:00
David Welch
4d8c6a710b Removed debug messages from queuing code (sorry)
Added __int64 datatype to files that use it
Hid bug in ide driver (or somewhere) for now

svn path=/trunk/; revision=920
2000-01-06 00:26:16 +00:00
David Welch
623093eaaa Implemented more security functions
Moved general security types into new header file
Implemented ThreadImpersonationToken info class
Bug fixes to queuing code

svn path=/trunk/; revision=919
2000-01-05 21:57:00 +00:00
Eric Kohl
453f513ed3 Fixed ctype table and functions.
svn path=/trunk/; revision=918
2000-01-05 19:42:56 +00:00
Eric Kohl
57919a833e Fixed ctype table.
svn path=/trunk/; revision=917
2000-01-05 17:49:00 +00:00
David Welch
e6b5c8bfc7 Disabled pragma statement that was causing problems
svn path=/trunk/; revision=916
2000-01-02 14:21:04 +00:00
Eric Kohl
974095c413 Added mbtowc(), mbstowcs(), wctomb() and wcstombs()
svn path=/trunk/; revision=914
1999-12-30 14:39:43 +00:00
David Welch
a8ca53d761 Added some additional csrss work
Some fixes to the queueing code
Some fixes to the lpc code
Fix to section code

svn path=/trunk/; revision=913
1999-12-30 01:51:42 +00:00
Eric Kohl
c54d897571 Added even more missing functions
svn path=/trunk/; revision=912
1999-12-30 01:33:47 +00:00
Eric Kohl
17afcb4dfd Added some missing debug, math and ctype functions
svn path=/trunk/; revision=911
1999-12-29 17:13:27 +00:00
Eric Kohl
2284e742b3 Fixed implementation of register io functions
Added luid functions

svn path=/trunk/; revision=910
1999-12-29 01:37:30 +00:00
Eric Kohl
c7580dacf3 Last update for millenium release
Fixed some minor bugs
Fixed window title

svn path=/trunk/; revision=909
1999-12-28 23:13:38 +00:00
Eric Kohl
9446011fc1 Minor update
svn path=/trunk/; revision=908
1999-12-28 16:25:21 +00:00
Emanuele Aliberti
586433918e Some more NDIS stubs.
svn path=/trunk/; revision=907
1999-12-27 22:27:39 +00:00
Eric Kohl
b9579544e7 Removed cmd target
svn path=/trunk/; revision=906
1999-12-27 15:07:00 +00:00
Eric Kohl
005106acbb Fixed some more STDCALL issues
svn path=/trunk/; revision=905
1999-12-27 15:06:13 +00:00
Emanuele Aliberti
38d1018911 Added (io/create.c) IoCreateFile stub.
svn path=/trunk/; revision=904
1999-12-26 20:21:03 +00:00
Emanuele Aliberti
ea5959a772 Some missing __stdcall declarations added in headers and in code.
svn path=/trunk/; revision=903
1999-12-26 17:22:19 +00:00
Emanuele Aliberti
6b50f46c2f Some old Fs/Po code added to the makefile
svn path=/trunk/; revision=902
1999-12-26 16:36:46 +00:00
David Welch
4d5643a96a Added some security functions
Changes to csrss console support
Fixed bug in gdt.c

svn path=/trunk/; revision=901
1999-12-26 15:50:53 +00:00
Eric Kohl
128cfc8af0 Fixed compiler warnings
svn path=/trunk/; revision=900
1999-12-24 17:20:54 +00:00
Eric Kohl
a7a23b4dc3 Added missing test
svn path=/trunk/; revision=899
1999-12-24 17:16:32 +00:00
David Welch
dbd051cad4 Corrected additional object manager issues pointed by Philip Susi
Began added console i/o code to csrss (not working yet)
Corrected long standing page fault bug (not zeroing allocated page)

svn path=/trunk/; revision=898
1999-12-22 14:48:30 +00:00
Phillip Susi
1667a4589a fixed typeo
svn path=/trunk/; revision=897
1999-12-20 21:30:13 +00:00
Eric Kohl
6a617736e9 Fixed a compiler warning
svn path=/trunk/; revision=896
1999-12-20 21:05:53 +00:00
Phillip Susi
d832a87f14 fixed missing dereference and cleaned up code in NtCreateEvent
svn path=/trunk/; revision=895
1999-12-20 20:49:27 +00:00
David Welch
13541861b1 Fixed problem with handles not being released
Changed page fault handling to take account of the error code
Changed handle table locking

svn path=/trunk/; revision=894
1999-12-20 02:14:40 +00:00
Phillip Susi
dfa5f04c63 merged better assert code back into main trunk
svn path=/trunk/; revision=893
1999-12-18 19:50:24 +00:00
David Welch
cc5dc64c30 Worked around compiler bug in NtDelayExecution
Added some page free checking
Reorganised thread code a bit

svn path=/trunk/; revision=892
1999-12-18 17:48:23 +00:00
Emanuele Aliberti
8abc09ec0d Versio info actually linked in *.sys modules
svn path=/trunk/; revision=891
1999-12-18 10:17:42 +00:00
Emanuele Aliberti
5b86e3a918 RtlNtStatusToDosError and RtlNtStatusToPsxErrno declared __stdcall
svn path=/trunk/; revision=890
1999-12-18 10:16:11 +00:00
Emanuele Aliberti
e5b9e13d59 Minor changes
svn path=/trunk/; revision=889
1999-12-18 10:15:11 +00:00
Phillip Susi
bfaef27782 Added tracking of running threads in a process, and termination of process when all threads terminate
svn path=/trunk/; revision=888
1999-12-18 07:33:53 +00:00
Phillip Susi
4e94397e24 Added list of threads in process
svn path=/trunk/; revision=887
1999-12-18 07:28:28 +00:00
Phillip Susi
683932b845 changed to use proper type for dispatcher header, instead of PVOID in WAIT_BLOCK
svn path=/trunk/; revision=886
1999-12-17 23:30:48 +00:00
Phillip Susi
4ce5c9d3b4 fixed WaitForMultipleObjects()'s handling of the WaitAll flag
svn path=/trunk/; revision=885
1999-12-17 23:24:27 +00:00
Phillip Susi
6b53b3acea Working and tested KeWaitForXXX
svn path=/trunk/; revision=884
1999-12-17 23:23:36 +00:00
Eric Kohl
81547d8842 Added missing .cvsignore file
svn path=/trunk/; revision=883
1999-12-16 23:09:34 +00:00
Eric Kohl
1b0b103796 Added a time conversion function and fixed a little bug
(fat stores only 2 second steps)

svn path=/trunk/; revision=882
1999-12-16 23:08:17 +00:00
Phillip Susi
98a6084104 found that list corruption bug. it was also resulting in a meory spray
svn path=/trunk/; revision=881
1999-12-16 22:59:03 +00:00
Phillip Susi
96aed594a2 fixed CreateEvent() with NULL name
svn path=/trunk/; revision=879
1999-12-16 17:48:43 +00:00
Phillip Susi
ca6a107ee2 fixed a few bugs in wait code
svn path=/trunk/; revision=878
1999-12-16 05:13:06 +00:00
Phillip Susi
414cd229d9 new event test app
svn path=/trunk/; revision=877
1999-12-16 05:12:12 +00:00
Eric Kohl
a09b668be6 Added missing .cvsignore file
svn path=/trunk/; revision=876
1999-12-16 00:15:19 +00:00
Phillip Susi
7f63532d94 fixed timeout on wait functions
svn path=/trunk/; revision=875
1999-12-15 06:48:10 +00:00
Eric Kohl
8bbcdc3d4a Fixed current directory handling
Added new prompt functions
Fixed dangling pointer bug in copy command

svn path=/trunk/; revision=874
1999-12-15 00:50:41 +00:00
Phillip Susi
43d5d0b2f0 used proper type pointer instead of PVOID
svn path=/trunk/; revision=873
1999-12-14 18:44:38 +00:00
Phillip Susi
a409988b36 missing initialization of Thread->Tcb.WaitBlockList
svn path=/trunk/; revision=872
1999-12-14 18:35:19 +00:00
Phillip Susi
33009b967e bug fix with file object's name being freed but the pointer not NULLed
svn path=/trunk/; revision=871
1999-12-14 18:32:38 +00:00
Phillip Susi
4c2f15bfb9 fixed runnable thread counters
svn path=/trunk/; revision=870
1999-12-14 00:54:29 +00:00
David Welch
c40b27bbc4 Forgot to remove obsolete file
svn path=/trunk/; revision=869
1999-12-13 23:07:49 +00:00
David Welch
ac7a3aa542 Reworked APC and waiting code, seems more stable now
KeWaitForMultipleObjects is broken, shouldn't be difficult to fix
Corrected bug in ntdll ldr which prevented VC applications being loaded
Added thread testing application
Tried to make thread termination reentrant
Improved stack frame dump

svn path=/trunk/; revision=868
1999-12-13 22:04:41 +00:00
Phillip Susi
90e6a2244e missing GetEnvironmentStrings export, was supposed to be aliased to GetEnvironmentStringsA for some reason, as NT's exports it, and ros's cmd.exe imports it.
svn path=/trunk/; revision=867
1999-12-12 07:59:41 +00:00
Phillip Susi
8c2f4d55e3 David forgot to take out a debugging line? Prevented process termination on user mode exception
svn path=/trunk/; revision=866
1999-12-12 06:09:29 +00:00
Phillip Susi
9a22766e36 new APC code ready for prime time
svn path=/trunk/; revision=865
1999-12-12 03:56:53 +00:00
Phillip Susi
53b1677997 new APC code ready for prime time
svn path=/trunk/; revision=864
1999-12-12 03:48:47 +00:00
David Welch
2cecd9846d Removed typo.
svn path=/trunk/; revision=863
1999-12-12 01:04:09 +00:00
David Welch
f822a2a9d9 Backed out Philip Susi's changes for further testing
Returned kernel to working state.
Made exception handling more tolerant

svn path=/trunk/; revision=862
1999-12-12 00:59:39 +00:00
Phillip Susi
a590b25e46 fixed thread dispatcher bug with spin lock
svn path=/trunk/; revision=861
1999-12-12 00:49:00 +00:00
Phillip Susi
5d2dc4de65 fixed bug caused by my APC code
svn path=/trunk/; revision=860
1999-12-12 00:44:39 +00:00
Eric Kohl
55fef42029 Added abs() and labs()
svn path=/trunk/; revision=859
1999-12-12 00:20:29 +00:00
Eric Kohl
0ce89e21d9 fixed a compiler warning
svn path=/trunk/; revision=858
1999-12-12 00:08:41 +00:00
David Welch
910f27a570 Put in updated version of bitops header
Corrected bug in loader with mapping sections with zero VirtualSize
Corrected bug in the vfat driver that accessed freed memory
General cleanup of the vfat driver

svn path=/trunk/; revision=857
1999-12-11 21:14:49 +00:00
Phillip Susi
14ac854378 fixed DPC and APC calling code
svn path=/trunk/; revision=856
1999-12-11 17:31:16 +00:00
Phillip Susi
e0e40991af thread priorities, and some APC work
svn path=/trunk/; revision=855
1999-12-11 17:26:43 +00:00
Phillip Susi
db262c9a74 reworked the APC code, they shold now be delivered properly when the IRQL falls below APC_LEVEL, and when there are more than one queued.
Added support for KeAddThreadTimeout() to time out
Fixed wait code to use the WaitStatus of the thread when it wakes up

svn path=/trunk/; revision=854
1999-12-11 17:25:27 +00:00
Phillip Susi
81310b4307 added DPC for timers to KTHREAD, and fixed ApcState
svn path=/trunk/; revision=853
1999-12-11 17:19:32 +00:00
Phillip Susi
77c8585f1c added initialization for APCs
svn path=/trunk/; revision=852
1999-12-11 06:40:08 +00:00
Phillip Susi
43f46ed4f8 at least it compiles now...
svn path=/trunk/; revision=851
1999-12-11 06:39:30 +00:00
Eric Kohl
66f738dbd1 cleanup
svn path=/trunk/; revision=850
1999-12-11 01:44:29 +00:00
Eric Kohl
45043db6ff Added waiting for port requests
svn path=/trunk/; revision=849
1999-12-11 01:42:44 +00:00
Phillip Susi
b14104f1e7 ooops... fix that..
svn path=/trunk/; revision=848
1999-12-10 22:25:18 +00:00
Phillip Susi
424d757107 added initial priorities to threads and processes
svn path=/trunk/; revision=847
1999-12-10 22:07:23 +00:00
Eric Kohl
a1c7df6990 Fixed command line code.
Fixed Rtl string functions.

svn path=/trunk/; revision=846
1999-12-10 17:49:21 +00:00
David Welch
c7b7c5b0b6 Modified LPC implementation to be closer to nt.
Did some initial work on support for paging
Switched some test application from using our special startup code
Correctly bug in DPC code (possible fix for "releasing unacquired spinlock" error")

svn path=/trunk/; revision=845
1999-12-10 17:04:37 +00:00
Phillip Susi
815a52debe fixed IoCompleteRequest() to give priority boost even when target thread != current thread
svn path=/trunk/; revision=844
1999-12-09 19:39:45 +00:00
Paolo Pantaleo
dbf662da37 4nt's CTRL-D and CRTL-K support
svn path=/trunk/; revision=843
1999-12-09 19:20:47 +00:00
Eric Kohl
5d99e9003a dll name comparison in LdrFindDll() must be case-insensitive
svn path=/trunk/; revision=842
1999-12-09 19:14:45 +00:00
Eric Kohl
ec235d7468 Fixed HalQueryRealTimeClock and HalSetRealTimeClock.
Thanks to Adam Polanski.

svn path=/trunk/; revision=841
1999-12-09 08:16:26 +00:00
Rex Jolliff
f09720f7d7 some more video code
svn path=/trunk/; revision=840
1999-12-09 02:45:06 +00:00
Paolo Pantaleo
258912bf48 fixed a stupid bug in history
minor chage to GetConsoleHandle

svn path=/trunk/; revision=839
1999-12-08 18:18:23 +00:00
Eric Kohl
9d84d82bd7 pointer to PEB becomes first parameter in call to NtProcessStartup
svn path=/trunk/; revision=838
1999-12-08 12:59:35 +00:00
Phillip Susi
904da6e474 disable interrupts first, then do work. Use HLT also instead of busy wait
svn path=/trunk/; revision=837
1999-12-08 06:34:25 +00:00
Paolo Pantaleo
915ff9328d history cleanup added
svn path=/trunk/; revision=836
1999-12-07 18:17:17 +00:00
Paolo Pantaleo
61c3984818 TAS searches in internal commands too
svn path=/trunk/; revision=835
1999-12-07 18:16:24 +00:00
Eric Kohl
4a02ce0c1e fixed typo
svn path=/trunk/; revision=834
1999-12-07 17:23:42 +00:00
Paolo Pantaleo
f30ade19b8 new history implementation, not complete yet...
svn path=/trunk/; revision=833
1999-12-06 19:26:49 +00:00
Phillip Susi
9530a7d656 fixed handling of enter with blank line, also by my good pal, jim4
svn path=/trunk/; revision=832
1999-12-06 06:53:24 +00:00
Phillip Susi
5716745a13 fixed for 25 line mode as it should be, and scrolling by my good pal, jim4
svn path=/trunk/; revision=831
1999-12-06 06:43:45 +00:00
Phillip Susi
680589c149 fixed default bochs log port
svn path=/trunk/; revision=830
1999-12-06 05:48:34 +00:00
Eric Kohl
2efd99afb2 removed outdated cmd
svn path=/trunk/; revision=829
1999-12-06 00:30:09 +00:00
Eric Kohl
b001203a86 - implemented process parameter block (PPB) code
- improved process environment block (PEB) code
- improved environment code

svn path=/trunk/; revision=828
1999-12-06 00:25:14 +00:00
Phillip Susi
09edfdc32f forgot to initialize Create member of OBJECT_TYPE for threads
svn path=/trunk/; revision=827
1999-12-05 23:23:50 +00:00
Phillip Susi
ae12418822 fixed sync problem: set dpc lock field before, rather than after droping the spin lock
svn path=/trunk/; revision=826
1999-12-05 19:26:11 +00:00
Phillip Susi
f9d4545552 fixed sync bug by elevating IRQL
svn path=/trunk/; revision=825
1999-12-05 08:30:10 +00:00
Emanuele Aliberti
bb25ff0f3a Minor changes.
svn path=/trunk/; revision=824
1999-12-04 21:11:00 +00:00
Emanuele Aliberti
4b70175e11 RtlNtStatusToPsxErrno stub added.
svn path=/trunk/; revision=823
1999-12-04 21:03:22 +00:00
Emanuele Aliberti
ba58b241e5 Added version resource to dd and fs.
svn path=/trunk/; revision=822
1999-12-04 20:58:45 +00:00
Eric Kohl
7c574c2d6e fixed compiler warnings
svn path=/trunk/; revision=821
1999-12-04 14:54:50 +00:00
Phillip Susi
47551b9846 ignore buildno.h
svn path=/trunk/; revision=819
1999-12-04 08:02:27 +00:00
Phillip Susi
d0c1e25256 fixed timers and a wait functions, and a few bugs
svn path=/trunk/; revision=818
1999-12-04 07:40:53 +00:00
Phillip Susi
d4c340c696 fixed ide.sys to run under bochs, disabled support for more than one controller to do it. Let me know of this breaks on real hardware.
svn path=/trunk/; revision=817
1999-12-04 07:38:16 +00:00
Brian Palmer
43014d0391 Fixed bug in LdrPEProcessModule() so that it correctly section sizes
svn path=/trunk/; revision=816
1999-12-04 04:59:38 +00:00
Paolo Pantaleo
e28f90e740 now c:\ do not crash cmd
svn path=/trunk/; revision=815
1999-12-03 18:50:00 +00:00
David Welch
ead0eeacdd Some bug fixes.
Corrected LPC implementation.

svn path=/trunk/; revision=814
1999-12-02 20:53:55 +00:00
Boudewijn Dekker
cf693462e6 .
svn path=/trunk/; revision=813
1999-12-01 22:31:45 +00:00
Boudewijn Dekker
67ad8387f3 fixed some prototypes by adding stdcall attribute
svn path=/trunk/; revision=812
1999-12-01 22:30:48 +00:00
Eric Kohl
eae47571c9 fixed little bug
svn path=/trunk/; revision=811
1999-12-01 17:34:55 +00:00
Eric Kohl
2ea8bb5aa4 minor improvements
svn path=/trunk/; revision=810
1999-12-01 15:22:49 +00:00
Eric Kohl
13436cd7f7 - added environment functions
- moved ntdll-only prototypes into ntdll header file

svn path=/trunk/; revision=809
1999-12-01 15:18:54 +00:00
Eric Kohl
3bee100dae Cleanup
svn path=/trunk/; revision=808
1999-12-01 15:10:42 +00:00
Eric Kohl
2eccd28b8f Fixed a typo
svn path=/trunk/; revision=807
1999-12-01 15:08:31 +00:00
Paolo Pantaleo
d2c016b5ab just fixed a stupid bug
svn path=/trunk/; revision=806
1999-11-29 18:25:05 +00:00
Emanuele Aliberti
b72dc46819 Almost complete skeleton for tdi.sys,
yet headers are still missing.

svn path=/trunk/; revision=805
1999-11-28 07:59:29 +00:00
Eric Kohl
e2e5efb9d7 fixed a typo
svn path=/trunk/; revision=804
1999-11-28 01:55:41 +00:00
Paolo Pantaleo
6d3a97eb5e type accepts more than one file specification
F3 working in command line history (for now simply the same as up arrow)

svn path=/trunk/; revision=803
1999-11-27 19:14:59 +00:00
Eric Kohl
0d630c9ee3 added atoi() and atol()
svn path=/trunk/; revision=802
1999-11-27 11:32:43 +00:00
Eric Kohl
8b829113cb - changed InitializeObjectAttributes() from a function to a macro
- fixed STDCALL more issues
- changed some RtlLargeIntegerXxx functions to macros

svn path=/trunk/; revision=801
1999-11-27 03:32:55 +00:00
Brian Palmer
c18e7f06ce *** empty log message ***
svn path=/trunk/; revision=800
1999-11-26 21:45:23 +00:00
Jason Filby
dfa8364302 *** empty log message ***
svn path=/trunk/; revision=799
1999-11-26 20:53:32 +00:00
Eric Kohl
ed3ca3d52c More runtime functions
svn path=/trunk/; revision=798
1999-11-25 23:45:30 +00:00
Eric Kohl
e77c8000db Fixed typo
svn path=/trunk/; revision=797
1999-11-25 23:37:02 +00:00
Eric Kohl
05a567fce3 More runtime functions
svn path=/trunk/; revision=796
1999-11-25 23:35:24 +00:00
David Welch
9b614b887d Corrected ntdll mapping bug
Implemented prototype lpc mechanism

svn path=/trunk/; revision=795
1999-11-25 10:47:58 +00:00
Emanuele Aliberti
1a0765f6c5 Some NdisXYZ stubs for NDIS.SYS.
svn path=/trunk/; revision=794
1999-11-24 23:11:17 +00:00
Emanuele Aliberti
ec4a27aeb7 Initial makefile for NDIS.SYS
svn path=/trunk/; revision=793
1999-11-24 23:06:24 +00:00
David Welch
b986ce1cac Began converting minix fsd to work with new caching mechanism
Implemented user-mode APCs (still some bugs)
Began implementing shared memory, still some locking issues

svn path=/trunk/; revision=792
1999-11-24 11:51:55 +00:00
Emanuele Aliberti
e510811de7 Some fixes in the TDI initial files.
svn path=/trunk/; revision=791
1999-11-21 23:48:14 +00:00
Rex Jolliff
a7e6e9c1f8 more win32k code
svn path=/trunk/; revision=790
1999-11-21 18:39:11 +00:00
Eric Kohl
64915d3ebe Added missing STDCALL.
svn path=/trunk/; revision=789
1999-11-20 21:59:39 +00:00
Eric Kohl
c8689122b1 Fixed typo.
svn path=/trunk/; revision=788
1999-11-20 21:53:53 +00:00
Eric Kohl
e0c1e02c47 Fixed compiler warning
svn path=/trunk/; revision=787
1999-11-20 21:51:19 +00:00
Eric Kohl
b09592bf32 Major update to Rtl string functions.
svn path=/trunk/; revision=786
1999-11-20 21:49:23 +00:00
Emanuele Aliberti
174adb3955 Some more stubs files for the TDI kernel module.
svn path=/trunk/; revision=785
1999-11-20 20:41:29 +00:00
Emanuele Aliberti
8a20ddc7d4 Initial files for the TCP/IP stack kernel module.
svn path=/trunk/; revision=784
1999-11-20 20:36:46 +00:00
Emanuele Aliberti
82a0c31208 Initial networking code layout.
svn path=/trunk/; revision=783
1999-11-20 10:21:18 +00:00
Rex Jolliff
d25098ba0c added ignore file
svn path=/trunk/; revision=782
1999-11-18 19:25:35 +00:00
Rex Jolliff
aba30a453f added some DDI functions to table
svn path=/trunk/; revision=781
1999-11-18 18:58:16 +00:00
Boudewijn Dekker
fde8b62215 added misc/res.c
svn path=/trunk/; revision=780
1999-11-17 21:33:44 +00:00
Boudewijn Dekker
e04faee634 fixed some bugs in LdrLoadDll
svn path=/trunk/; revision=779
1999-11-17 21:32:57 +00:00
Boudewijn Dekker
0d7b93783b no message
svn path=/trunk/; revision=778
1999-11-17 21:30:00 +00:00
Boudewijn Dekker
b361e13fab implemented LoadResource/FlushViewOfFile
svn path=/trunk/; revision=777
1999-11-17 21:28:08 +00:00
Boudewijn Dekker
44744d8d36 implemented LoadResource
svn path=/trunk/; revision=776
1999-11-17 21:21:08 +00:00
Boudewijn Dekker
614f99e406 implemented FlushViewOfFile in kernel32
svn path=/trunk/; revision=775
1999-11-17 21:20:15 +00:00
Rex Jolliff
6e605e712e fixed reference to abs
svn path=/trunk/; revision=774
1999-11-17 21:17:10 +00:00
Rex Jolliff
96d5e2c715 Added top level ignore list
svn path=/trunk/; revision=773
1999-11-17 20:54:05 +00:00
Rex Jolliff
6767fd7f43 Fixed BMI typedef
svn path=/trunk/; revision=772
1999-11-17 20:50:37 +00:00
Eric Kohl
85a3f3844c Started NLS support and improved Rtl string functions.
svn path=/trunk/; revision=771
1999-11-15 16:02:50 +00:00
Eric Kohl
c114003cb5 Added some RtlLargeInteger functions.
svn path=/trunk/; revision=770
1999-11-15 16:01:32 +00:00
Eric Kohl
c52cbf8517 Fixed warning.
svn path=/trunk/; revision=769
1999-11-15 15:53:31 +00:00
Boudewijn Dekker
abd233d61a Implemented LdrFindResource_U and LdrAccessResource
svn path=/trunk/; revision=768
1999-11-14 13:04:46 +00:00
David Welch
b0ff680e0e 1) Corrected bugs in ERESOURCE code
and added test
2) Moved some files which are only
architecture-dependant out of the hal
3) Corrected timer implementation (it
should now be possible to use them as dispatcher
objects)
4) Corrected stupid bug in dpc code
5) Made thread list locking more sensible
6) Altered system call handler to build a
proper context in preparation for implementing APCs
7) Rationalised the waiting code

svn path=/trunk/; revision=767
1999-11-12 12:01:17 +00:00
Rex Jolliff
1a8f8005ae fixed clean rule
svn path=/trunk/; revision=766
1999-11-12 00:16:51 +00:00
Rex Jolliff
5bc02dd95a Changed to support linux build
svn path=/trunk/; revision=765
1999-11-11 21:22:08 +00:00
Eric Kohl
44866ccf87 Fixed include bug with rosapps module.
svn path=/trunk/; revision=764
1999-11-09 18:17:10 +00:00
Eric Kohl
d431c0fa6d Fixed bug with gcc 2.95.2
svn path=/trunk/; revision=763
1999-11-09 18:15:16 +00:00
Eric Kohl
58b907b668 Added some RtlLargeInteger functions.
svn path=/trunk/; revision=762
1999-11-09 18:09:57 +00:00
Eric Kohl
761e03c5a1 Fixed memory functions.
svn path=/trunk/; revision=761
1999-11-09 18:07:50 +00:00
Eric Kohl
ea4204ce87 Changed to new HAL functions.
svn path=/trunk/; revision=760
1999-11-09 18:07:03 +00:00
Eric Kohl
eae6fb6efc Implemented ExInterlocked functions.
svn path=/trunk/; revision=759
1999-11-09 18:00:14 +00:00
Eric Kohl
157d5b3fa2 Added APC support to NtDeviceIoControlFile().
svn path=/trunk/; revision=758
1999-11-07 14:08:11 +00:00
Emanuele Aliberti
63665d54ed advapi32 ACE and ACL stubs.
svn path=/trunk/; revision=757
1999-11-07 08:04:55 +00:00
Emanuele Aliberti
eb2d1c2110 advapi32 compiles OK.
Build number auto-generated (see apps/buildno, include/reactos/version.h,
include/reactos/buildno.h).
include/internal/version.h moved in include/reactos.
Added default search paths for includes in .rc rule (rules.mak).

svn path=/trunk/; revision=756
1999-11-07 08:03:28 +00:00
Eric Kohl
dbbb7e41f0 Keep DEL quiet when called from a batch file.
svn path=/trunk/; revision=754
1999-11-06 00:53:33 +00:00
Eric Kohl
6758f479ef New Y command and some fixes.
svn path=/trunk/; revision=753
1999-11-05 20:41:17 +00:00
Eric Kohl
18a01fd10d Implemented 4nt compatible color command.
svn path=/trunk/; revision=752
1999-11-04 11:29:36 +00:00
Emanuele Aliberti
cfb22d72df Typo in the NTOSKRNL import library fixed
svn path=/trunk/; revision=751
1999-11-04 06:41:47 +00:00
David Welch
83c2d22a5e Improved scheduling code
Fixed win32k.sys entrypoint (otherwise it crashes on startup)
Included unix install script
Broke waiting for a thread to terminate (but will fix later)
Added spinlock debugging code
Improved InterlockXXXX functions
Added hooks for monitoring system calls and thread startup

svn path=/trunk/; revision=750
1999-11-02 08:55:45 +00:00
Emanuele Aliberti
96c9969a90 Various changes related to calling convention fixes
svn path=/trunk/; revision=749
1999-10-31 22:44:39 +00:00
Emanuele Aliberti
f0f8791763 W32kSetTextColor, W32GetDCState16 needed __stdcall; changed the subsystem field from windows to native
svn path=/trunk/; revision=748
1999-10-31 22:43:40 +00:00
Emanuele Aliberti
31c5b7839f RtlFillMemory, RtlMoveMemory, RtlZeroMemory needed __stdcall
svn path=/trunk/; revision=747
1999-10-31 22:41:49 +00:00
Emanuele Aliberti
dabbe50e39 LoadLibraryA, GetProcAddress, FreeLibrary, GetModuleHandleA, WriteFileEx needed __stdcall
svn path=/trunk/; revision=746
1999-10-31 22:41:15 +00:00
Emanuele Aliberti
68fbd54f2c KeDelayExecutionThread exported by ntoskrnl with correct calling convention (__stdcall)
svn path=/trunk/; revision=745
1999-10-30 21:24:37 +00:00
Rex Jolliff
766e6a262e added more KMGDI functions
svn path=/trunk/; revision=744
1999-10-29 01:58:20 +00:00
Rex Jolliff
c1795e9778 fixed problem with redefined status values
svn path=/trunk/; revision=743
1999-10-28 23:37:58 +00:00
Rex Jolliff
f886c2b9d6 added several new functions
svn path=/trunk/; revision=742
1999-10-28 23:37:14 +00:00
Rex Jolliff
7d45bbd5da needed for compile
svn path=/trunk/; revision=741
1999-10-28 23:35:34 +00:00
Rex Jolliff
8d87ab9d07 added fix for compile under linux
svn path=/trunk/; revision=740
1999-10-28 23:34:47 +00:00
Eric Kohl
95fcdd0943 Fixed batch mode bugs.
svn path=/trunk/; revision=739
1999-10-28 23:09:59 +00:00
Rex Jolliff
11d7e1e18c Fixed problems with vidport and vga loading
svn path=/trunk/; revision=738
1999-10-28 06:58:05 +00:00
Eric Kohl
863afe8930 Disabled prompting when in batch mode.
svn path=/trunk/; revision=737
1999-10-27 22:46:53 +00:00
Rex Jolliff
788e4dc053 Fix import problems in win32k.sys
svn path=/trunk/; revision=736
1999-10-27 05:49:58 +00:00
Emanuele Aliberti
125a62f79a An attempt to fix the ntdll not found bug.
svn path=/trunk/; revision=735
1999-10-26 19:47:06 +00:00
Rex Jolliff
99d62b4808 added check for bootloader config hive
svn path=/trunk/; revision=734
1999-10-26 04:52:39 +00:00
Rex Jolliff
3c1e76b027 Some small fixes to reported build problems
svn path=/trunk/; revision=733
1999-10-25 06:58:09 +00:00
Eric Kohl
2bd986927c Added some time related functions.
svn path=/trunk/; revision=732
1999-10-24 17:52:17 +00:00
Rex Jolliff
ad5e850736 Changes to get video drivers and win32k to load
svn path=/trunk/; revision=731
1999-10-24 17:07:57 +00:00
Rex Jolliff
6cc79a481e added some Eng funcs into build list
svn path=/trunk/; revision=730
1999-10-23 22:40:49 +00:00
Rex Jolliff
c0b2b118a0 Cleanup to make buildable
svn path=/trunk/; revision=729
1999-10-23 22:39:27 +00:00
Rex Jolliff
a53e883bb0 Added definitions for some eng funcs
svn path=/trunk/; revision=728
1999-10-23 22:38:26 +00:00
Rex Jolliff
bb0715f8e7 Added IOCTL codes for video drivers
svn path=/trunk/; revision=727
1999-10-23 22:37:11 +00:00
Rex Jolliff
bc08c68af9 Added vidport.sys to auto loaded drivers
svn path=/trunk/; revision=726
1999-10-23 18:58:40 +00:00
Rex Jolliff
28df2503d3 fixed handling of boot drivers
svn path=/trunk/; revision=725
1999-10-23 18:56:04 +00:00
Rex Jolliff
a5dd3430d6 fixed dist and floppy rule
svn path=/trunk/; revision=724
1999-10-23 18:33:38 +00:00
Eric Kohl
36f33622cc Fixed bugs and added DIRS command.
svn path=/trunk/; revision=723
1999-10-23 18:17:37 +00:00
Eric Kohl
583a7209da Added BOOT.BAT
svn path=/trunk/; revision=722
1999-10-23 18:15:39 +00:00
Eric Kohl
727671f12a Added Ctrl-C/Ctrl-Break handler.
svn path=/trunk/; revision=721
1999-10-22 20:35:02 +00:00
Eric Kohl
13e2e79e44 Added missing exports.
svn path=/trunk/; revision=720
1999-10-21 16:13:39 +00:00
Eric Kohl
0300e2a9d1 Fixed floppy and dist targets.
svn path=/trunk/; revision=719
1999-10-21 16:12:16 +00:00
Eric Kohl
ec16aa4c44 Improved debug output and
added hal READ_XXX and WRITE_XXX functions.

svn path=/trunk/; revision=718
1999-10-21 13:11:12 +00:00
Eric Kohl
e6f624f0e7 Improved debug output and
added hal READ_XXX and WRITE_XXX functions.

svn path=/trunk/; revision=717
1999-10-21 13:00:09 +00:00
Eric Kohl
7228dc135c Improved debug output and
added hal READ_XXX and WRITE_XXX functions.

svn path=/trunk/; revision=716
1999-10-21 11:13:38 +00:00
Eric Kohl
d2e85caa9e Improved debug output and
added hal READ_XXX and WRITE_XXX functions.

svn path=/trunk/; revision=715
1999-10-21 10:59:32 +00:00
Rex Jolliff
bff71dc524 Changed name to conform with kernel naming convention
svn path=/trunk/; revision=714
1999-10-20 23:09:26 +00:00
Rex Jolliff
a0570e7cbe added ignore files
svn path=/trunk/; revision=713
1999-10-20 23:08:58 +00:00
Boudewijn Dekker
ff9ce85a65 implemented some ldr functions
svn path=/trunk/; revision=712
1999-10-18 21:55:30 +00:00
Boudewijn Dekker
f3d9743503 implemented LdrUnloadDll
svn path=/trunk/; revision=711
1999-10-18 21:37:16 +00:00
Boudewijn Dekker
a66a6e5dba implemented LoadLibray and FreeLibrary
svn path=/trunk/; revision=710
1999-10-17 18:18:44 +00:00
Boudewijn Dekker
8690858184 implemented a reference count on LdrLoadDll
svn path=/trunk/; revision=709
1999-10-17 18:16:45 +00:00
Eric Kohl
9e4fec3838 Updated info about debugging.
svn path=/trunk/; revision=708
1999-10-16 21:10:23 +00:00
Eric Kohl
8001413b88 More exported functions.
svn path=/trunk/; revision=707
1999-10-16 21:09:12 +00:00
Eric Kohl
bae73138e8 Moved serial and bochs debug output.
svn path=/trunk/; revision=706
1999-10-16 21:08:39 +00:00
Eric Kohl
dad291cf6f Some fixes.
svn path=/trunk/; revision=705
1999-10-16 12:41:42 +00:00
Eric Kohl
22b26024cd More exported functions.
svn path=/trunk/; revision=704
1999-10-16 12:40:57 +00:00
Eric Kohl
3e6e6c12ee Added missing ntdll include.
svn path=/trunk/; revision=703
1999-10-16 12:39:44 +00:00
Eric Kohl
93a0fa88d2 Fixed NtCreatePort() prototype.
svn path=/trunk/; revision=702
1999-10-16 12:38:53 +00:00
Eric Kohl
9b2fc03fc7 Fixed $(NASM_CMD) bug.
svn path=/trunk/; revision=701
1999-10-16 12:36:47 +00:00
Eric Kohl
7975fc7fe7 Minor improvements.
svn path=/trunk/; revision=700
1999-10-16 12:35:10 +00:00
Eric Kohl
a23adc0492 Fixed hal display and initialization code.
svn path=/trunk/; revision=699
1999-10-16 00:17:40 +00:00
Eric Kohl
36e229b42f Fixed a typo.
svn path=/trunk/; revision=698
1999-10-15 15:26:34 +00:00
Eric Kohl
29812be566 Fixed hal display and initialization code.
svn path=/trunk/; revision=697
1999-10-15 15:21:39 +00:00
Eric Kohl
4551dfba1e Replaced calls to _printk() by calls to DbgPrint().
svn path=/trunk/; revision=696
1999-10-14 16:54:17 +00:00
Eric Kohl
babfe77ea9 PEB will be created in NtCreateProcess.
svn path=/trunk/; revision=695
1999-10-13 22:35:55 +00:00
Emanuele Aliberti
81a9f1c4b0 Little changes in the psxdll library.
svn path=/trunk/; revision=694
1999-10-12 21:19:40 +00:00
Boudewijn Dekker
74031c2379 implemented LoadLibrary and some Rtl stubs
svn path=/trunk/; revision=693
1999-10-12 19:45:01 +00:00
Eric Kohl
348ccdd39f Added REBOOT command.
svn path=/trunk/; revision=692
1999-10-11 20:51:07 +00:00
Eric Kohl
1d4d689bf2 Added new display and reboot code.
svn path=/trunk/; revision=691
1999-10-11 20:50:33 +00:00
Eric Kohl
8578ba8ac6 Minor fix to teb allocation.
svn path=/trunk/; revision=690
1999-10-11 20:43:10 +00:00
Eric Kohl
a77eef4a53 Fixed header inclusion order.
svn path=/trunk/; revision=689
1999-10-10 19:53:46 +00:00
Eric Kohl
648301897c Fixed header inclusion order.
svn path=/trunk/; revision=687
1999-10-07 23:46:27 +00:00
Emanuele Aliberti
2076e94020 I removed a pair of stubs for the OpenFileMapping functions
svn path=/trunk/; revision=686
1999-10-03 23:19:15 +00:00
Eric Kohl
c2829c9869 Minor fixes.
svn path=/trunk/; revision=685
1999-10-03 22:20:33 +00:00
Eric Kohl
49f51f37f3 Added activate command.
svn path=/trunk/; revision=684
1999-10-03 22:16:14 +00:00
Eric Kohl
1e637da493 Added echos, echoerr and echoserr commands.
svn path=/trunk/; revision=683
1999-10-03 22:15:33 +00:00
Eric Kohl
51cbed48ab No longer needed.
svn path=/trunk/; revision=682
1999-10-03 22:14:40 +00:00
Eric Kohl
e8abc51177 Minor fixes.
svn path=/trunk/; revision=681
1999-10-03 22:12:57 +00:00
Eric Kohl
29f5cf1341 Added floppy and dist targets.
svn path=/trunk/; revision=680
1999-10-03 22:12:24 +00:00
Eric Kohl
c33edc6cb7 Made notevil screen size aware.
svn path=/trunk/; revision=679
1999-10-03 22:10:15 +00:00
Boudewijn Dekker
1d786dd865 Miscellaneous implementation of kernel32 stubs.
Changed the implementation of ReadFileEx.

svn path=/trunk/; revision=678
1999-10-02 20:20:44 +00:00
Eric Kohl
3174c5069a Fixed typo.
svn path=/trunk/; revision=676
1999-09-29 23:19:32 +00:00
Eric Kohl
d63c23131c Fixed multiple STATUS_xxxx inclusions.
svn path=/trunk/; revision=675
1999-09-29 23:15:14 +00:00
Eric Kohl
56e30e8907 Minor updates and fixes.
svn path=/trunk/; revision=674
1999-09-27 22:15:44 +00:00
Eric Kohl
1241612f69 Added MORE command.
svn path=/trunk/; revision=673
1999-09-27 22:13:59 +00:00
Boudewijn Dekker
ddc9e680c9 Added support for critical sections.
svn path=/trunk/; revision=672
1999-09-27 20:58:46 +00:00
Boudewijn Dekker
15e29ff254 Small addition to token.c
svn path=/trunk/; revision=671
1999-09-25 06:25:51 +00:00
Eric Kohl
52498a577a Minor fixes.
svn path=/trunk/; revision=670
1999-09-24 22:05:25 +00:00
Eric Kohl
ee3dc0f0c1 Added window command.
svn path=/trunk/; revision=669
1999-09-24 22:03:11 +00:00
Emanuele Aliberti
58eedf7620 RtlReAllocHeap should be RtlReAllocateHeap
svn path=/trunk/; revision=668
1999-09-12 22:09:34 +00:00
Emanuele Aliberti
e6359887bb RtlReAllocHeap should be RtlReAllocateHeap.
svn path=/trunk/; revision=667
1999-09-12 21:59:40 +00:00
Emanuele Aliberti
cda1c38bae Some missing __stdcall added.
Some missing unicode functions stubs added.
RtlReAllocHeap should be RtlReAllocateHeap.

svn path=/trunk/; revision=666
1999-09-12 21:58:32 +00:00
Emanuele Aliberti
d82310b692 Skeleton for psxdll.dll
svn path=/trunk/; revision=665
1999-09-12 21:54:16 +00:00
Eric Kohl
45dd256ee3 Fixed typo.
svn path=/trunk/; revision=664
1999-09-12 20:58:29 +00:00
Eric Kohl
e0058203bb Fixed WaitForSingleObject() and WaitForMultipleObjects().
svn path=/trunk/; revision=663
1999-09-12 20:54:42 +00:00
Eric Kohl
3255097117 Stack is freed on failure.
svn path=/trunk/; revision=662
1999-09-12 20:49:06 +00:00
Eric Kohl
40f81ce970 Fixed some minor issues (NULL --> FALSE).
svn path=/trunk/; revision=661
1999-09-12 20:44:22 +00:00
Eric Kohl
bbcc7f9179 Fixed little bug ('cd d:' did't work, but 'cd D:').
svn path=/trunk/; revision=660
1999-09-12 20:41:56 +00:00
Eric Kohl
0c91339480 Added some more commands. Thanks to Dr. Faustus.
Some more cleanup.

svn path=/trunk/; revision=659
1999-09-12 18:23:31 +00:00
Eric Kohl
5249698af3 External TEE command.
svn path=/trunk/; revision=658
1999-09-12 18:20:47 +00:00
Eric Kohl
037d59aef7 Added master makefile with clean/dist/floppy targets.
svn path=/trunk/; revision=657
1999-09-12 18:18:09 +00:00
Eric Kohl
70f14aa73f Fixed typedef.
svn path=/trunk/; revision=656
1999-09-11 00:07:20 +00:00
Rex Jolliff
b779c01fb6 Changes to make win32k.sys compile
svn path=/trunk/; revision=655
1999-09-10 21:17:07 +00:00
Rex Jolliff
fe56845ebe Fixed function prototypes
svn path=/trunk/; revision=654
1999-09-10 21:16:36 +00:00
Rex Jolliff
70140f5ea7 Changed symbolic name for IDE devices
svn path=/trunk/; revision=653
1999-09-10 19:16:58 +00:00
Eric Kohl
fe27d316df Added creation of full user stack (including guard page).
svn path=/trunk/; revision=652
1999-09-10 15:50:30 +00:00
Eric Kohl
1fc6701c79 Implemented Nt/KeWaitForMultipleObjects (still buggy).
svn path=/trunk/; revision=651
1999-09-08 23:51:36 +00:00
Rex Jolliff
09d88da5e9 some minor coding on win32k
svn path=/trunk/; revision=650
1999-09-08 04:50:50 +00:00
Emanuele Aliberti
a06d619eca some symbols were not declared __stdcall
svn path=/trunk/; revision=649
1999-09-08 04:40:56 +00:00
Eric Kohl
242138f832 Fixed little bug.
svn path=/trunk/; revision=648
1999-09-07 20:41:47 +00:00
Emanuele Aliberti
af1ff6be3b More for the POSIX+ subsystem
svn path=/trunk/; revision=647
1999-09-07 17:12:39 +00:00
Eric Kohl
8c0b595a5e Thread improvements.
svn path=/trunk/; revision=646
1999-09-06 21:32:57 +00:00
Emanuele Aliberti
4280f4f60d stubs for HAL kernel debugger functions
svn path=/trunk/; revision=645
1999-09-05 20:54:57 +00:00
Eric Kohl
d5014c3bb3 Removed unused stuff.
svn path=/trunk/; revision=644
1999-09-05 12:40:20 +00:00
Eric Kohl
d81a116aba Run smss.exe instead of shell.exe.
svn path=/trunk/; revision=643
1999-09-05 12:39:45 +00:00
Eric Kohl
155d1ff5ae Removed smss from its old place
svn path=/trunk/; revision=642
1999-09-05 12:35:34 +00:00
Eric Kohl
fbccd722a1 Fixed little bug.
svn path=/trunk/; revision=641
1999-09-05 12:31:41 +00:00
Eric Kohl
648c68ff1a Moved smss to a better place.
svn path=/trunk/; revision=640
1999-09-05 12:29:50 +00:00
Eric Kohl
c92eafe2f1 Updated rules for subsys directory.
svn path=/trunk/; revision=639
1999-09-05 12:27:22 +00:00
Eric Kohl
b0e64d6cf7 Updated.
svn path=/trunk/; revision=638
1999-09-05 10:22:05 +00:00
Emanuele Aliberti
fa74a12186 added resource script with version information
svn path=/trunk/; revision=637
1999-09-04 20:50:34 +00:00
Eric Kohl
40bd704148 Implemented RtlCreateUserProcess() and RtlCreateUserThread().
svn path=/trunk/; revision=636
1999-09-04 18:38:29 +00:00
David Welch
4027ccab60 Correct keyboard bug with multiple readers
svn path=/trunk/; revision=634
1999-08-30 15:20:14 +00:00
Eric Kohl
ff511b446a Added MSGBOX and TIMER commands.
svn path=/trunk/; revision=633
1999-08-29 22:31:43 +00:00
David Welch
e31d342bc7 *** empty log message ***
svn path=/trunk/; revision=632
1999-08-29 13:45:08 +00:00
Emanuele Aliberti
7cf48757dc A top level header file for kernel and system stuff. At present simply includes ddk/ntddk.h.
svn path=/trunk/; revision=631
1999-08-29 07:02:52 +00:00
Emanuele Aliberti
07a2fbf7f7 Global ReactOS configuration file. Here we will put symbols for processor-, architecture-, and debugging-dependent conditional compilation.
svn path=/trunk/; revision=630
1999-08-29 07:01:32 +00:00
Emanuele Aliberti
fa3a5c2c71 some __stdcall fixes in ntoskrnl and ntdll
svn path=/trunk/; revision=629
1999-08-29 06:59:11 +00:00
Eric Kohl
5aaaad5c93 Added missing definition.
svn path=/trunk/; revision=628
1999-08-28 23:30:50 +00:00
Eric Kohl
7bcdd2ea10 Added CHOICE command and fixed a cursor bug.
svn path=/trunk/; revision=627
1999-08-22 21:46:50 +00:00
Eric Kohl
a35e54e5f8 Added CHOICE command and fixed a cursor bug.
svn path=/trunk/; revision=626
1999-08-21 22:06:03 +00:00
Eric Kohl
0b84d00506 Added CHOICE command and fixed a cursor bug.
svn path=/trunk/; revision=625
1999-08-21 21:54:30 +00:00
Boudewijn Dekker
c4385e9139 Small fixes
svn path=/trunk/; revision=624
1999-08-21 17:51:35 +00:00
Emanuele Aliberti
2c4de44226 Power management (Po) stubs.
svn path=/trunk/; revision=623
1999-08-20 16:31:17 +00:00
Emanuele Aliberti
1f636015ba NLS stubs and exported data.
svn path=/trunk/; revision=622
1999-08-20 16:30:16 +00:00
Emanuele Aliberti
e9703bfa98 FS stubs.
svn path=/trunk/; revision=621
1999-08-20 16:29:22 +00:00
Emanuele Aliberti
676e6609ce Kernel debugger stubs.
svn path=/trunk/; revision=620
1999-08-20 16:28:10 +00:00
Boudewijn Dekker
dbb9546d9d Small additions, not yet finished
svn path=/trunk/; revision=619
1999-08-20 10:12:53 +00:00
Boudewijn Dekker
007128eb66 Small additions, not yet finished
svn path=/trunk/; revision=618
1999-08-20 09:37:25 +00:00
Emanuele Aliberti
90129544e0 Fixed a bug in the parser.
svn path=/trunk/; revision=617
1999-08-20 05:53:04 +00:00
Eric Kohl
f72b0c8878 Fixed STDCALL bugs.
svn path=/trunk/; revision=616
1999-08-17 12:02:27 +00:00
Eric Kohl
36df88668d Fixed STDCALL bug.
svn path=/trunk/; revision=615
1999-08-15 00:36:59 +00:00
Rex Jolliff
9957d94c20 Various small changes for registry work
svn path=/trunk/; revision=614
1999-08-14 18:59:28 +00:00
Eric Kohl
2a466eda80 Partial Implementation of NtQuerySystemInformation and NtSetSystemInformation
svn path=/trunk/; revision=613
1999-08-11 23:29:26 +00:00
Emanuele Aliberti
6cb529270a Stubs for version.dll
svn path=/trunk/; revision=612
1999-08-11 19:56:48 +00:00
Emanuele Aliberti
cb7f83ac74 Some files for version.dll
svn path=/trunk/; revision=611
1999-08-10 20:21:32 +00:00
Rex Jolliff
9907c63794 Added STDCALL to Video functions
svn path=/trunk/; revision=610
1999-08-07 20:27:14 +00:00
Rex Jolliff
fc200ca733 Added export definition file and export library rule
svn path=/trunk/; revision=609
1999-08-06 17:27:45 +00:00
Jason Filby
bebdd316d5 *** empty log message ***
svn path=/trunk/; revision=608
1999-08-01 11:21:05 +00:00
Eric Kohl
e7cf9302fa Added more crt functions and fixed some.
svn path=/trunk/; revision=607
1999-07-29 21:25:04 +00:00
Emanuele Aliberti
69dc48c09f some work on fixing advapi32
svn path=/trunk/; revision=606
1999-07-26 20:46:40 +00:00
Eric Kohl
e3c471cf82 Added simple START command.
svn path=/trunk/; revision=605
1999-07-24 17:18:05 +00:00
Eric Kohl
0063a30376 Fixed a typo.
svn path=/trunk/; revision=604
1999-07-24 17:16:32 +00:00
Rex Jolliff
b9a38fb83d moved path functions into seperate file
svn path=/trunk/; revision=603
1999-07-23 20:21:06 +00:00
Rex Jolliff
1ff56406ca changes to support win32k
svn path=/trunk/; revision=602
1999-07-23 19:58:58 +00:00
Rex Jolliff
c69899317f finished win32k skeleton
svn path=/trunk/; revision=601
1999-07-23 19:57:18 +00:00
Rex Jolliff
b3995a1493 added a few pointer types
svn path=/trunk/; revision=600
1999-07-23 19:55:07 +00:00
Eric Kohl
3975f17012 Changes to compile advapi32.
svn path=/trunk/; revision=599
1999-07-22 21:36:37 +00:00
Rex Jolliff
3f261fab5d More changes to the win32k server
svn path=/trunk/; revision=598
1999-07-22 16:21:53 +00:00
Emanuele Aliberti
b6ae20fcd0 first bits for the POSIX+ client DLL
svn path=/trunk/; revision=597
1999-07-18 20:54:04 +00:00
Emanuele Aliberti
d2eea59593 original ntifs.h restored
svn path=/trunk/; revision=596
1999-07-18 07:53:27 +00:00
Emanuele Aliberti
6ac1592420 fixes
svn path=/trunk/; revision=595
1999-07-17 23:10:31 +00:00
Rex Jolliff
04f2911330 added dist rule
svn path=/trunk/; revision=593
1999-07-16 23:37:07 +00:00
Rex Jolliff
743df9ab84 fixed various build errors
svn path=/trunk/; revision=592
1999-07-13 01:08:47 +00:00
Rex Jolliff
e2a59404d8 added an ignore file
svn path=/trunk/; revision=591
1999-07-12 23:34:42 +00:00
Rex Jolliff
367fbb2a1f Added a service table registration function
svn path=/trunk/; revision=590
1999-07-12 23:32:30 +00:00
Rex Jolliff
932d4770ec more work on KMGDI subsystem
svn path=/trunk/; revision=589
1999-07-12 23:26:57 +00:00
Emanuele Aliberti
0584d3755f minor changes in the simple DEF-->EDF converter
svn path=/trunk/; revision=588
1999-07-12 21:02:06 +00:00
Emanuele Aliberti
221e27f1fa kernel32 missing stubs
svn path=/trunk/; revision=587
1999-07-12 21:01:06 +00:00
Boudewijn Dekker
581f2c7495 no message
svn path=/trunk/; revision=586
1999-07-11 14:19:14 +00:00
Rex Jolliff
6ef820374f put ifdef around defines
svn path=/trunk/; revision=585
1999-07-07 01:41:41 +00:00
Rex Jolliff
ce373b0c40 added pointer types for RECTL and POINTL
svn path=/trunk/; revision=584
1999-07-07 01:41:00 +00:00
Boudewijn Dekker
01034d9c59 no message
svn path=/trunk/; revision=583
1999-07-05 20:51:47 +00:00
Emanuele Aliberti
fad2f584e9 Bo's ntifs.h + ReactOS extensions (untested).
svn path=/trunk/; revision=582
1999-07-04 22:22:05 +00:00
Emanuele Aliberti
86b93a6ac8 A very simple application to create a named LPC port; application to connect to an existing LPC port updated.
svn path=/trunk/; revision=581
1999-07-04 22:04:31 +00:00
Emanuele Aliberti
6fcd126954 NtCreatePort and LPC_PORT_BASIC_INFORMATION partial definitions
svn path=/trunk/; revision=580
1999-07-04 22:00:31 +00:00
Boudewijn Dekker
2a01ea22a9 Initial commit. Ported some code from wine.
Not much working yet.

svn path=/trunk/; revision=579
1999-07-04 16:01:27 +00:00
Emanuele Aliberti
84d1d53870 Very simple tool to generate aliased *.def files from standard *.def files. May be used to have clean exports tables in DLLs and make ld link stdcall mangled symbols
svn path=/trunk/; revision=578
1999-07-04 11:14:15 +00:00
Rex Jolliff
5050cf437e Added brush scaffolding
svn path=/trunk/; revision=577
1999-07-02 02:33:59 +00:00
Rex Jolliff
9162781f47 more bitmap scaffolding
svn path=/trunk/; revision=576
1999-07-02 02:06:52 +00:00
Rex Jolliff
b63d64cc90 Bitmap scaffolding
svn path=/trunk/; revision=575
1999-07-02 00:54:01 +00:00
Rex Jolliff
858aaeac37 Moved service.h
svn path=/trunk/; revision=574
1999-06-30 22:28:34 +00:00
Eric Kohl
bd4786ea76 Fixed DeleteFileW().
svn path=/trunk/; revision=573
1999-06-27 23:08:31 +00:00
Eric Kohl
bcb831f3c9 Fixed RemoveDirectoryW().
svn path=/trunk/; revision=572
1999-06-27 23:08:07 +00:00
Eric Kohl
1bfb0f94d9 Added file and directory delete functionality (dummy).
svn path=/trunk/; revision=571
1999-06-27 23:06:50 +00:00
Eric Kohl
10f222cd92 Fixed typos.
svn path=/trunk/; revision=570
1999-06-27 13:02:20 +00:00
Eric Kohl
7f7c26ae4d Fixed irq level assertations (assert -> assert_irql).
svn path=/trunk/; revision=569
1999-06-27 13:01:23 +00:00
Emanuele Aliberti
56b4626f56 *** empty log message ***
svn path=/trunk/; revision=568
1999-06-27 07:15:16 +00:00
Emanuele Aliberti
b3f7f2d945 Clean up and more info about the LPC port handle.
svn path=/trunk/; revision=567
1999-06-27 07:11:25 +00:00
Eric Kohl
4d7dcc6886 Fixed application file name (absolute path) in command line.
svn path=/trunk/; revision=566
1999-06-26 18:24:38 +00:00
Eric Kohl
8ae06e50f1 Fixed typo in GetCommandLineA().
svn path=/trunk/; revision=565
1999-06-26 14:28:42 +00:00
Rex Jolliff
19a76ae9af consolidated makefiles and added floppy and dist rules.
svn path=/trunk/; revision=564
1999-06-25 04:36:03 +00:00
Emanuele Aliberti
15714a3ea7 Attempt to connect to a real LPC port
svn path=/trunk/; revision=563
1999-06-24 22:54:27 +00:00
Emanuele Aliberti
9ccf887c5a KeGetPreviousMode (useless)
svn path=/trunk/; revision=562
1999-06-24 22:40:06 +00:00
Boudewijn Dekker
62cdaf7f99 no message
svn path=/trunk/; revision=561
1999-06-24 21:59:41 +00:00
Emanuele Aliberti
fdb2041671 NtConnectPort partial interface
svn path=/trunk/; revision=560
1999-06-24 19:35:31 +00:00
Emanuele Aliberti
11cbd32ea6 Some more ideas for winlogon (it does not compile yet).
svn path=/trunk/; revision=559
1999-06-18 22:40:47 +00:00
Emanuele Aliberti
8d5b94094a NTOSKRNL.ZwXXX functions now call NTOSKRNL.NtXXX via int 0x2e.
svn path=/trunk/; revision=558
1999-06-18 22:11:21 +00:00
Emanuele Aliberti
3d0fe049f6 fixed my bug in ZwXXX stubs generation
svn path=/trunk/; revision=557
1999-06-17 18:09:27 +00:00
Emanuele Aliberti
1e589af8e1 genntdll enhanced to generate ntoskrnl Zw stubs (to be tested)
svn path=/trunk/; revision=556
1999-06-17 00:10:30 +00:00
Emanuele Aliberti
6409ce374c some ideas about LPC
svn path=/trunk/; revision=555
1999-06-15 23:00:39 +00:00
Rex Jolliff
11d31698d5 some additions to the GDI engine
svn path=/trunk/; revision=554
1999-06-15 02:27:24 +00:00
Rex Jolliff
e0c5a61982 untested implementation of the registry
svn path=/trunk/; revision=553
1999-06-14 07:37:55 +00:00
David Welch
d913de5c14 Fixed problem with dpc execution
svn path=/trunk/; revision=552
1999-06-10 20:59:19 +00:00
David Welch
5b3ccbfc02 Implemented ZwOpenProcess corrected
Implemented killing other threads (possible memory leaks)
Made a start on a proper implementation of APCs (based on NT Insider article)

svn path=/trunk/; revision=551
1999-06-09 15:50:16 +00:00
David Welch
f2a6a55325 Not needed anymore
svn path=/trunk/; revision=550
1999-06-09 15:48:56 +00:00
David Welch
4aa2c7952d Not been needed for ages
svn path=/trunk/; revision=549
1999-06-09 15:47:10 +00:00
David Welch
b54e7a6efa No longer need with rex's changes
svn path=/trunk/; revision=548
1999-06-09 15:46:06 +00:00
Emanuele Aliberti
8ae5eb02c7 Initial work for W32 server
svn path=/trunk/; revision=547
1999-06-08 22:50:59 +00:00
Emanuele Aliberti
34a9792f1e Updated to 0.0.14
svn path=/trunk/; revision=546
1999-06-08 22:47:39 +00:00
Emanuele Aliberti
44a536a421 Initial structure (won't compile)
svn path=/trunk/; revision=545
1999-06-08 22:45:53 +00:00
Emanuele Aliberti
c5e296fcf0 Updated to 0.0.14
RES_STR_FILE_VERSION eq RES_STR_PRODUCT_VERSION

svn path=/trunk/; revision=544
1999-06-08 22:37:30 +00:00
David Welch
c8cd1fe03c Added support for ZwOpenProcess
svn path=/trunk/; revision=543
1999-06-08 14:02:01 +00:00
Rex Jolliff
0a1f866c8f Added a few more functions for registry
svn path=/trunk/; revision=542
1999-06-08 07:11:29 +00:00
Rex Jolliff
a5e573f1b3 more hacking on the registry
svn path=/trunk/; revision=541
1999-06-08 04:34:48 +00:00
Rex Jolliff
06938a9103 more registry changes
svn path=/trunk/; revision=540
1999-06-07 15:14:23 +00:00
Emanuele Aliberti
b5118cc48f minor changes
svn path=/trunk/; revision=539
1999-06-06 20:35:26 +00:00
David Welch
31268dc661 Stub
svn path=/trunk/; revision=538
1999-06-06 16:40:10 +00:00
Emanuele Aliberti
9dc68f3b65 Context help functions stubs
svn path=/trunk/; revision=537
1999-06-06 15:34:09 +00:00
Emanuele Aliberti
1af4e48747 NtOpenProcess exported
svn path=/trunk/; revision=536
1999-06-06 15:31:58 +00:00
Emanuele Aliberti
154db698c9 start (to detach a new process) and kill commands added
svn path=/trunk/; revision=535
1999-06-06 15:29:46 +00:00
Boudewijn Dekker
f298282475 Added some user32 functions.
svn path=/trunk/; revision=534
1999-06-05 19:02:54 +00:00
Rex Jolliff
9083091f7b Added PE loader to LOADROS. Updated symbol search in Loader
svn path=/trunk/; revision=533
1999-06-04 23:59:35 +00:00
Rex Jolliff
c4ba9a330d some changes to registry code
svn path=/trunk/; revision=532
1999-06-03 15:07:49 +00:00
Boudewijn Dekker
46a0e6e16e Added stub for create token and delete object audit alarm.
svn path=/trunk/; revision=531
1999-05-31 18:53:33 +00:00
Boudewijn Dekker
f53177b2b2 Added prototype for create token.
svn path=/trunk/; revision=530
1999-05-31 18:50:11 +00:00
Emanuele Aliberti
380ae8a262 Session manager skeleton
svn path=/trunk/; revision=529
1999-05-30 20:40:18 +00:00
Rex Jolliff
28f788e6ed fixes for compile errors.
svn path=/trunk/; revision=528
1999-05-29 02:51:05 +00:00
David Welch
126768af64 Lots of changes to the kernel
svn path=/trunk/; revision=527
1999-05-29 00:15:17 +00:00
Rex Jolliff
0deeaa0d83 fixes for some compiler errors.
svn path=/trunk/; revision=526
1999-05-28 20:40:05 +00:00
Emanuele Aliberti
da7f2bf2b2 Little editing
svn path=/trunk/; revision=525
1999-05-28 19:49:46 +00:00
Rex Jolliff
6709ff7e24 added DDI version macro
svn path=/trunk/; revision=524
1999-05-28 18:46:23 +00:00
Rex Jolliff
d415ba8508 First hack at KMDLLs
svn path=/trunk/; revision=523
1999-05-28 18:24:27 +00:00
Rex Jolliff
9377d51b1a More code for win32k.sys
svn path=/trunk/; revision=522
1999-05-27 23:08:26 +00:00
Emanuele Aliberti
662c77c00c SetLastError() used in stubs
svn path=/trunk/; revision=521
1999-05-26 05:24:21 +00:00
Emanuele Aliberti
5169949e78 IMAGE_SUBSYSTEM_xxx
svn path=/trunk/; revision=520
1999-05-26 05:23:26 +00:00
Rex Jolliff
480d6d6388 More work on generic VGA driver
svn path=/trunk/; revision=519
1999-05-26 02:37:21 +00:00
Rex Jolliff
389b5fe480 More work on generic VGA driver skeleton
svn path=/trunk/; revision=518
1999-05-26 02:34:31 +00:00
Rex Jolliff
d89e0df163 changes to support VGA miniport driver
svn path=/trunk/; revision=517
1999-05-26 00:39:11 +00:00
Rex Jolliff
36a7c3cf0d Added a skeleton VGA miniport driver
svn path=/trunk/; revision=516
1999-05-26 00:35:26 +00:00
Eric Kohl
b887962d1d Fixed some compiler warnings.
svn path=/trunk/; revision=515
1999-05-25 19:16:29 +00:00
Rex Jolliff
5f710be5ef Added code to implement videoport driver
svn path=/trunk/; revision=514
1999-05-25 03:19:47 +00:00
Emanuele Aliberti
47ee1b5a90 gdi32.dll added
svn path=/trunk/; revision=513
1999-05-24 20:09:06 +00:00
Emanuele Aliberti
c9b6355479 stubs for most gdi32 functions
svn path=/trunk/; revision=512
1999-05-24 20:04:44 +00:00
Boudewijn Dekker
5c91ed98f2 no message
svn path=/trunk/; revision=511
1999-05-24 15:22:43 +00:00
Boudewijn Dekker
1cdff7f03d no message
svn path=/trunk/; revision=510
1999-05-24 15:14:14 +00:00
Boudewijn Dekker
d21b624ded no message
svn path=/trunk/; revision=509
1999-05-24 14:47:21 +00:00
Emanuele Aliberti
4b60f335f5 GDI32.DLL auxiliary files
svn path=/trunk/; revision=508
1999-05-23 07:41:33 +00:00
Rex Jolliff
c805537640 added stubs and build spec for win32k.sys
svn path=/trunk/; revision=507
1999-05-22 23:55:56 +00:00
Boudewijn Dekker
2b96374f2a no message
svn path=/trunk/; revision=506
1999-05-22 07:28:28 +00:00
Rex Jolliff
2854aac246 more work on the videoport driver.
svn path=/trunk/; revision=505
1999-05-22 07:25:30 +00:00
Rex Jolliff
ae32243b6a patches to get v14 to compile.
svn path=/trunk/; revision=503
1999-05-21 18:47:44 +00:00
Rex Jolliff
ed003aa199 bumped to version 14
svn path=/trunk/; revision=502
1999-05-21 18:21:10 +00:00
Rex Jolliff
ebf6630e2b Added skeleton video port driver
svn path=/trunk/; revision=501
1999-05-21 18:20:45 +00:00
Rex Jolliff
2a87426631 more additions to DDI interface
svn path=/trunk/; revision=500
1999-05-21 07:50:04 +00:00
Emanuele Aliberti
e30ffd7e27 fiber functions stubs
svn path=/trunk/; revision=499
1999-05-21 05:42:08 +00:00
Emanuele Aliberti
659762910c *** empty log message ***
svn path=/trunk/; revision=498
1999-05-21 05:25:12 +00:00
Rex Jolliff
cfe42a37eb More DDI stuff
svn path=/trunk/; revision=497
1999-05-21 02:34:38 +00:00
Eric Kohl
42dfa65049 Fixed bugs in batch file execution.
svn path=/trunk/; revision=496
1999-05-21 00:52:38 +00:00
Rex Jolliff
d22c45fab2 Added to DDI interface definition
svn path=/trunk/; revision=495
1999-05-21 00:02:39 +00:00
Emanuele Aliberti
f234e93d1e win32k.sys exports
svn path=/trunk/; revision=494
1999-05-20 17:26:02 +00:00
Rex Jolliff
905776a29b added GDI kernel mode graphics engine skeleton
svn path=/trunk/; revision=493
1999-05-20 01:31:05 +00:00
Rex Jolliff
56b16dbf01 added GDI-DDI interface header
svn path=/trunk/; revision=492
1999-05-20 01:30:01 +00:00
Eric Kohl
9ade7d9aaf Fixed typo.
svn path=/trunk/; revision=491
1999-05-19 18:02:11 +00:00
Eric Kohl
3bc13b6875 cleanup
svn path=/trunk/; revision=490
1999-05-19 18:00:17 +00:00
Eric Kohl
cf7d159791 Fixed CreateDirectoryExW.
svn path=/trunk/; revision=489
1999-05-19 17:57:57 +00:00
Eric Kohl
0495cfd8d4 several fixes
svn path=/trunk/; revision=488
1999-05-19 17:57:02 +00:00
Eric Kohl
77360caec8 warning fix
svn path=/trunk/; revision=487
1999-05-19 17:56:25 +00:00
Eric Kohl
64f28f26bd access fixes
svn path=/trunk/; revision=486
1999-05-19 17:55:44 +00:00
Emanuele Aliberti
e3876459ef rtlsec.{c,h} are in lib/ntdll/rtl/sec.{c,h}
svn path=/trunk/; revision=485
1999-05-19 16:52:08 +00:00
Emanuele Aliberti
72df55f2e2 more stubs
svn path=/trunk/; revision=484
1999-05-19 16:43:30 +00:00
Boudewijn Dekker
55b8b93555 Commit to implement all symbols initially
svn path=/trunk/; revision=483
1999-05-18 18:16:30 +00:00
Boudewijn Dekker
b06daa620f no message
svn path=/trunk/; revision=482
1999-05-18 18:04:30 +00:00
Emanuele Aliberti
6275e70165 Some more constants for common values to be used in .rc files.
svn path=/trunk/; revision=480
1999-05-17 05:23:50 +00:00
Eric Kohl
0344d1a114 Fixed SystemTimeToFileTime().
svn path=/trunk/; revision=479
1999-05-16 18:33:24 +00:00
Eric Kohl
7aaccee0e9 Added date/time output and fixed warnings.
svn path=/trunk/; revision=478
1999-05-16 18:31:00 +00:00
Emanuele Aliberti
b5d3b3bf2d $(RC)
svn path=/trunk/; revision=477
1999-05-16 17:35:42 +00:00
Emanuele Aliberti
5d7bcb07bd a rudimentary console regedit
svn path=/trunk/; revision=476
1999-05-16 17:23:22 +00:00
Emanuele Aliberti
9ef17eada6 A few system utilities that need fixing
svn path=/trunk/; revision=475
1999-05-16 07:27:35 +00:00
Emanuele Aliberti
b9bbf8287b ExitWindowsEx exported
svn path=/trunk/; revision=474
1999-05-16 07:21:45 +00:00
Eric Kohl
88df0b7726 Fixed typo.
svn path=/trunk/; revision=473
1999-05-15 22:44:38 +00:00
Eric Kohl
c6b0f56200 Fixed typo.
svn path=/trunk/; revision=472
1999-05-15 17:25:29 +00:00
Eric Kohl
0a70b0080a Improved time functions.
svn path=/trunk/; revision=471
1999-05-15 17:25:02 +00:00
Emanuele Aliberti
b2274fda0d USER32.ExitWindows removed (it's a macro!)
svn path=/trunk/; revision=470
1999-05-15 13:48:38 +00:00
Emanuele Aliberti
6ddcb50e38 naive USER32.ExitWindows
svn path=/trunk/; revision=469
1999-05-15 13:35:57 +00:00
Emanuele Aliberti
19c00dc04f *** empty log message ***
svn path=/trunk/; revision=468
1999-05-15 07:23:34 +00:00
Eric Kohl
acc9e8fbc3 Fixed bug in RtlTimeToTimeFields().
svn path=/trunk/; revision=467
1999-05-14 16:42:05 +00:00
Eric Kohl
3ed33156f2 Fixed another path bug.
svn path=/trunk/; revision=466
1999-05-14 13:32:13 +00:00
Eric Kohl
d2e0015ab7 Fixed overlapping buffer handling.
svn path=/trunk/; revision=465
1999-05-14 13:30:07 +00:00
Eric Kohl
4251bd8513 Fixed volume label reading.
svn path=/trunk/; revision=464
1999-05-13 18:02:24 +00:00
Eric Kohl
60f4a025ef Fixed includes.
svn path=/trunk/; revision=463
1999-05-13 14:54:14 +00:00
Eric Kohl
9bdf8fd314 Improved time functions.
svn path=/trunk/; revision=462
1999-05-13 14:52:35 +00:00
Eric Kohl
e1e75da515 Update to build cmd separately.
svn path=/trunk/; revision=461
1999-05-11 22:50:44 +00:00
Emanuele Aliberti
2711eadf8a Added DLLs user32 and fmifs.
svn path=/trunk/; revision=460
1999-05-11 21:39:54 +00:00
Emanuele Aliberti
2eb223d16f GNU GPL
svn path=/trunk/; revision=459
1999-05-11 21:33:57 +00:00
Emanuele Aliberti
7e62c34fdd File Manage{r|ment} IFS Utility
Do-nothing implementation for coming ReactOS sysutils.

svn path=/trunk/; revision=458
1999-05-11 21:19:41 +00:00
Emanuele Aliberti
603bb75198 stuctures, constants and prototypes used by fmifs.dll
svn path=/trunk/; revision=457
1999-05-11 21:16:01 +00:00
Eric Kohl
db37f2cecd Not needed any longer.
svn path=/trunk/; revision=456
1999-05-11 19:37:25 +00:00
Eric Kohl
76691783b3 Fixed LARGE_INTEGER hack.
svn path=/trunk/; revision=455
1999-05-11 19:32:15 +00:00
Eric Kohl
fc506149ce Not needed any longer.
svn path=/trunk/; revision=454
1999-05-11 16:09:02 +00:00
Eric Kohl
5edb029d51 Use crtdll instead of ntdll.
svn path=/trunk/; revision=453
1999-05-11 16:08:21 +00:00
Eric Kohl
acd3d263c1 Fixed clean target.
svn path=/trunk/; revision=452
1999-05-11 15:32:27 +00:00
Eric Kohl
a2e9c0c7a4 Fixed compiler warnings.
svn path=/trunk/; revision=451
1999-05-11 15:31:01 +00:00
Eric Kohl
d0fbe6c728 Export more functions.
svn path=/trunk/; revision=450
1999-05-11 15:29:04 +00:00
Eric Kohl
6bac8b1c92 Minor fixes.
svn path=/trunk/; revision=449
1999-05-11 15:28:34 +00:00
Eric Kohl
3f9e43cbf2 Added TerminateProcess().
svn path=/trunk/; revision=448
1999-05-11 15:28:11 +00:00
Eric Kohl
078d8a8502 Added stdlib directory to the clean target.
svn path=/trunk/; revision=447
1999-05-11 15:27:13 +00:00
Eric Kohl
d927063dd4 Not needed any longer.
svn path=/trunk/; revision=446
1999-05-11 12:40:59 +00:00
Eric Kohl
ffbc9d9c03 Update to build cmd separately.
svn path=/trunk/; revision=445
1999-05-11 12:40:11 +00:00
Eric Kohl
6a7adfd71f Update for global rules.mak file.
svn path=/trunk/; revision=444
1999-05-11 12:38:45 +00:00
Eric Kohl
e9ecf45119 Added process ids.
svn path=/trunk/; revision=443
1999-05-10 12:37:45 +00:00
Rex Jolliff
169894bcc5 a little work on the registry code
svn path=/trunk/; revision=442
1999-05-10 00:06:49 +00:00
Boudewijn Dekker
b9354028e0 fixed bug in scanf
svn path=/trunk/; revision=441
1999-05-09 14:01:59 +00:00
Boudewijn Dekker
0107a0743b no message
svn path=/trunk/; revision=440
1999-05-09 14:00:05 +00:00
Eric Kohl
901449bfe8 Fixed 'implicid declaration' warning.
svn path=/trunk/; revision=439
1999-05-08 18:10:33 +00:00
Eric Kohl
09b99f1097 Fixed KEY_EVENT_RECORD.
svn path=/trunk/; revision=438
1999-05-08 18:09:37 +00:00
Boudewijn Dekker
7f7d1d57b0 changed #include <windows32/defines.h> to
#include "../include/defines.h"

svn path=/trunk/; revision=437
1999-05-08 13:37:14 +00:00
Boudewijn Dekker
25cd7e1e5a changed #include <windows32/defines.h> to
#include "../../include/defines.h"

svn path=/trunk/; revision=436
1999-05-08 13:35:12 +00:00
Emanuele Aliberti
3cee782a23 user32.dll minimal implementation
svn path=/trunk/; revision=435
1999-05-08 07:09:31 +00:00
Rex Jolliff
ae4cb21e55 added a top level readme file.
svn path=/trunk/; revision=434
1999-05-07 20:18:25 +00:00
Eric Kohl
27cfdf8b3b Export some more functions.
svn path=/trunk/; revision=433
1999-05-07 20:10:45 +00:00
Eric Kohl
0064915ad7 Some more fixes.
svn path=/trunk/; revision=432
1999-05-07 20:09:54 +00:00
Eric Kohl
14e5e06271 Fixed typos and moved typedefs.
svn path=/trunk/; revision=431
1999-05-06 23:40:43 +00:00
Eric Kohl
781ba31ad3 Added GetDiskFreeSpaceEx().
svn path=/trunk/; revision=430
1999-05-06 20:06:42 +00:00
Eric Kohl
0072db2e5e Fixed GetDiskFreeSpace().
svn path=/trunk/; revision=429
1999-05-06 17:59:55 +00:00
Eric Kohl
70b2252a9d Fixed more bugs in GetFullPathName() and SetCurrentDirectory().
svn path=/trunk/; revision=428
1999-05-06 14:06:48 +00:00
Eric Kohl
bc291ce04e Fixed typos and compiler warnings.
svn path=/trunk/; revision=427
1999-05-05 21:05:00 +00:00
Eric Kohl
73d37669c4 Added volume serial number handling.
svn path=/trunk/; revision=426
1999-05-05 11:23:46 +00:00
Eric Kohl
d5f96518f2 Renamed wtolower() to towlower().
Renamed wtoupper() to towupper().
Added some runtime functions.

svn path=/trunk/; revision=425
1999-05-05 11:20:14 +00:00
Eric Kohl
490e4d94fc Fixed 'implicid declaration' warnings.
svn path=/trunk/; revision=424
1999-04-29 23:36:08 +00:00
Eric Kohl
ddd8467f99 Added missing features in GetFullPathName[A/W]().
svn path=/trunk/; revision=423
1999-04-29 23:32:27 +00:00
Eric Kohl
278a6c540b Fixed dependencies. Now ntdll.dll depends on ntdll.def too.
svn path=/trunk/; revision=422
1999-04-29 19:55:00 +00:00
Eric Kohl
241b23c24d Added aliases.
svn path=/trunk/; revision=421
1999-04-29 19:54:02 +00:00
Eric Kohl
c842409323 Added missing features in GetFullPathName[A/W]().
svn path=/trunk/; revision=420
1999-04-28 14:19:34 +00:00
Eric Kohl
e5bfd35667 Fixed the 'clean' rule.
svn path=/trunk/; revision=419
1999-04-27 14:51:27 +00:00
Eric Kohl
f661ec6b08 Cleaned up the 'clean' rule.
svn path=/trunk/; revision=418
1999-04-27 14:50:51 +00:00
Eric Kohl
27de25f464 Fixed compiler warning.
svn path=/trunk/; revision=417
1999-04-27 14:49:57 +00:00
Eric Kohl
e68d320afc Fixed LARGE_INTEGER handling
svn path=/trunk/; revision=416
1999-04-27 14:47:40 +00:00
Eric Kohl
56461438cb Fixed LARGE_INTEGER handling
svn path=/trunk/; revision=415
1999-04-27 14:15:56 +00:00
Boudewijn Dekker
cee2ad3925 no message
svn path=/trunk/; revision=414
1999-04-27 06:16:04 +00:00
Boudewijn Dekker
9f95b317f2 Fixed bug in modfl and in fread and fwrite and added
some permission checks in stdio.

svn path=/trunk/; revision=413
1999-04-27 06:15:27 +00:00
Emanuele Aliberti
2890508a82 version information
svn path=/trunk/; revision=412
1999-04-25 07:09:54 +00:00
Boudewijn Dekker
97c1f757f6 Fixed some bugs.
svn path=/trunk/; revision=411
1999-04-23 18:43:00 +00:00
Rex Jolliff
98a3f0d6f5 Updated boot disk builder and fixed CHECKPOINT macro in KERNEL32
svn path=/trunk/; revision=410
1999-04-23 16:20:31 +00:00
Eric Kohl
67d7e92025 fixed GetVolumeInformation()
svn path=/trunk/; revision=409
1999-04-23 11:54:47 +00:00
Eric Kohl
54378dbf2a fixed little bug in FindFirstFile()
svn path=/trunk/; revision=408
1999-04-23 11:51:00 +00:00
Emanuele Aliberti
321081bb62 version information to distinguish from MS
svn path=/trunk/; revision=407
1999-04-23 05:28:37 +00:00
Emanuele Aliberti
ad3c512ae2 added resource script with version information to distinguish from MS
svn path=/trunk/; revision=406
1999-04-23 05:27:49 +00:00
Emanuele Aliberti
3fe1c6d5f4 *.rc include
svn path=/trunk/; revision=405
1999-04-23 05:26:37 +00:00
Eric Kohl
36322cffcd fixed GetFileAttributes()
svn path=/trunk/; revision=404
1999-04-21 19:16:31 +00:00
Eric Kohl
73a193b7fe compatibility fixes
svn path=/trunk/; revision=403
1999-04-20 20:25:56 +00:00
Eric Kohl
94f82b0796 cleanup
svn path=/trunk/; revision=402
1999-04-19 18:44:36 +00:00
Eric Kohl
81b9b25bc7 fixed Beep()
svn path=/trunk/; revision=401
1999-04-19 18:43:54 +00:00
David Welch
db068d0cae Synched makefiles
svn path=/trunk/; revision=400
1999-04-18 21:13:11 +00:00
David Welch
dcd4ed3e62 Completely code to synchronize DbgPrint and console output (why was this
not tested?)

svn path=/trunk/; revision=399
1999-04-18 13:39:48 +00:00
David Welch
9adc8d3ca1 Fixed silly bug (sorry)
svn path=/trunk/; revision=398
1999-04-18 13:24:02 +00:00
David Welch
d2f7f11cfc Corrected bug which stopped(!) crtdll from compiling
svn path=/trunk/; revision=397
1999-04-18 12:13:55 +00:00
David Welch
4946832715 *** empty log message ***
svn path=/trunk/; revision=396
1999-04-18 09:11:27 +00:00
David Welch
5a3243d494 Several bug fixes
Added proper process cleanup
Added several programs for testing

svn path=/trunk/; revision=395
1999-04-18 08:56:23 +00:00
Boudewijn Dekker
6f801aae22 added quad.h and ieee.h
svn path=/trunk/; revision=394
1999-04-17 09:11:02 +00:00
Boudewijn Dekker
6becb71b7c Replaced old version of printf and added some long long and
long double support.

svn path=/trunk/; revision=393
1999-04-17 09:10:25 +00:00
Eric Kohl
a1418887c0 changes to build cmd again
svn path=/trunk/; revision=392
1999-04-16 17:26:10 +00:00
Eric Kohl
1644f93c49 dir workaround
svn path=/trunk/; revision=391
1999-04-16 17:25:39 +00:00
Eric Kohl
464c5c2187 changes to build cmd again
svn path=/trunk/; revision=390
1999-04-16 17:20:16 +00:00
Eric Kohl
eda973b1cc last bugfixes for cmd
svn path=/trunk/; revision=389
1999-04-16 00:16:18 +00:00
Eric Kohl
7e74c066a7 changes to build cmd again
svn path=/trunk/; revision=388
1999-04-15 17:40:56 +00:00
Emanuele Aliberti
64037e6939 complete but not aliased export table for advapi32.dll
svn path=/trunk/; revision=387
1999-04-15 05:46:09 +00:00
Eric Kohl
079a92a658 fixed cursor synchronization bug
svn path=/trunk/; revision=386
1999-04-15 02:02:13 +00:00
Eric Kohl
ff1e3c7b18 changed strupr() to _strupr()
svn path=/trunk/; revision=385
1999-04-14 23:52:13 +00:00
Eric Kohl
731f19e9b1 several changes to make cmd compile and link again
svn path=/trunk/; revision=384
1999-04-14 23:48:27 +00:00
Eric Kohl
ebb6fcbc30 added ver command
improved command line editing

svn path=/trunk/; revision=383
1999-04-14 23:45:48 +00:00
Eric Kohl
97c260445b fixed bug in FreeConsole()
svn path=/trunk/; revision=382
1999-04-14 23:43:56 +00:00
Eric Kohl
5d97b74881 fixed cursor synchroization bug
svn path=/trunk/; revision=381
1999-04-14 23:43:13 +00:00
Boudewijn Dekker
ed08466464 Added various files.
--> failed to pass test printing a simple string

svn path=/trunk/; revision=380
1999-04-14 21:27:02 +00:00
Boudewijn Dekker
b68aceef62 Added two header files for multi byte string functions
svn path=/trunk/; revision=379
1999-04-14 07:10:15 +00:00
David Welch
42965fae3b Fixed more compilation bugs (sorry)
svn path=/trunk/; revision=378
1999-04-14 03:39:11 +00:00
David Welch
600e81c60c Fixed silly compilation bug
svn path=/trunk/; revision=377
1999-04-14 02:31:11 +00:00
David Welch
0691de94b5 *** empty log message ***
svn path=/trunk/; revision=376
1999-04-14 00:58:52 +00:00
David Welch
d837d19fac *** empty log message ***
svn path=/trunk/; revision=375
1999-04-14 00:52:19 +00:00
Eric Kohl
eee72fe55d console update
svn path=/trunk/; revision=374
1999-04-11 20:59:24 +00:00
Eric Kohl
98d0da7e1c added .cvsignore file
svn path=/trunk/; revision=373
1999-04-10 14:48:38 +00:00
Eric Kohl
7c8b54eee0 fixed bugs and cleaned up (direct io is working now)
svn path=/trunk/; revision=372
1999-04-10 14:47:15 +00:00
David Welch
fd78805ffc Partially implemented PEB
Some bug fixes
Hacked crtdll to compile with a minimal set of functions

svn path=/trunk/; revision=371
1999-04-10 12:08:24 +00:00
Rex Jolliff
9221d5c854 fixing filenames
svn path=/trunk/; revision=370
1999-04-08 03:46:59 +00:00
David Welch
5503a0f0e4 Improved GDT managment
svn path=/trunk/; revision=369
1999-04-05 15:04:46 +00:00
Rex Jolliff
99fa281af1 fixed display of stack frames
svn path=/trunk/; revision=368
1999-04-04 00:22:33 +00:00
Rex Jolliff
29b9e3f0b4 Added a recursive clean rule and cleaned up a few loose ends
svn path=/trunk/; revision=367
1999-04-03 23:43:27 +00:00
Boudewijn Dekker
0c6333ed01 minor fixes
svn path=/trunk/; revision=366
1999-04-03 10:42:18 +00:00
Boudewijn Dekker
e8cbdde2a7 moved some header files from top level to crtdll directory
svn path=/trunk/; revision=365
1999-04-02 21:44:11 +00:00
The ReactOS Manager
de56bed16d to fix a problem
svn path=/trunk/; revision=364
1999-04-02 18:34:41 +00:00
The ReactOS Manager
5a25898d41 to fix a problem
svn path=/trunk/; revision=363
1999-04-02 18:21:44 +00:00
Rex Jolliff
fbe6ae7bc0 Setup CRTDLL config to build DLL
svn path=/trunk/; revision=362
1999-04-02 06:29:59 +00:00
Rex Jolliff
a3576ceb06 removed size_t from kernel specific includes.
svn path=/trunk/; revision=361
1999-04-02 02:34:40 +00:00
David Welch
63a3377143 Enhanced memory managment
Correct several bugs in the creation/termination of processes

svn path=/trunk/; revision=360
1999-04-01 12:39:43 +00:00
Rex Jolliff
240b550d9c Changes to be able to build system
svn path=/trunk/; revision=359
1999-04-01 05:22:18 +00:00
jean
839118b9b3 initialization of LastError
svn path=/trunk/; revision=358
1999-03-31 14:09:51 +00:00
jean
472aba6da2 correct bug in release of semaphore
svn path=/trunk/; revision=357
1999-03-31 13:57:22 +00:00
jean
d7acbe2251 correct bug in release of semaphore
svn path=/trunk/; revision=356
1999-03-31 13:38:13 +00:00
jean
3763d9c0dd report changes from dwelch in 1.5 (include <string.h>
svn path=/trunk/; revision=355
1999-03-31 13:26:40 +00:00
jean
3277301592 implement some functions
svn path=/trunk/; revision=354
1999-03-31 13:21:44 +00:00
David Welch
572d45daca Improved physical page managment
svn path=/trunk/; revision=353
1999-03-31 10:59:32 +00:00
Eric Kohl
e4bcefde7d Fixed bugs and improved del command.
svn path=/trunk/; revision=352
1999-03-30 22:06:36 +00:00
Eric Kohl
74b0d03ccc Fixed bug in DeviceIoContol().
svn path=/trunk/; revision=351
1999-03-30 22:05:06 +00:00
Eric Kohl
9e3fe0593a Changed beep to compile as sys driver.
svn path=/trunk/; revision=350
1999-03-30 21:59:12 +00:00
Eric Kohl
aa77254872 improved bluescreen driver
svn path=/trunk/; revision=349
1999-03-30 21:58:05 +00:00
David Welch
bbc8fd7b21 Began improvements to memory managment, changed method of
mapping page tables and directories to be more efficent. These
changes require you to update your version of loadros.com

svn path=/trunk/; revision=348
1999-03-30 12:55:31 +00:00
Rex Jolliff
dff0889c02 added GDI32 DLL skeleton
svn path=/trunk/; revision=347
1999-03-28 23:12:42 +00:00
Boudewijn Dekker
03f9e7b713 fixed some bugs to make nls functions compile
svn path=/trunk/; revision=346
1999-03-27 22:29:57 +00:00
David Welch
fbcc7fb423 Made process execution work again
svn path=/trunk/; revision=345
1999-03-26 10:48:45 +00:00
David Welch
140b387c62 Made user-mode execution of processes work again
svn path=/trunk/; revision=344
1999-03-26 10:37:03 +00:00
jean
867fa342e3 changed type for function ExIsResourceAcquiredSharedLite
svn path=/trunk/; revision=343
1999-03-25 14:13:05 +00:00
jean
db7bc7b4e8 modifiy ExIsResourceAcquiredxxx
svn path=/trunk/; revision=342
1999-03-25 14:10:14 +00:00
jean
e4981e3a09 work on semaphores.
svn path=/trunk/; revision=341
1999-03-25 13:53:45 +00:00
jean
42c50bfaa8 begin implement.
svn path=/trunk/; revision=340
1999-03-25 13:52:28 +00:00
David Welch
8688a2a272 Cleaned up code a bit
svn path=/trunk/; revision=339
1999-03-25 00:37:06 +00:00
David Welch
3f0a7424cb Changed kernel32 to compile as a dll
svn path=/trunk/; revision=338
1999-03-24 11:07:33 +00:00
Eric Kohl
00f2fc414e fixed drive reset bug!
svn path=/trunk/; revision=333
1999-03-23 21:23:50 +00:00
Boudewijn Dekker
4f928dad27 no message
svn path=/trunk/; revision=332
1999-03-22 21:01:37 +00:00
Boudewijn Dekker
150a9789e6 Added __set_errno to file.h
svn path=/trunk/; revision=331
1999-03-22 21:01:15 +00:00
Boudewijn Dekker
b3c424cd40 Changes and improved mingw32 compile
svn path=/trunk/; revision=330
1999-03-22 20:57:12 +00:00
Boudewijn Dekker
8bf8d53376 no message
svn path=/trunk/; revision=329
1999-03-22 20:48:08 +00:00
Boudewijn Dekker
5bd64e22e4 Converted cwait.c and system.c to lower case.
svn path=/trunk/; revision=328
1999-03-22 18:09:39 +00:00
Boudewijn Dekker
0dc103b08e Changed access.c and try to convert commit.c to lower case.
svn path=/trunk/; revision=327
1999-03-22 17:21:21 +00:00
Eric Kohl
108fcceee2 changes to make cmd compile (not link)
svn path=/trunk/; revision=326
1999-03-21 21:32:45 +00:00
Rex Jolliff
b172b0df42 added rule for cmd
svn path=/trunk/; revision=325
1999-03-20 20:47:25 +00:00
Rex Jolliff
9f7f2c0f72 Added Eric Kohl's port of freedos command
svn path=/trunk/; revision=324
1999-03-20 20:28:42 +00:00
Rex Jolliff
af3d943b02 cleanup after merge with mingw32
svn path=/trunk/; revision=323
1999-03-19 06:37:39 +00:00
Rex Jolliff
d704562082 Merged mingw32 branch into main trunk
svn path=/trunk/; revision=321
1999-03-19 05:55:55 +00:00
jean
bf4de1d7cd replaced call %eax with call *%eax.First syntax is not recognized
by all compilers.

svn path=/trunk/; revision=317
1999-03-16 13:35:26 +00:00
Boudewijn Dekker
f6a2bede37 no message
svn path=/trunk/; revision=307
1999-03-13 10:12:05 +00:00
Boudewijn Dekker
282bc306f8 Added logb from glibc math.h file
svn path=/trunk/; revision=306
1999-03-13 09:14:51 +00:00
Boudewijn Dekker
481a3a687c no message
svn path=/trunk/; revision=305
1999-03-13 09:03:35 +00:00
Boudewijn Dekker
48f92902c5 Added some nls functions
svn path=/trunk/; revision=304
1999-03-13 09:00:59 +00:00
Boudewijn Dekker
0c215b202d Changed .s files to .c files with gcc asm.
svn path=/trunk/; revision=301
1999-03-12 20:28:52 +00:00
Boudewijn Dekker
98071efc7e Changed .s files to .c files with gcc asm.
svn path=/trunk/; revision=300
1999-03-12 20:26:05 +00:00
jean
ad037179b4 generate napi.c instead of napi.asm
svn path=/trunk/; revision=299
1999-03-12 16:18:45 +00:00
jean
9d1624980f replaced by interlck.c
svn path=/trunk/; revision=298
1999-03-12 16:15:21 +00:00
jean
3276df883d created, replace interlck.asm
svn path=/trunk/; revision=297
1999-03-12 16:14:36 +00:00
jean
7994f333ab replaced by apchelp.c
svn path=/trunk/; revision=296
1999-03-12 16:08:15 +00:00
jean
49d35cfc27 created, replace apchelp.asm
svn path=/trunk/; revision=295
1999-03-12 16:07:32 +00:00
jean
a1c0b9b92a replaced by usercall.c
svn path=/trunk/; revision=294
1999-03-12 16:04:30 +00:00
jean
75a9d9fc5f replaced by irqhand.c
svn path=/trunk/; revision=293
1999-03-12 16:03:09 +00:00
jean
a0945c2aa2 created. replace usercall.asm
svn path=/trunk/; revision=292
1999-03-12 16:00:10 +00:00
jean
ee4c094831 created. replace irqhand.asm.
svn path=/trunk/; revision=291
1999-03-12 15:59:02 +00:00
Emanuele Aliberti
9ee6327262 stubs
svn path=/trunk/; revision=290
1999-03-12 06:29:00 +00:00
Rex Jolliff
24160311c0 more changes to compile under mingw32
svn path=/trunk/; revision=287
1999-03-10 07:18:38 +00:00
Rex Jolliff
275be13b58 Eric's beep driver and changes for same
svn path=/trunk/; revision=286
1999-03-10 06:39:59 +00:00
Rex Jolliff
3a2897ef52 Eric's beep driver and changes to support same
svn path=/trunk/; revision=285
1999-03-10 05:16:57 +00:00
Rex Jolliff
2e61a84b9d oops, put it in the wrong place
svn path=/trunk/; revision=284
1999-03-10 05:01:36 +00:00
Rex Jolliff
c00639bf8c Added the CRT lib for the kernel
svn path=/trunk/; revision=283
1999-03-09 07:15:46 +00:00
Boudewijn Dekker
09abfa6348 Various changes to crtdll.
svn path=/trunk/; revision=282
1999-03-07 14:15:23 +00:00
Boudewijn Dekker
01f4ff78c5 Various changes to crtdll, added some files to math and float
directory.

svn path=/trunk/; revision=281
1999-03-07 13:37:38 +00:00
Boudewijn Dekker
9fd228d402 Various changes to header files
svn path=/trunk/; revision=280
1999-03-07 13:35:11 +00:00
Rex Jolliff
1db33360e3 added config to generate NTDLL.DLL under mingw32
svn path=/trunk/; revision=279
1999-03-06 21:44:41 +00:00
Emanuele Aliberti
97a4cb23d5 stubs
svn path=/trunk/; revision=278
1999-03-06 10:57:02 +00:00
Boudewijn Dekker
eec445ded5 these files are defined in stdlib
svn path=/trunk/; revision=275
1999-02-27 16:59:01 +00:00
Boudewijn Dekker
5a9cee4031 made some small changes
svn path=/trunk/; revision=271
1999-02-25 22:53:40 +00:00
Boudewijn Dekker
b7b31cec92 added some header files
svn path=/trunk/; revision=270
1999-02-25 22:51:47 +00:00
Boudewijn Dekker
15df73e6b3 no message
svn path=/trunk/; revision=269
1999-02-25 21:36:26 +00:00
Boudewijn Dekker
d58a6ad5d6 added some wide character support
svn path=/trunk/; revision=268
1999-02-25 21:33:50 +00:00
Boudewijn Dekker
7946500988 no message
svn path=/trunk/; revision=267
1999-02-25 21:27:29 +00:00
Boudewijn Dekker
d9625dff78 implementation of debug assert
svn path=/trunk/; revision=266
1999-02-25 21:02:20 +00:00
Boudewijn Dekker
e66f3f0e7b Fixed some problems to make the mingw32 header files work with the
linux header files.

svn path=/trunk/; revision=265
1999-02-21 20:59:55 +00:00
Boudewijn Dekker
b57dd9d5b6 Fixed some bugs in header files
svn path=/trunk/; revision=264
1999-02-21 17:43:45 +00:00
Boudewijn Dekker
f929f4c00b changed header files from djgpp to mingw32
svn path=/trunk/; revision=263
1999-02-21 13:48:57 +00:00
Boudewijn Dekker
eef71ffb98 change exec and spawn to _exec and _spawn
svn path=/trunk/; revision=262
1999-02-21 13:43:05 +00:00
Boudewijn Dekker
87028edf14 changed some header file from djgpp to mingw32
svn path=/trunk/; revision=261
1999-02-21 13:33:27 +00:00
Boudewijn Dekker
38c0489092 Changed some header file from djgpp to mingw32
svn path=/trunk/; revision=260
1999-02-21 13:32:17 +00:00
Boudewijn Dekker
77ed4e360b Change some header file from djgpp to mingw32
svn path=/trunk/; revision=259
1999-02-21 13:29:57 +00:00
Boudewijn Dekker
37f381130a fixed bug in stdio.h
svn path=/trunk/; revision=258
1999-02-21 09:15:22 +00:00
Boudewijn Dekker
f6e36a9f86 implement use of _get_osfhandle
svn path=/trunk/; revision=257
1999-02-21 09:11:06 +00:00
Boudewijn Dekker
2c7fb0c72e fixed bug in unlink.c
svn path=/trunk/; revision=256
1999-02-21 09:02:18 +00:00
Boudewijn Dekker
4ad5db5d9c fixed bug in getch
svn path=/trunk/; revision=255
1999-02-21 08:58:57 +00:00
Boudewijn Dekker
95a2cd9225 Added some files
svn path=/trunk/; revision=254
1999-02-21 08:39:36 +00:00
Boudewijn Dekker
ddbc094b81 Added prototype for NtCreateToken
svn path=/trunk/; revision=253
1999-02-21 08:29:20 +00:00
Boudewijn Dekker
4e237f23ce Added prototype for ZwCreateToken
svn path=/trunk/; revision=252
1999-02-21 08:24:36 +00:00
Boudewijn Dekker
93e68a6285 changed io.h regarding prototypes starting with an underscore
svn path=/trunk/; revision=251
1999-02-20 18:40:58 +00:00
Boudewijn Dekker
17a714dfcd added some files and impl diff between fileno and handles
svn path=/trunk/; revision=250
1999-02-20 18:36:47 +00:00
Boudewijn Dekker
25f46657b5 Fixed bug in filetime to system time conversion.
svn path=/trunk/; revision=249
1999-02-20 09:11:46 +00:00
jean
e177bf992c revert change in IopCloseFile, because David Welch is sure we must send
IRP_MJ_CLEANUP

svn path=/trunk/; revision=248
1999-02-18 12:28:06 +00:00
jean
c3e2bc8f4d add date and time in dir.
svn path=/trunk/; revision=247
1999-02-16 12:48:15 +00:00
jean
bd305c8221 correct conversion from dos date and time to TIMEFIELDS.
svn path=/trunk/; revision=246
1999-02-16 12:47:30 +00:00
jean
b16dd07968 add time fields in Find Informations.
svn path=/trunk/; revision=245
1999-02-16 12:46:33 +00:00
jean
bc669554a9 correct bug
svn path=/trunk/; revision=244
1999-02-16 12:45:28 +00:00
jean
276842493c add time.o and memcpy.o
svn path=/trunk/; revision=243
1999-02-16 12:41:57 +00:00
jean
32835c2a47 removed stubs for memcpy,RtlTimeFieldsToTime,RtlTimeTotimeFields
svn path=/trunk/; revision=242
1999-02-16 12:40:05 +00:00
jean
edabb16494 copied from lib/crtdll/string/memcpy.c
svn path=/trunk/; revision=241
1999-02-16 12:38:46 +00:00
jean
d4164f1a07 copied from ntoskrnl/rtl/time.c
svn path=/trunk/; revision=240
1999-02-16 12:37:48 +00:00
Rex Jolliff
ace5da2d0d Added a clean rule
svn path=/trunk/; revision=239
1999-02-16 07:48:03 +00:00
Rex Jolliff
6752566cd2 missed this file
svn path=/trunk/; revision=238
1999-02-16 07:47:29 +00:00
jean
2c6653bf1c place hal/ddk.h after rtl.h, hal/ddk.h needs rtl.h for HalQueryRealTimeClock
svn path=/trunk/; revision=237
1999-02-15 11:40:28 +00:00
jean
6cbc9243c9 add HalQueryRealTimeClock
svn path=/trunk/; revision=236
1999-02-15 11:38:36 +00:00
jean
9c602cda2e add time.o (function HalQueryRealTimeClock)
svn path=/trunk/; revision=235
1999-02-15 11:36:21 +00:00
jean
fc52fb7648 function HalQueryRealTimeClock : partial implementation
svn path=/trunk/; revision=234
1999-02-15 11:35:01 +00:00
jean
621baeefa5 correct bug in CreateDirectory
svn path=/trunk/; revision=233
1999-02-15 11:33:06 +00:00
jean
9f5cc5a859 modify IopCloseFile : send IRP_MJ_CLOSE .
svn path=/trunk/; revision=232
1999-02-15 11:29:08 +00:00
jean
00ec608e15 add a buffer for each file opened
svn path=/trunk/; revision=231
1999-02-15 11:26:13 +00:00
jean
2f1849aae9 add a read buffer of one cluster for each file
svn path=/trunk/; revision=230
1999-02-15 11:25:23 +00:00
jean
36714219d9 initialize dates to current date
svn path=/trunk/; revision=229
1999-02-15 11:24:13 +00:00
Rex Jolliff
6e66d97592 Added check for ROSKRNL.EXE kernel import references
svn path=/trunk/; revision=228
1999-02-12 22:07:20 +00:00
jean
cadd577325 RtlNtStatusToDosError : return 0 if no error, 1 else.
svn path=/trunk/; revision=227
1999-02-11 12:42:18 +00:00
jean
d6995d6c9c correct bug in WriteFile : crash if Overlapped is null
svn path=/trunk/; revision=226
1999-02-11 12:40:02 +00:00
jean
638ba1c9e4 correct bug on CreateDirectory : crash if no template
correct call to ZwCreateFile

svn path=/trunk/; revision=225
1999-02-11 12:38:30 +00:00
jean
9e65542bad add defines for ByteOffset parameter
svn path=/trunk/; revision=224
1999-02-10 13:12:41 +00:00
jean
3315d25a64 change declaration of functions
svn path=/trunk/; revision=223
1999-02-10 13:04:16 +00:00
jean
a649212d32 correct bug in FindFile : support fragmented directories
suppress \ at end of filename

svn path=/trunk/; revision=222
1999-02-10 12:52:48 +00:00
jean
4b8117cedc completed write functions : write correct entries in directories
svn path=/trunk/; revision=221
1999-02-10 12:48:37 +00:00
jean
b9da76d7ef changes because of new version of function FindFile
svn path=/trunk/; revision=220
1999-02-10 12:46:59 +00:00
Rex Jolliff
0a828ed745 another test
svn path=/trunk/; revision=219
1999-02-09 06:54:53 +00:00
Rex Jolliff
a943c76484 a test
svn path=/trunk/; revision=218
1999-02-09 06:53:18 +00:00
David Welch
70f7c7269c Fixed bugs in lib/kernel32/file/curdir.c and
lib/kernel32/misc/console.c

svn path=/trunk/; revision=217
1999-02-07 00:37:29 +00:00
David Welch
02e70516ef Fixed bug in lib/kernel32/misc/console.c
svn path=/trunk/; revision=216
1999-02-06 18:39:40 +00:00
David Welch
e5dfcc9871 no message
svn path=/trunk/; revision=215
1999-02-06 18:34:14 +00:00
Rex Jolliff
f8492b9ae3 various changes
svn path=/trunk/; revision=214
1999-02-06 00:34:56 +00:00
Rex Jolliff
6bee27aa2a Fixed page fault due to timer. Problem with timeout still needs to be fixed.
svn path=/trunk/; revision=213
1999-02-06 00:33:33 +00:00
Rex Jolliff
dbad901d31 Fixed debug statement
svn path=/trunk/; revision=212
1999-02-06 00:29:31 +00:00
Rex Jolliff
e51b6b925d Forgot to bump version on last changes
svn path=/trunk/; revision=211
1999-02-05 19:39:35 +00:00
Rex Jolliff
f45b570cc3 Added symbolic stack dump
svn path=/trunk/; revision=210
1999-02-05 19:38:30 +00:00
Rex Jolliff
55d6c152b6 more changes from Boudewijn
svn path=/trunk/; revision=209
1999-02-05 19:36:21 +00:00
Rex Jolliff
3aed7d1da4 incorporating changes from Boudewijn
svn path=/trunk/; revision=208
1999-02-05 19:35:56 +00:00
Rex Jolliff
df27ab373b incorporated changes from Boudewijn
svn path=/trunk/; revision=207
1999-02-05 19:27:21 +00:00
Rex Jolliff
67c37a748e Incorporated changed from Boudewijn
svn path=/trunk/; revision=206
1999-02-05 19:24:10 +00:00
Rex Jolliff
d4195242ff incorporated changes from dekker
svn path=/trunk/; revision=205
1999-02-05 19:15:33 +00:00
Rex Jolliff
9bcc89126c a test
svn path=/trunk/; revision=204
1999-02-05 18:52:58 +00:00
Rex Jolliff
d7a481490e Renamed from uppercase
svn path=/trunk/; revision=203
1999-02-05 18:44:52 +00:00
Rex Jolliff
bfd196dfd9 changes to support new library modules
svn path=/trunk/; revision=202
1999-02-05 18:34:02 +00:00
Rex Jolliff
f4e6240546 added libgcc.a to link spec
svn path=/trunk/; revision=201
1999-02-05 18:24:00 +00:00
David Welch
5ba4cc87c5 Extensive changes to the objmgr
Some bug fixes

svn path=/trunk/; revision=200
1999-02-01 20:58:37 +00:00
David Welch
e999320cb5 Deleted these
svn path=/trunk/; revision=199
1999-02-01 20:52:55 +00:00
David Welch
88987510df Delete this (empty file)
svn path=/trunk/; revision=198
1999-02-01 20:52:08 +00:00
David Welch
5cb80487c2 Deleted these (shell now redundant)
svn path=/trunk/; revision=197
1999-02-01 20:51:28 +00:00
David Welch
3fcccd0b8c Removed some memory leaks
Moved from first-fit to best-fit for non-paged pool allocation
Fixed bug in console driver (wasn't completing irps)
Fixed bug in vfat fsd (didn't recognize paths of the form foo//bar)

svn path=/trunk/; revision=196
1999-01-29 14:33:04 +00:00
David Welch
a984daa5de no message
svn path=/trunk/; revision=195
1999-01-28 21:42:01 +00:00
David Welch
9a068f8b4b Removed memory leaks
Fixed bug in console driver (wasn't completing irp)

svn path=/trunk/; revision=194
1999-01-28 21:41:05 +00:00
David Welch
0bcca89137 no message
svn path=/trunk/; revision=193
1999-01-28 15:54:26 +00:00
Rex Jolliff
531f88e833 changed program loader to map image into section
svn path=/trunk/; revision=192
1999-01-25 23:06:30 +00:00
Rex Jolliff
a3232e28c6 changes to implement registry tags
svn path=/trunk/; revision=191
1999-01-22 00:28:31 +00:00
David Welch
1908a698e8 Fixed some bugs
svn path=/trunk/; revision=190
1999-01-20 19:02:05 +00:00
jean
97b7ce3ac3 prepare to reserve resource
svn path=/trunk/; revision=189
1999-01-20 13:07:12 +00:00
jean
f03f3933bc corrected bugs in long names, and write operations
add functionnalities to create operation

svn path=/trunk/; revision=188
1999-01-20 13:05:53 +00:00
jean
85e4809132 many bug fixes
svn path=/trunk/; revision=187
1999-01-20 13:00:35 +00:00
jean
e9b21d3c1d modify dir command : print altername name, size and long name
svn path=/trunk/; revision=186
1999-01-20 12:58:11 +00:00
jean
f9a230ad49 return both alternate and long filename
return file size

svn path=/trunk/; revision=185
1999-01-20 12:56:24 +00:00
jean
efa169ca61 remove STATUS_xxx values defined in ddk/status.h
add FILE_ATTRIBUTE_xxx values needed by vfat driver

svn path=/trunk/; revision=184
1999-01-20 12:53:14 +00:00
jean
8f3084dc6d define File disposition values as NT
add FILE_EXISTS

svn path=/trunk/; revision=183
1999-01-20 12:47:37 +00:00
jean
93afbbc9d6 define STATUS values as nt
add some values required by vfat driver

svn path=/trunk/; revision=182
1999-01-20 12:45:33 +00:00
Rex Jolliff
5998255e83 changed ObLookupObject to use Parse member if nonnull
svn path=/trunk/; revision=181
1999-01-20 00:19:46 +00:00
Rex Jolliff
a1fca3d3ae changed Parse member of object type
svn path=/trunk/; revision=180
1999-01-20 00:19:08 +00:00
Rex Jolliff
1e4904f8dd added for crtdll
svn path=/trunk/; revision=179
1999-01-17 17:57:38 +00:00
Rex Jolliff
ac9c590908 adding files for kernel32/crtdll
svn path=/trunk/; revision=178
1999-01-17 17:49:46 +00:00
Rex Jolliff
107f6406fc fixed a bug in K32 heap init
svn path=/trunk/; revision=177
1999-01-17 17:45:20 +00:00
David Welch
12ea84e3c9 Bug fixes
svn path=/trunk/; revision=176
1999-01-17 17:30:18 +00:00
David Welch
8551dc320b Removed obsolete documentation
svn path=/trunk/; revision=175
1999-01-17 17:18:35 +00:00
David Welch
512966336f Add new documentation
svn path=/trunk/; revision=174
1999-01-17 17:17:09 +00:00
David Welch
ed27871348 Updated TODO list
svn path=/trunk/; revision=173
1999-01-17 17:16:00 +00:00
David Welch
51f310e703 Fixed bug (please don't alter functions without debugging)
svn path=/trunk/; revision=172
1999-01-17 17:12:19 +00:00
David Welch
804bfa6fb9 Added this because the crtdll files seem to need it
svn path=/trunk/; revision=171
1999-01-16 21:16:38 +00:00
David Welch
c2059de8af Fixed several bugs
Commented out code that wouldn't compile in lib/crtdll
Began removed memory and file leaks

svn path=/trunk/; revision=170
1999-01-16 21:03:00 +00:00
Rex Jolliff
73d2af04d9 added to cover copyright requirements
svn path=/trunk/; revision=169
1999-01-16 17:30:25 +00:00
Rex Jolliff
d01f8c3180 Boudewjin's massive work on kernel32 and crtdll and a console driver.
svn path=/trunk/; revision=168
1999-01-16 02:11:45 +00:00
jean
6298d37c71 changes to make create directory functions active.
svn path=/trunk/; revision=167
1999-01-13 15:57:45 +00:00
jean
dd705acbd0 correct some bugs in WriteFile function
svn path=/trunk/; revision=166
1999-01-13 15:53:56 +00:00
jean
455be0fece transmit CreateOptions and CreateDisposition to Irp
svn path=/trunk/; revision=165
1999-01-13 15:49:07 +00:00
jean
2d3181f734 more completely implement write operations
svn path=/trunk/; revision=164
1999-01-13 15:46:52 +00:00
jean
2b59b2c1c2 add file dirwr.c
add entry to generate test executables

svn path=/trunk/; revision=163
1999-01-13 15:37:47 +00:00
jean
3c80407d9b write operations on directories
svn path=/trunk/; revision=162
1999-01-13 15:25:50 +00:00
jean
93b8081eed some bugfixes
work on write operations

svn path=/trunk/; revision=161
1999-01-13 15:21:34 +00:00
jean
a044d562b8 add more function's declarations
svn path=/trunk/; revision=160
1999-01-13 15:20:31 +00:00
jean
523aba9a89 cancel changes from david welch : write operations dangerous
remove allocations, use directly buffers

svn path=/trunk/; revision=159
1999-01-13 15:14:48 +00:00
Rex Jolliff
b0cbc91ce1 PE driver loader is complete.
svn path=/trunk/; revision=158
1999-01-13 03:00:06 +00:00
Rex Jolliff
dc7be08202 more work on loader
svn path=/trunk/; revision=157
1999-01-12 07:44:55 +00:00
Rex Jolliff
01e34a063a added for registry support
svn path=/trunk/; revision=156
1999-01-12 01:28:55 +00:00
Rex Jolliff
29ef6b5bac Wrote initial hack at ZwCreateKey and CmInitialize
svn path=/trunk/; revision=155
1999-01-07 01:38:57 +00:00
Rex Jolliff
4159ed2941 Modifed to add Registry specific object mgr types and functions
svn path=/trunk/; revision=154
1999-01-07 01:37:29 +00:00
jean
1e09a4813f redo changes in 1.9 from Rex.
correct bug on fragmented directories.

svn path=/trunk/; revision=153
1999-01-05 12:04:08 +00:00
David Welch
36902d624f Created bugs in wait and timer code
svn path=/trunk/; revision=152
1999-01-04 23:01:18 +00:00
jean
4850652d25 use of correct zones for arguments restartscan and singleentry
svn path=/trunk/; revision=151
1999-01-04 14:11:15 +00:00
jean
c92156be04 added function to defrag free list, because else pool take all memory
with free list.

svn path=/trunk/; revision=150
1999-01-04 12:35:24 +00:00
jean
17b6b4d72a correct bug in write operations
svn path=/trunk/; revision=149
1999-01-04 12:11:35 +00:00
jean
66658f3d1a many changes to :
support one FCB/file and one CCB/open
write on existing files
open of root directory

svn path=/trunk/; revision=148
1999-01-04 12:08:54 +00:00
jean
35f07df64f adaptation to new structs in vfat.h
svn path=/trunk/; revision=147
1999-01-04 12:02:38 +00:00
jean
06a593cc64 changes to support FCB and CCB better
svn path=/trunk/; revision=146
1999-01-04 11:59:25 +00:00
David Welch
20ef31f3cc Added directory listing support for the shell
Correctec bug that prevented listing the root directory in the vfat fsd
Corrected mistake where the SL_xxx constants were too long

svn path=/trunk/; revision=145
1999-01-03 16:18:19 +00:00
Rex Jolliff
2d14c3e110 Changes to support the COFF driver loader
svn path=/trunk/; revision=144
1999-01-01 22:33:38 +00:00
David Welch
02e3d7b08e *** empty log message ***
svn path=/trunk/; revision=143
1999-01-01 22:03:17 +00:00
David Welch
d55d012d33 Added ntdll functions
svn path=/trunk/; revision=142
1999-01-01 21:47:57 +00:00
David Welch
de8fc633f8 Beginnings of ext2fs driver
svn path=/trunk/; revision=141
1999-01-01 21:39:43 +00:00
Rex Jolliff
3244132cc7 Changes to support new VFAT functions and the loader
svn path=/trunk/; revision=140
1998-12-30 22:48:14 +00:00
Rex Jolliff
6ce4528a80 new file for driver from Jean
svn path=/trunk/; revision=139
1998-12-30 19:01:23 +00:00
Rex Jolliff
43fd2f2579 readme for the VFAT driver provided by jean
svn path=/trunk/; revision=138
1998-12-30 18:45:49 +00:00
Rex Jolliff
a984573ad4 more loader changes and new fixes to the VFAT driver from jean
svn path=/trunk/; revision=137
1998-12-30 18:43:27 +00:00
Rex Jolliff
6fd4505b6f more changes to support the loader
svn path=/trunk/; revision=136
1998-12-23 02:40:01 +00:00
David Welch
4209cfec73 Changed type of LONGLONG
svn path=/trunk/; revision=135
1998-12-22 20:41:40 +00:00
David Welch
e007300ee0 Fixed race in task-switching code
svn path=/trunk/; revision=134
1998-12-22 19:14:19 +00:00
David Welch
3ecc11334b Fixed race in task switching code
svn path=/trunk/; revision=133
1998-12-22 19:13:33 +00:00
David Welch
1628f7a89e Fixed a race in the task-switching code
svn path=/trunk/; revision=132
1998-12-22 19:11:47 +00:00
David Welch
b161ff0650 Fixed bug
svn path=/trunk/; revision=131
1998-12-21 15:48:21 +00:00
Rex Jolliff
6cd2bc16b8 Various changes to support the executable/driver loader
svn path=/trunk/; revision=130
1998-12-20 19:41:39 +00:00
David Welch
a9ce8c6379 *** empty log message ***
svn path=/trunk/; revision=129
1998-12-19 19:26:02 +00:00
David Welch
5d1ddcb775 Adding missing functions to ntdll
svn path=/trunk/; revision=128
1998-12-19 19:05:11 +00:00
David Welch
962e8486ea Put def file in its own directory
svn path=/trunk/; revision=127
1998-12-19 19:01:30 +00:00
David Welch
8f8c71dfb9 Minor bug fixes
svn path=/trunk/; revision=126
1998-12-19 18:56:57 +00:00
David Welch
e017266cd0 Corrected some bugs in the system libraries
svn path=/trunk/; revision=125
1998-12-19 18:49:28 +00:00
David Welch
316713be6b Small changes to include files
svn path=/trunk/; revision=124
1998-12-19 18:46:02 +00:00
David Welch
937e125ad7 Improved shell and removed symbol list
svn path=/trunk/; revision=123
1998-12-19 18:44:54 +00:00
David Welch
43c24d3654 Removed string functions from native system calls and removed binary from
repository

svn path=/trunk/; revision=122
1998-12-19 18:40:55 +00:00
David Welch
7e398d4e22 Cleaned up system libraries
svn path=/trunk/; revision=121
1998-12-19 17:48:53 +00:00
Rex Jolliff
0d71cd85bd more hacking on the loader
svn path=/trunk/; revision=120
1998-12-12 17:44:30 +00:00
David Welch
f5d7376e5a Additions to ntifs.h (just for reference)
svn path=/trunk/; revision=119
1998-12-12 17:01:34 +00:00
Rex Jolliff
570be7966c Implemented loader functions for COFF Drivers and BIN apps, and stubs for PE apps
svn path=/trunk/; revision=118
1998-12-12 00:24:12 +00:00
David Welch
6b8cb5c939 Added ChangeLog for better version information, io.h so it would compile
svn path=/trunk/; revision=117
1998-12-08 23:43:37 +00:00
David Welch
6eaf6180fd Corrected a memory leak in the read cleanup code
svn path=/trunk/; revision=116
1998-12-08 19:44:04 +00:00
David Welch
4bc75819a3 Corrected a number of bugs, including the keyboard one
svn path=/trunk/; revision=115
1998-12-08 16:51:47 +00:00
Rex Jolliff
8587170853 didnt want to delete these
svn path=/trunk/; revision=114
1998-12-08 04:31:41 +00:00
Rex Jolliff
683ed8c5a1 Added ZwQueryFileInformation
svn path=/trunk/; revision=113
1998-12-08 04:31:04 +00:00
Rex Jolliff
bc06faa8cd Fixed a bug introduced by a change in ZwAllocateVirtualMemory call
svn path=/trunk/; revision=112
1998-12-06 00:04:04 +00:00
Rex Jolliff
4bc8aa3713 more minor fixes
svn path=/trunk/; revision=111
1998-12-05 00:15:50 +00:00
Rex Jolliff
b097125d77 this file is machine generated
svn path=/trunk/; revision=110
1998-12-04 23:36:58 +00:00
Rex Jolliff
13e75fd710 cleanup to support incorporated changes
svn path=/trunk/; revision=109
1998-12-04 23:35:48 +00:00
Rex Jolliff
37af92952e Rolled in various changes from others
svn path=/trunk/; revision=108
1998-12-04 18:28:13 +00:00
Rex Jolliff
159ee3800d Added this file
svn path=/trunk/; revision=107
1998-12-03 04:49:07 +00:00
Rex Jolliff
82d21c903e Changed include/hal/io.h to halio.h with i386/io.h
svn path=/trunk/; revision=106
1998-11-29 19:39:40 +00:00
Rex Jolliff
b6187e2de7 added ext partition check macro
svn path=/trunk/; revision=105
1998-11-29 19:31:45 +00:00
Rex Jolliff
98d405409a bumped the DRQ timeout up due to user request
svn path=/trunk/; revision=104
1998-11-29 19:29:57 +00:00
Rex Jolliff
ce0b82afeb Used Ext partition detection macro and less intrusive register maps
svn path=/trunk/; revision=103
1998-11-29 19:28:18 +00:00
Rex Jolliff
fd5a21279e Continuing work in progress
svn path=/trunk/; revision=102
1998-11-29 19:25:39 +00:00
Rex Jolliff
e96765787f Thread should be restarted in passive level.
svn path=/trunk/; revision=101
1998-11-29 19:24:46 +00:00
Rex Jolliff
a06ebb79bb Changed include file spec
svn path=/trunk/; revision=100
1998-11-29 19:22:42 +00:00
Rex Jolliff
f075faafdf changed include file spec
svn path=/trunk/; revision=99
1998-11-29 19:15:37 +00:00
Rex Jolliff
043bc3b058 added support for CHECKED macro
svn path=/trunk/; revision=98
1998-11-29 19:11:10 +00:00
Rex Jolliff
a3a5ebb7c7 added CHECKED to defines
svn path=/trunk/; revision=97
1998-11-29 19:09:49 +00:00
Rex Jolliff
f93f98a522 added driver unloading to list
svn path=/trunk/; revision=96
1998-11-29 19:08:21 +00:00
David Welch
93263fa722 Updated version.h only, just a test really
svn path=/trunk/; revision=95
1998-11-28 23:07:08 +00:00
Rex Jolliff
d6830ac891 added more partition types including FAT32
svn path=/trunk/; revision=94
1998-11-13 08:06:13 +00:00
Rex Jolliff
1302d0fe3b used macro for winsize in place of hardcoded number
svn path=/trunk/; revision=93
1998-11-13 08:05:22 +00:00
Rex Jolliff
45a6e16434 fixed error in stub code
svn path=/trunk/; revision=92
1998-11-13 08:04:16 +00:00
Rex Jolliff
c89930f961 udpate
svn path=/trunk/; revision=91
1998-11-07 21:38:16 +00:00
Rex Jolliff
bc9bf59740 New release from Jason
svn path=/trunk/; revision=90
1998-11-07 20:30:33 +00:00
Rex Jolliff
a998ae77b0 Added unimplemented message to unimplemented functions
svn path=/trunk/; revision=89
1998-11-07 20:29:46 +00:00
Rex Jolliff
7499a5965d added unimplemented messages to all imimplemented functions
svn path=/trunk/; revision=88
1998-11-07 20:28:51 +00:00
Rex Jolliff
f530e60c76 Fixed calls to StartTimer
svn path=/trunk/; revision=87
1998-10-31 22:33:17 +00:00
Rex Jolliff
409861205e no change
svn path=/trunk/; revision=86
1998-10-31 22:32:13 +00:00
Rex Jolliff
33e768c8cd added descriptive text to exception dump
svn path=/trunk/; revision=85
1998-10-31 22:30:08 +00:00
Rex Jolliff
5dd16d52fe added cmd to gen syms
svn path=/trunk/; revision=84
1998-10-31 22:25:30 +00:00
Rex Jolliff
3c0b32b97a (Jason) various changes
svn path=/trunk/; revision=83
1998-10-31 15:54:07 +00:00
Rex Jolliff
b5be07756f (Jason) added sector count to blockdev interface
svn path=/trunk/; revision=82
1998-10-31 15:52:45 +00:00
Rex Jolliff
8134515a1a Used a different constant for number of poll retries
svn path=/trunk/; revision=81
1998-10-31 15:51:23 +00:00
Rex Jolliff
a3fbbaa42d added timer test routines
svn path=/trunk/; revision=80
1998-10-31 15:50:08 +00:00
Rex Jolliff
8b29e69d3d Verified correctness of epoch DOW
svn path=/trunk/; revision=79
1998-10-31 15:47:28 +00:00
Rex Jolliff
e3a11b68b8 Fixed timer constants and repitition code
svn path=/trunk/; revision=78
1998-10-31 15:46:36 +00:00
Rex Jolliff
09215f3126 Fixed large integer conv bug
svn path=/trunk/; revision=77
1998-10-31 15:44:22 +00:00
Rex Jolliff
e68e2e431a Added Fix for >255 sector read/write and first hack at timeout code
svn path=/trunk/; revision=76
1998-10-20 06:00:13 +00:00
Rex Jolliff
267b8c4e8c Fix from brian for broken function
svn path=/trunk/; revision=75
1998-10-20 05:58:53 +00:00
Rex Jolliff
dc5f3e0195 Fixed synchronous I/O bug in ZwWriteFile
svn path=/trunk/; revision=74
1998-10-20 05:56:26 +00:00
Rex Jolliff
74ff8524ad Added serial debugging support
svn path=/trunk/; revision=73
1998-10-20 05:54:29 +00:00
Rex Jolliff
37529daf35 Fixed a problem with buffered io IRPs
svn path=/trunk/; revision=72
1998-10-13 03:24:42 +00:00
Rex Jolliff
d0c8759887 Changed failure status report to print hex
svn path=/trunk/; revision=71
1998-10-12 21:05:58 +00:00
Rex Jolliff
8909f04b2c Fixed debugging messages and other minor changes
svn path=/trunk/; revision=70
1998-10-12 21:04:07 +00:00
Rex Jolliff
e1d692c393 Eliminated a compiler warning
svn path=/trunk/; revision=69
1998-10-12 21:02:34 +00:00
Rex Jolliff
1d9a6c728c changed static functions to standard naming convention
svn path=/trunk/; revision=68
1998-10-12 20:58:27 +00:00
Rex Jolliff
0805f2913e added include for debugging macros
svn path=/trunk/; revision=67
1998-10-12 20:54:51 +00:00
Rex Jolliff
135e1512ef UserEvent and UserIosb were not being set in IoBuildSynchronousFsdRequest
svn path=/trunk/; revision=66
1998-10-12 20:51:28 +00:00
Rex Jolliff
a7dd9bd3f9 added some comment markers in the status codes
svn path=/trunk/; revision=65
1998-10-12 20:50:33 +00:00
Rex Jolliff
6144b903c3 chagned to support local build
svn path=/trunk/; revision=64
1998-10-12 20:40:20 +00:00
Rex Jolliff
3afc66723c more chages to bring up to krnl0012
svn path=/trunk/; revision=62
1998-10-05 14:31:06 +00:00
Rex Jolliff
537bf0fdf6 This commit was generated by cvs2svn to compensate for changes in r58,
which included commits to RCS files with non-trunk default branches.

svn path=/trunk/; revision=59
1998-10-05 04:55:45 +00:00
Rex Jolliff
c38258c97a Initial revision
svn path=/trunk/; revision=56
1998-10-05 04:55:44 +00:00
Rex Jolliff
3f988bd286 brings code in line with release 12
svn path=/trunk/; revision=55
1998-10-05 04:50:07 +00:00
Rex Jolliff
ee81c811cd This commit was generated by cvs2svn to compensate for changes in r52,
which included commits to RCS files with non-trunk default branches.

svn path=/trunk/; revision=53
1998-10-05 04:01:30 +00:00
Rex Jolliff
645218d5c8 Initial revision
svn path=/trunk/; revision=50
1998-10-05 04:00:59 +00:00
Rex Jolliff
5c0fb0f108 general bug fix changes
svn path=/trunk/; revision=49
1998-10-05 03:39:36 +00:00
Rex Jolliff
22ebf085eb First release of the IDE driver
svn path=/trunk/; revision=48
1998-09-20 02:22:48 +00:00
Rex Jolliff
cb0fe70650 Page overlapping MDLs have been fixed
svn path=/trunk/; revision=47
1998-09-20 02:21:36 +00:00
Rex Jolliff
9a55f0f7ed this fixes the problem with NASM invocation in make
svn path=/trunk/; revision=46
1998-09-20 02:19:42 +00:00
Rex Jolliff
7967ac94a2 fixes and changes to support IDE driver
svn path=/trunk/; revision=45
1998-09-15 14:31:18 +00:00
Rex Jolliff
4bbc8ea6ef added pool validation to checkpoint/dprint macro
svn path=/trunk/; revision=44
1998-09-15 14:18:47 +00:00
Rex Jolliff
099d789b13 array definition had incorrect length
svn path=/trunk/; revision=43
1998-09-15 14:17:32 +00:00
Rex Jolliff
6bdaf42c26 cleanup of import
svn path=/trunk/; revision=42
1998-09-13 16:32:10 +00:00
Rex Jolliff
40473b6aba This commit was generated by cvs2svn to compensate for changes in r39,
which included commits to RCS files with non-trunk default branches.

svn path=/trunk/; revision=40
1998-09-13 15:55:55 +00:00
Rex Jolliff
ffc37c2cfd Initial revision
svn path=/trunk/; revision=37
1998-09-13 15:55:36 +00:00
Rex Jolliff
e8652909ce changes to support debugging of ide driver
svn path=/trunk/; revision=36
1998-09-13 02:37:20 +00:00
Rex Jolliff
153b0ad928 ZwReadFile was using Write member of Irp union.
ZwReadFile now returns correct status

svn path=/trunk/; revision=35
1998-09-13 01:17:05 +00:00
Rex Jolliff
ca01965c67 added code to initialize CurrentIrp in DeviceObject.
svn path=/trunk/; revision=34
1998-09-13 01:13:48 +00:00
Rex Jolliff
b903d86810 no specific problems fixed
svn path=/trunk/; revision=33
1998-09-09 02:34:38 +00:00
Rex Jolliff
809b4b1eab This commit was generated by cvs2svn to compensate for changes in r30,
which included commits to RCS files with non-trunk default branches.

svn path=/trunk/; revision=31
1998-09-05 17:34:23 +00:00
Rex Jolliff
bb9cc48934 Initial revision
svn path=/trunk/; revision=28
1998-09-05 17:33:57 +00:00
Rex Jolliff
f29364e917 *** empty log message ***
svn path=/trunk/; revision=27
1998-09-05 17:18:00 +00:00
Rex Jolliff
38389db926 reorganized it a little
svn path=/trunk/; revision=26
1998-09-03 01:47:13 +00:00
Rex Jolliff
50b41bfae6 it is not useful for this to be in the archive
svn path=/trunk/; revision=25
1998-09-03 01:46:19 +00:00
Rex Jolliff
b40b785ec0 Implementation of most of the LargeInt functions
svn path=/trunk/; revision=24
1998-09-03 01:43:54 +00:00
Rex Jolliff
35cc27eee0 This commit was generated by cvs2svn to compensate for changes in r21,
which included commits to RCS files with non-trunk default branches.

svn path=/trunk/; revision=22
1998-08-28 23:24:42 +00:00
Rex Jolliff
bbddb2c838 Initial revision
svn path=/trunk/; revision=19
1998-08-28 23:24:25 +00:00
Rex Jolliff
b4be455beb Release Cleanup
svn path=/trunk/; revision=18
1998-08-25 05:06:39 +00:00
Rex Jolliff
2fe2a748af Release cleanup
svn path=/trunk/; revision=17
1998-08-25 04:59:57 +00:00
Rex Jolliff
4ef8280497 Release cleanup
svn path=/trunk/; revision=16
1998-08-25 04:53:56 +00:00
Rex Jolliff
1189c35dd7 Release cleanup
svn path=/trunk/; revision=15
1998-08-25 04:48:36 +00:00
Rex Jolliff
9cef58c15d Release cleanup
svn path=/trunk/; revision=14
1998-08-25 04:41:53 +00:00
Rex Jolliff
cdafa11dc1 new release cleanup
svn path=/trunk/; revision=13
1998-08-25 04:37:43 +00:00
Rex Jolliff
b5efc5cfc5 This commit was generated by cvs2svn to compensate for changes in r10,
which included commits to RCS files with non-trunk default branches.

svn path=/trunk/; revision=11
1998-08-25 04:27:41 +00:00
Rex Jolliff
9e7d29f65a Initial revision
svn path=/trunk/; revision=8
1998-08-25 04:27:26 +00:00
Rex Jolliff
336c153bd9 More work needed before alpha testing
svn path=/trunk/; revision=7
1998-08-25 04:06:44 +00:00
The ReactOS Manager
8e97300321 Update from the kernel team
svn path=/trunk/; revision=6
1998-08-12 22:43:38 +00:00
1832 changed files with 301817 additions and 22250 deletions

2
reactos/.cvsignore Normal file
View File

@@ -0,0 +1,2 @@
dist
errors

14
reactos/CREDITS Normal file
View File

@@ -0,0 +1,14 @@
In no particular order
Rex Jolliff (rex@lvcablemodem.com)
Boudewijn Dekker (ariadne@xs4all.nl)
Eric Kohl (ekohl@abo.rhein-zeitung.de)
Emanuele Aliberti (ea@iol.it)
David Welch (welch@cwcom.net)
Iwan Fatahi (i_fatahi@hotmail.com)
Robert Bergkvist (fragdance@hotmail.com)
Victor Kirhenshtein (sauros@iname.com)
Jason Filby (jasonfilby@yahoo.com)
Brian Palmer (brianp@sginet.com)
Phillip Susi (phreak@iag.net)
Paolo Pantaleo (paolopan@freemail.it)

16
reactos/ChangeLog Normal file
View File

@@ -0,0 +1,16 @@
27/5/00: Fixed issue with closing non-existent or already closed handle
26/1/99: ZwCreateProcess now maps ntdll rather than the user-mode code
9/6/99: Implemented ZwOpenProcess
Partially implemented killing other threads (possible memory
leaks)
Made a start on a proper implemention of APCs (based on
article in NT insider)
8/12/98: Corrected bug in shell (Read two keypresses and assumed they
where the key going up and down respectively)
Corrected race in dpc handling
Took out cleanup sections in ZwReadFile (now handled by the APC)
Disabled broken code in kernel32

31
reactos/INSTALL Normal file
View File

@@ -0,0 +1,31 @@
1. Build environment
To build the system you need either mingw32 installed on Windows or a
mingw32 cross compiler running on unix.
2. Building
To build from Windows run make. To build from unix, edit rules.mak and change
the PREFIX variable to the correct value for your cross-compiler, then run
'make'.
3. Installation
Installation isn't yet automated, sorry. The system can only be installed on
the first partition which must be formatted for DOS. Set up a directory
structure like the following
make directories C:\reactos,C:\reactos\system32,C:\reactos\system32\drivers
Copy apps/shell/shell.exe to C:\reactos\system32
Copy subsys/smss/smss.exe to C:\reactos\system32
Copy services/dd/keyboard/keyboard.sys to C:\reactos\system32\drivers
Copy services/dd/blue/blue.sys to C:\reactos\system32\drivers
Copy lib/ntdll/ntdll.dll to C:\reactos\system32
Copy lib/kernel32/kernel32.dll to C:\reactos\system32
Copy lib/crtdll/crtdll.dll to C:\reactos\system32
The system can only be started from DOS. Copy the following files,
services/dd/ide/ide.sys, services/fs/vfat/vfatfsd.sys and
loaders/dos/loadros.com, to a suitable directory. The system can then be
booted with the command 'loadros.com ide.sys vfatfsd.sys'.

301
reactos/Makefile Normal file
View File

@@ -0,0 +1,301 @@
#
# Global makefile
#
#
# Select your host
#
#HOST = mingw32-linux
#HOST = djgpp-msdos
#HOST = mingw32-windows
include rules.mak
#
# Required to run the system
#
COMPONENTS = iface_native iface_additional ntoskrnl
DLLS = ntdll kernel32 crtdll advapi32 fmifs gdi32
#DLLS = mingw32
SUBSYS = smss win32k csrss
#
# Select the server(s) you want to build
#
SERVERS = win32
# SERVERS = posix linux os2
#
# Select the loader(s) you want to build
#
LOADERS = dos
# LOADERS = boot
#
# Select the device drivers and filesystems you want
#
DEVICE_DRIVERS = blue ide keyboard null parallel serial vidport
# DEVICE_DRIVERS = beep event floppy ide_test mouse sound test test1
FS_DRIVERS = vfat minix
# FS_DRIVERS = minix ext2 template
KERNEL_SERVICES = $(DEVICE_DRIVERS) $(FS_DRIVERS)
APPS = args hello shell test cat bench apc shm lpc thread event file gditest \
pteb consume
# objdir
all: buildno $(COMPONENTS) $(DLLS) $(SUBSYS) $(LOADERS) $(KERNEL_SERVICES) $(APPS)
.PHONY: all
clean: buildno_clean $(COMPONENTS:%=%_clean) $(DLLS:%=%_clean) $(LOADERS:%=%_clean) \
$(KERNEL_SERVICES:%=%_clean) $(SUBSYS:%=%_clean) $(APPS:%=%_clean)
.PHONY: clean
floppy: make_floppy_dirs autoexec_floppy $(COMPONENTS:%=%_floppy) \
$(DLLS:%=%_floppy) $(LOADERS:%=%_floppy) \
$(KERNEL_SERVICES:%=%_floppy) $(SUBSYS:%=%_floppy) \
$(APPS:%=%_floppy)
dist: clean_dist_dir make_dist_dirs $(COMPONENTS:%=%_dist) $(DLLS:%=%_dist) \
$(LOADERS:%=%_dist) $(KERNEL_SERVICES:%=%_dist) $(SUBSYS:%=%_dist) \
$(APPS:%=%_dist)
#
# Build number generator
#
buildno: include/reactos/version.h
make -C apps/buildno
buildno_clean:
make -C apps/buildno clean
buildno_floppy:
buildno_dist:
.PHONY: buildno buildno_clean buildno_floppy buildno_dist
#
# Applications
#
$(APPS): %:
make -C apps/$*
$(APPS:%=%_clean): %_clean:
make -C apps/$* clean
$(APPS:%=%_floppy): %_floppy:
make -C apps/$* floppy
$(APPS:%=%_dist): %_dist:
make -C apps/$* dist
.PHONY: $(APPS) $(APPS:%=%_clean) $(APPS:%=%_floppy) $(APPS:%=%_dist)
#
# Interfaces
#
iface_native:
make -C iface/native
iface_native_clean:
make -C iface/native clean
iface_native_floppy:
iface_native_dist:
iface_additional:
make -C iface/addsys
iface_additional_clean:
make -C iface/addsys clean
iface_additional_floppy:
iface_additional_dist:
.PHONY: iface_native iface_native_clean iface_native_floppy \
iface_native_dist \
iface_additional iface_additional_clean iface_additional_floppy \
iface_additional_dist \
#
# Device driver rules
#
$(DEVICE_DRIVERS): %:
make -C services/dd/$*
$(DEVICE_DRIVERS:%=%_clean): %_clean:
make -C services/dd/$* clean
$(DEVICE_DRIVERS:%=%_floppy): %_floppy:
make -C services/dd/$* floppy
$(DEVICE_DRIVERS:%=%_dist): %_dist:
make -C services/dd/$* dist
.PHONY: $(DEVICE_DRIVERS) $(DEVICE_DRIVERS:%=%_clean) \
$(DEVICE_DRIVERS:%=%_floppy) $(DEVICE_DRIVERS:%=%_dist)
$(FS_DRIVERS): %:
make -C services/fs/$*
$(FS_DRIVERS:%=%_clean): %_clean:
make -C services/fs/$* clean
$(FS_DRIVERS:%=%_floppy): %_floppy:
make -C services/fs/$* floppy
$(FS_DRIVERS:%=%_dist): %_dist:
make -C services/fs/$* dist
.PHONY: $(FS_DRIVERS) $(FS_DRIVERS:%=%_clean) $(FS_DRIVERS:%=%_floppy) \
$(FS_DRIVERS:%=%_dist)
#
# Kernel loaders
#
$(LOADERS): %:
make -C loaders/$*
$(LOADERS:%=%_clean): %_clean:
make -C loaders/$* clean
$(LOADERS:%=%_floppy): %_floppy:
make -C loaders/$* floppy
$(LOADERS:%=%_dist): %_dist:
make -C loaders/$* dist
.PHONY: $(LOADERS) $(LOADERS:%=%_clean) $(LOADERS:%=%_floppy) \
$(LOADERS:%=%_dist)
#
# Required system components
#
ntoskrnl:
make -C ntoskrnl
ntoskrnl_clean:
make -C ntoskrnl clean
ntoskrnl_floppy:
make -C ntoskrnl floppy
ntoskrnl_dist:
make -C ntoskrnl dist
.PHONY: ntoskrnl ntoskrnl_clean ntoskrnl_floppy ntoskrnl_dist
#
# Required DLLs
#
$(DLLS): %:
make -C lib/$*
$(DLLS:%=%_clean): %_clean:
make -C lib/$* clean
$(DLLS:%=%_floppy): %_floppy:
make -C lib/$* floppy
$(DLLS:%=%_dist): %_dist:
make -C lib/$* dist
.PHONY: $(DLLS) $(DLLS:%=%_clean) $(DLLS:%=%_floppy) $(DLLS:%=%_dist)
#
# Kernel Subsystems
#
$(SUBSYS): %:
make -C subsys/$*
$(SUBSYS:%=%_clean): %_clean:
make -C subsys/$* clean
$(SUBSYS:%=%_floppy): %_floppy:
make -C subsys/$* floppy
$(SUBSYS:%=%_dist): %_dist:
make -C subsys/$* dist
.PHONY: $(SUBSYS) $(SUBSYS:%=%_clean) $(SUBSYS:%=%_floppy) \
$(SUBSYS:%=%_dist)
#
# Make an install floppy
#
install: all
./install.sh /mnt/hda1
./install.sh /mnt/hda4
./install.bochs
make_floppy_dirs:
ifeq ($(DOSCLI),yes)
mkdir $(FLOPPY_DIR)\dlls
mkdir $(FLOPPY_DIR)\apps
mkdir $(FLOPPY_DIR)\drivers
mkdir $(FLOPPY_DIR)\subsys
else
mkdir $(FLOPPY_DIR)/dlls $(FLOPPY_DIR)/apps $(FLOPPY_DIR)/drivers
mkdir $(FLOPPY_DIR)/subsys
endif
.PHONY: make_floppy_dirs
autoexec_floppy: $(FLOPPY_DIR)/autoexec.bat
$(FLOPPY_DIR)/autoexec.bat: bootflop.bat
ifeq ($(DOSCLI),yes)
$(CP) bootflop.bat $(FLOPPY_DIR)\autoexec.bat
else
$(CP) bootflop.bat $(FLOPPY_DIR)/autoexec.bat
endif
#
# Make a distribution saveset
#
clean_dist_dir:
ifeq ($(DOSCLI),yes)
- $(RM) $(DIST_DIR)\dlls\*.dll
- $(RM) $(DIST_DIR)\apps\*.exe
- $(RM) $(DIST_DIR)\drivers\*.sys
- $(RM) $(DIST_DIR)\subsys\*.exe
- $(RMDIR) $(DIST_DIR)\dlls
- $(RMDIR) $(DIST_DIR)\apps
- $(RMDIR) $(DIST_DIR)\drivers
- $(RMDIR) $(DIST_DIR)\subsys
- $(RMDIR) $(DIST_DIR)
else
$(RM) -r $(DIST_DIR)
endif
make_dist_dirs:
ifeq ($(DOSCLI),yes)
mkdir $(DIST_DIR)
mkdir $(DIST_DIR)\dlls
mkdir $(DIST_DIR)\apps
mkdir $(DIST_DIR)\drivers
mkdir $(DIST_DIR)\dlls
mkdir $(DIST_DIR)\subsys
else
mkdir $(DIST_DIR) $(DIST_DIR)/dlls $(DIST_DIR)/apps $(DIST_DIR)/drivers
mkdir $(DIST_DIR)/subsys
endif
.PHONY: clean_dist_dir make_dist_dirs
#
#
#
etags:
find . -name "*.[ch]" -print | etags --language=c -

15
reactos/NEWS Normal file
View File

@@ -0,0 +1,15 @@
0.0.14: Converted to PE format
All system libraries are now dlls
0.0.13: Mostly bugfixes (I think)
0.0.12: Added support for multiple processes (not really tested)
System calls
kernel32 now compiles (only as a static library)
Fixed invalid tss bug (hopefully)
Added section support
Added some of the ZwxxxVirtual calls
Added prototype caching functions (only the Minix fsd actually
uses them)
Added handle access and type checking
Prototype APC implementation (no support for user APCs)

24
reactos/README Normal file
View File

@@ -0,0 +1,24 @@
About Reactos
1. What is Reactos
A project aiming to make an approximate clone of Windows NT, compatible
with most Windows applications.
The project has a website at http://www.reactos.com/
2. Building Reactos
See the INSTALL file for more details.
3. More information
See the doc subdirectory for some sparse notes
4. Who is responsible
See the CREDITS file
5. Recent developments
See the NEWS file

View File

@@ -0,0 +1,33 @@
#include <windows.h>
extern int main(int args, char* argv[], char* environ[]);
static unsigned int _argc = 0;
static char** _argv = NULL;
static char** _environ = NULL;
int mainCRTStartup(PWSTR args)
{
int nRet;
// SetUnhandledExceptionFilter(NULL);
// _fpreset();
// __GetMainArgs(&_argc, &_argv, &_environ, 0);
nRet = main(_argc, _argv, _environ);
// _cexit();
ExitProcess(nRet);
}
int WinMainCRTStartup()
{
return mainCRTStartup(NULL);
}
void __main(void)
{
}

View File

@@ -0,0 +1,98 @@
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
#include <windows.h>
#include <ddk/ntddk.h>
HANDLE OutputHandle;
HANDLE InputHandle;
void debug_printf(char* fmt, ...)
{
va_list args;
char buffer[255];
va_start(args,fmt);
vsprintf(buffer,fmt,args);
WriteConsoleA(OutputHandle, buffer, strlen(buffer), NULL, NULL);
va_end(args);
}
VOID STDCALL ApcRoutine(PVOID Context,
PIO_STATUS_BLOCK IoStatus,
ULONG Reserved)
{
printf("(apc.exe) ApcRoutine(Context %p)\n", Context);
}
int main(int argc, char* argv[])
{
NTSTATUS Status;
HANDLE FileHandle;
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING FileName;
IO_STATUS_BLOCK IoStatus;
CHAR Buffer[256];
HANDLE EventHandle;
AllocConsole();
InputHandle = GetStdHandle(STD_INPUT_HANDLE);
OutputHandle = GetStdHandle(STD_OUTPUT_HANDLE);
printf("APC test program\n");
EventHandle = CreateEventW(NULL,
FALSE,
FALSE,
NULL);
if (EventHandle == INVALID_HANDLE_VALUE)
{
printf("Failed to create event\n");
return 0;
}
printf("Opening file\n");
RtlInitUnicodeString(&FileName,
L"\\C:\\a.txt");
InitializeObjectAttributes(&ObjectAttributes,
&FileName,
0,
NULL,
NULL);
printf("Creating file\n");
FileHandle = CreateFileW(L"C:\\a.txt",
FILE_GENERIC_READ | FILE_GENERIC_WRITE,
0,
NULL,
OPEN_EXISTING,
FILE_FLAG_OVERLAPPED,
NULL);
if (FileHandle == INVALID_HANDLE_VALUE)
{
printf("Open failed\n");
return 0;
}
printf("Reading file\n");
Status = ZwReadFile(FileHandle,
NULL,
(PIO_APC_ROUTINE)ApcRoutine,
(PVOID)0xdeadbeef,
&IoStatus,
Buffer,
256,
NULL,
NULL);
if (!NT_SUCCESS(Status))
{
printf("Read failed\n");
}
printf("Waiting\n");
WaitForSingleObjectEx(EventHandle, INFINITE, TRUE);
printf("Returned from wait\n");
ZwClose(FileHandle);
printf("Program finished\n");
for(;;);
return 0;
}

View File

@@ -0,0 +1,44 @@
#
#
#
OBJECTS= ../common/crt0.o apc.o
PROGS= apc.exe
BASE_CFLAGS = -I../../include
LIBS = ../../lib/crtdll/crtdll.a ../../lib/kernel32/kernel32.a \
../../lib/ntdll/ntdll.a
all: $(PROGS)
.phony: all
clean:
- $(RM) apc.o
- $(RM) apc.exe
- $(RM) apc.sym
.phony: clean
floppy: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
ifeq ($(DOSCLI),yes)
$(CP) $* $(FLOPPY_DIR)\apps\$*
else
$(CP) $* $(FLOPPY_DIR)/apps/$*
endif
dist: $(PROGS:%=../../$(DIST_DIR)/apps/%)
$(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: %
ifeq ($(DOSCLI),yes)
$(CP) $* ..\..\$(DIST_DIR)\apps\$*
else
$(CP) $* ../../$(DIST_DIR)/apps/$*
endif
apc.exe: $(OBJECTS) $(LIBS)
$(LD) $(OBJECTS) $(LIBS) -o apc.exe
$(NM) --numeric-sort apc.exe > apc.sym
include ../../rules.mak

View File

@@ -0,0 +1,39 @@
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
#include <windows.h>
HANDLE OutputHandle;
HANDLE InputHandle;
void debug_printf(char* fmt, ...)
{
va_list args;
char buffer[255];
va_start(args,fmt);
vsprintf(buffer,fmt,args);
WriteConsoleA(OutputHandle, buffer, strlen(buffer), NULL, NULL);
va_end(args);
}
int main(int argc, char* argv[])
{
int i;
AllocConsole();
InputHandle = GetStdHandle(STD_INPUT_HANDLE);
OutputHandle = GetStdHandle(STD_OUTPUT_HANDLE);
printf("GetCommandLineA() %s\n",GetCommandLineA());
debug_printf("GetCommandLineA() %s\n",GetCommandLineA());
debug_printf("argc %d\n", argc);
for (i=0; i<argc; i++)
{
debug_printf("Argv[%d]: %x\n",i,argv[i]);
debug_printf("Argv[%d]: '%s'\n",i,argv[i]);
}
return 0;
}

View File

@@ -0,0 +1,42 @@
#
#
#
OBJECTS= args.o
PROGS= args.exe
BASE_CFLAGS = -I../../include
all: $(PROGS)
.phony: all
clean:
- $(RM) args.o
- $(RM) args.exe
- $(RM) args.sym
.phony: clean
floppy: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
ifeq ($(DOSCLI),yes)
$(CP) $* $(FLOPPY_DIR)\apps\$*
else
$(CP) $* $(FLOPPY_DIR)/apps/$*
endif
dist: $(PROGS:%=../../$(DIST_DIR)/apps/%)
$(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: %
ifeq ($(DOSCLI),yes)
$(CP) $* ..\..\$(DIST_DIR)\apps\$*
else
$(CP) $* ../../$(DIST_DIR)/apps/$*
endif
args.exe: $(OBJECTS)
$(CC) $(OBJECTS) -o args.exe
$(NM) --numeric-sort args.exe > args.sym
include ../../rules.mak

View File

@@ -0,0 +1,8 @@
/*
*
*/
int main(int argc, char* argv[])
{
}

View File

@@ -0,0 +1,82 @@
#include <stdio.h>
#include <windows.h>
#define NR_THREADS (0x1)
DWORD WINAPI
thread_main1(LPVOID param)
{
printf("Thread 1 running (Counter %lu)\n", (DWORD)param);
return 0;
}
DWORD WINAPI
thread_main2(LPVOID param)
{
printf("Thread 2 running (Counter %lu)\n", (DWORD)param);
return 0;
}
int main (void)
{
HANDLE hThread;
DWORD i=0;
DWORD id;
#if 1
printf("Creating %d threads...\n",NR_THREADS*2);
for (i=0;i<NR_THREADS;i++)
{
CreateThread(NULL,
0,
thread_main1,
(LPVOID)i,
0,
&id);
/* CreateThread(NULL,
0,
thread_main2,
(LPVOID)i,
0,
&id);*/
}
printf("All threads created...\n");
/*
* Waiting for threads is not implemented yet.
* If you want to see all threads running, uncomment the
* call to SuspendThread(). The test application will
* freeze after all threads are created.
*/
/* SuspendThread (GetCurrentThread()); */
#else
printf("Creating thread...\n");
hThread = CreateThread(NULL,
0,
thread_main1,
(LPVOID)i,
0,
&id);
printf("Thread created. Waiting for termination...\n");
WaitForSingleObject (hThread,
-1);
CloseHandle (hThread);
printf("Thread terminated...\n");
#endif
return 0;
}

View File

@@ -0,0 +1,41 @@
#
#
#
PROGS = bench-thread
all: $(PROGS:%=%.exe)
.phony: all
clean: $(PROGS:%=%_clean)
$(PROGS:%=%_clean): %_clean:
- $(RM) $*.o
- $(RM) $*.exe
- $(RM) $*.sym
.phony: clean
floppy: # $(PROGS:%=$(FLOPPY_DIR)/apps/%.exe)
$(PROGS:%=$(FLOPPY_DIR)/apps/%.exe): $(FLOPPY_DIR)/apps/%.exe: %.exe
ifeq ($(DOSCLI),yes)
$(CP) $*.exe $(FLOPPY_DIR)\apps\$*.exe
else
$(CP) $*.exe $(FLOPPY_DIR)/apps/$*.exe
endif
dist: $(PROGS:%=../../$(DIST_DIR)/apps/%.exe)
$(PROGS:%=../../$(DIST_DIR)/apps/%.exe): ../../$(DIST_DIR)/apps/%.exe: %.exe
ifeq ($(DOSCLI),yes)
$(CP) $*.exe ..\..\$(DIST_DIR)\apps\$*.exe
else
$(CP) $*.exe ../../$(DIST_DIR)/apps/$*.exe
endif
bench-thread.exe: bench-thread.c
$(CC) $(CFLAGS) bench-thread.c -lkernel32 -o bench-thread.exe
$(NM) --numeric-sort bench-thread.exe > bench-thread.sym
include ../../rules.mak

View File

@@ -0,0 +1,39 @@
#
#
#
OBJECTS = consume.o
PROGS = consume.exe
LIBS =
CLEAN_FILES = consume.o consume.exe
all: consume.exe
clean: $(CLEAN_FILES:%=%_clean)
$(CLEAN_FILES:%=%_clean): %_clean:
- $(RM) $*
.phony: clean $(CLEAN_FILES:%=%_clean)
floppy: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
ifeq ($(DOSCLI),yes)
$(CP) $* $(FLOPPY_DIR)\apps\$*
else
$(CP) $* $(FLOPPY_DIR)/apps/$*
endif
dist: $(PROGS:%=../../$(DIST_DIR)/apps/%)
$(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: %
ifeq ($(DOSCLI),yes)
$(CP) $* ..\..\$(DIST_DIR)\apps\$*
else
$(CP) $* ../../$(DIST_DIR)/apps/$*
endif
consume.exe: $(OBJECTS)
$(CC) $(OBJECTS) -o consume.exe
include ../../rules.mak

View File

@@ -0,0 +1,29 @@
#include <stdio.h>
#include <string.h>
#include <windows.h>
ULONG x[(4 * 1024 * 1024) / 4096];
int main()
{
int i;
PUCHAR BaseAddress;
BaseAddress = VirtualAlloc(NULL,
4 * 1024 * 1024,
MEM_COMMIT,
PAGE_READONLY);
if (BaseAddress == NULL)
{
printf("Failed to allocate virtual memory");
return(1);
}
printf("BaseAddress %p\n", BaseAddress);
for (i = 0; i < ((4 * 1024 * 1024) / 4096); i++)
{
printf("%.6x, ", i*4096);
x[i] = BaseAddress[i*4096];
}
return(0);
}

View File

@@ -0,0 +1,33 @@
#include <windows.h>
#include <stdio.h>
HANDLE events[2];
DWORD WINAPI thread( LPVOID crap )
{
SetEvent( events[0] );
if( crap )
SetEvent( events[1] );
return 1;
}
int main( void )
{
DWORD id, Status;
printf( "Creating events\n" );
events[0] = CreateEvent( 0, TRUE, FALSE, 0 );
events[1] = CreateEvent( 0, TRUE, FALSE, 0 );
printf( "Created events\n" );
CreateThread( 0, 0, thread, 0, 0, &id );
printf( "WaitForSingleObject %s\n", ( WaitForSingleObject( events[0], INFINITE ) == WAIT_OBJECT_0 ? "worked" : "failed" ) );
ResetEvent( events[0] );
CreateThread( 0, 0, thread, 0, 0, &id );
printf( "WaitForMultipleObjects with waitall = FALSE %s\n", ( WaitForMultipleObjects( 2, events, FALSE, INFINITE ) == WAIT_OBJECT_0 ? "worked" : "failed" ) );
ResetEvent( events[0] );
CreateThread( 0, 0, thread, (void *)1, 0, &id );
Status = WaitForMultipleObjects( 2, events, TRUE, INFINITE );
printf( "WaitForMultipleObjects with waitall = TRUE %s\n", ( Status == WAIT_OBJECT_0 || Status == WAIT_OBJECT_0 + 1 ? "worked" : "failed" ) );
ResetEvent( events[0] );
printf( "WaitForSingleObject with timeout %s\n", ( WaitForSingleObject( events[0], 100 ) == WAIT_TIMEOUT ? "worked" : "failed" ) );
return 0;
}

View File

@@ -0,0 +1,41 @@
#
#
#
PROGS = event
all: $(PROGS:%=%.exe)
.phony: all
clean: $(PROGS:%=%_clean)
$(PROGS:%=%_clean): %_clean:
- $(RM) $*.o
- $(RM) $*.exe
- $(RM) $*.sym
.phony: clean
floppy: # $(PROGS:%=$(FLOPPY_DIR)/apps/%.exe)
$(PROGS:%=$(FLOPPY_DIR)/apps/%.exe): $(FLOPPY_DIR)/apps/%.exe: %.exe
ifeq ($(DOSCLI),yes)
$(CP) $*.exe $(FLOPPY_DIR)\apps\$*.exe
else
$(CP) $*.exe $(FLOPPY_DIR)/apps/$*.exe
endif
dist: $(PROGS:%=../../$(DIST_DIR)/apps/%.exe)
$(PROGS:%=../../$(DIST_DIR)/apps/%.exe): ../../$(DIST_DIR)/apps/%.exe: %.exe
ifeq ($(DOSCLI),yes)
$(CP) $*.exe ..\..\$(DIST_DIR)\apps\$*.exe
else
$(CP) $*.exe ../../$(DIST_DIR)/apps/$*.exe
endif
event.exe: event.c
$(CC) $(CFLAGS) event.c -lkernel32 -o event.exe
$(NM) --numeric-sort event.exe > event.sym
include ../../rules.mak

View File

@@ -0,0 +1,51 @@
#
#
#
OBJECTS= file.o
PROGS= file.exe
BASE_CFLAGS = -I../../include
all: $(PROGS)
.phony: all
clean:
- $(RM) file.o
- $(RM) file.exe
- $(RM) file.sym
.phony: clean
floppy: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
ifeq ($(DOSCLI),yes)
$(CP) $* $(FLOPPY_DIR)\apps\$*
else
$(CP) $* $(FLOPPY_DIR)/apps/$*
endif
dist: $(PROGS:%=../../$(DIST_DIR)/apps/%)
$(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: %
ifeq ($(DOSCLI),yes)
$(CP) $* ..\..\$(DIST_DIR)\apps\$*
else
$(CP) $* ../../$(DIST_DIR)/apps/$*
endif
file.exe: $(OBJECTS)
$(CC) $(OBJECTS) $(BASE_CFLAGS) -o file.exe
$(NM) --numeric-sort file.exe > file.sym
include ../../rules.mak

View File

@@ -0,0 +1,54 @@
/***********************************************************
* File read/write test utility *
**********************************************************/
#include <windows.h>
#include <stdlib.h>
#include <stdio.h>
int main( void )
{
HANDLE file;
char buffer[4096];
DWORD wrote;
int c;
file = CreateFile("test.dat",
GENERIC_READ | GENERIC_WRITE,
0,
NULL,
CREATE_ALWAYS,
0,
0);
if (file == INVALID_HANDLE_VALUE)
{
printf("Error opening file (Status %x)\n", GetLastError());
return 1;
}
for( c = 0; c < sizeof( buffer ); c++ )
buffer[c] = (char)c;
printf("Writing file\n");
if (WriteFile( file, buffer, 4096, &wrote, NULL) == FALSE)
{
printf("Error writing file (Status %x)\n", GetLastError());
exit(2);
}
printf("Reading file\n");
SetFilePointer( file, 0, 0, FILE_BEGIN );
if (ReadFile( file, buffer, 4096, &wrote, NULL) == FALSE)
{
printf("Error reading file (Status %x)\n", GetLastError());
exit(3);
}
for( c = 0; c < sizeof( buffer ); c++ )
if( buffer[c] != (char)c )
{
printf( "Error: data read back is not what was written\n" );
CloseHandle( file );
return 0;
}
printf("Finished, works fine\n");
CloseHandle( file );
return 0;
}

View File

@@ -0,0 +1,39 @@
/***********************************************************
* File read/write test utility *
**********************************************************/
#include <windows.h>
#include <iostream>
#include <stdlib.h>
int main( void )
{
HANDLE file = CreateFile( "test.dat", GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0 );
char buffer[4096];
if( file == INVALID_HANDLE_VALUE )
{
FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(), 0, buffer, 4096, NULL );
cout << "Error opening file: " << buffer << endl;
return 1;
}
DWORD wrote;
for( int c = 0; c < 1024; c++ )
if( WriteFile( file, buffer, 4096, &wrote, NULL ) == FALSE )
{
FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(), 0, buffer, 4096, NULL );
cout << "Error writing file: " << buffer << endl;
exit(2);
}
cout << "File written, trying to read now" << endl;
for( int c = 0; c < 1024; c++ )
if( ReadFile( file, buffer, 4096, &wrote, NULL ) == FALSE )
{
FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(), 0, buffer, 4096, NULL );
cout << "Error reading file: " << buffer << endl;
exit(3);
}
cout << "Test passed" << endl;
return 0;
}

View File

@@ -0,0 +1,56 @@
/*
* gditest
*/
#include <windows.h>
int main (void)
{
HDC Desktop, MyDC;
HPEN RedPen, GreenPen;
HBITMAP MyBitmap;
DWORD shit;
GdiDllInitialize (NULL, DLL_PROCESS_ATTACH, NULL);
// Set up a DC called Desktop that accesses DISPLAY
Desktop = CreateDCA("DISPLAY", NULL, NULL, NULL);
if (Desktop == NULL)
return 1;
// Create a red pen and select it into the DC
RedPen = CreatePen(PS_SOLID, 8, 0x0000ff);
SelectObject(Desktop, RedPen);
// Draw a shap on the DC
MoveToEx(Desktop, 50, 50, NULL);
LineTo(Desktop, 200, 60);
LineTo(Desktop, 200, 300);
LineTo(Desktop, 50, 50);
// Create a DC that is compatible with the DISPLAY DC along with a bitmap that is selected into it
MyDC = CreateCompatibleDC(Desktop);
MyBitmap = CreateCompatibleBitmap(Desktop, 151, 251);
SelectObject(MyDC, MyBitmap);
// Bitblt from the DISPLAY DC to MyDC and then back again in a different location
BitBlt(MyDC, 0, 0, 151, 251, Desktop, 50, 50, SRCCOPY);
// Draw a rectangle on the memory DC before bltting back with a green pen
GreenPen = CreatePen(PS_SOLID, 3, 0x00ff00);
SelectObject(MyDC, GreenPen);
Rectangle(MyDC, 10, 10, 50, 50);
BitBlt(Desktop, 400, 100, 151, 251, MyDC, 0, 0, SRCCOPY);
TextOutA(Desktop, 200, 0, "ReactOS", 7);
TextOutA(Desktop, 200, 9, "This is a test of the ReactOS GDI functionality", 47);
TextOutA(Desktop, 200, 18, "The font being used is an internal static one", 45);
Sleep( 10000 );
// Free up everything
DeleteDC(Desktop);
DeleteDC(MyDC);
return 0;
}

View File

@@ -0,0 +1,46 @@
#
#
#
PROGS = gditest
OBJECTS= ../common/crt0.o
LIBS= ../../lib/kernel32/kernel32.a ../../lib/gdi32/gdi32.a
#LIBS= ../../lib/kernel32/kernel32.a ../../lib/crtdll/crtdll.a
BASE_CFLAGS = -I../../include
all: $(PROGS:%=%.exe)
.phony: all
$(PROGS:%=%_clean): %_clean:
- $(RM) $*.o
- $(RM) $*.exe
- $(RM) $*.sym
clean: $(PROGS:%=%_clean)
.phony: clean
floppy: $(PROGS:%=$(FLOPPY_DIR)/apps/%.exe)
$(PROGS:%=$(FLOPPY_DIR)/apps/%.exe): $(FLOPPY_DIR)/apps/%.exe: %.exe
ifeq ($(DOSCLI),yes)
$(CP) $*.exe $(FLOPPY_DIR)\apps\$*.exe
else
$(CP) $*.exe $(FLOPPY_DIR)/apps/$*.exe
endif
dist: $(PROGS:%=../../$(DIST_DIR)/apps/%.exe)
$(PROGS:%=../../$(DIST_DIR)/apps/%.exe): ../../$(DIST_DIR)/apps/%.exe: %.exe
ifeq ($(DOSCLI),yes)
$(CP) $*.exe ..\..\$(DIST_DIR)\apps\$*.exe
else
$(CP) $*.exe ../../$(DIST_DIR)/apps/$*.exe
endif
gditest.exe: gditest.c
$(CC) -specs=../../specs gditest.c $(BASE_CFLAGS) $(OBJECTS) $(LIBS) -lgcc -o gditest.exe
$(NM) --numeric-sort gditest.exe > gditest.sym
include ../../rules.mak

View File

@@ -0,0 +1,8 @@
#include <stdio.h>
#include <string.h>
int main(int argc, char* argv[])
{
printf("Hello world\n");
return(0);
}

View File

@@ -0,0 +1,39 @@
#
#
#
OBJECTS = hello.o
PROGS = hello.exe
LIBS =
CLEAN_FILES = hello.o hello.exe
all: hello.exe
clean: $(CLEAN_FILES:%=%_clean)
$(CLEAN_FILES:%=%_clean): %_clean:
- $(RM) $*
.phony: clean $(CLEAN_FILES:%=%_clean)
floppy: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
ifeq ($(DOSCLI),yes)
$(CP) $* $(FLOPPY_DIR)\apps\$*
else
$(CP) $* $(FLOPPY_DIR)/apps/$*
endif
dist: $(PROGS:%=../../$(DIST_DIR)/apps/%)
$(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: %
ifeq ($(DOSCLI),yes)
$(CP) $* ..\..\$(DIST_DIR)\apps\$*
else
$(CP) $* ../../$(DIST_DIR)/apps/$*
endif
hello.exe: $(OBJECTS)
$(CC) $(OBJECTS) -o hello.exe
include ../../rules.mak

View File

@@ -0,0 +1,205 @@
/* $Id: conport.c,v 1.6 2000/04/25 23:22:46 ea Exp $
*
* reactos/apps/lpc/conport.c
*
* To be run in a real WNT 4.0 system with
* "\SmApiPort" as argument. Do not try to
* connect to "\Windows\ApiPort" since that
* reboots immeditely.
*
* Use Russinovich' HandleEx to verify
* conport.exe owns two unnamed LPC ports:
* the one created by kernel32.dll connecting
* to csrss.exe, and one connected to here.
*
* 19990627 (Emanuele Aliberti)
* Initial implementation.
* 19990704 (EA)
* Dump object's attributes moved in dumpinfo.c.
*/
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#define PROTO_LPC
#include <ddk/ntddk.h>
#include "dumpinfo.h"
#define LPC_CONNECT_FLAG1 0x00000001
#define LPC_CONNECT_FLAG2 0x00000010
#define LPC_CONNECT_FLAG3 0x00000100
#define LPC_CONNECT_FLAG4 0x00001000
#define LPC_CONNECT_FLAG5 0x00010000
NTSTATUS
(STDCALL * ConnectPort)(
OUT PHANDLE PortHandle,
IN PUNICODE_STRING PortName,
IN POBJECT_ATTRIBUTES ObjectAttributes,
IN DWORD Unknown3,
IN DWORD Unknown4,
IN DWORD Unknown5,
IN DWORD Unknown6,
IN ULONG Flags
);
NTSTATUS
(STDCALL * QueryObject)(
IN HANDLE ObjectHandle,
IN CINT ObjectInformationClass,
OUT PVOID ObjectInformation,
IN ULONG Length,
OUT PULONG ResultLength
);
NTSTATUS
(STDCALL * YieldExecution)(VOID);
#define BUF_SIZE 1024
#define MAXARG 1000000
VOID
TryConnectPort(char *port_name)
{
DWORD Status = 0;
HANDLE Port = 0;
int i;
UNICODE_STRING PortName;
OBJECT_ATTRIBUTES ObjectAttributes;
WORD Name [BUF_SIZE] = {0};
int dwx = 0;
char * port_name_save = port_name;
/*
* Convert the port's name to Unicode.
*/
for (
PortName.Length = 0;
( *port_name
&& (PortName.Length < BUF_SIZE)
);
)
{
Name[PortName.Length++] = (WORD) *port_name++;
}
Name[PortName.Length] = 0;
PortName.Length = PortName.Length * sizeof (WORD);
PortName.MaximumLength = PortName.Length + sizeof (WORD);
PortName.Buffer = (PWSTR) Name;
/*
* Prepare the port object attributes.
*/
ObjectAttributes.Length =
sizeof (OBJECT_ATTRIBUTES);
ObjectAttributes.RootDirectory =
NULL;
ObjectAttributes.ObjectName =
NULL /*& PortName */;
ObjectAttributes.Attributes =
OBJ_CASE_INSENSITIVE;
ObjectAttributes.SecurityDescriptor =
NULL;
ObjectAttributes.SecurityQualityOfService =
NULL;
/*
* Try to issue a connection request.
*/
Port = 0;
Status = ConnectPort(
& Port, /* & PortHandle */
& PortName, /* & PortName */
& ObjectAttributes, /* & PortAttributes */
NULL, /* & SecurityQos */
NULL, /* & SectionInfo */
NULL, /* & MapInfo */
NULL, /* & MaxMessageSize */
LPC_CONNECT_FLAG5 /* & ConnectInfoLength */
);
if (Status == STATUS_SUCCESS)
{
DumpInfo(
Name,
Status,
"connected",
Port
);
/* Hot waiting */
for (dwx=0; dwx<MAXARG; ++dwx)
{
YieldExecution();
}
if (FALSE == CloseHandle(Port))
{
printf(
"Could not close the port handle %08X.\n",
Port
);
}
return;
}
printf(
"Connection to port \"%s\" failed (Status = %08X).\n",
port_name_save,
Status
);
}
main( int argc, char * argv[] )
{
HINSTANCE ntdll;
if (argc != 2)
{
printf("WNT LPC Port Connector\n");
printf("Usage: %s [port_name]\n",argv[0]);
exit(EXIT_FAILURE);
}
printf("LoadLibrary(NTDLL)\n");
ntdll = LoadLibrary("NTDLL");
if (ntdll == NULL)
{
printf("Could not load NTDLL\n");
return EXIT_FAILURE;
}
printf("GetProcAddress(NTDLL.NtConnectPort)\n");
ConnectPort = (VOID*) GetProcAddress(
ntdll,
"NtConnectPort"
);
if (ConnectPort == NULL)
{
FreeLibrary(ntdll);
printf("Could not find NTDLL.NtConnectPort\n");
return EXIT_FAILURE;
}
printf("GetProcAddress(NTDLL.NtQueryObject)\n");
QueryObject = (VOID*) GetProcAddress(
ntdll,
"NtQueryObject"
);
if (QueryObject == NULL)
{
FreeLibrary(ntdll);
printf("Could not find NTDLL.NtQueryObject\n");
return EXIT_FAILURE;
}
printf("GetProcAddress(NTDLL.NtYieldExecution)\n");
YieldExecution = (VOID*) GetProcAddress(
ntdll,
"NtYieldExecution"
);
if (YieldExecution == NULL)
{
FreeLibrary(ntdll);
printf("Could not find NTDLL.NtYieldExecution\n");
return EXIT_FAILURE;
}
printf("TryConnectPort(%s)\n",argv[1]);
TryConnectPort(argv[1]);
printf("Done\n");
return EXIT_SUCCESS;
}
/* EOF */

View File

@@ -0,0 +1,192 @@
/* $Id: creport.c,v 1.2 1999/07/17 23:10:12 ea Exp $
*
* reactos/apps/lpc/creport.c
*
* To be run in a real WNT 4.0 system to
* create an LPC named port.
*
* Use Russinovich' HandleEx to verify
* creport.exe owns the named LPC port
* you asked to create.
*/
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#define PROTO_LPC
#include <ddk/ntddk.h>
#include "dumpinfo.h"
#define LPC_CONNECT_FLAG1 0x00000001
#define LPC_CONNECT_FLAG2 0x00000010
#define LPC_CONNECT_FLAG3 0x00000100
#define LPC_CONNECT_FLAG4 0x00001000
#define LPC_CONNECT_FLAG5 0x00010000
NTSTATUS
(STDCALL * CreatePort)(
/*OUT PHANDLE PortHandle,*/
PVOID Buffer,
IN POBJECT_ATTRIBUTES PortAttributes OPTIONAL,
IN ACCESS_MASK DesiredAccess,
IN DWORD Unknown3,
IN ULONG Flags
);
NTSTATUS
(STDCALL * QueryObject)(
IN HANDLE ObjectHandle,
IN CINT ObjectInformationClass,
OUT PVOID ObjectInformation,
IN ULONG Length,
OUT PULONG ResultLength
);
NTSTATUS
(STDCALL * YieldExecution)(VOID);
#define BUF_SIZE 1024
#define MAXARG 5000000
VOID
TryCreatePort(char *port_name)
{
DWORD Status = 0;
HANDLE Port = 0;
int i;
UNICODE_STRING PortName;
OBJECT_ATTRIBUTES ObjectAttributes;
WORD Name [BUF_SIZE] = {0};
int dwx = 0;
char * port_name_save = port_name;
/*
* Convert the port's name to Unicode.
*/
for (
PortName.Length = 0;
( *port_name
&& (PortName.Length < BUF_SIZE)
);
)
{
Name[PortName.Length++] = (WORD) *port_name++;
}
Name[PortName.Length] = 0;
PortName.Length = PortName.Length * sizeof (WORD);
PortName.MaximumLength = PortName.Length + sizeof (WORD);
PortName.Buffer = (PWSTR) Name;
/*
* Prepare the port object attributes.
*/
ObjectAttributes.Length =
sizeof (OBJECT_ATTRIBUTES);
ObjectAttributes.RootDirectory =
NULL;
ObjectAttributes.ObjectName =
& PortName;
ObjectAttributes.Attributes =
0; //OBJ_CASE_INSENSITIVE --> STATUS_INVALID_PARAMETER ==> case sensitive!;
ObjectAttributes.SecurityDescriptor =
NULL;
ObjectAttributes.SecurityQualityOfService =
NULL;
/*
* Try to issue a connection request.
*/
Port = 0;
Status = CreatePort(
& Port,
& ObjectAttributes,
0, /* ACCESS_MASK? */
0, /* Unknown3 */
LPC_CONNECT_FLAG5
);
if (Status == STATUS_SUCCESS)
{
DumpInfo(
Name,
Status,
"created",
Port
);
/* Hot waiting */
for (dwx=0; dwx<MAXARG; ++dwx)
{
YieldExecution();
}
if (FALSE == CloseHandle(Port))
{
printf(
"Could not close the port handle %08X.\n",
Port
);
}
return;
}
printf(
"Creating port \"%s\" failed (Status = %08X).\n",
port_name_save,
Status
);
}
main( int argc, char * argv[] )
{
HINSTANCE ntdll;
if (argc != 2)
{
printf("WNT LPC Port Creator\n");
printf("Usage: %s [port_name]\n",argv[0]);
exit(EXIT_FAILURE);
}
printf("LoadLibrary(NTDLL)\n");
ntdll = LoadLibrary("NTDLL");
if (ntdll == NULL)
{
printf("Could not load NTDLL\n");
return EXIT_FAILURE;
}
printf("GetProcAddress(NTDLL.NtCreatePort)\n");
CreatePort = (VOID*) GetProcAddress(
ntdll,
"NtCreatePort"
);
if (CreatePort == NULL)
{
FreeLibrary(ntdll);
printf("Could not find NTDLL.NtCreatePort\n");
return EXIT_FAILURE;
}
printf("GetProcAddress(NTDLL.NtQueryObject)\n");
QueryObject = (VOID*) GetProcAddress(
ntdll,
"NtQueryObject"
);
if (QueryObject == NULL)
{
FreeLibrary(ntdll);
printf("Could not find NTDLL.NtQueryObject\n");
return EXIT_FAILURE;
}
printf("GetProcAddress(NTDLL.NtYieldExecution)\n");
YieldExecution = (VOID*) GetProcAddress(
ntdll,
"NtYieldExecution"
);
if (YieldExecution == NULL)
{
FreeLibrary(ntdll);
printf("Could not find NTDLL.NtYieldExecution\n");
return EXIT_FAILURE;
}
printf("TryCreatePort(%s)\n",argv[1]);
TryCreatePort(argv[1]);
printf("Done\n");
return EXIT_SUCCESS;
}
/* EOF */

View File

@@ -0,0 +1,239 @@
/* $Id: dumpinfo.c,v 1.2 1999/07/17 23:10:12 ea Exp $
*
* reactos/apps/lpc/dumpinfo.c
*
* ReactOS Operating System
*
* Dump a kernel object's attributes by its handle.
*
* 19990627 (Emanuele Aliberti)
* Initial implementation.
* 19990704 (EA)
* Added code to find the basic information buffer size
* for the LPC port object.
* 19990710 (EA)
*
*/
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <ddk/ntddk.h>
#define BUF_SIZE 1024
#define MAX_BASIC_INFO_SIZE 512
extern
NTSTATUS
(STDCALL * QueryObject)(
IN HANDLE ObjectHandle,
IN CINT ObjectInformationClass,
OUT PVOID ObjectInformation,
IN ULONG Length,
OUT PULONG ResultLength
);
extern
NTSTATUS
(STDCALL * QueryInformationPort)(
IN HANDLE PortHandle,
IN CINT PortInformationClass, /* guess */
OUT PVOID PortInformation, /* guess */
IN ULONG PortInformationLength, /* guess */
OUT PULONG ReturnLength /* guess */
);
/*
static
VOID
DumpBuffer(
char *Name,
BYTE *buffer,
ULONG size
)
{
register ULONG i = 0;
printf("%s [%d] = ",Name,size);
for ( i = 0;
i != size;
++i
)
{
printf("%02X",buffer[i]);
}
printf("\n");
}
*/
VOID
DumpInfo (
LPCWSTR Name,
NTSTATUS Status,
LPCWSTR Comment,
HANDLE Port
)
{
BYTE ObjectInformation [BUF_SIZE] = {0};
ULONG ResultLength;
wprintf(
L"Port \"%s\" %s:\n",
Name,
Comment
);
printf("\tStatus = %08X\n",Status);
printf("\tPort = %08X\n\n",Port);
/*
* Query object information.
*/
printf("Basic Information:\n");
Status = QueryObject(
Port,
ObjectBasicInformation,
ObjectInformation,
sizeof (LPC_PORT_BASIC_INFORMATION),
& ResultLength
);
if (Status == STATUS_SUCCESS)
{
PLPC_PORT_BASIC_INFORMATION i;
i = (PLPC_PORT_BASIC_INFORMATION) ObjectInformation;
printf( "\tUnknown01 = 0x%08X\n", i->Unknown0 );
printf( "\tUnknown02 = 0x%08X\n", i->Unknown1 );
printf( "\tUnknown03 = 0x%08X\n", i->Unknown2 );
printf( "\tUnknown04 = 0x%08X\n", i->Unknown3 );
printf( "\tUnknown05 = 0x%08X\n", i->Unknown4 );
printf( "\tUnknown06 = 0x%08X\n", i->Unknown5 );
printf( "\tUnknown07 = 0x%08X\n", i->Unknown6 );
printf( "\tUnknown08 = 0x%08X\n", i->Unknown7 );
printf( "\tUnknown09 = 0x%08X\n", i->Unknown8 );
printf( "\tUnknown10 = 0x%08X\n", i->Unknown9 );
printf( "\tUnknown11 = 0x%08X\n", i->Unknown10 );
printf( "\tUnknown12 = 0x%08X\n", i->Unknown11 );
printf( "\tUnknown13 = 0x%08X\n", i->Unknown12 );
printf( "\tUnknown14 = 0x%08X\n", i->Unknown13 );
}
else
{
printf("\tStatus = %08X\n",Status);
}
printf("Type Information:\n");
Status = QueryObject(
Port,
ObjectTypeInformation,
ObjectInformation,
sizeof ObjectInformation,
& ResultLength
);
if (Status == STATUS_SUCCESS)
{
OBJECT_TYPE_INFORMATION * i;
i = (OBJECT_TYPE_INFORMATION *) ObjectInformation;
wprintf(
L"\tName: \"%s\"\n",
(i->Name.Length ? i->Name.Buffer : L"")
);
/*
FIXME: why this always raise an access violation exception?
wprintf(
L"\tType: \"%s\"\n",
(i->Type.Length ? i->Type.Buffer : L"")
);
/**/
printf(
"\tTotal Handles: %d\n",
i->TotalHandles
);
printf(
"\tReference Count: %d\n",
i->ReferenceCount
);
}
else
{
printf("\tStatus = %08X\n",Status);
}
printf("Name Information:\n");
Status = QueryObject(
Port,
ObjectNameInformation,
ObjectInformation,
sizeof ObjectInformation,
& ResultLength
);
if (Status == STATUS_SUCCESS)
{
OBJECT_NAME_INFORMATION * i;
i = (OBJECT_NAME_INFORMATION *) ObjectInformation;
wprintf(
L"\tName: \"%s\"\n",
(i->Name.Length ? i->Name.Buffer : L"")
);
}
else
{
printf("\tStatus = %08X\n",Status);
}
printf("Data Information:\n");
Status = QueryObject(
Port,
ObjectDataInformation,
ObjectInformation,
sizeof ObjectInformation,
& ResultLength
);
if (Status == STATUS_SUCCESS)
{
OBJECT_DATA_INFORMATION * i;
i = (OBJECT_DATA_INFORMATION *) ObjectInformation;
printf(
"\tInherit Handle: %s\n",
(i->bInheritHandle ? "TRUE" : "FALSE")
);
printf(
"\tProtect from Close: %s\n",
(i->bProtectFromClose ? "TRUE" : "FALSE")
);
}
else
{
printf("\tStatus = %08X\n",Status);
}
//---
printf("Port Information:\n");
/* Status = QueryInformationPort(
Port,
1, /* info class * /
ObjectInformation,
sizeof ObjectInformation,
& ResultLength
);
if (Status == STATUS_SUCCESS)
{
DWORD * i = ObjectInformation;
int j = 0;
while (j < ResultLength / sizeof (DWORD))
{
printf("\t%08X\n",i[j]);
++j;
}
}
else
{
printf("\tStatus = %08X\n",Status);
}
*/
}
/* EOF */

View File

@@ -0,0 +1,8 @@
VOID
DumpInfo (
LPCWSTR Name,
NTSTATUS Status,
LPCWSTR Comment,
HANDLE Port
);

View File

@@ -0,0 +1,75 @@
/* $Id: lpcclt.c,v 1.7 2000/06/29 23:35:09 dwelch Exp $
*
* DESCRIPTION: Simple LPC Client
* PROGRAMMER: David Welch
*/
#include <ddk/ntddk.h>
#include <windows.h>
#include <napi/lpc.h>
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
HANDLE OutputHandle;
HANDLE InputHandle;
void debug_printf(char* fmt, ...)
{
va_list args;
char buffer[255];
va_start(args,fmt);
vsprintf(buffer,fmt,args);
WriteConsoleA(OutputHandle, buffer, strlen(buffer), NULL, NULL);
va_end(args);
}
int main(int argc, char* argv[])
{
UNICODE_STRING PortName;
NTSTATUS Status;
HANDLE PortHandle;
LPC_MAX_MESSAGE Request;
ULONG ConnectInfoLength;
printf("(lpcclt.exe) Lpc client\n");
RtlInitUnicodeString(&PortName, L"\\TestPort");
printf("(lpcclt.exe) Connecting to port \"\\TestPort\"\n");
ConnectInfoLength = 0;
Status = NtConnectPort(&PortHandle,
&PortName,
NULL,
0,
0,
0,
NULL,
&ConnectInfoLength);
if (!NT_SUCCESS(Status))
{
printf("(lpcclt.exe) Failed to connect (Status = 0x%08X)\n", Status);
return EXIT_FAILURE;
}
strcpy(Request.Data, GetCommandLineA());
Request.Header.DataSize = strlen(Request.Data);
Request.Header.MessageSize = sizeof(LPC_MESSAGE_HEADER) +
Request.Header.DataSize;
printf("(lpcclt.exe) Sending message \"%s\"\n",
(char *) Request.Data);
Status = NtRequestPort(PortHandle,
&Request.Header);
if (!NT_SUCCESS(Status))
{
printf("(lpcclt.exe) Failed to send request (Status = 0x%8X)\n",
Status);
return EXIT_FAILURE;
}
printf("(lpcclt.exe) Succeeded\n");
return EXIT_SUCCESS;
}

View File

@@ -0,0 +1,111 @@
/* $Id: lpcsrv.c,v 1.7 2000/06/29 23:35:10 dwelch Exp $
*
* DESCRIPTION: Simple LPC Server
* PROGRAMMER: David Welch
*/
#include <ddk/ntddk.h>
#include <windows.h>
#include <napi/lpc.h>
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
HANDLE OutputHandle;
HANDLE InputHandle;
void debug_printf(char* fmt, ...)
{
va_list args;
char buffer[255];
va_start(args,fmt);
vsprintf(buffer,fmt,args);
WriteConsoleA(OutputHandle, buffer, strlen(buffer), NULL, NULL);
va_end(args);
}
int main(int argc, char* argv[])
{
UNICODE_STRING PortName;
OBJECT_ATTRIBUTES ObjectAttributes;
NTSTATUS Status;
HANDLE NamedPortHandle;
HANDLE PortHandle;
LPC_MAX_MESSAGE ConnectMsg;
printf("(lpcsrv.exe) Lpc test server\n");
RtlInitUnicodeString(&PortName, L"\\TestPort");
InitializeObjectAttributes(&ObjectAttributes,
&PortName,
0,
NULL,
NULL);
printf("(lpcsrv.exe) Creating port\n");
Status = NtCreatePort(&NamedPortHandle,
&ObjectAttributes,
0,
0,
0);
if (!NT_SUCCESS(Status))
{
printf("(lpcsrv.exe) Failed to create port (Status = 0x%08lX)\n", Status);
return EXIT_FAILURE;
}
printf("(lpcsrv.exe) Listening for connections\n");
Status = NtListenPort(NamedPortHandle,
&ConnectMsg.Header);
if (!NT_SUCCESS(Status))
{
printf("(lpcsrv.exe) Failed to listen for connections (Status = 0x%08lX)\n", Status);
return EXIT_FAILURE;
}
printf("(lpcsrv.exe) Accepting connections\n");
Status = NtAcceptConnectPort(&PortHandle,
NamedPortHandle,
NULL,
1,
0,
NULL);
if (!NT_SUCCESS(Status))
{
printf("(lpcsrv.exe) Failed to accept connection (Status = 0x%08lX)\n", Status);
return EXIT_FAILURE;
}
printf("(lpcsrv.exe) Completing connection\n");
Status = NtCompleteConnectPort(PortHandle);
if (!NT_SUCCESS(Status))
{
printf("(lpcsrv.exe) Failed to complete connection (Status = 0x%08lX)\n", Status);
return EXIT_FAILURE;
}
for(;;)
{
LPC_MAX_MESSAGE Request;
Status = NtReplyWaitReceivePort(PortHandle,
0,
NULL,
&Request.Header);
if (!NT_SUCCESS(Status))
{
printf("(lpcsrv.exe) Failed to receive request (Status = 0x%08lX)\n", Status);
return EXIT_FAILURE;
}
printf("(lpcsrv.exe) Message contents are <%s>\n",
Request.Data);
}
return EXIT_SUCCESS;
}
/* EOF */

View File

@@ -0,0 +1,54 @@
#
#
#
SRV_OBJECTS= ../common/crt0.o lpcsrv.o
CLT_OBJECTS= ../common/crt0.o lpcclt.o
PROGS= lpcsrv.exe lpcclt.exe
BASE_CFLAGS = -I../../include
LIBS = ../../lib/crtdll/crtdll.a ../../lib/kernel32/kernel32.a \
../../lib/ntdll/ntdll.a
all: $(PROGS)
.phony: all
clean:
- $(RM) lpcsrv.o
- $(RM) lpcsrv.exe
- $(RM) lpcsrv.sym
- $(RM) lpcclt.o
- $(RM) lpcclt.exe
- $(RM) lpcsrv.sym
.phony: clean
floppy: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
ifeq ($(DOSCLI),yes)
$(CP) $* $(FLOPPY_DIR)\apps\$*
else
$(CP) $* $(FLOPPY_DIR)/apps/$*
endif
dist: $(PROGS:%=../../$(DIST_DIR)/apps/%)
$(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: %
ifeq ($(DOSCLI),yes)
$(CP) $* ..\..\$(DIST_DIR)\apps\$*
else
$(CP) $* ../../$(DIST_DIR)/apps/$*
endif
lpcsrv.exe: $(SRV_OBJECTS) $(LIBS)
$(LD) $(SRV_OBJECTS) $(LIBS) -o lpcsrv.exe
$(NM) --numeric-sort lpcsrv.exe > lpcsrv.sym
lpcclt.exe: $(CLT_OBJECTS) $(LIBS)
$(LD) $(CLT_OBJECTS) $(LIBS) -o lpcclt.exe
$(NM) --numeric-sort lpcclt.exe > lpcclt.sym
include ../../rules.mak

View File

@@ -0,0 +1,99 @@
#include <windows.h>
VOID MyErrExit(LPTSTR Message)
{
MessageBox(NULL, Message, NULL, MB_OK);
ExitProcess(0);
}
DWORD main(int argc, char *argv[])
{
HANDLE hPipe;
LPVOID lpvMessage;
CHAR chBuf[512];
BOOL fSuccess;
DWORD cbRead, cbWritten, dwMode;
LPTSTR lpszPipename = "\\\\.\\pipe\\mynamedpipe";
// Try to open a named pipe; wait for it, if necessary.
while (1)
{
hPipe = CreateFile(
lpszPipename, // pipe name
GENERIC_READ | // read and write access
GENERIC_WRITE,
0, // no sharing
NULL, // no security attributes
OPEN_EXISTING, // opens existing pipe
0, // default attributes
NULL); // no template file
// Break if the pipe handle is valid.
if (hPipe != INVALID_HANDLE_VALUE)
break;
// Exit if an error other than ERROR_PIPE_BUSY occurs.
if (GetLastError() != ERROR_PIPE_BUSY)
MyErrExit("Could not open pipe");
// All pipe instances are busy, so wait for 20 seconds.
if (! WaitNamedPipe(lpszPipename, 20000) )
MyErrExit("Could not open pipe");
}
// The pipe connected; change to message-read mode.
dwMode = PIPE_READMODE_MESSAGE;
fSuccess = SetNamedPipeHandleState(
hPipe, // pipe handle
&dwMode, // new pipe mode
NULL, // don't set maximum bytes
NULL); // don't set maximum time
if (!fSuccess)
MyErrExit("SetNamedPipeHandleState");
// Send a message to the pipe server.
lpvMessage = (argc > 1) ? argv[1] : "default message";
fSuccess = WriteFile(
hPipe, // pipe handle
lpvMessage, // message
strlen(lpvMessage) + 1, // message length
&cbWritten, // bytes written
NULL); // not overlapped
if (! fSuccess)
MyErrExit("WriteFile");
do
{
// Read from the pipe.
fSuccess = ReadFile(
hPipe, // pipe handle
chBuf, // buffer to receive reply
512, // size of buffer
&cbRead, // number of bytes read
NULL); // not overlapped
if (! fSuccess && GetLastError() != ERROR_MORE_DATA)
break;
// Reply from the pipe is written to STDOUT.
if (! WriteFile(GetStdHandle(STD_OUTPUT_HANDLE),
chBuf, cbRead, &cbWritten, NULL))
{
break;
}
} while (! fSuccess); // repeat loop if ERROR_MORE_DATA
CloseHandle(hPipe);
return 0;
}

View File

@@ -0,0 +1,90 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <windows.h>
VOID InstanceThread (LPVOID);
VOID GetAnswerToRequest (LPTSTR, LPTSTR, LPDWORD)
{
}
int xx = 0;
DWORD main (VOID)
{
BOOL fConnected;
DWORD dwThreadId;
HANDLE hPipe, hThread;
LPTSTR lpszPipename = "\\\\.\\pipe\\mynamedpipe";
for (;;)
{
hPipe = CreateNamedPipe (lpszPipename,
PIPE_ACCESS_DUPLEX,
PIPE_TYPE_MESSAGE |
PIPE_READMODE_MESSAGE |
PIPE_WAIT,
PIPE_UNLIMITED_INSTANCES,
BUFSIZE,
BUFSIZE,
PIPE_TIMEOUT,
NULL);
if (hPipe == INVALID_HANDLE_VALUE)
MyErrExit ("CreatePipe");
fConnected = ConnectNamedPipe (hPipe,
NULL) ? TRUE : (GetLastError () ==
ERROR_PIPE_CONNECTED);
if (fConnected)
{
hThread = CreateThread (NULL,
0,
(LPTHREAD_START_ROUTINE) InstanceThread,
(LPVOID) hPipe,
0,
&dwThreadId);
if (hThread == NULL)
MyErrExit ("CreateThread");
}
else
{
CloseHandle (hPipe);
}
}
return 1;
}
VOID InstanceThread (LPVOID lpvParam)
{
CHAR chRequest[BUFSIZE];
CHAR chReply[BUFSIZE];
DWORD cbBytesRead, cbReplyBytes, cbWritten;
BOOL fSuccess;
HANDLE hPipe;
hPipe = (HANDLE) lpvParam;
while (1)
{
fSuccess = ReadFile (hPipe,
chRequest,
BUFSIZE,
&cbBytesRead,
NULL);
if (!fSuccess || cbBytesRead == 0)
break;
GetAnswerToRequest (chRequest, chReply, &cbReplyBytes);
fSuccess = WriteFile (hPipe,
chReply,
cbReplyBytes,
&cbWritten,
NULL);
if (!fSuccess || cbReplyBytes != cbWritten)
break;
}
FlushFileBuffers(hPipe);
DisconnectNamedPipe (hPipe);
CloseHandle (hPipe);
}

View File

@@ -0,0 +1,39 @@
#
#
#
OBJECTS = pteb.o
PROGS = pteb.exe
LIBS =
CLEAN_FILES = pteb.o pteb.exe
all: pteb.exe
clean: $(CLEAN_FILES:%=%_clean)
$(CLEAN_FILES:%=%_clean): %_clean:
- $(RM) $*
.phony: clean $(CLEAN_FILES:%=%_clean)
floppy: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
ifeq ($(DOSCLI),yes)
$(CP) $* $(FLOPPY_DIR)\apps\$*
else
$(CP) $* $(FLOPPY_DIR)/apps/$*
endif
dist: $(PROGS:%=../../$(DIST_DIR)/apps/%)
$(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: %
ifeq ($(DOSCLI),yes)
$(CP) $* ..\..\$(DIST_DIR)\apps\$*
else
$(CP) $* ../../$(DIST_DIR)/apps/$*
endif
pteb.exe: $(OBJECTS)
$(CC) $(OBJECTS) -o pteb.exe
include ../../rules.mak

View File

@@ -0,0 +1,14 @@
#include <stdio.h>
int main(int argc, char* argv[])
{
int x;
printf("TEB dumpper\n");
__asm__("movl %%fs:0x18, %0\n\t"
: "=g" (x)
: /* no inputs */);
printf("fs[0x18] %x\n", x);
return(0);
}

View File

@@ -0,0 +1,51 @@
#
#
#
SRV_OBJECTS= ../common/crt0.o shmsrv.o
CLT_OBJECTS= ../common/crt0.o shmclt.o
PROGS= shmsrv.exe shmclt.exe
BASE_CFLAGS = -I../../include
LIBS = ../../lib/crtdll/crtdll.a ../../lib/kernel32/kernel32.a \
../../lib/ntdll/ntdll.a
all: $(PROGS)
.phony: all
clean:
- $(RM) *.o
- $(RM) *.exe
- $(RM) *.sym
.phony: clean
floppy: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
ifeq ($(DOSCLI),yes)
$(CP) $* $(FLOPPY_DIR)\apps\$*
else
$(CP) $* $(FLOPPY_DIR)/apps/$*
endif
dist: $(PROGS:%=../../$(DIST_DIR)/apps/%)
$(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: %
ifeq ($(DOSCLI),yes)
$(CP) $* ..\..\$(DIST_DIR)\apps\$*
else
$(CP) $* ../../$(DIST_DIR)/apps/$*
endif
shmsrv.exe: $(SRV_OBJECTS) $(LIBS)
$(LD) $(SRV_OBJECTS) $(LIBS) -o shmsrv.exe
$(NM) --numeric-sort shmsrv.exe > shmsrv.sym
shmclt.exe: $(CLT_OBJECTS) $(LIBS)
$(LD) $(CLT_OBJECTS) $(LIBS) -o shmclt.exe
$(NM) --numeric-sort shmsrv.exe > shmclt.sym
include ../../rules.mak

View File

@@ -0,0 +1,61 @@
#include <ddk/ntddk.h>
#include <windows.h>
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
HANDLE OutputHandle;
HANDLE InputHandle;
void debug_printf(char* fmt, ...)
{
va_list args;
char buffer[255];
va_start(args,fmt);
vsprintf(buffer,fmt,args);
WriteConsoleA(OutputHandle, buffer, strlen(buffer), NULL, NULL);
va_end(args);
}
int
main(int argc, char* argv[])
{
HANDLE Section;
PVOID BaseAddress;
char buffer[256];
printf("Shm test server\n");
Section = OpenFileMappingW (
// PAGE_EXECUTE_READWRITE, invalid parameter
FILE_MAP_WRITE,
FALSE,
L"TestSection"
);
if (Section == NULL)
{
printf("Failed to open section (err=%d)", GetLastError());
return 1;
}
BaseAddress = MapViewOfFile(Section,
FILE_MAP_ALL_ACCESS,
0,
0,
8192);
if (BaseAddress == NULL)
{
printf("Failed to map section (err=%d)\n", GetLastError());
return 1;
}
printf("BaseAddress %x\n", (UINT) BaseAddress);
printf("Copying from section\n");
strcpy(buffer, BaseAddress);
printf("Copyed <%s>\n", buffer);
// for(;;);
return 0;
}

View File

@@ -0,0 +1,53 @@
/* $Id: shmsrv.c,v 1.5 2000/06/29 23:35:10 dwelch Exp $
*
* FILE : reactos/apps/shm/shmsrv.c
* AUTHOR: David Welch
*/
#include <ddk/ntddk.h>
#include <windows.h>
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
int main(int argc, char* argv[])
{
HANDLE Section;
PVOID BaseAddress;
printf("Shm test server\n");
Section = CreateFileMappingW (
(HANDLE) 0xFFFFFFFF,
NULL,
PAGE_READWRITE,
0,
8192,
L"TestSection"
);
if (Section == NULL)
{
printf("Failed to create section (err=%d)", GetLastError());
return 1;
}
printf("Mapping view of section\n");
BaseAddress = MapViewOfFile(Section,
FILE_MAP_ALL_ACCESS,
0,
0,
8192);
printf("BaseAddress %x\n", (UINT) BaseAddress);
if (BaseAddress == NULL)
{
printf("Failed to map section\n");
}
printf("Copying to section\n");
printf("Copying %s\n", GetCommandLineA());
strcpy(BaseAddress, GetCommandLineA());
Sleep(INFINITE);
return 0;
}

View File

@@ -0,0 +1,11 @@
#include <stdio.h>
int
main (void)
{
int i;
puts ("This should print \"wow = I\" for I from 0 to 39 inclusive.");
for (i = 0; i < 40; i++)
printf ("%s = %d\n", "wow", i);
return 0;
}

View File

@@ -0,0 +1,53 @@
#include <stdio.h>
#include <string.h>
int
main (void)
{
FILE *f;
int i;
const char filename[] = "/tmp/bug3.test";
f = fopen(filename, "w+");
for (i=0; i<9000; i++)
putc ('x', f);
fseek (f, 8180L, 0);
fwrite ("Where does this text go?", 1, 24, f);
fflush (f);
rewind (f);
for (i=0; i<9000; i++)
{
int j;
if ((j = getc(f)) != 'x')
{
if (i != 8180)
{
printf ("Test FAILED!");
return 1;
}
else
{
char buf[25];
buf[0] = j;
fread (buf + 1, 1, 23, f);
buf[24] = '\0';
if (strcmp (buf, "Where does this text go?") != 0)
{
printf ("%s\nTest FAILED!\n", buf);
return 1;
}
i += 23;
}
}
}
fclose(f);
remove(filename);
puts ("Test succeeded.");
return 0;
}

View File

@@ -0,0 +1,74 @@
#
#
#
PROGS= test-stdio tst-printf tstdiomisc bug2 bug3 \
temptest test-fseek test_rdwr
all: $(PROGS:%=%.exe)
.phony: all
$(PROGS:%=%_clean): %_clean:
- $(RM) $*.o
- $(RM) $*.exe
- $(RM) $*.sym
clean: $(PROGS:%=%_clean)
.phony: clean
floppy: # $(PROGS:%=$(FLOPPY_DIR)/apps/%.exe)
$(PROGS:%=$(FLOPPY_DIR)/apps/%.exe): $(FLOPPY_DIR)/apps/%.exe: %.exe
ifeq ($(DOSCLI),yes)
$(CP) $*.exe $(FLOPPY_DIR)\apps\$*.exe
else
$(CP) $*.exe $(FLOPPY_DIR)/apps/$*.exe
endif
dist: $(PROGS:%=../../$(DIST_DIR)/apps/%.exe)
$(PROGS:%=../../$(DIST_DIR)/apps/%.exe): ../../$(DIST_DIR)/apps/%.exe: %.exe
ifeq ($(DOSCLI),yes)
$(CP) $*.exe ..\..\$(DIST_DIR)\apps\$*.exe
else
$(CP) $*.exe ../../$(DIST_DIR)/apps/$*.exe
endif
bug2.exe: bug2.c
$(CC) bug2.c -lkernel32 -o bug2.exe
$(NM) --numeric-sort bug2.exe > bug2.sym
bug3.exe: bug3.c
$(CC) bug3.c -lkernel32 -o bug3.exe
$(NM) --numeric-sort bug3.exe > bug3.sym
temptest.exe: temptest.c
$(CC) temptest.c -lkernel32 -o temptest.exe
$(NM) --numeric-sort temptest.exe > temptest.sym
test-fseek.exe: test-fseek.c
$(CC) test-fseek.c -lkernel32 -o test-fseek.exe
$(NM) --numeric-sort test-fseek.exe > test-fseek.sym
test-fwrite.exe: test-fwrite.c
$(CC) test-fwrite.c -lkernel32 -o test-fwrite.exe
$(NM) --numeric-sort test-fwrite.exe > test-fwrite.sym
test_rdwr.exe: test_rdwr.c
$(CC) test_rdwr.c -lkernel32 -o test_rdwr.exe
$(NM) --numeric-sort test_rdwr.exe > test_rdwr.sym
test-stdio.exe: test-stdio.c
$(CC) test-stdio.c -lkernel32 -o test-stdio.exe
$(NM) --numeric-sort test-stdio.exe > test-stdio.sym
tst-printf.exe: tst-printf.c
$(CC) tst-printf.c -lkernel32 -o tst-printf.exe
$(NM) --numeric-sort tst-printf.exe > tst-printf.sym
tstdiomisc.exe: tstdiomisc.c
$(CC) tstdiomisc.c -lkernel32 -o tstdiomisc.exe
$(NM) --numeric-sort tstdiomisc.exe > tstdiomisc.sym
include ../../rules.mak

View File

@@ -0,0 +1,27 @@
#include <stdio.h>
#include <string.h>
char *files[500];
int
main (int argc, char *argv[])
{
FILE *fp;
int i;
for (i = 0; i < 500; i++) {
files[i] = tempnam (NULL, "file");
if (files[i] == NULL) {
printf ("tempnam failed\n");
exit (1);
}
printf ("file: %s\n", files[i]);
fp = fopen (files[i], "w");
fclose (fp);
}
for (i = 0; i < 500; i++)
remove (files[i]);
exit (0);
}

View File

@@ -0,0 +1,85 @@
/* Copyright (C) 1991, 1992, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <stdio.h>
#define TESTFILE "/tmp/test.dat"
int
main (void)
{
FILE *fp;
int i, j;
puts ("\nFile seek test");
fp = fopen (TESTFILE, "w");
if (fp == NULL)
{
perror (TESTFILE);
return 1;
}
for (i = 0; i < 256; i++)
putc (i, fp);
if (freopen (TESTFILE, "r", fp) != fp)
{
perror ("Cannot open file for reading");
return 1;
}
for (i = 1; i <= 255; i++)
{
printf ("%3d\n", i);
fseek (fp, (long) -i, SEEK_END);
if ((j = getc (fp)) != 256 - i)
{
printf ("SEEK_END failed %d\n", j);
break;
}
if (fseek (fp, (long) i, SEEK_SET))
{
puts ("Cannot SEEK_SET");
break;
}
if ((j = getc (fp)) != i)
{
printf ("SEEK_SET failed %d\n", j);
break;
}
if (fseek (fp, (long) i, SEEK_SET))
{
puts ("Cannot SEEK_SET");
break;
}
if (fseek (fp, (long) (i >= 128 ? -128 : 128), SEEK_CUR))
{
puts ("Cannot SEEK_CUR");
break;
}
if ((j = getc (fp)) != (i >= 128 ? i - 128 : i + 128))
{
printf ("SEEK_CUR failed %d\n", j);
break;
}
}
fclose (fp);
remove (TESTFILE);
puts ((i > 255) ? "Test succeeded." : "Test FAILED!");
return (i > 255) ? 0 : 1;
}

View File

@@ -0,0 +1,68 @@
#include <stdio.h>
#include <string.h>
int
main (int argc, char *argv[])
{
FILE *f = tmpfile ();
char obuf[99999], ibuf[sizeof obuf];
char *line;
size_t linesz;
if (! f)
{
perror ("tmpfile");
return 1;
}
if (fputs ("line\n", f) == EOF)
{
perror ("fputs");
return 1;
}
memset (obuf, 'z', sizeof obuf);
memset (ibuf, 'y', sizeof ibuf);
if (fwrite (obuf, sizeof obuf, 1, f) != 1)
{
perror ("fwrite");
return 1;
}
rewind (f);
line = NULL;
linesz = 0;
if (getline (&line, &linesz, f) != 5)
{
perror ("getline");
return 1;
}
if (strcmp (line, "line\n"))
{
puts ("Lines differ. Test FAILED!");
return 1;
}
if (fread (ibuf, sizeof ibuf, 1, f) != 1)
{
perror ("fread");
return 1;
}
if (memcmp (ibuf, obuf, sizeof ibuf))
{
puts ("Buffers differ. Test FAILED!");
return 1;
}
asprintf (&line, "\
GDB is free software and you are welcome to distribute copies of it\n\
under certain conditions; type \"show copying\" to see the conditions.\n\
There is absolutely no warranty for GDB; type \"show warranty\" for details.\n\
");
puts ("Test succeeded.");
return 0;
}

View File

@@ -0,0 +1,55 @@
#include <stdio.h>
#include <string.h>
int main()
{
char msg1[] = "testing _write\n";
char msg2[] = "testing putchar.";
char msg3[] = "testing printf.";
char tmpbuf[255];
FILE* f1;
write(1, msg1, strlen(msg1));
write(1, msg2, strlen(msg2));
putchar('o'); putchar('k'); putchar('\n');
write(1, msg3, strlen(msg3));
printf("ok\n");
printf("Testing fopen\n");
f1 = fopen("tmp.txt","w+b");
if (f1 == NULL)
{
printf("fopen failed\n");
return(1);
}
printf("Testing fwrite\n");
if (fwrite(msg1, 1, strlen(msg1)+1, f1) != (strlen(msg1)+1))
{
printf("fwrite failed\n");
return(1);
}
printf("Testing fread\n");
fseek(f1, 0, SEEK_SET);
if (fread(tmpbuf, 1, strlen(msg1)+1, f1) != (strlen(msg1)+1))
{
printf("fread failed\n");
return(1);
}
if (strcmp(tmpbuf,msg1) != 0)
{
printf("fread failed, data corrupt\n");
return(1);
}
printf("Testing fclose\n");
if (fclose(f1) != 0)
{
printf("fclose failed\n");
return(1);
}
return(0);
}

View File

@@ -0,0 +1,129 @@
/* Copyright (C) 1991, 1992, 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int
main (int argc, char **argv)
{
static const char hello[] = "Hello, world.\n";
static const char replace[] = "Hewwo, world.\n";
static const size_t replace_from = 2, replace_to = 4;
char filename[FILENAME_MAX];
char *name = strrchr (*argv, '/');
char buf[BUFSIZ];
FILE *f;
int lose = 0;
if (name != NULL)
++name;
else
name = *argv;
(void) sprintf (filename, "/tmp/%s.test", name);
f = fopen (filename, "w+");
if (f == NULL)
{
perror (filename);
exit (1);
}
(void) fputs (hello, f);
rewind (f);
(void) fgets (buf, sizeof (buf), f);
rewind (f);
(void) fputs (buf, f);
rewind (f);
{
size_t i;
for (i = 0; i < replace_from; ++i)
{
int c = getc (f);
if (c == EOF)
{
printf ("EOF at %Zu.\n", i);
lose = 1;
break;
}
else if (c != hello[i])
{
printf ("Got '%c' instead of '%c' at %Zu.\n",
(unsigned char) c, hello[i], i);
lose = 1;
break;
}
}
}
{
long int where = ftell (f);
if (where == (long int) replace_from)
{
register size_t i;
for (i = replace_from; i < replace_to; ++i)
if (putc(replace[i], f) == EOF)
{
printf ("putc('%c') got %s at %Zu.\n",
replace[i], strerror (errno), i);
lose = 1;
break;
}
}
else if (where == -1L)
{
printf ("ftell got %s (should be at %Zu).\n",
strerror (errno), replace_from);
lose = 1;
}
else
{
printf ("ftell returns %lu; should be %Zu.\n", where, replace_from);
lose = 1;
}
}
if (!lose)
{
rewind (f);
if (fgets (buf, sizeof (buf), f) == NULL)
{
printf ("fgets got %s.\n", strerror(errno));
lose = 1;
}
else if (strcmp (buf, replace))
{
printf ("Read \"%s\" instead of \"%s\".\n", buf, replace);
lose = 1;
}
}
if (lose)
printf ("Test FAILED! Losing file is \"%s\".\n", filename);
else
{
(void) remove (filename);
puts ("Test succeeded.");
}
exit (lose ? EXIT_FAILURE : EXIT_SUCCESS);
}

View File

@@ -0,0 +1,311 @@
/* Copyright (C) 1991, 92, 93, 95, 96, 97, 98 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifdef BSD
#include </usr/include/stdio.h>
#define EXIT_SUCCESS 0
#else
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#endif
#include <float.h>
void rfg1 (void);
void rfg2 (void);
void
fmtchk (const char *fmt)
{
(void) fputs(fmt, stdout);
(void) printf(":\t`");
(void) printf(fmt, 0x12);
(void) printf("'\n");
}
void
fmtst1chk (const char *fmt)
{
(void) fputs(fmt, stdout);
(void) printf(":\t`");
(void) printf(fmt, 4, 0x12);
(void) printf("'\n");
}
void
fmtst2chk (const char *fmt)
{
(void) fputs(fmt, stdout);
(void) printf(":\t`");
(void) printf(fmt, 4, 4, 0x12);
(void) printf("'\n");
}
/* This page is covered by the following copyright: */
/* (C) Copyright C E Chew
*
* Feel free to copy, use and distribute this software provided:
*
* 1. you do not pretend that you wrote it
* 2. you leave this copyright notice intact.
*/
/*
* Extracted from exercise.c for glibc-1.05 bug report by Bruce Evans.
*/
#define DEC -123
#define INT 255
#define UNS (~0)
/* Formatted Output Test
*
* This exercises the output formatting code.
*/
void
fp_test (void)
{
int i, j, k, l;
char buf[7];
char *prefix = buf;
char tp[20];
puts("\nFormatted output test");
printf("prefix 6d 6o 6x 6X 6u\n");
strcpy(prefix, "%");
for (i = 0; i < 2; i++) {
for (j = 0; j < 2; j++) {
for (k = 0; k < 2; k++) {
for (l = 0; l < 2; l++) {
strcpy(prefix, "%");
if (i == 0) strcat(prefix, "-");
if (j == 0) strcat(prefix, "+");
if (k == 0) strcat(prefix, "#");
if (l == 0) strcat(prefix, "0");
printf("%5s |", prefix);
strcpy(tp, prefix);
strcat(tp, "6d |");
printf(tp, DEC);
strcpy(tp, prefix);
strcat(tp, "6o |");
printf(tp, INT);
strcpy(tp, prefix);
strcat(tp, "6x |");
printf(tp, INT);
strcpy(tp, prefix);
strcat(tp, "6X |");
printf(tp, INT);
strcpy(tp, prefix);
strcat(tp, "6u |");
printf(tp, UNS);
printf("\n");
}
}
}
}
printf("%10s\n", (char *) NULL);
printf("%-10s\n", (char *) NULL);
}
int
main (int argc, char *argv[])
{
static char shortstr[] = "Hi, Z.";
static char longstr[] = "Good morning, Doctor Chandra. This is Hal. \
I am ready for my first lesson today.";
fmtchk("%.4x");
fmtchk("%04x");
fmtchk("%4.4x");
fmtchk("%04.4x");
fmtchk("%4.3x");
fmtchk("%04.3x");
fmtst1chk("%.*x");
fmtst1chk("%0*x");
fmtst2chk("%*.*x");
fmtst2chk("%0*.*x");
#ifndef BSD
printf("bad format:\t\"%b\"\n");
printf("nil pointer (padded):\t\"%10p\"\n", (void *) NULL);
#endif
printf("decimal negative:\t\"%d\"\n", -2345);
printf("octal negative:\t\"%o\"\n", -2345);
printf("hex negative:\t\"%x\"\n", -2345);
printf("long decimal number:\t\"%ld\"\n", -123456L);
printf("long octal negative:\t\"%lo\"\n", -2345L);
printf("long unsigned decimal number:\t\"%lu\"\n", -123456L);
printf("zero-padded LDN:\t\"%010ld\"\n", -123456L);
printf("left-adjusted ZLDN:\t\"%-010ld\"\n", -123456);
printf("space-padded LDN:\t\"%10ld\"\n", -123456L);
printf("left-adjusted SLDN:\t\"%-10ld\"\n", -123456L);
printf("zero-padded string:\t\"%010s\"\n", shortstr);
printf("left-adjusted Z string:\t\"%-010s\"\n", shortstr);
printf("space-padded string:\t\"%10s\"\n", shortstr);
printf("left-adjusted S string:\t\"%-10s\"\n", shortstr);
printf("null string:\t\"%s\"\n", (char *)NULL);
printf("limited string:\t\"%.22s\"\n", longstr);
printf("e-style >= 1:\t\"%e\"\n", 12.34);
printf("e-style >= .1:\t\"%e\"\n", 0.1234);
printf("e-style < .1:\t\"%e\"\n", 0.001234);
printf("e-style big:\t\"%.60e\"\n", 1e20);
printf ("e-style == .1:\t\"%e\"\n", 0.1);
printf("f-style >= 1:\t\"%f\"\n", 12.34);
printf("f-style >= .1:\t\"%f\"\n", 0.1234);
printf("f-style < .1:\t\"%f\"\n", 0.001234);
printf("g-style >= 1:\t\"%g\"\n", 12.34);
printf("g-style >= .1:\t\"%g\"\n", 0.1234);
printf("g-style < .1:\t\"%g\"\n", 0.001234);
printf("g-style big:\t\"%.60g\"\n", 1e20);
printf (" %6.5f\n", .099999999860301614);
printf (" %6.5f\n", .1);
printf ("x%5.4fx\n", .5);
printf ("%#03x\n", 1);
{
double d = FLT_MIN;
int niter = 17;
while (niter-- != 0)
printf ("%.17e\n", d / 2);
fflush (stdout);
}
printf ("%15.5e\n", 4.9406564584124654e-324);
#define FORMAT "|%12.4f|%12.4e|%12.4g|\n"
printf (FORMAT, 0.0, 0.0, 0.0);
printf (FORMAT, 1.0, 1.0, 1.0);
printf (FORMAT, -1.0, -1.0, -1.0);
printf (FORMAT, 100.0, 100.0, 100.0);
printf (FORMAT, 1000.0, 1000.0, 1000.0);
printf (FORMAT, 10000.0, 10000.0, 10000.0);
printf (FORMAT, 12345.0, 12345.0, 12345.0);
printf (FORMAT, 100000.0, 100000.0, 100000.0);
printf (FORMAT, 123456.0, 123456.0, 123456.0);
#undef FORMAT
{
char buf[20];
printf ("sprintf (\"%%30s\", \"foo\") == %d, \"%.*s\"\n",
sprintf (buf, "%30s", "foo"), sizeof (buf), buf);
}
fp_test ();
printf ("%e should be 1.234568e+06\n", 1234567.8);
printf ("%f should be 1234567.800000\n", 1234567.8);
printf ("%g should be 1.23457e+06\n", 1234567.8);
printf ("%g should be 123.456\n", 123.456);
printf ("%g should be 1e+06\n", 1000000.0);
printf ("%g should be 10\n", 10.0);
printf ("%g should be 0.02\n", 0.02);
{
double x=1.0;
printf("%.17f\n",(1.0/x/10.0+1.0)*x-x);
}
puts ("--- Should be no further output. ---");
rfg1 ();
rfg2 ();
{
char buf[200];
int result;
sprintf(buf,"%*s%*s%*s",-1,"one",-20,"two",-30,"three");
result = strcmp (buf,
"onetwo three ");
puts (result != 0 ? "Test failed!" : "Test ok.");
return result != 0;
}
}
void
rfg1 (void)
{
char buf[100];
sprintf (buf, "%5.s", "xyz");
if (strcmp (buf, " ") != 0)
printf ("got: '%s', expected: '%s'\n", buf, " ");
sprintf (buf, "%5.f", 33.3);
if (strcmp (buf, " 33") != 0)
printf ("got: '%s', expected: '%s'\n", buf, " 33");
sprintf (buf, "%8.e", 33.3e7);
if (strcmp (buf, " 3e+08") != 0)
printf ("got: '%s', expected: '%s'\n", buf, " 3e+08");
sprintf (buf, "%8.E", 33.3e7);
if (strcmp (buf, " 3E+08") != 0)
printf ("got: '%s', expected: '%s'\n", buf, " 3E+08");
sprintf (buf, "%.g", 33.3);
if (strcmp (buf, "3e+01") != 0)
printf ("got: '%s', expected: '%s'\n", buf, "3e+01");
sprintf (buf, "%.G", 33.3);
if (strcmp (buf, "3E+01") != 0)
printf ("got: '%s', expected: '%s'\n", buf, "3E+01");
}
void
rfg2 (void)
{
int prec;
char buf[100];
prec = 0;
sprintf (buf, "%.*g", prec, 3.3);
if (strcmp (buf, "3") != 0)
printf ("got: '%s', expected: '%s'\n", buf, "3");
prec = 0;
sprintf (buf, "%.*G", prec, 3.3);
if (strcmp (buf, "3") != 0)
printf ("got: '%s', expected: '%s'\n", buf, "3");
prec = 0;
sprintf (buf, "%7.*G", prec, 3.33);
if (strcmp (buf, " 3") != 0)
printf ("got: '%s', expected: '%s'\n", buf, " 3");
prec = 3;
sprintf (buf, "%04.*o", prec, 33);
if (strcmp (buf, " 041") != 0)
printf ("got: '%s', expected: '%s'\n", buf, " 041");
prec = 7;
sprintf (buf, "%09.*u", prec, 33);
if (strcmp (buf, " 0000033") != 0)
printf ("got: '%s', expected: '%s'\n", buf, " 0000033");
prec = 3;
sprintf (buf, "%04.*x", prec, 33);
if (strcmp (buf, " 021") != 0)
printf ("got: '%s', expected: '%s'\n", buf, " 021");
prec = 3;
sprintf (buf, "%04.*X", prec, 33);
if (strcmp (buf, " 021") != 0)
printf ("got: '%s', expected: '%s'\n", buf, " 021");
}

View File

@@ -0,0 +1,56 @@
#include <stdio.h>
int
t1 (void)
{
int n = -1;
sscanf ("abc ", "abc %n", &n);
printf ("t1: count=%d\n", n);
return n != 5;
}
int
t2 (void)
{
int result = 0;
int n;
long N;
int retval;
#define SCAN(INPUT, FORMAT, VAR, EXP_RES, EXP_VAL) \
VAR = -1; \
retval = sscanf (INPUT, FORMAT, &VAR); \
printf ("sscanf (\"%s\", \"%s\", &x) => %d, x = %ld\n", \
INPUT, FORMAT, retval, (long int) VAR); \
result |= retval != EXP_RES || VAR != EXP_VAL
SCAN ("12345", "%ld", N, 1, 12345);
SCAN ("12345", "%llllld", N, 0, -1);
SCAN ("12345", "%LLLLLd", N, 0, -1);
SCAN ("test ", "%*s%n", n, 0, 4);
SCAN ("test ", "%2*s%n", n, 0, -1);
SCAN ("12 ", "%l2d", n, 0, -1);
SCAN ("12 ", "%2ld", N, 1, 12);
n = -1;
N = -1;
retval = sscanf ("1 1", "%d %Z", &n, &N);
printf ("sscanf (\"1 1\", \"%%d %%Z\", &n, &N) => %d, n = %d, N = %ld\n", \
retval, n, N); \
result |= retval != 1 || n != 1 || N != -1;
return result;
}
int
main (int argc, char *argv[])
{
int result = 0;
result |= t1 ();
result |= t2 ();
result |= fflush (stdout) == EOF;
return result;
}

View File

@@ -0,0 +1,41 @@
#
#
#
PROGS = thread
all: $(PROGS:%=%.exe)
.phony: all
clean: $(PROGS:%=%_clean)
$(PROGS:%=%_clean): %_clean:
- $(RM) $*.o
- $(RM) $*.exe
- $(RM) $*.sym
.phony: clean
floppy: # $(PROGS:%=$(FLOPPY_DIR)/apps/%.exe)
$(PROGS:%=$(FLOPPY_DIR)/apps/%.exe): $(FLOPPY_DIR)/apps/%.exe: %.exe
ifeq ($(DOSCLI),yes)
$(CP) $*.exe $(FLOPPY_DIR)\apps\$*.exe
else
$(CP) $*.exe $(FLOPPY_DIR)/apps/$*.exe
endif
dist: $(PROGS:%=../../$(DIST_DIR)/apps/%.exe)
$(PROGS:%=../../$(DIST_DIR)/apps/%.exe): ../../$(DIST_DIR)/apps/%.exe: %.exe
ifeq ($(DOSCLI),yes)
$(CP) $*.exe ..\..\$(DIST_DIR)\apps\$*.exe
else
$(CP) $*.exe ../../$(DIST_DIR)/apps/$*.exe
endif
thread.exe: thread.c
$(CC) $(CFLAGS) thread.c -lkernel32 -o thread.exe
$(NM) --numeric-sort thread.exe > thread.sym
include ../../rules.mak

View File

@@ -0,0 +1,74 @@
/* $Id: thread.c,v 1.6 2000/01/31 20:24:27 ekohl Exp $
*
*
*
*
*/
#include <stdio.h>
#include <windows.h>
#include <stdlib.h>
#define NR_THREADS (10)
ULONG nr;
DWORD WINAPI thread_main1(LPVOID param)
{
ULONG s;
printf("Thread %ld running\n", (DWORD)param);
s = nr = ((nr * 1103515245) + 12345) & 0x7fffffff;
s = s % 10;
printf("s %ld\n", s);
Sleep(s);
printf("Thread %ld finished\n", (DWORD)param);
return 0;
}
// Shows the help on how to use these program to the user
void showHelp(void)
{
printf("\nReactOS threads test program (built on %s).\n\n", __DATE__);
printf("syntax:\tthread.exe <seed>\n");
printf("\twhere <seed> is an integer number\n");
printf("\texample: thread.exe 100\n");
}
int main (int argc, char* argv[])
{
HANDLE hThread;
DWORD i=0;
DWORD id;
ULONG nr;
// The user must supply one argument (the seed). if he/she doesn't
// then we show the help.
if(argc < 2) {
showHelp();
return 1;
}
nr = atoi(argv[1]);
printf("Seed %ld\n", nr);
printf("Creating %d threads...\n",NR_THREADS*2);
for (i=0;i<NR_THREADS;i++)
{
CreateThread(NULL,
0,
thread_main1,
(LPVOID)i,
0,
&id);
}
printf("All threads created...\n");
for(;;);
return 0;
}

View File

@@ -0,0 +1,2 @@
buildno
buildno.exe

View File

@@ -0,0 +1,26 @@
# $Id: Makefile,v 1.6 2000/06/29 23:35:09 dwelch Exp $
#
BASE_CFLAGS =
TARGETNAME=buildno
CLEAN_FILES= $(TARGETNAME).o $(TARGETNAME)$(EXE_POSTFIX) $(TARGETNAME).sym
all: $(TARGETNAME)$(EXE_POSTFIX)
$(EXE_PREFIX)$(TARGETNAME)$(EXE_POSTFIX)
$(TARGETNAME)$(EXE_POSTFIX): $(TARGETNAME).c ../../include/reactos/version.h
$(NATIVE_CC) -o $(TARGETNAME)$(EXE_POSTFIX) $(TARGETNAME).c
clean:
- $(RM) $(TARGETNAME).o
- $(RM) $(TARGETNAME).sym
- $(RM) $(TARGETNAME)$(EXE_POSTFIX)
.phony: clean
include ../../rules.mak
# EOF

View File

@@ -0,0 +1,316 @@
/* $Id: buildno.c,v 1.4 2000/06/29 23:35:09 dwelch Exp $
*
* buildno - Generate the build number for ReactOS
*
* Copyright (c) 1999,2000 Emanuele Aliberti
*
* License: GNU GPL
*
* It assumes the last release date is defined in
* <reactos/version.h> as a macro named
*
* KERNEL_RELEASE_DATE
*
* as a 32-bit unsigned long YYYYMMDD (UTC;
* MM=01-12; DD=01-31).
*
* The build number is the number of full days
* elapsed since the last release date (UTC).
*
* The build number is stored in the file
* <reactos/buildno.h> as a set of macros:
*
* KERNEL_VERSION_BUILD base 10 number
* KERNEL_VERSION_BUILD_STR C string
* KERNEL_VERSION_BUILD_RC RC string
*
* REVISIONS
* ---------
* 2000-01-22 (ea)
* Fixed bugs: tm_year is (current_year - 1900),
* tm_month is 0-11 not 1-12 and code ignored TZ.
*/
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "../../include/reactos/version.h"
#define FALSE 0
#define TRUE 1
/* File to (over)write */
#define BUILDNO_INCLUDE_FILE "../../include/reactos/buildno.h"
static char * argv0 = "";
#ifdef DBG
void
tm_dump (const char *tag, struct tm * t)
{
printf ("%s->tm_sec = %d\n", tag, t->tm_sec);
printf ("%s->tm_min = %d\n", tag, t->tm_min);
printf ("%s->tm_hour = %d\n", tag, t->tm_hour);
printf ("%s->tm_mday = %d\n", tag, t->tm_mday);
printf ("%s->tm_mon = %d\n", tag, t->tm_mon);
printf ("%s->tm_year = %d\n", tag, t->tm_year);
printf ("%s->tm_wday = %d\n", tag, t->tm_wday);
printf ("%s->tm_yday = %d\n", tag, t->tm_yday);
printf ("%s->tm_isdst = %d\n\n", tag, t->tm_isdst);
}
#endif
int
elapsed_days (
time_t t_today,
time_t t_release_day
)
{
double seconds = difftime (t_today, t_release_day);
double days = seconds / (double) 86400.0;
char buf [32];
char * dot = buf;
sprintf (buf, "%f", days );
while ( *dot && *dot != '.') ++dot;
*dot = '\0';
return atol (buf);
}
void
write_h (int build)
{
FILE *h = NULL;
h = fopen ( BUILDNO_INCLUDE_FILE, "w");
if (!h)
{
fprintf (
stderr,
"%s: can not create file \"%s\"!\n",
argv0,
BUILDNO_INCLUDE_FILE
);
return;
}
fprintf (
h,
"/* Do not edit - Machine generated */\n"
);
fprintf (h, "#ifndef _INC_REACTOS_BUILDNO\n" );
fprintf (h, "#define _INC_REACTOS_BUILDNO\n" );
fprintf (
h,
"#define KERNEL_VERSION_BUILD\t%d\n",
build
);
fprintf (
h,
"#define KERNEL_VERSION_BUILD_STR\t\"%d\"\n",
build
);
fprintf (
h,
"#define KERNEL_RELEASE_RC\t\"%d.%d.%d.%d\\0\"\n",
KERNEL_VERSION_MAJOR,
KERNEL_VERSION_MINOR,
KERNEL_VERSION_PATCH_LEVEL,
build
);
fprintf (
h,
"#define KERNEL_RELEASE_STR\t\"%d.%d.%d.%d\"\n",
KERNEL_VERSION_MAJOR,
KERNEL_VERSION_MINOR,
KERNEL_VERSION_PATCH_LEVEL,
build
);
fprintf (
h,
"#define KERNEL_VERSION_RC\t\"%d.%d.%d\\0\"\n",
KERNEL_VERSION_MAJOR,
KERNEL_VERSION_MINOR,
KERNEL_VERSION_PATCH_LEVEL
);
fprintf (
h,
"#define KERNEL_VERSION_STR\t\"%d.%d.%d\"\n",
KERNEL_VERSION_MAJOR,
KERNEL_VERSION_MINOR,
KERNEL_VERSION_PATCH_LEVEL
);
fprintf (
h,
"#endif\n/* EOF */\n"
);
fclose (h);
}
void
usage (void)
{
fprintf (
stderr,
"Usage: %s [-q]\n\n -q quiet mode\n",
argv0
);
exit (EXIT_SUCCESS);
}
int
main (int argc, char * argv [])
{
int quiet = FALSE;
int year = 0;
int month = 0;
int day = 0;
int build = 0;
time_t t0 = 0;
struct tm t0_tm = {0};
time_t t1 = 0;
struct tm * t1_tm = NULL;
argv0 = argv[0];
switch (argc)
{
case 1:
break;
case 2:
if (argv[1][0] == '-')
{
if (argv[1][1] == 'q')
{
quiet = TRUE;
}
else
{
usage ();
}
}
else
{
usage ();
}
break;
default:
usage ();
}
/*
* Set TZ information.
*/
tzset ();
/*
* We are building TODAY!
*/
time (& t0);
/*
* "Parse" the release date.
*/
day = KERNEL_RELEASE_DATE % 100;
month = ( ( KERNEL_RELEASE_DATE
% 10000
)
- day
)
/ 100;
year =
( KERNEL_RELEASE_DATE
- (month * 100)
- day
)
/ 10000;
if (FALSE == quiet)
{
printf ( "\n\
ReactOS Build Number Generator\n\n\
Last release: %4d-%02d-%02d\n",
year,
month,
day
);
}
#ifdef DBG
tm_dump ("t0", & t0_tm);
#endif
t0_tm.tm_year = (year - 1900);
t0_tm.tm_mon = --month; /* 0-11 */
t0_tm.tm_mday = day;
t0_tm.tm_hour = 0;
t0_tm.tm_min = 0;
t0_tm.tm_sec = 1;
t0_tm.tm_isdst = -1;
#ifdef DBG
tm_dump ("t0", & t0_tm);
#endif
if (-1 == (t0 = mktime (& t0_tm)))
{
fprintf (
stderr,
"%s: can not convert release date!\n",
argv[0]
);
return EXIT_FAILURE;
}
time (& t1); /* current build time */
t1_tm = gmtime (& t1);
#ifdef DBG
tm_dump ("t1", t1_tm);
#endif
t1_tm->tm_year +=
(t1_tm->tm_year < 70)
? 2000
: 1900;
#ifdef DBG
tm_dump ("t1", t1_tm);
#endif
if (FALSE == quiet)
{
printf (
"Current date: %4d-%02d-%02d\n\n",
t1_tm->tm_year,
(t1_tm->tm_mon + 1),
t1_tm->tm_mday
);
}
/*
* Compute delta days.
*/
build = elapsed_days (t1, t0);
if (FALSE == quiet)
{
printf (
"Build number: %d (elapsed days since last release)\n",
build
);
printf (
"ROS Version : %d.%d.%d.%d\n",
KERNEL_VERSION_MAJOR,
KERNEL_VERSION_MINOR,
KERNEL_VERSION_PATCH_LEVEL,
build
);
}
/*
* (Over)write the include file.
*/
write_h (build);
return EXIT_SUCCESS;
}
/* EOF */

View File

@@ -0,0 +1,26 @@
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char* argv[])
{
int i;
FILE* in;
char ch;
for (i=1; i<argc; i++)
{
in = fopen(argv[i],"r");
if (in == NULL)
{
printf("Failed to open file %s\n", argv[i]);
return(0);
}
while ((ch = fgetc(in)) != EOF)
{
putchar(ch);
}
fclose(in);
}
return 0;
}

View File

@@ -0,0 +1,42 @@
#
#
#
OBJECTS= cat.o
PROGS= cat.exe
all: cat.exe
.phony: all
clean:
- $(RM) cat.o
- $(RM) cat.exe
- $(RM) cat.sym
.phony: clean
floppy: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
ifeq ($(DOSCLI),yes)
$(CP) $* $(FLOPPY_DIR)\apps\$*
else
$(CP) $* $(FLOPPY_DIR)/apps/$*
endif
dist: $(PROGS:%=../../$(DIST_DIR)/apps/%)
$(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: %
ifeq ($(DOSCLI),yes)
$(CP) $* ..\..\$(DIST_DIR)\apps\$*
else
$(CP) $* ../../$(DIST_DIR)/apps/$*
endif
.PHONY: floppy dist
cat.exe: $(OBJECTS) $(LIBS)
$(CC) $(OBJECTS) -o cat.exe
$(NM) --numeric-sort cat.exe > cat.sym
include ../../rules.mak

View File

@@ -0,0 +1,50 @@
#
#
#
OBJECTS= ../common/crt0.o objdir.o
PROGS= objdir.exe
BASE_CFLAGS = -I../../include
LIB_BASE=../../lib
LIBS = \
$(LIB_BASE)/ntdll/ntdll.a \
$(LIB_BASE)/kernel32/kernel32.a \
$(LIB_BASE)/crtdll/crtdll.a
all: $(PROGS)
.phony: all
clean:
- $(RM) objdir.o
- $(RM) objdir.exe
- $(RM) objdir.sym
.phony: clean
floppy: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
ifeq ($(DOSCLI),yes)
$(CP) $* $(FLOPPY_DIR)\apps\$*
else
$(CP) $* $(FLOPPY_DIR)/apps/$*
endif
dist: $(PROGS:%=../../$(DIST_DIR)/apps/%)
$(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: %
ifeq ($(DOSCLI),yes)
$(CP) $* ..\..\$(DIST_DIR)\apps\$*
else
$(CP) $* ../../$(DIST_DIR)/apps/$*
endif
objdir.exe: $(OBJECTS) $(LIBS)
$(LD) $(OBJECTS) $(LIBS) -o objdir.exe
$(NM) --numeric-sort objdir.exe > objdir.sym
include ../../rules.mak

View File

@@ -0,0 +1,163 @@
/* $Id: objdir.c,v 1.3 2000/05/13 14:56:46 ea Exp $
*
* DESCRIPTION: Object Manager Simple Explorer
* PROGRAMMER: David Welch
* REVISIONS
* 2000-04-30 (ea)
* Added directory enumeration.
* (tested under nt4sp4/x86)
*/
#include <ddk/ntddk.h>
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#define MAX_TYPE 64
typedef
struct _DIRECTORY_ENTRY_HEADER
{
UNICODE_STRING Name;
UNICODE_STRING Type;
} DIRECTORY_ENTRY_HEADER;
struct
{
DIRECTORY_ENTRY_HEADER Entry;
WCHAR Buffer [MAX_PATH + MAX_TYPE + 2];
} DirectoryEntry;
static
const char *
STDCALL
StatusToName (NTSTATUS Status)
{
static char RawValue [16];
switch (Status)
{
case STATUS_OBJECT_NAME_INVALID:
return "STATUS_OBJECT_NAME_INVALID";
case STATUS_OBJECT_NAME_NOT_FOUND:
return "STATUS_OBJECT_NAME_NOT_FOUND";
case STATUS_PATH_SYNTAX_BAD:
return "STATUS_PATH_SYNTAX_BAD";
}
wsprintf (RawValue, "0x%08x", Status);
return (const char *) RawValue;
}
int main(int argc, char* argv[])
{
UNICODE_STRING DirectoryNameW;
ANSI_STRING DirectoryNameA;
OBJECT_ATTRIBUTES ObjectAttributes;
NTSTATUS Status;
HANDLE DirectoryHandle;
ULONG BytesReturned = 0;
ULONG EntryCount = 0;
/*
* Check user arguments.
*/
if (2 != argc)
{
fprintf (
stderr,
"Usage: %s directory\n\n"
" directory a directory name in the system namespace\n",
argv [0]
);
return EXIT_FAILURE;
}
/*
* Prepare parameters for next call.
*/
RtlInitAnsiString (
& DirectoryNameA,
argv [1]
);
RtlAnsiStringToUnicodeString (
& DirectoryNameW,
& DirectoryNameA,
TRUE
);
InitializeObjectAttributes (
& ObjectAttributes,
& DirectoryNameW,
0,
NULL,
NULL
);
/*
* Try opening the directory the
* user requested.
*/
Status = NtOpenDirectoryObject (
& DirectoryHandle,
DIRECTORY_QUERY,
& ObjectAttributes
);
if (!NT_SUCCESS(Status))
{
printf (
"Failed to open directory object (Status: %s)\n",
StatusToName (Status)
);
return EXIT_FAILURE;
}
/*
* Enumerate each item in the directory.
*/
Status = NtQueryDirectoryObject (
DirectoryHandle,
& DirectoryEntry,
sizeof DirectoryEntry,
TRUE,
TRUE,
& BytesReturned,
& EntryCount
);
if (!NT_SUCCESS(Status))
{
printf (
"Failed to query directory object (Status: %s)\n",
StatusToName (Status)
);
NtClose (DirectoryHandle);
return EXIT_FAILURE;
}
wprintf (L"%d entries:\n", EntryCount);
while (STATUS_NO_MORE_ENTRIES != Status)
{
wprintf (
L"%-16s %s\n",
DirectoryEntry.Entry.Type.Buffer,
DirectoryEntry.Entry.Name.Buffer
);
Status = NtQueryDirectoryObject (
DirectoryHandle,
& DirectoryEntry,
sizeof DirectoryEntry,
TRUE,
FALSE,
& BytesReturned,
& EntryCount
);
}
/*
* Free any resource.
*/
NtClose (DirectoryHandle);
return EXIT_SUCCESS;
}
/* EOF */

View File

@@ -0,0 +1,42 @@
#
#
#
OBJECTS= ../common/crt0.o shell.o
PROGS= shell.exe
LIBS= ../../lib/kernel32/kernel32.a ../../lib/ntdll/ntdll.a
CLEAN_FILES= shell.o shell.exe shell.sym
BASE_CFLAGS = -I../../include
all: shell.exe
clean: $(CLEAN_FILES:%=%_clean)
$(CLEAN_FILES:%=%_clean): %_clean:
- $(RM) $*
.phony: clean $(CLEAN_FILES:%=%_clean)
floppy: $(PROGS:%=$(FLOPPY_DIR)/apps/%)
$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
ifeq ($(DOSCLI),yes)
$(CP) $* $(FLOPPY_DIR)\apps\$*
else
$(CP) $* $(FLOPPY_DIR)/apps/$*
endif
dist: $(PROGS:%=../../$(DIST_DIR)/apps/%)
$(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: %
ifeq ($(DOSCLI),yes)
$(CP) $* ..\..\$(DIST_DIR)\apps\$*
else
$(CP) $* ../../$(DIST_DIR)/apps/$*
endif
shell.exe: $(OBJECTS) $(LIBS)
$(CC) -specs=../../specs $(OBJECTS) $(LIBS) -lgcc -o shell.exe
$(NM) --numeric-sort shell.exe > shell.sym
include ../../rules.mak

View File

@@ -0,0 +1,494 @@
/* $Id: shell.c,v 1.41 2000/07/11 04:40:00 phreak Exp $
*
* PROJECT : ReactOS Operating System
* DESCRIPTION: ReactOS' Native Shell
* LICENSE : See top level directory
*
*/
#define NTOS_MODE_USER
#include <ntos.h>
#include <windows.h>
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
HANDLE InputHandle, OutputHandle;
BOOL bCanExit = TRUE;
void debug_printf(char* fmt, ...)
{
va_list args;
char buffer[255];
va_start(args,fmt);
vsprintf(buffer,fmt,args);
va_end(args);
WriteConsoleA(OutputHandle, buffer, strlen(buffer), NULL, NULL);
}
void ExecuteVer(void)
{
debug_printf(
"Reactos Simple Shell\n(compiled on %s, at %s)\n",
__DATE__,
__TIME__
);
}
void ExecuteCd(char* cmdline)
{
if (!SetCurrentDirectoryA(cmdline))
{
debug_printf("Invalid directory\n");
}
}
void ExecuteMd (char *cmdline)
{
if (!CreateDirectoryA (cmdline, NULL))
{
debug_printf("Create Directory failed!\n");
}
}
void ExecuteDir(char* cmdline)
{
HANDLE shandle;
WIN32_FIND_DATA FindData;
int nFile=0, nRep=0;
FILETIME fTime;
SYSTEMTIME sTime;
shandle = FindFirstFile("*",&FindData);
if (shandle==INVALID_HANDLE_VALUE)
{
debug_printf("File not found\n\n");
return;
}
do
{
debug_printf("%-15.15s",FindData.cAlternateFileName);
if(FindData.dwFileAttributes &FILE_ATTRIBUTE_DIRECTORY)
debug_printf("<DIR> "),nRep++;
else
debug_printf(" %10d ",FindData.nFileSizeLow),nFile++;
FileTimeToLocalFileTime(&FindData.ftLastWriteTime ,&fTime);
FileTimeToSystemTime(&fTime, &sTime);
debug_printf("%02d/%02d/%04d %02d:%02d:%02d "
,sTime.wMonth,sTime.wDay,sTime.wYear
,sTime.wHour,sTime.wMinute,sTime.wSecond);
debug_printf("%s\n",FindData.cFileName);
} while(FindNextFile(shandle,&FindData));
debug_printf("\n %d files\n %d directories\n\n",nFile,nRep);
FindClose(shandle);
}
void ExecuteReboot(char* cmdline)
{
NtShutdownSystem (ShutdownReboot);
}
void ExecuteType(char* cmdline)
{
HANDLE FileHandle;
char c;
DWORD Result;
FileHandle = CreateFile(cmdline,
FILE_GENERIC_READ,
0,
NULL,
OPEN_EXISTING,
0,
NULL);
if (FileHandle == NULL)
{
debug_printf("Unknown file\n");
return;
}
while (ReadFile(FileHandle,
&c,
1,
&Result,
NULL))
{
debug_printf("%c",c);
c = 0;
}
CloseHandle(FileHandle);
}
int ExecuteProcess(char* name, char* cmdline, BOOL detached)
{
PROCESS_INFORMATION ProcessInformation;
STARTUPINFO StartupInfo;
BOOL ret;
CHAR fullname[MAX_PATH];
PCHAR p;
/* append '.exe' if needed */
strcpy (fullname, name);
p = strrchr (fullname, '.');
if ((p == NULL) ||
(_stricmp (p, ".exe") != 0))
{
strcat (fullname, ".exe");
}
memset(&StartupInfo, 0, sizeof(StartupInfo));
StartupInfo.cb = sizeof (STARTUPINFO);
StartupInfo.lpTitle = name;
// set mode to default for new process
SetConsoleMode( GetStdHandle( STD_INPUT_HANDLE ), ENABLE_LINE_INPUT | ENABLE_PROCESSED_INPUT | ENABLE_ECHO_INPUT );
ret = CreateProcessA(fullname,
cmdline,
NULL,
NULL,
FALSE,
((TRUE == detached)
? CREATE_NEW_CONSOLE
: 0
),
NULL,
NULL,
& StartupInfo,
& ProcessInformation
);
if (TRUE == detached)
{
if (ret)
{
debug_printf("%s detached:\n"
"\thProcess = %08X\n"
"\thThread = %08X\n"
"\tPID = %d\n"
"\tTID = %d\n\n",
name,
ProcessInformation.hProcess,
ProcessInformation.hThread,
ProcessInformation.dwProcessId,
ProcessInformation.dwThreadId);
CloseHandle(ProcessInformation.hProcess);
CloseHandle(ProcessInformation.hThread);
}
else
{
debug_printf("Could not detach %s\n", name);
}
}
else
{
if (ret)
{
// debug_printf("ProcessInformation.hThread %x\n",
// ProcessInformation.hThread);
WaitForSingleObject(ProcessInformation.hProcess, INFINITE);
CloseHandle(ProcessInformation.hProcess);
// debug_printf("Thandle %x\n", ProcessInformation.hThread);
CloseHandle(ProcessInformation.hThread);
}
}
// reset mode
SetConsoleMode( GetStdHandle( STD_INPUT_HANDLE ), 0 );
return(ret);
}
void ExecuteStart(char* CommandLine)
{
char *ImageName = CommandLine;
for ( ;
( (*CommandLine)
&& (*CommandLine != ' ')
&& (*CommandLine != '\t')
);
CommandLine++
);
*CommandLine++ = '\0';
while ( (*CommandLine)
&& ( (*CommandLine == ' ')
|| (*CommandLine == '\t')
)
);
ExecuteProcess(
ImageName,
CommandLine,
TRUE
);
return;
}
void
ExecuteKill(char * lpPid)
{
HANDLE hProcess;
DWORD dwProcessId;
dwProcessId = (DWORD) atol(lpPid);
debug_printf("dwProcessId %d\n",dwProcessId);
hProcess = OpenProcess(
PROCESS_TERMINATE,
FALSE,
dwProcessId
);
if (NULL == hProcess)
{
debug_printf(
"Could not open the process with PID = %d\n",
dwProcessId
);
return;
}
if (FALSE == TerminateProcess(
hProcess,
0
)
) {
debug_printf(
"Could not terminate the process with PID = %d\n",
dwProcessId
);
}
CloseHandle(hProcess);
return;
}
void ExecuteHelp (void * dummy)
{
debug_printf (
"A:\t\t\tCurrent drive is A:\n"
"C:\t\t\tCurrent drive is C:\n"
"cd [directory]\t\tChange current directory\n"
"dir [directory]\t\tList directory\n"
"exit\t\t\tTerminate the shell\n"
"help\t\t\tPrint this help message\n"
"kill [pid]\t\tKill process which PID is pid\n"
"md [directory]\t\tCreate a new directory\n"
"reboot\t\t\tRestart the system\n"
"start [program.exe]\tDetach program.exe\n"
"type [file]\t\tPrint the file on console\n"
"validate\t\tValidate the process' heap\n"
"ver\t\t\tPrint version information\n"
"[program.exe]\t\tStart synchronously program.exe\n\n"
);
}
void ExecuteCommand(char* line)
{
char* cmd;
char* tail;
if (isalpha(line[0]) && line[1] == ':' && line[2] == 0)
{
char szPath[MAX_PATH];
char szVar[5];
/* save curent directory in environment variable */
GetCurrentDirectory (MAX_PATH, szPath);
strcpy (szVar, "=A:");
szVar[1] = toupper (szPath[0]);
SetEnvironmentVariable (szVar, szPath);
/* check for current directory of new drive */
strcpy (szVar, "=A:");
szVar[1] = toupper (line[0]);
if (GetEnvironmentVariable (szVar, szPath, MAX_PATH) == 0)
{
/* no environment variable found */
strcpy (szPath, "A:\\");
szPath[0] = toupper (line[0]);
}
/* set new current directory */
SetCurrentDirectory (szPath);
GetCurrentDirectory (MAX_PATH, szPath);
if (szPath[0] != (char)toupper (line[0]))
debug_printf("Invalid drive\n");
return;
}
tail = line;
while ((*tail)!=' ' && (*tail)!=0)
{
tail++;
}
if ((*tail)==' ')
{
*tail = 0;
tail++;
}
cmd = line;
if (cmd==NULL || *cmd == '\0' )
{
return;
}
if (strcmp(cmd,"cd")==0)
{
ExecuteCd(tail);
return;
}
if (strcmp(cmd,"dir")==0)
{
ExecuteDir(tail);
return;
}
if (strcmp(cmd,"kill")==0)
{
ExecuteKill(tail);
return;
}
if (strcmp(cmd,"md")==0)
{
ExecuteMd(tail);
return;
}
if (strcmp(cmd,"reboot")==0)
{
ExecuteReboot(tail);
return;
}
if (strcmp(cmd,"type")==0)
{
ExecuteType(tail);
return;
}
if (strcmp(cmd,"ver")==0)
{
ExecuteVer();
return;
}
if (strcmp(cmd,"validate")==0)
{
debug_printf("Validating heap...");
if (HeapValidate(GetProcessHeap(),0,NULL))
{
debug_printf("succeeded\n");
}
else
{
debug_printf("failed\n");
}
return;
}
if (strcmp(cmd,"start") == 0)
{
ExecuteStart(tail);
return;
}
if ((strcmp(cmd,"help") * strcmp(cmd,"?")) == 0)
{
ExecuteHelp(tail);
return;
}
if (strcmp(cmd,"exit")==0)
{
if (bCanExit == TRUE)
{
ExitProcess(0);
}
return;
}
if (ExecuteProcess(cmd,tail,FALSE))
{
return;
}
debug_printf("Unknown command '%s'\n", cmd);
}
void ReadLine(char* line)
{
DWORD Result;
UCHAR CurrentDir[255];
int length = 0;
int c;
GetCurrentDirectoryA(255,CurrentDir);
debug_printf("%s>", CurrentDir);
do
{
if ( !ReadConsoleA(InputHandle, line, 255 - length, &Result, NULL) )
{
debug_printf("Failed to read from console\n");
for(;;);
}
for( c = 0; c < Result; c++ )
switch ( line[c] )
{
case '\b':
if (length > 0)
{
debug_printf("\b \b");
memmove( &line[c-1], &line[c], Result - c - 1 );
c-=2;
length--;
Result--;
}
break;
case '\n':
line[c] = 0;
debug_printf( "\n" );
return;
default:
debug_printf( "%c", line[c] );
length++;
}
line += Result;
} while (1);
}
void ParseCommandLine (void)
{
char *pszCommandLine;
pszCommandLine = GetCommandLineA ();
_strupr (pszCommandLine);
if (strstr (pszCommandLine, "/P") != NULL)
{
debug_printf("Permanent shell\n");
bCanExit = FALSE;
}
}
int main(void)
{
static char line[255];
AllocConsole();
// clear line buffered mode
if( !SetConsoleMode( GetStdHandle( STD_INPUT_HANDLE ), 0 ) )
{
debug_printf( "Error: could not set console mode, error: %d\n", GetLastError() );
return GetLastError();
}
InputHandle = GetStdHandle(STD_INPUT_HANDLE);
OutputHandle = GetStdHandle(STD_OUTPUT_HANDLE);
debug_printf("Shell Starting...\n");
ParseCommandLine ();
for(;;)
{
ReadLine(line);
ExecuteCommand(line);
}
return 0;
}
/* EOF */

View File

@@ -1 +1 @@
loaders\dos\loadros kernel\kimage.bin %1 %2 %3 %4
loadros ntoskrnl.exe ide.sys vfatfs.sys

32
reactos/bootflop.bat Normal file
View File

@@ -0,0 +1,32 @@
@ECHO OFF
:
: copy files to HD...
:
COPY /Y A:\DRIVERS\*.SYS C:\reactos\system32\drivers > NUL:
COPY /Y A:\DLLS\*.DLL C:\reactos\system32 > NUL:
COPY /Y A:\APPS\*.EXE C:\reactos\system32 > NUL:
COPY /Y A:\SUBSYS\*.EXE C:\reactos\system32 > NUL:
COPY /Y A:\SUBSYS\*.DLL C:\reactos\system32 > NUL:
:
: present a menu to the booter...
:
: ECHO 1) IDE,VFatFSD
: ECHO 2) No Drivers
: CHOICE /C:123 /T:1,3 "Select kernel boot config"
: IF ERRORLEVEL 2 GOTO :L2
:L1
CLS
LOADROS NTOSKRNL.EXE DRIVERS\IDE.SYS DRIVERS\VFATFSD.SYS
GOTO :END
:L2
CLS
LOADROS NTOSKRNL.EXE
GOTO :END
:END
EXIT

View File

@@ -1,20 +1,22 @@
DIRECTORIES
system : compiled versions of the various system components and
libraries
mkernel : microkernel source
mkernel/hal : hardware abstraction layer source
mkernel/mm : memory managment subsystem source
mkernel/iomgr : IO manager subsystem source
include : win32 headers
include/internal : kernel private header files
include/ntdll : system library private header files
include/kernel32 : system library private header files
include/user32 : user interface private header files
include/gdi32 : graphics interface private header files
include/ddk : header files for modules
lib/ntdll : NT dll source
lib/kernel32 : kernel32 source
doc : documentation
loaders/dos : DOS based loader
loaders/boot : boot loader
DIRECTORIES
system : compiled versions of the various system components and
libraries
ntoskrnl : kernel source
ntoskrnl/hal : hardware abstraction layer source
ntoskrnl/mm : memory managment subsystem source
ntoskrnl/io : IO manager subsystem source
ntoskrnl/ke : kernel source
include : win32 headers
include/internal : kernel private header files
include/ntdll : system library private header files
include/kernel32 : system library private header files
include/ddk : header files for modules
lib/ntdll : NT dll source
lib/kernel32 : kernel32 source
doc : documentation
loaders/dos : DOS based loader
loaders/boot : boot loader
services : various services (device drivers, filesystems etc)
services/dd : device drivers
services/fs : file systems

130
reactos/doc/HACKING Normal file
View File

@@ -0,0 +1,130 @@
* Introduction
Having successfully built ReactOS and been amazed by what it does, you're
now desperate to fill in some of the omissions, this document shows you how.
* Prerequisites
A working knowledge of NT driver development is useful for understanding the
kernel and some of its abstractions. The NT4 ddk is available for free
download from http://www.microsoft.com/hwdev/. The Windows 98 and Windows
2000 DDKs are also available but the NT4 one is the most useful. See
Legal Stuff below however.
There are a number of books on NT driver development, I would recommend
'Windows NT Device Driver Development' (http://www.osr.com/book/) since OSR
seem to know their stuff. There is only one book on NT filesystem
development 'Windows NT File System Internals'. Please don't buy any of
these books unless you need to, and can afford it.
These mailing lists and newsgroups are useful for NT internals related
questions,
ntfsd@atria.com, ntdev@atria.com
(subscribe by email to majordomo@atria.com)
comp.os.????
microsoft.public.????
* Style
There is no coding style used for ReactOS, however the following guidelines
make things easier
Include information at the top of a module about its purpose, contact
information for its programmer and any useful notes.
Include a comment by each non-trival function describing its arguments,
purpose and any other notes.
Update the documentation in this directory
These guidelines are an ideal, no one manages to implement them all the
time, straightforward working code is probably just as good.
* Debugging
Debugging kernel-mode code is tricky, these are some snippets
DbgPrint writes a message to the console using a printf style format
string. The DPRINT macro (defined in internal/debug.h) expands to
DbgPrint unless NDEBUG is defined, this is useful for having copious
output from a module only when a problem is being debugging. DPRINT
also prefixes the message with the file and line number to make it
easier to see where output is coming from. DbgPrint can be used at any
point including in interrupt handlers.
There are options in ntoskrnl/kd/kdebug.c for copying DbgPrint output
to a serial device or bochs logging port (parallel support should also
be added). This can be useful if a lot of output is being generated.
It should be possible to include support for debugging the kernel with
gdb over a serial line. Bochs (a shareware CPU emulator) is also useful
for debugging the kernel, I wrote some patches to allow capture of console
output from within bochs to file and for debugging a kernel running
under bochs with gdb. Contact me (welch@cwcom.net) if you're are
interested.
If CPU reports an exception not handled by the kernel (any page fault
not part of virtual memory support or any other exception) the kernel
will display output like this and halt
General Protection Fault Exception: 13(0)
CS:EIP xxxxxxxx:xxxxxxx
DS xxxx ES xxxx FS xxxx GS xxxxx
EAX: xxxx EBX: xxxx
....
EDI: xxxx EFLAGS: xxxx ESP: xxxx
cr2: xxxx
Stack: xxxx xxxx xxxx ...
....
Frames: xxxx xxxx xxxx ...
....
The fault type will usually be either 'General Protection' or
'Page Fault', see your Intel manual for the more exotic types. The
'EIP' number is the address of the faulting instruction. If the 'CS'
number is 0x20 then the exception occured in kernel mode, if it is 0x11
then the exception occurred in user mode. 'cr2' is the address that the
faulting instruction was trying to access, if the exception was a page
fault. The number printed after 'Frames' are any addresses on the stack
that look like function addresses.
If the kernel detects a serious problem that it will bug check, displaying
output like this
Bug detected (code x, param x x x x)
Frames: xxx xxxx xxxx
....
Again the numbers printed after 'Frames' are any addresses on the stack
that look like function addresss. Usually the kernel will also print a
message describing the problem in more detail, the bug check code isn't
very useful at the moment.
* Contacts
There is a mailing list for kernel development,
ros-kernel@reactos.com
The main developers use a cvs account to coordinate changes, ask
rex (rex@lvcablemodem.com) for an account if you are going to be adding
a lot of code. Smaller patches can go to the mailing list or to the
relevant developer (usually the comment at the top of a module will have
an email address). Regular snapshots are made available for download,
see the mailing list for announcements.
* Legal stuff
The ReactOS project is GPL'ed, please make sure any code submitted is
compatible with this.
The NT4 ddk license agreement allows its usage for developing nt drivers
only. Legally therefore it can not be used to develop ReactOS, neither the
documentation or the sample code. I'm not a lawyer, but I doubt the
effiacy of 'shrinkwrap licenses' particularly on freely downloadable
software. The only precendent I know of, in a Scottish court, didn't
upload this type of license.
Also the 'fair use' section of copyright law allows the 'quoting' of small
sections from copyrighted documents, e.g. Windows API or DDK documentation

6
reactos/doc/INDEX Normal file
View File

@@ -0,0 +1,6 @@
HACKING: Some notes for adding code to ReactOS
DIRS: Explanation of directory layout
INTERNALS: Some notes on kernel internals
TODO: Bugs and omissions, big and little things that need to be done
NOTES: Unsorted material, some of it is redundant
BUGLIST: Known bugs, please update when you find one

43
reactos/doc/INTERNALS Normal file
View File

@@ -0,0 +1,43 @@
A collection of articles on kernel internals, please add to this
------------------------------------------------------------------------------
IRQ level
------------------------------------------------------------------------------
IRQ level (IRQL) is a per-processor state in ReactOS used to coordinate
execution between ISRs and between threads. There are several levels
PASSIVE_LEVEL, APC_LEVEL: The normal level for user mode and most
kernel mode code. At the moment APC_LEVEL is unused.
DISPATCH_LEVEL: At this level all irqs are still allowed but thread
rescheduling on the current processor is disabled. This is used by
the spinlock synchronization primitive to implement its uniprocessor
semantics (multiprocessor is more complex). It is also used for some
other forms of synchronization, DPCs for example. Many APIs are
unavailable at this IRQL, usually those that might have to wait. It
is recommended that you don't spend too much time at this IRQL
otherwise system responsiveness will be reduced.
> DISPATCH_LEVEL: Each irq is assigned a priority (which will be
greater than DISPATCH_LEVEL). At an irq's priority level that irq,
lower priority irqs and thread rescheduling are disabled. Higher
priority irqs can still run. Very few APIs are available at IRQLs
greater than DISPATCH_LEVEL.
HIGH_LEVEL: All irqs are disabled.
-------------------------------------------------------------------------------
DPCs
-------------------------------------------------------------------------------
It is a design goal not to spend too much time in ISRs, for this reason
ISRs should postpone most processing till it can run at a lower IRQL. The
mechanism for this is a Delayed Procedure Call (DPC). When a DPC object is
created, it is associated with a function. The DPC object can then be inserted
in the DPC queue from an ISR. If the IRQL on return from the ISR is less than
DISPATCH_LEVEL the DPC queue will be drained, otherwise this will happen when
the IRQL level drops below DISPATCH_LEVEL or the processor becomes idle. When
the DPC queue is drained each DPC object is removed and the associated
function is called at DISPATCH_LEVEL. A DPC object can only be inserted once,
further insertions before it is removed will have no effect.

36
reactos/doc/apc Normal file
View File

@@ -0,0 +1,36 @@
APC
Asynchronous procedure call
An APC is a Kernel-defined control object representing a procedure
that is called asynchronously. APCs are thread-context dependent; that
is, they are queued to a particular thread for execution.
There are three different kinds of APCs in NT:
User APCs are used by certain asynchronous NT system services to allow
user-mode applications or protected subsystems to synchronize the
execution of a thread with the completion of an operation or the
occurrence of an event such as a timers expiration. User APCs are, by
default, disabled. That is, they are queued to the user-mode thread,
but they are not executed except at well-defined points in the
program. Specifically, they can only be executed when an application
or protected subsystem has called a wait service and has enabled
alerts to occur, or if it has called the test-alert service.
Kernel APCs are normal kernel-mode APCs. They are much like a normal
user APC except that they are executable by default. That is, they are
enabled except when the thread is already executing a Kernel APC.
(Note that a special Kernel APC always preempts these.)
Special Kernel APCs cannot be blocked except by running at a raised
IRQL. They are executed at APC_LEVEL IRQL (see IDT), in kernel mode.
These types of APCs are used by the system to force a thread to
execute a procedure in the threads context. An example of this is I/O
completion: the I/O Manager needs to get back into the context of the
original requestor of the I/O operation so that it can copy buffers,
and so forth. In order to do this, the I/O Manager must be able to
access the virtual address space of the thread/process, and the most
efficient way to complete the operation is to be in the calling
threads context.

View File

@@ -1,140 +0,0 @@
This file attempts to document the functions made publically available by
the various subsystems.
* Formatted I/O operations *
NAME: int vsprintf(char *buf, const char *fmt, va_list args)
NAME: int sprintf(char* buf, const char* fmt, ...)
WHERE: internal/kernel.h
FUNCTION: The same as the standard c library versions
* PIO operations *
NAME: in[b/w/l](port)
WHERE: internal/io.h
FUNCTION: Read an IO port of the specified size (byte/word or long)
RETURNS: The value read
NAME: out[b/w/l](port,val)
WHERE: internal/io.h
FUNCTION: Write an IO port of the specified size (byte/word or long)
NAME: in_p[b/w/l](port)
WHERE: internal/io.h
FUNCTION: Read an IO port of the specified size (byte/word or long) with
a pause
RETURNS: The value read
NAME: out_p[b/w/l](port,val)
WHERE: internal/io.h
FUNCTION: Write an IO port of the specified size (byte/word or long) with
a pause
* Bit operations *
NAME: int set_bit(int nr, void* addr)
NAME: int clear_bit(int nr, void* addr)
NAME: int change_bit(int nr, void* addr)
WHERE: internal/bitops.h>
FUNCTION: Operate on a bit in the word pointed to by addr
RETURN: 0 if the bit was cleared before the operations
non-zero otherwise
* Debugging functions *
NAME: DPRINT(fmt,....)
WHERE: internal/debug.h
FUNCTION: Outputs a string to the console if NDEBUG isn't defined before
including internal/debug.h, a NOP otherwise
ARGUMENTS: The same as printf
NAME: printk
WHERE: internal/kernel.h
FUNCTION: Outputs a string to the console
ARGUMENTS: The same as printf
* Memory managment functions *
NAME: unsigned int physical_to_linear(unsigned int paddr)
WHERE: hal/page.h
FUNCTION: Converts a physical address to a linear one
RECEIVES:
paddr = the physical address to convert
RETURNS: A virtual address where the memory at that physical address can be
accessed
NAME: void* ExAllocatePool(unsigned int size, unsigned int type = 0);
WHERE: internal/pool.h
FUNCTION: Allocates a block of memory
RECEIVES:
size = the size of the block to allocate
type = will be whether to allocate pagable memory
RETURNS: The address of the block
NOTE: This isn't interrupt safe
NAME: void ExFreePool(void* block)
WHERE: internal/pool.h
FUNCTION: Frees a block of memory
NAME: void free_page(unsigned int physical_base, unsigned int nr = 1)
WHERE: internal/mm.h
FUNCTION: Adds a continuous range of physical memory to the free list
NAME: unsigned int get_free_page(void)
WHERE: internal/mm.h
FUNCTION: Gets a free page
RETURNS: Its physical address
NAME: unsigned int get_page_physical_address(unsigned int vaddr)
WHERE: internal/mm.h
FUNCTION: Gets the physical address of a page
NAME: void mark_page_not_writable(unsigned int vaddr)
WHERE: internal/mm.h
FUNCTION: Prevent writing the page
* DMA functions *
NAME: unsigned int get_dma_page(unsigned int max_address)
WHERE: internal/mm.h
FUNCTION: Gets a page with a restricted physical address i.e. suitable for
dma
RETURNS: The physical address of the page
NAME: void disable_dma(unsigned int dmanr)
WHERE: internal/dma.h
FUNCTION: Disables the specified dma channel
NAME: void enable_dma(unsigned int dmanr)
WHERE: internal/dma.h
FUNCTION: Enables the specified dma channel
NAME: void clear_dma_ff(unsigned int dmanr)
WHERE: internal/dma.h
FUNCTION: Clear the dma flip-flop
NAME: void set_dma_mode(unsigned int dmanr, char mode)
WHERE: internal/dma.h
FUNCTION: Sets the type of dma transfer
NAME: void set_dma_page(unsigned int dmanr, char pagenr)
WHERE: internal/dma.h
FUNCTION: Set only the page register bits of the transfer address
NAME: void set_dma_addr(unsigned int dmanr, unsigned int a)
WHERE: internal/dma.h
FUNCTION: Set the transfer address for dma
NOTE: Assumes flip-flop is clear
NAME: void set_dma_count(unsigned int dmanr, unsigned int count)
WHERE: internal/dma.h
FUNCTION: Sets the size of the transfer
ARGUMENTS:
count = the number of bytes to transfer
NOTE: Count must be even for channels 5-7
NAME: int get_dma_residue(unsigned int dmanr)
WHERE: internal/dma.h
FUNCTION: Gets the residue remaining after a dma transfer on the channel

View File

@@ -1,2 +0,0 @@
* Kernel bugs not fixed

View File

@@ -1,114 +0,0 @@
Kernel Development FAQ (for v0.0.7)
This attempts to answer some of the common questions people developing for
the kernel might want to ask (or at least what I think they should ask).
Obviously I can only detail those parts which I have written so other
developers please fill in the gaps.
Q: What is this, what are you people, what's going on
A: This is the ReactOS, an operating system intended as a clone of windows
NT. See the project website (http://www.sid-dis.com/reactos/) for more details.
Q: Why ReactOS
A: To condemn Bill Gates to penury.
Q: What do I need to compile the kernel
A: DJGPP, get it from http://www.delorie.com/djgpp
Q: How do I compile the kernel
A: Unpack the zip. It is important not to install the kernel in the same
directory as a previous version, this has caused a bit of confusion in the
past. Edit the makefile in the top level directory, in particular select the
correct host to build from. Then run make in the top directory
Q: What files are created when I make the kernel
A: The following files are created in the kernel directory
kimage = the kernel as a coff executable
kimage.bin = the kernel as a raw binary image
kernel.sym = a list of the kernel symbols
Q: How do I load the kernel
A: Run the boot.bat batch file.
Q: Does it boot from disk
A: Not at the moment.
Q: When I run the kernel it crashes
A: The kernel (at the moment) can only be loaded from a clean system. That
is one without EMM386 or any version of windows loaded. A quick way to
ensure this (if you have windows 95) is to set the program to run in msdos
mode and specify an empty config.sys and autoexec.bat. See the windows help
for more information.
If you do that and the problem persists then contact the kernel team
(ros-kernel@sid-dis.com) as it is probably a bug in the kernel
Q6: How do I load a module with the kernel
A: Add the names of any modules to be loaded to the command line of boot.bat.
Q7: I want to add code to the kernel, how do I get it to be compiled
A: You will need to edit the Makefile in kernel directory. There should be
a statement like this
OBJECTS = hal/head.o hal/exp.o kernel/vsprintf.o \
....
kernel/irqhand.o hal/page.o mm/virtual.o kernel/error.o \
kernel/exports.o kernel/module.o
Add the name of the object file (the file produced when your code is
compiled) to the end of the statement (in this case after kernel/module.o).
If you need to go onto a new line then add a slash to the end of the
previous line. It is also very important to use an editor which preserves
tabs.
Q8: I want to add code to the kernel, how do I make it official
A: Contact the kernel mailing list ros-kernel@sid-dis.com or our coordinator
dwinkley@whitworth.edu. If it is for a specific section then the kernel
website (http://www.geocities.com/SiliconValley/Peaks/1957) has a list of
those working on individual areas, you might what to contact one of them
instead.
Q9: What header files should I use
A: Don't include the usual DJGPP headers like stdio.h unless you are using
something compiler based like stdargs.h. To use the DJGPP headers requires
linking with libc which is useless in kernel mode.
All the header files are in the top-level include directory which is laid
out like this
include = general win32 api declarations
include/internal = private kernel headers
include/internal/hal = HAL headers
include/ddk = header files with declarations for modules
There should be a file called api.txt which documents all of the functions
(and which header files they need).
Q11: I want to export my function for modules to use, how do I do that
A: Add the function to the list in kernel/exports.lst, then remake the
kernel. Note the function must be declared as extern "C".
Q12: I want to make my functions part of the kernel interface to user mode,
A: That section isn't finished yet, though it will probably mean adding a
pointer to the function and the size of its parameters to a internal table
somewhere.
Q14: I want to write a module, what are the guidelines
A: See modules.txt in this directory
Q15: I want to write an ISR (interrupt service routine)
A: See irq.txt in this directory
Q16: I want to use DMA
A: Firstly this answer covers only DMA via the dma chips *not*
busmaster DMA.
To program the dma chip use the functions in internal/dma.h (look in api.txt
for details). PC DMA can only go to memory with a physical address below
1mb (or 16mb on some systems), use the get_dma_page to allocate this kind
of memory.
Q17: You haven't answered my question
A: Send your questions to ros-kernel@sid-dis.com
- David Welch (welch@mcmail.com)

View File

@@ -1,10 +0,0 @@
This document describes the implementation of the memory managment
* ReactOS memory map
0x00000000 - 0xc0000000 = User memory
0xc0000000 - 0xd0000000 = Kernel memory
0xd0000000 - 0xffffffff = Identify map of physical memory
*

File diff suppressed because it is too large Load Diff

View File

@@ -1,2 +0,0 @@
This contains documentation describing the internals of the various kernel
subsystems and a few other useful bits of information.

View File

@@ -1,135 +0,0 @@
** Introduction
This attempts to document the ReactOS irq handling. As of v0.0.8 this has
changed to be more nt like, I will attempt to summarize the new
implementation for those unavailable with nt device driver writing. Note,
ReactOS doesn't have an exact implementation but the omissions are, except
where noted, not user visible.
** Steps in grabbing an irq vector
* Call HalConnectInterrupt
PROTOTYPE:
ULONG HalGetInterruptVector(INTERFACE_TYPE InterfaceType,
ULONG BusNumber,
ULONG BusInterruptLevel,
ULONG BusInterruptVector,
OUT PKIRQL Irql,
OUT PKAFFINITY Affinity)
PURPOSE:
Translates a bus dependant interrupt vector to a system vector
ARGUMENTS:
InterfaceType = Type of bus to which the device to receive interrupts
from is connected to. Currently only 'Internal' is
recognized
BusNumber = Number of the bus the device is connected to
(currently ignored)
BusInterruptLevel = Bus specific interrupt level (currently ignored)
BusInterruptVector = Bus specific vector. Currently this is the same
as the normal vector (09 is the keyboard vector
for example)
Irql = On return contains the DIRQL for the vector
Affinity = On return contains the affinity mask for the vector
(currently unimplemented)
RETURNS:
The system mapped vector
* Call IoConnectInterrupt
PROTOTYPE:
NTSTATUS IoConnectInterrupt(OUT PKINTERRUPT* InterruptObject,
PKSERVICE_ROUTINE ServiceRoutine,
PVOID ServiceContext,
PKSPIN_LOCK SpinLock,
ULONG Vector,
KIRQL Irql,
KIRQL SynchronizeIrql,
KINTERRUPT_MODE InterruptMode,
BOOLEAN ShareVector,
KAFFINITY ProcessorEnableMask,
BOOLEAN FloatingSave)
PURPOSE:
Connect a service routine to an interrupt vector
ARGUMENTS:
InterruptObject = Points to an object describes the interrupt on
return
ServiceRoutine = Function to be called when the device interrupts
ServiceContext = Parameters to be passed to the service routine
SpinLock = Should be NULL
Vector = System mapped vector returned from HalGetInterruptVector
Irql = DIRQL returned from HalGetInterruptVector
SynchronizeIrql = Should be the same as Irql
InterruptMode = Device interrupt type (currently ignored)
ShareVector = True if the interrupt vector can shared
ProcessorEnableMask = Currently ignored
FloatingSave = Should be false
RETURNS: Status
* Sample code for snarfing an interrupt vector
void grab_my_irq()
{
ULONG MappedIrq;
KIRQL Dirql;
KAFFINITY Affinity;
PKINTERRUPT IrqObject;
MappedIrq = HalGetInterruptVector(Internal,
0,
0,
MY_VECTOR,
&Dirql,
&Affinity);
IoConnectInterrupt(&IrqObject,
my_irq_service_routine,
my_context,
NULL,
MappedIrq,
Dirql,
Dirql,
0,
FALSE, // Not sharable
Affinity,
FALSE);
}
** Designing an interrupt service routine
An interrupt service routine should have the following prototype
BOOLEAN my_irq_service_routine(PKINTERRUPT Interrupt,
PVOID ServiceContext);
ARGUMENTS:
Interrupt = The same as the object returned from the
IoConnectInterrupt
ServiceContext = A user defined parameters
(passed to IoConnectInterrupt)
RETURNS:
True if it handled the interrupt, false if it should be passed onto
other devices sharing the same vector
NOTES:
While an isr is executing all devices of a lower or equal priority
can't interrupt. For this reason it is important that an isr
should complete in a short an interval as possible. The set of
routines an isr can call is also restricted.

View File

@@ -1,21 +0,0 @@
This document describes the state of a uniprocessor PC at each of the IRQ
levels supported by the ReactOS kernel
PASSIVE_LEVEL: IF bit clear in the processor flags
All irqs umasked at the PIC
APC_LEVEL: Unknown
WAKE_LEVEL: Unknown
DISPATCH_LEVEL: IF bit clear in the processor flags
All irqs umasked at the PIC
Thread dispatching disabled
DIRQL (Device specific IRQ level):
IF bit clear in the processor flags
Device's irq and all lower priority irqs masked at the PIC
Thread dispatching disabled
HIGH_LEVEL: IF bit set in the processor flags
All irqs masked at the PIC
Thread dispatching disabled

View File

@@ -1,33 +0,0 @@
** Introduction
This is (an incomplete) guide to writing device drivers (and other kernel
extensions) for ReactOS.
** Setting up the build environment
Create a new subdirectory in the modules directory and copy one of the
existing module makefiles into it. Customize the makefile to compile the
source files for the module. Note: generally it is not necessary to specify
the compiler or compiler flags to use.
** Initializing a module
On loading the kernel will call the module function
PROTOTYPE:
NTSTATUS ModuleEntry(PDRIVER_OBJECT DriverObject,
PUNICODE_STRING RegistryPath)
PURPOSE:
Initializing the module
ARGUMENTS:
DriverObject = Pointer to an object describing the driver
RegistryPath = Currently NULL
RETURNS:
STATUS_SUCCESS = If the module initialized successfully

696
reactos/doc/notes Normal file
View File

@@ -0,0 +1,696 @@
*** This file contains messages I've culled off the net as well
as previous discussions all of which have useful info on fixes
that need to be added to ReactOS. messages are between five
dashes on a line by themselves. If you implement the fix
reffered to in a message, feel free to delete it from the file.
Rex ***
-----
Subject: [ros-kernel] Inside the Boot Process
Date: Mon, 22 Mar 1999 22:05:47 +0100
From: Emanuele Aliberti <ea@iol.it>
For those working on the boot loader: in WinNt Magazine november 1998
issue (http://www.winntmag.com/) there is a detailed description, by
Mark Russinovich, of the r<>le the MBR, NTLDR, boot.ini, ntdetect.com...
play in the boot process ("Inside the Boot Process, Part 1").
-----
Yes with DPCs, KeDrainDpcQueue should go to HIGH_LEVEL because
it needs to synchronize with KeInsertDpcQueue. Also the idle thread
should run at DISPATCH_LEVEL and regularly drain the dpc queue, that
way if an irq happens and the dpc can't be executed immediately it
will be executed as soon as the processor is idle rather than
waiting for the next timer tick
-----
About the console driver, I think it might be quite useful to have a simple
way for apps to print to the screen for debugging. But when the kernel is more
stable, console handling should be moved to user level because console printing
needs to know about windows and so on which can only be done at user level.
-----
Subject: Re: IMSAMP-how to avoid rebooting?
Date: 9 Nov 1998 00:40:32 -0000
From: Charles Bryant <n51190709.ch@chch.demon.co.uk>
Newsgroups: comp.os.ms-windows.programmer.nt.kernel-mode
References: 1, 2 , 3 , 4
In article <un264wzle.fsf@xxx.yyy.zzz>, David C. <qqqq@xxx.yyy.zzz> wrote:
>The reason it won't unload when something is bound to it is the same
>reason you can't unload any other driver that has an open client. If
>you install any driver, and have a user program (or another driver) open
>a handle to it, and then give the "net stop" command to unload it,
>you'll find that the unload will be delayed until the user program
>closes its handle.
When developing a driver I found this to be a considerable nuisance.
Frequently a bug would leave an IRP stuck in the driver and I
couldn't unload and reload a fixed version. While reading NTDDK.H I
found a suspicious constant and discovered that the Flags field in
the device (the one which you OR in DO_BUFFERED_IO or DO_DIRECT_IO)
has a bit called DO_UNLOAD_PENDING. By experiment I confirmed that
this bit is set when you do 'net stop', so a driver can check it
periodically (e.g. from a timer DPC every ten seconds) and cancel all
queued IRPs if it is found to be set.
Since this is not documented anywhere that I can find, it might be
unwise to rely on it for production code, but it is very useful for
debugging. Maybe someone with internals knowledge can comment on the
reliability of it.
-----
Subject: Re: Kernel bugs
Date: Fri, 23 Oct 1998 12:08:36 -0700
From: rex <rex@lvcablemodem.com>
To: Jason Filby <jasonfilby@yahoo.com>
References: 1
Jason Filby wrote:
> Hi,
>
> Ok -- here's most of what I get when I press a key:
>
> Page fault detected at address 1fd4 with eip c042f794
> Recursive page fault detected
> Exception 14(2)
> CS:EIP 20:c042f794
>
> Rex -- do you know of anyway to find out which function in what file
> is causing the exception? I know that for problems in the kernel, you
> just look in the ntoskrnl\kernel.sym file and find the EIP value which
> matches the one given in the exception debug text. But what about
> modules? How can we track exceptions that occur in functions in modules?
>
I know this is a little belated, but I thought I'd take astab at answering
this anyway. add an option to the
makefile for the module to generate a listing file with
symbol information. Then, on a boot test, note the
address that the module is loaded at, and subtract
this from the EIP value. add any offset used in the
module link specification (I dont think there currently
is one), and look for the last symbol with a lower
address offset.
Brian, I have an idea on how to make this exception
dump information a little more useful. We should
have the load information for the load modules
in memory somewhere. Perhaps the exception
dump could check offending addresses to see if
they lie in the kernel or in a module, and if they
lie in a module the proper offset could be subtracted
and this number could be displayed seperately. If
I get a chance today, I'll make this change and send
it to ya.
Rex.
-----
Subject: [ros-kernel] Pet peeve of the week
Resent-Date: Sun, 25 Oct 1998 11:57:40 -0600
Resent-From: ros-kernel@sid-dis.com
Date: Sun, 25 Oct 1998 09:53:48 -0800
From: rex <rex@lvcablemodem.com>
Reply-To: <ros-kernel@sid-dis.com>
To: ReactOS Kernel Forum <ros-kernel@sid-dis.com>
Hi all,
I guess it's about time to start another mailstorm
on the list. :)
I have a suggestion for a change to the kernel.
It not a very big change, and I hope everyone
will agree that it makes sense.
There is a structure used in many places in the
kernel called LARGE_INTEGER. the is also
a version called ULARGE_INTEGER, but it
is not used at all as far as I can tell. this structure
is equivalent to a long long int. You can literally
cast a pointer to a LARGE_INTEGER to a
long long int and all manipulation will work
seemlessly. My suggestion is that we replace the
use of this structure with long long ints. Even
microsoft, in their infinite wisdom, has made this
suggestion in the DDK documentation. If you're
wondering where, look at the RTL functions
that manipulate LARGE_INTEGER structs.
Replacing LI's with long long ints will work
because they are binary compatable. All software
compiled to use LI's will manipulate long long ints
correctly and vice versa. There is one problem
with this suggestion: the LARGE_INTEGER type
is a structure containing 2 members. Any code
that accesses the structure by members will break.
I think the kernel side impact is minimal, and is
worth the change. However, the structure is used
in several of the Win32 API functions, and needs
to remain there. I think we build a conditionally
compiled version of the LARGE_INTEGER type.
In kernel mode code (the kernel proper and drivers)
the LARGE INTEGER will be the following:
typedef long long int LARGE_INTEGER,
*PLARGE_INTEGER;
typedef unsigned long long int ULARGE_INTEGER,
*PULARGE_INTEGER;
and in user mode code it will expand out to the
current definition (which by the way, is not
strictly correct, but can't be because it uses a
MS compiler extension).
Brian, I would be willing to make the conversion
to those kernel modules that needed it, and of
course to the IDE driver if we want to go forward
with the change.
Lastly, I'll mention what made me consider this.
I was fixing the timer routines, and two of the
three problems turned out to be related to LI
conversion problems.
Rex.
-----
Subject: Re: [ros-kernel] Pet peeve of the week
Date: Thu, 29 Oct 1998 19:10:37 +0100
From: Boudewijn <ariadne@xs4all.nl>
To: rex@lvcablemodem.com
References: 1
Hai Rex
I think it is a good idea to wrap a makro around the member access
to large integers.
I haven't tested this, but do you think this is a good sugestion ?
#ifdef COMPILER_LARGE_INTEGERS
#define GET_LARGE_INTEGER_HIGH_PART(LargeInteger) ( ( LargeInteger >>
32) )
#define GET_LARGE_INTEGER_LOW_PART(LargeInteger) ( (LargeInteger &
0xFFFFFFFF) )
#define SET_LARGE_INTEGER_HIGH_PART(LargeInteger,Signed_Long) (
LargeInteger |= ( ((LARGE_INTEGER)Signed_Long) << 32 ) )
#define SET_LARGE_INTEGER_LOW_PART(LargeInteger,Unsigned_Long) (
LargeInteger |= Unsigned_Long )
#else
#define GET_LARGE_INTEGER_HIGH_PART(LargeInteger) ( (
LargeInteger.HighPart) )
#define GET_LARGE_INTEGER_LOW_PART(LargeInteger) (
(LargeInteger.LowPart) )
#define SET_LARGE_INTEGER_HIGH_PART(LargeInteger,Signed_Long) (
LargeInteger.HighPart= Signed_Long )
#define SET_LARGE_INTEGER_LOW_PART(LargeInteger,Unsigned_Long) (
LargeInteger.LowPart = Unsigned_Long )
#endif
Boudewijn
-----
Subject: Re: Question on "Sending buffers on the stack to asynchronous DeviceIoControl with buffered I/O"
Date: Mon, 16 Nov 1998 11:24:57 -0800
From: "-Paul" <paulsan@microsoftSPAM.com>
Organization: Microsoft Corp.
Newsgroups: microsoft.public.win32.programmer.kernel, comp.os.ms-windows.programmer.nt.kernel-mode
References: 1
Radu, I post the following information occassionally for questions such as
yours. I hope it helps.
-Paul
Here is an explanation of buffers and DeviceIoControl.
First, here are the parameters,
BOOL DeviceIoControl(
HANDLE hDevice, // handle to device of interest
DWORD dwIoControlCode, // control code of operation to perform
LPVOID lpInBuffer, // pointer to buffer to supply input data
DWORD nInBufferSize, // size of input buffer
LPVOID lpOutBuffer, // pointer to buffer to receive output data
DWORD nOutBufferSize, // size of output buffer
LPDWORD lpBytesReturned, // pointer to variable to receive output byte
count
LPOVERLAPPED lpOverlapped // pointer to overlapped structure for
asynchronous operation
);
METHOD_BUFFERED
user-mode perspective
lpInBuffer - optional, contains data that is written to the driver
lpOutBuffer - optional, contains data that is read from the driver after
the call has completed
lpInBuffer and lpOutBuffer can be two buffers or a single shared buffer.
If a shared buffer, lpInBuffer is overwritten by lpOutBuffer.
I/O Manager perspective
examines nInBufferSize and nOutBufferSize. Allocates memory from non-paged
pool and puts the address of this pool in Irp->AssociatedIrp.SystemBuffer.
The size of this buffer is equal to the size of the larger of the two
bufferes. This buffer is accessible at any IRQL.
copies nInBufferSize to irpSp->Parameters.DeviceIoControl.InputBufferLength
copies nOutBufferSize to
irpSp->Parameters.DeviceIoControl.OutputBufferLength
copies contents of lpInBuffer to SystemBuffer allocated above
calls your driver
Device Driver perspective
you have one buffer, Irp->AssociatedIrp.SystemBuffer. You read input data
from this buffer and you write output data to the same buffer, overwriting
the input data.
Before calling IoCompleteRequest, you must
- set IoStatus.Status to an approriate NtStatus
- if IoStatus.Status == STATUS_SUCCESS
set IoStatus.Information to the
number of bytes you want copied
from the SystemBuffer back into
lpOutBuffer.
I/O Manager Completion Routine perspective
looks at IoStatus block, if IoStatus.Status = STATUS_SUCCESS, copies the
number of bytes specified by IoStatus.Information from
Irp->AssociatedIrp.SystemBuffer into lpOutBuffer
completes the request
METHOD_IN_DIRECT
user-mode perspective
lpInBuffer - optional, contains data that is written to the driver. This
buffer is used in the exact same fashion as METHOD_BUFFERED. To avoid
confusion, mentally rename this buffer to lpControlBuffer. This is
typically a small, optional buffer that might contain a control structure
with useful information for the device driver. This buffer is smal and is
double buffered.
lpOutBuffer - NOT OPTIONAL, This LARGE buffer contains data that is read by
the driver. To avoid confusion, mentally rename this buffer to
lpDataTransferBuffer. This is physically the same buffer that the device
driver will read from. There is no double buffering. Technically, this
buffer is still optional, but since you are using this buffering method,
what would be the point???
I/O Manager perspective
If lpInBuffer exists, allocates memory from non-paged pool and puts the
address of this pool in Irp->AssociatedIrp.SystemBuffer. This buffer is
accessible at any IRQL.
copies nInBufferSize to irpSp->Parameters.DeviceIoControl.InputBufferLength
copies nOutBufferSize to
irpSp->Parameters.DeviceIoControl.OutputBufferLength
copies contents of lpInBuffer to SystemBuffer allocated above
So far this is completely identical to METHOD_BUFFERED. Most likely
lpInBuffer (mentally renamed to lpControlBuffer) is very small in size.
For lpOutBuffer (mentally renamed to lpDataTransferBuffer), an MDL is
allocated. lpOutBuffer is probed and locked into memory. Then, the user
buffer virtual addresses are checked to be sure they are readable in the
caller's access mode.
The MDL is address is stored in Irp->MdlAddress.
Your driver is called.
Device Driver perspective
The device driver can read the copy of lpOutBuffer via
Irp->AssociatedIrp.SystemBuffer. Anything written by the device driver to
this buffer is lost. The I/O Manager does not copy any data back to the
user-mode buffers as it did in the completion routine for METHOD_BUFFERED.
Art Baker's book is wrong in this respect (page 168, "data going from the
driver back to the caller is passed through an intermediate system-space
buffer" and page 177, "When the IOCTL IRP is completed, the contents of the
system buffer will be copied back into the callers original output buffer".
The device driver accesses the Win32 buffer directly via Irp->MdlAddress.
The driver uses whatever Mdl API's to read the buffer. Usually, this
buffer is to be written to some mass storage media or some similar
operation. Since this is a large data transfer, assume a completion
routine is required.
mark the Irp pending
queue it
return status pending
Device Driver Completion Routine perspective
standard completion routine operations
set IoStatus.Status to an approriate NtStatus
IoStatus.Information is not needed
completete the request
I/O Manager Completion Routine perspective
standard I/O Manager completion routine operations
unmap the pages
deallocate the Mdl
complete the request
METHOD_OUT_DIRECT
user-mode perspective
lpInBuffer - optional, contains data that is written to the driver. This
buffer is used in the exact same fashion as METHOD_BUFFERED. To avoid
confusion, mentally rename this buffer to lpControlBuffer. This is
typically a small, optional buffer that might contain a control structure
with useful information for the device driver. This buffer is smal and is
double buffered.
lpOutBuffer - NOT OPTIONAL, This LARGE buffer contains data that is written
by the driver and read by the wer-mode application when the request is
completed. To avoid confusion, mentally rename this buffer to
lpDataTransferBuffer. This is physically the same buffer that the device
driver will write to. There is no double buffering. Technically, this
buffer is still optional, but since you are using this buffering method,
what would be the point???
I/O Manager perspective
If lpInBuffer exists, allocates memory from non-paged pool and puts the
address of this pool in Irp->AssociatedIrp.SystemBuffer. This buffer is
accessible at any IRQL.
copies nInBufferSize to irpSp->Parameters.DeviceIoControl.InputBufferLength
copies nOutBufferSize to
irpSp->Parameters.DeviceIoControl.OutputBufferLength
copies contents of lpInBuffer to SystemBuffer allocated above
So far this is completely identical to METHOD_BUFFERED. Most likely
lpInBuffer (mentally renamed to lpControlBuffer) is very small in size.
For lpOutBuffer (mentally renamed to lpDataTransferBuffer), an MDL is
allocated. lpOutBuffer is probed and locked into memory. Then the user
buffer's addresses are checked to make sure the caller could write to them
in the caller's access mode.
The MDL is address is stored in Irp->MdlAddress.
Your driver is called.
Device Driver perspective
The device driver can read the copy of lpOutBuffer via
Irp->AssociatedIrp.SystemBuffer. Anything written by the device driver to
this buffer is lost.
The device driver accesses the Win32 buffer directly via Irp->MdlAddress.
The driver uses whatever Mdl API's to write data to the buffer. Usually,
this buffer is to be read from some mass storage media or some similar
operation. Since this is a large data transfer, assume a completion
routine is required.
mark the Irp pending
queue it
return status pending
Device Driver Completion Routine perspective
standard completion routine operations
set IoStatus.Status to an approriate NtStatus
IoStatus.Information is not needed
completete the request
I/O Manager Completion Routine perspective
standard I/O Manager completion routine operations
unmap the pages
deallocate the Mdl
complete the request
METHOD_NEITHER
I/O Manager perspective
Irp->UserBuffer = lpOutputBuffer;
IrpSp->Parameters.DeviceIoControl.Type3InputBuffer = lpInputBuffer;
No comments here. Don't use METHOD_DIRECT unless you know what you are
doing. Simple rule.
If your IOCtl involves no data transfer buffers, then METHOD_NEITHER is the
fastest path through the I/O Manager that involves an Irp.
Final Comment
Don't touch Irp->UserBuffer. This is a bookmark for the I/O Manager. Two
major problems can occur. 1 - page fault at high IRQL, or 2 - you write
something to Irp->UserBuffer and the I/O Manager overwrites you in its
completion routine. File systems access Irp->UserBuffer, but FSD writers
know all of the above and know when it is safe to touch Irp->UserBuffer.
Radu Woinaroski wrote in message <364F8F6E.2434B010@scitec.com.au>...
>Hello,
>
>I have a kernel-mode device driver that accepts a number of IoControl
>commands that use buffered data transfer (METHOD_BUFFERED).
>
>A user mode API provides a higher level access then the DeviceIoControl
>function.
>
>The function is implemented like that
>
>BOOL
Something(
> HANDLE hDevice ,
> int param1,
> int param2,
> DWORD * pReturn,
> LPOVERLAPPED pOverlapped)
>{
> // here a data buffer on the stack sent to asynchronous DeviceIoControl
>call
> int aDataIn[2];
> aDataIn[0] = param1;
> aDataIn[1] = param2;
>
> return DeviceIoControl(
> hDevice,
> DO_SOMETHING_IO,
> aDataIn,
> sizeof(int)*2,
> pReturn,
> sizeof(DWORD),
> pOverlapped);
>}
>
>The aDataIn buffer will not exist after DeviceIoControl returns (and
>when the I/O operation terminates). I know that for buffered IO the
>input data buffer is copyed by de IOManager to a nonpaged-pool area
>before passing the request to driver dispatch routine (DeviceControl).
>At the point of calling the dispatch routine (DeviceControl) the driver
>runs in the context of the calling thread so DeviceIoControl hasn't
>returned yet (?? or so I think) so aDataI
n will still be valid at the
>time IOManager copyes it to its buffer. So, this apears to work ok (at
>least in my opinion).
>
>Does I/O Manager use the Input buffer from the call to the Win32
>DeviceIoControl any where else after the first copy ?
>
>Is there any reason why this approach (passing a buffer on the stack to
>a asynchronous DeviceIoControl that uses buffered I/O) wouldn't work ?
>
>Allocating buffers from heap and deleting them on IO completion while
>managing asynchronous IO seems too much work ;-) .
>
>Thanks in advance for your opinions
>Radu W.
>
>--
>Radu Woinaroski
>Scitec
>Sydney, Australia
>Radu.Woinaroski@scitec.com.au
-----
Subject: Re: PCI ISR problem
Date: Fri, 20 Nov 1998 18:04:48 GMT
From: jeh@cmkrnl.com (Jamie Hanrahan)
Organization: Kernel Mode Systems, San Diego, CA
Newsgroups: comp.os.ms-windows.programmer.nt.kernel-mode
References: 1
On Thu, 19 Nov 1998 15:46:13 -0600, Eric Gardiner
<eric.gardiner@natinst.com> wrote:
>I'm having problems with NT4 not hooking the interrupt line indicated by
>a PCI device. Here's what I'm doing:
>
>1) Enumerating the PCI buses on the system (using HalGetBusData) until
>I find my device.
>2) Once my device is found, I read the "Interrupt Line Register" in the
>device's PCI config space to determine what interrupt level to pass to
>HalGetInterruptVector.
Whups! No. Call HalAssignSlotResources and look at the returned
CM_RESOURCE_LIST to find the vector, level, port addresses, etc., for
your device. (Then pass the returned CM_RESOURCE_LIST to ExFreePool.)
See Knowledge Base article Q152044.
--- Jamie Hanrahan, Kernel Mode Systems, San Diego CA (jeh@cmkrnl.com)
Drivers, internals, networks, applications, and training for VMS and Windows NT
NT kernel driver FAQ, links, and other information: http://www.cmkrnl.com/
Please post replies, followups, questions, etc., in news, not via e-mail.
-----
Subject: Re: IRP canceling
Date: Mon, 23 Nov 1998 09:05:47 -0500
From: Walter Oney <waltoney@oneysoft.com>
Organization: Walter Oney Software
Newsgroups: comp.os.ms-windows.programmer.nt.kernel-mode
References: 1
Seol,Keun Seok wrote:
> But, if the IRP was the CurrentIrp of the Device Object,
> the Driver's Start I/O routine will try to process the IRP.
> In the DDK help, the Start I/O routine MUST check the current IRP's
> Cancel bit.
> If set, Start I/O routine must just return.
>
> But I think that the IRP already completed should not be accessed.
You're absolutely right. I recommend the following code in a standard
StartIo routine to avoid the problem you point out:
VOID StartIo(PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
KIRQL oldirql;
IoAcquireCancelSpinLock(&oldirql);
if (Irp != DeviceObject->CurrentIrp || Irp->Cancel)
{
IoReleaseCancelSpinLock(oldirql);
return;
}
else
{
IoSetCancelRoutine(Irp, NULL);
IoReleaseCancelSpinLock(oldirql);
}
. . .
}
This dovetails with a standard cancel routine:
VOID CancelRoutine(PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
if (DeviceObject->CurrentIrp == Irp)
{
IoReleaseCancelSpinLock(Irp->CancelIrql);
IoStartNextPacket(DeviceObject, TRUE);
}
else
{
KeRemoveEntryDeviceQueue(&DeviceObject->DeviceQueue,
&Irp->Tail.Overlay.DeviceQueueEntry);
IoReleaseCancelSpinLock(Irp->CancelIrql);
}
Irp->IoStatus.Status = STATUS_CANCELLED;
Irp->IoStatus.Information = 0;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
}
You need to remember that the C language specification requires that
evaluation of boolean operators short circuit when the result is known.
So, if StartIo discovers that the Irp it got as an argument is not the
same as CurrentIrp, it will not attempt to evaulate Irp->Cancel.
Now, as to why this works: StartIo gets called either by IoStartPacket
or IoStartNextPacket. Each of them will grab the cancel spin lock and
set CurrentIrp, then release the spin lock and call StartIo. If someone
should sneak in on another CPU and cancel this very same IRP, your
cancel routine will immediately release the spin lock and call
IoStartNextPacket. One of two things will then happen. IoStartNextPacket
may succeed in getting the cancel spin lock, whereupon it will nullify
the CurrentIrp pointer. If another IRP is on the queue, it will remove
it from the queue, set CurrentIrp to point to this *new* IRP, release
the spin lock, and call StartIo. [You now have two instances of StartIo
running on two different CPUs for two different IRPs, but it's not a
problem because they won't be able to interfere with each other.]
Meanwhile, your original instance of StartIo gets the cancel spin lock
and sees that CurrentIrp is not equal to the IRP pointer it got as an
argument, so it gives up.
The second way this could play out is that StartIo gets the cancel lock
before IoStartNextPacket does. In this case, CurrentIrp is still
pointing to the IRP that's in the process of being cancelled and that
StartIo got as an argument. But this IRP hasn't been completed yet (the
CPU that's running your cancel routine is spinning inside
IoStartNextPacket and therefore hasn't gotten to calling
IoCompleteRequest yet), so no-one will have been able to call IoFreeIrp
to make your pointer invalid.
People may tell you that you should be using your own queues for IRPs so
you can avoid bottlenecking the system on the global cancel spin lock.
That's true enough, but doing it correctly with Plug and Play and Power
management things in the way is gigantically complicated. There's a
sample in the NT 5 beta-2 DDK called CANCEL that shows how to manage
your own queue if you don't worry about PNP and POWER. I hear tell of an
upcoming MSJ article by a Microsoft developer that may solve the
complete problem.
-----
Subject: ANNOUNCE: ALINK v1.5
Date: 16 Nov 1998 16:36:05 GMT
From: anthony_w@my-dejanews.com
Organization: Deja News - The Leader in Internet Discussion
Newsgroups: comp.os.ms-windows.programmer.win32, comp.lang.asm.x86, comp.os.msdos.programmer
ALINK is a freeware linker, creating MSDOS COM and EXE files and Win32 PE EXE
and DLL files from OMF format OBJ and LIB files, win32-COFF format OBJ files,
and win32 RES files.
NEW for version 1.5:
Win32 COFF object file support.
Download it now from my home page.
Anthony
--
anthony_w@geocities.com
http://www.geocities.com/SiliconValley/Network/4311/index.html
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
-----

100
reactos/doc/psmgr.texi Normal file
View File

@@ -0,0 +1,100 @@
\input texinfo @c -*-texinfo-*-
@c %**start of header
@setfilename psmgr.info
@settitle Process Manager Design and Implementation
@setchapternewpage odd
@c %**end of header
@ifinfo
This document describes the ReactOS process manager design and implementation
@end ifinfo
@titlepage
@title Process Manager Design and Implementation
@author David Welch <david.welch@seh.ox.ac.uk>
@page
@vskip 0pt plus 1filll
Copyright @copyright{} 1999 David Welch
@end titlepage
@node Top, Overview, , (dir)
@comment node-name, next, previous, up
@ifinfo
This document describes the design and implementation of the reactos process
manager
@end ifinfo
@menu
* Overview:: Overview of this document
* External Interfaces:: External Interfaces
* Data Structures:: Data Structures
* Concept Index:: This index has two entries
@end menu
@node Overview, External Interfaces, top, top
@comment node-name, next, previous, up
@chapter Overview
This document describes the design and implementation of the ReactOS process
manager. ReactOS is a GPLed operating system that attempts to be compatible
with Windows NT, for more information see @uref{http://www.reactos.com}.
@node External Interfaces, Data Structures, Overview, top
@comment node-name, next, previous, up
@chapter External Interfaces
This chapter describes the external interfaces provided by the process
manager both to user-mode and to the rest of the kernel.
@menu
* NtCreateProcess:: Creates a new process
@end menu
@node NtCreateProcess, , , External Interfaces
@comment node-name, next, previous, up
@deftypefn Function NTSTATUS NtCreateProcess
The parameters are
@itemize @bullet
@item
HANDLE ProcessHandle: Received a handle for the created process on return.
@item
ACCESS_MASK DesiredAccess: Specifies the requested types of access to
the created process.
@item
POBJECT_ATTRIBUTES ObjectAttributes: Specifies various attributes for the
created process.
@item
HANDLE ParentProcessHandle: Specifies the parent process for the created
process.
@item
BOOLEAN InheritObjectTable: True if the new process such inherit its parent's
handles.
@item
HANDLE SectionHandle: If this parameter is NULL then the new process's
address space will be a copy of its parent's. Otherwise the new process's
address space will contain a mapping of the section pointed to by this
handle and NTDLL.
@item
HANDLE DebugPort: Specifies a handle that will receive debug messages
associated with this process.
@item
HANDLE ExceptionPort: Specifies a handle that will receive exception messages
associated with this process.
@end itemize
The return value is either STATUS_SUCCESS or a value indicating the reason
by failure.
@end deftypefn
@node Data Structures, Concept Index, External Interfaces, top
@comment node-name, next, previous, up
@chapter Data Structures
@node Concept Index, ,Data Structures, Top
@unnumbered Concept Index
@printindex cp
@contents
@bye

View File

@@ -1,31 +1,59 @@
* Kernel things implemented [exceptions in brackets]
Spinlocks [Uniprocessor only]
IRQ levels [Not APC_LEVEL or WAKE_LEVEL, uniprocessor only]
ISRs [Partial, uniprocessor only]
Timers [Untested]
DPCs [Untested]
Objects [Partial]
Namespace [Partial]
Handle tables [One process only]
Threads [Some initial work]
RTL list functions [All except sequenced lists]
Zones [Untested]
Memory pool [Working but semantics partially incompatiable]
Device objects [Some but no support for layering]
IRP [Partial]
Memory sections [Partial, no file mappings]
PCI interface [Probes but no support]
CreateFile API [Device only]
ReadFile/WriteFile API [Device only]
MDL functions [Untested]
* Critical path tasks
Test and debug Registry routines
Finish multiple system service table support (HalRegisterServiceTable)
Modify GENNTDLL to generate all needed system service tables
* Kernel things unimplemented (partial)
* These tasks would be nice
Separate HAL into KM DLL
Add support for source level debugging to Bochs
Support for remote debugging
Process managment
Dispatcher objects (Mutex, Semaphore etc)
Investigate user and kernel mode APCs
Asynchronous I/O
Optimization
* Function groups totally or partially unimplemented
Dma functions (see hal/x86/dma.c)
PCI interface functions (see hal/x86/bios32.c, hal/x86/pci.c)
HalExamineMbr
Locale support (see ex/locale.c)
Shutdown support (see ex/power.c)
Zw(Set/Get)SystemInformation (see ex/sysinfo.c)
Adapter functions (see io/adapter.c)
Io cancelation support (see io/cancel, et al)
Directory change notification (see io/dir.c)
Error logging (see io/errlog.c)
Buffer flushing (see io/flush.c)
Io completion ports (see io/iocomp.c)
File locking (see io/lock.c)
Mailslots (see io/mailslot.c)
Named pipes (see io/npipe.c)
Hardware resource management (see io/resource.c)
File access checking (see io/share.c)
APCs to user-mode (see ke/apc.c, ke/apchelp.asm)
Exception support (see ke/catch.c)
Mutex support (see ke/mutex.c)
Semaphore support (see ke/sem.c)
Timer support (see ke/timer.c)
Properly calibrate delay loop (see ke/timer.c)
Waiting for multiple objects (see ke/wait.c)
Single linked lists (see rtl/slist.c)
Sequenced lists (see rtl/seqlist.c)
* Verify implementation
Fast mutexes (see ex/fmutex.c)
* Major areas
Security support (see se/*.c)
Registry support (see cm/*.c)
Paging support
File system cache support
SCSI miniport driver
Network support
Video drivers
USER and GDI modules
* Drivers
NTFS, EXT2 filesystems
Many others (use oem's where possible)
* For the future
DOS, Win16, POSIX subsystems

View File

@@ -1,16 +0,0 @@
subject wstring.zip
author Boudewijn Dekker
date 06-06-98
I wrote some inline wide character string functions. It are modified version
of the ones in string.h. I added four more function nl stricmp, strnicmp,
wcsicmp, and wcsnicmp. These are the case insensitive variants of
strcmp, strncmp and wcscmp, wcsncmp. I tested all the functions but I
would urge anyone to tested again. I removed an extern specifier
__wcstok and strtok cause I it caused an compilation error when
using strtok or wcstok. Please could someone see if this correct.
I also used these string functions in lstring api functions.
Boudewijn Dekker

View File

@@ -0,0 +1,4 @@
base.tmp
junk.tmp
temp.exp

View File

@@ -0,0 +1,284 @@
/* $Id: beep.c,v 1.5 2000/07/02 10:54:12 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: services/dd/beep/beep.c
* PURPOSE: BEEP device driver
* PROGRAMMER: Eric Kohl (ekohl@abo.rhein-zeitung.de)
* UPDATE HISTORY:
* 30/01/99 Created
* 16/10/99 Minor fixes
*/
/* INCLUDES ****************************************************************/
#include <ddk/ntddk.h>
#include <ddk/ntddbeep.h>
#define NDEBUG
#include <internal/debug.h>
/* TYEPEDEFS ***************************************************************/
typedef struct tagBEEP_DEVICE_EXTENSION
{
KDPC Dpc;
KTIMER Timer;
KEVENT Event;
BOOL BeepOn;
} DEVICE_EXTENSION, *PDEVICE_EXTENSION;
/* FUNCTIONS ***************************************************************/
VOID BeepDPC (PKDPC Dpc, PVOID DeferredContext, PVOID SystemArgument1, PVOID SystemArgument2)
{
PDEVICE_EXTENSION DeviceExtension = DeferredContext;
DPRINT ("BeepDPC() called!\n");
HalMakeBeep (0);
DeviceExtension->BeepOn = FALSE;
KeSetEvent (&(DeviceExtension->Event), 0, TRUE);
DPRINT ("BeepDPC() finished!\n");
}
NTSTATUS BeepCreate (PDEVICE_OBJECT DeviceObject, PIRP Irp)
/*
* FUNCTION: Handles user mode requests
* ARGUMENTS:
* DeviceObject = Device for request
* Irp = I/O request packet describing request
* RETURNS: Success or failure
*/
{
PIO_STACK_LOCATION Stack = IoGetCurrentIrpStackLocation(Irp);
NTSTATUS status;
if (Stack->MajorFunction == IRP_MJ_CREATE)
{
DPRINT ("BeepCreate() called!\n");
Irp->IoStatus.Information = 0;
status = STATUS_SUCCESS;
}
else
status = STATUS_NOT_IMPLEMENTED;
Irp->IoStatus.Status = status;
IoCompleteRequest (Irp,IO_NO_INCREMENT);
return (status);
}
NTSTATUS BeepClose(PDEVICE_OBJECT DeviceObject, PIRP Irp)
/*
* FUNCTION: Handles user mode requests
* ARGUMENTS:
* DeviceObject = Device for request
* Irp = I/O request packet describing request
* RETURNS: Success or failure
*/
{
PIO_STACK_LOCATION Stack = IoGetCurrentIrpStackLocation (Irp);
NTSTATUS status;
switch (Stack->MajorFunction)
{
case IRP_MJ_CLOSE:
DPRINT ("BeepClose() called!\n");
Irp->IoStatus.Information = 0;
status = STATUS_SUCCESS;
break;
default:
status = STATUS_NOT_IMPLEMENTED;
}
Irp->IoStatus.Status = status;
IoCompleteRequest (Irp, IO_NO_INCREMENT);
return (status);
}
NTSTATUS BeepCleanup(PDEVICE_OBJECT DeviceObject, PIRP Irp)
/*
* FUNCTION: Handles user mode requests
* ARGUMENTS:
* DeviceObject = Device for request
* Irp = I/O request packet describing request
* RETURNS: Success or failure
*/
{
PIO_STACK_LOCATION Stack = IoGetCurrentIrpStackLocation (Irp);
NTSTATUS status;
if (Stack->MajorFunction == IRP_MJ_CLEANUP)
{
DPRINT ("BeepCleanup() called!\n");
Irp->IoStatus.Information = 0;
status = STATUS_SUCCESS;
}
else
status = STATUS_NOT_IMPLEMENTED;
Irp->IoStatus.Status = status;
IoCompleteRequest (Irp, IO_NO_INCREMENT);
return (status);
}
NTSTATUS BeepDeviceControl (PDEVICE_OBJECT DeviceObject, PIRP Irp)
/*
* FUNCTION: Handles user mode requests
* ARGUMENTS:
* DeviceObject = Device for request
* Irp = I/O request packet describing request
* RETURNS: Success or failure
*/
{
PIO_STACK_LOCATION Stack = IoGetCurrentIrpStackLocation(Irp);
PDEVICE_EXTENSION DeviceExtension;
PBEEP_SET_PARAMETERS pbsp;
NTSTATUS status;
DeviceExtension = DeviceObject->DeviceExtension;
DPRINT ("BeepDeviceControl() called!\n");
if (Stack->Parameters.DeviceIoControl.IoControlCode == IOCTL_BEEP_SET)
{
Irp->IoStatus.Information = 0;
if (Stack->Parameters.DeviceIoControl.InputBufferLength == sizeof(BEEP_SET_PARAMETERS))
{
pbsp = (PBEEP_SET_PARAMETERS)Irp->AssociatedIrp.SystemBuffer;
if (pbsp->Frequency >= BEEP_FREQUENCY_MINIMUM &&
pbsp->Frequency <= BEEP_FREQUENCY_MAXIMUM)
{
LARGE_INTEGER DueTime;
DueTime.QuadPart = 0;
/* do the beep!! */
DPRINT ("Beep:\n Freq: %lu Hz\n Dur: %lu ms\n",
pbsp->Frequency, pbsp->Duration);
if (pbsp->Duration >= 0)
{
DueTime.QuadPart = (LONGLONG)pbsp->Duration * -10000;
KeSetTimer (&DeviceExtension->Timer,
DueTime,
&DeviceExtension->Dpc);
HalMakeBeep (pbsp->Frequency);
DeviceExtension->BeepOn = TRUE;
KeWaitForSingleObject (&(DeviceExtension->Event),
Executive,
KernelMode,
FALSE,
NULL);
}
else if (pbsp->Duration == (DWORD)-1)
{
if (DeviceExtension->BeepOn)
{
HalMakeBeep (0);
DeviceExtension->BeepOn = FALSE;
}
else
{
HalMakeBeep (pbsp->Frequency);
DeviceExtension->BeepOn = TRUE;
}
}
DPRINT ("Did the beep!\n");
status = STATUS_SUCCESS;
}
else
{
status = STATUS_INVALID_PARAMETER;
}
}
else
{
status = STATUS_INVALID_PARAMETER;
}
}
else
{
status = STATUS_NOT_IMPLEMENTED;
}
Irp->IoStatus.Status = status;
IoCompleteRequest (Irp, IO_NO_INCREMENT);
return (status);
}
NTSTATUS BeepUnload(PDRIVER_OBJECT DriverObject)
{
DPRINT ("BeepUnload() called!\n");
return (STATUS_SUCCESS);
}
NTSTATUS
STDCALL
DriverEntry (PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
/*
* FUNCTION: Called by the system to initalize the driver
* ARGUMENTS:
* DriverObject = object describing this driver
* RegistryPath = path to our configuration entries
* RETURNS: Success or failure
*/
{
PDEVICE_EXTENSION DeviceExtension;
PDEVICE_OBJECT DeviceObject;
UNICODE_STRING DeviceName;
UNICODE_STRING SymlinkName;
NTSTATUS Status;
DbgPrint ("Beep Device Driver 0.0.2\n");
DriverObject->MajorFunction[IRP_MJ_CREATE] = BeepCreate;
DriverObject->MajorFunction[IRP_MJ_CLOSE] = BeepClose;
DriverObject->MajorFunction[IRP_MJ_CLEANUP] = BeepCleanup;
DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = BeepDeviceControl;
DriverObject->DriverUnload = BeepUnload;
/* set up device extension */
DeviceExtension = DeviceObject->DeviceExtension;
DeviceExtension->BeepOn = FALSE;
KeInitializeDpc (&(DeviceExtension->Dpc),
BeepDPC,
DeviceExtension);
KeInitializeTimer (&(DeviceExtension->Timer));
KeInitializeEvent (&(DeviceExtension->Event),
SynchronizationEvent,
FALSE);
RtlInitUnicodeString (&DeviceName, L"\\Device\\Beep");
Status = IoCreateDevice (DriverObject,
sizeof(DEVICE_EXTENSION),
&DeviceName,
FILE_DEVICE_BEEP,
0,
FALSE,
&DeviceObject);
if (NT_SUCCESS(Status))
return Status;
RtlInitUnicodeString (&SymlinkName, L"\\??\\Beep");
IoCreateSymbolicLink (&SymlinkName, &DeviceName);
return (STATUS_SUCCESS);
}
/* EOF */

View File

@@ -0,0 +1,39 @@
#include <defines.h>
#include <reactos/resource.h>
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
VS_VERSION_INFO VERSIONINFO
FILEVERSION RES_UINT_FV_MAJOR,RES_UINT_FV_MINOR,RES_UINT_FV_REVISION,RES_UINT_FV_BUILD
PRODUCTVERSION RES_UINT_PV_MAJOR,RES_UINT_PV_MINOR,RES_UINT_PV_REVISION,RES_UINT_PV_BUILD
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", RES_STR_COMPANY_NAME
VALUE "FileDescription", "PC Speaker Device Driver\0"
VALUE "FileVersion", "0.0.2\0"
VALUE "InternalName", "beep\0"
VALUE "LegalCopyright", RES_STR_LEGAL_COPYRIGHT
VALUE "OriginalFilename", "beep.sys\0"
VALUE "ProductName", RES_STR_PRODUCT_NAME
VALUE "ProductVersion", RES_STR_PRODUCT_VERSION
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END

View File

@@ -0,0 +1,71 @@
# $Id: makefile,v 1.6 1999/12/04 20:58:35 ea Exp $
#
#
TARGET = beep
OBJECTS = beep.o beep.coff ../../../ntoskrnl/ntoskrnl.a
BASE_CFLAGS = -I../../../include
all: beep.sys
.PHONY: all
clean:
- $(RM) beep.o
- $(RM) beep.coff
- $(RM) junk.tmp
- $(RM) base.tmp
- $(RM) temp.exp
- $(RM) beep.sys
.phony: clean
floppy: $(FLOPPY_DIR)/drivers/$(TARGET).sys
$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
ifeq ($(DOSCLI),yes)
$(CP) $(TARGET).sys $(FLOPPY_DIR)\drivers\$(TARGET).sys
else
$(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
endif
dist: ../../../$(DIST_DIR)/drivers/$(TARGET).sys
../../../$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
ifeq ($(DOSCLI),yes)
$(CP) $(TARGET).sys ..\..\..\$(DIST_DIR)\drivers\$(TARGET).sys
else
$(CP) $(TARGET).sys ../../../$(DIST_DIR)/drivers/$(TARGET).sys
endif
beep.sys: $(OBJECTS)
$(CC) \
-specs=../../svc_specs \
-mdll \
-o junk.tmp \
-Wl,--defsym,_end=end \
-Wl,--defsym,_edata=__data_end__ \
-Wl,--defsym,_etext=etext \
-Wl,--base-file,base.tmp \
$(OBJECTS)
- $(RM) junk.tmp
$(DLLTOOL) \
--dllname beep.sys \
--base-file base.tmp \
--output-exp temp.exp \
--kill-at
- $(RM) base.tmp
$(CC) \
--verbose \
-Wl,--image-base,0x10000 \
-Wl,-e,_DriverEntry@8 \
-Wl,temp.exp \
-specs=../../svc_specs \
-mdll \
-o $(TARGET).sys \
$(OBJECTS)
- $(RM) temp.exp
include ../../../rules.mak

View File

@@ -0,0 +1,4 @@
base.tmp
junk.tmp
temp.exp
blue.coff

View File

@@ -0,0 +1,635 @@
/* $Id: blue.c,v 1.26 2000/07/11 04:08:43 phreak Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: services/dd/blue/blue.c
* PURPOSE: Console (blue screen) device driver
* PROGRAMMER: Eric Kohl (ekohl@abo.rhein-zeitung.de)
* UPDATE HISTORY:
* ??? Created
*/
/* INCLUDES ******************************************************************/
#include <ddk/ntddk.h>
#include <ddk/ntddblue.h>
#include <string.h>
#include <defines.h>
#define NDEBUG
#include <debug.h>
/* DEFINITIONS ***************************************************************/
#define VIDMEM_BASE 0xb8000
#define VIDMEM_SIZE 0x2000
#define CRTC_COMMAND ((PUCHAR)0x3d4)
#define CRTC_DATA ((PUCHAR)0x3d5)
#define CRTC_COLUMNS 0x01
#define CRTC_OVERFLOW 0x07
#define CRTC_ROWS 0x12
#define CRTC_SCANLINES 0x09
#define CRTC_CURSORSTART 0x0a
#define CRTC_CURSOREND 0x0b
#define CRTC_CURSORPOSHI 0x0e
#define CRTC_CURSORPOSLO 0x0f
#define ATTRC_WRITEREG ((PUCHAR)0x3c0)
#define ATTRC_READREG ((PUCHAR)0x3c1)
#define ATTRC_INPST1 ((PUCHAR)0x3da)
#define TAB_WIDTH 8
/* NOTES ******************************************************************/
/*
* [[character][attribute]][[character][attribute]]....
*/
/* TYPEDEFS ***************************************************************/
typedef struct _DEVICE_EXTENSION
{
PBYTE VideoMemory; /* Pointer to video memory */
DWORD CursorSize;
BOOL CursorVisible;
WORD CharAttribute;
DWORD Mode;
BYTE ScanLines; /* Height of a text line */
WORD Rows; /* Number of rows */
WORD Columns; /* Number of columns */
} DEVICE_EXTENSION, *PDEVICE_EXTENSION;
/* FUNCTIONS **************************************************************/
NTSTATUS
ScrCreate (PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
PDEVICE_EXTENSION DeviceExtension;
PHYSICAL_ADDRESS BaseAddress;
NTSTATUS Status;
unsigned int offset;
BYTE data, value;
DeviceExtension = DeviceObject->DeviceExtension;
/* get pointer to video memory */
BaseAddress.QuadPart = VIDMEM_BASE;
DeviceExtension->VideoMemory =
(PBYTE)MmMapIoSpace (BaseAddress, VIDMEM_SIZE, FALSE);
/* disable interrupts */
__asm__("cli\n\t");
/* get current output position */
WRITE_PORT_UCHAR (CRTC_COMMAND, CRTC_CURSORPOSLO);
offset = READ_PORT_UCHAR (CRTC_DATA);
WRITE_PORT_UCHAR (CRTC_COMMAND, CRTC_CURSORPOSHI);
offset += (READ_PORT_UCHAR (CRTC_DATA) << 8);
/* switch blinking characters off */
READ_PORT_UCHAR (ATTRC_INPST1);
value = READ_PORT_UCHAR (ATTRC_WRITEREG);
WRITE_PORT_UCHAR (ATTRC_WRITEREG, 0x10);
data = READ_PORT_UCHAR (ATTRC_READREG);
data = data & ~0x08;
WRITE_PORT_UCHAR (ATTRC_WRITEREG, data);
WRITE_PORT_UCHAR (ATTRC_WRITEREG, value);
READ_PORT_UCHAR (ATTRC_INPST1);
/* read screen information from crt controller */
WRITE_PORT_UCHAR (CRTC_COMMAND, CRTC_COLUMNS);
DeviceExtension->Columns = READ_PORT_UCHAR (CRTC_DATA) + 1;
WRITE_PORT_UCHAR (CRTC_COMMAND, CRTC_ROWS);
DeviceExtension->Rows = READ_PORT_UCHAR (CRTC_DATA);
WRITE_PORT_UCHAR (CRTC_COMMAND, CRTC_OVERFLOW);
data = READ_PORT_UCHAR (CRTC_DATA);
DeviceExtension->Rows |= (((data & 0x02) << 7) | ((data & 0x40) << 3));
DeviceExtension->Rows++;
WRITE_PORT_UCHAR (CRTC_COMMAND, CRTC_SCANLINES);
DeviceExtension->ScanLines = (READ_PORT_UCHAR (CRTC_DATA) & 0x1F) + 1;
/* enable interrupts */
__asm__("sti\n\t");
/* calculate number of text rows */
DeviceExtension->Rows =
DeviceExtension->Rows / DeviceExtension->ScanLines;
DPRINT ("%d Columns %d Rows %d Scanlines\n",
DeviceExtension->Columns,
DeviceExtension->Rows,
DeviceExtension->ScanLines);
DeviceExtension->CursorSize = 5; /* FIXME: value correct?? */
DeviceExtension->CursorVisible = TRUE;
/* more initialization */
DeviceExtension->CharAttribute = 0x17; /* light grey on blue */
DeviceExtension->Mode = ENABLE_PROCESSED_OUTPUT |
ENABLE_WRAP_AT_EOL_OUTPUT;
/* show blinking cursor */
__asm__("cli\n\t");
WRITE_PORT_UCHAR (CRTC_COMMAND, CRTC_CURSORSTART);
WRITE_PORT_UCHAR (CRTC_DATA, (DeviceExtension->ScanLines - 1) & 0x1F);
WRITE_PORT_UCHAR (CRTC_COMMAND, CRTC_CURSOREND);
data = READ_PORT_UCHAR (CRTC_DATA) & 0xE0;
WRITE_PORT_UCHAR (CRTC_DATA,
data | ((DeviceExtension->ScanLines - 1) & 0x1F));
__asm__("sti\n\t");
Status = STATUS_SUCCESS;
Irp->IoStatus.Status = Status;
IoCompleteRequest (Irp, IO_NO_INCREMENT);
return (Status);
}
NTSTATUS
ScrWrite (PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
PIO_STACK_LOCATION stk = IoGetCurrentIrpStackLocation (Irp);
PDEVICE_EXTENSION DeviceExtension = DeviceObject->DeviceExtension;
NTSTATUS Status;
char *pch = Irp->UserBuffer;
char *vidmem;
int i, j, offset;
int cursorx, cursory;
int rows, columns;
int processed = DeviceExtension->Mode & ENABLE_PROCESSED_OUTPUT;
vidmem = DeviceExtension->VideoMemory;
rows = DeviceExtension->Rows;
columns = DeviceExtension->Columns;
WRITE_PORT_UCHAR (CRTC_COMMAND, CRTC_CURSORPOSHI);
offset = READ_PORT_UCHAR (CRTC_DATA)<<8;
WRITE_PORT_UCHAR (CRTC_COMMAND, CRTC_CURSORPOSLO);
offset += READ_PORT_UCHAR (CRTC_DATA);
cursory = offset / columns;
cursorx = offset % columns;
if( processed == 0 )
{
/* raw output mode */
memcpy( &vidmem[(cursorx * 2) + (cursory * columns * 2)], pch, stk->Parameters.Write.Length );
offset += (stk->Parameters.Write.Length / 2);
}
else {
for (i = 0; i < stk->Parameters.Write.Length; i++, pch++)
{
switch (*pch)
{
case '\b':
if (cursorx > 0)
{
cursorx--;
}
else if (cursory > 0)
{
cursorx = columns - 1;
cursory--;
}
vidmem[(cursorx * 2) + (cursory * columns * 2)] = ' ';
vidmem[(cursorx * 2) + (cursory * columns * 2) + 1] = (char) DeviceExtension->CharAttribute;
break;
case '\n':
cursory++;
cursorx = 0;
break;
case '\r':
break;
case '\t':
offset = TAB_WIDTH - (cursorx % TAB_WIDTH);
for (j = 0; j < offset; j++)
{
vidmem[(cursorx * 2) + (cursory * columns * 2)] = ' ';
cursorx++;
if (cursorx >= columns)
{
cursory++;
cursorx = 0;
}
}
break;
default:
vidmem[(cursorx * 2) + (cursory * columns * 2)] = *pch;
vidmem[(cursorx * 2) + (cursory * columns * 2) + 1] = (char) DeviceExtension->CharAttribute;
cursorx++;
if (cursorx >= columns)
{
cursory++;
cursorx = 0;
}
break;
}
if (cursory >= rows)
{
unsigned short *LinePtr;
memcpy (vidmem,
&vidmem[columns * 2],
columns * (rows - 1) * 2);
LinePtr = (unsigned short *) &vidmem[columns * (rows - 1) * 2];
for (j = 0; j < columns; j++)
{
LinePtr[j] = DeviceExtension->CharAttribute << 8;
}
cursory = rows - 1;
for (j = 0; j < columns; j++)
{
vidmem[(j * 2) + (cursory * columns * 2)] = ' ';
vidmem[(j * 2) + (cursory * columns * 2) + 1] = (char)DeviceExtension->CharAttribute;
}
}
}
/* Set the cursor position */
offset = (cursory * columns) + cursorx;
}
WRITE_PORT_UCHAR (CRTC_COMMAND, CRTC_CURSORPOSLO);
WRITE_PORT_UCHAR (CRTC_DATA, offset);
WRITE_PORT_UCHAR (CRTC_COMMAND, CRTC_CURSORPOSHI);
offset >>= 8;
WRITE_PORT_UCHAR (CRTC_DATA, offset);
Status = STATUS_SUCCESS;
Irp->IoStatus.Status = Status;
IoCompleteRequest (Irp, IO_NO_INCREMENT);
return (Status);
}
NTSTATUS
ScrIoControl (PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
PIO_STACK_LOCATION stk = IoGetCurrentIrpStackLocation (Irp);
PDEVICE_EXTENSION DeviceExtension;
NTSTATUS Status;
DeviceExtension = DeviceObject->DeviceExtension;
switch (stk->Parameters.DeviceIoControl.IoControlCode)
{
case IOCTL_CONSOLE_GET_SCREEN_BUFFER_INFO:
{
PCONSOLE_SCREEN_BUFFER_INFO pcsbi = (PCONSOLE_SCREEN_BUFFER_INFO)Irp->AssociatedIrp.SystemBuffer;
int rows = DeviceExtension->Rows;
int columns = DeviceExtension->Columns;
unsigned int offset;
/* read cursor position from crtc */
__asm__("cli\n\t");
WRITE_PORT_UCHAR (CRTC_COMMAND, CRTC_CURSORPOSLO);
offset = READ_PORT_UCHAR (CRTC_DATA);
WRITE_PORT_UCHAR (CRTC_COMMAND, CRTC_CURSORPOSHI);
offset += (READ_PORT_UCHAR (CRTC_DATA) << 8);
__asm__("sti\n\t");
pcsbi->dwSize.X = columns;
pcsbi->dwSize.Y = rows;
pcsbi->dwCursorPosition.X = (SHORT)(offset % columns);
pcsbi->dwCursorPosition.Y = (SHORT)(offset / columns);
pcsbi->wAttributes = DeviceExtension->CharAttribute;
pcsbi->srWindow.Left = 0;
pcsbi->srWindow.Right = columns - 1;
pcsbi->srWindow.Top = 0;
pcsbi->srWindow.Bottom = rows - 1;
pcsbi->dwMaximumWindowSize.X = columns;
pcsbi->dwMaximumWindowSize.Y = rows;
Irp->IoStatus.Information = sizeof (CONSOLE_SCREEN_BUFFER_INFO);
Status = STATUS_SUCCESS;
}
break;
case IOCTL_CONSOLE_SET_SCREEN_BUFFER_INFO:
{
PCONSOLE_SCREEN_BUFFER_INFO pcsbi = (PCONSOLE_SCREEN_BUFFER_INFO)Irp->AssociatedIrp.SystemBuffer;
unsigned int offset;
DeviceExtension->CharAttribute = pcsbi->wAttributes;
offset = (pcsbi->dwCursorPosition.Y * DeviceExtension->Columns) +
pcsbi->dwCursorPosition.X;
__asm__("cli\n\t");
WRITE_PORT_UCHAR (CRTC_COMMAND, CRTC_CURSORPOSLO);
WRITE_PORT_UCHAR (CRTC_DATA, offset);
WRITE_PORT_UCHAR (CRTC_COMMAND, CRTC_CURSORPOSHI);
WRITE_PORT_UCHAR (CRTC_DATA, offset>>8);
__asm__("sti\n\t");
Irp->IoStatus.Information = 0;
Status = STATUS_SUCCESS;
}
break;
case IOCTL_CONSOLE_GET_CURSOR_INFO:
{
PCONSOLE_CURSOR_INFO pcci = (PCONSOLE_CURSOR_INFO)Irp->AssociatedIrp.SystemBuffer;
pcci->dwSize = DeviceExtension->CursorSize;
pcci->bVisible = DeviceExtension->CursorVisible;
Irp->IoStatus.Information = sizeof (CONSOLE_CURSOR_INFO);
Status = STATUS_SUCCESS;
}
break;
case IOCTL_CONSOLE_SET_CURSOR_INFO:
{
PCONSOLE_CURSOR_INFO pcci = (PCONSOLE_CURSOR_INFO)Irp->AssociatedIrp.SystemBuffer;
BYTE data, value;
DWORD size, height;
DeviceExtension->CursorSize = pcci->dwSize;
DeviceExtension->CursorVisible = pcci->bVisible;
height = DeviceExtension->ScanLines;
data = (pcci->bVisible) ? 0x40 : 0x20;
size = (pcci->dwSize * height) / 100;
if (size < 1)
size = 1;
data |= (BYTE)(height - size);
__asm__("cli\n\t");
WRITE_PORT_UCHAR (CRTC_COMMAND, CRTC_CURSORSTART);
WRITE_PORT_UCHAR (CRTC_DATA, data);
WRITE_PORT_UCHAR (CRTC_COMMAND, CRTC_CURSOREND);
value = READ_PORT_UCHAR (CRTC_DATA) & 0xE0;
WRITE_PORT_UCHAR (CRTC_DATA, value | (height - 1));
__asm__("sti\n\t");
Irp->IoStatus.Information = 0;
Status = STATUS_SUCCESS;
}
break;
case IOCTL_CONSOLE_GET_MODE:
{
PCONSOLE_MODE pcm = (PCONSOLE_MODE)Irp->AssociatedIrp.SystemBuffer;
pcm->dwMode = DeviceExtension->Mode;
Irp->IoStatus.Information = sizeof(CONSOLE_MODE);
Status = STATUS_SUCCESS;
}
break;
case IOCTL_CONSOLE_SET_MODE:
{
PCONSOLE_MODE pcm = (PCONSOLE_MODE)Irp->AssociatedIrp.SystemBuffer;
DeviceExtension->Mode = pcm->dwMode;
Irp->IoStatus.Information = 0;
Status = STATUS_SUCCESS;
}
break;
case IOCTL_CONSOLE_FILL_OUTPUT_ATTRIBUTE:
{
POUTPUT_ATTRIBUTE Buf = (POUTPUT_ATTRIBUTE)Irp->AssociatedIrp.SystemBuffer;
char *vidmem;
int offset;
DWORD dwCount;
vidmem = DeviceExtension->VideoMemory;
offset = (Buf->dwCoord.Y * DeviceExtension->Columns * 2) +
(Buf->dwCoord.X * 2) + 1;
for (dwCount = 0; dwCount < Buf->nLength; dwCount++)
{
vidmem[offset + (dwCount * 2)] = (char) Buf->wAttribute;
}
Buf->dwTransfered = Buf->nLength;
Irp->IoStatus.Information = 0;
Status = STATUS_SUCCESS;
}
break;
case IOCTL_CONSOLE_READ_OUTPUT_ATTRIBUTE:
{
POUTPUT_ATTRIBUTE Buf = (POUTPUT_ATTRIBUTE)Irp->AssociatedIrp.SystemBuffer;
PWORD pAttr = (PWORD)MmGetSystemAddressForMdl(Irp->MdlAddress);
char *vidmem;
int offset;
DWORD dwCount;
vidmem = DeviceExtension->VideoMemory;
offset = (Buf->dwCoord.Y * DeviceExtension->Columns * 2) +
(Buf->dwCoord.X * 2) + 1;
for (dwCount = 0; dwCount < stk->Parameters.Write.Length; dwCount++, pAttr++)
{
(char) *pAttr = vidmem[offset + (dwCount * 2)];
}
Buf->dwTransfered = dwCount;
Irp->IoStatus.Information = sizeof(OUTPUT_ATTRIBUTE);
Status = STATUS_SUCCESS;
}
break;
case IOCTL_CONSOLE_WRITE_OUTPUT_ATTRIBUTE:
{
POUTPUT_ATTRIBUTE Buf = (POUTPUT_ATTRIBUTE)Irp->AssociatedIrp.SystemBuffer;
PWORD pAttr = (PWORD)MmGetSystemAddressForMdl(Irp->MdlAddress);
char *vidmem;
int offset;
DWORD dwCount;
vidmem = DeviceExtension->VideoMemory;
offset = (Buf->dwCoord.Y * DeviceExtension->Columns * 2) +
(Buf->dwCoord.X * 2) + 1;
for (dwCount = 0; dwCount < stk->Parameters.Write.Length; dwCount++, pAttr++)
{
vidmem[offset + (dwCount * 2)] = (char) *pAttr;
}
Buf->dwTransfered = dwCount;
Irp->IoStatus.Information = sizeof(OUTPUT_ATTRIBUTE);
Status = STATUS_SUCCESS;
}
break;
case IOCTL_CONSOLE_SET_TEXT_ATTRIBUTE:
DeviceExtension->CharAttribute = (WORD)*(PWORD)Irp->AssociatedIrp.SystemBuffer;
Irp->IoStatus.Information = 0;
Status = STATUS_SUCCESS;
break;
case IOCTL_CONSOLE_FILL_OUTPUT_CHARACTER:
{
POUTPUT_CHARACTER Buf = (POUTPUT_CHARACTER)Irp->AssociatedIrp.SystemBuffer;
char *vidmem;
int offset;
DWORD dwCount;
vidmem = DeviceExtension->VideoMemory;
offset = (Buf->dwCoord.Y * DeviceExtension->Columns * 2) +
(Buf->dwCoord.X * 2);
CHECKPOINT
for (dwCount = 0; dwCount < Buf->nLength; dwCount++)
{
vidmem[offset + (dwCount * 2)] = (char) Buf->cCharacter;
}
Buf->dwTransfered = Buf->nLength;
Irp->IoStatus.Information = 0;
Status = STATUS_SUCCESS;
}
break;
case IOCTL_CONSOLE_READ_OUTPUT_CHARACTER:
{
POUTPUT_CHARACTER Buf = (POUTPUT_CHARACTER)Irp->AssociatedIrp.SystemBuffer;
LPSTR pChar = (LPSTR)MmGetSystemAddressForMdl(Irp->MdlAddress);
char *vidmem;
int offset;
DWORD dwCount;
vidmem = DeviceExtension->VideoMemory;
offset = (Buf->dwCoord.Y * DeviceExtension->Columns * 2) +
(Buf->dwCoord.X * 2);
for (dwCount = 0; dwCount < stk->Parameters.Write.Length; dwCount++, pChar++)
{
*pChar = vidmem[offset + (dwCount * 2)];
}
Buf->dwTransfered = dwCount;
Irp->IoStatus.Information = sizeof(OUTPUT_ATTRIBUTE);
Status = STATUS_SUCCESS;
}
break;
case IOCTL_CONSOLE_WRITE_OUTPUT_CHARACTER:
{
POUTPUT_CHARACTER Buf = (POUTPUT_CHARACTER)Irp->AssociatedIrp.SystemBuffer;
LPSTR pChar = (LPSTR)MmGetSystemAddressForMdl(Irp->MdlAddress);
char *vidmem;
int offset;
DWORD dwCount;
vidmem = DeviceExtension->VideoMemory;
offset = (Buf->dwCoord.Y * DeviceExtension->Columns * 2) +
(Buf->dwCoord.X * 2) + 1;
for (dwCount = 0; dwCount < stk->Parameters.Write.Length; dwCount++, pChar++)
{
vidmem[offset + (dwCount * 2)] = (char) *pChar;
}
Buf->dwTransfered = dwCount;
Irp->IoStatus.Information = sizeof(OUTPUT_ATTRIBUTE);
Status = STATUS_SUCCESS;
}
break;
default:
Status = STATUS_NOT_IMPLEMENTED;
}
Irp->IoStatus.Status = Status;
IoCompleteRequest (Irp, IO_NO_INCREMENT);
return (Status);
}
NTSTATUS
ScrDispatch (PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
PIO_STACK_LOCATION stk = IoGetCurrentIrpStackLocation(Irp);
NTSTATUS Status;
switch (stk->MajorFunction)
{
case IRP_MJ_CLOSE:
Status = STATUS_SUCCESS;
break;
default:
Status = STATUS_NOT_IMPLEMENTED;
break;
}
Irp->IoStatus.Status = Status;
IoCompleteRequest (Irp, IO_NO_INCREMENT);
return (Status);
}
/*
* Module entry point
*/
NTSTATUS
STDCALL
DriverEntry (PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
{
PDEVICE_OBJECT DeviceObject;
UNICODE_STRING DeviceName;
UNICODE_STRING SymlinkName;
DbgPrint ("Screen Driver 0.0.6\n");
DriverObject->MajorFunction[IRP_MJ_CREATE] = ScrCreate;
DriverObject->MajorFunction[IRP_MJ_CLOSE] = ScrDispatch;
DriverObject->MajorFunction[IRP_MJ_READ] = ScrDispatch;
DriverObject->MajorFunction[IRP_MJ_WRITE] = ScrWrite;
DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL ] = ScrIoControl;
RtlInitUnicodeString (&DeviceName, L"\\Device\\BlueScreen");
IoCreateDevice (DriverObject,
sizeof(DEVICE_EXTENSION),
&DeviceName,
FILE_DEVICE_SCREEN,
0,
TRUE,
&DeviceObject);
RtlInitUnicodeString (&SymlinkName, L"\\??\\BlueScreen");
IoCreateSymbolicLink (&SymlinkName, &DeviceName);
return (STATUS_SUCCESS);
}
/* EOF */

View File

@@ -0,0 +1,39 @@
#include <defines.h>
#include <reactos/resource.h>
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
VS_VERSION_INFO VERSIONINFO
FILEVERSION RES_UINT_FV_MAJOR,RES_UINT_FV_MINOR,RES_UINT_FV_REVISION,RES_UINT_FV_BUILD
PRODUCTVERSION RES_UINT_PV_MAJOR,RES_UINT_PV_MINOR,RES_UINT_PV_REVISION,RES_UINT_PV_BUILD
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", RES_STR_COMPANY_NAME
VALUE "FileDescription", "HAL Console Device Driver\0"
VALUE "FileVersion", "0.0.6\0"
VALUE "InternalName", "blue\0"
VALUE "LegalCopyright", RES_STR_LEGAL_COPYRIGHT
VALUE "OriginalFilename", "blue.sys\0"
VALUE "ProductName", RES_STR_PRODUCT_NAME
VALUE "ProductVersion", RES_STR_PRODUCT_VERSION
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END

View File

@@ -0,0 +1,71 @@
# $Id: makefile,v 1.11 2000/05/08 23:25:36 ekohl Exp $
#
#
TARGET = blue
BASE_CFLAGS = -I../../../include
OBJECTS = $(TARGET).o $(TARGET).coff ../../../ntoskrnl/ntoskrnl.a
all: $(TARGET).sys
.phony: all
clean:
- $(RM) $(TARGET).o
- $(RM) $(TARGET).coff
- $(RM) junk.tmp
- $(RM) base.tmp
- $(RM) temp.exp
- $(RM) blue.sys
.phony: clean
floppy: $(FLOPPY_DIR)/drivers/$(TARGET).sys
$(FLOPPY_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
ifeq ($(DOSCLI),yes)
$(CP) $(TARGET).sys $(FLOPPY_DIR)\drivers\$(TARGET).sys
else
$(CP) $(TARGET).sys $(FLOPPY_DIR)/drivers/$(TARGET).sys
endif
dist: ../../../$(DIST_DIR)/drivers/$(TARGET).sys
../../../$(DIST_DIR)/drivers/$(TARGET).sys: $(TARGET).sys
ifeq ($(DOSCLI),yes)
$(CP) $(TARGET).sys ..\..\..\$(DIST_DIR)\drivers\$(TARGET).sys
else
$(CP) $(TARGET).sys ../../../$(DIST_DIR)/drivers/$(TARGET).sys
endif
$(TARGET).sys: $(OBJECTS)
$(CC) \
-specs=../../svc_specs \
-mdll \
-o junk.tmp \
-Wl,--defsym,_end=end \
-Wl,--defsym,_edata=__data_end__ \
-Wl,--defsym,_etext=etext \
-Wl,--base-file,base.tmp \
$(OBJECTS)
- $(RM) junk.tmp
$(DLLTOOL) \
--dllname $(TARGET).sys \
--base-file base.tmp \
--output-exp temp.exp \
--kill-at
- $(RM) base.tmp
$(CC) \
--verbose \
-Wl,--image-base,0x10000 \
-Wl,-e,_DriverEntry@8 \
-Wl,temp.exp \
-specs=../../svc_specs \
-mdll \
-o $(TARGET).sys \
$(OBJECTS)
- $(RM) temp.exp
include ../../../rules.mak

View File

@@ -0,0 +1,2 @@
DIRS=exe \
sys

View File

@@ -0,0 +1,168 @@
/*++
Copyright (c) 1996 Microsoft Corporation
Module Name:
EventTest.c
Abstract:
Simple console test app demonstrating how a Win32 app can share
an event object with a kernel-mode driver. For more information
on using Event Objects at the application level see the Win32 SDK.
Author:
Jeff Midkiff (jeffmi) 23-Jul-96
Enviroment:
User Mode
Revision History:
--*/
//
// INCLUDES
//
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <winioctl.h>
#include <conio.h>
#include "event.h"
//
// MAIN
//
void __cdecl
main(
int argc,
char ** argv
)
{
BOOL bStatus;
HANDLE hDevice;
ULONG ulReturnedLength;
SET_EVENT setEvent;
FLOAT fDelay;
if ( (argc < 2) || (argv[1] == NULL) ) {
printf("event <delay>\n");
printf("\twhere <delay> = time to delay the event signal in seconds.\n");
exit(0);
}
sscanf( argv[1], "%f", &fDelay );
//
// open the device
//
hDevice = CreateFile(
"\\\\.\\EVENT", // lpFileName
GENERIC_READ | GENERIC_WRITE, // dwDesiredAccess
FILE_SHARE_READ | FILE_SHARE_WRITE, // dwShareMode
NULL, // lpSecurityAttributes
OPEN_EXISTING, // dwCreationDistribution
0, // dwFlagsAndAttributes
NULL // hTemplateFile
);
if (hDevice == INVALID_HANDLE_VALUE) {
printf("CreateFile error = %d\n", GetLastError() );
exit(0);
}
//
// set the event signal delay
//
setEvent.DueTime.QuadPart = -((LONGLONG)(fDelay * 10.0E6));// use relative time for this sample
//
// test the driver for bad event handles
//
setEvent.hEvent = NULL;
bStatus = DeviceIoControl(
hDevice, // Handle to device
IOCTL_SET_EVENT, // IO Control code
&setEvent, // Input Buffer to driver.
SIZEOF_SETEVENT, // Length of input buffer in bytes.
NULL, // Output Buffer from driver.
0, // Length of output buffer in bytes.
&ulReturnedLength, // Bytes placed in buffer.
NULL // synchronous call
);
if ( !bStatus ) {
printf("Bad handle TEST returned code %d.\n\n", GetLastError() );
} else {
printf("we should never get here\n");
exit(0);
}
//
//
//
setEvent.hEvent = CreateEvent(
NULL, // lpEventAttributes
TRUE, // bManualReset
FALSE, // bInitialState
NULL // lpName
);
if ( !setEvent.hEvent ) {
printf("CreateEvent error = %d\n", GetLastError() );
} else {
printf("Event HANDLE = 0x%x\n", setEvent.hEvent );
printf("Press any key to exit.\n");
while( !_kbhit() ) {
bStatus = DeviceIoControl(
hDevice, // Handle to device
IOCTL_SET_EVENT, // IO Control code
&setEvent, // Input Buffer to driver.
SIZEOF_SETEVENT, // Length of input buffer in bytes.
NULL, // Output Buffer from driver.
0, // Length of output buffer in bytes.
&ulReturnedLength, // Bytes placed in buffer.
NULL // synchronous call
);
if ( !bStatus ) {
printf("Ioctl failed with code %d\n", GetLastError() );
break;
} else {
printf("Waiting for Event...\n");
WaitForSingleObject(setEvent.hEvent,
INFINITE );
printf("Event signalled.\n\n");
ResetEvent( setEvent.hEvent);
//printf("Event reset.\n");
}
}
}
//
// close the driver
//
if ( !CloseHandle(hDevice) ) {
printf("Failed to close device.\n");
}
exit(0);
}
// EOF

View File

@@ -0,0 +1,7 @@
#
# DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source
# file to this component. This file merely indirects to the real make file
# that is shared by all the driver components of the Windows NT DDK
#
!INCLUDE $(NTMAKEENV)\makefile.def

View File

@@ -0,0 +1,10 @@
TARGETNAME=event
TARGETPATH=$(BASEDIR)\lib
TARGETTYPE=PROGRAM
INCLUDES=..\sys
SOURCES=eventtest.c
UMTYPE=console
UMBASE=0x100000

View File

@@ -0,0 +1,50 @@
This sample demonstrates one way that a Windows NT kernel-mode device driver
can share and explicitly signal an Event Object with a Win32 application.
It is composed of two parts, a Windows NT kernel-mode device driver and a Win32
console test application. Both are built using the Windows NT DDK.
Instructions:
-------------
1) Build the driver and test application in either the FREE or CHECKED build environment:
BLD
Both the driver and application are put in %NTDDK%\LIB\*\FREE | CHECKED on your build machine.
2) Copy the newly built driver to your Target machine's %SystemRoot%\system32\drivers
directory. Copy the newly built application to your target machine.
Also copy the EVENT.INI file to your Target machine.
3) Update the Target machine's Registry by running REGINI.EXE on the EVENT.INI file, i.e.:
REGINI EVENT.INI
This adds a driver key under the
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services tree in the Registry.
You can verify this by running REGEDIT32.EXE and looking at the \Event key.
4) Reboot the Target machine for the Registry changes to take effect.
Your driver will not load until you reboot.
5) Load the driver from the command line:
NET START EVENT
6) Run the test app from the command line:
EVENT <DELAY>
where DELAY = time to delay the Event signal in seconds.
7) Unload the driver from the command line:
NET STOP EVENT

View File

@@ -0,0 +1,447 @@
/*++
Copyright (c) 1996 Microsoft Corporation
Module Name:
Event.c
Abstract:
This sample demonstrates one way that a Windows NT kernel-mode driver
can share and explicitly signal an Event Object with a Win32 application.
This sample uses the following method:
The application creates an event object using CreateEvent().
The app passes the event handle to the driver in a private IOCTL.
The driver is running in the app's thread context during the IOCTL so
there is a valid user-mode handle at that time.
The driver dereferences the user-mode handle into system space & saves
the new system handle for later use.
The driver signals the event via KeSetEvent() at IRQL <= DISPATCH_LEVEL.
The driver MUST delete any driver references to the event object at
Unload time.
An alternative method would be to create a named event in the driver via
IoCreateNotificationEvent and then open the event in user mode. This API
however is new to Windows NT 4.0 so you can not use this method in your
NT 3.5x drivers.
Note that this sample's event can be signalled (almost) at will from within
the driver. A different event signal can be set when the driver is setup to
do asynchronous I/O, and it is opened with FILE_FLAG_OVERLAPPED, and an
event handle is passed down in an OVERLAPPED struct from the app's Read,
Write, or DeviceIoControl. This different event signal is set by the I/O
Manager when the driver calls IoCompleteRequest on a pending Irp. This type
of Irp completion signal is not the purpose of this sample, hence the lack of
Irp queing.
Author:
Jeff Midkiff (jeffmi) 23-Jul-96
Enviroment:
Kernel Mode Only
Revision History:
--*/
//
// INCLUDES
//
#include "ntddk.h"
#include "event.h"
//
// DEFINES
//
#define USER_NAME L"\\DosDevices\\EVENT"
#define SYSTEM_NAME L"\\Device\\EVENT"
//
// DATA
//
typedef struct _DEVICE_EXTENSION {
KDPC Dpc;
KTIMER Timer;
HANDLE hEvent;
} DEVICE_EXTENSION, *PDEVICE_EXTENSION;
//
// PROTOS
//
NTSTATUS
DriverEntry(
IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPath
);
NTSTATUS
Unload(
IN PDRIVER_OBJECT DriverObject
);
NTSTATUS
Dispatch(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
);
VOID
CustomTimerDPC(
IN PKDPC Dpc,
IN PVOID DeferredContext,
IN PVOID SystemArgument1,
IN PVOID SystemArgument2
);
NTSTATUS
DriverEntry(
IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPath
)
/*++
Routine Description:
This routine gets called by the system to initialize the driver.
Arguments:
DriverObject - the system supplied driver object.
RegistryPath - the system supplied registry path for this driver.
Return Value:
NTSTATUS
--*/
{
PDEVICE_OBJECT pDeviceObject;
PDEVICE_EXTENSION pDeviceExtension;
UNICODE_STRING usSystemName;
UNICODE_STRING usUserName;
NTSTATUS status;
KdPrint(("Event!DriverEntry - IN\n"));
//
// create the device object
//
RtlInitUnicodeString( &usSystemName, SYSTEM_NAME );
status = IoCreateDevice(
DriverObject, // DriverObject
sizeof( DEVICE_EXTENSION ), // DeviceExtensionSize
&usSystemName, // DeviceName
FILE_DEVICE_UNKNOWN, // DeviceType
0, // DeviceCharacteristics
TRUE, // Exclusive
&pDeviceObject // DeviceObject
);
if ( !NT_SUCCESS(status) ) {
KdPrint(("\tIoCreateDevice returned 0x%x\n", status));
return( status );
}
//
// Set up dispatch entry points for the driver.
//
DriverObject->MajorFunction[IRP_MJ_CREATE] =
DriverObject->MajorFunction[IRP_MJ_CLOSE] =
DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = Dispatch;
DriverObject->DriverUnload = Unload;
//
// Create a symbolic link into user mode for the driver.
//
RtlInitUnicodeString( &usUserName, USER_NAME );
status = IoCreateSymbolicLink( &usUserName, &usSystemName );
if ( !NT_SUCCESS(status) ) {
IoDeleteDevice( pDeviceObject );
KdPrint(("\tIoCreateSymbolicLink returned 0x%x\n", status));
return( status );
}
//
// establish user-buffer access method
//
pDeviceObject->Flags |= DO_BUFFERED_IO;
//
// setup the device extension
//
pDeviceExtension = pDeviceObject->DeviceExtension;
KeInitializeDpc(
&pDeviceExtension->Dpc, // Dpc
CustomTimerDPC, // DeferredRoutine
pDeviceObject // DeferredContext
);
KeInitializeTimer(
&pDeviceExtension->Timer // Timer
);
pDeviceExtension->hEvent = NULL;
KdPrint(("Event!DriverEntry - OUT\n"));
return( status );
}
NTSTATUS
Unload(
IN PDRIVER_OBJECT DriverObject
)
/*++
Routine Description:
This routine gets called to remove the driver from the system.
Arguments:
DriverObject - the system supplied driver object.
Return Value:
NTSTATUS
--*/
{
PDEVICE_OBJECT pDeviceObject = DriverObject->DeviceObject;
PDEVICE_EXTENSION pDeviceExtension = pDeviceObject->DeviceExtension;
UNICODE_STRING usUserName;
KdPrint(("Event!Unload\n"));
//
// dereference the event object or it will NEVER go away until reboot
//
if ( pDeviceExtension->hEvent )
ObDereferenceObject( pDeviceExtension->hEvent );
// Delete the user-mode symbolic link.
RtlInitUnicodeString( &usUserName, USER_NAME );
IoDeleteSymbolicLink( &usUserName );
// Delete the DeviceObject
IoDeleteDevice( pDeviceObject );
return( STATUS_SUCCESS );
}
NTSTATUS
Dispatch(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
)
/*++
Routine Description:
This device control dispatcher handles IOCTLs.
Arguments:
DeviceObject - Context for the activity.
Irp - The device control argument block.
Return Value:
NTSTATUS
--*/
{
PDEVICE_EXTENSION pDeviceExtension;
PIO_STACK_LOCATION pIrpStack;
PSET_EVENT pSetEvent;
ULONG ulInformation = 0L;
NTSTATUS status = STATUS_NOT_IMPLEMENTED;
KdPrint(("Event!Dispatch - IN\n"));
pDeviceExtension = (PDEVICE_EXTENSION)DeviceObject->DeviceExtension;
pIrpStack = IoGetCurrentIrpStackLocation( Irp );
switch( pIrpStack->MajorFunction )
{
case IRP_MJ_CREATE:
case IRP_MJ_CLOSE:
KdPrint(("\t%s\n", (IRP_MJ_CREATE == pIrpStack->MajorFunction) ? "IRP_MJ_CREATE" : "IRP_MJ_CLOSE"));
status = STATUS_SUCCESS;
break;
case IRP_MJ_DEVICE_CONTROL:
switch( pIrpStack->Parameters.DeviceIoControl.IoControlCode )
{
case IOCTL_SET_EVENT:
KdPrint(("\tIOCTL_SET_EVENT\n"));
if ( pIrpStack->Parameters.DeviceIoControl.InputBufferLength < SIZEOF_SETEVENT ) {
// Parameters are invalid
KdPrint(("\tSTATUS_INVALID_PARAMETER\n"));
status = STATUS_INVALID_PARAMETER;
} else {
pSetEvent = (PSET_EVENT)Irp->AssociatedIrp.SystemBuffer;
KdPrint(("\tuser-mode HANDLE = 0x%x\n", pSetEvent->hEvent ));
status = ObReferenceObjectByHandle( pSetEvent->hEvent,
SYNCHRONIZE,
NULL,
KernelMode,
&pDeviceExtension->hEvent,
NULL
);
if ( !NT_SUCCESS(status) ) {
KdPrint(("\tUnable to reference User-Mode Event object, Error = 0x%x\n", status));
} else {
KdPrint(("\tkernel-mode HANDLE = 0x%x\n", pDeviceExtension->hEvent ));
//
// Start the timer to run the CustomTimerDPC in DueTime seconds to
// simulate an interrupt (which would queue a DPC).
// The user's event object is signaled in the DPC.
//
// ensure relative time for this sample
if ( pSetEvent->DueTime.QuadPart > 0 )
pSetEvent->DueTime.QuadPart = -(pSetEvent->DueTime.QuadPart);
KdPrint(("\tDueTime = %d\n", pSetEvent->DueTime.QuadPart ));
KeSetTimer(
&pDeviceExtension->Timer, // Timer
pSetEvent->DueTime, // DueTime
&pDeviceExtension->Dpc // Dpc
);
status = STATUS_SUCCESS;
}
}
break;
default:
// should never hit this
ASSERT(0);
status = STATUS_NOT_IMPLEMENTED;
break;
} // switch IoControlCode
break;
default:
// should never hit this
ASSERT(0);
status = STATUS_NOT_IMPLEMENTED;
break;
} // switch MajorFunction
//
// complete the Irp
//
Irp->IoStatus.Status = status;
Irp->IoStatus.Information = ulInformation;
IoCompleteRequest( Irp, IO_NO_INCREMENT );
KdPrint(("Event!Dispatch - OUT\n"));
return status;
}
VOID
CustomTimerDPC(
IN PKDPC Dpc,
IN PVOID DeferredContext,
IN PVOID SystemArgument1,
IN PVOID SystemArgument2
)
/*++
Routine Description:
This is the DPC associated with this drivers Timer object setup in DriverEntry.
Arguments:
Dpc - our DPC object associated with our Timer
DeferredContext - Context for the DPC that we setup in DriverEntry
SystemArgument1 -
SystemArgument2 -
Return Value:
Nothing.
--*/
{
PDEVICE_OBJECT pDeviceObject = DeferredContext;
PDEVICE_EXTENSION pDeviceExtension = pDeviceObject->DeviceExtension;
KdPrint(("Event!CustomTimerDPC - IN\n"));
//
// Signal the Event created user-mode
//
// Note:
// Do not call KeSetEvent from your ISR;
// you must call it at IRQL <= DISPATCH_LEVEL.
// Your ISR should queue a DPC and the DPC can
// then call KeSetEvent on the ISR's behalf.
//
KeSetEvent((PKEVENT)pDeviceExtension->hEvent,// Event
0, // Increment
FALSE // Wait
);
// there is no Irp to complete here
KdPrint(("Event!CustomTimerDPC - OUT\n"));
return;
}
// EOF

View File

@@ -0,0 +1,43 @@
/*++
Copyright (c) 1996 Microsoft Corporation
Module Name:
Event.h
Abstract:
Author:
Jeff Midkiff (jeffmi) 23-Jul-96
Enviroment:
Revision History:
--*/
#ifndef __EVENT__
#define __EVENT__
#include "devioctl.h"
typedef struct _SET_EVENT
{
HANDLE hEvent;
LARGE_INTEGER DueTime; // requested DueTime in 100-nanosecond units
} SET_EVENT, *PSET_EVENT;
#define SIZEOF_SETEVENT sizeof(SET_EVENT)
#define IOCTL_SET_EVENT \
CTL_CODE( FILE_DEVICE_UNKNOWN, 0x800, METHOD_BUFFERED, FILE_ANY_ACCESS )
#endif // __EVENT__

View File

@@ -0,0 +1,7 @@
; note - the service name matches the driver's file (.sys) name
\Registry\Machine\System\CurrentControlSet\Services\Event
Type = REG_DWORD 0x00000001
Start = REG_DWORD 0x00000003
Group = Extended Base
ErrorControl = REG_DWORD 0x00000001

View File

@@ -0,0 +1,11 @@
#include <windows.h>
#include <ntverp.h>
#define VER_FILETYPE VFT_DRV
#define VER_FILESUBTYPE VFT2_DRV_SYSTEM
#define VER_FILEDESCRIPTION_STR "Sample Event Driver"
#define VER_INTERNALNAME_STR "event.sys"
#include "common.ver"

View File

@@ -0,0 +1,7 @@
#
# DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source
# file to this component. This file merely indirects to the real make file
# that is shared by all the driver components of the Windows NT DDK
#
!INCLUDE $(NTMAKEENV)\makefile.def

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