Compare commits

..

1 Commits

Author SHA1 Message Date
The ReactOS Team
d7d72444fb This commit was manufactured by cvs2svn to create tag 'krnl0103'.
svn path=/tags/krnl0103/; revision=5949
2003-08-30 22:14:42 +00:00
7306 changed files with 8 additions and 2160663 deletions

View File

@@ -1,22 +0,0 @@
dist
reactos
*.sys
*.exe
*.dll
*.cpl
*.a
*.o
*.d
*.coff
*.dsp
*.dsw
*.aps
*.ncb
*.opt
*.sym
*.plg
*.bak
*.zip
*.iso
*.cab
doxy-doc

View File

@@ -1,340 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

View File

@@ -1,78 +0,0 @@
ReactOS is available thanks to the work of
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
Source and inspiration from
WINE (http://www.winehq.com)
WinFree (http://www.stack.nl/~onno/win32/)
Linux (http://www.kernel.org)
XFree86 (http://www.xfree86.org/)
References (Rex's at least)
Baker, Art. The Windows NT Device Driver Book. Prentice Hall, 1997.
Borate, Dabak & Phadke. Undocumented Windows NT. M&T Books, 1999.
Brain, Marshall. Win32 System Services. Prentice Hall, 1996.
Cant, Chris. Writing Windows WDM Device Drivers. R&D Books, 1999.
Canton & Sanchez. IBM Microcomputers: A Programmer's Handbook. McGraw Hill, 1990.
Davis & Wallace. Windows Undocumented File Formats. R&D Books, 1997.
Mason & Viscarola. Windows NT Device Driver Development. Macmillan, 1999.
Mitchell, Stan. Inside the Windows 95 File System. O'Reilly, 1997.
Murray, James D. Windows NT Event Logging. O'Reilly, 1998.
Nagar, Rajeev. Windows NT File System Internals. O'Reilly, 1997.
Osbourne, Sandra. Windows NT Registry: A Settings Reference. New Riders, 1998.
Pietrek, Matt. Windows 95 System Programming Secrets. IDG, 1995.
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.

File diff suppressed because it is too large Load Diff

View File

@@ -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

View File

@@ -1,73 +0,0 @@
1. Build environment
To build the system you need either mingw32 installed on Windows or a mingw32
cross compiler running on unix. You may obtain MinGW binaries that build
ReactOS from http://www.reactos.com.
2. Building ReactOS
To build from Windows run 'make' (wihout the quotes) from the top directory.
To build from unix, edit rules.mak and change the PREFIX variable to the
correct value for your cross-compiler. Run 'export HOST=mingw32-linux' to
tell the ReactOS build system that it is building ReactOS on a linux machine.
Now run 'make'.
3. Installation
The system can only be installed on the first partition on the first harddisk.
The partition must be formatted as FAT16 or FAT32. The system can only be
started from DOS and not from a Windows DOS-prompt.
ReactOS can be installed from the source distribution or from the binary
distribution. The two ways to install ReactOS are explained below.
3.1 Installation from sources
To install ReactOS after building it, type 'make install'. This will create
the directory 'reactos' in the top directory. Copy this directory to the root
of your first partition on your first harddisk. This is usually c:\ on a
Windows machine.
If you don't want to copy the files manually every time you run a 'make install',
you can specify the directory where the files are to be copied to during
installation.
In rules.mak find the variable INSTALL_DIR and change the assigned value to the
name of the directory where the files are to be copied to. If you are using
Windows this could be:
INSTALL_DIR = c:\reactos
If you are on linux this could be:
INSTALL_DIR = /mnt/windows/reactos
Save the changes to rules.mak and run 'make install' to install the files to
the new location. If you don't want to change rules.mak, you can specify the
installtion directory when invoking make. Run
'make INSTALL_DIR=c:\reactos install' to install to c:\reactos.
3.2 Installation from binany distribution
To install ReactOS from the binary distribution, extract the archive contents
to c:\reactos. Remember to extract the files with full paths.
4. Booting ReactOS
Startup in DOS mode. 'cd' to c:\reactos and type 'boot' and press <enter>.
A simple shell is started where you can use simple commands like 'cd' and 'dir'.
5. Help
If you run into problems or have suggestions for making ReactOS better, please
surf to the address below and subscribe to one or more of the mailing lists.
http://www.reactos.com/index.php?tab=discussion&section=lists
ReactOS Development Team

View File

@@ -1,5 +0,0 @@
# Main jamfile for ReactOS
SubDir ROS_TOP ;
SubInclude ROS_TOP Lib ;

View File

@@ -1,54 +0,0 @@
# customization for ReactOS goes here
# The SharedLibrary and SharedLibraryFromObjects rules were
# borrowed from here:
# http://www.differentpla.net/~roger/devel/jam/tutorial/shared_lib/index.html
SUFSHR = .dll ;
RM = rm ; # rm comes with MinGW, and the default del doesn't work in some cases
rule SharedLibrary
{
SharedLibraryFromObjects $(<) : $(>:S=$(SUFOBJ)) ;
Objects $(>) ;
}
rule SharedLibraryFromObjects
{
local _s _t ;
# Add grist to file names
# Add suffix to dll
_s = [ FGristFiles $(>) ] ;
_t = [ FAppendSuffix $(<) : $(SUFSHR) ] ;
if $(_t) != $(<)
{
DEPENDS $(<) : $(_t) ;
NOTFILE $(<) ;
}
# make compiled sources a dependency of target
DEPENDS exe : $(_t) ;
DEPENDS $(_t) : $(_s) ;
MakeLocate $(_t) : $(LOCATE_TARGET) ;
Clean clean : $(_t) ;
Link $(_t) : $(_s) ;
}
# nasm needs to know the output file first, or it doesn't
# recognize -I :(
actions As
{
$(AS) -o $(<) $(ASFLAGS) -I$(HDRS) $(>)
}
AS = nasm ;
# why isn't DEFINES working? :(
#DEFINES += _M_IX86 ;
CCFLAGS += -D_M_IX86 ;

View File

@@ -1,504 +0,0 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

View File

@@ -1,882 +0,0 @@
# $Id: Makefile,v 1.231 2004/06/15 22:33:45 gvg Exp $
#
# Global makefile
#
PATH_TO_TOP = .
#
# Define to build ReactOS external targets
#
ifeq ($(ROS_BUILD_EXT),)
ROS_BUILD_EXT = no
else
ROS_BUILD_EXT = yes
endif
include $(PATH_TO_TOP)/rules.mak
# Required to run the system
COMPONENTS = iface_native iface_additional hallib ntoskrnl
# Hardware Abstraction Layers
# halx86
HALS = halx86
# Bus drivers
# acpi isapnp pci
BUS = acpi isapnp pci
# Filesystem libraries
# vfatlib
LIB_FSLIB = vfatlib
# Static libraries
LIB_STATIC = string rosrtl epsapi uuid libwine zlib rtl tgetopt
# Keyboard layout libraries
DLLS_KBD = kbddv kbdfr kbdgr kbdse kbduk kbdus
# Control Panels
DLLS_CPL = cpl
# User mode libraries
# advapi32 cards crtdll comdlg32 fmifs gdi32 imagehlp 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)
SUBSYS = smss win32k csrss ntvdm
#
# Select the server(s) you want to build
#
#SERVERS = posix linux os2
SERVERS = win32
# Boot loaders
# dos
LOADERS = dos
# Driver support libraries
#bzip2 zlib oskittcp
DRIVERS_LIB = bzip2 oskittcp csq
# Kernel mode device drivers
# Obsolete: ide
# beep blue floppy null parallel ramdrv serenum serial
DEVICE_DRIVERS = beep blue debugout null serial bootvid
# Kernel mode input drivers
INPUT_DRIVERS = keyboard mouclass psaux sermouse
# Kernel mode file system drivers
# cdfs ext2 fs_rec ms np vfat
FS_DRIVERS = cdfs fs_rec ms np vfat mup ntfs
# Kernel mode networking drivers
# afd ndis npf tcpip tdi wshtcpip
NET_DRIVERS = afd ndis npf tcpip tdi wshtcpip
# Kernel mode networking device drivers
# ne2000 pcnet
NET_DEVICE_DRIVERS = ne2000 pcnet
# Kernel mode storage drivers
# atapi cdrom class2 disk scsiport
STORAGE_DRIVERS = atapi cdrom class2 disk floppy 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
# System services
# rpcss eventlog
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
ifeq ($(ROS_BUILD_EXT),yes)
EXT_MODULES = $(EXTERNALS)
else
EXT_MODULES =
endif
KERNEL_DRIVERS = $(DRIVERS_LIB) $(DEVICE_DRIVERS) $(INPUT_DRIVERS) $(FS_DRIVERS) \
$(NET_DRIVERS) $(NET_DEVICE_DRIVERS) $(STORAGE_DRIVERS) VIDEO_DRIVERS
# Regression tests
REGTESTS = regtests
all: tools dk implib $(LIB_STATIC) $(COMPONENTS) $(REGTESTS) $(HALS) $(BUS) $(LIB_FSLIB) $(DLLS) $(SUBSYS) \
$(LOADERS) $(KERNEL_DRIVERS) $(SYS_APPS) $(SYS_SVC) \
$(APPS) $(EXT_MODULES)
#config: $(TOOLS:%=%_config)
depends: $(LIB_STATIC:%=%_depends) $(LIB_FSLIB:%=%_depends) $(DLLS:%=%_depends) $(SUBSYS:%=%_depends) $(SYS_SVC:%=%_depends) \
$(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)
clean: tools dk_clean $(HALS:%=%_clean) \
$(COMPONENTS:%=%_clean) $(BUS:%=%_clean) $(LIB_STATIC:%=%_clean) $(LIB_FSLIB:%=%_clean) $(DLLS:%=%_clean) \
$(LOADERS:%=%_clean) $(KERNEL_DRIVERS:%=%_clean) $(SUBSYS:%=%_clean) \
$(SYS_APPS:%=%_clean) $(SYS_SVC:%=%_clean) \
$(NET_APPS:%=%_clean) \
$(APPS:%=%_clean) $(EXT_MODULES:%=%_clean) $(REGTESTS:%=%_clean) \
clean_after tools_clean
clean_after:
$(RM) $(PATH_TO_TOP)/include/roscfg.h
fastinstall: 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
FREELDR_DIR = ../freeldr
freeldr:
$(MAKE) -C $(FREELDR_DIR)
bootcd_directory_layout:
$(RMKDIR) $(BOOTCD_DIR)
$(RMKDIR) $(BOOTCD_DIR)/bootdisk
$(RMKDIR) $(BOOTCD_DIR)/loader
$(RMKDIR) $(BOOTCD_DIR)/reactos
$(RMKDIR) $(BOOTCD_DIR)/reactos/system32
$(CP) ${FREELDR_DIR}/bootsect/isoboot.bin ${BOOTCD_DIR}/../isoboot.bin
$(CP) ${FREELDR_DIR}/bootsect/dosmbr.bin ${BOOTCD_DIR}/loader/dosmbr.bin
$(CP) ${FREELDR_DIR}/bootsect/ext2.bin ${BOOTCD_DIR}/loader/ext2.bin
$(CP) ${FREELDR_DIR}/bootsect/fat.bin ${BOOTCD_DIR}/loader/fat.bin
$(CP) ${FREELDR_DIR}/bootsect/fat32.bin ${BOOTCD_DIR}/loader/fat32.bin
$(CP) ${FREELDR_DIR}/bootsect/isoboot.bin ${BOOTCD_DIR}/loader/isoboot.bin
$(CP) ${FREELDR_DIR}/freeldr/obj/i386/freeldr.sys ${BOOTCD_DIR}/loader/freeldr.sys
$(CP) ${FREELDR_DIR}/freeldr/obj/i386/setupldr.sys ${BOOTCD_DIR}/loader/setupldr.sys
bootcd_bootstrap_files: $(COMPONENTS:%=%_bootcd) $(HALS:%=%_bootcd) $(BUS:%=%_bootcd) \
$(LIB_STATIC:%=%_bootcd) $(LIB_FSLIB:%=%_bootcd) $(DLLS:%=%_bootcd) $(KERNEL_DRIVERS:%=%_bootcd) \
$(SUBSYS:%=%_bootcd) $(SYS_APPS:%=%_bootcd)
bootcd_install_before:
$(RLINE) bootdata/autorun.inf $(BOOTCD_DIR)/autorun.inf
$(RLINE) bootdata/readme.txt $(BOOTCD_DIR)/readme.txt
$(RLINE) bootdata/hivecls.inf $(BOOTCD_DIR)/reactos/hivecls.inf
$(RLINE) bootdata/hivedef.inf $(BOOTCD_DIR)/reactos/hivedef.inf
$(RLINE) bootdata/hivesft.inf $(BOOTCD_DIR)/reactos/hivesft.inf
$(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_makecd:
$(CABMAN) /C bootdata/packages/reactos.dff /L $(BOOTCD_DIR)/reactos /I
$(CABMAN) /C bootdata/packages/reactos.dff /RC $(BOOTCD_DIR)/reactos/reactos.inf /L $(BOOTCD_DIR)/reactos /N
- $(RM) $(BOOTCD_DIR)/reactos/reactos.inf
$(TOOLS_PATH)/cdmake/cdmake -v -m -b $(BOOTCD_DIR)/../isoboot.bin $(BOOTCD_DIR) REACTOS ReactOS.iso
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
.PHONY: all depends implib clean clean_before install freeldr bootcd_directory_layout \
bootcd_bootstrap_files bootcd_install_before bootcd_basic bootcd_makecd ubootcd_unattend bootcd
#
# System Applications
#
$(SYS_APPS): %:
$(MAKE) -C subsys/system/$*
$(SYS_APPS:%=%_implib): %_implib:
$(MAKE) -C subsys/system/$* implib
$(SYS_APPS:%=%_clean): %_clean:
$(MAKE) -C subsys/system/$* clean
$(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)
#
# System Services
#
$(SYS_SVC): %:
$(MAKE) -C services/$*
$(SYS_SVC:%=%_depends): %_depends:
$(MAKE) -C services/$* depends
$(SYS_SVC:%=%_implib): %_implib:
$(MAKE) -C services/$* implib
$(SYS_SVC:%=%_clean): %_clean:
$(MAKE) -C services/$* clean
$(SYS_SVC:%=%_install): %_install:
$(MAKE) -C services/$* install
.PHONY: $(SYS_SVC) $(SYS_SVC:%=%_depends) $(SYS_SVC:%=%_implib) $(SYS_SVC:%=%_clean) $(SYS_SVC:%=%_install)
#
# Applications
#
#
# Extra (optional system) Applications
#
$(APPS): %:
$(MAKE) -C apps/$*
# Not needed
# $(APPS:%=%_implib): %_implib:
# $(MAKE) -C apps/$* implib
$(APPS:%=%_clean): %_clean:
$(MAKE) -C apps/$* clean
$(APPS:%=%_install): %_install:
$(MAKE) -C apps/$* install
.PHONY: $(APPS) $(APPS:%=%_implib) $(APPS:%=%_clean) $(APPS:%=%_install)
#
# External ports and subsystem personalities
#
$(EXTERNALS): %:
$(MAKE) -C $(ROOT_PATH)/$*
$(EXTERNALS:%=%_depends): %_depends:
$(MAKE) -C $(ROOT_PATH)/$* depends
$(EXTERNALS:%=%_implib): %_implib:
$(MAKE) -C $(ROOT_PATH)/$* implib
$(EXTERNALS:%=%_clean): %_clean:
$(MAKE) -C $(ROOT_PATH)/$* clean
$(EXTERNALS:%=%_install): %_install:
$(MAKE) -C $(ROOT_PATH)/$* install
.PHONY: $(EXTERNALS) $(EXTERNALS:%=%_depends) $(EXTERNALS:%=%_implib) $(EXTERNALS:%=%_clean) $(EXTERNALS:%=%_install)
#
# Tools
#
tools:
$(MAKE) -C tools
tools_implib:
tools_clean:
$(MAKE) -C tools clean
tools_install:
.PHONY: tools tools_implib tools_clean tools_install
#
# Developer Kits
#
dk:
$(RMKDIR) $(DK_PATH)
$(RMKDIR) $(DDK_PATH)
$(RMKDIR) $(DDK_PATH_LIB)
$(RMKDIR) $(DDK_PATH_INC)
$(RMKDIR) $(SDK_PATH)
$(RMKDIR) $(SDK_PATH_LIB)
$(RMKDIR) $(SDK_PATH_INC)
$(RMKDIR) $(XDK_PATH)
$(RMKDIR) $(XDK_PATH_LIB)
$(RMKDIR) $(XDK_PATH_INC)
dk_implib:
# WARNING! Be very sure that there are no important files
# in these directories before cleaning them!!!
dk_clean:
$(RM) $(DDK_PATH_LIB)/*.a
# $(RM) $(DDK_PATH_INC)/*.h
$(RMDIR) $(DDK_PATH_LIB)
# $(RMDIR) $(DDK_PATH_INC)
$(RM) $(SDK_PATH_LIB)/*.a
# $(RM) $(SDK_PATH_INC)/*.h
$(RMDIR) $(SDK_PATH_LIB)
# $(RMDIR) $(SDK_PATH_INC)
$(RM) $(XDK_PATH_LIB)/*.a
# $(RM) $(XDK_PATH_INC)/*.h
$(RMDIR) $(XDK_PATH_LIB)
# $(RMDIR) $(XDK_PATH_INC)
dk_install:
.PHONY: dk dk_implib dk_clean dk_install
#
# Interfaces
#
iface_native:
$(MAKE) -C iface/native
iface_native_implib:
iface_native_clean:
$(MAKE) -C iface/native clean
iface_native_install:
iface_native_bootcd:
iface_additional:
$(MAKE) -C iface/addsys
iface_additional_implib:
iface_additional_clean:
$(MAKE) -C iface/addsys clean
iface_additional_install:
iface_additional_bootcd:
.PHONY: iface_native iface_native_implib iface_native_clean iface_native_install \
iface_native_bootcd \
iface_additional iface_additional_implib iface_additional_clean \
iface_additional_install iface_additional_bootcd
#
# Bus driver rules
#
$(BUS): %:
$(MAKE) -C drivers/bus/$*
$(BUS:%=%_implib): %_implib:
$(MAKE) -C drivers/bus/$* implib
$(BUS:%=%_clean): %_clean:
$(MAKE) -C drivers/bus/$* clean
$(BUS:%=%_install): %_install:
$(MAKE) -C drivers/bus/$* install
$(BUS:%=%_bootcd): %_bootcd:
$(MAKE) -C drivers/bus/$* bootcd
.PHONY: $(BUS) $(BUS:%=%_implib) $(BUS:%=%_clean) \
$(BUS:%=%_install) $(BUS:%=%_bootcd)
#
# Driver support libraries rules
#
$(DRIVERS_LIB): %:
$(MAKE) -C drivers/lib/$*
$(DRIVERS_LIB:%=%_implib): %_implib:
$(MAKE) -C drivers/lib/$* implib
$(DRIVERS_LIB:%=%_clean): %_clean:
$(MAKE) -C drivers/lib/$* clean
$(DRIVERS_LIB:%=%_install): %_install:
$(MAKE) -C drivers/lib/$* install
$(DRIVERS_LIB:%=%_bootcd): %_bootcd:
$(MAKE) -C drivers/lib/$* bootcd
.PHONY: $(DRIVERS_LIB) $(DRIVERS_LIB:%=%_implib) $(DRIVERS_LIB:%=%_clean) \
$(DRIVERS_LIB:%=%_install) $(DRIVERS_LIB:%=%_bootcd)
#
# Device driver rules
#
$(DEVICE_DRIVERS): %:
$(MAKE) -C drivers/dd/$*
$(DEVICE_DRIVERS:%=%_implib): %_implib:
$(MAKE) -C drivers/dd/$* implib
$(DEVICE_DRIVERS:%=%_clean): %_clean:
$(MAKE) -C drivers/dd/$* clean
$(DEVICE_DRIVERS:%=%_install): %_install:
$(MAKE) -C drivers/dd/$* install
$(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
#
# Input driver rules
#
$(INPUT_DRIVERS): %:
$(MAKE) -C drivers/input/$*
$(INPUT_DRIVERS:%=%_implib): %_implib:
$(MAKE) -C drivers/input/$* implib
$(INPUT_DRIVERS:%=%_clean): %_clean:
$(MAKE) -C drivers/input/$* clean
$(INPUT_DRIVERS:%=%_install): %_install:
$(MAKE) -C drivers/input/$* install
$(INPUT_DRIVERS:%=%_bootcd): %_bootcd:
$(MAKE) -C drivers/input/$* bootcd
.PHONY: $(INPUT_DRIVERS) $(INPUT_DRIVERS:%=%_implib) $(INPUT_DRIVERS:%=%_clean)\
$(INPUT_DRIVERS:%=%_install) $(INPUT_DRIVERS:%=%_bootcd)
#
# Filesystem driver rules
#
$(FS_DRIVERS): %:
$(MAKE) -C drivers/fs/$*
$(FS_DRIVERS:%=%_implib): %_implib:
$(MAKE) -C drivers/fs/$* implib
$(FS_DRIVERS:%=%_clean): %_clean:
$(MAKE) -C drivers/fs/$* clean
$(FS_DRIVERS:%=%_install): %_install:
$(MAKE) -C drivers/fs/$* install
$(FS_DRIVERS:%=%_bootcd): %_bootcd:
$(MAKE) -C drivers/fs/$* bootcd
.PHONY: $(FS_DRIVERS) $(FS_DRIVERS:%=%_implib) $(FS_DRIVERS:%=%_clean) \
$(FS_DRIVERS:%=%_install) $(FS_DRIVERS:%=%_bootcd)
#
# Network driver rules
#
$(NET_DRIVERS): %:
$(MAKE) -C drivers/net/$*
$(NET_DRIVERS:%=%_implib): %_implib:
$(MAKE) -C drivers/net/$* implib
$(NET_DRIVERS:%=%_clean): %_clean:
$(MAKE) -C drivers/net/$* clean
$(NET_DRIVERS:%=%_install): %_install:
$(MAKE) -C drivers/net/$* install
$(NET_DRIVERS:%=%_bootcd): %_bootcd:
$(MAKE) -C drivers/net/$* bootcd
.PHONY: $(NET_DRIVERS) $(NET_DRIVERS:%=%_implib) $(NET_DRIVERS:%=%_clean) \
$(NET_DRIVERS:%=%_install) $(NET_DRIVERS:%=%_bootcd)
#
# Network device driver rules
#
$(NET_DEVICE_DRIVERS): %:
$(MAKE) -C drivers/net/dd/$*
$(NET_DEVICE_DRIVERS:%=%_implib): %_implib:
$(MAKE) -C drivers/net/dd/$* implib
$(NET_DEVICE_DRIVERS:%=%_clean): %_clean:
$(MAKE) -C drivers/net/dd/$* clean
$(NET_DEVICE_DRIVERS:%=%_install): %_install:
$(MAKE) -C drivers/net/dd/$* install
$(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)
#
# storage driver rules
#
$(STORAGE_DRIVERS): %:
$(MAKE) -C drivers/storage/$*
$(STORAGE_DRIVERS:%=%_implib): %_implib:
$(MAKE) -C drivers/storage/$* implib
$(STORAGE_DRIVERS:%=%_clean): %_clean:
$(MAKE) -C drivers/storage/$* clean
$(STORAGE_DRIVERS:%=%_install): %_install:
$(MAKE) -C drivers/storage/$* install
$(STORAGE_DRIVERS:%=%_bootcd): %_bootcd:
$(MAKE) -C drivers/storage/$* bootcd
.PHONY: $(STORAGE_DRIVERS) $(STORAGE_DRIVERS:%=%_clean) $(STORAGE_DRIVERS:%=%_implib) \
$(STORAGE_DRIVERS:%=%_install) $(STORAGE_DRIVERS:%=%_bootcd)
#
# Kernel loaders
#
$(LOADERS): %:
$(MAKE) -C loaders/$*
$(LOADERS:%=%_implib): %_implib:
$(LOADERS:%=%_clean): %_clean:
$(MAKE) -C loaders/$* clean
$(LOADERS:%=%_install): %_install:
$(MAKE) -C loaders/$* install
.PHONY: $(LOADERS) $(LOADERS:%=%_implib) $(LOADERS:%=%_clean) $(LOADERS:%=%_install)
#
# Required system components
#
ntoskrnl:
$(MAKE) -C ntoskrnl
ntoskrnl_implib:
$(MAKE) -C ntoskrnl implib
ntoskrnl_clean:
$(MAKE) -C ntoskrnl clean
ntoskrnl_install:
$(MAKE) -C ntoskrnl install
ntoskrnl_bootcd:
$(MAKE) -C ntoskrnl bootcd
.PHONY: ntoskrnl ntoskrnl_implib ntoskrnl_clean ntoskrnl_install ntoskrnl_bootcd
#
# Hardware Abstraction Layer import library
#
hallib:
$(MAKE) -C hal/hal
hallib_implib:
$(MAKE) -C hal/hal implib
hallib_clean:
$(MAKE) -C hal/hal clean
hallib_install:
$(MAKE) -C hal/hal install
hallib_bootcd:
$(MAKE) -C hal/hal bootcd
.PHONY: hallib hallib_implib hallib_clean hallib_install hallib_bootcd
#
# Hardware Abstraction Layers
#
$(HALS): %:
$(MAKE) -C hal/$*
$(HALS:%=%_implib): %_implib:
$(MAKE) -C hal/$* implib
$(HALS:%=%_clean): %_clean:
$(MAKE) -C hal/$* clean
$(HALS:%=%_install): %_install:
$(MAKE) -C hal/$* install
$(HALS:%=%_bootcd): %_bootcd:
$(MAKE) -C hal/$* bootcd
.PHONY: $(HALS) $(HALS:%=%_implib) $(HALS:%=%_clean) $(HALS:%=%_install) $(HALS:%=%_bootcd)
#
# File system libraries
#
$(LIB_FSLIB): %:
$(MAKE) -C lib/fslib/$*
$(LIB_FSLIB:%=%_depends): %_depends:
$(MAKE) -C lib/fslib/$* depends
$(LIB_FSLIB:%=%_implib): %_implib:
$(MAKE) -C lib/fslib/$* implib
$(LIB_FSLIB:%=%_clean): %_clean:
$(MAKE) -C lib/fslib/$* clean
$(LIB_FSLIB:%=%_install): %_install:
$(MAKE) -C lib/fslib/$* install
$(LIB_FSLIB:%=%_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)
#
# Static libraries
#
$(LIB_STATIC): %:
$(MAKE) -C lib/$*
$(LIB_STATIC:%=%_depends): %_depends:
$(MAKE) -C lib/string depends
$(LIB_STATIC:%=%_implib): %_implib:
$(MAKE) -C lib/$* implib
$(LIB_STATIC:%=%_clean): %_clean:
$(MAKE) -C lib/$* clean
$(LIB_STATIC:%=%_install): %_install:
$(MAKE) -C lib/$* install
$(LIB_STATIC:%=%_bootcd): %_bootcd:
$(MAKE) -C lib/$* bootcd
.PHONY: $(LIB_STATIC) $(LIB_STATIC:%=%_depends) $(LIB_STATIC:%=%_implib) $(LIB_STATIC:%=%_clean) \
$(LIB_STATIC:%=%_install) $(LIB_STATIC:%=%_bootcd)
#
# DLLs
#
$(DLLS): %:
$(MAKE) -C lib/$*
$(DLLS:%=%_depends): %_depends:
$(MAKE) -C lib/$* depends
$(DLLS:%=%_implib): %_implib:
$(MAKE) -C lib/$* implib
$(DLLS:%=%_clean): %_clean:
$(MAKE) -C lib/$* clean
$(DLLS:%=%_install): %_install:
$(MAKE) -C lib/$* install
$(DLLS:%=%_bootcd): %_bootcd:
$(MAKE) -C lib/$* bootcd
.PHONY: $(DLLS) $(DLLS:%=%_depends) $(DLLS:%=%_implib) $(DLLS:%=%_clean) $(DLLS:%=%_install) \
$(DLLS:%=%_bootcd)
#
# Subsystem support modules
#
$(SUBSYS): %:
$(MAKE) -C subsys/$*
$(SUBSYS:%=%_depends): %_depends:
$(MAKE) -C subsys/$* depends
$(SUBSYS:%=%_implib): %_implib:
$(MAKE) -C subsys/$* implib
$(SUBSYS:%=%_clean): %_clean:
$(MAKE) -C subsys/$* clean
$(SUBSYS:%=%_install): %_install:
$(MAKE) -C subsys/$* install
$(SUBSYS:%=%_bootcd): %_bootcd:
$(MAKE) -C subsys/$* bootcd
.PHONY: $(SUBSYS) $(SUBSYS:%=%_depends) $(SUBSYS:%=%_implib) $(SUBSYS:%=%_clean) $(SUBSYS:%=%_install) \
$(SUBSYS:%=%_bootcd)
#
# Regression testsuite
#
$(REGTESTS): %:
$(MAKE) -C regtests
$(REGTESTS:%=%_clean): %_clean:
$(MAKE) -C regtests clean
$(REGTESTS:%=%_install): %_install:
$(MAKE) -C regtests install
.PHONY: $(REGTESTS) $(REGTESTS:%=%_depends) $(SUBSYS:%=%_clean) $(REGTESTS:%=%_install)
#
# Create an installation
#
install_clean:
$(RM) $(INSTALL_DIR)/system32/drivers/*.*
$(RM) $(INSTALL_DIR)/system32/config/*.*
$(RM) $(INSTALL_DIR)/system32/*.*
$(RM) $(INSTALL_DIR)/symbols/*.*
$(RM) $(INSTALL_DIR)/media/fonts/*.*
$(RM) $(INSTALL_DIR)/media/*.*
$(RM) $(INSTALL_DIR)/bin/*.*
$(RM) $(INSTALL_DIR)/*.com
$(RM) $(INSTALL_DIR)/*.bat
$(RMDIR) $(INSTALL_DIR)/system32/drivers
$(RMDIR) $(INSTALL_DIR)/system32/config
$(RMDIR) $(INSTALL_DIR)/system32
$(RMDIR) $(INSTALL_DIR)/symbols
$(RMDIR) $(INSTALL_DIR)/media/fonts
$(RMDIR) $(INSTALL_DIR)/media
$(RMDIR) $(INSTALL_DIR)/bin
$(RMDIR) $(INSTALL_DIR)
install_dirs:
$(RMKDIR) $(INSTALL_DIR)
$(RMKDIR) $(INSTALL_DIR)/bin
$(RMKDIR) $(INSTALL_DIR)/media
$(RMKDIR) $(INSTALL_DIR)/media/fonts
$(RMKDIR) $(INSTALL_DIR)/symbols
$(RMKDIR) $(INSTALL_DIR)/system32
$(RMKDIR) $(INSTALL_DIR)/system32/config
$(RMKDIR) $(INSTALL_DIR)/system32/drivers
install_before:
$(CP) bootc.lst $(INSTALL_DIR)/bootc.lst
$(CP) boot.bat $(INSTALL_DIR)/boot.bat
$(CP) aboot.bat $(INSTALL_DIR)/aboot.bat
$(CP) media/fonts $(INSTALL_DIR)/media/fonts
$(CP) media/nls $(INSTALL_DIR)/system32
$(CP) media/nls/c_1252.nls $(INSTALL_DIR)/system32/ansi.nls
$(CP) media/nls/c_437.nls $(INSTALL_DIR)/system32/oem.nls
$(CP) media/nls/l_intl.nls $(INSTALL_DIR)/system32/casemap.nls
.PHONY: install_clean install_dirs install_before
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

View File

@@ -1,28 +0,0 @@
========================
ReactOS Version 0.2.x
Updated June 23rd, 2004
========================
1. What is ReactOS?
ReactOS is an Open Source effort to develop a quality operating system
that is compatible with Windows NT applications and drivers.
The ReactOS project, although currently focused on Windows NT 4.0
compatibility, is always keeping an eye towards compatibility with
future Windows NT releases, that is, Windows 2000 (NT 5.0) and
Windows XP (NT 5.1).
More information is available at http://www.reactos.com.
2. Building ReactOS
See the INSTALL file for more details.
3. More information
See the doc subdirectory for some sparse notes
4. Who is responsible
See the CREDITS file

View File

@@ -1,3 +0,0 @@
loadros system32\ntoskrnl.exe system32\hal.dll system32\drivers\acpi.sys /DEBUGPORT=SCREEN bootc.lst
rem comment added and changed for no reason

View File

@@ -1,31 +0,0 @@
; Format:
; COMPONENT_NAME PATH_TO_COMPONENT_SOURCES
; COMPONENT_NAME - Name of the component. Eg. kernel32.dll.
; PATH_TO_COMPONENT_SOURCES - Relative path to sources (relative to
; where rgenstat is run from).
advapi32.dll reactos/lib/advapi32
crtdll.dll reactos/lib/crtdll
gdi32.dll reactos/lib/gdi32
iphlpapi.dll reactos/lib/iphlpapi
kernel32.dll reactos/lib/kernel32
lz32.dll reactos/lib/lzexpand
msvcrt.dll reactos/lib/msvcrt
ole32.dll reactos/lib/ole32
oleaut32.dll reactos/lib/oleaut32
rpcrt4.dll reactos/lib/rpcrt4
secur32.dll reactos/lib/secur32
shell32.dll reactos/lib/shell32
snmpapi.dll reactos/lib/snmpapi
user32.dll reactos/lib/user32
version.dll reactos/lib/version
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
class2.sys reactos/drivers/storage/class2
scsiport.sys reactos/drivers/storage/scsiport
ntoskrnl.exe reactos/ntoskrnl
win32k.sys reactos/subsys/win32k

View File

@@ -1 +0,0 @@
doxy-doc

View File

@@ -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

View File

@@ -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

View File

@@ -1,79 +0,0 @@
#
# ReactOS test applications makefile
#
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_MISC =
all: $(TEST_APPS) $(TEST_MISC)
depends:
implib: $(TEST_APPS:%=%_implib) \
$(TEST_MISC:%=%_implib)
clean: $(TEST_APPS:%=%_clean) \
$(TEST_MISC:%=%_clean)
install: $(TEST_APPS:%=%_install) \
$(TEST_MISC:%=%_install)
.PHONY: all depends implib clean install
#
# Test Applications
#
$(TEST_APPS): %:
$(MAKE) -C $*
$(TEST_APPS:%=%_implib): %_implib:
$(MAKE) -C $* implib
$(TEST_APPS:%=%_clean): %_clean:
$(MAKE) -C $* clean
$(TEST_APPS:%=%_install): %_install:
$(MAKE) -C $* install
.PHONY: $(TEST_APPS) $(TEST_APPS:%=%_implib) $(TEST_APPS:%=%_clean) $(TEST_APPS:%=%_install)
#
# Misc Test Applications
#
$(TEST_MISC): %:
$(MAKE) -C tests/$*
$(TEST_MISC:%=%_implib): %_implib:
$(MAKE) -C tests/$* implib
$(TEST_MISC:%=%_clean): %_clean:
$(MAKE) -C tests/$* clean
$(TEST_MISC:%=%_install): %_install:
$(MAKE) -C tests/$* install
.PHONY: $(TEST_MISC) $(TEST_MISC:%=%_implib) $(TEST_MISC:%=%_clean) $(TEST_MISC:%=%_install)
etags:
find . -name "*.[ch]" -print | etags --language=c -
# EOF

View File

@@ -1,6 +0,0 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -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

View File

@@ -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;
}

View File

@@ -1,6 +0,0 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -1,23 +0,0 @@
# $Id: Makefile,v 1.7 2003/11/14 17:13:14 weiden Exp $
PATH_TO_TOP = ../../..
TARGET_NORC = yes
TARGET_TYPE = program
TARGET_APPTYPE = console
TARGET_NAME = alive
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
# EOF

View File

@@ -1,48 +0,0 @@
/* $Id: alive.c,v 1.2 2001/03/26 21:30:20 ea Exp $
*
*/
#include <windows.h>
#include <stdlib.h>
HANDLE StandardOutput = INVALID_HANDLE_VALUE;
CHAR Message [80];
DWORD CharactersToWrite = 0;
DWORD WrittenCharacters = 0;
INT d = 0, h = 0, m = 0, s = 0;
int
main (int argc, char * argv [])
{
StandardOutput = GetStdHandle (STD_OUTPUT_HANDLE);
if (INVALID_HANDLE_VALUE == StandardOutput)
{
return (EXIT_FAILURE);
}
while (TRUE)
{
/* Prepare the message and update it */
CharactersToWrite =
wsprintf (
Message,
"Alive for %dd %dh %d' %d\" \r",
d, h, m, s
);
WriteConsole (
StandardOutput,
Message,
CharactersToWrite,
& WrittenCharacters,
NULL
);
/* suspend the execution for 1s */
Sleep (1000);
/* increment seconds */
++ s;
if (60 == s) { s = 0; ++ m; }
if (60 == m) { m = 0; ++ h; }
if (24 == h) { h = 0; ++ d; }
}
return (EXIT_SUCCESS);
}
/* EOF */

View File

@@ -1,6 +0,0 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -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

View File

@@ -1,22 +0,0 @@
PATH_TO_TOP = ../../..
TARGET_NORC = yes
TARGET_TYPE = program
TARGET_APPTYPE = windows
TARGET_NAME = alphablend
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
# EOF

View File

@@ -1,6 +0,0 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -1,94 +0,0 @@
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
#include <windows.h>
#include <ddk/ntddk.h>
#include <rosrtl/string.h>
HANDLE OutputHandle;
HANDLE InputHandle;
VOID STDCALL
ApcRoutine(PVOID Context,
PIO_STATUS_BLOCK IoStatus,
ULONG Reserved)
{
printf("(apc.exe) ApcRoutine(Context %p)\n", Context);
}
int main(int argc, char* argv[])
{
NTSTATUS Status;
HANDLE FileHandle;
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING FileName = ROS_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);
printf("APC test program\n");
EventHandle = CreateEventW(NULL,
FALSE,
FALSE,
NULL);
if (EventHandle == INVALID_HANDLE_VALUE)
{
printf("Failed to create event\n");
return 0;
}
printf("Opening file\n");
InitializeObjectAttributes(&ObjectAttributes,
&FileName,
0,
NULL,
NULL);
printf("Creating file\n");
FileHandle = CreateFileW(L"C:\\a.txt",
FILE_GENERIC_READ | FILE_GENERIC_WRITE,
0,
NULL,
OPEN_EXISTING,
FILE_FLAG_OVERLAPPED,
NULL);
if (FileHandle == INVALID_HANDLE_VALUE)
{
printf("Open failed last err 0x%lu\n",GetLastError());
return 0;
}
off.QuadPart = 0;
printf("Reading file\n");
Status = ZwReadFile(FileHandle,
NULL,
(PIO_APC_ROUTINE)ApcRoutine,
(PVOID) 0xdeadbeef,
&IoStatus,
Buffer,
256,//len
&off ,//offset must exist if file was opened for asynch. i/o aka. OVERLAPPED
NULL);
if (!NT_SUCCESS(Status))
{
printf("Read failed status 0x%lu\n",Status);
}
printf("Waiting\n");
WaitForSingleObjectEx(EventHandle, INFINITE, TRUE);
printf("Returned from wait\n");
ZwClose(FileHandle);
printf("Program finished\n");
return 0;
}

View File

@@ -1,23 +0,0 @@
# $Id: makefile,v 1.10 2003/11/14 17:13:14 weiden Exp $
PATH_TO_TOP = ../../..
TARGET_NORC = yes
TARGET_TYPE = program
TARGET_APPTYPE = console
TARGET_NAME = apc
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
# EOF

View File

@@ -1,6 +0,0 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -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;
}

View File

@@ -1,23 +0,0 @@
PATH_TO_TOP = ../../..
TARGET_NORC = yes
TARGET_TYPE = program
TARGET_APPTYPE = console
TARGET_NAME = apc2
TARGET_SDKLIBS = ntdll.a kernel32.a
TARGET_CFLAGS = -Wall -Werror
TARGET_OBJECTS = $(TARGET_NAME).o
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
# EOF

View File

@@ -1,6 +0,0 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

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

View File

@@ -1,21 +0,0 @@
# $Id: makefile,v 1.16 2003/11/14 17:13:14 weiden Exp $
PATH_TO_TOP = ../../..
TARGET_NORC = yes
TARGET_TYPE = program
TARGET_APPTYPE = console
TARGET_NAME = args
TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
# EOF

View File

@@ -1,6 +0,0 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -1,114 +0,0 @@
#include <stdio.h>
#include <string.h>
#include <windows.h>
#include <ddk/ntddk.h>
#define BUFFER_SIZE 256
int main(int argc, char* argv[])
{
PRTL_ATOM_TABLE AtomTable = NULL;
RTL_ATOM AtomA = -1, AtomB = -1, AtomC = -1;
NTSTATUS Status;
WCHAR Buffer[BUFFER_SIZE];
ULONG NameLength, Data1, Data2;
printf("Atom table test app\n\n");
printf("RtlCreateAtomTable()\n");
Status = RtlCreateAtomTable(37,
&AtomTable);
printf(" Status 0x%08lx\n", Status);
if (NT_SUCCESS(Status))
{
printf(" AtomTable %p\n", AtomTable);
printf("RtlAddAtomToAtomTable()\n");
Status = RtlAddAtomToAtomTable(AtomTable,
L"TestAtomA",
&AtomA);
printf(" Status 0x%08lx\n", Status);
if (NT_SUCCESS(Status))
{
printf(" AtomA 0x%x\n", AtomA);
}
printf("RtlAddAtomToAtomTable()\n");
Status = RtlAddAtomToAtomTable(AtomTable,
L"TestAtomB",
&AtomB);
printf(" Status 0x%08lx\n", Status);
if (NT_SUCCESS(Status))
{
printf(" AtomB 0x%x\n", AtomB);
}
printf("RtlLookupAtomInAtomTable()\n");
Status = RtlLookupAtomInAtomTable(AtomTable,
L"TestAtomA",
&AtomC);
printf(" Status 0x%08lx\n", Status);
if (NT_SUCCESS(Status))
{
printf(" AtomC 0x%x\n", AtomC);
}
printf("RtlPinAtomInAtomTable()\n");
Status = RtlPinAtomInAtomTable(AtomTable,
AtomC);
printf(" Status 0x%08lx\n", Status);
printf("RtlPinAtomInAtomTable()\n");
Status = RtlPinAtomInAtomTable(AtomTable,
AtomC);
printf(" Status 0x%08lx\n", Status);
// printf("RtlDeleteAtomFromAtomTable()\n");
// Status = RtlDeleteAtomFromAtomTable(AtomTable,
// AtomC);
// printf(" Status 0x%08lx\n", Status);
// printf("RtlEmptyAtomTable()\n");
// Status = RtlEmptyAtomTable(AtomTable,
// TRUE);
// printf(" Status 0x%08lx\n", Status);
// printf("RtlLookupAtomInAtomTable()\n");
// Status = RtlLookupAtomInAtomTable(AtomTable,
// L"TestAtomA",
// &AtomC);
// printf(" Status 0x%08lx\n", Status);
printf("RtlQueryAtomInAtomTable()\n");
NameLength = sizeof(WCHAR) * BUFFER_SIZE;
Status = RtlQueryAtomInAtomTable(AtomTable,
AtomC,
&Data1,
&Data2,
Buffer,
&NameLength);
printf(" Status 0x%08lx\n", Status);
if (NT_SUCCESS(Status))
{
printf(" RefCount %ld\n", Data1);
printf(" PinCount %ld\n", Data2);
printf(" NameLength %lu\n", NameLength);
printf(" AtomName: %S\n", Buffer);
}
printf("RtlDestroyAtomTable()\n");
RtlDestroyAtomTable(AtomTable);
printf("Atom table test app finished\n");
}
return(0);
}

View File

@@ -1,22 +0,0 @@
# $Id: makefile,v 1.6 2003/11/14 17:13:15 weiden Exp $
PATH_TO_TOP = ../../..
TARGET_NORC = yes
TARGET_TYPE = program
TARGET_APPTYPE = console
TARGET_NAME = atomtest
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
# EOF

View File

@@ -1,6 +0,0 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

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

View File

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

View File

@@ -1,23 +0,0 @@
# $Id: makefile,v 1.11 2003/11/14 17:13:15 weiden Exp $
PATH_TO_TOP = ../../..
TARGET_NORC = yes
TARGET_TYPE = program
TARGET_APPTYPE = console
TARGET_NAME = bench-thread
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

View File

@@ -1,6 +0,0 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -1,139 +0,0 @@
/*
* Windows 2000 Graphics API Black Book
* (BitBlt Bitmap Rendering Demo)
*
* Created by Damon Chandler <dmc27@ee.cornell.edu>
* Updates can be downloaded at: <www.coriolis.com>
*
* Please do not hesistate to e-mail me at dmc27@ee.cornell.edu
* if you have any questions about this code.
*/
#include <windows.h>
#include <string.h>
HINSTANCE HInst;
const char* WndClassName = "GMainWnd";
LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
LPARAM LParam);
int APIENTRY WinMain(HINSTANCE HInstance, HINSTANCE HPrevInstance,
LPTSTR lpCmdLine, int nCmdShow)
{
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("BitBlt Bitmap Rendering Demo"),
WS_OVERLAPPED | WS_SYSMENU | WS_CAPTION |
WS_VISIBLE | WS_CLIPSIBLINGS,
0, 0, 220, 230,
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;
HBITMAP HOldBmp = NULL;
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)
);
}
}
}
case WM_PAINT:
{
PAINTSTRUCT ps;
const HDC Hdc = BeginPaint(HWnd, &ps);
#if 0
try
#endif
{
/* TODO: add palette support (see Chapter 9)... */
BitBlt(Hdc, 20, 15,
bmp.bmWidth, bmp.bmHeight,
HMemDC, 0, 0,
SRCCOPY);
}
#if 0
catch (...)
#endif
{
EndPaint(HWnd, &ps);
}
EndPaint(HWnd, &ps);
break;
}
case WM_DESTROY:
{
/* clean up */
DeleteObject(SelectObject(HMemDC, HOldBmp));
DeleteDC(HMemDC);
PostQuitMessage(0);
return 0;
}
}
return DefWindowProc(HWnd, Msg, WParam, LParam);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

View File

@@ -1,22 +0,0 @@
PATH_TO_TOP = ../../..
TARGET_NORC = yes
TARGET_TYPE = program
TARGET_APPTYPE = windows
TARGET_NAME = bitblt
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
# EOF

View File

@@ -1,6 +0,0 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -1,22 +0,0 @@
PATH_TO_TOP = ../../..
TARGET_NORC = yes
TARGET_TYPE = program
TARGET_APPTYPE = windows
TARGET_NAME = btntest
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
# EOF

View File

@@ -1,107 +0,0 @@
/* Based on Radoslaw Sokol's static control test. */
#include <windows.h>
static LPSTR BUTTON_CLASS = "BUTTON";
static LPSTR TEST_WND_CLASS = "TESTWND";
#ifdef NDEBUG
#define DPRINT(s) (void)0
#else
#define DPRINT(s) OutputDebugStringA("BUTTONTEST: " s "\n")
#endif
HINSTANCE AppInstance = NULL;
LRESULT WmCreate(
HWND Wnd)
{
DPRINT("WM_CREATE (enter).");
DPRINT("test 1");
CreateWindowEx(0, BUTTON_CLASS, "PushButton", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE,
10, 10, 150, 30, Wnd, NULL, AppInstance, NULL);
DPRINT("test 2");
CreateWindowEx(0, BUTTON_CLASS, "DefPushButton", BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE,
10, 40, 150, 30, Wnd, NULL, AppInstance, NULL);
DPRINT("test 3");
CreateWindowEx(0, BUTTON_CLASS, "AutoRadioButton", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE,
10, 70, 150, 30, Wnd, NULL, AppInstance, NULL);
DPRINT("test 4");
CreateWindowEx(0, BUTTON_CLASS, "AutoCheckBox", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE,
10, 100, 150, 30, Wnd, NULL, AppInstance, NULL);
DPRINT("WM_CREATE (leave).");
return 0;
}
LRESULT CALLBACK TestWndProc(
HWND Wnd,
UINT Msg,
WPARAM wParam,
LPARAM lParam)
{
switch (Msg) {
case WM_CREATE:
return WmCreate(Wnd);
case WM_DESTROY:
PostQuitMessage(0);
return 0;
default:
return DefWindowProc(Wnd, Msg, wParam, lParam);
}
}
int STDCALL WinMain(
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nShowCmd)
{
ATOM Result;
MSG Msg;
HWND MainWindow;
WNDCLASSEX TestWndClass = {0};
DPRINT("Application starting up.");
// Remember instance handle.
AppInstance = GetModuleHandle(NULL);
// Register test window class.
TestWndClass.cbSize = sizeof(WNDCLASSEX);
TestWndClass.lpfnWndProc = &TestWndProc;
TestWndClass.hInstance = AppInstance;
TestWndClass.hCursor = LoadCursor(0, (LPCTSTR)IDC_ARROW);
TestWndClass.hbrBackground = CreateSolidBrush(RGB(255,255,230));
TestWndClass.lpszClassName = TEST_WND_CLASS;
Result = RegisterClassEx(&TestWndClass);
if (Result == 0) {
DPRINT("Error registering class.");
MessageBox(0, "Error registering test window class.",
"Button control test", MB_ICONSTOP | MB_OK);
ExitProcess(0);
}
// Create main window.
DPRINT("Creating main window.");
MainWindow = CreateWindowEx(WS_EX_APPWINDOW | WS_EX_CLIENTEDGE,
TEST_WND_CLASS, "Button test",
WS_OVERLAPPEDWINDOW, 50, 50, 180, 365,
NULL, NULL, AppInstance, NULL);
if (MainWindow == 0) {
DPRINT("Error creating main window.");
UnregisterClass(TEST_WND_CLASS, AppInstance);
MessageBox(0, "Error creating test window.",
"Static control test", MB_ICONSTOP | MB_OK);
ExitProcess(0);
}
DPRINT("Showing main window.");
ShowWindow(MainWindow, SW_SHOWNORMAL);
UpdateWindow(MainWindow);
// Run message loop.
DPRINT("Entering message loop.");
while (GetMessage(&Msg, NULL, 0, 0) > 0) {
TranslateMessage(&Msg);
DispatchMessage(&Msg);
}
// Unregister window class.
UnregisterClass(TEST_WND_CLASS, AppInstance);
DPRINT("Exiting.");
return Msg.wParam;
}

View File

@@ -1,6 +0,0 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -1,22 +0,0 @@
PATH_TO_TOP = ../../..
TARGET_NORC = yes
TARGET_TYPE = program
TARGET_APPTYPE = windows
TARGET_NAME = btntest2
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
# EOF

View File

@@ -1,219 +0,0 @@
#include <windows.h>
#include <stdio.h>
HFONT tf;
LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM);
int WINAPI
WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpszCmdLine,
int nCmdShow)
{
WNDCLASS wc;
MSG msg;
HWND hWnd;
HWND hbtn[26];
wc.lpszClassName = "ButtonTest";
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("ButtonTest",
"Button 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");
ShowWindow(hWnd, nCmdShow);
hbtn[0] = CreateWindow(
"BUTTON","BS_DEFPUSHBUTTON",WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON,
10, 10, 200, 40, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
hbtn[1] = CreateWindow(
"BUTTON","BS_3STATE",WS_VISIBLE | WS_CHILD | BS_3STATE,
10, 60, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
hbtn[2] = CreateWindow(
"BUTTON","BS_AUTO3STATE",WS_VISIBLE | WS_CHILD | BS_AUTO3STATE,
10, 90, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
hbtn[3] = CreateWindow(
"BUTTON","BS_AUTOCHECKBOX",WS_VISIBLE | WS_CHILD | BS_AUTOCHECKBOX,
10, 120, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
hbtn[4] = CreateWindow(
"BUTTON","BS_AUTORADIOBUTTON",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON,
10, 150, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
hbtn[5] = CreateWindow(
"BUTTON","BS_CHECKBOX",WS_VISIBLE | WS_CHILD | BS_CHECKBOX,
10, 180, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
hbtn[6] = CreateWindow(
"BUTTON","BS_GROUPBOX",WS_VISIBLE | WS_CHILD | BS_GROUPBOX,
10, 210, 200, 80, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
hbtn[7] = CreateWindow(
"BUTTON","BS_PUSHBUTTON",WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON,
20, 230, 180, 30, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
hbtn[8] = CreateWindow(
"BUTTON","BS_RADIOBUTTON",WS_VISIBLE | WS_CHILD | BS_RADIOBUTTON,
10, 300, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
hbtn[9] = CreateWindow(
"BUTTON","BS_AUTORADIOBUTTON",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON,
220, 160, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
hbtn[10] = CreateWindow(
"BUTTON","BS_DEFPUSHBUTTON|BS_BOTTOM",WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON | BS_BOTTOM,
220, 10, 250, 40, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
hbtn[11] = CreateWindow(
"BUTTON","BS_DEFPUSHBUTTON|BS_LEFT",WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON | BS_LEFT,
480, 10, 250, 40, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
hbtn[12] = CreateWindow(
"BUTTON","BS_DEFPUSHBUTTON|BS_RIGHT|BS_MULTILINE",WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON | BS_RIGHT |BS_MULTILINE,
740, 10, 150, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
hbtn[13] = CreateWindow(
"BUTTON","BS_AUTORADIOBUTTON|BS_TOP",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON | BS_TOP,
220, 60, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
// Other Combinations
hbtn[14] = CreateWindow(
"BUTTON","BS_AUTORADIOBUTTON|BS_BOTTOM|BS_MULTILINE",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON | BS_BOTTOM | BS_MULTILINE,
480, 60, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
hbtn[15] = CreateWindow(
"BUTTON","BS_AUTORADIOBUTTON|BS_LEFT",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON | BS_LEFT,
740, 80, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
hbtn[16] = CreateWindow(
"BUTTON","BS_AUTORADIOBUTTON|BS_RIGHT|BS_TOP",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON | BS_RIGHT | BS_TOP,
220, 130, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
hbtn[17] = CreateWindow(
"BUTTON","BS_AUTORADIOBUTTON|BS_TOP|BS_MULTILINE",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON | BS_TOP| BS_MULTILINE,
480, 130, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
hbtn[18] = CreateWindow(
"BUTTON","BS_AUTOCHECKBOX|BS_BOTTOM|BS_MULTILINE",WS_VISIBLE | WS_CHILD | BS_AUTOCHECKBOX | BS_BOTTOM | BS_MULTILINE,
740, 130, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
hbtn[19] = CreateWindow(
"BUTTON","BS_AUTOCHECKBOX|BS_TOP|BS_MULTILINE",WS_VISIBLE | WS_CHILD | BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE,
480, 190, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
hbtn[20] = CreateWindow(
"BUTTON","BS_AUTOCHECKBOX|BS_LEFT|BS_MULTILINE",WS_VISIBLE | WS_CHILD | BS_AUTOCHECKBOX | BS_LEFT | BS_MULTILINE,
220, 230, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
hbtn[21] = CreateWindow(
"BUTTON","BS_AUTOCHECKBOX|BS_RIGHT|BS_MULTILINE",WS_VISIBLE | WS_CHILD | BS_AUTOCHECKBOX | BS_RIGHT | BS_MULTILINE,
480, 240, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
hbtn[22] = CreateWindow(
"BUTTON","BS_GROUPBOX|BS_TOP",WS_VISIBLE | WS_CHILD | BS_GROUPBOX | BS_TOP,
10, 340, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
hbtn[23] = CreateWindow(
"BUTTON","BS_GROUPBOX|BS_BOTTOM",WS_VISIBLE | WS_CHILD | BS_GROUPBOX | BS_BOTTOM,
10, 410, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
hbtn[24] = CreateWindow(
"BUTTON","BS_GROUPBOXBOX|BS_LEFT",WS_VISIBLE | WS_CHILD | BS_GROUPBOX | BS_LEFT,
520, 340, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
hbtn[25] = CreateWindow(
"BUTTON","BS_GROUPBOX|BS_RIGHT|BS_BOTTOM",WS_VISIBLE | WS_CHILD | BS_GROUPBOX | BS_BOTTOM | BS_RIGHT,
300, 340, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
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;
switch(msg)
{
case WM_PAINT:
hDC = BeginPaint(hWnd, &ps);
SelectObject(hDC, tf);
EndPaint(hWnd, &ps);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
case WM_COMMAND:
switch(HIWORD(wParam))
{
case BN_CLICKED:
printf("BUTTON CLICKED !\n");
break;
case BN_DBLCLK:
printf("BUTTON DOUBLE-CLICKED !\n");
break;
case BN_PUSHED:
printf("BUTTON PUSHED !\n");
break;
case BN_PAINT:
printf("BUTTON PAINTED !\n");
break;
case BN_UNPUSHED:
printf("BUTTON UNPUSHED !\n");
break;
}
break;
default:
return DefWindowProc(hWnd, msg, wParam, lParam);
}
return 0;
}

View File

@@ -1,6 +0,0 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -1,20 +0,0 @@
PATH_TO_TOP = ../../..
TARGET_TYPE = program
TARGET_APPTYPE = windows
TARGET_NAME = capclock
TARGET_SDKLIBS = kernel32.a
TARGET_OBJECTS = capclock.o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
# EOF

View File

@@ -1,70 +0,0 @@
/* $Id: capclock.c,v 1.3 2003/11/14 17:13:16 weiden Exp $
*
* DESCRIPTION: Simple Win32 Caption Clock
* PROJECT : ReactOS (test applications)
* AUTHOR : Emanuele Aliberti
* DATE : 2003-09-03
* LICENSE : GNU GPL v2.0
*/
#include <windows.h>
#include <string.h>
UINT Timer = 1;
static BOOL CALLBACK DialogFunc(HWND,UINT,WPARAM,LPARAM);
static VOID CALLBACK TimerProc(HWND,UINT,UINT,DWORD);
INT STDCALL WinMain (HINSTANCE hinst, HINSTANCE hinstPrev, LPSTR lpCmdLine, INT nCmdShow)
{
WNDCLASS wc;
ZeroMemory (& wc, sizeof wc);
wc.lpfnWndProc = DefDlgProc;
wc.cbWndExtra = DLGWINDOWEXTRA;
wc.hInstance = hinst;
wc.hCursor = LoadCursor(NULL, (LPCTSTR)IDC_ARROW);
wc.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1);
wc.lpszClassName = "CapClock";
RegisterClass (& wc);
return DialogBox(hinst, MAKEINTRESOURCE(2), NULL, (DLGPROC) DialogFunc);
}
static int InitializeApp (HWND hDlg,WPARAM wParam, LPARAM lParam)
{
Timer = SetTimer (hDlg,Timer,1000,TimerProc);
TimerProc (hDlg,0,0,0);
return 1;
}
static BOOL CALLBACK DialogFunc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg)
{
case WM_INITDIALOG:
InitializeApp(hwndDlg,wParam,lParam);
return TRUE;
case WM_CLOSE:
KillTimer (hwndDlg,Timer);
EndDialog(hwndDlg,0);
return TRUE;
}
return FALSE;
}
static VOID CALLBACK TimerProc (HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime)
{
CHAR text [20];
SYSTEMTIME lt;
GetLocalTime (& lt);
wsprintf (
text,
"%d-%02d-%02d %02d:%02d:%02d",
lt.wYear,
lt.wMonth,
lt.wDay,
lt.wHour,
lt.wMinute,
lt.wSecond);
SetWindowText (hwnd, text);
}
/* EOF */

Binary file not shown.

Before

Width:  |  Height:  |  Size: 766 B

View File

@@ -1,52 +0,0 @@
#include <windows.h>
#include "../../../include/reactos/resource.h"
/* Icons */
1 ICON "capclock.ico"
/* Dialogs */
2 DIALOG 6, 18, 132, 0
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
FONT 8, "Microsoft Sans Serif"
BEGIN
END
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
/* Version information. */
VS_VERSION_INFO VERSIONINFO
FILEVERSION RES_UINT_FV_MAJOR,RES_UINT_FV_MINOR,RES_UINT_FV_REVISION,RES_UINT_FV_BUILD
PRODUCTVERSION RES_UINT_PV_MAJOR,RES_UINT_PV_MINOR,RES_UINT_PV_REVISION,RES_UINT_PV_BUILD
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", RES_STR_COMPANY_NAME
VALUE "FileDescription", "ReactOS W32 Caption Clock\0"
VALUE "FileVersion", RES_STR_PRODUCT_VERSION
VALUE "InternalName", "capclock\0"
VALUE "LegalCopyright", RES_STR_LEGAL_COPYRIGHT
VALUE "OriginalFilename", "capclock.exe\0"
VALUE "ProductName", RES_STR_PRODUCT_NAME
VALUE "ProductVersion", RES_STR_PRODUCT_VERSION
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END

View File

@@ -1,6 +0,0 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 B

View File

@@ -1,150 +0,0 @@
#include <windows.h>
#include <stdio.h>
#include "resource.h"
static int CaretWidth = 2;
static int CaretHeight = 16;
static int CharWidth = 10;
static int CharHeight = 16;
static HBITMAP CaretBitmap;
LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM);
int WINAPI
WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpszCmdLine,
int nCmdShow)
{
WNDCLASS wc;
MSG msg;
HWND hWnd;
CaretBitmap = LoadBitmap(hInstance, (LPCTSTR)IDB_CARET);
wc.lpszClassName = "CaretTestClass";
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_WINDOW;
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(wc.lpszClassName,
"Caret Test",
WS_OVERLAPPEDWINDOW,
0,
0,
200,
250,
NULL,
NULL,
hInstance,
NULL);
if (hWnd == NULL)
{
fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n",
GetLastError());
return(1);
}
ShowWindow(hWnd, nCmdShow);
while(GetMessage(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;
}
LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
POINT pt;
switch(msg)
{
case WM_ACTIVATE:
switch(LOWORD(wParam))
{
case WA_ACTIVE:
case WA_CLICKACTIVE:
if(!ShowCaret(hWnd))
DbgPrint("ShowCaret(0x%x)\n", hWnd);
break;
case WA_INACTIVE:
if(!HideCaret(hWnd))
DbgPrint("HideCaret(0x%x)\n", hWnd);
break;
}
break;
case WM_KEYDOWN:
if(!GetCaretPos(&pt))
{
DbgPrint("GetCaretPos() failed!\n");
break;
}
switch(wParam)
{
case VK_LEFT:
pt.x -= CharWidth;
break;
case VK_UP:
pt.y -= CharHeight;
break;
case VK_RIGHT:
pt.x += CharWidth;
break;
case VK_DOWN:
pt.y += CharHeight;
break;
}
if(!SetCaretPos(pt.x, pt.y))
DbgPrint("SetCaretPos() failed!\n");
break;
case WM_RBUTTONDOWN:
if(!CreateCaret(hWnd, CaretBitmap, 0, 0))
DbgPrint("CreateCaret() for window 0x%x failed!\n", hWnd);
else
if(!ShowCaret(hWnd))
DbgPrint("ShowCaret(0x%x)\n", hWnd);
break;
case WM_LBUTTONDOWN:
if(!CreateCaret(hWnd, (HBITMAP)0, CaretWidth, CaretHeight))
DbgPrint("CreateCaret() for window 0x%x failed!\n", hWnd);
else
if(!ShowCaret(hWnd))
DbgPrint("ShowCaret(0x%x)\n", hWnd);
break;
case WM_CREATE:
if(!CreateCaret(hWnd, (HBITMAP)0, CaretWidth, CaretHeight))
DbgPrint("CreateCaret() for window 0x%x failed!\n", hWnd);
else
if(!SetCaretPos(1, 1))
DbgPrint("SetCaretPos(%i, %i) failed!\n", 1, 1);
break;
case WM_DESTROY:
if(!DestroyCaret())
DbgPrint("DestroyCaret() failed!\n");
PostQuitMessage(0);
break;
default:
return DefWindowProc(hWnd, msg, wParam, lParam);
}
return 0;
}

View File

@@ -1,5 +0,0 @@
#include <defines.h>
#include <reactos/resource.h>
#include "resource.h"
IDB_CARET BITMAP DISCARDABLE "caret.bmp"

View File

@@ -1,23 +0,0 @@
# $Id: makefile,v 1.2 2003/11/14 17:13:16 weiden Exp $
PATH_TO_TOP = ../../..
TARGET_NORC = no
TARGET_TYPE = program
TARGET_APPTYPE = windows
TARGET_NAME = carets
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
# EOF

View File

@@ -1 +0,0 @@
#define IDB_CARET 101

View File

@@ -1,6 +0,0 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -1,6 +0,0 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -1,687 +0,0 @@
/* ComboBox Control Test for ReactOS.
* This is a test program. Not made to be fast, small
* easy to mantain, or portable.
* I'm not erasing text because I don't want to use other functions from the API
* or make this more complex. Also Fonts are not heavily used.
* This source code is in the PUBLIC DOMAIN and has NO WARRANTY.
* by Waldo Alvarez Ca<43>izares <wac at ghost.matcom.uh.cu>, started July 11, 2003. */
//#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include "utils.h"
#define CONTROLCLASS "COMBOBOX" /* the class name */
#define CONTROLCLASSW L"COMBOBOX" /* the class name in unicode*/
#define WINDOWWIDTH 560
#define WINDOWHEIGHT 350
/* --- Command IDs of some buttons --- */
#define CREATEWINDOW_ID 106
#define CREATEWINDOWEX_ID 107
#define CREATEWINDOWW_ID 108
#define INITPAGE_ID 400
#define SECONDPAGE_ID 401
#define BACKFIRSTPAGE_ID 402
/* --- Position where the result text goes --- */
#define ResultX 0
#define ResultY 305
/* --- Position where the notify text goes --- */
#define NOTIFYX 390
#define NOTIFYY 285
/* --- The width of most buttons --- */
#define CHECKBUTWIDTH 190
#define SCROLLAMOUNT -15
/* Size of buffer to hold resulting strings from conversion
and returned by messages */
#define BUFFERLEN 80
char TextBuffer[BUFFERLEN]={'R','e','s','u','l','t',':',' '};
HWND g_hwnd = NULL;
HINSTANCE g_hInst = NULL;
int pos = 10;
int n = 0;
int yButPos = 10;
int xButPos = 0;
DWORD ComboStyle = 0;
/* --- Control coordinates --- */
#define CONTROLPOSX 390
#define CONTROLPOSY 10
DWORD ControlWidth = 160;
DWORD ControlHeight = 150;
static RECT srect = {CONTROLPOSX,CONTROLPOSY,WINDOWWIDTH,WINDOWHEIGHT};
HWND hwndEdit = NULL;
RECT rect;
DWORD StartP,EndP;
HWND hwnd; /* main window handle */
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)
{
HDC hdc;
hdc = GetDC (g_hwnd);
SelectObject (hdc, GetStockObject (SYSTEM_FIXED_FONT));
TextOut (hdc, x,y,Text,len);
ReleaseDC (g_hwnd, hdc);
ValidateRect (g_hwnd, &rect);
}
static
VOID
HandlePrintReturnHex(HWND handle,DWORD Msg,WPARAM wParam,LPARAM lParam)
{
LRESULT ret;
RECT rect;
ret = SendMessage(handle,Msg,wParam,lParam);
htoa((unsigned int)ret,&TextBuffer[8]);
GetWindowRect(g_hwnd,&rect);
PrintTextXY(TextBuffer,ResultX,ResultY,16,rect);
}
static
VOID
HandlePrintReturnStr(HWND handle,DWORD Msg,WPARAM wParam,LPARAM lParam)
{
LRESULT ret;
RECT rect;
TextBuffer[8] = (char)(BUFFERLEN - 8); /* Setting the max size to put chars in first byte */
ret = SendMessage(handle,Msg,wParam,lParam);
GetWindowRect(g_hwnd,&rect);
PrintTextXY(TextBuffer,ResultX,ResultY,8+(int)ret,rect);
}
static
VOID
HandlePrintRect(HWND handle,DWORD Msg,WPARAM wParam,LPARAM lParam)
{
RECT rect;
TextBuffer[8] = (char)(BUFFERLEN - 8); /* Setting the max size to put chars in first byte */
SendMessage(handle,Msg,wParam,lParam);
htoa(rect.top,&TextBuffer[8]);
TextBuffer[8+8] = ' ';
htoa(rect.bottom,&TextBuffer[8+8+1]);
TextBuffer[8+8+8+1] = ' ';
htoa(rect.left,&TextBuffer[8+8+8+1+1]);
TextBuffer[8+8+8+8+1+1] = ' ';
htoa(rect.right,&TextBuffer[8+8+8+8+1+1+1]);
GetWindowRect(g_hwnd,&rect);
PrintTextXY(TextBuffer,ResultX,ResultY,8+4*9-1,rect);
}
struct
{
char* Text; /* Text for the button */
DWORD MsgCode; /* Message Code */
WPARAM wParam; /* Well hope you can understand this */
LPARAM lParam; /* ditto */
LPFUNCTIONHANDLER Handler; /* Funtion called to handle the result of each message */
}
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*/
/* What a message, why M$ decided to implement his thing ? */
{"CB_DIR - drives",CB_DIR,DDL_DRIVES,
/* Hoping that most machines have this */
(LPARAM)"C:\\",
&HandlePrintReturnHex},
{"CB_DIR - dirs",CB_DIR,DDL_DIRECTORY,(LPARAM)"C:\\*",&HandlePrintReturnHex},
{"CB_DIR - files",CB_DIR,
DDL_ARCHIVE | DDL_EXCLUSIVE | DDL_HIDDEN | DDL_READONLY | DDL_READWRITE | DDL_SYSTEM,
(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_GETCOMBOBOXINFO",CB_GETCOMBOBOXINFO,0,0,&HandlePrintReturnHex, winXP & .net server remember to handle the struct */
{"CB_GETCOUNT",CB_GETCOUNT,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_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_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_SETDROPPEDWIDTH",CB_SETDROPPEDWIDTH,250,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,
* the combobox is using style cbs_dropdown
* and the pointer is over the edit box then the mouse pointer is not changed
* to an arrow
*/
{"CB_SETHORIZONTALEXTENT",CB_SETHORIZONTALEXTENT,500,0,&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_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_SETTOPINDEX",CB_SETTOPINDEX,3,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},
{"WM_PASTE",WM_PASTE,0,0,&HandlePrintReturnHex},
};
#define MAXMESSAGEBUTTONS 40
struct
{
char* Name; /* Text for the button */
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}
};
/* The number of check buttons we have.
* Maybe some calculations at compile time would be better
*/
#define NUMBERCHECKS 17
#define NUMBERBUTTONS NUMBERCHECKS + 7
HWND Buttons[NUMBERBUTTONS];
HWND MessageButtons[MAXMESSAGEBUTTONS];
HWND Back1But,Back2But;
HWND NextBut;
HWND
CreateCheckButton(const char* lpWindowName, DWORD xSize, DWORD id)
{
HWND h;
h = CreateWindowEx(0,
"BUTTON",
lpWindowName,
WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
xButPos, /* x */
yButPos, /* y */
xSize, /* nWidth */
20, /* nHeight */
g_hwnd,
(HMENU) id,
g_hInst,
NULL
);
yButPos += 21;
return h;
}
HWND
CreatePushButton(const char* lpWindowName, DWORD xSize, DWORD id,DWORD Style)
{
HWND h = CreateWindow("BUTTON",
lpWindowName,
WS_CHILD | BS_PUSHBUTTON | Style,
xButPos, /* x */
yButPos, /* y */
xSize, /* nWidth */
20, /* nHeight */
g_hwnd,
(HMENU) id,
g_hInst,
NULL
);
yButPos += 21;
return h;
}
VOID
ReadNHide()
{
int i;
ComboStyle = 0;
for (i=0 ; i< NUMBERCHECKS ; i++)
{
if(BST_CHECKED == SendMessage(Buttons[i],BM_GETCHECK,0,0))
ComboStyle |= Styles[i].Code;
ShowWindow(Buttons[i],SW_HIDE);
}
for (; i< NUMBERBUTTONS ; i++)ShowWindow(Buttons[i],SW_HIDE);
for (i=0 ; i< 26 ; i++) ShowWindow(MessageButtons[i],SW_SHOW);
ShowWindow(Back1But,SW_SHOW);
ShowWindow(NextBut,SW_SHOW);
}
VOID
ForwardToSecondPage()
{
int i;
for (i=0;i<26;i++)ShowWindow(MessageButtons[i],SW_HIDE);
for(;i<MAXMESSAGEBUTTONS;i++)ShowWindow(MessageButtons[i],SW_SHOW);
ShowWindow(Back2But,SW_SHOW);
ShowWindow(Back1But,SW_HIDE);
ShowWindow(NextBut,SW_HIDE);
}
VOID
BackToFirstPage()
{
int i;
for (i=0;i<26;i++)ShowWindow(MessageButtons[i],SW_SHOW);
for(;i<MAXMESSAGEBUTTONS;i++)ShowWindow(MessageButtons[i],SW_HIDE);
ShowWindow(Back2But,SW_HIDE);
ShowWindow(Back1But,SW_SHOW);
ShowWindow(NextBut,SW_SHOW);
}
VOID
BackToInitialPage()
{
int i;
DestroyWindow(hwndEdit);
for (i=0 ; i< NUMBERBUTTONS ; i++) {ShowWindow(Buttons[i],SW_SHOW);}
for (i=0;i<26;i++)ShowWindow(MessageButtons[i],SW_HIDE);
ShowWindow(Back1But,SW_HIDE);
ShowWindow(NextBut,SW_HIDE);
}
LRESULT
CALLBACK
WndProc ( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
{
int i;
switch ( msg )
{
case WM_CREATE:
g_hwnd = hwnd;
/* ---- Initial page ---- */
for (i = 0 ; i < 14 ; i++)
Buttons[i] = CreateCheckButton(Styles[i].Name,CHECKBUTWIDTH,500+i);
xButPos += CHECKBUTWIDTH + 10;
yButPos = 10;
for (; i < NUMBERCHECKS ; i++)
Buttons[i] = CreateCheckButton(Styles[i].Name,CHECKBUTWIDTH,500+i);
Buttons[i++] = CreatePushButton("Width +",70,100,WS_VISIBLE);
Buttons[i++] = CreatePushButton("Width -",70,101,WS_VISIBLE);
Buttons[i++] = CreatePushButton("Heigth +",70,102,WS_VISIBLE);
Buttons[i++] = CreatePushButton("Heigth -",70,103,WS_VISIBLE);
Buttons[i++] = CreatePushButton("CreateWindowA",CHECKBUTWIDTH,CREATEWINDOW_ID,WS_VISIBLE);
Buttons[i++] = CreatePushButton("CreateWindowExA",CHECKBUTWIDTH,CREATEWINDOWEX_ID,WS_VISIBLE);
Buttons[i++] = CreatePushButton("CreateWindowExW",CHECKBUTWIDTH,CREATEWINDOWW_ID,WS_VISIBLE);
/* ---- The 1st page of buttons ---- */
xButPos = 0;
yButPos = 10;
for (i = 0 ; i < 14 ; i++)
MessageButtons[i] = CreatePushButton(Msg[i].Text,CHECKBUTWIDTH,600+i,0);
xButPos += CHECKBUTWIDTH + 10;
yButPos = 10;
for (; i < 26 ; i++)
MessageButtons[i] = CreatePushButton(Msg[i].Text,CHECKBUTWIDTH,600+i,0);
Back1But = CreatePushButton("Back - destroys ComboBox",CHECKBUTWIDTH,INITPAGE_ID,0);
NextBut = CreatePushButton("Next",CHECKBUTWIDTH,SECONDPAGE_ID,0);
/* ---- The 2nd page of buttons ------*/
xButPos = 0;
yButPos = 10;
for (; i<40; i++)
MessageButtons[i] = CreatePushButton(Msg[i].Text,CHECKBUTWIDTH,600+i,0);
xButPos += CHECKBUTWIDTH + 10;
yButPos = 10;
for (; i < MAXMESSAGEBUTTONS ; i++)
MessageButtons[i] = CreatePushButton(Msg[i].Text,CHECKBUTWIDTH,600+i,0);
Back2But = CreatePushButton("Back",CHECKBUTWIDTH,BACKFIRSTPAGE_ID,0);
break;
case WM_COMMAND:
if (LOWORD(wParam) >= 600)
{
Msg[LOWORD(wParam)-600].Handler(hwndEdit,
Msg[LOWORD(wParam)-600].MsgCode,
Msg[LOWORD(wParam)-600].wParam,
Msg[LOWORD(wParam)-600].lParam);
break;
}
switch(LOWORD(wParam)){
case 100:
ControlWidth += 10;
break;
case 101:
ControlWidth -= 10;
break;
case 102:
ControlHeight += 10;
break;
case 103:
ControlHeight -= 10;
break;
case INITPAGE_ID:
BackToInitialPage();
break;
case SECONDPAGE_ID:
ForwardToSecondPage();
break;
case BACKFIRSTPAGE_ID:
BackToFirstPage();
break;
case CREATEWINDOW_ID:
ReadNHide();
srect.top = CONTROLPOSY + ControlHeight;
hwndEdit = CreateWindow(CONTROLCLASS,
NULL,
ComboStyle | WS_CHILD | WS_VISIBLE,
CONTROLPOSX,
CONTROLPOSY,
ControlWidth,
ControlHeight,
g_hwnd,
NULL,
g_hInst,
NULL);
break;
case CREATEWINDOWEX_ID:
ReadNHide();
srect.top = CONTROLPOSY + ControlHeight;
hwndEdit = CreateWindowEx(WS_EX_CLIENTEDGE,
CONTROLCLASS,
NULL,
ComboStyle | WS_CHILD | WS_VISIBLE ,
CONTROLPOSX,
CONTROLPOSY,
ControlWidth,
ControlHeight,
g_hwnd,
NULL,
g_hInst,
NULL);
break;
case CREATEWINDOWW_ID:
ReadNHide();
srect.top = CONTROLPOSY + ControlHeight;
hwndEdit = CreateWindowExW(WS_EX_CLIENTEDGE,
CONTROLCLASSW,
NULL,
ComboStyle | WS_CHILD | WS_VISIBLE ,
CONTROLPOSX,
CONTROLPOSY,
ControlWidth,
ControlHeight,
g_hwnd,
NULL,
g_hInst,
NULL);
break;
}
if (lParam == (LPARAM)hwndEdit)
switch(HIWORD(wParam))
{
case CBN_DROPDOWN:
ScrollWindow (hwnd, 0, SCROLLAMOUNT, &srect, &srect);
PrintTextXY("CBN_DROPDOWN notification",NOTIFYX,NOTIFYY,25,srect);
break;
case CBN_CLOSEUP:
ScrollWindow (hwnd, 0, SCROLLAMOUNT, &srect, &srect);
PrintTextXY("CBN_CLOSEUP notification",NOTIFYX,NOTIFYY,24,srect);
break;
case CBN_DBLCLK:
ScrollWindow (hwnd, 0, SCROLLAMOUNT, &srect, &srect);
PrintTextXY("CBN_DBLCLK notification",NOTIFYX,NOTIFYY,23,srect);
break;
case CBN_EDITCHANGE:
ScrollWindow (hwnd, 0, SCROLLAMOUNT, &srect, &srect);
PrintTextXY("CBN_EDITCHANGE notification",NOTIFYX,NOTIFYY,27,srect);
break;
case CBN_ERRSPACE:
ScrollWindow (hwnd, 0, SCROLLAMOUNT, &srect, &srect);
PrintTextXY("CBN_ERRSPACE notification",NOTIFYX,NOTIFYY,25,srect);
break;
case CBN_KILLFOCUS:
ScrollWindow (hwnd, 0, SCROLLAMOUNT, &srect, &srect);
PrintTextXY("CBN_KILLFOCUS notification",NOTIFYX,NOTIFYY,26,srect);
break;
case CBN_EDITUPDATE:
ScrollWindow (hwnd, 0, SCROLLAMOUNT, &srect, &srect);
PrintTextXY("CBN_EDITUPDATE notification",NOTIFYX,NOTIFYY,27,srect);
break;
case CBN_SELCHANGE:
ScrollWindow (hwnd, 0, SCROLLAMOUNT, &srect, &srect);
PrintTextXY("CBN_SELCHANGE notification",NOTIFYX,NOTIFYY,26,srect);
break;
case CBN_SELENDCANCEL:
ScrollWindow (hwnd, 0, SCROLLAMOUNT, &srect, &srect);
PrintTextXY("CBN_SELENDCANCEL notification",NOTIFYX,NOTIFYY,29,srect);
break;
case CBN_SETFOCUS:
ScrollWindow (hwnd, 0, SCROLLAMOUNT, &srect, &srect);
PrintTextXY("CBN_SETFOCUS notification",NOTIFYX,NOTIFYY,25,srect);
break;
case CBN_SELENDOK:
ScrollWindow (hwnd, 0, SCROLLAMOUNT, &srect, &srect);
PrintTextXY("CBN_SELENDOK notification",NOTIFYX,NOTIFYY,25,srect);
break;
}
return DefWindowProc ( hwnd, msg, wParam, lParam );
case WM_MEASUREITEM:
ScrollWindow (hwnd, 0, SCROLLAMOUNT, &srect, &srect);
PrintTextXY("WM_MEASUREITEM called",NOTIFYX,NOTIFYY,21,srect);
break;
case WM_COMPAREITEM:
ScrollWindow (hwnd, 0, SCROLLAMOUNT, &srect, &srect);
PrintTextXY("WM_COMPAREITEM called",NOTIFYX,NOTIFYY,21,srect);
break;
case WM_DRAWITEM:
ScrollWindow (hwnd, 0, SCROLLAMOUNT, &srect, &srect);
PrintTextXY("WM_DRAWITEM called",NOTIFYX,NOTIFYY,18,srect);
break;
case WM_SIZE :
return 0;
case WM_CLOSE:
DestroyWindow (g_hwnd);
return 0;
case WM_QUERYENDSESSION:
return 0;
case WM_DESTROY:
PostQuitMessage(0);
return 0;
}
return DefWindowProc ( hwnd, msg, wParam, lParam );
}
HWND
RegisterAndCreateWindow (HINSTANCE hInst,
const char* className,
const char* title)
{
WNDCLASSEX wc;
g_hInst = hInst;
wc.cbSize = sizeof (WNDCLASSEX);
wc.lpfnWndProc = WndProc; /* window procedure */
wc.hInstance = hInst; /* owner of the class */
wc.lpszClassName = className;
wc.hCursor = LoadCursor ( 0, (LPCTSTR)IDC_ARROW );
wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
wc.style = CS_HREDRAW | CS_VREDRAW;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hIcon = 0;
wc.hIconSm = 0;
wc.lpszMenuName = 0;
if ( !RegisterClassEx ( &wc ) )
return NULL;
hwnd = CreateWindowEx (
0, /* dwStyleEx */
className, /* class name */
title, /* window title */
WS_OVERLAPPEDWINDOW, /* dwStyle */
1, /* x */
1, /* y */
WINDOWWIDTH, /* width */
WINDOWHEIGHT, /* height */
NULL, /* hwndParent */
NULL, /* hMenu */
hInst,
0
);
if (!hwnd) return NULL;
ShowWindow (hwnd, SW_SHOW);
UpdateWindow (hwnd);
return hwnd;
}
int
WINAPI
WinMain ( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdParam, int cmdShow )
{
char className [] = "ComboBox Control Test";
MSG msg;
RegisterAndCreateWindow ( hInst, className, "ComboBox Control Test" );
while (GetMessage (&msg, NULL, 0, 0))
{
TranslateMessage (&msg);
DispatchMessage (&msg);
}
return (int)msg.wParam;
}

View File

@@ -1,25 +0,0 @@
PATH_TO_TOP = ../../..
TARGET_NORC = yes
TARGET_TYPE = program
TARGET_APPTYPE = windows
TARGET_NAME = combotst
TARGET_SDKLIBS = kernel32.a gdi32.a
TARGET_OBJECTS = \
combotst.o \
utils.o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
# EOF

View File

@@ -1,33 +0,0 @@
/*
* Edit Control Test for ReactOS, quick n' dirty. There you go
* This source code is in the PUBLIC DOMAIN and has NO WARRANTY.
* by Waldo Alvarez Ca<43>izares <wac at ghost.matcom.uh.cu>, June 22, 2003.
*/
#include <windows.h>
static const char hexvals[] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
VOID htoa (unsigned int val, char *buf)
{
int i;
buf += 7;
for (i=0;i<8;i++)
{
*buf-- = hexvals[val & 0x0000000F];
val = val >> 4;
}
}
VOID strcpy_(char *dst, const char *src)
{
const char* p = src;
while ((*dst++ = *p++)) {}
}
VOID strcpyw_(wchar_t* dst,wchar_t* src)
{
const wchar_t* p = src;
while ((*dst++ = *p++)) {}
}

View File

@@ -1,9 +0,0 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
VOID htoa (unsigned int, char *);
VOID strcpy_(char *, const char *);
VOID strcpyw_(wchar_t*,wchar_t*);
#ifdef __cplusplus
}
#endif

View File

@@ -1,6 +0,0 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -1,21 +0,0 @@
# $Id: Makefile,v 1.8 2003/11/14 17:13:16 weiden Exp $
PATH_TO_TOP = ../../..
TARGET_NORC = yes
TARGET_TYPE = program
TARGET_APPTYPE = console
TARGET_NAME = consume
TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
# EOF

View File

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

View File

@@ -1,6 +0,0 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -1,21 +0,0 @@
# $Id: Makefile,v 1.2 2003/11/14 17:13:16 weiden Exp $
PATH_TO_TOP = ../../..
TARGET_NORC = yes
TARGET_TYPE = program
TARGET_APPTYPE = console
TARGET_NAME = copymove
TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -Wall -Werror
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
# EOF

View File

@@ -1,303 +0,0 @@
/*
* CopyFile, MoveFile and related routines test
*/
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <tchar.h>
#include <windows.h>
static TCHAR
FindOtherDrive()
{
DWORD drives = GetLogicalDrives();
BOOL found = FALSE;
TCHAR drive;
TCHAR rootdir[] = _T( "?:\\" );
TCHAR currentdir[MAX_PATH + 1];
if (0 != GetCurrentDirectory(MAX_PATH + 1, currentdir)) {
for (drive = _T('A'); ! found && drive <= _T('Z'); drive++) {
if (0 != (drives & (1 << (drive - _T('A'))))&&
drive != _totupper(currentdir[0])) {
rootdir[0] = drive;
found = (DRIVE_FIXED == GetDriveType(rootdir));
}
}
}
return found ? drive - 1 : _T( ' ' );
}
static void
DeleteTestFile(LPCTSTR filename)
{
SetFileAttributes(filename, FILE_ATTRIBUTE_NORMAL);
DeleteFile(filename);
}
static void
CreateTestFile(LPCTSTR filename, DWORD attributes)
{
HANDLE file;
char buffer[4096];
DWORD wrote;
int c;
DeleteTestFile(filename);
file = CreateFile(filename,
GENERIC_READ | GENERIC_WRITE,
0,
NULL,
CREATE_ALWAYS,
0,
0);
if (INVALID_HANDLE_VALUE == file) {
fprintf(stderr, "CreateFile failed with code %lu\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());
exit(1);
}
CloseHandle(file);
if (! SetFileAttributes(filename, attributes)) {
fprintf(stderr, "SetFileAttributes failed with code %lu\n", GetLastError());
exit(1);
}
}
static void
DeleteTestDir(LPCTSTR dirname)
{
RemoveDirectory(dirname);
}
static void
CreateTestDir(LPCTSTR dirname)
{
if (! CreateDirectory(dirname, NULL)) {
fprintf(stderr, "CreateDirectory failed with code %lu\n", GetLastError());
exit(1);
}
}
static void
CheckTestFile(LPCTSTR filename, DWORD attributes)
{
HANDLE file;
char buffer[4096];
DWORD read;
int c;
DWORD diskattr;
file = CreateFile(filename,
GENERIC_READ,
0,
NULL,
OPEN_EXISTING,
0,
0);
if (INVALID_HANDLE_VALUE == file) {
fprintf(stderr, "CreateFile failed with code %lu\n", GetLastError());
exit(1);
}
if (! ReadFile(file, buffer, sizeof(buffer), &read, NULL)) {
fprintf(stderr, "ReadFile failed with code %lu\n", GetLastError());
exit(1);
}
if (read != sizeof(buffer)) {
fprintf(stderr, "Trying to read %u bytes but got %lu 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);
exit(1);
}
}
CloseHandle(file);
diskattr = GetFileAttributes(filename);
if (INVALID_FILE_ATTRIBUTES == diskattr) {
fprintf(stderr, "GetFileAttributes failed with code %lu\n", GetLastError());
exit(1);
}
if (diskattr != attributes) {
fprintf(stderr, "Attribute mismatch, expected 0x%08lx found 0x%08lx\n", attributes, diskattr);
exit(1);
}
}
int
main(int argc, char *argv[])
{
TCHAR otherdrive;
TCHAR otherfile[ ] = _T("?:\\other.dat");
otherdrive = FindOtherDrive();
printf("Testing simple move\n");
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());
exit(1);
}
CheckTestFile(_T("end.dat"), FILE_ATTRIBUTE_ARCHIVE);
DeleteTestFile(_T("end.dat"));
printf("Testing move of non-existing file\n");
DeleteTestFile(_T("begin.dat"));
DeleteTestFile(_T("end.dat"));
if (MoveFile(_T("begin.dat"), _T("end.dat"))) {
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());
exit(1);
}
DeleteTestFile(_T("end.dat"));
/* Not correctly implemented in ros, destination file is kept open after this */
#if 0
printf("Testing move to existing file\n");
CreateTestFile(_T("begin.dat"), FILE_ATTRIBUTE_ARCHIVE);
CreateTestFile(_T("end.dat"), FILE_ATTRIBUTE_ARCHIVE);
if (MoveFile(_T("begin.dat"), _T("end.dat"))) {
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());
exit(1);
}
DeleteTestFile(_T("begin.dat"));
DeleteTestFile(_T("end.dat"));
#endif
/* Not implemented yet in ros */
#if 0
printf("Testing directory move\n");
CreateTestDir(_T("begin"));
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());
exit(1);
}
CheckTestFile(_T("end\\file.dat"), FILE_ATTRIBUTE_NORMAL);
DeleteTestFile(_T("end\\file.dat"));
DeleteTestDir(_T("end"));
#endif
printf("Testing file move to different directory\n");
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());
exit(1);
}
CheckTestFile(_T("end\\file.dat"), FILE_ATTRIBUTE_ARCHIVE);
DeleteTestFile(_T("end\\file.dat"));
DeleteTestDir(_T("end"));
printf("Testing move of read-only file\n");
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());
exit(1);
}
CheckTestFile(_T("end.dat"), FILE_ATTRIBUTE_ARCHIVE | FILE_ATTRIBUTE_READONLY);
DeleteTestFile(_T("end.dat"));
printf("Testing move to different drive\n");
if (_T(' ') != otherdrive) {
otherfile[0] = otherdrive;
CreateTestFile(_T("begin.dat"), FILE_ATTRIBUTE_ARCHIVE);
DeleteTestFile(otherfile);
if (! MoveFile(_T("begin.dat"), otherfile)) {
fprintf(stderr, "MoveFile failed with code %lu\n", GetLastError());
exit(1);
}
CheckTestFile(otherfile, FILE_ATTRIBUTE_ARCHIVE);
DeleteTestFile(otherfile);
} else {
printf(" Test skipped, no other drive available\n");
}
printf("Testing move/overwrite of existing file\n");
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());
exit(1);
}
DeleteTestFile(_T("begin.dat"));
DeleteTestFile(_T("end.dat"));
/* Not (correctly) implemented in ros yet */
#if 0
printf("Testing move/overwrite of existing readonly file\n");
CreateTestFile(_T("begin.dat"), FILE_ATTRIBUTE_ARCHIVE);
CreateTestFile(_T("end.dat"), FILE_ATTRIBUTE_READONLY);
if (MoveFileEx(_T("begin.dat"), _T("end.dat"), MOVEFILE_REPLACE_EXISTING)) {
fprintf(stderr, "MoveFileEx succeeded but shouldn't have\n");
exit(1);
} else if (ERROR_ALREADY_EXISTS != GetLastError() &&
ERROR_ACCESS_DENIED != GetLastError()) {
fprintf(stderr, "MoveFileEx failed with unexpected code %lu\n", GetLastError());
exit(1);
}
DeleteTestFile(_T("begin.dat"));
DeleteTestFile(_T("end.dat"));
#endif
/* Not implemented in ros yet */
#if 0
printf("Testing move to different drive without COPY_ALLOWED\n");
if (_T(' ') != otherdrive) {
otherfile[0] = otherdrive;
CreateTestFile(_T("begin.dat"), FILE_ATTRIBUTE_ARCHIVE);
DeleteTestFile(otherfile);
if (MoveFileEx(_T("begin.dat"), otherfile, 0)) {
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());
exit(1);
}
DeleteTestFile(otherfile);
} else {
printf(" Test skipped, no other drive available\n");
}
#endif
printf("Testing move to different drive with COPY_ALLOWED\n");
if (_T(' ') != otherdrive) {
otherfile[0] = otherdrive;
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());
exit(1);
}
CheckTestFile(otherfile, FILE_ATTRIBUTE_ARCHIVE);
DeleteTestFile(otherfile);
} else {
printf(" Test skipped, no other drive available\n");
}
printf("All tests successfully completed\n");
return 0;
}

View File

@@ -1,6 +0,0 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -1,23 +0,0 @@
# $Id: Makefile,v 1.7 2003/11/14 17:13:16 weiden Exp $
PATH_TO_TOP = ../../..
TARGET_NORC = yes
TARGET_TYPE = program
TARGET_APPTYPE = console
TARGET_NAME = count
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
# EOF

View File

@@ -1,15 +0,0 @@
/* $Id: count.c,v 1.2 2003/11/14 17:13:16 weiden Exp $
*
*/
#include <stdio.h>
int n = 0;
int
main (int argc, char * argv [])
{
while (1) printf ("%d ", n ++ );
return (0);
}
/* EOF */

View File

@@ -1,6 +0,0 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -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

View File

@@ -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;
}

View File

@@ -1,6 +0,0 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -1,196 +0,0 @@
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#define CELL_SIZE 10
static RGBQUAD Colors[] =
{
{ 0x00, 0x00, 0x00, 0x00 }, // black
{ 0x00, 0x00, 0x80, 0x00 }, // red
{ 0x00, 0x80, 0x00, 0x00 }, // green
{ 0x00, 0x80, 0x80, 0x00 }, // brown
{ 0x80, 0x00, 0x00, 0x00 }, // blue
{ 0x80, 0x00, 0x80, 0x00 }, // magenta
{ 0x80, 0x80, 0x00, 0x00 }, // cyan
{ 0x80, 0x80, 0x80, 0x00 }, // dark gray
{ 0xc0, 0xc0, 0xc0, 0x00 }, // light gray
{ 0x00, 0x00, 0xFF, 0x00 }, // bright red
{ 0x00, 0xFF, 0x00, 0x00 }, // bright green
{ 0x00, 0xFF, 0xFF, 0x00 }, // bright yellow
{ 0xFF, 0x00, 0x00, 0x00 }, // bright blue
{ 0xFF, 0x00, 0xFF, 0x00 }, // bright magenta
{ 0xFF, 0xFF, 0x00, 0x00 }, // bright cyan
{ 0xFF, 0xFF, 0xFF, 0x00 } // bright white
};
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 = "DibTestClass";
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("DibTestClass",
"DIB Test",
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT,
CW_USEDEFAULT,
25 * CELL_SIZE + 5,
25 * CELL_SIZE + 20,
NULL,
NULL,
hInstance,
NULL);
if (hWnd == NULL)
{
fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n",
GetLastError());
return(1);
}
ShowWindow(hWnd, nCmdShow);
while(GetMessage(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;
}
static void PaintCells(HDC WindowDC, WORD BitCount1, WORD BitCount2,
int XDest, int YDest)
{
HBRUSH Brush;
RECT Rect;
UINT row, col;
BITMAPINFO *BitmapInfo;
HBITMAP DIB1, DIB2;
HDC DC1, DC2;
BitmapInfo = malloc(sizeof(BITMAPINFO) + 15 * sizeof(RGBQUAD));
BitmapInfo->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
BitmapInfo->bmiHeader.biWidth = 4 * CELL_SIZE + 9;
BitmapInfo->bmiHeader.biHeight = -(4 * CELL_SIZE + 9); // it's top down (since BI_RGB is used, the sign is operative of direction)
BitmapInfo->bmiHeader.biPlanes = 1;
BitmapInfo->bmiHeader.biBitCount = BitCount1;
BitmapInfo->bmiHeader.biCompression = BI_RGB;
BitmapInfo->bmiHeader.biSizeImage = 0;
BitmapInfo->bmiHeader.biXPelsPerMeter = 0;
BitmapInfo->bmiHeader.biYPelsPerMeter = 0;
BitmapInfo->bmiHeader.biClrUsed = 16;
BitmapInfo->bmiHeader.biClrImportant = 16;
for (col = 0; col < 16; col++) {
BitmapInfo->bmiColors[col] = Colors[col];
}
DIB1 = CreateDIBSection(NULL, BitmapInfo, DIB_RGB_COLORS, NULL, NULL, 0);
DC1 = CreateCompatibleDC(NULL);
SelectObject(DC1, DIB1);
BitmapInfo->bmiHeader.biBitCount = BitCount2;
DIB2 = CreateDIBSection(NULL, BitmapInfo, DIB_RGB_COLORS, NULL, NULL, 0);
DC2 = CreateCompatibleDC(NULL);
SelectObject(DC2, DIB2);
free(BitmapInfo);
/* Now paint on the first bitmap */
for (row = 0; row < 4; row++)
{
for (col = 0; col < 4; col++)
{
Brush = CreateSolidBrush(RGB(Colors[4 * row + col].rgbRed,
Colors[4 * row + col].rgbGreen,
Colors[4 * row + col].rgbBlue));
Rect.left = CELL_SIZE * col + 5;
Rect.top = CELL_SIZE * row + 5;
Rect.right = Rect.left + CELL_SIZE;
Rect.bottom = Rect.top + CELL_SIZE;
FillRect(DC1, &Rect, Brush);
DeleteObject(Brush);
}
}
/* Copy the first bitmap to the second */
BitBlt(DC2, 4, 4, 4 * CELL_SIZE, 4 * CELL_SIZE, DC1, 5, 5, SRCCOPY);
/* Show results on screen */
BitBlt(WindowDC, XDest, YDest, 4 * CELL_SIZE, 4 * CELL_SIZE, DC2, 4, 4, SRCCOPY);
}
LRESULT CALLBACK MainWndProc(HWND Wnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
PAINTSTRUCT ps;
HDC WindowDC;
switch(msg)
{
case WM_PAINT:
WindowDC = BeginPaint(Wnd, &ps);
PaintCells(WindowDC, 4, 4, 0, 0);
PaintCells(WindowDC, 4, 8, 5 * CELL_SIZE, 0);
PaintCells(WindowDC, 4, 16, 10 * CELL_SIZE, 0);
PaintCells(WindowDC, 4, 24, 15 * CELL_SIZE, 0);
PaintCells(WindowDC, 4, 32, 20 * CELL_SIZE, 0);
PaintCells(WindowDC, 8, 4, 0, 5 * CELL_SIZE);
PaintCells(WindowDC, 8, 8, 5 * CELL_SIZE, 5 * CELL_SIZE);
PaintCells(WindowDC, 8, 16, 10 * CELL_SIZE, 5 * CELL_SIZE);
PaintCells(WindowDC, 8, 24, 15 * CELL_SIZE, 5 * CELL_SIZE);
PaintCells(WindowDC, 8, 32, 20 * CELL_SIZE, 5 * CELL_SIZE);
PaintCells(WindowDC, 16, 4, 0, 10 * CELL_SIZE);
PaintCells(WindowDC, 16, 8, 5 * CELL_SIZE, 10 * CELL_SIZE);
PaintCells(WindowDC, 16, 16, 10 * CELL_SIZE, 10 * CELL_SIZE);
PaintCells(WindowDC, 16, 24, 15 * CELL_SIZE, 10 * CELL_SIZE);
PaintCells(WindowDC, 16, 32, 20 * CELL_SIZE, 10 * CELL_SIZE);
PaintCells(WindowDC, 24, 4, 0, 15 * CELL_SIZE);
PaintCells(WindowDC, 24, 8, 5 * CELL_SIZE, 15 * CELL_SIZE);
PaintCells(WindowDC, 24, 16, 10 * CELL_SIZE, 15 * CELL_SIZE);
PaintCells(WindowDC, 24, 24, 15 * CELL_SIZE, 15 * CELL_SIZE);
PaintCells(WindowDC, 24, 32, 20 * CELL_SIZE, 15 * CELL_SIZE);
PaintCells(WindowDC, 32, 4, 0, 20 * CELL_SIZE);
PaintCells(WindowDC, 32, 8, 5 * CELL_SIZE, 20 * CELL_SIZE);
PaintCells(WindowDC, 32, 16, 10 * CELL_SIZE, 20 * CELL_SIZE);
PaintCells(WindowDC, 32, 24, 15 * CELL_SIZE, 20 * CELL_SIZE);
PaintCells(WindowDC, 32, 32, 20 * CELL_SIZE, 20 * CELL_SIZE);
EndPaint(Wnd, &ps);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
default:
return DefWindowProc(Wnd, msg, wParam, lParam);
}
return 0;
}

View File

@@ -1,23 +0,0 @@
# $Id: makefile,v 1.3 2003/11/14 17:13:16 weiden Exp $
PATH_TO_TOP = ../../..
TARGET_NORC = yes
TARGET_TYPE = program
TARGET_APPTYPE = windows
TARGET_NAME = dibtest
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
# EOF

View File

@@ -1,6 +0,0 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -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;
}

View File

@@ -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

View File

@@ -1,21 +0,0 @@
PATH_TO_TOP = ../../..
TARGET_NORC = no
TARGET_TYPE = program
TARGET_APPTYPE = windows
TARGET_NAME = dirdlg
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
# EOF

View File

@@ -1,6 +0,0 @@
#define IDD_MAIN 101
#define IDC_OK 1
#define IDC_CANCEL 2
#define IDC_DIRS 100
#define IDC_DIREDIT 101

View File

@@ -1,6 +0,0 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -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;
}

View File

@@ -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

View File

@@ -1,6 +0,0 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -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;
}

View File

@@ -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

View File

@@ -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;
}

View File

@@ -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

View File

@@ -1,6 +0,0 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

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