Compare commits

..

1288 Commits

Author SHA1 Message Date
Gé van Geldorp
b5a5946810 Merge 15334:15712 from trunk (but don't activate xmlbuild)
svn path=/branches/xen/; revision=15713
2005-06-01 16:27:21 +00:00
Alex Ionescu
c5bf36a5de Fix some debug messages (do I need to patch this to wine?)
svn path=/trunk/; revision=15712
2005-06-01 01:59:05 +00:00
Alex Ionescu
18aa07be14 Fix some debug messages
svn path=/trunk/; revision=15711
2005-06-01 01:56:55 +00:00
Magnus Olsen
bf6e782ee1 small optimze for StretchBlt
now do only getpixel ones instead call hole time on getpixel for the color value when it stretch to biger BMP
the hole stretchblt need to be optimze this code are geting it working bit faster and it is reference implementation

svn path=/trunk/; revision=15710
2005-05-31 23:58:14 +00:00
Gé van Geldorp
17d0c2f684 Small present for ion
svn path=/trunk/; revision=15709
2005-05-31 22:06:18 +00:00
Gé van Geldorp
1d88ea31d0 Update to xen-unstable 1.1602
svn path=/branches/xen/; revision=15708
2005-05-31 21:40:24 +00:00
Klemens Friedl
2764274eb7 update wallpaper list
svn path=/trunk/; revision=15707
2005-05-31 20:47:11 +00:00
Casper Hornstrup
46fc8e6a4c Delete
svn path=/trunk/; revision=15706
2005-05-31 20:40:27 +00:00
Casper Hornstrup
f892959c3d MP configuration
svn path=/trunk/; revision=15705
2005-05-31 20:39:13 +00:00
Magnus Olsen
0a91aa1d44 strechblt
gain very lite perfomen boost

svn path=/trunk/; revision=15704
2005-05-31 19:44:36 +00:00
Casper Hornstrup
b4dae62ae5 Generate SMP friendly temporary filenames
svn path=/trunk/; revision=15703
2005-05-31 17:30:54 +00:00
Magnus Olsen
e346b7e2ce complete dummy hal
svn path=/trunk/; revision=15702
2005-05-31 15:46:26 +00:00
Magnus Olsen
64d4d57449 Fix a bugin strechblt. it can now zoom in or out in any bpp
still this need todo
/* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
/* This is a reference implementation, it hasn't been optimized for speed */



svn path=/trunk/; revision=15701
2005-05-31 15:19:10 +00:00
Hartmut Birr
63843d944f - Added a missing dereferencing in NtTerminateProcess.
- Don't access already freed memory while sending messages to the termination port (in PspExitThread).

svn path=/trunk/; revision=15700
2005-05-31 15:01:29 +00:00
Hartmut Birr
9029590177 Try always to open a file as named object first.
This is necessary for the redirection to NUL which is used by the new build system.

svn path=/trunk/; revision=15699
2005-05-31 14:56:55 +00:00
Hartmut Birr
17b55d1d60 Changed the indentation to a more readable format (no other changes).
svn path=/trunk/; revision=15698
2005-05-31 14:51:53 +00:00
Magnus Olsen
e79b3bf80c implement strechblt for all 8bpp this code are not optimze.
tested with winquake 8bpp to 16/32bpp. 
/* FIXME :  MaskOrigin, BrushOrigin, ClipRegion, Mode ? */
/* This is a reference implementation, it hasn't been optimized for speed */

svn path=/trunk/; revision=15697
2005-05-31 14:11:02 +00:00
Hervé Poussineau
48af34a807 Add registry entries for serial mouse driver
svn path=/trunk/; revision=15696
2005-05-31 13:49:41 +00:00
Hervé Poussineau
eddf35ba2a Don't try to detect serial ports at known I/O addresses. They have to be written in registry and enumerated by Root bus enumerator.
Get interrupt informations from AllocatedResourcesTranslated in IRP_MN_START_DEVICE

svn path=/trunk/; revision=15695
2005-05-31 10:35:22 +00:00
James Tabor
907751c162 Change Xml from msafd32.dll to msafd.dll.
svn path=/trunk/; revision=15694
2005-05-31 08:02:29 +00:00
Hartmut Birr
c46482a139 Build a correct console handle.
svn path=/trunk/; revision=15693
2005-05-30 23:22:15 +00:00
Hervé Poussineau
361b320cf8 Read resource requirements list for devices enumerated by Root bus
svn path=/trunk/; revision=15692
2005-05-30 23:01:37 +00:00
Hervé Poussineau
13ffb8ef14 Write resource requirements list in the registry, instead of its address
svn path=/trunk/; revision=15691
2005-05-30 22:55:09 +00:00
Gé van Geldorp
12628f673c Work around problem in wrc
svn path=/trunk/; revision=15690
2005-05-30 21:35:07 +00:00
Gé van Geldorp
e163d454bc Revert last change, it was causing build problems. Go back to causing run
problems instead (try Start/Run/Browse)

svn path=/trunk/; revision=15689
2005-05-30 20:37:29 +00:00
Hartmut Birr
1fac54757a Check for a valid console handle.
svn path=/trunk/; revision=15688
2005-05-30 20:13:35 +00:00
Hartmut Birr
e3d66fd5c6 - Don't duplicate the process handle.
- Do close the process and thread handle if the caller doesn't request it.

svn path=/trunk/; revision=15687
2005-05-30 20:11:44 +00:00
Aleksey Bragin
277b2da899 Add translation for "Templates" by unC0Rr
svn path=/trunk/; revision=15686
2005-05-30 19:45:04 +00:00
Gé van Geldorp
9948c2bbfa Revert some incorrect changes that were made during rbuild merge
svn path=/trunk/; revision=15685
2005-05-30 19:19:06 +00:00
Aleksey Bragin
1e05d99733 Added russian translation for lib/userenv. Done by Dimtry Philippov.
svn path=/trunk/; revision=15684
2005-05-30 18:46:49 +00:00
Filip Navara
61cbda4605 Don't lock the primary surface just to get info we already have.
svn path=/trunk/; revision=15681
2005-05-30 13:00:50 +00:00
Filip Navara
5417e5d19c Add MSVFW32 and MSWSOCK to the build.
svn path=/trunk/; revision=15680
2005-05-30 12:52:38 +00:00
Filip Navara
b84060f8e3 Remove redundant line...
svn path=/trunk/; revision=15679
2005-05-30 08:12:30 +00:00
Magnus Olsen
3eedff3253 fix winquake color glitc bug
the text are now whie instead for black

svn path=/trunk/; revision=15678
2005-05-30 07:27:22 +00:00
Magnus Olsen
30976b41c4 add rospref to defualt build
and remove a makefile that is not need it 
patch By WaxDragon

svn path=/trunk/; revision=15677
2005-05-29 22:33:25 +00:00
Gé van Geldorp
f46df32f70 Prevent kernel32.dll and winmm.dll from overlapping
svn path=/trunk/; revision=15676
2005-05-29 21:40:17 +00:00
Aleksey Bragin
554f18954d Added WS_VSCROLL to a language selection combobox (thx to unC0Rr)
svn path=/trunk/; revision=15675
2005-05-29 21:16:29 +00:00
Magnus Olsen
8c2b8755dc remove old makefile add xml makefile
svn path=/trunk/; revision=15674
2005-05-29 21:00:11 +00:00
Magnus Olsen
9cd1969b76 fix expand.exe compile and include on the bootcd
svn path=/trunk/; revision=15673
2005-05-29 20:58:38 +00:00
Alex Ionescu
4286032cc7 Fix function bug
svn path=/trunk/; revision=15672
2005-05-29 20:49:56 +00:00
Hervé Poussineau
7599760096 Read device instance IDs in registry instead of forcing 0000. This allows more than one instance for each device enumerated by Root bus.
Be ready to have resource requirements for each device instance (not used ATM)
Replace some ExAllocatePool/ExFreePool with ExAllocatePoolWithTag/ExFreePoolWithTag

svn path=/trunk/; revision=15671
2005-05-29 19:48:43 +00:00
Alex Ionescu
39e84ca95f Wrappers for debug builds only, like before.
svn path=/trunk/; revision=15670
2005-05-29 19:41:24 +00:00
Gé van Geldorp
045a7df56c Don't build as Unicode
svn path=/trunk/; revision=15669
2005-05-29 19:06:30 +00:00
Casper Hornstrup
3444049ffb Install explorer-cfg-template.xml
svn path=/trunk/; revision=15668
2005-05-29 16:07:35 +00:00
Alex Ionescu
0e1269ee48 Build at 2GB like before
svn path=/trunk/; revision=15667
2005-05-29 16:07:05 +00:00
Hartmut Birr
a67e88ab21 Change the object to non permanent if an error occurs (in NtCreateDirectoryObject).
svn path=/trunk/; revision=15666
2005-05-29 15:43:53 +00:00
Hartmut Birr
6ec730fc4c Reset the permanent flag if the object is changed to non permanent.
svn path=/trunk/; revision=15665
2005-05-29 15:41:24 +00:00
Hartmut Birr
717888776f Lock the directory while it is parsed.
svn path=/trunk/; revision=15664
2005-05-29 15:37:47 +00:00
Magnus Olsen
2c5946dd01 remove some unse Makefile.ros-template files
not longer need it

svn path=/trunk/; revision=15663
2005-05-29 15:17:38 +00:00
Filip Navara
8b4668efce Set entry point to zero.
svn path=/trunk/; revision=15662
2005-05-29 15:10:11 +00:00
Casper Hornstrup
f5fdc514d3 vgamp.sys, not vgamp.dll
svn path=/trunk/; revision=15661
2005-05-29 15:05:22 +00:00
Casper Hornstrup
ba885106f7 Install to system32
svn path=/trunk/; revision=15660
2005-05-29 14:51:17 +00:00
Casper Hornstrup
3cb2f38e73 Install more modules
svn path=/trunk/; revision=15659
2005-05-29 14:35:36 +00:00
Gé van Geldorp
204cfe40fe Use standard debug macros
svn path=/trunk/; revision=15658
2005-05-29 14:26:21 +00:00
Casper Hornstrup
93d4234a07 regsvr32.exe, not regsvr32.dll
svn path=/trunk/; revision=15657
2005-05-29 14:09:04 +00:00
Casper Hornstrup
750ce3d65a Autodetect nasm
svn path=/trunk/; revision=15656
2005-05-29 11:51:37 +00:00
Martin Fuchs
66500a1428 implement 'delete' command
svn path=/trunk/; revision=15655
2005-05-29 11:42:46 +00:00
Martin Fuchs
32ec815105 switch to SHFileOperation() for file copy and move operations
svn path=/trunk/; revision=15654
2005-05-29 09:58:47 +00:00
Martin Fuchs
ff58b88eaf handle copy/move for already existing target directories
svn path=/trunk/; revision=15653
2005-05-29 09:39:31 +00:00
Martin Fuchs
02fa1a2b59 implement file copying
svn path=/trunk/; revision=15652
2005-05-29 08:47:23 +00:00
Martin Fuchs
2a46b799fc refresh display after executing a context menu command
svn path=/trunk/; revision=15651
2005-05-29 08:38:23 +00:00
Filip Navara
5c43578bfd Fix ASSERT conditions.
svn path=/trunk/; revision=15650
2005-05-29 07:29:59 +00:00
Magnus Olsen
d593712681 remove some ros-tempöate from old building system
svn path=/trunk/; revision=15649
2005-05-29 01:04:44 +00:00
Thomas Bluemel
d1d04bc6c6 fix gcc4 warnings
svn path=/trunk/; revision=15648
2005-05-29 00:04:41 +00:00
Magnus Olsen
89f3ea02c7 this two file are not need any longer
svn path=/trunk/; revision=15647
2005-05-28 23:38:58 +00:00
Magnus Olsen
7e6a4cd48c Remove two file that are not need any longer
fix some compilings warings

svn path=/trunk/; revision=15646
2005-05-28 23:34:24 +00:00
Alex Ionescu
de71d516e8 disable assert until someone fixes this
svn path=/trunk/; revision=15645
2005-05-28 23:26:37 +00:00
Magnus Olsen
54805d4cf5 mising desk.rc in the xml files
de.rc and cz.rc a resuse id was change 

svn path=/trunk/; revision=15644
2005-05-28 23:16:12 +00:00
Alex Ionescu
2ca6508908 More fixes from yours truly
svn path=/trunk/; revision=15643
2005-05-28 23:06:49 +00:00
Alex Ionescu
a2efaabdcd more build fixes
svn path=/trunk/; revision=15642
2005-05-28 22:56:14 +00:00
Alex Ionescu
0ba1f085f1 more build fixes
svn path=/trunk/; revision=15641
2005-05-28 22:48:33 +00:00
Thomas Bluemel
3574d717a4 little fix
svn path=/trunk/; revision=15640
2005-05-28 22:40:04 +00:00
James Tabor
ad652aad95 Added usbuhci to xml file.
svn path=/trunk/; revision=15639
2005-05-28 22:25:51 +00:00
James Tabor
397ca71b9f Added usbohci to xml file.
svn path=/trunk/; revision=15638
2005-05-28 22:25:29 +00:00
James Tabor
a2497ea64c Added usbehci to xml file.
svn path=/trunk/; revision=15637
2005-05-28 22:25:09 +00:00
James Tabor
39b694fcf3 Added usb miniport to xml file.
svn path=/trunk/; revision=15636
2005-05-28 22:24:22 +00:00
James Tabor
8a624fa286 Added usb miniport to xml file.
svn path=/trunk/; revision=15635
2005-05-28 22:23:51 +00:00
Thomas Bluemel
12e17e01f0 make rbuild compile with gcc4
svn path=/trunk/; revision=15634
2005-05-28 22:22:25 +00:00
Alex Ionescu
2db9bd4682 Fix some build problems
svn path=/trunk/; revision=15633
2005-05-28 22:18:44 +00:00
Martin Fuchs
9a4b9913ce fix case problem of sv.rc third (and hopefully last ;-) time for unix+windows builds
svn path=/trunk/; revision=15632
2005-05-28 22:12:40 +00:00
Gé van Geldorp
bf1ac08f8f Make compiler happy
svn path=/trunk/; revision=15631
2005-05-28 22:08:49 +00:00
Gé van Geldorp
99a53a6f13 Robert Shearman <rob@codeweavers.com>
- Rename DllRegisterServer and DllUnregisterServer to avoid confusion
  with the COM functions of different signatures.

svn path=/trunk/; revision=15630
2005-05-28 22:04:24 +00:00
Gé van Geldorp
2ba2487f4b Alexandre Julliard <julliard@winehq.org>
- Added rules for building import libraries in the individual dll
  makefiles, and added support for building a .def.a static import
  library too.
- Removed unnecessary code in the 16-bit DllEntryPoint function of some
  dlls, and also fixed its ordinal in a few places.
Mike McCormack <mike@codeweavers.com>
- Make WINMM_IData statically allocated.
- Make multimedia threads high priority.
Robert Reif <reif@earthlink.net>
- Change FIXME to WARN.
- Set thread priority for timer thread.
- Add timer thread priority test.

svn path=/trunk/; revision=15629
2005-05-28 22:01:15 +00:00
James Tabor
ae660b3636 Added def to xml file.
svn path=/trunk/; revision=15628
2005-05-28 22:00:46 +00:00
James Tabor
bcc09d453e Added def to xml file.
svn path=/trunk/; revision=15627
2005-05-28 22:00:27 +00:00
Alex Ionescu
da2d081ecb use right optimization setting
svn path=/trunk/; revision=15626
2005-05-28 21:46:37 +00:00
Gé van Geldorp
9259eba707 Alexandre Julliard <julliard@winehq.org>
- Added rules for building import libraries in the individual dll
  makefiles, and added support for building a .def.a static import
  library too.
Troy Rollo <wine@troy.rollo.name>
- Implement URLMonikerImpl_BindToStorage.
- Correct bug truncating downloaded files to 4096 bytes.
Jacek Caban <jack@itma.pwr.wroc.pl>
- Separated IBinding and IMoniker interfaces.
Mike McCormack <mike@codeweavers.com>
- Add the missing interface method PromptAction to
  IInternetZoneManager.
- Stub implementation for GetSoftwareUpdateInfo.
Francois Gouget <fgouget@free.fr>
- Update win32.api to match the current sources.
- Declare CoGetClassObjectFromURL() in urlmon.h.
Christian Costa <titan.costa@wanadoo.fr>
- Added stub implementation for CoGetClassObjectFromURL.

svn path=/trunk/; revision=15625
2005-05-28 21:44:21 +00:00
James Tabor
d07eefd752 Temp Fix until I figure out what is wrong with Asserts.
svn path=/trunk/; revision=15624
2005-05-28 21:40:01 +00:00
Gé van Geldorp
dfe4710889 Alexandre Julliard <julliard@winehq.org>
- Added rules for building import libraries in the individual dll
  makefiles, and added support for building a .def.a static import
  library too.
Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
- Test cases for URL_UNESCAPE and small fix.
Francois Gouget <fgouget@free.fr>
- Assorted spelling fixes.

svn path=/trunk/; revision=15623
2005-05-28 21:39:03 +00:00
James Tabor
3c412fecf4 Add Usbport to new build system.
svn path=/trunk/; revision=15622
2005-05-28 21:38:59 +00:00
James Tabor
b39c62c8bb Add Usbport to new build system.
svn path=/trunk/; revision=15621
2005-05-28 21:38:05 +00:00
Gé van Geldorp
74c1a38507 Alexandre Julliard <julliard@winehq.org>
- Added rules for building import libraries in the individual dll
  makefiles, and added support for building a .def.a static import
  library too.
Robert Shearman <rob@codeweavers.com>
- Rename MODULENAME_Dll* functions to Dll* for better consistency and
  type checking.
Vincent Beron <vberon@mecano.gme.usherb.ca>
- Use SUBLANG_NEUTRAL for French resources.

svn path=/trunk/; revision=15620
2005-05-28 21:34:33 +00:00
Magnus Olsen
e9c01796ad fix compilings warings
svn path=/trunk/; revision=15619
2005-05-28 21:32:23 +00:00
James Tabor
522e3d74e0 Add Usbhub to new build system.
svn path=/trunk/; revision=15618
2005-05-28 21:30:37 +00:00
Gé van Geldorp
05e1c2d4b7 Ge van Geldorp <gvg@reactos.com>
- Overlay icons for .lnk files with a small arrow in the lower left
  corner.
Alexandre Julliard <julliard@winehq.org>
- Added rules for building import libraries in the individual dll
  makefiles, and added support for building a .def.a static import
  library too.
- Removed unnecessary code in the 16-bit DllEntryPoint function of some
  dlls, and also fixed its ordinal in a few places.
- Comment out stub WEP entry points so that we can call WEP for builtin
  dlls too.
Juan Lang <juan_lang@yahoo.com>
- Fixes to IShellFolder::GetAttributesOf implementations, spotted by
  silverblade_:
  - a count of zero is allowed to GetAttributesOf if apidl is NULL
  - SFGAO_VALIDATE must be cleared upon return
- only log unsupported flags in ShellExecute
- environment variables are expanded, so SEE_MASK_DOENVSUBST is
  supported
Michael Jung <mjung@iss.tu-darmstadt.de>
- Add a new CLSID for UnixDosFolder, which is identical to UnixFolder,
  but does unix <-> dos path conversion for GetDisplayNameOf and
  ParseDisplayName.
- Make the root of the shell extension map to the root of the unix
  filesystem.
- More robustly query the SHGDN_FORPARSING flag in the shell32's folders
  GetDisplayNameOf methods.
- Fixed GetDisplayNameOf method to not depend on incorrect behaviour
  regarding the SHGDN_INFOLDER flag.
- Fixed MyComputer's GetDisplayNameOf method.
- Return a cloned PIDL by SHBrowseForFolder to avoid heap corruption.
- Fixed incorrect IShellFolder::EnumOjects API usage.
- Support for regular files (as opposed to directories).
- Display a drive icon for the unix root directory.
- Consider only the GIL_FORSHORTCUT flag in SIC_CompareEntries.
Stefan Doesinger <stefandoesinger@gmx.at>
- Handle cidl==0 in shfldr_desktop, shfldr_fs and shfldr_mycomp.
- Remove the dwAttributes member from the IGenericSFImpl class, it's
  not needed and can't be initialised in Initialize and InitializeEx.
Mike McCormack <mike@codeweavers.com>
- Split SHGetFileInfoW into two functions.
- Remove static variables in SHBrowseForFolder implementation.
- Split up the window procedure.
- Remove some unused include files.
- MSI advertised shortcuts don't require a product ID.
Peter Berg Larsen <pebl@math.ku.dk>
- Rewritten DoEnvironmentSubst16.
Kouji Sasaki <taro-x@justsystem.co.jp>
- Added the processing for determination of SFGAO_HASSUBFOLDER flag in
  SHELL32_GetItemAttribute function.
Francois Gouget <fgouget@free.fr>
- Assorted spelling fixes.
Huw Davies <huw@codeweavers.com>
- It makes no sense to have a left pointing arrow as the desktop icon.
  Replace it with something more appropiate.
Mike Hearn <mh@codeweavers.com>
- Fix SHELL_GetPathFromIDList[AW] to return the desktop path given an
  empty PIDL.

svn path=/trunk/; revision=15617
2005-05-28 21:30:32 +00:00
James Tabor
1a3b44f52a Add Usbd to new build system.
svn path=/trunk/; revision=15616
2005-05-28 21:30:02 +00:00
James Tabor
eeec0bf547 Add Usb Directory to new build system.
svn path=/trunk/; revision=15615
2005-05-28 21:29:20 +00:00
James Tabor
edd06a247e Add Usb Directory to new build system.
svn path=/trunk/; revision=15614
2005-05-28 21:28:11 +00:00
Magnus Olsen
a205dac113 remove soem warings for optimze build
svn path=/trunk/; revision=15613
2005-05-28 21:16:34 +00:00
Aleksey Bragin
282184ee88 Added vfatxlib support in the new build system
svn path=/trunk/; revision=15612
2005-05-28 21:08:56 +00:00
Magnus Olsen
a8575f00b3 check see if the fix have alread be done
fix secon time right unix case

svn path=/trunk/; revision=15610
2005-05-28 20:21:07 +00:00
Martin Fuchs
da712a816d fix unix build
svn path=/trunk/; revision=15609
2005-05-28 20:07:55 +00:00
Martin Fuchs
8262f1f8b1 remove duplicate file
svn path=/trunk/; revision=15608
2005-05-28 20:06:29 +00:00
Casper Hornstrup
a17b3fbff0 Remove unneeded files
svn path=/trunk/; revision=15607
2005-05-28 19:47:04 +00:00
Filip Navara
078f2e9f5f Fix a warning.
svn path=/trunk/; revision=15606
2005-05-28 19:38:54 +00:00
Casper Hornstrup
d11c96fa89 Add example of how to find the prefix
svn path=/trunk/; revision=15605
2005-05-28 19:38:17 +00:00
Casper Hornstrup
f4ad6d109c Use detected prefix
svn path=/trunk/; revision=15604
2005-05-28 19:35:23 +00:00
Filip Navara
080f82f9b4 Fix a few warnings...
svn path=/trunk/; revision=15603
2005-05-28 19:33:26 +00:00
Magnus Olsen
370ff8fa5f fix linux build
svn path=/trunk/; revision=15602
2005-05-28 19:24:13 +00:00
Filip Navara
b7166fefeb Define __NO_CTYPE_INLINES.
svn path=/trunk/; revision=15600
2005-05-28 18:45:55 +00:00
Casper Hornstrup
8d5843e406 -mi switch for rbuild to not have rbuild create install directories.
svn path=/trunk/; revision=15599
2005-05-28 18:43:25 +00:00
Magnus Olsen
ec7a4788aa fix compiling error
services\umpnpmgr\umpnpmgr.c:43:1: "DBG" redefined
<command line>:5:1: this is the location of the previous definition
make3: *** [obj-i386\services\umpnpmgr\umpnpmgr.o] Error 1

svn path=/trunk/; revision=15598
2005-05-28 18:13:11 +00:00
Casper Hornstrup
a330b25482 Correct documentation for ROS_PREFIX. Spotted by Sylvain Petreolle [spetreolle@yahoo.fr].
svn path=/trunk/; revision=15597
2005-05-28 18:10:26 +00:00
Hervé Poussineau
9d3eed8967 Use C99 syntax instead of C89 syntax because some compilers are not smart enough to detect and remove dead code
svn path=/trunk/; revision=15596
2005-05-28 17:45:01 +00:00
Martin Fuchs
60f7fbe06e fix pattern matching
svn path=/trunk/; revision=15595
2005-05-28 17:35:08 +00:00
Alex Ionescu
7717d6cb1a build acpi with w32api
svn path=/trunk/; revision=15594
2005-05-28 17:23:33 +00:00
Alex Ionescu
cd37d4427a Put dbg=1 as default again
svn path=/trunk/; revision=15593
2005-05-28 17:17:27 +00:00
Martin Fuchs
ee52bbdc1b implement file filtering (matching file name patterns and file types)
svn path=/trunk/; revision=15592
2005-05-28 17:13:56 +00:00
Casper Hornstrup
4828e6eaa4 Add depends target as suggested by Martin Fuchs
svn path=/trunk/; revision=15591
2005-05-28 16:51:42 +00:00
Filip Navara
cec1358fb1 Remove "assert" macro.
svn path=/trunk/; revision=15590
2005-05-28 16:47:15 +00:00
Alex Ionescu
c5d7317110 Build with optimizations
svn path=/trunk/; revision=15589
2005-05-28 16:43:25 +00:00
Alex Ionescu
0173e06e40 Build with optimizations
svn path=/trunk/; revision=15588
2005-05-28 16:42:50 +00:00
Alex Ionescu
bc13deab3b fix verbose setting
svn path=/trunk/; revision=15587
2005-05-28 16:34:23 +00:00
Casper Hornstrup
a9702af5a0 Support install target in proxy
svn path=/trunk/; revision=15586
2005-05-28 16:12:46 +00:00
Alex Ionescu
ae5e4b8581 Fix packet lib so it builds
svn path=/trunk/; revision=15585
2005-05-28 15:50:30 +00:00
KJK::Hyperion
28d278bd08 Workaround for GCC inline assembly bug, hopefully fixed for good. Builds for me in both checked and free
Bug details and status here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10153


svn path=/trunk/; revision=15584
2005-05-28 15:41:09 +00:00
Casper Hornstrup
2990d277fb Merge 12735:15568 from xmlbuildsystem branch
svn path=/trunk/; revision=15583
2005-05-28 15:18:30 +00:00
Gé van Geldorp
f9ef57f5f1 Sync to Wine-20050524:
Alexandre Julliard <julliard@winehq.org>
- Added rules for building import libraries in the individual dll
  makefiles, and added support for building a .def.a static import
  library too.
- Comment out stub WEP entry points so that we can call WEP for builtin
  dlls too.
- Removed unnecessary code in the 16-bit DllEntryPoint function of some
  dlls, and also fixed its ordinal in a few places.
Hans Leidekker <hans@it.vu.nl>
- Stub implementation for SetupCopyOEMInfW.
Ivan Leo Puoti <ivanleo@gmail.com>
- Minor fix in SetupQueueCopySectionW.

svn path=/trunk/; revision=15582
2005-05-28 15:14:29 +00:00
Gé van Geldorp
020f1fc22b Sync to Wine-20050524:
Alexandre Julliard <julliard@winehq.org>
- Added rules for building import libraries in the individual dll
  makefiles, and added support for building a .def.a static import
  library too.
Vincent Beron <vberon@mecano.gme.usherb.ca>
- Provide minimal API documentation in advapi/eventlog.c to silence some
  winapi_check output.
- Move around functions in riched20, richedit and rpcrt4 to achieve the
  same goal.
Robert Shearman <rob@codeweavers.com>
- Fix RpcServerListen so that it doesn't return
  RPC_S_ALREADY_LISTENING when the only interfaces it is listening on
  are auto listens.
- Only synchronize with server thread when necessary and move this
  into RpcMgmtWaitServerListen.
Francois Gouget <fgouget@free.fr>
- Tweak the API documentation to silence winapi_check warnings.
Hartmut Birr <hartmut.birr@gmx.de>
- Clean up if named pipe is not available.
  (merge back from WineHQ)

svn path=/trunk/; revision=15581
2005-05-28 15:04:47 +00:00
Hervé Poussineau
98b2118f6b Activate NtGdiRealizePalette code and minor fixes
by Greatlord

svn path=/trunk/; revision=15580
2005-05-28 14:56:02 +00:00
Gé van Geldorp
0474d63d02 Sync to Wine-20050524:
Alexandre Julliard <julliard@winehq.org>
- Added rules for building import libraries in the individual dll
  makefiles, and added support for building a .def.a static import
  library too.
Vincent Beron <vberon@mecano.gme.usherb.ca>
- Provide minimal API documentation in advapi/eventlog.c to silence some
  winapi_check output.
- Move around functions in riched20, richedit and rpcrt4 to achieve the
  same goal.

svn path=/trunk/; revision=15579
2005-05-28 14:42:07 +00:00
Gé van Geldorp
9a3e5b9dad Sync to Wine-20050524:
Alexandre Julliard <julliard@winehq.org>
- Added rules for building import libraries in the individual dll
  makefiles, and added support for building a .def.a static import
  library too.
Ivan Leo Puoti <ivanleo@gmail.com>
- Fix crash in ME_GetRunSizeCommon(). Turn a FIXME into a TRACE.
Michael Stefaniuc <mstefani@redhat.de>
- Change an assert to a WARN.
Hannu Valtonen <Hannu.Valtonen@hut.fi>
- Use correct background color for the whole richedit control.
- Implement EM_LINESCROLL message handling
- Fix a problem with scrolling over the end of the text in
  WM_WHEELMOUSE.
Vincent Beron <vberon@mecano.gme.usherb.ca>
- Provide minimal API documentation in advapi/eventlog.c to silence some
  winapi_check output.
- Move around functions in riched20, richedit and rpcrt4 to achieve the
  same goal.
Krzysztof Foltman <wdev@foltman.com>
- Added stubs for a couple of missing 2.0 and 3.0 messages.
Phil Krylov <phil@newstar.rinet.ru>
- Fixed an error in my previous commit which caused an infinite loop in
  IE6 installer.

svn path=/trunk/; revision=15578
2005-05-28 14:40:26 +00:00
Magnus Olsen
8264539518 Implement NtGdiAnimatePalette (partly ripped from Wine)
by hpussin

svn path=/trunk/; revision=15577
2005-05-28 12:43:26 +00:00
Maarten Bosma
6cb9982a26 discription of the lists
svn path=/trunk/; revision=15576
2005-05-28 12:15:11 +00:00
Filip Navara
c5fc491484 There's no point in keeping two almost identical packet drivers in the SVN.
svn path=/trunk/; revision=15575
2005-05-28 11:38:11 +00:00
Filip Navara
f48663be6d Bye, bye "include/net/" directory...
svn path=/trunk/; revision=15574
2005-05-28 11:34:33 +00:00
Filip Navara
6b4900eb87 - Move LAN headers out of main include directory.
- Add few missing functions to ndis.h.

svn path=/trunk/; revision=15573
2005-05-28 11:30:26 +00:00
Filip Navara
9087951c85 Remove old NDIS headers.
svn path=/trunk/; revision=15572
2005-05-28 11:15:08 +00:00
Filip Navara
36043fe728 Cleanup AFD headers a bit.
svn path=/trunk/; revision=15571
2005-05-28 11:10:27 +00:00
Filip Navara
72742963f5 Use W32API.
svn path=/trunk/; revision=15570
2005-05-28 11:09:53 +00:00
Filip Navara
827234d64e Use W32API.
svn path=/trunk/; revision=15569
2005-05-28 11:09:34 +00:00
Casper Hornstrup
61768ec813 Add missing separators to RBUILD_XXX_OUT variables.
Patch by Mike Lerwill [mlist@ml-solutions.co.uk]


svn path=/branches/xmlbuildsystem/; revision=15568
2005-05-28 10:41:13 +00:00
Maarten Bosma
e550f533e4 !say
svn path=/trunk/; revision=15567
2005-05-28 10:23:48 +00:00
Gé van Geldorp
1768f9ec6b Sync to Wine-20050524:
Alexandre Julliard <julliard@winehq.org>
- Added rules for building import libraries in the individual dll
  makefiles, and added support for building a .def.a static import
  library too.
Robert Shearman <rob@codeweavers.com>
- Rename MODULENAME_Dll* functions to Dll* for better consistency and
  type checking.

svn path=/trunk/; revision=15566
2005-05-28 09:38:59 +00:00
Maarten Bosma
02c5fdf8d3 ArchBackmann readme. Allmost the same as http://reactos.com/wiki/index.php/ArchBlackmann
svn path=/trunk/; revision=15565
2005-05-28 09:38:28 +00:00
Gé van Geldorp
4b5e84217d Sync to Wine-20050524:
Alexandre Julliard <julliard@winehq.org>
- Added rules for building import libraries in the individual dll
  makefiles, and added support for building a .def.a static import
  library too.
Vincent Beron <vberon@mecano.gme.usherb.ca>
- Use SUBLANG_NEUTRAL for French resources.

svn path=/trunk/; revision=15564
2005-05-28 09:37:01 +00:00
Gé van Geldorp
873d2a6ee8 Sync to Wine-20050524:
Alexandre Julliard <julliard@winehq.org>
- Added rules for building import libraries in the individual dll
  makefiles, and added support for building a .def.a static import
  library too.
Michael Stefaniuc <mstefani@redhat.de>
- Reimplement VarMul(). It can multiply now all variants that the native
  (WinXP) function supports too.
- Fix VariantChangeType: calls to VarDecFromCy and VarDecFromDisp had
  source and destination swapped.
Richard Cohen <richard@daijobu.co.uk>
- Remove unused macro.
- Check for VT_I8 before testing it.
- VarMod returns DISP_E_OVERFLOW not E_INVALIDARG.
Robert Shearman <rob@codeweavers.com>
- Use I_RpcGetBuffer instead of HeapReAlloc for getting the Buffer
  memory.
Vincent Beron <vberon@mecano.gme.usherb.ca>
- Use SUBLANG_NEUTRAL for French resources.
Alex Villacis Lasso <a_villacis@palosanto.com>
- Fix leftover negative sign in height parameter for transparent
  bitmap.
- Properly announce whether bitmap is transparent in get_Attributes.
- GIF transparency is now palette-index based, instead of RGB based.
- Keep original bitmap and XOR mask separate, so that get_Handle
  returns original bitmap.

svn path=/trunk/; revision=15563
2005-05-28 09:35:29 +00:00
Gé van Geldorp
8eff322fdd Sync to Wine-20050524:
Alexandre Julliard <julliard@winehq.org>
- Added rules for building import libraries in the individual dll
  makefiles, and added support for building a .def.a static import
  library too.
- Removed unnecessary code in the 16-bit DllEntryPoint function of some
  dlls, and also fixed its ordinal in a few places.
- Comment out stub WEP entry points so that we can call WEP for builtin
  dlls too.
Juan Lang <juan_lang@yahoo.com>
- Obvious fixes to PropVariantClear and PropVariantCopy for vector
  types.
- Add a comment, and a no-op cleanup.
- Differentiate between version 0 and version 1 property storages.
- Store property names in the code page of the property set.
- maintain proper byte order
- maintain PROPSETFLAG_ANSI flag based on codepage
- update comments
- Correct/improve error checking in IPropertyStorage.
- convert strings between property storage's code page and system code
  page
- add tests for setting code page
- fix tests and behavior to match WinXP
- Define and use endian conversion macros for big-endian machines.
Marcus Meissner <marcus@jet.franken.de>
- Move the Dll init function to compobj.c to avoid having global
  variables. Remove need of ole32_main.h.
- Make HGLOBALStream_* functions static.
- Make _xmalloc16() static.
- Staticify FTMarshalImpl definition.
Francois Gouget <fgouget@free.fr>
- Specify the proper call convention in the PropSysFreeString()
  implementation.
- Tweak the API documentation to silence winapi_check warnings.
Robert Shearman <rob@codeweavers.com>
- Add error messages on failure in file moniker load function.
- Fix incorrect pointer check in both monikers.
- Fix max size calculation of item moniker to match native.
- Add a generic moniker marshaler that works by saving & loading
  monikers to & from the stream.
- Use the generic moniker marshal in the file & item monikers and add
  a class factory for each.
- Implement IROTData::GetComparisonData for file & item monikers.
- Add a useful trace message.
- Fix more places where custom header size was calculated exclusive of
  the data size member.
- Optimize custom marshaling by getting size before calling the custom
  marshaler so we can write the header before and not use a second
  stream.
- Change remaining blocks of code with 2-space indentation to 4-space
  indentation.
- Make vtables const.
- Remove an unnecessary memcpy and let the compiler do the work.
- Write custom header up to and including size, not excluding.
- Add a stub implementation of CoIsHandlerConnected.
- Marshal objects & monikers into the ROT.
- Test for this behaviour.
Mike McCormack <mike@codeweavers.com>
- Remove unnecessary declarations and make functions static.
- Remove forward declarations.
- Make sure a stream can't be created in read only storage.
- Fix a memory leak in the ole storage implementation.
- Remove function prototypes.
Kevin Koltzau <kevin@plop.org>
- Implement Hash function on composite moniker.
Jeff Latimer <jeffl@defcen.gov.au>
- Implement the IEnumMoniker interface for the ROT and provide tests to
  exercise the interface.
Pierre d'Herbemont <stegefin@free.fr>
- Big Endian specific code fixes in order to conform with
  NONAMELESSSTRUCT.
Matthew Mastracci <matt@aclaro.com>
- Replace stub entry for StgOpenStorageEx with call to StgOpenStorage.
- Replace StgCreateStorageEx stub with call to StgCreateDocfile and add
  required STGFMT_* enumerations.

svn path=/trunk/; revision=15562
2005-05-28 09:30:04 +00:00
Hartmut Birr
dde52a04c5 Check for the complete initialisation of user mode modules.
svn path=/trunk/; revision=15561
2005-05-28 07:39:54 +00:00
Hartmut Birr
fcc81ed73f Print the complete image name on a fault.
svn path=/trunk/; revision=15560
2005-05-28 07:37:19 +00:00
Hartmut Birr
2ff428f5e5 Use correct flag while checking for uninitialized segments.
svn path=/trunk/; revision=15559
2005-05-28 07:34:54 +00:00
Hartmut Birr
a5a9986767 Don't try to resolve user mode page faults in the very early boot phase.
svn path=/trunk/; revision=15558
2005-05-28 07:32:23 +00:00
Hartmut Birr
f4df167bed Put the assembler functions into the .text section.
svn path=/trunk/; revision=15557
2005-05-28 07:26:38 +00:00
Alex Ionescu
09d22dbdea Build pci with w32api
svn path=/trunk/; revision=15556
2005-05-28 00:24:46 +00:00
Alex Ionescu
cc481fc89f Build beep with w32api
svn path=/trunk/; revision=15555
2005-05-28 00:12:41 +00:00
Hervé Poussineau
45aa5aa956 Use DHCP to get name servers IP addresses
svn path=/trunk/; revision=15554
2005-05-27 23:19:14 +00:00
Steven Edwards
1ce2f8440a use __USE_W32API
svn path=/trunk/; revision=15553
2005-05-27 22:18:48 +00:00
Steven Edwards
fc8a20b794 use -D__USE_W32API
svn path=/trunk/; revision=15552
2005-05-27 22:15:36 +00:00
Steven Edwards
f6f9cdcdbb use w32api
svn path=/trunk/; revision=15551
2005-05-27 21:51:26 +00:00
Hervé Poussineau
0a45432b70 Silent debug message
svn path=/trunk/; revision=15550
2005-05-27 20:35:59 +00:00
Magnus Olsen
c44e26473a Implement NtGdiGetSystemPaletteUse and NtGdiSetSystemPaletteUse
this code have been taken from wine 

svn path=/trunk/; revision=15549
2005-05-27 20:07:48 +00:00
Hervé Poussineau
0b6337b3d8 Don't free heap for string that we don't own
svn path=/trunk/; revision=15548
2005-05-27 19:43:07 +00:00
Casper Hornstrup
062423314c Merge 15329:15546 from trunk
svn path=/branches/xmlbuildsystem/; revision=15547
2005-05-27 19:29:24 +00:00
Magnus Olsen
4a940a2d8e Thx casper to notice a ID was mistagen by translate
svn path=/trunk/; revision=15546
2005-05-27 18:26:14 +00:00
Hartmut Birr
f30557e387 Dereference the event if the queue is freed in IntDereferenceMessageQueue.
svn path=/trunk/; revision=15545
2005-05-27 16:28:10 +00:00
Casper Hornstrup
04f5a8f558 Copy rpoolmgr.h from trunk
svn path=/branches/xmlbuildsystem/; revision=15544
2005-05-27 14:33:41 +00:00
Casper Hornstrup
0aa41d88e0 Delete
svn path=/branches/xmlbuildsystem/; revision=15543
2005-05-27 14:32:40 +00:00
Magnus Olsen
b73c53c40c fix memmory coruption in EnumDisplaySettingsExA
do not alloc memmory with heap. 

svn path=/trunk/; revision=15542
2005-05-27 14:22:06 +00:00
Magnus Olsen
68f4fc41bc fix stupied Ret uninitialized in IntChangeDisplaySettings for DGB=0 build
svn path=/trunk/; revision=15541
2005-05-27 00:32:24 +00:00
Magnus Olsen
71c9d2dddd partially implemented fullscreen in changedisplay setting
I can play winquake in fullscreen now :)


svn path=/trunk/; revision=15538
2005-05-26 22:41:31 +00:00
Gé van Geldorp
2d3d7c7078 Sync to Wine-20050524:
Alexander Julliard <julliard@winehq.org>
- Added rules for building import libraries in the individual dll
  makefiles, and added support for building a .def.a static import
  library too.
Aric Stewart <aric@codeweavers.com>
- Fix a few leaking object handles.
- Correct user component publication.
- Implement MsiEnumComponentQualifiers.
- Implement Publish Components in order for MsiGetQualifiedComponent
  apis to work. Also implement MsiGetQualifiedComponent, or at least some
  of the functionality as it is supposed to install stuff if it is
  absent, which it does not do yet.
- Correct query quoting based on Mike's patch.
  Also more error messages about return codes from custom actions and
  ignore an error that we should be ignoring.
- Double terminate SZ_MULTI properly.
- ClassInfo and ExtensionInfo are also written for ADVERTISED
  components.
- Write the RegOwner and RegCompany keys as blank if they do not exist
  when doing the RegisterUser action.
- Fix quoting on queries.
- Respect '+' and '*' in WriteRegistryValues to only create the key if
  it does not already exist. Prevents overwriting values with NULL.
- We cannot internally load the files in FileCost because that action
  may be skipped or not called. So do it in CostInitialize.
- Quote the file path in SelfRegModules.
- Do not write squished null guids to the feature registration.
- Correctly use short filenames from uncompressed file sources. Also
  default feature and component install states to ABSENT instead of
  UNKNOWN.
- Correct a problem with parse_data if binary data was not in full bytes.
- More properly handle uncompressed file sources, fix the creating and
  parsing of Source Directories.
- ExecuteAction runs the whole Execute table and not just from
  InstallValidate onward.  To do this make sure we do not do the
  costing initialization work again if it is already done (by checking
  the CostingComplete Property).
- A lot of work to refine feature states, setting the state affects
  the state of all child features and also respect features that want
  to default to something other than LOCAL.
- Fix a few leaking object handles.
- Correct user component publication.
- Implement MsiEnumComponentQualifiers.
- We have a stub for MsiGetUserInfoA we should use it.
- A few small fixes.
- Add a missing msiobj_release that was resulting in a leaked object
  with each MsiCreateRecord call.
- Fix a leaking handle.
- Make MsiCollectUserInfo more internally consistent.
  Thanks to Mike McCormack.
- Fix a leaking handle in MsiConfigureProductExW.
- Implement MsiGetProductCodeW.
- Implement MsiGetUserInfoW.
- Implement MsiCollectUserInfoA/W.
- Implement MsiQueryFeatureStateW.
- Correct a leaking hkey handle.
- Expand some handling of special properties in MsiGetProductInfo.
- Fix for the return codes for the Qualified component calls. They are
  not INSTALLSTATEs but rather success values.
- Quoting fixes.
Mike McCormack <mike@codeweavers.com>
- Make sure that dialogs are only created and destroyed in a single
  thread.
- Track memory allocations in the SQL parser.
- Create the ORDER BY view in a single call.
- Simplify parsing of the FROM keyword.
- Improve parser error checking.
- Simplify parsing of select query.
- remove the unused utf8 field of an expression
- make the parse result a single assignment at top level of parsing
- abort parsing on a memory allocation failure
- Only tables can be backquoted, strings must be single quoted.
- Declare MsiExportDatabase* in the spec file, and fix a typo.
- make sure to free the string table when closing the database
- don't free szPersist in MsiOpenDatabase if it's not a string
- Avoid some non-standard str functions.
Francois Gouget <fgouget@free.fr>
- Tweak the documentation to make winapi_check happy.
Juan Lang <juan_lang@yahoo.com>
- Don't fail in RegisterFonts if the Fonts table is missing.
- Partially implement AppSearch for RegLocator-type searches.
- Turn handled errors from ERRs to WARNs or TRACEs.
Vincent Beron <vberon@mecano.gme.usherb.ca>
- Use SUBLANG_NEUTRAL for French resources.
Stefan Leichter <Stefan.Leichter@camLine.com>
- Update version resource of msi.dll to current version shipped from
  windows update.
- Added minimal implementation of MsiCreateAndVerifyInstallerDirectory.
Marcus Meissner <marcus@jet.franken.de>
- Set PhysicalMemory property from system data.

svn path=/trunk/; revision=15537
2005-05-26 21:55:34 +00:00
Gé van Geldorp
15de547cc6 Sync to Wine-20050524:
Alexander Julliard <julliard@winehq.org>
- Added rules for building import libraries in the individual dll
  makefiles, and added support for building a .def.a static import
  library too.

svn path=/trunk/; revision=15536
2005-05-26 21:15:58 +00:00
Gé van Geldorp
cc65e33b46 Sync to Wine-20050524:
Alexander Julliard <julliard@winehq.org>
- Added rules for building import libraries in the individual dll
  makefiles, and added support for building a .def.a static import
  library too.

svn path=/trunk/; revision=15535
2005-05-26 21:09:49 +00:00
Gé van Geldorp
f4600fe75d Sync to Wine-20050524:
Alexander Julliard <julliard@winehq.org>
- Added rules for building import libraries in the individual dll
  makefiles, and added support for building a .def.a static import
  library too.

svn path=/trunk/; revision=15534
2005-05-26 21:07:55 +00:00
Gé van Geldorp
f4f457d418 Sync to Wine-20050524:
Alexander Julliard <julliard@winehq.org>
- Added rules for building import libraries in the individual dll
  makefiles, and added support for building a .def.a static import
  library too.

svn path=/trunk/; revision=15533
2005-05-26 21:06:20 +00:00
Gé van Geldorp
da5d24be89 Sync to Wine-20050524:
Alexandre Julliard <julliard@winehq.org>
- Removed unnecessary code in the 16-bit DllEntryPoint function of some
  dlls, and also fixed its ordinal in a few places.
- Added rules for building import libraries in the individual dll
  makefiles, and added support for building a .def.a static import
  library too.
- Don't convert the template name to Unicode, it's not used by the
  dialog anyway. Clear the window property on WM_DESTROY.
Michael Jung <mjung@iss.tu-darmstadt.de>
- Use IShellFolder::GetDisplayNameOf instead of SHGetPathFromIDList to
  be able to browse shell namespace extensions.

svn path=/trunk/; revision=15532
2005-05-26 21:02:35 +00:00
Gé van Geldorp
120d7a64b9 Sync to Wine-20050524:
Alexandre Julliard <julliard@winehq.org>
- Added rules for building import libraries in the individual dll
  makefiles, and added support for building a .def.a static import
  library too.
Francois Gouget <fgouget@free.fr>
- Assorted spelling fixes.
Kouji Sasaki <taro-x@justsystem.co.jp>
- Added handling of WM_ENABLE message.
James Hawkins <truiken@gmail.com>
- Audit the List-View control.
- Select the item under the point (x,y) in MouseHover.
- Store the click point in LISTVIEW_INFO.
- Move mouse tracking to MouseMove.
- Use DragDetect instead of TrackMouse.
- Remove the unused TrackMouse function.
- Fixed centering of tab text.
Dimi Paun <dimi@lattica.com>
- Do not compute the hit test if we don't really need it.
- Make it more explicit how we deal with WS_DISABLED.
Felix Nawothnig <felix.nawothnig@t-online.de>
- Resize listview column to autofit on a doubleclick on the
  header-divider.
- Implemented WM_ENABLE.
- Rewrote item layouting - new code fixes bitmap/image position for
  non-left-aligned text, prevents jumping when resizing non-left-aligned
  text, implements clipping for images and correctly aligns bitmaps when
  an image is already there.
- Set iItem to index before notifying callback items.
Duane Clark <dclark@akamail.com>
- Misc rectangle fixes.
- The date should be initialized from local time.
Aric Stewart <aric@codeweavers.com>
- Handle WM_NCCALCSIZE in the tab control.
Hans Leidekker <hans@it.vu.nl>
- Fix uninitialized warnings.

svn path=/trunk/; revision=15531
2005-05-26 20:52:12 +00:00
Gé van Geldorp
088013d4a4 Sync to Wine-20050524:
Alexandre Julliard <julliard@winehq.org>
- Added rules for building import libraries in the individual dll
  makefiles, and added support for building a .def.a static import
  library too.
Gerold Jens Wucherpfennig <gjwucherpfennig@gmx.net>
- Initial FCI work (FCICreate and FCIDestroy).

svn path=/trunk/; revision=15530
2005-05-26 20:39:17 +00:00
Magnus Olsen
ec4b70a7b6 Fix more bugs in change display. when you press on aply in desk.cpl later on ok you did get change_display fail msg. fix the return code to reboot req. Remove switch statmenet for more that one flags can be send same time. example CDS_TEST + CDS_FULLSCREEN ..... and replace thuse with if statement instead.
svn path=/trunk/; revision=15529
2005-05-26 20:07:10 +00:00
Filip Navara
2d7d796368 Report 16bpp for modes where VBE returns 15bpp.
svn path=/trunk/; revision=15528
2005-05-26 19:58:58 +00:00
Filip Navara
db46d099bc - Revert hacks added by GreatLord in revisons 15521 and 15522.
- Fix mode enumeration code on few places.

svn path=/trunk/; revision=15527
2005-05-26 19:57:54 +00:00
Hartmut Birr
deab50cb8b Protected the handle table.
svn path=/trunk/; revision=15526
2005-05-26 19:22:45 +00:00
Steven Edwards
7d4d22763c work around include_next problem when cross-compiling
svn path=/trunk/; revision=15525
2005-05-26 17:17:29 +00:00
Magnus Olsen
98bc8544de change line 15 from #if DBG to #ifdef DBG
so head builds agein

svn path=/trunk/; revision=15524
2005-05-26 15:53:24 +00:00
Hervé Poussineau
7d9d552b40 Fix compile when DBG is set
svn path=/trunk/; revision=15523
2005-05-26 15:44:04 +00:00
Magnus Olsen
38b2ccb8dd add a commet why 24bits cards fails
and maby other card will fails 
in GetAvailableModes

svn path=/trunk/; revision=15522
2005-05-26 15:15:55 +00:00
Magnus Olsen
c7ae12e813 Fix the problem for 24 bits graphic card.
But it report color deep 15 are supported now. 
it solv the problem. Thanks WaxDragon
Hope filip does like this change. 

svn path=/trunk/; revision=15521
2005-05-26 14:46:23 +00:00
Alex Ionescu
db1bf61e23 Strip files on retail builds and do not send file/section alignment twice
svn path=/trunk/; revision=15520
2005-05-26 13:55:13 +00:00
Alex Ionescu
3f0ddf5160 DEBUG1 on checked only
svn path=/trunk/; revision=15519
2005-05-26 13:53:15 +00:00
Alex Ionescu
6b34120402 make PE loader more lenient with alignment. it could previously not load PEs that I can load on Windows
svn path=/trunk/; revision=15518
2005-05-26 13:52:30 +00:00
Alex Ionescu
ed141bff38 Set non-retail (checked) build as default. Developers should have no reason to use a retail build unless testing a final release version. This also speeds up compilation and reduces the number of compile errors due to developers building with dbg=0 and breaking dbg=1 code. Please do not code with dbg=0 without testing your patches in dbg=1.
svn path=/trunk/; revision=15517
2005-05-26 13:50:52 +00:00
Alex Ionescu
42db7235dc Do not print DPRINT1s on retail builds
svn path=/trunk/; revision=15516
2005-05-26 13:48:55 +00:00
Alex Ionescu
c8a85bc545 Enable and fix NE2000 settings so it works out-of-the-box for QEMU users
svn path=/trunk/; revision=15515
2005-05-26 13:47:21 +00:00
Alex Ionescu
ff1ad3a698 Fix debug messages which previously forced NDEBUG to be off
svn path=/trunk/; revision=15514
2005-05-26 13:45:48 +00:00
Alex Ionescu
1883e277ac Dynamically load and detect iphlpapi. Makes rpcrt4 work on systems without the DLL and also does not force every app on the system to load the network libraries like before
svn path=/trunk/; revision=15513
2005-05-26 13:45:08 +00:00
Alex Ionescu
acec4be2e4 Mark initial loader APIs are INIT_FUNCTION so they can be freed
svn path=/trunk/; revision=15512
2005-05-26 13:44:14 +00:00
Alex Ionescu
45e66d3fce Do not build debug PS function on reatail build
svn path=/trunk/; revision=15511
2005-05-26 13:43:52 +00:00
Alex Ionescu
be4adc56e9 Disable pool debug settings on a retail build and increase speed
svn path=/trunk/; revision=15510
2005-05-26 13:43:13 +00:00
Alex Ionescu
c013c83354 Don't compile ROS-specific tab-debug commands on a retail build
svn path=/trunk/; revision=15509
2005-05-26 13:42:41 +00:00
Alex Ionescu
2e7e95a597 Fix typos in debug messages
svn path=/trunk/; revision=15508
2005-05-26 13:42:07 +00:00
Alex Ionescu
d74a4d1b37 Don't compile pool debug apis on a retail build
svn path=/trunk/; revision=15507
2005-05-26 13:41:46 +00:00
Alex Ionescu
650c785b4a Don't allocate section segments in nonpaged pool
svn path=/trunk/; revision=15506
2005-05-26 13:41:04 +00:00
Alex Ionescu
97db2802cf Fix pool code to actually work when some other defines are used
svn path=/trunk/; revision=15505
2005-05-26 13:40:40 +00:00
Alex Ionescu
9e843895bf Do not allow virtual mem queries > 0x80000000 even if you're from kmode. Remove deprecated debug messages
svn path=/trunk/; revision=15504
2005-05-26 13:39:40 +00:00
Alex Ionescu
16982c81f8 Shut up i8042prt
svn path=/trunk/; revision=15503
2005-05-26 13:36:30 +00:00
Alex Ionescu
e46d7967c7 Don't free heap for string that we don't own
svn path=/trunk/; revision=15502
2005-05-26 13:35:08 +00:00
Maarten Bosma
a897f17cb4 PackageManager
svn path=/trunk/; revision=15501
2005-05-26 10:01:14 +00:00
Gé van Geldorp
b395078e1e Sync to Wine-20050524:
Michael Stefaniuc <mstefani@redhat.de>
- Change the type of 1 bit wide bitfields to unsigned.

svn path=/trunk/; revision=15500
2005-05-26 09:46:02 +00:00
Gé van Geldorp
1149b4b325 Sync to Wine-20050524:
Alexandre Julliard <julliard@winehq.org>
- Free delayed import modules on PROCESS_DETACH.
- Removed no longer used support for 32-bit register entry points.
- Added support in winebuild for specifying import libraries directly on
  the command line without the -l option.
- Changed the -d option to only mark the library as delayed, the actual
  loading is now done separately.
- Generate 16-bit resources in the proper format inside the module data,
  and get rid of the special case for builtins in NE_DefResourceHandler.
- Generate the 16-bit module header in the standard on-disk format, so
  that winebuild doesn't need to know about kernel internal structures.
- Moved the generated code segment for 16-bit builtins inside the module
  structure.
- Get rid of the BUILTIN16_DESCRIPTOR structure and directly register
  the MZ header instead.
- Use RaiseException instead of RtlRaiseException in 16-bit spec files
  since they already depend on kernel32.
- Renamed __wine_(un)register_dll_16 to __wine_dll_(un)register_16 for
  consistency with the 32-bit version, and also make the register
  function use the same prototype as the 32-bit one.
- Use the exported IMAGE_OS2_HEADER to generate the module header in the
  spec file, and moved the NE_MODULE structure definition to
  kernel16_private.h.
- Avoid referencing stackframe.h from outside kernel32.
- Moved data structures for 16-bit relay calls to winbase16.h and
  removed builtin16.h.
- Store the 16-bit stack pointer in the WOW32Reserved TEB field.
- Use RaiseException instead of RtlRaiseException for delayed entry
  points load failure to avoid creating a dependency on ntdll.

svn path=/trunk/; revision=15499
2005-05-26 09:44:59 +00:00
Hervé Poussineau
4f897f671b Fix DPRINT1 messages to display correctly memory ranges
svn path=/trunk/; revision=15498
2005-05-26 06:30:47 +00:00
Gé van Geldorp
d670d4f7e6 Implement sub-allocation of small requests
svn path=/trunk/; revision=15497
2005-05-25 22:36:35 +00:00
Aleksey Bragin
fcb49212d9 Now UHCI HCD driver supports recognizing Memory type of resource. Should help James Tabor's problem (VIA chipset, getting only memory resource as unrecognized, and thus driver failing loading).
svn path=/trunk/; revision=15496
2005-05-25 20:59:13 +00:00
Magnus Olsen
a76329673c New normal curosr by irc:mf
svn path=/trunk/; revision=15495
2005-05-25 14:25:19 +00:00
Alex Ionescu
46dd88ef81 Build usetup and ntoskrnl and winmm in gcc 4.0
svn path=/trunk/; revision=15494
2005-05-25 13:07:27 +00:00
Magnus Olsen
332a72f9b8 Correct bug do not enum other color deep that 8,16,24,32 it will create memmory leek other wise.
in the current code. 

svn path=/trunk/; revision=15493
2005-05-25 09:14:29 +00:00
Alex Ionescu
b09db8ab65 Nonpaged Pool Liberation Day: Allow PagedPool to be used earlier, allow fast mutex to be used earlier on debug builds. Allocate all Se stuff from PagedPool, set the right object types to use paged pool, allocate all strings from paged pool, allocate PE sections from paged pool, and a bunch of other things which should, imo, be in paged pool. If anyone has any contradicting proof, let me know...until then, enjoy ~4-6MB more NonPagedPool
svn path=/trunk/; revision=15492
2005-05-25 04:16:56 +00:00
Alex Ionescu
c1c8137afa Tag the MDL buffer
svn path=/trunk/; revision=15491
2005-05-25 02:20:01 +00:00
Alex Ionescu
007cd2d88a remove debug message
svn path=/trunk/; revision=15490
2005-05-25 01:49:50 +00:00
Magnus Olsen
4f7ea2284f Add 24bits mode strings
hope it fix qemu 

svn path=/trunk/; revision=15489
2005-05-25 00:04:12 +00:00
Alex Ionescu
53db168c0d Fix Tag Usage
svn path=/trunk/; revision=15487
2005-05-24 21:32:47 +00:00
Alex Ionescu
1d899ce8b3 Fix memory leaks in object manager, use tags and use some more public types
svn path=/trunk/; revision=15486
2005-05-24 21:21:34 +00:00
Alex Ionescu
ef8d82998d Fix DHCP from crashing, silence tcp and iphlp
svn path=/trunk/; revision=15485
2005-05-24 21:04:44 +00:00
Magnus Olsen
d92b106774 ChangeDisplay
1. Add debug msg
2. Corrent some return value for CDS_UPDATEREGISTRY
3. Remove #ifdef CDS_VIDEOPARAMETERS  


svn path=/trunk/; revision=15484
2005-05-24 19:52:43 +00:00
Magnus Olsen
d3f81ff12b add CDS_VIDEOPARAMETERS for changedisplay setting it was mising in our include files
svn path=/trunk/; revision=15483
2005-05-24 18:42:54 +00:00
Magnus Olsen
06a280398f VBE driver never write which reslutions it should use as defualt
therefor the change resultions did not working on bootcd 
do not remove this settings. from the reg. 
Thanks

svn path=/trunk/; revision=15482
2005-05-24 14:14:40 +00:00
Hervé Poussineau
d3881cf0ae Add ReactOS version at the start of the debug log
svn path=/trunk/; revision=15481
2005-05-23 20:31:53 +00:00
Hervé Poussineau
4ad1699bf6 Write keyboard identifier in right registry key
svn path=/trunk/; revision=15480
2005-05-23 19:30:22 +00:00
James Tabor
a1b9addb33 I give up! I fix the rest of the headers later.
svn path=/trunk/; revision=15479
2005-05-23 19:17:36 +00:00
James Tabor
15e364a635 Fixup sysinfo.c SystemProcessInfo header.
svn path=/trunk/; revision=15478
2005-05-23 18:59:21 +00:00
James Tabor
78d9f19627 Update include header and update waitreason list.
svn path=/trunk/; revision=15477
2005-05-23 17:13:23 +00:00
Magnus Olsen
ab215aa2bf 1. remove all hardcode strings to En.rc
2. make it unicode and anis 

svn path=/trunk/; revision=15476
2005-05-23 16:48:22 +00:00
Hervé Poussineau
d920c40eee Revert 15473 and 15474 as Alex doesn't like them
svn path=/trunk/; revision=15475
2005-05-23 08:50:29 +00:00
Hervé Poussineau
cc7ba13666 Add ReactOS version at the start of the debug log
svn path=/trunk/; revision=15474
2005-05-23 05:20:39 +00:00
Hervé Poussineau
58ba3012c1 Remove some debug messages at boot
svn path=/trunk/; revision=15473
2005-05-23 05:00:22 +00:00
James Tabor
336ae48375 Revert DPRINT1.
svn path=/trunk/; revision=15472
2005-05-22 22:12:12 +00:00
Hervé Poussineau
1da69bf5f7 Fix compile error when NDEBUG is not set
svn path=/trunk/; revision=15471
2005-05-22 22:04:57 +00:00
Hartmut Birr
8b6398a0e3 ObInsertObject must always return STATUS_OBJECT_NAME_COLLISION if an object with the same name exist.
svn path=/trunk/; revision=15470
2005-05-22 16:48:30 +00:00
Hartmut Birr
4eba3d8e71 Don't create the media change event as named object.
svn path=/trunk/; revision=15469
2005-05-22 16:44:36 +00:00
Emanuele Aliberti
5b45accaef svn propset {keyword, eol-type}
svn path=/trunk/; revision=15468
2005-05-22 16:10:10 +00:00
Emanuele Aliberti
6481ed1ea7 SM: change the way sessions are managed.
(it may be buggy)

svn path=/trunk/; revision=15467
2005-05-22 15:54:15 +00:00
James Tabor
f4e960c324 This is a CompareStringW hack to get (7z313.exe /Q) to install. If anyone else has a better way, go for it!
svn path=/trunk/; revision=15466
2005-05-22 12:29:10 +00:00
Eric Kohl
f564f62205 IoRegisterDeviceInterface: Create nested keys one-by-one.
svn path=/trunk/; revision=15465
2005-05-21 19:00:42 +00:00
Eric Kohl
2455ef0040 Add DeviceClasses key.
svn path=/trunk/; revision=15464
2005-05-21 17:49:58 +00:00
Aleksey Bragin
4c338fffcf Added russian translations for libs: mpr, msacm, msi, oledlg, shdocvw.
Thanks to: Mikhail Zvyzdochkin, Dmitry Phlilippov.

svn path=/trunk/; revision=15463
2005-05-21 17:26:59 +00:00
Hartmut Birr
0c4da041a5 Set STATUS_SUCCESS instead of STATUS_PIPE_CONNECTED in NpfsSignalAndRemoveListeningServerInstance.
svn path=/trunk/; revision=15462
2005-05-21 17:05:38 +00:00
Hartmut Birr
744548fc6a Revert to rev 15172.
svn path=/trunk/; revision=15461
2005-05-21 17:02:38 +00:00
Martin Fuchs
a62f884b0b - fixed for FOR _NO_EXTENSIONS mode
- implement ID_VIEW_SPLIT command

svn path=/trunk/; revision=15460
2005-05-21 16:45:50 +00:00
Hervé Poussineau
fb4635393e Remove some debug messages at boot (DPRINT1 changed to DPRINT)
SVN maintenance in ntoskrnl/ex/: set svn:eol-style and svn:keywords properties

svn path=/trunk/; revision=15459
2005-05-21 16:33:23 +00:00
Hervé Poussineau
d7e937747c Open file with FILE_SHARE_READ in LdrLoadModule
svn path=/trunk/; revision=15458
2005-05-21 15:49:48 +00:00
Hartmut Birr
ca088cc13c Don't interpret STATUS_PIPE_CONNECTED as error.
svn path=/trunk/; revision=15457
2005-05-21 13:39:09 +00:00
Thomas Bluemel
991909bc42 minor optimization
svn path=/trunk/; revision=15456
2005-05-21 12:57:34 +00:00
Eric Kohl
4b4c510e04 Implement ConcatenatePaths and MyGetFileTitle.
svn path=/trunk/; revision=15455
2005-05-21 12:23:07 +00:00
Hartmut Birr
385055dd76 Terminate the process on exit in NtProcessStartup.
svn path=/trunk/; revision=15454
2005-05-21 12:21:30 +00:00
Hartmut Birr
69350ef25a Free all allocated memory in ObpDeleteObject.
svn path=/trunk/; revision=15453
2005-05-21 12:19:26 +00:00
Hartmut Birr
40f2f130a0 Free the capture buffer in ObReferenceObjectByName.
svn path=/trunk/; revision=15452
2005-05-21 12:11:54 +00:00
Hartmut Birr
0eeb5caed9 Set the flag FO_DIRECT_DEVICE_OPEN after the call to IoCreateStreamFileObject in IoCreateFile.
svn path=/trunk/; revision=15451
2005-05-21 12:08:46 +00:00
James Tabor
f10f1f0548 Fix ups and Clean ups.
svn path=/trunk/; revision=15450
2005-05-21 11:29:53 +00:00
Aleksey Bragin
a8779d96c8 Enable built-in debug messages usage (via CONFIG_USB_DEBUG)
svn path=/trunk/; revision=15449
2005-05-21 08:44:40 +00:00
Martin Fuchs
a47cb4260c add explorer-cz.rc to textinclude section
svn path=/trunk/; revision=15448
2005-05-21 07:35:03 +00:00
James Tabor
b8102f68c3 Added Usb cromwell to build system.
svn path=/trunk/; revision=15447
2005-05-21 02:00:52 +00:00
James Tabor
1c7838cc35 Fixups.
svn path=/trunk/; revision=15446
2005-05-21 01:57:38 +00:00
James Tabor
6120955e45 Added PKEVENT to init_waitqueue_head.
svn path=/trunk/; revision=15445
2005-05-21 01:53:53 +00:00
James Tabor
d88e7782d0 Added PKEVENT to wake_up.
svn path=/trunk/; revision=15444
2005-05-21 01:39:32 +00:00
James Tabor
4f7a419fcc Clean up end of line.
svn path=/trunk/; revision=15443
2005-05-21 01:34:50 +00:00
James Tabor
3a9cdf8c34 Added libusbcore.a to makefile
svn path=/trunk/; revision=15442
2005-05-21 01:21:29 +00:00
Hervé Poussineau
8d1c8a184f Fix bus pointer for initial device
svn path=/trunk/; revision=15441
2005-05-20 22:31:55 +00:00
Hervé Poussineau
b2eee5bb0e SVN maintenance:
Set svn:eol-style and svn:keywords for files
Set svn:ignore for directories

svn path=/trunk/; revision=15440
2005-05-20 21:53:08 +00:00
Hervé Poussineau
e277f853b7 Modify some pci_hal funcs, fix obvious errors in code
svn path=/trunk/; revision=15439
2005-05-20 21:43:57 +00:00
Magnus Olsen
b8171c1fd9 Implement same behavor for cd * as ms cmd cd *
Left to implement is /D options for cd then it is same level as ms win2k cmd cd 

En.rc
Fix a options error for cd it did say cd -, but it it is cd .

svn path=/trunk/; revision=15438
2005-05-20 21:33:49 +00:00
Casper Hornstrup
8a4a3a4cb1 Support alternate name for hooked function
svn path=/branches/xmlbuildsystem/; revision=15437
2005-05-20 19:07:23 +00:00
Hartmut Birr
750d4fd13f - Create always the output file. If no debug section exist, do not create a rossym section.
svn path=/trunk/; revision=15436
2005-05-20 18:15:44 +00:00
Casper Hornstrup
19e160bf46 Don't echo executable name of test
svn path=/branches/xmlbuildsystem/; revision=15435
2005-05-20 15:15:19 +00:00
Casper Hornstrup
d04bf21da0 Implement 'make test'
svn path=/branches/xmlbuildsystem/; revision=15434
2005-05-20 15:12:32 +00:00
Casper Hornstrup
892a2cc592 Optimize SourceFile::ReadInclude
svn path=/branches/xmlbuildsystem/; revision=15433
2005-05-20 14:55:15 +00:00
Magnus Olsen
67c71ced7c Add new thing to cd.
Make cd pr* working

svn path=/trunk/; revision=15432
2005-05-20 12:55:09 +00:00
Gé van Geldorp
1b8382a7e3 Backport to Xen 2
svn path=/branches/xen/; revision=15431
2005-05-20 10:55:55 +00:00
Gé van Geldorp
9c2b28da69 For Xen, setup paging the way the kernel wants it and
transfer control to the kernel

svn path=/branches/xen/; revision=15430
2005-05-20 10:33:27 +00:00
Art Yerkes
4a15530e10 Turned on -Werror
Propogate AdapterBinding rather than LogicalAdapter or MiniportBlock in places
where we handle a request since we might need the protocol that did the request
later on, get rid of LogicalAdapter completely as according to Filip, it's 
never needed.

Also, remove the Packet context hack in send complete if possible as this is
now unnecessary (we now send all needed information in the work item instead).

MiniQueueWorkItem, MiniDequeueWorkItem and MiniDoRequest were all changed to
take an AdapterBinding.
Added MiniRequestComplete, which handles a request complete.

Fixed hang in ipconfig and the tcpip control panel.

svn path=/trunk/; revision=15429
2005-05-20 08:06:27 +00:00
Filip Navara
188f2022f6 Lukáš "denzil" Frolka <d3nzil@gmail.com>
Czech translation of Explorer (some settings dialogs are still untranslated).

svn path=/trunk/; revision=15428
2005-05-20 06:21:01 +00:00
Steven Edwards
7fb3ebb9f9 move the rest of the alread defined tags to the private tag.h
svn path=/trunk/; revision=15427
2005-05-20 04:33:47 +00:00
Steven Edwards
3354ce28a8 started moving tags to a private internal header
svn path=/trunk/; revision=15426
2005-05-20 03:50:13 +00:00
Hervé Poussineau
50752743f5 Remove some debug messages at boot
svn path=/trunk/; revision=15425
2005-05-20 02:46:26 +00:00
Hervé Poussineau
1367527014 IopAssignDeviceResources():
Fix translated resource list for I/O ports and memory ranges
Fix raw resource list for interrupts

svn path=/trunk/; revision=15424
2005-05-20 02:37:51 +00:00
Phillip Susi
027e2bfa3a Removed invalid . from path in this usetup ini file as a temporary fix. Next step is to remove the darn ini file entirely
svn path=/trunk/; revision=15423
2005-05-20 02:21:53 +00:00
Steven Edwards
45d8d84765 adjust case on a header. Sorry Windows users. Do not use mixed case filenames.
svn path=/trunk/; revision=15422
2005-05-20 02:19:00 +00:00
Hervé Poussineau
6261f48b99 Set BusNumber and SlotNumber in resource requirements list
svn path=/trunk/; revision=15421
2005-05-20 01:54:10 +00:00
Hervé Poussineau
e34387f9c2 Remove some debug messages at boot
svn path=/trunk/; revision=15420
2005-05-20 01:10:00 +00:00
Hervé Poussineau
79361fcb93 Remove some debug messages at boot
svn path=/trunk/; revision=15419
2005-05-20 01:08:37 +00:00
Hervé Poussineau
725a500778 Set svn:keywords and svn:eol-style properties
Change some DPRINT1 to DPRINT in bug.c, clock.c, gate.c

svn path=/trunk/; revision=15418
2005-05-20 00:47:16 +00:00
Alex Ionescu
b1274d7f85 Ensure success
svn path=/trunk/; revision=15417
2005-05-20 00:17:35 +00:00
Alex Ionescu
04f9bb0465 Fix one of the added hacks. ObpCreateHAndle not exported anymore, and win32k now duplicates the handle nicely (Also faster since we don't have to attach/detach to csr anymore
svn path=/trunk/; revision=15416
2005-05-19 23:26:56 +00:00
Hervé Poussineau
026d788dcc IoGetDeviceProperty():
Fix DevicePropertyEnumeratorName
Implement DevicePropertyPhysicalDeviceObjectName

svn path=/trunk/; revision=15415
2005-05-19 22:04:45 +00:00
Hervé Poussineau
2e828da9a2 Don't create a new DriverObject if one is already existing
svn path=/trunk/; revision=15414
2005-05-19 22:02:34 +00:00
Casper Hornstrup
083a71c9f2 Option to disable automatic dependencies
svn path=/branches/xmlbuildsystem/; revision=15413
2005-05-19 19:53:01 +00:00
Steven Edwards
2342aee312 Watch the case damnit. Sorry Windows users
svn path=/branches/xmlbuildsystem/; revision=15412
2005-05-19 19:00:37 +00:00
Casper Hornstrup
72053cbd18 Don't put modules in project root to avoid overwriting the top-level makefile with a proxy makefile
svn path=/branches/xmlbuildsystem/; revision=15411
2005-05-19 18:38:04 +00:00
Magnus Olsen
765b83b774 Fix CD bug for
CD "program files"
cd did only working with CD program files 
now it support ""

svn path=/trunk/; revision=15410
2005-05-19 15:32:22 +00:00
Alex Ionescu
2df4b9dc13 Unnamed objects do not have a base directory.
svn path=/trunk/; revision=15409
2005-05-19 05:26:35 +00:00
Art Yerkes
1e16c56cc3 Don't free this MDL. The I/O manager now does it for us.
svn path=/trunk/; revision=15408
2005-05-19 03:36:20 +00:00
Alex Ionescu
e1553447e9 Don't free io completion packet twice
svn path=/trunk/; revision=15407
2005-05-19 03:24:43 +00:00
Art Yerkes
29d29f5ff5 Corrected uninitialized timeout variable. Will be needed later when ARP calls
are present in iphlpapi.

svn path=/trunk/; revision=15406
2005-05-19 02:53:52 +00:00
Alex Ionescu
f39cc83ebf fix boot on vmware
svn path=/trunk/; revision=15405
2005-05-19 01:58:24 +00:00
Alex Ionescu
c6eb354e8b fix compiling
svn path=/trunk/; revision=15404
2005-05-19 01:46:49 +00:00
Phillip Susi
5d4d912efd Rewrote usetup's file copy and cabinet extraction code to use memory mapped files
This increased performance and the code is cleaner
Still needs a bit more cleaning up, but so far, looks good, needs some testing



svn path=/trunk/; revision=15403
2005-05-19 00:59:40 +00:00
Hervé Poussineau
7403e34ca9 Basic resources device allocation (doesn't prevent conflicts)
Send allocated resources in IRP_MN_START_DEVICE

svn path=/trunk/; revision=15402
2005-05-18 22:05:11 +00:00
Hervé Poussineau
3e43a2215b Use translated resources list to get informations about interrupt
svn path=/trunk/; revision=15401
2005-05-18 21:48:41 +00:00
Alex Ionescu
3d90c8bdad Revert accidental commit
svn path=/trunk/; revision=15400
2005-05-18 21:28:12 +00:00
Hervé Poussineau
4507d7ac14 Implement IRP_MN_QUERY_RESOURCE_REQUIREMENTS
svn path=/trunk/; revision=15399
2005-05-18 21:23:54 +00:00
Magnus Olsen
7646e46a35 Swdish translations by irc:anders1 proofread by Andreas Bjerkeholt, Wacko and by Me (GreatLord)
svn path=/trunk/; revision=15398
2005-05-18 20:19:22 +00:00
Magnus Olsen
4cb823eb9e Swdish translations by irc:anders1 proofread by Andreas Bjerkeholt
svn path=/trunk/; revision=15397
2005-05-18 19:58:27 +00:00
Magnus Olsen
f9b7791ad3 Swdish translations by irc:anders1 proofread by Andreas Bjerkeholt
svn path=/trunk/; revision=15396
2005-05-18 19:46:40 +00:00
Alex Ionescu
00fe79ff10 Object Manager Patch. This patch continues the work done in the previous patch and makes the following changes in order to support OB 2.0 (it basically temporarily fixes a highly incorrect implementation so that caller code will be ready to work with the OB 2.0 without change):
1) The documented Object Create Information Structure and semantics implemented. All Object Attributes and passed data from user-mode is now probed and saved into this object create structure when ObCreateObject is called.
2) ObCreateObject does NOT PERFORM ANY OTHER OPERATION EXCEPT CREATING THE OBJECT ANYMORE. ObCreateObject will NOT insert the Object into the tree and other operations. These are now done correctly by ObInsertObject. Therefore, the biggest hurdle was changing pieces of code which assumed ObCreateObject would be enough.
3) ObInsertObject uses the captured create info for all operations isntead of the Object Attributes.
4) ObFindObject now uses the captured info as well.
5) The OBject name and directory are now stored in the documented Object Name Information, always allocated and freed from non paged pool.

HACKS:
5) Because the registry code is horribly broken and doesn't use ObFindObjectByName, the old ObFindObject had to be temporarily duplicated into CmpFindObject.
7) Win32k used ObInsertObject in CsrInsertObject as a way to create a handle inside csrss. However, OBInsertObject now does more then this. As a temporary hack, ObpCreateHandle is exported from the kernel and called from win32k. A fix needs to be done for this, but I don't know the design of win32k+csrss well enough to find a solution.
8) SEH has been commented out in some places of the new probing code because it breaks smss and explorer. These need to be investigated (seh did not exist in the previous code, so this is not really a hack)
9) Named objects with a parent directory are NOT allowed. However because of bugs in kernel32, the new check has been temporarily disabled. (this check did not exist in the previous code, so this is not really a hack)

The next patch will add a proper ObFindObject which will support a more complete Parse Procedure with context and security information. This is needed for proper registry access (requested by Eric Kohl) and for proper functionality of the Desktop/File creation, which should use the Parse routine, and not the Create Handle Routine. This will also make it possible to remove some previous hacks and pave the way for a fixed Iop/IoCreateFile

svn path=/trunk/; revision=15395
2005-05-18 19:26:47 +00:00
Alex Ionescu
dfedb99675 Prettify usetup a bit, show a warranty page before continuing installation (not a license agreement, simply a message stating this is a beta foss product with no warranty), make progressbars have a double border and change the copy file dialog a bit. Also changed setupldr and ntoskrnl to have a more unified text-mode look/appearance when installing. The effect is really nice and the blue screen with gray status-bar appears as soon as the CD boots and takes you all the way to usetup without any breakages or black/blue/black/blue fades and confusing messages. Also, fixed ntoskrnl not to break into KDBG if /NODEBUG is set.
svn path=/trunk/; revision=15394
2005-05-18 19:08:00 +00:00
Alex Ionescu
474cd6a3e3 Fix usetup. This hack needs to remain even though it's incorrect since it's what ROS expects. I am working on rewriting IoCreateFile so these hacks can go away. Please do not remove it
svn path=/trunk/; revision=15392
2005-05-18 17:17:34 +00:00
Gé van Geldorp
b5e0081878 Move final stage of boot to architecture-dependent files
svn path=/branches/xen/; revision=15391
2005-05-17 22:15:18 +00:00
Magnus Olsen
baed69574e Fix unicode / ansi build problem for -D_DEBUG build
a old bug in cmd. 
Bug report 629 in bugzila 
fix by tinus and his patch at bugzila


 

svn path=/trunk/; revision=15390
2005-05-17 21:18:04 +00:00
Alex Ionescu
a04f8e62fe Implement mouse packet timeout. Fixes right-click menu appearing incorrectly on qemu if debuggins is used. Patch by Tinus
svn path=/trunk/; revision=15389
2005-05-17 20:51:39 +00:00
Alex Ionescu
e3757a0fb1 make cabman report error when file doesnt exist. Patch by Usurp
svn path=/trunk/; revision=15388
2005-05-17 20:43:27 +00:00
Hartmut Birr
e3ac1e89d5 Fixed rsym for executables without any debug informations.
svn path=/trunk/; revision=15387
2005-05-17 20:28:57 +00:00
Alex Ionescu
2e000e7b38 Sorry for the nonatomic commit
svn path=/trunk/; revision=15386
2005-05-17 19:16:21 +00:00
Alex Ionescu
437e9f05fc Sorry for the nonatomic commit
svn path=/trunk/; revision=15383
2005-05-17 19:06:59 +00:00
Alex Ionescu
fe3de87064 Share NtDevice/FsIoControlFile, fixes NtFsControlFile to have same functionality as NtDev...
svn path=/trunk/; revision=15382
2005-05-17 19:04:57 +00:00
Hartmut Birr
7efa574035 - Reference the file object in IopSecurityFile.
- Don't set FO_DIRECT_DEVICE_OPEN in IoCreateStreamFileObject.  
- Disabled the setting of IRP_NOCACHE, because vfat cannot handle cached and non cached requests for the same file.  
- Set the correct device object in NtWriteFile.


svn path=/trunk/; revision=15381
2005-05-17 19:00:12 +00:00
Alex Ionescu
1612126bbb Fix bug in memory mapping which caused large applications to BSOD the system. Abiword setup now works and other large apps should be fixed as well
svn path=/trunk/; revision=15380
2005-05-17 18:04:23 +00:00
Hervé Poussineau
7e68975e35 Don't empty the DriverObject extension if it is already initialized and filled
svn path=/trunk/; revision=15379
2005-05-17 17:39:50 +00:00
Casper Hornstrup
ca46632061 Enable warnings
svn path=/branches/xmlbuildsystem/; revision=15378
2005-05-17 17:28:40 +00:00
Casper Hornstrup
e8fbafa083 Disable -O2
svn path=/branches/xmlbuildsystem/; revision=15377
2005-05-17 17:19:10 +00:00
Magnus Olsen
9c34575fb2 Dorp last sync with wine and userhook
Before we can sync with wine we need to rewrite the enum 
and reg of device so it working fine in reactos and windows.

Add svn rev 15043 + only userhooks for the mouse
at last the mouse are working in tribles windows mode
but in full screen it is bit chopy. Not tested tribles 
in reactos with the new code. 







svn path=/trunk/; revision=15376
2005-05-17 15:20:24 +00:00
Magnus Olsen
db5b39ab3f fix a small bug in dinput the last sync with wine did not go well
still some bugs left

svn path=/trunk/; revision=15375
2005-05-17 12:30:52 +00:00
Gé van Geldorp
de0775314e Stub out XenHwDetect
svn path=/branches/xen/; revision=15374
2005-05-17 07:39:49 +00:00
Gé van Geldorp
ce012fe46e Implement XenDiskGetPartitionEntry
svn path=/branches/xen/; revision=15373
2005-05-17 07:35:14 +00:00
Gé van Geldorp
f46e8be691 Handle partition-less ARC paths
svn path=/branches/xen/; revision=15372
2005-05-17 07:34:17 +00:00
Casper Hornstrup
cb0e7b1029 Build sm
svn path=/branches/xmlbuildsystem/; revision=15371
2005-05-17 06:17:35 +00:00
Gé van Geldorp
a1c989ae90 Implement console input
svn path=/branches/xen/; revision=15364
2005-05-16 22:42:53 +00:00
Gé van Geldorp
82ffb770a8 Add typecasts to avoid any possibility of signed/unsigned mismatch warnings
svn path=/branches/xen/; revision=15359
2005-05-16 21:20:48 +00:00
Magnus Olsen
a5726f4420 Drop GDI version of dinput complete and add user hook version of dinput
keyboard.c thx GvG for finding the problem in reactos with user hook and implement userhook

mouse.c keep one gdi stuff left but rewrite it to userhook poll mouse 
poll mouse need to be rewrite so it fix last bug for user hook it is it move the mouse to another locations but it should 
stand still. when it insate. then we can share the code with wine 

svn path=/trunk/; revision=15358
2005-05-16 20:42:36 +00:00
Magnus Olsen
86d573abdf drop Keyboard.c gdi version
svn path=/trunk/; revision=15357
2005-05-16 20:36:26 +00:00
Gé van Geldorp
323e4455b0 Optimize screen writing
svn path=/branches/xen/; revision=15354
2005-05-16 20:16:33 +00:00
Gé van Geldorp
304a730122 Implement time functions (in GMT, really should be in local time)
svn path=/branches/xen/; revision=15350
2005-05-16 19:28:18 +00:00
Aleksey Bragin
07f2451e95 One more fix to resource DPRINTs, now they are correct, for each resource.
svn path=/trunk/; revision=15349
2005-05-16 19:24:15 +00:00
Aleksey Bragin
c9c8f865f2 Changed Memory to Port resource, also fixed incorrect DPRINT (thanks to hpoussin!)
svn path=/trunk/; revision=15348
2005-05-16 19:12:48 +00:00
Hervé Poussineau
903edc501a Don't send multiple IRP_MJ_PNP/IRP_MN_START_DEVICE in case of a device with lower/upper filters
svn path=/trunk/; revision=15347
2005-05-16 18:08:55 +00:00
Gé van Geldorp
285edece74 Implement some video routines for Xen
svn path=/branches/xen/; revision=15346
2005-05-16 18:02:10 +00:00
Hervé Poussineau
d0ea6a10df Define interrupt resource as required
svn path=/trunk/; revision=15345
2005-05-16 17:19:10 +00:00
Hervé Poussineau
4cb90117fa Report memory and I/O ranges even if they are not the first reported resources by PCI device
svn path=/trunk/; revision=15344
2005-05-16 15:56:01 +00:00
Gé van Geldorp
e0c06be76e Implement disk information functions
svn path=/branches/xen/; revision=15341
2005-05-16 14:05:44 +00:00
Casper Hornstrup
c3bfe63c19 Correct entry point of win32k.sys
svn path=/branches/xmlbuildsystem/; revision=15340
2005-05-16 12:34:01 +00:00
Casper Hornstrup
3d5d32ed36 Merge 15268:15329 from trunk
svn path=/branches/xmlbuildsystem/; revision=15339
2005-05-16 12:32:10 +00:00
Casper Hornstrup
5673e6c39d Enable warnings
svn path=/branches/xmlbuildsystem/; revision=15338
2005-05-16 12:18:02 +00:00
Casper Hornstrup
0a8ee28a63 Do automatic dependency checking for pre-compiled header files
svn path=/branches/xmlbuildsystem/; revision=15337
2005-05-16 11:41:54 +00:00
Maarten Bosma
b5f744a25a PackageManager
svn path=/trunk/; revision=15336
2005-05-16 11:14:04 +00:00
Gé van Geldorp
c075c7ff6c Merge 15285:15334 from trunk
svn path=/branches/xen/; revision=15335
2005-05-16 11:10:12 +00:00
Gé van Geldorp
9190f5135f Support partition-less disks
svn path=/trunk/; revision=15334
2005-05-16 11:06:57 +00:00
Maarten Bosma
ca8a9b2dff PackageManger: Globle Makefile
svn path=/trunk/; revision=15333
2005-05-16 11:04:21 +00:00
Maarten Bosma
0b6d2a809b PackageManager: German Translation and CreateOptions()
svn path=/trunk/; revision=15332
2005-05-16 10:53:46 +00:00
Casper Hornstrup
42715b124a Allow warnings
svn path=/branches/xmlbuildsystem/; revision=15331
2005-05-16 10:30:13 +00:00
Alex Ionescu
3d2c746433 Fix win32k. For real. I swear.
svn path=/trunk/; revision=15330
2005-05-16 00:52:43 +00:00
Alex Ionescu
0139f35fc0 Fix win32k
svn path=/trunk/; revision=15329
2005-05-16 00:38:44 +00:00
Casper Hornstrup
c6947c142e Add missing file
svn path=/branches/xmlbuildsystem/; revision=15328
2005-05-16 00:02:09 +00:00
Casper Hornstrup
82acb7297a Depend on generated RPC headers
svn path=/branches/xmlbuildsystem/; revision=15327
2005-05-15 23:43:28 +00:00
Alex Ionescu
6b86cb4406 Fix build, clean up headers, add public stuff to public headers
svn path=/trunk/; revision=15326
2005-05-15 23:24:11 +00:00
Casper Hornstrup
6208798644 Remove unused file
svn path=/branches/xmlbuildsystem/; revision=15325
2005-05-15 22:13:08 +00:00
Casper Hornstrup
4a429cdae4 Build and run tests
svn path=/branches/xmlbuildsystem/; revision=15324
2005-05-15 22:07:07 +00:00
Emanuele Aliberti
6a7f1b10c5 Make gcc 3.4.2 compile.
svn path=/trunk/; revision=15323
2005-05-15 21:41:22 +00:00
Emanuele Aliberti
468b7ba0f2 Correct a comment.
svn path=/trunk/; revision=15322
2005-05-15 21:39:10 +00:00
Gé van Geldorp
83deefac8c Handle case where a directory contains a '." but the
filename doesn't (i.e. has no extension)

svn path=/trunk/; revision=15321
2005-05-15 21:28:44 +00:00
Magnus Olsen
52b95ec424 change from atoi to sprintf
linux does not support itoa 

svn path=/trunk/; revision=15320
2005-05-15 21:11:37 +00:00
Alex Ionescu
19ea176f6d Properly create the Object Type Type and remove previous hacks added
svn path=/trunk/; revision=15319
2005-05-15 19:40:57 +00:00
Gé van Geldorp
d02a50d521 Don't let msvcrt import itself and fix the resulting problems
svn path=/branches/xmlbuildsystem/; revision=15318
2005-05-15 18:10:51 +00:00
Alex Ionescu
cf6037ee37 Make Object Type creation compatible with OB 2.0 from the caller's point of view. Use real structures for Object Type and ObjectType Initializer. Added two more hacks that I'll remove in the next commit
svn path=/trunk/; revision=15317
2005-05-15 17:59:33 +00:00
Casper Hornstrup
fa1312ce09 Generate proxy makefiles
svn path=/branches/xmlbuildsystem/; revision=15315
2005-05-15 15:56:06 +00:00
Casper Hornstrup
1c116b83ca Remove unused file
svn path=/branches/xmlbuildsystem/; revision=15314
2005-05-15 15:51:58 +00:00
Casper Hornstrup
a7b4b8b3ec Install rpcrt4.dll, samlib.dll, and setup.exe
svn path=/branches/xmlbuildsystem/; revision=15313
2005-05-15 14:30:35 +00:00
Casper Hornstrup
64b6731731 Overwrite registry only if the source files change
svn path=/branches/xmlbuildsystem/; revision=15312
2005-05-15 14:18:45 +00:00
Hartmut Birr
523c60c5d5 Don't push an already freed irp to the list (in IoFreeIrp).
svn path=/trunk/; revision=15311
2005-05-15 13:59:57 +00:00
Casper Hornstrup
7a812470b6 Re-insert makefile code for non-DLLs which was removed by accident
svn path=/branches/xmlbuildsystem/; revision=15310
2005-05-15 13:57:03 +00:00
Casper Hornstrup
01e18d413a Install explorer.exe in C:\WINDOWS
svn path=/branches/xmlbuildsystem/; revision=15309
2005-05-15 13:21:54 +00:00
Casper Hornstrup
dff44c9f17 Support modules with no base install directory
svn path=/branches/xmlbuildsystem/; revision=15308
2005-05-15 13:20:45 +00:00
Martin Fuchs
f6b3f734ac refresh available drive bar buttons after connecting to network drives or activating manual refresh
svn path=/trunk/; revision=15307
2005-05-15 12:13:17 +00:00
Casper Hornstrup
93b4d98160 Install .inf files in C:\WINDOWS\inf
svn path=/branches/xmlbuildsystem/; revision=15306
2005-05-15 12:06:12 +00:00
Casper Hornstrup
72dcc562ad Don't rename c_437.nls, c_1252.nls, and l_intl.nls on installation
svn path=/branches/xmlbuildsystem/; revision=15305
2005-05-15 12:04:02 +00:00
Casper Hornstrup
9017f3f4f6 Generate hooks and stubs for tests
svn path=/branches/xmlbuildsystem/; revision=15304
2005-05-15 11:58:48 +00:00
Martin Fuchs
d008691568 use the correct ids in options menu
svn path=/trunk/; revision=15303
2005-05-15 11:46:20 +00:00
Martin Fuchs
ba43f28c68 fix for window refresh in shell mode
svn path=/trunk/; revision=15302
2005-05-15 11:10:32 +00:00
Magnus Olsen
f20d4d059e Partiy implement long filename support
example filefilefile.txt can store now with cdmake
but not filefilefiles.txt have not check why it say not a iso9660 name 


svn path=/trunk/; revision=15301
2005-05-15 10:33:33 +00:00
Martin Fuchs
ac178266c3 ugly macro hack to use alloca() while keeping Wine's developers happy
svn path=/trunk/; revision=15300
2005-05-15 09:55:56 +00:00
Gé van Geldorp
c141408f1d user32 is becoming a big boy, give it some more space
svn path=/branches/xmlbuildsystem/; revision=15299
2005-05-15 09:41:00 +00:00
Gé van Geldorp
a0b63f65da Work around broken binutils which creates relocation
entries for the Export Table.

svn path=/branches/xmlbuildsystem/; revision=15298
2005-05-15 09:38:53 +00:00
Hervé Poussineau
5cec531950 Open port before sending IOCTLs
svn path=/trunk/; revision=15297
2005-05-15 09:30:25 +00:00
Hervé Poussineau
e1aa22c032 Correct implementation of IOCTL_SERIAL_SET_BAUD_RATE
Don't test FileObject in IRP_MJ_CREATE as it may be not valid

svn path=/trunk/; revision=15296
2005-05-15 09:29:30 +00:00
Gé van Geldorp
b7d6b92188 Remove local definitions for stuff which is now
present in our headers

svn path=/trunk/; revision=15295
2005-05-15 08:30:35 +00:00
Magnus Olsen
efe2391a80 fix uninitialized waring so gcc 3.4.3 can compile it
svn path=/trunk/; revision=15294
2005-05-15 06:49:01 +00:00
Alex Ionescu
036efb7e10 Removed incorrect Create/DuplicationNotify callbacks and replaced by a more correct Open callback which is what a windows driver would get. This is needed because of some changes I'm trying to make to get Parse routines to work properly, so I had to add two hacks for now, they will be removed within 2-3 commits
svn path=/trunk/; revision=15293
2005-05-15 04:56:52 +00:00
Casper Hornstrup
982dce03b5 Generate files for host zlib in object and output directories
svn path=/branches/xmlbuildsystem/; revision=15292
2005-05-14 22:55:21 +00:00
Gé van Geldorp
133454688d Don't include standard startup code
svn path=/branches/xmlbuildsystem/; revision=15291
2005-05-14 21:35:54 +00:00
Magnus Olsen
63d3f7d1a8 fix Warining msg used uninitialized for gcc 3.4.3
svn path=/trunk/; revision=15290
2005-05-14 20:57:23 +00:00
Martin Fuchs
34a8e38b0f add some additional translated czech strings from Wine
svn path=/trunk/; revision=15289
2005-05-14 20:07:51 +00:00
Martin Fuchs
d642e38ba1 rename czech resource file to sync wih Wine's filename
svn path=/trunk/; revision=15288
2005-05-14 19:58:30 +00:00
Gé van Geldorp
571501a46a Merge 14725:15285 from trunk
svn path=/branches/xen/; revision=15287
2005-05-14 19:45:27 +00:00
Martin Fuchs
6ebb2ab38d add polish resource file
svn path=/trunk/; revision=15286
2005-05-14 19:16:44 +00:00
Martin Fuchs
43e61f63ab fix Wine version of sort order switching
svn path=/trunk/; revision=15285
2005-05-14 19:16:24 +00:00
Gé van Geldorp
2832134fbc Implement WH_MOUSE_LL hook
svn path=/trunk/; revision=15284
2005-05-14 19:09:02 +00:00
Martin Fuchs
c7e747c1fa implement switching of file sort order
svn path=/trunk/; revision=15283
2005-05-14 18:57:07 +00:00
Magnus Olsen
dfc6fbe27e Activate serial mouse for livecd
now it support both ps2 and serial mouse

svn path=/trunk/; revision=15282
2005-05-14 18:04:53 +00:00
Gé van Geldorp
c1557a2be1 Present for GreatLord:
Implement WH_KEYBOARD_LL hook

svn path=/trunk/; revision=15281
2005-05-14 18:03:31 +00:00
Casper Hornstrup
e44380e9a3 Extract WINE resources at compile-time
svn path=/branches/xmlbuildsystem/; revision=15280
2005-05-14 17:57:31 +00:00
Casper Hornstrup
1732348d39 Only pass GCC specific options to GCC
svn path=/branches/xmlbuildsystem/; revision=15279
2005-05-14 15:07:11 +00:00
Casper Hornstrup
f326ceb70f Merge r15277 to trunk
svn path=/trunk/; revision=15278
2005-05-14 14:14:01 +00:00
Casper Hornstrup
91c4967ba6 Compile with DBG=1
svn path=/branches/xmlbuildsystem/; revision=15277
2005-05-14 14:08:31 +00:00
Emanuele Aliberti
4954251a04 distribute the sm system utility even if it does little now
svn path=/trunk/; revision=15276
2005-05-14 13:57:55 +00:00
Emanuele Aliberti
e6b395d0e7 compile the sm system utility
svn path=/trunk/; revision=15275
2005-05-14 13:43:55 +00:00
Emanuele Aliberti
e70c95d52f Little fix to compile with gcc 3.4.2
svn path=/trunk/; revision=15274
2005-05-14 12:54:53 +00:00
Casper Hornstrup
9d474ab0bd Merge 14981:15268 from trunk
svn path=/branches/xmlbuildsystem/; revision=15273
2005-05-14 12:37:12 +00:00
Martin Fuchs
0d88632d20 sync to Wine Patch: format_bytes()
svn path=/trunk/; revision=15272
2005-05-14 12:32:44 +00:00
Casper Hornstrup
72a6942f36 Copy w32api from trunk
svn path=/branches/xmlbuildsystem/; revision=15271
2005-05-13 21:23:37 +00:00
Casper Hornstrup
a73b954aba Remove w32api from branch
svn path=/branches/xmlbuildsystem/; revision=15270
2005-05-13 21:21:57 +00:00
Alex Ionescu
030580a782 Cleanup ntlock/unlockfile with proper io semantics..same stuff as previous patches
svn path=/trunk/; revision=15269
2005-05-13 21:07:40 +00:00
Casper Hornstrup
49d849fa8d Update installation instructions
svn path=/branches/xmlbuildsystem/; revision=15268
2005-05-13 19:47:30 +00:00
Casper Hornstrup
d32ad9196b Support compilerflag within IFs
svn path=/branches/xmlbuildsystem/; revision=15267
2005-05-13 19:17:44 +00:00
Casper Hornstrup
92bdf77b07 Cleanup template configuration file
svn path=/branches/xmlbuildsystem/; revision=15266
2005-05-13 19:01:46 +00:00
Martin Fuchs
6f61a478e8 display free and total disk space
svn path=/trunk/; revision=15265
2005-05-13 17:11:16 +00:00
Martin Fuchs
3feb9db02b adjustments for GCC and MinGW
svn path=/trunk/; revision=15264
2005-05-13 15:35:55 +00:00
Martin Fuchs
a0cb9c83ab - error handling for network connection dialogs
- implement "format disk" dialog

svn path=/trunk/; revision=15263
2005-05-13 15:32:04 +00:00
Martin Fuchs
bccd9d6a2c malloc.h include
svn path=/trunk/; revision=15262
2005-05-13 14:53:40 +00:00
Martin Fuchs
9759ec3705 implement network connect and disconnect dialogs
svn path=/trunk/; revision=15261
2005-05-13 14:48:10 +00:00
Martin Fuchs
37de341023 display source path in "move file" dialog
svn path=/trunk/; revision=15260
2005-05-13 14:21:37 +00:00
Martin Fuchs
6ff7821b69 fix comment, declare parameter type as constant
svn path=/trunk/; revision=15259
2005-05-13 10:27:19 +00:00
Martin Fuchs
e81b6ac90b replace numeric resource identifiers by their defined constants
svn path=/trunk/; revision=15258
2005-05-13 09:35:15 +00:00
Martin Fuchs
3d27af4e77 Wine compatibility changes
svn path=/trunk/; revision=15257
2005-05-13 09:09:07 +00:00
Alex Ionescu
2981638f77 Fix IRP structure (add missing member) and optimize io completion by allowing the io completion packet to be piggybacked on the IRP. Also make io completion use the cpu lookaside lists now as well as the paged pool as a last-chance attempt
svn path=/trunk/; revision=15256
2005-05-13 05:41:24 +00:00
Alex Ionescu
6d1d9cbac8 Implement Lookaside List allocation and release for IRPs on Per-CPU Lists, or global system lists if the per-cpu has been exhausted. This should tremendously reduce memory fragmentation and speed up I/o noticeably. Also, don't allocate IRPs with quota charge when they shouldn't.
svn path=/trunk/; revision=15255
2005-05-13 04:49:54 +00:00
Alex Ionescu
9ca493afb5 Fix lookaside structures, rewrite lookaside code to use new structures, remove some excess abstraction, correct export incorrectly exported as fastcall, fix up macros, add basic init code to allocate lookaside lists for IRPs as well as per-cpu lookaside lists for irps and completion packets
svn path=/trunk/; revision=15254
2005-05-13 03:34:13 +00:00
Art Yerkes
5510552add Fixed wrong STATUS_BUFFER_TOO_SMALL return to documented success return
in the buffer too small case.

svn path=/trunk/; revision=15253
2005-05-13 02:05:15 +00:00
Hervé Poussineau
dcb2ef8cd7 Change ASSERTs to assert on existent variables
svn path=/trunk/; revision=15252
2005-05-12 21:46:50 +00:00
Hervé Poussineau
7f0e11f913 White space cleanup, correct indentation
svn path=/trunk/; revision=15251
2005-05-12 21:45:20 +00:00
Hervé Poussineau
0af5d166a2 fdo.c: don't allocate a buffer with a SERENUM_TAG, because it is freed in ntoskrnl.
misc.c: correct comment
serenum.h: remove ExFreePoolWithTag macro and use function exported by ntoskrnl

svn path=/trunk/; revision=15250
2005-05-12 21:41:21 +00:00
Magnus Olsen
27e330b72b Remove all hardcode string to En.rc
so it can be translaterem

svn path=/trunk/; revision=15249
2005-05-12 21:10:10 +00:00
Casper Hornstrup
ec7d8b2029 Merge 12736:14980 from trunk
svn path=/branches/xmlbuildsystem/; revision=15248
2005-05-12 21:03:51 +00:00
Magnus Olsen
6873af6255 Did forget include En.rc :)
svn path=/trunk/; revision=15247
2005-05-12 20:26:34 +00:00
Magnus Olsen
3ad5fab2d4 Remove all hardcode string to En.rc
so it can be translate

svn path=/trunk/; revision=15246
2005-05-12 20:04:02 +00:00
Aleksey Bragin
0eff533e7c Added MessageBoxes in case of registry funcs errors
svn path=/trunk/; revision=15245
2005-05-12 19:46:14 +00:00
Casper Hornstrup
9c85c4d513 Generate make rules for creating directories if they don't exist
svn path=/branches/xmlbuildsystem/; revision=15244
2005-05-12 19:32:15 +00:00
Magnus Olsen
08142b98ea Remove all hardcode string to En.rc
so it can be translate

svn path=/trunk/; revision=15243
2005-05-12 19:31:10 +00:00
Magnus Olsen
d344ac5409 Add hex value to Color syntax so it working fine
Color x 
x = a - f



svn path=/trunk/; revision=15242
2005-05-12 18:20:41 +00:00
Thomas Bluemel
03800ad522 svn path=/trunk/; revision=15241 2005-05-12 18:08:25 +00:00
Alex Ionescu
c24c77ccaf Fix uninit var
svn path=/trunk/; revision=15240
2005-05-12 18:05:22 +00:00
Magnus Olsen
fbeb0ec2cd Add syntax Color x
x = 0 to 9 Now color are working as it should


svn path=/trunk/; revision=15239
2005-05-12 17:30:52 +00:00
Magnus Olsen
1add9174ff Fix two spelling error
thx dnordenberg to notice them

svn path=/trunk/; revision=15238
2005-05-12 16:44:39 +00:00
Alex Ionescu
5fe9818563 Small fix.
svn path=/trunk/; revision=15237
2005-05-12 11:54:08 +00:00
Magnus Olsen
ade7456218 really small optimze remove lenvalu * sizeof(WCHAR) so it doing it only one time
svn path=/trunk/; revision=15236
2005-05-12 05:01:23 +00:00
Alex Ionescu
32962bc31c cleanup NtDeviceIoControlFile a bit...remove some redundant stuff
svn path=/trunk/; revision=15235
2005-05-12 04:17:43 +00:00
Brian Palmer
942e1f4649 Remove old DJGPP NTVDM patch files.
svn path=/trunk/; revision=15234
2005-05-12 03:00:49 +00:00
Brian Palmer
4b2a42963f Support getting the boot drive from the BIOS or the value in the BPB.
svn path=/trunk/; revision=15233
2005-05-12 02:57:13 +00:00
Casper Hornstrup
d927b8d8fe Generate static libraries in intermediate directory
svn path=/branches/xmlbuildsystem/; revision=15232
2005-05-11 20:58:40 +00:00
Alex Ionescu
b693fc160a Fix incorrect call to ntopenprocess
svn path=/trunk/; revision=15231
2005-05-11 20:45:48 +00:00
Thomas Bluemel
23e79dcdb3 remove explicit bugcheck in NtOpenProcess when the caller supplies a thread CID of -1, looks like this was added for debug purpose and accidently committed.
svn path=/trunk/; revision=15230
2005-05-11 20:04:48 +00:00
Martin Fuchs
30ec640bd2 Synchronisation with ibrowser source code
svn path=/trunk/; revision=15229
2005-05-11 19:15:36 +00:00
Martin Fuchs
f5b2c461dc eliminate GCC4 warnings
svn path=/trunk/; revision=15228
2005-05-11 19:13:20 +00:00
Martin Fuchs
b269a8333e Synchronisation with explorer source code
svn path=/trunk/; revision=15227
2005-05-11 19:12:26 +00:00
Martin Fuchs
7862b7c070 Makefile maintainancement
svn path=/trunk/; revision=15226
2005-05-11 19:12:03 +00:00
Martin Fuchs
7313b15dbd eliminate GCC4 warnings
svn path=/trunk/; revision=15225
2005-05-11 19:11:27 +00:00
Martin Fuchs
267f11a8b4 eliminate GCC4 warnings (patch by Thomas Weidenmueller)
svn path=/trunk/; revision=15224
2005-05-11 19:08:36 +00:00
Casper Hornstrup
be0cf8ed70 Use mingw convention for import libraries (libmodule.a)
svn path=/branches/xmlbuildsystem/; revision=15223
2005-05-11 17:37:46 +00:00
Martin Fuchs
4358dbd01a fix listbox insert algorithmus
svn path=/trunk/; revision=15222
2005-05-11 17:30:21 +00:00
Casper Hornstrup
7dfdcabef9 Rebuild import library if definition file is modified
svn path=/branches/xmlbuildsystem/; revision=15221
2005-05-11 17:12:24 +00:00
Thomas Bluemel
8ece706e06 revert the changes i accidently committed
svn path=/trunk/; revision=15220
2005-05-11 17:03:00 +00:00
Thomas Bluemel
abef9ffacb fixed warnings
svn path=/trunk/; revision=15218
2005-05-11 16:50:39 +00:00
Thomas Bluemel
58d25e229d fixed function prototype
svn path=/trunk/; revision=15217
2005-05-11 16:15:25 +00:00
Martin Fuchs
36551f7fd9 fix for updated MinGW headers: comditional compilation for HSHELL_RUDEAPPACTIVATED
svn path=/trunk/; revision=15216
2005-05-11 15:24:59 +00:00
Martin Fuchs
4dd64b9022 some more spelling fixes
svn path=/trunk/; revision=15215
2005-05-11 14:50:00 +00:00
Martin Fuchs
a0b46d6812 Sync to Wine:
date: 2005/02/25 14:07:56
Jon Griffiths <jon_p_griffiths@yahoo.com>
Documentation spelling fixes.

svn path=/trunk/; revision=15214
2005-05-11 14:49:24 +00:00
Martin Fuchs
aa88e039cb Sync to Wine: (rewritten bug fix)
date: 2004/12/14 11:43:30
Piotr Caban <pio13@poczta.onet.pl>
Fixed display bug.

svn path=/trunk/; revision=15213
2005-05-11 14:46:42 +00:00
Martin Fuchs
dfd0cd04aa Sync to Wine:
date: 2004/11/30 21:38:57
Eric Pouech <pouech-eric@wanadoo.fr>
Const correctness fixes.

svn path=/trunk/; revision=15212
2005-05-11 14:36:40 +00:00
Martin Fuchs
7b801b61fd - Sync to Wine:
date: 2004/11/24 18:28:31;  author: julliard
Avoid using the MAKEPOINTS macro, it's broken on big endian.

- Fix of this patch: use screen relative coordinates for ShellFolderContextMenu()

svn path=/trunk/; revision=15211
2005-05-11 14:33:51 +00:00
Martin Fuchs
9b8bfb6e8b Sync to Wine:
date: 2005/02/23 20:58:09
Henning Gerhardt <henning.gerhardt@web.de>
Small fix for the German resource file.

date: 2005/02/15 20:46:19
Henning Gerhardt <henning.gerhardt@web.de>
Add/updated German resources.

svn path=/trunk/; revision=15210
2005-05-11 14:19:23 +00:00
Martin Fuchs
1b32c4c9b7 Sync to wine:
date: 2005/02/14 11:12:30
Marcelo Duarte <wine-devel@bol.com.br>
Update the resources for Portuguese.

date: 2005/02/10 17:14:15
Américo José Melo <mmodem00@netvisao.pt>
Francois Gouget <fgouget@codeweavers.com>
Translate the Wine resources to Portuguese.

svn path=/trunk/; revision=15209
2005-05-11 14:18:24 +00:00
Martin Fuchs
2bccb359f2 Sync to Wine:
date: 2005/01/26 19:42:40
Hans Leidekker <hans@it.vu.nl>
Don't use utf8 in rc files.

svn path=/trunk/; revision=15208
2005-05-11 14:16:05 +00:00
Martin Fuchs
319058265a sync to wine:
date: 2005/02/16 21:10:59
Alex VillacÝs Lasso <a_villacis@palosanto.com>
Change SUBLANG_DEFAULT to SUBLANG_NEUTRAL for LANG_SPANISH in all
resources, so that Spanish locales other than Spain also use Spanish
resources.

date: 2005/01/03 14:45:36
JosÚ Manuel Ferrer Ortiz <jmfo1982@yahoo.es>
Added Spanish translation.


date: 2004/11/21 15:49:24
JosÚ Manuel Ferrer Ortiz <jmfo1982@yahoo.es>
Updated Spanish translations.

svn path=/trunk/; revision=15207
2005-05-11 14:14:33 +00:00
Martin Fuchs
605a9b8e50 add chech and svedish resource files
svn path=/trunk/; revision=15206
2005-05-11 14:11:40 +00:00
Thomas Bluemel
4fb7ebe206 use proper scancode to create upper-case hex numbers directly
svn path=/trunk/; revision=15205
2005-05-11 13:20:34 +00:00
Magnus Olsen
fc2d392cac use _wcsupr to make swedish chater display right when it change langues
this fix maby also fix rus langues display right now after langues change


svn path=/trunk/; revision=15204
2005-05-11 09:56:24 +00:00
Maarten Bosma
26bfaa0941 Set language to czech not to english in cz.rc
svn path=/trunk/; revision=15203
2005-05-10 13:03:40 +00:00
Hervé Poussineau
b4a414fec7 Allow a NULL PeripheralType in IoQueryDeviceDescription
svn path=/trunk/; revision=15202
2005-05-10 09:38:20 +00:00
Hervé Poussineau
c32fd82fbf Implement IoInvalidateDeviceRelations
svn path=/trunk/; revision=15201
2005-05-10 09:34:20 +00:00
Thomas Bluemel
fa832dae41 fixed some more warnings
svn path=/trunk/; revision=15200
2005-05-10 08:15:08 +00:00
Thomas Bluemel
e55b576d82 fixed some more warnings
svn path=/trunk/; revision=15199
2005-05-10 08:04:08 +00:00
Thomas Bluemel
d421003cd4 - disable -Werror for lib/mesa32 to get it to compile with GCC4, however, an upgrade to 6.2.1 would solve these problems
- fixed a few more warnings, the the tree should now fully compile and work with GCC4

svn path=/trunk/; revision=15198
2005-05-10 06:17:54 +00:00
Magnus Olsen
184f23e0a5 Swedish charaters was gone. it should also commit to wine
svn path=/trunk/; revision=15197
2005-05-10 06:13:39 +00:00
Alex Ionescu
2670be2117 Reuse buffer in IopQueryNameFile, since it's temporary and the first one we allocate is already large enough. Also block out SEH in ntread/write file since it seems to crash some user mode code.
svn path=/trunk/; revision=15196
2005-05-09 23:39:08 +00:00
Alex Ionescu
de8ae0fbd2 Revert most of IoCreateStreamFileObject... it's wrong but needs to be wrong for now.
svn path=/trunk/; revision=15195
2005-05-09 22:35:43 +00:00
Phillip Susi
dfcf0aade2 Fixed backwards access check that was causing NtWriteFile to fail when given a read only buffer
svn path=/trunk/; revision=15194
2005-05-09 22:12:43 +00:00
Thomas Bluemel
6ed3a8cd3f fixed some more warnings
svn path=/trunk/; revision=15193
2005-05-09 22:05:47 +00:00
Hartmut Birr
78fdef703c Removed the deallocation of the irp on error after IoBuildSynchronousFsdRequest in NtRead/WriteFile.
There is no irp at this point. If the exception handler is hit, the irp isn't set.

svn path=/trunk/; revision=15192
2005-05-09 21:28:01 +00:00
Alex Ionescu
3c1ebc7084 Fix rc file
svn path=/trunk/; revision=15191
2005-05-09 20:14:10 +00:00
Alex Ionescu
1f40540008 Implement Access State support (SeCreate/DeleteAccessState and SeSetAccessStateGenericMapping. Based on a patch by Javier M. Mellid
svn path=/trunk/; revision=15190
2005-05-09 19:57:41 +00:00
Alex Ionescu
786ed0c605 unmix cases
svn path=/trunk/; revision=15189
2005-05-09 19:08:49 +00:00
Alex Ionescu
61d93abfe3 grr
svn path=/trunk/; revision=15188
2005-05-09 19:05:41 +00:00
Filip Navara
43a5877d27 tinus <o112w8r02@sneakemail.com>
Use ExFreePool instead of RtlFreeUnicodeString.

svn path=/trunk/; revision=15187
2005-05-09 16:00:21 +00:00
Magnus Olsen
581f944e3e Remove ntvdmpat.exe it is not need any longe it was for djgpp
svn path=/trunk/; revision=15186
2005-05-09 12:32:10 +00:00
Steven Edwards
e92888a801 strip the whitespace one more time
svn path=/trunk/; revision=15185
2005-05-09 11:03:44 +00:00
Steven Edwards
3546d3215b correct typo in header to fix the build
svn path=/trunk/; revision=15184
2005-05-09 11:02:48 +00:00
Magnus Olsen
86c0dfdf7e update swedish translation by Harteex
svn path=/trunk/; revision=15183
2005-05-09 10:06:58 +00:00
Magnus Olsen
3280490f6d Fix spellinng error in En.rc
STRING_DIR_HELP8 it should not be "Dirs" it must be "Files"
then it was a "command" wrong spelling in one place


 

svn path=/trunk/; revision=15182
2005-05-09 09:52:48 +00:00
Magnus Olsen
dfd6899631 remove doublecate string STRING_CHCP_ERROR2 and replace it with STRING_ERROR_INVALID_PARAM_FORMAT
Fr.rc and En.rc 
STRING_CHCP_ERROR2 been remove

svn path=/trunk/; revision=15181
2005-05-09 08:43:05 +00:00
Magnus Olsen
32bf2f5e5e remove doublecate string STRING_CHCP_ERROR3 and replace it with STRING_ERROR_INVALID_PARAM_FORMAT
Fr.rc
change STRING_CHCP_ERROR3 to STRING_ERROR_INVALID_PARAM_FORMAT

En.rc 
STRING_CHCP_ERROR3 been remove

svn path=/trunk/; revision=15180
2005-05-09 08:23:18 +00:00
Magnus Olsen
395512ca9a wrong string where being use when you type echo
thx David Nordenberg for notify me about it

svn path=/trunk/; revision=15179
2005-05-09 06:14:54 +00:00
Alex Ionescu
37707ad1a6 Make the remaning code match the current formatting instead of being really ugly, and make some changes to IoCreateFileStreamObject (which is wrong anyways, since it's doing what *Lite should do)
svn path=/trunk/; revision=15178
2005-05-09 04:31:04 +00:00
Alex Ionescu
834acf81da Fix IopSecurityFile: Do not use BuildFsd, create IRP manually for sync/async, support assigning SD to device instead of file, and signal unimplemented set sd to device, simplify code for file object setting and remove duplication, wait on right event and return the matching status. moved static io security function to se subsystem and renamed it from default to world to better match what it's doing
svn path=/trunk/; revision=15177
2005-05-09 03:58:35 +00:00
Alex Ionescu
db63a3b1ad Fix NtSetInformationFile: Cleanup FileCompletionInformation case, use Tag. Use right device object, read FileObject->FinalStatus, use right flags to IO manager can do the cleanup and buffered io semantics, support sync or async waiting
svn path=/trunk/; revision=15176
2005-05-09 03:02:36 +00:00
Alex Ionescu
02a4600eb8 Fix NtWriteFile: Get right Deviceobject, Use FileObject->FinalStatus, use FileObject-.CurrentByteOffset if ByteOffset == FILE_USER_FILE_POINTER_POSITION, add SEH, use right event requested access, set IRP_WRITE_OPERATION flag, add support for IRP_NOCACHE and add support for SL_WRITE_THROUGH if FO_WRITE_THROUGH is enabled.
svn path=/trunk/; revision=15175
2005-05-09 02:15:03 +00:00
Steven Edwards
71b6d3cb0f strip whitespace from end of lines
svn path=/trunk/; revision=15174
2005-05-09 02:04:53 +00:00
Steven Edwards
5c173216a2 strip whitespace from end of lines
svn path=/trunk/; revision=15173
2005-05-09 01:50:07 +00:00
Steven Edwards
7cecaf25e8 strip whitespace from end of lines
svn path=/trunk/; revision=15172
2005-05-09 01:46:57 +00:00
Steven Edwards
baa31fc9e5 strip whitespace from end of lines
svn path=/trunk/; revision=15171
2005-05-09 01:46:46 +00:00
Steven Edwards
c31bbf06e5 strip whitespace from end of lines
svn path=/trunk/; revision=15170
2005-05-09 01:44:13 +00:00
Steven Edwards
189e9fae5c strip whitespace from end of lines
svn path=/trunk/; revision=15169
2005-05-09 01:43:41 +00:00
Steven Edwards
395f5dc9e5 strip whitespace from end of lines
svn path=/trunk/; revision=15168
2005-05-09 01:43:25 +00:00
Steven Edwards
6a73e87d9b strip whitespace from end of lines
svn path=/trunk/; revision=15167
2005-05-09 01:42:07 +00:00
Steven Edwards
ae4b8f6e93 strip whitespace from end of lines
svn path=/trunk/; revision=15166
2005-05-09 01:41:26 +00:00
Steven Edwards
eace72f07c strip whitespace from end of lines
svn path=/trunk/; revision=15165
2005-05-09 01:41:02 +00:00
Steven Edwards
e4be245882 strip whitespace from end of lines
svn path=/trunk/; revision=15164
2005-05-09 01:38:29 +00:00
Alex Ionescu
2d9fea6a7c Fix KDBG and enable IRP_NOCACHE for ReadFile. Also disable SEH for Buffer since PRobeForWrite has a bug and cannot probe past a page
svn path=/trunk/; revision=15163
2005-05-09 01:14:42 +00:00
Alex Ionescu
9248a9d298 Fix uninitailzied variable on dbg=0
svn path=/trunk/; revision=15162
2005-05-09 01:06:39 +00:00
Alex Ionescu
4dbcb4368f Grrr..it's getting late or something. CORRECT fix.
svn path=/trunk/; revision=15161
2005-05-09 01:01:18 +00:00
Alex Ionescu
261e754d28 Sorry, wrong version got commited
svn path=/trunk/; revision=15160
2005-05-09 00:41:55 +00:00
Magnus Olsen
4cced63916 remove last hardcode string to En.rc
need translate to other langes new strings in En.rc
are IDS_DNS_ERROR, IDS_SOCKET_ERROR, IDS_GET_SRV_ERROR, IDS_CON_SRV_ERROR 

svn path=/trunk/; revision=15159
2005-05-09 00:38:57 +00:00
Alex Ionescu
2ba13f06b1 Fix a previous bug and fix NtReadFile: Read FileObject Status, Set Read Operation, support IRP_NOCACHE (ReactOS doesn't like this because of some other bug i'm investigating), use right event reqeuested access, add SEH
svn path=/trunk/; revision=15158
2005-05-09 00:33:23 +00:00
Magnus Olsen
dd19f592a2 Remove all hardcode string from format to En.rc
so it can be translate

svn path=/trunk/; revision=15157
2005-05-09 00:05:15 +00:00
Magnus Olsen
31dea0cce5 Udate french langues and make it unicode
by Usurp

Set eol-style on resurce.h

svn path=/trunk/; revision=15156
2005-05-08 22:02:16 +00:00
Thomas Bluemel
6dd1154d67 Patch by tinus: use the right access mode. fixes bug 627
svn path=/trunk/; revision=15155
2005-05-08 21:55:28 +00:00
Magnus Olsen
a2d9c4e1e9 set eol style
svn path=/trunk/; revision=15154
2005-05-08 21:54:32 +00:00
Magnus Olsen
096abbc0b1 forget the .rc file
svn path=/trunk/; revision=15153
2005-05-08 21:51:23 +00:00
Magnus Olsen
689829649e My and W3seek patch to make format ansi and unicode independen
it is first step to make a rc files for format

svn path=/trunk/; revision=15152
2005-05-08 21:50:39 +00:00
Alex Ionescu
3dfbc26474 Fix NtQueryDirectoryFile to wait on right status, to actually use the event that the user gives, to select the right device and sync/async wait mode and always use FileIndex = 0 since nothing else can be used for this API.
svn path=/trunk/; revision=15151
2005-05-08 20:20:14 +00:00
Magnus Olsen
67627091db Reomve string STRING_CMD_INVALIDDRIVE in En.rc it was doublcate of STRING_FREE_ERROR1
thanks Usurp for finding it 

svn path=/trunk/; revision=15150
2005-05-08 20:15:54 +00:00
Thomas Bluemel
54f6a09bb2 prevent buffer overflow, LoadString accepts the size of the buffer in TCHARs, not in bytes! Please guys, read the documentation of the function _before_ you use it...
svn path=/trunk/; revision=15149
2005-05-08 19:22:28 +00:00
Klemens Friedl
539af1d0d0 update taskmgr german language resource file
svn path=/trunk/; revision=15148
2005-05-08 19:14:18 +00:00
Thomas Bluemel
51d7b8f785 fixed more uninitialized variables warnings
svn path=/trunk/; revision=15147
2005-05-08 19:10:23 +00:00
Thomas Bluemel
87bab86c6b don't generate lvalue assignment code
svn path=/trunk/; revision=15145
2005-05-08 18:32:57 +00:00
Magnus Olsen
65305e4968 Remove two hardcode string to En.rc it is IDS_Not_Responding, IDS_Running
thx irc: potapnik for notice one of them 


svn path=/trunk/; revision=15144
2005-05-08 18:20:39 +00:00
Casper Hornstrup
df8fe14cb4 Remove unneeded w32api files
svn path=/trunk/; revision=15143
2005-05-08 18:07:35 +00:00
Casper Hornstrup
c78d3be5ff Re-add local w32api changes
svn path=/trunk/; revision=15142
2005-05-08 18:02:41 +00:00
Casper Hornstrup
01df92bcb4 Copy w32api 2.5 to trunk
svn path=/trunk/; revision=15141
2005-05-08 17:44:37 +00:00
Casper Hornstrup
701c28c2d1 Delete old w32api
svn path=/trunk/; revision=15140
2005-05-08 17:43:21 +00:00
Magnus Olsen
6ad1c42efb Remove last hardcode string I have check the soure 3more time after I found some more hardcode string
at last every hardcode string are gone in cmd and place in En.rc
new strings in en.rc
STRING_COPY_FILE , STRING_DELETE_WIPE, STRING_FOR_ERROR, STRING_SCREEN_COL, STRING_SCREEN_ROW, STRING_TIMER_TIME

remove some unlsess value in chcp it is no longer in use thanks we are  chaching the codepage hole time. 

svn path=/trunk/; revision=15136
2005-05-08 17:33:17 +00:00
Alex Ionescu
59b1628118 forgot this guy
svn path=/trunk/; revision=15133
2005-05-08 16:50:18 +00:00
Hartmut Birr
578153056c Changed the trap prolog, each exception can have its own trap handler.
svn path=/trunk/; revision=15132
2005-05-08 16:07:43 +00:00
Hartmut Birr
647ee2a30d Fixed the unlocking of pages from a mdl.
svn path=/trunk/; revision=15131
2005-05-08 16:02:38 +00:00
Hartmut Birr
5fd03c29e4 Free the irp after a close operation.
svn path=/trunk/; revision=15130
2005-05-08 16:00:59 +00:00
Hartmut Birr
6e529ef561 Fixed the stack switching.
It isn't possible to access memory between changing the stack and setting the cr3 register. 
A page fault needs a valid kmode stack which is possible not available.

svn path=/trunk/; revision=15129
2005-05-08 15:59:07 +00:00
Gé van Geldorp
f4ce8b5664 Fix for nasm 0.98
svn path=/trunk/; revision=15124
2005-05-08 15:40:25 +00:00
Magnus Olsen
e622b8798b found some hard code string move them to En.rc
them new are STRING_CMD_INVALIDDRIVE, STRING_CMD_SHELLINFO, STRING_VERSION_RUNVER
remove some #define strings that was not in use. 
update ver so it output svn version number and update copyright note 
it take the copyright and buildversion from <reactos/resource.h> and <reactos/buildno.h> 
so we only need change it on one place

svn path=/trunk/; revision=15123
2005-05-08 14:48:24 +00:00
Casper Hornstrup
1513e26e14 Relink executable if definition file changes.
svn path=/branches/xmlbuildsystem/; revision=15122
2005-05-08 14:39:46 +00:00
Casper Hornstrup
f614754ad3 Be consistent when passing --dll argument to gcc
svn path=/branches/xmlbuildsystem/; revision=15121
2005-05-08 14:30:04 +00:00
Casper Hornstrup
d8679de61a Build non-stripped version of ntoskrnl.exe if requested
svn path=/branches/xmlbuildsystem/; revision=15120
2005-05-08 13:45:50 +00:00
Magnus Olsen
d963f8c48f "Sync to Wine-20050419" by GvG
update reactos specify patch by Magnus Olsen
markout better what is reactos specify code
but not all code are not mark

svn path=/trunk/; revision=15119
2005-05-08 11:51:28 +00:00
Hartmut Birr
ad3d28c6d8 Free the irp after a close operation.
svn path=/trunk/; revision=15118
2005-05-08 10:33:45 +00:00
Hartmut Birr
83fb8b7c7c - Changed IopCompleteRequest back to the old schematics (rev 14933) with some minor corrections.
- The status results are always set before an event is signaled.    
- Some checks for ASYNC irp's were wrong (missing brackets, now replaced with SyncIrp).    
- Don't signal the FO event if it is the same as the UserEvent.  
- Set the IOSB on error for async irp's with a sync FO (fix bug #609).    

IMHO, the old schematics is wrong, because on error it is possible that an event
isn't signaled if the driver has previous returned STATUS_PENDING.   
In this case, the caller will wait forever.

svn path=/trunk/; revision=15117
2005-05-08 10:26:34 +00:00
Alex Ionescu
35deccffea Make rtl use a single header. Helps for PCH and will help for the new Headers (no need to change each file)
svn path=/trunk/; revision=15115
2005-05-08 05:14:46 +00:00
Steven Edwards
f60871a43b remove whitespace from end of lines
svn path=/trunk/; revision=15112
2005-05-08 04:22:15 +00:00
Steven Edwards
27479fb866 remove whitespace from end of lines
svn path=/trunk/; revision=15111
2005-05-08 04:07:56 +00:00
Thomas Bluemel
917fe293f6 more fixes for GCC4
svn path=/trunk/; revision=15110
2005-05-08 03:09:14 +00:00
Thomas Bluemel
1d36259d85 Don't declare constants as export and later define it as static. This is not allowed by GCC4.
svn path=/trunk/; revision=15109
2005-05-08 02:30:45 +00:00
Steven Edwards
93f075f207 remove whitespace from end of lines
svn path=/trunk/; revision=15108
2005-05-08 02:16:32 +00:00
Steven Edwards
1e81d3ff1f remove whitespace from end of lines
svn path=/trunk/; revision=15107
2005-05-08 02:15:21 +00:00
Steven Edwards
476cbed37c remove whitespace from end of lines
svn path=/trunk/; revision=15106
2005-05-08 02:11:54 +00:00
Magnus Olsen
f6b87bd320 Fireball patch for fixing RtlUnicodeStringToInteger and RtlCharToInteger
<Fireball> Imported WINE's RtlUnicodeStringToInteger and RtlCharToInteger - they were seriously broken in our revision. Thanks to GreatLord for his help pointing out this bug with me :)

svn path=/trunk/; revision=15092
2005-05-07 22:17:03 +00:00
Steven Edwards
456be5d16b remove trailing whitespace at end of lines
svn path=/trunk/; revision=15091
2005-05-07 21:24:31 +00:00
Magnus Olsen
1c29a40c45 doubicate res id my fualt
now everthing should print out right strings


svn path=/trunk/; revision=15090
2005-05-07 20:47:57 +00:00
Hartmut Birr
8005202506 - initialize a user profile before loading syssetup.dll.
- this makes it possible to install ros over an existing ros.

svn path=/trunk/; revision=15089
2005-05-07 20:20:46 +00:00
Magnus Olsen
8dd7ee7eb4 Fix a old bug in dir it did only accpet lower letters as param
change from ansi _toupper to tchar  _totupper 
it is now both uncide and ansi compatible

svn path=/trunk/; revision=15088
2005-05-07 20:02:50 +00:00
Magnus Olsen
fb0b90fd1b Andreas Bjerkeholt : Swedish translation, proofread by David Nordenberg
svn path=/trunk/; revision=15087
2005-05-07 18:20:23 +00:00
Magnus Olsen
00eb5279ca remove a debug msg after me
svn path=/trunk/; revision=15086
2005-05-07 17:57:12 +00:00
Magnus Olsen
db7dc4e7d1 Add *. to dir but it does not working in ros but in windows fine
some bug in ros 

svn path=/trunk/; revision=15085
2005-05-07 17:48:25 +00:00
Alex Ionescu
cd5450f6f9 Implement FsRtlAllocateResource, FsRtlIsPagingFile, FsRtlBalanceReads. Fix some incorrect function prototypes, rename mdl.c to fastio.c and add some more functions to it. Implement FsRtlGetfileSize to use fastio, combine dbcsname.c and name.c and pretty-fy the array, clean up some ugly formatting. Create context.c and move stream/file context routines there.
svn path=/trunk/; revision=15084
2005-05-07 17:44:54 +00:00
Magnus Olsen
534059e50f Remove the two last langues string it was doublecate
small change to STRING_PATH_ERROR1 in En.rc and Fr.rc
thanks Usurp for notice it



svn path=/trunk/; revision=15083
2005-05-07 15:58:58 +00:00
Alex Ionescu
881487dc6c FILE_BASIC_INFORMATION is 0x28 bytes and aligned on a 8byte boundary. Thanks to Hartmut for notifying me of a bug
svn path=/trunk/; revision=15082
2005-05-07 15:40:03 +00:00
Magnus Olsen
8e7e661c54 implement VOID ConOutResPuts (UINT resID), VOID ConErrResPuts (UINT resID) to outpust msg from rc files
it take less memmory now, and it is bit faster 

CMD_ModuleHandle 
contain GetModuleHandle and it is only execute in main() in cmd 
it optimze for lite more speed in cmd

Langues changes
in En.rc follow new strings have been add and can be translate
STRING_ERROR_WRONG_DATE
STRING_SET_ERROR

svn path=/trunk/; revision=15081
2005-05-07 15:31:07 +00:00
Eric Kohl
104e05622a Implement AssertFail and GetSetFileTimestamp.
svn path=/trunk/; revision=15080
2005-05-07 15:22:32 +00:00
Alex Ionescu
0abe7f6039 Implement FsRtlMdlRead, FsRtlMdlReadComplete, FsMdlReadCompleteDev, FsRtlMdlWRiteComplete, FsRtlMdlWriteCompleteDev, FsRtlPrepareMdlWrite, CcMdlReadCompleted, CcMdlWriteComplete, CcMdlReadCompleteDev
svn path=/trunk/; revision=15079
2005-05-07 15:19:33 +00:00
Magnus Olsen
e18192ed67 Forget change two line in chcp so it did not compile
svn path=/trunk/; revision=15078
2005-05-07 12:04:59 +00:00
Magnus Olsen
a418e5094f the name GetCodePage and OutCodePage is a bit misleading, change it to InputCodePage and OutputCodePage
svn path=/trunk/; revision=15077
2005-05-07 11:54:22 +00:00
Magnus Olsen
e23d422877 Add cache for codepage so it does not call hole time on csrss when it wring out text
it will incress the speed.  Thx w3seek and kjk for the idea.

svn path=/trunk/; revision=15076
2005-05-07 11:14:58 +00:00
Casper Hornstrup
fcd3eba58a Make expat a static library
svn path=/branches/xmlbuildsystem/; revision=15075
2005-05-07 08:32:28 +00:00
Casper Hornstrup
0f6993a1eb Correct typo
svn path=/branches/xmlbuildsystem/; revision=15074
2005-05-07 08:15:07 +00:00
Casper Hornstrup
9b6d13c91b Correctly forward exports to NTDLL
svn path=/branches/xmlbuildsystem/; revision=15073
2005-05-07 08:08:12 +00:00
Casper Hornstrup
2bf694521a Smdll is a native DLL. Thanks to Ge van Geldorp for figuring this out.
svn path=/branches/xmlbuildsystem/; revision=15072
2005-05-07 07:46:54 +00:00
Alex Ionescu
a027f33c15 Update Fast I/O Dispatch routines to proper defintions, and move some stuff into io defines instead of internal native types. Remove outdated data due to newest IFS.
svn path=/trunk/; revision=15071
2005-05-07 06:09:56 +00:00
Alex Ionescu
f11525033d Fix driver loading. patch by tinus
svn path=/trunk/; revision=15070
2005-05-07 01:17:36 +00:00
Alex Ionescu
ee7e1eefbe More IRP Completion changes. Use proper stack count and other semantics, as documented in NT File System Internals. These changes don't break anything :P
svn path=/trunk/; revision=15069
2005-05-07 01:13:04 +00:00
Alex Ionescu
7ed5318927 Update ETHREAD to latest version.
svn path=/trunk/; revision=15068
2005-05-07 00:37:48 +00:00
Thomas Bluemel
c38185a947 ReadFile should return 0 to lpNumberOfBytesRead if NtReadFile returned STATUS_END_OF_FILE for synchronous operations
svn path=/trunk/; revision=15067
2005-05-07 00:21:06 +00:00
Alex Ionescu
3d44032203 Fix win32k to use new EPROCESS defintion
svn path=/trunk/; revision=15066
2005-05-06 22:55:52 +00:00
Alex Ionescu
8c4f9d3417 Update EPROCESS to latest version. Basic Fast Referencing Stubs to allow Token access. Needs to be implemented. Use ActiveProcessLinks instead of ros-specific list.
svn path=/trunk/; revision=15065
2005-05-06 22:54:40 +00:00
Gé van Geldorp
c9ff7749cf Link against static lib instead of dll
svn path=/branches/xmlbuildsystem/; revision=15064
2005-05-06 22:38:00 +00:00
Thomas Bluemel
6ab4605c43 upgrade to PSEH2 (note, the new macros are still named _SEH_*, not _SEH2_*!)
svn path=/trunk/; revision=15063
2005-05-06 22:25:30 +00:00
Aleksey Bragin
9c40b2406e Patch by tinus: Resolves issue of keyboard detection when e.g. booting ReactOS under VMWare with no keyboard grabbed.
svn path=/trunk/; revision=15062
2005-05-06 21:18:20 +00:00
Magnus Olsen
069ef02dff <tinus_> "Forgotten file from commit 14982"
svn path=/trunk/; revision=15061
2005-05-06 20:45:30 +00:00
Magnus Olsen
d01fb36f3c HKLM,"SYSTEM\CurrentControlSet\Services\i8042Prt\Parameters","SampleRate",0x00010001,0x00000060
60 are the dec value but it have not be convort to hex that is 0x3c

legmet value are, e.g., 10, 20, 40,   60, 80, 100, 200.'
in dec in hex 0x0a, 0x14, 0x28, 0x3c, 0x50, 0x64,  0xc8

svn path=/trunk/; revision=15060
2005-05-06 20:12:37 +00:00
Gé van Geldorp
6bd014f928 Update status
svn path=/trunk/; revision=15059
2005-05-06 19:42:39 +00:00
Gé van Geldorp
1bac2f80fc Sync to Wine-20050419:
Peter Berg Larsen <pebl@math.ku.dk>
- Janitorial: Get rid of strncpy/strncpyW.

svn path=/trunk/; revision=15057
2005-05-06 19:18:46 +00:00
Gé van Geldorp
03a1e1b191 Sync to Wine-20050419:
Robert Reif <reif@earthlink.net>
- Stub out DRVM_MAPPER_RECONFIGURE support.
- Correctly handle where waveOutGetPosition changes timepos.wType
  because the requested type is not supported.
- Added Jeremy White's waveOutGetPosition fix to waveInGetPosition.
- Fix memory leak in error path.
- Provide default implementation of waveInPrepareHeader and
  waveInUnprepareHeader if driver doesn't support them.
Jose Manuel Ferrer Ortiz <jmfo1982@yahoo.es>
- Spanish translations updated.
Peter Berg Larsen <pebl@math.ku.dk>
- Assorted memleak fixes. Found on Michael Stefaniuc smatch list.
Jeremy White <jwhite@codeweavers.com>
- Do not fallback to defaults if a driver, mapper, or midi is specified
  in the registry; consolidate MMDRV_Init() into a single function.
Robert Reif <reif@earthlink.net>
- Fix memory leak when there are too many drivers.
Vincent Beron <vberon@mecano.gme.usherb.ca>
- Correct and complete some api documentation.
Filip Navara <xnavara@volny.cz>
- Specify correct buffer size in GetPrivateProfileStringW calls.
Jakob Eriksson <jakov@vmlinux.org>
- Get rid of HeapAlloc casts.
Jason Edmeades <us@the-edmeades.demon.co.uk>
- Avoid trap in mixerGetLineControlsA when cControls is uninitialized
  and MIXER_GETLINECONTROLSSF_ONEBYTYPE requested.

svn path=/trunk/; revision=15056
2005-05-06 19:16:10 +00:00
Gé van Geldorp
c963e3149a Fix filename case
svn path=/trunk/; revision=15055
2005-05-06 19:11:20 +00:00
Casper Hornstrup
610edc2729 Correct typo
svn path=/trunk/; revision=15054
2005-05-06 19:06:59 +00:00
Magnus Olsen
9736e48f66 Thx w3seek that pointout a bug in ConInString it should have been in fristplase GetConsoleCP() instead for GetConsoleOutputCP
svn path=/trunk/; revision=15053
2005-05-06 17:30:45 +00:00
Magnus Olsen
3f0b1b9276 At last unicode version of cmd are now output text with right code page
so charater on other langues like swedish, french, ... will display right now

svn path=/trunk/; revision=15052
2005-05-06 17:10:21 +00:00
Thomas Bluemel
b62466eed1 - fixed TransactNamedPipe to properly wait on completion for synchronous operations
- prevent completion port notification by not passing an APC context to the kernel when the low-order bit of the event handle is set (for asynchronous operations)

svn path=/trunk/; revision=15051
2005-05-06 16:47:09 +00:00
Gé van Geldorp
bb1d3b119b Sync to Wine-20050419:
Peter Berg Larsen <pebl@math.ku.dk>
- Strncpy elimination.
- Janitorial: Get rid of strncpy/strncpyW.
Jakob Eriksson <jakov@vmlinux.org>
- Get rid of HeapAlloc casts.
Troy Rollo <wine@troy.rollo.name>
- Corrections to UrlIsW and UrlIsA.
- URL_IS_OPAQUE results depend only on the scheme, not on the URL.
- URL_IS_FILEURL also only depends on the scheme ("file:").
Francois Gouget <fgouget@free.fr>
- Assorted spelling fixes.
Robert Shearman <rob@codeweavers.com>
- Fix SHCopyKey to treat string parameter correctly as source path
  instead of destination path.
Jon Griffiths <jon_p_griffiths@yahoo.com>
- Use LMEM_ flags for LocalAlloc(), not GMEM_ (GlobalAlloc).
- Implement @188,190,195,200,256,478,481.
- IUnknown_EnableModeless() also handles IOleInPlaceActiveObject.
- Tests and small fix for PathMakePretty().
- Fix a crash and test failure with early native dlls.

svn path=/trunk/; revision=15050
2005-05-06 16:23:24 +00:00
Aleksey Bragin
c72be4b69c Make intl.cpl really switch InstallLanguage and Default entries of NLS\Language key. Problem with freeldr solved in hacky way - it writes now e.g. "0409" and not "00000409", as it generally should.
svn path=/trunk/; revision=15049
2005-05-06 16:21:30 +00:00
Thomas Bluemel
ecba32de75 - fixed ConnectNamedPipe to properly wait on completion for synchronous operations
- prevent completion port notification by not passing an APC context to the kernel when the low-order bit of the event handle is set (for asynchronous operations)

svn path=/trunk/; revision=15048
2005-05-06 16:07:51 +00:00
Casper Hornstrup
e5c1f57b80 Add <module>_install target
svn path=/branches/xmlbuildsystem/; revision=15047
2005-05-06 16:05:37 +00:00
Casper Hornstrup
7dec8061f1 Add missing files
svn path=/branches/xmlbuildsystem/; revision=15046
2005-05-06 16:02:04 +00:00
Thomas Bluemel
f16e5b9e1d - fixed DeviceIoControl to properly wait on completion for synchronous operations
- prevent completion port notification by not passing an APC context to the kernel when the low-order bit of the event handle is set (for asynchronous operations)

svn path=/trunk/; revision=15045
2005-05-06 15:55:28 +00:00
Casper Hornstrup
df0195a558 More sane default image base addresses
svn path=/branches/xmlbuildsystem/; revision=15044
2005-05-06 14:12:25 +00:00
Thomas Bluemel
496308ed56 - fixed Read/WriteFile(Ex) and properly wait on completion for synchronous operations
- prevent completion port notification by not passing an APC context to the kernel when the low-order bit of the event handle is set (for asynchronous operations)

svn path=/trunk/; revision=15043
2005-05-06 14:02:45 +00:00
Hartmut Birr
c565a223c9 Revert my last changes.
svn path=/trunk/; revision=15042
2005-05-06 13:35:27 +00:00
Casper Hornstrup
ede9da6bd0 Build dhcp
svn path=/branches/xmlbuildsystem/; revision=15041
2005-05-06 12:22:35 +00:00
Hartmut Birr
7fb90fae33 Do not modify the stack layout of a function by using inline assembler.
svn path=/trunk/; revision=15040
2005-05-06 12:17:29 +00:00
Hervé Poussineau
71b3a2ede3 Revert ntoskrnl/cm/regobj.c back to revision 14017
svn path=/trunk/; revision=15039
2005-05-06 11:53:35 +00:00
Casper Hornstrup
3528760e8e Add missing file
svn path=/branches/xmlbuildsystem/; revision=15038
2005-05-06 11:20:10 +00:00
Thomas Bluemel
5ff8364d66 minor corrections to match the behavior of wine's implementation
svn path=/trunk/; revision=15037
2005-05-06 11:02:47 +00:00
Casper Hornstrup
3dc17696df Don't strip relocation information from DLLs
svn path=/branches/xmlbuildsystem/; revision=15036
2005-05-06 10:45:24 +00:00
Casper Hornstrup
ae18ba571a Set svn:eol-style=native
svn path=/branches/xmlbuildsystem/; revision=15035
2005-05-06 10:38:30 +00:00
Casper Hornstrup
751a4e3a06 Add missing leading underscores in symbols
svn path=/branches/xmlbuildsystem/; revision=15034
2005-05-06 10:17:43 +00:00
Magnus Olsen
6687b53ab8 David Nordenberg: Swedish translation, proofread by Andreas Bjerkeholt
svn path=/trunk/; revision=15033
2005-05-06 08:27:46 +00:00
Magnus Olsen
b6759ac808 Swedish translations by David Nordenberg
svn path=/trunk/; revision=15032
2005-05-06 08:21:12 +00:00
Alex Ionescu
b33f21c67e Update some more kernel structures
svn path=/trunk/; revision=15031
2005-05-06 00:11:25 +00:00
Thomas Bluemel
72be0f4961 open the module image file with read access rights instead of full access rights
svn path=/trunk/; revision=15030
2005-05-06 00:11:14 +00:00
Thomas Bluemel
03912150d8 create a token handle with TOKEN_QUERY access rights which is required to query the user information in RtlFormatCurrentUserKeyPath
svn path=/trunk/; revision=15029
2005-05-06 00:09:08 +00:00
Thomas Bluemel
83a2899311 don't leak the registry path string after initializing a driver
svn path=/trunk/; revision=15028
2005-05-06 00:07:05 +00:00
Alex Ionescu
5267e6247e Update KPROCESS structure to latest version and document all its fields on the Wiki page. Move Kernel Structures to ke.h from ps.h, remove stuff from ntifs.h that shouldnt be there
svn path=/trunk/; revision=15027
2005-05-05 22:40:05 +00:00
Gé van Geldorp
b36a075a86 Jose Manuel Ferrer Ortiz <jmfo1982@yahoo.es>
- Spanish translations updated.
Hans Leidekker <hans@it.vu.nl>
- Dutch resource translation.

svn path=/trunk/; revision=15026
2005-05-05 22:36:25 +00:00
Hartmut Birr
a2a2ab569b Fixed InterlockedClearBit.
svn path=/trunk/; revision=15025
2005-05-05 22:24:27 +00:00
Gé van Geldorp
a3cf83ca68 Sync to Wine-20050419:
Francois Gouget <fgouget@free.fr>
- Assorted spelling fixes.
Mike McCormack <mike@codeweavers.com>
- Remove an unused function.
- Eliminate casts of the return value of HeapAlloc.
- Convert path to unicode, rearrange to remove forward declaration.
- Remove forward declarations of interface methods.
- Remove some dead code and some ifdefs.
- Use api definitions, remove duplicate code.
- Fix usage of STGM_ enumerations, remove forward declaration.
- Fix up PIDL dumping code.
- Fix a regression in the file open dialog.
Jon Griffiths <jon_p_griffiths@yahoo.com>
- Use LMEM_ flags for LocalAlloc(), not GMEM_ (GlobalAlloc).
Huw Davies <huw@codeweavers.com>
- Fix the icon resource ids (most were off by one).
- Fix IExtractIcon_{GetIconLocation,Extract} to use -ve icon resource
  ids and fix bugs relating to confusion between resource ids and the
  system imagelist indicies.
- Extend the system imagelist initialization hack to load both +ve and
  -ve resource ids.
- Add a printer icon (that'll be used by an upcoming printer folder
  patch).
- When we're hiding file extensions then SetNameOf should append the
  original extension if SHGDN_FORPARSING isn't set.
- The flags passed to SetNameOf refer to the dst string not the src
  pidl.
- If ICommDlgBrowser_OnDefaultCommand returns anything other than S_OK
  then we should call the default handler.
- Directory items should have the SFGOA_FILESYSANCESTOR attribute.
  Add a test for this and cleanup the shlfolder test a bit.
- Better icon handling for some special folders.
- Identify and add defines for a bunch of shell icons.
- Add a unicode pidl type.
- Improve support for PT_YAGUID.
- Improve IShellLink debugging.
Steven Edwards <steven_ed4153@yahoo.com>
- Register Shell Drag and Drop Helper.
Juan Lang <juan_lang@yahoo.com>
- Use Unicode string result from GetDisplayNameOf if it isn't
  representable using ANSI.
- Correct registering shell folders (values in Shell Folders key weren't
  getting written).
Martin Fuchs <martin-fuchs@gmx.net>
- switch to correct shell desktop context menu
- launch desk.cpl when activating the desktop context menu entry
  "properties"
- don't send WM_COMMAND if we didn't get a shell view window
- Correct comments of some export ordinals.
Peter Berg Larsen <pebl@math.ku.dk>
- Replace strncpy with memcpy or lstrcpyn.
Troy Rollo <wine@troy.rollo.name>
- Fix SEGV for non-fully-qualified destination paths.
- Don't fail ShFileOperationW if FOF_ALLOWUNDO is passed.
Filip Navara <xnavara@volny.cz>
- _dbg_ILGetNext returns NULL if pidl->mkid.cb is zero, fix the loops
  accordingly.
Aric Stewart <aric@codeweavers.com>
- For ShellExecuteExA we need to copy out the hProcess value from the W
  structure.

svn path=/trunk/; revision=15024
2005-05-05 22:16:20 +00:00
Gé van Geldorp
ee1685bd2e Sync to Wine-20050419:
Mike McCormack <mike@codeweavers.com>
- Add stub for FaultInIEFeature.

svn path=/trunk/; revision=15023
2005-05-05 21:07:02 +00:00
Hervé Poussineau
fe7b55c2c1 SVN maintenance: Set eol style to native and add keywords
svn path=/trunk/; revision=15022
2005-05-05 20:52:14 +00:00
Hervé Poussineau
cb0daf73fd RtlFreeUnicodeString -> ExFreePool changes
svn path=/trunk/; revision=15021
2005-05-05 20:19:01 +00:00
Gé van Geldorp
6758bb095b Sync to Wine-20050419:
Hans Leidekker <hans@it.vu.nl>
- Stub implementation for SetupCopyOEMInfW.
Peter Berg Larsen <pebl@math.ku.dk>
- Janitorial: Get rid of strncpy/strncpyW.
Jakob Eriksson <jakov@vmlinux.org>
- Get rid of HeapAlloc casts.
Juan Lang <juan_lang@yahoo.com>
- Implement SetupDiClassNameFromGuidExA.

svn path=/trunk/; revision=15020
2005-05-05 20:14:39 +00:00
Hervé Poussineau
30cd41fa52 Forgot to commit this file with revision 15013
svn path=/trunk/; revision=15019
2005-05-05 19:36:25 +00:00
Gé van Geldorp
dff6294185 Sync to Wine-20050419:
Robert Shearman <rob@codeweavers.com>
- Fix deadlock caused by not leaving the critical section on all code
  paths.
- RpcMgmtStopServerListen should not affect auto-listen interfaces.
- Implement stub for RpcRevertToSelfEx.
- Change the more verbose files to use a new debug channel, "rpc."
Francois Gouget <fgouget@free.fr>
- Assorted spelling fixes.
Jakob Eriksson <jakov@vmlinux.org>
- Get rid of HeapAlloc casts.
Ralf S. Engelschall <rse@engelschall.com>
- Fix incorrect random multicast MAC address creation.

svn path=/trunk/; revision=15018
2005-05-05 19:17:25 +00:00
Casper Hornstrup
1fef01891c Merge 14551:14980 from trunk
svn path=/branches/xmlbuildsystem/; revision=15017
2005-05-05 19:15:25 +00:00
Gé van Geldorp
d0bf4f6953 Sync to Wine-20050419:
Remove no longer needed files.

svn path=/trunk/; revision=15016
2005-05-05 19:11:20 +00:00
Magnus Olsen
6af3fc11fe swedish translation by Andreas Bjerkeholt
svn path=/trunk/; revision=15015
2005-05-05 19:05:42 +00:00
Gé van Geldorp
e14533d20a Sync to Wine-20050419:
Krzysztof Foltman <wdev@foltman.com>
- removed trailing spaces from some files
- tab support
- indent support
- PageUp key support.
- Support for "normal" scroll bar functionality (line and page
  scrolling).
- made string operations consistent wrt whitespace handling (which
  should greatly improve stability of the wrap code and eliminate
  regressions of the most recent versions)
- completely new scrollbar handling (much more reliable) and related
  redraw fixes
- Page Down handler (no Page Up yet, fixing wrap/redraw/scrollbar bugs
  was of higher priority)
- RTF reader doesn't use RichEdit messages anymore (which saves on
  unnecessary repaints)
- added unicode character support to RTF import (like: \u12345 ?)
- small fixes
- fixed whitespace identification bug
- removed drawing of paragraph marks
- improved stub implementations for IRichEditOle
- Unknown destinations are now correctly skipped (so loading an RTF
  file generated by, for example, OpenOffice doesn't produce lots of
  garbage anymore).
- Format stack for RTF groups (so that RTF reader can correctly read
  what RTF writer wrote :) )
- EM_STREAMIN can now deal with undo in a reasonable manner (no
  multiple undo actions in one EM_STREAMIN).
- Related changes to undo code (umIgnore mode is now handled
  correctly).
- Numerous improvements in the RTF reader: it reads some character
  attributes now (you will have proper small print in license agreements
  now).
- Fixed a memory overwrite bug in conversion from CHARFORMAT2A to
  CHARFORMAT2W.
- Optimized repaint of the area below the text.
- ME_JoinRuns didn't mark the paragraph for rewrapping, fixed.
- Removed PostQuitMessage(0) from WM_DESTROY handler (duh!).
- Use of EM_GETOLEINTERFACE is reported with FIXME instead of TRACE
  (any app using this message is likely to encounter major problems).
- WM_COPY (and WM_CUT) can now put both Unicode and RTF format (thanks
  to Phil Krylov's RTF generator code).
- New message implemented - WM_PASTE.
- RTF reader: rtfPlain implemented (kind of).
- RTF writer: rewritten main loop (the old one crashed in some
  circumstances when SFF_SELECTION was used).
- The meaning of the rewrap flag got inverted (MEPF_REWRAP instead of
  MEPF_WRAPPED) for consistency.
- Major code cleanups in rewrap/repaint code, leading to "smarter"
  behaviour wrt repainting selections.
- Old font management replaced by the cache-based one, which keeps
  maximum of 10 HFONTs at once, instead of one per a couple of runs.
- EM_CANPASTE implemented
- updated TODO list (including list of (un)implemented messages)
- fixed WM_PASTE (the previous version might not close the clipboard
  if it didn't contain a usable format)
- scrollbar operations (like clicking on arrows) should update
  scrollbar's current position
Gerald Pfeifer <gerald@pfeifer.com>
- Make ME_ArrowLeft() return a value in every case.
Phil Krylov <phil@newstar.rinet.ru>
- Make RTF reader fall back to simple text if a correct RTF header is
  not detected. This should fix some installers.
- Made RTF reader and writer handle codepages mostly similar to the
  original riched20.dll.
- Fixed support for RTF documents using ANSI charset and added support
  for multibyte charsets, so that BIG5 and UTF-8 RTF documents are
  working now.
- Replaced slow and outdated character set handling in RTF reader by
  Unicode/codepages support. Added charset->codepage conversion.
- Implemented hash table lookup for RTF keywords in RTF reader.
- Added "generator" RTF destination handling.
- Initial implementation of EM_STREAMOUT and RTF writer.
- Fixed \u keyword to output signed 16-bit values. Also fixed CP_SYMBOL
  conversion and the detection of the default font's codepage.
- Improved RTF export.
Mike McCormack <mike@codeweavers.com>
- Remove casts and unused code.
Hannu Valtonen <Hannu.Valtonen@hut.fi>
- Added mousewheel support.
Vincent Beron <vberon@mecano.gme.usherb.ca>
- Use "" for Windows includes in dlls, instead of <>.
Jakob Eriksson <jakov@vmlinux.org>
- Get rid of HeapAlloc casts.
Jason Edmeades <us@the-edmeades.demon.co.uk>
- Correct memory allocation macro.

svn path=/trunk/; revision=15014
2005-05-05 19:00:49 +00:00
Hervé Poussineau
f71087e736 ExFreePool -> ExFreePoolWithTag changes
svn path=/trunk/; revision=15013
2005-05-05 18:59:14 +00:00
Gé van Geldorp
7bd0add306 Sync to Wine-20050419:
Peter Berg Larsen <pebl@math.ku.dk>
- Replace strncpy with memcpy or lstrcpyn.
Jakob Eriksson <jakov@vmlinux.org>
- Get rid of HeapAlloc casts.

svn path=/trunk/; revision=15012
2005-05-05 18:32:46 +00:00
Gé van Geldorp
df82a2a2a8 Sync to Wine-20050419:
Daniel Remenak <dtremenak@gmail.com>
- Implemented VarIdiv.
- Return DISP_E_DIVBYZERO instead of crashing when asked to divide a
  variant by zero.
- Remove unused variable in _copy_arg.
Marcus Meissner <meissner@suse.de>
- Serialize NULL pointer interfaces correctly.
- Fixed VT_BSTR|VT_BYREF marshalling.
- Added VT_I4|VT_BYREF marshalling.
- Fixed ppvObject serializer (deref twice instead of once).
- Actually pass back return value of remote call in type marshaller.
- Format VT_UI1, VT_I1, VT_UI2, VT_I2 correctly.
- Added IDispatch::GetIDsOfNames() special case serializing.
- Handle VT_PTR / NULL marshalling correctly.
Mike Hearn <mike@navi.cx>
- Fix BSTR tracing in the typelib marshaller.
- Fix PARAMFLAG_FOUT typo in the tmarshaller.
Mike Hearn <mh@codeweavers.com>
Robert Shearman <rob@codeweavers.com>
- Implement VT_BYREF | VT_BSTR marshalling.
- Add more integer types for marshaling and unmarshaling.
- Implement VT_BYREF | VT_BSTR unmarshaling.
- Don't allocate memory for TKIND_DISPATCH/TKIND_INTERFACE
  unmarshaling as it will be lost in the success case and interferes
  with the failure case.
Robert Shearman <rob@codeweavers.com>
- Add outer unknown support for typelib marshaler.
Jakob Eriksson <jakov@vmlinux.org>
- Get rid of HeapAlloc casts.
Francois Gouget <fgouget@free.fr>
- Assorted spelling fixes.
Alex Villacis Lasso <a_villacis@palosanto.com>
- Fix leftover negative sign in height parameter for transparent
  bitmap.
- Properly announce whether bitmap is transparent in get_Attributes.
- GIF transparency is now palette-index based, instead of RGB based.
- Keep original bitmap and XOR mask separate, so that get_Handle
  returns original bitmap.
- Initialize [orig|himetric][Width|Height] for PICTYPE_ICON case.
- Fix failure to notice the use of a GIF palette index greater or equal
  to 128 for transparency.
- After Float->string conversion via sprintfW(), VarDecFromR[4|8] is
  forced to use US locale for string->Decimal conversion, to agree with
  sprintfW().

svn path=/trunk/; revision=15011
2005-05-05 18:29:41 +00:00
Gé van Geldorp
61e422828e Sync to Wine-20050419:
Juan Lang <juan_lang@yahoo.com>
- Implement PropSys{Alloc|Free}String, and support BSTRs in
  PropVariant{Clear|Copy} using them.
- Begin implementing IPropertyStorage.
- Add traces, add unit tests for IPropertyStorage, and fix the problems
  they caught.
- Implement FmtIdToPropStgName & PropStgNameToFmtId, with tests.
- add write support to IPropertyStorage, with tests
- misc. cleanups the tests turned up
- Add a comment about byte order, change types to reduce casting and not
  cast away constness.
Vincent Beron <vberon@mecano.gme.usherb.ca>
- Change prototypes so gcc with some warnings doesn't bark.
- Correct and complete some api documentation.
Mike McCormack <mike@codeweavers.com>
- Eliminate forward declarations, make functions static.
- Eliminate casts of the return value of HeapAlloc.
- Remove function prototypes, make functions static.
- StgOpenStorage shouldn't open zero length storage files.
- Remove unnecessary function prototypes.
Robert Shearman <rob@codeweavers.com>
- Add critsec debugging info.
- Move the modal loop called during RPCs into CoWaitForMultipleHandles.
- Use a mutex for long remoting calls to IRemUnknown methods.
- Remove locking in apartment_disconnectproxies as it is not needed.
- Use PostMessage instead of SendMessage so we can run the message
  loop or not as appropriate.
- Rename apartment functions to become more object-oriented.
- Rename register_ifstub to marshal_object to more accurately describe
  what it does.
- Add new function, apartment_getoxid, to prepare for a possible
  future patch where remoting is started on demand.
Jon Griffiths <jon_p_griffiths@yahoo.com>
- Use LMEM_ flags for LocalAlloc(), not GMEM_ (GlobalAlloc).
Francois Gouget <fgouget@free.fr>
- Assorted spelling fixes.
Huw Davies <huw@codeweavers.com>
- Don't close reg key if the open failed.
- WriteFmtUserTypeStg doesn't pull a CLSID from the registry - it's
  unclear when (if at all) this gets written.
Alexandre Julliard <julliard@winehq.org>
- Fixed a buffer overflow.
Joris Huizer <jorishuizer@planet.nl>
- A few memory checks avoiding memory leaks.
Dmitry Timoshkov <dmitry@codeweavers.com>
- Zero out an invalidated runningObjectTableInstance pointer.
Dimitrie O. Paun <dpaun@rogers.com>
- Remove the need for the non-standard (Close|Delete)MetaFile16().
Troy Rollo <wine@troy.rollo.name>
- ix test for STGM_SHARE_EXCLUSIVE on nameless DocFiles.

svn path=/trunk/; revision=15010
2005-05-05 18:16:09 +00:00
Thomas Bluemel
6b48fc81ad implemented RegOpenUserClassesRoot (doesn't work in reactos because there's no symbolic link \Registry\User\<SID>_Classes yet)
svn path=/trunk/; revision=15009
2005-05-05 17:45:00 +00:00
Hervé Poussineau
bcbeeea71f Change ExFreePool to ExFreePoolWithTag
Don't call RtlFreeUnicodeString if the string wasn't created by RtlAnsiStringToUnicodeString or RtlUpcaseUnicodeString
Implement ExRosQueryNonPagedPoolTag
Add BAD_POOL_CALLER code

svn path=/trunk/; revision=15008
2005-05-05 17:20:10 +00:00
Eric Kohl
11670a0523 Implement OpenAndMapFileForRead, RetreiveFileSecurity, StampFileSecurity, TakeOwnershipOfFile and UnmapAndCloseFile.
svn path=/trunk/; revision=15007
2005-05-05 16:16:28 +00:00
Thomas Bluemel
de9188501b the registry functions shouldn't change the last error, instead they should just return the error code.
svn path=/trunk/; revision=15006
2005-05-05 16:15:08 +00:00
Magnus Olsen
f2454371af Update the swedish translation by
David Nordenberg 



svn path=/trunk/; revision=15005
2005-05-05 16:05:46 +00:00
Hervé Poussineau
a3d0da6d95 Don't desallocate non allocated memory
svn path=/trunk/; revision=15004
2005-05-05 15:39:36 +00:00
Thomas Bluemel
b9c033f3ec - ported BuildTrusteeWithObjectsAndNameA/W and BuildTrusteeWithObjectsAndSidA/W from wine
- implemented RegOpenCurrentUser
- directly forward GetSecurityDescriptorLength to NTDLL.RtlLengthSecurityDescriptorguard dumping the stack trace to prevent infinite exception loopsguard dumping the stack trace to prevent infinite exception loops

svn path=/trunk/; revision=15003
2005-05-05 15:39:27 +00:00
Hervé Poussineau
9961bb7d69 Better handle of wrong arguments in IoRegisterDeviceInterface
svn path=/trunk/; revision=15002
2005-05-05 15:39:09 +00:00
Thomas Bluemel
0f4b0fd412 guard dumping the stack trace to prevent infinite exception loops
svn path=/trunk/; revision=15001
2005-05-05 15:38:32 +00:00
Hervé Poussineau
e5443b9351 Call Fs notifications at PASSIVE_LEVEL by using a guarded mutex
Use ExFreePoolWithTag instead of ExFreePool

svn path=/trunk/; revision=15000
2005-05-05 13:27:00 +00:00
Thomas Bluemel
da6a50d93f directly use HeapAlloc/Free in midl_user_allocate and midl_user_free instead of the depreciated GlobalAlloc/Free functions
svn path=/trunk/; revision=14999
2005-05-05 13:24:39 +00:00
Thomas Bluemel
cb363f4f7d use SERVICES_ACTIVE_DATABASE if the caller didn't specify a database for OpenSCManager()
svn path=/trunk/; revision=14998
2005-05-05 12:58:03 +00:00
Alex Ionescu
264cee75a3 Simply fix up the formatting, there were tabs and 3 spaces and 4 spaces and 2 spaces identation. No code was harmed.
svn path=/trunk/; revision=14997
2005-05-05 12:35:09 +00:00
Thomas Bluemel
74d7b0c5f4 prevent buffer overflow, LoadString accepts the size of the buffer in TCHARs, not in bytes!
svn path=/trunk/; revision=14996
2005-05-05 12:25:40 +00:00
Thomas Bluemel
e85ca23849 don't dereference lpTokenAttributes if the caller passed NULL to DuplicateTokenEx
svn path=/trunk/; revision=14995
2005-05-05 12:21:43 +00:00
Magnus Olsen
d22f099901 Usurp
fransch translations
fix right help string printing out on screen wrong strings was loading when you need help
incress the string buffer for loading strings from rc example for dir /?
remove duplicate STRING_PARAM_ERROR

solv bugzila bug 618 


svn path=/trunk/; revision=14994
2005-05-05 12:03:43 +00:00
Hartmut Birr
3fdefd1abf - Use the WIN32 option to select the correct mkdir.
svn path=/trunk/; revision=14993
2005-05-05 11:28:49 +00:00
Hartmut Birr
76a83ce1cc - Detect msys on windows as a linux system.
- Creating of the bootcd will not work. There is somewhere a path with 'c:/'.

svn path=/trunk/; revision=14992
2005-05-05 11:26:32 +00:00
Hartmut Birr
159160db0d - Fixed the parameters for NtOpenFile in InternalFindFirstFile.
- Closed the opened directory on error in InternalFindFirstFile.

svn path=/trunk/; revision=14991
2005-05-05 11:07:28 +00:00
Hartmut Birr
43e3abdd99 - Return the length in VfatDirectoryControl.
svn path=/trunk/; revision=14990
2005-05-05 11:05:05 +00:00
Hartmut Birr
5e49963c1a - Free always the name string and the completion context in IopDeleteFile.
- Fixed the check for synchronous operations in NtQueryDirectoryFile.

svn path=/trunk/; revision=14989
2005-05-05 11:03:27 +00:00
Hartmut Birr
4200c75f3b - Guard the copying to the IOSB.
- Do the main processing on success or if previous STATUS_PENDING was returned. 
  Do not use some of the IRP and FO flags at this point.   
- Set all results before signaling the events.  
- Signal the FO event previous the user event.    
- Made the code a little bit shorter.


svn path=/trunk/; revision=14988
2005-05-05 10:59:34 +00:00
Hervé Poussineau
e80efe27d7 SVN maintenance:
Delete wine_unicode.map
Add *.map to ignore list

svn path=/trunk/; revision=14987
2005-05-05 09:59:38 +00:00
Casper Hornstrup
0bb263067a Copy wininet to branch
svn path=/branches/xmlbuildsystem/; revision=14986
2005-05-05 09:48:22 +00:00
Casper Hornstrup
0922a0e8e5 Delete wininet
svn path=/branches/xmlbuildsystem/; revision=14985
2005-05-05 09:45:38 +00:00
Thomas Bluemel
483c08b898 - fixed RegSetValueEx to take the null-terminating byte for strings into account when the caller forgot it
- capture the driver service name string in NtLoadDriver

svn path=/trunk/; revision=14984
2005-05-05 02:46:17 +00:00
Thomas Bluemel
079656c5c4 only create handles with access rights needed for the operation
svn path=/trunk/; revision=14983
2005-05-05 00:07:27 +00:00
Magnus Olsen
7a3fb8af07 tinus
implement MouseResolution setting

Me (Magnus Olsen)
remove old psuax drv from hiveinst.inf and add tinus mouse drv settings
add MouseResolution setting to reg


svn path=/trunk/; revision=14982
2005-05-04 23:06:15 +00:00
Thomas Bluemel
0e71d1e88d prevent buffer overflow, LoadString accepts the size of the buffer in TCHARs, not in bytes!
svn path=/trunk/; revision=14981
2005-05-04 22:32:43 +00:00
Thomas Bluemel
c1b7289bd6 prevent buffer overflow, LoadString accepts the size of the buffer in TCHARs, not in bytes!
svn path=/trunk/; revision=14980
2005-05-04 22:21:55 +00:00
Thomas Bluemel
410ddcfe72 correctly use tchar.h again and build a unicode version by default
svn path=/trunk/; revision=14979
2005-05-04 22:18:43 +00:00
Thomas Bluemel
6a0f65e223 it's valid to pass lpTargetHandle = NULL to DuplicateHandle()
svn path=/trunk/; revision=14978
2005-05-04 21:23:13 +00:00
Gé van Geldorp
600cfcc505 Fix GDB stub:
- Initialize WrapperTable routines as early as possible
- Initialize debug port (hard coded to COM2, 115200 baud for now)
- Don't limit runnable thread on startup

svn path=/trunk/; revision=14977
2005-05-04 20:38:43 +00:00
Thomas Bluemel
68b564e30a make correct use of tchar.h in taskmgr and build it as unicode by default
svn path=/trunk/; revision=14976
2005-05-04 19:29:28 +00:00
Maarten Bosma
587ddda1d5 Steven Wilson: update tlist to use new process info struct names
svn path=/trunk/; revision=14975
2005-05-04 18:53:47 +00:00
Magnus Olsen
6039178c86 David Nordenberg: Swedish translation, proofread by Andreas Bjerkeholt and small change from Kris Engeman
svn path=/trunk/; revision=14974
2005-05-04 18:10:12 +00:00
Martin Fuchs
8ec74d5f10 restore toolbar bitmap
svn path=/trunk/; revision=14973
2005-05-04 17:59:36 +00:00
Magnus Olsen
7e2d943420 Swedish åäö was gone in the translation after some commit.
I which we can split all langues to own .rc files. 
so this can not be happen agien

Thx  Harteex for fixing åäö in the .rc file 

svn path=/trunk/; revision=14972
2005-05-04 17:41:27 +00:00
Magnus Olsen
35b46085ea filip0402 : patch for taskmgr to remove some hardcode string tested by Harteex
svn path=/trunk/; revision=14971
2005-05-04 16:54:48 +00:00
Hervé Poussineau
60bdc5ad60 Set Thread->SystemThread to TRUE when creating a system thread. Patch by Filip Navara
svn path=/trunk/; revision=14970
2005-05-04 16:00:39 +00:00
Aleksey Bragin
d534342503 RegOpenKey, RegOpenKeyEx A/W imported and ported from WINE. This keeps the current test set in advapi32_test registry on 85/0 level
svn path=/trunk/; revision=14969
2005-05-04 15:53:54 +00:00
Aleksey Bragin
8460c6e770 NtOpenKey modified to correctly behave when wrong input params are given (according to WINE tests).
svn path=/trunk/; revision=14968
2005-05-04 15:27:05 +00:00
Hervé Poussineau
ed23d5951d Fix flags checking in I8042ReadData (patch by Tinus_)
Check error codes returned by IoCreateDevice
Replace ExFreePool by ExFreePoolWithTag

svn path=/trunk/; revision=14967
2005-05-04 13:28:34 +00:00
Alex Ionescu
985abe1494 Fix horrible bug where Queued Threads were treated like Threads on the Ready list. I was aware of this bug for months and it's fixed in my new scheduler but now that tinus has seen it happen, I'm comitting the fix temporarly in trunk.
svn path=/trunk/; revision=14966
2005-05-03 23:24:26 +00:00
Magnus Olsen
151078eab1 bugfix from, tinus mailto:o112w8r02@sneakemail.com
fixining http://reactos.com/bugzilla/show_bug.cgi?id=616#c1
bug in mozila 

There's a small bug in usetup/bootsup.c which makes it fail formatting the disk.
It tries to read the bootsector image on the cdrom for write access (which
succeeds), then tries to read from the handle (which fails).

svn path=/trunk/; revision=14965
2005-05-03 23:18:21 +00:00
Hartmut Birr
5255b326ec Do always set the UserIosb of an irp in IoSecondStageCompletion.
svn path=/trunk/; revision=14964
2005-05-03 21:42:35 +00:00
Hervé Poussineau
f2b9954c3f Add French translation for sndvol32 (Patch by Usurp)
Set properties for Cz.rc and Sv.rc

svn path=/trunk/; revision=14963
2005-05-03 21:25:41 +00:00
Magnus Olsen
0d5f3d84cb Implement WSAStringToAddressA
svn path=/trunk/; revision=14962
2005-05-03 18:37:51 +00:00
Magnus Olsen
4732ce19d1 Implement WSAStringToAddressW
svn path=/trunk/; revision=14961
2005-05-03 17:22:52 +00:00
Hervé Poussineau
d6ce9d647e Remove Disk driver for Bochs.
It doesn't compile and shouldn't be usefull as we have a normal disk driver in drivers/storage/disk

svn path=/trunk/; revision=14960
2005-05-03 13:14:59 +00:00
Martin Fuchs
aa0e827382 rosshell: printer and network folder in start menu
svn path=/trunk/; revision=14959
2005-05-03 12:15:27 +00:00
Alex Ionescu
e49c3dc30f revert accidental commit
svn path=/trunk/; revision=14958
2005-05-03 11:56:46 +00:00
Martin Fuchs
61ce6acfa9 context menu interface pointer cleanup
svn path=/trunk/; revision=14957
2005-05-03 09:32:10 +00:00
Martin Fuchs
7b8809480b small optimization for the last change
svn path=/trunk/; revision=14956
2005-05-03 09:21:42 +00:00
Martin Fuchs
63415000fe display custom folders in start menu root
svn path=/trunk/; revision=14955
2005-05-03 08:04:58 +00:00
Martin Fuchs
7bb756385c context menu interface pointer cleanup
svn path=/trunk/; revision=14954
2005-05-03 08:03:46 +00:00
Hartmut Birr
c853c0b6e3 Open/create all files with the necessary rights.
svn path=/trunk/; revision=14951
2005-05-02 20:30:29 +00:00
Hartmut Birr
98c1f41b90 - Check first for a valid returned object in ObOpenObjectByName.
- Free always the remaining path string if an error is returned in ObOpenObjectByName.

svn path=/trunk/; revision=14950
2005-05-02 19:12:31 +00:00
Hervé Poussineau
82eacd2e6d Add i8042prt.sys and kbdclass.sys to boot cd
Remove leftover of keyboard.sys and psaux.sys drivers
(Pointed by Usurp)

svn path=/trunk/; revision=14949
2005-05-02 16:35:58 +00:00
Emanuele Aliberti
143f5e1f74 Move VMS subtree in the proper place.
svn path=/trunk/; revision=14948
2005-05-02 14:15:56 +00:00
Filip Navara
51e5c11dc8 Fix Alex's completely wrong fix for NtUserScrollWindowEx (aka bug #606).
svn path=/trunk/; revision=14947
2005-05-02 14:05:38 +00:00
Alex Ionescu
6c331c3529 Fix many of the scrollbar issues. However, MDI Scrollbars are still not working perfectly. Patch by tinus <o112w8r02@sneakemail.com>. Fixes bug 606
svn path=/trunk/; revision=14946
2005-05-02 11:42:41 +00:00
Alex Ionescu
dff743f85a Don't call internal function which checks parameters since our parameter is kernel mode.
svn path=/trunk/; revision=14945
2005-05-02 11:38:48 +00:00
Hervé Poussineau
252332e971 Don't free unicode strings in case of error
svn path=/trunk/; revision=14944
2005-05-02 11:03:54 +00:00
Art Yerkes
dabd9ab597 Fix KDSERIAL.
svn path=/trunk/; revision=14943
2005-05-02 07:04:36 +00:00
Alex Ionescu
f19732f822 Same kind of fixes for NtFlushBuffersFile
svn path=/trunk/; revision=14942
2005-05-02 05:27:32 +00:00
Alex Ionescu
fb52d69134 Fix NtQueryInformationFile. Use right device object in case of FO_DIRECT_DEVICE_OPEN, use local event, set proper flags so that the I/O manager does the copying and freeing of the buffers, respect syyncronous I/O. Same kind of fixes for IoQueryFileInformation
svn path=/trunk/; revision=14941
2005-05-02 05:15:20 +00:00
Martin Fuchs
7997eff27f implement owner drawn context menus for winefile
svn path=/trunk/; revision=14940
2005-05-01 23:19:48 +00:00
Hervé Poussineau
f4bf96a034 Fix garbage text output with cmd.exe in GUI mode.
Thanks to Hartmut for pointing me the problem

svn path=/trunk/; revision=14939
2005-05-01 22:30:13 +00:00
Alex Ionescu
b099687f31 Byebye decrepit drivers
svn path=/trunk/; revision=14938
2005-05-01 22:29:18 +00:00
Alex Ionescu
24f249ab54 Remove incorrect change
svn path=/trunk/; revision=14936
2005-05-01 22:20:13 +00:00
Alex Ionescu
f3a824a347 remove accidental commit
svn path=/trunk/; revision=14935
2005-05-01 22:06:38 +00:00
Alex Ionescu
f38095c406 Remove incorrect change
svn path=/trunk/; revision=14934
2005-05-01 21:57:57 +00:00
Alex Ionescu
13c655b516 Do not signal event twice. Thanks to Gunnar for finding the bug
svn path=/trunk/; revision=14933
2005-05-01 21:51:57 +00:00
Martin Fuchs
8441c8115e merge ROS Shell without integrated explorer part into trunk
svn path=/trunk/; revision=14932
2005-05-01 21:22:13 +00:00
Thomas Bluemel
38055bc7ed DeleteFile should create a handle with DELETE access rights
svn path=/trunk/; revision=14931
2005-05-01 21:19:04 +00:00
Hervé Poussineau
9420d88967 SVN maintenance on new directories/files
svn path=/trunk/; revision=14929
2005-05-01 21:03:02 +00:00
Filip Navara
27fff4b070 Potapnik <jirka@studioprojekt.cz>
Czech translation of Registry Editor.

svn path=/trunk/; revision=14928
2005-05-01 20:53:29 +00:00
Filip Navara
a5584f9242 Potapnik <jirka@studioprojekt.cz>
Czech translation of VMWInst, Welcome and WinLogon (with one change by me).

svn path=/trunk/; revision=14927
2005-05-01 20:48:20 +00:00
Alex Ionescu
a70444fab1 i8042prt driver by tinus.
svn path=/trunk/; revision=14926
2005-05-01 20:38:29 +00:00
Magnus Olsen
82b7f31f61 reverted them back from ekohl change it create
alot of problem example chater are not being display right
if you switch reactos to another langues. 

svn path=/trunk/; revision=14925
2005-05-01 20:30:41 +00:00
Hervé Poussineau
fbad02ab35 Please give names to your PDOs. Should correct the boot on non-ACPI systems.
svn path=/trunk/; revision=14924
2005-05-01 20:20:59 +00:00
Martin Fuchs
7562cce403 more rosshell separations
svn path=/branches/lean-explorer/; revision=14923
2005-05-01 20:12:06 +00:00
Martin Fuchs
2547a93939 experimental ROS Shell without integrated explorer part
svn path=/branches/lean-explorer/; revision=14922
2005-05-01 20:02:30 +00:00
Alex Ionescu
aa1fd35178 Fix IopCloseFile: Use IRP_SYNC_API flag, use local stack event, get the right deviceobject if FO_DIRECT_DEVICE_OPEN is set, set IRP_CLOSE_OPERATION flag.
svn path=/trunk/; revision=14921
2005-05-01 19:46:51 +00:00
Alex Ionescu
f7695b0f53 Fix IopDeleteFile: Use IRP_SYNC_API flag, use local stack event, fix memory leak (Free completion context), dereference completion port, get the right deviceobject if FO_DIRECT_DEVICE_OPEN is set
svn path=/trunk/; revision=14920
2005-05-01 19:36:00 +00:00
Thomas Bluemel
722d9a84e4 fixed some warnings with gcc4 (mostly assignment differs in signedness warnings)
svn path=/trunk/; revision=14919
2005-05-01 19:30:06 +00:00
Magnus Olsen
832cfa1af7 Fix so it can compile agein
svn path=/trunk/; revision=14918
2005-05-01 18:23:08 +00:00
Magnus Olsen
62bf02deb7 Remove some hardcode strings
to En.rc

svn path=/trunk/; revision=14917
2005-05-01 17:32:09 +00:00
Magnus Olsen
7a4df43bd1 Move english langues to own .rc file (En.rc) so it be more easy to maintain all langues
svn path=/trunk/; revision=14916
2005-05-01 15:18:45 +00:00
Magnus Olsen
6ee6ce325b Move english langues to own .rc file (En.rc) so it be more easy to maintain all langues
svn path=/trunk/; revision=14915
2005-05-01 14:53:57 +00:00
Magnus Olsen
dfa965f933 Andreas Bjerkeholt: Swedish translation, proofread by David Nordenberg
svn path=/trunk/; revision=14914
2005-05-01 14:42:04 +00:00
Magnus Olsen
27da6bdc5d David Nordenberg: Swedish translation, proofread by Andreas Bjerkeholt
svn path=/trunk/; revision=14913
2005-05-01 14:39:01 +00:00
Eric Kohl
2603ff574e - Use fixed message buffer size.
- Don't translate command options.
- Only use _one_ message buffer per function.
- Fix indentation mess.

svn path=/trunk/; revision=14912
2005-05-01 13:58:30 +00:00
Martin Fuchs
ca6a77b739 restore the IDS_TERMINATE strings trashed by the commit in rev. 14769
Could please someone with a swedish environment check if the character encoding in codepage 1252 is correct?

svn path=/trunk/; revision=14911
2005-05-01 12:56:25 +00:00
Art Yerkes
196bd4d6aa Added HOST=mingw32-linux64 setting.
Fixed various small breakage for linux64 host.

svn path=/trunk/; revision=14910
2005-05-01 11:24:07 +00:00
Filip Navara
515d8e34ac tinus <o112w8r02@sneakemail.com>
Call the shell hook on showing/hiding window.

svn path=/trunk/; revision=14909
2005-05-01 11:15:11 +00:00
Hartmut Birr
ea130b3ba2 Made the loading of resource strings more unicode compatibly.
svn path=/trunk/; revision=14908
2005-05-01 10:28:58 +00:00
Hartmut Birr
7ce3991a5c Return the correct data length for FSCTL_PIPE_GET_STATE.
svn path=/trunk/; revision=14907
2005-05-01 09:53:19 +00:00
Hartmut Birr
65deeff1c1 Fixed the calculation of timeout values.
svn path=/trunk/; revision=14906
2005-05-01 09:51:06 +00:00
Hartmut Birr
d226234328 Print symbol names if DBG is defined.
svn path=/trunk/; revision=14905
2005-05-01 09:49:45 +00:00
Filip Navara
ecba11e64f Potapnik <jirka@studioprojekt.cz>
Czech translation of Task Manager statusbar messages.

svn path=/trunk/; revision=14904
2005-05-01 09:45:35 +00:00
Filip Navara
d13148cece Forgot to change the sprintf statements in revision 14902.
svn path=/trunk/; revision=14903
2005-05-01 09:29:20 +00:00
Filip Navara
3ce5a90320 Move the statusbar strings to resources.
svn path=/trunk/; revision=14902
2005-05-01 09:23:12 +00:00
Eric Kohl
ccbb2fb84b Use default locale until ReactOS fully suports all required locale functions!
svn path=/trunk/; revision=14901
2005-05-01 09:07:31 +00:00
Filip Navara
334e2d762a Fix coordinate mapping of unmodRect in DefWndDoSizeMove.
svn path=/trunk/; revision=14900
2005-05-01 08:25:33 +00:00
Filip Navara
0c23b97544 Set the message point/time for keyboard and hotkey messages.
svn path=/trunk/; revision=14899
2005-05-01 08:03:41 +00:00
Filip Navara
4913443e7e Change the default system menu icon in MDI_AugmentFrameMenu to application icon (based on patch by tinus <o112w8r02@sneakemail.com>).
svn path=/trunk/; revision=14898
2005-05-01 07:10:47 +00:00
Gé van Geldorp
dd735b0384 svn maintenance
svn path=/trunk/; revision=14897
2005-05-01 07:08:18 +00:00
Filip Navara
4fee912dfe - Merge changes to MDI_AugmentFrameMenu from Wine (fixes part of bug #606).
- Fix deleting of bitmap in MDI_RestoreFrameMenu.

svn path=/trunk/; revision=14896
2005-05-01 07:05:13 +00:00
Gé van Geldorp
d679231534 svn maintenance
svn path=/trunk/; revision=14895
2005-05-01 06:38:51 +00:00
Thomas Bluemel
6e1ab38590 fixed uninitialized variable warning
svn path=/trunk/; revision=14894
2005-04-30 22:45:58 +00:00
Eric Kohl
8f40adc5eb NtQueryInformationFile/NtSetInformationFile:
- Check for information class specific access rights.
- Clean-up some indentation mess.

svn path=/trunk/; revision=14893
2005-04-30 22:00:26 +00:00
Aleksey Bragin
be9f61a8b9 Fixed RegEnumValueA/W behaviour when output buffers are too small. This fixes 20+ tests from "advapi32_test registry" (now it has only 2 failures - but that's a reduced tests set!).
I beg my pardon for reformatting these two funcs and fixing bugs in one commit, I will do it in different commits in the future.

svn path=/trunk/; revision=14891
2005-04-30 21:11:34 +00:00
Magnus Olsen
acb9e6951d forget this file
thx <hpoussin>

svn path=/trunk/; revision=14890
2005-04-30 21:07:32 +00:00
Magnus Olsen
671be67001 Remove all hardcode string to En.rc
Hopplyfull all hardcoing string are gone now 


svn path=/trunk/; revision=14888
2005-04-30 19:00:46 +00:00
Filip Navara
a14761769e Potapnik <jirka@studioprojekt.cz>
Czech translation of Task Manager.

svn path=/trunk/; revision=14887
2005-04-30 18:55:44 +00:00
Phillip Susi
96f75639c4 Renamed another makefile in the xmlbuildsystem branch that had the wrong case
svn path=/branches/xmlbuildsystem/; revision=14886
2005-04-30 18:52:55 +00:00
Filip Navara
7765507978 Potapnik <jirka@studioprojekt.cz>
Czech translations of appwiz, control, desk, intl, ncpa, sysdm and timedate.

svn path=/trunk/; revision=14885
2005-04-30 18:49:41 +00:00
Alex Ionescu
9ff89d4fd7 Add hack for ROS's weird behavior. Will investigate but this lets you boot for now
svn path=/trunk/; revision=14884
2005-04-30 17:43:18 +00:00
Hartmut Birr
d7ea77e414 Set the readed size within the irp.
svn path=/trunk/; revision=14883
2005-04-30 17:37:11 +00:00
Alex Ionescu
f04a0c4e50 Remove debug message
svn path=/trunk/; revision=14882
2005-04-30 17:30:05 +00:00
Phillip Susi
ba9cb9156c Fixed another makefile with the wrong case in the xmlbuildsystem branch
svn path=/branches/xmlbuildsystem/; revision=14881
2005-04-30 17:22:34 +00:00
Phillip Susi
d13badb58d makefile was spelled with a lower case in the xmlbuild branch,
but with upper case M in the trunk.  This was causing problems with
svn switch on win32 due to the name conflict.  


svn path=/branches/xmlbuildsystem/; revision=14880
2005-04-30 17:15:58 +00:00
Phillip Susi
9550da5a54 Fixed up a few missing includes that were preventing builds
svn path=/branches/xmlbuildsystem/; revision=14879
2005-04-30 16:37:06 +00:00
Magnus Olsen
7b4892749e Remove all hardcode string to En.rc
Hopplyfull all hardcoing string are gone now 
in cmd


svn path=/trunk/; revision=14878
2005-04-30 16:21:06 +00:00
Magnus Olsen
f1dad288cd Remove all hardcode string to En.rc
for all file 

This changes are only for  ver.c
Remove hardcode dev list to cmd.rc

update mailing adress for bug report to ros-dev@reactos.com
sugestion by GvG 

I did leave copyright year hardcode in ver.c


svn path=/trunk/; revision=14877
2005-04-30 15:46:59 +00:00
Hervé Poussineau
5c87a8787a Register GUID_DEVINTERFACE_COMPORT for serial devices
Register GUID_DEVINTERFACE_SERENUM_BUS_ENUMERATOR for serenum devices
Fix some comments

svn path=/trunk/; revision=14876
2005-04-30 15:04:10 +00:00
Hervé Poussineau
8293cc1006 Patch by Tinus_: Check for right error code returned by ZwOpenSymbolicLinkObject
svn path=/trunk/; revision=14875
2005-04-30 14:53:41 +00:00
Hervé Poussineau
71486fdc01 Don't double define GUID_DEVICE_INTERFACE_ARRIVAL and GUID_DEVICE_INTERFACE_REMOVAL in include/ntos/ntpnp.h and w32api/include/ddk/wdmguid.h
svn path=/trunk/; revision=14874
2005-04-30 14:36:05 +00:00
Gé van Geldorp
c15811bc14 Change BootDrive/BootPartition examples to BootPath
svn path=/trunk/; revision=14873
2005-04-30 14:15:38 +00:00
Hervé Poussineau
08b9a8878b I forgot to dereference FileObject in IoSetDeviceInterfaceState
svn path=/trunk/; revision=14872
2005-04-30 13:53:39 +00:00
Magnus Olsen
6510ad1387 Remove all hardcode string to En.rc
svn path=/trunk/; revision=14871
2005-04-30 13:35:52 +00:00
Magnus Olsen
e705463f4a Remove all hardcode string to En.rc
svn path=/trunk/; revision=14870
2005-04-30 13:13:36 +00:00
Magnus Olsen
04dd142850 Remove all hardcode string to En.rc
svn path=/trunk/; revision=14869
2005-04-30 12:36:36 +00:00
Magnus Olsen
39458d7a85 Remove all hardcode string to En.rc
svn path=/trunk/; revision=14868
2005-04-30 11:53:15 +00:00
Magnus Olsen
fcedc0bf07 Remove all hardcode string to En.rc
from misc.c, move.c pause.c, prompt.c

svn path=/trunk/; revision=14867
2005-04-30 11:16:47 +00:00
Hervé Poussineau
b8bccfb8b4 Implement IoRegisterPlugPlayNotification, IoUnregisterPlugPlayNotification
Implement IoSetDeviceInterfaceState
Fix IoRegisterDeviceInterface
Add prototype for ExFreePoolWithTag

namespc.c: change STATUS_UNSUCCESSFUL to STATUS_OBJECT_NAME_INVALID

SVN maintenance in ntoskrnl/kd/wrappers/

svn path=/trunk/; revision=14866
2005-04-30 09:39:09 +00:00
Filip Navara
847279d106 Denzil <d3nzil@gmail.com>
Czech translation of Package Manager (with minor corrections by myself).

svn path=/trunk/; revision=14865
2005-04-30 05:08:13 +00:00
Filip Navara
eddbd1a4e3 tinus <o112w8r02@sneakemail.com>
Change the backtrace command to show current EIP too.

svn path=/trunk/; revision=14864
2005-04-30 04:43:17 +00:00
Magnus Olsen
6985385b7d Remove all hardcode string to En.rc
from locale.c

svn path=/trunk/; revision=14863
2005-04-29 19:49:50 +00:00
Thomas Bluemel
827c16db5f - added stubs for NtSuspendProcess and NtResumeProcess
- the ProcessDebugPort information class is read-only on NT5.1+

svn path=/trunk/; revision=14862
2005-04-29 16:41:52 +00:00
Alex Ionescu
aff5e61f45 IRP Completion Fixes for 2nd-Stage:
- Free ALL Mdls, not just the first
- Don't copy buffered data just because the Device Object is buffered. Check if the IRP is.
- Don't handle MajorFunctions differenty, use flags which are now correctly set in order to determine course of action.
- Free memory by using flag.
- Don't remove IRP from Thread List too soon.
- Don't use FileObject fields after dereferencing it.
- Don't call IO Completion if there is already an APC routine.
- Signal FileObject/UserEvent properly depending on cases.
- Don't call UserAPC and set events like before if the IRP actually failed.

svn path=/trunk/; revision=14861
2005-04-29 14:38:05 +00:00
Aleksey Bragin
11e90a8e41 Import from WINE 25.04.05 (just because we have old version sitting in our SVN, which shows failures even on WinXP).
Now "advapi32_test registry" has 0 failures on Windows XP Pro. (and generally should have 0 failures under ROS too...)

svn path=/trunk/; revision=14860
2005-04-29 11:25:55 +00:00
Hervé Poussineau
aa182938a2 Remove debug message
svn path=/trunk/; revision=14859
2005-04-29 07:35:01 +00:00
Alex Ionescu
19a014905e And look who made a dumber mistake ;). Thanks WaxDragon
svn path=/trunk/; revision=14858
2005-04-29 02:13:42 +00:00
Magnus Olsen
b35cd289ca Swedish translations by Kris Engeman
svn path=/trunk/; revision=14857
2005-04-28 23:17:13 +00:00
Magnus Olsen
2a0755fbb0 Translate by Andreas Bjerkeholt (harteex@gmail.com)
svn path=/trunk/; revision=14856
2005-04-28 23:15:26 +00:00
Hervé Poussineau
cc5a10001c SVN maintenance:
Add svn:eol-style = native
Add svn:keywords = author date id revision

svn path=/trunk/; revision=14855
2005-04-28 23:14:54 +00:00
Magnus Olsen
32d6f2faa4 David Nordenberg: Swedish translation
svn path=/trunk/; revision=14854
2005-04-28 23:11:04 +00:00
Alex Ionescu
e606cb3718 Remove rant. H&E are very competent developers and made a typical bug that anyone could've made. I was just pissed for having lost an hour finding it ;)
svn path=/trunk/; revision=14853
2005-04-28 22:39:50 +00:00
Magnus Olsen
0dd12c923f Remove all hardcode string to En.rc
from memmory.c

svn path=/trunk/; revision=14852
2005-04-28 22:05:26 +00:00
Hervé Poussineau
1e92d6dfb5 Don't pass a NULL pointer as offset when creating a IRP_MJ_READ irp.
svn path=/trunk/; revision=14851
2005-04-28 21:56:36 +00:00
Magnus Olsen
cadb55139f Remove all hardcode string to En.rc
from free.c, goto.c, if.c label.c 

svn path=/trunk/; revision=14850
2005-04-28 21:17:07 +00:00
Aleksey Bragin
23c9abb0b3 Fix (registry.c:325, dated 20050425) test failure. Description: Added RegOpenKeyA/W check for input param (if it's NULL pointer, returning error)
svn path=/trunk/; revision=14849
2005-04-28 20:26:06 +00:00
Magnus Olsen
492c96c8f9 change _T((LPTSTR)szMsg)) to (LPTSTR)szMsg)
thanks royce3 he did see my small mistage

Remove all hardcode string to En.rc 
from for.c


svn path=/trunk/; revision=14848
2005-04-28 20:00:37 +00:00
Magnus Olsen
5571662474 Remove all hardcode string to En.rc
from echo.c and error.c

svn path=/trunk/; revision=14847
2005-04-28 17:44:34 +00:00
Aleksey Bragin
9e858b535b Added Nls\Locale registry tree, it corresponds to locales I imported from WINE a few revisions ago.
svn path=/trunk/; revision=14846
2005-04-28 14:48:28 +00:00
Magnus Olsen
b6ef59c124 Fix all these warings
libnurbs/nurbtess/sampleComp.cc: In function `void sampleCompLeft(Real*, Real*, vertexArray*, Int, Int, vertexArray*, Int, Int, gridBoundaryChain*, Int, Int, Int, Int, Int, Int, primStream*)':
libnurbs/nurbtess/sampleComp.cc:162: warning: 'gridMidIndex1' might be used uninitialized in this function
libnurbs/nurbtess/sampleComp.cc:162: warning: 'gridMidIndex2' might be used uninitialized in this function

libnurbs/nurbtess/sampleCompRight.cc: In function `void sampleCompRight(Real*, Real*, vertexArray*, Int, Int, vertexArray*, Int, Int, gridBoundaryChain*, Int, Int, Int, Int, Int, Int, primStream*)':
libnurbs/nurbtess/sampleCompRight.cc:75: warning: 'gridMidIndex1' might be used uninitialized in this function
libnurbs/nurbtess/sampleCompRight.cc:75: warning: 'gridMidIndex2' might be used uninitialized in this function

svn path=/trunk/; revision=14845
2005-04-28 13:55:35 +00:00
Aleksey Bragin
4e01611563 Imported locales information from WINE. Sorry it isn't done the "right way" (store all info in locales.nls as WinXP does), but for now I think this way will do.
Also some locales aren't imported because their info contains unicode characters, and I didn't want to switch kernel32 from windres to wrc.

svn path=/trunk/; revision=14844
2005-04-28 13:54:19 +00:00
Aleksey Bragin
af4afa4f65 Imported LANG_ and SUBLANG_ defines from WINE
svn path=/trunk/; revision=14843
2005-04-28 13:50:32 +00:00
Magnus Olsen
4a2a65e916 Fix all these waring by initaielize them where they are declare
libutil/quad.c: In function `gluPartialDisk':
libutil/quad.c:451: warning: 'texLow' might be used uninitialized in this function
libutil/quad.c:451: warning: 'texHigh' might be used uninitialized in this function
libutil/quad.c: In function `gluSphere':
libutil/quad.c:720: warning: 'sintemp2' might be used uninitialized in this function
libutil/quad.c:720: warning: 'sintemp3' might be used uninitialized in this function
libutil/quad.c:720: warning: 'sintemp4' might be used uninitialized in this function
libutil/quad.c:721: warning: 'costemp2' might be used uninitialized in this function
libutil/quad.c:721: warning: 'costemp3' might be used uninitialized in this function
libutil/quad.c:721: warning: 'costemp4' might be used uninitialized in this function

svn path=/trunk/; revision=14842
2005-04-28 13:38:30 +00:00
Magnus Olsen
dada212f2a fix this waring
libutil/mipmap.c: In function `gluBuild3DMipmaps':
libutil/mipmap.c:7382: warning: 'proxyTarget' might be used uninitialized in this function
by initialized the value when it declare


svn path=/trunk/; revision=14841
2005-04-28 13:19:23 +00:00
Magnus Olsen
fadd959c12 fix waring with insiate iter
libutil/mipmap.c: In function `gluScaleImage':
libutil/mipmap.c:5105: warning: 'iter' might be used uninitialized in this function

remve outindex it is not being use at all 
libutil/mipmap.c: In function `scaleInternalPackedPixel':
libutil/mipmap.c:5990: warning: 'outindex' might be used uninitialized in this function


svn path=/trunk/; revision=14840
2005-04-28 13:01:57 +00:00
Steven Edwards
6184590544 we have two copies of a better calc floating around
svn path=/trunk/; revision=14839
2005-04-28 03:37:01 +00:00
Alex Ionescu
f43691583f My mistake
svn path=/trunk/; revision=14838
2005-04-28 00:57:35 +00:00
Alex Ionescu
defaccea55 IO Manager Cleanup continues:
- Removed many extra files that expanded the I/O Manager too much. We usually stick with the standard of
      one object/class per file, like io/device.c or io/controller.c, so it was very confusing to have some
      objects split up in 5 or 6 different files, some containing only one api. Additionally, even a third
      system was used, were objects were bunched up together by class. This mess was so bad that NtCreateFile,
      IopCreateFile, IoCreateFile, IopDeleteFile, NtDeleteFile and NtWriteFile were in 5 different files (as an
      example).
    - Cleaned up some IRP code and fixed a couple of bugs, mainly:
        - Write I/O Type in IRP
        - Write proper IRP Flags where they shoudl be used (Will help for completing requests when i clean up that code)
        - Do *NOT* zero out buffers or data that shouldn't be zeroed. Scsiport actually dependen on this incorrect
          behaviour. Code should never depend on a buffer being zeroed!
        - Remove a lot of duplicated code and helper/alternate functions that weren't really useful.
        - Free MDL and IRP on some failures where we didn't
     - Alphabetized some of the large io files for easier lookup of functions. This and the deletions have resulted
       in a completely bloated diff file. I will provide a cleaned up diff on request by manually downloading the
       old revision and copy/pasting the new code directly above it. The functions which we touched are: 
           - IoAllocateIrp
           - IoBuild[A]SyncronousFsdRequest
           - IoBuildDeviceIoControlRequest
           - IoInitializeIrp
           - IoPageRead, IoSynchronousPageWrite

svn path=/trunk/; revision=14837
2005-04-28 00:54:59 +00:00
Hartmut Birr
612461644d Fixed the check for a created first thread.
svn path=/trunk/; revision=14836
2005-04-27 21:57:24 +00:00
Hartmut Birr
a6d944ecfc Close only the Nls directory handle if the directory was created.
svn path=/trunk/; revision=14835
2005-04-27 21:55:02 +00:00
Hartmut Birr
5e1d995563 Fixed _SEH2_END.
svn path=/trunk/; revision=14834
2005-04-27 21:51:55 +00:00
Hartmut Birr
2c12af40a1 Guarded some calls to handle functions with KeEnterCriticalRegion/KeLeaveCriticalRegion in PsDeleteCidHandle.
svn path=/trunk/; revision=14833
2005-04-27 21:47:34 +00:00
Hartmut Birr
d38a2745a9 Made the physical memory section permanent.
svn path=/trunk/; revision=14832
2005-04-27 21:44:27 +00:00
Hartmut Birr
68f8b9f89b Reinitialized the palette entries after setting the video mode in DrvAssertMode.
svn path=/trunk/; revision=14831
2005-04-27 21:10:44 +00:00
Aleksey Bragin
06ff525737 Added language 0419 (russian) into NLS\Language
svn path=/trunk/; revision=14830
2005-04-27 19:46:41 +00:00
Art Yerkes
2e9d113d86 turned off DEBUG output (thanks to gge for pointing it out).
svn path=/trunk/; revision=14829
2005-04-27 19:04:20 +00:00
Magnus Olsen
f00d82e494 remove ddalphablt worng functions
it should have been NtGdiDdAddAlphaBlt

svn path=/trunk/; revision=14828
2005-04-26 22:28:24 +00:00
Magnus Olsen
3bd5362791 implement NtGdiDdBlt and NtGdiDdAlphaBlt
NtGdiDdAlphaBlt are not supportet by microsoft 
so we report unsupport directx function 


svn path=/trunk/; revision=14827
2005-04-26 22:02:32 +00:00
Aleksey Bragin
dd182c1076 A few locales entries added, though we have currently only 4 locales imported from wine (france, eng, enu, german)
svn path=/trunk/; revision=14826
2005-04-26 21:26:06 +00:00
Aleksey Bragin
037d9d7e8b More DPRINTs added for better tracing of locale-related calls, but NDEBUG is defined.
svn path=/trunk/; revision=14825
2005-04-26 21:23:43 +00:00
Aleksey Bragin
23e1c587a2 Minor changes into a way locales are get and listed
svn path=/trunk/; revision=14824
2005-04-26 21:21:32 +00:00
Gé van Geldorp
c5106fcc0a Sync to Wine-20050419:
Mike McCormack <mike@codeweavers.com>
- Load and display bitmaps in the dialogs.
- Make sure there's only one place we allocate dialog controls.
- Rename dupstrW to strdupW, and remove duplicate definition.
- Move definition of string manipulation functions to msipriv.h.
- Split out database functions, remove dependence on wine/unicode.h.
- Fix loading of the summary information.
- test cases for summary information
- fix memory leaks
- Implement summary information loading and saving.
- Declare MsiExportDatabase* in the spec file, and fix a typo.
- Replace instances of HeapAlloc/MultiByteToWideChar with the internally
  defined strdupAtoW.
- Use strdup, implement MsiDatabaseImportA.
Francois Gouget <fgouget@free.fr>
- Assorted spelling fixes.
Peter Berg Larsen <pebl@math.ku.dk>
- Janitorial: Get rid of strncpy/strncpyW.
- Remove 2 identicals calls to strlenW.
Jose Manuel Ferrer Ortiz <jmfo1982@yahoo.es>
- Spanish translations updated.
Aric Stewart <aric@codeweavers.com>
- Implement Publish Components in order for MsiGetQualifiedComponent
  apis to work. Also implement MsiGetQualifiedComponent, or at least some
  of the functionality as it is supposed to install stuff if it is
  absent, which it does not do yet.
- Make sure the GUID of the typelib we are registering matches the guid
  requested from MSI. If not search the given typelib file to find the
  typelib requested to register.
- If running in UI mode, then display the UI mode dialogs at the end of
  the installs.
Steven Edwards <steven_ed4153@yahoo.com>
- Avoid using ver.h in favor of winver.h.
Jakob Eriksson <jakov@vmlinux.org>
- Get rid of HeapAlloc casts.
Hans Leidekker <hans@it.vu.nl>
- Dutch resource translation.
Marcus Meissner <meissner@suse.de>
- Fixed MsiDatabaseImportA, MsiDatabaseImportW, and
  MsiCreateAndVerifyInstallerDirectory stub parameter counts.
Juan Lang <juan_lang@yahoo.com>
- Log missing environment vars for easier debugging.

svn path=/trunk/; revision=14823
2005-04-26 20:39:02 +00:00
Gé van Geldorp
f668ceb14f Sync to Wine-20050419:
Jose Manuel Ferrer Ortiz <jmfo1982@yahoo.es>
- Spanish translations updated.
Jakob Eriksson <jakov@vmlinux.org>
- Get rid of HeapAlloc casts.

svn path=/trunk/; revision=14822
2005-04-26 20:05:25 +00:00
Gé van Geldorp
6119adfe22 Sync to Wine-20050419:
Francois Gouget <fgouget@free.fr>
- Assorted spelling fixes.
- SBSP_ABSOLUTE is 0 so we cannot do (wFlags & SBSP_ABSOLUTE).
- Add COMDLG32_DumpSBSPFlags().
Eric Pouech <pouech-eric@wanadoo.fr>
- Added proper definition for PRINTDLGEX[AW] structures.
Jakob Eriksson <jakov@vmlinux.org>
- Get rid of HeapAlloc casts.
Juan Lang <juan_lang@yahoo.com>
- Change a fixme to a warn, and use W version of call.
Peter Berg Larsen <pebl@math.ku.dk>
- Replace strncpy with memcpy or lstrcpyn.
- Janitorial: Get rid of strncpy/strncpyW.

svn path=/trunk/; revision=14821
2005-04-26 19:18:13 +00:00
Hartmut Birr
c292d7ed88 - Preinitialise the com port infos with default values.
- Set the baud rate also in SerialPortInfo.

svn path=/trunk/; revision=14820
2005-04-26 19:06:19 +00:00
Gé van Geldorp
b55b368e31 Re-apply 14698 - 14762 and fix resulting problem
svn path=/trunk/; revision=14819
2005-04-26 18:18:36 +00:00
Magnus Olsen
9b91fad21c Implement NtGdiDdCanCreateSurface
not tested 

svn path=/trunk/; revision=14818
2005-04-26 17:19:06 +00:00
Hartmut Birr
c087372392 - Used SysProcessorTimeInfo to calculate the idle time.
- Fixed the allocation of SysProcessorTimeInfo.  
- Used the process creation time as second unique id.


svn path=/trunk/; revision=14817
2005-04-26 16:28:38 +00:00
Alex Ionescu
946594bdc0 Implement IoRaiseHardError, combine error stuff, fix hideously wrong implementatin of Controller Objects.
svn path=/trunk/; revision=14816
2005-04-26 14:51:18 +00:00
Alex Ionescu
c6c78c3133 Fixedd CTM for sedwards. happy birthday to me
svn path=/trunk/; revision=14815
2005-04-26 13:17:44 +00:00
Alex Ionescu
d54cf3af82 Enable flags only for 3.4.3, should fix the build for people with versions below. Disabled on 4.0 since they are automatic
svn path=/trunk/; revision=14814
2005-04-26 12:35:32 +00:00
Thomas Bluemel
72612ded64 don't request write access in NtReadVirtualMemory, this should fix the listdlls.exe issues
svn path=/trunk/; revision=14813
2005-04-26 09:40:30 +00:00
Art Yerkes
869e1792b8 Fixes by WaxDragon:
- Implement get* integer reading.
- Properly implement ipv4addrs (validates a set of IPv4 addresses)
- Limit returned DNS servers to 1 until we fix iphlpapi.

svn path=/trunk/; revision=14812
2005-04-26 07:11:02 +00:00
Alex Ionescu
940803cd14 Do not strip if KDBG is used
svn path=/trunk/; revision=14811
2005-04-26 05:13:49 +00:00
Alex Ionescu
ae45230c20 Change optimization settings for retail builds. Change to -Os for smaller executables which are not slower, and enable more advanced optimizations. funitatatime is already included by default in GCC 4.0. Strip debug info from retail builds, since we don't parse the symbols anyways. I hope these options don't break anything, they don't for me; Debugging is unaffected.
svn path=/trunk/; revision=14810
2005-04-26 05:10:58 +00:00
Alex Ionescu
da26306086 Fix compilation with optimizations
svn path=/trunk/; revision=14809
2005-04-26 04:58:32 +00:00
Hartmut Birr
02202bd8b1 Fixed the initialising of bochs debug.
svn path=/trunk/; revision=14808
2005-04-25 20:35:37 +00:00
Alex Ionescu
b92778d49a Remove excess header
svn path=/trunk/; revision=14807
2005-04-25 19:43:50 +00:00
Alex Ionescu
d06c1ef5e9 Remove dbg.h and move it to kd.h, it was getting confusing to have so many debug files. Also fixes hal to compile
svn path=/trunk/; revision=14806
2005-04-25 19:42:48 +00:00
Alex Ionescu
a3bf890534 Merge in wrappers with DBG setting as requested
svn path=/trunk/; revision=14805
2005-04-25 18:31:20 +00:00
Alex Ionescu
a893ce48dd Fix compilation problem..
svn path=/trunk/; revision=14804
2005-04-25 18:29:16 +00:00
Hartmut Birr
7519345381 Replaced a dirty hack by another.
svn path=/trunk/; revision=14803
2005-04-25 17:57:57 +00:00
Alex Ionescu
6f666f0ad4 Simplify and correct KiDebugService
svn path=/trunk/; revision=14802
2005-04-25 16:17:35 +00:00
Alex Ionescu
3ebd40dd0f Add GDB = 1 to makefile to compile-in the GDB Wrapper. These options will be better manged with rbuild
svn path=/trunk/; revision=14801
2005-04-25 15:20:15 +00:00
Alex Ionescu
6458f12f54 Added KiDebugService. Will optimize soon to use common Exit code
svn path=/trunk/; revision=14800
2005-04-25 15:02:11 +00:00
Alex Ionescu
e160c0fb26 KD System Rewrite:
- Totally dynamic based on the principle of Native Providers built-in the Kernel (like Screen, 
      FileLog and Serial) and a pluggable Wrapper which is optionally compiled (Bochs, GDB)
    - Nothing changed in KDBG, except for that its settings (KDSERIAL/KDNOECHO) are now stored in
      KdbDebugState instead.
    - Wrappers are currently built uncondtionally. With rbuild, I'll make them easily removable.
    - Debug Log code simplified greatly, sped up and now supports printing even the first boot messages,
      which wasn't supported before.
    - Removed most of KDBG compile-time settings, ones which are needed are in include/dbg as macros now.
    - Left in some kdbg init code and break code, but it could be made to be used as a 'wrapper' for those
      functions. I will do it later.
    - Made a hack for KdpEnterDebuggerException..it seems to be called differently and at different times
      for GDB vs KDBG and I couldn't unite them.
    - KdpServiceDispatcher now does both the documented and ros-internal debug functions and will eventually
      be called through INT2D from keyboard.sys instead of as an API.

All in all, this patch makes KD  separated from KDBG and creates a pluggable architecture for creating future wrappers that don't require changing tons of code in the future. It improves the debug
log by printing even the earliest debug messages to it and it removes many of the manual ifdef(KDBG) but making them automatic though a single macro file. It makes extra debugging functionality optional and it
allows removal of a private API from our exports.

svn path=/trunk/; revision=14799
2005-04-25 14:44:48 +00:00
Gé van Geldorp
753a3c0e99 Sync to Wine-20050419:
Juan Lang <juan_lang@yahoo.com>
- Always initialize header file name, to prevent "#include (null)"
  statements in generated files.
- Put space between include directive and include file.
- Add proxy/stub options to widl man page.
Vincent Beron <vberon@mecano.gme.usherb.ca>
- Add support for single in idl files.
- Keep types sorted in alphabetical order.
Francois Gouget <fgouget@free.fr>
- Assorted spelling fixes.

svn path=/trunk/; revision=14798
2005-04-25 10:58:34 +00:00
Gé van Geldorp
2b5f3c76a1 Sync to Wine-20050419:
Francois Gouget <fgouget@free.fr>
- Assorted spelling fixes.
Michael Lin <mlin@corvu.com.au>
- Change menu item options to use optional comma.

svn path=/trunk/; revision=14797
2005-04-25 09:12:35 +00:00
Gé van Geldorp
c782c3c14d Sync to Wine-20040419:
Jon Griffiths <jon_p_griffiths@yahoo.com>
- -Wunsigned fixes.
Alexandre Julliard <julliard@winehq.org>
- Use the correct file name in the "generated automatically" comments.
- Don't crash on xrealloc(0) (found by Jon Griffiths).
Marcus Meissner <meissner@suse.de>
- Use correct movw instead of movl when handling segment registers.

svn path=/trunk/; revision=14796
2005-04-25 08:26:29 +00:00
Gé van Geldorp
1900553907 SVN maintenance
svn path=/trunk/; revision=14794
2005-04-25 07:13:04 +00:00
Thomas Bluemel
a075aaef57 add missing typecast
svn path=/trunk/; revision=14793
2005-04-24 20:12:14 +00:00
Eric Kohl
4fd3eee227 Implement the time format page for the regional settings control panel.
svn path=/trunk/; revision=14792
2005-04-24 14:49:56 +00:00
Maarten Bosma
63b33dd9b3 PackageManager: HTML Log
svn path=/trunk/; revision=14791
2005-04-24 10:37:17 +00:00
Alex Ionescu
88d6fe5cb4 Don't use hack for trap frames anymore, read TempEsp and TempSegSs for kernel-mode traps during debugging.
svn path=/trunk/; revision=14790
2005-04-23 20:02:39 +00:00
Alex Ionescu
5673eb73b9 Use fake frame in KDBG mode, not DBG
svn path=/trunk/; revision=14789
2005-04-23 19:23:00 +00:00
Casper Hornstrup
e2239c25dc ROS_BUILDNOSTRIP environment variable to control building of non-symbol-stripped executable output files
svn path=/branches/xmlbuildsystem/; revision=14788
2005-04-23 18:41:02 +00:00
Alex Ionescu
8057554d01 forgot to delete this one too
svn path=/trunk/; revision=14787
2005-04-23 18:17:11 +00:00
Casper Hornstrup
f76d62cff1 Use correct case
svn path=/branches/xmlbuildsystem/; revision=14786
2005-04-23 18:16:59 +00:00
Alex Ionescu
a1151864cc Share compiler-generated asm exports between ntdll and ntoskrnl (stuff like aullshr, alldiv, etc
svn path=/trunk/; revision=14785
2005-04-23 18:15:39 +00:00
Alex Ionescu
1d0c612395 Remove MDA support
svn path=/trunk/; revision=14784
2005-04-23 18:00:59 +00:00
Alex Ionescu
9a7799d8b8 Delete cruft
svn path=/trunk/; revision=14783
2005-04-23 17:56:10 +00:00
Casper Hornstrup
abe602feed Don't detect host compiler on Linux
svn path=/branches/xmlbuildsystem/; revision=14782
2005-04-23 17:24:13 +00:00
Casper Hornstrup
dea6a7d878 Allow warnings for now (for real this time)
svn path=/branches/xmlbuildsystem/; revision=14781
2005-04-23 17:11:51 +00:00
Casper Hornstrup
a29d2466ef Allow warnings for now
svn path=/branches/xmlbuildsystem/; revision=14780
2005-04-23 17:09:59 +00:00
Alex Ionescu
7f7e3e1cf6 Add more detailed comment about ThreadListEntry so people don't get confused liek I did
svn path=/trunk/; revision=14779
2005-04-23 16:23:57 +00:00
Alex Ionescu
6c66ab6c64 Move removing process from active list to PspDeleteProcess instead of PspExitProcess. This way we don't have to do it manually after ObInsertObject failure in PspCreateProces. Also, set the Process Query Time at the end of Process Creation, since the process doesn't really exist before then. Thanks to Hartmut for finding the bugs.
svn path=/trunk/; revision=14778
2005-04-23 16:17:27 +00:00
Alex Ionescu
e60561fb17 Move removing process from active list to PspDeleteProcess instead of PspExitProcess. This way we don't have to do it manually after ObInsertObject failure in PspCreateProces. Also, set the Process Query Time at the end of Process Creation, since the process doesn't really exist before then. Thanks to Hartmut for finding the bus.
svn path=/trunk/; revision=14777
2005-04-23 16:16:59 +00:00
Hartmut Birr
efa3efe5bb Fixed restoring of registers.
svn path=/trunk/; revision=14776
2005-04-23 16:09:06 +00:00
Magnus Olsen
b331ee2104 Swedish translation
Andreas Bjerkeholt (harteex@gmail.com) 

svn path=/trunk/; revision=14775
2005-04-23 14:16:48 +00:00
Magnus Olsen
18ca7ef010 Swedish translation by Kris Engeman
irc : nick "Wacko"

svn path=/trunk/; revision=14774
2005-04-23 14:14:16 +00:00
Magnus Olsen
e3f6aacd83 forget use lates winfile.rc
svn path=/trunk/; revision=14773
2005-04-23 14:09:44 +00:00
Magnus Olsen
7a1c9f6f2d Fix a bug in sv.rc so it can compile
and it is working now in ros


svn path=/trunk/; revision=14772
2005-04-23 14:01:43 +00:00
Magnus Olsen
a893ac134a reverit swedish translation
svn path=/trunk/; revision=14771
2005-04-23 13:42:15 +00:00
Magnus Olsen
aeb0176d0e David Nordenberg: Swedish translation, proofread by Andreas Bjerkeholt
svn path=/trunk/; revision=14770
2005-04-23 13:39:53 +00:00
Magnus Olsen
b37e882082 2005-04-07 For swedish translations in explorer
* David Nordenberg: Fixed & on two idetical letters and switched to codepage 1252

svn path=/trunk/; revision=14769
2005-04-23 13:36:06 +00:00
Hartmut Birr
8235965b9e Fixed the smp build.
svn path=/trunk/; revision=14768
2005-04-23 12:44:42 +00:00
Hartmut Birr
d00288c263 - Initialized the process create time.
- Fixed some minor bugs.

svn path=/trunk/; revision=14767
2005-04-23 10:18:43 +00:00
Hartmut Birr
4db3d406aa Removed a wrong additional reference in IoCreateDevice.
svn path=/trunk/; revision=14766
2005-04-23 10:16:18 +00:00
Gé van Geldorp
ed7c0b9e7c Revert freeldr back to revision 14697
svn path=/trunk/; revision=14765
2005-04-23 10:15:49 +00:00
Hartmut Birr
493afd1118 Do not remove an entry from the parent for twice.
svn path=/trunk/; revision=14764
2005-04-23 10:14:29 +00:00
Hartmut Birr
ff121124b1 Remove the thread from the list when terminating.
svn path=/trunk/; revision=14763
2005-04-23 10:11:37 +00:00
Alex Ionescu
3ff5700950 And these should've been added...
svn path=/trunk/; revision=14762
2005-04-23 06:45:56 +00:00
Alex Ionescu
9732c7adea Bug in previous commit...these should've been deleted
svn path=/trunk/; revision=14761
2005-04-23 06:43:39 +00:00
Alex Ionescu
665e646216 Small Debugging Services re-arrangement. /dbgk created for User-Mode debugging and Native Debug Objects (implemented an experimental NtCreateDebugObject. Untested and doesn't work since the DbgkObjectType isn't created yet. Added dbgk.h with the basic structures for now. Removed /dbg and split up code in ex/debug.c for executive and rtl/debug.c for RunTime Library Debug calls. Kdbg now dedicated in /kdbg.
svn path=/trunk/; revision=14760
2005-04-23 06:41:25 +00:00
Art Yerkes
45ae6da0c6 Fixes a problem reported by WaxDragon when acquiring the nameserver address
from DHCP.  This needs to be rechecked but seems harmless.

svn path=/trunk/; revision=14759
2005-04-23 05:43:35 +00:00
Alex Ionescu
98f1613a52 Implement KiServiceExit2 which restores debug registers and exits with IRET, used during user-mode return without a syscall
svn path=/trunk/; revision=14758
2005-04-23 05:00:10 +00:00
Alex Ionescu
e43b4d5c1a Terminate System Thread after execution...forgot to add this for some reason.Thanks to WaxDragon for reporting it
svn path=/trunk/; revision=14756
2005-04-23 04:19:35 +00:00
Alex Ionescu
1928c25d73 Add KDBG debugging hack from old code and convert it to fit new one. Not enabled yet because it underflows the stack after a while (researching why). Also complete KeContextToTrapFrame and have Ke386InitThreadWithContext call it to handle creating the Initial Trap Frame
svn path=/trunk/; revision=14754
2005-04-23 04:12:26 +00:00
Casper Hornstrup
b7d6aeae38 * Use freeldr.sys for livecd
* Install registry hives in the right place on the livecd


svn path=/branches/xmlbuildsystem/; revision=14747
2005-04-22 15:06:58 +00:00
Casper Hornstrup
03858e9151 Correct install name
svn path=/branches/xmlbuildsystem/; revision=14746
2005-04-22 15:03:28 +00:00
Casper Hornstrup
4e8835798a * Remove empty line
* Rearrange some dependencies


svn path=/branches/xmlbuildsystem/; revision=14738
2005-04-22 10:12:37 +00:00
Casper Hornstrup
2f6df3a9cf Clean object files for static libraries
svn path=/branches/xmlbuildsystem/; revision=14736
2005-04-22 09:19:18 +00:00
Casper Hornstrup
ef5b027655 Generate temporary files at the root of the directory
svn path=/branches/xmlbuildsystem/; revision=14733
2005-04-21 16:18:29 +00:00
Casper Hornstrup
e3bf054824 Use ROS_INTERMEDIATE and ROS_OUTPUT environment variables
svn path=/branches/xmlbuildsystem/; revision=14731
2005-04-21 13:05:54 +00:00
Casper Hornstrup
4f605b66c3 Clean-as-you-go mode to remove generated files as soon as possible to minimize disk space requirements
svn path=/branches/xmlbuildsystem/; revision=14729
2005-04-21 12:54:15 +00:00
Casper Hornstrup
376f9fd35c Document ROS_PREFIX environment variable
svn path=/branches/xmlbuildsystem/; revision=14728
2005-04-21 09:52:11 +00:00
Casper Hornstrup
7f1e0b51b2 Autodetect compiler
svn path=/branches/xmlbuildsystem/; revision=14727
2005-04-21 09:38:45 +00:00
Gé van Geldorp
aba5075ad4 Merge 14698:14725 from trunk
svn path=/branches/xen/; revision=14726
2005-04-21 09:33:23 +00:00
Casper Hornstrup
5c61988e18 Don't put \ at end of path
svn path=/branches/xmlbuildsystem/; revision=14722
2005-04-20 20:48:55 +00:00
Casper Hornstrup
40242e030f Don't link kernel-mode modules to kernel32.dll
svn path=/branches/xmlbuildsystem/; revision=14716
2005-04-20 17:57:26 +00:00
Hervé Poussineau
fde9a780c8 Don't hardcode "Reactos.xml" name
svn path=/branches/xmlbuildsystem/; revision=14715
2005-04-20 16:01:19 +00:00
Casper Hornstrup
fed5678a4c Fix build error
svn path=/branches/xmlbuildsystem/; revision=14714
2005-04-20 15:19:09 +00:00
Casper Hornstrup
ca82812967 Support 'make livecd'
svn path=/branches/xmlbuildsystem/; revision=14705
2005-04-19 20:52:49 +00:00
Gé van Geldorp
b4a338182d Merge 14301 - 14698 from trunk
svn path=/branches/xen/; revision=14699
2005-04-19 10:06:05 +00:00
Gé van Geldorp
0f7fa40246 Implement table grant mechanism for block devices
svn path=/branches/xen/; revision=14652
2005-04-17 18:53:55 +00:00
Gé van Geldorp
1118e0ce9d Read from disk
svn path=/branches/xen/; revision=14622
2005-04-14 21:47:57 +00:00
Casper Hornstrup
849d82764b repos test
svn path=/branches/xmlbuildsystem/; revision=14616
2005-04-14 15:42:56 +00:00
Casper Hornstrup
9e82ebc2fb repos test
svn path=/branches/xmlbuildsystem/; revision=14615
2005-04-14 15:26:31 +00:00
Casper Hornstrup
ea46a589a2 repos test
svn path=/branches/xmlbuildsystem/; revision=14614
2005-04-14 15:21:25 +00:00
Casper Hornstrup
a268dab596 repos test
svn path=/branches/xmlbuildsystem/; revision=14613
2005-04-14 15:14:19 +00:00
Casper Hornstrup
808b0255b6 repos test
svn path=/branches/xmlbuildsystem/; revision=14612
2005-04-14 15:10:41 +00:00
Casper Hornstrup
8aa43261af repos test
svn path=/branches/xmlbuildsystem/; revision=14611
2005-04-14 15:06:21 +00:00
Casper Hornstrup
3a085e784e ci test
svn path=/branches/xmlbuildsystem/; revision=14610
2005-04-14 15:02:30 +00:00
Casper Hornstrup
347e371970 test
svn path=/branches/xmlbuildsystem/; revision=14609
2005-04-14 14:54:58 +00:00
Gé van Geldorp
243f5ba103 - Implement basic event handling
- Update to latest xen-unstable

svn path=/branches/xen/; revision=14608
2005-04-14 14:36:33 +00:00
Casper Hornstrup
9201a30848 test
svn path=/branches/xmlbuildsystem/; revision=14607
2005-04-14 14:30:33 +00:00
Casper Hornstrup
ff1ef6813c test
svn path=/branches/xmlbuildsystem/; revision=14606
2005-04-14 14:27:25 +00:00
Casper Hornstrup
1c89a135da Have the object files of a module depend on the build file that contain the module
svn path=/branches/xmlbuildsystem/; revision=14591
2005-04-11 18:45:48 +00:00
Casper Hornstrup
fb03ace091 Support -Werror
svn path=/branches/xmlbuildsystem/; revision=14582
2005-04-10 19:44:11 +00:00
Casper Hornstrup
6d5cdde45c Merge 13831:14550 from trunk
svn path=/branches/xmlbuildsystem/; revision=14575
2005-04-10 14:32:30 +00:00
Casper Hornstrup
af941b419a Copy riched20
svn path=/branches/xmlbuildsystem/; revision=14555
2005-04-08 19:18:01 +00:00
Casper Hornstrup
b69e3dfd1d Delete riched20
svn path=/branches/xmlbuildsystem/; revision=14554
2005-04-08 19:16:52 +00:00
Casper Hornstrup
e07a1f6200 Copy makefile
svn path=/branches/xmlbuildsystem/; revision=14552
2005-04-08 19:03:04 +00:00
Casper Hornstrup
62a2326dfb Delete Makefile
svn path=/branches/xmlbuildsystem/; revision=14551
2005-04-08 18:59:37 +00:00
Casper Hornstrup
a95618a8a5 Build when DBG=1
svn path=/branches/xmlbuildsystem/; revision=14550
2005-04-08 17:24:30 +00:00
Steven Edwards
76644e2b9b wow it really does work on linux now
svn path=/branches/xmlbuildsystem/; revision=14548
2005-04-08 16:58:29 +00:00
Casper Hornstrup
eb4fea4ab7 * Clean object files
* Clean generated files for cabman


svn path=/branches/xmlbuildsystem/; revision=14540
2005-04-07 20:28:35 +00:00
Casper Hornstrup
991efa7f22 Add missing file
svn path=/branches/xmlbuildsystem/; revision=14539
2005-04-07 19:57:05 +00:00
Casper Hornstrup
19592be8c0 Use order-only prerequisites for directories to prevent spurious rebuilds when building on non-FAT volumes
svn path=/branches/xmlbuildsystem/; revision=14538
2005-04-07 19:39:39 +00:00
Casper Hornstrup
a15b6d2023 Add the files where they are located
svn path=/branches/xmlbuildsystem/; revision=14533
2005-04-06 22:27:22 +00:00
Casper Hornstrup
1ea35be664 Correct some wrong dependencies for 'make bootcd'
svn path=/branches/xmlbuildsystem/; revision=14532
2005-04-06 20:49:49 +00:00
Casper Hornstrup
f81cbc31f1 Accept ROS_INSTALL environment variable
svn path=/branches/xmlbuildsystem/; revision=14520
2005-04-05 20:24:26 +00:00
Casper Hornstrup
dcdd51410c Rebuild source if a header is changed
svn path=/branches/xmlbuildsystem/; revision=14510
2005-04-05 18:49:53 +00:00
Casper Hornstrup
f6d915eecc Simplify directory handling
svn path=/branches/xmlbuildsystem/; revision=14509
2005-04-05 18:20:45 +00:00
Gé van Geldorp
677e29b95f Implement exception handling for Xen
svn path=/branches/xen/; revision=14508
2005-04-05 17:50:21 +00:00
Casper Hornstrup
13fb77b90b Generate registry hives on 'make install'
svn path=/branches/xmlbuildsystem/; revision=14507
2005-04-05 17:22:02 +00:00
Casper Hornstrup
c8c43a85a3 Install generated files
svn path=/branches/xmlbuildsystem/; revision=14489
2005-04-04 22:05:08 +00:00
Casper Hornstrup
19fa7f20af Support installation of generated files
svn path=/branches/xmlbuildsystem/; revision=14488
2005-04-04 20:50:55 +00:00
Casper Hornstrup
77b574742c Let dependencies control 'make install'
svn path=/branches/xmlbuildsystem/; revision=14487
2005-04-04 19:39:44 +00:00
Casper Hornstrup
de09c8d285 Partial 'make install' implementation
svn path=/branches/xmlbuildsystem/; revision=14483
2005-04-03 19:25:58 +00:00
Martin Fuchs
0341aa671d protect system image list
svn path=/branches/lean-explorer/; revision=14473
2005-04-03 12:14:30 +00:00
Casper Hornstrup
dff399ada6 Add missing file
svn path=/branches/xmlbuildsystem/; revision=14472
2005-04-03 11:58:31 +00:00
Casper Hornstrup
c4387e8d7d Verbose mode
svn path=/branches/xmlbuildsystem/; revision=14471
2005-04-03 11:57:34 +00:00
Martin Fuchs
89e885955c show logoff dialog in lean explorer
svn path=/branches/lean-explorer/; revision=14470
2005-04-03 11:38:08 +00:00
Casper Hornstrup
2c65178fde Detect compiler -pipe support
svn path=/branches/xmlbuildsystem/; revision=14468
2005-04-03 10:46:08 +00:00
Casper Hornstrup
1cb006090f Avoid spurious error messages during make clean
svn path=/branches/xmlbuildsystem/; revision=14466
2005-04-03 10:05:52 +00:00
Casper Hornstrup
78c796560d Generate map files
svn path=/branches/xmlbuildsystem/; revision=14462
2005-04-02 21:45:38 +00:00
Casper Hornstrup
d7fdb5701e Generate map files
svn path=/branches/xmlbuildsystem/; revision=14461
2005-04-02 21:45:16 +00:00
Casper Hornstrup
8d784c14d4 Document ROS_TEMPORARY environment variable
svn path=/branches/xmlbuildsystem/; revision=14450
2005-04-02 18:01:18 +00:00
Casper Hornstrup
d72d41723c Have rbuild create the output directories
svn path=/branches/xmlbuildsystem/; revision=14449
2005-04-02 16:46:08 +00:00
Martin Fuchs
00bf273c43 merge from trunk: enable multiline tooltips
svn path=/branches/lean-explorer/; revision=14437
2005-04-02 11:09:39 +00:00
Martin Fuchs
6369325505 merge from trunk: launch shell DDE server
svn path=/branches/lean-explorer/; revision=14436
2005-04-02 11:00:58 +00:00
Martin Fuchs
f2cca3cd47 merge from trunk: hide login screen to make the login on XP faster
svn path=/branches/lean-explorer/; revision=14435
2005-04-02 10:59:49 +00:00
Gé van Geldorp
bebf425d30 - Add support for Xen 2.0
- Rearrange some code

svn path=/branches/xen/; revision=14427
2005-04-01 22:39:20 +00:00
Casper Hornstrup
321673ceb9 Put winebuild output in intermediate directory
svn path=/branches/xmlbuildsystem/; revision=14423
2005-04-01 19:31:52 +00:00
Casper Hornstrup
75065f4320 Build stubs generated by winebuild
svn path=/branches/xmlbuildsystem/; revision=14419
2005-04-01 18:18:18 +00:00
Steven Edwards
bf30d232a0 add a inline strupr for us Unix folk
svn path=/branches/xmlbuildsystem/; revision=14394
2005-03-31 19:54:03 +00:00
Gé van Geldorp
4fa9438b7a Xen-specific memory setup for FreeLdr
svn path=/branches/xen/; revision=14385
2005-03-30 22:04:56 +00:00
Casper Hornstrup
a4ca6d5949 Always overwrite output file
svn path=/branches/xmlbuildsystem/; revision=14321
2005-03-25 22:40:56 +00:00
Casper Hornstrup
fa082a4797 Build template HAL
svn path=/branches/xmlbuildsystem/; revision=14318
2005-03-25 19:28:55 +00:00
Casper Hornstrup
f94bae987b Add missing files
svn path=/branches/xmlbuildsystem/; revision=14317
2005-03-25 18:48:51 +00:00
Royce Mitchell III
c122f61bfc reorder GenerateRules() to get rid of unnecessary if()
svn path=/branches/xmlbuildsystem/; revision=14315
2005-03-25 17:08:30 +00:00
Casper Hornstrup
b184fdc029 Output rules for objectlibrary files
svn path=/branches/xmlbuildsystem/; revision=14314
2005-03-25 16:32:46 +00:00
Casper Hornstrup
55b0952903 Revert part of previous change
svn path=/branches/xmlbuildsystem/; revision=14312
2005-03-25 14:37:08 +00:00
Casper Hornstrup
3756253ddf Generate object macros before target macros
svn path=/branches/xmlbuildsystem/; revision=14311
2005-03-25 14:31:00 +00:00
Casper Hornstrup
4aa22b18ad Enable rbuild_test again
svn path=/branches/xmlbuildsystem/; revision=14309
2005-03-25 13:02:35 +00:00
Gé van Geldorp
6ae3144d82 Get rid of linker warnings
svn path=/branches/xen/; revision=14304
2005-03-25 08:31:43 +00:00
Gé van Geldorp
f06c6c8ee3 Filip pointed out we can change a compiler option instead of messing around
with the source

svn path=/branches/xen/; revision=14303
2005-03-25 08:26:11 +00:00
Gé van Geldorp
3b8c3498cf Build freeldr as elf executable, initial Xen support
svn path=/branches/xen/; revision=14302
2005-03-24 15:53:13 +00:00
Gé van Geldorp
6d42a99908 Import trunk
svn path=/branches/xen/; revision=14301
2005-03-24 15:41:06 +00:00
Gé van Geldorp
04b09ec080 Start Xen branch
svn path=/branches/xen/; revision=14300
2005-03-24 15:38:38 +00:00
Royce Mitchell III
810c5e38ec forgot this file
svn path=/branches/xmlbuildsystem/; revision=14266
2005-03-22 07:29:02 +00:00
Royce Mitchell III
8102c0deae eliminate rmkdir and generate directory dependencies the right way.
treat ROS_TEMPORARY, ROS_INTERMEDIATE, and ROS_OUTPUT as potential different directories.
major refactor of mingw backend to simplify things, and fix some output bugs, as well as reduce makefile.auto size a bit.
create all macros before we start writing rules ( create all target macros before any other ), this fixes bug with macros being empty because they're used before they're defined

svn path=/branches/xmlbuildsystem/; revision=14265
2005-03-22 07:25:53 +00:00
Casper Hornstrup
297bfe4644 Test module type support
svn path=/branches/xmlbuildsystem/; revision=14241
2005-03-20 21:58:30 +00:00
Royce Mitchell III
ecf13d206b have buildno invocation conform to VERBOSE setting
svn path=/branches/xmlbuildsystem/; revision=14095
2005-03-15 14:02:22 +00:00
Royce Mitchell III
06e37a6a8a I give up, make's "directory target" support has a fatal flaw, converting to "dummy file" system
svn path=/branches/xmlbuildsystem/; revision=14087
2005-03-15 03:51:11 +00:00
Royce Mitchell III
effadc5c83 reformat and simplify before adding functionality
svn path=/branches/xmlbuildsystem/; revision=14076
2005-03-14 21:59:25 +00:00
Royce Mitchell III
defea05242 reorder dependencies to fix $(ECHO_CC) output
svn path=/branches/xmlbuildsystem/; revision=14073
2005-03-14 20:38:32 +00:00
Royce Mitchell III
9195e788b1 reorder dependencies to fix $(ECHO_CC) output
svn path=/branches/xmlbuildsystem/; revision=14072
2005-03-14 20:30:45 +00:00
Royce Mitchell III
22e89b83ae fix dlltool target directory dependencies
add buildno's output to clean:

svn path=/branches/xmlbuildsystem/; revision=14071
2005-03-14 20:06:14 +00:00
Casper Hornstrup
d12b2619f0 Report why a file is marked for rebuild
svn path=/branches/xmlbuildsystem/; revision=14070
2005-03-14 19:42:00 +00:00
Royce Mitchell III
944769bcd5 list directory dependencies last, so that $(ECHO_FOO) prints the right thing. also use $@ where possible to reduce makefile.auto size a bit
svn path=/branches/xmlbuildsystem/; revision=14069
2005-03-14 19:38:13 +00:00
Casper Hornstrup
9b336ed130 Depend on the object file directory, not the object file.
svn path=/branches/xmlbuildsystem/; revision=14068
2005-03-14 19:31:25 +00:00
Royce Mitchell III
e7018c4009 echo [WMC] commands
remove some unnecessary indirect dependencies
have rbuild mkdir commands depend directly on RMKDIR_TARGET
don't have object files depend on themselves!
add rmkdir, rsym, and wmc phony targets

svn path=/branches/xmlbuildsystem/; revision=14067
2005-03-14 19:11:03 +00:00
Casper Hornstrup
346a557406 * Build bin2res and cabman in bootstrap makefiles
* Remove make directory hack as it wasn't needed anyway


svn path=/branches/xmlbuildsystem/; revision=14066
2005-03-14 18:51:29 +00:00
Casper Hornstrup
30c142ef2d Build winebuild by bootstrap makefiles
svn path=/branches/xmlbuildsystem/; revision=14039
2005-03-13 22:33:13 +00:00
Casper Hornstrup
f6646e9181 Add missing file
svn path=/branches/xmlbuildsystem/; revision=14038
2005-03-13 21:59:51 +00:00
Casper Hornstrup
eb194612c3 * Correct dependencies for ROS_INTERMEDIATE <> . in generated makefile
* GNU make don't support depending on a directory, so simulate the dependency using a file


svn path=/branches/xmlbuildsystem/; revision=14034
2005-03-13 21:34:47 +00:00
Casper Hornstrup
e160a25508 * Introduce ROS_OUTPUT
* Correct dependencies for ROS_INTERMEDIATE <> . in bootstrap makefiles
* GNU make don't support depending on a directory, so simulate the dependency using a file


svn path=/branches/xmlbuildsystem/; revision=14032
2005-03-13 21:30:35 +00:00
Casper Hornstrup
7fb6d76a2b -P switch to set root path for files when creating cabinet
svn path=/branches/xmlbuildsystem/; revision=14030
2005-03-13 21:02:04 +00:00
Casper Hornstrup
5c5c83ecb2 Build msacm32.dll
svn path=/branches/xmlbuildsystem/; revision=14029
2005-03-13 20:55:16 +00:00
Casper Hornstrup
4c6320805b Make tests build again
svn path=/branches/xmlbuildsystem/; revision=14003
2005-03-13 10:33:15 +00:00
Royce Mitchell III
9a2cf81bc4 don't end a string if the last character outputted was an escape, will cause output file to be invalid
svn path=/branches/xmlbuildsystem/; revision=13995
2005-03-13 07:37:33 +00:00
Royce Mitchell III
4f130648e1 added validation for <directory>'s name attribute
create dk/nkm/lib if it doesn't exist

svn path=/branches/xmlbuildsystem/; revision=13994
2005-03-13 06:31:38 +00:00
Royce Mitchell III
c181edef3c fix some dependencies
get rid of unnecessary phony targets
eliminate unnecessary makefile.auto dependencies
silence gcc when detecting pch

svn path=/branches/xmlbuildsystem/; revision=13993
2005-03-13 05:32:52 +00:00
Royce Mitchell III
cc39e7793a hack fix 'hostzlib' circular dependency, added a couple more stub makefiles, added 'rbuild' phony target
svn path=/branches/xmlbuildsystem/; revision=13990
2005-03-13 03:16:16 +00:00
Royce Mitchell III
49594687df more *nix compatibility fixes
svn path=/branches/xmlbuildsystem/; revision=13956
2005-03-12 04:55:41 +00:00
Royce Mitchell III
c5097fd3dc set *nix-compatible paths for tools
svn path=/branches/xmlbuildsystem/; revision=13955
2005-03-12 04:39:20 +00:00
Royce Mitchell III
af64b1423c put windows-detection code in makefile, don't make proxy.mak silent
svn path=/branches/xmlbuildsystem/; revision=13952
2005-03-12 04:14:09 +00:00
Royce Mitchell III
b62f2bb179 rename more makefiles, preparation for local makefiles to work with xml build system
svn path=/branches/xmlbuildsystem/; revision=13944
2005-03-12 00:23:38 +00:00
Royce Mitchell III
99ba4dfee6 fix case bug with wpp's makefile
svn path=/branches/xmlbuildsystem/; revision=13940
2005-03-11 23:13:03 +00:00
Royce Mitchell III
87cbce76ad remove obsoleted makefiles and config files, tools/Makefile -> tools/tools.mak, fix bugs in buildno's makefile.
svn path=/branches/xmlbuildsystem/; revision=13938
2005-03-11 23:06:43 +00:00
Royce Mitchell III
b832dffe13 beginning of local stub makefiles, to allow building from subdirectories ( I'm explicitly not allowing a full clean from a subdirectory )
svn path=/branches/xmlbuildsystem/; revision=13931
2005-03-11 14:07:48 +00:00
Royce Mitchell III
022b0bff73 don't assume zlib's include directory will work for hostzlib library
svn path=/branches/xmlbuildsystem/; revision=13925
2005-03-11 07:51:43 +00:00
Royce Mitchell III
96a66ee4c7 host vs target refactoring, <module> has two new attributes 'host' and 'prefix' ( this should fix sedwards' host.zlib.a issue, and also forgot to commit change to buildno's makefile in support of new macros in top-level makefile ( which should fix build bug arty experiencing re buildno.h )
svn path=/branches/xmlbuildsystem/; revision=13924
2005-03-11 07:46:22 +00:00
Royce Mitchell III
4a91158ed5 remove unnessary @true, and create some macros to clean things up
svn path=/branches/xmlbuildsystem/; revision=13923
2005-03-11 07:41:19 +00:00
Royce Mitchell III
107eec449d more efficient detection of C++ modules, fixed bug in C++ pch support, always clean pch files, even if pch not being used
svn path=/branches/xmlbuildsystem/; revision=13917
2005-03-10 20:34:08 +00:00
Royce Mitchell III
af9bc63975 simplified verbosity
svn path=/branches/xmlbuildsystem/; revision=13915
2005-03-10 19:56:46 +00:00
Royce Mitchell III
6e18ca3d45 remove incorrect <pch>
svn path=/branches/xmlbuildsystem/; revision=13914
2005-03-10 17:46:44 +00:00
Royce Mitchell III
bc13f5f38b add <pch> to existing xml files that support pch on trunk
svn path=/branches/xmlbuildsystem/; revision=13913
2005-03-10 16:50:29 +00:00
Royce Mitchell III
838a6c6422 accidentally commited testing changes
svn path=/branches/xmlbuildsystem/; revision=13912
2005-03-10 16:43:31 +00:00
Royce Mitchell III
56532e03e1 Makefile.auto -> makefile.auto
svn path=/branches/xmlbuildsystem/; revision=13911
2005-03-10 16:42:28 +00:00
Royce Mitchell III
75224f16af enable PCH support for ntoskrnl
svn path=/branches/xmlbuildsystem/; revision=13909
2005-03-10 14:06:14 +00:00
Royce Mitchell III
54abe91bd0 PCH support
svn path=/branches/xmlbuildsystem/; revision=13908
2005-03-10 14:05:41 +00:00
Royce Mitchell III
cadb20c83d don't try to create ROS_INTERMEDIATE directories if ROS_INTERMEDIATE isn't defined
svn path=/branches/xmlbuildsystem/; revision=13902
2005-03-09 23:38:37 +00:00
Royce Mitchell III
11b45e8535 simplified <if> handling ( and fixed several bugs, too )
cleaned up devcpp backend to compile with these changes

svn path=/branches/xmlbuildsystem/; revision=13901
2005-03-09 22:29:18 +00:00
Royce Mitchell III
dd650dbfae fixed some dependency issues, verbose support, 'make clean' gets more
svn path=/branches/xmlbuildsystem/; revision=13899
2005-03-09 08:12:30 +00:00
Royce Mitchell III
c2a87f42ad set eolstyle to native
svn path=/branches/xmlbuildsystem/; revision=13898
2005-03-09 08:04:40 +00:00
Royce Mitchell III
ba7ccda6fb adjust newlines around rsym command
svn path=/branches/xmlbuildsystem/; revision=13889
2005-03-08 21:02:50 +00:00
Royce Mitchell III
d37606edee add newline at EOF to suppress warning
svn path=/branches/xmlbuildsystem/; revision=13888
2005-03-08 20:50:42 +00:00
Steven Edwards
dcdeb7b0c0 another fix
svn path=/branches/xmlbuildsystem/; revision=13887
2005-03-08 20:40:35 +00:00
Steven Edwards
d5c61075a9 more lower case changes for Makefile -> makefile
svn path=/branches/xmlbuildsystem/; revision=13885
2005-03-08 20:19:07 +00:00
Steven Edwards
9aff2f9419 lower case please
svn path=/branches/xmlbuildsystem/; revision=13884
2005-03-08 20:12:43 +00:00
Royce Mitchell III
0be0bb57b2 detect PCH support ( not doing anything more than detection yet )
svn path=/branches/xmlbuildsystem/; revision=13878
2005-03-08 17:14:07 +00:00
Casper Hornstrup
79f349c48f Have Makefile.auto depend on xml build files
svn path=/branches/xmlbuildsystem/; revision=13872
2005-03-08 11:15:39 +00:00
Casper Hornstrup
025de74d84 Escape "
svn path=/branches/xmlbuildsystem/; revision=13869
2005-03-07 18:31:10 +00:00
Casper Hornstrup
e9c4096fb7 Use inline message tables
svn path=/branches/xmlbuildsystem/; revision=13862
2005-03-06 22:00:23 +00:00
Casper Hornstrup
57919b0e61 Run rsym on images
svn path=/branches/xmlbuildsystem/; revision=13861
2005-03-06 21:24:06 +00:00
Casper Hornstrup
3ddf79a918 Export symbols in HALs
svn path=/branches/xmlbuildsystem/; revision=13859
2005-03-06 19:49:19 +00:00
Casper Hornstrup
9fbf269e59 Don't generate intermediate archives
svn path=/branches/xmlbuildsystem/; revision=13854
2005-03-06 13:49:10 +00:00
Art Yerkes
8fa490af68 This directory contained both [Mm]akefile, which were identical. Makefile
removed.

svn path=/branches/xmlbuildsystem/; revision=13848
2005-03-06 07:38:54 +00:00
Casper Hornstrup
bb4eed2c43 Put remaining files on the cd
svn path=/branches/xmlbuildsystem/; revision=13840
2005-03-05 23:22:44 +00:00
Casper Hornstrup
e014ae4003 Build HALs
svn path=/branches/xmlbuildsystem/; revision=13838
2005-03-05 22:20:15 +00:00
Casper Hornstrup
1358decfb3 Copy msiexec from trunk
svn path=/branches/xmlbuildsystem/; revision=13837
2005-03-05 22:13:47 +00:00
Casper Hornstrup
1048e15cc5 Delete msiexec
svn path=/branches/xmlbuildsystem/; revision=13836
2005-03-05 22:12:26 +00:00
Casper Hornstrup
efe22d2e07 Merge 13511:13830 from trunk
svn path=/branches/xmlbuildsystem/; revision=13833
2005-03-05 20:50:25 +00:00
Martin Fuchs
7274c581f6 add ibrowser to XML build
svn path=/branches/xmlbuildsystem/; revision=13830
2005-03-05 17:52:12 +00:00
Royce Mitchell III
83cac15e73 per-module clean rules, make cabman more *nix/msys friendly
This fix made it so I was able to successfully build a 22.4MB ReactOS.iso from the xmlbuildsystem branch! ( now to test it... )

svn path=/branches/xmlbuildsystem/; revision=13823
2005-03-05 05:13:38 +00:00
Royce Mitchell III
c4f496eb04 disable warning about missing file ( make handles this situation correctly regardless )
svn path=/branches/xmlbuildsystem/; revision=13820
2005-03-04 19:07:02 +00:00
Royce Mitchell III
d4da224325 let make do some more work for us
svn path=/branches/xmlbuildsystem/; revision=13819
2005-03-04 18:51:17 +00:00
Casper Hornstrup
1ae869295f Copy non-generated files to cd
svn path=/branches/xmlbuildsystem/; revision=13808
2005-03-03 21:26:27 +00:00
Casper Hornstrup
6125e67003 Support for copying non-generated files to cd
svn path=/branches/xmlbuildsystem/; revision=13807
2005-03-03 21:00:30 +00:00
Casper Hornstrup
6af904f645 Copy bootstrap files to cd
svn path=/branches/xmlbuildsystem/; revision=13803
2005-03-02 22:56:41 +00:00
Casper Hornstrup
7f24916383 Add bootstrap tag to specify that files are to be copied to the CD
svn path=/branches/xmlbuildsystem/; revision=13797
2005-03-02 21:24:02 +00:00
Casper Hornstrup
633526eb0b Build cdmake
svn path=/branches/xmlbuildsystem/; revision=13758
2005-02-26 20:17:44 +00:00
Casper Hornstrup
6349cfaf50 Set base address of modules
svn path=/branches/xmlbuildsystem/; revision=13757
2005-02-26 19:29:51 +00:00
Casper Hornstrup
4ef89a29c6 Support for non-standard module base addresses
svn path=/branches/xmlbuildsystem/; revision=13755
2005-02-26 17:11:06 +00:00
Royce Mitchell III
3324a119a4 fix NUL, move macros to the bootstrap makefile as necessary
svn path=/branches/xmlbuildsystem/; revision=13746
2005-02-25 21:21:53 +00:00
Royce Mitchell III
e1134dc2fc silence clean rule
svn path=/branches/xmlbuildsystem/; revision=13744
2005-02-25 20:04:44 +00:00
Royce Mitchell III
0ce702e83f fixed 'make all' and added some missing clean:: rules
svn path=/branches/xmlbuildsystem/; revision=13743
2005-02-25 20:00:27 +00:00
Royce Mitchell III
f650bdd243 generate buildno.h and it's cousins before makefile.auto, so it's sure to exist before processing makefile.auto
svn path=/branches/xmlbuildsystem/; revision=13742
2005-02-25 19:38:11 +00:00
Casper Hornstrup
170bf2d5d5 Merge 13159:13510 from trunk
svn path=/branches/xmlbuildsystem/; revision=13590
2005-02-15 21:24:19 +00:00
Casper Hornstrup
92afa4fc63 Copy msimg32
svn path=/branches/xmlbuildsystem/; revision=13589
2005-02-15 20:55:59 +00:00
Casper Hornstrup
2b09e16837 Remove msimg32
svn path=/branches/xmlbuildsystem/; revision=13588
2005-02-15 20:49:41 +00:00
Casper Hornstrup
69101c3619 Branch setupapi (again)
svn path=/branches/xmlbuildsystem/; revision=13510
2005-02-12 16:47:02 +00:00
Casper Hornstrup
2c0578844f Remove setupapi (again)
svn path=/branches/xmlbuildsystem/; revision=13509
2005-02-12 16:43:03 +00:00
Casper Hornstrup
cdc4cb09c4 Branch setupapi
svn path=/branches/xmlbuildsystem/; revision=13508
2005-02-12 16:11:43 +00:00
Casper Hornstrup
bbb19c02cc Remove setupapi
svn path=/branches/xmlbuildsystem/; revision=13507
2005-02-12 16:08:13 +00:00
Casper Hornstrup
07a8c86438 Add stub GNU makefile
svn path=/branches/xmlbuildsystem/; revision=13506
2005-02-12 15:11:48 +00:00
Casper Hornstrup
760ebcb3e3 * Run build tools after parsing build files
* Generate roscfg.h


svn path=/branches/xmlbuildsystem/; revision=13496
2005-02-11 19:13:01 +00:00
Steven Edwards
63b4ab39e4 define _MAX_PATH as well
svn path=/branches/xmlbuildsystem/; revision=13472
2005-02-08 22:50:55 +00:00
Casper Hornstrup
d441fe88f2 Generate reactos.cab
svn path=/branches/xmlbuildsystem/; revision=13470
2005-02-08 22:21:16 +00:00
Martin Fuchs
ddef57fcd4 owner drawn context menus for lean explorer version
svn path=/branches/lean-explorer/; revision=13440
2005-02-06 14:03:25 +00:00
Casper Hornstrup
0dd134f1a2 Build snmpapi and network applications
svn path=/branches/xmlbuildsystem/; revision=13435
2005-02-06 11:01:22 +00:00
Casper Hornstrup
11d1cdd366 Build services
svn path=/branches/xmlbuildsystem/; revision=13432
2005-02-06 10:23:29 +00:00
Casper Hornstrup
8c410194a0 Build smss and system applications
svn path=/branches/xmlbuildsystem/; revision=13428
2005-02-05 22:48:07 +00:00
Casper Hornstrup
75df7c5bca * Build ntvdm
* Add win32cui module type support


svn path=/branches/xmlbuildsystem/; revision=13426
2005-02-05 19:16:14 +00:00
Casper Hornstrup
56ff0d9653 * Build csrss and win32csr
* NativeCUI module type support


svn path=/branches/xmlbuildsystem/; revision=13424
2005-02-05 18:52:38 +00:00
Casper Hornstrup
900f042f61 Build twain_32, ws2help, opengl32, syssetup, urlmon, shdocvw, wininet, userenv, wsock32, and wshirda
svn path=/branches/xmlbuildsystem/; revision=13407
2005-02-04 20:46:46 +00:00
Royce Mitchell III
2212e07d3e compatibility fixes
svn path=/branches/xmlbuildsystem/; revision=13401
2005-02-03 23:54:02 +00:00
Casper Hornstrup
cb6d12288b * Build midimap, netapi32, lz32, setupapi, mpr, olepro32, msimg32, secur32
* Build msafd, riched32, msgina, mmdrv, samlib, msvcrt20, mesa32


svn path=/branches/xmlbuildsystem/; revision=13399
2005-02-03 21:55:43 +00:00
Casper Hornstrup
d7abcec443 Build keyboard layout DLLs
svn path=/branches/xmlbuildsystem/; revision=13395
2005-02-03 19:14:46 +00:00
Art Yerkes
75acfdfa72 Add a . to an empty path to make a relative path, before the initial /
is added.

svn path=/branches/xmlbuildsystem/; revision=13393
2005-02-03 15:43:51 +00:00
Casper Hornstrup
9dd8914484 * Parse .cpp, .rc, and .s files
* #include_next support


svn path=/branches/xmlbuildsystem/; revision=13390
2005-02-02 22:30:55 +00:00
Steven Edwards
54687f3ee6 MAX_PATH is PATH_MAX on Posix
svn path=/branches/xmlbuildsystem/; revision=13388
2005-02-02 20:10:14 +00:00
Casper Hornstrup
5987025ab4 Use automatic dependencies to mark files to be rebuilt.
svn path=/branches/xmlbuildsystem/; revision=13385
2005-02-01 20:49:03 +00:00
Casper Hornstrup
6052ab4bd7 Generate automatic dependencies.
svn path=/branches/xmlbuildsystem/; revision=13371
2005-01-31 18:25:55 +00:00
Casper Hornstrup
adeb8563b5 Started on automatic dependencies support
svn path=/branches/xmlbuildsystem/; revision=13353
2005-01-28 19:11:22 +00:00
Steven Edwards
2c0281bda7 define stricmp to strcasecmp for the Unix build
svn path=/branches/xmlbuildsystem/; revision=13320
2005-01-26 20:23:50 +00:00
Casper Hornstrup
610b936ad0 Add missing file
svn path=/branches/xmlbuildsystem/; revision=13250
2005-01-24 18:47:52 +00:00
Casper Hornstrup
04f77b12fe Add documentation
svn path=/branches/xmlbuildsystem/; revision=13225
2005-01-23 12:47:42 +00:00
Casper Hornstrup
3ccd7d62e9 * Build epsapi, dxguid, devenum, imm32, dinput8, dsound, expat, glu32, vfatlib
* Build dbghelp, gdiplus, dxdiagn, imagehlp, strmiids, dinput, fmifs, psapi 


svn path=/branches/xmlbuildsystem/; revision=13222
2005-01-23 01:33:35 +00:00
Casper Hornstrup
ab4b7a72aa * Build crtdll
* Add module attribute "mangledsymbols" to control --kill-at option for dlltool in order to allow preservation of mangled symbols


svn path=/branches/xmlbuildsystem/; revision=13221
2005-01-22 22:00:17 +00:00
Casper Hornstrup
421cfcb760 Add missing file
svn path=/branches/xmlbuildsystem/; revision=13218
2005-01-22 18:08:28 +00:00
Casper Hornstrup
28243f499d Build control panel applets
svn path=/branches/xmlbuildsystem/; revision=13217
2005-01-22 18:06:37 +00:00
Casper Hornstrup
d0acee6af8 * Invoke cabman when building a CD
* Entrypoint attribute on <module> to override default entrypoint
* Use entrypoint _DrvEnableDriver@12 for display drivers


svn path=/branches/xmlbuildsystem/; revision=13216
2005-01-22 17:38:31 +00:00
Casper Hornstrup
ac58a35d34 * Build cabman and zlib
* Add iso module type


svn path=/branches/xmlbuildsystem/; revision=13214
2005-01-22 15:27:06 +00:00
Royce Mitchell III
cd93112435 This fixes the small problem that generated files were being added to the Dev-C++ project even though they didn't yet exist. - patch by Trevor McCort
svn path=/branches/xmlbuildsystem/; revision=13213
2005-01-22 15:09:36 +00:00
Casper Hornstrup
87f69aaf32 * Build freeldr
* Add BootLoader and ObjectLibrary module types
* Add <compilerflag> tag


svn path=/branches/xmlbuildsystem/; revision=13211
2005-01-22 14:07:45 +00:00
Casper Hornstrup
7b13462f5a Build comdlg32, oleaut32, wine_unicode, winspool, shell32, and shlwapi
svn path=/branches/xmlbuildsystem/; revision=13193
2005-01-21 21:06:40 +00:00
Royce Mitchell III
23a949dd32 attribute 'first' of <file> must be 'true' or 'false'
remove an obsolete comment

svn path=/branches/xmlbuildsystem/; revision=13191
2005-01-21 18:15:10 +00:00
Casper Hornstrup
f7201d8993 Build cabinet, advpack, rpcrt4, ole32, version, cards, and uuid
svn path=/branches/xmlbuildsystem/; revision=13190
2005-01-21 18:09:02 +00:00
Casper Hornstrup
5ce17b05d1 Modules are built in the intermediate directory.
svn path=/branches/xmlbuildsystem/; revision=13171
2005-01-20 23:05:36 +00:00
Casper Hornstrup
45e6d4dd39 Fix copy/paste error.
svn path=/branches/xmlbuildsystem/; revision=13169
2005-01-20 22:24:30 +00:00
Casper Hornstrup
49d3351175 * Build bin2res, winmm, comctl32, aclui, acledit
* Correct dependencies for build tool invocations
* Normalize paths in the generated makefile


svn path=/branches/xmlbuildsystem/; revision=13168
2005-01-20 22:19:01 +00:00
Royce Mitchell III
a04e56cbf4 beginnings of dev-c++ backend - patch by Trevor McCort
svn path=/branches/xmlbuildsystem/; revision=13155
2005-01-20 06:42:22 +00:00
Royce Mitchell III
03c9d860ba require attributes to have values
svn path=/branches/xmlbuildsystem/; revision=13154
2005-01-20 06:36:37 +00:00
Steven Edwards
dc266b8b95 hard code mingw32-* for cross-compile, this is bad.
svn path=/branches/xmlbuildsystem/; revision=13153
2005-01-20 06:29:08 +00:00
Royce Mitchell III
0b93b06fee mark off area where variables need to differ for *nix
svn path=/branches/xmlbuildsystem/; revision=13152
2005-01-20 06:09:07 +00:00
Casper Hornstrup
4b9c656dd5 * Build freetype, win32k, and video drivers
* Generate module.spec.def, not module.def


svn path=/branches/xmlbuildsystem/; revision=13135
2005-01-19 19:49:57 +00:00
Royce Mitchell III
6a6a71b2f1 added 'first' attribute to <file>
svn path=/branches/xmlbuildsystem/; revision=13129
2005-01-19 01:37:35 +00:00
Royce Mitchell III
6f056ee7ce msvc6 compatibility
svn path=/branches/xmlbuildsystem/; revision=13124
2005-01-18 17:00:47 +00:00
Casper Hornstrup
9b92b2cc9a Build storage drivers
svn path=/branches/xmlbuildsystem/; revision=13103
2005-01-17 21:40:12 +00:00
Art Yerkes
dc88ce8729 More commits of the same. SVN is being a bit picky about resolved
conflicts.

svn path=/branches/xmlbuildsystem/; revision=13099
2005-01-17 16:27:28 +00:00
Art Yerkes
076c15efdb - Add a NUL definition, as well as rmkdir
- Create directory targets for intermediate files area
- .def files are in the source tree in our current scheme

svn path=/branches/xmlbuildsystem/; revision=13098
2005-01-17 16:26:11 +00:00
Casper Hornstrup
b71ea907b8 * Build networking components
* WINE DLL support


svn path=/branches/xmlbuildsystem/; revision=13086
2005-01-16 22:26:26 +00:00
Casper Hornstrup
b854348f4e Build input device drivers
svn path=/branches/xmlbuildsystem/; revision=13085
2005-01-16 18:39:32 +00:00
Casper Hornstrup
c5557e2907 Clean intermediate files.
svn path=/branches/xmlbuildsystem/; revision=13084
2005-01-16 18:30:40 +00:00
Casper Hornstrup
e7a44a6878 Build filesystems
svn path=/branches/xmlbuildsystem/; revision=13083
2005-01-16 18:14:04 +00:00
Casper Hornstrup
cca9835bf1 Build device drivers
svn path=/branches/xmlbuildsystem/; revision=13082
2005-01-16 17:24:37 +00:00
Casper Hornstrup
14af027c76 Build bus drivers
svn path=/branches/xmlbuildsystem/; revision=13081
2005-01-16 16:45:53 +00:00
Casper Hornstrup
772c512c90 Export functions in .def files
svn path=/branches/xmlbuildsystem/; revision=13080
2005-01-16 16:18:52 +00:00
Casper Hornstrup
fd7f52294b Don't include full path for --dllname
svn path=/branches/xmlbuildsystem/; revision=13079
2005-01-16 14:23:35 +00:00
Casper Hornstrup
40a6da67c4 * KernelModeDriver module support
* Build afd.sys


svn path=/branches/xmlbuildsystem/; revision=13078
2005-01-16 13:51:33 +00:00
Casper Hornstrup
41c7d92f46 Add resources to existing modules.
svn path=/branches/xmlbuildsystem/; revision=13077
2005-01-16 11:52:30 +00:00
Art Yerkes
9f8bfdb6c1 Added xml for ip libs.
svn path=/branches/xmlbuildsystem/; revision=13075
2005-01-16 11:02:12 +00:00
Art Yerkes
1231f84084 Corrected filename trap.S -> trap.s
svn path=/branches/xmlbuildsystem/; revision=13072
2005-01-16 09:24:00 +00:00
Royce Mitchell III
c5e94f140e msys compatibility fix
svn path=/branches/xmlbuildsystem/; revision=13071
2005-01-15 23:15:04 +00:00
Royce Mitchell III
2735c4ca05 remove unnecessary call to c_str()
svn path=/branches/xmlbuildsystem/; revision=13070
2005-01-15 23:14:53 +00:00
Casper Hornstrup
8df8ba2e6a Refactor GenerateGlobalCFlagsAndProperties
svn path=/branches/xmlbuildsystem/; revision=13069
2005-01-15 23:00:02 +00:00
Casper Hornstrup
d451f1d1f2 Windres support.
svn path=/branches/xmlbuildsystem/; revision=13068
2005-01-15 22:32:01 +00:00
Casper Hornstrup
c5b25f41e4 * Use objects rather than archive when linking ntoskrnl
* Remove unused file except.s
* Remove duplicate strtok() in ntoskrnl


svn path=/branches/xmlbuildsystem/; revision=13062
2005-01-15 19:00:35 +00:00
Casper Hornstrup
f429c942db If test
svn path=/branches/xmlbuildsystem/; revision=13061
2005-01-15 17:59:06 +00:00
Casper Hornstrup
d3a30bf22d * LinkerFlag tag support
* Build addsys, libwine.a, user32.dll, advapi32.dll, gdi32.dll, msvcrt.dll, and welcome.exe


svn path=/branches/xmlbuildsystem/; revision=13055
2005-01-15 13:52:36 +00:00
Royce Mitchell III
65f058c4f0 *nix compatibility
svn path=/branches/xmlbuildsystem/; revision=13049
2005-01-14 21:40:55 +00:00
Steven Edwards
0cefd55620 get the new buildsystem to mostly work for cross-compiling. Thanks Casper, Royce, etc.
svn path=/branches/xmlbuildsystem/; revision=13048
2005-01-14 21:14:48 +00:00
Steven Edwards
ffdcbc9c60 started working on cross-compile support
svn path=/branches/xmlbuildsystem/; revision=13046
2005-01-14 20:41:45 +00:00
Filip Navara
f3367f398b We're not supposed to build elf.c, it's template file.
svn path=/branches/xmlbuildsystem/; revision=13041
2005-01-14 14:11:13 +00:00
Royce Mitchell III
30921fb72c better config.template.xml
svn path=/branches/xmlbuildsystem/; revision=13040
2005-01-14 14:10:41 +00:00
Royce Mitchell III
e35d70d940 add csq library to ntoskrnl
svn path=/branches/xmlbuildsystem/; revision=13039
2005-01-14 13:29:27 +00:00
Royce Mitchell III
dbc5b96c09 use ntoskrnl's def file when running dlltool, otherwise not all of ntoskrnl's exports make it into final executable.
svn path=/branches/xmlbuildsystem/; revision=13038
2005-01-14 06:51:37 +00:00
Royce Mitchell III
46db98e48d kill the output exe files in a clean, too
svn path=/branches/xmlbuildsystem/; revision=13020
2005-01-13 05:10:33 +00:00
Royce Mitchell III
b657e0b0bf generate clean rules
svn path=/branches/xmlbuildsystem/; revision=13019
2005-01-13 05:01:22 +00:00
Royce Mitchell III
90d59a4287 create phony targets for each module name, so you can type 'make ntoskrnl' instead of having to type 'make ./ntoskrnl/ntoskrnl.exe'
svn path=/branches/xmlbuildsystem/; revision=13018
2005-01-13 04:17:53 +00:00
Royce Mitchell III
babc7c7c8a generate output rules for files under <if>
svn path=/branches/xmlbuildsystem/; revision=13017
2005-01-13 04:13:20 +00:00
Royce Mitchell III
84c57ede37 bugfixes to new <if> and related code
svn path=/branches/xmlbuildsystem/; revision=13016
2005-01-13 03:43:10 +00:00
Royce Mitchell III
c869f797fb add support for <if> and <property>
svn path=/branches/xmlbuildsystem/; revision=13015
2005-01-13 02:46:46 +00:00
Royce Mitchell III
31f4493219 fix variable cases
svn path=/branches/xmlbuildsystem/; revision=13012
2005-01-13 02:26:05 +00:00
Casper Hornstrup
37ff0b66b5 * Keep project level includes and defines in PROJECT_CFLAGS
* Win32dll module type support
* Build kernel32.dll


svn path=/branches/xmlbuildsystem/; revision=12985
2005-01-12 19:42:07 +00:00
Royce Mitchell III
a868feb94a forgot to recurse If elements when generating macros
svn path=/branches/xmlbuildsystem/; revision=12966
2005-01-12 14:07:55 +00:00
Royce Mitchell III
9264ed7582 support for <if> tag
.PHONY must be output before the target gets defined


svn path=/branches/xmlbuildsystem/; revision=12944
2005-01-12 06:02:58 +00:00
Royce Mitchell III
4846c7b4a2 bugfix - patch by filip navara
svn path=/branches/xmlbuildsystem/; revision=12943
2005-01-12 05:01:49 +00:00
Casper Hornstrup
6858112b10 Build ntdll.dll.
svn path=/branches/xmlbuildsystem/; revision=12926
2005-01-11 20:02:58 +00:00
Royce Mitchell III
444e4297dd create a couple more variables to reduce makefile size
preparations for <if> support

svn path=/branches/xmlbuildsystem/; revision=12925
2005-01-11 18:20:30 +00:00
Royce Mitchell III
72a0e1e6b7 make sure parentElement is set properly for <xi:include> elements
svn path=/branches/xmlbuildsystem/; revision=12918
2005-01-10 14:03:21 +00:00
Casper Hornstrup
b663342f01 * Nasm support
* Hal, rosrtl, pseh, string modules
* Build ntoskrnl


svn path=/branches/xmlbuildsystem/; revision=12913
2005-01-09 21:26:16 +00:00
Royce Mitchell III
e5130a546a added xi:fallback support
fixed some memory leaks in Project
detect and report "end of file looking for end tag" instead of just crashing

svn path=/branches/xmlbuildsystem/; revision=12911
2005-01-09 19:16:35 +00:00
Casper Hornstrup
51221a2b14 Fix compilation.
svn path=/branches/xmlbuildsystem/; revision=12910
2005-01-09 17:24:09 +00:00
Casper Hornstrup
f361174e9b GCC assembler support.
svn path=/branches/xmlbuildsystem/; revision=12908
2005-01-09 16:36:57 +00:00
Royce Mitchell III
d16f78506a use enum instead of string in more places
svn path=/branches/xmlbuildsystem/; revision=12902
2005-01-09 03:43:26 +00:00
Royce Mitchell III
03e6c98e63 add 'location' information to a couple exceptions that should have it
fixed bug I introduced in MingwBackend::ProcessModule()
fixed bug in std::map usage, apparently map<const char*,...> is a bad idea
let make do some work, create variables to hold include list for each module

svn path=/branches/xmlbuildsystem/; revision=12901
2005-01-09 03:29:46 +00:00
Royce Mitchell III
10324ce772 replaced Backend Factory's vector with a map.
added a map of the MingwModuleHandlers that's created at startup time

svn path=/branches/xmlbuildsystem/; revision=12900
2005-01-09 01:58:53 +00:00
Casper Hornstrup
0f4b9848d1 Put global includes last.
svn path=/branches/xmlbuildsystem/; revision=12899
2005-01-09 01:25:16 +00:00
Casper Hornstrup
8fc0497edb Fix compile error
svn path=/branches/xmlbuildsystem/; revision=12898
2005-01-09 01:13:31 +00:00
Casper Hornstrup
2ddad45463 Precondition dependencies.
svn path=/branches/xmlbuildsystem/; revision=12897
2005-01-09 01:10:43 +00:00
Casper Hornstrup
87d6ec37a6 Invocation of buildtool modules.
svn path=/branches/xmlbuildsystem/; revision=12891
2005-01-08 19:38:51 +00:00
Casper Hornstrup
30e8e25cb7 BuildTool module type support.
svn path=/branches/xmlbuildsystem/; revision=12887
2005-01-08 12:54:43 +00:00
Royce Mitchell III
3e6eb979d8 use ROS_TEMPORARY and ROS_INTERMEDIATE to allow builder to override locations for created files. Fix name conflict with temporary files
svn path=/branches/xmlbuildsystem/; revision=12882
2005-01-08 06:36:03 +00:00
Royce Mitchell III
2f837bf69e don't allow duplicate module names
svn path=/branches/xmlbuildsystem/; revision=12881
2005-01-08 05:22:02 +00:00
Royce Mitchell III
aead7a68f9 <include> now has attribute 'base' which allows to specify subdirectory of another module
svn path=/branches/xmlbuildsystem/; revision=12880
2005-01-08 04:33:01 +00:00
Royce Mitchell III
774f167e5e xml nodes now store the location they were parsed from; invalidbuildexceptions now required a location of the error; don't allow modules to process xml until all modules are created; don't allow libraries, defines, includes, etc to process xml until all modules have processed; don't allow module to link against itself or a non-existant module; don't allow library to specify non-existant module;
svn path=/branches/xmlbuildsystem/; revision=12879
2005-01-08 03:37:32 +00:00
Royce Mitchell III
de7c566b05 Don't pass objects ( particularly vectors ) by value unless absolutely necessary. Also applied some const-correctness
svn path=/branches/xmlbuildsystem/; revision=12878
2005-01-08 02:33:09 +00:00
Casper Hornstrup
5f69cb429e Static library module type.
svn path=/branches/xmlbuildsystem/; revision=12877
2005-01-08 00:25:48 +00:00
Casper Hornstrup
49a2dd8017 Include and define support.
svn path=/branches/xmlbuildsystem/; revision=12876
2005-01-07 21:46:18 +00:00
Martin Fuchs
679e6f6c09 fix case of XML.o
svn path=/branches/xmlbuildsystem/; revision=12870
2005-01-07 15:36:40 +00:00
Royce Mitchell III
4e235dbcc9 parse, but ignore, <? ?> tags - eliminated duplicate code ala FixSeparator() - fix path separator issues
svn path=/branches/xmlbuildsystem/; revision=12868
2005-01-07 13:48:53 +00:00
Casper Hornstrup
f7257ee1be * Generate kernel
* Add static library module type
* Add build script for kjs


svn path=/branches/xmlbuildsystem/; revision=12856
2005-01-06 22:22:13 +00:00
Casper Hornstrup
b1ec82cd59 Generate dependencies for kernel module type.
svn path=/branches/xmlbuildsystem/; revision=12855
2005-01-06 20:38:14 +00:00
Martin Fuchs
505695d368 migrate substitution keywords to SVN
svn path=/branches/xmlbuildsystem/; revision=12851
2005-01-06 13:34:15 +00:00
Royce Mitchell III
8e5e9a4925 fix gcc warning
svn path=/branches/xmlbuildsystem/; revision=12848
2005-01-06 03:52:12 +00:00
Royce Mitchell III
199fca493d forgot to remove and unneeded #include
svn path=/branches/xmlbuildsystem/; revision=12847
2005-01-06 03:49:38 +00:00
Royce Mitchell III
1900ede13b much better factory implementation - thanks art yerkes
svn path=/branches/xmlbuildsystem/; revision=12846
2005-01-06 03:27:24 +00:00
Royce Mitchell III
477157b4d4 Factories for Backend creation
svn path=/branches/xmlbuildsystem/; revision=12845
2005-01-06 02:55:11 +00:00
Royce Mitchell III
8051633a4c file & line # reporting on xml syntax errors
svn path=/branches/xmlbuildsystem/; revision=12844
2005-01-06 02:06:44 +00:00
Royce Mitchell III
c6916243d1 fixed some warnings, and added some asserts
svn path=/branches/xmlbuildsystem/; revision=12843
2005-01-06 01:35:01 +00:00
Casper Hornstrup
7d876c4d0c Parse libraries.
svn path=/branches/xmlbuildsystem/; revision=12840
2005-01-05 22:36:17 +00:00
Casper Hornstrup
91d97cbc91 Parse module type.
svn path=/branches/xmlbuildsystem/; revision=12839
2005-01-05 21:29:54 +00:00
Casper Hornstrup
1568981925 Generate MinGW makefile in the backend.
svn path=/branches/xmlbuildsystem/; revision=12837
2005-01-05 20:59:10 +00:00
Casper Hornstrup
222bde955c Handle modules.
svn path=/branches/xmlbuildsystem/; revision=12836
2005-01-05 19:47:10 +00:00
Royce Mitchell III
b9bffbca54 beginnings of makefile output
svn path=/branches/xmlbuildsystem/; revision=12826
2005-01-05 19:02:00 +00:00
Royce Mitchell III
00a8526f83 allow for other build systems
svn path=/branches/xmlbuildsystem/; revision=12824
2005-01-05 18:48:45 +00:00
Royce Mitchell III
f2f4ddff19 specify output filename
svn path=/branches/xmlbuildsystem/; revision=12823
2005-01-05 18:16:55 +00:00
Royce Mitchell III
f97516bc1c assume HOST is set to mingw32-windows until someone who knows how can have make fail when HOST isn't set
svn path=/branches/xmlbuildsystem/; revision=12822
2005-01-05 18:13:56 +00:00
Royce Mitchell III
5793157884 small XMLFile cleanup
svn path=/branches/xmlbuildsystem/; revision=12821
2005-01-05 17:59:08 +00:00
Royce Mitchell III
039d7779de pch.h can be used as pre-compiled header
svn path=/branches/xmlbuildsystem/; revision=12818
2005-01-05 05:09:38 +00:00
Royce Mitchell III
4ee64fd1b7 handle comments while parsing, instead of returning them to the user
svn path=/branches/xmlbuildsystem/; revision=12816
2005-01-05 03:47:55 +00:00
Royce Mitchell III
0b755662dd don't define macros that conflict with MinGW system header files, causes very cryptic error messages
svn path=/branches/xmlbuildsystem/; revision=12815
2005-01-05 02:57:58 +00:00
Casper Hornstrup
4e36b04d0d MinGW backend.
svn path=/branches/xmlbuildsystem/; revision=12805
2005-01-04 22:40:08 +00:00
Casper Hornstrup
6f22300491 Add project and module tests.
svn path=/branches/xmlbuildsystem/; revision=12801
2005-01-04 21:29:09 +00:00
Casper Hornstrup
8b3d554adb Exception handling.
svn path=/branches/xmlbuildsystem/; revision=12797
2005-01-04 20:37:48 +00:00
Royce Mitchell III
6332037cc9 fix gcc incompatibilities
svn path=/branches/xmlbuildsystem/; revision=12795
2005-01-04 19:06:48 +00:00
Royce Mitchell III
9d52adaf02 ssprintf() family of functions for std::string + printf functionality
svn path=/branches/xmlbuildsystem/; revision=12794
2005-01-04 18:38:31 +00:00
Casper Hornstrup
47c197a607 Move project to its own file.
svn path=/branches/xmlbuildsystem/; revision=12793
2005-01-04 18:24:21 +00:00
Royce Mitchell III
ac754b1f06 break XML-parsing stuff into it's own files, and fix 'make test'
svn path=/branches/xmlbuildsystem/; revision=12792
2005-01-04 17:53:26 +00:00
Casper Hornstrup
650cbe59a3 Kill warnings.
svn path=/branches/xmlbuildsystem/; revision=12791
2005-01-04 17:19:43 +00:00
Royce Mitchell III
ee24430c57 parse a module's files into a vector ( conditions are still a TODO )
svn path=/branches/xmlbuildsystem/; revision=12789
2005-01-04 14:46:06 +00:00
Royce Mitchell III
b6ce86818c handle xml comments and added handling for some possible error conditions
svn path=/branches/xmlbuildsystem/; revision=12788
2005-01-04 14:27:27 +00:00
Royce Mitchell III
eced4673d4 each XMLElement now stores a pointer to it's parent node, so the tree can be traversed from the bottom
svn path=/branches/xmlbuildsystem/; revision=12787
2005-01-04 14:02:04 +00:00
Royce Mitchell III
0e49eb5441 create virtual attribute "top_href" for <xi:include> that is a path relative to top level of project to make it easier to generate non-recursive makefiles
svn path=/branches/xmlbuildsystem/; revision=12786
2005-01-04 13:40:05 +00:00
Royce Mitchell III
83a90b1ff8 use ntoskrnl/module.xml
svn path=/branches/xmlbuildsystem/; revision=12784
2005-01-04 07:05:31 +00:00
Royce Mitchell III
767c4f1f9e xml file for ntoskrnl module
svn path=/branches/xmlbuildsystem/; revision=12783
2005-01-04 07:05:04 +00:00
Royce Mitchell III
7b85a3019d support for <xi:include href="foo/foo.xml">, including the "relative path-mucking" necessary
svn path=/branches/xmlbuildsystem/; revision=12782
2005-01-04 07:03:59 +00:00
Royce Mitchell III
4b6d28c5a2 proper destruction for Project objects
svn path=/branches/xmlbuildsystem/; revision=12778
2005-01-04 04:09:04 +00:00
Royce Mitchell III
0b41f2cc93 initial code to step through tree looking for modules, and calculating their relative paths, for now just print out our findings and clean up.
svn path=/branches/xmlbuildsystem/; revision=12777
2005-01-04 04:04:32 +00:00
Royce Mitchell III
24bc72075e don't pass vector<pointer> by value unless you are looking for trouble, also fixed Assert() to take stdargs to make it's usage simpler and less error-prone. Also fixed IsTrue(), etc, to take file and line info by args and created macros to pass that info automatically.
svn path=/branches/xmlbuildsystem/; revision=12775
2005-01-04 03:10:07 +00:00
Royce Mitchell III
ac0d1d2023 get rid of transitory junk
svn path=/branches/xmlbuildsystem/; revision=12770
2005-01-03 23:24:12 +00:00
Royce Mitchell III
7db6de29fc 1) vector<BaseClass> = bad juju, must use vector<BaseClass*>
2) BaseClass must have virtual dtor
3) make Run() pure virtual

svn path=/branches/xmlbuildsystem/; revision=12769
2005-01-03 23:21:25 +00:00
Casper Hornstrup
0f703e6c9b Add small testing framework.
svn path=/branches/xmlbuildsystem/; revision=12767
2005-01-03 23:04:52 +00:00
Casper Hornstrup
5b5cae1d8f Add makefile for rbuild.
svn path=/branches/xmlbuildsystem/; revision=12762
2005-01-03 20:43:23 +00:00
Royce Mitchell III
af0029cf63 moved rbuild.cpp per Casper's request
svn path=/branches/xmlbuildsystem/; revision=12759
2005-01-03 19:29:19 +00:00
Royce Mitchell III
1698e638a2 XML parsing working with my local sample build script. Now we need to start coding the makefile-generation
svn path=/branches/xmlbuildsystem/; revision=12743
2005-01-03 01:02:26 +00:00
Casper Hornstrup
4aa419fcb5 Add sample build script.
svn path=/branches/xmlbuildsystem/; revision=12739
2005-01-02 22:17:02 +00:00
Martin Fuchs
49f4d8010f Handle "." and ".." as special direcory names and move them at the very first beginning of directory listings
svn path=/branches/lean-explorer/; revision=10889
2004-09-17 16:56:47 +00:00
Martin Fuchs
62f920f0c7 display lean explorer version in about dialog
svn path=/branches/lean-explorer/; revision=10573
2004-08-16 19:12:31 +00:00
Martin Fuchs
6f15da7d91 fix clean target for new standard makefiles
svn path=/branches/lean-explorer/; revision=10399
2004-08-04 21:42:33 +00:00
Martin Fuchs
a3a634bd46 fix clean target for new standard makefiles
svn path=/branches/lean-explorer/; revision=10398
2004-08-04 21:42:33 +00:00
Steven Edwards
6c3634add7 Fix building the lean explorer
svn path=/branches/lean-explorer/; revision=10391
2004-08-04 14:21:52 +00:00
Martin Fuchs
cdf16e21fe get version number to display from RES_STR_PRODUCT_VERSION
svn path=/branches/lean-explorer/; revision=10373
2004-08-03 19:43:45 +00:00
Martin Fuchs
91aa9f2a2a get version number to display from RES_STR_PRODUCT_VERSION
svn path=/branches/lean-explorer/; revision=10372
2004-08-03 19:43:45 +00:00
Martin Fuchs
3010e741cd get version number to display from RES_STR_PRODUCT_VERSION
svn path=/branches/lean-explorer/; revision=10371
2004-08-03 19:43:45 +00:00
Martin Fuchs
b4b7900286 implement IServiceprovider interface
svn path=/branches/lean-explorer/; revision=10335
2004-08-01 09:26:27 +00:00
Martin Fuchs
94b18145e8 implement IServiceprovider interface
svn path=/branches/lean-explorer/; revision=10334
2004-08-01 09:26:27 +00:00
Martin Fuchs
3419d837b4 use same startmenu entries height as MS explorer
svn path=/branches/lean-explorer/; revision=10323
2004-07-31 08:53:19 +00:00
Martin Fuchs
aaaf91d697 precompiled header support for the lean version of explorer
svn path=/branches/lean-explorer/; revision=10293
2004-07-26 18:41:36 +00:00
Martin Fuchs
ef27e16221 eliminate useless GCC warning
svn path=/branches/lean-explorer/; revision=10282
2004-07-24 20:15:47 +00:00
Martin Fuchs
a5b6fb6224 recalculate start menu root position for any call
svn path=/branches/lean-explorer/; revision=10280
2004-07-24 20:09:31 +00:00
The ReactOS Team
953956d508 This commit was manufactured by cvs2svn to create branch
'lean-explorer'.

svn path=/branches/lean-explorer/; revision=10195
2004-07-18 13:03:06 +00:00
Martin Fuchs
64e7f90242 fix root path for folders opened from the desktop
svn path=/branches/lean-explorer/; revision=10136
2004-07-15 21:19:05 +00:00
Martin Fuchs
bb344f6544 ignore unexpected exceptions while extracting icons
svn path=/branches/lean-explorer/; revision=10134
2004-07-15 21:04:20 +00:00
Martin Fuchs
e92def1b07 scroll mode for very long start menus in lean explorer branch
svn path=/branches/lean-explorer/; revision=10131
2004-07-15 20:20:39 +00:00
The ReactOS Team
9dd56c39d7 This commit was manufactured by cvs2svn to create branch
'lean-explorer'.

svn path=/branches/lean-explorer/; revision=10130
2004-07-15 20:20:39 +00:00
Martin Fuchs
89c345f0f6 remove useless comment
svn path=/branches/lean-explorer/; revision=9772
2004-06-20 19:28:54 +00:00
Martin Fuchs
d80f04c021 adjustments for GCC 3.4
svn path=/branches/lean-explorer/; revision=9710
2004-06-18 17:05:44 +00:00
Martin Fuchs
6936b33b44 fix Entry::read_tree() and get_next_path_component()
svn path=/branches/lean-explorer/; revision=9104
2004-04-12 15:55:36 +00:00
Steven Edwards
61f0b4504d I hope I didnt mess up committing this to the lean-branch.....
Add Windows Explorer menus (File, Edit, View, Tools - Disabled atm)
Merge "explorer -install" support to lean-explorer.
Merge some of the traynotify cleanups.

svn path=/branches/lean-explorer/; revision=9049
2004-04-09 19:02:59 +00:00
Steven Edwards
ea30a0dc0f Testing something
svn path=/branches/lean-explorer/; revision=9048
2004-04-09 18:55:23 +00:00
Martin Fuchs
e7cd739664 option "display version on desktop background"
svn path=/branches/lean-explorer/; revision=8909
2004-03-28 20:32:23 +00:00
Martin Fuchs
283e814418 option "display version on desktop background"
svn path=/branches/lean-explorer/; revision=8908
2004-03-28 20:32:23 +00:00
Martin Fuchs
b7d05c55c1 lean version comments
svn path=/branches/lean-explorer/; revision=8812
2004-03-20 13:55:58 +00:00
Martin Fuchs
54fff5eacf UNICODE fix for Tooltips
svn path=/branches/lean-explorer/; revision=8740
2004-03-14 22:27:44 +00:00
Martin Fuchs
aa1994fbc7 resize taskbar buttons on WM_SIZE
svn path=/branches/lean-explorer/; revision=8730
2004-03-14 18:51:36 +00:00
Martin Fuchs
655eff3fef move create_absolute_pidl() member function implementation from Enry into WinEntry
svn path=/branches/lean-explorer/; revision=8707
2004-03-14 12:11:19 +00:00
Martin Fuchs
821980ba92 french translation for some start menu entries from Gge
svn path=/branches/lean-explorer/; revision=8692
2004-03-13 20:05:33 +00:00
Martin Fuchs
02818cac57 small 'Explorer' string adjustment for french
svn path=/branches/lean-explorer/; revision=8671
2004-03-12 21:20:03 +00:00
Martin Fuchs
2906835b92 adjust start button to text size
svn path=/branches/lean-explorer/; revision=8669
2004-03-12 21:12:28 +00:00
Martin Fuchs
a16e73576f adjust start button to text size
svn path=/branches/lean-explorer/; revision=8668
2004-03-12 21:12:28 +00:00
Martin Fuchs
982fa99488 add opened files to the "recent documents" list
svn path=/branches/lean-explorer/; revision=8522
2004-03-03 20:29:52 +00:00
Martin Fuchs
2436649677 add opened files to the "recent documents" list
svn path=/branches/lean-explorer/; revision=8521
2004-03-03 20:29:52 +00:00
Martin Fuchs
9f36b56be8 up/down navigation for shell views in SDI mode
svn path=/branches/lean-explorer/; revision=8461
2004-02-28 23:32:05 +00:00
Martin Fuchs
6788d779df disable context information for lean release builds
svn path=/branches/lean-explorer/; revision=8455
2004-02-28 17:38:55 +00:00
Martin Fuchs
d22ce95a23 "up" button
svn path=/branches/lean-explorer/; revision=8454
2004-02-28 17:38:34 +00:00
Martin Fuchs
1ed75817b2 - fix for restoring applications using task bar buttons
- project file maintainancement
- docu update

svn path=/branches/lean-explorer/; revision=8451
2004-02-28 16:41:55 +00:00
Martin Fuchs
696e9fab75 - fix for restoring applications using task bar buttons
- project file maintainancement
- docu update

svn path=/branches/lean-explorer/; revision=8450
2004-02-28 16:41:55 +00:00
Martin Fuchs
c0442f2fa3 compatibility fix for "Sleipnir" web browser: minimizing by clicks on taskbar
svn path=/branches/lean-explorer/; revision=8449
2004-02-28 16:05:34 +00:00
Martin Fuchs
df7a6033ec desktop switching: allow applications to be visible only on one desktop
svn path=/branches/lean-explorer/; revision=8447
2004-02-28 15:14:39 +00:00
Martin Fuchs
153276234c remember last foreground window when switching desktops
svn path=/branches/lean-explorer/; revision=8439
2004-02-28 13:45:33 +00:00
Martin Fuchs
91554083e0 remember last foreground window when switching desktops
svn path=/branches/lean-explorer/; revision=8437
2004-02-28 13:45:32 +00:00
Martin Fuchs
3b06f79ff4 another foreground window fix for clicks on notification icons
svn path=/branches/lean-explorer/; revision=8435
2004-02-28 10:57:02 +00:00
Martin Fuchs
55b5f0c114 implemented 'minimize all' feature
svn path=/branches/lean-explorer/; revision=8432
2004-02-28 10:27:39 +00:00
Martin Fuchs
1f3fa7df38 disable start menu entries for non-existing folders
svn path=/branches/lean-explorer/; revision=8417
2004-02-26 21:52:34 +00:00
Martin Fuchs
fb350b3059 fix admin and printer folders
svn path=/branches/lean-explorer/; revision=8415
2004-02-26 21:28:48 +00:00
Martin Fuchs
2c1003c0c6 include explorer windows in desktop switching
svn path=/branches/lean-explorer/; revision=8414
2004-02-26 21:20:51 +00:00
Martin Fuchs
9fe0326582 avoid displaying context menu for application button _and_ desktop bar at the same time
svn path=/branches/lean-explorer/; revision=8412
2004-02-26 20:38:33 +00:00
Martin Fuchs
83fbf6968d docu update
svn path=/branches/lean-explorer/; revision=8410
2004-02-26 20:26:11 +00:00
Martin Fuchs
2211cc9503 fix foreground window handling when clicking on notification area icons
svn path=/branches/lean-explorer/; revision=8409
2004-02-26 20:20:44 +00:00
Martin Fuchs
eb17639f37 resize taskbar buttons according to number of running applications
svn path=/branches/lean-explorer/; revision=8405
2004-02-26 19:47:39 +00:00
Martin Fuchs
73a9af76fa resize taskbar buttons according to number of running applications
svn path=/branches/lean-explorer/; revision=8404
2004-02-26 19:47:39 +00:00
Martin Fuchs
4f32541e64 fix taksbar icons after closing previous applications
svn path=/branches/lean-explorer/; revision=8380
2004-02-25 20:21:30 +00:00
Martin Fuchs
ea3d021bfd set background brush for the short moment of displaying the background color while moving foreground windows
svn path=/branches/lean-explorer/; revision=8374
2004-02-25 19:29:13 +00:00
Martin Fuchs
b5a4206184 fixed bug #224
svn path=/branches/lean-explorer/; revision=8372
2004-02-25 18:58:34 +00:00
Martin Fuchs
3f5fd6a3b2 fixed more GDI handle leaks
svn path=/branches/lean-explorer/; revision=8356
2004-02-24 22:15:41 +00:00
Martin Fuchs
f537ac11a5 - launch task manager
- set foregroundwindow when opening start menu (CTRL-ESC shortcut)

svn path=/branches/lean-explorer/; revision=8353
2004-02-24 20:00:03 +00:00
Martin Fuchs
48da412f74 keyboard navigation in start menu using first character of display names
svn path=/branches/lean-explorer/; revision=8343
2004-02-23 22:16:54 +00:00
Martin Fuchs
7bbbc66715 fixed icon handle leak in notification area
svn path=/branches/lean-explorer/; revision=8338
2004-02-23 20:39:16 +00:00
Martin Fuchs
479967c7f3 strip down resource images
svn path=/branches/lean-explorer/; revision=8270
2004-02-19 20:57:27 +00:00
Martin Fuchs
982ba5e7ea - eiminated compiler warning
- removed NTFS streams support since it never displayed in this version

svn path=/branches/lean-explorer/; revision=8247
2004-02-18 19:38:36 +00:00
Martin Fuchs
a8cf2dad56 SDI interface for lean explorer
svn path=/branches/lean-explorer/; revision=8240
2004-02-18 00:01:02 +00:00
Martin Fuchs
1707fd147a disable autostart if the SHIFT key is pressed
svn path=/branches/lean-explorer/; revision=8224
2004-02-17 20:20:03 +00:00
Martin Fuchs
361d931d0c - disable lazy icon extraction in start menu to be as fast as possible
- convert settings start menus into buttons

svn path=/branches/lean-explorer/; revision=8217
2004-02-16 23:32:30 +00:00
Martin Fuchs
d6a11826cd first draft of a lean explorer version
svn path=/branches/lean-explorer/; revision=8214
2004-02-16 22:53:38 +00:00
The ReactOS Team
aea6a56335 This commit was manufactured by cvs2svn to create branch
'lean-explorer'.

svn path=/branches/lean-explorer/; revision=8213
2004-02-16 22:53:38 +00:00
8196 changed files with 254057 additions and 89192 deletions

View File

@@ -1,32 +0,0 @@
#
# FreeLoader
# Copyright (C) 1999, 2000, 2001 Brian Palmer <brianp@sginet.com>
#
# 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.
#
PATH_TO_TOP = ../../..
include ../rules.mak
BOOTCD_DIR = $(PATH_TO_TOP)/../bootcd
.PHONY : clean bootcd
ifeq ($(ARCH),powerpc)
include Makefile.powerpc
else
include Makefile.i386
endif

View File

@@ -1,35 +0,0 @@
TOOLS=$(PATH_TO_TOP)/tools
SECTIONS= \
--only-section=.text \
--only-section=.data \
--only-section=.bss
LDSECT= -Ttext 0xe00000 -Tdata 0xe10000
OBJS=ofwboot.o freeldr.o
CFLAGS=-mbig -meabi -fPIC -fno-builtin -I../freeldr/include
FREELDR=../freeldr/freeldr.sys
.SUFFIXES: .c .o
all: ofwldr
hack-coff$(EXEEXT):
$(HOST_CC) -I../freeldr/include hack-coff.c -o $@
ofwboot.o: ofwboot.s
$(NASM_CMD) $< -c -o $@
$(FREELDR):
$(MAKE) -C ../freeldr
freeldr.o: $(FREELDR)
$(TOOLS)/ppc-le2be $< freeldr.tmp
$(OBJCOPY) -I binary -O elf32-powerpc -B powerpc:common freeldr.tmp $@
rm freeldr.tmp
ofwldr: $(OBJS)
$(LD) -melf32ppc --no-omagic $(LDSECT) $(OBJS) -g -o $@.elf
$(OBJCOPY) $(SECTIONS) -O aixcoff-rs6000 $@.elf $@
$(TOOLS)/hack-coff $@
clean:
rm -rf ofwldr *.o *.elf *.tmp

View File

@@ -1,960 +0,0 @@
.section .text
_start:
.long 0xe00000 + 12
.long 0
.long 0
/*
* LIFTED FROM arch/macppc/stand/ofwboot/Locore.c
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
* Copyright (C) 1995, 1996 TooLs GmbH.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by TooLs GmbH.
* 4. The name of TooLs GmbH may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
_begin:
sync
isync
lis %r1,stack@ha
addi %r1,%r1,stack@l
addi %r1,%r1,16384 - 0x10
mfmsr %r8
li %r0,0
mtmsr %r0
isync
mtibatu 0,%r0
mtibatu 1,%r0
mtibatu 2,%r0
mtibatu 3,%r0
mtdbatu 0,%r0
mtdbatu 1,%r0
mtdbatu 2,%r0
mtdbatu 3,%r0
li %r9,0x12 /* BATL(0, BAT_M, BAT_PP_RW) */
mtibatl 0,%r9
mtdbatl 0,%r9
li %r9,0x1ffe /* BATU(0, BAT_BL_256M, BAT_Vs) */
mtibatu 0,%r9
mtdbatu 0,%r9
isync
li %r8,0x3030
mtmsr %r8
/* Store ofw call addr */
mr %r21,%r5
lis %r10,0xe00000@ha
stw %r5,ofw_call_addr - _start@l(%r10)
lis %r4,_binary_freeldr_tmp_end@ha
addi %r4,%r4,_binary_freeldr_tmp_end@l
lis %r3,_binary_freeldr_tmp_start@ha
addi %r3,%r3,_binary_freeldr_tmp_start@l
lis %r5,0x8000@ha
addi %r5,%r5,0x8000@l
bl copy_bits
bl zero_registers
lis %r3,0xe00000@ha
addi %r3,%r3,freeldr_banner - _start
bl ofw_print_string
bl ofw_print_eol
/* Zero CTR */
mtcr %r31
lis %r3,0x8000@ha
addi %r3,%r3,0x8000@l
mtlr %r3
lis %r3,call_ofw@ha
addi %r3,%r3,call_ofw - _start
b call_freeldr
.align 4
call_freeldr:
/* Get the address of the functions list --
* Note:
* Because of little endian switch we must use an even number of
* instructions here.. Pad with a nop if needed. */
mfmsr %r10
ori %r10,%r10,1
mtmsr %r10
nop
/* Note that this is little-endian from here on */
blr
nop
.align 4
call_ofw:
/* R3 has the function offset to call (n * 4)
* Other arg registers are unchanged.
* Note that these 4 instructions are in reverse order due to
* little-endian convention */
andi. %r0,%r0,65534
mfmsr %r0
mtmsr %r0
/* Now normal ordering resumes */
subi %r1,%r1,0x100
stw %r8,4(%r1)
stw %r9,8(%r1)
stw %r10,12(%r1)
mflr %r8
stw %r8,16(%r1)
lis %r10,0xe00000@ha
add %r9,%r3,%r10
lwz %r3,ofw_functions - _start@l(%r9)
mtctr %r3
mr %r3,%r4
mr %r4,%r5
mr %r5,%r6
mr %r6,%r7
mr %r7,%r8
/* Goto the swapped function */
bctrl
lwz %r8,16(%r1)
mtlr %r8
lwz %r8,4(%r1)
lwz %r9,8(%r1)
lwz %r10,12(%r1)
addi %r1,%r1,0x100
/* Ok, go back to little endian */
mfmsr %r0
ori %r0,%r0,1
mtmsr %r0
/* Note that this is little-endian from here on */
blr
nop
zero_registers:
xor %r2,%r2,%r2
mr %r0,%r2
mr %r3,%r2
mr %r4,%r2
mr %r5,%r2
mr %r6,%r2
mr %r7,%r2
mr %r8,%r2
mr %r9,%r2
mr %r10,%r2
mr %r11,%r2
mr %r12,%r2
mr %r13,%r2
mr %r14,%r2
mr %r15,%r2
mr %r12,%r2
mr %r13,%r2
mr %r14,%r2
mr %r15,%r2
mr %r16,%r2
mr %r17,%r2
mr %r18,%r2
mr %r19,%r2
mr %r20,%r2
mr %r21,%r2
mr %r22,%r2
mr %r23,%r2
mr %r24,%r2
mr %r25,%r2
mr %r26,%r2
mr %r27,%r2
mr %r28,%r2
mr %r29,%r2
mr %r30,%r2
mr %r31,%r2
blr
prim_strlen:
mr %r5,%r3
prim_strlen_loop:
lbz %r4,0(%r3)
cmpi 0,0,%r4,0
beq prim_strlen_done
addi %r3,%r3,1
b prim_strlen_loop
prim_strlen_done:
sub %r3,%r3,%r5
blr
copy_bits:
cmp 0,0,%r3,%r4
beqlr
lwz %r6,0(%r3)
stw %r6,0(%r5)
addi %r3,%r3,4
addi %r5,%r5,4
b copy_bits
ofw_print_string_hook:
bl ofw_print_number
bl ofw_exit
ofw_print_string:
/* Reserve some stack space */
subi %r1,%r1,32
/* Save args */
stw %r3,0(%r1)
/* Save the lr, a scratch register */
stw %r8,8(%r1)
mflr %r8
stw %r8,12(%r1)
/* Load the package name */
lis %r3,0xe00000@ha
addi %r3,%r3,ofw_chosen_name - _start
/* Fire */
bl ofw_finddevice
/* Load up for getprop */
stw %r3,16(%r1)
lis %r4,0xe00000@ha
addi %r4,%r4,ofw_stdout_name - _start
addi %r5,%r1,20
li %r6,4
bl ofw_getprop
/* Measure the string and remember the length */
lwz %r3,0(%r1)
bl prim_strlen
mr %r5,%r3
lwz %r3,20(%r1)
lwz %r4,0(%r1)
/* Write the string */
bl ofw_write
/* Return */
lwz %r8,12(%r1)
mtlr %r8
lwz %r8,8(%r1)
addi %r1,%r1,32
blr
/* Print 8 hex digits representing a number in r3 */
ofw_print_number:
subi %r1,%r1,32
stw %r8,0(%r1)
mflr %r8
stw %r8,4(%r1)
stw %r9,8(%r1)
xor %r9,%r9,%r9
stw %r9,12(%r1)
/* Set up and, devide, shift */
mr %r8,%r3
lis %r6,0xf0000000@ha
lis %r7,0x10000000@ha
li %r9,8
ofw_number_loop:
nop
cmpi 0,0,%r9,0
beq ofw_number_return
subi %r9,%r9,1
/* Body: isolate digit, divide, print */
and %r5,%r6,%r8
divwu %r4,%r5,%r7
srwi %r6,%r6,4
srwi %r7,%r7,4
nop
cmpi 0,0,%r4,10
bge ofw_number_letter
addi %r4,%r4,'0'
b ofw_number_digit_out
ofw_number_letter:
addi %r4,%r4,'A' - 10
ofw_number_digit_out:
stb %r4,12(%r1)
addi %r3,%r1,12
stw %r6,16(%r1)
stw %r7,20(%r1)
stw %r8,24(%r1)
stw %r9,28(%r1)
bl ofw_print_string
lwz %r6,16(%r1)
lwz %r7,20(%r1)
lwz %r8,24(%r1)
lwz %r9,28(%r1)
b ofw_number_loop
ofw_number_return:
/* Return */
lwz %r9,8(%r1)
lwz %r8,4(%r1)
mtlr %r8
lwz %r8,0(%r1)
addi %r1,%r1,32
blr
ofw_print_eol:
subi %r1,%r1,16
stw %r8,0(%r1)
mflr %r8
stw %r8,4(%r1)
li %r4,0x0d0a
sth %r4,8(%r1)
xor %r4,%r4,%r4
sth %r4,10(%r1)
addi %r3,%r1,8
bl ofw_print_string
lwz %r8,4(%r1)
mtlr %r8
lwz %r8,0(%r1)
addi %r1,%r1,16
blr
ofw_print_nothing:
subi %r1,%r1,16
stw %r8,0(%r1)
mflr %r8
stw %r8,4(%r1)
li %r4,0
sth %r4,8(%r1)
xor %r4,%r4,%r4
sth %r4,10(%r1)
addi %r3,%r1,8
bl ofw_print_string
lwz %r8,4(%r1)
mtlr %r8
lwz %r8,0(%r1)
addi %r1,%r1,16
blr
ofw_print_space:
subi %r1,%r1,16
stw %r8,0(%r1)
mflr %r8
stw %r8,4(%r1)
li %r4,0x2000
sth %r4,8(%r1)
xor %r4,%r4,%r4
sth %r4,10(%r1)
addi %r3,%r1,8
bl ofw_print_string
lwz %r8,4(%r1)
mtlr %r8
lwz %r8,0(%r1)
addi %r1,%r1,16
blr
ofw_print_regs:
/* Construct ofw exit call */
subi %r1,%r1,0xa0
stw %r0,0(%r1)
stw %r1,4(%r1)
stw %r2,8(%r1)
stw %r3,12(%r1)
stw %r4,16(%r1)
stw %r5,20(%r1)
stw %r6,24(%r1)
stw %r7,28(%r1)
stw %r8,32(%r1)
stw %r9,36(%r1)
stw %r10,40(%r1)
stw %r11,44(%r1)
stw %r12,48(%r1)
stw %r13,52(%r1)
stw %r14,56(%r1)
stw %r15,60(%r1)
stw %r16,64(%r1)
stw %r17,68(%r1)
stw %r18,72(%r1)
stw %r19,76(%r1)
stw %r20,80(%r1)
stw %r21,84(%r1)
stw %r22,88(%r1)
stw %r23,92(%r1)
stw %r24,96(%r1)
stw %r25,100(%r1)
stw %r26,104(%r1)
stw %r27,108(%r1)
stw %r28,112(%r1)
stw %r29,116(%r1)
stw %r30,120(%r1)
stw %r31,124(%r1)
mflr %r0
stw %r0,128(%r1)
mfcr %r0
stw %r0,132(%r1)
mfctr %r0
stw %r0,136(%r1)
mfmsr %r0
stw %r0,140(%r1)
/* Count at zero */
xor %r0,%r0,%r0
stw %r0,144(%r1)
mr %r3,%r1
stw %r3,148(%r1)
/* Body, print the regname, then the register */
ofw_register_loop:
lwz %r3,144(%r1)
cmpi 0,0,%r3,32
beq ofw_register_special
lis %r3,0xe00000@ha
addi %r3,%r3,freeldr_reg_init - _start
bl ofw_print_string
lwz %r3,144(%r1)
bl ofw_print_number
bl ofw_print_space
lwz %r3,144(%r1)
mulli %r3,%r3,4
add %r3,%r1,%r3
lwz %r3,0(%r3)
stw %r3,152(%r1)
bl ofw_print_number
lwz %r3,144(%r1)
addi %r3,%r3,1
stw %r3,144(%r1)
b done_dump
dump_optional:
bl ofw_print_space
bl ofw_print_space
lwz %r3,152(%r1)
lwz %r3,0(%r3)
bl ofw_print_number
bl ofw_print_space
lwz %r3,152(%r1)
lwz %r3,4(%r3)
bl ofw_print_number
bl ofw_print_space
lwz %r3,152(%r1)
lwz %r3,8(%r3)
bl ofw_print_number
bl ofw_print_space
lwz %r3,152(%r1)
lwz %r3,12(%r3)
bl ofw_print_number
bl ofw_print_space
done_dump:
bl ofw_print_eol
b ofw_register_loop
ofw_register_special:
/* LR */
lis %r3,0xe00000@ha
addi %r3,%r3,freeldr_reg_lr - _start
bl ofw_print_string
bl ofw_print_space
lwz %r3,128(%r1)
bl ofw_print_number
bl ofw_print_eol
/* CR */
lis %r3,0xe00000@ha
addi %r3,%r3,freeldr_reg_cr - _start
bl ofw_print_string
bl ofw_print_space
lwz %r3,132(%r1)
bl ofw_print_number
bl ofw_print_eol
/* CTR */
lis %r3,0xe00000@ha
addi %r3,%r3,freeldr_reg_ctr - _start
bl ofw_print_string
bl ofw_print_space
lwz %r3,136(%r1)
bl ofw_print_number
bl ofw_print_eol
/* MSR */
lis %r3,0xe00000@ha
addi %r3,%r3,freeldr_reg_msr - _start
bl ofw_print_string
bl ofw_print_space
lwz %r3,140(%r1)
bl ofw_print_number
bl ofw_print_eol
/* Return */
lwz %r0,128(%r1)
mtlr %r0
lwz %r0,0(%r1)
lwz %r2,8(%r1)
lwz %r3,12(%r1)
lwz %r4,16(%r1)
lwz %r5,20(%r1)
lwz %r6,24(%r1)
lwz %r7,28(%r1)
addi %r1,%r1,0xa0
blr
ofw_finddevice_hook:
subi %r1,%r1,32
stw %r3,0(%r1)
mflr %r3
stw %r3,4(%r1)
lwz %r3,0(%r1)
bl ofw_finddevice
stw %r3,0(%r1)
lwz %r3,4(%r1)
mtlr %r3
lwz %r3,0(%r1)
addi %r1,%r1,32
blr
ofw_finddevice:
/* Reserve stack space ...
* 20 bytes for the ofw call,
* r8, r9, and lr */
subi %r1,%r1,32
/* Store r8, r9, lr */
stw %r8,20(%r1)
stw %r9,24(%r1)
mflr %r8
stw %r8,28(%r1)
/* Get finddevice name */
lis %r8,0xe00000@ha
addi %r9,%r8,ofw_finddevice_name - _start
stw %r9,0(%r1)
/* 1 Argument and 1 return */
li %r9,1
stw %r9,4(%r1)
stw %r9,8(%r1)
stw %r3,12(%r1)
/* Load up the call address */
lwz %r9,ofw_call_addr - _start(%r8)
mtlr %r9
/* Set argument */
mr %r3,%r1
/* Fire */
blrl
lwz %r3,16(%r1)
/* Restore registers */
lwz %r8,28(%r1)
mtlr %r8
lwz %r9,24(%r1)
lwz %r8,20(%r1)
addi %r1,%r1,32
/* Return */
blr
ofw_getprop_hook:
/* Reserve stack space:
* 32 bytes for the ofw call
* 12 bytes for r8, r9, lr
*/
/* Reserve stack space ...
* 20 bytes for the ofw call,
* r8, r9, and lr */
subi %r1,%r1,48
/* Store r8, r9, lr */
stw %r8,32(%r1)
stw %r9,36(%r1)
mflr %r8
stw %r8,40(%r1)
/* Get getprop name */
lis %r8,0xe00000@ha
addi %r9,%r8,ofw_getprop_name - _start
stw %r9,0(%r1)
/* 4 Argument and 1 return */
li %r9,4
stw %r9,4(%r1)
li %r9,1
stw %r9,8(%r1)
stw %r3,12(%r1) /* Package */
stw %r4,16(%r1) /* Property */
stw %r5,20(%r1) /* Return buffer */
stw %r6,24(%r1) /* Buffer size */
/* Load up the call address */
lwz %r9,ofw_call_addr - _start(%r8)
mtlr %r9
/* Set argument */
mr %r3,%r1
/* Fire */
blrl
/* Workaround to a wierd crash ... not sure what causes it.
* XXX investigate me */
bl ofw_print_nothing
/* Return */
lwz %r3,28(%r1)
/* Restore registers */
lwz %r8,40(%r1)
mtlr %r8
lwz %r9,36(%r1)
lwz %r8,32(%r1)
addi %r1,%r1,48
/* Return */
blr
ofw_getprop:
/* Reserve stack space:
* 32 bytes for the ofw call
* 12 bytes for r8, r9, lr
*/
/* Reserve stack space ...
* 20 bytes for the ofw call,
* r8, r9, and lr */
subi %r1,%r1,48
/* Store r8, r9, lr */
stw %r8,32(%r1)
stw %r9,36(%r1)
mflr %r8
stw %r8,40(%r1)
/* Get getprop name */
lis %r8,0xe00000@ha
addi %r9,%r8,ofw_getprop_name - _start
stw %r9,0(%r1)
/* 4 Argument and 1 return */
li %r9,4
stw %r9,4(%r1)
li %r9,1
stw %r9,8(%r1)
stw %r3,12(%r1) /* Package */
stw %r4,16(%r1) /* Property */
stw %r5,20(%r1) /* Return buffer */
stw %r6,24(%r1) /* Buffer size */
/* Load up the call address */
lwz %r9,ofw_call_addr - _start(%r8)
mtlr %r9
/* Set argument */
mr %r3,%r1
/* Fire */
blrl
/* Return */
lwz %r3,28(%r1)
/* Restore registers */
lwz %r8,40(%r1)
mtlr %r8
lwz %r9,36(%r1)
lwz %r8,32(%r1)
addi %r1,%r1,48
/* Return */
blr
ofw_write:
/* Reserve stack space:
* 28 bytes for the ofw call
* 12 bytes for r8, r9, lr
*/
/* Reserve stack space ...
* 20 bytes for the ofw call,
* r8, r9, and lr */
subi %r1,%r1,48
nop
/* Store r8, r9, lr */
stw %r8,28(%r1)
stw %r9,32(%r1)
mflr %r8
stw %r8,36(%r1)
/* Get write name */
lis %r8,0xe00000@ha
addi %r9,%r8,ofw_write_name - _start
stw %r9,0(%r1)
/* 3 Arguments and 1 return */
li %r9,3
stw %r9,4(%r1)
li %r9,1
stw %r9,8(%r1)
stw %r3,12(%r1)
stw %r4,16(%r1)
stw %r5,20(%r1)
/* Load up the call address */
lwz %r9,ofw_call_addr - _start(%r8)
mtlr %r9
/* Set argument */
mr %r3,%r1
/* Fire */
blrl
/* Return */
lwz %r3,24(%r1)
/* Restore registers */
lwz %r8,36(%r1)
mtlr %r8
lwz %r9,32(%r1)
lwz %r8,28(%r1)
addi %r1,%r1,48
/* Return */
blr
ofw_read:
/* Reserve stack space:
* 28 bytes for the ofw call
* 12 bytes for r8, r9, lr
*/
/* Reserve stack space ...
* 20 bytes for the ofw call,
* r8, r9, and lr */
subi %r1,%r1,48
nop
/* Store r8, r9, lr */
stw %r8,28(%r1)
stw %r9,32(%r1)
mflr %r8
stw %r8,36(%r1)
/* Get read name */
lis %r8,0xe00000@ha
addi %r9,%r8,ofw_read_name - _start
stw %r9,0(%r1)
/* 3 Arguments and 1 return */
li %r9,3
stw %r9,4(%r1)
li %r9,1
stw %r9,8(%r1)
stw %r3,12(%r1)
stw %r4,16(%r1)
stw %r5,20(%r1)
/* Load up the call address */
lwz %r9,ofw_call_addr - _start(%r8)
mtlr %r9
/* Set argument */
mr %r3,%r1
/* Fire */
blrl
/* Return */
lwz %r3,24(%r1)
/* Restore registers */
lwz %r8,36(%r1)
mtlr %r8
lwz %r9,32(%r1)
lwz %r8,28(%r1)
addi %r1,%r1,48
/* Return */
blr
ofw_exit:
lis %r3,0xe00000@ha
addi %r3,%r3,freeldr_halt - _start
bl ofw_print_string
/*
ofw_exit_loop:
b ofw_exit_loop
*/
/* Load the exit name */
lis %r8,0xe00000@ha
addi %r9,%r8,ofw_exit_name - _start
stw %r9,0(%r1)
/* Zero args, zero returns */
xor %r9,%r9,%r9
stw %r9,4(%r1)
stw %r9,8(%r1)
/* Load up the call address */
lwz %r9,ofw_call_addr - _start(%r8)
mtlr %r9
mr %r3,%r1
/* Fire */
blrl
/* No return from exit */
.org 0x1000
freeldr_banner:
.ascii "ReactOS OpenFirmware Boot Program\r\n\0"
freeldr_halt:
.ascii "ReactOS OpenFirmware Boot Program Halting\r\n\0"
freeldr_reg_init:
.ascii "r\0"
freeldr_reg_lr:
.ascii "lr \0"
freeldr_reg_cr:
.ascii "cr \0"
freeldr_reg_ctr:
.ascii "ctr\0"
freeldr_reg_msr:
.ascii "msr\0"
ofw_call_addr:
.long 0
ofw_memory_size:
.long 0
.long 0
.long 0
.long 0
ofw_finddevice_name:
.ascii "finddevice\0"
ofw_getprop_name:
.ascii "getprop\0"
ofw_write_name:
.ascii "write\0"
ofw_read_name:
.ascii "read\0"
ofw_exit_name:
.ascii "exit\0"
ofw_chosen_name:
.ascii "/chosen\0"
ofw_stdout_name:
.ascii "stdout\0"
ofw_memory_name:
.ascii "/memory@0\0"
ofw_reg_name:
.ascii "reg\0"
ofw_functions:
.long ofw_finddevice_hook
.long ofw_getprop_hook
.long ofw_write
.long ofw_read
.long ofw_exit
.long ofw_print_regs
.long ofw_print_string
.long ofw_print_number
.org 0x2000
stack:
.space 0x4000

View File

@@ -1,787 +0,0 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: Freeloader
* FILE: boot/freeldr/freeldr/multiboot.c
* PURPOSE: ReactOS Loader
* PROGRAMMERS: Alex Ionescu (alex@relsoft.net)
* Hartmut Birr - SMP/PAE Code
*/
#include <freeldr.h>
#include <internal/i386/ke.h>
#define NDEBUG
#include <debug.h>
/* Base Addres of Kernel in Physical Memory */
#define KERNEL_BASE_PHYS 0x200000
/* Bits to shift to convert a Virtual Address into an Offset in the Page Table */
#define PFN_SHIFT 12
/* Bits to shift to convert a Virtual Address into an Offset in the Page Directory */
#define PDE_SHIFT 20
#define PDE_SHIFT_PAE 18
/* Converts a Relative Address read from the Kernel into a Physical Address */
#define RaToPa(p) \
(ULONG_PTR)((ULONG_PTR)p + KERNEL_BASE_PHYS)
/* Converts a Phsyical Address Pointer into a Page Frame Number */
#define PaPtrToPfn(p) \
(((ULONG_PTR)&p) >> PFN_SHIFT)
/* Converts a Phsyical Address into a Page Frame Number */
#define PaToPfn(p) \
((p) >> PFN_SHIFT)
#define STARTUP_BASE 0xF0000000
#define HYPERSPACE_BASE 0xF0800000
#define APIC_BASE 0xFEC00000
#define KPCR_BASE 0xFF000000
#define LowMemPageTableIndex 0
#define StartupPageTableIndex (STARTUP_BASE >> 20) / sizeof(HARDWARE_PTE_X86)
#define HyperspacePageTableIndex (HYPERSPACE_BASE >> 20) / sizeof(HARDWARE_PTE_X86)
#define KpcrPageTableIndex (KPCR_BASE >> 20) / sizeof(HARDWARE_PTE_X86)
#define ApicPageTableIndex (APIC_BASE >> 20) / sizeof(HARDWARE_PTE_X86)
#define LowMemPageTableIndexPae 0
#define StartupPageTableIndexPae (STARTUP_BASE >> 21)
#define HyperspacePageTableIndexPae (HYPERSPACE_BASE >> 21)
#define KpcrPageTableIndexPae (KPCR_BASE >> 21)
#define ApicPageTableIndexPae (APIC_BASE >> 21)
#define KernelEntryPoint (KernelEntry - KERNEL_BASE_PHYS) + KernelBase
/* Load Address of Next Module */
ULONG_PTR NextModuleBase = 0;
/* Currently Opened Module */
PFRLDR_MODULE CurrentModule = NULL;
/* Unrelocated Kernel Base in Virtual Memory */
ULONG_PTR KernelBase;
/* Wether PAE is to be used or not */
BOOLEAN PaeModeEnabled;
/* Kernel Entrypoint in Physical Memory */
ULONG_PTR KernelEntry;
/* Page Directory and Tables for non-PAE Systems */
extern ULONG_PTR startup_pagedirectory;
extern ULONG_PTR lowmem_pagetable;
extern ULONG_PTR kernel_pagetable;
extern ULONG_PTR hyperspace_pagetable;
extern ULONG_PTR _pae_pagedirtable;
extern ULONG_PTR apic_pagetable;
extern ULONG_PTR kpcr_pagetable;
/* Page Directory and Tables for PAE Systems */
extern ULONG_PTR startup_pagedirectorytable_pae;
extern ULONG_PTR startup_pagedirectory_pae;
extern ULONG_PTR lowmem_pagetable_pae;
extern ULONG_PTR kernel_pagetable_pae;
extern ULONG_PTR hyperspace_pagetable_pae;
extern ULONG_PTR pagedirtable_pae;
extern ULONG_PTR apic_pagetable_pae;
extern ULONG_PTR kpcr_pagetable_pae;
typedef struct _HARDWARE_PTE_X86 {
ULONG Valid : 1;
ULONG Write : 1;
ULONG Owner : 1;
ULONG WriteThrough : 1;
ULONG CacheDisable : 1;
ULONG Accessed : 1;
ULONG Dirty : 1;
ULONG LargePage : 1;
ULONG Global : 1;
ULONG CopyOnWrite : 1;
ULONG Prototype : 1;
ULONG reserved : 1;
ULONG PageFrameNumber : 20;
} HARDWARE_PTE_X86, *PHARDWARE_PTE_X86;
typedef struct _HARDWARE_PTE_X64 {
ULONG Valid : 1;
ULONG Write : 1;
ULONG Owner : 1;
ULONG WriteThrough : 1;
ULONG CacheDisable : 1;
ULONG Accessed : 1;
ULONG Dirty : 1;
ULONG LargePage : 1;
ULONG Global : 1;
ULONG CopyOnWrite : 1;
ULONG Prototype : 1;
ULONG reserved : 1;
ULONG PageFrameNumber : 20;
ULONG reserved2 : 31;
ULONG NoExecute : 1;
} HARDWARE_PTE_X64, *PHARDWARE_PTE_X64;
typedef struct _PAGE_DIRECTORY_X86 {
HARDWARE_PTE_X86 Pde[1024];
} PAGE_DIRECTORY_x86, *PPAGE_DIRECTORY_X86;
typedef struct _PAGE_DIRECTORY_X64 {
HARDWARE_PTE_X64 Pde[2048];
} PAGE_DIRECTORY_X64, *PPAGE_DIRECTORY_X64;
typedef struct _PAGE_DIRECTORY_TABLE_X64 {
HARDWARE_PTE_X64 Pde[4];
} PAGE_DIRECTORY_TABLE_X64, *PPAGE_DIRECTORY_TABLE_X64;
/* FUNCTIONS *****************************************************************/
/*++
* FrLdrStartup
* INTERNAL
*
* Prepares the system for loading the Kernel.
*
* Params:
* Magic - Multiboot Magic
*
* Returns:
* None.
*
* Remarks:
* None.
*
*--*/
VOID
STDCALL
FrLdrStartup(ULONG Magic)
{
/* Disable Interrupts */
Ke386DisableInterrupts();
/* Re-initalize EFLAGS */
Ke386EraseFlags();
/* Get the PAE Mode */
FrLdrGetPaeMode();
/* Initialize the page directory */
FrLdrSetupPageDirectory();
/* Initialize Paging, Write-Protection and Load NTOSKRNL */
FrLdrSetupPae(Magic);
}
/*++
* FrLdrSetupPae
* INTERNAL
*
* Configures PAE on a MP System, and sets the PDBR if it's supported, or if
* the system is UP.
*
* Params:
* Magic - Multiboot Magic
*
* Returns:
* None.
*
* Remarks:
* None.
*
*--*/
VOID
FASTCALL
FrLdrSetupPae(ULONG Magic)
{
ULONG_PTR PageDirectoryBaseAddress = (ULONG_PTR)&startup_pagedirectory;
ASMCODE PagedJump;
if (PaeModeEnabled)
{
PageDirectoryBaseAddress = (ULONG_PTR)&startup_pagedirectorytable_pae;
/* Enable PAE */
Ke386SetCr4(Ke386GetCr4() | X86_CR4_PAE);
}
/* Set the PDBR */
Ke386SetPageTableDirectory(PageDirectoryBaseAddress);
/* Enable Paging and Write Protect*/
Ke386SetCr0(Ke386GetCr0() | X86_CR0_PG | X86_CR0_WP);
/* Jump to Kernel */
PagedJump = (ASMCODE)KernelEntryPoint;
PagedJump(Magic, &LoaderBlock);
}
/*++
* FrLdrGetKernelBase
* INTERNAL
*
* Gets the Kernel Base to use.
*
* Params:
*
* Returns:
* None.
*
* Remarks:
* Sets both the FreeLdr internal variable as well as the one which
* will be used by the Kernel.
*
*--*/
VOID
FASTCALL
FrLdrGetKernelBase(VOID)
{
PCHAR p;
/* Read Command Line */
p = (PCHAR)LoaderBlock.CommandLine;
while ((p = strchr(p, '/')) != NULL) {
/* Find "/3GB" */
if (!strnicmp(p + 1, "3GB", 3)) {
/* Make sure there's nothing following it */
if (p[4] == ' ' || p[4] == 0) {
/* Use 3GB */
KernelBase = 0xC0000000;
}
}
p++;
}
/* Set KernelBase */
LoaderBlock.KernelBase = KernelBase;
}
/*++
* FrLdrGetPaeMode
* INTERNAL
*
* Determines whether PAE mode shoudl be enabled or not.
*
* Params:
* None.
*
* Returns:
* None.
*
* Remarks:
* None.
*
*--*/
VOID
FASTCALL
FrLdrGetPaeMode(VOID)
{
/* FIXME: Read command line */
PaeModeEnabled = FALSE;
if (PaeModeEnabled)
{
}
}
/*++
* FrLdrSetupPageDirectory
* INTERNAL
*
* Sets up the ReactOS Startup Page Directory.
*
* Params:
* None.
*
* Returns:
* None.
*
* Remarks:
* We are setting PDEs, but using the equvivalent (for our purpose) PTE structure.
* As such, please note that PageFrameNumber == PageEntryNumber.
*
*--*/
VOID
FASTCALL
FrLdrSetupPageDirectory(VOID)
{
PPAGE_DIRECTORY_X86 PageDir;
PPAGE_DIRECTORY_TABLE_X64 PageDirTablePae;
PPAGE_DIRECTORY_X64 PageDirPae;
ULONG KernelPageTableIndex;
ULONG i;
if (PaeModeEnabled) {
/* Get the Kernel Table Index */
KernelPageTableIndex = (KernelBase >> 21);
/* Get the Startup Page Directory Table */
PageDirTablePae = (PPAGE_DIRECTORY_TABLE_X64)&startup_pagedirectorytable_pae;
/* Get the Startup Page Directory */
PageDirPae = (PPAGE_DIRECTORY_X64)&startup_pagedirectory_pae;
/* Set the Startup page directory table */
for (i = 0; i < 4; i++)
{
PageDirTablePae->Pde[i].Valid = 1;
PageDirTablePae->Pde[i].PageFrameNumber = PaPtrToPfn(startup_pagedirectory_pae) + i;
}
/* Set up the Low Memory PDE */
for (i = 0; i < 2; i++)
{
PageDirPae->Pde[LowMemPageTableIndexPae + i].Valid = 1;
PageDirPae->Pde[LowMemPageTableIndexPae + i].Write = 1;
PageDirPae->Pde[LowMemPageTableIndexPae + i].PageFrameNumber = PaPtrToPfn(lowmem_pagetable_pae) + i;
}
/* Set up the Kernel PDEs */
for (i = 0; i < 3; i++)
{
PageDirPae->Pde[KernelPageTableIndex + i].Valid = 1;
PageDirPae->Pde[KernelPageTableIndex + i].Write = 1;
PageDirPae->Pde[KernelPageTableIndex + i].PageFrameNumber = PaPtrToPfn(kernel_pagetable_pae) + i;
}
/* Set up the Startup PDE */
for (i = 0; i < 4; i++)
{
PageDirPae->Pde[StartupPageTableIndexPae + i].Valid = 1;
PageDirPae->Pde[StartupPageTableIndexPae + i].Write = 1;
PageDirPae->Pde[StartupPageTableIndexPae + i].PageFrameNumber = PaPtrToPfn(startup_pagedirectory_pae) + i;
}
/* Set up the Hyperspace PDE */
for (i = 0; i < 2; i++)
{
PageDirPae->Pde[HyperspacePageTableIndexPae + i].Valid = 1;
PageDirPae->Pde[HyperspacePageTableIndexPae + i].Write = 1;
PageDirPae->Pde[HyperspacePageTableIndexPae + i].PageFrameNumber = PaPtrToPfn(hyperspace_pagetable_pae) + i;
}
/* Set up the Apic PDE */
for (i = 0; i < 2; i++)
{
PageDirPae->Pde[ApicPageTableIndexPae + i].Valid = 1;
PageDirPae->Pde[ApicPageTableIndexPae + i].Write = 1;
PageDirPae->Pde[ApicPageTableIndexPae + i].PageFrameNumber = PaPtrToPfn(apic_pagetable_pae) + i;
}
/* Set up the KPCR PDE */
PageDirPae->Pde[KpcrPageTableIndexPae].Valid = 1;
PageDirPae->Pde[KpcrPageTableIndexPae].Write = 1;
PageDirPae->Pde[KpcrPageTableIndexPae].PageFrameNumber = PaPtrToPfn(kpcr_pagetable_pae);
/* Set up Low Memory PTEs */
PageDirPae = (PPAGE_DIRECTORY_X64)&lowmem_pagetable_pae;
for (i=0; i<1024; i++) {
PageDirPae->Pde[i].Valid = 1;
PageDirPae->Pde[i].Write = 1;
PageDirPae->Pde[i].Owner = 1;
PageDirPae->Pde[i].PageFrameNumber = i;
}
/* Set up Kernel PTEs */
PageDirPae = (PPAGE_DIRECTORY_X64)&kernel_pagetable_pae;
for (i=0; i<1536; i++) {
PageDirPae->Pde[i].Valid = 1;
PageDirPae->Pde[i].Write = 1;
PageDirPae->Pde[i].PageFrameNumber = PaToPfn(KERNEL_BASE_PHYS) + i;
}
/* Set up APIC PTEs */
PageDirPae = (PPAGE_DIRECTORY_X64)&apic_pagetable_pae;
PageDirPae->Pde[0].Valid = 1;
PageDirPae->Pde[0].Write = 1;
PageDirPae->Pde[0].CacheDisable = 1;
PageDirPae->Pde[0].WriteThrough = 1;
PageDirPae->Pde[0].PageFrameNumber = PaToPfn(APIC_BASE);
PageDirPae->Pde[0x200].Valid = 1;
PageDirPae->Pde[0x200].Write = 1;
PageDirPae->Pde[0x200].CacheDisable = 1;
PageDirPae->Pde[0x200].WriteThrough = 1;
PageDirPae->Pde[0x200].PageFrameNumber = PaToPfn(APIC_BASE + KERNEL_BASE_PHYS);
/* Set up KPCR PTEs */
PageDirPae = (PPAGE_DIRECTORY_X64)&kpcr_pagetable_pae;
PageDirPae->Pde[0].Valid = 1;
PageDirPae->Pde[0].Write = 1;
PageDirPae->Pde[0].PageFrameNumber = 1;
} else {
/* Get the Kernel Table Index */
KernelPageTableIndex = (KernelBase >> PDE_SHIFT) / sizeof(HARDWARE_PTE_X86);
/* Get the Startup Page Directory */
PageDir = (PPAGE_DIRECTORY_X86)&startup_pagedirectory;
/* Set up the Low Memory PDE */
PageDir->Pde[LowMemPageTableIndex].Valid = 1;
PageDir->Pde[LowMemPageTableIndex].Write = 1;
PageDir->Pde[LowMemPageTableIndex].PageFrameNumber = PaPtrToPfn(lowmem_pagetable);
/* Set up the Kernel PDEs */
PageDir->Pde[KernelPageTableIndex].Valid = 1;
PageDir->Pde[KernelPageTableIndex].Write = 1;
PageDir->Pde[KernelPageTableIndex].PageFrameNumber = PaPtrToPfn(kernel_pagetable);
PageDir->Pde[KernelPageTableIndex + 1].Valid = 1;
PageDir->Pde[KernelPageTableIndex + 1].Write = 1;
PageDir->Pde[KernelPageTableIndex + 1].PageFrameNumber = PaPtrToPfn(kernel_pagetable + 4096);
/* Set up the Startup PDE */
PageDir->Pde[StartupPageTableIndex].Valid = 1;
PageDir->Pde[StartupPageTableIndex].Write = 1;
PageDir->Pde[StartupPageTableIndex].PageFrameNumber = PaPtrToPfn(startup_pagedirectory);
/* Set up the Hyperspace PDE */
PageDir->Pde[HyperspacePageTableIndex].Valid = 1;
PageDir->Pde[HyperspacePageTableIndex].Write = 1;
PageDir->Pde[HyperspacePageTableIndex].PageFrameNumber = PaPtrToPfn(hyperspace_pagetable);
/* Set up the Apic PDE */
PageDir->Pde[ApicPageTableIndex].Valid = 1;
PageDir->Pde[ApicPageTableIndex].Write = 1;
PageDir->Pde[ApicPageTableIndex].PageFrameNumber = PaPtrToPfn(apic_pagetable);
/* Set up the KPCR PDE */
PageDir->Pde[KpcrPageTableIndex].Valid = 1;
PageDir->Pde[KpcrPageTableIndex].Write = 1;
PageDir->Pde[KpcrPageTableIndex].PageFrameNumber = PaPtrToPfn(kpcr_pagetable);
/* Set up Low Memory PTEs */
PageDir = (PPAGE_DIRECTORY_X86)&lowmem_pagetable;
for (i=0; i<1024; i++) {
PageDir->Pde[i].Valid = 1;
PageDir->Pde[i].Write = 1;
PageDir->Pde[i].Owner = 1;
PageDir->Pde[i].PageFrameNumber = PaToPfn(i * PAGE_SIZE);
}
/* Set up Kernel PTEs */
PageDir = (PPAGE_DIRECTORY_X86)&kernel_pagetable;
for (i=0; i<1536; i++) {
PageDir->Pde[i].Valid = 1;
PageDir->Pde[i].Write = 1;
PageDir->Pde[i].PageFrameNumber = PaToPfn(KERNEL_BASE_PHYS + i * PAGE_SIZE);
}
/* Set up APIC PTEs */
PageDir = (PPAGE_DIRECTORY_X86)&apic_pagetable;
PageDir->Pde[0].Valid = 1;
PageDir->Pde[0].Write = 1;
PageDir->Pde[0].CacheDisable = 1;
PageDir->Pde[0].WriteThrough = 1;
PageDir->Pde[0].PageFrameNumber = PaToPfn(APIC_BASE);
PageDir->Pde[0x200].Valid = 1;
PageDir->Pde[0x200].Write = 1;
PageDir->Pde[0x200].CacheDisable = 1;
PageDir->Pde[0x200].WriteThrough = 1;
PageDir->Pde[0x200].PageFrameNumber = PaToPfn(APIC_BASE + KERNEL_BASE_PHYS);
/* Set up KPCR PTEs */
PageDir = (PPAGE_DIRECTORY_X86)&kpcr_pagetable;
PageDir->Pde[0].Valid = 1;
PageDir->Pde[0].Write = 1;
PageDir->Pde[0].PageFrameNumber = 1;
}
return;
}
/*++
* FrLdrMapKernel
* INTERNAL
*
* Maps the Kernel into memory, does PE Section Mapping, initalizes the
* uninitialized data sections, and relocates the image.
*
* Params:
* KernelImage - FILE Structure representing the ntoskrnl image file.
*
* Returns:
* TRUE if the Kernel was mapped.
*
* Remarks:
* None.
*
*--*/
BOOL
STDCALL
FrLdrMapKernel(FILE *KernelImage)
{
PIMAGE_DOS_HEADER ImageHeader;
PIMAGE_NT_HEADERS NtHeader;
PIMAGE_SECTION_HEADER Section;
ULONG SectionCount;
ULONG ImageSize;
ULONG_PTR SourceSection;
ULONG_PTR TargetSection;
ULONG SectionSize;
LONG i;
PIMAGE_DATA_DIRECTORY RelocationDDir;
PIMAGE_BASE_RELOCATION RelocationDir, RelocationEnd;
ULONG Count;
ULONG_PTR Address, MaxAddress;
PUSHORT TypeOffset;
ULONG_PTR Delta;
PUSHORT ShortPtr;
PULONG LongPtr;
/* Allocate 1024 bytes for PE Header */
ImageHeader = (PIMAGE_DOS_HEADER)MmAllocateMemory(1024);
/* Make sure it was succesful */
if (ImageHeader == NULL) {
return FALSE;
}
/* Load the first 1024 bytes of the kernel image so we can read the PE header */
if (!FsReadFile(KernelImage, 1024, NULL, ImageHeader)) {
/* Fail if we couldn't read */
MmFreeMemory(ImageHeader);
return FALSE;
}
/* Now read the MZ header to get the offset to the PE Header */
NtHeader = (PIMAGE_NT_HEADERS)((PCHAR)ImageHeader + ImageHeader->e_lfanew);
/* Get Kernel Base */
KernelBase = NtHeader->OptionalHeader.ImageBase;
FrLdrGetKernelBase();
/* Save Entrypoint */
KernelEntry = RaToPa(NtHeader->OptionalHeader.AddressOfEntryPoint);
/* Save the Image Size */
ImageSize = NtHeader->OptionalHeader.SizeOfImage;
/* Free the Header */
MmFreeMemory(ImageHeader);
/* Set the file pointer to zero */
FsSetFilePointer(KernelImage, 0);
/* Load the file image */
FsReadFile(KernelImage, ImageSize, NULL, (PVOID)KERNEL_BASE_PHYS);
/* Reload the NT Header */
NtHeader = (PIMAGE_NT_HEADERS)((PCHAR)KERNEL_BASE_PHYS + ImageHeader->e_lfanew);
/* Load the first section */
Section = IMAGE_FIRST_SECTION(NtHeader);
SectionCount = NtHeader->FileHeader.NumberOfSections - 1;
/* Now go to the last section */
Section += SectionCount;
/* Walk each section backwards */
for (i=SectionCount; i >= 0; i--, Section--) {
/* Get the disk location and the memory location, and the size */
SourceSection = RaToPa(Section->PointerToRawData);
TargetSection = RaToPa(Section->VirtualAddress);
SectionSize = Section->SizeOfRawData;
/* If the section is already mapped correctly, go to the next */
if (SourceSection == TargetSection) continue;
/* Load it into memory */
memmove((PVOID)TargetSection, (PVOID)SourceSection, SectionSize);
/* Check for unitilizated data */
if (Section->SizeOfRawData < Section->Misc.VirtualSize) {
/* Zero it out */
memset((PVOID)RaToPa(Section->VirtualAddress + Section->SizeOfRawData),
0,
Section->Misc.VirtualSize - Section->SizeOfRawData);
}
}
/* Get the Relocation Data Directory */
RelocationDDir = &NtHeader->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC];
/* Get the Relocation Section Start and End*/
RelocationDir = (PIMAGE_BASE_RELOCATION)(KERNEL_BASE_PHYS + RelocationDDir->VirtualAddress);
RelocationEnd = (PIMAGE_BASE_RELOCATION)((ULONG_PTR)RelocationDir + RelocationDDir->Size);
/* Calculate Difference between Real Base and Compiled Base*/
Delta = KernelBase - NtHeader->OptionalHeader.ImageBase;;
/* Determine how far we shoudl relocate */
MaxAddress = KERNEL_BASE_PHYS + ImageSize;
/* Relocate until we've processed all the blocks */
while (RelocationDir < RelocationEnd && RelocationDir->SizeOfBlock > 0) {
/* See how many Relocation Blocks we have */
Count = (RelocationDir->SizeOfBlock - sizeof(IMAGE_BASE_RELOCATION)) / sizeof(USHORT);
/* Calculate the Address of this Directory */
Address = KERNEL_BASE_PHYS + RelocationDir->VirtualAddress;
/* Calculate the Offset of the Type */
TypeOffset = (PUSHORT)(RelocationDir + 1);
for (i = 0; i < Count; i++) {
ShortPtr = (PUSHORT)(Address + (*TypeOffset & 0xFFF));
/* Don't relocate after the end of the loaded driver */
if ((ULONG_PTR)ShortPtr >= MaxAddress) break;
switch (*TypeOffset >> 12) {
case IMAGE_REL_BASED_ABSOLUTE:
break;
case IMAGE_REL_BASED_HIGH:
*ShortPtr += HIWORD(Delta);
break;
case IMAGE_REL_BASED_LOW:
*ShortPtr += LOWORD(Delta);
break;
case IMAGE_REL_BASED_HIGHLOW:
LongPtr = (PULONG)ShortPtr;
*LongPtr += Delta;
break;
}
TypeOffset++;
}
/* Move to the next Relocation Table */
RelocationDir = (PIMAGE_BASE_RELOCATION)((ULONG_PTR)RelocationDir + RelocationDir->SizeOfBlock);
}
/* Increase the next Load Base */
NextModuleBase = ROUND_UP(KERNEL_BASE_PHYS + ImageSize, PAGE_SIZE);
/* Return Success */
return TRUE;
}
ULONG_PTR
STDCALL
FrLdrLoadModule(FILE *ModuleImage,
LPSTR ModuleName,
PULONG ModuleSize)
{
ULONG LocalModuleSize;
PFRLDR_MODULE ModuleData;
LPSTR NameBuffer;
LPSTR TempName;
/* Get current module data structure and module name string array */
ModuleData = &multiboot_modules[LoaderBlock.ModsCount];
/* Get only the Module Name */
do {
TempName = strchr(ModuleName, '\\');
if(TempName) {
ModuleName = TempName + 1;
}
} while(TempName);
NameBuffer = multiboot_module_strings[LoaderBlock.ModsCount];
/* Get Module Size */
LocalModuleSize = FsGetFileSize(ModuleImage);
/* Fill out Module Data Structure */
ModuleData->ModuleStart = NextModuleBase;
ModuleData->ModuleEnd = NextModuleBase + LocalModuleSize;
/* Save name */
strcpy(NameBuffer, ModuleName);
ModuleData->ModuleName = NameBuffer;
/* Load the file image */
FsReadFile(ModuleImage, LocalModuleSize, NULL, (PVOID)NextModuleBase);
/* Move to next memory block and increase Module Count */
NextModuleBase = ROUND_UP(ModuleData->ModuleEnd, PAGE_SIZE);
LoaderBlock.ModsCount++;
/* Return Module Size if required */
if (ModuleSize != NULL) {
*ModuleSize = LocalModuleSize;
}
return(ModuleData->ModuleStart);
}
ULONG_PTR
STDCALL
FrLdrCreateModule(LPSTR ModuleName)
{
PFRLDR_MODULE ModuleData;
LPSTR NameBuffer;
/* Get current module data structure and module name string array */
ModuleData = &multiboot_modules[LoaderBlock.ModsCount];
NameBuffer = multiboot_module_strings[LoaderBlock.ModsCount];
/* Set up the structure */
ModuleData->ModuleStart = NextModuleBase;
ModuleData->ModuleEnd = -1;
/* Copy the name */
strcpy(NameBuffer, ModuleName);
ModuleData->ModuleName = NameBuffer;
/* Set the current Module */
CurrentModule = ModuleData;
/* Return Module Base Address */
return(ModuleData->ModuleStart);
}
BOOL
STDCALL
FrLdrCloseModule(ULONG_PTR ModuleBase,
ULONG ModuleSize)
{
PFRLDR_MODULE ModuleData = CurrentModule;
/* Make sure a module is opened */
if (ModuleData) {
/* Make sure this is the right module and that it hasn't been closed */
if ((ModuleBase == ModuleData->ModuleStart) && (ModuleData->ModuleEnd == -1)) {
/* Close the Module */
ModuleData->ModuleEnd = ModuleData->ModuleStart + ModuleSize;
/* Set the next Module Base and increase the number of modules */
NextModuleBase = ROUND_UP(ModuleData->ModuleEnd, PAGE_SIZE);
LoaderBlock.ModsCount++;
/* Close the currently opened module */
CurrentModule = NULL;
/* Success */
return(TRUE);
}
}
/* Failure path */
return(FALSE);
}

View File

@@ -1,541 +0,0 @@
/* $Id:
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Serial enumerator driver
* FILE: drivers/bus/serenum/detect.c
* PURPOSE: Detection of serial devices
*
* PROGRAMMERS: Jason Filby (jasonfilby@yahoo.com)
* Filip Navara (xnavara@volny.cz)
* Herv<72> Poussineau (hpoussin@reactos.com)
*/
#define NDEBUG
#include "serenum.h"
static NTSTATUS
SerenumDeviceIoControl(
IN PDEVICE_OBJECT DeviceObject,
IN ULONG CtlCode,
IN PVOID InputBuffer OPTIONAL,
IN ULONG InputBufferSize,
IN OUT PVOID OutputBuffer OPTIONAL,
IN OUT PULONG OutputBufferSize)
{
KEVENT Event;
PIRP Irp;
IO_STATUS_BLOCK IoStatus;
NTSTATUS Status;
KeInitializeEvent (&Event, NotificationEvent, FALSE);
Irp = IoBuildDeviceIoControlRequest(CtlCode,
DeviceObject,
InputBuffer,
InputBufferSize,
OutputBuffer,
(OutputBufferSize) ? *OutputBufferSize : 0,
FALSE,
&Event,
&IoStatus);
if (Irp == NULL)
{
DPRINT("Serenum: IoBuildDeviceIoControlRequest() failed\n");
return STATUS_INSUFFICIENT_RESOURCES;
}
Status = IoCallDriver(DeviceObject, Irp);
if (Status == STATUS_PENDING)
{
DPRINT("Serenum: Operation pending\n");
KeWaitForSingleObject(&Event, Suspended, KernelMode, FALSE, NULL);
Status = IoStatus.Status;
}
if (OutputBufferSize)
{
*OutputBufferSize = IoStatus.Information;
}
return Status;
}
static NTSTATUS
ReadBytes(
IN PDEVICE_OBJECT LowerDevice,
OUT PUCHAR Buffer,
IN ULONG BufferSize,
OUT PULONG FilledBytes)
{
PIRP Irp;
IO_STATUS_BLOCK ioStatus;
KEVENT event;
NTSTATUS Status;
KeInitializeEvent(&event, NotificationEvent, FALSE);
Irp = IoBuildSynchronousFsdRequest(
IRP_MJ_READ,
LowerDevice,
Buffer, BufferSize,
0,
&event,
&ioStatus);
if (!Irp)
return FALSE;
Status = IoCallDriver(LowerDevice, Irp);
if (Status == STATUS_PENDING)
{
KeWaitForSingleObject(&event, Suspended, KernelMode, FALSE, NULL);
Status = ioStatus.Status;
}
DPRINT("Serenum: bytes received: %lu/%lu\n",
ioStatus.Information, BufferSize);
*FilledBytes = ioStatus.Information;
return Status;
}
static NTSTATUS
ReportDetectedDevice(
IN PDEVICE_OBJECT DeviceObject,
IN PUNICODE_STRING DeviceDescription,
IN PUNICODE_STRING DeviceId,
IN PUNICODE_STRING HardwareIds,
IN PUNICODE_STRING CompatibleIds)
{
PDEVICE_OBJECT Pdo = NULL;
PPDO_DEVICE_EXTENSION PdoDeviceExtension = NULL;
PFDO_DEVICE_EXTENSION FdoDeviceExtension;
NTSTATUS Status;
DPRINT("Serenum: SerenumReportDetectedDevice() called with %wZ (%wZ) detected\n", DeviceId, DeviceDescription);
Status = IoCreateDevice(
DeviceObject->DriverObject,
sizeof(PDO_DEVICE_EXTENSION),
NULL,
FILE_DEVICE_CONTROLLER,
FILE_AUTOGENERATED_DEVICE_NAME,
FALSE,
&Pdo);
if (!NT_SUCCESS(Status)) goto ByeBye;
Pdo->Flags |= DO_BUS_ENUMERATED_DEVICE;
Pdo->Flags |= DO_POWER_PAGABLE;
PdoDeviceExtension = (PPDO_DEVICE_EXTENSION)Pdo->DeviceExtension;
FdoDeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
RtlZeroMemory(PdoDeviceExtension, sizeof(PDO_DEVICE_EXTENSION));
PdoDeviceExtension->Common.IsFDO = FALSE;
Status = SerenumDuplicateUnicodeString(&PdoDeviceExtension->DeviceDescription, DeviceDescription, PagedPool);
if (!NT_SUCCESS(Status)) goto ByeBye;
Status = SerenumDuplicateUnicodeString(&PdoDeviceExtension->DeviceId, DeviceId, PagedPool);
if (!NT_SUCCESS(Status)) goto ByeBye;
Status = SerenumDuplicateUnicodeString(&PdoDeviceExtension->HardwareIds, HardwareIds, PagedPool);
if (!NT_SUCCESS(Status)) goto ByeBye;
Status = SerenumDuplicateUnicodeString(&PdoDeviceExtension->CompatibleIds, CompatibleIds, PagedPool);
if (!NT_SUCCESS(Status)) goto ByeBye;
/* Device attached to serial port (Pdo) may delegate work to
* serial port stack (Fdo = DeviceObject variable) */
Pdo->StackSize = DeviceObject->StackSize + 1;
FdoDeviceExtension->AttachedPdo = Pdo;
PdoDeviceExtension->AttachedFdo = DeviceObject;
Pdo->Flags |= DO_BUFFERED_IO;
Pdo->Flags &= ~DO_DEVICE_INITIALIZING;
return STATUS_SUCCESS;
ByeBye:
if (Pdo)
{
if (PdoDeviceExtension->DeviceDescription.Buffer)
RtlFreeUnicodeString(&PdoDeviceExtension->DeviceDescription);
if (PdoDeviceExtension->DeviceId.Buffer)
RtlFreeUnicodeString(&PdoDeviceExtension->DeviceId);
if (PdoDeviceExtension->HardwareIds.Buffer)
RtlFreeUnicodeString(&PdoDeviceExtension->HardwareIds);
if (PdoDeviceExtension->CompatibleIds.Buffer)
RtlFreeUnicodeString(&PdoDeviceExtension->CompatibleIds);
IoDeleteDevice(Pdo);
}
return Status;
}
static BOOLEAN
SerenumIsValidPnpIdString(
IN PUCHAR Buffer,
IN ULONG BufferLength)
{
/* FIXME: SerenumIsValidPnpIdString not implemented */
DPRINT1("Serenum: SerenumIsValidPnpIdString() unimplemented\n");
return STATUS_SUCCESS;
}
static NTSTATUS
ReportDetectedPnpDevice(
IN PUCHAR Buffer,
IN ULONG BufferLength)
{
ULONG i;
/* FIXME: ReportDetectedPnpDevice not implemented */
DPRINT1("Serenum: ReportDetectedPnpDevice() unimplemented\n");
DPRINT1("");
for (i = 0; i < BufferLength; i++)
DbgPrint("%c", Buffer[i]);
DbgPrint("\n");
/* Call ReportDetectedDevice */
return STATUS_SUCCESS;
}
#define BEGIN_ID '('
#define END_ID ')'
static NTSTATUS
SerenumWait(ULONG milliseconds)
{
KTIMER Timer;
LARGE_INTEGER DueTime;
DueTime.QuadPart = milliseconds * -10;
KeInitializeTimer(&Timer);
KeSetTimer(&Timer, DueTime, NULL);
return KeWaitForSingleObject(&Timer, Executive, KernelMode, FALSE, NULL);
}
NTSTATUS
SerenumDetectPnpDevice(
IN PDEVICE_OBJECT DeviceObject,
IN PDEVICE_OBJECT LowerDevice)
{
UCHAR Buffer[256];
ULONG BaudRate;
ULONG TotalBytesReceived = 0;
ULONG Size;
ULONG Msr, Purge;
ULONG i;
BOOLEAN BufferContainsBeginId = FALSE;
BOOLEAN BufferContainsEndId = FALSE;
SERIAL_LINE_CONTROL Lcr;
SERIAL_TIMEOUTS Timeouts;
SERIALPERF_STATS PerfStats;
NTSTATUS Status;
/* 1. COM port initialization, check for device enumerate */
CHECKPOINT;
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_CLR_DTR,
NULL, 0, NULL, NULL);
if (!NT_SUCCESS(Status)) return Status;
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_CLR_RTS,
NULL, 0, NULL, NULL);
if (!NT_SUCCESS(Status)) return Status;
SerenumWait(200);
Size = sizeof(Msr);
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_GET_MODEMSTATUS,
NULL, 0, &Msr, &Size);
if (!NT_SUCCESS(Status)) return Status;
if ((Msr & SR_MSR_DSR) == 0) goto SerenumDisconnectIdle;
/* 2. COM port setup, 1st phase */
CHECKPOINT;
BaudRate = SERIAL_BAUD_1200;
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_SET_BAUD_RATE,
&BaudRate, sizeof(BaudRate), NULL, 0);
if (!NT_SUCCESS(Status)) return Status;
Lcr.WordLength = 7;
Lcr.Parity = NO_PARITY;
Lcr.StopBits = STOP_BIT_1;
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_SET_LINE_CONTROL,
&Lcr, sizeof(Lcr), NULL, NULL);
if (!NT_SUCCESS(Status)) return Status;
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_CLR_DTR,
NULL, 0, NULL, NULL);
if (!NT_SUCCESS(Status)) return Status;
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_CLR_RTS,
NULL, 0, NULL, NULL);
if (!NT_SUCCESS(Status)) return Status;
SerenumWait(200);
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_SET_DTR,
NULL, 0, NULL, NULL);
if (!NT_SUCCESS(Status)) return Status;
SerenumWait(200);
/* 3. Wait for response, 1st phase */
CHECKPOINT;
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_SET_RTS,
NULL, 0, NULL, NULL);
if (!NT_SUCCESS(Status)) return Status;
Timeouts.ReadIntervalTimeout = 0;
Timeouts.ReadTotalTimeoutMultiplier = 0;
Timeouts.ReadTotalTimeoutConstant = 200;
Timeouts.WriteTotalTimeoutMultiplier = Timeouts.WriteTotalTimeoutConstant = 0;
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_SET_TIMEOUTS,
&Timeouts, sizeof(Timeouts), NULL, NULL);
if (!NT_SUCCESS(Status)) return Status;
Status = ReadBytes(LowerDevice, Buffer, sizeof(Buffer), &Size);
if (!NT_SUCCESS(Status)) return Status;
if (Size != 0) goto SerenumCollectPnpComDeviceId;
/* 4. COM port setup, 2nd phase */
CHECKPOINT;
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_CLR_DTR,
NULL, 0, NULL, NULL);
if (!NT_SUCCESS(Status)) return Status;
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_CLR_RTS,
NULL, 0, NULL, NULL);
if (!NT_SUCCESS(Status)) return Status;
Purge = SERIAL_PURGE_RXABORT | SERIAL_PURGE_RXCLEAR;
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_PURGE,
&Purge, 0, NULL, NULL);
if (!NT_SUCCESS(Status)) return Status;
SerenumWait(200);
/* 5. Wait for response, 2nd phase */
CHECKPOINT;
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_SET_DTR,
NULL, 0, NULL, NULL);
if (!NT_SUCCESS(Status)) return Status;
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_SET_RTS,
NULL, 0, NULL, NULL);
if (!NT_SUCCESS(Status)) return Status;
Status = ReadBytes(LowerDevice, Buffer, 1, &TotalBytesReceived);
if (!NT_SUCCESS(Status)) return Status;
if (TotalBytesReceived != 0) goto SerenumCollectPnpComDeviceId;
Size = sizeof(Msr);
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_GET_MODEMSTATUS,
NULL, 0, &Msr, &Size);
if (!NT_SUCCESS(Status)) return Status;
if ((Msr & SR_MSR_DSR) == 0) goto SerenumVerifyDisconnect; else goto SerenumConnectIdle;
/* 6. Collect PnP COM device ID */
SerenumCollectPnpComDeviceId:
CHECKPOINT;
Timeouts.ReadIntervalTimeout = 200;
Timeouts.ReadTotalTimeoutMultiplier = 0;
Timeouts.ReadTotalTimeoutConstant = 2200;
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_SET_TIMEOUTS,
&Timeouts, sizeof(Timeouts), NULL, NULL);
if (!NT_SUCCESS(Status)) return Status;
Status = ReadBytes(LowerDevice, &Buffer[TotalBytesReceived], sizeof(Buffer) - TotalBytesReceived, &Size);
if (!NT_SUCCESS(Status)) return Status;
TotalBytesReceived += Size;
Size = sizeof(PerfStats);
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_GET_STATS,
NULL, 0, &PerfStats, &Size);
if (!NT_SUCCESS(Status)) return Status;
if (PerfStats.FrameErrorCount + PerfStats.ParityErrorCount != 0) goto SerenumConnectIdle;
for (i = 0; i < TotalBytesReceived; i++)
{
if (Buffer[i] == BEGIN_ID) BufferContainsBeginId = TRUE;
if (Buffer[i] == END_ID) BufferContainsEndId = TRUE;
}
if (TotalBytesReceived == 1 || BufferContainsEndId)
{
if (SerenumIsValidPnpIdString(Buffer, TotalBytesReceived))
return ReportDetectedPnpDevice(Buffer, TotalBytesReceived);
goto SerenumConnectIdle;
}
if (!BufferContainsBeginId) goto SerenumConnectIdle;
if (!BufferContainsEndId) goto SerenumConnectIdle;
Size = sizeof(Msr);
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_GET_MODEMSTATUS,
NULL, 0, &Msr, &Size);
if (!NT_SUCCESS(Status)) return Status;
if ((Msr & SR_MSR_DSR) == 0) goto SerenumVerifyDisconnect;
/* 7. Verify disconnect */
SerenumVerifyDisconnect:
CHECKPOINT;
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_SET_DTR,
NULL, 0, NULL, NULL);
if (!NT_SUCCESS(Status)) return Status;
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_CLR_RTS,
NULL, 0, NULL, NULL);
if (!NT_SUCCESS(Status)) return Status;
SerenumWait(5000);
goto SerenumDisconnectIdle;
/* 8. Connect idle */
SerenumConnectIdle:
CHECKPOINT;
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_SET_DTR,
NULL, 0, NULL, NULL);
if (!NT_SUCCESS(Status)) return Status;
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_CLR_RTS,
NULL, 0, NULL, NULL);
if (!NT_SUCCESS(Status)) return Status;
BaudRate = SERIAL_BAUD_300;
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_SET_BAUD_RATE,
&BaudRate, sizeof(BaudRate), NULL, NULL);
if (!NT_SUCCESS(Status)) return Status;
Lcr.WordLength = 7;
Lcr.Parity = NO_PARITY;
Lcr.StopBits = STOP_BIT_1;
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_SET_LINE_CONTROL,
&Lcr, sizeof(Lcr), NULL, NULL);
if (!NT_SUCCESS(Status)) return Status;
if (TotalBytesReceived == 0)
return STATUS_DEVICE_NOT_CONNECTED;
else
return STATUS_SUCCESS;
/* 9. Disconnect idle */
SerenumDisconnectIdle:
CHECKPOINT;
/* FIXME: report to OS device removal, if it was present */
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_SET_DTR,
NULL, 0, NULL, NULL);
if (!NT_SUCCESS(Status)) return Status;
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_CLR_RTS,
NULL, 0, NULL, NULL);
if (!NT_SUCCESS(Status)) return Status;
BaudRate = SERIAL_BAUD_300;
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_SET_BAUD_RATE,
&BaudRate, sizeof(BaudRate), NULL, NULL);
if (!NT_SUCCESS(Status)) return Status;
Lcr.WordLength = 7;
Lcr.Parity = NO_PARITY;
Lcr.StopBits = STOP_BIT_1;
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_SET_LINE_CONTROL,
&Lcr, sizeof(Lcr), NULL, NULL);
if (!NT_SUCCESS(Status)) return Status;
return STATUS_DEVICE_NOT_CONNECTED;
}
NTSTATUS
SerenumDetectLegacyDevice(
IN PDEVICE_OBJECT DeviceObject,
IN PDEVICE_OBJECT LowerDevice)
{
ULONG Fcr, Mcr;
ULONG BaudRate;
ULONG Command;
SERIAL_TIMEOUTS Timeouts;
SERIAL_LINE_CONTROL LCR;
ULONG i, Count;
UCHAR Buffer[16];
UNICODE_STRING DeviceDescription;
UNICODE_STRING DeviceId;
UNICODE_STRING HardwareIds;
UNICODE_STRING CompatibleIds;
NTSTATUS Status;
RtlZeroMemory(Buffer, sizeof(Buffer));
/* Reset UART */
CHECKPOINT;
Mcr = 0; /* MCR: DTR/RTS/OUT2 off */
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_SET_MODEM_CONTROL,
&Mcr, sizeof(Mcr), NULL, NULL);
if (!NT_SUCCESS(Status)) return Status;
/* Set communications parameters */
CHECKPOINT;
/* DLAB off */
Fcr = 0;
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_SET_FIFO_CONTROL,
&Fcr, sizeof(Fcr), NULL, NULL);
if (!NT_SUCCESS(Status)) return Status;
/* Set serial port speed */
BaudRate = SERIAL_BAUD_1200;
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_SET_BAUD_RATE,
&BaudRate, sizeof(BaudRate), NULL, NULL);
if (!NT_SUCCESS(Status)) return Status;
/* Set LCR */
LCR.WordLength = 7;
LCR.Parity = NO_PARITY;
LCR.StopBits = STOP_BITS_2;
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_SET_LINE_CONTROL,
&LCR, sizeof(LCR), NULL, NULL);
if (!NT_SUCCESS(Status)) return Status;
/* Flush receive buffer */
CHECKPOINT;
Command = SERIAL_PURGE_RXCLEAR;
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_SET_MODEM_CONTROL,
&Command, sizeof(Command), NULL, NULL);
if (!NT_SUCCESS(Status)) return Status;
/* Wait 100 ms */
SerenumWait(100);
/* Enable DTR/RTS */
CHECKPOINT;
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_SET_DTR,
NULL, 0, NULL, NULL);
if (!NT_SUCCESS(Status)) return Status;
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_SET_RTS,
NULL, 0, NULL, NULL);
if (!NT_SUCCESS(Status)) return Status;
/* Set timeout to 500 microseconds */
CHECKPOINT;
Timeouts.ReadIntervalTimeout = 100;
Timeouts.ReadTotalTimeoutMultiplier = 0;
Timeouts.ReadTotalTimeoutConstant = 500;
Timeouts.WriteTotalTimeoutMultiplier = Timeouts.WriteTotalTimeoutConstant = 0;
Status = SerenumDeviceIoControl(LowerDevice, IOCTL_SERIAL_SET_TIMEOUTS,
&Timeouts, sizeof(Timeouts), NULL, NULL);
if (!NT_SUCCESS(Status)) return Status;
/* Fill the read buffer */
CHECKPOINT;
Status = ReadBytes(LowerDevice, Buffer, sizeof(Buffer)/sizeof(Buffer[0]), &Count);
if (!NT_SUCCESS(Status)) return Status;
for (i = 0; i < Count; i++)
{
if (Buffer[i] == 'B')
{
/* Sign for Microsoft Ballpoint */
/* Hardware id: *PNP0F09
* Compatible id: *PNP0F0F, SERIAL_MOUSE
*/
RtlInitUnicodeString(&DeviceDescription, L"Microsoft Ballpoint device");
RtlInitUnicodeString(&DeviceId, L"*PNP0F09");
SerenumInitMultiSzString(&HardwareIds, "*PNP0F09", NULL);
SerenumInitMultiSzString(&CompatibleIds, "*PNP0F0F", "SERIAL_MOUSE", NULL);
Status = ReportDetectedDevice(DeviceObject,
&DeviceDescription, &DeviceId, &HardwareIds, &CompatibleIds);
RtlFreeUnicodeString(&HardwareIds);
RtlFreeUnicodeString(&CompatibleIds);
return Status;
}
else if (Buffer[i] == 'M')
{
/* Sign for Microsoft Mouse protocol followed by button specifier */
if (i == sizeof(Buffer) - 1)
{
/* Overflow Error */
return STATUS_DEVICE_NOT_CONNECTED;
}
switch (Buffer[i + 1])
{
case '3':
/* Hardware id: *PNP0F08
* Compatible id: SERIAL_MOUSE
*/
RtlInitUnicodeString(&DeviceDescription, L"Microsoft Mouse with 3-buttons");
RtlInitUnicodeString(&DeviceId, L"*PNP0F08");
SerenumInitMultiSzString(&HardwareIds, "*PNP0F08", NULL);
SerenumInitMultiSzString(&CompatibleIds, "SERIAL_MOUSE", NULL);
default:
/* Hardware id: *PNP0F01
* Compatible id: SERIAL_MOUSE
*/
RtlInitUnicodeString(&DeviceDescription, L"Microsoft Mouse with 2-buttons or Microsoft Wheel Mouse");
RtlInitUnicodeString(&DeviceId, L"*PNP0F01");
SerenumInitMultiSzString(&HardwareIds, "*PNP0F01", NULL);
SerenumInitMultiSzString(&CompatibleIds, "SERIAL_MOUSE", NULL);
}
Status = ReportDetectedDevice(DeviceObject,
&DeviceDescription, &DeviceId, &HardwareIds, &CompatibleIds);
RtlFreeUnicodeString(&HardwareIds);
RtlFreeUnicodeString(&CompatibleIds);
return Status;
}
}
return STATUS_DEVICE_NOT_CONNECTED;
}

View File

@@ -1,213 +0,0 @@
/* $Id:
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Serial enumerator driver
* FILE: drivers/bus/serenum/fdo.c
* PURPOSE: IRP_MJ_PNP operations for FDOs
*
* PROGRAMMERS: Herv<72> Poussineau (hpoussin@reactos.com)
*/
#define NDEBUG
#include "serenum.h"
NTSTATUS STDCALL
SerenumAddDevice(
IN PDRIVER_OBJECT DriverObject,
IN PDEVICE_OBJECT Pdo)
{
PDEVICE_OBJECT Fdo;
PFDO_DEVICE_EXTENSION DeviceExtension;
//UNICODE_STRING SymbolicLinkName;
NTSTATUS Status;
DPRINT("Serenum: SerenumAddDevice called. Pdo = %p\n", Pdo);
/* Create new device object */
Status = IoCreateDevice(DriverObject,
sizeof(FDO_DEVICE_EXTENSION),
NULL,
FILE_DEVICE_BUS_EXTENDER,
FILE_DEVICE_SECURE_OPEN,
FALSE,
&Fdo);
if (!NT_SUCCESS(Status))
{
DPRINT("Serenum: IoCreateDevice() failed with status 0x%08lx\n", Status);
return Status;
}
/* Register device interface */
#if 0 /* FIXME: activate */
Status = IoRegisterDeviceInterface(Pdo, &GUID_DEVINTERFACE_SERENUM_BUS_ENUMERATOR, NULL, &SymbolicLinkName);
if (!NT_SUCCESS(Status))
{
DPRINT("Serenum: IoRegisterDeviceInterface() failed with status 0x%08lx\n", Status);
goto ByeBye;
}
DPRINT1("Serenum: IoRegisterDeviceInterface() returned '%wZ'\n", &SymbolicLinkName);
Status = IoSetDeviceInterfaceState(&SymbolicLinkName, TRUE);
if (!NT_SUCCESS(Status))
{
DPRINT("Serenum: IoSetDeviceInterfaceState() failed with status 0x%08lx\n", Status);
goto ByeBye;
}
RtlFreeUnicodeString(&SymbolicLinkName);
#endif
DeviceExtension = (PFDO_DEVICE_EXTENSION)Fdo->DeviceExtension;
RtlZeroMemory(DeviceExtension, sizeof(FDO_DEVICE_EXTENSION));
DeviceExtension->Common.IsFDO = TRUE;
DeviceExtension->Common.PnpState = dsStopped;
DeviceExtension->Pdo = Pdo;
IoInitializeRemoveLock(&DeviceExtension->RemoveLock, SERENUM_TAG, 0, 0);
Fdo->Flags |= DO_POWER_PAGABLE;
Status = IoAttachDeviceToDeviceStackSafe(Fdo, Pdo, &DeviceExtension->LowerDevice);
if (!NT_SUCCESS(Status))
{
DPRINT("Serenum: IoAttachDeviceToDeviceStackSafe() failed with status 0x%08lx\n", Status);
IoDeleteDevice(Fdo);
return Status;
}
Fdo->Flags |= DO_BUFFERED_IO;
Fdo->Flags &= ~DO_DEVICE_INITIALIZING;
return STATUS_SUCCESS;
}
NTSTATUS STDCALL
SerenumFdoStartDevice(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
PCOMMON_DEVICE_EXTENSION DeviceExtension;
DPRINT("Serenum: SerenumFdoStartDevice() called\n");
DeviceExtension = (PCOMMON_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
ASSERT(DeviceExtension->PnpState == dsStopped);
DeviceExtension->PnpState = dsStarted;
return STATUS_SUCCESS;
}
NTSTATUS
SerenumFdoQueryBusRelations(
IN PDEVICE_OBJECT DeviceObject,
OUT PDEVICE_RELATIONS* pDeviceRelations)
{
PFDO_DEVICE_EXTENSION DeviceExtension;
PDEVICE_RELATIONS DeviceRelations;
ULONG NumPDO;
ULONG i;
NTSTATUS Status = STATUS_SUCCESS;
DeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
ASSERT(DeviceExtension->Common.IsFDO);
/* Do enumeration if needed */
if (!(DeviceExtension->Flags & FLAG_ENUMERATION_DONE))
{
ASSERT(DeviceExtension->AttachedPdo == NULL);
/* Detect plug-and-play devices */
Status = SerenumDetectPnpDevice(DeviceObject, DeviceExtension->LowerDevice);
if (Status == STATUS_DEVICE_NOT_CONNECTED)
{
/* Detect legacy devices */
Status = SerenumDetectLegacyDevice(DeviceObject, DeviceExtension->LowerDevice);
if (Status == STATUS_DEVICE_NOT_CONNECTED)
Status = STATUS_SUCCESS;
}
DeviceExtension->Flags |= FLAG_ENUMERATION_DONE;
}
NumPDO = (DeviceExtension->AttachedPdo != NULL ? 1 : 0);
DeviceRelations = (PDEVICE_RELATIONS)ExAllocatePoolWithTag(
PagedPool,
sizeof(DEVICE_RELATIONS) + sizeof(PDEVICE_OBJECT) * (NumPDO - 1),
SERENUM_TAG);
if (!DeviceRelations)
return STATUS_INSUFFICIENT_RESOURCES;
/* Fill returned structure */
DeviceRelations->Count = NumPDO;
for (i = 0; i < NumPDO; i++)
{
ObReferenceObject(DeviceExtension->AttachedPdo);
DeviceRelations->Objects[i] = DeviceExtension->AttachedPdo;
}
*pDeviceRelations = DeviceRelations;
return Status;
}
NTSTATUS
SerenumFdoPnp(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
ULONG MinorFunction;
PIO_STACK_LOCATION Stack;
ULONG_PTR Information = 0;
NTSTATUS Status;
Stack = IoGetCurrentIrpStackLocation(Irp);
MinorFunction = Stack->MinorFunction;
switch (MinorFunction)
{
/* FIXME: do all these minor functions
IRP_MN_QUERY_REMOVE_DEVICE 0x1
IRP_MN_REMOVE_DEVICE 0x2
IRP_MN_CANCEL_REMOVE_DEVICE 0x3
IRP_MN_STOP_DEVICE 0x4
IRP_MN_QUERY_STOP_DEVICE 0x5
IRP_MN_CANCEL_STOP_DEVICE 0x6
IRP_MN_QUERY_DEVICE_RELATIONS / RemovalRelations (optional) 0x7
IRP_MN_QUERY_INTERFACE (optional) 0x8
IRP_MN_QUERY_CAPABILITIES (optional) 0x9
IRP_MN_FILTER_RESOURCE_REQUIREMENTS (optional or required) 0xb
IRP_MN_QUERY_PNP_DEVICE_STATE (optional) 0x14
IRP_MN_DEVICE_USAGE_NOTIFICATION (required or optional) 0x16
IRP_MN_SURPRISE_REMOVAL 0x17
*/
case IRP_MN_START_DEVICE: /* 0x0 */
{
DPRINT("Serenum: IRP_MJ_PNP / IRP_MN_START_DEVICE\n");
/* Call lower driver */
Status = ForwardIrpAndWait(DeviceObject, Irp);
if (NT_SUCCESS(Status))
Status = SerenumFdoStartDevice(DeviceObject, Irp);
break;
}
case IRP_MN_QUERY_DEVICE_RELATIONS: /* 0x7 */
{
switch (Stack->Parameters.QueryDeviceRelations.Type)
{
case BusRelations:
{
PDEVICE_RELATIONS DeviceRelations;
DPRINT("Serenum: IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / BusRelations\n");
Status = SerenumFdoQueryBusRelations(DeviceObject, &DeviceRelations);
Information = (ULONG_PTR)DeviceRelations;
break;
}
default:
DPRINT1("Serenum: IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / Unknown type 0x%lx\n",
Stack->Parameters.QueryDeviceRelations.Type);
return ForwardIrpAndForget(DeviceObject, Irp);
}
break;
}
default:
{
DPRINT1("Serenum: IRP_MJ_PNP / unknown minor function 0x%lx\n", MinorFunction);
return ForwardIrpAndForget(DeviceObject, Irp);
}
}
Irp->IoStatus.Information = Information;
Irp->IoStatus.Status = Status;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return Status;
}

View File

@@ -1,20 +0,0 @@
# $Id: makefile 12852 2005-01-06 13:58:04Z mf $
PATH_TO_TOP = ../../..
TARGET_TYPE = driver
TARGET_NAME = serenum
TARGET_CFLAGS = -Wall -Werror -D__USE_W32API
TARGET_OBJECTS = \
detect.o \
fdo.o \
misc.o \
pdo.o \
serenum.o
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk

View File

@@ -1,210 +0,0 @@
/* $Id:
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Serial enumerator driver
* FILE: drivers/dd/serenum/misc.c
* PURPOSE: Misceallenous operations
*
* PROGRAMMERS: Herv<72> Poussineau (hpoussin@reactos.com)
*/
#define NDEBUG
#include "serenum.h"
#include <stdarg.h>
NTSTATUS
SerenumDuplicateUnicodeString(
OUT PUNICODE_STRING Destination,
IN PUNICODE_STRING Source,
IN POOL_TYPE PoolType)
{
ASSERT(Destination);
if (Source == NULL)
{
RtlInitUnicodeString(Destination, NULL);
return STATUS_SUCCESS;
}
Destination->Buffer = ExAllocatePool(PoolType, Source->MaximumLength);
if (Destination->Buffer == NULL)
{
return STATUS_INSUFFICIENT_RESOURCES;
}
Destination->MaximumLength = Source->MaximumLength;
Destination->Length = Source->Length;
RtlCopyMemory(Destination->Buffer, Source->Buffer, Source->MaximumLength);
return STATUS_SUCCESS;
}
/* I really want ANSI strings as last arguments because
* PnP ids are ANSI-encoded in PnP device string
* identification */
NTSTATUS
SerenumInitMultiSzString(
OUT PUNICODE_STRING Destination,
... /* list of PCSZ */)
{
va_list args;
PCSZ Source;
ANSI_STRING AnsiString;
UNICODE_STRING UnicodeString;
ULONG DestinationSize = 0;
NTSTATUS Status = STATUS_SUCCESS;
ASSERT(Destination);
/* Calculate length needed for destination unicode string */
va_start(args, Destination);
Source = va_arg(args, PCSZ);
while (Source != NULL)
{
RtlInitAnsiString(&AnsiString, Source);
DestinationSize += RtlAnsiStringToUnicodeSize(&AnsiString)
+ sizeof(WCHAR) /* final NULL */;
Source = va_arg(args, PCSZ);
}
va_end(args);
if (DestinationSize == 0)
{
RtlInitUnicodeString(Destination, NULL);
return STATUS_SUCCESS;
}
/* Initialize destination string */
DestinationSize += sizeof(WCHAR); // final NULL
Destination->Buffer = (PWSTR)ExAllocatePoolWithTag(PagedPool, DestinationSize, SERENUM_TAG);
if (!Destination->Buffer)
return STATUS_INSUFFICIENT_RESOURCES;
Destination->Length = 0;
Destination->MaximumLength = (USHORT)DestinationSize;
/* Copy arguments to destination string */
/* Use a temporary unicode string, which buffer is shared with
* destination string, to copy arguments */
UnicodeString.Length = Destination->Length;
UnicodeString.MaximumLength = Destination->MaximumLength;
UnicodeString.Buffer = Destination->Buffer;
va_start(args, Destination);
Source = va_arg(args, PCSZ);
while (Source != NULL)
{
RtlInitAnsiString(&AnsiString, Source);
Status = RtlAnsiStringToUnicodeString(&UnicodeString, &AnsiString, FALSE);
if (!NT_SUCCESS(Status))
{
ExFreePoolWithTag(Destination->Buffer, SERENUM_TAG);
break;
}
Destination->Length += UnicodeString.Length + sizeof(WCHAR);
UnicodeString.MaximumLength -= UnicodeString.Length + sizeof(WCHAR);
UnicodeString.Buffer += UnicodeString.Length / sizeof(WCHAR) + 1;
UnicodeString.Length = 0;
Source = va_arg(args, PCSZ);
}
va_end(args);
if (NT_SUCCESS(Status))
{
/* Finish multi-sz string */
Destination->Buffer[Destination->Length / sizeof(WCHAR)] = L'\0';
Destination->Length += sizeof(WCHAR);
}
return Status;
}
NTSTATUS STDCALL
ForwardIrpAndWaitCompletion(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
IN PVOID Context)
{
if (Irp->PendingReturned)
KeSetEvent((PKEVENT)Context, IO_NO_INCREMENT, FALSE);
return STATUS_MORE_PROCESSING_REQUIRED;
}
NTSTATUS
ForwardIrpAndWait(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
PDEVICE_OBJECT LowerDevice;
KEVENT Event;
NTSTATUS Status;
ASSERT(((PCOMMON_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO);
LowerDevice = ((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->LowerDevice;
ASSERT(LowerDevice);
KeInitializeEvent(&Event, NotificationEvent, FALSE);
IoCopyCurrentIrpStackLocationToNext(Irp);
DPRINT("Serenum: Calling lower device %p [%wZ]\n", LowerDevice, &LowerDevice->DriverObject->DriverName);
IoSetCompletionRoutine(Irp, ForwardIrpAndWaitCompletion, &Event, TRUE, TRUE, TRUE);
Status = IoCallDriver(LowerDevice, Irp);
if (Status == STATUS_PENDING)
{
Status = KeWaitForSingleObject(&Event, Suspended, KernelMode, FALSE, NULL);
if (NT_SUCCESS(Status))
Status = Irp->IoStatus.Status;
}
return Status;
}
NTSTATUS STDCALL
ForwardIrpToLowerDeviceAndForget(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
PFDO_DEVICE_EXTENSION DeviceExtension;
PDEVICE_OBJECT LowerDevice;
DeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
ASSERT(DeviceExtension->Common.IsFDO);
LowerDevice = DeviceExtension->LowerDevice;
ASSERT(LowerDevice);
DPRINT("Serenum: calling lower device 0x%p [%wZ]\n",
LowerDevice, &LowerDevice->DriverObject->DriverName);
IoSkipCurrentIrpStackLocation(Irp);
return IoCallDriver(LowerDevice, Irp);
}
NTSTATUS STDCALL
ForwardIrpToAttachedFdoAndForget(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
PPDO_DEVICE_EXTENSION DeviceExtension;
PDEVICE_OBJECT Fdo;
DeviceExtension = (PPDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
ASSERT(!DeviceExtension->Common.IsFDO);
Fdo = DeviceExtension->AttachedFdo;
ASSERT(Fdo);
DPRINT("Serenum: calling attached Fdo 0x%p [%wZ]\n",
Fdo, &Fdo->DriverObject->DriverName);
IoSkipCurrentIrpStackLocation(Irp);
return IoCallDriver(Fdo, Irp);
}
NTSTATUS STDCALL
ForwardIrpAndForget(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
PDEVICE_OBJECT LowerDevice;
ASSERT(((PCOMMON_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO);
LowerDevice = ((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->LowerDevice;
ASSERT(LowerDevice);
IoSkipCurrentIrpStackLocation(Irp);
return IoCallDriver(LowerDevice, Irp);
}

View File

@@ -1,314 +0,0 @@
/* $Id:
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Serial enumerator driver
* FILE: drivers/bus/serenum/pdo.c
* PURPOSE: IRP_MJ_PNP operations for PDOs
*
* PROGRAMMERS: Herv<72> Poussineau (hpoussin@reactos.com)
*/
#define NDEBUG
#include "serenum.h"
static NTSTATUS
SerenumPdoStartDevice(
IN PDEVICE_OBJECT DeviceObject)
{
PPDO_DEVICE_EXTENSION DeviceExtension;
DeviceExtension = (PPDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
ASSERT(DeviceExtension->Common.PnpState == dsStopped);
DeviceExtension->Common.PnpState = dsStarted;
return STATUS_SUCCESS;
}
static NTSTATUS
SerenumPdoQueryId(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
OUT ULONG_PTR* Information)
{
PPDO_DEVICE_EXTENSION DeviceExtension;
ULONG IdType;
PUNICODE_STRING SourceString;
UNICODE_STRING String;
NTSTATUS Status;
IdType = IoGetCurrentIrpStackLocation(Irp)->Parameters.QueryId.IdType;
DeviceExtension = (PPDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
RtlInitUnicodeString(&String, NULL);
switch (IdType)
{
case BusQueryDeviceID:
{
DPRINT("Serenum: IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryDeviceID\n");
SourceString = &DeviceExtension->DeviceId;
break;
}
case BusQueryHardwareIDs:
{
DPRINT("Serenum: IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryHardwareIDs\n");
SourceString = &DeviceExtension->HardwareIds;
break;
}
case BusQueryCompatibleIDs:
DPRINT("Serenum: IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryCompatibleIDs\n");
SourceString = &DeviceExtension->CompatibleIds;
break;
case BusQueryInstanceID:
{
/* We don't have any instance id to report, and
* this query is optional, so ignore it.
*/
*Information = Irp->IoStatus.Information;
return Irp->IoStatus.Status;
}
default:
DPRINT1("Serenum: IRP_MJ_PNP / IRP_MN_QUERY_ID / unknown query id type 0x%lx\n", IdType);
return STATUS_NOT_SUPPORTED;
}
Status = SerenumDuplicateUnicodeString(
&String,
SourceString,
PagedPool);
*Information = (ULONG_PTR)String.Buffer;
return Status;
}
static NTSTATUS
SerenumPdoQueryDeviceRelations(
IN PDEVICE_OBJECT DeviceObject,
OUT PDEVICE_RELATIONS* pDeviceRelations)
{
PFDO_DEVICE_EXTENSION DeviceExtension;
PDEVICE_RELATIONS DeviceRelations;
DeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
ASSERT(DeviceExtension->Common.IsFDO);
DeviceRelations = (PDEVICE_RELATIONS)ExAllocatePoolWithTag(
PagedPool,
sizeof(DEVICE_RELATIONS),
SERENUM_TAG);
if (!DeviceRelations)
return STATUS_INSUFFICIENT_RESOURCES;
ObReferenceObject(DeviceObject);
DeviceRelations->Count = 1;
DeviceRelations->Objects[0] = DeviceObject;
*pDeviceRelations = DeviceRelations;
return STATUS_SUCCESS;
}
NTSTATUS
SerenumPdoPnp(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
ULONG MinorFunction;
PIO_STACK_LOCATION Stack;
ULONG_PTR Information = 0;
NTSTATUS Status;
Stack = IoGetCurrentIrpStackLocation(Irp);
MinorFunction = Stack->MinorFunction;
switch (MinorFunction)
{
/* FIXME: do all these minor functions
IRP_MN_QUERY_REMOVE_DEVICE 0x1
IRP_MN_REMOVE_DEVICE 0x2
IRP_MN_CANCEL_REMOVE_DEVICE 0x3
IRP_MN_STOP_DEVICE 0x4
IRP_MN_QUERY_STOP_DEVICE 0x5
IRP_MN_CANCEL_STOP_DEVICE 0x6
IRP_MN_QUERY_DEVICE_RELATIONS / EjectionRelations (optional) 0x7
IRP_MN_QUERY_INTERFACE (required or optional) 0x8
IRP_MN_READ_CONFIG (required or optional) 0xf
IRP_MN_WRITE_CONFIG (required or optional) 0x10
IRP_MN_EJECT (required or optional) 0x11
IRP_MN_SET_LOCK (required or optional) 0x12
IRP_MN_QUERY_ID / BusQueryDeviceID 0x13
IRP_MN_QUERY_ID / BusQueryCompatibleIDs (optional) 0x13
IRP_MN_QUERY_ID / BusQueryInstanceID (optional) 0x13
IRP_MN_QUERY_PNP_DEVICE_STATE (optional) 0x14
IRP_MN_DEVICE_USAGE_NOTIFICATION (required or optional) 0x16
IRP_MN_SURPRISE_REMOVAL 0x17
*/
case IRP_MN_START_DEVICE: /* 0x0 */
{
DPRINT("Serenum: IRP_MJ_PNP / IRP_MN_START_DEVICE\n");
Status = SerenumPdoStartDevice(DeviceObject);
break;
}
case IRP_MN_QUERY_DEVICE_RELATIONS: /* 0x7 */
{
switch (Stack->Parameters.QueryDeviceRelations.Type)
{
case RemovalRelations:
{
return ForwardIrpToAttachedFdoAndForget(DeviceObject, Irp);
}
case TargetDeviceRelation:
{
PDEVICE_RELATIONS DeviceRelations;
DPRINT("Serenum: IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / TargetDeviceRelation\n");
Status = SerenumPdoQueryDeviceRelations(DeviceObject, &DeviceRelations);
Information = (ULONG_PTR)DeviceRelations;
break;
}
default:
{
DPRINT1("Serenum: IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / Unknown type 0x%lx\n",
Stack->Parameters.QueryDeviceRelations.Type);
Status = STATUS_NOT_IMPLEMENTED;
break;
}
}
break;
}
case IRP_MN_QUERY_CAPABILITIES: /* 0x9 */
{
PDEVICE_CAPABILITIES DeviceCapabilities;
ULONG i;
DPRINT("Serenum: IRP_MJ_PNP / IRP_MN_QUERY_CAPABILITIES\n");
DeviceCapabilities = (PDEVICE_CAPABILITIES)Stack->Parameters.DeviceCapabilities.Capabilities;
/* FIXME: capabilities can change with connected device */
DeviceCapabilities->LockSupported = FALSE;
DeviceCapabilities->EjectSupported = FALSE;
DeviceCapabilities->Removable = TRUE;
DeviceCapabilities->DockDevice = FALSE;
DeviceCapabilities->UniqueID = FALSE;
DeviceCapabilities->SilentInstall = FALSE;
DeviceCapabilities->RawDeviceOK = TRUE;
DeviceCapabilities->SurpriseRemovalOK = TRUE;
DeviceCapabilities->HardwareDisabled = FALSE; /* FIXME */
//DeviceCapabilities->NoDisplayInUI = FALSE; /* FIXME */
DeviceCapabilities->DeviceState[0] = PowerDeviceD0; /* FIXME */
for (i = 0; i < PowerSystemMaximum; i++)
DeviceCapabilities->DeviceState[i] = PowerDeviceD3; /* FIXME */
//DeviceCapabilities->DeviceWake = PowerDeviceUndefined; /* FIXME */
DeviceCapabilities->D1Latency = 0; /* FIXME */
DeviceCapabilities->D2Latency = 0; /* FIXME */
DeviceCapabilities->D3Latency = 0; /* FIXME */
Status = STATUS_SUCCESS;
break;
}
case IRP_MN_QUERY_RESOURCES: /* 0xa */
{
DPRINT("Serenum: IRP_MJ_PNP / IRP_MN_QUERY_RESOURCES\n");
/* Serial devices don't need resources, except the ones of
* the serial port. This PDO is the serial device PDO, so
* report no resource by not changing Information and
* Status
*/
Information = Irp->IoStatus.Information;
Status = Irp->IoStatus.Status;
break;
}
case IRP_MN_QUERY_RESOURCE_REQUIREMENTS: /* 0xb */
{
DPRINT("Serenum: IRP_MJ_PNP / IRP_MN_QUERY_RESOURCE_REQUIREMENTS\n");
/* Serial devices don't need resources, except the ones of
* the serial port. This PDO is the serial device PDO, so
* report no resource by not changing Information and
* Status
*/
Information = Irp->IoStatus.Information;
Status = Irp->IoStatus.Status;
break;
}
case IRP_MN_QUERY_DEVICE_TEXT: /* 0xc */
{
switch (Stack->Parameters.QueryDeviceText.DeviceTextType)
{
case DeviceTextDescription:
{
PUNICODE_STRING Source;
PWSTR Description;
DPRINT("Serenum: IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_TEXT / DeviceTextDescription\n");
Source = &((PPDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->DeviceDescription;
Description = ExAllocatePool(PagedPool, Source->Length + sizeof(WCHAR));
if (!Description)
Status = STATUS_INSUFFICIENT_RESOURCES;
else
{
RtlCopyMemory(Description, Source->Buffer, Source->Length);
Description[Source->Length / sizeof(WCHAR)] = L'\0';
Information = (ULONG_PTR)Description;
Status = STATUS_SUCCESS;
}
break;
}
case DeviceTextLocationInformation:
{
/* We don't have any text location to report,
* and this query is optional, so ignore it.
*/
Information = Irp->IoStatus.Information;
Status = Irp->IoStatus.Status;
break;
}
default:
{
DPRINT1("Serenum: IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_TEXT / unknown type 0x%lx\n",
Stack->Parameters.QueryDeviceText.DeviceTextType);
Status = STATUS_NOT_SUPPORTED;
}
}
break;
}
case IRP_MN_FILTER_RESOURCE_REQUIREMENTS: /* 0xd */
{
return ForwardIrpToAttachedFdoAndForget(DeviceObject, Irp);
}
case IRP_MN_QUERY_ID: /* 0x13 */
{
Status = SerenumPdoQueryId(DeviceObject, Irp, &Information);
break;
}
case IRP_MN_QUERY_BUS_INFORMATION: /* 0x15 */
{
PPNP_BUS_INFORMATION BusInfo;
DPRINT("Serenum: IRP_MJ_PNP / IRP_MN_QUERY_BUS_INFORMATION\n");
BusInfo = (PPNP_BUS_INFORMATION)ExAllocatePool(PagedPool, sizeof(PNP_BUS_INFORMATION));
if (!BusInfo)
Status = STATUS_INSUFFICIENT_RESOURCES;
else
{
BusInfo->BusTypeGuid = GUID_BUS_TYPE_SERENUM;
/* FIXME: real value should be PNPBus, but PNPBus seems to be
* the only value in INTERFACE_TYPE enum that doesn't work...
*/
BusInfo->LegacyBusType = PNPISABus;
/* We're the only serial bus enumerator on the computer */
BusInfo->BusNumber = 0;
Information = (ULONG_PTR)BusInfo;
Status = STATUS_SUCCESS;
}
break;
}
default:
{
/* We can't forward request to the lower driver, because
* we are a Pdo, so we don't have lower driver... */
DPRINT1("Serenum: IRP_MJ_PNP / unknown minor function 0x%lx\n", MinorFunction);
Information = Irp->IoStatus.Information;
Status = Irp->IoStatus.Status;
}
}
Irp->IoStatus.Information = Information;
Irp->IoStatus.Status = Status;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return Status;
}

View File

@@ -1,112 +0,0 @@
/* $Id:
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Serial enumerator driver
* FILE: drivers/bus/serenum/serenum.c
* PURPOSE: Serial enumeration driver entry point
*
* PROGRAMMERS: Herv<72> Poussineau (hpoussin@reactos.com)
*/
//#define NDEBUG
#define INITGUID
#include "serenum.h"
NTSTATUS STDCALL
SerenumPnp(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
if (((PCOMMON_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO)
return SerenumFdoPnp(DeviceObject, Irp);
else
return SerenumPdoPnp(DeviceObject, Irp);
}
VOID STDCALL
DriverUnload(IN PDRIVER_OBJECT DriverObject)
{
// nothing to do here yet
}
NTSTATUS STDCALL
IrpStub(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
NTSTATUS Status = STATUS_NOT_SUPPORTED;
if (((PCOMMON_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO)
{
/* Forward some IRPs to lower device */
switch (IoGetCurrentIrpStackLocation(Irp)->MajorFunction)
{
case IRP_MJ_CREATE:
case IRP_MJ_CLOSE:
case IRP_MJ_CLEANUP:
case IRP_MJ_READ:
case IRP_MJ_WRITE:
case IRP_MJ_DEVICE_CONTROL:
return ForwardIrpToLowerDeviceAndForget(DeviceObject, Irp);
default:
{
DPRINT1("Serenum: FDO stub for major function 0x%lx\n",
IoGetCurrentIrpStackLocation(Irp)->MajorFunction);
#ifndef NDEBUG
DbgBreakPoint();
#endif
Status = Irp->IoStatus.Status;
}
}
}
else
{
/* Forward some IRPs to attached FDO */
switch (IoGetCurrentIrpStackLocation(Irp)->MajorFunction)
{
case IRP_MJ_CREATE:
case IRP_MJ_CLOSE:
case IRP_MJ_CLEANUP:
case IRP_MJ_READ:
case IRP_MJ_WRITE:
case IRP_MJ_DEVICE_CONTROL:
return ForwardIrpToAttachedFdoAndForget(DeviceObject, Irp);
default:
{
DPRINT1("Serenum: PDO stub for major function 0x%lx\n",
IoGetCurrentIrpStackLocation(Irp)->MajorFunction);
#ifndef NDEBUG
DbgBreakPoint();
#endif
Status = Irp->IoStatus.Status;
}
}
}
Irp->IoStatus.Status = Status;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return Status;
}
/*
* Standard DriverEntry method.
*/
NTSTATUS STDCALL
DriverEntry(
IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegPath)
{
ULONG i;
DriverObject->DriverUnload = DriverUnload;
DriverObject->DriverExtension->AddDevice = SerenumAddDevice;
for (i = 0; i < IRP_MJ_MAXIMUM_FUNCTION; i++)
DriverObject->MajorFunction[i] = IrpStub;
//DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = SerialQueryInformation;
DriverObject->MajorFunction[IRP_MJ_PNP] = SerenumPnp;
//DriverObject->MajorFunction[IRP_MJ_POWER] = SerialPower;
return STATUS_SUCCESS;
}

View File

@@ -1,152 +0,0 @@
#if defined(__GNUC__)
#include <ddk/ntddk.h>
#include <ddk/ntddser.h>
#include <ddk/wdmguid.h>
#include <stdio.h>
#include <debug.h>
#define SR_MSR_DSR 0x20
#define ExFreePoolWithTag(p, tag) ExFreePool(p)
/* FIXME: these prototypes MUST NOT be here! */
NTSTATUS STDCALL
IoAttachDeviceToDeviceStackSafe(
IN PDEVICE_OBJECT SourceDevice,
IN PDEVICE_OBJECT TargetDevice,
OUT PDEVICE_OBJECT *AttachedToDeviceObject);
#elif defined(_MSC_VER)
#include <ntddk.h>
#include <ntddser.h>
#include <c:/progra~1/winddk/inc/ddk/wdm/wxp/wdmguid.h>
#include <stdio.h>
#define STDCALL
#define DPRINT1 DbgPrint("(%s:%d) ", __FILE__, __LINE__), DbgPrint
#define CHECKPOINT1 DbgPrint("(%s:%d)\n")
#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
NTSTATUS STDCALL
IoAttachDeviceToDeviceStackSafe(
IN PDEVICE_OBJECT SourceDevice,
IN PDEVICE_OBJECT TargetDevice,
OUT PDEVICE_OBJECT *AttachedToDeviceObject);
#define DPRINT DPRINT1
#define CHECKPOINT CHECKPOINT1
#define SR_MSR_DSR 0x20
#else
#error Unknown compiler!
#endif
typedef enum
{
dsStopped,
dsStarted,
dsPaused,
dsRemoved,
dsSurpriseRemoved
} SERENUM_DEVICE_STATE;
typedef struct _COMMON_DEVICE_EXTENSION
{
BOOLEAN IsFDO;
SERENUM_DEVICE_STATE PnpState;
} COMMON_DEVICE_EXTENSION, *PCOMMON_DEVICE_EXTENSION;
typedef struct _FDO_DEVICE_EXTENSION
{
COMMON_DEVICE_EXTENSION Common;
PDEVICE_OBJECT LowerDevice;
PDEVICE_OBJECT Pdo;
IO_REMOVE_LOCK RemoveLock;
PDEVICE_OBJECT AttachedPdo;
ULONG Flags;
} FDO_DEVICE_EXTENSION, *PFDO_DEVICE_EXTENSION;
typedef struct _PDO_DEVICE_EXTENSION
{
COMMON_DEVICE_EXTENSION Common;
PDEVICE_OBJECT AttachedFdo;
UNICODE_STRING DeviceDescription; // REG_SZ
UNICODE_STRING DeviceId; // REG_SZ
UNICODE_STRING HardwareIds; // REG_MULTI_SZ
UNICODE_STRING CompatibleIds; // REG_MULTI_SZ
} PDO_DEVICE_EXTENSION, *PPDO_DEVICE_EXTENSION;
#define SERENUM_TAG TAG('S', 'e', 'r', 'e')
/* Flags */
#define FLAG_ENUMERATION_DONE 0x01
/************************************ detect.c */
NTSTATUS
SerenumDetectPnpDevice(
IN PDEVICE_OBJECT DeviceObject,
IN PDEVICE_OBJECT LowerDevice);
NTSTATUS
SerenumDetectLegacyDevice(
IN PDEVICE_OBJECT DeviceObject,
IN PDEVICE_OBJECT LowerDevice);
/************************************ fdo.c */
NTSTATUS STDCALL
SerenumAddDevice(
IN PDRIVER_OBJECT DriverObject,
IN PDEVICE_OBJECT Pdo);
NTSTATUS
SerenumFdoPnp(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);
/************************************ misc.c */
NTSTATUS
SerenumDuplicateUnicodeString(
OUT PUNICODE_STRING Destination,
IN PUNICODE_STRING Source,
IN POOL_TYPE PoolType);
NTSTATUS
SerenumInitMultiSzString(
OUT PUNICODE_STRING Destination,
... /* list of ANSI_STRINGs */);
NTSTATUS
ForwardIrpAndWait(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);
NTSTATUS STDCALL
ForwardIrpToLowerDeviceAndForget(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);
NTSTATUS STDCALL
ForwardIrpToAttachedFdoAndForget(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);
NTSTATUS STDCALL
ForwardIrpAndForget(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);
/************************************ pdo.c */
NTSTATUS
SerenumPdoPnp(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);

View File

@@ -1,7 +0,0 @@
/* $Id$ */
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "Serial port enumerator\0"
#define REACTOS_STR_INTERNAL_NAME "serenum\0"
#define REACTOS_STR_ORIGINAL_FILENAME "serenum.sys\0"
#include <reactos/version.rc>

View File

@@ -1,38 +0,0 @@
/* $Id:
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS VT100 emulator
* FILE: drivers/dd/green/createclose.c
* PURPOSE: IRP_MJ_CREATE, IRP_MJ_CLOSE and IRP_MJ_CLEANUP operations
*
* PROGRAMMERS: Herv<72> Poussineau (hpoussin@reactos.com)
*/
//#define NDEBUG
#include "green.h"
NTSTATUS STDCALL
GreenCreate(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
DPRINT("Green: IRP_MJ_CREATE\n");
Irp->IoStatus.Status = STATUS_SUCCESS;
Irp->IoStatus.Information = 0;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return STATUS_SUCCESS;
}
NTSTATUS STDCALL
GreenClose(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
DPRINT("Green: IRP_MJ_CLOSE\n");
Irp->IoStatus.Status = STATUS_SUCCESS;
Irp->IoStatus.Information = 0;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return STATUS_SUCCESS;
}

View File

@@ -1,65 +0,0 @@
/* $Id:
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS VT100 emulator
* FILE: drivers/dd/green/dispatch.c
* PURPOSE: Dispatch routines
*
* PROGRAMMERS: Herv<72> Poussineau (hpoussin@reactos.com)
*/
#define NDEBUG
#include "green.h"
NTSTATUS STDCALL
GreenDispatch(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
ULONG MajorFunction;
GREEN_DEVICE_TYPE DeviceType;
ULONG_PTR Information;
NTSTATUS Status;
MajorFunction = IoGetCurrentIrpStackLocation(Irp)->MajorFunction;
DeviceType = ((PCOMMON_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->Type;
Information = Irp->IoStatus.Information;
Status = Irp->IoStatus.Status;
DPRINT("Green: Dispatching major function 0x%lx, DeviceType %d\n",
MajorFunction, DeviceType);
if (MajorFunction == IRP_MJ_CREATE && DeviceType == Green)
return GreenCreate(DeviceObject, Irp);
else if (MajorFunction == IRP_MJ_CLOSE && DeviceType == Green)
return GreenClose(DeviceObject, Irp);
else if (MajorFunction == IRP_MJ_INTERNAL_DEVICE_CONTROL && DeviceType == Green)
{
return KeyboardInternalDeviceControl(
((PGREEN_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->Keyboard,
Irp);
}
else if (MajorFunction == IRP_MJ_INTERNAL_DEVICE_CONTROL && DeviceType == Keyboard)
return KeyboardInternalDeviceControl(DeviceObject, Irp);
else if (MajorFunction == IRP_MJ_DEVICE_CONTROL && DeviceType == Green)
{
return ScreenDeviceControl(
((PGREEN_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->Screen,
Irp);
}
else if (MajorFunction == IRP_MJ_DEVICE_CONTROL && DeviceType == Screen)
return ScreenDeviceControl(DeviceObject, Irp);
else if (MajorFunction == IRP_MJ_WRITE && DeviceType == Screen)
return ScreenWrite(DeviceObject, Irp);
else
{
DPRINT1("Green: unknown combination: MajorFunction 0x%lx, DeviceType %d\n",
MajorFunction, DeviceType);
}
Irp->IoStatus.Information = Information;
Irp->IoStatus.Status = Status;
IoCompleteRequest (Irp, IO_NO_INCREMENT);
return Status;
}

View File

@@ -1,44 +0,0 @@
/* $Id:
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS VT100 emulator
* FILE: drivers/dd/green/green.c
* PURPOSE: Driver entry point
*
* PROGRAMMERS: Herv<72> Poussineau (hpoussin@reactos.com)
*/
//#define NDEBUG
#include "green.h"
VOID STDCALL
DriverUnload(IN PDRIVER_OBJECT DriverObject)
{
// nothing to do here yet
}
/*
* Standard DriverEntry method.
*/
NTSTATUS STDCALL
DriverEntry(
IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegPath)
{
ULONG i;
DriverObject->DriverUnload = DriverUnload;
DriverObject->DriverExtension->AddDevice = GreenAddDevice;
for (i = 0; i < IRP_MJ_MAXIMUM_FUNCTION; i++)
DriverObject->MajorFunction[i] = GreenDispatch;
/* keyboard only */
//DriverObject->DriverStartIo = GreenStartIo;
/* keyboard and screen */
DriverObject->MajorFunction[IRP_MJ_CREATE] = GreenCreate;
DriverObject->MajorFunction[IRP_MJ_CLOSE] = GreenClose;
return STATUS_SUCCESS;
}

View File

@@ -1,179 +0,0 @@
#if defined(__GNUC__)
#include <ddk/ntddk.h>
#include <ddk/ntddser.h>
#include <ntos/halfuncs.h>
#include <ddk/ntddblue.h>
#include <ddk/ntddkbd.h> /* should be in kbdmou.h */
#include <debug.h>
/* FIXME: should be in kbdmou.h */
typedef struct _CONNECT_DATA {
PDEVICE_OBJECT ClassDeviceObject;
PVOID ClassService;
} CONNECT_DATA, *PCONNECT_DATA;
/* FIXME: should be in kbdmou.h */
#define IOCTL_INTERNAL_KEYBOARD_CONNECT \
CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0080, METHOD_NEITHER, FILE_ANY_ACCESS)
NTSTATUS STDCALL
ObReferenceObjectByName(PUNICODE_STRING ObjectPath,
ULONG Attributes,
PACCESS_STATE PassedAccessState,
ACCESS_MASK DesiredAccess,
POBJECT_TYPE ObjectType,
KPROCESSOR_MODE AccessMode,
PVOID ParseContext,
PVOID* ObjectPtr);
/* FIXME: should be in kbdmou.h */
typedef VOID (*PSERVICE_CALLBACK_ROUTINE)(PDEVICE_OBJECT, PKEYBOARD_INPUT_DATA, PKEYBOARD_INPUT_DATA, PULONG);
typedef struct _CLASS_INFORMATION
{
PDEVICE_OBJECT DeviceObject;
PVOID CallBack;
} CLASS_INFORMATION, *PCLASS_INFORMATION;
#define KEYBOARD_BUFFER_SIZE 100
#elif defined(_MSC_VER)
#include <ntddk.h>
#include <ntddser.h>
#include <kbdmou.h>
#define STDCALL
#define DPRINT1 DbgPrint("(%s:%d) ", __FILE__, __LINE__), DbgPrint
#define CHECKPOINT1 DbgPrint("(%s:%d)\n", __FILE__, __LINE__)
#define DPRINT DPRINT1
#define CHECKPOINT CHECKPOINT1
#else
#error Unknown compiler!
#endif
typedef enum
{
Green,
Screen,
Keyboard
} GREEN_DEVICE_TYPE;
typedef struct _COMMON_DEVICE_EXTENSION
{
GREEN_DEVICE_TYPE Type;
} COMMON_DEVICE_EXTENSION, *PCOMMON_DEVICE_EXTENSION;
typedef struct _KEYBOARD_DEVICE_EXTENSION
{
COMMON_DEVICE_EXTENSION Common;
PDEVICE_OBJECT Green;
CLASS_INFORMATION ClassInformation;
HANDLE WorkerThreadHandle;
KDPC KeyboardDpc;
ULONG ActiveQueue;
ULONG InputDataCount[2];
KEYBOARD_INPUT_DATA KeyboardInputData[2][KEYBOARD_BUFFER_SIZE];
} KEYBOARD_DEVICE_EXTENSION, *PKEYBOARD_DEVICE_EXTENSION;
typedef struct _SCREEN_DEVICE_EXTENSION
{
COMMON_DEVICE_EXTENSION Common;
PDEVICE_OBJECT Green;
PUCHAR VideoMemory; /* Pointer to video memory */
USHORT CharAttribute; /* Current color attribute */
ULONG Mode;
UCHAR ScanLines; /* Height of a text line */
UCHAR Rows; /* Number of rows */
UCHAR Columns; /* Number of columns */
UCHAR TabWidth;
ULONG LogicalOffset; /* Position of the cursor */
UCHAR SendBuffer[1024];
ULONG SendBufferPosition;
} SCREEN_DEVICE_EXTENSION, *PSCREEN_DEVICE_EXTENSION;
typedef struct _GREEN_DEVICE_EXTENSION
{
COMMON_DEVICE_EXTENSION Common;
PDEVICE_OBJECT Serial;
PDEVICE_OBJECT LowerDevice;
ULONG BaudRate;
SERIAL_LINE_CONTROL LineControl;
SERIAL_TIMEOUTS Timeouts;
PDEVICE_OBJECT Keyboard;
PDEVICE_OBJECT Screen;
} GREEN_DEVICE_EXTENSION, *PGREEN_DEVICE_EXTENSION;
/************************************ createclose.c */
NTSTATUS STDCALL
GreenCreate(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);
NTSTATUS STDCALL
GreenClose(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);
/************************************ dispatch.c */
NTSTATUS STDCALL
GreenDispatch(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);
/************************************ keyboard.c */
NTSTATUS
KeyboardInitialize(
IN PDRIVER_OBJECT DriverObject,
OUT PDEVICE_OBJECT* KeyboardFdo);
NTSTATUS
KeyboardInternalDeviceControl(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);
/************************************ misc.c */
NTSTATUS
GreenDeviceIoControl(
IN PDEVICE_OBJECT DeviceObject,
IN ULONG CtlCode,
IN PVOID InputBuffer OPTIONAL,
IN ULONG InputBufferSize,
IN OUT PVOID OutputBuffer OPTIONAL,
IN OUT PULONG OutputBufferSize);
/************************************ pnp.c */
NTSTATUS STDCALL
GreenAddDevice(
IN PDRIVER_OBJECT DriverObject,
IN PDEVICE_OBJECT Pdo);
/************************************ screen.c */
NTSTATUS
ScreenInitialize(
IN PDRIVER_OBJECT DriverObject,
OUT PDEVICE_OBJECT* ScreenFdo);
NTSTATUS
ScreenWrite(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);
NTSTATUS
ScreenDeviceControl(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);

View File

@@ -1,5 +0,0 @@
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "VT100 Server Driver\0"
#define REACTOS_STR_INTERNAL_NAME "green\0"
#define REACTOS_STR_ORIGINAL_FILENAME "green.sys\0"
#include <reactos/version.rc>

View File

@@ -1,346 +0,0 @@
/* $Id:
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS VT100 emulator
* FILE: drivers/dd/green/keyboard.c
* PURPOSE: Keyboard part of green management
*
* PROGRAMMERS: Herv<72> Poussineau (hpoussin@reactos.com)
*/
#define NDEBUG
#include "green.h"
static BOOLEAN
TranslateCharToScanCodes(
IN PUCHAR InputBuffer,
IN ULONG InputBufferSize,
OUT KEYBOARD_INPUT_DATA* OutputBuffer,
OUT PULONG OutputBufferSize,
OUT PULONG BytesConsumed)
{
BOOLEAN NormalKey = FALSE;
USHORT MakeCode;
if (InputBufferSize == 0)
return FALSE;
switch (*InputBuffer)
{
case 0x1b: MakeCode = 0x01; NormalKey = TRUE; break; /* ESC */
case '1': MakeCode = 0x02; NormalKey = TRUE; break;
case '2': MakeCode = 0x03; NormalKey = TRUE; break;
case '3': MakeCode = 0x04; NormalKey = TRUE; break;
case '4': MakeCode = 0x05; NormalKey = TRUE; break;
case '5': MakeCode = 0x06; NormalKey = TRUE; break;
case '6': MakeCode = 0x07; NormalKey = TRUE; break;
case '7': MakeCode = 0x08; NormalKey = TRUE; break;
case '8': MakeCode = 0x09; NormalKey = TRUE; break;
case '9': MakeCode = 0x0a; NormalKey = TRUE; break;
case '0': MakeCode = 0x0b; NormalKey = TRUE; break;
case '-': MakeCode = 0x0c; NormalKey = TRUE; break;
case '=': MakeCode = 0x0d; NormalKey = TRUE; break;
case '\b': MakeCode = 0x0e; NormalKey = TRUE; break;
case '\t': MakeCode = 0x0f; NormalKey = TRUE; break;
case 'q': MakeCode = 0x10; NormalKey = TRUE; break;
case 'w': MakeCode = 0x11; NormalKey = TRUE; break;
case 'e': MakeCode = 0x12; NormalKey = TRUE; break;
case 'r': MakeCode = 0x13; NormalKey = TRUE; break;
case 't': MakeCode = 0x14; NormalKey = TRUE; break;
case 'y': MakeCode = 0x15; NormalKey = TRUE; break;
case 'u': MakeCode = 0x16; NormalKey = TRUE; break;
case 'i': MakeCode = 0x17; NormalKey = TRUE; break;
case 'o': MakeCode = 0x18; NormalKey = TRUE; break;
case 'p': MakeCode = 0x19; NormalKey = TRUE; break;
case '[': MakeCode = 0x1a; NormalKey = TRUE; break;
case ']': MakeCode = 0x1b; NormalKey = TRUE; break;
case '\r': MakeCode = 0x1c; NormalKey = TRUE; break;
case 'a': MakeCode = 0x1e; NormalKey = TRUE; break;
case 's': MakeCode = 0x1f; NormalKey = TRUE; break;
case 'd': MakeCode = 0x20; NormalKey = TRUE; break;
case 'f': MakeCode = 0x21; NormalKey = TRUE; break;
case 'g': MakeCode = 0x22; NormalKey = TRUE; break;
case 'h': MakeCode = 0x23; NormalKey = TRUE; break;
case 'j': MakeCode = 0x24; NormalKey = TRUE; break;
case 'k': MakeCode = 0x25; NormalKey = TRUE; break;
case 'l': MakeCode = 0x26; NormalKey = TRUE; break;
case ';': MakeCode = 0x27; NormalKey = TRUE; break;
case '\'': MakeCode = 0x28; NormalKey = TRUE; break;
case '`': MakeCode = 0x29; NormalKey = TRUE; break;
case '\\': MakeCode = 0x2b; NormalKey = TRUE; break;
case 'z': MakeCode = 0x2c; NormalKey = TRUE; break;
case 'x': MakeCode = 0x2d; NormalKey = TRUE; break;
case 'c': MakeCode = 0x2e; NormalKey = TRUE; break;
case 'v': MakeCode = 0x2f; NormalKey = TRUE; break;
case 'b': MakeCode = 0x30; NormalKey = TRUE; break;
case 'n': MakeCode = 0x31; NormalKey = TRUE; break;
case 'm': MakeCode = 0x32; NormalKey = TRUE; break;
case ',': MakeCode = 0x33; NormalKey = TRUE; break;
case '.': MakeCode = 0x34; NormalKey = TRUE; break;
case '/': MakeCode = 0x35; NormalKey = TRUE; break;
case ' ': MakeCode = 0x39; NormalKey = TRUE; break;
}
if (NormalKey && *OutputBufferSize >= 2)
{
OutputBuffer[0].MakeCode = MakeCode;
OutputBuffer[0].Flags = KEY_MAKE;
OutputBuffer[1].MakeCode = MakeCode;
OutputBuffer[1].Flags = KEY_BREAK;
*BytesConsumed = 2;
return TRUE;
}
/* Consume strange character by ignoring it */
DPRINT1("Green: strange byte received 0x%02x ('%c')\n",
*InputBuffer, *InputBuffer >= 32 ? *InputBuffer : '.');
*BytesConsumed = 1;
return TRUE;
}
NTSTATUS
KeyboardInitialize(
IN PDRIVER_OBJECT DriverObject,
OUT PDEVICE_OBJECT* KeyboardFdo)
{
PDEVICE_OBJECT Fdo;
PKEYBOARD_DEVICE_EXTENSION DeviceExtension;
UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\Device\\KeyboardClass1");
NTSTATUS Status;
DPRINT("Green: KeyboardInitialize() called\n");
Status = IoCreateDevice(DriverObject,
sizeof(KEYBOARD_DEVICE_EXTENSION),
&DeviceName, /* FIXME: don't hardcode string */
FILE_DEVICE_KEYBOARD,
FILE_DEVICE_SECURE_OPEN,
TRUE,
&Fdo);
if (!NT_SUCCESS(Status))
return Status;
DeviceExtension = (PKEYBOARD_DEVICE_EXTENSION)Fdo->DeviceExtension;
RtlZeroMemory(DeviceExtension, sizeof(KEYBOARD_DEVICE_EXTENSION));
DeviceExtension->Common.Type = Keyboard;
Fdo->Flags |= DO_POWER_PAGABLE | DO_BUFFERED_IO;
Fdo->Flags &= ~DO_DEVICE_INITIALIZING;
*KeyboardFdo = Fdo;
return STATUS_SUCCESS;
}
static VOID STDCALL
KeyboardDpcSendData(
IN PKDPC Dpc,
IN PVOID pDeviceExtension, /* real type PKEYBOARD_DEVICE_EXTENSION */
IN PVOID Unused1,
IN PVOID Unused2)
{
PKEYBOARD_DEVICE_EXTENSION DeviceExtension;
ULONG Queue;
ULONG InputDataConsumed;
DeviceExtension = (PKEYBOARD_DEVICE_EXTENSION)pDeviceExtension;
Queue = DeviceExtension->ActiveQueue % 2;
InterlockedIncrement((PLONG)&DeviceExtension->ActiveQueue);
(*(PSERVICE_CALLBACK_ROUTINE)DeviceExtension->ClassInformation.CallBack)(
DeviceExtension->ClassInformation.DeviceObject,
DeviceExtension->KeyboardInputData[Queue],
&DeviceExtension->KeyboardInputData[Queue][DeviceExtension->InputDataCount[Queue]],
&InputDataConsumed);
DeviceExtension->InputDataCount[Queue] = 0;
}
static VOID STDCALL
KeyboardDeviceWorker(
PVOID Context)
{
PDEVICE_OBJECT DeviceObject;
PKEYBOARD_DEVICE_EXTENSION DeviceExtension;
PGREEN_DEVICE_EXTENSION GreenDeviceExtension;
PDEVICE_OBJECT LowerDevice;
UCHAR Buffer[16]; /* Arbitrary size */
ULONG BufferSize;
PIRP Irp;
IO_STATUS_BLOCK ioStatus;
KEVENT event;
KIRQL OldIrql;
ULONG i, Queue;
ULONG SpaceInQueue;
ULONG BytesConsumed;
PKEYBOARD_INPUT_DATA Input;
NTSTATUS Status;
DPRINT("Green: KeyboardDeviceWorker() called\n");
DeviceObject = (PDEVICE_OBJECT)Context;
DeviceExtension = (PKEYBOARD_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
GreenDeviceExtension = (PGREEN_DEVICE_EXTENSION)DeviceExtension->Green->DeviceExtension;
LowerDevice = GreenDeviceExtension->Serial;
BufferSize = sizeof(Buffer);
/* Initialize device extension */
DeviceExtension->ActiveQueue = 0;
DeviceExtension->InputDataCount[0] = 0;
DeviceExtension->InputDataCount[1] = 0;
KeInitializeDpc(&DeviceExtension->KeyboardDpc, KeyboardDpcSendData, DeviceExtension);
RtlZeroMemory(&DeviceExtension->KeyboardInputData, sizeof(DeviceExtension->KeyboardInputData));
/* main read loop */
while (TRUE)
{
KeInitializeEvent(&event, NotificationEvent, FALSE);
Irp = IoBuildSynchronousFsdRequest(
IRP_MJ_READ,
LowerDevice,
Buffer, BufferSize,
0,
&event,
&ioStatus);
if (!Irp)
{
/* no memory actually, try later */
CHECKPOINT;
KeStallExecutionProcessor(10);
continue;
}
Status = IoCallDriver(LowerDevice, Irp);
if (Status == STATUS_PENDING)
{
KeWaitForSingleObject(&event, Suspended, KernelMode, FALSE, NULL);
Status = ioStatus.Status;
}
if (!NT_SUCCESS(Status))
continue;
/* Read all available data and process */
i = 0;
while (i < ioStatus.Information)
{
Queue = DeviceExtension->ActiveQueue % 2;
Input = &DeviceExtension->KeyboardInputData[Queue][DeviceExtension->InputDataCount[Queue]];
/* Translate current chars to scan codes */
SpaceInQueue = KEYBOARD_BUFFER_SIZE - DeviceExtension->InputDataCount[Queue];
if (TranslateCharToScanCodes(
&Buffer[i], /* input buffer */
ioStatus.Information - i, /* input buffer size */
Input, /* output buffer */
&SpaceInQueue, /* output buffer size */
&BytesConsumed)) /* bytes consumed in input buffer */
{
DPRINT1("Green: got char 0x%02x (%c)\n", Buffer[i], Buffer[i] >= 32 ? Buffer[i] : ' ');
DeviceExtension->InputDataCount[Queue] += BytesConsumed;
/* Send the data to the keyboard class driver */
KeRaiseIrql(DISPATCH_LEVEL, &OldIrql);
KeInsertQueueDpc(&DeviceExtension->KeyboardDpc, NULL, NULL);
KeLowerIrql(OldIrql);
i += BytesConsumed;
}
else
{
/* TranslateCharToScanCodes failed. Possible reasons:
* - not enough bytes in input buffer (escape control code; wait next received bytes)
* - not enough room in output buffer (wait for the Dpc to empty it)
*
* The best way to resolve this is to try later.
*/
i++;
}
}
}
PsTerminateSystemThread(STATUS_SUCCESS);
}
NTSTATUS
KeyboardInternalDeviceControl(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
PIO_STACK_LOCATION Stack;
PKEYBOARD_DEVICE_EXTENSION DeviceExtension;
PGREEN_DEVICE_EXTENSION GreenDeviceExtension;
OBJECT_ATTRIBUTES objectAttributes;
PDEVICE_OBJECT LowerDevice;
NTSTATUS Status;
Stack = IoGetCurrentIrpStackLocation(Irp);
Irp->IoStatus.Information = 0;
DeviceExtension = (PKEYBOARD_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
GreenDeviceExtension = (PGREEN_DEVICE_EXTENSION)DeviceExtension->Green->DeviceExtension;
LowerDevice = GreenDeviceExtension->Serial;
DPRINT1("Green: LowerDevice %p\n", LowerDevice);
switch (Stack->Parameters.DeviceIoControl.IoControlCode)
{
case IOCTL_INTERNAL_KEYBOARD_CONNECT:
{
ULONG Fcr;
DPRINT("Green: IRP_MJ_INTERNAL_DEVICE_CONTROL / IOCTL_INTERNAL_KEYBOARD_CONNECT\n");
if (Stack->Parameters.DeviceIoControl.InputBufferLength < sizeof(CONNECT_DATA))
{
Status = STATUS_INVALID_PARAMETER;
break;
}
DeviceExtension->ClassInformation =
*((PCLASS_INFORMATION)Stack->Parameters.DeviceIoControl.Type3InputBuffer);
/* Initialize serial port */
Fcr = 0;
Status = GreenDeviceIoControl(LowerDevice, IOCTL_SERIAL_SET_FIFO_CONTROL,
&Fcr, sizeof(Fcr), NULL, NULL);
if (!NT_SUCCESS(Status)) break;
/* Set serial port speed */
Status = GreenDeviceIoControl(LowerDevice, IOCTL_SERIAL_SET_BAUD_RATE,
&GreenDeviceExtension->BaudRate, sizeof(GreenDeviceExtension->BaudRate), NULL, NULL);
if (!NT_SUCCESS(Status)) break;
/* Set LCR */
Status = GreenDeviceIoControl(LowerDevice, IOCTL_SERIAL_SET_LINE_CONTROL,
&GreenDeviceExtension->LineControl, sizeof(GreenDeviceExtension->LineControl), NULL, NULL);
if (!NT_SUCCESS(Status)) break;
/* Set timeouts */
Status = GreenDeviceIoControl(LowerDevice, IOCTL_SERIAL_SET_TIMEOUTS,
&GreenDeviceExtension->Timeouts, sizeof(GreenDeviceExtension->Timeouts), NULL, NULL);
if (!NT_SUCCESS(Status)) break;
/* Start read loop */
InitializeObjectAttributes(&objectAttributes, NULL, OBJ_KERNEL_HANDLE, NULL, NULL);
Status = PsCreateSystemThread(
&DeviceExtension->WorkerThreadHandle,
(ACCESS_MASK)0L,
&objectAttributes,
NULL,
NULL,
KeyboardDeviceWorker,
DeviceObject);
break;
}
default:
{
DPRINT("Green: IRP_MJ_INTERNAL_DEVICE_CONTROL / unknown ioctl code 0x%lx\n",
Stack->Parameters.DeviceIoControl.IoControlCode);
Status = STATUS_INVALID_DEVICE_REQUEST;
}
}
Irp->IoStatus.Status = Status;
IoCompleteRequest (Irp, IO_NO_INCREMENT);
return Status;
}

View File

@@ -1,24 +0,0 @@
# $Id:
PATH_TO_TOP = ../../..
TARGET_BOOTSTRAP = yes
TARGET_TYPE = driver
TARGET_NAME = green
TARGET_CFLAGS = -Wall -Werror -D__USE_W32API
TARGET_OBJECTS = \
$(TARGET_NAME).o \
createclose.o \
dispatch.o \
keyboard.o \
misc.o \
pnp.o \
screen.o
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk

View File

@@ -1,60 +0,0 @@
/* $Id:
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS VT100 emulator
* FILE: drivers/dd/green/misc.c
* PURPOSE: Misceallenous operations
*
* PROGRAMMERS: Herv<72> Poussineau (hpoussin@reactos.com)
*/
//#define NDEBUG
#include "green.h"
NTSTATUS
GreenDeviceIoControl(
IN PDEVICE_OBJECT DeviceObject,
IN ULONG CtlCode,
IN PVOID InputBuffer OPTIONAL,
IN ULONG InputBufferSize,
IN OUT PVOID OutputBuffer OPTIONAL,
IN OUT PULONG OutputBufferSize)
{
KEVENT Event;
PIRP Irp;
IO_STATUS_BLOCK IoStatus;
NTSTATUS Status;
KeInitializeEvent (&Event, NotificationEvent, FALSE);
Irp = IoBuildDeviceIoControlRequest(CtlCode,
DeviceObject,
InputBuffer,
InputBufferSize,
OutputBuffer,
(OutputBufferSize) ? *OutputBufferSize : 0,
FALSE,
&Event,
&IoStatus);
if (Irp == NULL)
{
DPRINT("Green: IoBuildDeviceIoControlRequest() failed\n");
return STATUS_INSUFFICIENT_RESOURCES;
}
Status = IoCallDriver(DeviceObject, Irp);
if (Status == STATUS_PENDING)
{
DPRINT("Green: Operation pending\n");
KeWaitForSingleObject(&Event, Suspended, KernelMode, FALSE, NULL);
Status = IoStatus.Status;
}
if (OutputBufferSize)
{
*OutputBufferSize = IoStatus.Information;
}
return Status;
}

View File

@@ -1,87 +0,0 @@
/* $Id:
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS VT100 emulator
* FILE: drivers/dd/green/pnp.c
* PURPOSE: IRP_MJ_PNP operations
*
* PROGRAMMERS: Herv<72> Poussineau (hpoussin@reactos.com)
*/
#define NDEBUG
#include "green.h"
NTSTATUS STDCALL
GreenAddDevice(
IN PDRIVER_OBJECT DriverObject,
IN PDEVICE_OBJECT Pdo)
{
PDEVICE_OBJECT Fdo = NULL;
PGREEN_DEVICE_EXTENSION DeviceExtension;
UNICODE_STRING serialPortName;
NTSTATUS Status;
DPRINT("Green: AddDevice(DriverObject %p, Pdo %p)\n", DriverObject, Pdo);
/* Create green FDO */
Status = IoCreateDevice(DriverObject,
sizeof(GREEN_DEVICE_EXTENSION),
NULL,
FILE_DEVICE_UNKNOWN,
FILE_DEVICE_SECURE_OPEN,
TRUE,
&Fdo);
if (!NT_SUCCESS(Status))
return Status;
DeviceExtension = (PGREEN_DEVICE_EXTENSION)Fdo->DeviceExtension;
RtlZeroMemory(DeviceExtension, sizeof(GREEN_DEVICE_EXTENSION));
DeviceExtension->Common.Type = Green;
Status = KeyboardInitialize(DriverObject, &DeviceExtension->Keyboard);
if (!NT_SUCCESS(Status))
{
IoDeleteDevice(Fdo);
return Status;
}
((PKEYBOARD_DEVICE_EXTENSION)DeviceExtension->Keyboard->DeviceExtension)->Green = Fdo;
Status = ScreenInitialize(DriverObject, &DeviceExtension->Screen);
if (!NT_SUCCESS(Status))
{
IoDeleteDevice(DeviceExtension->Keyboard);
IoDeleteDevice(Fdo);
return Status;
}
((PSCREEN_DEVICE_EXTENSION)DeviceExtension->Screen->DeviceExtension)->Green = Fdo;
/* initialize green Fdo */
DeviceExtension->LowerDevice = IoAttachDeviceToDeviceStack(Fdo, Pdo);
DeviceExtension->LineControl.WordLength = 8;
DeviceExtension->LineControl.Parity = NO_PARITY;
DeviceExtension->LineControl.StopBits = STOP_BIT_1;
DeviceExtension->BaudRate = SERIAL_BAUD_38400;
DeviceExtension->Timeouts.ReadTotalTimeoutConstant = 1; /* not null */
DeviceExtension->Timeouts.ReadIntervalTimeout = INFINITE;
DeviceExtension->Timeouts.ReadTotalTimeoutMultiplier = INFINITE;
DeviceExtension->Timeouts.WriteTotalTimeoutMultiplier = 0; /* FIXME */
DeviceExtension->Timeouts.WriteTotalTimeoutConstant = 0; /* FIXME */
/* open associated serial port */
RtlInitUnicodeString(&serialPortName, L"\\Device\\Serial1"); /* FIXME: don't hardcode string */
Status = ObReferenceObjectByName(
&serialPortName,
OBJ_EXCLUSIVE | OBJ_KERNEL_HANDLE,
NULL,
(ACCESS_MASK)0,
IoDeviceObjectType,
KernelMode,
NULL,
(PVOID*)&DeviceExtension->Serial);
/* FIXME: we never ObDereferenceObject */
Fdo->Flags |= DO_POWER_PAGABLE | DO_BUFFERED_IO;
Fdo->Flags &= ~DO_DEVICE_INITIALIZING;
return Status;
}

View File

@@ -1,544 +0,0 @@
/* $Id:
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS VT100 emulator
* FILE: drivers/dd/green/screen.c
* PURPOSE: Screen part of green management
*
* PROGRAMMERS: Eric Kohl (ekohl@abo.rhein-zeitung.de)
* Art Yerkes
* Herv<72> Poussineau (hpoussin@reactos.com)
*/
#define NDEBUG
#include "green.h"
#include <stdarg.h>
#define ESC ((UCHAR)0x1b)
/* Force a move of the cursor on each printer char.
* Very useful for debug, but it is very slow...
*/
//#define FORCE_POSITION
/* UCHAR is promoted to int when passed through '...',
* so we get int with va_arg and cast them back to UCHAR.
*/
static VOID
AddToSendBuffer(
IN PSCREEN_DEVICE_EXTENSION DeviceExtension,
IN ULONG NumberOfChars,
... /* IN int */)
{
PIRP Irp;
IO_STATUS_BLOCK ioStatus;
va_list args;
PDEVICE_OBJECT SerialDevice;
ULONG SizeLeft;
int CurrentInt;
UCHAR CurrentChar;
NTSTATUS Status;
SizeLeft = sizeof(DeviceExtension->SendBuffer) - DeviceExtension->SendBufferPosition;
if (SizeLeft < NumberOfChars * 2 || NumberOfChars == 0)
{
SerialDevice = ((PGREEN_DEVICE_EXTENSION)DeviceExtension->Green->DeviceExtension)->Serial;
Irp = IoBuildSynchronousFsdRequest(
IRP_MJ_WRITE,
SerialDevice,
DeviceExtension->SendBuffer, DeviceExtension->SendBufferPosition,
NULL, /* StartingOffset */
NULL, /* Event */
&ioStatus);
if (!Irp)
{
DPRINT1("Green: IoBuildSynchronousFsdRequest() failed. Unable to flush output buffer\n");
return;
}
Status = IoCallDriver(SerialDevice, Irp);
if (!NT_SUCCESS(Status) && Status != STATUS_PENDING)
{
DPRINT1("Green: IoCallDriver() failed. Status = 0x%08lx\n", Status);
return;
}
DeviceExtension->SendBufferPosition = 0;
SizeLeft = sizeof(DeviceExtension->SendBuffer);
}
va_start(args, NumberOfChars);
while (NumberOfChars-- > 0)
{
CurrentInt = va_arg(args, int);
if (CurrentInt > 0)
{
CurrentChar = (UCHAR)CurrentInt;
/* Why 0xff chars are printed on a 'dir' ? */
if (CurrentChar == 0xff) CurrentChar = ' ';
DeviceExtension->SendBuffer[DeviceExtension->SendBufferPosition++] = CurrentChar;
SizeLeft--;
}
else if (CurrentInt == 0)
{
DeviceExtension->SendBuffer[DeviceExtension->SendBufferPosition++] = '0';
SizeLeft--;
}
else
{
CurrentInt = -CurrentInt;
ASSERT(CurrentInt < 100);
if (CurrentInt >= 10)
{
DeviceExtension->SendBuffer[DeviceExtension->SendBufferPosition++] =
(CurrentInt / 10) % 10 + '0';
SizeLeft--;
}
DeviceExtension->SendBuffer[DeviceExtension->SendBufferPosition++] =
CurrentInt % 10 + '0';
SizeLeft--;
}
}
va_end(args);
}
NTSTATUS
ScreenInitialize(
IN PDRIVER_OBJECT DriverObject,
OUT PDEVICE_OBJECT* ScreenFdo)
{
PDEVICE_OBJECT Fdo;
PSCREEN_DEVICE_EXTENSION DeviceExtension;
UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\Device\\BlueScreen");
NTSTATUS Status;
DPRINT("Green: ScreenInitialize() called\n");
Status = IoCreateDevice(DriverObject,
sizeof(SCREEN_DEVICE_EXTENSION),
&DeviceName, /* FIXME: don't hardcode string */
FILE_DEVICE_SCREEN,
FILE_DEVICE_SECURE_OPEN,
TRUE,
&Fdo);
if (!NT_SUCCESS(Status))
return Status;
DeviceExtension = (PSCREEN_DEVICE_EXTENSION)Fdo->DeviceExtension;
RtlZeroMemory(DeviceExtension, sizeof(SCREEN_DEVICE_EXTENSION));
DeviceExtension->Common.Type = Screen;
/* initialize screen */
DeviceExtension->Columns = 80;
DeviceExtension->Rows = 25;
DeviceExtension->ScanLines = 16;
DeviceExtension->VideoMemory = (PUCHAR)ExAllocatePool(
PagedPool,
2 * DeviceExtension->Columns * DeviceExtension->Rows * sizeof(UCHAR));
if (!DeviceExtension->VideoMemory)
{
IoDeleteDevice(Fdo);
return STATUS_INSUFFICIENT_RESOURCES;
}
DeviceExtension->TabWidth = 8;
/* more initialization */
DeviceExtension->Mode = ENABLE_PROCESSED_OUTPUT |
ENABLE_WRAP_AT_EOL_OUTPUT;
/* initialize screen at next write */
AddToSendBuffer(DeviceExtension, 2, ESC, 'c'); /* reset device */
AddToSendBuffer(DeviceExtension, 4, ESC, '[', '7', 'l'); /* disable line wrap */
AddToSendBuffer(DeviceExtension, 4, ESC, '[', '3', 'g'); /* clear all tabs */
Fdo->Flags |= DO_POWER_PAGABLE | DO_BUFFERED_IO;
Fdo->Flags &= ~DO_DEVICE_INITIALIZING;
*ScreenFdo = Fdo;
return STATUS_SUCCESS;
}
NTSTATUS
ScreenWrite(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
PIO_STACK_LOCATION Stack;
PUCHAR Buffer;
PSCREEN_DEVICE_EXTENSION DeviceExtension;
PUCHAR VideoMemory; /* FIXME: is it useful? */
ULONG VideoMemorySize; /* FIXME: is it useful? */
ULONG Columns, Rows;
ULONG CursorX, CursorY;
ULONG i, j;
NTSTATUS Status;
DPRINT("Green: IRP_MJ_WRITE\n");
Stack = IoGetCurrentIrpStackLocation (Irp);
Buffer = Irp->UserBuffer;
DeviceExtension = (PSCREEN_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
VideoMemory = DeviceExtension->VideoMemory;
Columns = DeviceExtension->Columns;
Rows = DeviceExtension->Rows;
CursorX = (DeviceExtension->LogicalOffset / 2) % Columns + 1;
CursorY = (DeviceExtension->LogicalOffset / 2) / Columns + 1;
VideoMemorySize = Columns * Rows * 2 * sizeof(UCHAR);
DPRINT1("Y: %lu\n", CursorY);
DPRINT1("Buffer =");
for (i = 0; i < Stack->Parameters.Write.Length; i++)
DbgPrint(" 0x%02x", Buffer[i]);
DbgPrint("\n");
if (!(DeviceExtension->Mode & ENABLE_PROCESSED_OUTPUT))
{
/* raw output mode */
CHECKPOINT;
Irp->IoStatus.Status = STATUS_NOT_SUPPORTED;
IoCompleteRequest (Irp, IO_NO_INCREMENT);
return STATUS_NOT_SUPPORTED;
}
else
{
for (i = 0; i < Stack->Parameters.Write.Length; i++, Buffer++)
{
switch (*Buffer)
{
case '\b':
{
if (CursorX > 1)
{
CursorX--;
AddToSendBuffer(DeviceExtension, 6, ESC, '[', -(int)CursorY, ';', -(int)CursorX, 'H');
AddToSendBuffer(DeviceExtension, 1, ' ');
AddToSendBuffer(DeviceExtension, 6, ESC, '[', -(int)CursorY, ';', -(int)CursorX, 'H');
}
else if (CursorY > 1)
{
CursorX = Columns;
CursorY--;
AddToSendBuffer(DeviceExtension, 6, ESC, '[', -(int)CursorY, ';', -(int)CursorX, 'H');
}
break;
}
case '\n':
{
CursorY++;
CursorX = 1;
AddToSendBuffer(DeviceExtension, 6, ESC, '[', -(int)CursorY, ';', '1', 'H');
break;
}
case '\r':
{
if (CursorX > 1)
{
AddToSendBuffer(DeviceExtension, 4, ESC, '[', -(int)(CursorX-1), 'D');
CursorX = 1;
}
break;
}
case '\t':
{
ULONG Offset = DeviceExtension->TabWidth - (CursorX % DeviceExtension->TabWidth);
for (j = 0; j < Offset; j++)
{
#ifdef FORCE_POSITION
AddToSendBuffer(DeviceExtension, 6, ESC, '[', -(int)CursorY, ';', -(int)CursorX, 'H');
#endif
AddToSendBuffer(DeviceExtension, 1, ' ');
CursorX++;
if (CursorX > Columns)
{
CursorX = 1;
CursorY++;
}
}
break;
}
default:
{
#ifdef FORCE_POSITION
AddToSendBuffer(DeviceExtension, 6, ESC, '[', -(int)CursorY, ';', -(int)CursorX, 'H');
#endif
AddToSendBuffer(DeviceExtension, 1, *Buffer);
CursorX++;
if (CursorX > Columns)
{
CursorX = 1;
DPRINT1("Y: %lu -> %lu\n", CursorY, CursorY + 1);
CursorY++;
AddToSendBuffer(DeviceExtension, 6, ESC, '[', -(int)CursorY, ';', '1', 'H');
}
}
}
if (CursorY > Rows)
{
DPRINT1("Y: %lu -> %lu\n", CursorY, CursorY - 1);
CursorY--;
AddToSendBuffer(DeviceExtension, 2, ESC, 'D');
AddToSendBuffer(DeviceExtension, 6, ESC, '[', -(int)CursorY, ';', -(int)CursorX, 'H');
}
}
}
DeviceExtension->LogicalOffset = ((CursorX-1) + (CursorY-1) * Columns) * 2;
/* flush output buffer */
AddToSendBuffer(DeviceExtension, 0);
Status = STATUS_SUCCESS;
Irp->IoStatus.Status = Status;
IoCompleteRequest (Irp, IO_NO_INCREMENT);
return Status;
}
NTSTATUS
ScreenDeviceControl(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
PIO_STACK_LOCATION Stack;
PSCREEN_DEVICE_EXTENSION DeviceExtension;
NTSTATUS Status;
Stack = IoGetCurrentIrpStackLocation(Irp);
DeviceExtension = (PSCREEN_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
switch (Stack->Parameters.DeviceIoControl.IoControlCode)
{
case IOCTL_CONSOLE_GET_SCREEN_BUFFER_INFO:
{
PCONSOLE_SCREEN_BUFFER_INFO pcsbi;
DPRINT("Green: IRP_MJ_DEVICE_CONTROL / IOCTL_CONSOLE_GET_SCREEN_BUFFER_INFO\n");
pcsbi = (PCONSOLE_SCREEN_BUFFER_INFO)Irp->AssociatedIrp.SystemBuffer;
pcsbi->dwSize.X = DeviceExtension->Columns;
pcsbi->dwSize.Y = DeviceExtension->Rows;
pcsbi->dwCursorPosition.X = (SHORT)(DeviceExtension->LogicalOffset % DeviceExtension->Columns);
pcsbi->dwCursorPosition.Y = (SHORT)(DeviceExtension->LogicalOffset / DeviceExtension->Columns);
pcsbi->wAttributes = DeviceExtension->CharAttribute;
pcsbi->srWindow.Left = 1;
pcsbi->srWindow.Right = DeviceExtension->Columns;
pcsbi->srWindow.Top = 1;
pcsbi->srWindow.Bottom = DeviceExtension->Rows;
pcsbi->dwMaximumWindowSize.X = DeviceExtension->Columns;
pcsbi->dwMaximumWindowSize.Y = DeviceExtension->Rows;
Irp->IoStatus.Information = sizeof(CONSOLE_SCREEN_BUFFER_INFO);
Status = STATUS_SUCCESS;
break;
}
case IOCTL_CONSOLE_SET_SCREEN_BUFFER_INFO:
{
PCONSOLE_SCREEN_BUFFER_INFO pcsbi;
DPRINT("Green: IRP_MJ_DEVICE_CONTROL / IOCTL_CONSOLE_SET_SCREEN_BUFFER_INFO\n");
pcsbi = (PCONSOLE_SCREEN_BUFFER_INFO)Irp->AssociatedIrp.SystemBuffer;
/* FIXME: remove */ { pcsbi->dwCursorPosition.X++; }
/* FIXME: remove */ { pcsbi->dwCursorPosition.Y++; }
ASSERT(pcsbi->dwCursorPosition.X >= 1);
ASSERT(pcsbi->dwCursorPosition.Y >= 1);
ASSERT(pcsbi->dwCursorPosition.X <= DeviceExtension->Columns);
ASSERT(pcsbi->dwCursorPosition.Y <= DeviceExtension->Rows);
DeviceExtension->LogicalOffset = (
(pcsbi->dwCursorPosition.Y-1) * DeviceExtension->Columns +
(pcsbi->dwCursorPosition.X-1)) * 2;
AddToSendBuffer(DeviceExtension, 6, ESC, '[',
-(int)pcsbi->dwCursorPosition.Y, ';',
-(int)pcsbi->dwCursorPosition.X, 'H');
/* flush buffer */
AddToSendBuffer(DeviceExtension, 0);
DeviceExtension->CharAttribute = pcsbi->wAttributes;
Irp->IoStatus.Information = 0;
Status = STATUS_SUCCESS;
break;
}
case IOCTL_CONSOLE_GET_CURSOR_INFO:
{
PCONSOLE_CURSOR_INFO pcci = (PCONSOLE_CURSOR_INFO)Irp->AssociatedIrp.SystemBuffer;
DPRINT("Green: IRP_MJ_DEVICE_CONTROL / IOCTL_CONSOLE_GET_CURSOR_INFO\n");
pcci->dwSize = 1;
pcci->bVisible = TRUE;
Irp->IoStatus.Information = sizeof (CONSOLE_CURSOR_INFO);
Status = STATUS_SUCCESS;
break;
}
case IOCTL_CONSOLE_GET_MODE:
{
PCONSOLE_MODE pcm = (PCONSOLE_MODE)Irp->AssociatedIrp.SystemBuffer;
DPRINT("Green: IRP_MJ_DEVICE_CONTROL / IOCTL_CONSOLE_GET_MODE\n");
pcm->dwMode = DeviceExtension->Mode;
Irp->IoStatus.Information = sizeof(CONSOLE_MODE);
Status = STATUS_SUCCESS;
break;
}
case IOCTL_CONSOLE_SET_MODE:
{
PCONSOLE_MODE pcm = (PCONSOLE_MODE)Irp->AssociatedIrp.SystemBuffer;
DPRINT("Green: IRP_MJ_DEVICE_CONTROL / IOCTL_CONSOLE_SET_MODE\n");
DeviceExtension->Mode = pcm->dwMode;
Irp->IoStatus.Information = 0;
Status = STATUS_SUCCESS;
break;
}
case IOCTL_CONSOLE_FILL_OUTPUT_ATTRIBUTE:
{
DPRINT1("Green: IRP_MJ_DEVICE_CONTROL / IOCTL_CONSOLE_FILL_OUTPUT_ATTRIBUTE\n");
Status = STATUS_NOT_IMPLEMENTED; /* FIXME: IOCTL_CONSOLE_FILL_OUTPUT_ATTRIBUTE */
break;
}
case IOCTL_CONSOLE_READ_OUTPUT_ATTRIBUTE:
{
DPRINT1("Green: IRP_MJ_DEVICE_CONTROL / IOCTL_CONSOLE_READ_OUTPUT_ATTRIBUTE\n");
Status = STATUS_NOT_IMPLEMENTED; /* FIXME: IOCTL_CONSOLE_READ_OUTPUT_ATTRIBUTE */
break;
}
case IOCTL_CONSOLE_WRITE_OUTPUT_ATTRIBUTE:
{
DPRINT1("Green: IRP_MJ_DEVICE_CONTROL / IOCTL_CONSOLE_WRITE_OUTPUT_ATTRIBUTE\n");
Status = STATUS_NOT_IMPLEMENTED; /* FIXME: IOCTL_CONSOLE_WRITE_OUTPUT_ATTRIBUTE */
break;
}
case IOCTL_CONSOLE_SET_TEXT_ATTRIBUTE:
{
DPRINT("Green: IRP_MJ_DEVICE_CONTROL / IOCTL_CONSOLE_SET_TEXT_ATTRIBUTE\n");
DeviceExtension->CharAttribute = (WORD)*(PWORD)Irp->AssociatedIrp.SystemBuffer;
Irp->IoStatus.Information = 0;
Status = STATUS_SUCCESS;
break;
}
case IOCTL_CONSOLE_FILL_OUTPUT_CHARACTER:
{
DPRINT1("Green: IRP_MJ_DEVICE_CONTROL / IOCTL_CONSOLE_FILL_OUTPUT_CHARACTER\n");
Status = STATUS_NOT_IMPLEMENTED; /* FIXME:IOCTL_CONSOLE_FILL_OUTPUT_CHARACTER */
break;
}
case IOCTL_CONSOLE_READ_OUTPUT_CHARACTER:
{
DPRINT1("Green: IRP_MJ_DEVICE_CONTROL / IOCTL_CONSOLE_READ_OUTPUT_CHARACTER\n");
Status = STATUS_NOT_IMPLEMENTED; /* FIXME: IOCTL_CONSOLE_READ_OUTPUT_CHARACTER */
break;
}
case IOCTL_CONSOLE_WRITE_OUTPUT_CHARACTER:
{
DPRINT1("Green: IRP_MJ_DEVICE_CONTROL / IOCTL_CONSOLE_WRITE_OUTPUT_CHARACTER\n");
Status = STATUS_NOT_IMPLEMENTED; /* FIXME: IOCTL_CONSOLE_WRITE_OUTPUT_CHARACTER */
break;
}
case IOCTL_CONSOLE_DRAW:
{
PCONSOLE_DRAW ConsoleDraw;
PUCHAR Video;
ULONG x, y;
BOOLEAN DoOptimization = FALSE;
DPRINT("Green: IRP_MJ_DEVICE_CONTROL / IOCTL_CONSOLE_DRAW\n");
ConsoleDraw = (PCONSOLE_DRAW)MmGetSystemAddressForMdl(Irp->MdlAddress);
/* FIXME: remove */ { ConsoleDraw->X++; ConsoleDraw->CursorX++; }
/* FIXME: remove */ { ConsoleDraw->Y++; ConsoleDraw->CursorY++; }
DPRINT1("%lu %lu %lu %lu\n",
ConsoleDraw->X, ConsoleDraw->Y,
ConsoleDraw->SizeX, ConsoleDraw->SizeY);
ASSERT(ConsoleDraw->X >= 1);
ASSERT(ConsoleDraw->Y >= 1);
ASSERT(ConsoleDraw->X <= DeviceExtension->Columns);
ASSERT(ConsoleDraw->Y <= DeviceExtension->Rows);
ASSERT(ConsoleDraw->X + ConsoleDraw->SizeX >= 1);
ASSERT(ConsoleDraw->Y + ConsoleDraw->SizeY >= 1);
ASSERT(ConsoleDraw->X + ConsoleDraw->SizeX - 1 <= DeviceExtension->Columns);
ASSERT(ConsoleDraw->Y + ConsoleDraw->SizeY - 1 <= DeviceExtension->Rows);
ASSERT(ConsoleDraw->CursorX >= 1);
ASSERT(ConsoleDraw->CursorY >= 1);
ASSERT(ConsoleDraw->CursorX <= DeviceExtension->Columns);
ASSERT(ConsoleDraw->CursorY <= DeviceExtension->Rows);
#if 0
if (ConsoleDraw->X == 1
&& ConsoleDraw->Y == 1
&& ConsoleDraw->SizeX == DeviceExtension->Columns
&& ConsoleDraw->SizeY == DeviceExtension->Rows)
{
CHECKPOINT1;
/* search if we need to clear all screen */
DoOptimization = TRUE;
Video = (PUCHAR)(ConsoleDraw + 1);
x = 0;
while (DoOptimization && x < DeviceExtension->Columns * DeviceExtension->Rows)
{
if (Video[x++] != ' ')
{
CHECKPOINT1;
DoOptimization = FALSE;
}
/*if (Video[x++] != DeviceExtension->CharAttribute) DoOptimization = FALSE; */
}
if (DoOptimization)
{
CHECKPOINT1;
AddToSendBuffer(DeviceExtension, 4, ESC, '[', '2', 'J');
}
}
#endif
/* add here more optimizations if needed */
if (!DoOptimization)
{
for (y = 0; y < ConsoleDraw->SizeY; y++)
{
AddToSendBuffer(DeviceExtension, 6, ESC, '[',
-(int)(ConsoleDraw->Y + y), ';',
-(int)(ConsoleDraw->X), 'H');
Video = (PUCHAR)(ConsoleDraw + 1);
Video = &Video[((ConsoleDraw->Y + y) * DeviceExtension->Columns + ConsoleDraw->X) * 2];
for (x = 0; x < ConsoleDraw->SizeX; x++)
{
AddToSendBuffer(DeviceExtension, 1, Video[x * 2]);
}
}
}
DeviceExtension->LogicalOffset = (
(ConsoleDraw->CursorY-1) * DeviceExtension->Columns +
(ConsoleDraw->CursorX-1)) * 2;
AddToSendBuffer(DeviceExtension, 6, ESC, '[',
-(int)(ConsoleDraw->CursorY), ';',
-(int)(ConsoleDraw->CursorX), 'H');
/* flush buffer */
AddToSendBuffer(DeviceExtension, 0);
Irp->IoStatus.Information = 0;
Status = STATUS_SUCCESS;
break;
}
default:
DPRINT1("Green: IRP_MJ_DEVICE_CONTROL / unknown ioctl code 0x%lx\n",
Stack->Parameters.DeviceIoControl.IoControlCode);
Status = STATUS_NOT_IMPLEMENTED;
}
Irp->IoStatus.Status = Status;
IoCompleteRequest (Irp, IO_NO_INCREMENT);
return Status;
}

View File

@@ -1,318 +0,0 @@
/* $Id:
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/dd/serial/create.c
* PURPOSE: Serial IRP_MJ_READ/IRP_MJ_WRITE operations
*
* PROGRAMMERS: Herv<72> Poussineau (poussine@freesurf.fr)
*/
#define NDEBUG
#include "serial.h"
static PVOID
SerialGetUserBuffer(IN PIRP Irp)
{
ASSERT(Irp);
return Irp->AssociatedIrp.SystemBuffer;
}
static VOID
ReadBytes(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
PWORKITEM_DATA WorkItemData)
{
PSERIAL_DEVICE_EXTENSION DeviceExtension;
PUCHAR ComPortBase;
ULONG Length;
PUCHAR Buffer;
UCHAR ReceivedByte;
KTIMER TotalTimeoutTimer;
KIRQL Irql;
ULONG ObjectCount;
PVOID ObjectsArray[2];
ULONG_PTR Information = 0;
NTSTATUS Status;
ASSERT(DeviceObject);
ASSERT(WorkItemData);
DeviceExtension = (PSERIAL_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
ComPortBase = (PUCHAR)DeviceExtension->BaseAddress;
Length = IoGetCurrentIrpStackLocation(Irp)->Parameters.Read.Length;
Buffer = SerialGetUserBuffer(Irp);
DPRINT("Serial: UseIntervalTimeout = %s, IntervalTimeout = %lu\n",
WorkItemData->UseIntervalTimeout ? "YES" : "NO",
WorkItemData->UseIntervalTimeout ? WorkItemData->IntervalTimeout.QuadPart : 0);
DPRINT("Serial: UseTotalTimeout = %s\n",
WorkItemData->UseTotalTimeout ? "YES" : "NO");
ObjectCount = 1;
ObjectsArray[0] = &DeviceExtension->InputBufferNotEmpty;
if (WorkItemData->UseTotalTimeout)
{
KeInitializeTimer(&TotalTimeoutTimer);
KeSetTimer(&TotalTimeoutTimer, WorkItemData->TotalTimeoutTime, NULL);
ObjectsArray[ObjectCount] = &TotalTimeoutTimer;
ObjectCount++;
}
/* while buffer is not fully filled */
while (Length > 0)
{
/* read already received bytes from buffer */
KeAcquireSpinLock(&DeviceExtension->InputBufferLock, &Irql);
while (!IsCircularBufferEmpty(&DeviceExtension->InputBuffer)
&& Length > 0)
{
PopCircularBufferEntry(&DeviceExtension->InputBuffer, &ReceivedByte);
DPRINT("Serial: reading byte from buffer: 0x%02x\n", ReceivedByte);
Buffer[Information++] = ReceivedByte;
Length--;
}
KeClearEvent(&DeviceExtension->InputBufferNotEmpty);
KeReleaseSpinLock(&DeviceExtension->InputBufferLock, Irql);
if (WorkItemData->DontWait
&& !(WorkItemData->ReadAtLeastOneByte && Information == 0))
{
DPRINT("Serial: buffer empty. Don't wait more bytes\n");
break;
}
Status = KeWaitForMultipleObjects(
ObjectCount,
ObjectsArray,
WaitAny,
Executive,
KernelMode,
FALSE,
(WorkItemData->UseIntervalTimeout && Information > 0) ? &WorkItemData->IntervalTimeout : NULL,
NULL);
if (Status == STATUS_TIMEOUT /* interval timeout */
|| Status == STATUS_WAIT_1) /* total timeout */
{
DPRINT("Serial: timeout when reading bytes. Status = 0x%08lx\n", Status);
break;
}
}
/* stop total timeout timer */
if (WorkItemData->UseTotalTimeout)
KeCancelTimer(&TotalTimeoutTimer);
Irp->IoStatus.Information = Information;
if (Information == 0)
Irp->IoStatus.Status = STATUS_TIMEOUT;
else
Irp->IoStatus.Status = STATUS_SUCCESS;
}
static VOID STDCALL
SerialReadWorkItem(
IN PDEVICE_OBJECT DeviceObject,
IN PVOID pWorkItemData /* real type PWORKITEM_DATA */)
{
PWORKITEM_DATA WorkItemData;
PIRP Irp;
DPRINT("Serial: SerialReadWorkItem() called\n");
WorkItemData = (PWORKITEM_DATA)pWorkItemData;
Irp = WorkItemData->Irp;
ReadBytes(DeviceObject, Irp, WorkItemData);
IoCompleteRequest(Irp, IO_NO_INCREMENT);
IoFreeWorkItem(WorkItemData->IoWorkItem);
ExFreePoolWithTag(pWorkItemData, SERIAL_TAG);
}
NTSTATUS STDCALL
SerialRead(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
PIO_STACK_LOCATION Stack;
PSERIAL_DEVICE_EXTENSION DeviceExtension;
ULONG Length;
PUCHAR Buffer;
PWORKITEM_DATA WorkItemData;
PIO_WORKITEM WorkItem;
NTSTATUS Status;
DPRINT("Serial: IRP_MJ_READ\n");
Stack = IoGetCurrentIrpStackLocation(Irp);
Length = Stack->Parameters.Read.Length;
Buffer = SerialGetUserBuffer(Irp);
DeviceExtension = (PSERIAL_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
if (Stack->Parameters.Read.ByteOffset.QuadPart != 0 || Buffer == NULL)
{
Status = STATUS_INVALID_PARAMETER;
goto ByeBye;
}
if (Length == 0)
{
Status = STATUS_SUCCESS;
goto ByeBye;
}
/* Allocate memory for parameters */
WorkItemData = ExAllocatePoolWithTag(PagedPool, sizeof(WORKITEM_DATA), SERIAL_TAG);
if (!WorkItemData)
{
Status = STATUS_INSUFFICIENT_RESOURCES;
goto ByeBye;
}
RtlZeroMemory(WorkItemData, sizeof(WORKITEM_DATA));
WorkItemData->Irp = Irp;
/* Calculate time outs */
if (DeviceExtension->SerialTimeOuts.ReadIntervalTimeout == INFINITE &&
DeviceExtension->SerialTimeOuts.ReadTotalTimeoutMultiplier == INFINITE &&
DeviceExtension->SerialTimeOuts.ReadTotalTimeoutConstant > 0 &&
DeviceExtension->SerialTimeOuts.ReadTotalTimeoutConstant < INFINITE)
{
/* read at least one byte, and at most bytes already received */
WorkItemData->DontWait = TRUE;
WorkItemData->ReadAtLeastOneByte = TRUE;
}
else if (DeviceExtension->SerialTimeOuts.ReadIntervalTimeout == INFINITE &&
DeviceExtension->SerialTimeOuts.ReadTotalTimeoutConstant == 0 &&
DeviceExtension->SerialTimeOuts.ReadTotalTimeoutMultiplier == 0)
{
/* read only bytes that are already in buffer */
WorkItemData->DontWait = TRUE;
}
else
{
/* use timeouts */
if (DeviceExtension->SerialTimeOuts.ReadIntervalTimeout != 0)
{
WorkItemData->UseIntervalTimeout = TRUE;
WorkItemData->IntervalTimeout.QuadPart = DeviceExtension->SerialTimeOuts.ReadIntervalTimeout;
}
if (DeviceExtension->SerialTimeOuts.ReadTotalTimeoutMultiplier != 0 ||
DeviceExtension->SerialTimeOuts.ReadTotalTimeoutConstant != 0)
{
ULONG TotalTimeout;
LARGE_INTEGER SystemTime;
WorkItemData->UseTotalTimeout = TRUE;
TotalTimeout = DeviceExtension->SerialTimeOuts.ReadTotalTimeoutConstant +
DeviceExtension->SerialTimeOuts.ReadTotalTimeoutMultiplier * Length;
KeQuerySystemTime(&SystemTime);
WorkItemData->TotalTimeoutTime.QuadPart = SystemTime.QuadPart +
TotalTimeout * 10000;
}
}
/* Pend IRP */
WorkItem = IoAllocateWorkItem(DeviceObject);
if (WorkItem)
{
WorkItemData->IoWorkItem = WorkItem;
IoQueueWorkItem(WorkItem, SerialReadWorkItem, DelayedWorkQueue, WorkItemData);
IoMarkIrpPending(Irp);
return STATUS_PENDING;
}
/* insufficient resources, we can't pend the Irp */
CHECKPOINT;
Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock, (PVOID)DeviceExtension->ComPort);
if (!NT_SUCCESS(Status))
{
ExFreePoolWithTag(WorkItemData, SERIAL_TAG);
goto ByeBye;
}
ReadBytes(DeviceObject, Irp, WorkItemData);
Status = Irp->IoStatus.Status;
IoReleaseRemoveLock(&DeviceExtension->RemoveLock, (PVOID)DeviceExtension->ComPort);
ByeBye:
Irp->IoStatus.Status = Status;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return Status;
}
NTSTATUS STDCALL
SerialWrite(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
PIO_STACK_LOCATION Stack;
PSERIAL_DEVICE_EXTENSION DeviceExtension;
ULONG Length;
ULONG_PTR Information = 0;
PUCHAR Buffer;
PUCHAR ComPortBase;
KIRQL Irql;
NTSTATUS Status = STATUS_SUCCESS;
DPRINT("Serial: IRP_MJ_WRITE\n");
/* FIXME: pend operation if possible */
/* FIXME: use write timeouts */
Stack = IoGetCurrentIrpStackLocation(Irp);
Length = Stack->Parameters.Write.Length;
Buffer = SerialGetUserBuffer(Irp);
DeviceExtension = (PSERIAL_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
ComPortBase = (PUCHAR)DeviceExtension->BaseAddress;
if (Stack->Parameters.Write.ByteOffset.QuadPart != 0 || Buffer == NULL)
{
Status = STATUS_INVALID_PARAMETER;
goto ByeBye;
}
Status = IoAcquireRemoveLock(&DeviceExtension->RemoveLock, (PVOID)DeviceExtension->ComPort);
if (!NT_SUCCESS(Status))
goto ByeBye;
/* push bytes into output buffer */
KeAcquireSpinLock(&DeviceExtension->OutputBufferLock, &Irql);
while (Information < Length)
{
Status = PushCircularBufferEntry(&DeviceExtension->OutputBuffer, Buffer[Information]);
if (!NT_SUCCESS(Status))
{
if (Status == STATUS_BUFFER_TOO_SMALL)
{
KeReleaseSpinLock(&DeviceExtension->OutputBufferLock, Irql);
SerialSendByte(NULL, DeviceExtension, NULL, NULL);
KeAcquireSpinLock(&DeviceExtension->OutputBufferLock, &Irql);
continue;
}
else
{
DPRINT("Serial: buffer overrun on COM%lu\n", DeviceExtension->ComPort);
DeviceExtension->SerialPerfStats.BufferOverrunErrorCount++;
break;
}
}
Information++;
}
KeReleaseSpinLock(&DeviceExtension->OutputBufferLock, Irql);
IoReleaseRemoveLock(&DeviceExtension->RemoveLock, (PVOID)DeviceExtension->ComPort);
/* send bytes */
SerialSendByte(NULL, DeviceExtension, NULL, NULL);
ByeBye:
Irp->IoStatus.Information = Information;
Irp->IoStatus.Status = Status;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return Status;
}

View File

@@ -1,765 +0,0 @@
/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/fs/np/rw.c
* PURPOSE: Named pipe filesystem
* PROGRAMMER: David Welch <welch@cwcom.net>
*/
/* INCLUDES ******************************************************************/
#include <ddk/ntddk.h>
#include <rosrtl/minmax.h>
#include "npfs.h"
#define NDEBUG
#include <debug.h>
/* FUNCTIONS *****************************************************************/
#ifndef NDEBUG
VOID HexDump(PUCHAR Buffer, ULONG Length)
{
CHAR Line[65];
UCHAR ch;
const char Hex[] = "0123456789ABCDEF";
int i, j;
DbgPrint("---------------\n");
for (i = 0; i < ROUND_UP(Length, 16); i+= 16)
{
memset(Line, ' ', 64);
Line[64] = 0;
for (j = 0; j < 16 && j + i < Length; j++)
{
ch = Buffer[i + j];
Line[3*j + 0] = Hex[ch >> 4];
Line[3*j + 1] = Hex[ch & 0x0f];
Line[48 + j] = isprint(ch) ? ch : '.';
}
DbgPrint("%s\n", Line);
}
DbgPrint("---------------\n");
}
#endif
static VOID STDCALL
NpfsReadWriteCancelRoutine(IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
PNPFS_CONTEXT Context;
PNPFS_DEVICE_EXTENSION DeviceExt;
PIO_STACK_LOCATION IoStack;
PNPFS_FCB Fcb;
BOOLEAN Complete = FALSE;
DPRINT("NpfsReadWriteCancelRoutine(DeviceObject %x, Irp %x)\n", DeviceObject, Irp);
IoReleaseCancelSpinLock(Irp->CancelIrql);
Context = (PNPFS_CONTEXT)&Irp->Tail.Overlay.DriverContext;
DeviceExt = (PNPFS_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
IoStack = IoGetCurrentIrpStackLocation(Irp);
Fcb = IoStack->FileObject->FsContext;
KeLockMutex(&DeviceExt->PipeListLock);
ExAcquireFastMutex(&Fcb->DataListLock);
switch(IoStack->MajorFunction)
{
case IRP_MJ_READ:
if (Fcb->ReadRequestListHead.Flink != &Context->ListEntry)
{
/* we are not the first in the list, remove an complete us */
RemoveEntryList(&Context->ListEntry);
Complete = TRUE;
}
else
{
KeSetEvent(&Fcb->ReadEvent, IO_NO_INCREMENT, FALSE);
}
break;
default:
KEBUGCHECK(0);
}
ExReleaseFastMutex(&Fcb->DataListLock);
KeUnlockMutex(&DeviceExt->PipeListLock);
if (Complete)
{
Irp->IoStatus.Status = STATUS_CANCELLED;
Irp->IoStatus.Information = 0;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
}
}
static VOID STDCALL
NpfsWaiterThread(PVOID InitContext)
{
PNPFS_THREAD_CONTEXT ThreadContext = (PNPFS_THREAD_CONTEXT) InitContext;
ULONG CurrentCount;
ULONG Count = 0;
PIRP Irp = NULL;
PIRP NextIrp;
NTSTATUS Status;
BOOLEAN Terminate = FALSE;
BOOLEAN Cancel = FALSE;
PIO_STACK_LOCATION IoStack = NULL;
PNPFS_CONTEXT Context;
PNPFS_CONTEXT NextContext;
PNPFS_FCB Fcb;
KeLockMutex(&ThreadContext->DeviceExt->PipeListLock);
while (1)
{
CurrentCount = ThreadContext->Count;
KeUnlockMutex(&ThreadContext->DeviceExt->PipeListLock);
if (Irp)
{
if (Cancel)
{
Irp->IoStatus.Status = STATUS_CANCELLED;
Irp->IoStatus.Information = 0;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
}
else
{
switch (IoStack->MajorFunction)
{
case IRP_MJ_READ:
NpfsRead(IoStack->DeviceObject, Irp);
break;
default:
KEBUGCHECK(0);
}
}
}
if (Terminate)
{
break;
}
Status = KeWaitForMultipleObjects(CurrentCount,
ThreadContext->WaitObjectArray,
WaitAny,
Executive,
KernelMode,
FALSE,
NULL,
ThreadContext->WaitBlockArray);
if (!NT_SUCCESS(Status))
{
KEBUGCHECK(0);
}
KeLockMutex(&ThreadContext->DeviceExt->PipeListLock);
Count = Status - STATUS_SUCCESS;
ASSERT (Count < CurrentCount);
if (Count > 0)
{
Irp = ThreadContext->WaitIrpArray[Count];
ThreadContext->Count--;
ThreadContext->DeviceExt->EmptyWaiterCount++;
ThreadContext->WaitObjectArray[Count] = ThreadContext->WaitObjectArray[ThreadContext->Count];
ThreadContext->WaitIrpArray[Count] = ThreadContext->WaitIrpArray[ThreadContext->Count];
Cancel = (NULL == IoSetCancelRoutine(Irp, NULL));
Context = (PNPFS_CONTEXT)&Irp->Tail.Overlay.DriverContext;
IoStack = IoGetCurrentIrpStackLocation(Irp);
if (Cancel)
{
Fcb = IoStack->FileObject->FsContext;
ExAcquireFastMutex(&Fcb->DataListLock);
RemoveEntryList(&Context->ListEntry);
switch (IoStack->MajorFunction)
{
case IRP_MJ_READ:
if (!IsListEmpty(&Fcb->ReadRequestListHead))
{
/* put the next request on the wait list */
NextContext = CONTAINING_RECORD(Fcb->ReadRequestListHead.Flink, NPFS_CONTEXT, ListEntry);
ThreadContext->WaitObjectArray[ThreadContext->Count] = NextContext->WaitEvent;
NextIrp = CONTAINING_RECORD(NextContext, IRP, Tail.Overlay.DriverContext);
ThreadContext->WaitIrpArray[ThreadContext->Count] = NextIrp;
ThreadContext->Count++;
ThreadContext->DeviceExt->EmptyWaiterCount--;
}
break;
default:
KEBUGCHECK(0);
}
ExReleaseFastMutex(&Fcb->DataListLock);
}
}
else
{
/* someone has add a new wait request */
Irp = NULL;
}
if (ThreadContext->Count == 1 && ThreadContext->DeviceExt->EmptyWaiterCount >= MAXIMUM_WAIT_OBJECTS)
{
/* it exist an other thread with empty wait slots, we can remove our thread from the list */
RemoveEntryList(&ThreadContext->ListEntry);
ThreadContext->DeviceExt->EmptyWaiterCount -= MAXIMUM_WAIT_OBJECTS - 1;
Terminate = TRUE;
}
}
KeUnlockMutex(&ThreadContext->DeviceExt->PipeListLock);
ExFreePool(ThreadContext);
}
static NTSTATUS
NpfsAddWaitingReadWriteRequest(IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
PLIST_ENTRY ListEntry;
PNPFS_THREAD_CONTEXT ThreadContext = NULL;
NTSTATUS Status;
HANDLE hThread;
KIRQL oldIrql;
PNPFS_CONTEXT Context = (PNPFS_CONTEXT)&Irp->Tail.Overlay.DriverContext;
PNPFS_DEVICE_EXTENSION DeviceExt = (PNPFS_DEVICE_EXTENSION)DeviceObject->DeviceExtension;;
DPRINT("NpfsAddWaitingReadWriteRequest(DeviceObject %p, Irp %p)\n", DeviceObject, Irp);
KeLockMutex(&DeviceExt->PipeListLock);
ListEntry = DeviceExt->ThreadListHead.Flink;
while (ListEntry != &DeviceExt->ThreadListHead)
{
ThreadContext = CONTAINING_RECORD(ListEntry, NPFS_THREAD_CONTEXT, ListEntry);
if (ThreadContext->Count < MAXIMUM_WAIT_OBJECTS)
{
break;
}
ListEntry = ListEntry->Flink;
}
if (ListEntry == &DeviceExt->ThreadListHead)
{
ThreadContext = ExAllocatePool(NonPagedPool, sizeof(NPFS_THREAD_CONTEXT));
if (ThreadContext == NULL)
{
KeUnlockMutex(&DeviceExt->PipeListLock);
return STATUS_NO_MEMORY;
}
ThreadContext->DeviceExt = DeviceExt;
KeInitializeEvent(&ThreadContext->Event, SynchronizationEvent, FALSE);
ThreadContext->Count = 1;
ThreadContext->WaitObjectArray[0] = &ThreadContext->Event;
DPRINT("Creating a new system thread for waiting read/write requests\n");
Status = PsCreateSystemThread(&hThread,
THREAD_ALL_ACCESS,
NULL,
NULL,
NULL,
NpfsWaiterThread,
(PVOID)ThreadContext);
if (!NT_SUCCESS(Status))
{
ExFreePool(ThreadContext);
KeUnlockMutex(&DeviceExt->PipeListLock);
return Status;
}
InsertHeadList(&DeviceExt->ThreadListHead, &ThreadContext->ListEntry);
DeviceExt->EmptyWaiterCount += MAXIMUM_WAIT_OBJECTS - 1;
}
IoMarkIrpPending(Irp);
IoAcquireCancelSpinLock(&oldIrql);
if (Irp->Cancel)
{
IoReleaseCancelSpinLock(oldIrql);
Status = STATUS_CANCELLED;
}
else
{
IoSetCancelRoutine(Irp, NpfsReadWriteCancelRoutine);
IoReleaseCancelSpinLock(oldIrql);
ThreadContext->WaitObjectArray[ThreadContext->Count] = Context->WaitEvent;
ThreadContext->WaitIrpArray[ThreadContext->Count] = Irp;
ThreadContext->Count++;
DeviceExt->EmptyWaiterCount--;
KeSetEvent(&ThreadContext->Event, IO_NO_INCREMENT, FALSE);
Status = STATUS_SUCCESS;
}
KeUnlockMutex(&DeviceExt->PipeListLock);
return Status;
}
NTSTATUS STDCALL
NpfsRead(IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
PFILE_OBJECT FileObject;
NTSTATUS Status;
NTSTATUS OriginalStatus = STATUS_SUCCESS;
PNPFS_FCB Fcb;
PNPFS_CONTEXT Context;
KEVENT Event;
ULONG Length;
ULONG Information;
ULONG CopyLength;
ULONG TempLength;
BOOLEAN IsOriginalRequest = TRUE;
PVOID Buffer;
DPRINT("NpfsRead(DeviceObject %p, Irp %p)\n", DeviceObject, Irp);
if (Irp->MdlAddress == NULL)
{
DPRINT("Irp->MdlAddress == NULL\n");
Status = STATUS_UNSUCCESSFUL;
Irp->IoStatus.Information = 0;
goto done;
}
FileObject = IoGetCurrentIrpStackLocation(Irp)->FileObject;
Fcb = FileObject->FsContext;
Context = (PNPFS_CONTEXT)&Irp->Tail.Overlay.DriverContext;
if (Fcb->Data == NULL)
{
DPRINT1("Pipe is NOT readable!\n");
Status = STATUS_UNSUCCESSFUL;
Irp->IoStatus.Information = 0;
goto done;
}
ExAcquireFastMutex(&Fcb->DataListLock);
if (IoIsOperationSynchronous(Irp))
{
InsertTailList(&Fcb->ReadRequestListHead, &Context->ListEntry);
if (Fcb->ReadRequestListHead.Flink != &Context->ListEntry)
{
KeInitializeEvent(&Event, SynchronizationEvent, FALSE);
Context->WaitEvent = &Event;
ExReleaseFastMutex(&Fcb->DataListLock);
Status = KeWaitForSingleObject(&Event,
Executive,
KernelMode,
FALSE,
NULL);
if (!NT_SUCCESS(Status))
{
KEBUGCHECK(0);
}
ExAcquireFastMutex(&Fcb->DataListLock);
}
Irp->IoStatus.Information = 0;
}
else
{
KIRQL oldIrql;
if (IsListEmpty(&Fcb->ReadRequestListHead) ||
Fcb->ReadRequestListHead.Flink != &Context->ListEntry)
{
/* this is a new request */
Irp->IoStatus.Information = 0;
Context->WaitEvent = &Fcb->ReadEvent;
InsertTailList(&Fcb->ReadRequestListHead, &Context->ListEntry);
if (Fcb->ReadRequestListHead.Flink != &Context->ListEntry)
{
/* there was already a request on the list */
IoAcquireCancelSpinLock(&oldIrql);
if (Irp->Cancel)
{
IoReleaseCancelSpinLock(oldIrql);
RemoveEntryList(&Context->ListEntry);
ExReleaseFastMutex(&Fcb->DataListLock);
Status = STATUS_CANCELLED;
goto done;
}
IoSetCancelRoutine(Irp, NpfsReadWriteCancelRoutine);
IoReleaseCancelSpinLock(oldIrql);
ExReleaseFastMutex(&Fcb->DataListLock);
IoMarkIrpPending(Irp);
Status = STATUS_PENDING;
goto done;
}
}
}
while (1)
{
Buffer = MmGetSystemAddressForMdl(Irp->MdlAddress);
Information = Irp->IoStatus.Information;
Length = IoGetCurrentIrpStackLocation(Irp)->Parameters.Read.Length;
ASSERT (Information <= Length);
Buffer += Information;
Length -= Information;
Status = STATUS_SUCCESS;
while (1)
{
if (Fcb->ReadDataAvailable == 0)
{
if (Fcb->PipeState == FILE_PIPE_CONNECTED_STATE)
{
KeSetEvent(&Fcb->OtherSide->WriteEvent, IO_NO_INCREMENT, FALSE);
}
if (Information > 0 &&
(Fcb->Pipe->ReadMode != FILE_PIPE_BYTE_STREAM_MODE ||
Fcb->PipeState != FILE_PIPE_CONNECTED_STATE))
{
break;
}
if (Fcb->PipeState != FILE_PIPE_CONNECTED_STATE)
{
DPRINT("PipeState: %x\n", Fcb->PipeState);
Status = STATUS_PIPE_BROKEN;
break;
}
ExReleaseFastMutex(&Fcb->DataListLock);
if (IoIsOperationSynchronous(Irp))
{
/* Wait for ReadEvent to become signaled */
DPRINT("Waiting for readable data (%wZ)\n", &Fcb->Pipe->PipeName);
Status = KeWaitForSingleObject(&Fcb->ReadEvent,
UserRequest,
KernelMode,
FALSE,
NULL);
DPRINT("Finished waiting (%wZ)! Status: %x\n", &Fcb->Pipe->PipeName, Status);
ExAcquireFastMutex(&Fcb->DataListLock);
}
else
{
PNPFS_CONTEXT Context = (PNPFS_CONTEXT)&Irp->Tail.Overlay.DriverContext;
Context->WaitEvent = &Fcb->ReadEvent;
Status = NpfsAddWaitingReadWriteRequest(DeviceObject, Irp);
if (NT_SUCCESS(Status))
{
Status = STATUS_PENDING;
}
ExAcquireFastMutex(&Fcb->DataListLock);
break;
}
}
if (Fcb->Pipe->ReadMode == FILE_PIPE_BYTE_STREAM_MODE)
{
DPRINT("Byte stream mode\n");
/* Byte stream mode */
while (Length > 0 && Fcb->ReadDataAvailable > 0)
{
CopyLength = RtlRosMin(Fcb->ReadDataAvailable, Length);
if (Fcb->ReadPtr + CopyLength <= Fcb->Data + Fcb->MaxDataLength)
{
memcpy(Buffer, Fcb->ReadPtr, CopyLength);
Fcb->ReadPtr += CopyLength;
if (Fcb->ReadPtr == Fcb->Data + Fcb->MaxDataLength)
{
Fcb->ReadPtr = Fcb->Data;
}
}
else
{
TempLength = Fcb->Data + Fcb->MaxDataLength - Fcb->ReadPtr;
memcpy(Buffer, Fcb->ReadPtr, TempLength);
memcpy(Buffer + TempLength, Fcb->Data, CopyLength - TempLength);
Fcb->ReadPtr = Fcb->Data + CopyLength - TempLength;
}
Buffer += CopyLength;
Length -= CopyLength;
Information += CopyLength;
Fcb->ReadDataAvailable -= CopyLength;
Fcb->WriteQuotaAvailable += CopyLength;
}
if (Length == 0)
{
if (Fcb->PipeState == FILE_PIPE_CONNECTED_STATE)
{
KeSetEvent(&Fcb->OtherSide->WriteEvent, IO_NO_INCREMENT, FALSE);
}
KeResetEvent(&Fcb->ReadEvent);
break;
}
}
else
{
DPRINT("Message mode\n");
/* Message mode */
if (Fcb->ReadDataAvailable)
{
/* Truncate the message if the receive buffer is too small */
CopyLength = RtlRosMin(Fcb->ReadDataAvailable, Length);
memcpy(Buffer, Fcb->Data, CopyLength);
#ifndef NDEBUG
DPRINT("Length %d Buffer %x\n",CopyLength,Buffer);
HexDump((PUCHAR)Buffer, CopyLength);
#endif
Information = CopyLength;
if (Fcb->ReadDataAvailable > Length)
{
memmove(Fcb->Data, Fcb->Data + Length,
Fcb->ReadDataAvailable - Length);
Fcb->ReadDataAvailable -= Length;
Status = STATUS_MORE_ENTRIES;
}
else
{
KeResetEvent(&Fcb->ReadEvent);
if (Fcb->PipeState == FILE_PIPE_CONNECTED_STATE)
{
KeSetEvent(&Fcb->OtherSide->WriteEvent, IO_NO_INCREMENT, FALSE);
}
Fcb->ReadDataAvailable = 0;
Fcb->WriteQuotaAvailable = Fcb->MaxDataLength;
}
}
if (Information > 0)
{
break;
}
}
}
Irp->IoStatus.Information = Information;
Irp->IoStatus.Status = Status;
if (IoIsOperationSynchronous(Irp))
{
RemoveEntryList(&Context->ListEntry);
if (!IsListEmpty(&Fcb->ReadRequestListHead))
{
Context = CONTAINING_RECORD(Fcb->ReadRequestListHead.Flink, NPFS_CONTEXT, ListEntry);
KeSetEvent(Context->WaitEvent, IO_NO_INCREMENT, FALSE);
}
ExReleaseFastMutex(&Fcb->DataListLock);
IoCompleteRequest(Irp, IO_NO_INCREMENT);
DPRINT("NpfsRead done (Status %lx)\n", Status);
return Status;
}
else
{
if (IsOriginalRequest)
{
IsOriginalRequest = FALSE;
OriginalStatus = Status;
}
if (Status == STATUS_PENDING)
{
ExReleaseFastMutex(&Fcb->DataListLock);
DPRINT("NpfsRead done (Status %lx)\n", OriginalStatus);
return OriginalStatus;
}
RemoveEntryList(&Context->ListEntry);
IoCompleteRequest(Irp, IO_NO_INCREMENT);
if (IsListEmpty(&Fcb->ReadRequestListHead))
{
ExReleaseFastMutex(&Fcb->DataListLock);
DPRINT("NpfsRead done (Status %lx)\n", OriginalStatus);
return OriginalStatus;
}
Context = CONTAINING_RECORD(Fcb->ReadRequestListHead.Flink, NPFS_CONTEXT, ListEntry);
Irp = CONTAINING_RECORD(Context, IRP, Tail.Overlay.DriverContext);
}
}
done:
Irp->IoStatus.Status = Status;
if (Status != STATUS_PENDING)
{
IoCompleteRequest(Irp, IO_NO_INCREMENT);
}
DPRINT("NpfsRead done (Status %lx)\n", Status);
return Status;
}
NTSTATUS STDCALL
NpfsWrite(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
PIO_STACK_LOCATION IoStack;
PFILE_OBJECT FileObject;
PNPFS_FCB Fcb = NULL;
PNPFS_FCB ReaderFcb;
PNPFS_PIPE Pipe = NULL;
PUCHAR Buffer;
NTSTATUS Status = STATUS_SUCCESS;
ULONG Length;
ULONG Offset;
ULONG Information;
ULONG CopyLength;
ULONG TempLength;
DPRINT("NpfsWrite()\n");
IoStack = IoGetCurrentIrpStackLocation(Irp);
FileObject = IoStack->FileObject;
DPRINT("FileObject %p\n", FileObject);
DPRINT("Pipe name %wZ\n", &FileObject->FileName);
Fcb = FileObject->FsContext;
ReaderFcb = Fcb->OtherSide;
Pipe = Fcb->Pipe;
Length = IoStack->Parameters.Write.Length;
Offset = IoStack->Parameters.Write.ByteOffset.u.LowPart;
Information = 0;
if (Irp->MdlAddress == NULL)
{
DPRINT("Irp->MdlAddress == NULL\n");
Status = STATUS_UNSUCCESSFUL;
Length = 0;
goto done;
}
if (ReaderFcb == NULL)
{
DPRINT("Pipe is NOT connected!\n");
if (Fcb->PipeState == FILE_PIPE_LISTENING_STATE)
Status = STATUS_PIPE_LISTENING;
else if (Fcb->PipeState == FILE_PIPE_DISCONNECTED_STATE)
Status = STATUS_PIPE_DISCONNECTED;
else
Status = STATUS_UNSUCCESSFUL;
Length = 0;
goto done;
}
if (ReaderFcb->Data == NULL)
{
DPRINT("Pipe is NOT writable!\n");
Status = STATUS_UNSUCCESSFUL;
Length = 0;
goto done;
}
Status = STATUS_SUCCESS;
Buffer = MmGetSystemAddressForMdl (Irp->MdlAddress);
ExAcquireFastMutex(&ReaderFcb->DataListLock);
#ifndef NDEBUG
DPRINT("Length %d Buffer %x Offset %x\n",Length,Buffer,Offset);
HexDump(Buffer, Length);
#endif
while(1)
{
if (ReaderFcb->WriteQuotaAvailable == 0)
{
KeSetEvent(&ReaderFcb->ReadEvent, IO_NO_INCREMENT, FALSE);
if (Fcb->PipeState != FILE_PIPE_CONNECTED_STATE)
{
Status = STATUS_PIPE_BROKEN;
ExReleaseFastMutex(&ReaderFcb->DataListLock);
goto done;
}
ExReleaseFastMutex(&ReaderFcb->DataListLock);
DPRINT("Waiting for buffer space (%S)\n", Pipe->PipeName.Buffer);
Status = KeWaitForSingleObject(&Fcb->WriteEvent,
UserRequest,
KernelMode,
FALSE,
NULL);
DPRINT("Finished waiting (%S)! Status: %x\n", Pipe->PipeName.Buffer, Status);
ExAcquireFastMutex(&ReaderFcb->DataListLock);
/*
* It's possible that the event was signaled because the
* other side of pipe was closed.
*/
if (Fcb->PipeState != FILE_PIPE_CONNECTED_STATE)
{
DPRINT("PipeState: %x\n", Fcb->PipeState);
Status = STATUS_PIPE_BROKEN;
ExReleaseFastMutex(&ReaderFcb->DataListLock);
goto done;
}
}
if (Pipe->WriteMode == FILE_PIPE_BYTE_STREAM_MODE)
{
DPRINT("Byte stream mode\n");
while (Length > 0 && ReaderFcb->WriteQuotaAvailable > 0)
{
CopyLength = RtlRosMin(Length, ReaderFcb->WriteQuotaAvailable);
if (ReaderFcb->WritePtr + CopyLength <= ReaderFcb->Data + ReaderFcb->MaxDataLength)
{
memcpy(ReaderFcb->WritePtr, Buffer, CopyLength);
ReaderFcb->WritePtr += CopyLength;
if (ReaderFcb->WritePtr == ReaderFcb->Data + ReaderFcb->MaxDataLength)
{
ReaderFcb->WritePtr = ReaderFcb->Data;
}
}
else
{
TempLength = ReaderFcb->Data + ReaderFcb->MaxDataLength - ReaderFcb->WritePtr;
memcpy(ReaderFcb->WritePtr, Buffer, TempLength);
memcpy(ReaderFcb->Data, Buffer + TempLength, CopyLength - TempLength);
ReaderFcb->WritePtr = ReaderFcb->Data + CopyLength - TempLength;
}
Buffer += CopyLength;
Length -= CopyLength;
Information += CopyLength;
ReaderFcb->ReadDataAvailable += CopyLength;
ReaderFcb->WriteQuotaAvailable -= CopyLength;
}
if (Length == 0)
{
KeSetEvent(&ReaderFcb->ReadEvent, IO_NO_INCREMENT, FALSE);
KeResetEvent(&Fcb->WriteEvent);
break;
}
}
else
{
DPRINT("Message mode\n");
if (Length > 0)
{
CopyLength = RtlRosMin(Length, ReaderFcb->WriteQuotaAvailable);
memcpy(ReaderFcb->Data, Buffer, CopyLength);
Information = CopyLength;
ReaderFcb->ReadDataAvailable = CopyLength;
ReaderFcb->WriteQuotaAvailable = 0;
}
if (Information > 0)
{
KeSetEvent(&ReaderFcb->ReadEvent, IO_NO_INCREMENT, FALSE);
KeResetEvent(&Fcb->WriteEvent);
break;
}
}
}
ExReleaseFastMutex(&ReaderFcb->DataListLock);
done:
Irp->IoStatus.Status = Status;
Irp->IoStatus.Information = Information;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
DPRINT("NpfsWrite done (Status %lx)\n", Status);
return Status;
}
/* EOF */

View File

@@ -1,16 +0,0 @@
PATH_TO_TOP = ../../../..
TARGET_TYPE = export_driver
TARGET_NAME = uhci
TARGET_DDKLIBS = ntoskrnl.a usbcore.a
TARGET_CFLAGS = -Wall -I$(PATH_TO_TOP)/ntoskrnl/include -DDEBUG_MODE
TARGET_OBJECTS = \
uhci-hcd.o uhci_main.o ../sys/ros_wrapper.o ../sys/linuxwrapper.o
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk

View File

@@ -1,616 +0,0 @@
/*
* UHCI-specific debugging code. Invaluable when something
* goes wrong, but don't get in my face.
*
* Kernel visible pointers are surrounded in []'s and bus
* visible pointers are surrounded in ()'s
*
* (C) Copyright 1999 Linus Torvalds
* (C) Copyright 1999-2001 Johannes Erdfelt
*/
#if 0
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/proc_fs.h>
#include <linux/smp_lock.h>
#include <asm/io.h>
#endif
#include "uhci-hcd.h"
/* Handle REALLY large printk's so we don't overflow buffers */
static inline void lprintk(char *buf)
{
char *p;
/* Just write one line at a time */
while (buf) {
p = strchr(buf, '\n');
if (p)
*p = 0;
printk(KERN_DEBUG "%s\n", buf);
buf = p;
if (buf)
buf++;
}
}
static inline int uhci_is_skeleton_qh(struct uhci_hcd *uhci, struct uhci_qh *qh)
{
int i;
for (i = 0; i < UHCI_NUM_SKELQH; i++)
if (qh == uhci->skelqh[i])
return 1;
return 0;
}
static int uhci_show_td(struct uhci_td *td, char *buf, int len, int space)
{
char *out = buf;
char *spid;
u32 status, token;
/* Try to make sure there's enough memory */
if (len < 160)
return 0;
status = td_status(td);
out += sprintf(out, "%*s[%p] link (%08x) ", space, "", td, le32_to_cpu(td->link));
out += sprintf(out, "e%d %s%s%s%s%s%s%s%s%s%sLength=%x ",
((status >> 27) & 3),
(status & TD_CTRL_SPD) ? "SPD " : "",
(status & TD_CTRL_LS) ? "LS " : "",
(status & TD_CTRL_IOC) ? "IOC " : "",
(status & TD_CTRL_ACTIVE) ? "Active " : "",
(status & TD_CTRL_STALLED) ? "Stalled " : "",
(status & TD_CTRL_DBUFERR) ? "DataBufErr " : "",
(status & TD_CTRL_BABBLE) ? "Babble " : "",
(status & TD_CTRL_NAK) ? "NAK " : "",
(status & TD_CTRL_CRCTIMEO) ? "CRC/Timeo " : "",
(status & TD_CTRL_BITSTUFF) ? "BitStuff " : "",
status & 0x7ff);
token = td_token(td);
switch (uhci_packetid(token)) {
case USB_PID_SETUP:
spid = "SETUP";
break;
case USB_PID_OUT:
spid = "OUT";
break;
case USB_PID_IN:
spid = "IN";
break;
default:
spid = "?";
break;
}
out += sprintf(out, "MaxLen=%x DT%d EndPt=%x Dev=%x, PID=%x(%s) ",
token >> 21,
((token >> 19) & 1),
(token >> 15) & 15,
(token >> 8) & 127,
(token & 0xff),
spid);
out += sprintf(out, "(buf=%08x)\n", le32_to_cpu(td->buffer));
return out - buf;
}
static int uhci_show_qh(struct uhci_qh *qh, char *buf, int len, int space)
{
char *out = buf;
struct urb_priv *urbp;
struct list_head *head, *tmp;
struct uhci_td *td;
int i = 0, checked = 0, prevactive = 0;
/* Try to make sure there's enough memory */
if (len < 80 * 6)
return 0;
out += sprintf(out, "%*s[%p] link (%08x) element (%08x)\n", space, "",
qh, le32_to_cpu(qh->link), le32_to_cpu(qh->element));
if (qh->element & UHCI_PTR_QH)
out += sprintf(out, "%*s Element points to QH (bug?)\n", space, "");
if (qh->element & UHCI_PTR_DEPTH)
out += sprintf(out, "%*s Depth traverse\n", space, "");
if (qh->element & cpu_to_le32(8))
out += sprintf(out, "%*s Bit 3 set (bug?)\n", space, "");
if (!(qh->element & ~(UHCI_PTR_QH | UHCI_PTR_DEPTH)))
out += sprintf(out, "%*s Element is NULL (bug?)\n", space, "");
if (!qh->urbp) {
out += sprintf(out, "%*s urbp == NULL\n", space, "");
goto out;
}
urbp = qh->urbp;
head = &urbp->td_list;
tmp = head->next;
td = list_entry(tmp, struct uhci_td, list);
if (cpu_to_le32(td->dma_handle) != (qh->element & ~UHCI_PTR_BITS))
out += sprintf(out, "%*s Element != First TD\n", space, "");
while (tmp != head) {
struct uhci_td *td = list_entry(tmp, struct uhci_td, list);
tmp = tmp->next;
out += sprintf(out, "%*s%d: ", space + 2, "", i++);
out += uhci_show_td(td, out, len - (out - buf), 0);
if (i > 10 && !checked && prevactive && tmp != head &&
debug <= 2) {
struct list_head *ntmp = tmp;
struct uhci_td *ntd = td;
int active = 1, ni = i;
checked = 1;
while (ntmp != head && ntmp->next != head && active) {
ntd = list_entry(ntmp, struct uhci_td, list);
ntmp = ntmp->next;
active = td_status(ntd) & TD_CTRL_ACTIVE;
ni++;
}
if (active && ni > i) {
out += sprintf(out, "%*s[skipped %d active TD's]\n", space, "", ni - i);
tmp = ntmp;
td = ntd;
i = ni;
}
}
prevactive = td_status(td) & TD_CTRL_ACTIVE;
}
if (list_empty(&urbp->queue_list) || urbp->queued)
goto out;
out += sprintf(out, "%*sQueued QH's:\n", -space, "--");
head = &urbp->queue_list;
tmp = head->next;
while (tmp != head) {
struct urb_priv *nurbp = list_entry(tmp, struct urb_priv,
queue_list);
tmp = tmp->next;
out += uhci_show_qh(nurbp->qh, out, len - (out - buf), space);
}
out:
return out - buf;
}
#define show_frame_num() \
if (!shown) { \
shown = 1; \
out += sprintf(out, "- Frame %d\n", i); \
}
#ifdef CONFIG_PROC_FS
static const char *qh_names[] = {
"skel_int128_qh", "skel_int64_qh",
"skel_int32_qh", "skel_int16_qh",
"skel_int8_qh", "skel_int4_qh",
"skel_int2_qh", "skel_int1_qh",
"skel_ls_control_qh", "skel_fs_control_qh",
"skel_bulk_qh", "skel_term_qh"
};
#define show_qh_name() \
if (!shown) { \
shown = 1; \
out += sprintf(out, "- %s\n", qh_names[i]); \
}
static int uhci_show_sc(int port, unsigned short status, char *buf, int len)
{
char *out = buf;
/* Try to make sure there's enough memory */
if (len < 160)
return 0;
out += sprintf(out, " stat%d = %04x %s%s%s%s%s%s%s%s%s%s\n",
port,
status,
(status & USBPORTSC_SUSP) ? " Suspend" : "",
(status & USBPORTSC_OCC) ? " OverCurrentChange" : "",
(status & USBPORTSC_OC) ? " OverCurrent" : "",
(status & USBPORTSC_PR) ? " Reset" : "",
(status & USBPORTSC_LSDA) ? " LowSpeed" : "",
(status & USBPORTSC_RD) ? " ResumeDetect" : "",
(status & USBPORTSC_PEC) ? " EnableChange" : "",
(status & USBPORTSC_PE) ? " Enabled" : "",
(status & USBPORTSC_CSC) ? " ConnectChange" : "",
(status & USBPORTSC_CCS) ? " Connected" : "");
return out - buf;
}
static int uhci_show_status(struct uhci_hcd *uhci, char *buf, int len)
{
char *out = buf;
unsigned int io_addr = uhci->io_addr;
unsigned short usbcmd, usbstat, usbint, usbfrnum;
unsigned int flbaseadd;
unsigned char sof;
unsigned short portsc1, portsc2;
/* Try to make sure there's enough memory */
if (len < 80 * 6)
return 0;
usbcmd = inw(io_addr + 0);
usbstat = inw(io_addr + 2);
usbint = inw(io_addr + 4);
usbfrnum = inw(io_addr + 6);
flbaseadd = inl(io_addr + 8);
sof = inb(io_addr + 12);
portsc1 = inw(io_addr + 16);
portsc2 = inw(io_addr + 18);
out += sprintf(out, " usbcmd = %04x %s%s%s%s%s%s%s%s\n",
usbcmd,
(usbcmd & USBCMD_MAXP) ? "Maxp64 " : "Maxp32 ",
(usbcmd & USBCMD_CF) ? "CF " : "",
(usbcmd & USBCMD_SWDBG) ? "SWDBG " : "",
(usbcmd & USBCMD_FGR) ? "FGR " : "",
(usbcmd & USBCMD_EGSM) ? "EGSM " : "",
(usbcmd & USBCMD_GRESET) ? "GRESET " : "",
(usbcmd & USBCMD_HCRESET) ? "HCRESET " : "",
(usbcmd & USBCMD_RS) ? "RS " : "");
out += sprintf(out, " usbstat = %04x %s%s%s%s%s%s\n",
usbstat,
(usbstat & USBSTS_HCH) ? "HCHalted " : "",
(usbstat & USBSTS_HCPE) ? "HostControllerProcessError " : "",
(usbstat & USBSTS_HSE) ? "HostSystemError " : "",
(usbstat & USBSTS_RD) ? "ResumeDetect " : "",
(usbstat & USBSTS_ERROR) ? "USBError " : "",
(usbstat & USBSTS_USBINT) ? "USBINT " : "");
out += sprintf(out, " usbint = %04x\n", usbint);
out += sprintf(out, " usbfrnum = (%d)%03x\n", (usbfrnum >> 10) & 1,
0xfff & (4*(unsigned int)usbfrnum));
out += sprintf(out, " flbaseadd = %08x\n", flbaseadd);
out += sprintf(out, " sof = %02x\n", sof);
out += uhci_show_sc(1, portsc1, out, len - (out - buf));
out += uhci_show_sc(2, portsc2, out, len - (out - buf));
return out - buf;
}
static int uhci_show_urbp(struct uhci_hcd *uhci, struct urb_priv *urbp, char *buf, int len)
{
struct list_head *tmp;
char *out = buf;
int count = 0;
if (len < 200)
return 0;
out += sprintf(out, "urb_priv [%p] ", urbp);
out += sprintf(out, "urb [%p] ", urbp->urb);
out += sprintf(out, "qh [%p] ", urbp->qh);
out += sprintf(out, "Dev=%d ", usb_pipedevice(urbp->urb->pipe));
out += sprintf(out, "EP=%x(%s) ", usb_pipeendpoint(urbp->urb->pipe), (usb_pipein(urbp->urb->pipe) ? "IN" : "OUT"));
switch (usb_pipetype(urbp->urb->pipe)) {
case PIPE_ISOCHRONOUS: out += sprintf(out, "ISO "); break;
case PIPE_INTERRUPT: out += sprintf(out, "INT "); break;
case PIPE_BULK: out += sprintf(out, "BLK "); break;
case PIPE_CONTROL: out += sprintf(out, "CTL "); break;
}
out += sprintf(out, "%s", (urbp->fsbr ? "FSBR " : ""));
out += sprintf(out, "%s", (urbp->fsbr_timeout ? "FSBR_TO " : ""));
if (urbp->urb->status != -EINPROGRESS)
out += sprintf(out, "Status=%d ", urbp->urb->status);
//out += sprintf(out, "Inserttime=%lx ",urbp->inserttime);
//out += sprintf(out, "FSBRtime=%lx ",urbp->fsbrtime);
count = 0;
list_for_each(tmp, &urbp->td_list)
count++;
out += sprintf(out, "TDs=%d ",count);
if (urbp->queued)
out += sprintf(out, "queued\n");
else {
count = 0;
list_for_each(tmp, &urbp->queue_list)
count++;
out += sprintf(out, "queued URBs=%d\n", count);
}
return out - buf;
}
static int uhci_show_lists(struct uhci_hcd *uhci, char *buf, int len)
{
char *out = buf;
struct list_head *head, *tmp;
int count;
out += sprintf(out, "Main list URBs:");
if (list_empty(&uhci->urb_list))
out += sprintf(out, " Empty\n");
else {
out += sprintf(out, "\n");
count = 0;
head = &uhci->urb_list;
tmp = head->next;
while (tmp != head) {
struct urb_priv *urbp = list_entry(tmp, struct urb_priv, urb_list);
out += sprintf(out, " %d: ", ++count);
out += uhci_show_urbp(uhci, urbp, out, len - (out - buf));
tmp = tmp->next;
}
}
out += sprintf(out, "Remove list URBs:");
if (list_empty(&uhci->urb_remove_list))
out += sprintf(out, " Empty\n");
else {
out += sprintf(out, "\n");
count = 0;
head = &uhci->urb_remove_list;
tmp = head->next;
while (tmp != head) {
struct urb_priv *urbp = list_entry(tmp, struct urb_priv, urb_list);
out += sprintf(out, " %d: ", ++count);
out += uhci_show_urbp(uhci, urbp, out, len - (out - buf));
tmp = tmp->next;
}
}
out += sprintf(out, "Complete list URBs:");
if (list_empty(&uhci->complete_list))
out += sprintf(out, " Empty\n");
else {
out += sprintf(out, "\n");
count = 0;
head = &uhci->complete_list;
tmp = head->next;
while (tmp != head) {
struct urb_priv *urbp = list_entry(tmp, struct urb_priv, urb_list);
out += sprintf(out, " %d: ", ++count);
out += uhci_show_urbp(uhci, urbp, out, len - (out - buf));
tmp = tmp->next;
}
}
return out - buf;
}
static int uhci_sprint_schedule(struct uhci_hcd *uhci, char *buf, int len)
{
unsigned long flags;
char *out = buf;
int i, j;
struct uhci_qh *qh;
struct uhci_td *td;
struct list_head *tmp, *head;
spin_lock_irqsave(&uhci->schedule_lock, flags);
out += sprintf(out, "HC status\n");
out += uhci_show_status(uhci, out, len - (out - buf));
out += sprintf(out, "Frame List\n");
for (i = 0; i < UHCI_NUMFRAMES; ++i) {
int shown = 0;
td = uhci->fl->frame_cpu[i];
if (!td)
continue;
if (td->dma_handle != (dma_addr_t)uhci->fl->frame[i]) {
show_frame_num();
out += sprintf(out, " frame list does not match td->dma_handle!\n");
}
show_frame_num();
head = &td->fl_list;
tmp = head;
do {
td = list_entry(tmp, struct uhci_td, fl_list);
tmp = tmp->next;
out += uhci_show_td(td, out, len - (out - buf), 4);
} while (tmp != head);
}
out += sprintf(out, "Skeleton QH's\n");
for (i = 0; i < UHCI_NUM_SKELQH; ++i) {
int shown = 0;
qh = uhci->skelqh[i];
if (debug > 1) {
show_qh_name();
out += uhci_show_qh(qh, out, len - (out - buf), 4);
}
/* Last QH is the Terminating QH, it's different */
if (i == UHCI_NUM_SKELQH - 1) {
if (qh->link != UHCI_PTR_TERM)
out += sprintf(out, " bandwidth reclamation on!\n");
if (qh->element != cpu_to_le32(uhci->term_td->dma_handle))
out += sprintf(out, " skel_term_qh element is not set to term_td!\n");
continue;
}
j = (i < 7) ? 7 : i+1; /* Next skeleton */
if (list_empty(&qh->list)) {
if (i < UHCI_NUM_SKELQH - 1) {
if (qh->link !=
(cpu_to_le32(uhci->skelqh[j]->dma_handle) | UHCI_PTR_QH)) {
show_qh_name();
out += sprintf(out, " skeleton QH not linked to next skeleton QH!\n");
}
}
continue;
}
show_qh_name();
head = &qh->list;
tmp = head->next;
while (tmp != head) {
qh = list_entry(tmp, struct uhci_qh, list);
tmp = tmp->next;
out += uhci_show_qh(qh, out, len - (out - buf), 4);
}
if (i < UHCI_NUM_SKELQH - 1) {
if (qh->link !=
(cpu_to_le32(uhci->skelqh[j]->dma_handle) | UHCI_PTR_QH))
out += sprintf(out, " last QH not linked to next skeleton!\n");
}
}
if (debug > 2)
out += uhci_show_lists(uhci, out, len - (out - buf));
spin_unlock_irqrestore(&uhci->schedule_lock, flags);
return out - buf;
}
#define MAX_OUTPUT (64 * 1024)
static struct proc_dir_entry *uhci_proc_root = NULL;
struct uhci_proc {
int size;
char *data;
struct uhci_hcd *uhci;
};
static int uhci_proc_open(struct inode *inode, struct file *file)
{
const struct proc_dir_entry *dp = PDE(inode);
struct uhci_hcd *uhci = dp->data;
struct uhci_proc *up;
int ret = -ENOMEM;
lock_kernel();
up = kmalloc(sizeof(*up), GFP_KERNEL);
if (!up)
goto out;
up->data = kmalloc(MAX_OUTPUT, GFP_KERNEL);
if (!up->data) {
kfree(up);
goto out;
}
up->size = uhci_sprint_schedule(uhci, up->data, MAX_OUTPUT);
file->private_data = up;
ret = 0;
out:
unlock_kernel();
return ret;
}
static loff_t uhci_proc_lseek(struct file *file, loff_t off, int whence)
{
struct uhci_proc *up;
loff_t new = -1;
lock_kernel();
up = file->private_data;
switch (whence) {
case 0:
new = off;
break;
case 1:
new = file->f_pos + off;
break;
}
if (new < 0 || new > up->size) {
unlock_kernel();
return -EINVAL;
}
unlock_kernel();
return (file->f_pos = new);
}
static ssize_t uhci_proc_read(struct file *file, char *buf, size_t nbytes,
loff_t *ppos)
{
struct uhci_proc *up = file->private_data;
unsigned int pos;
unsigned int size;
pos = *ppos;
size = up->size;
if (pos >= size)
return 0;
if (nbytes >= size)
nbytes = size;
if (pos + nbytes > size)
nbytes = size - pos;
if (!access_ok(VERIFY_WRITE, buf, nbytes))
return -EINVAL;
if (copy_to_user(buf, up->data + pos, nbytes))
return -EFAULT;
*ppos += nbytes;
return nbytes;
}
static int uhci_proc_release(struct inode *inode, struct file *file)
{
struct uhci_proc *up = file->private_data;
kfree(up->data);
kfree(up);
return 0;
}
static struct file_operations uhci_proc_operations = {
.open = uhci_proc_open,
.llseek = uhci_proc_lseek,
.read = uhci_proc_read,
// write: uhci_proc_write,
.release = uhci_proc_release,
};
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -1,419 +0,0 @@
#ifndef __LINUX_UHCI_HCD_H
#define __LINUX_UHCI_HCD_H
#if 0
#include <linux/list.h>
#include <linux/usb.h>
#endif
#define usb_packetid(pipe) (usb_pipein(pipe) ? USB_PID_IN : USB_PID_OUT)
#define PIPE_DEVEP_MASK 0x0007ff00
/*
* Universal Host Controller Interface data structures and defines
*/
/* Command register */
#define USBCMD 0
#define USBCMD_RS 0x0001 /* Run/Stop */
#define USBCMD_HCRESET 0x0002 /* Host reset */
#define USBCMD_GRESET 0x0004 /* Global reset */
#define USBCMD_EGSM 0x0008 /* Global Suspend Mode */
#define USBCMD_FGR 0x0010 /* Force Global Resume */
#define USBCMD_SWDBG 0x0020 /* SW Debug mode */
#define USBCMD_CF 0x0040 /* Config Flag (sw only) */
#define USBCMD_MAXP 0x0080 /* Max Packet (0 = 32, 1 = 64) */
/* Status register */
#define USBSTS 2
#define USBSTS_USBINT 0x0001 /* Interrupt due to IOC */
#define USBSTS_ERROR 0x0002 /* Interrupt due to error */
#define USBSTS_RD 0x0004 /* Resume Detect */
#define USBSTS_HSE 0x0008 /* Host System Error - basically PCI problems */
#define USBSTS_HCPE 0x0010 /* Host Controller Process Error - the scripts were buggy */
#define USBSTS_HCH 0x0020 /* HC Halted */
/* Interrupt enable register */
#define USBINTR 4
#define USBINTR_TIMEOUT 0x0001 /* Timeout/CRC error enable */
#define USBINTR_RESUME 0x0002 /* Resume interrupt enable */
#define USBINTR_IOC 0x0004 /* Interrupt On Complete enable */
#define USBINTR_SP 0x0008 /* Short packet interrupt enable */
#define USBFRNUM 6
#define USBFLBASEADD 8
#define USBSOF 12
/* USB port status and control registers */
#define USBPORTSC1 16
#define USBPORTSC2 18
#define USBPORTSC_CCS 0x0001 /* Current Connect Status ("device present") */
#define USBPORTSC_CSC 0x0002 /* Connect Status Change */
#define USBPORTSC_PE 0x0004 /* Port Enable */
#define USBPORTSC_PEC 0x0008 /* Port Enable Change */
#define USBPORTSC_LS 0x0030 /* Line Status */
#define USBPORTSC_RD 0x0040 /* Resume Detect */
#define USBPORTSC_LSDA 0x0100 /* Low Speed Device Attached */
#define USBPORTSC_PR 0x0200 /* Port Reset */
#define USBPORTSC_OC 0x0400 /* Over Current condition */
#define USBPORTSC_SUSP 0x1000 /* Suspend */
/* Legacy support register */
#define USBLEGSUP 0xc0
#define USBLEGSUP_DEFAULT 0x2000 /* only PIRQ enable set */
#define UHCI_NULL_DATA_SIZE 0x7FF /* for UHCI controller TD */
#define UHCI_PTR_BITS cpu_to_le32(0x000F)
#define UHCI_PTR_TERM cpu_to_le32(0x0001)
#define UHCI_PTR_QH cpu_to_le32(0x0002)
#define UHCI_PTR_DEPTH cpu_to_le32(0x0004)
#define UHCI_PTR_BREADTH cpu_to_le32(0x0000)
#define UHCI_NUMFRAMES 1024 /* in the frame list [array] */
#define UHCI_MAX_SOF_NUMBER 2047 /* in an SOF packet */
#define CAN_SCHEDULE_FRAMES 1000 /* how far future frames can be scheduled */
struct uhci_frame_list {
__u32 frame[UHCI_NUMFRAMES];
void *frame_cpu[UHCI_NUMFRAMES];
dma_addr_t dma_handle;
};
struct urb_priv;
/*
* One role of a QH is to hold a queue of TDs for some endpoint. Each QH is
* used with one URB, and qh->element (updated by the HC) is either:
* - the next unprocessed TD for the URB, or
* - UHCI_PTR_TERM (when there's no more traffic for this endpoint), or
* - the QH for the next URB queued to the same endpoint.
*
* The other role of a QH is to serve as a "skeleton" framelist entry, so we
* can easily splice a QH for some endpoint into the schedule at the right
* place. Then qh->element is UHCI_PTR_TERM.
*
* In the frame list, qh->link maintains a list of QHs seen by the HC:
* skel1 --> ep1-qh --> ep2-qh --> ... --> skel2 --> ...
*/
struct uhci_qh {
/* Hardware fields */
__u32 link; /* Next queue */
__u32 element; /* Queue element pointer */
/* Software fields */
dma_addr_t dma_handle;
struct usb_device *dev;
struct urb_priv *urbp;
struct list_head list; /* P: uhci->frame_list_lock */
struct list_head remove_list; /* P: uhci->remove_list_lock */
} __attribute__((aligned(16)));
/*
* for TD <status>:
*/
#define td_status(td) le32_to_cpu((td)->status)
#define TD_CTRL_SPD (1 << 29) /* Short Packet Detect */
#define TD_CTRL_C_ERR_MASK (3 << 27) /* Error Counter bits */
#define TD_CTRL_C_ERR_SHIFT 27
#define TD_CTRL_LS (1 << 26) /* Low Speed Device */
#define TD_CTRL_IOS (1 << 25) /* Isochronous Select */
#define TD_CTRL_IOC (1 << 24) /* Interrupt on Complete */
#define TD_CTRL_ACTIVE (1 << 23) /* TD Active */
#define TD_CTRL_STALLED (1 << 22) /* TD Stalled */
#define TD_CTRL_DBUFERR (1 << 21) /* Data Buffer Error */
#define TD_CTRL_BABBLE (1 << 20) /* Babble Detected */
#define TD_CTRL_NAK (1 << 19) /* NAK Received */
#define TD_CTRL_CRCTIMEO (1 << 18) /* CRC/Time Out Error */
#define TD_CTRL_BITSTUFF (1 << 17) /* Bit Stuff Error */
#define TD_CTRL_ACTLEN_MASK 0x7FF /* actual length, encoded as n - 1 */
#define TD_CTRL_ANY_ERROR (TD_CTRL_STALLED | TD_CTRL_DBUFERR | \
TD_CTRL_BABBLE | TD_CTRL_CRCTIME | TD_CTRL_BITSTUFF)
#define uhci_maxerr(err) ((err) << TD_CTRL_C_ERR_SHIFT)
#define uhci_status_bits(ctrl_sts) ((ctrl_sts) & 0xFE0000)
#define uhci_actual_length(ctrl_sts) (((ctrl_sts) + 1) & TD_CTRL_ACTLEN_MASK) /* 1-based */
/*
* for TD <info>: (a.k.a. Token)
*/
#define td_token(td) le32_to_cpu((td)->token)
#define TD_TOKEN_DEVADDR_SHIFT 8
#define TD_TOKEN_TOGGLE_SHIFT 19
#define TD_TOKEN_TOGGLE (1 << 19)
#define TD_TOKEN_EXPLEN_SHIFT 21
#define TD_TOKEN_EXPLEN_MASK 0x7FF /* expected length, encoded as n - 1 */
#define TD_TOKEN_PID_MASK 0xFF
#define uhci_explen(len) ((len) << TD_TOKEN_EXPLEN_SHIFT)
#define uhci_expected_length(token) ((((token) >> 21) + 1) & TD_TOKEN_EXPLEN_MASK)
#define uhci_toggle(token) (((token) >> TD_TOKEN_TOGGLE_SHIFT) & 1)
#define uhci_endpoint(token) (((token) >> 15) & 0xf)
#define uhci_devaddr(token) (((token) >> TD_TOKEN_DEVADDR_SHIFT) & 0x7f)
#define uhci_devep(token) (((token) >> TD_TOKEN_DEVADDR_SHIFT) & 0x7ff)
#define uhci_packetid(token) ((token) & TD_TOKEN_PID_MASK)
#define uhci_packetout(token) (uhci_packetid(token) != USB_PID_IN)
#define uhci_packetin(token) (uhci_packetid(token) == USB_PID_IN)
/*
* The documentation says "4 words for hardware, 4 words for software".
*
* That's silly, the hardware doesn't care. The hardware only cares that
* the hardware words are 16-byte aligned, and we can have any amount of
* sw space after the TD entry as far as I can tell.
*
* But let's just go with the documentation, at least for 32-bit machines.
* On 64-bit machines we probably want to take advantage of the fact that
* hw doesn't really care about the size of the sw-only area.
*
* Alas, not anymore, we have more than 4 words for software, woops.
* Everything still works tho, surprise! -jerdfelt
*
* td->link points to either another TD (not necessarily for the same urb or
* even the same endpoint), or nothing (PTR_TERM), or a QH (for queued urbs)
*/
struct uhci_td {
/* Hardware fields */
__u32 link;
__u32 status;
__u32 token;
__u32 buffer;
/* Software fields */
dma_addr_t dma_handle;
struct usb_device *dev;
struct urb *urb;
struct list_head list; /* P: urb->lock */
int frame; /* for iso: what frame? */
struct list_head fl_list; /* P: uhci->frame_list_lock */
} __attribute__((aligned(16)));
/*
* The UHCI driver places Interrupt, Control and Bulk into QH's both
* to group together TD's for one transfer, and also to faciliate queuing
* of URB's. To make it easy to insert entries into the schedule, we have
* a skeleton of QH's for each predefined Interrupt latency, low speed
* control, high speed control and terminating QH (see explanation for
* the terminating QH below).
*
* When we want to add a new QH, we add it to the end of the list for the
* skeleton QH.
*
* For instance, the queue can look like this:
*
* skel int128 QH
* dev 1 interrupt QH
* dev 5 interrupt QH
* skel int64 QH
* skel int32 QH
* ...
* skel int1 QH
* skel low speed control QH
* dev 5 control QH
* skel high speed control QH
* skel bulk QH
* dev 1 bulk QH
* dev 2 bulk QH
* skel terminating QH
*
* The terminating QH is used for 2 reasons:
* - To place a terminating TD which is used to workaround a PIIX bug
* (see Intel errata for explanation)
* - To loop back to the high speed control queue for full speed bandwidth
* reclamation
*
* Isochronous transfers are stored before the start of the skeleton
* schedule and don't use QH's. While the UHCI spec doesn't forbid the
* use of QH's for Isochronous, it doesn't use them either. Since we don't
* need to use them either, we follow the spec diagrams in hope that it'll
* be more compatible with future UHCI implementations.
*/
#define UHCI_NUM_SKELQH 12
#define skel_int128_qh skelqh[0]
#define skel_int64_qh skelqh[1]
#define skel_int32_qh skelqh[2]
#define skel_int16_qh skelqh[3]
#define skel_int8_qh skelqh[4]
#define skel_int4_qh skelqh[5]
#define skel_int2_qh skelqh[6]
#define skel_int1_qh skelqh[7]
#define skel_ls_control_qh skelqh[8]
#define skel_hs_control_qh skelqh[9]
#define skel_bulk_qh skelqh[10]
#define skel_term_qh skelqh[11]
/*
* Search tree for determining where <interval> fits in the skelqh[]
* skeleton.
*
* An interrupt request should be placed into the slowest skelqh[]
* which meets the interval/period/frequency requirement.
* An interrupt request is allowed to be faster than <interval> but not slower.
*
* For a given <interval>, this function returns the appropriate/matching
* skelqh[] index value.
*/
static inline int __interval_to_skel(int interval)
{
if (interval < 16) {
if (interval < 4) {
if (interval < 2)
return 7; /* int1 for 0-1 ms */
return 6; /* int2 for 2-3 ms */
}
if (interval < 8)
return 5; /* int4 for 4-7 ms */
return 4; /* int8 for 8-15 ms */
}
if (interval < 64) {
if (interval < 32)
return 3; /* int16 for 16-31 ms */
return 2; /* int32 for 32-63 ms */
}
if (interval < 128)
return 1; /* int64 for 64-127 ms */
return 0; /* int128 for 128-255 ms (Max.) */
}
/*
* Device states for the host controller.
*
* To prevent "bouncing" in the presence of electrical noise,
* we insist on a 1-second "grace" period, before switching to
* the RUNNING or SUSPENDED states, during which the state is
* not allowed to change.
*
* The resume process is divided into substates in order to avoid
* potentially length delays during the timer handler.
*
* States in which the host controller is halted must have values <= 0.
*/
enum uhci_state {
UHCI_RESET,
UHCI_RUNNING_GRACE, /* Before RUNNING */
UHCI_RUNNING, /* The normal state */
UHCI_SUSPENDING_GRACE, /* Before SUSPENDED */
UHCI_SUSPENDED = -10, /* When no devices are attached */
UHCI_RESUMING_1,
UHCI_RESUMING_2
};
#define hcd_to_uhci(hcd_ptr) container_of(hcd_ptr, struct uhci_hcd, hcd)
/*
* This describes the full uhci information.
*
* Note how the "proper" USB information is just
* a subset of what the full implementation needs.
*/
struct uhci_hcd {
struct usb_hcd hcd;
#ifdef CONFIG_PROC_FS
/* procfs */
struct proc_dir_entry *proc_entry;
#endif
/* Grabbed from PCI */
unsigned long io_addr;
struct pci_pool *qh_pool;
struct pci_pool *td_pool;
struct usb_bus *bus;
struct uhci_td *term_td; /* Terminating TD, see UHCI bug */
struct uhci_qh *skelqh[UHCI_NUM_SKELQH]; /* Skeleton QH's */
spinlock_t frame_list_lock;
struct uhci_frame_list *fl; /* P: uhci->frame_list_lock */
int fsbr; /* Full speed bandwidth reclamation */
unsigned long fsbrtimeout; /* FSBR delay */
enum uhci_state state; /* FIXME: needs a spinlock */
unsigned long state_end; /* Time of next transition */
int resume_detect; /* Need a Global Resume */
/* Main list of URB's currently controlled by this HC */
spinlock_t urb_list_lock;
struct list_head urb_list; /* P: uhci->urb_list_lock */
/* List of QH's that are done, but waiting to be unlinked (race) */
spinlock_t qh_remove_list_lock;
struct list_head qh_remove_list; /* P: uhci->qh_remove_list_lock */
/* List of asynchronously unlinked URB's */
spinlock_t urb_remove_list_lock;
struct list_head urb_remove_list; /* P: uhci->urb_remove_list_lock */
/* List of URB's awaiting completion callback */
spinlock_t complete_list_lock;
struct list_head complete_list; /* P: uhci->complete_list_lock */
int rh_numports;
struct timer_list stall_timer;
};
struct urb_priv {
struct list_head urb_list;
struct urb *urb;
struct usb_device *dev;
struct uhci_qh *qh; /* QH for this URB */
struct list_head td_list; /* P: urb->lock */
int fsbr : 1; /* URB turned on FSBR */
int fsbr_timeout : 1; /* URB timed out on FSBR */
int queued : 1; /* QH was queued (not linked in) */
int short_control_packet : 1; /* If we get a short packet during */
/* a control transfer, retrigger */
/* the status phase */
int status; /* Final status */
unsigned long inserttime; /* In jiffies */
unsigned long fsbrtime; /* In jiffies */
struct list_head queue_list; /* P: uhci->frame_list_lock */
struct list_head complete_list; /* P: uhci->complete_list_lock */
};
/*
* Locking in uhci.c
*
* spinlocks are used extensively to protect the many lists and data
* structures we have. It's not that pretty, but it's necessary. We
* need to be done with all of the locks (except complete_list_lock) when
* we call urb->complete. I've tried to make it simple enough so I don't
* have to spend hours racking my brain trying to figure out if the
* locking is safe.
*
* Here's the safe locking order to prevent deadlocks:
*
* #1 uhci->urb_list_lock
* #2 urb->lock
* #3 uhci->urb_remove_list_lock, uhci->frame_list_lock,
* uhci->qh_remove_list_lock
* #4 uhci->complete_list_lock
*
* If you're going to grab 2 or more locks at once, ALWAYS grab the lock
* at the lowest level FIRST and NEVER grab locks at the same level at the
* same time.
*
* So, if you need uhci->urb_list_lock, grab it before you grab urb->lock
*/
#endif

View File

@@ -1,184 +0,0 @@
/*
* Universal Host Controller Interface driver for USB.
*
* Maintainer: Johannes Erdfelt <johannes@erdfelt.com>
*
* (C) Copyright 1999 Linus Torvalds
* (C) Copyright 1999-2002 Johannes Erdfelt, johannes@erdfelt.com
* (C) Copyright 1999 Randy Dunlap
* (C) Copyright 1999 Georg Acher, acher@in.tum.de
* (C) Copyright 1999 Deti Fliegl, deti@fliegl.de
* (C) Copyright 1999 Thomas Sailer, sailer@ife.ee.ethz.ch
*/
static __u8 root_hub_hub_des[] =
{
0x09, /* __u8 bLength; */
0x29, /* __u8 bDescriptorType; Hub-descriptor */
0x02, /* __u8 bNbrPorts; */
0x00, /* __u16 wHubCharacteristics; */
0x00,
0x01, /* __u8 bPwrOn2pwrGood; 2ms */
0x00, /* __u8 bHubContrCurrent; 0 mA */
0x00, /* __u8 DeviceRemovable; *** 7 Ports max *** */
0xff /* __u8 PortPwrCtrlMask; *** 7 ports max *** */
};
static int uhci_hub_status_data(struct usb_hcd *hcd, char *buf)
{
struct uhci_hcd *uhci = hcd_to_uhci(hcd);
unsigned int io_addr = uhci->io_addr;
int i, len = 1;
*buf = 0;
for (i = 0; i < uhci->rh_numports; i++) {
*buf |= ((inw(io_addr + USBPORTSC1 + i * 2) & 0xa) > 0 ? (1 << (i + 1)) : 0);
len = (i + 1) / 8 + 1;
}
return !!*buf;
}
#define OK(x) len = (x); break
#define CLR_RH_PORTSTAT(x) \
status = inw(io_addr + USBPORTSC1 + 2 * (wIndex-1)); \
status = (status & 0xfff5) & ~(x); \
outw(status, io_addr + USBPORTSC1 + 2 * (wIndex-1))
#define SET_RH_PORTSTAT(x) \
status = inw(io_addr + USBPORTSC1 + 2 * (wIndex-1)); \
status = (status & 0xfff5) | (x); \
outw(status, io_addr + USBPORTSC1 + 2 * (wIndex-1))
/* size of returned buffer is part of USB spec */
static int uhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
u16 wIndex, char *buf, u16 wLength)
{
struct uhci_hcd *uhci = hcd_to_uhci(hcd);
int i, status, retval = 0, len = 0;
unsigned int io_addr = uhci->io_addr;
__u16 cstatus;
char c_p_r[8];
for (i = 0; i < 8; i++)
c_p_r[i] = 0;
switch (typeReq) {
/* Request Destination:
without flags: Device,
RH_INTERFACE: interface,
RH_ENDPOINT: endpoint,
RH_CLASS means HUB here,
RH_OTHER | RH_CLASS almost ever means HUB_PORT here
*/
case GetHubStatus:
*(__u32 *)buf = cpu_to_le32(0);
OK(4); /* hub power */
case GetPortStatus:
status = inw(io_addr + USBPORTSC1 + 2 * (wIndex - 1));
cstatus = ((status & USBPORTSC_CSC) >> (1 - 0)) |
((status & USBPORTSC_PEC) >> (3 - 1)) |
(c_p_r[wIndex - 1] << (0 + 4));
status = (status & USBPORTSC_CCS) |
((status & USBPORTSC_PE) >> (2 - 1)) |
((status & USBPORTSC_SUSP) >> (12 - 2)) |
((status & USBPORTSC_PR) >> (9 - 4)) |
(1 << 8) | /* power on */
((status & USBPORTSC_LSDA) << (-8 + 9));
*(__u16 *)buf = cpu_to_le16(status);
*(__u16 *)(buf + 2) = cpu_to_le16(cstatus);
OK(4);
case SetHubFeature:
switch (wValue) {
case C_HUB_OVER_CURRENT:
case C_HUB_LOCAL_POWER:
break;
default:
goto err;
}
break;
case ClearHubFeature:
switch (wValue) {
case C_HUB_OVER_CURRENT:
OK(0); /* hub power over current */
default:
goto err;
}
break;
case SetPortFeature:
if (!wIndex || wIndex > uhci->rh_numports)
goto err;
switch (wValue) {
case USB_PORT_FEAT_SUSPEND:
SET_RH_PORTSTAT(USBPORTSC_SUSP);
OK(0);
case USB_PORT_FEAT_RESET:
SET_RH_PORTSTAT(USBPORTSC_PR);
mdelay(50); /* USB v1.1 7.1.7.3 */
c_p_r[wIndex - 1] = 1;
CLR_RH_PORTSTAT(USBPORTSC_PR);
udelay(10);
SET_RH_PORTSTAT(USBPORTSC_PE);
mdelay(10);
SET_RH_PORTSTAT(0xa);
OK(0);
case USB_PORT_FEAT_POWER:
OK(0); /* port power ** */
case USB_PORT_FEAT_ENABLE:
SET_RH_PORTSTAT(USBPORTSC_PE);
OK(0);
default:
goto err;
}
break;
case ClearPortFeature:
if (!wIndex || wIndex > uhci->rh_numports)
goto err;
switch (wValue) {
case USB_PORT_FEAT_ENABLE:
CLR_RH_PORTSTAT(USBPORTSC_PE);
OK(0);
case USB_PORT_FEAT_C_ENABLE:
SET_RH_PORTSTAT(USBPORTSC_PEC);
OK(0);
case USB_PORT_FEAT_SUSPEND:
CLR_RH_PORTSTAT(USBPORTSC_SUSP);
OK(0);
case USB_PORT_FEAT_C_SUSPEND:
/*** WR_RH_PORTSTAT(RH_PS_PSSC); */
OK(0);
case USB_PORT_FEAT_POWER:
OK(0); /* port power */
case USB_PORT_FEAT_C_CONNECTION:
SET_RH_PORTSTAT(USBPORTSC_CSC);
OK(0);
case USB_PORT_FEAT_C_OVER_CURRENT:
OK(0); /* port power over current */
case USB_PORT_FEAT_C_RESET:
c_p_r[wIndex - 1] = 0;
OK(0);
default:
goto err;
}
break;
case GetHubDescriptor:
len = min_t(unsigned int, wLength,
min_t(unsigned int, sizeof(root_hub_hub_des), wLength));
memcpy(buf, root_hub_hub_des, len);
if (len > 2)
buf[2] = uhci->rh_numports;
OK(len);
default:
err:
retval = -EPIPE;
}
return retval;
}

View File

@@ -1,2 +0,0 @@
LIBRARY uhci.sys
EXPORTS

View File

@@ -1,5 +0,0 @@
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "USB UHCI Device Driver\0"
#define REACTOS_STR_INTERNAL_NAME "uhci\0"
#define REACTOS_STR_ORIGINAL_FILENAME "uhci.sys\0"
#include <reactos/version.rc>

View File

@@ -1,5 +0,0 @@
/*
* Configs for UHCI
*/
#define CONFIG_PCI

View File

@@ -1,309 +0,0 @@
/*
ReactOS specific functions for UHCI module
by Aleksey Bragin (aleksey@reactos.com)
Some parts of code are inspired (or even just copied) from ReactOS Videoport driver
*/
#include <ddk/ntddk.h>
#include <debug.h>
#include "../linux/linux_wrapper.h"
#include "../host/ohci_main.h"
// declare basic init funcs
void init_wrapper(struct pci_dev *probe_dev);
int uhci_hcd_init(void);
void uhci_hcd_cleanup(void);
int STDCALL usb_init(void);
void STDCALL usb_exit(void);
extern struct pci_driver uhci_pci_driver;
extern const struct pci_device_id uhci_pci_ids[];
// This should be removed, but for testing purposes it's here
struct pci_dev *dev;
//struct pci_device_id *dev_id;
#define USB_UHCI_TAG TAG('u','s','b','u')
NTSTATUS STDCALL AddDevice(PDRIVER_OBJECT DriverObject, PDEVICE_OBJECT pdo)
{
PDEVICE_OBJECT fdo;
NTSTATUS Status;
WCHAR DeviceBuffer[20];
UNICODE_STRING DeviceName;
POHCI_DRIVER_EXTENSION DriverExtension;
POHCI_DEVICE_EXTENSION DeviceExtension;
ULONG Size, DeviceNumber;
DPRINT1("uhci: AddDevice called\n");
// Allocate driver extension now
DriverExtension = IoGetDriverObjectExtension(DriverObject, DriverObject);
if (DriverExtension == NULL)
{
Status = IoAllocateDriverObjectExtension(
DriverObject,
DriverObject,
sizeof(OHCI_DRIVER_EXTENSION),
(PVOID *)&DriverExtension);
if (!NT_SUCCESS(Status))
{
DPRINT1("Allocating DriverObjectExtension failed.\n");
return Status;
}
}
// Create a unicode device name
DeviceNumber = 0; //TODO: Allocate new device number every time
swprintf(DeviceBuffer, L"\\Device\\USBFDO-%lu", DeviceNumber);
RtlInitUnicodeString(&DeviceName, DeviceBuffer);
Status = IoCreateDevice(DriverObject,
sizeof(OHCI_DEVICE_EXTENSION)/* + DriverExtension->InitializationData.HwDeviceExtensionSize*/,
&DeviceName,
FILE_DEVICE_CONTROLLER,
0,
FALSE,
&fdo);
if (!NT_SUCCESS(Status))
{
DPRINT("IoCreateDevice call failed with status 0x%08x\n", Status);
return Status;
}
// zerofill device extension
DeviceExtension = (POHCI_DEVICE_EXTENSION)pdo->DeviceExtension;
RtlZeroMemory(DeviceExtension, sizeof(OHCI_DEVICE_EXTENSION));
DeviceExtension->NextDeviceObject = IoAttachDeviceToDeviceStack(fdo, pdo);
fdo->Flags &= ~DO_DEVICE_INITIALIZING;
// Initialize device extension
DeviceExtension->DeviceNumber = DeviceNumber;
DeviceExtension->PhysicalDeviceObject = pdo;
DeviceExtension->FunctionalDeviceObject = fdo;
DeviceExtension->DriverExtension = DriverExtension;
/* Get bus number from the upper level bus driver. */
Size = sizeof(ULONG);
Status = IoGetDeviceProperty(
pdo,
DevicePropertyBusNumber,
Size,
&DeviceExtension->SystemIoBusNumber,
&Size);
if (!NT_SUCCESS(Status))
{
DPRINT("Couldn't get an information from bus driver. Panic!!!\n");
return Status;
}
DPRINT("Done AddDevice\n");
return STATUS_SUCCESS;
}
VOID STDCALL DriverUnload(PDRIVER_OBJECT DriverObject)
{
DPRINT1("DriverUnload()\n");
// Exit usb device
usb_exit();
// Remove device (ohci_pci_driver.remove)
uhci_pci_driver.remove(dev);
ExFreePool(dev->slot_name);
ExFreePool(dev);
// Perform some cleanup
uhci_hcd_cleanup();
}
NTSTATUS InitLinuxWrapper(PDEVICE_OBJECT DeviceObject)
{
NTSTATUS Status;
POHCI_DEVICE_EXTENSION DeviceExtension = (POHCI_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
// Fill generic linux structs
dev = ExAllocatePoolWithTag(PagedPool, sizeof(struct pci_dev), USB_UHCI_TAG);
init_wrapper(dev);
dev->irq = DeviceExtension->InterruptLevel;
dev->dev_ext = (PVOID)DeviceExtension;
dev->slot_name = ExAllocatePoolWithTag(NonPagedPool, 128, USB_UHCI_TAG); // 128 max len for slot name
strcpy(dev->dev.name, "UnivHCI PCI-USB Controller");
strcpy(dev->slot_name, "UHCD PCI Slot");
// Init the OHCI HCD. Probe will be called automatically, but will fail because id=NULL
Status = uhci_hcd_init();
//FIXME: Check status returned value
// Init core usb
usb_init();
// Probe device with real id now
uhci_pci_driver.probe(dev, uhci_pci_ids);
DPRINT("InitLinuxWrapper() done\n");
return STATUS_SUCCESS;
}
NTSTATUS STDCALL
OHCD_PnPStartDevice(IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
PIO_STACK_LOCATION Stack = IoGetCurrentIrpStackLocation(Irp);
PDRIVER_OBJECT DriverObject;
POHCI_DRIVER_EXTENSION DriverExtension;
POHCI_DEVICE_EXTENSION DeviceExtension;
PCM_RESOURCE_LIST AllocatedResources;
/*
* Get the initialization data we saved in VideoPortInitialize.
*/
DriverObject = DeviceObject->DriverObject;
DriverExtension = IoGetDriverObjectExtension(DriverObject, DriverObject);
DeviceExtension = (POHCI_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
/*
* Store some resources in the DeviceExtension.
*/
AllocatedResources = Stack->Parameters.StartDevice.AllocatedResources;
if (AllocatedResources != NULL)
{
CM_FULL_RESOURCE_DESCRIPTOR *FullList;
CM_PARTIAL_RESOURCE_DESCRIPTOR *Descriptor;
ULONG ResourceCount;
ULONG ResourceListSize;
/* Save the resource list */
ResourceCount = AllocatedResources->List[0].PartialResourceList.Count;
ResourceListSize =
FIELD_OFFSET(CM_RESOURCE_LIST, List[0].PartialResourceList.
PartialDescriptors[ResourceCount]);
DeviceExtension->AllocatedResources = ExAllocatePool(PagedPool, ResourceListSize);
if (DeviceExtension->AllocatedResources == NULL)
{
return STATUS_INSUFFICIENT_RESOURCES;
}
RtlCopyMemory(DeviceExtension->AllocatedResources,
AllocatedResources,
ResourceListSize);
/* Get the interrupt level/vector - needed by HwFindAdapter sometimes */
for (FullList = AllocatedResources->List;
FullList < AllocatedResources->List + AllocatedResources->Count;
FullList++)
{
/* FIXME: Is this ASSERT ok for resources from the PNP manager? */
/*ASSERT(FullList->InterfaceType == PCIBus &&
FullList->BusNumber == DeviceExtension->SystemIoBusNumber &&
1 == FullList->PartialResourceList.Version &&
1 == FullList->PartialResourceList.Revision);*/
for (Descriptor = FullList->PartialResourceList.PartialDescriptors;
Descriptor < FullList->PartialResourceList.PartialDescriptors + FullList->PartialResourceList.Count;
Descriptor++)
{
if (Descriptor->Type == CmResourceTypeInterrupt)
{
DeviceExtension->InterruptLevel = Descriptor->u.Interrupt.Level;
DeviceExtension->InterruptVector = Descriptor->u.Interrupt.Vector;
}
else if (Descriptor->Type == CmResourceTypeMemory)
{
DeviceExtension->BaseAddress = Descriptor->u.Memory.Start;
DeviceExtension->BaseAddrLength = Descriptor->u.Memory.Length;
}
}
}
}
DPRINT1("Interrupt level: 0x%x Interrupt Vector: 0x%x\n",
DeviceExtension->InterruptLevel,
DeviceExtension->InterruptVector);
/*
* Init wrapper with this object
*/
return InitLinuxWrapper(DeviceObject);
}
// Dispatch PNP
NTSTATUS STDCALL DispatchPnp(PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
PIO_STACK_LOCATION IrpSp;
NTSTATUS Status;
IrpSp = IoGetCurrentIrpStackLocation(Irp);
switch (IrpSp->MinorFunction)
{
case IRP_MN_START_DEVICE:
//Status = IntVideoPortForwardIrpAndWait(DeviceObject, Irp);
//if (NT_SUCCESS(Status) && NT_SUCCESS(Irp->IoStatus.Status))
Status = OHCD_PnPStartDevice(DeviceObject, Irp);
Irp->IoStatus.Status = Status;
Irp->IoStatus.Information = 0;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
break;
case IRP_MN_REMOVE_DEVICE:
case IRP_MN_QUERY_REMOVE_DEVICE:
case IRP_MN_CANCEL_REMOVE_DEVICE:
case IRP_MN_SURPRISE_REMOVAL:
case IRP_MN_STOP_DEVICE:
//Status = IntVideoPortForwardIrpAndWait(DeviceObject, Irp);
//if (NT_SUCCESS(Status) && NT_SUCCESS(Irp->IoStatus.Status))
Status = STATUS_SUCCESS;
Irp->IoStatus.Status = Status;
Irp->IoStatus.Information = 0;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
IoDeleteDevice(DeviceObject); // just delete device for now
break;
case IRP_MN_QUERY_STOP_DEVICE:
case IRP_MN_CANCEL_STOP_DEVICE:
Status = STATUS_SUCCESS;
Irp->IoStatus.Status = STATUS_SUCCESS;
Irp->IoStatus.Information = 0;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
break;
default:
return STATUS_NOT_IMPLEMENTED;
break;
}
return Status;
}
NTSTATUS STDCALL DispatchPower(PDEVICE_OBJECT fido, PIRP Irp)
{
DbgPrint("IRP_MJ_POWER dispatch\n");
return STATUS_SUCCESS;
}
/*
* Standard DriverEntry method.
*/
NTSTATUS STDCALL
DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegPath)
{
DriverObject->DriverUnload = DriverUnload;
DriverObject->DriverExtension->AddDevice = AddDevice;
DriverObject->MajorFunction[IRP_MJ_PNP] = DispatchPnp;
DriverObject->MajorFunction[IRP_MJ_POWER] = DispatchPower;
return STATUS_SUCCESS;
}

View File

@@ -1,124 +0,0 @@
/*
* ReactOS VGA miniport video driver
*
* Copyright (C) 2004 Filip Navara, Herve Poussineau
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef VGAMP_H
#define VGAMP_H
/* INCLUDES *******************************************************************/
#include <ddk/miniport.h>
#include <ddk/video.h>
#include <ddk/ntddvdeo.h>
#include <debug.h>
void
InitVGAMode();
static VP_STATUS STDCALL
VGAFindAdapter(
PVOID DeviceExtension,
PVOID Context,
PWSTR ArgumentString,
PVIDEO_PORT_CONFIG_INFO ConfigInfo,
PUCHAR Again);
static BOOLEAN STDCALL
VGAInitialize(
PVOID DeviceExtension);
static BOOLEAN STDCALL
VGAStartIO(
PVOID DeviceExtension,
PVIDEO_REQUEST_PACKET RequestPacket);
/*static BOOLEAN STDCALL
VGAInterrupt(PVOID DeviceExtension);*/
static BOOLEAN STDCALL
VGAResetHw(
PVOID DeviceExtension,
ULONG Columns,
ULONG Rows);
/*static VOID STDCALL
VGATimer(PVOID DeviceExtension);*/
/* Mandatory IoControl routines */
BOOL
VGAMapVideoMemory(
IN PVOID DeviceExtension,
IN PVIDEO_MEMORY RequestedAddress,
OUT PVIDEO_MEMORY_INFORMATION MapInformation,
OUT PSTATUS_BLOCK StatusBlock);
BOOL
VGAQueryAvailModes(
OUT PVIDEO_MODE_INFORMATION ReturnedModes,
OUT PSTATUS_BLOCK StatusBlock);
BOOL
VGAQueryCurrentMode(
OUT PVIDEO_MODE_INFORMATION CurrentMode,
OUT PSTATUS_BLOCK StatusBlock);
BOOL
VGAQueryNumAvailModes(
OUT PVIDEO_NUM_MODES NumberOfModes,
OUT PSTATUS_BLOCK StatusBlock);
BOOL
VGAResetDevice(OUT PSTATUS_BLOCK StatusBlock);
BOOL
VGASetColorRegisters(
IN PVIDEO_CLUT ColorLookUpTable,
OUT PSTATUS_BLOCK StatusBlock);
BOOL
VGASetPaletteRegisters(
IN PWORD PaletteRegisters,
OUT PSTATUS_BLOCK StatusBlock);
BOOL
VGASetCurrentMode(
IN PVIDEO_MODE RequestedMode,
OUT PSTATUS_BLOCK StatusBlock);
BOOL
VGAShareVideoMemory(
IN PVIDEO_SHARE_MEMORY RequestedMemory,
OUT PVIDEO_MEMORY_INFORMATION ReturnedMemory,
OUT PSTATUS_BLOCK StatusBlock);
BOOL
VGAUnmapVideoMemory(
IN PVOID DeviceExtension,
IN PVIDEO_MEMORY MemoryToUnmap,
OUT PSTATUS_BLOCK StatusBlock);
BOOL
VGAUnshareVideoMemory(
IN PVIDEO_MEMORY MemoryToUnshare,
OUT PSTATUS_BLOCK StatusBlock);
/* Optional IoControl routines */
/* None actually */
#endif /* VGAMP_H */

View File

@@ -1,127 +0,0 @@
/*
* Service Control Manager (SCM) interface definition
*/
//#include <windef.h>
//#include <winsvc.h>
#define DWORD unsigned long
#define BOOL unsigned long
#define SC_HANDLE unsigned int
#define SC_LOCK unsigned int
#define LPCSTR char*
#define LPCWSTR wchar_t*
#define LPDWORD unsigned long*
[
uuid(367abb81-9844-35f1-ad32-98f038001003),
version(2.0),
pointer_default(unique),
explicit_handle
]
interface svcctl
{
cpp_quote("#if 0")
typedef struct _SERVICE_STATUS
{
DWORD dwServiceType;
DWORD dwCurrentState;
DWORD dwControlsAccepted;
DWORD dwWin32ExitCode;
DWORD dwServiceSpecificExitCode;
DWORD dwCheckPoint;
DWORD dwWaitHint;
} SERVICE_STATUS, *LPSERVICE_STATUS;
cpp_quote("#endif")
/* Function 0 */
DWORD ScmrCloseServiceHandle([in] handle_t BindingHandle,
[in] SC_HANDLE hSCObject);
/* Function 1 */
BOOL ScmrControlService([in] handle_t BindingHandle,
[in] SC_HANDLE hService,
[in] DWORD dwControl,
[out] LPSERVICE_STATUS lpServiceStatus);
/* Function 2 */
DWORD ScmrDeleteService([in] handle_t BindingHandle,
[in] SC_HANDLE hService);
/* Function 3 */
DWORD ScmrLockServiceDatabase([in] handle_t BindingHandle,
[in] SC_HANDLE hSCManager,
[out] SC_LOCK *hLock);
/* Function 4 */
DWORD ScmrQueryServiceObjectSecurity([in] handle_t BindingHandle); /* FIXME */
/* Function 5 */
DWORD ScmrSetServiceObjectSecurity([in] handle_t BindingHandle); /* FIXME */
/* Function 6 */
DWORD ScmrQueryServiceStatus([in] handle_t BindingHandle,
[in] SC_HANDLE hSCManager,
[out] LPSERVICE_STATUS lpServiceStatus);
/* Function 7 */
DWORD ScmrSetServiceStatus([in] handle_t BindingHandle); /* FIXME */
/* Function 8 */
DWORD ScmrUnlockServiceDatabase([in] handle_t BindingHandle,
[in] SC_LOCK hLock);
/* Function 9 */
DWORD ScmrNotifyBootConfigStatus([in] handle_t BindingHandle,
[in] BOOL BootAcceptable);
/* Function 12 */
// DWORD ScmrCreateServiceW([in] handle_t BindingHandle,
// [in] SC_HANDLE hSCManager,
// [in, string, ref] LPCWSTR lpServiceName,
// [in, string, ref] LPCWSTR lpDisplayName,
// [in] DWORD dwDesiredAccess,
// [in] DWORD dwServiceType,
// [in] DWORD dwStartType,
// [in] DWORD dwErrorControl,
// [in, string, ref] LPCWSTR lpBinaryPathName,
// [in, string, unique] LPCWSTR lpLoadOrderGroup,
// [out] LPDWORD lpdwTagId,
// [in, size_is(dwDepwndenciesLength), unique] LPCWSTR lpDependencies,
// [in] DWORD dwDependenciesLength,
// [in, string, unique] LPCWSTR lpServiceStartName,
// [in, size_is(dwPasswordLength), unique] LPCWSTR lpPassword,
// [in] DWORD dwPasswordLength,
// [out] SC_HANDLE *hService);
/* Function 15 */
DWORD ScmrOpenSCManagerW([in] handle_t BindingHandle,
[in, string, unique] LPCWSTR lpMachineName,
[in, string, unique] LPCWSTR lpDatabaseName,
[in] DWORD dwDesiredAccess,
[out] SC_HANDLE *hScm);
/* Function 16 */
SC_HANDLE ScmrOpenServiceW([in] handle_t BindingHandle,
[in] SC_HANDLE hSCManager,
[in, string] LPCWSTR lpServiceName,
[in] DWORD dwDesiredAccess,
[out] SC_HANDLE *hScm);
/* Function 27 */
DWORD ScmrOpenSCManagerA([in] handle_t BindingHandle,
[in, string, unique] LPCSTR lpMachineName,
[in, string, unique] LPCSTR lpDatabaseName,
[in] DWORD dwDesiredAccess,
[out] SC_HANDLE *hScm);
/* Function 28 */
SC_HANDLE ScmrOpenServiceA([in] handle_t BindingHandle,
[in] SC_HANDLE hSCManager,
[in, string] LPCSTR lpServiceName,
[in] DWORD dwDesiredAccess,
[out] SC_HANDLE *hScm);
}

View File

@@ -1,242 +0,0 @@
/*
Copyright (c) 2004/2005 KJK::Hyperion
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef KJK_PSEH_NATIVE_H_
#define KJK_PSEH_NATIVE_H_
#include <excpt.h>
#include <pseh/excpt.h>
/*
Note: just define __inline to an empty symbol if your C compiler doesn't
support it
*/
#ifdef __cplusplus
# ifndef __inline
# define __inline inline
# endif
#endif
typedef long (__stdcall * _SEHFilter_t)
(
long,
struct _EXCEPTION_POINTERS *,
void *
);
typedef void (__stdcall * _SEHFinally_t)
(
int,
void *
);
static __inline long _SEHCallFilter
(
_SEHFilter_t _SEHFilter,
long _SEHExceptionCode,
struct _EXCEPTION_POINTERS * _SEHExceptionPointers,
void * _SEHPVLocals
)
{
if(_SEHFilter == _SEH_STATIC_FILTER(_SEH_EXECUTE_HANDLER))
return _SEH_EXECUTE_HANDLER;
else if(_SEHFilter == _SEH_STATIC_FILTER(_SEH_CONTINUE_SEARCH))
return _SEH_CONTINUE_SEARCH;
else if(_SEHFilter == _SEH_STATIC_FILTER(_SEH_CONTINUE_EXECUTION))
return _SEH_CONTINUE_EXECUTION;
else if(_SEHFilter)
return _SEHFilter(_SEHExceptionCode, _SEHExceptionPointers, _SEHPVLocals);
else
return _SEH_CONTINUE_SEARCH;
}
static __inline void _SEHCallFinally
(
_SEHFinally_t _SEHFinally,
int _SEHAbnormalTermination,
void * _SEHPVLocals
)
{
if(_SEHFinally)
(_SEHFinally)(_SEHAbnormalTermination, _SEHPVLocals);
}
/* SHARED LOCALS */
/* Access the locals for the current frame */
#define _SEH_ACCESS_LOCALS(LOCALS_) \
_SEH_LOCALS_TYPENAME(LOCALS_) * _SEHPLocals; \
_SEHPLocals = _SEH_PVOID_CAST(_SEH_LOCALS_TYPENAME(LOCALS_) *, _SEHPVLocals);
/* Access local variable VAR_ */
#define _SEH_VAR(VAR_) _SEHPLocals->VAR_
/* FILTER FUNCTIONS */
/* Declares a filter function's prototype */
#define _SEH_FILTER(NAME_) \
long __stdcall NAME_ \
( \
long _SEHExceptionCode, \
struct _EXCEPTION_POINTERS * _SEHExceptionPointers, \
void * _SEHPVLocals \
)
/* Declares a static filter */
#define _SEH_STATIC_FILTER(ACTION_) ((_SEHFilter_t)((ACTION_) + 2))
/* Declares a PSEH filter wrapping a regular filter function */
#define _SEH_WRAP_FILTER(WRAPPER_, NAME_) \
static __inline _SEH_FILTER(WRAPPER_) \
{ \
return (NAME_)(_SEHExceptionPointers); \
}
/* FINALLY FUNCTIONS */
/* Declares a finally function's prototype */
#define _SEH_FINALLY(NAME_) \
void __stdcall NAME_ \
( \
int _SEHAbnormalTermination, \
void * _SEHPVLocals \
)
/* Declares a PSEH finally function wrapping a regular function */
#define _SEH_WRAP_FINALLY(WRAPPER_, NAME_) \
_SEH_WRAP_FINALLY_ARGS(WRAPPER_, NAME_, ())
#define _SEH_WRAP_FINALLY_ARGS(WRAPPER_, NAME_, ARGS_) \
static __inline _SEH_FINALLY(WRAPPER_) \
{ \
NAME_ ARGS_; \
}
#define _SEH_WRAP_FINALLY_LOCALS_ARGS(WRAPPER_, LOCALS_, NAME_, ARGS_) \
static __inline _SEH_FINALLY(WRAPPER_) \
{ \
_SEH_ACCESS_LOCALS(LOCALS_); \
NAME_ ARGS_; \
}
/* SAFE BLOCKS */
#define _SEH_TRY_FINALLY(FINALLY_) \
_SEH_TRY_FILTER_FINALLY \
( \
_SEH_STATIC_FILTER(_SEH_CONTINUE_SEARCH), \
(FINALLY_) \
)
#define _SEH_END_FINALLY _SEH_HANDLE _SEH_END
#define _SEH_TRY_FILTER(FILTER_) \
_SEH_TRY_FILTER_FINALLY((FILTER_), NULL)
#define _SEH_TRY_HANDLE_FINALLY(FINALLY_) \
_SEH_TRY_FILTER_FINALLY \
( \
_SEH_STATIC_FILTER(_SEH_EXECUTE_HANDLER), \
(FINALLY_) \
)
#define _SEH_TRY \
_SEH_TRY_HANDLE_FINALLY(NULL)
#define _SEH_CALL_FILTER(FILTER_) \
_SEHCallFilter \
( \
(FILTER_), \
GetExceptionCode(), \
GetExceptionPointers(), \
_SEHPVLocals \
)
#define _SEH_CALL_FINALLY(FINALLY_) \
_SEHCallFinally((FINALLY_), (AbnormalTermination() != 0), _SEHPVLocals)
#define _SEH_TRY_FILTER_FINALLY(FILTER_, FINALLY_) \
__try \
{ \
_SEHFinally_t _SEHFinally = (FINALLY_); \
_SEHFilter_t _SEHFilter = (FILTER_); \
void * _SEHPVLocals = &_SEHLocals; \
(void)_SEHPVLocals; \
\
__try \
{
#define _SEH_HANDLE \
} \
__except(_SEH_CALL_FILTER(_SEHFilter)) \
{ \
struct _EXCEPTION_POINTERS * _SEHExceptionPointers = GetExceptionPointers();\
long _SEHExceptionCode = GetExceptionCode(); \
#define _SEH_END \
} \
} \
__finally \
{ \
_SEH_CALL_FINALLY(_SEHFinally); \
}
#define _SEH_LEAVE __leave
#define _SEH_GetExceptionCode() (_SEHExceptionCode)
#define _SEH_GetExceptionPointers() (_SEHExceptionPointers)
#define _SEH_AbnormalTermination() (_SEHAbnormalTermination)
/* New syntax */
#define _SEH2_TRY \
{ \
void * _SEHPVLocals = &_SEHLocals; \
(void)_SEHPVLocals; \
\
__try \
{
#define _SEH2_EXCEPT(FILTER_) \
} \
__except(_SEH_CALL_FILTER(FILTER_)) \
{ \
struct _EXCEPTION_POINTERS * _SEHExceptionPointers = GetExceptionPointers();\
long _SEHExceptionCode = GetExceptionCode(); \
#define _SEH2_FINALLY(FINALLY_) \
} \
__finally \
{ \
_SEH_CALL_FINALLY(FINALLY_)
#define _SEH2_END \
} \
}
#define _SEH2_HANDLE _SEH2_EXCEPT(_SEH_STATIC_FILTER(_SEH_EXECUTE_HANDLER))
#define _SEH2_LEAVE _SEH_LEAVE
#define _SEH2_GetExceptionCode _SEH_GetExceptionCode
#define _SEH2_GetExceptionPointers _SEH_GetExceptionPointers
#define _SEH2_AbnormalTermination _SEH_AbnormalTermination
#endif
/* EOF */

View File

@@ -1,46 +0,0 @@
#ifndef ROSDHCP_PUBLIC_H
#define ROSDHCP_PUBLIC_H
enum {
DhcpReqLeaseIpAddress,
DhcpReqQueryHWInfo,
DhcpReqReleaseIpAddress,
DhcpReqRenewIpAddress,
DhcpReqStaticRefreshParams,
};
typedef struct _COMM_DHCP_REQ {
UINT Type;
DWORD AdapterIndex;
union {
struct {
BOOL Inserted;
} PnpEvent;
struct {
LPWSTR AdapterName;
DHCPCAPI_PARAMS_ARRAY Params;
} RegisterParamChange;
struct {
LPWSTR AdapterName;
LPWSTR RequestId;
} RequestParams, UndoRequestParams;
struct {
DWORD IPAddress;
DWORD Netmask;
} StaticRefreshParams;
} Body;
} COMM_DHCP_REQ;
typedef union _COMM_DHCP_REPLY {
DWORD Reply;
struct {
DWORD AdapterIndex;
DWORD MediaType;
DWORD Mtu;
DWORD Speed;
} QueryHWInfo;
} COMM_DHCP_REPLY;
#define DHCP_PIPE_NAME "\\\\.\\pipe\\dhcpclient"
#endif/*ROSDHCP_PUBLIC_H*/

File diff suppressed because it is too large Load Diff

View File

@@ -1,42 +0,0 @@
/*
* Copyright 2005 Andreas Bjerkeholt
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <reactos/resource.h>
#include <defines.h>
#include "resource.h"
LANGUAGE LANG_SWEDISH, SUBLANG_DEFAULT
IDD_SECPAGE DIALOGEX 0, 0, 227, 215
STYLE WS_CHILD | WS_VISIBLE | WS_CAPTION
CAPTION "S<>kerhet"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
LTEXT "&Grupp eller anv<6E>ndarnamn:", -1, 7, 7, 105, 8
CONTROL "", IDC_ACELIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 7, 17, 213, 66, WS_EX_NOPARENTNOTIFY | WS_EX_CLIENTEDGE
PUSHBUTTON "&L<>gg till...", IDC_ACELIST_ADD, 116, 87, 50, 14
PUSHBUTTON "&Ta bort", IDC_ACELIST_REMOVE, 170, 87, 50, 14
LTEXT "Till<6C>t", -1, 135, 107, 32, 8, SS_CENTER
LTEXT "Neka", -1, 176, 107, 32, 8, SS_CENTER
END
STRINGTABLE DISCARDABLE
{
IDS_PSP_TITLE "Beh<65>righeter f<>r %1"
}

View File

@@ -1,87 +0,0 @@
/*
* Copyright 2005 Andreas Bjerkeholt
*
* 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
*/
LANGUAGE LANG_SWEDISH, SUBLANG_DEFAULT
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
CAPTION "Egenskaper f<>r "
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
PUSHBUTTON "Avbryt", IDCANCEL,58,122,50,14
PUSHBUTTON "&Verkst<73>ll", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
PUSHBUTTON "Hj<48>lp", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
END
IDD_WIZARD DIALOG DISCARDABLE 0, 0, 290, 159
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
CAPTION "Guide"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "Slutf<74>r", IDC_FINISH_BUTTON,121,138,50,14
DEFPUSHBUTTON "&N<>sta >", IDC_NEXT_BUTTON,121,138,50,14
PUSHBUTTON "< &F<>reg<65>ende", IDC_BACK_BUTTON,71,138,50,14
PUSHBUTTON "Avbryt", IDCANCEL,178,138,50,14
PUSHBUTTON "Hj<48>lp", IDHELP,235,138,50,14,WS_GROUP
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
END
IDD_TBCUSTOMIZE DIALOG DISCARDABLE 10, 20, 357, 125
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Anpassa verktygsf<73>ltet"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "&St<53>ng", IDCANCEL,308,6,44,14
PUSHBUTTON "&<26>terst<73>ll", IDC_RESET_BTN,308,23,44,14
PUSHBUTTON "&Hj<48>lp", IDC_HELP_BTN,308,40,44,14
PUSHBUTTON "Flytta &upp", IDC_MOVEUP_BTN,308,74,44,14
PUSHBUTTON "Flytta &ned", IDC_MOVEDN_BTN,308,91,44,14
LTEXT "T&illg<6C>ngliga knappar:", -1,4,5,84,10
LISTBOX IDC_AVAILBTN_LBOX,4,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
PUSHBUTTON "&L<>gg till ->", IDOK, 131, 42, 44, 14
PUSHBUTTON "<- &Ta bort", IDC_REMOVE_BTN,131,62,44,14
LTEXT "Knappar i v&erktygsf<73>ltet:", -1,182,5,85,10
LISTBOX IDC_TOOLBARBTN_LBOX, 182,17,120,100,LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
END
STRINGTABLE DISCARDABLE
{
IDS_CLOSE "St<53>ng"
}
STRINGTABLE DISCARDABLE
{
IDM_TODAY "Idag:"
IDM_GOTODAY "G<> till idag"
}
STRINGTABLE DISCARDABLE
{
IDS_SEPARATOR "Separator"
}
STRINGTABLE DISCARDABLE
{
HKY_NONE "Ingen"
}

View File

@@ -1,312 +0,0 @@
/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Display Control Panel
* FILE: lib/cpl/desk/screensaver.c
* PURPOSE: Screen saver property page
*
* PROGRAMMERS: Trevor McCort (lycan359@gmail.com)
*/
#include <windows.h>
#include <commctrl.h>
#include "resource.h"
#include <cpl.h>
#include <tchar.h>
#include "desk.h"
#define MAX_SCREENSAVERS 100
void AddListViewItems2();
void CheckRegScreenSaverIsSecure();
typedef struct {
BOOL bIsScreenSaver; /* Is this background a wallpaper */
TCHAR szFilename[MAX_PATH];
TCHAR szDisplayName[256];
} ScreenSaverItem;
int ImageListSelection = 0;
ScreenSaverItem g_ScreenSaverItems[MAX_SCREENSAVERS];
HWND g_hScreenBackgroundPage = NULL;
HWND g_hScreengroundList = NULL;
HWND ControlScreenSaverIsSecure = NULL;
void ListViewItemAreChanged(int itemIndex)
{
ScreenSaverItem *ScreenSaverItem = NULL;
ImageListSelection = itemIndex;
ScreenSaverItem = &g_ScreenSaverItems[ImageListSelection];
PropSheet_Changed(GetParent(g_hScreenBackgroundPage), g_hScreenBackgroundPage);
}
INT_PTR
CALLBACK
ScreenSaverPageProc(HWND hwndDlg,
UINT uMsg,
WPARAM wParam,
LPARAM lParam)
{
g_hScreenBackgroundPage = hwndDlg;
switch(uMsg) {
case WM_INITDIALOG:
{
g_hScreengroundList = GetDlgItem(g_hScreenBackgroundPage, IDC_SCREENS_CHOICES);
AddListViewItems2();
CheckRegScreenSaverIsSecure();
} break;
case WM_COMMAND:
{
DWORD controlId = LOWORD(wParam);
DWORD command = HIWORD(wParam);
switch(controlId) {
case IDC_SCREENS_POWER_BUTTON: // Start Powercfg.Cpl
{
if(command == BN_CLICKED)
WinExec("rundll32 shell32.dll,Control_RunDLL powercfg.cpl,,",SW_SHOWNORMAL);
} break;
case IDC_SCREENS_TESTSC: // Screensaver Preview
{
if(command == BN_CLICKED)
MessageBox(NULL, TEXT("That button doesn't do anything yet"), TEXT("Whoops"), MB_OK);
} break;
case IDC_SCREENS_DELETE: // Delete Screensaver
{
if(command == BN_CLICKED) {
if (ImageListSelection == 0) // Can NOT delete None sry:-)
return FALSE;
DeleteFileW(g_ScreenSaverItems[ImageListSelection].szFilename);
}
} break;
case IDC_SCREENS_SETTINGS: // Screensaver Settings
{
if(command == BN_CLICKED)
MessageBox(NULL, TEXT("That button doesn't do anything yet"), TEXT("Whoops"), MB_OK);
} break;
case IDC_SCREENS_USEPASSCHK: // Screensaver Is Secure
{
if(command == BN_CLICKED)
MessageBox(NULL, TEXT("That button doesn't do anything yet"), TEXT("Whoops"), MB_OK);
} break;
case IDC_SCREENS_TIME: // Delay before show screensaver
{
} break;
default:
break;
} break;
}
case WM_NOTIFY:
{
LPNMHDR lpnm = (LPNMHDR)lParam;
switch(lpnm->code) {
case PSN_APPLY:
{
return TRUE;
} break;
case LVN_ITEMCHANGED:
{
LPNMLISTVIEW nm = (LPNMLISTVIEW)lParam;
if((nm->uNewState & LVIS_SELECTED) == 0)
return FALSE;
ListViewItemAreChanged(nm->iItem);
break;
} break;
default:
break;
}
} break;
}
return FALSE;
}
void CheckRegScreenSaverIsSecure()
{
HKEY hKey;
TCHAR szBuffer[2];
DWORD bufferSize = sizeof(szBuffer);
DWORD varType = REG_SZ;
LONG result;
ControlScreenSaverIsSecure = GetDlgItem(g_hScreenBackgroundPage, IDC_SCREENS_USEPASSCHK);
RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("Control Panel\\Desktop"), 0, KEY_ALL_ACCESS, &hKey);
result = RegQueryValueEx(hKey, TEXT("ScreenSaverIsSecure"), 0, &varType, (LPBYTE)szBuffer, &bufferSize);
if(result == ERROR_SUCCESS)
if(_ttoi(szBuffer) == 1) {
SendMessage(ControlScreenSaverIsSecure, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
goto End;
}
SendMessage(ControlScreenSaverIsSecure, BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0);
End:
RegCloseKey(hKey);
}
/* Add the bitmaps in the C:\ReactOS directory and the current wallpaper if any */
void AddListViewItems2()
{
WIN32_FIND_DATA fd;
HANDLE hFind;
TCHAR szSearchPath[MAX_PATH];
LV_ITEM listItem;
LV_COLUMN dummy;
RECT clientRect;
HKEY regKey;
SHFILEINFO sfi;
HIMAGELIST himl;
HIMAGELIST g_hScreenShellImageList = NULL;
TCHAR wallpaperFilename[MAX_PATH];
DWORD bufferSize = sizeof(wallpaperFilename);
DWORD varType = REG_SZ;
LONG result;
UINT i = 0;
int g_ScreenlistViewItemCount = 0;
ScreenSaverItem *ScreenSaverItem = NULL;
GetClientRect(g_hScreengroundList, &clientRect);
ZeroMemory(&dummy, sizeof(LV_COLUMN));
dummy.mask = LVCF_SUBITEM | LVCF_WIDTH;
dummy.iSubItem = 0;
dummy.cx = (clientRect.right - clientRect.left) - GetSystemMetrics(SM_CXVSCROLL);
ListView_InsertColumn(g_hScreengroundList, 0, &dummy);
/* Add the "None" item */
ScreenSaverItem = &g_ScreenSaverItems[g_ScreenlistViewItemCount];
ScreenSaverItem->bIsScreenSaver = FALSE;
LoadString(hApplet,
IDS_NONE,
ScreenSaverItem->szDisplayName,
sizeof(ScreenSaverItem->szDisplayName) / sizeof(TCHAR));
ZeroMemory(&listItem, sizeof(LV_ITEM));
listItem.mask = LVIF_TEXT | LVIF_PARAM | LVIF_STATE | LVIF_IMAGE;
listItem.state = LVIS_SELECTED;
listItem.pszText = ScreenSaverItem->szDisplayName;
listItem.iImage = -1;
listItem.iItem = g_ScreenlistViewItemCount;
listItem.lParam = g_ScreenlistViewItemCount;
ListView_InsertItem(g_hScreengroundList, &listItem);
ListView_SetItemState(g_hScreengroundList, g_ScreenlistViewItemCount, LVIS_SELECTED, LVIS_SELECTED);
g_ScreenlistViewItemCount++;
/* Add current screensaver if any */
RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("Control Panel\\Desktop"), 0, KEY_ALL_ACCESS, &regKey);
result = RegQueryValueEx(regKey, TEXT("SCRNSAVE.EXE"), 0, &varType, (LPBYTE)wallpaperFilename, &bufferSize);
if((result == ERROR_SUCCESS) && (_tcslen(wallpaperFilename) > 0))
{
himl = (HIMAGELIST)SHGetFileInfo(wallpaperFilename,
0,
&sfi,
sizeof(sfi),
SHGFI_SYSICONINDEX | SHGFI_SMALLICON |
SHGFI_DISPLAYNAME);
if(himl != NULL)
{
if(i++ == 0)
{
g_hScreenShellImageList = himl;
ListView_SetImageList(g_hScreengroundList, himl, LVSIL_SMALL);
}
ScreenSaverItem = &g_ScreenSaverItems[g_ScreenlistViewItemCount];
ScreenSaverItem->bIsScreenSaver = TRUE;
_tcscpy(ScreenSaverItem->szDisplayName, sfi.szDisplayName);
_tcscpy(ScreenSaverItem->szFilename, wallpaperFilename);
ZeroMemory(&listItem, sizeof(LV_ITEM));
listItem.mask = LVIF_TEXT | LVIF_PARAM | LVIF_STATE | LVIF_IMAGE;
listItem.state = LVIS_SELECTED;
listItem.pszText = ScreenSaverItem->szDisplayName;
listItem.iImage = sfi.iIcon;
listItem.iItem = g_ScreenlistViewItemCount;
listItem.lParam = g_ScreenlistViewItemCount;
ListView_InsertItem(g_hScreengroundList, &listItem);
ListView_SetItemState(g_hScreengroundList, g_ScreenlistViewItemCount, LVIS_SELECTED, LVIS_SELECTED);
g_ScreenlistViewItemCount++;
}
}
RegCloseKey(regKey);
/* Add all the screensavers in the C:\ReactOS\System32 directory. */
GetSystemDirectory(szSearchPath, MAX_PATH);
_tcscat(szSearchPath, TEXT("\\*.scr"));
hFind = FindFirstFile(szSearchPath, &fd);
while(hFind != INVALID_HANDLE_VALUE)
{
/* Don't add any hidden screensavers */
if((fd.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) == 0)
{
TCHAR filename[MAX_PATH];
GetSystemDirectory(filename, MAX_PATH);
_tcscat(filename, TEXT("\\"));
_tcscat(filename, fd.cFileName);
himl = (HIMAGELIST)SHGetFileInfo(filename,
0,
&sfi,
sizeof(sfi),
SHGFI_SYSICONINDEX | SHGFI_SMALLICON |
SHGFI_DISPLAYNAME);
if(himl == NULL)
{
break;
}
if(i++ == 0)
{
g_hScreenShellImageList = himl;
ListView_SetImageList(g_hScreengroundList, himl, LVSIL_SMALL);
}
ScreenSaverItem = &g_ScreenSaverItems[g_ScreenlistViewItemCount];
ScreenSaverItem->bIsScreenSaver = TRUE;
_tcscpy(ScreenSaverItem->szDisplayName, sfi.szDisplayName);
_tcscpy(ScreenSaverItem->szFilename, filename);
ZeroMemory(&listItem, sizeof(LV_ITEM));
listItem.mask = LVIF_TEXT | LVIF_PARAM | LVIF_STATE | LVIF_IMAGE;
listItem.pszText = ScreenSaverItem->szDisplayName;
listItem.state = 0;
listItem.iImage = sfi.iIcon;
listItem.iItem = g_ScreenlistViewItemCount;
listItem.lParam = g_ScreenlistViewItemCount;
ListView_InsertItem(g_hScreengroundList, &listItem);
g_ScreenlistViewItemCount++;
}
if(!FindNextFile(hFind, &fd))
hFind = INVALID_HANDLE_VALUE;
}
}

View File

@@ -1,183 +0,0 @@
/*
* ReactOS
* Copyright (C) 2004, 2005 ReactOS Team
*
* 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.
*/
/* $Id$
*
* PROJECT: ReactOS International Control Panel
* FILE: lib/cpl/intl/locale.c
* PURPOSE: Locale property page
* PROGRAMMER: Eric Kohl
* Klemens Friedl
* Aleksey Bragin
*/
#define WINVER 0x0501
#include <windows.h>
#include <commctrl.h>
#include <cpl.h>
#include <stdio.h>
#include "intl.h"
#include "resource.h"
HWND hList;
BOOL CALLBACK LocalesEnumProc(
LPTSTR lpLocale // locale id
)
{
LCID lcid;
TCHAR lang[255];
int index;
swscanf(lpLocale, L"%lx", &lcid); // maybe use wcstoul?
GetLocaleInfo(lcid, LOCALE_SLANGUAGE, lang, sizeof(lang));
index = SendMessageW(hList,
CB_ADDSTRING,
0,
(LPARAM)lang);
SendMessageW(hList,
CB_SETITEMDATA,
index,
(LPARAM)lcid);
return TRUE;
}
static VOID
CreateLanguagesList(HWND hwnd)
{
TCHAR langSel[255];
hList = hwnd;
EnumSystemLocalesW(LocalesEnumProc, LCID_SUPPORTED);
// Select current locale
GetLocaleInfo(GetUserDefaultLCID(), LOCALE_SLANGUAGE, langSel, sizeof(langSel)); // or should it be System?
SendMessageW(hList,
CB_SELECTSTRING,
-1,
(LPARAM)langSel);
}
/*
static VOID
ShowLanguagesList(HWND hwnd)
{
TIME_ZONE_INFORMATION TimeZoneInfo;
PTIMEZONE_ENTRY Entry;
DWORD dwIndex;
DWORD i;
GetTimeZoneInformation(&TimeZoneInfo);
dwIndex = 0;
i = 0;
Entry = TimeZoneListHead;
while (Entry != NULL)
{
SendMessageW(hwnd,
CB_ADDSTRING,
0,
(LPARAM)Entry->Description);
if (!wcscmp(Entry->StandardName, TimeZoneInfo.StandardName))
dwIndex = i;
i++;
Entry = Entry->Next;
}
SendMessageW(hwnd,
CB_SETCURSEL,
(WPARAM)dwIndex,
0);
}
*/
/* Property page dialog callback */
INT_PTR CALLBACK
LocalePageProc(HWND hwndDlg,
UINT uMsg,
WPARAM wParam,
LPARAM lParam)
{
switch(uMsg)
{
case WM_INITDIALOG:
CreateLanguagesList(GetDlgItem(hwndDlg, IDC_LANGUAGELIST));
break;
case WM_COMMAND:
switch (LOWORD(wParam))
{
case IDC_LANGUAGELIST:
if (HIWORD(wParam) == CBN_SELCHANGE)
{
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
}
break;
}
break;
case WM_NOTIFY:
{
LPNMHDR lpnm = (LPNMHDR)lParam;
if (lpnm->code == PSN_APPLY)
{
// Apply changes
LCID NewLcid;
int iCurSel;
char tmp[100];
// Acquire new value
iCurSel = SendMessageW(hList,
CB_GETCURSEL,
0,
0);
if (iCurSel == CB_ERR)
break;
NewLcid = SendMessageW(hList,
CB_GETITEMDATA,
iCurSel,
0);
if (NewLcid == CB_ERR)
break;
//TOOD: Actually set new locale
sprintf(tmp, "%x, cursel=%d", NewLcid, iCurSel);
MessageBoxA(hwndDlg, tmp, "debug", MB_OK);
}
}
break;
}
return FALSE;
}
/* EOF */

View File

@@ -1,47 +0,0 @@
/*
* Swedish resources by Andreas Bjerkeholt
*
*/
LANGUAGE LANG_SWEDISH, SUBLANG_DEFAULT
IDD_DATETIMEPAGE DIALOGEX 0, 0, 252, 146
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Datum && Tid"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
GROUPBOX "&Datum", -1, 4, 2, 122, 125
CONTROL "", IDC_DATEPICKER, "SysDateTimePick32",
DTS_SHORTDATEFORMAT | WS_CHILD | WS_VISIBLE | WS_TABSTOP,
11, 17, 108, 12
CONTROL "", IDC_MONTHCALENDAR, "SysMonthCal32",
WS_CHILD | WS_VISIBLE | WS_TABSTOP,
11, 37, 108, 80
GROUPBOX "&Tid", -1, 132, 2, 113, 125
CONTROL "", IDC_TIMEPICKER, "SysDateTimePick32",
DTS_TIMEFORMAT | WS_CHILD | WS_VISIBLE | WS_TABSTOP,
144, 17, 90, 12
LTEXT "", IDC_TIMEZONE, 4, 136, 241, 8
END
IDD_TIMEZONEPAGE DIALOGEX 0, 0, 252, 146
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Tidszon"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
COMBOBOX IDC_TIMEZONELIST, 5, 4, 241, 136,
CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP
AUTOCHECKBOX "&Justera klockan automatiskt f<>r sommar- och vintertid",
IDC_AUTODAYLIGHT, 5, 136, 241, 10, WS_VISIBLE | WS_GROUP | WS_TABSTOP
END
STRINGTABLE
BEGIN
IDS_CPLNAME "Datum/Tid"
IDS_CPLDESCRIPTION "<22>ndrar information om datum, tid och tidszon."
IDS_TIMEZONETEXT "Aktuell tidszon: %s"
IDS_TIMEZONEINVALID "Felaktig"
IDS_TIMEZONEUNKNOWN "Ok<4F>nd"
END

View File

@@ -1,140 +0,0 @@
/* $Id: dllmain.c 12852 2005-01-06 13:58:04Z mf $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/dhcpcapi/dhcpcapi.c
* PURPOSE: Client API for DHCP
* PROGRAMMER: arty (ayerkes@speakeasy.net)
* UPDATE HISTORY:
* Created 12/04/2005
*/
#include <roscfg.h>
#include <winsock2.h>
#include <dhcpcsdk.h>
#include <rosdhcp_public.h>
#define DHCP_TIMEOUT 1000
#define EXPORT __declspec(dllexport) WINAPI
DWORD EXPORT DhcpCApiInitialize(LPDWORD Version) {
*Version = 2;
return 0;
}
VOID EXPORT DhcpCApiCleanup() {
}
DWORD EXPORT DhcpQueryHWInfo( DWORD AdapterIndex,
PDWORD MediaType,
PDWORD Mtu,
PDWORD Speed ) {
COMM_DHCP_REQ Req;
COMM_DHCP_REPLY Reply;
DWORD BytesRead;
BOOL Result;
Req.Type = DhcpReqQueryHWInfo;
Req.AdapterIndex = AdapterIndex;
Result = CallNamedPipe
( DHCP_PIPE_NAME, &Req, sizeof(Req), &Reply, sizeof(Reply),
&BytesRead, DHCP_TIMEOUT );
if( !Reply.Reply ) return 0;
else {
*MediaType = Reply.QueryHWInfo.MediaType;
*Mtu = Reply.QueryHWInfo.Mtu;
*Speed = Reply.QueryHWInfo.Speed;
return 1;
}
}
DWORD EXPORT DhcpLeaseIpAddress( DWORD AdapterIndex ) {
COMM_DHCP_REQ Req;
COMM_DHCP_REPLY Reply;
DWORD BytesRead;
BOOL Result;
Req.Type = DhcpReqLeaseIpAddress;
Req.AdapterIndex = AdapterIndex;
Result = CallNamedPipe
( DHCP_PIPE_NAME, &Req, sizeof(Req), &Reply, sizeof(Reply),
&BytesRead, DHCP_TIMEOUT );
return Reply.Reply;
}
DWORD EXPORT DhcpReleaseIpAddressLease( DWORD AdapterIndex ) {
COMM_DHCP_REQ Req;
COMM_DHCP_REPLY Reply;
DWORD BytesRead;
BOOL Result;
Req.Type = DhcpReqReleaseIpAddress;
Req.AdapterIndex = AdapterIndex;
Result = CallNamedPipe
( DHCP_PIPE_NAME, &Req, sizeof(Req), &Reply, sizeof(Reply),
&BytesRead, DHCP_TIMEOUT );
return Reply.Reply;
}
DWORD EXPORT DhcpRenewIpAddressLease( DWORD AdapterIndex ) {
COMM_DHCP_REQ Req;
COMM_DHCP_REPLY Reply;
DWORD BytesRead;
BOOL Result;
Req.Type = DhcpReqRenewIpAddress;
Req.AdapterIndex = AdapterIndex;
Result = CallNamedPipe
( DHCP_PIPE_NAME, &Req, sizeof(Req), &Reply, sizeof(Reply),
&BytesRead, DHCP_TIMEOUT );
return Reply.Reply;
}
DWORD EXPORT DhcpStaticRefreshParams( DWORD AdapterIndex,
DWORD Address,
DWORD Netmask ) {
COMM_DHCP_REQ Req;
COMM_DHCP_REPLY Reply;
DWORD BytesRead;
BOOL Result;
Req.Type = DhcpReqStaticRefreshParams;
Req.AdapterIndex = AdapterIndex;
Req.Body.StaticRefreshParams.IPAddress = Address;
Req.Body.StaticRefreshParams.Netmask = Netmask;
Result = CallNamedPipe
( DHCP_PIPE_NAME, &Req, sizeof(Req), &Reply, sizeof(Reply),
&BytesRead, DHCP_TIMEOUT );
return Reply.Reply;
}
INT STDCALL
DllMain(PVOID hinstDll,
ULONG dwReason,
PVOID reserved)
{
switch (dwReason)
{
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hinstDll);
break;
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
/* EOF */

View File

@@ -1,16 +0,0 @@
; $Id: dhcpcapi.def 14337 2005-03-26 22:10:04Z $
;
; dhcpcapi.def
;
; ReactOS Operating System
;
LIBRARY dhcpcapi.dll
EXPORTS
DhcpCApiInitialize@4
DhcpCApiCleanup@0
DhcpQueryHWInfo@16
DhcpLeaseIpAddress@4
DhcpReleaseIpAddressLease@4
DhcpRenewIpAddressLease@4
DhcpStaticRefreshParams@12
; EOF

View File

@@ -1,7 +0,0 @@
#include <defines.h>
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "DHCP Client API\0"
#define REACTOS_STR_INTERNAL_NAME "dhcpcapi\0"
#define REACTOS_STR_ORIGINAL_FILENAME "dhcpcapi.dll\0"
#include <reactos/version.rc>

View File

@@ -1,27 +0,0 @@
# $Id: makefile 12852 2005-01-06 13:58:04Z mf $
PATH_TO_TOP = ../..
TARGET_TYPE = dynlink
TARGET_NAME = dhcpcapi
TARGET_CFLAGS = -Wall -Werror \
-D__USE_W32API \
-D_WIN32_IE=0x0500 \
-D_WIN32_WINNT=0x501 \
-DWINVER=0x600 \
TARGET_LFLAGS = -nostartfiles -nostdlib
TARGET_SDKLIBS = ntdll.a kernel32.a
TARGET_OBJECTS = dhcpcapi.o
DEP_OBJECTS = $(TARGET_OBJECTS)
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
include $(TOOLS_PATH)/depend.mk

View File

@@ -1,15 +0,0 @@
SubDir ROS_TOP lib kbdru ;
# This stuff should actually be moved to Jamrules
# in order to more easily support other compilers
CCFLAGS += -Wall -fno-builtin ;
# NOTE - I'm no Jam expert, yet. This stuff should be
# abstracted into the Jamrules file.
LINKFLAGS = -nostartfiles -nostdlib -shared ;
LINKFLAGS += -Wl,--image-base,0x77F00000 -lgcc ;
SRCS = kbdru
SharedLibrary kbdru : $(SRCS) ;
LINKLIBS = ;

View File

@@ -1,452 +0,0 @@
/*
* ReactOS Russian ASCII Keyboard layout
* Copyright (C) 2005 ReactOS
* Author: Aleksey Bragin
* License: LGPL, see: LGPL.txt
*
* Thanks to: http://www.barcodeman.com/altek/mule/scandoc.php
* and http://win.tue.nl/~aeb/linux/kbd/scancodes-1.html
*/
#include <windows.h>
#include <internal/kbd.h>
#ifdef _M_IA64
#define ROSDATA static __declspec(allocate(".data"))
#else
#pragma data_seg(".data")
#define ROSDATA static
#endif
#define VK_EMPTY 0xff /* The non-existent VK */
#define KSHIFT 0x001 /* Shift modifier */
#define KCTRL 0x002 /* Ctrl modifier */
#define KALT 0x004 /* Alt modifier */
#define KEXT 0x100 /* Extended key code */
#define KMULTI 0x200 /* Multi-key */
#define KSPEC 0x400 /* Special key */
#define KNUMP 0x800 /* Number-pad */
#define KNUMS 0xc00 /* Special + number pad */
#define KMEXT 0x300 /* Multi + ext */
#define SHFT_INVALID 0x0F
/* Thanks to http://asp.flaaten.dk/pforum/keycode/keycode.htm */
#ifndef VK_OEM_1
#define VK_OEM_1 0xba
#endif
#ifndef VK_OEM_PLUS
#define VK_OEM_PLUS 0xbb
#endif
#ifndef VK_OEM_COMMA
#define VK_OEM_COMMA 0xbc
#endif
#ifndef VK_OEM_MINUS
#define VK_OEM_MINUS 0xbd
#endif
#ifndef VK_OEM_PERIOD
#define VK_OEM_PERIOD 0xbe
#endif
#ifndef VK_OEM_2
#define VK_OEM_2 0xbf
#endif
#ifndef VK_OEM_3
#define VK_OEM_3 0xc0
#endif
#ifndef VK_OEM_4
#define VK_OEM_4 0xdb
#endif
#ifndef VK_OEM_5
#define VK_OEM_5 0xdc
#endif
#ifndef VK_OEM_6
#define VK_OEM_6 0xdd
#endif
#ifndef VK_OEM_7
#define VK_OEM_7 0xde
#endif
#ifndef VK_OEM_8
#define VK_OEM_8 0xdf
#endif
#ifndef VK_OEM_AX
#define VK_OEM_AX 0xe1
#endif
#ifndef VK_OEM_102
#define VK_OEM_102 0xe1
#endif
ROSDATA USHORT scancode_to_vk[] = {
/* Numbers Row */
/* - 00 - */
/* 1 ... 2 ... 3 ... 4 ... */
VK_EMPTY, VK_ESCAPE, '1', '2',
'3', '4', '5', '6',
'7', '8', '9', '0',
VK_OEM_MINUS, VK_OEM_PLUS, VK_BACK,
/* - 0f - */
/* First Letters Row */
VK_TAB, 'Q', 'W', 'E',
'R', 'T', 'Y', 'U',
'I', 'O', 'P',
VK_OEM_4, VK_OEM_6, VK_RETURN,
/* - 1d - */
/* Second Letters Row */
VK_LCONTROL,
'A', 'S', 'D', 'F',
'G', 'H', 'J', 'K',
'L', VK_OEM_1, VK_OEM_7, VK_OEM_3,
VK_LSHIFT, VK_OEM_5,
/* - 2c - */
/* Third letters row */
'Z', 'X', 'C', 'V',
'B', 'N', 'M', VK_OEM_COMMA,
VK_OEM_PERIOD,VK_OEM_2, VK_RSHIFT | KEXT,
/* - 37 - */
/* Bottom Row */
0x26a, VK_LMENU, VK_SPACE, VK_CAPITAL,
/* - 3b - */
/* F-Keys */
VK_F1, VK_F2, VK_F3, VK_F4, VK_F5, VK_F6,
VK_F7, VK_F8, VK_F9, VK_F10,
/* - 45 - */
/* Locks */
VK_NUMLOCK | KMEXT,
VK_SCROLL | KMULTI,
/* - 47 - */
/* Number-Pad */
VK_HOME | KNUMS, VK_UP | KNUMS, VK_PRIOR | KNUMS, VK_SUBTRACT,
VK_LEFT | KNUMS, VK_CLEAR | KNUMS, VK_RIGHT | KNUMS, VK_ADD,
VK_END | KNUMS, VK_DOWN | KNUMS, VK_NEXT | KNUMS,
VK_INSERT | KNUMS, VK_DELETE | KNUMS,
/* - 54 - */
/* Presumably PrtSc */
VK_SNAPSHOT,
/* - 55 - */
/* Oddities, and the remaining standard F-Keys */
VK_EMPTY, VK_OEM_102, VK_F11, VK_F12,
/* - 59 - */
VK_CLEAR, VK_OEM_WSCTRL,VK_OEM_FINISH,VK_OEM_JUMP, VK_EREOF, /* EREOF */
VK_OEM_BACKTAB, VK_OEM_AUTO, VK_EMPTY, VK_ZOOM, /* ZOOM */
VK_HELP,
/* - 64 - */
/* Even more F-Keys (for example, NCR keyboards from the early 90's) */
VK_F13, VK_F14, VK_F15, VK_F16, VK_F17, VK_F18, VK_F19, VK_F20,
VK_F21, VK_F22, VK_F23,
/* - 6f - */
/* Not sure who uses these codes */
VK_OEM_PA3, VK_EMPTY, VK_OEM_RESET,
/* - 72 - */
VK_EMPTY, 0xc1, VK_EMPTY, VK_EMPTY,
/* - 76 - */
/* One more f-key */
VK_F24,
/* - 77 - */
VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY,
VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */
0,
/* - 80 - */
0
};
ROSDATA VSC_VK extcode0_to_vk[] = {
{ 0x10, VK_MEDIA_PREV_TRACK | KEXT },
{ 0x19, VK_MEDIA_NEXT_TRACK | KEXT },
{ 0x1D, VK_RCONTROL | KEXT },
{ 0x20, VK_VOLUME_MUTE | KEXT },
{ 0x21, VK_LAUNCH_APP2 | KEXT },
{ 0x22, VK_MEDIA_PLAY_PAUSE | KEXT },
{ 0x24, VK_MEDIA_STOP | KEXT },
{ 0x2E, VK_VOLUME_DOWN | KEXT },
{ 0x30, VK_VOLUME_UP | KEXT },
{ 0x32, VK_BROWSER_HOME | KEXT },
{ 0x35, VK_DIVIDE | KEXT },
{ 0x37, VK_SNAPSHOT | KEXT },
{ 0x38, VK_RMENU | KEXT },
{ 0x47, VK_HOME | KEXT },
{ 0x48, VK_UP | KEXT },
{ 0x49, VK_PRIOR | KEXT },
{ 0x4B, VK_LEFT | KEXT },
{ 0x4D, VK_RIGHT | KEXT },
{ 0x4F, VK_END | KEXT },
{ 0x50, VK_DOWN | KEXT },
{ 0x51, VK_NEXT | KEXT },
{ 0x52, VK_INSERT | KEXT },
{ 0x53, VK_DELETE | KEXT },
{ 0x5B, VK_LWIN | KEXT },
{ 0x5C, VK_RWIN | KEXT },
{ 0x5D, VK_APPS | KEXT },
{ 0x5F, VK_SLEEP | KEXT },
{ 0x65, VK_BROWSER_SEARCH | KEXT },
{ 0x66, VK_BROWSER_FAVORITES | KEXT },
{ 0x67, VK_BROWSER_REFRESH | KEXT },
{ 0x68, VK_BROWSER_STOP | KEXT },
{ 0x69, VK_BROWSER_FORWARD | KEXT },
{ 0x6A, VK_BROWSER_BACK | KEXT },
{ 0x6B, VK_LAUNCH_APP1 | KEXT },
{ 0x6C, VK_LAUNCH_MAIL | KEXT },
{ 0x6D, VK_LAUNCH_MEDIA_SELECT | KEXT },
{ 0x1C, VK_RETURN | KEXT },
{ 0x46, VK_CANCEL | KEXT },
{ 0, 0 },
};
ROSDATA VSC_VK extcode1_to_vk[] = {
{ 0x1d, VK_PAUSE},
{ 0, 0 },
};
ROSDATA VK_TO_BIT modifier_keys[] = {
{ VK_SHIFT, KSHIFT },
{ VK_CONTROL, KCTRL },
{ VK_MENU, KALT },
{ 0, 0 }
};
typedef struct _mymod {
PVOID mod_keys;
WORD maxmod;
BYTE mod_max[7];
} INTERNAL_KBD_MODIFIERS;
ROSDATA INTERNAL_KBD_MODIFIERS modifier_bits[] = {
modifier_keys,
3,
{ 0, 1, 2, 3, 0, 0, 0xC0 } /* Modifier bit order, NONE, SHIFT, CTRL, ALT, MENU, SHIFT + MENU, CTRL + MENU */
};
#define NOCAPS 0
#define CAPS KSHIFT /* Caps -> shift */
ROSDATA VK_TO_WCHARS2 key_to_chars_2mod[] = {
{VK_OEM_3, CAPS, 0x451, 0x401},
{ '1', NOCAPS, '1', '!' },
{ '3', NOCAPS, '3', 0x2116 },
{ '4', NOCAPS, '4', ';' },
{ '5', NOCAPS, '5', '%' },
{ '7', NOCAPS, '7', '?' },
{ '8', NOCAPS, '8', '*' },
{ '9', NOCAPS, '9', '(' },
{ '0', NOCAPS, '0', ')' },
{ VK_OEM_PLUS, NOCAPS, '=', '+' },
/* First letter row */
{ 'Q', CAPS, 0x439, 0x419 },
{ 'W', CAPS, 0x446, 0x426 },
{ 'E', CAPS, 0x443, 0x423 },
{ 'R', CAPS, 0x43a, 0x41a },
{ 'T', CAPS, 0x435, 0x415 },
{ 'Y', CAPS, 0x43d, 0x41d },
{ 'U', CAPS, 0x433, 0x413 },
{ 'I', CAPS, 0x448, 0x428 },
{ 'O', CAPS, 0x449, 0x429 },
{ 'P', CAPS, 0x437, 0x417 },
{ VK_OEM_4, CAPS, 0x445, 0x425 },
{ VK_OEM_6, CAPS, 0x44a, 0x42a },
/* Second letter row */
{ 'A', CAPS, 0x444, 0x424 },
{ 'S', CAPS, 0x44b, 0x42b },
{ 'D', CAPS, 0x432, 0x412 },
{ 'F', CAPS, 0x430, 0x410 },
{ 'G', CAPS, 0x43f, 0x41f },
{ 'H', CAPS, 0x440, 0x420 },
{ 'J', CAPS, 0x43e, 0x41e },
{ 'K', CAPS, 0x43b, 0x41b },
{ 'L', CAPS, 0x434, 0x414 },
{ VK_OEM_1, CAPS, 0x436, 0x416 },
{ VK_OEM_7, CAPS, 0x44d, 0x42d },
/* Third letter row */
{ 'Z', CAPS, 0x44f, 0x42f },
{ 'X', CAPS, 0x447, 0x427 },
{ 'C', CAPS, 0x441, 0x421 },
{ 'V', CAPS, 0x43c, 0x41c },
{ 'B', CAPS, 0x438, 0x418 },
{ 'N', CAPS, 0x442, 0x422 },
{ 'M', CAPS, 0x44c, 0x42c },
{ VK_OEM_COMMA,CAPS, 0x431, 0x411 },
{ VK_OEM_PERIOD,CAPS, 0x44e, 0x42e },
{ VK_OEM_2, NOCAPS, '.', ',' },
/* Specials */
{ 0x6e, NOCAPS, ',', ','},
{ VK_TAB, NOCAPS, 9, 9},
{ VK_ADD, NOCAPS, '+', '+' },
{ VK_DIVIDE, NOCAPS, '/', '/' },
{ VK_MULTIPLY, NOCAPS, '*', '*' },
{ VK_SUBTRACT, NOCAPS, '-', '-' },
{ 0, 0 }
};
ROSDATA VK_TO_WCHARS3 key_to_chars_3mod[] = {
/* Normal, Shifted, Ctrl */
/* Legacy (telnet-style) ascii escapes */
{ VK_OEM_5, NOCAPS, 0x5c,0x2f, 0x1c },
{ VK_OEM_102, NOCAPS, 0x5c,0x2f, 0x1c },
{ VK_BACK, NOCAPS, 0x8, 0x8, 0x7f },
{ VK_ESCAPE, NOCAPS, 0x1b, 0x1b, 0x1b },
{ VK_RETURN,NOCAPS, '\r', '\r', '\n' },
{ VK_SPACE, NOCAPS, ' ', ' ', ' ' },
{ VK_CANCEL, NOCAPS, 0x03, 0x03, 0x03 },
{ 0,0 }
};
ROSDATA VK_TO_WCHARS4 key_to_chars_4mod[] = {
/* Normal, Shifted, Ctrl, Ctrl-Alt */
/* Legacy Ascii generators */
{ '2', NOCAPS, '2', '\"', WCH_NONE,0},
{ '6', NOCAPS, '6', ':', WCH_NONE,0x001e},
{ VK_OEM_MINUS, NOCAPS, 0x2d, '_', WCH_NONE, 0x001f}, // different '-'
{ 0, 0 }
};
ROSDATA VK_TO_WCHARS1 keypad_numbers[] = {
{ VK_NUMPAD0, 0, '0' },
{ VK_NUMPAD1, 0, '1' },
{ VK_NUMPAD2, 0, '2' },
{ VK_NUMPAD3, 0, '3' },
{ VK_NUMPAD4, 0, '4' },
{ VK_NUMPAD5, 0, '5' },
{ VK_NUMPAD6, 0, '6' },
{ VK_NUMPAD7, 0, '7' },
{ VK_NUMPAD8, 0, '8' },
{ VK_NUMPAD9, 0, '9' },
{ 0,0 }
};
#define vk_master(n,x) { (PVK_TO_WCHARS1)x, n, sizeof(x[0]) }
ROSDATA VK_TO_WCHAR_TABLE vk_to_wchar_master_table[] = {
vk_master(3,key_to_chars_3mod),
vk_master(4,key_to_chars_4mod),
vk_master(2,key_to_chars_2mod),
vk_master(1,keypad_numbers),
{ 0,0,0 }
};
ROSDATA VSC_LPWSTR key_names[] = {
{ 0x01, L"Esc" },
{ 0x0e, L"Backspace" },
{ 0x0f, L"Tab" },
{ 0x1c, L"Enter" },
{ 0x1d, L"Ctrl" },
{ 0x2a, L"Shift" },
{ 0x36, L"Right Shift" },
{ 0x37, L"Num *" },
{ 0x38, L"Alt" },
{ 0x39, L"Space" },
{ 0x3a, L"Caps Lock" },
{ 0x3b, L"F1" },
{ 0x3c, L"F2" },
{ 0x3d, L"F3" },
{ 0x3e, L"F4" },
{ 0x3f, L"F5" },
{ 0x40, L"F6" },
{ 0x41, L"F7" },
{ 0x42, L"F8" },
{ 0x43, L"F9" },
{ 0x44, L"F10" },
{ 0x45, L"Pause" },
{ 0x46, L"Scroll Lock" },
{ 0x47, L"Num 7" },
{ 0x48, L"Num 8" },
{ 0x49, L"Num 9" },
{ 0x4a, L"Num -" },
{ 0x4b, L"Num 4" },
{ 0x4c, L"Num 5" },
{ 0x4d, L"Num 6" },
{ 0x4e, L"Num +" },
{ 0x4f, L"Num 1" },
{ 0x50, L"Num 2" },
{ 0x51, L"Num 3" },
{ 0x52, L"Num 0" },
{ 0x53, L"Num Del" },
{ 0x54, L"Sys Req" },
{ 0x57, L"F11" },
{ 0x58, L"F12" },
{ 0x7c, L"F13" },
{ 0x7d, L"F14" },
{ 0x7e, L"F15" },
{ 0x7f, L"F16" },
{ 0x80, L"F17" },
{ 0x81, L"F18" },
{ 0x82, L"F19" },
{ 0x83, L"F20" },
{ 0x84, L"F21" },
{ 0x85, L"F22" },
{ 0x86, L"F23" },
{ 0x87, L"F24" },
{ 0, NULL }
};
ROSDATA VSC_LPWSTR extended_key_names[] = {
{ 0x1c, L"Num Enter" },
{ 0x1d, L"Right Control" },
{ 0x35, L"Num /" },
{ 0x37, L"Prnt Scrn" },
{ 0x38, L"Right Alt" },
{ 0x45, L"Num Lock" },
{ 0x46, L"Break" },
{ 0x47, L"Home" },
{ 0x48, L"Up" },
{ 0x49, L"Page Up" },
{ 0x4b, L"Left" },
//{ 0x4c, L"Center" },
{ 0x4d, L"Right" },
{ 0x4f, L"End" },
{ 0x50, L"Down" },
{ 0x51, L"Page Down" },
{ 0x52, L"Insert" },
{ 0x53, L"Delete" },
{ 0x54, L"<ReactOS>" },
{ 0x56, L"Help" },
{ 0x5b, L"Left <ReactOS>" },
{ 0x5c, L"Right <ReactOS>" },
{ 0x5d, L"Application" },
{ 0, NULL }
};
/* Finally, the master table */
ROSDATA KBDTABLES keyboard_layout_table = {
/* modifier assignments */
(PMODIFIERS)&modifier_bits,
/* character from vk tables */
vk_to_wchar_master_table,
/* diacritical marks */
NULL,
/* Key names */
(VSC_LPWSTR *)key_names,
(VSC_LPWSTR *)extended_key_names,
NULL, /* Dead key names */
/* scan code to virtual key maps */
scancode_to_vk,
sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]),
extcode0_to_vk,
extcode1_to_vk,
MAKELONG(0,1), /* Version 1.0 */
/* Ligatures -- Russian doesn't have any */
0,
0,
NULL
};
PKBDTABLES STDCALL KbdLayerDescriptor() {
return &keyboard_layout_table;
}
INT STDCALL
DllMain(
PVOID hinstDll,
ULONG dwReason,
PVOID reserved)
{
return 1;
}

View File

@@ -1,8 +0,0 @@
;
; ReactOS Operating System
;
LIBRARY kbdru.dll
EXPORTS
KbdLayerDescriptor@0
;EOF

View File

@@ -1,5 +0,0 @@
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS RU Keyboard Layout\0"
#define REACTOS_STR_INTERNAL_NAME "kbdru\0"
#define REACTOS_STR_ORIGINAL_FILENAME "kbdru.dll\0"
#include <reactos/version.rc>

View File

@@ -1,39 +0,0 @@
# $Id: makefile 12852 2005-01-06 13:58:04Z mf $
PATH_TO_TOP = ../..
TARGET_TYPE = dynlink
TARGET_NAME = kbdru
TARGET_BASE = 0x5500000
TARGET_CFLAGS = -I$(PATH_TO_TOP)/ntoskrnl/include
# require os code to explicitly request A/W version of structs/functions
TARGET_CFLAGS += -D_DISABLE_TIDENTS
TARGET_LFLAGS = -nostartfiles -nostdlib
TARGET_SDKLIBS =
TARGET_GCCLIBS = gcc
TARGET_PCH =
TARGET_CLEAN =
TARGET_OBJECTS = kbdru.o
DEP_OBJECTS = $(TARGET_OBJECTS)
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
include $(TOOLS_PATH)/depend.mk
%/TAGS:
etags -o $(@D)/TAGS $(@D)/\*.c
etags: ./TAGS

View File

@@ -1,15 +0,0 @@
SubDir ROS_TOP lib kbdsg ;
# This stuff should actually be moved to Jamrules
# in order to more easily support other compilers
CCFLAGS += -Wall -fno-builtin ;
# NOTE - I'm no Jam expert, yet. This stuff should be
# abstracted into the Jamrules file.
LINKFLAGS = -nostartfiles -nostdlib -shared ;
LINKFLAGS += -Wl,--image-base,0x77F00000 -lgcc ;
SRCS = kbdsg
SharedLibrary kbdsg : $(SRCS) ;
LINKLIBS = ;

View File

@@ -1,529 +0,0 @@
/*
* ReactOS German (Switzerland) ASCII Keyboard layout
* Copyright (C) 2005 ReactOS
* License: LGPL, see: LGPL.txt
*
* Thanks to: http://www.barcodeman.com/altek/mule/scandoc.php
* and http://www.win.tue.nl/~aeb/linux/kbd/scancodes-1.html
* and http://www.unicode.org/charts/
*/
#include <windows.h>
#include <internal/kbd.h>
#ifdef _M_IA64
#define ROSDATA static __declspec(allocate(".data"))
#else
#pragma data_seg(".data")
#define ROSDATA static
#endif
#define VK_EMPTY 0xff /* The non-existent VK */
#define KSHIFT 0x001 /* Shift modifier */
#define KCTRL 0x002 /* Ctrl modifier */
#define KALT 0x004 /* Alt modifier */
#define KEXT 0x100 /* Extended key code */
#define KMULTI 0x200 /* Multi-key */
#define KSPEC 0x400 /* Special key */
#define KNUMP 0x800 /* Number-pad */
#define KNUMS 0xc00 /* Special + number pad */
#define KMEXT 0x300 /* Multi + ext */
#define SHFT_INVALID 0x0F
/* Thanks to http://asp.flaaten.dk/pforum/keycode/keycode.htm */
#ifndef VK_OEM_1
#define VK_OEM_1 0xba
#endif
#ifndef VK_OEM_PLUS
#define VK_OEM_PLUS 0xbb /* actually this is <20> ! ] on the Swiss German Keyboard */
#endif
#ifndef VK_OEM_COMMA
#define VK_OEM_COMMA 0xbc
#endif
#ifndef VK_OEM_MINUS
#define VK_OEM_MINUS 0xbd
#endif
#ifndef VK_OEM_PERIOD
#define VK_OEM_PERIOD 0xbe
#endif
#ifndef VK_OEM_2
#define VK_OEM_2 0xbf
#endif
#ifndef VK_OEM_3
#define VK_OEM_3 0xc0
#endif
#ifndef VK_OEM_4
#define VK_OEM_4 0xdb
#endif
#ifndef VK_OEM_5
#define VK_OEM_5 0xdc
#endif
#ifndef VK_OEM_6
#define VK_OEM_6 0xdd
#endif
#ifndef VK_OEM_7
#define VK_OEM_7 0xde
#endif
#ifndef VK_OEM_8
#define VK_OEM_8 0xdf
#endif
#ifndef VK_OEM_102
#define VK_OEM_102 0xe1
#endif
ROSDATA USHORT scancode_to_vk[] = {
/* Numbers Row */
/* - 00 - */
/* 1 ... 2 ... 3 ... 4 ... */
VK_EMPTY, VK_ESCAPE, '1', '2',
'3', '4', '5', '6',
'7', '8', '9', '0',
VK_OEM_4, VK_OEM_6, VK_BACK,
/* - 0f - */
/* First Letters Row */
VK_TAB, 'Q', 'W', 'E',
'R', 'T', 'Z', 'U',
'I', 'O', 'P',
VK_OEM_1, VK_OEM_PLUS, VK_RETURN,
/* - 1d - */
/* Second Letters Row */
VK_LCONTROL,
'A', 'S', 'D', 'F',
'G', 'H', 'J', 'K',
'L', VK_OEM_3, VK_OEM_7, VK_OEM_5,
/* - 2c - */
/* Third letters row */
VK_LSHIFT, VK_OEM_2,
'Y', 'X', 'C', 'V',
'B', 'N', 'M', VK_OEM_COMMA,
VK_OEM_PERIOD, VK_OEM_MINUS, VK_RSHIFT,
/* - 37 - */
/* Bottom Row */
VK_MULTIPLY, VK_LMENU, VK_SPACE, VK_CAPITAL,
/* - 3b - */
/* F-Keys */
VK_F1, VK_F2, VK_F3, VK_F4, VK_F5, VK_F6,
VK_F7, VK_F8, VK_F9, VK_F10,
/* - 45 - */
/* Locks */
VK_NUMLOCK | KMEXT,
VK_SCROLL | KMULTI,
/* - 47 - */
/* Number-Pad */
VK_HOME | KNUMS, VK_UP | KNUMS, VK_PRIOR | KNUMS, VK_SUBTRACT,
VK_LEFT | KNUMS, VK_CLEAR | KNUMS, VK_RIGHT | KNUMS, VK_ADD,
VK_END | KNUMS, VK_DOWN | KNUMS, VK_NEXT | KNUMS,
VK_INSERT | KNUMS, VK_DELETE | KNUMS,
/* - 54 - */
/* Presumably PrtSc */
VK_SNAPSHOT,
/* - 55 - */
/* Oddities, and the remaining standard F-Keys */
VK_EMPTY, VK_OEM_102, VK_F11, VK_F12,
/* - 59 - */
VK_CLEAR, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* EREOF */
VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* ZOOM */
VK_HELP,
/* - 64 - */
/* Even more F-Keys (for example, NCR keyboards from the early 90's) */
VK_F13, VK_F14, VK_F15, VK_F16, VK_F17, VK_F18, VK_F19, VK_F20,
VK_F21, VK_F22, VK_F23,
/* - 6f - */
/* Not sure who uses these codes */
VK_EMPTY, VK_EMPTY, VK_EMPTY,
/* - 72 - */
VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY,
/* - 76 - */
/* One more f-key */
VK_F24,
/* - 77 - */
VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY,
VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */
VK_EMPTY,
/* - 80 - */
0
};
ROSDATA VSC_VK extcode0_to_vk[] = {
{ 0x10, VK_MEDIA_PREV_TRACK | KEXT },
{ 0x19, VK_MEDIA_NEXT_TRACK | KEXT },
{ 0x1D, VK_RCONTROL | KEXT },
{ 0x20, VK_VOLUME_MUTE | KEXT },
{ 0x21, VK_LAUNCH_APP2 | KEXT },
{ 0x22, VK_MEDIA_PLAY_PAUSE | KEXT },
{ 0x24, VK_MEDIA_STOP | KEXT },
{ 0x2E, VK_VOLUME_DOWN | KEXT },
{ 0x30, VK_VOLUME_UP | KEXT },
{ 0x32, VK_BROWSER_HOME | KEXT },
{ 0x35, VK_DIVIDE | KEXT },
{ 0x37, VK_SNAPSHOT | KEXT },
{ 0x38, VK_RMENU | KEXT },
{ 0x47, VK_HOME | KEXT },
{ 0x48, VK_UP | KEXT },
{ 0x49, VK_PRIOR | KEXT },
{ 0x4B, VK_LEFT | KEXT },
{ 0x4D, VK_RIGHT | KEXT },
{ 0x4F, VK_END | KEXT },
{ 0x50, VK_DOWN | KEXT },
{ 0x51, VK_NEXT | KEXT },
{ 0x52, VK_INSERT | KEXT },
{ 0x53, VK_DELETE | KEXT },
{ 0x5B, VK_LWIN | KEXT },
{ 0x5C, VK_RWIN | KEXT },
{ 0x5D, VK_APPS | KEXT },
{ 0x5F, VK_SLEEP | KEXT },
{ 0x65, VK_BROWSER_SEARCH | KEXT },
{ 0x66, VK_BROWSER_FAVORITES | KEXT },
{ 0x67, VK_BROWSER_REFRESH | KEXT },
{ 0x68, VK_BROWSER_STOP | KEXT },
{ 0x69, VK_BROWSER_FORWARD | KEXT },
{ 0x6A, VK_BROWSER_BACK | KEXT },
{ 0x6B, VK_LAUNCH_APP1 | KEXT },
{ 0x6C, VK_LAUNCH_MAIL | KEXT },
{ 0x6D, VK_LAUNCH_MEDIA_SELECT | KEXT },
{ 0x1C, VK_RETURN | KEXT },
{ 0x46, VK_CANCEL | KEXT },
{ 0, 0 },
};
ROSDATA VSC_VK extcode1_to_vk[] = {
{ 0x1d, VK_PAUSE},
{ 0, 0 },
};
ROSDATA VK_TO_BIT modifier_keys[] = {
{ VK_SHIFT, KSHIFT },
{ VK_CONTROL, KCTRL },
{ VK_MENU, KALT },
{ 0, 0 }
};
typedef struct _mymod {
PVOID mod_keys;
WORD maxmod;
BYTE mod_max[7];
} INTERNAL_KBD_MODIFIERS;
ROSDATA INTERNAL_KBD_MODIFIERS modifier_bits[] = {
modifier_keys,
6,
{ 0, 1, 3, 4, SHFT_INVALID, SHFT_INVALID, 2 } /* Modifier bit order, NONE, SHIFT, CTRL, ALT, MENU, SHIFT + MENU, CTRL + MENU */
};
/* ############################################ */
/* ############################################ */
/* ############################################ */
/* ############################################ */
/* ############################################ */
#define NOCAPS 0
#define CAPS KSHIFT /* Caps -> shift */
ROSDATA VK_TO_WCHARS2 key_to_chars_2mod[] = {
{ VK_OEM_5, NOCAPS, 0xa7, 0xb0}, /* <20> <20> */
/* Normal vs Shifted */
/* The numbers */
/* Ctrl-2 generates NUL */
{ 0xff, NOCAPS, 0xa7, 0x9B }, /* what is this for? */
{ '4', NOCAPS, '4', 0xE7 },
{ '5', NOCAPS, '5', '%' },
{ '9', NOCAPS, '9', ')' },
{ '0', NOCAPS, '0', '=' },
/* First letter row */
{ 'W', CAPS, 'w', 'W' },
{ 'R', CAPS, 'r', 'R' },
{ 'T', CAPS, 't', 'T' },
{ 'Z', CAPS, 'z', 'Z' },
{ 'U', CAPS, 'u', 'U' },
{ 'I', CAPS, 'i', 'I' },
{ 'O', CAPS, 'o', 'O' },
{ 'P', CAPS, 'p', 'P' },
/* Second letter row */
{ 'A', CAPS, 'a', 'A' },
{ 'S', CAPS, 's', 'S' },
{ 'D', CAPS, 'd', 'D' },
{ 'F', CAPS, 'f', 'F' },
{ 'G', CAPS, 'g', 'G' },
{ 'H', CAPS, 'h', 'H' },
{ 'J', CAPS, 'j', 'J' },
{ 'K', CAPS, 'k', 'K' },
{ 'L', CAPS, 'l', 'L' },
/* Third letter row */
{ 'Y', CAPS, 'y', 'Y' },
{ 'X', CAPS, 'x', 'X' },
{ 'V', CAPS, 'v', 'V' },
{ 'B', CAPS, 'b', 'B' },
{ 'N', CAPS, 'n', 'N' },
/* Specials */
{ VK_OEM_COMMA, NOCAPS, ',', ';' },
{ VK_OEM_PERIOD, NOCAPS, '.', ':' },
{ VK_OEM_MINUS, NOCAPS, '-', '_' },
{ VK_DECIMAL, NOCAPS, '.', '.' },
{ VK_TAB, NOCAPS, '\t', '\t' },
{ VK_ADD, NOCAPS, '+', '+' },
{ VK_DIVIDE, NOCAPS, 0x2f, 0x2f }, /* '/' */
{ VK_MULTIPLY, NOCAPS, '*', '*' },
{ VK_SUBTRACT, NOCAPS, '-', '-' },
{ 0, 0 }
};
ROSDATA VK_TO_WCHARS3 key_to_chars_3mod[] = {
/* Normal, Shifted, Alt Gr */
/* Legacy (telnet-style) ascii escapes */
{ VK_OEM_4, NOCAPS, '\'' , '?' , WCH_DEAD }, /* ' ? <20> */
{ 0xff, NOCAPS, WCH_NONE, WCH_NONE, 0xb4 },
{ 'Q', CAPS, 'q', 'Q', '@' },
{ 'C', CAPS, 'c', 'C', 0xa9}, /* c C Copyright-Sign */
{ 'E', CAPS, 'e', 'E', 0x20ac }, /* e E <20> */
{ 'M', CAPS, 'm', 'M', 0xb5 }, /* m M mu-Sign */
{ VK_OEM_102, NOCAPS, '<', '>', '\\' },
{ 0,0 }
};
ROSDATA VK_TO_WCHARS4 key_to_chars_4mod[] = {
/* Normal, Shifted, Alt Gr, C-S-x */
/* Legacy Ascii generators */
{ VK_BACK, NOCAPS, '\b', '\b', WCH_NONE, 0x7f },
{ VK_ESCAPE, NOCAPS, 0x1b, 0x1b, WCH_NONE, 0x1b },
{ VK_RETURN, NOCAPS, '\r', '\r', WCH_NONE, '\n' },
{ VK_SPACE, NOCAPS, ' ', ' ', WCH_NONE, ' ' },
{ VK_CANCEL, NOCAPS, 0x03, 0x03, WCH_NONE, 0x03 },
{ 0, 0 }
};
ROSDATA VK_TO_WCHARS5 key_to_chars_5mod[] = {
/* Normal, Shifted, Alt Gr, Ctrl */
{ '1', NOCAPS, '1', '+', '|', WCH_NONE, 0x00 },
{ '2', NOCAPS, '2', '\"', '@', WCH_NONE, 0x00 },
{ '3', NOCAPS, '3', '*', '#', WCH_NONE, 0x00 },
{ '6', NOCAPS, '6', '&', 0xac, WCH_NONE, 0x00 },
{ '7', NOCAPS, '7', '/', 0xa6, WCH_NONE, 0x00 },
{ '8', NOCAPS, '8', '(', 0xa2, WCH_NONE, 0x00 },
{ VK_OEM_1, KCTRL, 0xfc, 0xe8, 0x5b, 0Xdc, 0xc8 }, /* <20> <20> [ <20> <20> */
{ VK_OEM_2, NOCAPS, 0x24, 0xa3, 0x7d, WCH_NONE, 0x00 }, /* $ <20> } */
{ VK_OEM_3, KCTRL, 0xf6, 0xe9, WCH_NONE, 0xd6, 0xc9 }, /* <20> <20> <20> <20>*/
{ VK_OEM_6, NOCAPS, WCH_DEAD, WCH_DEAD, WCH_DEAD, WCH_NONE, 0x00 }, /* ^ ` ~ */
{ 0xff, NOCAPS, 0x5e , 0x27 , 0x7e , WCH_NONE, 0x00 },
{ VK_OEM_7, KCTRL, 0xe4, 0xe0, 0x7b, 0xc4, 0xc0 }, /* <20> <20> { <20> <20> */
{ VK_OEM_PLUS, NOCAPS, WCH_DEAD, 0x21 , 0x5D , WCH_NONE, 0x00 }, /* <20> ! ] */
{ 0xff, NOCAPS, 0xa8 , WCH_NONE, WCH_NONE, WCH_NONE, 0x00 },
{ 0, 0 }
};
ROSDATA VK_TO_WCHARS1 keypad_numbers[] = {
{ VK_DECIMAL, 0, '.' }, /* I have no idea why this has to be like this. Shouldn't it be a "."? */
{ VK_NUMPAD0, 0, '0' },
{ VK_NUMPAD1, 0, '1' },
{ VK_NUMPAD2, 0, '2' },
{ VK_NUMPAD3, 0, '3' },
{ VK_NUMPAD4, 0, '4' },
{ VK_NUMPAD5, 0, '5' },
{ VK_NUMPAD6, 0, '6' },
{ VK_NUMPAD7, 0, '7' },
{ VK_NUMPAD8, 0, '8' },
{ VK_NUMPAD9, 0, '9' },
// { VK_BACK, 0, '\010' },
{ 0,0 }
};
#define vk_master(n,x) { (PVK_TO_WCHARS1)x, n, sizeof(x[0]) }
ROSDATA VK_TO_WCHAR_TABLE vk_to_wchar_master_table[] = {
vk_master(3,key_to_chars_3mod),
vk_master(4,key_to_chars_4mod),
vk_master(5,key_to_chars_5mod),
vk_master(2,key_to_chars_2mod),
vk_master(1,keypad_numbers),
{ 0,0,0 }
};
ROSDATA VSC_LPWSTR key_names[] = {
{ 0x00, L"" },
{ 0x01, L"Esc" },
{ 0x0e, L"R\x00fc" L"ck" },
{ 0x0f, L"Tabulator" },
{ 0x1c, L"Eingabe" },
{ 0x1d, L"Ctrl" },
{ 0x2a, L"Umschalt Links" },
{ 0x36, L"Umschalt Rechts" },
{ 0x37, L" (Zehnertastatur)" },
{ 0x38, L"Alt" },
{ 0x39, L"Leer" },
{ 0x3a, L"Caps Lock" },
{ 0x3b, L"F1" },
{ 0x3c, L"F2" },
{ 0x3d, L"F3" },
{ 0x3e, L"F4" },
{ 0x3f, L"F5" },
{ 0x40, L"F6" },
{ 0x41, L"F7" },
{ 0x42, L"F8" },
{ 0x43, L"F9" },
{ 0x44, L"F10" },
{ 0x45, L"Pause" },
{ 0x46, L"Rollen-Feststell" },
{ 0x47, L"7 (Zehnertastatur)" },
{ 0x48, L"8 (Zehnertastatur)" },
{ 0x49, L"9 (Zehnertastatur)" },
{ 0x4a, L"- (Zehnertastatur)" },
{ 0x4b, L"4 (Zehnertastatur)" },
{ 0x4c, L"5 (Zehnertastatur)" },
{ 0x4d, L"6 (Zehnertastatur)" },
{ 0x4e, L"+ (Zehnertastatur)" },
{ 0x4f, L"1 (Zehnertastatur)" },
{ 0x50, L"2 (Zehnertastatur)" },
{ 0x51, L"3 (Zehnertastatur)" },
{ 0x52, L"0 (Zehnertastatur)" },
{ 0x53, L"Punkt (Zehnertastatur)" },
{ 0x54, L"Sys Req" },
{ 0x57, L"F11" },
{ 0x58, L"F12" },
{ 0x7c, L"F13" },
{ 0x7d, L"F14" },
{ 0x7e, L"F15" },
{ 0x7f, L"F16" },
{ 0x80, L"F17" },
{ 0x81, L"F18" },
{ 0x82, L"F19" },
{ 0x83, L"F20" },
{ 0x84, L"F21" },
{ 0x85, L"F22" },
{ 0x86, L"F23" },
{ 0x87, L"F24" },
{ 0, NULL },
};
ROSDATA VSC_LPWSTR extended_key_names[] = {
{ 0x1c, L"Eingabe (Zehnertastatur" },
{ 0x1d, L"Strg-Rechts" },
{ 0x35, L" (Zehnertastatur)" },
{ 0x37, L"Druck" },
{ 0x38, L"Alt Gr" },
{ 0x45, L"Num-Feststell" },
{ 0x46, L"Untbr" },
{ 0x47, L"Pos1" },
{ 0x48, L"Nach-Oben" },
{ 0x49, L"Bild-Nach-Oben" },
{ 0x4b, L"Nach-Links" },
//{ 0x4c, L"Center" },
{ 0x4d, L"Nach-Rechts" },
{ 0x4f, L"Ende" },
{ 0x50, L"Nach-Unten" },
{ 0x51, L"Bild-Nach-Unten" },
{ 0x52, L"Einfg" },
{ 0x53, L"Entf" },
{ 0x54, L"<ReactOS>" },
{ 0x55, L"Hilfe" },
{ 0x56, L"Linke <ReactOS>" },
{ 0x5b, L"Rechte <ReactOS>" },
{ 0, NULL },
};
ROSDATA DEADKEY_LPWSTR dead_key_names[] = {
L"\x00b4" L"Akut",
L"`" L"Gravis",
L"^" L"Zirkumflex",
NULL
};
#define DEADTRANS(ch, accent, comp, flags) MAKELONG(ch, accent), comp, flags
ROSDATA DEADKEY dead_key[] = {
{ DEADTRANS(L'a', L'^', 0xe2, 0x00) },/* ^ */
{ DEADTRANS(L'e', L'^', 0xea, 0x00) },
{ DEADTRANS(L'i', L'^', 0xee, 0x00) },
{ DEADTRANS(L'o', L'^', 0xf4, 0x00) },
{ DEADTRANS(L'u', L'^', 0xfb, 0x00) },
{ DEADTRANS(L'A', L'^', 0xc2, 0x00) },
{ DEADTRANS(L'E', L'^', 0xca, 0x00) },
{ DEADTRANS(L'I', L'^', 0xce, 0x00) },
{ DEADTRANS(L'O', L'^', 0xd4, 0x00) },
{ DEADTRANS(L'U', L'^', 0xdb, 0x00) },
{ DEADTRANS(L' ', L'^', L'^', 0x00) },
{ DEADTRANS(L'a', 0xb4, 0xe1, 0x00) }, /* <20> */
{ DEADTRANS(L'e', 0xb4, 0xe9, 0x00) },
{ DEADTRANS(L'i', 0xb4, 0xed, 0x00) },
{ DEADTRANS(L'o', 0xb4, 0xf3, 0x00) },
{ DEADTRANS(L'u', 0xb4, 0xfa, 0x00) },
{ DEADTRANS(L'y', 0xb4, 0xfd, 0x00) },
{ DEADTRANS(L'A', 0xb4, 0xc1, 0x00) },
{ DEADTRANS(L'E', 0xb4, 0xc9, 0x00) },
{ DEADTRANS(L'I', 0xb4, 0xcd, 0x00) },
{ DEADTRANS(L'O', 0xb4, 0xd3, 0x00) },
{ DEADTRANS(L'U', 0xb4, 0xda, 0x00) },
{ DEADTRANS(L'Y', 0xb4, 0xdd, 0x00) },
{ DEADTRANS(L' ', 0xb4, 0xb4, 0x00) },
{ DEADTRANS(L'a', L'`', 0xe0, 0x00) }, /* ` */
{ DEADTRANS(L'e', L'`', 0xe8, 0x00) },
{ DEADTRANS(L'i', L'`', 0xec, 0x00) },
{ DEADTRANS(L'o', L'`', 0xf2, 0x00) },
{ DEADTRANS(L'u', L'`', 0xf9, 0x00) },
{ DEADTRANS(L'A', L'`', 0xc0, 0x00) },
{ DEADTRANS(L'E', L'`', 0xc8, 0x00) },
{ DEADTRANS(L'I', L'`', 0xcc, 0x00) },
{ DEADTRANS(L'O', L'`', 0xd2, 0x00) },
{ DEADTRANS(L'U', L'`', 0xd9, 0x00) },
{ DEADTRANS(L' ', L'`', L'`', 0x00) },
{ DEADTRANS(L' ', 0xa8, 0xa8, 0x00) }, /* <20> */
{ DEADTRANS(L'a', 0xa8, 0xe4, 0x00) },
{ DEADTRANS(L'e', 0xa8, 0xeb, 0x00) },
{ DEADTRANS(L'i', 0xa8, 0xef, 0x00) },
{ DEADTRANS(L'o', 0xa8, 0xf6, 0x00) },
{ DEADTRANS(L'u', 0xa8, 0xfc, 0x00) },
{ DEADTRANS(L'y', 0xa8, 0xff, 0x00) },
{ DEADTRANS(L'A', 0xa8, 0xc4, 0x00) },
{ DEADTRANS(L'E', 0xa8, 0xcb, 0x00) },
{ DEADTRANS(L'I', 0xa8, 0xcf, 0x00) },
{ DEADTRANS(L'O', 0xa8, 0xd6, 0x00) },
{ DEADTRANS(L'U', 0xa8, 0xdc, 0x00) },
{ DEADTRANS(L' ', 0x7e, 0x7e, 0x00) }, /* ~ */
{ DEADTRANS(L'a', 0x7e, 0xe3, 0x00) },
{ DEADTRANS(L'o', 0x7e, 0xf5, 0x00) },
{ DEADTRANS(L'n', 0x7e, 0xf1, 0x00) },
{ DEADTRANS(L'A', 0x7e, 0xc3, 0x00) },
{ DEADTRANS(L'O', 0x7e, 0xd5, 0x00) },
{ DEADTRANS(L'N', 0x7e, 0xd1, 0x00) },
{ 0, 0 }
};
/* Finally, the master table */
ROSDATA KBDTABLES keyboard_layout_table = {
/* modifier assignments */
(PMODIFIERS)&modifier_bits,
/* character from vk tables */
vk_to_wchar_master_table,
/* diacritical marks -- currently implemented by wine code */
dead_key,
/* Key names */
(VSC_LPWSTR *)key_names,
(VSC_LPWSTR *)extended_key_names,
dead_key_names, /* Dead key names */
/* scan code to virtual key maps */
scancode_to_vk,
sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]),
extcode0_to_vk,
extcode1_to_vk,
MAKELONG(1,1), /* Version 1.0 */
/* Ligatures -- German doesn't have any */
0,
0,
NULL
};
PKBDTABLES STDCALL KbdLayerDescriptor() {
return &keyboard_layout_table;
}

View File

@@ -1,8 +0,0 @@
;
; ReactOS Operating System
;
LIBRARY kbdsg.dll
EXPORTS
KbdLayerDescriptor@0
;EOF

View File

@@ -1,5 +0,0 @@
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS German (Switzerland) Keyboard Layout\0"
#define REACTOS_STR_INTERNAL_NAME "kbdsg\0"
#define REACTOS_STR_ORIGINAL_FILENAME "kbdsg.dll\0"
#include <reactos/version.rc>

View File

@@ -1,41 +0,0 @@
# $Id$
PATH_TO_TOP = ../..
TARGET_TYPE = dynlink
TARGET_NAME = kbdsg
TARGET_BASE = 0x5500000
TARGET_ENTRY = 0x00000000
TARGET_CFLAGS = -I$(PATH_TO_TOP)/ntoskrnl/include
# require os code to explicitly request A/W version of structs/functions
TARGET_CFLAGS += -D_DISABLE_TIDENTS
TARGET_LFLAGS = -nostartfiles -nostdlib
TARGET_SDKLIBS =
TARGET_GCCLIBS = gcc
TARGET_PCH =
TARGET_CLEAN =
TARGET_OBJECTS = kbdsg.o
DEP_OBJECTS = $(TARGET_OBJECTS)
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
include $(TOOLS_PATH)/depend.mk
%/TAGS:
etags -o $(@D)/TAGS $(@D)/\*.c
etags: ./TAGS

File diff suppressed because it is too large Load Diff

View File

@@ -1,236 +0,0 @@
/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/kernel32/misc/version.c
* PURPOSE: Version functions
* PROGRAMMER: Ariadne ( ariadne@xs4all.nl)
* UPDATE HISTORY:
* Created 01/11/98
*/
#include <k32.h>
#define NDEBUG
#include "../include/debug.h"
/* FUNCTIONS ******************************************************************/
/*
* @implemented
*/
DWORD
STDCALL
GetVersion(VOID)
{
PPEB pPeb = NtCurrentPeb();
DWORD nVersion;
nVersion = MAKEWORD(pPeb->OSMajorVersion, pPeb->OSMinorVersion);
/* behave consistently when posing as another operating system */
/* build number */
if(pPeb->OSPlatformId != VER_PLATFORM_WIN32_WINDOWS)
nVersion |= ((DWORD)(pPeb->OSBuildNumber)) << 16;
/* non-NT platform flag */
if(pPeb->OSPlatformId != VER_PLATFORM_WIN32_NT)
nVersion |= 0x80000000;
return nVersion;
}
/*
* @implemented
*/
BOOL
STDCALL
GetVersionExW(
LPOSVERSIONINFOW lpVersionInformation
)
{
NTSTATUS Status;
if(lpVersionInformation->dwOSVersionInfoSize != sizeof(OSVERSIONINFOW) &&
lpVersionInformation->dwOSVersionInfoSize != sizeof(OSVERSIONINFOEXW))
{
/* for some reason win sets ERROR_INSUFFICIENT_BUFFER even if it is large
enough but doesn't match the exact sizes supported, ERROR_INVALID_PARAMETER
would've been much more appropriate... */
SetLastError(ERROR_INSUFFICIENT_BUFFER);
return FALSE;
}
Status = RtlGetVersion((PRTL_OSVERSIONINFOW)lpVersionInformation);
if(NT_SUCCESS(Status))
{
int ln, maxlen;
/* append a reactos specific string to the szCSDVersion string */
/* FIXME - we shouldn't do this when there is a (ros-specific) compatibility
flag set so we don't screw applications that might depend on a
certain string */
ln = wcslen(lpVersionInformation->szCSDVersion) + 1;
maxlen = (sizeof(lpVersionInformation->szCSDVersion) / sizeof(lpVersionInformation->szCSDVersion[0]) - 1);
if(maxlen > ln)
{
PWCHAR szVer = lpVersionInformation->szCSDVersion + ln;
RtlZeroMemory(szVer, (maxlen - ln + 1) * sizeof(WCHAR));
wcsncpy(szVer,
L"ReactOS " KERNEL_VERSION_STR L" (Build " KERNEL_VERSION_BUILD_STR L")",
maxlen - ln);
}
return TRUE;
}
return FALSE;
}
/*
* @implemented
*/
BOOL
STDCALL
GetVersionExA(
LPOSVERSIONINFOA lpVersionInformation
)
{
OSVERSIONINFOEXW viw;
RtlZeroMemory(&viw, sizeof(viw));
switch(lpVersionInformation->dwOSVersionInfoSize)
{
case sizeof(OSVERSIONINFOA):
viw.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW);
break;
case sizeof(OSVERSIONINFOEXA):
viw.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXW);
break;
default:
/* for some reason win sets ERROR_INSUFFICIENT_BUFFER even if it is large
enough but doesn't match the exact sizes supported, ERROR_INVALID_PARAMETER
would've been much more appropriate... */
SetLastError(ERROR_INSUFFICIENT_BUFFER);
return FALSE;
}
if(GetVersionExW((LPOSVERSIONINFOW)&viw))
{
ANSI_STRING CSDVersionA;
UNICODE_STRING CSDVersionW;
/* copy back fields that match both supported structures */
lpVersionInformation->dwMajorVersion = viw.dwMajorVersion;
lpVersionInformation->dwMinorVersion = viw.dwMinorVersion;
lpVersionInformation->dwBuildNumber = viw.dwBuildNumber;
lpVersionInformation->dwPlatformId = viw.dwPlatformId;
/* convert the win version string */
RtlInitUnicodeString(&CSDVersionW, viw.szCSDVersion);
CSDVersionA.Length = 0;
CSDVersionA.MaximumLength = sizeof(lpVersionInformation->szCSDVersion);
CSDVersionA.Buffer = lpVersionInformation->szCSDVersion;
RtlUnicodeStringToAnsiString(&CSDVersionA, &CSDVersionW, FALSE);
/* convert the ReactOS version string */
CSDVersionW.Buffer = viw.szCSDVersion + CSDVersionW.Length / sizeof(WCHAR) + 1;
CSDVersionW.MaximumLength = sizeof(viw.szCSDVersion) - (CSDVersionW.Length + sizeof(WCHAR));
CSDVersionW.Length = wcslen(CSDVersionW.Buffer) * sizeof(WCHAR);
CSDVersionA.Buffer = lpVersionInformation->szCSDVersion + CSDVersionA.Length + 1;
CSDVersionA.MaximumLength = sizeof(lpVersionInformation->szCSDVersion) - (CSDVersionA.Length + 1);
CSDVersionA.Length = 0;
RtlUnicodeStringToAnsiString(&CSDVersionA, &CSDVersionW, FALSE);
/* copy back the extended fields */
if(viw.dwOSVersionInfoSize == sizeof(OSVERSIONINFOEXW))
{
((LPOSVERSIONINFOEXA)lpVersionInformation)->wServicePackMajor = viw.wServicePackMajor;
((LPOSVERSIONINFOEXA)lpVersionInformation)->wServicePackMinor = viw.wServicePackMinor;
((LPOSVERSIONINFOEXA)lpVersionInformation)->wSuiteMask = viw.wSuiteMask;
((LPOSVERSIONINFOEXA)lpVersionInformation)->wProductType = viw.wProductType;
((LPOSVERSIONINFOEXA)lpVersionInformation)->wReserved = viw.wReserved;
}
return TRUE;
}
return FALSE;
}
/*
* @implemented
*/
BOOL
STDCALL
VerifyVersionInfoW(
LPOSVERSIONINFOEXW lpVersionInformation,
DWORD dwTypeMask,
DWORDLONG dwlConditionMask
)
{
NTSTATUS Status;
Status = RtlVerifyVersionInfo((PRTL_OSVERSIONINFOEXW)lpVersionInformation,
dwTypeMask,
dwlConditionMask);
switch(Status)
{
case STATUS_INVALID_PARAMETER:
SetLastError(ERROR_BAD_ARGUMENTS);
return FALSE;
case STATUS_REVISION_MISMATCH:
SetLastError(ERROR_OLD_WIN_VERSION);
return FALSE;
default:
/* RtlVerifyVersionInfo shouldn't report any other failure code! */
ASSERT(NT_SUCCESS(Status));
return TRUE;
}
}
/*
* @implemented
*/
BOOL
STDCALL
VerifyVersionInfoA(
LPOSVERSIONINFOEXA lpVersionInformation,
DWORD dwTypeMask,
DWORDLONG dwlConditionMask
)
{
OSVERSIONINFOEXW viex;
viex.dwOSVersionInfoSize = sizeof(viex);
viex.dwMajorVersion = lpVersionInformation->dwMajorVersion;
viex.dwMinorVersion = lpVersionInformation->dwMinorVersion;
viex.dwBuildNumber = lpVersionInformation->dwBuildNumber;
viex.dwPlatformId = lpVersionInformation->dwPlatformId;
/* NOTE: szCSDVersion is ignored, we don't need to convert it to unicode */
viex.wServicePackMajor = lpVersionInformation->wServicePackMajor;
viex.wServicePackMinor = lpVersionInformation->wServicePackMinor;
viex.wSuiteMask = lpVersionInformation->wSuiteMask;
viex.wProductType = lpVersionInformation->wProductType;
viex.wReserved = lpVersionInformation->wReserved;
return VerifyVersionInfoW(&viex, dwTypeMask, dwlConditionMask);
}
/* EOF */

View File

@@ -1,99 +0,0 @@
/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/ntdll/rtl/process.c
* PURPOSE: Process functions
* PROGRAMMER: Ariadne ( ariadne@xs4all.nl)
* UPDATE HISTORY:
* Created 01/11/98
*/
/* INCLUDES ****************************************************************/
#include <ddk/ntddk.h>
#include <windows.h>
#include <napi/i386/segment.h>
#include <ntdll/ldr.h>
#include <ntdll/base.h>
#include <ntdll/rtl.h>
#define NDEBUG
#include <ntdll/ntdll.h>
/* FUNCTIONS ****************************************************************/
PPEB
STDCALL
RtlpCurrentPeb(VOID)
{
return NtCurrentPeb();
}
/*
* @implemented
*/
VOID STDCALL
RtlAcquirePebLock(VOID)
{
PPEB Peb = NtCurrentPeb ();
Peb->FastPebLockRoutine (Peb->FastPebLock);
}
/*
* @implemented
*/
VOID STDCALL
RtlReleasePebLock(VOID)
{
PPEB Peb = NtCurrentPeb ();
Peb->FastPebUnlockRoutine (Peb->FastPebLock);
}
/*
* @implemented
*/
NTSTATUS STDCALL
RtlGetVersion(RTL_OSVERSIONINFOW *Info)
{
if (Info->dwOSVersionInfoSize == sizeof(RTL_OSVERSIONINFOW) ||
Info->dwOSVersionInfoSize == sizeof(RTL_OSVERSIONINFOEXW))
{
PPEB Peb = NtCurrentPeb();
Info->dwMajorVersion = Peb->OSMajorVersion;
Info->dwMinorVersion = Peb->OSMinorVersion;
Info->dwBuildNumber = Peb->OSBuildNumber;
Info->dwPlatformId = Peb->OSPlatformId;
if(((Peb->OSCSDVersion >> 8) & 0xFF) != 0)
{
int i = _snwprintf(Info->szCSDVersion,
(sizeof(Info->szCSDVersion) / sizeof(Info->szCSDVersion[0])) - 1,
L"Service Pack %d",
((Peb->OSCSDVersion >> 8) & 0xFF));
Info->szCSDVersion[i] = L'\0';
}
else
{
RtlZeroMemory(Info->szCSDVersion, sizeof(Info->szCSDVersion));
}
if (Info->dwOSVersionInfoSize == sizeof(RTL_OSVERSIONINFOEXW))
{
RTL_OSVERSIONINFOEXW *InfoEx = (RTL_OSVERSIONINFOEXW *)Info;
InfoEx->wServicePackMajor = (Peb->OSCSDVersion >> 8) & 0xFF;
InfoEx->wServicePackMinor = Peb->OSCSDVersion & 0xFF;
InfoEx->wSuiteMask = SharedUserData->SuiteMask;
InfoEx->wProductType = SharedUserData->NtProductType;
}
return STATUS_SUCCESS;
}
return STATUS_INVALID_PARAMETER;
}
/* EOF */

View File

@@ -1,68 +0,0 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: lib/rtl/access.c
* PURPOSE: Access rights handling functions
*
* PROGRAMMERS: Eric Kohl
*/
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#include <ntdll/rtl.h>
#define NDEBUG
#include <debug.h>
/* FUNCTIONS ***************************************************************/
/*
* @implemented
*/
BOOLEAN STDCALL
RtlAreAllAccessesGranted(ACCESS_MASK GrantedAccess,
ACCESS_MASK DesiredAccess)
{
PAGED_CODE_RTL();
return ((GrantedAccess & DesiredAccess) == DesiredAccess);
}
/*
* @implemented
*/
BOOLEAN STDCALL
RtlAreAnyAccessesGranted(ACCESS_MASK GrantedAccess,
ACCESS_MASK DesiredAccess)
{
PAGED_CODE_RTL();
return ((GrantedAccess & DesiredAccess) != 0);
}
/*
* @implemented
*/
VOID STDCALL
RtlMapGenericMask(PACCESS_MASK AccessMask,
PGENERIC_MAPPING GenericMapping)
{
PAGED_CODE_RTL();
if (*AccessMask & GENERIC_READ)
*AccessMask |= GenericMapping->GenericRead;
if (*AccessMask & GENERIC_WRITE)
*AccessMask |= GenericMapping->GenericWrite;
if (*AccessMask & GENERIC_EXECUTE)
*AccessMask |= GenericMapping->GenericExecute;
if (*AccessMask & GENERIC_ALL)
*AccessMask |= GenericMapping->GenericAll;
*AccessMask &= ~(GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE | GENERIC_ALL);
}
/* EOF */

View File

@@ -1,302 +0,0 @@
/*
* ReactOS kernel
* Copyright (C) 2004 ReactOS Team
* Copyright 1997 Marcus Meissner
* Copyright 1998 Patrik Stridvall
* Copyright 1998, 2003 Andreas Mohr
* Copyright 1997, 2003 Alexandre Julliard
*
* 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.
*/
/* $Id$
*
* PROJECT: ReactOS kernel
* PURPOSE: Runtime code
* FILE: lib/rtl/version.c
* PROGRAMER: Filip Navara
*/
/* INCLUDES *****************************************************************/
#define __USE_W32API
#include <ddk/ntddk.h>
#include <ntdll/rtl.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ******************************************************************/
NTSTATUS
STDCALL
RtlGetVersion(
OUT PRTL_OSVERSIONINFOW lpVersionInformation
);
/* FUNCTIONS ****************************************************************/
/*
* @implemented
*/
NTSTATUS
STDCALL
RtlVerifyVersionInfo(
IN PRTL_OSVERSIONINFOEXW VersionInfo,
IN ULONG TypeMask,
IN ULONGLONG ConditionMask
)
{
RTL_OSVERSIONINFOEXW ver;
NTSTATUS status;
/* FIXME:
- Check the following special case on Windows (various versions):
o lp->wSuiteMask == 0 and ver.wSuiteMask != 0 and VER_AND/VER_OR
o lp->dwOSVersionInfoSize != sizeof(OSVERSIONINFOEXW)
- MSDN talks about some tests being impossible. Check what really happens.
*/
ver.dwOSVersionInfoSize = sizeof(ver);
if ((status = RtlGetVersion( (PRTL_OSVERSIONINFOW)&ver )) != STATUS_SUCCESS) return status;
if(!(TypeMask && ConditionMask)) return STATUS_INVALID_PARAMETER;
if(TypeMask & VER_PRODUCT_TYPE)
switch(ConditionMask >> 7*3 & 0x07) {
case VER_EQUAL:
if(ver.wProductType != VersionInfo->wProductType) return STATUS_REVISION_MISMATCH;
break;
case VER_GREATER:
if(ver.wProductType <= VersionInfo->wProductType) return STATUS_REVISION_MISMATCH;
break;
case VER_GREATER_EQUAL:
if(ver.wProductType < VersionInfo->wProductType) return STATUS_REVISION_MISMATCH;
break;
case VER_LESS:
if(ver.wProductType >= VersionInfo->wProductType) return STATUS_REVISION_MISMATCH;
break;
case VER_LESS_EQUAL:
if(ver.wProductType > VersionInfo->wProductType) return STATUS_REVISION_MISMATCH;
break;
default:
return STATUS_INVALID_PARAMETER;
}
if(TypeMask & VER_SUITENAME)
switch(ConditionMask >> 6*3 & 0x07)
{
case VER_AND:
if((VersionInfo->wSuiteMask & ver.wSuiteMask) != VersionInfo->wSuiteMask)
return STATUS_REVISION_MISMATCH;
break;
case VER_OR:
if(!(VersionInfo->wSuiteMask & ver.wSuiteMask) && VersionInfo->wSuiteMask)
return STATUS_REVISION_MISMATCH;
break;
default:
return STATUS_INVALID_PARAMETER;
}
if(TypeMask & VER_PLATFORMID)
switch(ConditionMask >> 3*3 & 0x07)
{
case VER_EQUAL:
if(ver.dwPlatformId != VersionInfo->dwPlatformId) return STATUS_REVISION_MISMATCH;
break;
case VER_GREATER:
if(ver.dwPlatformId <= VersionInfo->dwPlatformId) return STATUS_REVISION_MISMATCH;
break;
case VER_GREATER_EQUAL:
if(ver.dwPlatformId < VersionInfo->dwPlatformId) return STATUS_REVISION_MISMATCH;
break;
case VER_LESS:
if(ver.dwPlatformId >= VersionInfo->dwPlatformId) return STATUS_REVISION_MISMATCH;
break;
case VER_LESS_EQUAL:
if(ver.dwPlatformId > VersionInfo->dwPlatformId) return STATUS_REVISION_MISMATCH;
break;
default:
return STATUS_INVALID_PARAMETER;
}
if(TypeMask & VER_BUILDNUMBER)
switch(ConditionMask >> 2*3 & 0x07)
{
case VER_EQUAL:
if(ver.dwBuildNumber != VersionInfo->dwBuildNumber) return STATUS_REVISION_MISMATCH;
break;
case VER_GREATER:
if(ver.dwBuildNumber <= VersionInfo->dwBuildNumber) return STATUS_REVISION_MISMATCH;
break;
case VER_GREATER_EQUAL:
if(ver.dwBuildNumber < VersionInfo->dwBuildNumber) return STATUS_REVISION_MISMATCH;
break;
case VER_LESS:
if(ver.dwBuildNumber >= VersionInfo->dwBuildNumber) return STATUS_REVISION_MISMATCH;
break;
case VER_LESS_EQUAL:
if(ver.dwBuildNumber > VersionInfo->dwBuildNumber) return STATUS_REVISION_MISMATCH;
break;
default:
return STATUS_INVALID_PARAMETER;
}
if(TypeMask & VER_MAJORVERSION)
switch(ConditionMask >> 1*3 & 0x07)
{
case VER_EQUAL:
if(ver.dwMajorVersion != VersionInfo->dwMajorVersion) return STATUS_REVISION_MISMATCH;
break;
case VER_GREATER:
if(ver.dwMajorVersion <= VersionInfo->dwMajorVersion) return STATUS_REVISION_MISMATCH;
break;
case VER_GREATER_EQUAL:
if(ver.dwMajorVersion < VersionInfo->dwMajorVersion) return STATUS_REVISION_MISMATCH;
break;
case VER_LESS:
if(ver.dwMajorVersion >= VersionInfo->dwMajorVersion) return STATUS_REVISION_MISMATCH;
break;
case VER_LESS_EQUAL:
if(ver.dwMajorVersion > VersionInfo->dwMajorVersion) return STATUS_REVISION_MISMATCH;
break;
default:
return STATUS_INVALID_PARAMETER;
}
if(TypeMask & VER_MINORVERSION)
switch(ConditionMask >> 0*3 & 0x07)
{
case VER_EQUAL:
if(ver.dwMinorVersion != VersionInfo->dwMinorVersion) return STATUS_REVISION_MISMATCH;
break;
case VER_GREATER:
if(ver.dwMinorVersion <= VersionInfo->dwMinorVersion) return STATUS_REVISION_MISMATCH;
break;
case VER_GREATER_EQUAL:
if(ver.dwMinorVersion < VersionInfo->dwMinorVersion) return STATUS_REVISION_MISMATCH;
break;
case VER_LESS:
if(ver.dwMinorVersion >= VersionInfo->dwMinorVersion) return STATUS_REVISION_MISMATCH;
break;
case VER_LESS_EQUAL:
if(ver.dwMinorVersion > VersionInfo->dwMinorVersion) return STATUS_REVISION_MISMATCH;
break;
default:
return STATUS_INVALID_PARAMETER;
}
if(TypeMask & VER_SERVICEPACKMAJOR)
switch(ConditionMask >> 5*3 & 0x07)
{
case VER_EQUAL:
if(ver.wServicePackMajor != VersionInfo->wServicePackMajor) return STATUS_REVISION_MISMATCH;
break;
case VER_GREATER:
if(ver.wServicePackMajor <= VersionInfo->wServicePackMajor) return STATUS_REVISION_MISMATCH;
break;
case VER_GREATER_EQUAL:
if(ver.wServicePackMajor < VersionInfo->wServicePackMajor) return STATUS_REVISION_MISMATCH;
break;
case VER_LESS:
if(ver.wServicePackMajor >= VersionInfo->wServicePackMajor) return STATUS_REVISION_MISMATCH;
break;
case VER_LESS_EQUAL:
if(ver.wServicePackMajor > VersionInfo->wServicePackMajor) return STATUS_REVISION_MISMATCH;
break;
default:
return STATUS_INVALID_PARAMETER;
}
if(TypeMask & VER_SERVICEPACKMINOR)
switch(ConditionMask >> 4*3 & 0x07)
{
case VER_EQUAL:
if(ver.wServicePackMinor != VersionInfo->wServicePackMinor) return STATUS_REVISION_MISMATCH;
break;
case VER_GREATER:
if(ver.wServicePackMinor <= VersionInfo->wServicePackMinor) return STATUS_REVISION_MISMATCH;
break;
case VER_GREATER_EQUAL:
if(ver.wServicePackMinor < VersionInfo->wServicePackMinor) return STATUS_REVISION_MISMATCH;
break;
case VER_LESS:
if(ver.wServicePackMinor >= VersionInfo->wServicePackMinor) return STATUS_REVISION_MISMATCH;
break;
case VER_LESS_EQUAL:
if(ver.wServicePackMinor > VersionInfo->wServicePackMinor) return STATUS_REVISION_MISMATCH;
break;
default:
return STATUS_INVALID_PARAMETER;
}
return STATUS_SUCCESS;
}
/*
Header hell made me do it, don't blame me. Please move these somewhere more
sensible
*/
#define VER_EQUAL 1
#define VER_GREATER 2
#define VER_GREATER_EQUAL 3
#define VER_LESS 4
#define VER_LESS_EQUAL 5
#define VER_AND 6
#define VER_OR 7
#define VER_CONDITION_MASK 7
#define VER_NUM_BITS_PER_CONDITION_MASK 3
#define VER_MINORVERSION 0x0000001
#define VER_MAJORVERSION 0x0000002
#define VER_BUILDNUMBER 0x0000004
#define VER_PLATFORMID 0x0000008
#define VER_SERVICEPACKMINOR 0x0000010
#define VER_SERVICEPACKMAJOR 0x0000020
#define VER_SUITENAME 0x0000040
#define VER_PRODUCT_TYPE 0x0000080
/*
* @implemented
*/
ULONGLONG NTAPI
VerSetConditionMask(IN ULONGLONG dwlConditionMask,
IN DWORD dwTypeBitMask,
IN BYTE dwConditionMask)
{
if(dwTypeBitMask == 0)
return dwlConditionMask;
dwConditionMask &= VER_CONDITION_MASK;
if(dwConditionMask == 0)
return dwlConditionMask;
if(dwTypeBitMask & VER_PRODUCT_TYPE)
dwlConditionMask |= dwConditionMask << 7 * VER_NUM_BITS_PER_CONDITION_MASK;
else if(dwTypeBitMask & VER_SUITENAME)
dwlConditionMask |= dwConditionMask << 6 * VER_NUM_BITS_PER_CONDITION_MASK;
else if(dwTypeBitMask & VER_SERVICEPACKMAJOR)
dwlConditionMask |= dwConditionMask << 5 * VER_NUM_BITS_PER_CONDITION_MASK;
else if(dwTypeBitMask & VER_SERVICEPACKMINOR)
dwlConditionMask |= dwConditionMask << 4 * VER_NUM_BITS_PER_CONDITION_MASK;
else if(dwTypeBitMask & VER_PLATFORMID)
dwlConditionMask |= dwConditionMask << 3 * VER_NUM_BITS_PER_CONDITION_MASK;
else if(dwTypeBitMask & VER_BUILDNUMBER)
dwlConditionMask |= dwConditionMask << 2 * VER_NUM_BITS_PER_CONDITION_MASK;
else if(dwTypeBitMask & VER_MAJORVERSION)
dwlConditionMask |= dwConditionMask << 1 * VER_NUM_BITS_PER_CONDITION_MASK;
else if(dwTypeBitMask & VER_MINORVERSION)
dwlConditionMask |= dwConditionMask << 0 * VER_NUM_BITS_PER_CONDITION_MASK;
return dwlConditionMask;
}
/* EOF */

View File

@@ -1,36 +0,0 @@
PATH_TO_TOP = ../..
TARGET_TYPE = dynlink
TARGET_NAME = serialui
TARGET_BASE = $(TARGET_BASE_LIB_SERIALUI)
TARGET_CFLAGS = \
-I./include \
-Wall \
-Werror \
-fno-builtin \
-DUNICODE \
-DLE \
-DDBG \
-D__USE_W32API
TARGET_LFLAGS = -nostartfiles -nostdlib
TARGET_SDKLIBS = kernel32.a user32.a shlwapi.a
TARGET_OBJECTS = serialui.o
DEP_OBJECTS := $(TARGET_OBJECTS)
TARGET_CLEAN = $(DEP_FILES)
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
include $(TOOLS_PATH)/depend.mk
# EOF

View File

@@ -1,32 +0,0 @@
#define IDS_EVENPARITY 2001
#define IDS_MARKPARITY 2002
#define IDS_NOPARITY 2003
#define IDS_ODDPARITY 2004
#define IDS_SPACEPARITY 2005
#define IDS_ONESTOPBIT 2006
#define IDS_ONE5STOPBITS 2007
#define IDS_TWOSTOPBITS 2008
#define IDS_FC_NO 2009
#define IDS_FC_CTSRTS 2010
#define IDS_FC_XONXOFF 2011
#define IDS_TITLE 2012
#define IDD_COMMDLG 1000
#define IDC_GRP1 1001
#define IDC_OKBTN 1002
#define IDC_CANCELBTN 1003
#define IDC_BTN 1004
#define IDC_STC1 1005
#define IDC_STC2 1006
#define IDC_STC3 1007
#define IDC_STC4 1008
#define IDC_STC5 1009
#define IDC_BAUDRATE 1010
#define IDC_BYTESIZE 1011
#define IDC_PARITY 1012
#define IDC_STOPBITS 1013
#define IDC_FLOW 1014
#define IDC_RESTOREBTN 1015

View File

@@ -1,418 +0,0 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS SerialUI DLL
* FILE: serialui.c
* PUROPSE: A dialog box to cunfigure COM port.
* Functions to set(and get too) default configuration.
* PROGRAMMERS: Saveliy Tretiakov (saveliyt@mail.ru)
* REVISIONS:
* ST (05/04/2005) Created. Implemented drvCommConfigDialog.
*/
#include <serialui.h>
static HINSTANCE hDllInstance;
/************************************
*
* DATA
*
************************************/
const DWORD Bauds[] = {
CBR_110,
CBR_300,
CBR_600,
CBR_1200,
CBR_2400,
CBR_4800,
CBR_9600,
CBR_14400,
CBR_19200,
CBR_38400,
CBR_56000,
CBR_57600,
CBR_115200,
CBR_128000,
CBR_256000,
0
};
const BYTE ByteSizes[] = {
5,
6,
7,
8,
0
};
const PARITY_INFO Parities[] = {
{ EVENPARITY, IDS_EVENPARITY },
{ MARKPARITY, IDS_MARKPARITY },
{ NOPARITY, IDS_NOPARITY },
{ ODDPARITY, IDS_ODDPARITY },
{ SPACEPARITY, IDS_SPACEPARITY },
{ 0, 0 }
};
const STOPBIT_INFO StopBits[] = {
{ ONESTOPBIT, IDS_ONESTOPBIT },
{ ONE5STOPBITS, IDS_ONE5STOPBITS },
{ TWOSTOPBITS, IDS_TWOSTOPBITS },
{ 0, 0 }
};
/************************************
*
* DLLMAIN
*
************************************/
BOOL
STDCALL
DllMain(HINSTANCE hInstance,
DWORD dwReason,
LPVOID reserved)
{
if(dwReason==DLL_PROCESS_ATTACH)
{
hDllInstance = hInstance;
}
else if(dwReason==DLL_THREAD_ATTACH)
{
DisableThreadLibraryCalls(hInstance);
}
return TRUE;
}
/************************************
*
* EXPORTS
*
************************************/
/*
* @implemented
*/
BOOL WINAPI drvCommConfigDialogW(LPCWSTR lpszDevice,
HWND hWnd,
LPCOMMCONFIG lpCommConfig)
{
DIALOG_INFO DialogInfo;
if(!lpszDevice || !lpCommConfig)
{
return FALSE;
}
DialogInfo.lpszDevice = lpszDevice;
DialogInfo.lpCC = lpCommConfig;
return DialogBoxParamW(hDllInstance, MAKEINTRESOURCEW(IDD_COMMDLG),
hWnd, (DLGPROC)CommDlgProc, (LPARAM)&DialogInfo);
}
/*
* @implemented
*/
BOOL WINAPI drvCommConfigDialogA(LPCSTR lpszDevice,
HWND hWnd,
LPCOMMCONFIG lpCommConfig)
{
BOOL result;
UINT len;
WCHAR *wstr;
len = MultiByteToWideChar(CP_ACP, 0, lpszDevice, -1, NULL, 0);
if((wstr = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR))))
{
MultiByteToWideChar(CP_ACP, 0, lpszDevice, -1, wstr, len);
result = drvCommConfigDialogW(wstr, hWnd, lpCommConfig);
HeapFree(GetProcessHeap(), 0, wstr);
return result;
}
else
return FALSE;
}
/*
* @unimplemented
*/
BOOL WINAPI drvSetDefaultCommConfigW(LPCWSTR lpszDevice,
LPCOMMCONFIG lpCommConfig,
DWORD dwSize)
{
UNIMPLEMENTED
}
/*
* @unimplemented
*/
BOOL WINAPI drvSetDefaultCommConfigA(LPCSTR lpszDevice,
LPCOMMCONFIG lpCommConfig,
DWORD dwSize)
{
UNIMPLEMENTED
}
/*
* @unimplemented
*/
BOOL WINAPI drvGetDefaultCommConfigW(LPCWSTR lpszDevice,
LPCOMMCONFIG lpCommConfig,
LPDWORD lpdwSize)
{
UNIMPLEMENTED
}
/*
* @unimplemented
*/
BOOL WINAPI drvGetDefaultCommConfigA(LPCSTR lpszDevice,
LPCOMMCONFIG lpCommConfig,
LPDWORD lpdwSize)
{
UNIMPLEMENTED
}
/************************************
*
* INTERNALS
*
************************************/
LRESULT CommDlgProc(HWND hDlg,
UINT Msg,
WPARAM wParam,
LPARAM lParam)
{
LPDIALOG_INFO lpDlgInfo = NULL;
HWND hBox;
switch (Msg)
{
case WM_INITDIALOG:
{
WCHAR wstr[255];
RECT rc, rcDlg, rcOwner;
HWND hOwner;
INT i;
lpDlgInfo = (LPDIALOG_INFO)lParam;
SetWindowLongPtrW(hDlg, DWL_USER, (LONG_PTR)lpDlgInfo);
/* Set title */
if(LoadStringW(hDllInstance, IDS_TITLE, wstr, sizeof(wstr) / sizeof(wstr[0])))
{
SetWindowTextW(hDlg, wstr);
}
/* FIXME - this won't work correctly systems with multiple monitors! */
if(!(hOwner = GetParent(hDlg)))
hOwner = GetDesktopWindow();
/* Position dialog in the center of owner window */
GetWindowRect(hOwner, &rcOwner);
GetWindowRect(hDlg, &rcDlg);
CopyRect(&rc, &rcOwner);
OffsetRect(&rcDlg, -rcDlg.left, -rcDlg.top);
OffsetRect(&rc, -rc.left, -rc.top);
OffsetRect(&rc, -rcDlg.right, -rcDlg.bottom);
SetWindowPos(hDlg, HWND_TOP,
rcOwner.left + (rc.right / 2),
rcOwner.top + (rc.bottom / 2),
0, 0, SWP_NOSIZE);
/* Initialize baud rate combo */
if(!(hBox = GetDlgItem(hDlg, IDC_BAUDRATE)))
EndDialog(hDlg, 0);
for(i = 0; Bauds[i]; i++)
{
wsprintf(wstr, L"%d", Bauds[i]);
SendMessageW(hBox, CB_INSERTSTRING, (WPARAM)i, (LPARAM)wstr);
if(Bauds[i] == lpDlgInfo->lpCC->dcb.BaudRate)
SendMessageW(hBox, CB_SETCURSEL, (WPARAM)i, 0);
}
if(SendMessageW(hBox, CB_GETCURSEL, 0, 0) == CB_ERR)
SendMessageW(hBox, CB_SETCURSEL, DEFAULT_BAUD_INDEX, 0);
/* Initialize byte size combo */
if(!(hBox = GetDlgItem(hDlg, IDC_BYTESIZE)))
EndDialog(hDlg, 0);
for(i = 0; ByteSizes[i]; i++)
{
wsprintf(wstr, L"%d", Bauds[i]);
SendMessageW(hBox, CB_INSERTSTRING, (WPARAM)i, (LPARAM)wstr);
if(ByteSizes[i] == lpDlgInfo->lpCC->dcb.ByteSize)
SendMessageW(hBox, CB_SETCURSEL, (WPARAM)i, 0);
}
if(SendMessageW(hBox, CB_GETCURSEL, 0, 0) == CB_ERR)
SendMessageW(hBox, CB_SETCURSEL, DEFAULT_BYTESIZE_INDEX, 0);
/* Initialize parity combo */
if(!(hBox = GetDlgItem(hDlg, IDC_PARITY)))
EndDialog(hDlg, 0);
for(i = 0; Parities[i].StrId; i++)
{
if(LoadStringW(hDllInstance, Parities[i].StrId, wstr, sizeof(wstr) / sizeof(wstr[0])))
{
SendMessageW(hBox, CB_INSERTSTRING, (WPARAM)i, (LPARAM)wstr);
if(Parities[i].Parity == lpDlgInfo->lpCC->dcb.Parity)
SendMessageW(hBox, CB_SETCURSEL, (WPARAM)i, 0);
}
}
if(SendMessageW(hBox, CB_GETCURSEL, 0, 0)==CB_ERR)
SendMessageW(hBox, CB_SETCURSEL, DEFAULT_PARITY_INDEX, 0);
/* Initialize stop bits combo */
if(!(hBox = GetDlgItem(hDlg, IDC_STOPBITS)))
EndDialog(hDlg, 0);
for(i = 0; StopBits[i].StrId; i++)
{
if(LoadStringW(hDllInstance, StopBits[i].StrId, wstr, sizeof(wstr) / sizeof(wstr[0])))
{
SendMessageW(hBox, CB_INSERTSTRING, (WPARAM)i, (LPARAM)wstr);
if(StopBits[i].StopBit == lpDlgInfo->lpCC->dcb.StopBits)
SendMessageW(hBox, CB_SETCURSEL, (WPARAM)i, 0);
}
}
if(SendMessageW(hBox, CB_GETCURSEL, 0, 0)==CB_ERR)
SendMessageW(hBox, CB_SETCURSEL, DEFAULT_STOPBITS_INDEX, 0);
/* Initialize flow control combo */
if(!(hBox = GetDlgItem(hDlg, IDC_FLOW)))
EndDialog(hDlg, 0);
if(LoadStringW(hDllInstance, IDS_FC_NO, wstr, sizeof(wstr) / sizeof(wstr[0])))
{
SendMessageW(hBox, CB_INSERTSTRING, 0, (LPARAM)wstr);
SendMessageW(hBox, CB_SETCURSEL, 0, 0);
lpDlgInfo->InitialFlowIndex = 0;
}
if(LoadStringW(hDllInstance, IDS_FC_CTSRTS, wstr, sizeof(wstr) / sizeof(wstr[0])))
{
SendMessageW(hBox, CB_INSERTSTRING, 1, (LPARAM)wstr);
if(lpDlgInfo->lpCC->dcb.fRtsControl == RTS_CONTROL_HANDSHAKE
|| lpDlgInfo->lpCC->dcb.fOutxCtsFlow == TRUE)
{
SendMessageW(hBox, CB_SETCURSEL, 1, 0);
lpDlgInfo->InitialFlowIndex = 1;
}
}
if(LoadStringW(hDllInstance, IDS_FC_XONXOFF, wstr, sizeof(wstr) / sizeof(wstr[0])))
{
SendMessageW(hBox, CB_INSERTSTRING, 2, (LPARAM)wstr);
if(lpDlgInfo->lpCC->dcb.fOutX || lpDlgInfo->lpCC->dcb.fInX)
{
SendMessageW(hBox, CB_SETCURSEL, 2, 0);
lpDlgInfo->InitialFlowIndex = 2;
}
}
/* Set focus */
SetFocus(GetDlgItem(hDlg, IDC_OKBTN));
return FALSE;
} /* WM_INITDIALOG */
case WM_COMMAND:
{
switch(wParam)
{
case IDC_CANCELBTN:
EndDialog(hDlg, FALSE);
break;
case IDC_OKBTN:
OkButton(hDlg);
EndDialog(hDlg, TRUE);
break;
}
return TRUE;
} /* WM_COMMAND */
case WM_CLOSE:
{
EndDialog(hDlg, FALSE);
return TRUE;
} /* WM_CLOSE */
default:
return FALSE;
}
}
VOID OkButton(HWND hDlg)
{
LPDIALOG_INFO lpDlgInfo;
UINT Index;
lpDlgInfo = (LPDIALOG_INFO) GetWindowLongPtrW(hDlg, DWL_USER);
/* Baud rate */
Index = SendMessageW(GetDlgItem(hDlg, IDC_BAUDRATE), CB_GETCURSEL, 0, 0);
lpDlgInfo->lpCC->dcb.BaudRate = Bauds[Index];
/* Byte size */
Index = SendMessageW(GetDlgItem(hDlg, IDC_BYTESIZE), CB_GETCURSEL, 0, 0);
lpDlgInfo->lpCC->dcb.ByteSize = ByteSizes[Index];
/* Parity */
Index = SendMessageW(GetDlgItem(hDlg, IDC_PARITY), CB_GETCURSEL, 0, 0);
lpDlgInfo->lpCC->dcb.Parity = Parities[Index].Parity;
/* Stop bits */
Index = SendMessageW(GetDlgItem(hDlg, IDC_STOPBITS), CB_GETCURSEL, 0, 0);
lpDlgInfo->lpCC->dcb.StopBits = StopBits[Index].StopBit;
/* Flow Control */
Index = SendMessageW(GetDlgItem(hDlg, IDC_FLOW), CB_GETCURSEL, 0, 0);
if(lpDlgInfo->InitialFlowIndex != Index)
{
switch(Index)
{
case 0: /* NO */
lpDlgInfo->lpCC->dcb.fDtrControl = DTR_CONTROL_DISABLE;
lpDlgInfo->lpCC->dcb.fRtsControl = RTS_CONTROL_DISABLE;
lpDlgInfo->lpCC->dcb.fOutxCtsFlow = FALSE;
lpDlgInfo->lpCC->dcb.fOutxDsrFlow = FALSE;
lpDlgInfo->lpCC->dcb.fOutX = FALSE;
lpDlgInfo->lpCC->dcb.fInX = FALSE;
break;
case 1: /* CTS/RTS */
lpDlgInfo->lpCC->dcb.fDtrControl = DTR_CONTROL_DISABLE;
lpDlgInfo->lpCC->dcb.fRtsControl = RTS_CONTROL_HANDSHAKE;
lpDlgInfo->lpCC->dcb.fOutxCtsFlow = TRUE;
lpDlgInfo->lpCC->dcb.fOutxDsrFlow = FALSE;
lpDlgInfo->lpCC->dcb.fOutX = FALSE;
lpDlgInfo->lpCC->dcb.fInX = FALSE;
break;
case 2: /* XON/XOFF */
lpDlgInfo->lpCC->dcb.fDtrControl = DTR_CONTROL_DISABLE;
lpDlgInfo->lpCC->dcb.fRtsControl = RTS_CONTROL_DISABLE;
lpDlgInfo->lpCC->dcb.fOutxCtsFlow = FALSE;
lpDlgInfo->lpCC->dcb.fOutxDsrFlow = FALSE;
lpDlgInfo->lpCC->dcb.fOutX = TRUE;
lpDlgInfo->lpCC->dcb.fInX = TRUE;
break;
}
}
}

View File

@@ -1,10 +0,0 @@
LIBRARY serialui.dll
EXPORTS
drvCommConfigDialogW@12
drvCommConfigDialogA@12
drvSetDefaultCommConfigW@12
drvSetDefaultCommConfigA@12
drvGetDefaultCommConfigW@12
drvGetDefaultCommConfigA@12

View File

@@ -1,86 +0,0 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS SerialUI DLL
* FILE: serialui.h
* PURPOSE: header file
* PROGRAMMERS: Saveliy Tretiakov (saveliyt@mail.ru)
*/
#include <windows.h>
#include <shlwapi.h>
#include "resource.h"
#define UNIMPLEMENTED \
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); \
return FALSE;
#define DEFAULT_BAUD_INDEX 6
#define DEFAULT_BYTESIZE_INDEX 3
#define DEFAULT_PARITY_INDEX 2
#define DEFAULT_STOPBITS_INDEX 0
typedef struct _DIALOG_INFO
{
LPCWSTR lpszDevice;
UINT InitialFlowIndex;
LPCOMMCONFIG lpCC;
} DIALOG_INFO, *LPDIALOG_INFO;
typedef struct _PARITY_INFO
{
BYTE Parity;
UINT StrId;
} PARITY_INFO, *PPARITY_INFO;
typedef struct _STOPBIT_INFO
{
BYTE StopBit;
UINT StrId;
} STOPBIT_INFO, *PSTOPBIT_INFO;
/************************************
*
* EXPORTS
*
************************************/
BOOL WINAPI drvCommConfigDialogW(LPCWSTR lpszDevice,
HWND hWnd,
LPCOMMCONFIG lpCommConfig);
BOOL WINAPI drvCommConfigDialogA(LPCSTR lpszDevice,
HWND hWnd,
LPCOMMCONFIG lpCommConfig);
BOOL WINAPI drvSetDefaultCommConfigW(LPCWSTR lpszDevice,
LPCOMMCONFIG lpCommConfig,
DWORD dwSize);
BOOL WINAPI drvSetDefaultCommConfigA(LPCSTR lpszDevice,
LPCOMMCONFIG lpCommConfig,
DWORD dwSize);
BOOL WINAPI drvGetDefaultCommConfigW(LPCWSTR lpszDevice,
LPCOMMCONFIG lpCommConfig,
LPDWORD lpdwSize);
BOOL WINAPI drvGetDefaultCommConfigA(LPCSTR lpszDevice,
LPCOMMCONFIG lpCommConfig,
LPDWORD lpdwSize);
/************************************
*
* INTERNALS
*
************************************/
LRESULT CommDlgProc(HWND hDlg,
UINT Msg,
WPARAM wParam,
LPARAM lParam);
VOID OkButton(HWND hDlg);

View File

@@ -1,48 +0,0 @@
#include "resource.h"
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS SerialUI DLL\0"
#define REACTOS_STR_INTERNAL_NAME "serialui\0"
#define REACTOS_STR_ORIGINAL_FILENAME "serialui.dll\0"
#include <reactos/version.rc>
STRINGTABLE LOADONCALL DISCARDABLE
BEGIN
IDS_EVENPARITY, "Even"
IDS_MARKPARITY, "Mark"
IDS_NOPARITY, "No parity"
IDS_ODDPARITY, "Odd"
IDS_SPACEPARITY, "Space"
IDS_ONESTOPBIT, "1 stop bit"
IDS_ONE5STOPBITS, "1.5 stop bits"
IDS_TWOSTOPBITS, "2 stop bits"
IDS_FC_NO, "No"
IDS_FC_CTSRTS, "CTS/RTS"
IDS_FC_XONXOFF, "XON/XOFF"
IDS_TITLE, "Properties for %s"
END
IDD_COMMDLG DIALOGEX 6,5,222,175
FONT 8,"MS Sans Serif"
STYLE 0x10C80080
EXSTYLE 0x00000001
BEGIN
CONTROL "",IDC_GRP1,"Button",0x50000007,6,5,210,146,0x00000000
CONTROL "OK",IDC_OKBTN,"Button",0x50010000,98,156,56,13,0x00000000
CONTROL "Cancel",IDC_CANCELBTN,"Button",0x50010000,158,156,56,13,0x00000000
CONTROL "Baud rate:",IDC_STC1,"Static",0x50000000,24,31,42,9,0x00000000
CONTROL "Byte size:",IDC_STC2,"Static",0x50000000,24,53,42,9,0x00000000
CONTROL "Parity:",IDC_STC3,"Static",0x50000000,24,73,42,9,0x00000000
CONTROL "Stop bits:",IDC_STC4,"Static",0x50000000,24,96,42,9,0x00000000
CONTROL "Flow control:",IDC_STC5,"Static",0x50000000,24,120,42,9,0x00000000
CONTROL "",IDC_BAUDRATE,"ComboBox",0x50210003,98,29,100,50,0x00000000
CONTROL "",IDC_BYTESIZE,"ComboBox",0x50210003,98,49,100,50,0x00000000
CONTROL "",IDC_PARITY,"ComboBox",0x50210003,98,72,100,50,0x00000000
CONTROL "",IDC_STOPBITS,"ComboBox",0x50210003,98,94,100,50,0x00000000
CONTROL "",IDC_FLOW,"ComboBox",0x50210003,98,116,100,50,0x00000000
END

View File

@@ -1,221 +0,0 @@
/*
* Copyright 2005 David Nordenberg
*
* 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
*/
LANGUAGE LANG_SWEDISH, SUBLANG_DEFAULT
MENU_001 MENU DISCARDABLE
BEGIN
MENUITEM "&Stora ikoner", FCIDM_SHVIEW_BIGICON
MENUITEM "S&m<> ikoner", FCIDM_SHVIEW_SMALLICON
MENUITEM "&Lista", FCIDM_SHVIEW_LISTVIEW
MENUITEM "&Detaljer", FCIDM_SHVIEW_REPORTVIEW
END
/*
shellview background menu
*/
MENU_002 MENU DISCARDABLE
BEGIN
POPUP ""
BEGIN
POPUP "&Visa"
BEGIN
MENUITEM "&Stora ikoner", FCIDM_SHVIEW_BIGICON
MENUITEM "S&m<> ikoner", FCIDM_SHVIEW_SMALLICON
MENUITEM "&Lista", FCIDM_SHVIEW_LISTVIEW
MENUITEM "&Detaljer", FCIDM_SHVIEW_REPORTVIEW
END
MENUITEM SEPARATOR
POPUP "Ordna &ikoner efter"
BEGIN
MENUITEM "&Namn", 0x30 /* column 0 */
MENUITEM "&Typ", 0x32 /* column 2 */
MENUITEM "&Storlek", 0x31 /* ... */
MENUITEM "&Datum", 0x33
MENUITEM SEPARATOR
MENUITEM "&Ordna automatiskt", FCIDM_SHVIEW_AUTOARRANGE
END
MENUITEM "Rada upp ikoner", FCIDM_SHVIEW_SNAPTOGRID
MENUITEM SEPARATOR
MENUITEM "&Uppdatera", FCIDM_SHVIEW_REFRESH
MENUITEM SEPARATOR
MENUITEM "K&listra in", FCIDM_SHVIEW_INSERT
MENUITEM "Klistra in som genv<6E>g", FCIDM_SHVIEW_INSERTLINK
MENUITEM SEPARATOR
POPUP "&Ny"
BEGIN
MENUITEM "Ny &mapp", FCIDM_SHVIEW_NEWFOLDER
MENUITEM "Ny &genv<6E>g", FCIDM_SHVIEW_NEWLINK
MENUITEM SEPARATOR
END
MENUITEM SEPARATOR
MENUITEM "&Egenskaper", FCIDM_SHVIEW_PROPERTIES
END
END
/*
shellview item menu
*/
MENU_SHV_FILE MENU DISCARDABLE
BEGIN
POPUP ""
BEGIN
MENUITEM "&Utforska", FCIDM_SHVIEW_EXPLORE
MENUITEM "&<26>ppna", FCIDM_SHVIEW_OPEN
MENUITEM SEPARATOR
MENUITEM "&Klipp ut", FCIDM_SHVIEW_CUT
MENUITEM "K&opiera", FCIDM_SHVIEW_COPY
MENUITEM SEPARATOR
MENUITEM "Skapa &genv<6E>g", FCIDM_SHVIEW_CREATELINK
MENUITEM "&Ta bort", FCIDM_SHVIEW_DELETE
MENUITEM "&Byt namn", FCIDM_SHVIEW_RENAME
MENUITEM SEPARATOR
MENUITEM "&Egenskaper", FCIDM_SHVIEW_PROPERTIES
END
END
SHBRSFORFOLDER_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | DS_MODALFRAME | DS_SETFONT | DS_3DLOOK
CAPTION "Bl<42>ddra efter mapp"
FONT 8, "MS Shell Dlg"
{
DEFPUSHBUTTON "OK", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "Avbryt", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP
LTEXT "", IDD_TITLE, 4, 4, 180, 12
LTEXT "", IDD_STATUS, 4, 25, 180, 12
CONTROL "", IDD_TREEVIEW, "SysTreeView32",
TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT |
WS_BORDER | WS_TABSTOP,
4, 40, 180, 120
}
SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Om %s"
FONT 10, "MS Shell Dlg"
{
DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP
LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER
ICON "", 1088, 10, 10, 14, 16
LTEXT "", 100, 30, 10, 137, 10
LTEXT "", 101, 30, 22, 137, 10
LTEXT "ReactOS hade inte varit m<>jligt utan dessa personer:", 98, 8, 55, 137, 10
}
SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION ""
FONT 8, "MS Shell Dlg"
{
ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE
LTEXT "Skriv namnet p<> ett program, en mapp eller ett dokument f<>r att <20>ppna det.", 12289, 36, 11, 182, 18
LTEXT "&<26>ppna:", 12305, 7, 39, 24, 10
CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100
DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP
PUSHBUTTON "Avbryt", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP
PUSHBUTTON "&Bl<42>ddra...", 12288, 170, 63, 50, 14, WS_TABSTOP
}
/*
special folders
*/
STRINGTABLE DISCARDABLE
{
IDS_DESKTOP "Skrivbord"
IDS_MYCOMPUTER "Den h<>r datorn"
}
/*
context menus
*/
STRINGTABLE DISCARDABLE
{
IDS_VIEW_LARGE "&Stora ikoner"
IDS_VIEW_SMALL "S&m<> ikoner"
IDS_VIEW_LIST "&Lista"
IDS_VIEW_DETAILS "&Detaljer"
IDS_SELECT "V<>lj"
IDS_OPEN "<22>ppna"
}
STRINGTABLE DISCARDABLE
{
IDS_CREATEFOLDER_DENIED "Kan inte skapa ny mapp: <20>tkomst nekad."
IDS_CREATEFOLDER_CAPTION "Fel vid f<>rs<72>k att skapa ny mapp"
IDS_DELETEITEM_CAPTION "Bekr<6B>fta borttagning av fil"
IDS_DELETEFOLDER_CAPTION "Bekr<6B>fta borttagning av mapp"
IDS_DELETEITEM_TEXT "<22>r du s<>ker p<> att du vill ta bort '%1'?"
IDS_DELETEMULTIPLE_TEXT "<22>r du s<>ker p<> att du vill ta bort de h<>r %1 objekten?"
IDS_OVERWRITEFILE_TEXT "Skriv <20>ver fil %1?"
IDS_OVERWRITEFILE_CAPTION "Bekr<6B>fta fil<69>verskrivning"
}
/* columns in the shellview */
STRINGTABLE
BEGIN
IDS_SHV_COLUMN1 "Fil"
IDS_SHV_COLUMN2 "Storlek"
IDS_SHV_COLUMN3 "Typ"
IDS_SHV_COLUMN4 "Modifierad"
IDS_SHV_COLUMN5 "Attribut"
IDS_SHV_COLUMN6 "Storlek"
IDS_SHV_COLUMN7 "Storlek tillg<6C>nglig"
IDS_SHV_COLUMN8 "Namn"
IDS_SHV_COLUMN9 "Kommentarer"
END
/* message box strings */
STRINGTABLE DISCARDABLE
{
IDS_RESTART_TITLE "Starta om"
IDS_RESTART_PROMPT "Vill du starta om datorn?"
IDS_SHUTDOWN_TITLE "St<53>ng av"
IDS_SHUTDOWN_PROMPT "Vill du st<73>nga av datorn?"
}
/* shell folder path default values */
STRINGTABLE DISCARDABLE
{
IDS_PROGRAMS "Start-meny\\Program"
IDS_PERSONAL "Mina dokument"
IDS_FAVORITES "Favoriter"
IDS_STARTUP "Start-meny\\Program\\Autostart"
IDS_RECENT "Tidigare"
IDS_SENDTO "Skicka till"
IDS_STARTMENU "Start-meny"
IDS_MYMUSIC "Mina dokument\\Min musik"
IDS_MYVIDEO "Mina dokument\\Mina videoklipp"
IDS_DESKTOPDIRECTORY "Skrivbord"
IDS_NETHOOD "N<>tverk"
IDS_TEMPLATES "Mallar"
IDS_APPDATA "Application Data"
IDS_PRINTHOOD "Skrivare"
IDS_LOCAL_APPDATA "Lokala inst<73>llningar\\Application Data"
IDS_INTERNET_CACHE "Temporary Internet Files"
IDS_COOKIES "Cookies"
IDS_HISTORY "Tidigare"
IDS_PROGRAM_FILES "Program"
IDS_MYPICTURES "Mina dokument\\Mina bilder"
IDS_PROGRAM_FILES_COMMON "Program\\Delade filer"
IDS_COMMON_DOCUMENTS "Delade dokument"
IDS_ADMINTOOLS "Start-meny\\Program\\Administrativa verktyg"
IDS_COMMON_MUSIC "Delade dokument\\Min musik"
IDS_COMMON_PICTURES "Delade dokument\\Mina bilder"
IDS_COMMON_VIDEO "Delade dokument\\Mina videoklipp"
IDS_CDBURN_AREA "Lokala inst<73>llningar\\Application Data\\Microsoft\\CD Burning"
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,105 +0,0 @@
/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/smdll/query.c
* PURPOSE: Call SM API SM_API_QUERY_INFORMATION (not in NT)
*/
#define NTOS_MODE_USER
#include <ntos.h>
#include <sm/helper.h>
#define NDEBUG
#include <debug.h>
/**********************************************************************
* NAME EXPORTED
* SmQueryInformation/5
*
* DESCRIPTION
* Ask the SM to collect some data from its internal data
* structures and send it back.
*
* ARGUMENTS
* hSmApiPort: handle returned by SmConnectApiPort;
* SmInformationClass: an SM information class ID:
* SM_BASIC_INFORMATION: the number of registered subsystems
* Data: pointer to storage for the information to request;
* DataLength: length in bytes of the Data buffer; it must be
* set and must match the SmInformationClass info size;
* ReturnedDataLength: optional pointer to storage to receive
* the size of the returnede data.
*
* RETURN VALUE
* STATUS_SUCCESS: OK you get what you asked for;
* STATUS_INFO_LENGTH_MISMATCH: you set DataLength to 0 or to a
* value that does not match whet the SmInformationClass
* requires;
* STATUS_INVALID_PARAMETER_2: bad information class;
* A port error.
*
*/
NTSTATUS STDCALL
SmQueryInformation (IN HANDLE hSmApiPort,
IN SM_INFORMATION_CLASS SmInformationClass,
IN OUT PVOID Data,
IN ULONG DataLength,
IN OUT PULONG ReturnedDataLength OPTIONAL)
{
NTSTATUS Status = STATUS_SUCCESS;
SM_PORT_MESSAGE SmReqMsg;
if(0 == DataLength)
{
return STATUS_INFO_LENGTH_MISMATCH;
}
/* Marshal data in the port message */
switch (SmInformationClass)
{
case SmBasicInformation:
if(DataLength != sizeof (SM_BASIC_INFORMATION))
{
return STATUS_INFO_LENGTH_MISMATCH;
}
SmReqMsg.Request.QryInfo.SmInformationClass = SmBasicInformation;
SmReqMsg.Request.QryInfo.DataLength = DataLength;
SmReqMsg.Request.QryInfo.BasicInformation.SubSystemCount = 0;
break;
case SmSubSystemInformation:
if(DataLength != sizeof (SM_SUBSYSTEM_INFORMATION))
{
return STATUS_INFO_LENGTH_MISMATCH;
}
SmReqMsg.Request.QryInfo.SmInformationClass = SmSubSystemInformation;
SmReqMsg.Request.QryInfo.DataLength = DataLength;
SmReqMsg.Request.QryInfo.SubSystemInformation.SubSystemId =
((PSM_SUBSYSTEM_INFORMATION)Data)->SubSystemId;
break;
default:
return STATUS_INVALID_PARAMETER_2;
}
/* SM API to invoke */
SmReqMsg.SmHeader.ApiIndex = SM_API_QUERY_INFORMATION;
/* Prepare the port request message */
SmReqMsg.Header.MessageType = LPC_NEW_MESSAGE;
SmReqMsg.Header.DataSize = SM_PORT_DATA_SIZE(SmReqMsg.Request);
SmReqMsg.Header.MessageSize = SM_PORT_MESSAGE_SIZE;
Status = NtRequestWaitReplyPort (hSmApiPort, (PLPC_MESSAGE) & SmReqMsg, (PLPC_MESSAGE) & SmReqMsg);
if (NT_SUCCESS(Status))
{
/* Unmarshal data */
RtlCopyMemory (Data, & SmReqMsg.Reply.QryInfo.BasicInformation, SmReqMsg.Reply.QryInfo.DataLength);
/* Use caller provided storage to store data size */
if(NULL != ReturnedDataLength)
{
*ReturnedDataLength = SmReqMsg.Reply.QryInfo.DataLength;
}
return SmReqMsg.SmHeader.Status;
}
DPRINT("SMLIB: %s failed (Status=0x%08lx)\n", __FUNCTION__, Status);
return Status;
}
/* EOF */

View File

@@ -1,95 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Swedish (SE) resources
/*
* Copyright 2005 David Nordenberg
*
* 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
*/
LANGUAGE LANG_SWEDISH, SUBLANG_DEFAULT
/////////////////////////////////////////////////////////////////////////////
//
// Dialogs
//
SELWINDOW DIALOG DISCARDABLE 20, 20, 220, 140
STYLE DS_SYSMODAL | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION |
WS_SYSMENU
FONT 8, "Bitstream Vera Sans"
CAPTION "V<>lj f<>nster"
BEGIN
LISTBOX 100, 5, 5, 210, 110, LBS_NOTIFY | LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL
PUSHBUTTON "&OK", 1, 60, 120, 40, 15, BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "&Avbryt", 2, 120, 120, 40, 15, WS_CHILD | WS_VISIBLE | WS_TABSTOP
END
/////////////////////////////////////////////////////////////////////////////
//
// Menus
//
EDITMENU MENU LOADONCALL MOVEABLE DISCARDABLE
{
POPUP "DUMMY"
BEGIN
MENUITEM "&<26>ngra", EM_UNDO
MENUITEM SEPARATOR
MENUITEM "&Klipp ut", WM_CUT
MENUITEM "K&opiera", WM_COPY
MENUITEM "K&listra in", WM_PASTE
MENUITEM "&Ta bort", WM_CLEAR
MENUITEM SEPARATOR
MENUITEM "&Markera allt", EM_SETSEL
END
}
SYSMENU MENU LOADONCALL MOVEABLE DISCARDABLE
{
MENUITEM "&<26>terst<73>ll", 61728
MENUITEM "&Flytta", 61456
MENUITEM "S&torlek", 61440
MENUITEM "&Minimera", 61472
MENUITEM "Ma&ximera", 61488
MENUITEM SEPARATOR
MENUITEM "&St<53>ng\tAlt-F4", 61536
}
/////////////////////////////////////////////////////////////////////////////
//
// Strings
//
STRINGTABLE
{
IDS_ERROR, "Fel"
IDS_OK, "OK"
IDS_CANCEL, "Avbryt"
IDS_ABORT, "&Avbryt"
IDS_RETRY, "&F<>rs<72>k igen"
IDS_IGNORE, "&Ignorera"
IDS_YES, "&Ja"
IDS_NO, "&Nej"
IDS_HELP, "Hj<48>lp"
IDS_TRYAGAIN, "&F<>rs<72>k igen"
IDS_CONTINUE, "F&orts<74>tt"
}
STRINGTABLE
{
IDS_MDI_MOREWINDOWS, "&Fler f<>nster..."
}

View File

@@ -1,30 +0,0 @@
EXTRADEFS = -D_WINX32_
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = wininet.dll
IMPORTS = mpr shlwapi shell32 user32 advapi32 kernel32 ntdll
EXTRALIBS = $(LIBUNICODE) @SOCKETLIBS@
C_SRCS = \
cookie.c \
dialogs.c \
ftp.c \
gopher.c \
http.c \
internet.c \
netconnection.c \
urlcache.c \
utility.c \
wininet_main.c
RC_SRCS = \
rsrc.rc \
version.rc
SUBDIRS = tests
@MAKE_DLL_RULES@
### Dependencies:

View File

@@ -1,21 +0,0 @@
# $Id: Makefile.ros-template 11910 2004-12-03 23:37:44Z blight $
TARGET_NAME = wininet
TARGET_OBJECTS = @C_SRCS@
TARGET_CFLAGS = @EXTRADEFS@ -D__REACTOS__
TARGET_SDKLIBS = @IMPORTS@ wine.a wine_uuid.a ntdll.a ws2_32.a
TARGET_BASE = $(TARGET_BASE_LIB_WININET)
TARGET_RC_SRCS = @RC_SRCS@
TARGET_RC_BINSRC = @RC_BINSRC@
TARGET_RC_BINARIES = @RC_BINARIES@
default: all
DEP_OBJECTS = $(TARGET_OBJECTS)
include $(TOOLS_PATH)/depend.mk

View File

@@ -1,501 +0,0 @@
/*
* Wininet - cookie handling stuff
*
* Copyright 2002 TransGaming Technologies Inc.
*
* David Hammerton
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include "windef.h"
#include "winbase.h"
#include "wininet.h"
#include "winerror.h"
#include "wine/debug.h"
#include "internet.h"
#include "wine/list.h"
#define RESPONSE_TIMEOUT 30 /* FROM internet.c */
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
/* FIXME
* Cookies are currently memory only.
* Cookies are NOT THREAD SAFE
* Cookies could use A LOT OF MEMORY. We need some kind of memory management here!
* Cookies should care about the expiry time
*/
typedef struct _cookie_domain cookie_domain;
typedef struct _cookie cookie;
struct _cookie
{
struct list entry;
struct _cookie_domain *parent;
LPWSTR lpCookieName;
LPWSTR lpCookieData;
time_t expiry; /* FIXME: not used */
};
struct _cookie_domain
{
struct list entry;
LPWSTR lpCookieDomain;
LPWSTR lpCookiePath;
struct list cookie_list;
};
static struct list domain_list = LIST_INIT(domain_list);
static cookie *COOKIE_addCookie(cookie_domain *domain, LPCWSTR name, LPCWSTR data);
static cookie *COOKIE_findCookie(cookie_domain *domain, LPCWSTR lpszCookieName);
static void COOKIE_deleteCookie(cookie *deadCookie, BOOL deleteDomain);
static cookie_domain *COOKIE_addDomain(LPCWSTR domain, LPCWSTR path);
static void COOKIE_deleteDomain(cookie_domain *deadDomain);
/* adds a cookie to the domain */
static cookie *COOKIE_addCookie(cookie_domain *domain, LPCWSTR name, LPCWSTR data)
{
cookie *newCookie = HeapAlloc(GetProcessHeap(), 0, sizeof(cookie));
list_init(&newCookie->entry);
newCookie->lpCookieName = NULL;
newCookie->lpCookieData = NULL;
if (name)
{
newCookie->lpCookieName = HeapAlloc(GetProcessHeap(), 0, (strlenW(name) + 1)*sizeof(WCHAR));
lstrcpyW(newCookie->lpCookieName, name);
}
if (data)
{
newCookie->lpCookieData = HeapAlloc(GetProcessHeap(), 0, (strlenW(data) + 1)*sizeof(WCHAR));
lstrcpyW(newCookie->lpCookieData, data);
}
TRACE("added cookie %p (data is %s)\n", newCookie, debugstr_w(data) );
list_add_tail(&domain->cookie_list, &newCookie->entry);
newCookie->parent = domain;
return newCookie;
}
/* finds a cookie in the domain matching the cookie name */
static cookie *COOKIE_findCookie(cookie_domain *domain, LPCWSTR lpszCookieName)
{
struct list * cursor;
TRACE("(%p, %s)\n", domain, debugstr_w(lpszCookieName));
LIST_FOR_EACH(cursor, &domain->cookie_list)
{
cookie *searchCookie = LIST_ENTRY(cursor, cookie, entry);
BOOL candidate = TRUE;
if (candidate && lpszCookieName)
{
if (candidate && !searchCookie->lpCookieName)
candidate = FALSE;
if (candidate && strcmpW(lpszCookieName, searchCookie->lpCookieName) != 0)
candidate = FALSE;
}
if (candidate)
return searchCookie;
}
return NULL;
}
/* removes a cookie from the list, if its the last cookie we also remove the domain */
static void COOKIE_deleteCookie(cookie *deadCookie, BOOL deleteDomain)
{
HeapFree(GetProcessHeap(), 0, deadCookie->lpCookieName);
HeapFree(GetProcessHeap(), 0, deadCookie->lpCookieData);
list_remove(&deadCookie->entry);
/* special case: last cookie, lets remove the domain to save memory */
if (list_empty(&deadCookie->parent->cookie_list) && deleteDomain)
COOKIE_deleteDomain(deadCookie->parent);
HeapFree(GetProcessHeap(), 0, deadCookie);
}
/* allocates a domain and adds it to the end */
static cookie_domain *COOKIE_addDomain(LPCWSTR domain, LPCWSTR path)
{
cookie_domain *newDomain = HeapAlloc(GetProcessHeap(), 0, sizeof(cookie_domain));
list_init(&newDomain->entry);
list_init(&newDomain->cookie_list);
newDomain->lpCookieDomain = NULL;
newDomain->lpCookiePath = NULL;
if (domain)
{
newDomain->lpCookieDomain = HeapAlloc(GetProcessHeap(), 0, (strlenW(domain) + 1)*sizeof(WCHAR));
strcpyW(newDomain->lpCookieDomain, domain);
}
if (path)
{
newDomain->lpCookiePath = HeapAlloc(GetProcessHeap(), 0, (strlenW(path) + 1)*sizeof(WCHAR));
lstrcpyW(newDomain->lpCookiePath, path);
}
list_add_tail(&domain_list, &newDomain->entry);
TRACE("Adding domain: %p\n", newDomain);
return newDomain;
}
static void COOKIE_crackUrlSimple(LPCWSTR lpszUrl, LPWSTR hostName, int hostNameLen, LPWSTR path, int pathLen)
{
URL_COMPONENTSW UrlComponents;
UrlComponents.lpszExtraInfo = NULL;
UrlComponents.lpszPassword = NULL;
UrlComponents.lpszScheme = NULL;
UrlComponents.lpszUrlPath = path;
UrlComponents.lpszUserName = NULL;
UrlComponents.lpszHostName = hostName;
UrlComponents.dwHostNameLength = hostNameLen;
UrlComponents.dwUrlPathLength = pathLen;
InternetCrackUrlW(lpszUrl, 0, 0, &UrlComponents);
}
/* match a domain. domain must match if the domain is not NULL. path must match if the path is not NULL */
static BOOL COOKIE_matchDomain(LPCWSTR lpszCookieDomain, LPCWSTR lpszCookiePath,
cookie_domain *searchDomain, BOOL allow_partial)
{
TRACE("searching on domain %p\n", searchDomain);
if (lpszCookieDomain)
{
if (!searchDomain->lpCookieDomain)
return FALSE;
TRACE("comparing domain %s with %s\n",
debugstr_w(lpszCookieDomain),
debugstr_w(searchDomain->lpCookieDomain));
if (allow_partial && !strstrW(lpszCookieDomain, searchDomain->lpCookieDomain))
return FALSE;
else if (!allow_partial && lstrcmpW(lpszCookieDomain, searchDomain->lpCookieDomain) != 0)
return FALSE;
}
if (lpszCookiePath)
{
TRACE("comparing paths: %s with %s\n", debugstr_w(lpszCookiePath), debugstr_w(searchDomain->lpCookiePath));
if (!searchDomain->lpCookiePath)
return FALSE;
if (strcmpW(lpszCookiePath, searchDomain->lpCookiePath))
return FALSE;
}
return TRUE;
}
/* remove a domain from the list and delete it */
static void COOKIE_deleteDomain(cookie_domain *deadDomain)
{
struct list * cursor;
while ((cursor = list_tail(&deadDomain->cookie_list)))
{
COOKIE_deleteCookie(LIST_ENTRY(cursor, cookie, entry), FALSE);
list_remove(cursor);
}
HeapFree(GetProcessHeap(), 0, deadDomain->lpCookieDomain);
HeapFree(GetProcessHeap(), 0, deadDomain->lpCookiePath);
list_remove(&deadDomain->entry);
HeapFree(GetProcessHeap(), 0, deadDomain);
}
/***********************************************************************
* InternetGetCookieW (WININET.@)
*
* Retrieve cookie from the specified url
*
* It should be noted that on windows the lpszCookieName parameter is "not implemented".
* So it won't be implemented here.
*
* RETURNS
* TRUE on success
* FALSE on failure
*
*/
BOOL WINAPI InternetGetCookieW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName,
LPWSTR lpCookieData, LPDWORD lpdwSize)
{
struct list * cursor;
int cnt = 0, domain_count = 0;
int cookie_count = 0;
WCHAR hostName[2048], path[2048];
TRACE("(%s, %s, %p, %p)\n", debugstr_w(lpszUrl),debugstr_w(lpszCookieName),
lpCookieData, lpdwSize);
COOKIE_crackUrlSimple(lpszUrl, hostName, sizeof(hostName)/sizeof(hostName[0]), path, sizeof(path)/sizeof(path[0]));
LIST_FOR_EACH(cursor, &domain_list)
{
cookie_domain *cookiesDomain = LIST_ENTRY(cursor, cookie_domain, entry);
if (COOKIE_matchDomain(hostName, NULL /* FIXME: path */, cookiesDomain, TRUE))
{
struct list * cursor;
domain_count++;
TRACE("found domain %p\n", cookiesDomain);
LIST_FOR_EACH(cursor, &cookiesDomain->cookie_list)
{
cookie *thisCookie = LIST_ENTRY(cursor, cookie, entry);
if (lpCookieData == NULL) /* return the size of the buffer required to lpdwSize */
{
if (cookie_count != 0)
cnt += 2; /* '; ' */
cnt += strlenW(thisCookie->lpCookieName);
cnt += 1; /* = */
cnt += strlenW(thisCookie->lpCookieData);
}
else
{
static const WCHAR szsc[] = { ';',' ',0 };
static const WCHAR szpseq[] = { '%','s','=','%','s',0 };
if (cookie_count != 0)
cnt += snprintfW(lpCookieData + cnt, *lpdwSize - cnt, szsc);
cnt += snprintfW(lpCookieData + cnt, *lpdwSize - cnt, szpseq,
thisCookie->lpCookieName,
thisCookie->lpCookieData);
TRACE("Cookie: %s=%s\n", debugstr_w(thisCookie->lpCookieName), debugstr_w(thisCookie->lpCookieData));
}
cookie_count++;
}
}
}
if (lpCookieData == NULL)
{
cnt += 1; /* NULL */
*lpdwSize = cnt*sizeof(WCHAR);
TRACE("returning\n");
return TRUE;
}
if (!domain_count)
return FALSE;
*lpdwSize = (cnt + 1)*sizeof(WCHAR);
TRACE("Returning %i (from %i domains): %s\n", cnt, domain_count,
debugstr_w(lpCookieData));
return (cnt ? TRUE : FALSE);
}
/***********************************************************************
* InternetGetCookieA (WININET.@)
*
* Retrieve cookie from the specified url
*
* RETURNS
* TRUE on success
* FALSE on failure
*
*/
BOOL WINAPI InternetGetCookieA(LPCSTR lpszUrl, LPCSTR lpszCookieName,
LPSTR lpCookieData, LPDWORD lpdwSize)
{
DWORD len;
LPWSTR szCookieData = NULL, szUrl = NULL, szCookieName = NULL;
BOOL r;
TRACE("(%s,%s,%p)\n", debugstr_a(lpszUrl), debugstr_a(lpszCookieName),
lpCookieData);
if( lpszUrl )
{
len = MultiByteToWideChar( CP_ACP, 0, lpszUrl, -1, NULL, 0 );
szUrl = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, lpszUrl, -1, szUrl, len );
}
if( lpszCookieName )
{
len = MultiByteToWideChar( CP_ACP, 0, lpszCookieName, -1, NULL, 0 );
szCookieName = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, lpszCookieName, -1, szCookieName, len );
}
r = InternetGetCookieW( szUrl, szCookieName, NULL, &len );
if( r )
{
szCookieData = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
if( !szCookieData )
return FALSE;
r = InternetGetCookieW( szUrl, szCookieName, szCookieData, &len );
*lpdwSize = WideCharToMultiByte( CP_ACP, 0, szCookieData, len,
lpCookieData, *lpdwSize, NULL, NULL );
}
HeapFree( GetProcessHeap(), 0, szCookieData );
HeapFree( GetProcessHeap(), 0, szCookieName );
HeapFree( GetProcessHeap(), 0, szUrl );
return r;
}
/***********************************************************************
* InternetSetCookieW (WININET.@)
*
* Sets cookie for the specified url
*
* RETURNS
* TRUE on success
* FALSE on failure
*
*/
BOOL WINAPI InternetSetCookieW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName,
LPCWSTR lpCookieData)
{
cookie_domain *thisCookieDomain = NULL;
cookie *thisCookie;
WCHAR hostName[2048], path[2048];
struct list * cursor;
TRACE("(%s,%s,%s)\n", debugstr_w(lpszUrl),
debugstr_w(lpszCookieName), debugstr_w(lpCookieData));
if (!lpCookieData || !strlenW(lpCookieData))
{
TRACE("no cookie data, not adding\n");
return FALSE;
}
if (!lpszCookieName)
{
/* some apps (or is it us??) try to add a cookie with no cookie name, but
* the cookie data in the form of name=data. */
/* FIXME, probably a bug here, for now I don't care */
WCHAR *ourCookieName, *ourCookieData;
int ourCookieNameSize;
BOOL ret;
if (!(ourCookieData = strchrW(lpCookieData, '=')))
{
TRACE("something terribly wrong with cookie data %s\n",
debugstr_w(ourCookieData));
return FALSE;
}
ourCookieNameSize = ourCookieData - lpCookieData;
ourCookieData += 1;
ourCookieName = HeapAlloc(GetProcessHeap(), 0,
(ourCookieNameSize + 1)*sizeof(WCHAR));
memcpy(ourCookieName, ourCookieData, ourCookieNameSize * sizeof(WCHAR));
ourCookieName[ourCookieNameSize] = '\0';
TRACE("setting (hacked) cookie of %s, %s\n",
debugstr_w(ourCookieName), debugstr_w(ourCookieData));
ret = InternetSetCookieW(lpszUrl, ourCookieName, ourCookieData);
HeapFree(GetProcessHeap(), 0, ourCookieName);
return ret;
}
COOKIE_crackUrlSimple(lpszUrl, hostName, sizeof(hostName)/sizeof(hostName[0]), path, sizeof(path)/sizeof(path[0]));
LIST_FOR_EACH(cursor, &domain_list)
{
thisCookieDomain = LIST_ENTRY(cursor, cookie_domain, entry);
if (COOKIE_matchDomain(hostName, NULL /* FIXME: path */, thisCookieDomain, FALSE))
break;
thisCookieDomain = NULL;
}
if (!thisCookieDomain)
thisCookieDomain = COOKIE_addDomain(hostName, path);
if ((thisCookie = COOKIE_findCookie(thisCookieDomain, lpszCookieName)))
COOKIE_deleteCookie(thisCookie, FALSE);
thisCookie = COOKIE_addCookie(thisCookieDomain, lpszCookieName, lpCookieData);
return TRUE;
}
/***********************************************************************
* InternetSetCookieA (WININET.@)
*
* Sets cookie for the specified url
*
* RETURNS
* TRUE on success
* FALSE on failure
*
*/
BOOL WINAPI InternetSetCookieA(LPCSTR lpszUrl, LPCSTR lpszCookieName,
LPCSTR lpCookieData)
{
DWORD len;
LPWSTR szCookieData = NULL, szUrl = NULL, szCookieName = NULL;
BOOL r;
TRACE("(%s,%s,%s)\n", debugstr_a(lpszUrl),
debugstr_a(lpszCookieName), debugstr_a(lpCookieData));
if( lpszUrl )
{
len = MultiByteToWideChar( CP_ACP, 0, lpszUrl, -1, NULL, 0 );
szUrl = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, lpszUrl, -1, szUrl, len );
}
if( lpszCookieName )
{
len = MultiByteToWideChar( CP_ACP, 0, lpszCookieName, -1, NULL, 0 );
szCookieName = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, lpszCookieName, -1, szCookieName, len );
}
if( lpCookieData )
{
len = MultiByteToWideChar( CP_ACP, 0, lpCookieData, -1, NULL, 0 );
szCookieData = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, lpCookieData, -1, szCookieData, len );
}
r = InternetSetCookieW( szUrl, szCookieName, szCookieData );
HeapFree( GetProcessHeap(), 0, szCookieData );
HeapFree( GetProcessHeap(), 0, szCookieName );
HeapFree( GetProcessHeap(), 0, szUrl );
return r;
}

View File

@@ -1,388 +0,0 @@
/*
* Wininet
*
* Copyright 2003 Mike McCormack for CodeWeavers Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "winreg.h"
#include "wininet.h"
#include "winnetwk.h"
#include "winnls.h"
#include "wine/debug.h"
#include "winerror.h"
#define NO_SHLWAPI_STREAM
#include "shlwapi.h"
#include "internet.h"
#include "wine/unicode.h"
#include "resource.h"
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
struct WININET_ErrorDlgParams
{
HWND hWnd;
HINTERNET hRequest;
DWORD dwError;
DWORD dwFlags;
LPVOID* lppvData;
};
/***********************************************************************
* WININET_GetProxyServer
*
* Determine the name of the proxy server the request is using
*/
static BOOL WININET_GetProxyServer( HINTERNET hRequest, LPWSTR szBuf, DWORD sz )
{
LPWININETHTTPREQW lpwhr;
LPWININETHTTPSESSIONW lpwhs = NULL;
LPWININETAPPINFOW hIC = NULL;
LPWSTR p;
lpwhr = (LPWININETHTTPREQW) WININET_GetObject( hRequest );
if (NULL == lpwhr)
return FALSE;
lpwhs = (LPWININETHTTPSESSIONW) lpwhr->hdr.lpwhparent;
if (NULL == lpwhs)
return FALSE;
hIC = (LPWININETAPPINFOW) lpwhs->hdr.lpwhparent;
if (NULL == hIC)
return FALSE;
lstrcpynW(szBuf, hIC->lpszProxy, sz);
/* FIXME: perhaps it would be better to use InternetCrackUrl here */
p = strchrW(szBuf, ':');
if(*p)
*p = 0;
return TRUE;
}
/***********************************************************************
* WININET_GetAuthRealm
*
* Determine the name of the (basic) Authentication realm
*/
static BOOL WININET_GetAuthRealm( HINTERNET hRequest, LPWSTR szBuf, DWORD sz )
{
LPWSTR p, q;
DWORD index;
static const WCHAR szRealm[] = { 'r','e','a','l','m','=',0 };
/* extract the Realm from the proxy response and show it */
index = 0;
if( !HttpQueryInfoW( hRequest, HTTP_QUERY_PROXY_AUTHENTICATE,
szBuf, &sz, &index) )
return FALSE;
/*
* FIXME: maybe we should check that we're
* dealing with 'Basic' Authentication
*/
p = strchrW( szBuf, ' ' );
if( p && !strncmpW( p+1, szRealm, strlenW(szRealm) ) )
{
/* remove quotes */
p += 7;
if( *p == '"' )
{
p++;
q = strrchrW( p, '"' );
if( q )
*q = 0;
}
}
strcpyW( szBuf, p );
return TRUE;
}
/***********************************************************************
* WININET_GetSetPassword
*/
static BOOL WININET_GetSetPassword( HWND hdlg, LPCWSTR szServer,
LPCWSTR szRealm, BOOL bSet )
{
WCHAR szResource[0x80], szUserPass[0x40];
LPWSTR p;
HWND hUserItem, hPassItem;
DWORD r, dwMagic = 19;
UINT r_len, u_len;
WORD sz;
static const WCHAR szColon[] = { ':',0 };
static const WCHAR szbs[] = { '/', 0 };
hUserItem = GetDlgItem( hdlg, IDC_USERNAME );
hPassItem = GetDlgItem( hdlg, IDC_PASSWORD );
/* now try fetch the username and password */
lstrcpyW( szResource, szServer);
lstrcatW( szResource, szbs);
lstrcatW( szResource, szRealm);
/*
* WNetCachePassword is only concerned with the length
* of the data stored (which we tell it) and it does
* not use strlen() internally so we can add WCHAR data
* instead of ASCII data and get it back the same way.
*/
if( bSet )
{
#ifndef __REACTOS__
szUserPass[0] = 0;
GetWindowTextW( hUserItem, szUserPass,
(sizeof szUserPass-1)/sizeof(WCHAR) );
lstrcatW(szUserPass, szColon);
u_len = strlenW( szUserPass );
GetWindowTextW( hPassItem, szUserPass+u_len,
(sizeof szUserPass)/sizeof(WCHAR)-u_len );
r_len = (strlenW( szResource ) + 1)*sizeof(WCHAR);
u_len = (strlenW( szUserPass ) + 1)*sizeof(WCHAR);
r = WNetCachePassword( (CHAR*)szResource, r_len,
(CHAR*)szUserPass, u_len, dwMagic, 0 );
return ( r == WN_SUCCESS );
#else
return FALSE;
#endif
}
sz = sizeof szUserPass;
r_len = (strlenW( szResource ) + 1)*sizeof(WCHAR);
// r = WNetGetCachedPassword( (CHAR*)szResource, r_len,
// (CHAR*)szUserPass, &sz, dwMagic );
// if( r != WN_SUCCESS )
// return FALSE;
p = strchrW( szUserPass, ':' );
if( p )
{
*p = 0;
SetWindowTextW( hUserItem, szUserPass );
SetWindowTextW( hPassItem, p+1 );
}
return TRUE;
}
/***********************************************************************
* WININET_SetProxyAuthorization
*/
static BOOL WININET_SetProxyAuthorization( HINTERNET hRequest,
LPWSTR username, LPWSTR password )
{
LPWININETHTTPREQW lpwhr;
LPWININETHTTPSESSIONW lpwhs;
LPWININETAPPINFOW hIC;
LPWSTR p;
lpwhr = (LPWININETHTTPREQW) WININET_GetObject( hRequest );
if( !lpwhr )
return FALSE;
lpwhs = (LPWININETHTTPSESSIONW) lpwhr->hdr.lpwhparent;
if (NULL == lpwhs || lpwhs->hdr.htype != WH_HHTTPSESSION)
{
INTERNET_SetLastError(ERROR_INTERNET_INCORRECT_HANDLE_TYPE);
return FALSE;
}
hIC = (LPWININETAPPINFOW) lpwhs->hdr.lpwhparent;
p = HeapAlloc( GetProcessHeap(), 0, (strlenW( username ) + 1)*sizeof(WCHAR) );
if( !p )
return FALSE;
lstrcpyW( p, username );
hIC->lpszProxyUsername = p;
p = HeapAlloc( GetProcessHeap(), 0, (strlenW( password ) + 1)*sizeof(WCHAR) );
if( !p )
return FALSE;
lstrcpyW( p, password );
hIC->lpszProxyPassword = p;
return TRUE;
}
/***********************************************************************
* WININET_ProxyPasswordDialog
*/
static INT_PTR WINAPI WININET_ProxyPasswordDialog(
HWND hdlg, UINT uMsg, WPARAM wParam, LPARAM lParam )
{
HWND hitem;
struct WININET_ErrorDlgParams *params;
WCHAR szRealm[0x80], szServer[0x80];
if( uMsg == WM_INITDIALOG )
{
TRACE("WM_INITDIALOG (%08lx)\n", lParam);
/* save the parameter list */
params = (struct WININET_ErrorDlgParams*) lParam;
SetWindowLongPtrW( hdlg, GWLP_USERDATA, lParam );
/* extract the Realm from the proxy response and show it */
if( WININET_GetAuthRealm( params->hRequest,
szRealm, sizeof szRealm/sizeof(WCHAR)) )
{
hitem = GetDlgItem( hdlg, IDC_REALM );
SetWindowTextW( hitem, szRealm );
}
/* extract the name of the proxy server */
if( WININET_GetProxyServer( params->hRequest,
szServer, sizeof szServer/sizeof(WCHAR)) )
{
hitem = GetDlgItem( hdlg, IDC_PROXY );
SetWindowTextW( hitem, szServer );
}
WININET_GetSetPassword( hdlg, szServer, szRealm, FALSE );
return TRUE;
}
params = (struct WININET_ErrorDlgParams*)
GetWindowLongPtrW( hdlg, GWLP_USERDATA );
switch( uMsg )
{
case WM_COMMAND:
if( wParam == IDOK )
{
WCHAR username[0x20], password[0x20];
username[0] = 0;
hitem = GetDlgItem( hdlg, IDC_USERNAME );
if( hitem )
GetWindowTextW( hitem, username, sizeof username/sizeof(WCHAR) );
password[0] = 0;
hitem = GetDlgItem( hdlg, IDC_PASSWORD );
if( hitem )
GetWindowTextW( hitem, password, sizeof password/sizeof(WCHAR) );
hitem = GetDlgItem( hdlg, IDC_SAVEPASSWORD );
if( hitem &&
SendMessageW( hitem, BM_GETSTATE, 0, 0 ) &&
WININET_GetAuthRealm( params->hRequest,
szRealm, sizeof szRealm/sizeof(WCHAR)) &&
WININET_GetProxyServer( params->hRequest,
szServer, sizeof szServer/sizeof(WCHAR)) )
{
WININET_GetSetPassword( hdlg, szServer, szRealm, TRUE );
}
WININET_SetProxyAuthorization( params->hRequest, username, password );
EndDialog( hdlg, ERROR_INTERNET_FORCE_RETRY );
return TRUE;
}
if( wParam == IDCANCEL )
{
EndDialog( hdlg, 0 );
return TRUE;
}
break;
}
return FALSE;
}
/***********************************************************************
* WININET_GetConnectionStatus
*/
static INT WININET_GetConnectionStatus( HINTERNET hRequest )
{
WCHAR szStatus[0x20];
DWORD sz, index, dwStatus;
TRACE("%p\n", hRequest );
sz = sizeof szStatus;
index = 0;
if( !HttpQueryInfoW( hRequest, HTTP_QUERY_STATUS_CODE,
szStatus, &sz, &index))
return -1;
dwStatus = atoiW( szStatus );
TRACE("request %p status = %ld\n", hRequest, dwStatus );
return dwStatus;
}
/***********************************************************************
* InternetErrorDlg
*/
DWORD WINAPI InternetErrorDlg(HWND hWnd, HINTERNET hRequest,
DWORD dwError, DWORD dwFlags, LPVOID* lppvData)
{
struct WININET_ErrorDlgParams params;
HMODULE hwininet = GetModuleHandleA( "wininet.dll" );
INT dwStatus;
TRACE("%p %p %ld %08lx %p\n", hWnd, hRequest, dwError, dwFlags, lppvData);
params.hWnd = hWnd;
params.hRequest = hRequest;
params.dwError = dwError;
params.dwFlags = dwFlags;
params.lppvData = lppvData;
switch( dwError )
{
case ERROR_SUCCESS:
if( !(dwFlags & FLAGS_ERROR_UI_FILTER_FOR_ERRORS ) )
return 0;
dwStatus = WININET_GetConnectionStatus( hRequest );
if( HTTP_STATUS_PROXY_AUTH_REQ != dwStatus )
return ERROR_SUCCESS;
return DialogBoxParamW( hwininet, MAKEINTRESOURCEW( IDD_PROXYDLG ),
hWnd, WININET_ProxyPasswordDialog, (LPARAM) &params );
case ERROR_INTERNET_INCORRECT_PASSWORD:
return DialogBoxParamW( hwininet, MAKEINTRESOURCEW( IDD_PROXYDLG ),
hWnd, WININET_ProxyPasswordDialog, (LPARAM) &params );
case ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR:
case ERROR_INTERNET_INVALID_CA:
case ERROR_INTERNET_POST_IS_NON_SECURE:
case ERROR_INTERNET_SEC_CERT_CN_INVALID:
case ERROR_INTERNET_SEC_CERT_DATE_INVALID:
FIXME("Need to display dialog for error %ld\n", dwError);
return ERROR_SUCCESS;
}
return ERROR_INVALID_PARAMETER;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,256 +0,0 @@
/*
* WININET - Gopher implementation
*
* Copyright 2003 Kirill Smelkov
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "wininet.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
/***********************************************************************
* GopherCreateLocatorA (WININET.@)
*
* Create a Gopher locator string from its component parts
*
* PARAMS
* lpszHost [I] host name
* nServerPort [I] port in host byteorder or INTERNET_INVALID_PORT_NUMBER for default
* lpszDisplayString [I] document/directory to display (NULL - default directory)
* lpszSelectorString [I] selector string for server (NULL - none)
* dwGopherType [I] selector type (see GOPHER_TYPE_xxx)
* lpszLocator [O] buffer for locator string
* lpdwBufferLength [I] locator buffer length
*
* RETURNS
* TRUE on success
* FALSE on failure
*
*/
BOOL WINAPI GopherCreateLocatorA(
LPCSTR lpszHost,
INTERNET_PORT nServerPort,
LPCSTR lpszDisplayString,
LPCSTR lpszSelectorString,
DWORD dwGopherType,
LPSTR lpszLocator,
LPDWORD lpdwBufferLength
)
{
FIXME("stub\n");
return FALSE;
}
/***********************************************************************
* GopherCreateLocatorW (WININET.@)
*
* Unicode version of GopherCreateLocatorA
*/
BOOL WINAPI GopherCreateLocatorW(
LPCWSTR lpszHost,
INTERNET_PORT nServerPort,
LPCWSTR lpszDisplayString,
LPCWSTR lpszSelectorString,
DWORD dwHopherType,
LPWSTR lpszLocator,
LPDWORD lpdwBufferLength
)
{
FIXME("stub\n");
return FALSE;
}
/***********************************************************************
* GopherFindFirstFileA (WININET.@)
*
* Create a session and locate the requested documents
*
* PARAMS
* hConnect [I] Handle to a Gopher session returned by InternetConnect
* lpszLocator [I] - address of a string containing the name of the item to locate.
* - Locator created by the GopherCreateLocator function.
* lpszSearchString [I] what to search for if this request is to an index server.
* Otherwise, this parameter should be NULL.
* lpFindData [O] retrived information
* dwFlags [I] INTERNET_FLAG_{HYPERLINK, NEED_FILE, NO_CACHE_WRITE, RELOAD, RESYNCHRONIZE}
* dwContext [I] application private value
*
* RETURNS
* HINTERNET handle on success
* NULL on error
*/
HINTERNET WINAPI GopherFindFirstFileA(
HINTERNET hConnect,
LPCSTR lpszLocator,
LPCSTR lpszSearchString,
LPGOPHER_FIND_DATAA
lpFindData,
DWORD dwFlags,
DWORD dwContext
)
{
FIXME("stub\n");
return NULL;
}
/***********************************************************************
* GopherFindFirstFileW (WININET.@)
*
* Unicode version of GopherFindFirstFileA
*/
HINTERNET WINAPI GopherFindFirstFileW(
HINTERNET hConnect,
LPCWSTR lpszLocator,
LPCWSTR lpszSearchString,
LPGOPHER_FIND_DATAW
lpFindData,
DWORD dwFlags,
DWORD dwContext
)
{
FIXME("stub\n");
return NULL;
}
/***********************************************************************
* GopherGetAttributeA (WININET.@)
*
* Retrieves the specific attribute information from the server.
*
* RETURNS
* TRUE on success
* FALSE on failure
*/
BOOL WINAPI GopherGetAttributeA(
HINTERNET hConnect,
LPCSTR lpszLocator,
LPCSTR lpszAttributeName,
LPBYTE lpBuffer,
DWORD dwBufferLength,
LPDWORD lpdwCharactersReturned,
GOPHER_ATTRIBUTE_ENUMERATORA
lpfnEnumerator,
DWORD dwContext
)
{
FIXME("stub\n");
return FALSE;
}
/***********************************************************************
* GopherGetAttributeW (WININET.@)
*
* Unicode version of GopherGetAttributeA
*/
BOOL WINAPI GopherGetAttributeW(
HINTERNET hConnect,
LPCWSTR lpszLocator,
LPCWSTR lpszAttributeName,
LPBYTE lpBuffer,
DWORD dwBufferLength,
LPDWORD lpdwCharactersReturned,
GOPHER_ATTRIBUTE_ENUMERATORW
lpfnEnumerator,
DWORD dwContext
)
{
FIXME("stub\n");
return FALSE;
}
/***********************************************************************
* GopherGetLocatorTypeA (WININET.@)
*
* Parses a Gopher locator and determines its attributes.
*
* PARAMS
* lpszLocator [I] Address of the Gopher locator string to parse
* lpdwGopherType [O] destination for bitmasked type of locator
*
* RETURNS
* TRUE on success
* FALSE on failure
*/
BOOL WINAPI GopherGetLocatorTypeA(LPCSTR lpszLocator, LPDWORD lpdwGopherType)
{
FIXME("stub\n");
return FALSE;
}
/***********************************************************************
* GopherGetLocatorTypeW (WININET.@)
*
* Unicode version of GopherGetLocatorTypeA
*/
BOOL WINAPI GopherGetLocatorTypeW(LPCWSTR lpszLocator, LPDWORD lpdwGopherType)
{
FIXME("stub\n");
return FALSE;
}
/***********************************************************************
* GopherOpenFileA (WININET.@)
*
* Begins reading a Gopher data file from a Gopher server.
*
* PARAMS
* hConnect [I] handle to a Gopher session
* lpszLocator [I] file locator
* lpszView [I] file view (or default if NULL)
* dwFlags [I] INTERNET_FLAG_{HYPERLINK, NEED_FILE, NO_CACHE_WRITE, RELOAD, RESYNCHRONIZE}
* dwContext [I] application private value
*
* RETURNS
* handle on success
* NULL on error
*/
HINTERNET WINAPI GopherOpenFileA(
HINTERNET hConnect,
LPCSTR lpszLocator,
LPCSTR lpszView,
DWORD dwFlags,
DWORD dwContext
)
{
FIXME("stub\n");
return NULL;
}
/***********************************************************************
* GopherOpenFileW (WININET.@)
*
* Unicode version of GopherOpenFileA
*/
HINTERNET WINAPI GopherOpenFileW(
HINTERNET hConnect,
LPCWSTR lpszLocator,
LPCWSTR lpszView,
DWORD dwFlags,
DWORD dwContext
)
{
FIXME("stub\n");
return NULL;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,483 +0,0 @@
/*
* Wininet
*
* Copyright 1999 Corel Corporation
*
* Ulrich Czekalla
*
* 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
*/
#ifndef _WINE_INTERNET_H_
#define _WINE_INTERNET_H_
#include "wine/unicode.h"
#include <time.h>
#ifdef HAVE_NETDB_H
# include <netdb.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <sys/types.h>
# include <netinet/in.h>
#endif
#ifdef HAVE_OPENSSL_SSL_H
#define DSA __ssl_DSA /* avoid conflict with commctrl.h */
#undef FAR
# include <openssl/ssl.h>
#undef FAR
#define FAR do_not_use_this_in_wine
#undef DSA
#endif
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
#if defined(__MINGW32__) || defined (_MSC_VER)
#include "winsock2.h"
#ifndef MSG_WAITALL
#define MSG_WAITALL 0
#endif
#else
#define closesocket close
#endif /* __MINGW32__ */
/* used for netconnection.c stuff */
typedef struct
{
BOOL useSSL;
int socketFD;
#ifdef HAVE_OPENSSL_SSL_H
SSL *ssl_s;
int ssl_sock;
#endif
} WININET_NETCONNECTION;
inline static LPSTR WININET_strdup( LPCSTR str )
{
LPSTR ret = HeapAlloc( GetProcessHeap(), 0, strlen(str) + 1 );
if (ret) strcpy( ret, str );
return ret;
}
inline static LPWSTR WININET_strdupW( LPCWSTR str )
{
LPWSTR ret = HeapAlloc( GetProcessHeap(), 0, (strlenW(str) + 1)*sizeof(WCHAR) );
if (ret) strcpyW( ret, str );
return ret;
}
inline static LPWSTR WININET_strdup_AtoW( LPCSTR str )
{
int len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0);
LPWSTR ret = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
if (ret)
MultiByteToWideChar( CP_ACP, 0, str, -1, ret, len);
return ret;
}
inline static LPSTR WININET_strdup_WtoA( LPCWSTR str )
{
int len = WideCharToMultiByte( CP_ACP, 0, str, -1, NULL, 0, NULL, NULL);
LPSTR ret = HeapAlloc( GetProcessHeap(), 0, len );
if (ret)
WideCharToMultiByte( CP_ACP, 0, str, -1, ret, len, NULL, NULL);
return ret;
}
inline static void WININET_find_data_WtoA(LPWIN32_FIND_DATAW dataW, LPWIN32_FIND_DATAA dataA)
{
dataA->dwFileAttributes = dataW->dwFileAttributes;
dataA->ftCreationTime = dataW->ftCreationTime;
dataA->ftLastAccessTime = dataW->ftLastAccessTime;
dataA->ftLastWriteTime = dataW->ftLastWriteTime;
dataA->nFileSizeHigh = dataW->nFileSizeHigh;
dataA->nFileSizeLow = dataW->nFileSizeLow;
dataA->dwReserved0 = dataW->dwReserved0;
dataA->dwReserved1 = dataW->dwReserved1;
WideCharToMultiByte(CP_ACP, 0, dataW->cFileName, -1,
dataA->cFileName, sizeof(dataA->cFileName),
NULL, NULL);
WideCharToMultiByte(CP_ACP, 0, dataW->cAlternateFileName, -1,
dataA->cAlternateFileName, sizeof(dataA->cAlternateFileName),
NULL, NULL);
}
typedef enum
{
WH_HINIT = INTERNET_HANDLE_TYPE_INTERNET,
WH_HFTPSESSION = INTERNET_HANDLE_TYPE_CONNECT_FTP,
WH_HGOPHERSESSION = INTERNET_HANDLE_TYPE_CONNECT_GOPHER,
WH_HHTTPSESSION = INTERNET_HANDLE_TYPE_CONNECT_HTTP,
WH_HFILE = INTERNET_HANDLE_TYPE_FTP_FILE,
WH_HFINDNEXT = INTERNET_HANDLE_TYPE_FTP_FIND,
WH_HHTTPREQ = INTERNET_HANDLE_TYPE_HTTP_REQUEST,
} WH_TYPE;
#define INET_OPENURL 0x0001
#define INET_CALLBACKW 0x0002
struct _WININETHANDLEHEADER;
typedef struct _WININETHANDLEHEADER WININETHANDLEHEADER, *LPWININETHANDLEHEADER;
typedef void (*WININET_object_destructor)( LPWININETHANDLEHEADER );
struct _WININETHANDLEHEADER
{
WH_TYPE htype;
DWORD dwFlags;
DWORD dwContext;
DWORD dwError;
DWORD dwInternalFlags;
DWORD dwRefCount;
WININET_object_destructor destroy;
INTERNET_STATUS_CALLBACK lpfnStatusCB;
struct _WININETHANDLEHEADER *lpwhparent;
};
typedef struct
{
WININETHANDLEHEADER hdr;
LPWSTR lpszAgent;
LPWSTR lpszProxy;
LPWSTR lpszProxyBypass;
LPWSTR lpszProxyUsername;
LPWSTR lpszProxyPassword;
DWORD dwAccessType;
} WININETAPPINFOW, *LPWININETAPPINFOW;
typedef struct
{
WININETHANDLEHEADER hdr;
LPWSTR lpszServerName;
LPWSTR lpszUserName;
INTERNET_PORT nServerPort;
struct sockaddr_in socketAddress;
struct hostent *phostent;
} WININETHTTPSESSIONW, *LPWININETHTTPSESSIONW;
#define HDR_ISREQUEST 0x0001
#define HDR_COMMADELIMITED 0x0002
#define HDR_SEMIDELIMITED 0x0004
typedef struct
{
LPWSTR lpszField;
LPWSTR lpszValue;
WORD wFlags;
WORD wCount;
} HTTPHEADERW, *LPHTTPHEADERW;
typedef struct
{
WININETHANDLEHEADER hdr;
LPWSTR lpszPath;
LPWSTR lpszVerb;
LPWSTR lpszRawHeaders;
WININET_NETCONNECTION netConnection;
HTTPHEADERW StdHeaders[HTTP_QUERY_MAX+1];
HTTPHEADERW *pCustHeaders;
DWORD nCustHeaders;
} WININETHTTPREQW, *LPWININETHTTPREQW;
typedef struct
{
WININETHANDLEHEADER hdr;
BOOL session_deleted;
int nDataSocket;
} WININETFILE, *LPWININETFILE;
typedef struct
{
WININETHANDLEHEADER hdr;
int sndSocket;
int lstnSocket;
int pasvSocket; /* data socket connected by us in case of passive FTP */
LPWININETFILE download_in_progress;
struct sockaddr_in socketAddress;
struct sockaddr_in lstnSocketAddress;
struct hostent *phostent;
LPWSTR lpszPassword;
LPWSTR lpszUserName;
} WININETFTPSESSIONW, *LPWININETFTPSESSIONW;
typedef struct
{
BOOL bIsDirectory;
LPWSTR lpszName;
DWORD nSize;
struct tm tmLastModified;
unsigned short permissions;
} FILEPROPERTIESW, *LPFILEPROPERTIESW;
typedef struct
{
WININETHANDLEHEADER hdr;
DWORD index;
DWORD size;
LPFILEPROPERTIESW lpafp;
} WININETFINDNEXTW, *LPWININETFINDNEXTW;
typedef enum
{
FTPPUTFILEW,
FTPSETCURRENTDIRECTORYW,
FTPCREATEDIRECTORYW,
FTPFINDFIRSTFILEW,
FTPGETCURRENTDIRECTORYW,
FTPOPENFILEW,
FTPGETFILEW,
FTPDELETEFILEW,
FTPREMOVEDIRECTORYW,
FTPRENAMEFILEW,
INTERNETFINDNEXTW,
HTTPSENDREQUESTW,
HTTPOPENREQUESTW,
SENDCALLBACK,
INTERNETOPENURLW,
} ASYNC_FUNC;
struct WORKREQ_FTPPUTFILEW
{
LPWSTR lpszLocalFile;
LPWSTR lpszNewRemoteFile;
DWORD dwFlags;
DWORD dwContext;
};
struct WORKREQ_FTPSETCURRENTDIRECTORYW
{
LPWSTR lpszDirectory;
};
struct WORKREQ_FTPCREATEDIRECTORYW
{
LPWSTR lpszDirectory;
};
struct WORKREQ_FTPFINDFIRSTFILEW
{
LPWSTR lpszSearchFile;
LPWIN32_FIND_DATAW lpFindFileData;
DWORD dwFlags;
DWORD dwContext;
};
struct WORKREQ_FTPGETCURRENTDIRECTORYW
{
LPWSTR lpszDirectory;
DWORD *lpdwDirectory;
};
struct WORKREQ_FTPOPENFILEW
{
LPWSTR lpszFilename;
DWORD dwAccess;
DWORD dwFlags;
DWORD dwContext;
};
struct WORKREQ_FTPGETFILEW
{
LPWSTR lpszRemoteFile;
LPWSTR lpszNewFile;
BOOL fFailIfExists;
DWORD dwLocalFlagsAttribute;
DWORD dwFlags;
DWORD dwContext;
};
struct WORKREQ_FTPDELETEFILEW
{
LPWSTR lpszFilename;
};
struct WORKREQ_FTPREMOVEDIRECTORYW
{
LPWSTR lpszDirectory;
};
struct WORKREQ_FTPRENAMEFILEW
{
LPWSTR lpszSrcFile;
LPWSTR lpszDestFile;
};
struct WORKREQ_INTERNETFINDNEXTW
{
LPWIN32_FIND_DATAW lpFindFileData;
};
struct WORKREQ_HTTPOPENREQUESTW
{
LPWSTR lpszVerb;
LPWSTR lpszObjectName;
LPWSTR lpszVersion;
LPWSTR lpszReferrer;
LPCWSTR *lpszAcceptTypes;
DWORD dwFlags;
DWORD dwContext;
};
struct WORKREQ_HTTPSENDREQUESTW
{
LPWSTR lpszHeader;
DWORD dwHeaderLength;
LPVOID lpOptional;
DWORD dwOptionalLength;
};
struct WORKREQ_SENDCALLBACK
{
DWORD dwContext;
DWORD dwInternetStatus;
LPVOID lpvStatusInfo;
DWORD dwStatusInfoLength;
};
struct WORKREQ_INTERNETOPENURLW
{
HINTERNET hInternet;
LPWSTR lpszUrl;
LPWSTR lpszHeaders;
DWORD dwHeadersLength;
DWORD dwFlags;
DWORD dwContext;
};
typedef struct WORKREQ
{
ASYNC_FUNC asyncall;
WININETHANDLEHEADER *hdr;
union {
struct WORKREQ_FTPPUTFILEW FtpPutFileW;
struct WORKREQ_FTPSETCURRENTDIRECTORYW FtpSetCurrentDirectoryW;
struct WORKREQ_FTPCREATEDIRECTORYW FtpCreateDirectoryW;
struct WORKREQ_FTPFINDFIRSTFILEW FtpFindFirstFileW;
struct WORKREQ_FTPGETCURRENTDIRECTORYW FtpGetCurrentDirectoryW;
struct WORKREQ_FTPOPENFILEW FtpOpenFileW;
struct WORKREQ_FTPGETFILEW FtpGetFileW;
struct WORKREQ_FTPDELETEFILEW FtpDeleteFileW;
struct WORKREQ_FTPREMOVEDIRECTORYW FtpRemoveDirectoryW;
struct WORKREQ_FTPRENAMEFILEW FtpRenameFileW;
struct WORKREQ_INTERNETFINDNEXTW InternetFindNextW;
struct WORKREQ_HTTPOPENREQUESTW HttpOpenRequestW;
struct WORKREQ_HTTPSENDREQUESTW HttpSendRequestW;
struct WORKREQ_SENDCALLBACK SendCallback;
struct WORKREQ_INTERNETOPENURLW InternetOpenUrlW;
} u;
struct WORKREQ *next;
struct WORKREQ *prev;
} WORKREQUEST, *LPWORKREQUEST;
HINTERNET WININET_AllocHandle( LPWININETHANDLEHEADER info );
LPWININETHANDLEHEADER WININET_GetObject( HINTERNET hinternet );
LPWININETHANDLEHEADER WININET_AddRef( LPWININETHANDLEHEADER info );
BOOL WININET_Release( LPWININETHANDLEHEADER info );
BOOL WININET_FreeHandle( HINTERNET hinternet );
HINTERNET WININET_FindHandle( LPWININETHANDLEHEADER info );
time_t ConvertTimeString(LPCWSTR asctime);
HINTERNET FTP_Connect(LPWININETAPPINFOW hIC, LPCWSTR lpszServerName,
INTERNET_PORT nServerPort, LPCWSTR lpszUserName,
LPCWSTR lpszPassword, DWORD dwFlags, DWORD dwContext,
DWORD dwInternalFlags);
HINTERNET HTTP_Connect(LPWININETAPPINFOW hIC, LPCWSTR lpszServerName,
INTERNET_PORT nServerPort, LPCWSTR lpszUserName,
LPCWSTR lpszPassword, DWORD dwFlags, DWORD dwContext,
DWORD dwInternalFlags);
BOOL GetAddress(LPCWSTR lpszServerName, INTERNET_PORT nServerPort,
struct hostent **phe, struct sockaddr_in *psa);
void INTERNET_SetLastError(DWORD dwError);
DWORD INTERNET_GetLastError(void);
BOOL INTERNET_AsyncCall(LPWORKREQUEST lpWorkRequest);
LPSTR INTERNET_GetResponseBuffer(void);
LPSTR INTERNET_GetNextLine(INT nSocket, LPDWORD dwLen);
BOOLAPI FTP_FtpPutFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszLocalFile,
LPCWSTR lpszNewRemoteFile, DWORD dwFlags, DWORD dwContext);
BOOLAPI FTP_FtpSetCurrentDirectoryW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszDirectory);
BOOLAPI FTP_FtpCreateDirectoryW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszDirectory);
INTERNETAPI HINTERNET WINAPI FTP_FtpFindFirstFileW(LPWININETFTPSESSIONW lpwfs,
LPCWSTR lpszSearchFile, LPWIN32_FIND_DATAW lpFindFileData, DWORD dwFlags, DWORD dwContext);
BOOLAPI FTP_FtpGetCurrentDirectoryW(LPWININETFTPSESSIONW lpwfs, LPWSTR lpszCurrentDirectory,
LPDWORD lpdwCurrentDirectory);
BOOL FTP_ConvertFileProp(LPFILEPROPERTIESW lpafp, LPWIN32_FIND_DATAW lpFindFileData);
BOOL FTP_FtpRenameFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszSrc, LPCWSTR lpszDest);
BOOL FTP_FtpRemoveDirectoryW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszDirectory);
BOOL FTP_FtpDeleteFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszFileName);
HINTERNET FTP_FtpOpenFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszFileName,
DWORD fdwAccess, DWORD dwFlags, DWORD dwContext);
BOOLAPI FTP_FtpGetFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszRemoteFile, LPCWSTR lpszNewFile,
BOOL fFailIfExists, DWORD dwLocalFlagsAttribute, DWORD dwInternetFlags,
DWORD dwContext);
BOOLAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders,
DWORD dwHeaderLength, LPVOID lpOptional ,DWORD dwOptionalLength);
INTERNETAPI HINTERNET WINAPI HTTP_HttpOpenRequestW(LPWININETHTTPSESSIONW lpwhs,
LPCWSTR lpszVerb, LPCWSTR lpszObjectName, LPCWSTR lpszVersion,
LPCWSTR lpszReferrer , LPCWSTR *lpszAcceptTypes,
DWORD dwFlags, DWORD dwContext);
VOID SendAsyncCallback(LPWININETHANDLEHEADER hdr, DWORD dwContext,
DWORD dwInternetStatus, LPVOID lpvStatusInfo,
DWORD dwStatusInfoLength);
VOID SendSyncCallback(LPWININETHANDLEHEADER hdr, DWORD dwContext,
DWORD dwInternetStatus, LPVOID lpvStatusInfo,
DWORD dwStatusInfoLength);
BOOL HTTP_InsertProxyAuthorization( LPWININETHTTPREQW lpwhr,
LPCWSTR username, LPCWSTR password );
BOOL NETCON_connected(WININET_NETCONNECTION *connection);
void NETCON_init(WININET_NETCONNECTION *connnection, BOOL useSSL);
BOOL NETCON_create(WININET_NETCONNECTION *connection, int domain,
int type, int protocol);
BOOL NETCON_close(WININET_NETCONNECTION *connection);
BOOL NETCON_connect(WININET_NETCONNECTION *connection, const struct sockaddr *serv_addr,
unsigned int addrlen);
BOOL NETCON_send(WININET_NETCONNECTION *connection, const void *msg, size_t len, int flags,
int *sent /* out */);
BOOL NETCON_recv(WININET_NETCONNECTION *connection, void *buf, size_t len, int flags,
int *recvd /* out */);
BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPDWORD dwBuffer);
#define MAX_REPLY_LEN 0x5B4
/* Used for debugging - maybe need to be shared in the Wine debugging code ? */
typedef struct
{
DWORD val;
const char* name;
} wininet_flag_info;
extern void dump_INTERNET_FLAGS(DWORD dwFlags) ;
#endif /* _WINE_INTERNET_H_ */

View File

@@ -1,9 +0,0 @@
# $Id: makefile 7409 2004-01-02 19:49:47Z gvg $
PATH_TO_TOP = ../..
TARGET_TYPE = winedll
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk

View File

@@ -1,502 +0,0 @@
/*
* Wininet - networking layer. Uses unix sockets or OpenSSL.
*
* Copyright 2002 TransGaming Technologies Inc.
*
* David Hammerton
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
#include <sys/types.h>
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
//#include "wine/library.h"
#include "windef.h"
#include "winbase.h"
#include "wininet.h"
#include "winerror.h"
#include "wine/debug.h"
#include "internet.h"
#define RESPONSE_TIMEOUT 30 /* FROM internet.c */
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
/* FIXME!!!!!!
* This should use winsock - To use winsock the functions will have to change a bit
* as they are designed for unix sockets.
* SSL stuff should use crypt32.dll
*/
#ifdef HAVE_OPENSSL_SSL_H
#ifndef SONAME_LIBSSL
#define SONAME_LIBSSL "libssl.so"
#endif
#ifndef SONAME_LIBCRYPTO
#define SONAME_LIBCRYPTO "libcrypto.so"
#endif
static void *OpenSSL_ssl_handle;
static void *OpenSSL_crypto_handle;
static SSL_METHOD *meth;
static SSL_CTX *ctx;
#define MAKE_FUNCPTR(f) static typeof(f) * p##f
/* OpenSSL functions that we use */
MAKE_FUNCPTR(SSL_library_init);
MAKE_FUNCPTR(SSL_load_error_strings);
MAKE_FUNCPTR(SSLv23_method);
MAKE_FUNCPTR(SSL_CTX_new);
MAKE_FUNCPTR(SSL_new);
MAKE_FUNCPTR(SSL_set_bio);
MAKE_FUNCPTR(SSL_connect);
MAKE_FUNCPTR(SSL_write);
MAKE_FUNCPTR(SSL_read);
MAKE_FUNCPTR(SSL_CTX_get_timeout);
MAKE_FUNCPTR(SSL_CTX_set_timeout);
/* OpenSSL's libcrypto functions that we use */
MAKE_FUNCPTR(BIO_new_socket);
MAKE_FUNCPTR(BIO_new_fp);
#undef MAKE_FUNCPTR
#endif
void NETCON_init(WININET_NETCONNECTION *connection, BOOL useSSL)
{
connection->useSSL = useSSL;
connection->socketFD = -1;
if (connection->useSSL)
{
#ifdef HAVE_OPENSSL_SSL_H
TRACE("using SSL connection\n");
connection->ssl_sock = -1;
if (OpenSSL_ssl_handle) /* already initilzed everything */
return;
OpenSSL_ssl_handle = wine_dlopen(SONAME_LIBSSL, RTLD_NOW, NULL, 0);
if (!OpenSSL_ssl_handle)
{
ERR("trying to use a SSL connection, but couldn't load %s. Expect trouble.\n",
SONAME_LIBSSL);
connection->useSSL = FALSE;
return;
}
OpenSSL_crypto_handle = wine_dlopen(SONAME_LIBCRYPTO, RTLD_NOW, NULL, 0);
if (!OpenSSL_crypto_handle)
{
ERR("trying to use a SSL connection, but couldn't load %s. Expect trouble.\n",
SONAME_LIBCRYPTO);
connection->useSSL = FALSE;
return;
}
/* mmm nice ugly macroness */
#define DYNSSL(x) \
p##x = wine_dlsym(OpenSSL_ssl_handle, #x, NULL, 0); \
if (!p##x) \
{ \
ERR("failed to load symbol %s\n", #x); \
connection->useSSL = FALSE; \
return; \
}
DYNSSL(SSL_library_init);
DYNSSL(SSL_load_error_strings);
DYNSSL(SSLv23_method);
DYNSSL(SSL_CTX_new);
DYNSSL(SSL_new);
DYNSSL(SSL_set_bio);
DYNSSL(SSL_connect);
DYNSSL(SSL_write);
DYNSSL(SSL_read);
DYNSSL(SSL_CTX_get_timeout);
DYNSSL(SSL_CTX_set_timeout);
#undef DYNSSL
#define DYNCRYPTO(x) \
p##x = wine_dlsym(OpenSSL_crypto_handle, #x, NULL, 0); \
if (!p##x) \
{ \
ERR("failed to load symbol %s\n", #x); \
connection->useSSL = FALSE; \
return; \
}
DYNCRYPTO(BIO_new_fp);
DYNCRYPTO(BIO_new_socket);
#undef DYNCRYPTO
pSSL_library_init();
pSSL_load_error_strings();
pBIO_new_fp(stderr, BIO_NOCLOSE); /* FIXME: should use winedebug stuff */
meth = pSSLv23_method();
/* FIXME: SECURITY PROBLEM! WE ARN'T VERIFYING THE HOSTS CERTIFICATES OR ANYTHING */
#else
FIXME("can't use SSL, not compiled in.\n");
connection->useSSL = FALSE;
#endif
}
}
BOOL NETCON_connected(WININET_NETCONNECTION *connection)
{
if (!connection->useSSL)
{
if (connection->socketFD == -1)
return FALSE;
return TRUE;
}
else
{
#ifdef HAVE_OPENSSL_SSL_H
if (connection->ssl_sock == -1)
return FALSE;
return TRUE;
#else
return FALSE;
#endif
}
}
/******************************************************************************
* NETCON_create
* Basically calls 'socket()' unless useSSL is supplised,
* in which case we do other things.
*/
BOOL NETCON_create(WININET_NETCONNECTION *connection, int domain,
int type, int protocol)
{
if (!connection->useSSL)
{
connection->socketFD = socket(domain, type, protocol);
if (connection->socketFD == -1)
return FALSE;
return TRUE;
}
else
{
#ifdef HAVE_OPENSSL_SSL_H
connection->ssl_sock = socket(domain, type, protocol);
return TRUE;
#else
return FALSE;
#endif
}
}
/******************************************************************************
* NETCON_close
* Basically calls 'close()' unless we should use SSL
*/
BOOL NETCON_close(WININET_NETCONNECTION *connection)
{
if (!NETCON_connected(connection)) return FALSE;
if (!connection->useSSL)
{
int result;
result = closesocket(connection->socketFD);
connection->socketFD = -1;
if (result == -1)
return FALSE;
return TRUE;
}
else
{
#ifdef HAVE_OPENSSL_SSL_H
closesocket(connection->ssl_sock);
connection->ssl_sock = -1;
/* FIXME should we call SSL_shutdown here?? Probably on whatever is the
* opposite of NETCON_init.... */
return TRUE;
#else
return FALSE;
#endif
}
}
/******************************************************************************
* NETCON_connect
* Basically calls 'connect()' unless we should use SSL
*/
BOOL NETCON_connect(WININET_NETCONNECTION *connection, const struct sockaddr *serv_addr,
unsigned int addrlen)
{
if (!NETCON_connected(connection)) return FALSE;
if (!connection->useSSL)
{
int result;
result = connect(connection->socketFD, serv_addr, addrlen);
if (result == -1)
{
closesocket(connection->socketFD);
connection->socketFD = -1;
return FALSE;
}
return TRUE;
}
else
{
#ifdef HAVE_OPENSSL_SSL_H
BIO *sbio;
ctx = pSSL_CTX_new(meth);
connection->ssl_s = pSSL_new(ctx);
if (connect(connection->ssl_sock, serv_addr, addrlen) == -1)
return FALSE;
sbio = pBIO_new_socket(connection->ssl_sock, BIO_NOCLOSE);
pSSL_set_bio(connection->ssl_s, sbio, sbio);
if (pSSL_connect(connection->ssl_s) <= 0)
{
ERR("ssl couldn't connect\n");
return FALSE;
}
return TRUE;
#else
return FALSE;
#endif
}
}
/******************************************************************************
* NETCON_send
* Basically calls 'send()' unless we should use SSL
* number of chars send is put in *sent
*/
BOOL NETCON_send(WININET_NETCONNECTION *connection, const void *msg, size_t len, int flags,
int *sent /* out */)
{
if (!NETCON_connected(connection)) return FALSE;
if (!connection->useSSL)
{
*sent = send(connection->socketFD, msg, len, flags);
if (*sent == -1)
return FALSE;
return TRUE;
}
else
{
#ifdef HAVE_OPENSSL_SSL_H
if (flags)
FIXME("SSL_write doesn't support any flags (%08x)\n", flags);
*sent = pSSL_write(connection->ssl_s, msg, len);
if (*sent < 1 && len)
return FALSE;
return TRUE;
#else
return FALSE;
#endif
}
}
/******************************************************************************
* NETCON_recv
* Basically calls 'recv()' unless we should use SSL
* number of chars received is put in *recvd
*/
BOOL NETCON_recv(WININET_NETCONNECTION *connection, void *buf, size_t len, int flags,
int *recvd /* out */)
{
if (!NETCON_connected(connection)) return FALSE;
if (!connection->useSSL)
{
*recvd = recv(connection->socketFD, buf, len, flags);
if (*recvd == -1)
return FALSE;
return TRUE;
}
else
{
#ifdef HAVE_OPENSSL_SSL_H
static char *peek_msg = NULL;
static char *peek_msg_mem = NULL;
if (flags & (~MSG_PEEK))
FIXME("SSL_read does not support the following flag: %08x\n", flags);
/* this ugly hack is all for MSG_PEEK. eww gross */
if (flags & MSG_PEEK && !peek_msg)
{
peek_msg = peek_msg_mem = HeapAlloc(GetProcessHeap(), 0, (sizeof(char) * len) + 1);
}
else if (flags & MSG_PEEK && peek_msg)
{
size_t peek_msg_len = strlen(peek_msg);
if (len < peek_msg_len)
FIXME("buffer isn't big enough. Do the expect us to wrap?\n");
memcpy(buf, peek_msg, min(len,peek_msg_len+1));
*recvd = min(len, peek_msg_len);
return TRUE;
}
else if (peek_msg)
{
size_t peek_msg_len = strlen(peek_msg);
memcpy(buf, peek_msg, min(len,peek_msg_len+1));
peek_msg += *recvd = min(len, peek_msg_len);
if (*peek_msg == '\0' || *(peek_msg - 1) == '\0')
{
HeapFree(GetProcessHeap(), 0, peek_msg_mem);
peek_msg_mem = NULL;
peek_msg = NULL;
}
return TRUE;
}
*recvd = pSSL_read(connection->ssl_s, buf, len);
if (flags & MSG_PEEK) /* must copy stuff into buffer */
{
if (!*recvd)
{
HeapFree(GetProcessHeap(), 0, peek_msg_mem);
peek_msg_mem = NULL;
peek_msg = NULL;
}
else
{
memcpy(peek_msg, buf, *recvd);
peek_msg[*recvd] = '\0';
}
}
if (*recvd < 1 && len)
return FALSE;
return TRUE;
#else
return FALSE;
#endif
}
}
/******************************************************************************
* NETCON_getNextLine
*/
BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPDWORD dwBuffer)
{
TRACE("\n");
if (!NETCON_connected(connection)) return FALSE;
if (!connection->useSSL)
{
struct timeval tv;
fd_set infd;
BOOL bSuccess = FALSE;
DWORD nRecv = 0;
FD_ZERO(&infd);
FD_SET(connection->socketFD, &infd);
tv.tv_sec=RESPONSE_TIMEOUT;
tv.tv_usec=0;
while (nRecv < *dwBuffer)
{
if (select(connection->socketFD+1,&infd,NULL,NULL,&tv) > 0)
{
if (recv(connection->socketFD, &lpszBuffer[nRecv], 1, 0) <= 0)
{
INTERNET_SetLastError(ERROR_CONNECTION_ABORTED); /* fixme: right error? */
goto lend;
}
if (lpszBuffer[nRecv] == '\n')
{
bSuccess = TRUE;
break;
}
if (lpszBuffer[nRecv] != '\r')
nRecv++;
}
else
{
INTERNET_SetLastError(ERROR_INTERNET_TIMEOUT);
goto lend;
}
}
lend: /* FIXME: don't use labels */
if (bSuccess)
{
lpszBuffer[nRecv++] = '\0';
*dwBuffer = nRecv;
TRACE(":%lu %s\n", nRecv, lpszBuffer);
return TRUE;
}
else
{
return FALSE;
}
}
else
{
#ifdef HAVE_OPENSSL_SSL_H
long prev_timeout;
DWORD nRecv = 0;
BOOL success = TRUE;
prev_timeout = pSSL_CTX_get_timeout(ctx);
pSSL_CTX_set_timeout(ctx, RESPONSE_TIMEOUT);
while (nRecv < *dwBuffer)
{
int recv = 1;
if (!NETCON_recv(connection, &lpszBuffer[nRecv], 1, 0, &recv))
{
INTERNET_SetLastError(ERROR_CONNECTION_ABORTED);
success = FALSE;
}
if (lpszBuffer[nRecv] == '\n')
{
success = TRUE;
break;
}
if (lpszBuffer[nRecv] != '\r')
nRecv++;
}
pSSL_CTX_set_timeout(ctx, prev_timeout);
if (success)
{
lpszBuffer[nRecv++] = '\0';
*dwBuffer = nRecv;
TRACE("_SSL:%lu %s\n", nRecv, lpszBuffer);
return TRUE;
}
return FALSE;
#else
return FALSE;
#endif
}
}

View File

@@ -1,53 +0,0 @@
/*
* Top level resource file for Wininet
*
* Copyright 2003 Mike McCormack for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "winnls.h"
#include "resource.h"
/*
* Everything that does not depend on language,
* like textless bitmaps etc, go into the
* neutral language. This will prevent them from
* being duplicated for each language.
*/
/* #include "wininet_xx.rc" */
/*
* Everything specific to any language goes
* in one of the specific files.
* Note that you can and may override resources
* which also have a neutral version. This is to
* get localized bitmaps for example.
*/
#include "wininet_Cs.rc"
#include "wininet_De.rc"
#include "wininet_En.rc"
#include "wininet_Es.rc"
#include "wininet_Fr.rc"
#include "wininet_It.rc"
#include "wininet_Ja.rc"
#include "wininet_Nl.rc"
#include "wininet_Pt.rc"
#include "wininet_Ru.rc"
#include "wininet_Si.rc"

View File

@@ -1,14 +0,0 @@
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../../..
SRCDIR = @srcdir@
VPATH = @srcdir@
TESTDLL = wininet.dll
IMPORTS = wininet
CTESTS = \
generated.c \
http.c
@MAKE_TEST_RULES@
### Dependencies:

File diff suppressed because it is too large Load Diff

View File

@@ -1,501 +0,0 @@
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include "windef.h"
#include "winbase.h"
#include "wininet.h"
#include "wine/test.h"
#define TEST_URL "http://www.winehq.org/site/about"
#define TEST_URL_PATH "/site/about"
#define TEST_URL2 "http://www.myserver.com/myscript.php?arg=1"
#define TEST_URL2_SERVER "www.myserver.com"
#define TEST_URL2_PATH "/myscript.php"
#define TEST_URL2_PATHEXTRA "/myscript.php?arg=1"
#define TEST_URL2_EXTRA "?arg=1"
int goon = 0;
VOID WINAPI callback(
HINTERNET hInternet,
DWORD dwContext,
DWORD dwInternetStatus,
LPVOID lpvStatusInformation,
DWORD dwStatusInformationLength
)
{
char name[124];
switch (dwInternetStatus)
{
case INTERNET_STATUS_RESOLVING_NAME:
strcpy(name,"INTERNET_STATUS_RESOLVING_NAME");
break;
case INTERNET_STATUS_NAME_RESOLVED:
strcpy(name,"INTERNET_STATUS_NAME_RESOLVED");
break;
case INTERNET_STATUS_CONNECTING_TO_SERVER:
strcpy(name,"INTERNET_STATUS_CONNECTING_TO_SERVER");
break;
case INTERNET_STATUS_CONNECTED_TO_SERVER:
strcpy(name,"INTERNET_STATUS_CONNECTED_TO_SERVER");
break;
case INTERNET_STATUS_SENDING_REQUEST:
strcpy(name,"INTERNET_STATUS_SENDING_REQUEST");
break;
case INTERNET_STATUS_REQUEST_SENT:
strcpy(name,"INTERNET_STATUS_REQUEST_SENT");
break;
case INTERNET_STATUS_RECEIVING_RESPONSE:
strcpy(name,"INTERNET_STATUS_RECEIVING_RESPONSE");
break;
case INTERNET_STATUS_RESPONSE_RECEIVED:
strcpy(name,"INTERNET_STATUS_RESPONSE_RECEIVED");
break;
case INTERNET_STATUS_CTL_RESPONSE_RECEIVED:
strcpy(name,"INTERNET_STATUS_CTL_RESPONSE_RECEIVED");
break;
case INTERNET_STATUS_PREFETCH:
strcpy(name,"INTERNET_STATUS_PREFETCH");
break;
case INTERNET_STATUS_CLOSING_CONNECTION:
strcpy(name,"INTERNET_STATUS_CLOSING_CONNECTION");
break;
case INTERNET_STATUS_CONNECTION_CLOSED:
strcpy(name,"INTERNET_STATUS_CONNECTION_CLOSED");
break;
case INTERNET_STATUS_HANDLE_CREATED:
strcpy(name,"INTERNET_STATUS_HANDLE_CREATED");
break;
case INTERNET_STATUS_HANDLE_CLOSING:
strcpy(name,"INTERNET_STATUS_HANDLE_CLOSING");
break;
case INTERNET_STATUS_REQUEST_COMPLETE:
strcpy(name,"INTERNET_STATUS_REQUEST_COMPLETE");
goon = 1;
break;
case INTERNET_STATUS_REDIRECT:
strcpy(name,"INTERNET_STATUS_REDIRECT");
break;
case INTERNET_STATUS_INTERMEDIATE_RESPONSE:
strcpy(name,"INTERNET_STATUS_INTERMEDIATE_RESPONSE");
break;
}
trace("Callback %p 0x%lx %s(%li) %p %ld\n",hInternet,dwContext,name,dwInternetStatus,lpvStatusInformation,dwStatusInformationLength);
}
void winapi_test(int flags)
{
DWORD rc;
CHAR buffer[4000];
DWORD length;
DWORD out;
const char *types[2] = { "*", NULL };
HINTERNET hi, hic = 0, hor = 0;
trace("Starting with flags 0x%x\n",flags);
trace("InternetOpenA <--\n");
hi = InternetOpenA("",0x0,0x0,0x0,flags);
ok((hi != 0x0),"InternetOpen Failed\n");
trace("InternetOpenA -->\n");
if (hi == 0x0) goto abort;
InternetSetStatusCallback(hi,&callback);
trace("InternetConnectA <--\n");
hic=InternetConnectA(hi,"www.winehq.org",0x0,0x0,0x0,0x3,0x0,0xdeadbeef);
ok((hic != 0x0),"InternetConnect Failed\n");
trace("InternetConnectA -->\n");
if (hic == 0x0) goto abort;
trace("HttpOpenRequestA <--\n");
hor = HttpOpenRequestA(hic, "GET",
"/about/",
0x0,0x0,types,0x00400800,0xdeadbead);
if (hor == 0x0 && GetLastError() == 12007 /* ERROR_INTERNET_NAME_NOT_RESOLVED */) {
/*
* If the internet name can't be resolved we are probably behind
* a firewall or in some other way not directly connected to the
* Internet. Not enough reason to fail the test. Just ignore and
* abort.
*/
} else {
ok((hor != 0x0),"HttpOpenRequest Failed\n");
}
trace("HttpOpenRequestA -->\n");
if (hor == 0x0) goto abort;
trace("HttpSendRequestA -->\n");
SetLastError(0);
rc = HttpSendRequestA(hor, "", 0xffffffff,0x0,0x0);
if (flags)
ok(((rc == 0)&&(GetLastError()==997)),
"Asynchronous HttpSendRequest NOT returning 0 with error 997\n");
else
ok((rc != 0) || GetLastError() == 12007, /* 12007 == XP */
"Synchronous HttpSendRequest returning 0, error %ld\n", GetLastError());
trace("HttpSendRequestA <--\n");
while ((flags)&&(!goon))
Sleep(100);
length = 4;
rc = InternetQueryOptionA(hor,0x17,&out,&length);
trace("Option 0x17 -> %li %li\n",rc,out);
length = 100;
rc = InternetQueryOptionA(hor,0x22,buffer,&length);
trace("Option 0x22 -> %li %s\n",rc,buffer);
length = 4000;
rc = HttpQueryInfoA(hor,0x16,buffer,&length,0x0);
buffer[length]=0;
trace("Option 0x16 -> %li %s\n",rc,buffer);
length = 4000;
rc = InternetQueryOptionA(hor,0x22,buffer,&length);
buffer[length]=0;
trace("Option 0x22 -> %li %s\n",rc,buffer);
length = 16;
rc = HttpQueryInfoA(hor,0x5,&buffer,&length,0x0);
trace("Option 0x5 -> %li %s (%li)\n",rc,buffer,GetLastError());
length = 100;
rc = HttpQueryInfoA(hor,0x1,buffer,&length,0x0);
buffer[length]=0;
trace("Option 0x1 -> %li %s\n",rc,buffer);
length = 100;
trace("Entering Query loop\n");
while (length)
{
rc = InternetQueryDataAvailable(hor,&length,0x0,0x0);
ok(!(rc == 0 && length != 0),"InternetQueryDataAvailable failed\n");
if (length)
{
char *buffer;
buffer = HeapAlloc(GetProcessHeap(),0,length+1);
rc = InternetReadFile(hor,buffer,length,&length);
buffer[length]=0;
trace("ReadFile -> %li %li\n",rc,length);
HeapFree(GetProcessHeap(),0,buffer);
}
}
abort:
if (hor != 0x0) {
rc = InternetCloseHandle(hor);
ok ((rc != 0), "InternetCloseHandle of handle opened by HttpOpenRequestA failed\n");
rc = InternetCloseHandle(hor);
ok ((rc == 0), "Double close of handle opened by HttpOpenRequestA succeeded\n");
}
if (hic != 0x0) {
rc = InternetCloseHandle(hic);
ok ((rc != 0), "InternetCloseHandle of handle opened by InternetConnectA failed\n");
}
if (hi != 0x0) {
rc = InternetCloseHandle(hi);
ok ((rc != 0), "InternetCloseHandle of handle opened by InternetOpenA failed\n");
if (flags)
Sleep(100);
}
}
void InternetOpenUrlA_test(void)
{
HINTERNET myhinternet, myhttp;
char buffer[0x400];
URL_COMPONENTSA urlComponents;
char protocol[32], hostName[1024], userName[1024];
char password[1024], extra[1024], path[1024];
DWORD size, readbytes, totalbytes=0;
BOOL ret;
myhinternet = InternetOpen("Winetest",0,NULL,NULL,INTERNET_FLAG_NO_CACHE_WRITE);
ok((myhinternet != 0), "InternetOpen failed, error %lx\n",GetLastError());
size = 0x400;
ret = InternetCanonicalizeUrl(TEST_URL, buffer, &size,ICU_BROWSER_MODE);
ok( ret, "InternetCanonicalizeUrl failed, error %lx\n",GetLastError());
urlComponents.dwStructSize = sizeof(URL_COMPONENTSA);
urlComponents.lpszScheme = protocol;
urlComponents.dwSchemeLength = 32;
urlComponents.lpszHostName = hostName;
urlComponents.dwHostNameLength = 1024;
urlComponents.lpszUserName = userName;
urlComponents.dwUserNameLength = 1024;
urlComponents.lpszPassword = password;
urlComponents.dwPasswordLength = 1024;
urlComponents.lpszUrlPath = path;
urlComponents.dwUrlPathLength = 2048;
urlComponents.lpszExtraInfo = extra;
urlComponents.dwExtraInfoLength = 1024;
ret = InternetCrackUrl(TEST_URL, 0,0,&urlComponents);
ok( ret, "InternetCrackUrl failed, error %lx\n",GetLastError());
SetLastError(0);
myhttp = InternetOpenUrl(myhinternet, TEST_URL, 0, 0,
INTERNET_FLAG_RELOAD|INTERNET_FLAG_NO_CACHE_WRITE|INTERNET_FLAG_TRANSFER_BINARY,0);
if (GetLastError() == 12007)
return; /* WinXP returns this when not connected to the net */
ok((myhttp != 0),"InternetOpenUrl failed, error %lx\n",GetLastError());
ret = InternetReadFile(myhttp, buffer,0x400,&readbytes);
ok( ret, "InternetReadFile failed, error %lx\n",GetLastError());
totalbytes += readbytes;
while (readbytes && InternetReadFile(myhttp, buffer,0x400,&readbytes))
totalbytes += readbytes;
trace("read 0x%08lx bytes\n",totalbytes);
}
void InternetCrackUrl_test(void)
{
URL_COMPONENTSA urlComponents;
char protocol[32], hostName[1024], userName[1024];
char password[1024], extra[1024], path[1024];
BOOL ret;
urlComponents.dwStructSize = sizeof(URL_COMPONENTSA);
urlComponents.lpszScheme = protocol;
urlComponents.dwSchemeLength = 32;
urlComponents.lpszHostName = hostName;
urlComponents.dwHostNameLength = 1024;
urlComponents.lpszUserName = userName;
urlComponents.dwUserNameLength = 1024;
urlComponents.lpszPassword = password;
urlComponents.dwPasswordLength = 1024;
urlComponents.lpszUrlPath = path;
urlComponents.dwUrlPathLength = 2048;
urlComponents.lpszExtraInfo = extra;
urlComponents.dwExtraInfoLength = 1024;
ret = InternetCrackUrl(TEST_URL, 0,0,&urlComponents);
ok( ret, "InternetCrackUrl failed, error %lx\n",GetLastError());
ok((strcmp(TEST_URL_PATH,path) == 0),"path cracked wrong\n");
/* Bug 1805: Confirm the returned lengths are correct: */
/* 1. When extra info split out explicitly */
ZeroMemory(&urlComponents, sizeof(urlComponents));
urlComponents.dwStructSize = sizeof(urlComponents);
urlComponents.dwHostNameLength = 1;
urlComponents.dwUrlPathLength = 1;
urlComponents.dwExtraInfoLength = 1;
ok(InternetCrackUrlA(TEST_URL2, 0, 0, &urlComponents),"InternetCrackUrl failed, error 0x%lx\n", GetLastError());
ok(urlComponents.dwUrlPathLength == strlen(TEST_URL2_PATH),".dwUrlPathLength should be %d, but is %ld\n", strlen(TEST_URL2_PATH), urlComponents.dwUrlPathLength);
ok(!strncmp(urlComponents.lpszUrlPath,TEST_URL2_PATH,strlen(TEST_URL2_PATH)),"lpszUrlPath should be %s but is %s\n", TEST_URL2_PATH, urlComponents.lpszUrlPath);
ok(urlComponents.dwHostNameLength == strlen(TEST_URL2_SERVER),".dwHostNameLength should be %d, but is %ld\n", strlen(TEST_URL2_SERVER), urlComponents.dwHostNameLength);
ok(!strncmp(urlComponents.lpszHostName,TEST_URL2_SERVER,strlen(TEST_URL2_SERVER)),"lpszHostName should be %s but is %s\n", TEST_URL2_SERVER, urlComponents.lpszHostName);
ok(urlComponents.dwExtraInfoLength == strlen(TEST_URL2_EXTRA),".dwExtraInfoLength should be %d, but is %ld\n", strlen(TEST_URL2_EXTRA), urlComponents.dwExtraInfoLength);
ok(!strncmp(urlComponents.lpszExtraInfo,TEST_URL2_EXTRA,strlen(TEST_URL2_EXTRA)),"lpszExtraInfo should be %s but is %s\n", TEST_URL2_EXTRA, urlComponents.lpszHostName);
/* 2. When extra info is not split out explicitly and is in url path */
ZeroMemory(&urlComponents, sizeof(urlComponents));
urlComponents.dwStructSize = sizeof(urlComponents);
urlComponents.dwHostNameLength = 1;
urlComponents.dwUrlPathLength = 1;
ok(InternetCrackUrlA(TEST_URL2, 0, 0, &urlComponents),"InternetCrackUrl failed with GLE 0x%lx\n",GetLastError());
ok(urlComponents.dwUrlPathLength == strlen(TEST_URL2_PATHEXTRA),".dwUrlPathLength should be %d, but is %ld\n", strlen(TEST_URL2_PATHEXTRA), urlComponents.dwUrlPathLength);
ok(!strncmp(urlComponents.lpszUrlPath,TEST_URL2_PATHEXTRA,strlen(TEST_URL2_PATHEXTRA)),"lpszUrlPath should be %s but is %s\n", TEST_URL2_PATHEXTRA, urlComponents.lpszUrlPath);
ok(urlComponents.dwHostNameLength == strlen(TEST_URL2_SERVER),".dwHostNameLength should be %d, but is %ld\n", strlen(TEST_URL2_SERVER), urlComponents.dwHostNameLength);
ok(!strncmp(urlComponents.lpszHostName,TEST_URL2_SERVER,strlen(TEST_URL2_SERVER)),"lpszHostName should be %s but is %s\n", TEST_URL2_SERVER, urlComponents.lpszHostName);
}
void InternetCrackUrlW_test(void)
{
WCHAR url[] = {
'h','t','t','p',':','/','/','1','9','2','.','1','6','8','.','0','.','2','2','/',
'C','F','I','D','E','/','m','a','i','n','.','c','f','m','?','C','F','S','V','R',
'=','I','D','E','&','A','C','T','I','O','N','=','I','D','E','_','D','E','F','A',
'U','L','T', 0 };
URL_COMPONENTSW comp;
WCHAR scheme[20], host[20], user[20], pwd[20], urlpart[50], extra[50];
BOOL r;
urlpart[0]=0;
scheme[0]=0;
extra[0]=0;
host[0]=0;
user[0]=0;
pwd[0]=0;
memset(&comp, 0, sizeof comp);
comp.dwStructSize = sizeof comp;
comp.lpszScheme = scheme;
comp.dwSchemeLength = sizeof scheme;
comp.lpszHostName = host;
comp.dwHostNameLength = sizeof host;
comp.lpszUserName = user;
comp.dwUserNameLength = sizeof user;
comp.lpszPassword = pwd;
comp.dwPasswordLength = sizeof pwd;
comp.lpszUrlPath = urlpart;
comp.dwUrlPathLength = sizeof urlpart;
comp.lpszExtraInfo = extra;
comp.dwExtraInfoLength = sizeof extra;
r = InternetCrackUrlW(url, 0, 0, &comp );
ok( r, "failed to crack url\n");
ok( comp.dwSchemeLength == 4, "scheme length wrong\n");
ok( comp.dwHostNameLength == 12, "host length wrong\n");
ok( comp.dwUserNameLength == 0, "user length wrong\n");
ok( comp.dwPasswordLength == 0, "password length wrong\n");
ok( comp.dwUrlPathLength == 15, "url length wrong\n");
ok( comp.dwExtraInfoLength == 29, "extra length wrong\n");
urlpart[0]=0;
scheme[0]=0;
extra[0]=0;
host[0]=0;
user[0]=0;
pwd[0]=0;
memset(&comp, 0, sizeof comp);
comp.dwStructSize = sizeof comp;
comp.lpszHostName = host;
comp.dwHostNameLength = sizeof host;
comp.lpszUrlPath = urlpart;
comp.dwUrlPathLength = sizeof urlpart;
r = InternetCrackUrlW(url, 0, 0, &comp );
ok( r, "failed to crack url\n");
ok( comp.dwSchemeLength == 0, "scheme length wrong\n");
ok( comp.dwHostNameLength == 12, "host length wrong\n");
ok( comp.dwUserNameLength == 0, "user length wrong\n");
ok( comp.dwPasswordLength == 0, "password length wrong\n");
ok( comp.dwUrlPathLength == 44, "url length wrong\n");
ok( comp.dwExtraInfoLength == 0, "extra length wrong\n");
urlpart[0]=0;
scheme[0]=0;
extra[0]=0;
host[0]=0;
user[0]=0;
pwd[0]=0;
memset(&comp, 0, sizeof comp);
comp.dwStructSize = sizeof comp;
comp.lpszHostName = host;
comp.dwHostNameLength = sizeof host;
comp.lpszUrlPath = urlpart;
comp.dwUrlPathLength = sizeof urlpart;
comp.lpszExtraInfo = NULL;
comp.dwExtraInfoLength = sizeof extra;
r = InternetCrackUrlW(url, 0, 0, &comp );
ok( r, "failed to crack url\n");
ok( comp.dwSchemeLength == 0, "scheme length wrong\n");
ok( comp.dwHostNameLength == 12, "host length wrong\n");
ok( comp.dwUserNameLength == 0, "user length wrong\n");
ok( comp.dwPasswordLength == 0, "password length wrong\n");
ok( comp.dwUrlPathLength == 15, "url length wrong\n");
ok( comp.dwExtraInfoLength == 29, "extra length wrong\n");
}
static void InternetTimeFromSystemTimeA_test()
{
BOOL ret;
static const SYSTEMTIME time = { 2005, 1, 5, 7, 12, 6, 35, 0 };
char string[INTERNET_RFC1123_BUFSIZE];
static const char expect[] = "Fri, 07 Jan 2005 12:06:35 GMT";
ret = InternetTimeFromSystemTimeA( &time, INTERNET_RFC1123_FORMAT, string, sizeof(string) );
ok( ret, "InternetTimeFromSystemTimeA failed (%ld)\n", GetLastError() );
ok( !memcmp( string, expect, sizeof(expect) ),
"InternetTimeFromSystemTimeA failed (%ld)\n", GetLastError() );
}
static void InternetTimeFromSystemTimeW_test()
{
BOOL ret;
static const SYSTEMTIME time = { 2005, 1, 5, 7, 12, 6, 35, 0 };
WCHAR string[INTERNET_RFC1123_BUFSIZE + 1];
static const WCHAR expect[] = { 'F','r','i',',',' ','0','7',' ','J','a','n',' ','2','0','0','5',' ',
'1','2',':','0','6',':','3','5',' ','G','M','T',0 };
ret = InternetTimeFromSystemTimeW( &time, INTERNET_RFC1123_FORMAT, string, sizeof(string) );
ok( ret, "InternetTimeFromSystemTimeW failed (%ld)\n", GetLastError() );
ok( !memcmp( string, expect, sizeof(expect) ),
"InternetTimeFromSystemTimeW failed (%ld)\n", GetLastError() );
}
static void InternetTimeToSystemTimeA_test()
{
BOOL ret;
SYSTEMTIME time;
static const SYSTEMTIME expect = { 2005, 1, 5, 7, 12, 6, 35, 0 };
static const char string[] = "Fri, 07 Jan 2005 12:06:35 GMT";
static const char string2[] = " fri 7 jan 2005 12 06 35";
ret = InternetTimeToSystemTimeA( string, &time, 0 );
ok( ret, "InternetTimeToSystemTimeA failed (%ld)\n", GetLastError() );
ok( !memcmp( &time, &expect, sizeof(expect) ),
"InternetTimeToSystemTimeA failed (%ld)\n", GetLastError() );
ret = InternetTimeToSystemTimeA( string2, &time, 0 );
ok( ret, "InternetTimeToSystemTimeA failed (%ld)\n", GetLastError() );
ok( !memcmp( &time, &expect, sizeof(expect) ),
"InternetTimeToSystemTimeA failed (%ld)\n", GetLastError() );
}
static void InternetTimeToSystemTimeW_test()
{
BOOL ret;
SYSTEMTIME time;
static const SYSTEMTIME expect = { 2005, 1, 5, 7, 12, 6, 35, 0 };
static const WCHAR string[] = { 'F','r','i',',',' ','0','7',' ','J','a','n',' ','2','0','0','5',' ',
'1','2',':','0','6',':','3','5',' ','G','M','T',0 };
static const WCHAR string2[] = { ' ','f','r','i',' ','7',' ','j','a','n',' ','2','0','0','5',' ',
'1','2',' ','0','6',' ','3','5',0 };
static const WCHAR string3[] = { 'F','r',0 };
ret = InternetTimeToSystemTimeW( NULL, NULL, 0 );
ok( !ret, "InternetTimeToSystemTimeW succeeded (%ld)\n", GetLastError() );
ret = InternetTimeToSystemTimeW( NULL, &time, 0 );
ok( !ret, "InternetTimeToSystemTimeW succeeded (%ld)\n", GetLastError() );
ret = InternetTimeToSystemTimeW( string, NULL, 0 );
ok( !ret, "InternetTimeToSystemTimeW succeeded (%ld)\n", GetLastError() );
ret = InternetTimeToSystemTimeW( string, &time, 1 );
ok( ret, "InternetTimeToSystemTimeW failed (%ld)\n", GetLastError() );
ret = InternetTimeToSystemTimeW( string, &time, 0 );
ok( ret, "InternetTimeToSystemTimeW failed (%ld)\n", GetLastError() );
ok( !memcmp( &time, &expect, sizeof(expect) ),
"InternetTimeToSystemTimeW failed (%ld)\n", GetLastError() );
ret = InternetTimeToSystemTimeW( string2, &time, 0 );
ok( ret, "InternetTimeToSystemTimeW failed (%ld)\n", GetLastError() );
ok( !memcmp( &time, &expect, sizeof(expect) ),
"InternetTimeToSystemTimeW failed (%ld)\n", GetLastError() );
ret = InternetTimeToSystemTimeW( string3, &time, 0 );
ok( ret, "InternetTimeToSystemTimeW failed (%ld)\n", GetLastError() );
}
START_TEST(http)
{
winapi_test(0x10000000);
winapi_test(0x00000000);
InternetCrackUrl_test();
InternetOpenUrlA_test();
InternetCrackUrlW_test();
InternetTimeFromSystemTimeA_test();
InternetTimeFromSystemTimeW_test();
InternetTimeToSystemTimeA_test();
InternetTimeToSystemTimeW_test();
}

View File

@@ -1,84 +0,0 @@
/*
* Unit test suite for wininet functions
*
* Copyright 2004 Francois Gouget
*
* 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
*/
/* The Windows headers don't define A/W types for any of the following
* structures and pointers :-(
* Because for these structures there's not alignment or packing difference
* between the A and W versions, we just define a set of macros so the
* generated tests work anyway.
*/
#ifndef GOPHER_ABSTRACT_ATTRIBUTE_TYPE
#define GOPHER_ABSTRACT_ATTRIBUTE_TYPEA GOPHER_ABSTRACT_ATTRIBUTE_TYPE
#define GOPHER_ABSTRACT_ATTRIBUTE_TYPEW GOPHER_ABSTRACT_ATTRIBUTE_TYPE
#define GOPHER_ADMIN_ATTRIBUTE_TYPEA GOPHER_ADMIN_ATTRIBUTE_TYPE
#define GOPHER_ADMIN_ATTRIBUTE_TYPEW GOPHER_ADMIN_ATTRIBUTE_TYPE
#define GOPHER_ASK_ATTRIBUTE_TYPEA GOPHER_ASK_ATTRIBUTE_TYPE
#define GOPHER_ASK_ATTRIBUTE_TYPEW GOPHER_ASK_ATTRIBUTE_TYPE
#define GOPHER_ATTRIBUTE_ENUMERATORA GOPHER_ATTRIBUTE_ENUMERATOR
#define GOPHER_ATTRIBUTE_ENUMERATORW GOPHER_ATTRIBUTE_ENUMERATOR
#define GOPHER_ATTRIBUTE_TYPEA GOPHER_ATTRIBUTE_TYPE
#define GOPHER_ATTRIBUTE_TYPEW GOPHER_ATTRIBUTE_TYPE
#define GOPHER_LOCATION_ATTRIBUTE_TYPEA GOPHER_LOCATION_ATTRIBUTE_TYPE
#define GOPHER_LOCATION_ATTRIBUTE_TYPEW GOPHER_LOCATION_ATTRIBUTE_TYPE
#define GOPHER_ORGANIZATION_ATTRIBUTE_TYPEA GOPHER_ORGANIZATION_ATTRIBUTE_TYPE
#define GOPHER_ORGANIZATION_ATTRIBUTE_TYPEW GOPHER_ORGANIZATION_ATTRIBUTE_TYPE
#define GOPHER_PROVIDER_ATTRIBUTE_TYPEA GOPHER_PROVIDER_ATTRIBUTE_TYPE
#define GOPHER_PROVIDER_ATTRIBUTE_TYPEW GOPHER_PROVIDER_ATTRIBUTE_TYPE
#define GOPHER_SITE_ATTRIBUTE_TYPEA GOPHER_SITE_ATTRIBUTE_TYPE
#define GOPHER_SITE_ATTRIBUTE_TYPEW GOPHER_SITE_ATTRIBUTE_TYPE
#define GOPHER_UNKNOWN_ATTRIBUTE_TYPEA GOPHER_UNKNOWN_ATTRIBUTE_TYPE
#define GOPHER_UNKNOWN_ATTRIBUTE_TYPEW GOPHER_UNKNOWN_ATTRIBUTE_TYPE
#define GOPHER_VERSION_ATTRIBUTE_TYPEA GOPHER_VERSION_ATTRIBUTE_TYPE
#define GOPHER_VERSION_ATTRIBUTE_TYPEW GOPHER_VERSION_ATTRIBUTE_TYPE
#define GOPHER_VIEW_ATTRIBUTE_TYPEA GOPHER_VIEW_ATTRIBUTE_TYPE
#define GOPHER_VIEW_ATTRIBUTE_TYPEW GOPHER_VIEW_ATTRIBUTE_TYPE
#define INTERNET_CERTIFICATE_INFOA INTERNET_CERTIFICATE_INFO
#define INTERNET_CERTIFICATE_INFOW INTERNET_CERTIFICATE_INFO
#define INTERNET_PROXY_INFOA INTERNET_PROXY_INFO
#define INTERNET_PROXY_INFOW INTERNET_PROXY_INFO
#define LPGOPHER_ABSTRACT_ATTRIBUTE_TYPEA LPGOPHER_ABSTRACT_ATTRIBUTE_TYPE
#define LPGOPHER_ABSTRACT_ATTRIBUTE_TYPEW LPGOPHER_ABSTRACT_ATTRIBUTE_TYPE
#define LPGOPHER_ADMIN_ATTRIBUTE_TYPEA LPGOPHER_ADMIN_ATTRIBUTE_TYPE
#define LPGOPHER_ADMIN_ATTRIBUTE_TYPEW LPGOPHER_ADMIN_ATTRIBUTE_TYPE
#define LPGOPHER_ASK_ATTRIBUTE_TYPEA LPGOPHER_ASK_ATTRIBUTE_TYPE
#define LPGOPHER_ASK_ATTRIBUTE_TYPEW LPGOPHER_ASK_ATTRIBUTE_TYPE
#define LPGOPHER_ATTRIBUTE_TYPEA LPGOPHER_ATTRIBUTE_TYPE
#define LPGOPHER_ATTRIBUTE_TYPEW LPGOPHER_ATTRIBUTE_TYPE
#define LPGOPHER_LOCATION_ATTRIBUTE_TYPEA LPGOPHER_LOCATION_ATTRIBUTE_TYPE
#define LPGOPHER_LOCATION_ATTRIBUTE_TYPEW LPGOPHER_LOCATION_ATTRIBUTE_TYPE
#define LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPEA LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPE
#define LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPEW LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPE
#define LPGOPHER_PROVIDER_ATTRIBUTE_TYPEA LPGOPHER_PROVIDER_ATTRIBUTE_TYPE
#define LPGOPHER_PROVIDER_ATTRIBUTE_TYPEW LPGOPHER_PROVIDER_ATTRIBUTE_TYPE
#define LPGOPHER_SITE_ATTRIBUTE_TYPEA LPGOPHER_SITE_ATTRIBUTE_TYPE
#define LPGOPHER_SITE_ATTRIBUTE_TYPEW LPGOPHER_SITE_ATTRIBUTE_TYPE
#define LPGOPHER_UNKNOWN_ATTRIBUTE_TYPEA LPGOPHER_UNKNOWN_ATTRIBUTE_TYPE
#define LPGOPHER_UNKNOWN_ATTRIBUTE_TYPEW LPGOPHER_UNKNOWN_ATTRIBUTE_TYPE
#define LPGOPHER_VERSION_ATTRIBUTE_TYPEA LPGOPHER_VERSION_ATTRIBUTE_TYPE
#define LPGOPHER_VERSION_ATTRIBUTE_TYPEW LPGOPHER_VERSION_ATTRIBUTE_TYPE
#define LPGOPHER_VIEW_ATTRIBUTE_TYPEA LPGOPHER_VIEW_ATTRIBUTE_TYPE
#define LPGOPHER_VIEW_ATTRIBUTE_TYPEW LPGOPHER_VIEW_ATTRIBUTE_TYPE
#define LPINTERNET_CERTIFICATE_INFOA LPINTERNET_CERTIFICATE_INFO
#define LPINTERNET_CERTIFICATE_INFOW LPINTERNET_CERTIFICATE_INFO
#define LPINTERNET_PROXY_INFOA LPINTERNET_PROXY_INFO
#define LPINTERNET_PROXY_INFOW LPINTERNET_PROXY_INFO
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -1,303 +0,0 @@
/*
* Wininet - Utility functions
*
* Copyright 1999 Corel Corporation
* Copyright 2002 CodeWeavers Inc.
*
* Ulrich Czekalla
* Aric Stewart
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "windef.h"
#include "winbase.h"
#include "wininet.h"
#include "winerror.h"
#include "winnls.h"
#include "wine/debug.h"
#include "internet.h"
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
#define TIME_STRING_LEN 30
#define CP_UNIXCP 65010 /* Wine extension */
time_t ConvertTimeString(LPCWSTR asctime)
{
WCHAR tmpChar[TIME_STRING_LEN];
WCHAR *tmpChar2;
struct tm t;
int timelen = strlenW(asctime);
if(!asctime || !timelen)
return 0;
/* The atoiWs below relie on that tmpChar is \0 padded? */
strncpyW(tmpChar, asctime, TIME_STRING_LEN);
/* Assert that the string is the expected length */
if (tmpChar[TIME_STRING_LEN - 1] != '\0')
{
tmpChar[TIME_STRING_LEN - 1] = '\0';
FIXME("\n");
}
/* Convert a time such as 'Mon, 15 Nov 1999 16:09:35 GMT' into a SYSTEMTIME structure
* We assume the time is in this format
* and divide it into easy to swallow chunks
*/
tmpChar[3]='\0';
tmpChar[7]='\0';
tmpChar[11]='\0';
tmpChar[16]='\0';
tmpChar[19]='\0';
tmpChar[22]='\0';
tmpChar[25]='\0';
t.tm_year = atoiW(tmpChar+12) - 1900;
t.tm_mday = atoiW(tmpChar+5);
t.tm_hour = atoiW(tmpChar+17);
t.tm_min = atoiW(tmpChar+20);
t.tm_sec = atoiW(tmpChar+23);
/* and month */
tmpChar2 = tmpChar + 8;
switch(tmpChar2[2])
{
case 'n':
if(tmpChar2[1]=='a')
t.tm_mon = 0;
else
t.tm_mon = 5;
break;
case 'b':
t.tm_mon = 1;
break;
case 'r':
if(tmpChar2[1]=='a')
t.tm_mon = 2;
else
t.tm_mon = 3;
break;
case 'y':
t.tm_mon = 4;
break;
case 'l':
t.tm_mon = 6;
break;
case 'g':
t.tm_mon = 7;
break;
case 'p':
t.tm_mon = 8;
break;
case 't':
t.tm_mon = 9;
break;
case 'v':
t.tm_mon = 10;
break;
case 'c':
t.tm_mon = 11;
break;
default:
FIXME("\n");
}
return mktime(&t);
}
BOOL GetAddress(LPCWSTR lpszServerName, INTERNET_PORT nServerPort,
struct hostent **phe, struct sockaddr_in *psa)
{
WCHAR *found;
char *name;
int len, sz;
TRACE("%s\n", debugstr_w(lpszServerName));
/* Validate server name first
* Check if there is sth. like
* pinger.macromedia.com:80
* if yes, eliminate the :80....
*/
found = strchrW(lpszServerName, ':');
if (found)
len = found - lpszServerName;
else
len = strlenW(lpszServerName);
sz = WideCharToMultiByte( CP_UNIXCP, 0, lpszServerName, len, NULL, 0, NULL, NULL );
name = HeapAlloc(GetProcessHeap(), 0, sz+1);
WideCharToMultiByte( CP_UNIXCP, 0, lpszServerName, len, name, sz, NULL, NULL );
name[sz] = 0;
*phe = gethostbyname(name);
HeapFree( GetProcessHeap(), 0, name );
if (NULL == *phe)
{
TRACE("Failed to get hostname: (%s)\n", debugstr_w(lpszServerName) );
return FALSE;
}
memset(psa,0,sizeof(struct sockaddr_in));
memcpy((char *)&psa->sin_addr, (*phe)->h_addr, (*phe)->h_length);
psa->sin_family = (*phe)->h_addrtype;
psa->sin_port = htons((u_short)nServerPort);
return TRUE;
}
/*
* Helper function for sending async Callbacks
*/
static const char *get_callback_name(DWORD dwInternetStatus) {
static const wininet_flag_info internet_status[] = {
#define FE(x) { x, #x }
FE(INTERNET_STATUS_RESOLVING_NAME),
FE(INTERNET_STATUS_NAME_RESOLVED),
FE(INTERNET_STATUS_CONNECTING_TO_SERVER),
FE(INTERNET_STATUS_CONNECTED_TO_SERVER),
FE(INTERNET_STATUS_SENDING_REQUEST),
FE(INTERNET_STATUS_REQUEST_SENT),
FE(INTERNET_STATUS_RECEIVING_RESPONSE),
FE(INTERNET_STATUS_RESPONSE_RECEIVED),
FE(INTERNET_STATUS_CTL_RESPONSE_RECEIVED),
FE(INTERNET_STATUS_PREFETCH),
FE(INTERNET_STATUS_CLOSING_CONNECTION),
FE(INTERNET_STATUS_CONNECTION_CLOSED),
FE(INTERNET_STATUS_HANDLE_CREATED),
FE(INTERNET_STATUS_HANDLE_CLOSING),
FE(INTERNET_STATUS_REQUEST_COMPLETE),
FE(INTERNET_STATUS_REDIRECT),
FE(INTERNET_STATUS_INTERMEDIATE_RESPONSE),
FE(INTERNET_STATUS_USER_INPUT_REQUIRED),
FE(INTERNET_STATUS_STATE_CHANGE),
FE(INTERNET_STATUS_COOKIE_SENT),
FE(INTERNET_STATUS_COOKIE_RECEIVED),
FE(INTERNET_STATUS_PRIVACY_IMPACTED),
FE(INTERNET_STATUS_P3P_HEADER),
FE(INTERNET_STATUS_P3P_POLICYREF),
FE(INTERNET_STATUS_COOKIE_HISTORY)
#undef FE
};
DWORD i;
for (i = 0; i < (sizeof(internet_status) / sizeof(internet_status[0])); i++) {
if (internet_status[i].val == dwInternetStatus) return internet_status[i].name;
}
return "Unknown";
}
VOID SendSyncCallback(LPWININETHANDLEHEADER hdr, DWORD dwContext,
DWORD dwInternetStatus, LPVOID lpvStatusInfo,
DWORD dwStatusInfoLength)
{
HINTERNET hHttpSession;
LPVOID lpvNewInfo = NULL;
if( !hdr->lpfnStatusCB )
return;
/* the IE5 version of wininet does not
send callbacks if dwContext is zero */
if( !dwContext )
return;
hHttpSession = WININET_FindHandle( hdr );
if( !hHttpSession ) {
TRACE(" Could not convert header '%p' into a handle !\n", hdr);
return;
}
lpvNewInfo = lpvStatusInfo;
if(!(hdr->dwInternalFlags & INET_CALLBACKW)) {
switch(dwInternetStatus)
{
case INTERNET_STATUS_RESOLVING_NAME:
case INTERNET_STATUS_REDIRECT:
lpvNewInfo = WININET_strdup_WtoA(lpvStatusInfo);
}
}
TRACE(" callback(%p) (%08lx (%p), %08lx, %ld (%s), %p, %ld)\n",
hdr->lpfnStatusCB, (DWORD) hHttpSession, hdr, dwContext, dwInternetStatus, get_callback_name(dwInternetStatus),
lpvNewInfo, dwStatusInfoLength);
hdr->lpfnStatusCB(hHttpSession, dwContext, dwInternetStatus,
lpvNewInfo, dwStatusInfoLength);
TRACE(" end callback().\n");
if(lpvNewInfo != lpvStatusInfo)
HeapFree(GetProcessHeap(), 0, lpvNewInfo);
WININET_Release( hdr );
}
VOID SendAsyncCallback(LPWININETHANDLEHEADER hdr, DWORD dwContext,
DWORD dwInternetStatus, LPVOID lpvStatusInfo,
DWORD dwStatusInfoLength)
{
TRACE("(%p, %08lx, %ld (%s), %p, %ld): %sasync call with callback %p\n",
hdr, dwContext, dwInternetStatus, get_callback_name(dwInternetStatus),
lpvStatusInfo, dwStatusInfoLength,
hdr->dwFlags & INTERNET_FLAG_ASYNC ? "" : "non ",
hdr->lpfnStatusCB);
if (!(hdr->lpfnStatusCB))
return;
if (hdr->dwFlags & INTERNET_FLAG_ASYNC)
{
WORKREQUEST workRequest;
struct WORKREQ_SENDCALLBACK *req;
void *lpvStatusInfo_copy = lpvStatusInfo;
if (lpvStatusInfo)
{
lpvStatusInfo_copy = HeapAlloc(GetProcessHeap(), 0, dwStatusInfoLength);
memcpy(lpvStatusInfo_copy, lpvStatusInfo, dwStatusInfoLength);
}
workRequest.asyncall = SENDCALLBACK;
workRequest.hdr = WININET_AddRef( hdr );
req = &workRequest.u.SendCallback;
req->dwContext = dwContext;
req->dwInternetStatus = dwInternetStatus;
req->lpvStatusInfo = lpvStatusInfo_copy;
req->dwStatusInfoLength = dwStatusInfoLength;
INTERNET_AsyncCall(&workRequest);
}
else
SendSyncCallback(hdr, dwContext, dwInternetStatus,
lpvStatusInfo, dwStatusInfoLength);
}

View File

@@ -1,245 +0,0 @@
101 stub -noname DoConnectoidsExist
102 stub -noname GetDiskInfoA
103 stub -noname PerformOperationOverUrlCacheA
104 stub -noname HttpCheckDavComplianceA
105 stub -noname HttpCheckDavComplianceW
108 stub -noname ImportCookieFileA
109 stub -noname ExportCookieFileA
110 stub -noname ImportCookieFileW
111 stub -noname ExportCookieFileW
112 stub -noname IsProfilesEnabled
116 stub -noname IsDomainlegalCookieDomainA
117 stub -noname IsDomainLegalCookieDomainW
118 stub -noname FindP3PPolicySymbol
120 stub -noname MapResourceToPolicy
121 stub -noname GetP3PPolicy
122 stub -noname FreeP3PObject
123 stub -noname GetP3PRequestStatus
@ stdcall InternetInitializeAutoProxyDll(long)
@ stub ShowCertificate
@ stdcall CommitUrlCacheEntryA(str str long long long long long str long str str)
@ stdcall CommitUrlCacheEntryW(wstr wstr long long long long long wstr long wstr wstr)
@ stdcall CreateMD5SSOHash(wstr wstr wstr ptr)
@ stdcall CreateUrlCacheContainerA(long long long long long long long long)
@ stdcall CreateUrlCacheContainerW(long long long long long long long long)
@ stdcall CreateUrlCacheEntryA(str long str ptr long)
@ stdcall CreateUrlCacheEntryW(wstr long wstr ptr long)
@ stdcall CreateUrlCacheGroup(long ptr)
@ stdcall DeleteIE3Cache(ptr ptr str long)
@ stdcall DeleteUrlCacheContainerA(long long)
@ stdcall DeleteUrlCacheContainerW(long long)
@ stdcall DeleteUrlCacheEntry(str) DeleteUrlCacheEntryA
@ stdcall DeleteUrlCacheEntryA(str)
@ stdcall DeleteUrlCacheEntryW(wstr)
@ stdcall DeleteUrlCacheGroup(double long ptr)
@ stdcall DetectAutoProxyUrl(str long long)
@ stdcall DllInstall(long ptr) WININET_DllInstall
@ stdcall FindCloseUrlCache(long)
@ stdcall FindFirstUrlCacheContainerA(ptr ptr ptr long)
@ stdcall FindFirstUrlCacheContainerW(ptr ptr ptr long)
@ stdcall FindFirstUrlCacheEntryA(str ptr ptr)
@ stdcall FindFirstUrlCacheEntryExA(str long long double ptr ptr ptr ptr ptr)
@ stdcall FindFirstUrlCacheEntryExW(wstr long long double ptr ptr ptr ptr ptr)
@ stdcall FindFirstUrlCacheEntryW(wstr ptr ptr)
@ stdcall FindFirstUrlCacheGroup(long long ptr long ptr ptr)
@ stdcall FindNextUrlCacheContainerA(long ptr ptr)
@ stdcall FindNextUrlCacheContainerW(long ptr ptr)
@ stdcall FindNextUrlCacheEntryA(long ptr ptr)
@ stdcall FindNextUrlCacheEntryExA(long ptr ptr ptr ptr ptr)
@ stdcall FindNextUrlCacheEntryExW(long ptr ptr ptr ptr ptr)
@ stdcall FindNextUrlCacheEntryW(long ptr ptr)
@ stdcall FindNextUrlCacheGroup(long ptr ptr)
@ stub ForceNexusLookup
@ stub ForceNexusLookupExW
@ stub FreeUrlCacheSpaceA
@ stub FreeUrlCacheSpaceW
@ stdcall FtpCommandA(long long long str ptr ptr)
@ stdcall FtpCommandW(long long long wstr ptr ptr)
@ stdcall FtpCreateDirectoryA(ptr str)
@ stdcall FtpCreateDirectoryW(ptr wstr)
@ stdcall FtpDeleteFileA(ptr str)
@ stdcall FtpDeleteFileW(ptr wstr)
@ stdcall FtpFindFirstFileA(ptr str ptr long long)
@ stdcall FtpFindFirstFileW(ptr wstr ptr long long)
@ stdcall FtpGetCurrentDirectoryA(ptr str ptr)
@ stdcall FtpGetCurrentDirectoryW(ptr wstr ptr)
@ stdcall FtpGetFileA(ptr str str long long long long)
@ stub FtpGetFileEx
@ stdcall FtpGetFileSize(long ptr)
@ stdcall FtpGetFileW(ptr wstr wstr long long long long)
@ stdcall FtpOpenFileA(ptr str long long long)
@ stdcall FtpOpenFileW(ptr wstr long long long)
@ stdcall FtpPutFileA(ptr str str long long)
@ stub FtpPutFileEx
@ stdcall FtpPutFileW(ptr wstr wstr long long)
@ stdcall FtpRemoveDirectoryA(ptr str)
@ stdcall FtpRemoveDirectoryW(ptr wstr)
@ stdcall FtpRenameFileA(ptr str str)
@ stdcall FtpRenameFileW(ptr wstr wstr)
@ stdcall FtpSetCurrentDirectoryA(ptr str)
@ stdcall FtpSetCurrentDirectoryW(ptr wstr)
@ stdcall GetUrlCacheConfigInfoA(ptr ptr long)
@ stdcall GetUrlCacheConfigInfoW(ptr ptr long)
@ stdcall GetUrlCacheEntryInfoA(str ptr long)
@ stdcall GetUrlCacheEntryInfoExA(str ptr ptr str ptr ptr long)
@ stdcall GetUrlCacheEntryInfoExW(wstr ptr ptr wstr ptr ptr long)
@ stdcall GetUrlCacheEntryInfoW(wstr ptr long)
@ stdcall GetUrlCacheGroupAttributeA(double long long ptr ptr ptr)
@ stdcall GetUrlCacheGroupAttributeW(double long long ptr ptr ptr)
@ stub GetUrlCacheHeaderData
@ stdcall GopherCreateLocatorA(str long str str long str ptr)
@ stdcall GopherCreateLocatorW(wstr long wstr wstr long wstr ptr)
@ stdcall GopherFindFirstFileA(ptr str str ptr long long)
@ stdcall GopherFindFirstFileW(ptr wstr wstr ptr long long)
@ stdcall GopherGetAttributeA(ptr str str ptr long ptr ptr long)
@ stdcall GopherGetAttributeW(ptr wstr wstr ptr long ptr ptr long)
@ stdcall GopherGetLocatorTypeA(str ptr)
@ stdcall GopherGetLocatorTypeW(wstr ptr)
@ stdcall GopherOpenFileA(ptr str str long long)
@ stdcall GopherOpenFileW(ptr wstr wstr long long)
@ stdcall HttpAddRequestHeadersA(ptr str long long)
@ stdcall HttpAddRequestHeadersW(ptr wstr long long)
@ stub HttpCheckDavCompliance
@ stdcall HttpEndRequestA(ptr ptr long long)
@ stdcall HttpEndRequestW(ptr ptr long long)
@ stdcall HttpOpenRequestA(ptr str str str str ptr long long)
@ stdcall HttpOpenRequestW(ptr wstr wstr wstr wstr ptr long long)
@ stdcall HttpQueryInfoA(ptr long ptr ptr ptr)
@ stdcall HttpQueryInfoW(ptr long ptr ptr ptr)
@ stdcall HttpSendRequestA(ptr str long ptr long)
@ stdcall HttpSendRequestExA(long ptr ptr long long)
@ stdcall HttpSendRequestExW(long ptr ptr long long)
@ stdcall HttpSendRequestW(ptr wstr long ptr long)
@ stub IncrementUrlCacheHeaderData
@ stub InternetAlgIdToStringA
@ stub InternetAlgIdToStringW
@ stdcall InternetAttemptConnect(long)
@ stdcall InternetAutodial(long ptr)
@ stub InternetAutodialCallback
@ stdcall InternetAutodialHangup(long)
@ stdcall InternetCanonicalizeUrlA(str str ptr long)
@ stdcall InternetCanonicalizeUrlW(wstr wstr ptr long)
@ stdcall InternetCheckConnectionA(ptr long long)
@ stdcall InternetCheckConnectionW(ptr long long)
@ stdcall InternetClearAllPerSiteCookieDecisions()
@ stdcall InternetCloseHandle(long)
@ stdcall InternetCombineUrlA(str str str ptr long)
@ stdcall InternetCombineUrlW(wstr wstr wstr ptr long)
@ stdcall InternetConfirmZoneCrossing(long str str long) InternetConfirmZoneCrossingA
@ stdcall InternetConfirmZoneCrossingA(long str str long)
@ stdcall InternetConfirmZoneCrossingW(long wstr wstr long)
@ stdcall InternetConnectA(ptr str long str str long long long)
@ stdcall InternetConnectW(ptr wstr long wstr wstr long long long)
@ stdcall InternetCrackUrlA(str long long ptr)
@ stdcall InternetCrackUrlW(wstr long long ptr)
@ stdcall InternetCreateUrlA(ptr long ptr ptr)
@ stdcall InternetCreateUrlW(ptr long ptr ptr)
@ stub InternetDebugGetLocalTime
@ stdcall InternetDial(long str long ptr long) InternetDialA
@ stdcall InternetDialA(long str long ptr long)
@ stdcall InternetDialW(long wstr long ptr long)
@ stdcall InternetEnumPerSiteCookieDecisionA(ptr ptr ptr long)
@ stdcall InternetEnumPerSiteCookieDecisionW(ptr ptr ptr long)
@ stdcall InternetErrorDlg(long long long long ptr)
@ stdcall InternetFindNextFileA(ptr ptr)
@ stdcall InternetFindNextFileW(ptr ptr)
@ stub InternetFortezzaCommand
@ stub InternetGetCertByURL
@ stub InternetGetCertByURLA
@ stdcall InternetGetConnectedState(ptr long)
@ stdcall InternetGetConnectedStateEx(ptr ptr long long) InternetGetConnectedStateExA
@ stdcall InternetGetConnectedStateExA(ptr ptr long long)
@ stdcall InternetGetConnectedStateExW(ptr ptr long long)
@ stdcall InternetGetCookieA(str str ptr long)
@ stdcall InternetGetCookieExA(str str ptr ptr long ptr)
@ stdcall InternetGetCookieExW(wstr wstr ptr ptr long ptr)
@ stdcall InternetGetCookieW(wstr wstr ptr long)
@ stdcall InternetGetLastResponseInfoA(ptr ptr ptr)
@ stdcall InternetGetLastResponseInfoW(ptr ptr ptr)
@ stdcall InternetGetPerSiteCookieDecisionA(str ptr)
@ stdcall InternetGetPerSiteCookieDecisionW(wstr ptr)
@ stdcall InternetGoOnline(str long long) InternetGoOnlineA
@ stdcall InternetGoOnlineA(str long long)
@ stdcall InternetGoOnlineW(wstr long long)
@ stdcall InternetHangUp(long long)
@ stdcall InternetLockRequestFile(ptr ptr)
@ stdcall InternetOpenA(str long str str long)
@ stub InternetOpenServerPushParse
@ stdcall InternetOpenW(wstr long wstr wstr long)
@ stdcall InternetOpenUrlA(ptr str str long long long)
@ stdcall InternetOpenUrlW(ptr wstr wstr long long long)
@ stdcall InternetQueryDataAvailable(ptr ptr long long)
@ stub InternetQueryFortezzaStatus
@ stdcall InternetQueryOptionA(ptr long ptr ptr)
@ stdcall InternetQueryOptionW(ptr long ptr ptr)
@ stdcall InternetReadFile(ptr ptr long ptr)
@ stdcall InternetReadFileExA(ptr ptr long long)
@ stdcall InternetReadFileExW(ptr ptr long long)
@ stub InternetSecurityProtocolToStringA
@ stub InternetSecurityProtocolToStringW
@ stub InternetServerPushParse
@ stdcall InternetSetCookieA(str str str)
@ stdcall InternetSetCookieExA(str str str long ptr)
@ stdcall InternetSetCookieExW(wstr wstr wstr long ptr)
@ stdcall InternetSetCookieW(wstr wstr wstr)
@ stub InternetSetDialState
@ stub InternetSetDialStateA
@ stub InternetSetDialStateW
@ stdcall InternetSetFilePointer(ptr long ptr long long)
@ stdcall InternetSetOptionA(ptr long ptr long)
@ stdcall InternetSetOptionExA(ptr long ptr long long)
@ stdcall InternetSetOptionExW(ptr long ptr long long)
@ stdcall InternetSetOptionW(ptr long ptr long)
@ stdcall InternetSetPerSiteCookieDecisionA(str long)
@ stdcall InternetSetPerSiteCookieDecisionW(wstr long)
@ stdcall InternetSetStatusCallback(ptr ptr) InternetSetStatusCallbackA
@ stdcall InternetSetStatusCallbackA(ptr ptr)
@ stdcall InternetSetStatusCallbackW(ptr ptr)
@ stub InternetShowSecurityInfoByURL
@ stub InternetShowSecurityInfoByURLA
@ stub InternetShowSecurityInfoByURLW
@ stdcall InternetTimeFromSystemTime(ptr long ptr long) InternetTimeFromSystemTimeA
@ stdcall InternetTimeFromSystemTimeA(ptr long ptr long)
@ stdcall InternetTimeFromSystemTimeW(ptr long ptr long)
@ stdcall InternetTimeToSystemTime(str ptr long) InternetTimeToSystemTimeA
@ stdcall InternetTimeToSystemTimeA(str ptr long)
@ stdcall InternetTimeToSystemTimeW(wstr ptr long)
@ stdcall InternetUnlockRequestFile(ptr)
@ stdcall InternetWriteFile(ptr ptr long ptr)
@ stub InternetWriteFileExA
@ stub InternetWriteFileExW
@ stdcall IsHostInProxyBypassList(long str long)
@ stub IsUrlCacheEntryExpiredA
@ stub IsUrlCacheEntryExpiredW
@ stub LoadUrlCacheContent
@ stub ParseX509EncodedCertificateForListBoxEntry
@ stub PrivacyGetZonePreferenceW # (long long ptr ptr ptr)
@ stub PrivacySetZonePreferenceW # (long long long wstr)
@ stdcall ReadUrlCacheEntryStream(ptr long ptr ptr long)
@ stub RegisterUrlCacheNotification
@ stdcall ResumeSuspendedDownload(long long)
@ stdcall RetrieveUrlCacheEntryFileA(str ptr ptr long)
@ stdcall RetrieveUrlCacheEntryFileW(wstr ptr ptr long)
@ stdcall RetrieveUrlCacheEntryStreamA(str ptr ptr long long)
@ stdcall RetrieveUrlCacheEntryStreamW(wstr ptr ptr long long)
@ stub RunOnceUrlCache
@ stdcall SetUrlCacheConfigInfoA(ptr long)
@ stdcall SetUrlCacheConfigInfoW(ptr long)
@ stdcall SetUrlCacheEntryGroup(str long double ptr long ptr) SetUrlCacheEntryGroupA
@ stdcall SetUrlCacheEntryGroupA(str long double ptr long ptr)
@ stdcall SetUrlCacheEntryGroupW(wstr long double ptr long ptr)
@ stdcall SetUrlCacheEntryInfoA(str ptr long)
@ stdcall SetUrlCacheEntryInfoW(wstr ptr long)
@ stdcall SetUrlCacheGroupAttributeA(double long long ptr ptr)
@ stdcall SetUrlCacheGroupAttributeW(double long long ptr ptr)
@ stub SetUrlCacheHeaderData
@ stub ShowClientAuthCerts
@ stub ShowSecurityInfo
@ stub ShowX509EncodedCertificate
@ stdcall UnlockUrlCacheEntryFile(str long) UnlockUrlCacheEntryFileA
@ stdcall UnlockUrlCacheEntryFileA(str long)
@ stdcall UnlockUrlCacheEntryFileW(wstr long)
@ stdcall UnlockUrlCacheEntryStream(ptr long)
@ stub UpdateUrlCacheContentPath
@ stub UrlZonesDetach

View File

@@ -1,41 +0,0 @@
/*
* Czech resources for wininet
* Copyright 2003 Mike McCormack for CodeWeavers
* Copyright 2004 David Kredba
*
* 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
*/
LANGUAGE LANG_CZECH, SUBLANG_DEFAULT
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Zad<61>n<EFBFBD> s<><73>ov<6F>ho hesla"
FONT 8, "MS Shell Dlg"
{
LTEXT "Pros<6F>m zadejte sv<73> u<>iv. jm<6A>no a heslo:", -1, 40, 6, 150, 15
LTEXT "Proxy", -1, 40, 26, 50, 10
LTEXT "Pln<6C> jm<6A>no", -1, 40, 46, 50, 10
LTEXT "U<>ivatel", -1, 40, 66, 50, 10
LTEXT "Heslo", -1, 40, 86, 50, 10
LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0
LTEXT "" IDC_REALM, 80, 46, 150, 14, 0
EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD
CHECKBOX "&Ulo<6C>it toto heslo (nebezpe<70>n<EFBFBD>) ?", IDC_SAVEPASSWORD,
80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
PUSHBUTTON "Storno", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
}

View File

@@ -1,44 +0,0 @@
/*
* Copyright 2004 Henning Gerhardt
*
* 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
*/
LANGUAGE LANG_GERMAN, SUBLANG_DEFAULT
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Netzwerkkennung eingeben"
FONT 8, "MS Shell Dlg"
{
LTEXT "Geben Sie Benutzernamen und Kennwort ein:", -1, 40, 6, 150, 15
LTEXT "Proxy", -1, 40, 26, 50, 10
LTEXT "Realm", -1, 40, 46, 50, 10
LTEXT "Ben&utzername", -1, 40, 66, 50, 10
LTEXT "Kenn&wort", -1, 40, 86, 50, 10
LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0
LTEXT "" IDC_REALM, 80, 46, 150, 14, 0
EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD
CHECKBOX "Dieses &Kennwort speichern (unsicher)", IDC_SAVEPASSWORD,
80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
PUSHBUTTON "Abbrechen", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_LANCONNECTION "LAN Verbindung"
}

View File

@@ -1,44 +0,0 @@
/*
* Copyright 2003 Mike McCormack for CodeWeavers
*
* 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
*/
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Enter Network Password"
FONT 8, "MS Shell Dlg"
{
LTEXT "Please enter your username and password:", -1, 40, 6, 150, 15
LTEXT "Proxy", -1, 40, 26, 50, 10
LTEXT "Realm", -1, 40, 46, 50, 10
LTEXT "User", -1, 40, 66, 50, 10
LTEXT "Password", -1, 40, 86, 50, 10
LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0
LTEXT "" IDC_REALM, 80, 46, 150, 14, 0
EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD
CHECKBOX "&Save this password (insecure)", IDC_SAVEPASSWORD,
80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
PUSHBUTTON "Cancel", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_LANCONNECTION "LAN Connection"
}

View File

@@ -1,44 +0,0 @@
/*
* Copyright 2003, 2005 Jos<6F> Manuel Ferrer Ortiz
*
* 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
*/
LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Introduzca contrase<73>a de red"
FONT 8, "MS Shell Dlg"
{
LTEXT "Por favor introduzca su nombre de usuario y contrase<73>a:", -1, 40, 6, 150, 15
LTEXT "Proxy", -1, 40, 26, 50, 10
LTEXT "Dominio", -1, 40, 46, 50, 10
LTEXT "Usuario", -1, 40, 66, 50, 10
LTEXT "Contrase<73>a", -1, 40, 86, 50, 10
LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0
LTEXT "" IDC_REALM, 80, 46, 150, 14, 0
EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD
CHECKBOX "&Guardar esta contrase<73>a (inseguro)", IDC_SAVEPASSWORD,
80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON "Aceptar", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
PUSHBUTTON "Cancelar", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_LANCONNECTION "Conexi<78>n LAN"
}

View File

@@ -1,49 +0,0 @@
/*
* Wininet
* French language support
*
* Copyright 2003 Mike McCormack for CodeWeavers
* Copyright 2003 Vincent B<>ron
* Copyright 2005 Jonathan Ernst
*
* 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
*/
LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Entrez le mot de passe r<>seau"
FONT 8, "MS Shell Dlg"
{
LTEXT "Entrez votre nom d'utilisateur et votre mot de passe :", -1, 40, 6, 150, 15
LTEXT "Mandataire", -1, 40, 26, 50, 10
LTEXT "Domaine", -1, 40, 46, 50, 10
LTEXT "Utilisateur", -1, 40, 66, 50, 10
LTEXT "Mot de passe", -1, 40, 86, 50, 10
LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0
LTEXT "" IDC_REALM, 80, 46, 150, 14, 0
EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD
CHECKBOX "&Enregistrer ce mot de passe (risqu<71>)", IDC_SAVEPASSWORD,
80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
PUSHBUTTON "Annuler", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_LANCONNECTION "Connexion LAN"
}

View File

@@ -1,40 +0,0 @@
/*
* Copyright 2003 Mike McCormack for CodeWeavers
* Copyright 2003 Ivan Leo Puoti
*
* 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
*/
LANGUAGE LANG_ITALIAN, SUBLANG_DEFAULT
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Inserire la password di rete"
FONT 8, "MS Shell Dlg"
{
LTEXT "Inserire il nome utente e la password:", -1, 40, 6, 150, 15
LTEXT "Proxy", -1, 40, 26, 50, 10
LTEXT "Realm", -1, 40, 46, 50, 10
LTEXT "Utente", -1, 40, 66, 50, 10
LTEXT "Password", -1, 40, 86, 50, 10
LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0
LTEXT "" IDC_REALM, 80, 46, 150, 14, 0
EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD
CHECKBOX "&Salva questa password (insicuro)", IDC_SAVEPASSWORD,
80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
PUSHBUTTON "Annulla", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
}

View File

@@ -1,39 +0,0 @@
/*
* Copyright 2003 Mike McCormack for CodeWeavers
*
* 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
*/
LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "<22>l<EFBFBD>b<EFBFBD>g<EFBFBD><67><EFBFBD>[<5B>N<EFBFBD>p<EFBFBD>X<EFBFBD><58><EFBFBD>[<5B>h<EFBFBD>̓<EFBFBD><CC93><EFBFBD>"
FONT 9, "MS UI Gothic"
{
LTEXT "<22><><EFBFBD>[<5B>U<EFBFBD><55><EFBFBD>ƃp<C683>X<EFBFBD><58><EFBFBD>[<5B>h<EFBFBD><68><EFBFBD><EFBFBD><EFBFBD>͂<EFBFBD><CD82>ĉ<EFBFBD><C489><EFBFBD><EFBFBD><EFBFBD>:", -1, 40, 6, 150, 15
LTEXT "<22>v<EFBFBD><76><EFBFBD>L<EFBFBD>V", -1, 40, 26, 50, 10
LTEXT "<22>n<EFBFBD><6E>", -1, 40, 46, 50, 10
LTEXT "<22><><EFBFBD>[<5B>U<EFBFBD><55>", -1, 40, 66, 50, 10
LTEXT "<22>p<EFBFBD>X<EFBFBD><58><EFBFBD>[<5B>h", -1, 40, 86, 50, 10
LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0
LTEXT "" IDC_REALM, 80, 46, 150, 14, 0
EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD
CHECKBOX "<22>p<EFBFBD>X<EFBFBD><58><EFBFBD>[<5B>h<EFBFBD><68><EFBFBD>ۑ<EFBFBD><DB91><EFBFBD><EFBFBD><EFBFBD>(&S)(<28>Z<EFBFBD>L<EFBFBD><4C><EFBFBD>A<EFBFBD>ł͂<C582><CD82><EFBFBD><EFBFBD>܂<EFBFBD><DC82><EFBFBD>)", IDC_SAVEPASSWORD,
80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
PUSHBUTTON "<22>L<EFBFBD><4C><EFBFBD><EFBFBD><EFBFBD>Z<EFBFBD><5A>", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
}

View File

@@ -1,41 +0,0 @@
/*
* wininet (Dutch resources)
*
* Copyright 2003 Hans Leidekker
*
* 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
*/
LANGUAGE LANG_DUTCH, SUBLANG_DEFAULT
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Netwerkwachtwoord invoeren"
FONT 8, "MS Shell Dlg"
{
LTEXT "Voer uw gebruikersnaam en wachtwoord in:", -1, 40, 6, 150, 15
LTEXT "Proxy", -1, 40, 26, 50, 10
LTEXT "Realm", -1, 40, 46, 50, 10
LTEXT "Gebruikersnaam", -1, 40, 66, 50, 10
LTEXT "Wachtwoord", -1, 40, 86, 50, 10
LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0
LTEXT "" IDC_REALM, 80, 46, 150, 14, 0
EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD
CHECKBOX "&Wachtwoord opslaan (onveilig)", IDC_SAVEPASSWORD,
80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
PUSHBUTTON "Annuleren", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
}

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