mirror of
https://github.com/reactos/reactos
synced 2025-10-07 17:02:50 +02:00
Compare commits
1 Commits
ReactOS-0.
...
ReactOS-0.
Author | SHA1 | Date | |
---|---|---|---|
|
355df5f7ed |
@@ -1,625 +1,3 @@
|
||||
2003-06-27 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* lib/user32/controls/button.c (ButtonWndProc_comm): Fix unsigned/signed
|
||||
warning.
|
||||
|
||||
2003-06-07 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* include/ddk/dbgfuncs.h: Move ...
|
||||
* include/ntos/dbgfuncs.h: ... here.
|
||||
* include/basetsd.h (LONG32): Make it a long.
|
||||
* include/ntos.h: Include ntos/dbgfuncs.h.
|
||||
* include/ddk/dbgfuncs.h (DBG_STATUS_*, DBG_GET_SHOW_*): Move to
|
||||
include/ntos/dbgfuncs.h.
|
||||
* include/ddk/exfuncs.h (ExNotifyCallback): Match w32api prototype.
|
||||
(*BinaryTree, *SplayTree, *HashTable): Move to include/ntos/zw.h.
|
||||
* include/ddk/extypes.h (TRAVERSE_METHOD, PKEY_COMPARATOR,
|
||||
PTRAVERSE_ROUTINE, _BINARY_TREE_NODE, BINARY_TREE, SPLAY_TREE_NODE,
|
||||
SPLAY_TREE, HASH_TABLE): Move to include/ntos/zwtypes.h.
|
||||
* include/ddk/status.h (STATUS_PATH_SYNTAX_BAD): Rename to
|
||||
STATUS_OBJECT_PATH_SYNTAX_BAD.
|
||||
* apps/utils/objdir/objdir.c (StatusToName): Change
|
||||
STATUS_PATH_SYNTAX_BAD to STATUS_OBJECT_PATH_SYNTAX_BAD.
|
||||
* ntoskrnl/dbg/errinfo.c: Use STATUS_OBJECT_PATH_SYNTAX_BAD.
|
||||
* include/ntos/rtl.h (RtlQueryRegistryValues, RtlWriteRegistryValue,
|
||||
RtlDeleteRegistryValue): Match w32api prototypes.
|
||||
* include/ntos/zw.h (ZwQuerySystemTime): Ditto.
|
||||
* lib/kernel32/file/cnotify.c (FindFirstChangeNotificationW): Use
|
||||
STATUS_OBJECT_PATH_SYNTAX_BAD.
|
||||
* lib/ntdll/rtl/registry.c (RtlDeleteRegistryValue,
|
||||
RtlQueryRegistryValues, RtlWriteRegistryValue): Match w32api prototypes.
|
||||
* ntoskrnl/cm/cm.h, ntoskrnl/cm/ntfunc.c, ntoskrnl/cm/regfile.c: Change
|
||||
FILETIME to LARGE_INTEGER.
|
||||
* ntoskrnl/cm/rtlfunc.c (RtlDeleteRegistryValue, RtlQueryRegistryValues,
|
||||
RtlWriteRegistryValue): Match w32api prototypes.
|
||||
* ntoskrnl/ex/callback.c (ExNotifyCallback): Ditto.
|
||||
* ntoskrnl/ex/time.c (NtQuerySystemTime): Ditto.
|
||||
|
||||
2003-06-07 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* hal/halx86/dma.c (AdapterObjects): Don't put braces on scalar
|
||||
initializers.
|
||||
|
||||
2003-06-07 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
Changes for compiling with w32api
|
||||
|
||||
* include/ddk/obfuncs.h (ObCreateObject): Remove.
|
||||
* include/ntos/zwtypes.h (ObRosCreateObject): Add.
|
||||
* ntoskrnl/ntoskrnl.def, ntoskrnl/ntoskrnl.edf: Export ObCreateObject@36
|
||||
and ObRosCreateObject@20.
|
||||
* ntoskrnl/cm/ntfunc.c, ntoskrnl/cm/registry.c, ntoskrnl/cm/regobj.c,
|
||||
ntoskrnl/io/create.c, ntoskrnl/io/device.c, ntoskrnl/io/iocomp.c,
|
||||
ntoskrnl/lpc/connect.c, ntoskrnl/lpc/create.c, ntoskrnl/mm/section.c,
|
||||
ntoskrnl/nt/evtpair.c, ntoskrnl/nt/mutant.c, ntoskrnl/nt/ntevent.c,
|
||||
ntoskrnl/nt/ntsem.c, ntoskrnl/nt/nttimer.c, ntoskrnl/nt/profile.c,
|
||||
ntoskrnl/ob/dirobj.c, ntoskrnl/ob/namespc.c, ntoskrnl/ob/symlink.c,
|
||||
ntoskrnl/ps/create.c, ntoskrnl/ps/process.c, ntoskrnl/se/token.c,
|
||||
subsys/win32k/ntuser/winsta.c: Use ObRosCreateObject, not ObCreateObject.
|
||||
* ntoskrnl/ob/object.c (ObRosCreateObject): Rename from ObCreateObject.
|
||||
(ObCreateObject): Add stub.
|
||||
|
||||
2003-06-07 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
Changes for compiling with w32api
|
||||
|
||||
* include/ddk/cctypes.h (PREACTOS_COMMON_FCB_HEADER): Remove.
|
||||
(FSRTL_COMMON_FCB_HEADER): Add.
|
||||
* include/ddk/iotypes.h (FILE_OBJECT): Rename field
|
||||
SectionObjectPointers to SectionObjectPointer.
|
||||
* ntoskrnl/cc/copy.c, ntoskrnl/cc/misc.c, ntoskrnl/cc/pin.c,
|
||||
ntoskrnl/cc/view.c, ntoskrnl/io/rawfs.c, ntoskrnl/mm/section.c,
|
||||
drivers/fs/cdfs/cleanup.c, drivers/fs/cdfs/fcb.c,
|
||||
drivers/fs/cdfs/fsctl.c, drivers/fs/ntfs/fcb.c, drivers/fs/ntfs/fsctl.c,
|
||||
drivers/fs/vfat/close.c, drivers/fs/vfat/create.c,
|
||||
drivers/fs/vfat/finfo.c, drivers/fs/vfat/fcb.c, drivers/fs/vfat/fsctl.c:
|
||||
Use new FILE_OBJECT structure.
|
||||
* drivers/fs/cdfs/cdfs.h, drivers/fs/ntfs/ntfs.h, drivers/fs/vfat/vfat.h:
|
||||
Use new FSRTL_COMMON_FCB_HEADER structure.
|
||||
* drivers/net/afd/include/afd.h (FSRTL_COMMON_FCB_HEADER): Remove.
|
||||
* include/ddk/ketypes.h (KQUEUE): Match w32api structure.
|
||||
* ntoskrnl/ke/queue.c, ntoskrnl/ke/wait.c: Use new structure.
|
||||
* ntoskrnl/ke/spinlock.c (KeAcquireSpinLockAtDpcLevel,
|
||||
KeReleaseSpinLockFromDpcLevel): Undefine before declaring.
|
||||
|
||||
2003-06-07 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
Changes for compiling with w32api
|
||||
|
||||
* include/ddk/ketypes.h (KSPIN_LOCK, PKSPIN_LOCK): Match w32api
|
||||
structures.
|
||||
* ntoskrnl/ke/spinlock.c: Use new structures.
|
||||
|
||||
2003-06-07 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
Changes for compiling with w32api
|
||||
|
||||
* include/ddk/service.h: Move ...
|
||||
* include/ntos/service.h: ... here.
|
||||
* include/ddk/kdfuncs.h: Move ...
|
||||
* include/ntos/kdfuncs.h: ... here.
|
||||
* include/ntos/halfuncs.h: New file.
|
||||
* ntoskrnl/include/internal/hal/hal.h,
|
||||
ntoskrnl/include/internal/hal/bus.h,
|
||||
ntoskrnl/include/internal/hal/mps.h: Remove.
|
||||
* hal/halx86/include/hal.h: Remove disabled code.
|
||||
* include/ntos.h: Include ntos/service.h, ntos/halfuncs.h, and
|
||||
ntos/kdfuncs.h.
|
||||
* include/ddk/fstypes.h (FILE_LOCK_TOC): Move ...
|
||||
* include/ntos/file.h: ... here.
|
||||
* include/ddk/halfuncs.h (HalAllProcessorsStarted,
|
||||
HalBeginSystemInterrupt, HalDisableSystemInterrupt,
|
||||
HalEnableSystemInterrupt, HalEndSystemInterrupt,
|
||||
HalInitializeProcessor, HalInitSystem, HalReportResourceUsage): Move to
|
||||
include/ntos/halfuncs.h.
|
||||
* include/ddk/iofuncs.h (IoAssignDriveLetters): Ditto.
|
||||
* include/ddk/kefuncs.h (KeInitializeApc): Match w32api prototype.
|
||||
(KeRaiseIrqlToSynchLevel): Move to include/ntos/halfuncs.h.
|
||||
* include/ddk/ketypes.h (KAPC_ENVIRONMENT): Move to include/ntos/types.h.
|
||||
(KDEVICE_QUEUE, KDEVICE_QUEUE_ENTRY): Match w32api prototype.
|
||||
(KINTERRUPT): Move to include/ntos/zwtypes.h.
|
||||
* include/ddk/mmtypes.h (PAGE_ROUND_UP, PAGE_ROUND_DOWN): Move ...
|
||||
* include/ntos/mm.h: ... here.
|
||||
* include/ddk/ntddk.h: Don't include ddk/kdfuncs.h.
|
||||
* include/ddk/pstypes.h (PKTHREAD, PRKTHREAD): Add.
|
||||
(PsInitialSystemProcess, PsProcessType, PsThreadType): Move ...
|
||||
include/ntos/ps.h: ... here.
|
||||
* lib/ntdll/rtl/i386/exception.c (SehpContinue): New.
|
||||
* ntoskrnl/rtl/i386/exception.c (SehpContinue): Ditto.
|
||||
* ntoskrnl/include/internal/ke.h: Include <ddk/ntifs.h>.
|
||||
* ntoskrnl/include/internal/ntoskrnl.h: Include internal/ke.h.
|
||||
* ntoskrnl/ex/napi.c: Use new structure SSDT_ENTRY.
|
||||
* ntoskrnl/ke/apc.c (KeInitializeApc): Match w32api prototype.
|
||||
* ntoskrnl/ke/kqueue.c: Use fields of new structures KDEVICE_QUEUE
|
||||
and KDEVICE_QUEUE_ENTRY.
|
||||
|
||||
2003-06-07 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* ntoskrnl/cm/regfile.c (CmiCopyKey): Fix unsigned/signed warning.
|
||||
|
||||
2003-06-05 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* lib/user32/windows/icon.c (CURSORICON_FindBestCursor,
|
||||
CURSORICON_FindBestIcon): Fix unsigned/signed warning.
|
||||
|
||||
2003-06-05 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
Changes for compiling with w32api
|
||||
|
||||
* ntoskrnl/include/internal/i386/ps.h (KPCR_TSS): Redefine as 0x3C.
|
||||
(KPCR_TIB): New structure.
|
||||
(IKPCR): Ditto.
|
||||
(KPCR): Match w32api structure fieldnames.
|
||||
* ntoskrnl/ke/main.c (ExpInitializeExecutive): Adjust for changes to KPCR.
|
||||
* ntoskrnl/ke/i386/kernel.c: Ditto.
|
||||
* ntoskrnl/ps/thread.c: Ditto.
|
||||
|
||||
2003-06-01 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
Changes for compiling with w32api
|
||||
|
||||
* include/ntos/zwtypes.h (SYSTEM_MODULES): Rename to
|
||||
SYSTEM_MODULE_INFORMATION. Match w32api structure fieldnames.
|
||||
(SYSTEM_MODULE_INFORMATION): Rename to SYSTEM_MODULE_INFORMATION_ENTRY.
|
||||
Match w32api structure fieldnames.
|
||||
* include/epsapi.h: Include <ntos.h>.
|
||||
(PSYSMOD_ENUM_ROUTINE, PsaCaptureSystemModules, PsaWalkSystemModules,
|
||||
PsaWalkFirstSystemModule, PsaWalkNextSystemModule): Use
|
||||
SYSTEM_MODULE_INFORMATION_ENTRY and SYSTEM_MODULE_INFORMATION structures.
|
||||
* lib/epsapi/enum/drivers.c: Use SYSTEM_MODULE_INFORMATION_ENTRY and
|
||||
SYSTEM_MODULE_INFORMATION structures.
|
||||
* lib/psapi/misc/win32.c: Ditto.
|
||||
* ntoskrnl/ldr/loader.c: Ditto.
|
||||
* lib/epsapi/enum/modules.c: Include <ntos.h>.
|
||||
* lib/ntdll/rtl/thread.c: Ditto.
|
||||
* lib/rosrtl/thread/context.c: Ditto.
|
||||
* lib/rosrtl/thread/create.c: Ditto.
|
||||
* lib/rosrtl/thread/stack.c: Ditto.
|
||||
* include/ntos.h: Include "rosrtl/thread.h".
|
||||
* include/structs.h (_BLOB_DEFINED): Rename to __BLOB_T_DEFINED.
|
||||
* include/winsock2.h: Ditto.
|
||||
* include/ntos/obtypes.h (POBJECT_TYPE): Make a pointer to struct
|
||||
_OBJECT_TYPE.
|
||||
(PHANDLE_TABLE): Make a pointer to struct _HANDLE_TABLE.
|
||||
* ntoskrnl/include/internal/mm.h (PSECTION_OBJECT): Make a pointer to
|
||||
struct _SECTION_OBJECT.
|
||||
* ntoskrnl/include/internal/i386/ps.h (PKPCR): Make a pointer to struct
|
||||
_KPCR.
|
||||
|
||||
2003-05-28 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* Makefile: Update bootcd target.
|
||||
|
||||
2003-05-28 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* subsys/system/usetup/progress.c (ProgressNextStep): Check if NewPos
|
||||
is odd.
|
||||
|
||||
2003-05-28 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
Changes for compiling with w32api
|
||||
|
||||
* include/ddk/haltypes.h: Move ...
|
||||
* include/ntos/haltypes.h: ... here.
|
||||
* include/ddk/obtypes.h: Move ...
|
||||
* include/ntos/obtypes.h: ... here.
|
||||
* include/ddk/i386/tss.h: Move ...
|
||||
* include/ntos/tss.h: ... here.
|
||||
* include/errors.h, include/windows.h: #include_next <windows.h>.
|
||||
* include/ntos.h: Include "ntos/haltypes.h", "ntos/obtypes.h", and
|
||||
"ntos/tss.h".
|
||||
* include/ddk/defines.h (EXPORTED, IMPORTED): Move to
|
||||
include/ntos/types.h.
|
||||
* include/ddk/exfuncs.h, include/ddk/mmtypes.h, include/ntos/except.h,
|
||||
include/ntos/file.h, include/ole32/guiddef.h, include/win32k/color.h,
|
||||
lib/msafd/include/debug.h, lib/user32/include/debug.h,
|
||||
lib/ws2_32/include/debug.h, lib/ws2help/debug.h,
|
||||
ntoskrnl/include/internal/debug.h, ntoskrnl/ke/i386/bthread.S,
|
||||
ntoskrnl/rtl/error.c: Don't define macros if previously defined.
|
||||
* include/ddk/halfuncs.h: Include <ntos/haltypes.h>.
|
||||
* include/ddk/iotypes.h: Include <ntos/obtypes.h>.
|
||||
* include/ddk/ketypes.h (MB_FLAGS_*, LOADER_MODULE, ADDRESS_RANGE,
|
||||
LOADER_PARAMETER_BLOCK): Move to include/ntos/types.h.
|
||||
* include/ddk/ntddk.h: #include_next <ddk/ntddk.h>.
|
||||
* include/ddk/ntifs.h: #include_next <ddk/ntifs.h>.
|
||||
* include/napi/shared_data.h (SharedUserData): Undefine before defining.
|
||||
* include/ntos/rtl.h (RtlUpcaseUnicodeString): Correct prototype.
|
||||
* include/ntos/zwtypes.h (THREAD_STATE): Add.
|
||||
* lib/ntdll/rtl/unicode.c (RtlUpcaseUnicodeString): Match new prototype.
|
||||
* ntoskrnl/rtl/unicode.c (RtlUpcaseUnicodeString): Ditto.
|
||||
* lib/string/Makefile: Include Makefile.$(ARCH). Don't include
|
||||
makefile.$(ARCH).
|
||||
* ntoskrnl/ex/sysinfo.c, ntoskrnl/include/internal/ntoskrnl.h,
|
||||
* ntoskrnl/include/internal/ob.h, ntoskrnl/ob/handle.c: Include <ntos.h>.
|
||||
* ntoskrnl/ke/i386/syscall.S: Don't include <ddk/defines.h>.
|
||||
(KernelMode, UserMode): Define.
|
||||
* ntoskrnl/ke/i386/stkswitch.S, ntoskrnl/ke/i386/tskswitch.S,
|
||||
ntoskrnl/ke/i386/v86m_sup.S: Include <ntos/tss.h>
|
||||
|
||||
2003-05-25 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* Makefile: Fix typo.
|
||||
|
||||
2003-05-25 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* Makefile: Don't install system.hiv. Install fonts and nls directory.
|
||||
* tools/rcopy.c (copy_file, copy_directory, is_directory): New functions.
|
||||
|
||||
2003-05-17 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* ntoskrnl/io/irp.c (IofCallDriver): Don't reference FileObject.
|
||||
|
||||
2003-05-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* ntoskrnl/io/cleanup.c (IopCompleteRequest1, IoSecondStageCompletion):
|
||||
Don't dereference Irp->UserEvent here.
|
||||
* ntoskrnl/io/irp.c (IofCallDriver): Reference FileObject.
|
||||
* ntoskrnl/io/rw.c (IopReadWriteIoComplete): New function.
|
||||
* (NtReadFile, NtWriteFile): Set I/O completion routine if using an
|
||||
event that is under object manager control.
|
||||
|
||||
2003-05-13 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* ntoskrnl/Makefile (OBJECTS_IO): Add io/rawfs.o.
|
||||
* ntoskrnl/cm/registry.c (CmiInitHives): Check status using NT_SUCCESS().
|
||||
* ntoskrnl/include/internal/io.h (RawFsIsRawFileSystemDeviceObject,
|
||||
RawFsDriverEntry): Add prototypes.
|
||||
* ntoskrnl/include/internal/ntoskrnl.h (IoInit2): Add prototype.
|
||||
* ntoskrnl/io/device.c (IopCreateDriverObject): Handle unnamed services.
|
||||
* ntoskrnl/io/fs.c (IoMountVolume): Handle mounting of raw volumes.
|
||||
(IoRegisterFileSystem): Add registered filesystem device objects at the
|
||||
head of the list.
|
||||
* ntoskrnl/io/iomgr.c (IoInit2): New function.
|
||||
* ntoskrnl/ke/main.c (ExpInitializeExecutive): Call IoInit2().
|
||||
* ntoskrnl/mm/section.c (MmQuerySectionView): Check return value of call
|
||||
to MmFindRegion().
|
||||
* ntoskrnl/io/rawfs.c: New file.
|
||||
|
||||
2003-05-11 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* lib/fslib/vfatlib/vfatlib.c (VfatFormat): Set hidden sectors.
|
||||
* ntoskrnl/io/xhaldrv.c (xHalIoWritePartitionTable): Implement support
|
||||
for primary partitions.
|
||||
* subsys/system/usetup/partlist.c (CreateSelectedPartition): Compute
|
||||
hidden sectors.
|
||||
* subsys/system/usetup/usetup.c (SelectPartitionPage,
|
||||
DrawFileSystemList, FormatPartitionPage): Don't use conditional define
|
||||
ENABLE_FORMAT.
|
||||
(CreateFileSystemList): Don't draw "Keep current file system" option if
|
||||
formatting is needed.
|
||||
(SelectFileSystemPage): Figure out if partition must be formatted.
|
||||
* subsys/system/usetup/usetup.h (ENABLE_FORMAT): Remove.
|
||||
(FILE_SYSTEM_LIST): Add ForceFormat field.
|
||||
|
||||
2003-05-11 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* lib/user32/windows/font.c (TEXT_PathEllipsify, TEXT_Reprefix): Fix
|
||||
unsigned/signed warning.
|
||||
* ntoskrnl/mm/pagefile.c (MmWriteToSwapPage, MmReadFromSwapPage,
|
||||
NtCreatePagingFile): Ditto.
|
||||
|
||||
2003-05-05 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* tools/helper.mk: Kill implicit rule ".o".
|
||||
|
||||
2003-04-28 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* Makefile (DLLS): Add epsapi, psapi and wsock32.
|
||||
* lib/ntdll/ldr/utils.c (LdrPerformRelocations): Handle the case where a
|
||||
relocation crosses a page boundary.
|
||||
(LdrFixupImports): Use image load address in calculatation of import
|
||||
address list.
|
||||
|
||||
2003-04-28 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* lib/fslib/vfatlib/vfatlib.h: New file.
|
||||
* subsys/system/usetup/format.c: Ditto.
|
||||
* subsys/system/usetup/format.h: Ditto.
|
||||
* lib/fslib/vfatlib/vfatlib.c (GetShiftCount): Define.
|
||||
(VfatWriteBootSector, VfatWriteFsInfo, VfatWriteFAT,
|
||||
VfatWriteRootDirectory): New function.
|
||||
(VfatFormat): Implement.
|
||||
* subsys/system/usetup/bootsup.c: (InstallFat32BootCodeToFile): Use
|
||||
0x0000 as marker to disable backup boot sector.
|
||||
(InstallFat32BootCodeToDisk): Add lower 8-bit to BackupBootSector.
|
||||
Also treat 0x0000 as no backup boot sector is available.
|
||||
* subsys/system/usetup/makefile (TARGET_SDKLIBS): Define.
|
||||
(TARGET_OBJECTS): Add format.o.
|
||||
* subsys/system/usetup/partlist.c (AddPartitionList): Initialize
|
||||
PartNumber field.
|
||||
(GetSelectedPartition): Set PartEntryNumber correctly.
|
||||
(CreateSelectedPartition): Write partition information to disk.
|
||||
(DeleteSelectedPartition): New function.
|
||||
* subsys/system/usetup/partlist.h (PARTDATA): Add field CreatePartition.
|
||||
(DeleteSelectedPartition): Prototype.
|
||||
* subsys/system/usetup/usetup.c (ConfirmDeletePartition): New function.
|
||||
(SelectPartitionPage): Support deletion of partition.
|
||||
(FormatPartitionPage): Support formatting of partition.
|
||||
|
||||
2003-04-27 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* tools/helper.mk (TARGET_ASFLAGS): Add -march and define MK_ARCH_ID.
|
||||
* lib/ntdll/makefile (TARGET_ASFLAGS): Define as
|
||||
"-I $(PATH_TO_TOP)/include".
|
||||
(TARGET_OBJECTS): Add ldr/entry.o.
|
||||
* lib/ntdll/ldr/startup.c: Move inline assembly code...
|
||||
* lib/ntdll/ldr/entry.S: ...here. New file.
|
||||
|
||||
2003-04-27 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* include/kernel32/kernel32.h (assert): Define.
|
||||
* tools/mkhive/.cvsignore: New file.
|
||||
|
||||
2003-04-18 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* subsys/system/usetup/partlist.c (AddPartitionList): Create
|
||||
unpartitioned areas.
|
||||
(CreatePartitionListNoGUI): Save disk geometry.
|
||||
(PrintDiskData): Do not print hidden partition list entries.
|
||||
(ScrollDownPartitionList, ScrollUpPartitionList): Skip hidden partition
|
||||
list entries.
|
||||
(GetActiveBootPartition): Use CurrentDisk as index.
|
||||
(CreateSelectedPartition): New function.
|
||||
* subsys/system/usetup/partlist.h (PARTDATA): Add field NewPartSize.
|
||||
(PARTENTRY): Add fields StartingOffset and HidePartEntry.
|
||||
(DISKENTRY): Add fields Cylinders, TracksPerCylinder, SectorsPerTrack,
|
||||
and BytesPerSector;
|
||||
(CreateSelectedPartition): Add Prototype.
|
||||
* subsys/system/usetup/usetup.c (PAGE_NUMBER): Add CREATE_PARTITION_PAGE
|
||||
and FORMAT_PARTITION_PAGE
|
||||
(CurrentPartitionList, CurrentFileSystemList): New globals.
|
||||
(SelectPartitionPage): Set CurrentPartitionList.
|
||||
(PARTITION_SIZE_INPUT_FIELD_LENGTH): Define as 6.
|
||||
(DrawInputField, ShowPartitionSizeInputBox, CreatePartitionPage,
|
||||
CreateFileSystemList, DestroyFileSystemList, DrawFileSystemList,
|
||||
ScrollDownFileSystemList, ScrollUpFileSystemList, FormatPartitionPage):
|
||||
New functions.
|
||||
(SelectFileSystemPage): Draw partition screen.
|
||||
(CheckFileSystemPage): Handle CREATE_PARTITION_PAGE and
|
||||
FORMAT_PARTITION_PAGE.
|
||||
* subsys/system/usetup/usetup.h (FILE_SYSTEM, FILE_SYSTEM_LIST): Add enums.
|
||||
|
||||
2003-04-17 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* tools/mkhive/infcache.c (InfpCacheFindSection, InfpCacheFindKeyLine,
|
||||
InfFindFirstLine, InfFindFirstMatchLine, InfFindNextMatchLine,
|
||||
InfGetLineCount): Change call to stricmp() to strcasecmp().
|
||||
* tools/mkhive/reginf.c (GetRootKey): Ditto.
|
||||
* tools/mkhive/registry.c (RegSetValue, RegQueryValue): Ditto.
|
||||
|
||||
2003-04-13 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* ntoskrnl/kd/gdbstub.c (KdEnterDebuggerException): Fix signed/unsigned
|
||||
comparison warning.
|
||||
* ntoskrnl/ke/i386/exp.c (KiKernelTrapHandler): Ditto.
|
||||
* ntoskrnl/ke/i386/usertrap.c (KiUserTrapHandler): Ditto.
|
||||
* tools/helper.mk: Do not install static libraries.
|
||||
|
||||
2003-04-13 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* tools/Makefile: Fix rule for mkflpimg.
|
||||
|
||||
2003-04-12 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* tools/cdmake/Makefile: Use HOST_CC.
|
||||
* tools/cdmake/cdmake.c (MAX_PATH, DIR_SEPARATOR_CHAR,
|
||||
DIR_SEPARATOR_STRING): Define.
|
||||
(directory_record): Add fields name_on_cd and extension_on_cd.
|
||||
(error_exit): Make a macro. Avoid using vfprintf and fprintf.
|
||||
(write_directory_record, new_directory_record, compare_directory_order,
|
||||
pass): Use name_on_cd and extension_on_cd.
|
||||
(make_directory_records, get_file_specifications): Use DIR_SEPARATOR_CHAR.
|
||||
(new_directory_record, make_directory_records): Linux implementations.
|
||||
(main): Use DIR_SEPARATOR_CHAR.
|
||||
|
||||
2003-04-06 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* lib/freetype/.cvsignore: Ignore nul.
|
||||
|
||||
2003-04-06 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* drivers/storage/atapi/atapi.c (AtapiReadWrite): Expect an interrupt a
|
||||
bit sooner.
|
||||
* hal/halx86/isa.c (HalpGetIsaInterruptVector): Compute vector for MP.
|
||||
* hal/halx86/pci.c (HalpGetPciInterruptVector): Ditto.
|
||||
* hal/halx86/sysbus.c (HalpGetSystemInterruptVector): Ditto.
|
||||
* hal/halx86/mp.c (AssignIrqVector): Rewrite.
|
||||
(MpsTimerHandler): Disable for now.
|
||||
(MpsSpuriousHandler): Do not acknowledge interrupt.
|
||||
(HalAllProcessorsStarted): Only boot 1 CPU for now.
|
||||
(RescheduleDpcRoutine): New function.
|
||||
(RescheduleDpc): New variable.
|
||||
(HalpInitMPS): Initialize RescheduleDpc. Fix bug in call to memset.
|
||||
* hal/halx86/mpsirql.c: Rewrite.
|
||||
* hal/halx86/include/mps.h (VECTOR2IRQ, IRQ2VECTOR, VECTOR2IRQL,
|
||||
IRQL2VECTOR): New macros.
|
||||
* ntoskrnl/ntoskrnl.def: Add KeRescheduleThread@0.
|
||||
* ntoskrnl/ntoskrnl.edf: Ditto.
|
||||
* ntoskrnl/include/internal/ke.h (KeRescheduleThread): Prototype.
|
||||
* ntoskrnl/ke/kthread.c (KeRescheduleThread): New function.
|
||||
* ntoskrnl/ke/i386/exp.c (KeInitExceptions): Remove unneeded call to
|
||||
set_trap_gate().
|
||||
* ntoskrnl/ke/i386/irq.c (VECTOR2IRQ, IRQ2VECTOR, VECTOR2IRQL): Correct.
|
||||
(IRQ_BASE): Define as FIRST_DEVICE_VECTOR.
|
||||
(NR_IRQS): Define using IRQ_BASE.
|
||||
(KeInitInterrupts): Use IRQ_BASE.
|
||||
(KiInterruptDispatch2): Rewrite.
|
||||
(KiInterruptDispatch): Ditto.
|
||||
(KeConnectInterrupt): Pass Vector to HalEnableSystemInterrupt() for MP.
|
||||
(KeDisconnectInterrupt): Pass Vector to HalDisableSystemInterrupt() for MP.
|
||||
* ntoskrnl/ke/i386/trap.s (_KiTrapProlog): Change 0x124 to KPCR_CURRENT_THREAD.
|
||||
|
||||
2003-04-06 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* Makefile: Add format.
|
||||
* include/fslib/vfatlib.h (VfatFormat): Prototype.
|
||||
* lib/fmifs/format.c (VfatFormat): Add stub.
|
||||
* lib/fmifs/makefile (TARGET_LIBS): Add vfatlib.a.
|
||||
* lib/fslib/vfatlib/vfatlib.c (VfatFormat): Add stub.
|
||||
* tools/helper.mk: Do not install .sym files for static libraries.
|
||||
* subsys/system/format: New directory.
|
||||
* subsys/system/format/makefile: New file.
|
||||
* subsys/system/format/format.c: Ditto.
|
||||
|
||||
2003-04-05 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* include/fslib: New directory.
|
||||
* lib/fslib: Ditto.
|
||||
* lib/fslib/vfatlib: Ditto.
|
||||
* include/fslib/vfatlib.h: New file.
|
||||
* lib/fslib/vfatlib/.cvsignore: Ditto.
|
||||
* lib/fslib/vfatlib/Makefile: Ditto.
|
||||
* lib/fslib/vfatlib/vfatlib.c: Ditto.
|
||||
* Makefile: Support file system libraries
|
||||
* lib/zlib/Makefile: Remove nostrip target.
|
||||
* tools/helper.mk: Add nostrip target.
|
||||
|
||||
2003-04-05 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* tools/.cvsignore: Ignore rline.
|
||||
|
||||
2003-04-05 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* bootcd.bat: Install dosmbr.bin.
|
||||
* drivers/storage/disk/disk.c (DiskClassDeviceControl): Pass physical
|
||||
device object to IoWritePartitionTable().
|
||||
* ntoskrnl/io/xhaldrv.c (xHalReadMBR): New function.
|
||||
(xHalWriteMBR): Ditto.
|
||||
(xHalExamineMBR): Use xHalReadMBR() to read MBR.
|
||||
(xHalIoWritePartitionTable): Partial implement.
|
||||
* subsys/system/usetup/bootsup.c (InstallMBRBootCodeToDisk): New function.
|
||||
* subsys/system/usetup/bootsup.h (InstallMBRBootCodeToDisk): Prototype.
|
||||
* subsys/system/usetup/partlist.c (CreatePartitionListNoGUI): New function.
|
||||
(CreatePartitionList): Use CreatePartitionListNoGUI() to create partition
|
||||
list.
|
||||
(GetPartitionInformation): New function.
|
||||
(MarkPartitionActive): Ditto.
|
||||
* subsys/system/usetup/partlist.h (MarkPartitionActive): Prototype.
|
||||
* subsys/system/usetup/usetup.c (SelectPartitionPage): Make SystemRootPath
|
||||
point to the selected partition if no partitions are active.
|
||||
(BootLoaderPage): If no partitions are active, then install a DOS MBR and
|
||||
mark the selected partition active.
|
||||
|
||||
2003-04-05 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* Makefile: Add bootcd target.
|
||||
(BOOTCD_INSTALL): Set for bootcd install.
|
||||
* rules.mak (TOPDIR): Define on windows.
|
||||
(BOOTCD_DIR): Define.
|
||||
(RLINE): Define.
|
||||
* apps/tests/lpc/makefile: Handle BOOTCD_INSTALL.
|
||||
* apps/tests/mstest/Makefile: Ditto.
|
||||
* apps/tests/nptest/Makefile: Ditto.
|
||||
* apps/tests/shm/makefile: Ditto.
|
||||
* ntoskrnl/Makefile: Handle BOOTCD_INSTALL. Add bootcd target.
|
||||
* drivers/dd/vga/makefile: Add bootcd target.
|
||||
* drivers/dd/blue/makefile (TARGET_BOOTSTRAP): Define as yes.
|
||||
* drivers/dd/floppy/Makefile: Ditto.
|
||||
* drivers/fs/cdfs/makefile: Ditto.
|
||||
* drivers/fs/ntfs/makefile: Ditto.
|
||||
* drivers/fs/vfat/makefile: Ditto.
|
||||
* drivers/input/keyboard/makefile: Ditto.
|
||||
* drivers/storage/atapi/makefile: Ditto.
|
||||
* drivers/storage/cdrom/makefile: Ditto.
|
||||
* drivers/storage/class2/makefile: Ditto.
|
||||
* drivers/storage/disk/makefile: Ditto.
|
||||
* drivers/storage/scsiport/makefile: Ditto.
|
||||
* hal/halx86/Makefile: Ditto.
|
||||
* lib/ntdll/makefile: Ditto.
|
||||
* subsys/system/usetup/makefile (TARGET_BOOTSTRAP): Define as yes.
|
||||
(TARGET_BOOTSTRAP_NAME): Define as smss.exe.
|
||||
* tools/Makefile: Add rline executable.
|
||||
* tools/helper.mk: Support bootcd targets.
|
||||
* tools/rline.c: New file.
|
||||
|
||||
2003-04-04 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* lib/freetype/builds/compiler/gcc.mk (CC): Comment out; use CC from
|
||||
rules.mak instead.
|
||||
* lib/freetype/README.ROS: Note this in porting guide.
|
||||
|
||||
2003-03-29 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* ntoskrnl/ex/sysinfo.c (SystemProcessInformation): Fix warning.
|
||||
|
||||
2003-03-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* include/ntos/rtltypes.h (PRTL_BASE_PROCESS_START_ROUTINE): Define.
|
||||
* lib/kernel32/process/create.c (RtlBaseProcessStartRoutine): Import.
|
||||
(KlCreateFirstThread): Support images with native subsystem ID.
|
||||
* lib/ntdll/def/ntdll.def (RtlBaseProcessStartRoutine): Export.
|
||||
* lib/ntdll/def/ntdll.edf (RtlBaseProcessStartRoutine): Ditto.
|
||||
* lib/ntdll/rtl/exception.c (RtlBaseProcessStart): Forward declare.
|
||||
(RtlBaseProcessStartRoutine, RtlBaseProcessStart): Add.
|
||||
|
||||
2003-03-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* include/defines.h (VS_FFI_SIGNATURE, VS_FFI_STRUCVERSION): Define.
|
||||
|
||||
2003-03-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* ntoskrnl/ke/i386/exp.c (KiKernelTrapHandler): Use exception code
|
||||
STATUS_ACCESS_VIOLATION for exception 14.
|
||||
|
||||
2003-03-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* ntoskrnl/fs/util.c (FsRtlGetFileSize): Implement.
|
||||
|
||||
2003-03-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* lib/ntdll/rtl/nls.c (RtlCustomCPToUnicodeN, RtlMultiByteToUnicodeN,
|
||||
RtlOemToUnicodeN, RtlUnicodeToCustomCPN, RtlUnicodeToMultiByteN,
|
||||
RtlUnicodeToMultiByteSize, RtlUnicodeToOemN,
|
||||
RtlUpcaseUnicodeToCustomCPN, RtlUpcaseUnicodeToMultiByteN,
|
||||
RtlUpcaseUnicodeToOemN): Assert when unimplemented code is reached.
|
||||
|
||||
2003-03-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* include/ntos/zwtypes.h (FILE_BASIC_INFORMATION): Use LARGE_INTEGER,
|
||||
not TIME type for time fields.
|
||||
* lib/kernel32/file/copy.c (SetLastWriteTime): Adjust for new type.
|
||||
(CopyFileExW): Ditto.
|
||||
|
||||
2003-03-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* include/ntos/types.h (FALSE): Protect with #ifndef FALSE.
|
||||
(TRUE): Protect with #ifndef TRUE.
|
||||
|
||||
2003-03-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* include/napi/i386/segment.h (put_user, get_user,
|
||||
bad_user_access_length, __segment_dummy, __sd, __const_sd, __put_user,
|
||||
__get_user, __generic_memcpy_tofs, __constant_memcpy_tofs, COMMON,
|
||||
__generic_memcpy_fromfs, __constant_memcpy_fromfs, memcpy_fromfs,
|
||||
memcpy_tofs, get_fs_byte, get_fs_word, get_fs_long, put_fs_byte,
|
||||
put_fs_word, put_fs_long, get_user_word, get_user_byte, get_user_long,
|
||||
put_user_byte, put_user_word, put_user_long, get_fs, get_ds, set_fs,
|
||||
set_ds): Remove.
|
||||
|
||||
2003-03-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* include/ddk/pstypes.h (TLS_OUT_OF_INDEXES): Define.
|
||||
|
||||
2003-02-18 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* ntoskrnl/cc/view.c (CcRosFlushDirtyPages): Treat a write attempt with
|
||||
a return value of STATUS_END_OF_FILE as a successful write.
|
||||
* ntoskrnl/cc/copy.c (WriteCacheSegment): Ditto.
|
||||
|
||||
2003-02-18 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* ntoskrnl/cm/regfile.c (CmiRemoveSubKey): Kill warnings.
|
||||
(CmiMergeFree): Ditto.
|
||||
|
||||
2003-02-10 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* include/structs.h (OSVERSIONINFOEXA): Expand definition of
|
||||
OSVERSIONINFOA.
|
||||
(OSVERSIONINFOEXW): Expand definition of OSVERSIONINFOW.
|
||||
* lib/msafd/misc/helpers.c (LocateHelperDLL): Cast AddressFamily,
|
||||
SocketType, and Protocol to INT.
|
||||
* lib/ws2_32/misc/catalog.c (LocateProvider): Ditto.
|
||||
|
||||
2003-01-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* ntoskrnl/dbg/profile.c (KdbProfilerThreadMain): Make STDCALL.
|
||||
|
@@ -1,8 +1,7 @@
|
||||
1. Build environment
|
||||
|
||||
To build the system you need either mingw32 installed on Windows or a mingw32
|
||||
cross compiler running on unix. You may obtain MinGW binaries that build
|
||||
ReactOS from http://www.reactos.com.
|
||||
cross compiler running on unix.
|
||||
|
||||
|
||||
2. Building ReactOS
|
||||
|
@@ -1,5 +0,0 @@
|
||||
# Main jamfile for ReactOS
|
||||
|
||||
SubDir ROS_TOP ;
|
||||
|
||||
SubInclude ROS_TOP Lib ;
|
@@ -1,54 +0,0 @@
|
||||
# customization for ReactOS goes here
|
||||
|
||||
# The SharedLibrary and SharedLibraryFromObjects rules were
|
||||
# borrowed from here:
|
||||
# http://www.differentpla.net/~roger/devel/jam/tutorial/shared_lib/index.html
|
||||
|
||||
SUFSHR = .dll ;
|
||||
RM = rm ; # rm comes with MinGW, and the default del doesn't work in some cases
|
||||
|
||||
rule SharedLibrary
|
||||
{
|
||||
SharedLibraryFromObjects $(<) : $(>:S=$(SUFOBJ)) ;
|
||||
Objects $(>) ;
|
||||
}
|
||||
|
||||
rule SharedLibraryFromObjects
|
||||
{
|
||||
local _s _t ;
|
||||
|
||||
# Add grist to file names
|
||||
# Add suffix to dll
|
||||
|
||||
_s = [ FGristFiles $(>) ] ;
|
||||
_t = [ FAppendSuffix $(<) : $(SUFSHR) ] ;
|
||||
|
||||
if $(_t) != $(<)
|
||||
{
|
||||
DEPENDS $(<) : $(_t) ;
|
||||
NOTFILE $(<) ;
|
||||
}
|
||||
|
||||
# make compiled sources a dependency of target
|
||||
|
||||
DEPENDS exe : $(_t) ;
|
||||
DEPENDS $(_t) : $(_s) ;
|
||||
MakeLocate $(_t) : $(LOCATE_TARGET) ;
|
||||
|
||||
Clean clean : $(_t) ;
|
||||
|
||||
Link $(_t) : $(_s) ;
|
||||
}
|
||||
|
||||
# nasm needs to know the output file first, or it doesn't
|
||||
# recognize -I :(
|
||||
actions As
|
||||
{
|
||||
$(AS) -o $(<) $(ASFLAGS) -I$(HDRS) $(>)
|
||||
}
|
||||
|
||||
AS = nasm ;
|
||||
|
||||
# why isn't DEFINES working? :(
|
||||
#DEFINES += _M_IX86 ;
|
||||
CCFLAGS += -D_M_IX86 ;
|
417
reactos/Makefile
417
reactos/Makefile
@@ -26,19 +26,11 @@ HALS = halx86
|
||||
# acpi isapnp pci
|
||||
BUS = acpi isapnp pci
|
||||
|
||||
# Filesystem libraries
|
||||
# vfatlib
|
||||
LIB_FSLIB = vfatlib
|
||||
|
||||
# Static libraries
|
||||
LIB_STATIC = string rosrtl epsapi zlib
|
||||
|
||||
# User mode libraries
|
||||
# advapi32 crtdll fmifs gdi32 kernel32 libpcap packet msafd msvcrt ntdll ole32
|
||||
# oleaut32 epsapi psapi rpcrt4 secur32 shell32 user32 version ws2help ws2_32 wsock32 wshirda
|
||||
DLLS = advapi32 crtdll fmifs freetype gdi32 kernel32 packet msafd msvcrt ntdll \
|
||||
psapi secur32 syssetup user32 version winedbgc winspool ws2help ws2_32 \
|
||||
wsock32 wshirda
|
||||
# oleaut32 psapi rpcrt4 secur32 shell32 user32 version ws2help ws2_32 wsock32 wshirda
|
||||
DLLS = advapi32 crtdll fmifs gdi32 kernel32 packet msafd msvcrt ntdll \
|
||||
secur32 user32 version winedbgc ws2help ws2_32 wshirda #winmm
|
||||
|
||||
SUBSYS = smss win32k csrss ntvdm
|
||||
|
||||
@@ -54,12 +46,12 @@ LOADERS = dos
|
||||
|
||||
# Driver support libraries
|
||||
#bzip2 zlib
|
||||
DRIVERS_LIB = bzip2
|
||||
DRIVERS_LIB = bzip2 zlib
|
||||
|
||||
# Kernel mode device drivers
|
||||
# Obsolete: ide
|
||||
# beep blue floppy null parallel ramdrv serenum serial vga videoprt
|
||||
DEVICE_DRIVERS = beep blue debugout floppy null serial vga videoprt
|
||||
# beep blue floppy null parallel ramdrv serenum serial vga vidport
|
||||
DEVICE_DRIVERS = beep blue floppy null serial vga vidport
|
||||
|
||||
# Kernel mode input drivers
|
||||
# keyboard mouclass psaux sermouse
|
||||
@@ -82,8 +74,8 @@ NET_DEVICE_DRIVERS = ne2000
|
||||
STORAGE_DRIVERS = atapi cdrom class2 disk scsiport
|
||||
|
||||
# System applications
|
||||
# autochk cmd format gstart services setup usetup winlogon
|
||||
SYS_APPS = autochk cmd format gstart services setup usetup winlogon
|
||||
# autochk lsass services shell winlogon
|
||||
SYS_APPS = autochk services shell winlogon gstart usetup
|
||||
|
||||
# System services
|
||||
# rpcss eventlog
|
||||
@@ -105,23 +97,23 @@ endif
|
||||
KERNEL_DRIVERS = $(DRIVERS_LIB) $(DEVICE_DRIVERS) $(INPUT_DRIVERS) $(FS_DRIVERS) \
|
||||
$(NET_DRIVERS) $(NET_DEVICE_DRIVERS) $(STORAGE_DRIVERS)
|
||||
|
||||
all: tools dk implib $(LIB_STATIC) $(COMPONENTS) $(HALS) $(BUS) $(LIB_FSLIB) $(DLLS) $(SUBSYS) \
|
||||
all: tools dk implib $(COMPONENTS) $(HALS) $(BUS) $(DLLS) $(SUBSYS) \
|
||||
$(LOADERS) $(KERNEL_DRIVERS) $(SYS_APPS) $(SYS_SVC) \
|
||||
$(APPS) $(EXT_MODULES)
|
||||
|
||||
#config: $(TOOLS:%=%_config)
|
||||
|
||||
depends: $(LIB_STATIC:%=%_depends) $(LIB_FSLIB:%=%_depends) $(DLLS:%=%_depends) $(SUBSYS:%=%_depends) $(SYS_SVC:%=%_depends) \
|
||||
depends: $(DLLS:%=%_depends) $(SUBSYS:%=%_depends) $(SYS_SVC:%=%_depends) \
|
||||
$(EXT_MODULES:%=%_depends) $(POSIX_LIBS:%=%_depends)
|
||||
|
||||
implib: $(COMPONENTS:%=%_implib) $(HALS:%=%_implib) $(BUS:%=%_implib) \
|
||||
$(LIB_STATIC:%=%_implib) $(LIB_FSLIB:%=%_implib) $(DLLS:%=%_implib) $(LOADERS:%=%_implib) \
|
||||
$(DLLS:%=%_implib) $(LOADERS:%=%_implib) \
|
||||
$(KERNEL_DRIVERS:%=%_implib) $(SUBSYS:%=%_implib) \
|
||||
$(SYS_APPS:%=%_implib) $(SYS_SVC:%=%_implib) \
|
||||
$(APPS:%=%_implib) $(EXT_MODULES:%=%_implib)
|
||||
|
||||
clean: tools dk_clean $(HALS:%=%_clean) \
|
||||
$(COMPONENTS:%=%_clean) $(BUS:%=%_clean) $(LIB_STATIC:%=%_clean) $(LIB_FSLIB:%=%_clean) $(DLLS:%=%_clean) \
|
||||
$(COMPONENTS:%=%_clean) $(BUS:%=%_clean) $(DLLS:%=%_clean) \
|
||||
$(LOADERS:%=%_clean) $(KERNEL_DRIVERS:%=%_clean) $(SUBSYS:%=%_clean) \
|
||||
$(SYS_APPS:%=%_clean) $(SYS_SVC:%=%_clean) \
|
||||
$(NET_APPS:%=%_clean) \
|
||||
@@ -133,79 +125,61 @@ clean_after:
|
||||
|
||||
install: tools install_dirs install_before \
|
||||
$(COMPONENTS:%=%_install) $(HALS:%=%_install) $(BUS:%=%_install) \
|
||||
$(LIB_STATIC:%=%_install) $(LIB_FSLIB:%=%_install) $(DLLS:%=%_install) $(LOADERS:%=%_install) \
|
||||
$(DLLS:%=%_install) $(LOADERS:%=%_install) \
|
||||
$(KERNEL_DRIVERS:%=%_install) $(SUBSYS:%=%_install) \
|
||||
$(SYS_APPS:%=%_install) $(SYS_SVC:%=%_install) \
|
||||
$(APPS:%=%_install) $(EXT_MODULES:%=%_install)
|
||||
|
||||
dist: $(TOOLS_PATH)/rcopy$(EXE_POSTFIX) dist_clean dist_dirs \
|
||||
$(HALS:%=%_dist) $(COMPONENTS:%=%_dist) $(BUS:%=%_dist) $(LIB_STATIC:%=%_dist) $(LIB_FSLIB:%=%_dist) \
|
||||
$(DLLS:%=%_dist) $(LOADERS:%=%_dist) $(KERNEL_DRIVERS:%=%_dist) $(SUBSYS:%=%_dist) \
|
||||
$(HALS:%=%_dist) $(COMPONENTS:%=%_dist) $(BUS:%=%_dist) $(DLLS:%=%_dist) \
|
||||
$(LOADERS:%=%_dist) $(KERNEL_DRIVERS:%=%_dist) $(SUBSYS:%=%_dist) \
|
||||
$(SYS_APPS:%=%_dist) $(SYS_SVC:%=%_dist) \
|
||||
$(NET_APPS:%=%_dist) \
|
||||
$(APPS:%=%_dist) $(EXT_MODULES:%=%_dist)
|
||||
|
||||
bootcd_directory_layout:
|
||||
$(RMKDIR) $(BOOTCD_DIR)
|
||||
$(RMKDIR) $(BOOTCD_DIR)/bootdisk
|
||||
$(RMKDIR) $(BOOTCD_DIR)/loader
|
||||
$(RMKDIR) $(BOOTCD_DIR)/reactos
|
||||
$(RMKDIR) $(BOOTCD_DIR)/reactos/system32
|
||||
|
||||
bootcd_bootstrap_files: $(COMPONENTS:%=%_bootcd) $(HALS:%=%_bootcd) $(BUS:%=%_bootcd) \
|
||||
$(LIB_STATIC:%=%_bootcd) $(LIB_FSLIB:%=%_bootcd) $(DLLS:%=%_bootcd) $(KERNEL_DRIVERS:%=%_bootcd) \
|
||||
$(SUBSYS:%=%_bootcd) $(SYS_APPS:%=%_bootcd)
|
||||
|
||||
bootcd: all bootcd_directory_layout bootcd_bootstrap_files
|
||||
$(MAKE) install INSTALL_DIR=$(BOOTCD_DIR)/reactos INSTALL_SYMBOLS=no BOOTCD_INSTALL=yes
|
||||
|
||||
.PHONY: all depends implib clean clean_before install dist bootcd_directory_layout \
|
||||
bootcd_bootstrap_files bootcd
|
||||
.PHONY: all depends implib clean clean_before install dist
|
||||
|
||||
|
||||
#
|
||||
# System Applications
|
||||
#
|
||||
$(SYS_APPS): %:
|
||||
$(MAKE) -C subsys/system/$*
|
||||
make -C subsys/system/$*
|
||||
|
||||
$(SYS_APPS:%=%_implib): %_implib:
|
||||
$(MAKE) -C subsys/system/$* implib
|
||||
make -C subsys/system/$* implib
|
||||
|
||||
$(SYS_APPS:%=%_clean): %_clean:
|
||||
$(MAKE) -C subsys/system/$* clean
|
||||
make -C subsys/system/$* clean
|
||||
|
||||
$(SYS_APPS:%=%_dist): %_dist:
|
||||
$(MAKE) -C subsys/system/$* dist
|
||||
make -C subsys/system/$* dist
|
||||
|
||||
$(SYS_APPS:%=%_install): %_install:
|
||||
$(MAKE) -C subsys/system/$* install
|
||||
make -C subsys/system/$* install
|
||||
|
||||
$(SYS_APPS:%=%_bootcd): %_bootcd:
|
||||
$(MAKE) -C subsys/system/$* bootcd
|
||||
|
||||
.PHONY: $(SYS_APPS) $(SYS_APPS:%=%_implib) $(SYS_APPS:%=%_clean) $(SYS_APPS:%=%_install) $(SYS_APPS:%=%_dist) $(SYS_APPS:%=%_bootcd)
|
||||
.PHONY: $(SYS_APPS) $(SYS_APPS:%=%_implib) $(SYS_APPS:%=%_clean) $(SYS_APPS:%=%_install) $(SYS_APPS:%=%_dist)
|
||||
|
||||
#
|
||||
# System Services
|
||||
#
|
||||
$(SYS_SVC): %:
|
||||
$(MAKE) -C services/$*
|
||||
make -C services/$*
|
||||
|
||||
$(SYS_SVC:%=%_depends): %_depends:
|
||||
$(MAKE) -C services/$* depends
|
||||
make -C services/$* depends
|
||||
|
||||
$(SYS_SVC:%=%_implib): %_implib:
|
||||
$(MAKE) -C services/$* implib
|
||||
make -C services/$* implib
|
||||
|
||||
$(SYS_SVC:%=%_clean): %_clean:
|
||||
$(MAKE) -C services/$* clean
|
||||
make -C services/$* clean
|
||||
|
||||
$(SYS_SVC:%=%_dist): %_dist:
|
||||
$(MAKE) -C services/$* dist
|
||||
make -C services/$* dist
|
||||
|
||||
$(SYS_SVC:%=%_install): %_install:
|
||||
$(MAKE) -C services/$* install
|
||||
make -C services/$* install
|
||||
|
||||
.PHONY: $(SYS_SVC) $(SYS_SVC:%=%_depends) $(SYS_SVC:%=%_implib) $(SYS_SVC:%=%_clean) $(SYS_SVC:%=%_install) $(SYS_SVC:%=%_dist)
|
||||
|
||||
@@ -217,19 +191,19 @@ $(SYS_SVC:%=%_install): %_install:
|
||||
# Extra (optional system) Applications
|
||||
#
|
||||
$(APPS): %:
|
||||
$(MAKE) -C apps/$*
|
||||
make -C apps/$*
|
||||
|
||||
$(APPS:%=%_implib): %_implib:
|
||||
$(MAKE) -C apps/$* implib
|
||||
make -C apps/$* implib
|
||||
|
||||
$(APPS:%=%_clean): %_clean:
|
||||
$(MAKE) -C apps/$* clean
|
||||
make -C apps/$* clean
|
||||
|
||||
$(APPS:%=%_dist): %_dist:
|
||||
$(MAKE) -C apps/$* dist
|
||||
make -C apps/$* dist
|
||||
|
||||
$(APPS:%=%_install): %_install:
|
||||
$(MAKE) -C apps/$* install
|
||||
make -C apps/$* install
|
||||
|
||||
.PHONY: $(APPS) $(APPS:%=%_implib) $(APPS:%=%_clean) $(APPS:%=%_install) $(APPS:%=%_dist)
|
||||
|
||||
@@ -238,22 +212,22 @@ $(APPS:%=%_install): %_install:
|
||||
# External ports and subsystem personalities
|
||||
#
|
||||
$(EXTERNALS): %:
|
||||
$(MAKE) -C $(ROOT_PATH)/$*
|
||||
make -C $(ROOT_PATH)/$*
|
||||
|
||||
$(EXTERNALS:%=%_depends): %_depends:
|
||||
$(MAKE) -C $(ROOT_PATH)/$* depends
|
||||
make -C $(ROOT_PATH)/$* depends
|
||||
|
||||
$(EXTERNALS:%=%_implib): %_implib:
|
||||
$(MAKE) -C $(ROOT_PATH)/$* implib
|
||||
make -C $(ROOT_PATH)/$* implib
|
||||
|
||||
$(EXTERNALS:%=%_clean): %_clean:
|
||||
$(MAKE) -C $(ROOT_PATH)/$* clean
|
||||
make -C $(ROOT_PATH)/$* clean
|
||||
|
||||
$(EXTERNALS:%=%_dist): %_dist:
|
||||
$(MAKE) -C $(ROOT_PATH)/$* dist
|
||||
make -C $(ROOT_PATH)/$* dist
|
||||
|
||||
$(EXTERNALS:%=%_install): %_install:
|
||||
$(MAKE) -C $(ROOT_PATH)/$* install
|
||||
make -C $(ROOT_PATH)/$* install
|
||||
|
||||
.PHONY: $(EXTERNALS) $(EXTERNALS:%=%_depends) $(EXTERNALS:%=%_implib) $(EXTERNALS:%=%_clean) $(EXTERNALS:%=%_install) $(EXTERNALS:%=%_dist)
|
||||
|
||||
@@ -262,12 +236,12 @@ $(EXTERNALS:%=%_install): %_install:
|
||||
# Tools
|
||||
#
|
||||
tools:
|
||||
$(MAKE) -C tools
|
||||
make -C tools
|
||||
|
||||
tools_implib:
|
||||
|
||||
tools_clean:
|
||||
$(MAKE) -C tools clean
|
||||
make -C tools clean
|
||||
|
||||
tools_install:
|
||||
|
||||
@@ -320,241 +294,213 @@ dk_dist:
|
||||
# Interfaces
|
||||
#
|
||||
iface_native:
|
||||
$(MAKE) -C iface/native
|
||||
make -C iface/native
|
||||
|
||||
iface_native_implib:
|
||||
|
||||
iface_native_clean:
|
||||
$(MAKE) -C iface/native clean
|
||||
make -C iface/native clean
|
||||
|
||||
iface_native_install:
|
||||
|
||||
iface_native_dist:
|
||||
|
||||
iface_native_bootcd:
|
||||
|
||||
iface_additional:
|
||||
$(MAKE) -C iface/addsys
|
||||
make -C iface/addsys
|
||||
|
||||
iface_additional_implib:
|
||||
|
||||
iface_additional_clean:
|
||||
$(MAKE) -C iface/addsys clean
|
||||
make -C iface/addsys clean
|
||||
|
||||
iface_additional_install:
|
||||
|
||||
iface_additional_dist:
|
||||
|
||||
iface_additional_bootcd:
|
||||
|
||||
.PHONY: iface_native iface_native_implib iface_native_clean iface_native_install \
|
||||
iface_native_dist iface_native_bootcd \
|
||||
iface_native_dist \
|
||||
iface_additional iface_additional_implib iface_additional_clean \
|
||||
iface_additional_install iface_additional_dist iface_additional_bootcd
|
||||
iface_additional_install iface_additional_dist
|
||||
|
||||
#
|
||||
# Bus driver rules
|
||||
#
|
||||
$(BUS): %:
|
||||
$(MAKE) -C drivers/bus/$*
|
||||
make -C drivers/bus/$*
|
||||
|
||||
$(BUS:%=%_implib): %_implib:
|
||||
$(MAKE) -C drivers/bus/$* implib
|
||||
make -C drivers/bus/$* implib
|
||||
|
||||
$(BUS:%=%_clean): %_clean:
|
||||
$(MAKE) -C drivers/bus/$* clean
|
||||
make -C drivers/bus/$* clean
|
||||
|
||||
$(BUS:%=%_install): %_install:
|
||||
$(MAKE) -C drivers/bus/$* install
|
||||
make -C drivers/bus/$* install
|
||||
|
||||
$(BUS:%=%_dist): %_dist:
|
||||
$(MAKE) -C drivers/bus/$* dist
|
||||
|
||||
$(BUS:%=%_bootcd): %_bootcd:
|
||||
$(MAKE) -C drivers/bus/$* bootcd
|
||||
make -C drivers/bus/$* dist
|
||||
|
||||
.PHONY: $(BUS) $(BUS:%=%_implib) $(BUS:%=%_clean) \
|
||||
$(BUS:%=%_install) $(BUS:%=%_dist) $(BUS:%=%_bootcd)
|
||||
$(BUS:%=%_install) $(BUS:%=%_dist)
|
||||
|
||||
#
|
||||
# Driver support libraries rules
|
||||
#
|
||||
$(DRIVERS_LIB): %:
|
||||
$(MAKE) -C drivers/lib/$*
|
||||
make -C drivers/lib/$*
|
||||
|
||||
$(DRIVERS_LIB:%=%_implib): %_implib:
|
||||
$(MAKE) -C drivers/lib/$* implib
|
||||
make -C drivers/lib/$* implib
|
||||
|
||||
$(DRIVERS_LIB:%=%_clean): %_clean:
|
||||
$(MAKE) -C drivers/lib/$* clean
|
||||
make -C drivers/lib/$* clean
|
||||
|
||||
$(DRIVERS_LIB:%=%_install): %_install:
|
||||
$(MAKE) -C drivers/lib/$* install
|
||||
make -C drivers/lib/$* install
|
||||
|
||||
$(DRIVERS_LIB:%=%_dist): %_dist:
|
||||
$(MAKE) -C drivers/lib/$* dist
|
||||
|
||||
$(DRIVERS_LIB:%=%_bootcd): %_bootcd:
|
||||
$(MAKE) -C drivers/lib/$* bootcd
|
||||
make -C drivers/lib/$* dist
|
||||
|
||||
.PHONY: $(DRIVERS_LIB) $(DRIVERS_LIB:%=%_implib) $(DRIVERS_LIB:%=%_clean) \
|
||||
$(DRIVERS_LIB:%=%_install) $(DRIVERS_LIB:%=%_dist) $(DRIVERS_LIB:%=%_bootcd)
|
||||
$(DRIVERS_LIB:%=%_install) $(DRIVERS_LIB:%=%_dist)
|
||||
|
||||
#
|
||||
# Device driver rules
|
||||
#
|
||||
$(DEVICE_DRIVERS): %:
|
||||
$(MAKE) -C drivers/dd/$*
|
||||
make -C drivers/dd/$*
|
||||
|
||||
$(DEVICE_DRIVERS:%=%_implib): %_implib:
|
||||
$(MAKE) -C drivers/dd/$* implib
|
||||
make -C drivers/dd/$* implib
|
||||
|
||||
$(DEVICE_DRIVERS:%=%_clean): %_clean:
|
||||
$(MAKE) -C drivers/dd/$* clean
|
||||
make -C drivers/dd/$* clean
|
||||
|
||||
$(DEVICE_DRIVERS:%=%_install): %_install:
|
||||
$(MAKE) -C drivers/dd/$* install
|
||||
make -C drivers/dd/$* install
|
||||
|
||||
$(DEVICE_DRIVERS:%=%_dist): %_dist:
|
||||
$(MAKE) -C drivers/dd/$* dist
|
||||
|
||||
$(DEVICE_DRIVERS:%=%_bootcd): %_bootcd:
|
||||
$(MAKE) -C drivers/dd/$* bootcd
|
||||
make -C drivers/dd/$* dist
|
||||
|
||||
.PHONY: $(DEVICE_DRIVERS) $(DEVICE_DRIVERS:%=%_implib) $(DEVICE_DRIVERS:%=%_clean) \
|
||||
$(DEVICE_DRIVERS:%=%_install) $(DEVICE_DRIVERS:%=%_dist) $(DEVICE_DRIVERS:%=%_bootcd)
|
||||
$(DEVICE_DRIVERS:%=%_install) $(DEVICE_DRIVERS:%=%_dist)
|
||||
|
||||
#
|
||||
# Input driver rules
|
||||
#
|
||||
$(INPUT_DRIVERS): %:
|
||||
$(MAKE) -C drivers/input/$*
|
||||
make -C drivers/input/$*
|
||||
|
||||
$(INPUT_DRIVERS:%=%_implib): %_implib:
|
||||
$(MAKE) -C drivers/input/$* implib
|
||||
make -C drivers/input/$* implib
|
||||
|
||||
$(INPUT_DRIVERS:%=%_clean): %_clean:
|
||||
$(MAKE) -C drivers/input/$* clean
|
||||
make -C drivers/input/$* clean
|
||||
|
||||
$(INPUT_DRIVERS:%=%_install): %_install:
|
||||
$(MAKE) -C drivers/input/$* install
|
||||
make -C drivers/input/$* install
|
||||
|
||||
$(INPUT_DRIVERS:%=%_dist): %_dist:
|
||||
$(MAKE) -C drivers/input/$* dist
|
||||
|
||||
$(INPUT_DRIVERS:%=%_bootcd): %_bootcd:
|
||||
$(MAKE) -C drivers/input/$* bootcd
|
||||
make -C drivers/input/$* dist
|
||||
|
||||
.PHONY: $(INPUT_DRIVERS) $(INPUT_DRIVERS:%=%_implib) $(INPUT_DRIVERS:%=%_clean)\
|
||||
$(INPUT_DRIVERS:%=%_install) $(INPUT_DRIVERS:%=%_dist) $(INPUT_DRIVERS:%=%_bootcd)
|
||||
$(INPUT_DRIVERS:%=%_install) $(INPUT_DRIVERS:%=%_dist)
|
||||
|
||||
$(FS_DRIVERS): %:
|
||||
$(MAKE) -C drivers/fs/$*
|
||||
make -C drivers/fs/$*
|
||||
|
||||
$(FS_DRIVERS:%=%_implib): %_implib:
|
||||
$(MAKE) -C drivers/fs/$* implib
|
||||
make -C drivers/fs/$* implib
|
||||
|
||||
$(FS_DRIVERS:%=%_clean): %_clean:
|
||||
$(MAKE) -C drivers/fs/$* clean
|
||||
make -C drivers/fs/$* clean
|
||||
|
||||
$(FS_DRIVERS:%=%_install): %_install:
|
||||
$(MAKE) -C drivers/fs/$* install
|
||||
make -C drivers/fs/$* install
|
||||
|
||||
$(FS_DRIVERS:%=%_dist): %_dist:
|
||||
$(MAKE) -C drivers/fs/$* dist
|
||||
|
||||
$(FS_DRIVERS:%=%_bootcd): %_bootcd:
|
||||
$(MAKE) -C drivers/fs/$* bootcd
|
||||
make -C drivers/fs/$* dist
|
||||
|
||||
.PHONY: $(FS_DRIVERS) $(FS_DRIVERS:%=%_implib) $(FS_DRIVERS:%=%_clean) \
|
||||
$(FS_DRIVERS:%=%_install) $(FS_DRIVERS:%=%_dist) $(FS_DRIVERS:%=%_bootcd)
|
||||
$(FS_DRIVERS:%=%_install) $(FS_DRIVERS:%=%_dist)
|
||||
|
||||
#
|
||||
# Network driver rules
|
||||
#
|
||||
$(NET_DRIVERS): %:
|
||||
$(MAKE) -C drivers/net/$*
|
||||
make -C drivers/net/$*
|
||||
|
||||
$(NET_DRIVERS:%=%_implib): %_implib:
|
||||
$(MAKE) -C drivers/net/$* implib
|
||||
make -C drivers/net/$* implib
|
||||
|
||||
$(NET_DRIVERS:%=%_clean): %_clean:
|
||||
$(MAKE) -C drivers/net/$* clean
|
||||
make -C drivers/net/$* clean
|
||||
|
||||
$(NET_DRIVERS:%=%_install): %_install:
|
||||
$(MAKE) -C drivers/net/$* install
|
||||
make -C drivers/net/$* install
|
||||
|
||||
$(NET_DRIVERS:%=%_dist): %_dist:
|
||||
$(MAKE) -C drivers/net/$* dist
|
||||
|
||||
$(NET_DRIVERS:%=%_bootcd): %_bootcd:
|
||||
$(MAKE) -C drivers/net/$* bootcd
|
||||
make -C drivers/net/$* dist
|
||||
|
||||
.PHONY: $(NET_DRIVERS) $(NET_DRIVERS:%=%_implib) $(NET_DRIVERS:%=%_clean) \
|
||||
$(NET_DRIVERS:%=%_install) $(NET_DRIVERS:%=%_dist) $(NET_DRIVERS:%=%_bootcd)
|
||||
$(NET_DRIVERS:%=%_install) $(NET_DRIVERS:%=%_dist)
|
||||
|
||||
$(NET_DEVICE_DRIVERS): %:
|
||||
$(MAKE) -C drivers/net/dd/$*
|
||||
make -C drivers/net/dd/$*
|
||||
|
||||
$(NET_DEVICE_DRIVERS:%=%_implib): %_implib:
|
||||
$(MAKE) -C drivers/net/dd/$* implib
|
||||
make -C drivers/net/dd/$* implib
|
||||
|
||||
$(NET_DEVICE_DRIVERS:%=%_clean): %_clean:
|
||||
$(MAKE) -C drivers/net/dd/$* clean
|
||||
make -C drivers/net/dd/$* clean
|
||||
|
||||
$(NET_DEVICE_DRIVERS:%=%_install): %_install:
|
||||
$(MAKE) -C drivers/net/dd/$* install
|
||||
make -C drivers/net/dd/$* install
|
||||
|
||||
$(NET_DEVICE_DRIVERS:%=%_dist): %_dist:
|
||||
$(MAKE) -C drivers/net/dd/$* dist
|
||||
|
||||
$(NET_DEVICE_DRIVERS:%=%_bootcd): %_bootcd:
|
||||
$(MAKE) -C drivers/net/dd/$* bootcd
|
||||
make -C drivers/net/dd/$* dist
|
||||
|
||||
.PHONY: $(NET_DEVICE_DRIVERS) $(NET_DEVICE_DRIVERS:%=%_clean) $(NET_DEVICE_DRIVERS:%=%_implib) \
|
||||
$(NET_DEVICE_DRIVERS:%=%_install) $(NET_DEVICE_DRIVERS:%=%_dist) $(NET_DEVICE_DRIVERS:%=%_bootcd)
|
||||
$(NET_DEVICE_DRIVERS:%=%_install) $(NET_DEVICE_DRIVERS:%=%_dist)
|
||||
|
||||
#
|
||||
# storage driver rules
|
||||
#
|
||||
$(STORAGE_DRIVERS): %:
|
||||
$(MAKE) -C drivers/storage/$*
|
||||
make -C drivers/storage/$*
|
||||
|
||||
$(STORAGE_DRIVERS:%=%_implib): %_implib:
|
||||
$(MAKE) -C drivers/storage/$* implib
|
||||
make -C drivers/storage/$* implib
|
||||
|
||||
$(STORAGE_DRIVERS:%=%_clean): %_clean:
|
||||
$(MAKE) -C drivers/storage/$* clean
|
||||
make -C drivers/storage/$* clean
|
||||
|
||||
$(STORAGE_DRIVERS:%=%_install): %_install:
|
||||
$(MAKE) -C drivers/storage/$* install
|
||||
make -C drivers/storage/$* install
|
||||
|
||||
$(STORAGE_DRIVERS:%=%_dist): %_dist:
|
||||
$(MAKE) -C drivers/storage/$* dist
|
||||
make -C drivers/storage/$* dist
|
||||
|
||||
$(STORAGE_DRIVERS:%=%_bootcd): %_bootcd:
|
||||
$(MAKE) -C drivers/storage/$* bootcd
|
||||
|
||||
.PHONY: $(STORAGE_DRIVERS) $(STORAGE_DRIVERS:%=%_clean) $(STORAGE_DRIVERS:%=%_implib) \
|
||||
$(STORAGE_DRIVERS:%=%_install) $(STORAGE_DRIVERS:%=%_dist) $(STORAGE_DRIVERS:%=%_bootcd)
|
||||
.PHONY: $(STORAGE_DRIVERS) $(STORAGE_DRIVERS:%=%_clean) \
|
||||
$(STORAGE_DRIVERS:%=%_install) $(STORAGE_DRIVERS:%=%_dist)
|
||||
|
||||
#
|
||||
# Kernel loaders
|
||||
#
|
||||
|
||||
$(LOADERS): %:
|
||||
$(MAKE) -C loaders/$*
|
||||
make -C loaders/$*
|
||||
|
||||
$(LOADERS:%=%_implib): %_implib:
|
||||
|
||||
$(LOADERS:%=%_clean): %_clean:
|
||||
$(MAKE) -C loaders/$* clean
|
||||
make -C loaders/$* clean
|
||||
|
||||
$(LOADERS:%=%_install): %_install:
|
||||
$(MAKE) -C loaders/$* install
|
||||
make -C loaders/$* install
|
||||
|
||||
$(LOADERS:%=%_dist): %_dist:
|
||||
$(MAKE) -C loaders/$* dist
|
||||
make -C loaders/$* dist
|
||||
|
||||
.PHONY: $(LOADERS) $(LOADERS:%=%_implib) $(LOADERS:%=%_clean) $(LOADERS:%=%_install) \
|
||||
$(LOADERS:%=%_dist)
|
||||
@@ -564,183 +510,112 @@ $(LOADERS:%=%_dist): %_dist:
|
||||
#
|
||||
|
||||
ntoskrnl:
|
||||
$(MAKE) -C ntoskrnl
|
||||
make -C ntoskrnl
|
||||
|
||||
ntoskrnl_implib:
|
||||
$(MAKE) -C ntoskrnl implib
|
||||
make -C ntoskrnl implib
|
||||
|
||||
ntoskrnl_clean:
|
||||
$(MAKE) -C ntoskrnl clean
|
||||
make -C ntoskrnl clean
|
||||
|
||||
ntoskrnl_install:
|
||||
$(MAKE) -C ntoskrnl install
|
||||
make -C ntoskrnl install
|
||||
|
||||
ntoskrnl_dist:
|
||||
$(MAKE) -C ntoskrnl dist
|
||||
make -C ntoskrnl dist
|
||||
|
||||
ntoskrnl_bootcd:
|
||||
$(MAKE) -C ntoskrnl bootcd
|
||||
|
||||
.PHONY: ntoskrnl ntoskrnl_implib ntoskrnl_clean ntoskrnl_install ntoskrnl_dist ntoskrnl_bootcd
|
||||
.PHONY: ntoskrnl ntoskrnl_implib ntoskrnl_clean ntoskrnl_install ntoskrnl_dist
|
||||
|
||||
#
|
||||
# Hardware Abstraction Layer import library
|
||||
#
|
||||
|
||||
hallib:
|
||||
$(MAKE) -C hal/hal
|
||||
make -C hal/hal
|
||||
|
||||
hallib_implib:
|
||||
$(MAKE) -C hal/hal implib
|
||||
make -C hal/hal implib
|
||||
|
||||
hallib_clean:
|
||||
$(MAKE) -C hal/hal clean
|
||||
make -C hal/hal clean
|
||||
|
||||
hallib_install:
|
||||
$(MAKE) -C hal/hal install
|
||||
make -C hal/hal install
|
||||
|
||||
hallib_dist:
|
||||
$(MAKE) -C hal/hal dist
|
||||
make -C hal/hal dist
|
||||
|
||||
hallib_bootcd:
|
||||
$(MAKE) -C hal/hal bootcd
|
||||
|
||||
.PHONY: hallib hallib_implib hallib_clean hallib_install hallib_dist hallib_bootcd
|
||||
.PHONY: hallib hallib_implib hallib_clean hallib_install hallib_dist
|
||||
|
||||
#
|
||||
# Hardware Abstraction Layers
|
||||
#
|
||||
|
||||
$(HALS): %:
|
||||
$(MAKE) -C hal/$*
|
||||
make -C hal/$*
|
||||
|
||||
$(HALS:%=%_implib): %_implib:
|
||||
$(MAKE) -C hal/$* implib
|
||||
make -C hal/$* implib
|
||||
|
||||
$(HALS:%=%_clean): %_clean:
|
||||
$(MAKE) -C hal/$* clean
|
||||
make -C hal/$* clean
|
||||
|
||||
$(HALS:%=%_install): %_install:
|
||||
$(MAKE) -C hal/$* install
|
||||
make -C hal/$* install
|
||||
|
||||
$(HALS:%=%_dist): %_dist:
|
||||
$(MAKE) -C hal/$* dist
|
||||
make -C hal/$* dist
|
||||
|
||||
$(HALS:%=%_bootcd): %_bootcd:
|
||||
$(MAKE) -C hal/$* bootcd
|
||||
|
||||
.PHONY: $(HALS) $(HALS:%=%_implib) $(HALS:%=%_clean) $(HALS:%=%_install) $(HALS:%=%_dist) $(HALS:%=%_bootcd)
|
||||
|
||||
#
|
||||
# File system libraries
|
||||
#
|
||||
|
||||
$(LIB_FSLIB): %:
|
||||
$(MAKE) -C lib/fslib/$*
|
||||
|
||||
$(LIB_FSLIB:%=%_depends): %_depends:
|
||||
$(MAKE) -C lib/fslib/$* depends
|
||||
|
||||
$(LIB_FSLIB:%=%_implib): %_implib:
|
||||
$(MAKE) -C lib/fslib/$* implib
|
||||
|
||||
$(LIB_FSLIB:%=%_clean): %_clean:
|
||||
$(MAKE) -C lib/fslib/$* clean
|
||||
|
||||
$(LIB_FSLIB:%=%_install): %_install:
|
||||
$(MAKE) -C lib/fslib/$* install
|
||||
|
||||
$(LIB_FSLIB:%=%_dist): %_dist:
|
||||
$(MAKE) -C lib/fslib/$* dist
|
||||
|
||||
$(LIB_FSLIB:%=%_bootcd): %_bootcd:
|
||||
$(MAKE) -C lib/fslib/$* bootcd
|
||||
|
||||
.PHONY: $(LIB_FSLIB) $(LIB_FSLIB:%=%_depends) $(LIB_FSLIB:%=%_implib) $(LIB_FSLIB:%=%_clean) \
|
||||
$(LIB_FSLIB:%=%_install) $(LIB_FSLIB:%=%_dist) $(LIB_FSLIB:%=%_bootcd)
|
||||
|
||||
#
|
||||
# Static libraries
|
||||
#
|
||||
|
||||
$(LIB_STATIC): %:
|
||||
$(MAKE) -C lib/$*
|
||||
|
||||
$(LIB_STATIC:%=%_depends): %_depends:
|
||||
$(MAKE) -C lib/string depends
|
||||
|
||||
$(LIB_STATIC:%=%_implib): %_implib:
|
||||
$(MAKE) -C lib/$* implib
|
||||
|
||||
$(LIB_STATIC:%=%_clean): %_clean:
|
||||
$(MAKE) -C lib/$* clean
|
||||
|
||||
$(LIB_STATIC:%=%_install): %_install:
|
||||
$(MAKE) -C lib/$* install
|
||||
|
||||
$(LIB_STATIC:%=%_dist): %_dist:
|
||||
$(MAKE) -C lib/$* dist
|
||||
|
||||
$(LIB_STATIC:%=%_bootcd): %_bootcd:
|
||||
$(MAKE) -C lib/$* bootcd
|
||||
|
||||
.PHONY: $(LIB_STATIC) $(LIB_STATIC:%=%_depends) $(LIB_STATIC:%=%_implib) $(LIB_STATIC:%=%_clean) \
|
||||
$(LIB_STATIC:%=%_install) $(LIB_STATIC:%=%_dist) $(LIB_STATIC:%=%_bootcd)
|
||||
.PHONY: $(HALS) $(HALS:%=%_implib) $(HALS:%=%_clean) $(HALS:%=%_install) $(HALS:%=%_dist)
|
||||
|
||||
#
|
||||
# Required DLLs
|
||||
#
|
||||
|
||||
$(DLLS): %:
|
||||
$(MAKE) -C lib/$*
|
||||
make -C lib/$*
|
||||
|
||||
$(DLLS:%=%_depends): %_depends:
|
||||
$(MAKE) -C lib/$* depends
|
||||
make -C lib/$* depends
|
||||
|
||||
$(DLLS:%=%_implib): %_implib:
|
||||
$(MAKE) -C lib/$* implib
|
||||
make -C lib/$* implib
|
||||
|
||||
$(DLLS:%=%_clean): %_clean:
|
||||
$(MAKE) -C lib/$* clean
|
||||
make -C lib/$* clean
|
||||
|
||||
$(DLLS:%=%_install): %_install:
|
||||
$(MAKE) -C lib/$* install
|
||||
make -C lib/$* install
|
||||
|
||||
$(DLLS:%=%_dist): %_dist:
|
||||
$(MAKE) -C lib/$* dist
|
||||
make -C lib/$* dist
|
||||
|
||||
$(DLLS:%=%_bootcd): %_bootcd:
|
||||
$(MAKE) -C lib/$* bootcd
|
||||
|
||||
.PHONY: $(DLLS) $(DLLS:%=%_depends) $(DLLS:%=%_implib) $(DLLS:%=%_clean) $(DLLS:%=%_install) $(DLLS:%=%_dist) $(DLLS:%=%_bootcd)
|
||||
.PHONY: $(DLLS) $(DLLS:%=%_depends) $(DLLS:%=%_implib) $(DLLS:%=%_clean) $(DLLS:%=%_install) $(DLLS:%=%_dist)
|
||||
|
||||
#
|
||||
# Subsystem support modules
|
||||
#
|
||||
|
||||
$(SUBSYS): %:
|
||||
$(MAKE) -C subsys/$*
|
||||
make -C subsys/$*
|
||||
|
||||
$(SUBSYS:%=%_depends): %_depends:
|
||||
$(MAKE) -C subsys/$* depends
|
||||
make -C subsys/$* depends
|
||||
|
||||
$(SUBSYS:%=%_implib): %_implib:
|
||||
$(MAKE) -C subsys/$* implib
|
||||
make -C subsys/$* implib
|
||||
|
||||
$(SUBSYS:%=%_clean): %_clean:
|
||||
$(MAKE) -C subsys/$* clean
|
||||
make -C subsys/$* clean
|
||||
|
||||
$(SUBSYS:%=%_install): %_install:
|
||||
$(MAKE) -C subsys/$* install
|
||||
make -C subsys/$* install
|
||||
|
||||
$(SUBSYS:%=%_dist): %_dist:
|
||||
$(MAKE) -C subsys/$* dist
|
||||
|
||||
$(SUBSYS:%=%_bootcd): %_bootcd:
|
||||
$(MAKE) -C subsys/$* bootcd
|
||||
make -C subsys/$* dist
|
||||
|
||||
.PHONY: $(SUBSYS) $(SUBSYS:%=%_depends) $(SUBSYS:%=%_implib) $(SUBSYS:%=%_clean) $(SUBSYS:%=%_install) \
|
||||
$(SUBSYS:%=%_dist) $(SUBSYS:%=%_bootcd)
|
||||
$(SUBSYS:%=%_dist)
|
||||
|
||||
#
|
||||
# Create an installation
|
||||
@@ -765,24 +640,6 @@ install_clean:
|
||||
$(RMDIR) $(INSTALL_DIR)/bin
|
||||
$(RMDIR) $(INSTALL_DIR)
|
||||
|
||||
ifneq ($(BOOTCD_INSTALL),)
|
||||
|
||||
install_dirs:
|
||||
$(RMKDIR) $(INSTALL_DIR)
|
||||
|
||||
install_before:
|
||||
# $(RLINE) bootdata/autorun.inf $(INSTALL_DIR)/../autorun.inf
|
||||
$(RLINE) bootdata/readme.txt $(INSTALL_DIR)/../readme.txt
|
||||
$(RLINE) bootdata/hivecls.inf $(INSTALL_DIR)/hivecls.inf
|
||||
$(RLINE) bootdata/hivedef.inf $(INSTALL_DIR)/hivedef.inf
|
||||
$(RLINE) bootdata/hivesft.inf $(INSTALL_DIR)/hivesft.inf
|
||||
$(RLINE) bootdata/hivesys.inf $(INSTALL_DIR)/hivesys.inf
|
||||
$(RLINE) bootdata/txtsetup.sif $(INSTALL_DIR)/txtsetup.sif
|
||||
$(CP) media/fonts $(INSTALL_DIR)
|
||||
$(CP) media/nls $(INSTALL_DIR)
|
||||
|
||||
else # !BOOTCD_INSTALL
|
||||
|
||||
install_dirs:
|
||||
$(RMKDIR) $(INSTALL_DIR)
|
||||
$(RMKDIR) $(INSTALL_DIR)/bin
|
||||
@@ -797,13 +654,9 @@ install_before:
|
||||
$(CP) bootc.lst $(INSTALL_DIR)/bootc.lst
|
||||
$(CP) boot.bat $(INSTALL_DIR)/boot.bat
|
||||
$(CP) aboot.bat $(INSTALL_DIR)/aboot.bat
|
||||
$(CP) media/fonts $(INSTALL_DIR)/media/fonts
|
||||
$(CP) media/nls $(INSTALL_DIR)/system32
|
||||
$(CP) media/nls/c_1252.nls $(INSTALL_DIR)/system32/ansi.nls
|
||||
$(CP) media/nls/c_437.nls $(INSTALL_DIR)/system32/oem.nls
|
||||
$(CP) media/nls/l_intl.nls $(INSTALL_DIR)/system32/casemap.nls
|
||||
|
||||
endif # BOOTCD_INSTALL
|
||||
$(CP) system.hiv $(INSTALL_DIR)/system32/config/system.hiv
|
||||
$(CP) media/fonts/helb____.ttf $(INSTALL_DIR)/media/fonts/helb____.ttf
|
||||
$(CP) media/fonts/timr____.ttf $(INSTALL_DIR)/media/fonts/timr____.ttf
|
||||
|
||||
.PHONY: install_clean install_dirs install_before
|
||||
|
||||
|
15
reactos/NEWS
Normal file
15
reactos/NEWS
Normal 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)
|
@@ -1,21 +1,13 @@
|
||||
========================
|
||||
ReactOS Version 0.1.x
|
||||
Updated March 19th, 2003
|
||||
========================
|
||||
About Reactos
|
||||
|
||||
1. What is ReactOS?
|
||||
1. What is Reactos
|
||||
|
||||
ReactOS is an Open Source effort to develop a quality operating system
|
||||
that is compatible with Windows NT applications and drivers.
|
||||
A project aiming to make an approximate clone of Windows NT, compatible
|
||||
with most Windows applications.
|
||||
|
||||
The ReactOS project, although currently focused on Windows NT 4.0
|
||||
compatibility, is always keeping an eye towards compatibility with
|
||||
future Windows NT releases, that is, Windows 2000 (NT 5.0) and
|
||||
Windows XP (NT 5.1).
|
||||
The project has a website at http://www.reactos.com/
|
||||
|
||||
More information is available at http://www.reactos.com.
|
||||
|
||||
2. Building ReactOS
|
||||
2. Building Reactos
|
||||
|
||||
See the INSTALL file for more details.
|
||||
|
||||
@@ -25,4 +17,8 @@ See the doc subdirectory for some sparse notes
|
||||
|
||||
4. Who is responsible
|
||||
|
||||
See the CREDITS file
|
||||
See the CREDITS file
|
||||
|
||||
5. Recent developments
|
||||
|
||||
See the NEWS file
|
||||
|
@@ -8,14 +8,13 @@ include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
|
||||
# Test applications
|
||||
# alive apc args atomtest bench bitblt consume copymove count dump_shared_data
|
||||
# event file gditest hello isotest lpc messagebox mstest mutex nptest
|
||||
# patblt pteb regtest sectest shm thread vmtest winhello shaptest
|
||||
TEST_APPS = alive apc args atomtest bench bitblt consume copymove count \
|
||||
dump_shared_data event file gditest hello isotest lpc messagebox \
|
||||
mstest mutex event file gditest hello isotest lpc messagebox mstest \
|
||||
mutex nptest pteb regtest sectest shm thread tokentest vmtest \
|
||||
winhello dibtest lock hivetest shaptest wm_paint multiwin icontest
|
||||
# alive apc args atomtest bench consume copymove count dump_shared_data
|
||||
# event file gditest hello isotest lpc mstest mutex nptest
|
||||
# pteb regtest sectest shm simple thread vmtest winhello
|
||||
TEST_APPS = alive apc args atomtest bench consume copymove count dump_shared_data \
|
||||
event file gditest hello isotest lpc mstest mutex nptest \
|
||||
pteb regtest sectest shm simple thread tokentest vmtest winhello dibtest \
|
||||
lock
|
||||
|
||||
TEST_MISC =
|
||||
|
||||
@@ -42,19 +41,19 @@ dist: $(TEST_APPS:%=%_dist) \
|
||||
# Test Applications
|
||||
#
|
||||
$(TEST_APPS): %:
|
||||
$(MAKE) -C $*
|
||||
make -C $*
|
||||
|
||||
$(TEST_APPS:%=%_implib): %_implib:
|
||||
$(MAKE) -C $* implib
|
||||
make -C $* implib
|
||||
|
||||
$(TEST_APPS:%=%_clean): %_clean:
|
||||
$(MAKE) -C $* clean
|
||||
make -C $* clean
|
||||
|
||||
$(TEST_APPS:%=%_dist): %_dist:
|
||||
$(MAKE) -C $* dist
|
||||
make -C $* dist
|
||||
|
||||
$(TEST_APPS:%=%_install): %_install:
|
||||
$(MAKE) -C $* install
|
||||
make -C $* install
|
||||
|
||||
.PHONY: $(TEST_APPS) $(TEST_APPS:%=%_implib) $(TEST_APPS:%=%_clean) $(TEST_APPS:%=%_install) $(TEST_APPS:%=%_dist)
|
||||
|
||||
@@ -63,19 +62,19 @@ $(TEST_APPS:%=%_install): %_install:
|
||||
# Misc Test Applications
|
||||
#
|
||||
$(TEST_MISC): %:
|
||||
$(MAKE) -C tests/$*
|
||||
make -C tests/$*
|
||||
|
||||
$(TEST_MISC:%=%_implib): %_implib:
|
||||
$(MAKE) -C tests/$* implib
|
||||
make -C tests/$* implib
|
||||
|
||||
$(TEST_MISC:%=%_clean): %_clean:
|
||||
$(MAKE) -C tests/$* clean
|
||||
make -C tests/$* clean
|
||||
|
||||
$(TEST_MISC:%=%_dist): %_dist:
|
||||
$(MAKE) -C tests/$* dist
|
||||
make -C tests/$* dist
|
||||
|
||||
$(TEST_MISC:%=%_install): %_install:
|
||||
$(MAKE) -C tests/$* install
|
||||
make -C tests/$* install
|
||||
|
||||
.PHONY: $(TEST_MISC) $(TEST_MISC:%=%_implib) $(TEST_MISC:%=%_clean) $(TEST_MISC:%=%_install) $(TEST_MISC:%=%_dist)
|
||||
|
||||
|
@@ -3,4 +3,3 @@
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -3,4 +3,3 @@
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -3,4 +3,3 @@
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -3,4 +3,3 @@
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -3,4 +3,3 @@
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -3,4 +3,3 @@
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -1,17 +1,20 @@
|
||||
|
||||
/*
|
||||
* Windows 2000 Graphics API Black Book
|
||||
* (BitBlt Bitmap Rendering Demo)
|
||||
*
|
||||
* Created by Damon Chandler <dmc27@ee.cornell.edu>
|
||||
* Updates can be downloaded at: <www.coriolis.com>
|
||||
*
|
||||
* Please do not hesistate to e-mail me at dmc27@ee.cornell.edu
|
||||
* if you have any questions about this code.
|
||||
*/
|
||||
// ------------------------------------------------------------------
|
||||
// Windows 2000 Graphics API Black Book
|
||||
// Chapter 1 - Listing 1.3 (BitBlt Bitmap Rendering Demo)
|
||||
//
|
||||
// Created by Damon Chandler <dmc27@ee.cornell.edu>
|
||||
// Updates can be downloaded at: <www.coriolis.com>
|
||||
//
|
||||
// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu
|
||||
// if you have any questions about this code.
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
|
||||
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
#include <windows.h>
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
|
||||
HINSTANCE HInst;
|
||||
const char* WndClassName = "GMainWnd";
|
||||
@@ -31,8 +34,7 @@ int APIENTRY WinMain(HINSTANCE HInstance, HINSTANCE HPrevInstance,
|
||||
wc.lpfnWndProc = MainWndProc;
|
||||
wc.hInstance = HInstance;
|
||||
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||
/* wc.hbrBackground = reinterpret_cast<HBRUSH>(COLOR_BTNFACE + 1); */
|
||||
wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
|
||||
wc.hbrBackground = reinterpret_cast<HBRUSH>(COLOR_BTNFACE + 1);
|
||||
wc.lpszClassName = WndClassName;
|
||||
|
||||
if (RegisterClass(&wc))
|
||||
@@ -61,8 +63,10 @@ int APIENTRY WinMain(HINSTANCE HInstance, HINSTANCE HPrevInstance,
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//------------------------------------------------------------------
|
||||
|
||||
/* image related */
|
||||
|
||||
// image related
|
||||
BITMAP bmp;
|
||||
LPCSTR filename = TEXT("lena.bmp");
|
||||
HDC HMemDC = NULL;
|
||||
@@ -75,24 +79,24 @@ LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
|
||||
{
|
||||
case WM_CREATE:
|
||||
{
|
||||
/* create a memory DC */
|
||||
// create a memory DC
|
||||
HMemDC = CreateCompatibleDC(NULL);
|
||||
if (HMemDC)
|
||||
{
|
||||
/* load a bitmap from file */
|
||||
// load a bitmap from file
|
||||
HBITMAP HBmp =
|
||||
/* static_cast<HBITMAP> */(
|
||||
static_cast<HBITMAP>(
|
||||
LoadImage(HInst, filename, IMAGE_BITMAP,
|
||||
0, 0, LR_LOADFROMFILE)
|
||||
);
|
||||
if (HBmp)
|
||||
{
|
||||
/* extract dimensions of the bitmap */
|
||||
// extract dimensions of the bitmap
|
||||
GetObject(HBmp, sizeof(BITMAP), &bmp);
|
||||
|
||||
/* associate the bitmap with the memory DC */
|
||||
/* HOldBmp = static_cast<HBITMAP> */
|
||||
(SelectObject(HMemDC, HBmp)
|
||||
// associate the bitmap with the memory DC
|
||||
HOldBmp = static_cast<HBITMAP>(
|
||||
SelectObject(HMemDC, HBmp)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -101,22 +105,18 @@ LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
|
||||
{
|
||||
PAINTSTRUCT ps;
|
||||
const HDC Hdc = BeginPaint(HWnd, &ps);
|
||||
#if 0
|
||||
try
|
||||
#endif
|
||||
{
|
||||
|
||||
/* TODO: add palette support (see Chapter 9)... */
|
||||
|
||||
//
|
||||
// TODO: add palette support (see Chapter 9)...
|
||||
//
|
||||
|
||||
BitBlt(Hdc, 20, 15,
|
||||
bmp.bmWidth, bmp.bmHeight,
|
||||
HMemDC, 0, 0,
|
||||
SRCCOPY);
|
||||
}
|
||||
#if 0
|
||||
catch (...)
|
||||
#endif
|
||||
{
|
||||
EndPaint(HWnd, &ps);
|
||||
}
|
||||
@@ -125,7 +125,7 @@ LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
|
||||
}
|
||||
case WM_DESTROY:
|
||||
{
|
||||
/* clean up */
|
||||
// clean up
|
||||
DeleteObject(SelectObject(HMemDC, HOldBmp));
|
||||
DeleteDC(HMemDC);
|
||||
|
||||
@@ -135,3 +135,4 @@ LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
|
||||
}
|
||||
return DefWindowProc(HWnd, Msg, WParam, LParam);
|
||||
}
|
||||
//------------------------------------------------------------------
|
@@ -1,20 +1,66 @@
|
||||
# Makefile - Proj_Listing1_5.dsp
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
ifndef CFG
|
||||
CFG=Proj_Listing1_5 - Win32 Debug
|
||||
endif
|
||||
CC=gcc
|
||||
CFLAGS=
|
||||
CXX=g++
|
||||
CXXFLAGS=$(CFLAGS)
|
||||
RC=windres -O COFF
|
||||
ifeq "$(CFG)" "Proj_Listing1_5 - Win32 Release"
|
||||
CFLAGS+=-fexceptions -O2 -DWIN32 -DNDEBUG -D_WINDOWS -D_MBCS -W
|
||||
LD=$(CXX) $(CXXFLAGS)
|
||||
LDFLAGS=
|
||||
LDFLAGS+=-Wl,--subsystem,windows
|
||||
LIBS+=-lkernel32 -luser32 -lgdi32
|
||||
else
|
||||
ifeq "$(CFG)" "Proj_Listing1_5 - Win32 Debug"
|
||||
CFLAGS+=-fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W
|
||||
LD=$(CXX) $(CXXFLAGS)
|
||||
LDFLAGS=
|
||||
LDFLAGS+=-Wl,--subsystem,windows
|
||||
LIBS+=-lkernel32 -luser32 -lgdi32
|
||||
endif
|
||||
endif
|
||||
|
||||
TARGET_NORC = yes
|
||||
ifndef TARGET
|
||||
TARGET=bitblt.exe
|
||||
endif
|
||||
|
||||
TARGET_TYPE = program
|
||||
.PHONY: all
|
||||
all: $(TARGET)
|
||||
|
||||
TARGET_APPTYPE = windows
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
|
||||
|
||||
TARGET_NAME = bitblt
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $@ -c $<
|
||||
|
||||
TARGET_SDKLIBS = kernel32.a gdi32.a
|
||||
%.res: %.rc
|
||||
$(RC) $(CPPFLAGS) -o $@ -i $<
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
SOURCE_FILES= \
|
||||
bitblt.cpp
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
HEADER_FILES=
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
RESOURCE_FILES=
|
||||
|
||||
SRCS=$(SOURCE_FILES) $(HEADER_FILES) $(RESOURCE_FILES)
|
||||
|
||||
OBJS=$(patsubst %.rc,%.res,$(patsubst %.cpp,%.o,$(patsubst %.c,%.o,$(filter %.c %.cpp %.rc,$(SRCS)))))
|
||||
|
||||
$(TARGET): $(OBJS)
|
||||
$(LD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
-del $(OBJS) $(TARGET)
|
||||
|
||||
.PHONY: depends
|
||||
depends:
|
||||
-$(CXX) $(CXXFLAGS) $(CPPFLAGS) -MM $(filter %.c %.cpp,$(SRCS)) > Proj_Listing1_5.dep
|
||||
|
||||
-include Proj_Listing1_5.dep
|
||||
|
||||
# EOF
|
||||
|
@@ -1,6 +0,0 @@
|
||||
statst.exe
|
||||
statst.nostrip.exe
|
||||
statst.sym
|
||||
statst.coff
|
||||
*.d
|
||||
*.o*.map
|
@@ -1,20 +0,0 @@
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_NORC = yes
|
||||
|
||||
TARGET_TYPE = program
|
||||
|
||||
TARGET_APPTYPE = windows
|
||||
|
||||
TARGET_NAME = buttontst
|
||||
|
||||
TARGET_SDKLIBS = kernel32.a gdi32.a
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
||||
# EOF
|
@@ -1,108 +0,0 @@
|
||||
/* Based on Radoslaw Sokol's static control test. */
|
||||
#include <windows.h>
|
||||
|
||||
static LPSTR BUTTON_CLASS = "BUTTON";
|
||||
static LPSTR TEST_WND_CLASS = "TESTWND";
|
||||
|
||||
#ifdef NDEBUG
|
||||
#define DPRINT(s) (void)0
|
||||
#else
|
||||
#define DPRINT(s) OutputDebugStringA("BUTTONTEST: " s "\n")
|
||||
#endif
|
||||
|
||||
HINSTANCE AppInstance = NULL;
|
||||
|
||||
LRESULT WmCreate(
|
||||
HWND Wnd)
|
||||
{
|
||||
UCHAR i;
|
||||
DPRINT("WM_CREATE (enter).");
|
||||
DPRINT("test 1");
|
||||
CreateWindowEx(0, BUTTON_CLASS, "PushButton", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE,
|
||||
10, 10, 150, 30, Wnd, NULL, AppInstance, NULL);
|
||||
DPRINT("test 2");
|
||||
CreateWindowEx(0, BUTTON_CLASS, "DefPushButton", BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE,
|
||||
10, 40, 150, 30, Wnd, NULL, AppInstance, NULL);
|
||||
DPRINT("test 3");
|
||||
CreateWindowEx(0, BUTTON_CLASS, "AutoRadioButton", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE,
|
||||
10, 70, 150, 30, Wnd, NULL, AppInstance, NULL);
|
||||
DPRINT("test 4");
|
||||
CreateWindowEx(0, BUTTON_CLASS, "AutoCheckBox", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE,
|
||||
10, 100, 150, 30, Wnd, NULL, AppInstance, NULL);
|
||||
|
||||
DPRINT("WM_CREATE (leave).");
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CALLBACK TestWndProc(
|
||||
HWND Wnd,
|
||||
UINT Msg,
|
||||
WPARAM wParam,
|
||||
LPARAM lParam)
|
||||
{
|
||||
switch (Msg) {
|
||||
case WM_CREATE:
|
||||
return WmCreate(Wnd);
|
||||
case WM_DESTROY:
|
||||
PostQuitMessage(0);
|
||||
return 0;
|
||||
default:
|
||||
return DefWindowProc(Wnd, Msg, wParam, lParam);
|
||||
}
|
||||
}
|
||||
|
||||
int STDCALL WinMain(
|
||||
HINSTANCE hInstance,
|
||||
HINSTANCE hPrevInstance,
|
||||
LPSTR lpCmdLine,
|
||||
int nShowCmd)
|
||||
{
|
||||
ATOM Result;
|
||||
MSG Msg;
|
||||
HWND MainWindow;
|
||||
WNDCLASSEX TestWndClass = {0};
|
||||
DPRINT("Application starting up.");
|
||||
// Remember instance handle.
|
||||
AppInstance = GetModuleHandle(NULL);
|
||||
// Register test window class.
|
||||
TestWndClass.cbSize = sizeof(WNDCLASSEX);
|
||||
TestWndClass.lpfnWndProc = &TestWndProc;
|
||||
TestWndClass.hInstance = AppInstance;
|
||||
TestWndClass.hCursor = LoadCursor(0, IDC_ARROW);
|
||||
TestWndClass.hbrBackground = CreateSolidBrush(RGB(255,255,230));
|
||||
TestWndClass.lpszClassName = TEST_WND_CLASS;
|
||||
Result = RegisterClassEx(&TestWndClass);
|
||||
if (Result == 0) {
|
||||
DPRINT("Error registering class.");
|
||||
MessageBox(0, "Error registering test window class.",
|
||||
"Button control test", MB_ICONSTOP | MB_OK);
|
||||
ExitProcess(0);
|
||||
}
|
||||
// Create main window.
|
||||
DPRINT("Creating main window.");
|
||||
MainWindow = CreateWindowEx(WS_EX_APPWINDOW | WS_EX_CLIENTEDGE,
|
||||
TEST_WND_CLASS, "Button test",
|
||||
WS_OVERLAPPEDWINDOW, 50, 50, 180, 365,
|
||||
NULL, NULL, AppInstance, NULL);
|
||||
if (MainWindow == 0) {
|
||||
DPRINT("Error creating main window.");
|
||||
UnregisterClass(TEST_WND_CLASS, AppInstance);
|
||||
MessageBox(0, "Error creating test window.",
|
||||
"Static control test", MB_ICONSTOP | MB_OK);
|
||||
ExitProcess(0);
|
||||
}
|
||||
DPRINT("Showing main window.");
|
||||
ShowWindow(MainWindow, SW_SHOWNORMAL);
|
||||
UpdateWindow(MainWindow);
|
||||
// Run message loop.
|
||||
DPRINT("Entering message loop.");
|
||||
while (GetMessage(&Msg, NULL, 0, 0) > 0) {
|
||||
TranslateMessage(&Msg);
|
||||
DispatchMessage(&Msg);
|
||||
}
|
||||
// Unregister window class.
|
||||
UnregisterClass(TEST_WND_CLASS, AppInstance);
|
||||
DPRINT("Exiting.");
|
||||
|
||||
return Msg.wParam;
|
||||
}
|
@@ -3,4 +3,3 @@
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -1,4 +1,3 @@
|
||||
*.o
|
||||
*.exe
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -3,4 +3,3 @@
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -3,4 +3,3 @@
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -1,196 +1,81 @@
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define CELL_SIZE 10
|
||||
extern BOOL STDCALL GdiDllInitialize(HANDLE hInstance, DWORD Event, LPVOID Reserved);
|
||||
|
||||
static RGBQUAD Colors[] =
|
||||
void __stdcall Test1BPP (HDC Desktop)
|
||||
{
|
||||
{ 0x00, 0x00, 0x00, 0x00 }, // black
|
||||
{ 0x00, 0x00, 0x80, 0x00 }, // red
|
||||
{ 0x00, 0x80, 0x00, 0x00 }, // green
|
||||
{ 0x00, 0x80, 0x80, 0x00 }, // brown
|
||||
{ 0x80, 0x00, 0x00, 0x00 }, // blue
|
||||
{ 0x80, 0x00, 0x80, 0x00 }, // magenta
|
||||
{ 0x80, 0x80, 0x00, 0x00 }, // cyan
|
||||
{ 0x80, 0x80, 0x80, 0x00 }, // dark gray
|
||||
{ 0xc0, 0xc0, 0xc0, 0x00 }, // light gray
|
||||
{ 0x00, 0x00, 0xFF, 0x00 }, // bright red
|
||||
{ 0x00, 0xFF, 0x00, 0x00 }, // bright green
|
||||
{ 0x00, 0xFF, 0xFF, 0x00 }, // bright yellow
|
||||
{ 0xFF, 0x00, 0x00, 0x00 }, // bright blue
|
||||
{ 0xFF, 0x00, 0xFF, 0x00 }, // bright magenta
|
||||
{ 0xFF, 0xFF, 0x00, 0x00 }, // bright cyan
|
||||
{ 0xFF, 0xFF, 0xFF, 0x00 } // bright white
|
||||
};
|
||||
HDC TestDC;
|
||||
HPEN WhitePen;
|
||||
HBITMAP DIB1;
|
||||
BITMAPINFOHEADER BitInf;
|
||||
PBITMAPINFO BitPalInf;
|
||||
DWORD bmiSize = sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) * 2;
|
||||
|
||||
LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM);
|
||||
// Create a 1BPP DIB
|
||||
BitPalInf = (PBITMAPINFO)malloc(bmiSize);
|
||||
BitInf.biSize = sizeof(BITMAPINFOHEADER);
|
||||
BitInf.biWidth = 50;
|
||||
BitInf.biHeight = -50; // it's top down (since BI_RGB is used, the sign is operative of direction)
|
||||
BitInf.biPlanes = 1;
|
||||
BitInf.biBitCount = 1;
|
||||
BitInf.biCompression = BI_RGB;
|
||||
BitInf.biSizeImage = 0;
|
||||
BitInf.biXPelsPerMeter = 0;
|
||||
BitInf.biYPelsPerMeter = 0;
|
||||
BitInf.biClrUsed = 0;
|
||||
BitInf.biClrImportant = 0;
|
||||
BitPalInf->bmiHeader = BitInf;
|
||||
BitPalInf->bmiColors[1].rgbBlue = 255;
|
||||
BitPalInf->bmiColors[1].rgbGreen = 255;
|
||||
BitPalInf->bmiColors[1].rgbRed = 255;
|
||||
BitPalInf->bmiColors[1].rgbReserved = 255;
|
||||
BitPalInf->bmiColors[0].rgbBlue = 0;
|
||||
BitPalInf->bmiColors[0].rgbGreen = 0;
|
||||
BitPalInf->bmiColors[0].rgbRed = 0;
|
||||
BitPalInf->bmiColors[0].rgbReserved = 0;
|
||||
|
||||
int WINAPI
|
||||
WinMain(HINSTANCE hInstance,
|
||||
HINSTANCE hPrevInstance,
|
||||
LPSTR lpszCmdLine,
|
||||
int nCmdShow)
|
||||
{
|
||||
WNDCLASS wc;
|
||||
MSG msg;
|
||||
HWND hWnd;
|
||||
DIB1 = (HBITMAP) CreateDIBSection(NULL, BitPalInf, DIB_RGB_COLORS, NULL, NULL, 0);
|
||||
TestDC = CreateCompatibleDC(NULL);
|
||||
SelectObject(TestDC, DIB1);
|
||||
|
||||
wc.lpszClassName = "DibTestClass";
|
||||
wc.lpfnWndProc = MainWndProc;
|
||||
wc.style = CS_VREDRAW | CS_HREDRAW;
|
||||
wc.hInstance = hInstance;
|
||||
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
|
||||
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||
wc.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH);
|
||||
wc.lpszMenuName = NULL;
|
||||
wc.cbClsExtra = 0;
|
||||
wc.cbWndExtra = 0;
|
||||
if (RegisterClass(&wc) == 0)
|
||||
{
|
||||
fprintf(stderr, "RegisterClass failed (last error 0x%X)\n",
|
||||
GetLastError());
|
||||
return(1);
|
||||
}
|
||||
// Draw a white rectangle on the 1BPP DIB
|
||||
WhitePen = CreatePen(PS_SOLID, 1, RGB(255, 255, 255));
|
||||
SelectObject(TestDC, WhitePen);
|
||||
Rectangle(TestDC, 0, 0, 40, 40);
|
||||
|
||||
hWnd = CreateWindow("DibTestClass",
|
||||
"DIB Test",
|
||||
WS_OVERLAPPEDWINDOW,
|
||||
CW_USEDEFAULT,
|
||||
CW_USEDEFAULT,
|
||||
25 * CELL_SIZE + 5,
|
||||
25 * CELL_SIZE + 20,
|
||||
NULL,
|
||||
NULL,
|
||||
hInstance,
|
||||
NULL);
|
||||
if (hWnd == NULL)
|
||||
{
|
||||
fprintf(stderr, "CreateWindow failed (last error 0x%X)\n",
|
||||
GetLastError());
|
||||
return(1);
|
||||
}
|
||||
// Blt the 1BPP DIB to the display
|
||||
BitBlt(Desktop, 0, 0, 50, 50, TestDC, 0, 0, SRCCOPY);
|
||||
|
||||
ShowWindow(hWnd, nCmdShow);
|
||||
|
||||
while(GetMessage(&msg, NULL, 0, 0))
|
||||
{
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
|
||||
return msg.wParam;
|
||||
free(BitPalInf);
|
||||
// Rectangle(Desktop, 50, 50, 200, 200);
|
||||
}
|
||||
|
||||
static void PaintCells(HDC WindowDC, WORD BitCount1, WORD BitCount2,
|
||||
int XDest, int YDest)
|
||||
void DIBTest(void)
|
||||
{
|
||||
HBRUSH Brush;
|
||||
RECT Rect;
|
||||
UINT row, col;
|
||||
BITMAPINFO *BitmapInfo;
|
||||
HBITMAP DIB1, DIB2;
|
||||
HDC DC1, DC2;
|
||||
HDC Desktop;
|
||||
|
||||
BitmapInfo = malloc(sizeof(BITMAPINFO) + 15 * sizeof(RGBQUAD));
|
||||
BitmapInfo->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
|
||||
BitmapInfo->bmiHeader.biWidth = 4 * CELL_SIZE + 9;
|
||||
BitmapInfo->bmiHeader.biHeight = -(4 * CELL_SIZE + 9); // it's top down (since BI_RGB is used, the sign is operative of direction)
|
||||
BitmapInfo->bmiHeader.biPlanes = 1;
|
||||
BitmapInfo->bmiHeader.biBitCount = BitCount1;
|
||||
BitmapInfo->bmiHeader.biCompression = BI_RGB;
|
||||
BitmapInfo->bmiHeader.biSizeImage = 0;
|
||||
BitmapInfo->bmiHeader.biXPelsPerMeter = 0;
|
||||
BitmapInfo->bmiHeader.biYPelsPerMeter = 0;
|
||||
BitmapInfo->bmiHeader.biClrUsed = 16;
|
||||
BitmapInfo->bmiHeader.biClrImportant = 16;
|
||||
for (col = 0; col < 16; col++) {
|
||||
BitmapInfo->bmiColors[col] = Colors[col];
|
||||
// Set up a DC called Desktop that accesses DISPLAY
|
||||
Desktop = CreateDCA("DISPLAY", NULL, NULL, NULL);
|
||||
if(Desktop == NULL) {
|
||||
printf("Can't create desktop\n");
|
||||
return;
|
||||
}
|
||||
DIB1 = CreateDIBSection(NULL, BitmapInfo, DIB_RGB_COLORS, NULL, NULL, 0);
|
||||
DC1 = CreateCompatibleDC(NULL);
|
||||
SelectObject(DC1, DIB1);
|
||||
|
||||
BitmapInfo->bmiHeader.biBitCount = BitCount2;
|
||||
DIB2 = CreateDIBSection(NULL, BitmapInfo, DIB_RGB_COLORS, NULL, NULL, 0);
|
||||
DC2 = CreateCompatibleDC(NULL);
|
||||
SelectObject(DC2, DIB2);
|
||||
free(BitmapInfo);
|
||||
// 1BPP Test
|
||||
Test1BPP(Desktop);
|
||||
|
||||
/* Now paint on the first bitmap */
|
||||
for (row = 0; row < 4; row++)
|
||||
{
|
||||
for (col = 0; col < 4; col++)
|
||||
{
|
||||
Brush = CreateSolidBrush(RGB(Colors[4 * row + col].rgbRed,
|
||||
Colors[4 * row + col].rgbGreen,
|
||||
Colors[4 * row + col].rgbBlue));
|
||||
Rect.left = CELL_SIZE * col + 5;
|
||||
Rect.top = CELL_SIZE * row + 5;
|
||||
Rect.right = Rect.left + CELL_SIZE;
|
||||
Rect.bottom = Rect.top + CELL_SIZE;
|
||||
FillRect(DC1, &Rect, Brush);
|
||||
DeleteObject(Brush);
|
||||
}
|
||||
}
|
||||
Sleep(50000);
|
||||
|
||||
/* Copy the first bitmap to the second */
|
||||
BitBlt(DC2, 4, 4, 4 * CELL_SIZE, 4 * CELL_SIZE, DC1, 5, 5, SRCCOPY);
|
||||
|
||||
/* Show results on screen */
|
||||
BitBlt(WindowDC, XDest, YDest, 4 * CELL_SIZE, 4 * CELL_SIZE, DC2, 4, 4, SRCCOPY);
|
||||
// Free up everything
|
||||
DeleteDC(Desktop);
|
||||
}
|
||||
|
||||
LRESULT CALLBACK MainWndProc(HWND Wnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
PAINTSTRUCT ps;
|
||||
HDC WindowDC;
|
||||
printf("Entering DIBTest..\n");
|
||||
|
||||
switch(msg)
|
||||
{
|
||||
case WM_PAINT:
|
||||
WindowDC = BeginPaint(Wnd, &ps);
|
||||
|
||||
PaintCells(WindowDC, 4, 4, 0, 0);
|
||||
PaintCells(WindowDC, 4, 8, 5 * CELL_SIZE, 0);
|
||||
PaintCells(WindowDC, 4, 16, 10 * CELL_SIZE, 0);
|
||||
PaintCells(WindowDC, 4, 24, 15 * CELL_SIZE, 0);
|
||||
PaintCells(WindowDC, 4, 32, 20 * CELL_SIZE, 0);
|
||||
|
||||
PaintCells(WindowDC, 8, 4, 0, 5 * CELL_SIZE);
|
||||
PaintCells(WindowDC, 8, 8, 5 * CELL_SIZE, 5 * CELL_SIZE);
|
||||
PaintCells(WindowDC, 8, 16, 10 * CELL_SIZE, 5 * CELL_SIZE);
|
||||
PaintCells(WindowDC, 8, 24, 15 * CELL_SIZE, 5 * CELL_SIZE);
|
||||
PaintCells(WindowDC, 8, 32, 20 * CELL_SIZE, 5 * CELL_SIZE);
|
||||
|
||||
PaintCells(WindowDC, 16, 4, 0, 10 * CELL_SIZE);
|
||||
PaintCells(WindowDC, 16, 8, 5 * CELL_SIZE, 10 * CELL_SIZE);
|
||||
PaintCells(WindowDC, 16, 16, 10 * CELL_SIZE, 10 * CELL_SIZE);
|
||||
PaintCells(WindowDC, 16, 24, 15 * CELL_SIZE, 10 * CELL_SIZE);
|
||||
PaintCells(WindowDC, 16, 32, 20 * CELL_SIZE, 10 * CELL_SIZE);
|
||||
|
||||
PaintCells(WindowDC, 24, 4, 0, 15 * CELL_SIZE);
|
||||
PaintCells(WindowDC, 24, 8, 5 * CELL_SIZE, 15 * CELL_SIZE);
|
||||
PaintCells(WindowDC, 24, 16, 10 * CELL_SIZE, 15 * CELL_SIZE);
|
||||
PaintCells(WindowDC, 24, 24, 15 * CELL_SIZE, 15 * CELL_SIZE);
|
||||
PaintCells(WindowDC, 24, 32, 20 * CELL_SIZE, 15 * CELL_SIZE);
|
||||
|
||||
PaintCells(WindowDC, 32, 4, 0, 20 * CELL_SIZE);
|
||||
PaintCells(WindowDC, 32, 8, 5 * CELL_SIZE, 20 * CELL_SIZE);
|
||||
PaintCells(WindowDC, 32, 16, 10 * CELL_SIZE, 20 * CELL_SIZE);
|
||||
PaintCells(WindowDC, 32, 24, 15 * CELL_SIZE, 20 * CELL_SIZE);
|
||||
PaintCells(WindowDC, 32, 32, 20 * CELL_SIZE, 20 * CELL_SIZE);
|
||||
|
||||
EndPaint(Wnd, &ps);
|
||||
break;
|
||||
|
||||
case WM_DESTROY:
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
|
||||
default:
|
||||
return DefWindowProc(Wnd, msg, wParam, lParam);
|
||||
}
|
||||
GdiDllInitialize (NULL, DLL_PROCESS_ATTACH, NULL);
|
||||
DIBTest();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# $Id: makefile,v 1.2 2003/03/04 10:09:00 gvg Exp $
|
||||
# $Id: makefile,v 1.1 2002/09/22 20:09:01 jfilby Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
@@ -6,7 +6,7 @@ TARGET_NORC = yes
|
||||
|
||||
TARGET_TYPE = program
|
||||
|
||||
TARGET_APPTYPE = windows
|
||||
TARGET_APPTYPE = console
|
||||
|
||||
TARGET_NAME = dibtest
|
||||
|
||||
|
@@ -3,4 +3,3 @@
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -1,82 +0,0 @@
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
|
||||
HFONT tf;
|
||||
LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM);
|
||||
|
||||
int WINAPI
|
||||
WinMain(HINSTANCE hInstance,
|
||||
HINSTANCE hPrevInstance,
|
||||
LPSTR lpszCmdLine,
|
||||
int nCmdShow)
|
||||
{
|
||||
WNDCLASS wc;
|
||||
MSG msg;
|
||||
HWND hWnd;
|
||||
HWND hWnd2;
|
||||
|
||||
wc.lpfnWndProc = MainWndProc;
|
||||
wc.style = CS_VREDRAW | CS_HREDRAW;
|
||||
wc.hInstance = hInstance;
|
||||
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
|
||||
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||
wc.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH);
|
||||
wc.lpszMenuName = NULL;
|
||||
wc.cbClsExtra = 0;
|
||||
wc.cbWndExtra = 0;
|
||||
if (RegisterClass(&wc) == 0)
|
||||
{
|
||||
fprintf(stderr, "RegisterClass failed (last error 0x%X)\n",
|
||||
GetLastError());
|
||||
return(1);
|
||||
}
|
||||
|
||||
hWnd = CreateWindow("EDIT",
|
||||
"Edit Control Test",
|
||||
WS_OVERLAPPEDWINDOW|WS_VISIBLE,
|
||||
0,
|
||||
0,
|
||||
320,
|
||||
240,
|
||||
NULL,
|
||||
NULL,
|
||||
hInstance,
|
||||
NULL);
|
||||
|
||||
if (!hWnd)
|
||||
{
|
||||
fprintf(stderr, "CreateWindow failed (last error 0x%X)\n",
|
||||
GetLastError());
|
||||
return(1);
|
||||
}
|
||||
ShowWindow(hWnd, nCmdShow);
|
||||
|
||||
while(GetMessage(&msg, NULL, 0, 0))
|
||||
{
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
return msg.wParam;
|
||||
}
|
||||
|
||||
LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
PAINTSTRUCT ps;
|
||||
HDC hDC;
|
||||
|
||||
switch(msg)
|
||||
{
|
||||
case WM_PAINT:
|
||||
hDC = BeginPaint(hWnd, &ps);
|
||||
EndPaint(hWnd, &ps);
|
||||
break;
|
||||
|
||||
case WM_DESTROY:
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
|
||||
default:
|
||||
return DefWindowProc(hWnd, msg, wParam, lParam);
|
||||
}
|
||||
return 0;
|
||||
}
|
@@ -1,20 +0,0 @@
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_NORC = yes
|
||||
|
||||
TARGET_TYPE = program
|
||||
|
||||
TARGET_APPTYPE = windows
|
||||
|
||||
TARGET_NAME = edit-control
|
||||
|
||||
TARGET_SDKLIBS = kernel32.a gdi32.a
|
||||
|
||||
TARGET_OBJECTS = edit.o
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
||||
# EOF
|
@@ -3,4 +3,3 @@
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -3,4 +3,3 @@
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -3,4 +3,3 @@
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -3,4 +3,3 @@
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,6 +0,0 @@
|
||||
*.o
|
||||
*.d
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
Binary file not shown.
Before Width: | Height: | Size: 766 B |
@@ -1,144 +0,0 @@
|
||||
#include <windows.h>
|
||||
#include "resource.h"
|
||||
|
||||
const char titleDrwIco[] = "DrawIcon Output";
|
||||
const char titleMask[] = "Mask(AND image)";
|
||||
const char titleXor[] = "XOR(color image)";
|
||||
const char file[] = "Icon from file:";
|
||||
const char res[] = "Icon from Resorce:";
|
||||
|
||||
HFONT tf;
|
||||
HINSTANCE hInst;
|
||||
|
||||
LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM);
|
||||
|
||||
int WINAPI
|
||||
WinMain(HINSTANCE hInstance,
|
||||
HINSTANCE hPrevInstance,
|
||||
LPSTR lpszCmdLine,
|
||||
int nCmdShow)
|
||||
{
|
||||
hInst = hInstance;
|
||||
WNDCLASS wc;
|
||||
MSG msg;
|
||||
HWND hWnd;
|
||||
|
||||
wc.lpszClassName = "IconTestClass";
|
||||
wc.lpfnWndProc = MainWndProc;
|
||||
wc.style = CS_VREDRAW | CS_HREDRAW;
|
||||
wc.hInstance = hInstance;
|
||||
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
|
||||
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||
wc.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH);
|
||||
wc.lpszMenuName = NULL;
|
||||
wc.cbClsExtra = 0;
|
||||
wc.cbWndExtra = 0;
|
||||
if (RegisterClass(&wc) == 0)
|
||||
{
|
||||
DbgPrint("RegisterClass failed (last error 0x%X)\n", GetLastError());
|
||||
return(1);
|
||||
}
|
||||
|
||||
hWnd = CreateWindow("IconTestClass",
|
||||
"Icon Test",
|
||||
WS_OVERLAPPEDWINDOW|WS_HSCROLL|WS_VSCROLL,
|
||||
CW_USEDEFAULT,
|
||||
CW_USEDEFAULT,
|
||||
455,
|
||||
320,
|
||||
NULL,
|
||||
NULL,
|
||||
hInstance,
|
||||
NULL);
|
||||
if (hWnd == NULL)
|
||||
{
|
||||
DbgPrint("CreateWindow failed (last error 0x%X)\n", GetLastError());
|
||||
return(1);
|
||||
}
|
||||
|
||||
tf = CreateFontA(14,0, 0, TA_BASELINE, FW_NORMAL, FALSE, FALSE, FALSE,
|
||||
ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,
|
||||
DEFAULT_QUALITY, FIXED_PITCH|FF_DONTCARE, "Timmons");
|
||||
|
||||
ShowWindow(hWnd, nCmdShow);
|
||||
|
||||
while(GetMessage(&msg, NULL, 0, 0))
|
||||
{
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
|
||||
return msg.wParam;
|
||||
}
|
||||
|
||||
LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
PAINTSTRUCT ps;
|
||||
HDC hDC;
|
||||
HICON hIcon;
|
||||
HGDIOBJ hOld;
|
||||
HDC hMemDC;
|
||||
ICONINFO iconinfo;
|
||||
HBITMAP hMaskBitmap;
|
||||
HBITMAP hColorBitmap;
|
||||
|
||||
switch(msg)
|
||||
{
|
||||
case WM_PAINT:
|
||||
hDC = BeginPaint(hWnd, &ps);
|
||||
SelectObject(hDC, tf);
|
||||
SetBkMode(hDC, TRANSPARENT);
|
||||
|
||||
TextOut(hDC, 160, 10, file, strlen(file));
|
||||
TextOut(hDC, 15, 85, titleDrwIco, strlen(titleDrwIco));
|
||||
TextOut(hDC, 160, 85, titleMask, strlen(titleMask));
|
||||
TextOut(hDC, 300, 85, titleXor, strlen(titleXor));
|
||||
|
||||
hIcon = LoadImage(NULL, "icon.ICO", IMAGE_ICON, 0, 0, LR_DEFAULTSIZE|LR_LOADFROMFILE);
|
||||
DrawIcon(hDC,50,50,hIcon);
|
||||
|
||||
hMemDC = CreateCompatibleDC(hDC);
|
||||
GetIconInfo(hIcon, &iconinfo);
|
||||
DestroyIcon(hIcon);
|
||||
|
||||
hOld = SelectObject(hMemDC, iconinfo.hbmMask);
|
||||
BitBlt(hDC, 200, 50, 32, 32, hMemDC, 0, 0, SRCCOPY);
|
||||
SelectObject(hMemDC, iconinfo.hbmColor);
|
||||
BitBlt(hDC, 350, 50, 32, 32, hMemDC, 0, 0, SRCCOPY);
|
||||
|
||||
DeleteObject(iconinfo.hbmMask);
|
||||
DeleteObject(iconinfo.hbmColor);
|
||||
|
||||
SelectObject(hMemDC, hOld);
|
||||
|
||||
TextOut(hDC, 145, 150, res, strlen(res));
|
||||
TextOut(hDC, 15, 225, titleDrwIco, strlen(titleDrwIco));
|
||||
TextOut(hDC, 160, 225, titleMask, strlen(titleMask));
|
||||
TextOut(hDC, 300, 225, titleXor, strlen(titleXor));
|
||||
|
||||
hIcon = LoadImage(hInst, MAKEINTRESOURCE(IDI_ICON), IMAGE_ICON, 0, 0, LR_DEFAULTSIZE);
|
||||
DrawIcon(hDC,50,190,hIcon);
|
||||
|
||||
GetIconInfo(hIcon, &iconinfo);
|
||||
DestroyIcon(hIcon);
|
||||
|
||||
hOld = SelectObject(hMemDC, iconinfo.hbmMask);
|
||||
BitBlt(hDC, 200, 190, 32, 32, hMemDC, 0, 0, SRCCOPY);
|
||||
SelectObject(hMemDC, iconinfo.hbmColor);
|
||||
BitBlt(hDC, 350, 190, 32, 32, hMemDC, 0, 0, SRCCOPY);
|
||||
|
||||
DeleteObject(iconinfo.hbmMask);
|
||||
DeleteObject(iconinfo.hbmColor);
|
||||
DeleteObject(hMemDC);
|
||||
EndPaint(hWnd, &ps);
|
||||
break;
|
||||
|
||||
case WM_DESTROY:
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
|
||||
default:
|
||||
return DefWindowProc(hWnd, msg, wParam, lParam);
|
||||
}
|
||||
return 0;
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
#include <defines.h>
|
||||
#include <reactos/resource.h>
|
||||
#include "resource.h"
|
||||
|
||||
IDI_ICON ICON DISCARDABLE "icon.ico"
|
@@ -1,19 +0,0 @@
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_NORC = no
|
||||
|
||||
TARGET_TYPE = program
|
||||
|
||||
TARGET_APPTYPE = windows
|
||||
|
||||
TARGET_NAME = icontest
|
||||
|
||||
TARGET_SDKLIBS = ntdll.a kernel32.a gdi32.a
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
||||
# EOF
|
@@ -1 +0,0 @@
|
||||
#define IDI_ICON 101
|
@@ -3,4 +3,3 @@
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -1,6 +0,0 @@
|
||||
*.o
|
||||
*.d
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
@@ -3,4 +3,3 @@
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -26,22 +26,11 @@ clean:
|
||||
|
||||
.phony: implib clean
|
||||
|
||||
ifneq ($(BOOTCD_INSTALL),)
|
||||
|
||||
install: $(PROGS:%=$(INSTALL_DIR)/%)
|
||||
|
||||
$(PROGS:%=$(INSTALL_DIR)/%): $(INSTALL_DIR)/%: %
|
||||
$(CP) $* $(INSTALL_DIR)/$*
|
||||
|
||||
else # BOOTCD_INSTALL
|
||||
|
||||
install: $(PROGS:%=$(INSTALL_DIR)/bin/%)
|
||||
|
||||
$(PROGS:%=$(INSTALL_DIR)/bin/%): $(INSTALL_DIR)/bin/%: %
|
||||
$(CP) $* $(INSTALL_DIR)/bin/$*
|
||||
|
||||
endif # BOOTCD_INSTALL
|
||||
|
||||
dist: $(PROGS:%=$(DIST_DIR)/apps/%)
|
||||
|
||||
$(PROGS:%=$(DIST_DIR)/apps/%): $(DIST_DIR)/apps/%: %
|
||||
|
@@ -1,6 +0,0 @@
|
||||
*.o
|
||||
*.d
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
@@ -3,4 +3,3 @@
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -26,22 +26,11 @@ clean:
|
||||
|
||||
.phony: implib clean
|
||||
|
||||
ifneq ($(BOOTCD_INSTALL),)
|
||||
|
||||
install: $(PROGS:%=$(INSTALL_DIR)/%)
|
||||
|
||||
$(PROGS:%=$(INSTALL_DIR)/%): $(INSTALL_DIR)/%: %
|
||||
$(CP) $* $(INSTALL_DIR)/$*
|
||||
|
||||
else # BOOTCD_INSTALL
|
||||
|
||||
install: $(PROGS:%=$(INSTALL_DIR)/bin/%)
|
||||
|
||||
$(PROGS:%=$(INSTALL_DIR)/bin/%): $(INSTALL_DIR)/bin/%: %
|
||||
$(CP) $* $(INSTALL_DIR)/bin/$*
|
||||
|
||||
endif # BOOTCD_INSTALL
|
||||
|
||||
dist: $(PROGS:%=$(DIST_DIR)/apps/%)
|
||||
|
||||
$(PROGS:%=$(DIST_DIR)/apps/%): $(DIST_DIR)/apps/%: %
|
||||
|
@@ -1,6 +0,0 @@
|
||||
*.o
|
||||
*.d
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
@@ -1,21 +0,0 @@
|
||||
# $Id: makefile,v 1.1 2003/05/26 10:51:20 rcampbell Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_NORC = yes
|
||||
|
||||
TARGET_TYPE = program
|
||||
|
||||
TARGET_APPTYPE = windows
|
||||
|
||||
TARGET_NAME = multiwin
|
||||
|
||||
TARGET_SDKLIBS = kernel32.a gdi32.a
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
||||
# EOF
|
@@ -1,95 +0,0 @@
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
|
||||
HFONT tf;
|
||||
LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM);
|
||||
|
||||
int WINAPI
|
||||
WinMain(HINSTANCE hInstance,
|
||||
HINSTANCE hPrevInstance,
|
||||
LPSTR lpszCmdLine,
|
||||
int nCmdShow)
|
||||
{
|
||||
WNDCLASS wc;
|
||||
MSG msg;
|
||||
HWND hWnd;
|
||||
HWND hWnd2;
|
||||
|
||||
wc.lpszClassName = "MultiWinClass";
|
||||
wc.lpfnWndProc = MainWndProc;
|
||||
wc.style = CS_VREDRAW | CS_HREDRAW;
|
||||
wc.hInstance = hInstance;
|
||||
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
|
||||
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||
wc.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH);
|
||||
wc.lpszMenuName = NULL;
|
||||
wc.cbClsExtra = 0;
|
||||
wc.cbWndExtra = 0;
|
||||
if (RegisterClass(&wc) == 0)
|
||||
{
|
||||
fprintf(stderr, "RegisterClass failed (last error 0x%X)\n",
|
||||
GetLastError());
|
||||
return(1);
|
||||
}
|
||||
|
||||
hWnd = CreateWindow("MultiWinClass",
|
||||
"Window1",
|
||||
WS_OVERLAPPEDWINDOW|WS_VISIBLE,
|
||||
0,
|
||||
0,
|
||||
320,
|
||||
240,
|
||||
NULL,
|
||||
NULL,
|
||||
hInstance,
|
||||
NULL);
|
||||
|
||||
hWnd2 = hWnd = CreateWindow("MultiWinClass",
|
||||
"Window2",
|
||||
WS_CAPTION|WS_SYSMENU|WS_VISIBLE,
|
||||
400,
|
||||
0,
|
||||
160,
|
||||
120,
|
||||
NULL,
|
||||
NULL,
|
||||
hInstance,
|
||||
NULL);
|
||||
|
||||
if (!hWnd || !hWnd2)
|
||||
{
|
||||
fprintf(stderr, "CreateWindow failed (last error 0x%X)\n",
|
||||
GetLastError());
|
||||
return(1);
|
||||
}
|
||||
ShowWindow(hWnd, nCmdShow);
|
||||
|
||||
while(GetMessage(&msg, NULL, 0, 0))
|
||||
{
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
return msg.wParam;
|
||||
}
|
||||
|
||||
LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
PAINTSTRUCT ps;
|
||||
HDC hDC;
|
||||
|
||||
switch(msg)
|
||||
{
|
||||
case WM_PAINT:
|
||||
hDC = BeginPaint(hWnd, &ps);
|
||||
EndPaint(hWnd, &ps);
|
||||
break;
|
||||
|
||||
case WM_DESTROY:
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
|
||||
default:
|
||||
return DefWindowProc(hWnd, msg, wParam, lParam);
|
||||
}
|
||||
return 0;
|
||||
}
|
@@ -3,4 +3,3 @@
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -3,4 +3,3 @@
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -25,22 +25,11 @@ clean:
|
||||
|
||||
.phony: implib clean
|
||||
|
||||
ifneq ($(BOOTCD_INSTALL),)
|
||||
|
||||
install: $(PROGS:%=$(INSTALL_DIR)/%)
|
||||
|
||||
$(PROGS:%=$(INSTALL_DIR)/%): $(INSTALL_DIR)/%: %
|
||||
$(CP) $* $(INSTALL_DIR)/$*
|
||||
|
||||
else # BOOTCD_INSTALL
|
||||
|
||||
install: $(PROGS:%=$(INSTALL_DIR)/bin/%)
|
||||
|
||||
$(PROGS:%=$(INSTALL_DIR)/bin/%): $(INSTALL_DIR)/bin/%: %
|
||||
$(CP) $* $(INSTALL_DIR)/bin/$*
|
||||
|
||||
endif # BOOTCD_INSTALL
|
||||
|
||||
dist: $(PROGS:%=$(DIST_DIR)/apps/%)
|
||||
|
||||
$(PROGS:%=$(DIST_DIR)/apps/%): $(DIST_DIR)/apps/%: %
|
||||
|
@@ -230,9 +230,7 @@ LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
|
||||
{
|
||||
PAINTSTRUCT ps;
|
||||
HDC Hdc = BeginPaint(HWnd, &ps);
|
||||
#if 0
|
||||
try
|
||||
#endif
|
||||
{
|
||||
//
|
||||
// TODO: Add palette support...
|
||||
@@ -245,9 +243,7 @@ LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
|
||||
HMemDC, 0, 0,
|
||||
SRCCOPY);
|
||||
}
|
||||
#if 0
|
||||
catch (...)
|
||||
#endif
|
||||
{
|
||||
EndPaint(HWnd, &ps);
|
||||
}
|
||||
|
@@ -1,22 +0,0 @@
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_NORC = yes
|
||||
|
||||
TARGET_TYPE = program
|
||||
|
||||
TARGET_APPTYPE = console
|
||||
|
||||
TARGET_NAME = pipe
|
||||
|
||||
TARGET_CFLAGS = -DSTANDALONE
|
||||
|
||||
TARGET_SDKLIBS = ntdll.a kernel32.a
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
||||
# EOF
|
@@ -1,602 +0,0 @@
|
||||
/*
|
||||
* Unit tests for named pipe functions in Wine
|
||||
*
|
||||
* Copyright (c) 2002 Dan Kegel
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <assert.h>
|
||||
|
||||
#ifndef STANDALONE
|
||||
#include "wine/test.h"
|
||||
#else
|
||||
#include <assert.h>
|
||||
#define START_TEST(name) main(int argc, char **argv)
|
||||
#define ok(condition, msg) assert(condition)
|
||||
#define todo_wine
|
||||
#endif
|
||||
|
||||
#ifndef STANDALONE
|
||||
#include <wtypes.h>
|
||||
#include <windef.h>
|
||||
#include <winbase.h>
|
||||
#include <winerror.h>
|
||||
#else
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#define PIPENAME "\\\\.\\PiPe\\tests_" __FILE__
|
||||
|
||||
static void msg(const char *s)
|
||||
{
|
||||
DWORD cbWritten;
|
||||
WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), s, strlen(s), &cbWritten, NULL);
|
||||
}
|
||||
|
||||
void test_CreateNamedPipe(void)
|
||||
{
|
||||
HANDLE hnp;
|
||||
HANDLE hFile;
|
||||
const char obuf[] = "Bit Bucket";
|
||||
char ibuf[32];
|
||||
DWORD written;
|
||||
DWORD readden;
|
||||
|
||||
msg("test_CreateNamedPipe starting\n");
|
||||
/* Bad parameter checks */
|
||||
hnp = CreateNamedPipe("not a named pipe", PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE | PIPE_WAIT,
|
||||
/* nMaxInstances */ 1,
|
||||
/* nOutBufSize */ 1024,
|
||||
/* nInBufSize */ 1024,
|
||||
/* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT,
|
||||
/* lpSecurityAttrib */ NULL);
|
||||
|
||||
if (hnp == INVALID_HANDLE_VALUE && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) {
|
||||
/* Is this the right way to notify user of skipped tests? */
|
||||
ok(hnp == INVALID_HANDLE_VALUE && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED,
|
||||
"CreateNamedPipe not supported on this platform, skipping tests.");
|
||||
return;
|
||||
}
|
||||
ok(hnp == INVALID_HANDLE_VALUE && GetLastError() == ERROR_INVALID_NAME,
|
||||
"CreateNamedPipe should fail if name doesn't start with \\\\.\\pipe");
|
||||
|
||||
hnp = CreateNamedPipe(NULL,
|
||||
PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE | PIPE_WAIT,
|
||||
1, 1024, 1024, NMPWAIT_USE_DEFAULT_WAIT, NULL);
|
||||
ok(hnp == INVALID_HANDLE_VALUE && GetLastError() == ERROR_PATH_NOT_FOUND,
|
||||
"CreateNamedPipe should fail if name is NULL");
|
||||
|
||||
hFile = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0);
|
||||
ok(hFile == INVALID_HANDLE_VALUE
|
||||
&& GetLastError() == ERROR_FILE_NOT_FOUND,
|
||||
"connecting to nonexistent named pipe should fail with ERROR_FILE_NOT_FOUND");
|
||||
|
||||
/* Functional checks */
|
||||
|
||||
hnp = CreateNamedPipe(PIPENAME, PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE | PIPE_WAIT,
|
||||
/* nMaxInstances */ 1,
|
||||
/* nOutBufSize */ 1024,
|
||||
/* nInBufSize */ 1024,
|
||||
/* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT,
|
||||
/* lpSecurityAttrib */ NULL);
|
||||
ok(hnp != INVALID_HANDLE_VALUE, "CreateNamedPipe failed");
|
||||
|
||||
hFile = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0);
|
||||
todo_wine {
|
||||
ok(hFile != INVALID_HANDLE_VALUE, "CreateFile failed");
|
||||
}
|
||||
|
||||
/* don't try to do i/o if one side couldn't be opened, as it hangs */
|
||||
if (hFile != INVALID_HANDLE_VALUE) {
|
||||
HANDLE hFile2;
|
||||
|
||||
/* Make sure we can read and write a few bytes in both directions */
|
||||
memset(ibuf, 0, sizeof(ibuf));
|
||||
ok(WriteFile(hnp, obuf, sizeof(obuf), &written, NULL), "WriteFile");
|
||||
ok(written == sizeof(obuf), "write file len");
|
||||
ok(ReadFile(hFile, ibuf, sizeof(obuf), &readden, NULL), "ReadFile");
|
||||
ok(readden == sizeof(obuf), "read file len");
|
||||
ok(memcmp(obuf, ibuf, written) == 0, "content check");
|
||||
|
||||
memset(ibuf, 0, sizeof(ibuf));
|
||||
ok(WriteFile(hFile, obuf, sizeof(obuf), &written, NULL), "WriteFile");
|
||||
ok(written == sizeof(obuf), "write file len");
|
||||
ok(ReadFile(hnp, ibuf, sizeof(obuf), &readden, NULL), "ReadFile");
|
||||
ok(readden == sizeof(obuf), "read file len");
|
||||
ok(memcmp(obuf, ibuf, written) == 0, "content check");
|
||||
|
||||
/* Picky conformance tests */
|
||||
|
||||
/* Verify that you can't connect to pipe again
|
||||
* until server calls DisconnectNamedPipe+ConnectNamedPipe
|
||||
* or creates a new pipe
|
||||
* case 1: other client not yet closed
|
||||
*/
|
||||
hFile2 = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0);
|
||||
ok(hFile2 == INVALID_HANDLE_VALUE,
|
||||
"connecting to named pipe after other client closes but before DisconnectNamedPipe should fail");
|
||||
ok(GetLastError() == ERROR_PIPE_BUSY,
|
||||
"connecting to named pipe before other client closes should fail with ERROR_PIPE_BUSY");
|
||||
|
||||
ok(CloseHandle(hFile), "CloseHandle");
|
||||
|
||||
/* case 2: other client already closed */
|
||||
hFile = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0);
|
||||
ok(hFile == INVALID_HANDLE_VALUE,
|
||||
"connecting to named pipe after other client closes but before DisconnectNamedPipe should fail");
|
||||
ok(GetLastError() == ERROR_PIPE_BUSY,
|
||||
"connecting to named pipe after other client closes but before DisconnectNamedPipe should fail with ERROR_PIPE_BUSY");
|
||||
|
||||
ok(DisconnectNamedPipe(hnp), "DisconnectNamedPipe");
|
||||
|
||||
/* case 3: server has called DisconnectNamedPipe but not ConnectNamed Pipe */
|
||||
hFile = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0);
|
||||
ok(hFile == INVALID_HANDLE_VALUE,
|
||||
"connecting to named pipe after other client closes but before DisconnectNamedPipe should fail");
|
||||
ok(GetLastError() == ERROR_PIPE_BUSY,
|
||||
"connecting to named pipe after other client closes but before ConnectNamedPipe should fail with ERROR_PIPE_BUSY");
|
||||
|
||||
/* to be complete, we'd call ConnectNamedPipe here and loop,
|
||||
* but by default that's blocking, so we'd either have
|
||||
* to turn on the uncommon nonblocking mode, or
|
||||
* use another thread.
|
||||
*/
|
||||
}
|
||||
|
||||
ok(CloseHandle(hnp), "CloseHandle");
|
||||
|
||||
msg("test_CreateNamedPipe returning\n");
|
||||
}
|
||||
|
||||
void test_CreateNamedPipe_instances_must_match(void)
|
||||
{
|
||||
HANDLE hnp, hnp2;
|
||||
|
||||
/* Check no mismatch */
|
||||
hnp = CreateNamedPipe(PIPENAME, PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE | PIPE_WAIT,
|
||||
/* nMaxInstances */ 2,
|
||||
/* nOutBufSize */ 1024,
|
||||
/* nInBufSize */ 1024,
|
||||
/* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT,
|
||||
/* lpSecurityAttrib */ NULL);
|
||||
ok(hnp != INVALID_HANDLE_VALUE, "CreateNamedPipe failed");
|
||||
|
||||
hnp2 = CreateNamedPipe(PIPENAME, PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE | PIPE_WAIT,
|
||||
/* nMaxInstances */ 2,
|
||||
/* nOutBufSize */ 1024,
|
||||
/* nInBufSize */ 1024,
|
||||
/* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT,
|
||||
/* lpSecurityAttrib */ NULL);
|
||||
ok(hnp2 != INVALID_HANDLE_VALUE, "CreateNamedPipe failed");
|
||||
|
||||
ok(CloseHandle(hnp), "CloseHandle");
|
||||
ok(CloseHandle(hnp2), "CloseHandle");
|
||||
|
||||
/* Check nMaxInstances */
|
||||
hnp = CreateNamedPipe(PIPENAME, PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE | PIPE_WAIT,
|
||||
/* nMaxInstances */ 1,
|
||||
/* nOutBufSize */ 1024,
|
||||
/* nInBufSize */ 1024,
|
||||
/* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT,
|
||||
/* lpSecurityAttrib */ NULL);
|
||||
ok(hnp != INVALID_HANDLE_VALUE, "CreateNamedPipe failed");
|
||||
|
||||
todo_wine {
|
||||
hnp2 = CreateNamedPipe(PIPENAME, PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE | PIPE_WAIT,
|
||||
/* nMaxInstances */ 1,
|
||||
/* nOutBufSize */ 1024,
|
||||
/* nInBufSize */ 1024,
|
||||
/* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT,
|
||||
/* lpSecurityAttrib */ NULL);
|
||||
ok(hnp2 == INVALID_HANDLE_VALUE
|
||||
&& GetLastError() == ERROR_PIPE_BUSY, "nMaxInstances not obeyed");
|
||||
}
|
||||
|
||||
ok(CloseHandle(hnp), "CloseHandle");
|
||||
|
||||
/* Check PIPE_ACCESS_* */
|
||||
hnp = CreateNamedPipe(PIPENAME, PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE | PIPE_WAIT,
|
||||
/* nMaxInstances */ 2,
|
||||
/* nOutBufSize */ 1024,
|
||||
/* nInBufSize */ 1024,
|
||||
/* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT,
|
||||
/* lpSecurityAttrib */ NULL);
|
||||
ok(hnp != INVALID_HANDLE_VALUE, "CreateNamedPipe failed");
|
||||
|
||||
todo_wine {
|
||||
hnp2 = CreateNamedPipe(PIPENAME, PIPE_ACCESS_INBOUND, PIPE_TYPE_BYTE | PIPE_WAIT,
|
||||
/* nMaxInstances */ 1,
|
||||
/* nOutBufSize */ 1024,
|
||||
/* nInBufSize */ 1024,
|
||||
/* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT,
|
||||
/* lpSecurityAttrib */ NULL);
|
||||
ok(hnp2 == INVALID_HANDLE_VALUE
|
||||
&& GetLastError() == ERROR_ACCESS_DENIED, "PIPE_ACCESS_* mismatch allowed");
|
||||
}
|
||||
|
||||
ok(CloseHandle(hnp), "CloseHandle");
|
||||
|
||||
/* etc, etc */
|
||||
}
|
||||
|
||||
/** implementation of alarm() */
|
||||
static DWORD CALLBACK alarmThreadMain(LPVOID arg)
|
||||
{
|
||||
DWORD timeout = (DWORD) arg;
|
||||
msg("alarmThreadMain\n");
|
||||
Sleep(timeout);
|
||||
ok(FALSE, "alarm");
|
||||
ExitProcess(1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
HANDLE hnp = INVALID_HANDLE_VALUE;
|
||||
|
||||
/** Trivial byte echo server - disconnects after each session */
|
||||
static DWORD CALLBACK serverThreadMain1(LPVOID arg)
|
||||
{
|
||||
int i;
|
||||
|
||||
msg("serverThreadMain1 start\n");
|
||||
/* Set up a simple echo server */
|
||||
hnp = CreateNamedPipe(PIPENAME "serverThreadMain1", PIPE_ACCESS_DUPLEX,
|
||||
PIPE_TYPE_BYTE | PIPE_WAIT,
|
||||
/* nMaxInstances */ 1,
|
||||
/* nOutBufSize */ 1024,
|
||||
/* nInBufSize */ 1024,
|
||||
/* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT,
|
||||
/* lpSecurityAttrib */ NULL);
|
||||
|
||||
ok(hnp != INVALID_HANDLE_VALUE, "CreateNamedPipe failed");
|
||||
for (i = 0; ; i++) {
|
||||
char buf[512];
|
||||
DWORD written;
|
||||
DWORD readden;
|
||||
DWORD success;
|
||||
|
||||
/* Wait for client to connect */
|
||||
msg("Server calling ConnectNamedPipe...\n");
|
||||
ok(ConnectNamedPipe(hnp, NULL)
|
||||
|| GetLastError() == ERROR_PIPE_CONNECTED, "ConnectNamedPipe");
|
||||
msg("ConnectNamedPipe returned.\n");
|
||||
|
||||
/* Echo bytes once */
|
||||
memset(buf, 0, sizeof(buf));
|
||||
|
||||
msg("Server reading...\n");
|
||||
success = ReadFile(hnp, buf, sizeof(buf), &readden, NULL);
|
||||
msg("Server done reading.\n");
|
||||
ok(success, "ReadFile");
|
||||
|
||||
msg("Server writing...\n");
|
||||
ok(WriteFile(hnp, buf, readden, &written, NULL), "WriteFile");
|
||||
msg("Server done writing.\n");
|
||||
ok(written == readden, "write file len");
|
||||
|
||||
/* finish this connection, wait for next one */
|
||||
ok(FlushFileBuffers(hnp), "FlushFileBuffers");
|
||||
ok(DisconnectNamedPipe(hnp), "DisconnectNamedPipe");
|
||||
}
|
||||
}
|
||||
|
||||
/** Trivial byte echo server - closes after each connection */
|
||||
static DWORD CALLBACK serverThreadMain2(LPVOID arg)
|
||||
{
|
||||
int i;
|
||||
HANDLE hnpNext = 0;
|
||||
|
||||
msg("serverThreadMain2\n");
|
||||
/* Set up a simple echo server */
|
||||
hnp = CreateNamedPipe(PIPENAME "serverThreadMain2", PIPE_ACCESS_DUPLEX,
|
||||
PIPE_TYPE_BYTE | PIPE_WAIT,
|
||||
/* nMaxInstances */ 2,
|
||||
/* nOutBufSize */ 1024,
|
||||
/* nInBufSize */ 1024,
|
||||
/* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT,
|
||||
/* lpSecurityAttrib */ NULL);
|
||||
ok(hnp != INVALID_HANDLE_VALUE, "CreateNamedPipe failed");
|
||||
|
||||
for (i = 0; ; i++) {
|
||||
char buf[512];
|
||||
DWORD written;
|
||||
DWORD readden;
|
||||
DWORD success;
|
||||
|
||||
/* Wait for client to connect */
|
||||
msg("Server calling ConnectNamedPipe...\n");
|
||||
ok(ConnectNamedPipe(hnp, NULL)
|
||||
|| GetLastError() == ERROR_PIPE_CONNECTED, "ConnectNamedPipe");
|
||||
msg("ConnectNamedPipe returned.\n");
|
||||
|
||||
/* Echo bytes once */
|
||||
memset(buf, 0, sizeof(buf));
|
||||
|
||||
msg("Server reading...\n");
|
||||
success = ReadFile(hnp, buf, sizeof(buf), &readden, NULL);
|
||||
msg("Server done reading.\n");
|
||||
ok(success, "ReadFile");
|
||||
|
||||
msg("Server writing...\n");
|
||||
ok(WriteFile(hnp, buf, readden, &written, NULL), "WriteFile");
|
||||
msg("Server done writing.\n");
|
||||
ok(written == readden, "write file len");
|
||||
|
||||
/* finish this connection, wait for next one */
|
||||
ok(FlushFileBuffers(hnp), "FlushFileBuffers");
|
||||
ok(DisconnectNamedPipe(hnp), "DisconnectNamedPipe");
|
||||
|
||||
/* Set up next echo server */
|
||||
hnpNext =
|
||||
CreateNamedPipe(PIPENAME "serverThreadMain2", PIPE_ACCESS_DUPLEX,
|
||||
PIPE_TYPE_BYTE | PIPE_WAIT,
|
||||
/* nMaxInstances */ 2,
|
||||
/* nOutBufSize */ 1024,
|
||||
/* nInBufSize */ 1024,
|
||||
/* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT,
|
||||
/* lpSecurityAttrib */ NULL);
|
||||
|
||||
ok(hnpNext != INVALID_HANDLE_VALUE, "CreateNamedPipe failed");
|
||||
|
||||
ok(CloseHandle(hnp), "CloseHandle");
|
||||
hnp = hnpNext;
|
||||
}
|
||||
}
|
||||
|
||||
/** Trivial byte echo server - uses overlapped named pipe calls */
|
||||
static DWORD CALLBACK serverThreadMain3(LPVOID arg)
|
||||
{
|
||||
int i;
|
||||
HANDLE hEvent;
|
||||
|
||||
msg("serverThreadMain3\n");
|
||||
/* Set up a simple echo server */
|
||||
hnp = CreateNamedPipe(PIPENAME "serverThreadMain3", PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED,
|
||||
PIPE_TYPE_BYTE | PIPE_WAIT,
|
||||
/* nMaxInstances */ 1,
|
||||
/* nOutBufSize */ 1024,
|
||||
/* nInBufSize */ 1024,
|
||||
/* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT,
|
||||
/* lpSecurityAttrib */ NULL);
|
||||
ok(hnp != INVALID_HANDLE_VALUE, "CreateNamedPipe failed");
|
||||
|
||||
hEvent = CreateEvent(NULL, // security attribute
|
||||
TRUE, // manual reset event
|
||||
FALSE, // initial state
|
||||
NULL); // name
|
||||
ok(hEvent != NULL, "CreateEvent");
|
||||
|
||||
for (i = 0; ; i++) {
|
||||
char buf[512];
|
||||
DWORD written;
|
||||
DWORD readden;
|
||||
DWORD dummy;
|
||||
DWORD success;
|
||||
OVERLAPPED oOverlap;
|
||||
int letWFSOEwait = (i & 2);
|
||||
int letGORwait = (i & 1);
|
||||
DWORD err;
|
||||
|
||||
memset(&oOverlap, 0, sizeof(oOverlap));
|
||||
oOverlap.hEvent = hEvent;
|
||||
|
||||
/* Wait for client to connect */
|
||||
msg("Server calling overlapped ConnectNamedPipe...\n");
|
||||
success = ConnectNamedPipe(hnp, &oOverlap);
|
||||
err = GetLastError();
|
||||
ok(success || err == ERROR_IO_PENDING
|
||||
|| err == ERROR_PIPE_CONNECTED, "overlapped ConnectNamedPipe");
|
||||
msg("overlapped ConnectNamedPipe returned.\n");
|
||||
if (!success && (err == ERROR_IO_PENDING) && letWFSOEwait)
|
||||
ok(WaitForSingleObjectEx(hEvent, INFINITE, TRUE) == 0, "wait ConnectNamedPipe");
|
||||
success = GetOverlappedResult(hnp, &oOverlap, &dummy, letGORwait);
|
||||
if (!letGORwait && !letWFSOEwait && !success) {
|
||||
ok(GetLastError() == ERROR_IO_INCOMPLETE, "GetOverlappedResult");
|
||||
success = GetOverlappedResult(hnp, &oOverlap, &dummy, TRUE);
|
||||
}
|
||||
ok(success, "GetOverlappedResult ConnectNamedPipe");
|
||||
msg("overlapped ConnectNamedPipe operation complete.\n");
|
||||
|
||||
/* Echo bytes once */
|
||||
memset(buf, 0, sizeof(buf));
|
||||
|
||||
msg("Server reading...\n");
|
||||
success = ReadFile(hnp, buf, sizeof(buf), NULL, &oOverlap);
|
||||
msg("Server ReadFile returned...\n");
|
||||
err = GetLastError();
|
||||
ok(success || err == ERROR_IO_PENDING, "overlapped ReadFile");
|
||||
msg("overlapped ReadFile returned.\n");
|
||||
if (!success && (err == ERROR_IO_PENDING) && letWFSOEwait)
|
||||
ok(WaitForSingleObjectEx(hEvent, INFINITE, TRUE) == 0, "wait ReadFile");
|
||||
success = GetOverlappedResult(hnp, &oOverlap, &readden, letGORwait);
|
||||
if (!letGORwait && !letWFSOEwait && !success) {
|
||||
ok(GetLastError() == ERROR_IO_INCOMPLETE, "GetOverlappedResult");
|
||||
success = GetOverlappedResult(hnp, &oOverlap, &readden, TRUE);
|
||||
}
|
||||
msg("Server done reading.\n");
|
||||
ok(success, "overlapped ReadFile");
|
||||
|
||||
msg("Server writing...\n");
|
||||
success = WriteFile(hnp, buf, readden, NULL, &oOverlap);
|
||||
msg("Server WriteFile returned...\n");
|
||||
err = GetLastError();
|
||||
ok(success || err == ERROR_IO_PENDING, "overlapped WriteFile");
|
||||
msg("overlapped WriteFile returned.\n");
|
||||
if (!success && (err == ERROR_IO_PENDING) && letWFSOEwait)
|
||||
ok(WaitForSingleObjectEx(hEvent, INFINITE, TRUE) == 0, "wait WriteFile");
|
||||
success = GetOverlappedResult(hnp, &oOverlap, &written, letGORwait);
|
||||
if (!letGORwait && !letWFSOEwait && !success) {
|
||||
ok(GetLastError() == ERROR_IO_INCOMPLETE, "GetOverlappedResult");
|
||||
success = GetOverlappedResult(hnp, &oOverlap, &written, TRUE);
|
||||
}
|
||||
msg("Server done writing.\n");
|
||||
ok(success, "overlapped WriteFile");
|
||||
ok(written == readden, "write file len");
|
||||
|
||||
/* finish this connection, wait for next one */
|
||||
ok(FlushFileBuffers(hnp), "FlushFileBuffers");
|
||||
ok(DisconnectNamedPipe(hnp), "DisconnectNamedPipe");
|
||||
}
|
||||
}
|
||||
|
||||
static void exercizeServer(const char *pipename, HANDLE serverThread)
|
||||
{
|
||||
int i;
|
||||
|
||||
msg("exercizeServer starting\n");
|
||||
for (i = 0; i < 8; i++) {
|
||||
HANDLE hFile;
|
||||
const char obuf[] = "Bit Bucket";
|
||||
char ibuf[32];
|
||||
DWORD written;
|
||||
DWORD readden;
|
||||
int loop;
|
||||
|
||||
for (loop = 0; loop < 3; loop++) {
|
||||
DWORD err;
|
||||
msg("Client connecting...\n");
|
||||
/* Connect to the server */
|
||||
hFile = CreateFileA(pipename, GENERIC_READ | GENERIC_WRITE, 0,
|
||||
NULL, OPEN_EXISTING, 0, 0);
|
||||
if (hFile != INVALID_HANDLE_VALUE)
|
||||
break;
|
||||
err = GetLastError();
|
||||
if (loop == 0)
|
||||
ok(err == ERROR_PIPE_BUSY || err == ERROR_FILE_NOT_FOUND, "connecting to pipe");
|
||||
else
|
||||
ok(err == ERROR_PIPE_BUSY, "connecting to pipe");
|
||||
msg("connect failed, retrying\n");
|
||||
Sleep(200);
|
||||
}
|
||||
ok(hFile != INVALID_HANDLE_VALUE, "client opening named pipe");
|
||||
|
||||
/* Make sure it can echo */
|
||||
memset(ibuf, 0, sizeof(ibuf));
|
||||
msg("Client writing...\n");
|
||||
ok(WriteFile(hFile, obuf, sizeof(obuf), &written, NULL), "WriteFile to client end of pipe");
|
||||
ok(written == sizeof(obuf), "write file len");
|
||||
msg("Client reading...\n");
|
||||
ok(ReadFile(hFile, ibuf, sizeof(obuf), &readden, NULL), "ReadFile from client end of pipe");
|
||||
ok(readden == sizeof(obuf), "read file len");
|
||||
ok(memcmp(obuf, ibuf, written) == 0, "content check");
|
||||
|
||||
msg("Client closing...\n");
|
||||
ok(CloseHandle(hFile), "CloseHandle");
|
||||
}
|
||||
|
||||
ok(TerminateThread(serverThread, 0), "TerminateThread");
|
||||
CloseHandle(hnp);
|
||||
msg("exercizeServer returning\n");
|
||||
}
|
||||
|
||||
void test_NamedPipe_2(void)
|
||||
{
|
||||
HANDLE serverThread;
|
||||
DWORD serverThreadId;
|
||||
HANDLE alarmThread;
|
||||
DWORD alarmThreadId;
|
||||
|
||||
msg("test_NamedPipe_2 starting\n");
|
||||
/* Set up a ten second timeout */
|
||||
alarmThread = CreateThread(NULL, 0, alarmThreadMain, (void *) 10000, 0, &alarmThreadId);
|
||||
|
||||
/* The servers we're about to exercize do try to clean up carefully,
|
||||
* but to reduce the change of a test failure due to a pipe handle
|
||||
* leak in the test code, we'll use a different pipe name for each server.
|
||||
*/
|
||||
|
||||
/* Try server #1 */
|
||||
serverThread = CreateThread(NULL, 0, serverThreadMain1, 0, 0, &serverThreadId);
|
||||
ok(serverThread != INVALID_HANDLE_VALUE, "CreateThread");
|
||||
exercizeServer(PIPENAME "serverThreadMain1", serverThread);
|
||||
|
||||
/* Try server #2 */
|
||||
serverThread = CreateThread(NULL, 0, serverThreadMain2, 0, 0, &serverThreadId);
|
||||
ok(serverThread != INVALID_HANDLE_VALUE, "CreateThread");
|
||||
exercizeServer(PIPENAME "serverThreadMain2", serverThread);
|
||||
|
||||
/* Try server #3 */
|
||||
serverThread = CreateThread(NULL, 0, serverThreadMain3, 0, 0, &serverThreadId);
|
||||
ok(serverThread != INVALID_HANDLE_VALUE, "CreateThread");
|
||||
exercizeServer(PIPENAME "serverThreadMain3", serverThread);
|
||||
|
||||
ok(TerminateThread(alarmThread, 0), "TerminateThread");
|
||||
msg("test_NamedPipe_2 returning\n");
|
||||
}
|
||||
|
||||
void test_DisconnectNamedPipe(void)
|
||||
{
|
||||
HANDLE hnp;
|
||||
HANDLE hFile;
|
||||
const char obuf[] = "Bit Bucket";
|
||||
char ibuf[32];
|
||||
DWORD written;
|
||||
DWORD readden;
|
||||
|
||||
hnp = CreateNamedPipe(PIPENAME, PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE | PIPE_WAIT,
|
||||
/* nMaxInstances */ 1,
|
||||
/* nOutBufSize */ 1024,
|
||||
/* nInBufSize */ 1024,
|
||||
/* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT,
|
||||
/* lpSecurityAttrib */ NULL);
|
||||
ok(hnp != INVALID_HANDLE_VALUE, "CreateNamedPipe failed");
|
||||
|
||||
ok(WriteFile(hnp, obuf, sizeof(obuf), &written, NULL) == 0
|
||||
&& GetLastError() == ERROR_PIPE_LISTENING, "WriteFile to not-yet-connected pipe");
|
||||
ok(ReadFile(hnp, ibuf, sizeof(ibuf), &readden, NULL) == 0
|
||||
&& GetLastError() == ERROR_PIPE_LISTENING, "ReadFile from not-yet-connected pipe");
|
||||
|
||||
hFile = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0);
|
||||
todo_wine {
|
||||
ok(hFile != INVALID_HANDLE_VALUE, "CreateFile failed");
|
||||
}
|
||||
|
||||
/* don't try to do i/o if one side couldn't be opened, as it hangs */
|
||||
if (hFile != INVALID_HANDLE_VALUE) {
|
||||
|
||||
/* see what happens if server calls DisconnectNamedPipe
|
||||
* when there are bytes in the pipe
|
||||
*/
|
||||
|
||||
ok(WriteFile(hFile, obuf, sizeof(obuf), &written, NULL), "WriteFile");
|
||||
ok(written == sizeof(obuf), "write file len");
|
||||
ok(DisconnectNamedPipe(hnp), "DisconnectNamedPipe while messages waiting");
|
||||
ok(WriteFile(hFile, obuf, sizeof(obuf), &written, NULL) == 0
|
||||
&& GetLastError() == ERROR_PIPE_NOT_CONNECTED, "WriteFile to disconnected pipe");
|
||||
ok(ReadFile(hnp, ibuf, sizeof(ibuf), &readden, NULL) == 0
|
||||
&& GetLastError() == ERROR_PIPE_NOT_CONNECTED,
|
||||
"ReadFile from disconnected pipe with bytes waiting");
|
||||
ok(CloseHandle(hFile), "CloseHandle");
|
||||
}
|
||||
|
||||
ok(CloseHandle(hnp), "CloseHandle");
|
||||
|
||||
}
|
||||
|
||||
START_TEST(pipe)
|
||||
{
|
||||
msg("test 1 of 4:\n");
|
||||
test_DisconnectNamedPipe();
|
||||
msg("test 2 of 4:\n");
|
||||
test_CreateNamedPipe_instances_must_match();
|
||||
msg("test 3 of 4:\n");
|
||||
test_NamedPipe_2();
|
||||
msg("test 4 of 4:\n");
|
||||
test_CreateNamedPipe();
|
||||
msg("all tests done\n");
|
||||
}
|
@@ -1,69 +0,0 @@
|
||||
# Makefile - Proj_Listing5_1.dsp
|
||||
|
||||
ifndef CFG
|
||||
CFG=Proj_Listing5_1 - Win32 Debug
|
||||
endif
|
||||
CC=gcc
|
||||
CFLAGS=
|
||||
CXX=g++
|
||||
CXXFLAGS=$(CFLAGS)
|
||||
RC=windres -O COFF
|
||||
ifeq "$(CFG)" "Proj_Listing5_1 - Win32 Release"
|
||||
CFLAGS+=-fexceptions -O2 -DWIN32 -DNDEBUG -D_WINDOWS -D_MBCS -W
|
||||
LD=$(CXX) $(CXXFLAGS)
|
||||
LDFLAGS=
|
||||
LDFLAGS+=-Wl,--subsystem,windows
|
||||
LIBS+=-lkernel32 -luser32 -lgdi32
|
||||
else
|
||||
ifeq "$(CFG)" "Proj_Listing5_1 - Win32 Debug"
|
||||
CFLAGS+=-fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W
|
||||
LD=$(CXX) $(CXXFLAGS)
|
||||
LDFLAGS=
|
||||
LDFLAGS+=-Wl,--subsystem,windows
|
||||
LIBS+=-lkernel32 -luser32 -lgdi32
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef TARGET
|
||||
TARGET=primitives.exe
|
||||
endif
|
||||
|
||||
.PHONY: all
|
||||
all: $(TARGET)
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
|
||||
|
||||
%.o: %.cc
|
||||
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $@ -c $<
|
||||
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $@ -c $<
|
||||
|
||||
%.o: %.cxx
|
||||
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $@ -c $<
|
||||
|
||||
%.res: %.rc
|
||||
$(RC) $(CPPFLAGS) -o $@ -i $<
|
||||
|
||||
SOURCE_FILES= \
|
||||
mk_font.cpp \
|
||||
primitives.cpp
|
||||
|
||||
HEADER_FILES=
|
||||
|
||||
RESOURCE_FILES=
|
||||
|
||||
SRCS=$(SOURCE_FILES) $(HEADER_FILES) $(RESOURCE_FILES)
|
||||
|
||||
OBJS=$(patsubst %.rc,%.res,$(patsubst %.cxx,%.o,$(patsubst %.cpp,%.o,$(patsubst %.cc,%.o,$(patsubst %.c,%.o,$(filter %.c %.cc %.cpp %.cxx %.rc,$(SRCS)))))))
|
||||
|
||||
$(TARGET): $(OBJS)
|
||||
$(LD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
-del $(OBJS) $(TARGET)
|
||||
|
||||
|
||||
|
@@ -1,69 +0,0 @@
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// Windows 2000 Graphics API Black Book
|
||||
// Chapter 4 - Utility functions
|
||||
//
|
||||
// Created by Damon Chandler <dmc27@ee.cornell.edu>
|
||||
// Updates can be downloaded at: <www.coriolis.com>
|
||||
//
|
||||
// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu
|
||||
// if you have any questions about this code.
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
#include <windows.h>
|
||||
#include <cassert>
|
||||
|
||||
#include "mk_font.h"
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
namespace font {
|
||||
|
||||
// creates a logical font
|
||||
HFONT MakeFont(
|
||||
IN HDC hDestDC, // handle to target DC
|
||||
IN LPCSTR typeface_name, // font's typeface name
|
||||
IN int point_size, // font's point size
|
||||
IN const BYTE charset, // font's character set
|
||||
IN const DWORD style // font's styles
|
||||
)
|
||||
{
|
||||
//
|
||||
// NOTE: On Windows 9x/Me, GetWorldTransform is not
|
||||
// supported. For compatibility with these platforms you
|
||||
// should initialize the XFORM::eM22 data member to 1.0.
|
||||
//
|
||||
XFORM xf = {0, 0, 0, 1.0};
|
||||
GetWorldTransform(hDestDC, &xf);
|
||||
int pixels_per_inch = GetDeviceCaps(hDestDC, LOGPIXELSY);
|
||||
|
||||
POINT PSize = {
|
||||
0,
|
||||
-MulDiv(static_cast<int>(xf.eM22 * point_size + 0.5),
|
||||
pixels_per_inch, 72)
|
||||
};
|
||||
|
||||
HFONT hResult = NULL;
|
||||
if (DPtoLP(hDestDC, &PSize, 1))
|
||||
{
|
||||
LOGFONT lf;
|
||||
memset(&lf, 0, sizeof(LOGFONT));
|
||||
|
||||
lf.lfHeight = PSize.y;
|
||||
lf.lfCharSet = charset;
|
||||
lstrcpyn(reinterpret_cast<LPTSTR>(&lf.lfFaceName),
|
||||
typeface_name, LF_FACESIZE);
|
||||
|
||||
lf.lfWeight = (style & FS_BOLD) ? FW_BOLD : FW_DONTCARE;
|
||||
lf.lfItalic = (style & FS_ITALIC) ? true : false;
|
||||
lf.lfUnderline = (style & FS_UNDERLINE) ? true : false;
|
||||
lf.lfStrikeOut = (style & FS_STRIKEOUT) ? true : false;
|
||||
|
||||
// create the logical font
|
||||
hResult = CreateFontIndirect(&lf);
|
||||
}
|
||||
return hResult;
|
||||
}
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
} // namespace font
|
@@ -1,39 +0,0 @@
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// Windows 2000 Graphics API Black Book
|
||||
// Chapter 4 - Utility functions
|
||||
//
|
||||
// Created by Damon Chandler <dmc27@ee.cornell.edu>
|
||||
// Updates can be downloaded at: <www.coriolis.com>
|
||||
//
|
||||
// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu
|
||||
// if you have any questions about this code.
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
#ifndef CH4_UTILS_H
|
||||
#define CH4_UTILS_H
|
||||
|
||||
#include <windows.h>
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
// change namespace name appropriately to suit your needs
|
||||
namespace font {
|
||||
|
||||
// font options
|
||||
static const ULONG FS_NONE = 0x00000000;
|
||||
static const ULONG FS_BOLD = 0x00000001;
|
||||
static const ULONG FS_ITALIC = 0x00000002;
|
||||
static const ULONG FS_UNDERLINE = 0x00000004;
|
||||
static const ULONG FS_STRIKEOUT = 0x00000008;
|
||||
|
||||
// creates a logical font
|
||||
HFONT MakeFont(IN HDC hDestDC, IN LPCSTR typeface_name,
|
||||
IN int point_size, IN const BYTE charset = ANSI_CHARSET,
|
||||
IN const DWORD style = FS_NONE);
|
||||
|
||||
}
|
||||
|
||||
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
#endif // CH4_UTILS_H
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
@@ -1,351 +0,0 @@
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// Windows 2000 Graphics API Black Book
|
||||
// Chapter 5 - Listing 5.1 (Output Primitives Demo)
|
||||
//
|
||||
// Created by Damon Chandler <dmc27@ee.cornell.edu>
|
||||
// Updates can be downloaded at: <www.coriolis.com>
|
||||
//
|
||||
// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu
|
||||
// if you have any questions about this code.
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
|
||||
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
#include <windows.h>
|
||||
#include <cassert>
|
||||
|
||||
// for the MakeFont() function...
|
||||
#include "mk_font.h"
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
|
||||
HINSTANCE hInst;
|
||||
const char* WndClassName = "GMainWnd";
|
||||
LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
|
||||
LPARAM LParam);
|
||||
|
||||
|
||||
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR,
|
||||
int nCmdShow)
|
||||
{
|
||||
hInst = hInstance;
|
||||
|
||||
WNDCLASS wc;
|
||||
memset(&wc, 0, sizeof(WNDCLASS));
|
||||
|
||||
wc.style = CS_VREDRAW | CS_HREDRAW;
|
||||
wc.lpszClassName = WndClassName;
|
||||
wc.lpfnWndProc = MainWndProc;
|
||||
wc.hInstance = hInst;
|
||||
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||
wc.hbrBackground = reinterpret_cast<HBRUSH>(
|
||||
COLOR_BTNFACE + 1
|
||||
);
|
||||
|
||||
if (RegisterClass(&wc))
|
||||
{
|
||||
HWND hWnd =
|
||||
CreateWindow(
|
||||
WndClassName, TEXT("Output Primitives Demo"),
|
||||
WS_OVERLAPPEDWINDOW | WS_CAPTION |
|
||||
WS_VISIBLE | WS_CLIPCHILDREN,
|
||||
CW_USEDEFAULT, CW_USEDEFAULT, 640, 480,
|
||||
NULL, NULL, hInst, NULL
|
||||
);
|
||||
|
||||
if (hWnd)
|
||||
{
|
||||
ShowWindow(hWnd, nCmdShow);
|
||||
UpdateWindow(hWnd);
|
||||
|
||||
MSG msg;
|
||||
while (GetMessage(&msg, NULL, 0, 0))
|
||||
{
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//------------------------------------------------------------------
|
||||
|
||||
|
||||
enum OutPrimitive {
|
||||
opLine, opBezier, opRectangle, opRoundRect,
|
||||
opEllipse, opArc, opPie, opChord, opCustom
|
||||
};
|
||||
|
||||
void DrawPrimitive(IN HDC hDC, IN const RECT& RPrimitive,
|
||||
IN OutPrimitive PrimitiveID)
|
||||
{
|
||||
RECT R = RPrimitive;
|
||||
InflateRect(&R, -10, -10);
|
||||
|
||||
switch (PrimitiveID)
|
||||
{
|
||||
case opLine:
|
||||
{
|
||||
const POINT PLine[] = {{R.left, R.top}, {R.right, R.bottom}};
|
||||
Polyline(hDC, PLine, 2);
|
||||
break;
|
||||
}
|
||||
case opBezier:
|
||||
{
|
||||
const POINT PControlPoints[] = {
|
||||
{R.left, R.top},
|
||||
{(R.right - R.left) / 2, R.top},
|
||||
{(R.right - R.left) / 2, R.bottom},
|
||||
{R.right, R.bottom}
|
||||
};
|
||||
PolyBezier(hDC, PControlPoints, 4);
|
||||
break;
|
||||
}
|
||||
case opRectangle:
|
||||
{
|
||||
Rectangle(hDC, R.left, R.top, R.right, R.bottom);
|
||||
break;
|
||||
}
|
||||
case opRoundRect:
|
||||
{
|
||||
RoundRect(hDC, R.left, R.top, R.right, R.bottom, 20, 20);
|
||||
break;
|
||||
}
|
||||
case opEllipse:
|
||||
{
|
||||
Ellipse(hDC, R.left, R.top, R.right, R.bottom);
|
||||
break;
|
||||
}
|
||||
case opArc:
|
||||
{
|
||||
const POINT PRads[] = {
|
||||
{(R.right - R.left) / 3 + R.left, R.top},
|
||||
{(R.right - R.left) / 3 + R.left, R.bottom}
|
||||
};
|
||||
Arc(hDC, R.left, R.top, R.right, R.bottom,
|
||||
PRads[0].x, PRads[0].y, PRads[1].x, PRads[1].y);
|
||||
break;
|
||||
}
|
||||
case opPie:
|
||||
{
|
||||
const POINT PRads[] = {
|
||||
{(R.right - R.left) / 3 + R.left, R.top},
|
||||
{(R.right - R.left) / 3 + R.left, R.bottom}
|
||||
};
|
||||
Pie(hDC, R.left, R.top, R.right, R.bottom,
|
||||
PRads[0].x, PRads[0].y, PRads[1].x, PRads[1].y);
|
||||
break;
|
||||
}
|
||||
case opChord:
|
||||
{
|
||||
const POINT PRads[] = {
|
||||
{(R.right - R.left) / 3 + R.left, R.top},
|
||||
{(R.right - R.left) / 3 + R.left, R.bottom}
|
||||
};
|
||||
Chord(hDC, R.left, R.top, R.right, R.bottom,
|
||||
PRads[0].x, PRads[0].y, PRads[1].x, PRads[1].y);
|
||||
break;
|
||||
}
|
||||
case opCustom:
|
||||
{
|
||||
const POINT PVertices[] = {
|
||||
{R.left, (R.bottom - R.top) / 2 + R.top},
|
||||
{(R.right - R.left) / 2 + R.left, R.top},
|
||||
{R.right, (R.bottom - R.top) / 2 + R.top},
|
||||
{(R.right - R.left) / 2 + R.left, R.bottom}
|
||||
};
|
||||
Polygon(hDC, PVertices, 4);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------
|
||||
|
||||
|
||||
HWND hListBox = NULL; // handle to the list box
|
||||
HBRUSH hListBrush = NULL; // handle to the list box brush
|
||||
HPEN hListPen = NULL; // handle to the list box pen
|
||||
HFONT hListFont = NULL; // handle to the list box font
|
||||
|
||||
LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
|
||||
LPARAM lParam)
|
||||
{
|
||||
switch (msg)
|
||||
{
|
||||
case WM_CREATE:
|
||||
{
|
||||
hListBox =
|
||||
CreateWindowEx(
|
||||
WS_EX_CLIENTEDGE, TEXT("LISTBOX"), TEXT(""),
|
||||
WS_CHILD | WS_VISIBLE | WS_VSCROLL |
|
||||
LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT |
|
||||
LBS_OWNERDRAWFIXED,
|
||||
0, 0, 640, 480,
|
||||
hWnd, NULL, hInst, NULL
|
||||
);
|
||||
assert(hListBox != NULL);
|
||||
|
||||
SetWindowLong(
|
||||
hListBox, GWL_ID, reinterpret_cast<LONG>(hListBox)
|
||||
);
|
||||
|
||||
SNDMSG(hListBox, LB_ADDSTRING, 0,
|
||||
reinterpret_cast<LPARAM>(TEXT("Line")));
|
||||
SNDMSG(hListBox, LB_ADDSTRING, 0,
|
||||
reinterpret_cast<LPARAM>(TEXT("Bezier Curve")));
|
||||
SNDMSG(hListBox, LB_ADDSTRING, 0,
|
||||
reinterpret_cast<LPARAM>(TEXT("Rectangle")));
|
||||
SNDMSG(hListBox, LB_ADDSTRING, 0,
|
||||
reinterpret_cast<LPARAM>(TEXT("Rounded Rectangle")));
|
||||
SNDMSG(hListBox, LB_ADDSTRING, 0,
|
||||
reinterpret_cast<LPARAM>(TEXT("Ellipse")));
|
||||
SNDMSG(hListBox, LB_ADDSTRING, 0,
|
||||
reinterpret_cast<LPARAM>(TEXT("Arc")));
|
||||
SNDMSG(hListBox, LB_ADDSTRING, 0,
|
||||
reinterpret_cast<LPARAM>(TEXT("Pie Slice")));
|
||||
SNDMSG(hListBox, LB_ADDSTRING, 0,
|
||||
reinterpret_cast<LPARAM>(TEXT("Chord")));
|
||||
SNDMSG(hListBox, LB_ADDSTRING, 0,
|
||||
reinterpret_cast<LPARAM>(TEXT("Custom")));
|
||||
|
||||
hListBrush = CreateSolidBrush(PALETTERGB(64, 192, 64));
|
||||
hListPen = CreatePen(PS_SOLID, 3, PALETTERGB(0, 0, 0));
|
||||
HDC hScreenDC = GetDC(NULL);
|
||||
#if 0
|
||||
try
|
||||
#endif
|
||||
{
|
||||
// MakeFont() from Chapter 4
|
||||
hListFont = font::MakeFont(
|
||||
hScreenDC, "Impact", 20, ANSI_CHARSET,
|
||||
font::FS_BOLD | font::FS_UNDERLINE
|
||||
);
|
||||
}
|
||||
#if 0
|
||||
catch (...)
|
||||
#endif
|
||||
{
|
||||
ReleaseDC(NULL, hScreenDC);
|
||||
}
|
||||
ReleaseDC(NULL, hScreenDC);
|
||||
|
||||
break;
|
||||
}
|
||||
case WM_MEASUREITEM:
|
||||
{
|
||||
LPMEASUREITEMSTRUCT lpmis =
|
||||
reinterpret_cast<LPMEASUREITEMSTRUCT>(lParam);
|
||||
assert(lpmis != NULL);
|
||||
|
||||
if (lpmis->CtlID == reinterpret_cast<UINT>(hListBox))
|
||||
{
|
||||
lpmis->itemHeight = 150;
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case WM_DRAWITEM:
|
||||
{
|
||||
LPDRAWITEMSTRUCT lpdis =
|
||||
reinterpret_cast<LPDRAWITEMSTRUCT>(lParam);
|
||||
assert(lpdis != NULL);
|
||||
|
||||
if (lpdis->CtlID == reinterpret_cast<UINT>(hListBox))
|
||||
{
|
||||
SaveDC(lpdis->hDC);
|
||||
#if 0
|
||||
try
|
||||
#endif
|
||||
{
|
||||
SelectObject(lpdis->hDC, hListBrush);
|
||||
SelectObject(lpdis->hDC, hListPen);
|
||||
SelectObject(lpdis->hDC, hListFont);
|
||||
|
||||
bool selected = (lpdis->itemState & ODS_SELECTED);
|
||||
COLORREF clrText = GetSysColor(
|
||||
selected ? COLOR_HIGHLIGHTTEXT : COLOR_WINDOWTEXT
|
||||
);
|
||||
HBRUSH hListBrush = GetSysColorBrush(
|
||||
selected ? COLOR_HIGHLIGHT : COLOR_WINDOW
|
||||
);
|
||||
|
||||
// fill the background
|
||||
FillRect(lpdis->hDC, &lpdis->rcItem, hListBrush);
|
||||
|
||||
// render the output primitive
|
||||
RECT RPrimitive = lpdis->rcItem;
|
||||
InflateRect(&RPrimitive, -5, -5);
|
||||
RPrimitive.right = static_cast<int>(
|
||||
0.6 * lpdis->rcItem.right + 0.5
|
||||
);
|
||||
FillRect(
|
||||
lpdis->hDC, &RPrimitive,
|
||||
reinterpret_cast<HBRUSH>(COLOR_BTNFACE + 1)
|
||||
);
|
||||
DrawPrimitive(
|
||||
lpdis->hDC, RPrimitive,
|
||||
static_cast<OutPrimitive>(lpdis->itemID)
|
||||
);
|
||||
if (selected) InvertRect(lpdis->hDC, &RPrimitive);
|
||||
DrawEdge(lpdis->hDC, &RPrimitive, EDGE_SUNKEN, BF_RECT);
|
||||
|
||||
// render the text
|
||||
TCHAR text[13];
|
||||
if (SNDMSG(hListBox, LB_GETTEXT, lpdis->itemID,
|
||||
reinterpret_cast<LPARAM>(&text)) != LB_ERR)
|
||||
{
|
||||
RECT RText = RPrimitive;
|
||||
RText.left = RPrimitive.right;
|
||||
RText.right = lpdis->rcItem.right;
|
||||
|
||||
SelectObject(lpdis->hDC, hListFont);
|
||||
SetBkMode(lpdis->hDC, TRANSPARENT);
|
||||
SetTextColor(lpdis->hDC, clrText);
|
||||
|
||||
DrawText(lpdis->hDC, text, -1, &RText,
|
||||
DT_CENTER | DT_VCENTER | DT_SINGLELINE);
|
||||
}
|
||||
|
||||
// indicate keyboard focus
|
||||
if (lpdis->itemState & ODS_FOCUS)
|
||||
{
|
||||
RECT RFocus = lpdis->rcItem;
|
||||
InflateRect(&RFocus, -1, -1);
|
||||
DrawFocusRect(lpdis->hDC, &RFocus);
|
||||
}
|
||||
}
|
||||
#if 0
|
||||
catch (...)
|
||||
#endif
|
||||
{
|
||||
RestoreDC(lpdis->hDC, -1);
|
||||
}
|
||||
RestoreDC(lpdis->hDC, -1);
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case WM_SIZE:
|
||||
{
|
||||
MoveWindow(
|
||||
hListBox, 0, 0, LOWORD(lParam), HIWORD(lParam), TRUE
|
||||
);
|
||||
return 0;
|
||||
}
|
||||
case WM_DESTROY:
|
||||
{
|
||||
if (hListBrush) DeleteObject(hListBrush);
|
||||
if (hListPen) DeleteObject(hListPen);
|
||||
if (hListFont) DeleteObject(hListFont);
|
||||
|
||||
PostQuitMessage(0);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return DefWindowProc(hWnd, msg, wParam, lParam);
|
||||
}
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
@@ -3,4 +3,3 @@
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -3,4 +3,3 @@
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -3,4 +3,3 @@
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -3,4 +3,3 @@
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -1,6 +0,0 @@
|
||||
*.o
|
||||
*.d
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
@@ -1,21 +0,0 @@
|
||||
# $Id: makefile,v 1.1 2003/03/19 16:03:02 mtempel Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_NORC = yes
|
||||
|
||||
TARGET_TYPE = program
|
||||
|
||||
TARGET_APPTYPE = console
|
||||
|
||||
TARGET_NAME = shaptest
|
||||
|
||||
TARGET_SDKLIBS = kernel32.a gdi32.a
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
||||
# EOF
|
@@ -1,192 +0,0 @@
|
||||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* AUTHOR: See gditest-- (initial changes by Mark Tempel)
|
||||
* shaptest
|
||||
*
|
||||
* This is a windowed application that should draw two polygons. One
|
||||
* is drawn with ALTERNATE fill, the other is drawn with WINDING fill.
|
||||
* This is used to test out the Polygon() implementation.
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
HFONT tf;
|
||||
LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM);
|
||||
|
||||
void __stdcall PolygonTest(HDC Desktop)
|
||||
{
|
||||
HPEN BluePen;
|
||||
HPEN OldPen;
|
||||
HBRUSH RedBrush;
|
||||
HBRUSH OldBrush;
|
||||
POINT lpPointsAlternate[5];
|
||||
POINT lpPointsWinding[5];
|
||||
DWORD Mode;
|
||||
|
||||
//create a pen to draw the shape
|
||||
BluePen = CreatePen(PS_SOLID, 3, RGB(0, 0, 0xff));
|
||||
RedBrush = CreateSolidBrush(RGB(0xff, 0, 0));
|
||||
|
||||
//initialize a set of points for alternate.
|
||||
lpPointsAlternate[0].x = 20;
|
||||
lpPointsAlternate[0].y = 80; //{20,80};
|
||||
lpPointsAlternate[1].x = 60;
|
||||
lpPointsAlternate[1].y = 20; //{60,20};
|
||||
lpPointsAlternate[2].x = 90;
|
||||
lpPointsAlternate[2].y = 80; //{90,80};
|
||||
lpPointsAlternate[3].x = 20;
|
||||
lpPointsAlternate[3].y = 40; //{20,40};
|
||||
lpPointsAlternate[4].x = 100;
|
||||
lpPointsAlternate[4].y = 40; //{100,40};
|
||||
|
||||
//initialize a set of points for winding.
|
||||
lpPointsWinding[0].x = 130;
|
||||
lpPointsWinding[0].y = 80; //{130,80};
|
||||
lpPointsWinding[1].x = 170;
|
||||
lpPointsWinding[1].y = 20; //{170,20};
|
||||
lpPointsWinding[2].x = 200;
|
||||
lpPointsWinding[2].y = 80; //{200,80};
|
||||
lpPointsWinding[3].x = 130;
|
||||
lpPointsWinding[3].y = 40; //{130,40};
|
||||
lpPointsWinding[4].x = 210;
|
||||
lpPointsWinding[4].y = 40; //{210,40};
|
||||
|
||||
OldPen = (HPEN)SelectObject(Desktop, BluePen);
|
||||
OldBrush = (HBRUSH)SelectObject(Desktop, RedBrush);
|
||||
|
||||
Mode = GetPolyFillMode(Desktop);
|
||||
|
||||
SetPolyFillMode(Desktop, ALTERNATE);
|
||||
Polygon(Desktop,lpPointsAlternate,5);
|
||||
|
||||
SetPolyFillMode(Desktop, WINDING);
|
||||
Polygon(Desktop,lpPointsWinding,5);
|
||||
|
||||
//cleanup
|
||||
SetPolyFillMode(Desktop, Mode);
|
||||
SelectObject(Desktop, OldPen);
|
||||
SelectObject(Desktop, OldBrush);
|
||||
DeleteObject(BluePen);
|
||||
DeleteObject(RedBrush);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void shaptest( HDC DevCtx ){
|
||||
HDC Desktop, MyDC, DC24;
|
||||
HPEN RedPen, GreenPen, BluePen, WhitePen;
|
||||
HBITMAP MyBitmap, DIB24;
|
||||
HFONT hf, tf;
|
||||
BITMAPINFOHEADER BitInf;
|
||||
BITMAPINFO BitPalInf;
|
||||
HRGN hRgn1, hRgn2, hRgn3;
|
||||
HBRUSH BlueBrush, DefBrush;
|
||||
int sec,Xmod,Ymod;
|
||||
char tbuf[5];
|
||||
|
||||
|
||||
BlueBrush = CreateSolidBrush( RGB(0, 0, 0xff) );
|
||||
DefBrush = SelectObject( DevCtx, BlueBrush );
|
||||
|
||||
SelectObject( DevCtx, DefBrush );
|
||||
DeleteObject( BlueBrush );
|
||||
|
||||
// Create a blue pen and select it into the DC
|
||||
BluePen = CreatePen(PS_SOLID, 8, RGB(0, 0, 0xff));
|
||||
SelectObject(DevCtx, BluePen);
|
||||
|
||||
//Test the Polygon routine.
|
||||
PolygonTest(DevCtx);
|
||||
}
|
||||
|
||||
|
||||
int WINAPI
|
||||
WinMain(HINSTANCE hInstance,
|
||||
HINSTANCE hPrevInstance,
|
||||
LPSTR lpszCmdLine,
|
||||
int nCmdShow)
|
||||
{
|
||||
WNDCLASS wc;
|
||||
MSG msg;
|
||||
HWND hWnd;
|
||||
|
||||
wc.lpszClassName = "ShapTestClass";
|
||||
wc.lpfnWndProc = MainWndProc;
|
||||
wc.style = CS_VREDRAW | CS_HREDRAW;
|
||||
wc.hInstance = hInstance;
|
||||
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
|
||||
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||
wc.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH);
|
||||
wc.lpszMenuName = NULL;
|
||||
wc.cbClsExtra = 0;
|
||||
wc.cbWndExtra = 0;
|
||||
if (RegisterClass(&wc) == 0)
|
||||
{
|
||||
fprintf(stderr, "RegisterClass failed (last error 0x%X)\n",
|
||||
GetLastError());
|
||||
return(1);
|
||||
}
|
||||
|
||||
hWnd = CreateWindow("ShapTestClass",
|
||||
"Shaptest",
|
||||
WS_OVERLAPPEDWINDOW|WS_HSCROLL|WS_VSCROLL,
|
||||
0,
|
||||
0,
|
||||
CW_USEDEFAULT,
|
||||
CW_USEDEFAULT,
|
||||
NULL,
|
||||
NULL,
|
||||
hInstance,
|
||||
NULL);
|
||||
if (hWnd == NULL)
|
||||
{
|
||||
fprintf(stderr, "CreateWindow failed (last error 0x%X)\n",
|
||||
GetLastError());
|
||||
return(1);
|
||||
}
|
||||
|
||||
tf = CreateFontA(14, 0, 0, TA_BASELINE, FW_NORMAL, FALSE, FALSE, FALSE,
|
||||
ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,
|
||||
DEFAULT_QUALITY, FIXED_PITCH|FF_DONTCARE, "Timmons");
|
||||
|
||||
ShowWindow(hWnd, nCmdShow);
|
||||
|
||||
while(GetMessage(&msg, NULL, 0, 0))
|
||||
{
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
|
||||
DeleteObject(tf);
|
||||
|
||||
return msg.wParam;
|
||||
}
|
||||
|
||||
LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
PAINTSTRUCT ps;
|
||||
HDC hDC;
|
||||
RECT clr, wir;
|
||||
char spr[100], sir[100];
|
||||
|
||||
switch(msg)
|
||||
{
|
||||
|
||||
case WM_PAINT:
|
||||
hDC = BeginPaint(hWnd, &ps);
|
||||
shaptest( hDC );
|
||||
EndPaint(hWnd, &ps);
|
||||
break;
|
||||
|
||||
case WM_DESTROY:
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
|
||||
default:
|
||||
return DefWindowProc(hWnd, msg, wParam, lParam);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@@ -3,4 +3,3 @@
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -26,22 +26,11 @@ clean:
|
||||
|
||||
.phony: implib clean
|
||||
|
||||
ifneq ($(BOOTCD_INSTALL),)
|
||||
|
||||
install: $(PROGS:%=$(INSTALL_DIR)/%)
|
||||
|
||||
$(PROGS:%=$(INSTALL_DIR)/%): $(INSTALL_DIR)/%: %
|
||||
$(CP) $* $(INSTALL_DIR)/$*
|
||||
|
||||
else # BOOTCD_INSTALL
|
||||
|
||||
install: $(PROGS:%=$(INSTALL_DIR)/bin/%)
|
||||
|
||||
$(PROGS:%=$(INSTALL_DIR)/bin/%): $(INSTALL_DIR)/bin/%: %
|
||||
$(CP) $* $(INSTALL_DIR)/bin/$*
|
||||
|
||||
endif # BOOTCD_INSTALL
|
||||
|
||||
dist: $(PROGS:%=$(DIST_DIR)/apps/%)
|
||||
|
||||
$(PROGS:%=$(DIST_DIR)/apps/%): $(DIST_DIR)/apps/%: %
|
||||
|
@@ -3,4 +3,3 @@
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
@@ -1,6 +0,0 @@
|
||||
statst.exe
|
||||
statst.nostrip.exe
|
||||
statst.sym
|
||||
statst.coff
|
||||
*.d
|
||||
*.o*.map
|
@@ -1,20 +0,0 @@
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_NORC = yes
|
||||
|
||||
TARGET_TYPE = program
|
||||
|
||||
TARGET_APPTYPE = windows
|
||||
|
||||
TARGET_NAME = statst
|
||||
|
||||
TARGET_SDKLIBS = kernel32.a gdi32.a
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
||||
# EOF
|
@@ -1,165 +0,0 @@
|
||||
//#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
|
||||
static LPSTR STATIC_CLASS = "STATIC";
|
||||
static LPSTR TEST_WND_CLASS = "TESTWND";
|
||||
|
||||
#ifdef NDEBUG
|
||||
#define DPRINT(s) (void)0
|
||||
#else
|
||||
#define DPRINT(s) OutputDebugStringA("STATICTEST: " s "\n")
|
||||
#endif
|
||||
|
||||
HINSTANCE AppInstance = NULL;
|
||||
|
||||
LRESULT WmCreate(
|
||||
HWND Wnd)
|
||||
{
|
||||
UCHAR i;
|
||||
DPRINT("WM_CREATE (enter).");
|
||||
// Test 1 - black rectangle.
|
||||
DPRINT("test 1");
|
||||
CreateWindowEx(0, STATIC_CLASS, NULL, WS_CHILD | WS_VISIBLE | SS_BLACKRECT,
|
||||
10, 10, 100, 20, Wnd, NULL, AppInstance, NULL);
|
||||
// Test 2 - black frame.
|
||||
DPRINT("test 2");
|
||||
CreateWindowEx(0, STATIC_CLASS, NULL, WS_CHILD | WS_VISIBLE | SS_BLACKFRAME,
|
||||
10, 40, 100, 20, Wnd, NULL, AppInstance, NULL);
|
||||
// Test 3 - gray rectangle.
|
||||
DPRINT("test 3");
|
||||
CreateWindowEx(0, STATIC_CLASS, NULL, WS_CHILD | WS_VISIBLE | SS_GRAYRECT,
|
||||
10, 70, 100, 20, Wnd, NULL, AppInstance, NULL);
|
||||
// Test 4 - gray frame.
|
||||
DPRINT("test 4");
|
||||
CreateWindowEx(0, STATIC_CLASS, NULL, WS_CHILD | WS_VISIBLE | SS_GRAYFRAME,
|
||||
10, 100, 100, 20, Wnd, NULL, AppInstance, NULL);
|
||||
// Test 5 - left-aligned text.
|
||||
DPRINT("test 5");
|
||||
CreateWindowEx(0, STATIC_CLASS,
|
||||
"&Left-aligned text &static control window",
|
||||
WS_CHILD | WS_VISIBLE | SS_LEFT,
|
||||
10, 130, 100, 50, Wnd, NULL, AppInstance, NULL);
|
||||
// Test 6 - right-aligned text.
|
||||
DPRINT("test 6");
|
||||
CreateWindowEx(0, STATIC_CLASS,
|
||||
"&Right-aligned text &static control window",
|
||||
WS_CHILD | WS_VISIBLE | SS_RIGHT,
|
||||
10, 185, 100, 50, Wnd, NULL, AppInstance, NULL);
|
||||
// Test 7 - centered text.
|
||||
DPRINT("test 7");
|
||||
CreateWindowEx(0, STATIC_CLASS,
|
||||
"&Centered text &static control window",
|
||||
WS_CHILD | WS_VISIBLE | SS_CENTER,
|
||||
10, 240, 100, 50, Wnd, NULL, AppInstance, NULL);
|
||||
// Test 8 - left-aligned text with no word wrap and no prefixes.
|
||||
DPRINT("test 8");
|
||||
CreateWindowEx(0, STATIC_CLASS,
|
||||
"&No prefix and no word wrapping",
|
||||
WS_CHILD | WS_VISIBLE | SS_LEFTNOWORDWRAP | SS_NOPREFIX,
|
||||
10, 295, 100, 20, Wnd, NULL, AppInstance, NULL);
|
||||
// Test 9 - white rectangle.
|
||||
DPRINT("test 9");
|
||||
CreateWindowEx(0, STATIC_CLASS, NULL, WS_CHILD | WS_VISIBLE | SS_WHITERECT,
|
||||
120, 10, 100, 20, Wnd, NULL, AppInstance, NULL);
|
||||
// Test 10 - white frame.
|
||||
DPRINT("test 10");
|
||||
CreateWindowEx(0, STATIC_CLASS, NULL, WS_CHILD | WS_VISIBLE | SS_WHITEFRAME,
|
||||
120, 40, 100, 20, Wnd, NULL, AppInstance, NULL);
|
||||
// Test 11 - etched frame.
|
||||
DPRINT("test 11");
|
||||
CreateWindowEx(0, STATIC_CLASS, NULL, WS_CHILD | WS_VISIBLE
|
||||
| SS_ETCHEDFRAME, 120, 70, 100, 20, Wnd, NULL, AppInstance, NULL);
|
||||
// Test 12 - etched horizontal lines.
|
||||
DPRINT("test 12");
|
||||
for (i = 0; i < 5; ++i)
|
||||
CreateWindowEx(0, STATIC_CLASS, NULL, WS_CHILD | WS_VISIBLE
|
||||
| SS_ETCHEDHORZ, 120, 100 + (4L * i), 100, 4, Wnd,
|
||||
NULL, AppInstance, NULL);
|
||||
// Test 13 - etched vertical lines.
|
||||
DPRINT("test 13");
|
||||
for (i = 0; i < 25; ++i)
|
||||
CreateWindowEx(0, STATIC_CLASS, NULL, WS_CHILD | WS_VISIBLE
|
||||
| SS_ETCHEDVERT, 120 + (4L * i), 130, 4, 20, Wnd,
|
||||
NULL, AppInstance, NULL);
|
||||
// Test 14 - sunken border.
|
||||
DPRINT("test 14");
|
||||
CreateWindowEx(0, STATIC_CLASS,
|
||||
"Sunken frame and word ellipsis",
|
||||
WS_CHILD | WS_VISIBLE | SS_SUNKEN | SS_WORDELLIPSIS,
|
||||
120, 160, 100, 20, Wnd, NULL, AppInstance, NULL);
|
||||
DPRINT("WM_CREATE (leave).");
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CALLBACK TestWndProc(
|
||||
HWND Wnd,
|
||||
UINT Msg,
|
||||
WPARAM wParam,
|
||||
LPARAM lParam)
|
||||
{
|
||||
switch (Msg) {
|
||||
case WM_CREATE:
|
||||
return WmCreate(Wnd);
|
||||
case WM_DESTROY:
|
||||
PostQuitMessage(0);
|
||||
return 0;
|
||||
default:
|
||||
return DefWindowProc(Wnd, Msg, wParam, lParam);
|
||||
}
|
||||
}
|
||||
|
||||
int STDCALL WinMain(
|
||||
HINSTANCE hInstance,
|
||||
HINSTANCE hPrevInstance,
|
||||
LPSTR lpCmdLine,
|
||||
int nShowCmd)
|
||||
{
|
||||
ATOM Result;
|
||||
MSG Msg;
|
||||
HWND MainWindow;
|
||||
WNDCLASSEX TestWndClass = {0};
|
||||
DPRINT("Application starting up.");
|
||||
// Remember instance handle.
|
||||
AppInstance = GetModuleHandle(NULL);
|
||||
// Register test window class.
|
||||
TestWndClass.cbSize = sizeof(WNDCLASSEX);
|
||||
TestWndClass.lpfnWndProc = &TestWndProc;
|
||||
TestWndClass.hInstance = AppInstance;
|
||||
TestWndClass.hCursor = LoadCursor(0, IDC_ARROW);
|
||||
TestWndClass.hbrBackground = CreateSolidBrush(RGB(255,255,230));
|
||||
TestWndClass.lpszClassName = TEST_WND_CLASS;
|
||||
Result = RegisterClassEx(&TestWndClass);
|
||||
if (Result == 0) {
|
||||
DPRINT("Error registering class.");
|
||||
MessageBox(0, "Error registering test window class.",
|
||||
"Static control test", MB_ICONSTOP | MB_OK);
|
||||
ExitProcess(0);
|
||||
}
|
||||
// Create main window.
|
||||
DPRINT("Creating main window.");
|
||||
MainWindow = CreateWindowEx(WS_EX_APPWINDOW | WS_EX_CLIENTEDGE,
|
||||
TEST_WND_CLASS, "Static control test",
|
||||
WS_OVERLAPPEDWINDOW, 50, 50, 245, 365,
|
||||
NULL, NULL, AppInstance, NULL);
|
||||
if (MainWindow == 0) {
|
||||
DPRINT("Error creating main window.");
|
||||
UnregisterClass(TEST_WND_CLASS, AppInstance);
|
||||
MessageBox(0, "Error creating test window.",
|
||||
"Static control test", MB_ICONSTOP | MB_OK);
|
||||
ExitProcess(0);
|
||||
}
|
||||
DPRINT("Showing main window.");
|
||||
ShowWindow(MainWindow, SW_SHOWNORMAL);
|
||||
UpdateWindow(MainWindow);
|
||||
// Run message loop.
|
||||
DPRINT("Entering message loop.");
|
||||
while (GetMessage(&Msg, NULL, 0, 0) > 0) {
|
||||
TranslateMessage(&Msg);
|
||||
DispatchMessage(&Msg);
|
||||
}
|
||||
// Unregister window class.
|
||||
UnregisterClass(TEST_WND_CLASS, AppInstance);
|
||||
DPRINT("Exiting.");
|
||||
|
||||
return Msg.wParam;
|
||||
}
|
@@ -3,4 +3,3 @@
|
||||
*.exe
|
||||
*.dsp
|
||||
*.dsw
|
||||
*.map
|
||||
|
@@ -1,4 +1,3 @@
|
||||
*.exe
|
||||
*.o
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -1,3 +1,2 @@
|
||||
*.exe
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -1,4 +1,3 @@
|
||||
*.sym
|
||||
*.exe
|
||||
*.o
|
||||
*.map
|
||||
|
@@ -1,4 +1,3 @@
|
||||
*.exe
|
||||
*.o
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -1,4 +1,3 @@
|
||||
*.exe
|
||||
*.sym
|
||||
*.o
|
||||
*.map
|
||||
|
3
reactos/apps/tests/tests/hello2/.cvsignore
Normal file
3
reactos/apps/tests/tests/hello2/.cvsignore
Normal file
@@ -0,0 +1,3 @@
|
||||
*.exe
|
||||
*.o
|
||||
*.sym
|
26
reactos/apps/tests/tests/hello2/Makefile
Normal file
26
reactos/apps/tests/tests/hello2/Makefile
Normal file
@@ -0,0 +1,26 @@
|
||||
#
|
||||
#
|
||||
#
|
||||
PATH_TO_TOP = ../../../..
|
||||
|
||||
PROGS = hello2
|
||||
|
||||
OBJECTS = hello2.o
|
||||
|
||||
LIBS = # gdi32.a
|
||||
CFLAGS =
|
||||
|
||||
all: $(PROGS:%=%.exe)
|
||||
|
||||
.phony: all
|
||||
|
||||
clean:
|
||||
- $(RM) *.o *.coff *.exe *.sym
|
||||
|
||||
.phony: clean
|
||||
|
||||
hello2.exe: $(OBJECTS)
|
||||
$(CC) $(CFLAGS) -Wl,--subsystem,windows $(OBJECTS) $(LIBS) -o hello2.exe
|
||||
$(NM) --numeric-sort hello2.exe > hello2.sym
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
9
reactos/apps/tests/tests/hello2/hello2.c
Normal file
9
reactos/apps/tests/tests/hello2/hello2.c
Normal file
@@ -0,0 +1,9 @@
|
||||
#include "windows.h"
|
||||
|
||||
int PASCAL WinMain (HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
|
||||
{
|
||||
return MessageBox((HWND)0,
|
||||
(LPSTR)"Hello, hello!",
|
||||
(LPSTR)"Hello Wine Application",
|
||||
(MB_OK | MB_ICONEXCLAMATION));
|
||||
}
|
@@ -1,4 +1,3 @@
|
||||
*.exe
|
||||
*.o
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -1,4 +1,3 @@
|
||||
*.o
|
||||
*.exe
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -1,4 +1,3 @@
|
||||
*.o
|
||||
*.exe
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -3,4 +3,3 @@
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -3,4 +3,3 @@
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -3,4 +3,3 @@
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -3,5 +3,4 @@ winhello.nostrip.exe
|
||||
winhello.sym
|
||||
winhello.coff
|
||||
*.d
|
||||
*.o
|
||||
*.map
|
||||
*.o
|
Binary file not shown.
Before Width: | Height: | Size: 26 KiB |
@@ -1,175 +0,0 @@
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// Windows 2000 Graphics API Black Book
|
||||
// Chapter 2 - CD-ROM (WM_ERASEBKGND Demo)
|
||||
//
|
||||
// Created by Damon Chandler <dmc27@ee.cornell.edu>
|
||||
// Updates can be downloaded at: <www.coriolis.com>
|
||||
//
|
||||
// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu
|
||||
// if you have any questions about this code.
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
//*********************************************************//
|
||||
// //
|
||||
// SYNOPSIS: //
|
||||
// This sample project demonstrates how to render //
|
||||
// a background image in response to the WM_ERASEBKGND //
|
||||
// message. It also shows how to create a transparent //
|
||||
// static (text) control by handling the //
|
||||
// WM_CTLCOLORSTATIC message. //
|
||||
// //
|
||||
//*********************************************************//
|
||||
|
||||
|
||||
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
#include <windows.h>
|
||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
|
||||
HINSTANCE HInst;
|
||||
const char* WndClassName = "GMainWnd";
|
||||
LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
|
||||
LPARAM LParam);
|
||||
|
||||
|
||||
int APIENTRY WinMain(HINSTANCE HInstance, HINSTANCE HPrevInstance,
|
||||
LPTSTR lpCmdLine, int nCmdShow)
|
||||
{
|
||||
HInst = HInstance;
|
||||
|
||||
WNDCLASS wc;
|
||||
memset(&wc, 0, sizeof(WNDCLASS));
|
||||
|
||||
wc.style = CS_VREDRAW | CS_HREDRAW | CS_DBLCLKS;
|
||||
wc.lpfnWndProc = MainWndProc;
|
||||
wc.hInstance = HInstance;
|
||||
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||
wc.hbrBackground =
|
||||
reinterpret_cast<HBRUSH>(COLOR_BTNFACE + 1);
|
||||
wc.lpszClassName = WndClassName;
|
||||
|
||||
if (RegisterClass(&wc))
|
||||
{
|
||||
HWND HWnd =
|
||||
CreateWindow(WndClassName,
|
||||
TEXT("WM_ERASEBKGND Demo"),
|
||||
WS_OVERLAPPEDWINDOW | WS_CAPTION |
|
||||
WS_VISIBLE | WS_CLIPSIBLINGS,
|
||||
CW_USEDEFAULT, CW_USEDEFAULT, 205, 85,
|
||||
NULL, NULL, HInstance, NULL);
|
||||
|
||||
if (HWnd)
|
||||
{
|
||||
ShowWindow(HWnd, nCmdShow);
|
||||
UpdateWindow(HWnd);
|
||||
|
||||
MSG msg;
|
||||
while (GetMessage(&msg, NULL, 0, 0))
|
||||
{
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//------------------------------------------------------------------
|
||||
|
||||
|
||||
// static text and bitmap-related variables
|
||||
HWND HStatic;
|
||||
HDC HMemDC;
|
||||
HBITMAP HBmp, HOldBmp;
|
||||
const char* filename = "BACKBITMAP.BMP";
|
||||
|
||||
LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
|
||||
LPARAM LParam)
|
||||
{
|
||||
switch (Msg)
|
||||
{
|
||||
case WM_CREATE:
|
||||
{
|
||||
HStatic =
|
||||
CreateWindow(TEXT("STATIC"), TEXT("Static Text"),
|
||||
WS_CHILD | WS_VISIBLE | SS_CENTER,
|
||||
10, 20, 175, 30,
|
||||
HWnd, NULL, HInst, NULL);
|
||||
|
||||
// create a memory DC compatible with the screen
|
||||
HMemDC = CreateCompatibleDC(NULL);
|
||||
if (HMemDC)
|
||||
{
|
||||
// load a DDB from file
|
||||
HBmp = static_cast<HBITMAP>(
|
||||
LoadImage(HInst, filename, IMAGE_BITMAP,
|
||||
0, 0, LR_LOADFROMFILE)
|
||||
);
|
||||
if (HBmp)
|
||||
{
|
||||
// associate the DDB with the memory DC
|
||||
HOldBmp = static_cast<HBITMAP>(
|
||||
SelectObject(HMemDC, HBmp)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
case WM_CTLCOLORSTATIC:
|
||||
{
|
||||
if (reinterpret_cast<HWND>(LParam) == HStatic)
|
||||
{
|
||||
HDC HStaticDC = reinterpret_cast<HDC>(WParam);
|
||||
SetBkMode(HStaticDC, TRANSPARENT);
|
||||
|
||||
return reinterpret_cast<LRESULT>(
|
||||
GetStockObject(NULL_BRUSH)
|
||||
);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case WM_ERASEBKGND:
|
||||
{
|
||||
BITMAP bmp;
|
||||
if (GetObject(HBmp, sizeof(BITMAP), &bmp))
|
||||
{
|
||||
RECT RClient;
|
||||
GetClientRect(HWnd, &RClient);
|
||||
|
||||
HDC Hdc = reinterpret_cast<HDC>(WParam);
|
||||
SetStretchBltMode(Hdc, COLORONCOLOR);
|
||||
|
||||
//
|
||||
// TODO: add palette handling code for
|
||||
// palettized displays (see Chapter 9)...
|
||||
//
|
||||
|
||||
// render the background image
|
||||
StretchBlt(Hdc, 0, 0,
|
||||
RClient.right - RClient.left,
|
||||
RClient.bottom - RClient.top,
|
||||
HMemDC, 0, 0, bmp.bmWidth, bmp.bmHeight,
|
||||
SRCCOPY);
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case WM_DESTROY:
|
||||
{
|
||||
if (HBmp)
|
||||
{
|
||||
// free the bitmap
|
||||
DeleteObject(SelectObject(HMemDC, HOldBmp));
|
||||
}
|
||||
// free the memory DC
|
||||
DeleteDC(HMemDC);
|
||||
|
||||
PostQuitMessage(0);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return DefWindowProc(HWnd, Msg, WParam, LParam);
|
||||
}
|
||||
//------------------------------------------------------------------
|
||||
|
||||
|
||||
|
@@ -1,66 +0,0 @@
|
||||
# Makefile - Proj_Demo_WM_ERASEBKGND.dsp
|
||||
|
||||
ifndef CFG
|
||||
CFG=Proj_Demo_WM_ERASEBKGND - Win32 Debug
|
||||
endif
|
||||
CC=gcc
|
||||
CFLAGS=
|
||||
CXX=g++
|
||||
CXXFLAGS=$(CFLAGS)
|
||||
RC=windres -O COFF
|
||||
ifeq "$(CFG)" "Proj_Demo_WM_ERASEBKGND - Win32 Release"
|
||||
CFLAGS+=-fexceptions -O2 -DWIN32 -DNDEBUG -D_WINDOWS -D_MBCS -W
|
||||
LD=$(CXX) $(CXXFLAGS)
|
||||
LDFLAGS=
|
||||
LDFLAGS+=-Wl,--subsystem,windows
|
||||
LIBS+=-lkernel32 -luser32 -lgdi32
|
||||
else
|
||||
ifeq "$(CFG)" "Proj_Demo_WM_ERASEBKGND - Win32 Debug"
|
||||
CFLAGS+=-fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W
|
||||
LD=$(CXX) $(CXXFLAGS)
|
||||
LDFLAGS=
|
||||
LDFLAGS+=-Wl,--subsystem,windows
|
||||
LIBS+=-lkernel32 -luser32 -lgdi32
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef TARGET
|
||||
TARGET=WM_ERASEBKGND.exe
|
||||
endif
|
||||
|
||||
.PHONY: all
|
||||
all: $(TARGET)
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
|
||||
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $@ -c $<
|
||||
|
||||
%.res: %.rc
|
||||
$(RC) $(CPPFLAGS) -o $@ -i $<
|
||||
|
||||
SOURCE_FILES= \
|
||||
Demo_WM_ERASEBKGND.cpp
|
||||
|
||||
HEADER_FILES=
|
||||
|
||||
RESOURCE_FILES=
|
||||
|
||||
SRCS=$(SOURCE_FILES) $(HEADER_FILES) $(RESOURCE_FILES)
|
||||
|
||||
OBJS=$(patsubst %.rc,%.res,$(patsubst %.cpp,%.o,$(patsubst %.c,%.o,$(filter %.c %.cpp %.rc,$(SRCS)))))
|
||||
|
||||
$(TARGET): $(OBJS)
|
||||
$(LD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
del $(OBJS) $(TARGET) Proj_Demo_WM_ERASEBKGND.dep
|
||||
|
||||
.PHONY: depends
|
||||
depends:
|
||||
-$(CXX) $(CXXFLAGS) $(CPPFLAGS) -MM $(filter %.c %.cpp,$(SRCS)) > Proj_Demo_WM_ERASEBKGND.dep
|
||||
|
||||
-include Proj_Demo_WM_ERASEBKGND.dep
|
||||
|
@@ -1,6 +0,0 @@
|
||||
*.o
|
||||
*.d
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
@@ -31,7 +31,8 @@ int APIENTRY WinMain(HINSTANCE HInstance, HINSTANCE HPrevInstance,
|
||||
wc.lpfnWndProc = MainWndProc;
|
||||
wc.hInstance = HInstance;
|
||||
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||
wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
|
||||
wc.hbrBackground =
|
||||
reinterpret_cast<HBRUSH>(COLOR_BTNFACE + 1);
|
||||
wc.lpszClassName = WndClassName;
|
||||
|
||||
if (RegisterClass(&wc))
|
||||
@@ -69,7 +70,7 @@ LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
|
||||
{
|
||||
// determine the invalidated area of the window
|
||||
RECT RUpdate;
|
||||
GetUpdateRect(HWnd, &RUpdate, NULL);
|
||||
GetUpdateRect(HWnd, &RUpdate, false);
|
||||
|
||||
// grab a handle to our window's
|
||||
// common display device context
|
||||
@@ -86,11 +87,11 @@ LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
|
||||
RUpdate.right, RUpdate.bottom);
|
||||
|
||||
// fill the client area with the background brush
|
||||
//HBRUSH HBrush =
|
||||
//reinterpret_cast<HBRUSH>
|
||||
(HBRUSH)(GetClassLong(HWnd, GCL_HBRBACKGROUND)
|
||||
HBRUSH HBrush =
|
||||
reinterpret_cast<HBRUSH>(
|
||||
GetClassLong(HWnd, GCL_HBRBACKGROUND)
|
||||
);
|
||||
FillRect(Hdc, &RClient, NULL);
|
||||
FillRect(Hdc, &RClient, HBrush);
|
||||
|
||||
// render the persistent text
|
||||
const char* text = "Persistent Text";
|
@@ -1,20 +1,66 @@
|
||||
# Makefile - Proj_Listing1_1.dsp
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
ifndef CFG
|
||||
CFG=Proj_Listing1_1 - Win32 Debug
|
||||
endif
|
||||
CC=gcc
|
||||
CFLAGS=
|
||||
CXX=g++
|
||||
CXXFLAGS=$(CFLAGS)
|
||||
RC=windres -O COFF
|
||||
ifeq "$(CFG)" "Proj_Listing1_1 - Win32 Release"
|
||||
CFLAGS+=-fexceptions -O2 -DWIN32 -DNDEBUG -D_WINDOWS -D_MBCS -W
|
||||
LD=$(CXX) $(CXXFLAGS)
|
||||
LDFLAGS=
|
||||
LDFLAGS+=-Wl,--subsystem,windows
|
||||
LIBS+=-lkernel32 -luser32 -lgdi32
|
||||
else
|
||||
ifeq "$(CFG)" "Proj_Listing1_1 - Win32 Debug"
|
||||
CFLAGS+=-fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W
|
||||
LD=$(CXX) $(CXXFLAGS)
|
||||
LDFLAGS=
|
||||
LDFLAGS+=-Wl,--subsystem,windows
|
||||
LIBS+=-lkernel32 -luser32 -lgdi32
|
||||
endif
|
||||
endif
|
||||
|
||||
TARGET_NORC = yes
|
||||
ifndef TARGET
|
||||
TARGET=WM_PAINT.exe
|
||||
endif
|
||||
|
||||
TARGET_TYPE = program
|
||||
.PHONY: all
|
||||
all: $(TARGET)
|
||||
|
||||
TARGET_APPTYPE = windows
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
|
||||
|
||||
TARGET_NAME = wm_paint
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $@ -c $<
|
||||
|
||||
TARGET_SDKLIBS = kernel32.a gdi32.a
|
||||
%.res: %.rc
|
||||
$(RC) $(CPPFLAGS) -o $@ -i $<
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
SOURCE_FILES= \
|
||||
Listing1_1.cpp
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
HEADER_FILES=
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
RESOURCE_FILES=
|
||||
|
||||
SRCS=$(SOURCE_FILES) $(HEADER_FILES) $(RESOURCE_FILES)
|
||||
|
||||
OBJS=$(patsubst %.rc,%.res,$(patsubst %.cpp,%.o,$(patsubst %.c,%.o,$(filter %.c %.cpp %.rc,$(SRCS)))))
|
||||
|
||||
$(TARGET): $(OBJS)
|
||||
$(LD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
-del $(OBJS) $(TARGET)
|
||||
|
||||
.PHONY: depends
|
||||
depends:
|
||||
-$(CXX) $(CXXFLAGS) $(CPPFLAGS) -MM $(filter %.c %.cpp,$(SRCS)) > Proj_Listing1_1.dep
|
||||
|
||||
-include Proj_Listing1_1.dep
|
||||
|
||||
# EOF
|
||||
|
@@ -59,19 +59,19 @@ dist: $(TEST_SETS:%=%_dist) \
|
||||
# Testset Applications
|
||||
#
|
||||
$(TEST_SETS): %:
|
||||
$(MAKE) -C $*
|
||||
make -C $*
|
||||
|
||||
$(TEST_SETS:%=%_implib): %_implib:
|
||||
$(MAKE) -C $* implib
|
||||
make -C $* implib
|
||||
|
||||
$(TEST_SETS:%=%_clean): %_clean:
|
||||
$(MAKE) -C $* clean
|
||||
make -C $* clean
|
||||
|
||||
$(TEST_SETS:%=%_dist): %_dist:
|
||||
$(MAKE) -C $* dist
|
||||
make -C $* dist
|
||||
|
||||
$(TEST_SETS:%=%_install): %_install:
|
||||
$(MAKE) -C $* install
|
||||
make -C $* install
|
||||
|
||||
.PHONY: $(TEST_SETS) $(TEST_SETS:%=%_implib) $(TEST_SETS:%=%_clean) $(TEST_SETS:%=%_install) $(TEST_SETS:%=%_dist)
|
||||
|
||||
@@ -80,19 +80,19 @@ $(TEST_SETS:%=%_install): %_install:
|
||||
# Kernel32 Test Applications
|
||||
#
|
||||
$(TEST_KERNEL32): %:
|
||||
$(MAKE) -C kernel32/$*
|
||||
make -C kernel32/$*
|
||||
|
||||
$(TEST_KERNEL32:%=%_implib): %_implib:
|
||||
$(MAKE) -C kernel32/$* implib
|
||||
make -C kernel32/$* implib
|
||||
|
||||
$(TEST_KERNEL32:%=%_clean): %_clean:
|
||||
$(MAKE) -C kernel32/$* clean
|
||||
make -C kernel32/$* clean
|
||||
|
||||
$(TEST_KERNEL32:%=%_dist): %_dist:
|
||||
$(MAKE) -C kernel32/$* dist
|
||||
make -C kernel32/$* dist
|
||||
|
||||
$(TEST_KERNEL32:%=%_install): %_install:
|
||||
$(MAKE) -C kernel32/$* install
|
||||
make -C kernel32/$* install
|
||||
|
||||
.PHONY: $(TEST_KERNEL32) $(TEST_KERNEL32:%=%_implib) $(TEST_KERNEL32:%=%_clean) $(TEST_KERNEL32:%=%_install) $(TEST_KERNEL32:%=%_dist)
|
||||
|
||||
@@ -101,19 +101,19 @@ $(TEST_KERNEL32:%=%_install): %_install:
|
||||
# msvcrt Test Applications
|
||||
#
|
||||
$(TEST_MSVCRT): %:
|
||||
$(MAKE) -C msvcrt/$*
|
||||
make -C msvcrt/$*
|
||||
|
||||
$(TEST_MSVCRT:%=%_implib): %_implib:
|
||||
$(MAKE) -C msvcrt/$* implib
|
||||
make -C msvcrt/$* implib
|
||||
|
||||
$(TEST_MSVCRT:%=%_clean): %_clean:
|
||||
$(MAKE) -C msvcrt/$* clean
|
||||
make -C msvcrt/$* clean
|
||||
|
||||
$(TEST_MSVCRT:%=%_dist): %_dist:
|
||||
$(MAKE) -C msvcrt/$* dist
|
||||
make -C msvcrt/$* dist
|
||||
|
||||
$(TEST_MSVCRT:%=%_install): %_install:
|
||||
$(MAKE) -C msvcrt/$* install
|
||||
make -C msvcrt/$* install
|
||||
|
||||
.PHONY: $(TEST_MSVCRT) $(TEST_MSVCRT:%=%_implib) $(TEST_MSVCRT:%=%_clean) $(TEST_MSVCRT:%=%_install) $(TEST_MSVCRT:%=%_dist)
|
||||
|
||||
@@ -122,19 +122,19 @@ $(TEST_MSVCRT:%=%_install): %_install:
|
||||
# COM Test Applications
|
||||
#
|
||||
$(TEST_COM): %:
|
||||
$(MAKE) -C com/$*
|
||||
make -C com/$*
|
||||
|
||||
$(TEST_COM:%=%_implib): %_implib:
|
||||
$(MAKE) -C com/$* implib
|
||||
make -C com/$* implib
|
||||
|
||||
$(TEST_COM:%=%_clean): %_clean:
|
||||
$(MAKE) -C com/$* clean
|
||||
make -C com/$* clean
|
||||
|
||||
$(TEST_COM:%=%_dist): %_dist:
|
||||
$(MAKE) -C com/$* dist
|
||||
make -C com/$* dist
|
||||
|
||||
$(TEST_COM:%=%_install): %_install:
|
||||
$(MAKE) -C com/$* install
|
||||
make -C com/$* install
|
||||
|
||||
.PHONY: $(TEST_COM) $(TEST_COM:%=%_implib) $(TEST_COM:%=%_clean) $(TEST_COM:%=%_install) $(TEST_COM:%=%_dist)
|
||||
|
||||
@@ -143,19 +143,19 @@ $(TEST_COM:%=%_install): %_install:
|
||||
# SEH Test Applications
|
||||
#
|
||||
$(TEST_SEH): %:
|
||||
$(MAKE) -C seh/$*
|
||||
make -C seh/$*
|
||||
|
||||
$(TEST_SEH:%=%_implib): %_implib:
|
||||
$(MAKE) -C seh/$* implib
|
||||
make -C seh/$* implib
|
||||
|
||||
$(TEST_SEH:%=%_clean): %_clean:
|
||||
$(MAKE) -C seh/$* clean
|
||||
make -C seh/$* clean
|
||||
|
||||
$(TEST_SEH:%=%_dist): %_dist:
|
||||
$(MAKE) -C seh/$* dist
|
||||
make -C seh/$* dist
|
||||
|
||||
$(TEST_SEH:%=%_install): %_install:
|
||||
$(MAKE) -C seh/$* install
|
||||
make -C seh/$* install
|
||||
|
||||
.PHONY: $(TEST_SEH) $(TEST_SEH:%=%_implib) $(TEST_SEH:%=%_clean) $(TEST_SEH:%=%_install) $(TEST_SEH:%=%_dist)
|
||||
|
||||
@@ -164,19 +164,19 @@ $(TEST_SEH:%=%_install): %_install:
|
||||
# Regression Test Applications
|
||||
#
|
||||
$(TEST_REGRESSIONS): %:
|
||||
$(MAKE) -C regres/$*
|
||||
make -C regres/$*
|
||||
|
||||
$(TEST_REGRESSIONS:%=%_implib): %_implib:
|
||||
$(MAKE) -C regres/$* implib
|
||||
make -C regres/$* implib
|
||||
|
||||
$(TEST_REGRESSIONS:%=%_clean): %_clean:
|
||||
$(MAKE) -C regres/$* clean
|
||||
make -C regres/$* clean
|
||||
|
||||
$(TEST_REGRESSIONS:%=%_dist): %_dist:
|
||||
$(MAKE) -C regres/$* dist
|
||||
make -C regres/$* dist
|
||||
|
||||
$(TEST_REGRESSIONS:%=%_install): %_install:
|
||||
$(MAKE) -C regres/$* install
|
||||
make -C regres/$* install
|
||||
|
||||
.PHONY: $(TEST_REGRESSIONS) $(TEST_REGRESSIONS:%=%_implib) $(TEST_REGRESSIONS:%=%_clean) $(TEST_REGRESSIONS:%=%_install) $(TEST_REGRESSIONS:%=%_dist)
|
||||
|
||||
|
@@ -7,4 +7,3 @@
|
||||
*.dsw
|
||||
*.ncb
|
||||
*.opt
|
||||
*.map
|
||||
|
@@ -3,4 +3,3 @@
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
||||
|
@@ -9,7 +9,7 @@ include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
# Console system utilities
|
||||
# cabman cat net objdir partinfo pice ps sc stats
|
||||
UTIL_APPS = cat objdir partinfo pnpdump sc stats tickcount
|
||||
UTIL_APPS = cat objdir partinfo sc stats
|
||||
|
||||
UTIL_NET_APPS =
|
||||
|
||||
@@ -37,19 +37,19 @@ dist: $(UTIL_APPS:%=%_dist) \
|
||||
# Utility Applications
|
||||
#
|
||||
$(UTIL_APPS): %:
|
||||
$(MAKE) -C $*
|
||||
make -C $*
|
||||
|
||||
$(UTIL_APPS:%=%_implib): %_implib:
|
||||
$(MAKE) -C $* implib
|
||||
make -C $* implib
|
||||
|
||||
$(UTIL_APPS:%=%_clean): %_clean:
|
||||
$(MAKE) -C $* clean
|
||||
make -C $* clean
|
||||
|
||||
$(UTIL_APPS:%=%_dist): %_dist:
|
||||
$(MAKE) -C $* dist
|
||||
make -C $* dist
|
||||
|
||||
$(UTIL_APPS:%=%_install): %_install:
|
||||
$(MAKE) -C $* install
|
||||
make -C $* install
|
||||
|
||||
.PHONY: $(UTIL_APPS) $(UTIL_APPS:%=%_implib) $(UTIL_APPS:%=%_clean) $(UTIL_APPS:%=%_install) $(UTIL_APPS:%=%_dist)
|
||||
|
||||
@@ -58,19 +58,19 @@ $(UTIL_APPS:%=%_install): %_install:
|
||||
# GUI Utility Applications
|
||||
#
|
||||
$(UTIL_NET_APPS): %:
|
||||
$(MAKE) -C net/$*
|
||||
make -C net/$*
|
||||
|
||||
$(UTIL_NET_APPS:%=%_implib): %_implib:
|
||||
$(MAKE) -C net/$* implib
|
||||
make -C net/$* implib
|
||||
|
||||
$(UTIL_NET_APPS:%=%_clean): %_clean:
|
||||
$(MAKE) -C net/$* clean
|
||||
make -C net/$* clean
|
||||
|
||||
$(UTIL_NET_APPS:%=%_dist): %_dist:
|
||||
$(MAKE) -C net/$* dist
|
||||
make -C net/$* dist
|
||||
|
||||
$(UTIL_NET_APPS:%=%_install): %_install:
|
||||
$(MAKE) -C net/$* install
|
||||
make -C net/$* install
|
||||
|
||||
.PHONY: $(UTIL_NET_APPS) $(UTIL_NET_APPS:%=%_implib) $(UTIL_NET_APPS:%=%_clean) $(UTIL_NET_APPS:%=%_install) $(UTIL_NET_APPS:%=%_dist)
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user