mirror of
https://github.com/reactos/reactos
synced 2025-10-08 09:22:51 +02:00
Compare commits
6 Commits
ReactOS-0.
...
ReactOS-0.
Author | SHA1 | Date | |
---|---|---|---|
|
3a5a7572a9 | ||
|
20c7f87c94 | ||
|
ea55b7bf72 | ||
|
4eb59b536b | ||
|
19c2f9e135 | ||
|
37428df5ef |
@@ -19,4 +19,3 @@ reactos
|
||||
*.zip
|
||||
*.iso
|
||||
*.cab
|
||||
doxy-doc
|
||||
|
4
reactos/.gdbinit
Normal file
4
reactos/.gdbinit
Normal file
@@ -0,0 +1,4 @@
|
||||
directory /mnt/windows/CvsHome/reactos/ntoskrnl
|
||||
symbol-file ntoskrnl/ntoskrnl.nostrip.exe -mapped
|
||||
set remotebaud 115200
|
||||
target remote com2
|
@@ -1,55 +1,19 @@
|
||||
ReactOS is available thanks to the work of
|
||||
In no particular order
|
||||
|
||||
Emanuele Aliberti <ea@iol.it>
|
||||
Robert Bergkvist <fragdance@hotmail.com>
|
||||
Hartmut Birr <hartmut.birr@gmx.de>
|
||||
Aleksey Bragin <aleksey@studiocerebral.com>
|
||||
Richard Campbell <eek2121@comcast.net>
|
||||
Gunnar Andre' Dalsnes <hardon@online.no>
|
||||
Arindam Das
|
||||
Boudewijn Dekker <ariadne@xs4all.nl>
|
||||
Robert Dickenson <robd@reactos.org>
|
||||
Marty Dill <mdill@uvic.ca>
|
||||
Jason Eager
|
||||
Steven Edwards <steven_ed4153@yahoo.com>
|
||||
Iwan Fatahi <i_fatahi@hotmail.com>
|
||||
Jason Filby <jasonfilby@yahoo.com>
|
||||
Martin Fuchs <martin-fuchs@gmx.net>
|
||||
Jurgen van Gael <jurgen.vangael@student.kuleuven.ac.be>
|
||||
Ge van Geldorp <ge@gse.nl>
|
||||
Andrew Greenwood <lists@silverblade.co.uk>
|
||||
Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
KJK::Hyperion <noog@libero.it>
|
||||
Eugene Ingerman <geneing@myrealbox.com>
|
||||
Rex Jolliff <rex@lvcablemodem.com>
|
||||
Guido de Jong
|
||||
Victor Kirhenshtein <sauros@iname.com>
|
||||
Eric Kohl <ekohl@rz-online.de>
|
||||
Hans Kremer
|
||||
Frederik Leemans
|
||||
Jean Michault
|
||||
Royce Mitchell III <royce3@ev1.net>
|
||||
Filip Navara <xnavara@volny.cz>
|
||||
Jim Noeth
|
||||
Mike Nordell ("tamlin")
|
||||
Hernan Ochoa
|
||||
Brian Palmer <brianp@sginet.com>
|
||||
Paolo Pantaleo <paolopan@freemail.it>
|
||||
Matt Pyne
|
||||
Phillip Susi <phreak@iag.net>
|
||||
James B. Tabor <jimtabor@adsl-64-217-116-74.dsl.hstntx.swbell.net>
|
||||
Mark Tempel <mtempel@visi.com>
|
||||
Vizzini <vizzini@plasmic.com>
|
||||
Mark Weaver <mark@npsl.co.uk>
|
||||
Thomas Weidenmueller <w3seek@users.sourceforge.net>
|
||||
Jason Weiler
|
||||
David Welch <welch@cwcom.net>
|
||||
Jonathan Wilson <jonwil@tpgi.com.au>
|
||||
Art Yerkes <ayerkes@speakeasy.net>
|
||||
|
||||
Graphic Design from
|
||||
|
||||
Everaldo (http://everaldo.com) for Explorer icons
|
||||
Rex Jolliff (rex@lvcablemodem.com)
|
||||
Boudewijn Dekker (ariadne@xs4all.nl)
|
||||
Eric Kohl (ekohl@rz-online.de)
|
||||
Emanuele Aliberti (ea@iol.it)
|
||||
David Welch (welch@cwcom.net)
|
||||
Iwan Fatahi (i_fatahi@hotmail.com)
|
||||
Robert Bergkvist (fragdance@hotmail.com)
|
||||
Victor Kirhenshtein (sauros@iname.com)
|
||||
Jason Filby (jasonfilby@yahoo.com)
|
||||
Brian Palmer (brianp@sginet.com)
|
||||
Phillip Susi (phreak@iag.net)
|
||||
Paolo Pantaleo (paolopan@freemail.it)
|
||||
Casper S. Hornstrup (chorns@users.sourceforge.net)
|
||||
James B. Tabor (jimtabor@adsl-64-217-116-74.dsl.hstntx.swbell.net)
|
||||
|
||||
Source and inspiration from
|
||||
|
||||
@@ -76,3 +40,4 @@ Richter, Jeffery. Advanced Windows, 3rd ed. Microsoft, 1997.
|
||||
Simon, Richard J. Windows NT Win32 API Superbible. Waite Group, 1996.
|
||||
Solomon, David A. Inside Windows NT, 2nd Ed. Microsoft, 1998.
|
||||
"The NT Insider." Open Systems Resources, 1999-2000.
|
||||
|
||||
|
@@ -1,375 +1,3 @@
|
||||
2004-06-05 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* tools/helper.mk: Skip automatic dependency tracking if
|
||||
DEPENDENCIES=no.
|
||||
|
||||
2004-05-31 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* include/reactos/version.h (KERNEL_VERSION_BUILD_TYPE): Replace possible
|
||||
value FINAL with RELEASE.
|
||||
|
||||
2004-03-27 Art Yerkes <arty@users.sourceforge.net>
|
||||
|
||||
* Fixed make bootcd on windows + cross. Define TOPDIR as PATH_TO_TOP
|
||||
|
||||
2004-03-10 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* subsys/system/usetup/bootsup.c (UpdateFreeLoaderIni): Use existing
|
||||
ReactOS entry if available.
|
||||
|
||||
2004-03-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* regtests/Makefile: Make REGTEST_TARGETS depend on *.c.
|
||||
* regtests/kmregtests/driver.c: Update call to PerformTests().
|
||||
* regtests/kmrtint/kmrtint.c (RegTestMain): Update to match prototype.
|
||||
* regtests/kmrtint/kmrtint.def (RegTestMain): Ditto.
|
||||
* regtests/kmrtint/kmrtint.edf (RegTestMain): Ditto.
|
||||
* regtests/win32base/tests/ws2event.c: New file.
|
||||
* regtests/regtests/regtests.c (OUPUT_MODE_DbgPrint,
|
||||
OUPUT_MODE_OutputDebugString, OUPUT_MODE_printf): Define.
|
||||
(OutputMode): New variable.
|
||||
(OutputRoutine): New function.
|
||||
(RunTestDriver): Add TestName parameter.
|
||||
(main): Parse command line to find output routine and test name.
|
||||
* regtests/shared/regtests.c (PerformTest): Use specified output routine
|
||||
if specified. Run only specified test if specified.
|
||||
(PerformTests): Update call to PerformTest().
|
||||
* regtests/shared/regtests.h (TestOutputRoutine): Add prototype.
|
||||
(TestDriverMain): Add OutputRoutine and TestName parameter.
|
||||
(PerformTests): Ditto.
|
||||
* regtests/win32base/Makefile (TARGET_SDKLIBS): Add ws2_32.a.
|
||||
* regtests/win32base/driver.c (RegTestMain): Update to match prototype.
|
||||
* regtests/win32base/win32base.def (RegTestMain): Ditto.
|
||||
* regtests/win32base/win32base.edf (RegTestMain): Ditto.
|
||||
* tools/regtests.c (UMSTUB): Update call to PerformTests().
|
||||
|
||||
2004-03-04 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* drivers/net/tcpip/tcpip/i386: New directory.
|
||||
* drivers/net/tcpip/tcpip/i386/checksum.S: New file.
|
||||
* drivers/net/tcpip/notes.txt: New file.
|
||||
* drivers/net/afd/afd/dispatch.c (AfdDispCompleteListen): Signal ACCEPT
|
||||
network event.
|
||||
(AfdDispEventSelect): Reference event handle.
|
||||
* drivers/net/afd/afd/tdi.c (TdiListen): Remove unused event.
|
||||
Move Iosb and RequestConnectionInfo to AFD_LISTEN_REQUEST structure.
|
||||
* drivers/net/afd/include/afd.h (AFDFCB): Replace EventObjects with
|
||||
EventObject of type PKEVENT.
|
||||
* drivers/net/tcpip/makefile (ARCH_OBJECTS): New variable.
|
||||
(TARGET_OBJECTS): Add ARCH_OBJECTS.
|
||||
* drivers/net/tcpip/include/address.h (AddrCloneAddress): New prototype.
|
||||
* drivers/net/tcpip/include/checksum.h (ChecksumFold, csum_partial): New
|
||||
prototype.
|
||||
(TCPv4Checksum): New macro.
|
||||
(CorrectChecksum): Rename to IPv4CorrectChecksum.
|
||||
(TCPv4CorrectChecksum): New macro.
|
||||
* drivers/net/tcpip/include/ip.h (IPv4_DF_MASK): New constant.
|
||||
* drivers/net/tcpip/include/tcp.h (TCP_XXX): Correct constants.
|
||||
(TCPCreateSegment, TCPFreeSegment, TCPAddSegment): Prototype.
|
||||
* drivers/net/tcpip/include/titypes.h (TCP_SEND_REQUEST): Add SequenceNumber
|
||||
and AckNumber.
|
||||
(TCP_SEGMENT): New structure.
|
||||
(CONNECTION_ENDPOINT): Add ListenRequest and ReceivedSegments.
|
||||
* drivers/net/tcpip/network/transmit.c (SendFragments): Release memory
|
||||
for Data on failure.
|
||||
* drivers/net/tcpip/tcpip/address.c (AddrCloneAddress): New function.
|
||||
* drivers/net/tcpip/tcpip/checksum.c (ChecksumFold): Factor out folding
|
||||
from ChecksumCompute.
|
||||
* drivers/net/tcpip/tcpip/dispatch.c (DispTdiListen): Support asynchronous
|
||||
operation.
|
||||
* drivers/net/tcpip/tcpip/fileobjs.c (FileOpenAddress): Don't cast to
|
||||
PTDI_ADDRESS_IP.
|
||||
Initialize ReceivedSegments.
|
||||
* drivers/net/tcpip/tcpip/routines.c (DisplayIPHeader): New function.
|
||||
(DisplayIPPacket): Call DisplayIPHeader().
|
||||
(DisplayTCPHeader): Change format strings.
|
||||
* drivers/net/tcpip/transport/tcp/tcp.c (IPIdentification,
|
||||
TCPSegmentList): Add.
|
||||
(TCPCreateSegment, TCPFreeSegment, TCPAddSegment,
|
||||
TCPBuildAndTransmitSendRequest2, TCPiSelectISS, TCPiReceiveListen,
|
||||
TCPiReceiveSynSent, TCPiReceiveSynReceived, TCPiReceiveData): New
|
||||
function.
|
||||
(TCPiBuildPacket): Build segment.
|
||||
(TCPStartup): Initialize TCPSegmentList.
|
||||
(TCPShutdown): Cleanup TCPSegmentList.
|
||||
|
||||
2004-02-25 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* drivers/net/tcpip/datalink/loopback.c: Reformat.
|
||||
* drivers/net/tcpip/network/neighbor.c: Ditto.
|
||||
* drivers/net/tcpip/tcpip/info.c: Ditto.
|
||||
* drivers/net/tcpip/transport/datagram/datagram.c: Cleanup.
|
||||
If there is an out-of-resources situation, don't transmit the
|
||||
datagram out of order.
|
||||
|
||||
2004-02-23 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* tools/regtests.c (KMSTUB): Correct device name.
|
||||
|
||||
2004-02-22 Ge van Geldorp <ge@gse.nl>
|
||||
|
||||
* Implement keyboard navigation for menus
|
||||
* Implement system menus
|
||||
|
||||
2004-02-22 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* Makefile (all): Put REGTESTS dependency earlier in the list.
|
||||
* lib/kernel32/makefile: Support regression tests.
|
||||
* lib/kernel32/misc/dllmain.c: Prepare regression tests.
|
||||
* regtests/win32base/driver.c: (DummyThreadMain,
|
||||
RunPrivateTests): Add.
|
||||
(RegTestMain): Run private module regression tests.
|
||||
* tools/helper.mk: Add rtshared.a to MK_LIBS if building
|
||||
user-mode regression tests.
|
||||
* tools/regtests.c (UMSTUB): Add.
|
||||
(main): Output user-mode stub.
|
||||
* lib/kernel32/tests: New directory.
|
||||
* lib/kernel32/tests/.cvsignore: New file.
|
||||
* lib/kernel32/tests/Makefile: New file.
|
||||
* lib/kernel32/tests/tests: New directory.
|
||||
* lib/kernel32/tests/tests/.cvsignore: New file.
|
||||
* regtests/win32base/tests/file-1.c: move...
|
||||
* lib/kernel32/tests/tests/file-1.c: ...here.
|
||||
|
||||
2004-02-22 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* config (REGRESSIONTESTS): Add.
|
||||
* rules.mak (REGTESTS_PATH_INC): Add.
|
||||
* drivers/net/tcpip/makefile: Support regression tests.
|
||||
* drivers/net/tcpip/tcpip/main.c: Prepare regression tests.
|
||||
* hal/halx86/Makefile: Rename TARGET_LIBPATH to TARGET_IMPLIBPATH.
|
||||
* regtests/kmregtests/driver.c (KMRegTestsRegister): Add.
|
||||
(KMRegTestsRun): Move call to InitializeTests() and RegisterTests() to
|
||||
DriverEntry().
|
||||
(KMRegTestsDispatch): Support IOCTL_KMREGTESTS_REGISTER.
|
||||
* regtests/kmregtests/kmregtests.h (IOCTL_KMREGTESTS_REGISTER): Define.
|
||||
* tools/config.mk: Define REGTESTS if REGRESSIONTESTS = 1.
|
||||
* tools/helper.mk: Support module private regression tests.
|
||||
(TARGET_LIBPATH): Rename to TARGET_IMPLIBPATH.
|
||||
(TARGET_LIBPATH, TARGET_REGTESTS): Add.
|
||||
* tools/mkconfig.c: Support REGTESTS.
|
||||
* tools/regtests.c (umstubfile, kmstubfile): Add.
|
||||
(is_file_changed, write_file_if_changed): Add.
|
||||
(KMSTUB): Add.
|
||||
(HELP): Mention -u and -k switches.
|
||||
(main): Parse -u and -k switches.
|
||||
* drivers/net/tcpip/tests: New directory.
|
||||
* drivers/net/tcpip/tests/.cvsignore: New file.
|
||||
* drivers/net/tcpip/tests/Makefile: Makefile.
|
||||
* drivers/net/tcpip/tests/tests: New directory.
|
||||
* drivers/net/tcpip/tests/tests/.cvsignore: New file.
|
||||
|
||||
2004-02-18 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* apistatus.lst: Correct path of videoprt.dll.
|
||||
|
||||
2004-02-10 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* bootdata/packages/reactos.dff: Add oleaut32.dll.
|
||||
|
||||
2004-01-21 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* apistatus.lst: Rename tdi.dll to tdi.sys.
|
||||
|
||||
2004-01-18 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* tools/winebuild/spec32.c (BuildDef32File): Don't support private flag
|
||||
when cross-compiling.
|
||||
|
||||
2004-01-02 Steven Edwards <Steven_Ed4153@yahoo.com>
|
||||
* ntoskrnl/kd/dlog.c: Make /DEBUGPORT=FILE work. With the help
|
||||
of Filip Navara
|
||||
* ntoskrnl/ke/main.c: Ditto
|
||||
|
||||
2003-12-29 Steven Edwards <Steven_Ed4153@yahoo.com>
|
||||
* lib/version: Sync with Winehq 12-29-03
|
||||
|
||||
2003-12-25 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* apps/utils/net/roshttpd/error.cpp (ReportErrorStr): Cast to wchar_t*,
|
||||
not __wchar_t*.
|
||||
* apps/utils/net/roshttpd/makefile (TARGET_CPPFLAGS): Add -Wno-deprecated.
|
||||
(TARGET_GCCLIBS): Add stdc++.
|
||||
* apps/utils/net/roshttpd/common/socket.cpp: Include <string.h>.
|
||||
* apps/utils/net/roshttpd/common/thread.cpp (CThread::CThread): Fix
|
||||
warning.
|
||||
* drivers/net/afd/afd/afd.c (ListenRequestLookasideList): New variable.
|
||||
(DriverEntry): Initialize ListenRequestLookasideList.
|
||||
* drivers/net/afd/afd/dispatch.c (AfdDispCompleteListen): New function.
|
||||
(AfdDispListen): Partial implement.
|
||||
* drivers/net/afd/afd/opnclose.c (AfdInitializeFCB): Initialize
|
||||
NewFCB->ListenRequestQueue.
|
||||
(AfdKillListenRequests): New function.
|
||||
(AfdClose): Call AfdKillListenRequests.
|
||||
* drivers/net/afd/afd/routines.c (DumpName): New function.
|
||||
* drivers/net/afd/afd/tdi.c (TdiAddressSizeFromType): New function.
|
||||
(TdiBuildConnectionInfo): Initialize ConnInfo->OptionsLength.
|
||||
(TdiBuildNullConnectionInfo): New function.
|
||||
(TdiOpenAddressFileIPv4, TdiOpenConnectionEndpointFile): EaName is
|
||||
0-terminated.
|
||||
(TdiListen): New function.
|
||||
* drivers/net/afd/include/afd.h (AFDFCB): Add ListenRequestQueue.
|
||||
(AFD_LISTEN_REQUEST): New structure.
|
||||
(ListenRequestLookasideList): Declare.
|
||||
(DumpName, TdiListen): Add prototypes.
|
||||
* drivers/net/tcpip/datalink/lan.c (BindAdapter): Initialize
|
||||
AnsiAddress.Length and AnsiAddress.MaximumLength.
|
||||
* drivers/net/tcpip/include/debug.h: Define DEBUG_TCP.
|
||||
* drivers/net/tcpip/include/routines.h (DisplayTCPPacket): Add
|
||||
prototype.
|
||||
(DISPLAY_TCP_PACKET): Define.
|
||||
* drivers/net/tcpip/include/tcp.h (TCPListen): Add prototype.
|
||||
* drivers/net/tcpip/include/titypes.h (ADDRESS_FILE): Add Connection.
|
||||
* drivers/net/tcpip/network/ip.c (IPLocateNTEOnInterface): Cleanup.
|
||||
* drivers/net/tcpip/tcpip/address.c (AddrSearchNext): Port is in
|
||||
network byte order.
|
||||
* drivers/net/tcpip/tcpip/dispatch.c (DispTdiAssociateAddress):
|
||||
Initialize AddrFile->Connection.
|
||||
(DispTdiListen): Implement.
|
||||
* drivers/net/tcpip/tcpip/fileobjs.c (FileOpenAddress): Don't
|
||||
initialize AddrFile->Connections.
|
||||
* drivers/net/tcpip/tcpip/routines.c: Include <tcp.h>.
|
||||
(DisplayIPPacket): Enable.
|
||||
(DisplayTCPHeader, DisplayTCPPacket): New functions.
|
||||
* drivers/net/tcpip/transport/tcp/tcp.c: Include <routines.h>.
|
||||
(TCPListen, TCPiReceive): New functions.
|
||||
(TCPReceive): Partial implement.
|
||||
* lib/msafd/misc/helpers.c (CreateHelperDLLDatabase): Add
|
||||
{SOCK_STREAM,IPPROTO_TCP,0} and {SOCK_DGRAM,IPPROTO_UDP,0} mappings.
|
||||
* lib/ntdll/ldr/utils.c (LdrLoadDll): Print name of DLL if not found.
|
||||
* lib/ws2_32/include/ws2_32.h (Initialized): Declare.
|
||||
(WINSOCK_THREAD_BLOCK): Remove Initialized member.
|
||||
* (WSAINITIALIZED, WSASETINITIALIZED): Update.
|
||||
* lib/ws2_32/misc/catalog.c (CreateCatalog): Add
|
||||
{SOCK_STREAM,IPPROTO_TCP,0} and {SOCK_DGRAM,IPPROTO_UDP,0} mappings.
|
||||
(Initialized): New variable.
|
||||
(DllMain): Don't initialize p->Initialized.
|
||||
* ntoskrnl/dbg/kdb.c: Include <ctype.h>.
|
||||
* subsys/win32k/ntuser/message.c (NtUserDispatchMessage): Kill noisy
|
||||
message.
|
||||
|
||||
2003-12-10 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* tools/wine2ros: New directory.
|
||||
* tools/wine2ros/Makefile: New file.
|
||||
* tools/wine2ros/wine2ros.c: Ditto.
|
||||
* tools/Makefile (wine2ros_target): Add.
|
||||
* rules.mak (WINE2ROS): Define.
|
||||
|
||||
2003-12-10 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
Changes for compiling with w32api/Wine
|
||||
|
||||
* include/basetsd.h: #include_next <basetsd.h>. Add definitions missing
|
||||
in w32api.
|
||||
* include/mmddk.h: #include_next <mmddk.h>. Add definitions missing in
|
||||
w32api.
|
||||
* include/wine/winternl.h (DbgPrint): Use ReactOS prototype to avoid
|
||||
conflicts.
|
||||
|
||||
2003-12-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* rules.mak (WINEBUILD): Define.
|
||||
* tools/winebuild/Makefile: New file.
|
||||
* tools/winebuild/import.c (ldcombine_files): Replace mkstemps with Win32
|
||||
APIs.
|
||||
* tools/winebuild/main.c (main): Win16 specs and relays are not supported.
|
||||
* tools/winebuild/spec32.c (EXCEPTION_WINE_STUB, EH_NONCONTINUABLE):
|
||||
Define.
|
||||
(BuildDef32File): Don't emit PRIVATE.
|
||||
|
||||
2003-12-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* tools/winebuild: Import winebuild from Wine (D20031208).
|
||||
|
||||
2003-12-08 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* include/win32k/text.h (NtGdiExtTextOut): Follow ExtTextOut prototype.
|
||||
* lib/gdi32/objects/text.c (ExtTextOutW): Call NtGdiExtTextOut().
|
||||
* lib/user32/controls/edit.c (EDIT_BuildLineDefs_ML): Order parameters to
|
||||
CreateRectRgn().
|
||||
* lib/user32/windows/draw.c (TabbedTextOutA): Implement.
|
||||
(TEXT_TabbedTextOut): New function.
|
||||
(TabbedTextOutW): Implement.
|
||||
* subsys/win32k/objects/text.c (NtGdiExtTextOut): Call NtGdiTextOut() for
|
||||
now.
|
||||
|
||||
2003-12-07 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* lib/user32/windows/accel.c (U32IsValidAccelMessage): Translate WM_KEYUP
|
||||
and WM_SYSKEYUP messages.
|
||||
(TranslateAcceleratorA): Returntype of RtlMultiByteToUnicodeN is NTSTATUS,
|
||||
so interpret it as such.
|
||||
* subsys/win32k/ntuser/accelerator.c (NtUserDestroyAcceleratorTable):
|
||||
Call ObmCloseHandle() before destroying the object.
|
||||
(IntTranslateAccelerator): New function.
|
||||
(NtUserTranslateAccelerator): Partial implementation.
|
||||
|
||||
2003-12-07 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* subsys/win32k/include/accelerator.h: New file.
|
||||
* subsys/win32k/ntuser/accelerator.c: Ditto.
|
||||
* include/win32k/ntuser.h (NtUserDestroyAcceleratorTable): Make returntype
|
||||
BOOLEAN.
|
||||
* subsys/win32k/makefile (NTUSER_OBJECTS): Add ntuser/accelerator.o.
|
||||
* subsys/win32k/include/object.h (USER_OBJECT_TYPE): Add otAcceleratorTable.
|
||||
* subsys/win32k/main/dllmain.c (DllMain): Call InitAcceleratorImpl().
|
||||
* subsys/win32k/ntuser/stubs.c (NtUserCopyAcceleratorTable,
|
||||
NtUserCreateAcceleratorTable, NtUserDestroyAcceleratorTable,
|
||||
NtUserTranslateAccelerator): Move to accelerator.c.
|
||||
|
||||
2003-12-07 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* apps/tests/accelerator: New directory.
|
||||
* apps/tests/accelerator/accelerator.c: New file.
|
||||
* apps/tests/accelerator/.cvsignore: Ditto.
|
||||
* apps/tests/accelerator/Makefile: Ditto.
|
||||
* apps/tests/Makefile (TEST_APPS): Add accelerator.
|
||||
|
||||
2003-12-07 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* regtests/Makefile: Generate regression test registrations.
|
||||
* regtests/kmregtests/.cvsignore: Ignore Makefile.tests.
|
||||
* regtests/win32base/.cvsignore: Ditto.
|
||||
* regtests/kmregtests/Makefile: Include Makefile.tests.
|
||||
* regtests/win32base/Makefile: Ditto.
|
||||
* regtests/kmregtests/tests: New directory.
|
||||
* regtests/win32base/tests: Ditto.
|
||||
* regtests/kmregtests/tests/.cvsignore: New file.
|
||||
* regtests/win32base/tests/.cvsignore: Ditto.
|
||||
* tools/helper.mk: Remove TARGET_GENREGTESTS.
|
||||
* tools/regtests.c: Generate makefile for regression tests.
|
||||
(change_extension): New function.
|
||||
* regtests/win32base/file-1.c: Move ...
|
||||
* regtests/win32base/tests/file-1.c: ... here.
|
||||
|
||||
2003-12-06 Martin Fuchs <martin-fuchs@gmx.net>
|
||||
* Doxyfile, Makefile: initial doxygen configuration
|
||||
* drivers/Doxyfile, drivers/Makefile: Ditto.
|
||||
* ntoskrnl/Doxyfile, ntoskrnl/Makefile: Ditto.
|
||||
* subsys/win32k/Doxyfile, subsys/win32k/Makefile: Ditto.
|
||||
* apps/Doxyfile, apps/Makefile: Ditto.
|
||||
|
||||
2003-11-29 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* tools/cabman/dfp.cxx (CDFParser::Parse): Allow TokenString.
|
||||
(CDFParser::PerformFileCopy): Use CurrentChar instead of length of
|
||||
CurrentString to find the start of the next token.
|
||||
|
||||
2003-11-08 Martin Fuchs <martin-fuchs@gmx.net>
|
||||
|
||||
* controls/button.c partial fix for for Bug #42:
|
||||
activate Ansi window procedures for standard controls
|
||||
* controls/combo.c Ditto.
|
||||
* controls/edit.c Ditto.
|
||||
* controls/icontitle.c Ditto.
|
||||
* controls/listbox.c Ditto.
|
||||
* controls/static.c Ditto.
|
||||
* windows/dialog.c Ditto.
|
||||
* windows/mdi.c Ditto.
|
||||
* windows/menu.c Ditto.
|
||||
* windows/defwnd.c Fixed WM_GETTEXT error handling in DefWindowProcW().
|
||||
|
||||
2003-10-06 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* Makefile: New target uboot for simple unattended setup.
|
||||
@@ -3195,3 +2823,12 @@
|
||||
|
||||
* Disabled broken code in kernel32.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
211
reactos/Doxyfile
211
reactos/Doxyfile
@@ -1,211 +0,0 @@
|
||||
# Doxyfile 1.3.5
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
PROJECT_NAME = ReactOS
|
||||
PROJECT_NUMBER =
|
||||
OUTPUT_DIRECTORY = doxy-doc
|
||||
OUTPUT_LANGUAGE = English
|
||||
USE_WINDOWS_ENCODING = YES
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
REPEAT_BRIEF = YES
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
INLINE_INHERITED_MEMB = NO
|
||||
FULL_PATH_NAMES = YES
|
||||
STRIP_FROM_PATH = .
|
||||
SHORT_NAMES = NO
|
||||
JAVADOC_AUTOBRIEF = YES
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
DETAILS_AT_TOP = NO
|
||||
INHERIT_DOCS = NO
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
TAB_SIZE = 8
|
||||
ALIASES =
|
||||
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
SUBGROUPING = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Build related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
EXTRACT_ALL = YES
|
||||
EXTRACT_PRIVATE = YES
|
||||
EXTRACT_STATIC = YES
|
||||
EXTRACT_LOCAL_CLASSES = YES
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
HIDE_IN_BODY_DOCS = NO
|
||||
INTERNAL_DOCS = YES
|
||||
CASE_SENSE_NAMES = YES
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
SHOW_INCLUDE_FILES = YES
|
||||
INLINE_INFO = YES
|
||||
SORT_MEMBER_DOCS = YES
|
||||
GENERATE_TODOLIST = YES
|
||||
GENERATE_TESTLIST = YES
|
||||
GENERATE_BUGLIST = YES
|
||||
GENERATE_DEPRECATEDLIST= YES
|
||||
ENABLED_SECTIONS =
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
SHOW_USED_FILES = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
QUIET = NO
|
||||
WARNINGS = NO
|
||||
WARN_IF_UNDOCUMENTED = NO
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
WARN_LOGFILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
INPUT = hal \
|
||||
subsys \
|
||||
services \
|
||||
regtests \
|
||||
iface
|
||||
FILE_PATTERNS = *.c \
|
||||
*.h
|
||||
RECURSIVE = YES
|
||||
EXCLUDE = subsys/win32k \
|
||||
subsys/system/explorer
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXCLUDE_PATTERNS =
|
||||
EXAMPLE_PATH =
|
||||
EXAMPLE_PATTERNS =
|
||||
EXAMPLE_RECURSIVE = YES
|
||||
IMAGE_PATH =
|
||||
INPUT_FILTER =
|
||||
FILTER_SOURCE_FILES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to source browsing
|
||||
#---------------------------------------------------------------------------
|
||||
SOURCE_BROWSER = YES
|
||||
INLINE_SOURCES = YES
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
REFERENCED_BY_RELATION = YES
|
||||
REFERENCES_RELATION = YES
|
||||
VERBATIM_HEADERS = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
ALPHABETICAL_INDEX = YES
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
IGNORE_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_HTML = YES
|
||||
HTML_OUTPUT = html
|
||||
HTML_FILE_EXTENSION = .html
|
||||
HTML_HEADER =
|
||||
HTML_FOOTER =
|
||||
HTML_STYLESHEET =
|
||||
HTML_ALIGN_MEMBERS = YES
|
||||
GENERATE_HTMLHELP = NO
|
||||
CHM_FILE =
|
||||
HHC_LOCATION =
|
||||
GENERATE_CHI = NO
|
||||
BINARY_TOC = NO
|
||||
TOC_EXPAND = NO
|
||||
DISABLE_INDEX = NO
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
GENERATE_TREEVIEW = YES
|
||||
TREEVIEW_WIDTH = 250
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_LATEX = NO
|
||||
LATEX_OUTPUT = latex
|
||||
LATEX_CMD_NAME = latex
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
COMPACT_LATEX = NO
|
||||
PAPER_TYPE = a4wide
|
||||
EXTRA_PACKAGES =
|
||||
LATEX_HEADER =
|
||||
PDF_HYPERLINKS = NO
|
||||
USE_PDFLATEX = NO
|
||||
LATEX_BATCHMODE = NO
|
||||
LATEX_HIDE_INDICES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_RTF = NO
|
||||
RTF_OUTPUT = rtf
|
||||
COMPACT_RTF = YES
|
||||
RTF_HYPERLINKS = YES
|
||||
RTF_STYLESHEET_FILE =
|
||||
RTF_EXTENSIONS_FILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_MAN = NO
|
||||
MAN_OUTPUT = man
|
||||
MAN_EXTENSION = .3
|
||||
MAN_LINKS = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the XML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_XML = NO
|
||||
XML_OUTPUT = xml
|
||||
XML_SCHEMA =
|
||||
XML_DTD =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options for the AutoGen Definitions output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the Perl module output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_PERLMOD = NO
|
||||
PERLMOD_LATEX = NO
|
||||
PERLMOD_PRETTY = YES
|
||||
PERLMOD_MAKEVAR_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
ENABLE_PREPROCESSING = NO
|
||||
MACRO_EXPANSION = NO
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
SEARCH_INCLUDES = YES
|
||||
INCLUDE_PATH = include
|
||||
INCLUDE_FILE_PATTERNS = *.h
|
||||
PREDEFINED =
|
||||
EXPAND_AS_DEFINED =
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::addtions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
TAGFILES =
|
||||
GENERATE_TAGFILE =
|
||||
ALLEXTERNALS = NO
|
||||
EXTERNAL_GROUPS = YES
|
||||
PERL_PATH = /usr/bin/perl
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
CLASS_DIAGRAMS = YES
|
||||
HIDE_UNDOC_RELATIONS = NO
|
||||
HAVE_DOT = YES
|
||||
CLASS_GRAPH = YES
|
||||
COLLABORATION_GRAPH = YES
|
||||
UML_LOOK = NO
|
||||
TEMPLATE_RELATIONS = NO
|
||||
INCLUDE_GRAPH = YES
|
||||
INCLUDED_BY_GRAPH = YES
|
||||
CALL_GRAPH = YES
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
DOT_IMAGE_FORMAT = png
|
||||
DOT_PATH =
|
||||
DOTFILE_DIRS =
|
||||
MAX_DOT_GRAPH_WIDTH = 1024
|
||||
MAX_DOT_GRAPH_HEIGHT = 1024
|
||||
MAX_DOT_GRAPH_DEPTH = 0
|
||||
GENERATE_LEGEND = YES
|
||||
DOT_CLEANUP = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::addtions related to the search engine
|
||||
#---------------------------------------------------------------------------
|
||||
SEARCHENGINE = YES
|
352
reactos/Makefile
352
reactos/Makefile
@@ -1,4 +1,4 @@
|
||||
# $Id: Makefile,v 1.231 2004/06/15 22:33:45 gvg Exp $
|
||||
# $Id: Makefile,v 1.177 2003/11/01 13:28:53 navaraf Exp $
|
||||
#
|
||||
# Global makefile
|
||||
#
|
||||
@@ -32,23 +32,18 @@ BUS = acpi isapnp pci
|
||||
LIB_FSLIB = vfatlib
|
||||
|
||||
# Static libraries
|
||||
LIB_STATIC = string rosrtl epsapi uuid libwine zlib rtl tgetopt
|
||||
LIB_STATIC = string rosrtl epsapi zlib
|
||||
|
||||
# Keyboard layout libraries
|
||||
DLLS_KBD = kbddv kbdfr kbdgr kbdse kbduk kbdus
|
||||
|
||||
# Control Panels
|
||||
DLLS_CPL = cpl
|
||||
DLLS_KBD = kbdus kbdgr kbdfr
|
||||
|
||||
# User mode libraries
|
||||
# advapi32 cards crtdll comdlg32 fmifs gdi32 imagehlp kernel32 libpcap packet msafd msvcrt ntdll
|
||||
# advapi32 cards crtdll fmifs gdi32 kernel32 libpcap packet msafd msvcrt ntdll
|
||||
# epsapi psapi richedit rpcrt4 secur32 user32 version ws2help ws2_32 wsock32 wshirda mswsock
|
||||
# imagehlp imm32
|
||||
DLLS = advapi32 cabinet cards comctl32 crtdll comdlg32 d3d8thk expat fmifs freetype gdi32 \
|
||||
imm32 iphlpapi kernel32 lzexpand mpr msafd msgina msimg32 msvcrt msvcrt20 mswsock \
|
||||
netapi32 ntdll ole32 oleaut32 oledlg packet psapi richedit rpcrt4 samlib secur32 \
|
||||
setupapi shell32 shlwapi snmpapi syssetup twain unicode user32 userenv version wininet \
|
||||
winmm winspool ws2help ws2_32 wsock32 wshirda imagehlp $(DLLS_KBD) $(DLLS_CPL)
|
||||
DLLS = advapi32 cards crtdll fmifs freetype gdi32 kernel32 packet lzexpand msafd \
|
||||
msvcrt ntdll psapi richedit secur32 syssetup twain user32 version winedbgc \
|
||||
winspool ws2help ws2_32 wsock32 wshirda iphlpapi mswsock msimg32 d3d8thk \
|
||||
$(DLLS_KBD)
|
||||
|
||||
SUBSYS = smss win32k csrss ntvdm
|
||||
|
||||
@@ -63,13 +58,13 @@ SERVERS = win32
|
||||
LOADERS = dos
|
||||
|
||||
# Driver support libraries
|
||||
#bzip2 zlib oskittcp
|
||||
DRIVERS_LIB = bzip2 oskittcp csq
|
||||
#bzip2 zlib
|
||||
DRIVERS_LIB = bzip2
|
||||
|
||||
# Kernel mode device drivers
|
||||
# Obsolete: ide
|
||||
# beep blue floppy null parallel ramdrv serenum serial
|
||||
DEVICE_DRIVERS = beep blue debugout null serial bootvid
|
||||
# beep blue floppy null parallel ramdrv serenum serial vga videoprt
|
||||
DEVICE_DRIVERS = beep blue debugout floppy null serial vga videoprt bootvid
|
||||
|
||||
# Kernel mode input drivers
|
||||
INPUT_DRIVERS = keyboard mouclass psaux sermouse
|
||||
@@ -88,11 +83,11 @@ NET_DEVICE_DRIVERS = ne2000 pcnet
|
||||
|
||||
# Kernel mode storage drivers
|
||||
# atapi cdrom class2 disk scsiport
|
||||
STORAGE_DRIVERS = atapi cdrom class2 disk floppy scsiport diskdump
|
||||
STORAGE_DRIVERS = atapi cdrom class2 disk scsiport diskdump
|
||||
|
||||
# System applications
|
||||
# autochk cmd format services setup usetup welcome winlogon
|
||||
SYS_APPS = autochk cmd explorer format services setup taskmgr userinit usetup welcome vmwinst winlogon regedit
|
||||
# autochk cmd format gstart services setup usetup welcome winlogon
|
||||
SYS_APPS = autochk cmd format gstart services setup usetup welcome winlogon
|
||||
|
||||
# System services
|
||||
# rpcss eventlog
|
||||
@@ -101,9 +96,9 @@ SYS_SVC = rpcss eventlog
|
||||
APPS = tests testsets utils
|
||||
|
||||
|
||||
# External modules and (sub)systems for ReactOS
|
||||
# rosapps posix os2 (requires c++) java (non-existant)
|
||||
EXTERNALS = rosapps
|
||||
# External (sub)systems for ReactOS
|
||||
# rosapps wine posix os2 (requires c++) java (non-existant)
|
||||
EXTERNALS = rosapps wine posix os2
|
||||
|
||||
ifeq ($(ROS_BUILD_EXT),yes)
|
||||
EXT_MODULES = $(EXTERNALS)
|
||||
@@ -112,14 +107,14 @@ EXT_MODULES =
|
||||
endif
|
||||
|
||||
KERNEL_DRIVERS = $(DRIVERS_LIB) $(DEVICE_DRIVERS) $(INPUT_DRIVERS) $(FS_DRIVERS) \
|
||||
$(NET_DRIVERS) $(NET_DEVICE_DRIVERS) $(STORAGE_DRIVERS) VIDEO_DRIVERS
|
||||
$(NET_DRIVERS) $(NET_DEVICE_DRIVERS) $(STORAGE_DRIVERS)
|
||||
|
||||
# Regression tests
|
||||
REGTESTS = regtests
|
||||
|
||||
all: tools dk implib $(LIB_STATIC) $(COMPONENTS) $(REGTESTS) $(HALS) $(BUS) $(LIB_FSLIB) $(DLLS) $(SUBSYS) \
|
||||
all: tools dk implib $(LIB_STATIC) $(COMPONENTS) $(HALS) $(BUS) $(LIB_FSLIB) $(DLLS) $(SUBSYS) \
|
||||
$(LOADERS) $(KERNEL_DRIVERS) $(SYS_APPS) $(SYS_SVC) \
|
||||
$(APPS) $(EXT_MODULES)
|
||||
$(APPS) $(EXT_MODULES) $(REGTESTS)
|
||||
|
||||
#config: $(TOOLS:%=%_config)
|
||||
|
||||
@@ -127,9 +122,10 @@ depends: $(LIB_STATIC:%=%_depends) $(LIB_FSLIB:%=%_depends) $(DLLS:%=%_depends)
|
||||
$(EXT_MODULES:%=%_depends) $(POSIX_LIBS:%=%_depends)
|
||||
|
||||
implib: $(COMPONENTS:%=%_implib) $(HALS:%=%_implib) $(BUS:%=%_implib) \
|
||||
$(LIB_STATIC:%=%_implib) $(LIB_FSLIB:%=%_implib) $(DLLS:%=%_implib) $(LOADERS:%=%_implib) \
|
||||
$(KERNEL_DRIVERS:%=%_implib) $(SUBSYS:%=%_implib) \
|
||||
$(SYS_SVC:%=%_implib) $(EXT_MODULES:%=%_implib)
|
||||
$(LIB_STATIC:%=%_implib) $(LIB_FSLIB:%=%_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) \
|
||||
@@ -142,20 +138,26 @@ clean: tools dk_clean $(HALS:%=%_clean) \
|
||||
clean_after:
|
||||
$(RM) $(PATH_TO_TOP)/include/roscfg.h
|
||||
|
||||
fastinstall: tools install_dirs install_before \
|
||||
install: tools install_dirs install_before \
|
||||
$(COMPONENTS:%=%_install) $(HALS:%=%_install) $(BUS:%=%_install) \
|
||||
$(LIB_STATIC:%=%_install) $(LIB_FSLIB:%=%_install) $(DLLS:%=%_install) $(LOADERS:%=%_install) \
|
||||
$(KERNEL_DRIVERS:%=%_install) $(SUBSYS:%=%_install) \
|
||||
$(SYS_APPS:%=%_install) $(SYS_SVC:%=%_install) \
|
||||
$(APPS:%=%_install) $(EXT_MODULES:%=%_install) $(REGTESTS:%=%_install)
|
||||
install: fastinstall registry
|
||||
|
||||
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) \
|
||||
$(SYS_APPS:%=%_dist) $(SYS_SVC:%=%_dist) \
|
||||
$(NET_APPS:%=%_dist) \
|
||||
$(APPS:%=%_dist) $(EXT_MODULES:%=%_dist)
|
||||
|
||||
FREELDR_DIR = ../freeldr
|
||||
|
||||
freeldr:
|
||||
$(MAKE) -C $(FREELDR_DIR)
|
||||
|
||||
bootcd_directory_layout:
|
||||
bootcd_directory_layout: freeldr
|
||||
$(RMKDIR) $(BOOTCD_DIR)
|
||||
$(RMKDIR) $(BOOTCD_DIR)/bootdisk
|
||||
$(RMKDIR) $(BOOTCD_DIR)/loader
|
||||
@@ -183,12 +185,11 @@ bootcd_install_before:
|
||||
$(RLINE) bootdata/hivesys.inf $(BOOTCD_DIR)/reactos/hivesys.inf
|
||||
$(RLINE) bootdata/txtsetup.sif $(BOOTCD_DIR)/reactos/txtsetup.sif
|
||||
$(CP) bootdata/icon.ico $(BOOTCD_DIR)/icon.ico
|
||||
$(CP) subsys/system/welcome/welcome.exe $(BOOTCD_DIR)/reactos/welcome.exe
|
||||
$(CP) media/nls/c_1252.nls $(BOOTCD_DIR)/reactos/c_1252.nls
|
||||
$(CP) media/nls/c_437.nls $(BOOTCD_DIR)/reactos/c_437.nls
|
||||
$(CP) media/nls/l_intl.nls $(BOOTCD_DIR)/reactos/l_intl.nls
|
||||
|
||||
bootcd_basic: bootcd_directory_layout bootcd_bootstrap_files bootcd_install_before
|
||||
bootcd_basic: all bootcd_directory_layout bootcd_bootstrap_files bootcd_install_before
|
||||
|
||||
bootcd_makecd:
|
||||
$(CABMAN) /C bootdata/packages/reactos.dff /L $(BOOTCD_DIR)/reactos /I
|
||||
@@ -199,38 +200,14 @@ bootcd_makecd:
|
||||
ubootcd_unattend:
|
||||
$(CP) bootdata/unattend.inf $(BOOTCD_DIR)/reactos/unattend.inf
|
||||
|
||||
livecd_directory_layout:
|
||||
$(RMKDIR) $(LIVECD_DIR)
|
||||
$(RMKDIR) $(LIVECD_DIR)/loader
|
||||
$(RMKDIR) $(LIVECD_DIR)/reactos
|
||||
$(RMKDIR) $(LIVECD_DIR)/Profiles/All\ Users/Desktop
|
||||
$(RMKDIR) $(LIVECD_DIR)/Profiles/Default\ User/Desktop
|
||||
$(RMKDIR) $(LIVECD_DIR)/Profiles/Default\ User/My\ Documents
|
||||
$(CP) ${FREELDR_DIR}/bootsect/isoboot.bin ${LIVECD_DIR}/../isoboot.bin
|
||||
$(CP) ${FREELDR_DIR}/freeldr/obj/i386/freeldr.sys ${LIVECD_DIR}/loader/setupldr.sys
|
||||
$(RLINE) bootdata/livecd.ini $(LIVECD_DIR)/freeldr.ini
|
||||
|
||||
livecd_bootstrap_files:
|
||||
$(MAKE) LIVECD_INSTALL=yes fastinstall
|
||||
|
||||
livecd_install_before:
|
||||
$(TOOLS_PATH)/mkhive/mkhive$(EXE_POSTFIX) bootdata $(LIVECD_DIR)/reactos/system32/config bootdata/livecd.inf bootdata/hiveinst.inf
|
||||
|
||||
livecd_basic: livecd_directory_layout livecd_bootstrap_files livecd_install_before
|
||||
|
||||
livecd_makecd:
|
||||
$(TOOLS_PATH)/cdmake/cdmake -m -j -b $(LIVECD_DIR)/../isoboot.bin $(LIVECD_DIR) REACTOS roslive.iso
|
||||
|
||||
bootcd: bootcd_basic bootcd_makecd
|
||||
|
||||
ubootcd: bootcd_basic ubootcd_unattend bootcd_makecd
|
||||
|
||||
livecd: livecd_basic livecd_makecd
|
||||
|
||||
registry: tools
|
||||
$(TOOLS_PATH)/mkhive/mkhive$(EXE_POSTFIX) bootdata $(INSTALL_DIR)/system32/config bootdata/hiveinst.inf
|
||||
$(TOOLS_PATH)/mkhive/mkhive$(EXE_POSTFIX) bootdata $(INSTALL_DIR)/system32/config
|
||||
|
||||
.PHONY: all depends implib clean clean_before install freeldr bootcd_directory_layout \
|
||||
.PHONY: all depends implib clean clean_before install dist freeldr bootcd_directory_layout \
|
||||
bootcd_bootstrap_files bootcd_install_before bootcd_basic bootcd_makecd ubootcd_unattend bootcd
|
||||
|
||||
|
||||
@@ -246,13 +223,16 @@ $(SYS_APPS:%=%_implib): %_implib:
|
||||
$(SYS_APPS:%=%_clean): %_clean:
|
||||
$(MAKE) -C subsys/system/$* clean
|
||||
|
||||
$(SYS_APPS:%=%_dist): %_dist:
|
||||
$(MAKE) -C subsys/system/$* dist
|
||||
|
||||
$(SYS_APPS:%=%_install): %_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:%=%_bootcd)
|
||||
.PHONY: $(SYS_APPS) $(SYS_APPS:%=%_implib) $(SYS_APPS:%=%_clean) $(SYS_APPS:%=%_install) $(SYS_APPS:%=%_dist) $(SYS_APPS:%=%_bootcd)
|
||||
|
||||
#
|
||||
# System Services
|
||||
@@ -269,10 +249,13 @@ $(SYS_SVC:%=%_implib): %_implib:
|
||||
$(SYS_SVC:%=%_clean): %_clean:
|
||||
$(MAKE) -C services/$* clean
|
||||
|
||||
$(SYS_SVC:%=%_dist): %_dist:
|
||||
$(MAKE) -C services/$* dist
|
||||
|
||||
$(SYS_SVC:%=%_install): %_install:
|
||||
$(MAKE) -C services/$* install
|
||||
|
||||
.PHONY: $(SYS_SVC) $(SYS_SVC:%=%_depends) $(SYS_SVC:%=%_implib) $(SYS_SVC:%=%_clean) $(SYS_SVC:%=%_install)
|
||||
.PHONY: $(SYS_SVC) $(SYS_SVC:%=%_depends) $(SYS_SVC:%=%_implib) $(SYS_SVC:%=%_clean) $(SYS_SVC:%=%_install) $(SYS_SVC:%=%_dist)
|
||||
|
||||
|
||||
#
|
||||
@@ -284,17 +267,19 @@ $(SYS_SVC:%=%_install): %_install:
|
||||
$(APPS): %:
|
||||
$(MAKE) -C apps/$*
|
||||
|
||||
# Not needed
|
||||
# $(APPS:%=%_implib): %_implib:
|
||||
# $(MAKE) -C apps/$* implib
|
||||
$(APPS:%=%_implib): %_implib:
|
||||
$(MAKE) -C apps/$* implib
|
||||
|
||||
$(APPS:%=%_clean): %_clean:
|
||||
$(MAKE) -C apps/$* clean
|
||||
|
||||
$(APPS:%=%_dist): %_dist:
|
||||
$(MAKE) -C apps/$* dist
|
||||
|
||||
$(APPS:%=%_install): %_install:
|
||||
$(MAKE) -C apps/$* install
|
||||
|
||||
.PHONY: $(APPS) $(APPS:%=%_implib) $(APPS:%=%_clean) $(APPS:%=%_install)
|
||||
.PHONY: $(APPS) $(APPS:%=%_implib) $(APPS:%=%_clean) $(APPS:%=%_install) $(APPS:%=%_dist)
|
||||
|
||||
|
||||
#
|
||||
@@ -312,10 +297,13 @@ $(EXTERNALS:%=%_implib): %_implib:
|
||||
$(EXTERNALS:%=%_clean): %_clean:
|
||||
$(MAKE) -C $(ROOT_PATH)/$* clean
|
||||
|
||||
$(EXTERNALS:%=%_dist): %_dist:
|
||||
$(MAKE) -C $(ROOT_PATH)/$* dist
|
||||
|
||||
$(EXTERNALS:%=%_install): %_install:
|
||||
$(MAKE) -C $(ROOT_PATH)/$* install
|
||||
|
||||
.PHONY: $(EXTERNALS) $(EXTERNALS:%=%_depends) $(EXTERNALS:%=%_implib) $(EXTERNALS:%=%_clean) $(EXTERNALS:%=%_install)
|
||||
.PHONY: $(EXTERNALS) $(EXTERNALS:%=%_depends) $(EXTERNALS:%=%_implib) $(EXTERNALS:%=%_clean) $(EXTERNALS:%=%_install) $(EXTERNALS:%=%_dist)
|
||||
|
||||
|
||||
#
|
||||
@@ -331,7 +319,9 @@ tools_clean:
|
||||
|
||||
tools_install:
|
||||
|
||||
.PHONY: tools tools_implib tools_clean tools_install
|
||||
tools_dist:
|
||||
|
||||
.PHONY: tools tools_implib tools_clean tools_install tools_dist
|
||||
|
||||
|
||||
#
|
||||
@@ -369,7 +359,9 @@ dk_clean:
|
||||
|
||||
dk_install:
|
||||
|
||||
.PHONY: dk dk_implib dk_clean dk_install
|
||||
dk_dist:
|
||||
|
||||
.PHONY: dk dk_implib dk_clean dk_install dk_dist
|
||||
|
||||
|
||||
#
|
||||
@@ -385,6 +377,8 @@ iface_native_clean:
|
||||
|
||||
iface_native_install:
|
||||
|
||||
iface_native_dist:
|
||||
|
||||
iface_native_bootcd:
|
||||
|
||||
iface_additional:
|
||||
@@ -397,13 +391,14 @@ iface_additional_clean:
|
||||
|
||||
iface_additional_install:
|
||||
|
||||
iface_additional_dist:
|
||||
|
||||
iface_additional_bootcd:
|
||||
|
||||
.PHONY: iface_native iface_native_implib iface_native_clean iface_native_install \
|
||||
iface_native_bootcd \
|
||||
iface_native_dist iface_native_bootcd \
|
||||
iface_additional iface_additional_implib iface_additional_clean \
|
||||
iface_additional_install iface_additional_bootcd
|
||||
|
||||
iface_additional_install iface_additional_dist iface_additional_bootcd
|
||||
|
||||
#
|
||||
# Bus driver rules
|
||||
@@ -420,12 +415,14 @@ $(BUS:%=%_clean): %_clean:
|
||||
$(BUS:%=%_install): %_install:
|
||||
$(MAKE) -C drivers/bus/$* install
|
||||
|
||||
$(BUS:%=%_dist): %_dist:
|
||||
$(MAKE) -C drivers/bus/$* dist
|
||||
|
||||
$(BUS:%=%_bootcd): %_bootcd:
|
||||
$(MAKE) -C drivers/bus/$* bootcd
|
||||
|
||||
.PHONY: $(BUS) $(BUS:%=%_implib) $(BUS:%=%_clean) \
|
||||
$(BUS:%=%_install) $(BUS:%=%_bootcd)
|
||||
|
||||
$(BUS:%=%_install) $(BUS:%=%_dist) $(BUS:%=%_bootcd)
|
||||
|
||||
#
|
||||
# Driver support libraries rules
|
||||
@@ -442,12 +439,14 @@ $(DRIVERS_LIB:%=%_clean): %_clean:
|
||||
$(DRIVERS_LIB:%=%_install): %_install:
|
||||
$(MAKE) -C drivers/lib/$* install
|
||||
|
||||
$(DRIVERS_LIB:%=%_dist): %_dist:
|
||||
$(MAKE) -C drivers/lib/$* dist
|
||||
|
||||
$(DRIVERS_LIB:%=%_bootcd): %_bootcd:
|
||||
$(MAKE) -C drivers/lib/$* bootcd
|
||||
|
||||
.PHONY: $(DRIVERS_LIB) $(DRIVERS_LIB:%=%_implib) $(DRIVERS_LIB:%=%_clean) \
|
||||
$(DRIVERS_LIB:%=%_install) $(DRIVERS_LIB:%=%_bootcd)
|
||||
|
||||
$(DRIVERS_LIB:%=%_install) $(DRIVERS_LIB:%=%_dist) $(DRIVERS_LIB:%=%_bootcd)
|
||||
|
||||
#
|
||||
# Device driver rules
|
||||
@@ -464,34 +463,14 @@ $(DEVICE_DRIVERS:%=%_clean): %_clean:
|
||||
$(DEVICE_DRIVERS:%=%_install): %_install:
|
||||
$(MAKE) -C drivers/dd/$* install
|
||||
|
||||
$(DEVICE_DRIVERS:%=%_dist): %_dist:
|
||||
$(MAKE) -C drivers/dd/$* dist
|
||||
|
||||
$(DEVICE_DRIVERS:%=%_bootcd): %_bootcd:
|
||||
$(MAKE) -C drivers/dd/$* bootcd
|
||||
|
||||
.PHONY: $(DEVICE_DRIVERS) $(DEVICE_DRIVERS:%=%_implib) $(DEVICE_DRIVERS:%=%_clean) \
|
||||
$(DEVICE_DRIVERS:%=%_install) $(DEVICE_DRIVERS:%=%_bootcd)
|
||||
|
||||
|
||||
#
|
||||
# Video device driver rules
|
||||
#
|
||||
VIDEO_DRIVERS:
|
||||
$(MAKE) -C drivers/video
|
||||
|
||||
VIDEO_DRIVERS_implib:
|
||||
$(MAKE) -C drivers/video implib
|
||||
|
||||
VIDEO_DRIVERS_clean:
|
||||
$(MAKE) -C drivers/video clean
|
||||
|
||||
VIDEO_DRIVERS_install:
|
||||
$(MAKE) -C drivers/video install
|
||||
|
||||
VIDEO_DRIVERS_bootcd:
|
||||
$(MAKE) -C drivers/video bootcd
|
||||
|
||||
.PHONY: VIDEO_DRIVERS VIDEO_DRIVERS_implib VIDEO_DRIVERS_clean \
|
||||
VIDEO_DRIVERS_install VIDEO_DRIVERS_bootcd
|
||||
|
||||
$(DEVICE_DRIVERS:%=%_install) $(DEVICE_DRIVERS:%=%_dist) $(DEVICE_DRIVERS:%=%_bootcd)
|
||||
|
||||
#
|
||||
# Input driver rules
|
||||
@@ -508,15 +487,15 @@ $(INPUT_DRIVERS:%=%_clean): %_clean:
|
||||
$(INPUT_DRIVERS:%=%_install): %_install:
|
||||
$(MAKE) -C drivers/input/$* install
|
||||
|
||||
$(INPUT_DRIVERS:%=%_dist): %_dist:
|
||||
$(MAKE) -C drivers/input/$* dist
|
||||
|
||||
$(INPUT_DRIVERS:%=%_bootcd): %_bootcd:
|
||||
$(MAKE) -C drivers/input/$* bootcd
|
||||
|
||||
.PHONY: $(INPUT_DRIVERS) $(INPUT_DRIVERS:%=%_implib) $(INPUT_DRIVERS:%=%_clean)\
|
||||
$(INPUT_DRIVERS:%=%_install) $(INPUT_DRIVERS:%=%_bootcd)
|
||||
$(INPUT_DRIVERS:%=%_install) $(INPUT_DRIVERS:%=%_dist) $(INPUT_DRIVERS:%=%_bootcd)
|
||||
|
||||
#
|
||||
# Filesystem driver rules
|
||||
#
|
||||
$(FS_DRIVERS): %:
|
||||
$(MAKE) -C drivers/fs/$*
|
||||
|
||||
@@ -529,12 +508,14 @@ $(FS_DRIVERS:%=%_clean): %_clean:
|
||||
$(FS_DRIVERS:%=%_install): %_install:
|
||||
$(MAKE) -C drivers/fs/$* install
|
||||
|
||||
$(FS_DRIVERS:%=%_dist): %_dist:
|
||||
$(MAKE) -C drivers/fs/$* dist
|
||||
|
||||
$(FS_DRIVERS:%=%_bootcd): %_bootcd:
|
||||
$(MAKE) -C drivers/fs/$* bootcd
|
||||
|
||||
.PHONY: $(FS_DRIVERS) $(FS_DRIVERS:%=%_implib) $(FS_DRIVERS:%=%_clean) \
|
||||
$(FS_DRIVERS:%=%_install) $(FS_DRIVERS:%=%_bootcd)
|
||||
|
||||
$(FS_DRIVERS:%=%_install) $(FS_DRIVERS:%=%_dist) $(FS_DRIVERS:%=%_bootcd)
|
||||
|
||||
#
|
||||
# Network driver rules
|
||||
@@ -551,16 +532,15 @@ $(NET_DRIVERS:%=%_clean): %_clean:
|
||||
$(NET_DRIVERS:%=%_install): %_install:
|
||||
$(MAKE) -C drivers/net/$* install
|
||||
|
||||
$(NET_DRIVERS:%=%_dist): %_dist:
|
||||
$(MAKE) -C drivers/net/$* dist
|
||||
|
||||
$(NET_DRIVERS:%=%_bootcd): %_bootcd:
|
||||
$(MAKE) -C drivers/net/$* bootcd
|
||||
|
||||
.PHONY: $(NET_DRIVERS) $(NET_DRIVERS:%=%_implib) $(NET_DRIVERS:%=%_clean) \
|
||||
$(NET_DRIVERS:%=%_install) $(NET_DRIVERS:%=%_bootcd)
|
||||
$(NET_DRIVERS:%=%_install) $(NET_DRIVERS:%=%_dist) $(NET_DRIVERS:%=%_bootcd)
|
||||
|
||||
|
||||
#
|
||||
# Network device driver rules
|
||||
#
|
||||
$(NET_DEVICE_DRIVERS): %:
|
||||
$(MAKE) -C drivers/net/dd/$*
|
||||
|
||||
@@ -573,12 +553,14 @@ $(NET_DEVICE_DRIVERS:%=%_clean): %_clean:
|
||||
$(NET_DEVICE_DRIVERS:%=%_install): %_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
|
||||
|
||||
.PHONY: $(NET_DEVICE_DRIVERS) $(NET_DEVICE_DRIVERS:%=%_clean) $(NET_DEVICE_DRIVERS:%=%_implib) \
|
||||
$(NET_DEVICE_DRIVERS:%=%_install) $(NET_DEVICE_DRIVERS:%=%_bootcd)
|
||||
|
||||
$(NET_DEVICE_DRIVERS:%=%_install) $(NET_DEVICE_DRIVERS:%=%_dist) $(NET_DEVICE_DRIVERS:%=%_bootcd)
|
||||
|
||||
#
|
||||
# storage driver rules
|
||||
@@ -595,16 +577,19 @@ $(STORAGE_DRIVERS:%=%_clean): %_clean:
|
||||
$(STORAGE_DRIVERS:%=%_install): %_install:
|
||||
$(MAKE) -C drivers/storage/$* install
|
||||
|
||||
$(STORAGE_DRIVERS:%=%_dist): %_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:%=%_bootcd)
|
||||
|
||||
$(STORAGE_DRIVERS:%=%_install) $(STORAGE_DRIVERS:%=%_dist) $(STORAGE_DRIVERS:%=%_bootcd)
|
||||
|
||||
#
|
||||
# Kernel loaders
|
||||
#
|
||||
|
||||
$(LOADERS): %:
|
||||
$(MAKE) -C loaders/$*
|
||||
|
||||
@@ -616,12 +601,16 @@ $(LOADERS:%=%_clean): %_clean:
|
||||
$(LOADERS:%=%_install): %_install:
|
||||
$(MAKE) -C loaders/$* install
|
||||
|
||||
.PHONY: $(LOADERS) $(LOADERS:%=%_implib) $(LOADERS:%=%_clean) $(LOADERS:%=%_install)
|
||||
$(LOADERS:%=%_dist): %_dist:
|
||||
$(MAKE) -C loaders/$* dist
|
||||
|
||||
.PHONY: $(LOADERS) $(LOADERS:%=%_implib) $(LOADERS:%=%_clean) $(LOADERS:%=%_install) \
|
||||
$(LOADERS:%=%_dist)
|
||||
|
||||
#
|
||||
# Required system components
|
||||
#
|
||||
|
||||
ntoskrnl:
|
||||
$(MAKE) -C ntoskrnl
|
||||
|
||||
@@ -634,15 +623,18 @@ ntoskrnl_clean:
|
||||
ntoskrnl_install:
|
||||
$(MAKE) -C ntoskrnl install
|
||||
|
||||
ntoskrnl_dist:
|
||||
$(MAKE) -C ntoskrnl dist
|
||||
|
||||
ntoskrnl_bootcd:
|
||||
$(MAKE) -C ntoskrnl bootcd
|
||||
|
||||
.PHONY: ntoskrnl ntoskrnl_implib ntoskrnl_clean ntoskrnl_install ntoskrnl_bootcd
|
||||
|
||||
.PHONY: ntoskrnl ntoskrnl_implib ntoskrnl_clean ntoskrnl_install ntoskrnl_dist ntoskrnl_bootcd
|
||||
|
||||
#
|
||||
# Hardware Abstraction Layer import library
|
||||
#
|
||||
|
||||
hallib:
|
||||
$(MAKE) -C hal/hal
|
||||
|
||||
@@ -655,15 +647,18 @@ hallib_clean:
|
||||
hallib_install:
|
||||
$(MAKE) -C hal/hal install
|
||||
|
||||
hallib_dist:
|
||||
$(MAKE) -C hal/hal dist
|
||||
|
||||
hallib_bootcd:
|
||||
$(MAKE) -C hal/hal bootcd
|
||||
|
||||
.PHONY: hallib hallib_implib hallib_clean hallib_install hallib_bootcd
|
||||
|
||||
.PHONY: hallib hallib_implib hallib_clean hallib_install hallib_dist hallib_bootcd
|
||||
|
||||
#
|
||||
# Hardware Abstraction Layers
|
||||
#
|
||||
|
||||
$(HALS): %:
|
||||
$(MAKE) -C hal/$*
|
||||
|
||||
@@ -676,15 +671,18 @@ $(HALS:%=%_clean): %_clean:
|
||||
$(HALS:%=%_install): %_install:
|
||||
$(MAKE) -C hal/$* install
|
||||
|
||||
$(HALS:%=%_dist): %_dist:
|
||||
$(MAKE) -C hal/$* dist
|
||||
|
||||
$(HALS:%=%_bootcd): %_bootcd:
|
||||
$(MAKE) -C hal/$* bootcd
|
||||
|
||||
.PHONY: $(HALS) $(HALS:%=%_implib) $(HALS:%=%_clean) $(HALS:%=%_install) $(HALS:%=%_bootcd)
|
||||
|
||||
.PHONY: $(HALS) $(HALS:%=%_implib) $(HALS:%=%_clean) $(HALS:%=%_install) $(HALS:%=%_dist) $(HALS:%=%_bootcd)
|
||||
|
||||
#
|
||||
# File system libraries
|
||||
#
|
||||
|
||||
$(LIB_FSLIB): %:
|
||||
$(MAKE) -C lib/fslib/$*
|
||||
|
||||
@@ -700,16 +698,19 @@ $(LIB_FSLIB:%=%_clean): %_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:%=%_bootcd)
|
||||
|
||||
$(LIB_FSLIB:%=%_install) $(LIB_FSLIB:%=%_dist) $(LIB_FSLIB:%=%_bootcd)
|
||||
|
||||
#
|
||||
# Static libraries
|
||||
#
|
||||
|
||||
$(LIB_STATIC): %:
|
||||
$(MAKE) -C lib/$*
|
||||
|
||||
@@ -725,16 +726,19 @@ $(LIB_STATIC:%=%_clean): %_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:%=%_bootcd)
|
||||
|
||||
$(LIB_STATIC:%=%_install) $(LIB_STATIC:%=%_dist) $(LIB_STATIC:%=%_bootcd)
|
||||
|
||||
#
|
||||
# DLLs
|
||||
# Required DLLs
|
||||
#
|
||||
|
||||
$(DLLS): %:
|
||||
$(MAKE) -C lib/$*
|
||||
|
||||
@@ -750,16 +754,18 @@ $(DLLS:%=%_clean): %_clean:
|
||||
$(DLLS:%=%_install): %_install:
|
||||
$(MAKE) -C lib/$* install
|
||||
|
||||
$(DLLS:%=%_dist): %_dist:
|
||||
$(MAKE) -C lib/$* dist
|
||||
|
||||
$(DLLS:%=%_bootcd): %_bootcd:
|
||||
$(MAKE) -C lib/$* bootcd
|
||||
|
||||
.PHONY: $(DLLS) $(DLLS:%=%_depends) $(DLLS:%=%_implib) $(DLLS:%=%_clean) $(DLLS:%=%_install) \
|
||||
$(DLLS:%=%_bootcd)
|
||||
|
||||
.PHONY: $(DLLS) $(DLLS:%=%_depends) $(DLLS:%=%_implib) $(DLLS:%=%_clean) $(DLLS:%=%_install) $(DLLS:%=%_dist) $(DLLS:%=%_bootcd)
|
||||
|
||||
#
|
||||
# Subsystem support modules
|
||||
#
|
||||
|
||||
$(SUBSYS): %:
|
||||
$(MAKE) -C subsys/$*
|
||||
|
||||
@@ -775,11 +781,14 @@ $(SUBSYS:%=%_clean): %_clean:
|
||||
$(SUBSYS:%=%_install): %_install:
|
||||
$(MAKE) -C subsys/$* install
|
||||
|
||||
$(SUBSYS:%=%_dist): %_dist:
|
||||
$(MAKE) -C subsys/$* dist
|
||||
|
||||
$(SUBSYS:%=%_bootcd): %_bootcd:
|
||||
$(MAKE) -C subsys/$* bootcd
|
||||
|
||||
.PHONY: $(SUBSYS) $(SUBSYS:%=%_depends) $(SUBSYS:%=%_implib) $(SUBSYS:%=%_clean) $(SUBSYS:%=%_install) \
|
||||
$(SUBSYS:%=%_bootcd)
|
||||
$(SUBSYS:%=%_dist) $(SUBSYS:%=%_bootcd)
|
||||
|
||||
#
|
||||
# Regression testsuite
|
||||
@@ -820,6 +829,25 @@ 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) bootdata/icon.ico $(INSTALL_DIR)/../icon.ico
|
||||
$(CP) media/fonts $(INSTALL_DIR)
|
||||
$(CP) media/nls $(INSTALL_DIR)
|
||||
|
||||
else # !BOOTCD_INSTALL
|
||||
|
||||
install_dirs:
|
||||
$(RMKDIR) $(INSTALL_DIR)
|
||||
$(RMKDIR) $(INSTALL_DIR)/bin
|
||||
@@ -840,43 +868,41 @@ install_before:
|
||||
$(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
|
||||
|
||||
.PHONY: install_clean install_dirs install_before
|
||||
|
||||
|
||||
#
|
||||
# Make a distribution saveset
|
||||
#
|
||||
|
||||
dist_clean:
|
||||
$(RM) $(DIST_DIR)/symbols/*.sym
|
||||
$(RM) $(DIST_DIR)/drivers/*.sys
|
||||
$(RM) $(DIST_DIR)/subsys/*.exe
|
||||
$(RM) $(DIST_DIR)/dlls/*.dll
|
||||
$(RM) $(DIST_DIR)/apps/*.exe
|
||||
$(RM) $(DIST_DIR)/*.exe
|
||||
$(RMDIR) $(DIST_DIR)/symbols
|
||||
$(RMDIR) $(DIST_DIR)/subsys
|
||||
$(RMDIR) $(DIST_DIR)/drivers
|
||||
$(RMDIR) $(DIST_DIR)/dlls
|
||||
$(RMDIR) $(DIST_DIR)/apps
|
||||
$(RMDIR) $(DIST_DIR)
|
||||
|
||||
dist_dirs:
|
||||
$(RMKDIR) $(DIST_DIR)
|
||||
$(RMKDIR) $(DIST_DIR)/apps
|
||||
$(RMKDIR) $(DIST_DIR)/dlls
|
||||
$(RMKDIR) $(DIST_DIR)/drivers
|
||||
$(RMKDIR) $(DIST_DIR)/subsys
|
||||
$(RMKDIR) $(DIST_DIR)/symbols
|
||||
|
||||
.PHONY: dist_clean dist_dirs
|
||||
|
||||
etags:
|
||||
find . -name "*.[ch]" -print | etags --language=c -
|
||||
|
||||
|
||||
docu:
|
||||
echo generating ReactOS NTOSKRNL documentation ...
|
||||
$(MAKE) -C ntoskrnl docu
|
||||
|
||||
echo generating ReactOS drivers documentation ...
|
||||
$(MAKE) -C drivers docu
|
||||
|
||||
echo generating ReactOS NTDLL documentation ...
|
||||
$(MAKE) -C lib/ntdll docu
|
||||
|
||||
echo generating ReactOS Freetype documentation ...
|
||||
$(MAKE) -C lib/freetype docu
|
||||
|
||||
echo generating ReactOS libs documentation ...
|
||||
$(MAKE) -C lib docu
|
||||
|
||||
echo generating ReactOS WIN32K documentation ...
|
||||
$(MAKE) -C subsys/win32k docu
|
||||
|
||||
echo generating ReactOS apps+tools documentation ...
|
||||
$(MAKE) -C apps docu
|
||||
|
||||
echo generating ReactOS explorer documentation ...
|
||||
$(MAKE) -C subsys/system/explorer full-docu
|
||||
|
||||
echo generating remaining ReactOS documentation ...
|
||||
doxygen Doxyfile
|
||||
|
||||
.PHONY: docu
|
||||
|
||||
|
||||
# EOF
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
========================
|
||||
ReactOS Version 0.2.x
|
||||
Updated June 23rd, 2004
|
||||
ReactOS Version 0.1.x
|
||||
Updated March 19th, 2003
|
||||
========================
|
||||
|
||||
1. What is ReactOS?
|
||||
|
@@ -22,9 +22,9 @@ winmm.dll reactos/lib/winmm
|
||||
winspool.dll reactos/lib/winspool
|
||||
ws2_32.dll reactos/lib/ws2_32
|
||||
wsock32.dll reactos/lib/wsock32
|
||||
videoprt.dll reactos/drivers/video/videoprt
|
||||
ndis.sys reactos/drivers/net/ndis
|
||||
tdi.sys reactos/drivers/net/tdi
|
||||
videoprt.dll reactos/drivers/dd/videoprt
|
||||
ndis.dll reactos/drivers/net/ndis
|
||||
tdi.dll reactos/drivers/net/tdi
|
||||
class2.sys reactos/drivers/storage/class2
|
||||
scsiport.sys reactos/drivers/storage/scsiport
|
||||
ntoskrnl.exe reactos/ntoskrnl
|
||||
|
@@ -1 +0,0 @@
|
||||
doxy-doc
|
@@ -1,207 +0,0 @@
|
||||
# Doxyfile 1.3.5
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
PROJECT_NAME = "ReactOS Apps & Tools"
|
||||
PROJECT_NUMBER =
|
||||
OUTPUT_DIRECTORY = doxy-doc
|
||||
OUTPUT_LANGUAGE = English
|
||||
USE_WINDOWS_ENCODING = YES
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
REPEAT_BRIEF = YES
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
INLINE_INHERITED_MEMB = NO
|
||||
FULL_PATH_NAMES = YES
|
||||
STRIP_FROM_PATH = ..
|
||||
SHORT_NAMES = NO
|
||||
JAVADOC_AUTOBRIEF = YES
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
DETAILS_AT_TOP = NO
|
||||
INHERIT_DOCS = NO
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
TAB_SIZE = 8
|
||||
ALIASES =
|
||||
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
SUBGROUPING = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Build related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
EXTRACT_ALL = YES
|
||||
EXTRACT_PRIVATE = NO
|
||||
EXTRACT_STATIC = NO
|
||||
EXTRACT_LOCAL_CLASSES = NO
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
HIDE_IN_BODY_DOCS = NO
|
||||
INTERNAL_DOCS = YES
|
||||
CASE_SENSE_NAMES = YES
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
SHOW_INCLUDE_FILES = YES
|
||||
INLINE_INFO = YES
|
||||
SORT_MEMBER_DOCS = YES
|
||||
GENERATE_TODOLIST = YES
|
||||
GENERATE_TESTLIST = YES
|
||||
GENERATE_BUGLIST = YES
|
||||
GENERATE_DEPRECATEDLIST= YES
|
||||
ENABLED_SECTIONS =
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
SHOW_USED_FILES = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
QUIET = NO
|
||||
WARNINGS = NO
|
||||
WARN_IF_UNDOCUMENTED = NO
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
WARN_LOGFILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
INPUT = . \
|
||||
../tools
|
||||
FILE_PATTERNS = *.c \
|
||||
*.h
|
||||
RECURSIVE = YES
|
||||
EXCLUDE =
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXCLUDE_PATTERNS =
|
||||
EXAMPLE_PATH =
|
||||
EXAMPLE_PATTERNS =
|
||||
EXAMPLE_RECURSIVE = YES
|
||||
IMAGE_PATH =
|
||||
INPUT_FILTER =
|
||||
FILTER_SOURCE_FILES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to source browsing
|
||||
#---------------------------------------------------------------------------
|
||||
SOURCE_BROWSER = YES
|
||||
INLINE_SOURCES = YES
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
REFERENCED_BY_RELATION = YES
|
||||
REFERENCES_RELATION = YES
|
||||
VERBATIM_HEADERS = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
ALPHABETICAL_INDEX = YES
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
IGNORE_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_HTML = YES
|
||||
HTML_OUTPUT = html
|
||||
HTML_FILE_EXTENSION = .html
|
||||
HTML_HEADER =
|
||||
HTML_FOOTER =
|
||||
HTML_STYLESHEET =
|
||||
HTML_ALIGN_MEMBERS = YES
|
||||
GENERATE_HTMLHELP = NO
|
||||
CHM_FILE =
|
||||
HHC_LOCATION =
|
||||
GENERATE_CHI = NO
|
||||
BINARY_TOC = NO
|
||||
TOC_EXPAND = NO
|
||||
DISABLE_INDEX = NO
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
GENERATE_TREEVIEW = YES
|
||||
TREEVIEW_WIDTH = 200
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_LATEX = NO
|
||||
LATEX_OUTPUT = latex
|
||||
LATEX_CMD_NAME = latex
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
COMPACT_LATEX = NO
|
||||
PAPER_TYPE = a4wide
|
||||
EXTRA_PACKAGES =
|
||||
LATEX_HEADER =
|
||||
PDF_HYPERLINKS = NO
|
||||
USE_PDFLATEX = NO
|
||||
LATEX_BATCHMODE = NO
|
||||
LATEX_HIDE_INDICES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_RTF = NO
|
||||
RTF_OUTPUT = rtf
|
||||
COMPACT_RTF = YES
|
||||
RTF_HYPERLINKS = YES
|
||||
RTF_STYLESHEET_FILE =
|
||||
RTF_EXTENSIONS_FILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_MAN = NO
|
||||
MAN_OUTPUT = man
|
||||
MAN_EXTENSION = .3
|
||||
MAN_LINKS = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the XML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_XML = NO
|
||||
XML_OUTPUT = xml
|
||||
XML_SCHEMA =
|
||||
XML_DTD =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options for the AutoGen Definitions output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the Perl module output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_PERLMOD = NO
|
||||
PERLMOD_LATEX = NO
|
||||
PERLMOD_PRETTY = YES
|
||||
PERLMOD_MAKEVAR_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
ENABLE_PREPROCESSING = NO
|
||||
MACRO_EXPANSION = NO
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
SEARCH_INCLUDES = YES
|
||||
INCLUDE_PATH = ../include
|
||||
INCLUDE_FILE_PATTERNS = *.h
|
||||
PREDEFINED =
|
||||
EXPAND_AS_DEFINED =
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::addtions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
TAGFILES =
|
||||
GENERATE_TAGFILE =
|
||||
ALLEXTERNALS = NO
|
||||
EXTERNAL_GROUPS = YES
|
||||
PERL_PATH = /usr/bin/perl
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
CLASS_DIAGRAMS = YES
|
||||
HIDE_UNDOC_RELATIONS = NO
|
||||
HAVE_DOT = YES
|
||||
CLASS_GRAPH = YES
|
||||
COLLABORATION_GRAPH = YES
|
||||
UML_LOOK = NO
|
||||
TEMPLATE_RELATIONS = NO
|
||||
INCLUDE_GRAPH = YES
|
||||
INCLUDED_BY_GRAPH = YES
|
||||
CALL_GRAPH = YES
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
DOT_IMAGE_FORMAT = png
|
||||
DOT_PATH =
|
||||
DOTFILE_DIRS =
|
||||
MAX_DOT_GRAPH_WIDTH = 1024
|
||||
MAX_DOT_GRAPH_HEIGHT = 1024
|
||||
MAX_DOT_GRAPH_DEPTH = 0
|
||||
GENERATE_LEGEND = YES
|
||||
DOT_CLEANUP = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::addtions related to the search engine
|
||||
#---------------------------------------------------------------------------
|
||||
SEARCHENGINE = YES
|
@@ -1,13 +0,0 @@
|
||||
# $Id: Makefile,v 1.1 2003/12/06 23:10:50 mf Exp $
|
||||
#
|
||||
# ReactOS apps and tools makefile to generate Doxygen documentation
|
||||
#
|
||||
|
||||
|
||||
docu:
|
||||
doxygen Doxyfile
|
||||
|
||||
.PHONY: docu
|
||||
|
||||
|
||||
# EOF
|
@@ -7,17 +7,15 @@ PATH_TO_TOP = ../..
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
# test_old tests
|
||||
TEST_APPS = accelerator alive alphablend apc args atomtest bench bitblt button \
|
||||
button2 capclock carets combo consume copymove count dibtest dump_shared_data \
|
||||
edit enumwnd enumws event global_mem gradient hello mdi \
|
||||
hivetest icontest isotest lineclip linetest lpc \
|
||||
mktime mstest multithrdwin multiwin mutex nptest patblt primitives pteb \
|
||||
regtest sectest sertest shaptest shm statst statst2 stretchblt suspend \
|
||||
tcpsvr terminate txtscale thread thread_msg tokentest user32 vmtest \
|
||||
winhello wm_erasebkgnd wm_paint eventpair threadwait popupmenu \
|
||||
map_dup_inherit p_dup_handle apc2 enhmetafile dirdlg guithreadinfo fiber
|
||||
# Build failure:
|
||||
# kernel32
|
||||
TEST_APPS = SampleWindow alive apc args atomtest bench bitblt button \
|
||||
button2 capclock carets cliarea combo consume copymove count dibtest \
|
||||
dump_shared_data edit enumwnd event file gditest global_mem hello \
|
||||
hivetest icontest isotest lineclip linetest lock lpc messagebox mktime \
|
||||
mstest multiwin mutex nptest patblt pipe primitives pteb regtest \
|
||||
sectest sertest shaptest shm statst statst2 stretchblt suspend \
|
||||
tcpsvr terminate txtscale thread thread_msg tokentest vmtest \
|
||||
winhello winhello2 wm_erasebkgnd wm_paint eventpair threadwait \
|
||||
map_dup_inherit p_dup_handle
|
||||
|
||||
TEST_MISC =
|
||||
|
||||
@@ -34,7 +32,10 @@ clean: $(TEST_APPS:%=%_clean) \
|
||||
install: $(TEST_APPS:%=%_install) \
|
||||
$(TEST_MISC:%=%_install)
|
||||
|
||||
.PHONY: all depends implib clean install
|
||||
dist: $(TEST_APPS:%=%_dist) \
|
||||
$(TEST_MISC:%=%_dist)
|
||||
|
||||
.PHONY: all depends implib clean install dist
|
||||
|
||||
|
||||
#
|
||||
@@ -49,10 +50,13 @@ $(TEST_APPS:%=%_implib): %_implib:
|
||||
$(TEST_APPS:%=%_clean): %_clean:
|
||||
$(MAKE) -C $* clean
|
||||
|
||||
$(TEST_APPS:%=%_dist): %_dist:
|
||||
$(MAKE) -C $* dist
|
||||
|
||||
$(TEST_APPS:%=%_install): %_install:
|
||||
$(MAKE) -C $* install
|
||||
|
||||
.PHONY: $(TEST_APPS) $(TEST_APPS:%=%_implib) $(TEST_APPS:%=%_clean) $(TEST_APPS:%=%_install)
|
||||
.PHONY: $(TEST_APPS) $(TEST_APPS:%=%_implib) $(TEST_APPS:%=%_clean) $(TEST_APPS:%=%_install) $(TEST_APPS:%=%_dist)
|
||||
|
||||
|
||||
#
|
||||
@@ -67,13 +71,17 @@ $(TEST_MISC:%=%_implib): %_implib:
|
||||
$(TEST_MISC:%=%_clean): %_clean:
|
||||
$(MAKE) -C tests/$* clean
|
||||
|
||||
$(TEST_MISC:%=%_dist): %_dist:
|
||||
$(MAKE) -C tests/$* dist
|
||||
|
||||
$(TEST_MISC:%=%_install): %_install:
|
||||
$(MAKE) -C tests/$* install
|
||||
|
||||
.PHONY: $(TEST_MISC) $(TEST_MISC:%=%_implib) $(TEST_MISC:%=%_clean) $(TEST_MISC:%=%_install)
|
||||
.PHONY: $(TEST_MISC) $(TEST_MISC:%=%_implib) $(TEST_MISC:%=%_clean) $(TEST_MISC:%=%_install) $(TEST_MISC:%=%_dist)
|
||||
|
||||
|
||||
etags:
|
||||
find . -name "*.[ch]" -print | etags --language=c -
|
||||
|
||||
# EOF
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# $Id: makefile,v 1.1 2003/11/15 14:05:30 weiden Exp $
|
||||
# $Id: makefile,v 1.1 2003/07/24 15:51:58 rcampbell Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
@@ -8,14 +8,12 @@ TARGET_TYPE = program
|
||||
|
||||
TARGET_APPTYPE = windows
|
||||
|
||||
TARGET_NAME = enhmetafile
|
||||
TARGET_NAME = window
|
||||
|
||||
TARGET_SDKLIBS = kernel32.a gdi32.a
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
212
reactos/apps/tests/SampleWindow/window.c
Normal file
212
reactos/apps/tests/SampleWindow/window.c
Normal file
@@ -0,0 +1,212 @@
|
||||
/*
|
||||
* A basic example of Win32 programming in C.
|
||||
*
|
||||
* This source code is in the PUBLIC DOMAIN and has NO WARRANTY.
|
||||
*
|
||||
* Colin Peters <colinp at ma.kcom.ne.jp>
|
||||
*/
|
||||
#include <windows.h>
|
||||
#include <string.h>
|
||||
|
||||
/*
|
||||
* This is the window function for the main window. Whenever a message is
|
||||
* dispatched using DispatchMessage (or sent with SendMessage) this function
|
||||
* gets called with the contents of the message.
|
||||
*/
|
||||
LRESULT CALLBACK
|
||||
MainWndProc (HWND hwnd, UINT nMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
/* The window handle for the "Click Me" button. */
|
||||
static HWND hwndButton = 0;
|
||||
static int cx, cy; /* Height and width of our button. */
|
||||
|
||||
HDC hdc; /* A device context used for drawing */
|
||||
PAINTSTRUCT ps; /* Also used during window drawing */
|
||||
RECT rc; /* A rectangle used during drawing */
|
||||
|
||||
/*
|
||||
* Perform processing based on what kind of message we got.
|
||||
*/
|
||||
switch (nMsg)
|
||||
{
|
||||
case WM_CREATE:
|
||||
{
|
||||
/* The window is being created. Create our button
|
||||
* window now. */
|
||||
TEXTMETRIC tm;
|
||||
|
||||
/* First we use the system fixed font size to choose
|
||||
* a nice button size. */
|
||||
hdc = GetDC (hwnd);
|
||||
SelectObject (hdc, GetStockObject (SYSTEM_FIXED_FONT));
|
||||
GetTextMetrics (hdc, &tm);
|
||||
cx = tm.tmAveCharWidth * 30;
|
||||
cy = (tm.tmHeight + tm.tmExternalLeading) * 2;
|
||||
ReleaseDC (hwnd, hdc);
|
||||
|
||||
/* Now create the button */
|
||||
hwndButton = CreateWindow (
|
||||
"button", /* Builtin button class */
|
||||
"Click Here",
|
||||
WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
|
||||
0, 0, cx, cy,
|
||||
hwnd, /* Parent is this window. */
|
||||
(HMENU) 1, /* Control ID: 1 */
|
||||
((LPCREATESTRUCT) lParam)->hInstance,
|
||||
NULL
|
||||
);
|
||||
|
||||
return 0;
|
||||
break;
|
||||
}
|
||||
|
||||
case WM_DESTROY:
|
||||
/* The window is being destroyed, close the application
|
||||
* (the child button gets destroyed automatically). */
|
||||
PostQuitMessage (0);
|
||||
return 0;
|
||||
break;
|
||||
|
||||
case WM_PAINT:
|
||||
/* The window needs to be painted (redrawn). */
|
||||
hdc = BeginPaint (hwnd, &ps);
|
||||
GetClientRect (hwnd, &rc);
|
||||
|
||||
/* Draw "Hello, World" in the middle of the upper
|
||||
* half of the window. */
|
||||
rc.bottom = rc.bottom / 2;
|
||||
DrawText (hdc, "Hello, World", -1, &rc,
|
||||
DT_SINGLELINE | DT_CENTER | DT_VCENTER);
|
||||
|
||||
EndPaint (hwnd, &ps);
|
||||
return 0;
|
||||
break;
|
||||
|
||||
case WM_SIZE:
|
||||
/* The window size is changing. If the button exists
|
||||
* then place it in the center of the bottom half of
|
||||
* the window. */
|
||||
if (hwndButton &&
|
||||
(wParam == SIZEFULLSCREEN ||
|
||||
wParam == SIZENORMAL)
|
||||
)
|
||||
{
|
||||
rc.left = (LOWORD(lParam) - cx) / 2;
|
||||
rc.top = HIWORD(lParam) * 3 / 4 - cy / 2;
|
||||
MoveWindow (
|
||||
hwndButton,
|
||||
rc.left, rc.top, cx, cy, TRUE);
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_COMMAND:
|
||||
/* Check the control ID, notification code and
|
||||
* control handle to see if this is a button click
|
||||
* message from our child button. */
|
||||
if (LOWORD(wParam) == 1 &&
|
||||
HIWORD(wParam) == BN_CLICKED &&
|
||||
(HWND) lParam == hwndButton)
|
||||
{
|
||||
/* Our button was clicked. Close the window. */
|
||||
DestroyWindow (hwnd);
|
||||
}
|
||||
return 0;
|
||||
break;
|
||||
}
|
||||
|
||||
/* If we don't handle a message completely we hand it to the system
|
||||
* provided default window function. */
|
||||
return DefWindowProc (hwnd, nMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
|
||||
int STDCALL
|
||||
WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmd, int nShow)
|
||||
{
|
||||
HWND hwndMain; /* Handle for the main window. */
|
||||
MSG msg; /* A Win32 message structure. */
|
||||
WNDCLASSEX wndclass; /* A window class structure. */
|
||||
char* szMainWndClass = "WinTestWin";
|
||||
/* The name of the main window class */
|
||||
|
||||
/*
|
||||
* First we create a window class for our main window.
|
||||
*/
|
||||
|
||||
/* Initialize the entire structure to zero. */
|
||||
memset (&wndclass, 0, sizeof(WNDCLASSEX));
|
||||
|
||||
/* This class is called WinTestWin */
|
||||
wndclass.lpszClassName = szMainWndClass;
|
||||
|
||||
/* cbSize gives the size of the structure for extensibility. */
|
||||
wndclass.cbSize = sizeof(WNDCLASSEX);
|
||||
|
||||
/* All windows of this class redraw when resized. */
|
||||
wndclass.style = CS_HREDRAW | CS_VREDRAW;
|
||||
|
||||
/* All windows of this class use the MainWndProc window function. */
|
||||
wndclass.lpfnWndProc = MainWndProc;
|
||||
|
||||
/* This class is used with the current program instance. */
|
||||
wndclass.hInstance = hInst;
|
||||
|
||||
/* Use standard application icon and arrow cursor provided by the OS */
|
||||
wndclass.hIcon = LoadIcon (NULL, (LPCTSTR)IDI_APPLICATION);
|
||||
wndclass.hIconSm = LoadIcon (NULL, (LPCTSTR)IDI_APPLICATION);
|
||||
wndclass.hCursor = LoadCursor (NULL, (LPCTSTR)IDC_ARROW);
|
||||
|
||||
/* Color the background white */
|
||||
wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH);
|
||||
|
||||
/*
|
||||
* Now register the window class for use.
|
||||
*/
|
||||
RegisterClassEx (&wndclass);
|
||||
|
||||
/*
|
||||
* Create our main window using that window class.
|
||||
*/
|
||||
hwndMain = CreateWindow (
|
||||
szMainWndClass, /* Class name */
|
||||
"Hello", /* Caption */
|
||||
WS_OVERLAPPEDWINDOW, /* Style */
|
||||
CW_USEDEFAULT, /* Initial x (use default) */
|
||||
CW_USEDEFAULT, /* Initial y (use default) */
|
||||
CW_USEDEFAULT, /* Initial x size (use default) */
|
||||
CW_USEDEFAULT, /* Initial y size (use default) */
|
||||
NULL, /* No parent window */
|
||||
NULL, /* No menu */
|
||||
hInst, /* This program instance */
|
||||
NULL /* Creation parameters */
|
||||
);
|
||||
|
||||
/*
|
||||
* Display the window which we just created (using the nShow
|
||||
* passed by the OS, which allows for start minimized and that
|
||||
* sort of thing).
|
||||
*/
|
||||
ShowWindow (hwndMain, nShow);
|
||||
UpdateWindow (hwndMain);
|
||||
|
||||
/*
|
||||
* The main message loop. All messages being sent to the windows
|
||||
* of the application (or at least the primary thread) are retrieved
|
||||
* by the GetMessage call, then translated (mainly for keyboard
|
||||
* messages) and dispatched to the appropriate window procedure.
|
||||
* This is the simplest kind of message loop. More complex loops
|
||||
* are required for idle processing or handling modeless dialog
|
||||
* boxes. When one of the windows calls PostQuitMessage GetMessage
|
||||
* will return zero and the wParam of the message will be filled
|
||||
* with the argument to PostQuitMessage. The loop will end and
|
||||
* the application will close.
|
||||
*/
|
||||
while (GetMessage (&msg, NULL, 0, 0))
|
||||
{
|
||||
TranslateMessage (&msg);
|
||||
DispatchMessage (&msg);
|
||||
}
|
||||
return msg.wParam;
|
||||
}
|
||||
|
||||
/* EOF */
|
@@ -1,6 +0,0 @@
|
||||
*.o
|
||||
*.d
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
@@ -1,19 +0,0 @@
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_NORC = yes
|
||||
|
||||
TARGET_TYPE = program
|
||||
|
||||
TARGET_APPTYPE = windows
|
||||
|
||||
TARGET_NAME = accelerator
|
||||
|
||||
#TARGET_SDKLIBS = kernel32.a user32.a
|
||||
|
||||
TARGET_OBJECTS = accelerator.o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
@@ -1,161 +0,0 @@
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#define ID_ACCEL1 0x100
|
||||
#define ID_ACCEL2 0x101
|
||||
#define ID_ACCEL3 0x102
|
||||
#define ID_ACCEL4 0x103
|
||||
|
||||
/*
|
||||
* {fVirt, key, cmd}
|
||||
* fVirt |= FVIRTKEY | FCONTROL | FALT | FSHIFT
|
||||
*/
|
||||
//static HFONT tf;
|
||||
static ACCEL Accelerators[4] = {
|
||||
{ FVIRTKEY, VK_A, ID_ACCEL1},
|
||||
{ FVIRTKEY | FSHIFT, VK_A, ID_ACCEL2},
|
||||
{ FVIRTKEY | FCONTROL, VK_A, ID_ACCEL3},
|
||||
{ FVIRTKEY | FALT, VK_A, ID_ACCEL4}};
|
||||
static HACCEL hAcceleratorTable;
|
||||
static char Event[200];
|
||||
|
||||
LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM);
|
||||
|
||||
int WINAPI
|
||||
WinMain(HINSTANCE hInstance,
|
||||
HINSTANCE hPrevInstance,
|
||||
LPSTR lpszCmdLine,
|
||||
int nCmdShow)
|
||||
{
|
||||
WNDCLASS wc;
|
||||
MSG msg;
|
||||
HWND hWnd;
|
||||
|
||||
wc.lpszClassName = "AcceleratorTest";
|
||||
wc.lpfnWndProc = MainWndProc;
|
||||
wc.style = CS_VREDRAW | CS_HREDRAW;
|
||||
wc.hInstance = hInstance;
|
||||
wc.hIcon = LoadIcon(NULL, (LPCTSTR)IDI_APPLICATION);
|
||||
wc.hCursor = LoadCursor(NULL, (LPCTSTR)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%lX)\n",
|
||||
GetLastError());
|
||||
return(1);
|
||||
}
|
||||
|
||||
hWnd = CreateWindow("AcceleratorTest",
|
||||
"Accelerator Test",
|
||||
WS_OVERLAPPEDWINDOW,
|
||||
0,
|
||||
0,
|
||||
CW_USEDEFAULT,
|
||||
CW_USEDEFAULT,
|
||||
NULL,
|
||||
NULL,
|
||||
hInstance,
|
||||
NULL);
|
||||
if (hWnd == NULL)
|
||||
{
|
||||
fprintf(stderr, "CreateWindow failed (last error 0x%lX)\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");*/
|
||||
|
||||
Event[0] = 0;
|
||||
|
||||
ShowWindow(hWnd, nCmdShow);
|
||||
|
||||
hAcceleratorTable = CreateAcceleratorTable(Accelerators,
|
||||
sizeof(Accelerators)/sizeof(Accelerators[1]));
|
||||
if (hAcceleratorTable == NULL)
|
||||
{
|
||||
fprintf(stderr, "CreateAcceleratorTable failed (last error 0x%lX)\n",
|
||||
GetLastError());
|
||||
return(1);
|
||||
}
|
||||
|
||||
while(GetMessage(&msg, NULL, 0, 0))
|
||||
{
|
||||
if (!TranslateAccelerator(hWnd, hAcceleratorTable, &msg))
|
||||
{
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
}
|
||||
|
||||
if (!DestroyAcceleratorTable(hAcceleratorTable))
|
||||
{
|
||||
fprintf(stderr, "DestroyAcceleratorTable failed (last error 0x%lX)\n",
|
||||
GetLastError());
|
||||
return(1);
|
||||
}
|
||||
|
||||
//DeleteObject(tf);
|
||||
|
||||
return msg.wParam;
|
||||
}
|
||||
|
||||
LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
PAINTSTRUCT ps;
|
||||
HDC hDC;
|
||||
char buf[200];
|
||||
|
||||
switch(msg)
|
||||
{
|
||||
case WM_PAINT:
|
||||
hDC = BeginPaint(hWnd, &ps);
|
||||
//SelectObject(hDC, tf);
|
||||
sprintf(buf, "Event: '%s'", Event);
|
||||
TextOut(hDC, 10, 10, buf, strlen(buf));
|
||||
EndPaint(hWnd, &ps);
|
||||
break;
|
||||
|
||||
case WM_DESTROY:
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
|
||||
case WM_COMMAND:
|
||||
|
||||
switch (LOWORD(wParam))
|
||||
{
|
||||
case ID_ACCEL1:
|
||||
strcpy(Event, "A");
|
||||
break;
|
||||
|
||||
case ID_ACCEL2:
|
||||
strcpy(Event, "SHIFT+A");
|
||||
break;
|
||||
|
||||
case ID_ACCEL3:
|
||||
strcpy(Event, "CTRL+A");
|
||||
break;
|
||||
|
||||
case ID_ACCEL4:
|
||||
strcpy(Event, "ALT+A");
|
||||
break;
|
||||
|
||||
default:
|
||||
sprintf(Event, "%d", LOWORD(wParam));
|
||||
break;
|
||||
}
|
||||
|
||||
InvalidateRect(hWnd, NULL, TRUE);
|
||||
UpdateWindow(hWnd);
|
||||
break;
|
||||
|
||||
default:
|
||||
return DefWindowProc(hWnd, msg, wParam, lParam);
|
||||
}
|
||||
return 0;
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
# $Id: Makefile,v 1.7 2003/11/14 17:13:14 weiden Exp $
|
||||
# $Id: Makefile,v 1.6 2002/06/02 19:24:57 chorns Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
@@ -14,8 +14,6 @@ TARGET_SDKLIBS = kernel32.a user32.a
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
@@ -1,213 +0,0 @@
|
||||
#include <windows.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifndef AC_SRC_ALPHA
|
||||
#define AC_SRC_ALPHA (0x1)
|
||||
#endif
|
||||
|
||||
HINSTANCE HInst;
|
||||
const char* WndClassName = "GMainWnd";
|
||||
LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
|
||||
LPARAM LParam);
|
||||
|
||||
WINBOOL
|
||||
STDCALL
|
||||
GdiAlphaBlend(HDC hdcDst,LONG DstX,LONG DstY,LONG DstCx,LONG DstCy,HDC hdcSrc,LONG SrcX,LONG SrcY,LONG SrcCx,LONG SrcCy,BLENDFUNCTION BlendFunction);
|
||||
|
||||
|
||||
int APIENTRY WinMain(HINSTANCE HInstance, HINSTANCE HPrevInstance,
|
||||
LPTSTR lpCmdLine, int nCmdShow)
|
||||
{
|
||||
WNDCLASS wc;
|
||||
MSG msg;
|
||||
|
||||
HInst = HInstance;
|
||||
|
||||
memset(&wc, 0, sizeof(WNDCLASS));
|
||||
|
||||
wc.style = CS_VREDRAW | CS_HREDRAW | CS_DBLCLKS;
|
||||
wc.lpfnWndProc = MainWndProc;
|
||||
wc.hInstance = HInstance;
|
||||
wc.hCursor = LoadCursor(NULL, (LPCTSTR)IDC_ARROW);
|
||||
/* wc.hbrBackground = reinterpret_cast<HBRUSH>(COLOR_BTNFACE + 1); */
|
||||
wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
|
||||
wc.lpszClassName = WndClassName;
|
||||
|
||||
if (RegisterClass(&wc))
|
||||
{
|
||||
HWND HWnd =
|
||||
CreateWindow(
|
||||
WndClassName, TEXT("AlphaBlend Rendering Demo"),
|
||||
WS_OVERLAPPED | WS_SYSMENU | WS_CAPTION |
|
||||
WS_VISIBLE | WS_CLIPSIBLINGS,
|
||||
0, 0, 320, 430,
|
||||
NULL, NULL, HInst, NULL
|
||||
);
|
||||
|
||||
if (HWnd)
|
||||
{
|
||||
ShowWindow(HWnd, nCmdShow);
|
||||
UpdateWindow(HWnd);
|
||||
|
||||
while (GetMessage(&msg, NULL, 0, 0))
|
||||
{
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* image related */
|
||||
BITMAP bmp;
|
||||
LPCSTR filename = TEXT("lena.bmp");
|
||||
HDC HMemDC = NULL, HMemDC2 = NULL;
|
||||
HBITMAP HOldBmp = NULL;
|
||||
PVOID pBmpBits = NULL;
|
||||
HBITMAP H32BppBitmap = NULL;
|
||||
BITMAPINFO bmpi;
|
||||
|
||||
BOOL ConvertBitmapTo32Bpp(HDC hDC, BITMAP *bmp)
|
||||
{
|
||||
ZeroMemory(&bmpi, sizeof(BITMAPINFO));
|
||||
bmpi.bmiHeader.biSize = sizeof(BITMAPINFO);
|
||||
bmpi.bmiHeader.biWidth = bmp->bmWidth;
|
||||
bmpi.bmiHeader.biHeight = bmp->bmHeight;
|
||||
bmpi.bmiHeader.biPlanes = 1;
|
||||
bmpi.bmiHeader.biBitCount = 32;
|
||||
bmpi.bmiHeader.biCompression = BI_RGB;
|
||||
bmpi.bmiHeader.biSizeImage = 4 * bmpi.bmiHeader.biWidth * bmpi.bmiHeader.biHeight;
|
||||
H32BppBitmap = CreateDIBSection(hDC, &bmpi, DIB_RGB_COLORS, &pBmpBits, 0, 0);
|
||||
if(H32BppBitmap)
|
||||
{
|
||||
HBITMAP bmpalpha;
|
||||
SelectObject(hDC, H32BppBitmap);
|
||||
BitBlt(hDC, 0, 0, bmp->bmWidth, bmp->bmHeight, HMemDC, 0, 0, SRCCOPY);
|
||||
|
||||
/* load and apply alpha channel */
|
||||
bmpalpha = LoadImage(HInst, TEXT("lenaalpha.bmp"), IMAGE_BITMAP,
|
||||
0, 0, LR_LOADFROMFILE);
|
||||
if(bmpalpha)
|
||||
{
|
||||
COLORREF *col = pBmpBits;
|
||||
int x, y;
|
||||
HDC hdcTemp = CreateCompatibleDC(NULL);
|
||||
if(!hdcTemp)
|
||||
{
|
||||
DeleteObject(bmpalpha);
|
||||
return FALSE;
|
||||
}
|
||||
SelectObject(hdcTemp, bmpalpha);
|
||||
|
||||
for(y = 0; y < bmp->bmHeight; y++)
|
||||
{
|
||||
for(x = 0; x < bmp->bmWidth; x++)
|
||||
{
|
||||
COLORREF Color = (COLORREF)GetRValue(GetPixel(hdcTemp, x, y)) << 24;
|
||||
*col++ |= Color;
|
||||
}
|
||||
}
|
||||
|
||||
DeleteObject(bmpalpha);
|
||||
DeleteDC(hdcTemp);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
|
||||
LPARAM LParam)
|
||||
{
|
||||
switch (Msg)
|
||||
{
|
||||
case WM_CREATE:
|
||||
{
|
||||
/* create a memory DC */
|
||||
HMemDC = CreateCompatibleDC(NULL);
|
||||
if (HMemDC)
|
||||
{
|
||||
/* load a bitmap from file */
|
||||
HBITMAP HBmp =
|
||||
/* static_cast<HBITMAP> */(
|
||||
LoadImage(HInst, filename, IMAGE_BITMAP,
|
||||
0, 0, LR_LOADFROMFILE)
|
||||
);
|
||||
if (HBmp)
|
||||
{
|
||||
/* extract dimensions of the bitmap */
|
||||
GetObject(HBmp, sizeof(BITMAP), &bmp);
|
||||
|
||||
/* associate the bitmap with the memory DC */
|
||||
/* HOldBmp = static_cast<HBITMAP> */
|
||||
(SelectObject(HMemDC, HBmp)
|
||||
);
|
||||
HMemDC2 = CreateCompatibleDC(NULL);
|
||||
if(!ConvertBitmapTo32Bpp(HMemDC2, &bmp))
|
||||
{
|
||||
PostQuitMessage(0);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
case WM_PAINT:
|
||||
{
|
||||
PAINTSTRUCT ps;
|
||||
BLENDFUNCTION BlendFunc;
|
||||
HDC Hdc = BeginPaint(HWnd, &ps);
|
||||
#if 0
|
||||
try
|
||||
#endif
|
||||
{
|
||||
|
||||
BlendFunc.BlendOp = AC_SRC_OVER;
|
||||
BlendFunc.BlendFlags = 0;
|
||||
BlendFunc.SourceConstantAlpha = 128;
|
||||
BlendFunc.AlphaFormat = 0;
|
||||
|
||||
BitBlt(Hdc, 100, 90,
|
||||
bmp.bmWidth, bmp.bmHeight,
|
||||
HMemDC2, 0, 0,
|
||||
SRCCOPY);
|
||||
GdiAlphaBlend(Hdc, 0, 0, bmp.bmWidth, bmp.bmHeight,
|
||||
HMemDC2, 0, 0, bmp.bmWidth, bmp.bmHeight,
|
||||
BlendFunc);
|
||||
GdiAlphaBlend(Hdc, bmp.bmWidth - 15, 10, bmp.bmWidth / 2, bmp.bmHeight / 2,
|
||||
HMemDC2, 0, 0, bmp.bmWidth, bmp.bmHeight,
|
||||
BlendFunc);
|
||||
|
||||
BlendFunc.SourceConstantAlpha = 255;
|
||||
BlendFunc.AlphaFormat = AC_SRC_ALPHA;
|
||||
|
||||
GdiAlphaBlend(Hdc, 140, 200, bmp.bmWidth, bmp.bmHeight,
|
||||
HMemDC2, 0, 0, bmp.bmWidth, bmp.bmHeight,
|
||||
BlendFunc);
|
||||
GdiAlphaBlend(Hdc, 20, 210, (bmp.bmWidth / 3) * 2, (bmp.bmHeight / 3) * 2,
|
||||
HMemDC2, 0, 0, bmp.bmWidth, bmp.bmHeight,
|
||||
BlendFunc);
|
||||
}
|
||||
#if 0
|
||||
catch (...)
|
||||
{
|
||||
EndPaint(HWnd, &ps);
|
||||
}
|
||||
#endif
|
||||
EndPaint(HWnd, &ps);
|
||||
break;
|
||||
}
|
||||
case WM_DESTROY:
|
||||
{
|
||||
/* clean up */
|
||||
DeleteObject(SelectObject(HMemDC, HOldBmp));
|
||||
DeleteDC(HMemDC);
|
||||
DeleteDC(HMemDC2);
|
||||
|
||||
PostQuitMessage(0);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return DefWindowProc(HWnd, Msg, WParam, LParam);
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 87 KiB |
Binary file not shown.
Before Width: | Height: | Size: 87 KiB |
@@ -3,7 +3,6 @@
|
||||
#include <stdio.h>
|
||||
#include <windows.h>
|
||||
#include <ddk/ntddk.h>
|
||||
#include <rosrtl/string.h>
|
||||
|
||||
HANDLE OutputHandle;
|
||||
HANDLE InputHandle;
|
||||
@@ -16,18 +15,16 @@ ApcRoutine(PVOID Context,
|
||||
printf("(apc.exe) ApcRoutine(Context %p)\n", Context);
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
NTSTATUS Status;
|
||||
HANDLE FileHandle;
|
||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||
UNICODE_STRING FileName = ROS_STRING_INITIALIZER(L"\\C:\\a.txt");
|
||||
UNICODE_STRING FileName = UNICODE_STRING_INITIALIZER(L"\\C:\\a.txt");
|
||||
IO_STATUS_BLOCK IoStatus;
|
||||
CHAR Buffer[256];
|
||||
HANDLE EventHandle;
|
||||
LARGE_INTEGER off;
|
||||
|
||||
|
||||
AllocConsole();
|
||||
InputHandle = GetStdHandle(STD_INPUT_HANDLE);
|
||||
OutputHandle = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
@@ -59,30 +56,24 @@ int main(int argc, char* argv[])
|
||||
OPEN_EXISTING,
|
||||
FILE_FLAG_OVERLAPPED,
|
||||
NULL);
|
||||
|
||||
if (FileHandle == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
|
||||
printf("Open failed last err 0x%lu\n",GetLastError());
|
||||
printf("Open failed\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
off.QuadPart = 0;
|
||||
|
||||
printf("Reading file\n");
|
||||
Status = ZwReadFile(FileHandle,
|
||||
NULL,
|
||||
(PIO_APC_ROUTINE)ApcRoutine,
|
||||
(PVOID) 0xdeadbeef,
|
||||
(PVOID)0xdeadbeef,
|
||||
&IoStatus,
|
||||
Buffer,
|
||||
256,//len
|
||||
&off ,//offset must exist if file was opened for asynch. i/o aka. OVERLAPPED
|
||||
NULL);
|
||||
|
||||
256,
|
||||
NULL,
|
||||
NULL);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
printf("Read failed status 0x%lu\n",Status);
|
||||
printf("Read failed\n");
|
||||
}
|
||||
printf("Waiting\n");
|
||||
WaitForSingleObjectEx(EventHandle, INFINITE, TRUE);
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# $Id: makefile,v 1.10 2003/11/14 17:13:14 weiden Exp $
|
||||
# $Id: makefile,v 1.9 2002/06/02 19:24:57 chorns Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
@@ -14,8 +14,6 @@ TARGET_SDKLIBS = ntdll.a kernel32.a
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
@@ -1,53 +0,0 @@
|
||||
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
|
||||
VOID CALLBACK TimerApcProc(
|
||||
LPVOID lpArg,
|
||||
DWORD dwTimerLowValue,
|
||||
DWORD dwTimerHighValue )
|
||||
{
|
||||
printf("APC Callback %lu\n", *(PDWORD)lpArg);
|
||||
}
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
HANDLE hTimer;
|
||||
BOOL bSuccess;
|
||||
LARGE_INTEGER DueTime;
|
||||
DWORD value = 1;
|
||||
|
||||
hTimer = CreateWaitableTimer(NULL, FALSE, NULL );
|
||||
|
||||
if (!hTimer)
|
||||
{
|
||||
printf("CreateWaitableTimer failed!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
DueTime.QuadPart = -(LONGLONG)(5 * 10000000);
|
||||
|
||||
bSuccess = SetWaitableTimer(
|
||||
hTimer,
|
||||
&DueTime,
|
||||
2001 /*interval (using an odd number to be able to find it easy in kmode) */,
|
||||
TimerApcProc,
|
||||
&value /*callback argument*/,
|
||||
FALSE );
|
||||
|
||||
if (!bSuccess)
|
||||
{
|
||||
printf("SetWaitableTimer failed!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (;value <= 10; value++ )
|
||||
{
|
||||
SleepEx(INFINITE, TRUE /*alertable*/ );
|
||||
}
|
||||
|
||||
CloseHandle( hTimer );
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# $Id: makefile,v 1.16 2003/11/14 17:13:14 weiden Exp $
|
||||
# $Id: makefile,v 1.15 2002/06/02 19:24:57 chorns Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
@@ -12,8 +12,6 @@ TARGET_NAME = args
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
@@ -1,4 +1,5 @@
|
||||
# $Id: makefile,v 1.6 2003/11/14 17:13:15 weiden Exp $
|
||||
# $Id: makefile,v 1.5 2002/06/02 19:24:57 chorns Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_NORC = yes
|
||||
@@ -13,8 +14,6 @@ TARGET_SDKLIBS = ntdll.a kernel32.a
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
@@ -24,6 +24,7 @@ thread_main2(LPVOID param)
|
||||
|
||||
int main (void)
|
||||
{
|
||||
HANDLE hThread;
|
||||
DWORD i=0;
|
||||
DWORD id;
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# $Id: makefile,v 1.11 2003/11/14 17:13:15 weiden Exp $
|
||||
# $Id: makefile,v 1.10 2002/06/02 19:24:57 chorns Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
@@ -14,8 +14,6 @@ TARGET_SDKLIBS = kernel32.a
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
@@ -12,7 +12,6 @@
|
||||
|
||||
|
||||
#include <windows.h>
|
||||
#include <string.h>
|
||||
|
||||
HINSTANCE HInst;
|
||||
const char* WndClassName = "GMainWnd";
|
||||
|
@@ -13,8 +13,6 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror -D__USE_W32API
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
@@ -13,8 +13,6 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
|
||||
|
||||
TARGET_OBJECTS = buttontst.o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
@@ -15,6 +15,7 @@ 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,
|
||||
|
@@ -13,8 +13,6 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
|
||||
|
||||
TARGET_OBJECTS = buttontst2.o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
@@ -27,7 +27,7 @@ WinMain(HINSTANCE hInstance,
|
||||
wc.cbWndExtra = 0;
|
||||
if (RegisterClass(&wc) == 0)
|
||||
{
|
||||
fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n",
|
||||
fprintf(stderr, "RegisterClass failed (last error 0x%X)\n",
|
||||
GetLastError());
|
||||
return(1);
|
||||
}
|
||||
@@ -45,7 +45,7 @@ WinMain(HINSTANCE hInstance,
|
||||
NULL);
|
||||
if (hWnd == NULL)
|
||||
{
|
||||
fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n",
|
||||
fprintf(stderr, "CreateWindow failed (last error 0x%X)\n",
|
||||
GetLastError());
|
||||
return(1);
|
||||
}
|
||||
|
@@ -11,8 +11,6 @@ TARGET_SDKLIBS = kernel32.a
|
||||
|
||||
TARGET_OBJECTS = capclock.o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: capclock.c,v 1.3 2003/11/14 17:13:16 weiden Exp $
|
||||
/* $Id: capclock.c,v 1.2 2003/09/24 20:05:29 weiden Exp $
|
||||
*
|
||||
* DESCRIPTION: Simple Win32 Caption Clock
|
||||
* PROJECT : ReactOS (test applications)
|
||||
@@ -7,7 +7,6 @@
|
||||
* LICENSE : GNU GPL v2.0
|
||||
*/
|
||||
#include <windows.h>
|
||||
#include <string.h>
|
||||
|
||||
UINT Timer = 1;
|
||||
|
||||
|
@@ -34,7 +34,7 @@ WinMain(HINSTANCE hInstance,
|
||||
wc.cbWndExtra = 0;
|
||||
if (RegisterClass(&wc) == 0)
|
||||
{
|
||||
fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n",
|
||||
fprintf(stderr, "RegisterClass failed (last error 0x%X)\n",
|
||||
GetLastError());
|
||||
return(1);
|
||||
}
|
||||
@@ -52,7 +52,7 @@ WinMain(HINSTANCE hInstance,
|
||||
NULL);
|
||||
if (hWnd == NULL)
|
||||
{
|
||||
fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n",
|
||||
fprintf(stderr, "CreateWindow failed (last error 0x%X)\n",
|
||||
GetLastError());
|
||||
return(1);
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# $Id: makefile,v 1.2 2003/11/14 17:13:16 weiden Exp $
|
||||
# $Id: makefile,v 1.1 2003/10/15 18:28:54 weiden Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
@@ -14,8 +14,6 @@ TARGET_SDKLIBS = kernel32.a gdi32.a ntdll.a
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
100
reactos/apps/tests/cliarea/cliarea.c
Normal file
100
reactos/apps/tests/cliarea/cliarea.c
Normal file
@@ -0,0 +1,100 @@
|
||||
#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;
|
||||
|
||||
wc.lpszClassName = "CliAreaClass";
|
||||
wc.lpfnWndProc = MainWndProc;
|
||||
wc.style = CS_VREDRAW | CS_HREDRAW;
|
||||
wc.hInstance = hInstance;
|
||||
wc.hIcon = LoadIcon(NULL, (LPCTSTR)IDI_APPLICATION);
|
||||
wc.hCursor = LoadCursor(NULL, (LPCTSTR)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("CliAreaClass",
|
||||
"ClientArea Test",
|
||||
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 txt[100];
|
||||
|
||||
switch(msg)
|
||||
{
|
||||
case WM_LBUTTONUP:
|
||||
{
|
||||
ULONG x, y;
|
||||
RECT Rect;
|
||||
GetWindowRect(hWnd, &Rect);
|
||||
SendMessage(hWnd, WM_NCCALCSIZE, 0, (LPARAM)(&Rect));
|
||||
hDC = GetWindowDC(0);
|
||||
Rectangle(hDC, Rect.left, Rect.top, Rect.right, Rect.bottom);
|
||||
sprintf(txt, "Client coordinates: %d, %d, %d, %d\0", Rect.left, Rect.top, Rect.right, Rect.bottom);
|
||||
TextOut(hDC, Rect.left + 1, Rect.top + 1, (LPCTSTR)txt, strlen(txt));
|
||||
ReleaseDC(0, hDC);
|
||||
break;
|
||||
}
|
||||
|
||||
case WM_DESTROY:
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
|
||||
default:
|
||||
return DefWindowProc(hWnd, msg, wParam, lParam);
|
||||
}
|
||||
return 0;
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
# $Id: makefile,v 1.1 2004/02/08 21:57:35 weiden Exp $
|
||||
# $Id: makefile,v 1.1 2003/10/04 12:14:37 weiden Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
@@ -8,14 +8,12 @@ TARGET_TYPE = program
|
||||
|
||||
TARGET_APPTYPE = windows
|
||||
|
||||
TARGET_NAME = gradient
|
||||
TARGET_NAME = cliarea
|
||||
|
||||
TARGET_SDKLIBS = gdi32.a
|
||||
TARGET_SDKLIBS = kernel32.a gdi32.a
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
@@ -73,7 +73,7 @@ char AddString[] = "string added";
|
||||
typedef void FunctionHandler(HWND,DWORD,WPARAM,LPARAM);
|
||||
typedef FunctionHandler* LPFUNCTIONHANDLER;
|
||||
|
||||
void PrintTextXY(char* Text,int x,int y,int len, RECT rect)
|
||||
PrintTextXY(char* Text,int x,int y,int len, RECT rect)
|
||||
{
|
||||
HDC hdc;
|
||||
hdc = GetDC (g_hwnd);
|
||||
@@ -141,61 +141,61 @@ struct
|
||||
}
|
||||
Msg[] =
|
||||
{
|
||||
{"CB_ADDSTRING",CB_ADDSTRING,0,(LPARAM)&AddString,&HandlePrintReturnHex},
|
||||
{"CB_ADDSTRING - long",CB_ADDSTRING,0,(LPARAM)"very loooooooooong striiinnnnnnnnnggg",&HandlePrintReturnHex},
|
||||
{"CB_DELETESTRING",CB_DELETESTRING,2,0,&HandlePrintReturnHex}, /* remember to catch WM_DELETEITEM*/
|
||||
"CB_ADDSTRING",CB_ADDSTRING,0,(LPARAM)&AddString,&HandlePrintReturnHex,
|
||||
"CB_ADDSTRING - long",CB_ADDSTRING,0,(LPARAM)"very loooooooooong striiinnnnnnnnnggg",&HandlePrintReturnHex,
|
||||
"CB_DELETESTRING",CB_DELETESTRING,2,0,&HandlePrintReturnHex, /* remember to catch WM_DELETEITEM*/
|
||||
|
||||
/* What a message, why M$ decided to implement his thing ? */
|
||||
{"CB_DIR - drives",CB_DIR,DDL_DRIVES,
|
||||
"CB_DIR - drives",CB_DIR,DDL_DRIVES,
|
||||
/* Hoping that most machines have this */
|
||||
(LPARAM)"C:\\",
|
||||
&HandlePrintReturnHex},
|
||||
&HandlePrintReturnHex,
|
||||
|
||||
{"CB_DIR - dirs",CB_DIR,DDL_DIRECTORY,(LPARAM)"C:\\*",&HandlePrintReturnHex},
|
||||
"CB_DIR - dirs",CB_DIR,DDL_DIRECTORY,(LPARAM)"C:\\*",&HandlePrintReturnHex,
|
||||
|
||||
{"CB_DIR - files",CB_DIR,
|
||||
"CB_DIR - files",CB_DIR,
|
||||
DDL_ARCHIVE | DDL_EXCLUSIVE | DDL_HIDDEN | DDL_READONLY | DDL_READWRITE | DDL_SYSTEM,
|
||||
(LPARAM)"C:\\*",&HandlePrintReturnHex},
|
||||
(LPARAM)"C:\\*",&HandlePrintReturnHex,
|
||||
|
||||
/* Do not forget WM_COMPAREITEM */
|
||||
|
||||
{"CB_FINDSTRING",CB_FINDSTRING,1,(LPARAM)"str",&HandlePrintReturnHex},
|
||||
{"CB_FINDSTRINGEXACT(-1)",CB_FINDSTRINGEXACT,-1,(LPARAM)&AddString,&HandlePrintReturnHex},
|
||||
{"CB_FINDSTRINGEXACT(2)",CB_FINDSTRINGEXACT,2,(LPARAM)&AddString,&HandlePrintReturnHex},
|
||||
"CB_FINDSTRING",CB_FINDSTRING,1,(LPARAM)"str",&HandlePrintReturnHex,
|
||||
"CB_FINDSTRINGEXACT(-1)",CB_FINDSTRINGEXACT,-1,(LPARAM)&AddString,&HandlePrintReturnHex,
|
||||
"CB_FINDSTRINGEXACT(2)",CB_FINDSTRINGEXACT,2,(LPARAM)&AddString,&HandlePrintReturnHex,
|
||||
|
||||
/* "CB_GETCOMBOBOXINFO",CB_GETCOMBOBOXINFO,0,0,&HandlePrintReturnHex, winXP & .net server remember to handle the struct */
|
||||
|
||||
{"CB_GETCOUNT",CB_GETCOUNT,0,0,&HandlePrintReturnHex},
|
||||
"CB_GETCOUNT",CB_GETCOUNT,0,0,&HandlePrintReturnHex,
|
||||
|
||||
{"CB_GETCURSEL",CB_GETCURSEL,0,0,&HandlePrintReturnHex},
|
||||
"CB_GETCURSEL",CB_GETCURSEL,0,0,&HandlePrintReturnHex,
|
||||
|
||||
/* To implement "CB_GETEDITSEL - vars",CB_GETEDITSEL,,,&HandlePrintReturnHex, */
|
||||
|
||||
{"CB_GETEXTENDEDUI",CB_GETEXTENDEDUI,0,0,&HandlePrintReturnHex},
|
||||
{"CB_GETHORIZONTALEXTENT",CB_GETHORIZONTALEXTENT,0,0,&HandlePrintReturnHex},
|
||||
"CB_GETEXTENDEDUI",CB_GETEXTENDEDUI,0,0,&HandlePrintReturnHex,
|
||||
"CB_GETHORIZONTALEXTENT",CB_GETHORIZONTALEXTENT,0,0,&HandlePrintReturnHex,
|
||||
|
||||
|
||||
|
||||
{"CB_GETLBTEXT",CB_GETLBTEXT,1,(LPARAM)&TextBuffer[8],&HandlePrintReturnStr},
|
||||
{"CB_GETLBTEXTLEN",CB_GETLBTEXTLEN,1,0,&HandlePrintReturnHex},
|
||||
{"CB_GETLOCALE",CB_GETLOCALE,0,0,&HandlePrintReturnHex},
|
||||
"CB_GETLBTEXT",CB_GETLBTEXT,1,(LPARAM)&TextBuffer[8],&HandlePrintReturnStr,
|
||||
"CB_GETLBTEXTLEN",CB_GETLBTEXTLEN,1,0,&HandlePrintReturnHex,
|
||||
"CB_GETLOCALE",CB_GETLOCALE,0,0,&HandlePrintReturnHex,
|
||||
|
||||
/* "CB_GETMINVISIBLE",CB_GETMINVISIBLE,0,0,&HandlePrintReturnHex, Included in Windows XP and Windows .NET Server. */
|
||||
|
||||
{"CB_GETTOPINDEX",CB_GETTOPINDEX,0,0,&HandlePrintReturnHex},
|
||||
"CB_GETTOPINDEX",CB_GETTOPINDEX,0,0,&HandlePrintReturnHex,
|
||||
|
||||
{"CB_INITSTORAGE",CB_INITSTORAGE,10,200,&HandlePrintReturnHex},
|
||||
{"CB_INSERTSTRING",CB_INSERTSTRING,2,(LPARAM)"inserted string",&HandlePrintReturnHex},
|
||||
"CB_INITSTORAGE",CB_INITSTORAGE,10,200,&HandlePrintReturnHex,
|
||||
"CB_INSERTSTRING",CB_INSERTSTRING,2,(LPARAM)"inserted string",&HandlePrintReturnHex,
|
||||
|
||||
{"CB_LIMITTEXT",CB_LIMITTEXT,10,0,&HandlePrintReturnHex},
|
||||
{"CB_RESETCONTENT",CB_RESETCONTENT ,0,0,&HandlePrintReturnHex},
|
||||
{"CB_SELECTSTRING",CB_SELECTSTRING,2,(LPARAM)"str",&HandlePrintReturnHex},
|
||||
{"CB_SETCURSEL",CB_SETCURSEL,1,0,&HandlePrintReturnHex},
|
||||
"CB_LIMITTEXT",CB_LIMITTEXT,10,0,&HandlePrintReturnHex,
|
||||
"CB_RESETCONTENT",CB_RESETCONTENT ,0,0,&HandlePrintReturnHex,
|
||||
"CB_SELECTSTRING",CB_SELECTSTRING,2,(LPARAM)"str",&HandlePrintReturnHex,
|
||||
"CB_SETCURSEL",CB_SETCURSEL,1,0,&HandlePrintReturnHex,
|
||||
|
||||
{"CB_SETDROPPEDWIDTH",CB_SETDROPPEDWIDTH,250,0,&HandlePrintReturnHex},
|
||||
"CB_SETDROPPEDWIDTH",CB_SETDROPPEDWIDTH,250,0,&HandlePrintReturnHex,
|
||||
|
||||
{"CB_SETEXTENDEDUI - set",CB_SETEXTENDEDUI,TRUE,0,&HandlePrintReturnHex},
|
||||
{"CB_SETEXTENDEDUI - clear",CB_SETEXTENDEDUI,FALSE,0,&HandlePrintReturnHex},
|
||||
"CB_SETEXTENDEDUI - set",CB_SETEXTENDEDUI,TRUE,0,&HandlePrintReturnHex,
|
||||
"CB_SETEXTENDEDUI - clear",CB_SETEXTENDEDUI,FALSE,0,&HandlePrintReturnHex,
|
||||
|
||||
/*
|
||||
* win2k have a small bug with this ^ , if you press F4 while it is cleared,
|
||||
@@ -204,30 +204,30 @@ Msg[] =
|
||||
* to an arrow
|
||||
*/
|
||||
|
||||
{"CB_SETHORIZONTALEXTENT",CB_SETHORIZONTALEXTENT,500,0,&HandlePrintReturnHex},
|
||||
"CB_SETHORIZONTALEXTENT",CB_SETHORIZONTALEXTENT,500,0,&HandlePrintReturnHex,
|
||||
|
||||
{"CB_GETITEMDATA",CB_GETITEMDATA,1,0,&HandlePrintReturnHex},
|
||||
{"CB_SETITEMDATA",CB_SETITEMDATA,1,0x791031,&HandlePrintReturnHex},
|
||||
"CB_GETITEMDATA",CB_GETITEMDATA,1,0,&HandlePrintReturnHex,
|
||||
"CB_SETITEMDATA",CB_SETITEMDATA,1,0x791031,&HandlePrintReturnHex,
|
||||
|
||||
{"CB_SETITEMHEIGHT",CB_SETITEMHEIGHT,-1,30,&HandlePrintReturnHex},
|
||||
{"CB_GETITEMHEIGHT",CB_GETITEMHEIGHT,2,0,&HandlePrintReturnHex},
|
||||
"CB_SETITEMHEIGHT",CB_SETITEMHEIGHT,-1,30,&HandlePrintReturnHex,
|
||||
"CB_GETITEMHEIGHT",CB_GETITEMHEIGHT,2,0,&HandlePrintReturnHex,
|
||||
|
||||
/* "CB_SETMINVISIBLE",CB_SETMINVISIBLE,4,0,&HandlePrintReturnHex, Included in Windows XP and Windows .NET Server */
|
||||
|
||||
{"CB_GETEDITSEL",CB_GETEDITSEL,(WPARAM)NULL,(LPARAM)NULL,&HandlePrintReturnHex},
|
||||
{"CB_SETEDITSEL",CB_SETEDITSEL,0,0x00020005,&HandlePrintReturnHex},
|
||||
{"CB_SETEDITSEL - clear",CB_SETEDITSEL,0,0xFFFFFFFF,&HandlePrintReturnHex},
|
||||
"CB_GETEDITSEL",CB_GETEDITSEL,(WPARAM)NULL,(LPARAM)NULL,&HandlePrintReturnHex,
|
||||
"CB_SETEDITSEL",CB_SETEDITSEL,0,0x00020005,&HandlePrintReturnHex,
|
||||
"CB_SETEDITSEL - clear",CB_SETEDITSEL,0,0xFFFFFFFF,&HandlePrintReturnHex,
|
||||
|
||||
{"CB_SETTOPINDEX",CB_SETTOPINDEX,3,0,&HandlePrintReturnHex},
|
||||
"CB_SETTOPINDEX",CB_SETTOPINDEX,3,0,&HandlePrintReturnHex,
|
||||
|
||||
{"CB_SHOWDROPDOWN - true",CB_SHOWDROPDOWN,TRUE,0,&HandlePrintReturnHex},
|
||||
{"CB_SHOWDROPDOWN - false",CB_SHOWDROPDOWN,FALSE,0,&HandlePrintReturnHex},
|
||||
"CB_SHOWDROPDOWN - true",CB_SHOWDROPDOWN,TRUE,0,&HandlePrintReturnHex,
|
||||
"CB_SHOWDROPDOWN - false",CB_SHOWDROPDOWN,FALSE,0,&HandlePrintReturnHex,
|
||||
|
||||
{"CB_GETDROPPEDCONTROLRECT",CB_GETDROPPEDCONTROLRECT,0,(LPARAM)&rect,&HandlePrintRect},
|
||||
{"CB_GETDROPPEDSTATE",CB_GETDROPPEDSTATE,0,0,&HandlePrintReturnHex},
|
||||
{"CB_GETDROPPEDWIDTH",CB_GETDROPPEDWIDTH,0,0,&HandlePrintReturnHex},
|
||||
"CB_GETDROPPEDCONTROLRECT",CB_GETDROPPEDCONTROLRECT,0,(LPARAM)&rect,&HandlePrintRect,
|
||||
"CB_GETDROPPEDSTATE",CB_GETDROPPEDSTATE,0,0,&HandlePrintReturnHex,
|
||||
"CB_GETDROPPEDWIDTH",CB_GETDROPPEDWIDTH,0,0,&HandlePrintReturnHex,
|
||||
|
||||
{"WM_PASTE",WM_PASTE,0,0,&HandlePrintReturnHex},
|
||||
"WM_PASTE",WM_PASTE,0,0,&HandlePrintReturnHex,
|
||||
};
|
||||
|
||||
#define MAXMESSAGEBUTTONS 40
|
||||
@@ -238,23 +238,23 @@ struct
|
||||
DWORD Code; /* Style Code */
|
||||
}
|
||||
Styles[] = {
|
||||
{"WS_DISABLED",WS_DISABLED},
|
||||
{"CBS_AUTOHSCROLL",CBS_AUTOHSCROLL},
|
||||
{"CBS_DISABLENOSCROLL",CBS_DISABLENOSCROLL},
|
||||
{"CBS_DROPDOWN",CBS_DROPDOWN},
|
||||
{"CBS_DROPDOWNLIST",CBS_DROPDOWNLIST},
|
||||
{"CBS_HASSTRINGS",CBS_HASSTRINGS},
|
||||
{"CBS_LOWERCASE",CBS_LOWERCASE},
|
||||
{"CBS_NOINTEGRALHEIGHT",CBS_NOINTEGRALHEIGHT},
|
||||
{"CBS_OEMCONVERT",CBS_OEMCONVERT},
|
||||
{"CBS_OWNERDRAWFIXED",CBS_OWNERDRAWFIXED},
|
||||
{"CBS_OWNERDRAWVARIABLE",CBS_OWNERDRAWVARIABLE},
|
||||
{"CBS_SIMPLE",CBS_SIMPLE},
|
||||
{"CBS_SORT",CBS_SORT},
|
||||
{"CBS_UPPERCASE",CBS_UPPERCASE},
|
||||
{"CBS_DISABLENOSCROLL",CBS_DISABLENOSCROLL},
|
||||
{"WS_HSCROLL",WS_HSCROLL},
|
||||
{"WS_VSCROLL",WS_VSCROLL}
|
||||
"WS_DISABLED",WS_DISABLED,
|
||||
"CBS_AUTOHSCROLL",CBS_AUTOHSCROLL,
|
||||
"CBS_DISABLENOSCROLL",CBS_DISABLENOSCROLL,
|
||||
"CBS_DROPDOWN",CBS_DROPDOWN,
|
||||
"CBS_DROPDOWNLIST",CBS_DROPDOWNLIST,
|
||||
"CBS_HASSTRINGS",CBS_HASSTRINGS,
|
||||
"CBS_LOWERCASE",CBS_LOWERCASE,
|
||||
"CBS_NOINTEGRALHEIGHT",CBS_NOINTEGRALHEIGHT,
|
||||
"CBS_OEMCONVERT",CBS_OEMCONVERT,
|
||||
"CBS_OWNERDRAWFIXED",CBS_OWNERDRAWFIXED,
|
||||
"CBS_OWNERDRAWVARIABLE",CBS_OWNERDRAWVARIABLE,
|
||||
"CBS_SIMPLE",CBS_SIMPLE,
|
||||
"CBS_SORT",CBS_SORT,
|
||||
"CBS_UPPERCASE",CBS_UPPERCASE,
|
||||
"CBS_DISABLENOSCROLL",CBS_DISABLENOSCROLL,
|
||||
"WS_HSCROLL",WS_HSCROLL,
|
||||
"WS_VSCROLL",WS_VSCROLL
|
||||
};
|
||||
|
||||
/* The number of check buttons we have.
|
||||
|
@@ -15,9 +15,6 @@ TARGET_OBJECTS = \
|
||||
combotst.o \
|
||||
utils.o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror
|
||||
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# $Id: Makefile,v 1.8 2003/11/14 17:13:16 weiden Exp $
|
||||
# $Id: Makefile,v 1.7 2002/06/02 19:24:57 chorns Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
@@ -12,8 +12,6 @@ TARGET_NAME = consume
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# $Id: Makefile,v 1.2 2003/11/14 17:13:16 weiden Exp $
|
||||
# $Id: Makefile,v 1.1 2002/12/27 23:54:33 gvg Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
@@ -12,8 +12,6 @@ TARGET_NAME = copymove
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
@@ -4,7 +4,6 @@
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <tchar.h>
|
||||
#include <windows.h>
|
||||
|
||||
@@ -55,20 +54,20 @@ CreateTestFile(LPCTSTR filename, DWORD attributes)
|
||||
0);
|
||||
|
||||
if (INVALID_HANDLE_VALUE == file) {
|
||||
fprintf(stderr, "CreateFile failed with code %lu\n", GetLastError());
|
||||
fprintf(stderr, "CreateFile failed with code %d\n", GetLastError());
|
||||
exit(1);
|
||||
}
|
||||
for(c = 0; c < sizeof(buffer); c++) {
|
||||
buffer[c] = (char) c;
|
||||
}
|
||||
if (! WriteFile(file, buffer, sizeof(buffer), &wrote, NULL)) {
|
||||
fprintf(stderr, "WriteFile failed with code %lu\n", GetLastError());
|
||||
fprintf(stderr, "WriteFile failed with code %d\n", GetLastError());
|
||||
exit(1);
|
||||
}
|
||||
CloseHandle(file);
|
||||
|
||||
if (! SetFileAttributes(filename, attributes)) {
|
||||
fprintf(stderr, "SetFileAttributes failed with code %lu\n", GetLastError());
|
||||
fprintf(stderr, "SetFileAttributes failed with code %d\n", GetLastError());
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
@@ -83,7 +82,7 @@ static void
|
||||
CreateTestDir(LPCTSTR dirname)
|
||||
{
|
||||
if (! CreateDirectory(dirname, NULL)) {
|
||||
fprintf(stderr, "CreateDirectory failed with code %lu\n", GetLastError());
|
||||
fprintf(stderr, "CreateDirectory failed with code %d\n", GetLastError());
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
@@ -106,21 +105,21 @@ CheckTestFile(LPCTSTR filename, DWORD attributes)
|
||||
0);
|
||||
|
||||
if (INVALID_HANDLE_VALUE == file) {
|
||||
fprintf(stderr, "CreateFile failed with code %lu\n", GetLastError());
|
||||
fprintf(stderr, "CreateFile failed with code %d\n", GetLastError());
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (! ReadFile(file, buffer, sizeof(buffer), &read, NULL)) {
|
||||
fprintf(stderr, "ReadFile failed with code %lu\n", GetLastError());
|
||||
fprintf(stderr, "ReadFile failed with code %d\n", GetLastError());
|
||||
exit(1);
|
||||
}
|
||||
if (read != sizeof(buffer)) {
|
||||
fprintf(stderr, "Trying to read %u bytes but got %lu bytes\n", sizeof(buffer), read);
|
||||
fprintf(stderr, "Trying to read %d bytes but got %d bytes\n", sizeof(buffer), read);
|
||||
exit(1);
|
||||
}
|
||||
for(c = 0; c < sizeof(buffer); c++) {
|
||||
if (buffer[c] != (char) c) {
|
||||
fprintf(stderr, "File contents changed at position %u\n", c);
|
||||
fprintf(stderr, "File contents changed at position %d\n", c);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
@@ -129,11 +128,11 @@ CheckTestFile(LPCTSTR filename, DWORD attributes)
|
||||
|
||||
diskattr = GetFileAttributes(filename);
|
||||
if (INVALID_FILE_ATTRIBUTES == diskattr) {
|
||||
fprintf(stderr, "GetFileAttributes failed with code %lu\n", GetLastError());
|
||||
fprintf(stderr, "GetFileAttributes failed with code %d\n", GetLastError());
|
||||
exit(1);
|
||||
}
|
||||
if (diskattr != attributes) {
|
||||
fprintf(stderr, "Attribute mismatch, expected 0x%08lx found 0x%08lx\n", attributes, diskattr);
|
||||
fprintf(stderr, "Attribute mismatch, expected 0x%08x found 0x%08x\n", attributes, diskattr);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
@@ -150,7 +149,7 @@ main(int argc, char *argv[])
|
||||
CreateTestFile(_T("begin.dat"), FILE_ATTRIBUTE_ARCHIVE);
|
||||
DeleteTestFile(_T("end.dat"));
|
||||
if (! MoveFile(_T("begin.dat"), _T("end.dat"))) {
|
||||
fprintf(stderr, "MoveFile failed with code %lu\n", GetLastError());
|
||||
fprintf(stderr, "MoveFile failed with code %d\n", GetLastError());
|
||||
exit(1);
|
||||
}
|
||||
CheckTestFile(_T("end.dat"), FILE_ATTRIBUTE_ARCHIVE);
|
||||
@@ -163,7 +162,7 @@ main(int argc, char *argv[])
|
||||
fprintf(stderr, "MoveFile succeeded but shouldn't have\n");
|
||||
exit(1);
|
||||
} else if (ERROR_FILE_NOT_FOUND != GetLastError()) {
|
||||
fprintf(stderr, "MoveFile failed with unexpected code %lu\n", GetLastError());
|
||||
fprintf(stderr, "MoveFile failed with unexpected code %d\n", GetLastError());
|
||||
exit(1);
|
||||
}
|
||||
DeleteTestFile(_T("end.dat"));
|
||||
@@ -177,7 +176,7 @@ main(int argc, char *argv[])
|
||||
fprintf(stderr, "MoveFile succeeded but shouldn't have\n");
|
||||
exit(1);
|
||||
} else if (ERROR_ALREADY_EXISTS != GetLastError()) {
|
||||
fprintf(stderr, "MoveFile failed with unexpected code %lu\n", GetLastError());
|
||||
fprintf(stderr, "MoveFile failed with unexpected code %d\n", GetLastError());
|
||||
exit(1);
|
||||
}
|
||||
DeleteTestFile(_T("begin.dat"));
|
||||
@@ -191,7 +190,7 @@ main(int argc, char *argv[])
|
||||
CreateTestFile(_T("begin\\file.dat"), FILE_ATTRIBUTE_NORMAL);
|
||||
DeleteTestDir(_T("end"));
|
||||
if (! MoveFile(_T("begin"), _T("end"))) {
|
||||
fprintf(stderr, "MoveFile failed with code %lu\n", GetLastError());
|
||||
fprintf(stderr, "MoveFile failed with code %d\n", GetLastError());
|
||||
exit(1);
|
||||
}
|
||||
CheckTestFile(_T("end\\file.dat"), FILE_ATTRIBUTE_NORMAL);
|
||||
@@ -203,7 +202,7 @@ main(int argc, char *argv[])
|
||||
CreateTestFile(_T("file.dat"), FILE_ATTRIBUTE_NORMAL);
|
||||
CreateTestDir(_T("end"));
|
||||
if (! MoveFile(_T("file.dat"), _T("end\\file.dat"))) {
|
||||
fprintf(stderr, "MoveFile failed with code %lu\n", GetLastError());
|
||||
fprintf(stderr, "MoveFile failed with code %d\n", GetLastError());
|
||||
exit(1);
|
||||
}
|
||||
CheckTestFile(_T("end\\file.dat"), FILE_ATTRIBUTE_ARCHIVE);
|
||||
@@ -214,7 +213,7 @@ main(int argc, char *argv[])
|
||||
CreateTestFile(_T("begin.dat"), FILE_ATTRIBUTE_READONLY);
|
||||
DeleteTestFile(_T("end.dat"));
|
||||
if (! MoveFile(_T("begin.dat"), _T("end.dat"))) {
|
||||
fprintf(stderr, "MoveFile failed with code %lu\n", GetLastError());
|
||||
fprintf(stderr, "MoveFile failed with code %d\n", GetLastError());
|
||||
exit(1);
|
||||
}
|
||||
CheckTestFile(_T("end.dat"), FILE_ATTRIBUTE_ARCHIVE | FILE_ATTRIBUTE_READONLY);
|
||||
@@ -226,7 +225,7 @@ main(int argc, char *argv[])
|
||||
CreateTestFile(_T("begin.dat"), FILE_ATTRIBUTE_ARCHIVE);
|
||||
DeleteTestFile(otherfile);
|
||||
if (! MoveFile(_T("begin.dat"), otherfile)) {
|
||||
fprintf(stderr, "MoveFile failed with code %lu\n", GetLastError());
|
||||
fprintf(stderr, "MoveFile failed with code %d\n", GetLastError());
|
||||
exit(1);
|
||||
}
|
||||
CheckTestFile(otherfile, FILE_ATTRIBUTE_ARCHIVE);
|
||||
@@ -239,7 +238,7 @@ main(int argc, char *argv[])
|
||||
CreateTestFile(_T("begin.dat"), FILE_ATTRIBUTE_ARCHIVE);
|
||||
CreateTestFile(_T("end.dat"), FILE_ATTRIBUTE_ARCHIVE);
|
||||
if (! MoveFileEx(_T("begin.dat"), _T("end.dat"), MOVEFILE_REPLACE_EXISTING)) {
|
||||
fprintf(stderr, "MoveFileEx failed with code %lu\n", GetLastError());
|
||||
fprintf(stderr, "MoveFileEx failed with code %d\n", GetLastError());
|
||||
exit(1);
|
||||
}
|
||||
DeleteTestFile(_T("begin.dat"));
|
||||
@@ -255,7 +254,7 @@ main(int argc, char *argv[])
|
||||
exit(1);
|
||||
} else if (ERROR_ALREADY_EXISTS != GetLastError() &&
|
||||
ERROR_ACCESS_DENIED != GetLastError()) {
|
||||
fprintf(stderr, "MoveFileEx failed with unexpected code %lu\n", GetLastError());
|
||||
fprintf(stderr, "MoveFileEx failed with unexpected code %d\n", GetLastError());
|
||||
exit(1);
|
||||
}
|
||||
DeleteTestFile(_T("begin.dat"));
|
||||
@@ -273,7 +272,7 @@ main(int argc, char *argv[])
|
||||
fprintf(stderr, "MoveFileEx succeeded but shouldn't have\n");
|
||||
exit(1);
|
||||
} else if (ERROR_NOT_SAME_DEVICE != GetLastError()) {
|
||||
fprintf(stderr, "MoveFileEx failed with unexpected code %lu\n", GetLastError());
|
||||
fprintf(stderr, "MoveFileEx failed with unexpected code %d\n", GetLastError());
|
||||
exit(1);
|
||||
}
|
||||
DeleteTestFile(otherfile);
|
||||
@@ -288,7 +287,7 @@ main(int argc, char *argv[])
|
||||
CreateTestFile(_T("begin.dat"), FILE_ATTRIBUTE_ARCHIVE);
|
||||
DeleteTestFile(otherfile);
|
||||
if (! MoveFileEx(_T("begin.dat"), otherfile, MOVEFILE_COPY_ALLOWED)) {
|
||||
fprintf(stderr, "MoveFileEx failed with code %lu\n", GetLastError());
|
||||
fprintf(stderr, "MoveFileEx failed with code %d\n", GetLastError());
|
||||
exit(1);
|
||||
}
|
||||
CheckTestFile(otherfile, FILE_ATTRIBUTE_ARCHIVE);
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# $Id: Makefile,v 1.7 2003/11/14 17:13:16 weiden Exp $
|
||||
# $Id: Makefile,v 1.6 2002/06/02 19:24:58 chorns Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
@@ -14,8 +14,6 @@ TARGET_SDKLIBS = kernel32.a user32.a
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/* $Id: count.c,v 1.2 2003/11/14 17:13:16 weiden Exp $
|
||||
/* $Id: count.c,v 1.1 2001/03/26 21:30:20 ea Exp $
|
||||
*
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int n = 0;
|
||||
|
||||
|
@@ -1,25 +0,0 @@
|
||||
# $Id: Makefile,v 1.1 2003/12/28 21:36:53 gvg Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_NORC = yes
|
||||
|
||||
TARGET_TYPE = program
|
||||
|
||||
TARGET_APPTYPE = console
|
||||
|
||||
TARGET_NAME = create-links
|
||||
|
||||
TARGET_SDKLIBS = kernel32.a gdi32.a
|
||||
|
||||
TARGET_GCCLIBS = ole32 uuid shell32 shlwapi
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror -D__USE_W32API -D_WIN32_IE=0x0400
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
||||
# EOF
|
@@ -1,97 +0,0 @@
|
||||
/*
|
||||
|
||||
compile via:
|
||||
gcc -o create-links -D_WIN32_IE=0x400 create-links.c -lole32 -luuid -lshell32 -lshlwapi
|
||||
|
||||
Martin Fuchs, 27.12.2003
|
||||
|
||||
*/
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
|
||||
#include <shlobj.h>
|
||||
#include <objidl.h>
|
||||
#include <shlwapi.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
HRESULT CreateShellLink(LPCSTR linkPath, LPCSTR cmd, LPCSTR arg, LPCSTR dir, LPCSTR iconPath, int icon_nr, LPCSTR comment)
|
||||
{
|
||||
IShellLinkA* psl;
|
||||
IPersistFile* ppf;
|
||||
WCHAR buffer[MAX_PATH];
|
||||
|
||||
HRESULT hr = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLink, (LPVOID*)&psl);
|
||||
|
||||
printf("creating shortcut file '%s' to %s...\n", linkPath, cmd);
|
||||
|
||||
if (SUCCEEDED(hr)) {
|
||||
hr = psl->lpVtbl->SetPath(psl, cmd);
|
||||
|
||||
if (arg)
|
||||
hr = psl->lpVtbl->SetArguments(psl, arg);
|
||||
|
||||
if (dir)
|
||||
hr = psl->lpVtbl->SetWorkingDirectory(psl, dir);
|
||||
|
||||
if (iconPath)
|
||||
hr = psl->lpVtbl->SetIconLocation(psl, iconPath, icon_nr);
|
||||
|
||||
if (comment)
|
||||
hr = psl->lpVtbl->SetDescription(psl, comment);
|
||||
|
||||
hr = psl->lpVtbl->QueryInterface(psl, &IID_IPersistFile, (LPVOID*)&ppf);
|
||||
|
||||
if (SUCCEEDED(hr)) {
|
||||
MultiByteToWideChar(CP_ACP, 0, linkPath, -1, buffer, MAX_PATH);
|
||||
|
||||
hr = ppf->lpVtbl->Save(ppf, buffer, TRUE);
|
||||
|
||||
ppf->lpVtbl->Release(ppf);
|
||||
}
|
||||
|
||||
psl->lpVtbl->Release(psl);
|
||||
}
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
printf("OK\n\n");
|
||||
else
|
||||
printf("error %08x\n\n", (int) hr);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
char path[MAX_PATH];
|
||||
LPSTR p;
|
||||
|
||||
CoInitialize(NULL);
|
||||
|
||||
/* create some shortcuts in the start menu "programs" folder */
|
||||
SHGetSpecialFolderPathA(0, path, CSIDL_PROGRAMS, TRUE);
|
||||
p = PathAddBackslash(path);
|
||||
|
||||
strcpy(p, "start-cmd.lnk");
|
||||
CreateShellLink(path, "cmd.exe", "", NULL, NULL, 0, "open console window");
|
||||
|
||||
strcpy(p, "start-winhello.lnk");
|
||||
CreateShellLink(path, "winhello.exe", "", NULL, NULL, 0, "launch winhello");
|
||||
|
||||
|
||||
/* create some shortcuts on the desktop */
|
||||
SHGetSpecialFolderPathA(0, path, CSIDL_DESKTOP, TRUE);
|
||||
p = PathAddBackslash(path);
|
||||
|
||||
strcpy(p, "start-wcmd.lnk");
|
||||
CreateShellLink(path, "cmd.exe", "", NULL, NULL, 0, "open console window");
|
||||
|
||||
strcpy(p, "start-winemine.lnk");
|
||||
CreateShellLink(path, "winemine.exe", "", NULL, NULL, 0, "launch winemine");
|
||||
|
||||
CoUninitialize();
|
||||
|
||||
return 0;
|
||||
}
|
@@ -48,7 +48,7 @@ WinMain(HINSTANCE hInstance,
|
||||
wc.cbWndExtra = 0;
|
||||
if (RegisterClass(&wc) == 0)
|
||||
{
|
||||
fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n",
|
||||
fprintf(stderr, "RegisterClass failed (last error 0x%X)\n",
|
||||
GetLastError());
|
||||
return(1);
|
||||
}
|
||||
@@ -66,7 +66,7 @@ WinMain(HINSTANCE hInstance,
|
||||
NULL);
|
||||
if (hWnd == NULL)
|
||||
{
|
||||
fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n",
|
||||
fprintf(stderr, "CreateWindow failed (last error 0x%X)\n",
|
||||
GetLastError());
|
||||
return(1);
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# $Id: makefile,v 1.3 2003/11/14 17:13:16 weiden Exp $
|
||||
# $Id: makefile,v 1.2 2003/03/04 10:09:00 gvg Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
@@ -14,8 +14,6 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
@@ -1,115 +0,0 @@
|
||||
#include <windows.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <io.h>
|
||||
#include "resource.h"
|
||||
|
||||
static char selected[MAX_PATH + 1];
|
||||
|
||||
BOOL
|
||||
CALLBACK
|
||||
DlgMainProc(
|
||||
HWND hwndDlg,
|
||||
UINT uMsg,
|
||||
WPARAM wParam,
|
||||
LPARAM lParam
|
||||
)
|
||||
{
|
||||
char dir[MAX_PATH + 1];
|
||||
|
||||
switch(uMsg)
|
||||
{
|
||||
case WM_COMMAND:
|
||||
{
|
||||
switch(HIWORD(wParam))
|
||||
{
|
||||
case LBN_DBLCLK:
|
||||
{
|
||||
switch(LOWORD(wParam))
|
||||
{
|
||||
case IDC_DIRS:
|
||||
{
|
||||
if(DlgDirSelectEx(hwndDlg, dir, MAX_PATH, IDC_DIRS))
|
||||
{
|
||||
chdir(dir);
|
||||
GetCurrentDirectory(MAX_PATH, dir);
|
||||
DlgDirList(hwndDlg, dir, IDC_DIRS, IDC_DIREDIT, DDL_DIRECTORY | DDL_DRIVES);
|
||||
}
|
||||
else
|
||||
{
|
||||
SendMessage(hwndDlg, WM_COMMAND, MAKEWPARAM(IDC_OK, 0), 0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
switch(LOWORD(wParam))
|
||||
{
|
||||
case IDC_OK:
|
||||
{
|
||||
char file[MAX_PATH + 1];
|
||||
int len;
|
||||
|
||||
if(!DlgDirSelectEx(hwndDlg, file, MAX_PATH, IDC_DIRS))
|
||||
{
|
||||
GetCurrentDirectory(MAX_PATH, selected);
|
||||
len = strlen(selected);
|
||||
if(strlen(file))
|
||||
{
|
||||
if(selected[len - 1] != '\\')
|
||||
{
|
||||
lstrcat(selected, "\\");
|
||||
}
|
||||
lstrcat(selected, file);
|
||||
EndDialog(hwndDlg, IDC_OK);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case IDC_CANCEL:
|
||||
{
|
||||
EndDialog(hwndDlg, IDC_CANCEL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
SendDlgItemMessage(hwndDlg, IDC_DIRS, LB_SETCOLUMNWIDTH, 150, 0);
|
||||
GetCurrentDirectory(MAX_PATH, dir);
|
||||
DlgDirList(hwndDlg, dir, IDC_DIRS, IDC_DIREDIT, DDL_DIRECTORY | DDL_DRIVES);
|
||||
SetFocus(GetDlgItem(hwndDlg, IDC_DIRS));
|
||||
break;
|
||||
}
|
||||
case WM_CLOSE:
|
||||
{
|
||||
EndDialog(hwndDlg, IDC_CANCEL);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
int WINAPI
|
||||
WinMain(
|
||||
HINSTANCE hInstance,
|
||||
HINSTANCE hPrevInstance,
|
||||
LPSTR lpszCmdLine,
|
||||
int nCmdShow)
|
||||
{
|
||||
char str[MAX_PATH + 32];
|
||||
if(DialogBox(hInstance, MAKEINTRESOURCE(IDD_MAIN), 0, DlgMainProc) == IDC_OK)
|
||||
{
|
||||
sprintf(str, "You selected \"%s\"", selected);
|
||||
MessageBox(0, str, "Selected file", MB_ICONINFORMATION);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1,14 +0,0 @@
|
||||
#include <defines.h>
|
||||
#include <reactos/resource.h>
|
||||
#include "resource.h"
|
||||
|
||||
IDD_MAIN DIALOG DISCARDABLE 20, 20, 220, 140
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
FONT 8, "MS Sans Serif"
|
||||
CAPTION "Select a file"
|
||||
BEGIN
|
||||
EDITTEXT IDC_DIREDIT, 5, 5, 210, 13, ES_READONLY | ES_LEFT | WS_CHILD | WS_VISIBLE | WS_TABSTOP
|
||||
LISTBOX IDC_DIRS, 5, 23, 210, 92, LBS_NOTIFY | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL
|
||||
PUSHBUTTON "&OK", IDC_OK, 60, 120, 40, 15, BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP
|
||||
PUSHBUTTON "&Cancel", IDC_CANCEL, 120, 120, 40, 15, WS_CHILD | WS_VISIBLE | WS_TABSTOP
|
||||
END
|
@@ -1,6 +0,0 @@
|
||||
#define IDD_MAIN 101
|
||||
|
||||
#define IDC_OK 1
|
||||
#define IDC_CANCEL 2
|
||||
#define IDC_DIRS 100
|
||||
#define IDC_DIREDIT 101
|
@@ -1,165 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2004 ReactOS Team
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS diskspeed.exe
|
||||
* FILE: apps/tests/diskspeed/diskspeed.c
|
||||
* PURPOSE: Determines disk transfer rates
|
||||
* PROGRAMMER: Hartmut Birr
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ddk/ntddscsi.h>
|
||||
#include <ddk/scsi.h>
|
||||
|
||||
BOOL GetInquiryData(HANDLE hDevice, PINQUIRYDATA InquiryData)
|
||||
{
|
||||
BOOL Result;
|
||||
DWORD dwReturned;
|
||||
SCSI_ADDRESS ScsiAddress;
|
||||
PSCSI_ADAPTER_BUS_INFO AdapterInfo;
|
||||
PSCSI_INQUIRY_DATA InquiryBuffer;
|
||||
BYTE Buffer[4096];
|
||||
int i;
|
||||
|
||||
Result = DeviceIoControl(hDevice,
|
||||
IOCTL_SCSI_GET_ADDRESS,
|
||||
NULL,
|
||||
0,
|
||||
&ScsiAddress,
|
||||
sizeof(ScsiAddress),
|
||||
&dwReturned,
|
||||
FALSE);
|
||||
if (Result == FALSE)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
Result = DeviceIoControl(hDevice,
|
||||
IOCTL_SCSI_GET_INQUIRY_DATA,
|
||||
NULL,
|
||||
0,
|
||||
Buffer,
|
||||
sizeof(Buffer),
|
||||
&dwReturned,
|
||||
FALSE);
|
||||
if (Result)
|
||||
{
|
||||
AdapterInfo = (PSCSI_ADAPTER_BUS_INFO)Buffer;
|
||||
for (i = 0; i < AdapterInfo->NumberOfBuses; i++)
|
||||
{
|
||||
InquiryBuffer = (PSCSI_INQUIRY_DATA) (Buffer + AdapterInfo->BusData[i].InquiryDataOffset);
|
||||
if (AdapterInfo->BusData[i].InquiryDataOffset)
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
if (InquiryBuffer->PathId == ScsiAddress.PathId &&
|
||||
InquiryBuffer->TargetId == ScsiAddress.TargetId &&
|
||||
InquiryBuffer->Lun == ScsiAddress.Lun)
|
||||
{
|
||||
memcpy(InquiryData, InquiryBuffer->InquiryData, sizeof(INQUIRYDATA));
|
||||
return TRUE;
|
||||
}
|
||||
if (InquiryBuffer->NextInquiryDataOffset == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
InquiryBuffer = (PSCSI_INQUIRY_DATA) (Buffer + InquiryBuffer->NextInquiryDataOffset);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
HANDLE hDevice;
|
||||
OVERLAPPED ov;
|
||||
|
||||
PBYTE Buffer;
|
||||
DWORD Start;
|
||||
DWORD dwReturned;
|
||||
DWORD dwReadTotal;
|
||||
DWORD Size;
|
||||
BOOL Result;
|
||||
ULONG Drive;
|
||||
CHAR Name[20];
|
||||
|
||||
INQUIRYDATA InquiryData;
|
||||
|
||||
|
||||
Drive = 0;
|
||||
while (1)
|
||||
{
|
||||
sprintf(Name, "\\\\.\\PHYSICALDRIVE%ld", Drive);
|
||||
hDevice = CreateFile(Name,
|
||||
GENERIC_READ,
|
||||
FILE_SHARE_READ,
|
||||
NULL,
|
||||
OPEN_EXISTING,
|
||||
0,
|
||||
NULL);
|
||||
if (hDevice == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
if (Drive > 0)
|
||||
{
|
||||
VirtualFree(Buffer, 512 * 1024, MEM_RELEASE);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Cannot open '%s'\n", Name);
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (Drive == 0)
|
||||
{
|
||||
printf("Transfer Size (kB) 1 2 4 8 16 32 64 128 256\n");
|
||||
printf("Transfer Rate (MB/s)\n");
|
||||
printf("-------------------------------------------------------------------------------\n");
|
||||
|
||||
Buffer = VirtualAlloc(NULL, 512 * 1024, MEM_COMMIT, PAGE_READWRITE);
|
||||
}
|
||||
Result = GetInquiryData(hDevice, &InquiryData);
|
||||
if (Result)
|
||||
{
|
||||
printf("%.24s ", InquiryData.VendorId);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Disk %ld ", Drive + 1);
|
||||
}
|
||||
Size = 1024;
|
||||
memset(&ov, 0, sizeof(OVERLAPPED));
|
||||
while (Size <= 256 * 1024)
|
||||
{
|
||||
memset(Buffer, 0, Size);
|
||||
dwReadTotal = 0;
|
||||
|
||||
Start = GetTickCount() + 2000;
|
||||
while (Start > GetTickCount())
|
||||
{
|
||||
Result = ReadFile(hDevice, Buffer, Size, &dwReturned, &ov);
|
||||
if (Result)
|
||||
{
|
||||
dwReadTotal += dwReturned;
|
||||
ov.Offset += dwReturned;
|
||||
}
|
||||
}
|
||||
dwReadTotal /= 2048;
|
||||
printf("%3ld.%ld ", dwReadTotal / 1024, (dwReadTotal % 1024) * 10 / 1024);
|
||||
Size *= 2;
|
||||
}
|
||||
printf("\n");
|
||||
CloseHandle(hDevice);
|
||||
Drive++;
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
@@ -1,23 +0,0 @@
|
||||
# $Id: makefile,v 1.1 2004/03/07 20:12:13 hbirr Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_NORC = yes
|
||||
|
||||
TARGET_TYPE = program
|
||||
|
||||
TARGET_APPTYPE = console
|
||||
|
||||
TARGET_NAME = diskspeed
|
||||
|
||||
TARGET_SDKLIBS = kernel32.a
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
||||
# EOF
|
@@ -1,33 +0,0 @@
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include <WinError.h>
|
||||
#include <WinDNS.h>
|
||||
#include <winsock2.h>
|
||||
#include <assert.h>
|
||||
|
||||
int main( int argc, char **argv ) {
|
||||
PDNS_RECORD QueryReply, AddrResponse;
|
||||
DWORD Addr;
|
||||
|
||||
assert (DnsValidateName( "||||", DnsNameDomain ) == DNS_ERROR_INVALID_NAME_CHAR);
|
||||
assert (DnsValidateName( "a.b.c", DnsNameDomainLabel ) == DNS_ERROR_INVALID_NAME);
|
||||
assert (DnsValidateName( "1234", DnsNameDomainLabel ) == ERROR_SUCCESS);
|
||||
assert (DnsValidateName( "fubar", DnsNameDomain ) == ERROR_SUCCESS);
|
||||
assert (DnsQuery ("www.reactos.com", DNS_TYPE_A, DNS_QUERY_STANDARD,
|
||||
NULL, &QueryReply, NULL) == ERROR_SUCCESS);
|
||||
AddrResponse = QueryReply;
|
||||
while( AddrResponse ) {
|
||||
if( AddrResponse->wType == DNS_TYPE_A ) {
|
||||
Addr = ntohl( AddrResponse->Data.A.IpAddress );
|
||||
printf( "www.reactos.com == %d.%d.%d.%d\n",
|
||||
(int)(Addr >> 24) & 0xff,
|
||||
(int)(Addr >> 16) & 0xff,
|
||||
(int)(Addr >> 8) & 0xff,
|
||||
(int)Addr & 0xff );
|
||||
}
|
||||
AddrResponse = AddrResponse->pNext;
|
||||
}
|
||||
DnsRecordListFree( QueryReply, DnsFreeRecordList );
|
||||
|
||||
return 0;
|
||||
}
|
@@ -1,22 +0,0 @@
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_NORC = yes
|
||||
|
||||
TARGET_TYPE = program
|
||||
|
||||
TARGET_APPTYPE = console
|
||||
|
||||
TARGET_NAME = dnsapi
|
||||
|
||||
TARGET_SDKLIBS = dnsapi.a ws2_32.a kernel32.a
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_CFLAGS = -D__USE_W32API -Wall -Werror -g
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
||||
# EOF
|
@@ -1,29 +0,0 @@
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include <WinError.h>
|
||||
#include <WinDNS.h>
|
||||
#include <winsock2.h>
|
||||
#include <assert.h>
|
||||
|
||||
int main( int argc, char **argv ) {
|
||||
PDNS_RECORD QueryReply, AddrResponse;
|
||||
DWORD Addr;
|
||||
|
||||
assert (DnsQuery ("www.reactos.com", DNS_TYPE_A, DNS_QUERY_STANDARD,
|
||||
NULL, &QueryReply, NULL) == ERROR_SUCCESS);
|
||||
AddrResponse = QueryReply;
|
||||
while( AddrResponse ) {
|
||||
if( AddrResponse->wType == DNS_TYPE_A ) {
|
||||
Addr = ntohl( AddrResponse->Data.A.IpAddress );
|
||||
printf( "www.reactos.com == %d.%d.%d.%d\n",
|
||||
(int)(Addr >> 24) & 0xff,
|
||||
(int)(Addr >> 16) & 0xff,
|
||||
(int)(Addr >> 8) & 0xff,
|
||||
(int)Addr & 0xff );
|
||||
}
|
||||
AddrResponse = AddrResponse->pNext;
|
||||
}
|
||||
DnsRecordListFree( QueryReply, DnsFreeRecordList );
|
||||
|
||||
return 0;
|
||||
}
|
@@ -1,22 +0,0 @@
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_NORC = yes
|
||||
|
||||
TARGET_TYPE = program
|
||||
|
||||
TARGET_APPTYPE = console
|
||||
|
||||
TARGET_NAME = dnsquery
|
||||
|
||||
TARGET_SDKLIBS = dnsapi.a ws2_32.a kernel32.a
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_CFLAGS = -D__USE_W32API -Wall -Werror -g
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
||||
# EOF
|
@@ -5,7 +5,7 @@ int main()
|
||||
{
|
||||
int i;
|
||||
|
||||
printf("TickCountLow: %lx\n",
|
||||
printf("TickCountLow: %x\n",
|
||||
SharedUserData->TickCountLow);
|
||||
printf("Drives: ");
|
||||
for (i = 0; i < 26; i++)
|
||||
@@ -48,5 +48,4 @@ int main()
|
||||
}
|
||||
}
|
||||
printf("\n\n");
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# $Id: makefile,v 1.7 2003/11/14 17:13:16 weiden Exp $
|
||||
# $Id: makefile,v 1.6 2002/06/02 19:24:58 chorns Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
@@ -12,8 +12,6 @@ TARGET_NAME = dump_shared_data
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
@@ -62,7 +62,6 @@ char TextBuffer[BUFFERLEN]={'R','e','s','u','l','t',':',' '};
|
||||
typedef void FunctionHandler(HWND,DWORD,WPARAM,LPARAM);
|
||||
typedef FunctionHandler* LPFUNCTIONHANDLER;
|
||||
|
||||
VOID
|
||||
PrintTextXY(char* Text,int x,int y,int len)
|
||||
{
|
||||
HDC hdc;
|
||||
@@ -186,60 +185,60 @@ struct
|
||||
}
|
||||
Msg[] =
|
||||
{
|
||||
{"EM_CANUNDO",EM_CANUNDO,0,0,&HandlePrintReturnHex},
|
||||
{"EM_CHARFROMPOS",EM_CHARFROMPOS,(WPARAM)&point,0,&HandlePrintReturnHex},
|
||||
{"EM_EMPTYUNDOBUFFER",EM_EMPTYUNDOBUFFER,0,0,&HandlePrintReturnHex},
|
||||
{"EM_FMTLINES",EM_FMTLINES,TRUE,0,&HandlePrintReturnHex},
|
||||
{"EM_GETFIRSTVISIBLELINE",EM_GETFIRSTVISIBLELINE,0,0,&HandlePrintReturnHex},
|
||||
"EM_CANUNDO",EM_CANUNDO,0,0,&HandlePrintReturnHex,
|
||||
"EM_CHARFROMPOS",EM_CHARFROMPOS,(WPARAM)&point,0,&HandlePrintReturnHex,
|
||||
"EM_EMPTYUNDOBUFFER",EM_EMPTYUNDOBUFFER,0,0,&HandlePrintReturnHex,
|
||||
"EM_FMTLINES",EM_FMTLINES,TRUE,0,&HandlePrintReturnHex,
|
||||
"EM_GETFIRSTVISIBLELINE",EM_GETFIRSTVISIBLELINE,0,0,&HandlePrintReturnHex,
|
||||
|
||||
{"EM_GETLIMITTEXT",EM_GETLIMITTEXT,0,0,&HandlePrintReturnHex},
|
||||
{"EM_GETLINE",EM_GETLINE,2,(WPARAM)&TextBuffer[8],&HandlePrintReturnStr},
|
||||
{"EM_GETLINECOUNT",EM_GETLINECOUNT,0,0,&HandlePrintReturnHex},
|
||||
{"EM_GETMARGINS",EM_GETMARGINS,0,0,&HandlePrintReturnHex},
|
||||
{"EM_SETMARGINS",EM_SETMARGINS,EC_LEFTMARGIN,10,&HandlePrintReturnHex},
|
||||
"EM_GETLIMITTEXT",EM_GETLIMITTEXT,0,0,&HandlePrintReturnHex,
|
||||
"EM_GETLINE",EM_GETLINE,2,(WPARAM)&TextBuffer[8],&HandlePrintReturnStr,
|
||||
"EM_GETLINECOUNT",EM_GETLINECOUNT,0,0,&HandlePrintReturnHex,
|
||||
"EM_GETMARGINS",EM_GETMARGINS,0,0,&HandlePrintReturnHex,
|
||||
"EM_SETMARGINS",EM_SETMARGINS,EC_LEFTMARGIN,10,&HandlePrintReturnHex,
|
||||
|
||||
{"EM_GETMODIFY",EM_GETMODIFY,0,0,&HandlePrintReturnHex},
|
||||
{"EM_SETMODIFY",EM_SETMODIFY,TRUE,0,&HandlePrintReturnHex},
|
||||
"EM_GETMODIFY",EM_GETMODIFY,0,0,&HandlePrintReturnHex,
|
||||
"EM_SETMODIFY",EM_SETMODIFY,TRUE,0,&HandlePrintReturnHex,
|
||||
|
||||
{"EM_GETSEL",EM_GETSEL,(WPARAM)&StartP,(LPARAM)&EndP,&HandlePrintReturnHex},
|
||||
"EM_GETSEL",EM_GETSEL,(WPARAM)&StartP,(LPARAM)&EndP,&HandlePrintReturnHex,
|
||||
|
||||
{"EM_GETTHUMB",EM_GETTHUMB,0,0,&HandlePrintReturnHex},
|
||||
"EM_GETTHUMB",EM_GETTHUMB,0,0,&HandlePrintReturnHex,
|
||||
|
||||
{"EM_LIMITTEXT",EM_LIMITTEXT,10,0,&HandlePrintReturnHex},
|
||||
{"EM_LINEFROMCHAR",EM_LINEFROMCHAR,-1,0,&HandlePrintReturnHex},
|
||||
{"EM_POSFROMCHAR",EM_POSFROMCHAR,10,0,&HandlePrintReturnHex},
|
||||
{"EM_LINEINDEX",EM_LINEINDEX,2,0,&HandlePrintReturnHex},
|
||||
{"EM_LINELENGTH",EM_LINELENGTH,-1,0,&HandlePrintReturnHex},
|
||||
"EM_LIMITTEXT",EM_LIMITTEXT,10,0,&HandlePrintReturnHex,
|
||||
"EM_LINEFROMCHAR",EM_LINEFROMCHAR,-1,0,&HandlePrintReturnHex,
|
||||
"EM_POSFROMCHAR",EM_POSFROMCHAR,10,0,&HandlePrintReturnHex,
|
||||
"EM_LINEINDEX",EM_LINEINDEX,2,0,&HandlePrintReturnHex,
|
||||
"EM_LINELENGTH",EM_LINELENGTH,-1,0,&HandlePrintReturnHex,
|
||||
|
||||
{"EM_GETWORDBREAKPROC",EM_GETWORDBREAKPROC,0,0,&HandlePrintReturnHex},
|
||||
{"EM_REPLACESEL",EM_REPLACESEL,TRUE,(LPARAM)&ReplaceTextStr,&HandlePrintReturnHex},
|
||||
"EM_GETWORDBREAKPROC",EM_GETWORDBREAKPROC,0,0,&HandlePrintReturnHex,
|
||||
"EM_REPLACESEL",EM_REPLACESEL,TRUE,(LPARAM)&ReplaceTextStr,&HandlePrintReturnHex,
|
||||
|
||||
{"EM_LINESCROLL",EM_LINESCROLL,5,1,&HandlePrintReturnHex},
|
||||
{"EM_SCROLL",EM_SCROLL,SB_LINEDOWN,0,&HandlePrintReturnHex},
|
||||
{"EM_SCROLLCARET",EM_SCROLLCARET,0,0,&HandlePrintReturnHex},
|
||||
"EM_LINESCROLL",EM_LINESCROLL,5,1,&HandlePrintReturnHex,
|
||||
"EM_SCROLL",EM_SCROLL,SB_LINEDOWN,0,&HandlePrintReturnHex,
|
||||
"EM_SCROLLCARET",EM_SCROLLCARET,0,0,&HandlePrintReturnHex,
|
||||
|
||||
{"EM_SETHANDLE",EM_SETHANDLE,0,0,&HandleSetHandlePrintHex},
|
||||
{"EM_GETHANDLE",EM_GETHANDLE,0,0,&HandlePrintReturnHex},
|
||||
{"EM_GETPASSWORDCHAR",EM_GETPASSWORDCHAR,0,0,&HandlePrintPasswdChar},
|
||||
{"EM_SETPASSWORDCHAR - clear",EM_SETPASSWORDCHAR,0,0,&HandlePrintReturnHex},
|
||||
{"EM_SETPASSWORDCHAR - x",EM_SETPASSWORDCHAR,'x',0,&HandlePrintReturnHex},
|
||||
"EM_SETHANDLE",EM_SETHANDLE,0,0,&HandleSetHandlePrintHex,
|
||||
"EM_GETHANDLE",EM_GETHANDLE,0,0,&HandlePrintReturnHex,
|
||||
"EM_GETPASSWORDCHAR",EM_GETPASSWORDCHAR,0,0,&HandlePrintPasswdChar,
|
||||
"EM_SETPASSWORDCHAR - clear",EM_SETPASSWORDCHAR,0,0,&HandlePrintReturnHex,
|
||||
"EM_SETPASSWORDCHAR - x",EM_SETPASSWORDCHAR,'x',0,&HandlePrintReturnHex,
|
||||
|
||||
{"EM_SETREADONLY - set",EM_SETREADONLY,TRUE,0,&HandlePrintReturnHex},
|
||||
{"EM_SETREADONLY - clear",EM_SETREADONLY,FALSE,0,&HandlePrintReturnHex},
|
||||
"EM_SETREADONLY - set",EM_SETREADONLY,TRUE,0,&HandlePrintReturnHex,
|
||||
"EM_SETREADONLY - clear",EM_SETREADONLY,FALSE,0,&HandlePrintReturnHex,
|
||||
|
||||
{"EM_GETRECT",EM_GETRECT,0,(LPARAM)&rect2,&HandlePrintRect},
|
||||
{"EM_SETRECT",EM_SETRECT,0,(LPARAM)&rect,&HandlePrintReturnHex},
|
||||
{"EM_SETRECTNP",EM_SETRECTNP,0,(LPARAM)&rect,&HandlePrintReturnHex},
|
||||
{"EM_SETSEL",EM_SETSEL,1,3,&HandlePrintReturnHex},
|
||||
"EM_GETRECT",EM_GETRECT,0,(LPARAM)&rect2,&HandlePrintRect,
|
||||
"EM_SETRECT",EM_SETRECT,0,(LPARAM)&rect,&HandlePrintReturnHex,
|
||||
"EM_SETRECTNP",EM_SETRECTNP,0,(LPARAM)&rect,&HandlePrintReturnHex,
|
||||
"EM_SETSEL",EM_SETSEL,1,3,&HandlePrintReturnHex,
|
||||
|
||||
{"EM_SETSEL - all",EM_SETSEL,0,-1,&HandlePrintReturnHex},
|
||||
{"EM_SETSEL - remove",EM_SETSEL,-1,0,&HandlePrintReturnHex},
|
||||
{"EM_UNDO",EM_UNDO,0,0,&HandlePrintReturnHex},
|
||||
{"WM_UNDO",WM_UNDO,0,0,&HandlePrintReturnHex},
|
||||
{"WM_PASTE",WM_PASTE,0,0,&HandlePrintReturnHex},
|
||||
"EM_SETSEL - all",EM_SETSEL,0,-1,&HandlePrintReturnHex,
|
||||
"EM_SETSEL - remove",EM_SETSEL,-1,0,&HandlePrintReturnHex,
|
||||
"EM_UNDO",EM_UNDO,0,0,&HandlePrintReturnHex,
|
||||
"WM_UNDO",WM_UNDO,0,0,&HandlePrintReturnHex,
|
||||
"WM_PASTE",WM_PASTE,0,0,&HandlePrintReturnHex,
|
||||
|
||||
{"WM_CUT",WM_CUT,0,0,&HandlePrintReturnHex},
|
||||
{"WM_COPY",WM_COPY,0,0,&HandlePrintReturnHex}
|
||||
"WM_CUT",WM_CUT,0,0,&HandlePrintReturnHex,
|
||||
"WM_COPY",WM_COPY,0,0,&HandlePrintReturnHex
|
||||
|
||||
};
|
||||
|
||||
@@ -576,6 +575,7 @@ WndProc ( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
|
||||
return DefWindowProc ( hwnd, msg, wParam, lParam );
|
||||
}
|
||||
|
||||
|
||||
HWND
|
||||
RegisterAndCreateWindow (HINSTANCE hInst,
|
||||
const char* className,
|
||||
|
@@ -15,8 +15,6 @@ TARGET_OBJECTS = \
|
||||
edittest.o \
|
||||
utils.o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror -D__USE_W32API
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
@@ -1,123 +0,0 @@
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
//HFONT tf;
|
||||
HENHMETAFILE EnhMetafile;
|
||||
SIZE EnhMetafileSize;
|
||||
LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM);
|
||||
|
||||
int WINAPI
|
||||
WinMain(HINSTANCE hInstance,
|
||||
HINSTANCE hPrevInstance,
|
||||
LPSTR lpszCmdLine,
|
||||
int nCmdShow)
|
||||
{
|
||||
WNDCLASS wc;
|
||||
MSG msg;
|
||||
HWND hWnd;
|
||||
ENHMETAHEADER emh;
|
||||
|
||||
EnhMetafile = GetEnhMetaFile("test.emf");
|
||||
if(!EnhMetafile)
|
||||
{
|
||||
fprintf(stderr, "GetEnhMetaFile failed (last error 0x%lX)\n",
|
||||
GetLastError());
|
||||
return(1);
|
||||
}
|
||||
GetEnhMetaFileHeader(EnhMetafile, sizeof(ENHMETAHEADER), &emh);
|
||||
EnhMetafileSize.cx = emh.rclBounds.right - emh.rclBounds.left;
|
||||
EnhMetafileSize.cy = emh.rclBounds.bottom - emh.rclBounds.top;
|
||||
|
||||
wc.lpszClassName = "EnhMetaFileClass";
|
||||
wc.lpfnWndProc = MainWndProc;
|
||||
wc.style = CS_VREDRAW | CS_HREDRAW;
|
||||
wc.hInstance = hInstance;
|
||||
wc.hIcon = LoadIcon(NULL, (LPCTSTR)IDI_APPLICATION);
|
||||
wc.hCursor = LoadCursor(NULL, (LPCTSTR)IDC_ARROW);
|
||||
wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
|
||||
wc.lpszMenuName = NULL;
|
||||
wc.cbClsExtra = 0;
|
||||
wc.cbWndExtra = 0;
|
||||
if (RegisterClass(&wc) == 0)
|
||||
{
|
||||
DeleteEnhMetaFile(EnhMetafile);
|
||||
fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n",
|
||||
GetLastError());
|
||||
return(1);
|
||||
}
|
||||
|
||||
hWnd = CreateWindow("EnhMetaFileClass",
|
||||
"Enhanced Metafile test",
|
||||
WS_OVERLAPPEDWINDOW,
|
||||
0,
|
||||
0,
|
||||
EnhMetafileSize.cx + (2 * GetSystemMetrics(SM_CXSIZEFRAME)) + 2,
|
||||
EnhMetafileSize.cy + (2 * GetSystemMetrics(SM_CYSIZEFRAME)) + GetSystemMetrics(SM_CYCAPTION) + 2,
|
||||
NULL,
|
||||
NULL,
|
||||
hInstance,
|
||||
NULL);
|
||||
if (hWnd == NULL)
|
||||
{
|
||||
DeleteEnhMetaFile(EnhMetafile);
|
||||
fprintf(stderr, "CreateWindow failed (last error 0x%lX)\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);
|
||||
}
|
||||
|
||||
DeleteEnhMetaFile(EnhMetafile);
|
||||
|
||||
//DeleteObject(tf);
|
||||
UnregisterClass("EnhMetaFileClass", hInstance);
|
||||
|
||||
return msg.wParam;
|
||||
}
|
||||
|
||||
LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch(msg)
|
||||
{
|
||||
|
||||
case WM_PAINT:
|
||||
{
|
||||
PAINTSTRUCT ps;
|
||||
RECT rc;
|
||||
HDC hDC;
|
||||
int bk;
|
||||
|
||||
GetClientRect(hWnd, &rc);
|
||||
hDC = BeginPaint(hWnd, &ps);
|
||||
rc.left = (rc.right / 2) - (EnhMetafileSize.cx / 2);
|
||||
rc.top = (rc.bottom / 2) - (EnhMetafileSize.cy / 2);
|
||||
rc.right = rc.left + EnhMetafileSize.cx;
|
||||
rc.bottom = rc.top + EnhMetafileSize.cy;
|
||||
bk = SetBkMode(hDC, TRANSPARENT);
|
||||
Rectangle(hDC, rc.left - 1, rc.top - 1, rc.right + 1, rc.bottom + 1);
|
||||
SetBkMode(hDC, bk);
|
||||
PlayEnhMetaFile(hDC, EnhMetafile, &rc);
|
||||
EndPaint(hWnd, &ps);
|
||||
break;
|
||||
}
|
||||
|
||||
case WM_DESTROY:
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
|
||||
default:
|
||||
return DefWindowProc(hWnd, msg, wParam, lParam);
|
||||
}
|
||||
return 0;
|
||||
}
|
Binary file not shown.
@@ -39,7 +39,7 @@ WinMain(HINSTANCE hInstance,
|
||||
wc.cbWndExtra = 0;
|
||||
if (RegisterClass(&wc) == 0)
|
||||
{
|
||||
_ftprintf ( stderr, _T("RegisterClass failed (last error 0x%lX)\n"),
|
||||
_ftprintf ( stderr, _T("RegisterClass failed (last error 0x%X)\n"),
|
||||
GetLastError());
|
||||
return(1);
|
||||
}
|
||||
@@ -57,7 +57,7 @@ WinMain(HINSTANCE hInstance,
|
||||
NULL);
|
||||
if (hWnd == NULL)
|
||||
{
|
||||
_ftprintf ( stderr, _T("CreateWindow failed (last error 0x%lX)\n"),
|
||||
_ftprintf ( stderr, _T("CreateWindow failed (last error 0x%X)\n"),
|
||||
GetLastError());
|
||||
return(1);
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# $Id: makefile,v 1.2 2003/11/14 17:13:16 weiden Exp $
|
||||
# $Id: makefile,v 1.1 2003/07/25 19:13:14 royce Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
@@ -14,8 +14,6 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
@@ -1,35 +0,0 @@
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
|
||||
BOOL CALLBACK
|
||||
EnumDesktopProc(LPWSTR lpszWindowStation, LPARAM lParam)
|
||||
{
|
||||
printf("\t%S\n", lpszWindowStation);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL CALLBACK
|
||||
EnumWindowStationProc(LPWSTR lpszWindowStation, LPARAM lParam)
|
||||
{
|
||||
HWINSTA hWinSta;
|
||||
|
||||
printf("%S\n", lpszWindowStation);
|
||||
hWinSta = OpenWindowStationW(lpszWindowStation, FALSE,
|
||||
WINSTA_ENUMDESKTOPS);
|
||||
if (hWinSta == NULL)
|
||||
{
|
||||
printf("\tCan't open window station.\n");
|
||||
return TRUE;
|
||||
}
|
||||
EnumDesktopsW(hWinSta, EnumDesktopProc, 0xdede);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
EnumWindowStationsW(EnumWindowStationProc, 0xbadbed);
|
||||
|
||||
return 0;
|
||||
}
|
@@ -1,21 +0,0 @@
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_NORC = yes
|
||||
|
||||
TARGET_TYPE = program
|
||||
|
||||
TARGET_APPTYPE = console
|
||||
|
||||
TARGET_NAME = enumws
|
||||
|
||||
TARGET_SDKLIBS = user32.a
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
||||
# EOF
|
@@ -1,4 +1,4 @@
|
||||
# $Id: makefile,v 1.8 2003/11/14 17:13:16 weiden Exp $
|
||||
# $Id: makefile,v 1.7 2002/06/02 19:24:58 chorns Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
@@ -14,8 +14,6 @@ TARGET_SDKLIBS = kernel32.a
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
@@ -20,18 +20,18 @@ HANDLE MakeEventPair()
|
||||
|
||||
InitializeObjectAttributes(&Attributes, NULL, 0, NULL, NULL);
|
||||
Status = NtCreateEventPair(&EventPair, STANDARD_RIGHTS_ALL, &Attributes);
|
||||
printf("Status %08lx creating eventpair\n", Status);
|
||||
printf("Status %08x creating eventpair\n", Status);
|
||||
return EventPair;
|
||||
}
|
||||
|
||||
DWORD __stdcall threadfunc(void* eventpair)
|
||||
{
|
||||
printf("Thread: Set eventpair status %08lx\n", NtSetInformationThread(NtCurrentThread(), ThreadEventPair, &eventpair, sizeof(HANDLE)));
|
||||
printf("Thread: Set eventpair status %08x\n", NtSetInformationThread(NtCurrentThread(), ThreadEventPair, &eventpair, sizeof(HANDLE)));
|
||||
Sleep(2500);
|
||||
|
||||
printf("Thread: Setting low and waiting high...\n");
|
||||
printf("Thread: status = %08lx\n", NtSetLowWaitHighThread());
|
||||
printf("Thread: status = %08lx\n", NtSetHighWaitLowThread());
|
||||
printf("Thread: status = %08x\n", NtSetLowWaitHighThread());
|
||||
printf("Thread: status = %08x\n", NtSetHighWaitLowThread());
|
||||
printf("Thread: Terminating...\n");
|
||||
return 0;
|
||||
}
|
||||
@@ -41,7 +41,7 @@ int main(int ac, char **av)
|
||||
DWORD id;
|
||||
HANDLE EventPair, Thread;
|
||||
|
||||
printf("Main: NtSetLowWaitHighThread is at %08lx\n", NtSetLowWaitHighThread());
|
||||
printf("Main: NtSetLowWaitHighThread is at %08x\n", NtSetLowWaitHighThread);
|
||||
|
||||
EventPair = MakeEventPair();
|
||||
|
||||
@@ -50,13 +50,13 @@ int main(int ac, char **av)
|
||||
return 0;
|
||||
}
|
||||
|
||||
printf("Main: EventPair = %08lx\n", (DWORD)EventPair);
|
||||
printf("Main: EventPair = %08x\n", EventPair);
|
||||
Thread = CreateThread(0, 0, threadfunc, EventPair, 0, &id);
|
||||
printf("Main: ThreadId for new thread is %08lx\n", id);
|
||||
printf("Main: ThreadId for new thread is %08x\n", id);
|
||||
printf("Main: Setting high and waiting low\n");
|
||||
printf("Main: status = %08lx\n", NtSetHighWaitLowEventPair(EventPair));
|
||||
printf("Main: status = %08x\n", NtSetHighWaitLowEventPair(EventPair));
|
||||
Sleep(2500);
|
||||
printf("Main: status = %08lx\n", NtSetLowWaitHighEventPair(EventPair));
|
||||
printf("Main: status = %08x\n", NtSetLowWaitHighEventPair(EventPair));
|
||||
NtClose(EventPair);
|
||||
/* WaitForSingleObject(Thread, INFINITE); FIXME: Waiting on thread handle causes double spinlock acquisition (and subsequent crash) in PsUnblockThread - ntoskrnl/ps/thread.c */
|
||||
NtClose(Thread);
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# $Id: makefile,v 1.2 2003/11/14 17:13:17 weiden Exp $
|
||||
# $Id: makefile,v 1.1 2003/09/10 06:12:21 vizzini Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
@@ -14,8 +14,6 @@ TARGET_SDKLIBS = ntdll.a
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
@@ -1,6 +0,0 @@
|
||||
*.o
|
||||
*.d
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
@@ -1,446 +0,0 @@
|
||||
/* $Id: fiber.c,v 1.2 2004/03/07 20:07:04 hyperion Exp $
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <tchar.h>
|
||||
#include <windows.h>
|
||||
|
||||
#ifndef InitializeListHead
|
||||
#define InitializeListHead(PLH__) ((PLH__)->Flink = (PLH__)->Blink = (PLH__))
|
||||
#endif
|
||||
|
||||
#ifndef IsListEmpty
|
||||
#define IsListEmpty(PLH__) ((PLH__)->Flink == (PVOID)(PLH__))
|
||||
#endif
|
||||
|
||||
#ifndef RemoveEntryList
|
||||
|
||||
#define RemoveEntryList(PLE__) \
|
||||
{ \
|
||||
PLIST_ENTRY pleBack__ = (PLIST_ENTRY)((PLE__)->Blink); \
|
||||
PLIST_ENTRY pleForward__ = (PLIST_ENTRY)((PLE__)->Flink); \
|
||||
\
|
||||
pleBack__->Flink = pleForward__; \
|
||||
pleForward__->Blink = pleBack__; \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef InsertTailList
|
||||
|
||||
#define InsertTailList(PLH__, PLE__) \
|
||||
{ \
|
||||
PLIST_ENTRY pleListHead__ = (PLH__); \
|
||||
PLIST_ENTRY pleBlink__ = (PLIST_ENTRY)((PLH__)->Blink); \
|
||||
\
|
||||
(PLE__)->Flink = pleListHead__; \
|
||||
(PLE__)->Blink = pleBlink__; \
|
||||
pleBlink__->Flink = (PLE__); \
|
||||
pleListHead__->Blink = (PLE__); \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef RemoveHeadList
|
||||
|
||||
#define RemoveHeadList(PLH__) \
|
||||
(PLIST_ENTRY)((PLH__)->Flink); \
|
||||
RemoveEntryList((PLIST_ENTRY)((PLH__)->Flink));
|
||||
|
||||
#endif
|
||||
|
||||
#define FIBERTEST_COUNT 500
|
||||
|
||||
struct FiberData
|
||||
{
|
||||
unsigned nMagic;
|
||||
unsigned nId;
|
||||
unsigned nPrio;
|
||||
unsigned nRealPrio;
|
||||
PVOID pFiber;
|
||||
LIST_ENTRY leQueue;
|
||||
int nQuantumQueued;
|
||||
int nBoost;
|
||||
struct FiberData * pfdPrev;
|
||||
int bExitPrev;
|
||||
};
|
||||
|
||||
static LIST_ENTRY a_leQueues[32];
|
||||
static unsigned nQuantum = 0;
|
||||
static struct FiberData * pfdLastStarveScan = NULL;
|
||||
|
||||
void Fbt_Create(int);
|
||||
void Fbt_Exit(void);
|
||||
void Fbt_Yield(void);
|
||||
|
||||
struct FiberData * Fbt_GetCurrent(void);
|
||||
unsigned Fbt_GetCurrentId(void);
|
||||
VOID CALLBACK Fbt_Startup(PVOID);
|
||||
void Fbt_Dispatch(struct FiberData *, int);
|
||||
void Fbt_AfterSwitch(struct FiberData *);
|
||||
|
||||
void DoStuff(void);
|
||||
|
||||
struct FiberData * Fbt_GetCurrent(VOID)
|
||||
{
|
||||
return GetFiberData();
|
||||
}
|
||||
|
||||
unsigned Fbt_GetCurrentId(VOID)
|
||||
{
|
||||
return Fbt_GetCurrent()->nId;
|
||||
}
|
||||
|
||||
void Fbt_Yield(VOID)
|
||||
{
|
||||
struct FiberData * pfdCur;
|
||||
|
||||
pfdCur = Fbt_GetCurrent();
|
||||
|
||||
if(pfdCur->nBoost)
|
||||
{
|
||||
-- pfdCur->nBoost;
|
||||
|
||||
if(!pfdCur->nBoost)
|
||||
pfdCur->nPrio = pfdCur->nRealPrio;
|
||||
}
|
||||
else if((rand() % 100) > 50 - (45 * pfdCur->nPrio) / 32)
|
||||
Fbt_Dispatch(pfdCur, 0);
|
||||
}
|
||||
|
||||
void Fbt_AfterSwitch(struct FiberData * pfdCur)
|
||||
{
|
||||
struct FiberData * pfdPrev;
|
||||
|
||||
pfdPrev = pfdCur->pfdPrev;
|
||||
|
||||
/* The previous fiber left some homework for us */
|
||||
if(pfdPrev)
|
||||
{
|
||||
/* Kill the predecessor */
|
||||
if(pfdCur->bExitPrev)
|
||||
{
|
||||
if(pfdLastStarveScan == pfdPrev)
|
||||
pfdLastStarveScan = 0;
|
||||
|
||||
DeleteFiber(pfdPrev->pFiber);
|
||||
free(pfdPrev);
|
||||
}
|
||||
/* Enqueue the previous fiber in the correct ready queue */
|
||||
else
|
||||
{
|
||||
/* Remember the quantum in which the previous fiber was queued */
|
||||
pfdPrev->nQuantumQueued = nQuantum;
|
||||
|
||||
/* Disable the anti-starvation boost */
|
||||
if(pfdPrev->nBoost)
|
||||
{
|
||||
pfdPrev->nBoost = 0;
|
||||
pfdPrev->nPrio = pfdPrev->nRealPrio;
|
||||
}
|
||||
|
||||
/* Enqueue the previous fiber */
|
||||
InsertTailList
|
||||
(
|
||||
&a_leQueues[pfdPrev->nPrio],
|
||||
&pfdPrev->leQueue
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
VOID CALLBACK Fbt_Startup(PVOID pParam)
|
||||
{
|
||||
assert(pParam == GetFiberData());
|
||||
Fbt_AfterSwitch(pParam);
|
||||
DoStuff();
|
||||
Fbt_Exit();
|
||||
}
|
||||
|
||||
void Fbt_Dispatch(struct FiberData * pfdCur, int bExit)
|
||||
{
|
||||
UCHAR i;
|
||||
UCHAR n;
|
||||
struct FiberData * pfdNext;
|
||||
|
||||
assert(pfdCur == GetFiberData());
|
||||
|
||||
++ nQuantum;
|
||||
|
||||
/* Every ten quantums check for starving threads */
|
||||
/* FIXME: this implementation of starvation prevention isn't that great */
|
||||
if(nQuantum % 10 == 0)
|
||||
{
|
||||
int j;
|
||||
int k;
|
||||
int b;
|
||||
int bResume;
|
||||
PLIST_ENTRY ple;
|
||||
|
||||
bResume = 0;
|
||||
i = 0;
|
||||
|
||||
/* Pick up from where we left last time */
|
||||
if(pfdLastStarveScan)
|
||||
{
|
||||
unsigned nPrio;
|
||||
|
||||
nPrio = pfdLastStarveScan->nPrio;
|
||||
|
||||
/* The last fiber we scanned for starvation isn't queued anymore */
|
||||
if(IsListEmpty(&pfdLastStarveScan->leQueue))
|
||||
/* Scan the ready queue for its priority */
|
||||
i = nPrio;
|
||||
/* Last fiber for its priority level */
|
||||
else if(pfdLastStarveScan->leQueue.Flink == &a_leQueues[nPrio])
|
||||
/* Scan the ready queue for the next priority level */
|
||||
i = nPrio + 1;
|
||||
/* Scan the next fiber in the ready queue */
|
||||
else
|
||||
{
|
||||
i = nPrio;
|
||||
ple = pfdLastStarveScan->leQueue.Flink;
|
||||
bResume = 1;
|
||||
}
|
||||
|
||||
/* Priority levels 15-31 are never checked for starvation */
|
||||
if(i >= 15)
|
||||
{
|
||||
if(bResume)
|
||||
bResume = 0;
|
||||
|
||||
i = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Scan at most 16 threads, in the priority range 0-14, applying in total at
|
||||
most 10 boosts. This loop scales O(1)
|
||||
*/
|
||||
for(j = 0, k = 0, b = 0; j < 16 && k < 15 && b < 10; ++ j)
|
||||
{
|
||||
unsigned nDiff;
|
||||
|
||||
/* No previous state to resume from */
|
||||
if(!bResume)
|
||||
{
|
||||
int nQueue;
|
||||
|
||||
/* Get the first element in the current queue */
|
||||
nQueue = (k + i) % 15;
|
||||
|
||||
if(IsListEmpty(&a_leQueues[nQueue]))
|
||||
{
|
||||
++ k;
|
||||
continue;
|
||||
}
|
||||
|
||||
ple = (PLIST_ENTRY)a_leQueues[nQueue].Flink;
|
||||
}
|
||||
else
|
||||
bResume = 0;
|
||||
|
||||
/* Get the current fiber */
|
||||
pfdLastStarveScan = CONTAINING_RECORD(ple, struct FiberData, leQueue);
|
||||
assert(pfdLastStarveScan->nMagic == 0x12345678);
|
||||
assert(pfdLastStarveScan != pfdCur);
|
||||
|
||||
/* Calculate the number of quantums the fiber has been in the queue */
|
||||
if(nQuantum > pfdLastStarveScan->nQuantumQueued)
|
||||
nDiff = nQuantum - pfdLastStarveScan->nQuantumQueued;
|
||||
else
|
||||
nDiff = UINT_MAX - pfdLastStarveScan->nQuantumQueued + nQuantum;
|
||||
|
||||
/* The fiber has been ready for more than 30 quantums: it's starving */
|
||||
if(nDiff > 30)
|
||||
{
|
||||
/* Plus one boost applied */
|
||||
++ b;
|
||||
|
||||
/* Apply the boost */
|
||||
pfdLastStarveScan->nBoost = 1;
|
||||
pfdLastStarveScan->nRealPrio = pfdLastStarveScan->nPrio;
|
||||
pfdLastStarveScan->nPrio = 15;
|
||||
|
||||
/* Re-enqueue the fiber in the correct priority queue */
|
||||
RemoveEntryList(&pfdLastStarveScan->leQueue);
|
||||
InsertTailList(&a_leQueues[15], &pfdLastStarveScan->leQueue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pfdNext = NULL;
|
||||
|
||||
/* This fiber is going to die: scan all ready queues */
|
||||
if(bExit)
|
||||
n = 1;
|
||||
/*
|
||||
Scan only ready queues for priorities greater than or equal to the priority of
|
||||
the current thread (round-robin)
|
||||
*/
|
||||
else
|
||||
n = pfdCur->nPrio + 1;
|
||||
|
||||
/* This loop scales O(1) */
|
||||
for(i = 32; i >= n; -- i)
|
||||
{
|
||||
PLIST_ENTRY pleNext;
|
||||
|
||||
/* No fiber ready for this priority level */
|
||||
if(IsListEmpty(&a_leQueues[i - 1]))
|
||||
continue;
|
||||
|
||||
/* Get the next ready fiber */
|
||||
pleNext = RemoveHeadList(&a_leQueues[i - 1]);
|
||||
InitializeListHead(pleNext);
|
||||
pfdNext = CONTAINING_RECORD(pleNext, struct FiberData, leQueue);
|
||||
assert(pfdNext->pFiber != GetCurrentFiber());
|
||||
assert(pfdNext->nMagic == 0x12345678);
|
||||
break;
|
||||
}
|
||||
|
||||
/* Next fiber chosen */
|
||||
if(pfdNext)
|
||||
{
|
||||
/* Give some homework to the next fiber */
|
||||
pfdNext->pfdPrev = pfdCur;
|
||||
pfdNext->bExitPrev = bExit;
|
||||
|
||||
/* Switch to the next fiber */
|
||||
SwitchToFiber(pfdNext->pFiber);
|
||||
|
||||
/* Complete the switch back to this fiber */
|
||||
Fbt_AfterSwitch(pfdCur);
|
||||
}
|
||||
/* No next fiber, and current fiber exiting */
|
||||
else if(bExit)
|
||||
{
|
||||
PVOID pCurFiber;
|
||||
|
||||
/* Delete the current fiber. This kills the thread and stops the simulation */
|
||||
if(pfdLastStarveScan == pfdCur)
|
||||
pfdLastStarveScan = NULL;
|
||||
|
||||
pCurFiber = pfdCur->pFiber;
|
||||
free(pfdCur);
|
||||
DeleteFiber(pCurFiber);
|
||||
}
|
||||
/* No next fiber: continue running the current one */
|
||||
}
|
||||
|
||||
void Fbt_Exit(VOID)
|
||||
{
|
||||
Fbt_Dispatch(GetFiberData(), 1);
|
||||
}
|
||||
|
||||
void Fbt_CreateFiber(int bInitial)
|
||||
{
|
||||
PVOID pFiber;
|
||||
struct FiberData * pData;
|
||||
static int s_bFiberPrioSeeded = 0;
|
||||
static LONG s_nFiberIdSeed = 0;
|
||||
|
||||
pData = malloc(sizeof(struct FiberData));
|
||||
|
||||
assert(pData);
|
||||
|
||||
if(bInitial)
|
||||
pFiber = ConvertThreadToFiber(pData);
|
||||
else
|
||||
pFiber = CreateFiber(0, Fbt_Startup, pData);
|
||||
|
||||
if(!s_bFiberPrioSeeded)
|
||||
{
|
||||
unsigned nFiberPrioSeed;
|
||||
time_t tCurTime;
|
||||
|
||||
tCurTime = time(NULL);
|
||||
memcpy(&nFiberPrioSeed, &tCurTime, sizeof(nFiberPrioSeed));
|
||||
srand(nFiberPrioSeed);
|
||||
s_bFiberPrioSeeded = 1;
|
||||
}
|
||||
|
||||
assert(pFiber);
|
||||
|
||||
pData->nMagic = 0x12345678;
|
||||
pData->nId = InterlockedIncrement(&s_nFiberIdSeed);
|
||||
pData->nPrio = rand() % 32;
|
||||
pData->pFiber = pFiber;
|
||||
pData->nQuantumQueued = 0;
|
||||
pData->nBoost = 0;
|
||||
pData->nRealPrio = pData->nPrio;
|
||||
pData->pfdPrev = NULL;
|
||||
pData->bExitPrev = 0;
|
||||
|
||||
if(bInitial)
|
||||
{
|
||||
InitializeListHead(&pData->leQueue);
|
||||
}
|
||||
else
|
||||
{
|
||||
InsertTailList
|
||||
(
|
||||
&a_leQueues[pData->nPrio],
|
||||
&pData->leQueue
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void DoStuff(void)
|
||||
{
|
||||
unsigned i;
|
||||
unsigned n;
|
||||
unsigned nId;
|
||||
|
||||
n = rand() % 1000;
|
||||
nId = Fbt_GetCurrentId();
|
||||
|
||||
_ftprintf(stderr, _T("[%u] BEGIN\n"), nId);
|
||||
|
||||
for(i = 0; i < n; ++ i)
|
||||
{
|
||||
unsigned j;
|
||||
unsigned m;
|
||||
|
||||
_ftprintf(stderr, _T("[%u] [%u/%u]\n"), nId, i + 1, n);
|
||||
|
||||
m = rand() % 1000;
|
||||
|
||||
for(j = 0; j < m; ++ j)
|
||||
Sleep(0);
|
||||
|
||||
Fbt_Yield();
|
||||
}
|
||||
|
||||
_ftprintf(stderr, _T("[%u] END\n"), nId);
|
||||
}
|
||||
|
||||
int _tmain(int argc, _TCHAR const * const * argv)
|
||||
{
|
||||
unsigned i;
|
||||
unsigned nFibers;
|
||||
|
||||
if(argc > 1)
|
||||
nFibers = _tcstoul(argv[1], 0, NULL);
|
||||
else
|
||||
nFibers = FIBERTEST_COUNT;
|
||||
|
||||
for(i = 0; i < 32; ++ i)
|
||||
{
|
||||
InitializeListHead(&a_leQueues[i]);
|
||||
}
|
||||
|
||||
for(i = 0; i < nFibers; ++ i)
|
||||
Fbt_CreateFiber(i == 0);
|
||||
|
||||
Fbt_Startup(GetFiberData());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* EOF */
|
@@ -1,4 +1,4 @@
|
||||
# $Id: makefile,v 1.1 2004/02/11 21:04:18 hbirr Exp $
|
||||
# $Id: Makefile,v 1.8 2002/06/02 19:24:58 chorns Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
@@ -8,8 +8,7 @@ TARGET_TYPE = program
|
||||
|
||||
TARGET_APPTYPE = console
|
||||
|
||||
TARGET_NAME = pesum
|
||||
|
||||
TARGET_NAME = file
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
54
reactos/apps/tests/file/file.c
Normal file
54
reactos/apps/tests/file/file.c
Normal file
@@ -0,0 +1,54 @@
|
||||
/***********************************************************
|
||||
* File read/write test utility *
|
||||
**********************************************************/
|
||||
|
||||
#include <windows.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main( void )
|
||||
{
|
||||
HANDLE file;
|
||||
char buffer[4096];
|
||||
DWORD wrote;
|
||||
int c;
|
||||
|
||||
file = CreateFile("test.dat",
|
||||
GENERIC_READ | GENERIC_WRITE,
|
||||
0,
|
||||
NULL,
|
||||
CREATE_ALWAYS,
|
||||
0,
|
||||
0);
|
||||
|
||||
if (file == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
printf("Error opening file (Status %x)\n", GetLastError());
|
||||
return 1;
|
||||
}
|
||||
for( c = 0; c < sizeof( buffer ); c++ )
|
||||
buffer[c] = (char)c;
|
||||
printf("Writing file\n");
|
||||
if (WriteFile( file, buffer, 4096, &wrote, NULL) == FALSE)
|
||||
{
|
||||
printf("Error writing file (Status %x)\n", GetLastError());
|
||||
exit(2);
|
||||
}
|
||||
printf("Reading file\n");
|
||||
SetFilePointer( file, 0, 0, FILE_BEGIN );
|
||||
if (ReadFile( file, buffer, 4096, &wrote, NULL) == FALSE)
|
||||
{
|
||||
printf("Error reading file (Status %x)\n", GetLastError());
|
||||
exit(3);
|
||||
}
|
||||
for( c = 0; c < sizeof( buffer ); c++ )
|
||||
if( buffer[c] != (char)c )
|
||||
{
|
||||
printf( "Error: data read back is not what was written\n" );
|
||||
CloseHandle( file );
|
||||
return 0;
|
||||
}
|
||||
printf("Finished, works fine\n");
|
||||
CloseHandle( file );
|
||||
return 0;
|
||||
}
|
344
reactos/apps/tests/gditest/gditest.c
Normal file
344
reactos/apps/tests/gditest/gditest.c
Normal file
@@ -0,0 +1,344 @@
|
||||
/*
|
||||
* gditest
|
||||
dec 26, 2001 -- gditest bug fix by Richard Campbell
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
extern BOOL STDCALL GdiDllInitialize(HANDLE hInstance, DWORD Event, LPVOID Reserved);
|
||||
|
||||
void __stdcall Background (HDC Desktop)
|
||||
{
|
||||
HPEN Pen;
|
||||
int x, y;
|
||||
|
||||
Pen = CreatePen(PS_SOLID, 1, RGB(64, 64, 128));
|
||||
|
||||
SelectObject (Desktop, Pen);
|
||||
|
||||
MoveToEx (Desktop, 0, 0, NULL);
|
||||
LineTo (Desktop, 640, 480);
|
||||
for (y = 479, x = 0; x < 640; x+=42)
|
||||
{
|
||||
MoveToEx (Desktop, 0, 0, NULL);
|
||||
LineTo (Desktop, x, y);
|
||||
}
|
||||
for (y = 0, x = 639; y < 480; y+=42)
|
||||
{
|
||||
MoveToEx (Desktop, 0, 0, NULL);
|
||||
LineTo (Desktop, x, y);
|
||||
}
|
||||
}
|
||||
|
||||
void gditest( void ){
|
||||
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;
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
// Background
|
||||
Background (Desktop);
|
||||
|
||||
|
||||
//ei
|
||||
BlueBrush = CreateSolidBrush( RGB(0, 0, 0xff) );
|
||||
DefBrush = SelectObject( Desktop, BlueBrush );
|
||||
|
||||
hRgn1 = CreateRectRgn( 1, 2, 100, 101 );
|
||||
hRgn2 = CreateRectRgn( 10, 20, 150, 151 );
|
||||
hRgn3 = CreateRectRgn( 1, 1, 1, 1);
|
||||
CombineRgn( hRgn3, hRgn1, hRgn2, RGN_XOR );
|
||||
|
||||
PaintRgn( Desktop, hRgn3 );
|
||||
SelectObject( Desktop, DefBrush );
|
||||
DeleteObject( BlueBrush );
|
||||
|
||||
// Create a blue pen and select it into the DC
|
||||
BluePen = CreatePen(PS_SOLID, 8, RGB(0, 0, 0xff));
|
||||
SelectObject(Desktop, BluePen);
|
||||
|
||||
// Draw a shape on the DC
|
||||
MoveToEx(Desktop, 50, 50, NULL);
|
||||
LineTo(Desktop, 200, 60);
|
||||
LineTo(Desktop, 200, 300);
|
||||
LineTo(Desktop, 50, 50);
|
||||
MoveToEx(Desktop, 50, 50, NULL);
|
||||
LineTo(Desktop, 200, 50);
|
||||
|
||||
WhitePen = CreatePen(PS_SOLID, 3, RGB(0xff, 0xff, 0xff));
|
||||
SelectObject(Desktop, WhitePen);
|
||||
|
||||
MoveToEx(Desktop, 20, 70, NULL);
|
||||
LineTo(Desktop, 500, 70);
|
||||
MoveToEx(Desktop, 70, 20, NULL);
|
||||
LineTo(Desktop, 70, 150);
|
||||
|
||||
// Test font support
|
||||
GreenPen = CreatePen(PS_SOLID, 3, RGB(0, 0xff, 0));
|
||||
RedPen = CreatePen(PS_SOLID, 3, RGB(0xff, 0, 0));
|
||||
|
||||
hf = CreateFontA(24, 0, 0, TA_BASELINE, FW_NORMAL, FALSE, FALSE, FALSE,
|
||||
ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,
|
||||
DEFAULT_QUALITY, FIXED_PITCH|FF_DONTCARE, "Helmet");
|
||||
SelectObject(Desktop, hf);
|
||||
SetTextColor(Desktop, RGB(0xff, 0, 0));
|
||||
TextOutA(Desktop, 70, 70, "React", 5);
|
||||
SetTextColor(Desktop, RGB(0, 0xff, 0));
|
||||
TextOutA(Desktop, 140, 70, "OS", 2);
|
||||
|
||||
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");
|
||||
SelectObject(Desktop, tf);
|
||||
SetTextColor(Desktop, RGB(0xff, 0xff, 0xff));
|
||||
TextOutA(Desktop, 70, 90, "This is a test of ReactOS text, using the FreeType 2 library!", 61);
|
||||
|
||||
// TEST 1: Copy from the VGA into a device compatible DC, draw on it, then blt it to the VGA again
|
||||
MyDC = CreateCompatibleDC(Desktop);
|
||||
MyBitmap = CreateCompatibleBitmap(Desktop, 151, 251);
|
||||
SelectObject(MyDC, MyBitmap);
|
||||
BitBlt(MyDC, 0, 0, 151, 251, Desktop, 50, 50, SRCCOPY); // can we say 151, 251 since bottom corner is not inclusive?
|
||||
|
||||
SelectObject(MyDC, GreenPen);
|
||||
Rectangle(MyDC, 10, 10, 50, 50);
|
||||
|
||||
// TEST 2: Copy from the device compatible DC into a 24BPP bitmap, draw on it, then blt to the VGA again
|
||||
BitInf.biSize = sizeof(BITMAPINFOHEADER);
|
||||
BitInf.biWidth = 152;
|
||||
BitInf.biHeight = -252; // it's top down (since BI_RGB is used, the sign is operative of direction)
|
||||
BitInf.biPlanes = 1;
|
||||
BitInf.biBitCount = 24;
|
||||
BitInf.biCompression = BI_RGB;
|
||||
BitInf.biSizeImage = 0;
|
||||
BitInf.biXPelsPerMeter = 0;
|
||||
BitInf.biYPelsPerMeter = 0;
|
||||
BitInf.biClrUsed = 0;
|
||||
BitInf.biClrImportant = 0;
|
||||
BitPalInf.bmiHeader = BitInf;
|
||||
DIB24 = (HBITMAP) CreateDIBSection(NULL, &BitPalInf, DIB_RGB_COLORS, NULL, NULL, 0);
|
||||
DC24 = CreateCompatibleDC(NULL);
|
||||
SelectObject(DC24, DIB24);
|
||||
|
||||
BitBlt(DC24, 0, 0, 101, 201, MyDC, 0, 0, SRCCOPY);
|
||||
SelectObject(DC24, RedPen);
|
||||
Rectangle(DC24, 80, 90, 100, 110);
|
||||
MoveToEx(DC24, 80, 90, NULL);
|
||||
LineTo(DC24, 100, 110);
|
||||
BitBlt(Desktop, 200, 200, 110, 120, DC24, 0, 0, SRCCOPY);
|
||||
|
||||
Sleep( 10000 ); // fixme delay only 10000 (for 10 seconds)
|
||||
// Free up everything
|
||||
DeleteDC(Desktop);
|
||||
DeleteDC(MyDC);
|
||||
}
|
||||
|
||||
void DumpRgnData( HRGN hRgn )
|
||||
{
|
||||
int size, ret, i;
|
||||
LPRGNDATA rgnData;
|
||||
|
||||
size = GetRegionData( hRgn, 0, NULL );
|
||||
if( size == 0 ){
|
||||
printf("GetRegionData returned 0\n");
|
||||
return;
|
||||
}
|
||||
rgnData = (LPRGNDATA) malloc( size );
|
||||
ret = GetRegionData( hRgn, size, rgnData );
|
||||
if( ret == 0 ){
|
||||
printf("GetRegionData( hRgn, size, rgnData ) returned 0\n");
|
||||
return;
|
||||
}
|
||||
printf("Bounds: left=%d top=%d right=%d bottom=%d, count: %d, type: %i\n\n",
|
||||
rgnData->rdh.rcBound.left, rgnData->rdh.rcBound.top, rgnData->rdh.rcBound.right, rgnData->rdh.rcBound.bottom,
|
||||
rgnData->rdh.nCount, rgnData->rdh.iType);
|
||||
printf("Rects:\t i \t left \t top \t right \t bottom\n");
|
||||
for ( i = 0; i < rgnData->rdh.nCount; i++ ) {
|
||||
PRECT pr = (PRECT) rgnData->Buffer + i;
|
||||
printf("\t %d \t %d \t %d \t %d \t %d\n", i, pr->left, pr->top, pr->right, pr->bottom );
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
void rgntest( void )
|
||||
{
|
||||
HRGN hRgn1, hRgn2, hRgn3;
|
||||
RECT Rect;
|
||||
int i;
|
||||
|
||||
hRgn1 = CreateRectRgn( 1, 2, 100, 101 );
|
||||
if( hRgn1 == NULL ) {
|
||||
printf("Failed at hRgn1 = CreateRectRgn( 1, 2, 100, 101 )\n");
|
||||
return;
|
||||
}
|
||||
i = GetRgnBox( hRgn1, &Rect );
|
||||
if( i==0 ){
|
||||
printf("Failed GetRgnBox( hRgn1, &Rect )\n");
|
||||
return;
|
||||
}
|
||||
printf("GetRgnBox( hRgn1, &Rect ): i=%d, left=%d top=%d right=%d bottom=%d\n\n",
|
||||
i, Rect.left, Rect.top, Rect.right, Rect.bottom );
|
||||
|
||||
DumpRgnData( hRgn1 );
|
||||
|
||||
hRgn2 = CreateRectRgn( 51, 53, 150, 152 );
|
||||
if( hRgn2 == NULL ) {
|
||||
printf("Failed at hRgn2 = CreateRectRgn( 51, 53, 150, 152 )\n");
|
||||
return;
|
||||
}
|
||||
i = GetRgnBox( hRgn2, &Rect );
|
||||
if( i==0 ){
|
||||
printf("Failed GetRgnBox( hRgn2, &Rect )\n");
|
||||
return;
|
||||
}
|
||||
printf("GetRgnBox( hRgn2, &Rect ): i=%d, left=%d top=%d right=%d bottom=%d\n\n",
|
||||
i, Rect.left, Rect.top, Rect.right, Rect.bottom );
|
||||
|
||||
DumpRgnData( hRgn2 );
|
||||
|
||||
if( EqualRgn( hRgn1, hRgn2 ) == TRUE ){
|
||||
printf("\t hRgn1, hRgn2 are equal\n");
|
||||
}
|
||||
else{
|
||||
printf("\t hRgn1, hRgn2 are NOT equal\n\n");
|
||||
}
|
||||
|
||||
i = OffsetRgn(hRgn1,50,51);
|
||||
if( i==ERROR ){
|
||||
printf("Failed OffsetRgn(hRgn1,50,51)\n");
|
||||
return;
|
||||
}
|
||||
|
||||
i = GetRgnBox( hRgn1, &Rect );
|
||||
if( i==0 ){
|
||||
printf("Failed GetRgnBox( hRgn1, &Rect )\n");
|
||||
return;
|
||||
}
|
||||
printf("After offset\nGetRgnBox( hRgn1, &Rect ): i=%d, left=%d top=%d right=%d bottom=%d\n\n",
|
||||
i, Rect.left, Rect.top, Rect.right, Rect.bottom );
|
||||
|
||||
if( EqualRgn( hRgn1, hRgn2 ) == TRUE ){
|
||||
printf("\t hRgn1, hRgn2 are equal after offset\n");
|
||||
}
|
||||
else{
|
||||
printf("\t hRgn1, hRgn2 are NOT equal after offset!\n\n");
|
||||
}
|
||||
|
||||
i = SetRectRgn(hRgn1, 10, 11, 110, 111 );
|
||||
if( i==0 ){
|
||||
printf("Failed SetRectRgn(hRgn1... )\n");
|
||||
return;
|
||||
}
|
||||
i = GetRgnBox( hRgn1, &Rect );
|
||||
if( i==0 ){
|
||||
printf("Failed GetRgnBox( hRgn1, &Rect )\n");
|
||||
return;
|
||||
}
|
||||
printf("after SetRectRgn(hRgn1, 10, 11, 110, 111 ):\n i=%d, left=%d top=%d right=%d bottom=%d\n\n",
|
||||
i, Rect.left, Rect.top, Rect.right, Rect.bottom );
|
||||
|
||||
hRgn3 = CreateRectRgn( 1, 1, 1, 1);
|
||||
i = CombineRgn( hRgn3, hRgn1, hRgn2, RGN_AND );
|
||||
if( i==ERROR ){
|
||||
printf("Fail: CombineRgn( hRgn3, hRgn1, hRgn2, RGN_AND ). LastError: %d\n", GetLastError);
|
||||
return;
|
||||
}
|
||||
|
||||
if( GetRgnBox( hRgn3, &Rect )==0 ){
|
||||
printf("Failed GetRgnBox( hRgn1, &Rect )\n");
|
||||
return;
|
||||
}
|
||||
printf("After CombineRgn( hRgn3, hRgn1, hRgn2, RGN_AND ): \nGetRgnBox( hRgn3, &Rect ): CR_i=%d, left=%d top=%d right=%d bottom=%d\n\n",
|
||||
i, Rect.left, Rect.top, Rect.right, Rect.bottom );
|
||||
DumpRgnData( hRgn3 );
|
||||
|
||||
i = CombineRgn( hRgn3, hRgn1, hRgn2, RGN_OR );
|
||||
if( i==ERROR ){
|
||||
printf("Fail: CombineRgn( hRgn3, hRgn1, hRgn2, RGN_OR ). LastError: %d\n", GetLastError);
|
||||
return;
|
||||
}
|
||||
|
||||
if( GetRgnBox( hRgn3, &Rect )==0 ){
|
||||
printf("Failed GetRgnBox( hRgn1, &Rect )\n");
|
||||
return;
|
||||
}
|
||||
printf("After CombineRgn( hRgn3, hRgn1, hRgn2, RGN_OR ): \nGetRgnBox( hRgn3, &Rect ): CR_i=%d, left=%d top=%d right=%d bottom=%d\n\n",
|
||||
i, Rect.left, Rect.top, Rect.right, Rect.bottom );
|
||||
DumpRgnData( hRgn3 );
|
||||
|
||||
i = CombineRgn( hRgn3, hRgn1, hRgn2, RGN_DIFF );
|
||||
if( i==ERROR ){
|
||||
printf("Fail: CombineRgn( hRgn3, hRgn1, hRgn2, RGN_DIFF ). LastError: %d\n", GetLastError);
|
||||
return;
|
||||
}
|
||||
|
||||
if( GetRgnBox( hRgn3, &Rect )==0 ){
|
||||
printf("Failed GetRgnBox( hRgn1, &Rect )\n");
|
||||
return;
|
||||
}
|
||||
printf("After CombineRgn( hRgn3, hRgn1, hRgn2, RGN_DIFF ): \nGetRgnBox( hRgn3, &Rect ): CR_i=%d, left=%d top=%d right=%d bottom=%d\n\n",
|
||||
i, Rect.left, Rect.top, Rect.right, Rect.bottom );
|
||||
DumpRgnData( hRgn3 );
|
||||
|
||||
i = CombineRgn( hRgn3, hRgn1, hRgn2, RGN_XOR );
|
||||
if( i==ERROR ){
|
||||
printf("Fail: CombineRgn( hRgn3, hRgn1, hRgn2, RGN_XOR ). LastError: %d\n", GetLastError);
|
||||
return;
|
||||
}
|
||||
|
||||
if( GetRgnBox( hRgn3, &Rect )==0 ){
|
||||
printf("Failed GetRgnBox( hRgn3, &Rect )\n");
|
||||
return;
|
||||
}
|
||||
printf("After CombineRgn( hRgn3, hRgn1, hRgn2, RGN_XOR ): \nGetRgnBox( hRgn3, &Rect ): CR_i=%d, left=%d top=%d right=%d bottom=%d\n\n",
|
||||
i, Rect.left, Rect.top, Rect.right, Rect.bottom );
|
||||
DumpRgnData( hRgn3 );
|
||||
|
||||
i = CombineRgn( hRgn1, hRgn3, hRgn2, RGN_COPY );
|
||||
if( i==ERROR ){
|
||||
printf("Fail: CombineRgn( hRgn1, hRgn3, hRgn2, RGN_COPY ). LastError: %d\n", GetLastError);
|
||||
return;
|
||||
}
|
||||
|
||||
if( GetRgnBox( hRgn1, &Rect )==0 ){
|
||||
printf("Failed GetRgnBox( hRgn1, &Rect )\n");
|
||||
return;
|
||||
}
|
||||
printf("After CombineRgn( hRgn1, hRgn3, hRgn2, RGN_COPY ): \nGetRgnBox( hRgn1, &Rect ): CR_i=%d, left=%d top=%d right=%d bottom=%d\n\n",
|
||||
i, Rect.left, Rect.top, Rect.right, Rect.bottom );
|
||||
DumpRgnData( hRgn1 );
|
||||
|
||||
|
||||
DeleteObject( hRgn1 );
|
||||
DeleteObject( hRgn2 );
|
||||
DeleteObject( hRgn3 );
|
||||
printf("region test finished\n");
|
||||
}
|
||||
|
||||
int main (int argc, char* argv[])
|
||||
{
|
||||
printf("Entering GDITest..\n");
|
||||
printf("use gditest for older tests\n");
|
||||
printf("use gditest 1 for region test\n");
|
||||
|
||||
GdiDllInitialize (NULL, DLL_PROCESS_ATTACH, NULL);
|
||||
if( argc < 2 )
|
||||
gditest();
|
||||
else {
|
||||
if( !strncmp( argv[1], "1", 1 ) ) {
|
||||
rgntest();
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
# $Id: makefile,v 1.2 2003/11/14 17:13:20 weiden Exp $
|
||||
# $Id: makefile,v 1.8 2002/06/02 19:24:58 chorns Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
@@ -8,14 +8,12 @@ TARGET_TYPE = program
|
||||
|
||||
TARGET_APPTYPE = console
|
||||
|
||||
TARGET_NAME = subclass
|
||||
TARGET_NAME = gditest
|
||||
|
||||
TARGET_SDKLIBS = kernel32.a gdi32.a
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_CFLAGS += -D_DISABLE_TIDENTS -Werror -Wall
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
@@ -1,4 +1,4 @@
|
||||
# $Id: Makefile,v 1.2 2003/11/14 17:13:17 weiden Exp $
|
||||
# $Id: Makefile,v 1.1 2003/10/13 15:05:59 weiden Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
@@ -12,8 +12,6 @@ TARGET_NAME = global_mem
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
@@ -7,7 +7,6 @@
|
||||
*/
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
/*
|
||||
** All output is line wrapped to fit a 80 column screen.
|
||||
@@ -142,7 +141,7 @@ void OUTPUT_Result(TEST_STATUS status)
|
||||
void OUTPUT_HexDword(DWORD dw)
|
||||
{
|
||||
char buffer[32];
|
||||
sprintf(buffer, "0x%lX",dw);
|
||||
sprintf(buffer, "0x%X",dw);
|
||||
OUTPUT_Line(buffer);
|
||||
}
|
||||
|
||||
@@ -173,7 +172,7 @@ void OutputErrorCode()
|
||||
{
|
||||
char buffer[256];
|
||||
|
||||
sprintf(buffer,"GetLastError() returned %lu", GetLastError());
|
||||
sprintf(buffer,"GetLastError() returned %d", GetLastError());
|
||||
|
||||
OUTPUT_Line(buffer);
|
||||
}
|
||||
@@ -261,6 +260,7 @@ TEST_STATUS TestGlobalLockNUnlock(UINT allocFlags)
|
||||
{
|
||||
HGLOBAL hMem = 0;
|
||||
LPVOID pMem = 0;
|
||||
LONG errorCode = 0;
|
||||
TEST_STATUS subtest = SKIPPED;
|
||||
TEST_STATUS result = FAILED;
|
||||
|
||||
@@ -627,7 +627,7 @@ TEST_STATUS TestGlobalFlagsMoveable()
|
||||
|
||||
OUTPUT_Line("Testing for a lock of 0");
|
||||
uFlags = GlobalFlags(hMem);
|
||||
if (((GMEM_LOCKCOUNT & uFlags) == 0)) /*no locks*/
|
||||
if ((GMEM_LOCKCOUNT & uFlags == 0)) /*no locks*/
|
||||
{
|
||||
result = TEST_CombineStatus(result, PASSED);
|
||||
}
|
||||
@@ -643,7 +643,7 @@ TEST_STATUS TestGlobalFlagsMoveable()
|
||||
OUTPUT_Line("Testing after a lock");
|
||||
OUTPUT_Line("Testing for a lock of 1");
|
||||
uFlags = GlobalFlags(hMem);
|
||||
if (((GMEM_LOCKCOUNT & uFlags) == 1)) /*no locks*/
|
||||
if ((GMEM_LOCKCOUNT & uFlags == 1)) /*no locks*/
|
||||
{
|
||||
result = TEST_CombineStatus(result, PASSED);
|
||||
}
|
||||
@@ -657,7 +657,7 @@ TEST_STATUS TestGlobalFlagsMoveable()
|
||||
OUTPUT_Line("Testing after an unlock");
|
||||
OUTPUT_Line("Testing for a lock of 0");
|
||||
uFlags = GlobalFlags(hMem);
|
||||
if (((GMEM_LOCKCOUNT & uFlags) == 0)) /*no locks*/
|
||||
if ((GMEM_LOCKCOUNT & uFlags == 0)) /*no locks*/
|
||||
{
|
||||
result = TEST_CombineStatus(result, PASSED);
|
||||
}
|
||||
@@ -725,7 +725,7 @@ TEST_STATUS TestGlobalFlagsFixed()
|
||||
OUTPUT_Line("Testing initial allocation");
|
||||
OUTPUT_Line("Testing for non-discarded and lock of 0");
|
||||
uFlags = GlobalFlags(hMem);
|
||||
if (((GMEM_LOCKCOUNT & uFlags) == 0) && /*no locks*/
|
||||
if ((GMEM_LOCKCOUNT & uFlags == 0) && /*no locks*/
|
||||
(((uFlags >> 8) & 0xff) == 0 )) /*not discarded*/
|
||||
{
|
||||
result = TEST_CombineStatus(result, PASSED);
|
||||
@@ -741,7 +741,7 @@ TEST_STATUS TestGlobalFlagsFixed()
|
||||
OUTPUT_Line("Testing after a lock");
|
||||
OUTPUT_Line("Testing for non-discarded and lock of 0");
|
||||
uFlags = GlobalFlags(hMem);
|
||||
if (((GMEM_LOCKCOUNT & uFlags) == 0) && /*no locks*/
|
||||
if ((GMEM_LOCKCOUNT & uFlags == 0) && /*no locks*/
|
||||
(((uFlags >> 8) & 0xff) == 0 )) /*not discarded*/
|
||||
{
|
||||
result = TEST_CombineStatus(result, PASSED);
|
||||
|
@@ -1,6 +0,0 @@
|
||||
*.o
|
||||
*.d
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
@@ -1,181 +0,0 @@
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM);
|
||||
|
||||
int WINAPI
|
||||
WinMain(HINSTANCE hInstance,
|
||||
HINSTANCE hPrevInstance,
|
||||
LPSTR lpszCmdLine,
|
||||
int nCmdShow)
|
||||
{
|
||||
WNDCLASS wc;
|
||||
MSG msg;
|
||||
HWND hWnd;
|
||||
|
||||
wc.lpszClassName = "GradientClass";
|
||||
wc.lpfnWndProc = MainWndProc;
|
||||
wc.style = CS_VREDRAW | CS_HREDRAW;
|
||||
wc.hInstance = hInstance;
|
||||
wc.hIcon = LoadIcon(NULL, (LPCTSTR)IDI_APPLICATION);
|
||||
wc.hCursor = LoadCursor(NULL, (LPCTSTR)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%lX)\n",
|
||||
GetLastError());
|
||||
return(1);
|
||||
}
|
||||
|
||||
hWnd = CreateWindow("GradientClass",
|
||||
"GradientFill Test",
|
||||
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%lX)\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)
|
||||
{
|
||||
HDC hDC;
|
||||
|
||||
switch(msg)
|
||||
{
|
||||
case WM_PAINT:
|
||||
{
|
||||
PAINTSTRUCT ps;
|
||||
TRIVERTEX vert [5] ;
|
||||
GRADIENT_TRIANGLE gTRi[3];
|
||||
GRADIENT_RECT gRect[2];
|
||||
hDC = BeginPaint(hWnd, &ps);
|
||||
|
||||
vert [0] .x = 0;
|
||||
vert [0] .y = 0;
|
||||
vert [0] .Red = 0xff00;
|
||||
vert [0] .Green = 0xff00;
|
||||
vert [0] .Blue = 0xff00;
|
||||
vert [0] .Alpha = 0x0000;
|
||||
|
||||
vert [1] .x = 300;
|
||||
vert [1] .y = 20;
|
||||
vert [1] .Red = 0x0000;
|
||||
vert [1] .Green = 0x0000;
|
||||
vert [1] .Blue = 0xff00;
|
||||
vert [1] .Alpha = 0x0000;
|
||||
|
||||
vert [2] .x = 100;
|
||||
vert [2] .y = 200;
|
||||
vert [2] .Red = 0xff00;
|
||||
vert [2] .Green = 0x0000;
|
||||
vert [2] .Blue = 0x0000;
|
||||
vert [2] .Alpha = 0x0000;
|
||||
|
||||
vert [3] .x = 250;
|
||||
vert [3] .y = 300;
|
||||
vert [3] .Red = 0x8000;
|
||||
vert [3] .Green = 0x8000;
|
||||
vert [3] .Blue = 0x0000;
|
||||
vert [3] .Alpha = 0x0000;
|
||||
|
||||
vert [4] .x = 325;
|
||||
vert [4] .y = 300;
|
||||
vert [4] .Red = 0x0000;
|
||||
vert [4] .Green = 0xff00;
|
||||
vert [4] .Blue = 0x0000;
|
||||
vert [4] .Alpha = 0x0000;
|
||||
|
||||
gTRi[0].Vertex1 = 0;
|
||||
gTRi[0].Vertex2 = 1;
|
||||
gTRi[0].Vertex3 = 2;
|
||||
|
||||
gTRi[1].Vertex1 = 1;
|
||||
gTRi[1].Vertex2 = 2;
|
||||
gTRi[1].Vertex3 = 3;
|
||||
|
||||
gTRi[2].Vertex1 = 1;
|
||||
gTRi[2].Vertex2 = 3;
|
||||
gTRi[2].Vertex3 = 4;
|
||||
|
||||
GdiGradientFill(hDC,vert,5,&gTRi,3,GRADIENT_FILL_TRIANGLE);
|
||||
|
||||
|
||||
vert [0] .x = 5;
|
||||
vert [0] .y = 200;
|
||||
vert [0] .Red = 0x0000;
|
||||
vert [0] .Green = 0x0000;
|
||||
vert [0] .Blue = 0x0000;
|
||||
vert [0] .Alpha = 0x0000;
|
||||
|
||||
vert [1] .x = 90;
|
||||
vert [1] .y = 240;
|
||||
vert [1] .Red = 0x0000;
|
||||
vert [1] .Green = 0x0000;
|
||||
vert [1] .Blue = 0xff00;
|
||||
vert [1] .Alpha = 0x0000;
|
||||
|
||||
vert [2] .x = 5;
|
||||
vert [2] .y = 245;
|
||||
vert [2] .Red = 0x0000;
|
||||
vert [2] .Green = 0x0000;
|
||||
vert [2] .Blue = 0x0000;
|
||||
vert [2] .Alpha = 0x0000;
|
||||
|
||||
vert [3] .x = 90;
|
||||
vert [3] .y = 300;
|
||||
vert [3] .Red = 0x0000;
|
||||
vert [3] .Green = 0x0000;
|
||||
vert [3] .Blue = 0xff00;
|
||||
vert [3] .Alpha = 0x0000;
|
||||
|
||||
gRect[0].UpperLeft = 0;
|
||||
gRect[0].LowerRight = 1;
|
||||
|
||||
gRect[1].UpperLeft = 2;
|
||||
gRect[1].LowerRight = 3;
|
||||
|
||||
GdiGradientFill(hDC,vert,4,&gRect[0],1,GRADIENT_FILL_RECT_H);
|
||||
GdiGradientFill(hDC,vert,4,&gRect[1],1,GRADIENT_FILL_RECT_V);
|
||||
|
||||
EndPaint(hWnd, &ps);
|
||||
break;
|
||||
}
|
||||
|
||||
case WM_DESTROY:
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
|
||||
default:
|
||||
return DefWindowProc(hWnd, msg, wParam, lParam);
|
||||
}
|
||||
return 0;
|
||||
}
|
@@ -1,6 +0,0 @@
|
||||
*.o
|
||||
*.d
|
||||
*.exe
|
||||
*.coff
|
||||
*.sym
|
||||
*.map
|
@@ -1,132 +0,0 @@
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
static GUITHREADINFO gti;
|
||||
//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;
|
||||
|
||||
wc.lpszClassName = "GuiThreadInfoClass";
|
||||
wc.lpfnWndProc = MainWndProc;
|
||||
wc.style = CS_VREDRAW | CS_HREDRAW;
|
||||
wc.hInstance = hInstance;
|
||||
wc.hIcon = LoadIcon(NULL, (LPCTSTR)IDI_APPLICATION);
|
||||
wc.hCursor = LoadCursor(NULL, (LPCTSTR)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%lX)\n",
|
||||
GetLastError());
|
||||
return(1);
|
||||
}
|
||||
|
||||
hWnd = CreateWindow("GuiThreadInfoClass",
|
||||
"GetGUIThreadInfo",
|
||||
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%lX)\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");
|
||||
|
||||
gti.cbSize = sizeof(GUITHREADINFO);
|
||||
GetGUIThreadInfo(0, >i);
|
||||
|
||||
SetTimer(hWnd, 1, 1000, NULL);
|
||||
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;
|
||||
char str[255];
|
||||
|
||||
switch(msg)
|
||||
{
|
||||
|
||||
case WM_PAINT:
|
||||
hDC = BeginPaint(hWnd, &ps);
|
||||
wsprintf(str, "flags: ");
|
||||
if(gti.flags & GUI_16BITTASK) lstrcat(str, "GUI_16BITTASK ");
|
||||
if(gti.flags & GUI_CARETBLINKING) lstrcat(str, "GUI_CARETBLINKING ");
|
||||
if(gti.flags & GUI_INMENUMODE) lstrcat(str, "GUI_INMENUMODE ");
|
||||
if(gti.flags & GUI_INMOVESIZE) lstrcat(str, "GUI_INMOVESIZE ");
|
||||
if(gti.flags & GUI_POPUPMENUMODE) lstrcat(str, "GUI_POPUPMENUMODE ");
|
||||
if(gti.flags & GUI_SYSTEMMENUMODE) lstrcat(str, "GUI_SYSTEMMENUMODE ");
|
||||
TextOut(hDC, 10, 10, str, strlen(str));
|
||||
|
||||
wsprintf(str, "hwndActive == %08X", gti.hwndActive);
|
||||
TextOut(hDC, 10, 30, str, strlen(str));
|
||||
wsprintf(str, "hwndFocus == %08X", gti.hwndFocus);
|
||||
TextOut(hDC, 10, 50, str, strlen(str));
|
||||
wsprintf(str, "hwndCapture == %08X", gti.hwndCapture);
|
||||
TextOut(hDC, 10, 70, str, strlen(str));
|
||||
wsprintf(str, "hwndMenuOwner == %08X", gti.hwndMenuOwner);
|
||||
TextOut(hDC, 10, 90, str, strlen(str));
|
||||
wsprintf(str, "hwndMoveSize == %08X", gti.hwndMoveSize);
|
||||
TextOut(hDC, 10, 110, str, strlen(str));
|
||||
wsprintf(str, "hwndCaret == %08X", gti.hwndCaret);
|
||||
TextOut(hDC, 10, 130, str, strlen(str));
|
||||
wsprintf(str, "rcCaret == (%lu, %lu, %lu, %lu)", gti.rcCaret.left, gti.rcCaret.top, gti.rcCaret.right, gti.rcCaret.bottom);
|
||||
TextOut(hDC, 10, 150, str, strlen(str));
|
||||
|
||||
wsprintf(str, "GetGuiResources for the current process: %08X", GetCurrentProcess());
|
||||
TextOut(hDC, 10, 180, str, strlen(str));
|
||||
wsprintf(str, "GetGuiResources: GR_GDIOBJECTS == %04X", GetGuiResources(GetCurrentProcess(), GR_GDIOBJECTS));
|
||||
TextOut(hDC, 10, 200, str, strlen(str));
|
||||
wsprintf(str, "GetGuiResources: GR_USEROBJECTS == %04x", GetGuiResources(GetCurrentProcess(), GR_USEROBJECTS));
|
||||
TextOut(hDC, 10, 220, str, strlen(str));
|
||||
EndPaint(hWnd, &ps);
|
||||
break;
|
||||
|
||||
case WM_TIMER:
|
||||
GetGUIThreadInfo(0, >i);
|
||||
InvalidateRect(hWnd, NULL, TRUE);
|
||||
break;
|
||||
|
||||
case WM_DESTROY:
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
|
||||
default:
|
||||
return DefWindowProc(hWnd, msg, wParam, lParam);
|
||||
}
|
||||
return 0;
|
||||
}
|
@@ -1,23 +0,0 @@
|
||||
# $Id: makefile,v 1.1 2003/11/18 23:33:31 weiden Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_NORC = yes
|
||||
|
||||
TARGET_TYPE = program
|
||||
|
||||
TARGET_APPTYPE = windows
|
||||
|
||||
TARGET_NAME = guithreadinfo
|
||||
|
||||
TARGET_SDKLIBS = kernel32.a gdi32.a user32.a
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
||||
# EOF
|
@@ -1,4 +1,4 @@
|
||||
# $Id: makefile,v 1.17 2003/11/14 17:13:17 weiden Exp $
|
||||
# $Id: makefile,v 1.16 2002/06/02 19:24:59 chorns Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
@@ -12,8 +12,6 @@ TARGET_NAME = hello
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
@@ -3,7 +3,6 @@
|
||||
#include <stdio.h>
|
||||
#include <windows.h>
|
||||
#include <ddk/ntddk.h>
|
||||
#include <rosrtl/string.h>
|
||||
|
||||
HANDLE OutputHandle;
|
||||
HANDLE InputHandle;
|
||||
@@ -59,7 +58,7 @@ void CreateKeyTest(void)
|
||||
NTSTATUS Status;
|
||||
|
||||
dprintf("Create key '\\Registry\\Machine\\Software\\testkey':\n");
|
||||
RtlRosInitUnicodeStringFromLiteral(&KeyName,
|
||||
RtlInitUnicodeStringFromLiteral(&KeyName,
|
||||
L"\\Registry\\Machine\\Software\\testkey");
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&KeyName,
|
||||
@@ -90,7 +89,7 @@ void DeleteKeyTest(void)
|
||||
NTSTATUS Status;
|
||||
|
||||
dprintf("Delete key '\\Registry\\Machine\\Software\\testkey':\n");
|
||||
RtlRosInitUnicodeStringFromLiteral(&KeyName,
|
||||
RtlInitUnicodeStringFromLiteral(&KeyName,
|
||||
L"\\Registry\\Machine\\Software\\testkey");
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&KeyName,
|
||||
@@ -114,7 +113,7 @@ void DeleteKeyTest(void)
|
||||
|
||||
void EnumerateKeyTest(void)
|
||||
{
|
||||
HKEY hKey = NULL;
|
||||
HKEY hKey = NULL, hKey1;
|
||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||
NTSTATUS Status;
|
||||
UNICODE_STRING KeyName;
|
||||
@@ -124,7 +123,7 @@ void EnumerateKeyTest(void)
|
||||
KEY_BASIC_INFORMATION KeyInformation[5];
|
||||
|
||||
dprintf("Enumerate key '\\Registry\\Machine\\Software':\n");
|
||||
RtlRosInitUnicodeStringFromLiteral(&KeyName,
|
||||
RtlInitUnicodeStringFromLiteral(&KeyName,
|
||||
L"\\Registry\\Machine\\Software");
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&KeyName,
|
||||
@@ -189,7 +188,7 @@ void SetValueTest1(void)
|
||||
NTSTATUS Status;
|
||||
|
||||
dprintf("Create key '\\Registry\\Machine\\Software\\testkey':\n");
|
||||
RtlRosInitUnicodeStringFromLiteral(&KeyName,
|
||||
RtlInitUnicodeStringFromLiteral(&KeyName,
|
||||
L"\\Registry\\Machine\\Software\\testkey");
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&KeyName,
|
||||
@@ -208,7 +207,7 @@ void SetValueTest1(void)
|
||||
if (!NT_SUCCESS(Status))
|
||||
return;
|
||||
|
||||
RtlRosInitUnicodeStringFromLiteral(&ValueName,
|
||||
RtlInitUnicodeStringFromLiteral(&ValueName,
|
||||
L"TestValue");
|
||||
dprintf("NtSetValueKey:\n");
|
||||
Status = NtSetValueKey(hKey,
|
||||
@@ -232,7 +231,7 @@ void SetValueTest2(void)
|
||||
NTSTATUS Status;
|
||||
|
||||
dprintf("Create key '\\Registry\\Machine\\Software\\testkey':\n");
|
||||
RtlRosInitUnicodeStringFromLiteral(&KeyName,
|
||||
RtlInitUnicodeStringFromLiteral(&KeyName,
|
||||
L"\\Registry\\Machine\\Software\\testkey");
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&KeyName,
|
||||
@@ -251,7 +250,7 @@ void SetValueTest2(void)
|
||||
if (!NT_SUCCESS(Status))
|
||||
return;
|
||||
|
||||
RtlRosInitUnicodeStringFromLiteral(&ValueName,
|
||||
RtlInitUnicodeStringFromLiteral(&ValueName,
|
||||
L"TestValue");
|
||||
dprintf("NtSetValueKey:\n");
|
||||
Status = NtSetValueKey(hKey,
|
||||
@@ -275,7 +274,7 @@ void DeleteValueTest(void)
|
||||
NTSTATUS Status;
|
||||
|
||||
dprintf("Open key '\\Registry\\Machine\\Software\\testkey':\n");
|
||||
RtlRosInitUnicodeStringFromLiteral(&KeyName,
|
||||
RtlInitUnicodeStringFromLiteral(&KeyName,
|
||||
L"\\Registry\\Machine\\Software\\testkey");
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&KeyName,
|
||||
@@ -290,7 +289,7 @@ void DeleteValueTest(void)
|
||||
return;
|
||||
|
||||
dprintf("Delete value:\n");
|
||||
RtlRosInitUnicodeStringFromLiteral(&ValueName,
|
||||
RtlInitUnicodeStringFromLiteral(&ValueName,
|
||||
L"TestValue");
|
||||
Status = NtDeleteValueKey(KeyHandle,
|
||||
&ValueName);
|
||||
@@ -305,6 +304,7 @@ void DeleteValueTest(void)
|
||||
void EnumerateValueTest(void)
|
||||
{
|
||||
KEY_VALUE_FULL_INFORMATION KeyValueInformation[5];
|
||||
KEY_BASIC_INFORMATION KeyInformation[5];
|
||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||
UNICODE_STRING KeyName;
|
||||
ULONG Index,Length,i;
|
||||
@@ -312,7 +312,7 @@ void EnumerateValueTest(void)
|
||||
NTSTATUS Status;
|
||||
|
||||
dprintf("Open key '\\Registry\\Machine\\Software\\testkey':\n");
|
||||
RtlRosInitUnicodeStringFromLiteral(&KeyName,
|
||||
RtlInitUnicodeStringFromLiteral(&KeyName,
|
||||
L"\\Registry\\Machine\\Software\\testkey");
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&KeyName,
|
||||
@@ -370,11 +370,12 @@ void test1(void)
|
||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||
NTSTATUS Status;
|
||||
#if 0
|
||||
UNICODE_STRING KeyName = ROS_STRING_INITIALIZER(L"\\Registry");
|
||||
UNICODE_STRING KeyName = UNICODE_STRING_INITIALIZER(L"\\Registry");
|
||||
#endif
|
||||
UNICODE_STRING KeyName = ROS_STRING_INITIALIZER(L"\\Registry\\Machine\\Software");
|
||||
UNICODE_STRING KeyName = UNICODE_STRING_INITIALIZER(L"\\Registry\\Machine\\Software");
|
||||
ULONG Index,Length,i;
|
||||
KEY_BASIC_INFORMATION KeyInformation[5];
|
||||
KEY_VALUE_FULL_INFORMATION KeyValueInformation[5];
|
||||
|
||||
#if 0
|
||||
dprintf("NtOpenKey \\Registry : ");
|
||||
@@ -424,7 +425,7 @@ void test1(void)
|
||||
|
||||
#if 0
|
||||
dprintf("NtOpenKey \\Registry\\Machine : ");
|
||||
RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine");
|
||||
RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine");
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&KeyName,
|
||||
OBJ_CASE_INSENSITIVE,
|
||||
@@ -434,7 +435,7 @@ void test1(void)
|
||||
dprintf("\t\t\tStatus =%x\n",Status);
|
||||
|
||||
dprintf("NtOpenKey System\\Setup : ");
|
||||
RtlRosInitUnicodeStringFromLiteral(&KeyName, L"System\\Setup");
|
||||
RtlInitUnicodeStringFromLiteral(&KeyName, L"System\\Setup");
|
||||
InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE
|
||||
, hKey1 , NULL);
|
||||
Status = NtOpenKey ( &hKey, KEY_READ , &ObjectAttributes);
|
||||
@@ -442,7 +443,7 @@ void test1(void)
|
||||
if(Status==0)
|
||||
{
|
||||
dprintf("NtQueryValueKey : ");
|
||||
RtlRosInitUnicodeStringFromLiteral(&KeyName, L"CmdLine");
|
||||
RtlInitUnicodeStringFromLiteral(&KeyName, L"CmdLine");
|
||||
Status=NtQueryValueKey(hKey,&KeyName,KeyValueFullInformation
|
||||
,&KeyValueInformation[0], sizeof(KeyValueInformation)
|
||||
,&Length);
|
||||
@@ -493,15 +494,17 @@ void test1(void)
|
||||
|
||||
void test3(void)
|
||||
{
|
||||
HKEY hKey;
|
||||
HKEY hKey,hKey1;
|
||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||
UNICODE_STRING KeyName;
|
||||
UNICODE_STRING KeyName,ValueName;
|
||||
NTSTATUS Status;
|
||||
KEY_VALUE_FULL_INFORMATION KeyValueInformation[5];
|
||||
ULONG Index,Length,i;
|
||||
char Buffer[10];
|
||||
DWORD Result;
|
||||
dprintf("NtCreateKey non volatile: \n");
|
||||
dprintf(" \\Registry\\Machine\\Software\\test3reactos: ");
|
||||
RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos");
|
||||
RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos");
|
||||
InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE
|
||||
, NULL, NULL);
|
||||
Status = NtCreateKey ( &hKey, KEY_ALL_ACCESS , &ObjectAttributes
|
||||
@@ -515,7 +518,7 @@ void test3(void)
|
||||
dprintf("\t\tStatus=%x\n",Status);
|
||||
NtClose(hKey);
|
||||
dprintf(" ...\\test3 :");
|
||||
RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos\\test3");
|
||||
RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos\\test3");
|
||||
InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE
|
||||
, NULL, NULL);
|
||||
Status = NtCreateKey ( &hKey, KEY_ALL_ACCESS , &ObjectAttributes
|
||||
@@ -526,24 +529,24 @@ void test3(void)
|
||||
dprintf("\t\tStatus=%x\n",Status);
|
||||
NtClose(hKey);
|
||||
dprintf(" ...\\testNonVolatile :");
|
||||
RtlRosInitUnicodeStringFromLiteral(&KeyName, L"TestNonVolatile");
|
||||
RtlInitUnicodeStringFromLiteral(&KeyName, L"TestNonVolatile");
|
||||
InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE
|
||||
, hKey1, NULL);
|
||||
Status = NtCreateKey ( &hKey, KEY_ALL_ACCESS , &ObjectAttributes
|
||||
,0,NULL,REG_OPTION_NON_VOLATILE,NULL);
|
||||
dprintf("\t\t\t\tStatus=%x\n",Status);
|
||||
NtClose(hKey1);
|
||||
RtlRosInitUnicodeStringFromLiteral(&ValueName, L"TestREG_SZ");
|
||||
RtlInitUnicodeStringFromLiteral(&ValueName, L"TestREG_SZ");
|
||||
dprintf("NtSetValueKey reg_sz: ");
|
||||
Status=NtSetValueKey(hKey,&ValueName,0,REG_SZ,(PVOID)L"Test Reg_sz",24);
|
||||
dprintf("\t\t\t\tStatus=%x\n",Status);
|
||||
RtlRosInitUnicodeStringFromLiteral(&ValueName, L"TestDWORD");
|
||||
RtlInitUnicodeStringFromLiteral(&ValueName, L"TestDWORD");
|
||||
dprintf("NtSetValueKey reg_dword: ");
|
||||
Status=NtSetValueKey(hKey,&ValueName,0,REG_DWORD,(PVOID)"reac",4);
|
||||
dprintf("\t\t\tStatus=%x\n",Status);
|
||||
NtClose(hKey);
|
||||
dprintf("NtOpenKey \\Registry\\Machine\\Software\\test3reactos\\test3\\testNonVolatile : ");
|
||||
RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos\\test3\\testNonVolatile");
|
||||
RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos\\test3\\testNonVolatile");
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&KeyName,
|
||||
OBJ_CASE_INSENSITIVE,
|
||||
@@ -582,7 +585,7 @@ void test3(void)
|
||||
ReadConsoleA(InputHandle, Buffer, 3, &Result, NULL) ;
|
||||
if (Buffer[0] != 'y' && Buffer[0] != 'Y') return;
|
||||
#if 0
|
||||
RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos\\test3\\testNonvolatile");
|
||||
RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos\\test3\\testNonvolatile");
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&KeyName,
|
||||
OBJ_CASE_INSENSITIVE,
|
||||
@@ -594,7 +597,7 @@ void test3(void)
|
||||
dprintf("NtDeleteKey : ");
|
||||
Status=NtDeleteKey(hKey);
|
||||
dprintf("\t\t\t\tStatus =%x\n",Status);
|
||||
RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos\\test3");
|
||||
RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos\\test3");
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&KeyName,
|
||||
OBJ_CASE_INSENSITIVE,
|
||||
@@ -609,7 +612,7 @@ void test3(void)
|
||||
NtClose(hKey);
|
||||
#endif
|
||||
dprintf("delete \\Registry\\Machine\\software\\test3reactos ?");
|
||||
RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos");
|
||||
RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\Software\\test3reactos");
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&KeyName,
|
||||
OBJ_CASE_INSENSITIVE,
|
||||
@@ -788,14 +791,18 @@ void test4(void)
|
||||
|
||||
void test5(void)
|
||||
{
|
||||
HKEY hKey;
|
||||
HKEY hKey,hKey1;
|
||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||
UNICODE_STRING KeyName;
|
||||
UNICODE_STRING KeyName,ValueName;
|
||||
NTSTATUS Status;
|
||||
KEY_VALUE_FULL_INFORMATION KeyValueInformation[5];
|
||||
ULONG Index,Length,i;
|
||||
char Buffer[10];
|
||||
DWORD Result;
|
||||
|
||||
dprintf("NtOpenKey : \n");
|
||||
dprintf(" \\Registry\\Machine\\Software\\reactos : ");
|
||||
RtlRosInitUnicodeStringFromLiteral(&KeyName,L"\\Registry\\Machine\\Software\\reactos");
|
||||
RtlInitUnicodeStringFromLiteral(&KeyName,L"\\Registry\\Machine\\Software\\reactos");
|
||||
InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE
|
||||
, NULL, NULL);
|
||||
Status=NtOpenKey( &hKey, KEY_ALL_ACCESS, &ObjectAttributes);
|
||||
@@ -816,11 +823,13 @@ void test6(void)
|
||||
UNICODE_STRING KeyName,ValueName;
|
||||
NTSTATUS Status;
|
||||
KEY_VALUE_FULL_INFORMATION KeyValueInformation[5];
|
||||
ULONG Length,i;
|
||||
ULONG Index,Length,i;
|
||||
char Buffer[10];
|
||||
DWORD Result;
|
||||
|
||||
dprintf("Create target key\n");
|
||||
dprintf(" Key: \\Registry\\Machine\\SOFTWARE\\Reactos\n");
|
||||
RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\SOFTWARE\\Reactos");
|
||||
RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\SOFTWARE\\Reactos");
|
||||
InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE
|
||||
, NULL, NULL);
|
||||
Status = NtCreateKey(&hKey, KEY_ALL_ACCESS , &ObjectAttributes
|
||||
@@ -831,7 +840,7 @@ void test6(void)
|
||||
|
||||
dprintf("Create target value\n");
|
||||
dprintf(" Value: TestValue = 'Test String'\n");
|
||||
RtlRosInitUnicodeStringFromLiteral(&ValueName, L"TestValue");
|
||||
RtlInitUnicodeStringFromLiteral(&ValueName, L"TestValue");
|
||||
Status=NtSetValueKey(hKey,&ValueName,0,REG_SZ,(PVOID)L"TestString",22);
|
||||
dprintf(" NtSetValueKey() called (Status %lx)\n",Status);
|
||||
if (!NT_SUCCESS(Status))
|
||||
@@ -843,7 +852,7 @@ void test6(void)
|
||||
|
||||
dprintf("Create link key\n");
|
||||
dprintf(" Key: \\Registry\\Machine\\SOFTWARE\\Test\n");
|
||||
RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\SOFTWARE\\Test");
|
||||
RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\SOFTWARE\\Test");
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&KeyName,
|
||||
OBJ_CASE_INSENSITIVE | OBJ_OPENLINK,
|
||||
@@ -862,7 +871,7 @@ void test6(void)
|
||||
|
||||
dprintf("Create link value\n");
|
||||
dprintf(" Value: SymbolicLinkValue = '\\Registry\\Machine\\SOFTWARE\\Reactos'\n");
|
||||
RtlRosInitUnicodeStringFromLiteral(&ValueName, L"SymbolicLinkValue");
|
||||
RtlInitUnicodeStringFromLiteral(&ValueName, L"SymbolicLinkValue");
|
||||
Status=NtSetValueKey(hKey,&ValueName,0,REG_LINK,(PVOID)L"\\Registry\\Machine\\SOFTWARE\\Reactos",68);
|
||||
dprintf(" NtSetValueKey() called (Status %lx)\n",Status);
|
||||
if (!NT_SUCCESS(Status))
|
||||
@@ -877,7 +886,7 @@ void test6(void)
|
||||
|
||||
dprintf("Open link key\n");
|
||||
dprintf(" Key: \\Registry\\Machine\\SOFTWARE\\Test\n");
|
||||
RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\SOFTWARE\\Test");
|
||||
RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\SOFTWARE\\Test");
|
||||
InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE | OBJ_OPENIF
|
||||
, NULL, NULL);
|
||||
Status = NtCreateKey(&hKey, KEY_ALL_ACCESS , &ObjectAttributes
|
||||
@@ -888,7 +897,7 @@ void test6(void)
|
||||
|
||||
dprintf("Query value\n");
|
||||
dprintf(" Value: TestValue\n");
|
||||
RtlRosInitUnicodeStringFromLiteral(&ValueName, L"TestValue");
|
||||
RtlInitUnicodeStringFromLiteral(&ValueName, L"TestValue");
|
||||
Status=NtQueryValueKey(hKey,
|
||||
&ValueName,
|
||||
KeyValueFullInformation,
|
||||
@@ -927,7 +936,7 @@ void test7(void)
|
||||
|
||||
dprintf("Open link key\n");
|
||||
dprintf(" Key: \\Registry\\Machine\\SOFTWARE\\Test\n");
|
||||
RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\SOFTWARE\\Test");
|
||||
RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine\\SOFTWARE\\Test");
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&KeyName,
|
||||
OBJ_CASE_INSENSITIVE | OBJ_OPENIF | OBJ_OPENLINK,
|
||||
@@ -948,7 +957,7 @@ void test7(void)
|
||||
}
|
||||
|
||||
dprintf("Delete link value\n");
|
||||
RtlRosInitUnicodeStringFromLiteral(&ValueName, L"SymbolicLinkValue");
|
||||
RtlInitUnicodeStringFromLiteral(&ValueName, L"SymbolicLinkValue");
|
||||
Status = NtDeleteValueKey(hKey,
|
||||
&ValueName);
|
||||
dprintf(" NtDeleteValueKey() called (Status %lx)\n",Status);
|
||||
@@ -999,7 +1008,7 @@ void test8(void)
|
||||
// dprintf("\t\t\t\tStatus =%x\n",Status);
|
||||
|
||||
|
||||
RtlRosInitUnicodeStringFromLiteral(&KeyName,L"test5");
|
||||
RtlInitUnicodeStringFromLiteral(&KeyName,L"test5");
|
||||
InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE
|
||||
, NULL, NULL);
|
||||
Status = NtLoadKey(HKEY_LOCAL_MACHINE,&ObjectAttributes);
|
||||
@@ -1009,7 +1018,7 @@ void test8(void)
|
||||
dprintf("\t\t\t\tdwError =%x\n",dwError);
|
||||
|
||||
dprintf("NtOpenKey \\Registry\\Machine : ");
|
||||
RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine");
|
||||
RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine");
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&KeyName,
|
||||
OBJ_CASE_INSENSITIVE,
|
||||
@@ -1017,7 +1026,7 @@ void test8(void)
|
||||
NULL);
|
||||
Status=NtOpenKey( &hKey, MAXIMUM_ALLOWED, &ObjectAttributes);
|
||||
dprintf("\t\t\tStatus =%x\n",Status);
|
||||
RtlRosInitUnicodeStringFromLiteral(&KeyName,L"test5");
|
||||
RtlInitUnicodeStringFromLiteral(&KeyName,L"test5");
|
||||
InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE
|
||||
, NULL, NULL);
|
||||
Status = NtLoadKey(hKey,&ObjectAttributes);
|
||||
@@ -1029,7 +1038,7 @@ void test9(void)
|
||||
HKEY hKey = NULL, hKey1;
|
||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||
NTSTATUS Status;
|
||||
UNICODE_STRING KeyName = ROS_STRING_INITIALIZER(L"\\Registry");
|
||||
UNICODE_STRING KeyName = UNICODE_STRING_INITIALIZER(L"\\Registry");
|
||||
ULONG Index,Length,i;
|
||||
KEY_BASIC_INFORMATION KeyInformation[5];
|
||||
KEY_VALUE_FULL_INFORMATION KeyValueInformation[5];
|
||||
@@ -1071,7 +1080,7 @@ void test9(void)
|
||||
NtClose(hKey); // RobD - hKey unused so-far, should this have been hKey1 ???
|
||||
|
||||
dprintf("NtOpenKey \\Registry\\Machine : ");
|
||||
RtlRosInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine");
|
||||
RtlInitUnicodeStringFromLiteral(&KeyName, L"\\Registry\\Machine");
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&KeyName,
|
||||
OBJ_CASE_INSENSITIVE,
|
||||
@@ -1083,20 +1092,20 @@ void test9(void)
|
||||
//Status of c0000001 opening \Registry\Machine\System\CurrentControlSet\Services\Tcpip\Linkage
|
||||
|
||||
// dprintf("NtOpenKey System\\CurrentControlSet\\Services\\Tcpip : ");
|
||||
// RtlRosInitUnicodeStringFromLiteral(&KeyName, L"System\\CurrentControlSet\\Services\\Tcpip");
|
||||
// RtlInitUnicodeStringFromLiteral(&KeyName, L"System\\CurrentControlSet\\Services\\Tcpip");
|
||||
#if 1
|
||||
dprintf("NtOpenKey System\\ControlSet001\\Services\\Tcpip\\Parameters : ");
|
||||
RtlRosInitUnicodeStringFromLiteral(&KeyName, L"System\\ControlSet001\\Services\\Tcpip\\Parameters");
|
||||
RtlInitUnicodeStringFromLiteral(&KeyName, L"System\\ControlSet001\\Services\\Tcpip\\Parameters");
|
||||
#else
|
||||
dprintf("NtOpenKey System\\CurrentControlSet\\Services\\Tcpip : ");
|
||||
RtlRosInitUnicodeStringFromLiteral(&KeyName, L"System\\CurrentControlSet\\Services\\Tcpip");
|
||||
RtlInitUnicodeStringFromLiteral(&KeyName, L"System\\CurrentControlSet\\Services\\Tcpip");
|
||||
#endif
|
||||
InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE, hKey1 , NULL);
|
||||
Status = NtOpenKey(&hKey, KEY_READ , &ObjectAttributes);
|
||||
dprintf("\t\t\tStatus =%x\n",Status);
|
||||
if (Status == 0) {
|
||||
dprintf("NtQueryValueKey : ");
|
||||
RtlRosInitUnicodeStringFromLiteral(&KeyName, L"NameServer");
|
||||
RtlInitUnicodeStringFromLiteral(&KeyName, L"NameServer");
|
||||
Status = NtQueryValueKey(hKey, &KeyName, KeyValueFullInformation, &KeyValueInformation[0], sizeof(KeyValueInformation), &Length);
|
||||
dprintf("\t\t\t\tStatus =%x\n",Status);
|
||||
if (Status == STATUS_SUCCESS) {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# $Id: makefile,v 1.2 2003/11/14 17:13:17 weiden Exp $
|
||||
# $Id: makefile,v 1.1 2003/02/09 18:26:36 ekohl Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
@@ -15,8 +15,6 @@ TARGET_SDKLIBS = ntdll.a kernel32.a
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
@@ -1,26 +1,11 @@
|
||||
#include <windows.h>
|
||||
#include "resource.h"
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifndef GetCursorInfo
|
||||
#define _GetCursorInfo
|
||||
#endif
|
||||
|
||||
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:";
|
||||
const char cursor[] = "Current Cursor:";
|
||||
const char cursormask[] = "Cursor Mask Bitmap";
|
||||
const char cursorcolor[] = "Cursor Color Bitmap";
|
||||
|
||||
#ifdef _GetCursorInfo
|
||||
typedef BOOL (__stdcall *GETCURSORINFO) (CURSORINFO *CursorInfo);
|
||||
|
||||
static GETCURSORINFO GetCursorInfo = NULL;
|
||||
#endif
|
||||
|
||||
HFONT tf;
|
||||
HINSTANCE hInst;
|
||||
@@ -38,10 +23,6 @@ WinMain(HINSTANCE hInstance,
|
||||
HWND hWnd;
|
||||
|
||||
hInst = hInstance;
|
||||
|
||||
#ifdef _GetCursorInfo
|
||||
GetCursorInfo = (GETCURSORINFO)GetProcAddress(GetModuleHandleW(L"user32.dll"), "GetCursorInfo");
|
||||
#endif
|
||||
|
||||
wc.lpszClassName = "IconTestClass";
|
||||
wc.lpfnWndProc = MainWndProc;
|
||||
@@ -49,7 +30,7 @@ WinMain(HINSTANCE hInstance,
|
||||
wc.hInstance = hInstance;
|
||||
wc.hIcon = LoadIcon(NULL, (LPCTSTR)IDI_APPLICATION);
|
||||
wc.hCursor = LoadCursor(NULL, (LPCTSTR)IDC_ARROW);
|
||||
wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
|
||||
wc.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH);
|
||||
wc.lpszMenuName = NULL;
|
||||
wc.cbClsExtra = 0;
|
||||
wc.cbWndExtra = 0;
|
||||
@@ -64,8 +45,8 @@ WinMain(HINSTANCE hInstance,
|
||||
WS_OVERLAPPEDWINDOW|WS_HSCROLL|WS_VSCROLL,
|
||||
CW_USEDEFAULT,
|
||||
CW_USEDEFAULT,
|
||||
480,
|
||||
480,
|
||||
455,
|
||||
320,
|
||||
NULL,
|
||||
NULL,
|
||||
hInstance,
|
||||
@@ -81,8 +62,6 @@ WinMain(HINSTANCE hInstance,
|
||||
DEFAULT_QUALITY, FIXED_PITCH|FF_DONTCARE, "Timmons");
|
||||
|
||||
ShowWindow(hWnd, nCmdShow);
|
||||
|
||||
SetTimer(hWnd, 1, 1000, NULL);
|
||||
|
||||
while(GetMessage(&msg, NULL, 0, 0))
|
||||
{
|
||||
@@ -100,11 +79,9 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
HICON hIcon;
|
||||
HGDIOBJ hOld;
|
||||
HDC hMemDC;
|
||||
CURSORINFO cursorinfo;
|
||||
ICONINFO iconinfo;
|
||||
BITMAP bmp;
|
||||
RECT rc;
|
||||
CHAR str[20];
|
||||
HBITMAP hMaskBitmap;
|
||||
HBITMAP hColorBitmap;
|
||||
|
||||
switch(msg)
|
||||
{
|
||||
@@ -118,7 +95,7 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
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);
|
||||
hIcon = LoadImage(NULL, "icon.ICO", IMAGE_ICON, 0, 0, LR_DEFAULTSIZE|LR_LOADFROMFILE);
|
||||
DrawIcon(hDC,50,50,hIcon);
|
||||
|
||||
hMemDC = CreateCompatibleDC(hDC);
|
||||
@@ -132,6 +109,8 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
DeleteObject(iconinfo.hbmMask);
|
||||
DeleteObject(iconinfo.hbmColor);
|
||||
|
||||
SelectObject(hMemDC, hOld);
|
||||
|
||||
TextOut(hDC, 145, 150, res, strlen(res));
|
||||
TextOut(hDC, 15, 225, titleDrwIco, strlen(titleDrwIco));
|
||||
@@ -144,66 +123,16 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
GetIconInfo(hIcon, &iconinfo);
|
||||
DestroyIcon(hIcon);
|
||||
|
||||
SelectObject(hMemDC, iconinfo.hbmMask);
|
||||
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);
|
||||
|
||||
cursorinfo.cbSize = sizeof(CURSORINFO);
|
||||
if(GetCursorInfo(&cursorinfo))
|
||||
{
|
||||
if(cursorinfo.hCursor && cursorinfo.flags)
|
||||
{
|
||||
TextOut(hDC, 160, 290, cursor, strlen(cursor));
|
||||
DrawIcon(hDC, 50, 330, cursorinfo.hCursor);
|
||||
GetIconInfo(cursorinfo.hCursor, &iconinfo);
|
||||
TextOut(hDC, 15, 365, titleDrwIco, strlen(titleDrwIco));
|
||||
|
||||
sprintf(str, "Hotspot: %ld; %ld", iconinfo.xHotspot, iconinfo.yHotspot);
|
||||
TextOut(hDC, 15, 380, str, strlen(str));
|
||||
|
||||
if(iconinfo.hbmMask)
|
||||
{
|
||||
GetObjectW(iconinfo.hbmMask, sizeof(BITMAP), &bmp);
|
||||
SelectObject(hMemDC, iconinfo.hbmMask);
|
||||
BitBlt(hDC, 200, 330, bmp.bmWidth, bmp.bmHeight, hMemDC, 0, 0, SRCCOPY);
|
||||
DeleteObject(iconinfo.hbmMask);
|
||||
TextOut(hDC, 160, 365 - 32 + bmp.bmHeight, cursormask, strlen(cursormask));
|
||||
|
||||
sprintf(str, "%dBPP", bmp.bmBitsPixel);
|
||||
TextOut(hDC, 160, 380 - 32 + bmp.bmHeight, str, strlen(str));
|
||||
}
|
||||
|
||||
if(iconinfo.hbmColor)
|
||||
{
|
||||
GetObjectW(iconinfo.hbmColor, sizeof(BITMAP), &bmp);
|
||||
SelectObject(hMemDC, iconinfo.hbmColor);
|
||||
BitBlt(hDC, 350, 330, bmp.bmWidth, bmp.bmHeight, hMemDC, 0, 0, SRCCOPY);
|
||||
DeleteObject(iconinfo.hbmColor);
|
||||
TextOut(hDC, 300, 365 - 32 + bmp.bmHeight, cursorcolor, strlen(cursorcolor));
|
||||
|
||||
sprintf(str, "%dBPP", bmp.bmBitsPixel);
|
||||
TextOut(hDC, 300, 380 - 32 + bmp.bmHeight, str, strlen(str));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SelectObject(hMemDC, hOld);
|
||||
|
||||
DeleteObject(hMemDC);
|
||||
EndPaint(hWnd, &ps);
|
||||
break;
|
||||
|
||||
case WM_TIMER:
|
||||
rc.left = 0;
|
||||
rc.top = 330;
|
||||
rc.right = 480;
|
||||
rc.bottom = 480;
|
||||
InvalidateRect(hWnd, &rc, TRUE);
|
||||
break;
|
||||
|
||||
case WM_DESTROY:
|
||||
PostQuitMessage(0);
|
||||
|
@@ -12,8 +12,6 @@ TARGET_SDKLIBS = ntdll.a kernel32.a gdi32.a
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
@@ -6,8 +6,6 @@
|
||||
//#include <winioctl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
|
||||
|
||||
void HexDump(char *buffer, ULONG size)
|
||||
@@ -140,6 +138,7 @@ int main (int argc, char *argv[])
|
||||
{
|
||||
HANDLE hDisk;
|
||||
DWORD dwRead;
|
||||
DWORD i;
|
||||
char *Buffer;
|
||||
CHAR Filename[80];
|
||||
LARGE_INTEGER FilePosition;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# $Id: makefile,v 1.3 2003/11/14 17:13:17 weiden Exp $
|
||||
# $Id: makefile,v 1.2 2002/06/02 19:24:59 chorns Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
@@ -16,8 +16,6 @@ TARGET_SDKLIBS = ntdll.a kernel32.a
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
@@ -1,46 +0,0 @@
|
||||
# $Id: Makefile,v 1.2 2004/05/04 17:25:18 navaraf Exp $
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_NORC = yes
|
||||
|
||||
TARGET_TYPE = program
|
||||
|
||||
TARGET_APPTYPE = console
|
||||
|
||||
# require os code to explicitly request A/W version of structs/functions
|
||||
TARGET_CFLAGS += -D_DISABLE_TIDENTS -D__USE_W32API -DWINVER=0x0500
|
||||
|
||||
TARGET_NAME = kernel32_test
|
||||
|
||||
TARGET_SDKLIBS = kernel32.a
|
||||
|
||||
TARGET_OBJECTS = \
|
||||
testlist.o \
|
||||
atom.o \
|
||||
change.o \
|
||||
codepage.o \
|
||||
comm.o \
|
||||
console.o \
|
||||
directory.o \
|
||||
drive.o \
|
||||
environ.o \
|
||||
file.o \
|
||||
format_msg.o \
|
||||
heap.o \
|
||||
locale.o \
|
||||
mailslot.o \
|
||||
path.o \
|
||||
pipe.o \
|
||||
process.o \
|
||||
profile.o \
|
||||
thread.o \
|
||||
virtual.o
|
||||
|
||||
#FIXME alloc.o \
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
||||
# EOF
|
@@ -1,33 +0,0 @@
|
||||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ../../..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
TESTDLL = kernel32.dll
|
||||
IMPORTS = kernel32
|
||||
|
||||
CTESTS = \
|
||||
alloc.c \
|
||||
atom.c \
|
||||
change.c \
|
||||
codepage.c \
|
||||
comm.c \
|
||||
console.c \
|
||||
directory.c \
|
||||
drive.c \
|
||||
environ.c \
|
||||
file.c \
|
||||
format_msg.c \
|
||||
generated.c \
|
||||
heap.c \
|
||||
locale.c \
|
||||
mailslot.c \
|
||||
path.c \
|
||||
pipe.c \
|
||||
process.c \
|
||||
profile.c \
|
||||
thread.c \
|
||||
virtual.c
|
||||
|
||||
@MAKE_TEST_RULES@
|
||||
|
||||
### Dependencies:
|
@@ -1,408 +0,0 @@
|
||||
/*
|
||||
* Unit test suite for memory allocation functions.
|
||||
*
|
||||
* Copyright 2002 Geoffrey Hausheer
|
||||
*
|
||||
* 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 <stdarg.h>
|
||||
|
||||
#include "wine/test.h"
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
|
||||
|
||||
/* The following functions don't have tests, because either I don't know how
|
||||
to test them, or they are WinNT only, or require multiple threads.
|
||||
Since the last two issues shouldn't really stop the tests from being
|
||||
written, assume for now that it is all due to the first case
|
||||
HeapCompact
|
||||
HeapLock
|
||||
HeapQueryInformation
|
||||
HeapSetInformation
|
||||
HeapUnlock
|
||||
HeapValidate
|
||||
HeapWalk
|
||||
*/
|
||||
/* In addition, these features aren't being tested
|
||||
HEAP_NO_SERIALIZE
|
||||
HEAP_GENERATE_EXCEPTIONS
|
||||
STATUS_ACCESS_VIOLATION (error code from HeapAlloc)
|
||||
*/
|
||||
|
||||
static void test_Heap(void)
|
||||
{
|
||||
SYSTEM_INFO sysInfo;
|
||||
ULONG memchunk;
|
||||
HANDLE heap;
|
||||
LPVOID mem1,mem1a,mem3;
|
||||
UCHAR *mem2,*mem2a;
|
||||
UINT error,i;
|
||||
DWORD dwSize;
|
||||
|
||||
/* Retrieve the page size for this system */
|
||||
sysInfo.dwPageSize=0;
|
||||
GetSystemInfo(&sysInfo);
|
||||
ok(sysInfo.dwPageSize>0,"GetSystemInfo should return a valid page size\n");
|
||||
|
||||
/* Create a Heap with a minimum and maximum size */
|
||||
/* Note that Windows and Wine seem to behave a bit differently with respect
|
||||
to memory allocation. In Windows, you can't access all the memory
|
||||
specified in the heap (due to overhead), so choosing a reasonable maximum
|
||||
size for the heap was done mostly by trial-and-error on Win2k. It may need
|
||||
more tweaking for otherWindows variants.
|
||||
*/
|
||||
memchunk=10*sysInfo.dwPageSize;
|
||||
heap=HeapCreate(0,2*memchunk,5*memchunk);
|
||||
|
||||
/* Check that HeapCreate allocated the right amount of ram */
|
||||
todo_wine {
|
||||
/* Today HeapCreate seems to return a memory block larger than specified.
|
||||
MSDN says the maximum heap size should be dwMaximumSize rounded up to the
|
||||
nearest page boundary
|
||||
*/
|
||||
mem1=HeapAlloc(heap,0,5*memchunk+1);
|
||||
ok(mem1==NULL,"HeapCreate allocated more Ram than it should have\n");
|
||||
if(mem1) {
|
||||
HeapFree(heap,0,mem1);
|
||||
}
|
||||
}
|
||||
|
||||
/* Check that a normal alloc works */
|
||||
mem1=HeapAlloc(heap,0,memchunk);
|
||||
ok(mem1!=NULL,"HeapAlloc failed\n");
|
||||
if(mem1) {
|
||||
ok(HeapSize(heap,0,mem1)>=memchunk, "HeapAlloc should return a big enough memory block\n");
|
||||
}
|
||||
|
||||
/* Check that a 'zeroing' alloc works */
|
||||
mem2=HeapAlloc(heap,HEAP_ZERO_MEMORY,memchunk);
|
||||
ok(mem2!=NULL,"HeapAlloc failed\n");
|
||||
if(mem2) {
|
||||
ok(HeapSize(heap,0,mem2)>=memchunk,"HeapAlloc should return a big enough memory block\n");
|
||||
error=0;
|
||||
for(i=0;i<memchunk;i++) {
|
||||
if(mem2[i]!=0) {
|
||||
error=1;
|
||||
}
|
||||
}
|
||||
ok(!error,"HeapAlloc should have zeroed out it's allocated memory\n");
|
||||
}
|
||||
|
||||
/* Check that HeapAlloc returns NULL when requested way too much memory */
|
||||
mem3=HeapAlloc(heap,0,5*memchunk);
|
||||
ok(mem3==NULL,"HeapAlloc should return NULL\n");
|
||||
if(mem3) {
|
||||
ok(HeapFree(heap,0,mem3),"HeapFree didn't pass successfully\n");
|
||||
}
|
||||
|
||||
/* Check that HeapRealloc works */
|
||||
mem2a=HeapReAlloc(heap,HEAP_ZERO_MEMORY,mem2,memchunk+5*sysInfo.dwPageSize);
|
||||
ok(mem2a!=NULL,"HeapReAlloc failed\n");
|
||||
if(mem2a) {
|
||||
ok(HeapSize(heap,0,mem2a)>=memchunk+5*sysInfo.dwPageSize,"HeapReAlloc failed\n");
|
||||
error=0;
|
||||
for(i=0;i<5*sysInfo.dwPageSize;i++) {
|
||||
if(mem2a[memchunk+i]!=0) {
|
||||
error=1;
|
||||
}
|
||||
}
|
||||
ok(!error,"HeapReAlloc should have zeroed out it's allocated memory\n");
|
||||
}
|
||||
|
||||
/* Check that HeapRealloc honours HEAP_REALLOC_IN_PLACE_ONLY */
|
||||
error=0;
|
||||
mem1a=HeapReAlloc(heap,HEAP_REALLOC_IN_PLACE_ONLY,mem1,memchunk+sysInfo.dwPageSize);
|
||||
if(mem1a!=NULL) {
|
||||
if(mem1a!=mem1) {
|
||||
error=1;
|
||||
}
|
||||
}
|
||||
ok(mem1a==NULL || error==0,"HeapReAlloc didn't honour HEAP_REALLOC_IN_PLACE_ONLY\n");
|
||||
|
||||
/* Check that HeapFree works correctly */
|
||||
if(mem1a) {
|
||||
ok(HeapFree(heap,0,mem1a),"HeapFree failed\n");
|
||||
} else {
|
||||
ok(HeapFree(heap,0,mem1),"HeapFree failed\n");
|
||||
}
|
||||
if(mem2a) {
|
||||
ok(HeapFree(heap,0,mem2a),"HeapFree failed\n");
|
||||
} else {
|
||||
ok(HeapFree(heap,0,mem2),"HeapFree failed\n");
|
||||
}
|
||||
|
||||
/* 0-length buffer */
|
||||
mem1 = HeapAlloc(heap, 0, 0);
|
||||
ok(mem1 != NULL, "Reserved memory\n");
|
||||
|
||||
dwSize = HeapSize(heap, 0, mem1);
|
||||
/* should work with 0-length buffer */
|
||||
ok((dwSize >= 0) && (dwSize < 0xFFFFFFFF),
|
||||
"The size of the 0-length buffer\n");
|
||||
ok(HeapFree(heap, 0, mem1), "Freed the 0-length buffer\n");
|
||||
|
||||
/* Check that HeapDestry works */
|
||||
ok(HeapDestroy(heap),"HeapDestroy failed\n");
|
||||
}
|
||||
|
||||
/* The following functions don't have tests, because either I don't know how
|
||||
to test them, or they are WinNT only, or require multiple threads.
|
||||
Since the last two issues shouldn't really stop the tests from being
|
||||
written, assume for now that it is all due to the first case
|
||||
GlobalFlags
|
||||
GlobalMemoryStatus
|
||||
GlobalMemoryStatusEx
|
||||
*/
|
||||
/* In addition, these features aren't being tested
|
||||
GMEM_DISCADABLE
|
||||
GMEM_NOCOMPACT
|
||||
*/
|
||||
static void test_Global(void)
|
||||
{
|
||||
ULONG memchunk;
|
||||
HGLOBAL mem1,mem2,mem2a,mem2b;
|
||||
UCHAR *mem2ptr;
|
||||
UINT error,i;
|
||||
memchunk=100000;
|
||||
|
||||
SetLastError(NO_ERROR);
|
||||
/* Check that a normal alloc works */
|
||||
mem1=GlobalAlloc(0,memchunk);
|
||||
ok(mem1!=NULL,"GlobalAlloc failed\n");
|
||||
if(mem1) {
|
||||
ok(GlobalSize(mem1)>=memchunk, "GlobalAlloc should return a big enough memory block\n");
|
||||
}
|
||||
|
||||
/* Check that a 'zeroing' alloc works */
|
||||
mem2=GlobalAlloc(GMEM_ZEROINIT,memchunk);
|
||||
ok(mem2!=NULL,"GlobalAlloc failed: error=%ld\n",GetLastError());
|
||||
if(mem2) {
|
||||
ok(GlobalSize(mem2)>=memchunk,"GlobalAlloc should return a big enough memory block\n");
|
||||
mem2ptr=GlobalLock(mem2);
|
||||
ok(mem2ptr==mem2,"GlobalLock should have returned the same memory as was allocated\n");
|
||||
if(mem2ptr) {
|
||||
error=0;
|
||||
for(i=0;i<memchunk;i++) {
|
||||
if(mem2ptr[i]!=0) {
|
||||
error=1;
|
||||
}
|
||||
}
|
||||
ok(!error,"GlobalAlloc should have zeroed out it's allocated memory\n");
|
||||
}
|
||||
}
|
||||
/* Check that GlobalReAlloc works */
|
||||
/* Check that we can change GMEM_FIXED to GMEM_MOVEABLE */
|
||||
mem2a=GlobalReAlloc(mem2,0,GMEM_MODIFY | GMEM_MOVEABLE);
|
||||
ok(mem2a!=NULL,"GlobalReAlloc failed to convert FIXED to MOVEABLE: error=%ld\n",GetLastError());
|
||||
if(mem2a!=NULL) {
|
||||
mem2=mem2a;
|
||||
}
|
||||
mem2ptr=GlobalLock(mem2a);
|
||||
ok(mem2ptr!=NULL && !GlobalUnlock(mem2a)&&GetLastError()==NO_ERROR,
|
||||
"Converting from FIXED to MOVEABLE didn't REALLY work\n");
|
||||
|
||||
/* Check that ReAllocing memory works as expected */
|
||||
mem2a=GlobalReAlloc(mem2,2*memchunk,GMEM_MOVEABLE | GMEM_ZEROINIT);
|
||||
ok(mem2a!=NULL,"GlobalReAlloc failed\n");
|
||||
if(mem2a) {
|
||||
ok(GlobalSize(mem2a)>=2*memchunk,"GlobalReAlloc failed\n");
|
||||
mem2ptr=GlobalLock(mem2a);
|
||||
ok(mem2ptr!=NULL,"GlobalLock Failed\n");
|
||||
if(mem2ptr) {
|
||||
error=0;
|
||||
for(i=0;i<memchunk;i++) {
|
||||
if(mem2ptr[memchunk+i]!=0) {
|
||||
error=1;
|
||||
}
|
||||
}
|
||||
ok(!error,"GlobalReAlloc should have zeroed out it's allocated memory\n");
|
||||
|
||||
/* Check that GlobalHandle works */
|
||||
mem2b=GlobalHandle(mem2ptr);
|
||||
ok(mem2b==mem2a,"GlobalHandle didn't return the correct memory handle\n");
|
||||
|
||||
/* Check that we can't discard locked memory */
|
||||
mem2b=GlobalDiscard(mem2a);
|
||||
ok(mem2b==NULL,"Discarded memory we shouldn't have\n");
|
||||
ok(!GlobalUnlock(mem2a) && GetLastError()==NO_ERROR,"GlobalUnlock Failed\n");
|
||||
}
|
||||
}
|
||||
if(mem1) {
|
||||
ok(GlobalFree(mem1)==NULL,"GlobalFree failed\n");
|
||||
}
|
||||
if(mem2a) {
|
||||
ok(GlobalFree(mem2a)==NULL,"GlobalFree failed\n");
|
||||
} else {
|
||||
ok(GlobalFree(mem2)==NULL,"GlobalFree failed\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* The following functions don't have tests, because either I don't know how
|
||||
to test them, or they are WinNT only, or require multiple threads.
|
||||
Since the last two issues shouldn't really stop the tests from being
|
||||
written, assume for now that it is all due to the first case
|
||||
LocalDiscard
|
||||
LocalFlags
|
||||
*/
|
||||
/* In addition, these features aren't being tested
|
||||
LMEM_DISCADABLE
|
||||
LMEM_NOCOMPACT
|
||||
*/
|
||||
static void test_Local(void)
|
||||
{
|
||||
ULONG memchunk;
|
||||
HLOCAL mem1,mem2,mem2a,mem2b;
|
||||
UCHAR *mem2ptr;
|
||||
UINT error,i;
|
||||
memchunk=100000;
|
||||
|
||||
/* Check that a normal alloc works */
|
||||
mem1=LocalAlloc(0,memchunk);
|
||||
ok(mem1!=NULL,"LocalAlloc failed: error=%ld\n",GetLastError());
|
||||
if(mem1) {
|
||||
ok(LocalSize(mem1)>=memchunk, "LocalAlloc should return a big enough memory block\n");
|
||||
}
|
||||
|
||||
/* Check that a 'zeroing' and lock alloc works */
|
||||
mem2=LocalAlloc(LMEM_ZEROINIT|LMEM_MOVEABLE,memchunk);
|
||||
ok(mem2!=NULL,"LocalAlloc failed: error=%ld\n",GetLastError());
|
||||
if(mem2) {
|
||||
ok(LocalSize(mem2)>=memchunk,"LocalAlloc should return a big enough memory block\n");
|
||||
mem2ptr=LocalLock(mem2);
|
||||
ok(mem2ptr!=NULL,"LocalLock: error=%ld\n",GetLastError());
|
||||
if(mem2ptr) {
|
||||
error=0;
|
||||
for(i=0;i<memchunk;i++) {
|
||||
if(mem2ptr[i]!=0) {
|
||||
error=1;
|
||||
}
|
||||
}
|
||||
ok(!error,"LocalAlloc should have zeroed out it's allocated memory\n");
|
||||
SetLastError(0);
|
||||
error=LocalUnlock(mem2);
|
||||
ok(error==0 && GetLastError()==NO_ERROR,
|
||||
"LocalUnlock Failed: rc=%d err=%ld\n",error,GetLastError());
|
||||
}
|
||||
}
|
||||
mem2a=LocalFree(mem2);
|
||||
ok(mem2a==NULL, "LocalFree failed: %p\n",mem2a);
|
||||
|
||||
/* Reallocate mem2 as moveable memory */
|
||||
mem2=LocalAlloc(LMEM_MOVEABLE | LMEM_ZEROINIT,memchunk);
|
||||
ok(mem2!=NULL, "LocalAlloc failed to create moveable memory, error=%ld\n",GetLastError());
|
||||
|
||||
/* Check that ReAllocing memory works as expected */
|
||||
mem2a=LocalReAlloc(mem2,2*memchunk,LMEM_MOVEABLE | LMEM_ZEROINIT);
|
||||
ok(mem2a!=NULL,"LocalReAlloc failed, error=%ld\n",GetLastError());
|
||||
if(mem2a) {
|
||||
ok(LocalSize(mem2a)>=2*memchunk,"LocalReAlloc failed\n");
|
||||
mem2ptr=LocalLock(mem2a);
|
||||
ok(mem2ptr!=NULL,"LocalLock Failed\n");
|
||||
if(mem2ptr) {
|
||||
error=0;
|
||||
for(i=0;i<memchunk;i++) {
|
||||
if(mem2ptr[memchunk+i]!=0) {
|
||||
error=1;
|
||||
}
|
||||
}
|
||||
ok(!error,"LocalReAlloc should have zeroed out it's allocated memory\n");
|
||||
/* Check that LocalHandle works */
|
||||
mem2b=LocalHandle(mem2ptr);
|
||||
ok(mem2b==mem2a,"LocalHandle didn't return the correct memory handle\n");
|
||||
/* Check that we can't discard locked memory */
|
||||
mem2b=LocalDiscard(mem2a);
|
||||
ok(mem2b==NULL,"Discarded memory we shouldn't have\n");
|
||||
SetLastError(NO_ERROR);
|
||||
ok(!LocalUnlock(mem2a) && GetLastError()==NO_ERROR, "LocalUnlock Failed\n");
|
||||
}
|
||||
}
|
||||
if(mem1) {
|
||||
ok(LocalFree(mem1)==NULL,"LocalFree failed\n");
|
||||
}
|
||||
if(mem2a) {
|
||||
ok(LocalFree(mem2a)==NULL,"LocalFree failed\n");
|
||||
} else {
|
||||
ok(LocalFree(mem2)==NULL,"LocalFree failed\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* The Virtual* routines are not tested as thoroughly,
|
||||
since I don't really understand how to use them correctly :)
|
||||
The following routines are not tested at all
|
||||
VirtualAllocEx
|
||||
VirtualFreeEx
|
||||
VirtualLock
|
||||
VirtualProtect
|
||||
VirtualProtectEx
|
||||
VirtualQuery
|
||||
VirtualQueryEx
|
||||
VirtualUnlock
|
||||
And the only features (flags) being tested are
|
||||
MEM_COMMIT
|
||||
MEM_RELEASE
|
||||
PAGE_READWRITE
|
||||
Testing the rest requires using exceptions, which I really don't
|
||||
understand well
|
||||
*/
|
||||
static void test_Virtual(void)
|
||||
{
|
||||
SYSTEM_INFO sysInfo;
|
||||
ULONG memchunk;
|
||||
UCHAR *mem1;
|
||||
UINT error,i;
|
||||
|
||||
/* Retrieve the page size for this system */
|
||||
sysInfo.dwPageSize=0;
|
||||
GetSystemInfo(&sysInfo);
|
||||
ok(sysInfo.dwPageSize>0,"GetSystemInfo should return a valid page size\n");
|
||||
|
||||
/* Choose a reasonable allocation size */
|
||||
memchunk=10*sysInfo.dwPageSize;
|
||||
|
||||
/* Check that a normal alloc works */
|
||||
mem1=VirtualAlloc(NULL,memchunk,MEM_COMMIT,PAGE_READWRITE);
|
||||
ok(mem1!=NULL,"VirtualAlloc failed\n");
|
||||
if(mem1) {
|
||||
/* check that memory is initialized to 0 */
|
||||
error=0;
|
||||
for(i=0;i<memchunk;i++) {
|
||||
if(mem1[i]!=0) {
|
||||
error=1;
|
||||
}
|
||||
}
|
||||
ok(!error,"VirtualAlloc did not initialize memory to '0's\n");
|
||||
/* Check that we can read/write to memory */
|
||||
error=0;
|
||||
for(i=0;i<memchunk;i+=100) {
|
||||
mem1[i]='a';
|
||||
if(mem1[i]!='a') {
|
||||
error=1;
|
||||
}
|
||||
}
|
||||
ok(!error,"Virtual memory was not writable\n");
|
||||
}
|
||||
ok(VirtualFree(mem1,0,MEM_RELEASE),"VirtualFree failed\n");
|
||||
}
|
||||
START_TEST(alloc)
|
||||
{
|
||||
test_Heap();
|
||||
test_Global();
|
||||
test_Local();
|
||||
test_Virtual();
|
||||
}
|
@@ -1,191 +0,0 @@
|
||||
/*
|
||||
* Unit tests for atom functions
|
||||
*
|
||||
* Copyright (c) 2002 Alexandre Julliard
|
||||
*
|
||||
* 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 <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "wine/test.h"
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
|
||||
static const WCHAR foobarW[] = {'f','o','o','b','a','r',0};
|
||||
static const WCHAR FOOBARW[] = {'F','O','O','B','A','R',0};
|
||||
static const WCHAR _foobarW[] = {'_','f','o','o','b','a','r',0};
|
||||
|
||||
static BOOL unicode_OS;
|
||||
|
||||
static void test_add_atom(void)
|
||||
{
|
||||
ATOM atom, w_atom;
|
||||
int i;
|
||||
|
||||
SetLastError( 0xdeadbeef );
|
||||
atom = GlobalAddAtomA( "foobar" );
|
||||
ok( atom >= 0xc000, "bad atom id %x\n", atom );
|
||||
ok( GetLastError() == 0xdeadbeef, "GlobalAddAtomA set last error\n" );
|
||||
|
||||
/* Verify that it can be found (or not) appropriately */
|
||||
ok( GlobalFindAtomA( "foobar" ) == atom, "could not find atom foobar\n" );
|
||||
ok( GlobalFindAtomA( "FOOBAR" ) == atom, "could not find atom FOOBAR\n" );
|
||||
ok( !GlobalFindAtomA( "_foobar" ), "found _foobar\n" );
|
||||
|
||||
/* Add the same atom, specifying string as unicode; should
|
||||
* find the first one, not add a new one */
|
||||
SetLastError( 0xdeadbeef );
|
||||
w_atom = GlobalAddAtomW( foobarW );
|
||||
if (w_atom && GetLastError() != ERROR_CALL_NOT_IMPLEMENTED)
|
||||
unicode_OS = TRUE;
|
||||
else
|
||||
trace("WARNING: Unicode atom APIs are not supported on this platform\n");
|
||||
|
||||
if (unicode_OS)
|
||||
{
|
||||
ok( w_atom == atom, "Unicode atom does not match ASCII\n" );
|
||||
ok( GetLastError() == 0xdeadbeef, "GlobalAddAtomW set last error\n" );
|
||||
}
|
||||
|
||||
/* Verify that it can be found (or not) appropriately via unicode name */
|
||||
if (unicode_OS)
|
||||
{
|
||||
ok( GlobalFindAtomW( foobarW ) == atom, "could not find atom foobar\n" );
|
||||
ok( GlobalFindAtomW( FOOBARW ) == atom, "could not find atom FOOBAR\n" );
|
||||
ok( !GlobalFindAtomW( _foobarW ), "found _foobar\n" );
|
||||
}
|
||||
|
||||
/* Test integer atoms
|
||||
* (0x0001 .. 0xbfff) should be valid;
|
||||
* (0xc000 .. 0xffff) should be invalid */
|
||||
|
||||
SetLastError( 0xdeadbeef );
|
||||
ok( GlobalAddAtomA(0) == 0 && GetLastError() == 0xdeadbeef, "succeeded to add atom 0\n" );
|
||||
if (unicode_OS)
|
||||
{
|
||||
SetLastError( 0xdeadbeef );
|
||||
ok( GlobalAddAtomW(0) == 0 && GetLastError() == 0xdeadbeef, "succeeded to add atom 0\n" );
|
||||
}
|
||||
|
||||
SetLastError( 0xdeadbeef );
|
||||
for (i = 1; i <= 0xbfff; i++)
|
||||
{
|
||||
SetLastError( 0xdeadbeef );
|
||||
ok( GlobalAddAtomA((LPCSTR)i) == i && GetLastError() == 0xdeadbeef,
|
||||
"failed to add atom %x\n", i );
|
||||
if (unicode_OS)
|
||||
{
|
||||
SetLastError( 0xdeadbeef );
|
||||
ok( GlobalAddAtomW((LPCWSTR)i) == i && GetLastError() == 0xdeadbeef,
|
||||
"failed to add atom %x\n", i );
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0xc000; i <= 0xffff; i++)
|
||||
{
|
||||
ok( !GlobalAddAtomA((LPCSTR)i), "succeeded adding %x\n", i );
|
||||
if (unicode_OS)
|
||||
ok( !GlobalAddAtomW((LPCWSTR)i), "succeeded adding %x\n", i );
|
||||
}
|
||||
}
|
||||
|
||||
static void test_get_atom_name(void)
|
||||
{
|
||||
char buf[10];
|
||||
WCHAR bufW[10];
|
||||
int i;
|
||||
UINT len;
|
||||
static const WCHAR resultW[] = {'f','o','o','b','a','r',0,'.','.','.'};
|
||||
|
||||
ATOM atom = GlobalAddAtomA( "foobar" );
|
||||
|
||||
/* Get the name of the atom we added above */
|
||||
memset( buf, '.', sizeof(buf) );
|
||||
len = GlobalGetAtomNameA( atom, buf, 10 );
|
||||
ok( len == strlen("foobar"), "bad length %d\n", len );
|
||||
ok( !memcmp( buf, "foobar\0...", 10 ), "bad buffer contents\n" );
|
||||
|
||||
/* Repeat, unicode-style */
|
||||
if (unicode_OS)
|
||||
{
|
||||
for (i = 0; i < 10; i++) bufW[i] = '.';
|
||||
SetLastError( 0xdeadbeef );
|
||||
len = GlobalGetAtomNameW( atom, bufW, 10 );
|
||||
ok( len && GetLastError() == 0xdeadbeef, "GlobalGetAtomNameW failed\n" );
|
||||
ok( len == lstrlenW(foobarW), "bad length %d\n", len );
|
||||
ok( !memcmp( bufW, resultW, 10*sizeof(WCHAR) ), "bad buffer contents\n" );
|
||||
}
|
||||
|
||||
/* Check error code returns */
|
||||
memset(buf, '.', 10);
|
||||
ok( !GlobalGetAtomNameA( atom, buf, 0 ), "succeeded\n" );
|
||||
ok( !memcmp( buf, "..........", 10 ), "should not touch buffer\n" );
|
||||
|
||||
if (unicode_OS)
|
||||
{
|
||||
static const WCHAR sampleW[10] = {'.','.','.','.','.','.','.','.','.','.'};
|
||||
|
||||
for (i = 0; i < 10; i++) bufW[i] = '.';
|
||||
ok( !GlobalGetAtomNameW( atom, bufW, 0 ), "succeeded\n" );
|
||||
ok( !memcmp( bufW, sampleW, 10 * sizeof(WCHAR) ), "should not touch buffer\n" );
|
||||
}
|
||||
|
||||
/* Test integer atoms */
|
||||
for (i = 0; i <= 0xbfff; i++)
|
||||
{
|
||||
memset( buf, 'a', 10 );
|
||||
len = GlobalGetAtomNameA( (ATOM)i, buf, 10 );
|
||||
if (i)
|
||||
{
|
||||
char res[20];
|
||||
ok( (len > 1) && (len < 7), "bad length %d\n", len );
|
||||
sprintf( res, "#%d", i );
|
||||
memset( res + strlen(res) + 1, 'a', 10 );
|
||||
ok( !memcmp( res, buf, 10 ), "bad buffer contents %s\n", buf );
|
||||
}
|
||||
else
|
||||
ok( !len, "bad length %d\n", len );
|
||||
}
|
||||
}
|
||||
|
||||
static void test_error_handling(void)
|
||||
{
|
||||
char buffer[260];
|
||||
WCHAR bufferW[260];
|
||||
int i;
|
||||
|
||||
memset( buffer, 'a', 256 );
|
||||
buffer[256] = 0;
|
||||
ok( !GlobalAddAtomA(buffer), "add succeeded\n" );
|
||||
ok( !GlobalFindAtomA(buffer), "find succeeded\n" );
|
||||
|
||||
if (unicode_OS)
|
||||
{
|
||||
for (i = 0; i < 256; i++) bufferW[i] = 'b';
|
||||
bufferW[256] = 0;
|
||||
ok( !GlobalAddAtomW(bufferW), "add succeeded\n" );
|
||||
ok( !GlobalFindAtomW(bufferW), "find succeeded\n" );
|
||||
}
|
||||
}
|
||||
|
||||
START_TEST(atom)
|
||||
{
|
||||
test_add_atom();
|
||||
test_get_atom_name();
|
||||
test_error_handling();
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user