Compare commits

...

5017 Commits

Author SHA1 Message Date
Danny Götte
8a697db0fb * get Rank and Help into class structure
* resolve some variables

svn path=/branches/danny-web/; revision=40391
2009-04-06 08:10:23 +00:00
Danny Götte
b1cf0e7855 * move language folder out of 'inc/'
* remove that human readable stuff, it doesn't make much sense in the way it was used here
* start cleaning up the mess with variables

svn path=/branches/danny-web/; revision=40369
2009-04-05 12:44:09 +00:00
Danny Götte
c0c72223bf * use compatDB's home site as general home site
* get home site into class structure
* get conditions into class structure
* remove some unused files

svn path=/branches/danny-web/; revision=40364
2009-04-04 23:49:40 +00:00
Danny Götte
56330747f4 * replace absolute paths in css files
* merge footer.php header.php and structure.php into HTML.class.php
* remove unneeded view variable
* remove some stuff from the left menu (quick links, last change, login/register links)
* convert first page to use HTML class like in roscms

svn path=/branches/danny-web/; revision=40338
2009-04-02 22:33:34 +00:00
Colin Finck
4cbb7e4be4 - Improve the comparison speed by several magnitudes:
-> Add an index for the "suite_id" column in "winetest_results" to make the JOINs *much* faster
    -> Don't rely on MySQL caching the result of a query, which is ran several times.
       Just run the query once instead and pass the result all the time.
- Change the legend to a full CSS layout
- Show 0 failures with a green color, otherwise keep the red background color for that cell (idea by Christoph)
- Change the color for differences to a neutral grey tone
- Little code cleanup

svn path=/branches/danny-web/; revision=40337
2009-04-02 22:05:36 +00:00
Danny Götte
a9a210d105 collect functions in classes, and rename them
svn path=/branches/danny-web/; revision=40336
2009-04-02 20:49:04 +00:00
Colin Finck
22e63c8788 Add a reasonable memory limit for a test result log, so the script doesn't exceed PHP's memory limit in case of bloated logs
Uses memory_get_usage(), so the script needs PHP >= 5.2

svn path=/branches/danny-web/; revision=40335
2009-04-02 19:15:06 +00:00
Danny Götte
6fd26d06db finish: converting database calls to pdo
svn path=/branches/danny-web/; revision=40330
2009-04-02 16:38:01 +00:00
Danny Götte
6dfd082bf5 remove parts of the supportDB that are not part of the compatDB
svn path=/branches/danny-web/; revision=40326
2009-04-02 09:03:34 +00:00
Danny Götte
d08f07cedd continue: converting database calls to PDO
svn path=/branches/danny-web/; revision=40320
2009-04-02 00:42:42 +00:00
Danny Götte
a798ae1c4a start to convert database calls to PDO, also removing dependency from roscms function cookie_domain()
svn path=/branches/danny-web/; revision=40254
2009-03-26 12:20:55 +00:00
Danny Götte
873fbb9718 Rename Subsystem class for subsystems with own user tables to SubsystemExternal, and use Subsystem for our own subsystems
svn path=/branches/danny-web/; revision=40253
2009-03-26 12:14:54 +00:00
Danny Götte
1990e224dd create new folder structure and move files to their new folders, update header
svn path=/branches/danny-web/; revision=40252
2009-03-26 11:08:27 +00:00
Danny Götte
12b2fd7d0e branch compatability database for overhaul
svn path=/branches/danny-web/; revision=40251
2009-03-26 10:58:15 +00:00
Colin Finck
3966161a64 Merge 40235
svn path=/branches/danny-web/; revision=40236
2009-03-25 16:43:40 +00:00
Colin Finck
cddc28462c - Add background colors to the result comparison instead of text colors
- Add a function for comparing the last two results with just one click

svn path=/branches/danny-web/; revision=40234
2009-03-25 16:39:35 +00:00
Colin Finck
9190855d62 Merge 40224-40232
svn path=/branches/danny-web/; revision=40233
2009-03-25 16:36:43 +00:00
Colin Finck
1f24156e1a Fix some code typos
svn path=/branches/danny-web/; revision=40228
2009-03-25 14:18:37 +00:00
Colin Finck
347f2a0a4e Oops, that was rather dedicated to this tree
svn path=/branches/danny-web/; revision=40225
2009-03-25 13:03:35 +00:00
Colin Finck
cf60047214 Prettify output a bit in case we have no search results :-)
svn path=/branches/danny-web/; revision=40195
2009-03-23 22:28:33 +00:00
Colin Finck
a4fac8eafa Update the testman SQL file
svn path=/branches/danny-web/; revision=40194
2009-03-23 22:24:26 +00:00
Colin Finck
50d1ad96a7 Temporarily add cookie_domain() to "subsys_layout.php" to avoid including non-existent RosCMS v3 components till we have a complete RosCMS 4 solution for this
svn path=/branches/danny-web/; revision=40193
2009-03-23 22:05:52 +00:00
Colin Finck
d2a34a019e - Start customizing some subsystems for RosCMS 4 and our new Backend server
--> Bugzilla: Customized to the new config file path
   --> Shared: Fully customized
   --> Testman: Fully customized, ready for a test installation now :-)
   --> Wiki: Customized to the new config file path
- Upgrade the MediaWiki config file to our used MediaWiki version
- Remove the old ReactOS logo shown in case of a Wiki error, add a refreshed one
- Add config file examples to the directories, which are also used by the server, to make local testing easier

svn path=/branches/danny-web/; revision=40186
2009-03-23 17:09:41 +00:00
Colin Finck
80ae494d76 SVN maintenance: Set svn:eol-style to "native" for PHP, JS, SQL and TXT files
svn path=/branches/danny-web/; revision=40165
2009-03-21 14:43:33 +00:00
Colin Finck
cc31f14894 Sync all non-RosCMS stuff to r40163
svn path=/branches/danny-web/; revision=40164
2009-03-21 14:09:47 +00:00
Cameron Gutman
f4aa76fc47 - Uncomment the NdisUnmapFile call in NdisCloseFile
- Found by Dmitry Chapyshev

svn path=/trunk/; revision=40161
2009-03-21 13:01:12 +00:00
Daniel Reimer
58949e1e63 Bug 4287: Lithuan Translaions by Vytis Girdžijauskas
Polish Translations by Maciej Bialas
Updated readme.wine. Some apps are autosynched by me and are mentioned as really old. Fixed this.

svn path=/trunk/; revision=40159
2009-03-21 12:38:32 +00:00
Colin Finck
0ba8c8e16a Enable the Crash Recovery feature when doing the RegTest.
Now the new sysreg2 just needs to be set up on the Buildslave and we might finally be able to remove all those "Skip Test xyz, because ROS sucks" hacks.

svn path=/trunk/; revision=40157
2009-03-21 12:21:12 +00:00
Aleksey Bragin
d40a356433 - Allocate and initialize setup loader block.
- Add setup loader block pointer conversion to WinLdrInitializePhase1 (if it exists). 
- Temporary: provide empty boot options string.

svn path=/trunk/; revision=40156
2009-03-21 11:11:44 +00:00
Aleksey Bragin
8e3572a7e6 - Remove obsolete Doxyfile config files. Spotted by Alexey Komarov.
svn path=/trunk/; revision=40152
2009-03-21 10:34:24 +00:00
Dmitry Gorbachev
5306bb8631 Do not forward TraceMessage() to itself.
svn path=/trunk/; revision=40150
2009-03-21 07:11:56 +00:00
Jeffrey Morlan
9618066a26 - When running a non-executable file, if the program handling the file type is a console program (e.g. Perl/Python) it should run in the same console as cmd, and cmd should wait for it. Implement this by using ShellExecuteEx instead of plain ShellExecute, with the SEE_MASK_NOCLOSEPROCESS and SEE_MASK_NO_CONSOLE flags. (SEE_MASK_NO_CONSOLE does the opposite of its MSDN description)
- Use NULL as the lpVerb to get the default action ("open" is not necessarily the default)
- Allow passing parameters besides just the file name

svn path=/trunk/; revision=40148
2009-03-21 02:12:23 +00:00
Colin Finck
10f13abcb5 Big testing system commit
rosautotest
- Rewrite rosautotest in C++
  Should increase maintainability and expandability, since most of the functionality is encapsulated in classes and there exist some abstract classes for further enhancements (i.e. new test types).
  Furthermore, due to the usage of STL strings, we don't need x lines anymore just for building a string out of several small parts.
- The new codebase made it fairly easy to implement a Crash Recovery feature based on a journal.
  If you start rosautotest with the /r option under ReactOS, it will keep a journal about the tests to run and the tests already ran. In case of a crash, it can just continue with the next test in the list then.
- Add some reasonable timeouts to avoid certain hangs in case a test crashes

sysreg2
- Make the necessary changes to sysreg2 to restart the VM in case of such a crash in 3rd stage, but set a maximum number of allowed crashes as well.
  Christoph, please test and review that on the Buildslave :-)
- Prepend all sysreg messages with [SYSREG] through a new function SysregPrintf, so the BuildBot aggregator script of testman can distinguish between debug output and sysreg messages.
- Put all header includes into the central header file "sysreg.h"
- Remove unnecessary libs from the Makefile

testman
- Change the testman Web Interface to show such crashes as CRASH in the Compare and Detail views.

svn path=/trunk/; revision=40147
2009-03-21 01:39:04 +00:00
Timo Kreuzer
d225ab948e Fix build.
svn path=/trunk/; revision=40146
2009-03-21 00:25:52 +00:00
Timo Kreuzer
946deefb20 Rename IntGdiInitBrushInstance to EBRUSHOBJ_vInit and move it to engbrush.c. Add 2 FIXME comments.
svn path=/trunk/; revision=40145
2009-03-20 23:40:59 +00:00
Jeffrey Morlan
38dec447a2 Replace hard-coded English string constants with translatable resource strings. (Bug 3718)
svn path=/trunk/; revision=40144
2009-03-20 23:16:12 +00:00
Timo Kreuzer
87e87cd3bf Start to cleanup the mess that claims to be our brush implementation: Rename GDIBRUSHOBJ to BRUSH and GDIBRUSHINST to EBRUSHOBJ. Because that's what it is and nothing else. Rename several BRUSHOBJ_xxx functions to BRUSH_xxx, as they deal with a BRUSH, not a BRUSHOBJ.
There is a strict difference between a BRUSH and an (E)BRUSHOBJ. Please don't mix this up by giving them all names like BrushObj. Please use (proper!) hungarian notation.

Now the willing reader might actually get a clue how this stuff is supposed to work and maybe also realize how broken it is.

svn path=/trunk/; revision=40143
2009-03-20 22:40:14 +00:00
Cameron Gutman
d9e83ed22d - Reorganize NDIS code
svn path=/trunk/; revision=40142
2009-03-20 21:29:53 +00:00
Cameron Gutman
d162807f59 - Implement NdisFreeSharedMemory
svn path=/trunk/; revision=40141
2009-03-20 20:51:05 +00:00
Cameron Gutman
2e3301d050 - Implement NdisAllocateSharedMemory
svn path=/trunk/; revision=40140
2009-03-20 20:45:27 +00:00
Cameron Gutman
1088b50413 - Implement NdisMCreateLog, NdisMCloseLog, and NdisMFlushLog
- Patch by Dmitry Chapyshev (with modifications by me)

svn path=/trunk/; revision=40139
2009-03-20 20:43:43 +00:00
Cameron Gutman
8fd6d0bbd8 - Implement NdisDeregisterAdapterShutdownHandler, NdisMapIoSpace, and NdisRegisterAdapterShutdownHandler
- Move NdisCompleteDmaTransfer to 40gone.c

svn path=/trunk/; revision=40138
2009-03-20 20:14:01 +00:00
Timo Kreuzer
b4cc54f089 Rename GDIDEVICE to PDEVOBJ. Is seems ms uses both PDEV and PDEVOBJ, whith the latter being the C++ representation. But we don't use C++ and PDEVOBJ seems to be a more appropriate name, as PDEV is often used by display drivers.
Make DC.ppdev of type PDEVOBJ* and remove a bunch of typecasts.

svn path=/trunk/; revision=40137
2009-03-20 18:02:55 +00:00
Christoph von Wittich
f0b2b4bfa6 add some new (incomplete) network headers
svn path=/trunk/; revision=40136
2009-03-20 15:08:12 +00:00
Timo Kreuzer
b2ab2d049e rename DC.Dc_attr to dcattr, DC.DcLevel to dclevel, just like in gdikdx. Some naming improvement, remove an excessive variable.
svn path=/trunk/; revision=40135
2009-03-20 14:16:01 +00:00
Christoph von Wittich
59ceaaac16 use ncalrpc instead of a named pipe
svn path=/trunk/; revision=40134
2009-03-20 13:44:06 +00:00
Christoph von Wittich
893ccc059d -allow to stop the service
-listen for rpc calls

svn path=/trunk/; revision=40133
2009-03-20 13:43:43 +00:00
Dmitry Chapyshev
f82ac0fc93 - Implement NdisMapFile
- Implement NdisUnmapFile

svn path=/trunk/; revision=40129
2009-03-20 10:21:17 +00:00
Timo Kreuzer
c0ee5e5328 rename DCs pDc_Attr to pdcattr, like in gdikdx.
Make pdcattr alsways point to a DC_ATTR, either the user mode struct or the local part. Get rid of all the If (!pdcattr) pdcattr = &dc->Dc_Attr; That are not required anymore.

svn path=/trunk/; revision=40115
2009-03-20 04:51:26 +00:00
Cameron Gutman
fb05aeee09 - Implement NdisCompleteUnbindAdapter
svn path=/trunk/; revision=40113
2009-03-20 03:45:35 +00:00
Cameron Gutman
cf85baa5fa - Implement NdisGetDriverHandle
svn path=/trunk/; revision=40112
2009-03-20 03:26:12 +00:00
Timo Kreuzer
af62ba6188 Change most DC struct members to the names they have on Windows according to gdikdx
svn path=/trunk/; revision=40111
2009-03-20 01:35:49 +00:00
Cameron Gutman
b2490d5d64 - DmaSize is NDIS_DMA_SIZE not BOOLEAN
- DmaWidth and DmaSpeed aren't used for bus-master DMA

svn path=/trunk/; revision=40110
2009-03-20 01:07:09 +00:00
Cameron Gutman
ac73f877b3 - Implement NdisMRegisterDmaChannel and NdisMInitializeScatterGatherDma
svn path=/trunk/; revision=40109
2009-03-20 00:26:53 +00:00
Cameron Gutman
cea9babf80 - Implement NdisMQueryAdapterInstanceName
svn path=/trunk/; revision=40108
2009-03-20 00:19:53 +00:00
Cameron Gutman
fed96b0d69 - Implement NdisMDeregisterDmaChannel
- My branch needs to be synced with trunk so I'm not using it right now (plus these changes aren't likely to break anything)

svn path=/trunk/; revision=40107
2009-03-19 23:02:12 +00:00
Aleksey Bragin
d94693c32a - Don't try to be smarter than Windows and don't copy background/foreground color from the original DC. Spotted and confirmed by Evgeniy Boltik. As a result issues in bug 4143 are fixed, as well as other possible problems.
See issue #4143 for more details.

svn path=/trunk/; revision=40106
2009-03-19 21:30:46 +00:00
Johannes Anderwald
c8eaa18003 - Experimental implementation of _RpcEnumInterfaces
- If'd out as GetIfEntry2 is not yet implemented

svn path=/trunk/; revision=40104
2009-03-19 16:57:46 +00:00
Aleksey Bragin
d9d83e8fb1 Evgeniy Boltik <bstsoft@narod.ru>
- Rework 8bit DIB alphablend to do alpha operations in source's palette (32bpp) to obtain much better output quality with lowest possible quality loss.
See issue #4291 for more details.

svn path=/trunk/; revision=40103
2009-03-19 16:56:07 +00:00
Timo Kreuzer
8d620098f5 win32k RECT/RECTL issues:
- Although RECT and RECTL are defined equal, the compiler treats them as incompatible. MS has created a lot of definitions with RECT and a lot with RECTL. So far we had to typecast them. Now with adding some defines into a win32k header file, we can finally treat them as equal inside win32k and get rid of a lot of type casts. Also use RECTL in favour of RECT internally, as this is the type that MS uses for the DDI and seems to be the more appropriate type.
- We had a lot of "const PRECT" stuff inside win32k. Note: there's difference between "const RECT *" (what you currently want) and "CONST PRECT" (which you proabably don't want). Despite the fact that CONST is not an official modifier (please stick to const) the main difference is that the former describes a pointer to a constant structure, while the latter describes a constant pointer to a modifyable structure.
- In an attempt to clean up the overpolluted IntGdi namespace, "objectify" the rect functions, moving them into their own namespace RECTL_Xxx.

svn path=/trunk/; revision=40100
2009-03-19 01:42:34 +00:00
Timo Kreuzer
ee6542397d Merge 39375 from amd64 branch:
csrsrv: convert to spec (Timo Kreuzer)

svn path=/trunk/; revision=40099
2009-03-19 00:38:59 +00:00
Timo Kreuzer
24740374a1 remove UNW flags from winnt.h, they don't belong there
svn path=/trunk/; revision=40098
2009-03-18 22:58:49 +00:00
Timo Kreuzer
2a59efd748 merge r40095 from amd64 branch
svn path=/trunk/; revision=40097
2009-03-18 19:28:54 +00:00
Jeffrey Morlan
a98a143a48 - Make MEMORY command use GlobalMemoryStatusEx if available, so it can show values >= 4GB.
- Fix overflow bug in FREE command that caused values >= 4GB to wrap around.
- A little simplification of ConvertULargeInteger function

svn path=/trunk/; revision=40094
2009-03-18 18:11:19 +00:00
Timo Kreuzer
de32a44cb9 Add DDI_DRIVER_VERSION_NT5_01_SP1
svn path=/trunk/; revision=40091
2009-03-18 17:13:23 +00:00
Timo Kreuzer
1ec5957c2c add missing definition of MultiplyHigh and UnsignedMultiplyHigh, fix typos.
svn path=/trunk/; revision=40090
2009-03-18 17:12:57 +00:00
Timo Kreuzer
5e3ee25bd3 Merge from amd64 branch:
34750 Add ExpChangePushlock macro for _WIN64 (Timo Kreuzer)
34941 Fix usage of InterlockedExchangeAddSizeT (Timo Kreuzer)

svn path=/trunk/; revision=40089
2009-03-18 17:03:58 +00:00
Dmitry Chapyshev
6c4ccad5b0 - Change icon for Network Connections folder
svn path=/trunk/; revision=40086
2009-03-18 09:31:53 +00:00
Dmitry Chapyshev
63c838d70d - Update toolbars bitmaps
- Set toolbars height to 16

svn path=/trunk/; revision=40085
2009-03-18 08:54:19 +00:00
Jeffrey Morlan
3a52766a90 - Implement SHIFT /n.
- Make prompt code $T and %TIME% have the hours space-padded, not zero-padded.
- Allow delayed expansion in the parameter of IF ERRORLEVEL.

svn path=/trunk/; revision=40084
2009-03-18 03:52:58 +00:00
Jeffrey Morlan
466a9064a2 Fix a typo
svn path=/trunk/; revision=40083
2009-03-17 22:53:13 +00:00
Jeffrey Morlan
ef4415728b - Implement MKLINK command.
- Remove unused library shell32 from cmd.rbuild.

svn path=/trunk/; revision=40082
2009-03-17 22:27:33 +00:00
James Tabor
9fdb6d5596 - Rename gdi entry flag.
svn path=/trunk/; revision=40081
2009-03-17 21:50:47 +00:00
Timo Kreuzer
baa5b4b9e6 "same thing in BmfdUnloadFontFile btw :p"
Thanks Stefam again.

svn path=/trunk/; revision=40080
2009-03-17 21:39:17 +00:00
Timo Kreuzer
b12cd7a282 Don't access the font structure after it was freed. Spotted by Stefan.
svn path=/trunk/; revision=40079
2009-03-17 21:29:17 +00:00
Timo Kreuzer
8f4fd76b65 C++ comment style -> C comment style
See issue #4284 for more details.

svn path=/trunk/; revision=40078
2009-03-17 20:30:16 +00:00
Colin Finck
9ffc9028a2 Sync CRT initialization code with mingw-w64 r690
- Fixed initialization for Console apps with Unicode entry point. Now stuff like "cout" in <iostream> doesn't lead to instant crashes.
- Unified the name of the entry point for ANSI and Unicode. The difference is just in the library now ("mingw_main" vs. "mingw_wmain")
  RBuild was changed appropriately to support this
- No more ReactOS-specific changes inside the initialization code

svn path=/trunk/; revision=40077
2009-03-17 20:17:02 +00:00
Timo Kreuzer
72e2fbe6f8 Don't use C++ comment style in C headers.
See issue #4284 for more details.

svn path=/trunk/; revision=40076
2009-03-17 20:08:53 +00:00
James Tabor
abb0a44950 - Added one more gdi entry flag with notes.
svn path=/trunk/; revision=40075
2009-03-17 18:18:20 +00:00
Aleksey Bragin
64b42346d2 Evgeniy Boltik <bstsoft@narod.ru>
- Rework 16bit DIB alphablend to do alpha operations in source's palette (32bpp) to obtain much better output quality without data loss.
See issue #3708 for more details.

svn path=/trunk/; revision=40074
2009-03-17 18:00:28 +00:00
Timo Kreuzer
cf3d6a794f [FORMATTING]
- apply ansi style formatting with an indentation of 4 spaces
- Add 2 FIXME comments, regarding MmSecureVirtualmemory
- no code change

svn path=/trunk/; revision=40073
2009-03-17 06:34:09 +00:00
Timo Kreuzer
0f06669f19 Remove unused DriverFunction and GDIBdyToHdr
svn path=/trunk/; revision=40072
2009-03-17 04:28:03 +00:00
Timo Kreuzer
5c5cfa7b96 - Move contents of eng/misc.h into include/misc.h, get rid of eng/misc.h
- Move eng/objects.h -> include/engobjects.h

svn path=/trunk/; revision=40071
2009-03-17 01:41:33 +00:00
Timo Kreuzer
4ab0724bd7 [FORMATTING]
- Change indentation to 4 spaces
- remove dditional header and $Id field
- no code change

svn path=/trunk/; revision=40070
2009-03-17 01:15:26 +00:00
Timo Kreuzer
886b7b2ab2 - Inline GDIOBJ_UnlockObjByPtr, ASSERT that we don't unlock an already unlocked object, return how many locks are left.
- Don't access the objects cExclsiveLock field after unlocking it, instead use new return value of GDIOBJ_UnlockObjByPtr

svn path=/trunk/; revision=40069
2009-03-17 01:06:34 +00:00
Timo Kreuzer
8d1df272ce Rewrite DRIVEROBJ api, giving the object a handle, belonging to the current process. Let the gdi obj cleanup take care for calling the callback function.
Allow deleting of objects that are exclusively locked by the current thread.

svn path=/trunk/; revision=40068
2009-03-17 00:30:15 +00:00
Art Yerkes
1c4400b8ae Fix some issues with peer names being reported. There may be other problems
too.
My read of MSDN is that queries that return addresses in queries other than
TDI_QUERY_ADDRESS_INFO return a TRANSPORT_ADDRESS, so we plumb that through
for GetPeerName.  Note that this isn't user-facing functionality, so it's
unlikely, though not impossible, that we've got it wrong and it'll affect
something.  Likely, this is an improvement.

svn path=/trunk/; revision=40067
2009-03-16 20:59:05 +00:00
Aleksey Bragin
455369fa90 - Implement boot drivers loading.
svn path=/trunk/; revision=40066
2009-03-16 20:56:07 +00:00
Cameron Gutman
08c383c3de - Don't access an index outside the array bounds
- Fixes memory corruption when calling AfdGetSockName and AfdGetPeerName
 - This caused a high-side redzone overwrite when accessing some web sites

svn path=/trunk/; revision=40065
2009-03-16 19:26:38 +00:00
Daniel Reimer
ae440999df Update German Translation
svn path=/trunk/; revision=40064
2009-03-16 18:30:15 +00:00
Aleksey Bragin
48291b3d33 - Support loading drivers which have no subdirectory in their image path.
svn path=/trunk/; revision=40063
2009-03-16 18:26:02 +00:00
Jeffrey Morlan
34afc06d0a Implement ASSOC command (Bug 4275). Patch by Lee C. Baker <lee at leecbaker.com>.
svn path=/trunk/; revision=40062
2009-03-16 18:18:26 +00:00
Dmitry Gorbachev
71f14c5422 Update Slovak translation, fix formatting. Mario Kacmar. Bug #4281.
svn path=/trunk/; revision=40061
2009-03-16 14:10:15 +00:00
Christoph von Wittich
d548413ae8 -add wlan service to registry
-add wlansvc and wlapapi_winetest to bootcd
-add some parameter checks to WlanCloseHandle
-halfplement WlanOpenHandle

svn path=/trunk/; revision=40060
2009-03-16 13:40:25 +00:00
Christoph von Wittich
71362c59fd more precise error descriptions
svn path=/trunk/; revision=40059
2009-03-16 13:39:03 +00:00
Johannes Anderwald
118cf3b5e1 - Fix memory leak
- Fix memory corruptions
- Does not fix es1370mp / es1371mp driver (qemu / vmware)

svn path=/trunk/; revision=40058
2009-03-16 13:12:14 +00:00
Christoph von Wittich
5c6d424c26 add some wlanapi tests
svn path=/trunk/; revision=40057
2009-03-16 12:15:02 +00:00
Christoph von Wittich
151e1c47c1 add missing types
svn path=/trunk/; revision=40056
2009-03-16 09:50:56 +00:00
Christoph von Wittich
aaa5075d3d -implement WlanScan and WlanEnumInterfaces
-add some more NDIS definitions

svn path=/trunk/; revision=40055
2009-03-16 09:22:25 +00:00
Christoph von Wittich
7ea6daa784 implement WlanCloseHandle
svn path=/trunk/; revision=40054
2009-03-16 08:23:58 +00:00
Christoph von Wittich
60a57f4c8a stub wlan rpcserver
svn path=/trunk/; revision=40053
2009-03-16 08:08:03 +00:00
Christoph von Wittich
a8d63d2500 move some structs to the idl
svn path=/trunk/; revision=40052
2009-03-16 07:50:27 +00:00
James Tabor
a27da8f7e8 - Patch by Evgeniy Boltik: Fix Rectangle, Ellipse, RoundRect and Polygon.
svn path=/trunk/; revision=40051
2009-03-16 03:21:00 +00:00
Jeffrey Morlan
6f8ec7004e Fixed output of various date/time stuff ($D and $T in prompt, %DATE% and %TIME% variables, DATE /T and TIME /T commands) to be more compatible with Windows.
svn path=/trunk/; revision=40050
2009-03-16 00:44:08 +00:00
Sylvain Petreolle
80c1384089 unbreak wlananpi build by #ifdef'ing struct_C, struct_D and struct_E
svn path=/trunk/; revision=40049
2009-03-15 21:25:18 +00:00
Aleksey Bragin
6bd4c18a13 Evgeniy Boltik <bstsoft@narod.ru>
- Move clipping from StretchBlt to Eng.
- Add ROP support to StretchBlt.
- Fix alphablend support (alphablend.exe produces same result as tested on Windows XP).

See issue #4156 for more details.

svn path=/trunk/; revision=40048
2009-03-15 20:13:10 +00:00
Christoph von Wittich
1ed252413b -add some more WLAN types
-add wlansvc.idl

svn path=/trunk/; revision=40047
2009-03-15 19:48:56 +00:00
Dmitry Chapyshev
2ce97e2c16 - Add some defines
svn path=/trunk/; revision=40046
2009-03-15 19:06:48 +00:00
Dmitry Chapyshev
57e8c21128 - Sync quartz with Wine head
svn path=/trunk/; revision=40045
2009-03-15 19:03:42 +00:00
Dmitry Chapyshev
ea9fc099f5 - Change font to Tahoma
svn path=/trunk/; revision=40044
2009-03-15 18:59:09 +00:00
Christoph von Wittich
ca12a2179c add wlantypes.h and move some definitions to the correct place
svn path=/trunk/; revision=40043
2009-03-15 18:55:51 +00:00
Christoph von Wittich
ace79a8ee9 add ntddndis.h and windot11.h
svn path=/trunk/; revision=40042
2009-03-15 17:19:02 +00:00
Aleksey Bragin
1e1a103c24 Evgeniy Boltik <bstsoft@narod.ru>
- EngStretchBltROP expects a ROP4 code, but SRCCOPY is ROP3. Convert it accordingly.

See issue #4156 for more details.

svn path=/trunk/; revision=40041
2009-03-15 17:04:46 +00:00
Aleksey Bragin
5afd0c7426 Evgeniy Boltik <bstsoft@narod.ru>
- Brush's origin is always (0,0) of a window, not a screen. Offset it accordingly in NtGdiStretchBlt.
See issue #4147 for more details.

svn path=/trunk/; revision=40040
2009-03-15 17:00:13 +00:00
Dmitry Chapyshev
628321cb61 - Add mp3 codec from Wine
svn path=/trunk/; revision=40039
2009-03-15 15:54:15 +00:00
Jeffrey Morlan
341c5b2e5f - Allow running a batch file from inside a FOR
- A little cleanup

svn path=/trunk/; revision=40038
2009-03-15 15:45:17 +00:00
Dmitry Chapyshev
c116a4507a - Fix build
svn path=/trunk/; revision=40037
2009-03-15 15:37:05 +00:00
Dmitry Chapyshev
c0c953ae5d - Add httpapi, initpki, itircl, msisys.ocx, msnet32, pidgen, resutils, sccbase, slbcsp, softpub, traffic from Wine
svn path=/trunk/; revision=40036
2009-03-15 15:20:51 +00:00
Dmitry Gorbachev
ea6fed1ec0 Update Spanish translations. Javier Remacha, bug #4278. (2/2)
svn path=/trunk/; revision=40035
2009-03-15 14:13:46 +00:00
Dmitry Gorbachev
b37f7b3199 Update Spanish translations. Javier Remacha, bug #4278. (1/2)
svn path=/trunk/; revision=40034
2009-03-15 14:13:41 +00:00
Christoph von Wittich
c16fc76360 add a dummy wlansvc
svn path=/trunk/; revision=40033
2009-03-15 13:55:41 +00:00
Aleksey Bragin
0eec102951 - Give winldr's PE loader its own debug mask.
svn path=/trunk/; revision=40032
2009-03-15 13:29:13 +00:00
Dmitry Chapyshev
093a0db906 - Add mssign32, msisip, query, updspapi, wintab32 from Wine
svn path=/trunk/; revision=40031
2009-03-15 11:22:15 +00:00
Aleksey Bragin
12a0ddf46e - Implement NLS data loading.
svn path=/trunk/; revision=40030
2009-03-15 11:10:52 +00:00
Dmitry Chapyshev
d77cb9ea17 - Add shortcut for dxdiag
svn path=/trunk/; revision=40029
2009-03-15 10:57:55 +00:00
Aleksey Bragin
ff79c83048 - Implement first part of setupldr:
* Constructing boot / system paths
 * Opening boot device
 * Getting options string
 * Loading kernel, hal and kdcom.dll, and their dependencies

svn path=/trunk/; revision=40028
2009-03-15 10:46:41 +00:00
Dmitry Chapyshev
ae297f9f05 - Create Entertainment folder
- Add shortcut for sndvol32

svn path=/trunk/; revision=40027
2009-03-15 10:25:32 +00:00
Dmitry Chapyshev
cf2ecfe742 - Fix typo
svn path=/trunk/; revision=40026
2009-03-15 09:41:13 +00:00
Dmitry Chapyshev
56f1a1b8b9 - Remove win16 stuff
svn path=/trunk/; revision=40025
2009-03-15 08:09:25 +00:00
Jeffrey Morlan
a1eb1f6ba4 Replace a couple hacks supporting specific cases of enhanced variable substitution (%~var) with a more general implementation. All tests in rostests/win32/cmd/script_testsuite can now be passed using ReactOS cmd in Windows, though still not yet in ReactOS itself.
svn path=/trunk/; revision=40024
2009-03-15 04:54:41 +00:00
James Tabor
89e44e0c4a - Add Font attribute support for NtGdiHfontCreate.
svn path=/trunk/; revision=40023
2009-03-15 04:42:45 +00:00
Dmitry Gorbachev
aa42f8869e Add multimedia player to syssetup. Mario Kacmar, bug #4274. Fix formatting.
svn path=/trunk/; revision=40022
2009-03-15 02:37:06 +00:00
Dmitry Gorbachev
8258a1ad0e Uncomment locks, remove unnecessary stuff.
svn path=/trunk/; revision=40021
2009-03-15 02:05:40 +00:00
Dmitry Gorbachev
0f6f0fe19a Trying to use r39938 variant again...
svn path=/trunk/; revision=40020
2009-03-15 01:23:47 +00:00
Dmitry Gorbachev
a49345f0c1 Disable locks for now.
svn path=/trunk/; revision=40019
2009-03-15 00:27:59 +00:00
Dmitry Gorbachev
aa365b7e33 - Use MmCreateHyperspaceMapping() again.
- Delete hyperspace mapping before releasing cache segment (bug #4249).

svn path=/trunk/; revision=40018
2009-03-14 21:29:37 +00:00
Michael Martin
a1fee90219 - Fix few more wine tests for services; return correct param values for GetServiceDisplayNameW and GetServiceKeyNameW when service name is not found.
svn path=/trunk/; revision=40017
2009-03-14 19:35:34 +00:00
Johannes Anderwald
aa0f6ce8d5 [20:33] Stefan100: the code inside an ASSERT won't be executed on release
svn path=/trunk/; revision=40016
2009-03-14 19:34:25 +00:00
Johannes Anderwald
4a74095169 - Silence a few debug prints
- Add a tag for each queued irp which will be used by the future IPortPinWavePci object
- Add support for basic support for capture devices
- Implement IPortWavePciStream object

svn path=/trunk/; revision=40015
2009-03-14 18:57:51 +00:00
Dmitry Gorbachev
d74173888a Trying to fix boot breakage.
svn path=/trunk/; revision=40014
2009-03-14 18:13:32 +00:00
Christoph von Wittich
b860e9cb67 stub wlanapi
svn path=/trunk/; revision=40013
2009-03-14 14:32:48 +00:00
Dmitry Gorbachev
fc574caf3c Fix build. Sorry.
svn path=/trunk/; revision=40012
2009-03-14 14:29:25 +00:00
Dmitry Chapyshev
774eac41f1 - Alphabetically re-order README.WINE. Patch by Kario
See issue #4239 for more details.

svn path=/trunk/; revision=40011
2009-03-14 14:21:49 +00:00
Dmitry Gorbachev
f98a859ad2 Fix bug #4273 (Slovak part for r39980, Mario Kacmar) and a few other translations.
svn path=/trunk/; revision=40010
2009-03-14 14:15:41 +00:00
Dmitry Gorbachev
4db1751502 Italian translation of MPlay32 by Carlo Bramini. Bug #4270.
svn path=/trunk/; revision=40009
2009-03-14 02:17:16 +00:00
Dmitry Gorbachev
c9901dd8b6 Return to an old idea of MiMapPageToZeroInHyperSpace(), "fix" bug #4267.
svn path=/trunk/; revision=40008
2009-03-14 01:20:18 +00:00
Colin Finck
67d3295fc6 Import a part of mingw-w64's "ctype.h" into our "ctype.h"
This way we can already remove one modification I did to the original mingw-w64 CRT initialization code

Thanks to Timo for the hint

svn path=/trunk/; revision=40007
2009-03-14 01:13:03 +00:00
Colin Finck
8d291610ee - Sync the common mingw stuff with mingw-w64 HEAD
Only few modifications were necessary to get it to work flawlessy with our tree:
    -> getopt.c, which should rather be a part of "mingwex" (if we need the two Unix apps using it at all..)
    -> Adding an 'extern int __globallocalestatus;' to the "internal.h"
    -> Disabling the custom __mingw_get_crt_info, which depends on defines inside the mingw-w64 tree
    -> Small warning fixes, which will be submitted to mingw-w64
- Add an include directory "include/reactos/mingw-w64" for their header stuff to make synchronizations easier.
- Remove remainders of our previous initialization routines, which still co-existed beside the new ones
- Remove misleading and unnecessary files (i.e. "binmode.c")

svn path=/trunk/; revision=40006
2009-03-14 00:50:23 +00:00
Timo Kreuzer
8b8a92d9da fix definition of _STATIC_ASSERT
svn path=/trunk/; revision=40005
2009-03-13 23:41:12 +00:00
Cameron Gutman
3f46303c0e - Merge aicom-network-fixes up to r39995
svn path=/trunk/; revision=40004
2009-03-13 17:25:48 +00:00
Sylvain Petreolle
8ae1a88a0b Spanish part for r39980:
- use symbolic names instead of numeric values (made for English and German, other languages needs to change)


svn path=/trunk/; revision=40003
2009-03-13 15:57:20 +00:00
Sylvain Petreolle
39e4f8fc38 French part for r39980:
- use symbolic names instead of numeric values (made for English and German, other languages needs to change)

svn path=/trunk/; revision=40002
2009-03-13 14:47:19 +00:00
Johannes Anderwald
360606f98b - Remove hack in IDmaChannel::PhysicalAddress as it will hide the bug and not prevent es1370mp from crashing
- Fix a horrible where the Mdl was not created for the common buffer
- Might fix other audio related crashes
- Forward IRP_MN_QUERY_INTERFACE to next lower device object
- Fix & enable PcForwardIrpSynchronous implementation
- Add debug print to IServiceGroup when a unknown IID is requested

svn path=/trunk/; revision=40001
2009-03-13 14:07:03 +00:00
Dmitry Chapyshev
d45772c95a - Sync ole32, oleaut32, olesvr32 with Wine head
svn path=/trunk/; revision=40000
2009-03-13 13:40:31 +00:00
Dmitry Chapyshev
1b0fc53030 - Update Ukrainian translation by Sakara Yevhen
svn path=/trunk/; revision=39999
2009-03-13 13:40:25 +00:00
Jeffrey Morlan
4ef352817a In a 'Bad command or filename' error, print the name of the non-existent program, so getting the error from a batch file isn't so mysterious.
svn path=/trunk/; revision=39998
2009-03-13 01:26:08 +00:00
Matthias Kupfer
40329ba147 - Add a hackfix comment for issue #4243 due to several requests.
svn path=/trunk/; revision=39997
2009-03-13 00:20:48 +00:00
Colin Finck
17ed09b751 Reenable the Solitaire Unicode build. Works well now :-)
svn path=/trunk/; revision=39996
2009-03-12 23:43:26 +00:00
Timo Kreuzer
94c7a3392b Cleanup freetypee lib
svn path=/trunk/; revision=39993
2009-03-12 23:08:01 +00:00
Johannes Anderwald
e5f6e4c0e8 - Disable some debug prints
- Close the real pin on exit / when a new wave stream is played. This should fix stuttering when changing the sample rate
- Always create the mixer pin

svn path=/trunk/; revision=39992
2009-03-12 22:11:53 +00:00
Jeffrey Morlan
8c83602d51 In a pipeline ("prog1 | prog2") run all programs simultaneously, using a real pipe instead of a temporary file. Output from RosBE "make" is now visible immediately instead of having to wait for it to complete.
svn path=/trunk/; revision=39991
2009-03-12 22:04:59 +00:00
Matthias Kupfer
f7a722ebda Evgeniy Boltik <bstsoft AT narod DOT ru>
- Fix draw icon with alpha in 32 bit.
- See issue #4243 for details.

svn path=/trunk/; revision=39989
2009-03-12 21:25:49 +00:00
Timo Kreuzer
004cc56ed5 LoadBitmapImage: - add space for 3 RGBQUADs to BITMAPINFO when biCompression is BI_BITFIELDS. Based on patch by Evgeniy Boltik <bstsoft at narod dot ru>, modified by me.
- Take into account BITMAPV4/V5HEADER sizes.
See issue #3708 for more details.

svn path=/trunk/; revision=39987
2009-03-12 20:55:34 +00:00
Jeffrey Morlan
9c84f62cd4 NtSetInformationObject: OBJECT_HANDLE_ATTRIBUTE_INFORMATION is just made of BOOLEANs, so it doesn't need ULONG alignment.
svn path=/trunk/; revision=39986
2009-03-12 20:29:32 +00:00
Timo Kreuzer
36277461a1 NtSetSystemInformation: - Don't leak the copied string when being called from user mode. - Don't recursively call ZwSetSystemInformation, instead continue the normal path.
svn path=/trunk/; revision=39985
2009-03-12 18:29:11 +00:00
Johannes Anderwald
53899ff4fa - Fix KSDATAFORMAT_WAVEFORMATEX & KSDATAFORMAT_DSOUND alignment
svn path=/trunk/; revision=39984
2009-03-12 17:51:28 +00:00
Aleksey Bragin
edb32a04eb - Remove two unnecessary boot types (Windows2000 and WindowsXP), and add ReactOSSetup2 type for WinLdr-style setup loader.
- Add a stub for LoadReactOSSetup2().

svn path=/trunk/; revision=39983
2009-03-12 14:42:02 +00:00
Johannes Anderwald
b2f937d0fe - Don't use a tag if there is none assigned
- Fixes a crash in es1370mp driver

svn path=/trunk/; revision=39982
2009-03-12 14:01:56 +00:00
Matthias Kupfer
372ea0433e - fix some German dialog ressources (2nd attempt)
svn path=/trunk/; revision=39981
2009-03-12 13:43:33 +00:00
Matthias Kupfer
b3d2497aaa - use symbolic names instead of numeric values (made for English and German, other languages needs to change)
svn path=/trunk/; revision=39980
2009-03-12 13:27:26 +00:00
Dmitry Gorbachev
e6e1b8bf6a Dutch translation, Jan Roeloffzen, bug #4263.
svn path=/trunk/; revision=39979
2009-03-12 12:35:27 +00:00
Aleksey Bragin
0641e0eff8 - Unhack usb mouse driver after endpoint parsing code was corrected.
- Cleanup usb mouse driver source code, make its structure similar to the usb keyboard driver.

svn path=/trunk/; revision=39978
2009-03-12 11:29:09 +00:00
Daniel Reimer
70d2641a89 Bug 4255: ReactOS norwegian translate files by Lars Martin Hambro
svn path=/trunk/; revision=39977
2009-03-12 11:28:33 +00:00
Daniel Reimer
5d5f4e9b30 Bug 4260: slovak translation for mplay32 by Mario Kacmar
Bug 4261: Translate Patch, Dutch for mplay32 by Jan Roeloffzen

svn path=/trunk/; revision=39976
2009-03-12 10:52:00 +00:00
Aleksey Bragin
defbc44f67 Evgeniy Boltik <bstsoft@narod.ru>
- Use bitmap's DIB palette, if it exists. Fixes problems described in bug 4147.
See issue #4147 for more details.

svn path=/trunk/; revision=39975
2009-03-12 10:48:52 +00:00
Aleksey Bragin
044b06829d - Load debug symbols if compiled with DBG, but don't load if booting with less than 96Mb of RAM.
svn path=/trunk/; revision=39974
2009-03-12 10:42:45 +00:00
Jeffrey Morlan
60d07a7af3 Instead of having DOSKEY print something when it successfully adds an alias, print an error message when it fails. Also implement some options that were missing.
svn path=/trunk/; revision=39973
2009-03-12 04:37:01 +00:00
Timo Kreuzer
1d680929bb delete old freetype folder
svn path=/trunk/; revision=39972
2009-03-12 04:00:56 +00:00
Timo Kreuzer
fa1d468c66 fix library name
svn path=/trunk/; revision=39971
2009-03-12 03:44:48 +00:00
Timo Kreuzer
3f626046f1 ok next try ;-)
svn path=/trunk/; revision=39970
2009-03-12 03:38:57 +00:00
Timo Kreuzer
b56c0bfbea fix build
svn path=/trunk/; revision=39969
2009-03-12 03:35:48 +00:00
Timo Kreuzer
608546a05e Remove freetype dll from build, build ftfd instead, the freetype font driver that currently still exports the needed functions directly for win32k.
svn path=/trunk/; revision=39968
2009-03-12 03:26:23 +00:00
Timo Kreuzer
8045178f6f Copy freetype to lib (will be converted to a static lib)
svn path=/trunk/; revision=39967
2009-03-12 03:16:15 +00:00
Timo Kreuzer
2a09b8d220 WIP 1/x: Move freetype font driver.
svn path=/trunk/; revision=39966
2009-03-12 03:00:51 +00:00
Dmitry Gorbachev
b1083de600 Swedish translation by Anton Adell (anton_hahaha *at* hotmail *dot* com). Bug #4245.
svn path=/trunk/; revision=39965
2009-03-12 00:05:59 +00:00
Cameron Gutman
d37359e14f - Merge aicom-network-fixes up to r39943
svn path=/trunk/; revision=39964
2009-03-11 22:15:12 +00:00
Matthias Kupfer
9a03c978ce - minor German translation and dialog resource fixes
svn path=/trunk/; revision=39963
2009-03-11 22:00:12 +00:00
Cameron Gutman
1326452802 - Fix instructions (I should've read the howto more closely)
svn path=/trunk/; revision=39962
2009-03-11 21:24:50 +00:00
Sylvain Petreolle
da261865d5 -Add French translation
thanks to elhoir who saw that my eyes and english aren't perfect :)

svn path=/trunk/; revision=39961
2009-03-11 20:54:37 +00:00
Dmitry Gorbachev
5c38f590b4 Add Japanese font to USetup.
svn path=/trunk/; revision=39960
2009-03-11 20:35:23 +00:00
Dmitry Gorbachev
a8274cb5f7 Do not crash on Pentium.
svn path=/trunk/; revision=39959
2009-03-11 20:34:34 +00:00
Cameron Gutman
5d5bd6fb04 - Add a driver section to Download
- Add the AC97 driver
 - We need an icon for this section

svn path=/trunk/; revision=39958
2009-03-11 19:53:23 +00:00
Johannes Anderwald
305a91c154 - Use Byteswap intriniscs to improve performance
- Hint by Physicus

svn path=/trunk/; revision=39957
2009-03-11 19:02:06 +00:00
Johannes Anderwald
6d0e4470e0 - Check if handle is re-used. Fixes double-freeing of handle & crash
svn path=/trunk/; revision=39956
2009-03-11 18:32:32 +00:00
Dmitry Chapyshev
da9027ac4f - Fix build
svn path=/trunk/; revision=39955
2009-03-11 18:17:54 +00:00
Johannes Anderwald
0a55745585 - Use Interlocked*List function to improve stability as a few of the timing issues have been resolved
- Queue a dpc for each completed buffer
- Complete the irp as soon as possible

svn path=/trunk/; revision=39954
2009-03-11 18:00:11 +00:00
Dmitry Chapyshev
a544749337 - Add Ukrainian translation by Sakara Yevhen
- Other small changes

svn path=/trunk/; revision=39953
2009-03-11 17:40:01 +00:00
Johannes Anderwald
e3ba7d5ef2 - Implement wave pcm bitrate conversion. Atm only 8-16 bit has been tested
- The tricky part is just to get result value into the right byte order (endianess)
- Thanks to Christoph and everyone else :)

svn path=/trunk/; revision=39952
2009-03-11 14:42:42 +00:00
Dmitry Chapyshev
2a3a7faf98 - Add Spanish translation by Javier Fernández
- Other small changes

svn path=/trunk/; revision=39951
2009-03-11 12:20:34 +00:00
Daniel Reimer
92d4e45e80 Translate the ReactOS MediaPlayer into German and Polish (Maciej Bialas).
Sync WinHLP32 and WordPad with Wine HEAD.

svn path=/trunk/; revision=39950
2009-03-11 12:11:28 +00:00
Dmitry Chapyshev
db29885bc0 - Add Russian translation
svn path=/trunk/; revision=39949
2009-03-11 11:14:05 +00:00
Dmitry Chapyshev
689f247b95 - Add mplay32 to bootcd
- Opening .wav, .cda, .avi, .mid files with mplay32

svn path=/trunk/; revision=39948
2009-03-11 10:57:05 +00:00
Dmitry Chapyshev
edc8b4e894 - Add simple multimedia player
svn path=/trunk/; revision=39947
2009-03-11 10:22:15 +00:00
Johannes Anderwald
0a23e307a1 - Add kmixer to bootcd
- Check if device supports a specified format. When the device doesnt support a format, query its datarange and create a format which it supports and create a kmixer pin which is used to convert the format
- Load kmixer.sys when sysaudio starts
- Call kmixer when there is work to do. 
- Bitrate increasing / decreasing is not working at all. (Need to find a working algorithm, volunteers?)
- Install kmixer service when an audio adapter is installed

svn path=/trunk/; revision=39946
2009-03-11 09:30:33 +00:00
Jeffrey Morlan
acdae19a65 Fix bug where wcscspn could return non-zero value on an empty string.
svn path=/trunk/; revision=39945
2009-03-11 03:35:29 +00:00
Jeffrey Morlan
db0b0ba158 Give an error message when trying to DEL a file that doesn't exist (Bug 4244). Patch by Victor Martinez <vicmarcal at hotmail.com>.
svn path=/trunk/; revision=39944
2009-03-11 02:17:53 +00:00
Matthias Kupfer
947cbd765b - fix the bitmap and memdc issue for menu items (popup arrow, check and radio symbols)
svn path=/trunk/; revision=39942
2009-03-10 23:48:21 +00:00
Matthias Kupfer
9c5d76e1bf - due to minor differences (marletting related) combine drawing routines for check box and radio button
- initial version for popup arrows, maybe someone know how to remove the bitmap and memory-dc stuff properly

svn path=/trunk/; revision=39940
2009-03-10 21:39:22 +00:00
ReactOS Portable Systems Group
83c3b848b3 - Rework Hyperspace Mapping Interface for Page zeroing. It is now more efficient and adapted to ReactOS.
- This also fixes some race conditions.
- There was a lot of difficulty getting this patch through because of everyone else adding their 2 cents to the code. Next time, wait. 


svn path=/trunk/; revision=39938
2009-03-10 20:52:39 +00:00
Aleksey Bragin
6965eb3bd8 - Fix a typo: set a value, not a bit.
svn path=/trunk/; revision=39937
2009-03-10 20:33:18 +00:00
Aleksey Bragin
084068b86a - Initialize hyperspace before page lists. Fixes boot problem (spotted by Alex).
svn path=/trunk/; revision=39936
2009-03-10 20:26:46 +00:00
Dmitry Gorbachev
df00880ca7 Fix bug #4249 and crash in QEMU. Alex Ionescu, bug #4249.
svn path=/trunk/; revision=39934
2009-03-10 17:47:11 +00:00
Dmitry Gorbachev
02a00d8520 Silence compiler warning.
svn path=/trunk/; revision=39933
2009-03-10 12:41:23 +00:00
Timo Kreuzer
01213b0fed Only warn when trying to free a NULL pointer with ExFreePoolWithTag
svn path=/trunk/; revision=39932
2009-03-10 05:22:38 +00:00
Timo Kreuzer
83b90e9547 Don't free a NULL pointer.
svn path=/trunk/; revision=39931
2009-03-10 04:34:33 +00:00
Timo Kreuzer
b60241301b Initial code for freetype font driver
svn path=/trunk/; revision=39930
2009-03-10 04:12:27 +00:00
Timo Kreuzer
974b832c83 Add sprintf.c for as long as our libcntpr doesn't have it.
svn path=/trunk/; revision=39929
2009-03-10 03:45:44 +00:00
Timo Kreuzer
c3586e7347 Make freetype ddi compliant, by linking to win32k only. Clean up excessive header usage in rosglue.c
svn path=/trunk/; revision=39928
2009-03-10 02:49:45 +00:00
Timo Kreuzer
26593d0ac7 Call ExFreePoolWithTag with 0 tag from ExFreePool instead of vice versa, bugcheck system, when Block is not inside any pool.
svn path=/trunk/; revision=39927
2009-03-10 02:16:38 +00:00
Johannes Anderwald
0533a9d290 - Implement KSPROPERTY_PIN_PROPOSEDATAFORMAT
- Add KSPROPERTY_PIN_PROPOSEDATAFORMAT handler to IPortWaveCyclic 


svn path=/trunk/; revision=39926
2009-03-10 01:52:51 +00:00
ReactOS Portable Systems Group
115377a581 - Implement a new Hyperspace Mapping Interface:
- The new interface is portable and much faster than before. For example, unmapping a hyperpage is almost a one-line operation.
    - The new interface is also thread-safe and uses the EPROCESS hyperspace spinlock.
    - However, in order to isolate from React Mm internals, the Hyper IRQL and Process are stored as globals, so this will not work on SMP.
    - For now, mapping vs. zero PTEs are not treated differently, but the two interfaces have been separated pending future work.
    - Performance tests with _rdtsc resulted in an improvement of over 300% compared to the old interface.
    - Hyperspace mappings are frequent, so the improvement is noticeable during startup (3/10ths of a second).
    - This also fixes incorrect initializtion of hyperspace -- pages were zeroed out (which requires hyperspace) before hyperspace was created.


svn path=/trunk/; revision=39925
2009-03-10 00:31:14 +00:00
Kamil Hornicek
468100e628 - fix glEdgeFlagPointe prototype
- clean up opengl32.h a bit

svn path=/trunk/; revision=39922
2009-03-09 19:55:00 +00:00
Kamil Hornicek
3ec78e9525 - fix some prototypes, remove dxroslayer from dsound
- sync dsound with wine head, it now works again (tested on win xp and reactos)

svn path=/trunk/; revision=39921
2009-03-09 19:46:37 +00:00
Kamil Hornicek
2c38f28ad1 - fix the class name, vbox guest additions installer proceeds a bit further now
svn path=/trunk/; revision=39920
2009-03-09 19:34:37 +00:00
Kamil Hornicek
599cdf24dd - fix logic, global mouse and keyboard hooks are supported, dinput now works again
svn path=/trunk/; revision=39919
2009-03-09 19:01:11 +00:00
Aleksey Bragin
86bdd2b0e0 - Fix wrong placement of KEYBOARD_DEVICE_EXTENSION structure.
- Fix wrong include order.
- Fixes build.

svn path=/trunk/; revision=39918
2009-03-09 18:49:47 +00:00
Johannes Anderwald
0ea44d711f - Disable message flood when playing audio files as it is very time critical and makes audio stutter
- Free remaining irps and make sure that the dpc finished before stopping the audio stream. This fixing stuttering when there are too few audio buffers available.
- Complete the IRPs when they are actually have played. This should make audio playback position become more accurate and prevents application to feed in too much audio buffers
- VLC 0.9.8a can now playback audio files (no window is shown -> different issue)

svn path=/trunk/; revision=39917
2009-03-09 18:05:56 +00:00
Danny Götte
c2bf4ad844 * convert templates, instead of just change type
* load backends of current instance instead of roscms master
* show language selection in user interface again
* minor adjustments

svn path=/branches/danny-web/; revision=39916
2009-03-09 16:55:04 +00:00
Johannes Anderwald
b27721cbe6 - Register default sound schemes when an new audio adapter is installed
- Pass the full filename to PlaySound as the sound might not be in standard location

svn path=/trunk/; revision=39915
2009-03-09 11:51:28 +00:00
Aleksey Bragin
c5a305d2a5 - Move USB keyboard LEDs managing code into an own function.
svn path=/trunk/; revision=39914
2009-03-09 10:11:24 +00:00
Aleksey Bragin
5b630715c1 - Major cleanup of USB keyboard driver:
* Remove huge hack, which is not needed anymore since 39912.
 * Put all global variables into device extension, allowing support for more than one USB keyboard.
 * Cleanup driver extension structure.
 * Remove unneeded endpoint finding code.
- Add test code for LEDs support (now puts three of them into ON state).

svn path=/trunk/; revision=39913
2009-03-09 10:04:40 +00:00
Aleksey Bragin
9b878bfeb9 - Fix an incorrect assumption that endpoint descriptors must immediately follow an interface descriptor (there may be generic descriptors in between too, as it is for e.g. USB HID devices). Thanks to Michael Lotz from Haiku for his help with this issue.
- Fix incorrect handling of alternate interface settings, which resulted in reading uninitialized memory.

svn path=/trunk/; revision=39912
2009-03-09 09:40:43 +00:00
Jeffrey Morlan
eb94cff07d add ConPrintf and ConPrintfPaging prototypes to cmd.h
svn path=/trunk/; revision=39911
2009-03-08 19:21:07 +00:00
Jeffrey Morlan
be7941b485 - Clean up code for DIR command
- Fix bug where "DIR directoryname /S" wouldn't list subdirectories (you needed to do directoryname\*.*)
- Get rid of extra * that appeared in DIR /B /S output

svn path=/trunk/; revision=39910
2009-03-08 17:37:11 +00:00
Dmitry Chapyshev
357903327b - Fix typo
svn path=/trunk/; revision=39909
2009-03-08 17:35:12 +00:00
Matthias Kupfer
f467c0a203 - continue "marletting"
- use marlett font for checkbox

svn path=/trunk/; revision=39908
2009-03-08 16:32:35 +00:00
Johannes Anderwald
2babefdc42 - Wait for the APC in wdmaud.drv
- Queue ~ one second of audio data before starting to stream
- Check if an audio pin is already open and re-use it in that case

svn path=/trunk/; revision=39907
2009-03-08 16:25:28 +00:00
Matthias Kupfer
74c6572ab1 - continue "marletting"
- use marlett font for caption buttons

svn path=/trunk/; revision=39906
2009-03-08 14:08:28 +00:00
Timo Kreuzer
ce78c454eb Bmfd: Rework code for BmfdQueryFontData, rename some structs, add BMFD_FONT struct, which is associated with a FONTOBJ, rewrite copying bits, so it can do scaling and rotation. Scaled fonts work now. Rotation is not yet finished.
svn path=/trunk/; revision=39905
2009-03-08 03:09:10 +00:00
Johannes Anderwald
52ccdffece - Document the mega-haxxx
svn path=/trunk/; revision=39904
2009-03-07 20:50:38 +00:00
Aleksey Bragin
179386fce6 - Fix UsbBuildGetStatusRequest macro.
svn path=/trunk/; revision=39903
2009-03-07 20:15:29 +00:00
Johannes Anderwald
4dd44cb8cd - Rewrite writing to common buffer to fix stuttering sound
svn path=/trunk/; revision=39902
2009-03-07 19:59:57 +00:00
Johannes Anderwald
0da1e6e5e9 - Free queued audio buffers and complete irps
svn path=/trunk/; revision=39901
2009-03-07 17:41:03 +00:00
Dmitry Chapyshev
b69eed875d - Sync comctl32, cryptui, mlang, msctf, netapi32, ole32, urlmon with Wine head
svn path=/trunk/; revision=39900
2009-03-07 08:34:55 +00:00
Art Yerkes
7db98868de Fix remaining issues in this neglected imported code. It's my fault it was
in a poor state for so long.

svn path=/trunk/; revision=39899
2009-03-07 00:18:06 +00:00
Matthias Kupfer
56de5c087f - translate remaining items to native language (German)
svn path=/trunk/; revision=39898
2009-03-06 22:33:54 +00:00
Matthias Kupfer
0a9c2d05f4 - temporary fix to show current time format setting in control panel
svn path=/trunk/; revision=39897
2009-03-06 22:25:34 +00:00
Cameron Gutman
afe9844e8b - Merge aicom-network-fixes up to r39293
svn path=/trunk/; revision=39896
2009-03-06 20:32:17 +00:00
Johannes Anderwald
6a947146d8 - Sorry broke build
svn path=/trunk/; revision=39895
2009-03-06 19:22:56 +00:00
Johannes Anderwald
4ced7e9c28 - Fix a few issues to open wdmaud / write to
- Under lucky circunstances, you might be able to now to play an mp3 with winamp ;)
- Dedicated to all people helping to achieve this

svn path=/trunk/; revision=39894
2009-03-06 19:14:56 +00:00
Johannes Anderwald
587e95a112 - Implement a fast read / fast write path with KsStreamIo
- Fix 2 bugs in KsRegister*Worker code
- Implement fast write support for the general purpose dispatcher in portcls
- Implement a IIrpQueue object will queue pending irp requests
- Refactor IPinWaveCyclic interrupt handling code to work with IIrpQueue
- Handle wave out request in IRP_MJ_WRITE and submit them using KsStreamIo
- 

svn path=/trunk/; revision=39893
2009-03-06 19:06:21 +00:00
Jeffrey Morlan
fff257c059 Implement SETLOCAL and ENDLOCAL commands. Make delayed expansion optional (disabled by default, enabled by CMD /V switch or with SETLOCAL)
svn path=/trunk/; revision=39892
2009-03-06 18:05:45 +00:00
Dmitry Chapyshev
64455e3b04 - Fix exceptions in some cases (if CriticalSection->DebugInfo = NULL)
svn path=/trunk/; revision=39891
2009-03-06 18:03:04 +00:00
Jeffrey Morlan
79c11338fa - Ignore special characters in a REM line.
- Make the \n-printing in batch files with ECHO on more consistant with how Windows does it.

svn path=/trunk/; revision=39890
2009-03-06 17:27:42 +00:00
Jeffrey Morlan
58e2d39f21 FAT(X)IsDirectoryEmpty: When done with one page, go to the next one instead of reading the same page over again. Fixes inability to remove directories that previously had many files in them.
svn path=/trunk/; revision=39889
2009-03-06 17:23:29 +00:00
Matthias Kupfer
1839fc66f1 - more improved version, reduced calls, allocate ressources if needed only
svn path=/trunk/; revision=39888
2009-03-06 16:47:44 +00:00
Ged Murphy
953536f72d Don't leak font objects
svn path=/trunk/; revision=39887
2009-03-05 22:31:11 +00:00
Johannes Anderwald
ab3175b141 - Setup winmm entries for wdmaud.drv if they dont exist yet
svn path=/trunk/; revision=39886
2009-03-05 14:40:14 +00:00
Johannes Anderwald
fed8d4f74d - Add wdmaud.drv to bootcd
svn path=/trunk/; revision=39885
2009-03-05 14:35:10 +00:00
Johannes Anderwald
92a0cd07ae - Implement Pin object functions
- Remove test sample function, as silverblade will implement those

svn path=/trunk/; revision=39884
2009-03-05 13:50:54 +00:00
Dmitry Chapyshev
0302c8f272 - Add more check of parametres in GetDIBits
svn path=/trunk/; revision=39882
2009-03-05 12:22:35 +00:00
Matthias Kupfer
31c097e8b6 - Change menu symbols drawing to marlett font.
svn path=/trunk/; revision=39881
2009-03-05 11:48:20 +00:00
Jeffrey Morlan
39d2af2432 Make CALL command do another round of %-variable substitutions.
svn path=/trunk/; revision=39879
2009-03-05 05:10:10 +00:00
Matthias Kupfer
ee68df6943 - Draw bullet for menu radio group with ellipse instead of pie.
- This is a better solution for issue #4193.
- The pie problem remains.

svn path=/trunk/; revision=39878
2009-03-04 22:16:25 +00:00
Johannes Anderwald
1ad6ef9eec - Start implementing kmixer
svn path=/trunk/; revision=39877
2009-03-04 21:13:10 +00:00
Aleksey Bragin
d6b8e5ff23 - Make TOKEN pointer in OBJECT_HEADER a fast reference, just like on Windows.
- Update SD cache code to treat it as such.
- Improves performance by 500% during security checks - noticeable impact during large file or registry transfer operations.

svn path=/trunk/; revision=39876
2009-03-04 20:58:32 +00:00
Gregor Brunmar
78cc4931af Added stubs for Direct3D 7, 8 and 9 tests in dxdiag.
svn path=/trunk/; revision=39875
2009-03-04 20:34:17 +00:00
Matthias Kupfer
3804c261a6 - modify hackfix DrawMenuBar function use user32 function instead of sending messages
- DefWndNCPaint needs to split up and some parts have to move to subsystems to provide the menu functions independent of window non-client drawing

svn path=/trunk/; revision=39874
2009-03-04 19:35:58 +00:00
Art Yerkes
ab0b3f0bd4 Using a lock inside a slab of memory to lock against moving the same memory
is definitely a bug.  This fixes it, but the intention of the previous code
might not be what I thought it was.  I won't be sad if this fix is reverted
and something else takes its place.

svn path=/trunk/; revision=39873
2009-03-04 17:03:06 +00:00
Matthias Kupfer
34e0264ab9 Evgeniy Boltik <bstsoft AT narod DOT ru>
- Fix crash in Eng function
- See issue #4173 for details.

svn path=/trunk/; revision=39872
2009-03-04 16:34:33 +00:00
Matthias Kupfer
89a210a96b Sascha Clausen <r4v3r AT hotmail DOT de>
- Draw bullet for menu radio group.
- See issue #4193 for details.

svn path=/trunk/; revision=39871
2009-03-04 16:29:57 +00:00
Matthias Kupfer
4ae3c614b0 Evgeniy Boltik <bstsoft AT narod DOT ru>
- Fix if param Brush == NULL.
- See issue #4220 for details.

svn path=/trunk/; revision=39870
2009-03-04 16:25:22 +00:00
Dmitry Chapyshev
b6d8ca9259 - Add GUIDs for msctf
svn path=/trunk/; revision=39869
2009-03-04 15:32:21 +00:00
Danny Götte
fffc530c28 * fix problems while selecting entries via dropdown
* fix update of user language in admin panel

svn path=/branches/danny-web/; revision=39868
2009-03-04 15:29:46 +00:00
Dmitry Chapyshev
f98dc905a0 - Sync crypt32, jscript, mapi32, mlang, msctf, msvcrt20, msvcrt40, msxml3, snmpapi, urlmon with Wine head
svn path=/trunk/; revision=39867
2009-03-04 15:29:32 +00:00
Dmitry Chapyshev
cc48677f8e - Sync spoolss with Wine head
- Fix winspool stubs

svn path=/trunk/; revision=39866
2009-03-04 15:24:06 +00:00
Dmitry Chapyshev
77943b12e7 - Fix header
svn path=/trunk/; revision=39865
2009-03-04 15:22:48 +00:00
Johannes Anderwald
e0a999407e - Import libsamplerate from http://www.mega-nerd.com/SRC/download.html
- It will be used for samplerate conversion in kmixer
- Thanks to blight for helping with asm
- Do not import medium / high quality coeffs (600KB / 8MB file size)

svn path=/trunk/; revision=39864
2009-03-04 14:58:14 +00:00
Aleksey Bragin
dffc4ed5a6 - Add first version of USB keyboard driver (limitations: no keyboard LEDs support, no repeated keypress support, right-side modifier keys not supported).
- Cleanup source code of USB mouse driver.

svn path=/trunk/; revision=39863
2009-03-04 13:40:22 +00:00
Jeffrey Morlan
5f17f63202 In the CRT, replaced __set_errno calls having Win32 error codes as their argument with _dosmaperr.
svn path=/trunk/; revision=39862
2009-03-04 07:39:44 +00:00
Jeffrey Morlan
6db382c056 A little cleanup of cmd.c:
- Remove bIsBatch variable, and just check for bc != NULL instead.
- Since Batch doesn't return until the batch file is finished, CMD /C no longer needs to call ProcessInput.
- Don't bother loading ntdll.dll on Windows 98; it doesn't export the functions we want to use from it.

svn path=/trunk/; revision=39861
2009-03-04 04:23:40 +00:00
Timo Kreuzer
d7f6c74d76 Bmfd: The cjGlyphMax field of the PFD_DEVICEMETRICS, the cjSize parameter of BmfdQueryFontData and it's return value all specify the size of the full GLYPHBITS structure, not only the glyph bitmap. Fixes problem of truncated Glyphs. Fix calculation of glyph handles. TODO: 90° rotation and integral scaling.
svn path=/trunk/; revision=39860
2009-03-04 00:46:32 +00:00
Aleksey Bragin
c712fa746c - Refactor Fast Reference implementation into a generic module with init/acquire/release/compare/insert interfaces, and update the executive callback & object manager referencing code to use it.
- Always capture fast reference values on the stack since a fast reference is by nature volatile.
- Based off earlier work from Alex to fix callback implementation.

svn path=/trunk/; revision=39859
2009-03-03 20:24:10 +00:00
Jeffrey Morlan
516e7fa09c Rework batch-file processing so that 'call file.bat' doesn't return until the file has finished, allowing constructs like 'call file.bat & somethingelse' to work properly.
svn path=/trunk/; revision=39858
2009-03-03 20:06:54 +00:00
Aleksey Bragin
c933e1c643 - Consider Pnp initialized after system drivers finished loading.
- Fix reinitialization routines callbacks: processing reinit callbacks after EVERY driver load, including boot drivers is wrong. The sequence should be init boot drivers, call boot drivers reinit routines, load pnp drivers, load system drivers, call reinit routines. And then, when Pnp is initialized, call reinit routines after every driver module load event.

svn path=/trunk/; revision=39857
2009-03-03 12:55:58 +00:00
Aleksey Bragin
b988d2bd3d - Move part of the 1st stage pnp hacks to kbdclass driver. Previously, the driver (i8042prt) relied on kbdclass's normal reinit routine being called BEFORE a registered boot reinit routine, which is certainly wrong on a real NT system.
- Now, the correct order is ensured, and it is not relying on a broken reinit calling order in ReactOS anymore.

svn path=/trunk/; revision=39856
2009-03-03 12:06:57 +00:00
Dmitry Chapyshev
35ad8f5e49 - Comment all actctx functions. They are not implemented also programs can work without them
svn path=/trunk/; revision=39855
2009-03-03 11:27:52 +00:00
Dmitry Chapyshev
a7aaab1dbd - Fix build
svn path=/trunk/; revision=39854
2009-03-03 11:05:42 +00:00
Dmitry Chapyshev
472ec17a2f - Sync ole32 and oleaut32 with Wine head
svn path=/trunk/; revision=39853
2009-03-03 09:12:43 +00:00
Dmitry Chapyshev
3909c139ee - Sync header
svn path=/trunk/; revision=39852
2009-03-03 09:12:03 +00:00
Dmitry Chapyshev
576b4e9bfd - Sync comdlg32 with Wine head
svn path=/trunk/; revision=39851
2009-03-03 09:10:25 +00:00
Dmitry Chapyshev
a7bbe6d2ec - Sync comctl32 with Wine head
svn path=/trunk/; revision=39850
2009-03-03 09:09:59 +00:00
Timo Kreuzer
f1aeddb982 Initial version of a gdi font driver for bitmap fonts (.fon / .fnt). It starts to work, but not yet correctly. Glyphs are truncated. Developed on Windows XP.
svn path=/trunk/; revision=39849
2009-03-03 02:42:00 +00:00
Jeffrey Morlan
eff51218fb Speed up batch file execution by reading a line at a time instead of a byte at a time.
svn path=/trunk/; revision=39848
2009-03-02 20:00:26 +00:00
Aleksey Bragin
642a549191 - Add privileges check to SystemTimeAdjustmentInformation SSI routine. Spotted by Dmitry Chapyshev.
svn path=/trunk/; revision=39847
2009-03-02 19:57:27 +00:00
Jeffrey Morlan
484ee2fa7e Separate batch file contexts and FOR contexts into two different structs, since they don't actually have anything in common any more
svn path=/trunk/; revision=39846
2009-03-02 19:08:25 +00:00
Dmitry Chapyshev
6b888f2d5b - Fix typo
svn path=/trunk/; revision=39844
2009-03-02 16:21:24 +00:00
Dmitry Chapyshev
bd718d68df - Add check of returned value for EnumDisplaySettings
svn path=/trunk/; revision=39843
2009-03-02 14:08:46 +00:00
Dmitry Chapyshev
8d143da0d2 - Add more known dlls
- Add to Path variable a directory wbem

svn path=/trunk/; revision=39842
2009-03-02 13:30:10 +00:00
Dmitry Chapyshev
8cbf61f0d3 - Get system color depth for application list
svn path=/trunk/; revision=39841
2009-03-02 12:46:53 +00:00
Dmitry Chapyshev
3ccbacec4d - Change themes fonts to Tahoma
svn path=/trunk/; revision=39840
2009-03-02 12:23:07 +00:00
James Tabor
7f9d753a27 - Add LanguagePack support to GetFontLanguageInfo.
svn path=/trunk/; revision=39839
2009-03-02 01:54:37 +00:00
Matthias Kupfer
78b88e1063 - Show the currently selected color scheme in combo box instead of default "Reactos Standard".
- The value HKCU\Control Panel\Apperance\(New)Current isn't used yet.
- See issue #4164 for details.

svn path=/trunk/; revision=39838
2009-03-01 22:55:02 +00:00
James Tabor
3c959e9093 - Implement GdiIsPlayMetafileDC.
svn path=/trunk/; revision=39837
2009-03-01 21:22:53 +00:00
Jeffrey Morlan
9ea64ffebb Fix BatchParams to handle unconventional spacing/quoting properly.
svn path=/trunk/; revision=39836
2009-03-01 20:25:13 +00:00
James Tabor
a784e30920 - Implement GdiIsMetaFileDC and GdiIsMetaPrintDC.
svn path=/trunk/; revision=39835
2009-03-01 19:37:52 +00:00
Jeffrey Morlan
e81627a11d In the DOSKEY command:
- Fix handling of spaces
- When reading from file, remove ending '\n'
- Don't convert macro name to lower case
- Disallow empty macro name or macro names containing spaces

svn path=/trunk/; revision=39834
2009-03-01 19:11:55 +00:00
Dmitry Chapyshev
7f9c2e8970 - Fix pictures icons
- Add data for .avi files

svn path=/trunk/; revision=39833
2009-03-01 18:05:07 +00:00
Andrew Greenwood
96037bb17d Don't enable sndblst.sys yet
svn path=/trunk/; revision=39832
2009-03-01 17:34:03 +00:00
Dmitry Chapyshev
337dbdadf1 - Fix dmo.h and mediaerr.h
svn path=/trunk/; revision=39831
2009-03-01 17:15:00 +00:00
Matthias Kupfer
6a5097f0bb Sascha Clausen <r4v3r AT hotmail DOT de>
- Set menu ID.
- See issue #2144 for details.

svn path=/trunk/; revision=39830
2009-03-01 16:12:34 +00:00
Stefan Ginsberg
6a56dca9a3 - Fix 37825 -- Yes, we shouldn't check if an unsigned value is larger than or equal to zero, so just fix the check instead of...commenting out the assertion.
svn path=/trunk/; revision=39829
2009-03-01 15:35:31 +00:00
Dmitry Chapyshev
d61a6ea982 - Remove duplicates
svn path=/trunk/; revision=39828
2009-03-01 14:31:31 +00:00
Johannes Anderwald
4b4d95da9c - Fix compilation of cmidriver
- Does not yet link

svn path=/trunk/; revision=39827
2009-03-01 14:29:57 +00:00
Dmitry Chapyshev
2eba686398 - Full path to mci*.dll is unneeded
- Add system.ini

svn path=/trunk/; revision=39826
2009-03-01 14:16:14 +00:00
Dmitry Chapyshev
9f32d9e704 - Add iccvid, imaadp32.acm, msadp32.acm, msg711.acm, msvidc32 from Wine
svn path=/trunk/; revision=39825
2009-03-01 13:42:09 +00:00
Johannes Anderwald
35c0dcde31 - Disable ASSERTMSG macro to fix compilation
- Fix definition of PCPROPERTY_REQUEST

svn path=/trunk/; revision=39824
2009-03-01 13:10:33 +00:00
Sylvain Petreolle
36586bfb83 Recode rosapps French files from UTF-8 to CP-1252.
svn path=/trunk/; revision=39823
2009-03-01 12:47:18 +00:00
Johannes Anderwald
730cfa49a0 - Add missing guids, interfaces, structs to get CMIDriver compile
svn path=/trunk/; revision=39822
2009-03-01 12:45:32 +00:00
Dmitry Chapyshev
832f03d77d - Add mciavi32, mcicda, mciqtz32, mciseq, mciwave from Wine
svn path=/trunk/; revision=39821
2009-03-01 11:54:06 +00:00
Dmitry Gorbachev
835d718621 Recode French files from UTF-8 to CP-1252.
svn path=/trunk/; revision=39820
2009-03-01 11:20:29 +00:00
Dmitry Gorbachev
f9ad0355df - Add missing strings to RC files, fix formatting. Mario Kacmar, bug #4211.
- Fix other translations in the same spirit.

svn path=/trunk/; revision=39819
2009-03-01 10:59:10 +00:00
Danny Götte
7084873d3f * readd group & acl deletion
* fix subsystem integration
* tooltip now does not hide, if changing the <td> element inside the same <tr>
* tooltip now hides, if editor is loaded
* generator now doesn't cache scripts
* show error message on login failure, instead of a white page

svn path=/branches/danny-web/; revision=39818
2009-02-28 23:47:12 +00:00
Jeffrey Morlan
ba3e9218c7 - FileGetString: Only end line on '\n', not on '\r'.
- Various improvements to ExpandAlias

svn path=/trunk/; revision=39817
2009-02-28 18:00:38 +00:00
Johannes Anderwald
69f81beb13 - Cleanup code a bit
svn path=/trunk/; revision=39816
2009-02-28 12:04:00 +00:00
Aleksey Bragin
09ce3c6e91 - If a driver has no Tag specified it should be defaulted to the max ULONG value, so it gets loaded after all drivers with correct tags. This fixes a problem of null.sys and beep.sys loading up to TagCount (20 for Base group) times during each boot.
svn path=/trunk/; revision=39815
2009-02-28 10:29:06 +00:00
James Tabor
fde70551ec - No code change, adding notes to header.
svn path=/trunk/; revision=39798
2009-02-28 04:41:52 +00:00
Andrew Greenwood
60a7be44dc Started new implementation of Sound Blaster driver (kernel mode), which
at present just looks at the settings in the registry (actual sound
blaster code to go in a dedicated library elsewhere for later reuse in
portcls.) Also updated wdmaud.drv - it can only identify how many devices
have been reported by janderwald's code at present.


svn path=/trunk/; revision=39797
2009-02-27 22:50:58 +00:00
Dmitry Gorbachev
36bf174662 Fix warning: implicit declaration of function 'VALID_SOUND_DEVICE_TYPE'
svn path=/trunk/; revision=39796
2009-02-27 21:46:59 +00:00
Jeffrey Morlan
9ed19ef909 Handle quotes in a CMD /C or CMD /K argument properly.
svn path=/trunk/; revision=39795
2009-02-27 18:09:33 +00:00
Dmitry Chapyshev
83f58a9337 - Add winetests for mscms, msvcrtd, quartz, secur32
svn path=/trunk/; revision=39794
2009-02-27 17:57:06 +00:00
Dmitry Chapyshev
bd5f91d815 - Add winetests for pdh, qmgr, rasapi32, serialui, snmpapi, spoolss, twain_32, userenv, wldap32
svn path=/trunk/; revision=39793
2009-02-27 17:32:07 +00:00
Dmitry Chapyshev
4c6d8cb1d8 - Add twain.h from Wine
svn path=/trunk/; revision=39792
2009-02-27 17:30:46 +00:00
Dmitry Chapyshev
3fa4b5dde4 - Add winetests for msctf, msvfw32, ntdsapi, ntprint, oleacc
svn path=/trunk/; revision=39791
2009-02-27 16:45:02 +00:00
Dmitry Chapyshev
06448880e7 - Add winetests for inetcomm, inetmib1, itss, localspl, localui
svn path=/trunk/; revision=39790
2009-02-27 16:23:50 +00:00
Dmitry Chapyshev
67c56404b6 - Add DNS_RRSET_INIT, DNS_RRSET_ADD, DNS_RRSET_TERMINATE
svn path=/trunk/; revision=39789
2009-02-27 15:59:01 +00:00
Dmitry Chapyshev
569bd394b8 - Add winetests for credui, cryptnet, cryptui, dnsapi, fusion
svn path=/trunk/; revision=39788
2009-02-27 15:57:39 +00:00
Dmitry Gorbachev
1f80c7f756 Japanese explorer-new translation by Pcds90net (ds200xnet-ros|at|yahoo|dot|co|dot|jp). Bug #4203.
svn path=/trunk/; revision=39787
2009-02-27 15:50:43 +00:00
Aleksey Bragin
a96493a8eb - Wait untill all usb embedded drivers are initialized before returning from DriverEntry. This allows usb mouse driver to have a chance to register itself before mouclass is loaded.
svn path=/trunk/; revision=39786
2009-02-27 15:29:54 +00:00
Danny Götte
4e10f75967 fix typo :)
no code change

svn path=/branches/danny-web/; revision=39785
2009-02-27 13:22:34 +00:00
Johannes Anderwald
f717c34ae1 - Add sanity checks
- Fix memory leaks

svn path=/trunk/; revision=39784
2009-02-27 13:19:10 +00:00
Johannes Anderwald
49c8f850cd - Implement enumerating devices for wave in devices
- Implement mapping virtual device id to real filter id and pin id
- Wdmaud can now select the correct pin

svn path=/trunk/; revision=39783
2009-02-27 12:22:18 +00:00
Johannes Anderwald
89797da903 - Complete missing irp
- Handle all properties of KSPROPSETID
- Initialize filter properties in a deferred routine
- Add more error checks

svn path=/trunk/; revision=39782
2009-02-27 11:22:16 +00:00
Johannes Anderwald
d74f376c18 - Ignore the failure of device interface registration as a audio might not have been initialized yet
svn path=/trunk/; revision=39781
2009-02-27 00:22:32 +00:00
Danny Götte
1fb2ecb399 * fix problem, where entries got the wrong contents
* fix delete button
* fix filter option
* if dynamic content is updated, only generate this entry and not all related dynamic pages
* simplify some code
* delete entries if all their revisions are deleted
* if we add a new dynamic content, add dependency to the related dynamic page
* reapply standard metadata for dynamic contents again (was broken)
* process correct content while genertion of dynamic pages
* fix handling of entry type correct while updating
* fix problem with broken caching
* implement comments into roscms [#*comment text*] where [#* is start sequence and *] the end sequence
* get correct file extension from tag, instead of just using 'html', if using [#roscms_filename]

svn path=/branches/danny-web/; revision=39780
2009-02-26 23:41:36 +00:00
Dmitry Gorbachev
a47d006bd7 Add GetListBoxInfo()
svn path=/trunk/; revision=39779
2009-02-26 23:32:52 +00:00
Johannes Anderwald
b5cdd80eb5 - Disable checking of nonactive device interface because the code is not working yet (IoSetDeviceInterfaceState requires more work)
svn path=/trunk/; revision=39777
2009-02-26 20:36:56 +00:00
Johannes Anderwald
be75d0f7aa - Change service type of RosAudioSrv to automatically start when an audio adapter is installed
- Also start RosAudioSrv

svn path=/trunk/; revision=39776
2009-02-26 19:15:35 +00:00
Johannes Anderwald
586e8ccb95 - Start automatically sysaudio / wdmaud when audiosrv is started
svn path=/trunk/; revision=39775
2009-02-26 18:29:15 +00:00
Johannes Anderwald
61efbfa491 - Implement CMP_RegisterNotification stubs
- Fixes audiosrv crash

svn path=/trunk/; revision=39774
2009-02-26 17:46:41 +00:00
Dmitry Chapyshev
7183be3ead - Sync winetests with Wine head (comcat, crypt32, gdiplus, lz32, mapi32, mlang, msacm32, mshtml, msvcrt, netapi32, riched20, riched32, rsaenh, schannel, setupapi, shdocvw, urlmon, user32, usp10, uxtheme, version, winhttp, wininet, wintrust, ws2_32)
svn path=/trunk/; revision=39773
2009-02-26 13:26:26 +00:00
Dmitry Chapyshev
6069429da7 - Update headers
svn path=/trunk/; revision=39772
2009-02-26 13:22:05 +00:00
Aleksey Bragin
493259d7d4 - Rename a variable so it doesn't conflict with a reserved keyword.
svn path=/trunk/; revision=39771
2009-02-26 13:19:34 +00:00
Aleksey Bragin
22fa5a4f23 - Actually advance current item pointer to the next one when traversing a linked list. Fixes an infinite loop when building USB interface.
svn path=/trunk/; revision=39770
2009-02-26 13:14:46 +00:00
Dmitry Chapyshev
0f11de6b0d - Add msctf from Wine
svn path=/trunk/; revision=39769
2009-02-26 11:43:42 +00:00
Christoph von Wittich
9461e682d1 partially revert the mshtml sync as it breaks gecko installation
svn path=/trunk/; revision=39768
2009-02-26 11:33:04 +00:00
Dmitry Chapyshev
9bbe0fef07 - Update Russian translation
svn path=/trunk/; revision=39767
2009-02-26 10:36:26 +00:00
Dmitry Chapyshev
bb65c52303 - Sync itss, mlang with Wine head
svn path=/trunk/; revision=39766
2009-02-26 10:34:15 +00:00
Dmitry Chapyshev
8dd9b00120 - Sync objsel, ntprint, netapi32, mshtml with Wine head
svn path=/trunk/; revision=39765
2009-02-26 10:32:48 +00:00
Dmitry Chapyshev
fac8159392 - Sync rsaenh, shdocvw, shlwapi with Wine head
svn path=/trunk/; revision=39764
2009-02-26 10:29:58 +00:00
Dmitry Chapyshev
a96dc753be - Sync wldap32, uxtheme, sxs with Wine head
svn path=/trunk/; revision=39763
2009-02-26 10:27:27 +00:00
Dmitry Chapyshev
86b4bf9764 - Delete unneeded file
svn path=/trunk/; revision=39762
2009-02-26 10:24:39 +00:00
Dmitry Chapyshev
b0aef63d27 - Sync gdiplus, hhctrl and inetcomm with Wine head
svn path=/trunk/; revision=39761
2009-02-26 10:24:00 +00:00
Dmitry Chapyshev
81ccdcd42b - Sync crypt32 and cryptui with Wine head
svn path=/trunk/; revision=39760
2009-02-26 10:21:59 +00:00
Dmitry Chapyshev
b6bab62a3b - Sync atl and cabinet with Wine head
svn path=/trunk/; revision=39759
2009-02-26 10:20:22 +00:00
Johannes Anderwald
be3c2ddc31 - Fix wdmaud / sysaudio service installation when a driver is installed
svn path=/trunk/; revision=39758
2009-02-26 00:04:26 +00:00
Johannes Anderwald
5f60162daa - Refactor irp handling to support playing new stream irps properly
- Complete several irps to allow audio devices to be shutdown properly and re-used

svn path=/trunk/; revision=39757
2009-02-25 22:30:20 +00:00
Pierre Schweitzer
1675e01073 Mini optimalisation of RtlGenerate8dot3Name.
Patch by Peter Veenstra 
See issue #4152 for more details.

svn path=/trunk/; revision=39756
2009-02-25 22:30:17 +00:00
Aleksey Bragin
d8b00f839d - Scan three PCI buses in the legacy USB driver instead of 2. Fixes UHCI/EHCI detection issues in VMWare Workstation 6.5 and higher (Emulated UHCI is located on bus 2).
svn path=/trunk/; revision=39755
2009-02-25 20:37:50 +00:00
Aleksey Bragin
419e45a723 - Fix a horrible bug, when DriverEntry was not having __stdcall calling convention.
svn path=/trunk/; revision=39754
2009-02-25 16:00:38 +00:00
Johannes Anderwald
866d5ef497 - Fix a bug in the audio_test programm which initialized the deviceinfo before another syscall
- Complete also an unhandeled irp
- Implement IOCTL_CLOSE_WDMAUD
- Account the number of times pin can be instantiated in sysaudio and apply changes to SYSAUDIO_CLIENT structure
- There is still a bug which prevents closing the audio adapter at the 2nd time

svn path=/trunk/; revision=39753
2009-02-25 15:55:21 +00:00
Dmitry Chapyshev
a15e6fe4ad - Fix build. Sorry
svn path=/trunk/; revision=39752
2009-02-25 15:54:37 +00:00
Dmitry Chapyshev
eaa65d2024 - Add inseng, localspl, wuapi from Wine
svn path=/trunk/; revision=39751
2009-02-25 15:26:49 +00:00
Dmitry Chapyshev
c7826cae81 - Sync spoolss with Wine head
svn path=/trunk/; revision=39750
2009-02-25 14:10:21 +00:00
Andrew Greenwood
ef5347287b Set svn:eol-style native on ntstrsafe.h
svn path=/trunk/; revision=39749
2009-02-25 13:07:00 +00:00
Stefan Ginsberg
3268f920af - Minor optimization to ExFreePoolWithTag -- also reformat slightly.
svn path=/trunk/; revision=39748
2009-02-25 13:05:05 +00:00
Aleksey Bragin
337400aaa8 - Don't match tags if Tag is 0.
svn path=/trunk/; revision=39747
2009-02-25 12:50:41 +00:00
Aleksey Bragin
228454149b Alex Vlasov
- blockdev.c: Implement misc helper functions.
- direntry.c: Some changes to query dirents info for IRP_MJ_DIRECTORY_CONTROL, and the routine that locates a single dirent for IRP_MJ_CREATE.
- fastfat.c: Implement queuing support (FatQueueRequest / FatDequeueRequest).
- fat.c: Cleanup, use helper functions FatPin*Page.
- fcb.c: Add FCB helper routines.
- Header files: Change structures for future usage.
- Add PSEH2 library usage.

svn path=/trunk/; revision=39746
2009-02-25 12:25:06 +00:00
Johannes Anderwald
bc97ce2e19 - Remove sb16 driver entry
svn path=/trunk/; revision=39745
2009-02-25 09:29:13 +00:00
Andrew Greenwood
7736e500c5 Move sb16_nt4 and sndblst out of the way in preparation of a decent rewrite.
I made both of these, they are both incomplete. Neither are included in the
build at present. They'll be removed eventually, once I've finished on the
new version.


svn path=/trunk/; revision=39744
2009-02-25 09:10:46 +00:00
Jeffrey Morlan
b18a547c1b Implement complete support for FOR command (including /D, /F, /L, and /R switches). cmd is now close to being able to run RosBE 1.3's initialization without errors.
svn path=/trunk/; revision=39742
2009-02-24 20:29:18 +00:00
Johannes Anderwald
93ce0dce1f - Fix enumerating of KSDATARANGES
- Increment pin instance count when a new pin is created
- Complete IRP on close request for filter 
- Make sure IRP Status block is set when completing played stream IRP 
- Silence debug prints
- Enumerating number of channels and data formats should now work

svn path=/trunk/; revision=39740
2009-02-24 18:38:39 +00:00
Johannes Anderwald
8f47f51547 - Explictly use unicode structures
svn path=/trunk/; revision=39739
2009-02-24 18:05:07 +00:00
Aleksey Bragin
8e3ad1d1df - Make SystemProcessInformation return required size if buffer is too small. Matches Windows XP behavior.
See issue #4087 for more details.

svn path=/trunk/; revision=39738
2009-02-24 14:02:39 +00:00
Aleksey Bragin
98d1576628 - If looking up a long name for a process failed, use short one. This fixes the issue with "System" not being displayed correctly.
- Round up process name length more correctly, as suggested by Evgeniy Boltik.
See issue #4087 for more details.

svn path=/trunk/; revision=39737
2009-02-24 11:34:08 +00:00
Aleksey Bragin
d06192c7c9 - Fix freed memory usage in SeLocateProcessImageName, spotted by Jan Roeloffzen.
- Use a correct structure member in SeAuditProcessCreationInfo (but it's still the same pointer).
- Rewrite bottom part of the function to better match ReactOS coding style.
See issue #4087 for more details.

svn path=/trunk/; revision=39736
2009-02-24 11:06:13 +00:00
Dmitry Chapyshev
3eb45a8114 - Sync Tahoma fonts with Wine head
svn path=/trunk/; revision=39735
2009-02-24 11:04:53 +00:00
Dmitry Chapyshev
cc3e2f3f75 - Add mscms, msftedit, msrle32 from Wine
svn path=/trunk/; revision=39734
2009-02-24 09:59:50 +00:00
Stefan Ginsberg
8294273359 - Fix an assembler warning on release build
svn path=/trunk/; revision=39733
2009-02-24 00:48:11 +00:00
Timo Kreuzer
8fd740df04 Add DbgPrint stub. Fixes release build of setupldr.
svn path=/trunk/; revision=39732
2009-02-24 00:21:08 +00:00
Johannes Anderwald
cfbea3776e - Fix release build
- Complete irps which were forgotten

svn path=/trunk/; revision=39731
2009-02-23 23:24:58 +00:00
Stefan Ginsberg
49d00ffaaa - Fix another issue with Portcls release build -- move an assignment outside ASSERT, and ASSERTify the return value by using a local variable
svn path=/trunk/; revision=39730
2009-02-23 22:40:53 +00:00
Stefan Ginsberg
dcc1744ad9 - Fix Portcls release build by putting a variable inside a DBG #define as it is only used in an ASSERT()
svn path=/trunk/; revision=39729
2009-02-23 22:19:58 +00:00
Johannes Anderwald
4c08a87ceb - Set a completion routine for irps send to lower devices by KsSynchronousIoControlDevice
- Fix a bug in PcPropertyHandler
- Implement more aspects of IOCTL_GETCAPABILITIES

svn path=/trunk/; revision=39728
2009-02-23 21:51:41 +00:00
Dmitry Gorbachev
dfb4c51505 Fix compilation of wdmaud.sys
svn path=/trunk/; revision=39726
2009-02-23 14:42:13 +00:00
Dmitry Gorbachev
39deec0a24 Fix mmsystem.h
svn path=/trunk/; revision=39725
2009-02-23 13:54:05 +00:00
Dmitry Gorbachev
4a4536189b Trying to fix r39718, r39719...
svn path=/trunk/; revision=39724
2009-02-23 13:40:50 +00:00
Dmitry Gorbachev
f8a9311089 Remove a hack from KiTrap14. Put a hack in other place.
svn path=/trunk/; revision=39723
2009-02-23 13:18:28 +00:00
Dmitry Gorbachev
4bd719527f - Reenable ACPI, it works now. Patch by Cameron Gutman. Bug #3363.
- But disable ACPIEnumerateDevices().

svn path=/trunk/; revision=39722
2009-02-23 13:17:48 +00:00
Dmitry Gorbachev
9b42ebfbcc Call IopEnumerateDevice() later, after IopCreateArcNames().
svn path=/trunk/; revision=39721
2009-02-23 13:17:07 +00:00
Dmitry Gorbachev
50ee6815d3 Allow shared interrupts.
svn path=/trunk/; revision=39720
2009-02-23 13:16:43 +00:00
Johannes Anderwald
cb2ab2abe6 - Extend test prog for quering capabilities
- Store PCFILTER in subdevice filter
- Call driver provided property request handlers
- partly implement waveout get capabilties (WIP)
- remove definitions for waveoutcaps, auxcaps, waveincaps, they are defined in mmsystem.h

svn path=/trunk/; revision=39719
2009-02-23 11:13:35 +00:00
Johannes Anderwald
2bf896ebe5 - Add KSDATARANGE_AUDIO
- Fix prototype for waveOutOpen, waveInOpen

svn path=/trunk/; revision=39718
2009-02-23 11:09:32 +00:00
Andrew Greenwood
63a2507150 Added GETDEVCAPS support for MIDI, mixer and aux devices, within MME Buddy
and sndblst.dll - this just lets you see the device names etc. but adds
no extra functionality apart from this.


svn path=/trunk/; revision=39717
2009-02-22 22:31:26 +00:00
Andrew Greenwood
141ec3a682 Closing of wave output devices is functional and terminates the sound thread
cleanly. Started writing code to support pause/restart (nonfunctional yet.)
Stubbed mixer messages, added a readme.txt to give an overview of functions
supported. Also includes partial rewrite of wdmaud.drv. Currently I am
listening to DI.FM in ReactOS using an NT4 sndblst.sys along with ReactOS'
sndblst.dll


svn path=/trunk/; revision=39716
2009-02-22 21:14:54 +00:00
Johannes Anderwald
0fb477e07a - Implement a common property handler for filter property requests
- Always queue a work item for pin creation requests
- Handle KSPROPERTY_PIN_DATAFLOW, KSPROPERTY_PIN_DATARANGES, KSPROPERTY_PIN_INTERFACES, KSPROPERTY_PIN_MEDIUMS, KSPROPERTY_PIN_COMMUNICATION, KSPROPERTY_PIN_CATEGORY,  qKSPROPERTY_PIN_NAME, KSPROPERTY_PIN_GLOBALCINSTANCES, KSPROPERTY_PIN_CINSTANCES, KSPROPERTY_PIN_NECESSARYINSTANCES
- Fix several bugs in property copying code
- Change the pin creation path in sysaudio in order to have client information as this was previously not available (see DPRINT using hack)
- Close file handels in wdmaud / sysaudio
- set Iostatus before queing an irp as the irp might complete before accessing status io 

svn path=/trunk/; revision=39715
2009-02-22 18:58:51 +00:00
Dmitry Chapyshev
2e5444f855 - Add snmpapi from Wine
svn path=/trunk/; revision=39714
2009-02-22 14:21:45 +00:00
Sylvain Petreolle
3163354a38 add missing \n in traces
svn path=/trunk/; revision=39713
2009-02-22 14:07:18 +00:00
James Tabor
e528cdb9d0 - Patch by Evgeniy Boltik: Fixes HatchBrushes, see bug 4107.
svn path=/trunk/; revision=39712
2009-02-22 14:04:31 +00:00
Dmitry Chapyshev
860749b5f3 - pSetupGetFileTitle calling MyGetFileTitle
svn path=/trunk/; revision=39711
2009-02-22 13:54:51 +00:00
Dmitry Chapyshev
fe13378775 - Add CheckTokenMembership to winbase.h
- Use CheckTokenMembership in IsUserAdmin

svn path=/trunk/; revision=39710
2009-02-22 13:39:21 +00:00
Dmitry Chapyshev
485eae5524 - Don't direct call IsUserAnAdmin (setupapi in Windows not linked with shell32)
- Implement IsUserAdmin in setupapi (based on shell32 implementation)
- Implement pSetupIsUserAdmin

svn path=/trunk/; revision=39709
2009-02-22 12:49:18 +00:00
Dmitry Chapyshev
9660c296f2 - List of exported functions like Win2003 SP1
svn path=/trunk/; revision=39708
2009-02-22 12:20:43 +00:00
James Tabor
8c751eddbf - Add back removed call commented out. First problem I see with this patch, where is the check for child window? Second, this should be fixed in kernel space not in user32 and separate the kernel function from NtUserCallHwndLock and make a standalone one for win32k. With in this year ROSMENUINFO is going away and is deprecated. New structures will be made available soon.
svn path=/trunk/; revision=39707
2009-02-22 00:32:59 +00:00
Daniel Reimer
728f7321fe Our mshtml uses Wine Gecko 0.9.1
svn path=/trunk/; revision=39706
2009-02-21 23:50:13 +00:00
Matthias Kupfer
c5dfe0ed6f revert hackfix (revision 39704)
svn path=/trunk/; revision=39705
2009-02-21 22:50:49 +00:00
Matthias Kupfer
0ef3ed3fb1 Evgeniy Boltik <bstsoft AT narod DOT ru>
Jan Roeloffzen <jroeloffzen AT hotmail DOT com>
- Fixes task manager process list names and kernel sysinfo.
- See issue #4087 for details.

svn path=/trunk/; revision=39704
2009-02-21 22:41:14 +00:00
Matthias Kupfer
166f97fa19 - implements an initial DrawMenuBar function (fixes the taskbar menu redraw bug)
- sorry, may contain a potentially hackfix (SendMessage WM_NCPAINT)

svn path=/trunk/; revision=39703
2009-02-21 22:35:11 +00:00
Johannes Anderwald
b94b97a10e - Fix a bug in KsAllocateDeviceHeader which copied the create item to the wrong offset
- Set Created status to true when create function is not zero
- Partly implement KsStreamIo
- Implement IOCTL for opening / setting state and writing wave data
- Clear KSAUDIO_DEVICE_ENTRY
- Open the pin in a worker context as IoCreateFile must be called at APC_LEVEL <
- Add dispatcher object to sysaudio will dispatch the device requests to the real pin
- Add a test application to play a wav sound
- ReactOS can now play a wave tone

svn path=/trunk/; revision=39702
2009-02-21 20:18:44 +00:00
Johannes Anderwald
b997856046 - Add macros for KsStreamIo
svn path=/trunk/; revision=39701
2009-02-21 20:10:21 +00:00
Jeffrey Morlan
a4da9945e8 Clean up DirReadParam a bit, reworked so that the code for adding a filename parameter doesn't need to be duplicated 3 times. Should handle quotes properly now (bug 4177)
svn path=/trunk/; revision=39699
2009-02-21 18:12:16 +00:00
Colin Finck
a98eb8d135 Add a /c option to supply a comment for the web service submission.
This can be useful for giving more information about the used build for the test.

The necessary changes in testman will follow later :-P

svn path=/trunk/; revision=39698
2009-02-21 17:02:39 +00:00
Aleksey Bragin
f808139835 - Fix typos in the header.
svn path=/trunk/; revision=39697
2009-02-21 16:33:27 +00:00
Matthias Kupfer
cf5f8cd8f8 use default font for columns
svn path=/trunk/; revision=39696
2009-02-20 21:31:31 +00:00
Matthias Kupfer
b11277de45 - Remove last app(s) from list if there is no application running anymore.
- See issue #4182 for more details.

svn path=/trunk/; revision=39695
2009-02-20 18:03:21 +00:00
Johannes Anderwald
82bba6cd0c - Implement enumerating sysaudio devices using device interface or using static symbolic link(hack)
- Implement a few options of sysaudio property set
- Implement an object dispatcher like in portcls which will be used to forward requests



svn path=/trunk/; revision=39694
2009-02-20 17:52:47 +00:00
Johannes Anderwald
31877406c6 - Fix property sets for sysaudio
svn path=/trunk/; revision=39693
2009-02-20 14:50:26 +00:00
Matthias Kupfer
805222fc0b disable useless or wrong message handling (WM_PAINT + WM_NCPAINT)
svn path=/trunk/; revision=39692
2009-02-20 14:22:15 +00:00
Matthias Kupfer
2b07dff4da parent window hight doesn't affect status window hight
svn path=/trunk/; revision=39691
2009-02-20 11:12:47 +00:00
James Tabor
213ba8f33f Patch by Rein Klazes: Do not handle WM_ENDSESSION in DefWinProc().
svn path=/trunk/; revision=39688
2009-02-19 22:51:47 +00:00
Art Yerkes
47cb22722f - Our code was a bit confused about close vs cleanup irps in tcpip. We now
interpret and implement them both properly, preparing for close in cleanup
   then actually deallocating in close.
 - AFD should have been keeping extra references to TCP resources, because 
   the handles will be closed by the handle sweeper at process shutdown.
 - Fix failure cases for pendable TCP requests and add SEL_FIN when a socket
   is closed at oskit, but closing up at tcpip.sys.
 - Fix some breakage from my previous commit re: bind the zero address.  We 
   now ask the connection for the right address if we are one, and plumb 
   the request all the way to tcp, which is deciding what adapter to send to
   anyway.
 - Fix one error code in udp, properly reporting network unreachable.

svn path=/trunk/; revision=39687
2009-02-19 20:14:39 +00:00
Art Yerkes
6de6188c1a Reformat. No changes (yet). Preemptive strike.
svn path=/trunk/; revision=39686
2009-02-19 19:41:06 +00:00
Danny Götte
e374619a6f * make it possible to run roscms in single language mode
* rewrote general index.php to use current roscms libs

svn path=/branches/danny-web/; revision=39685
2009-02-19 16:10:56 +00:00
Aleksey Bragin
16df5c0cb7 - Properly free a buffer allocated during "copy" command. Fixes cmd.exe crash when copy operation experiences a write error or is being interrupted with a Ctrl+C keypress.
svn path=/trunk/; revision=39684
2009-02-19 12:51:57 +00:00
Christoph von Wittich
c52fd56034 sync urlmon with wine 1.1.15
svn path=/trunk/; revision=39683
2009-02-19 12:24:43 +00:00
Christoph von Wittich
6d30abc416 get rid of another ros.diff
http://www.winehq.org/pipermail/wine-patches/2009-February/069627.html

svn path=/trunk/; revision=39682
2009-02-19 12:20:16 +00:00
Dmitry Gorbachev
e884b38e1f Change page file PTE format to distinguish paged out pages from
noaccess pages. It fixes kernel crash at the end of Sun JRE setup.

svn path=/trunk/; revision=39681
2009-02-19 11:47:34 +00:00
Matthias Kupfer
4f7122ff29 - initial default message handler for WM_SYSCOLORCHANGE messages
svn path=/trunk/; revision=39680
2009-02-19 11:43:26 +00:00
Daniel Reimer
daec6ac09d Sync winfile and write to Wine HEAD
svn path=/trunk/; revision=39679
2009-02-19 10:09:34 +00:00
Daniel Reimer
51009e3fec Sync xcopy, winhlp32 and wordpad to Wine HEAD.
svn path=/trunk/; revision=39678
2009-02-19 10:09:19 +00:00
Danny Götte
230d74742e * removed templates (functionality is moved into contents)
* add new tab for help (just empty for now)
* remove quickinfo and replace it with a tooltip
* move legend into the blue box and make it foldable
* replace buttons with a toolbar
* combine select links into a dropdown
* replace old user search with a new filter based version
* save user search filters (like smart filter)
* unify basic layout
* move account update functions to ROSUser class
* show selectable entries in admin interface as table instead of dropdown
* use same table colors as in the website tab
* reduce number of filters in website (most for admins)
* some css cleanup
* general improvements on the frontend
- thanks to d0g for providing ideas, phlox, d0g, colin for testing

svn path=/branches/danny-web/; revision=39677
2009-02-19 09:44:35 +00:00
Matthias Kupfer
6a1cf39948 Evgeniy Boltik <bstsoft AT narod DOT ru>
- Fix for mouse cursor in 256 color mode.
- See issue #4172 for details.

svn path=/trunk/; revision=39676
2009-02-19 09:18:27 +00:00
Johannes Anderwald
aa52ca9057 - If the current irp buffer is finished, set the state to pause (fixes looping of last sample)
- Use KeSetTimer if Irql is below equal DISPATCH_LEVEL

svn path=/trunk/; revision=39675
2009-02-19 05:48:51 +00:00
Johannes Anderwald
f5cfdeec77 - Implement writing into cyclic buffer
- Implement queuing write requests
- Use KeInsertQueueDpc over KeSetTimer in IServiceGroup_fnRequestDelayedService
- Playing an irp sound buffer now basically works. However the last sample is always repeated(w/o irp buffer bounds checking playing works normally but bsod occurs due to reading out of bounds)

svn path=/trunk/; revision=39674
2009-02-19 05:19:08 +00:00
Johannes Anderwald
9db4f23783 - Implement KsAddIrpToCancelableQueue and KsRemoveIrpFromCancelableQueue
svn path=/trunk/; revision=39673
2009-02-19 01:11:59 +00:00
Johannes Anderwald
357d5e75b9 - Fix build
svn path=/trunk/; revision=39672
2009-02-19 00:47:00 +00:00
Johannes Anderwald
c50d26f16b - Implement KSPROPERTY_CONNECTION_STATE & KSPROPERTY_CONNECTION_FORMAT for property set KSPROPSETID_Connection
- Queue a work item when Irql is above dispatch level
- Open the input / output stream when initializing the pin

svn path=/trunk/; revision=39671
2009-02-18 23:27:10 +00:00
Andrew Greenwood
cbac26c676 Rewrite DoWaveStreaming (makes CommitWaveHeaderToKernelDevice redundant).
Tested with Media Player and NT's Sound Blaster 16 kernel-mode driver on
Windows NT4. Audio buffers play correctly and don't suffer from the
stuttering problem that my previous revision of this code did.


svn path=/trunk/; revision=39669
2009-02-18 21:26:28 +00:00
Johannes Anderwald
b25be07add - Fix implementation of KsAddObjectCreateItemToDeviceHeader
- Hackplement KsAllocateObjectCreateItem
- Fix implementation of KsAllocateObjectHeader and store the result either in the passed irp or device header
- Implement Reading / Writing / DeviceIoControl / Flush / QuerySecurity / SetSecurity operation using the object file header
- Implement KsSynchronousIoControlDevice function

svn path=/trunk/; revision=39668
2009-02-18 20:05:33 +00:00
Andrew Greenwood
87dcb169be Removed hooks for prepare/unprepare/stream of WAVEHDR. These are handled
internally by MME-Buddy. Instead, it simply provides a hook to do the
actual streaming, complete with an OVERLAPPED structure and I/O completion
routine. Also started imlpementation of wdmaud.drv to begin interaction
with code janderwald is working on.


svn path=/trunk/; revision=39667
2009-02-18 19:10:02 +00:00
Johannes Anderwald
c15dfd0010 - fix build
svn path=/trunk/; revision=39666
2009-02-18 18:01:28 +00:00
Johannes Anderwald
bf46ba126d - Set DEVICE_DESCRIPTION to version1
- Fix interface definition of ISubDevice
- Add missing Init function for IPortFilterWaveCyclic and call it from IPortWaveCyclic
- Add GUIDs for property set of Pin and Topology
- Remove DISPATCH_TABLE from IPortTopology
- Rewrite PcCreateItemDispatch to support pin creation requests
- Add Property handler to IPortWaveCyclic (not yet used)
- Make IPortFilterWaveCyclic singleton
- Implement Adding property handlers to SUBDEVICE_DESCRIPTOR

svn path=/trunk/; revision=39665
2009-02-18 18:00:08 +00:00
Johannes Anderwald
e042f2fb7a - Fix KSOBJECT_CREATE struct
- Add KSNAME_Pin

svn path=/trunk/; revision=39664
2009-02-18 17:59:30 +00:00
Aleksey Bragin
a4718924aa - Fix for Bug 703.
- ReactOS can now be installed on systems with as little as 24MB. Memory usage after boot is down by 20-30MB. Application installations will use/require/leak less memory.
- Patch by Alex Ionescu.
See issue #703 for more details.

svn path=/trunk/; revision=39663
2009-02-18 16:56:42 +00:00
Aleksey Bragin
cac6a6eb40 - Display memory usage in the installer as Kernel Cache and Kernel Pool, instead of Paged and Nonpaged Pool, which doesn't reveal the source of the memory leak.
- Remove 40% memory delay hack.
- Patch by Alex Ionescu.

svn path=/trunk/; revision=39662
2009-02-18 16:35:14 +00:00
Dmitry Chapyshev
0ab8c3090f - Formatting fix. No code changes
svn path=/trunk/; revision=39661
2009-02-18 16:34:10 +00:00
Matthias Kupfer
43f6797ed2 - use current appearance settings for drawing the color button
svn path=/trunk/; revision=39660
2009-02-18 16:28:00 +00:00
Stefan Ginsberg
be1265e3f8 - Fix freeldr release build breakage from 39638 by correcting non-debug DPRINTM, and wrap some debug code inside a DBG to silence a 'unused variable' warning
svn path=/trunk/; revision=39659
2009-02-18 15:15:37 +00:00
Aleksey Bragin
59924db62f - Turn on multi-character constants support in GCC. Makes TAG macro usage redundant.
svn path=/trunk/; revision=39658
2009-02-18 14:51:07 +00:00
Dmitry Chapyshev
bd6c020071 - Formatting fix. No code changes
svn path=/trunk/; revision=39657
2009-02-18 14:30:44 +00:00
Dmitry Chapyshev
10d8c3ec04 - Add sti.dll from Wine
svn path=/trunk/; revision=39656
2009-02-18 08:01:23 +00:00
Timo Kreuzer
beab8fa0dc Fix formatting, no code change
svn path=/trunk/; revision=39655
2009-02-18 03:07:20 +00:00
Timo Kreuzer
8d0e6f5f04 co_IntCallHookProc: Don't dereference the ResultPointer returned from KeUserModeCallback and then probe the LRESULT cast to PVOID, but probe the ResultPointer. Fixes bug #4114
See issue #4114 for more details.

svn path=/trunk/; revision=39654
2009-02-17 21:28:22 +00:00
Timo Kreuzer
347f002369 fix formatting 2nd try. Thanks Hervé for noticing.
svn path=/trunk/; revision=39653
2009-02-17 20:13:57 +00:00
Matthias Kupfer
d0948aebdb - fix icon for 32bpp mode
svn path=/trunk/; revision=39652
2009-02-17 19:40:40 +00:00
Matthias Kupfer
422a3f3182 - fix typo (no code change)
svn path=/trunk/; revision=39651
2009-02-17 19:38:05 +00:00
Johannes Anderwald
26f9765e9c - Start implementing KsValidateConnectRequest
- Pass OBJ_OPENIF flag to KspCreateObjectType
- KsCreatePin works now

svn path=/trunk/; revision=39650
2009-02-17 19:30:40 +00:00
Dmitry Gorbachev
3b2c9f5d55 Add Hungarian keyboard layout to registry, add a few languages.
svn path=/trunk/; revision=39649
2009-02-17 10:21:48 +00:00
Aleksey Bragin
49ee60f141 - Return full process image names in SystemProcessInformation when possible, instead of limiting to 32 bytes. Based on a patch by Evgeniy Boltik. WIP.
See issue #4087 for more details.

svn path=/trunk/; revision=39648
2009-02-17 09:35:01 +00:00
Dmitry Gorbachev
87a2b33aea Fix spelling.
svn path=/trunk/; revision=39647
2009-02-17 07:25:46 +00:00
Dmitry Gorbachev
34bc2ac202 Attempt to make alphabetical order in input, Mario Kacmar, bug #4167.
svn path=/trunk/; revision=39646
2009-02-17 07:24:12 +00:00
Dmitry Gorbachev
b103cc2df8 GCC: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~'.
svn path=/trunk/; revision=39645
2009-02-17 07:11:57 +00:00
Steven Edwards
e918fe5822 add telnetd to the cd
svn path=/trunk/; revision=39644
2009-02-17 07:07:18 +00:00
Steven Edwards
f3795555d3 hardcode c:\reactos\system32\cmd.exe for now
svn path=/trunk/; revision=39643
2009-02-17 07:06:45 +00:00
Johannes Anderwald
59cb16455f - Fix KSP_NODE struct and build
svn path=/trunk/; revision=39642
2009-02-17 05:28:28 +00:00
Johannes Anderwald
0fa0461cc6 - Implement KsTopologyPropertyHandler
svn path=/trunk/; revision=39640
2009-02-17 04:52:11 +00:00
Timo Kreuzer
1401814d97 Merge freeldr from amd64 branch:
34725, 34726, 34727, 34728, 34733, 34735, 34747, 34748, 34888, 34937, 34968, 35021, 35351, 35360, 35445, 35493, 35495, 35505, 35547, 35696, 35704, 36343, 36355, 36865, 37306, 37896, 38332, 38942, 38950, 38951, 38959, 39073, 39278

svn path=/trunk/; revision=39638
2009-02-17 04:05:26 +00:00
Timo Kreuzer
6e548b6a21 fix formatting
svn path=/trunk/; revision=39637
2009-02-17 03:57:45 +00:00
Timo Kreuzer
d90c846eed Implement RtlInterlockedPopEntrySList, RtlInterlockedPushEntrySList and RtlInterlockedFlushSList in assembly. Based on the ExInterlocked functions in ntoskrnl.
svn path=/trunk/; revision=39636
2009-02-17 03:45:27 +00:00
Johannes Anderwald
65920de80b - Implement KsPinDataIntersection
svn path=/trunk/; revision=39635
2009-02-17 03:43:25 +00:00
Johannes Anderwald
73ed4fa6a9 - Fix intersect handlers
svn path=/trunk/; revision=39634
2009-02-17 03:42:33 +00:00
Johannes Anderwald
7f8d4df605 - Implement KsPinPropertyHandler
svn path=/trunk/; revision=39633
2009-02-17 03:07:30 +00:00
Johannes Anderwald
cf316da120 - Fix build
svn path=/trunk/; revision=39632
2009-02-17 00:39:40 +00:00
Johannes Anderwald
6e2d8b3b74 - Add a few structs which are required of ks property handling
svn path=/trunk/; revision=39631
2009-02-16 23:29:13 +00:00
Jeffrey Morlan
bcde36bae7 Fix some cases where the "format" program misused the %S format, causing it to display gibberish. To print a TCHAR string with _tprintf, just use %s. (Bug 4067)
svn path=/trunk/; revision=39630
2009-02-16 23:05:13 +00:00
Timo Kreuzer
6aa0f2a94b gdiobj.c: go back from intrinsics to to portable interlocked functions. InterlockedPopFreeEntry: Use InterlockedIncrement instead of InterlockedCompareExchange when exchanging the next unused entry in the handle table. Lock the free entry before accessing it, fixing a race condition. Might fix bug #4115
See issue #4115 for more details.

svn path=/trunk/; revision=39629
2009-02-16 23:00:15 +00:00
Jeffrey Morlan
dc8e4248dd - Improve performance of TYPE command by reading more than 1 byte at a time. (Bug 4057)
- Also allow it to be interrupted by ^C.

svn path=/trunk/; revision=39628
2009-02-16 21:50:54 +00:00
Aleksey Bragin
1d38fb2424 - Don't reference target process in the beginning of NtQueryInformationProcess but check buffer's length first. Found out by Dmitry Chapyshev, fixes 3 winetests.
svn path=/trunk/; revision=39627
2009-02-16 17:15:09 +00:00
Johannes Anderwald
f1d1259e79 - Fix compilation
svn path=/trunk/; revision=39626
2009-02-16 14:49:59 +00:00
Dmitry Chapyshev
e140996677 - Fix build
svn path=/trunk/; revision=39624
2009-02-16 12:34:32 +00:00
Aleksey Bragin
bbe25aa0c0 - Add declarations for unsafe fastmutex functions.
svn path=/trunk/; revision=39623
2009-02-16 12:10:08 +00:00
Dmitry Chapyshev
79d5681478 - Reimplement RtlLargeIntegerToChar (based on Wine code with my changes). It fixes all large_int Wine tests
svn path=/trunk/; revision=39622
2009-02-16 12:07:27 +00:00
Aleksey Bragin
7e91e42329 - Fix small formatting leftover from r39422.
svn path=/trunk/; revision=39621
2009-02-16 11:18:37 +00:00
Dmitry Chapyshev
f685d4bc8e - Fix copypaste typo in IopUpdateOperationCount
svn path=/trunk/; revision=39620
2009-02-16 11:02:23 +00:00
Matthias Kupfer
cc40695b51 define IDC_STATIC as -1 instead of 100 (prevent confusing warnings)
svn path=/trunk/; revision=39619
2009-02-16 10:10:44 +00:00
Jeffrey Morlan
f56130f164 SET /A improvements:
- Strip quotes from expression
- Use _tcstol instead of _ttoi to parse numbers, allowing hex/octal numbers to be used
- Skip space after an identifier
- Don't echo result when in a batch file

svn path=/trunk/; revision=39618
2009-02-16 03:00:27 +00:00
Art Yerkes
28a87330c4 Remove an assert that doesn't belong.
svn path=/trunk/; revision=39616
2009-02-15 22:16:20 +00:00
Timo Kreuzer
dced580965 - switch license to LGPL
- fix a typo

svn path=/trunk/; revision=39615
2009-02-15 22:15:15 +00:00
Timo Kreuzer
2e0c09ded9 Add a header
svn path=/trunk/; revision=39614
2009-02-15 22:14:32 +00:00
Art Yerkes
90b16f9eca Fix loopback adapter locking and make traffic work consistently.
Fix zero-address binding.
Local tcp services should work now.

svn path=/trunk/; revision=39613
2009-02-15 21:52:56 +00:00
Jeffrey Morlan
9b0334da19 Don't expand FOR variables until execution time, so that special characters in them won't cause unwanted syntactic effects.
For example, "for %a in (^>) do echo %a" should just echo the greater than sign.

svn path=/trunk/; revision=39611
2009-02-15 18:18:16 +00:00
Andrew Greenwood
a5d9170830 Fix #includes in a few more files to get ReactOS building again.
svn path=/trunk/; revision=39610
2009-02-15 16:08:40 +00:00
Andrew Greenwood
c7273a56a6 Fixed build by including the correct header this time!
Renamed SubmitWaveHeader to EnqueueWaveHeader, except for in the functiontable
which will actually do the wave header submission to the driver.


svn path=/trunk/; revision=39609
2009-02-15 15:37:44 +00:00
Andrew Greenwood
727a48a397 WaveHdr prepare/unprepare/submit now gets handled within the context of the
appropriate sound thread. This removes some responsibility of the sound
threading from the actual usermode sound component implementations. Minor
cleanup to CallSoundThread as we can deduce the thread handle from the
sound device instance.


svn path=/trunk/; revision=39608
2009-02-15 15:19:58 +00:00
Kamil Hornicek
43961e394e - update wined3d/d3d8/d3d9 to Wine 1.1.15
svn path=/trunk/; revision=39607
2009-02-15 14:01:23 +00:00
Andrew Greenwood
805ca6f02a Split custom ReactOS-only non-standard extensions from NTDDSND.H
Updated relevant code to include the new headers SNDTYPES.H and SNDNAMES.H
Corrected CTL_CODE macros and included SNDTYPES.H in WDMAUD interface header
A lot of this is just refactoring, hence the large number of files!


svn path=/trunk/; revision=39606
2009-02-15 13:31:52 +00:00
Johannes Anderwald
23bde85444 - Partly implement IPortFilterWaveCyclic_fnNewIrpTarget
- Store KSPIN_DESCRIPTOR in subdevice descriptor
- Return correct result for IInterruptSync_fnCallSynchronizedRoutine
- Add stub interface for IPortPinWaveCyclic
- Implement PcValidateConnectRequest

svn path=/trunk/; revision=39605
2009-02-15 13:29:01 +00:00
Johannes Anderwald
6ea1608c49 - Directly create the device objects in its DriverEntry as AddDevice is never called
- Remove the hack of hardcoding the symbolic device name object
- Add registering of device interfaces (fails atm because no pdo is provided)


svn path=/trunk/; revision=39603
2009-02-14 16:10:38 +00:00
Dmitry Chapyshev
dcaed4cdd4 - Add url.dll from Wine
svn path=/trunk/; revision=39602
2009-02-14 08:54:01 +00:00
Dmitry Chapyshev
98ff856933 - Sync gdiplus with Wine head
svn path=/trunk/; revision=39601
2009-02-14 08:14:34 +00:00
Timo Kreuzer
5896c03e49 Add PPROCESSOR_IDLE_FUNCTION, fix PROCESSOR_POWER_STATE
svn path=/trunk/; revision=39600
2009-02-14 02:19:52 +00:00
Timo Kreuzer
8861bd50ef Revert last commit. MS doesn't want poor ddk users mess with their secret structures and instead present them only some censored stuff.
svn path=/trunk/; revision=39599
2009-02-14 02:10:32 +00:00
Timo Kreuzer
a39829c012 Add PPROCESSOR_IDLE_FUNCTION, fix PROCESSOR_POWER_STATE
and move it from ndk to ntpoapi.h

svn path=/trunk/; revision=39598
2009-02-14 01:57:28 +00:00
Jeffrey Morlan
122c236111 Make delayed environment-variable expansions actually be delayed.
svn path=/trunk/; revision=39597
2009-02-14 01:13:17 +00:00
Timo Kreuzer
5d62c3b3a5 Get rid of VOLATILE, use volatile instead and fix PENTER_STATE_HANDLER by using "LONG volatile *" like in ms header, which means a pointer to a volatile LONG, instead of "volatile PLONG", which would be a volatile pointer to a LONG.
svn path=/trunk/; revision=39596
2009-02-14 00:58:55 +00:00
Christoph von Wittich
5673f7b8d9 sync translations, remove a little change from ros.diff
svn path=/trunk/; revision=39595
2009-02-13 19:10:55 +00:00
Christoph von Wittich
25c067c47e sync mshtml and shdocvw winetests with wine 1.1.15
svn path=/trunk/; revision=39594
2009-02-13 18:47:09 +00:00
Christoph von Wittich
90d8b6c3f7 apply ros-hack
svn path=/trunk/; revision=39593
2009-02-13 18:34:10 +00:00
Christoph von Wittich
597413065a readd LANGID until I figured out were wine moved the declaration to
svn path=/trunk/; revision=39592
2009-02-13 18:20:42 +00:00
Christoph von Wittich
338cbdcb9e sync msi with wine 1.1.15
svn path=/trunk/; revision=39591
2009-02-13 18:14:16 +00:00
Christoph von Wittich
1d451b9296 sync jscript_winetest with wine 1.1.15
svn path=/trunk/; revision=39590
2009-02-13 18:05:50 +00:00
Christoph von Wittich
a95d7474d9 sync shdocvw, mshtml and jscript to wine 1.1.15
svn path=/trunk/; revision=39589
2009-02-13 18:04:38 +00:00
Christoph von Wittich
27fb0f8623 fix a typo spotted by gabriel_it
svn path=/trunk/; revision=39588
2009-02-13 18:01:14 +00:00
Christoph von Wittich
d6a64dee2c inline the function
svn path=/trunk/; revision=39587
2009-02-13 17:58:23 +00:00
Christoph von Wittich
28c00b5c1c work around missing fpclassify
svn path=/trunk/; revision=39586
2009-02-13 17:55:03 +00:00
Colin Finck
43659c9ace - Add some checks to prevent crashes in unexpected situations and add useful error messages for them.
This should make debugging something like r39578 easier :-)
- Prevent some memory leaks in case of failure (well, some memory wasn't even freed in case of success :-P)

svn path=/trunk/; revision=39584
2009-02-13 17:39:58 +00:00
Christoph von Wittich
09ad068987 sync avifil32 with wine 1.1.15
svn path=/trunk/; revision=39583
2009-02-13 17:14:29 +00:00
Christoph von Wittich
1f7726146f revert r39578 as it breaks rosautotest on 3rd stage
svn path=/trunk/; revision=39582
2009-02-13 14:03:35 +00:00
Christoph von Wittich
b40f649aae fix a memory leak
svn path=/trunk/; revision=39581
2009-02-13 14:02:18 +00:00
Dmitry Chapyshev
49f7d111b6 - Add LCIDToLocaleName from Wine. Used by Wine Gecko
svn path=/trunk/; revision=39580
2009-02-13 12:04:20 +00:00
Christoph von Wittich
b3c01e9864 -use ExAllocatePoolWithTag/ExFreePoolWithTag
-set FileObject to readonly
-register the filesystem as low priority

svn path=/trunk/; revision=39579
2009-02-13 11:48:06 +00:00
Aleksey Bragin
fb513b8a3c Igor Koshpaev <tower@reactos.org>
- Include missing modules into bootcd 

svn path=/trunk/; revision=39578
2009-02-13 11:20:59 +00:00
Dmitry Gorbachev
4ff35ed634 Update Slovak translations, fix formatting. Bug #4157. Mario Kacmar (kario-at-szm-dot-sk)
svn path=/trunk/; revision=39577
2009-02-13 09:06:51 +00:00
Dmitry Chapyshev
ea824fa78f - Update Russian translation
svn path=/trunk/; revision=39576
2009-02-13 07:50:42 +00:00
Kamil Hornicek
0152a03c8f - don't redirect to nonexistent functions, Dd* are only defines
svn path=/trunk/; revision=39575
2009-02-12 23:06:01 +00:00
Danny Götte
1b032ed79f * DBConnection.class.php remove unneeded code, spotted by Colin
* introducing RosCMS Instances, it's basically a different configuration that you can put into a different folder and use the same code base to maintain different sites (example included)

svn path=/branches/danny-web/; revision=39574
2009-02-12 21:11:12 +00:00
Johannes Anderwald
f6078270cd - Define interface for wdmaud.drv
- Needs review

svn path=/trunk/; revision=39573
2009-02-12 20:13:19 +00:00
Danny Götte
894135af64 * fix adding of new entries
* hackfix login dialog
* allow manual adding of depencies 
* fix generator

svn path=/branches/danny-web/; revision=39572
2009-02-12 18:54:30 +00:00
Christoph von Wittich
3215261518 -move FCB_TAG to header
-use ExAllocatePoolWithTag / ExFreePoolWithTag
-free the NameListResource when destroying an FCB
-get rid of CdfsWriteNumberInShortName

svn path=/trunk/; revision=39571
2009-02-12 18:52:12 +00:00
Johannes Anderwald
b251557b6a - Implement MediaClassInstaller for GUID_DEVCLASS_SOUND (install wdmaud / sysaudio service from audio.inf)
svn path=/trunk/; revision=39570
2009-02-12 17:45:14 +00:00
Christoph von Wittich
52d7398ad5 fix some gdi32 font winetests
svn path=/trunk/; revision=39569
2009-02-12 17:08:45 +00:00
Johannes Anderwald
49b8538bd3 - Install wdmaud, sysaudio driver when a new audio device is installed
svn path=/trunk/; revision=39568
2009-02-12 15:44:32 +00:00
Christoph von Wittich
5fa00dd155 fix formatting
svn path=/trunk/; revision=39567
2009-02-12 15:33:06 +00:00
Dmitry Chapyshev
3f4f5fc21b - Add more stubs
svn path=/trunk/; revision=39566
2009-02-12 15:23:33 +00:00
Johannes Anderwald
ff1708f077 - Add audio class installer inf
svn path=/trunk/; revision=39565
2009-02-12 13:14:42 +00:00
Danny Götte
871d483721 add support for different port numbers while connecting to MySQL. patch by Mariusz Przybylski
svn path=/branches/danny-web/; revision=39564
2009-02-12 12:28:16 +00:00
Dmitry Chapyshev
41a84e652b - Add missed CopyCursor
svn path=/trunk/; revision=39563
2009-02-12 12:27:04 +00:00
Dmitry Chapyshev
b31251de30 .def -> .spec (from amd64 branch)
svn path=/trunk/; revision=39562
2009-02-12 11:39:36 +00:00
Dmitry Chapyshev
e6b986db67 - Fix spec file
svn path=/trunk/; revision=39561
2009-02-12 10:59:35 +00:00
Dmitry Chapyshev
f187e86b75 - Add olethk32 from Wine
svn path=/trunk/; revision=39560
2009-02-12 10:56:57 +00:00
Dmitry Chapyshev
171174de01 - Add more stubs
svn path=/trunk/; revision=39559
2009-02-12 10:51:29 +00:00
Timo Kreuzer
20d90a8f69 Implement hpp - the header preprocessor
It can parse headers and create new headers from them based on a simple prepreprocessing language that's compatible with the C preprocessor, so the source file stays a valid header. It works, but doesn't yet support different folders.

svn path=/trunk/; revision=39558
2009-02-11 20:37:25 +00:00
Gregor Schneider
e62e77bdb8 Do not reset the changed switch after applying a theme, bug #4148.
svn path=/trunk/; revision=39557
2009-02-11 19:21:25 +00:00
Dmitry Gorbachev
d87483d8d8 Fix bug #4155 in Italian translation. Patch from Gabriel Ilardi.
svn path=/trunk/; revision=39554
2009-02-11 17:24:13 +00:00
Hervé Poussineau
0560eef6ec Revert r39517, as there is no reason for such a change: files are consistently formatted, don't belong to ntoskrnl, use tabs only for indenting and not for formatting, and formatting revisions complicate svn blame feature usage.
svn path=/trunk/; revision=39553
2009-02-11 17:21:10 +00:00
Christoph von Wittich
b4f50046ff define CSR_DEFAULT_CURSOR_SIZE instead of hardcoding the value in 3 different places
svn path=/trunk/; revision=39552
2009-02-11 16:39:33 +00:00
Christoph von Wittich
9b69a9ef93 dbghelp: Fix bad call to free() instead of pdb_free().
Eric Pouech <eric dot pouech at orange dot fr> 

svn path=/trunk/; revision=39549
2009-02-11 14:17:26 +00:00
Dmitry Chapyshev
2f6e7535b5 - Add params checking. It fixes Autoruns (9.38) crashes
svn path=/trunk/; revision=39548
2009-02-11 13:54:29 +00:00
Johannes Anderwald
0491d4e284 - Use ZwCreateFile to get the file handle
- Ignore failure of device interface registration. Atm registering device interface fails due the device node has zero length. Needs more investigation
- Fix resource file constants

svn path=/trunk/; revision=39547
2009-02-11 09:54:47 +00:00
Johannes Anderwald
335a11923d - Implement KsCreateTopologyNode, KsCreatePin
svn path=/trunk/; revision=39546
2009-02-11 09:34:32 +00:00
Christoph von Wittich
f6fa8b2376 fix MR_MID_NOT_FOUND error with mshtml in 2nd stage
svn path=/trunk/; revision=39545
2009-02-11 09:26:31 +00:00
Timo Kreuzer
94e68ecb2b Fix some hal function declarations
svn path=/trunk/; revision=39543
2009-02-10 22:52:26 +00:00
Johannes Anderwald
6561dee59d - Implement KsDefaultDispatchPnp, KsAcquireDeviceSecurityLock, KsReleaseDeviceSecurityLock, KsAddObjectCreateItemToDeviceHeader, KsAllocateDeviceHeader, KsAllocateObjectCreateItem, KsAllocateObjectHeader, KsSetMajorFunctionHandler, KsDispatchIrp,
- Fix KsAddObjectCreateItemToObjectHeader prototype

svn path=/trunk/; revision=39542
2009-02-10 22:29:29 +00:00
Johannes Anderwald
6d946b8941 - Increase reference count on ISubdevice interface after successfully allocating the device header
- Delegate Create Request to Ks
- Implement KSDISPATCH_TABLE for IPortTopology
- KSDEVICE_HEADER must be the first item in the device extension

svn path=/trunk/; revision=39541
2009-02-10 22:17:33 +00:00
Timo Kreuzer
07f2f9b0b0 Fix a copy paste error
svn path=/trunk/; revision=39540
2009-02-10 22:06:36 +00:00
Timo Kreuzer
a3e9d29804 Move the declarations from winnt4.h, win2k.h and winxp.h into wdm.h or winddk and remove them. This wasn't in a good shape anyway, winxp.h was empty.
Implement a bunch of inline functions in wdm.h

svn path=/trunk/; revision=39539
2009-02-10 21:57:25 +00:00
Dmitry Gorbachev
a72d06dd10 mpu401.sys: remove entrypoint="..."
bootvid.dll, kdcom.dll: entrypoint="0"

svn path=/trunk/; revision=39538
2009-02-10 21:15:45 +00:00
Sylvain Petreolle
2ae9ff0e21 RtlCreateUnicodeString needs ntifs.h inclusion.
svn path=/trunk/; revision=39537
2009-02-10 19:58:01 +00:00
Dmitry Chapyshev
9291fbf1e4 - Implement HeapSetInformation
- Implement HeapQueryInformation

svn path=/trunk/; revision=39536
2009-02-10 18:34:54 +00:00
Johannes Anderwald
53d65bf17a - Handle IRP_MN_QUERY_PNP_DEVICE_STATE
- Implement opening KS_CATEGORY_AUDIO devices (used with extreme hack since opening sym link is not working atm)

svn path=/trunk/; revision=39535
2009-02-10 16:28:24 +00:00
Timo Kreuzer
c727314ae8 - Move interlocked functions from winddk.h to wdm.h
- Fix some typos
- Define ExGetCurrentResourceThread for _WIN64, too
- Fix ExReleaseResource and move it to wdm.h

svn path=/trunk/; revision=39534
2009-02-10 16:11:13 +00:00
Christoph von Wittich
5c3adeea08 set entrypoint="0"
svn path=/trunk/; revision=39532
2009-02-10 14:24:51 +00:00
Dmitry Chapyshev
6ad6909fad - Add SEH protection for FindResourceExW
Notepad++ works now

svn path=/trunk/; revision=39531
2009-02-10 14:08:05 +00:00
Christoph von Wittich
f9586906e9 fix formatting
svn path=/trunk/; revision=39530
2009-02-10 13:13:03 +00:00
Christoph von Wittich
fe23aee239 remove old mozilla url
svn path=/trunk/; revision=39529
2009-02-10 12:34:23 +00:00
Christoph von Wittich
0713a7745e remove some more junk from hive files
svn path=/trunk/; revision=39528
2009-02-10 12:32:29 +00:00
Christoph von Wittich
2fc228747e remove Internet Explorer StartPage as it is set in shdocvw.inf
svn path=/trunk/; revision=39527
2009-02-10 12:18:56 +00:00
Christoph von Wittich
4a2b32d1ad add resource file to kernel32_winetest
this fixes all kernel32 resource tests
spotted by Giannis Adamopoulos

svn path=/trunk/; revision=39526
2009-02-10 09:25:02 +00:00
Christoph von Wittich
3b3a6508ad remove entries which are added by registering shdocvw
svn path=/trunk/; revision=39525
2009-02-10 08:50:33 +00:00
Johannes Anderwald
919e4f45d7 - Move includes to a common header- Implement IKsDevice interface stubs
- Add a DriverEntry
- Partly implement KsAllocateObjectHeader
- Check for IID_IUnknown in KoCreateInstance

svn path=/trunk/; revision=39524
2009-02-10 07:44:43 +00:00
Johannes Anderwald
77f7338705 - Fix include guard
- Define PKNKSFREE type
- Add KSFILTERFACTORY type
- Fix definition of KsAllocateObjectHeader
- Fix calling convention for lots of functions
- Remove dummy stub implementations

svn path=/trunk/; revision=39523
2009-02-10 07:44:14 +00:00
Timo Kreuzer
31dd9c0a1c fix a typo
svn path=/trunk/; revision=39521
2009-02-10 03:10:33 +00:00
Timo Kreuzer
870b09618b - Move Ex* and Rtl* functions and a bunch of types from winddk.h to wdm.h
- define ExIsResourceAcquiredLite to ExIsResourceAcquiredSharedLite
- Add implementations for RtlSecureZeroMemory, RtlRetrieveUlong, RtlRetrieveUshort, RtlStoreUlong, RtlStoreUlonglong, RtlStoreUshort, RtlStoreUlongPtr, 
- Add 64bit version of SLIST_HEADER
- use _mm_pause for YieldProcessor

svn path=/trunk/; revision=39520
2009-02-10 02:26:04 +00:00
Timo Kreuzer
50d17fc2a4 undef ExAllocatePoolWithQuota and ExAllocatePoolWithQuotaTag before implementing them as they can be defined by ddk headers.
svn path=/trunk/; revision=39519
2009-02-10 00:42:57 +00:00
Timo Kreuzer
d3f56a74dd Rename ntddk.h include guard to _NTDDK_ as it's supposed to be. Remove a bunch of hack defines of _NTDDK_.
svn path=/trunk/; revision=39518
2009-02-09 22:50:40 +00:00
Christoph von Wittich
a2feddeab2 formatting fix tabs to 4 spaces
svn path=/trunk/; revision=39517
2009-02-09 21:22:57 +00:00
Timo Kreuzer
cae45b3c21 implement _mm_pause
svn path=/trunk/; revision=39516
2009-02-09 20:28:24 +00:00
Christoph von Wittich
b4880fab81 -remove ros-hack
-delete avifil32_ros.diff as the translation is now to wine git as well

Artem Reznikov <temarez@yandex.ru> master * re9996b9be4 wine/dlls/avifil32/ (avifile_Uk.rc rsrc.rc): avifil32: Ukranian translation.

svn path=/trunk/; revision=39515
2009-02-09 20:24:03 +00:00
Danny Götte
1d3cabae56 * fix bug in converter (interchanged columns)
* remove unneeded filter setting (check if you can view entries, is done for every entry)

svn path=/branches/danny-web/; revision=39514
2009-02-09 15:05:14 +00:00
Christoph von Wittich
4bcb8813bd add srclient.dll
svn path=/trunk/; revision=39513
2009-02-09 13:47:47 +00:00
Dmitry Chapyshev
03660c7885 .def -> .spec
svn path=/trunk/; revision=39512
2009-02-09 13:47:10 +00:00
Dmitry Gorbachev
6c8c37dd00 Add more color schemes. Gabriel Ilardi, bug #4149.
svn path=/trunk/; revision=39511
2009-02-09 13:44:15 +00:00
Gregor Schneider
e337dfa99d - Remove coordinate checks from NtGdiStretchBlt, since they're done at a later stage differently now
- Fixes a div/0 crash that happened in XnView and Acrobat Reader 9 Setup

svn path=/trunk/; revision=39510
2009-02-09 13:10:39 +00:00
Gregor Schneider
ef2b5f4b28 Fix comments
svn path=/trunk/; revision=39509
2009-02-09 11:57:37 +00:00
Christoph von Wittich
bc58fedee4 -don't rely on wingdi.h in winuser.h
-remove NOGDI hacks from wine directx dlls

svn path=/trunk/; revision=39508
2009-02-09 08:55:19 +00:00
Danny Götte
028b079655 * implement APLs in js
* add new APLs
* modify standard filter visibility settings
* remove some stuff that makes no sense

svn path=/branches/danny-web/; revision=39507
2009-02-09 00:08:48 +00:00
Gregor Schneider
c4d49789a6 Preparation for StretchBlt pattern support (2):
- Modify CallDibStretchBlt for brush support, adjust function pointers
- Add BrushObj to DibFunctions, fix BrushOrigin parameter type, qualify ROP properly

svn path=/trunk/; revision=39506
2009-02-08 23:18:58 +00:00
Timo Kreuzer
6399747995 Fix definition of IoSetCancelRoutine.
svn path=/trunk/; revision=39505
2009-02-08 22:56:31 +00:00
Danny Götte
684d04f936 * bugfixing
* minor improvements

svn path=/branches/danny-web/; revision=39504
2009-02-08 22:24:23 +00:00
Christoph von Wittich
81afdb2e7d add -H to compilerflags for resolving header issues (as comment)
svn path=/trunk/; revision=39503
2009-02-08 20:47:30 +00:00
Christoph von Wittich
6a4bc15266 -remove wingdi.h from wine/winuser.h
-define NOGDI for some wine dlls (this should be fixed in wine)
-move wine specific window messages to internal user32 header
-fix devenum includes
-remove some wrong include guards in windows.h
-remove the GetObjectW hack from jscript.dll

svn path=/trunk/; revision=39502
2009-02-08 20:38:16 +00:00
Gregor Schneider
c74ee95b77 Preparation for StretchBlt pattern support:
- Supply BrushObj and BrushOrigin to IntStretchBlt
- Implement EngStretchBltROP to do the work, let EngStretchBlt call it (this allows ROP support for real now)

svn path=/trunk/; revision=39501
2009-02-08 20:28:20 +00:00
Christoph von Wittich
43ef418be5 don't include windows.h
svn path=/trunk/; revision=39500
2009-02-08 20:23:28 +00:00
Dmitry Chapyshev
18df5891c1 - Fix typos
svn path=/trunk/; revision=39499
2009-02-08 19:28:41 +00:00
Dmitry Chapyshev
be4a17e107 - FIXME -> TRACE for unimplemented functions
svn path=/trunk/; revision=39498
2009-02-08 19:14:48 +00:00
Christoph von Wittich
d258115b75 E_PROP_ID_UNSUPPORTED is already defined in vfwmsgs.h
svn path=/trunk/; revision=39497
2009-02-08 18:52:59 +00:00
Dmitry Chapyshev
567bd56992 - Implement PathIsURL
svn path=/trunk/; revision=39496
2009-02-08 18:49:18 +00:00
Christoph von Wittich
46ab93a1a3 get rid of some junk
svn path=/trunk/; revision=39495
2009-02-08 18:47:23 +00:00
Dmitry Chapyshev
6988c44013 .def -> .spec (based on amd64 branch with my fixes)
svn path=/trunk/; revision=39494
2009-02-08 18:45:17 +00:00
Dmitry Gorbachev
468038e6d4 Kenichi Aramaki (karamaki-at-gmail-dot-com):
- Fix Japanese keyboard layout (bug #4145).
- Fix buffer overflow in CMD.EXE when dealing with double-byte code page (bug #4146).

svn path=/trunk/; revision=39493
2009-02-08 17:41:21 +00:00
Dmitry Chapyshev
a44e51e9d6 .def -> .spec (based on amd64 branch with my fixes)
svn path=/trunk/; revision=39492
2009-02-08 16:41:44 +00:00
Dmitry Gorbachev
3d465cce58 Flush buffers before sending a command to keyboard controller.
It should fix 'unresponsive keyboard' bug.

svn path=/trunk/; revision=39491
2009-02-08 16:07:22 +00:00
Christoph von Wittich
c7c7ca269b fix some comments
svn path=/trunk/; revision=39490
2009-02-08 15:46:22 +00:00
Christoph von Wittich
de978e0672 add qmgrprxy.dll from wine 1.14
svn path=/trunk/; revision=39489
2009-02-08 15:42:09 +00:00
Dmitry Chapyshev
dbf1679196 .def -> .spec (based on amd64 branch with my fixes)
svn path=/trunk/; revision=39488
2009-02-08 15:41:03 +00:00
Christoph von Wittich
aa6f582bd4 add actxprxy from wine 1.14
svn path=/trunk/; revision=39487
2009-02-08 15:26:59 +00:00
Gregor Schneider
37532310dd [FORMATTING] apply 4 spaces indentation
svn path=/trunk/; revision=39486
2009-02-08 15:18:13 +00:00
Gregor Schneider
0651d50d93 Evgeny Boltik, <BSTSoft AT narod DOT ru>: Convert BitBlt source coordinates (destination coordinates were converted already)
svn path=/trunk/; revision=39485
2009-02-08 14:54:41 +00:00
Kamil Hornicek
ffcf4490be - sync dinput and dinput8 with wine
svn path=/trunk/; revision=39484
2009-02-08 14:34:49 +00:00
Gregor Schneider
69f5107aab StretchBlt: +clipping -bugs
- Additional checks (coordinates switched, NOOP, degenerate, outside of valid region, ...) and offset source rectangle in internal StretchBlt functions
- Fixes the StretchBlt problem in bug #3477, bug #3656 completely as well as bug #4089 and some issues reported elsewhere (bug #3325 for example)
- Increment horizontal position even if outside of the clipping rect (Evgeny Boltik, <BSTSoft AT narod DOT ru>)
- One small problem is left, one cookie for the person who reproduces it, two for the one that fixes it ;-)

svn path=/trunk/; revision=39483
2009-02-08 14:25:33 +00:00
Christoph von Wittich
3ae5eef453 sync CredReadDomainCredentialsA/W with wine 1.14
svn path=/trunk/; revision=39482
2009-02-08 10:34:09 +00:00
Dmitry Chapyshev
37a3abe6fe - Sync advapi32_winetest with Wine head
svn path=/trunk/; revision=39481
2009-02-08 09:32:24 +00:00
Gregor Schneider
efa5b443b0 - Convert coordinates of src and dst rectangle in TransparentBlt
- Use a descriptive debug print when creation of a XLateObj failed

svn path=/trunk/; revision=39480
2009-02-08 09:25:28 +00:00
Michael Martin
f5a1c37e1b - Set Buffer pointer to NULL on failure.
svn path=/trunk/; revision=39479
2009-02-08 09:20:11 +00:00
Christoph von Wittich
6c864fe996 remove hack
svn path=/trunk/; revision=39478
2009-02-08 09:09:04 +00:00
Michael Martin
c15c8ae183 - Fix formatting
svn path=/trunk/; revision=39477
2009-02-08 09:04:42 +00:00
Christoph von Wittich
5b794bd721 remove hack
svn path=/trunk/; revision=39476
2009-02-08 09:01:01 +00:00
Christoph von Wittich
e8b74f28d4 remove hack
svn path=/trunk/; revision=39475
2009-02-08 08:58:54 +00:00
Christoph von Wittich
7c69e20a49 sync ole32_winetest with wine 1.14
svn path=/trunk/; revision=39474
2009-02-08 08:56:01 +00:00
Christoph von Wittich
25286fb023 sync oleaur32_winetest with wine 1.1.14
svn path=/trunk/; revision=39473
2009-02-08 08:55:17 +00:00
Christoph von Wittich
f44fdba630 add new module type IdlInterface
svn path=/trunk/; revision=39472
2009-02-08 08:54:47 +00:00
Timo Kreuzer
6f7b6a94c9 merge from amd64 branch. and
35645: Fix some wrong declarations for 64bits. (Samuel Serapión)
35652: More header fixes. (Samuel Serapión)
35950: Implement __readeflags and __writeeflags (Timo Kreuzer)
35951: Remove hacks from __addgsbyte, __addgsword, __addgsdword. (Timo Kreuzer)
36171: Fix TIMERPROC definition. Fix CreateToolbarEx definition. (Samuel Serapión)
36468: Add MemoryBarrier definition for amd64 (Timo Kreuzer)
36469: Fix NetLocalGroupGetMembers prototype. (Samuel Serapión)
36474: Fix ReadProcessMemory and Toolhelp32ReadProcessMemory prototypes. (Samuel Serapión)
36840: fix __rdtsc on amd64 build (Timo Kreuzer)
36898: Fix CryptReleaseContext definition. (Samuel Serapión)
36900: Fix COMBOBOXEXITEA/W noticed by Daniel Verkamp. (Samuel Serapión)
36901: Fix NMHDR definition. noticed by Daniel Verkamp. (Samuel Serapión)
36906: Fix definitions of CDHOOKPROC, PROC, FARPROC, NEARPROC, SYSTEM_INFO, COMPAREITEMSTRUCT, COPYDATASTRUCT, DELETEITEMSTRUCT, DRAWITEMSTRUCT, MENUITEMINFOA/W, HELPINFO, MSGBOXPARAMSA/W, MOUSEHOOKSTRUCT, DROPSTRUCT, KBDLLHOOKSTRUCT, GetProcessAffinityMask, SetProcessAffinityMask, DragObject, InsertMenuA/W, ModifyMenuA/W, WinHelpA/W, RT_GROUP_CURSOR, RT_GROUP_ICON (Daniel Verkamp.)
36953: Fix AFD compilation for 64-bit (treat handles as ULONG_PTR-sized). Also correct Winsock's SOCKET definition (Stefan Ginsberg)
37307: Add UNWIND_HISTORY_TABLE_ENTRY and UNWIND_HISTORY_TABLE. (Timo Kreuzer)
37875: Inlcude excpt.h in winnt.h. (Timo Kreuzer)
37908: Fix definition of SOCKET. (Timo Kreuzer)
37926: fix *HOOKPROC definition. Add 64 bit BitTest functions. (Timo Kreuzer)
38072: Fix FARPROC, NEARPROC, PROC definitions (Samuel Serapión)
38091: Fix some 64bit portability issues. (Samuel Serapión)
38093: Hack for wine specific hack. (Samuel Serapión)
38095: Fix packing for commdlg. (Samuel Serapión)
38260: Fix EDITSTREAM structure. (Samuel Serapión)
38263: Fix definitions of WAVEOPENDESC, WAVEHDR structures. Fix prototypes for DefDriverProc, waveOutMessage, waveOutGetDevCapsA/W, waveInGetDevCapsA/W, waveInMessage, midiStreamOpen, midiOutGetDevCapsA/W, midiOutOpen, midiOutMessage, midiInGetDevCapsA/W, midiInOpen, midiInMessage, auxGetDevCapsA/W, auxOutMessage, mixerGetDevCapsA/W, mixerOpen, timeSetEvent, joyGetDevCapsA/W, mciSendCommandA/W, and mciGetCreatorTask. (Samuel Serapión)
38478: Fix HeapAlloc prototype. (Timo Kreuzer)
39468: Fix some definitions in mmsystem.h (Timo Kreuzer)

svn path=/trunk/; revision=39471
2009-02-08 03:41:29 +00:00
Timo Kreuzer
6698807429 #if out some "strange" __ROS_LONG64__ definition for (U)INT_PTR, as it doesn't make sense and breaks other code. The whole __ROS_LONG64__ hack should be improved by ... being removed.
svn path=/trunk/; revision=39470
2009-02-08 03:40:38 +00:00
Timo Kreuzer
9f5a99cfcf Add InitializeSListHead and QueryDepthSList to winbase.h
Remove QueryDepthSList from winddk.h
Fix definion of ExQueryDepthSList in winddk.h

svn path=/trunk/; revision=39467
2009-02-07 23:46:56 +00:00
Michael Martin
5e8a4f674a - Default ExitStatus for a process is STATUS_PENDING aka STILL_ACTIVE. Fixes bug #3135.
svn path=/trunk/; revision=39466
2009-02-07 22:48:51 +00:00
Dmitry Gorbachev
dc0a2cec45 Do not crash the kernel when accessing a guard page.
svn path=/trunk/; revision=39465
2009-02-07 19:29:39 +00:00
Dmitry Chapyshev
0a8c6e11ea - Implement SetupChangeLocale
- Add stub for SetupChangeLocaleEx

svn path=/trunk/; revision=39464
2009-02-07 18:33:35 +00:00
Dmitry Chapyshev
194e3f67f7 - Stub implement DeleteProfileA/W
svn path=/trunk/; revision=39463
2009-02-07 18:31:01 +00:00
Dmitry Chapyshev
c0cb7d35e6 - Stub implement NlsResetProcessLocale
svn path=/trunk/; revision=39462
2009-02-07 18:29:11 +00:00
Dmitry Chapyshev
6723252334 - Add olecli32 and olesvr32 from Wine
svn path=/trunk/; revision=39461
2009-02-07 18:25:36 +00:00
Steven Edwards
df4a100ba2 Always call TerminateProcess when exiting a session.
svn path=/trunk/; revision=39460
2009-02-07 17:39:51 +00:00
Johannes Anderwald
2ea5d3e069 - Add a hack
svn path=/trunk/; revision=39459
2009-02-07 15:43:14 +00:00
Johannes Anderwald
b2e7828867 - Add a hack
svn path=/trunk/; revision=39458
2009-02-07 15:35:07 +00:00
Steven Edwards
748579a668 - Reimplement TerminateShell function using WaitForSingleObject
to avoid some of the excessive usage of Sleep. Let me know if
you spot a bug.


svn path=/trunk/; revision=39457
2009-02-07 15:21:15 +00:00
Christoph von Wittich
070cba2db8 fix a comment
svn path=/trunk/; revision=39456
2009-02-07 15:15:01 +00:00
Johannes Anderwald
0fb7d7ca0e - Add a new member to SC_RPC_CONFIG_INFOA structure
- This hack is currently required to pass LPSERVICE_DESCRIPTION onto services via rpc as the member is lpDescription is a variable length string pointer

svn path=/trunk/; revision=39455
2009-02-07 15:06:59 +00:00
Dmitry Chapyshev
028c6e462d - Partially revert r39453
svn path=/trunk/; revision=39454
2009-02-07 12:55:43 +00:00
Dmitry Chapyshev
37d68d3d83 - Add stub program for winhlp32 (should be located in system32)
- winhlp32 now it is located in c:\reactos
BUG: Stub program and winhlp32 have an identical name of a file, but are located in different directories. At installation winhlp32 it is copied in system32 and c:\reactos. We need to think up a way to install two or more files with identical names

svn path=/trunk/; revision=39453
2009-02-07 11:21:07 +00:00
Kamil Hornicek
f1a5f6e179 - update polish translation of usetup by Olaf Siejka
svn path=/trunk/; revision=39452
2009-02-07 10:36:57 +00:00
Christoph von Wittich
910f60d2f2 fix ScmRpcStatusToWinError handling
svn path=/trunk/; revision=39451
2009-02-07 09:11:31 +00:00
Christoph von Wittich
464363fadc sync oleaut32 to wine 1.1.14
sync rpcrt4 to wine 1.1.14 except UuidCreate in rpcrt4_main.c as it isn't compatible to our headers

svn path=/trunk/; revision=39450
2009-02-07 07:52:12 +00:00
Art Yerkes
e751a0cbb0 Obey pid defined macro.
svn path=/trunk/; revision=39449
2009-02-07 07:23:52 +00:00
Christoph von Wittich
83fea96ee6 fix formatting
svn path=/trunk/; revision=39448
2009-02-07 07:14:25 +00:00
Art Yerkes
e44126ac85 Calling listen more than once is expected to be benign.
svn path=/trunk/; revision=39447
2009-02-07 01:20:25 +00:00
Timo Kreuzer
553d712e8b define BitScanReverse to _BitScanReverse, add BitScanForeward the same way, add 64 bit InterlockedBittest intrinsics
svn path=/trunk/; revision=39446
2009-02-07 00:20:25 +00:00
Timo Kreuzer
900326bee8 merge from amd64 branch:
37966: Make IMAGE_ORDINAL_FLAG64 an ULONGLONG (Timo Kreuzer)
38111: Make sure UNALIGNED is not redefined (Samuel Serapión)
38423: Fix RtlAllocateHeap, RtlExtendHeap,RtlSizeHeap definitions.(Samuel Serapión)

svn path=/trunk/; revision=39445
2009-02-06 23:45:18 +00:00
Christoph von Wittich
146a2bfc75 remove dead code
svn path=/trunk/; revision=39444
2009-02-06 19:07:22 +00:00
Johannes Anderwald
3dad41d9c4 - new oo entry, patch Mario Kacmar
svn path=/trunk/; revision=39443
2009-02-06 16:27:58 +00:00
Christoph von Wittich
75f0865f37 fix NULL checks
svn path=/trunk/; revision=39442
2009-02-06 15:24:18 +00:00
Dmitry Gorbachev
5e6db6dc60 - Fix spinning on locks on SMP.
- Alignment bug in GCC 4.3.3.

svn path=/trunk/; revision=39441
2009-02-06 14:47:19 +00:00
Christoph von Wittich
51a928f1de revert 37001 (Initialize _RetVal properly in order to avoid compiler warnings) as we have PSEH2 now and don't suffer from this gcc bug anymore
svn path=/trunk/; revision=39440
2009-02-06 13:33:57 +00:00
Timo Kreuzer
e88b1c8624 merge from amd64 branch:
37868: Add CONTEXT flags for x64 (Timo Kreuzer)
39346: Use intrinsics for rtl byteswap functions for GNUC, too. Only include them if NTOS_MODE_USER. (Timo Kreuzer)
39347: Move rtl byteswap functions to wdm.h and add intrinsic definitions (Timo Kreuzer)

svn path=/trunk/; revision=39439
2009-02-06 13:04:18 +00:00
Johannes Anderwald
994dea8d8a - Add more error checks
svn path=/trunk/; revision=39438
2009-02-06 12:18:47 +00:00
Christoph von Wittich
ab81d30c29 add a missing Status to ScmRpcStatusToWinError
svn path=/trunk/; revision=39437
2009-02-06 11:49:21 +00:00
Christoph von Wittich
e877ae3bff fix a nice bug in RGetServiceKeyNameA
svn path=/trunk/; revision=39436
2009-02-06 11:18:49 +00:00
Dmitry Gorbachev
8dd9673939 Fix formatting in muilanguages.h. Patch from Mario Kacmar. Bug #4138.
svn path=/trunk/; revision=39435
2009-02-06 09:00:39 +00:00
Christoph von Wittich
ead9dcbd31 add some more error checking
svn path=/trunk/; revision=39434
2009-02-06 08:51:51 +00:00
Christoph von Wittich
18922ff0a4 fix some QueryServiceConfig2A winetests
svn path=/trunk/; revision=39433
2009-02-06 08:51:20 +00:00
Steven Edwards
7f0c18cb38 - Some formating changes
- Remove unneeded spec, just use the comments
- Syslog interface for my wine usage, disabled in ReactOS tree
 but included here to reduce my diff.


svn path=/trunk/; revision=39432
2009-02-06 08:22:18 +00:00
Dmitry Chapyshev
fb23e17854 - Implement GetVolumePathNameA/W
svn path=/trunk/; revision=39431
2009-02-06 08:13:11 +00:00
Steven Edwards
286adffc4b Changed port back to 23
svn path=/trunk/; revision=39430
2009-02-06 06:47:54 +00:00
Steven Edwards
321bf76918 - Use the Wine spooler service as the service entry template as I was
testing on Wine. (Disabled to allow stand alone build while we wait on 
AFD fix)
- Move some stuff around to the header to prepare for later cleanups


svn path=/trunk/; revision=39429
2009-02-06 06:45:54 +00:00
Steven Edwards
d0c78a0f46 - Make telnetd only slightly more RFC-compatible
Thanks to Fedora Anaconda telnet code as an example.
This allows us to actually get an echo back on the
screen when we type commands.


svn path=/trunk/; revision=39428
2009-02-06 05:34:39 +00:00
Timo Kreuzer
af69e9c54e winddk: Move mm definitions into arch specific area
svn path=/trunk/; revision=39427
2009-02-06 02:03:57 +00:00
Timo Kreuzer
4a0cbfe0d9 winddk.h add amd64 CONTEXT
svn path=/trunk/; revision=39426
2009-02-06 00:05:33 +00:00
Timo Kreuzer
47193f550f Merge 37493,37494 from amd64 branch:
Fix amd64 / ia64 default definition of RtlGetCallersAddress (Timo Kreuzer)

svn path=/trunk/; revision=39425
2009-02-05 23:35:51 +00:00
Johannes Anderwald
f1011d8bb5 - Fix a potential buffer overflow in RChangeServiceConfigA
- Make sure that returned buffers are zero terminated in RQueryServiceConfigA

svn path=/trunk/; revision=39424
2009-02-05 22:23:43 +00:00
Matthias Kupfer
693252f753 - Add Denmark to country list and set geo id.
- Set geo id for Czech Republic.

svn path=/trunk/; revision=39423
2009-02-05 21:57:04 +00:00
Dmitry Gorbachev
8dd42ae303 Fix bug #4129 in CmpGetNameControlBlock().
svn path=/trunk/; revision=39422
2009-02-05 21:30:21 +00:00
Johannes Anderwald
d54988a73d - Ignore lpResult parameter
svn path=/trunk/; revision=39421
2009-02-05 20:19:32 +00:00
Johannes Anderwald
e35599aa1e - Fix returned length for RGetServiceKeyNameW
- Perform parameters check in right order in ROpenServiceW

svn path=/trunk/; revision=39420
2009-02-05 20:18:11 +00:00
Johannes Anderwald
c6c028fe41 - Add more error checks which reduce winetest errors
svn path=/trunk/; revision=39419
2009-02-05 19:13:35 +00:00
Timo Kreuzer
9e98af0628 merge from amd64 branch
39059
ssprintf.cpp/xml.cpp: Fix compilation for gcc 4.4.0 and 64bits (Samuel Serapión)

svn path=/trunk/; revision=39418
2009-02-05 18:57:59 +00:00
Timo Kreuzer
bf13eb0000 merge from amd64 branch
37786: Link to libgcc_eh for C++ apps (Samuel Serapión)
39416: improve r37786 a bit (Timo Kreuzer)
36415: rbuild: implement MingwModuleHandler::GetDebugFormat(), returning "dwarf-2" on amd64, "stabs+" in all other cases so far (Timo Kreuzer)

svn path=/trunk/; revision=39417
2009-02-05 18:47:05 +00:00
Timo Kreuzer
d3a9426b6a merge from amd64 branch
34740: Strip off stdcall decoration from amd64 entry points (Timo Kreuzer)
37786: Link to libgcc_eh for amd64 C++ apps (Samuel Serapión)

svn path=/trunk/; revision=39414
2009-02-05 17:58:55 +00:00
Johannes Anderwald
80187e8d4e - Improve error checking
svn path=/trunk/; revision=39413
2009-02-05 17:22:59 +00:00
Johannes Anderwald
be4863c855 - Make sure "Open" verb is always inserted first
- Apply item style to current item not to next
- bug 4065

svn path=/trunk/; revision=39412
2009-02-05 15:15:24 +00:00
Christoph von Wittich
65cc369150 hackfix some services stuff
svn path=/trunk/; revision=39411
2009-02-05 15:08:51 +00:00
Dmitry Chapyshev
675ba8eacc - Add some defines to winnt.h
- Partially implement RegSaveKeyExW

svn path=/trunk/; revision=39410
2009-02-05 14:18:20 +00:00
Matthias Kupfer
f42c3f4048 - Set geographical position in conjunction with language selection
- Translation for the changes made for English and German (other languages need to be updated)
- List of languages extend by GeoID-field and set the GeoID for a lot of countries (Some countries needs to update in hivesft_* first, some language entries needs to split up for different countries)
- Solves second part of issue #3448, now correct GeoID is set per default for a lot of countries.

svn path=/trunk/; revision=39409
2009-02-05 13:50:49 +00:00
Dmitry Chapyshev
76e0cf24dd - Add RegSaveKeyExA/W to winreg.h
- Uncomment RegSaveKeyExA/W in advapi32.def
- Implement RegSaveKeyExA
- Add stub for RegSaveKeyExW

svn path=/trunk/; revision=39408
2009-02-05 13:47:51 +00:00
Johannes Anderwald
edd487537a - Don't pass empty ServiceArgumentVector to StartService
- Fixes a heap corruption

svn path=/trunk/; revision=39407
2009-02-05 13:30:24 +00:00
Johannes Anderwald
f7f3a1294f - Prevent using of uninitialized values in error case
- Don't leak ServiceHandle and ServiceManagerHandle

svn path=/trunk/; revision=39406
2009-02-05 12:56:11 +00:00
Christoph von Wittich
57ea9f9e02 enable iexplore build
svn path=/trunk/; revision=39405
2009-02-05 12:52:59 +00:00
Dmitry Chapyshev
76f8d5e15e - Sync usp10 with Wine head
svn path=/trunk/; revision=39404
2009-02-05 11:07:55 +00:00
Christoph von Wittich
bb6f0157c3 Alexandre Julliard : include: Fix packing of the msacm structures.
<julliard at winehq.org>

svn path=/trunk/; revision=39403
2009-02-05 09:09:29 +00:00
Christoph von Wittich
ff0436a020 shell32: Fixed potential buffer overwrite in execute_from_key (Coverity).
Marcus Meissner <marcus at jet.franken.de>

svn path=/trunk/; revision=39402
2009-02-05 08:55:28 +00:00
Christoph von Wittich
63e35e6ed4 Aric Stewart : advapi32: Add Security Label sids used by IE7.
<aric at codeweavers.com>

svn path=/trunk/; revision=39401
2009-02-05 08:50:14 +00:00
Christoph von Wittich
9cf81b0af1 a little bit of wine syncing
svn path=/trunk/; revision=39400
2009-02-05 07:58:35 +00:00
Christoph von Wittich
bfe53a5d98 add shdoclc from wine 1.1.14
svn path=/trunk/; revision=39399
2009-02-05 07:46:59 +00:00
Christoph von Wittich
0a683381ae urlmon: Fixed target buffer length to MBtoWC
Marcus Meissner <marcus at jet.franken.de>

http://www.winehq.org/pipermail/wine-patches/2009-February/068906.html

svn path=/trunk/; revision=39398
2009-02-05 07:01:34 +00:00
Christoph von Wittich
2ba1713711 mshtml: fixed second buffer argument to MultiByteToWideChar
Marcus Meissner <marcus at jet.franken.de>

http://www.winehq.org/pipermail/wine-patches/2009-February/068903.html

svn path=/trunk/; revision=39397
2009-02-05 06:54:33 +00:00
Christoph von Wittich
ca07b1a508 atl: fixed second buffer size to MBtoWC
Marcus Meissner <marcus at jet.franken.de>

http://www.winehq.org/pipermail/wine-patches/2009-February/068894.html

svn path=/trunk/; revision=39396
2009-02-05 06:50:19 +00:00
Christoph von Wittich
f38aaf659b add a buffer length check (fixes one service test)
svn path=/trunk/; revision=39395
2009-02-04 19:16:51 +00:00
Christoph von Wittich
e1f736659a change gecko download url as the version bug is fixed
svn path=/trunk/; revision=39394
2009-02-04 18:39:30 +00:00
Christoph von Wittich
75f1d09ba8 allow to use a local copy of wine_gecko.cab instead of having to download it every time
http://www.winehq.org/pipermail/wine-patches/2009-February/068889.html
http://www.winehq.org/pipermail/wine-patches/2009-February/068891.html
http://www.winehq.org/pipermail/wine-patches/2009-February/068890.html
http://www.winehq.org/pipermail/wine-patches/2009-February/068892.html

svn path=/trunk/; revision=39393
2009-02-04 18:09:03 +00:00
Dmitry Gorbachev
bafaf162a4 Fix warnings in Regional Settings and Multimedia control panel applets. Patch from Carlo Bramini, bug #4090.
svn path=/trunk/; revision=39392
2009-02-04 16:30:05 +00:00
Dmitry Gorbachev
2e93c4c1d9 - Remove extra semicolons. Amine Khaldi, bug #3980.
- Fix a warning (bug) in ADNS library.

svn path=/trunk/; revision=39391
2009-02-04 16:26:02 +00:00
Christoph von Wittich
43eb75a9e4 sync mshtml and shdocvw winetests with wine 1.1.14
svn path=/trunk/; revision=39390
2009-02-04 14:36:08 +00:00
Christoph von Wittich
cc12355d0e sync mshtml and shdocvw to wine 1.1.14
svn path=/trunk/; revision=39389
2009-02-04 14:35:06 +00:00
Matthias Kupfer
df7c034a38 - Apply minor fix to German translation.
- Create Administrator account after default settings have been set.
- Solves issue #4214 and partly #3448 (GeoID still not set per default, but all changes apply to installed system now).
- See booth issues for more details.

svn path=/trunk/; revision=39388
2009-02-04 14:28:27 +00:00
Colin Finck
b419715eb2 - Change "pollchar" to also empty the keyboard buffer after polling the character and rename it to "pollchar_and_empty" accordingly.
This fixes a bug revealed by silverblade's FOSDEM CD: If you boot FreeLoader with a boot menu from CD and press a key after that "Press any key to boot from CD" message, that keypress was forwarded to FreeLoader as well.
- Remove the already unused and now unsynchronized "pollchar" from the regression testing boot sector.

svn path=/trunk/; revision=39387
2009-02-04 13:13:21 +00:00
Dmitry Chapyshev
0a8a745e77 - Fix build
svn path=/trunk/; revision=39386
2009-02-04 13:12:35 +00:00
Dmitry Chapyshev
23559be882 - More stub implementation
- Fix params for LogoffWindowsDialog

svn path=/trunk/; revision=39385
2009-02-04 12:51:47 +00:00
Christoph von Wittich
8cd3b76387 add wcsncpy_s, strcat_s (from wine)
and _ftol2 and _ftol2_sse required by vmware tools

svn path=/trunk/; revision=39384
2009-02-04 10:09:48 +00:00
Steven Edwards
98b23c7c52 Warning cleanup:
- disable the unused service related functions for now
 - comment out a bunch of unused variables
 - cast a few things to shut up compiler warnings for now


svn path=/trunk/; revision=39383
2009-02-04 10:01:42 +00:00
Ged Murphy
638a93a3ef - Implement SERVICE_CONFIG_DESCRIPTION and SERVICE_CONFIG_FAILURE_ACTIONS for RChangeServiceConfig2A
- Christoph requires this for the vmware tools installer

svn path=/trunk/; revision=39382
2009-02-04 09:34:05 +00:00
Christoph von Wittich
cd58e6643a hackfix .spec file to prevent a broken export table
svn path=/trunk/; revision=39381
2009-02-04 07:01:47 +00:00
Steven Edwards
e84a9a9093 Hacks to get telnetd to work in XP and Wine
- turn off unicode in rbuild file and serviceentry.c
   Its not unicode yet anyway

 - Disable authentication stuff
    

svn path=/trunk/; revision=39380
2009-02-04 06:35:57 +00:00
Christoph von Wittich
bf53811ef2 set version to 7,0,2600,2180 otherwise some apps will try to overwrite it
svn path=/trunk/; revision=39379
2009-02-04 06:29:23 +00:00
Christoph von Wittich
7c2dea1a27 disable dprints
svn path=/trunk/; revision=39378
2009-02-04 06:10:19 +00:00
Christoph von Wittich
217745c949 fix formatting (again)
svn path=/trunk/; revision=39377
2009-02-04 06:04:24 +00:00
Steven Edwards
29f2647a3e Enable the hackish telnet daemon for network testing.
Please forgive this commit as this does cause warnings.
I will be cleaning this up, time premitting over the next
few weeks.


svn path=/trunk/; revision=39376
2009-02-04 04:55:01 +00:00
Art Yerkes
37d6382770 Add a per-directory cache of short filenames allowing us to generate them
uniquely.  dir /x now shows properly unambiguous short filenames.
Also, we weren't FsRtlEnterFilesystem ing in directory operations.  Fix that
too.

svn path=/trunk/; revision=39374
2009-02-04 03:39:23 +00:00
Timo Kreuzer
b6eeb280a5 merge 34700, 34802, 35517, 35650 from amd64 branch
NCI:
34802/34802/35517: Create x64 syscall stubs (Timo Kreuzer)
35650 Don't add stdcall decorations to amd64 syscalls.(Samuel Serapión)

svn path=/trunk/; revision=39369
2009-02-04 01:34:17 +00:00
Timo Kreuzer
c13d343799 merge 34730 from amd64 branch
wmc: include string.h to silence implicit declaration warnings (Samuel Serapión)

svn path=/trunk/; revision=39368
2009-02-04 01:26:13 +00:00
Timo Kreuzer
5119df66d4 remove unnessesary dependency to msvcrt
svn path=/trunk/; revision=39366
2009-02-04 00:14:47 +00:00
Timo Kreuzer
a96e30d6d8 use i386/setjmplongjmp.s only on x86 architecture
svn path=/trunk/; revision=39364
2009-02-04 00:06:46 +00:00
Timo Kreuzer
53155efcf6 dxtn: convert to spec
svn path=/trunk/; revision=39362
2009-02-04 00:00:05 +00:00
Timo Kreuzer
3b0ffb9af3 tacert: use ULONG format instead of long long when displaying the time in ms.
svn path=/trunk/; revision=39359
2009-02-03 23:52:25 +00:00
Timo Kreuzer
cdbc9c6439 ping: silence warnings on x64
svn path=/trunk/; revision=39357
2009-02-03 23:37:08 +00:00
Timo Kreuzer
1a95247634 merge 36907 from amd64 branch:
taskmgr: Use DWORD_PTR instead of DWORD for the Affiity mask. (Samuel Serapión)

svn path=/trunk/; revision=39354
2009-02-03 23:03:35 +00:00
Colin Finck
7091708541 Gabriel Ilardi (gabrielilardi@hotmail.it)
- Allow only one instance of Task-Manager to be run at the same time

See issue #3976 for more details.

svn path=/trunk/; revision=39353
2009-02-03 22:25:39 +00:00
Timo Kreuzer
b24b8f4a23 Don't cast pointers to ULONG!
svn path=/trunk/; revision=39351
2009-02-03 21:52:49 +00:00
Dmitry Chapyshev
b45c5496ad - Add missed structure and function to shellapi.h
- Add more stubs to shell32

svn path=/trunk/; revision=39350
2009-02-03 20:56:26 +00:00
Danny Götte
139a564b2f * added comments
* continue documentation
* formatting
* simplify code
* change folder structure to separate classes by their usage
* fix minor bugs the code review has revealed

svn path=/branches/danny-web/; revision=39349
2009-02-03 20:41:31 +00:00
Dmitry Chapyshev
861fec6cd7 - Fix build. Sorry :)
svn path=/trunk/; revision=39348
2009-02-03 20:11:44 +00:00
Dmitry Chapyshev
a018d892fe - Add more stubs
- Fix return value for PathIsTemporaryW

svn path=/trunk/; revision=39344
2009-02-03 19:41:15 +00:00
Gregor Schneider
bd65505332 Delete old XLateObj before creating a new one, fixes a mem leak when installing .Net 2.0 Framework
svn path=/trunk/; revision=39343
2009-02-03 19:37:18 +00:00
Gregor Brunmar
fe9de35fff D3D9:
* Fixed compilation error
* Implemented IDirect3DBaseTexture9's and IDirect3DTexture9's GetAutoGenFilterType(), GetLOD() and GetLevelCount()

svn path=/trunk/; revision=39341
2009-02-03 18:55:20 +00:00
Colin Finck
98346f3252 Revert 39295 on request of hpoussin
svn path=/trunk/; revision=39340
2009-02-03 17:27:10 +00:00
Johannes Anderwald
613f4b1847 - fix bug 4126 by Mario Kacmar
svn path=/trunk/; revision=39339
2009-02-03 16:55:54 +00:00
Gregor Schneider
7da4798c20 Testcase extension by Evgeny Boltik <BSTSoft AT narod DOT ru>:
- Test StretchBlt ROP codes similar to BitBlt
- Offset drawing coordinates with SetWindowOrgEx
- Show an overview of several hatched brushes
- This was used to test r39336, r39332 and r39326 and the src&dst StretchBlt ROP support

svn path=/trunk/; revision=39337
2009-02-03 16:11:31 +00:00
Gregor Schneider
b4c66a205a Offset the source and destination rectangles as pointed out in bug #4107. Remove respective FIXME.
svn path=/trunk/; revision=39336
2009-02-03 15:58:46 +00:00
Christoph von Wittich
0c9b0cdd9d don't return FALSE when there is a DataSectionObject without reference as it breaks ole32 storage
needs further investigation

svn path=/trunk/; revision=39334
2009-02-03 15:32:36 +00:00
Gregor Schneider
acf1b854aa Brush displacement fix from r39326 for 24bpp.
svn path=/trunk/; revision=39332
2009-02-03 15:17:31 +00:00
Dmitry Chapyshev
b89298805f - Add correct names for all stubs (based on information from http://www.geoffchappell.com/studies/windows/shell/shell32/api/index.htm)
- Fix SHSetShellWindowEx

svn path=/trunk/; revision=39329
2009-02-03 15:07:53 +00:00
Christoph von Wittich
8517038812 fix formatting
svn path=/trunk/; revision=39327
2009-02-03 14:50:50 +00:00
Gregor Schneider
a9d8af1af6 Evgeny Boltik <BSTSoft AT narod DOT ru>:
Fix a brush displacement that was shown after clipping a bitblitted picture (8/16/32bpp). Bug #4107

svn path=/trunk/; revision=39326
2009-02-03 14:43:19 +00:00
Gregor Schneider
e4ca01940c Forgot to commit this code in r39227, needed for basic clipping.
svn path=/trunk/; revision=39323
2009-02-03 14:33:23 +00:00
Dmitry Chapyshev
df7415ebd9 - FIXME -> TRACE for InvalidateDriveType. Unimplemented in WinXP SP3
- Add stub for SHFindComputer, SHLimitInputEdit, SHLimitInputCombo
- Add comments

svn path=/trunk/; revision=39322
2009-02-03 13:55:04 +00:00
Colin Finck
e191c57fb3 Rename the wallpaper to conform with ISO 9660:1988 and make cdmake happy...
svn path=/trunk/; revision=39318
2009-02-03 13:26:30 +00:00
Dmitry Chapyshev
1956faaa0b - Remove shell.spec and version16.rc
svn path=/trunk/; revision=39316
2009-02-03 12:54:51 +00:00
Dmitry Chapyshev
ac5c910802 - Add file for stubs
- Add stub implementation for SHLocalAlloc, SHLocalFree, SHLocalReAlloc, AddCommasW, ShortSizeFormatW
- Partially remove unneeded stuff from .spec

svn path=/trunk/; revision=39315
2009-02-03 12:50:50 +00:00
Christoph von Wittich
599e30a39f -check for filesize in MmCanFileBeTruncated
-make use of MmCanFileBeTruncated in VfatSetAllocationSizeInformation
-make use of MmCanFileBeTruncated in VfatSetInformation (patch by arty with some fixes from me)
thanks to Alex for the hint that we miss the MmCanFileBeTruncated check
fixes "Anyone has referenced a cache segment behind the new size."
See issue #712 for more details.

svn path=/trunk/; revision=39314
2009-02-03 12:39:55 +00:00
Colin Finck
e274f4c714 Import the 4:3 version of the ReactOS wallpaper by forum user "Angelus" (jedi.knight@wanadoo.es), including the original 1440x1080 JPG and a 1024x768 BMP.
It is now the default wallpaper for releases.

I also reorganized the ReadMe file to make tracking the sources of these wallpapers easier.

svn path=/trunk/; revision=39307
2009-02-03 11:16:51 +00:00
Colin Finck
3f5fd0f760 Fix freeing the allocated string SID
svn path=/trunk/; revision=39304
2009-02-03 09:39:57 +00:00
Dmitry Chapyshev
b7dc6dc3d9 - Add stub for SHGetIconOverlayIndexA/W
- Remove "-noname" attribute from ILAppendID function

svn path=/trunk/; revision=39303
2009-02-03 09:29:48 +00:00
Dmitry Chapyshev
62cd647ea4 - Small cleanup shell32. We don't support non-unicode OSes and Windows XP/2003 calls unicode functions
svn path=/trunk/; revision=39302
2009-02-03 09:23:16 +00:00
Michael Martin
0c9316bd54 - Change MultiByteToWideChar to match windows behavior. Fix part 1 of ? for bug #3740.
svn path=/trunk/; revision=39301
2009-02-03 09:09:06 +00:00
Dmitry Chapyshev
edf41d63c7 - Update shell32 exports to 6.0.2900.5686
svn path=/trunk/; revision=39300
2009-02-03 07:37:10 +00:00
Colin Finck
d7ca3b27e6 Set the APPDATA environment variable when logging in based on the information SHGetFolderPathW returns for the passed User Token.
Windows seems to do this the same way (verified with GNU strings)

svn path=/trunk/; revision=39295
2009-02-02 23:08:51 +00:00
Colin Finck
0228866724 Support passing a Token to SHGetFolderPathW and similar functions
svn path=/trunk/; revision=39294
2009-02-02 23:06:33 +00:00
Dmitry Gorbachev
e7a9a76264 Move hack to other place because of bug #4120.
svn path=/trunk/; revision=39292
2009-02-02 22:31:54 +00:00
Dmitry Gorbachev
2e97505e3a Add new strings to translations.
svn path=/trunk/; revision=39291
2009-02-02 21:44:31 +00:00
Kamil Hornicek
4e5afc5ce8 - sync dinput with wine
svn path=/trunk/; revision=39290
2009-02-02 21:09:39 +00:00
Christoph von Wittich
cfad1c5307 halfplement MmCanFileBeTruncated
svn path=/trunk/; revision=39289
2009-02-02 17:14:24 +00:00
Dmitry Gorbachev
a120dfab47 Hack-close TCP connection. Bug #1283.
svn path=/trunk/; revision=39285
2009-02-02 12:28:31 +00:00
Christoph von Wittich
0db38b3b38 init dwTotalRecords to 0
fixes a crash in case of GetNumberOfEventLogRecords fails

svn path=/trunk/; revision=39284
2009-02-02 08:54:57 +00:00
Art Yerkes
0eea5df223 Suppress a warning about -1, since wchar_t is typically unsigned.
svn path=/trunk/; revision=39283
2009-02-02 06:19:01 +00:00
Timo Kreuzer
6c8b5da3ba timedate.cpl: Fix size of the clock on both windows and reactos on any screen resolution.
svn path=/trunk/; revision=39282
2009-02-02 01:33:13 +00:00
Timo Kreuzer
e02dd69903 gdi32: Fix and enable usermode implementation of SetWindowExtEx and SetViewportExtEx.
Win32k: remove NtGdiSetWindowExtEx and NtGdiSetViewportExtEx, rewrite IntFixIsotropicMapping, implement IntGetViewportExtEx

svn path=/trunk/; revision=39281
2009-02-02 00:49:19 +00:00
Timo Kreuzer
849e2133ac Add tests for SetWindowExtEx, one more test for CreateCompatibleDC
svn path=/trunk/; revision=39280
2009-02-02 00:37:01 +00:00
Hervé Poussineau
d2ba20e8fa Take into account environment variables specified by gina DLL
svn path=/trunk/; revision=39274
2009-02-01 19:52:41 +00:00
Christoph von Wittich
50195e9741 sync pdh with wine 1.1.14
svn path=/trunk/; revision=39272
2009-02-01 17:20:58 +00:00
Christoph von Wittich
3d89a72112 sync cryptdlg with wine 1.1.14
svn path=/trunk/; revision=39271
2009-02-01 17:13:15 +00:00
Christoph von Wittich
cf017c8a04 sync schannel with wine 1.1.14
svn path=/trunk/; revision=39270
2009-02-01 17:09:58 +00:00
Christoph von Wittich
4d1d1fe9c5 fix debugprint
svn path=/trunk/; revision=39268
2009-02-01 14:01:44 +00:00
Christoph von Wittich
70f8f48451 sync hlink with wine 1.1.14
svn path=/trunk/; revision=39267
2009-02-01 13:53:08 +00:00
Christoph von Wittich
fbed23740e sync urlmon to wine 1.1.14
svn path=/trunk/; revision=39266
2009-02-01 13:46:44 +00:00
Christoph von Wittich
05b450ba65 uncomment the exports
svn path=/trunk/; revision=39265
2009-02-01 13:38:30 +00:00
Christoph von Wittich
faf395d839 stub some missing functions
svn path=/trunk/; revision=39264
2009-02-01 13:38:04 +00:00
Dmitry Chapyshev
9caa5c511f - Sync dwmapi with Wine head
svn path=/trunk/; revision=39262
2009-02-01 10:34:53 +00:00
Dmitry Chapyshev
79b2c29192 - Add stub for SHOpenFolderAndSelectItems
- Add SHParseDisplayName to .spec file
foobar2000 now it is started normally

svn path=/trunk/; revision=39261
2009-02-01 10:03:33 +00:00
Christoph von Wittich
4ef810bd41 sync netapi32 with wine 1.1.14
svn path=/trunk/; revision=39260
2009-02-01 07:57:15 +00:00
Dmitry Gorbachev
697550c010 Sync Czech file with English file. Radek Liska, bug #4105.
svn path=/trunk/; revision=39259
2009-02-01 06:33:48 +00:00
Christoph von Wittich
63ff65c648 sync some LsaQueryDomainInformationPolicy stuff with wine 1.1.14
fixes all advapi32 lsa winetests
fixes all netapi32 wksta winetests

svn path=/trunk/; revision=39258
2009-02-01 06:14:29 +00:00
Christoph von Wittich
2c235c6653 SystemName == NULL is valid for LsaOpenPolicy
svn path=/trunk/; revision=39257
2009-02-01 05:51:07 +00:00
Christoph von Wittich
9b57ce8177 sync wintrust_winetest with wine 1.1.14
svn path=/trunk/; revision=39256
2009-02-01 05:43:40 +00:00
Christoph von Wittich
5810de951d sync wintrust and mscat32 with wine 1.1.14
svn path=/trunk/; revision=39255
2009-02-01 05:42:03 +00:00
Christoph von Wittich
4a85c6705b don't set LastError as we fake success
svn path=/trunk/; revision=39254
2009-02-01 05:39:56 +00:00
Andrew Greenwood
5fa9003095 Various headers needed to compile the sound support libraries.
svn path=/trunk/; revision=39253
2009-01-31 22:13:30 +00:00
Andrew Greenwood
5bc7ecd049 Abandoning silverblade-audio branch.
General user-mode audio support libraries added.


svn path=/trunk/; revision=39252
2009-01-31 22:11:09 +00:00
Dmitry Chapyshev
607f12562e - FIXME -> TRACE. This function is not implemented in Windows XP SP3.
svn path=/trunk/; revision=39251
2009-01-31 20:57:28 +00:00
Dmitry Chapyshev
29f2b90096 - Implement GetComputerObjectNameA/W (from Wine)
svn path=/trunk/; revision=39250
2009-01-31 20:22:17 +00:00
Colin Finck
5ed8401b33 Radek Liska (radekliska@gmail.com)
- Try to get the Czech netshell working again by copying some missing stuff from the English translation

svn path=/trunk/; revision=39248
2009-01-31 19:27:09 +00:00
Colin Finck
c22c004a09 Update mIRC to 6.35, works under 0.3.8 and as long as this version is the latest one, it doesn't ask for updates all the time :-)
svn path=/trunk/; revision=39246
2009-01-31 17:23:09 +00:00
Dmitry Chapyshev
f71841ce0c - Fix typo (revealed by Kario)
svn path=/trunk/; revision=39244
2009-01-31 16:53:06 +00:00
Dmitry Chapyshev
92ad6e2242 - Add qmgr to build and bootcd
- Add more stuff to bootcd
See issue #4095 for more details.

svn path=/trunk/; revision=39243
2009-01-31 16:49:22 +00:00
Christoph von Wittich
84cc142d0b replace hack by manually generated msiserver.idl_i.c (which should be generated by rbuild)
svn path=/trunk/; revision=39242
2009-01-31 15:46:48 +00:00
Gregor Schneider
3c8f0a1df6 Remove dead StretchBlt code
svn path=/trunk/; revision=39241
2009-01-31 15:38:16 +00:00
Dmitry Chapyshev
2ab5d20abb - Add some headers from Wine
- Import qmgr from Wine (not included yet to build)

svn path=/trunk/; revision=39240
2009-01-31 15:32:09 +00:00
Christoph von Wittich
15a996c26b sync shlwapi_winetest with wine 1.1.14
svn path=/trunk/; revision=39239
2009-01-31 14:49:08 +00:00
Christoph von Wittich
56a6541f3d sync shlwapi with wine 1.1.14
svn path=/trunk/; revision=39238
2009-01-31 14:48:46 +00:00
Christoph von Wittich
66e2845732 sync crypt32_winetest with wine 1.1.14
svn path=/trunk/; revision=39237
2009-01-31 14:31:11 +00:00
Christoph von Wittich
e09c7694fd sync crypt32 with wine 1.1.14
svn path=/trunk/; revision=39236
2009-01-31 14:28:46 +00:00
Christoph von Wittich
fe9f224169 sync msi_winetest with wine 1.1.14
svn path=/trunk/; revision=39235
2009-01-31 14:17:07 +00:00
Christoph von Wittich
d89de67fd6 sync msi with wine 1.1.14
svn path=/trunk/; revision=39234
2009-01-31 14:13:20 +00:00
Christoph von Wittich
731e445229 add stubs for SHFlushSFCache and SHGetImageList (from wine)
svn path=/trunk/; revision=39233
2009-01-31 14:01:57 +00:00
Christoph von Wittich
5d4d38c175 make explicit use of unicode functions
svn path=/trunk/; revision=39232
2009-01-31 13:44:48 +00:00
Christoph von Wittich
da4305f0d2 add lodctr
svn path=/trunk/; revision=39231
2009-01-31 13:21:11 +00:00
Christoph von Wittich
976a57af06 add loadperf and lodctr from wine 1.1.14
svn path=/trunk/; revision=39228
2009-01-31 13:09:48 +00:00
Gregor Schneider
2bb3d73470 Evgeny Boltik <BSTSoft AT narod DOT ru>:
Generic StretchBlt implementation for all bitrates with partial ROP and clipping support, see bug #4075.
Some changes from me applied to the patch:
- ROP variables renamed, applied consistent indentation, abort operation if pattern ROP and dprint once, split src and dst dprints
- Access source surface only if source is actually used, fixes mem access crashes
- Offer external drivers a NULL surface ptr if source is not used, since they (VMWare for example) access it although they shouldn't (another crash)
- Fixes bug #2609, support for pattern ROPs will be added after some restructuring
- Clipping still has some issues (bugs 3325, 3477, 4089) which seem to be related to IntEng- and EngStretchBlt

svn path=/trunk/; revision=39227
2009-01-31 13:05:11 +00:00
Johannes Anderwald
a51869e510 - Fix a few definitions
svn path=/trunk/; revision=39226
2009-01-31 12:59:56 +00:00
Christoph von Wittich
cca55b4587 sync ole32 with wine 1.1.14
svn path=/trunk/; revision=39225
2009-01-31 12:40:36 +00:00
Christoph von Wittich
5bb24c753a sync riched20 with wine 1.1.14
svn path=/trunk/; revision=39224
2009-01-31 12:10:24 +00:00
Christoph von Wittich
804d0d56f0 sync cryptui with wine 1.1.14
svn path=/trunk/; revision=39223
2009-01-31 11:47:29 +00:00
Christoph von Wittich
16d774c385 sync msxml3_winetest to wine 1.1.14
svn path=/trunk/; revision=39222
2009-01-31 11:27:33 +00:00
Christoph von Wittich
0704f1af38 sync msxml3 to wine 1.1.14
svn path=/trunk/; revision=39221
2009-01-31 11:27:22 +00:00
Dmitry Gorbachev
b0bff7e4d7 "whois" -> "nicname"
svn path=/trunk/; revision=39220
2009-01-31 09:37:35 +00:00
Christoph von Wittich
9d23dc93bf tabs -> spaces
svn path=/trunk/; revision=39219
2009-01-31 08:48:59 +00:00
Art Yerkes
37866eb8f9 Fix misuse of std::string in assuming that it's always null terminated, and that
the c_str result is writable.  

svn path=/trunk/; revision=39218
2009-01-31 08:43:10 +00:00
Gregor Schneider
7059620a5e Unify identical StretchBlt implementations in preparation of partial ROP suppport.
svn path=/trunk/; revision=39217
2009-01-30 20:02:58 +00:00
Colin Finck
61c4b88ea4 Fix some deadlinks
svn path=/trunk/; revision=39215
2009-01-30 17:13:37 +00:00
Stefan Ginsberg
febd189901 - Inline Guarded Mutex and Fast Mutex implementations when called from within the kernel
svn path=/trunk/; revision=39214
2009-01-30 16:45:17 +00:00
Dmitry Chapyshev
01eaa29cb3 - Fix 1 wine console test
svn path=/trunk/; revision=39211
2009-01-30 14:36:57 +00:00
Dmitry Chapyshev
e1e7e5586d - Formatting fix. No code change
svn path=/trunk/; revision=39210
2009-01-30 14:25:00 +00:00
Dmitry Chapyshev
b40287d6f5 .def -> .spec
svn path=/trunk/; revision=39209
2009-01-30 08:54:30 +00:00
Dmitry Chapyshev
47d9dbb647 - Add activeds from Wine
svn path=/trunk/; revision=39208
2009-01-30 08:51:45 +00:00
Dmitry Chapyshev
1ba757fca4 - Update header
svn path=/trunk/; revision=39207
2009-01-30 08:49:40 +00:00
Dmitry Chapyshev
5de5bc84a2 - Update Greek translation
- Update Italian translation
See issue #4078,4088 for more details.

svn path=/trunk/; revision=39206
2009-01-30 08:19:51 +00:00
Timo Kreuzer
b9e20bc7be formatting, no code change
svn path=/trunk/; revision=39203
2009-01-29 21:33:38 +00:00
Timo Kreuzer
891cc22a1e Fix IntGdiSetMapMode
svn path=/trunk/; revision=39202
2009-01-29 19:17:53 +00:00
Timo Kreuzer
fa581e2636 Add more tests for SetMapMode
svn path=/trunk/; revision=39201
2009-01-29 19:16:45 +00:00
Christoph von Wittich
9adff95dd9 fix lsa handle leak
See issue #3999 for more details.

svn path=/trunk/; revision=39196
2009-01-29 14:42:13 +00:00
Matthias Kupfer
dc406bd2bc remove outdated unimplemented MessageBox
svn path=/trunk/; revision=39195
2009-01-29 13:53:13 +00:00
Christoph von Wittich
4756f82dd3 define NDEBUG
svn path=/trunk/; revision=39194
2009-01-29 12:30:02 +00:00
Dmitry Chapyshev
d5d69b5bb2 - Update Russian translation
svn path=/trunk/; revision=39193
2009-01-29 10:34:29 +00:00
Colin Finck
2028a69cc0 - Update versions of Firefox, Thunderbird, Opera and SeaMonkey.
The previous links were all broken.
- Remove the Thunderbird 1.5 entry, I didn't find any official working download link for it and version 2.x can also be used for testing.

svn path=/trunk/; revision=39187
2009-01-28 21:01:26 +00:00
Matthias Kupfer
165d233b51 one more attempt to fix clock size, absolute coord values for hands and clock replaced by scale of client size
svn path=/trunk/; revision=39183
2009-01-28 18:00:23 +00:00
Johannes Anderwald
9ef3e5fb21 - Fix exhaustive debug message flood
svn path=/trunk/; revision=39182
2009-01-28 16:30:19 +00:00
Johannes Anderwald
0b4e713e5d - Add wdmaud and sysaudio to bootcd
svn path=/trunk/; revision=39181
2009-01-28 16:19:37 +00:00
Gregor Schneider
5fbf308acc Set the header size as expected instead of setting the bitmap width
svn path=/trunk/; revision=39180
2009-01-28 15:43:02 +00:00
Gregor Schneider
aeb01dd869 - bcSize holds the size of the BITMAPHEADER structure (not the image size) and should already be set
- Clean up unneeded comments

svn path=/trunk/; revision=39179
2009-01-28 15:35:57 +00:00
Johannes Anderwald
3f066801c8 - Implement enumerating available virtual audio devices and opening them
svn path=/trunk/; revision=39178
2009-01-28 15:24:57 +00:00
Christoph von Wittich
45041346e6 -sync RtlDeleteTimer with wine
Giannis Adamopoulos (johnyadams at hotmail dot com)

svn path=/trunk/; revision=39177
2009-01-28 14:08:13 +00:00
Christoph von Wittich
0d38c9174f fix formatting
svn path=/trunk/; revision=39176
2009-01-28 13:55:37 +00:00
Christoph von Wittich
13b4ba7cc6 calculate toolbar height instead of use the hardcoded value 35
svn path=/trunk/; revision=39175
2009-01-28 12:28:11 +00:00
Matthias Kupfer
c1628a99dd Fix and add German translation
svn path=/trunk/; revision=39174
2009-01-28 12:20:12 +00:00
Christoph von Wittich
c2e449ca08 update bi->biBitCount before using it - fixes 5 gdi32 bitmap winetests
svn path=/trunk/; revision=39172
2009-01-28 11:55:56 +00:00
Aleksey Bragin
bb2d6f3675 Rob Shearman <robertshearman@gmail.com>
widl: Add a new function, type_alias_get_aliasee to wrap the retrieval of the type that the alias aliases.

Rob Shearman <robertshearman@gmail.com> 
widl: Add new type_get_type and type_get_real_type_type functions.
Use these to implement a few helper functions. Change the type verification in type accessor functions to use these new functions.

Austin English <austinenglish@gmail.com>
widl: Fix a compiler warning.

Alexandre Julliard <julliard@winehq.org>
widl: We need an offset after the correlation descriptor for unencapsulated unions.

svn path=/trunk/; revision=39170
2009-01-28 10:41:01 +00:00
KJK::Hyperion
ea39ea0e30 modified ntoskrnl/include/internal/ob.h
modified   ntoskrnl/ob/obhandle.c
   New helper routine ObGetProcessHandleCount to safely read the count of handles in a process without messing with Ob internals
   Goodbye ObpGetHandleCountByHandleTable

modified   ntoskrnl/ex/sysinfo.c
modified   ntoskrnl/ps/query.c
   Read handle counts with ObGetProcessHandleCount instead of ObpGetHandleCountByHandleTable
   Fixes at least one crash

Thanks to Stefan Ginsberg for reporting the issue and testing
Thanks to Alex Ionescu for code review and suggestions

See issue #4050 for more details.

svn path=/trunk/; revision=39169
2009-01-28 10:32:43 +00:00
KJK::Hyperion
4897bf42c4 Corrected prototype of SystemFunction036 (RtlGenRandom): BOOL -> BOOLEAN
Fixes a build regression introduced in r39167

svn path=/trunk/; revision=39168
2009-01-28 09:58:46 +00:00
Aleksey Bragin
5a2b19609a - Add RtlGenRandom.
svn path=/trunk/; revision=39167
2009-01-28 09:38:49 +00:00
Christoph von Wittich
5660c9a6d9 draw a rect around the (not yet drawn) image
svn path=/trunk/; revision=39166
2009-01-28 09:09:30 +00:00
Christoph von Wittich
12883a745e remove redundant code
svn path=/trunk/; revision=39165
2009-01-28 08:56:55 +00:00
Dmitry Chapyshev
2c7e4bb2d7 - Add more TODO to .def
svn path=/trunk/; revision=39164
2009-01-28 08:22:39 +00:00
Dmitry Chapyshev
156ea61f0f - More implement User32InitializeImmEntryTable
svn path=/trunk/; revision=39163
2009-01-28 08:08:31 +00:00
Johannes Anderwald
5e4a5d2b4b -fix build
svn path=/trunk/; revision=39159
2009-01-28 02:06:55 +00:00
Johannes Anderwald
04a9e81b9e - Implement initializing routines for wdmaud
- Register plug&play notification routines for guid KSCATEGORY_SYSAUDIO

svn path=/trunk/; revision=39158
2009-01-28 00:04:00 +00:00
Art Yerkes
a565c5b364 Finish fixing round trip of gmutex's various lock bits. Patch by alex ionescu.
svn path=/trunk/; revision=39157
2009-01-27 23:11:50 +00:00
Art Yerkes
548f7458c7 Remove extra args.
svn path=/trunk/; revision=39156
2009-01-27 23:04:10 +00:00
James Tabor
65254afcef - Set the length for IntGetWindowPlacement.
svn path=/trunk/; revision=39154
2009-01-27 22:04:37 +00:00
James Tabor
ac781172f7 - Quick implemention of NtUserGetInternalWindowPos with internal support function IntGetWindowPlacement.
svn path=/trunk/; revision=39153
2009-01-27 21:57:15 +00:00
Johannes Anderwald
97111999d7 - Fix msvc project generation for kernel mode drivers without a driver entry
svn path=/trunk/; revision=39152
2009-01-27 21:52:36 +00:00
Dmitry Chapyshev
a167adfcb4 - Partially implement User32InitializeImmEntryTable
svn path=/trunk/; revision=39150
2009-01-27 21:23:44 +00:00
Johannes Anderwald
d9286e5bec - Register sysaudio device interfaces
svn path=/trunk/; revision=39149
2009-01-27 20:02:50 +00:00
Art Yerkes
aa1756a335 Not sure if anybody else uses ccache, but this saves almost 800 recompilations
every time wmc runs.

svn path=/trunk/; revision=39148
2009-01-27 19:58:30 +00:00
Dmitry Chapyshev
74e38ab6c0 - Add file for imm-functions
- Move all imm-functions to imm.c

svn path=/trunk/; revision=39147
2009-01-27 19:06:46 +00:00
Dmitry Chapyshev
3dabe3bd8d - Direct call NtSetInternalWindowPos
- Add TODO for GetInternalWindowPos

svn path=/trunk/; revision=39146
2009-01-27 18:47:08 +00:00
Dmitry Chapyshev
22ad6867b2 - Sync gdiplus with Wine head
svn path=/trunk/; revision=39144
2009-01-27 18:03:33 +00:00
Johannes Anderwald
820978650e - Fix registered guids for IPortMidi
- Fix InterfaceGuids array in IPortTopology 
- Add a hack to prevent es1371 driver from crashing

svn path=/trunk/; revision=39143
2009-01-27 17:54:46 +00:00
Johannes Anderwald
bc9b8cbda8 - Add guids for IPortMidi and IMiniportMidi
- Add UNIMPLEMENTED macro to NewPortDMus
- Partly implement IPortMidi (based on IPortTopology)

svn path=/trunk/; revision=39142
2009-01-27 17:38:56 +00:00
Johannes Anderwald
9577cba3fa - Add macro to avoid warning
- Revert my fix to IID_IPortMidi

svn path=/trunk/; revision=39141
2009-01-27 17:35:34 +00:00
Christoph von Wittich
6e7271a51d -don't load the image in WM_PAINT
-return the correct values when handling a window message
-free resources
-...

svn path=/trunk/; revision=39140
2009-01-27 17:14:00 +00:00
Johannes Anderwald
d74e05fa62 - Fix a typo
svn path=/trunk/; revision=39139
2009-01-27 16:53:18 +00:00
Johannes Anderwald
5a8c721c32 - Fix a bug ;)
svn path=/trunk/; revision=39137
2009-01-27 16:44:08 +00:00
Christoph von Wittich
bce5ca675d -don't delete a DC return from BeginPaint
-DPRINT1 -> DPRINT

svn path=/trunk/; revision=39135
2009-01-27 16:01:47 +00:00
Gregor Schneider
906bea5252 Update IntEngCreateSrcMonoXlate parameter names and function call with brush colors after logic changes of r38633.
Based on the patch of Evgeny Boltik <bstsoft AT narod DOT ru>, see bug #4070 for more info.
Fixes inverted colors when using hatched brushes.

svn path=/trunk/; revision=39134
2009-01-27 15:36:07 +00:00
Johannes Anderwald
42bd582bfe - Rename device context struct
- patch by Chris

svn path=/trunk/; revision=39132
2009-01-27 12:43:33 +00:00
Art Yerkes
16a9e8d714 This code used to round down the number of waiters to a multiple of 2. Fine
if there are exactly one or zero waiters, not fine if there are 2 or more.

svn path=/trunk/; revision=39130
2009-01-27 09:35:01 +00:00
Daniel Reimer
d68970475c Bug 4061: Italian resources updates by Paolo Devoti
Bug 4052: install more Administrative Tools by Mario Kacmar
Bug 4071: update slovak translations by Mario Kacmar
Bug 4063: Greek update for ReactOS 0.3.8 second part by Apostolos Alexiadis
Bug 4047: spanish files by Javier Remacha

svn path=/trunk/; revision=39129
2009-01-27 08:59:39 +00:00
Dmitry Gorbachev
3ced760410 Rename Lithuanian keyboard layout. Vytis Girdzijauskas, bug #3249.
svn path=/trunk/; revision=39128
2009-01-27 08:58:15 +00:00
Dmitry Chapyshev
7bc719fde5 - Update resources
svn path=/trunk/; revision=39127
2009-01-27 08:09:09 +00:00
Dmitry Gorbachev
23abc262d0 Convert French file from UTF-8 to CP-1252. Add new strings.
svn path=/trunk/; revision=39125
2009-01-27 01:38:48 +00:00
Kamil Hornicek
40f2a73fe9 - fix build
svn path=/trunk/; revision=39123
2009-01-26 23:36:40 +00:00
Dmitry Gorbachev
98718ab5aa Update Czech keyboard layout. Patch from Radek Liska. Bug #4031.
svn path=/trunk/; revision=39122
2009-01-26 23:04:22 +00:00
KJK::Hyperion
3384aa2e05 Begin moving rules out of modulehandler.cpp and into makefile include rules.mak, where they will be more readable and manageable. Currently implemented: target C compiler and target C++ compiler rules. Please do a clean build if possible. Testing with unusual output paths appreciated
Supersedes r39111, with the following amendments:

added      tools/rbuild/backend/mingw/rules.mak
   The wrong function was being used to calculate the path of generated files: implement the right function, and use it


svn path=/trunk/; revision=39120
2009-01-26 22:44:56 +00:00
Dmitry Gorbachev
8e354bfb10 Calculator update by Radek Liska (with some changes). Bug #4064.
svn path=/trunk/; revision=39119
2009-01-26 22:27:19 +00:00
Cameron Gutman
ac6f717294 - Add a temporary hack for the double-freeing issue that memtrack keeps catching
- I would use my branch for this but I am doing some work on it that has broken some things for now

svn path=/trunk/; revision=39118
2009-01-26 20:45:01 +00:00
Kamil Hornicek
b03a86437a - update Mesa to version 7.3
- add reactos.diff
- disable broken OS SSE exception test, bug was filled for this but it's not needed anyway
- remove unused drivers

svn path=/trunk/; revision=39117
2009-01-26 20:42:55 +00:00
Aleksey Bragin
c41b00f625 Giannis Adamopoulos <johnyadams@hotmail.com>
- Correctly assign NtSystemRoot and remove assumption that number of partitions equals number of harddisks.
- Remove a hack from IopApplyRosCdromArcHack. Fixes LiveCD issues.
See issue #3170 for more details.

svn path=/trunk/; revision=39116
2009-01-26 20:00:59 +00:00
Johannes Anderwald
1c203e354e - Use InterlockedIncrement, InterlockedDecrement over intrinsics
- Fix ordering of IDmaChannelSlaveVtbl which led to an infinite loop
- Add a few guids
- Fix parameter for KeWaitForSingleObject (spotted by Christoph)
- Also check for IID_IPort in IPortTopology 
- Fix priority boost IServiceGroup

svn path=/trunk/; revision=39115
2009-01-26 17:38:22 +00:00
Aleksey Bragin
c93503ebd7 - Silence debuglog spam from msimtf.
svn path=/trunk/; revision=39113
2009-01-26 16:56:11 +00:00
Aleksey Bragin
ba54ffaf10 - Revert 39111: "Begin moving rules out of modulehandler.cpp and into makefile include rules.mak, where they will be more readable and manageable. Currently implemented: target C compiler and target C++ compiler rules. Please do a clean build if possible. Testing with unusual output paths appreciated"
svn path=/trunk/; revision=39112
2009-01-26 16:55:20 +00:00
KJK::Hyperion
ab6dc12eeb Begin moving rules out of modulehandler.cpp and into makefile include rules.mak, where they will be more readable and manageable. Currently implemented: target C compiler and target C++ compiler rules. Please do a clean build if possible. Testing with unusual output paths appreciated
svn path=/trunk/; revision=39111
2009-01-26 14:26:15 +00:00
Johannes Anderwald
eef5b9c252 - Fix build
svn path=/trunk/; revision=39107
2009-01-26 10:41:59 +00:00
Johannes Anderwald
44ff72e130 - Include mmreg.h for portcls.h
- Add KsDefaultForwardIrp prototype
- Fix KSPROPSETID_Connection
- Fix KSOBJECT_CREATE_ITEM struct
- Add KSDATAFORMAT_WAVEFORMATEX
- Add KSDATAFORMAT_SUBTYPE_PCM, KSDATAFORMAT_SPECIFIER_WAVEFORMATEX
- Add WAVE_FORMAT_PCM define

svn path=/trunk/; revision=39106
2009-01-26 10:18:53 +00:00
Johannes Anderwald
967d764b06 - Reimplement SysAudio device initilization
- Register Plug&Play notification for KS_CATEGORY_AUDIO events

svn path=/trunk/; revision=39105
2009-01-26 10:08:17 +00:00
Johannes Anderwald
5284f4a283 - Start implementing object bag support functions
- Implement KsCreateDevice, KsAddDevice, KsInitializeDriver
- Add KsDefaultForwardIrp stub

svn path=/trunk/; revision=39104
2009-01-26 10:05:46 +00:00
Dmitry Chapyshev
7685b6a1a8 .def -> .spec
svn path=/trunk/; revision=39103
2009-01-26 09:27:47 +00:00
Christoph von Wittich
1211da2f14 -fix header
-set entrypoint="0"

svn path=/trunk/; revision=39102
2009-01-26 07:29:08 +00:00
Christoph von Wittich
dd1b99bd89 no DriverEntry in here -> entrypoint="0"
svn path=/trunk/; revision=39101
2009-01-26 07:09:06 +00:00
Danny Götte
2c1fa87b2c replace tinyMCE 2.1.0 with 3.2.1.1 and move it into another directory
svn path=/branches/danny-web/; revision=39100
2009-01-25 20:47:35 +00:00
Dmitry Chapyshev
9fc12fc21d - .def -> .spec
- Fix telephon.cpl
- Small fix hdwwiz
- Delete unneeded files in appwiz

svn path=/trunk/; revision=39099
2009-01-25 18:02:24 +00:00
KJK::Hyperion
2b2de9b92d r39097 was a bad idea, reverting
svn path=/trunk/; revision=39098
2009-01-25 17:18:09 +00:00
KJK::Hyperion
dcbca32fbc modified tools/rbuild/backend/mingw/modulehandler.cpp
Make .d files used for full dependencies depend on the module's .rbuild file

modified   tools/rbuild/backend/mingw/rule.cpp
   New $(buildfile) variable that expands to the module's .rbuild file name

svn path=/trunk/; revision=39097
2009-01-25 16:53:56 +00:00
KJK::Hyperion
f165b7d65f Amendment to r39093. Fixes build
svn path=/trunk/; revision=39096
2009-01-25 16:39:10 +00:00
Jeffrey Morlan
4d6bf5e49a split, splitspace: Allow quotation marks anywhere in an argument, not just the start and end. (Bug 4054)
svn path=/trunk/; revision=39095
2009-01-25 16:39:06 +00:00
Stefan Ginsberg
931eb2e0b0 - Missed fs_rec in last commit
svn path=/trunk/; revision=39094
2009-01-25 16:21:14 +00:00
KJK::Hyperion
ba67551bdf Implement full dependencies for rbuild: changing a header file will now automatically rebuild all modules that include it, directly or indirectly. Very slow, but an irreplaceable tool for header fixing
Full dependencies can be enabled by setting ROS_RBUILDFLAGS=-df
Whether initially enabled or not, once makefile.auto is generated, full dependencies can be enabled or disabled by setting ROS_BUILDDEPS=full or ROS_BUILDDEPS=auto

In case you missed it, full dependencies are VERY SLOW

svn path=/trunk/; revision=39093
2009-01-25 16:19:45 +00:00
Stefan Ginsberg
dbd86db31e - Deprecate global helper.h -- define the various 'helpful macros' per module
svn path=/trunk/; revision=39092
2009-01-25 16:13:16 +00:00
Dmitry Chapyshev
72916420fc - Add stubs for internalConfig, internalNewLocationW, internalRemoveLocation, internalRenameLocationW
svn path=/trunk/; revision=39091
2009-01-25 14:30:57 +00:00
Dmitry Chapyshev
6f92bc9ca5 - Add missed functions
svn path=/trunk/; revision=39090
2009-01-25 12:56:00 +00:00
Dmitry Chapyshev
61ab39a48a - Small fix
svn path=/trunk/; revision=39089
2009-01-25 11:55:02 +00:00
Martin Fuchs
5219191647 code beautification
svn path=/trunk/; revision=39088
2009-01-25 11:54:31 +00:00
Dmitry Chapyshev
bcd29bbeab - Cleanup and implement telephon.cpl
svn path=/trunk/; revision=39087
2009-01-25 11:45:47 +00:00
Danny Götte
9a3fd4e541 * simplify Smarty Filter backend
* show title in entry table again
* make preview working again, now don't open a new window per preview, load into an iframe instaed
* use vertical written text in admin tables, to get an better overview
* use revision copy function only to build new translations
* make admin functions working again, after that ACL & APL changes
* fix a bug in generator: while updating entries, entries where generated too often
* minor bugfixes
* simple style changes

svn path=/branches/danny-web/; revision=39086
2009-01-25 11:25:18 +00:00
Martin Fuchs
002d1e57e4 update to VS2008 format project files
svn path=/trunk/; revision=39085
2009-01-25 11:21:49 +00:00
Martin Fuchs
706b0df927 update XMLStorage to the current version, compatible to VS2008 and GCC@Linux
svn path=/trunk/; revision=39084
2009-01-25 11:20:47 +00:00
Martin Fuchs
a00125aff1 update to VS2008 format project files
svn path=/trunk/; revision=39083
2009-01-25 11:16:54 +00:00
Martin Fuchs
31dbcaed16 add new resource scripts to the project file
svn path=/trunk/; revision=39082
2009-01-25 11:15:56 +00:00
Martin Fuchs
e90c8b1830 add code comment
svn path=/trunk/; revision=39081
2009-01-25 11:05:27 +00:00
Martin Fuchs
e5c2f55545 activate korean resource script
svn path=/trunk/; revision=39080
2009-01-25 10:48:40 +00:00
Dmitry Chapyshev
c86f97876c .def -> .spec
svn path=/trunk/; revision=39079
2009-01-25 10:26:37 +00:00
Martin Fuchs
1940bfea3b fix code page of korean resource script and remove buggy encoding of the "execute" dialog title
svn path=/trunk/; revision=39078
2009-01-25 09:03:27 +00:00
Pierre Schweitzer
052bf353f4 - Fixed a TODO.
- Added volume mount notification

svn path=/trunk/; revision=39077
2009-01-25 08:55:52 +00:00
Pierre Schweitzer
69eda17b58 Fixed a wrong behaviour
svn path=/trunk/; revision=39076
2009-01-25 08:29:42 +00:00
Pierre Schweitzer
6cc7b2d694 Fixed copy/paste
svn path=/trunk/; revision=39075
2009-01-25 07:15:25 +00:00
Pierre Schweitzer
032b62b88f Fixed typos, spotted by Hervé
svn path=/trunk/; revision=39070
2009-01-24 20:41:57 +00:00
Pierre Schweitzer
79b1baec1b Fixed build
svn path=/trunk/; revision=39069
2009-01-24 19:48:38 +00:00
Pierre Schweitzer
e9b336b8e3 Fixed hdwwiz build
svn path=/trunk/; revision=39068
2009-01-24 18:54:14 +00:00
Pierre Schweitzer
5ac93863fa More French translations...
I start hating that language :p

svn path=/trunk/; revision=39067
2009-01-24 18:41:47 +00:00
Pierre Schweitzer
6bb6e1e076 This shouldn't have been commited... Thanks to RapidSVN
svn path=/trunk/; revision=39066
2009-01-24 17:58:28 +00:00
Pierre Schweitzer
edb415aa34 Added/Updated French translation for almost everything in trunk by Amine Khaldi.
With some adjustements I did.

We're ready for FOSDEM :). Real thanks for your work Amine.

Dedicated by Amine to Aleksey : happy birthday ;)

svn path=/trunk/; revision=39065
2009-01-24 17:56:31 +00:00
Michael Martin
9e98d00b9b - Fix Typo.
svn path=/trunk/; revision=39063
2009-01-24 15:52:46 +00:00
Michael Martin
543ed8edd0 - Fix typo.
svn path=/trunk/; revision=39061
2009-01-24 12:28:51 +00:00
Pierre Schweitzer
07c701dd73 "Typo"
svn path=/trunk/; revision=39058
2009-01-24 10:13:21 +00:00
Pierre Schweitzer
ebd3acfd61 Added/Updated French translations for /base, excepted for calc.
svn path=/trunk/; revision=39057
2009-01-24 10:10:25 +00:00
Timo Kreuzer
f7b0b2a29e Mm: Fix page protection flags checks.
svn path=/trunk/; revision=39054
2009-01-24 00:54:02 +00:00
Colin Finck
16c99f33f3 - Convert the function headers to a Doxygen-compatible style
- Fix some typos

svn path=/trunk/; revision=39050
2009-01-23 19:36:35 +00:00
Stefan Ginsberg
07814326c7 - Fix build. Addendum to r39048 (from KJK)
svn path=/trunk/; revision=39049
2009-01-23 15:56:07 +00:00
KJK::Hyperion
f51410ed14 modified tools/rbuild/backend/mingw/modulehandler.cpp
Use a Rule object for formatting PCH rules. Results in an almost identical makefile.auto, the differences (improvements) being:
    - the new rule uses $@ and $< instead of the full filenames
    - the new rule doesn't add the -g option (the module's CFLAGS/CXXFLAGS already contain it)
    - .gch files now depend on the module's .rbuild as well (a standard Rule feature)
   No rebuild needed, but rbuild will force one for most of you anyways

modified   tools/rbuild/backend/mingw/rule.cpp
modified   tools/rbuild/backend/mingw/rule.h
   Rule::Execute now supports an arbitrary set of replaceable variables, too (required for the PCH rule)

svn path=/trunk/; revision=39048
2009-01-23 14:27:12 +00:00
Christoph von Wittich
aba3c0d759 Namea -> Name
svn path=/trunk/; revision=39047
2009-01-23 14:03:45 +00:00
Christoph von Wittich
ef601abbee add missing DllRegisterServer
svn path=/trunk/; revision=39046
2009-01-23 13:46:36 +00:00
Christoph von Wittich
e9823adf33 sync mpr with wine 1.1.13
svn path=/trunk/; revision=39045
2009-01-23 13:29:06 +00:00
Christoph von Wittich
ceecc3cd07 add cryptdlg from wine 1.1.13
svn path=/trunk/; revision=39044
2009-01-23 13:06:33 +00:00
Christoph von Wittich
5d2dae2c69 sync cryptnet with wine 1.1.13
svn path=/trunk/; revision=39042
2009-01-23 12:45:09 +00:00
Aleksey Bragin
f0c446be0d - Stubplement SwapSplayLinks helper function, and make RtlDelete call it.
- Fix a few lines having TABs instead of SPACEs.

svn path=/trunk/; revision=39041
2009-01-23 12:20:37 +00:00
Pierre Schweitzer
41d698006f Added notifications stuff to VCB
svn path=/trunk/; revision=39040
2009-01-23 12:18:38 +00:00
Aleksey Bragin
ff636d548a Christoph von Wittich
- Fix a typo: dereference target device object instead of referencing it in an uninit routine.

svn path=/trunk/; revision=39039
2009-01-23 11:04:05 +00:00
Aleksey Bragin
44f86392fe [FORMATTING]
- Bring formatting closer to ReactOS kernelmode style.

svn path=/trunk/; revision=39038
2009-01-23 11:01:59 +00:00
Christoph von Wittich
d1494fca12 fix stdole2 dependencies
svn path=/trunk/; revision=39037
2009-01-23 10:48:53 +00:00
Aleksey Bragin
eb5644eb1b [FORMATTING]
- Bring formatting closer to ReactOS kernelmode style.
- Fix a typo in a variable name.

svn path=/trunk/; revision=39036
2009-01-23 10:47:32 +00:00
Christoph von Wittich
460906f80f we don't have to link against libjpeg
svn path=/trunk/; revision=39035
2009-01-23 10:36:18 +00:00
Aleksey Bragin
6a5773b11c Alex Vlasov
- Implement operations with directory entries.

svn path=/trunk/; revision=39034
2009-01-23 10:26:02 +00:00
Aleksey Bragin
af8cfd1432 Alex Vlasov
- Implement FAT operations (scanning, finding continuous runs).
- Implement and plug in VCB initialization.

svn path=/trunk/; revision=39033
2009-01-23 10:19:57 +00:00
Aleksey Bragin
ea484badec - Add TAG definition to be compatible with GCC multicharacter constants.
- Change FAT_NTC_VCB to a TAG-based definition.

svn path=/trunk/; revision=39032
2009-01-23 10:09:22 +00:00
Aleksey Bragin
7f06a44898 - Fix FatValidSectorsPerCluster, otherwise it ended up always being true for any sectors amount.
svn path=/trunk/; revision=39031
2009-01-23 10:07:15 +00:00
Aleksey Bragin
06abfd926c Alex Vlasov
- Move and rewrite FAT in-memory structures to fatstruc.h.
- Remove PACKED_LFN_ENTRY structure.
- Add declarations of VCB functions (init, uninit), and FAT scanning.

svn path=/trunk/; revision=39030
2009-01-23 09:49:45 +00:00
Aleksey Bragin
093e6f6d3c Alex Vlasov
- Implement FatRead as a wrapper around internal helper FatiRead.
- Stubplement FatiRead.

svn path=/trunk/; revision=39029
2009-01-23 09:41:30 +00:00
Aleksey Bragin
d86e5e4347 - Bring FatPerformDevIoCtrl to our coding standards (tabs->spaces, comments).
- Change WaitReason to Executive ("A driver should set this value to Executive, ..." (c) WDK)

svn path=/trunk/; revision=39028
2009-01-23 09:28:03 +00:00
Colin Finck
0cedc2a03c Output the string indicating the test which is going to be run in one call.
This should prevent a race condition, when another application also outputs something over the debug line.

svn path=/trunk/; revision=39027
2009-01-22 22:12:13 +00:00
Pierre Schweitzer
0330519da7 Updated French translations for input.dll and shell32.dll
svn path=/trunk/; revision=39026
2009-01-22 19:52:25 +00:00
Pierre Schweitzer
68ca50178c - Implemented FatPerformDevIoCtrl
- Use it while mounting new volume to get the right sector size. This fixes a TODO (that was looking as a hack :p)

svn path=/trunk/; revision=39025
2009-01-22 17:25:28 +00:00
Stefan Ginsberg
63677b493d - Fix a crash when menu allocation fails
svn path=/trunk/; revision=39024
2009-01-22 17:04:06 +00:00
Pierre Schweitzer
4dfae6e299 Woops! I mixed my patches. It fixes leaks anyway ;).
svn path=/trunk/; revision=39023
2009-01-22 16:50:23 +00:00
Pierre Schweitzer
d5a69508bf Don't leak IRPs in case of failure
svn path=/trunk/; revision=39022
2009-01-22 16:47:45 +00:00
Dmitry Chapyshev
be5c23f647 - Implement SHFlushClipboard (based on msdn info)
- Implement DoEnvironmentSubstW (based on DoEnvironmentSubstA)
- Add checking of params for SHQueryRecycleBinW

svn path=/trunk/; revision=39021
2009-01-22 16:25:31 +00:00
KJK::Hyperion
64b55a2448 No harm in deleting this (it was previously disabled in r39016)
svn path=/trunk/; revision=39020
2009-01-22 16:12:02 +00:00
Christoph von Wittich
c2a524d32a sync with wine 1.1.13
svn path=/trunk/; revision=39018
2009-01-22 15:38:51 +00:00
Christoph von Wittich
f30ab08109 add libjpeg
enable JPEG support in oleaut32

svn path=/trunk/; revision=39017
2009-01-22 15:03:45 +00:00
KJK::Hyperion
421738ed03 Wow, did you know about "test" modules? Seems nobody does, because they are broken in rbuild. Luckily, kernel32_test is the only such module left
svn path=/trunk/; revision=39016
2009-01-22 14:50:14 +00:00
Christoph von Wittich
79b7f46d64 Nikolay Sivov <bunglehead@gmail.com>
Thu, 22 Jan 2009 12:00:33 +0000 (15:00 +0300)
kernel32: Make GetOverlappedResult crash on NULL args as native does.

svn path=/trunk/; revision=39015
2009-01-22 14:49:59 +00:00
Christoph von Wittich
969279fc8a add _mbsnbcpy_s to msvcrt (imported from wine)
svn path=/trunk/; revision=39014
2009-01-22 14:41:57 +00:00
Stefan Ginsberg
bcccb1d084 - Revert the Wine code changes too, as requested on ML
svn path=/trunk/; revision=39013
2009-01-22 13:51:17 +00:00
Stefan Ginsberg
131ca9ba08 - Change DPRINT to INFO_ to silence the spam
svn path=/trunk/; revision=39012
2009-01-22 13:35:13 +00:00
Dmitry Chapyshev
6766e1615f - More fixes for icons in shell32
svn path=/trunk/; revision=39011
2009-01-22 13:00:14 +00:00
KJK::Hyperion
ccb753842f modified tools/rbuild/module.cpp
modified   tools/rbuild/project.cpp
modified   tools/rbuild/project.dtd
modified   tools/rbuild/rbuild.h
   New per-project property allowwarnings overrides allowwarnings property of all modules in the project

svn path=/trunk/; revision=39010
2009-01-22 11:55:12 +00:00
Dmitry Chapyshev
06794682ef - Add more defines for icons
- Update icon for "Administration tools"

svn path=/trunk/; revision=39009
2009-01-22 11:27:28 +00:00
Christoph von Wittich
101c983729 Author: Aric Stewart <aric at codeweavers.com>
Date:   Tue Jan 20 13:04:50 2009 -0600

shell32: Initial stub for SHCreateShellItem. It returns E_NOINTERFACE until shell32 version 6.0 or later.


svn path=/trunk/; revision=39008
2009-01-22 10:56:24 +00:00
Christoph von Wittich
183869c16c forgot to add \n
svn path=/trunk/; revision=39007
2009-01-22 09:43:02 +00:00
Dmitry Chapyshev
9cd35f3d5c - Add mscat32, ntprint and wmi from Wine
svn path=/trunk/; revision=39006
2009-01-22 09:29:16 +00:00
Andrew Greenwood
fc53f8c890 Allow hybrid install/live CD by providing special FreeLdr OS type that gets
used only on the bootcd, for calling setupldr. Also added bootcd.ini which
becomes freeldr.ini on the bootcd. My previous attempt omitted this, so bootcd
broke. I have tested bootcd and livecd successfully. Also made it easier to
specify a different path in IopApplyRosCdromArcHack.


svn path=/trunk/; revision=39004
2009-01-21 19:45:08 +00:00
Stefan Ginsberg
f368fdbf9a - Partially revert 29656. NTOS calls HalQuerySystemInformation with HalFrameBufferCachingInformation, and disables PAT and MTRR if it returns success + TRUE. There is no reason this would be needed in ReactOS at the moment, so revert to old behaviour.
svn path=/trunk/; revision=39001
2009-01-21 17:10:16 +00:00
Christoph von Wittich
bf2e430cf1 sync shlwapi with wine 1.1.13
svn path=/trunk/; revision=39000
2009-01-21 15:57:21 +00:00
Stefan Ginsberg
78a49fe707 - Stragglers from 38998
svn path=/trunk/; revision=38999
2009-01-21 15:03:14 +00:00
Stefan Ginsberg
0978aae3eb - Revert most of 38953. This was a bad idea, sorry.
svn path=/trunk/; revision=38998
2009-01-21 14:41:23 +00:00
Dmitry Chapyshev
e38146716a - Add baseaddress for itss and msimtf
svn path=/trunk/; revision=38997
2009-01-21 14:28:56 +00:00
Dmitry Chapyshev
12575f7f33 - Sync hhctrl with Wine head
svn path=/trunk/; revision=38996
2009-01-21 14:26:42 +00:00
Dmitry Chapyshev
928873cf85 - Add itss and msimtf from Wine
- Update README.WINE

svn path=/trunk/; revision=38995
2009-01-21 14:10:09 +00:00
Christoph von Wittich
d4835adc0b error msg on bad call
svn path=/trunk/; revision=38994
2009-01-21 13:27:18 +00:00
Christoph von Wittich
ea36a66139 revert 38992 as the problem is in wine's ole32.dll
svn path=/trunk/; revision=38993
2009-01-21 13:21:28 +00:00
Christoph von Wittich
0beccb3e1e check for null (fixes ole32 compobj winetest crash)
svn path=/trunk/; revision=38992
2009-01-21 12:50:24 +00:00
KJK::Hyperion
775bff8f2e modified tools/rbuild/backend/mingw/modulehandler.cpp
modified   tools/rbuild/backend/mingw/rule.cpp
   Add a few long overdue macros to the Rule class. Make rules now a little more readable
   Fixed winebuildDefRule: "$(INTERMEDIATE)$(SEP)$(source_path)$(SEP)$(source_name_noext)_$(module_name).auto.def" -> "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).auto.def" -> "$(intermediate_path_unique).auto.def"
   Fixed "$(source_path)$(SEP)$(source_name_noext).spec" -> "$(source)" (what the eff, Arch?)
   makefile.auto stays identical after this change

svn path=/trunk/; revision=38991
2009-01-21 12:20:59 +00:00
Christoph von Wittich
7fb3244f85 fix typo
svn path=/trunk/; revision=38990
2009-01-21 12:13:17 +00:00
Christoph von Wittich
1686768e27 -add libxslt 1.1.24
-update libxml2 to 2.7.3
-add a new lib "wineldr" to hack around wine's .so lib crap (attention this depends on kernel32!)
-enable the usage of libxslt in msxml3

svn path=/trunk/; revision=38989
2009-01-21 12:09:32 +00:00
Dmitry Chapyshev
172f1d16ec - Update Russian translation
svn path=/trunk/; revision=38988
2009-01-21 11:27:19 +00:00
Dmitry Chapyshev
7244d6e310 - Replace watermark.bmp and header.bmp with better (from me)
svn path=/trunk/; revision=38987
2009-01-21 10:20:53 +00:00
Michael Martin
d5823b702a - npfs.h: The member named WriteMode is meaningless for pipes, as the write mode is the PipeType for both client and server. Change names to something more descriptive,ServerReadMode and ClientReadMode, for the members new use.
- create.c: Use new members.
- finfo.c: Check whether the pipe side is server or client and change/return appropriate ReadMode.
- fsctrl.c: Opps. Previous implementation was pretty much correct.
- rw.c: Silence debug message and use new members.
    Add multiple checks on whether pipe side is server or client and use appropriate ReadMode.
    If handling the next Irp in NpfsRead, remove the cancel routine before continuing the loop. Fixes BugCheck when running ntdll_winetest for file. Thank Christoph von Wittich for pointing this out.

svn path=/trunk/; revision=38986
2009-01-21 07:52:45 +00:00
Aleksey Bragin
2e3d23a37d [FORMATTING]
- TABS -> SPACES

svn path=/trunk/; revision=38984
2009-01-20 19:15:08 +00:00
Stefan Ginsberg
25efba5b5b - Fix leftover from 38960
svn path=/trunk/; revision=38983
2009-01-20 18:58:08 +00:00
Aleksey Bragin
5862fb9aaa Alex Vlasov
- Move and rewrite FAT ondisk structures to a standalone header file fat.h.

svn path=/trunk/; revision=38982
2009-01-20 18:05:53 +00:00
Christoph von Wittich
f2e519c99a sync netapi32_winetest with wine 1.1.13
svn path=/trunk/; revision=38981
2009-01-20 17:09:46 +00:00
Christoph von Wittich
e6d7f59aa5 fix kernel32 codepage winetest
svn path=/trunk/; revision=38980
2009-01-20 16:27:05 +00:00
Stefan Ginsberg
3240148b13 - Fix my .diff mess from yesterday, sorry
svn path=/trunk/; revision=38979
2009-01-20 15:48:54 +00:00
Christoph von Wittich
140e549bd9 fix GetCurrentProcessorNumber and InterlockedCompareExchangePointer64 exports
svn path=/trunk/; revision=38978
2009-01-20 15:24:47 +00:00
Dmitry Chapyshev
29817cbb51 - Implement auto add keyboard layouts
svn path=/trunk/; revision=38977
2009-01-20 15:13:32 +00:00
Christoph von Wittich
befc05e353 fix advapi32.def
svn path=/trunk/; revision=38976
2009-01-20 15:04:03 +00:00
Christoph von Wittich
1ff1fb9564 revert 38962 as it breaks bootcd
svn path=/trunk/; revision=38975
2009-01-20 15:02:04 +00:00
Dmitry Chapyshev
077971b02b - Revert r34642. It is wrong.
svn path=/trunk/; revision=38974
2009-01-20 14:58:41 +00:00
Christoph von Wittich
6707cbf0a6 sync winebuild with wine 1.1.13
svn path=/trunk/; revision=38972
2009-01-20 11:44:30 +00:00
Christoph von Wittich
7dfd3a9852 update mapi headers to wine 1.1.13
svn path=/trunk/; revision=38970
2009-01-20 08:19:52 +00:00
Christoph von Wittich
2486417489 stublement some more Activation Context stuff
fix RTL_ACTIVATION_CONTEXT_STACK_FRAME in NDK

svn path=/trunk/; revision=38969
2009-01-20 07:40:15 +00:00
Daniel Reimer
9e5731de5e Bug 4030: Greek Update by Apostolos Alexiadis
Bug 4044: Czech translation update - desk.cpl by Radek Liska
Bug 4035: a few updates for ros by Mario Kacmar
Bug 4037: Translate norwegian file by Lars Martin Hambro

svn path=/trunk/; revision=38968
2009-01-20 07:28:51 +00:00
Andrew Greenwood
f7e32af29b setupldr previously worked by faking the FreeLdr OS menu function. Now
FreeLdr has a special OS type for ReactOS Setup, which will only work for
the bootcd. As a result, bootcd can display a menu now. This opens up the
possibility of including both a "live" environment for users to play with
as well as the opportunity to install, from the same disc.


svn path=/trunk/; revision=38962
2009-01-19 23:38:08 +00:00
Stefan Ginsberg
56a1175be8 - Add 32-bit versions to wdbgexts.h
- Add lots of missing definitions to windbgkd.h, gathered from Singularity, tinykrnl, articles, blogs, etc

svn path=/trunk/; revision=38961
2009-01-19 23:34:27 +00:00
Stefan Ginsberg
dc7184e73f Fix the completely retarded implementation of KdComPortInUse.
The original definition of this variable seems to have been based on the retarded type in the serial.sys source sample, which defines it as:

extern PUCHAR *KdComPortInUse;

This, somehow, works in MSVC, but gcc complains about the lack of import specifier (KdComPortInUse is exported by HAL).
This was 'fixed' by adding the import specifier to ros.
So instead of: PUCHAR *KdComPortInUse;
We ended up with: NTHALAPI PUCHAR *KdComPortInUse;
Which becomes 3 dereferences instead of 2, which is incorrect. This was 'fixed' by hacking the variable in HAL too.
Use "extern PUCHAR NTHALAPI KdComPortInUse" to be compatible with both compilers, remove the HAL hacks, and fix the usage of the variable.

Fixes the serial.sys crash when booted with _WINKD_ + kdcom from Windows 2003, as kdcom would (due to the HAL hack) set the internal 'pointer' to the port value, and serial would end up dereferencing the port address

svn path=/trunk/; revision=38960
2009-01-19 23:22:22 +00:00
Stefan Ginsberg
ec8a8e45f6 - Re-add allowwarnings="true" for wrc too
- Re-add the wmc header fix too, accidentally reverted in previous commit

svn path=/trunk/; revision=38958
2009-01-19 22:54:50 +00:00
Stefan Ginsberg
bb0998a443 - Sorry, this broke build on certain Linux hosts
svn path=/trunk/; revision=38957
2009-01-19 22:19:00 +00:00
Timo Kreuzer
31febcab86 Update README.WINE
svn path=/trunk/; revision=38954
2009-01-19 20:45:08 +00:00
Stefan Ginsberg
9e89c8c187 - Kill off more unnecessary allowwarnings="true"
- Remove a .rbuild diff from oleaut32_ros.diff -- Wine doesn't use .rbuild, so why put this in .diff?

svn path=/trunk/; revision=38953
2009-01-19 19:44:55 +00:00
Danny Götte
b78e9a9ab9 * fix request of translatable entries
* replace security acl filter with security area filter, now you can request for special rights instead of an acl list
* use the last used version number, and not only the last stable one to calculate a new version number
* protect entries of other languages from being deleted by language maintainers of different languages
* fix moving to archiv / delete revisions behavior
* group list of translators by language / language maintainer now get a list of all translators in their language, even if they have no edits made
* show compare dialog correct again
* compare function could have compared the wrong entries, if the entry was en english one, now the correct entry is compared and, correct versions are shown in the dropdown
* entry history: display only the users language history if the user has only access to one language
* don't let language maintainer search users by language
* remove language maintainers ability to change the language of an user to his own language
* fix adding user to group
* fix problem, when draft was deleted: the user couldn't see any following draft of the same entry

svn path=/branches/danny-web/; revision=38952
2009-01-19 19:01:51 +00:00
Dmitry Chapyshev
bae14e1987 - Update some icons (shell32)
- Add defines for icons (shell32)
- Add icon for .reg files (regedit)
- Some fixes for hivecls_arm.inf and hivecls_i386.inf

svn path=/trunk/; revision=38949
2009-01-19 18:36:03 +00:00
Stefan Ginsberg
f233dab1ee - Remove unnecessary allowwarnings="true"
svn path=/trunk/; revision=38948
2009-01-19 18:08:28 +00:00
Jeffrey Morlan
fd6ed40845 cmd_rmdir: Implement ability to remove multiple directories with one command.
svn path=/trunk/; revision=38946
2009-01-19 17:29:21 +00:00
Timo Kreuzer
f601277c56 Improve GetSetConsoleInputExeNameAW, removing the excessive SEH use. Fixes 1 kernel32 console winetest.
svn path=/trunk/; revision=38945
2009-01-19 17:08:47 +00:00
Christoph von Wittich
7506e507ee sync wintrust_winetest to wine 1.1.13
svn path=/trunk/; revision=38944
2009-01-19 17:04:46 +00:00
Christoph von Wittich
ab1f060739 sync crypt32_winetest with wine 1.1.13
svn path=/trunk/; revision=38943
2009-01-19 16:47:57 +00:00
Christoph von Wittich
d58aa939f6 sync crypt32 and wintrust with wine 1.1.13
svn path=/trunk/; revision=38941
2009-01-19 16:16:15 +00:00
Johannes Anderwald
bf29e0ff1d - Experimental implementation of KsiCreateObjectType
svn path=/trunk/; revision=38940
2009-01-19 15:55:47 +00:00
Dmitry Chapyshev
f5c1cadac1 - Change hh.exe location
- Fix inf's for .hlp files
- Add entries for .chm files

svn path=/trunk/; revision=38939
2009-01-19 15:36:26 +00:00
Aleksey Bragin
65aefa88f2 - Fix a misnamed var in fastfat.h.
- Implement first part of FatMountVolume (before VCB initialization and actual read of a volume).

svn path=/trunk/; revision=38938
2009-01-19 13:55:46 +00:00
Christoph von Wittich
c6c20dffb6 fix lots of msxml3 winetest
svn path=/trunk/; revision=38937
2009-01-19 12:56:32 +00:00
Aleksey Bragin
d95bdfc632 - Sync widl + rpcrt4 with Wine.
svn path=/trunk/; revision=38936
2009-01-19 12:24:52 +00:00
Christoph von Wittich
326b221c21 skip crashing virtual tests
svn path=/trunk/; revision=38935
2009-01-19 12:04:09 +00:00
Christoph von Wittich
a4ecb02e06 Use WriteEncodedText() for line endings
patch by <zooba at aanet dot com dot au>
tested by amine48rz
See issue #3989 for more details.

svn path=/trunk/; revision=38934
2009-01-19 11:13:31 +00:00
Christoph von Wittich
fb62d9e954 Use "Small Fonts" (96 dpi) by default
patch by <aspotashev at gmail dot com>
See issue #4011 for more details.

svn path=/trunk/; revision=38933
2009-01-19 10:51:58 +00:00
Christoph von Wittich
23ef53ceff don't let VirtualProtect play with not committed memory
svn path=/trunk/; revision=38932
2009-01-19 10:27:59 +00:00
Christoph von Wittich
2eb7079e6c fix typo (spotted by Ged)
svn path=/trunk/; revision=38931
2009-01-19 09:22:59 +00:00
Christoph von Wittich
c1f8a4fdc2 trim leading zeros in GetNumberFormat
patch by <zooba at aanet dot com dot au>
See issue #3400 for more details.

svn path=/trunk/; revision=38930
2009-01-19 09:04:56 +00:00
Christoph von Wittich
9a921d3209 fix some more kernel32 virtual tests
svn path=/trunk/; revision=38929
2009-01-19 08:35:51 +00:00
Christoph von Wittich
d318fedb6d fix some kernel32 virtual winetests
svn path=/trunk/; revision=38928
2009-01-19 08:02:26 +00:00
Christoph von Wittich
2fef907b66 fix handle leaks
svn path=/trunk/; revision=38927
2009-01-19 05:08:11 +00:00
Christoph von Wittich
e67174808a hack: skipping RegisterWaitForSingleObject tests as they don't finish
svn path=/trunk/; revision=38926
2009-01-19 04:20:06 +00:00
James Tabor
a7bf412ad2 - Add QS_RAWINPUT.
svn path=/trunk/; revision=38925
2009-01-19 00:03:51 +00:00
Stefan Ginsberg
306b8ac8b2 - Fix a comment
svn path=/trunk/; revision=38924
2009-01-18 23:53:22 +00:00
Johannes Anderwald
eacb6ae11a - Register all device interfaces identified in the subdevice descriptor
- Add IUnknown to IInteruptSync interface
- Handle IRP_MN_QUERY_INTERFACE
- Create a subdevice descriptor for IPortWavePci, IPortWaveCyclic and IPortTopology and handle the respective ISubDevice::GetDescriptor
- Always request PCFILTER_DESCRIPTOR regardless of present IPinCount interface
- Check if IMiniportWavePci omits a IServiceGroup
- Implement ISubDevice interface for IPortWavePci port driver
- Add primitive implementation of PcCreateSubdeviceDescriptor
- Intel AC97 audio driver now successfully initializes under Vbox

svn path=/trunk/; revision=38923
2009-01-18 23:46:09 +00:00
Stefan Ginsberg
fb169370fe - Fix more InterlockedCompareExchangePointer warnings in crypt32 -- this to Wine, too
- Hack-0-initialize a variable in cryptui to satisfy gcc -- this needed as Wine use a less retarded gcc than we do
- Warning fix old and out of sync icmp/inetcomm/odbc32/shdocw
- Use _CRT_NONSTDC_NO_DEPRECATE in winhlp32
- Hack MAKEINTATOM definition for Wine

svn path=/trunk/; revision=38922
2009-01-18 23:31:26 +00:00
Matthias Kupfer
659b2bfc46 Maciej Bialas <bjauy AT tlen DOT pl>
- Polish translation of recently added resource strings

svn path=/trunk/; revision=38919
2009-01-18 21:40:12 +00:00
Stefan Ginsberg
5986aff6bd - Remove outdated msvcrt Winetest compilation hack, add _CRT_NONSTDC_NO_DEPRECATE to silence the 'unlink' warnings
svn path=/trunk/; revision=38918
2009-01-18 21:35:18 +00:00
Matthias Kupfer
06d2774513 Add new resource strings for translation.
svn path=/trunk/; revision=38917
2009-01-18 21:21:09 +00:00
Kamil Hornicek
44d2bd70d8 - sync d3d9 with wine HEAD
svn path=/trunk/; revision=38916
2009-01-18 21:11:53 +00:00
Kamil Hornicek
d6aa26ee7f - sync d3d8 with wine HEAD
svn path=/trunk/; revision=38915
2009-01-18 21:09:47 +00:00
Kamil Hornicek
f1fd1b0ce1 - sync wined3d with wine HEAD
svn path=/trunk/; revision=38914
2009-01-18 21:09:22 +00:00
Johannes Anderwald
c41ccd6b73 - Fix IPortWaveCyclic interface
- Implement IPortEvents interface

svn path=/trunk/; revision=38913
2009-01-18 20:56:01 +00:00
Johannes Anderwald
ef794c62a4 - Fix IPortWaveCyclic interface
svn path=/trunk/; revision=38912
2009-01-18 20:55:57 +00:00
Stefan Ginsberg
0d17246450 - Fix WMC and mkhive warnings
- Fix the unitialized variable warning in freetype (done the same way in freetype trunk)
- Make CRT compile warning-free again, and re-remove allowwarnings=true
- Make libxml compile warning-free too


svn path=/trunk/; revision=38911
2009-01-18 20:42:13 +00:00
Jeffrey Morlan
39934ca5e2 cmd_move:
- Only check for options at the beginning of the command line (subsequent code already assumed the filenames were at the end).
- Give an error message if too many parameters are given.
- If no destination is given, default to current directory.
- Replace excessively complicated code to get source directory with single GetFullPathName call; hopefully that is sufficient. Check for pszFile == NULL to prevent crash that occurred when source was "/..".
- To determine whether source wildcard matches are files or directories, just use WIN32_FIND_DATA's dwFileAttributes; it's easier than constructing paths to pass to IsExistingFile/IsExistingDirectory.
- Fix memory leaks: some returns were missing freep(arg).

svn path=/trunk/; revision=38910
2009-01-18 20:21:03 +00:00
Matthias Kupfer
c8b896e660 - Replace static message text by resource strings.
- Add German translation for those strings.

svn path=/trunk/; revision=38909
2009-01-18 20:02:41 +00:00
Christoph von Wittich
747111402a sync ole32 and oleaut32 to wine 1.1.13
svn path=/trunk/; revision=38908
2009-01-18 19:23:59 +00:00
Christoph von Wittich
130bfcf51a sync ole32 winetest to wine 1.1.13
svn path=/trunk/; revision=38907
2009-01-18 19:23:06 +00:00
Stefan Ginsberg
4e7ee302a9 - Fix regexpl build
svn path=/trunk/; revision=38906
2009-01-18 18:40:02 +00:00
Stefan Ginsberg
e3a4c88843 - Sorry, forgot this file
svn path=/trunk/; revision=38905
2009-01-18 18:15:32 +00:00
Stefan Ginsberg
22d7e0689a - Correct the ulAssemblyRosterIndex member of ACTCTX_SECTION_KEYED_DATA -- it is ULONG (MSDN is wrong here)
- Fix Lsa IDL's LUID/PLUID definition
- Silence winmm/midimap/wavemap warnings (these modules haven't been touched for a long time and are way out of sync)
- Silence a ole32 warning -- should be sent to Wine too

svn path=/trunk/; revision=38904
2009-01-18 17:58:35 +00:00
Johannes Anderwald
43e8b65e00 - Fix debug prints
- Fix initialization of IPortWavePci object
- Fix IPortWavePci interface

svn path=/trunk/; revision=38903
2009-01-18 17:44:17 +00:00
Johannes Anderwald
e710923ad4 - Fix IPortWavePci interface
svn path=/trunk/; revision=38902
2009-01-18 17:44:10 +00:00
Christoph von Wittich
11228d6e3b add ctxtcall.h to uuid
svn path=/trunk/; revision=38901
2009-01-18 17:17:12 +00:00
Christoph von Wittich
f08cc7b210 add ctxtcall.idl from wine
svn path=/trunk/; revision=38900
2009-01-18 17:14:54 +00:00
Michael Martin
bd30763563 - Fix calculation of WriteQuotaAvailable and WritePtr when moving memory.
- Due to the new implementation, Quota is not charged for partial message retrievals. Therefore reset Quota Available to MaxDataLength when last message is read from buffer and check that Quota is greater than 0 before waking the write thread.

svn path=/trunk/; revision=38899
2009-01-18 16:31:45 +00:00
Stefan Ginsberg
6e2699957c - Fix WINEVENTPROC -- it is stdcall, not cdecl!
- Correct the way FONTENUMPROC is defined, and type-cast accordingly in gdi32
- PSECURITY_DESCRIPTOR is an opaque pointer -- use PISECURITY_DESCRIPTOR instead where necessary
- raddr2line: Fix a warning under Linux host

svn path=/trunk/; revision=38898
2009-01-18 15:59:21 +00:00
Stefan Ginsberg
60882e8641 - ws2_32 Winetest: Define __ROS_LONG64__
- rpcrt4 Winetest: Fix an implicit declaration warning -- this should be sent to Wine

svn path=/trunk/; revision=38897
2009-01-18 15:48:55 +00:00
Thomas Bluemel
211942ddf7 Strings are always NULL-terminated...
svn path=/trunk/; revision=38896
2009-01-18 15:46:18 +00:00
Ged Murphy
3268178323 you'd never guess I was English
svn path=/trunk/; revision=38895
2009-01-18 15:15:54 +00:00
Ged Murphy
a446ba6dc9 Reapply ros specific hack to stop the treeview scrollbars from continuous painting. I don't have time to look for the real bug at the moment.
Also add Timo's propsheet and tooltip fixes

svn path=/trunk/; revision=38894
2009-01-18 15:07:11 +00:00
Christoph von Wittich
a4b40ce979 fix a bug in RtlDetermineDosPathNameType_U
fixes 5 kernel32 profile winetests

svn path=/trunk/; revision=38893
2009-01-18 14:51:29 +00:00
Christoph von Wittich
f47bbd7d27 re enable pipe tests
svn path=/trunk/; revision=38892
2009-01-18 14:10:28 +00:00
Christoph von Wittich
7090d5e238 fix kernel32 comm crash
If lpOverlapped is NULL, lpBytesReturned cannot be NULL.

svn path=/trunk/; revision=38891
2009-01-18 13:56:09 +00:00
Dmitry Chapyshev
fc86a01ed2 - Partly sync with Wine head
svn path=/trunk/; revision=38890
2009-01-18 13:13:31 +00:00
Christoph von Wittich
e070af82b9 sync msi to wine 1.1.13
svn path=/trunk/; revision=38889
2009-01-18 12:52:01 +00:00
Dmitry Chapyshev
fe10fbccfe - Implement pSetupGuidFromString
- Implement pSetupStringFromGuid
- Implement pSetupIsGuidNull

svn path=/trunk/; revision=38888
2009-01-18 12:50:56 +00:00
Stefan Ginsberg
eef79b36ef - Fix warnings in ros' tests
svn path=/trunk/; revision=38887
2009-01-18 12:20:51 +00:00
Art Yerkes
26a6195563 Prevent a null access when the first show-desktop is called. Hidden by low-memory mapped in csrss.
svn path=/trunk/; revision=38886
2009-01-18 12:11:32 +00:00
Christoph von Wittich
56c6d214ab remove allowwarnings=true
svn path=/trunk/; revision=38885
2009-01-18 12:09:55 +00:00
Christoph von Wittich
076028efe9 warning fixes
svn path=/trunk/; revision=38884
2009-01-18 12:08:55 +00:00
Dmitry Chapyshev
88cd4628a0 - Fix bug with addition of keyboard layouts
svn path=/trunk/; revision=38883
2009-01-18 11:20:32 +00:00
Aleksey Bragin
667636f08a - SVN maintenance.
svn path=/trunk/; revision=38881
2009-01-18 10:23:15 +00:00
Aleksey Bragin
ea435d7876 - SVN maintenance.
svn path=/trunk/; revision=38880
2009-01-18 10:22:07 +00:00
Christoph von Wittich
d068ad2d69 fix kernel32 console winetest crash
svn path=/trunk/; revision=38879
2009-01-18 10:06:34 +00:00
Christoph von Wittich
0195906a3c sync msi_winetest with wine 1.1.13
svn path=/trunk/; revision=38876
2009-01-18 09:03:44 +00:00
Christoph von Wittich
16ccdf83b4 sync msacm32_winetest with wine 1.1.13
svn path=/trunk/; revision=38875
2009-01-18 08:59:27 +00:00
Christoph von Wittich
aa7409c841 sync mapi32_winetest with wine 1.1.13
svn path=/trunk/; revision=38874
2009-01-18 08:56:17 +00:00
KJK::Hyperion
bfc3948cfe Warning killing commit
modified   tests/polytest/polytest.cpp
   Use %ld to print LONGs, not %d

modified   tests/vmtest/vmtest.c
   Don't do pointer arithmetics on PVOID

Everything else
   Compile winetests with __ROS_LONG64__

svn path=/trunk/; revision=38873
2009-01-18 06:31:44 +00:00
KJK::Hyperion
75eeb2a7e4 Warning killing commit
modified   include/psdk/basetsd.h
modified   include/psdk/windef.h
modified   include/psdk/winnt.h
   Introduce new define __ROS_LONG64__ ("assume 64-bit long"), to use int instead of long in typedefs of 32-bit integers
   __ROS_LONG64__ automatically defined if __WINESRC__ is defined. No, __WINESRC__ alone is not enough

modified   base/applications/winhlp32/winhlp32.rbuild
modified   base/applications/wordpad/wordpad.rbuild
   Compile with __ROS_LONG64__ define to silence int/long warnings

modified   include/psdk/winsock.h
modified   include/psdk/winsock2.h
   __ROS_LONG64__ does Winsock too
   Use LONG and u_long instead of long and unsigned long, to take advantage of __ROS_LONG64__

modified   include/reactos/wine/test.h
   Use explicit casts in printf calls so the header compiles without warnings regardless of whether __ROS_LONG64__ is defined
   Use _strdup instead of strdup

modified   include/psdk/sspi.h
modified   include/psdk/wininet.h
   Use LONG and ULONG instead of long and unsigned long, to take advantage of __ROS_LONG64__

modified   include/psdk/htmlhelp.h
modified   include/psdk/lmaccess.h
modified   include/psdk/prsht.h
modified   include/psdk/vfw.h
modified   include/psdk/winuser.h
   By sheer coincidence, several wrong prototypes were uncovered by the __ROS_LONG64__ feature. They all happen to be 64-bit portability issues, too

modified   base/system/msiexec/msiexec.rbuild
   msiexec is a Wine system component: compile with __WINESRC__

modified   dll/win32/setupapi/setupapi.rbuild
   setupapi is _not_ a Wine system component: compile _without_ __WINESRC__

modified   lib/3rdparty/libwine/debug.c
   Use LONG instead of long

modified   dll/win32/advapi32/service/sctrl.c
modified   include/psdk/winsvc.h
   Fix prototypes of StartServiceCtrlDispatcherA and StartServiceCtrlDispatcherW

modified   include/psdk/winbase.h
   Corrected the prototypes of GetProcessAffinityMask and ReadProcessMemory. Now Win64-compliant
   The argument to the _InterlockedCompareExchange is volatile long *, not volatile LONG *: cast explicitly (it's perfectly safe)

modified   include/psdk/wingdi.h
   Fix prototype of ENHMFENUMPROC

svn path=/trunk/; revision=38872
2009-01-18 06:25:43 +00:00
James Tabor
ad5d6611f9 - Add more thread info types and remove a set mask clear bit.
svn path=/trunk/; revision=38868
2009-01-18 04:36:43 +00:00
Timo Kreuzer
b130cb652d Forgot this file
svn path=/trunk/; revision=38866
2009-01-18 02:38:35 +00:00
Timo Kreuzer
c997d73a17 user32: sync listbox.c to wine 1.1.13
svn path=/trunk/; revision=38865
2009-01-18 02:28:12 +00:00
Timo Kreuzer
843defae4d user32: sync DIALOG_DlgDirSelect to wine 1.1.13:
Fixes crash of user32 winetest listbox

svn path=/trunk/; revision=38863
2009-01-18 01:17:47 +00:00
Johannes Anderwald
62957c3cb4 - Implement IPortEvents interface to IPortWavePci
svn path=/trunk/; revision=38862
2009-01-18 00:44:54 +00:00
Johannes Anderwald
f5a320f97c - Add interface IPortEvents
svn path=/trunk/; revision=38861
2009-01-18 00:39:15 +00:00
Dmitry Gorbachev
f41affdeb5 Czech (QWERTZ) keyboard layout by Radek Liska. Bug #4031.
svn path=/trunk/; revision=38860
2009-01-17 23:18:32 +00:00
Johannes Anderwald
fa5bc6ed26 - Store DeviceObject before calling IMiniportTopology's init function
svn path=/trunk/; revision=38859
2009-01-17 23:11:11 +00:00
Johannes Anderwald
1832435672 - Handle IRP_MN_QUERY_INTERFACE
svn path=/trunk/; revision=38858
2009-01-17 22:36:58 +00:00
Johannes Anderwald
f781b11878 - Store DeviceObject before calling IMiniportWaveCyclic as the driver might immediately call port functions
- Pass the PhysicalDeviceObject to IoGetDmaAdapter

svn path=/trunk/; revision=38857
2009-01-17 22:22:09 +00:00
Timo Kreuzer
51d20d699d user32: sync icontitle.c with Wine 1.1.13
Alexandre Julliard <julliard@winehq.org>
user32: Store the builtin class names in Unicode.

Rob Shearman <rob@codeweavers.com>
user32: Fix incorrect character count passed to GetWindowTextW in ICONTITLE_Paint.

svn path=/trunk/; revision=38856
2009-01-17 21:45:00 +00:00
Sylvain Petreolle
1c2bcd0d06 add drmk to bootcd
svn path=/trunk/; revision=38855
2009-01-17 21:36:08 +00:00
Christoph von Wittich
14158199c0 fix SystemFunction013
svn path=/trunk/; revision=38854
2009-01-17 21:29:13 +00:00
James Tabor
1335fe7f13 - It is understandable now why certain applications fail when accessing thread information from user mode, it is the wrong information being accessed.
svn path=/trunk/; revision=38853
2009-01-17 21:14:52 +00:00
Colin Finck
f134ca1ab1 Use DECLSPEC_NORETURN and place it at the top of the prototype to fix MSVC compilation.
Hint by Stefan ;-)

svn path=/trunk/; revision=38852
2009-01-17 21:11:38 +00:00
Christoph von Wittich
f143177d3b fix a kernel32 console winetest crash
svn path=/trunk/; revision=38851
2009-01-17 21:05:15 +00:00
Matthias Kupfer
bdcc1ced8f Fix wrong strings for default mouse cursor settings
svn path=/trunk/; revision=38850
2009-01-17 20:46:28 +00:00
Christoph von Wittich
9c245e9ec1 sync rsaenh_winetest with wine 1.1.13
svn path=/trunk/; revision=38848
2009-01-17 20:25:16 +00:00
Christoph von Wittich
8991e24d23 sync ws2_32_winetest with wine 1.1.13
svn path=/trunk/; revision=38847
2009-01-17 20:21:03 +00:00
Christoph von Wittich
56f186a682 sync comdlg32_winetest with wine 1.1.13
svn path=/trunk/; revision=38846
2009-01-17 20:15:01 +00:00
Christoph von Wittich
be6f9a9db3 sync browseui_winetest with wine 1.1.13
svn path=/trunk/; revision=38845
2009-01-17 20:13:53 +00:00
Christoph von Wittich
aecfced223 sync advpack_winetest with wine 1.1.13
svn path=/trunk/; revision=38844
2009-01-17 20:12:48 +00:00
Daniel Reimer
158c405ae3 Sync Apps to Wine HEAD (2 of 2)
svn path=/trunk/; revision=38843
2009-01-17 20:02:00 +00:00
Daniel Reimer
478947654c Sync Apps to wine HEAD (1 of 2)
svn path=/trunk/; revision=38842
2009-01-17 19:59:22 +00:00
Christoph von Wittich
6e08f16ab1 sync mapi32 with wine 1.1.13
svn path=/trunk/; revision=38841
2009-01-17 19:59:02 +00:00
Colin Finck
be72d98a83 Convert all line-endings to LF first in StringOut before passing the strings to printf and OutputDebugStringA.
Both functions treat the string as text and convert the line-endings themselves to CRLF. If you already give them a CRLF line-ending, it'll be converted to CRCRLF..
By unifying the line-endings in StringOut, it is also possible now to pass both LF and CRLF to the function.

This should fix the empty lines in the BuildBot log.
Thanks to Christoph for the help!

svn path=/trunk/; revision=38840
2009-01-17 19:58:18 +00:00
Christoph von Wittich
951c595722 sync fusion with wine 1.1.13
svn path=/trunk/; revision=38839
2009-01-17 19:56:32 +00:00
Christoph von Wittich
7195b734f2 sync wrc to wine 1.1.3 (except lang2cp struct as too many strange languages were added in wine)
svn path=/trunk/; revision=38838
2009-01-17 19:46:42 +00:00
Christoph von Wittich
5b5fdb7799 -Dmitry Timoshkov <dmitry at codeweavers.com>
wrc: Warn for duplicate dialog ids.

svn path=/trunk/; revision=38837
2009-01-17 19:27:13 +00:00
Christoph von Wittich
38026c3ee6 forgot to commit this file
svn path=/trunk/; revision=38836
2009-01-17 19:18:06 +00:00
Christoph von Wittich
58bd8bc9f9 sync cabinet headers with wine 1.1.13
svn path=/trunk/; revision=38835
2009-01-17 19:14:53 +00:00
Christoph von Wittich
035d92f2c6 sync wordpad with wine 1.1.13
svn path=/trunk/; revision=38834
2009-01-17 19:10:56 +00:00
Christoph von Wittich
e5b8d3681d sync cryptui with wine 1.1.13
svn path=/trunk/; revision=38833
2009-01-17 19:10:09 +00:00
Christoph von Wittich
64c9438522 sync credui with wine 1.1.13
svn path=/trunk/; revision=38832
2009-01-17 19:09:07 +00:00
Christoph von Wittich
c65e1246ff sync cabinet with wine 1.1.13
svn path=/trunk/; revision=38831
2009-01-17 18:30:33 +00:00
Christoph von Wittich
63bca16061 sync cabinet_winetest with wine 1.1.13
svn path=/trunk/; revision=38830
2009-01-17 18:30:21 +00:00
Ged Murphy
4786fa151f update comctl32 winetest
svn path=/trunk/; revision=38829
2009-01-17 17:42:01 +00:00
KJK::Hyperion
5b30cdcd87 modified dll/win32/kernel32/debug/output.c
KJK::Hyperion vs KJK::Hyperion: finishing the job I started in 2003
   "please uncomment when GCC supports SEH": it kind of does now, but it's totally unnecessary in K32CreateDBMonMutex
   "FIXME: this will be pointless until GCC does SEH": no longer pointless, I guess. 6 years after the fact, OutputDebugStringA finally sends the string to the user-mode debugger. Now if only we could test it...
   Use DBG_PRINTEXCEPTION_C symbolic constant instead of hardcoding its value
   Some [FORMATTING]
   Make K32CreateDBMonMutex, for symbol table hygiene
   My e-mail address changed

svn path=/trunk/; revision=38828
2009-01-17 17:40:42 +00:00
Christoph von Wittich
c331fd3dad sync riched20_winetest to wine 1.1.13
svn path=/trunk/; revision=38827
2009-01-17 17:13:11 +00:00
Ged Murphy
86efa9c7ae add new chinese resource file
svn path=/trunk/; revision=38826
2009-01-17 17:11:13 +00:00
Christoph von Wittich
3ea01761ef sync riched20 to wine 1.1.13
svn path=/trunk/; revision=38825
2009-01-17 17:11:08 +00:00
Ged Murphy
0401322cd0 update spying messages
set TB_GETIMAGELISTCOUNT to have an lparam length of 0

svn path=/trunk/; revision=38824
2009-01-17 17:03:50 +00:00
Ged Murphy
3ec6a3e3d2 add new file
svn path=/trunk/; revision=38823
2009-01-17 16:48:52 +00:00
Ged Murphy
ebec7c2e3f update comctl32 to Wine 1.1.13.
not including ros specific stuff for now while I work out what we still need

svn path=/trunk/; revision=38822
2009-01-17 16:43:06 +00:00
Ged Murphy
f997492021 Add some previously undocumented messages
svn path=/trunk/; revision=38821
2009-01-17 16:23:02 +00:00
Dmitry Chapyshev
d2d5e1d48e - Implement GUIDFromStringW. Based on http://www.winehq.org/pipermail/wine-cvs/2009-January/051920.html
svn path=/trunk/; revision=38820
2009-01-17 15:47:50 +00:00
Dmitry Chapyshev
0ca8d1847a - Implement AllocateUserPhysicalPages, FreeUserPhysicalPages, MapUserPhysicalPages, MapUserPhysicalPagesScatter, ResetWriteWatch
- Fix return value for CreateSocketHandle
- Fix arguments for DelayLoadFailureHook (see http://msdn.microsoft.com/en-us/library/bb432244(VS.85).aspx)

svn path=/trunk/; revision=38819
2009-01-17 15:27:35 +00:00
Michael Martin
afcde1e39c - rw.c: Better implementation of read/write for pipes.
The ReadPtr is there so use it. Duuhh.
    Only move memory to make room for more data when the buffer is full vice moving memory on every read.
    Call KeSetEvent at the correct time, when reading is done.
- fsctrl.c: Correct data returned from NpfsPeekPipe when read mode is byte stream.

svn path=/trunk/; revision=38818
2009-01-17 15:21:15 +00:00
Dmitry Chapyshev
7c93f03dc7 - Launch hardware wizard on hardware page
svn path=/trunk/; revision=38817
2009-01-17 15:13:10 +00:00
Dmitry Gorbachev
1598a20490 Fix a bug.
svn path=/trunk/; revision=38816
2009-01-17 15:05:21 +00:00
Christoph von Wittich
11f4f3033d use spaces instead of tabs (for real now)
svn path=/trunk/; revision=38815
2009-01-17 14:47:32 +00:00
Andrew Greenwood
e17583e14d Use spaces instead of tabs.
svn path=/trunk/; revision=38814
2009-01-17 14:44:24 +00:00
Andrew Greenwood
afff2765ab Treat "LiveCD" system path as a prefix rather than an entire path. This allows a custom path to be specified,
so FreeLDR can boot multiple ReactOS builds from the same CD. FreeLDR happily does this, ReactOS does not like
booting from a livecd path other than \reactos however. Updated livecd.ini to use the new style of livecd
system path.


svn path=/trunk/; revision=38813
2009-01-17 14:20:47 +00:00
Jeffrey Morlan
2429c7df65 Don't treat a slash as the beginning of a new argument for the MOVE command (Bug 4013). Patch by Víctor Martínez Calvo <vicmarcal at hotmail.com>.
svn path=/trunk/; revision=38811
2009-01-17 12:55:46 +00:00
Johannes Anderwald
f59378c1d0 - Check for valid DeviceExtensionSize
- Pass correct flags when creating the fdo
- set DO_DIRECT_IO flag
- clear DO_DEVICE_INITIALIZING flag
- Move all calls to ExAllocatePoolWithTag to a function AllocateItem which is also responsible for zeroing memory
- Fix ISubDevice GUID
- don't disconnect the interrupt on cleanup, IInterruptSync_fnDisconnect exist for that purpose
- If there is no interrupt yet connected, call the synchronized routine holding the internal spinlock
- Copy the current stack location  when forwarding a Irp PcForwardIrpSynchronous
- Implement ISubdevice interface for IPortTopology
- Initialize the dpc for calling Miniport object, as it might create an interrupt object which immediately fires an interrupt
- If the caller doesnt provide an IAdapterPowerManagement interface, clear the existing reference
- Fix 2 bugs in IRegistryKey_NewSubKey which made the system crashing 
- Pass the pdo to IoOpenDeviceRegistryKey
- Move all guids and IIDs to own file and initialize them
- portcls initializes now to the first interrupt fired (vbox+ICH AC97 driver | qemu+es1370 driver)


svn path=/trunk/; revision=38810
2009-01-17 11:19:27 +00:00
Aleksey Bragin
4ca6732fcd - RtlOemStringToCountedUnicodeString improvements:
* Fix STATUS_BUFFER_OVERFLOW when destination string's MaximumLength and Length are equal.
 * Add comments.

svn path=/trunk/; revision=38809
2009-01-17 08:38:25 +00:00
Aleksey Bragin
f8a4f92088 - RtlUnicodeStringToCountedOemString improvements:
* Fix zero-sized input string handling, result would be error instead of success and zero output string.
 * If destination string's MaximumLength and Length are equal, it's not an erroneous situation (in fact, a very common situation).
 * Add comments.

svn path=/trunk/; revision=38808
2009-01-17 07:44:28 +00:00
James Tabor
d80bf3ef94 - It is shameful, hacks like this.
svn path=/trunk/; revision=38807
2009-01-17 07:07:36 +00:00
James Tabor
1a0ed06ffc - Update DispathMessage and fix time stamp for system and standard timers. Tested with qemu bootcd, cmd and explorer. If any bugs arise please log them under Timer Rewrite then associate the older or newer related bugs under it.
svn path=/trunk/; revision=38803
2009-01-17 01:03:03 +00:00
Thomas Bluemel
6df90967f0 Fix background color used for DrawCaptionTemp with DC_INBUTTON
svn path=/trunk/; revision=38802
2009-01-16 23:56:11 +00:00
Art Yerkes
459110618d Prevent accessing NULL as a PE header when we have a bad file, found with Stefan100's help
svn path=/trunk/; revision=38801
2009-01-16 23:44:29 +00:00
Cameron Gutman
f55e4a2843 - Merge aicom-network-fixes up to r38799
- This should finally fix the "UNTRACK: SPECIFIED ALREADY FREE ITEM 0" bug

svn path=/trunk/; revision=38800
2009-01-16 23:30:40 +00:00
Art Yerkes
12f2920bba This actually used to work due to the work csrss does setting up low memory
space.  This fixes it to pass a QOS parameter as it isn't optional.

svn path=/trunk/; revision=38798
2009-01-16 21:03:10 +00:00
Michael Martin
9ae3084028 - Reply 38790, with fix for npfsPeekPipe which was breaking rosautotests.
svn path=/trunk/; revision=38797
2009-01-16 19:30:55 +00:00
Stefan Ginsberg
1ae5ee225a - Add function tags
- Documentary fix from last commit -- DbgkpPostFakeThreadMessage: Implement missing handling of 2 failure cases

svn path=/trunk/; revision=38796
2009-01-16 16:56:00 +00:00
Dmitry Chapyshev
78042b35fd - Fix bug with addition of duplicates to the devices list
- Other small changes

svn path=/trunk/; revision=38795
2009-01-16 16:53:32 +00:00
Stefan Ginsberg
ae838b1c30 - DbgkpPostFakeThreadMessage: Implement missing
- DbgkpSetProcessDebugObject: Fix the traversing of the debug object's event list
- Implement DbgkClearProcessDebugObject

svn path=/trunk/; revision=38794
2009-01-16 16:48:17 +00:00
Michael Martin
c8ed77432a - Revert 38790 as i broke autotests.
svn path=/trunk/; revision=38793
2009-01-16 15:59:03 +00:00
Dmitry Chapyshev
a12d7cd371 - Partly implement hardware types page
svn path=/trunk/; revision=38792
2009-01-16 15:21:32 +00:00
Christoph von Wittich
c58b26652e reapply 36982
WIDL: Enable the use of scalar types (non-pointer types) as custom binding handles.

svn path=/trunk/; revision=38791
2009-01-16 15:16:09 +00:00
Michael Martin
9e097bc205 - create.c: All instances of a pipe must be the same pipe mode as when first instance was created.
Clients start of in byte stream mode, regardless of the pipe's mode.
- finfo.c:  NPFS does not allow changing read mode to message for byte stream mode pipes.
- rw.c:     The format in which data is in the pipe's buffer is based on the pipe mode vice read mode.
            Implement reads in byte stream mode for pipes using message mode.
            Fixed a bug that could caused buffer data to be corrupted due to incorrect calc of WritePtr position.
- fsctrl.c: Return buffer from NpfsPeekPipe if caller requested. 
            Use a mutex before reading the pipe's buffer.
            Return the correct length in Irp info.

svn path=/trunk/; revision=38790
2009-01-16 14:33:45 +00:00
Dmitry Chapyshev
deb282d9e1 - More dialogs implementation
svn path=/trunk/; revision=38789
2009-01-16 14:28:07 +00:00
KJK::Hyperion
1b524afb98 Echo [HOST-CC] and [HOST-LD] instead of [HOSTCC] and [HOSTLD]
Also echo [HOST-AR] for invocations of the host "ar"
Use [HOST-CC], [HOST-LD] and [HOST-AR] in bootstrap makefiles as well

svn path=/trunk/; revision=38788
2009-01-16 13:19:14 +00:00
KJK::Hyperion
8f5afcde25 ... and echo "[HOSTLD]" for the link phase of host modules
svn path=/trunk/; revision=38786
2009-01-16 12:50:20 +00:00
KJK::Hyperion
c3fc8b5daf Echo "[HOSTCC]" instead of "[CC]" in short-hand build output when invoking the host compiler
svn path=/trunk/; revision=38785
2009-01-16 12:44:55 +00:00
KJK::Hyperion
af89bbaaa9 modified tools/rbuild/backend/mingw/modulehandler.cpp
Don't precompile headers with g++: g++ is stupid and, ironically, will precompile .h headers but not .hpp headers (it will mistake them for linker input files). Always use gcc instead
   Don't let gcc guess the language of the header, either: we detect "C++ modules" automatically in rbuild, use that for consistency

svn path=/trunk/; revision=38784
2009-01-16 10:44:36 +00:00
Aleksey Bragin
7f47ebc3d5 - Set version override in pnp_* IDL modules too, since we use Vista's APIs there. Fixes implicitly declared PNP_* functions.
svn path=/trunk/; revision=38783
2009-01-16 08:59:56 +00:00
Dmitry Chapyshev
3d8bbde4fa - Implement RequestDeviceWakeup
- Implement CancelDeviceWakeupRequest

svn path=/trunk/; revision=38782
2009-01-16 06:44:40 +00:00
Dmitry Chapyshev
ccd60957e3 - Implement SetSystemPowerState
svn path=/trunk/; revision=38781
2009-01-16 06:33:19 +00:00
Thomas Bluemel
56f1f5bf69 Create band site's rebar control with styles CCS_NORESIZE and CCS_NOPARENTALIGN
svn path=/trunk/; revision=38780
2009-01-16 03:19:42 +00:00
James Tabor
a0d07a719b - Rewrite Timers, nothing is using it except a bogus system timer for raw input thread is loaded and running.
svn path=/trunk/; revision=38779
2009-01-15 23:15:31 +00:00
Aleksey Bragin
a3c29b9686 - Delete npfs_new skeleton. One rewrite less.
svn path=/trunk/; revision=38776
2009-01-15 19:15:26 +00:00
KJK::Hyperion
936851e20d Sync widl, comcat, ole32, oleaut32 and rpcrt4 to wine 1.1.12
widl can now automatically generate boilerplate code for DLLs hosting RPC proxies (and ole32 and oleaut32 now use this feature): invoke the generation automatically from rbuild rules for rpcproxy modules

svn path=/trunk/; revision=38774
2009-01-15 17:52:35 +00:00
Aleksey Bragin
dea2fe126b - Move batclass.h to PSDK, since it's a PSDK header.
- Remove inclusion of it from DDK's ntpoapi.h.

svn path=/trunk/; revision=38773
2009-01-15 17:22:28 +00:00
Dmitry Chapyshev
a45da19ead - Move SetThreadExecutionState to power.c
- Implement IsSystemResumeAutomatic
- Implement SetThreadExecutionState

svn path=/trunk/; revision=38772
2009-01-15 17:07:01 +00:00
Aleksey Bragin
75ee158474 - Revert 38770's modifications to NDK.
- Temporary move Nt power function prototypes inside power.c file.

svn path=/trunk/; revision=38771
2009-01-15 16:52:50 +00:00
Dmitry Chapyshev
6dea7537bb - Implement GetDevicePowerState
- Implement RequestWakeupLatency
- Add prototypes for GetDevicePowerState and RequestWakeupLatency to pofuncs.h

svn path=/trunk/; revision=38770
2009-01-15 16:09:03 +00:00
Dmitry Chapyshev
154c781d64 - Add power.c file for power management functions
- Move GetSystemPowerStatus, SetSystemPowerState, GetDevicePowerState, RequestDeviceWakeup, RequestWakeupLatency, CancelDeviceWakeupRequest, IsSystemResumeAutomatic, and SetMessageWaitingIndicator to power.c
- Implement GetSystemPowerStatus

svn path=/trunk/; revision=38769
2009-01-15 15:32:30 +00:00
Stefan Ginsberg
3c445f492d - DbgkpSendApiMessage/Lpc: Modification of EPROCESS flags must be interlocked, use PspSetProcessFlag.
- DbgkMap/UnmapViewOfSection: Don't check for the DeadThread flag, doing so is only necessary during early thread creation.
- DbgkCreateThread: Set the StartAddress pointer in the case where we only send the Create Thread message. Also, we should receive the target thread as the first parameter.
- NtDebugActiveProcess: Don't allow debugging the current process.
- NtDebugContinue: We should signal the Debug Object, not the Debug Event. Also make sure we pass the correct event to DbgkpWakeTarget.
- NtWaitForDebugEvent: Cleanup probe and capture of the input timeout.

svn path=/trunk/; revision=38768
2009-01-15 13:14:37 +00:00
Dmitry Chapyshev
a0520cb3ae - Implement FlashWindow
svn path=/trunk/; revision=38766
2009-01-15 10:18:10 +00:00
Johannes Anderwald
e284c5d6a8 - sorry folks
svn path=/trunk/; revision=38765
2009-01-14 21:47:54 +00:00
Stefan Ginsberg
2de45ffbc0 - Revert 38762 to fix build
svn path=/trunk/; revision=38764
2009-01-14 19:55:51 +00:00
Matthias Kupfer
67dd2ec87d Mario Kacmar <kario AT szm DOT sk>
- Fix Switch-To Button, enable only if one selected application.
- See issue #4028 for more details.

svn path=/trunk/; revision=38763
2009-01-14 18:12:43 +00:00
Johannes Anderwald
f8e5a94969 - Implement PcForwardIrpSynchronous
svn path=/trunk/; revision=38762
2009-01-14 17:14:20 +00:00
Stefan Ginsberg
be69d2aa50 - DBGK: Use flags instead of magic values for Debug Events -- names taken from http://neitsabes.online.fr/dc/index.php?2007/12/04/7-ntqueryinformationprocess-processinfoclass-30
svn path=/trunk/; revision=38761
2009-01-14 14:55:46 +00:00
KJK::Hyperion
d62fc8535e deleted lib/pseh/framebased-gcchack.c
added      lib/pseh/i386/framebased-gcchack-asm.S
added      lib/pseh/i386/framebased-gcchack.c
deleted    lib/pseh/i386/framebased-gcchack.S
modified   lib/pseh/pseh.rbuild
   framebased-gcchack.c is irreversibly married to the x86 architecture. Move it to the appropriate place
   Rename framebased-gcchack.S because its base name now conflicts with framebased-gcchack.c

svn path=/trunk/; revision=38760
2009-01-14 14:51:23 +00:00
Kamil Hornicek
53d48069ba [FORMATTING] Fix indentation. No code change.
svn path=/trunk/; revision=38759
2009-01-14 14:41:25 +00:00
Aleksey Bragin
bc6a89af41 - Add stubs for VolumeControlBlock structure, VolumeDeviceObject,
- Improve FAT_IRP_CONTEXT structure to suit future needs.
- Some more cleanup of fastfat.h (to be separated into a few headers as shown by Alex Vlasov).
- Implement FatBuildIrpContext / FatDestroyIrpContext.
- Implement FatCompleteRequest.
- Implement dispatching of FSCTRL requests.
- DPRINT->DPRINT1 for all unimplemented functions.
- We receive a mount volume request!

svn path=/trunk/; revision=38755
2009-01-14 10:42:56 +00:00
Aleksey Bragin
2ed6687632 - Revert 38750, a dereference happens when that hook is freed by IntFreeHook.
- Change thread dereferencing mechanism in NtUserSetWindowsHookEx:
 * A thread may be referenced in some cases when it's a system-wide hook, however dereference flag was not set for these, so they leaked a reference. Add a ThreadReferenced boolean var to track real references, and set hook's flag according to it.
 * There should be no need to call ObDereferenceObject on a thread when a call to IntRemoveHook was already performed (in failure branches). IntFreeHook() will dereference the thread object.

svn path=/trunk/; revision=38754
2009-01-14 09:51:50 +00:00
Christoph von Wittich
3bb7973d97 fix jim's copypasta
svn path=/trunk/; revision=38753
2009-01-14 07:09:25 +00:00
James Tabor
e3b9b100e1 - Added stubs to timers, tooling up to change over to handled timers. This is related to just about everything. From Carets to window positions.
svn path=/trunk/; revision=38752
2009-01-14 02:02:26 +00:00
Stefan Ginsberg
953cecc715 - KDBG: Correct the use of PsLookupThread/ProcessByThread/ProcessId -- the caller must dereference the Thread/Process after use
svn path=/trunk/; revision=38751
2009-01-14 00:34:24 +00:00
Stefan Ginsberg
3ca6b9e650 - NtUserSetWindowsHookEx: Don't leak a thread reference in case we are passed a Thread Id
svn path=/trunk/; revision=38750
2009-01-13 23:41:34 +00:00
Danny Götte
d2ba31585e rework entries acl handling to be more dynamic
svn path=/branches/danny-web/; revision=38749
2009-01-13 22:48:53 +00:00
Johannes Anderwald
5bc4586475 - Copy provided PCM_RESOURCE_LIST when a new ResourceList is created
svn path=/trunk/; revision=38748
2009-01-13 22:36:03 +00:00
Matthias Kupfer
2b06cfc0ef Víctor Martínez Calvo <vicmarcal AT hotmail DOT com>
- Fix dir command behavior for files without extension.
- See issue #3968 for more details.

svn path=/trunk/; revision=38746
2009-01-13 15:21:08 +00:00
James Tabor
0c4b617c16 - Re-implement NtUserDispatchMessage and implement NtUserValidateTimerCallback.
svn path=/trunk/; revision=38745
2009-01-13 12:16:06 +00:00
Aleksey Bragin
732b0f6f65 - Remove unneeded functions.
- Cleanup, reformat, remove static.

svn path=/trunk/; revision=38744
2009-01-13 12:13:21 +00:00
Cameron Gutman
71f5b95706 - Merge aicom-network-fixes up to r38730
svn path=/trunk/; revision=38743
2009-01-13 02:34:39 +00:00
Thomas Bluemel
9452b7e23c Remove unused code
svn path=/trunk/; revision=38742
2009-01-13 00:34:32 +00:00
James Tabor
a035fd4e21 - Un-implement NtUserDispatchMessage.
- First of all, it is incorrect. I had a rant that I was going to send to the private mail list, but this will do.
- No more "New Standards"! The Window object should already know it is ANSI or not. A pointer to MSG is the only thing passed.


svn path=/trunk/; revision=38741
2009-01-12 23:36:10 +00:00
Timo Kreuzer
a10da42dd1 winbase.h: Add EncodePointer, DecodePointer, EncodeSystemPointer and DecodeSystemPointer
svn path=/trunk/; revision=38740
2009-01-12 22:47:25 +00:00
Timo Kreuzer
02c15ae9f7 Sync edit.c with wine head (Wine-1_1_12)
Reduces failures from 18 to 13 and test doesn't keep a window open anymore.

(Partly) revert 29649, 33848, 33909, 33910 as it's now implemented by wine

1.4 Francois Gouget <fgouget@free.fr>
Don't put single quotes around '%s' when using the debugstr_*() functions.

1.5 Huw Davies <huw@codeweavers.com>
user32: Keep track of whether the app has asked for the text buffer handle.

1.9 Dmitry Timoshkov <dmitry@codeweavers.com>
user32: Fix some compilation warnings in 64-bit mode.

1.15 Alexandre Julliard <julliard@winehq.org>
user32: Store the builtin class names in Unicode.

1.16 Andrew Talbot <andrew.talbot@talbotville.com>
user32: Constify some variables.

1.17 Gerald Pfeifer <gerald@pfeifer.com>
user32: Factor in EDIT_WM_EraseBkGnd().

1.18 Andrew Talbot <andrew.talbot@talbotville.com>
user32: Remove unneeded casts.

1.19 Marcus Meissner <marcus@jet.franken.de>
user32: Handle error returns from ImmGetCompositionString.

1.20 Lei Zhang <thestig@google.com>
user32: Tweak how the edit control handles WM_GETDLGCODE.

1.21 Lei Zhang <thestig@google.com>
user32: Handle WM_CHAR messages better in edit controls.

1.22 Lei Zhang <thestig@google.com>
user32: Correctly handle VK_RETURN for edit controls with ES_WANTRETURN style.

1.23 Lei Zhang <thestig@google.com>
user32: Fix WM_CHAR return value for edit controls.

1.24 Lei Zhang <thestig@google.com>
user32: Handle ES_MULTILINE correctly for WM_KEYDOWN/VK_RETURN.

1.25 Lei Zhang <thestig@google.com>
user32: Handle VK_ESCAPE correctly in EDIT_WM_KeyDown.

1.26 Lei Zhang <thestig@google.com>
user32: Add edit control check to see if its in a dialog on WM_CHAR/VK_RETURN.

1.27 Lei Zhang <thestig@google.com>
user32: Add edit control check to see if its in a dialog on WM_CHAR/VK_TAB.

1.28 Lei Zhang <thestig@google.com>
user32: Fix a typo.

1.29 Lei Zhang <thestig@google.com>
user32: Handle VK_TAB in EDIT_WM_KeyDown.

1.30 Lei Zhang <thestig@google.com>
user32: Do checks in the right order in EDIT_BuildLineDefs_ML.

1.31 Lei Zhang <thestig@google.com>
user32: Handle ctrl + home in edit control.

1.32 Lei Zhang <thestig@google.com>
user32: Handle ctrl + end in edit control.

1.33 Alexandre Julliard <julliard@winehq.org>
user32: Added support for WS_EX_RIGHT in the edit control.

1.34 Kusanagi Kouichi <slash@ma.neweb.ne.jp>
user32: Handle IME messages more gracefully.

1.35 Alexandre Julliard <julliard@winehq.org>
user32: Remove redundant LocalUnlock calls.

1.36 Austin English <austinenglish@gmail.com>
Spelling fixes.

1.37 Lei Zhang <thestig@google.com>
user32: Handle VK_RETURN WM_KEYDOWN events better in edit controls.
Elias Benali wrote the initial version of this patch.

1.38 Lei Zhang <thestig@google.com>
user32: Edit controls should ignore WM_KEYDOWN on control + enter.

1.39 Andrew Talbot <andrew.talbot@talbotville.com>
user32: Remove unused variables.

1.40 Hongbo Ni <hongbo@njstar.com>
user32: Implement WM_UNICHAR for edit control.

1.41 Lei Zhang <thestig@google.com>
user32: Send messages for edit control context menu operations.

1.42 Aric Stewart <aric@codeweavers.com>
user32: Make sure our vertical line count is at least 1 even if there is an oversized font in the edit control.

1.43 Michael Stefaniuc <mstefani@redhat.de>
user32: Remove superfluous casts of void pointers.

1.44 Francois Gouget <fgouget@codeweavers.com>
user32: Remove WINAPI/CALLBACK on static functions where not needed.


svn path=/trunk/; revision=38739
2009-01-12 22:03:00 +00:00
Dmitry Gorbachev
24ffd04056 Update Spanish translations.
Patch from Javier Remacha (remialdo gmail com). Bug #4021.

svn path=/trunk/; revision=38738
2009-01-12 21:18:57 +00:00
Timo Kreuzer
b025eddd79 revert last commit insetad remove UNICODE_NOCHAR from wine/winuser.h
svn path=/trunk/; revision=38737
2009-01-12 21:12:10 +00:00
Timo Kreuzer
4ca5586a80 define UNICODE_NOCHAR only if it wasn't already defined
svn path=/trunk/; revision=38736
2009-01-12 20:59:51 +00:00
Timo Kreuzer
15c3798cac Sort window messages by num, add WM_MENUDRAG, WM_MENUGETOBJECT, WM_UNICHAR
svn path=/trunk/; revision=38735
2009-01-12 20:49:08 +00:00
James Tabor
fe1e8cc06f - Sort out common used DCE flags.
svn path=/trunk/; revision=38734
2009-01-12 20:43:34 +00:00
James Tabor
9378c725cf - Fix another wine test for SetWindowPos.
svn path=/trunk/; revision=38733
2009-01-12 20:00:41 +00:00
Johannes Anderwald
10462d3a41 - fix me (add missing file)
svn path=/trunk/; revision=38732
2009-01-12 18:40:08 +00:00
Johannes Anderwald
efbe4ec231 - Implement IPortTopology::NewRegistryKey, IPortWavePci::NewRegistryKey
- Implement PcRegisterPhysicalConnection, PcRegisterPhysicalConnectionFromExternal, PcRegisterPhysicalConnectionToExternal- Implement PcRequestNewPowerState

svn path=/trunk/; revision=38731
2009-01-12 18:37:02 +00:00
Stefan Ginsberg
ca7c2576bb - Revert to pre-38722 to unbreak build
svn path=/trunk/; revision=38728
2009-01-12 17:52:03 +00:00
Aleksey Bragin
cf776e38c2 - Stubplement handlers for all needed IRP_MJ except EA and PNP one.
- Cleanup remains of unneeded functions.

svn path=/trunk/; revision=38726
2009-01-12 17:04:13 +00:00
Aleksey Bragin
45c73d1f38 - Cleanup header file.
- Add sync resource to the global data and initialize it.
- Remove unneeded block device access functions.

svn path=/trunk/; revision=38725
2009-01-12 16:31:22 +00:00
Dmitry Gorbachev
4e52f2d1e3 BATCH_BUFFSIZE -> 8192.
svn path=/trunk/; revision=38724
2009-01-12 16:13:06 +00:00
Johannes Anderwald
db8b3ac429 - Implement PcRequestNewPowerState
svn path=/trunk/; revision=38723
2009-01-12 15:57:49 +00:00
Johannes Anderwald
0afaa05791 - Implement IPortTopology::NewRegistryKey, IPortWavePci::NewRegistryKey
- Implement PcRegisterPhysicalConnection, PcRegisterPhysicalConnectionFromExternal, PcRegisterPhysicalConnectionToExternal

svn path=/trunk/; revision=38722
2009-01-12 15:20:45 +00:00
Aleksey Bragin
25b0bc6e8f - Remove leftover from 38352 and 38353, sorry.
svn path=/trunk/; revision=38721
2009-01-12 15:13:44 +00:00
Michael Martin
31efcbd841 - Revert 38719.
svn path=/trunk/; revision=38720
2009-01-12 12:29:53 +00:00
Michael Martin
5888e8aa1c - Re-enable pipe tests as the npfs driver is in much better shape.
- Change the timeout value passed to WaitForSingleObject to 20 so tests pass on slower systems.
- Re-enable process console test as they now complete.

svn path=/trunk/; revision=38719
2009-01-12 12:13:54 +00:00
Timo Kreuzer
cfdb62c4a4 update README.WINE
svn path=/trunk/; revision=38718
2009-01-12 03:20:27 +00:00
Timo Kreuzer
6ee72ec6cb Sync wsprintf.c to wine head (Wine-1_1_12)
Alexandre Julliard <julliard@winehq.org>
user32: Convert wvsprintfA/W to use an MS ABI vararg list for x86_64.

svn path=/trunk/; revision=38717
2009-01-12 02:46:45 +00:00
Timo Kreuzer
9521ad092e reduce diff to wine
svn path=/trunk/; revision=38716
2009-01-12 02:10:58 +00:00
Timo Kreuzer
7ca1b7f127 Sync combo.c to wine head (Wine-1_1_12)
Austin English <austinenglish@gmail.com>
Spelling fixes.

Aric Stewart <aric@codeweavers.com>
user32: Make sure there is space for at least 6 items in a combo dropdown without forcing it to be at most 6 items as well.

Dmitry Timoshkov <dmitry@codeweavers.com>
user32: Add a test for combobox navigation with arrow keys, make it pass under Wine.

James Hawkins <jhawkins@codeweavers.com>
janitorial: Remove links to any microsoft site.

Lei Zhang <thestig@google.com>
user32: Use wine_dbgstr_rect() in traces.

Andrew Talbot <andrew.talbot@talbotville.com>
user32: Fix a typo.


svn path=/trunk/; revision=38715
2009-01-12 02:09:12 +00:00
Timo Kreuzer
0842a4dc0d Sync button.c to wine head (1_1_12)
Francois Gouget <fgouget@codeweavers.com>
user32: Remove WINAPI/CALLBACK on static functions where not needed.

Michael Stefaniuc <mstefani@redhat.de>
user32: HGDIOBJ is interchangeable with other handle types; no casts are needed.

Austin English <austinenglish@gmail.com>
Spelling fixes.

Alexandre Julliard <julliard@winehq.org>
user32: Added support for WS_EX_RIGHT in the button control.

Andrew Talbot <andrew.talbot@talbotville.com>
user32: Remove unneeded casts.

Dmitry Timoshkov <dmitry@codeweavers.com>
user32: Make sure to setup clipping before any painting is done.

Dmitry Timoshkov <dmitry@codeweavers.com>
user32: Always clip the button painting to the client rectangle.

Andrew Talbot <andrew.talbot@talbotville.com>
user32: Constify some variables.

Alexandre Julliard <julliard@winehq.org>
user32: Store the builtin class names in Unicode.

Francois Gouget <fgouget@free.fr>
Assorted spelling fixes.

Andrew Talbot <Andrew.Talbot@talbotville.com>
user32: Replace inline static with static inline.

Clinton Stimpson <cjstimpson@utwire.net>
user32: WM_SETFONT on button doesn't repaint directly.

svn path=/trunk/; revision=38714
2009-01-12 00:46:34 +00:00
Timo Kreuzer
27521056a9 exchange members for ansi and unicode WNDPROC in builtin_class_descr. Reduces diff to wine a bit more.
svn path=/trunk/; revision=38713
2009-01-12 00:36:14 +00:00
Timo Kreuzer
f51273a2eb user32 revert lite ;-P
- revert 32934: remove the hack for disabled button font, as it's not needed anymore since we have tahoma
- partly revert 28055: use InvalidateRect and add it to ntwrapper.h
- add a define for SYSCOLOR_GetPen to reduce diff to wine

svn path=/trunk/; revision=38712
2009-01-11 23:08:47 +00:00
Dmitry Chapyshev
c1c18ff1ff - Update Polish translation by Maciej Bialas (bjauy@o2.pl)
svn path=/trunk/; revision=38711
2009-01-11 20:15:25 +00:00
Dmitry Gorbachev
4d1f9ce1d4 - Fix "Turkish Q" keyboard layout (thanks to user mergulcu from the forum).
- Change AltGr behavior for several keyboard layouts (bug #3887).
- Change file description for some keyboard layouts.
- Other minor changes.

svn path=/trunk/; revision=38710
2009-01-11 19:09:25 +00:00
Dmitry Gorbachev
c89abc23b7 Add "Turkish F" keyboard layout to USetup.
svn path=/trunk/; revision=38709
2009-01-11 19:09:11 +00:00
Dmitry Chapyshev
079741c940 - Sync uxtheme with Wine head
svn path=/trunk/; revision=38708
2009-01-11 19:04:51 +00:00
Dmitry Chapyshev
cbc7d519d3 - Sync urlmon with Wine head
svn path=/trunk/; revision=38707
2009-01-11 19:04:02 +00:00
Dmitry Chapyshev
2b785b4fc4 - Sync wldap32 with Wine head
svn path=/trunk/; revision=38706
2009-01-11 19:02:16 +00:00
Dmitry Chapyshev
2e8764aa34 - Sync cryptui with Wine head
svn path=/trunk/; revision=38705
2009-01-11 18:58:04 +00:00
Dmitry Chapyshev
72ba4a35e2 - Sync credui with Wine head
svn path=/trunk/; revision=38704
2009-01-11 18:56:19 +00:00
Dmitry Chapyshev
b358abe79d - Sync headers with Wine
svn path=/trunk/; revision=38703
2009-01-11 18:55:29 +00:00
Dmitry Chapyshev
467d035432 - Sync clusapi with Wine head
svn path=/trunk/; revision=38702
2009-01-11 18:54:21 +00:00
Dmitry Chapyshev
c9ee26a85c - Sync netapi32 with Wine head
svn path=/trunk/; revision=38701
2009-01-11 15:59:49 +00:00
Aleksey Bragin
a2c47e5c86 - Rewrite DriverEntry.
- Start cleaning up structures.

svn path=/trunk/; revision=38700
2009-01-11 15:58:57 +00:00
Michael Martin
981645312e - Last implementation was failing to charge the QuotaAvailable for the message length proceeding the message in the buffer, causing overwriting of the pool. See bug 4018 for more info.
svn path=/trunk/; revision=38699
2009-01-11 14:28:45 +00:00
Aleksey Bragin
6094202983 - Delete old source code (only fastio.c and DriverEntry remain for now).
- Create a base for a future skeleton.

svn path=/trunk/; revision=38698
2009-01-11 14:10:54 +00:00
Aleksey Bragin
dd4b33c2a6 Olaf Siejka <olaf_siejka@o2.pl>
- Add VBE 24bpp modes into 1st stage setup.

svn path=/trunk/; revision=38697
2009-01-11 14:05:07 +00:00
Danny Götte
48af315d2b * remove checks for users security level or membership checks and replace them with area protection which can be assigned per group.
* Also implement a admin interface for this
* update converter
* minor bugfixes

svn path=/branches/danny-web/; revision=38696
2009-01-11 12:41:52 +00:00
Timo Kreuzer
29e04fb184 Go back to non-win32k functions inside user32, using the inline wrappers to call the NtUser functions.
svn path=/trunk/; revision=38695
2009-01-11 12:37:54 +00:00
Aleksey Bragin
d03b570920 - Renames, cleanup.
svn path=/trunk/; revision=38694
2009-01-11 11:26:20 +00:00
Aleksey Bragin
885a5b68c8 - Branch existing fastfat driver.
svn path=/trunk/; revision=38693
2009-01-11 11:12:55 +00:00
Matthias Kupfer
ea8ef6ce87 Michael von Glasow <michael AT vonglasow DOT com>
- Remove hardcoded Alt Gr behavior.
- Tested with german layout and installation, patch doesn't break system, further tests are recommended.
- See issue #3887 for more details.

svn path=/trunk/; revision=38692
2009-01-11 10:10:31 +00:00
Daniel Reimer
62519aa2e9 German Translation of hdwwiz.
svn path=/trunk/; revision=38691
2009-01-11 00:21:59 +00:00
Timo Kreuzer
94ed506d07 silence TRACEs for libcntpr, too
svn path=/trunk/; revision=38690
2009-01-10 22:44:32 +00:00
Dmitry Gorbachev
4965ccdb1f Czech patch from Radek Liska. Bug #4014.
svn path=/trunk/; revision=38689
2009-01-10 21:28:18 +00:00
Dmitry Chapyshev
a7f8cd9375 - Formatting fix. No code change
svn path=/trunk/; revision=38688
2009-01-10 19:09:37 +00:00
Christoph von Wittich
faff43dadc sync mlang with wine 1.1.12
svn path=/trunk/; revision=38687
2009-01-10 18:49:19 +00:00
Christoph von Wittich
6bf0cf3954 sync mapi32 with wine 1.1.12
svn path=/trunk/; revision=38686
2009-01-10 18:48:19 +00:00
Christoph von Wittich
afce7cc14c sync localui with wine 1.1.12
svn path=/trunk/; revision=38685
2009-01-10 18:46:10 +00:00
Christoph von Wittich
7658643bd5 sync inetcomm with wine 1.1.12
svn path=/trunk/; revision=38684
2009-01-10 18:44:33 +00:00
Stefan Ginsberg
759f83b3d0 - Remove broken definitions of SEH macros
svn path=/trunk/; revision=38683
2009-01-10 18:25:20 +00:00
Dmitry Chapyshev
9fe45fbb32 - Fix GetEnvironmentVariableW. This fixed also 4 wine tests for OpenFile and SearchPathA/W
svn path=/trunk/; revision=38682
2009-01-10 17:50:03 +00:00
Thomas Bluemel
8dd743f625 SetShellWindow wants the Progman window and the list view window... Thx Timo
svn path=/trunk/; revision=38681
2009-01-10 16:16:25 +00:00
Christoph von Wittich
43e45a3d95 sync cabinet to wine 1.1.12
svn path=/trunk/; revision=38680
2009-01-10 15:17:40 +00:00
Christoph von Wittich
68d310770a sync oleacc and oledlg with wine 1.1.12
svn path=/trunk/; revision=38679
2009-01-10 14:50:05 +00:00
Dmitry Chapyshev
5d038be948 - Fix 3 wine tests for OpenFile function
svn path=/trunk/; revision=38678
2009-01-10 12:33:22 +00:00
Christoph von Wittich
383bd810ce add rpcproxy to dtd
svn path=/trunk/; revision=38677
2009-01-10 11:29:17 +00:00
Dmitry Chapyshev
c4455cd39c - Sync tahoma fonts with Wine head
svn path=/trunk/; revision=38676
2009-01-10 09:35:02 +00:00
Timo Kreuzer
387249a2a2 Register the correct windows, fixes the problem that explorer_new's desktop was hiding the taskbar.
svn path=/trunk/; revision=38675
2009-01-10 03:39:01 +00:00
Thomas Bluemel
13c77c4fcf Register the shell desktop and tray window
svn path=/trunk/; revision=38674
2009-01-10 00:58:24 +00:00
Timo Kreuzer
5abd3acc00 Inline wrappers user32 -> NtUser
svn path=/trunk/; revision=38673
2009-01-10 00:28:06 +00:00
Dmitry Chapyshev
fa78e58777 - Update Norwegian translation.
See issue #4007 for more details.

svn path=/trunk/; revision=38672
2009-01-09 21:02:07 +00:00
Dmitry Chapyshev
36f51abb8d - Update Slovak translation. Patch by Mario Kacmar (kario@szm.sk))
See issue #4005 for more details.

svn path=/trunk/; revision=38671
2009-01-09 18:06:28 +00:00
KJK::Hyperion
5f139de511 Preparing for future widl sync
modified   ReactOS-i386.rbuild
   Define USE_COMPILER_EXCEPTIONS because we don't need SEH hacks in RPC stubs (neener neener)

modified   include/psdk/wtypes.idl
modified   include/psdk/xmldom.idl
   Include guard format will change in widl: pre-emptively work around it

svn path=/trunk/; revision=38670
2009-01-09 16:50:17 +00:00
KJK::Hyperion
7c38c73a99 modified tests/pseh2/psehtest.c
Don't obscure the names of testcases with macro trickery. It gets old fast
   Regression test for #4004 (fixed in r38668)

svn path=/trunk/; revision=38669
2009-01-09 16:38:28 +00:00
KJK::Hyperion
d728ecb2ca modified include/reactos/libs/pseh/pseh2.h
modified   lib/pseh/framebased-gcchack.c
modified   lib/pseh/i386/framebased-gcchack.S
   Don't save just ESP and EBP, save all volatile registers because we might catch an exception thrown by another frame and end up clobbering all volatile registers (thanks to Dmitry Gorbachev for bug report and test case)
   Conversely, save volatile registers for _SEH2_EXCEPT scopes only
   Specialized frame setup routines, to reduce the amount of inline code and only de-optimize when strictly necessary

svn path=/trunk/; revision=38668
2009-01-09 16:36:21 +00:00
Dmitry Gorbachev
92d6cc1154 In co_MsqPostKeyboardMessage(), do not forget to release lock - this should cure the "blue death" and the "black death" diseases (bug #3995, bug #3997).
svn path=/trunk/; revision=38667
2009-01-09 15:39:28 +00:00
Christoph von Wittich
12e91a347c fix msvc build
svn path=/trunk/; revision=38664
2009-01-09 14:38:59 +00:00
Dmitry Chapyshev
bd89b2d7b5 - Cleanup user32, direct call to kernel space
svn path=/trunk/; revision=38663
2009-01-09 11:33:50 +00:00
Michael Martin
8b8bf0f32a - Dont call KeWaitForSingleObject with WaitMode of KernelMode, as threads cannot be terminated if request was made from user mode. Use Ipr->RequestorMode instead.
svn path=/trunk/; revision=38662
2009-01-09 11:04:11 +00:00
Aleksey Bragin
d7523459e7 - Fix inversed failure logic in MmAllocatePagesForMdl.
See issue #4009 for more details.

svn path=/trunk/; revision=38661
2009-01-09 08:54:03 +00:00
Christoph von Wittich
fd83003c9d -convert to unicode
-fix a big memory leak

svn path=/trunk/; revision=38660
2009-01-09 07:46:07 +00:00
Michael Martin
28cf753e62 - Run process notification routines after successfully creating process.
svn path=/trunk/; revision=38659
2009-01-09 06:13:14 +00:00
Timo Kreuzer
7ce2261b67 - Remove the dib pointer from SURFACE
- Handle mapped sections in SURFACE_Cleanup
- Handle user provided bitfields, when creating a dib
- Some code cleanup

svn path=/trunk/; revision=38658
2009-01-09 02:06:39 +00:00
Timo Kreuzer
ce56804010 More tests for NtGdiCreateDIBSection
svn path=/trunk/; revision=38657
2009-01-09 00:52:04 +00:00
Timo Kreuzer
132c804512 More tests for GetObject
svn path=/trunk/; revision=38656
2009-01-09 00:50:20 +00:00
Colin Finck
4cc7302baf - It actually wasn't a very good idea to authenticate against the MD5 password hash instead of the password itself.
This didn't really improve security, but just made things more difficult for the user. Change that, so the web service and rosautotest expect a password in the "rosautotest.ini" file now.
- Read the "rosautotest.ini" from the application's directory instead of the Windows directory.
- Little adjustmensts here and there

svn path=/trunk/; revision=38655
2009-01-08 23:09:10 +00:00
Dmitry Chapyshev
ceb5ac5e37 - Fix regression of Dependency Walker
See issue #3374 for more details.

svn path=/trunk/; revision=38654
2009-01-08 20:49:11 +00:00
Dmitry Chapyshev
57616915d3 - Sync ICO_ExtractIconExW with Wine head. This fixed exception in wine tests. All tests for PrivateExtractIconsA/W passed now
svn path=/trunk/; revision=38653
2009-01-08 20:28:19 +00:00
Dmitry Chapyshev
c76d2abb9d - Add Wine implementation LoadStringA/W. This is fixed all wine tests for LoadString
svn path=/trunk/; revision=38652
2009-01-08 19:47:29 +00:00
Dmitry Chapyshev
915dfcf6a7 - Fix NtUserCopyAcceleratorTable and NtUserCreateAcceleratorTable (ported from Wine). This is fixed 5 wine resources tests
svn path=/trunk/; revision=38651
2009-01-08 19:35:29 +00:00
Stefan Ginsberg
bc2d37c41a - COMPUTE_PAGES_SPANNED is deprecated, use ADDRESS_AND_SIZE_TO_SPAN_PAGES instead
svn path=/trunk/; revision=38650
2009-01-08 19:27:09 +00:00
Christoph von Wittich
51a15d360b fix msvc build
svn path=/trunk/; revision=38649
2009-01-08 19:08:47 +00:00
Aleksey Bragin
eca633ce05 - Some 64bits syncs from Wine by Samuel Serapion.
svn path=/trunk/; revision=38648
2009-01-08 17:35:42 +00:00
Dmitry Chapyshev
174b42a736 - Formatting fix. No code change
svn path=/trunk/; revision=38646
2009-01-08 17:21:16 +00:00
Timo Kreuzer
8560b3bcc3 Rename BITMAPOBJ to SURFACE as it's called on windows. Also rename related functions and variables.
svn path=/trunk/; revision=38645
2009-01-08 16:33:40 +00:00
Dmitry Chapyshev
be61701517 - Implement devices status page
- More partly implementation

svn path=/trunk/; revision=38644
2009-01-08 14:24:45 +00:00
Daniel Reimer
b1bf34ac4d Sync to Wine HEAD. Done with my first try of a autosync script for the normal apps.
svn path=/trunk/; revision=38643
2009-01-08 14:08:17 +00:00
Daniel Reimer
2fa1f6d4c8 Sync to Wine HEAD. Done with my first try of a autosync script for the normal apps.
svn path=/trunk/; revision=38642
2009-01-08 14:07:10 +00:00
Dmitry Gorbachev
6eeb5b7cf6 Fix number of pages.
svn path=/trunk/; revision=38641
2009-01-08 11:39:57 +00:00
Dmitry Chapyshev
73b2556b86 - Fix bug with incorrect a working directory. Patch by Evgeny Boltik (bstsoft@narod.ru) with my small changes
See issue #4006 for more details.

svn path=/trunk/; revision=38640
2009-01-08 10:29:19 +00:00
Michael Martin
c060461efd - Revert r38638 for now, as there is still changes that need to be done to handle this correctly.
svn path=/trunk/; revision=38639
2009-01-08 07:59:35 +00:00
Michael Martin
373e0819fd - Don't call KeWaitForSingleObject here, as doing so can lock the thread in a wait if no one ever connects to it. Also the wait is handled in Kernel32.
svn path=/trunk/; revision=38638
2009-01-08 07:45:42 +00:00
Aleksey Bragin
9e8a571c11 - Get back ExceptionCode changed in r38624.
svn path=/trunk/; revision=38637
2009-01-08 07:28:48 +00:00
Timo Kreuzer
39c466cd17 Tests for NtGdiCreateDIBSection and NtGdiExtTextOutW
svn path=/trunk/; revision=38636
2009-01-08 00:34:38 +00:00
Dmitry Chapyshev
9816064074 - Partly implement of installed hardware page
svn path=/trunk/; revision=38635
2009-01-07 20:28:10 +00:00
Timo Kreuzer
6190cc73d3 remove the test code I accidentally comitted
svn path=/trunk/; revision=38634
2009-01-07 20:25:19 +00:00
Timo Kreuzer
474ed3e076 - Fix creation of XLATE in IntEngCreateSrcMonoXlate. It was doing it wrong (colors swapped) and it only worked, because the caller of the function also passed the wrong arguments.
- Mono DIBs need a special handling when creating the XLATEOBJ. Handle this in IntCreateXlateForBlt. Fixes broken colors on google/Firefox page.

svn path=/trunk/; revision=38633
2009-01-07 20:02:28 +00:00
Gregor Schneider
c7aab5aafd Don't remove the mouse cursor when previewing a screensaver.
svn path=/trunk/; revision=38632
2009-01-07 18:17:02 +00:00
Danny Götte
b474325822 * readd & update diff function
* fix css
* fix problem, while requesting translations

svn path=/branches/danny-web/; revision=38631
2009-01-07 14:43:03 +00:00
Dmitry Chapyshev
2037c316a8 - Add more resources
- More dialogs implementation

svn path=/trunk/; revision=38629
2009-01-07 13:50:54 +00:00
Christoph von Wittich
71d636cbfd fix formatting
svn path=/trunk/; revision=38627
2009-01-07 11:49:17 +00:00
Dmitry Chapyshev
bcb9050940 - Set parent window for the wizard
- Call DisableThreadLibraryCalls for DLL_PROCESS_ATTACH case

svn path=/trunk/; revision=38626
2009-01-07 10:58:29 +00:00
Ged Murphy
eff0bbf89b enable RQueryServiceObjectSecurity
svn path=/trunk/; revision=38625
2009-01-07 10:38:17 +00:00
KJK::Hyperion
542b6ccb3d modified ntoskrnl/ke/i386/exp.c
Slight refactoring to make exception-safety auditing easier
   Remove an unnecessary local variable, reuse another instead

svn path=/trunk/; revision=38624
2009-01-07 10:36:06 +00:00
KJK::Hyperion
8b74932e9c modified dll/win32/kernel32/misc/console.c
We have _SEH2_FINALLY: use it

svn path=/trunk/; revision=38623
2009-01-07 10:23:29 +00:00
KJK::Hyperion
1a22232734 Reverting poorly conceived commit
svn path=/trunk/; revision=38622
2009-01-07 10:13:43 +00:00
KJK::Hyperion
0c9ebe37a0 modified include/reactos/probe.h
modified   ntoskrnl/ex/harderr.c
modified   ntoskrnl/ex/sysinfo.c
modified   ntoskrnl/ob/oblife.c
   PSEH can't make code exception-safe (yet). Add explicit "volatile"s where it might be necessary

svn path=/trunk/; revision=38621
2009-01-07 09:54:13 +00:00
KJK::Hyperion
138dcb0ad3 modified dll/win32/advapi32/sec/lsa.c
modified   dll/win32/advapi32/service/eventlog.c
modified   dll/win32/advapi32/service/scm.c
modified   dll/win32/advapi32/service/sctrl.c
modified   dll/win32/setupapi/cfgmgr.c
   Use RPC exception handling macros consistently

svn path=/trunk/; revision=38620
2009-01-07 09:44:21 +00:00
Timo Kreuzer
9d33c35fdc set svn:eol-style = native
svn path=/trunk/; revision=38619
2009-01-07 00:55:12 +00:00
Dmitry Chapyshev
28901cd46c - Add more dialogs
- Create title font for start and finish pages

svn path=/trunk/; revision=38618
2009-01-06 21:19:50 +00:00
Stefan Ginsberg
a97462545d - DebugSetProcessKillOnExit: Use SetLastErrorByStatus for NTSTATUS codes
svn path=/trunk/; revision=38617
2009-01-06 19:58:53 +00:00
Stefan Ginsberg
09cde7e355 - NtUserWaitForInputIdle: Call EngGetTickCount, removing duplicated code
- GetTickCount/GetTickCount64/EngGetTickCount: Use the correct SharedUserData fields, and fix the calculations
- KeUpdateSystemTime: Don't update TickCountLowDeprecated now that it truly is deprecated
- Thanks to Fireball and KJK!

svn path=/trunk/; revision=38616
2009-01-06 19:57:44 +00:00
Danny Götte
5ab3a5548d Welcome RosCMS admin interface, now we can manage roscms groups, ACLs and languages online and don't need to touch our DB for this again.
svn path=/branches/danny-web/; revision=38615
2009-01-06 19:51:22 +00:00
Dmitry Chapyshev
c92aee8772 - Small fix for Russian translation
- More dialogs implement
- LPTSTR -> LPWSTR

svn path=/trunk/; revision=38614
2009-01-06 19:28:04 +00:00
Dmitry Chapyshev
5e2d6ae76a - Add hdwwiz to bootcd
svn path=/trunk/; revision=38613
2009-01-06 18:35:20 +00:00
Dmitry Chapyshev
5587946eb3 - Start implementing of hdwwiz
- Add some resources

svn path=/trunk/; revision=38612
2009-01-06 18:32:51 +00:00
Timo Kreuzer
6daa8fe753 set svn:eal-style = native
svn path=/trunk/; revision=38611
2009-01-06 18:11:12 +00:00
Gregor Schneider
5cbeb4ca6b Compile audiosrv warning free by defining array parts of GUIDs with braces
svn path=/trunk/; revision=38610
2009-01-06 18:09:51 +00:00
Christoph von Wittich
3fc8d752a8 -Rob Shearman <robertshearman at gmail.com> Thu Sep 18 2008
widl: Don't automatically add DUMMYUNIONNAME and DUMMYSTRUCTNAME names to anonymous unions and structs.

-Rob Shearman <robertshearman at gmail.com> Thu Sep 18 2008
include: Add explicit DUMMYUNIONNAME and DUMMYSTRUCTNAME names to anonymous unions in IDL files.

svn path=/trunk/; revision=38609
2009-01-06 17:52:24 +00:00
Gregor Schneider
b85fc47c09 Clean up IntGdiRealizePalette by removing old and/or dead code, misleading descriptions and obsolete numbering.
svn path=/trunk/; revision=38608
2009-01-06 17:38:30 +00:00
Gregor Schneider
06332c431c - Fix a coordinate problem that occurred with alphablend in DrawIconEx (32bpp mode only)
- Welcome back mixer icon in 32bpp mode!
- Note for other invisible icons in that mode: 32bpp icon variants are most likely missing in the *.ico file; ReactOS image bpp conversion functions currently clear the alpha channel -> invisibility
- Update function names in debug prints, remove duplicate code, slightly improve code readability

svn path=/trunk/; revision=38607
2009-01-06 17:12:07 +00:00
Christoph von Wittich
3fec61d4a6 update some header/idl
svn path=/trunk/; revision=38606
2009-01-06 15:48:55 +00:00
Christoph von Wittich
949f6752bb fpclass -> _fpclass
svn path=/trunk/; revision=38605
2009-01-06 10:33:42 +00:00
Christoph von Wittich
76d01f9028 update libxml2 to 2.7.2
svn path=/trunk/; revision=38604
2009-01-06 10:24:26 +00:00
Christoph von Wittich
38418a1b4c -don't cast const char to char
-handle RPC_X_ENUM_VALUE_OUT_OF_RANGE and RPC_X_BYTE_COUNT_TOO_SMALL in ScmRpcStatusToWinError
-add some traces
-don't write to NULL pointers, don't do strlen on a NULL pointer

svn path=/trunk/; revision=38603
2009-01-06 07:53:04 +00:00
Christoph von Wittich
76f5148d89 -Vincent Povirk <madewokherd+d41d at gmail.com> Thu Dec 4 2008
widl: Fix string format warning.

-Andrew Talbot <andrew.talbot at talbotville.com> Sat Dec 6 2008
widl: Remove unneeded address-of operators from array names.

svn path=/trunk/; revision=38602
2009-01-06 07:19:59 +00:00
Christoph von Wittich
6e92d826f0 - Rob Shearman <robertshearman at gmail.com> Sun Nov 30
widl: Fix optimisation for writing out ref pointers to simple structs and base types.

svn path=/trunk/; revision=38601
2009-01-06 07:09:07 +00:00
Christoph von Wittich
2a6585478f -Rob Shearman <robertshearman at gmail.com> Sun Nov 30 2008
widl: Output the correct buffer size required for parameters whose sizes are known at type-generation time.

svn path=/trunk/; revision=38600
2009-01-06 06:41:21 +00:00
Christoph von Wittich
4f4e13929b -Dmitry Timoshkov <dmitry <at> codeweavers.com> Mon Nov 10 2008
widl: Make the generated string pointers const as well.

-Alexandre Julliard <julliard <at> winehq.org> Tue Nov 25 2008
widl: Make sure format strings for structure and union types are only output once.

svn path=/trunk/; revision=38599
2009-01-06 06:16:55 +00:00
Johannes Anderwald
03327dfba3 - Remove dma_master.c as it is unused
- Implement PcNewDmaChannel
- partly implement IDmaChannel / IDmaChannelSlave

svn path=/trunk/; revision=38598
2009-01-06 05:33:34 +00:00
Johannes Anderwald
b8c35daba1 - Add IID_IDmaChannel guid
svn path=/trunk/; revision=38597
2009-01-06 05:31:16 +00:00
Johannes Anderwald
3c5d23b45a - Fix build sorry
svn path=/trunk/; revision=38596
2009-01-06 03:02:02 +00:00
Johannes Anderwald
86f06a0ebe - Implement IPortWaveCyclic::NewMasterDmaChannel, IPortWaveCyclic::NewDmaChannelSlave, IPortWavePci_fnNewMasterDmaChannel
svn path=/trunk/; revision=38595
2009-01-06 00:44:16 +00:00
Johannes Anderwald
4cfef4b794 - Add GUID IID_IDmaChannelSlave
svn path=/trunk/; revision=38594
2009-01-06 00:41:40 +00:00
Johannes Anderwald
add01fe9f3 - Fix IPortWavePci interface definition
svn path=/trunk/; revision=38592
2009-01-06 00:17:55 +00:00
Johannes Anderwald
dd3c392850 - Implement PcDmaMasterDescription, PcDmaSlaveDescription
svn path=/trunk/; revision=38591
2009-01-06 00:04:32 +00:00
James Tabor
8bbe320757 - Patch by Michael Martin: Fix for Get/Set CallProc.
- Michael points out the fact that our system hard codes to unicode and does not mix ANSI and Unicode as it should. This creates problems when applications use ansi only. ReactOS lacks the mechanics of switching back to ANSI. The beginning of the project it seemed to become an unwritten rule. We learn from our misstakes and move on. When working on a drafting project, do not draw more than you can erase in a day.



svn path=/trunk/; revision=38590
2009-01-05 23:35:10 +00:00
Hervé Poussineau
ddd86fea53 Add missing breaks
Spotted by Maciej Bialas (bjauy at o2.pl)

svn path=/trunk/; revision=38589
2009-01-05 20:36:39 +00:00
Christoph von Wittich
072a17a70e - Austin English <austinenglish <at> gmail.com> Tue, 9 Sep 2008
widl: remove unreached code (Smatch)

- Rob Shearman <robertshearman <at> gmail.com> Wed Sep 10 2008
widl: Fix the writing typedefs to dispinterfaces and pointers to interfaces.

- Rob Shearman <robertshearman <at> gmail.com> Wed Sep 10 2008
widl: Remove redundant code.

svn path=/trunk/; revision=38588
2009-01-05 18:17:35 +00:00
Stefan Ginsberg
c5c778d46e - Properly implement NdisGetSystemUpTime, based on http://www.tech-archive.net/Archive/Development/microsoft.public.development.device.drivers/2004-11/0616.html
svn path=/trunk/; revision=38587
2009-01-05 17:51:55 +00:00
Timo Kreuzer
3f64101cc9 silence crt TRACE flood
svn path=/trunk/; revision=38584
2009-01-05 14:07:04 +00:00
Colin Finck
55add6464c Revert a part of r38087. OutputDebugStringA doesn't add a newline automatically.
Verified by MSVC's debug output and kinda proofed by http://www.unixwiz.net/techtips/outputdebugstring.html (nobody would write a function for adding newlines to the debug output if that would be done automatically)

Thanks to Gregor for the hints.

svn path=/trunk/; revision=38583
2009-01-05 13:22:27 +00:00
Timo Kreuzer
d8a7ac50bd Silence warnings on linux hosts
svn path=/trunk/; revision=38582
2009-01-05 12:55:13 +00:00
Colin Finck
f9a91e55e6 Supersede the current way for running automatic regression tests for real now and switch to rosautotest. No more sights of hardcoded regression test stuff inside syssetup :-)
Works well here, let's hope BuildBot is with me ;-)

Still, there seems to be a bug in our OutputDebugString function, adding a newline at the end of the debug output automatically.
Getting the OutputDebugString output through MSVC doesn't lead to this behaviour, that bug needs to be evaluated in detail later.

svn path=/trunk/; revision=38581
2009-01-05 12:48:59 +00:00
Colin Finck
d2148478c6 Introducing the "ReactOS Automatic Testing Utility", superseding our current syssetup/cmd/dbgprint hack for running automatic regression tests.
Without any parameters, it mostly works the same as our current solution, but all in a standalone application.
Adding the /w parameter will submit all results to the web service committed in my previous commit.

The application would also make it possible to run Wine Tests regularly on a Windows machine and submitting the results.
This would make sure that all Wine tests also pass under Windows.

svn path=/trunk/; revision=38580
2009-01-05 12:41:34 +00:00
Michael Martin
45661165b8 - Change and silence a debug message that made it look like npfsRead had a problem.
svn path=/trunk/; revision=38577
2009-01-05 11:52:44 +00:00
Kamil Hornicek
01cb1291d8 [FORMATTING] tabs -> spaces. No code changes.
svn path=/trunk/; revision=38576
2009-01-05 11:03:28 +00:00
Christoph von Wittich
35f9beeabd enable oleaut32_winetest
svn path=/trunk/; revision=38575
2009-01-05 08:02:13 +00:00
James Tabor
d75b50af18 - Implement large ansi unicode string support for win32k. I guess some Rtl library developer should look into adding lib/rtlw32k for Win32k and User32.
- Created DefSetText to processes strings prior to calling NtUserDefSetText.
- Rewrite NtUserDefSetText to support large strings and process them with RtlLargeStringToUnicodeString.
- On last thing to remove, is the Hook junk in NtUserDefSetText.

svn path=/trunk/; revision=38574
2009-01-05 03:34:10 +00:00
Michael Martin
85d5cc3b8e - Re-implement Message Type read/write mode as the previous implementation was incorrect.
- Fixed bug in Byte Stream mode that caused threads to not wake from a wait.
- Implemented NpfsPeekPipe.


svn path=/trunk/; revision=38573
2009-01-05 00:08:43 +00:00
Thomas Bluemel
84d1b53dbc Copying the string in NtUserDefSetText () must be protected with SEH, probing alone is not sufficient.
svn path=/trunk/; revision=38572
2009-01-04 22:20:19 +00:00
Timo Kreuzer
bd38886763 Add tests for CreateFontIndirect
svn path=/trunk/; revision=38571
2009-01-04 21:48:32 +00:00
Christoph von Wittich
bda8492140 sync oleaut32_winetest with wine 1.1.12
svn path=/trunk/; revision=38570
2009-01-04 19:19:05 +00:00
Christoph von Wittich
35f684f9d5 sync ole32_winetest with wine 1.1.12
svn path=/trunk/; revision=38569
2009-01-04 17:52:22 +00:00
Stefan Ginsberg
7425fd9bf8 - DbgkpSendApiMessage/DbgkpSendApiMessageLpc: Make sure the process is suspended before resuming it. Also, DbgkpSendApiMessage takes a BOOLEAN as 2nd parameter.
- DbgkpWakeTarget: Correct a check for a Debug Event flag

svn path=/trunk/; revision=38568
2009-01-04 17:33:47 +00:00
Dmitry Chapyshev
78c8f3ca5f - Change of names of variables
- Move all variables declaration to top

svn path=/trunk/; revision=38567
2009-01-04 16:57:58 +00:00
Dmitry Chapyshev
6c670fb344 - Formatting fix. No code change
svn path=/trunk/; revision=38566
2009-01-04 16:18:29 +00:00
Aleksey Bragin
2494ca79f9 - Rewrite SystemTimeOfDay QuerySystemInformation case. ReqSize is the amount of data copied to the user so use it accordingly. Also, fill up the buffer as much as the caller requested. Fixes 1 "ntdll_winetest.exe info".
- Use a newer (5.0 and higher) version of SYSTEM_TIMEOFDAY_INFORMATION structure (consisting of two additional 64 bits fields: boot time bias and sleep time bias).

svn path=/trunk/; revision=38565
2009-01-04 15:11:47 +00:00
Dmitry Gorbachev
24dceb4922 Add type casts to RtlpCallQueryRegistryRoutine().
svn path=/trunk/; revision=38564
2009-01-04 14:40:27 +00:00
Dmitry Gorbachev
fa2d477672 Silence GCC 4.4.0 warnings.
svn path=/trunk/; revision=38563
2009-01-04 14:27:04 +00:00
Dmitry Gorbachev
bc752511c5 PWSTR -> PCWSTR
svn path=/trunk/; revision=38562
2009-01-04 14:26:59 +00:00
Aleksey Bragin
0491ac98be Dmitry Chapyshev
- Add buffer length checks to NtQueryInformationThread.

svn path=/trunk/; revision=38561
2009-01-04 13:43:08 +00:00
Aleksey Bragin
b7aa576e73 Dmitry Chapyshev
- Add more length checks to NtQueryInformationProcess, inspired by r28570.

svn path=/trunk/; revision=38560
2009-01-04 11:56:14 +00:00
Ged Murphy
0751b2af16 - Generate to do list, test list, bug list and deprecated list.
- Add place holder for header and footer. This will need to be changed to suit the script.
- Don't generate a tab index.
- Build the search data so we can search the source.

svn path=/trunk/; revision=38559
2009-01-04 11:44:45 +00:00
Christoph von Wittich
e346ebb655 sync riched20 with wine 1.1.12
svn path=/trunk/; revision=38558
2009-01-04 11:42:09 +00:00
Christoph von Wittich
7d6f7e3e2f sync browseui_winetest with wine 1.1.12
svn path=/trunk/; revision=38557
2009-01-04 11:34:13 +00:00
Christoph von Wittich
97415b80b6 sync hlink_winetest with wine 1.1.12
svn path=/trunk/; revision=38556
2009-01-04 11:33:07 +00:00
Christoph von Wittich
64915ab8ed sync iphlpapi_winetest with wine 1.1.12
svn path=/trunk/; revision=38555
2009-01-04 11:31:13 +00:00
Christoph von Wittich
02a42aaf0d sync msxml3 with wine 1.1.12 (2/2)
svn path=/trunk/; revision=38554
2009-01-04 10:48:31 +00:00
Christoph von Wittich
29dc01c8e2 sync msxml3 with wine 1.1.12 (1/2)
svn path=/trunk/; revision=38553
2009-01-04 10:48:19 +00:00
Aleksey Bragin
f54bc7959a - Revert changes to NtSetVolumeInformationFile made in 38550, it should indeed use IoGetRelatedDeviceObject, not target device.
svn path=/trunk/; revision=38552
2009-01-04 10:12:38 +00:00
Aleksey Bragin
2882b5579f - Fix a typo: if a process has DisableBoost set then TRUE should be returned when querying ProcessPriorityBoost information, not FALSE.
svn path=/trunk/; revision=38551
2009-01-04 09:41:34 +00:00
Aleksey Bragin
8935e052bf - Merge IoGetRelatedTargetDevice implementation by Pierre Schweitzer (pierre-fsd branch), with my modifications.
svn path=/trunk/; revision=38550
2009-01-04 09:35:35 +00:00
Hervé Poussineau
7b50d4352c Add a check to not mix up host and target modules
Should probably be moved later outside of backend directory

svn path=/trunk/; revision=38549
2009-01-04 08:38:19 +00:00
Cameron Gutman
bdbc81f185 - Revert r38547 which reverted r38546 which was correct
- I fail

svn path=/trunk/; revision=38548
2009-01-04 08:12:13 +00:00
Cameron Gutman
b372a95ba2 - Revert r38546
- Include windef.h in precomp.h

svn path=/trunk/; revision=38547
2009-01-04 07:45:08 +00:00
Cameron Gutman
963b989ea5 - Fix debug build
- Something weird happened with the headers and DWORD somehow got lost
 - This is a hack and will be reverted later

svn path=/trunk/; revision=38546
2009-01-04 07:25:08 +00:00
Cameron Gutman
6fb0f9aa2d - Merge the rest of my changes
svn path=/trunk/; revision=38545
2009-01-04 05:33:43 +00:00
James Tabor
39cecf5684 - Fix build.
svn path=/trunk/; revision=38544
2009-01-04 05:16:29 +00:00
James Tabor
e5a50d7176 - Implement large ansi unicode string support. Not sure if we need to add it in win32k.
svn path=/trunk/; revision=38543
2009-01-04 05:06:14 +00:00
Cameron Gutman
831afe52e7 - Merge r38358, r38539, and r38541
svn path=/trunk/; revision=38542
2009-01-04 04:39:32 +00:00
James Tabor
b470703879 - Add check for probed strings. Thanks, Timo and Thomas.
svn path=/trunk/; revision=38540
2009-01-04 04:09:19 +00:00
Thomas Bluemel
856d0c4f7b Fix usage of ProbeForReadUnicodeString
svn path=/trunk/; revision=38538
2009-01-04 01:50:37 +00:00
Pierre Schweitzer
c78f1d3a6d Removed avtest.sys from package as it's been removed in r37748.
Spotted by Olaf Siejka

svn path=/trunk/; revision=38537
2009-01-03 21:20:52 +00:00
Dmitry Gorbachev
0e0e4d8dd8 - Add hack-sync again (bug #3591).
- Silence linker warning.

svn path=/trunk/; revision=38535
2009-01-03 15:51:10 +00:00
Dmitry Gorbachev
fc04035227 Consistently use NULL, as suggested by Paolo Devotee.
svn path=/trunk/; revision=38534
2009-01-03 15:50:55 +00:00
Stefan Ginsberg
790283c9de - Switch back to the previous implementation of GetPrivateObjectSecurity now that RtlQuerySecurityObject is implemented (thanks jimtabor)
svn path=/trunk/; revision=38533
2009-01-03 15:20:47 +00:00
Aleksey Bragin
658957a6ab - Don't leak a FileObject reference in case of failure.
svn path=/trunk/; revision=38531
2009-01-03 13:23:44 +00:00
Aleksey Bragin
331aa9e529 - Check if CompletionFilter has a valid value too.
svn path=/trunk/; revision=38530
2009-01-03 12:42:29 +00:00
Dmitry Chapyshev
b9ffb1676a - Add checking of CompletionFilter parameter. This is fixed 3 wine tests for kernel32
svn path=/trunk/; revision=38529
2009-01-03 12:22:14 +00:00
Dmitry Chapyshev
1c312cc501 - Add spoolss from Wine
svn path=/trunk/; revision=38527
2009-01-03 11:18:58 +00:00
Michael Martin
ce357e0a0f - PeekNamedPipe: Fixed BufferSize calculation, as it is the size of the FILE_PIPE_PEEK_BUFFER struct + the nBufferSize parameter passed from caller.
svn path=/trunk/; revision=38522
2009-01-03 09:24:44 +00:00
Aleksey Bragin
d8316ddcfb - Add a missing EA buffer validation.
- Free an EA buffer if it was allocated and error/exception happened.

svn path=/trunk/; revision=38521
2009-01-03 09:18:55 +00:00
James Tabor
de1fd1f76d - Removed SEH abuse and add notes for the hook code, in NtUserDefSetText.
- Update NtUserCallHwndLock subfunctions.

svn path=/trunk/; revision=38518
2009-01-03 04:02:54 +00:00
James Tabor
140f031357 - Add check for null Wnd, see bug 3995.
svn path=/trunk/; revision=38517
2009-01-03 02:20:50 +00:00
James Tabor
33ff58086c - Implement RtlQuerySecurityObject.
svn path=/trunk/; revision=38513
2009-01-02 23:52:37 +00:00
Hervé Poussineau
7d3efdbdb0 Fix serial devices detection
Thanks at Maciej Bialas (bjauy at o2.pl) for testing

svn path=/trunk/; revision=38512
2009-01-02 22:12:48 +00:00
Timo Kreuzer
1fa9bb9b8e Use the bitmap's palette, not the DC one's in NtGdiGetDIBitsInternal. Fixes Firefox colors going nots after 60 sec.
See issue #3854 for more details.

svn path=/trunk/; revision=38511
2009-01-02 22:08:09 +00:00
Stefan Ginsberg
fbd7681b84 - Cleanup AccessCheck, and set the correct last error in the case where the check succeeds but access is denied
- Cleanup NtAccessCheck, properly set desired access when previous mode is kernel, remove a duplicate check that is performed in SeAccessCheck, and don't fail with STATUS_ACCESS_DENIED when the check succeeds but denies access -- the result of the access check is returned in the 'AccessStatus' parameter

svn path=/trunk/; revision=38510
2009-01-02 17:39:45 +00:00
Aleksey Bragin
226c5fb558 - Add Dmitry Gorbachev's hack for bug 3626 problem (cmd shell initially comes up in permanent loop printing squares). Until a better solution is implemented...
See issue #3626 for more details.

svn path=/trunk/; revision=38509
2009-01-02 17:38:01 +00:00
Stefan Ginsberg
33e098eaaa - Add Wine's GetPrivateObjectSecurity and use it instead of our that uses the unimplemented RtlQuerySecurityObject routine
svn path=/trunk/; revision=38508
2009-01-02 17:14:42 +00:00
Johannes Anderwald
124bf05832 - Store PhysicalDeviceObject in device extension
- initialize ISubdevice list
- improve PcRegisterSubdevice
- implement IDmaChannelSlave_fnAllocateBuffer, IDmaChannelSlave_fnFreeBuffer
- partly implement IPortFilterWaveCyclic interface
- add IClsVersion interface to IPortDMus, IPortTopology, IPortWavePci 
- check for IPinCount, IPowerNotify interface during IPortWaveCyclic initialization
- implement IPortWaveCyclic_fnNewRegistryKey
- first hack version of creating IPortWaveCyclic_fnNewSlaveDmaChannel
- implement ISubdevice interface for IPortWaveCyclic


svn path=/trunk/; revision=38507
2009-01-02 15:05:57 +00:00
Danny Götte
0584dd942a * delete some unused files, that I missed in rev 37915
* improvements to file generator
* improvements to the depency tree
* handle dynamic entries now in a different way (dynamic pages instead of normal pages, and rename page contents to e.g. 'newsletter_X' instead of 'newsletter' with an attached tag, that contains the number X )
* some minor bugfixes

svn path=/branches/danny-web/; revision=38505
2009-01-02 12:20:50 +00:00
Aleksey Bragin
4d8ae40ee4 - Remove incorrect and undocumented FsRtlNotifyReportChange declaration.
- Add FILE_NOTIFY_INFORMATION structure definition.

svn path=/trunk/; revision=38504
2009-01-02 10:38:21 +00:00
Aleksey Bragin
cf0aa5c69c - All FsRtlRemoveMcb functions return void.
svn path=/trunk/; revision=38503
2009-01-02 10:09:55 +00:00
Timo Kreuzer
9c19a9af87 Flush the gdi batch in NtGdiDeletObjectApp to make sure we don't try to do stuff with deleted objects later. This fixes some problems with Firefox.
svn path=/trunk/; revision=38501
2009-01-01 22:13:07 +00:00
Stefan Ginsberg
fbd7f8a2aa - Only reserve APIC memory on x86
- Don't reserve 32 pages for VGA registers -- deprecated since 11917, 4 years ago
- Use KeNumberProcessors instead of MAXIMUM_PROCESSORS when mapping the PCRs
- Remove MmInitMemoryAreas, a nop since revision 1093, 8 years ago
- Remove unused KeMemoryMapRangeCount/KeMemoryMap

svn path=/trunk/; revision=38500
2009-01-01 17:00:38 +00:00
Aleksey Bragin
56d6ef019e - Fix an always true comparison in IoCheckEaBufferValidity.
svn path=/trunk/; revision=38499
2009-01-01 15:19:15 +00:00
Colin Finck
b0d177b83c Happy new year everybody!
svn path=/trunk/; revision=38497
2009-01-01 13:33:06 +00:00
Michael Martin
d1f64418a1 - Deference pProcess not Process.
svn path=/trunk/; revision=38495
2009-01-01 10:09:57 +00:00
Michael Martin
e28ed99f1b - Implement SetupDiSetDeviceInstallParamsA.
svn path=/trunk/; revision=38494
2008-12-31 22:01:58 +00:00
Martin Fuchs
607be3272e update XMLStorage: preserve CDATA formating of processed XML documents
svn path=/trunk/; revision=38492
2008-12-31 15:59:36 +00:00
Ged Murphy
ee252ea491 - Set a dummy revision number. This value should be dynamically set prior to running doxygen.
- Inline the source in the docs. Although it makes the docs rather long, it's much more useful this way at the moment.
- Use case sensitive names as this will run on a unix server.

svn path=/trunk/; revision=38491
2008-12-31 15:38:28 +00:00
Dmitry Chapyshev
9e6bd133e6 - Fix attributes
svn path=/trunk/; revision=38490
2008-12-31 15:09:28 +00:00
Aleksey Bragin
8172ef5174 - Add a new API to Freeldr's memory manager, which allows to override type of an already allocated memory.
- WINLDR: Fix page tables buffer memory allocation so that it doesn't rely on luck anymore and always allocates a contiguous area of memory. Fixes spontaneous case of booting problem (immediate black screen after loading drivers, reboot of real hardware, halt of cpu in a virtual machine).
- WINLDR: Fix some debug print.

svn path=/trunk/; revision=38487
2008-12-31 12:21:36 +00:00
Dmitry Chapyshev
85e610895c - Fix ReadDirectoryChangesW
- FindFirstChangeNotificationW
+17 passed winetests

svn path=/trunk/; revision=38486
2008-12-31 11:54:30 +00:00
Christoph von Wittich
abdee726bc fix build
svn path=/trunk/; revision=38485
2008-12-31 11:53:35 +00:00
Christoph von Wittich
66af77a707 sync wintrust and cryptui to wine 1.1.11
svn path=/trunk/; revision=38484
2008-12-31 09:26:01 +00:00
Dmitry Chapyshev
d921149f3f - Add check of params
svn path=/trunk/; revision=38483
2008-12-31 08:11:43 +00:00
Christoph von Wittich
44a77186d2 add dwmapi from wine 1.1.11
svn path=/trunk/; revision=38482
2008-12-31 08:02:56 +00:00
Jeffrey Morlan
00fd22c6ba Make IF /? work again
svn path=/trunk/; revision=38481
2008-12-30 23:55:50 +00:00
KJK::Hyperion
85084975fe modified include/reactos/libs/pseh/pseh2.h
modified   lib/pseh/framebased-gcchack.c
   Call _SEH2EnterFrame before any goto. Gotos confuse GCC's flow control analysis making it disregard the returns_twice attribute on _SEH2EnterFrame. We avoid redundant inline code (NULL-initializing the top trylevel pointer) by modifying the library accordingly

svn path=/trunk/; revision=38480
2008-12-30 21:05:36 +00:00
Ged Murphy
3c8c5a77c0 update doxygen config to doxygen 1.5.8
Incorporates various changes to the existing config and introduces some new features.

svn path=/trunk/; revision=38479
2008-12-30 20:52:17 +00:00
KJK::Hyperion
25225baded modified include/reactos/libs/pseh/pseh2.h
Did you know gcc doesn't let PSEH deter it from inlining a function? Allocate the frame with __builtin_alloca so that this doesn't cause issues

svn path=/trunk/; revision=38476
2008-12-30 20:02:03 +00:00
Christoph von Wittich
a1ffc8d05a fix some more security winetests
svn path=/trunk/; revision=38475
2008-12-30 17:10:40 +00:00
Christoph von Wittich
45bacdf407 fix some more security winetests
svn path=/trunk/; revision=38474
2008-12-30 16:01:13 +00:00
Christoph von Wittich
fd09fafa0b fix some security winetests
svn path=/trunk/; revision=38472
2008-12-30 15:12:17 +00:00
Christoph von Wittich
fa4a7deb60 get icmp.dll to work
svn path=/trunk/; revision=38471
2008-12-30 13:55:52 +00:00
Christoph von Wittich
8aaeedbb99 fix a winetest failure
svn path=/trunk/; revision=38470
2008-12-30 13:37:31 +00:00
Christoph von Wittich
2b9b7c7ab7 fix iphlpapi winetests
svn path=/trunk/; revision=38469
2008-12-30 12:04:47 +00:00
Aleksey Bragin
bd0cab21cc - Silence debug output.
svn path=/trunk/; revision=38468
2008-12-30 10:32:23 +00:00
Christoph von Wittich
3241a12ecb add iphlpapi_winetest to bootcd
svn path=/trunk/; revision=38467
2008-12-30 09:11:13 +00:00
Christoph von Wittich
3befe40733 add func_iphlpapi winetest from wine 1.1.11
svn path=/trunk/; revision=38466
2008-12-30 09:10:17 +00:00
Christoph von Wittich
6951e57b2d add ws2_32_winetest to bootcd
svn path=/trunk/; revision=38465
2008-12-30 09:04:34 +00:00
Christoph von Wittich
8845107b6e add ws2_32 winetest from wine 1.1.11
svn path=/trunk/; revision=38464
2008-12-30 09:04:22 +00:00
Dmitry Chapyshev
bba74c7731 - Implement FreeContextBuffer
svn path=/trunk/; revision=38463
2008-12-30 08:29:46 +00:00
Dmitry Chapyshev
af929be7de - Implement InitSecurityInterfaceA/W
svn path=/trunk/; revision=38462
2008-12-30 08:06:39 +00:00
KJK::Hyperion
030aa56625 modified tests/pseh2/psehtest.c
finally_13 test re-enabled, as it doesn't crash anymore
   finally_14 test fixed. Now we know how exceptions thrown in a __finally are supposed to be handled
   PSEH test suite now has 91 tests and passes all of them with both GCC and Visual C++

svn path=/trunk/; revision=38461
2008-12-30 04:04:51 +00:00
KJK::Hyperion
26d5b48792 modified lib/pseh/framebased-gcchack.c
modified   lib/pseh/i386/framebased-gcchack.S
   Correctly handle exceptions thrown during unwinding
   Renamed some internal routines to more appropriate names

svn path=/trunk/; revision=38460
2008-12-30 04:00:45 +00:00
Dmitry Gorbachev
d3c81b34be Fix UTF-8 -> Wide Char conversion bug #3990.
svn path=/trunk/; revision=38459
2008-12-29 20:16:22 +00:00
Dmitry Chapyshev
cb89e7b0bd - Remove lpAddress check, this is broken trunk
svn path=/trunk/; revision=38458
2008-12-29 17:14:17 +00:00
Dmitry Gorbachev
93f8f62632 Fix translations. Patch by Mario Kacmar. Bug #3955.
svn path=/trunk/; revision=38457
2008-12-29 14:26:01 +00:00
Dmitry Gorbachev
05530904b8 - Fix more ICU warnings
svn path=/trunk/; revision=38456
2008-12-29 13:10:33 +00:00
Dmitry Gorbachev
5341c63e40 - Fix indentation.
- Fix bug #3920 (at line 736).

svn path=/trunk/; revision=38455
2008-12-29 11:50:09 +00:00
Stefan Ginsberg
ed14235592 - Fix ICU warnings
svn path=/trunk/; revision=38454
2008-12-29 11:05:00 +00:00
Stefan Ginsberg
6f2c60aa34 - Silence riched20 format warnings
svn path=/trunk/; revision=38453
2008-12-29 11:04:13 +00:00
Stefan Ginsberg
6d9a712475 - Silence Uniata warnings, add a .diff and remove allowwarnings=true
svn path=/trunk/; revision=38452
2008-12-29 11:03:54 +00:00
Christoph von Wittich
7b72ed4a02 fix copy and paste error
svn path=/trunk/; revision=38451
2008-12-29 10:30:50 +00:00
Christoph von Wittich
3d7aac0b8d add crypt32_winetest to bootcd
svn path=/trunk/; revision=38450
2008-12-29 10:11:32 +00:00
Christoph von Wittich
ca3c085687 add crypt32 winetest from wine 1.1.11
svn path=/trunk/; revision=38449
2008-12-29 10:10:25 +00:00
Christoph von Wittich
fbe14c277d add wintrust_winetest to bootcd
svn path=/trunk/; revision=38448
2008-12-29 09:58:56 +00:00
Christoph von Wittich
789db79fc6 add wintrust winetest from wine 1.1.11
svn path=/trunk/; revision=38447
2008-12-29 09:53:21 +00:00
Christoph von Wittich
a2666bfc50 add jscript_winetest to bootcd
svn path=/trunk/; revision=38446
2008-12-29 09:44:03 +00:00
Christoph von Wittich
5f2dcdc0e9 add jscript winetest from wine 1.1.11
svn path=/trunk/; revision=38445
2008-12-29 09:41:56 +00:00
Johannes Anderwald
8c6c01539d - Add IIrpTarget, IKsWorkSink, IKsShellTransport, IIrpStream, IIrpStreamVirtual IIrpStreamPhysical, IPortFilterWaveCyclic, IPortPinWaveCyclic
svn path=/trunk/; revision=38444
2008-12-29 08:55:12 +00:00
Christoph von Wittich
00f0db8d9a sync urlmon winetest to wine 1.1.11
svn path=/trunk/; revision=38443
2008-12-29 08:42:01 +00:00
Christoph von Wittich
da37905468 sync urlmon.idl to wine 1.1.11
svn path=/trunk/; revision=38442
2008-12-29 08:35:12 +00:00
Christoph von Wittich
439cb72ec1 sync riched20 winetest to wine 1.1.11
svn path=/trunk/; revision=38441
2008-12-29 08:27:52 +00:00
Christoph von Wittich
715d203273 fix "Primary mouse button changes prematurely."
See issue #3949 for more details.

svn path=/trunk/; revision=38440
2008-12-29 07:14:35 +00:00
Christoph von Wittich
ea025bdb03 fix doxygen @name for ExpSystemErrorHandler patch by <aspotashev at gmail.com>
See issue #3963 for more details.

svn path=/trunk/; revision=38439
2008-12-29 06:24:46 +00:00
Dmitry Gorbachev
482d311a98 Add Slovak koruna to Calculator, update Korean file.
Patch by Mario Kacmar, with some modifications.
Bug #3867.

svn path=/trunk/; revision=38438
2008-12-29 03:53:13 +00:00
James Tabor
07ebe48b4c - Support MOVEFILE_WRITE_THROUGH flag.
svn path=/trunk/; revision=38437
2008-12-29 02:30:09 +00:00
Johannes Anderwald
56c55c3ff7 - Add IPowerNotify interface
svn path=/trunk/; revision=38435
2008-12-28 21:30:58 +00:00
Johannes Anderwald
9831e4a668 - Add IPinCount interface
svn path=/trunk/; revision=38431
2008-12-28 17:51:57 +00:00
Johannes Anderwald
eae7530166 - Add ISubdevice interface
- This interface is used as the generic interface for all IPort drivers when connecting with ks.sys

svn path=/trunk/; revision=38430
2008-12-28 17:28:23 +00:00
Johannes Anderwald
3ae6d9fb3c - Acquire lock before deleting
svn path=/trunk/; revision=38429
2008-12-28 17:19:18 +00:00
Dmitry Chapyshev
e4739139f7 - Fix GetLogicalDriveStringsA/W. +5 passed tests
- Add params check for GetVolumeNameForVolumeMountPointW

svn path=/trunk/; revision=38428
2008-12-28 15:38:17 +00:00
Dmitry Chapyshev
21421f90d2 - Fix build ;)
svn path=/trunk/; revision=38422
2008-12-28 13:48:52 +00:00
Dmitry Chapyshev
3c0e179f92 - Add check of params for VirtualAllocEx and VirtualFreeEx
- Implement GetWriteWatch (based on Wine)
- Fix VirtualQueryEx

svn path=/trunk/; revision=38421
2008-12-28 13:03:05 +00:00
Dmitry Gorbachev
c3963a9ccd Fix bug #3984.
svn path=/trunk/; revision=38419
2008-12-28 12:53:08 +00:00
Dmitry Gorbachev
5ee921c371 Fix bug #3975.
svn path=/trunk/; revision=38418
2008-12-28 12:32:20 +00:00
Christoph von Wittich
97d06533f8 sync browseui winetest to wine 1.1.11
svn path=/trunk/; revision=38417
2008-12-28 11:31:26 +00:00
Christoph von Wittich
5389561279 sync usp10 winetest to wine 1.1.11
svn path=/trunk/; revision=38416
2008-12-28 11:28:48 +00:00
Christoph von Wittich
1eee77ac31 sync version winetest to wine 1.1.11
svn path=/trunk/; revision=38415
2008-12-28 11:27:26 +00:00
Christoph von Wittich
7222acc172 sync lz32 winetest to wine 1.1.11
svn path=/trunk/; revision=38414
2008-12-28 11:24:41 +00:00
Christoph von Wittich
8fccb16c05 sync mstask winetest to wine 1.1.11
svn path=/trunk/; revision=38413
2008-12-28 11:22:23 +00:00
Christoph von Wittich
bcf598695c sync comdlg32 winetest to wine 1.1.11
svn path=/trunk/; revision=38411
2008-12-28 10:42:08 +00:00
Christoph von Wittich
2057ac87a7 add some missing GUIDs
svn path=/trunk/; revision=38410
2008-12-28 10:41:07 +00:00
Christoph von Wittich
fa9df3812d sync advpack winetest to wine 1.1.11
svn path=/trunk/; revision=38409
2008-12-28 10:36:50 +00:00
Christoph von Wittich
90081c908c sync comcat winetest to wine 1.1.11
svn path=/trunk/; revision=38408
2008-12-28 10:35:04 +00:00
Christoph von Wittich
785e3fd869 sync cabinet winetest to wine 1.1.11
svn path=/trunk/; revision=38407
2008-12-28 10:32:41 +00:00
Christoph von Wittich
4e0fcb2fa5 sync msi winetest to wine 1.1.11
svn path=/trunk/; revision=38406
2008-12-28 10:25:32 +00:00
Christoph von Wittich
e970a33b95 update system restore header
svn path=/trunk/; revision=38405
2008-12-28 10:23:32 +00:00
Dmitry Gorbachev
fa287a1e62 Do not return garbage in cbSize field of CURSORINFO.
svn path=/trunk/; revision=38402
2008-12-28 07:35:26 +00:00
Dmitry Gorbachev
eb68ff54ba - Change description of what OARCH option does.
- Add a separate TUNE option.

svn path=/trunk/; revision=38401
2008-12-28 05:12:45 +00:00
Daniel Reimer
88eef194a9 Bug 3983: notepad update by Mario Kacmar
+ Tab -> 4-Spaces
+ Applied to all other languages
+ cleaned up menu parts

svn path=/trunk/; revision=38400
2008-12-28 02:41:35 +00:00
Daniel Reimer
293626395b Ctrl -> Strg
svn path=/trunk/; revision=38399
2008-12-28 00:57:53 +00:00
Stefan Ginsberg
81484cd1c5 - IoStartPacket: Use the correct IRQL when releasing the Cancel Spinlock
svn path=/trunk/; revision=38397
2008-12-27 19:49:29 +00:00
Hervé Poussineau
e79c502488 Fix InstallHinfSectionW:
- need to call SetupInstallServicesFromInfSection() to install services
- handle reboot if requested to

svn path=/trunk/; revision=38396
2008-12-27 18:38:32 +00:00
Dmitry Chapyshev
46df3d3fe2 - Move ReplaceFileA/W to file.c
- Implement ReplaceFileA
- Partial implement ReplaceFileW. Parametres checked and function return TRUE.

svn path=/trunk/; revision=38395
2008-12-27 17:24:07 +00:00
Michael Martin
ca9d98020a - Fixes VideoPortGetAccessRanges.
- Previous implementation was missing the Device number when searching the bus resulting in failure to find Device and Vendor ID. 
- Function was also passing NULL for first 4 parameters of HalAssignSlotResources causing failure.
- Due to this, the device object was then deleted causing failure when trying to find the display device in Csrss:CsrpInitVideo().
- Part 3 of ? fixes for bug 2286.

svn path=/trunk/; revision=38394
2008-12-27 17:16:07 +00:00
Christoph von Wittich
943a74b328 forgot these...
svn path=/trunk/; revision=38392
2008-12-27 15:12:15 +00:00
Christoph von Wittich
6631d1c7cf sync msi with wine 1.1.11
svn path=/trunk/; revision=38391
2008-12-27 15:10:14 +00:00
Christoph von Wittich
9776114e82 fix undo after insert date/time
svn path=/trunk/; revision=38390
2008-12-27 14:26:03 +00:00
Christoph von Wittich
fc993f8780 rename "New..." to "New" and "Open" to "Open..." (for german and english only)
svn path=/trunk/; revision=38389
2008-12-27 14:18:11 +00:00
Kamil Hornicek
64fcc33d8b update PSDK
- patch by encoded

svn path=/trunk/; revision=38388
2008-12-27 13:28:36 +00:00
Christoph von Wittich
7596b69232 sync hlink with wine 1.1.11
svn path=/trunk/; revision=38387
2008-12-27 13:09:48 +00:00
Christoph von Wittich
6e140c6069 sync fusion with wine 1.1.11
svn path=/trunk/; revision=38386
2008-12-27 13:08:23 +00:00
Christoph von Wittich
c5aa8b9f1f sync atl with wine 1.1.11
svn path=/trunk/; revision=38385
2008-12-27 13:06:42 +00:00
Christoph von Wittich
da81dbeb59 sync advpack with wine 1.1.11
svn path=/trunk/; revision=38384
2008-12-27 13:04:52 +00:00
Christoph von Wittich
653f7f1919 sync comdlg32 with wine 1.1.11
svn path=/trunk/; revision=38383
2008-12-27 12:31:20 +00:00
Andrew Munger
22aa9ace50 Clarify comment.
svn path=/trunk/; revision=38382
2008-12-27 11:55:43 +00:00
Andrew Munger
ae171d25d2 Return mostly correct information so taskmgr doesn't just report zero for "System Cache".
svn path=/trunk/; revision=38381
2008-12-27 11:44:21 +00:00
Aleksey Bragin
769ff5b164 - Fix build.
svn path=/trunk/; revision=38380
2008-12-27 11:44:18 +00:00
Christoph von Wittich
b5e794bdfe sync cryptnet with wine 1.1.11
svn path=/trunk/; revision=38379
2008-12-27 11:43:39 +00:00
Christoph von Wittich
6a5c426679 sync oleacc with wine 1.1.11
svn path=/trunk/; revision=38378
2008-12-27 11:08:40 +00:00
Christoph von Wittich
22610b8493 get rid of oleacc.h - it is autogenerated from the idl
svn path=/trunk/; revision=38377
2008-12-27 11:05:08 +00:00
Christoph von Wittich
82082818ca sync crypt32 with wine 1.1.11
svn path=/trunk/; revision=38376
2008-12-27 11:03:19 +00:00
Aleksey Bragin
e73f968c8a - Implement query case of SystemTimeAdjustmentInformation.
- Implement a better stub for setting case of SystemTimeAdjustmentInformation.

svn path=/trunk/; revision=38375
2008-12-27 10:58:46 +00:00
Dmitry Chapyshev
683099598f - Fix 11 tests for OpenFile
svn path=/trunk/; revision=38374
2008-12-27 10:31:53 +00:00
Christoph von Wittich
128f584a7d sync rsaenh to wine 1.1.11
svn path=/trunk/; revision=38373
2008-12-27 10:11:34 +00:00
Christoph von Wittich
a4c232b9e4 sync cabinet to wine 1.1.11
svn path=/trunk/; revision=38372
2008-12-27 10:00:27 +00:00
Andrew Munger
01a550f50b Remove the i8042prt entry from the static hive, it was correctly installed by PnP all all tested cases.
svn path=/trunk/; revision=38371
2008-12-27 09:04:15 +00:00
Christoph von Wittich
4324dea95c sync riched20 with wine 1.1.11
svn path=/trunk/; revision=38370
2008-12-27 08:49:35 +00:00
Christoph von Wittich
133de9dcc5 add EM_GETIMESTATUS and EM_SETIMESTATUS
svn path=/trunk/; revision=38369
2008-12-27 08:38:03 +00:00
Dmitry Chapyshev
d3294eb866 - Partial sync with Wine. It fixes 37 tests ("kernel32_winetest profile")
svn path=/trunk/; revision=38368
2008-12-27 08:34:30 +00:00
Dmitry Chapyshev
77f0be0bc8 - Formatting fix
svn path=/trunk/; revision=38367
2008-12-27 05:45:51 +00:00
Dmitry Chapyshev
0e4778a15d - Fix SystemTimeToTzSpecificLocalTime. +378 passed tests
svn path=/trunk/; revision=38366
2008-12-27 05:31:06 +00:00
Michael Martin
51dc30a02c - Fix VideoPortInt10 implementation. The previous implementation was passing a significantly smaller KV86M_REGISTERS struct vice CONTEXT struct to Ke386CallBios, resulting in memory corruption.
- Part 2 of ? fixes for bug 2286.

svn path=/trunk/; revision=38365
2008-12-27 04:01:26 +00:00
Michael Martin
a7e5b19f4c - Lets try this again. Re-implement inet_aton so that it does not fail in 255.255.255.255. See bug 3962 for more info.
svn path=/trunk/; revision=38364
2008-12-27 02:54:03 +00:00
James Tabor
15381523f2 - Total commander crashes after pressing any key, see bug 2292.
svn path=/trunk/; revision=38363
2008-12-26 23:00:03 +00:00
KJK::Hyperion
873c2a2f8e modified dll/win32/kernel32/k32.h
modified   dll/win32/kernel32/kernel32.rbuild
modified   dll/win32/kernel32/misc/comm.c
added      dll/win32/kernel32/misc/commdcb.c
   Define _KERNEL32_ globally for kernel32, outside the common header file
   Reimplemented the whole BuildCommDCB family of APIs, deleting embarrassing code by my younger self, written almost 6 years ago. Passes the full Wine test suite, too

svn path=/trunk/; revision=38362
2008-12-26 22:09:38 +00:00
Aleksey Bragin
1015905d06 - Fix one more typo in the IoBuildPartialMdl code leading to ignore of TargetMdl flags and always setting MDL_ALLOCATED_FIXED_SIZE and MDL_ALLOCATED_MUST_SUCCEED even if a caller did not want so. Thanks to Alex Ionescu.
svn path=/trunk/; revision=38361
2008-12-26 21:57:11 +00:00
Aleksey Bragin
65dc6d8f5c - Fix broken behavior of IoBuildPartialMdl, which instead of copying 4 flags from a source mdl to a target one was always setting all of them, thus often making resultant mdl unusable.
svn path=/trunk/; revision=38360
2008-12-26 20:34:40 +00:00
Aleksey Bragin
d3a5bca37f - Don't try to set remaining bits if there are none. Fixes memory
corruption.

Patch sent to Wine: http://www.winehq.org/pipermail/wine-patches/2008-December/066716.html

svn path=/trunk/; revision=38359
2008-12-26 20:21:52 +00:00
Aleksey Bragin
7738237964 - Leftover, fixes build.
svn path=/trunk/; revision=38357
2008-12-26 16:27:44 +00:00
Michael Martin
97048a494b - Add missing assignments to CallingProcess variable. Part 1 of ? fixes for bug 2286.
svn path=/trunk/; revision=38355
2008-12-26 15:24:54 +00:00
Dmitry Gorbachev
4d4d9e60fb [FORMATTING] Fix indentation.
svn path=/trunk/; revision=38354
2008-12-26 13:50:35 +00:00
Aleksey Bragin
fd4de76baf - Fix 38352, XMLLoadFile seems to need a separate instance of Path, so revert that optimisation and leave it only to NormalizeFilename.
svn path=/trunk/; revision=38353
2008-12-26 13:25:55 +00:00
Aleksey Bragin
03a011db89 - Add defaultPath global var and use it instead of creating Path objects all the time a filename is queried and/or xml file is read.
svn path=/trunk/; revision=38352
2008-12-26 11:03:16 +00:00
Michael Martin
c5c0af3081 - Revert r38346 as its incorrect fix. Real problem is implementation of inet_aton in compat.c. So back to address 255.255.255.255 failing.
svn path=/trunk/; revision=38351
2008-12-26 10:38:21 +00:00
Andrew Munger
389caf97fd Remove the entries for green, as they are imcomplete. Use the provided inf to install green.
svn path=/trunk/; revision=38350
2008-12-26 09:43:28 +00:00
James Tabor
ea9bc8715d - Patch by Andre Wisplinghoff: Text is auto-selected when mouse down is hovered outside window (notepad). See bug 953.
svn path=/trunk/; revision=38349
2008-12-26 00:42:13 +00:00
James Tabor
131b8b30ad - Example of a thread overrun? HAX-Fixes wine cursoricon test.
svn path=/trunk/; revision=38348
2008-12-25 23:44:23 +00:00
Jeffrey Morlan
238bb2f73a Allow the DIR command to be interrupted via Ctrl-C even while in the middle of a directory. (Bug 3967)
svn path=/trunk/; revision=38347
2008-12-25 23:12:54 +00:00
Michael Martin
10d052aa36 - ipv4addrs should search for decimals not spaces when calling strtok. See bug 3962 for more info.
svn path=/trunk/; revision=38346
2008-12-25 12:43:32 +00:00
Christoph von Wittich
82cffd5af5 fix some more typos
svn path=/trunk/; revision=38345
2008-12-25 12:27:47 +00:00
James Tabor
1d97cdc07b - Fix typo.
svn path=/trunk/; revision=38344
2008-12-25 11:36:51 +00:00
James Tabor
af2f0d64d5 - Check for same intput desktop with GetCursorPos. Cleanup GetCursorInfo.
svn path=/trunk/; revision=38343
2008-12-25 11:29:53 +00:00
James Tabor
d120bf4591 - Use Cursor position from server information. I guess the logic is, one workstation per system with multiple desktops. So we would always have one cursor pointer, not one per desktop.
svn path=/trunk/; revision=38342
2008-12-25 00:35:02 +00:00
KJK::Hyperion
e4fdb61e4c This is why we can't have nice things. Fixes r38338 build regression
svn path=/trunk/; revision=38340
2008-12-24 23:31:09 +00:00
KJK::Hyperion
456b1c9e58 Now a single test suite with 89 tests, instead of 89 test suites with 1 test each
Added dummy implementations of sanity checks for compilers/architectures I didn't write them for yet. Long story short: now compiles and runs with Visual C++, both x86 and x64
Added copyright/license header

svn path=/trunk/; revision=38339
2008-12-24 23:22:04 +00:00
KJK::Hyperion
d785178de6 The macro fairy left a DECLSPEC_NOINLINE under my pillow
svn path=/trunk/; revision=38338
2008-12-24 23:18:55 +00:00
James Tabor
1de27563a1 - Someone needs to wine they are using the wrong ACP. They might not care since wine is not an OS but just a hacky add on.
svn path=/trunk/; revision=38337
2008-12-24 23:07:13 +00:00
James Tabor
e5b0a21e66 [sginsberg] fixed some warnings.
svn path=/trunk/; revision=38336
2008-12-24 22:58:21 +00:00
Stefan Ginsberg
09203027ad - Welcome to Winetests -Wno-format, goodbye format warnings.
svn path=/trunk/; revision=38329
2008-12-24 16:52:58 +00:00
Timo Kreuzer
ba15efc312 - Put Dx values at start of buffer to have alignemnt of 4
- increase size of stack buffer to 100, results in >90% buffer hits
- Handle Dy values when ETO_PDY is specified (patch by Alexander Potashev, aspotashev at gmail dot com)

See issue #3958 for more details.

svn path=/trunk/; revision=38328
2008-12-24 15:35:40 +00:00
Michael Martin
21c30014ed - Update structs and flags to correct names based on documentation.
svn path=/trunk/; revision=38327
2008-12-24 12:14:30 +00:00
Stefan Ginsberg
5759ff871c - DEVMGR: wcsnicmp -> _wcsnicmp
svn path=/trunk/; revision=38325
2008-12-24 10:39:48 +00:00
Aleksey Bragin
16726f509e - Don't calculate remaining bits if there are none. Fixes out-of-bounds read of a buffer.
- Patch sent to Wine: http://www.winehq.org/pipermail/wine-patches/2008-December/066692.html

svn path=/trunk/; revision=38324
2008-12-24 10:12:01 +00:00
Stefan Ginsberg
ebef3e5d4e - Silence wined3d format warnings
svn path=/trunk/; revision=38323
2008-12-24 09:43:45 +00:00
Stefan Ginsberg
728213a13c - DHCP: strlwr -> _strlwr and remove allowwarnings=true
svn path=/trunk/; revision=38322
2008-12-24 09:20:04 +00:00
Dmitry Gorbachev
1b5adc87fa Bulgarian translations by CCTAHEB (sstpr [at] narod [dot] ru).
Bug #3965 (2/2).

svn path=/trunk/; revision=38321
2008-12-24 07:53:09 +00:00
Dmitry Gorbachev
984e698116 Bulgarian translations by CCTAHEB (sstpr [at] narod [dot] ru).
Bug #3965 (1/2).

svn path=/trunk/; revision=38320
2008-12-24 07:50:52 +00:00
Dmitry Gorbachev
9d13412630 Fix error: suggest explicit braces to avoid ambiguous 'else'.
When compiling with GCC 4.4.0.

svn path=/trunk/; revision=38319
2008-12-24 07:04:49 +00:00
Dmitry Gorbachev
cee8fc3735 Do not print garbage, initialize the variable. Bug #3916.
svn path=/trunk/; revision=38318
2008-12-24 07:00:43 +00:00
James Tabor
9b5914abf0 - Add IntGetCharDimensions and text metrics for win32k server info.
svn path=/trunk/; revision=38317
2008-12-24 02:23:30 +00:00
KJK::Hyperion
4349cee957 Also print messages to output, so the tool is more generally useful
svn path=/trunk/; revision=38316
2008-12-23 20:37:53 +00:00
Gregor Schneider
10ed852076 - Skip certain process and pipe tests due to timeouts as it was done before, update diff file
svn path=/trunk/; revision=38315
2008-12-23 20:05:39 +00:00
Gregor Schneider
20d4a1d899 - Update kernel32 winetest, thanks to Stefan100 for making this possible
svn path=/trunk/; revision=38314
2008-12-23 20:02:47 +00:00
KJK::Hyperion
6d0b61ca56 Missing from previous commit
svn path=/trunk/; revision=38313
2008-12-23 19:56:42 +00:00
Stefan Ginsberg
3ab11f598d - Kill 1 static, kill 1 allowarnings=true
svn path=/trunk/; revision=38312
2008-12-23 19:53:44 +00:00
KJK::Hyperion
dbd93ad414 PSEH 2 test suite - around 90 tests so far, and more coming
svn path=/trunk/; revision=38311
2008-12-23 19:47:30 +00:00
Stefan Ginsberg
81b01d0eaf - CCHAR is 'char', not 'const char'
svn path=/trunk/; revision=38310
2008-12-23 19:24:35 +00:00
James Tabor
db48311d5b - Add One Param Call GetCursorPos. This will be used when GDIPOINTER is deprecated.
svn path=/trunk/; revision=38309
2008-12-23 19:04:40 +00:00
Stefan Ginsberg
80eedc2faf - Welcome -w. Goodbye 3rd party warnings.
svn path=/trunk/; revision=38308
2008-12-23 19:00:05 +00:00
Stefan Ginsberg
5d44d1b196 - Never, ever, mix warning fixes with code logic changes. Should fix setup boot.
svn path=/trunk/; revision=38307
2008-12-23 18:46:59 +00:00
Stefan Ginsberg
06da69ad88 - Make KS compile warning-free, add a note to janderwald (!!!)
svn path=/trunk/; revision=38306
2008-12-23 18:28:07 +00:00
Stefan Ginsberg
d61d98270c - Forgot a comment
svn path=/trunk/; revision=38305
2008-12-23 18:18:23 +00:00
Stefan Ginsberg
54bd4baacd - Kill oskittcp warnings. Somewhat hacky? Yes indeed.
svn path=/trunk/; revision=38304
2008-12-23 18:16:48 +00:00
KJK::Hyperion
20cf8d2ace modified include/reactos/libs/pseh/pseh2.h
Actually support PSEH 2 on top of native syntax

svn path=/trunk/; revision=38303
2008-12-23 18:12:21 +00:00
Stefan Ginsberg
d2bf1c5f4f - Silence ext2 FSD warnings. Also fix some bugs where the return status wasn't properly set.
- 'allowwarnings=true' -- not anymore

svn path=/trunk/; revision=38302
2008-12-23 17:43:25 +00:00
Aleksey Bragin
f0ad8ee641 - Get back to using deprecated functions (because of linux...).
- Disable warning 4996.

svn path=/trunk/; revision=38301
2008-12-23 14:35:23 +00:00
Aleksey Bragin
9a27812344 - Replace all deprecated functions with underscored names.
- Add _CRT_SECURE_NO_DEPRECATE to VC project file to suppress security warnings.

svn path=/trunk/; revision=38300
2008-12-23 14:19:19 +00:00
James Tabor
edc3ce63d5 - More updates to global server information structure.
svn path=/trunk/; revision=38296
2008-12-23 04:51:03 +00:00
KJK::Hyperion
f72b85bdf7 modified include/reactos/libs/pseh/pseh2.h
modified   lib/pseh/framebased-gcchack.c
modified   lib/pseh/i386/framebased-gcchack.S
   (Re)added arguments to _SEH2_EXCEPT nested routines, so that using _SEH2_GetExceptionCode and _SEH2_GetExceptionInformation in exception filters doesn't force the creation of function trampolines (and related horrid inline code)
   Reimplemented some internal library routines in C

svn path=/trunk/; revision=38295
2008-12-23 02:45:25 +00:00
Timo Kreuzer
4750c0b942 For some unknown reason wmc likes to include string.h from the wine folder and we cannot link it on linux hosts. This hack should hopefully resolve the issue.
svn path=/trunk/; revision=38294
2008-12-23 02:36:25 +00:00
Timo Kreuzer
c8ad8b0005 sorry forgot this file, another wine compatibility header
svn path=/trunk/; revision=38293
2008-12-23 02:22:44 +00:00
Timo Kreuzer
d7b6e7cdad CRT header compatibility update.
asser.h:
- prototypes for _assert and _wassert, add wassert macro, TODO: reenable assert macro
conio.h:
- Add deprecation macros and some cleanup
crtdbg.h:
- Add _ASSERT_WRN, ASSERTE_WRN, ASSERT_EXPR_WRN
ctype.h:
- cleaup and fix _pctype and __pctype_func
- add _CRTIMP where needed
- add deprecation macros
dos.h:
- enable _enable and _disable
io.h:
- enable use of _INTEGRAL_MAX_BITS
- remove some defines, other cleanup
math.h:
- remove system_header
- rename include guard to _INC_MATH
- fix definition of _HUGE
- add _CRTIMP where needed
stdio.h:
- fix _iob[] and stdstram defines
- add _CRTIMP where needed
- enable non-conforming swprintf defines
- remove some mingw specific stuff
string.h:
- add _CRTIMP and deprecation macros
sys/stat.h:
- some cleanup
sys/timeb.h:
- add struct timeb
- remove #defines
- add deprecation macros
sys/utime.h:
- remove unneeded inline functions, cleanup
time.h:
- remove #defines
- add _CRTIMP and deprecation macros
wchar.h:
- fix _iob[], stdstream, _pctype and __pctype_func
- add _wfinddate_t, _wfinddatai64_t and _stat
- add _CRTIMP where needed
- remove defines

svn path=/trunk/; revision=38292
2008-12-23 02:15:24 +00:00
Timo Kreuzer
f6eb8adfb6 Replace all deprecate functions like wcsicmp with the new ones, like _wcsicmp in our own code. Define __WINESRC__ or _CRT_NONSTDC_NO_DEPRECATE where neccessary in 3rd party code to silence warnings about deprecated functions, that the upcoming crt header update will create. Remove allowwarnings="true" from telnet.
svn path=/trunk/; revision=38291
2008-12-23 01:23:25 +00:00
Timo Kreuzer
565970f956 Replace deprecated stricmp with _stricmp
svn path=/trunk/; revision=38290
2008-12-23 01:22:36 +00:00
Jeffrey Morlan
8bb3a3af67 - cmd_mkdir: Give an error message if the directory already exists (Bug 3961)
- Also, allow multiple directories to be created by one invocation

svn path=/trunk/; revision=38289
2008-12-22 23:50:53 +00:00
Timo Kreuzer
a3bf2399ff kjk_hyperion: "underscores solve all issues"
replace wcsicmp with _wcsicmp

svn path=/trunk/; revision=38288
2008-12-22 23:49:02 +00:00
Dmitry Gorbachev
d284aa7851 Fix spurious warning/error reported by GCC 4.4.0.
svn path=/trunk/; revision=38287
2008-12-22 23:46:23 +00:00
Dmitry Gorbachev
95e0371f4f Do not pop and push the same reg.
svn path=/trunk/; revision=38286
2008-12-22 23:44:15 +00:00
Dmitry Gorbachev
898f34d2de Define __MINGW_MSC_PREREQ() macro,
build failed with GCC 4.4.0 without it.

svn path=/trunk/; revision=38285
2008-12-22 23:43:10 +00:00
Timo Kreuzer
1be3ebb61b don't define strcasecmp to strcmp, use _stricmp, and define strcasecmp to _strnicmp.
svn path=/trunk/; revision=38284
2008-12-22 23:35:35 +00:00
Timo Kreuzer
da70a17936 Replace deprectaed function (unlink, stricmp) with new ones (_unlink, _stricmp)
svn path=/trunk/; revision=38283
2008-12-22 23:24:18 +00:00
Timo Kreuzer
a0f2421f8e use _str(n)icmp instead of non-standard str(n)casecmp
svn path=/trunk/; revision=38282
2008-12-22 23:11:21 +00:00
Timo Kreuzer
1fc586e88c Use _getch instead of deprecated getch
svn path=/trunk/; revision=38281
2008-12-22 22:58:41 +00:00
Jeffrey Morlan
781ae61f03 - Make IF command a special form; necessary to make nested multi-line IF blocks work properly
- Implement IF /I option, IF CMDEXTVERSION, and generic comparisons (EQU etc)
- Make IF ERRORLEVEL return true if the errorlevel is greater than the number
- Remove hacked support for multi-line IF blocks from batch.c

svn path=/trunk/; revision=38280
2008-12-22 22:34:51 +00:00
Timo Kreuzer
940dd12ea9 Remove all stuff that is either already defined in crtdefs.h or doesn't belong in the header, based on what ms defines.
svn path=/trunk/; revision=38279
2008-12-22 20:59:56 +00:00
Timo Kreuzer
6da76aad1d Don't use wine's headers and wintrnl.h for exception handling in crt. Instead include ndk and add the few definitions we need to cppexcept.h
svn path=/trunk/; revision=38278
2008-12-22 20:32:47 +00:00
Timo Kreuzer
53c3a69e0c - Add reactos/wine/sys/types.h compatibility header
- winspool: add reactos/wine to include folders

svn path=/trunk/; revision=38277
2008-12-22 20:28:26 +00:00
Timo Kreuzer
79f756b317 Add ssize_t to rosdhcp.h, as ms crt headers (and so our future crt headers) don't define it.
svn path=/trunk/; revision=38276
2008-12-22 20:25:44 +00:00
Stefan Ginsberg
5a52daeb1b - Less hack, more assert
svn path=/trunk/; revision=38275
2008-12-22 19:55:23 +00:00
Timo Kreuzer
695eb19e19 Build MP kernel/hal by default
svn path=/trunk/; revision=38274
2008-12-22 19:22:23 +00:00
Stefan Ginsberg
9775c57652 - Re-enable some Winetests now that Cm sucks less
- Add missing ROS-HACK tag

svn path=/trunk/; revision=38273
2008-12-22 18:48:06 +00:00
Aleksey Bragin
4054e57321 - Fix registry lock leakages in CmpDoOpen in failure cases.
- Add support for a special case of opening existing (cached) KCBs by CmpDoOpen.
- Specify a flag for that case in one specific case inside CmpParseKey, which allows us to get rid of the "\\REGISTRY" hack inside the code, fixes the 'Kcb->RefCount == 1' assertion failure, and certainly fixes registry-related regression tests. There might be some side effects in theory, but since this hack only applied to the root key, they shouldn't happen. Thanks to Stefan for helping in debugging and a testcase.

svn path=/trunk/; revision=38272
2008-12-22 18:47:38 +00:00
Aleksey Bragin
35fab756b4 - Add control flags for CmpDoOpen, CmpCreateKey and CmpUnloadKey.
- Add CmUnloadKey prototype.

svn path=/trunk/; revision=38271
2008-12-22 18:17:23 +00:00
Timo Kreuzer
1f9c4940d2 Introduce new config flag BUILD_MP. Compile MP kernel and hal only when this is set to 1 to save us some time and space.
svn path=/trunk/; revision=38270
2008-12-22 15:23:08 +00:00
Aleksey Bragin
c8d9e123b7 - Fix KCB ref leaks in Cm parse routine (thanks Stefan).
svn path=/trunk/; revision=38269
2008-12-22 13:35:08 +00:00
Timo Kreuzer
fce144efaa fix another instance of _STATIC_ASSERT
svn path=/trunk/; revision=38267
2008-12-22 06:37:53 +00:00
Timo Kreuzer
1cfe56ee4b Move all stuff from _mingw.h to crtdefs.h that belongs there. Get rid off MINGW_IMPORT
svn path=/trunk/; revision=38266
2008-12-22 05:55:21 +00:00
Timo Kreuzer
a4e64ebf0e If ETO_PDY is specified, Dx is a pair of INTs, make sure we access the correct index.
based on aspotashev's patch. Should fix bug #3958
See issue #3958 for more details.

svn path=/trunk/; revision=38262
2008-12-22 04:26:51 +00:00
Timo Kreuzer
766c25b7e3 Some people were thinking they could use NtGdiExtTextOut from within Win32k and get away with it. Since MmCopyFromCaller is broken, it was actually working. Implement NtGdiExtTextOutW as a wrapper around the real function, that is now called GreExtTextOutW, using the naming style that ms also uses to get some more stucture in here. Also get rid of 2 pool allocations and use only one if a local buffer is not sufficient. Should get us more TextOut performance.
svn path=/trunk/; revision=38261
2008-12-22 03:58:04 +00:00
James Tabor
955a660368 - Start populating server information structure. This fixes the icon issues with other languages.
svn path=/trunk/; revision=38258
2008-12-22 02:52:47 +00:00
Stefan Ginsberg
e48fb0b04c - More hack
svn path=/trunk/; revision=38256
2008-12-21 23:42:08 +00:00
Timo Kreuzer
ff489f9473 Include crtdefs.h instead of _mingw.h in the crt headers (like ms does), so only one header left (crtdefs.h) that includes a non-standard header
svn path=/trunk/; revision=38255
2008-12-21 23:33:19 +00:00
Stefan Ginsberg
31733a5f8a - Disable shell32 execute tests
- Add missing ole32 diff

svn path=/trunk/; revision=38254
2008-12-21 23:16:59 +00:00
Stefan Ginsberg
3f4562d5c7 - Skip a buck load of ole32 tests too
svn path=/trunk/; revision=38253
2008-12-21 22:58:10 +00:00
Timo Kreuzer
ebd5a724c6 Update excpt.h, fcntl.h, float.h, math.c, mbctype.h, setjmp.h, share.h, stddef.h, stdio.h, stdlib.h, string.h, wchar.h from ming64
- fix __p__mbctype()
- add some stuff to wine/exception.h that was formerly in except.h, but doesn't belong there
- inlcude intrin.h from _mingw.h

svn path=/trunk/; revision=38252
2008-12-21 22:43:46 +00:00
Stefan Ginsberg
fec3246837 - Skip port tests due to missing kernel support
svn path=/trunk/; revision=38251
2008-12-21 22:34:32 +00:00
Stefan Ginsberg
504c9127d3 - Hack away a whole load of msi tests, because Cm sucks
svn path=/trunk/; revision=38250
2008-12-21 22:19:03 +00:00
Stefan Ginsberg
2d59827e7e - Hack away kernel32 pipe tests -- ros' npfs is in a sad, sorry state
- Also skip process console tests (what's that you say? I am a lazy, hacky person? Couldn't agree more)

svn path=/trunk/; revision=38249
2008-12-21 21:52:28 +00:00
Stefan Ginsberg
4bd273ce6c - Use the specified timeout when reading from a mailslot
svn path=/trunk/; revision=38248
2008-12-21 20:52:31 +00:00
Stefan Ginsberg
8270c55829 - Revert 38233 as it kills dhcp.exe
svn path=/trunk/; revision=38247
2008-12-21 20:35:19 +00:00
KJK::Hyperion
b4bf27864c modified include/reactos/libs/pseh/pseh2.h
The return_twice and always_inline attributes don't mix: dump _SEH2PretendSetjmp, mark _SEH2EnterFrame as returns_twice (i.e. setjmp-like) instead, piggybacking the pretend-setjmp annotation on a function that's always called anyway. This ACTUALLY ensures GCC won't put variables in registers that might be clobbered by a SEH catch - at nearly no cost in binary code size and complexity

svn path=/trunk/; revision=38246
2008-12-21 19:51:09 +00:00
Stefan Ginsberg
9b32d1a358 - Missed PCACTIVATION_CONTEXT_BASIC_INFORMATION in last commit
svn path=/trunk/; revision=38245
2008-12-21 19:42:23 +00:00
Stefan Ginsberg
af117a341f - Add missing ACTIVATION_CONTEXT_BASIC_INFORMATION and WRITE_WATCH_FLAG_RESET
svn path=/trunk/; revision=38244
2008-12-21 19:37:18 +00:00
KJK::Hyperion
21ec6bc780 Remove superfluous dependencies on msvcrt
svn path=/trunk/; revision=38243
2008-12-21 18:21:56 +00:00
Stefan Ginsberg
6b3bec6873 - Uhm...don't pool free user handles, and don't hand them to ObDereferenceObject
svn path=/trunk/; revision=38242
2008-12-21 18:16:12 +00:00
Timo Kreuzer
e8c93086b1 Add some headers from mingw64
svn path=/trunk/; revision=38241
2008-12-21 18:11:53 +00:00
Timo Kreuzer
044b7c4522 include time.h instead of sys/time.h
svn path=/trunk/; revision=38240
2008-12-21 18:01:57 +00:00
Timo Kreuzer
5dc072842a Add __WINESRC__ define amd reactos/wine include path to libwine. This will be needed later, when the crt header files are cleaned up.
svn path=/trunk/; revision=38239
2008-12-21 18:00:49 +00:00
Timo Kreuzer
97d64c6776 Fix definition of _assert()
svn path=/trunk/; revision=38238
2008-12-21 17:51:00 +00:00
Timo Kreuzer
79532867dd remove struct timezone from time.h, always declare __tzset(), revert changes from 38052 to ftp.
svn path=/trunk/; revision=38237
2008-12-21 17:26:39 +00:00
Timo Kreuzer
9483d7bc6c Use _wcsicmp instead of non-standard wcsicmp
svn path=/trunk/; revision=38236
2008-12-21 16:58:56 +00:00
Stefan Ginsberg
9b1a3eb696 - Hack skipping mapping tests too *sigh*
svn path=/trunk/; revision=38235
2008-12-21 16:57:34 +00:00
Timo Kreuzer
a3d97cbae7 Add prototype for __globallocalestatus, it's going to be removed from crt headers later.
svn path=/trunk/; revision=38234
2008-12-21 16:55:29 +00:00
Michael Martin
7907aea509 - Preform the if (!Adapter) check before setting adapter to 0. Fixes Debug message reporting that the adapter was rejected.
svn path=/trunk/; revision=38233
2008-12-21 16:36:03 +00:00
Stefan Ginsberg
66bbcfb1cc - Make advapi32 Winetest do a basic check instead of assuming that the routine won't fail
svn path=/trunk/; revision=38232
2008-12-21 16:29:23 +00:00
Aleksey Bragin
41556963b7 Olaf Siejka <olaf_siejka@o2.pl>
- Fix NSWPAT=1 build.

svn path=/trunk/; revision=38231
2008-12-21 12:47:01 +00:00
Kamil Hornicek
aecdd2f5e9 - avoid crash, pszExt is null when creating a link to a file without extension
svn path=/trunk/; revision=38230
2008-12-21 12:17:36 +00:00
Andrew Munger
aa10663d0b Fix packmgr linkage.
svn path=/trunk/; revision=38229
2008-12-21 09:22:46 +00:00
Stefan Ginsberg
0fe3a6fdff - _popen/_wpopen: When overriding the default standard input/output handles, don't set 2/3 to 0 -- use the standard handles instead (fix by kjk). Fixes the 'CsrGetObject returning invalid handle' errors
svn path=/trunk/; revision=38228
2008-12-21 08:30:41 +00:00
Gregor Brunmar
9ebb5e3555 Implemented IDirect3DDevice9::GetFrontBufferData()
svn path=/trunk/; revision=38227
2008-12-21 08:26:47 +00:00
Gregor Brunmar
277703cc64 * Implemented IDirect3D9Device::SetGammaRamp()
* Added stub for IDirect3DSwapChain9::SetGammaRamp()

svn path=/trunk/; revision=38226
2008-12-21 08:09:25 +00:00
Gregor Brunmar
c95ddefd79 * Implemented IDirect3DDevice9::Present()
svn path=/trunk/; revision=38225
2008-12-21 07:56:38 +00:00
Gregor Brunmar
e2d4313431 * Implemented IDirect3DDevice9::GetBackBuffer()
* Forgotten documentation for IDirect3DDevice9::GetRasterStatus()

svn path=/trunk/; revision=38224
2008-12-21 07:11:30 +00:00
Michael Martin
13ee594843 - Add missing break in ExDereferenceCallBackBlock so ExReleaseRundownProtection does not get called more than once.
svn path=/trunk/; revision=38223
2008-12-21 06:01:23 +00:00
Michael Martin
f082d72190 - As per http://msdn.microsoft.com/en-us/library/ms802952.aspx, call ExDoCallBack with correct parameters.
svn path=/trunk/; revision=38222
2008-12-21 05:08:18 +00:00
KJK::Hyperion
77911bbdee modified include/reactos/wine/exception.h
Farewell Wine exception handling macros. You won't be missed

modified   dll/win32/icmp/icmp_main.c
   Removed gratuitous use of _getpid
   Winsock APIs don't set errno, they set the last error
   As a consequence, icmp.dll no longer depends on msvcrt.dll

modified   tools/rbuild/module.cpp
   Link DLLs to ntdll's CRT instead of msvcrt's by default (most DLLs don't actually need msvcrt)

Everything else:
   Set crt attribute of <module> to "msvcrt" if ntdll isn't good enough
   Link to pseh if necessary

svn path=/trunk/; revision=38221
2008-12-21 03:58:19 +00:00
Timo Kreuzer
0cbe39b8da Use "C" interface for intrinsic functions to avoid problems with C++. Fix _rotr and _rotl.
svn path=/trunk/; revision=38220
2008-12-21 03:22:17 +00:00
Timo Kreuzer
420cb2282d Include io.h. It's needed and was implicitly included so far. But that'll be soon gone.
svn path=/trunk/; revision=38219
2008-12-21 03:15:46 +00:00
Timo Kreuzer
d83c08fa82 Don't use sys/time.h
svn path=/trunk/; revision=38218
2008-12-21 03:12:09 +00:00
Timo Kreuzer
a331c8e11b Avoid using non-standard names (S_IFITO, ...).
svn path=/trunk/; revision=38217
2008-12-21 02:51:14 +00:00
Timo Kreuzer
879c57d63c use _wcsicmp instead of non-standard wcscmpi
svn path=/trunk/; revision=38216
2008-12-21 02:40:09 +00:00
Timo Kreuzer
9f0e740e7a revert 38201 and 38203 due to regressions
svn path=/trunk/; revision=38215
2008-12-21 02:27:44 +00:00
Timo Kreuzer
9432c31eba Fix definition of EMRCREATECOLORSPACE and EMRPOLYXXX, should fix a bunch of winetests.
svn path=/trunk/; revision=38214
2008-12-21 01:45:13 +00:00
Cameron Gutman
ed4682a617 - Merge aicom-network-fixes up to r38205
svn path=/trunk/; revision=38213
2008-12-21 01:29:35 +00:00
Jeffrey Morlan
5c760c2d22 widl: Don't assume that host void* is the same size as target void*
svn path=/trunk/; revision=38212
2008-12-21 00:43:56 +00:00
Timo Kreuzer
2f7e224584 add _tcscpy_s and _tsplitpath_s
svn path=/trunk/; revision=38211
2008-12-21 00:22:15 +00:00
KJK::Hyperion
ae3a2aacc2 modified dll/win32/gdi32/gdi32.rbuild
modified   dll/win32/kernel32/kernel32.rbuild
modified   dll/win32/user32/user32.rbuild
   Inexplicably missed the "big three" in r37187. Don't link msvcrt in core Win32 DLLs, for real this time

modified   dll/win32/user32/misc/dllmain.c
   Don't use wcstok. Removes the dependency on msvcrt

svn path=/trunk/; revision=38210
2008-12-21 00:13:08 +00:00
Timo Kreuzer
103afbc4a7 Don't redefine _tcscpy_s and _tsplitpath_s
svn path=/trunk/; revision=38209
2008-12-20 23:55:05 +00:00
KJK::Hyperion
e5a9f1615f modified lib/pseh/framebased-gcchack.c
modified   lib/pseh/i386/framebased-gcchack.S
   For some reason, "call _RtlUnwind@16" is being linked as "call 0" (very likely a linker bug). Reimplementing _SEH2GlobalUnwind in C and taking the address of RtlUnwind from C code seems to work
   Annotate functions implemented in assembler with .func/.endfunc, so the symbols are more correct

svn path=/trunk/; revision=38208
2008-12-20 23:27:17 +00:00
Timo Kreuzer
aaf7ad6a2b define _INTEGRAL_MAX_BITS only if it was not already defined
svn path=/trunk/; revision=38207
2008-12-20 23:16:49 +00:00
Timo Kreuzer
eced695a85 Update ETO constants
svn path=/trunk/; revision=38206
2008-12-20 22:47:24 +00:00
Timo Kreuzer
54831b15db TextOut functions take a character count, not a byte count. Rename cb to cch.
svn path=/trunk/; revision=38204
2008-12-20 21:19:43 +00:00
Timo Kreuzer
869fc7ead9 Handle ETO_PDY more correctly (dy values still ignored)
svn path=/trunk/; revision=38203
2008-12-20 21:01:14 +00:00
Kamil Hornicek
3e2f6025fc - add check for NULL pointer, "first" is NULL for folders, files without extension etc. see bug 3959
See issue #3959 for more details.

svn path=/trunk/; revision=38202
2008-12-20 20:48:08 +00:00
Timo Kreuzer
98a6b82bc5 When fuOptions has ETO_PDY specified, the DxBuffer in NtGdiExtTextOutW consists of pairs of INTs, thus the Buffer must be twice as big. (Thanks to aspotashev for locating the problem) MmCopyToCaller -> SEH2. Allocate only one buffer for the string and the Dx values.
See issue #3958 for more details.

svn path=/trunk/; revision=38201
2008-12-20 20:38:23 +00:00
Timo Kreuzer
93d4ecb9e8 [FORMATTING]
Fix indentation. No code change.

svn path=/trunk/; revision=38199
2008-12-20 19:43:11 +00:00
Stefan Ginsberg
35568f58b0 - Revert 38116 -- the SEH issues should be gone now
svn path=/trunk/; revision=38198
2008-12-20 13:48:35 +00:00
KJK::Hyperion
e6f465bb78 Supersedes r38084. Take three
modified   include/reactos/libs/pseh/pseh2.h
modified   lib/pseh/framebased-gcchack.c
modified   lib/pseh/i386/framebased-gcchack.S
   Disassemble trampolines in the library, instead of the macros. Results in better, smaller code. As a side effect, PSEH no longer requires a trampoline for nested functions - which results in even better, even smaller code in many common cases where the nested functions don't use any variables from the containing function
   Simulate a no-op setjmp so that GCC correctly handles variables in registers, instead of surprise-corrupting random variables in random conditions
   Save EBP and ESP every time a _SEH2_TRY/_SEH2_EXCEPT is entered, instead of only the first time. Probably not entirely correct yet
   Don't generate a nested function for a _SEH2_EXCEPT() filter expression if the value is a compile-time constant: convert the value to (void *)0, (void *)1 or (void *)-1, and set that as the filter, instead (like Visual C++ does, incidentally)
   If a _SEH2_EXCEPT() filter expression is a compile-time constant evaluating to EXCEPTION_CONTINUE_EXECUTION or EXCEPTION_CONTINUE_SEARCH, allow GCC to optimize out the body of the _SEH2_EXCEPT (because it'd be unreachable). This should really result in a compile-time warning, but #pragma message is unsupported in GCC 4.1.3
   Let _SEH2_EXCEPT() accept a comma expression as filter expression (e.g. _SEH2_EXCEPT(MessageBox(...), EXCEPTION_EXECUTE_HANDLER) instead of _SEH2_EXCEPT((MessageBox(...), EXCEPTION_EXECUTE_HANDLER)))
   Small optimizations in PSEH library
   Clean up GCC hacks
   Remove currently unused PSEH 3 hacks

svn path=/trunk/; revision=38197
2008-12-20 13:05:57 +00:00
Dmitry Gorbachev
5866c97424 - Do not use pGlobalData after freeing,
- do not load color spectrum bitmaps if no adapter found,
- do not use HEAP_ZERO_MEMORY, use memset(),
- check SelectObject() result,
- fix indentation.

svn path=/trunk/; revision=38196
2008-12-20 11:06:21 +00:00
Johannes Anderwald
7b6fe6680a - Fix parameters for CreateService
svn path=/trunk/; revision=38195
2008-12-20 10:09:25 +00:00
Dmitry Chapyshev
78ef81691e - Fix all wine tests for MoveFileA/W
svn path=/trunk/; revision=38194
2008-12-20 10:08:11 +00:00
Andrew Munger
2873eff0cb Null dereference FTL.
svn path=/trunk/; revision=38193
2008-12-20 09:30:12 +00:00
Dmitry Chapyshev
145ffd10f1 - Formatting fix
svn path=/trunk/; revision=38192
2008-12-20 08:07:10 +00:00
Dmitry Chapyshev
6fadfd9daf - Fix 2 winetests
svn path=/trunk/; revision=38191
2008-12-20 08:02:25 +00:00
Timo Kreuzer
b412cbd236 - fix _STATIC_ASSERT
- fix indentation
- move some headers from crt/ming to crt

svn path=/trunk/; revision=38190
2008-12-19 23:34:20 +00:00
James Tabor
6a59679c8e - Properly implement LookupIconIdFromDirectoryEx.
- Remove hack for GetDeviceCaps.
- This fixes one part of the Win32k Initialization Bug. If this change creates a problem some where else, the problem is not in this change. 

svn path=/trunk/; revision=38189
2008-12-19 22:33:11 +00:00
Timo Kreuzer
2b40f401d6 enable GetTimeZoneInformation in _getsystime
svn path=/trunk/; revision=38188
2008-12-19 19:57:21 +00:00
Timo Kreuzer
ecae93aaa2 add DECLSPEC_SELECTANY
svn path=/trunk/; revision=38187
2008-12-19 18:39:32 +00:00
Timo Kreuzer
fb37c99b05 NtGdiGetFontUnicodeRanges:
- Don't probe the safe buffer, but the usermode buffer

svn path=/trunk/; revision=38186
2008-12-19 18:16:04 +00:00
Gregor Schneider
f45ee646df - Update fputwc implementation to current wine sources
- Fixes 23 msvcrt file winetests

svn path=/trunk/; revision=38185
2008-12-19 16:57:48 +00:00
Gregor Schneider
855ea53e48 - Fix return values for fputc and _flsbuf: return only one char
- Fixes three msvcrt file winetests

svn path=/trunk/; revision=38184
2008-12-19 11:39:04 +00:00
Timo Kreuzer
fd478ccca5 Zero the last character in lfFaceName when converting a LOGFONT from A to W or vice versa. Fixes 1 gdi32_winetest font.
DPRINT1 -> DPRINT

svn path=/trunk/; revision=38183
2008-12-19 00:12:43 +00:00
Gregor Schneider
23eb0e8a4a - Remove static qualifier from g_mbcp_is_multibyte variable (locale.c) to allow external reference
- Update _mbccpy, _mbsncpy and _mbsnbcpy, so that they handle leading bytes correctly
- Fixes 6 of 7 failing msvcrt string winetests, the remaining failure is related to memcpy behavior

svn path=/trunk/; revision=38182
2008-12-18 22:06:07 +00:00
Gregor Schneider
5fe4b4b425 - Update _mbclen, mblen, _mbslen, _mbsnextc and _mbstrlen which should rely on the leadbyte mechanism
- Fixes 9 msvcrt string tests, 7 failures tbd
- Remove leftover function declaration from ismblead.c

svn path=/trunk/; revision=38181
2008-12-18 21:17:22 +00:00
James Tabor
589af34558 - From SDK, LD_ flags.
svn path=/trunk/; revision=38180
2008-12-18 20:59:12 +00:00
Jeffrey Morlan
220378c764 VfatSetAllocationSizeInformation: The fast code for extending the size of a non-empty file did have a bug in that it didn't always set Fcb->LastCluster/Fcb->LastOffset but the OffsetToCluster call was made assuming that it did. However, the code that replaced it had a bug as well, in that it did not set Cluster to the original final cluster like the error handling code expected, so it would crash when out of disk space. Bringing back the fast code, but with its bug fixed.
svn path=/trunk/; revision=38179
2008-12-18 20:47:20 +00:00
Gregor Schneider
9b0331478f - Update _mbsbtype and _mbsninc functions
- Fixes 17 msvcrt string tests, 16 to go

svn path=/trunk/; revision=38178
2008-12-18 20:26:57 +00:00
Gregor Brunmar
101cb70315 Implemented IDirect3DDevice9::GetRasterStatus()
svn path=/trunk/; revision=38177
2008-12-18 19:48:17 +00:00
Gregor Schneider
b34362b5a5 - Close registry key handle of both RegQueryValueEx calls fail. I don't see anything else leaking.
svn path=/trunk/; revision=38176
2008-12-18 19:38:01 +00:00
Gregor Brunmar
36ac3e9c57 Implemented IDirect3DDevice9::GetGammaRamp()
svn path=/trunk/; revision=38175
2008-12-18 19:29:49 +00:00
Gregor Brunmar
1cc6243d5e Implemented IDirect3DDevice9::CreateAdditionalSwapChain()
svn path=/trunk/; revision=38174
2008-12-18 19:08:17 +00:00
Gregor Schneider
1c8d9a1277 - Remove duplicate harcoded _mbctype, rename MSVCRT_mbctype to fit the new role
- Update related functions _ismbblead, _ismbslead, _ismbbtrail, _ismbstrail to use Wine _mbctype indexing
- Fixes 28 msvcrt string tests, 33 left
- Minor header updates

svn path=/trunk/; revision=38173
2008-12-18 18:58:43 +00:00
Dmitry Chapyshev
10ffe93130 - Revert r37085. It fix work kbswitch, but I think, that somewhere (in kbswitch) there is a memory leak. Help somebody to find it
svn path=/trunk/; revision=38172
2008-12-18 12:32:46 +00:00
Christoph von Wittich
f74a13b345 GENERIC_WRITE is required to flush the input buffer
svn path=/trunk/; revision=38171
2008-12-18 12:32:32 +00:00
Dmitry Gorbachev
6c8e595de5 Add a hack which allows to boot with Armenian language.
svn path=/trunk/; revision=38170
2008-12-18 12:26:52 +00:00
Dmitry Gorbachev
32eb774e68 Fix some keyboard layout related stuff in USetup.
svn path=/trunk/; revision=38169
2008-12-18 12:26:47 +00:00
Dmitry Gorbachev
35da2f5ea3 Armenian registry settings.
svn path=/trunk/; revision=38168
2008-12-18 12:26:42 +00:00
Dmitry Gorbachev
c31b0b4bc9 Add these two old translations:
- Armenian (Notepad) by Andranik Haroyan (andranik_haroyan at yahoo),
- Thai (Calculator) by Sumath Aowsakulsutthi (punth1 at gmail).

svn path=/trunk/; revision=38167
2008-12-18 12:26:33 +00:00
Johannes Anderwald
e0f42218c7 - Add GUID_DEVCLASS_SOUND
svn path=/trunk/; revision=38166
2008-12-18 09:16:13 +00:00
Christoph von Wittich
222fa8743a DPRINT1 -> DPRINT on failure to prevent spamming of buildbot winetest logs
svn path=/trunk/; revision=38164
2008-12-18 07:26:07 +00:00
Jeffrey Morlan
36ac6dbed7 FAT##FindAndMarkAvailableCluster: Decrement the AvailableClusters count to keep reported free space consistent.
svn path=/trunk/; revision=38163
2008-12-18 03:09:45 +00:00
James Tabor
46ef532ab0 Patch by Aric Stewart : user32: Implement handling of WM_INPUTLANGCHANGE. Updated header and made WIN_ListChildren global.
svn path=/trunk/; revision=38162
2008-12-18 01:14:39 +00:00
Daniel Reimer
8a36d2a8ba Add German Table to Kernel32
svn path=/trunk/; revision=38161
2008-12-17 23:19:08 +00:00
Johannes Anderwald
347a9d5cf0 - Sorry I BROKE build
svn path=/trunk/; revision=38160
2008-12-17 21:16:31 +00:00
Johannes Anderwald
18960d88d3 - add ks.sys & portcls.sys to bootcd image
svn path=/trunk/; revision=38159
2008-12-17 20:59:31 +00:00
Dmitry Chapyshev
75e639eabf - More implement GetCPInfoExW
- Add resources for getting localized of code pages names

svn path=/trunk/; revision=38157
2008-12-17 16:30:31 +00:00
Johannes Anderwald
ff1e60162f - Handle PcNewRegistryKey for DeviceRegistryKey, DriverRegistryKey, HwProfileRegistryKey
- Implement IPortClsVersion interface

svn path=/trunk/; revision=38156
2008-12-17 16:01:32 +00:00
Johannes Anderwald
d48a47ec8a - Add IID_IPortClsVersion
svn path=/trunk/; revision=38155
2008-12-17 15:58:32 +00:00
Daniel Reimer
6c1d6b1345 Synched winhlp32 and wordpad with wine HEAD.
Added some Dutch Translations I had lying around here. Credits go to the guy who gave them to me and who's name i forgot...
Bug 3881: Greek update by Apostolos Alexiadis

svn path=/trunk/; revision=38154
2008-12-17 15:42:39 +00:00
Daniel Reimer
480c8cbd40 Sync winfile with wine HEAD.
Bug 3881: Greek update by Apostolos Alexiadis

svn path=/trunk/; revision=38153
2008-12-17 15:41:17 +00:00
Johannes Anderwald
05a75b23b1 - Add IUnregisterSubdevice && IUnregisterPhysicalConnection interfaces
svn path=/trunk/; revision=38152
2008-12-17 15:36:19 +00:00
Matthias Kupfer
f711cf7ae8 move variable declaration
svn path=/trunk/; revision=38147
2008-12-17 13:54:50 +00:00
Matthias Kupfer
829b0c63d9 Maciej Bialas <bjauy AT tlen DOT pl>
- Set LocaleID from unattend.inf
- See issue #3943 for more details.

svn path=/trunk/; revision=38146
2008-12-17 13:06:32 +00:00
Dmitry Chapyshev
84a5eed60e - Implement __lconv_init
svn path=/trunk/; revision=38143
2008-12-17 10:24:13 +00:00
Dmitry Gorbachev
99cdd75fa7 Allow to dynamically load a library which uses static TLS.
svn path=/trunk/; revision=38142
2008-12-17 05:51:06 +00:00
Dmitry Gorbachev
466378bd87 In GetQueuedCompletionStatus function:
- change order of arguments of NtRemoveIoCompletion function,
- check maybe it returns STATUS_TIMEOUT.

svn path=/trunk/; revision=38141
2008-12-17 05:50:20 +00:00
Stefan Ginsberg
52eab0439a - Hack-skip the gdi32 font test in an attempt to fix the infinite loop build server encounters
svn path=/trunk/; revision=38140
2008-12-17 05:46:56 +00:00
Jeffrey Morlan
82f0f59917 Fix bug where DIR /D wouldn't always show all files; merge duplicated code between /W and /D
svn path=/trunk/; revision=38131
2008-12-16 23:51:20 +00:00
Stefan Ginsberg
a99a144adb - Sync gdiplus Winetest too
svn path=/trunk/; revision=38124
2008-12-16 18:41:26 +00:00
Stefan Ginsberg
587db429a4 - Sync gdiplus with Wine head
svn path=/trunk/; revision=38123
2008-12-16 18:41:07 +00:00
Timo Kreuzer
327684fd1c Fix usage of PNTSTATUS instead of NTSTATUS in NT_SUCCESS, which could result in IopCheckVpbMounted returning a wrong status code
svn path=/trunk/; revision=38121
2008-12-16 18:12:13 +00:00
Stefan Ginsberg
1258b49708 - Add missing break (<3 kjk <3)
svn path=/trunk/; revision=38120
2008-12-16 17:51:57 +00:00
Timo Kreuzer
7d2ae2011e Let rbuild throw an exception when an implicit module dependency (like mingw lib) cannot be resolved instead of silently failing.
svn path=/trunk/; revision=38118
2008-12-16 15:51:55 +00:00
Stefan Ginsberg
2521c1979a - Remove KeRosDumpStackFrames export and make the call go through KdSystemDebugControl instead
svn path=/trunk/; revision=38117
2008-12-16 15:25:51 +00:00
Stefan Ginsberg
45aaa00ef8 - Temporarily revert part of 38078 to make build server builds bootable again
svn path=/trunk/; revision=38116
2008-12-16 14:50:57 +00:00
Johannes Anderwald
7f7f904854 - Implement KsCreateAllocator, KsRegisterWorker, KsUnregisterWorker, KsRegisterCountedWorker, KsDecrementCountedWorker, KsIncrementCountedWorker, KsQueueWorkItem
svn path=/trunk/; revision=38115
2008-12-16 13:19:53 +00:00
Dmitry Gorbachev
4c0f9b5052 Fix TLS callbacks. Testers, please test it on real software.
svn path=/trunk/; revision=38113
2008-12-15 18:19:18 +00:00
Stefan Ginsberg
3e536240a1 - Revert part of 37861 on kjk's request
svn path=/trunk/; revision=38112
2008-12-15 18:18:23 +00:00
Stefan Ginsberg
ab621541ae - Silence debug spam
svn path=/trunk/; revision=38109
2008-12-15 14:43:25 +00:00
Timo Kreuzer
e50e0d8646 - remove outdated files from mingw lib
- remove allowwarnings=true

svn path=/trunk/; revision=38108
2008-12-15 14:02:28 +00:00
Dmitry Chapyshev
32dfe68057 - Formatting fix
svn path=/trunk/; revision=38107
2008-12-15 13:54:34 +00:00
Timo Kreuzer
be2c347725 fix a typo
svn path=/trunk/; revision=38104
2008-12-15 12:26:16 +00:00
Dmitry Chapyshev
d07b497cbb - Add ACTIVATION_CONTEXT_STACK structure
- Add ICVERSION define

svn path=/trunk/; revision=38103
2008-12-15 10:48:53 +00:00
James Tabor
58d352809d - Fix bitmap tests.
svn path=/trunk/; revision=38102
2008-12-15 05:48:22 +00:00
James Tabor
8a3fedace3 - Implement DIB section attribute flag support.
- Fix height negativity being passed to NtGdiCreateCompatibleBitmap. See bug 3947.

svn path=/trunk/; revision=38101
2008-12-15 05:25:31 +00:00
Timo Kreuzer
e9d55d0638 mbctype.h: fix broken _mbctype[] and _mbcasemap[] declarations
sec_api/time_s.h: add asctime_s
stdio.h: comment out defines for non-conforming swprintfs
sys/utime.h: fix definition of _utime / _utime32 to be compatible to msvc while linking to msvcrt.dll
tchar.h: add secure time functions
fixes msvcrt_winetest

svn path=/trunk/; revision=38088
2008-12-14 23:41:51 +00:00
Timo Kreuzer
2f3c5f280b - Replace a 'for' with a 'do .. while '
- Make sure OutputDebugStringA terminates with a newline
Fixes winetest debug output. I wonder how it worked before. Dedicated to Stefan100.

svn path=/trunk/; revision=38087
2008-12-14 23:18:59 +00:00
Timo Kreuzer
39324400b9 [FORMATTING]
Fix indentation, no code change

svn path=/trunk/; revision=38086
2008-12-14 22:52:51 +00:00
KJK::Hyperion
41dd7167ea Revert r38084
Sigh.

svn path=/trunk/; revision=38085
2008-12-14 22:44:33 +00:00
KJK::Hyperion
41467cc1ad Supersedes r38081
modified   include/reactos/libs/pseh/pseh2.h
modified   lib/pseh/framebased-gcchack.c
modified   lib/pseh/i386/framebased-gcchack.S
   Disassemble trampolines in the library, instead of the macros. Results in better, smaller code. As a side effect, PSEH no longer requires a trampoline for nested functions - which results in even better, even smaller code in many common cases where the nested functions don't use any variables from the containing function
   Simulate a no-op setjmp so that GCC correctly handles variables in registers, instead of surprise-corrupting random variables in random conditions
   Save EBP every time a _SEH2_TRY/_SEH2_EXCEPT is entered, instead of only the first time: correctly handles code compiled with -fomit-frame-pointers
   Don't generate a nested function for a _SEH2_EXCEPT() filter expression if the value is a compile-time constant: convert the value to (void *)0, (void *)1 or (void *)-1, and set that as the filter, instead (like Visual C++ does, incidentally)
   If a _SEH2_EXCEPT() filter expression is a compile-time constant evaluating to EXCEPTION_CONTINUE_EXECUTION or EXCEPTION_CONTINUE_SEARCH, allow GCC to optimize out the body of the _SEH2_EXCEPT (because it'd be unreachable). This should really result in a compile-time warning, but #pragma message is unsupported in GCC 4.1.3
   Let _SEH2_EXCEPT() accept a comma expression as filter expression (e.g. _SEH2_EXCEPT(MessageBox(...), EXCEPTION_EXECUTE_HANDLER) instead of _SEH2_EXCEPT((MessageBox(...), EXCEPTION_EXECUTE_HANDLER)))
   Small optimizations in PSEH library
   Clean up GCC hacks
   Remove currently unused PSEH 3 hacks

svn path=/trunk/; revision=38084
2008-12-14 21:50:31 +00:00
Dmitry Gorbachev
e415cd9e65 - Use HEAP_ZERO_MEMORY instead of memset().
- Do not crash if no adapter found.

svn path=/trunk/; revision=38083
2008-12-14 20:45:16 +00:00
KJK::Hyperion
966a02f90b Revert r38081
svn path=/trunk/; revision=38082
2008-12-14 19:54:52 +00:00
KJK::Hyperion
0d1b89e5c2 modified include/reactos/libs/pseh/pseh2.h
modified   lib/pseh/framebased-gcchack.c
   Disassemble trampolines in the library, instead of the macros. Results in better, smaller code. As a side effect, PSEH no longer requires a trampoline for nested functions - which results in even better, even smaller code in many common cases where the nested functions don't use any variables from the containing function
   Simulate a no-op setjmp so that GCC correctly handles variables in registers, instead of surprise-corrupting random variables in random conditions
   Save EBP every time a _SEH2_TRY/_SEH2_EXCEPT is entered, instead of only the first time: correctly handles code compiled with -fomit-frame-pointers
   Don't generate a nested function for a _SEH2_EXCEPT() filter expression if the value is a compile-time constant: convert the value to (void *)0, (void *)1 or (void *)-1, and set that as the filter, instead (like Visual C++ does, incidentally)
   If a _SEH2_EXCEPT() filter expression is a compile-time constant evaluating to EXCEPTION_CONTINUE_EXECUTION or EXCEPTION_CONTINUE_SEARCH, allow GCC to optimize out the body of the _SEH2_EXCEPT (because it'd be unreachable). This should really result in a compile-time warning, but #pragma message is unsupported in GCC 4.1.3
   Let _SEH2_EXCEPT() accept a comma expression as filter expression (e.g. _SEH2_EXCEPT(MessageBox(...), EXCEPTION_EXECUTE_HANDLER) instead of _SEH2_EXCEPT((MessageBox(...), EXCEPTION_EXECUTE_HANDLER)))
   Small optimizations in PSEH library
   Clean up GCC hacks
   Remove currently unused PSEH 3 hacks

svn path=/trunk/; revision=38081
2008-12-14 19:49:05 +00:00
Dmitry Gorbachev
47b29bf325 Fix winsta.dll rbuild file.
svn path=/trunk/; revision=38079
2008-12-14 13:52:28 +00:00
Eric Kohl
41a958b128 - SEH-protect LsaClose, LsaDelete and LsaOpenPolicy.
- Move the code of LsaOpenPolicy into LsarOpenPolicy and make LsaOpenPolicy call LsarOpenPolicy.

svn path=/trunk/; revision=38078
2008-12-14 13:16:16 +00:00
Michael Martin
1605d036fe - Use volatile with PagesLocked and MdlAddress. Fixes bug #3674.
- For safety may have to declare all variable used in except this way.

svn path=/trunk/; revision=38077
2008-12-14 12:14:00 +00:00
Aleksey Bragin
5e305bbdf6 - Undo one "fix" from 38075. Coverity warned you about possible double check of the same pointer (though in || you probably can't go without it), but one check should definately stay! SpiGetLunExtension can return NULL!
svn path=/trunk/; revision=38076
2008-12-14 11:59:21 +00:00
Stefan Ginsberg
a9295e691b - Fix a broken loop
- Remove unnecessary checks
- Fixes CID 171, 172 and 655

svn path=/trunk/; revision=38075
2008-12-14 10:15:49 +00:00
Stefan Ginsberg
afa4c210b2 - Get rid off STATIC, DECL_IMPORT and DECL_EXPORT
- Fix FIELD_OFFSET

svn path=/trunk/; revision=38074
2008-12-14 10:02:46 +00:00
KJK::Hyperion
0cb750adfa modified lib/pseh/framebased-gcchack.c
modified   lib/pseh/i386/framebased-gcchack.S
   Correctly chain exceptions raised during unwinding by "finally" blocks
   Sanitize direction flag before any C code is executed, just to be totally safe
   Clean up code

svn path=/trunk/; revision=38069
2008-12-14 02:55:50 +00:00
Timo Kreuzer
db8c91d651 fix utime usage
svn path=/trunk/; revision=38068
2008-12-14 01:43:24 +00:00
Timo Kreuzer
7f8b6003c6 revert last commit
svn path=/trunk/; revision=38067
2008-12-14 01:28:01 +00:00
Timo Kreuzer
d469155aa7 revert 38059 to see if it has effected the output of winetests
svn path=/trunk/; revision=38066
2008-12-14 01:13:49 +00:00
Eric Kohl
bac49255c5 - Make the service manager wait for LSA.
- Winlogon must not wait for the service mananger, otherwise we will get another deadlock.

svn path=/trunk/; revision=38065
2008-12-14 01:01:16 +00:00
Stefan Ginsberg
76e4f9ca92 - Hack away mru tests as Cm is broken
svn path=/trunk/; revision=38064
2008-12-14 00:46:06 +00:00
Stefan Ginsberg
6b4c969767 - Disable lsasrv and advapi debug tracing, accidentally committed in 38041
svn path=/trunk/; revision=38063
2008-12-14 00:05:19 +00:00
Timo Kreuzer
a49057dcd6 Didn't want to commit this. Use the opportunity to convert spaces -> tabs.
svn path=/trunk/; revision=38062
2008-12-13 23:50:28 +00:00
Timo Kreuzer
fd55d5ab90 fix rosperf build
svn path=/trunk/; revision=38061
2008-12-13 23:48:38 +00:00
Timo Kreuzer
b59e7d655f include stdlib.h for exit()
svn path=/trunk/; revision=38060
2008-12-13 23:37:26 +00:00
Timo Kreuzer
14fa0ef142 fix build of rostests
svn path=/trunk/; revision=38059
2008-12-13 23:12:44 +00:00
Timo Kreuzer
6b7663640a fix fontview build
svn path=/trunk/; revision=38058
2008-12-13 22:25:59 +00:00
Timo Kreuzer
76a198afb9 Update crt headers and mingw lib from mingw64. Update crt a bit. 4 msvcrt time tests fixed.
svn path=/trunk/; revision=38052
2008-12-13 21:28:05 +00:00
Gregor Schneider
d7b72f79a2 Update RtlIsTextUnicode, ntdll rtlstr winetest failure down by 10, one remaining
svn path=/trunk/; revision=38051
2008-12-13 21:22:07 +00:00
Gregor Schneider
681e0e0b24 - Update _makepath and _wmakepath to allow in place operation and separated extension processing, based on wine code
- Fixes all 14 msvcrt dir winetests

svn path=/trunk/; revision=38050
2008-12-13 21:06:47 +00:00
Timo Kreuzer
1e4507a141 fix build
svn path=/trunk/; revision=38049
2008-12-13 19:47:24 +00:00
Aleksey Bragin
70195c5fa2 - Add missing PSHARED_CACHE_MAP.
svn path=/trunk/; revision=38048
2008-12-13 19:31:40 +00:00
Aleksey Bragin
fcd0ee7931 - Sync with Wine.
svn path=/trunk/; revision=38047
2008-12-13 19:30:38 +00:00
Timo Kreuzer
1208ee14e8 Add 101 tests for GetSystemMetrics
svn path=/trunk/; revision=38046
2008-12-13 17:55:44 +00:00
Timo Kreuzer
702df456d2 Add DumpMem function to apitests lib for debugging purposes
svn path=/trunk/; revision=38045
2008-12-13 16:52:49 +00:00
Timo Kreuzer
4a3e577b8f Add tests for NtGdiCombineRgn (14), NtGdiCreateCompatibleDC (4), NtGdiDoPalette (1), NtGdiFlushUserBatch (10), NtGdiPolyPolyDraw (60), NtGdiselectBitmap (4), NtGdiSelectPen (6), NtGdiSetDIBitsToDeviceInternal (2), NtUserEnumDisplayMonitors (7), NtUserGetClassInfo (15), NtUserProcessConnect (1), NtUserSelectPalette (13), NtUserSystemParametersInfo (1) (= 138 new tests)
svn path=/trunk/; revision=38044
2008-12-13 16:48:01 +00:00
Dmitry Gorbachev
8a8705ed19 Remove workaround for GCC 4.4.0 bug, it is already fixed.
svn path=/trunk/; revision=38043
2008-12-13 15:49:41 +00:00
Dmitry Gorbachev
030afbd185 - Remove DBCSCodePage field from NLS_FILE_HEADER structure.
- Make RtlInitCodePageTable function slightly clearer.
- Fix IntIsLeadByte function (thanks to Gregor Schneider, bug #3944).

svn path=/trunk/; revision=38042
2008-12-13 15:42:56 +00:00
Eric Kohl
8fb679dc7c Do not start LSASS as a service but as an ordinary process because:
1) LSASS and the NetLogon service are not the same.
2) The service manager must wait for LSASS to finish initialization. If LSASS is started as a service we will have a classic deadlock scenario.

svn path=/trunk/; revision=38041
2008-12-13 14:47:07 +00:00
Timo Kreuzer
fc635826a5 print out some info on non-type symbols
svn path=/trunk/; revision=38040
2008-12-13 12:05:16 +00:00
Timo Kreuzer
0dc6254f67 errcode is a type. using it as parameter name in a old type function declaration doesn't work.
Use modern style declaration

svn path=/trunk/; revision=38039
2008-12-13 01:05:46 +00:00
Timo Kreuzer
0c36e47417 update dbghelp_ros.diff. Only one tiny change left
svn path=/trunk/; revision=38038
2008-12-13 00:54:45 +00:00
Timo Kreuzer
eacec70b46 sync dbghelp to wine head
- replace wine's spec file with an own one
- add back the stubs file and rename it to rosstubs.c, so next time someone syncs dbghelp, he might notice that this file is ros specific and does NOT delete it
- fix FindFileInPath definition in dbghelp.h
- update wine/mscvpdb.h

svn path=/trunk/; revision=38037
2008-12-13 00:52:11 +00:00
Timo Kreuzer
4666ae75a3 add _strtoi64 and _strtoui64 to stdlib.h
svn path=/trunk/; revision=38036
2008-12-13 00:32:37 +00:00
Gregor Schneider
9bb14d43db - Update ntdll winetests
- Warning: the reg test may bsod/restart your Windows system- not a problem in ros though

svn path=/trunk/; revision=38035
2008-12-12 23:42:40 +00:00
Timo Kreuzer
88f1899dcb reduce the amount of hacks in dbghelp_ros.diff, also fix declaration of _strtoui64
svn path=/trunk/; revision=38034
2008-12-12 20:12:21 +00:00
Timo Kreuzer
019f6c6133 when defining ssize_t, also define _SSIZE_T_DEFINED
svn path=/trunk/; revision=38033
2008-12-12 19:37:56 +00:00
Timo Kreuzer
d6326245c7 remove useless circle definition _setjmp -> setjmp -> _setjmp
svn path=/trunk/; revision=38032
2008-12-12 19:27:14 +00:00
Timo Kreuzer
076f1a2735 MAX_PATH is neither defined by ntddk.h nor by crt headers, use _MAX_PATH instead
svn path=/trunk/; revision=38031
2008-12-12 19:06:57 +00:00
Aleksey Bragin
3858e67cb6 - Stubplement winsta.dll, based on a patch by Samuel Serapion.
See issue #2299 for more details.

svn path=/trunk/; revision=38030
2008-12-12 18:26:42 +00:00
Johannes Anderwald
99a9a89ee8 - Partly implement IPortTopology port driver
svn path=/trunk/; revision=38029
2008-12-12 17:20:15 +00:00
Johannes Anderwald
39d9b7ca5c - interfaces definition for IMiniportTopology
svn path=/trunk/; revision=38028
2008-12-12 17:18:26 +00:00
Johannes Anderwald
710a394cb2 - Partly implement IPortWavePci interface
- Use IServiceSink interface for notification when capture frames are available

svn path=/trunk/; revision=38027
2008-12-12 15:01:31 +00:00
Johannes Anderwald
c2dbafa667 - Add IPortWavePciStream, IMiniportWavePciStream, IMiniportWavePci
svn path=/trunk/; revision=38026
2008-12-11 23:06:58 +00:00
Aleksey Bragin
f611b44733 Cary Xiao" <xiaowave@gmail.com>
- Add some code to complete breakpoint of gdbstub.
See issue #1817 for more details.

svn path=/trunk/; revision=38024
2008-12-11 19:44:56 +00:00
Aleksey Bragin
dd0e4d213f - Add a commented out entry for green.sys driver.
See issue #3689 for more details.

svn path=/trunk/; revision=38023
2008-12-11 18:52:18 +00:00
Aleksey Bragin
3e8d35325b - Fix incorrect drivers installation directories.
See issue #3689 for more details.

svn path=/trunk/; revision=38022
2008-12-11 18:49:20 +00:00
Danny Götte
ccba633447 * start implementing the new generator
- uses a depency tree to recognize, when he has to generate other entries
  - uses caching -> reduces time to generate contents more than once
  - is able to generate nested contents
* some bugfixes

svn path=/branches/danny-web/; revision=38021
2008-12-11 17:45:34 +00:00
Aleksey Bragin
c026b4fed5 Daniel Zimmerman <netzimme@aim.com>
- Fix the "OVERRUN STATIC error" in CID 557-574 in explorer (use a byte array instead of a shortfilename-sized array).
See issue #3914 for more details.

svn path=/trunk/; revision=38020
2008-12-11 17:16:11 +00:00
Aleksey Bragin
e30784ec7b - An "almost working" kbhit implementation by Russel. The code is rather crappy, feel free to improve it.
Some notes:
1) Forgive my sloppy coding skills (all those LeaveCriticalSections, use of malloc/free), a lot of it was written in a rush to get something going. 2) For some reason, the first char entered isn't detected (on windows and reactos)
3) The thread safety code is questionable, I haven't tested this, but windows does use critical sections for it.
4) Compared to the windows way of doing it, it is probably wrong.
5) Maybe other things as well.

But it does work (at least when I tested it on windows and reactos) compared to the previous implementation of it which did not at all.
See issue #3747 for more details.

svn path=/trunk/; revision=38019
2008-12-11 16:44:07 +00:00
Johannes Anderwald
9507d41bad - Implement IDrmPort, IDrmPort2 interface
svn path=/trunk/; revision=38018
2008-12-11 14:51:57 +00:00
Johannes Anderwald
4e50d43e45 - Add IDrmPort, IDrmPort2 interfaces
svn path=/trunk/; revision=38017
2008-12-11 14:51:27 +00:00
Aleksey Bragin
77a33b8c79 - Add Dll Characteristics defines.
svn path=/trunk/; revision=38016
2008-12-11 12:50:37 +00:00
Christoph von Wittich
71f965358d convert most of syssetup to unicode
svn path=/trunk/; revision=38012
2008-12-11 11:24:32 +00:00
Johannes Anderwald
d56dde4a07 - Use FILE_DEVICE_KS when creating new device object
- Partly implement PcNewRegistryKey, PcRegisterSubdevice
- DPC event is a Synchronization event- Implement PcRegisterAdapterPowerManagement

svn path=/trunk/; revision=38011
2008-12-11 11:23:14 +00:00
Johannes Anderwald
ce51a7b299 - Add IAdapterPowerManagement interface
svn path=/trunk/; revision=38010
2008-12-11 11:21:02 +00:00
Johannes Anderwald
a5b0f9d3dc - Add undef macro to avoid warnings
svn path=/trunk/; revision=38009
2008-12-11 10:55:09 +00:00
Johannes Anderwald
283ad79b4a - add IID_IServiceSink
- add IID_IServiceGroup
- add enum for IRegistryKey

svn path=/trunk/; revision=38008
2008-12-11 10:44:50 +00:00
Christoph von Wittich
15ea296cd4 convert parts of syssetup to WCHAR - please help to fix this mess
svn path=/trunk/; revision=38007
2008-12-11 09:41:55 +00:00
Johannes Anderwald
dbd198da9d - Fix RegSetValueEx parameters
- Found by Chris

svn path=/trunk/; revision=38006
2008-12-11 09:05:19 +00:00
Christoph von Wittich
193151855a don't set testplatform to wine anymore as our services code succeeds in wine todo blocks
svn path=/trunk/; revision=38005
2008-12-11 06:47:06 +00:00
Dmitry Gorbachev
676070c406 Update NLS files.
svn path=/trunk/; revision=38004
2008-12-10 22:43:37 +00:00
James Tabor
af9b7168ed - Yet another victim of the Win32k Initialization BUG!
- Creating an Information DC is wrong when using it with Icon Creation. This makes the default bitmap monochrome and this is why CreateCompatibleBitmap is broken. Plus all the hacks related to making it all work in Win32k.

svn path=/trunk/; revision=38002
2008-12-10 21:14:02 +00:00
Stefan Ginsberg
8e07c62725 - Disable crashing advapi32 tests -- add print and notes
svn path=/trunk/; revision=37999
2008-12-10 17:32:31 +00:00
Aleksey Bragin
2794dbc70a - Impersonation level should be indeed higher that the lowest one. Fix the check accordingly. Spotted by Dmitry Gorbachev and GCC.
See issue #3939 for more details.

svn path=/trunk/; revision=37998
2008-12-10 15:24:55 +00:00
Dmitry Gorbachev
28cddcaf8e Update NLS files.
svn path=/trunk/; revision=37997
2008-12-10 12:07:43 +00:00
Christoph von Wittich
c7e268bb6b fail when there are no sub authorities
svn path=/trunk/; revision=37996
2008-12-10 08:29:03 +00:00
Christoph von Wittich
8ab21576b5 use constant instead of value to avoid further "hm?" from Alex
svn path=/trunk/; revision=37995
2008-12-10 07:34:02 +00:00
Daniel Reimer
29b4de77bf Bug 3942: "Translate update norwegian" by Lars Martin Hambro
Small sidenote: I accidently commited a patch for XBox Support from Martin_sW in r31325 ~1 year ago...
It adds handover XBox HDD information to ROS Kernel into freeldr and is needed for new ROS Versions to start on XBox.
This + xbox hal + xbox vbe driver + moddded bootvid driver (not commited yet (/me looks at Fireball)) makes ROS boot on XBox.

svn path=/trunk/; revision=37994
2008-12-10 07:08:31 +00:00
James Tabor
50f45e4521 - Make sure SecurityDescriptor is not NULL.
svn path=/trunk/; revision=37983
2008-12-09 20:28:26 +00:00
James Tabor
339bbdd5bf - Sync to date wine AdvApi32 cross tests.
svn path=/trunk/; revision=37982
2008-12-09 19:26:45 +00:00
Stefan Ginsberg
2291d9b3b4 - Remove traces
svn path=/trunk/; revision=37979
2008-12-09 19:00:46 +00:00
Stefan Ginsberg
e27a1b6f47 - Initialize pointer to null
svn path=/trunk/; revision=37978
2008-12-09 18:48:28 +00:00
Stefan Ginsberg
2327d45c5a - Remove trace, change trace
svn path=/trunk/; revision=37977
2008-12-09 18:35:06 +00:00
Stefan Ginsberg
cd8bdd5562 - More trace :/
svn path=/trunk/; revision=37975
2008-12-09 18:20:18 +00:00
Stefan Ginsberg
be8a2bb4fb - Temporarily add tracing to ConvertStringSecurityDescriptorToSecurityDescriptorW and LocalAlloc to figure out why the tests crashes on build server -- will be reverted ASAP
svn path=/trunk/; revision=37974
2008-12-09 18:04:58 +00:00
Stefan Ginsberg
b87814a4c9 - Add back debug print -- build server still crashes
svn path=/trunk/; revision=37973
2008-12-09 17:44:27 +00:00
Stefan Ginsberg
12a6dfd816 - Revert the debug print
svn path=/trunk/; revision=37972
2008-12-09 16:39:33 +00:00
Christoph von Wittich
f39793d4ca implement hex value support for ParseAccessMaskString
sync ComputeStringSidSize with wine

svn path=/trunk/; revision=37971
2008-12-09 16:39:03 +00:00
Dmitry Gorbachev
69096be449 Fix IntIsValidSBCSMapping(). Bug #3903.
svn path=/trunk/; revision=37970
2008-12-09 16:13:51 +00:00
Dmitry Gorbachev
14572bf220 Provide memcmp() for GCC 4.4.0.
svn path=/trunk/; revision=37965
2008-12-09 15:05:02 +00:00
Kamil Hornicek
cc0170cf68 - sync d3d8, d3d9 with wine
svn path=/trunk/; revision=37962
2008-12-09 13:50:12 +00:00
Stefan Ginsberg
358df6e806 - Test commit for the crash which the build server is experiencing (will be reverted)
svn path=/trunk/; revision=37961
2008-12-09 13:35:06 +00:00
Kamil Hornicek
cbea1f27b7 - revert 37958 for now, sorry
svn path=/trunk/; revision=37959
2008-12-09 12:27:50 +00:00
Kamil Hornicek
5c70658299 - remove leftovers
svn path=/trunk/; revision=37958
2008-12-09 12:17:40 +00:00
Kamil Hornicek
5fd8a2eae0 - sync wined3d with wine
svn path=/trunk/; revision=37957
2008-12-09 12:16:19 +00:00
Christoph von Wittich
185cda7129 SeUnsolicitedInputPrivilege is obsolete - the LUID is used by SE_MACHINE_ACCOUNT_PRIVILEGE now
svn path=/trunk/; revision=37955
2008-12-09 08:33:26 +00:00
Christoph von Wittich
cb7b9ef083 sync CreateWellKnownSid with wine
svn path=/trunk/; revision=37954
2008-12-09 07:09:25 +00:00
James Tabor
f785412af3 - Fixed build.
svn path=/trunk/; revision=37953
2008-12-09 06:05:29 +00:00
James Tabor
87e41ba6e7 - Add CP_UNIXCP for CP_ACP, this will help cross tests.
svn path=/trunk/; revision=37952
2008-12-09 05:58:23 +00:00
James Tabor
cf7857d09f - New patch by hto: Suspicious code in User32.dll, see bug 3935.
svn path=/trunk/; revision=37951
2008-12-09 01:40:37 +00:00
Johannes Anderwald
0bfc5f6d4d - implement IServiceGroup interface
- implement PcNewServiceGroup

svn path=/trunk/; revision=37950
2008-12-08 23:30:16 +00:00
Colin Finck
678aeae6f0 Revert r37916 and add some correct tests for WC_NO_BEST_FIT_CHARS, which pass under Windows XP SP3.
They show that our implementation still has some bugs here and there.

svn path=/trunk/; revision=37947
2008-12-08 22:18:50 +00:00
Johannes Anderwald
c28aa247f6 - Partly implement PcRegisterIoTimeout, PcUnregisterIoTimeout
svn path=/trunk/; revision=37946
2008-12-08 21:42:44 +00:00
Johannes Anderwald
6fe59166a1 - Implement IResourceList_AddEntryFromParent
- Implement PcNewResourceSublist

svn path=/trunk/; revision=37945
2008-12-08 20:18:02 +00:00
Gregor Schneider
e9c0e48377 - IntGetDeviceGammaRamp: remove unneeded code, i * 256 is always smaller than 65535 (255*256=65280 is the biggest value), CID 35
- IntSetDeviceGammaRamp: don't copy data to NULL buffer, CID 195

svn path=/trunk/; revision=37944
2008-12-08 19:44:13 +00:00
Johannes Anderwald
e20af6d632 - Experimental IInterrupt object implementation
svn path=/trunk/; revision=37943
2008-12-08 19:08:07 +00:00
Johannes Anderwald
1972995045 - Add IID_IInterruptSync
svn path=/trunk/; revision=37942
2008-12-08 19:06:15 +00:00
Gregor Schneider
fb604382b6 Fix two duplicate checks - obviously copy/pasted, CIDs 74 and 75
svn path=/trunk/; revision=37941
2008-12-08 17:02:19 +00:00
Gregor Schneider
866e5d59a0 - Remove unreachable code, CID 53
- Simplify parameter checks, fix return value, set last error correctly, fix typo

svn path=/trunk/; revision=37940
2008-12-08 16:27:28 +00:00
Christoph von Wittich
8019ca7330 fix ConvertStringSidToSidW
svn path=/trunk/; revision=37939
2008-12-08 15:51:53 +00:00
Stefan Ginsberg
e03e004690 - 'STATIC' -> 'static'
svn path=/trunk/; revision=37936
2008-12-08 13:33:44 +00:00
Aleksey Bragin
68eb71cda7 - Move KeQueryRuntimeThread declaration to winddk.h (spotted by Stefan Ginsberg).
svn path=/trunk/; revision=37935
2008-12-08 13:13:36 +00:00
Aleksey Bragin
7b11a5fcdb - Implement KeQueryRuntimeProcess for querying total user/kernel times of a process.
- Use it for obtaining idle process times, and per-process information in QuerySystemInformation routines.
- Fix incorrect multiplier being applied to user/kernel times (should be KeMaximumIncrement instead of 100000).
- Slightly rework SystemProcessorPerformanceInformation to provide valid data.
- This fixed a bug existing since revision 24148, 2 years ago.
See issue #2329 for more details.

svn path=/trunk/; revision=37934
2008-12-08 12:57:53 +00:00
James Tabor
0e162bfb0b - Please dont break functionality due to a compiler problem, just fix it.
svn path=/trunk/; revision=37928
2008-12-08 07:57:18 +00:00
James Tabor
cbe31af1b2 - Patch by hto: Suspicious code in User32.dll, see bug 3935.
svn path=/trunk/; revision=37922
2008-12-08 03:34:22 +00:00
Dmitry Gorbachev
c63a203efa Put inline functions into header files.
svn path=/trunk/; revision=37921
2008-12-07 23:40:23 +00:00
Dmitry Gorbachev
cdbca12bbb Remove WINVER, committed in r37916.
svn path=/trunk/; revision=37920
2008-12-07 22:03:22 +00:00
Dmitry Gorbachev
32580ec32a Silence GCC warnings.
svn path=/trunk/; revision=37919
2008-12-07 21:52:22 +00:00
Dmitry Gorbachev
2772b79efd Remove stray semicolon, change indentation.
svn path=/trunk/; revision=37918
2008-12-07 21:49:30 +00:00
Dmitry Gorbachev
309ea97e6c Add missing parentheses.
svn path=/trunk/; revision=37917
2008-12-07 21:48:44 +00:00
Dmitry Gorbachev
a6d6868c53 Use WC_NO_BEST_FIT_CHARS flag for WideCharToMultiByte(). Bug #3903.
svn path=/trunk/; revision=37916
2008-12-07 21:46:16 +00:00
Danny Götte
1066d824f5 * code cleanup
* some bugfixes

svn path=/branches/danny-web/; revision=37915
2008-12-07 20:26:48 +00:00
Stefan Ginsberg
cdb295c734 - Change more ASSERT(FALSE) to KeBugCheck(MEMORY_MANAGEMENT) so it dies on release build too
svn path=/trunk/; revision=37914
2008-12-07 18:05:28 +00:00
Gregor Schneider
2c22befead - Fix drawing the status bar over the play cards, happened if no status bar was specified on sol startup (Win and ROS behavior); the bar has to be created to get the coords right - so we'll just hide it if we don't need it (like it's done when toggling status bar visibility in options)
- Additional cleanup by Roel Messiant, <roelmessiant AT gmail DOT com>:
- Replace the default options magic value by the proper constant
- Status bar height was being set wrong, but the system's constraint was fixing this behind the screens
- See bugs #3336 and #3820 for more info

svn path=/trunk/; revision=37913
2008-12-07 18:04:56 +00:00
Timo Kreuzer
be0e9fd9c7 Merge 34758, 34771, 34786, 34787, 34906, 35826, 36174, 36274, 36444, 36445, 36446, 36447, 36448, 36477, 36511, 36898, 36903 from amd64 branch
svn path=/trunk/; revision=37910
2008-12-07 12:11:46 +00:00
Eric Kohl
467aff9230 - Introduce a common header file.
- Use Wine-style debug code everywhere.

svn path=/trunk/; revision=37906
2008-12-06 21:33:49 +00:00
Aleksey Bragin
5abd794cd0 - Fix a potential case of non-paged pool memory double freeing. Spotted by Michael Martin.
svn path=/trunk/; revision=37905
2008-12-06 19:35:54 +00:00
Timo Kreuzer
d610c156c6 - move CONTEXT stuff from wdm.h to winddk.h / armddk.h
- inlcude intrin.h in wdm.h
- avoid redefining PCONTEXT
- use intrinsics for BitScanForward/Reverse

svn path=/trunk/; revision=37902
2008-12-06 18:31:33 +00:00
Timo Kreuzer
72d7ea8bc3 rename section "init" to "INIT", so that pefixup will actually recognize it
svn path=/trunk/; revision=37901
2008-12-06 18:25:06 +00:00
Aleksey Bragin
12376e5bfa - Implement IoGetRemainingStackSize.
svn path=/trunk/; revision=37900
2008-12-06 14:59:11 +00:00
Aleksey Bragin
3cf14110c4 - Add missing function declarations.
svn path=/trunk/; revision=37899
2008-12-06 14:52:16 +00:00
Aleksey Bragin
fd38a91b3a - Merge Pierre's changes to ntifs.h from the branch, with my edits.
- Remove a duplicate structure which does not exist in official ntifs.h.
- Fix a typo in PNOTIFY_SYNC declaration.

svn path=/trunk/; revision=37898
2008-12-06 14:36:03 +00:00
Hervé Poussineau
2a8bf4162a Fix a race condition between umpnpmgr service and CMP_WaitNoPendingInstallEvents API.
svn path=/trunk/; revision=37894
2008-12-06 12:54:24 +00:00
Dmitry Chapyshev
1a716522d1 - Add localui from Wine
- Add baseaddress for localui
- Add localui to bootcd

svn path=/trunk/; revision=37893
2008-12-06 12:09:14 +00:00
Dmitry Chapyshev
52ce98d5ec - Update headers
- Add more stubs for winspool

svn path=/trunk/; revision=37892
2008-12-06 11:18:08 +00:00
Eric Kohl
b7903f6d19 Replace call to ExtractIconExW (shell32.dll) by a call to PrivateExtractIconExw (user32.dll) and remove shell32.dll from the list of linked libraries because shell32.dll requires a valid user account upon initialization.
Please remember: Don't use high-level DLLs in low-level components (dll or exe)!!!!

svn path=/trunk/; revision=37891
2008-12-06 11:13:50 +00:00
Aleksey Bragin
fa01d268d4 - Add reserved reparse tags definitions.
svn path=/trunk/; revision=37890
2008-12-06 11:05:21 +00:00
Dmitry Chapyshev
6928b46129 .def -> .spec
svn path=/trunk/; revision=37888
2008-12-06 10:28:06 +00:00
Dmitry Chapyshev
acb0743239 - Sync mlang with Wine 1.1.10
svn path=/trunk/; revision=37885
2008-12-06 09:39:38 +00:00
Dmitry Chapyshev
6bf0881196 - Sync gdiplus wine tests
svn path=/trunk/; revision=37883
2008-12-06 09:26:52 +00:00
Dmitry Chapyshev
5efd259091 - Sync headers with Wine head
- Sync gdiplus with Wine head

svn path=/trunk/; revision=37882
2008-12-06 09:26:01 +00:00
Dmitry Chapyshev
5947224729 - Add CFSTR_SHELLIDLISTA
svn path=/trunk/; revision=37877
2008-12-06 09:10:05 +00:00
Dmitry Chapyshev
336ef53fac - Implement SetupInstallFileA/W
- Stub implement SetupPromptForDiskA/W
All from Wine.

svn path=/trunk/; revision=37876
2008-12-06 09:07:05 +00:00
Timo Kreuzer
1f8539a65e fix FIELD_OFFSET macro
svn path=/trunk/; revision=37866
2008-12-05 12:10:31 +00:00
Timo Kreuzer
8156dcd959 fix x64 definition of __readmsr()
svn path=/trunk/; revision=37865
2008-12-05 12:00:39 +00:00
Danny Götte
169fe0e8b0 * add a new database layout
* convert all queries to the new layout
* rewrite/simplify database layout dependent code
* introduce new bugs :)

svn path=/branches/danny-web/; revision=37863
2008-12-04 22:38:13 +00:00
Eric Kohl
7366e052b4 Sync to wine-1.1.4:
- Rob Shearman <robertshearman@gmail.com> Tue, 26 Aug 2008
widl: Raise RPC_X_SS_IN_NULL_CONTEXT exception for NULL in-only context handles instead of RPC_X_NULL_REF_PTR.

Based on a patch by Michael Martin.

- Alexandre Julliard <julliard@winehq.org> Sat, 30 Aug 2008
widl: Replace write_name() by get_name() to make the code more readable.

- Dan Hipschman <dsh@linux.ucla.edu> Tue, 2 Sep 2008
widl: Output NULL for inherited methods in the vtbl.

svn path=/trunk/; revision=37862
2008-12-04 21:22:42 +00:00
KJK::Hyperion
31b83f59b6 modified tools/rbuild/backend/mingw/modulehandler.cpp
DWARF debugging information confuses rsym, and DWARF-2 information from internal libraries (like libgcc) results in huge executables that don't even run on Windows. Therefore, before the rsym phase, strip all DWARF-2 sections
   This is a HACK for gcc builds compiled with DWARF-2 symbols (e.g. 4.3.2-tdm-1). The real solution (to be implemented soon) is to parse DWARF-2 line numbers in rsym
   Amendment to r37851: use objcopy instead of strip because strip gets us more than we bargained for, and strips all debug information too

modified   tools/rsym.c
   Don't overrun a heap block when there are discarded relocations

svn path=/trunk/; revision=37861
2008-12-04 21:13:43 +00:00
Eric Kohl
599818849a Sync to wine-1.1.3:
- Dan Hipschman <dsh@linux.ucla.edu> Thu, 7 Aug 2008
widl: Honor typedef pointer attributes.

svn path=/trunk/; revision=37860
2008-12-04 20:20:08 +00:00
Eric Kohl
f12d11b4f7 Sync to wine-1.1.1 (Patch 10 of 10):
- Alexandre Julliard <julliard@winehq.org> Mon, 7 Jul 2008
Add noinput directive to all lex files to avoid a compiler warning.

svn path=/trunk/; revision=37859
2008-12-04 19:52:55 +00:00
Eric Kohl
663337847e Sync to wine-1.1.1 (Patch 9 of 10):
- Alexandre Julliard <julliard@winehq.org> Mon, 7 Jul 2008
widl: Fix a couple of uninitialized variable compiler warnings.

svn path=/trunk/; revision=37858
2008-12-04 19:37:53 +00:00
Timo Kreuzer
25105f9fec fix some ULONG/ULONG_PTR issues
svn path=/trunk/; revision=37857
2008-12-04 19:08:55 +00:00
KJK::Hyperion
45f6b70b73 Undo r37851 because rsym sucks
svn path=/trunk/; revision=37856
2008-12-04 19:01:50 +00:00
Johannes Anderwald
b355317137 - Implement PcGetDeviceProperty, PcGetTimeInterval
- Stub interfaces of IDmaChannel, IDmaChannelSlave
- Stub IMiniport adapters IMiniportDMus
- Stub IPort drivers (IPortDMus, IPortMidi, IPortTopology, IPortWaveCyclic, IPortWavePci)
- Implement IRegistryKey interface
- Enhance IResource interface

svn path=/trunk/; revision=37855
2008-12-04 18:43:42 +00:00
Gregor Schneider
ea4870e585 Free allocated resource on error, CID 1358.
svn path=/trunk/; revision=37853
2008-12-04 16:46:54 +00:00
Johannes Anderwald
d27e3fc707 - Add interfaces for IMasterClock, IMXF, IAllocatorMXF, IPortDMus, IMiniportDMus
svn path=/trunk/; revision=37852
2008-12-04 16:29:56 +00:00
KJK::Hyperion
0e80776aff DWARF debugging information confuses rsym, and DWARF-2 information from internal libraries (like libgcc) results in huge executables that don't even run on Windows. Therefore, before the rsym phase, strip all DWARF-2 sections
This is a HACK for gcc builds compiled with DWARF-2 symbols (e.g. 4.3.2-tdm-1). The real solution (to be implemented soon) is to parse DWARF-2 line numbers in rsym

svn path=/trunk/; revision=37851
2008-12-04 16:09:26 +00:00
KJK::Hyperion
bf1d153d93 modified lib/3rdparty/mingw/main.c
Make -Wno-main redundant

modified   tools/rbuild/backend/mingw/modulehandler.cpp
   -Wno-main now redundant

svn path=/trunk/; revision=37850
2008-12-04 15:49:47 +00:00
Stefan Ginsberg
54e241e287 - Don't cache a value if we might dereference NULL
- Fix for CID 653

svn path=/trunk/; revision=37848
2008-12-04 15:15:01 +00:00
Stefan Ginsberg
529ad41347 - Fix some redefinitions
svn path=/trunk/; revision=37846
2008-12-04 14:11:57 +00:00
Aleksey Bragin
d085625992 - WDK defines PNOTIFY_SYNC as a pointer to VOID.
svn path=/trunk/; revision=37845
2008-12-04 14:01:50 +00:00
Aleksey Bragin
8c52058f73 - Fix FsRtlFastCheckLockForRead and Write function prototypes.
svn path=/trunk/; revision=37843
2008-12-04 11:12:42 +00:00
Johannes Anderwald
2242fa6da1 - Add CLSIDs for Miniport drivers
- Add IIDs for IResourceList, IRegistryKey
- Add IMiniportWaveCyclicStream, IMiniportWaveCyclic interface 

svn path=/trunk/; revision=37842
2008-12-04 08:44:17 +00:00
Dmitry Gorbachev
987313245b Fix them second time.
svn path=/trunk/; revision=37841
2008-12-04 00:55:15 +00:00
Dmitry Gorbachev
5bbb02373a Fix Ke386Get(Global|Local|Interrupt)DescriptorTable, Ke386GetTr.
svn path=/trunk/; revision=37840
2008-12-03 22:24:29 +00:00
Dmitry Gorbachev
9791da2e85 Trying to fix...
svn path=/trunk/; revision=37839
2008-12-03 18:04:26 +00:00
Dmitry Gorbachev
d633d025d8 Slovak patch by Mario Kacmar aka Kario (bug #3934).
svn path=/trunk/; revision=37838
2008-12-03 17:52:24 +00:00
Dmitry Gorbachev
a8089cfb97 Fix Unicode -> Multibyte conversion (bug #3903).
svn path=/trunk/; revision=37836
2008-12-03 17:40:49 +00:00
Dmitry Gorbachev
774b7483da Remove stray semicolons, GCC gratias.
svn path=/trunk/; revision=37835
2008-12-03 17:39:55 +00:00
Dmitry Gorbachev
c920f222c0 Fix GCC complaints about uninitialized variables (bug #3912).
svn path=/trunk/; revision=37834
2008-12-03 17:38:56 +00:00
Dmitry Gorbachev
5bc250cc36 Silence compiler warnings (11/11).
svn path=/trunk/; revision=37833
2008-12-03 17:37:58 +00:00
Dmitry Gorbachev
e1f79c3b49 Silence compiler warnings (10/11).
svn path=/trunk/; revision=37832
2008-12-03 17:37:23 +00:00
Dmitry Gorbachev
b3597def85 Silence compiler warnings (9/11).
svn path=/trunk/; revision=37831
2008-12-03 17:36:23 +00:00
Dmitry Gorbachev
7e3410d2b3 Silence compiler warnings (8/11).
svn path=/trunk/; revision=37830
2008-12-03 17:34:49 +00:00
Dmitry Gorbachev
ff091bdac5 Silence compiler warnings (7/11).
svn path=/trunk/; revision=37829
2008-12-03 17:33:13 +00:00
Dmitry Gorbachev
120359ef8e Silence compiler warnings (6/11).
svn path=/trunk/; revision=37828
2008-12-03 17:32:36 +00:00
Dmitry Gorbachev
620e4cad34 Silence compiler warnings (5/11).
svn path=/trunk/; revision=37827
2008-12-03 17:31:38 +00:00
Dmitry Gorbachev
ebaf0cf88c Silence compiler warnings (4/11).
svn path=/trunk/; revision=37826
2008-12-03 17:29:38 +00:00
Dmitry Gorbachev
d202dab4fa Silence compiler warnings (3/11).
svn path=/trunk/; revision=37825
2008-12-03 17:28:59 +00:00
Dmitry Gorbachev
44c8aa557c Silence compiler warnings (2/11).
svn path=/trunk/; revision=37824
2008-12-03 17:28:33 +00:00
Dmitry Gorbachev
5148a03069 Silence compiler warnings (1/11).
svn path=/trunk/; revision=37823
2008-12-03 17:28:24 +00:00
Stefan Ginsberg
2220f06c73 - Make imagehlp compile warning free (don't mix Wine and ros debug style, add missing casts)
svn path=/trunk/; revision=37817
2008-12-03 13:05:54 +00:00
Stefan Ginsberg
902da9ebac - Patch by hto: Correct definitions of PSN_* constants
See issue #3925 for more details.

svn path=/trunk/; revision=37816
2008-12-03 12:48:53 +00:00
KJK::Hyperion
d3e2e5e2ca MinGW does have vsnprintf. Fixes a warning in libxml2
Dedicated to Samuel Serapión

svn path=/trunk/; revision=37815
2008-12-02 23:18:25 +00:00
Eric Kohl
4a6ded56dd Sync to wine-1.1.1 (Patch 8 of 10):
- Rob Shearman <robertshearman@gmail.com> Fri, 4 Jul 2008
widl: Remove some unnecessary calls to duptype.

svn path=/trunk/; revision=37814
2008-12-02 21:08:02 +00:00
Eric Kohl
9fcfc6eb1e Sync to wine-1.1.1 (Patch 7 of 10):
- Rob Shearman <robertshearman@gmail.com> Fri, 4 Jul 2008
widl: Rename find_type_helper, find_type and find_type2 to find_type, find_type_error and find_type_error2 respectively.

svn path=/trunk/; revision=37813
2008-12-02 20:45:09 +00:00
Colin Finck
48068dfdd4 Revert r37802, which reverted r37801, which was previously reverted in r37477 reverting r37476.
In other words: Reapply ekohl's widl change part 4, as the Release slave should build it properly now.

svn path=/trunk/; revision=37812
2008-12-02 19:17:32 +00:00
Colin Finck
c00c841bd4 Revert my changes in r37808.
Reenable testing on undefined properties, they are treated as being empty now. This feature got lost when moving the <if> block parsing entirely to rbuild in r34852.

Should fix the Release build properly _with_ touching rbuild :-)

svn path=/trunk/; revision=37811
2008-12-02 19:05:11 +00:00
Daniel Reimer
533570807b RamDRV is not in our tree anymore.
svn path=/trunk/; revision=37809
2008-12-02 15:55:24 +00:00
Colin Finck
61eedb351a KDBG needs DBG to be set, I can't imagine any useful situation for KDBG without DBG.
Change the <if> logic in ReactOS-general.rbuild (and ReactOS-arm.rbuild for the ARM guys) accordingly. This also supersedes DBG_OR_KDBG, which never worked properly for Release builds anyway.

Should fix the Release build without touching rbuild itself :-)

svn path=/trunk/; revision=37808
2008-12-02 11:38:23 +00:00
Daniel Reimer
9bec5399de ByeBye 100 MB Log File. Byebye, 200 kB/s
svn path=/trunk/; revision=37806
2008-12-02 09:08:01 +00:00
Andrew Munger
ed4de66a9b Nevermind, I'd rather have the debug build. Someone fix this correctly, please.
svn path=/trunk/; revision=37805
2008-12-02 08:38:03 +00:00
Andrew Munger
6fa1c22603 "Fix" the release build.
svn path=/trunk/; revision=37804
2008-12-02 08:10:36 +00:00
James Tabor
3f5de2feb4 - Correct the copyright header for path.c. Crediting Dmitry Timoshkov for his great work in the Open Source Software movement.
svn path=/trunk/; revision=37803
2008-12-01 21:38:57 +00:00
Eric Kohl
371bfcc3b2 Revert 37801 because it still breaks the release build.
svn path=/trunk/; revision=37802
2008-12-01 20:38:24 +00:00
Eric Kohl
4b639a0b94 Sync to wine-1.1.1 (Patch 4 of 10):
ATTENTION: You MUST run "clean" before building ReactOS, otherwise WIDL will crash when it is run.

- Dan Hipschman <dsh@linux.ucla.edu> Tue, 1 Jul 2008
widl: Implement type redefinition checks.

This allows widl to catch type redefinitions and report an error, like MIDL.
However, this does a better job than MIDL since it also reports the location of the originial definition, like GCC.

CREDITS: Thanks to Christoph and Martin von Wittich for updating the Release-Buildslave. This patch should now build on both Buildslaves.

svn path=/trunk/; revision=37801
2008-12-01 20:33:43 +00:00
Steven Edwards
69e77bdaf0 Suggest LogonUser/CreateProcessAsUser as a possible
authentication method


svn path=/trunk/; revision=37800
2008-12-01 19:32:22 +00:00
Steven Edwards
f0078accf5 I hope I did not screw up the propset...
Simple telnet daemon, I found, hacked in to a service.
Its wrong, I know, humor me, it works, someone more
interested can finish this off and follow the spec.txt


svn path=/trunk/; revision=37799
2008-12-01 18:34:15 +00:00
Andrew Munger
a8e3000e64 Gimme back mah ftp.
Revert 37791.

svn path=/trunk/; revision=37798
2008-12-01 18:33:55 +00:00
Johannes Anderwald
6d553afec5 - Pass the directory of the file to ShellExecuteExW
svn path=/trunk/; revision=37797
2008-12-01 16:51:59 +00:00
Aleksey Bragin
b4a3a4d8e3 - Don't enable FULL debug output for a module in trunk unless REALLY necessary.
svn path=/trunk/; revision=37796
2008-12-01 16:30:15 +00:00
Stefan Ginsberg
61106bdf73 - Don't redefine PKSYSTEM_ROUTINE
- Don't include x86 headers for all architectures
- Don't use system_header
- Add a note for ARM team

svn path=/trunk/; revision=37795
2008-12-01 16:27:58 +00:00
Danny Götte
6d60b5bdc6 * cleanup css
* restructure some html
* some bugfixes

svn path=/branches/danny-web/; revision=37794
2008-12-01 15:41:28 +00:00
Stefan Ginsberg
9bd2938989 - Remove the remaining system_header from DDK -- this era has now come to an end
svn path=/trunk/; revision=37793
2008-12-01 15:28:54 +00:00
Stefan Ginsberg
6d811e8712 - Get rid of DDK's dependency on windef.h and winnt.h
- Clean up, fix, and add missing types to ntdef.h/ntifs.h/winddk.h/wdm.h/ntpoapi.h
- Add ntimage.h and use it in rossym and NDK
- Fix a gcc compatibility issue -- some internal NT structures have their pointer types defined in the DDK headers, but we define them along with the "struct" type when defining the full structure. MSVC is okay with this double definition, but gcc treats it as an error (hidden by system_header). Only define the "struct" type when declaring the full structure, making it compatible with both compilers.
- Also fix/add some types and header guards in NDK
- Clean up ks/portcls/drmk headers
- Fix incorrect types for some KS APIs (msdn is wrong for these) and add missing header guards
- Also, remove system_header (more of this coming up)

svn path=/trunk/; revision=37792
2008-12-01 15:12:23 +00:00
Johannes Anderwald
53db82f49c - revert 37497
- use FindFirstFileW to obtain to original filename which is passed to CreateProcess
- fixes bug 3875

svn path=/trunk/; revision=37791
2008-12-01 14:57:34 +00:00
Johannes Anderwald
7723cee0b0 fix build
mea culpa

svn path=/trunk/; revision=37790
2008-12-01 14:08:48 +00:00
Johannes Anderwald
6b053be6fe - fix ipconfig output when no nic adapter is present, patch by Lucas Suggs, <anakha AT cat DOT pdx DOT edu>
- bug 3928
- fix a few memory leaks

svn path=/trunk/; revision=37789
2008-12-01 13:54:25 +00:00
James Tabor
1de5c6737b - Patch by hto: User32: MDICascade() bug, see bug 3919.
svn path=/trunk/; revision=37788
2008-12-01 04:57:58 +00:00
James Tabor
27204c5847 - Moved SelectBitmap/Font to their proper places.
- Correct CreateCompatibleBitmap issues, finding more bugs and noted them.
- DibObj.c is a work in progress, needing more love. Managing SEH in a proper manner, fixing the SEH abuse.
- Wine gdi bitmap cross tests looking better, 16 bpp down to 50 faults.
- Need full spectrum testing, I exhausted my test suite so anything will do.


svn path=/trunk/; revision=37784
2008-12-01 00:13:45 +00:00
James Tabor
1af0b46120 - Fixed hooking bug for Firefox, a plus, new SEH found a bug!
svn path=/trunk/; revision=37783
2008-11-30 23:39:20 +00:00
KJK::Hyperion
778dbb0862 Bug closing extravaganza holiday special commit!
modified   base/shell/cmd/ren.c
added      base/shell/cmd/ren.txt
   Correct implementation of "ren" command in cmd
   Patch by Victor Martinez <vicmarcal@hotmail.com>

added      include/crt/mingw32/intrin.h
added      include/crt/mingw32/intrin_arm.h
added      include/crt/mingw32/intrin_ppc.h
added      include/crt/mingw32/intrin_x86.h
added      include/crt/mingw32/intrin_x86_64.h
deleted    include/psdk/intrin.h
deleted    include/psdk/intrin_arm.h
deleted    include/psdk/intrin_ppc.h
deleted    include/psdk/intrin_x86.h
deleted    include/psdk/intrin_x86_64.h
   intrin.h positively IS NOT a PSDK header
   The "a" argument to _bittestandcomplement, _bittestandreset and _bittestandset is an input AND output argument, unlike the argument to _bittest. Move argument to outputs, change constraint to "+mr"
   Spotted by hto

modified   lib/3rdparty/mingw/cpu_features.c
   Stray semicolon
   Patch by hto from Bugzilla

modified   lib/sdk/crt/locale/locale.c
   Missing colon
   Patch by hto from Bugzilla
See issue #3902,3921,3924,3926 for more details.

svn path=/trunk/; revision=37781
2008-11-30 23:08:02 +00:00
KJK::Hyperion
c1338f0192 Default debugging format might not be stabs - pass -gstabs+ instead of -g to gcc. And did you know ld doesn't actually have a -g switch?
_Now_ we can upgrade to gcc 4.3.2
After a suggestion by hto from Bugzilla. Dmitry, start doing your own commits already
See issue #3922 for more details.

svn path=/trunk/; revision=37780
2008-11-30 21:26:04 +00:00
Stefan Ginsberg
eaac85ec75 - Make this shit readable -- oh wait this is a commit message... Clean up indentation a bit.
svn path=/trunk/; revision=37779
2008-11-30 20:12:04 +00:00
KJK::Hyperion
f3818b0b92 Correctly parse the output of gcc --version for TDM builds of gcc. We can now upgrade to gcc 4.3.2
Patch by niski from Bugzilla
See issue #3922 for more details.

svn path=/trunk/; revision=37778
2008-11-30 19:56:43 +00:00
KJK::Hyperion
8eb9176f8b Patch by hto from Bugzilla
See issue #3827 for more details.

svn path=/trunk/; revision=37777
2008-11-30 19:50:25 +00:00
KJK::Hyperion
1bd07ee187 modified include/reactos/probe.h
Workaround for gcc 4.1.3. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7

modified   ntoskrnl/include/internal/mm.h
   gcc 4.3.2 doesn't like to be told to inline MmAcquirePageListLock

modified   ntoskrnl/include/internal/probe.h
   Cleaning up after TSVN's buggy "apply patch"

modified   subsystems/win32/win32k/ntuser/message.c
   Silence a gcc 4.3.2 warning (possibly incorrectly)

modified   dll/directx/ddraw/ddraw.rbuild
modified   dll/win32/gdi32/gdi32.rbuild
modified   dll/win32/kernel32/kernel32.rbuild
modified   dll/win32/psapi/psapi.rbuild
modified   dll/win32/setupapi/setupapi.rbuild
modified   dll/win32/syssetup/syssetup.rbuild
modified   dll/win32/user32/user32.rbuild
modified   drivers/input/kbdclass/kbdclass.rbuild
modified   drivers/input/mouclass/mouclass.rbuild
modified   drivers/network/afd/afd.rbuild
modified   drivers/network/tcpip/tcpip.rbuild
modified   lib/rtl/rtl.rbuild
modified   subsystems/win32/win32k/win32k.rbuild
modified   subsystems/win32/win32k/objects/gdiobj.c
   gcc 4.1.3 workarounds. See embedded comments

modified   base/services/eventlog/eventlog.h
modified   dll/win32/advapi32/advapi32.h
   Removed superfluous includes of pseh/pseh.h

modified   dll/directx/ddraw/Ddraw/ddraw_displaymode.c
modified   dll/directx/ddraw/Ddraw/ddraw_main.c
modified   dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c
modified   dll/directx/ddraw/Ddraw/GetCaps.c
modified   dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c
modified   dll/directx/ddraw/main.c
modified   dll/directx/ddraw/rosdraw.h
modified   dll/directx/ddraw/Surface/surface_main.c
   ddraw migrated to PSEH 2.0

modified   dll/win32/gdi32/include/precomp.h
modified   dll/win32/gdi32/misc/misc.c
modified   dll/win32/gdi32/objects/bitmap.c
   gdi32 migrated to PSEH 2.0

modified   dll/win32/kernel32/except/except.c
modified   dll/win32/kernel32/file/find.c
modified   dll/win32/kernel32/k32.h
modified   dll/win32/kernel32/mem/isbad.c
modified   dll/win32/kernel32/misc/console.c
modified   dll/win32/kernel32/process/procsup.c
modified   dll/win32/kernel32/string/lstring.c
modified   dll/win32/kernel32/thread/thread.c
   kernel32 migrated to PSEH 2.0

modified   dll/win32/psapi/precomp.h
modified   dll/win32/psapi/psapi.c
   psapi migrated to PSEH 2.0

modified   dll/win32/setupapi/cfgmgr.c
modified   dll/win32/setupapi/setupapi_private.h
   setupapi migrated to PSEH 2.0

modified   dll/win32/syssetup/wizard.c
   syssetup migrated to PSEH 2.0

modified   dll/win32/user32/include/user32.h
modified   dll/win32/user32/windows/class.c
modified   dll/win32/user32/windows/text.c
modified   dll/win32/user32/windows/window.c
   user32 migrated to PSEH 2.0

modified   drivers/input/kbdclass/kbdclass.c
modified   drivers/input/kbdclass/kbdclass.h
   kbdclass migrated to PSEH 2.0

modified   drivers/input/mouclass/mouclass.c
modified   drivers/input/mouclass/mouclass.h
   mouclass migrated to PSEH 2.0

modified   drivers/network/afd/afd/info.c
modified   drivers/network/afd/afd/lock.c
modified   drivers/network/afd/afd/tdi.c
modified   drivers/network/afd/afd/tdiconn.c
   afd migrated to PSEH 2.0

modified   drivers/network/lan/lan/lan.c
   lan migrated to PSEH 2.0

modified   drivers/network/tcpip/tcpip/dispatch.c
   tcpip migrated to PSEH 2.0

modified   lib/rtl/debug.c
modified   lib/rtl/res.c
modified   lib/rtl/rtl.h
modified   lib/rtl/unicode.c
modified   lib/rtl/workitem.c
   rtl migrated to PSEH 2.0

modified   ntoskrnl/include/precomp.h
   ntoskrnl migrated to PSEH 2.0

modified   subsystems/csr/csrsrv/api.c
   csrsrv migrated to PSEH 2.0

modified   subsystems/win32/win32k/eng/bitblt.c
modified   subsystems/win32/win32k/eng/mem.c
modified   subsystems/win32/win32k/include/mmcopy.h
modified   subsystems/win32/win32k/misc/copy.c
modified   subsystems/win32/win32k/ntuser/callback.c
modified   subsystems/win32/win32k/ntuser/class.c
modified   subsystems/win32/win32k/ntuser/clipboard.c
modified   subsystems/win32/win32k/ntuser/cursoricon.c
modified   subsystems/win32/win32k/ntuser/display.c
modified   subsystems/win32/win32k/ntuser/hook.c
modified   subsystems/win32/win32k/ntuser/input.c
modified   subsystems/win32/win32k/ntuser/kbdlayout.c
modified   subsystems/win32/win32k/ntuser/menu.c
modified   subsystems/win32/win32k/ntuser/misc.c
modified   subsystems/win32/win32k/ntuser/ntstubs.c
modified   subsystems/win32/win32k/ntuser/painting.c
modified   subsystems/win32/win32k/ntuser/simplecall.c
modified   subsystems/win32/win32k/ntuser/sysparams.c
modified   subsystems/win32/win32k/ntuser/window.c
modified   subsystems/win32/win32k/objects/bitblt.c
modified   subsystems/win32/win32k/objects/bitmaps.c
modified   subsystems/win32/win32k/objects/brush.c
modified   subsystems/win32/win32k/objects/cliprgn.c
modified   subsystems/win32/win32k/objects/color.c
modified   subsystems/win32/win32k/objects/coord.c
modified   subsystems/win32/win32k/objects/dc.c
modified   subsystems/win32/win32k/objects/dcutil.c
modified   subsystems/win32/win32k/objects/dibobj.c
modified   subsystems/win32/win32k/objects/fillshap.c
modified   subsystems/win32/win32k/objects/font.c
modified   subsystems/win32/win32k/objects/freetype.c
modified   subsystems/win32/win32k/objects/icm.c
modified   subsystems/win32/win32k/objects/line.c
modified   subsystems/win32/win32k/objects/path.c
modified   subsystems/win32/win32k/objects/pen.c
modified   subsystems/win32/win32k/objects/print.c
modified   subsystems/win32/win32k/objects/region.c
modified   subsystems/win32/win32k/objects/text.c
modified   subsystems/win32/win32k/pch.h
   win32k migrated to PSEH 2.0

svn path=/trunk/; revision=37776
2008-11-30 19:28:11 +00:00
Gregor Schneider
959c8b42a8 Update C++ demangle code to recent wine, now all msvcrt cpp tests pass except one.
svn path=/trunk/; revision=37774
2008-11-30 19:19:45 +00:00
Daniel Reimer
d1dc58212a ... by Seungju Kim
svn path=/trunk/; revision=37773
2008-11-30 19:03:24 +00:00
Daniel Reimer
4f08ac6baf Bug 3890: updated a few slovak translations by Mario Kacmar
Bug 3915: Korean translation of Dxdiag by 

svn path=/trunk/; revision=37772
2008-11-30 19:00:01 +00:00
Daniel Reimer
866fed8490 Bug 3890: updated a few slovak translations by Mario Kacmar
svn path=/trunk/; revision=37771
2008-11-30 18:40:11 +00:00
Stefan Ginsberg
ca22a1b844 - Replace the last instances of STDCALL with WINAPI/NTAPI -- this non-standard specifier is now completely deprecated. Now the healing can begin.
svn path=/trunk/; revision=37769
2008-11-30 13:46:35 +00:00
Stefan Ginsberg
8ddb21a39c - Remove straggler STDCALL
svn path=/trunk/; revision=37768
2008-11-30 13:28:04 +00:00
James Tabor
41f45acf3f - Sync in rev 37720: Magnus Olsen, add GdiGetBitmapBitsSize is a new api from windows xp sp3, the code was tested in vs2003. part II
svn path=/trunk/; revision=37767
2008-11-30 13:17:52 +00:00
James Tabor
b92cf193fb - Sync in rev 37720: Magnus Olsen, add GdiGetBitmapBitsSize is a new api from windows xp sp3, the code was tested in vs2003.
svn path=/trunk/; revision=37766
2008-11-30 13:17:19 +00:00
Gregor Schneider
dbdbfd482e Updated polish translation by Olaf Siejka, <olaf_siejka AT o2 DOT pl>
svn path=/trunk/; revision=37765
2008-11-30 12:52:07 +00:00
Gregor Schneider
b0c0e3857d - Add dialog to deal cards again after winning solitaire, fixes the winning infinitely bug
- Patch by Lucas Suggs, <anakha AT cat DOT pdx DOT edu>
- I modified indentation, added german translation, added English strings to all other languages - work for the translators
- See bug #3288 for more information

svn path=/trunk/; revision=37764
2008-11-30 12:09:36 +00:00
Stefan Ginsberg
32545494d9 - Go away STDCALL, time has come for WINAPI and NTAPI
svn path=/trunk/; revision=37763
2008-11-30 11:42:05 +00:00
Stefan Ginsberg
b137725c9a - Kill off more STDCALL
svn path=/trunk/; revision=37762
2008-11-30 11:16:55 +00:00
Stefan Ginsberg
2bafd1ffc3 - No need to include winddk.h, ntddk.h includes it for us
svn path=/trunk/; revision=37761
2008-11-30 10:10:19 +00:00
Art Yerkes
4196ecf39b fix a bug reported by aicom: get peer name fails running xitami web server
svn path=/trunk/; revision=37759
2008-11-30 08:26:52 +00:00
KJK::Hyperion
adeaeb06b1 Left out of the previous commit by mistake
svn path=/trunk/; revision=37758
2008-11-30 06:00:58 +00:00
KJK::Hyperion
feee728349 modified base/shell/explorer/explorer.rbuild
The TDM build of gcc 4.3.2 is affected by PR 27067 (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27067), apparently due to a missing MinGW-only patch - work around it in the linker

modified   dll/directx/ddraw/d3d/DirectD3D_main.c
modified   dll/directx/ddraw/Ddraw/ddraw_displaymode.c
modified   dll/directx/ddraw/Ddraw/ddraw_main.c
modified   dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c
modified   dll/directx/ddraw/Ddraw/GetCaps.c
modified   dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c
modified   dll/directx/ddraw/main.c
modified   dll/directx/ddraw/Surface/createsurface.c
   <pseh/pseh.h> already included in rosdraw.h

modified   dll/win32/advapi32/misc/trace.c
   Silence a warning reported by gcc 4.3.2 (possibly incorrectly, but it's just a stub anyway)

modified   ntoskrnl/include/internal/ntoskrnl.h
added      ntoskrnl/include/internal/probe.h
replaced   ntoskrnl/include/ntoskrnl.h
added      ntoskrnl/include/precomp.h
modified   ntoskrnl/ntoskrnl-generic.rbuild
added      subsystems/win32/win32k/pch.h
replaced   subsystems/win32/win32k/w32k.h
modified   subsystems/win32/win32k/win32k.rbuild
   gcc 4.3.2-tdm-1 doesn't like PSEH in precompiled headers. Shuffle things around a bit to remove PSEH from precompiled headers

svn path=/trunk/; revision=37757
2008-11-30 05:49:18 +00:00
Stefan Ginsberg
b43e021fa7 - Relying on includers to define certain macros is an awesome idea -- sustain this practice for a little while
svn path=/trunk/; revision=37756
2008-11-29 23:34:39 +00:00
Stefan Ginsberg
37ba4af619 - Deprecate STDCALL from HAL
svn path=/trunk/; revision=37755
2008-11-29 23:16:39 +00:00
Stefan Ginsberg
f5091d00cd - Don't use DDKAPI either
svn path=/trunk/; revision=37754
2008-11-29 23:15:54 +00:00
Sylvain Petreolle
36859720df add missing parenthesis in utf16le
svn path=/trunk/; revision=37753
2008-11-29 23:11:14 +00:00
Stefan Ginsberg
ef394b196f - Less STDCALL, more WINAPI/NTAPI/APIENTRY
svn path=/trunk/; revision=37752
2008-11-29 22:48:58 +00:00
Stefan Ginsberg
3dd74720b7 - STDCALL strikes back
svn path=/trunk/; revision=37751
2008-11-29 21:42:41 +00:00
Stefan Ginsberg
a153517e86 - Hey STDCALL, you just got deprecated from rostests
svn path=/trunk/; revision=37750
2008-11-29 21:37:54 +00:00
Stefan Ginsberg
5cbe280085 - Welcome to rosapps NTAPI/WINAPI, farewell STDCALL
svn path=/trunk/; revision=37749
2008-11-29 21:23:45 +00:00
Stefan Ginsberg
256458f8ad - <@silverblade> it does nothing, it can be destroyed. -- Goodbye avtest, no one will miss you
svn path=/trunk/; revision=37748
2008-11-29 21:19:34 +00:00
Stefan Ginsberg
8ad61b6d08 - Don't generate a function with non-standard STDCALL -- WINAPI works great, I promise.
svn path=/trunk/; revision=37747
2008-11-29 21:01:42 +00:00
Gregor Schneider
023baca726 - Improve parameter checks to prevent access beyond array boundaries
- Patch by Daniel Zimmermann, <netzimme AT aim DOT com>
- Bug #3913, CIDs 595-598

svn path=/trunk/; revision=37746
2008-11-29 21:01:14 +00:00
Stefan Ginsberg
165bfe865b - STDCALL -> NTAPI
svn path=/trunk/; revision=37745
2008-11-29 20:47:48 +00:00
Gregor Schneider
4de7f1ccff - Fix two possible memory leaks by freeing resources
- Patch by Daniel Zimmermann, <netzimme AT aim DOT com>
- Bug #3911, CIDs 607 and 608

svn path=/trunk/; revision=37744
2008-11-29 20:30:18 +00:00
Stefan Ginsberg
0f123895c2 - Remove system_header
svn path=/trunk/; revision=37743
2008-11-29 20:17:45 +00:00
Stefan Ginsberg
6bfd12deec - STDCALL -> NTAPI
svn path=/trunk/; revision=37742
2008-11-29 20:14:45 +00:00
Gregor Schneider
a8e8a546b6 - Updated msvcrt winetests introduced new printf testcases and new failures - fixed:
- Special qualifiers with short gG formats may even skip all decimal digits, but the separator is applied nonetheless
- Padding spaces on the right caused problems in exponential format, because those are split into two parts, the padding was done in between
- Failing fwprintf test was removed from the tests, so the printf test is passed completely now

svn path=/trunk/; revision=37740
2008-11-29 19:39:53 +00:00
Stefan Ginsberg
c47ab26e82 - Kill off ramdrv, it is deprecated since a long time ago.
See issue #3422 for more details.

svn path=/trunk/; revision=37739
2008-11-29 19:35:04 +00:00
Gregor Schneider
67ac3637f8 Update msvcrt winetest, test_codepage still disabled as before
svn path=/trunk/; revision=37736
2008-11-29 19:18:59 +00:00
Gregor Schneider
6c677fe4e5 - Added support for floating point and exponential formats to *printf functions
- Based on the tools/ssprintf.cpp implementation, ported to C with changes made to comply with msvcrt behaviour
- Reduces msvcrt winetest printf failure from 13 down to 1 - same failure as WinXP
- Related bugs: bug #1533, bug #3727, bug #3878

svn path=/trunk/; revision=37734
2008-11-29 17:07:09 +00:00
Aleksey Bragin
9c90984e71 - Implement ScsiPortCompleteRequest based on OSR description.
See issue #3025 for more details.

svn path=/trunk/; revision=37732
2008-11-29 16:24:29 +00:00
Dmitry Chapyshev
fcefc86234 - Fix build
svn path=/trunk/; revision=37726
2008-11-29 12:57:50 +00:00
Dmitry Chapyshev
17e26906df - DPRINT1(...); -> UNIMPLEMENTED;
svn path=/trunk/; revision=37725
2008-11-29 12:49:08 +00:00
James Tabor
a919cea8f4 - Fix GetSystemPaletteEntries.
svn path=/trunk/; revision=37723
2008-11-29 11:31:40 +00:00
Stefan Ginsberg
96c69be3d6 - guiddef.h: Don't define GUID_NULL as extern as the official header set doesn't do this. Also, it causes conflicts under some circumstances.
- regstr.h: Add missing _IN_KERNEL_ guard
- rpcndr.h: Don't use the DWORD type
- windef.h: Add missing types, and put some under the BASETYPES guard
- winnt.h: Don't define types which should be in windef.h
- winuser.h: Correct KEYBOARD_OVERRUN_MAKE_CODE declaration, add missing NOWINDOWSTATION guard
- ntgdityp.h: Fix header guard for "FIX" type declaration

svn path=/trunk/; revision=37721
2008-11-29 10:49:36 +00:00
Stefan Ginsberg
f584500e5a - MSFS: Don't rely on PSDK headers for MAILSLOT_NO_MESSAGE/MAILSLOT_WAIT_FOREVER
svn path=/trunk/; revision=37719
2008-11-29 10:26:47 +00:00
Stefan Ginsberg
5e41c16d16 - Don't redefine basic types
svn path=/trunk/; revision=37718
2008-11-29 10:22:57 +00:00
Cameron Gutman
28d4b20129 - Fix behavior of kernel APCs interrupting waits on gate objects. Patch by Alex Ionescu.
svn path=/trunk/; revision=37714
2008-11-29 02:57:21 +00:00
Cameron Gutman
ffb80a044e - Merge aicom-network-fixes up to r37712
svn path=/trunk/; revision=37713
2008-11-29 01:51:19 +00:00
Stefan Ginsberg
c7649d342c - Don't add an include path for internal win32k headers as dxg doesn't include them anymore
svn path=/trunk/; revision=37711
2008-11-28 20:26:25 +00:00
Stefan Ginsberg
da6926f487 - Add a header guard for pnp.idl's RESOURCEID, and add an internal define for setupapi as it uses incompatible Wine headers
svn path=/trunk/; revision=37710
2008-11-28 20:24:36 +00:00
Stefan Ginsberg
031931d95a - Use stdarg.h from psdk so we don't get redefinition conflicts
svn path=/trunk/; revision=37709
2008-11-28 20:18:13 +00:00
Stefan Ginsberg
701ac31a4b - Add a missing define -- fixes DECLARE_INTERFACE and everything related for kernel mode
svn path=/trunk/; revision=37707
2008-11-28 18:24:30 +00:00
KJK::Hyperion
1e97173782 GCC 4.3 correctly aligns stack-allocated objects
Patch by "hto", from bugzilla
See issue #3608 for more details.

svn path=/trunk/; revision=37706
2008-11-28 14:47:19 +00:00
KJK::Hyperion
e18cdbe06b Don't let ASSERT_SRW_WAITBLOCK evaluate to nothing - make it evaluate to (void)0, like ASSERT would
See issue #3608 for more details.

svn path=/trunk/; revision=37705
2008-11-28 14:38:41 +00:00
KJK::Hyperion
b4e5e64c26 ASSERT really needs to be void, despite what DDK headers might say. Fixes following warning:
lib\rtl\srw.c: In function 'RtlAcquireSRWLockShared':
lib\rtl\srw.c:498: error: statement with no effect
lib\rtl\srw.c: In function 'RtlAcquireSRWLockExclusive':
lib\rtl\srw.c:637: error: statement with no effect
lib\rtl\srw.c:668: error: statement with no effect
lib\rtl\srw.c:696: error: statement with no effect
See issue #3922 for more details.

svn path=/trunk/; revision=37704
2008-11-28 14:33:21 +00:00
KJK::Hyperion
06dbf1acc4 Typo. Bogus text to make commit message long enough.
svn path=/trunk/; revision=37703
2008-11-28 14:29:12 +00:00
Kamil Hornicek
acffd663c1 - update user32 winetest
svn path=/trunk/; revision=37702
2008-11-28 12:02:57 +00:00
Kamil Hornicek
017c4d5476 - fix a typo
- add a define for user32 winetest

svn path=/trunk/; revision=37701
2008-11-28 11:51:12 +00:00
Daniel Reimer
a00765a47a Update UniATA to Version 0.39j Credits go to Samuel Serapion
svn path=/trunk/; revision=37700
2008-11-28 09:02:24 +00:00
James Tabor
6b349fb348 - Move out stubs and place them where they belong.
svn path=/trunk/; revision=37699
2008-11-28 03:57:57 +00:00
Danny Götte
abfa662ad0 javascript:
* cleanup
* do a basic documentation

svn path=/branches/danny-web/; revision=37697
2008-11-27 22:22:37 +00:00
Gregor Schneider
f9e772b2a2 Update gdi32 winetests, so we don't run out of things to fix.
svn path=/trunk/; revision=37695
2008-11-27 20:52:01 +00:00
James Tabor
1301bd7eb6 - Finnish up gdi wine pen cross test fixes.
- Fix width issue with simple stock pens.
- Fix Info DC building. This was made obvious with wine pen cross tests.


svn path=/trunk/; revision=37694
2008-11-27 20:51:19 +00:00
Gregor Schneider
a68cd30c0d - PS_NULL might always be a LOGPEN, but can be retrieved as LOGPEN and EXTLOGPEN, distinguished by the supplied buffer size
- Fixes 8 gdi32 pen winetests, finally all left failures are visible in one cmd window ;-)

svn path=/trunk/; revision=37693
2008-11-27 20:31:37 +00:00
Stefan Ginsberg
44610231d3 - less break, more build
svn path=/trunk/; revision=37692
2008-11-27 20:15:51 +00:00
Stefan Ginsberg
67bc5b6443 - Videoprt should only use the error codes provided in dderror.h, fix that. Also include dderror.h and make the windef.h dependency explicit.
- Include dderror.h in vbemp/vgamp/xboxvmp too, and make sure vbemp gets its precious HIWORD/LOWORD

svn path=/trunk/; revision=37691
2008-11-27 20:05:12 +00:00
Stefan Ginsberg
59cf9318b8 - Correct numerous structures to work without windef.h (makes them match official DDK, too) and fix some double definitions.
- Use same header guard in ddk's ntstatus.h as psdk's to prevent bogus redefinition errors. Also correct some status codes in the psdk version.

svn path=/trunk/; revision=37690
2008-11-27 17:02:09 +00:00
Stefan Ginsberg
fb33d87194 - DXAPI: Fix incompatible header inclusion
- DXG: Change the way PDC is defined -- treat the DC structure as opaque instead of including internal win32k headers. Also rework the way DD_BASEOBJECT is defined.

svn path=/trunk/; revision=37689
2008-11-27 15:34:33 +00:00
Stefan Ginsberg
67a842b6fe - ACPI: Don't redefine standard DDK types
- TCPIP/IP/TDI/Uniata: Don't use user mode types
- USBDRIVER: Remove a peculiar redefinition of ULONG_PTR
- NDIS: Remove duplicate (and undocumented) types from ndis.h, defined in an internal NDIS header long ago. Also fix some warnings, define UINT as appropriate, and add a clever (not really) workaround for a gcc/msvc incompatibility. -- For some obnoxious reason msvc is fine with redeclaring types compatibly, while gcc treats it as an error. PSDK and DDK require this, so we need...extended header checks.

svn path=/trunk/; revision=37688
2008-11-27 15:02:47 +00:00
Michael Martin
21b28d3e0d - Add WM_SYSCHAR to U32IsValidAccelMessage. See bug #543 for more info.
svn path=/trunk/; revision=37687
2008-11-27 13:54:29 +00:00
Kamil Hornicek
35f1cdfbd7 - sync wined3d, d3d8, d3d9 to wine HEAD part 2/2
svn path=/trunk/; revision=37684
2008-11-27 09:20:38 +00:00
Kamil Hornicek
39cebe5a19 - sync wined3d, d3d8, d3d9 to wine HEAD part 1/2
svn path=/trunk/; revision=37683
2008-11-27 09:20:16 +00:00
Dmitry Chapyshev
15775884cc - .DEF -> .SPEC
- Add some stubs

svn path=/trunk/; revision=37681
2008-11-27 08:40:47 +00:00
James Tabor
4370ebc980 - Fixed stock object creation for pens. Now pass all but 25 pen cross tests. Please use latest wine gdi tests.
svn path=/trunk/; revision=37677
2008-11-26 20:44:41 +00:00
Matthias Kupfer
39128171c4 - tool for autoconverting INF files to utf-16le from an arbitrary unicode encoding
svn path=/trunk/; revision=37676
2008-11-26 20:38:15 +00:00
Stefan Ginsberg
116b8765bb - Slightly reorder freeldr.h's include order
svn path=/trunk/; revision=37675
2008-11-26 20:33:34 +00:00
Stefan Ginsberg
f7325fe7e9 - Fix some definitions, and remove __DD_INCLUDED__ hack
svn path=/trunk/; revision=37673
2008-11-26 20:00:14 +00:00
Matthias Kupfer
62a9e618e7 add myself
svn path=/trunk/; revision=37672
2008-11-26 19:48:01 +00:00
Stefan Ginsberg
2dfe0f5eaf - Fix release build
svn path=/trunk/; revision=37671
2008-11-26 19:24:10 +00:00
Stefan Ginsberg
7cd709ff27 - Define NTSTATUS in a way compatible with the current header set
svn path=/trunk/; revision=37670
2008-11-26 19:22:33 +00:00
Stefan Ginsberg
edad66ead2 - Ksuser: Cleanup header usage a bit, and make sure NTSTATUS gets defined
- Kernel32: Undefine IOCTL_SERIAL_LSRMST_INSERT so we don't get a (bogus) incompatible redefinition warning

svn path=/trunk/; revision=37669
2008-11-26 19:04:55 +00:00
Aleksey Bragin
24da6d32fe - Fix some coverity errors.
- Use KeBugCheck(MEMORY_MANAGEMENT) instead of ASSERT(FALSE), so it dies on release builds too.
- Enable support for Hyper-V.
- Fix incorrect gate wait code -- fixes sporadic crashes in the network stack.
- Mark KeBugCheck*, ExRaise* and RtlRaiseStatus as declspec(noreturn), for better optimization of functions which call them, less potential warnings in the compiler, and, assuming coverity understands it, less false CIDs.
- Fix KiUpdateDr7, which resulted in broken support for hardware breakpoints.
- Fix failure cases in EnumerateRootDevices which might've freed non-allocated memory.
- Fix NtAddAtom/NtFindAtom logic when dealing with NULL or kernel Atom names.

Patch by Alex Ionescu.

svn path=/trunk/; revision=37668
2008-11-26 18:56:41 +00:00
Stefan Ginsberg
1afa5e29a0 - kmtest: Don't use user mode types
- memtest: uh, no. ZwQuerySystemInformation does not return NO_ERROR

svn path=/trunk/; revision=37667
2008-11-26 18:43:27 +00:00
James Tabor
7648ed6672 - Add ExtCreatePen note: This is an enhancement and prevents a call to kernel space.
svn path=/trunk/; revision=37666
2008-11-26 17:47:21 +00:00
James Tabor
62e6343ace - Update CL type.
svn path=/trunk/; revision=37665
2008-11-26 17:11:59 +00:00
KJK::Hyperion
bd76ae91c0 modified lib/pseh/i386/framebased-gcchack.S
Typo

svn path=/trunk/; revision=37664
2008-11-26 16:15:29 +00:00
KJK::Hyperion
58c81ba194 modified include/reactos/libs/pseh/pseh2.h
If the compiler is not GCC, assume native SEH support

modified   lib/pseh/framebased-gcchack.c
modified   lib/pseh/i386/framebased-gcchack.S
   Allow pseh to be compiled with Visual C++ without warnings

svn path=/trunk/; revision=37663
2008-11-26 16:03:12 +00:00
Gregor Schneider
cab11c6e20 - ExtCreatePen creates a PS_NULL style pen in the LOGPEN Format, use the NULL_PEN StockObject for that matter
- Fixes 24 gdi32 pen winetests

svn path=/trunk/; revision=37661
2008-11-26 15:12:38 +00:00
KJK::Hyperion
d29825fe8f Merging fixes from Visual C++ branch
modified   include/psdk/rpcndr.h
   Mask argument before casting in NdrFcShort

modified   include/psdk/winternl.h
   Visual C++-compatible placement of function attribute

modified   include/reactos/wine/port.h
   Visual C++ has interlocked intrinsics, too

modified   lib/3rdparty/adns/adns_win32/adns_unix_calls.c
modified   lib/3rdparty/adns/src/setup.c
   alloca -> _alloca

modified   lib/3rdparty/libwine/debug.c
   Fix a benign range check warning

modified   lib/3rdparty/libwine/debug_ros.c
   Properly decorate malloc replacement

modified   lib/3rdparty/libwine/string.c
   The actual function is called _stricmp

modified   lib/3rdparty/mingw/wcrt1.c
   Visual C++ support

svn path=/trunk/; revision=37659
2008-11-26 14:28:19 +00:00
Michael Martin
9bd1f294f3 - Migrate advapi32 to PSEH 2.0.
svn path=/trunk/; revision=37656
2008-11-26 10:45:42 +00:00
Daniel Reimer
39aa71e8e2 Bug 3871: Polish translation update for netshell,usetup and reactos.exe by Maciej Bialas
svn path=/trunk/; revision=37649
2008-11-26 06:44:47 +00:00
KJK::Hyperion
bfc0f05916 Add comments about workarounds for GCC bugs
svn path=/trunk/; revision=37645
2008-11-25 21:13:57 +00:00
Danny Götte
ea449b6e1b * switch back from rdf
* implement moving entries only at one place, simplyfy backend code
* trim whitespaces from entry names
* insert 'http://' if no protocoll for homepage is given

svn path=/branches/danny-web/; revision=37644
2008-11-25 19:10:11 +00:00
Stefan Ginsberg
07621c2a9f - Remove blue's implicit dependency on windef.h
svn path=/trunk/; revision=37643
2008-11-25 17:11:42 +00:00
Stefan Ginsberg
ecff3e72ed - FIX is declared in winddi.h, don't redeclare
svn path=/trunk/; revision=37642
2008-11-25 17:08:48 +00:00
Stefan Ginsberg
ed46b7621c - Remove Freeldr's dependency on windef.h
- Explicitly include winerror.h

svn path=/trunk/; revision=37641
2008-11-25 16:55:43 +00:00
Gregor Schneider
4409645578 - Enhance test with icon drawing
- Tests some configurations of DrawIcon and DrawIconEx, highlighting another problem in 32bpp
- Reference TransparentBlt and AlphaBlend directly

svn path=/trunk/; revision=37640
2008-11-25 16:50:25 +00:00
Aleksey Bragin
e9b31b7fdf - Fix weird code in RtlGetVersion (inspired by Coverity ID 1355 and Daniel's patch in bug 3906).
See issue #3906 for more details.

svn path=/trunk/; revision=37638
2008-11-25 16:31:07 +00:00
Aleksey Bragin
af008eee80 Daniel Zimmerman
- First check for NULL before reference a member in it.
See issue #3907 for more details.

svn path=/trunk/; revision=37636
2008-11-25 15:57:03 +00:00
Aleksey Bragin
22cbf57aad Daniel Zimmerman
- Check pdev and purb for NULL before accessing them. Resolves CID 764 and 763.
See issue #3908 for more details.

svn path=/trunk/; revision=37634
2008-11-25 15:51:09 +00:00
Stefan Ginsberg
2cb63c5b32 - Change LPTSTR to LPWSTR for NtUserGetAltTabInfo, as this will always be a wide string
svn path=/trunk/; revision=37633
2008-11-25 14:50:53 +00:00
KJK::Hyperion
e995c386a7 Supersedes r37631
Undoing fishy patch for warnings in Wine code (see r37629)

svn path=/trunk/; revision=37632
2008-11-25 14:17:27 +00:00
KJK::Hyperion
69f549f59c Undoing fishy patch for warnings in Wine code (see r37629)
svn path=/trunk/; revision=37631
2008-11-25 14:11:55 +00:00
Stefan Ginsberg
41bcb8cc77 - Correct some type casts
svn path=/trunk/; revision=37630
2008-11-25 13:57:26 +00:00
KJK::Hyperion
ea60c32d4f Supersedes r37623 with fixes for cross compilation
modified   base/shell/explorer/explorer.rbuild
modified   dll/win32/glu32/glu32.rbuild
modified   dll/win32/kernel32/kernel32.rbuild
modified   drivers/wdm/audio/backpln/portcls/portcls.rbuild
modified   ReactOS-generic.rbuild
   Set -Wno-non-virtual-dtor globally because we have no use for this warning and it only messes with COM interface definitions
   This alone disables a ton of spurious warnings

modified   tools/rbuild/backend/mingw/mingw.cpp
modified   tools/rbuild/backend/mingw/modulehandler.cpp
modified   tools/rbuild/backend/mingw/modulehandler.h
   Project-global compiler flags now actually work as intended
   Removed some dead code

modified   dll/directx/dxdiagn/container.c
modified   dll/directx/wine/d3d8/device.c
modified   dll/directx/wine/d3d9/device.c
modified   dll/win32/comdlg32/printdlg.c
modified   dll/win32/crypt32/chain.c
modified   dll/win32/crypt32/main.c
modified   dll/win32/crypt32/oid.c
modified   dll/win32/crypt32/protectdata.c
modified   dll/win32/crypt32/rootstore.c
modified   dll/win32/dbghelp/pe_module.c
modified   dll/win32/fusion/assembly.c
modified   dll/win32/gdiplus/font.c
modified   dll/win32/gdiplus/image.c
modified   dll/win32/icmp/icmp_main.c
   Get rid of warnings.
   Patch by Robin Geuze <r.geuze@chello.nl>

svn path=/trunk/; revision=37629
2008-11-25 13:44:30 +00:00
Gregor Schneider
215fa4be9d - Check parameters before allocating memory
- Patch by Daniel Zimmermann, <netzimme AT aim DOT com>
- Fixes possible memory leaks pointed out by CID 605, bug #3910

svn path=/trunk/; revision=37628
2008-11-25 12:53:21 +00:00
KJK::Hyperion
f7f455d197 Undo r37623 until cross compilation is fixed
svn path=/trunk/; revision=37626
2008-11-24 21:32:17 +00:00
Matthias Kupfer
71e3048893 - don't calc the same values multiple times
svn path=/trunk/; revision=37625
2008-11-24 21:28:42 +00:00
KJK::Hyperion
6b4a3178e3 modified base/shell/explorer/explorer.rbuild
modified   dll/win32/glu32/glu32.rbuild
modified   dll/win32/kernel32/kernel32.rbuild
modified   drivers/wdm/audio/backpln/portcls/portcls.rbuild
modified   ReactOS-generic.rbuild
   Set -Wno-non-virtual-dtor globally because we have no use for this warning and it only messes with COM interface definitions
   This alone disables a ton of spurious warnings

modified   tools/rbuild/backend/mingw/mingw.cpp
modified   tools/rbuild/backend/mingw/modulehandler.cpp
modified   tools/rbuild/backend/mingw/modulehandler.h
   Project-global compiler flags now actually work as intended
   Removed some dead code

modified   dll/directx/dxdiagn/container.c
modified   dll/directx/wine/d3d8/device.c
modified   dll/directx/wine/d3d9/device.c
modified   dll/win32/comdlg32/printdlg.c
modified   dll/win32/crypt32/chain.c
modified   dll/win32/crypt32/main.c
modified   dll/win32/crypt32/oid.c
modified   dll/win32/crypt32/protectdata.c
modified   dll/win32/crypt32/rootstore.c
modified   dll/win32/dbghelp/pe_module.c
modified   dll/win32/fusion/assembly.c
modified   dll/win32/gdiplus/font.c
modified   dll/win32/gdiplus/image.c
modified   dll/win32/icmp/icmp_main.c
   Get rid of warnings.
   Patch by Robin Geuze <r.geuze@chello.nl>

svn path=/trunk/; revision=37623
2008-11-24 19:29:13 +00:00
Gregor Schneider
5395fbc5ba - Add copyright information I forgot, update paths
svn path=/trunk/; revision=37622
2008-11-24 19:27:30 +00:00
Gregor Schneider
95b01d0342 - Move slightly changed PS_ALTERNATE and PS_INSIDEFRAME checks from win32k to gdi32
- Don't restrict the width of PS_SOLID pens
- Fixes 25 gdi32 pen winetests
- Pen types left tbd: PS_NULL (problems in GetObject and ExtCreatePen) and PS_ALTNATE (EngLineTo/StrokePath does not support bitmap pens)

svn path=/trunk/; revision=37620
2008-11-24 18:40:46 +00:00
Johannes Anderwald
21f2f21a4d - Fix heap corruption and memory leak
- patch by Daniel Zimmermann
- CID 707
- bug 3905

svn path=/trunk/; revision=37619
2008-11-24 18:05:51 +00:00
Johannes Anderwald
d8a4dde485 - Store settings of SPI_SETMOUSEBUTTONSWAP in registry
- bug 2443

svn path=/trunk/; revision=37618
2008-11-24 17:57:17 +00:00
Danny Götte
13f70605ec * implemented list of depencies
* some minor bugfixes

svn path=/branches/danny-web/; revision=37617
2008-11-24 16:12:48 +00:00
KJK::Hyperion
b4d5ee6914 modified ntoskrnl/ex/sysinfo.c
MaxSystemInfoClass is now much larger than the size of the CallQS table: use the actual size of the table in range checks to prevent an overrun
   Fixes CID 527, CID 528

svn path=/trunk/; revision=37616
2008-11-24 13:47:44 +00:00
KJK::Hyperion
c086cc2302 Everything
Migrate ntoskrnl to PSEH 2.0. The code should speak for itself

modified   ntoskrnl/ex/atom.c
   _SEH_LEAVE was used improperly in NtQueryInformationAtom. As a free bonus, the upgrade to PSEH 2.0 (and to _SEH2_LEAVE) fixes the potential bug

modified   ntoskrnl/fsrtl/fastio.c
   Corrected exception filter logic

modified   ntoskrnl/include/internal/ex.h
   Goodbye _SEH_ExSystemExceptionFilter, you won't be missed

modified   ntoskrnl/include/internal/ntoskrnl.h
   Don't FORCEINLINE functions that use SEH, it's bad form and the compiler doesn't like

modified   ntoskrnl/ke/i386/usercall.c
   Dispatch the correct EXCEPTION_RECORD in case of exception inside KiInitializeUserApc

modified   ntoskrnl/ke/powerpc/exp.c
   Removed bogus, unused SEH code

modified   ntoskrnl/ntoskrnl-generic.rbuild
   Sources using PSEH 2.0 must be compiled with -fno-unit-at-a-time due to a GCC bug. See also http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17982 and http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054
   Apparently, -fno-unit-at-a-time makes GCC crash when using precompiled headers. Disable precompiled headers for ntoskrnl

svn path=/trunk/; revision=37615
2008-11-24 13:40:26 +00:00
KJK::Hyperion
0cc5134395 modified include/psdk/rpc.h
Implemented RPC exception handling macros with PSEH 2.0

modified   base/services/rpcss/rpcss.rbuild
modified   dll/win32/rpcrt4/rpcrt4.rbuild
   RPC proxy stubs now depend on pseh. We should really add pseh as a link dependency automatically in rbuild, but, eh

modified   tools/rbuild/backend/mingw/modulehandler.cpp
   Compile RPC proxy stubs with -fno-unit-at-a-time due to a GCC bug. See also http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17982 and http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054

svn path=/trunk/; revision=37614
2008-11-24 13:05:40 +00:00
Aleksey Bragin
7da3ae674b - Fix most of the warnings in mkhive.
svn path=/trunk/; revision=37613
2008-11-24 13:01:56 +00:00
KJK::Hyperion
cfeeca424d modified dll/directx/ddraw/rosdraw.h
modified   dll/win32/advapi32/advapi32.h
modified   dll/win32/gdi32/include/precomp.h
modified   dll/win32/setupapi/setupapi_private.h
   Explicitly include pseh/pseh.h, don't rely on <windows.h> including it through <rpc.h>

svn path=/trunk/; revision=37612
2008-11-24 13:00:20 +00:00
Stefan Ginsberg
aca04a803e - Fix build
svn path=/trunk/; revision=37611
2008-11-24 12:30:53 +00:00
Aleksey Bragin
fa2d77a3e8 - Get rid of warnings.
svn path=/trunk/; revision=37610
2008-11-24 12:22:09 +00:00
Aleksey Bragin
73ed86d2a8 - Get rid of warnings.
svn path=/trunk/; revision=37609
2008-11-24 12:14:48 +00:00
Aleksey Bragin
5f73c662a9 - Make atapi compile warnings-free.
svn path=/trunk/; revision=37608
2008-11-24 10:04:05 +00:00
KJK::Hyperion
4b013bbd25 Fixed _SEH2_EXCEPT
svn path=/trunk/; revision=37606
2008-11-24 03:00:50 +00:00
KJK::Hyperion
0022cb57c0 Missing from previous commit
svn path=/trunk/; revision=37604
2008-11-24 01:38:43 +00:00
KJK::Hyperion
0d89ee1b23 Allow pseh.h and pseh2.h to be included in the same compilation unit. Mixing PSEH and PSEH 2.0 macros in the same function isn't safe yet, though
svn path=/trunk/; revision=37601
2008-11-23 23:00:37 +00:00
KJK::Hyperion
eba975aff9 GCC can't appreciate my genius. _SEH2_EXCEPT temporarily broken until I figure out a simpler way
svn path=/trunk/; revision=37600
2008-11-23 22:47:16 +00:00
Eric Kohl
991af663db - Start the RPC-Server from a separate thread so the initial call to the DLL doesn't get blocked.
- Ensure the server accepts more than a single call from clients.

svn path=/trunk/; revision=37599
2008-11-23 22:39:43 +00:00
Eric Kohl
4abc5d743f Fix formatting. No code changes!
svn path=/trunk/; revision=37598
2008-11-23 22:36:15 +00:00
Cameron Gutman
a1afe48a57 - NDIS always calls NdisMIndicateStatusComplete immediately after calling NdisMIndicateStatus
svn path=/trunk/; revision=37593
2008-11-23 16:50:11 +00:00
Dmitry Chapyshev
9f055c6d88 - More correct fix
svn path=/trunk/; revision=37592
2008-11-23 15:10:09 +00:00
Danny Götte
68f780c5e3 * fix bug in language detection
* let the user decide which language he want to set instead of preselecting by browser preferences
* minor fixes
* fix the famous metadata bug

svn path=/branches/danny-web/; revision=37591
2008-11-23 14:54:05 +00:00
Dmitry Chapyshev
cee7f49628 - Set flag unicode="yes"
- Use WCHARs instead of TCHAR

svn path=/trunk/; revision=37589
2008-11-23 14:16:46 +00:00
Dmitry Chapyshev
4398dce305 - Fix formatting. No code change
svn path=/trunk/; revision=37588
2008-11-23 13:52:57 +00:00
Eric Kohl
8811ad12d4 - Replace the check-marks in the protocol menu by radio-bullets because the user can only select one of three protocols.
- Mark a protocol in the menu only if it was read correctly. Otherwise the security protocol gets selected although the user is not able to see this protocol.
- Minor clean-up of the resource id mess.

svn path=/trunk/; revision=37586
2008-11-23 13:34:15 +00:00
Dmitry Chapyshev
d801a49d71 - Fix formatting. No code change
svn path=/trunk/; revision=37583
2008-11-23 11:15:52 +00:00
Dmitry Chapyshev
f891a44a69 - Implement ActivateActCtx, AddRefActCtx, CreateActCtxW, DeactivateActCtx, FindActCtxSectionStringW, GetCurrentActCtx, ReleaseActCtx
All based on Wine

svn path=/trunk/; revision=37579
2008-11-23 10:10:29 +00:00
Dmitry Chapyshev
6bcb4d4872 - Add stubs for RtlActivateActivationContext and RtlCreateActivationContext
svn path=/trunk/; revision=37578
2008-11-23 10:02:20 +00:00
Dmitry Chapyshev
3d4737cb72 - Fix RtlFindActivationContextSectionString prototype
svn path=/trunk/; revision=37575
2008-11-23 08:57:19 +00:00
Dmitry Chapyshev
257cd9125a - Fix IsValidLanguageGroup and EnumSystemLanguageGroups. +102 passed tests
svn path=/trunk/; revision=37574
2008-11-23 08:19:35 +00:00
Dmitry Chapyshev
0c2971975e - Implement LCMapStringA/W (based on Wine, +55 passed tests)
- Fix CompareStringA/W (+6 passed tests)

svn path=/trunk/; revision=37571
2008-11-23 06:50:32 +00:00
KJK::Hyperion
7d4a8b9e1c modified include/reactos/libs/pseh/pseh2.h
Make SF_FramePointer field of _SEHFrame_t volatile, too, just to be safe
   Unoptimized compilation doesn't perform const-folding - "static const" could result in compilation errors, use just "const"
   Renamed _SEH2_GetExceptionPointers to _SEH2_GetExceptionInformation to be closer to the "standard" SEH syntax

modified   lib/pseh/framebased-gcchack.c
   Clobber the register that's actually used

svn path=/trunk/; revision=37570
2008-11-23 00:20:37 +00:00
Danny Götte
1f82ab9fb0 * moved login.php -> Login::required()
* use new class ThisUser to reference the logged in user
* use new class to get rid of more global vars
* fix minor bugs

svn path=/branches/danny-web/; revision=37569
2008-11-22 23:51:18 +00:00
Eric Kohl
29fc9d57c7 Make the event viewer unicode-enabled and build the unicode version.
svn path=/trunk/; revision=37568
2008-11-22 21:14:51 +00:00
Danny Götte
9a7c5864b0 if stable entries of type 'page' or dynamic 'content' are deleted -> delete them also from hdd and not only in our Database
svn path=/branches/danny-web/; revision=37567
2008-11-22 20:49:00 +00:00
Danny Götte
b1fd76ea90 implement [#wiki_ABC] to wiki page 'ABC'
svn path=/branches/danny-web/; revision=37566
2008-11-22 20:00:43 +00:00
Danny Götte
1f270cd298 implement account disabling / enabling(if already activated)
svn path=/branches/danny-web/; revision=37565
2008-11-22 19:37:14 +00:00
Eric Kohl
db8c3e9162 Replace TABs by Spaces.
No code changes!

svn path=/trunk/; revision=37564
2008-11-22 19:25:48 +00:00
Danny Götte
325a940e13 only add a user membership once to a group
svn path=/branches/danny-web/; revision=37563
2008-11-22 18:56:48 +00:00
James Tabor
01f04141d9 - Add tag for path objects. Set DC handle when selecting bitmap.
svn path=/trunk/; revision=37562
2008-11-22 18:26:32 +00:00
Dmitry Chapyshev
25c2fade91 - Fix CompareStringA/W. +7 passed wine tests
svn path=/trunk/; revision=37561
2008-11-22 17:41:52 +00:00
Cameron Gutman
438ac1d7da - Merge aicom-network-fixes up to r37556
svn path=/trunk/; revision=37559
2008-11-22 17:02:56 +00:00
James Tabor
07019b1508 -AttachThreadInput is a direct call to kernel space, good job Dmitry!
svn path=/trunk/; revision=37558
2008-11-22 16:23:43 +00:00
Dmitry Chapyshev
7c4e569119 - Update GetCurrencyFormatW. +34 wine tests passed
svn path=/trunk/; revision=37555
2008-11-22 13:45:17 +00:00
Dmitry Chapyshev
724defb850 - Fix RtlTimeFieldsToTime. Now GetDateFormatW passed all wine tests
svn path=/trunk/; revision=37554
2008-11-22 13:21:33 +00:00
Dmitry Chapyshev
3b5c12bcdc - Fix 2 wine tests for GetTimeFormatA/W
svn path=/trunk/; revision=37553
2008-11-22 12:15:24 +00:00
Stefan Ginsberg
cd1bf24e93 - Make sure allocation succeeded (CID 467)
svn path=/trunk/; revision=37552
2008-11-22 11:51:01 +00:00
Dmitry Chapyshev
af6290f733 - Fix EnumDateFormatsA implementation. + 7 passed tests
svn path=/trunk/; revision=37551
2008-11-22 11:32:08 +00:00
Stefan Ginsberg
21a89ddc01 - Don't. Include. ntdef.h. From. User. Mode.
svn path=/trunk/; revision=37550
2008-11-22 11:17:17 +00:00
Stefan Ginsberg
f8b07da766 - Remove system_header too
svn path=/trunk/; revision=37549
2008-11-22 11:04:49 +00:00
Stefan Ginsberg
682255c554 - No, Winetests doesn't treat ntdef.h as a PSDK header, they don't include it. The include was added when the Winetest was added to ros, because of missing NTSTATUS type. Include NDK instead.
svn path=/trunk/; revision=37548
2008-11-22 11:03:56 +00:00
Stefan Ginsberg
bbdf312552 - Deprecate PSDK's usage of system_header for real now that rostests/winetests are fixed
svn path=/trunk/; revision=37547
2008-11-22 10:47:17 +00:00
Stefan Ginsberg
7e38beba07 - Silence more "has virtual functions but non-virtual destructor" warnings
svn path=/trunk/; revision=37546
2008-11-22 10:38:09 +00:00
Stefan Ginsberg
774c361bad - Silence more "has virtual functions but non-virtual destructor" warnings
- Disable outdated and unused libjpeg

svn path=/trunk/; revision=37545
2008-11-22 10:37:47 +00:00
Stefan Ginsberg
137f21c9fd - Fix indentation (spaces -> tabs)
svn path=/trunk/; revision=37544
2008-11-22 09:09:50 +00:00
Aleksey Bragin
b7af90ae54 Dmitry Gorbachev
- Fix an issue with choosing nonexistent x86 registers %sil/%dil, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10153 for more details.
- Add "memory" to _InterlockedAddLargeStatistic(). "In Visual C++ 2005, this function behaves as a read-write barrier." -- MSDN library.
- Use "+m" instead of "=m".

See issue #3772 for more details.

svn path=/trunk/; revision=37543
2008-11-22 08:32:15 +00:00
Aleksey Bragin
5312b56416 Dmitry Gorbachev
- SETxx instructions require 8-bit operand, but "r" constraint is used. Use "q" instead ("r" means any general register, including esi and edi, which are not suitable as an operand of setnz.)
See issue #3772 for more details.

svn path=/trunk/; revision=37542
2008-11-22 08:26:53 +00:00
Dmitry Chapyshev
54389c838c - Call NtUserAttachThreadInput
svn path=/trunk/; revision=37540
2008-11-22 06:16:19 +00:00
Dmitry Chapyshev
92b86da787 - Sync inetcomm with Wine head
svn path=/trunk/; revision=37539
2008-11-22 04:28:03 +00:00
Stefan Ginsberg
12ee0b7efd - Silence more "has virtual functions but non-virtual destructor"
svn path=/trunk/; revision=37537
2008-11-21 23:14:30 +00:00
Stefan Ginsberg
7b2da29cb3 - ...revert until all Winetests/rostests are fixed. Using a broken RosBe beta which doesn't build /rostests/ or /rosapps/ when doing header changes is a bad, bad idea.
svn path=/trunk/; revision=37535
2008-11-21 22:48:38 +00:00
Stefan Ginsberg
0e7b582264 - Winetests treats ntdef.h as a psdk header, so temporarily hack it...
svn path=/trunk/; revision=37534
2008-11-21 22:38:23 +00:00
Stefan Ginsberg
00a5b02ea1 - Fix rostests build, part 1 of ?
svn path=/trunk/; revision=37533
2008-11-21 22:23:46 +00:00
Stefan Ginsberg
c0dbb1b2c1 - More hack, less build breakage
svn path=/trunk/; revision=37532
2008-11-21 22:03:45 +00:00
Stefan Ginsberg
57cf5503f1 - Remove system_header from the remaining PSDK headers. The era of liberally sprinkling the overkill system_header gcc hacH^H^H^extension has now come to an end and...oh, wait. What's that you say? DDK does this too? Uh, right. Will fix that too.
svn path=/trunk/; revision=37531
2008-11-21 21:46:58 +00:00
Stefan Ginsberg
dff0e2ea0b - Hack-include ntsecapi.h in powrprof.h, so NTSTATUS gets defined in an NDK-safe way. Not the best way, and most likely not compatible with the official header set, but I can't get the hack used by MS headers to work.
svn path=/trunk/; revision=37530
2008-11-21 21:31:01 +00:00
Stefan Ginsberg
f9798bcf09 - LANG_WELSH and LANG_BRETON are present in newer official winnt.h (and our winnt.h), so no need to put hacked-up versions of them in "Wine compatibility" winnt.h.
- Don't define wchar_t in winnt.h (kudos to Colin Finck for this fix)
- Remove system_header

svn path=/trunk/; revision=37529
2008-11-21 21:27:30 +00:00
Stefan Ginsberg
f39e2f8b84 - Silence "'struct Foo' has virtual functions but non-virtual destructor" warnings for kernel32, as we don't allow warnings for this module. Needed for the coming header fixes, as system_header hides this warning.
svn path=/trunk/; revision=37528
2008-11-21 21:19:13 +00:00
Stefan Ginsberg
e40f53753f - Protect NTSTATUS definition in NDK with a guard, as is done in the user mode headers which also define this type
- Remove system_header from these user mode headers

svn path=/trunk/; revision=37527
2008-11-21 21:12:53 +00:00
Stefan Ginsberg
1bf8f269d0 - Remove non-standard "PLANGID" type from NDK and use LANGID* instead. Also protect LANGID definition with a header guard, as winnt.h defines it too.
svn path=/trunk/; revision=37526
2008-11-21 21:05:33 +00:00
Matthias Kupfer
8cf20f8201 - Add key modifiers MK_CONTROL and MK_SHIFT to all mouse events.
- See issue #3557 for more details.

svn path=/trunk/; revision=37525
2008-11-21 20:58:07 +00:00
Sylvain Petreolle
968119aebb don't redefine IDHELP.
svn path=/trunk/; revision=37524
2008-11-21 20:13:22 +00:00
Stefan Ginsberg
922ae17a2e - winternl.h is deprecated since the NDK was invented, don't use
svn path=/trunk/; revision=37523
2008-11-21 19:23:42 +00:00
James Tabor
de77947079 - Pass more bitmap cross tests, 16 bit is down to 52. I have more fixes that relate to that number, need more time to work on it. Fixed SEH abuse in CreateBitmap.
svn path=/trunk/; revision=37522
2008-11-21 18:34:31 +00:00
Stefan Ginsberg
cc2c98c93f - Move ntdef.h to DDK as that is where it belongs, and remove unnecessary system_header. Also fix a #endif (kudos to hto -- bug 3888)
- Fix DDK to include ntdef.h instead of windef.h
- Fix a check in debug.h

svn path=/trunk/; revision=37521
2008-11-21 18:18:12 +00:00
Stefan Ginsberg
5173235ba2 - Fix a warning
svn path=/trunk/; revision=37520
2008-11-21 17:53:10 +00:00
Michael Martin
c6e8145135 - Added EventSource structure for keeping track of EventLog Source name and associated Log File.
- Added and Implemented ElfCreateEventLogHandle and ElfDeleteEventLogHandle.

svn path=/trunk/; revision=37519
2008-11-21 15:40:47 +00:00
Stefan Ginsberg
9e37df129a - Correct some constants so they don't conflict with aviriff.h
svn path=/trunk/; revision=37518
2008-11-21 15:32:18 +00:00
Stefan Ginsberg
a736d55b01 - Fix a bug
svn path=/trunk/; revision=37517
2008-11-21 15:23:27 +00:00
Stefan Ginsberg
2b96a6cb87 - Fix double declarations/definitions and remove system_header
svn path=/trunk/; revision=37516
2008-11-21 15:12:00 +00:00
Stefan Ginsberg
abb1280385 - woops. temporarily revert system_header to fix build
svn path=/trunk/; revision=37515
2008-11-21 15:02:06 +00:00
Kamil Hornicek
62392c89a0 - avoid losing pointer to the next bezier patch while freeing the current one (CID 1298)
svn path=/trunk/; revision=37514
2008-11-21 15:01:01 +00:00
Stefan Ginsberg
b67eece82f - Remove some straggler system_header
svn path=/trunk/; revision=37513
2008-11-21 14:52:22 +00:00
Kamil Hornicek
e8dde635bf - free all resources before returning (CID 644)
svn path=/trunk/; revision=37512
2008-11-21 14:20:54 +00:00
Stefan Ginsberg
9f42dcf72a - Update a comment
svn path=/trunk/; revision=37511
2008-11-21 13:45:40 +00:00
Kamil Hornicek
e491126867 - store the next node in a separate variable so we won't loose it after freeing the current node (CID 1296)
svn path=/trunk/; revision=37510
2008-11-21 13:20:22 +00:00
Kamil Hornicek
0f0b1a0a74 - reshuffle the code a bit
- fix CID 521 run 2

svn path=/trunk/; revision=37508
2008-11-21 12:20:48 +00:00
Kamil Hornicek
3abe5dfccd - don't leak resources, CID 609+610 run 2
svn path=/trunk/; revision=37506
2008-11-21 10:31:18 +00:00
Aleksey Bragin
5bd9816a8a - Always uninit cache for a file object (official documentation requires this).
svn path=/trunk/; revision=37504
2008-11-21 10:17:14 +00:00
Kamil Hornicek
66d5bd3206 - fix freeing of resources, CID 1295 run 2
- don't redefine _WIN32_WINNT

svn path=/trunk/; revision=37502
2008-11-21 09:45:54 +00:00
Johannes Anderwald
b828f5779e - Convert Value of PATHEXT to lowercase
- see bug 3875

svn path=/trunk/; revision=37497
2008-11-21 08:57:13 +00:00
James Tabor
a16c4ab474 - Update palette functions and small cleanup in bitmaps.
svn path=/trunk/; revision=37496
2008-11-21 06:50:36 +00:00
Eric Kohl
62a7ad910e SySync to wine-1.1.1 (Patch 6 of 10):
- Rob Shearman <robertshearman@gmail.com> Thu, 3 Jul 2008
widl: Consolidate top-level parameter conformance/variance expression writing into a separate function.

Descend through as many pointer types as necessary to find the
fundamental type and determine whether it needs a top-level parameter
conformance/variance expression to be written.

Add support for writing top-level parameter conformance/variance
expressions for non-encapsulated unions.

svn path=/trunk/; revision=37491
2008-11-20 20:37:09 +00:00
Aleksey Bragin
f9fd16f793 - Upcase a search expression when calling RtlIsNameInExpression with case-insensitive option (a merge of 37263 from Pierre's branch with changed comments).
svn path=/trunk/; revision=37490
2008-11-20 20:24:10 +00:00
Eric Kohl
783e8e1be3 SySync to wine-1.1.1 (Patch 5 of 10):
- Dan Hipschman <dsh@linux.ucla.edu> Tue, 1 Jul 2008
widl: Factor a small part of the grammar.

svn path=/trunk/; revision=37489
2008-11-20 20:21:33 +00:00
Aleksey Bragin
7dcc2be045 - Merge misaligned reads support (35998, 36834 by Art) from arty-newcc branch.
svn path=/trunk/; revision=37488
2008-11-20 20:02:36 +00:00
Danny Götte
7ac4d15ac8 implement new entry 'page & content' generation
svn path=/branches/danny-web/; revision=37487
2008-11-20 19:25:28 +00:00
Stefan Ginsberg
eb41cde3fa - Fix "missing newling" warning
svn path=/trunk/; revision=37486
2008-11-20 19:00:17 +00:00
Stefan Ginsberg
b1398df863 - Remove more instances of system_header
svn path=/trunk/; revision=37485
2008-11-20 15:30:15 +00:00
James Tabor
c388ad54d4 - Add Section support for CreateDIBSection. Section support was disabled from the first time it was committed at revision 1753.
svn path=/trunk/; revision=37484
2008-11-20 15:11:43 +00:00
Stefan Ginsberg
30baf5107f - Correct a header guard
svn path=/trunk/; revision=37483
2008-11-20 15:02:42 +00:00
Danny Götte
31278a30c3 * fix more html issues
* now adding entries is possible again
* catch an additional error

svn path=/branches/danny-web/; revision=37482
2008-11-20 13:14:38 +00:00
Matthias Kupfer
813f7f6f26 - start with German translation (not finished yet)
- prepare setup to change setup language at runtime
- fix resource files

svn path=/trunk/; revision=37480
2008-11-20 10:21:17 +00:00
Eric Kohl
4bc0878195 Revert 37476 because it breaks the build bot.
svn path=/trunk/; revision=37477
2008-11-19 23:22:44 +00:00
Eric Kohl
75e18ffafa Sync to wine-1.1.1 (Patch 4 of 10):
ATTENTION: You MUST run "clean" before building ReactOS, otherwise WIDL will crash when it is run.

- Dan Hipschman <dsh@linux.ucla.edu> Tue, 1 Jul 2008
widl: Implement type redefinition checks.

This allows widl to catch type redefinitions and report an error, like MIDL.
However, this does a better job than MIDL since it also reports the location
of the originial definition, like GCC.

svn path=/trunk/; revision=37476
2008-11-19 23:13:05 +00:00
Eric Kohl
79b0c90fa8 Sync to wine-1.1.1 (Patch 3 of 10):
- Rob Shearman <robertshearman@gmail.com> Tue, 1 Jul 2008
widl: Check that the structure has been defined in check_remoting_args.

svn path=/trunk/; revision=37470
2008-11-19 21:44:03 +00:00
Colin Finck
66ea4d510a - Rearrange "host/typedefs.h" to make it look more logical
- Fix wrong definition of INT_PTR and UINT_PTR in this file
- Revert a hack added to winebuild in r32609 and r37206, which was added to work around these previously buggy definitions

svn path=/trunk/; revision=37468
2008-11-19 21:05:49 +00:00
Eric Kohl
df50518f1e Sync to wine-1.1.1 (Patch 2 of 10):
- Rob Shearman <robertshearman@gmail.com> Tue, 1 Jul 2008
widl: Increment the buffer offset by 8 for embedded pointers inside varying arrays in varying structures.

The 8 bytes are for the variance and offset and are added just before
the array, as seen in the marshalling code in rpcrt4. No offset needs
to be added for non-varying structures since the buffer mark is set
after the conformance in marshalled or unmarshalled.

svn path=/trunk/; revision=37467
2008-11-19 21:01:47 +00:00
Eric Kohl
5e41cc9ce8 Sync to wine-1.1.1 (Patch 1 of 10):
- Alexandre Julliard <julliard@winehq.org> Tue, 1 Jul 2008
widl: Add some support for unencapsulated unions that need a conformance descriptor.

svn path=/trunk/; revision=37466
2008-11-19 20:33:58 +00:00
Colin Finck
3bf81471d2 Dmitry Gorbachev
- Fix compiler warnings, treated as errors due to our settings, which are emitted when using GCC 4.3.2

See issue #3849 for more details.

svn path=/trunk/; revision=37465
2008-11-19 19:59:54 +00:00
Stefan Ginsberg
993a932cdf - Remove system_header from basetsd/typs.h, and add 4 missing types
svn path=/trunk/; revision=37464
2008-11-19 19:25:42 +00:00
Matthias Kupfer
141eb9a2df - revert winioctl.h to previous version (for compatibility)
- add additional partition types to rosioctl.h
- adapt freeloader to rosioctl.h

svn path=/trunk/; revision=37458
2008-11-19 14:28:24 +00:00
Matthias Kupfer
5fef6df569 - add some linux partition types
svn path=/trunk/; revision=37456
2008-11-19 13:24:43 +00:00
Danny Götte
c492d85a91 * preview function can now be used to *preview* pages
* fixed some bugs

svn path=/branches/danny-web/; revision=37455
2008-11-19 13:07:44 +00:00
Matthias Kupfer
5ae753abf9 revert to revision 37390
svn path=/trunk/; revision=37454
2008-11-19 12:00:23 +00:00
Danny Götte
3d9d9be053 * use proper html
* include css & js files in <head> instaed of in <body> if possible
* fix minor bugs

svn path=/branches/danny-web/; revision=37453
2008-11-19 11:15:29 +00:00
Danny Götte
2e5c37db95 RosCMS Rewrite
* more portable
* Reorganized Sourcecode
* Use PDO instead of mysql_* functions
* strip whitespaces from html output
* still work in progress

svn path=/branches/danny-web/; revision=37452
2008-11-18 22:06:54 +00:00
James Tabor
cddb6be52b - Fixed a bug from revision 3514. Now we pass one more gdi bitmap test.
svn path=/trunk/; revision=37451
2008-11-18 21:24:33 +00:00
Stefan Ginsberg
51ebda7d29 - Remove system_header from winsock headers
svn path=/trunk/; revision=37450
2008-11-18 20:06:57 +00:00
Stefan Ginsberg
0c79fe9fad - Fix a redefinition and remove system_header
svn path=/trunk/; revision=37449
2008-11-18 19:33:22 +00:00
Stefan Ginsberg
e1d8bf2000 - Remove system_header from most of PSDK
svn path=/trunk/; revision=37448
2008-11-18 19:27:05 +00:00
Ged Murphy
29474c309b Rough code to start Winetests processes from the GUI, but with the console's stdout redirected to a pipe controlled by the GUI.
We can now read the console text from the winetest processes in the GUI (although it's just usage info at the moment)

svn path=/trunk/; revision=37447
2008-11-18 18:57:27 +00:00
Eric Kohl
29ddbaa8c9 Revert 37416 because it does not build on all machines.
svn path=/trunk/; revision=37446
2008-11-18 18:51:13 +00:00
Colin Finck
50732235bd Olaf Siejka
- Remove "dosfsck" from packages.dff, removed from trunk by fireball in r37356

svn path=/trunk/; revision=37445
2008-11-18 18:41:00 +00:00
Stefan Ginsberg
73b86484b9 - Add more header guards
svn path=/trunk/; revision=37444
2008-11-18 18:38:58 +00:00
Colin Finck
9748ba970b Create a branch for Danny's web work
svn path=/branches/danny-web/; revision=37443
2008-11-18 18:25:39 +00:00
Stefan Ginsberg
b482357f93 - Declare SECURITY_DESCRIPTOR_CONTROL conditionally
svn path=/trunk/; revision=37442
2008-11-18 17:05:49 +00:00
Stefan Ginsberg
aac23f4f4b - Remove system_header from gdiplus*.h
svn path=/trunk/; revision=37441
2008-11-18 16:56:22 +00:00
Stefan Ginsberg
a208b6c624 - Remove system_header from winbase.h, wingdi.h and winuser.h
- Remove duplicate define from Wine's winuser.h

svn path=/trunk/; revision=37440
2008-11-18 16:15:37 +00:00
James Tabor
f558f29e5c - Make our version of SetDIBits safe as SetDIBitsToDevice.
svn path=/trunk/; revision=37439
2008-11-18 16:07:54 +00:00
James Tabor
3192a32d97 - Fix bpp count in CreateDIBitmap.
svn path=/trunk/; revision=37437
2008-11-18 14:51:14 +00:00
James Tabor
fa0375352f - Fixes bug 3864. While I was at it I fixed most of the gdi max bit max info sizes too.
- Added notes for the SEH abuse in win32k dibobj.c.
- Tested WinMerge 2.10.2, AbiWord 2.4.1, Firefox 1.5.0.3 and wine gdi32 bitmap cross test.
- When testing with gdi cross test in 24 and 32 bit display mode, we have a pixel conversion mismatch. Please fix it!


svn path=/trunk/; revision=37436
2008-11-18 05:36:19 +00:00
Stefan Ginsberg
3595d1c30e - "byte" is defined by the Win32 headers, so define it conditionally
svn path=/trunk/; revision=37423
2008-11-17 22:01:19 +00:00
Stefan Ginsberg
1861d15230 - MSTSC: Don't redefine BOOL
- Regedit: Don't include basetyps.h. Not needed and it just breaks things. Also don't include aclui.h as we...for some reason...implement the required parts of that API locally

svn path=/trunk/; revision=37422
2008-11-17 21:52:55 +00:00
Eric Kohl
1bd1e3126a Sync to wine-1.1.1:
- Alexandre Julliard <julliard@winehq.org> Thu, 26 Jun 2008
widl: [default] is an allowed attribute for union fields.
(Note: This patch was already applied before in order not to break ReactOS.)

- Alexandre Julliard <julliard@winehq.org> Tue, 1 Jul 2008
widl: Add some support for unencapsulated unions that need a conformance descriptor.

- Rob Shearman <robertshearman@gmail.com> Tue, 1 Jul 2008
widl: Increment the buffer offset by 8 for embedded pointers inside varying arrays in varying structures.

The 8 bytes are for the variance and offset and are added just before the array, as seen in the marshalling code in rpcrt4. No offset needs to be added for non-varying structures since the buffer mark is set after the conformance in marshalled or unmarshalled.

- Rob Shearman <robertshearman@gmail.com> Tue, 1 Jul 2008
widl: Check that the structure has been defined in check_remoting_args.

- Dan Hipschman <dsh@linux.ucla.edu> Tue, 1 Jul 2008
widl: Implement type redefinition checks.

This allows widl to catch type redefinitions and report an error, like MIDL. However, this does a better job than MIDL since it also reports the location of the originial definition, like GCC.

- Dan Hipschman <dsh@linux.ucla.edu> Tue, 1 Jul 2008
widl: Factor a small part of the grammar.

- Rob Shearman <robertshearman@gmail.com> Thu, 3 Jul 2008
widl: Consolidate top-level parameter conformance/variance expression writing into a separate function.

Descend through as many pointer types as necessary to find the fundamental type and determine whether it needs a top-level parameter conformance/variance expression to be written. Add support for writing top-level parameter conformance/variance expressions for non-encapsulated unions.

- Rob Shearman <robertshearman@gmail.com> Fri, 4 Jul 2008
widl: Rename find_type_helper, find_type and find_type2 to find_type, find_type_error and find_type_error2 respectively.

- Rob Shearman <robertshearman@gmail.com> Fri, 4 Jul 2008
widl: Remove some unnecessary calls to duptype.

- Alexandre Julliard <julliard@winehq.org> Mon, 7 Jul 2008
widl: Fix a couple of uninitialized variable compiler warnings.

- Alexandre Julliard <julliard@winehq.org> Mon, 7 Jul 2008
Add noinput directive to all lex files to avoid a compiler warning.

Note: Two patches are missing because they implement code to generate MIDL-incompatible SEH support code. Unfortunately I think it is almost time to fork WIDL because later patches implement even more incompatibilities. :-(

svn path=/trunk/; revision=37416
2008-11-17 19:07:03 +00:00
Matthias Kupfer
17ab0467d9 - fix a brace mistake
svn path=/trunk/; revision=37415
2008-11-17 18:40:36 +00:00
Matthias Kupfer
f1fcb8e5cb - add summary page to check settings before start installation
- add disabled driver button for future use

svn path=/trunk/; revision=37414
2008-11-17 18:23:06 +00:00
Gregor Schneider
191a64db66 Remove old locations
svn path=/trunk/; revision=37413
2008-11-17 17:28:58 +00:00
Gregor Schneider
ce7603048e - Restructure dib related tests, 2nd try.
- Change build files accordingly

svn path=/trunk/; revision=37412
2008-11-17 17:28:14 +00:00
Gregor Schneider
085944a8b2 Moved dib tests remotely
svn path=/trunk/; revision=37411
2008-11-17 16:59:01 +00:00
Aleksey Bragin
6bad7297f7 - Target device to mount may not have VPB, the driver should get the VPB passed in parameters.
- Set target device's VPB to this value. This should not really be done, however our driver heavily depends on target device having this VPB. I don't see any side effects.
- With these changes, Windows 2003 is able to boot up to desktop and cleanly shutdown using this driver.

svn path=/trunk/; revision=37409
2008-11-17 16:09:31 +00:00
Gregor Schneider
4aa4129e6f - Add new directory for some dib related test restructuring, including two new tests:
- bltrop test for well known BitBlt ROPs, highlighted bugs were processed in r37268, r37269, r37372
- vbltest for testing several blit and blend functions, highlighted bugs fixed in r37139, r37168 and some overlay issues still tbd

svn path=/trunk/; revision=37407
2008-11-17 15:05:02 +00:00
James Tabor
ab2600780f - Move StretchDIBits out of stubs. Add more notes.
svn path=/trunk/; revision=37404
2008-11-17 13:55:00 +00:00
James Tabor
92b81a8473 - Add note for NtGdiCreateDIBitmapInternal, Should use System Bitmap DC hSystemBM, with CreateCompatibleDC for this.
svn path=/trunk/; revision=37403
2008-11-17 13:51:43 +00:00
Stefan Ginsberg
8def0b5fff - Start deprecating the overabused system_header gcc pragma extension
svn path=/trunk/; revision=37402
2008-11-17 13:49:52 +00:00
Matthias Kupfer
78f5f0f5cc - disable non-working device selection code
- add a missing "break"

svn path=/trunk/; revision=37401
2008-11-17 13:35:59 +00:00
Aleksey Bragin
10d51f11d6 - Remove hack around VFATFS (and CDFS) bugs which were fixed in r37393.
svn path=/trunk/; revision=37400
2008-11-17 13:19:22 +00:00
Aleksey Bragin
354d1e506d - Cleanup 37394, 37396 and 37397:
* PRTL_OVERLAPPED_COMPLETION_ROUTINE is a Wine invention. We already have a type for that, since it's an APC routine, the type will be PIO_APC_ROUTINE.
 * Fix headers, actual stub, and usage in kernel32 respectively.
 * We don't use hungarian notation in RTL ("hFileHandle") .

svn path=/trunk/; revision=37399
2008-11-17 13:16:07 +00:00
Stefan Ginsberg
e912efded4 - Remove deprecated header cruft
svn path=/trunk/; revision=37398
2008-11-17 13:03:54 +00:00
Dmitry Chapyshev
29a0430cdd - Fix build
svn path=/trunk/; revision=37397
2008-11-17 12:13:28 +00:00
Dmitry Chapyshev
375eea5424 - Implement BindIoCompletionCallback, ReadFileScatter, WriteFileGather (based on Wine)
- Move DnsHostnameToComputerNameA/W to computername.c

svn path=/trunk/; revision=37396
2008-11-17 11:53:59 +00:00
Ged Murphy
33d335d8e1 - reference the correct data
- set the response info before returning
See issue #2808 for more details.

svn path=/trunk/; revision=37395
2008-11-17 11:51:33 +00:00
Dmitry Chapyshev
e415ae53c8 - Add stubs for RtlSetIoCompletionCallback
svn path=/trunk/; revision=37394
2008-11-17 11:44:31 +00:00
Aleksey Bragin
4983dabf35 - FASTFAT: when querying file name information, fill in the whole buffer provided by the caller, even if filename does not fully fit (driver by Microsoft(R) does the same). Also, return the actual amount of data written in IoSb.Information, even in case of buffer overflow result.
- CDFS: Fix a guaranteed buffer overwrite when zero-terminating a filename. Also apply the same fixes described above.

svn path=/trunk/; revision=37393
2008-11-17 11:25:36 +00:00
Aleksey Bragin
bc5c507d54 Daniel Zimmerman
- Fix random widl crashes when compiling on Vista x86.

Patch from Wine bugzilla: http://bugs.winehq.org/show_bug.cgi?id=16084 .

See issue #3877 for more details.

svn path=/trunk/; revision=37390
2008-11-16 16:24:23 +00:00
Stefan Ginsberg
c729ed5e3b - STDCALL -> NTAPI
svn path=/trunk/; revision=37388
2008-11-16 13:42:56 +00:00
Dmitry Chapyshev
415da61549 - Implement GetCPInfo. Now this function passes all Wine tests
svn path=/trunk/; revision=37387
2008-11-16 12:15:55 +00:00
James Tabor
4e37ce697b - Fix AlphaBlend checks that pass wine bitmap gdi32 crosstests. Tested in 16 and 24 bit mode Qemu and 32 bit mode hardware, with our AlphaBlend rendering demo program.
svn path=/trunk/; revision=37385
2008-11-16 02:19:43 +00:00
James Tabor
132a0cb3b8 - Sorry for the misunderstanding,,, fix typo, see bug report 3863.
svn path=/trunk/; revision=37384
2008-11-16 01:49:23 +00:00
Gregor Schneider
7d34208e7f - DIB_1BPP_BitBlt: Increment source coordinates properly, see bug #2372
- Remove old code
- Enable dprint for DIB_1BPP_StretchBlt

svn path=/trunk/; revision=37382
2008-11-15 22:35:44 +00:00
Eric Kohl
e2eef76cbf Sync to wine-1.1.0:
- Simon Richter <Simon.Richter@hogyros.de> Tue, 17 Jun 2008
widl: Write string lengths in host endianness.
Type libraries are currently parsed in host endianness, so byte arrays that are going to be interpreted as integers need to be written in the appropriate byte order.

- Rob Shearman <robertshearman@gmail.com> Fri, 20 Jun 2008
widl: Fix generation of the type format string for conformant-varying structures.
The conformance needs to be added on to the offset in the buffer so set this before calling each the writer of each class of pointer description in write_pointer_description. Pass the passed in offsets to buffer and memory to write_pointer_description_offsets in write_varying_array_pointer_descriptions.

- Rob Shearman <robertshearman@gmail.com> Mon, 23 Jun 2008
widl: Replace code to round up values and calculate padding with macros to improve readability.

- Rob Shearman <robertshearman@gmail.com> Mon, 23 Jun 2008
widl: Fix the embedded pointer offsets in generated code when the containing structure has padding.
Do so by calculating the alignment of members when iterating through the structures and adding it onto the buffer and memory offsets. Only call type_memsize once elsewhere in the embedded pointer processing functions since the return value will be the same from the second call.

- Rob Shearman <robertshearman@gmail.com> Mon, 23 Jun 2008
widl: Factor out the finding of a registered type to reduce code duplication.

- Rob Shearman <robertshearman@gmail.com> Mon, 23 Jun 2008
widl: Set the type of the type_t node constructured for dispinterfaces to RPC_FC_IP, like we do for interfaces.

- Rob Shearman <robertshearman@gmail.com> Mon, 23 Jun 2008
widl: Fix crash in find_array_or_string_in_struct if the structure or union has no fields or cases.
(Aleksey already applied this patch in rev37378)

- Rob Shearman <robertshearman@gmail.com> Mon, 23 Jun 2008
widl: Fix the types of enums with the v1_enum attribute applied.

- Rob Shearman <robertshearman@gmail.com> Mon, 23 Jun 2008
widl: Fix type_memsize to follow aliases so that the correct size is calculated.

- Rob Shearman <robertshearman@gmail.com> Mon, 23 Jun 2008
widl: Fix check_remoting_fields to enumerate the correct list of fields.

svn path=/trunk/; revision=37381
2008-11-15 21:17:09 +00:00
Eric Kohl
c43e05155c Sync to wine-1.0-rc11:
- Francois Gouget <fgouget@free.fr> Tue, 6 May 2008
Add a comment warning when a table must be kept sorted for later use with bsearch().

- Francois Gouget <fgouget@free.fr> Tue, 6 May 2008
Assorted spelling fixes.

- Marcus Meissner <marcus@jet.franken.de> Tue, 6 May 2008
widl: Mark non-returning functions as noreturn.

svn path=/trunk/; revision=37380
2008-11-15 20:18:16 +00:00
Aleksey Bragin
0ba5018676 - Remove duplicate, often conflicting, type definitions from IDL (spotted by new widl).
svn path=/trunk/; revision=37379
2008-11-15 19:32:13 +00:00
Aleksey Bragin
a1ba38503c Rob Shearman <robertshearman@gmail.com> Mon, 23 Jun 2008 21:28:56 +0000 (22:28 +0100)
widl: Fix crash in find_array_or_string_in_struct if the structure or union has no fields or cases.

http://source.winehq.org/git/wine.git/?a=commit;h=b3dde47ed760880e323222af9ec7ad30702dec7c

svn path=/trunk/; revision=37378
2008-11-15 18:37:15 +00:00
James Tabor
5a3ad75437 - Fix newest Wine bitmap gdi32 crosstest.
svn path=/trunk/; revision=37375
2008-11-15 15:20:14 +00:00
Aleksey Bragin
f1d7651421 - Remove duplicate type definitions.
svn path=/trunk/; revision=37374
2008-11-15 14:04:18 +00:00
Kamil Hornicek
ee17e42aa7 use the dmSize we got from caller and fall back to SIZEOF_DEVMODEA_300 in case we got some unexpected value as it's done in Windows
svn path=/trunk/; revision=37373
2008-11-15 13:54:17 +00:00
James Tabor
08d47079cf - Fix dirty bit support for select brush and pen, see bug 3863.
- Hack-plement part of NtGdiExtFloodFill. We need to fix our region and clip support so ReactOS drawing functions do not over write other displayed windows. Open AbiWord than type something and select another desktop, this is just one of them....
- Tested with Qemu and real hardware. 

svn path=/trunk/; revision=37372
2008-11-15 13:37:26 +00:00
Stefan Ginsberg
4760f7b940 - Fix another duplicate
svn path=/trunk/; revision=37369
2008-11-14 23:27:10 +00:00
Stefan Ginsberg
aa78c4f6f3 - Remove more duplicate definitions
- Make definitions compatible when they are present in multiple headers

svn path=/trunk/; revision=37368
2008-11-14 23:23:30 +00:00
Stefan Ginsberg
099e8b7530 - Remove duplicate definition
svn path=/trunk/; revision=37367
2008-11-14 23:05:40 +00:00
Johannes Anderwald
6ac60539ec - Improve function stubs
- bug 3829

svn path=/trunk/; revision=37366
2008-11-14 21:03:48 +00:00
Johannes Anderwald
6fe2ea4133 - Make trash properties settings be unvolatile ;)
See issue #3786 for more details.

svn path=/trunk/; revision=37365
2008-11-14 20:58:27 +00:00
Johannes Anderwald
bcddcfdd02 - Display Provider and Version in driver details dialog
svn path=/trunk/; revision=37364
2008-11-14 19:57:22 +00:00
Johannes Anderwald
0c5b1ec2bc - Create IDataObject from the selected pidl
- Check if drop target is the desktop
- fixes bug 3763

svn path=/trunk/; revision=37363
2008-11-14 19:48:46 +00:00
Stefan Ginsberg
782931f369 - Optimize DebugService -- patch from Alex
svn path=/trunk/; revision=37362
2008-11-14 19:14:00 +00:00
Johannes Anderwald
aaeebbb670 - Pass the parent to PropertySheetW
See issue #3597 for more details.

svn path=/trunk/; revision=37361
2008-11-14 19:08:29 +00:00
Johannes Anderwald
1331dc5c45 - Implement IShellExecuteHookW
- Free NETCON_PROPERTIES on cleanup
- Show status dialog when clicking on startmenu->settings->network connections item
- Fixes bug 3782

See issue #3782 for more details.

svn path=/trunk/; revision=37360
2008-11-14 18:47:00 +00:00
Stefan Ginsberg
6a4fcf71eb - PAGE_SIZE fix 2.0
svn path=/trunk/; revision=37359
2008-11-14 15:24:08 +00:00
Stefan Ginsberg
2fcfb97eec - Don't define PAGE_SIZE in typedefs.h as -- "this value is target specific, host tools MUST not use it and this line has to be removed". Instead, define it locally for cmlib.
- Also correct TRUE definition in this header

svn path=/trunk/; revision=37358
2008-11-14 14:49:11 +00:00
Aleksey Bragin
f9c8a7f47e 2008-10-18 Reece Dunn include: Fixed the tom constant values.
svn path=/trunk/; revision=37357
2008-11-14 10:13:08 +00:00
Aleksey Bragin
8efe45f028 - Time to say goodbye to dosfsck port, it's been fully integrated into vfatlib, and the need in a standalone version disappeared.
svn path=/trunk/; revision=37356
2008-11-14 09:35:59 +00:00
Aleksey Bragin
a2d0db9460 Juan Sánchez Jurado <juan.s.jurado@gmail.com>
- UDF recognizer fixed so it doesn't perform partial sector reads. When trying to detect filesystem for a floppy without 0xaa55 signature UDF recognizer is called and it performed wrong partial sectors read because of a confusion between sectors and offset in bytes.
See issue #2287 for more details.

svn path=/trunk/; revision=37355
2008-11-14 09:23:09 +00:00
Stefan Ginsberg
49050f13b3 - Remove duplicate define
svn path=/trunk/; revision=37347
2008-11-13 23:59:37 +00:00
James Tabor
02456c2f68 - Start the implementation and support for dc attribute dirty bits. See bug 3863.
svn path=/trunk/; revision=37346
2008-11-13 23:12:42 +00:00
James Tabor
122723ef7d - Add path support for ExtTextOut.
svn path=/trunk/; revision=37345
2008-11-13 22:38:16 +00:00
Stefan Ginsberg
3ab3cebe76 - stub out NdisReEnumerateProtocolBindings
svn path=/trunk/; revision=37339
2008-11-13 16:06:43 +00:00
James Tabor
6e3804aeb2 - Set the right flags for Background and Text color.
svn path=/trunk/; revision=37338
2008-11-13 15:01:01 +00:00
Daniel Reimer
f4bb615543 Update 3rd party txt file
svn path=/trunk/; revision=37335
2008-11-13 08:26:51 +00:00
Cameron Gutman
19656e1fd2 - Merge aicom-network-fixes up to r37326
svn path=/trunk/; revision=37328
2008-11-13 01:07:17 +00:00
KJK::Hyperion
84ecb53001 modified include/reactos/libs/pseh/pseh2.h
Typo.

svn path=/trunk/; revision=37327
2008-11-13 00:16:47 +00:00
KJK::Hyperion
e9ac5bacb8 modified include/reactos/libs/pseh/pseh2.h
Kill the last few remaining "'x' may be used uninitialized in this function" warnings. I'd love to know the opinion of GCC developers on what does this hack do to their compiler and why

svn path=/trunk/; revision=37319
2008-11-12 21:15:45 +00:00
KJK::Hyperion
e7584f9a3e modified include/reactos/libs/pseh/pseh2.h
modified   lib/pseh/framebased-gcchack.c
modified   lib/pseh/i386/framebased-gcchack.S
   Implemented _SEH2_YIELD and _SEH2_LEAVE - 2.0 equivalents of _SEH_YIELD and _SEH_LEAVE, naturally

svn path=/trunk/; revision=37318
2008-11-12 20:39:18 +00:00
Matthias Kupfer
27341b700f - add and enable partition creation and file system selection dialog
svn path=/trunk/; revision=37316
2008-11-12 20:00:09 +00:00
KJK::Hyperion
bcf160f2b8 added include/reactos/libs/pseh/pseh2.h
added      lib/pseh/framebased-gcchack.c
added      lib/pseh/i386/framebased-gcchack.S
modified   lib/pseh/pseh.rbuild
   Introducing PSEH 2.0. It only wants to be loved. Highlights of this version:
    - PSEH 2.0 syntax is 99% compatible with native SEH syntax
    - PSEH 2.0 binary code a vast improvement over 1.1 - no more setjmp, no bogus loops, no weird optimizer behavior

   PSEH 2.0 is a horrible, GCC-only, x86-only hack. It makes several non-portable assumptions and hey, did you know __builtin_frame_address(0) is *not* the same thing as EBP? Overall, it must be a world record for compiler abuse
   PSEH 2.0 is, sadly, not binary-compatible with PSEH 1.1, although I will almost certainly unify the implementation at a later time
   PSEH 2.0 needs testers. And love.
   Not implemented yet: returning from a SEH block (i.e. _SEH2_YIELD())

Example of 2.0 syntax (yes, _SEH2_END is unavoidable):

_SEH2_TRY
{
	_SEH2_TRY
	{
		/* ... */
	}
	_SEH2_EXCEPT((/* ... */))
	{
		/* ... */
	}
	_SEH2_END;
}
_SEH2_FINALLY
{
	/* ... */
}
_SEH2_END;

-- 
Happy early birthday, Aleksey.

svn path=/trunk/; revision=37315
2008-11-12 19:52:16 +00:00
Eric Kohl
b2736a8abb Sync to wine-0.9.61: Oooops, forgot to add these files!!
- Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008
widl: Stop looping in check_remoting_args when a context_handle or wire_marshal type is found as they are in effect fundamental types.

- Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008
widl: Check that fields in structures and unions referenced by non-local functions can be marshalled and that their attributes are consistent.


-Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008
widl: The implicit_handle attribute is allowed with a handle explicitly specified in the function parameters. In that case, that handle is used instead of the implicit handle. Fix the check for the explicit_handle attribute being specified without a handle being specified in the function parameters, even though issuing an error is wrong. (Thanks to Marcus Meissner & Coverity for spotting that the check didn't do what it was supposed to do.)

- Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008
widl: Automatically add "handle_t IDL_handle" parameter to functions with no explicit handle specified whose containing interface has the explicit_handle attribute.

- Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008
widl: Issue an error instead of crashing for dividing by zero in a constant expression.

- Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008
widl: Add support for "->" and "." operators in expressions.

- Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008
widl: Add support for arrays in expressions.

- Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008
widl: Add support for '%' operator in expressions.

- Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008
widl: Fix operator precedence in expressions.

- Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008
widl: Require a constant expression for case statements.

- Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008
widl: Add support for comparison, exclusive or, logical not and positive operators in expressions.

- Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008
widl: Remove EXPR_MEMBERPTR and implement it using EXPR_PPTR and EXPR_MEMBER instead.

- Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008
widl: Don't free input_name in pop_import as we keep pointers to it in the var_t type now.

- Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008
widl: Pass the actual type into check_remoting_fields and check_field_common instead of the type name.

- Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008
widl: Check that expressions resolve so that expressions in generated code will compile. Also check that expressions return the correct type for the attribute.

- Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008
widl: Move expression functions to a new file, expr.c.

- Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008
widl: Use expr_resolve_type to get the type of the identifier in write_conf_or_var_desc. Remove the conversion of pointer types into base types as this was only needed due to lack of proper type resolving.

- Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008
widl: Remove duplicated code in the form of the write_struct_expr function by enhancing write_expr to allow toplevel identifiers to be prefixed by a string, if specified.

- Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008
widl: Implement lcid property on library declarations.

- Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008
widl: Construct the pointer chain while parsing pointers, rather than storing a ptr_level. This method is more flexible and somewhat simpler.

- Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008
widl: Allow NULL to be used in expressions.

- Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008
widl: Create a list of statements in the whole IDL file, instead of just a list of interfaces.

- Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008
widl: Add typedef statements to the statement lists.

- Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008
widl: Consolidate most of the inner loop of reg_typedefs into set_type.

- Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008
widl: Rename pident to declarator and parse the array declarations as part of declarators. This allows arrays to be used in typedefs and const statements.

- Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008
widl: Make the rules for parsing fields in structures, encapsulated unions and non-encapsulated unions more strict. Move the rules in fields that handle empty union cases into separate union rules so that they can't erroneously be accepted for structures or other types of unions.

- Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008
widl: Add support for declaring multiple fields of a structure in one statement.

- Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008
widl: Add support for string literals and wide-string literals in expressions.

- Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008
widl: Create a statement object for import statements. Move the writing of include directives into the generated header into header.c.

- Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008
widl: Move the func_declarator rule entirely into direct_declarator.

- Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008
widl: Add typedefs to typelibs which have the public or uuid attributes, not any other attribute.

- Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008
widl: Support hex digits that use an uppercase 0X prefix.

- Rob Shearman <rob@codeweavers.com> Sun, 27 Apr 2008
widl: Accept integer constant suffixes in the lexer.

- Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008
widl: Keep const attributes applied to pointers when writing out the type. Use an attribute to store the const qualifier for the pointer and type. Allow multiple type-qualifiers to be applied to a type by adding a declaration-specifier rule that encompasses type-qualifiers and types.

- Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008
widl: Add support for "inline" on function definitions. Fix applying calling convention to function type.

- Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008
widl: Make constdef and externdef take a declarator instead of an ident so that functions and arrays can be defined using the statements.

- Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008
widl: Allow pointer attributes to be applied to function pointers.

- Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008
widl: callback, code, comm_status and in_line are attribute names, not keywords.

- Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008
widl: Prepare for supporting storage classes in declaration statements. Return a decl_spec_t structure from decl_spec rules so that the storage
class and type qualifiers can both be returned.

- Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008
widl: Add the parsing of storage classes into declaration-specifiers. Support the static and register keywords. This consolidates externdef and constdef rules into one declaration rule.

- Rob Shearman <rob@codeweavers.com> Thu, 1 May 2008
widl: Consolidate writing of COM and dispatch interfaces into one function to remove duplicated code. Split up the writing into start and end to eventually support the style MIDL uses where it writes declared types, etc. between the start and end of the interface. Make internal header functions take the file pointer to print to. Don't write interface IDs for non-object interfaces and always write handle declarations even if the interface has no methods, like MIDL does.

- Gerald Pfeifer <gerald@pfeifer.com> Fri, 2 May 2008
widl: Fix syntax to also work with older versions of bison.

svn path=/trunk/; revision=37314
2008-11-12 19:30:10 +00:00
Eric Kohl
a591ac9fa5 Sync to wine-0.9.61:
- Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008
widl: Stop looping in check_remoting_args when a context_handle or wire_marshal type is found as they are in effect fundamental types.

- Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008
widl: Check that fields in structures and unions referenced by non-local functions can be marshalled and that their attributes are consistent.


-Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008
widl: The implicit_handle attribute is allowed with a handle explicitly specified in the function parameters. In that case, that handle is used instead of the implicit handle. Fix the check for the explicit_handle attribute being specified without a handle being specified in the function parameters, even though issuing an error is wrong. (Thanks to Marcus Meissner & Coverity for spotting that the check didn't do what it was supposed to do.)

- Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008
widl: Automatically add "handle_t IDL_handle" parameter to functions with no explicit handle specified whose containing interface has the explicit_handle attribute.

- Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008
widl: Issue an error instead of crashing for dividing by zero in a constant expression.

- Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008
widl: Add support for "->" and "." operators in expressions.

- Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008
widl: Add support for arrays in expressions.

- Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008
widl: Add support for '%' operator in expressions.

- Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008
widl: Fix operator precedence in expressions.

- Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008
widl: Require a constant expression for case statements.

- Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008
widl: Add support for comparison, exclusive or, logical not and positive operators in expressions.

- Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008
widl: Remove EXPR_MEMBERPTR and implement it using EXPR_PPTR and EXPR_MEMBER instead.

- Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008
widl: Don't free input_name in pop_import as we keep pointers to it in the var_t type now.

- Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008
widl: Pass the actual type into check_remoting_fields and check_field_common instead of the type name.

- Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008
widl: Check that expressions resolve so that expressions in generated code will compile. Also check that expressions return the correct type for the attribute.

- Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008
widl: Move expression functions to a new file, expr.c.

- Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008
widl: Use expr_resolve_type to get the type of the identifier in write_conf_or_var_desc. Remove the conversion of pointer types into base types as this was only needed due to lack of proper type resolving.

- Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008
widl: Remove duplicated code in the form of the write_struct_expr function by enhancing write_expr to allow toplevel identifiers to be prefixed by a string, if specified.

- Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008
widl: Implement lcid property on library declarations.

- Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008
widl: Construct the pointer chain while parsing pointers, rather than storing a ptr_level. This method is more flexible and somewhat simpler.

- Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008
widl: Allow NULL to be used in expressions.

- Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008
widl: Create a list of statements in the whole IDL file, instead of just a list of interfaces.

- Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008
widl: Add typedef statements to the statement lists.

- Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008
widl: Consolidate most of the inner loop of reg_typedefs into set_type.

- Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008
widl: Rename pident to declarator and parse the array declarations as part of declarators. This allows arrays to be used in typedefs and const statements.

- Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008
widl: Make the rules for parsing fields in structures, encapsulated unions and non-encapsulated unions more strict. Move the rules in fields that handle empty union cases into separate union rules so that they can't erroneously be accepted for structures or other types of unions.

- Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008
widl: Add support for declaring multiple fields of a structure in one statement.

- Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008
widl: Add support for string literals and wide-string literals in expressions.

- Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008
widl: Create a statement object for import statements. Move the writing of include directives into the generated header into header.c.

- Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008
widl: Move the func_declarator rule entirely into direct_declarator.

- Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008
widl: Add typedefs to typelibs which have the public or uuid attributes, not any other attribute.

- Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008
widl: Support hex digits that use an uppercase 0X prefix.

- Rob Shearman <rob@codeweavers.com> Sun, 27 Apr 2008
widl: Accept integer constant suffixes in the lexer.

- Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008
widl: Keep const attributes applied to pointers when writing out the type. Use an attribute to store the const qualifier for the pointer and type. Allow multiple type-qualifiers to be applied to a type by adding a declaration-specifier rule that encompasses type-qualifiers and types.

- Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008
widl: Add support for "inline" on function definitions. Fix applying calling convention to function type.

- Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008
widl: Make constdef and externdef take a declarator instead of an ident so that functions and arrays can be defined using the statements.

- Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008
widl: Allow pointer attributes to be applied to function pointers.

- Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008
widl: callback, code, comm_status and in_line are attribute names, not keywords.

- Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008
widl: Prepare for supporting storage classes in declaration statements. Return a decl_spec_t structure from decl_spec rules so that the storage
class and type qualifiers can both be returned.

- Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008
widl: Add the parsing of storage classes into declaration-specifiers. Support the static and register keywords. This consolidates externdef and constdef rules into one declaration rule.

- Rob Shearman <rob@codeweavers.com> Thu, 1 May 2008
widl: Consolidate writing of COM and dispatch interfaces into one function to remove duplicated code. Split up the writing into start and end to eventually support the style MIDL uses where it writes declared types, etc. between the start and end of the interface. Make internal header functions take the file pointer to print to. Don't write interface IDs for non-object interfaces and always write handle declarations even if the interface has no methods, like MIDL does.

- Gerald Pfeifer <gerald@pfeifer.com> Fri, 2 May 2008
widl: Fix syntax to also work with older versions of bison.

svn path=/trunk/; revision=37313
2008-11-12 19:26:25 +00:00
Dmitry Chapyshev
f4ea27302a - Update Russian translation
svn path=/trunk/; revision=37310
2008-11-12 17:02:37 +00:00
Matthias Kupfer
121e7e4d60 - basic install drive listing code (due to lack of reactos functionality not working yet)
- add and enable advanced settings dialog
- get install directory from txtsetup.sif
- set changed install directory
- fix dialog resource for several languages

svn path=/trunk/; revision=37309
2008-11-12 16:08:28 +00:00
Johannes Anderwald
3414ea909e - Fix length check
- CID 556/R2

svn path=/trunk/; revision=37304
2008-11-12 14:23:36 +00:00
Dmitry Chapyshev
346f2efabf - Sync uxtheme with wine head
svn path=/trunk/; revision=37303
2008-11-12 13:02:29 +00:00
James Tabor
d5ec19ab4e - Works with qemu, but, not with real hardware.
svn path=/trunk/; revision=37298
2008-11-11 23:11:39 +00:00
James Tabor
1d032f9b88 - Pass thread pointers during callback.
svn path=/trunk/; revision=37297
2008-11-11 22:35:19 +00:00
Johannes Anderwald
877246b90c - Fix directory parameter for files lying in the root of a drive (C: -> C:\)
svn path=/trunk/; revision=37296
2008-11-11 22:24:14 +00:00
Johannes Anderwald
977ba0d1f6 - Fix execution in ShellExecute for files which have multiple dots
svn path=/trunk/; revision=37295
2008-11-11 22:19:39 +00:00
Johannes Anderwald
ec4c2d1df2 - Pass the full path of msiexec executable
svn path=/trunk/; revision=37292
2008-11-11 21:26:44 +00:00
Johannes Anderwald
ff625d5d2e - Fix column header order
- bug 3868

svn path=/trunk/; revision=37289
2008-11-11 15:31:08 +00:00
Stefan Ginsberg
ca981b69ba - Clear the flag before bugchecking
svn path=/trunk/; revision=37287
2008-11-11 13:23:14 +00:00
Matthias Kupfer
8fcff37f35 - set selected setup type (install/repair) when selecting next property sheet
- get device data (computer, display, keyboard) from txtsetup.sif
- set selected devices when selecting next property sheet
- fix Englisch and German device property sheet

svn path=/trunk/; revision=37286
2008-11-11 10:26:02 +00:00
Daniel Reimer
758f26286e Bug 3839: Italian resources update by Paolo Devoti
Bug 3851: Korean translation of Solitaire by Seungju Kim
Bug 3852: Ukrainian translation update by Artem Reznikov
Bug 3866: some updates for slovak and one fix typo by Mario Kacmar

svn path=/trunk/; revision=37285
2008-11-11 09:16:49 +00:00
Daniel Reimer
d756d7304e Bug 3852: Ukrainian translation update by Artem Reznikov
svn path=/trunk/; revision=37284
2008-11-11 09:05:49 +00:00
Matthias Kupfer
7732295e3c - get default language and keyboard layout selection from txtsetup.sif and preselect the entries
- set selected language and keyboard layout when selecting next property sheet

svn path=/trunk/; revision=37283
2008-11-10 19:46:58 +00:00
Gregor Schneider
886c6bd7d5 Implement ConvertSecurityDescriptorToStringSecurityDescriptorW based on Wine code.
svn path=/trunk/; revision=37281
2008-11-10 14:25:24 +00:00
Gregor Schneider
db0c66dcb0 Implement LookupPrivilegeNameW based on Wine code.
svn path=/trunk/; revision=37280
2008-11-10 14:23:57 +00:00
Aleksey Bragin
71e82c9ecb - Update readme.wine and delete an out-of-date reactos tree structure explanation.
svn path=/trunk/; revision=37277
2008-11-10 12:03:57 +00:00
Aleksey Bragin
15b8de80eb - Make rpcss an autostart service. Finally fixes "cmd windows spawning bug" (when rpcss.exe is infinitely spawned by wine's ole32 while (TRUE) loop).
svn path=/trunk/; revision=37276
2008-11-10 11:17:50 +00:00
Aleksey Bragin
25b9047647 - We use CcPin* interface for FAT tables and directory entries access - indicate so to CcInitializeCacheMap.
svn path=/trunk/; revision=37275
2008-11-10 10:22:33 +00:00
Michael Martin
f67c2cda8c - PRPC_UNICODE_STRING is the same as PUNICODE_STRING. Correct DPRINT1 for those types.
svn path=/trunk/; revision=37274
2008-11-10 10:21:00 +00:00
Michael Martin
021dbda887 - Remove WINE_DECLARE_DEBUG_CHANNEL.
- Call ElfrReportEventW with correct parameters.
- In Prep for implementing EventLog Api's.

svn path=/trunk/; revision=37273
2008-11-10 10:18:00 +00:00
Aleksey Bragin
28e480b966 - Revert 25073 (vfatfs part). CcCopyRead is guaranteed (see WDK) to succeed if Wait parameter is TRUE, and the only case of failure is when Wait is FALSE meaning there is a need in additional processing time, hence returning of STATUS_PENDING. This fixes the "unable to read system hive" problem when booting Windows 2003 with this driver.
See issue #1855 for more details.

svn path=/trunk/; revision=37272
2008-11-10 09:57:42 +00:00
Johannes Anderwald
65b34c3e18 - Show Drive Tools Page only local harddisks
svn path=/trunk/; revision=37271
2008-11-10 07:43:37 +00:00
KJK::Hyperion
8b822b8a26 Hopefully, the definitive spec files commit. Dedicated to Samuel Serapión, who reported issues with my previous commits.
modified   tools/rbuild/backend/mingw/modulehandler.cpp
   Specifying .spec/.pspec files twice (<importlibrary> and <file>) didn't really make sense (stubs are unusable without the .def and viceversa), so they can now be only specified in <importlibrary>. I'd rather drop <importlibrary> completely and specify .def/.spec/.pspec as <file>s, but it's too hard so it'll have to wait. At least we got rid of one invocation of the preprocessor for .pspec files
   Simplified and improved rules to generate spec and stub files from .pspec
   Did you know we set the wrong DLL name in autogenerated .def files? Always pass the right name to winebuild with --filename, just to be sure
   Fully support compiling .pspec/.spec files from the intermediate directory
   Import libraries don't actually depend on stub/thunk files

modified   tools/rbuild/backend/mingw/modulehandler.h
   Removed some dead code

modified   tools/rbuild/backend/mingw/rule.cpp
modified   tools/rbuild/module.cpp
modified   tools/rbuild/rbuild.h
   Allow <importlibrary dllname="..." ...> in all module types. Why? Why not?

modified   Makefile
   Added ECHO_CPP to echo invocations of the C preprocessor

Everything else: removed all <file> entries for .spec/.pspec files. It was just maintenance overhead

svn path=/trunk/; revision=37270
2008-11-10 02:31:24 +00:00
Gregor Schneider
f05d09c4b3 - Create the XLateObj between background and brush color
- Allows hatched brush colors to show
- Edit a FIXME: a bitmap is not a brush information

svn path=/trunk/; revision=37269
2008-11-09 22:02:46 +00:00
Gregor Schneider
8a50f7448d Fix BitBlt MERGEPAINT operation command.
svn path=/trunk/; revision=37268
2008-11-09 18:38:02 +00:00
Cameron Gutman
c5a57ba3d6 - Merge aicom-network-fixes up to r37266
svn path=/trunk/; revision=37267
2008-11-09 18:17:00 +00:00
Cameron Gutman
e570a2c8de - Don't complete unimplemented IOCTL_DISK_FORMAT_TRACKS/IOCTL_DISK_FORMAT_TRACKS_EX with STATUS_SUCCESS
- Floppy drivers don't need to support IOCTL_DISK_GET_PARTITION_INFO so complete the irp with STATUS_INVALID_DEVICE_REQUEST

svn path=/trunk/; revision=37265
2008-11-09 16:15:50 +00:00
Cameron Gutman
7ad74fb236 - Remove the work item from the work queue in ChewRemove
svn path=/trunk/; revision=37264
2008-11-09 15:55:55 +00:00
Cameron Gutman
3a2183900e - Revert part of r37261
svn path=/trunk/; revision=37262
2008-11-09 15:35:18 +00:00
Cameron Gutman
bc6140e5eb - Mark the irp pending before adding it to the queue
- Fix a few comments
 - Return a better status when a drive isn't present
 - Complete the read/write irp with IO_DISK_INCREMENT instead of IO_NO_INCREMENT

svn path=/trunk/; revision=37261
2008-11-09 15:21:59 +00:00
Eric Kohl
1fc7265fa2 Sync to wine-0.9.60:
- Rob Shearman <rob@codeweavers.com> Fri, 11 Apr 2008
widl: Support non-default calling conventions for object methods.

- Rob Shearman <rob@codeweavers.com> Fri, 11 Apr 2008
widl: Support non-default calling conventions for non-object functions.

- Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008
widl: Check that attributes applied to interfaces, functions and arguments are applicable and issue an error if not.

- Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008
widl: Check that attributes applied to typedefs and fields are applicable and issue an error otherwise.

- Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008
widl: Make the attrs parameter passed to start_typelib const.

- Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008
widl: The odl attribute is valid for dispinterfaces.

- Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008
widl: Check that attributes are applicable for libraries,  modules, dispinterfaces and coclasses and otherwise issue an error.

- Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008
widl: Output a warning if duplicate attributes are specified.

- Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008
widl: Add support for the broadcast and idempotent operation attributes.

- Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008
widl: Write out TYPEFLAG, FUNCFLAG and VARFLAG flags for all attribute we currently parse.
Add FIXMEs for the remaining ones and remove the warning for unimplemented attribute types since we now support all the attributes that we parse.

- Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008
widl: Add functions to print an error or warning message using location information to enable these to be printed accurately when a check is done after an element is parsed.
Add location information to variable automatically, since this is will be useful for type checking of arguments.

- Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008
widl: Add checking to arguments of non-local functions.
Check that out arguments have enough levels of indirection and that they don't derive from void * or a function pointer.

- Rob Shearman <rob@codeweavers.com> Tue, 15 Apr 2008
widl: Change alls calls to error in the parser to error_loc so that line number information is printed.

svn path=/trunk/; revision=37260
2008-11-09 14:21:53 +00:00
Gregor Schneider
5387d5fcac - Don't hard code pixel size to 16bpp.
- Fixes crashes in 8bpp and halved bitmaps in 32bpp.
- This SRCCOPY code is not in use atm and will probably stay this way because it's slower then the version in win32k/dib.

svn path=/trunk/; revision=37259
2008-11-09 14:00:31 +00:00
Sylvain Petreolle
6276513100 fix UNICODE redefined warning
svn path=/trunk/; revision=37258
2008-11-09 13:56:31 +00:00
Aleksey Bragin
abb8c42552 Juan Sánchez Jurado <juan.s.jurado@gmail.com>
- Fixed HAL DMA problem that caused floppy driver not to work (the point was that function had to copy the read sector back to the MDL buffer and it was not doing that because of the problem with braces, broken in rev is 24464).
See issue #2287 for more details.

svn path=/trunk/; revision=37254
2008-11-09 08:23:16 +00:00
Dmitry Chapyshev
34b8a16cc7 - Sync inetcomm with Wine Head
- Sync imnxport.idl and mimeole.idl

svn path=/trunk/; revision=37250
2008-11-08 07:14:34 +00:00
Michael Martin
4d542fdfab - RSetServiceStatus: Don't return ERROR_INVALID_DATA when dwControlsAccepted = 0. Services can and will do this, for example when dwCurrentState is SERVICE_START_PENDING. See bug #3817 for more info.
svn path=/trunk/; revision=37246
2008-11-07 19:10:39 +00:00
Aleksey Bragin
2536c374eb - Fix build.
svn path=/trunk/; revision=37245
2008-11-07 18:20:18 +00:00
Aleksey Bragin
31ada60dd5 - Add missing definitions to headers.
- Do not use "with tag" when freeing the system buffer, because drivers are allowed to re-allocate their own buffer, which may have a different tag.

svn path=/trunk/; revision=37244
2008-11-07 17:40:44 +00:00
Michael Martin
de0a39ef52 - Check for GetServiceConfig returning NULL, which occurs if entries for the service are not in registry.
svn path=/trunk/; revision=37243
2008-11-07 13:39:11 +00:00
Ged Murphy
6a787e6143 fix return logic typo
svn path=/trunk/; revision=37242
2008-11-07 12:58:33 +00:00
Ged Murphy
ad7c2a347a Convert rpcss back to a service
svn path=/trunk/; revision=37241
2008-11-07 12:49:51 +00:00
Aleksey Bragin
7572fe233a - Sync ole32 to Wine-20081105 (matching rpcrt4 sync). Tested with two versions of FoxIt for bug #2361, it doesn't happen. Also tested with MS Office 2003 installation (which goes up to "Writing system registry values").
- Remove epm server building from rpcrt4, it belongs to rpcss.

svn path=/trunk/; revision=37240
2008-11-07 11:00:30 +00:00
Aleksey Bragin
294d584fb0 - Import rpcss from Wine. It has a serious disadvantage: it's not a real service, but a simple exe app, which (in ReactOS) just infinitely waits after being started. In order to turn it into a real startable/stoppable service, ole32 needs to be modified to make it proper. Which is probably against Wine policy of "let's hack it together to make it work somehow and forget about it".
svn path=/trunk/; revision=37239
2008-11-07 10:52:49 +00:00
Aleksey Bragin
7dd446c187 - Sync rpcrt4_winetest too.
svn path=/trunk/; revision=37231
2008-11-06 20:12:22 +00:00
Stefan Ginsberg
87658f5321 - ASSERTify a hacky workaround -- this shouldn't happen anymore in ros
svn path=/trunk/; revision=37230
2008-11-06 19:21:46 +00:00
Aleksey Bragin
9d11125a93 - Update the _ros.diff. Usual changes are there (unfortunately incompatibilites in Wine still exist, RpcMgmtWaitForServerListen is still not implemented there, and their dependency on unix sockets is totally out of place). On the good side I could get rid of disabling unix-sockets stuff in source code by slightly improving unix_func.
svn path=/trunk/; revision=37229
2008-11-06 19:10:03 +00:00
Stefan Ginsberg
def2221abb - Comment out unused, static PaintUnderLappers
svn path=/trunk/; revision=37228
2008-11-06 18:38:21 +00:00
Stefan Ginsberg
0952af92ec - Make Kdbg "bugcheck" command work -- Kdbg isn't re-entrant, so defer the bugcheck and exit the input loop
svn path=/trunk/; revision=37227
2008-11-06 18:33:56 +00:00
Stefan Ginsberg
06566a1756 - KdbpCmdBugCheck: Use correct bugcheck code
svn path=/trunk/; revision=37226
2008-11-06 18:03:57 +00:00
Aleksey Bragin
f08921caf1 - Sync rpcrt4.dll to Wine-20081106. ros.diff and regtests aren't updated yet.
svn path=/trunk/; revision=37225
2008-11-06 17:35:54 +00:00
Aleksey Bragin
ab7c1ded60 - Add endpoint mapping and DCE types IDL from Wine.
svn path=/trunk/; revision=37224
2008-11-06 12:23:44 +00:00
James Tabor
c15d69d936 - Fix WidenPath. Now Area.exe runs and crashes when using real hardware. That is a good thing. We now know our Xorg based region code has problems. It allocates all the memory building PolyPolygon region data.
svn path=/trunk/; revision=37223
2008-11-06 11:55:08 +00:00
James Tabor
7438df3dcd - Fix Path drawing.
svn path=/trunk/; revision=37222
2008-11-06 11:48:51 +00:00
James Tabor
24b6d30dcb - Make sure we process path for Rectangles and Polygons.
svn path=/trunk/; revision=37221
2008-11-06 02:36:10 +00:00
KJK::Hyperion
7eff87cf56 Merging r37219
svn path=/trunk/; revision=37220
2008-11-06 00:24:40 +00:00
Johannes Anderwald
18640a8731 - Ancient member which is no longer used
svn path=/trunk/; revision=37216
2008-11-05 19:21:22 +00:00
Andrew Munger
93b068850c Fix a fencepost bug.
Correct a glaring typo.
Make code less ugly.

svn path=/trunk/; revision=37215
2008-11-05 19:19:56 +00:00
Stefan Ginsberg
7e33ef3d9e - Remove unnecessary typedef
svn path=/trunk/; revision=37214
2008-11-05 19:06:02 +00:00
Stefan Ginsberg
d1cadc84e9 - Fix an array overflow
svn path=/trunk/; revision=37213
2008-11-05 18:00:24 +00:00
Aleksey Bragin
b21beacd60 - Fix behavior of KeRundownQueue (save the next link before freeing it and use proper locking and enumeration code).
- This fixes behavior of I/O completion ports (thanks to Stefan and Alex for testing, reporting and fixing).

svn path=/trunk/; revision=37212
2008-11-05 17:03:04 +00:00
Aleksey Bragin
04b0bb8994 - Sync WRC to Wine-20081105 (a few nice bugfixes).
svn path=/trunk/; revision=37211
2008-11-05 16:16:19 +00:00
Aleksey Bragin
e1f82ec004 - Update NLS files from Wine (without adding new ones though).
svn path=/trunk/; revision=37210
2008-11-05 16:10:32 +00:00
Daniel Reimer
559030c1fd Accidently commited a hack together with r37190. This will be reverted.
svn path=/trunk/; revision=37208
2008-11-05 15:32:27 +00:00
Aleksey Bragin
8a89143b07 - Update wmc to Wine-20081105 (mostly typo fixes).
svn path=/trunk/; revision=37207
2008-11-05 15:31:34 +00:00
Aleksey Bragin
4bdaa4f74c - Fix build.
svn path=/trunk/; revision=37206
2008-11-05 15:25:19 +00:00
Aleksey Bragin
bef44e136e - Update winebuild to Wine-20081105. All ReactOS-specific stuff kept intact.
svn path=/trunk/; revision=37205
2008-11-05 15:14:58 +00:00
Aleksey Bragin
c3be025536 - Update wpp to Wine-20081105.
svn path=/trunk/; revision=37204
2008-11-05 14:47:55 +00:00
Aleksey Bragin
ca08af6ba3 - Update unicode lib to Wine-20081105 (~1.1.7 release).
svn path=/trunk/; revision=37203
2008-11-05 14:35:45 +00:00
James Tabor
0f59670d6e - Update Font types. Finish GetKerningPairs. Minor code cleanup.
svn path=/trunk/; revision=37201
2008-11-05 13:02:15 +00:00
Aleksey Bragin
bf15620dbe - Remove a duplicate of _i64toa, ReactOS has it for quite some time now in CRT lib.
svn path=/trunk/; revision=37199
2008-11-05 09:42:42 +00:00
Aleksey Bragin
da4a4656ca - Fix ncftp build.
svn path=/trunk/; revision=37198
2008-11-05 09:32:32 +00:00
KJK::Hyperion
d4e2952aa7 modified lib/sdk/crt/conio/cprintf.c
Call va_start before, and va_end after, each call to _vsnprintf

modified   ntoskrnl/ntoskrnl.pspec
   We pass all include directories and defines to the pspec preprocessor, so we can omit paths in pspec includes

svn path=/trunk/; revision=37196
2008-11-05 01:14:54 +00:00
James Tabor
f08fcecb82 - Add and update Gdi entry flags.
svn path=/trunk/; revision=37195
2008-11-05 00:38:52 +00:00
James Tabor
f46193a7d2 Patch by Daniel Zimmerman : Fix a lot of missing ExFreePoolWithTag. See bug 3848.
svn path=/trunk/; revision=37194
2008-11-04 23:49:07 +00:00
James Tabor
be012b6c41 - Patch by hto: Fix bugs in Gdi32.dll and User32.dll, see bug 3847.
svn path=/trunk/; revision=37193
2008-11-04 23:32:11 +00:00
Sylvain Petreolle
7fddc37e2e remove unusable vb3 and vb4 runtimes from Downloader,
since their installers aren't in PE format.

svn path=/trunk/; revision=37192
2008-11-04 22:33:09 +00:00
Aleksey Bragin
cb1ef2c505 - Use ExInitializeSystemLookasideList instead of ExInitializeNPagedLookasideList for the internal I/O lookaside lists (just as it was done for the Ob lists a couple of months ago).
- Optimize lookaside allocation by using one large contiguous buffer instead of fragmented buffers for each CPU.
- Use NT structure names instead of ReactOS-only structures.
- Fixes some memory corruption issues when doing I/O completion (found by Stefan and winetests).

svn path=/trunk/; revision=37191
2008-11-04 21:55:55 +00:00
Daniel Reimer
0bd254167c Bug 3830: Spanish netshell update and more by Javier Remacha
Bug 3833: Ukrainian translation update by Artem Reznikov
Bug 3834: another fix for slovak translationby Mario Kacmar

svn path=/trunk/; revision=37190
2008-11-04 21:28:06 +00:00
Daniel Reimer
f033a2955d Bug 3830: Spanish netshell update and more by Javier Remacha
Bug 3833: Ukrainian translation update by Artem Reznikov
Bug 3834: another fix for slovak translationby Mario Kacmar

svn path=/trunk/; revision=37189
2008-11-04 21:27:56 +00:00
KJK::Hyperion
00ed4c1394 KJK::Hyperion is proud to present "dllimport purity", another landmark commit that you should really build only after a "clean"
Disclaimer: in an uncharacteristic and daring move, I actually built, installed and booted this revision

modified   tools/rbuild/backend/mingw/mingw.cpp
modified   tools/rbuild/backend/mingw/modulehandler.cpp
modified   tools/rbuild/module.cpp
modified   tools/rbuild/project.dtd
modified   tools/rbuild/rbuild.h
modified   include/crt/_mingw.h
   New module attribute iscrt for marking modules that implement a C runtime library
   New module attribute crt for compiling and linking modules to a specific C runtime library. Can be "ntdll" (for ntdll.dll) "msvcrt" (msvcrt.dll), "crt" (statically-linked runtime), "libcntpr" (libcntpr.lib), "dll" (one of the <library> entries specifies a CRT DLL) or "static". Defaults to "msvcrt" for Win32 modules, to "static" for CRT modules themselves, and to "dll" for drivers
   Define _DLL for code that compiles against a dynamically-linked CRT
   Define __MINGW_IMPORT and _CRTIMP according to whether _DLL is defined. We finally use __declspec(dllimport) somewhere, anywhere (SDK headers still don't use it)
   Bonus fix: actually use compiler-specific command line flags when compiling files

modified   lib/3rdparty/adns/adns.rbuild
modified   lib/3rdparty/libxml2/libxml2.rbuild
modified   lib/3rdparty/mingw/mingw.rbuild
   And for the downside: static libraries that will be linked to a module that links to the CRT dynamically have to be compiled for a dynamically-linked CRT, as well. Say it out aloud.

modified   base/applications/wordpad/wordpad.rbuild
modified   base/setup/usetup/usetup.rbuild
modified   dll/3rdparty/dxtn/dxtn.rbuild
modified   dll/3rdparty/freetype/freetype.rbuild
modified   dll/3rdparty/mesa32/mesa32.rbuild
modified   dll/cpl/desk/desk.rbuild
modified   dll/cpl/input/input.rbuild
modified   dll/cpl/intl/intl.rbuild
modified   dll/cpl/joy/joy.rbuild
modified   dll/cpl/main/main.rbuild
modified   dll/cpl/mmsys/mmsys.rbuild
modified   dll/cpl/odbccp32/odbccp32.rbuild
modified   dll/cpl/powercfg/powercfg.rbuild
modified   dll/cpl/sysdm/sysdm.rbuild
modified   dll/cpl/telephon/telephon.rbuild
modified   dll/cpl/timedate/timedate.rbuild
modified   dll/cpl/usrmgr/usrmgr.rbuild
modified   dll/directx/ddraw/ddraw.rbuild
modified   dll/directx/dsound/dsound.rbuild
modified   dll/directx/wine/wined3d/wined3d.rbuild
modified   dll/nls/idndl_redist/idndl_redist.rbuild
modified   dll/nls/normaliz_redist/normaliz_redist.rbuild
modified   dll/shellext/deskadp/deskadp.rbuild
modified   dll/shellext/deskmon/deskmon.rbuild
modified   dll/shellext/fontext/fontext.rbuild
modified   dll/win32/dhcpcsvc/dhcpcsvc.rbuild
modified   dll/win32/dnsapi/dnsapi.rbuild
modified   dll/win32/glu32/glu32.rbuild
modified   dll/win32/icmp/icmp.rbuild
modified   dll/win32/winmm/midimap/midimap.rbuild
modified   drivers/video/displays/framebuf/framebuf.rbuild
modified   drivers/video/displays/framebufacc/framebufacc.rbuild
modified   drivers/video/displays/vga/vgaddi.rbuild
modified   subsystems/win32/csrss/csrss.rbuild
modified   subsystems/win32/csrss/win32csr/win32csr.rbuild
modified   subsystems/win32/win32k/win32k.rbuild
   Don't specify msvcrt explicitely as a <library> if it's going to be linked implicitely as the CRT
   <library>libcntpr</library> -> crt="libcntpr"
   Remove miscellaneous unused <library> entries

modified   dll/win32/crtdll/crtdll.rbuild
modified   dll/win32/msvcrt20/msvcrt20.rbuild
modified   dll/win32/msvcrt40/msvcrt40.rbuild
modified   dll/win32/msvcrt/msvcrt.rbuild
   Mark CRT DLLs as CRT modules

modified   dll/win32/user32/windows/font.c
modified   include/reactos/wine/unicode.h
   Don't redefine or redeclare CRT functions

modified   dll/win32/ws2_32/include/ws2_32.h
   Arch, you idiot, it's defined in <stdlib.h>

modified   include/crt/ctype.h
modified   include/crt/wctype.h
   Don't import ctype routines that were already defined as inlines

modified   include/crt/stdio.h
modified   include/reactos/wine/config.h
   Avoid linking to libmingwex.a if possible

modified   base/applications/taskmgr/taskmgr.rbuild
modified   tools/nci/nci.mak
modified   tools/nci/ncitool.c
modified   dll/ntdll/ntdll.rbuild
   Mark ntdll module as a CRT
   New "ntsys" module to import just Nt/Zw from ntdll.dll. Avoids accidentally linking to ntdll.dll's CRT when importing system calls

modified   include/psdk/winternl.h
   Nope, it doesn't.

modified   base/applications/network/net/help.c
modified   base/applications/network/net/main.c
   Replace printf with puts, or GCC will do it on its own and link to the dllimport thunk for puts

modified   base/applications/network/ping/ping.c
   Removed broken, unnecessary workaround

modified   base/shell/cmd/cmd.rbuild
   Simplify cmd module

This commit dediHAPPY BIRTHDAY STEFAN GINSBERG <3 <3 <3

svn path=/trunk/; revision=37187
2008-11-04 18:16:58 +00:00
James Tabor
3940878911 - Fix RealizationInfo, it should use DC font not cFont if 0.
svn path=/trunk/; revision=37186
2008-11-04 13:05:47 +00:00
James Tabor
122fb58d8f - Fix code page and charector set support. More miscellaneous changes and fixes.
svn path=/trunk/; revision=37185
2008-11-04 12:49:49 +00:00
Dmitry Chapyshev
90115aa977 - Change params types for NtUserLockWindowUpdate
- Implement LockWindowUpdate in user32 (but not implemented in win32k)

svn path=/trunk/; revision=37184
2008-11-04 12:29:47 +00:00
Dmitry Chapyshev
b4d0bc40ac - Update Russian translation
svn path=/trunk/; revision=37182
2008-11-04 06:34:39 +00:00
James Tabor
84bb6344bf - Update and fix CodePage and CharSet.
svn path=/trunk/; revision=37180
2008-11-04 01:57:38 +00:00
Johannes Anderwald
6b9c6296db - Apply changes to Hide / Show Network Notification setting on exit
svn path=/trunk/; revision=37179
2008-11-03 22:13:24 +00:00
Johannes Anderwald
60cea54fbe - Check if IContextMenu_InvokeCommand succeeded
- Pass the identifiers of string as id to _InsertMenuItem function
- Should fix invoking control panel items

svn path=/trunk/; revision=37177
2008-11-03 21:44:34 +00:00
Colin Finck
1daef4a078 Carlo Bramini (carlo.bramix@libero.it)
- Fix the display of Line and Column in the Status Bar and add language resources for this

Patch was slightly modified by me to also react on WM_KEYDOWN messages, so that the line/column is already updated, when you're holding down the buttons. (like Windows' notepad does by the way)
We still have to keep WM_KEYUP though, otherwise this doesn't work properly when being used with Page Up/Page Down.

See issue #3702 for more details.

svn path=/trunk/; revision=37176
2008-11-03 21:23:57 +00:00
Johannes Anderwald
178ca611e8 - Dont display NCRP_QUERY_PROPERTY_UI when the notification object has already been created
svn path=/trunk/; revision=37173
2008-11-03 18:42:56 +00:00
Christoph von Wittich
2bf8a47670 ExFreePool -> ExFreePoolWithTag
Status != STATUS_SUCCESS -> !NT_SUCCESS(Status)

svn path=/trunk/; revision=37171
2008-11-03 16:22:44 +00:00
Christoph von Wittich
3d6eedfc0e some translations: GreatLordish -> English
svn path=/trunk/; revision=37170
2008-11-03 14:39:03 +00:00
Gregor Schneider
bbf8408292 - Several ExFreePool -> ExFreePoolWithTag changes (local allocations)
- Tested for ~2 weeks now, no BAD_POOL_CALLER's so far

svn path=/trunk/; revision=37169
2008-11-03 13:26:03 +00:00
Gregor Schneider
3e1f229f1c StretchBlt:
- Enable unsupported bit depth dprint (4bpp)
- Respect the destination offset instead of always starting the blt at 0,0 (8/16bpp)
- Adapt routine from 8/16/32bpp, tested to be approx 15-25% faster than the old one (24bpp)

svn path=/trunk/; revision=37168
2008-11-03 12:40:24 +00:00
Dmitry Chapyshev
bc1f150d78 - Move IsWow64Process to proc.c
- Implement FatalAppExitW (based on Wine)

svn path=/trunk/; revision=37167
2008-11-03 12:27:39 +00:00
Dmitry Chapyshev
b79ada3280 - Implement IsWow64Process (based on Wine)
svn path=/trunk/; revision=37165
2008-11-03 11:46:02 +00:00
Dmitry Chapyshev
4edc51bc5a - Implement GetCPInfoExA/W (not fully)
- Move CODEPAGE_ENTRY struct to header file
- Small fix HeapWalk

svn path=/trunk/; revision=37164
2008-11-03 11:27:17 +00:00
James Tabor
3e91f16362 - Cleanup UnrealizeObject and set dvNumAxes in CreateFontIndirect.
svn path=/trunk/; revision=37163
2008-11-03 08:39:08 +00:00
Dmitry Chapyshev
315219e37d - Implement HeapWalk (based on Wine)
svn path=/trunk/; revision=37162
2008-11-03 08:37:50 +00:00
James Tabor
c558a7b271 - Fix C in RealizeFontInit.
svn path=/trunk/; revision=37161
2008-11-03 07:04:04 +00:00
James Tabor
cc68aa2bcc - Remove locking in gdi batch.
svn path=/trunk/; revision=37160
2008-11-03 06:52:42 +00:00
James Tabor
53586450b4 - Add new function for locking text font objects when realized. This is for batching support.
- Batching works for selected fonts, due to a system initialization bug this is disabled.
- Miscellaneous changes and updates.


svn path=/trunk/; revision=37159
2008-11-03 05:38:02 +00:00
KJK::Hyperion
bed3b885b4 idndl_redist and normaliz_redist aren't ready for prime time yet
svn path=/trunk/; revision=37158
2008-11-02 22:03:31 +00:00
Jeffrey Morlan
e0d327a9ec ReadBatchLine: Add a \n to the line if it doesn't already have one
svn path=/trunk/; revision=37155
2008-11-02 21:56:34 +00:00
Aleksey Bragin
ae1019f232 - Remove WIN32_WINNT override.
svn path=/trunk/; revision=37154
2008-11-02 19:12:20 +00:00
Aleksey Bragin
eaf88dc90a - Remove WINVER definition.
- Fix no-EOL-at-EOF warnings.

svn path=/trunk/; revision=37152
2008-11-02 19:07:00 +00:00
Stefan Ginsberg
6eb05ceb03 - Stub out IoTranslateBusAddress, PoCancelDeviceNotify, PoRegisterDeviceNotify, PoRequestShutdownEvent, PoSetHiberRange and PoShutdownBugCheck
- Add missing KiCheckForSListAddress

svn path=/trunk/; revision=37151
2008-11-02 16:33:43 +00:00
Aleksey Bragin
83dc43c8d4 Dmitry Gorbachev
- Fix a bug in OEM to Unicode conversion code (wrong cast).
See issue #3837 for more details.

svn path=/trunk/; revision=37150
2008-11-02 15:15:37 +00:00
Stefan Ginsberg
d14b6b0318 - Sync 36654 to trunk
svn path=/trunk/; revision=37149
2008-11-02 14:08:49 +00:00
James Tabor
174ffe7d8c - Move functions out of freetype. Implemented FT: GetKerningPairs and RealizationInfo. Other misc changes.
svn path=/trunk/; revision=37148
2008-11-02 12:17:15 +00:00
Stefan Ginsberg
8e1c35ecc1 - Stub out Ke386IoSetAccessProcess, Ke386SetIoAccessMap and Ke386QueryIoAccessMap
- Reference: "The Simplest Device Drivers" http://www.freewebs.com/four-f/KmdTut/kmd03.html

svn path=/trunk/; revision=37147
2008-11-02 11:48:24 +00:00
James Tabor
e8c8ee7afe - Update FONTGDI and TEXTOBJ. Added support for FT WinFNT. Fixed FillTM so it can pass underline and strike out support.
svn path=/trunk/; revision=37146
2008-11-02 00:57:17 +00:00
KJK::Hyperion
75f046ab4e Arch Blackmann's rules for preprocessed spec files were quite broken (of course). Fixing them.
* Add the module name to the name of the intermediate .spec file generated by the preprocessor. Fixes race condition in parallel builds of HAL targets
 * Pass module defines and includes to the preprocessor. Fixes a future bug that would have caused Aleksey to commit suicide and ReactOS to be forked into Debian GNU/ReactOS
 * Don't silently ignore stubs defined by .pspec files. What the hell, Arch?

Bonus improvement: cleaned up linker command, generating .exp files correctly as intermediate files with the appropriate dependencies. Happy Hallowmas!

svn path=/trunk/; revision=37145
2008-11-01 23:23:02 +00:00
KJK::Hyperion
5f616878c9 Remove all <file> entries for spec/pspec files that don't define any stubs (for real this time)
svn path=/trunk/; revision=37144
2008-11-01 23:11:38 +00:00
James Tabor
09c99cdf63 - Fix property for drawing.c.
svn path=/trunk/; revision=37143
2008-11-01 23:04:56 +00:00
James Tabor
fdea73d599 - Fix build, part of revision 37141.
svn path=/trunk/; revision=37142
2008-11-01 22:54:34 +00:00
James Tabor
6c481db7b0 - Patch by Daniel Zimmerman: Implement FoldStringA/W from wine, see bug 3253.
svn path=/trunk/; revision=37141
2008-11-01 22:44:54 +00:00
James Tabor
f539afa537 - Update from notes: NtUserInitialize.
svn path=/trunk/; revision=37140
2008-11-01 22:12:38 +00:00
Gregor Schneider
27985bf35b TransparentBlt:
- Fix bits and offset calculation (8 << 2 is not 24!)
- Fixes Download! bitmap in 24bpp mode, see bug #1583

svn path=/trunk/; revision=37139
2008-11-01 20:44:40 +00:00
Eric Kohl
032300fbc9 SEH protect all remote calls to the Eventlog Service.
svn path=/trunk/; revision=37138
2008-11-01 20:37:04 +00:00
Stefan Ginsberg
ae24c33a4f - Reapply 35812:
- RtlDispatchException: Call vectored exception handlers before doing anything else
- KiUserExceptionDispatcher: Call RtlDispatchException directly as it now takes care of vectored handling
- Rename RtlpExecuteVectoredExceptionHandlers to RtlCallVectoredExceptionHandlers, and fix return type
- References: "New Vectored Exception Handling in Windows XP" by Matt Pietrek
- New in this revision: Only call vectored handlers in user mode, as there is no such thing in kernel mode

svn path=/trunk/; revision=37137
2008-11-01 19:48:52 +00:00
Stefan Ginsberg
ed9780429d - Fix release build -- attempt 2
svn path=/trunk/; revision=37136
2008-11-01 19:35:23 +00:00
Stefan Ginsberg
6b1b673dca - Fix release build
svn path=/trunk/; revision=37135
2008-11-01 19:22:43 +00:00
Stefan Ginsberg
8a6a5c0d14 - Enable building ntkrnlmp
- SMP kernel now compiles. It doesn't boot and it won't run as we lack ACPI, SMT, a (proper) MP HAL, IPI and more.
- Dedicated to Aleksey, Alex and KJK <3 <3 <3

svn path=/trunk/; revision=37134
2008-11-01 18:21:39 +00:00
Stefan Ginsberg
48d2b528d2 - Implement the MP case for KiTimerExpiration and KiTimerListExpire
svn path=/trunk/; revision=37133
2008-11-01 18:16:17 +00:00
Aleksey Bragin
42cd339c49 - Refactor timer code to share more macros (see http://www.dcl.hpi.uni-potsdam.de/research/WRK/?p=32).
- Implement expiring timers when the user changes the system time. Previously these timers would never expire if the time was set past their expiration points.
- Fix a bug in KiInsertTreeTimer where, if a timer expired while we inserted it, we kept its Inserted state to TRUE.
- Fix a bug where, when changing the system time, the modifications were not done in the correct order, possibly resulting in a race condition happening if someone else was checking the time simultaneously.
- Tested with winetest kernel32 timer.
- Thanks to Alex and Stefan.

svn path=/trunk/; revision=37132
2008-11-01 15:33:05 +00:00
Cameron Gutman
53f5e2c282 - Fix a cast
svn path=/trunk/; revision=37131
2008-11-01 14:38:44 +00:00
James Tabor
86691d3afe - Update NtUserInitialize and show where it belongs.
svn path=/trunk/; revision=37130
2008-11-01 14:31:54 +00:00
James Tabor
7c20ea6571 - Update NtGdiGetGlyphOutline and NtGdiGetGlyphIndicesW.
svn path=/trunk/; revision=37128
2008-11-01 12:08:07 +00:00
Stefan Ginsberg
380df53cc2 - Implement most of SMP KeFlushEntireTb (currently unused though)
- Update KiTbFlushTimeStamp on both UP and MP after flushing

svn path=/trunk/; revision=37127
2008-11-01 12:01:58 +00:00
Stefan Ginsberg
39d59e06dd - Disable old and unused IPI code, add new NT compatible stubs
- KiIpiSendRequest should be a fastcall named KiIpiSend, fix this and fix callers
- Implement most of SMP KeIpiGenericCall. Also use KiReverseStallIpiLock instead of an uninitialized "KiIpiLock"
- Fix KiIpiServiceRoutine -- 2nd argument should be PKEXCEPTION_FRAME

svn path=/trunk/; revision=37126
2008-11-01 11:44:04 +00:00
Cameron Gutman
b949b9b7c3 - Make sure ThunkTable is not NULL before attempting to free it
- It gets set to NULL when the thunk is successfully added
 - I have no idea how this ever worked without this fix

svn path=/trunk/; revision=37125
2008-11-01 01:00:08 +00:00
Cameron Gutman
eaba38bfb8 - Release the guarded mutex before we return
svn path=/trunk/; revision=37124
2008-11-01 00:36:24 +00:00
Cameron Gutman
518ef62225 - Fix the check for too many devices
svn path=/trunk/; revision=37121
2008-10-31 23:59:49 +00:00
Cameron Gutman
4ed7116ff9 - We already do this in the SEH block. No need to do it twice.
svn path=/trunk/; revision=37120
2008-10-31 23:34:54 +00:00
Johannes Anderwald
f327269375 - Include zero byte in byte count to NtSetValueKey
svn path=/trunk/; revision=37119
2008-10-31 23:34:34 +00:00
Johannes Anderwald
ff88c3b914 - Include zero byte in byte count to NtSetValueKey
svn path=/trunk/; revision=37118
2008-10-31 23:21:15 +00:00
Eric Kohl
e4bbc4a8bf Pass machine name to RpcStringBindingComposeA/W properly.
svn path=/trunk/; revision=37117
2008-10-31 22:21:34 +00:00
Eric Kohl
5de1f53be7 EVENTLOG:
- Get rid of the globally created binding handle and use the WIDL-generated custom binding handles and context handles instead.
- Add workarounds to eventlogrpc.idl because WIDL is not yet able to handle attributes in typedefs correctly.

svn path=/trunk/; revision=37116
2008-10-31 22:18:12 +00:00
Timo Kreuzer
599b63ad89 merge 35742,35773,35780,35824,35969,36725,36952 from amd64 branch
svn path=/trunk/; revision=37115
2008-10-31 21:28:09 +00:00
Johannes Anderwald
0411efc7fc * Implement disabling network adapter (WIP, not yet supported)
svn path=/trunk/; revision=37114
2008-10-31 20:27:30 +00:00
James Tabor
75afd8303f - Update realization information and copyright notice for freetype.c.
svn path=/trunk/; revision=37113
2008-10-31 18:56:23 +00:00
Johannes Anderwald
f4a0005b90 - Display drive details for CDROMs
- Fix a bug in the free space calculation

svn path=/trunk/; revision=37112
2008-10-31 18:48:15 +00:00
Stefan Ginsberg
705683b520 - Don't dereference inside an SEH block after doing unsafe writes, as this could be missed in case a pointer is bad.
svn path=/trunk/; revision=37111
2008-10-31 13:16:01 +00:00
Johannes Anderwald
c28ade37e5 - Add Documentation for netshell
svn path=/trunk/; revision=37110
2008-10-31 11:26:23 +00:00
Johannes Anderwald
89ecbb1db8 - Make sure its DNS ServerList is NULL terminated
svn path=/trunk/; revision=37108
2008-10-30 20:25:27 +00:00
Johannes Anderwald
f71490ce76 - Fix ...
svn path=/trunk/; revision=37107
2008-10-30 20:12:09 +00:00
Johannes Anderwald
3575fd66a9 - Try fix GetNetworkParams api
svn path=/trunk/; revision=37106
2008-10-30 19:27:58 +00:00
Stefan Ginsberg
f467429483 - NtWrite/ReadFile: Don't hardcode Irp->RequestorMode to KernelMode! Instead, use the PreviousMode we saved earlier. This caused user mode APCs to be called from kernel mode, which is a...very...bad... idea.
- Spotted by bug 3607 and exposed by ntdll Winetests "file"
See issue #3607 for more details.

svn path=/trunk/; revision=37102
2008-10-30 15:59:00 +00:00
James Tabor
7bfa0b86e3 Implement GetFontUnicodeRanges, port from wine. Tested with wine gdi32 font crosstests.
svn path=/trunk/; revision=37099
2008-10-30 13:33:08 +00:00
Christoph von Wittich
a233789dd4 fix Armenian, Chinese, Hebrew, Hindi, Thai do not appear in the Input Language combo box
patch by hto
See issue #3818 for more details.

svn path=/trunk/; revision=37098
2008-10-30 13:27:11 +00:00
Matthias Kupfer
ffdfcde767 replacement for the white power switch (better contrast for small resolutions)
svn path=/trunk/; revision=37097
2008-10-30 13:09:58 +00:00
Johannes Anderwald
aac399c13a - Forgot this one
svn path=/trunk/; revision=37095
2008-10-30 12:44:25 +00:00
Matthias Kupfer
40114270cf - new directory for generic graphics (available in alterable format e.g. svg)
- replacement for shutdown/power off icon
- additional question mark icon (allows to change to tango desktop project icon set for message box icons)

svn path=/trunk/; revision=37094
2008-10-30 12:04:39 +00:00
Dmitry Chapyshev
d0418e7123 - Attempt to fix a bug 3255.
By means of Christoph_vW.
Not tested.

svn path=/trunk/; revision=37093
2008-10-30 11:14:40 +00:00
James Tabor
f5883c94d4 - Update Gdi GetFontLanguageInfo.
svn path=/trunk/; revision=37092
2008-10-30 10:48:49 +00:00
Johannes Anderwald
693488f7ff - Convert recovery option dialog to unicode
- Simply & optimize LoadRecoveryOptions function
- CID 786

svn path=/trunk/; revision=37091
2008-10-30 10:46:55 +00:00
James Tabor
b70d5a56a4 - Implemented: GetFontLanguageInfo based on wine. GetLanguageID, it reads the registry for default language type.
- Move more function in and out of freetype.c. Minor code fixes too.


svn path=/trunk/; revision=37090
2008-10-30 10:46:27 +00:00
Johannes Anderwald
b645f2b87e - Convert LoadSoundFiles to explictely to unicode
- Fix 2 possible buffer overflows (CID 553)

svn path=/trunk/; revision=37087
2008-10-30 09:58:12 +00:00
Christoph von Wittich
bcbb4cf019 fix 'Cast from pointer to integer of different size' in PickIconProc()
patch by hto
See issue #3828 for more details.

svn path=/trunk/; revision=37086
2008-10-30 09:44:36 +00:00
Dmitry Chapyshev
0f6c074a85 - Add getting system font and icon size settings
- Other small changes

svn path=/trunk/; revision=37085
2008-10-30 09:41:37 +00:00
Johannes Anderwald
e23d7c8cb1 - Fix a memory leak (CID 625)
svn path=/trunk/; revision=37084
2008-10-30 08:35:15 +00:00
Johannes Anderwald
4c981d0c59 - Fix memory leak (CID 621)
svn path=/trunk/; revision=37083
2008-10-30 08:28:50 +00:00
Johannes Anderwald
c87ce9e18a - Clean up resources on failure
svn path=/trunk/; revision=37082
2008-10-30 08:23:53 +00:00
Johannes Anderwald
6cf62f2a9f - Fix a potential buffer overflow in SH_ShowDriveProperties (CID 589)
- Fix a possible null dereference (CID 495)
- Fix initializing Recycle Bin Property dialog
- Add LVS_EX_FULLROWSELECT style

svn path=/trunk/; revision=37081
2008-10-30 07:59:55 +00:00
Johannes Anderwald
9332dccc8c - Fix displaying MAC of adapter
svn path=/trunk/; revision=37080
2008-10-30 07:24:37 +00:00
Thomas Bluemel
7ca1dd308b Make the task bar top-most when necessary
svn path=/trunk/; revision=37079
2008-10-30 01:58:24 +00:00
James Tabor
fbcf9dd7e9 - Move code out of freetype.c.
- Implement GetRasterizerCaps.
- From wine: Patch by Bobby Bingham: Add support for the GGO_UNHINTED flag in GetGlyphOutline.

svn path=/trunk/; revision=37078
2008-10-30 01:32:44 +00:00
James Tabor
29ff9f55db - Move FreeType support to freetype.c.
- Add font.c to build system and picked our first victim to populate it.
- Implemented NtGdiSetTextJustification in text.c.

svn path=/trunk/; revision=37076
2008-10-29 21:57:04 +00:00
Stefan Ginsberg
d47975c0db - Fix kernel SMP intrinsics:
- Correct typos and add missing casts
- Use IPI_APC in KiRequestApcInterrupt as we are requesting an APC IPI, not DPC
- Fix KiAcquireDispatcherObject (credit to Alex)
- Add missing SMP versions of KiAcquire/ReleaseDispatcherLockAtDpcLevel and KiAcquire/ReleaseTimerLock
- Stub out KiRundownThread for SMP

svn path=/trunk/; revision=37075
2008-10-29 21:08:20 +00:00
KJK::Hyperion
b4787f49df Merging r37048, r37051, r37052, r37055 from the-real-msvc branch
svn path=/trunk/; revision=37074
2008-10-29 20:06:44 +00:00
Michael Martin
2964e2ab1a - Implement VirtualMemoryInformationClass of MemorySectionName for NtQueryVirtualMemory.
svn path=/trunk/; revision=37073
2008-10-29 19:50:55 +00:00
James Tabor
dfaa1abe89 - Update width info structure.
svn path=/trunk/; revision=37072
2008-10-29 19:44:12 +00:00
Johannes Anderwald
a27d48f272 - Launch Network Connections ShellFolder when clicking Network Places' properties
- Dedicated to gabriel_it

svn path=/trunk/; revision=37071
2008-10-29 17:49:00 +00:00
Colin Finck
291486f5d6 Don't decide whether to preprocess .spec files based on Kernel-Mode vs. User-Mode, but on the file extension.
.pspec files are preprocessed now, while .spec files aren't. A change like this was already done in the amd64 branch before KJK rewrote the .spec stuff in rbuild.

- Renamed currently preprocessed .spec files to .pspec and changed that in the .rbuild files appropriately
- Renamed "IsWineModule" to "IsSpecDefinitionFile",  the new name is more appropriate
- Removed some checks for uppercased file extensions, we neither use them in our tree nor it will totally work as we only support them in a few places

Commit dedicated to Timo ;-)

svn path=/trunk/; revision=37070
2008-10-29 16:42:03 +00:00
Stefan Ginsberg
47144dde75 - KeSetTimerEx: When canceling the insertion of an expired timer, don't forget to exit the dispatcher and return. Fixes crashes exposed by kernel32 Winetest "timer", caused by KiTimerTableListHead suddenly having broken entries.
- Also fix a comment -- KiExitDispatcher doesn't release the dispatcher lock, it is done in KxInsertTimer

svn path=/trunk/; revision=37068
2008-10-29 16:24:36 +00:00
Johannes Anderwald
59b469b1fb - Improve error checking
- Remove extensions which should be hidden (*.lnk)
- CID 82

svn path=/trunk/; revision=37067
2008-10-29 16:19:09 +00:00
Stefan Ginsberg
1e6b6718f3 - MmMapViewOfSection: Don't forget to unlock the address space before returning -- fixes a bugcheck revealed by kernel32 Winetest "virtual"
svn path=/trunk/; revision=37064
2008-10-29 16:10:20 +00:00
Johannes Anderwald
40944938d8 * Try to invoke items by executing the default context menu action
* Fixes executing of items like network connections folder whose items are no file system objects
* Colin's wish list (1/2) :)

svn path=/trunk/; revision=37063
2008-10-29 16:00:28 +00:00
Johannes Anderwald
ad83e0cde9 - Delete Gateway Address from TcpipSettings when the gateway has been removed
- Correctly check if there is Gateway set when initializing
- Delete all old routes when applying changes
- Add new gateway when applying changes

svn path=/trunk/; revision=37059
2008-10-29 14:12:29 +00:00
Johannes Anderwald
8d12e8d2cd - Only display the default gateway when there is actually a gateway set
svn path=/trunk/; revision=37058
2008-10-29 13:49:10 +00:00
Johannes Anderwald
474c4e0362 - Only display a gateway address when there is one
svn path=/trunk/; revision=37056
2008-10-29 13:42:04 +00:00
KJK::Hyperion
72b44f33d3 Make acpi compile with Visual C++
svn path=/branches/the-real-msvc/; revision=37048
2008-10-29 12:56:17 +00:00
Johannes Anderwald
962142cf78 - Fix setting manual ip address
svn path=/trunk/; revision=37042
2008-10-28 15:53:01 +00:00
Johannes Anderwald
0e6210c139 - Store NTEContext for IPAddress
- Call DeleteIPAddress and AddIPAddress for adapters when applying changes

svn path=/trunk/; revision=37041
2008-10-28 15:31:36 +00:00
Christoph von Wittich
a83186227a revert part of rev 31787 as we don't support IROT in rpcss
fixes FoxitReader, GVIM and many other apps
See issue #2361 for more details.

svn path=/trunk/; revision=37039
2008-10-28 14:32:41 +00:00
Johannes Anderwald
c2a7f9fd0f - Fix storing the DhcpIpAddress key
svn path=/trunk/; revision=37038
2008-10-28 10:32:07 +00:00
Johannes Anderwald
a9c9171b38 - Rewrite getResInfo to directly return a linked list of IP_ADDR_STRING structures
- Might fix manual DNS bug

svn path=/trunk/; revision=37037
2008-10-28 10:06:16 +00:00
Johannes Anderwald
d48de02010 - Fix multiple bugs in details status dialog
svn path=/trunk/; revision=37036
2008-10-28 09:14:06 +00:00
Johannes Anderwald
dfbb281b3a - Implement applying / canceling changes on close
- Temporary disable storing the TcpFilter settings

svn path=/trunk/; revision=37035
2008-10-28 09:06:24 +00:00
Cameron Gutman
31e02ce543 - Merge r37029 from aicom-network-fixes
- This fixes the last of all the port allocation bugs that I know of

svn path=/trunk/; revision=37032
2008-10-27 20:43:44 +00:00
Stefan Ginsberg
373296b548 - Remove version defines
svn path=/trunk/; revision=37031
2008-10-27 20:32:17 +00:00
Stefan Ginsberg
0b42f0b683 - Remove version defines
svn path=/trunk/; revision=37030
2008-10-27 20:25:29 +00:00
Eric Kohl
339b380d78 SEH protect all calls to the UM-PNP-Manager.
svn path=/trunk/; revision=37028
2008-10-27 19:26:37 +00:00
Johannes Anderwald
803fca876f - Implement AddMonitorA, AddMonitorW
svn path=/trunk/; revision=37027
2008-10-27 18:04:45 +00:00
James Tabor
220a689732 - Cleanup and fix OffsetViewport/WindowOrgEx.
svn path=/trunk/; revision=37026
2008-10-27 17:56:35 +00:00
Johannes Anderwald
3b5595b0a8 * Implement DeletePrintProvidorA, DeletePrintProvidorW
svn path=/trunk/; revision=37025
2008-10-27 16:47:23 +00:00
Johannes Anderwald
afb5713030 - Implement AddPrintProvidorA, AddPrintProvidorW
svn path=/trunk/; revision=37024
2008-10-27 15:40:21 +00:00
Johannes Anderwald
5e352dfa1d - Add PROVIDER_INFO_1 and PROVIDER_INFO_2 struct
svn path=/trunk/; revision=37023
2008-10-27 15:16:05 +00:00
Michael Martin
2e07ded883 - Add missing goto done in NpfsRead when setting Status as STATUS_PENDING. Fixes bug #3115 and duplicates.
svn path=/trunk/; revision=37020
2008-10-27 13:51:20 +00:00
Christoph von Wittich
f48aacb658 use ExFreePoolWithTag
svn path=/trunk/; revision=37018
2008-10-27 11:16:31 +00:00
Christoph von Wittich
09501bc1c2 sync Shell_NotifyIconW with wine 1.1.7
svn path=/trunk/; revision=37017
2008-10-27 09:49:27 +00:00
Daniel Reimer
7d97d478db Sync winefile and write to wine Head.
svn path=/trunk/; revision=37016
2008-10-27 08:29:08 +00:00
Daniel Reimer
de3d502ca5 Sync wordpad and xcopy with wine HEAD. Font resizeing seems to work
svn path=/trunk/; revision=37015
2008-10-27 08:23:54 +00:00
Christoph von Wittich
bfd33ba526 sync riched20 with wine 1.1.7
svn path=/trunk/; revision=37014
2008-10-27 08:10:25 +00:00
Christoph von Wittich
9e8da0db2a set correct timezone in 2nd stage
patch by hto
See issue #3822 for more details.

svn path=/trunk/; revision=37013
2008-10-27 07:56:33 +00:00
Cameron Gutman
47e8c2cf0b - Merge aicom-network-fixes up to r37010
- Most of the port allocation problems are now fixed

svn path=/trunk/; revision=37011
2008-10-27 05:16:14 +00:00
Timo Kreuzer
cb0c6f03f5 - Add TEB_SELF to asm.h
- fix loading of TEB in fiber code
This commit is dedicated to Alex

svn path=/trunk/; revision=37008
2008-10-27 02:48:54 +00:00
Eric Kohl
e28588b48a ERR -> TRACE
svn path=/trunk/; revision=37007
2008-10-26 22:57:31 +00:00
Eric Kohl
910aee9915 LSA: Get rid of the globally created binding handle and use the WIDL-generated custom binding handles and context handles instead.
svn path=/trunk/; revision=37006
2008-10-26 22:53:30 +00:00
Gregor Schneider
2d24e47d1d DWORD is unsigned, so cast to signed type before checking for < 0. Fixes one gdi32 winetest.
svn path=/trunk/; revision=37002
2008-10-26 21:06:11 +00:00
Eric Kohl
53177f48f4 Initialize _RetVal properly in order to avoid compiler warnings.
svn path=/trunk/; revision=37001
2008-10-26 21:03:11 +00:00
Matthias Kupfer
d0c2deb15d Olaf Siejka (Caemyr) <olaf_siejka AT o2 DOT pl>
- Cleanup reactos installation package list

svn path=/trunk/; revision=36999
2008-10-26 20:54:05 +00:00
Gregor Schneider
f32b7b7615 - Add missing cleanup code
- Rename variables to fit the naming scheme
- Extend error dprints
- Some comment changes
- Fixes CIDs 617, 618, 619, 620

svn path=/trunk/; revision=36998
2008-10-26 18:29:56 +00:00
Gregor Schneider
5a80a9a5c6 StretchBlt:
- Pixel size depends on the type of the destination surface, so don't always write ULONG values
- Use PutPixel and remove now unneeded position code
- Fixes high red zone overwrites, see bug #812 (vlc) and bug #3807 (ccleaner)
- Enable dprints for unhandled sources
- Add a parameter dprint for 24bpp

svn path=/trunk/; revision=36997
2008-10-26 18:07:10 +00:00
Christoph von Wittich
8fb42ca34d fix some advapi32 security winetests
svn path=/trunk/; revision=36996
2008-10-26 18:03:38 +00:00
Colin Finck
4ad62aac38 - Add a "host" attribute to the project's <include> and <define> tags to make it possible to define global includes/defines for host components
- Define TARGET_arm/TARGET_i386 in the ReactOS-arm.rbuild/ReactOS-i386.rbuild files for the host tools to make it possible for them to know about the target to build
- Make use of this define in winebuild to fix the issue of r36927 properly
- Define global includes for host tools to simplify all host tool/library rbuild files
- Remove dead rbuild code

- Remove the include/reactos/config.h file, none of its defines are still used
- Fix components accidentally using that file

svn path=/trunk/; revision=36995
2008-10-26 18:03:06 +00:00
Aleksey Bragin
3ad56b6c40 - Port RegDeleteTreeW from Wine, and remove previous implementation (fixes registry regtests). That previous implementation was better due to the fact it was not recursive, however it's buggy and noone managed to fix it since the commit's date (revision ~17000). It's wrapped into #if0-#endif now so the code doesn't get lost.
svn path=/trunk/; revision=36994
2008-10-26 15:40:44 +00:00
Eric Kohl
725ff32421 Service Manager:
- Get rid of the globally created binding handle and use the WIDL-generated custom binding handles and context handles instead.

The other RPC interfaces will be converted as soon as possible.

svn path=/trunk/; revision=36991
2008-10-26 15:11:28 +00:00
Aleksey Bragin
323b029e49 - Print out event GUID if it's unknown in umpnpmgr.
- Fix a typo in vdmmain.c.

svn path=/trunk/; revision=36989
2008-10-26 14:38:50 +00:00
Christoph von Wittich
41ab62c3a6 import LookupPrivilegeNameA from wine
svn path=/trunk/; revision=36986
2008-10-26 12:35:42 +00:00
Eric Kohl
c22ad7e659 Service Manager:
- Fix declaration of SERVICE_STATUS_HANDLE in the PSDK.
- Add a new custom binding handle to svcctl.idl as an alias of SERVICE_STATUS_HANDLE.
- Enable all custom binding handles in svcctl.idl and fix services.exe and advapi32.dll accordingly.

svn path=/trunk/; revision=36985
2008-10-26 12:33:36 +00:00
Stefan Ginsberg
d1c6a82adb - Switch Win32K export list to .spec
svn path=/trunk/; revision=36984
2008-10-26 12:31:40 +00:00
Stefan Ginsberg
355b8a2859 - Add missing EngMapFile and EngQueryFileTimeStamp
- Swap EngUnmapFile and EngUnmapEvent to maintain alphabetical ordering

svn path=/trunk/; revision=36983
2008-10-26 12:22:45 +00:00
Eric Kohl
1e39b5fb16 WIDL: Enable the use of scalar types (non-pointer types) as custom binding handles.
svn path=/trunk/; revision=36982
2008-10-26 12:17:36 +00:00
Christoph von Wittich
13dcae5f0c -move ConvertSecurityDescriptorToStringSecurityDescriptorA/W from sec.c to sid.c
-import ConvertSecurityDescriptorToStringSecurityDescriptorA from wine

svn path=/trunk/; revision=36981
2008-10-26 12:16:48 +00:00
Aleksey Bragin
b46e8cc18b - Let's get back to one RTL library for now, because:
* 36761 just separated the library, but all hacks remain in the tree.
 * Real solution needs at least 3 RTL libraries (kernelmode, usermode, bootloader), otherwise we'll still have to have RTL-libsupp library.
 * I couldn't reach consensuss with developers about either method.
 * Since the only disadvantages now are the usermode/kernelmode structure differences hack (which was not removed) and additional small support libraries (which were not removed, including RtlpGetMode, which remained), there is no reason to waste time for compiling RTL twice without benefits.

svn path=/trunk/; revision=36980
2008-10-26 12:16:04 +00:00
Aleksey Bragin
a15056faf9 Dmitry Gorbachev
- Fix a modifier flag in interlocked functions' inlined asm. See detailed explanation in bug 3772.
See issue #3772 for more details.

svn path=/trunk/; revision=36979
2008-10-26 10:47:07 +00:00
James Tabor
861ffcb4ce - Update user connect structure.
svn path=/trunk/; revision=36977
2008-10-26 00:50:16 +00:00
Stefan Ginsberg
1937a19400 - Add missing EngPlgBlt export
svn path=/trunk/; revision=36975
2008-10-25 23:46:56 +00:00
Cameron Gutman
6089f9fe0b - Merge aicom-network-fixes up to r36973
svn path=/trunk/; revision=36974
2008-10-25 23:44:41 +00:00
Michael Martin
f4ab2b4a4b - Correct fix for handling WM_MOUSEACTIVATE and Bug #3111. If no parent, use MsgWindow->hSelf as wParam.
svn path=/trunk/; revision=36965
2008-10-25 18:42:42 +00:00
KJK::Hyperion
79e9ba171b Visual C++ backend for rbuild (for now just a hacked mingw backend) and related compilation fixes. Just run vcvars.bat from a RosBE console and "make"!
modified   dll/win32/aclui/guid.c
modified   dll/win32/aclui/precomp.h
modified   drivers/bus/acpi/include/actypes.h
modified   drivers/bus/acpi/include/platform/acenv.h
   Miscellaneous compilation fixes

modified   dll/win32/aclui/sidcache.c
   Damn, forgot to commit this to trunk

deleted    include/psdk/intrin.h
added      include/psdk/intrin.h.bak
   intrin.h is positively not a PSDK header

modified   lib/3rdparty/mingw/wcrt1.c
   Port to Visual C++

modified   ReactOS-generic.rbuild
   Use Visual C++'s built-in CRT headers for now

modified   ReactOS-i386.rbuild
   Translate global compiler flags to Visual C++

modified   tools/rbuild/backend/mingw/mingw.cpp
   No need for -pipe in Visual C++
   Disable precompiled headers for now
   Enable a whole lotta warnings, and disable a few. Should move this to a response file somewhere

modified   tools/rbuild/backend/mingw/modulehandler.cpp
   .a -> .lib
   .o -> .obj
   .coff -> .res.obj, fix windres command line to remove the ambiguity
   ${gcc}/${gpp} -> ${cl}, translate command line options
   ECHO_CC -> ECHO_CL
   Pass *_RCFLAGS to gas instead of *_CFLAGS, for now, so that gas only sees includes and defines (in the future we'll have something like *_ASFLAGS)
   Disabled some gcc-specific code for now

modified   tools/rbuild/module.cpp
   .a -> .lib, .o -> .obj, lib<name>.a -> <name>.lib; and why the hell is this in the front-end?

svn path=/branches/the-real-msvc/; revision=36963
2008-10-25 18:13:25 +00:00
KJK::Hyperion
c0fa485960 The real, definitive, Visual C++ support branch. Accept no substitutes
svn path=/branches/the-real-msvc/; revision=36960
2008-10-25 17:56:00 +00:00
KJK::Hyperion
10c26d1da1 modified dll/win32/kernel32/kernel32.rbuild
Disable exceptions and RTTI in kernel32_base
   Move icustubs.cpp closer to other NLS stuff

This commit dedicated to Stefan100

svn path=/trunk/; revision=36957
2008-10-25 17:41:48 +00:00
KJK::Hyperion
384cece98f I did not, in fact, test my commit
svn path=/trunk/; revision=36956
2008-10-25 17:36:53 +00:00
Gregor Schneider
672d2fbba6 Misc. typo fixes
svn path=/trunk/; revision=36955
2008-10-25 17:35:45 +00:00
KJK::Hyperion
168997c0d1 modified base/applications/screensavers/3dtext/3dtext.rbuild
modified   lib/sdk/crt/crt.rbuild
   Split chkstk away from crt
   Link 3dtext to chkstk for Visual C++ builds (a gcc-built 3dtext would simply crash, I guess?)

modified   dll/cpl/access/display.c
modified   dll/cpl/access/general.c
modified   dll/cpl/access/keyboard.c
modified   dll/cpl/access/mouse.c
   Fixed signedness violations (thank you cl -Wall -W4)

modified   dll/win32/acledit/acledit.rbuild
modified   dll/win32/aclui/aclui.rbuild
   Removed empty stubs (thank you cl -Wall -W4)

modified   dll/win32/aclui/checklist.c
   Fixed signedness violations
   wcsnicmp is not a standard C routine
   BOOL is not a boolean
   Thank you cl -Wall -W4

modified   dll/win32/aclui/sidcache.c
   Marked possible overflow (thank you cl -Wall -W4)

modified   dll/win32/msvcrt/msvcrt.def
   __iob_func and __p_iob are the same thing
   Export non-conforming swprintf as _swprintf, too (will fix for real later)
   Thank you cl -Wall -W4

modified   include/ddk/winddk.h
   Zero-length array field in struct _SCATTER_GATHER_LIST
   Forward-declare structures out of argument lists
   Thank you cl -Wall -W4

modified   include/reactos/msvctarget.h
   No need to emulate Visual C++ flags when compiling with Visual C++

modified   lib/3rdparty/mingw/cpu_features.c
modified   lib/3rdparty/mingw/cpu_features.h
   Useless dependency from stdbool.h removed
   Now compiles with Visual C++ too

modified   lib/3rdparty/mingw/getopt.c
   Silence harmless warning

modified   lib/3rdparty/mingw/isascii.c
modified   lib/3rdparty/mingw/iscsym.c
modified   lib/3rdparty/mingw/iscsymf.c
modified   lib/3rdparty/mingw/toascii.c
   Undefine conflicting macro names before declaring the functions

modified   Makefile
   Visual C++ support is coming, did you bring your coat?

svn path=/trunk/; revision=36954
2008-10-25 17:32:54 +00:00
Michael Martin
b8e2e47d4e - Do not send the WM_MOUSEACTIVATE message for a window that has no parent.
- Fixes visual basic application crashes when clicking on form. See bug #3111 for more details.

svn path=/trunk/; revision=36950
2008-10-25 16:08:59 +00:00
James Tabor
bb641e28cb - Patch by hto: Do not wait until process is closed with process database locked. See Bug 3805.
svn path=/trunk/; revision=36948
2008-10-25 15:33:02 +00:00
Colin Finck
6d2f6893bc Don't export ScreenSaverProc and ScreenSaverConfigureDialog anymore
I don't know any app still needing these exports and even Windows screensavers don't export anything nowadays.

svn path=/trunk/; revision=36947
2008-10-25 15:15:54 +00:00
Colin Finck
8c81c894b0 Return if the screensaver window couldn't be created to avoid a warning about using the uninitialized variable "msg".
Spotted by KJK & CL

svn path=/trunk/; revision=36946
2008-10-25 15:14:09 +00:00
Aleksey Bragin
d0ccc9c5ec - Remove version defines.
svn path=/trunk/; revision=36945
2008-10-25 15:03:02 +00:00
Colin Finck
ce96d49c36 Fix build broken in r36927
The #ifdef's here are defined by the host, not by the target.
Therefore we can't check with #if defined(__x86_64__) whether we build for 64-bit. Probably a _TARGET_PE64 solution like we have for rsym is needed here to fix this properly also for the AMD64 port.

svn path=/trunk/; revision=36944
2008-10-25 14:49:51 +00:00
Christoph von Wittich
d80a56b7f9 fix advpack_winetest build
svn path=/trunk/; revision=36943
2008-10-25 14:16:58 +00:00
Christoph von Wittich
89ae880958 remove all version defines from rostests
svn path=/trunk/; revision=36942
2008-10-25 14:04:03 +00:00
Aleksey Bragin
5b1318aae8 - Remove version defines.
svn path=/trunk/; revision=36941
2008-10-25 14:00:02 +00:00
Aleksey Bragin
d20963f130 - Remove version defines.
svn path=/trunk/; revision=36940
2008-10-25 12:16:25 +00:00
Aleksey Bragin
64bd93d803 - Globalize ReactOS target version (there are a few overrides for our abuse of RegDeleteTree API).
*** .rbuild files MUST NOT contain version definitions now, please pay attention to this when doing Wine-syncs, adding new modules, or applying old patches! ***
Same applies to source code files, header files, and other includables. Thanks to Marc Piulachs for doing the base work, which I continued, and which resulted in this commit.
See issue #2745 for more details.

svn path=/trunk/; revision=36939
2008-10-25 12:15:44 +00:00
Aleksey Bragin
f39710c68c Dmitry Gorbachev
- Change include order to prevent redefinition of _pctype.
See issue #3801 for more details.

svn path=/trunk/; revision=36938
2008-10-25 11:09:33 +00:00
Dmitry Chapyshev
8d30598bdf - Change SetSysColorsTemp declaration
svn path=/trunk/; revision=36934
2008-10-25 07:39:33 +00:00
Dmitry Chapyshev
1e2dcd06e8 DefWindowProcA/W:
- Fix WM_GETTEXTLENGHT message
- Add WM_IME_NOTIFY message
- Implement WM_IME_KEYDOWN, WM_IME_KEYUP, WM_IME_SETCONTEXT, WM_IME_CHAR, WM_IME_STARTCOMPOSITION, WM_IME_COMPOSITION, WM_IME_ENDCOMPOSITION, WM_IME_SELECT, WM_IME_NOTIFY
- Remove CascadeWindows and TileWindows from window.c (it is already declared in mdi.c)
- Implement TileChildWindows, CascadeChildWindows, GetInternalWindowPos, SetSysColorsTemp
- Add checking params for GetProcessDefaultLayout, SetProcessDefaultLayout, GetMouseMovePointsEx, GetRawInputDeviceList
- LockSetForegroundWindow return TRUE
- GetRawInputBuffer, GetRawInputDeviceInfoA/W, DefRawInputProc, GetRawInputData, GetRegisteredRawInputDevices return 0
Based on Wine implementation

svn path=/trunk/; revision=36933
2008-10-25 07:37:48 +00:00
Dmitry Chapyshev
8a90945651 - Sync iads.idl with wine
- Add some defines to winnt.h

svn path=/trunk/; revision=36932
2008-10-25 07:15:16 +00:00
Dmitry Chapyshev
df2aabc6ab - Implement RtlFindCharInUnicodeString
- Implement RtlInitializeSListHead, RtlFirstEntrySList, RtlQueryDepthSList
Based on Wine implementation

svn path=/trunk/; revision=36931
2008-10-25 07:12:41 +00:00
KJK::Hyperion
7661ad3e1c modified tools/rbuild/backend/mingw/modulehandler.cpp
Allow static libraries to "link" to other static libraries
   Removed some dead code

modified   dll/nls/normaliz_redist/normaliz_redist.rbuild
modified   dll/win32/kernel32/kernel32.rbuild
   No need to specify icu4ros explicitely anymore, thanks to the rbuild changes
   Make kernel32_base include normalize, rather than linking it as an external dependency of kernel32

svn path=/trunk/; revision=36929
2008-10-25 02:52:24 +00:00
Timo Kreuzer
f258a9cc26 merge 36224 and 36910 from amd64 branch
svn path=/trunk/; revision=36928
2008-10-24 22:13:45 +00:00
Timo Kreuzer
4ed5661801 merge 36223 from amd64-branch
svn path=/trunk/; revision=36927
2008-10-24 21:32:48 +00:00
Cameron Gutman
497d2b42a7 - Merge aicom-network-fixes up to r36921
svn path=/trunk/; revision=36922
2008-10-24 09:09:00 +00:00
Stefan Ginsberg
2f626cf5fe - Fix EPROFILE/KPROFILE.Segment member -- it is a pointer
svn path=/trunk/; revision=36917
2008-10-23 19:15:44 +00:00
Stefan Ginsberg
be7afb4f81 - Fix Nt/ZwMapViewOfSection parameters (ULONG -> ULONG_PTR and SIZE_T) and the few callers which sent incorrect types
- Also fix MapViewOfFile/Ex parameters

svn path=/trunk/; revision=36915
2008-10-23 18:19:20 +00:00
Timo Kreuzer
688a20a68b Quickfix for bug 3808
Don't set SystemMetrics to -1, when there's no CurInfo. Apparently we initialize the metrics before we have a WindowStation. This code needs to be improved...
See issue #3808 for more details.

svn path=/trunk/; revision=36913
2008-10-23 17:26:50 +00:00
Stefan Ginsberg
922bd47d8d - More 64-bit fixes
svn path=/trunk/; revision=36912
2008-10-23 17:05:40 +00:00
Stefan Ginsberg
63516132ef - 64-bit fixes (ULONG -> SIZE_T)
svn path=/trunk/; revision=36911
2008-10-23 15:56:27 +00:00
Johannes Anderwald
cbfc164757 - Fix bug 3782 take #2
- Apply the fix to right source file and not to code which isnt build anymore

svn path=/trunk/; revision=36904
2008-10-23 06:15:43 +00:00
Johannes Anderwald
6a8e7cb444 - Fix bug 3782
- Thanks to vicmarcel for bugtracking

svn path=/trunk/; revision=36897
2008-10-22 18:40:36 +00:00
Aleksey Bragin
e432b7cb6a - Typo fix.
See issue #3804 for more details.

svn path=/trunk/; revision=36896
2008-10-22 18:10:17 +00:00
Johannes Anderwald
8f68e42bf2 * Implement details status dialog
* Update all languages with en-US resource file

svn path=/trunk/; revision=36895
2008-10-22 17:46:55 +00:00
Stefan Ginsberg
3113d2a3ba - Notify umpnpmgr about logon after the shell has initialized
- This makes it possible to progress if userinit crashes due to heavy debug output (due to timing issues in its communication with umpnpmgr), which would leave you stranded with no shell. Not really a hack, as it doesn't hide or fix the crash -- just limits it to a missing "Pending device installations" prompt in case there are any pending. Also, it appears to be done the same way on Windows.

svn path=/trunk/; revision=36894
2008-10-22 13:59:01 +00:00
Stefan Ginsberg
f9eb539194 - Fix an assertion by casting to internal structures correctly
svn path=/trunk/; revision=36893
2008-10-22 13:24:01 +00:00
Johannes Anderwald
e2192f9e89 - Convert the string using the WideCharToMultiByte function and fix passed parameters
- Always zero-terminate the converted buffer
- Remove querying NameServer / DhcpNameServer under Parameters key because it is not used and was not working
- Initialize PrivateNSEnum CurrentName member 
- Make sure that only successfully converted NameServer get copied

svn path=/trunk/; revision=36892
2008-10-22 11:37:33 +00:00
Stefan Ginsberg
8929e5773c - Fix some debug prints
svn path=/trunk/; revision=36891
2008-10-22 11:16:52 +00:00
Johannes Anderwald
0b9841ccba - delete DhcpNameServer key when storing static Nameserver entries
svn path=/trunk/; revision=36890
2008-10-22 09:21:33 +00:00
Johannes Anderwald
04b274e07b - Query first for DhcpNameServer key value as this key is only present when DHCP is activated
svn path=/trunk/; revision=36889
2008-10-22 09:13:15 +00:00
Johannes Anderwald
627d39b522 - Delete old DhcpNameServer key when no nameservers could be obtained
- Close registry key when done

svn path=/trunk/; revision=36888
2008-10-22 09:00:33 +00:00
Daniel Reimer
ad02070158 Bug 3668: spanish inf files by Javier Remacha
Bug 3678: Greek translation for some media.inf files by Apostolos Alexiadis
Bug 3777: netcfgx and netshell translation update by Maciej Bialas

svn path=/trunk/; revision=36887
2008-10-22 06:07:13 +00:00
Cameron Gutman
e992027f42 - Merge aicom-network-fixes up to r36884
svn path=/trunk/; revision=36885
2008-10-22 01:31:00 +00:00
Stefan Ginsberg
154df420fc - Correct an assertion after ARM system call changes in 34366
svn path=/trunk/; revision=36880
2008-10-21 21:02:16 +00:00
James Tabor
d380bdc8d5 - Implement RtlQueryInformationActiveActivationContext and add new define. Wow, this one need some love from wine!
svn path=/trunk/; revision=36879
2008-10-21 19:49:17 +00:00
James Tabor
c33db42905 - Correct wrong ID'ed type, it is an activation context basic information buffer.
svn path=/trunk/; revision=36878
2008-10-21 19:29:37 +00:00
Aleksey Bragin
ca19f82e42 - If data is going to be modified, CcPinRead should be used instead of CcMapData. Fix this.
svn path=/trunk/; revision=36877
2008-10-21 18:48:08 +00:00
Stefan Ginsberg
42d35acde0 - Fix various compilation errors in SMP assembly (typos, missing jump labels and specifiers)
- Implement the SMP case in KiDispatchInterrupt -- on SMP we must raise IRQL to SYNCH_LEVEL, set the thread context swap busy flag and acquire the PRCB lock before calling KiQueueReadyThread and KiSwapContextInternal

svn path=/trunk/; revision=36876
2008-10-21 18:34:06 +00:00
KJK::Hyperion
a9f8e09aa6 Bring rosapps up to date with the rbuild changes of r36870
svn path=/trunk/; revision=36875
2008-10-21 17:42:04 +00:00
Stefan Ginsberg
1afb6785e5 - SMP SYNCH_LEVEL for x86 is IPI_LEVEL - 2 since 2K3
svn path=/trunk/; revision=36874
2008-10-21 16:23:06 +00:00
Stefan Ginsberg
08f6983072 - Add missing KPCR_PRCB_IDLE_SCHEDULE offset
svn path=/trunk/; revision=36873
2008-10-21 15:32:49 +00:00
James Tabor
d74d478c1f - Fix NtUserCreateWindowEx.
svn path=/trunk/; revision=36872
2008-10-21 14:51:14 +00:00
Stefan Ginsberg
c29b2234e3 - Add missing Cm (de)reference trace
svn path=/trunk/; revision=36871
2008-10-21 14:47:20 +00:00
KJK::Hyperion
9ac0fa4e4d modified tools/rbuild/backend/mingw/modulehandler.cpp
modified   tools/rbuild/backend/mingw/modulehandler.h
modified   tools/rbuild/module.cpp
   Split rules for .spec files as input files vs import libraries. .spec files can now be specified independently as <file>s (to generate and compile a .stubs.c file) and <importlibrary> (to generate and compile a .spec.def file)
   .spec files are now specified in <importlibrary>s directly (instead of pointing to the non-existing, generated .spec.def file. Whose idea was that? sounds like the doing of Arch Blackmann)
   Allow multiple modules to share a single .spec file without using <importlibrary base="...">
   Allow static libraries to use .spec files in <importlibrary>
   Emit comments in makefile.auto so rules can be traced back to the code that generated them

deleted    lib/debugsup/debugsup-ntos.def
added      lib/debugsup/debugsup-ntos.spec
modified   lib/debugsup/debugsup.rbuild
   .def -> .spec

<<hundreds of rbuild files>>
   Remove <file> entry for spec file if there are no stubs to compile
   .spec.def -> .spec in <importlibrary> entries

Soon: making all keyboard layouts use a single .spec file
Dedicated to: Samuel Serapión, Stefan Ginsberg, and all the fellow team members who'll have an aneurysm at this commit

See issue #3746 for more details.

svn path=/trunk/; revision=36870
2008-10-21 13:51:49 +00:00
James Tabor
2f09acbb04 - Plug in GetDeviceCaps for gdi.
svn path=/trunk/; revision=36869
2008-10-21 02:56:36 +00:00
James Tabor
a37f382661 - Finish shared info based on XP and update user connect.
svn path=/trunk/; revision=36868
2008-10-21 00:23:49 +00:00
James Tabor
899b4742f2 - Quick setup for NtUserProcessConnect.
svn path=/trunk/; revision=36867
2008-10-20 23:43:11 +00:00
James Tabor
8023ef974f - Quick setup for NtUserProcessConnect.
svn path=/trunk/; revision=36866
2008-10-20 23:42:53 +00:00
Cameron Gutman
459b97691b - Merge aicom-network-fixes up to r36861
svn path=/trunk/; revision=36864
2008-10-20 21:57:06 +00:00
James Tabor
3e5dc81771 - Add missing PUMDHPDEV.
svn path=/trunk/; revision=36856
2008-10-20 19:37:03 +00:00
James Tabor
328f8323ab - Add driver info for psdk, update local DC and fixed eng functions so that it can support user mode print drivers.
svn path=/trunk/; revision=36855
2008-10-20 19:33:20 +00:00
Kamil Hornicek
a38d530792 don't deref. null pointer in case NameServer key doesn't exist
svn path=/trunk/; revision=36849
2008-10-20 17:06:13 +00:00
Ged Murphy
b686c53533 Prepare for a change of architecture.
Instead of building all Wine tests as dlls, we'll revert back to separate processes, but redirect the client processes stdin, stdout and stderr to named pipes set by the parent.

svn path=/trunk/; revision=36844
2008-10-20 14:49:59 +00:00
Aleksey Bragin
f3d835f4a1 - Move kernel32's baseaddress lower. Should fix problem with relocated kernel32 after linking in the ICU library.
svn path=/trunk/; revision=36839
2008-10-20 08:17:04 +00:00
James Tabor
b307fac06c - Update local DC structure and defines.
svn path=/trunk/; revision=36838
2008-10-20 07:36:21 +00:00
James Tabor
17e03f6041 - Cleanup IntGdiGetDeviceCaps, add more defines.
svn path=/trunk/; revision=36837
2008-10-20 05:07:46 +00:00
James Tabor
4f32b668d4 - Set GetBkColor for callers.
svn path=/trunk/; revision=36836
2008-10-20 04:07:42 +00:00
Stefan Ginsberg
8be0d9711a - SVN maintenance
svn path=/trunk/; revision=36833
2008-10-19 19:17:01 +00:00
Stefan Ginsberg
ee68bb094f - SVN maintenance
svn path=/trunk/; revision=36832
2008-10-19 19:11:18 +00:00
Timo Kreuzer
86f07d739d Win32 structure cleanup (WIP):
- remove DesktopHeapBase and DesktopHeapLimit from W32THREADINFO, use DESKTOPINFO members instead

svn path=/trunk/; revision=36831
2008-10-19 17:35:22 +00:00
Aleksey Bragin
fc64051142 - VFAT fixes: Actually perform a mandatory call to CcPurgeCacheSection during file deletion (fixes real NT5 cache manager attempts to write section of a deleted file).
- VFAT fixes: When querying FileStandardInformation, NT's fastfat driver sets NumberOfLinks to 1, ours sets it to 0 somewhy. Change to 1 for compatibility.
- A couple of debug prints improvements in VFAT.
- Comment out UNIMPLEMENTED in CcPurgeCacheSection to prevent debug messages flood.

svn path=/trunk/; revision=36830
2008-10-19 13:23:00 +00:00
Eric Kohl
0690324f95 Sync to wine-0.9.60:
- Rob Shearman <rob@codeweavers.com> Wed, 26 Mar 2008
widl: Support using context handles as the binding handle in client functions.

- Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008
widl: Use is_string_type for detecting strings in write_typeformatstring_var to make it consistent with write_remoting_arg.

- Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008
widl: Add support for generic binding handles.

- Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008
widl: Fix detection of non-pointer context handles.

- Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008
widl: Make sure that string types are always written out by write_string_tfs and not write_simple_pointer.

- Rob Shearman <rob@codeweavers.com> Mon, 31 Mar 2008
widl: Parse typedefs of function pointers.

- Rob Shearman <rob@codeweavers.com> Tue, 1 Apr 2008
widl: Be more strict about where semicolons can appear in IDL files.

- Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008
widl: Add a function to get the return type of a parsed function.

- Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008
widl: Store function and function pointer types completely within type_t type.

- Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008
widl: Support parsing calling conventions for function identifiers.

- Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008
widl: Support __fastcall and __pascal calling conventions.

- Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008
widl: Add a newline between function prototypes for non-object interfaces.

- Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008
widl: Fix the writing out of function pointers with more than one level of indirection.

- Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008
widl: Turn on verbose errors, which gives a little more information in the case of a syntax error.

- Dan Hipschman <dsh@linux.ucla.edu> Thu, 3 Apr 2008
widl: Fix a mistake in an ordered list (keywords).


svn path=/trunk/; revision=36829
2008-10-19 12:30:41 +00:00
Stefan Ginsberg
c2a9e1f979 - Revert 36827
svn path=/trunk/; revision=36828
2008-10-19 11:47:27 +00:00
Stefan Ginsberg
b90c9f3490 - Temporarily (for one revision) disable Winetest's advapi32 security test to see how far build server survives -- will be reverted in next commit
svn path=/trunk/; revision=36827
2008-10-19 11:40:48 +00:00
James Tabor
efd40fb07e - Thanks Tommy! Cleanup millimeter conversion.
svn path=/trunk/; revision=36826
2008-10-19 04:52:48 +00:00
James Tabor
7d22914162 - Add missing CAPS to psdk.
- Implemented NtGdiGetDeviceCapsAll.
- Now support primary display device capabilities in shared gdi handle table.

svn path=/trunk/; revision=36825
2008-10-19 04:47:04 +00:00
Timo Kreuzer
e77f768a09 Win32 structure cleanup (WIP):
- replace hKernelHeap and HeapLimit from DESKTOPINFO with pvDesktopBase and pvDesktopLimit- replace hDesktopHeap with pheapDesktop in DESKTOP
- use PWIN32HEAP for the heap handle and use this and only this as the handle.
- Use the real base address for pvDesktopBase, instead of a copy of the heap handle

svn path=/trunk/; revision=36824
2008-10-19 02:05:41 +00:00
Timo Kreuzer
2f79d7bdbc Win32 structure cleanup (WIP):
- use rpdeskParent instead of Desktop in WINDOWCLASS
- use PDESKTOP instead of DESKTOPINFO in several places

svn path=/trunk/; revision=36820
2008-10-19 01:06:30 +00:00
Timo Kreuzer
e287c51858 Win32 structure cleanup (WIP):
- make use of pdesktop member in WINDOW structure
- replace usage of Wnd->ti->Desktop with Wnd->pdesktop->DesktopInfo

svn path=/trunk/; revision=36819
2008-10-19 00:43:54 +00:00
Timo Kreuzer
891379c597 Win32 structure cleanup (WIP):
Add some members to usermode shared structures to be used soon.

svn path=/trunk/; revision=36818
2008-10-19 00:39:40 +00:00
Timo Kreuzer
6d76cb42e5 Win32 structure cleanup (WIP):
Initialite THREADINFOs pClientInfo member

svn path=/trunk/; revision=36817
2008-10-18 23:01:57 +00:00
Colin Finck
c9a04929cc Allocate enough memory for Value (problem was spotted by Pigglesworth)
This problem was revealed by r36797 (thanks to aicom, elhoir, Lone_Rifle and vicmarcal for the help with regression testing)

Fixes ipconfig, ping and other network apps crashing with a buffer overflow.

svn path=/trunk/; revision=36816
2008-10-18 22:22:09 +00:00
Gregor Schneider
eb2c5f864c Initialize variables and close keys only if they were opened, based on wine code. Fixes CIDs 787, 788.
svn path=/trunk/; revision=36815
2008-10-18 21:38:25 +00:00
Kamil Hornicek
edb9e011a3 fix the fix, sorry
svn path=/trunk/; revision=36814
2008-10-18 21:29:44 +00:00
Kamil Hornicek
aa7f022cbc fix resource leak, CID 611
svn path=/trunk/; revision=36813
2008-10-18 21:07:45 +00:00
Colin Finck
290a31c692 Marcelo Slomp (mslomp@linuxmail.org):
- Prevent a redefinition of _pctype in newer GCC versions (like 4.3.2)

See issue #3598 for more details.

svn path=/trunk/; revision=36812
2008-10-18 20:49:00 +00:00
Timo Kreuzer
35fe207a58 Change return type of PsGetCurrentProcessWin32Process to PVOID.
svn path=/trunk/; revision=36811
2008-10-18 20:34:36 +00:00
Timo Kreuzer
a0cd996949 Win32 structure cleanup (WIP):
- Add ppi to THREADINFO and initialize it
- Initialize THREADINFO.PtiLink and DESKTOP.PtiList and link the thread to it's desktop

svn path=/trunk/; revision=36810
2008-10-18 19:54:59 +00:00
Gregor Schneider
ab0284e40d Close file after processing it. Fixes CIDs 626, 627.
svn path=/trunk/; revision=36809
2008-10-18 19:42:31 +00:00
Stefan Ginsberg
cd8f013010 - Fix ObIsKernelHandle routine to return what it should rather than always returning FALSE (Note: the macro version we use internally is correct)
svn path=/trunk/; revision=36808
2008-10-18 15:04:26 +00:00
Michael Martin
13005080b5 - Fixed typo in SetMenuAndButtonStates. See bug 3792 for more info.
- Pass correct size for ServiceStatusProcess to QueryServiceStatusEx which prevents trashing the next services information in Info buffer.
- Added missing CloseServiceHandle calls.

svn path=/trunk/; revision=36807
2008-10-18 11:49:25 +00:00
Cameron Gutman
36f0316d51 - Merge aicom-network-fixes up to r36803
svn path=/trunk/; revision=36804
2008-10-18 04:32:30 +00:00
Matthias Kupfer
fc86d60e95 draw disk usage bar from "used" to "free" (left to right)
svn path=/trunk/; revision=36801
2008-10-17 21:54:03 +00:00
Timo Kreuzer
9353696890 Win32 structure cleanup (WIP):
- Use CLIENTINFO.ulClientDelta instead of W32THREADINFO.DesktopHeapDelta
- Remove DesktopHeapDelta from W32THREADINFO- Add PtiList to DESKTOP
- Add pClientInfo to THREADINFO

svn path=/trunk/; revision=36800
2008-10-17 21:07:24 +00:00
Johannes Anderwald
eed100a55c * Store more settings in registry
svn path=/trunk/; revision=36799
2008-10-17 20:01:58 +00:00
Johannes Anderwald
b12ad06d48 * Fix retrieval of automatic DNS settings 2/2
svn path=/trunk/; revision=36797
2008-10-17 19:04:00 +00:00
Johannes Anderwald
71d93bc857 * Fix retrieval of automatic DNS settings 1/2
svn path=/trunk/; revision=36796
2008-10-17 19:03:11 +00:00
Timo Kreuzer
8d9c365f88 Win32 structure cleanup (WIP):
- Add pDeskInfo and PtiLink to THREADINFO

svn path=/trunk/; revision=36795
2008-10-17 18:22:06 +00:00
Johannes Anderwald
905c093675 * Set AutoconfigEnabled if DNS is acquired by DHCP
* Fix a handle leak

svn path=/trunk/; revision=36794
2008-10-17 18:20:00 +00:00
Johannes Anderwald
521eec8b76 * If there is no static nameserver entry, look up dynamically assigned one
svn path=/trunk/; revision=36793
2008-10-17 18:00:06 +00:00
Timo Kreuzer
e81d786ce9 Win32 structure cleanup (WIP):
- remove AppCompatFlags from W32THREADINFO

svn path=/trunk/; revision=36792
2008-10-17 17:19:04 +00:00
Gregor Schneider
87fd2c6cad Typo: check for success of newest allocations.
svn path=/trunk/; revision=36791
2008-10-17 15:13:27 +00:00
Johannes Anderwald
2edf0dbef8 * Convert ncpa to a simple wrapper which invokes netshell.dll IShellFolder
* Delete obsolete code

svn path=/trunk/; revision=36790
2008-10-17 13:19:04 +00:00
Timo Kreuzer
65e82782c9 Win32 structure cleanup part 3 / x:
- rename DESKTOP_OBJECT to DESKTOP

svn path=/trunk/; revision=36789
2008-10-17 13:09:56 +00:00
Timo Kreuzer
2e9e3c99e6 Fix GetAppCompatFlags to use Teb->ClientInfo instead of Teb->Win32ThreadInfo, which should be a kernel pointer.
svn path=/trunk/; revision=36788
2008-10-17 11:18:57 +00:00
Cameron Gutman
187ed1777f - Merge aicom-network-fixes up to r36785
svn path=/trunk/; revision=36787
2008-10-17 10:42:44 +00:00
Timo Kreuzer
9c8b2fd447 Win32 structure cleanup part 2 / x:
- rename DESKTOP to DESKTOPINFO

svn path=/trunk/; revision=36786
2008-10-17 10:40:04 +00:00
Johannes Anderwald
e18ac2ee40 - Hide ncpa.cpl from control panel
svn path=/trunk/; revision=36783
2008-10-17 10:21:15 +00:00
Stefan Ginsberg
0bdd03839a - Add comments to GetTextFaceW
- Apology to GreatLord, his code was correct and I fail -- hint: don't code and commit at late night ;0)

svn path=/trunk/; revision=36782
2008-10-17 07:20:23 +00:00
James Tabor
e2447c3d0f Checked code format, compiler has issues.
svn path=/trunk/; revision=36781
2008-10-17 04:56:47 +00:00
James Tabor
bc4ca08f94 Move GetTextFaceAliasW to text.c.
svn path=/trunk/; revision=36780
2008-10-17 04:34:21 +00:00
KJK::Hyperion
8c7bebfed8 - test GetTextFaceW instead of GetTextFaceA
- test that:
    - the last error is never set
    - the buffer size is ignored if the buffer is NULL
    - the buffer size is returned if the buffer is non-NULL and too small
    - the function fails if a non-NULL buffer has a size <= 0
 - allocate the DC for a GDI test with a GDI routine (CreateCompatibleDC) instead of an USER routine (GetDC)

svn path=/trunk/; revision=36779
2008-10-17 00:28:47 +00:00
Cameron Gutman
97d55c7685 - Fix livecd font substitution
svn path=/trunk/; revision=36778
2008-10-17 00:04:53 +00:00
KJK::Hyperion
0e8851de86 You can't make this shit up.
svn path=/trunk/; revision=36777
2008-10-17 00:00:55 +00:00
KJK::Hyperion
f60c12e03a The original GetTextFaceW implementation (r28730) was right all along, except GDI APIs don't usually set the last error (GetTextFaceW doesn't). The conditional was non-intuitive but nevertheless correct (tested under Windows Vista SP1). This commit negates the conditional (the AND form is more readable) and switches the "if" branches, and removes the call to SetLastError. If Coverity really flagged this, it could mean the bug is actually in NtGdiGetTextFaceW
svn path=/trunk/; revision=36776
2008-10-16 23:49:31 +00:00
Stefan Ginsberg
a8052c7bb2 - More correct check for GetTextFaceW
svn path=/trunk/; revision=36775
2008-10-16 20:21:00 +00:00
Timo Kreuzer
2f5ea4625b Tests for GetTextFace
svn path=/trunk/; revision=36774
2008-10-16 20:16:38 +00:00
Stefan Ginsberg
6e6e3d15c7 - Unbreak GetTextFaceA/W, broken since 28730 by GreatLord
svn path=/trunk/; revision=36773
2008-10-16 20:02:22 +00:00
Timo Kreuzer
1d3e8f7e54 CmDeleteKey: Copy LastWriteTime from cell to KCB, instead of querying again.
svn path=/trunk/; revision=36772
2008-10-16 19:07:28 +00:00
Timo Kreuzer
d13301ae65 Win32 structure cleanup part 1 / x:
- replace W32THREAD with THREADINFO, define W32THREAD like it's on Windows and make it part of THREADINFO.

svn path=/trunk/; revision=36769
2008-10-16 17:52:38 +00:00
Timo Kreuzer
837002ff59 Change return type of PsGetCurrentThreadWin32Thread to PVOID. Kernel don't know 'bout W32THREAD!
svn path=/trunk/; revision=36768
2008-10-16 17:21:08 +00:00
Gregor Schneider
5c169cc017 No need to unlock, if locking failed. Fixes CID 186.
svn path=/trunk/; revision=36767
2008-10-16 17:12:25 +00:00
KJK::Hyperion
55c21fd29a modified rbuild/backend/codeblocks/codeblocks.cpp
modified   rbuild/backend/mingw/modulehandler.cpp
modified   rbuild/backend/msbuild/msbuild.cpp
modified   rbuild/backend/msvc/vcprojmaker.cpp
modified   rbuild/project.cpp
modified   rbuild/rbuild.h
   Index properties and modules by name.
   Should make for faster lookups and slightly faster overall execution, no idea exactly by how much but there you have it.

modified   rbuild/automaticdependency.cpp
modified   rbuild/backend/dependencymap/dependencymap.cpp
modified   rbuild/backend/devcpp/devcpp.cpp
modified   rbuild/backend/mingw/mingw.cpp
modified   rbuild/backend/mingw/proxymakefile.cpp
modified   rbuild/backend/msvc/msvc.cpp
modified   rbuild/backend/msvc/msvcmaker.cpp
modified   rbuild/backend/versionreport/versionreport.cpp
modified   rbuild/compilationunitsupportcode.cpp
modified   rbuild/module.cpp
modified   rbuild/pch.h
modified   rbuild/syssetupgenerator.cpp
modified   rbuild/testsupportcode.cpp
   Fix compilation, no functional changes

This dedication committed to Casper and Hervé

svn path=/trunk/; revision=36766
2008-10-16 13:40:39 +00:00
Kamil Hornicek
241074220b - remove dead code, fixes CID 60, CID 61
svn path=/trunk/; revision=36765
2008-10-16 08:50:56 +00:00
Kamil Hornicek
4e58a2eaca don't loop (UINT)-1 times if the section is not present, CID 445
svn path=/trunk/; revision=36764
2008-10-15 18:59:47 +00:00
Kamil Hornicek
149add092a remove unneeded check, it's ok to create new context in this case
svn path=/trunk/; revision=36763
2008-10-15 18:39:04 +00:00
Johannes Anderwald
fa0cd2cd47 - Implement Advanced Status IP Information Dialog
- Import language strings from netcfgx
- Add icon group (32x32)
- ncpa is now a candidate for deletion

svn path=/trunk/; revision=36762
2008-10-15 17:20:55 +00:00
KJK::Hyperion
427c90af34 added lib/rtl/rtl-common.rbuild
modified   lib/rtl/rtl.rbuild
   Compile rtl twice, as rtl_umode and rtl_kmode. Allows conditional compilation of RTL (finally!), instead of necessitating hacks like RtlpGetMode()
   "rtl" module now a dummy static library for things like <include base="rtl">

modified   boot/freeldr/freeldr/freeldr.rbuild
modified   boot/freeldr/freeldr/setupldr.rbuild
modified   ntoskrnl/ntoskrnl-generic.rbuild
   rtl -> rtl_kmode

modified   dll/ntdll/ntdll.rbuild
   rtl -> rtl_umode

This commit dedicated to Fireball and Stefan100 (now get to work! >:3)

svn path=/trunk/; revision=36761
2008-10-15 15:45:11 +00:00
KJK::Hyperion
7b75f95f4b Give .gch files an unique path based on module name: allows multiple modules to (safely!) share a single precompiled header.
Enjoy rebuilding the whole tree <3

This commit dedicated to hpoussin
See issue #3263 for more details.

svn path=/trunk/; revision=36760
2008-10-15 13:46:23 +00:00
Daniel Reimer
b86c8c5ee2 Bug 3791: Translate norwegian update by Lars Martin Hambro
svn path=/trunk/; revision=36759
2008-10-15 08:37:47 +00:00
Kamil Hornicek
9ece00b4f8 update to Mesa3D 7.2
svn path=/trunk/; revision=36758
2008-10-15 08:31:54 +00:00
Cameron Gutman
2278115192 - Merge aicom-network-fixes up to r36755
svn path=/trunk/; revision=36756
2008-10-15 00:32:36 +00:00
Timo Kreuzer
a075ba41c2 - Update CLIENTTHREADINFO structure
- Rename W32CLIENTINFO to CLIENTINFO and update members
- C_ASERT that CLIENTINFO fits into the TEB

svn path=/trunk/; revision=36753
2008-10-14 21:03:20 +00:00
Aleksey Bragin
c064c14ced - Mbcb field of SHARED_CACHE_MAP structure has MBCB type, not MCB.
svn path=/trunk/; revision=36752
2008-10-14 18:27:15 +00:00
Michael Martin
da1d359b70 - REnumServicesStatusA/REnumServicesStatusExA: Call REnumServicesStatusW/REnumServicesStatusExW to do the work eliminating duplicate code.
- lpResumeIndex and lpResumeHandle are set to 0 on success.

svn path=/trunk/; revision=36751
2008-10-14 17:55:44 +00:00
Michael Martin
d9a416da9f - REnumServicesStatusExW: Correct check for returning ERROR_SERVICE_DOES_NOT_EXIST.
- fixes bug #3787

svn path=/trunk/; revision=36750
2008-10-14 15:59:09 +00:00
Aleksey Bragin
ed58e3df34 - Don't pass CMP_LOCK_HASHES_FOR_KCB flag because no locking is perform in CmpBuildHashStackAndLookupCache, fixes an assert when trying to unlock not locked object.
- Add a hack (one and only one) for the MaxNameLen being different in KCB and actual KeyNode to allow regression testing framework go further.

svn path=/trunk/; revision=36747
2008-10-14 13:56:58 +00:00
Daniel Reimer
685d1fe7e7 Bug 3750: spanish update for netcfgx by Javier Remacha
Bug 3774: Greek update for usetup by Apostulos Alexandris
Sync wordpad and Winhlp32 to Wine HEAD.

svn path=/trunk/; revision=36746
2008-10-14 13:47:07 +00:00
Daniel Reimer
f4bb1d0429 Sync winfile and write to wine HEAD.
svn path=/trunk/; revision=36745
2008-10-14 13:44:12 +00:00
KJK::Hyperion
4182d4759d Add ICU <URL: http://www.icu-project.org/> to credits
svn path=/trunk/; revision=36744
2008-10-13 21:35:25 +00:00
Cameron Gutman
b17ea7dab0 - Fix build
svn path=/trunk/; revision=36743
2008-10-13 01:18:04 +00:00
Cameron Gutman
7beefc5606 - Merge aicom-network-fixes up to r36740
svn path=/trunk/; revision=36741
2008-10-13 01:07:37 +00:00
Cameron Gutman
6532da2ccb - Implement ProtocolResetComplete
- Store the status that gets passed to the completion routine

svn path=/branches/aicom-network-fixes/; revision=36740
2008-10-13 00:55:33 +00:00
Cameron Gutman
b01ceaabdc - Make sure NBAddNeighbor completed successfully
- Return the actual status instead of STATUS_SUCCESS always

svn path=/branches/aicom-network-fixes/; revision=36739
2008-10-13 00:52:25 +00:00
Cameron Gutman
23d01c2592 - Queue the work item directly from MiniQueueWorkItem
- Handle an invalid SelectedMediumIndex separately
 - Cancel the hang timer before calling MiniportHalt
 - Handle a BindAdapter failure

svn path=/branches/aicom-network-fixes/; revision=36738
2008-10-13 00:41:48 +00:00
Michael Martin
8f6cb6dbf6 - Implement REnumServicesStatusExA
- REnumServicesStatusA/W: Fixed returned param values to match Windows 
- REnumServicesStatusExW: Dont try to access lpResumeIndex if it is NULL. Fixed returned param values to match windows.

svn path=/trunk/; revision=36732
2008-10-12 13:10:05 +00:00
Aleksey Bragin
65bfc45d55 - Implement locking for Cc flush (the one used in NT5.2 results in a hang, might be because of a misused PagingIoResource).
- If an acquire/release operation is not implemented, FSD must return STATUS_INVALID_DEVICE_REQUEST, not some other error code.
- Fix a typo in the debug message.

svn path=/trunk/; revision=36731
2008-10-12 09:34:29 +00:00
Michael Martin
43dc41bad7 - Implement REnumServicesStatusA
- REnumServicesStatusW: Dont try to access lpResumeHandle if it is NULL

svn path=/trunk/; revision=36724
2008-10-12 00:02:17 +00:00
Johannes Anderwald
2b468f41a1 - Fix another bug...
svn path=/trunk/; revision=36723
2008-10-11 19:40:56 +00:00
Johannes Anderwald
6da373e9fd - Fix MultiByteToWideChar api parameters (thanks Christoph)
- Fix bugs in EnumNameServers

svn path=/trunk/; revision=36722
2008-10-11 19:30:45 +00:00
Johannes Anderwald
639ed2255f - Fix 2 bugs in the CopyIpAddrString leading to duplicate displayment of the same ip /dns /gw address
svn path=/trunk/; revision=36721
2008-10-11 19:28:39 +00:00
Johannes Anderwald
722bbf4ef3 - Implement GetPerAdapterInfo
- Fix multiple bugs in EnumNameServers implementation

svn path=/trunk/; revision=36720
2008-10-11 19:12:14 +00:00
Aleksey Bragin
33e3938bb1 - Fix a memory leak in IopUnloadDriver.
- Driver object temporary was not marked temporary, thus it wasn't really deleted after reference counter reached 0. Fix this (inspired by bug #3501).
See issue #3501 for more details.

svn path=/trunk/; revision=36719
2008-10-11 17:39:12 +00:00
Aleksey Bragin
96101fb28c Daniel Zimmerman <netzimme@aim.com>
- Implement MmGetFileNameForAddress (with the good description written previously). Testcased with OllyDbg and Syser (with the patch from bug 3454) when try to attach to a process.
See issue #3690 for more details.

svn path=/trunk/; revision=36718
2008-10-11 15:16:28 +00:00
Johannes Anderwald
3da5587cec - Replace IDOK with IDC_OK as this creates problems
- Add NULL pointer checks
- Misc bugfixes

svn path=/trunk/; revision=36715
2008-10-11 12:38:03 +00:00
Stefan Ginsberg
c74e4990a1 - ProbeForRead/Write Length argument is a SIZE_T, not a ULONG
svn path=/trunk/; revision=36713
2008-10-11 09:42:44 +00:00
Stefan Ginsberg
1e1d996268 - Fix portable Ex/ExfInterlockedCompareExchange64 to compare Destination with the Comparand instead of...itself?
svn path=/trunk/; revision=36712
2008-10-11 09:39:08 +00:00
Stefan Ginsberg
f01ffb27dc - ARM build fix -- add a non-atomic (but otherwise correct) _InterlockedCompareExchange64 intrinsic required since the RTL changes in 36166
svn path=/trunk/; revision=36711
2008-10-11 09:32:57 +00:00
Colin Finck
a9ef74a387 Fix the units
svn path=/trunk/; revision=36707
2008-10-10 16:42:09 +00:00
Johannes Anderwald
e156f23a14 - Implement IContextMenu3, IObjectWithSite, IExtractIconW interface
svn path=/trunk/; revision=36706
2008-10-10 15:18:18 +00:00
Stefan Ginsberg
6d04b16d6d - SVN maintenance
svn path=/trunk/; revision=36705
2008-10-10 13:34:27 +00:00
Johannes Anderwald
a080d60e4c - Don't use uninitialized INetConnection item
- should fix bug 3754

svn path=/trunk/; revision=36704
2008-10-10 09:36:39 +00:00
Thomas Bluemel
f8283ec523 Fix warning: Variable may be used uninitialized
svn path=/trunk/; revision=36703
2008-10-10 01:24:44 +00:00
Johannes Anderwald
36d4bf7f6e - Implement Advanced TCP/IP Configuration GUI Dialogs
svn path=/trunk/; revision=36702
2008-10-09 17:48:53 +00:00
Ged Murphy
c47e063f16 Call Query/SetSecurityAccessMask to get the mask
svn path=/trunk/; revision=36701
2008-10-09 15:06:57 +00:00
Cameron Gutman
3d33a2e976 - More work on NDIS 6.0
- Part 2 of X

svn path=/branches/aicom-network-fixes/; revision=36700
2008-10-08 22:25:01 +00:00
Cameron Gutman
1e22a89acc - Some of my work on NDIS 6.0
- Doesn't compile yet
 - Part 1 of X

svn path=/branches/aicom-network-fixes/; revision=36699
2008-10-08 21:17:10 +00:00
Dmitry Chapyshev
b1c39670f7 - Fix formatting (no code changed)
svn path=/trunk/; revision=36698
2008-10-08 16:26:50 +00:00
Dmitry Chapyshev
c196de6a7f - Add getting icon metrics
- Change icons sizes at change of system settings

svn path=/trunk/; revision=36697
2008-10-08 16:01:41 +00:00
Timo Kreuzer
5a9f88c144 remove a RETURN() macro
svn path=/trunk/; revision=36696
2008-10-08 15:41:52 +00:00
Dmitry Chapyshev
d70f2da816 - Update Russian translation
svn path=/trunk/; revision=36695
2008-10-08 14:48:30 +00:00
Timo Kreuzer
499b067bc4 Also raise hard error when dll was not found.
svn path=/trunk/; revision=36694
2008-10-08 14:37:10 +00:00
Timo Kreuzer
a8bc8a5bcf Raise hard error (show message box) when imports cannot be resolved. Windows only shows the short dll name, but I think it's worth showing the full path.
See issue #1228 for more details.

svn path=/trunk/; revision=36693
2008-10-08 14:09:30 +00:00
Dmitry Chapyshev
d63ea3d381 - Add getuname.dll (stub). charmap.exe from winxp work now
svn path=/trunk/; revision=36692
2008-10-08 11:51:03 +00:00
Timo Kreuzer
f5cbabe20c Add basic tests for BeginPath andd SetMapMode
svn path=/trunk/; revision=36691
2008-10-08 10:58:41 +00:00
Johannes Anderwald
049bf94d41 - Add 2 more error constants
svn path=/trunk/; revision=36690
2008-10-08 08:27:00 +00:00
Daniel Reimer
7322f606d4 Bug 3751: Polish translation update for netcfgx by Maciej Bialas
svn path=/trunk/; revision=36689
2008-10-08 00:49:51 +00:00
Daniel Reimer
baf8755097 Forgot one file. Sorry.
svn path=/trunk/; revision=36688
2008-10-08 00:39:50 +00:00
Johannes Anderwald
43a1f04fb8 - Add missing dialogs of TCP/IP Notify Object
svn path=/trunk/; revision=36687
2008-10-08 00:27:35 +00:00
Timo Kreuzer
419b09b96a - rewrite NtGdiPolyPolyDraw, optimizing it and making it more windows compatible
- Make PolyCounts ULONGs, not DWORDS or INTs.
- Remove GdiCreatePolyPolygonRgn and use IntCreatePolyPolygonRgn instead to get rid of code-duplication.
- IntGdiPolygon: rename UnsafePoints to Points

svn path=/trunk/; revision=36686
2008-10-07 23:02:41 +00:00
Timo Kreuzer
8a8e0aaae0 Fix FLOATOBJ_IsLong. Fix MapMode MM_ISOTROPIC.
This fixes the clock in timedate.cpl.

svn path=/trunk/; revision=36685
2008-10-07 22:57:50 +00:00
Timo Kreuzer
4ad9ae2b66 fix a typo
svn path=/trunk/; revision=36684
2008-10-07 22:24:17 +00:00
Daniel Reimer
85fcc4255f ooops. my fault...
svn path=/trunk/; revision=36683
2008-10-07 21:58:38 +00:00
Daniel Reimer
1876668958 Bug 3752: Translate files by Lars Martin Hambro
svn path=/trunk/; revision=36682
2008-10-07 21:12:45 +00:00
Daniel Reimer
ecc5f56883 Bug 3752: Translate files by Lars Martin Hambro
Bug 3768: Bulgarian translation update for ReactOS by CCTAHEB

svn path=/trunk/; revision=36681
2008-10-07 20:56:48 +00:00
Stefan Ginsberg
fce1822384 - HalRequestIpi takes a KAFFINITY as input, not a ULONG -- fix this and add a note about MP HAL's brokenness
svn path=/trunk/; revision=36680
2008-10-07 20:56:48 +00:00
Stefan Ginsberg
9ad1faa02e - Fix PKIPI_WORKER definition
- Add missing KeQueryActiveProcessors prototype

svn path=/trunk/; revision=36679
2008-10-07 18:07:31 +00:00
Stefan Ginsberg
c8fbbdcd1c - Add missing KiIdleSchedule and KiProcessDeferredReadyList
svn path=/trunk/; revision=36678
2008-10-07 17:55:32 +00:00
Stefan Ginsberg
e8837da84f - Add missing jump label to ExpInterlockedCompareExchange64
svn path=/trunk/; revision=36677
2008-10-07 17:42:54 +00:00
Aleksey Bragin
cab14c3ecc Daniel Zimmerman <netzimme@aim.com>
- Sync the sfc_os.dll with Wine and implement SfcIsFileProtected and
SfcIsKeyProtected. The installer will work better with this two function.

See issue #3719 for more details.

svn path=/trunk/; revision=36676
2008-10-07 11:23:36 +00:00
Dmitry Chapyshev
41e05c41dd - Add stubs for CredReadDomainCredentialsA/W, CredWriteDomainCredentialsA/W, CredUnmarshalCredentialA/W
- Add prototypes to header

svn path=/trunk/; revision=36675
2008-10-07 10:55:57 +00:00
Dmitry Chapyshev
77e8f8ad3f - Import credui from wine
svn path=/trunk/; revision=36674
2008-10-07 10:51:36 +00:00
Cameron Gutman
cc68183962 - Partially implement ProtocolStatus in tcpip
svn path=/branches/aicom-network-fixes/; revision=36670
2008-10-06 23:19:22 +00:00
Cameron Gutman
a033d44691 - Implement a MiniportShutdown routine for both NIC drivers
svn path=/branches/aicom-network-fixes/; revision=36669
2008-10-06 21:39:39 +00:00
Ged Murphy
5951657051 It looked like we could get away with removing this hack, but it seems it still causes painting problems when increasing the width. No time to investigate at the moment. (anyone else wanna take a look?)
svn path=/trunk/; revision=36668
2008-10-06 19:15:09 +00:00
Cameron Gutman
b3443bcbb9 - Call the MiniportShutdown handler at the right time
- Now we call it upon system shutdown and if a bug check occurred

svn path=/branches/aicom-network-fixes/; revision=36667
2008-10-06 18:56:44 +00:00
Ged Murphy
0f3e8477e1 - Add an address bar to serve as the web browser and folder history list (not yet functional)
- Hide the drivebar by default. It's cleaner this way
- Remove the old rebar hack. This should get rid of those annoying blue marks at the end of the toolbars

svn path=/trunk/; revision=36666
2008-10-06 18:42:17 +00:00
Gregor Schneider
22ed768c30 - Calculate the image size before the height is reported negative, remove redundant if
- Set image size for coreheader in first pass and for both header types in second pass
Fixes seven gdi32 bitmap winetests.

svn path=/trunk/; revision=36665
2008-10-06 12:39:27 +00:00
Gregor Schneider
f20c6fa6a4 -rgbReserved must be 0
-don't just fill a coreheader and dismiss it
-probe the full bitmap size, not only the first ulong
-CreateDIBSection should fail for compressed bitmaps
-set biClrUsed and copy the bitmapInfoHeader after it's filled
Fixes eight gdi32 bitmap winetests.

svn path=/trunk/; revision=36664
2008-10-06 11:25:38 +00:00
Aleksey Bragin
a7e1400f0c Cecill Etheredge <ijsf@gmx.net>
- The RtlEnumerateGenericTableWithoutSplaying function in RTL (generictable.c) effectively performs an endless enumeration, never advancing to the next successor element in the tree because of a bug in the code. Fix this. (Bug #3756).
- The RtlDelete code misses a line of code checking whether the node is a root,
and instead always returns NULL (assuming it is the root). Fix this. (Bug #3760).
See issue #3760 for more details.

svn path=/trunk/; revision=36663
2008-10-06 10:50:22 +00:00
Aleksey Bragin
ef393802e4 Dmitry Gorbachev
- Specify a no-entrypoint for modules without one (otherwise ld sets entry point to a random function).
See issue #3758 for more details.

svn path=/trunk/; revision=36662
2008-10-06 10:36:33 +00:00
Aleksey Bragin
feb1e5232e Dmitry Gorbachev
- lfn_get() reads past the end of name[]. Though harmless, it produces 'array subscript is above array bounds' compiler warning (treated as error).
See issue #3762 for more details.

svn path=/trunk/; revision=36661
2008-10-06 10:19:55 +00:00
Aleksey Bragin
cbda8b5401 Dmitry Gorbachev
- Fix 'overflow in implicit constant conversion' warnings (treated as errors).
See issue #3759 for more details.

svn path=/trunk/; revision=36660
2008-10-06 10:12:26 +00:00
Cameron Gutman
31b506837b - Add NDIS_OBJECT_HEADER and NDIS_GENERIC_OBJECT (NDIS 6.0)
svn path=/branches/aicom-network-fixes/; revision=36659
2008-10-06 01:40:07 +00:00
Ged Murphy
f0c460be21 Remove the address and command windows from the bottom of the file browser. They're buggy and they're not too pretty
svn path=/trunk/; revision=36658
2008-10-05 21:21:04 +00:00
Ged Murphy
beb0a4d899 Set the start button as the owner of the root start menu.
Fix the position of the root start menu

svn path=/trunk/; revision=36657
2008-10-05 13:33:41 +00:00
James Tabor
008e7f19c1 - Move DC_UpdateXforms out of the switch in SetMapMode. It does not effect anything.
svn path=/trunk/; revision=36655
2008-10-05 12:23:46 +00:00
James Tabor
47e5a8aad7 - Fix a Kernel Assert in EngAllocMem called from brush and add a tag.
svn path=/trunk/; revision=36653
2008-10-05 11:38:01 +00:00
James Tabor
18edd07564 - Force a recompute when setting map modes.
svn path=/trunk/; revision=36652
2008-10-05 11:26:09 +00:00
Gregor Brunmar
23bb9ae68f D3D9:
* Implemented DdGetAvailDriverMemory callback

svn path=/trunk/; revision=36651
2008-10-05 07:33:05 +00:00
James Tabor
dc649db4d4 - Fix order of calls in IntGdiPolygon. Check for PATH first.
svn path=/trunk/; revision=36650
2008-10-04 23:34:04 +00:00
Cameron Gutman
30f8dc548c - Only call the ProtocolReceivePacket handler if the protocol registered one
- Remove some unneeded code
 - Immediately send the loopback packet if possible

svn path=/branches/aicom-network-fixes/; revision=36649
2008-10-04 21:55:01 +00:00
Cameron Gutman
38d2e13461 - Properly implement MiniIndicateReceivePacket
svn path=/branches/aicom-network-fixes/; revision=36648
2008-10-04 21:31:36 +00:00
Cameron Gutman
1007f26da6 - Add SDL Mixer to downloader (Needed for LGeneral)
svn path=/trunk/; revision=36647
2008-10-04 17:26:11 +00:00
Ged Murphy
4b6830859b change quicklaunch rebar hardcoded size. This puts the gripper for the taskbar in the correct position
svn path=/trunk/; revision=36646
2008-10-04 16:47:41 +00:00
Cameron Gutman
d50f5d2833 - Fix the uTorrent link
svn path=/trunk/; revision=36645
2008-10-04 16:47:08 +00:00
Ged Murphy
ffa9230be9 - Use TBSTATE_PRESSED, our checked graphic isn't too pretty
- reduce desktops to 2 to save some taskbar space
- switch the icon back to the original one. It suits the tango set much better.

svn path=/trunk/; revision=36644
2008-10-04 13:19:23 +00:00
Colin Finck
0c0a645911 Update some links properly and update the description of Opera (sounds stupid to use the same for Firefox and Opera)
svn path=/trunk/; revision=36643
2008-10-04 13:00:33 +00:00
Ged Murphy
c06aacaa70 use latest firefox link, from caemyr
svn path=/trunk/; revision=36642
2008-10-04 12:09:30 +00:00
James Tabor
422abc788a - Update DEVCAPS to W2k/XP.
svn path=/trunk/; revision=36641
2008-10-04 11:18:30 +00:00
Cameron Gutman
b0e7e05ba2 - Send NDIS_STATUS_RESET_START to all bound protocols before we reset
- Send NDIS_STATUS_RESET_END to all bound protocols after we reset
 - Set MiniportBusy to TRUE if the MiniportReset handler returned NDIS_STATUS_PENDING

svn path=/branches/aicom-network-fixes/; revision=36635
2008-10-03 21:44:12 +00:00
Cameron Gutman
cd9b7fd8a1 - Merge aicom-network-fixes up to r36633
- tcpip's ProtocolStatus routine now gets called if a media status change occurs
 - This would fix a problem in which tcpip doesn't recognize the disconnect of an adapter but the ProtocolStatus handler in tcpip isn't implemented yet so the bug remains

svn path=/trunk/; revision=36634
2008-10-03 18:51:33 +00:00
Cameron Gutman
e92e21d4cf - Move the implementation of NdisMIndicateStatus to MiniStatus and call it from NdisMIndicateStatus
- Move the implementation of NdisMIndicateStatusComplete to MiniStatusComplete and call it from NdisMIndicateStatusComplete

svn path=/branches/aicom-network-fixes/; revision=36633
2008-10-03 18:38:40 +00:00
Cameron Gutman
aed6591143 - Implement NdisMIndicateStatusComplete
svn path=/branches/aicom-network-fixes/; revision=36632
2008-10-03 18:16:43 +00:00
Cameron Gutman
c3bf439096 - Implement NdisMIndicateStatus
svn path=/branches/aicom-network-fixes/; revision=36631
2008-10-03 09:49:37 +00:00
Colin Finck
bfbc5ffd7d - Add the other CPU_* codes (got them from a PDB)
- Restructure the CPU vendor check in KiGetFeatureBits with a switch statement
- Enable experimental support for Cyrix, Transmeta, Centaur and Rise CPUs (experimental = mostly untested)
- Just add CMPXCHG8B support to the feature bits for Centaur CPUs like it's already done for Rise CPUs without touching any MSRs.
  The instruction already works properly by default according to two official Centaur datasheets. Also Geoz on IRC already reported that his C3 Nehemiah works with ReactOS after this patch.
- Enable the 3DNow detection code through extended CPUID also for Centaur CPUs (all CPUs from IDT WinChip C6 to VIA C3 Ezra-T supported it)
- Report the presence of AMD K6 MTRRs also for mobile AMD K6-2+/K6-III+ CPUs (model D)

svn path=/trunk/; revision=36630
2008-10-02 21:57:36 +00:00
Johannes Anderwald
44d59eb606 - Fix a bug in _ILCreateNetConnect
- Add IQueryInfo interface

svn path=/trunk/; revision=36627
2008-10-02 17:32:51 +00:00
Aleksey Bragin
629de52bc2 - Sync RegGetValueA/W implementation (no functional changes though, mostly comments).
- Port RegQueryValueExW from Wine (but leaving RegQueryValueExA as a wrapper, with a fix).
- Implement RegSetValueA/W based on Wine's implementation, and removing old, different (A and W) versions of RegSetValue.

svn path=/trunk/; revision=36623
2008-10-02 11:30:44 +00:00
Cameron Gutman
fa71aedefe - Merge aicom-network-fixes up to r36621
svn path=/trunk/; revision=36622
2008-10-02 09:42:08 +00:00
Cameron Gutman
177f7f87d8 - Adapter is PLOGICAL_ADAPTER not PNDIS_MINIPORT_BLOCK
svn path=/branches/aicom-network-fixes/; revision=36621
2008-10-02 02:13:19 +00:00
Cameron Gutman
2e295e7d36 - Only call MiniportISR if the miniport driver called NdisMRegisterInterrupt with RequestIsr TRUE
- If RequestIsr is FALSE call the MiniportDisableInterrupt handler

svn path=/branches/aicom-network-fixes/; revision=36620
2008-10-02 02:04:57 +00:00
Cameron Gutman
769eadf101 - Adapter not NdisMiniportBlock is passed to ServiceRoutine
svn path=/branches/aicom-network-fixes/; revision=36619
2008-10-01 23:10:00 +00:00
Gregor Schneider
0a6956246f Initialize iCodePage to 0, because if might be used uninitialized.
svn path=/trunk/; revision=36618
2008-10-01 20:08:50 +00:00
Gregor Schneider
b95a85f898 After entering a case on iEncoding for ANSI/UTF, iEncoding can only have those two values. Fixes Coverity CIDS 19, 20.
svn path=/trunk/; revision=36617
2008-10-01 19:56:51 +00:00
Christoph von Wittich
0d10840784 fix formatting
svn path=/trunk/; revision=36616
2008-10-01 18:19:42 +00:00
Daniel Reimer
577deb3bf0 sync winhlp32 and wordpad with wine
svn path=/trunk/; revision=36613
2008-10-01 14:17:09 +00:00
Daniel Reimer
0ad74e6033 Sync winfile and write with wine
svn path=/trunk/; revision=36612
2008-10-01 14:14:39 +00:00
KJK::Hyperion
58fef1577f modified ke/i386/cpu.c
Added CMPXCHG8B enabling/detection code for TransMeta, Centaur and Rise (source: <URL: http://www.geoffchappell.com/notes/windows/kernel/cpu/cx8.htm>). Code dead until each vendor will be officially supported
   Alex and others: please review

svn path=/trunk/; revision=36610
2008-10-01 11:54:29 +00:00
Gregor Schneider
ac197ef4f3 Check DC for NULL before accessing it, fixes Coverity CID 661.
svn path=/trunk/; revision=36609
2008-10-01 11:48:12 +00:00
Gregor Schneider
dc3e3e8ef0 GetDIBits: destination height may be smaller than the source height, so the image size should always be calculated. Removed the hack in the bit copy phase that addressed the wrong bits buffer size.
This allows CopyImage to work, this can be seen in taskbar icons 1-4 for example.
Fixes two gdi32 winetests. Bugs #2225 and #3082 for more info.
Tested: QEMU VGA/8/16/24bpp, VMWare Server VMWare Driver 8/16/32bpp, VMWare Server ReactOS VBE Driver 8/16/32bpp

svn path=/trunk/; revision=36608
2008-10-01 10:49:10 +00:00
Gregor Schneider
163d36ceea [FORMATTING], spelling, misc cleanup. No functional changes.
svn path=/trunk/; revision=36607
2008-10-01 10:05:02 +00:00
Gregor Schneider
bd0da13d89 hColor is not needed in IntSetCursor, fixes Coverity CID 40.
svn path=/trunk/; revision=36606
2008-10-01 09:57:51 +00:00
Johannes Anderwald
591ca1c7de - Add resources for advanced tcp/ip configuration dialog
svn path=/trunk/; revision=36604
2008-09-30 20:16:00 +00:00
Johannes Anderwald
b1019f7eee - Ttttypo
svn path=/trunk/; revision=36603
2008-09-30 19:09:31 +00:00
Aleksey Bragin
f45ca4adda - Don't leak registry lock in failure branches of CmpParseKey. Spotted by Timo.
svn path=/trunk/; revision=36602
2008-09-30 18:44:22 +00:00
Johannes Anderwald
509b66cef5 - Add resources for TCP/IP alternate configuration dialog
svn path=/trunk/; revision=36601
2008-09-30 15:33:01 +00:00
Daniel Reimer
dbd0569bd7 Sync Wined3d to Wine 1.1.5 (great work done by: Kamil Hornicek)
svn path=/trunk/; revision=36600
2008-09-30 12:03:48 +00:00
James Tabor
f5fefad953 - Move undocumented WM_x messages to internal header. Find one, just move it in there.
svn path=/trunk/; revision=36597
2008-09-30 02:11:08 +00:00
James Tabor
e0aeda5ed2 - Patch by Vincent Povirk, Handle undocumented WM_POPUPSYSTENNEBU message.
svn path=/trunk/; revision=36596
2008-09-30 00:27:00 +00:00
Cameron Gutman
22ee49ac12 - Merge aicom-network-fixes up to r36594
svn path=/trunk/; revision=36595
2008-09-30 00:17:48 +00:00
Cameron Gutman
2197413b36 - Send the packet immediately if the miniport is not busy
- Change KeAcquireSpinLockAtDpcLevel/KeReleaseSpinLockFromDpcLevel to KeAcquireSpinLock/KeReleaseSpinLock since we aren't at DISPATCH_LEVEL
 - Fix some comments

svn path=/branches/aicom-network-fixes/; revision=36594
2008-09-30 00:09:23 +00:00
Cameron Gutman
48af47e451 - Code cleanup
svn path=/branches/aicom-network-fixes/; revision=36593
2008-09-30 00:04:52 +00:00
Cameron Gutman
9536865b31 - Fix a memory leak
svn path=/branches/aicom-network-fixes/; revision=36592
2008-09-30 00:02:53 +00:00
Cameron Gutman
576e6e7961 - Use the proper flags so NDIS knows that our NIC doesn't have hardware loopback support
- Fixes the loopback adapter

svn path=/branches/aicom-network-fixes/; revision=36591
2008-09-29 23:57:32 +00:00
Aleksey Bragin
c3ed3870b5 - Commit the whole mapped BIOS/device registers block, not only the first 2 pages (why so, David?).
- Use Zw instead of Nt.

svn path=/trunk/; revision=36587
2008-09-29 09:11:55 +00:00
KJK::Hyperion
2973483318 modified dll/win32/kernel32/kernel32.def
modified   dll/win32/kernel32/kernel32.rbuild
added      dll/win32/kernel32/misc/icustubs.cpp
   Export NormalizeString and IsStringNormalized from kernel32.dll. This (finally) makes normaliz.dll (50%) functional.
   Link kernel32.dll to ICU. Finally. Binary size increased by about 300 KB on a debug build (this is only the beginning).
   Umpteenth copy of C++ and Win32 stubs required to get ICU to link properly added to kernel32.dll.
   This commit dedicated to Timo Kreuzer. <3.

svn path=/trunk/; revision=36586
2008-09-28 22:39:45 +00:00
Timo Kreuzer
76bf74c7f7 Improve memcpy. It was working correctly, but it wasted a cycle. ;-)
svn path=/trunk/; revision=36585
2008-09-28 21:50:05 +00:00
Timo Kreuzer
36a547b4a7 Extend ObjTypeInfo array to 32 entries.
Fixes Coverity CID 538

svn path=/trunk/; revision=36584
2008-09-28 21:25:24 +00:00
Stefan Ginsberg
b9f6e4a356 - Fix comments (no code change)
svn path=/trunk/; revision=36583
2008-09-28 20:53:51 +00:00
Cameron Gutman
472eb91e2f - Merge aicom-network-fixes up to r36581
svn path=/trunk/; revision=36582
2008-09-28 20:19:27 +00:00
Cameron Gutman
f37a431c9a - Call the ProtocolReceive handler at DISPATCH_LEVEL
svn path=/branches/aicom-network-fixes/; revision=36581
2008-09-28 20:05:38 +00:00
Cameron Gutman
1a255263e6 - Raise IRQL to DISPATCH_LEVEL before using KeAcquireSpinLockAtDpcLevel/KeReleaseSpinLockFromDpcLevel
svn path=/branches/aicom-network-fixes/; revision=36580
2008-09-28 19:58:09 +00:00
Gregor Schneider
ec00886a23 Check for NULL before using the DC.
Fixes Coverity CID 680.

svn path=/trunk/; revision=36579
2008-09-28 19:44:58 +00:00
Gregor Schneider
f1f31fe9f2 Handle PALETTE_LockPalette returning NULL.
Fixes Coverity CIDs 486 and 487.

svn path=/trunk/; revision=36578
2008-09-28 19:42:03 +00:00
Gregor Schneider
b3b0519142 A msvcrt test shouldn't test ntdll functions for correctness. Now people don't need to fix nonexistant "hidden" msvcrt bugs anymore.
svn path=/trunk/; revision=36577
2008-09-28 18:40:38 +00:00
Hervé Poussineau
aac6354d3b Remove a hack, and link with C++ libraries only when required
Patch by Cecill Etheredge ( ijsf at gmx dot net )

svn path=/trunk/; revision=36576
2008-09-28 14:17:45 +00:00
Eric Kohl
f8998c9c84 Ooops, forgot to disable these [handle] attributes.
svn path=/trunk/; revision=36575
2008-09-28 13:49:47 +00:00
Eric Kohl
527202ad87 Cast returned handle values correctly.
svn path=/trunk/; revision=36574
2008-09-28 13:48:31 +00:00
Aleksey Bragin
5ee91c9c36 - Fix uninitialized variable usage. Fixes Coverity CID: 1293.
svn path=/trunk/; revision=36573
2008-09-28 11:16:41 +00:00
Aleksey Bragin
24430aea89 - Ports are counted starting from 1, with 0 being an invalid port index. Remove memory corruption by actually allocating MAX_ROOT_PORTS + 1 sized array. Fixes Coverity CID: 601.
svn path=/trunk/; revision=36572
2008-09-28 11:05:18 +00:00
Aleksey Bragin
faf94f044e - It's meaningless to try to complete the IRP if irp == NULL. Fixes Coverity CID: 398
svn path=/trunk/; revision=36571
2008-09-28 10:57:59 +00:00
Aleksey Bragin
6eb2f69158 - Remove redundant NULL-check. Fixes Coverity CID: 761.
svn path=/trunk/; revision=36569
2008-09-28 10:54:22 +00:00
Johannes Anderwald
862b1b1c46 - Query Name, Icon Attributes for each call of INetConnection_GetProperties
- Update Taskbar Notifications Icons on a network adapter change
- Sync remaining resources

svn path=/trunk/; revision=36568
2008-09-28 10:50:10 +00:00
Hervé Poussineau
0970d7b76e Replace .def file by a .spec file
svn path=/trunk/; revision=36563
2008-09-28 09:09:57 +00:00
Dmitry Chapyshev
f610f642b1 - Sync ddstream.idl with wine head
- Add qedit.idl from wine

svn path=/trunk/; revision=36560
2008-09-28 06:04:47 +00:00
Cameron Gutman
12604c6f99 - Merge aicom-network-fixes up to r36558
svn path=/trunk/; revision=36559
2008-09-27 21:25:27 +00:00
Cameron Gutman
1d8b2f1556 - Set MiniportBusy to TRUE if a request is pending
- Hold spin lock when setting MiniportBusy (forgot one from last time)

svn path=/branches/aicom-network-fixes/; revision=36558
2008-09-27 19:54:58 +00:00
Cameron Gutman
63ed3d8b4f - Don't add the protocol to the protocol list if binding failed
svn path=/branches/aicom-network-fixes/; revision=36557
2008-09-27 19:26:17 +00:00
Cameron Gutman
72f9da2665 - Protect MiniportBusy with a spin lock
- Adapter is PLOGICAL_ADAPTER not PNDIS_MINIPORT_BLOCK
 - Make sure memory allocation was successful
 - Cleanup code in ProRequest

svn path=/branches/aicom-network-fixes/; revision=36556
2008-09-27 19:00:47 +00:00
Stefan Ginsberg
b4d8244133 - Fix 2 typos
svn path=/trunk/; revision=36554
2008-09-27 18:45:23 +00:00
Cameron Gutman
a4c5f0d79c - Call ResetHandler directly
svn path=/branches/aicom-network-fixes/; revision=36552
2008-09-27 18:30:11 +00:00
Cameron Gutman
9826b2ad04 - Queue a work item in MiniReset if the adapter is currently busy
- Handle NdisWorkItemResetRequested in MiniportWorker
 - Remove a fixme

svn path=/branches/aicom-network-fixes/; revision=36551
2008-09-27 18:00:08 +00:00
Eric Kohl
1b0251574d - Disable [handle] and [context_handle] attributes in order not to break ReactOS when WIDL is updated to Wine-0.9.59.
- Fix typos in svcctl.idl.

svn path=/trunk/; revision=36550
2008-09-27 17:37:34 +00:00
Gregor Schneider
a26186ece3 Don't read and copy 32 Bit blocks, but only 24 Bit according to
24BPP_Put_/Get_Pixel.
Fixes NtGdiAlphaBlend in 24 Bit mode, see bug #3708.

svn path=/trunk/; revision=36548
2008-09-27 16:56:14 +00:00
Stefan Ginsberg
d9a95f3658 - Add PsGetThreadTeb prototype
svn path=/trunk/; revision=36542
2008-09-27 16:24:50 +00:00
Stefan Ginsberg
2e75e632d0 - Fix a couple of bugcodes with incorrect MessageId
- Add SYSTEM_THREAD_EXCEPTION_NOT_HANDLED make use of it

svn path=/trunk/; revision=36541
2008-09-26 22:11:10 +00:00
Eric Kohl
e7b8601c22 Fix lock handle typecasts.
svn path=/trunk/; revision=36540
2008-09-26 20:25:47 +00:00
Cameron Gutman
337a43d553 - Remove dead code
- Fixes coverity error 85

svn path=/branches/aicom-network-fixes/; revision=36538
2008-09-26 18:10:50 +00:00
Aleksey Bragin
a3767e4fc3 - Remove an excessive ASSERT (there is a real one below in the function).
svn path=/trunk/; revision=36534
2008-09-26 11:48:54 +00:00
Aleksey Bragin
c31a4dabe1 - Apply Art's bitmap patch from the branch, and change the other 2 functions similarly (bit set & clear).
svn path=/trunk/; revision=36533
2008-09-26 09:42:15 +00:00
Christoph von Wittich
5da1fe223d set eol-style:native
svn path=/trunk/; revision=36532
2008-09-26 05:05:59 +00:00
Christoph von Wittich
463ea79dae set eol-style:native
svn path=/trunk/; revision=36531
2008-09-26 05:03:14 +00:00
Christoph von Wittich
5367db78ec set eol-style:native
svn path=/trunk/; revision=36530
2008-09-26 04:55:25 +00:00
Christoph von Wittich
5e060cca56 set eol-style:native
svn path=/trunk/; revision=36529
2008-09-26 04:51:32 +00:00
Cameron Gutman
82e25f4548 - Fix a typo
- Fixes coverity error 388

svn path=/branches/aicom-network-fixes/; revision=36528
2008-09-26 03:43:07 +00:00
Cameron Gutman
0820ee7a4e - Return early if there aren't any packets to be sent
- Fixes coverity error 458

svn path=/branches/aicom-network-fixes/; revision=36527
2008-09-26 03:35:56 +00:00
Cameron Gutman
d9db39f82d - Return early if NBAddNeighbor or RouterAddRoute fails
- Fixes coverity error 389

svn path=/branches/aicom-network-fixes/; revision=36526
2008-09-26 03:23:56 +00:00
Cameron Gutman
9023e12475 - Return early if ProtocolNumber is too large
- Fixes coverity error 600

svn path=/branches/aicom-network-fixes/; revision=36525
2008-09-26 03:12:18 +00:00
Cameron Gutman
d8398cc719 - Fail if From is NULL
- Fixes Coverity error 652

svn path=/branches/aicom-network-fixes/; revision=36524
2008-09-26 03:03:55 +00:00
Timo Kreuzer
7f11e7e296 Simplify and fix InitMetrics. Fixes Coverity error 33.
svn path=/trunk/; revision=36523
2008-09-25 22:44:36 +00:00
Timo Kreuzer
7a71237648 Some cleanup
svn path=/trunk/; revision=36522
2008-09-25 22:17:51 +00:00
Timo Kreuzer
5148823f59 Update SM_XXX constants
svn path=/trunk/; revision=36521
2008-09-25 22:04:20 +00:00
KJK::Hyperion
445a482d8d Only apply C++ compiler flags to the C++ compiler. Fixes useless build warnings.
svn path=/trunk/; revision=36520
2008-09-25 19:44:38 +00:00
Timo Kreuzer
01dd1a7431 Allocate size of structure, not size of pointer to the structure. Fixes Coverity errors 767, 768, 769, 770
svn path=/trunk/; revision=36519
2008-09-25 19:26:09 +00:00
Stefan Ginsberg
b1a8e2b3fd - CmpOpenHiveFiles: If "Extension" is false then we won't have allocated any buffer, so there will never be a buffer to free
- Fix for Coverity Error CID: 29

svn path=/trunk/; revision=36518
2008-09-25 18:49:27 +00:00
Christoph von Wittich
ac376c0adb formatting fix
svn path=/trunk/; revision=36514
2008-09-25 18:10:23 +00:00
Christoph von Wittich
7d57e70f0d set eol-style:native
svn path=/trunk/; revision=36513
2008-09-25 17:53:05 +00:00
James Tabor
44b6f107bd - Add Defer Window Position Handle type for multiple-window ? position structure.
svn path=/trunk/; revision=36510
2008-09-25 15:39:33 +00:00
Stefan Ginsberg
ccd25605a6 - Implement and export PsIsSystemProcess and add it to the NDK
svn path=/trunk/; revision=36509
2008-09-25 14:39:38 +00:00
Stefan Ginsberg
d2abe18c98 - Implement IoGetPagingIoPriority and fix its export
svn path=/trunk/; revision=36508
2008-09-25 14:29:11 +00:00
Stefan Ginsberg
cb267e1fdf - Add WmiQueryTraceInformation, WmiTraceMessage and WmiTraceMessageVa stubs and exports
svn path=/trunk/; revision=36507
2008-09-25 14:25:22 +00:00
Aleksey Bragin
94b893abac - Fix one more totally "out of ideas how to create sections" MmCreateSection usage. Not only the MaximumSize is mandatory for file-backed sections, but an allocation type must be specified (SEC_COMMIT, and it's not the same as some humble "0" passed there as a value).
- Fix ReactOS's MmCreateDataFileSection to ignore 0 value in the MaximumSize (it has an additional check for MaximumSize being non-NULL, but this should be removed in future).

svn path=/trunk/; revision=36506
2008-09-25 11:24:51 +00:00
Cameron Gutman
975e8109a2 - Don't call NdisMSendComplete in MiniportSend
svn path=/branches/aicom-network-fixes/; revision=36501
2008-09-25 03:23:15 +00:00
Cameron Gutman
2f05ba10c9 - Created a dummy nic driver for testing purposes
- Still a work in progress

svn path=/branches/aicom-network-fixes/; revision=36500
2008-09-25 01:02:08 +00:00
Cameron Gutman
99d8e4f1b4 - Try again to fix build
svn path=/trunk/; revision=36499
2008-09-25 00:01:39 +00:00
Cameron Gutman
8ffee924f5 - Fix build
svn path=/trunk/; revision=36498
2008-09-24 23:48:28 +00:00
Cameron Gutman
564e5b5a2c Merge aicom-network-fixes up to r36496
- We now call the MiniportCheckForHang handler every two seconds
 - We reset the miniport if it has detected a hang
 - Added some IRQL checks

svn path=/trunk/; revision=36497
2008-09-24 23:39:17 +00:00
Cameron Gutman
df2275e5e3 - Add a debug print
svn path=/branches/aicom-network-fixes/; revision=36496
2008-09-24 22:00:02 +00:00
Cameron Gutman
b4f76ec0bb - MiniportAdapterHandle is PLOGICAL_ADAPTER not PNDIS_MINIPORT_BLOCK
svn path=/branches/aicom-network-fixes/; revision=36495
2008-09-24 21:56:07 +00:00
Stefan Ginsberg
ef2bb65235 - MiQueryVirtualMemory shouldn't be called for kernel memory, so remove the special case code for a kernel address space. Also fixes a case where we would dereference an uninitialized pointer.
- Fix for Coverity Error CID: 773

svn path=/trunk/; revision=36494
2008-09-24 19:13:08 +00:00
Stefan Ginsberg
a9d6e4341e - Remove deprecated macro
svn path=/trunk/; revision=36493
2008-09-24 18:47:24 +00:00
Stefan Ginsberg
c1a36080a7 - Add ObpValidateAccessMask stub (only returns success for now) and call it from ObInsertObject
- Fix for Coverity Error CID: 9

svn path=/trunk/; revision=36491
2008-09-24 17:32:14 +00:00
Stefan Ginsberg
c2ca8fb596 - HalpXboxReadSector: Fail if we are out of memory instead of dereferencing null
- Fix for Coverity error CID: 464

svn path=/trunk/; revision=36490
2008-09-24 17:16:25 +00:00
Stefan Ginsberg
ba22ca771d - IoFlushAdapterBuffers: "AdapterObject" is not an optional parameter, it is vital to identify the DMA adapter. Remove the check which confused Coverity and ASSERTify this instead.
- Fix for Coverity error CID: 155

svn path=/trunk/; revision=36489
2008-09-24 17:11:35 +00:00
Christoph von Wittich
e724baacde more correct fix
svn path=/trunk/; revision=36488
2008-09-24 16:57:29 +00:00
Stefan Ginsberg
d91564734d - IopGetDiskInformation: Fail if we are out of memory instead of dereferencing null
- Fix for Coverity error CID: 469
- Also fix a (potential) memory leak

svn path=/trunk/; revision=36487
2008-09-24 16:37:35 +00:00
Stefan Ginsberg
e57cfa2826 - Only dereference the KCB if we know it exists
- Fix for Coverity error CID: 279

svn path=/trunk/; revision=36486
2008-09-24 16:19:52 +00:00
Christoph von Wittich
d82ca9895d check for value > 0 before using it as array index
Fix for Coverity error CID: 438

svn path=/trunk/; revision=36485
2008-09-24 15:42:33 +00:00
Stefan Ginsberg
649b40cd13 - 64 bit fixes for Mm routines: Use SIZE_T and ULONG_PTR where appropriate
- Note: MSDN is wrong about Nt/ZwAllocateVirtualMemory's ZeroBits. It really is a ULONG_PTR.

svn path=/trunk/; revision=36484
2008-09-24 15:27:54 +00:00
Stefan Ginsberg
9bbb8ab1a3 - FsRtlBalanceReads: Fail if we are out of memory instead of dereferencing null
- Fix for Coverity error CID: 465

svn path=/trunk/; revision=36483
2008-09-24 15:04:59 +00:00
Stefan Ginsberg
85033039ab - RawQueryFsSizeInfo: Fail if we are out of memory instead of dereferencing null
svn path=/trunk/; revision=36482
2008-09-24 14:53:28 +00:00
Stefan Ginsberg
74897bfee4 - Fix some non-x86 FLOATOBJ_*
svn path=/trunk/; revision=36481
2008-09-24 14:01:43 +00:00
Art Yerkes
c261b9dbe8 Fix leaks reported by coverity 612-615. In each case, it'd be safe to free
NULL, and failure to allocate isn't the only dropthrough case, leading to
conversion buffer leaks.

svn path=/trunk/; revision=36480
2008-09-24 13:35:37 +00:00
Art Yerkes
4046f15afe Fix my copypasta spotted by (coverity 1294)
svn path=/trunk/; revision=36479
2008-09-24 12:56:30 +00:00
Daniel Reimer
c96b189f38 Bug 3726: Translate file: netshell by Lars Martin Hambro
Bug 3729: Italian translation update by Paolo Devoti
Bug 3738: slovak translations and fixes by Mario Kacmar
Bug 3741: Korean translation of Taskmgr by Sengyu Kim

svn path=/trunk/; revision=36472
2008-09-24 11:22:08 +00:00
Timo Kreuzer
c00f4a266c - remove old test code
svn path=/trunk/; revision=36471
2008-09-24 11:17:33 +00:00
Aleksey Bragin
f05e50b409 - Create a VdmpInitialize function for NtVdmControl's initialize command.
- Remove NtEarlyVdmInitialize hack and csrss IVT/BDA copying hack, instead, copy the first page of physical memory to the beginning of process's virtual address space like NT does.

svn path=/trunk/; revision=36459
2008-09-24 10:06:08 +00:00
Aleksey Bragin
200665fb89 Juriy Sidorov <jura@cp-lab.com>
- Fix existing font substitutions.
- Add FreeMono as substitution for Courier and Courier New.
- Optimize font substitution tables and make them easy to maintain.
See issue #3483 for more details.

svn path=/trunk/; revision=36451
2008-09-24 08:17:15 +00:00
Aleksey Bragin
b20633a1f0 - Make SmCreateUserProcess accept two flags: the old "wait for" one, and a new "reserve 1Mb" one. NT reserves lower 1MB of address space when starting a subsystem process. ReactOS should too, however right now this change is disabled (leads to boot problems).
svn path=/trunk/; revision=36450
2008-09-24 08:12:41 +00:00
Andrew Munger
68b1f10bef Remove a overzealous check. MSDN says to avoid calling with NumberOfBytes == 0, but it is valid.
Addresses bug 3715.

svn path=/trunk/; revision=36449
2008-09-24 07:52:19 +00:00
Cameron Gutman
23c2ae170f - Use timers so the code is much more simple and works better
svn path=/branches/aicom-network-fixes/; revision=36442
2008-09-23 23:59:43 +00:00
Cameron Gutman
0cabe4ffdb - Check for miniport hangs at the appropriate time
- Call MiniReset if required

svn path=/branches/aicom-network-fixes/; revision=36441
2008-09-23 20:54:02 +00:00
Cameron Gutman
be3ff9cec9 - Uncomment the stubbed CheckForHang handler
svn path=/branches/aicom-network-fixes/; revision=36440
2008-09-23 20:48:43 +00:00
Aleksey Bragin
9185bead4e - Fix ~4.4 million handle limit bug due to memory corruption. ReactOS can now create 16 million handles as expected (thanks Alex).
svn path=/trunk/; revision=36439
2008-09-23 20:44:31 +00:00
Cameron Gutman
63c5133b1c - Set CheckForHangSeconds to a default value of 2 if it wasn't set in MiniportInitialize
svn path=/branches/aicom-network-fixes/; revision=36438
2008-09-23 20:17:59 +00:00
Cameron Gutman
2d8a1d38bb - Set CheckForHangSeconds
svn path=/branches/aicom-network-fixes/; revision=36437
2008-09-23 20:10:35 +00:00
Stefan Ginsberg
c3320e0a31 - Attempt satisfy Alex
svn path=/trunk/; revision=36436
2008-09-23 19:54:13 +00:00
Ged Murphy
504c3f3278 Don't risk a negative array subscript. Fixes our one and only REVERSE_NEGATIVE error
Fix for Coverity error CID: 766

svn path=/trunk/; revision=36435
2008-09-23 19:02:32 +00:00
Christoph von Wittich
b13cfee486 return correct value in SETUPAPI_GetCurrentHwProfile
Fix for Coverity error CID: 782

svn path=/trunk/; revision=36434
2008-09-23 18:44:58 +00:00
Cameron Gutman
8f1a94b39b - Call the CheckForHang handler at DISPATCH_LEVEL
- Implement MiniReset

svn path=/branches/aicom-network-fixes/; revision=36433
2008-09-23 18:44:17 +00:00
Cameron Gutman
faa10907ca - Implement MiniCheckForHang
svn path=/branches/aicom-network-fixes/; revision=36432
2008-09-23 18:24:19 +00:00
Cameron Gutman
274d2f50e8 - We must check that NdisWrapperHandle is non-NULL to see if NdisMInitializeWrapper succeeded
svn path=/branches/aicom-network-fixes/; revision=36430
2008-09-23 18:07:26 +00:00
Gregor Brunmar
931c14a8ea D3D9:
* More init values when creating a texture

svn path=/trunk/; revision=36429
2008-09-23 17:01:40 +00:00
Stefan Ginsberg
ad277c0c6b - Add basic tracing to CmpReferenceKeyControlBlock, CmpDereferenceKeyControlBlock and CmpDereferenceKeyControlBlockWithLock
svn path=/trunk/; revision=36428
2008-09-23 14:15:56 +00:00
Aleksey Bragin
22c7de15e6 - In success cases of NtAllocateVirtualMemory, return the real (page rounded!) base address and region size, not the possibly unaligned pointer and length which were passed to the function. These cases were hit when a region of memory was previously reserved, then a commit request came with unaligned base address and length, which match that previously reserved region after aligning.
svn path=/trunk/; revision=36427
2008-09-23 12:41:02 +00:00
Aleksey Bragin
55ea8c5583 [FORMATTING]
- Reformat to the kernel coding style.

svn path=/trunk/; revision=36426
2008-09-23 11:45:40 +00:00
Aleksey Bragin
7a0cd51dea [FORMATTING]
- Apply standard header.

svn path=/trunk/; revision=36425
2008-09-23 10:47:10 +00:00
Art Yerkes
1c65b2ed57 Didn't notice that bufferSize is used by RegQueryValueEx. Now we count in
bytes with bufferSize and count in chars just in the subscript.

Noticed by Christoph_Vw

svn path=/trunk/; revision=36424
2008-09-23 10:17:27 +00:00
Art Yerkes
99f3a239d7 Initialize DbgLoadOptions from the start. It would be unitialized if a bootcd
was made without having the right section in txtsetup.sif.

svn path=/trunk/; revision=36423
2008-09-23 09:36:23 +00:00
Art Yerkes
5a637c03db Count the end of the szApplicationName in the right units. (coverity 551).
svn path=/trunk/; revision=36422
2008-09-23 09:28:44 +00:00
Art Yerkes
a6b7e20ad4 Fix a legitimate overrun in _widths (coverity 575), and try not to be as
clever.

svn path=/trunk/; revision=36421
2008-09-23 09:09:16 +00:00
Art Yerkes
91ae271e19 This bug could've caused mayhem in the icon cache. (coverity 790).
svn path=/trunk/; revision=36420
2008-09-23 08:58:19 +00:00
Art Yerkes
6276f8ea51 Fix possible overrun of the last byte of dbuf (coverity 552).
svn path=/trunk/; revision=36419
2008-09-23 08:43:49 +00:00
Christoph von Wittich
87b74aaeed overrun of static array
Fix for Coverity error CID: 529

svn path=/trunk/; revision=36418
2008-09-23 08:04:57 +00:00
Aleksey Bragin
77b6062570 - The check for SystemHive being non-NULL is meaningless, because CmpInitializeHive is already checked for failure earlier, and in success case it returns a valid Hive.
- Fix for Coverity error CID: 280

svn path=/trunk/; revision=36417
2008-09-23 08:04:23 +00:00
Christoph von Wittich
112e87a86c overrun of static array
Fix for Coverity error CID: 532

svn path=/trunk/; revision=36416
2008-09-23 07:50:59 +00:00
Christoph von Wittich
1285642dcd overrun of static array
Fix for Coverity error CID: 552

svn path=/trunk/; revision=36415
2008-09-23 07:44:15 +00:00
Aleksey Bragin
118679eda4 - Preinitialize ValueData with NULL.
- Fix for Coverity error CID: 772.

svn path=/trunk/; revision=36414
2008-09-23 07:40:40 +00:00
Christoph von Wittich
db712aaf9b overrun of static array
Fix for Coverity error CID: 546 + 547.

svn path=/trunk/; revision=36413
2008-09-23 07:38:00 +00:00
Christoph von Wittich
eb68ba4328 overrun of static array
Fix for Coverity error CID: 548.

svn path=/trunk/; revision=36412
2008-09-23 07:33:44 +00:00
Christoph von Wittich
cb7fa454fa don't free memory which is not allocated yet
Fix for Coverity error CID: 789.

svn path=/trunk/; revision=36411
2008-09-23 07:05:18 +00:00
Christoph von Wittich
2aabf8b66d fix heap corruption when lpStringToFind is NULL
Fix for Coverity error CID: 775.

svn path=/trunk/; revision=36410
2008-09-23 06:55:05 +00:00
Art Yerkes
9b1a7c47bd some detritus exposed by coverity.
svn path=/trunk/; revision=36409
2008-09-23 05:58:51 +00:00
Cameron Gutman
521d849d25 - Add some IRQL checks for ne2000 like those in r36406
svn path=/branches/aicom-network-fixes/; revision=36408
2008-09-23 04:53:59 +00:00
Cameron Gutman
751bd9fb71 - Change NdisAcquireSpinLock to NdisDprAcquireSpinLock because we are running at DISPATCH_LEVEL
svn path=/branches/aicom-network-fixes/; revision=36407
2008-09-23 04:39:31 +00:00
Cameron Gutman
be9e073137 - Add some IRQL checks
- Fix some comments

svn path=/branches/aicom-network-fixes/; revision=36406
2008-09-23 04:29:30 +00:00
James Tabor
9c5dbd4ca2 Add UpdateLayeredWindowIndirect to def and cleanup and add a new type in dce.h.
svn path=/trunk/; revision=36405
2008-09-22 15:49:38 +00:00
Christoph von Wittich
86186976c5 sync riched20 with wine 1.1.5
svn path=/trunk/; revision=36404
2008-09-22 14:29:28 +00:00
Christoph von Wittich
a03d696d68 sync oleaut32 with wine 1.1.5
svn path=/trunk/; revision=36403
2008-09-22 14:20:27 +00:00
Christoph von Wittich
31607505af fix some memory leaks (patch by Ged)
svn path=/trunk/; revision=36402
2008-09-22 12:18:12 +00:00
Stefan Ginsberg
9c5e46aede - Remove deprecated output
svn path=/trunk/; revision=36401
2008-09-22 11:46:51 +00:00
Christoph von Wittich
f6e7185c74 the time has COM
import stdole32.tlb from wine

svn path=/trunk/; revision=36400
2008-09-22 11:38:51 +00:00
James Tabor
1a7da253a8 - Add UPDATELAYEREDWINDOWINFO structure and UpdateLayeredWindowIndirect and types to psdk.
- Move UpdateLayeredWindow to def and change it to UpdateLayeredWindowIndirect.

svn path=/trunk/; revision=36398
2008-09-22 00:52:24 +00:00
Eric Kohl
4a8d830f83 Sync to Wine-0.9.58
- Rob Shearman <rob@codeweavers.com> Thu, 14 Feb 2008
widl: Remove unused headers.

- Rob Shearman <rob@codeweavers.com> Thu, 14 Feb 2008
widl: Guard the inclusion of unistd.h.

- Rob Shearman <rob@codeweavers.com> Tue, 19 Feb 2008
Add the nounistd option to all lex source files.

- Alexandre Julliard <julliard@winehq.org> Tue, 19 Feb 2008
Avoid the nounistd option that doesn't exist on older flex, define YY_NO_UNISTD_H... 

- Dan Hipschman <dsh@linux.ucla.edu> Thu, 21 Feb 2008
widl: Allow is_string_type to work for typedef'd types.

- Gerald Pfeifer <gerald@pfeifer.com> Fri, 22 Feb 2008
widl: Include <unistd.h> for prototype of unlink().

- Dan Hipschman <dsh@linux.ucla.edu> Wed, 19 Mar 2008
widl: Ignore libraries in imported IDL files.

- Dan Hipschman <dsh@linux.ucla.edu> Thu, 20 Mar 2008
widl: Make structures with FC_ENUM16 fields complex.

svn path=/trunk/; revision=36394
2008-09-21 21:18:42 +00:00
Eric Kohl
1c1bfdafe2 Define TRUE only if it hasn't been defined before
svn path=/trunk/; revision=36390
2008-09-21 19:57:05 +00:00
Colin Finck
033cea3fa6 Forgot these files, sorry...
svn path=/trunk/; revision=36385
2008-09-21 17:01:55 +00:00
Colin Finck
6b981d5bb1 Sync msi with Wine 1.1.5
svn path=/trunk/; revision=36384
2008-09-21 15:24:30 +00:00
Eric Kohl
2cbfa7cb91 EnumDependentServicesA/W and EnumServicesStatusA/W don't fix up pointers if the service manager returns an error.
This fixes bug #3737.
Patch by Michael Martin aka bugboy <martinmnet@hotmail.com>.


svn path=/trunk/; revision=36383
2008-09-21 15:19:52 +00:00
Cameron Gutman
39a0bb1742 - Merge aicom-network-fixes up to r36381
svn path=/trunk/; revision=36382
2008-09-21 14:43:43 +00:00
Cameron Gutman
e6330c4049 - Set the InFlightRequest to NULL when we complete
svn path=/branches/aicom-network-fixes/; revision=36381
2008-09-21 14:40:28 +00:00
Christoph von Wittich
70f9181595 fix another typo...
svn path=/trunk/; revision=36378
2008-09-21 14:12:52 +00:00
Eric Kohl
b48aef5119 [FORMATTING] No code changes!
svn path=/trunk/; revision=36377
2008-09-21 13:55:53 +00:00
Christoph von Wittich
fff44b9cb5 sync jscript with wine 1.1.5
svn path=/trunk/; revision=36376
2008-09-21 13:24:00 +00:00
Christoph von Wittich
3415a605e5 this hack wasn't supposed to be committed
svn path=/trunk/; revision=36375
2008-09-21 13:05:48 +00:00
Christoph von Wittich
8ff60114b6 sync msxml3 with wine 1.1.5
svn path=/trunk/; revision=36374
2008-09-21 13:03:20 +00:00
Colin Finck
0fa81bc0da Wow, WriteConfigurationFile() in rbuild never worked since it was added in r13496 over 3 years ago! :-)
Thus, the generated "roscfg.h" was always empty, but for whatever reason modules started to include it.
I removed all dependencies on this file and the function itself from rbuild.

svn path=/trunk/; revision=36373
2008-09-21 13:00:40 +00:00
Cameron Gutman
0f1167cbc0 - Merge aicom-network-fixes up to r36371
svn path=/trunk/; revision=36372
2008-09-21 12:41:26 +00:00
Cameron Gutman
86e1d71934 - There are 4 in flight requests not 3
svn path=/branches/aicom-network-fixes/; revision=36371
2008-09-21 12:31:14 +00:00
Gregor Brunmar
82d36803fa D3D9:
* Added stubs for IDirect3DTexture9 methods
* Implemented IDirect3DTexture9::GetDevice()
* Moved device locking to the D3D9BaseObject instead of in each child object

svn path=/trunk/; revision=36370
2008-09-21 12:25:38 +00:00
Christoph von Wittich
a63c53bdac fix two nice typo's
(array subscript was above array bounds)

svn path=/trunk/; revision=36369
2008-09-21 12:12:37 +00:00
Christoph von Wittich
ec73256471 sync msiexec with wine 1.1.5
svn path=/trunk/; revision=36368
2008-09-21 12:00:07 +00:00
Aleksey Bragin
0230d25b11 - FileOffset is 32bit long, not 64bit, so no reason in additional casting.
- Fix a ULONG -> BOOLEAN conversion warning.

svn path=/trunk/; revision=36367
2008-09-21 11:34:04 +00:00
Christoph von Wittich
463ffc2132 fix wrong casts
svn path=/trunk/; revision=36366
2008-09-21 06:52:54 +00:00
Christoph von Wittich
295baae2f3 fix brackets
svn path=/trunk/; revision=36365
2008-09-21 06:42:21 +00:00
Cameron Gutman
24402d079c - Remove more useless code
svn path=/branches/aicom-network-fixes/; revision=36364
2008-09-21 03:21:34 +00:00
Cameron Gutman
252f7c71da - Set MiniportBusy to TRUE in MiniDequeueWorkItem instead of MiniQueueWorkItem
- Fail if another miniport request is still in progress

svn path=/branches/aicom-network-fixes/; revision=36363
2008-09-21 02:35:23 +00:00
Cameron Gutman
e6386dff73 - Remove some unneeded code
- Set MiniportBusy to TRUE if MiniDoRequest returns NDIS_STATUS_PENDING

svn path=/branches/aicom-network-fixes/; revision=36362
2008-09-21 01:55:16 +00:00
Cameron Gutman
36a831e55c - Only call MiniSendComplete if ProIndicatePacket didn't return NDIS_STATUS_PENDING
svn path=/branches/aicom-network-fixes/; revision=36359
2008-09-20 23:08:56 +00:00
Cameron Gutman
08288ba535 - Revert r36337 because the callers don't depend on the memory being zeroed
svn path=/branches/aicom-network-fixes/; revision=36358
2008-09-20 21:29:31 +00:00
Eric Kohl
aa46f44e50 [FORMATTING] No code changes!
svn path=/trunk/; revision=36357
2008-09-20 20:28:23 +00:00
Cameron Gutman
b7872654ed - The handle passed to MiniRequestComplete, NdisMQueryInformationComplete, and NdisMSetInformationComplete is the Adapter not the MiniportBlock
- Set MiniportBusy to FALSE in all the completion routines
 - Set MiniportBusy to TRUE in MiniQueueWorkItem
 - Only requeue the packet if it's a serialized miniport that returned NDIS_STATUS_RESOURCES
 - Hold the spin lock when requeuing the packet

svn path=/branches/aicom-network-fixes/; revision=36356
2008-09-20 17:10:30 +00:00
Christoph von Wittich
8c33fab48b replace \" with "" in rc files
fix non standard C code

svn path=/trunk/; revision=36353
2008-09-20 14:55:49 +00:00
Christoph von Wittich
64048965fe -fix resource leaks
-don't free memory allocated by LocalAlloc with HeapFree

svn path=/trunk/; revision=36352
2008-09-20 14:13:10 +00:00
Stefan Ginsberg
9c3ba3b526 - Fix CMTRACE macro
svn path=/trunk/; revision=36351
2008-09-20 14:11:25 +00:00
Dmitry Chapyshev
608c551fa0 - Implement RealChildWindowFromPoint (based on wine)
- Add checking params for BeginDeferWindowPos

svn path=/trunk/; revision=36350
2008-09-20 13:47:33 +00:00
Christoph von Wittich
27149c2a0c fix formatting
svn path=/trunk/; revision=36349
2008-09-20 13:45:33 +00:00
Dmitry Chapyshev
47b0133272 - Fix formatting. No code change
svn path=/trunk/; revision=36348
2008-09-20 13:45:10 +00:00
Christoph von Wittich
de2b706b27 fix resource leaks
svn path=/trunk/; revision=36347
2008-09-20 13:44:56 +00:00
Christoph von Wittich
b20ceda590 fix some non standard conformant code
svn path=/trunk/; revision=36346
2008-09-20 13:36:26 +00:00
Christoph von Wittich
c2060ef1ff convert this mess into actual C code
svn path=/trunk/; revision=36345
2008-09-20 12:58:28 +00:00
Christoph von Wittich
056bcda4d1 fix broken rc files
svn path=/trunk/; revision=36344
2008-09-20 09:38:20 +00:00
Christoph von Wittich
2aa6b99347 fix some resource leaks
svn path=/trunk/; revision=36342
2008-09-20 09:28:55 +00:00
Christoph von Wittich
1e89fe22e0 fix some resource leaks
svn path=/trunk/; revision=36341
2008-09-20 09:05:24 +00:00
Christoph von Wittich
29dc95eb08 don't use \" in rc files, use double quotation marks instead
svn path=/trunk/; revision=36340
2008-09-20 08:36:06 +00:00
Dmitry Chapyshev
95569ba91c - Fix formatting. No code change
svn path=/trunk/; revision=36339
2008-09-20 08:11:32 +00:00
Cameron Gutman
42c8a616ec - Merge aicom-network-fixes up to r36337
svn path=/trunk/; revision=36338
2008-09-20 00:39:55 +00:00
Cameron Gutman
5faf248d96 - Zero the memory after we allocate it
svn path=/branches/aicom-network-fixes/; revision=36337
2008-09-20 00:31:02 +00:00
Cameron Gutman
d8dfacc28d - Queue the packet again if we currently don't have enough resources to process it
svn path=/branches/aicom-network-fixes/; revision=36336
2008-09-19 23:51:26 +00:00
Cameron Gutman
5620a8ecff - Initialize the callback record before calling KeRegisterBugCheckCallback so NdisMRegisterAdapterShutdownHandler should work now
svn path=/branches/aicom-network-fixes/; revision=36335
2008-09-19 23:41:28 +00:00
Cameron Gutman
face815dd6 - Code cleanup
- Set Status to NDIS_STATUS_NOT_SUPPORTED if we don't support the parameter type

svn path=/branches/aicom-network-fixes/; revision=36334
2008-09-19 23:18:12 +00:00
Cameron Gutman
f0e952b4b6 - Store the current thread
svn path=/branches/aicom-network-fixes/; revision=36333
2008-09-19 23:16:29 +00:00
Thomas Bluemel
324b9250cc Only free allocated bands
svn path=/trunk/; revision=36330
2008-09-19 19:26:00 +00:00
Colin Finck
773113715b Revert the aesthetic hack of r27608
We used Bitstream/DejaVu fonts for everything at that time, but the current Tahoma font doesn't need this hack.
This way, all window controls with mnemonic keys have the underscore placed as under Windows :-)

svn path=/trunk/; revision=36329
2008-09-19 15:11:09 +00:00
Christoph von Wittich
b4c9d9e321 fix a psapi winetest
svn path=/trunk/; revision=36328
2008-09-19 14:15:05 +00:00
Christoph von Wittich
eb778285cf fix dll parameters
svn path=/trunk/; revision=36327
2008-09-19 14:02:24 +00:00
Johannes Anderwald
f05f1fbaba - Add resource idds
svn path=/trunk/; revision=36326
2008-09-19 12:40:29 +00:00
Johannes Anderwald
ebc7599c6d - Import TCP/IP dialog from ncpa
svn path=/trunk/; revision=36325
2008-09-19 12:40:04 +00:00
Christoph von Wittich
72d5f166e9 fix formatting
svn path=/trunk/; revision=36324
2008-09-19 10:53:10 +00:00
Aleksey Bragin
f1c91f140d - Get rid of sprintf usage in default_dbg_vprintf.
- This make tracing macro usage safe in crt sprintf implementation and simplify overall codepath (no need for intermediate buffer).
- Solution inspired by hackbunny's suggestion, fixes bug 3632.
- Add vDbgPrintExWithPrefix to debugsup libraries.
See issue #3632 for more details.

svn path=/trunk/; revision=36323
2008-09-19 10:35:30 +00:00
Christoph von Wittich
b4572ba562 DShow.h -> dshow.h
svn path=/trunk/; revision=36322
2008-09-19 09:02:03 +00:00
Christoph von Wittich
2342d9a8ab add missing dvdmedia.h
svn path=/trunk/; revision=36321
2008-09-19 09:01:44 +00:00
Christoph von Wittich
d062feb6c6 -> filename to lowercase
svn path=/trunk/; revision=36320
2008-09-19 08:57:12 +00:00
Christoph von Wittich
18f1286085 rename to lower case
svn path=/trunk/; revision=36319
2008-09-19 08:52:53 +00:00
Christoph von Wittich
376d45bf30 add CLSIDWaveParser
svn path=/trunk/; revision=36318
2008-09-19 08:52:07 +00:00
Christoph von Wittich
c8486cd5b2 rename to lower case
svn path=/trunk/; revision=36317
2008-09-19 08:46:37 +00:00
Christoph von Wittich
d75275c3dc rename to lower case
svn path=/trunk/; revision=36316
2008-09-19 08:46:17 +00:00
Christoph von Wittich
318e4faba3 rename to lower case
svn path=/trunk/; revision=36315
2008-09-19 08:45:52 +00:00
Christoph von Wittich
492db19dd6 rename to lower case
svn path=/trunk/; revision=36314
2008-09-19 08:45:12 +00:00
Christoph von Wittich
9f481ee4dd rename to lower case
svn path=/trunk/; revision=36313
2008-09-19 08:44:50 +00:00
Christoph von Wittich
f902a52200 -import quartz from wine 1.1.4
-autoregister devenum

svn path=/trunk/; revision=36312
2008-09-19 08:35:33 +00:00
Cameron Gutman
0b7d92c4b3 - Fail if TCPSocket doesn't complete successfully
svn path=/branches/aicom-network-fixes/; revision=36311
2008-09-19 04:38:25 +00:00
Cameron Gutman
249fa88dd2 - Add the adapter to the adapter list only after it is bound to the IP layer
svn path=/branches/aicom-network-fixes/; revision=36310
2008-09-19 04:18:59 +00:00
Cameron Gutman
56d37e6da3 - Exit the loop when we find the matching Bucket
- Make sure we allocated Bucket
 - Remove a useless if
 - Return OSK_ENOBUFS if we can't allocate SleepingThread

svn path=/branches/aicom-network-fixes/; revision=36309
2008-09-19 02:12:55 +00:00
Cameron Gutman
15d003fb13 - Only continue sending fragments if the last one succeeded
svn path=/branches/aicom-network-fixes/; revision=36308
2008-09-19 00:40:13 +00:00
Christoph von Wittich
1399ad5d93 forgot to fix this as well
svn path=/trunk/; revision=36306
2008-09-18 16:49:53 +00:00
Christoph von Wittich
e5131cbe38 fix some of the mess Lentin created here
-don't use TCHAR in ANSI functions
-add a DllMain otherwise a random memory address is called when loading the dll
-add DPRINT1 to all stubs

svn path=/trunk/; revision=36305
2008-09-18 16:48:38 +00:00
Aleksey Bragin
d65eb0ae05 - Implement MmCallDllInitialize (partially based on a patch from bug 3730).
See issue #3730 for more details.

svn path=/trunk/; revision=36304
2008-09-18 15:45:16 +00:00
Aleksey Bragin
c6afd96ea2 - Select ANSI_VAR_FONT in explorer when drawing start button text and desktop switching buttons text. Based on Juriy Sidorov's patch from bug 3484.
See issue #3484 for more details.

svn path=/trunk/; revision=36303
2008-09-18 12:56:52 +00:00
Christoph von Wittich
a0d50db01e only touch the type on success or STATUS_BUFFER_OVERFLOW
svn path=/trunk/; revision=36302
2008-09-18 12:54:45 +00:00
Aleksey Bragin
425fdf353f - Create a stock font object ANSI_VAR_FONT, this fixes explorer's clock using the wrong font (and any other app using that stock font object).
See issue #3484 for more details.

svn path=/trunk/; revision=36301
2008-09-18 12:43:21 +00:00
Aleksey Bragin
0395b8a56a - Save SizeOfImage field from the image header during PE loading.
svn path=/trunk/; revision=36300
2008-09-18 11:19:29 +00:00
Johannes Anderwald
15ae0a215b - Refresh adapter statistics when INetConnection_GetProperties is called
- Perform icon change when the adapter receives operational / disconnected state

svn path=/trunk/; revision=36298
2008-09-18 09:01:52 +00:00
Johannes Anderwald
88a671baa1 - Use LoadImage over deprecated LoadIcon (thanks Ged)
- Restore focus to status dialog when network properties dialog is closed

svn path=/trunk/; revision=36297
2008-09-18 07:18:18 +00:00
Johannes Anderwald
245ddb9f52 - Fix several bugs in icon changing code
svn path=/trunk/; revision=36296
2008-09-17 22:21:04 +00:00
Johannes Anderwald
48dac13bd4 - Update Status Icon when there is activity
- Also update the Taskbar Notification Icon

svn path=/trunk/; revision=36295
2008-09-17 21:58:34 +00:00
Johannes Anderwald
58d5c68b74 - Use Ged's time updating code from ncpa module
- Periodically refresh timer for status dialog
- Make property sheet modal

svn path=/trunk/; revision=36292
2008-09-17 19:44:05 +00:00
Aleksey Bragin
9a4bf1ea9c - ObQueryNameString can return STATUS_INFO_LENGTH_MISMATCH, so make sure SeInitializeProcessAuditName supports that along with BUFFER_OVERFLOW and BUFFER_TOO_SMALL, which an Ob query name procedure could return.
- ObQueryNameString can return STATUS_INFO_LENGTH_MISMATCH, take this into account and report a proper buffer length to the caller in IopQueryNameFile.

svn path=/trunk/; revision=36291
2008-09-17 18:38:14 +00:00
Johannes Anderwald
6a59f3c2f8 - Use updated icons
- Only load Taskbar Notifications once

svn path=/trunk/; revision=36290
2008-09-17 16:53:05 +00:00
Christoph von Wittich
73e8217f04 add icons for netshell (from tango project)
svn path=/trunk/; revision=36289
2008-09-17 16:35:56 +00:00
Johannes Anderwald
c4f9fedf2d - Initialize members
svn path=/trunk/; revision=36288
2008-09-17 16:19:35 +00:00
Johannes Anderwald
fa64fcba76 - Preload NetworkConnection Taskbar Notification
- Use Notification as a singleton
- Execute the status dialog by using the NetCfgInstanceId of the connection

svn path=/trunk/; revision=36287
2008-09-17 15:20:04 +00:00
Christoph von Wittich
15e6477932 fix a kernel32 environ winetest
svn path=/trunk/; revision=36285
2008-09-17 14:03:05 +00:00
Johannes Anderwald
3ed4acffca - Check for null in IConnection_Constructor
- Implement INetConnectionConnectUi interface
- Add a dialog which serves a proxy dialog
- Add tray icons for connection which want to displayed in the tray
- Start implement network connection status dialog

svn path=/trunk/; revision=36284
2008-09-17 13:58:48 +00:00
Johannes Anderwald
84df91a549 - Add INetConnectionConnectUi interface
svn path=/trunk/; revision=36283
2008-09-17 13:53:00 +00:00
Eric Kohl
7fc5d5420a RSetServiceStatus:
- Don't fail if the system is shutting down because services must report successful shutdown to the service manager while the system is shutting down.
- Add some more parameter checks.

svn path=/trunk/; revision=36272
2008-09-16 19:47:16 +00:00
Gregor Brunmar
b0530233d9 D3D9: Implemented part of IDirect3DDevice9::CreateTexture()
svn path=/trunk/; revision=36271
2008-09-16 19:21:02 +00:00
Johannes Anderwald
ec92454abf - add IID_INetConnectionConnectUi
svn path=/trunk/; revision=36268
2008-09-16 14:44:42 +00:00
Colin Finck
0cb9efc0ff Fix some mistakes detected by a true XML parser
svn path=/trunk/; revision=36267
2008-09-16 14:29:21 +00:00
Stefan Ginsberg
82234d5abf - Implement IoSetFileOrigin
svn path=/trunk/; revision=36263
2008-09-15 17:47:16 +00:00
Johannes Anderwald
7660dc57be - Fix selection of radio buttons for unimplemented by folder dialog
- found by PCNeuVerdrahter

svn path=/trunk/; revision=36259
2008-09-15 13:41:17 +00:00
Cameron Gutman
48c42842c5 - Merge aicom-network-fixes up to r36256
- This should fix kvmnet

svn path=/trunk/; revision=36258
2008-09-15 13:13:44 +00:00
Aleksey Bragin
b07e36592f - Don't hardcode PAGE_SIZE two times, use ViewSize value, which is the actual size of committed pages.
svn path=/trunk/; revision=36257
2008-09-15 13:09:30 +00:00
Cameron Gutman
340fdfa3ff - Add the spin locks back that I removed
svn path=/branches/aicom-network-fixes/; revision=36256
2008-09-15 12:54:53 +00:00
Cameron Gutman
cfcc5a1f53 - Queue a work item for all packets
- Now I can add the spin locks back that I removed

svn path=/branches/aicom-network-fixes/; revision=36255
2008-09-15 12:44:16 +00:00
Christoph von Wittich
43aead0a4e add ReactOS (RosDbg) option to freeldr and use it as default for unattended installs
svn path=/trunk/; revision=36253
2008-09-15 06:25:31 +00:00
Stefan Ginsberg
fa462c13fd - STDCALL -> NTAPI
svn path=/trunk/; revision=36252
2008-09-15 04:38:06 +00:00
Stefan Ginsberg
af0b1eb575 - IopCompleteRequest: Remove the hack related to Irp->UserEvent, fixed by 36047
svn path=/trunk/; revision=36251
2008-09-15 04:32:45 +00:00
Cameron Gutman
72d8191116 - Use NDIS_GET_PACKET_STATUS to get the real status for the packet
- Set MiniportBusy to FALSE if Send/SendPacket didn't return NDIS_STATUS_PENDING

svn path=/branches/aicom-network-fixes/; revision=36250
2008-09-14 21:17:44 +00:00
Cameron Gutman
e43328b916 - Pass the status we were given to the completion routine
svn path=/branches/aicom-network-fixes/; revision=36249
2008-09-14 20:47:22 +00:00
Cameron Gutman
20165883fc - Merge r35555, r35575, r35576, and r36243 into my branch
svn path=/branches/aicom-network-fixes/; revision=36248
2008-09-14 20:01:36 +00:00
Christoph von Wittich
2d4aadb83f sync advapi32_winetest to wine 1.1.4
svn path=/trunk/; revision=36247
2008-09-14 18:24:25 +00:00
Christoph von Wittich
2435f146c3 add missing definitions
svn path=/trunk/; revision=36246
2008-09-14 18:22:53 +00:00
Eric Kohl
41cb00e69a Don't user the local attribute twice.
svn path=/trunk/; revision=36245
2008-09-14 18:16:24 +00:00
Aleksey Bragin
4b9642ee43 - Don't call MmLoadSystemImage with a NULL ModuleHandle. This could allow a simplification of the SystemLoadGdiDriverInformation function.
svn path=/trunk/; revision=36244
2008-09-14 17:58:27 +00:00
Christoph von Wittich
ffe9d022e2 fix memory allocation for NDIS_WORK_ITEM
svn path=/trunk/; revision=36243
2008-09-14 17:20:45 +00:00
Christoph von Wittich
cd5303c9a0 add PCI_SUBCLASS_SB_SMBUS
svn path=/trunk/; revision=36242
2008-09-14 16:22:42 +00:00
Christoph von Wittich
70bfb6733b add kvmnet.sys and kvmnet.inf to bootcd (OPTIONAL)
svn path=/trunk/; revision=36241
2008-09-14 14:29:33 +00:00
Cameron Gutman
7b55b5e382 - Merge aicom-network-fixes up to r36215
- We now queue a work item to do most of the work
 - Send/SendPackets now get called at the correct IRQL

svn path=/trunk/; revision=36240
2008-09-14 13:54:42 +00:00
Christoph von Wittich
3f4a8c55e1 fix some typos
svn path=/trunk/; revision=36239
2008-09-14 13:43:46 +00:00
Stefan Ginsberg
d896822e7b - Don't dereference a thread when we are supposed to reference it. Now WinDBG can attach to a process, but we crash in CM due to a unhandled failure case.
svn path=/trunk/; revision=36238
2008-09-14 13:41:33 +00:00
Stefan Ginsberg
039d340316 - Don't dereference the debug object when we are supposed to reference it
svn path=/trunk/; revision=36237
2008-09-14 13:20:36 +00:00
Christoph von Wittich
73669f0581 fix a no newline @ end of file warning
svn path=/trunk/; revision=36236
2008-09-14 13:11:49 +00:00
Christoph von Wittich
f72a3929a4 fix a no newline @ end of file warning
svn path=/trunk/; revision=36235
2008-09-14 13:10:36 +00:00
Christoph von Wittich
a8e501e352 include wintrust.h in imagehlp.h
svn path=/trunk/; revision=36234
2008-09-14 12:02:50 +00:00
Christoph von Wittich
e28b2f9bee sync imm.h with wine (should fix build)
svn path=/trunk/; revision=36233
2008-09-14 11:46:08 +00:00
Christoph von Wittich
0ff89a79a9 update crypt headers
sync crypt32 with wine 1.1.4
sync wintrust with wine 1.1.4

svn path=/trunk/; revision=36232
2008-09-14 11:32:55 +00:00
Christoph von Wittich
7b048be57f set _ADVAPI32_ define
svn path=/trunk/; revision=36231
2008-09-14 11:28:56 +00:00
Stefan Ginsberg
896fd757c7 - Don't leak a handle if user mode tries to debug the system process
svn path=/trunk/; revision=36230
2008-09-14 11:27:28 +00:00
Christoph von Wittich
cbfff94876 sync rasapi32 to wine 1.1.4
svn path=/trunk/; revision=36229
2008-09-14 10:37:55 +00:00
Christoph von Wittich
16f1715fc9 sync mpr to wine 1.1.4
svn path=/trunk/; revision=36228
2008-09-14 10:18:40 +00:00
Christoph von Wittich
6c1c3b0947 sync advpack to wine 1.1.4
svn path=/trunk/; revision=36227
2008-09-14 10:14:21 +00:00
Christoph von Wittich
d9d2e414c7 update headers for shdocvw
svn path=/trunk/; revision=36226
2008-09-14 10:05:35 +00:00
Christoph von Wittich
b95f89316b IID_IActiveScriptSiteDebug32 is already defined in uuid
svn path=/trunk/; revision=36225
2008-09-14 09:56:41 +00:00
Christoph von Wittich
bcadb066fd add some stuff to uuid
svn path=/trunk/; revision=36222
2008-09-14 07:43:02 +00:00
Christoph von Wittich
27378d78cf sync msxml3 to wine 1.1.4
svn path=/trunk/; revision=36220
2008-09-14 06:24:36 +00:00
Christoph von Wittich
42f6e7844c sync mlang with wine 1.1.4
svn path=/trunk/; revision=36219
2008-09-14 06:17:43 +00:00
Christoph von Wittich
4744b6d35e sync inetmib1 with wine 1.1.4
svn path=/trunk/; revision=36218
2008-09-14 06:13:20 +00:00
Christoph von Wittich
172034efd8 sync hlink with wine 1.1.4
svn path=/trunk/; revision=36217
2008-09-14 06:10:11 +00:00
Christoph von Wittich
d827fb07fa sync hhctrl.ocx with wine 1.1.4
svn path=/trunk/; revision=36216
2008-09-14 06:08:59 +00:00
Cameron Gutman
479f0c8d37 - Release the spin lock before calling NCETimeout
- Should fix the crash Wax had when using the kvmnet driver

svn path=/branches/aicom-network-fixes/; revision=36215
2008-09-14 06:05:47 +00:00
Christoph von Wittich
4ffc65aa1b sync cryptui with wine 1.1.4
svn path=/trunk/; revision=36214
2008-09-14 06:02:13 +00:00
Christoph von Wittich
ab7f4d89c5 sync cryptnet with wine 1.1.4
svn path=/trunk/; revision=36213
2008-09-14 06:01:06 +00:00
Cameron Gutman
3c6651a64e - Call a serialized miniport's Send/SendPackets handler at DISPATCH_LEVEL
svn path=/branches/aicom-network-fixes/; revision=36212
2008-09-14 05:30:06 +00:00
Cameron Gutman
91ac8bce6e - Change our method of queuing work items so we don't leak anymore
svn path=/branches/aicom-network-fixes/; revision=36211
2008-09-14 05:16:32 +00:00
Christoph von Wittich
c3aed3f12d sync oleaut32 to wine 1.1.4
svn path=/trunk/; revision=36210
2008-09-14 05:15:39 +00:00
Christoph von Wittich
6e54f46c16 revert the ole32 idl hack from heispiter as it breaks the rpc proxy
svn path=/trunk/; revision=36209
2008-09-14 05:09:19 +00:00
Christoph von Wittich
31a8f27a0c better hackfix for rpc.h
generate oleacc header from idl

svn path=/trunk/; revision=36208
2008-09-14 05:08:29 +00:00
Christoph von Wittich
4baaab5def Output NULL for inherited methods in the vtbl.
Dan Hipschman <dsh at linux.ucla.edu>

svn path=/trunk/; revision=36207
2008-09-14 05:07:16 +00:00
Cameron Gutman
ac40a36ce9 - Queue a work item to do our work that was previously done in MiniportDpc so SendHandler gets called at the correct IRQL
svn path=/branches/aicom-network-fixes/; revision=36206
2008-09-14 04:02:04 +00:00
Christoph von Wittich
4d2adef5ff revert 36199
svn path=/trunk/; revision=36205
2008-09-14 03:39:06 +00:00
Cameron Gutman
ddce511a68 - Merge aicom-network-fixes up to r36198
svn path=/trunk/; revision=36204
2008-09-14 00:48:32 +00:00
Pierre Schweitzer
86e3d23459 Hackfixed ole32.dll build adding lots of warnings.
A proper fix will be necessary.

svn path=/trunk/; revision=36203
2008-09-13 22:14:29 +00:00
Pierre Schweitzer
f2f5770e01 Added the 3 missing idl files.
This *DOES NOT* fix ole32 build.

svn path=/trunk/; revision=36202
2008-09-13 22:10:18 +00:00
Pierre Schweitzer
d9c404e865 Fixed build
svn path=/trunk/; revision=36201
2008-09-13 21:46:45 +00:00
Eric Kohl
b3bb873fd3 Implement I_ScSetServiceBitsA/W and SetServiceBits.
svn path=/trunk/; revision=36200
2008-09-13 20:04:51 +00:00
Christoph von Wittich
efe847ad5e don't define __WINESRC__
svn path=/trunk/; revision=36199
2008-09-13 19:15:28 +00:00
Cameron Gutman
86ca4446aa - Call KeAcquireSpinLockAtDpcLevel instead of KeAcquireSpinLock when possible
- Don't hold the spin lock as long in MiniportDpc

svn path=/branches/aicom-network-fixes/; revision=36198
2008-09-13 19:00:32 +00:00
Christoph von Wittich
c75a2ca168 sync ole2 winetest
svn path=/trunk/; revision=36197
2008-09-13 18:52:03 +00:00
Christoph von Wittich
c6339492a2 sync ole32 with wine 1.1.4
svn path=/trunk/; revision=36196
2008-09-13 18:49:51 +00:00
Cameron Gutman
bd9013b5ae - Read the maximum packets that the driver allows to be sent at one time
- We don't use it yet

svn path=/branches/aicom-network-fixes/; revision=36195
2008-09-13 18:33:16 +00:00
Eric Kohl
4a6d6e6f71 - Disable some debug messages.
- Fix the prototype of RI_ScGetCurrentGroupStateW (Function 34).

svn path=/trunk/; revision=36194
2008-09-13 18:22:34 +00:00
Cameron Gutman
e1800f7c53 - unimplemented -> implemented
svn path=/branches/aicom-network-fixes/; revision=36193
2008-09-13 17:07:30 +00:00
Cameron Gutman
70f9713881 - Implement NdisDprFreePacket
- Implement NdisDprFreePacketNonInterlocked

svn path=/branches/aicom-network-fixes/; revision=36192
2008-09-13 16:40:45 +00:00
Cameron Gutman
8bea43b223 - Implement NdisDprAllocatePacketNonInterlocked
svn path=/branches/aicom-network-fixes/; revision=36191
2008-09-13 16:36:43 +00:00
Cameron Gutman
08c2fa4ccb - Implement NdisDprAllocatePacket
svn path=/branches/aicom-network-fixes/; revision=36190
2008-09-13 16:33:23 +00:00
Christoph von Wittich
1a8524f176 sync rpc4rt winetests as well
svn path=/trunk/; revision=36189
2008-09-13 16:18:44 +00:00
Christoph von Wittich
f1661e061c sync most of rpcrt4 to wine 1.1.4
svn path=/trunk/; revision=36188
2008-09-13 15:52:50 +00:00
Christoph von Wittich
b34d6d8879 replace NtCurrentTeb()->ProcessEnvironmentBlock by NtCurrentPeb()
svn path=/trunk/; revision=36187
2008-09-13 14:27:43 +00:00
Cameron Gutman
c875c6ffac - Hints from MSDN show that we should use MmGetSystemAddressForMdl instead of MmGetMdlVirtualAddress
svn path=/branches/aicom-network-fixes/; revision=36186
2008-09-13 12:45:26 +00:00
Cameron Gutman
e96b8c3c83 - Fix a possible crash
svn path=/branches/aicom-network-fixes/; revision=36185
2008-09-13 12:22:45 +00:00
Christoph von Wittich
f370c11356 fix some more kernel32_module winetests
svn path=/trunk/; revision=36184
2008-09-13 11:35:01 +00:00
Dmitry Chapyshev
517a8ef2b2 - volume.c: replace HeapAlloc to RtlAllocateHeap, HeapFree to RtlFreeHeap
- move TzSpecificLocalTimeToSystemTime to time.c
- implement TzSpecificLocalTimeToSystemTime based on wine. It corrects 378 wine tests.

svn path=/trunk/; revision=36183
2008-09-13 10:22:28 +00:00
Aleksey Bragin
6df53c008e - Call NtCreateSection and NtMapViewOfSection with more correct parameters.
svn path=/trunk/; revision=36182
2008-09-13 09:59:22 +00:00
Dmitry Chapyshev
0a38b4914f - Move FindVolumeClose, FindFirstVolumeW/A, GetVolumeNameForVolumeMountPointA to volume.c
- Implement FindVolumeClose, GetVolumeNameForVolumeMountPointA (based on wine)

svn path=/trunk/; revision=36181
2008-09-13 09:21:43 +00:00
Christoph von Wittich
b928deeed3 fix kernel32 format_msg winetest
svn path=/trunk/; revision=36180
2008-09-13 08:48:18 +00:00
Christoph von Wittich
a72e8a4195 fix most kernel32_profile winetests
svn path=/trunk/; revision=36179
2008-09-13 08:23:32 +00:00
Christoph von Wittich
f6c0c19edb fix some kernel32 module winetests (GetProcAddress, GetModuleFileName)
svn path=/trunk/; revision=36178
2008-09-13 07:37:05 +00:00
Cameron Gutman
beb218924d - Merge r36169 from aicom-network-fixes
svn path=/trunk/; revision=36170
2008-09-12 18:39:09 +00:00
Cameron Gutman
cba47cf99e - Call MiniportTransferData at DISPATCH_LEVEL
svn path=/branches/aicom-network-fixes/; revision=36169
2008-09-12 17:59:45 +00:00
Stefan Ginsberg
11bc38c70a - Add missing CmpReferenceKeyControlBlock prototype
svn path=/trunk/; revision=36168
2008-09-12 16:10:42 +00:00
Stefan Ginsberg
a030377485 - Forward GetCurrentProcessorNumber to RtlGetCurrentProcessorNumber
- Add InterlockedCompareExchange64 and forward it to RtlInterlockedCompareExchange64

svn path=/trunk/; revision=36167
2008-09-12 15:19:52 +00:00
Stefan Ginsberg
420195308d - Uncomment NTDLL exports which we implement, and add stubs for numerous routines
- Add missing prototypes to NDK
- Implement RtlInterlockedCompareExchange64 and RtlGetCurrentProcessorNumber
- Rename RtlpCurrentPeb to RtlGetCurrentPeb and export it from NTDLL

svn path=/trunk/; revision=36166
2008-09-12 15:09:17 +00:00
Stefan Ginsberg
86cb400689 - Fix typos in OBTRACE output
svn path=/trunk/; revision=36165
2008-09-12 14:10:27 +00:00
Daniel Reimer
020aab682b Update DejaVu Fonts from 2.24 to 2.26
Update 3rd Party Txt file.

svn path=/trunk/; revision=36164
2008-09-12 13:37:28 +00:00
Aleksey Bragin
8282e07926 - Fix livecd build.
svn path=/trunk/; revision=36163
2008-09-12 13:32:17 +00:00
Stefan Ginsberg
b52f99f047 - Remove unneeded ";"
svn path=/trunk/; revision=36162
2008-09-12 13:23:29 +00:00
Aleksey Bragin
fb3f5cb198 - Update Liberation fonts (1.01 -> 1.04).
- Fix reactos.dff.

svn path=/trunk/; revision=36161
2008-09-12 12:55:27 +00:00
Aleksey Bragin
ca51a517d1 - Fix reactos.dff according to recent font changes.
- Remove dejavu condensed and extralight from fonts.rbuild.
- Remove outdated README.TXT from media/fonts directory.
See issue #3483 for more details.

svn path=/trunk/; revision=36160
2008-09-12 12:07:33 +00:00
Aleksey Bragin
5c6536b8ba - Add FreeMono from FreeFont-20080912 package.
- Remove unused condensed and extralight Dejavu.
- Remove leftover from Docs directory, add FreeFont readme there.

svn path=/trunk/; revision=36159
2008-09-12 11:56:35 +00:00
Aleksey Bragin
4a3b508ce8 - Cleanup fonts directory from old (2001-2004) unused fonts.
See issue #3483 for more details.

svn path=/trunk/; revision=36158
2008-09-12 11:29:45 +00:00
Aleksey Bragin
bc125c3314 - MmDeleteKernelStack should take StackBase as the first parameter, not StackLimit (thus actually the need for the 2nd parameter - large stack size flag). Fix it, and fix callers.
- Make KiSwitchKernelStack return the stack base instead of the stack limit, as part of the above change.
- Don't increment priority when waking the thread in KeThawAllThreads.
- Fix new thread priority calculation in KiDeferredReadyThread.
- Fix double-semicolon typo in thrdini.c

svn path=/trunk/; revision=36157
2008-09-12 11:13:15 +00:00
Daniel Reimer
dd12a25642 Update 3rd Party lib Document.
Some are still outdated: DejaVu, FreeType, Mesa3D, GNU adns and Expat

svn path=/trunk/; revision=36156
2008-09-12 10:51:59 +00:00
Christoph von Wittich
c7375e2efe update bzip2 to 1.0.5
svn path=/trunk/; revision=36155
2008-09-12 08:48:50 +00:00
Christoph von Wittich
f2a351c02f update libxml2 to 2.7.1
svn path=/trunk/; revision=36154
2008-09-12 08:09:23 +00:00
Christoph von Wittich
6534076957 fix redefinitions
add MemoryBarrier for MSVC

svn path=/trunk/; revision=36153
2008-09-12 08:07:52 +00:00
Cameron Gutman
5f008ce5b8 - Merge aicom-network-fixes up to r36151
svn path=/trunk/; revision=36152
2008-09-12 04:08:55 +00:00
Cameron Gutman
526d298a08 - Revert r36141 and r36102
- They cause a strange mIRC crash

svn path=/branches/aicom-network-fixes/; revision=36151
2008-09-12 03:53:09 +00:00
Cameron Gutman
d4fe4b7aa4 - We must call MiniDequeueWorkItem while holding a spin lock
svn path=/branches/aicom-network-fixes/; revision=36150
2008-09-12 03:06:31 +00:00
Cameron Gutman
b26b70ddba - Call ProtocolRequestComplete at the correct IRQL
- Call ProtocolSendComplete at the correct IRQL

svn path=/branches/aicom-network-fixes/; revision=36149
2008-09-12 02:58:08 +00:00
Cameron Gutman
151277c30a - Set Status to STATUS_SUCCESS
svn path=/branches/aicom-network-fixes/; revision=36148
2008-09-12 02:43:05 +00:00
Cameron Gutman
dc4e15ac9b - Call MiniportQueryInformation at the correct IRQL
- Call MiniportSetInformation at the correct IRQL
 - Call QueryInformationComplete at the correct IRQL
 - Call SetInformationComplete at the correct IRQL
 - All IRQLs verified by MSDN

svn path=/branches/aicom-network-fixes/; revision=36147
2008-09-11 20:57:51 +00:00
Cameron Gutman
f56eb2a402 - Make sure we successfully allocated memory
svn path=/branches/aicom-network-fixes/; revision=36144
2008-09-11 19:43:19 +00:00
Cameron Gutman
03e6d425e5 - Fix 2 typos
svn path=/branches/aicom-network-fixes/; revision=36143
2008-09-11 19:15:35 +00:00
Aleksey Bragin
4046b602f2 - Use CD_ROM type instead of DISK.
svn path=/trunk/; revision=36142
2008-09-11 18:50:47 +00:00
Cameron Gutman
8e9ec3d648 - Nicer solution for the problem fixed in r36102
svn path=/branches/aicom-network-fixes/; revision=36141
2008-09-11 18:17:11 +00:00
Christoph von Wittich
2d4ae8bb34 fix heap corruption
svn path=/trunk/; revision=36140
2008-09-11 17:00:47 +00:00
Stefan Ginsberg
938228918e - IoAcquire/ReleaseVpbSpinLock: Use the queued IopVpbSpinLock spinlock instead of a regular "IoVpbLock" spinlock
svn path=/trunk/; revision=36139
2008-09-11 16:53:36 +00:00
Christoph von Wittich
81bc975c28 add missing HandleBind() calls
svn path=/trunk/; revision=36138
2008-09-11 16:48:42 +00:00
Aleksey Bragin
f65919507d - Use a correct device type when creating volume device objects.
svn path=/trunk/; revision=36137
2008-09-11 14:43:12 +00:00
Stefan Ginsberg
37cea55dc6 - NtQueryInformationProcess with ProcessImageFileName query type:
Free the buffer allocated by SeLocateProcessImageName, and set return status if return buffer is too small (so caller will know to allocate more memory). Spotted by #3714
See issue #3714 for more details.

svn path=/trunk/; revision=36136
2008-09-11 14:24:41 +00:00
Aleksey Bragin
f803831055 - Silence the raised IRQL level warning.
- Use a better status code for invalid requests.

svn path=/trunk/; revision=36135
2008-09-11 12:41:26 +00:00
Cameron Gutman
4b72cb5e0f - We must call MiniQueueWorkItem while holding a spin lock
svn path=/branches/aicom-network-fixes/; revision=36134
2008-09-11 09:37:54 +00:00
Christoph von Wittich
926d40d3ab remove unused parameter from DPRINT
svn path=/trunk/; revision=36133
2008-09-11 09:30:51 +00:00
Christoph von Wittich
1eff85acb5 fix incorrect buffersize passed to MultiByteToWideChar
svn path=/trunk/; revision=36132
2008-09-11 09:12:13 +00:00
Christoph von Wittich
eac6a1546a fix some heap corruptions in services
svn path=/trunk/; revision=36131
2008-09-11 08:31:52 +00:00
Aleksey Bragin
3460318121 Gregor Schneider <grschneider@gmail.com>
- Don't cast the floating point number to integer for conversion (numberf was created especially for floating point types)
See issue #3585 for more details.

svn path=/trunk/; revision=36130
2008-09-11 07:06:22 +00:00
Stefan Ginsberg
8f3d28e83a - Add missing winnt.h definitions
svn path=/trunk/; revision=36127
2008-09-10 15:30:27 +00:00
Stefan Ginsberg
b08929de56 - Patch by hackbunny:
"64-bit __sync_val_compare_and_swap is, apparently, not inlined on x86. Go figure."
"Add "lock" prefix to cmpxchg8b, just in case"

svn path=/trunk/; revision=36126
2008-09-10 15:02:57 +00:00
Christoph von Wittich
4c462c3876 sync riched20 to wine 1.1.4
svn path=/trunk/; revision=36125
2008-09-10 13:35:44 +00:00
Christoph von Wittich
2b3e52482d don't build worpad as UNICODE, wine is using ANSI functions
svn path=/trunk/; revision=36124
2008-09-10 13:32:18 +00:00
Christoph von Wittich
6196f51306 import jscript.dll from wine 1.1.4
svn path=/trunk/; revision=36121
2008-09-10 11:46:31 +00:00
Aleksey Bragin
d650c233dc - Balance of an Memory Manager's AVL tree node can be negative, so make it a signed variable.
svn path=/trunk/; revision=36120
2008-09-10 11:25:28 +00:00
Christoph von Wittich
1d60e6189c import mprapi.dll from wine 1.1.4
svn path=/trunk/; revision=36118
2008-09-10 10:57:45 +00:00
Christoph von Wittich
feef16a665 close autoregister tag
svn path=/trunk/; revision=36117
2008-09-10 10:43:51 +00:00
Christoph von Wittich
aa4e716364 register mshtml
svn path=/trunk/; revision=36116
2008-09-10 10:40:21 +00:00
Cameron Gutman
acb347a4eb - Fix 3 handle leaks
- Fix 2 memory leaks

svn path=/branches/aicom-network-fixes/; revision=36115
2008-09-10 09:34:28 +00:00
Christoph von Wittich
01bc267907 sync fusion.dll with wine 1.1.4
svn path=/trunk/; revision=36114
2008-09-10 08:47:30 +00:00
Christoph von Wittich
bac7f47714 sync fusion.idl with wine 1.1.4
svn path=/trunk/; revision=36113
2008-09-10 08:45:43 +00:00
Aleksey Bragin
b574db1c77 - Add missing function implementations into generic CRT library.
svn path=/trunk/; revision=36112
2008-09-10 08:30:43 +00:00
Christoph von Wittich
62b34ab46f add stdole2 dependency
svn path=/trunk/; revision=36111
2008-09-10 08:16:00 +00:00
Steven Edwards
0b5ac4c983 move to lower case, for Christoph
svn path=/trunk/; revision=36110
2008-09-10 08:08:19 +00:00
Christoph von Wittich
e1fea85cf6 -add mshtml to bootcd
-register ole typelibs

svn path=/trunk/; revision=36109
2008-09-10 07:44:39 +00:00
Christoph von Wittich
124ae67cb4 sync mshtml to wine 1.1.4
svn path=/trunk/; revision=36108
2008-09-10 07:44:02 +00:00
Cameron Gutman
48c47e07e6 - Return the correct status
svn path=/branches/aicom-network-fixes/; revision=36107
2008-09-10 07:43:05 +00:00
Christoph von Wittich
929b9dfa89 sync dxsdk idl files with wine
svn path=/trunk/; revision=36106
2008-09-10 07:41:27 +00:00
Christoph von Wittich
a7467a03c8 sync some idl files and mshtml headers with wine
svn path=/trunk/; revision=36105
2008-09-10 07:40:52 +00:00
Cameron Gutman
9d7da6c792 - Revert 36093
svn path=/trunk/; revision=36104
2008-09-10 07:32:44 +00:00
Christoph von Wittich
775ec21204 add WINE_ALLOC_SIZE macro
svn path=/trunk/; revision=36103
2008-09-10 06:52:51 +00:00
Cameron Gutman
8cf22aef05 - Don't call IoCompleteRequest while holding a spin lock because it can cause deadlocks
svn path=/branches/aicom-network-fixes/; revision=36102
2008-09-10 04:59:12 +00:00
Cameron Gutman
e39210e30a - Remove the spin locks around NdisSend because it causes a crash in kvmnet
svn path=/branches/aicom-network-fixes/; revision=36101
2008-09-10 03:54:46 +00:00
Cameron Gutman
55a1919cbf - Set ContextSize when we allocate it
- Remove the context size check so we always create a new one now
 - Now we succeed regardless of the current context size

svn path=/branches/aicom-network-fixes/; revision=36100
2008-09-10 02:52:22 +00:00
Johannes Anderwald
fb2ce23113 - Free INetCfgComponent when reference count is zero
- HACK: use {RandomProtocolGUID_TCPIP} for all network notification objects (As soon GUIDs are automatically generated for network components like TCPIP, this hack can be removed)
- Start implementing TCP/IP Notification Object
- Import TCP/IP Properties dialog from ncpa.cpl


svn path=/trunk/; revision=36099
2008-09-10 00:13:39 +00:00
Daniel Reimer
dc6c805363 Bug 3637 Translate files of 0.3.6 by Lars Martin Hambro
Bug 3671 Small spanish corrections
Bug 3700 Spanish netshell file by Javier Remacha
Bug 3705 Polish translation update for netshell by Maciej Bialas
Bug 3721 update translations for setup/reactos by Mario Kacmar
Bug 3722 some slovak translations for rosapps my Mario Kacmar
Bug 3723 some slovak fixes by Mario Kacmar

svn path=/trunk/; revision=36097
2008-09-09 21:18:13 +00:00
Daniel Reimer
dc97ad9b28 Bug 3637 Translate files of 0.3.6 by Lars Martin Hambro
Bug 3671 Small spanish corrections
Bug 3700 Spanish netshell file by Javier Remacha
Bug 3705 Polish translation update for netshell by Maciej Bialas
Bug 3721 update translations for setup/reactos by Mario Kacmar
Bug 3722 some slovak translations for rosapps my Mario Kacmar
Bug 3723 some slovak fixes by Mario Kacmar

svn path=/trunk/; revision=36096
2008-09-09 21:18:12 +00:00
Stefan Ginsberg
5f2b16169d - Free memory allocated by MmHeapAlloc through MmHeapFree
svn path=/trunk/; revision=36095
2008-09-09 20:06:59 +00:00
Cameron Gutman
16fabd560b - Fix a memory leak
svn path=/branches/aicom-network-fixes/; revision=36094
2008-09-09 19:47:12 +00:00
Cameron Gutman
e65f8ffcb6 - Fix a typo which resulted in a read irp being locked with IoWriteAccess and a write irp being locked with IoReadAccess
svn path=/trunk/; revision=36093
2008-09-09 19:44:15 +00:00
Colin Finck
bdf36ed7e5 Giannis Adamopoulos (johnyadams@hotmail.com)
- Check if lpLogFont is NULL, so we don't crash if it is.
  Verified by the GDI32 Wine test, which explicitly checks for this behaviour and doesn't crash under WinXP SP2.

See issue #3725 for more details.

svn path=/trunk/; revision=36092
2008-09-09 17:49:23 +00:00
Christoph von Wittich
0abf5b122d build resource file as well and set correct include path
svn path=/trunk/; revision=36091
2008-09-09 16:40:02 +00:00
Christoph von Wittich
360a688edf fix the msxml3 typelib
svn path=/trunk/; revision=36090
2008-09-09 16:16:53 +00:00
Christoph von Wittich
7c991b2ae4 add new stdole2 target for the real typelib (the other stdole2.tlb is a dll)
svn path=/trunk/; revision=36089
2008-09-09 16:15:39 +00:00
Christoph von Wittich
d3dfcc4561 rename stdole2 target to stdole2.tlb
svn path=/trunk/; revision=36088
2008-09-09 16:14:26 +00:00
Christoph von Wittich
5c8abfd6a4 open TypeLibs with O_BINARY (patch already send to wine)
svn path=/trunk/; revision=36087
2008-09-09 16:13:36 +00:00
Christoph von Wittich
67f066c79b fix some syntax errors in idl files, deleted unused wtypes.idl
svn path=/trunk/; revision=36086
2008-09-09 16:11:24 +00:00
Stefan Ginsberg
422526a89e - Add missing FLS_MAXIMUM_AVAILABLE
svn path=/trunk/; revision=36085
2008-09-09 15:57:17 +00:00
Johannes Anderwald
401bef3301 - Implement INetCfgComponent_RaisePropertyUi
svn path=/trunk/; revision=36084
2008-09-09 14:29:25 +00:00
Johannes Anderwald
44804abd06 - Add INetCfgPnpReconfigCallback, INetCfgComponentControl, INetCfgComponentPropertyUi IIDS
svn path=/trunk/; revision=36083
2008-09-09 13:28:55 +00:00
Johannes Anderwald
0fa19c57c1 - Add INetCfgPnpReconfigCallback, INetCfgComponentControl, INetCfgComponentPropertyUi IIDS
svn path=/trunk/; revision=36082
2008-09-09 13:27:28 +00:00
Timo Kreuzer
73cee88355 - Add more parameter checks to NtGdiExtCreateRegion. Fixes a crash in gdi32_winetest clipping (12 failures left) and FF 3.1
- Do not copy more data than allocated for the region
- Add coordinate transformation
See issue #3724 for more details.

svn path=/trunk/; revision=36081
2008-09-09 13:19:10 +00:00
Johannes Anderwald
ff228503bf - Handle NULL pointer in INetCfgComponent::GetDisplayName and INetCfgComponent_GetHelpText
- Initialize to zero NetCfgComponentItem
- Dont fail if subkey is not a guid (required because ReactOS TCP/IP guid is not yet generated)
- Fix enumeration of network components
- Register CNetCfg class


svn path=/trunk/; revision=36080
2008-09-09 11:26:54 +00:00
Johannes Anderwald
fd6ffc2459 - Check for NULL before releasing INetCfg and INetCfgLock interface
- ONLY destroy property sheet page on success !!!
- Fix registration of LANStatusUI LANPropertyUI interfaces
- Fix creating LanPropertyUI interface
- Release LANPropertyUI interface when finished

svn path=/trunk/; revision=36079
2008-09-09 10:20:12 +00:00
Hervé Poussineau
a0c4f776f2 Remove MingwKernelModeDriverModuleHandler, it is the same as MingwKernelModeDLLModuleHandler
svn path=/trunk/; revision=36078
2008-09-09 07:30:52 +00:00
Hervé Poussineau
93ec54f4e5 Remove GetExtraDependencies() function.
It was only called when the file extension was .c/.cc/.cpp/.cxx, and the function was returning empty string in those cases.

svn path=/trunk/; revision=36077
2008-09-09 07:21:37 +00:00
Hervé Poussineau
8bfedb5a6d Remove host attribute of module element. It wasn't used and can be deduced from module type
Remove MingwBootSectorModuleHandler class
Move module specific cflags, nasmflags and linkerflags to an array. One day, we won't be forced to create a new MingwModuleHandler each time we add a module type

svn path=/trunk/; revision=36076
2008-09-09 07:12:30 +00:00
Cameron Gutman
8b9d9a57c7 - Release the spin lock before returning
svn path=/branches/aicom-network-fixes/; revision=36075
2008-09-09 00:58:44 +00:00
Cameron Gutman
dc08835ad7 - Remove the adapter from the global adapter list if we fail
svn path=/branches/aicom-network-fixes/; revision=36074
2008-09-09 00:17:02 +00:00
Cameron Gutman
128aeae543 - Make sure we set a failure status when we fail so we don't complete with NDIS_STATUS_SUCCESS when we really failed
svn path=/branches/aicom-network-fixes/; revision=36071
2008-09-08 23:42:14 +00:00
Cameron Gutman
8ea40ee79e - Return the actual status not NDIS_STATUS_SUCCESS always
svn path=/branches/aicom-network-fixes/; revision=36070
2008-09-08 23:27:52 +00:00
Cameron Gutman
c1c6da32a4 - Dereference the Fdo before we return if we fail
- Fail if we can't allocate memory
 - Also resize the buffer if we get STATUS_BUFFER_TOO_SMALL

svn path=/trunk/; revision=36068
2008-09-08 18:41:25 +00:00
Timo Kreuzer
5b75a3dfd7 fix saving/restoring of registers in DebugService
svn path=/trunk/; revision=36067
2008-09-08 18:21:19 +00:00
Cameron Gutman
35827a3001 - Check that memory allocation succeeded
svn path=/trunk/; revision=36066
2008-09-08 18:06:24 +00:00
Christoph von Wittich
d206ae228c forgot to add these files
svn path=/trunk/; revision=36065
2008-09-08 16:58:34 +00:00
Christoph von Wittich
9f5ab44256 sync msxml3 to wine 1.1.3
svn path=/trunk/; revision=36064
2008-09-08 16:51:03 +00:00
Stefan Ginsberg
44e6af9dae - Fix a missed set of the Parameter entry in ConvertThreadToFiberEx
svn path=/trunk/; revision=36063
2008-09-08 16:44:13 +00:00
Stefan Ginsberg
167bb42611 - Move global variable declaration to .c file instead of a header. Hinted by Timo.
svn path=/trunk/; revision=36062
2008-09-08 16:28:38 +00:00
Jeffrey Morlan
8d7388ee07 - Batch: In a line generated by a 'for', add the \n that the parser expects. (Bug 3717)
- cmd_for: Don't leave raw_params uninitialized; could cause a crash in ExitBatch.

svn path=/trunk/; revision=36061
2008-09-08 16:23:33 +00:00
Aleksey Bragin
81fd8772b6 - Fix a typo.
svn path=/trunk/; revision=36060
2008-09-08 16:01:19 +00:00
Stefan Ginsberg
30c79e5ef5 - [FORMATTING] Fix broken indentation
svn path=/trunk/; revision=36059
2008-09-08 14:46:28 +00:00
Johannes Anderwald
c02505cfb2 - Implement INetLanConnectionUiInfo interface
- Remove hack from ShowNetworkComponentProperties
- Apply changes when OK / Cancel is pressed

svn path=/trunk/; revision=36058
2008-09-08 14:19:33 +00:00
Johannes Anderwald
5ff84bd267 - Add IIDs of INetLanConnectionUiInfo, INetConnectionPropertyUi2 interface
svn path=/trunk/; revision=36057
2008-09-08 14:14:04 +00:00
Johannes Anderwald
3ea5a35de7 - Add INetLanConnectionUiInfo, INetConnectionPropertyUi2 interface
svn path=/trunk/; revision=36056
2008-09-08 14:13:23 +00:00
Dmitry Chapyshev
afd718e3bd - Add ros-diff
svn path=/trunk/; revision=36055
2008-09-08 13:51:00 +00:00
Dmitry Chapyshev
bde9f55dc2 - Import pstorec from wine head
svn path=/trunk/; revision=36054
2008-09-08 13:48:25 +00:00
Aleksey Bragin
73f4cc9691 - Implement a linear search in CmpFindSubKeyInRoot (until cells are stored in a lexically sorted way).
- Implement Leaf->Root index conversion (leaf selecting algorithm, splitting the leaf if necessary).
See issue #3418 for more details.

svn path=/trunk/; revision=36053
2008-09-08 12:56:08 +00:00
Aleksey Bragin
c63c067562 - Add CmpArmDelayedCloseTimer declaration.
svn path=/trunk/; revision=36052
2008-09-08 12:48:34 +00:00
Aleksey Bragin
3be0b4bebf - Implement delay-close worker function.
See issue #3418 for more details.

svn path=/trunk/; revision=36051
2008-09-08 12:41:30 +00:00
Aleksey Bragin
4a66766bc1 - Comment out the assert which is hit in some cases ("advapi32_winetest.exe registry" being one of them), because there is no locking operation performed in CmpBuildHashStackAndLookupCache yet.
- Use a CmpIsKcbLockedExclusive macro in that assert.

svn path=/trunk/; revision=36050
2008-09-08 12:34:01 +00:00
Christoph von Wittich
7c259feec0 add a base address for pstorec.dll
svn path=/trunk/; revision=36049
2008-09-08 12:10:42 +00:00
Christoph von Wittich
daf7cafb2a sync pstore.idl to wine
svn path=/trunk/; revision=36048
2008-09-08 12:09:09 +00:00
Stefan Ginsberg
064cf076e9 - NtQueryInformationFile and NtSetInformationFile: Don't clear the IRP_SYNCHRONOUS_API flag if it has been set previously! This should obsolete the hack in irp.c!IopCompleteRequest.
- If you still see "Not an executive event -- should not be dereferenced" after this patch then please report to me.

svn path=/trunk/; revision=36047
2008-09-08 11:52:33 +00:00
Timo Kreuzer
58e0211741 Merge 34722, 34723, 34724, 34843, 35528, 35703 from ros-amd64-bringup branch:
- Convert port addresses to PULONG
- fix several ULONG / ULONG_PTR issues
- use %p in DPRINTs for pointer sized values
- fix type of address table entry from PULONG to ULONG

svn path=/trunk/; revision=36046
2008-09-08 11:13:51 +00:00
Christoph von Wittich
a2810fabde import timer queues from wine
svn path=/trunk/; revision=36045
2008-09-08 11:10:02 +00:00
Hervé Poussineau
151f0c3281 Replace .def file by a .spec file
svn path=/trunk/; revision=36044
2008-09-08 09:48:09 +00:00
Cameron Gutman
7260b98dd8 - Make sure memory allocation succeeded
svn path=/trunk/; revision=36043
2008-09-07 22:28:19 +00:00
Cameron Gutman
23787cbeb2 - Make sure we successfully allocated memory
svn path=/branches/aicom-network-fixes/; revision=36042
2008-09-07 19:38:21 +00:00
Johannes Anderwald
7fab074623 - Acquire INetCfgLock before enumerating the items
- Check if a network component is enabled for a specific network adapter
- Get INetCfgComponent from the INetComponent
- Use ReportView for component dialog

svn path=/trunk/; revision=36041
2008-09-07 18:28:37 +00:00
Johannes Anderwald
b4213b2ba5 - Add IID_INetCfgComponentBindings
svn path=/trunk/; revision=36040
2008-09-07 18:01:59 +00:00
Johannes Anderwald
3237a38834 - Add interfaces for netcfgx
svn path=/trunk/; revision=36039
2008-09-07 17:57:11 +00:00
Stefan Ginsberg
c9f8298755 - Patch by Cameron "aicom" Gutman: Ensure allocation succeeded and wrap MmProbeAndLockPages in SEH
svn path=/trunk/; revision=36038
2008-09-07 17:31:09 +00:00
Pierre Schweitzer
3a41d8e7d8 Synced urlmon_winetest.exe with Wine HEAD
svn path=/trunk/; revision=36036
2008-09-07 15:13:38 +00:00
Pierre Schweitzer
148edeec23 Synced urlmon.dll with Wine HEAD
svn path=/trunk/; revision=36035
2008-09-07 15:13:12 +00:00
Christoph von Wittich
77a43e8afd fix winhttp_winetest
svn path=/trunk/; revision=36034
2008-09-07 14:49:11 +00:00
Pierre Schweitzer
be700b4487 - Completely removed previously commented code: there's no need to keep it, that's wine specific code.
- Added a diff with that change

svn path=/trunk/; revision=36033
2008-09-07 14:06:11 +00:00
Christoph von Wittich
90cdd4f331 properly zero terminate the buffer in GetComputerName
svn path=/trunk/; revision=36032
2008-09-07 14:04:18 +00:00
Pierre Schweitzer
d2b37f54df Commit 2/2
Imported mstask_winetest.exe, winhttp_winetest.exe from Wine HEAD

svn path=/trunk/; revision=36031
2008-09-07 13:50:21 +00:00
Christoph von Wittich
b7a82e6a51 Use MS-style imports instead of Borland-style for builtins patch by Alexandre Julliard <julliard at winehq.org>
svn path=/trunk/; revision=36030
2008-09-07 13:50:09 +00:00
Pierre Schweitzer
94d6699c3b Commit 1/2
- Synced shlwapi.dll with Wine HEAD
- Imported mstask.dll from Wine HEAD
- Added mstask.dll, mstask_winetest.dll, winhttp_winetest.dll to bootcd
- Update README.WINE

svn path=/trunk/; revision=36029
2008-09-07 13:49:02 +00:00
Cameron Gutman
39fede1cb4 - Also display status when we fail
svn path=/trunk/; revision=36028
2008-09-07 12:46:58 +00:00
Dmitry Chapyshev
94a23669e4 - Add mscoree to bootcd and docs
svn path=/trunk/; revision=36026
2008-09-07 11:55:28 +00:00
Dmitry Chapyshev
a9cda7093b - Add mscoree from wine
svn path=/trunk/; revision=36025
2008-09-07 11:48:34 +00:00
Christoph von Wittich
b32be77904 sync mscoree headers with wine
svn path=/trunk/; revision=36024
2008-09-07 11:10:58 +00:00
Dmitry Chapyshev
821316817e - Sync gdiplus with wine head
svn path=/trunk/; revision=36023
2008-09-07 10:32:49 +00:00
Stefan Ginsberg
e6b5795006 - Use macro instead of "64" magic
svn path=/trunk/; revision=36022
2008-09-07 09:28:37 +00:00
Stefan Ginsberg
3fecdcc23c - Check for "!= KernelMode" instead of "== UserMode"
- Use sizeof(ULONG) instead of "4"
- Add some missing comments

svn path=/trunk/; revision=36021
2008-09-07 09:25:31 +00:00
Christoph von Wittich
26fef2b1c8 fix some kernel32 environ winetests
svn path=/trunk/; revision=36020
2008-09-07 09:19:49 +00:00
Pierre Schweitzer
714e5fdc39 Fixed a warning
svn path=/trunk/; revision=36019
2008-09-07 08:46:58 +00:00
Stefan Ginsberg
f32601bf05 - Fix RegQueryValueA. Now Winetests are causing the CM crash again.
svn path=/trunk/; revision=36018
2008-09-07 08:38:15 +00:00
Pierre Schweitzer
1e39d2bd19 Forgot this file in last commit.
This fixes build.

svn path=/trunk/; revision=36017
2008-09-07 08:26:18 +00:00
Pierre Schweitzer
51ee2d9ff9 Synced winhttp.dll with Wine HEAD using stuff and methods from wininet.dll.
It helps Chrome setup starting (but not working yet).

svn path=/trunk/; revision=36016
2008-09-07 08:21:35 +00:00
Cameron Gutman
d158ab5aa3 - Merge aicom-network-fixes up to r36009
svn path=/trunk/; revision=36010
2008-09-06 22:21:56 +00:00
Cameron Gutman
f410547dd1 - Return NDIS_STATUS_RESOURCES not NDIS_STATUS_NOT_ACCEPTED when we fail to allocate memory
svn path=/branches/aicom-network-fixes/; revision=36009
2008-09-06 21:45:23 +00:00
Cameron Gutman
38a8193915 - Forgot this file from r36006
svn path=/branches/aicom-network-fixes/; revision=36008
2008-09-06 21:42:58 +00:00
Cameron Gutman
0658669a1e - Check status from RawIPStartup, UDPStartup, and TCPStartup
svn path=/branches/aicom-network-fixes/; revision=36007
2008-09-06 21:36:55 +00:00
Cameron Gutman
2044568591 - Make PortsStartup return NTSTATUS so we can make sure memory allocated succeeded
- Change the callers to check the return status

svn path=/branches/aicom-network-fixes/; revision=36006
2008-09-06 21:30:09 +00:00
Stefan Ginsberg
76153f2508 - Make sure we get a Subkey in RegDeleteKeyA/W. Fixes Winetests causing a system crash, but (for now) hides a bug in CM.
svn path=/trunk/; revision=36005
2008-09-06 21:02:54 +00:00
Cameron Gutman
4c942b62d6 - Fix a code typo
svn path=/branches/aicom-network-fixes/; revision=36004
2008-09-06 20:52:54 +00:00
Cameron Gutman
36b4bed9c8 - Use NewBuf instead of Data so we actually use the buffer we allocate
svn path=/branches/aicom-network-fixes/; revision=36003
2008-09-06 20:42:10 +00:00
Cameron Gutman
b732baa632 - Return NDIS_STATUS_RESOURCES not STATUS_NO_MEMORY
svn path=/branches/aicom-network-fixes/; revision=36002
2008-09-06 20:37:06 +00:00
Cameron Gutman
0d461c29a8 - Return TDI_NO_RESOURCES instead of TDI_INVALID_REQUEST when we can't allocate memory
svn path=/branches/aicom-network-fixes/; revision=36001
2008-09-06 20:27:56 +00:00
Cameron Gutman
6132fa321c - Code cleanup
svn path=/branches/aicom-network-fixes/; revision=36000
2008-09-06 20:18:42 +00:00
Christoph von Wittich
7736cc6aef fix formatting
svn path=/trunk/; revision=35997
2008-09-06 17:24:02 +00:00
Johannes Anderwald
3ac73d668f - Implement INetCfg, INetCfgLock, INetCfgComponent, IEnumNetCfgComponent interface
- Replace def by spec file
- Replace netcfgx.h by precomp.h to avoid conflicts with netcfgx.h which resides in the psdk

svn path=/trunk/; revision=35996
2008-09-06 17:22:32 +00:00
Christoph von Wittich
53e404a55a fix formatting
svn path=/trunk/; revision=35995
2008-09-06 17:19:33 +00:00
Christoph von Wittich
0ce8a503a9 don't corrupt the heap by storing unneeded values in the wrong places
svn path=/trunk/; revision=35992
2008-09-06 16:35:48 +00:00
Christoph von Wittich
a70af7ce64 fix a typo
svn path=/trunk/; revision=35991
2008-09-06 16:28:26 +00:00
Hervé Poussineau
d81595f07a Also change kdcom.dll location in txtsetup.sif
svn path=/trunk/; revision=35986
2008-09-06 15:19:57 +00:00
Hervé Poussineau
e27906d70a kdcom.dll should be in system32 directory, not drivers one
svn path=/trunk/; revision=35985
2008-09-06 15:06:07 +00:00
Stefan Ginsberg
e1a70db582 - [FORMATTING] Clean up tls.c. No code change.
svn path=/trunk/; revision=35984
2008-09-06 14:12:47 +00:00
Stefan Ginsberg
2aa436f766 - [FORMATTING] Clean up output.c. No code change.
svn path=/trunk/; revision=35983
2008-09-06 13:57:34 +00:00
Johannes Anderwald
9d994e117c - Fix INetCfgComponent::SetDisplayName definition
- Add Netcfgx error constants

svn path=/trunk/; revision=35982
2008-09-06 13:15:26 +00:00
Hervé Poussineau
7097556bf3 Open registry entry with only the required rights
Free memory with the right tag
See issue #3713 for more details.

svn path=/trunk/; revision=35981
2008-09-06 11:45:36 +00:00
Christoph von Wittich
0f44a26489 set WINETEST_PLATFORM to wine for sysreg
svn path=/trunk/; revision=35980
2008-09-06 11:06:01 +00:00
Eric Kohl
9423976cb5 Fix 64 bit portability issues.
svn path=/trunk/; revision=35977
2008-09-06 10:44:08 +00:00
Christoph von Wittich
b5c636ee01 fix a version info winetest by allowing non dll files to be loaded with LOAD_LIBRARY_AS_DATAFILE
svn path=/trunk/; revision=35976
2008-09-06 10:27:40 +00:00
Christoph von Wittich
b0a663b4a6 fix all cabinet fdi winetests (except the ones marked as (todo_wine)
svn path=/trunk/; revision=35973
2008-09-06 06:35:07 +00:00
Colin Finck
9e8367f15e Sync cabinet.dll with Wine HEAD (fixes a memory leak)
svn path=/trunk/; revision=35965
2008-09-05 19:58:49 +00:00
Cameron Gutman
85672737e6 - Handle AllocatedResources and AllocatedResourcesTranslated separately
- Fix a memory leak
 - Fix a handle leak

svn path=/branches/aicom-network-fixes/; revision=35964
2008-09-05 19:51:18 +00:00
Daniel Reimer
e699646de8 Update winfile and write to most recent Wine Version.
svn path=/trunk/; revision=35962
2008-09-05 17:00:16 +00:00
Daniel Reimer
436f87389b Sync winhlp32, wordpad and xcopy with wine.
svn path=/trunk/; revision=35961
2008-09-05 16:34:20 +00:00
Christoph von Wittich
f8106f22b9 change parameter back to DWORD as it is in our headers
svn path=/trunk/; revision=35960
2008-09-05 13:28:12 +00:00
Christoph von Wittich
78b3d68c79 fix the advapi32 crypt winetest crash
svn path=/trunk/; revision=35959
2008-09-05 13:10:49 +00:00
Christoph von Wittich
a22ce9b036 fix some advapi32 lsa winetests
svn path=/trunk/; revision=35958
2008-09-05 11:32:15 +00:00
Cameron Gutman
e941fb914b - Patch by Michael Martin (aka bugboy) <martinmnet at hotmail dot com>
- changed dhcp to write nameserver to dhcpnameserver registry key vice nameserver
 - changed iphlpapi to return dhcpnameserver if nameserver is empty
 - set NameServer to empty string in nettcpip.inf
 - see bug 2392

svn path=/trunk/; revision=35956
2008-09-05 01:00:32 +00:00
Cameron Gutman
a78ab11616 - Merge aicom-network-fixes up to r35946
svn path=/trunk/; revision=35955
2008-09-05 00:43:28 +00:00
Cameron Gutman
16427a1482 - Fix cleanup code
- We could possibly end up there with a NULL FileHandleObject and return a garbage FileHandle or crash
 - Now we always return a NULL FileHandle when we fail and free FileHandleObject if it has been allocated

svn path=/branches/aicom-network-fixes/; revision=35946
2008-09-04 19:08:08 +00:00
Christoph von Wittich
0542c270aa fix some advapi crypt winetests
svn path=/trunk/; revision=35945
2008-09-04 18:43:56 +00:00
Cameron Gutman
4ff5fc5caa - Fix 2 memory leaks
- Set ParameterValue to NULL on failure

svn path=/branches/aicom-network-fixes/; revision=35944
2008-09-04 18:42:49 +00:00
Colin Finck
fac1457233 - Sync wininet to Wine HEAD
- Remove a change from our "wininet_ros.diff" file, which has been applied to Wine as well in the meantime
- Eliminate a warning in our "inet_ntop.c" (ROS glue code)

svn path=/trunk/; revision=35943
2008-09-04 18:37:34 +00:00
Ged Murphy
0728b1b869 missed this, it's not needed.
svn path=/trunk/; revision=35941
2008-09-04 15:55:46 +00:00
Ged Murphy
c98c9900e0 restart the clock when it's been stopped to be altered
svn path=/trunk/; revision=35940
2008-09-04 15:51:11 +00:00
Christoph von Wittich
7f1a28a669 work around a bug in ReactOS (FindFirstFile isn't working with environment vars)
svn path=/trunk/; revision=35939
2008-09-04 15:28:40 +00:00
Ged Murphy
414cbcdc62 Please test your code before you ruin mine.
It's annoying fixing other peoples mess in your own code.

See issue #3701 for more details.

svn path=/trunk/; revision=35937
2008-09-04 15:13:07 +00:00
Christoph von Wittich
93436d4b0f run all winetests
svn path=/trunk/; revision=35936
2008-09-04 15:11:49 +00:00
Stefan Ginsberg
b3e9863132 - Fix kernel exports ARM
- Add KeSaveFloatingPointState/KeRestoreFloatingPointState stubs to ARM kernel as is done for other architectures (like AMD64). They have nothing to do on ARM, so they just return success.

svn path=/trunk/; revision=35934
2008-09-04 12:13:20 +00:00
Christoph von Wittich
d252c45d77 fix warnings
svn path=/trunk/; revision=35932
2008-09-04 11:37:40 +00:00
Christoph von Wittich
f26bc8dd86 dbgprint and shutdown should be in PATH
svn path=/trunk/; revision=35931
2008-09-04 11:35:27 +00:00
Hervé Poussineau
649ee830ed Also use ntoskrnl.spec file for ARM
svn path=/trunk/; revision=35930
2008-09-04 11:24:47 +00:00
Christoph von Wittich
5191b2d18f prettify debug output a bit
svn path=/trunk/; revision=35929
2008-09-04 10:46:18 +00:00
Christoph von Wittich
930c716f2d oops...
svn path=/trunk/; revision=35928
2008-09-04 09:58:43 +00:00
Christoph von Wittich
723b44631c hardcode c:\reactos\bin for testing (only used in regtest code)
svn path=/trunk/; revision=35927
2008-09-04 09:48:28 +00:00
Christoph von Wittich
a9844e64d7 add an empty line to make our cmd happy
svn path=/trunk/; revision=35926
2008-09-04 09:35:06 +00:00
Christoph von Wittich
a084e11432 sysreg test commit
svn path=/trunk/; revision=35925
2008-09-04 09:11:24 +00:00
Hervé Poussineau
24e14f2ba8 Don't free hive if HvInitialize failed, it should be done in the caller (if required)
svn path=/trunk/; revision=35924
2008-09-04 09:03:47 +00:00
Christoph von Wittich
e277bd0048 add a --winetest parameter which will run all sub tests from the given winetest module and redirect output to dbgout
svn path=/trunk/; revision=35923
2008-09-04 08:56:03 +00:00
Hervé Poussineau
c751990c17 Allocate without a tag if buffer won't be freed by the driver
svn path=/trunk/; revision=35922
2008-09-04 08:49:22 +00:00
Hervé Poussineau
7e71eef68b ExAllocatePoolWithTag should be paired with ExFreePoolWithTag
Fix a memory leak in W32kGetDefaultKeyLayout
Fix a possible double-free in IntFreeMenuItem

svn path=/trunk/; revision=35921
2008-09-04 08:47:56 +00:00
Christoph von Wittich
a073152ea9 add a --process parameter to redirect stdout to dbgout
usage: dbgprint --process version_winetest.exe

svn path=/trunk/; revision=35920
2008-09-04 07:58:28 +00:00
Cameron Gutman
14d8dfbd90 - Accept STATUS_SUCCESS also as done in config.c
svn path=/branches/aicom-network-fixes/; revision=35919
2008-09-03 23:37:09 +00:00
Eric Kohl
0f370b9bf7 Add a missing VOID.
svn path=/trunk/; revision=35918
2008-09-03 21:51:21 +00:00
Eric Kohl
8b5c9f03e4 Add the spooler service to the bootcd and start the service upon startup.
svn path=/trunk/; revision=35917
2008-09-03 21:06:22 +00:00
Eric Kohl
cfa76e5fd6 Add a spooler service skeleton. Now the Service-Winetests can be used unmodified.
svn path=/trunk/; revision=35916
2008-09-03 20:57:51 +00:00
Christoph von Wittich
c0caf327af set eol-style:native
svn path=/trunk/; revision=35915
2008-09-03 18:31:26 +00:00
Christoph von Wittich
c17bcc4e92 remove sysregtest target
svn path=/trunk/; revision=35914
2008-09-03 18:21:27 +00:00
Stefan Ginsberg
35edb19a3c - CDFS and NTFS: Don't include a unused, deprecated header
svn path=/trunk/; revision=35913
2008-09-03 16:52:08 +00:00
Dmitry Chapyshev
63f818683a - Update Russian translation
svn path=/trunk/; revision=35912
2008-09-03 15:43:42 +00:00
Christoph von Wittich
9e70288511 netshell doesn't have a DllInstall function
svn path=/trunk/; revision=35908
2008-09-03 06:05:00 +00:00
Christoph von Wittich
ee4c3af210 remove another obsolete sysreg checkpoint
svn path=/trunk/; revision=35907
2008-09-03 05:43:34 +00:00
Cameron Gutman
a84ca6d5c6 - Merge aicom-network-fixes up to r35899
svn path=/trunk/; revision=35901
2008-09-03 00:32:07 +00:00
Cameron Gutman
8d622c2821 - Fail if PrepareARPPacket returned NULL
- Fixes another possible crash

svn path=/branches/aicom-network-fixes/; revision=35899
2008-09-02 23:47:05 +00:00
Cameron Gutman
f398b8d6eb - Move the NULL check immediately after the memory is allocated
svn path=/branches/aicom-network-fixes/; revision=35898
2008-09-02 23:36:46 +00:00
Cameron Gutman
fe270e9c66 - Fail if we didn't successfully add the header
svn path=/branches/aicom-network-fixes/; revision=35897
2008-09-02 23:26:32 +00:00
Cameron Gutman
d75a5f4d04 - Set UDPInitialized to FALSE at the end of UDPShutdown
svn path=/branches/aicom-network-fixes/; revision=35896
2008-09-02 23:15:28 +00:00
Andrew Munger
cae5d127c8 Pass the ImagePath buffer as the command line, not the application name. After the recent changes, the ImaagePath buffer contains a properly formatted command line.
This change allows you to start services with parameters listed in the ImagePath, like Abyss and MySQL.

svn path=/trunk/; revision=35893
2008-09-02 21:33:51 +00:00
Cameron Gutman
2e3327d922 - Merge aicom-network-fixes up to r35889
svn path=/trunk/; revision=35891
2008-09-02 19:12:35 +00:00
Aleksey Bragin
766324a01f - FlsAlloc (and Co.) should first be implemented, and then exported, because some apps/DLLs depend on that (they use FlsAlloc if it's available, and workaround if it's not).
svn path=/trunk/; revision=35890
2008-09-02 18:44:10 +00:00
Cameron Gutman
26b1ba0f02 - Initially set NdisProtocolHandle to NULL
svn path=/branches/aicom-network-fixes/; revision=35889
2008-09-02 18:38:42 +00:00
Stefan Ginsberg
95880cc2dd - Fix 2 warnings (properly comment out unused code)
svn path=/trunk/; revision=35886
2008-09-02 15:07:27 +00:00
Stefan Ginsberg
923270b5f3 - Patch from hackbunny: Add _SEH_SetExceptionCode
svn path=/trunk/; revision=35884
2008-09-02 14:41:57 +00:00
Christoph von Wittich
1f06813c1a remove the sysreg checkpoint as it isn't needed anymore, sysreg2 is smart enough to notice when the vm is shut down
svn path=/trunk/; revision=35883
2008-09-02 14:37:34 +00:00
Daniel Reimer
8b132fb5d0 Bug 3637: Norwegian rosapps translation from Lars Martin Hambro
svn path=/trunk/; revision=35880
2008-09-02 14:00:30 +00:00
Johannes Anderwald
7f5e74d599 - Copy classfactory interface to netcfgx
- Required to implement netcfgx interfaces)

svn path=/trunk/; revision=35879
2008-09-02 12:57:42 +00:00
Christoph von Wittich
03ba3b67d1 delete sysreg, it is obsolete now
svn path=/trunk/; revision=35878
2008-09-02 12:57:26 +00:00
Aleksey Bragin
3da774ad40 - Don't pass an unitialized variable as buffer size to RegQueryValueEx. This fixes "(lib\rtl\heap.c:777) Could not allocate 78010000 bytes" problem during 2nd stage install.
svn path=/trunk/; revision=35875
2008-09-02 10:24:56 +00:00
James Tabor
27e6b3ca2f - We always supported global WH_KEYBOARD_LL and WH_MOUSE_LL.
svn path=/trunk/; revision=35873
2008-09-02 08:44:41 +00:00
Aleksey Bragin
d866798279 - MmLoadSystemImage's last parameter (BaseAddress) is not marked as OPTIONAL. Fix callers.
svn path=/trunk/; revision=35872
2008-09-02 08:26:05 +00:00
Ged Murphy
f2b500d25c Fix return value so we exit ServerMain correctly, thus we now see all log until death
svn path=/trunk/; revision=35871
2008-09-02 08:21:13 +00:00
Ged Murphy
4695ff389c allow the log file to be opened whilst the service is running
svn path=/trunk/; revision=35870
2008-09-02 08:05:25 +00:00
Timo Kreuzer
f5a9dc4b29 Don't use a NULL tag with EngAllocMem, that doesn't work anymore.
svn path=/trunk/; revision=35869
2008-09-01 23:18:40 +00:00
Cameron Gutman
87315e4ac4 - STATUS_SUCCESS -> NDIS_STATUS_SUCCESS
svn path=/branches/aicom-network-fixes/; revision=35868
2008-09-01 22:59:04 +00:00
Cameron Gutman
ae2f6e5543 - Set Status
svn path=/branches/aicom-network-fixes/; revision=35867
2008-09-01 22:48:03 +00:00
Timo Kreuzer
366666bddb patch by Cristo Silva criso-c<at>lycos<dot>com:
Initialize keyboard layout before startung the keyboard thread.

svn path=/trunk/; revision=35863
2008-09-01 20:45:26 +00:00
Stefan Ginsberg
944616a1ea - When creating a mutex, and you intend to release it without waiting for it, then you should specify so in bInitialOwner
svn path=/trunk/; revision=35862
2008-09-01 20:42:21 +00:00
Aleksey Bragin
056316f3ac - Fix SHARED_CACHE_MAP structure: it should contain a PRIVATE_CACHE_MAP, not a pointer to it! (confirmed by OSR).
- The same error in VacbPushLock field (also confirmed by OSR).

svn path=/trunk/; revision=35861
2008-09-01 19:32:18 +00:00
Gregor Brunmar
1d9ff6256c D3D9:
* Initial cursor creation in swap chain
* Changed from screen width/height in swap chains to back buffer width/height

svn path=/trunk/; revision=35860
2008-09-01 18:32:57 +00:00
Cameron Gutman
480dd52090 - Initially set Packet to NULL
svn path=/branches/aicom-network-fixes/; revision=35856
2008-09-01 13:12:34 +00:00
Ged Murphy
7d5a02d484 remove warning
svn path=/trunk/; revision=35855
2008-09-01 13:08:52 +00:00
Ged Murphy
5a12bfa450 - Fix file logging to be asynchronous and more robust
- Convert to unicode

svn path=/trunk/; revision=35854
2008-09-01 12:51:49 +00:00
Ged Murphy
e504422cb3 Check for null pointers passed to inet_addr
See issue #3695 for more details.

svn path=/trunk/; revision=35851
2008-09-01 08:00:22 +00:00
Cameron Gutman
bbf9cb252c - Don't return NDIS_STATUS_SUCCESS when we really failed
svn path=/branches/aicom-network-fixes/; revision=35849
2008-09-01 03:58:34 +00:00
Cameron Gutman
1443f6833b - Initially set PoolHandle, ConfigurationHandle, KeyHandle, and Filter to NULL
- Initially set PortOffset to 0
 - Fix 4 memory leaks
 - Remove a useless if

svn path=/branches/aicom-network-fixes/; revision=35848
2008-09-01 03:13:35 +00:00
James Tabor
bf514701b8 - Add flag sets and clears for SetMapMode. Assosiate Map Mode flags with Xform flags and start the use and implementation for user mode.
svn path=/trunk/; revision=35847
2008-09-01 00:51:05 +00:00
Pierre Schweitzer
af64e75b22 Reverted r35812 because of unwanted triple fault bug.
See issue #3704,3706 for more details.

svn path=/trunk/; revision=35846
2008-08-31 21:58:44 +00:00
Daniel Reimer
481f0751b4 Bug 3670: update translate file by Lars Martin Hambro
Bug 3675: Translate file base\setup\reactos\lang by Lars martin Hambro
Bug 3682: Italian translation updates by Paolo Devoti
Bug 3694: Netshell polish translation by Maciej Bialas
Bug 3697: Bulgarian language update for ReactOS by Станев

svn path=/trunk/; revision=35845
2008-08-31 20:20:14 +00:00
Pierre Schweitzer
d9f427a1eb Define TAG macro before use.
That fixes build

svn path=/trunk/; revision=35843
2008-08-31 19:15:06 +00:00
Johannes Anderwald
f558d87092 - Fix resource
svn path=/trunk/; revision=35840
2008-08-31 18:09:35 +00:00
Johannes Anderwald
99082621a4 - Remove old unused enumeration code
- Implement displaying network component properties

svn path=/trunk/; revision=35839
2008-08-31 18:07:21 +00:00
Johannes Anderwald
17fc0b6a1d - Add INetCfgLock interface
- Add NCRP flags

svn path=/trunk/; revision=35838
2008-08-31 18:01:36 +00:00
Stefan Ginsberg
bdc53e84d9 - "0xbadf00d" is not a valid tag. use "PcNt" instead
svn path=/trunk/; revision=35837
2008-08-31 17:56:13 +00:00
Aleksey Bragin
d658f95e0c - Fix two major problems in CmpCleanUpKcbCacheWithLock:
* Accessing (reading and writing - corruption!) freed paged pool memory.
 * Lacking a dereference of a parent key.
- Fix a typo in the comment ("reference" -> "dereference").

svn path=/trunk/; revision=35836
2008-08-31 16:24:29 +00:00
Hervé Poussineau
a04c3e8d7f Check if tags match in ExFreePoolWithTag
Check if provided tag is valid in ExAllocatePoolWithTag
Add lots of BugCheck(BAD_POOL_CALLER)

svn path=/trunk/; revision=35835
2008-08-31 15:52:56 +00:00
Hervé Poussineau
d2ba8bac96 Replace some ExFreePool by ExFreePoolWithTag
svn path=/trunk/; revision=35834
2008-08-31 15:29:21 +00:00
Stefan Ginsberg
56c56ab228 - Make ntdll exports compatible with 2003 SP2 (except for some Vista routines)
- "Implement" Nt* and Zw* routines, and export 3 missing Dbg* routines which we implement
- Remove range list routines (those appear to be kernel mode only)
- Remove strtoull export

svn path=/trunk/; revision=35832
2008-08-31 12:45:56 +00:00
Aleksey Bragin
e1b80cf07e - Fix over-reading the input buffer (sometimes by even more than 400 bytes), and hashing random pool contents instead of the specified buffer.
svn path=/trunk/; revision=35831
2008-08-31 11:55:17 +00:00
Gregor Brunmar
b93a09c0b1 D3D9:
* Replaced depricated IsBadWritePtr() call to a simple NULL check instead (see http://blogs.msdn.com/oldnewthing/archive/2006/09/27/773741.aspx for more info)
* Implemented correct device hierarchy for the HAL Device

svn path=/trunk/; revision=35830
2008-08-31 11:36:55 +00:00
Stefan Ginsberg
faedfbacd7 - Fix build...
svn path=/trunk/; revision=35822
2008-08-30 23:06:13 +00:00
Stefan Ginsberg
4b96ec60dd - Add SecureZeroMemory/RtlSecureZeroMemory
- Add x86 versions of PreFetchCacheLine and MemoryBarrier (TODO for other architectures)

svn path=/trunk/; revision=35821
2008-08-30 22:54:27 +00:00
Sylvain Petreolle
a68427fcce fix typo
svn path=/trunk/; revision=35820
2008-08-30 21:58:12 +00:00
Stefan Ginsberg
e0e7f47d03 - CACHE_DESCRIPTOR and PROCESSOR_CACHE_TYPE are public and defined in winnt.h, so no need to define them in the NDK (the NDK includes winnt.h through windef.h, so this breaks build)
svn path=/trunk/; revision=35819
2008-08-30 21:34:56 +00:00
Pierre Schweitzer
8dc92e2819 Removed useless defines
svn path=/trunk/; revision=35818
2008-08-30 20:41:26 +00:00
Stefan Ginsberg
d53b0eb9e6 - Add APIs new to Windows 2003/SP1 (including XP SP1)
- Add missing NtGetCurrentProcessorNumber to ntdll
- Update headers with missing structures

svn path=/trunk/; revision=35817
2008-08-30 20:29:57 +00:00
Pierre Schweitzer
53b639b3cf - Primary implementation of sfc_os.dll.
- Linked some functions of sfc.dll to sfc_os.dll

svn path=/trunk/; revision=35816
2008-08-30 20:22:35 +00:00
Johannes Anderwald
d78551628c - update russian translation by tower at reactos org
svn path=/trunk/; revision=35815
2008-08-30 19:10:50 +00:00
Johannes Anderwald
3a6cb48146 - Implement enumerating network components (Client/Service/Transport) using NetCfg COM api
- Add a check box to for enabling/disabling notification for network problems
- Implement IOleCommandTarget interface for the LAN status dialog
- Register the LAN property and LAN status CLSIDs

svn path=/trunk/; revision=35814
2008-08-30 19:05:19 +00:00
Pierre Schweitzer
d44a0a0009 Primary implementation of sfc.dll. To have it "fully" working, sfc_os.dll is will be needed.
It does nothing more. Don't shout, Fireball agreed for commit ;).

svn path=/trunk/; revision=35813
2008-08-30 18:53:27 +00:00
Stefan Ginsberg
48d386505a - Updates to our vectored exception handling:
- KiUserExceptionDispatcher: RtlDispatchException directly
- RtlDispatchException: Call vectored exception handlers before doing anything else
- Rename RtlpExecuteVectoredExceptionHandlers to RtlCallVectoredExceptionHandlers as this is the real name
- References: "New Vectored Exception Handling in Windows XP" by Matt Pietrek

svn path=/trunk/; revision=35812
2008-08-30 18:40:00 +00:00
Stefan Ginsberg
1f361c34ed - [FORMATTING] Indentation and typo fixes
svn path=/trunk/; revision=35808
2008-08-30 16:50:43 +00:00
Stefan Ginsberg
12f349df1d - Remove the (now deprecated) ntoskrnl/internal/debug.h header and fix all its includers to use the global debug.h
svn path=/trunk/; revision=35806
2008-08-30 16:31:06 +00:00
Stefan Ginsberg
5ae7cefa81 - Get rid of ASSERT_IRQL, deprecated since long ago
- Remove various dead stuff from headers, and move ASSERT_IRQL_LESS_OR_EQUAL, ASSERT_IRQL_EQUAL and ASSERT_IRQL_LESS to global debug.h

svn path=/trunk/; revision=35803
2008-08-30 15:14:12 +00:00
Stefan Ginsberg
8e2e5b6501 - KEBUGCHECK(0) -> KeBugCheck(FILE_SYSTEM)
svn path=/trunk/; revision=35802
2008-08-30 13:01:10 +00:00
Stefan Ginsberg
1423b9dab9 - Add missing KdD0Transition and KdD3Transition prototypes
svn path=/trunk/; revision=35800
2008-08-30 10:50:52 +00:00
Aleksey Bragin
4554d3964d Gregor Schneider <grschneider@gmail.com>
- Negative position values are allowed, fixes 3 "msvcrt_winetest.exe printf" failures (25 fails left).

svn path=/trunk/; revision=35799
2008-08-30 10:18:48 +00:00
Aleksey Bragin
82290bf5a9 - NDK fixes.
svn path=/trunk/; revision=35794
2008-08-30 08:33:22 +00:00
Johannes Anderwald
0914ac4a44 - Add IIDs && GUID of Netcfg
svn path=/trunk/; revision=35793
2008-08-30 08:17:33 +00:00
Johannes Anderwald
81b8000415 - Import Netcfgx.h
svn path=/trunk/; revision=35792
2008-08-30 08:16:39 +00:00
Aleksey Bragin
fc5403e611 - Fix broken MMPTE_LIST structure definition.
svn path=/trunk/; revision=35791
2008-08-30 07:57:06 +00:00
Hervé Poussineau
c4ec9d697b GCC doesn't need CDECL on variables
svn path=/trunk/; revision=35790
2008-08-30 07:11:57 +00:00
Cameron Gutman
7641cc07cc - Merge aicom-network-fixes up to r35787
svn path=/trunk/; revision=35788
2008-08-30 03:42:46 +00:00
Cameron Gutman
954aed91f2 - Change the status to STATUS_SUCCESS if TdiReceive returns STATUS_PENDING
svn path=/branches/aicom-network-fixes/; revision=35787
2008-08-30 03:29:41 +00:00
Cameron Gutman
1cc8981800 - Check if TdiBuildNullConnectionInfo completed successfully
- Add a comment
 - Fail if we can't allocate Qelt

svn path=/branches/aicom-network-fixes/; revision=35786
2008-08-30 02:53:20 +00:00
Cameron Gutman
b8a0800ce6 - FCB->State gets set to SOCKET_STATE_CONNECTED in MakeSocketIntoConnection
svn path=/branches/aicom-network-fixes/; revision=35785
2008-08-30 02:40:26 +00:00
Cameron Gutman
60899277f8 - Check if MakeSocketIntoConnection succeeded
- Check if TaCopyTransportAddress succeeded

svn path=/branches/aicom-network-fixes/; revision=35784
2008-08-30 02:30:27 +00:00
Cameron Gutman
17c1d9b828 - Check that we successfully allocated memory
- Return TDI_NO_RESOURCES instead of STATUS_NO_MEMORY

svn path=/branches/aicom-network-fixes/; revision=35783
2008-08-30 02:04:30 +00:00
Timo Kreuzer
dcae209a08 Change DC and DC_ATTR members from MATRIX_S and EFLOAT_S, which are explicit fpu emulation types, instead use MATRIX and FLOATOBJ which are the class types. Plug in new FLOATOBJ api and remove old fpu using version. Implement XFORMOBJ api using FLOATOBJ. Remove most of the fpu using code from win32k.
svn path=/trunk/; revision=35779
2008-08-30 01:01:52 +00:00
Eric Kohl
46cc92b9b6 QueryServiceConfig2A/W: Add more parameter checks. Fixes 3 winetest failures.
svn path=/trunk/; revision=35770
2008-08-29 22:31:54 +00:00
Hervé Poussineau
c1f3e0fa1c win32k: Add tags when allocating memory
ntoskrnl: Relax checks when freeing a string

svn path=/trunk/; revision=35769
2008-08-29 21:19:41 +00:00
Eric Kohl
f10a1a9c4d Forgot to commit this file too!
Patch based on bug report #3669 by Michael Martin (aka bugboy) <martinmnet@hotmail.com> just like the patches r35748, r35750, r35752 and r35753.

svn path=/trunk/; revision=35768
2008-08-29 20:44:40 +00:00
Eric Kohl
36e3b2153e - Add a reference counter to the service record.
- Implement a common service record delete function.
- RCloseServiceHandle: Remove a service if it has been marked for deletion and the reference counter reaches 0.
- RControlService: Stop a service only if there are no dependent services running.
 
 
Patch based on bug report #3669 by Michael Martin (aka bugboy) <martinmnet@hotmail.com> just like the patches r35748, r35750, r35752 and r35753.


svn path=/trunk/; revision=35767
2008-08-29 20:43:12 +00:00
Aleksey Bragin
78adf1b7db Gregor Schneider <grschneider@gmail.com>
- Only pad with zeroes if padding requested.
- Show signs for floating point numbers without checking for SIGN type (since there is no unsigned float/double).
See issue #3587 for more details.

svn path=/trunk/; revision=35764
2008-08-29 18:57:31 +00:00
Cameron Gutman
ac9f7a78b0 - Returning STATUS_BUFFER_OVERFLOW is ok also since we're only trying to get DriverKeyLength
svn path=/branches/aicom-network-fixes/; revision=35761
2008-08-29 14:33:42 +00:00
Johannes Anderwald
7f5edc03e3 - Activate INetConnection::GetProperties code
- Import from ncpa properties and status dialog
- Implement INetConnectionProperty interface
- Fix a bug & handle leak in registering code
- Implement NcFreeNetconProperties
- Make resources of netshell to be similar of Windows XP to allow netshell to be loaded
- Add NCF constants from ncpa
- Implement enumerating control/protocol and devices - items dont appear for some unknown reason
- Load property dialog in the same way like Windows (using INetConnectionProperty) interface

svn path=/trunk/; revision=35760
2008-08-29 14:18:55 +00:00
Johannes Anderwald
86fffd0e4a - add INetConnectionProperty interface
svn path=/trunk/; revision=35759
2008-08-29 14:12:34 +00:00
Johannes Anderwald
af96ae0aed - add INetConnectionPropertyUi iid
svn path=/trunk/; revision=35758
2008-08-29 14:12:01 +00:00
Eric Kohl
8e4fa83a87 [FORMATTING] No code changes.
svn path=/trunk/; revision=35756
2008-08-29 13:08:03 +00:00
Eric Kohl
9bde3fcc59 - RCreateServiceW:
- Add more parameter checks.
  - Set the services "ObjectName" value to "LocalSystem" if it doesn't have a name.
- REnumServicesStatusW: Simplify it a little.

svn path=/trunk/; revision=35755
2008-08-29 12:59:27 +00:00
Eric Kohl
d5efa7522b Implement REnumDependentServicesA/W.
Patch is based on bug report #3669 by bugboy <martinmnet@hotmail.com>

svn path=/trunk/; revision=35753
2008-08-29 11:56:39 +00:00
Eric Kohl
532fd2c7b0 - QueryServiceConfig2A/W: Fail if lpBuffer is NULL but cbBufSize is not 0.
- RChangeServiceConfigW: Update the display name if it has been changed.
- RQueryServiceConfigW: Return pointers to empty strings instead of NULL pointers if information is not available.
- RQueryServiceConfig2W: Fail if lpBuffer is NULL.
- Implement RChangeServiceConfigA, RQueryServiceConfigA and RQueryServiceConfig2A.

Patch is based on bug report #3669 by bugboy <marinmnet@hotmail.com>.

svn path=/trunk/; revision=35752
2008-08-29 11:15:53 +00:00
Eric Kohl
e2a4d8be51 - ScmCreateManagerHandle: Fail on invalid database names.
- ROpenServiceW: Fail if lpServiceName is NULL.
- ROpenServiceA: Don't pass an empty string to ROpenServiceW if lpServiceName is NULL. Use NULL instead.

This patch is based on bug report #3669 by bugboy <martinmnet@hotmail.com>.

svn path=/trunk/; revision=35750
2008-08-29 10:34:23 +00:00
Eric Kohl
b1d48577f8 - GetServiceDisplayNameA/W and GetServiceKeyNameA/W: Fix returned name size.
- RGetServiceDisplayNameW: Return the service name if the display name is not available.
- Implement RGetServiceDisplayNameA and RGetServiceKeyNameA.

svn path=/trunk/; revision=35748
2008-08-29 10:01:06 +00:00
Cameron Gutman
b4b79146c7 - Revert my last commit
- Looks like this is meant to fail
 - I added a comment so no one does this again

svn path=/branches/aicom-network-fixes/; revision=35745
2008-08-29 04:23:10 +00:00
Cameron Gutman
cf392f00f6 - Fix a code typo resulting in calls to MiQueryResources to return early
svn path=/branches/aicom-network-fixes/; revision=35744
2008-08-29 03:59:25 +00:00
Cameron Gutman
8fa497277d - Free the address we've previously allocated if needed
svn path=/branches/aicom-network-fixes/; revision=35743
2008-08-29 02:19:16 +00:00
Cameron Gutman
976fe9f031 - Set Handle to NULL so we don't try to close it later
svn path=/branches/aicom-network-fixes/; revision=35741
2008-08-29 01:08:55 +00:00
Thomas Bluemel
71189715c9 Fix warning that variable might be used uninitialized
svn path=/trunk/; revision=35735
2008-08-28 23:47:23 +00:00
Cameron Gutman
56968e5d6f - Merge aicom-network-fixes up to r35714
svn path=/trunk/; revision=35734
2008-08-28 23:21:05 +00:00
Aleksey Bragin
de3ef9b823 - Use CmpCompressedNameSize to obtain the compressed name length (I'll convert the other part of the routine to use CmpCopyCompressedName later, instead of assuming the current way of things).
- Fix incorrect freeing of a buffer returned by a call to CmpConstructName (spotted by Stefan Ginsberg).
- Changes in a couple of comments for better description, and a couple of 80col exceeders fixed.

svn path=/trunk/; revision=35732
2008-08-28 15:37:57 +00:00
Pierre Schweitzer
aa17a34237 Sorry, I committed stuff I shouldn't
svn path=/trunk/; revision=35731
2008-08-28 11:55:35 +00:00
Pierre Schweitzer
d1d5f6306d - Added a base address for netshell.dll
- Relocated imm32.dll

svn path=/trunk/; revision=35730
2008-08-28 11:50:29 +00:00
Pierre Schweitzer
687df0212a Synced riched20_winetest, riched32_winetest with Wine HEAD
svn path=/trunk/; revision=35729
2008-08-28 10:54:35 +00:00
Pierre Schweitzer
f381a715d2 Synced riched20 with Wine HEAD
svn path=/trunk/; revision=35728
2008-08-28 10:43:26 +00:00
Aleksey Bragin
dea8ec1229 - Implement CmpConstructName (builds a full name of the given key).
- Fix freeing of the buffer returned by CmpConstructName in CmpQueryKeyName routine.
- Fixes bug 3616 and related query-routines.
See issue #3616 for more details.

svn path=/trunk/; revision=35727
2008-08-28 10:16:48 +00:00
Aleksey Bragin
a66715b036 - Put netshell.dll on the bootcd.
svn path=/trunk/; revision=35725
2008-08-28 09:12:09 +00:00
Dmitry Chapyshev
65fd9f9e94 - Add Russian translation
svn path=/trunk/; revision=35721
2008-08-28 05:32:31 +00:00
Johannes Anderwald
f5852bccf9 - Add Items to Connection ShellFolder Item Context Menu
- Are not yet handled

svn path=/trunk/; revision=35719
2008-08-28 03:52:51 +00:00
Johannes Anderwald
5ea699faeb - Use CoTaskMemAlloc / CoTaskMemFree for memory de-allocation
- Implement INetConnectionManager, IEnumNetConnection, INetConnection interface for CLSID_ConnectionManager
- Refactor Network Connections Shell Folder enumeration code to use the now available COM functionality

svn path=/trunk/; revision=35718
2008-08-28 02:57:10 +00:00
Johannes Anderwald
f346cab83f - Add netcon header
svn path=/trunk/; revision=35717
2008-08-28 00:07:30 +00:00
Johannes Anderwald
4a322aacc7 - Add IIDs and CLSID for netshell
svn path=/trunk/; revision=35716
2008-08-28 00:03:28 +00:00
Timo Kreuzer
7191a6d896 Merge MMerge 34969 from ros-amd64-bringup branch:
- Fix parameter types of NtQuery/SetSystemInformation, ExInitialize(N)PagedLookasideList, KeBugCheckWithTf, IoGetstackLimits
- Use ALIGN_UP_POINTER for a pointer
- Fix pointer to ULONG cast

svn path=/trunk/; revision=35715
2008-08-27 22:40:17 +00:00
Cameron Gutman
906dfdd979 - Don't handle OSK_EINPROGRESS since TCPTranslateError already has done the conversion to STATUS_PENDING
svn path=/branches/aicom-network-fixes/; revision=35714
2008-08-27 21:45:45 +00:00
Timo Kreuzer
50eb47c31e MMerge 34827 from ros-amd64-bringup branch:
- fix parameter types of NtAllocateVirtualMemory and NtFreeVirtualMemory

svn path=/trunk/; revision=35713
2008-08-27 20:56:16 +00:00
Timo Kreuzer
89d2d4d5bc Merge 34714, 34716, 34718, 34720 from ros-amd64-bringup branch:
recyclebin: DWORD -> SIZE_T and SIZE_T -> DWORD
rtl:
- cast AtomName to ULONG_PTR instead of ULONG
- RtlQueryProcessdebugInformation(): cast teb->ClientId.UniqueProcess to ULONG_PTR for assignment to Pid.
- vs(w)nprintf: cast argument to ULONG_PTR instead of unsigned long for a %p
crt:
- int -> intptr_t
- unsigned long -> uintptr_t
- #undef _MINGW_IMPORT in ctype.c, to avoid warnings
scrnsafe: rename _toul to _toulptr and make it return an ULONG_PTR

svn path=/trunk/; revision=35712
2008-08-27 20:27:32 +00:00
Colin Finck
55c1fbf585 Add the "wine" include directory for the user32 Wine test and remove ROS-specific additions to some files.
Fixes the user32_winetest and thus rostests build under Unix.

svn path=/trunk/; revision=35711
2008-08-27 20:10:45 +00:00
Stefan Ginsberg
9112574303 - Make cmlibhost compile warning free
- Slight reordering of cmlib.h (by Colin Finck)

svn path=/trunk/; revision=35709
2008-08-27 17:54:27 +00:00
Johannes Anderwald
9e68eda05b - Fix build
svn path=/trunk/; revision=35708
2008-08-27 17:27:25 +00:00
Johannes Anderwald
f971e1392e - Start Implementing Network Connections ShellFolder
svn path=/trunk/; revision=35707
2008-08-27 17:18:25 +00:00
Aleksey Bragin
ac962ebea4 - Implement CmpQueryKeyName as a wrapper around CmpConstructName helper function (which is stubbed now).
svn path=/trunk/; revision=35705
2008-08-27 15:55:32 +00:00
Johannes Anderwald
0a12af7eab - Add constants
svn path=/trunk/; revision=35700
2008-08-27 15:19:40 +00:00
Jeffrey Morlan
0346f58af5 Fix StretchBlt ugliness in qemu. Patch by grschneider.
svn path=/trunk/; revision=35699
2008-08-27 14:47:49 +00:00
Timo Kreuzer
57164f6854 Merge 34717 from ros-amd64-bringup branch:
- Fix prototypes of _findfirst, _findnext, _findclose, _findfirsti64, _findnexti64 _wfindfirst, _wfindnext, _wfindfirst64, _wfindnext64, strndup, 
- Fix a number of pointer to int casts

svn path=/trunk/; revision=35695
2008-08-27 03:59:24 +00:00
Johannes Anderwald
9a1009363b - Revert 35686
- NetworkConnections is implemented in netshell.dll

svn path=/trunk/; revision=35688
2008-08-26 22:35:44 +00:00
Johannes Anderwald
d7a196cf95 - Start implementing Network Connections Shell Folder
- Rename cpanelfolder to shfldr_cpanel
- Implement _ILIsNetConnect, ILCreateNetConnect

svn path=/trunk/; revision=35686
2008-08-26 21:29:55 +00:00
Jeffrey Morlan
6c2116d0cf - Implement call :label by creating a new batch context; this way calls can be nested and have their own %0-%9 parameters.
- GetBatchVar: Implement %~n. Remove %? (an old FreeDOS-ism; the Windows equivalent is %ERRORLEVEL%)

svn path=/trunk/; revision=35681
2008-08-26 20:36:38 +00:00
Johannes Anderwald
317fe611cb Copied remotely
svn path=/trunk/; revision=35680
2008-08-26 19:48:08 +00:00
Jeffrey Morlan
75122e2228 cmd_type: Fix misuse of ConOutPrintf which caused problems when the file had any '%' characters in it.
svn path=/trunk/; revision=35679
2008-08-26 19:07:23 +00:00
Aleksey Bragin
eae188745b - Move fdiv pentium bug function stubs to another file.
- Exclude platform-independent CI math function stubs when compiling x86 target. Should finally fix bug 1255.
See issue #1255 for more details.

svn path=/trunk/; revision=35677
2008-08-26 17:21:02 +00:00
Johannes Anderwald
e42ce04145 - Fix executing item which was broken in last revision
svn path=/trunk/; revision=35676
2008-08-26 16:27:40 +00:00
Johannes Anderwald
33a2cd56f6 - Readd undocumented constants as commdlg needs them
svn path=/trunk/; revision=35675
2008-08-26 16:01:13 +00:00
Johannes Anderwald
07d2758056 shell32 update (1/2)
- Use precompiled headers for shell32
- Use __inline for MSVC compability
- Fix api definitions of SHCreateStdEnumFmtEtc, GetFileNameFromBrowse, SHCreateDirectory, SHCreateDirectoryExA, SHCreateDirectoryExW, Dad_AutoScroll, CDefFolderMenu_Create2, SHChangeNotifyRegister
- msvc now compiles nearly all of shell32 (with WDK headers)

svn path=/trunk/; revision=35674
2008-08-26 15:50:23 +00:00
Johannes Anderwald
050ca45f90 shell32 update (1/2)
- The Fonts Shell Folder && Admin Shell Folder GUID is not documented in shlguid.h
- Fix api declaration of SHCreateStdEnumFmtEtc, GetFileNameFromBrowse, SHCreateDirectory, SHCreateDirectoryExA, SHCreateDirectoryExW, Dad_AutoScroll, CDefFolderMenu_Create2, SHChangeNotifyRegister
- Fix EXP_DARWIN_LINK && OPENASINFO structure
- Remove CSIDL_FOLDER_MASK undocumented shellview ids

svn path=/trunk/; revision=35673
2008-08-26 15:50:17 +00:00
Jeffrey Morlan
fc46305c63 - RtlSetEnvironmentVariable: To delete a variable, it is necessary to pass a NULL pointer as the value; passing an empty string should create an empty variable. Remove Value->Length > 0 check.
- SetEnvironmentVariable(A|W): When given a NULL value, pass NULL to RtlSetEnvironmentVariable.
- cmd_set: When given an empty value, pass NULL to SetEnvironmentVariable.

svn path=/trunk/; revision=35672
2008-08-26 15:28:29 +00:00
Jeffrey Morlan
a9431cc596 Prohibit an empty name in RtlSetEnvironmentVariable
svn path=/trunk/; revision=35671
2008-08-26 14:45:37 +00:00
Art Yerkes
7e88d259cb Commit patches from bugboy, fixing bug 2392.
svn path=/trunk/; revision=35669
2008-08-26 13:28:44 +00:00
Aleksey Bragin
6c68a50dd4 - Add an ability to have VMWare video driver installed without inserting CD. Just copy 4 files (vmx_fb.dll, vmx_mode.dll, vmx_svga.sys and vmx_svga.inf) from VMWare Tools CD to your reactos/modules/windows directory and build a bootcd. You'll just need to choose a resolution and a bit depth in 2nd stage setup.
svn path=/trunk/; revision=35667
2008-08-26 11:30:02 +00:00
Andrew Munger
8221cb697c Allocate buffer from Non-paged pool, like most everything else in KDBG.
svn path=/trunk/; revision=35660
2008-08-26 09:38:12 +00:00
Johannes Anderwald
4cd1c282bd - Add a small hack for executing shortcuts to cpl files
- Remove unneeded CLSID_UnixFolder registration
- Fix Bitbucket, Nethood shell folder registration attributes

svn path=/trunk/; revision=35659
2008-08-26 06:24:33 +00:00
Cameron Gutman
0c9b7b6aa0 - Merge r35656 from aicom-network-fixes
- Fixes more leaks during general network use

svn path=/trunk/; revision=35658
2008-08-26 04:19:07 +00:00
Cameron Gutman
92073dfb72 - Fix many memory leaks
- Complete with the correct status

svn path=/branches/aicom-network-fixes/; revision=35656
2008-08-26 02:57:12 +00:00
Cameron Gutman
b47d70ccd3 - Merge r35653 from aicom-network-fixes
- Fixes a major leak when closing Firefox

svn path=/trunk/; revision=35654
2008-08-26 02:11:40 +00:00
Cameron Gutman
d4296ce6a5 - Fix a memory leak
svn path=/branches/aicom-network-fixes/; revision=35653
2008-08-26 00:47:22 +00:00
Jeffrey Morlan
cbcbf539b8 cmd_set:
- When given a name with no value, show all variables that start with that name.
- Implement /P switch
- Set nErrorLevel on failure
- Make syntax more compatible with Windows (allow any control character to act as space; implement quoting)

svn path=/trunk/; revision=35649
2008-08-25 23:48:18 +00:00
Timo Kreuzer
2820db81b3 Add Samuel Serapión to credits file
svn path=/trunk/; revision=35648
2008-08-25 23:45:27 +00:00
Jeffrey Morlan
c49ed3a82c Remove the "LPTSTR cmd" argument to internal commands; there's no need for a command to be told its own name. It was only used in two places:
- a hack in cmd_mkdir that was already obsolete a decade ago
- to distinguish "echo" from "echo.", but that is the wrong way to implement this anyway. There's nothing particularly special about the period, "echo" is just one of those commands that is lenient about where its parameters begin, and when it echos a line, the first character (usually a space, but in the case of "echo." a period) is skipped.

svn path=/trunk/; revision=35647
2008-08-25 23:22:03 +00:00
Timo Kreuzer
c9b3cf161b Merge 34739 - 34769, 34796 - 34905, 34916 - 34967, 34970 - 35135, 35167, 35325, 35326, 35443 - 35506, 35510 - 35546, 35587, 35616,
35644 from ros-amd64-bringup branch:

- Update AMD64 intrinsic Interlocked functions
- Add _InterlockedExchange64 to intin_x86.h
-Fix definitions of IsBadHugeReadPtr, IsBadHugeWritePtr, IsBadReadPtr, IsBadStringPtrA, IsBadStringPtrW, IsBadWritePtr and SetProcessWorkingSetSize
- Define CONTEXT and XMM_SAVE_AREA32, taken from WINE
- Include _M_AMD64 for defintitions in ioaccess.h
- Add Interlocked intrinisc definitions for AMD64 platform
- Add KI_USER_SHARED_DATA and KeGetCurrentIrql() prototype to winddh
- Fix prototypes for KfAcquireSpinLock, KfReleaseSpinLock, KeAcquireInStackQueuedSpinLock and KeReleaseInStackQueuedSpinLock on amd64
- Fix rotl declaration, add mysteriously missing rotr.
winnt.h:
- Fix CONTEXT_AMD64 and friends, add various constants.
- Define RUNTIME_FUNCTION, RtlCaptureContext, RtlRestoreContext, RtlAddFunctionTable, RtlInstallFunctionTableCallback, RtlDeleteFunctionTable.
- Fix definitions for EXCEPTION_RECORD and friends to support amd64.
- Define IMAGE_THUNK_DATA64 and related constants.
- Define IMAGE_TLS_DIRECTORY64 and related constants.
- Remove WINEisms
- Remove multiple declarations and minor fixes.
- Fix KESEG0_BASE for amd64
- Fix definition for NdisCopyLookaheadData on amd64
- Only add function prototypes if NO_INTERLOCKED_INTRINSICS is defined
- Move the inlined InterlockedAnd/Or from rtl to winbase.h and rename it to InterlockedAnd/Or_Inline
- Fix TreeView_EnsureVisible macro.
- Add missing 64 bit intrinsic Interlocked functions
- Fix _InterlockedDecrement64
- Fix InterlockedExchangeAddSizeT
- Fix __writecrx instrinsics
- Fix ExQueryPoolBlockSize prototype
- Make KI_USER_SHARED_DATA and IMAGE_ORDINAL_FLAG64 a ULONGLONG
- Fix definition if IMAGE_OPTIONAL_HEADER64
- Add KPCR structure
- Add __readcrx intrinsics
- Ad some definitions to winddk.h
- Add a field for a DbgPrint function pointer to the ROS_LOADER_PARAMETER_BLOCK for early debug prints in ntoskrnl
- Update KPCR and KIPCR
- Add KeGetPcr() and update KeGetCurrentProcessorNumber 
- Fix SECURITY_DESCRIPTOR_RELATIVE and KDPC_DATA
- Implement byteswap intrinsics
- Add macro definitions for KeQuerySystemTime, KeQueryTickCount and KeQueryInterruptTime to ddk
- Add NtCurrentTeb inline function
- Update amd64 prototypes for KeGetCurrentIrql, KfRaiseIrql, KfLowerIrql, KeRaiseIrqlToDpcLevel, KeRaiseIrqlToSynchLevel, KeLowerIrql, KeRaiseIrql
- Implement __readcr8, __writecr8, __lidt and __sidt intrinsics.
- Implement KeGetCurrentIrql as intrinsic.
- Make KeGetCurrentIrql, KeLowerIrql, KfRaiseIrql, KeRaiseIrql, KeRaiseIrqlToDpcLevel and KeRaiseIrqlToSynchLevel intrinsics as in the WDK 2008.
- Fix _interlockedbittest intrinsics
- Fix __readmsr and __writemsr on amd64
- Fix __readgsqword, it was using a long internally. Add volatile keyword to segment addressing intrinsics. Add "memory" to clobber list on all those that do write.
- Merge __readcr and __writecr x86 / x64 definitions, because they are the same. Implement __readdr and __writedr for x64.
- __readcr3() returns an unsigned __int64, fix x86 MmGetPageDirectory accordingly.


svn path=/trunk/; revision=35646
2008-08-25 21:57:13 +00:00
Johannes Anderwald
909de8f972 - Prevent a crash by checking the applet name if it is empty and does exist
- %1 is used for file argument, where %2, %3, %n indicate the index of the passed param, %* is the rest of the command
- Directly pass the full filename to ShellExecuteExW from the default context menu
- Should fix executing cpl in default shellview

svn path=/trunk/; revision=35643
2008-08-25 21:02:21 +00:00
Johannes Anderwald
d0e1f5701b - Fix multiple bugs in HCR_GetDefaultVerbW
svn path=/trunk/; revision=35641
2008-08-25 20:16:42 +00:00
Timo Kreuzer
fac43bb581 Merge merge 34713 from ros-amd64-bringup branch:
fix NtCurrentTeb()

svn path=/trunk/; revision=35639
2008-08-25 19:01:09 +00:00
Stefan Ginsberg
7876a9fe0d - Remove deprecated CHECKPOINT/CHECKPOINT1 macros which basically translated into DPRINT/DPRINT1("\n")
svn path=/trunk/; revision=35638
2008-08-25 18:52:38 +00:00
Stefan Ginsberg
7afb74e857 - Remove CHECKPOINT macros from green.sys
svn path=/trunk/; revision=35637
2008-08-25 18:48:18 +00:00
Timo Kreuzer
a872a16180 Merge 34703, 34704, 34705, 34706, 34707, 34708, 34709 and 34710 from ros-amd64-bringup branch:
- Fix inline versions of integer <-> pointer conversion functions.
- Implement _InterlockedAnd64, _InterlockedOr64, _interlockedbittestandreset64, _interlockedbittestandset64 and gs-segment-adressing functions
- As amd64 shares most of the intrinsics of x86, implement them in intrin_x86.h
- Fix IMAGE_FIRST_SECTION macro
- Implement GetCurrentFiber(), NtCurrentTeb() and YieldProcessor()
- Fix ENUMRESLANGPROC, ENUMRESNAMEPROC and ENUMRESTYPEPROC
- Add Interlocked functions for pointers
- Add InterlockedCompareExchangePointer and InterlockedExchangePointer
- Add intrinsic port and register access functions
fix LIST_ENTRY() macro for 64 bits
add size_t definition to _mingw.h (ported from mingw)
- Update some loader structs ULONG -> ULONG_PTR / SIZE_T

svn path=/trunk/; revision=35636
2008-08-25 18:47:44 +00:00
Stefan Ginsberg
a27e2fd423 - Use MiSyncForProcessAttach and MiSyncForContextSwitch instead of MiSyncThreadProcessViews to avoid some unneeded mm hack-syncing
svn path=/trunk/; revision=35635
2008-08-25 18:42:40 +00:00
Stefan Ginsberg
f3b92fa090 - Remove LIST_FOR_EACH and LIST_FOR_EACH_SAFE from the kernel
- Fix a bug in KeStartProfile (a missing negation) which caused us to either free buffer when we shouldn't, or leak it

svn path=/trunk/; revision=35633
2008-08-25 18:21:19 +00:00
Timo Kreuzer
016e911156 merge 35359 from ros-amd64-bringup branch:
The TEB member is called ClientId not Cid on all Windows versions I could check (XP, 2k3, vista).

svn path=/trunk/; revision=35631
2008-08-25 16:38:02 +00:00
Stefan Ginsberg
b81b76caab - Remove a header duplication and move a prototype to the correct place
svn path=/trunk/; revision=35630
2008-08-25 15:22:30 +00:00
Stefan Ginsberg
a362028c86 - NtLoadKey: Call NtLoadKeyEx directly instead of calling NtLoadKey2 (which forwards to NtLoadKeyEx)
svn path=/trunk/; revision=35629
2008-08-25 15:10:27 +00:00
Timo Kreuzer
6805ef1936 merge 34702 and 34987 from ros-amd64-bringup branch:
- convert LDR_RESOURCE_INFO members from ULONG to ULONG_PTR
- fix SECURITY_DESCRIPTOR_RELATIVE and KDPC_DATA

svn path=/trunk/; revision=35628
2008-08-25 14:51:22 +00:00
Stefan Ginsberg
8dbbc041c3 - Undefine KdPrint before redefining it.
svn path=/trunk/; revision=35626
2008-08-25 13:42:17 +00:00
Johannes Anderwald
d1813375f5 - Partly fix launching control panel applets
svn path=/trunk/; revision=35624
2008-08-25 07:54:19 +00:00
Andrew Munger
239ad82645 Add odbc32 to the build system and bootcd.
It builds and it's mere presence allows php to load.
Please have a look at the .rbuild, it probably needs tweaked.

svn path=/trunk/; revision=35623
2008-08-25 07:49:46 +00:00
Eric Kohl
5979e2e463 Add "Boot Acceptance Application for Registry". Such a big name for such a small utility ;)
svn path=/trunk/; revision=35615
2008-08-24 23:07:39 +00:00
Cameron Gutman
3a7a8f1f08 - Merge aicom-network-fixes up to r35611
svn path=/trunk/; revision=35614
2008-08-24 20:50:17 +00:00
Stefan Ginsberg
ca33f36d34 - [FORMATTING] Comment and formatting fixes for LocateChildDevice. No code change.
svn path=/trunk/; revision=35613
2008-08-24 20:40:27 +00:00
Cameron Gutman
6f97ab13eb - Same fix as my last commit
svn path=/trunk/; revision=35612
2008-08-24 19:54:50 +00:00
Cameron Gutman
abd660f2dc - Revert my whole ASSERT mess
- This fixes Qemu

svn path=/branches/aicom-network-fixes/; revision=35611
2008-08-24 19:53:16 +00:00
Cameron Gutman
0a84b51976 - Apply the same change in my branch as I did to trunk in r35602
svn path=/branches/aicom-network-fixes/; revision=35610
2008-08-24 19:28:25 +00:00
Cameron Gutman
7a30e67498 - Add another missing PollReeval
svn path=/branches/aicom-network-fixes/; revision=35609
2008-08-24 19:21:41 +00:00
Stefan Ginsberg
3250ec8a01 - [FORMATTING] Code style and comment cleanup. No code change.
svn path=/trunk/; revision=35608
2008-08-24 18:47:14 +00:00
Cameron Gutman
63ba865297 - Revert r35601
- This should always be set if FCB->CurrentThread is non-NULL

svn path=/branches/aicom-network-fixes/; revision=35607
2008-08-24 18:32:19 +00:00
Eric Kohl
0eaca617d3 Don't try to print information about a service that doesn't exist.
svn path=/trunk/; revision=35606
2008-08-24 18:30:59 +00:00
Eric Kohl
866b97d444 SEH-protect all calls to remote functions.
Based on patches from Bug #3669 by bugboy <martinmnet@hotmail.com>.

svn path=/trunk/; revision=35605
2008-08-24 18:27:17 +00:00
Eric Kohl
413b6d969f Hack the declaration of RQueryServiceConfigA. This hack has already been applied to RQueryServiceConfigW.
Based on patches from Bug #3669 by bugboy <martinmnet@hotmail.com>.

svn path=/trunk/; revision=35604
2008-08-24 18:08:17 +00:00
Johannes Anderwald
1e3bc51e71 - Check if source and destination is the same. Fixes creating a new directory and using the default name
svn path=/trunk/; revision=35603
2008-08-24 16:43:08 +00:00
Cameron Gutman
5486706e21 - Remove one of the ASSERTs in SocketCalloutEnter
svn path=/trunk/; revision=35602
2008-08-24 16:37:15 +00:00
Cameron Gutman
d70ad469a8 - Set FCB->Locked to TRUE after we increment the lock count
svn path=/branches/aicom-network-fixes/; revision=35601
2008-08-24 16:20:14 +00:00
Stefan Ginsberg
13362ee99b - Remove KEBUGCHECK and KEBUGCHECKEX macros
- Replace "KeBugCheck(0)" by ASSERT(FALSE)
- Replace deprecated "CPRINT" by DRINT1

svn path=/trunk/; revision=35600
2008-08-24 15:48:05 +00:00
Stefan Ginsberg
e0e86d6092 - Remove deprecated makefile
svn path=/trunk/; revision=35599
2008-08-24 15:42:30 +00:00
Stefan Ginsberg
168fa9b543 - Formatting and comment fixes (no code change)
svn path=/trunk/; revision=35598
2008-08-24 15:41:13 +00:00
Cameron Gutman
a66142aff9 - Add some missing calls to PollReeval
- Move an existing PollReeval to always be called

svn path=/branches/aicom-network-fixes/; revision=35597
2008-08-24 13:56:35 +00:00
Cameron Gutman
e4a04351f2 - Fail if DatagramRecv->Address is NULL
svn path=/branches/aicom-network-fixes/; revision=35596
2008-08-24 13:25:19 +00:00
Gregor Brunmar
10daaf90a6 D3D9:
* Implemented IDirect3DSwapChain9::GetDevice() and GetPresentParameters()
* Added helper function to D3D9BaseObject to convert IUnknown* to IDirect3D9Device*
* Fixed behavior in IDirect3DDevice9::GetSwapChain() when an invalid index was specified

svn path=/trunk/; revision=35594
2008-08-24 11:18:30 +00:00
Gregor Brunmar
f3890a8a5c D3D9:
* Replace D3D9BaseObject's dependency on Direct3DDevice9
* More HAL device init stuff

svn path=/trunk/; revision=35593
2008-08-24 10:15:44 +00:00
Gregor Brunmar
57fad8bdc4 D3D9:
* Fixed incomplete HAL device
* Fixed IDirect3DSwapChain9 and D3D9BaseObject ref counting

svn path=/trunk/; revision=35592
2008-08-24 09:34:16 +00:00
Johannes Anderwald
72d7445528 - Use the name of the cpl as the mutex name
- The mutex name is a unicode buffer, pass it to CreateMutexW function
- fixes bug 3489

svn path=/trunk/; revision=35591
2008-08-24 08:37:25 +00:00
Martin Fuchs
5ed0e9015c update XMLStorage: correctly handle dots and colons in attribute names
svn path=/trunk/; revision=35590
2008-08-24 06:58:19 +00:00
Cameron Gutman
963205e8b8 - Set *ConnectionInfo to NULL if we can't allocate memory for ConnInfo
svn path=/branches/aicom-network-fixes/; revision=35589
2008-08-24 02:55:26 +00:00
Cameron Gutman
86ab49ef00 - Add myself to credits :)
svn path=/trunk/; revision=35585
2008-08-24 01:56:56 +00:00
Cameron Gutman
dbc052ab84 - Merge aicom-network-fixes up to r35583
svn path=/trunk/; revision=35584
2008-08-24 01:53:58 +00:00
Cameron Gutman
4f54a68190 - Skip ObReferenceObjectByHandle if HandleArray[i].Handle is NULL
- Fail if ObReferenceObjectByHandle didn't succeed
 - Remove a bad ASSERT I added in my last commit

svn path=/branches/aicom-network-fixes/; revision=35583
2008-08-24 01:34:17 +00:00
Cameron Gutman
98c2a1ea67 - Fail if MmProbeAndLockPages doesn't succeed
- Fail if IoAllocateMdl returns NULL
 - Add some ASSERTs

svn path=/branches/aicom-network-fixes/; revision=35582
2008-08-24 01:09:48 +00:00
Art Yerkes
978a879fe9 Catch failure to release the cancel spinlock. Would've spotted my error in
tcpip.sys.

svn path=/trunk/; revision=35581
2008-08-23 23:04:15 +00:00
Cameron Gutman
0819ff13a1 - Enable the failure debug prints in MsafdReturnWithErrno
- They shouldn't spam the debug log and they're a great way to tell if something is going wrong in the network stack

svn path=/trunk/; revision=35580
2008-08-23 22:42:44 +00:00
Cameron Gutman
e2c0738526 - Make sure IPAddr is non-NULL
- Change STATUS_UNSUCCESSFUL to STATUS_INVALID_PARAMETER

svn path=/branches/aicom-network-fixes/; revision=35579
2008-08-23 22:06:49 +00:00
Cameron Gutman
055139fc07 - Code cleanup
- Make sure FCB->RemoteAddress is non-NULL

svn path=/branches/aicom-network-fixes/; revision=35578
2008-08-23 21:53:37 +00:00
Cameron Gutman
2d966ffcfb - Make sure FCB->AddressFrom is non-NULL
svn path=/branches/aicom-network-fixes/; revision=35577
2008-08-23 21:41:10 +00:00
Cameron Gutman
6d866748fb - Remove a hack not needed because of r35575
svn path=/trunk/; revision=35576
2008-08-23 20:27:26 +00:00
Cameron Gutman
5194ea09e3 - Release the cancel spin lock before returning
- Revert some unintentional changes made in r35485

svn path=/trunk/; revision=35575
2008-08-23 20:21:15 +00:00
Johannes Anderwald
132a5a7354 - Refresh treeview when a folder item is deleted
svn path=/trunk/; revision=35572
2008-08-23 18:10:04 +00:00
Gregor Brunmar
8a1dfee7ce This seems to be more correct
svn path=/trunk/; revision=35571
2008-08-23 17:52:35 +00:00
Johannes Anderwald
c607aa3f2b - Check if source and destination is the same. Fixes creating a new directory and using the default name
- Prevent a potential buffer overflow in the file properties dialog

svn path=/trunk/; revision=35570
2008-08-23 17:32:17 +00:00
Johannes Anderwald
91c726edc7 - Pass the msi package in quotes
- Fixes launching msi packages from directories with spaces
- See bug 3342

svn path=/trunk/; revision=35569
2008-08-23 17:26:26 +00:00
Gregor Brunmar
07147e6a3c * Refactored GetDirect3D9AdapterInfo() to make life a little easier in InitD3D9BaseDevice().
* Filled IDirect3DDevice9::DeviceData[] with correct info

svn path=/trunk/; revision=35568
2008-08-23 17:24:27 +00:00
Stefan Ginsberg
48021764b4 - Add THREAD_TERMINATE_HELD_MUTEX bugcode and make use of it
svn path=/trunk/; revision=35567
2008-08-23 17:16:16 +00:00
Aleksey Bragin
e8d5b46ac4 - Implement IopGetRegistryValue (complementary function to IopOpenRegistryKeyEx). Not used yet.
svn path=/trunk/; revision=35566
2008-08-23 17:11:12 +00:00
Stefan Ginsberg
5cf8b31211 - In IoAcquire/ReleaseCancelSpinLock, use the queued "IopCancelSpinLock" instead of a ros-specific "CancelSpinLock" standard spinlock
- Misc fixes

svn path=/trunk/; revision=35565
2008-08-23 16:30:14 +00:00
Gregor Brunmar
3291fc11c0 Added missing documentation
svn path=/trunk/; revision=35564
2008-08-23 15:17:00 +00:00
Gregor Brunmar
ce56b08815 * Refactored D3D9 structures a bit
* Started implementing IDirect3D9::CreateDevice()

svn path=/trunk/; revision=35563
2008-08-23 15:01:19 +00:00
Hervé Poussineau
94c1c807bc Fix typo
svn path=/trunk/; revision=35562
2008-08-23 14:43:30 +00:00
Aleksey Bragin
fed8bf35b4 - Perform volume operations as described in http://msdn.microsoft.com/en-us/library/aa364562(VS.85).aspx : Open, Lock, Work, Dismount, Unlock, Close.
- Our fastfat driver doesn't support lock/unlock and dismount operations, so no improvement yet.

svn path=/trunk/; revision=35560
2008-08-23 11:41:04 +00:00
Aleksey Bragin
ccfc2dc23d - Fix fs_isdirty prototype, since there is no need to pass DriveRoot there.
svn path=/trunk/; revision=35559
2008-08-23 10:49:57 +00:00
Aleksey Bragin
f460c4e31c - Remove a hack around sending FSCTL_ to an opened volume handle, it works good enough without the need to open another handle to the file system.
svn path=/trunk/; revision=35558
2008-08-23 10:47:52 +00:00
Art Yerkes
6156320103 Silence debug spew.
svn path=/trunk/; revision=35557
2008-08-23 10:13:14 +00:00
Art Yerkes
f2bd7ae8a0 Restore cancellation for proper socket shutdown.
svn path=/trunk/; revision=35555
2008-08-23 09:49:57 +00:00
Hervé Poussineau
0720856576 Add new devices at start of list, not end. Order is now like in pre-r35543
svn path=/trunk/; revision=35554
2008-08-23 09:43:56 +00:00
Art Yerkes
30108cfd31 Should've done this a long time ago. Just noticed that we're potentially
sending a bunch of 0 handles into AfdSelect.

svn path=/trunk/; revision=35553
2008-08-23 09:01:29 +00:00
Aleksey Bragin
c0e1bccba7 - Silence "Font loaded" debug print, which was mistakingly promoted to DPRINT in r35184.
svn path=/trunk/; revision=35552
2008-08-23 08:10:15 +00:00
Art Yerkes
1a6f6971b8 Hand merge a lost change from aicom-network-fixes.
svn path=/trunk/; revision=35551
2008-08-23 07:39:02 +00:00
Art Yerkes
db4dc32f9f Merge aicom-network-fixes up to 35538
svn path=/trunk/; revision=35550
2008-08-23 07:20:22 +00:00
Hervé Poussineau
16553f0003 Remove useless 'if'
svn path=/trunk/; revision=35545
2008-08-22 22:13:46 +00:00
Hervé Poussineau
7380fcd1f4 LONG -> NTSTATUS
svn path=/trunk/; revision=35544
2008-08-22 22:11:49 +00:00
Hervé Poussineau
dcc142c4a1 Fix device node structure to be compatible with MS Windows Vista
Send GUID_DEVICE_ENUMERATED event
umpnpmgr: react on GUID_DEVICE_ENUMERATED, not GUID_DEVICE_ARRIVAL
IopEnumerateDevice: Set DNF_ENUMERATED and DO_BUS_ENUMERATED_DEVICE when required
IopEnumerateDevice: Continue to process PDOs, even if one failed

svn path=/trunk/; revision=35543
2008-08-22 21:43:42 +00:00
Stefan Ginsberg
03d12cf07b - Remove a LIST_FOR_EACH
- ASSERTify 2 assumptions
- Rename "ListEntry" to "NextEntry" for clarification

svn path=/trunk/; revision=35542
2008-08-22 21:24:31 +00:00
Johannes Anderwald
df9f666602 * When clicking on the desktop background, there is no item selected, thus, apidl is null
* Fixes bug 3676

svn path=/trunk/; revision=35540
2008-08-22 20:07:14 +00:00
Cameron Gutman
fb0a6601f9 - More STATUS_UNSUCCESSFUL to STATUS_INVALID_PARAMETER changes
svn path=/branches/aicom-network-fixes/; revision=35538
2008-08-22 19:35:20 +00:00
Cameron Gutman
f337da0bfb - Handle STATUS_INVALID_PARAMETER
svn path=/branches/aicom-network-fixes/; revision=35537
2008-08-22 19:30:33 +00:00
Cameron Gutman
e233f4f784 - Return a more accurate status (STATUS_INVALID_PARAMETER) than STATUS_UNSUCCESSFUL when a parameter is NULL
svn path=/branches/aicom-network-fixes/; revision=35536
2008-08-22 19:26:30 +00:00
Hervé Poussineau
60ef511bb8 DEVICE_RELATIONS->Count is ULONG
svn path=/trunk/; revision=35535
2008-08-22 19:08:25 +00:00
Hervé Poussineau
44fdf97ae2 Calling IoSynchronousInvalidateDeviceRelations with type TargetDeviceRelation returns success.
Spotted by Alex

svn path=/trunk/; revision=35534
2008-08-22 19:06:25 +00:00
Hervé Poussineau
70f34a3756 Move most of the code of IoSynchronousInvalidateDeviceRelations to IopEnumerateDevice, and use it when possible
Fix IoSynchronousInvalidateDeviceRelations prototype

svn path=/trunk/; revision=35533
2008-08-22 19:00:31 +00:00
Hervé Poussineau
bf702f35f2 Clean up code by removing now useless parts
Replace 3rd arg of IopActionInitChildServices by a global variable (removes a pointer cast)
IopStartDevice: no need to get top of stack, IopInitiatePnpIrp does it for us

svn path=/trunk/; revision=35532
2008-08-22 17:47:13 +00:00
Stefan Ginsberg
b129412701 - Replace more magic values with symbolic constants
- Fix a peculiar header duplication

svn path=/trunk/; revision=35531
2008-08-22 14:55:20 +00:00
Jeffrey Morlan
8b52a8e50a - Extract the line-reading code in ProcessInput to a separate function (ReadLine) that the parser can call. Now line continuations (using ^ at the end of a line) and multi-line parenthesized blocks work.
- ReadBatchLine: Don't strip the trailing \n, the parser needs it. Remove handling of :labels and @quiet commands, now done by the parser.
- ReadCommand: Add a \n to the line. Move PrintPrompt call out, since the prompt shouldn't be printed for additional lines read in a command beyond the first.

svn path=/trunk/; revision=35530
2008-08-22 14:37:11 +00:00
Stefan Ginsberg
16ab5c9a07 - Add EFLAGS_IOPL to asm.h and make use of it in assembly
- Fix a potential 64-bit warning in handle.c
- Comment fixes

svn path=/trunk/; revision=35529
2008-08-22 14:29:01 +00:00
Art Yerkes
f1fe2984b3 Commit bugboy's patch from bug 2392, and remove DeviceDesc, which isn't needed
anymore.

svn path=/trunk/; revision=35523
2008-08-22 05:58:56 +00:00
Stefan Ginsberg
7e8e8407d0 - Fix kernel mode debug output broken in 35520
- Patch by Alex

svn path=/trunk/; revision=35522
2008-08-22 00:39:26 +00:00
Stefan Ginsberg
81af67a6fe - Use correct bug code when crashing due to closing a protected handle
- Add INVALID_KERNEL_HANDLE bug code

svn path=/trunk/; revision=35521
2008-08-22 00:26:52 +00:00
Stefan Ginsberg
b9a32878e1 - Patch by Alex Ionescu: Fix a typo, and code cleanup
svn path=/trunk/; revision=35520
2008-08-21 22:41:17 +00:00
Stefan Ginsberg
ea3057f862 - Change ASSERT to C_ASSERT
svn path=/trunk/; revision=35519
2008-08-21 21:25:16 +00:00
Aleksey Bragin
83029d2dd8 - "When releasing the gmutex my awesome code was removing the woken flag" (c) Alex Ionescu.
svn path=/trunk/; revision=35516
2008-08-21 21:07:52 +00:00
Jeffrey Morlan
4cdc27c1a2 - Begin writing a real parser for cmd. &, &&, ||, and () are implemented. The parenthesized blocks aren't too useful yet as the parser can't read additional lines; doing this will require some restructuring in cmd.c.
- Remove ^-removing hacks in echo and set.

svn path=/trunk/; revision=35514
2008-08-21 20:18:35 +00:00
Jeffrey Morlan
07912f2b23 - Implement X>&Y redirections. Hold redirections in a linked list structure, because order matters (>x 2>&1 is not the same as 2>&1 >x). Allow redirection of any handle number from 0 to 9.
- Allow quotes around the redirection file name.
- Batch: Fix buffer overflow bug (incorrect size for bc->BatchFilePath)

svn path=/trunk/; revision=35508
2008-08-21 15:33:59 +00:00
Cameron Gutman
3b1ae0bb37 - Replace MmMapLockedPages with MmGetSystemAddressForMdlSafe
- Add a check to UnlockRequest
 - Enclose MmProbeAndLockPages in SEH
 - Fixes bug 3672

svn path=/branches/aicom-network-fixes/; revision=35507
2008-08-21 14:46:03 +00:00
Aleksey Bragin
4af7567008 - Add missing MmCallDllInitialize prototype.
- Make IopOpenRegistryKeyEx NTAPI.
- Patch by Alex Ionescu.

svn path=/trunk/; revision=35503
2008-08-21 11:04:50 +00:00
Aleksey Bragin
d1213e5977 - Fix definition of BOOT_DRIVER_LIST_ENTRY (Information provided by Alex Ionescu).
svn path=/trunk/; revision=35502
2008-08-21 10:58:53 +00:00
Art Yerkes
36b8b4a111 Merge aicom-network-fixes up to 35486
svn path=/trunk/; revision=35499
2008-08-21 03:38:49 +00:00
Gregor Brunmar
4d54d71f8f Added some more parameter error checking to D3D9::CreateDevice()
svn path=/trunk/; revision=35498
2008-08-21 03:19:02 +00:00
Gregor Brunmar
52aa41d8e0 * Removed unused header file
* Fixed signed/unsigned comparison warning

svn path=/trunk/; revision=35497
2008-08-21 02:34:28 +00:00
Jeffrey Morlan
ed0615e6ac Always set the console's event on any keypress, even in line input mode.
svn path=/trunk/; revision=35489
2008-08-20 20:55:39 +00:00
Jeffrey Morlan
fca286cbda Fix infinite loop during generic table lookups. Patch by Alex Ionescu
svn path=/trunk/; revision=35487
2008-08-20 19:15:00 +00:00
Cameron Gutman
3b40e9b047 - Reapply r35481
svn path=/branches/aicom-network-fixes/; revision=35486
2008-08-20 19:06:43 +00:00
Cameron Gutman
df19533df7 - Fix IRP cancellation issues
- Ping doesn't hang anymore

svn path=/branches/aicom-network-fixes/; revision=35485
2008-08-20 18:50:26 +00:00
Cameron Gutman
67fae61a27 - Revert 35477-35481
svn path=/branches/aicom-network-fixes/; revision=35484
2008-08-20 18:46:38 +00:00
Johannes Anderwald
46ba64139f - Implement SHParseDisplayName by Paul paulvgenderen at gmail.com
svn path=/trunk/; revision=35482
2008-08-20 17:29:18 +00:00
Cameron Gutman
9b492699af - Fix handling of cancelled IRPs
svn path=/branches/aicom-network-fixes/; revision=35481
2008-08-20 17:29:01 +00:00
Cameron Gutman
6159e6d129 - Don't forget about ConnectIrp (This fix was lost in the merge)
- Don't destroy the same socket twice
 - Don't unlock the same socket twice
 - Don't destroy a socket with pending IRPs

svn path=/branches/aicom-network-fixes/; revision=35480
2008-08-20 14:56:12 +00:00
Cameron Gutman
3def13f731 - Fix build
svn path=/branches/aicom-network-fixes/; revision=35479
2008-08-20 14:48:42 +00:00
Cameron Gutman
a796846871 - The rest of the merge
- This will most likely need fixing later

svn path=/branches/aicom-network-fixes/; revision=35478
2008-08-20 14:43:33 +00:00
Cameron Gutman
8b269440fd - Reapply arty's datagram cancellation work
- Part 1 of 3

svn path=/branches/aicom-network-fixes/; revision=35477
2008-08-20 14:21:08 +00:00
Johannes Anderwald
e577021a2b - Do not pass SHGDN_INFOLDER flag
- Implement IPersistFolder2 for control panel shell folder 
- Replace _InsertMenuItem with unicode 
- Pass the pidl of shellfolder and selected drive to SH_ShowDriveProperties to construct a valid IDataObject which is passed to drive PropertySheet handlers
- Release HPSX array only if it was constructed
- Optimize AddShellPropSheetExCallback for file property dialog
- Pass the pidl of the parent shell folder and selected item to SH_ShowPropertiesDialog and construct a IDataObject from it
- Check for success for created IDataObject and HPSX array
- Add a lot of  buffer checks for the OpenNew shell extension
- Pass the full filename of the item from Admin Tools shellfolder when IShellFolder_GetDisplayNameOf is called with SHGDN_FORPARSING
- Implement initializing the AdminTools folder 
- Implement IShellFolder_SetNameOf for the desktop shell folder to support renaming desktop items and sub folders
- Implement ISFHelper interface for desktop shell folder to support deleting with backspace key and fixes the new item shell service for items and directories
- Implement hiding (deleting) shell extensions from desktop
- Display a messagebox if shell extensions should be really deleted
- Fix the IShellFolder_GetAttributesOf for the Mycomputer shell folder
- Implement changing drive name with rename verb using IShellFolder_SetNameOf (MyComputer)
- Implement Initializing the MyComputer shell folder properly
- Fix Shellfolder attributes for MyDocuments shell folder
- Fix Shellfolder attributes for Netplaces shell folder
- Implement Initializing the Netplaces shell folder properly
- Remove the 'properties' and 'open' verb from recycle bin shell folder, these verbs are statically generated
- Directories cannot have the link attribute
- Implement IShellExtInit interface for the new item shell service
- Implement the default context menu based on the existing item context menu and background context menu and delete old implementation
- Implement copy&paste of files and directories
- Implement creating links to files
- Check if a dynamic shell extension has already been loaded
- Free static / dynamic shell extensions on release

svn path=/trunk/; revision=35476
2008-08-20 13:47:47 +00:00
Cameron Gutman
fcdbf0c9d5 - Move LockBuffers
- Remove a duplicate debug print

svn path=/branches/aicom-network-fixes/; revision=35469
2008-08-20 01:42:12 +00:00
Cameron Gutman
95efddbf54 - Use FCB->Connection.Object instead of FCB->AddressFile.Object
- Spotted by Arty

svn path=/branches/aicom-network-fixes/; revision=35468
2008-08-20 01:10:13 +00:00
Cameron Gutman
5c1039783c - Fix a bug that resulted in the status getting changed if TdiQueryInformation failed
svn path=/branches/aicom-network-fixes/; revision=35467
2008-08-19 23:50:41 +00:00
Cameron Gutman
0afe589112 - Use MmGetSystemAddressForMdlSafe instead of MmMapLockedPages
- Noticed by Alex

svn path=/branches/aicom-network-fixes/; revision=35466
2008-08-19 23:44:11 +00:00
Johannes Anderwald
6d22ab5923 * The CLSID of a PropertySheet handler can either be present as subkey or as a default value.
* Fixes WinRar file property sheet handler and etc...

svn path=/trunk/; revision=35465
2008-08-19 22:40:05 +00:00
Daniel Reimer
9080c0c2e7 Last remnants of Bug 3649. Hopefully...
svn path=/trunk/; revision=35464
2008-08-19 21:45:56 +00:00
Cameron Gutman
717ec21981 - Fix a memory leak
svn path=/branches/aicom-network-fixes/; revision=35463
2008-08-19 21:45:08 +00:00
Stefan Ginsberg
b736cabdae - Remove dead code
svn path=/trunk/; revision=35462
2008-08-19 21:09:58 +00:00
Cameron Gutman
735fdd1782 - Make sure we have an mdl and a buffer
svn path=/branches/aicom-network-fixes/; revision=35457
2008-08-19 17:45:53 +00:00
Daniel Reimer
f2573fe760 Bug 3661: Bulgarian Update by CCTAHEB
Bug 3668: Shell32 Update by Javier Remacha

svn path=/trunk/; revision=35456
2008-08-19 17:00:40 +00:00
Daniel Reimer
2af4b1e5ca Bug 3631 Translate file/patch by Lars Martin Hambro (shell32 was outdated)
Bug 3659 shell32 pl-PL update by Maciej Bialas
Bug 3664 Italian resources update by Paolo Devoti
Bug 3665 Some translations

svn path=/trunk/; revision=35455
2008-08-19 16:32:35 +00:00
Cameron Gutman
2a199d0cb2 - SEHify LockRequest
- Free everything and return if MmMapLockedPages fails

svn path=/branches/aicom-network-fixes/; revision=35454
2008-08-19 16:23:01 +00:00
Cameron Gutman
ea2d464b14 - MmMapLockedPages takes KPROCESSOR_MODE not LOCK_OPERATION as the second parameter
svn path=/branches/aicom-network-fixes/; revision=35453
2008-08-19 16:06:36 +00:00
Gregor Brunmar
9df926c8e0 * Removed d3d9's dependency on the missing strsafe library
* Replaced .def file with a .spec file

svn path=/trunk/; revision=35452
2008-08-19 15:42:23 +00:00
Johannes Anderwald
19ce17e295 * Restore file with SHFileOperation
svn path=/trunk/; revision=35451
2008-08-19 13:14:25 +00:00
Johannes Anderwald
f1a1cc745a * Create a IDataObject when cidl == 0 (click on TreeView)
* Handle directories in ISFHelper_fnCopyItems
* Should make copying directories work

svn path=/trunk/; revision=35450
2008-08-19 13:03:16 +00:00
Art Yerkes
1d8b6343f6 Fix a leak when doing an immediate reply to a small packet (could be PSH|ACK
with < 50 bytes, ACK|FIN, RST or similar).

svn path=/trunk/; revision=35449
2008-08-19 12:39:46 +00:00
Johannes Anderwald
524d084d4d - Read class name from Software\Microsoft\Windows\CurrentVersion\Explorer\CLSID when available. Custom names like renamed MyComputer or MyDocuments are stored here
svn path=/trunk/; revision=35448
2008-08-19 08:34:42 +00:00
Art Yerkes
7d8e94151c Merge aicom-network-fixes up to 35446.
I (arty) modified the new printing in msafd to be conditional, so as not to
be accused of causing unnecessary spew.

svn path=/trunk/; revision=35447
2008-08-19 06:06:43 +00:00
Cameron Gutman
1c3484cdd1 - Make sure we don't complete with STATUS_SUCCESS if MmMapLockedPages fails
- Move and enable MmUnlockPages and IoFreeMdl

svn path=/branches/aicom-network-fixes/; revision=35446
2008-08-19 04:36:05 +00:00
Cameron Gutman
34a1b59e0a - Release the spin lock
svn path=/branches/aicom-network-fixes/; revision=35441
2008-08-19 00:19:18 +00:00
Johannes Anderwald
eaee8097aa - rewrite ISFHelper_CopyItems to actually copy the items when requested
- should fix copy&paste of files in explorer (Directories are not yet supported)

svn path=/trunk/; revision=35440
2008-08-19 00:04:53 +00:00
Cameron Gutman
6b5a88dd52 - Use the correct ioctl
svn path=/branches/aicom-network-fixes/; revision=35439
2008-08-18 23:41:23 +00:00
Cameron Gutman
e57331851c - Don't hardcode the Ioctl
svn path=/branches/aicom-network-fixes/; revision=35438
2008-08-18 23:35:32 +00:00
Johannes Anderwald
2546d4ddc6 - add 3 resource strings
svn path=/trunk/; revision=35437
2008-08-18 22:24:45 +00:00
Stefan Ginsberg
290c90788a - Fix freeldr build
svn path=/trunk/; revision=35435
2008-08-18 17:38:38 +00:00
Stefan Ginsberg
eccf1ea8b5 - Remove broken IoReportTargetDeviceChange implementation on Alex's request
svn path=/trunk/; revision=35434
2008-08-18 17:07:09 +00:00
Stefan Ginsberg
f7972be7d1 - Replace the remaining X86_EFLAGS* with EFLAGS_*
- Add missing EFLAGS_* to NDK

svn path=/trunk/; revision=35433
2008-08-18 17:05:31 +00:00
Eric Kohl
e6bc2154e3 Implement the "Add users to a group" function.
svn path=/trunk/; revision=35432
2008-08-18 14:08:22 +00:00
Cameron Gutman
bd043fd1cf - Call MmProbeAndLockPages for SysMdl
svn path=/branches/aicom-network-fixes/; revision=35431
2008-08-18 14:00:27 +00:00
Stefan Ginsberg
f4d87f01ff - Missed a STDCALL -> NTAPI
svn path=/trunk/; revision=35430
2008-08-18 13:35:52 +00:00
Stefan Ginsberg
183d54b377 - Fix a typo (and build)
svn path=/trunk/; revision=35429
2008-08-18 13:33:40 +00:00
Stefan Ginsberg
d94c54c3a7 - Implement IoReportTargetDeviceChange as a wrapper around the unimplemented IoReportTargetDeviceChangeAsynchronous
svn path=/trunk/; revision=35428
2008-08-18 13:31:33 +00:00
Stefan Ginsberg
e3f8231305 - Cleanup and reformat parts of pnpmgr (no code change)
svn path=/trunk/; revision=35427
2008-08-18 13:30:17 +00:00
Stefan Ginsberg
5f26c6070c - STDCALL -> NTAPI
svn path=/trunk/; revision=35425
2008-08-18 09:50:38 +00:00
Stefan Ginsberg
b7375f0b9d - Don't export PoSetDeviceBusy, it should be a macro in a DDK header
- Clean up Po* stubs

svn path=/trunk/; revision=35424
2008-08-18 09:49:28 +00:00
Stefan Ginsberg
bd8aae9daf - Add KdInitSystem to kd64.h
svn path=/trunk/; revision=35423
2008-08-18 07:47:44 +00:00
Stefan Ginsberg
7a7c6e2c98 - Remove 3 deprecated macros
- Use X86_EFLAGS_ID instead of cpu.c specific EFLAGS_ID

svn path=/trunk/; revision=35422
2008-08-18 07:42:12 +00:00
Stefan Ginsberg
42114cdc69 - Remove empty header
svn path=/trunk/; revision=35421
2008-08-18 07:37:25 +00:00
Cameron Gutman
6634c6a919 - Handle STATUS_FILE_CLOSED
svn path=/branches/aicom-network-fixes/; revision=35420
2008-08-18 00:05:05 +00:00
Cameron Gutman
8b67a0b644 - Change STATUS_UNSUCCESSFUL to STATUS_FILE_CLOSED
- Move the Irp->Cancel check after SocketAcquireStateLock to fix a possible crash
 - Change STATUS_INVALID_PARAMETER to STATUS_FILE_CLOSED
 - Move SocketAcquireStateLock in front of the check for a NULL return from LockRequest to prevent another possible crash

svn path=/branches/aicom-network-fixes/; revision=35419
2008-08-17 22:12:31 +00:00
Cameron Gutman
ec037e4d9d - Call SocketStateUnlock before returning
- Don't complete the IRP again in the completion routine

svn path=/branches/aicom-network-fixes/; revision=35418
2008-08-17 21:48:09 +00:00
Stefan Ginsberg
f7b3363eb2 - Fix comment header
svn path=/trunk/; revision=35414
2008-08-17 19:23:06 +00:00
Stefan Ginsberg
4353142bc2 - Rename SeInit to SeInitSystem
svn path=/trunk/; revision=35413
2008-08-17 18:34:37 +00:00
Hervé Poussineau
878ef89965 Device type can be undefined if kbdclass or mouclass is not loaded.
svn path=/trunk/; revision=35412
2008-08-17 18:11:32 +00:00
Stefan Ginsberg
4aa45a6803 - Move kernel mode implementation of RtlpGetStackLimits from crt to ntoskrnl
svn path=/trunk/; revision=35411
2008-08-17 18:01:49 +00:00
Stefan Ginsberg
4972a810f1 - Remove dead code
svn path=/trunk/; revision=35410
2008-08-17 17:38:28 +00:00
Stefan Ginsberg
10ec954654 - Remove two more files by moving their tiny contents (one stub, one 2 line function) to mm.c
svn path=/trunk/; revision=35407
2008-08-17 12:17:08 +00:00
Stefan Ginsberg
553ffd969a - Remove dead pager.c
- Remove empty aspace.c
- Move MmKernelAddressSpace to a header

svn path=/trunk/; revision=35406
2008-08-17 12:05:28 +00:00
Cameron Gutman
e070cbeb39 - Add debug prints for failure statuses
svn path=/branches/aicom-network-fixes/; revision=35404
2008-08-17 08:17:03 +00:00
Art Yerkes
8b23bceee1 Don't attempt to mount a partition that starts with a fat bootblock.
svn path=/trunk/; revision=35403
2008-08-17 05:23:10 +00:00
ReactOS Portable Systems Group
7c7314849d Make RAM disk support work on x86 as well (it is now generic):
1) Don't assert if loaded from setup. On NT this means special things, but we don't care about that for now.
	2) Add to txtsetup.sif along with the other core FS drivers. This will eventually allow installing from ramdisk as well (and later, over the network)
	3) Add to hivesys_i386.inf so that the driver is initialized.

RAM disk now works flawlessly on x86 -- just make sure to follow the previous instructions, and add <size of your RAM disk> to your total memory available to ReactOS.


svn path=/trunk/; revision=35402
2008-08-17 02:35:30 +00:00
ReactOS Portable Systems Group
3cdbb3f31d FreeLDR-side of RAM Disk support for x86 based on actual NT implementation (instead of ARM-only hacks):
1) First, remove the hack in bootmgr.c that looked for a reactos.img.
	2) Instead, read the command line to the kernel, and check for /RDIMAGEPATH. If found, load the ramdisk in the loader.
	3) This uses the same routine as the previous hack, but enhances it with actual status and progress printouts.
	4) Finally, update usetup to generate a ReactOS (RAM Disk) entry on DBG builds, under the WinLDR one.

Also fixed a bug where, on MiniTUI, the text sent to UiDrawProgressBarCenter would be ignored.

This patch does not result in working RAM disk support yet.

To test the FreeLDR side of things, you need to create a ramdisk file: this is easy.

Preferred way right now is to use qemu-img to create a standard QEMU image. Then install ReactOS on it and configure it. This is now your ramdisk.
Make your image about 100MB; this is how much ReactOS requires to install right now.

Now on your "official" QEMU image, you can delete everything except freeldr.sys and freeldr.ini. Or don't, if it's large enough.

Now add the reactos.img to your official image. You should have at least 100MB free space.

Now when you boot the ReactOS (RAM disk) entry, it should boot up until the kernel, which will panic since there's no ramdisk support yet.

Note that you can't just create a QEMU image and drop files in it -- it must be properly formatted and have the ReactOS boot sector:
The RAM disk isn't just a collection of files, it's an entire virtual drive, so that's why you must first officially install ReactOS on it.


svn path=/trunk/; revision=35401
2008-08-17 02:01:30 +00:00
James Tabor
0d12515dcb - Add timer handle type.
svn path=/trunk/; revision=35400
2008-08-17 00:46:51 +00:00
Art Yerkes
7fd0c1eb30 Merge aicom-network-fixes up to 35398
svn path=/trunk/; revision=35399
2008-08-16 22:39:01 +00:00
Cameron Gutman
54a02c3ea8 - Make sure we successfully allocated ConnectionReturnInfo and ConnectionCallInfo
- Make sure ObReferenceObjectByHandle was successful

svn path=/branches/aicom-network-fixes/; revision=35398
2008-08-16 21:16:41 +00:00
Stefan Ginsberg
0860be6816 - Remove deprecated ExfpInterlockedExchange64
svn path=/trunk/; revision=35397
2008-08-16 18:06:12 +00:00
Stefan Ginsberg
399dc7da51 - Spelling fixes
- Remove deprecated comment from resource.c
- Fix obsdcach.c comment header

svn path=/trunk/; revision=35396
2008-08-16 17:53:28 +00:00
James Tabor
a878cd2e46 Wine update to dialog.c, see bug 3644.
svn path=/trunk/; revision=35395
2008-08-16 16:01:03 +00:00
James Tabor
bafb77d60c Add check for null after allocating new DCE. See bug 3638.
svn path=/trunk/; revision=35394
2008-08-16 15:48:05 +00:00
Cameron Gutman
05a4dffa6e - Move SocketAcquireStateLock out of SEH
svn path=/branches/aicom-network-fixes/; revision=35393
2008-08-16 15:06:12 +00:00
Hervé Poussineau
1b11b8d6ce Increase lost packet count when transmit failed or receive failed for whatever reason
svn path=/trunk/; revision=35392
2008-08-16 14:30:20 +00:00
Cameron Gutman
3f184e689d - Move MmUnlockPages to the proper place (still commented out though)
svn path=/branches/aicom-network-fixes/; revision=35391
2008-08-16 14:23:58 +00:00
Stefan Ginsberg
e96d8d91ad - No need to set a variable to TRUE twice before it is used
svn path=/trunk/; revision=35390
2008-08-16 14:18:42 +00:00
Hervé Poussineau
660f76d0a1 Replace .def file by a .spec file
svn path=/trunk/; revision=35389
2008-08-16 13:18:50 +00:00
Aleksey Bragin
5833f234a8 Finta László <finta.laszlo@freemail.hu>
- Fix _allmul function, which would always give 0 if both multiplier and muliplicand's high words are 0.

svn path=/trunk/; revision=35388
2008-08-16 12:51:39 +00:00
Colin Finck
28aa57b53f Restructure the keyboard & mouse detection code:
- Truly separate i8042BasicDetect from i8042DetectKeyboard and i8042DetectMouse: It now only does the CTRL_SELF_TEST, any other specific detections are done in their respective functions
- Only set KEYBOARD_PRESENT and MOUSE_PRESENT, when all respective detections completed successfully

Might fix bug #3550

svn path=/trunk/; revision=35387
2008-08-16 12:20:18 +00:00
Hervé Poussineau
0e0ea9b0df Replace .def file by a .spec file
svn path=/trunk/; revision=35386
2008-08-16 12:03:07 +00:00
Cameron Gutman
0c3f9f9d05 - Fix another memory leak
svn path=/branches/aicom-network-fixes/; revision=35385
2008-08-16 11:59:54 +00:00
Hervé Poussineau
b38fdbfee0 Replace .def file by a .spec file
svn path=/trunk/; revision=35384
2008-08-16 11:59:16 +00:00
Hervé Poussineau
fbd12707f0 No need to export DriverEntry
svn path=/trunk/; revision=35383
2008-08-16 11:45:30 +00:00
Hervé Poussineau
b521c81620 No need to export DriverEntry
svn path=/trunk/; revision=35382
2008-08-16 11:44:23 +00:00
Hervé Poussineau
4d169f861b Replace .def file by a .spec file
svn path=/trunk/; revision=35381
2008-08-16 11:37:13 +00:00
Hervé Poussineau
09bf4fce5d Replace .def file by a .spec file
svn path=/trunk/; revision=35380
2008-08-16 11:35:58 +00:00
Hervé Poussineau
00ff637edd Replace .def file by a .spec file
svn path=/trunk/; revision=35379
2008-08-16 11:35:36 +00:00
Hervé Poussineau
016f8daf8b Remove useless file
svn path=/trunk/; revision=35378
2008-08-16 11:32:17 +00:00
Hervé Poussineau
b7b8f77dc1 Replace .def file by a .spec file
svn path=/trunk/; revision=35377
2008-08-16 11:31:39 +00:00
Hervé Poussineau
33893b9568 Replace .def file by a .spec file
svn path=/trunk/; revision=35376
2008-08-16 11:14:22 +00:00
Hervé Poussineau
9fbc7142ad Replace .def file by a .spec file
svn path=/trunk/; revision=35375
2008-08-16 11:10:14 +00:00
Hervé Poussineau
41544ac115 Remove useless file
svn path=/trunk/; revision=35374
2008-08-16 10:50:21 +00:00
Hervé Poussineau
8e971e91d3 No need to export DriverEntry
svn path=/trunk/; revision=35373
2008-08-16 10:48:20 +00:00
Hervé Poussineau
e3847788b9 Replace .def file by a .spec file
svn path=/trunk/; revision=35372
2008-08-16 10:45:25 +00:00
Colin Finck
9fb87bbf79 Mario Kacmar (kario@szm.sk)
- Print no approximate round trip times on 100% loss like Windows does

See issue #2542 for more details.

svn path=/trunk/; revision=35371
2008-08-16 10:44:53 +00:00
Hervé Poussineau
5f8b05dfa8 Remove unused file
svn path=/trunk/; revision=35370
2008-08-16 09:29:12 +00:00
Hervé Poussineau
67cefa90ad Replace .def file by a .spec file
svn path=/trunk/; revision=35369
2008-08-16 09:25:46 +00:00
Aleksey Bragin
fb67b668d9 - Move x86-specific code, which was accidentally committed to the generic part of crt library to arch specific area.
- Include x86-specific _CI* functions into libcntpr.

svn path=/trunk/; revision=35368
2008-08-16 08:15:49 +00:00
Daniel Reimer
fae32f4a71 Update ReactOS Calc to Version 1.10.
svn path=/trunk/; revision=35367
2008-08-16 08:08:55 +00:00
ReactOS Portable Systems Group
1a6f168245 Implement InterlockedComparePte and InterlockedCompareExchangePte to:
1) Avoid all the casting currently being done
	2) Allow portability with other platforms so that the code can be potentially shared later.


svn path=/trunk/; revision=35364
2008-08-16 01:58:59 +00:00
Cameron Gutman
19d28c4deb - Raise the maximum IRQL that this routine is callable to APC_LEVEL
svn path=/branches/aicom-network-fixes/; revision=35363
2008-08-16 00:28:33 +00:00
Cameron Gutman
6696dcbc45 - Fix a memory leak that occurs when AfdSetContext is called with a buffer that is too small
- Properly return STATUS_BUFFER_TOO_SMALL when the buffer passed is too small

svn path=/branches/aicom-network-fixes/; revision=35358
2008-08-15 18:26:52 +00:00
Aleksey Bragin
08c7fe628b Gregor Schneider <grschneider@gmail.com>
- Floating point values are not passed directly, but using the stack. Ref: Wine code and
http://en.wikibooks.org/wiki/Reverse_Engineering/Floating_Point_Numbers
code.
- mem/i386/memchr_asm.s: don't loop if given size is 0.
- Python test_builtin passes all 50 tests now.
See issue #1255 for more details.

svn path=/trunk/; revision=35357
2008-08-15 18:24:11 +00:00
Cameron Gutman
3f603adf26 - Fix a typo resulting in any call to AfdGetSockOrPeerName with Local set to FALSE to return STATUS_NO_MEMORY
svn path=/branches/aicom-network-fixes/; revision=35356
2008-08-15 18:14:55 +00:00
Hervé Poussineau
8f90e11e73 Fix typo which was preventing compilation on *nix
svn path=/trunk/; revision=35355
2008-08-15 16:09:17 +00:00
ReactOS Portable Systems Group
7b55de3a28 Don't build with -s, this strips vital information from the output. Use --strip-debug instead, which gets rid of the DWARF debugging information,
but keeps the file and symbols sane, so objdump can still be used on the output.


svn path=/trunk/; revision=35354
2008-08-15 15:02:40 +00:00
Sylvain Petreolle
809f843f36 Update french translation for servman and shell32
Patches by Amine Khaldi and me

svn path=/trunk/; revision=35353
2008-08-15 14:24:24 +00:00
Aleksey Bragin
234e50df0d - Fix MiSyncThreadProcessViews. Should fix bug 3658. Based on Stefan Ginsberg's patch.
See issue #3658 for more details.

svn path=/trunk/; revision=35352
2008-08-15 12:17:08 +00:00
Dmitry Chapyshev
5b1adcd907 - Add icons for Folder Options (not work yet)
svn path=/trunk/; revision=35350
2008-08-15 10:03:19 +00:00
Timo Kreuzer
e9f18efcfc PE symbol dumper. It's not finished, functions don't work and the type output doesn't always look 100% correct. But it does it's job. You need dbghelp.dll and symsrv.dll from windbg.
svn path=/trunk/; revision=35346
2008-08-14 21:35:52 +00:00
Stefan Ginsberg
39775880e5 - Header cleanup
- Rename ObInit to ObInitSystem
- Add missing KPCR_PRCB_PRCB_LOCK offset to the NDK

svn path=/trunk/; revision=35345
2008-08-14 19:30:32 +00:00
Dmitry Chapyshev
1e1fc03ade - Update Russian translation
svn path=/trunk/; revision=35344
2008-08-14 17:57:50 +00:00
Cameron Gutman
76f11722e8 - Fix a possible crash
- Fix 2 memory leaks

svn path=/branches/aicom-network-fixes/; revision=35343
2008-08-14 17:13:11 +00:00
Stefan Ginsberg
9f65ee2cec - Fix MiSyncThreadProcessViews to hack-sync the next thread's ETHREAD too (spotted by Alex)
svn path=/trunk/; revision=35342
2008-08-14 16:43:52 +00:00
Sylvain Petreolle
c335a12872 update french translations :
solitaire, msconfig, desk.cpl, win32csr
patches by Amine Khaldi (amine48rz)

svn path=/trunk/; revision=35341
2008-08-14 16:17:22 +00:00
Cameron Gutman
5cf6890ee7 - Always set Irp->IoStatus.Status
- Clear the cancel routine only when completing

svn path=/branches/aicom-network-fixes/; revision=35340
2008-08-14 15:14:32 +00:00
Johannes Anderwald
467ea81557 * Store the paths of ntbackup and defrag.msc in the registry
svn path=/trunk/; revision=35339
2008-08-14 15:03:37 +00:00
Sylvain Petreolle
07ca2d26fc update more utility french translation
Amine Khaldi (amine48rz)

svn path=/trunk/; revision=35338
2008-08-14 14:52:35 +00:00
Johannes Anderwald
11a3ecefa4 * Implement drive checking dialog with fmifs library
svn path=/trunk/; revision=35337
2008-08-14 14:47:31 +00:00
Sylvain Petreolle
5a07d4bce3 update eventvwrv french translation
patch by Amine Khaldi (amine48rz)

svn path=/trunk/; revision=35336
2008-08-14 14:45:58 +00:00
Sylvain Petreolle
ba54fa17fe update devmgmt french translation
svn path=/trunk/; revision=35335
2008-08-14 14:36:35 +00:00
Stefan Ginsberg
ed3f476473 - Rework MiSyncThreadProcessViews
- Perform the Mm hack-sync in KiIdleLoop before switching context (thanks to Aleksey for writing this!)

svn path=/trunk/; revision=35333
2008-08-14 12:42:57 +00:00
Daniel Reimer
0a4815bc46 Reapply the translations except the Japanese one. Thx to Olaf Siejka for finding the guilty one.
svn path=/trunk/; revision=35332
2008-08-14 11:58:11 +00:00
Johannes Anderwald
117369c011 * Implement Chkdsk dialog resources
svn path=/trunk/; revision=35331
2008-08-14 10:33:20 +00:00
Andrew Munger
85e9dd424d Update the Fonts folder path.
svn path=/trunk/; revision=35330
2008-08-14 09:29:49 +00:00
Andrew Munger
f8857961fd Update the font installbase, this "fixes" the livecd. Tested bootcd, livecd, and make install.
svn path=/trunk/; revision=35329
2008-08-14 09:28:06 +00:00
Johannes Anderwald
7b82780771 * Fix the build :)
svn path=/trunk/; revision=35328
2008-08-14 08:52:34 +00:00
Johannes Anderwald
19897c21e2 * Implement administrative tools shell folder
svn path=/trunk/; revision=35327
2008-08-14 08:41:59 +00:00
Johannes Anderwald
33938183af * Fix multiple bugs in SHFormatDrive dialog
* It now correcly calls FormatEx but the fmifs.dll is not yet in usable shape :(

svn path=/trunk/; revision=35321
2008-08-13 22:56:02 +00:00
Cameron Gutman
e8c5f099c5 - Handle STATUS_BUFFER_TOO_SMALL
- Handle STATUS_NO_MEMORY

svn path=/branches/aicom-network-fixes/; revision=35320
2008-08-13 22:33:48 +00:00
Johannes Anderwald
0ae6a9811c * Implement SHFormatDrive using fmifs api (format drive dialog in explorer)
svn path=/trunk/; revision=35319
2008-08-13 21:29:29 +00:00
Art Yerkes
5f696de7d6 Revert unintended change.
svn path=/trunk/; revision=35318
2008-08-13 20:51:35 +00:00
Art Yerkes
76ff523af5 Merge aicom-network-fixes up to 35306.
svn path=/trunk/; revision=35317
2008-08-13 20:44:20 +00:00
Daniel Reimer
feccdafeb8 Revert part of my last commit. I will investigate in it when I had some sleep
svn path=/trunk/; revision=35316
2008-08-13 20:41:10 +00:00
Stefan Ginsberg
6c373a935c - Remove INIT_FUNCTION from exported functions
svn path=/trunk/; revision=35315
2008-08-13 20:30:22 +00:00
Stefan Ginsberg
cd6ac84cfe - Apply the same Mm sync hacks in NtYieldExecution as is done in KiSwapThread
svn path=/trunk/; revision=35314
2008-08-13 20:12:24 +00:00
Daniel Reimer
1a5e7629d5 ... YES... NEVER COMMIT when you are awake WAAAY too long.
svn path=/trunk/; revision=35313
2008-08-13 20:12:04 +00:00
Daniel Reimer
7f262f6c06 Bug 3649: Slovak update by Mario Kacmar
Bug 3631: Norwegian Update by Lars Martin Hambro

svn path=/trunk/; revision=35312
2008-08-13 18:48:51 +00:00
Daniel Reimer
d7c849722a Polish Shell32 Update by Olaf Siejka
Bug 3655: IDS_PROPERTIES Translation by Victor Martinez Calvo
Bug 3642: Italian resource file update by Paolo Devoti
Bug 3651: msconfig french translation (base/applications/msconfig)
Bug 3652: French translation for Access.cpl (dll/cpl/access)
Bug 3653: translation of regsvr32/Fr.rc (base/system/regsvr32/)

svn path=/trunk/; revision=35311
2008-08-13 18:25:01 +00:00
Stefan Ginsberg
e82f1c91a7 - Fix MiSyncThreadProcessViews in KeInitThread too as requested by Alex
svn path=/trunk/; revision=35310
2008-08-13 18:00:23 +00:00
Stefan Ginsberg
bfd08e980b - Remove KiRawTicks -- this was previously a ros-specific kernel export, but is now unused
- Fix a comment typo

svn path=/trunk/; revision=35309
2008-08-13 17:24:22 +00:00
Stefan Ginsberg
6c420630c9 - "Sync" to the next thread's initial stack in KiSwapThread. This fixes an invalid page fault (faulting while interrupts are disabled) during context switching, where we access the next thread's initial stack before performing the address space switch. Many thanks to Alex for his help with this bug!
- Fix stack size calculations in KeAttachProcess and KeStackAttachProcess (thanks to Alex for pointing this out)

svn path=/trunk/; revision=35308
2008-08-13 17:00:49 +00:00
Jeffrey Morlan
d36e61f36c cmd_start:
- Allow space between /D and directory.
- Allow /W as a synonym for /WAIT.
- Give an error message on invalid switches.
- Clean up the function a bit.

svn path=/trunk/; revision=35307
2008-08-13 15:17:51 +00:00
Cameron Gutman
e5e4035c8d - Set Buf to NULL so we don't try to free it again later
svn path=/branches/aicom-network-fixes/; revision=35306
2008-08-13 14:53:22 +00:00
Stefan Ginsberg
985409eda4 - Fix a (comment) typo
svn path=/trunk/; revision=35305
2008-08-13 14:30:35 +00:00
Aleksey Bragin
57debf9c5c - Replace crt's lnx_sprintf implementation with the one from lib/rtl (46kb of useless code substituted by 14kb of code, works the same).
svn path=/trunk/; revision=35304
2008-08-13 11:47:34 +00:00
Stefan Ginsberg
86d20a647b - Code cleanup
svn path=/trunk/; revision=35303
2008-08-13 09:07:34 +00:00
Stefan Ginsberg
8091f31182 - Fix a broken check in PspExitThread. We should check if Stack Swapping is _disabled_ during termination, not crash if it is enabled!
- Fix KeInitThread to respect this, and initialize EnableStackSwap to TRUE. Otherwise, only executive worker threads who modify the stack swap flag themselves encounter this issue.
- This, along with my previous change, fixes worker thread termination being completely broken and crashing ros.
- Thanks to Aleksey for confirming my changes

svn path=/trunk/; revision=35302
2008-08-13 09:00:50 +00:00
Johannes Anderwald
7d75e41b42 - implement deleting file using recyclebin api
- play a sound on when requested using the user default for emptying recycle bin
- rename shlfldr_mydocuments.c

svn path=/trunk/; revision=35301
2008-08-13 08:45:20 +00:00
Stefan Ginsberg
17beba5f93 - Fix a (comment) typo
svn path=/trunk/; revision=35300
2008-08-13 08:02:52 +00:00
Stefan Ginsberg
f93e329c60 - Reapply the PsTerminateSystemThread typo fix. We do boot fine with this fix.
- Note to self: Don't commit after midnight and always test your patches yourself

svn path=/trunk/; revision=35299
2008-08-13 07:55:59 +00:00
Cameron Gutman
4afbde3127 - Revert r35279 due to some odd problems with UnlockBuffers when completing
svn path=/branches/aicom-network-fixes/; revision=35298
2008-08-13 04:40:39 +00:00
Cameron Gutman
e07f679c75 - Don't crash if we are already freed
- Some code frees the buffers right after an operation fails which is fine

svn path=/branches/aicom-network-fixes/; revision=35297
2008-08-13 02:55:05 +00:00
Cameron Gutman
90f6b947b8 - Move memory freeing to ListenComplete
svn path=/branches/aicom-network-fixes/; revision=35296
2008-08-13 00:19:34 +00:00
Jeffrey Morlan
ab8e76985a - Moved ExpandAlias call from ParseCommandLine to ReadCommand; aliases should only be processed when reading from the console. Removed processing of %variable% substitutions in ExpandAlias - not necessary now that aliases are expanded earlier.
- Rewrite %variable% substitution code, should be much more compatible with Windows cmd now.

svn path=/trunk/; revision=35295
2008-08-12 23:46:15 +00:00
Stefan Ginsberg
bd974a9e1c - Temporarily revert my last change. We don't set the SystemThread flag appropriately and it is always zero
svn path=/trunk/; revision=35294
2008-08-12 22:22:51 +00:00
Stefan Ginsberg
2517d40711 - Fix a typo in PsTerminateSystemThread. Now this API will actually terminate system threads.
svn path=/trunk/; revision=35293
2008-08-12 21:40:06 +00:00
Cameron Gutman
70fd5e3314 - Check for FCB->TdiDeviceName.Buffer before attempting to access it
- Fix 2 more memory leaks

svn path=/branches/aicom-network-fixes/; revision=35292
2008-08-12 20:03:53 +00:00
Cameron Gutman
8f5e892fbf - Free the MDL on failure
- Use _SEH_YIELD

svn path=/branches/aicom-network-fixes/; revision=35291
2008-08-12 18:34:07 +00:00
Cameron Gutman
b50e9e3146 - Make sure both FCB->Recv.Window and FCB->Send.Window were created before returning STATUS_SUCCESS
- Make sure MakeSocketIntoConnection() completed successfully
 - Make sure WarmSocketForConnection() completed successfully
 - Don't continue if TdiBuildNullConnectionInfoInPlace() fails
 - SEHify TdiBuildConnectionInfoInPlace()
 - Make sure we have a non-NULL TargetAddress before calling TdiSendDatagram()

svn path=/branches/aicom-network-fixes/; revision=35290
2008-08-12 18:18:03 +00:00
Cameron Gutman
5d9c71ed13 - Fix another memory leak
svn path=/branches/aicom-network-fixes/; revision=35289
2008-08-12 15:27:15 +00:00
Colin Finck
ae4dc93917 Attempt to fix release build (broken in r35285)
svn path=/trunk/; revision=35288
2008-08-12 14:48:51 +00:00
Aleksey Bragin
2c26076f3c - Change while (true) to an ASSERT(FALSE).
See issue #3616 for more details.

svn path=/trunk/; revision=35286
2008-08-12 08:46:31 +00:00
Aleksey Bragin
e03a9212c0 Giannis Adamopoulos <johnyadams@hotmail.com>
- Removes duplicated implementation of FrLdrLoadKernel, LoadDriver and LoadNlsFile from setupldr.c, use FrLdrLoadImage, FrLdrLoadNlsFile and FrLdrLoadDriver from reactos.c.
- Also remove the call to RegInitializeRegistry as setupldr doesn't need the registry.
- Make setupldr load the fastfat and ext2 drivers via txtsetup.sif, instead of hardcoding them in setupldr.c

svn path=/trunk/; revision=35285
2008-08-12 08:38:54 +00:00
Art Yerkes
2afb238075 Harden 'proc list'
svn path=/trunk/; revision=35284
2008-08-12 06:59:37 +00:00
Cameron Gutman
f0d01cf5aa - Don't forget to call UnlockBuffers()
- Use Irp->IoStatus.Information instead of RecvReq->BufferArray[0].len

svn path=/branches/aicom-network-fixes/; revision=35283
2008-08-12 03:20:52 +00:00
Cameron Gutman
bfa1b80f5f - Don't continue if locking failed
svn path=/branches/aicom-network-fixes/; revision=35282
2008-08-11 22:44:24 +00:00
Hervé Poussineau
6cf2b6c90d Expand recyclebin API with DeleteFileHandleToRecycleBin and GetRecycleBinDetails
svn path=/trunk/; revision=35280
2008-08-11 17:31:51 +00:00
Cameron Gutman
ce24947336 - Only call LockBuffers() if we must
svn path=/branches/aicom-network-fixes/; revision=35279
2008-08-11 15:32:45 +00:00
Johannes Anderwald
fe3033e3ea - add flags for SHEmptyRecycleBin
svn path=/trunk/; revision=35278
2008-08-11 14:57:00 +00:00
Johannes Anderwald
c39ab30541 - rename recyclebin
svn path=/trunk/; revision=35277
2008-08-11 14:52:22 +00:00
Johannes Anderwald
40040950f1 Copied remotely
svn path=/trunk/; revision=35275
2008-08-11 14:49:32 +00:00
Cameron Gutman
4873208286 - Set the MDL we just freed to NULL so we don't try to free it again later
svn path=/branches/aicom-network-fixes/; revision=35274
2008-08-11 14:38:17 +00:00
Johannes Anderwald
fe7a26fb3f * implement restoring of a deleted file
* use volume labels for storing bitbucket information
* store a context for each drive
* apply changes for each available drive

svn path=/trunk/; revision=35270
2008-08-11 09:51:35 +00:00
Aleksey Bragin
87e74cda21 - NDK Fix: DirectoryTableBase member of KPROCESS is ULONG[2] and not LARGE_INTEGER since Windows 2000 ("Inside Windows 2000", Chapter 6), and till Windows 2003.
svn path=/trunk/; revision=35269
2008-08-11 08:40:52 +00:00
Art Yerkes
30b9ab966f Merge aicom-network-fixes up to 35260
svn path=/trunk/; revision=35267
2008-08-11 00:02:26 +00:00
Aleksey Bragin
a4bc397498 - .def -> .spec
svn path=/trunk/; revision=35266
2008-08-10 18:06:21 +00:00
Aleksey Bragin
044c66916e - Fix dxtn build.
svn path=/trunk/; revision=35265
2008-08-10 16:25:26 +00:00
Ged Murphy
197cc3f634 Give Techbot the ability to check for and ghost existing bots, then rename itself
svn path=/trunk/; revision=35264
2008-08-10 13:06:58 +00:00
Hervé Poussineau
b2a074adbf Limit use of -enable-stdcall-fixup to mesa32, msvcrt and riched20 modules
svn path=/trunk/; revision=35263
2008-08-10 11:42:31 +00:00
Hervé Poussineau
0cf60adb98 On newer versions, vDbgPrintEx and vDbgPrintExWithPrefix are stdcall, not cdecl
svn path=/trunk/; revision=35262
2008-08-10 11:33:33 +00:00
Hervé Poussineau
f7de51f699 Use a .spec file for ntoskrnl.
Keep specific .def for ARM, as long as it has not been tested

svn path=/trunk/; revision=35261
2008-08-10 11:23:16 +00:00
Cameron Gutman
d6823d52cf - Move check for NULL FCB before trying to access it
- Should fix a random crash I got when testing my web server

svn path=/branches/aicom-network-fixes/; revision=35260
2008-08-10 11:23:05 +00:00
Hervé Poussineau
889aabd999 Fix exports
svn path=/trunk/; revision=35258
2008-08-10 09:48:25 +00:00
Hervé Poussineau
041e42b57d I was wrong, because KeUpdateSystemTime prototype is not the same on all platforms
svn path=/trunk/; revision=35256
2008-08-10 09:02:49 +00:00
Hervé Poussineau
d28b074156 Remove stdcall decorations to fix build.
Real fix should be available soon.

svn path=/trunk/; revision=35253
2008-08-10 06:50:29 +00:00
Hervé Poussineau
876fa09ee5 Try to fix some symbol names
svn path=/trunk/; revision=35252
2008-08-10 05:47:20 +00:00
Cameron Gutman
55ca1bda96 - Uncomment TdiQueryAddress and get it to compile
svn path=/branches/aicom-network-fixes/; revision=35251
2008-08-09 23:44:44 +00:00
Cameron Gutman
98c4b74c0d - Uncomment TdiQueryInformationEx and make it compile
svn path=/branches/aicom-network-fixes/; revision=35250
2008-08-09 23:25:46 +00:00
Timo Kreuzer
8eb52874be - add more accelerator flags for xform objects
- add MATRIX structure using FLOATOBJ instead of EFLOAT_S (which is a x86 specific structure)

svn path=/trunk/; revision=35249
2008-08-09 22:42:35 +00:00
Jeffrey Morlan
809dd4cd3c - Fix the way the start command parses its arguments. Previously, the arguments were split up using split() and then the parts intended for the program were recombined, but this is wrong because it cannot preserve quotes. Changed cmd_start to do tokenization itself instead.
- Implement "title", /Ddirectory, /MIN, /MAX, and /WAIT options.
- Remove 'first' variable which only ever contained the name of "start" itself - all the places where it was used appear to be mistakes; replaced with 'rest'.
- Fix crash that happened when attempting to start a file with no extension.

svn path=/trunk/; revision=35248
2008-08-09 21:51:34 +00:00
Hervé Poussineau
f763594308 Fix prototype
svn path=/trunk/; revision=35247
2008-08-09 20:14:29 +00:00
Cameron Gutman
1364b76b4d - Fix another memory leak
svn path=/branches/aicom-network-fixes/; revision=35246
2008-08-09 19:03:37 +00:00
Aleksey Bragin
8f4d636360 - MmAdjustWorkingSetSize has 4 parameters, not 3.
svn path=/trunk/; revision=35243
2008-08-09 17:55:35 +00:00
Ged Murphy
bca74ffa16 - Don't use LoadIcon, it's broken as it incorrectly calls LoadImage
- This fixes the ugly treeview icons
 - *note, cursor/icon loading code needs revising

svn path=/trunk/; revision=35242
2008-08-09 16:40:43 +00:00
Dmitry Chapyshev
2ca0e5562e - Update Russian translation
svn path=/trunk/; revision=35241
2008-08-09 16:16:49 +00:00
Hervé Poussineau
aeedb31a0f Add module linker flags after project flags, so project ones can be overridden
svn path=/trunk/; revision=35240
2008-08-09 16:01:20 +00:00
Dmitry Chapyshev
1f86650758 - Fix typo
svn path=/trunk/; revision=35239
2008-08-09 15:59:08 +00:00
Dmitry Chapyshev
2b53cd4661 - Update Russian translation
svn path=/trunk/; revision=35238
2008-08-09 15:56:18 +00:00
Dmitry Chapyshev
addd8647a6 - Update Russian translation
svn path=/trunk/; revision=35236
2008-08-09 15:18:20 +00:00
Hervé Poussineau
85355cf4c8 Add missing APIENTRY
svn path=/trunk/; revision=35235
2008-08-09 14:47:13 +00:00
Hervé Poussineau
3423abf125 Add missing APIENTRY
svn path=/trunk/; revision=35234
2008-08-09 14:24:51 +00:00
Hervé Poussineau
8648e50340 Replace .def file by a .spec file
svn path=/trunk/; revision=35233
2008-08-09 14:19:48 +00:00
Hervé Poussineau
1b69810a3b Replace .def file by a .spec file
svn path=/trunk/; revision=35232
2008-08-09 14:10:04 +00:00
Hervé Poussineau
9a953b4c78 Fix vDbgPrintExWithPrefix export
svn path=/trunk/; revision=35230
2008-08-09 13:56:45 +00:00
Hervé Poussineau
9b782f79ec Replace .def file by a .spec file
svn path=/trunk/; revision=35227
2008-08-09 13:10:39 +00:00
Hervé Poussineau
a4ca6c1704 Replace .def file by a .spec file
svn path=/trunk/; revision=35225
2008-08-09 13:07:18 +00:00
Hervé Poussineau
4f84f4dabf Replace .def file by a .spec file
svn path=/trunk/; revision=35221
2008-08-09 11:12:15 +00:00
Hervé Poussineau
1a3e978ddd Replace .def file by a .spec file
svn path=/trunk/; revision=35220
2008-08-09 09:42:43 +00:00
Hervé Poussineau
3744b87979 Fix build
svn path=/trunk/; revision=35219
2008-08-09 09:26:00 +00:00
Hervé Poussineau
a5f5b8583f Replace .def file by a .spec file
svn path=/trunk/; revision=35218
2008-08-09 09:25:21 +00:00
Hervé Poussineau
a19e408738 Replace .def file by a .spec file
svn path=/trunk/; revision=35217
2008-08-09 09:06:04 +00:00
Dmitry Chapyshev
eaab13c551 - Update & fix Russian translation
svn path=/trunk/; revision=35216
2008-08-09 08:36:34 +00:00
Hervé Poussineau
e8502792bb Replace .def file by a .spec file
svn path=/trunk/; revision=35215
2008-08-09 08:35:36 +00:00
Hervé Poussineau
2a95f43a4e Fix User32InitializeImmEntryTable export
svn path=/trunk/; revision=35214
2008-08-09 08:29:31 +00:00
Hervé Poussineau
55953529e3 Replace .def file by a .spec file
svn path=/trunk/; revision=35213
2008-08-09 08:26:56 +00:00
Dmitry Chapyshev
506a86fe51 - Update Russian translation
svn path=/trunk/; revision=35212
2008-08-09 08:23:45 +00:00
Hervé Poussineau
0f760a46fd Define exported functions as WINAPI
svn path=/trunk/; revision=35211
2008-08-09 08:20:58 +00:00
Hervé Poussineau
b978aa5399 Replace .def file by a .spec file
svn path=/trunk/; revision=35210
2008-08-09 08:18:55 +00:00
Hervé Poussineau
389c99370d Replace .def file by a .spec file
svn path=/trunk/; revision=35209
2008-08-09 08:09:40 +00:00
Hervé Poussineau
ce5c619db0 Fix exports
svn path=/trunk/; revision=35208
2008-08-09 07:57:02 +00:00
Hervé Poussineau
765c4f1ae6 Replace .def file by a .spec file
svn path=/trunk/; revision=35207
2008-08-09 07:56:27 +00:00
Hervé Poussineau
e784b26eb0 Replace .def file by a .spec file
svn path=/trunk/; revision=35206
2008-08-09 07:55:45 +00:00
Hervé Poussineau
4a9c4de4f4 Replace .def file by a .spec file
svn path=/trunk/; revision=35205
2008-08-09 07:01:23 +00:00
Johannes Anderwald
782a7d5ea7 - add 2 resource strings
- rewrite recyclebin item handling
- partly implement recycle bin item context menu
- rewrite Trash_CanTrashFile to support volume serial numbers
- recycle bin shows now correct deleted file details for files

svn path=/trunk/; revision=35204
2008-08-09 01:48:18 +00:00
Johannes Anderwald
bab735cf05 * add registry key for bitbucket shell folder
svn path=/trunk/; revision=35203
2008-08-08 22:31:15 +00:00
Johannes Anderwald
c817f603ac - add a baseaddress for SXS (based on Vista SP1)
svn path=/trunk/; revision=35202
2008-08-08 22:28:16 +00:00
Johannes Anderwald
66105f44ec * register printer shell folder
* move printer column descriptors to resource files
* fix enumeration of printers


svn path=/trunk/; revision=35201
2008-08-08 21:50:24 +00:00
Johannes Anderwald
a6c16c0cd1 * add missing return
* implement context menu handling of font items for font shell folder

svn path=/trunk/; revision=35200
2008-08-08 20:26:52 +00:00
Dmitry Chapyshev
6ee6160ac0 - Update Russian translation
svn path=/trunk/; revision=35199
2008-08-08 19:59:41 +00:00
Johannes Anderwald
316da61ad2 sorry, fix build
svn path=/trunk/; revision=35198
2008-08-08 19:51:29 +00:00
Johannes Anderwald
e107b6f77d - add 3 resource strings
svn path=/trunk/; revision=35197
2008-08-08 19:48:38 +00:00
Aleksey Bragin
b339d8f7b8 - Leftover from the winesync.
svn path=/trunk/; revision=35196
2008-08-08 19:23:07 +00:00
Aleksey Bragin
04f79ee653 - Fix a typo.
- Stubplement one missing function.
- SVN maintenance.

svn path=/trunk/; revision=35195
2008-08-08 19:20:26 +00:00
Johannes Anderwald
eb7b80a949 * fully implement enumeration of details for virtual font shell folder
svn path=/trunk/; revision=35194
2008-08-08 19:15:27 +00:00
Stefan Ginsberg
0ceea1dacb - Fix a typo
svn path=/trunk/; revision=35193
2008-08-08 19:08:27 +00:00
Art Yerkes
c04d88d406 Merge aicom-network-fixes up to 35189
svn path=/trunk/; revision=35192
2008-08-08 18:38:16 +00:00
Johannes Anderwald
11c23fa25f - implement enumerating of font items
svn path=/trunk/; revision=35191
2008-08-08 18:34:51 +00:00
Cameron Gutman
9ff6170e6f - Remove ASSERTs and return STATUS_INVALID_PARAMETER
- Should fix Christoph's problem with ROS crashing when closing emule

svn path=/branches/aicom-network-fixes/; revision=35189
2008-08-08 17:50:00 +00:00
Cameron Gutman
6c645ac736 - Add some ASSERTs
svn path=/branches/aicom-network-fixes/; revision=35188
2008-08-08 16:56:51 +00:00
Jeffrey Morlan
b75ff606ba - Fix cmd's SearchForExecutable: it was inside out, giving extension priority over directory.
- Remove code that checked if the file's extension was in PATHEXT. Windows does not check, and it's very handy to be able to "run" non-executable files.
- Allow explicit paths with no backslash (like "A:file")
- Batch: use GetFullPathName to get the batch file's absolute path; this way %~dp0 will always give the right directory even in the weird case of running the .bat via a relative path in PATH. Remove code in SearchForExecutable which tried to make sure it returned an absolute path (but it didn't in that case).

svn path=/trunk/; revision=35187
2008-08-08 16:48:21 +00:00
Cameron Gutman
9e8d40a05b - Remove duplicate code
svn path=/branches/aicom-network-fixes/; revision=35186
2008-08-08 16:17:06 +00:00
Johannes Anderwald
fbb7095a67 - store all loaded global fonts under HKLM\Software\Microsoft\Windows NT\CurrentVersion\Fonts
svn path=/trunk/; revision=35184
2008-08-08 14:43:43 +00:00
Dmitry Chapyshev
acbdcaaf87 - Add sxs.dll from Wine
svn path=/trunk/; revision=35183
2008-08-08 14:32:35 +00:00
Johannes Anderwald
f300e6b609 - add a key to list installed sys fonts
svn path=/trunk/; revision=35182
2008-08-08 14:06:28 +00:00
Johannes Anderwald
1ec7752182 - fix typo
svn path=/trunk/; revision=35181
2008-08-08 13:33:50 +00:00
Aleksey Bragin
18dcfea9ac - Plugin the filesystem checker into vfatlib, however leave its invocation #if0-ed out until all problems are solved.
svn path=/trunk/; revision=35180
2008-08-08 09:53:13 +00:00
Aleksey Bragin
7f639dac8f - Fix tamlin's early dosfsck porting attempt (create a temporary buffer for reading 512 bytes, call reading function which creates another buffer for reading 512 bytes, reads data, copies 512 bytes to 512 byte buffer, then the caller copies sizeof(DIR_ENT) out of the last 512 bytes buffer - looks a bit redundant).
svn path=/trunk/; revision=35179
2008-08-08 09:34:23 +00:00
Aleksey Bragin
ecc6480fe5 - Remove atari fs support.
- Rename global variables to more meaningful names.
- Add fs_isdirty function to determine is a filesystem is marked as dirty.

svn path=/trunk/; revision=35178
2008-08-08 09:13:21 +00:00
Aleksey Bragin
a52cb631cc - Revert NDEBUG in autochk.
svn path=/trunk/; revision=35177
2008-08-08 08:37:20 +00:00
Thomas Bluemel
bec4b5d170 Very basic (and incomplete) implementation of SHCreateDesktop and SHDesktopMessageLoop to implement the Progman window class for the shell. This patch has not been submitted to WINE.
svn path=/trunk/; revision=35176
2008-08-08 01:38:18 +00:00
Timo Kreuzer
121717a593 Implement FLOATOBJ api in assembly. ~~ On x86 (and only there) we must not use the FPU in kernel mode code, because the fpu state is not safed on normal context switches. That's why there's the FLOATOBJ api. It provides the needed fp emulation for win32k and drivers. I wrote it in asm to be fast. It's not yet plugged in.
svn path=/trunk/; revision=35175
2008-08-07 22:41:36 +00:00
Hervé Poussineau
c3821ec8a5 Replace .def file by a .spec file
svn path=/trunk/; revision=35174
2008-08-07 20:47:54 +00:00
Hervé Poussineau
ee1c8b302f Replace .def file by a .spec file
svn path=/trunk/; revision=35173
2008-08-07 20:43:05 +00:00
Hervé Poussineau
2f93772b83 Replace .def file by a .spec file
svn path=/trunk/; revision=35172
2008-08-07 20:38:54 +00:00
Hervé Poussineau
7190d810e8 Replace .def file by a .spec file
svn path=/trunk/; revision=35171
2008-08-07 20:34:19 +00:00
Hervé Poussineau
3fad64777e Replace .def file by a .spec file
svn path=/trunk/; revision=35170
2008-08-07 20:28:13 +00:00
Hervé Poussineau
f648258292 Replace .def file by a .spec file
svn path=/trunk/; revision=35169
2008-08-07 20:21:23 +00:00
Matthias Kupfer
3aba92f351 fix several Russian translations
svn path=/trunk/; revision=35168
2008-08-07 18:18:53 +00:00
Matthias Kupfer
0d8c556ef9 - fixed russian translation
- remove untranslated strings

svn path=/trunk/; revision=35166
2008-08-07 17:46:08 +00:00
Matthias Kupfer
73afc8f523 Mario Kacmar <kario AT szm DOT sk>
- Several translations for acpi.inf.

svn path=/trunk/; revision=35165
2008-08-07 16:54:33 +00:00
Jeffrey Morlan
0d3d7a03f7 When reverting a window's system menu, delete the old one recursively.
svn path=/trunk/; revision=35164
2008-08-07 16:45:00 +00:00
Jeffrey Morlan
5a1ef6a0a8 On attempts to write to a read-only section view, return STATUS_ACCESS_VIOLATION, not STATUS_UNSUCCESSFUL. kernel32's UnhandledExceptionFilter depends on this for its automatic .rsrc deprotection. (Bug 3062)
svn path=/trunk/; revision=35163
2008-08-07 16:08:00 +00:00
Matthias Kupfer
359151f57a install all fonts in SystemRoot/Fonts instead of SystemRoot/media/fonts
svn path=/trunk/; revision=35162
2008-08-07 15:59:52 +00:00
Matthias Kupfer
a958e37965 - fix acpi.inf and convert to utf-16
- convert utf-16 files back to windows line endings (sorry, mistake of my merge tool)

svn path=/trunk/; revision=35161
2008-08-07 15:51:36 +00:00
Daniel Reimer
37fb2794f0 Sync Winhlp32 and Wordpad to Wine HEAD (Still the same problems with wordpad....)
svn path=/trunk/; revision=35159
2008-08-07 10:53:23 +00:00
Pierre Schweitzer
fb10f6e7ea Updated French translation for regedit.exe
svn path=/trunk/; revision=35158
2008-08-07 09:11:14 +00:00
Johannes Anderwald
4ec67d948c * implement retrieving column names for nethood & font shell folder
* make column names mui aware

svn path=/trunk/; revision=35157
2008-08-07 08:55:34 +00:00
Art Yerkes
7fa9c85299 Merge aicom-network-fixes up to 35155
svn path=/trunk/; revision=35156
2008-08-07 06:04:49 +00:00
Cameron Gutman
ede9f79604 - Revert my lib changes until I figure out some problems with them
svn path=/branches/aicom-network-fixes/; revision=35155
2008-08-07 02:40:45 +00:00
Johannes Anderwald
d1884b0cf8 - enable registration of fonts shell folder
svn path=/trunk/; revision=35154
2008-08-07 01:24:33 +00:00
Johannes Anderwald
31fcd8ee63 * halfplement fonts shell folder
* fix registration of nethood shell folder and printer shell folder
- displaying is if'd out currently

svn path=/trunk/; revision=35153
2008-08-07 01:02:34 +00:00
Cameron Gutman
5345dbe2ae - Don't check Status so we don't quit looping after the first unsuccessful IRP
svn path=/branches/aicom-network-fixes/; revision=35152
2008-08-06 22:19:53 +00:00
Johannes Anderwald
403be95f65 - add CLSID_FontsFolderShortcut for fonts shell folder
svn path=/trunk/; revision=35151
2008-08-06 21:11:14 +00:00
Johannes Anderwald
5d93751807 * Enable/Disable finish button based on the right edit control
* fixes bug 3625

svn path=/trunk/; revision=35150
2008-08-06 18:18:43 +00:00
Johannes Anderwald
91f8d86ffc * OpenWith dialog must have WS_POPUP style in order to show up properly
- fixes bug 3635

svn path=/trunk/; revision=35149
2008-08-06 17:48:04 +00:00
Jeffrey Morlan
a804e14f3c - GetUserNameW: Re-set an_len to the actual buffer size before second LookupAccountSidW call; set *lpSize correctly; fix leakage of hToken in failure cases.
- GetUserNameA: Don't include nul terminator when calculating NameW.Length. Remove redundant nul termination of NameA (RtlUnicodeStringToAnsiString already does it)

svn path=/trunk/; revision=35147
2008-08-06 15:41:09 +00:00
Aleksey Bragin
a75b654567 - Replace stupid concept of using a set of global variables for various boolean flags (1 variable per 1 flag) by a concept of one global var having a specified set of flags (FSCHECK_VERBOSE, etc).
svn path=/trunk/; revision=35146
2008-08-06 13:07:28 +00:00
Steven Edwards
516e0bb394 added library section
msxml3, mfc40, runtimes: vc6, vc2005, vc2005sp1, 
vc2008runtime,vb3,vb4,vb5,vb6

Most don't work yet.


svn path=/trunk/; revision=35145
2008-08-06 12:48:36 +00:00
Aleksey Bragin
6735beea51 - Rename alloc/free to vfalloc/vffree to not conflict with other apps vfatlib links to.
svn path=/trunk/; revision=35144
2008-08-06 12:03:34 +00:00
Dmitry Chapyshev
77993cf0e3 - Sync RegGetValueA/W with wine head
svn path=/trunk/; revision=35143
2008-08-06 11:56:49 +00:00
Steven Edwards
2a31d8815d SetLastError to ERROR_CALL_NOT_IMPLEMENTED
Wine does it, its already a stub, it can only help...


svn path=/trunk/; revision=35142
2008-08-06 11:04:54 +00:00
Christoph von Wittich
90abd2fa2c null termninate strings in GetCharWidthsA, GetCharWidth32A, GetCharABCWidthsFloatA, GetCharABCWidthsA, GetCharABCWidthsFloatA
better error checking

svn path=/trunk/; revision=35141
2008-08-06 11:00:39 +00:00
Aleksey Bragin
a0ea339453 - Add more intrinsic defines.
- SVN maintenance.

svn path=/trunk/; revision=35140
2008-08-06 10:52:33 +00:00
Steven Edwards
74c43744f4 Match Wine behavior for AllowSetForegroundWindow
Only show the debug message once


svn path=/trunk/; revision=35139
2008-08-06 10:34:36 +00:00
James Tabor
762c1e58de Win32k Timers:
- This is relative to bugs 3634 and 2393. Please leave additional information in bug report 2393.
- Timer code should not be associated with message queues, since theses types of queues are subject to being destroyed. This creates a problem of loosing timers.
- This is a first part of a rewrite of the timers. Moving the timers from the message queue to a linked list very similar to our DCE code. This will simplify timer handling too.

svn path=/trunk/; revision=35138
2008-08-06 02:05:17 +00:00
Stefan Ginsberg
79590b9458 - Remove memcmp NTOS export added in rev 34611 as real NT does not export it.
svn path=/trunk/; revision=35134
2008-08-05 21:08:43 +00:00
Aleksey Bragin
81538de14a - Revert 35131 till a more complete fix is available.
svn path=/trunk/; revision=35132
2008-08-05 19:07:27 +00:00
Aleksey Bragin
b86b32b0c4 - Get rid of sprintf usage in default_dbg_vprintf.
- This make tracing macro usage safe in crt sprintf implementation and simplify overall codepath (no need for intermediate buffer).
- Solution inspired by hackbunny's suggestion, fixes bug 3632.
See issue #3632 for more details.

svn path=/trunk/; revision=35131
2008-08-05 18:00:46 +00:00
Matthias Kupfer
305fa7aff9 Short version of average16 added.
svn path=/trunk/; revision=35130
2008-08-05 16:40:24 +00:00
Cameron Gutman
8856c4a5a2 - Use Status instead of IOSB.Status in some cases
svn path=/branches/aicom-network-fixes/; revision=35129
2008-08-05 16:32:56 +00:00
Colin Finck
c20321a3f6 Fix Wine-ish code, which doesn't work in ReactOS and only works in Wine by accident
svn path=/trunk/; revision=35128
2008-08-05 16:30:03 +00:00
Dmitry Chapyshev
e55530aef8 - Add cred.c from Wine
svn path=/trunk/; revision=35127
2008-08-05 14:45:40 +00:00
Dmitry Chapyshev
84282c468d - Update icons
svn path=/trunk/; revision=35126
2008-08-05 13:37:56 +00:00
Dmitry Chapyshev
286c019465 - Small fix cursors
svn path=/trunk/; revision=35125
2008-08-05 12:55:33 +00:00
Dmitry Chapyshev
6186f98f14 - Sync gdiplus with Wine head
svn path=/trunk/; revision=35124
2008-08-05 12:23:58 +00:00
Daniel Reimer
77c4cbb2a6 Bug 3618: Norwegian Update by Lars Martin Hambro
svn path=/trunk/; revision=35123
2008-08-05 12:13:31 +00:00
Dmitry Chapyshev
2d8274bd7b - Add Russian translation
svn path=/trunk/; revision=35122
2008-08-05 12:09:39 +00:00
Matthias Kupfer
57d822d84b Radek Liska < radekliska AT gmail DOT com>
- Czech translation of inf files added.
- See issue #3600 for more details.

svn path=/trunk/; revision=35121
2008-08-05 11:36:23 +00:00
Daniel Reimer
0449b6bfed Bug 3555: Syssetup: Adjust size of controls for italian translation by Carlo Bramini
Bug 3588: spanish files by Javier Remacha
Bug 3600: Czech translation update by Radek liska. Inf File Update will come later.
Bug 3630: usetup and shell32 pl translation update by Maciej Bialas


svn path=/trunk/; revision=35120
2008-08-05 11:24:47 +00:00
Matthias Kupfer
e6daa6f38a Vytis Girdzijauskas <cman AT cman DOT us>
- Lithuanian translation of inf files added.
- See issue #3556 for more details.

svn path=/trunk/; revision=35119
2008-08-05 10:17:58 +00:00
Christoph von Wittich
f69bc6aa5f return TRUE in Encrypt and DecryptFile as wine does even if the functions are unimplemented
svn path=/trunk/; revision=35118
2008-08-05 07:36:10 +00:00
James Tabor
1dbbf02a7e - Patch by Yuriy Sidorov <jura at cp-lab.com> , NtUserToUnicodeEx should return zero if key in lpKeyState array is not pressed.
svn path=/trunk/; revision=35117
2008-08-05 04:05:28 +00:00
Cameron Gutman
1fccbafaed - Close the handle on failure
svn path=/branches/aicom-network-fixes/; revision=35116
2008-08-05 01:46:59 +00:00
Johannes Anderwald
0fd48bec89 - implement "create link" verb for control panel items
svn path=/trunk/; revision=35115
2008-08-04 21:51:32 +00:00
Cameron Gutman
69ef129571 - Fix one more memory leak
- Note: The reason the network stack stops functioning occasionally is because it runs out of resources not because ReactOS crashes which is why I'm tracking down memory leaks

svn path=/branches/aicom-network-fixes/; revision=35114
2008-08-04 21:06:39 +00:00
Matthias Kupfer
7da2062490 - Fill combo box with languages and keyboard layouts.
- Store data in structure for preselection of values.
- TODO: preselect keyboard layout after language selection / default language

svn path=/trunk/; revision=35113
2008-08-04 20:40:34 +00:00
Matthias Kupfer
1138fdcb70 Vytis Girdžijauskas <cman AT cman DOT us>
- Correctly call control panel applets from explorer.
- See issue #3629 for more details.

svn path=/trunk/; revision=35112
2008-08-04 18:56:22 +00:00
Ged Murphy
40d661edfb - handle servname being NULL
- patch by Yuri Sidorov <jura at cp-lab dot com>
See issue #3627 for more details.

svn path=/trunk/; revision=35111
2008-08-04 17:26:03 +00:00
Cameron Gutman
107921e042 - Forgot to include one fix in my last commit
svn path=/branches/aicom-network-fixes/; revision=35110
2008-08-04 17:11:04 +00:00
Jeffrey Morlan
f143cab0bb - Add a function in kernel32 for translating STD_*_HANDLE constants to actual handles, for those APIs which accept either. Replace code in 8 APIs that already did this translation.
- Call it in WriteFile, ReadFile, and FlushFileBuffers, which previously did not.

svn path=/trunk/; revision=35109
2008-08-04 17:08:52 +00:00
Stefan Ginsberg
99961c6297 - Fix a typo
svn path=/trunk/; revision=35108
2008-08-04 17:01:35 +00:00
Cameron Gutman
c15c351f5d - Fix more memory leaks
svn path=/branches/aicom-network-fixes/; revision=35107
2008-08-04 16:46:53 +00:00
Cameron Gutman
ac4f9f984d - Fix more leaks
svn path=/branches/aicom-network-fixes/; revision=35106
2008-08-04 16:20:08 +00:00
Aleksey Bragin
befc1d3a5a - Call ChkDsk function with NT pathname, not DOS pathname.
svn path=/trunk/; revision=35105
2008-08-04 16:08:03 +00:00
Aleksey Bragin
799a04653b - Get rid of crt dependencies.
- Fix all printfs to VfatPrint function (which calls appropriate callback).

svn path=/trunk/; revision=35104
2008-08-04 16:04:56 +00:00
Stefan Ginsberg
9a37df12d7 - Export KeI386MachineType and KeInitializeThreadedDpc
- Stubplement and export IoEnumerateRegisteredFiltersList, IoGetPagingIoPriority, KdRefreshDebuggerNotPresent, KeAcquireInStackQueuedSpinLockForDpc, KeReleaseInStackQueuedSpinLockForDpc,  KeAcquireSpinLockForDpc, KeReleaseSpinLockForDpc, KeRegisterNmiCallback, KeDeregisterNmiCallback, KeInitializeCrashDumpHeader, KeTestSpinLock and MmAllocatePagesForMdlEx
- Add IO_PAGING_PRIORITY enumeration and PNMI_CALLBACK prototype to headers

svn path=/trunk/; revision=35103
2008-08-04 15:48:46 +00:00
Cameron Gutman
e3383af168 - Revert the rest of r35080
- The memory is freed in AfdAccept

svn path=/branches/aicom-network-fixes/; revision=35102
2008-08-04 15:19:23 +00:00
Cameron Gutman
23c7498a26 - Revert part of r35080
svn path=/branches/aicom-network-fixes/; revision=35101
2008-08-04 15:16:44 +00:00
Johannes Anderwald
3841e59604 - implement executing control panel item by its CLSID
- should make applets like folder options, antivir(not a true applet) start

svn path=/trunk/; revision=35100
2008-08-04 14:54:53 +00:00
Dmitry Chapyshev
7d50619c45 - Update Russian translation
svn path=/trunk/; revision=35099
2008-08-04 14:20:16 +00:00
Jeffrey Morlan
489d4d8089 - cmd_label: If a label is given on the command line, don't truncate it to only 12 characters; NTFS supports up to 32. Also, use _tcsncat, since _tcsncpy won't always nul-terminate.
- Don't show the old volume information if a label was given on the command line. (Bug 3621)
- If setting the label was unsuccessful, give an error message.

svn path=/trunk/; revision=35098
2008-08-04 14:16:01 +00:00
Johannes Anderwald
65c33891f6 - remove debugging msgbox
- fix default menu item state

svn path=/trunk/; revision=35097
2008-08-04 13:47:11 +00:00
Johannes Anderwald
578b10c107 - create a resource string for "create link"
- implement a custom context menu for the control panel items
- action "create link is not yet implemented

svn path=/trunk/; revision=35096
2008-08-04 13:43:10 +00:00
Dmitry Chapyshev
c2aea64e7d - Update & fix Russian translation
svn path=/trunk/; revision=35095
2008-08-04 12:41:25 +00:00
Dmitry Chapyshev
4f2f126a85 - Update Russian translation
svn path=/trunk/; revision=35094
2008-08-04 10:32:03 +00:00
Aleksey Bragin
9303485cbe - Implement read/write support via Native API.
- Reorganize headers so that only vfatlib.h is included instead of hundred various different headers.

svn path=/trunk/; revision=35093
2008-08-04 10:00:32 +00:00
Stefan Ginsberg
989d740b15 - Export KiBugCheckData
svn path=/trunk/; revision=35092
2008-08-04 08:21:11 +00:00
Pierre Schweitzer
c17bb07ec3 - Changed ghost command (using NickServ)
- Ghost before registering

svn path=/trunk/; revision=35091
2008-08-03 21:34:12 +00:00
Pierre Schweitzer
555a6a340f Allow spaces in commands
svn path=/trunk/; revision=35090
2008-08-03 20:49:33 +00:00
Stefan Ginsberg
3473e20496 - ...fix ros.diff
svn path=/trunk/; revision=35089
2008-08-03 20:08:54 +00:00
Pierre Schweitzer
33bbf518a5 Fixed ident
svn path=/trunk/; revision=35088
2008-08-03 20:06:40 +00:00
Stefan Ginsberg
35d4b52b92 - Update ros.diff
svn path=/trunk/; revision=35087
2008-08-03 20:05:47 +00:00
Pierre Schweitzer
089e7fccd2 Implemented ghost feature to TechBot
svn path=/trunk/; revision=35086
2008-08-03 20:04:26 +00:00
Colin Finck
d425d03d5b - Set better/updated default values
- Remove the non-existent "TechBot.Commands.RBuild" project, it breaks the auomatic conversion of the solution to MSVS 2008

svn path=/trunk/; revision=35085
2008-08-03 19:30:09 +00:00
Eric Kohl
ee1c77756d Fix NtQueryOpenSubKeys prototype.
svn path=/trunk/; revision=35084
2008-08-03 19:24:09 +00:00
Stefan Ginsberg
18d666a782 - Reapply 29440 to dbghelp and use strtoui64 instead of non-existing strtoull. Now dbghelp loads again (broken 7 months ago in revision 31339).
svn path=/trunk/; revision=35083
2008-08-03 19:14:44 +00:00
Aleksey Bragin
05636664e0 - [Stupid] warning fixes.
- Bugfix: CNV_THIS_PART was not returning any value, when in reality it should have returned a pointer to the converted string.

svn path=/trunk/; revision=35082
2008-08-03 19:09:43 +00:00
Aleksey Bragin
663c4cb886 - Copy most of the dosfsck source code into vfatlib. Currently excluded from the build process.
svn path=/trunk/; revision=35081
2008-08-03 18:50:46 +00:00
Cameron Gutman
23cb7f30fa - Fix 2 more memory leaks
svn path=/branches/aicom-network-fixes/; revision=35080
2008-08-03 18:49:30 +00:00
Aleksey Bragin
9339b002a7 - ExfInterlockedAddUlong is FASTCALL, not NTAPI (spotted by Herve).
svn path=/trunk/; revision=35079
2008-08-03 18:39:50 +00:00
Jeffrey Morlan
4129e7e645 - Add NULL checks to _atoi64, _wtol, and _wtoi64.
- Since atoi, atol, and _wtoi should check for NULL (_tcstol doesn't) but should not check for overflow (_tcstol does), make them call _ttoi64 instead of _tcstol.

svn path=/trunk/; revision=35078
2008-08-03 18:35:54 +00:00
Matthias Kupfer
ec62b2846e Igor Koshpaev <tower AT reactos DOT org>
- Russian translation of setup dialogs added.

svn path=/trunk/; revision=35077
2008-08-03 18:32:29 +00:00
Cameron Gutman
376173f679 - Fail if we can't allocate memory
- Fix a memory leak
 - Also resize the buffer on STATUS_BUFFER_OVERFLOW

svn path=/branches/aicom-network-fixes/; revision=35076
2008-08-03 18:02:10 +00:00
Johannes Anderwald
7c1f230166 - use translated verb for cplopen action
svn path=/trunk/; revision=35074
2008-08-03 17:29:57 +00:00
Cameron Gutman
fa8410c89c - Don't continue if OpenRegistryKey fails
svn path=/branches/aicom-network-fixes/; revision=35073
2008-08-03 17:27:16 +00:00
Hervé Poussineau
36502dfce7 Use generic .spec file instead of arch specific .def file
svn path=/trunk/; revision=35072
2008-08-03 16:16:09 +00:00
Hervé Poussineau
e8ac6d2a94 Better support for kill_at option in fastcall entry points
svn path=/trunk/; revision=35071
2008-08-03 16:12:02 +00:00
Aleksey Bragin
b326f4d72f - Add dosfsck to the bootcd.
svn path=/trunk/; revision=35070
2008-08-03 13:53:41 +00:00
Pierre Schweitzer
ea7d68ba2d Updated French translation for Shell32.dll by Amine Khaldi
svn path=/trunk/; revision=35069
2008-08-03 13:53:37 +00:00
Aleksey Bragin
834b507d7f - Fix a typo, now dosfsck really performs writes (and actually works).
svn path=/trunk/; revision=35068
2008-08-03 13:20:44 +00:00
Aleksey Bragin
b77c380ad7 - Revert my no_change_list modification, it turns out it's not needed, since when write_immed is set, changes aren't added to the list.
svn path=/trunk/; revision=35067
2008-08-03 12:50:10 +00:00
Aleksey Bragin
56184fa149 - Fix warnings in io.c.
svn path=/trunk/; revision=35066
2008-08-03 12:46:43 +00:00
Aleksey Bragin
059407e16e - Add proper write support.
- Change fs_flush logic, so it reuses the same fs_write routine instead of duplicating code.
- RosBE supports %I64d, so use it instead of %lld.

svn path=/trunk/; revision=35065
2008-08-03 12:24:15 +00:00
Aleksey Bragin
6fbda662d9 - Revert 35039 on hpoussin's request.
svn path=/trunk/; revision=35064
2008-08-03 11:14:34 +00:00
Hervé Poussineau
199ec77874 Workaround WIDL bug
svn path=/trunk/; revision=35063
2008-08-03 11:06:40 +00:00
Cameron Gutman
6286fe5bb6 - Handle STATUS_REMOTE_NOT_LISTENING
svn path=/branches/aicom-network-fixes/; revision=35062
2008-08-03 09:52:22 +00:00
Cameron Gutman
221590c8f7 - Handle STATUS_INSUFFICIENT_RESOURCES
svn path=/branches/aicom-network-fixes/; revision=35061
2008-08-03 09:40:13 +00:00
Pierre Schweitzer
fdf8fa1b90 Fixed French translation for cacls by Amine Khaldi
svn path=/trunk/; revision=35060
2008-08-03 09:18:24 +00:00
Stefan Ginsberg
0030139074 - Use RtlCopyUnicodeString instead of RtlInitUnicodeString when copying a string
svn path=/trunk/; revision=35059
2008-08-03 08:53:27 +00:00
Pierre Schweitzer
d07210c83c Fixed rosapps build
svn path=/trunk/; revision=35058
2008-08-03 08:38:59 +00:00
Stefan Ginsberg
6e2deb5f56 - Revert 35042
svn path=/trunk/; revision=35057
2008-08-03 08:18:54 +00:00
Art Yerkes
f24b9e3f36 Merge aicom-network-fixes up to 35055
svn path=/trunk/; revision=35056
2008-08-03 07:23:42 +00:00
Cameron Gutman
93abe83cd2 - Check to see if the ZwEnumerateKey call succeeded with the larger buffer and continue if possible
svn path=/branches/aicom-network-fixes/; revision=35055
2008-08-03 05:10:53 +00:00
Cameron Gutman
31bbc55cec - Add some more debug prints for memory allocation/freeing
svn path=/branches/aicom-network-fixes/; revision=35054
2008-08-03 03:05:39 +00:00
Cameron Gutman
312bb6657e - We must assign values to Irp->IoStatus.Status and Irp->IoStatus.Information because the function that called us might not call UnlockAndMaybeComplete to assign those values
svn path=/branches/aicom-network-fixes/; revision=35053
2008-08-03 01:38:05 +00:00
Johannes Anderwald
50fc6d657b - fix build
svn path=/trunk/; revision=35052
2008-08-03 00:04:21 +00:00
Johannes Anderwald
31d20f1882 - start implementing the alt-tab app switching dialog
- requires WH_KEYBOARD_LL hook which is not yet ready
- add missing resource constant

svn path=/trunk/; revision=35051
2008-08-02 23:49:02 +00:00
Matthias Kupfer
7d96358dbf revert to 35046, sorry for mistake
svn path=/trunk/; revision=35050
2008-08-02 22:33:58 +00:00
Jeffrey Morlan
1914d86bac - Remove some redundant ProcessData == NULL checks - ClientConnectionThread already checks this for every request.
- CsrApiCallHandler: Get rid of "Found" variable and just return when the right definition is found.
- Make CsrApiCallHandler use the return value from the function (previously unused) to set Request->Status, and trim the now-redundant Request->Status setting from tons of CSR_API functions.
- CsrCreateProcess: Don't set shutdown parameters again - already set in CsrCreateProcessData.

svn path=/trunk/; revision=35049
2008-08-02 22:09:22 +00:00
Art Yerkes
57edd3268d Fix step and next commands. Not perfect, but working. Also, make all
printing go through KdbpPrint, and switch to KeStallExecutionProcessor
for checking on messages from the terminal.  Use the classic unix 100ms
time limit for messages.

We need to refactor debug entry.  There's a whole bunch of intermixed code
that basically handles 5 distinct states here:

1) Unexpected stop against a loose breakpoint instruction
2) Expected stop against a breakpoint instruction we placed
3) Singlestep after an expected breakpoint, user was not stepping
4) Singlestep after an expected breakpoint, user was stepping
5) Singlestep trap, user was not stepping (memory breakpoint).

svn path=/trunk/; revision=35048
2008-08-02 22:01:46 +00:00
Matthias Kupfer
d6872d359d Reorganize shdocvw:
- Moved and renamed language resource files into created 'lang' directory.
- Outdated shdocvw_ros.diff removed.

svn path=/trunk/; revision=35047
2008-08-02 21:57:53 +00:00
Cameron Gutman
f470e856b1 - Set Irp->IoStatus.Information to 0
- Set Irp->IoStatus.Status before returning

svn path=/branches/aicom-network-fixes/; revision=35046
2008-08-02 20:53:32 +00:00
Jeffrey Morlan
f2341b9cf0 NtGdiGetRegionData: Use correct address of region header (&obj->rdh, not obj). Also, for the contents, just use 'rgndata->Buffer' as the destination address instead of doing funky pointer arithmetic.
svn path=/trunk/; revision=35045
2008-08-02 20:07:59 +00:00
Pierre Schweitzer
42b84f7df1 Revert r35043 on shell32/fprop.c
svn path=/trunk/; revision=35044
2008-08-02 18:35:08 +00:00
Pierre Schweitzer
6eeeb0ab4e Synced dbghelp.dll with Wine HEAD.
svn path=/trunk/; revision=35043
2008-08-02 18:30:38 +00:00
Stefan Ginsberg
a124618434 - ExpLookupHandleTableEntry: Apply same changes as was done for ExpFreeHandleTable and ExpAllocateHandleTableEntrySlow in 34467
- ExpAllocateHandleTableEntry: Fail if we don't find a handle table entry

svn path=/trunk/; revision=35042
2008-08-02 18:25:53 +00:00
Jeffrey Morlan
9b188f4ebc - Implement GenerateConsoleCtrlEvent.
- Remove IgnoreCtrlEvents variable (which ConsoleControlDispatcher did not actually use); set ProcessParameters->ConsoleFlags instead. Despite the name "ConsoleFlags", SetConsoleCtrlHandler treats it like a boolean.
- Preserve all 16 bits of the attribute set by SetConsoleTextAttribute. Even though the upper byte does not affect text colors, it should be retrievable with GetConsoleScreenBufferInfo.
- Update OpenConsoleW prototype in kernel32.h to match the change made in r34694.

svn path=/trunk/; revision=35041
2008-08-02 17:01:22 +00:00
Hervé Poussineau
61c0684353 Add lots of missing functions to LSA RPC interface
Fix existing ones to have same prototypes as MS Windows

svn path=/trunk/; revision=35040
2008-08-02 15:45:59 +00:00
Hervé Poussineau
a71a69c253 Support nested structures
svn path=/trunk/; revision=35039
2008-08-02 15:34:14 +00:00
Cameron Gutman
ca91433bbc - We must complete the IRP if we fail because the function we were called from expects the IRP to be completed after this call
- Return the correct status

svn path=/branches/aicom-network-fixes/; revision=35038
2008-08-02 14:52:19 +00:00
Aleksey Bragin
50e5c6483a - Add dosfsck to the build.
svn path=/trunk/; revision=35037
2008-08-02 14:45:18 +00:00
Hervé Poussineau
06e654d8a1 Support GetObjectW() failure
Reformat code

svn path=/trunk/; revision=35036
2008-08-02 14:11:48 +00:00
Stefan Ginsberg
006de1d85f - Clean up ntdll a bit
svn path=/trunk/; revision=35032
2008-08-02 12:46:02 +00:00
Aleksey Bragin
253f4ee284 - Remove unneeded code, which would have its 10 years anniversary in ~20 days (committed originally by Rex back in August, 1998, revision number 8(!), and coded by David Welch, never touched since then).
svn path=/trunk/; revision=35030
2008-08-02 10:55:56 +00:00
Stefan Ginsberg
f7db1083a4 - Fix broken UnmapViewOfFile definition
svn path=/trunk/; revision=35027
2008-08-02 09:29:16 +00:00
James Tabor
de7b0d6e38 - Dereference pointer to event and fix module check in hooks.
svn path=/trunk/; revision=35025
2008-08-02 06:21:55 +00:00
Cameron Gutman
dfd8d6b0c0 - Fix a bug where Irp->IoStatus wasn't set if Status == STATUS_PENDING
svn path=/branches/aicom-network-fixes/; revision=35024
2008-08-02 03:51:17 +00:00
Cameron Gutman
80709d7858 - Make sure to set Irp->IoStatus.Status to the correct status
svn path=/branches/aicom-network-fixes/; revision=35023
2008-08-02 03:17:53 +00:00
James Tabor
6d4ff1a0c0 - Implemented NotifyWinEvent, SetWinEventHook and UnhookWinEvent.
- I only enables test_winevents(), test_set_hook() and all related with wine Msg tests. The test takes a while to run due to the IsWinEventHookInstalled check. I optimized our mask set to take this into account. The results are, the test is slow and our code is fast.
- We pass all Event and Local Hook tests. Will research the problem with global hooks and finish it up.

svn path=/trunk/; revision=35022
2008-08-02 00:38:01 +00:00
Jeffrey Morlan
4509402aa9 In rsym, allow a stabs entry to be longer than 256 characters, so that ROS may be compiled with -feliminate-unused-debug-symbols which reduces the needed disk space a lot.
svn path=/trunk/; revision=35020
2008-08-01 21:48:54 +00:00
Art Yerkes
ca26e8cac7 Merge aicom-network-fixes up to
r35014 | cgutman | 2008-08-01 10:21:52 -0700 (Fri, 01 Aug 2008) | 2 lines

- These should no longer be needed now that TDI doesn't give back invalid IRPs
- I'll look into the canceling issue later

svn path=/trunk/; revision=35019
2008-08-01 21:07:09 +00:00
Pierre Schweitzer
160a7614dd Changes by Hervé Poussineau:
- Simplified code for WriteText which avoids infinite loops and fixes EOLN conversion. This fixes bug 3551
Changes by Pierre Schweitzer
- Removed some non-understandable unicode code in WriteText
- Added a check to prevent crash when trying to create an empty file
- Fixed formatting for WriteText
See issue #3551 for more details.

svn path=/trunk/; revision=35018
2008-08-01 19:43:18 +00:00
Stefan Ginsberg
f81b3e63d2 - Use MmAllocateMemoryWithType instead of deprecated MmAllocateMemory for the ARM Shared Heap allocation
- Use heap routines in i386 and powerpc branches for temporary memory

svn path=/trunk/; revision=35017
2008-08-01 17:50:17 +00:00
Matthias Kupfer
f724943d40 - extended range for calendar view for years 1900-9999, each selectable year/month combination creates a correct month view
- special case september 1752 partly prepared, but disabled as long as unneeded ;-)
- enable via #define WITH_1752

svn path=/trunk/; revision=35016
2008-08-01 17:43:53 +00:00
Jeffrey Morlan
5f88171864 - IntRemoveMenuItem: Fix bug involving deleting item from submenu. (Bug 3292)
- IntFreeMenuItem: Remove code for removing item from list - the only caller that "used" this was IntRemoveMenuItem, which actually removes the item itself.
- IntInsertMenuItemToList, IntEnableMenuItem, IntCheckMenuItem, IntHiliteMenuItem: Simplify some more redundant code.

svn path=/trunk/; revision=35015
2008-08-01 17:40:56 +00:00
Cameron Gutman
928b81e97f - These should no longer be needed now that TDI doesn't give back invalid IRPs
- I'll look into the canceling issue later

svn path=/branches/aicom-network-fixes/; revision=35014
2008-08-01 17:21:52 +00:00
Jeffrey Morlan
ec8d684215 - PspSetPrimaryToken: Fix some incorrect object dereferencing.
- WlxStartApplication: Fix handle leaks.
- Make userinit.exe exit when it's done everything. No need to wait for explorer to exit first.

svn path=/trunk/; revision=35013
2008-08-01 16:54:14 +00:00
Stefan Ginsberg
f0ae9e7e83 - Use macros instead of magic "1" and "2" for Setup Loader Block Flags
- Initialize AcpiTableDetected to FALSE
- Misc header fixes

svn path=/trunk/; revision=35012
2008-08-01 16:47:17 +00:00
Stefan Ginsberg
50560726e9 - Revert 35008
svn path=/trunk/; revision=35011
2008-08-01 16:29:40 +00:00
Stefan Ginsberg
e5aa7fccf6 - Get rid of a confusing goto and call KiUnwaitThread directly. This was a remnant of some code refactoring.
svn path=/trunk/; revision=35010
2008-08-01 16:03:49 +00:00
Stefan Ginsberg
0ebeef15a1 - Fix broken VideoPortSignalDmaComplete definition
- Cleanup and reformat dma.c and add missing functions (not yet exported)

svn path=/trunk/; revision=35009
2008-08-01 14:54:19 +00:00
Stefan Ginsberg
6a23266635 - PCHify Acledit, Beepmidi, Cards, Crtdll, Dhcpsvc, Lpk, Lsasrv, uext2, ufat, untfs, ws2help, wshtcpip, and wsock32
svn path=/trunk/; revision=35008
2008-08-01 14:27:43 +00:00
Stefan Ginsberg
82b0b0ee03 - Fix 2 warnings
svn path=/trunk/; revision=35007
2008-08-01 14:19:05 +00:00
Stefan Ginsberg
ad456a2ec4 - Fix my broken indentation
svn path=/trunk/; revision=35006
2008-08-01 14:18:52 +00:00
Stefan Ginsberg
5c39323e08 - Minor coding style improvement
svn path=/trunk/; revision=35005
2008-08-01 14:12:32 +00:00
Daniel Reimer
ea8d877fe4 Rename the Norwegian RC Files to no-NO.rc, which is correct according to MSDN.
Bug 3516: Translate source archive by Lars Martin (lars_martin4@hotmail.com)

svn path=/trunk/; revision=35004
2008-08-01 13:08:15 +00:00
Daniel Reimer
9d2d4329e1 Rename the Norwegian RC Files to no-NO.rc, which is correct according to MSDN.
svn path=/trunk/; revision=35003
2008-08-01 12:48:34 +00:00
Pierre Schweitzer
312a3d7379 Update forgotten fields
svn path=/trunk/; revision=35002
2008-08-01 12:34:42 +00:00
Cameron Gutman
606652ca08 * Fix many memory leaks by unmapping MDL pages when UnlockAndMaybeComplete and LostSocket are called with Status != STATUS_PENDING
This change should probably be merged to trunk before 0.3.6

svn path=/branches/aicom-network-fixes/; revision=35001
2008-08-01 12:19:18 +00:00
Aleksey Bragin
93988768a0 - Update some apps in Downloader.
svn path=/trunk/; revision=35000
2008-08-01 12:15:51 +00:00
Pierre Schweitzer
00b5f8b803 Removed wrong FIXME: CcInitializeCacheMap doesn't raise exceptions.
See issue #3315 for more details.

svn path=/trunk/; revision=34998
2008-08-01 12:08:01 +00:00
Cameron Gutman
0940a5b301 * Properly handle STATUS_TIMEOUT
* Don't crash if STATUS_END_OF_FILE and a NULL ReturnedBytes are passed
 * Handle STATUS_INVALID_CONNECTION

svn path=/branches/aicom-network-fixes/; revision=34997
2008-08-01 12:06:19 +00:00
James Tabor
55f1b15382 - Implement EngGetTickCount.
svn path=/trunk/; revision=34996
2008-08-01 12:03:46 +00:00
Aleksey Bragin
6e81d0c92b Gregor Schneider <grschneider@gmail.com>
- Return error code "buffer overflow" instead of "buffer too small" and only do that if really necessary
- Only append 0 if Length parameter allows to do so
- Use uppercase letters

Aleksey Bragin <aleksey@reactos.org>
- Wrap it into PSEH, however commented out till a solution for the bootloader is found (linking freeldr with PSEH is not very beautiful).
See issue #3583 for more details.

svn path=/trunk/; revision=34995
2008-08-01 11:54:27 +00:00
Art Yerkes
c501d8112c Create a branch for network fixes.
svn path=/branches/aicom-network-fixes/; revision=34994
2008-08-01 11:32:26 +00:00
Matthias Kupfer
0e213bbc00 Lars Martin Hambro <lars_martin4 AT hotmail DOT com>
- Norwegian translation of magnify and downloader added.
- Fixed resource file (we request patches, not single changed files)
- See issue #3504 for more information.

svn path=/trunk/; revision=34993
2008-08-01 10:17:41 +00:00
Pierre Schweitzer
415228662a Updated French translation for shell32. Also fixed typo, even if I thought I already did it!?
svn path=/trunk/; revision=34991
2008-08-01 09:14:56 +00:00
James Tabor
3e6656c48c - Preliminary implementation of SetWinEventHook and UnhookWinEvent.
- Only wine cross test uses this and testing is not stable.
- Patches are welcome but all code is subject to change.
- All Hook code should be ready by Aug 4th.

svn path=/trunk/; revision=34988
2008-07-31 23:48:35 +00:00
James Tabor
30d2593564 - Support relative callback proc with module base.
svn path=/trunk/; revision=34985
2008-07-31 22:48:59 +00:00
Jeffrey Morlan
717a13e2d7 Fix handle leaks in RtlCreateUserThread and SmExecPgm.
svn path=/trunk/; revision=34984
2008-07-31 21:33:17 +00:00
Matthias Kupfer
ffad542df1 Mario Kacmar <kario AT szm DOT sk>
- Key remapping for qwertz applied.

svn path=/trunk/; revision=34983
2008-07-31 19:53:49 +00:00
Jeffrey Morlan
173a8d6c7a In exit and _cexit, call atexit routines. (Bug 3432_)
svn path=/trunk/; revision=34980
2008-07-31 17:46:50 +00:00
Stefan Ginsberg
41ad8e0c80 - Change an infinite loop to an assert to simplify debugging
svn path=/trunk/; revision=34979
2008-07-31 14:25:35 +00:00
ReactOS Portable Systems Group
f492f5a8cd - Fix ARM NTOS brekage (and amd64/ppc):
- Only build kd/i386 on i386 builds since this code is x86-32 centric.
  - Only call KdpEnableSafeMem on i386 builds, since the code uses x86-32 centric defines.

svn path=/trunk/; revision=34977
2008-07-31 07:31:55 +00:00
ReactOS Portable Systems Group
ddaf47dec3 mmcreatevirtualmapping internal should accept process as input parameter, not assume null.
implement a broken version of mmcreateprocessaddressspace.

commit current checkpoint of arm mmu manager virtual mapping rewrite to sync with i386 code. the kernel part works fine and the kernel boots as far as it did before, but the code is still ugly.


svn path=/trunk/; revision=34976
2008-07-31 07:09:28 +00:00
ReactOS Portable Systems Group
e1d4f7bdf2 dont include i386 headers in arm mmu manager headers.
svn path=/trunk/; revision=34975
2008-07-31 07:07:00 +00:00
ReactOS Portable Systems Group
6abcb17d2a implement kiuserinitializeapc, and begin writing test code for kiswapprocess.
svn path=/trunk/; revision=34974
2008-07-31 07:06:19 +00:00
ReactOS Portable Systems Group
ef7ceb62bb fix formatting of i386 mmu code.
svn path=/trunk/; revision=34973
2008-07-31 07:04:58 +00:00
Matthias Kupfer
dd7dc24c8d Patch by Gregor Schneider a.k.a DosX
- use line breaks in debug output

svn path=/trunk/; revision=34966
2008-07-30 21:16:03 +00:00
Matthias Kupfer
aabe1e5462 - center window only once
- get path from executable module instead of current directory

svn path=/trunk/; revision=34964
2008-07-30 18:54:05 +00:00
Johannes Anderwald
17131c2512 - don't display network propery dialog since it is not yet implemented
svn path=/trunk/; revision=34963
2008-07-30 16:55:45 +00:00
Matthias Kupfer
70b5975a50 uniform distribution of memory progress bars
svn path=/trunk/; revision=34962
2008-07-30 15:12:09 +00:00
Jeffrey Morlan
92680636ef kernel32: Don't enter the ConsoleLock if it has already been deleted by DllMain. Patch by hto (hto at dev dot null) (Bug 2308)
svn path=/trunk/; revision=34961
2008-07-30 15:00:57 +00:00
Colin Finck
8c33c79951 Remove all translations for the "Paged Memory", "Nonpaged Memory" and "Free Memory" progress bars.
This is debug stuff, which should have never been translated. As the translated strings are also sometimes longer than the english ones, they led to unnecessary problems like text overlapping.

svn path=/trunk/; revision=34960
2008-07-30 14:15:41 +00:00
Aleksey Bragin
8db0ed2181 - Fix Irp flags assignment in case of an IoAllocateIrp call with ChargeQuota set to TRUE. Reduces number of kmtest failures by 1.
svn path=/trunk/; revision=34959
2008-07-30 13:24:05 +00:00
Johannes Anderwald
e0acf025bc - dont double free an irp
- patch by bugboy
- bug 3530

svn path=/trunk/; revision=34958
2008-07-30 13:13:52 +00:00
Johannes Anderwald
b3ca3dbbd0 - fix a bug which made the label display 2x times the drive letter
svn path=/trunk/; revision=34957
2008-07-30 13:09:49 +00:00
Matthias Kupfer
6e77c40907 - fix wrong "ss" in German (Germany) ressource
- Swiss German version need own ressource file

svn path=/trunk/; revision=34956
2008-07-30 12:34:00 +00:00
Aleksey Bragin
19a25c0671 - SVN maintenance.
svn path=/trunk/; revision=34955
2008-07-30 12:22:10 +00:00
Matthias Kupfer
9b8755513d Mario Kacmar <kario AT szm DOT sk>
- Updated Slovak translation for eventvwr, win32 and new Slovak translation for regedit added.
- See issue #33610 for more details.

svn path=/trunk/; revision=34954
2008-07-30 12:14:30 +00:00
Aleksey Bragin
4035fb69b9 - By default enable all tests. 0 failures in Windows XP SP3.
svn path=/trunk/; revision=34953
2008-07-30 11:15:48 +00:00
Colin Finck
1bdfa12e51 Daniel Verkamp (daniel.verkamp@gmail.com)
- Sync "list.h" to Wine to fix a pointer to integer cast warning on 64-bit hosts

See issue #3579 for more details.

svn path=/trunk/; revision=34952
2008-07-30 11:12:25 +00:00
Aleksey Bragin
c6d5d68953 - Add unloading ability.
- Don't forget to wrap any testing module into StartTest / FinishTest.

svn path=/trunk/; revision=34951
2008-07-30 11:11:25 +00:00
Matthias Kupfer
52d04e432e Mario Kacmar <kario AT szm DOT sk>
- Slovak, Polish and Ukrainian translations of packmgr updated/fixed.
- See #3601 for more details.

svn path=/trunk/; revision=34949
2008-07-30 10:18:34 +00:00
Colin Finck
ef848a8f68 Remove a change from our diff file for comctl32, which is in Wine HEAD as well.
See issue #2843 for more details.

svn path=/trunk/; revision=34948
2008-07-30 10:11:09 +00:00
Aleksey Bragin
8edd5bdaa0 - Add IRP tests based on a Alexander Morozov's patch to Wine ("[try 3] Add tests for IoInitializeIrp and IoAllocateIrp").
svn path=/trunk/; revision=34947
2008-07-30 09:23:45 +00:00
Hervé Poussineau
c6de7a80b8 Revert r34344, the mess with GetEnvironmentStrings/GetEnvironmentStringsA is expected.
svn path=/trunk/; revision=34946
2008-07-30 08:02:45 +00:00
Hervé Poussineau
9b55463daa unix define doesn't mean we're on a x86 compatible machine
svn path=/trunk/; revision=34945
2008-07-30 07:29:55 +00:00
Hervé Poussineau
aa8cad03d0 Fix GetEnvironmentStrings/GetEnvironmentStringsA mess
svn path=/trunk/; revision=34944
2008-07-30 07:27:33 +00:00
Art Yerkes
4b9274519b Patch by Cameron Gutman (aicommander (at) gmail (dot) com)
- Remove a hack related to cancellation
- Make sure not to pass on a bad IRP on failure (in tdi)
- Remember connect irp
* Note: commit notes are arty's in this case

svn path=/trunk/; revision=34943
2008-07-30 06:05:20 +00:00
Art Yerkes
d006ec695e Patch by Cameron Gutman (aicommander (at) gmail (dot) com)
- Remove a hack from DispTdiSendDatagram
- Fix a couple of bugs that resulted in clearing the wrong request

svn path=/trunk/; revision=34938
2008-07-29 21:52:09 +00:00
Johannes Anderwald
1fa91ed658 - fix an obvious bug (introduced by me)
See issue #3064 for more details.

svn path=/trunk/; revision=34936
2008-07-29 18:54:28 +00:00
James Tabor
6d82180d7a - Add Event handle type.
svn path=/trunk/; revision=34935
2008-07-29 18:53:46 +00:00
James Tabor
a9cd7fec76 - Patch by Jeffrey Morlan: Fix bounds checking and change NtGdiDoPalette to use a temporary kmode buffer. See Bug 3383.
svn path=/trunk/; revision=34934
2008-07-29 18:11:18 +00:00
Johannes Anderwald
4c985ce93a - register network neighbourhood as a desktop namespace extension
svn path=/trunk/; revision=34933
2008-07-29 18:03:23 +00:00
Johannes Anderwald
fc0eaa9b92 - update polish translation by Olaf Siejka (Caemyr)
svn path=/trunk/; revision=34932
2008-07-29 17:49:32 +00:00
Johannes Anderwald
dcdadb236c - register shellink property sheet handler
- should make shellink property page visible again

svn path=/trunk/; revision=34931
2008-07-29 17:42:35 +00:00
Johannes Anderwald
ff15b21470 - fix titles in folder property dialog
- translate title to native language when available

svn path=/trunk/; revision=34930
2008-07-29 17:19:16 +00:00
Johannes Anderwald
60db6af48b - implement folder property dialog
- sync chinese resource files

svn path=/trunk/; revision=34929
2008-07-29 16:52:39 +00:00
Jeffrey Morlan
9db67069ce - Remove unused hVScrollBar and hHScrollBar members in GUI_CONSOLE_DATA.
- Remove ScreenBufferSize member from GUI_CONSOLE_DATA; when building the structure for console.dll, send the actual screen buffer size instead.
- GuiConsolePaint, GuiIntDrawRegion: Adjust coordinates based on buffer's scroll position.
- GuiConsolePaint: Use ConioCoordToPointer when finding attribute at top-left.
- GuiConsoleHandlePaint: Don't leak the DC when the paint rectangle is empty.
- GuiConsoleHandleScroll: Actually update the buffer's scroll position, not just the scrollbar's. Allow scrolling either horizontally or vertically. Fix typo in SB_THUMBTRACK case. Don't rely on GetScrollInfo for bound checking - any thread can sabotage the scrollbar ranges.
- CsrGetScreenBufferInfo: Return the visible area in srWindow.

svn path=/trunk/; revision=34928
2008-07-29 16:10:38 +00:00
Christoph von Wittich
72cd091bff Odbccp32 dll doesn't have a DllMain function
reported by hto
See issue #3603 for more details.

svn path=/trunk/; revision=34924
2008-07-29 07:30:49 +00:00
Jeffrey Morlan
af7891739c NtUserBeginPaint: Taking the bounding box of the update region first and clipping it to the client area afterwards was making rcPaint contain the entire client area when scrolling. It should be done the other way around: clip to the client area first, then box. Since there is already a clipped update region in the DC, this is easy; just use GdiGetClipBox.
svn path=/trunk/; revision=34923
2008-07-29 02:08:56 +00:00
James Tabor
274bd6b2ab - Added more hook points, WH_FOREGROUNDIDLE and WH_KEYBOARD.
- Fixed WH_CALLWNDPROC/RET, now the posted test program works as it should.
- Tested with Opera 9.51, FF, Seamonkey, Abiword, Miranda, Mirc and the rest of our applications.

svn path=/trunk/; revision=34922
2008-07-29 00:35:05 +00:00
Art Yerkes
2bd0499500 Fix my error not noticing that queued spinlock functions return KIRQL through
the actual function return, not through a parameter.

svn path=/trunk/; revision=34921
2008-07-28 22:33:11 +00:00
Art Yerkes
298e26754b - Reverse my previous (in retrospect) hack
- Make MmProbeAndLockPages smart enough to work at DISPATCH_LEVEL
- At Alex' request, remove the stand alone spinlock for the page list, and
  use the queued spinlock in the prcb.

svn path=/trunk/; revision=34920
2008-07-28 22:05:56 +00:00
Johannes Anderwald
67821bff32 - display volume label for disk drives. If there is no label, load default label
svn path=/trunk/; revision=34915
2008-07-28 19:47:19 +00:00
Aleksey Bragin
9655f89744 - Don't strictly check NTDDI_VERSION to WINXP or WS03, since in case of e.g. NTDDI_WS03SP1 the define would work incorrectly (skipping a structure member).
svn path=/trunk/; revision=34914
2008-07-28 18:38:11 +00:00
Johannes Anderwald
81e31939b1 - reenable drive properties dialog
svn path=/trunk/; revision=34913
2008-07-28 18:23:42 +00:00
Art Yerkes
e98217024c Should fix the release build (sorry).
svn path=/trunk/; revision=34912
2008-07-28 18:21:35 +00:00
Jeffrey Morlan
83f07a8e37 - GuiConsoleInitScrollbar: Hide vertical scrollbar when not needed; use SB_VERT (not SB_HORZ) to set its information when it is; set sInfo.nPage according to window size in characters; calculate window pixel size, taking scrollbar width/height into account.
- GuiConsoleHandleNcCreate: Remove window sizing (now done in GuiConsoleInitScrollbar)
- GuiApplyUserSettings: Swap transposed min/max in cursor size calculation; don't assume that the physical top of the buffer is the same as the logical top; fix broken code where HAVE_WMEMSET isn't defined (wrong loop counts, Offset wasn't incremented); fix typo in calculating height difference. If either buffer or window size has changed, call GuiConsoleInitScrollbar.

svn path=/trunk/; revision=34911
2008-07-28 16:48:04 +00:00
Art Yerkes
7c5414460f This is a patch i've been keeping for a while. Yes, it's not "as nt does it",
but it solves a practical problem, and isn't particularly invasive (the main
change is the call to KdpEnableSafeMem ... everything else could be macroed
out if desired).  

This provides armour for kdbg and gdb that avoid faulting on bad addresses by
implementing a simple poor-man's mmu and letting the debuggers use it.

svn path=/trunk/; revision=34904
2008-07-28 14:47:17 +00:00
Dmitry Chapyshev
94f599dec2 - Add console version Appwiz. It is not finished, but fully works
svn path=/trunk/; revision=34902
2008-07-28 14:40:32 +00:00
Aleksey Bragin
b971b4d659 Dmitry Gorbachev
- PDT of CSRSS has no entry for TCB of the thread, fix this problem.
See issue #3591 for more details.

svn path=/trunk/; revision=34901
2008-07-28 14:32:50 +00:00
Art Yerkes
258329b01b Fix (among other things) failure to boot when a CD is not inserted, caused by
the new (correct) ASSERT in mutex acquisition in MmProbeAndLockPages, which
was erroneously being called from IoBuildAsynchronousFsdRequest at
DISPATCH_LEVEL.  

The only correct course of action when calling IoBuildAsynchronousFsdRequest
at DISPATCH_LEVEL is to MmBuildMdlForNonPagedPool since the buffer must be 
nonpaged (if the IRP completes synchronously, we'll still be at DISPATCH_LEVEL)
This is the case when direct io is done at DISPATCH_LEVEL using
IoBuildAsynchronousFsdRequest.

svn path=/trunk/; revision=34899
2008-07-28 12:38:47 +00:00
Aleksey Bragin
966a7b788f - Silence crt's "wtf".
svn path=/trunk/; revision=34897
2008-07-28 11:30:08 +00:00
Ged Murphy
36dab01cab - Don't check outside of the array bounds
- Spotted by Marcelo Slomp <mslomp at linuxmail dot org>
See issue #3593 for more details.

svn path=/trunk/; revision=34892
2008-07-28 08:45:38 +00:00
Colin Finck
795b09cde7 Replace '#ifdef __linux__' by '#ifndef WIN32', etc. to fix compilation on Mac OS X (hint by Alex on ros-dev)
svn path=/trunk/; revision=34891
2008-07-28 08:32:04 +00:00
ReactOS Portable Systems Group
a9f6591d2c - Don't use .spec file on ARM, it doesn't work.
- For the first time, the entire ARM build of ReactOS builds (for the components we've defined)!
- Now the user-mode fun begins.


svn path=/trunk/; revision=34890
2008-07-28 03:07:50 +00:00
ReactOS Portable Systems Group
e34e342d45 - Fix build of NTOS and FreeLDR on ARM.
svn path=/trunk/; revision=34889
2008-07-28 03:07:03 +00:00
ReactOS Portable Systems Group
4eb79d6d88 - Fix FreeLDR for ARM build after some header changes that happen in NTOS.
svn path=/trunk/; revision=34887
2008-07-28 02:18:43 +00:00
ReactOS Portable Systems Group
a249132448 - Define the "generic" versions of the ARM-specific HAL routines.
- Now the generic HAL builds without linker errors.


svn path=/trunk/; revision=34886
2008-07-28 02:15:40 +00:00
ReactOS Portable Systems Group
1b0bec70c1 - Fix the NTOS ARM build after the recent Mm changes.
svn path=/trunk/; revision=34885
2008-07-28 02:13:56 +00:00
ReactOS Portable Systems Group
80f7916a79 - We finally figured out how to build the CRT! It seems on ARM, we have to add __MSVCRT__ to all build targets.
- Thanks to the people who worked on the PPC port for making this obvious in the rbuild file :)


svn path=/trunk/; revision=34884
2008-07-28 02:13:39 +00:00
ReactOS Portable Systems Group
a5a0461289 Now that MADDRESS_SPACE became nearly an empty structure pointing only at the root, it can completely go away. Now VadRoot really is a MM_AVL_TABLE structure.
The BalancedRoot.u1.Parent now points to what used to be MemoryAreaRoot. This isn't really the most proper fix out there -- the problem is that React starts with an no root, while Windows
starts with an empty balanced root. So for now we keep doing it the React way, which means we have about 10 ugly typecast hacks. On the other hand, we got rid of more than 100 of them.


svn path=/trunk/; revision=34881
2008-07-28 01:49:23 +00:00
ReactOS Portable Systems Group
7c1492c712 The address space creation lock is a guarded mutex, not a pushlock, in NT 5.2. While it is commendable to attempt using Vista optimizations (it is a push lock on Vista) in order to speed up
the kernel, it is entirely stupid to do so by completing ignoring the ramifications of this change, and furthermore, to pollute the kernel with typecasts, as well as to introduce non-standard
behavior. Ironically it is ion himself who made this change.

svn path=/trunk/; revision=34879
2008-07-28 01:11:19 +00:00
ReactOS Portable Systems Group
34954b16a4 There is no point in saving the address of the address space lock in the address space structure anymore, since this lock is always the address creation lock of the owner process,
and there's always an owner process now.

svn path=/trunk/; revision=34878
2008-07-28 00:56:39 +00:00
ReactOS Portable Systems Group
71f2416876 Looks like this address space nonsense made even less sense than originally understood. The kernel address space was something created very early-on, and associated with a global variable
that actually contained the address space itself (so it wasn't part of any process). Its locks however, were associated to the "current process", which, when this function is called, is the
idle process (which later is cloned into the initial system process). Shortly thereafter, the address space of the "current process" (still, at this point, the idle process) was initialized
with the function reserved for real processes (MmInitializeProcessAddressSpace), which among other things, performed a couple of user-mode mappings (which are irrelevant and should not be
part of the system process address space). This created a weird schism: the kernel address space was actually a global variable associated with no process at all, while the kernel process
had its own address space as well (which was not the kernel address space). It's a miracle this didn't screw anything up especially since whether or not the address space has an owner
determined the lowest address (which means that if the kernel process allocated a memory with its *own* address space, the code would think it was a user-mode process).
This patch gets rid of the kernel address space as a static structure, and instead makes it a pointer into the idle/system process' address space. It also gets rid of MmInitializeKernelAddresSpace
and instead makes use of the existing MmInitializeHandBuiltProcess, cleaning up the user-mode allocations previously made. Even though all address spaces now have an owner and are part of a
process, MmGetAddressSpaceOwner will still return NULL for now, to remain backwards compatible with legacy code.


svn path=/trunk/; revision=34876
2008-07-28 00:43:57 +00:00
ReactOS Portable Systems Group
487609a995 The puzzle of the design decisions behind the React address space structure continues to be troubling (perhaps there was no design?). Every time a process address space is initialized,
the owner process is stored (which we now use to figure out the lowest address). Recall that NULL means kernel, anything else means per-process. This is great, except that after some
painfull header groking, one understands that the PMADDRESS_SPACE structure is actually *not* a separate structure, but embedded within PEPROCESS itself. It is a React-specific structure
(hence the attempts to get rid of it), that seems to have been "overloaded" on top of the VadRoot structure that Windows uses for user-mode memory allocations. To clarify, this structure
is actually embedded inside the process that owns it, except for the kernel address space, which is a global variable. So there's absolutely *no* point in saving a reference to the owner
process, since we'll always be embedded inside it (except for kernel address space).
This patch creates the MmGetAddressSpaceOwner macro which either returns NULL for kernel address space, or uses the CONTAINING_RECORD macro to return the owner (embedded) process. 


svn path=/trunk/; revision=34873
2008-07-27 23:53:04 +00:00
ReactOS Portable Systems Group
908aede2ef - Remove MiGetUserPageDirectoryCount from the ARM Mm since this function is now useless after our cleanups.
svn path=/trunk/; revision=34872
2008-07-27 23:48:19 +00:00
ReactOS Portable Systems Group
62278bab4a More over-engineering: there really isn't any reason to keep track of the "LowestAddress" of the process' addres space. At first sight, this looked like a dynamic value that would define the
lowest address at which the process has allocated memory, but this isn't the case -- the variable actually defines the lowest valid address a process can allocate memory at. This is pretty
much a static value, that was compute by MmInitializeProcessAddressSpace, to either MM_LOWEST_USER_ADDRESS or MmSystemRangeStart, based on whether or not the address space has an owner process
(meaning it is a user-mode address space) or not (meaning it is a kernel mode address space).
This patch removes that value and all the complex code around checking it, and replaces it with a much simpler design: if there is an owner process, use MM_LOWEST_USER_ADDRESS during gap
calculations, otherwise, use MmSystemRangeStart. This is both faster, and wastes less space by not tracking static data.


svn path=/trunk/; revision=34869
2008-07-27 23:03:20 +00:00
Johannes Anderwald
bbf489032b - implement changing drive volume name
- display default volume label "local disk" if there is no title
- verify that provided clsid is valid
- display drive property dialog
- note: changing volume label currently leads to a crash

svn path=/trunk/; revision=34867
2008-07-27 22:58:19 +00:00
ReactOS Portable Systems Group
8daee04c2a It seems unclear as to what the point of the Page Reference Count Table in the React Addres Space structure really was. It seems an over-engineered approach that actually causes more problems
then it attempts to solve. The idea is to be able to unmap PDEs when they are not required anymore (a noble idea), which saves you 4KB of non-paged pool whenever a process frees a chunk
of 4MB memory (oversimplification). The problem is that to keep track of this, an extremly expensive series of branches, comparisons, masks and shifts is applied every single time that
a page is mapped or unmapped. It also adds 8KB of non-paged pool to keep track of the references, which in some cases can be more wasteful than keeping the page tables around.
Finally, if the process quickly allocates and de-allocates memory in the same PDE range, we will effectively map and unmap the PDE continously, fragmenting hyperspace and slowing down perf.
This patch removes this functionality from the system and re-uses the code that was already present in Mmi386ReleaseMmInfo (with some optimizations and changes) to do this unmapping when the
process exists. This should make things faster, with a very small amount of increased memory footprint (we're talking about less than 100kb of non paged pool, in worse-case scenarios). 


svn path=/trunk/; revision=34865
2008-07-27 22:39:54 +00:00
ReactOS Portable Systems Group
ac0487dfa5 - Fix a couple of bugs, and majorly refactor MmDeleteVirtualMapping to sync it to the x86 version somewhat more.
svn path=/trunk/; revision=34859
2008-07-27 20:58:23 +00:00
Jeffrey Morlan
8054941a9f - Work with screen buffer data using pointers rather than offsets; remove confusing GET_CELL_BUFFER and SET_CELL_BUFFER macros.
- CsrFreeProcessData: Merge two ifs with the same condition.
- Use the pointer-to-pointer trick to simplify linked list handling in CsrFreeProcessData, IntInsertAliasHeader, IntInsertAliasEntry, and IntDeleteAliasEntry.

svn path=/trunk/; revision=34858
2008-07-27 20:08:18 +00:00
ReactOS Portable Systems Group
027390f247 - Major cleanup, refactoring, and bugfixing of ARM Mm code in preparation for user-mode support.
- Sync the code a lot closer to its x86 counterpart, still more work to be done.
- Very soon, it should be possible to share upward of 50% of the new ARM code with the x86 version of React as well and unify the implementations.

svn path=/trunk/; revision=34857
2008-07-27 19:52:41 +00:00
Hervé Poussineau
246c0ca9d0 Revert r34848 and r34850, and replace them by a real fix (hinted by Colin Finck)
svn path=/trunk/; revision=34856
2008-07-27 19:39:05 +00:00
Colin Finck
f5c074984b Maciej Bialas (bjauy@tlen.pl)
- Add '#include <cstring>', so newer gcc's don't complain about a missing memset function

See issue #3595 for more details.

svn path=/trunk/; revision=34855
2008-07-27 19:10:44 +00:00
Hervé Poussineau
e66ffe54fe Fix code to correctly handle first object file.
It was luckily working because first file was always conditional.

svn path=/trunk/; revision=34854
2008-07-27 17:12:44 +00:00
Hervé Poussineau
241493fe8e Fix typo
svn path=/trunk/; revision=34853
2008-07-27 16:33:57 +00:00
Hervé Poussineau
d4d0c4fdf6 Resolve <if> and <ifnot> elements during parsing time.
Backend don't have to deal anymore with if-able modules, defines, ...

svn path=/trunk/; revision=34852
2008-07-27 16:17:50 +00:00
Aleksey Bragin
e880f2361a - ntdll should be the last library in the list, not the first or somewhere in the middle ("as it imports from nothing and everything else should be resolved with it", by Herve). This fixes some base system DLLs dependency on msvcrt (which doesn't exist in Windows). Thanks Herve!
svn path=/trunk/; revision=34851
2008-07-27 16:03:38 +00:00
Hervé Poussineau
f958aedf05 Define __LINUX__ for build tools if host is Linux
svn path=/trunk/; revision=34850
2008-07-27 15:49:18 +00:00
Hervé Poussineau
4d5f9f73ed Add a variable to include support for ELF format
svn path=/trunk/; revision=34849
2008-07-27 15:48:00 +00:00
Hervé Poussineau
9f882f816a Define __LINUX__ for build tools if host is Linux
svn path=/trunk/; revision=34848
2008-07-27 15:32:40 +00:00
Jeffrey Morlan
f3fa3ee47e Improvements to cmd ConPrintfPaging:
- Even if there is a console, don't do paging when output is redirected to a file; it would just confuse users with prompts they can't see.
- Instead of WriteFile, use WriteConsole (which has a convenient Unicode version).
- Rework the paging algorithm: don't treat end of string the same way as end-of-line (was causing nul bytes to be output after strings that didn't end with \n), and output multiple lines at once when possible.
- Use the screen buffer width, not the window width, to determine when wrapping will happen.
- Take the initial cursor position into account.

svn path=/trunk/; revision=34847
2008-07-27 14:03:44 +00:00
Hervé Poussineau
12a1603c6e Factorize code for simple module types
svn path=/trunk/; revision=34846
2008-07-27 14:01:24 +00:00
Colin Finck
6b50b9e320 Daniel Verkamp (daniel.verkamp@gmail.com):
- Fix buildno warnings when compiled with GCC 4.2.x or later
See issue #3578 for more details.

svn path=/trunk/; revision=34844
2008-07-27 13:34:53 +00:00
Hervé Poussineau
72fbdac08a Use hal.spec file for i386 build
svn path=/trunk/; revision=34841
2008-07-27 09:56:21 +00:00
Hervé Poussineau
615f0216fa Add support for fastcall functions in .spec files
svn path=/trunk/; revision=34837
2008-07-27 09:12:37 +00:00
Hervé Poussineau
0bd0421c3b Add a .spec file for HAL exports. Don't use it yet
svn path=/trunk/; revision=34836
2008-07-27 09:07:59 +00:00
Hervé Poussineau
127f001ffc Preprocess kernel .spec files
svn path=/trunk/; revision=34830
2008-07-27 08:26:42 +00:00
Hervé Poussineau
f9299e18b2 Prevent code duplication when translating GCC platform defines to MSVC ones.
svn path=/trunk/; revision=34829
2008-07-27 08:18:07 +00:00
Art Yerkes
43bf5f1b02 More specific error messages. More correct according to winetests.
svn path=/trunk/; revision=34828
2008-07-27 08:12:12 +00:00
ReactOS Portable Systems Group
27fab2e256 - Build "smlib", "nt", and "smss" on ARM, since the kernel now tries to load the first user-mode process.
- MmCreateProcessAddressSpace is unimplemented.


svn path=/trunk/; revision=34825
2008-07-27 05:44:56 +00:00
ReactOS Portable Systems Group
ea820b22a1 - On ARM, print out a message and freeze execution inside the native process main routine wrapper. This is essentially the first line of code that will execute in user-mode, and we need to know (celebrate) about it.
svn path=/trunk/; revision=34824
2008-07-27 05:40:31 +00:00
ReactOS Portable Systems Group
8fbd2ddb5b - Fix NTDLL exports on ARM.
svn path=/trunk/; revision=34823
2008-07-27 05:39:31 +00:00
ReactOS Portable Systems Group
8dbe67ba2f - Fix double semicolon.
svn path=/trunk/; revision=34822
2008-07-27 05:39:17 +00:00
ReactOS Portable Systems Group
574cb20678 - MmDeleteVirtualMapping can be called for memory that isn't mapped yet -- just ignore this like we do on x86.
- This gets us much farther, to the point where we try to load smss.exe but can't find it.


svn path=/trunk/; revision=34821
2008-07-27 05:38:51 +00:00
ReactOS Portable Systems Group
b66ab06e30 - Stop adding those damn @ decorations to ARM builds.
svn path=/trunk/; revision=34820
2008-07-27 05:37:54 +00:00
ReactOS Portable Systems Group
54f208ec84 - Silence debug prints.
svn path=/trunk/; revision=34819
2008-07-27 05:37:38 +00:00
James Tabor
5296beccd9 Turn off WH_CALLWNDPROC and WH_GETMESSAGE debug spam.
svn path=/trunk/; revision=34818
2008-07-27 00:56:18 +00:00
Jeffrey Morlan
b1086dbdae Move console alias functions from csrss to win32csr, and make aliases per-console.
svn path=/trunk/; revision=34817
2008-07-27 00:41:45 +00:00
Jeffrey Morlan
198d88a60b - In cmd, add ConOutResPrintf and ConErrResPrintf functions for printf-ing from a resource string; use it to shorten several instances of LoadString+Con*Printf.
- Also change FilePromptYN and FilePromptYNA to take a resource ID. Remove varargs code which nobody used (and didn't actually work anyway)

svn path=/trunk/; revision=34816
2008-07-26 22:49:49 +00:00
Matthias Kupfer
33ab9a11a5 reenable Norwegian language and keyboard layout (tested by Frode Lillerud)
svn path=/trunk/; revision=34815
2008-07-26 22:20:02 +00:00
James Tabor
5bf50a8d93 - Fix crash in callback and disable HCBT_CREATEWND until it is implemented correctly. Hooks seem to be working.
svn path=/trunk/; revision=34814
2008-07-26 22:06:31 +00:00
Jeffrey Morlan
6320253c94 In mkdir, don't add a backslash to the end - it can trick CreateDirectory into creating a dir with the name of a DOS device (even in Windows).
svn path=/trunk/; revision=34810
2008-07-26 17:15:37 +00:00
Jeffrey Morlan
cbf6a79f07 - IntWriteConsoleInput: Copy the data *to* the capture buffer, not *from* it!
- Move code for handling ^C (plus that weird pseudo-scrolling thing) from ConioProcessChar to ConioProcessKey, so that WriteConsoleInput won't generate ctrl events.
- ConioProcessChar: Remove redundant NULL == Console checks (Console can't be NULL at this point), and move debug message into the check in ConioProcessKey.

svn path=/trunk/; revision=34808
2008-07-26 15:20:21 +00:00
James Tabor
e153b69952 - Attempt to initiate hook set from kernel space.
svn path=/trunk/; revision=34807
2008-07-26 12:27:40 +00:00
Aleksey Bragin
138fbd967b Jon Griffiths
msvcrt: Implement ___setlc_active_func/___unguarded_readlc_active_add_func

svn path=/trunk/; revision=34806
2008-07-26 11:54:54 +00:00
Aleksey Bragin
9db3c82bb7 - Sync with Wine (null-initializing some exported data).
svn path=/trunk/; revision=34805
2008-07-26 11:45:59 +00:00
James Tabor
37cf6bcd75 - Fix boot add missing return.
svn path=/trunk/; revision=34799
2008-07-26 00:25:42 +00:00
James Tabor
996438fdc6 - Replace Global flag.
svn path=/trunk/; revision=34797
2008-07-26 00:03:31 +00:00
James Tabor
9bec76e407 - Fix NtUserCallMsgFilter so it initiates the hook call.
svn path=/trunk/; revision=34794
2008-07-25 23:08:50 +00:00
Hervé Poussineau
4b1181962c Cleanup code
svn path=/trunk/; revision=34793
2008-07-25 20:28:59 +00:00
Hervé Poussineau
e99c0ad3a9 Add comments
Better interface declarations

svn path=/trunk/; revision=34792
2008-07-25 20:27:05 +00:00
Hervé Poussineau
242b0d5be5 Replace DPRINT/DPRINT1 by dynamic traces
svn path=/trunk/; revision=34791
2008-07-25 20:24:46 +00:00
Hervé Poussineau
042289aad8 Notify kernel when configuration is good
svn path=/trunk/; revision=34790
2008-07-25 20:16:16 +00:00
Hervé Poussineau
9ba8702be9 Apply again r34533: rename autogenerated makefile to makefile-$(ARCH).auto,
except for i386, due to a bug in RosBE which cleans only makefile.auto and not makefile*.auto

svn path=/trunk/; revision=34789
2008-07-25 19:07:36 +00:00
Hervé Poussineau
d62f18210a Revert incorrect fix committed in r34077 by cfinck, and replace it by a better one.
svn path=/trunk/; revision=34788
2008-07-25 18:45:54 +00:00
Johannes Anderwald
7cf8ccf54f - identation janitor
svn path=/trunk/; revision=34784
2008-07-25 14:04:37 +00:00
Art Yerkes
6ae9a99375 Fix several problems with lookasides and temporary captures:
ob_x.h: Add a proper define for the size of a lookaside name buffer
oblink.c: Use move memory rather than copy in the case that we re-use the name
  buffer.  We probably never reused it before, because MaximumLength was never
  set properly.  See below.
oblife.c: Several things
  ObpCaptureObjectName
  - Properly set MaximumLength rather than copping out and setting it to just
    string + nul.  This was dangerous because later, we'll use MaximumLength
    to determine whether we allocated the name from the lookaside list or the
    heap.
  - Since we use MaximumLength to determine where the allocation came from
    make sure that MaximumLength never equals the magic value if the string
    comes from the heap for whatever reason.
  - Free the string using the right symmetry if we would fault copying.
  ObpCaptureObjectCreateInformation
  - We didn't allocate the ObjectCreateInfo, but we might've allocated the
    security descriptor, so free it if needed, rather than borking some non
    heap.

svn path=/trunk/; revision=34783
2008-07-25 13:42:05 +00:00
James Tabor
4e945c2292 - Fix loading hooks.
svn path=/trunk/; revision=34777
2008-07-25 12:43:55 +00:00
James Tabor
f123580aa0 - Add support for SMTO_NOTIMEOUTIFNOTHUNG.
- Fix WH_CALLWNDPROC/RET for multi thread.
- Fix foreground idle.

svn path=/trunk/; revision=34776
2008-07-25 12:31:59 +00:00
James Tabor
9f5f04ab20 Check for null pointers, keep wine msg test from crashing.
svn path=/trunk/; revision=34774
2008-07-25 12:26:22 +00:00
James Tabor
0104c42bb4 Fix typo.
svn path=/trunk/; revision=34767
2008-07-25 01:07:41 +00:00
James Tabor
c688d08ea3 - Add call window proc hooks.
svn path=/trunk/; revision=34766
2008-07-25 01:02:17 +00:00
James Tabor
fc15d06386 - Finish callback for WH_KEYBOARD.
svn path=/trunk/; revision=34764
2008-07-24 22:14:50 +00:00
Jeffrey Morlan
eb40678d1d Fix crash in NtUserSetClipboardData with CF_TEXT format. (Bug 3536)
svn path=/trunk/; revision=34763
2008-07-24 22:08:50 +00:00
James Tabor
eaa1dbeb84 - Plug in WH_KEYBOARD callback.
svn path=/trunk/; revision=34762
2008-07-24 22:00:41 +00:00
James Tabor
8c9a96581a Add two more CallNextHook finctions.
svn path=/trunk/; revision=34759
2008-07-24 21:39:00 +00:00
Johannes Anderwald
d228207f6f - enumerate all file types for folder options namespace applet
- use mui string when available
- load the title from shell32 module base
- remove PSH_PROPTITLE flag

svn path=/trunk/; revision=34757
2008-07-24 21:26:36 +00:00
Hervé Poussineau
eac2f712a7 Use a common .spec file instead of a .def file per architecture
svn path=/trunk/; revision=34755
2008-07-24 20:54:32 +00:00
Hervé Poussineau
c67da0d485 Update IDL file with new MS Vista functions
svn path=/trunk/; revision=34751
2008-07-24 19:50:09 +00:00
Aleksey Bragin
a6b1581db5 - MiGetLastKernelAddress was totally broken on x86 and always returned the highest available physical page, thus the PFN database always end up at the address 0x80000000 and higher (just before the kernel). And when PFN database's size was bigger than usual (e.g. 1Gb of RAM and more), the PFN database zeroed out the kernel. This logic was introduced by 32640 commit.
- Fix the logic so it really gives the last kernel address, as function name suggests. If you want to change the logic of the function, then rename it accordingly.
See issue #3507 for more details.

svn path=/trunk/; revision=34737
2008-07-24 12:18:26 +00:00
James Tabor
e928cd52fd - Added more hook points. Setup WH_MOUSE with callbacks, seems to be preloaded. Started BroadcastSystemMessage.
- Tested with Opera 9.51, FF, Seamonkey, Abiword, Miranda and the rest of our applications.

svn path=/trunk/; revision=34736
2008-07-24 11:38:08 +00:00
Aleksey Bragin
face282d9f Dmitry Gorbachev
- Fix warnings in host tools.
See issue #3539 for more details.

svn path=/trunk/; revision=34734
2008-07-24 11:05:22 +00:00
Ged Murphy
5032762531 - dependencies is a double terminated string array
- patch by bugboy <martinmnet at hotmail dot com>

svn path=/trunk/; revision=34729
2008-07-24 07:57:20 +00:00
Timo Kreuzer
5f3d8cbe06 forgot this one: a stubbed out loader.c copied from i386
svn path=/branches/ros-amd64-bringup/; revision=34728
2008-07-24 02:30:36 +00:00
Timo Kreuzer
ceaa5e63d3 Implement a LoaderEntry, a function to setup a pagetable, a function to switch to long mode, a function to switch to real mode, Int386 to call interrupts, add some defines for amd64, enable full debug output.
now setupldr should compile, and start it's work. It boots into long mode, reads the memory layout from bios and finally crashes, because the page table is limited to a single page of 2MB atm

svn path=/branches/ros-amd64-bringup/; revision=34727
2008-07-24 02:27:00 +00:00
Timo Kreuzer
9ee9e193f1 - implement _alloca (untested), ChainLoadBiosBootSectorCode, SoftReboot
- copy drvmap.S, i386cpu.S, i386idt.S, i386pnp.S, i386trap.S, mb.S

svn path=/branches/ros-amd64-bringup/; revision=34726
2008-07-24 02:18:44 +00:00
Timo Kreuzer
bc5810d71a freeldr:
- add amd64 to rbuild files
- add include/amd64 and arch/amd64 and copy some files from i386, maybe we can later share some of them between those architectures
- convert fathelp.asm to fathelp.S so we can link it. Content stays the same as for i386

svn path=/branches/ros-amd64-bringup/; revision=34725
2008-07-24 01:48:44 +00:00
Timo Kreuzer
b0ef62e022 freeldr:
- use strtoull for reading a pointer
- use %p in a debugprint instead of cast to int

svn path=/branches/ros-amd64-bringup/; revision=34724
2008-07-24 01:34:28 +00:00
Timo Kreuzer
52521c8876 freeldr:
- fix several ULONG to pointer casts

svn path=/branches/ros-amd64-bringup/; revision=34723
2008-07-24 01:25:43 +00:00
Timo Kreuzer
25248671ed freeldr:
- make SectionId a ULONG_PTR
- same for some Loaderblock members

svn path=/branches/ros-amd64-bringup/; revision=34722
2008-07-24 01:22:30 +00:00
Timo Kreuzer
27c15e2b72 comment out 2 unneeded libs, that don't compile
svn path=/branches/ros-amd64-bringup/; revision=34721
2008-07-24 01:07:48 +00:00
Timo Kreuzer
9a787689f7 - rename _toul to _toulptr and make it return an ULONG_PTR
svn path=/branches/ros-amd64-bringup/; revision=34720
2008-07-24 01:06:22 +00:00
Timo Kreuzer
318a837c35 last fixes for crt. Those are messing with handles and casting between 32 and 64 bit. I'm not sure if it's correct, probably not...
crt and libcntpr now compile warning free on amd64

svn path=/branches/ros-amd64-bringup/; revision=34719
2008-07-24 00:58:16 +00:00
Timo Kreuzer
267c44c1b1 - int -> intptr_t
- unsigned long -> uintptr_t
- #undef _MINGW_IMPORT in ctype.c, to avoid warnings

svn path=/branches/ros-amd64-bringup/; revision=34718
2008-07-24 00:54:12 +00:00
Timo Kreuzer
8a9b9256be Patch from Samuel Serapion ("encoded", samdwise51 at gmail dot com):
- fix prototypes of _findfirst, _findnext, _findclose, _findfirsti64, _findnexti64 _wfindfirst, _wfindnext, _wfindfirst64, _wfindnext64, strndup, 
- fix a number of pointer to int casts

svn path=/branches/ros-amd64-bringup/; revision=34717
2008-07-24 00:20:01 +00:00
Timo Kreuzer
31e3f10a45 rtl:
- amd64/add debug_asm.S (FIXME)
- cast AtomName to ULONG_PTR instead of ULONG
- RtlQueryProcessdebugInformation(): cast teb->Cid.UniqueProcess to ULONG_PTR for assignment to Pid. (should ProcessId parameter be ULONG_PTR, too?)
- vs(w)nprintf: cast argument to ULONG_PTR instead of unsigned long for a %p
- comment out some inlined Interlocked functions that shouldn't be there anyway
Now rtl can be compiled

svn path=/branches/ros-amd64-bringup/; revision=34716
2008-07-23 23:56:37 +00:00
Timo Kreuzer
cc5298d837 comment out a few libs for now that don't build
svn path=/branches/ros-amd64-bringup/; revision=34715
2008-07-23 23:40:33 +00:00
Timo Kreuzer
e7311c8d53 recyclebin:
- DWORD -> SIZE_T and SIZE_T -> DWORD

svn path=/branches/ros-amd64-bringup/; revision=34714
2008-07-23 23:37:01 +00:00
Timo Kreuzer
bd414d2f91 fix NtCurrentTeb()
svn path=/branches/ros-amd64-bringup/; revision=34713
2008-07-23 23:28:07 +00:00
Timo Kreuzer
08ca7e8b0f fix KeGetCurrentPrcb() inline function
svn path=/branches/ros-amd64-bringup/; revision=34712
2008-07-23 23:18:45 +00:00
Timo Kreuzer
68c4fc0511 add amd64 ketypes.h and mmtypes.h copied from x86
svn path=/branches/ros-amd64-bringup/; revision=34711
2008-07-23 23:17:46 +00:00
Timo Kreuzer
07a47f0686 update some loader structs ULONG -> ULONG_PTR / SIZE_T
svn path=/branches/ros-amd64-bringup/; revision=34710
2008-07-23 23:03:57 +00:00
Timo Kreuzer
536ae9a084 add size_t definition to _mingw.h (ported from mingw)
svn path=/branches/ros-amd64-bringup/; revision=34709
2008-07-23 23:00:47 +00:00
Timo Kreuzer
630562934e fix LIST_ENTRY() macro for 64 bits
svn path=/branches/ros-amd64-bringup/; revision=34708
2008-07-23 22:56:10 +00:00
Timo Kreuzer
40969b4e16 winddk.h:
- add InterlockedCompareExchangePointer and InterlockedExchangePointer
- add intrinsic port and register access functions

svn path=/branches/ros-amd64-bringup/; revision=34707
2008-07-23 22:53:04 +00:00
Timo Kreuzer
5d199fcb97 - fix ENUMRESLANGPROC, ENUMRESNAMEPROC and ENUMRESTYPEPROC
- add Interlocked functions for pointers

svn path=/branches/ros-amd64-bringup/; revision=34706
2008-07-23 22:49:16 +00:00
Timo Kreuzer
a7d12287a5 - fix IMAGE_FIRST_SECTION macro
- implement GetCurrentFiber(), NtCurrentTeb() and YieldProcessor()


svn path=/branches/ros-amd64-bringup/; revision=34705
2008-07-23 22:45:52 +00:00
Timo Kreuzer
60e9de3ce1 Implement _InterlockedAnd64, _InterlockedOr64, _interlockedbittestandreset64, _interlockedbittestandset64 and gs-segment-adressing functions
- as amd64 shares most of the intrinsics of x86, implement them in intrin_x86.h

svn path=/branches/ros-amd64-bringup/; revision=34704
2008-07-23 22:27:50 +00:00
Timo Kreuzer
923a014a4c fix inline versions of integer <-> pointer conversion functions
svn path=/branches/ros-amd64-bringup/; revision=34703
2008-07-23 22:24:04 +00:00
Timo Kreuzer
e5f02915a1 ndk:ldrtypes.h : convert LDR_RESOURCE_INFO members from ULONG to ULONG_PTR
svn path=/branches/ros-amd64-bringup/; revision=34702
2008-07-23 22:21:41 +00:00
Timo Kreuzer
0612cc0e7b create rbuild files and strip everything from build, except freeldr.
svn path=/branches/ros-amd64-bringup/; revision=34701
2008-07-23 22:14:10 +00:00
Timo Kreuzer
f339a8396c Make ncitool create syscall stubs for amd64. We use the same as for x86 for now.
svn path=/branches/ros-amd64-bringup/; revision=34700
2008-07-23 22:00:43 +00:00
James Tabor
ca0afa576e - Fix show window call and add message calls for future hook support.
svn path=/trunk/; revision=34698
2008-07-23 21:18:48 +00:00
James Tabor
d7c9b915da Enable message filter hooks and add call hook support for debug hook.
svn path=/trunk/; revision=34697
2008-07-23 20:24:49 +00:00
James Tabor
2ca130fb8b - Fix NtUserCallMsgFilter to use SEH. Add support for system commands related to hooks.
svn path=/trunk/; revision=34696
2008-07-23 19:59:20 +00:00
Aleksey Bragin
3383fdae0a - Partly revert 24104: "I do not known if I done right in NtGdiRealizePalette step2, step2 is not tested." - if you don't know, don't do at all!
Memory DC "supports drawing operations on a bitmap" according to MSDN, so why changing device's palette? I think it was not done for a reason, and if you can't test, don't touch before you have a test application.
- Reformat another part of 24104, and include warning messages too, to track palette failures.
- Put two mandatory debug prints to see when the code is being hit (one to memory managed DC case, and another one to the code commented out by Jim).
- Tested with abiword, FF 1.5 and 2.0, openoffice 2.0 installer, in 8, 24 and 32 bit color modes, no problem arised, and no debug messages flood happened.

svn path=/trunk/; revision=34695
2008-07-23 18:20:32 +00:00
Jeffrey Morlan
4246bf6783 - Implement handle access checking on all console functions.
- OpenConsoleW: Fourth parameter is actually share mode (passing a number from 0 to 2 will usually give ERROR_SHARING_VIOLATION on Windows)
- CreateFileW: Move CONIN$/CONOUT$ handling after dwCreationDisposition checks (it must be valid, even though it doesn't matter which it is); pass FILE_SHARE_READ|FILE_SHARE_WRITE to OpenConsoleW (dwShareMode is ignored).
- CloseConsoleHandle, CsrReleaseObject, CsrVerifyObject: Remove IsConsoleHandle checks - Windows ignores lower 2 bits of handle for closing and verifying.
- SetConsoleMode: Remove IsConsoleHandle check - it's redundant, since the same check is done in CsrGetObject.
- CsrIsConsoleHandle, CsrReleaseObjectByPointer: Clean up a bit.
- CsrFreeConsole: Remove the process from the console's list.

svn path=/trunk/; revision=34694
2008-07-23 16:21:46 +00:00
Aleksey Bragin
dd1b21d54b - Revert 20424 and do a proper fix: Check if pool allocation succeeded right after allocation, not at the end of the function, when the pointer has been used quite a few times already.
svn path=/trunk/; revision=34693
2008-07-23 15:18:25 +00:00
Christoph von Wittich
981b8ac8ca fix all kernel32 version winetests
svn path=/trunk/; revision=34692
2008-07-23 11:19:01 +00:00
James Tabor
0868fdb45d - Fixed CallNextHookEx, now we do make the callback. Q, how to reload it at the end of the list? Fix for bug 3549.
- Tested with Opera 9.51(still breaks when getting the page see bug 3465), FF, Seamonkey, Abiword, and the rest of our applications.

svn path=/trunk/; revision=34691
2008-07-22 23:46:31 +00:00
Art Yerkes
e115c9270c Patch by Cameron Gutman (aicommander <at> gmail <dot> com)
Fixed my mistake leaving TCPConnect on a failure path without releasing the
TCP lock.

svn path=/trunk/; revision=34690
2008-07-22 23:11:46 +00:00
Matthias Kupfer
6e39ab797b revert on request, problem remains
svn path=/trunk/; revision=34689
2008-07-22 20:16:12 +00:00
Matthias Kupfer
82765169f6 it's mean to move main window with focus in front of a modal dialog
svn path=/trunk/; revision=34688
2008-07-22 18:51:09 +00:00
Jeffrey Morlan
0cc9f32797 - Implement access masks and optional inheritability for console handles. Currently, only CsrDuplicateHandle actually checks the access mask.
- CreateFileW: Pass CONIN$/CONOUT$ opens to OpenConsoleW.
- DuplicateConsoleHandle: Remove ProcessId from request structure, since console handles can only be duplicated in the calling process.
                          Don't check low bits of handle (Windows ignores them), but do check options and (if DUPLICATE_SAME_ACCESS is not specified) access mode. 
- OpenConsoleW: Make wsName parameter const; allow any combination of GENERIC_READ and GENERIC_WRITE, don't require both.
- CreateConsoleScreenBuffer: Add parameter checks; return INVALID_HANDLE_VALUE (not FALSE) on failure.
- Remove remnants of unnecessary handle in Get/SetConsoleTitle.
- CsrDuplicateHandle: Implement DUPLICATE_CLOSE_SOURCE and DUPLICATE_SAME_ACCESS options.

svn path=/trunk/; revision=34685
2008-07-22 17:37:13 +00:00
Art Yerkes
b026106358 Reenable kdbg specific settings.
svn path=/trunk/; revision=34683
2008-07-22 13:12:14 +00:00
Art Yerkes
5c108dbe7d Patch by Cameron Gutman (aicommander <at> gmail <dot> com)
- Fix a few issues in the cancel routine
- Don't wait on an event we haven't set
- Don't mark the IRP pending when in DispPrepareIrpForCancel

svn path=/trunk/; revision=34682
2008-07-22 12:53:25 +00:00
Aleksey Bragin
b10a7debe3 - PFN_DrvMovePanning type is not part of DDK/WDK's winddi.h, so it shouldn't have been added to ReactOS DDK as well. Move it to ntgdityp.h.
svn path=/trunk/; revision=34679
2008-07-22 11:24:56 +00:00
Johannes Anderwald
c18f0a3fb9 - fix multiple bugs in mydocuments shellfolder:
- zero initialize buffer
- check return value of SHGetSpecialFolderPathW
- zeroize buffer in ISF_MyDocuments_fnGetDisplayNameOf


svn path=/trunk/; revision=34678
2008-07-22 11:20:01 +00:00
Aleksey Bragin
70b9b15c69 - Set eol-style to native.
svn path=/trunk/; revision=34676
2008-07-22 10:35:49 +00:00
ReactOS Portable Systems Group
e0f2814f6b - Build and add ntdll for ARM.
- We now correctly mount the boot partition, scan for system drivers (none yet), and attempt loading ntdll.
- This actually works --  meaning the RAMdisk driver is working perfectly with vfatfs.sys and providing a virtual drive.
- We crash during mapping ntdll.dll due to some Mm issues we need to work out.
- Yes, we're almost at user-mode.

svn path=/trunk/; revision=34675
2008-07-22 10:00:04 +00:00
ReactOS Portable Systems Group
148fbeb8b3 - Forgot to merge these changes in as well -- they relate to the LARGE_INTEGER changes in the ramdisk header file.
svn path=/trunk/; revision=34674
2008-07-22 09:57:36 +00:00
ReactOS Portable Systems Group
4819929961 - Add arm subdirectory with stubs for functions that we'll need to implement later.
svn path=/trunk/; revision=34673
2008-07-22 09:55:38 +00:00
ReactOS Portable Systems Group
49deb2850d - Make exports per-architecture.
- Remove x86-only libc exports from ARM version of NTDLL.


svn path=/trunk/; revision=34672
2008-07-22 09:54:52 +00:00
ReactOS Portable Systems Group
3949f16431 - Remove dependency on GCC-specific extension: the kernel sets the base address of NTDLL as the first argument of the user APC.
svn path=/trunk/; revision=34671
2008-07-22 09:52:44 +00:00
ReactOS Portable Systems Group
f648851cfa - Remove obsolete header.
svn path=/trunk/; revision=34670
2008-07-22 09:52:11 +00:00
Christoph von Wittich
23452e24a7 use the address of the value, not the value itself
patch by Gregor Schneider <grschneider at gmail.com>
See issue #3547 for more details.

svn path=/trunk/; revision=34669
2008-07-22 09:38:03 +00:00
ReactOS Portable Systems Group
d69ea33500 - Don't re-map the MDL if it's already been built from non-paged pool.
- Hackforce the partition type for disk ramdisks to be FAT32 for now.


svn path=/trunk/; revision=34668
2008-07-22 09:32:02 +00:00
ReactOS Portable Systems Group
4cdbf59086 - We need to call MmMarkPageMapped for virtual mappings, except for those created thgouh MmCreateVirtualMappingForKernel (even though the other versions of the call can still do kernel mappings).
- Refactored the virtual mapping function to support this. MmUnmapIoSpace now works properly.

svn path=/trunk/; revision=34667
2008-07-22 09:31:13 +00:00
ReactOS Portable Systems Group
6c50287599 - Initialize BytesPerSector, SectorsPerTrack and NumberOfHeads to zero.
- Calculate number of cylinders too now.
- Save number of hidden sectors as well.
- Implement support for IOCTL_DISK_GET_PARTITION_INFO (RamdiskGetPartitionInfo).
- Implement support for IOCTL_DISK_GET_DRIVE_GEOMETRY (shared with IOCTL_CDROM_GET_GEOMETRY, IOCTL_STORAGE_GET_MEDIA_TYPES and IOCTL_DISK_GET_MEDIA_TYPES)
- DiskLength should be a LARGE_INTEGER.
- DiskOffset should be signed.


svn path=/trunk/; revision=34666
2008-07-22 08:52:18 +00:00
ReactOS Portable Systems Group
c61f672499 - We have to unpack the BIOS block before actually reading it.
- Now we correctly read 512 bytes per sector instead of 0.
- We are almost there!


svn path=/trunk/; revision=34665
2008-07-22 07:12:05 +00:00
ReactOS Portable Systems Group
0e52616f5f - Implement MmRawDeleteVirtualMapping.
- RamdiskUnmapPages works now.


svn path=/trunk/; revision=34664
2008-07-22 07:11:33 +00:00
ReactOS Portable Systems Group
1f497aae89 - Jesus, Fix yet another math bug in RamdiskMapPages (we were lucky not to hit it, that's all).
- Implement RamdiskUnmapPages.
- Need to implement MmRawDeleteVirtualMapping to make this last step work.


svn path=/trunk/; revision=34663
2008-07-22 06:54:25 +00:00
ReactOS Portable Systems Group
7fdb4518b7 - Epic Fail? Fix another math bug...it actually works now!
- Fix another wrong debug print.


svn path=/trunk/; revision=34662
2008-07-22 06:46:09 +00:00
ReactOS Portable Systems Group
22a37283cc - Double fail: Fix a math bug, calculate the actual offset in the mapping and return it, and don't forget to return the total length read too.
svn path=/trunk/; revision=34661
2008-07-22 06:40:00 +00:00
ReactOS Portable Systems Group
04dfc992a1 - Fail: was using the wrong structure (the boot sector is a BOOT_SECTOR which contains the BIOS Parameter Block, not a BPB directly).
- Fix wrong debug print too.

svn path=/trunk/; revision=34660
2008-07-22 06:31:31 +00:00
ReactOS Portable Systems Group
d543929a55 - Save base page where loader mapped the ramdisk.
- Try to implement RamdiskMapPages for boot disks as it seems we're calling them now...
- The math works and the I/O mapping too, but I'm not sure we're reading correct data, so still left this unimplemented for now.


svn path=/trunk/; revision=34659
2008-07-22 06:21:11 +00:00
ReactOS Portable Systems Group
4d7d1dfc95 - Easy there cowboy, just because you can write good code doesn't mean you shouldn't even try building it.
- Fix x86 build failure, good thing everyone is probably asleep.

svn path=/trunk/; revision=34658
2008-07-22 06:04:06 +00:00
ReactOS Portable Systems Group
2b398fba13 - Um, yeah, the "DiskType" is CLEARLY not an NT FILE_DEVICE_ constant... this makes no sense at all.
- Defined some proper constants (somewhat based on guesses, but should be mostly correct) for the DiskType.
- Now the code actually makes sense, instead of talking about CD-ROM File Systems and CD-ROMs everywhere (and Controllers and...floppies?!)


svn path=/trunk/; revision=34657
2008-07-22 05:49:52 +00:00
ReactOS Portable Systems Group
afdc43c7b2 - Not only did r34637 break the ARM build, it also doesn't make sense on x86 (or other) builds, because it assumes invalid data layout. For example, on x64 builds, the code would read random data.
- In the future, please refer to other code which loops the current processors and gets their KPRCB before attempting a half-assed implementation. KiProcessorBlock should be used.


svn path=/trunk/; revision=34656
2008-07-22 05:37:01 +00:00
ReactOS Portable Systems Group
c6a3ef9f7e - Build vfatfs instead of CDFS.
- Load vfatfs instead of CDFS.
- Implement code in the ramdisk driver to handle both ISO and FAT ramdisks. Don't know what the big deal with support ISO ramdisks was supposed to be, when our ramdisk is FAT, and dealing with FAT is a lot easier than CDFS (no TOC emulation and other rubbish that was added).


svn path=/trunk/; revision=34655
2008-07-22 05:31:24 +00:00
ReactOS Portable Systems Group
4f81cc1111 - Forgot to commit this with the last update -- this adds the PreviousTrapFrame member to the ARM _KTRAP_FRAME structure.
svn path=/trunk/; revision=34654
2008-07-22 05:28:14 +00:00
James Tabor
4f11e10d3d - Rewrite HOOKs, Implement CallNextHookEx and fix prototype for NtUserCallNextHookEx. Move hook structure to ntuser.h for user verifying.
- Tested with FF, Seamonkey, Abiword, and the rest of our applications.

svn path=/trunk/; revision=34653
2008-07-22 04:54:53 +00:00
Jeffrey Morlan
c688052ea5 - Make console handles start at 3, not 7.
- Make CsrGetObject increment the ref count to prevent objects from being deleted while in use. Add CsrReleaseObjectByPointer calls where necessary.

svn path=/trunk/; revision=34652
2008-07-22 00:33:42 +00:00
Timo Kreuzer
ff907c5360 implement HackSecureVirtualMemory as a possible workaround for missing MmSecureVirtualMemory
svn path=/trunk/; revision=34651
2008-07-21 23:56:26 +00:00
Timo Kreuzer
27afd30041 fix READ_PORT_xxx macros
svn path=/trunk/; revision=34650
2008-07-21 21:53:38 +00:00
Timo Kreuzer
533f66b5f7 fix prototypes of _beginthread and _beginthreadex
svn path=/trunk/; revision=34649
2008-07-21 21:46:24 +00:00
Jeffrey Morlan
4e1f4eaa28 MmReleasePageMemoryConsumer: When giving the page directly to a pending allocation request, zero it first. (Bug 3543)
svn path=/trunk/; revision=34647
2008-07-21 21:30:41 +00:00
Ged Murphy
03764ecabe - Fix NeedCurrentDirectoryForExePath. Based on Wine code
- Passes all kernel32:path winetests

svn path=/trunk/; revision=34644
2008-07-21 19:54:50 +00:00
Matthias Kupfer
aefde24020 - Add selectable spanish and italian keyboard layout to default language.
- This fix is temporarily until GUI 1st stage setup replaces usetup.
- See issue #3313 for more details.

svn path=/trunk/; revision=34642
2008-07-21 19:17:45 +00:00
Ged Murphy
373bd4b1da Fix Rva handling code
svn path=/trunk/; revision=34641
2008-07-21 17:50:27 +00:00
ReactOS Portable Systems Group
1738564a77 - Improve system call handler by adding more debugging checks to be used later.
- Optimize and simplify trap handling by using a common exit just like on x86's Kei386EoiHelper - KiExceptionExit. This way the code isn't duplicated 6 times.
- Do the same for system calls (KiServiceExit).
- Save the previous trap frame and restore it during each system call.


svn path=/trunk/; revision=34640
2008-07-21 15:55:58 +00:00
Matthias Kupfer
3f38468f23 avoid flicker when registering components
svn path=/trunk/; revision=34638
2008-07-21 15:52:52 +00:00
Aleksey Bragin
e9973c3d3a - Pass thread's CreateTime in QSI SystemProcessInformation.
- Better implementation of QSI SystemInterruptInformation.
- Minor cleanup.

svn path=/trunk/; revision=34637
2008-07-21 12:45:12 +00:00
Timo Kreuzer
7ac61f4d05 use %p in sprintf instead of %x / cast to int
svn path=/trunk/; revision=34636
2008-07-21 12:15:36 +00:00
Aleksey Bragin
4e663a7c28 - Include a "System Idle Process" as the first item in QSI SystemProcessInformation.
svn path=/trunk/; revision=34635
2008-07-21 12:14:23 +00:00
Ged Murphy
ee13626507 - fix the length of the dependencies string
- spotted by bugboy <martinmnet at hotmail dot com>

svn path=/trunk/; revision=34634
2008-07-21 11:43:55 +00:00
Matthias Kupfer
9bd87564c8 add language group for japanese keyboard layout
svn path=/trunk/; revision=34633
2008-07-21 10:55:33 +00:00
Matthias Kupfer
c2e433cadf - enable japanese keyboard layout in 1st stage setup (but 2nd stage doesn't but yet)
- select Swiss keyboard layout for Liechtenstein as default

svn path=/trunk/; revision=34632
2008-07-21 10:44:18 +00:00
Aleksey Bragin
7a158b7f2d Yuriy Sidorov <jura@cp-lab.com>
- Invalid parameter error is returned if requested memory area is located above USER_SHARED_DATA address (0x7FFE0000) (WinXP compatible).
- Access violation error is returned if existing memory area found on requested address and this area have uninitialized region list.
See issue #3467 for more details.

svn path=/trunk/; revision=34630
2008-07-21 09:40:12 +00:00
Aleksey Bragin
d50cea53cd - Small DPRINT typo fix.
svn path=/trunk/; revision=34629
2008-07-21 09:36:02 +00:00
Aleksey Bragin
e52a7ae321 Yuriy Sidorov <jura@cp-lab.com>
- Call DbgBreakPoint() only for main thread. It fixes debugging of multithreaded apps.
- Prevent BSOD if ObReferenceObjectByHandle failed in NtGetContextThread and NtSetContextThread.
See issue #3535 for more details.

svn path=/trunk/; revision=34628
2008-07-21 09:22:28 +00:00
Aleksey Bragin
1b7106dee1 - Remove useless USE_W32API define from .rbuilds
- Fix compilation of a number of modules.
- Delete outdated fmifs.h, the one from ReactOS includes should be used instead.
- Move more libs to /lib directory.

svn path=/trunk/; revision=34627
2008-07-21 09:15:15 +00:00
Aleksey Bragin
32bd72afd4 - Fix wrong paths to some rosapps utils.
svn path=/trunk/; revision=34626
2008-07-21 09:11:30 +00:00
ReactOS Portable Systems Group
c4a2e2e22b - Implement RamdiskReadWrite.
- Implement RamdiskReadWriteReal.
- We now have a working copy loop for both read and write operations.
- Need to implement RamdiskMapPages and RamdiskUnmapPages -- then we'll nearly be done!


svn path=/trunk/; revision=34625
2008-07-21 06:35:39 +00:00
Art Yerkes
861184aa18 Patch by Cameron Gutman (aicommander <at> gmail <dot> com)
- Forgot to remove UnlockRequest in last patch

svn path=/trunk/; revision=34624
2008-07-21 05:44:10 +00:00
ReactOS Portable Systems Group
9a54151f86 - Fix ARM exports to make up for the recent i386 changes.
- Implement MmGetPageProtect. MDL Probe And Lock now works.
- We get to RamdiskReadWrite now!


svn path=/trunk/; revision=34623
2008-07-21 01:41:04 +00:00
ReactOS Portable Systems Group
63c51607f5 - Get rid of 3 days of work due to complaints from our legal guy.
svn path=/trunk/; revision=34622
2008-07-21 01:15:07 +00:00
ReactOS Portable Systems Group
f28f30eafa - Implement IOCTL_CDROM_GET_LAST_SESSION and IOCTL_CDROM_READ_TOC.
- The formet is a hack to support ReactOS' cdfs.


svn path=/trunk/; revision=34621
2008-07-21 01:12:17 +00:00
Timo Kreuzer
35b23ed1d4 rbuild files use tab indentation
svn path=/trunk/; revision=34620
2008-07-20 23:21:16 +00:00
Jeffrey Morlan
1ee0441036 Fix KeInsertQueueApc error checking
svn path=/trunk/; revision=34619
2008-07-20 23:00:18 +00:00
Jeffrey Morlan
ec2194d205 KiMoveApcState: Fix reversal of RepairList arguments. (Bug 1720)
svn path=/trunk/; revision=34618
2008-07-20 22:48:06 +00:00
ReactOS Portable Systems Group
c1937b5160 - Now it compiles.
- Add wdk_wnet_to_ros.diff to easily merge changes with any possible future WDK updates.

svn path=/trunk/; revision=34616
2008-07-20 19:56:09 +00:00
ReactOS Portable Systems Group
77a8db07f3 - Add new CDFS driver.
- Does not compile.


svn path=/trunk/; revision=34615
2008-07-20 19:52:30 +00:00
ReactOS Portable Systems Group
87f76ea54b - Our resident GCC expert just informed me of an undocumented "enable Microsoft Compiler Extensions" flag that makes things like unnnamed members work.
- Apply the switch and remove our workaround hack.


svn path=/trunk/; revision=34614
2008-07-20 19:39:55 +00:00
Jeffrey Morlan
f956615435 In ConioConsoleCtrlEvent, don't wait for the thread to terminate; a misbehaving handler could hang CSRSS indefinitely that way. Testing on Windows shows that no waiting is done when Ctrl-C is pressed; however, there is a wait of up to 5 seconds when attempting to close the window, so add a comment in GuiConsoleHandleClose mentioning this.
svn path=/trunk/; revision=34613
2008-07-20 19:34:18 +00:00
ReactOS Portable Systems Group
840143e28a - Fix the way NlsOemLeadByteInfo is exported.
- Fix definition of PFAST_IO_UNLOCK_ALL_BY_KEY.
- Add IO_REPARSE and IO_REMOUNT definitions.
- Add IOCTL_CDROM_DISK_TYPE definition.
- Add FlagOn, BooleanFlagOn, SetFlag and ClearFlag definitions.
- Add FILE_READ_ONLY_VOLUME, FILE_SEQUENTIAL_WRITE_ONCE, FILE_SUPPORTS_TRANSACTIONS definitions.
- Add FSRTL_FLAG_ADVANCED_HEADER definition.
- Add FSRTL_FLAG2_PURGE_WHEN_MAPPED and FSRTL_FLAG2_IS_PAGING_FILE definitions.
- Add FILE_ID_FULL_DIR_INFORMATION and FILE_ID_BOTH_DIR_INFORMATION structures.
- Add FSRTL_FCB_HEADER_V0 and FSRTL_FCB_HEADER_V1 definitions.
- Add FSRTL_COMPARISION_RESULT enumeration.
- Add backwards compatibility support for non-AVL tree routines.
- Add RtlInsertElementGenericTableAvl, RtlDeleteElementGenericTableAvl, RtlLookupElementGenericTableAvl, RtlEnumerateGenericTableWithoutSplayingAvl prototypes.
- Add FsRtlSetupAdvancedHeader macro.
- Add FsRtlIsFatDbcsLegal prototype.
- Add FsRtlTeardownPerStreamContexts prototype.
- Add RtlFreeOemString, RtlOemStringToCountedUnicodeString, RtlUnicodeStringToCountedOemString, RtlOemToUnicodeN prototypes.
- Fix GenericTable prototypes in rtlfuncs.h
- It seems the ntoskrnl_i386.def exports file is totally incorrect with respect to mingw -- most FsRtl functions are not properly exported. We fixed the ones we need, someone needs to go fix this entire file.
- Add memcmp to the NTOS exports -- we're not entirely sure how you were even expecting 3rd party drivers to load in React?
- Fix FastFat's "VfatFastIoUnlockAllByKey" prototype to match the fixed up PFAST_IO_UNLOCK_ALL_BY_KEY definition.
- Clean-build-tested on i386.


svn path=/trunk/; revision=34611
2008-07-20 19:19:02 +00:00
Matthias Kupfer
f3ddaf8067 mark the current keyboard layout as checked (in popup menu)
svn path=/trunk/; revision=34610
2008-07-20 19:08:35 +00:00
Jeffrey Morlan
d9c376b18d Fix memory leak in vfwprintf: Don't change 'mem' pointer before freeing it.
svn path=/trunk/; revision=34609
2008-07-20 16:48:24 +00:00
ReactOS Portable Systems Group
b1e617cc6f - Write out all the IOCTLs the RAM Disk emulation core needs to handle.
- Looks like the React CDFS driver behaves very differently from the NT CDFS driver.


svn path=/trunk/; revision=34608
2008-07-20 16:13:19 +00:00
Matthias Kupfer
ba074059a5 Mario Kacmar <kario AT szm DOT sk>
- Slovak translation of several inf-files
- See #3518 for more details.

svn path=/trunk/; revision=34607
2008-07-20 14:58:35 +00:00
Matthias Kupfer
54ca4c3d3b - again, one more fix of damaged inf files
- please take care when committing this utf-16 files

svn path=/trunk/; revision=34606
2008-07-20 14:52:15 +00:00
ReactOS Portable Systems Group
9da9409da6 - Unlike NT, it seems React has a bug and does not automatically load the boot FS driver regardless of start type.
svn path=/trunk/; revision=34605
2008-07-20 06:36:27 +00:00
ReactOS Portable Systems Group
7158e5bfa9 - Fix the parameters we were sending to IoCreateDevice for our drive FDO.
- Now the kernel attempts to mount us through CDFS!
- Start stubbing the work we'll need to do in RamdiskDeviceControl -- this is where the emulation magic will happen.

svn path=/trunk/; revision=34604
2008-07-20 06:32:23 +00:00
ReactOS Portable Systems Group
3a6f964385 - Ramdisk doesn't seem to work yet, we're not getting properly initialized yet.
- We end up crashing in CcRosTryToInitialzeFileCache because there is no SectionObjectPointer, and it is assumed this always exists.
- We need to verify if this is truly the case -- in either case, add an ASSERT, since all assumptions should be ASSERTed!

svn path=/trunk/; revision=34603
2008-07-20 04:40:27 +00:00
ReactOS Portable Systems Group
14ea158446 - Finish implementing RamdiskCreateDiskDevice -- we should now have a working ramdisk drive that should receive read/write requests.
svn path=/trunk/; revision=34602
2008-07-20 04:39:01 +00:00
ReactOS Portable Systems Group
54694096a1 - Looks like this FIXME was fixed.
svn path=/trunk/; revision=34601
2008-07-20 04:38:26 +00:00
Art Yerkes
5ba974a93f Patch by Cameron Gutman (aicommander <at> gmail <dot> com)
- Fixes some issues with releasing locks
- Verify that we have an MDL before trying to unlock it

svn path=/trunk/; revision=34600
2008-07-20 04:33:53 +00:00
Sylvain Petreolle
f2db1bc11f french translation for media/inf files
svn path=/trunk/; revision=34598
2008-07-20 00:44:09 +00:00
ReactOS Portable Systems Group
df5fe4469c - Fixup some more structure and prototype details to make more sense.
- Start building the drive FDO extension by capturing most of the input data and our strings.

svn path=/trunk/; revision=34597
2008-07-19 22:42:18 +00:00
ReactOS Portable Systems Group
1176b541f6 - Create the RAM Disk Drive Device Object.
- Create the name for it, based on the GUID sent by the kernel.
- Create the DOS Device Symbolic Link if requested and if possible.
- Create the DOS Drive Letter if requested.
- (drivers/storage/class/ramdisk/ramdisk.c:440) Creating symbolic link: \DosDevices\C: to \Device\Ramdisk{d9b257fc-684e-4dcb-79ab-f6a2cf0350b7}
- Need to continue implementing..


svn path=/trunk/; revision=34596
2008-07-19 22:21:38 +00:00
ReactOS Portable Systems Group
8ee4e020f8 - Implement the main RamdiskWorkerThread work loop.
- Now we have to implement RamdiskCreateDiskDevice for real.

svn path=/trunk/; revision=34594
2008-07-19 21:19:41 +00:00
ReactOS Portable Systems Group
71bada1343 - We break your build, you break ours...
svn path=/trunk/; revision=34593
2008-07-19 21:04:31 +00:00
ReactOS Portable Systems Group
5bcb1c6a0e - Usually a good idea to fill out the device relation count instead of leaving it uninitailized to 2 billion.
- Fixes all the ramdisk problems -- need to implement RamdiskWorkerThread now.

svn path=/trunk/; revision=34592
2008-07-19 20:57:31 +00:00
ReactOS Portable Systems Group
46eda1013c - No, it isn't "ramdisk" that's misbehaving, it's your code. PnP needs to handle BusRelations instead of ignoring them.
svn path=/trunk/; revision=34591
2008-07-19 20:55:49 +00:00
ReactOS Portable Systems Group
910b3242e7 - It doesn't make sense to dereference an I/O Work Item... did you perhaps mean to dereference the device object?
- Fixes a crash when IoInvalidateRelations is called, as well as a reference leak.


svn path=/trunk/; revision=34590
2008-07-19 20:52:52 +00:00
ReactOS Portable Systems Group
fd5bd1942d - Seperate the Ramdisk device extension into the Bus Device Extension and the Drive Device Extension.
- Rename the device types to Bus vs Drive, not FDO vs PDO (they're both FDOs).
- Use a common extension (the first 0x60 bytes or so) between Bus and Drive devices.
- Implement first pass of RamdiskCreateDiskDevice -- doesn't create anything, just validates the parameters.
- Implement our delayed work queue for handling requests asynchronously -- SendIrpToThread. Doesn't do anything for now.
- Implement RamdiskQueryDeviceRelations... not sure if we're doing the right thing. According to PnP, we get a warning that we are "misbehaving".
- Driver seems to crash right now, needs fixes.
- Some reformatting to make more lines fit inside 80 characters so it looks nice in joe.


svn path=/trunk/; revision=34589
2008-07-19 18:44:31 +00:00
Matthias Kupfer
aa4af5693a Display of ReactOS bitmap implemented.
svn path=/trunk/; revision=34588
2008-07-19 17:20:20 +00:00
Pierre Schweitzer
909b7f0308 Fixed i386 build
svn path=/trunk/; revision=34586
2008-07-19 08:04:47 +00:00
ReactOS Portable Systems Group
49de00587a - Implement DebugService2, but don't make it do anything yet.
- Add ATTEMPTED_SWITCH_FROM_DPC bugcheck code.


svn path=/trunk/; revision=34585
2008-07-19 06:53:36 +00:00
ReactOS Portable Systems Group
c0cde8777b - Enable interrupts after probing and capturing parameters during a system call.
- Enable WFI during idle loop.
- Implement undefined exception handler, and get rid of reserved exception code -- this will never happen except for an SoC bug.
- Request an APC interrupt if the new thread we context switched to has APCs pending and enabled.
- Perform DPC watchdog debugging code if a DPC lasted more than a second.
- Do the appropriate bugcheck if DPCs are active during a context switch.
- Go over the FIXMEs in the assembly files too, and create a new FIXME-PERF category.


svn path=/trunk/; revision=34584
2008-07-19 06:53:03 +00:00
ReactOS Portable Systems Group
b95845bf85 - Cleanup some stray header issues for ARM.
- Separate kernel FIXMEs into clearer groupings:
  - TODO FIXMEs are highest priority, as they are missing required functionality.
  - USER FIXMEs are the next highest priority, since they will be required for user mode support.
  - V6 FIXMEs and future groupings are lowest priority, since they relate to hardware support we don't care about for now.


svn path=/trunk/; revision=34583
2008-07-19 06:13:10 +00:00
James Tabor
7272eb9108 Move NUMC defines to FNIDs.
svn path=/trunk/; revision=34582
2008-07-19 03:49:48 +00:00
Timo Kreuzer
8bbca850f6 RtlpCreateCriticalSectionSem: use InterlockedCompareExchangePointer instead of InterlockedCompareExchange for a handle
svn path=/trunk/; revision=34581
2008-07-18 23:47:33 +00:00
Matthias Kupfer
8fddba3256 Mario Kacmar <kario AT szm DOT sk>
- Enhancement for basic Slovak keyboard layout added.
- See #1251 for more details.

svn path=/trunk/; revision=34580
2008-07-18 21:08:52 +00:00
Matthias Kupfer
98ecafb85f Mario Kacmar <kario AT szm DOT sk>
- Enhancement for Slovak keyboard layout (QWERTY) added.
- See #3528 for more details.

svn path=/trunk/; revision=34579
2008-07-18 21:05:40 +00:00
Matthias Kupfer
820054b030 Mario Kacmar <kario AT szm DOT sk>
- Slovak and Czech translation of several rc-files
- See #3519 for more details.

svn path=/trunk/; revision=34578
2008-07-18 20:58:09 +00:00
Klemens Friedl
50147b7f55 * update GUI interface, according to http://www.reactos.org/wiki/index.php/First_Stage_GUI_Setup
svn path=/trunk/; revision=34576
2008-07-18 19:35:03 +00:00
James Tabor
ce85b4a0f3 Update WinUser, CWPRETSTRUCT and MOUSEHOOKSTRUCTEX.
svn path=/trunk/; revision=34575
2008-07-18 18:09:12 +00:00
Art Yerkes
747d575347 Patch by Cameron Gutman (aicommander <at> gmail <dot> com)
- Reenable spinlocks in MiniIndicateData
- Don't raise IRQL when calling MiniDoRequest

svn path=/trunk/; revision=34574
2008-07-18 11:19:29 +00:00
Matthias Kupfer
11f2456fdf - gui template for 1st stage setup, english only
- implemented, but still disabled - it's work in progress

svn path=/trunk/; revision=34572
2008-07-18 09:07:54 +00:00
Stefan Ginsberg
90f3efacc5 - Patch from Samuel "encoded" Serapion (samdwise51 at gmail dot com)
- Use "size_t" instead of "unsigned int" where appropriate

svn path=/trunk/; revision=34570
2008-07-17 22:25:03 +00:00
Stefan Ginsberg
7c9bd27915 - Fix a typo in the DC_ATTR structure: mxDevicetoWorld -> mxDeviceToWorld
svn path=/trunk/; revision=34569
2008-07-17 21:54:40 +00:00
Jeffrey Morlan
b4db43fa7b Clean up console code a bit:
- Get/SetConsoleTitle: Get rid of unnecessary handle creation; instead, just have csrss get the console from the ProcessData.
- Instead of using ShowX/ShowY to store the origin of the buffer, use the VirtualX member that was put there for this purpose. Rename it to VirtualY, though, since it's a row number. ShowX/ShowY should hold the position of the visible window, once that's implemented.
- From the CSRSS_CONSOLE structure: remove hActiveBuffer (redundant), CodePageId (unused), and hWindowIcon (only used as a temporary)
- Make cursor coordinates be "logical", not "physical". This simplifies various things.
- ConioConsoleFromProcessData: If process has no console, return STATUS_INVALID_HANDLE; don't pretend to succeed (causing many functions to access memory around address 0, which is probably not a good thing). Remove various Console != NULL checks which are now unnecessary.

svn path=/trunk/; revision=34568
2008-07-17 21:53:39 +00:00
Art Yerkes
ecdd55845d Patch by Cameron Gutman (aicommander <at> gmail <dot> com)
- Don't mess with cancelled IRPs
- Don't attempt to cancel an already cancelled IRP
- Unmap MDL when then IRP gets completed

svn path=/trunk/; revision=34567
2008-07-17 19:42:26 +00:00
Jeffrey Morlan
846c750785 Fix argument parsing for label command. It should not split the arguments by spaces; on Windows you can do 'label c:x y z' and it will set the label to X Y Z. (Bug 3530 #2)
svn path=/trunk/; revision=34566
2008-07-17 16:46:09 +00:00
Stefan Ginsberg
c7ed95cb55 - Patch by Cameron Gutman aicommander <at> gmail <dot> com
- Don't release the device spinlock twice if KeSynchronizeExecution returns false
See issue #3520 for more details.

svn path=/trunk/; revision=34564
2008-07-17 14:43:36 +00:00
Stefan Ginsberg
03c3603a3d -PCHify OpenGL32
svn path=/trunk/; revision=34562
2008-07-17 11:37:49 +00:00
Christoph von Wittich
30feb7b285 fix for getaddrinfo
patch by Yuri Sidorov <jura at cp-lab dot com>

svn path=/trunk/; revision=34560
2008-07-17 08:07:37 +00:00
Jeffrey Morlan
c1e4ff95a4 - CsrReleaseObject: Fix locking to prevent possibility of closing the same handle twice.
- GuiConsolePaint: Clip the paint area to the screen buffer, to stop heap corruption if the window gets oversized.
- ConioDeleteConsole: Do decrement the active screen buffer's refcount, but only after calling ConioCleanupConsole to destroy the window.
- Remove Win32CsrInsertObject. This function did two unrelated things (initialize lock and create handle), but in the only place it was used (CsrCreateScreenBuffer) the lock had already been initialized in CsrInitConsoleScreenBuffer, so this use was erroneous.
- Rename Win32CsrInsertObject2 (creates handle only) to Win32CsrInsertObject.

svn path=/trunk/; revision=34559
2008-07-16 23:16:40 +00:00
Colin Finck
f776a00eeb Commit my test suite I used for verifying the behaviours of wctomb, wcstombs and WideCharToMultiByte and writing the reimplementations for ReactOS on request of Stefan
svn path=/trunk/; revision=34558
2008-07-16 22:08:58 +00:00
Colin Finck
248d39652c - Remove 2 wrong versions of wctomb and 2 wrong versions of wcstombs
- Implement new versions of wctomb and wcstombs, which consider the language set by setlocale() and work according to all behaviours I could find when testing under WinXP SP2.
  This was tested with an own test suite (which I can commit as well if anyone is interested)
- Do a real conversion to MultiByte characters using wctomb in fputwc and vfwprintf. (verified under WinXP SP2)
- Set 'MSVCRT___lc_codepage' and 'MSVCRT___lc_collate_cp' to 1252 by default ("C" locale) and not the current active codepage (which might not work with i.e. Eastern codepages)
- Add a new check for 'MultiByteCount < 0' to WideCharToMultiByte (also verified under WinXP SP2)
- Change MB_LEN_MAX back to 2, the value 5 only applies to newer CRT's (msvcrt only handles single-byte and double-byte characters)
- Don't compile the Wine-imported 'wcscpy_s', it isn't available in msvcrt

svn path=/trunk/; revision=34557
2008-07-16 21:40:09 +00:00
Matthias Kupfer
d37dc48ec3 add new Slovak keyboard layout to first stage setup list
svn path=/trunk/; revision=34556
2008-07-16 21:21:21 +00:00
Timo Kreuzer
ea50e3e05c FLOATOBJ is a structure only on x86 in kernelmode, for usermode drivers and other architectures it's a FLOAT. Update winddi.h accordingly.
svn path=/trunk/; revision=34555
2008-07-16 21:12:27 +00:00
Timo Kreuzer
a5e5e742fd Patch by Stefan Ginsberg:
- remove XFORM members from DC structure and use MATRIX instead. Use MatrixS2XForm and XForm2MatrixS for intermediate conversion.
- this is a temporary solution (still using fpu) until I'm finished with FLOATOBJ rewrite + XFOROMOBJ api (soon)

svn path=/trunk/; revision=34554
2008-07-16 20:16:30 +00:00
Timo Kreuzer
a8f3f89717 DC_AllocDc:
- Set DC's iGraphicsMode to GM_COMPATIBLE when creating a DC
NtGdiRectangle:
- only exclude bottom/right pixels if dc is GM_COMPATIBLE
- fix indentation

svn path=/trunk/; revision=34553
2008-07-16 19:48:19 +00:00
Timo Kreuzer
4a5e93fab1 Add MATRIX accelerator flag MX_SCALE and set it in XForm2MatrixS, when off-diagonal elements are zero.
svn path=/trunk/; revision=34552
2008-07-16 18:57:23 +00:00
James Tabor
816777c79a - Fix CurrentWnd when it has a NULL, see Bug 3527.
svn path=/trunk/; revision=34550
2008-07-16 16:12:44 +00:00
Aleksey Bragin
2557cd7a1e Dmitry Gorbachev
- Fix a problem in VgaIsPresent: Content of the Address Register goes to the Data Register, and vice versa. It also writes content of the Map Select Register (which is number 4) into the Bit Mask Register (number 8).
See issue #2125 for more details.

svn path=/trunk/; revision=34549
2008-07-16 16:02:32 +00:00
Colin Finck
4cacee7617 Fix build, broken in r34546
Reminder: Never apply patches twice (and test the latest changes before committing) :-)

svn path=/trunk/; revision=34547
2008-07-16 14:33:47 +00:00
Matthias Kupfer
4ea00fafbc Mario Kacmar <kario AT szm DOT sk>
- Slovak keyboard layout (QWERTY) added.
- See #3528 for more details.

svn path=/trunk/; revision=34546
2008-07-16 13:41:23 +00:00
Ged Murphy
5744130b55 - Implement freeaddrinfo and getaddrinfo.
- Implement bare boned getprotobyname and getprotobynumber.
- Make winsock functions return proper error codes instead of success (will help to identify any probs with network apps)
- patch by Yuri Sidorov <jura at cp-lab dot com>

For future reference, freeaddrinfo and getaddrinfo should really call GetAddrInfoW and FreeAddrInfoW which should do the work, but our umode network layers are a mess anyway and by no means XP compatible
See issue #3523 for more details.

svn path=/trunk/; revision=34545
2008-07-16 12:49:15 +00:00
James Tabor
1ef680846a Fix build.
svn path=/trunk/; revision=34542
2008-07-16 02:07:55 +00:00
James Tabor
900b6e2e6a Sorry for commit my test tree,,,, good for testing Bug 2451.
svn path=/trunk/; revision=34541
2008-07-16 02:06:05 +00:00
James Tabor
702a9bb706 make does like tabs, right? Fix build.
svn path=/trunk/; revision=34540
2008-07-16 01:22:26 +00:00
Jeffrey Morlan
44e8888c47 Increment a console's initial screen buffer's reference count *after* calling CsrInitConsoleScreenBuffer (which sets the reference count to 0). Fixes bug 3524.
svn path=/trunk/; revision=34539
2008-07-16 00:24:54 +00:00
Matthias Kupfer
0f5230d382 Mario Kacmar <kario AT szm DOT sk>
- Slovak translation of several inf-files
- See #3518 for more details.

svn path=/trunk/; revision=34537
2008-07-15 22:29:42 +00:00
Colin Finck
a9fabb5fd5 Revert r34533 (except the nice indentation in the Makefile) for unbreaking trunk.
This change is also not compatible with current cleaning scripts in RosBE and on the Buildslaves (which only delete "makefile.auto"), leading to possibly unclean builds if the generated makefile wouldn't be deleted.
The ultimate goal would be putting the generated makefiles into the intermediate directories, so we also save one cleaning step.

svn path=/trunk/; revision=34536
2008-07-15 22:04:16 +00:00
Pierre Schweitzer
7d8bcb4fd9 Fixed typos spotted by "jeanmichel" <jeanmichel.123@free.fr>
See issue #618 for more details.

svn path=/trunk/; revision=34535
2008-07-15 21:05:20 +00:00
Hervé Poussineau
d1a689916c Rename makefile.auto to makefile-$(ARCH).auto
svn path=/trunk/; revision=34533
2008-07-15 20:42:08 +00:00
Ged Murphy
01824511d8 - Delete the service key along with any subkeys
- Delete the service from the internal list
- patch by Yuri Sidorov <jura at cp-lab dot com>

See issue #3523 for more details.

svn path=/trunk/; revision=34532
2008-07-15 20:41:35 +00:00
Colin Finck
2916a0bda2 Fix the mess created by SVN's inability to handle with UTF-16 files.
Remove the svn:eol-style property and set svn:mime-type to application/octet-stream, so that these files aren't modified by SVN.

svn path=/trunk/; revision=34531
2008-07-15 20:11:26 +00:00
Matthias Kupfer
10ca3b514c - Revert inf back to LF, because of damaged line endings on checkout with CRLF (under linux).
- Take care on further change, change only if you are absolutely sure, that all clients can handle it correctly!

svn path=/trunk/; revision=34530
2008-07-15 19:43:28 +00:00
Colin Finck
0c37df4fff Set svn:eol-style CRLF for all *.inf files.
These are copied without any further processing, so they should always have a CRLF line-ending.

svn path=/trunk/; revision=34529
2008-07-15 17:54:28 +00:00
Aleksey Bragin
a7d600b8b8 - Save pointer to driver's section in DriverSection during driver loading.
- Fix unloading function to check if a driver to be unloaded really has DriverSection set, and if not, fail.
- Inspired by bug 3221.
See issue #3221 for more details.

svn path=/trunk/; revision=34526
2008-07-15 14:24:47 +00:00
Aleksey Bragin
81c0fbc19f Yuriy Sidorov <jura@cp-lab.com>
- Fix BSOD in NtUserWaitForInputIdle because KeWaitForMultipleObjects expects actual pointers to objects, not handles.
- Fix failure branches to have UserLeave and/or object dereference where needed.
See issue #3522 for more details.

svn path=/trunk/; revision=34525
2008-07-15 14:00:37 +00:00
Aleksey Bragin
fa443b5f5b Dmitry Gorbachev
- Include greek translation into shutdown's rsrc.rc.
See issue #3487 for more details.

svn path=/trunk/; revision=34523
2008-07-15 13:48:43 +00:00
Aleksey Bragin
69bc3c08df Dmitry Gorbachev
- Don't leak critical region when going through failure return branch.
See issue #3517 for more details.

svn path=/trunk/; revision=34522
2008-07-15 13:44:14 +00:00
Aleksey Bragin
39f888f2b3 Yuriy Sidorov <jura@cp-lab.com>
- Speed-up user mode exception handling by calling RtlDispatchException() first if there is no active user mode debugger. This avoids switches to kernel mode if exception can be handled by SEH.
See issue #3485 for more details.

svn path=/trunk/; revision=34521
2008-07-15 13:32:18 +00:00
Aleksey Bragin
f8f3b78fce Stefan Ginsberg <stefan__100__@hotmail.com>
- Remove a hack in the executive handle implementation, which worked around a memory corruption bug. Revision 32770 should have fixed the bug hidden by this hack.
See issue #3512 for more details.

svn path=/trunk/; revision=34520
2008-07-15 13:20:38 +00:00
Matthias Kupfer
439d1715c8 Maciej Bialas <bjauy AT tlen DOT pl>
- Updated polish version of dll/cpl/usrmgr
- See issue #3480 for more details.

svn path=/trunk/; revision=34516
2008-07-15 08:21:27 +00:00
Matthias Kupfer
c4c2d12ac8 Mario Kacmar <kario AT szm DOT sk>
- Slovak translation of several inf-files
- See #3518 for more details.

svn path=/trunk/; revision=34515
2008-07-15 08:10:44 +00:00
Timo Kreuzer
1c8355690a IntRectangle:
- use coordinate transformation
- if transform is not diagonal, call IntGdiPolygon
IntRectangle/IntGdiPolygon:
- use special locking order to avoid lockups
- don't unlock objects that weren't locked
IntGdiPie:
- if transform is cheese, call IntGdiCheeseCake

svn path=/trunk/; revision=34514
2008-07-15 02:06:38 +00:00
Matthias Kupfer
bed178cdf7 - Fixes country codes.
- See issue #3488 for more details.

svn path=/trunk/; revision=34513
2008-07-14 22:55:37 +00:00
Matthias Kupfer
5af61d07aa - fix some wrong country codes
- fix minor typo in German translation

svn path=/trunk/; revision=34511
2008-07-14 22:41:54 +00:00
Aleksey Bragin
0a109d92ea - Remove special ReactOS-specific PUSHORT GDT pointer (usual PKGDTENTRY works good enough now), spotted by Stefan Ginsberg.
svn path=/trunk/; revision=34508
2008-07-14 21:24:13 +00:00
Jeffrey Morlan
c4a306e3f7 When duplicating a handle to a child process, only pass the actual attributes to ObpIncrementHandleCount. Spurious attributes from the object pointer were making this call fail randomly.
svn path=/trunk/; revision=34507
2008-07-14 17:42:22 +00:00
Matthias Kupfer
a84f8fec2c - change svn:eol-style to LF for compatibility
- fix a problem in cpu.inf

svn path=/trunk/; revision=34506
2008-07-14 16:30:18 +00:00
Colin Finck
2951bb310c Replace uses of $(ROS_ARCH) by $(ARCH).
$(ROS_ARCH) will only work if an environment variable with the same name is set. But its value and the default value (if none was given) is stored in $(ARCH).

svn path=/trunk/; revision=34505
2008-07-14 13:06:52 +00:00
Colin Finck
f400d4255f Attempt to fix Live-CD
svn path=/trunk/; revision=34504
2008-07-14 12:50:39 +00:00
Matthias Kupfer
e37473874f Mario Kacmar <kario AT szm DOT sk>
- Slovak translation patch for cpu.inf and cdrom.inf
- See #3518 for more details.

svn path=/trunk/; revision=34503
2008-07-14 10:23:39 +00:00
Daniel Reimer
ef31815a6a Bug 3505: Simplified Chinese Translation Patch by Zhangbing. I skipped Wordpad, because we sync this with Wine and skipped appwiz, because it fails to build.
svn path=/trunk/; revision=34501
2008-07-14 09:26:38 +00:00
James Tabor
0d418ab140 Fix boot and leave the code for research.
svn path=/trunk/; revision=34499
2008-07-14 07:39:58 +00:00
James Tabor
c66063fbaa Added WH_GETMESSAGE support.
svn path=/trunk/; revision=34498
2008-07-14 07:26:13 +00:00
ReactOS Portable Systems Group
4c46f5b78e - Get rid of stubs.c, it's empty now.
svn path=/trunk/; revision=34497
2008-07-14 03:51:35 +00:00
ReactOS Portable Systems Group
a4346dc05e - Implement NtSetLdrEntries, NtVdmControl, KeSaveStateForHibernate, KeQueryActiveProcessors, KeSetDmaIoCoherency, KeFlushEntireTb, KeGetRecommendedSharedDataAlignment, KeDisableInterrupts, KeInvalidateAllCaches, KeIcacheFlushCount and remove them from stubs_asm.S
svn path=/trunk/; revision=34496
2008-07-14 03:50:38 +00:00
ReactOS Portable Systems Group
4a8378a9d2 - Fix exports
svn path=/trunk/; revision=34495
2008-07-14 03:36:40 +00:00
ReactOS Portable Systems Group
26fa849ea0 - Re-organize our unimplemented function stubs according to port targets (user mode support, exceptions/SEH, driver ISRs, x86-only functionality and arch-specific Ke).
svn path=/trunk/; revision=34494
2008-07-14 03:34:07 +00:00
ReactOS Portable Systems Group
5b41066b9e - Remove this DPRINT1 too, it was used for debugging scheduling issues which are fixed now.
svn path=/trunk/; revision=34493
2008-07-14 03:20:40 +00:00
ReactOS Portable Systems Group
758134fc03 - Remove the 5-second delay in the initialization code, we've validated this works now.
svn path=/trunk/; revision=34492
2008-07-14 03:19:12 +00:00
ReactOS Portable Systems Group
69b3a4581d - Enable timer expiration code.
- Timers now work, along with full scheduling, dispatching and context switching, so our 5 second wait in init.c allows other threads to runs, then completes appropriately.

svn path=/trunk/; revision=34491
2008-07-14 03:17:57 +00:00
ReactOS Portable Systems Group
7f9d319752 - Fix context switch code. It works perfectly now.
svn path=/trunk/; revision=34490
2008-07-14 03:17:09 +00:00
ReactOS Portable Systems Group
5c0b303c18 - Remove DPRINT1s all over the context switching code.
svn path=/trunk/; revision=34489
2008-07-14 03:16:36 +00:00
ReactOS Portable Systems Group
94f7b8810b - Clean up KTRAP_FRAME and KEXCEPTION_FRAME definition.
- Add assembly offsets for KEXCEPTION_FRAME to ksarm.h.


svn path=/trunk/; revision=34488
2008-07-14 03:15:48 +00:00
ReactOS Portable Systems Group
351129dc08 - Force a 5 second wait before loading drivers, on ARM.
- Context switching doesn't really work -- but we've been lucky since we're stuck on a priority 31 thread.
- Instead of worrying about this later when the system will be fully operational, this forces us to expose these bugs, and to make sure everything works.
- This will stress our context switching, waiting, unwaiting and scheduling code on ARM but once it all works well, after 5 seconds we'll be back on track.

svn path=/trunk/; revision=34487
2008-07-14 01:41:44 +00:00
ReactOS Portable Systems Group
a893ad634d - Increment the PC by 4 during a DebugService-style trap, just like on x86, so that we can skip the actual instruction when we're done.
- Exit the trap after a prefetch abort. DbgPrint fully works now, and we're back where we started -- RamdiskCreateDiskDevice.


svn path=/trunk/; revision=34486
2008-07-14 00:26:18 +00:00
ReactOS Portable Systems Group
a8ee5682c5 - ARM instructions are 4 bytes long, not 1, so decrement the PC by four during breakpoints (so the caller gets the address of the previous instruction, just like on x86).
svn path=/trunk/; revision=34485
2008-07-14 00:24:33 +00:00
ReactOS Portable Systems Group
cc7f0be786 - Also bump PC for ARM after a KD exception.
svn path=/trunk/; revision=34484
2008-07-14 00:23:43 +00:00
ReactOS Portable Systems Group
631d627fa7 - Implement KeContextToTrapFrame.
- No, we don't sanitize anything right now. There's no user-mode at this point, so it doesn't matter. If you think we should sanitize right now, you need to get out and get laid.
- So this brings us back to KiPrefetchAbortHandler's while (TRUE).
- We have to make sure the funky PC modifications are going to work well, and after that, we can exit the trap.


svn path=/trunk/; revision=34483
2008-07-14 00:04:53 +00:00
ReactOS Portable Systems Group
ed3125b4e0 - Implement KeTrapFrameToContext.
- We now get to the point where we call KiDebugRoutine, which is registered as KdpEnterDebuggerException.
- KdpEnterDebuggerException reads our exception record and understands this is a BREAKPOINT_PRINT.
- It then calls the KdpServiceDispatcher.
- This, in turn, calls KdpPrintString.
- Which in turn loops the "debug providers" and calls KdpSerialPrintString.
- Which calls into KDCOM.
- And we see this on the debug log: (ntoskrnl/kd/kdio.c:191) .
- Epic Win. Need to implement KeContextToTrapFrame now.


svn path=/trunk/; revision=34482
2008-07-13 23:58:47 +00:00
ReactOS Portable Systems Group
673e2fd5fd - Okay so we've got a basic KiDispatchException, we now need KiTrapFrameToContext and KiContextToTrapFrame.
- We aren't really sure where the hell we are since we can't printf anything otherwise we'll trap again and end up in an infinite loop.
- So we're debugging with while (TRUE).


svn path=/trunk/; revision=34481
2008-07-13 23:46:50 +00:00
ReactOS Portable Systems Group
784b0af4cd - Start implementing KiPrefetchAbortHandler for BKPT instructions.
- We pretty much try to duplicate what happens on x86, and build an exception record with the right information.
- We are seeing the debug string in R1 and its length in R2, so we're on the right track.
- We call KiDispatchException now, which isn't yet implemented.
- Yup, all this work just to see a damn debug string the "*proper* NT way". Thanks, asshole.


svn path=/trunk/; revision=34480
2008-07-13 23:34:44 +00:00
ReactOS Portable Systems Group
64d7b1337b - Prefetch aborts behave like other exceptions, not like data aborts, in terms of the PC offset due to the pipeline behavior. So call TRAP_PROLOG with 0, not 1
svn path=/trunk/; revision=34479
2008-07-13 23:32:38 +00:00
ReactOS Portable Systems Group
a999d87cb4 - Implement KeArmInstructionFaultStatusRegisterGet
svn path=/trunk/; revision=34477
2008-07-13 23:31:46 +00:00
James Tabor
97892224cf Separate Default Window proc from messages.
svn path=/trunk/; revision=34476
2008-07-13 23:31:00 +00:00
ReactOS Portable Systems Group
f0ba3800a4 - Write a DebugService routine for ARM in the RTL library and get rid of the hack in ntoskrnl.
- Just like on x86, this routine generates a breakpoint -- on ARM this is done with BKPT followed by an index.
- We use the BREAKPOINT_PRINT index just like on x86.
- This generates a prefetch abort -- so now we implement the prefetch abort handler. Thanks to the trap macros, this was 10 lines of code.
- This calls into the real C handler, which is now unimplemented and hangs the whole system, so we've regressed way back (on purpose).


svn path=/trunk/; revision=34474
2008-07-13 22:40:36 +00:00
ReactOS Portable Systems Group
43dd8f4408 - Now that KDCOM works for printing on the serial port, get rid of the arm_kprintf file, function and hack,and use KdpSerialPrint instead (still a hack, but at least uses our components)
svn path=/trunk/; revision=34473
2008-07-13 22:17:28 +00:00
ReactOS Portable Systems Group
e069d3cba6 - Implement KdPortPutByteEx and KdPortInitializeEx in KDCOM. Only supports Versatile for now, we can make this more portable later.
svn path=/trunk/; revision=34472
2008-07-13 22:16:48 +00:00
ReactOS Portable Systems Group
3d5e125a48 - Fix FILE location in the header
svn path=/trunk/; revision=34471
2008-07-13 22:15:56 +00:00
ReactOS Portable Systems Group
1cfbce1c83 - Get rid of a really-early debug print, since it's done before KdInit and thus will never be seen.
svn path=/trunk/; revision=34470
2008-07-13 22:15:23 +00:00
ReactOS Portable Systems Group
09dbb9edf1 - Uncomment the check to see if we came from kernel or user mode, since we can now do this after the major trap fixes
svn path=/trunk/; revision=34469
2008-07-13 22:14:43 +00:00
Christoph von Wittich
79811cb5a6 more correct fix by Alex
svn path=/trunk/; revision=34467
2008-07-13 19:14:39 +00:00
Christoph von Wittich
538c89cbf6 fix handle table calculations
now we can create 4186000 handles instead of 4100
and VLC doesn't BSOD anymore

svn path=/trunk/; revision=34466
2008-07-13 18:22:18 +00:00
KJK::Hyperion
ba77ba4484 Forgot a file. Fix fucking buildbot already D:<
svn path=/trunk/; revision=34464
2008-07-13 18:06:10 +00:00
KJK::Hyperion
70a54a9995 modified dll/win32/kernel32/misc/lang.c
modified   dll/win32/kernel32/kernel32.def
   Stubbed out GetLocaleInfoEx

modified   include/psdk/winnls.h
   Added some Vista and later NLS defines to the SDK

modified   dll/nls/idndl/idndl.rbuild
   Correctly set a NULL entry point for idndl.dll

modified   dll/nls/idndl_redist/idndl_redist.rbuild
modified   dll/nls/normaliz_redist/normaliz_redist.rbuild
   Give unique names to the redistributable versions of idndl.dll and normaliz.dll

Everything else
   Scattered NLS modules in the appropriate locations, as per standard source tree layout

svn path=/trunk/; revision=34463
2008-07-13 17:54:53 +00:00
Matthias Kupfer
9f0f4702a5 - support of [Strings.LanguageID]-sections for inf-files added in setupapi
- inf-files with multi language support are strongly recommended to be in utf-16 encoding (with byte order mark)
- at the moment only inf-files for second stage setup can contain translations (due to limitations of inflib)
- some of the inf files for hardware installation (/media/inf) are converted to utf-16 and contain a basic German translation in the [Strings.0407] section
- for more details read /reactos/branches/matthias-i18n/media/inf/README
- TODO: for other/further languages add other translations in new string sections

svn path=/trunk/; revision=34461
2008-07-13 13:46:54 +00:00
James Tabor
da7cfbccf5 Add part of a patch by Daniel Verkamp, see bug 3441.
svn path=/trunk/; revision=34457
2008-07-13 12:08:54 +00:00
ReactOS Portable Systems Group
08965866eb - Separate KDCOM into i386 and ARM versions.
- Stub out ARM version.
- Eventually the arm_kprintf hack will go away and true serial debugging output will be done through kdcom just like on x86.
- Fix formatting of bootvid.rbuild.


svn path=/trunk/; revision=34456
2008-07-13 08:47:07 +00:00
ReactOS Portable Systems Group
6c6eb6e82e - Does now fire off a DPC when quantum has ended this works good now after have the major trap fixes been done earlier.
svn path=/trunk/; revision=34455
2008-07-13 08:28:05 +00:00
ReactOS Portable Systems Group
e4202a6eec - Make sure this is XIP (Execute in Place) boot and not ramdisk boot before warning the user. Silences an incorrect debug print during ramdisk boot.
svn path=/trunk/; revision=34454
2008-07-13 08:20:02 +00:00
ReactOS Portable Systems Group
b60783d6c5 - Implement RamdiskCreateRamdisk which validates parameters before calling RamdiskCreateDiskDevice (stub).
- Implement RamdiskDeviceControl which only supports FSCTL_CREATE_RAM_DISK for now (the kernel's attempt to create the RAM disk).
- Need to implement RamdiskCreateDiskDevice.


svn path=/trunk/; revision=34453
2008-07-13 07:37:36 +00:00
ReactOS Portable Systems Group
b01a6a6b8e - Implement IRP_MN_QUERY_DEVICE_TEXT/BUS_INFORMATION/CAPABILITIES for FDOs (just forward to the attached device).
- Implement IRP_MN_QUERY_RESOURCES/RESOURCE_REQUIREMENTS for FDOs and PDOs (immediately complete the IRP and exit).
- We now get to RamdiskDeviceControl -- the kernel is attempting to create the ramdisk.


svn path=/trunk/; revision=34452
2008-07-13 07:33:31 +00:00
ReactOS Portable Systems Group
4a0167c18b - Remove incorrect check in RamdiskPnp -- we should only early-quit if the device is removed, not uninitialized, otherwise we'll never get initialized.
- Add support for IRP_MN_SURPRISE_REMOVAL.
- Handle IRP_MN_QUERY_ID for FDO (it is the first IRP we receive).
- Handle IRP completion for FDOs and forward if necessary.


svn path=/trunk/; revision=34451
2008-07-13 07:16:24 +00:00
ReactOS Portable Systems Group
ac0787ec04 - Add device state information.
- Start implementing RamdiskPnp -- enough to fail requests until our device state is appropriate.
- Implement RamdiskOpenClose.


svn path=/trunk/; revision=34450
2008-07-13 07:02:48 +00:00
ReactOS Portable Systems Group
fbda572c17 - Implement RamdiskAddDevice.
- Fix uninitialized pointer in DriverEntry.
- Add hack for ReactOS plug and play manager bug.
- Fix broken assert.
- Now in RamdiskPnp.


svn path=/trunk/; revision=34449
2008-07-13 04:23:59 +00:00
ReactOS Portable Systems Group
b1537513ef - Remove debug code.
svn path=/trunk/; revision=34448
2008-07-13 04:22:54 +00:00
ReactOS Portable Systems Group
824f390323 - Add ramdisk class.
svn path=/trunk/; revision=34447
2008-07-13 04:22:42 +00:00
ReactOS Portable Systems Group
0e87f19d40 - To whom it may concern: thanks for completly fucking up mkhive support with your "fix". It broken make install and livecd on i386 AND ARM.
- Made the necessary changes to make it work properly by fixing mkhive and rbuild.

svn path=/trunk/; revision=34446
2008-07-13 02:32:24 +00:00
ReactOS Portable Systems Group
ae45b8fbbb - Only print out debug data for aborts if we can't handle them. Makes the debug log easier to read.
svn path=/trunk/; revision=34445
2008-07-13 01:58:23 +00:00
ReactOS Portable Systems Group
53f621c80d - Do NOT prepend _ to ARM entrypoints.
- Because of some ridiculously stupid design in LD, it seems if it cannot find a given entrypoint, it SILENTLY ASSUMES you meant "Hi LD, please use my base address as my entrypoint".
- As such, all our drivers were linked with the start address as the base address... for the RAMDisk driver, this ended up being RamdiskAddDevice.
- When we started implementing RamdiskAddDevice, noticed that DriverEntry wasn't actually getting called. Adding debug prints changed which function was called.
- Wasted a week, thanks LD.


svn path=/trunk/; revision=34444
2008-07-13 01:56:20 +00:00
James Tabor
b17c0af25f The rest of rev 34442.
svn path=/trunk/; revision=34443
2008-07-13 00:24:05 +00:00
James Tabor
48885ed2c4 - Started NtUserRegisterClassExWOW and now using the fnIDs. Nothing is used but the IDs. I tested with these changes for over 60 days.
- Implemented NtUserMessageCall, moved our first victim over to use it. This is for bug 2451.

svn path=/trunk/; revision=34442
2008-07-13 00:21:51 +00:00
James Tabor
f07b8e70a7 This did not fix bug 3503 but only hid the problem. Added note about Firefox, polls IsInsideMessagePumpHook when Min/Max.
svn path=/trunk/; revision=34441
2008-07-12 23:49:51 +00:00
Christoph von Wittich
a267c40f5b don't deref NULL pointer
svn path=/trunk/; revision=34439
2008-07-12 13:47:06 +00:00
James Tabor
8b47005e1a Fix FF again. Sorry, I need to research this more.
svn path=/trunk/; revision=34438
2008-07-12 12:04:03 +00:00
Christoph von Wittich
58baa7406e don't return success in getaddrinfo
fixes a crash in divx installer

svn path=/trunk/; revision=34437
2008-07-12 10:49:13 +00:00
Christoph von Wittich
b2b40553ac fix a typo
svn path=/trunk/; revision=34435
2008-07-12 09:39:30 +00:00
James Tabor
613a10e37b - Fix problem with share pointer. See bug 3503. It seems to be a problem with ntdll and msvcrt.
svn path=/trunk/; revision=34433
2008-07-12 01:00:58 +00:00
James Tabor
f7a34846ba - Christoph von Wittich spotted a condition when co_MsqPostKeyboardMessage was called from KeyboardThreadMain, the thread was unlocked when waiting in co_MsqSendMessage. The problem; UserLeave was called before waiting on an event. I added checks to verify locking and if not, lock the thread. I'm not sure ATM if co_MsqPostKeyboardMessage should have full locking since it is only used by input.c.
- Added IdlePing to wakeup process threads before waiting on events, it look like the right place to put them.

svn path=/trunk/; revision=34430
2008-07-11 23:07:31 +00:00
Colin Finck
f25ac715b0 - Port Wine's WideCharToMultiByte implementation for conversion to a codepage to ReactOS. (with comments :-))
It adds support for DefaultChar, UsedDefaultChar and the flag WC_NO_BEST_FIT_CHARS.
  WC_COMPOSITECHECK is also supported by the Wine implementation, but I don't have an idea how to port it to ReactOS, as we don't seem to have composition tables. I left FIXME's for this flag in the appropriate blocks, this is why some of the code might look badly structured/unoptimized at the moment.
  As we completely rely on the NLS tables for the conversion now, this commit might trigger some bugs there. I already found out that the CP950 table doesn't map Unicode 0 back to MultiByte 0 (but 254), using Windows' c_950.nls it works correctly. Other tables could be buggy as well, c_1252.nls worked flawlessy for me though.
- Added comments to the CPTABLEINFO structure based on documentation from http://www.ping.uio.no/~ovehk/nls/

svn path=/trunk/; revision=34426
2008-07-11 19:11:06 +00:00
Christoph von Wittich
dfb10c4404 check for NULL pointer
svn path=/trunk/; revision=34425
2008-07-11 15:15:42 +00:00
James Tabor
1fa1b4e184 - Cleanup NtUserWaitForInputIdle and plug in the user call. Still testing it.
svn path=/trunk/; revision=34424
2008-07-11 11:22:16 +00:00
James Tabor
a704e14031 Update Eng Events and fix InputIdleEvent.
svn path=/trunk/; revision=34423
2008-07-11 10:57:49 +00:00
KJK::Hyperion
dee49b95a1 Don't allocate from PagedPool while interrupts are disabled. Patch by Stefan Ginsberg
svn path=/trunk/; revision=34420
2008-07-11 09:11:21 +00:00
James Tabor
4460003077 Improve NtUserWaitForInputIdle, still a work in progress.
svn path=/trunk/; revision=34419
2008-07-11 01:24:47 +00:00
James Tabor
0b35c794b5 - Port wine WaitForInputIdle. Work in progress and untested. Need input idle event to support it.
svn path=/trunk/; revision=34418
2008-07-11 01:02:28 +00:00
James Tabor
75ea87b3cb - Move NtUserWaitForInputIdle to message.c.
svn path=/trunk/; revision=34417
2008-07-10 23:51:24 +00:00
Timo Kreuzer
793805597e Patch by Stefan Ginsberg:
fix members of UNIVERSAL_FONT_ID, based on msdn

svn path=/trunk/; revision=34415
2008-07-10 20:09:23 +00:00
Colin Finck
af3974cb4a Warning fixes for devenum by Stefan Ginsberg
svn path=/trunk/; revision=34414
2008-07-10 16:26:28 +00:00
Jeffrey Morlan
b72b1e87db Some fixes for console alias functions:
- Pass buffers via a CSR capture buffer, instead of trying to cram them in the size-limited LPC message.
- GetConsoleAliasW: Return number of bytes written, not unrelated "Size" variable.
- GetConsoleAliasExesW: Return value is in bytes, not characters.
- GetConsoleAliasA, GetConsoleAliasExesA: Parameters and returns of corresponding W functions are in bytes, not characters.
- IntFindAliasHeader, IntGetAliasEntry: Break when current name is greater, not less.
- IntCreateAliasHeader: Fix bad use of pointer arithmetic; initialize Data to NULL.
- IntCreateAliasEntry: Fix bad use of pointer arithmetic.
- IntGetConsoleAliasesExesLength: Fix infinite loop; add sizeof(WCHAR) instead of 1.
- IntGetAllConsoleAliasesLength: Fix infinite loop.
- CsrGetConsoleAlias, CsrGetAllConsoleAliases, CsrGetConsoleAliasesExes: Don't use a winerror where an NTSTATUS is needed.

svn path=/trunk/; revision=34413
2008-07-10 15:43:06 +00:00
Christoph von Wittich
9c5c81eba2 don't deref NULL pointer
svn path=/trunk/; revision=34412
2008-07-10 14:00:50 +00:00
Colin Finck
6f1c458cd7 Fix ordinals of msvcrt according to Windows Server 2003 SP1's msvcrt.dll
svn path=/trunk/; revision=34411
2008-07-10 12:39:54 +00:00
Ged Murphy
8ca3cee755 Check for correct access right when deleting services
Patch by bugboy <martinmnet at hotmail dot com>
See issue #3474 for more details.

svn path=/trunk/; revision=34410
2008-07-10 11:45:06 +00:00
Aleksey Bragin
1598630aef - Fix a typo, spotted by BugBoy.
svn path=/trunk/; revision=34409
2008-07-10 11:29:50 +00:00
James Tabor
69b39dc05f - Needed to reference the previous window handle. This prevents the window object from becoming zero during it's own demise when posting send messages.
- See bug 3490.

svn path=/trunk/; revision=34408
2008-07-10 11:27:53 +00:00
James Tabor
326c138e1b Need to make safe, check for zero after retrieving desktop pointer.
svn path=/trunk/; revision=34407
2008-07-10 11:19:24 +00:00
James Tabor
7fdb555744 - This Patch fixes RestoreDC, also lots of visual glitches. Especially in Delphi applications. See bug 3491.
svn path=/trunk/; revision=34406
2008-07-10 11:12:14 +00:00
Aleksey Bragin
4e301fa3a9 - Fix build.
svn path=/trunk/; revision=34405
2008-07-10 10:06:29 +00:00
Aleksey Bragin
e00d31206e Yuriy Sidorov <jura@cp-lab.com>
- Implement RtlSetUserValueHeap, RtlSetUserFlagsHeap, RtlGetUserInfoHeap functions. It is quick implementation and it works.
- It fixes "Out of memory" error in all InnoSetup based installations. A lot of software can be at least installed in ReactOS now.
- Also it fixes Delphi applications which use TMemoryStream class.
See issue #3464 for more details.

svn path=/trunk/; revision=34404
2008-07-10 09:46:25 +00:00
Aleksey Bragin
65e234891c - Autosyncing with Wine HEAD.
- Add I_RpcExceptionFilter to rpcrt4 from recent wine and export it. This allows to not do a full rpcrt4 sync right now, but still sync everything else.

svn path=/trunk/; revision=34403
2008-07-10 09:14:19 +00:00
KJK::Hyperion
ffd2740ec2 modified nls/3rdparty/icu4ros.rbuild
- Build fixes

added      nls/3rdparty/stubs.cpp
 - Stub out unused ICU dependencies

added      nls/dll/idndl
added      nls/dll/idndl/idndl.cpp
added      nls/dll/idndl/idndl.def
added      nls/dll/idndl/idndl.rbuild
 - Implemented idndl.dll forwarder

added      nls/dll/idndl_redist
added      nls/dll/idndl_redist/data
added      nls/dll/idndl_redist/data/genidldndata.cpp
added      nls/dll/idndl_redist/data/idldata.cpp
added      nls/dll/idndl_redist/idndl.cpp
added      nls/dll/idndl_redist/idndl.def
added      nls/dll/idndl_redist/idndl_redist.rbuild
added      nls/dll/idndl_redist/stubs.cpp
 - Implemented stand-alone idndl.dll
 - Implemented DownlevelGetLocaleScripts, DownlevelGetStringScripts, DownlevelVerifyScripts

added      nls/dll/normaliz
added      nls/dll/normaliz/dummy.c
added      nls/dll/normaliz/normaliz.def
added      nls/dll/normaliz/normaliz.rbuild
 - Implemented forwarder normaliz.dll

added      nls/dll/normaliz_redist/data
added      nls/dll/normaliz_redist/data/icudt38.c
added      nls/dll/normaliz_redist/data/icudt38.lst
modified   nls/dll/normaliz_redist/normaliz.cpp
modified   nls/dll/normaliz_redist/normaliz.def
modified   nls/dll/normaliz_redist/normaliz_redist.rbuild
 - Implemented stand-alone normaliz.dll

added      nls/lib/idna
added      nls/lib/idna/idna.cpp
added      nls/lib/idna/idna.rbuild
added      nls/lib/idna/nameprep.cpp
 - Implemented IdnToAscii, IdnToUnicode, IdnToNameprepUnicode

modified   nls/lib/normalize/normalize.cpp
 - Implemented NormalizeString, IsNormalizedString

added      nls/lib/scripts
added      nls/lib/scripts/scripts.cpp
added      nls/lib/scripts/scripts.h
added      nls/lib/scripts/scripts.rbuild
 - Implemented GetStringScripts, VerifyScripts

added      nls/media
 - Added directory for future data files

modified   nls/nls.rbuild
 - Build all NLS modules

added      nls/tests
added      nls/tests/normalization
added      nls/tests/normalization/normalizationTest.c
added      nls/tests/normalization/normalizationTest.h
added      nls/tests/normalization/normalizationTest.l
added      nls/tests/normalization/normalizationTest.rbuild
added      nls/tests/normalization/normalizationTest.sln
added      nls/tests/normalization/normalizationTest.tab.c
added      nls/tests/normalization/normalizationTest.tab.h
added      nls/tests/normalization/NormalizationTest.txt
added      nls/tests/normalization/normalizationTest.vcproj
added      nls/tests/normalization/normalizationTest.y
added      nls/tests/normalization/normalizationTest.yy.c
 - Test harness for NormalizeString based on official Unicode 5.0 test suite. Our implementation passes all tests. Will become an actual regression test suite in the future.

svn path=/trunk/; revision=34402
2008-07-10 08:39:04 +00:00
Daniel Reimer
bb5038fc75 Bug 3492 - Bug 3497: Norwegian Translations for dxdiag sndvol32 kbswitch devmgmt eventvwr servman by Lars Martin.
Synched Winhlp32 with Wine HEAD.

svn path=/trunk/; revision=34401
2008-07-10 06:51:18 +00:00
Daniel Reimer
8af6be8760 Synched Winfile and write with Wine HEAD.
svn path=/trunk/; revision=34400
2008-07-10 06:38:14 +00:00
James Tabor
f1cf84c7f1 CS_NOKEYCVT is used to set Classname to Version when calling to register class.
svn path=/trunk/; revision=34399
2008-07-10 01:28:59 +00:00
James Tabor
6299128828 - Removed NtUserGetShellWindow, update related.
svn path=/trunk/; revision=34397
2008-07-09 22:46:17 +00:00
KJK::Hyperion
0461306bc8 modified lib/sdk/crt/crt.rbuild
modified   lib/sdk/crt/libcntpr.rbuild
   Add qsort and div to crt and libcntpr

modified   lib/sdk/crt/include/internal/tls.h
modified   lib/sdk/crt/stdlib/qsort.c
   Fixed ineptly-ported DJGPP qsort to not use TLS

svn path=/trunk/; revision=34396
2008-07-09 18:44:46 +00:00
Ged Murphy
5a9807ee6c don't try to free a NULL object.
patch by hto (hto at dev dot null)
See issue #3486 for more details.

svn path=/trunk/; revision=34393
2008-07-09 14:20:08 +00:00
Pierre Schweitzer
a4302a3894 Updated usp10_ros.diff to match with r34390 changes
svn path=/trunk/; revision=34392
2008-07-09 11:40:00 +00:00
Aleksey Bragin
c97e25991a - Update winetests for synced DLLs.
svn path=/trunk/; revision=34391
2008-07-09 11:34:20 +00:00
Aleksey Bragin
1e974d826c - One should not mix debug output macros and direct usage of DbgPrint.
svn path=/trunk/; revision=34390
2008-07-09 11:26:31 +00:00
Aleksey Bragin
2f5cd560df Autosyncing with Wine HEAD
svn path=/trunk/; revision=34389
2008-07-09 11:20:39 +00:00
Aleksey Bragin
cc891b65c9 - Add MapVirtualKey translation types.
svn path=/trunk/; revision=34388
2008-07-09 10:27:56 +00:00
Pierre Schweitzer
52bd0bc841 - Fixed build
- Added a diff with GreatLord changes

svn path=/trunk/; revision=34387
2008-07-09 09:28:50 +00:00
Pierre Schweitzer
85ba30dcf2 Synced usp10_winetest.exe with Wine HEAD
svn path=/trunk/; revision=34386
2008-07-09 09:23:34 +00:00
Pierre Schweitzer
ba32da0049 Synced shfolder.dll, stdole2.tlb, tapi32.dll, usp10.dll, winhttp.dll, wldap32.dll, wtsapi32.dll with Wine HEAD
svn path=/trunk/; revision=34385
2008-07-09 09:19:04 +00:00
Pierre Schweitzer
6e55aa8426 Fixed build
svn path=/trunk/; revision=34384
2008-07-09 09:11:53 +00:00
Daniel Reimer
99bd66e721 Bug 3466: Korean translation of Roscalc by Sengyu Kim
Bug 3468: Translate calc to norwegain by Lars Martin
Bug 3470: Translate file charmap by Lars Martin
Bug 3471: Translate file Remote desktop by Lars Martin
Polish Shell32 Translation Update by Olaf Siejka

svn path=/trunk/; revision=34383
2008-07-09 08:32:45 +00:00
Aleksey Bragin
876316be73 - Add CLSID_InProcFreeMarshaler
svn path=/trunk/; revision=34382
2008-07-09 08:02:08 +00:00
James Tabor
d6ea9391da Need shared pointer to user when comparing thread info.
svn path=/trunk/; revision=34381
2008-07-09 07:23:02 +00:00
James Tabor
5b7926d225 Cleanup headers for Prop.
svn path=/trunk/; revision=34380
2008-07-09 04:44:13 +00:00
James Tabor
2a0296d191 - Removed NtUserGetWindowThreadProcessId, updated all related. Wanting to remove this since I first joined.
- Tested with all my test apps.

svn path=/trunk/; revision=34379
2008-07-09 04:30:10 +00:00
James Tabor
dd4397b095 - Removed NtUserGetProp, updated all related.
- Tested with FF, OOo, Seamonkey, putty, etc, and standard loaded apps. We use GetProp more than anyone thinks.

svn path=/trunk/; revision=34378
2008-07-09 03:29:43 +00:00
Aleksey Bragin
be356d11cd Yuriy Sidorov <jura@cp-lab.com>
- Always call ZwRaiseException in user mode and RtlDispatchException in kernel mode.
- If RtlDispatchException failed call ZwRaiseException in kernel mode. Otherwise unhandled RtlRaiseException() call in kernel mode simply ignored (do nothing)!
- Call RtlRaiseStatus in RtlRaiseException, if something went wrong.
See issue #3434 for more details.

svn path=/trunk/; revision=34377
2008-07-08 21:17:47 +00:00
Pierre Schweitzer
2c16b9c687 Apply r33078 fix to r34369 to "prevent mshtml registration (doesn't work yet)"
See issue #3189 for more details.

svn path=/trunk/; revision=34376
2008-07-08 21:12:38 +00:00
Aleksey Bragin
5d786c8989 Autosyncing with Wine HEAD
svn path=/trunk/; revision=34375
2008-07-08 20:52:29 +00:00
Pierre Schweitzer
1ac1523c04 Synced wordpad.exe with Wine HEAD
svn path=/trunk/; revision=34374
2008-07-08 20:07:27 +00:00
Pierre Schweitzer
a1e82ff2da Synced riched32_winetest.exe, shlwapi_winetest.exe, urlmon_winetest.exe with Wine HEAD
svn path=/trunk/; revision=34373
2008-07-08 19:30:15 +00:00
Pierre Schweitzer
e492be818a Synced riched32.dll, shlwapi.dll, urlmon.dll with Wine HEAD
svn path=/trunk/; revision=34372
2008-07-08 19:27:29 +00:00
James Tabor
9b97275fcd Fix build, I knew that commit was lite.
svn path=/trunk/; revision=34371
2008-07-08 19:06:37 +00:00
James Tabor
ef1f9bd06c Win32k/User32:
- Removed NtUserGetSystemMetric, updated all related.
- Add GetConnected, this is needed, sometimes global pointers are initilized with zeros. This is normal.
- Fix prototype for NtUserDragDetect, and add the Esc key hit to DragDetect.

svn path=/trunk/; revision=34370
2008-07-08 18:58:07 +00:00
Aleksey Bragin
0a953de77e Autosyncing with Wine HEAD
svn path=/trunk/; revision=34369
2008-07-08 16:39:29 +00:00
Pierre Schweitzer
1e229a53dc Synced riched20_winetest.exe with Wine HEAD
svn path=/trunk/; revision=34368
2008-07-08 10:09:42 +00:00
Pierre Schweitzer
0fe1322cbc Synced riched20.dll with Wine HEAD
svn path=/trunk/; revision=34367
2008-07-08 10:08:54 +00:00
ReactOS Portable Systems Group
b513c98fb2 - Rewrite the low-level trap/exception/system call code from the ground up:
- Do not corrupt the stack anymore
  - Use a consistent trap frame layout (enable OldIrql and PreviousMode, and set the 0xBADB0D00 debug mark)
  - Use slower but more correct trap prolog/epilog code for now.
  - Generalize all prolog/epilog code into macros just like on x86. As a result, traps are now 6 lines of code.
- Rewrite the system call interface from the ground up:
  - System calls didn't actually work: a debug print made the stack layout magical enough so that they didn't normally crush, but only slowly ate the stack.
  - Copying arguments from caller to system call was, as the comment on the original code so aptly put it, "total shit".
  - Due to ABI concerns, and to provide an actual template on how you're -supposed- to implement something like system calls on RISC processors, we now use
    a model similar to BSD, but about ten times better (with that much less code too). We'll document it later on the RosPSG Wiki.
  - This code probably contains some of the most vile-yet-elegant macro magic ever written for such low-level code as system call dispatching. 
- The result of all this is that we're at the same place as before (RamdiskAddDevice needs to be implemented by the Ramdisk guys) but with a sane low-level
  backend that isn't slowly eating away the stack, corrupting data, and basically working through random chance.
- Move timebase code from stubs.c to its own file, time.c.
- Silence multiple debug prints and fix a corrupted debug print in KiSystemStartup.


svn path=/trunk/; revision=34366
2008-07-08 09:11:44 +00:00
Aleksey Bragin
8249e5ced9 - Add IActiveScriptSiteDebug32 IID.
svn path=/trunk/; revision=34365
2008-07-08 07:45:31 +00:00
James Tabor
0f60c8cc54 Update the rest of the prototypes and stubs.
svn path=/trunk/; revision=34364
2008-07-08 07:38:28 +00:00
James Tabor
f7a270aa2a Update more prototypes and stubs.
svn path=/trunk/; revision=34363
2008-07-08 05:43:14 +00:00
James Tabor
e2dbf44d99 Update prototypes and stubs.
svn path=/trunk/; revision=34362
2008-07-08 05:11:40 +00:00
Art Yerkes
4cca77780c Move completion out of the spinlock. Spotted by aicom
svn path=/trunk/; revision=34361
2008-07-08 03:01:56 +00:00
Jeffrey Morlan
f45ebc6964 IntGdiCreateBitmap: Tighten up parameter checks, preventing overflows; don't multiply by Planes twice in calculating WidthBytes.
IntCreateCompatibleBitmap: Remove 65535px maximum (Windows has no such limit); return the stock 1x1 bitmap instead of creating a new one.
BITMAPOBJ_GetRealBitsPixel: Change parameter type to UINT; remove 2bpp return (2bpp bitmaps are not actually supported)

svn path=/trunk/; revision=34358
2008-07-07 16:03:14 +00:00
Aleksey Bragin
9d160d390c - Fix build correctly this time.
svn path=/trunk/; revision=34357
2008-07-07 15:59:02 +00:00
Colin Finck
32849148f9 Attempt to fix build
svn path=/trunk/; revision=34355
2008-07-07 13:57:14 +00:00
Aleksey Bragin
22d098ac49 Autosyncing with Wine HEAD
svn path=/trunk/; revision=34354
2008-07-07 12:32:35 +00:00
Aleksey Bragin
0cb3e856ef - Remove entrypoint=0 from compstui
- No need to register cryptui, since its registering routines are stubs. Fixes ERROR_MR_MID_NOT_FOUND in 2nd stage.
See issue #2719 for more details.

svn path=/trunk/; revision=34353
2008-07-07 12:26:44 +00:00
Jeffrey Morlan
f2d4e4394e Extract days-since-epoch calculation code from RtlTimeToTimeFields into own function, optimize a bit, and use it in RtlTimeFieldsToTime instead of doing a 400 iteration loop.
svn path=/trunk/; revision=34352
2008-07-07 10:23:41 +00:00
Aleksey Bragin
622a737e7f - Initialize TLS expansion bitmap properly (fixes accessing uninitialized memory when all regular TEB slots for TLS data are occupied).
svn path=/trunk/; revision=34351
2008-07-07 09:24:10 +00:00
James Tabor
fe82a25252 Update SetLayeredWindowAttributes.
svn path=/trunk/; revision=34350
2008-07-07 05:54:36 +00:00
Colin Finck
e32689dbb6 Fix buggy MB_LEN_MAX definition according to MSVC headers
svn path=/trunk/; revision=34348
2008-07-06 22:56:19 +00:00
Colin Finck
c7f03eaf32 Revert r34346, it didn't work the way I thought because of different CRT's on every host. Using gcc/g++ as the frontend will link to it automatically.
Sorry for the wasted commit.

svn path=/trunk/; revision=34347
2008-07-06 22:32:07 +00:00
Colin Finck
8457c6f705 Also link host binaries with ld and not gcc/g++.
Same change was already done for target binaries in r34187.

svn path=/trunk/; revision=34346
2008-07-06 22:07:22 +00:00
Eric Kohl
7d872fb8bb Implement a simple dialog for adding a user to user groups.
svn path=/trunk/; revision=34345
2008-07-06 21:20:28 +00:00
Johannes Anderwald
2f76e8ade2 - fix potential buffer overflows spotted by Christoph
svn path=/trunk/; revision=34344
2008-07-06 20:52:11 +00:00
Aleksey Bragin
cce8a43337 - Update hlink headers from Wine HEAD.
svn path=/trunk/; revision=34342
2008-07-06 20:44:35 +00:00
Johannes Anderwald
37b079f715 - implement IShellPropSheetExt handling for file property dialogs for standard file classes
- makes shellink property dialog appear again (and many others ;) )

svn path=/trunk/; revision=34341
2008-07-06 20:35:21 +00:00
Andrey Korotaev
32f75a3033 Update russian translation. Patch by Alexander Akulich <akulichalexander@gmail.ru>
svn path=/trunk/; revision=34339
2008-07-06 18:29:17 +00:00
Aleksey Bragin
b1863a26c7 Autosyncing with Wine HEAD
svn path=/trunk/; revision=34337
2008-07-06 16:35:30 +00:00
Aleksey Bragin
b5668fd659 - Sync gdiplusflat.h with Wine HEAD.
svn path=/trunk/; revision=34336
2008-07-06 16:32:16 +00:00
Aleksey Bragin
7b02ecd2cf - Update test.h to the latest Wine HEAD.
svn path=/trunk/; revision=34334
2008-07-06 15:31:38 +00:00
Aleksey Bragin
06a847eab9 - Fix russian translation, thanks Kaffeine.
svn path=/trunk/; revision=34331
2008-07-06 13:48:31 +00:00
Pierre Schweitzer
d00ec1bdba Fixed crappy previous translation
svn path=/trunk/; revision=34330
2008-07-06 13:25:50 +00:00
Pierre Schweitzer
f967fdf9dc Updated French translations for reactos.exe and shell32.dll
svn path=/trunk/; revision=34329
2008-07-06 13:17:27 +00:00
Aleksey Bragin
e1786e8952 Autosyncing with Wine HEAD
svn path=/trunk/; revision=34327
2008-07-06 12:41:23 +00:00
Aleksey Bragin
1cf2a0e35c Autosyncing with Wine HEAD
svn path=/trunk/; revision=34326
2008-07-06 12:15:28 +00:00
Matthias Kupfer
114955b298 - avoid clock flicker in timedate.cpl
- TODO: limit repaint area to clock only (to avoid flicker of time adjusting control as well)

svn path=/trunk/; revision=34325
2008-07-06 12:05:17 +00:00
Aleksey Bragin
d94dde07f8 Autosyncing with Wine HEAD
svn path=/trunk/; revision=34324
2008-07-06 11:47:38 +00:00
Johannes Anderwald
70c6de3144 - implement IShellPropSheetExt for shellink
- interface not yet used

svn path=/trunk/; revision=34322
2008-07-06 09:09:09 +00:00
Colin Finck
2392ad5c5d Carlo Bramini (carlo.bramix@libero.it):
- Fix tditest compilation for Release builds

See issue #3290 for more details.

svn path=/trunk/; revision=34321
2008-07-06 09:06:15 +00:00
Johannes Anderwald
ad14fa367a - implement _ILIsNetHood
- don't show OpenWith dialog on network neighbourhoud shell folder
- use translatable "open" verb for shelllink's context menu
- deactivate shelllink property dialog, it should be implemented using IShellPropSheetExt interface
- enumerate context menu handlers also in the progid key
- shortcut items now show again the "open" item

svn path=/trunk/; revision=34320
2008-07-06 08:29:28 +00:00
Johannes Anderwald
718de23271 - allow translation of static shell verbs such as open/edit/find/play/preview/print/runas used in context menu items
svn path=/trunk/; revision=34319
2008-07-06 06:26:00 +00:00
Johannes Anderwald
cd17529941 - don't load OpenWith shell extension on desktop, mydocuments, controlpanel, recyclebin, drive, control panel and folder items
svn path=/trunk/; revision=34318
2008-07-06 05:26:34 +00:00
Colin Finck
736069d442 Reenable the VGA option at 1st stage setup now that it's fixed.
Physicus, you rock! :-)

See issue #2073 for more details.

svn path=/trunk/; revision=34314
2008-07-05 23:12:12 +00:00
Timo Kreuzer
62d44518a9 fix vgaddi by linking to libcntpr to resolve crt imports and include ioaccess.h to avoid hal imports,
should fix bug 2073
See issue #2073 for more details.

svn path=/trunk/; revision=34313
2008-07-05 22:41:14 +00:00
Eric Kohl
2e377cc99a Implement removal of a user from a user group.
svn path=/trunk/; revision=34312
2008-07-05 21:55:16 +00:00
Matthias Kupfer
3ac7447b97 Maciej Bialas <bjauy AT tlen DOT pl>
- Updated polish version of base/setup/reactos.
- See issue #3456 for more details.

svn path=/trunk/; revision=34311
2008-07-05 21:36:00 +00:00
Matthias Kupfer
e8cf32fe74 - title font for a syssetup alike look added
svn path=/trunk/; revision=34310
2008-07-05 19:38:08 +00:00
Aleksey Bragin
29ed434408 - Fix reactos.dff according to r34308.
svn path=/trunk/; revision=34309
2008-07-05 18:23:24 +00:00
Aleksey Bragin
a92216f309 - Delete mc (stoneage old, there is a standalone win32 port now).
- Fit apps better in dir structure.
- Move old_wordpad to templates (Ged said it's a great framework).

svn path=/trunk/; revision=34308
2008-07-05 18:23:03 +00:00
Matthias Kupfer
d61945b6cc - converted 1st stage setup stub from message box style to property sheet style
- property page for English and German added
- other languages needs to be translated and enabled in rsrc.rc

svn path=/trunk/; revision=34307
2008-07-05 17:55:38 +00:00
Aleksey Bragin
2012315e5a - Start rosapps rearrange and cleanup process.
svn path=/trunk/; revision=34303
2008-07-05 11:46:22 +00:00
Aleksey Bragin
0a0a13a41c - Rearrange reactos.dff according to rosapps rearrange.
svn path=/trunk/; revision=34302
2008-07-05 11:45:32 +00:00
Aleksey Bragin
eb3c1a5282 Dmitry Gorbachev:
- Fix DriverEntry name.
See issue #2073 for more details.

svn path=/trunk/; revision=34301
2008-07-05 11:37:35 +00:00
Christoph von Wittich
4409400b6b don't try to dereference NULL pointers
now Avira AntiVir installs without crashing the whole system

svn path=/trunk/; revision=34300
2008-07-05 09:19:56 +00:00
Colin Finck
138bd07f65 Convert the dnsapi stuff to a consistent 4 spaces indentation
svn path=/trunk/; revision=34298
2008-07-04 22:41:28 +00:00
Colin Finck
458e927317 Fix heap corruptions and memory leaks in dnsapi
Patch by Samuel Serapión with some modifications by me after discussing it with Art Yerkes

See issue #3387 for more details.

svn path=/trunk/; revision=34297
2008-07-04 21:51:54 +00:00
James Tabor
b82fda4139 Add two more query window types.
svn path=/trunk/; revision=34296
2008-07-04 18:52:22 +00:00
Johannes Anderwald
033f85022a - fix typo
svn path=/trunk/; revision=34295
2008-07-04 18:10:59 +00:00
James Tabor
1d96233453 Use PostOrSend instead of just Send. Works much better.
svn path=/trunk/; revision=34294
2008-07-04 17:55:56 +00:00
Aleksey Bragin
c2eaa10731 Peter Oberndorfer <kumbayo84@arcor.de>
- Implement %p for scanf.

svn path=/trunk/; revision=34293
2008-07-04 12:39:43 +00:00
Aleksey Bragin
b33ec42e10 Dmitry Gorbachev:
- FreeLoader first reads entire ntoskrnl.exe (about 20M) into memory, then copies it to other address. Now, freeldr reads it straight to the place, not allocating extra memory for buffer.
- Aleksey: This changes should be eventually adopted and merged into winldr's peloader.c.
See issue #3447 for more details.

svn path=/trunk/; revision=34292
2008-07-04 10:36:03 +00:00
Aleksey Bragin
97f94beafc - There is no working strsafe lib yet, so including its header is meaningless.
svn path=/trunk/; revision=34291
2008-07-04 08:45:01 +00:00
Colin Finck
57e8b1c4e5 Remove the strsafe library, it was imported from a dubious source, which is incompatible with the LGPL
svn path=/trunk/; revision=34290
2008-07-04 08:24:37 +00:00
James Tabor
709931f91a - Moved WM_ACTIVATEAPP calles before WM_NC/ACTIVATE calls.
- Implemented GetLastActivePopup, based on wine.
- Fixed DCE, pass all tests, except six clipping and one ROP check, which might be due to DCX_NORESETATTRS flag not being reset during the next GetDCEx call. <Researching>


svn path=/trunk/; revision=34289
2008-07-04 04:55:18 +00:00
Jeffrey Morlan
8912b7b4c8 - BITMAP_Cleanup: Fix leak of DIBSECTION structure; remove redundant ifs.
- NtGdi(Get|Set)BitmapDimension: SEHify; set ERROR_INVALID_HANDLE on a bad non-NULL bitmap.
- NtGdiGetDCforBitmap: Don't crash on bad bitmap.

svn path=/trunk/; revision=34288
2008-07-04 00:05:31 +00:00
Daniel Reimer
8bf777a515 Polish Translation Update for Calc by Olaf Siejka.
svn path=/trunk/; revision=34287
2008-07-03 19:41:46 +00:00
James Tabor
ef488c15c7 Add warning for GetLastActivePopup.
svn path=/trunk/; revision=34286
2008-07-03 18:19:16 +00:00
Johannes Anderwald
2d56ad648c - add an empty dialog resource
- implement initializing the dialog
- fixes bug 3443

svn path=/trunk/; revision=34285
2008-07-03 16:46:39 +00:00
Jeffrey Morlan
32111e8715 Fix menu leaks in explorer
svn path=/trunk/; revision=34284
2008-07-03 15:58:37 +00:00
Jeffrey Morlan
9865603d81 Don't use msvcrt functions in kernel32; it will cause bug 3373 to reappear
svn path=/trunk/; revision=34283
2008-07-03 14:57:37 +00:00
Aleksey Bragin
4b6c66431e - Fix double linking of snprintf (_snprintf should be used in CRT).
- Add a #undef guard for snprintf in consistency with how it previously was implemented in CRT.

svn path=/trunk/; revision=34282
2008-07-03 12:07:12 +00:00
Christoph von Wittich
d6d4af57f2 fix a typo
svn path=/trunk/; revision=34281
2008-07-03 10:19:12 +00:00
Christoph von Wittich
8d35fff61b fix a typo
svn path=/trunk/; revision=34279
2008-07-03 08:16:34 +00:00
Pierre Schweitzer
33941ca644 Apply same fix to trunk, but without commented out code.
This fixes ReactOS freezes when installing VMware driver using vmwinst and browsing a NTFS volume...

svn path=/trunk/; revision=34278
2008-07-03 07:32:14 +00:00
James Tabor
d95752ca22 GetLastActivePopup is still unimplemented, we return the current window handle if it is valid.
svn path=/trunk/; revision=34276
2008-07-03 07:17:32 +00:00
Matthias Kupfer
0dd1a22450 - Fix to allow characters for computer name as specified in MSDN, even '-'
- See issue #3304 for more details.

svn path=/trunk/; revision=34275
2008-07-03 07:09:05 +00:00
James Tabor
8e5bf80622 - Fixed an issue with Avira AntiVir Personal, reported by Christoph von Wittich.
- GetLastActivePopup is unimplemented and returns a zero. So User32 locally checks and sees the zero and passes it to win32k for processing. There an (kbug) exception is thrown.


svn path=/trunk/; revision=34274
2008-07-03 07:05:50 +00:00
Christoph von Wittich
020dfee9f8 don't crash when no command line argument is given
svn path=/trunk/; revision=34273
2008-07-03 07:01:19 +00:00
James Tabor
c84f6bb63c Move PostMessage out of gdi into user.
svn path=/trunk/; revision=34272
2008-07-03 06:29:30 +00:00
James Tabor
71b125ad4f Fix MSVC issue.
svn path=/trunk/; revision=34271
2008-07-03 05:58:33 +00:00
James Tabor
ef1ec36884 Bug 972:
- Fixes the problem of selecting Explorer START menu than mouse over and clicking another application.
- Doesn't fix the problem of selecting Explorer START menu than mouse over to the opened file Explorer and clicking on it.
- Why, one might ask? The file Explorer shares the same TID.



svn path=/trunk/; revision=34270
2008-07-03 04:51:51 +00:00
James Tabor
09b382e570 Cleanup drawing lines and curves with round rect.
svn path=/trunk/; revision=34268
2008-07-02 18:12:07 +00:00
Jeffrey Morlan
6b4f247e21 - NtGdiAlphaBlend: If hDCSrc == hDCDest and a bitmap can't be locked, don't unlock the DC twice. Fix typo in if condition which prevented detection of bad source bitmap.
- NtGdiBitBlt: Fix null pointer access when cleaning up after failure to lock source bitmap.
- NtGdiStretchBlt: Fail gracefully if a bitmap can't be locked. Don't delete XlateObj if it couldn't be created.
- NtGdiPolyPatBlt: Actually *use* the safe copy that so much code was dedicated to creating. :)
- Trim a few bits of redundant code.

svn path=/trunk/; revision=34267
2008-07-02 17:20:28 +00:00
Colin Finck
d1a42af5b7 Simplify the code for fputwc, when the file is opened in text mode.
I verified this behaviour with a test app under Windows XP SP2. This is also the code used by the fputwc function of our previous msvcrt.

svn path=/trunk/; revision=34266
2008-07-02 16:07:01 +00:00
Dmitry Chapyshev
9bd1f760d5 - Update Russian translation
svn path=/trunk/; revision=34265
2008-07-02 16:06:19 +00:00
Dmitry Chapyshev
a94dc7e23b - Add Latin American keyboard layout
svn path=/trunk/; revision=34264
2008-07-02 15:58:34 +00:00
Dmitry Chapyshev
602309167a - Add Irish keyboard layout
svn path=/trunk/; revision=34263
2008-07-02 15:12:55 +00:00
Dmitry Chapyshev
a566b6485d Add keyboard layouts by Alexey Komarov:
- Thai Kedmanee
- Thai Pattachote
- Thai Pattachote (non-ShiftLock)

svn path=/trunk/; revision=34262
2008-07-02 14:08:45 +00:00
Dmitry Chapyshev
27440be42f - Rename kbdth to kbdth2 (part 2/2)
svn path=/trunk/; revision=34261
2008-07-02 13:47:42 +00:00
Dmitry Chapyshev
f04564f0d4 - Rename kbdth to kbdth2 (part 1/2)
svn path=/trunk/; revision=34260
2008-07-02 13:43:51 +00:00
Johannes Anderwald
284853b90b - don't trim spaces at the end of a value as it might be part of the value
- fixes the boot menu timeout text disalignment from bug 3437
- behaviour verified with Microsoft Windows Vista SP2+

svn path=/trunk/; revision=34259
2008-07-02 13:40:49 +00:00
Aleksey Bragin
fc3136e93d - Prevent crashes when heapPtr is NULL, also fix broken heap magic output. Thanks Mephisto!
svn path=/trunk/; revision=34256
2008-07-02 10:00:12 +00:00
Ged Murphy
30db39bf92 - the lib has an entry point
- remove all non-needed stuff

svn path=/trunk/; revision=34255
2008-07-02 08:49:10 +00:00
Dmitry Chapyshev
a1ae582c40 - Add msvcrt40 to bootcd
svn path=/trunk/; revision=34254
2008-07-02 08:22:52 +00:00
Dmitry Chapyshev
6f84c37511 - Add baseaddress for msvcrt40
svn path=/trunk/; revision=34253
2008-07-02 08:21:39 +00:00
Dmitry Chapyshev
ec768a7f1b - Add msvcrt40 from Wine
svn path=/trunk/; revision=34252
2008-07-02 08:20:43 +00:00
Dmitry Chapyshev
6972015191 - Sync with Wine HEAD
svn path=/trunk/; revision=34251
2008-07-02 08:19:00 +00:00
Dmitry Chapyshev
56be7bf03b - Update gdiplus headers
svn path=/trunk/; revision=34250
2008-07-02 08:18:06 +00:00
James Tabor
1f2c432f83 Fix build.
svn path=/trunk/; revision=34249
2008-07-02 07:54:01 +00:00
James Tabor
d170af286f Arc, RoundRect:
- Converted over to use the new draw/fill square algorithm for draw arcs and draw/fill round rects.
- Tested with (Area.exe) Yuan program. Getting better.



svn path=/trunk/; revision=34248
2008-07-02 07:47:23 +00:00
Pierre Schweitzer
2964504432 Added myself to CREDITS
No comments :p

svn path=/trunk/; revision=34246
2008-07-02 07:06:27 +00:00
Johannes Anderwald
d8c13e4ea7 - add AUTOCHECKBOX style to all 3 checkboxes on general page for all languages
- enable/disable checkboxes when normal/diagnostic startup is selected
- automatically select normal startup checkbox as other options are not implemented
- bug 1986

svn path=/trunk/; revision=34243
2008-07-01 22:36:31 +00:00
Johannes Anderwald
162f616b54 - check the checkboxes of the services which have the running state
- bug 1986

svn path=/trunk/; revision=34241
2008-07-01 22:01:13 +00:00
Matthias Kupfer
9c0eb1bf25 Paolo Devoti <devotip AT tiscali DOT it>
- Italian translation patch for usetup, regedit and shell32
- See issue #3435 for more details.

svn path=/trunk/; revision=34240
2008-07-01 19:25:12 +00:00
Pierre Schweitzer
6cc054e590 Partly merged r34238
svn path=/trunk/; revision=34239
2008-07-01 19:05:42 +00:00
Aleksey Bragin
344f0672d5 - Yes, Alex's code is perfect, sorry.
svn path=/trunk/; revision=34237
2008-07-01 17:59:29 +00:00
Jeffrey Morlan
9c124a2de5 Fix under-allocation in LsaQueryInformationPolicy. (Bug 3428)
svn path=/trunk/; revision=34236
2008-07-01 16:35:01 +00:00
James Tabor
9f5ede7adb Arc, Ellipse:
- Converted over to use the new fill square algorithm for fill arcs and draw/fill ellipse.
- Tested with (Area.exe) Yuan program. Chord work and the CW/CCW works as it should.
- The pie angle still floats with aspect ratio of ellipse and not point fixed. Work in progress.


svn path=/trunk/; revision=34233
2008-07-01 13:30:44 +00:00
Aleksey Bragin
fda8db4dd3 Yuri Sidorov <jura@cp-lab.com>
- Prevent boolean flags from being optimized away by compiler (due to PSEH usage) by making them volatile.
See issue #3408 for more details.

svn path=/trunk/; revision=34232
2008-07-01 10:48:50 +00:00
Aleksey Bragin
a1afb268dd - Fix code comments, in addition to 34230.
See issue #3426 for more details.

svn path=/trunk/; revision=34231
2008-07-01 10:40:20 +00:00
Aleksey Bragin
45d38334d5 - Fix a problem with normal and special APCs being inserted in the wrong order, spotted by Jury Sidorov. Now Borland Turbo Debugger should be able to debug applications, also it can fix hangs in other applications.
- When delivering kernel APC, set the pending flag to false (by analogy with delivering user APC and clearing its pending flag).
See issue #3426 for more details.

svn path=/trunk/; revision=34230
2008-07-01 10:08:14 +00:00
James Tabor
8aec8d2388 Setup drawing default to CCW not CW.
svn path=/trunk/; revision=34229
2008-07-01 05:24:58 +00:00
James Tabor
5f35dd6071 Attempt to fix set palette issue. See bug 733.
svn path=/trunk/; revision=34228
2008-07-01 03:39:12 +00:00
Jeffrey Morlan
388fc6e94e - Don't use ntdll's RtlDuplicateUnicodeString in kmode; it allocates from the process heap. Instead, allocate from pool and copy the string manually.
- Get rid of other ntdll imports (memcmp in freetype, tan in win32k) and instead link the functions statically, so ntdll is no longer loaded at all in kmode. Saves about 550kB of memory.
- Also remove unused <library>hal</library> in freetype.

svn path=/trunk/; revision=34227
2008-06-30 23:58:48 +00:00
Colin Finck
75e6f09822 Change the code page to 1252 in the Swedish translation to fix some characters (discovered by Harteex on IRC)
svn path=/trunk/; revision=34226
2008-06-30 21:22:33 +00:00
Marc Piulachs
dc4f087e94 - Fix a bug in cdfile that was preventing to use the 'nameoncd' attribute
svn path=/trunk/; revision=34225
2008-06-30 19:12:16 +00:00
Marc Piulachs
151b3dafa6 - hackfix unbootable image (part 2/2)
svn path=/trunk/; revision=34224
2008-06-30 18:33:13 +00:00
Marc Piulachs
c259af1c8d - hackfix unbootable image (part 1/2)
svn path=/trunk/; revision=34223
2008-06-30 18:27:31 +00:00
Jeffrey Morlan
d4687baa63 Get explorer working again, by making wmain explicitly call the C++ initialization function __main. gcc only adds the call automatically in a function called main.
svn path=/trunk/; revision=34222
2008-06-30 16:18:46 +00:00
Timo Kreuzer
678dcf823c fix normaliz build
svn path=/trunk/; revision=34221
2008-06-30 14:52:30 +00:00
Daniel Reimer
60c4f5e798 Update ROSCalc to version 1.09 to fix some bugs.
* Fixed bug with Conversion function: "Category" type must be found like "from" and "to" because the combobox sorts its items alphabetically.
* Fixed bug with memory function and GNU multi-precision libraries: the memory must be initialized to zero when the calculator starts, otherwise "MP" will crash.
* Fixed bug when closing an expression with right parentheses.

svn path=/trunk/; revision=34220
2008-06-30 13:47:42 +00:00
Colin Finck
cfee3fb383 Fix a typo
svn path=/trunk/; revision=34219
2008-06-30 13:07:25 +00:00
Colin Finck
1f305e171d - Don't create a temporary batch file through "echo" commands and replace the double quotation marks by single quotation marks.
This way we are only bound to the CreateProcess limit (32767 characters) and not to the maximum cmd command line (8192 characters). Fixes the "Line too long" problems some people were experiencing.
  Thanks to Yury Sidorov on ros-dev for the hint.
- Simplify the GenerateLinkerCommand code by removing a duplicated code path, which existed for a bug closed some time ago.
  Thanks to Hervé for the hint.

svn path=/trunk/; revision=34218
2008-06-30 12:56:47 +00:00
Marc Piulachs
0feca9ed45 - txtsetup.sif and unattend.inf are not arch dependent so move them back to bootdata.rbuild
svn path=/trunk/; revision=34216
2008-06-30 09:36:57 +00:00
Marc Piulachs
4ecfe76505 - try to fix build (NOT TESTED). This is a temporary solution however. Most of the registry information must be dynamically generated by rbuild and the rest in from of .inf files during 2nd stage setup
svn path=/trunk/; revision=34215
2008-06-30 09:28:28 +00:00
ReactOS Portable Systems Group
2ace5cc90d - Disable building any other driver than ramdisk.sys and cdfs.sys. Only these two are required for ramdisk booting to user-mode for our purposes.
- Ramdisk does not depend on Class2 or ScsiPort.
- Disable loading any other driver than ramdisk.sys and cdfs.sys. We won't support PCI and the storage stack for a while, so ramdisks are the best and quickest way to test the actual kernel and get to user-mode as soon as possible to continue work on the VM management inisde Mm.
- We get up to RamdiskAddDevice (not yet implemented)!


svn path=/trunk/; revision=34214
2008-06-30 09:07:30 +00:00
ReactOS Portable Systems Group
13f1de2b3a - Fix license header for this file.
svn path=/trunk/; revision=34213
2008-06-30 08:54:30 +00:00
ReactOS Portable Systems Group
3309c46e24 - Make copies of the registry inf data for arm
svn path=/trunk/; revision=34212
2008-06-30 08:53:49 +00:00
ReactOS Portable Systems Group
6bca61aa4b - Registry configuration will likely end up having arch-specific settings, so separate bootdata folder for each architecture.
- If we move away from a standard inf file (not necessarly a good idea), we may be able to return back to a single directory and dynamically generate .inf data.
- Update rbuild to deal with this new fact.


svn path=/trunk/; revision=34211
2008-06-30 08:51:19 +00:00
ReactOS Portable Systems Group
926d44768b - Add driver database code to FreeLDR (using ReactOS-style LoadOrderListHead instead of BootDriversListHead, oh well!).
- This means we actually load and parse drivers now!!! Some Mm work was required to support unloading and remapping: MmDeleteVirtualMapping is now implemented.
- We can now see scsiport.sys and atapi.sys strings displayed on the LCD.
- Implemented HalQuery/SetDisplayParameters, HalQuery/ReleaseDisplayOwnership and HalDisplayString just like on x86.
- Since we now load symbols for the drivers (or at least try to), stubbed DebugService2, which also shows us what's being loaded.
- Extended the Loader MemoryType array to include XIP/RAM Disk Memory.  


svn path=/trunk/; revision=34210
2008-06-30 08:40:54 +00:00
ReactOS Portable Systems Group
d9a5d8e476 - Fix broken check for ramdisk boot path... *sigh* please test your patches.
svn path=/trunk/; revision=34209
2008-06-30 07:06:48 +00:00
James Tabor
a65dadb6eb Cleanup code.
svn path=/trunk/; revision=34208
2008-06-30 06:45:45 +00:00
James Tabor
d20f879eaf Fix drawing pie fill aligment.
svn path=/trunk/; revision=34207
2008-06-30 05:11:39 +00:00
ReactOS Portable Systems Group
09f0fa3748 - Fix the ARM build after the commit by hpoussin which had broken it (with a good change, nonetheless).
svn path=/trunk/; revision=34206
2008-06-30 02:50:42 +00:00
ReactOS Portable Systems Group
be2d1988db - Plug in RAM Disk boot support in the loader.
svn path=/trunk/; revision=34205
2008-06-30 02:47:14 +00:00
ReactOS Portable Systems Group
e7756d443d - Add RAM disk support to FreeLDR and to the NTLDR emulation layer in the kernel for non-clean archs (ppc and x86)
svn path=/trunk/; revision=34204
2008-06-30 02:42:12 +00:00
ReactOS Portable Systems Group
96f1392d7b - Call IopStartRamdisk if booting from one. This completes kernel-side RAM disk boot support
svn path=/trunk/; revision=34203
2008-06-30 02:18:04 +00:00
ReactOS Portable Systems Group
3cc3ad057f - Plug in RAM disk boot support (kernel-side)
svn path=/trunk/; revision=34202
2008-06-30 02:15:48 +00:00
ReactOS Portable Systems Group
662c3b62fe - Define NT RAM Disk device interface (100% compatible with Microsoft ramdisk.sys)
svn path=/trunk/; revision=34201
2008-06-30 02:13:53 +00:00
ReactOS Portable Systems Group
e114abfb64 - Add RAMDISK_BOOT_INITIALIZATION_FAILED bugcheck code
svn path=/trunk/; revision=34200
2008-06-30 02:11:46 +00:00
ReactOS Portable Systems Group
a2931ebaf1 atoi64 is available without MSVCRT, through ntdll or ntos
svn path=/trunk/; revision=34199
2008-06-30 02:10:41 +00:00
James Tabor
eb8611b79f Add and fix path calls. This allows more drawing tests (Area.exe by Yian)to pass based on observation.
svn path=/trunk/; revision=34198
2008-06-30 00:47:58 +00:00
Colin Finck
3150ee723e Attempt to fix build
svn path=/trunk/; revision=34196
2008-06-29 21:18:31 +00:00
Matthias Kupfer
65511035e1 Radek Liska <radekliska AT gmail DOT com>
- Czech translation patch for several parts
- See issue #3413 for more details.

svn path=/trunk/; revision=34194
2008-06-29 20:36:47 +00:00
Matthias Kupfer
683a83c2c5 Nicolas Sapa < reactos AT byme DOT at>
- Patch to fix build of rosapps.
- See issue #3420 for more details.

svn path=/trunk/; revision=34193
2008-06-29 20:12:42 +00:00
Johannes Anderwald
71cf45cfa3 If there is no process name passed in, try to obtain the console title. If that does not work either, use default of cmd.exe as a title.
- fixes bug 3397

svn path=/trunk/; revision=34192
2008-06-29 17:26:38 +00:00
Hervé Poussineau
5fb69fcf60 Fix typo
svn path=/trunk/; revision=34191
2008-06-29 15:45:18 +00:00
Hervé Poussineau
112d32b2eb NTOSKRNL_SHARED should not contain linker parameters in compiler form
svn path=/trunk/; revision=34190
2008-06-29 15:11:16 +00:00
Hervé Poussineau
1772c969ed Move some more linker args to temp file, so command line is not too long
Fix link of C++ kernel mode dlls/drivers

svn path=/trunk/; revision=34189
2008-06-29 13:49:39 +00:00
James Tabor
6a4e897e5c Sorry fixed Ellipse, see bug 3337.
svn path=/trunk/; revision=34188
2008-06-29 13:23:08 +00:00
Hervé Poussineau
7689eddcc2 Link C++ programs against target libraries, not host ones
Remove most of <linkerflag> usage

svn path=/trunk/; revision=34187
2008-06-29 12:47:22 +00:00
Hervé Poussineau
d595a43107 Add an option to disable precompiled headers
svn path=/trunk/; revision=34186
2008-06-29 12:42:11 +00:00
Dmitry Chapyshev
b6e4377917 - More implement "Audio" dialog
svn path=/trunk/; revision=34185
2008-06-29 12:30:36 +00:00
Dmitry Chapyshev
f34438b93e - Small implement "Audio" dialog
- Add setupapi.lib to rbuild-file
- Return ERROR_DI_DO_DEFAULT in MediaClassInstaller function

svn path=/trunk/; revision=34183
2008-06-29 10:13:55 +00:00
Colin Finck
57e5fca63f Attempt to fix build (broken by hpoussin in r34179)
svn path=/trunk/; revision=34181
2008-06-29 09:44:46 +00:00
Aleksey Bragin
0bb26e2025 - Revert 22081 by Magnus Olsen:
"fixing two hiden bug in reactos, null termante the string right at end, code tested in vs, but it seam no affact on wine test mscvrt printf test. What hell is the snprintf  function call to ??".
Instead of fixing "hidden bugs", it introduced a real very well hidden bug, which was overwriting the target buffer and thus corrupting everything starting from the heap, and ending with pools. It's possible to install and run OO2 Writer now.
See issue #3311 for more details.

svn path=/trunk/; revision=34180
2008-06-29 09:39:06 +00:00
Hervé Poussineau
452122a506 Use __REACTOS__ define instead of _ROS_ one
svn path=/trunk/; revision=34179
2008-06-29 09:32:30 +00:00
Aleksey Bragin
16d2ca207f Roel Messiant <roelmessiant@gmail.com>
- Fix one of the oldest bugs: "ROS can not parse partition table corectly". The original macro that calculates the space casts the value to ULONG, while ULONGLONG math is required here.
See issue #950 for more details.

svn path=/trunk/; revision=34174
2008-06-29 08:33:21 +00:00
Aleksey Bragin
911fc42a9f - Fix exception handling in MiDoMapped/PoolCopy by fixing a typo in SEH_YIELD usage.
See issue #3408 for more details.

svn path=/trunk/; revision=34172
2008-06-29 08:10:18 +00:00
Aleksey Bragin
ab5634f252 - Fix a problem spotted by Juriy Sidorov in bug 3415. With this fix applied, GDB is able to work much better - be able to write in memory, set breakpoints, etc.
See issue #3415 for more details.

svn path=/trunk/; revision=34171
2008-06-29 08:03:25 +00:00
ReactOS Portable Systems Group
c50bcc2c12 - Implement beginnings of Ramdisk Port Driver. Planning compatibility with ISO, SDI and WIM files and full Windows support.
- New license for our code.


svn path=/trunk/; revision=34170
2008-06-29 02:58:05 +00:00
James Tabor
4d7d62eded Arc:
- Ported GraphApp draw arc fill algorithm. It was faster than X11. Include copyright license in header.
- Now we can draw pies and arcs and fill them, need to test chord fill.

svn path=/trunk/; revision=34169
2008-06-29 01:19:46 +00:00
Hervé Poussineau
87f7930820 Operator new[] should go with delete[]
svn path=/trunk/; revision=34168
2008-06-28 19:49:04 +00:00
Aleksey Bragin
0c8aa0ca08 - Implement a gatewait case (was "tested" with a "Not yet supported" bug previously in the tree; DPRINT1 is left there for further testing).
- Fix a bug in KeRemoveQueueApc: the code was always removing the first entry in the APC queue
instead of the actual APC. This should fix weird user-mode timer bugs. (Spotted in bug 3354).
See issue #3354 for more details.

svn path=/trunk/; revision=34167
2008-06-28 19:23:23 +00:00
Matthias Kupfer
f75f7a44c4 Mario Kacmar <kario AT szm DOT sk>
- Slovak translation patch for several cpl, newdev and shell32
- See #3414 for more details.

svn path=/trunk/; revision=34163
2008-06-28 17:17:40 +00:00
Dmitry Chapyshev
ced746b43b - Update Russian translation
svn path=/trunk/; revision=34162
2008-06-28 17:13:14 +00:00
Matthias Kupfer
7d5a4d21d9 Artem Reznikov <temarez AT yandex DOT ru>
- Ukrainian translation patch for kbswitch and shell32
- See #3405 for more details.

svn path=/trunk/; revision=34161
2008-06-28 17:03:36 +00:00
Matthias Kupfer
1ced8005de Carlo Bramix <carlo DOT bramix AT libero DOT it>
- Resource patch for italian syssetup
- See issue #3386 for more details.

svn path=/trunk/; revision=34160
2008-06-28 16:55:44 +00:00
Hervé Poussineau
ec92a60952 Fix GetUserNameA/GetComputerNameExA
Patch by Carlo Bramini, carlo dot bramix at libero dot it
See issue #1859 for more details.

svn path=/trunk/; revision=34159
2008-06-28 16:51:42 +00:00
Matthias Kupfer
0b91e99584 Javier Remacha (remialdo AT gmail DOT com):
- Translation patch for spanish and basque.
- See issue #3376 for more details.

svn path=/trunk/; revision=34158
2008-06-28 16:48:48 +00:00
Johannes Anderwald
3284c385e9 - update swedish translation by Andreas Bjerkeholt
- include swedish translation in build

svn path=/trunk/; revision=34157
2008-06-28 16:00:13 +00:00
Johannes Anderwald
56f7facc27 - fix a buffer overflow leading to disapperance of file type text
- introduced in rev 34133

svn path=/trunk/; revision=34155
2008-06-28 13:40:00 +00:00
Hervé Poussineau
f15da5c4d1 Set callbacks sooner, as they may be called during InitializeHandler
Patch by Michael Martin, martinmnet at hotmail com
See issue #3355 for more details.

svn path=/trunk/; revision=34154
2008-06-28 13:36:48 +00:00
Hervé Poussineau
b76f3d2447 Allow '-' character in computer name
See issue #3304 for more details.

svn path=/trunk/; revision=34153
2008-06-28 13:19:18 +00:00
Johannes Anderwald
88b230362c - only display filename in the title for the file property dialog
- pass the stripped filename to SH_FileVersionDlgProc
- fix identation
- fix bug 3401

svn path=/trunk/; revision=34152
2008-06-28 13:15:16 +00:00
Johannes Anderwald
e66d0d8a49 - enable/disable edit field when checkbox is (de)-selected
- initialize range control
- use ES_NUMBER style for edit text
- recovery options handling is not yet implemented
- the resource for czech, denmark, hungary, japan, netherlands, sweden must be manually synced
- fixes bug 3390

svn path=/trunk/; revision=34151
2008-06-28 12:48:06 +00:00
Dmitry Chapyshev
52b4297ad6 - Revert calc icons
svn path=/trunk/; revision=34148
2008-06-28 09:51:19 +00:00
Aleksey Bragin
327e211705 - Fix broken links.
svn path=/trunk/; revision=34144
2008-06-28 07:52:54 +00:00
Daniel Reimer
9656b7a6e1 Try to translate Calc to German. I had my fun with all those new Units... Hopefully I did it right. Feel free to correct my errors ;)
Btw. LOVELY new Convert Feature, Carlo.

svn path=/trunk/; revision=34142
2008-06-27 19:52:25 +00:00
Daniel Reimer
c430e8ab31 Update ROSCalc to Version 1.08.
German Translation will be Updated later. Translators, WORK 4 YA

svn path=/trunk/; revision=34141
2008-06-27 18:53:01 +00:00
Pierre Schweitzer
086ce90f5f Updated Polish translation for Shell32.dll by Olaf Siejka and for Syssetup.dll patch by Maciej Bialas
See issue #3411 for more details.

svn path=/trunk/; revision=34138
2008-06-27 17:47:10 +00:00
Pierre Schweitzer
540c78a8b9 Updated French translation for Shell32.dll
svn path=/trunk/; revision=34137
2008-06-27 17:43:25 +00:00
Dmitry Chapyshev
4f6a32920d - Add fontext.dll
svn path=/trunk/; revision=34135
2008-06-27 17:34:08 +00:00
Aleksey Bragin
0cac013600 - NDK fix: ImageUsesLargePages in PEB appeared in Windows 2003 already (confirmed with SP1 though).
svn path=/trunk/; revision=34134
2008-06-27 17:26:10 +00:00
Johannes Anderwald
ff2f89953a - display default icon in file property dialog
svn path=/trunk/; revision=34133
2008-06-27 17:23:24 +00:00
Dmitry Chapyshev
312d6d1343 - Add inetmib1 to bootcd
- Add some defines to snmp.h

svn path=/trunk/; revision=34132
2008-06-27 17:12:18 +00:00
Dmitry Chapyshev
65b1258be3 - Add baseaddress for inetmib1 and fontext.dll
- Add information about inetmib1 to README.WINE

svn path=/trunk/; revision=34131
2008-06-27 17:10:18 +00:00
Dmitry Chapyshev
59c8e2bd8a - Add inetmib1.dll from Wine
- Small update snmpapi.def

svn path=/trunk/; revision=34130
2008-06-27 17:08:01 +00:00
Jeffrey Morlan
3e39fd7d36 Miscellaneous console bugfixes. See Bug 3267 for details.
svn path=/trunk/; revision=34129
2008-06-27 12:34:08 +00:00
James Tabor
4784315908 Path needed some love Phase II:
- Fixed path coordinate problem by enabling old code and fixing arc move to issues. See that code that everyone thought that had no real use was usefull after all.
- Found more image and region problems, see bug 3402.




svn path=/trunk/; revision=34128
2008-06-27 10:58:11 +00:00
Aleksey Bragin
e6e9edd880 - Add an initial breakpoint for usermode process startup, this makes usermode gdb debugging working. Spotted and tested by Yury Sidorov.
svn path=/trunk/; revision=34127
2008-06-27 09:50:52 +00:00
Johannes Anderwald
f3b1615f45 - use "FriendlyTypeName" key for file types when available
- allows to show translated file types in file property dialog

svn path=/trunk/; revision=34126
2008-06-27 09:18:43 +00:00
Johannes Anderwald
bf27f86d38 - remove duplicate properties entry in recycle bin context menu shell extension
- make string "empty recycle bin" translatable
- bug 3289

svn path=/trunk/; revision=34125
2008-06-27 08:53:55 +00:00
Aleksey Bragin
43695ec25d - NDK fixes.
svn path=/trunk/; revision=34124
2008-06-27 08:23:45 +00:00
Dmitry Chapyshev
98b03108e9 - Sync .nls-files with Wine HEAD
svn path=/trunk/; revision=34123
2008-06-27 06:43:08 +00:00
Dmitry Chapyshev
e75134e8d0 - Add some defines
svn path=/trunk/; revision=34122
2008-06-27 06:41:48 +00:00
ReactOS Portable Systems Group
445028acf9 - Implement KiApcInterrupt -- ACPs now work!
- Change some infinite loops to ASSERTs since bugchecks now work and we can better differentiate stubs versus loops versus unimplemented code.
- Add back the system call debug prints -- total hack to make the stack work.
- Add support for the ARC Disk Information/Signature in FreeLDR.
- We've reached a major, major milestone here folks -- the kernel bugchecks because no boot device was found (since we don't have any working drivers yet).
- We have a lot of stuff to fix before continuing, and code review will take some time.


svn path=/trunk/; revision=34121
2008-06-27 04:19:50 +00:00
ReactOS Portable Systems Group
7675e2b8be - Implement VidResetDisplay in BootVid-arm.
- Implement KiSaveProcessorControlState and make the appropriate changes to KPROCESSOR_STATE and KSPECIAL_REGISTERS on ARM to support this, as well as moving the ARM Register definitions from ntos to NDK.
- Implement RtlCaptureContext.
- With these changes, BSODs now work, but because of missing palette code, they are actually R(Red)SODs, which is awesome.
- Remove debug prints from system call code -- this ends up somehow corrupting the return values *sigh*. More work to be done there, defintely. We have now regressed but we have an RSOD.


svn path=/trunk/; revision=34120
2008-06-27 03:06:11 +00:00
James Tabor
64a20b3ace Path needed some love Phase I:
- Rewrite Path handle support and reordered path.c.
- Wine Sync/Port PATH_WidenPath and PATH_DoArcPart. Wine Path test results: 151 tests executed (0 marked as todo, 24 failures). 3 skipped.
- Found where the use of SelectObject in DC_InitDC, placed nulls into hbrush and hpen, I comment out and used StockObject and now default drawing works.
- Implemented AngleArc and most of Arc. This is very experimental and it does draw and does not crash.
- Cleaned up some files with extra <CR> at the end of lines.
- Fully tested: Taskmgr, FF 1.5, Abiword, drawing programs, and all.
- Note: Path drawing is majorly misaligned. Fill path will draw in one area and Stroke path will draw in another.
- Note: Trunk: Gdi wine DC test: dc.c:89 Failed to lock hDC, sometimes locking up the system. See bug 3333.

svn path=/trunk/; revision=34119
2008-06-27 00:06:46 +00:00
Marc Piulachs
69f86788f8 - small fix to create valid shortcuts when using the [ProfileItems] directive
- Add support for a third undocumented parameter to Name entry. reference http://www.msfn.org/board/Using-INF-file-to-create-shortcuts-anywh-t95621.html

svn path=/trunk/; revision=34118
2008-06-26 23:49:42 +00:00
Jeffrey Morlan
37f33b89cb Fix messed-up colors in taskbar icons in qemu 16bpp mode. BuildDIBPalette was previously assuming all 16bpp DIBs were 565.
svn path=/trunk/; revision=34117
2008-06-26 22:22:57 +00:00
Jeffrey Morlan
7816c09fea Make EnumDeviceDrivers and EnumProcessModules return the total size, even if the buffer is smaller. (from bug 3319)
svn path=/trunk/; revision=34112
2008-06-26 19:52:05 +00:00
Aleksey Bragin
558c11db56 Yuri Sidorov <jura@cp-lab.com>
- Properly set dwFirstChance member EXCEPTION_DEBUG_INFO structure returned by WaitForDebugEvent function.
- Properly handle dwContinueStatus parameter of ContinueDebugEvent function.

See issue #3393 for more details.

svn path=/trunk/; revision=34111
2008-06-26 19:16:59 +00:00
Jeffrey Morlan
ae7e228924 Fix infinite loop in PspDumpThreads
svn path=/trunk/; revision=34108
2008-06-26 16:23:45 +00:00
Marc Piulachs
4865f6c89b Clean up tools folder.
svn path=/trunk/; revision=34107
2008-06-26 16:01:59 +00:00
Marc Piulachs
b2f5b33c7f - remove no longer required bootsect.mak
svn path=/trunk/; revision=34106
2008-06-26 15:58:56 +00:00
Marc Piulachs
9534f47230 -Remove obsolete Makefile. Spotted by Stefan Ginsberg.
svn path=/trunk/; revision=34105
2008-06-26 15:52:22 +00:00
Daniel Reimer
7e7b3c88bb Some more RC File fixes. TBD. Rename Norsk RC Files correctly.
svn path=/trunk/; revision=34103
2008-06-26 14:14:59 +00:00
Daniel Reimer
3b767564ef Some more RC File fixes.
svn path=/trunk/; revision=34102
2008-06-26 14:14:52 +00:00
Daniel Reimer
6c4b4e1148 We do not support any Wine LANG, SUBLANG Inventions. Bye, WALON and ESPERANTO.
svn path=/trunk/; revision=34101
2008-06-26 13:39:39 +00:00
Christoph von Wittich
5616673582 don't free a UNICODE_STRING which isn't allocated
svn path=/trunk/; revision=34099
2008-06-26 12:26:31 +00:00
Christoph von Wittich
4bcfbf7b99 don't free a UNICODE_STRING which isn't allocated
svn path=/trunk/; revision=34098
2008-06-26 12:20:09 +00:00
James Tabor
eec2739a8b Patch by Jeffrey Morlan <mrnobo1024 at yahoo.com>: Rearrange code in NtGdiSelectBitmap to prevent deadlock. See bug 3333.
svn path=/trunk/; revision=34097
2008-06-26 12:05:38 +00:00
Aleksey Bragin
968033dd41 - Rewrite David Welch's Ansi function wrappers to reduce their code size, improve readability, and fix a bug of freeing of a non-allocated string. Spotted by Christoph vW.
svn path=/trunk/; revision=34096
2008-06-26 11:49:47 +00:00
Christoph von Wittich
00334059ac don't free a UNICODE_STRING which isn't allocated
svn path=/trunk/; revision=34095
2008-06-26 11:34:56 +00:00
Christoph von Wittich
d8e81826d2 don't free a UNICODE_STRING which isn't allocated
svn path=/trunk/; revision=34094
2008-06-26 10:22:24 +00:00
Christoph von Wittich
9ff626f764 don't free a UNICODE_STRING which isn't allocated
svn path=/trunk/; revision=34093
2008-06-26 09:35:59 +00:00
Aleksey Bragin
ed1f927907 Jeffrey Morlan <mrnobo1024@yahoo.com>
- Fix a major problem in pushlock implementation: if there are 2 or more
threads waiting for a lock, only one of them ever gets woken. ExfWakePushLock
is missing a break in its loop so it removes all the WaitBlocks instead of just
the last one.
- This fixes all "weird" hangs happening, including FF1.5 installer hang, VMWare Video Driver Installer hang, taskmgr tabs hang, and other similar problems.
See issue #3141 for more details.

svn path=/trunk/; revision=34092
2008-06-26 08:26:48 +00:00
ReactOS Portable Systems Group
2b63244bc8 - Fix several interlocked list functions -- they should return NULL if the list is empty.
- Fix a bug in FreeLDR-ARM, we forgot to set the RegistryLength, resulting in a corrupted registry. We can now load the system registry.
- Enable code to handle DPC, Timer and Deferred Ready cleanup (portable code that's already written).
- Enable code to handle quantum end.
- We now load all the way to IoInitSystem!IopInitializeBootDrivers.


svn path=/trunk/; revision=34091
2008-06-26 06:38:42 +00:00
Daniel Reimer
e84c1a5512 Update xcopy, winhlp32 and wordpad to Wine HEAD. I kept Fireball's changes, but plz send them to Wine, too.
The Lithuan, Ukrainian and Greek Translators of winhlp32 should do the same.

svn path=/trunk/; revision=34090
2008-06-26 06:12:44 +00:00
Daniel Reimer
88c5a596a1 Update write and winfile to wine 1.0
This gives us new Translations for write. (Norway, Netherlands, Russia, Slovak) and a updated Danish one for winfile.

svn path=/trunk/; revision=34089
2008-06-26 06:10:28 +00:00
ReactOS Portable Systems Group
241449fc0e - Save and restore the trap frame for the current thread when we take an interrupt, so that ISRs can read it.
- We use this in the clock ISR, that can now actually send the trap frame to KeUpdateSystemTime.
- Implement KeUpdateRunTime to handle time accounting and DPC rescheduling as well as Quantum End.
- Ignore quantum end for now.
- We now have a working timebase, and we're back to our earlier checkpoint around CmInitSystem1!.


svn path=/trunk/; revision=34088
2008-06-26 05:56:35 +00:00
ReactOS Portable Systems Group
227dc95404 - Fix totally broken KeUpdateSystemRuntime code... please at least read your code once before committing.
svn path=/trunk/; revision=34087
2008-06-26 05:26:10 +00:00
Aleksey Bragin
eed84f7eae - MAKELONG takes (loword, hiword), not (hiword,loword) as was used in wordpad.
svn path=/trunk/; revision=34085
2008-06-25 19:59:10 +00:00
ReactOS Portable Systems Group
d7928010a4 - We now implement the KeUpdateSystemTime routine and the HalpClockInterrupt.
- We do not yet handle all cases, most notably, timer expiration.
- There may still be some bugs to work out in the code, but it's a start.
- This regresses progress, but does not ignore time anymore.

svn path=/trunk/; revision=34084
2008-06-25 16:10:14 +00:00
Marc Piulachs
82cbbc6ac9 - Fix InstallSysSetupComponents: SetupInstallFromInfSection was being called with the wrong HINF handler
- Always check for application existence before creating the shortcut

svn path=/trunk/; revision=34083
2008-06-25 14:21:27 +00:00
Filip Navara
3c6dcb0d0d Change the logic and make the AnswerInPublic Command option opt-out instead of opt-in. Now everything except !help is allowed in public again (due to popular demand).
svn path=/trunk/; revision=34082
2008-06-25 14:13:21 +00:00
Filip Navara
3790fc1254 Fix answers to !winerror <hex number> command and to !error command.
svn path=/trunk/; revision=34081
2008-06-25 14:07:13 +00:00
Marc Piulachs
a46601a21c - miscellaneous small fixes
- add support for preventing all commands to be run on the channel by default. Now TechBot only answers some of the commands in PM
- add back the error Command

svn path=/trunk/; revision=34079
2008-06-25 13:23:59 +00:00
James Tabor
b7525df85d Jeffrey Morlan (mrnobo1024 at yahoo.com) - Fix ModifyWorldTransform multiplies. See bug 3314.
svn path=/trunk/; revision=34078
2008-06-25 11:47:12 +00:00
Colin Finck
93bd1eebe6 Jeffrey Morlan (mrnobo1024@yahoo.com)
- Fix a race condition in msgina, which occasionally led to hangs at "Loading your personal settings"

See issue #3384 for more details.

svn path=/trunk/; revision=34077
2008-06-25 11:12:42 +00:00
Aleksey Bragin
7a18c92616 - Fix broken 0-padding, spotted by Russel.
See issue #3385 for more details.

svn path=/trunk/; revision=34076
2008-06-25 09:07:41 +00:00
ReactOS Portable Systems Group
b5cddb8ef5 - Implement KiComputeTimerTableIndex and stub KeUpdateRunTime und KeUpdateSystemTime.
- Hitting checkpoint in trap.c: DPC/Timer Delivery!
- Must now implement clock interrupt in HAL.

svn path=/trunk/; revision=34075
2008-06-25 05:01:31 +00:00
Dmitry Chapyshev
3d51d8fa8a - Start implementing MediaClassInstaller function
svn path=/trunk/; revision=34074
2008-06-24 15:17:28 +00:00
Colin Finck
b79ef105f1 Get shell32 to compile warning-free
Patch by Stefan Ginsberg with minor modifications by me

svn path=/trunk/; revision=34073
2008-06-24 14:37:50 +00:00
ReactOS Portable Systems Group
aa2b83d508 - Implement MmGetPfnForProcess, MmIsPageSwapEntry.
- Fix a bug in MmDeletePageTable.
- Use MmCreateVirtualMappingForKernel when we are already in the right process context, and allow it to be used for addresses < KSEG0_BASE as well.
- We now have full memory mapped file support, and get all the way to CmInitSystem1.


svn path=/trunk/; revision=34072
2008-06-24 14:16:06 +00:00
Johannes Anderwald
f0d289f527 - fix typo
svn path=/trunk/; revision=34071
2008-06-24 12:57:56 +00:00
Johannes Anderwald
eb0b862540 - check for a valid file descriptor
svn path=/trunk/; revision=34070
2008-06-24 12:42:22 +00:00
Dmitry Chapyshev
4b8a3ba4d6 - Add stubs for more functions
svn path=/trunk/; revision=34069
2008-06-24 12:00:53 +00:00
Dmitry Chapyshev
13ddc0ef07 - Activate default layout on startup
svn path=/trunk/; revision=34068
2008-06-24 09:59:35 +00:00
Daniel Reimer
e8d6023ad5 Add Rbuild files for WineTestGUI.
I had to disable the Icons to be able to build it. They seem to be invalid.

svn path=/trunk/; revision=34067
2008-06-24 09:05:56 +00:00
Dmitry Chapyshev
2bd794488a - Update Russian translation
svn path=/trunk/; revision=34066
2008-06-24 08:10:16 +00:00
James Tabor
3780af2706 Add PS_JOIN_MASK to psdk.
svn path=/trunk/; revision=34065
2008-06-24 03:17:35 +00:00
Aleksey Bragin
97be5703d8 Cameron Gutman <aicommander@gmail.com>
- Initialize LastChanceShutdownList.
- Sndblst.sys and a bunch of other drivers using Io[Un]RegisterLastChanceShutdownNotification work now.
See issue #3331 for more details.

svn path=/trunk/; revision=34064
2008-06-23 21:36:14 +00:00
Aleksey Bragin
0f6b71ad04 Stefan Ginsberg <stefan__100__@hotmail.com>:
- Make user32 and kernel32 compile warning-free.

svn path=/trunk/; revision=34063
2008-06-23 18:57:10 +00:00
James Tabor
f99a2998d3 Fix typo.
svn path=/trunk/; revision=34062
2008-06-23 17:57:41 +00:00
ReactOS Portable Systems Group
a179aed613 - Fix broken system call handler with shitty but works system call handler.
- Fix broken .rbuild file -- not sure how this was supposed to build in the first place.
- This gets us further -- more of ARM Mm needs implementing.


svn path=/trunk/; revision=34061
2008-06-23 16:08:32 +00:00
Aleksey Bragin
bd7a8aac20 - Add a missing return in case of exception. Spotted by Stefan Ginsberg.
svn path=/trunk/; revision=34060
2008-06-23 14:55:55 +00:00
Aleksey Bragin
3a0ed2c825 - Fix CM SEH by public demand.
svn path=/trunk/; revision=34059
2008-06-23 12:45:27 +00:00
Daniel Reimer
832844b9fb Bug 3378: update for slovak by Mario Kacmar (kario@szm.sk)
Bug 3287: My network place properties not displayed correctly by Mario Kacmar (kario@szm.sk)
P.S. The Polish Translation in the previous Commit was made by Maciej Bialas, not Olaf Siejka.

svn path=/trunk/; revision=34058
2008-06-23 10:37:18 +00:00
Daniel Reimer
8ad26a0358 Bug 3367: Korean translation of regedit by Sengju Kim (admin@manateeshome.com)
Polish Translation of usrmgr by Olaf Siejka
Renamed the Rest of the Korean RC Files.

svn path=/trunk/; revision=34057
2008-06-23 09:57:46 +00:00
Daniel Reimer
ec9dd69633 Start to rename all Korean RC Files to "ko-KR.rc". "ko-KO.rc" was not correct.
svn path=/trunk/; revision=34056
2008-06-23 09:42:06 +00:00
ReactOS Portable Systems Group
8df8940a6e - The CRT sync by "fireball" is incorrect and results in a broken ntos kernel. Although it may work on i386 builds, it results in a corrupted kernel anyways. On ARM, we try to hackfix around it by not including some routines that should not be in the kernel but were being imported due to the broken crt changes.
- We do not attemp to build world anymore. We have handwritten a new ARM rbuild file that only builds what we need for our current ARM work.
- HAL and FreeLDR do not seem to have an "installpath"... why not? Added one at least for our ARM stuff, so that "make install" can drop the binaries.
- Fixed some ARM DDK macro inconsistencies, allow more drivers to build.
- It is now possible to use "make install -k" to drop a completely working ARM build onto an image due to all these changes.

svn path=/trunk/; revision=34055
2008-06-23 03:57:50 +00:00
James Tabor
835571354c Update credits.
svn path=/trunk/; revision=34054
2008-06-23 01:09:20 +00:00
Colin Finck
5882bc1cea - Rebuild the left popup menu containing the keyboard layouts on every click to take care of keyboard layout changes.
I know this is probably not the best way for doing the job, but I don't know of any other method to achieve the same.
- Change the right popup menu to only show the "Options" and "Exit" menu items (like ctfmon does)
- Add the missing 'return 0;' statements, when a message was handled

See issue #3372 for more details.

svn path=/trunk/; revision=34053
2008-06-22 21:59:27 +00:00
Colin Finck
f721678f57 Fix the messed up "freeldr_arch" rbuild file: Specify one "freeldr_arch" module and then the files to build based on the architecture, not a separate module per architecture
Patch by Alex

svn path=/trunk/; revision=34052
2008-06-22 21:43:02 +00:00
Colin Finck
955672158d Build host_wcsfuncs as a host static library, not a target static library
Fixes build for all non-Win32 hosts

svn path=/trunk/; revision=34051
2008-06-22 21:41:25 +00:00
Colin Finck
8d9b815544 Add a library "host_wcsfuncs" with implementations for UTF-16 string functions needed for some host tools
Instead of copying those functions into every host tool, which needs it (as we did previously), we can now implement them all in this library and link the host tools to it.
If USE_HOST_WCSFUNCS is not defined, the "wcsfuncs.h" file will define them to the CRT functions (so this library does not create overhead, when the code is built for the target platform)

See issue #3285 for more details.

svn path=/trunk/; revision=34050
2008-06-22 20:58:56 +00:00
Colin Finck
33c4221b1e Add support for a new environment variable ROS_GENERATE_RSYM to disable RSYM during the build
Patch by Alex

svn path=/trunk/; revision=34049
2008-06-22 18:38:12 +00:00
Colin Finck
c251e18523 Move wshtcpip to dll/win32, it's a DLL and not a driver
"Patch" by Alex

svn path=/trunk/; revision=34048
2008-06-22 18:19:19 +00:00
Aleksey Bragin
07a38cedf1 - Extend SEH to cover writing result to output arguments. Noticed by Stefan Ginsberg.
svn path=/trunk/; revision=34047
2008-06-22 16:24:15 +00:00
Aleksey Bragin
e1419be7cd SVN Maintenance: set eol-style:native for lib/sdk/crt.
svn path=/trunk/; revision=34046
2008-06-22 12:08:15 +00:00
Matthias Kupfer
39fd08d7ce - Seungju Kim <admin AT manateeshome DOT com>
- Korean translation of explorer-new added
- See issue #3368 for more details.
- Alexander Wurzinger <<Lohnegrim At gmx DOT net>
- Patch for the "CreateEnergyList failed"-Error added.
- See issue #2469 for more details.

svn path=/trunk/; revision=34045
2008-06-22 10:01:59 +00:00
Ged Murphy
7d842bd859 Don't link to libs we don't need
svn path=/trunk/; revision=34044
2008-06-21 23:27:23 +00:00
Ged Murphy
3c16ea89b9 - Auto expand the list of available tests
- Add the selected test to the main combo
- Tag the dll path to each combo item
- Run the test when the 'run' button is hit. 
We can now run all Wine tests from the GUI, but we get no feedback yet.

svn path=/trunk/; revision=34043
2008-06-21 19:19:22 +00:00
Aleksey Bragin
3ee18cdb67 - Provide a real fix for fwprintf and fputwc in case the output stream is in TEXT mode by doing a widechar to multibyte conversion.
- This should be submitted to Wine to close their bug.
See issue #3353 for more details.

svn path=/trunk/; revision=34042
2008-06-21 15:58:00 +00:00
Pierre Schweitzer
7cf55b1f25 Ext2 and NTFS:
- Remove FCB from the linked list when it's released
NTFS:
- Check we have a FCB before releasing it

svn path=/trunk/; revision=34041
2008-06-21 11:20:48 +00:00
Matthias Kupfer
1334454750 - fix hive for korean keyboard layout
Alexander Wurzinger <Lohnegrim At gmx DOT net>
- Patch to fix the "Pos InitData failed"-Error in power options.
- See issue #2469 for more details.

svn path=/trunk/; revision=34040
2008-06-21 10:08:09 +00:00
Pierre Schweitzer
3d5de429aa Bugfixes:
- Check whether we have a valid VCB before creating FCB
- Initialize FCBs list before using it...

svn path=/trunk/; revision=34039
2008-06-21 10:04:14 +00:00
Aleksey Bragin
cdd5ae5641 - vsn[w]printf -> _vsn[w]printf.
svn path=/trunk/; revision=34038
2008-06-21 10:00:59 +00:00
Aleksey Bragin
a04bcca3a3 Jeffrey Morlan <mrnobo1024@yahoo.com>
- Wrap libwine's memory allocations, avoiding msvcrt imports in kernel32
- The cause is that libwine/debug.c uses functions (malloc, free, realloc, _strdup) which are only present in a complete CRT, creating imports from msvcrt.dll in any module that uses it, including kernel32.dll. Since kernel32 is currently importing from msvcrt, kernel32 gets DLL_PROCESS_DETACHed first, creating a problem for msvcrt's DLL_PROCESS_DETACH which, as a result of a recent bugfix, now uses kernel32 functions that depend on the resources that were freed.
- Fix this by implementing those 4 functions as wrappers around the Local* APIs, in order to avoid the problematic imports.
See issue #3373 for more details.

svn path=/trunk/; revision=34037
2008-06-20 19:00:37 +00:00
Pierre Schweitzer
b22a7f63e8 Miscellaneous NTFS patch:
- Filled FCB structures with more informations
- Added them to linked list
- Set mounted volume to FILE_DEVICE_DISK_FILE_SYSTEM
- Various code cleanup

svn path=/trunk/; revision=34036
2008-06-20 18:40:57 +00:00
Ged Murphy
8683e62101 Don't forget to free the parent nodes
svn path=/trunk/; revision=34035
2008-06-20 11:39:31 +00:00
Ged Murphy
0537163f8d Save the select test info on close.
The browse dialog now lists all winetest dlls and allows selection of either all tests in all dlls, all tests within a dll, or the option to choose individual tests. (rewuires a modified winetest framework)

svn path=/trunk/; revision=34034
2008-06-20 11:20:26 +00:00
Ged Murphy
938f407a80 - build up test data for each node in the treeview and tag it
- traverse the tree recursively and free all data on close

svn path=/trunk/; revision=34033
2008-06-20 08:21:49 +00:00
Colin Finck
25f5cca19d Put a comment and an #if around the lines I changed in my previous commit, because the ##__VA_ARGS__ syntax was only tested with MSVC and GCC
svn path=/trunk/; revision=34032
2008-06-19 22:03:22 +00:00
Colin Finck
460379ac3f Reapply Ged's fix, this time correctly :-)
Thanks to hackbunny for pointing out that ##__VA_ARGS__ will strip the trailing comma and this works on both GCC and MSVC.

svn path=/trunk/; revision=34031
2008-06-19 21:57:32 +00:00
Ged Murphy
d726ab1152 revert the debug macros change, the entire codebase isn't ready for it yet
svn path=/trunk/; revision=34030
2008-06-19 21:40:08 +00:00
Ged Murphy
2db5b6cc04 Only call DbgPrintEx once for each debug macro. This stops trace info from being split over 2 lines in some tools, like DebugView.
svn path=/trunk/; revision=34029
2008-06-19 20:42:57 +00:00
Matthias Kupfer
0632ec63d8 - Template for korean keyboard layout implemented (TODO: kbdko.c needs modifications for korean keyboard layout)
- bootdata, hives and usetup modified for korean keyboard layout
- See issue #3345 for more details.
- Patch from Gabriel Ilardi <gabrielilardi [at] hotmail [dot] it> for timedate settings applied
- See issue #3251 for more details.



svn path=/trunk/; revision=34028
2008-06-19 17:58:43 +00:00
Colin Finck
fa77a22c50 GCC 4.3.x fixes for cabman and sysreg
Also clean up sysreg a bit and put all #include's for standard headers in the .h files. (they were spread around the .cpp and the .h files previously)

See issue #3370 for more details.

svn path=/trunk/; revision=34027
2008-06-19 17:07:38 +00:00
Aleksey Bragin
a00a86834c - Remove all string msvcrt->ntdll forwards: let's be consistent, either forward everything, or forward only something. I left assembly math functions though, since they are standalone and 100% identical.
- As a result, fixed a couple of incorrect functions linkage.
- Fixed a name of vsnprintf, so really msvcrt's version is used now, not RTL's one.

svn path=/trunk/; revision=34026
2008-06-19 13:08:46 +00:00
Aleksey Bragin
b1a06042c9 - Restored ACP/OEMCP/MACCP static entries (removed in 34010) - they are needed for LiveCD boot process.
svn path=/trunk/; revision=34025
2008-06-19 12:11:32 +00:00
Ged Murphy
671448e212 Add all modules within a test to the treeview
svn path=/trunk/; revision=34024
2008-06-19 11:57:14 +00:00
Aleksey Bragin
febcfe8913 - Revert 34010 completely, too much breakages. "Don't fix what's not broken".
svn path=/trunk/; revision=34023
2008-06-19 08:41:31 +00:00
Ged Murphy
b790fafdb2 add all test dlls into the treeview
svn path=/trunk/; revision=34022
2008-06-19 08:36:17 +00:00
Daniel Reimer
ab6d5a14d6 Bug 3362: Italian translation update by Paolo Devoti (devotip@tiscali.it)
svn path=/trunk/; revision=34021
2008-06-19 06:15:59 +00:00
James Tabor
a4a099099f Path does not work and it locks up the system with out any debug information. I will try to have it ready before 0.3.5 is release.
svn path=/trunk/; revision=34020
2008-06-19 01:47:57 +00:00
James Tabor
e402662f7e Set default miter limit.
svn path=/trunk/; revision=34019
2008-06-19 01:29:01 +00:00
Dmitry Chapyshev
2a4eb36d58 - Fix typos
svn path=/trunk/; revision=34018
2008-06-18 19:33:55 +00:00
Matthias Kupfer
2559061aa2 Jeffrey Morlan <mrnobo1024 AT yahoo DOT com>
- Patch for Optimizations of TextIntGetTextExtentPoint
- See issue #3366 for more details.

svn path=/trunk/; revision=34017
2008-06-18 19:15:37 +00:00
Ged Murphy
cda095c0fe The start of a GUI to make running the Wine API tests a pleasure rather than a pain.
This will plug into the new testing framework for the Wine tests, which will also publish it's results on a live website (if I can get Colin to help me with the web stuff ;) )
This is the time to pester me with requests / ideas anyone may have.

svn path=/trunk/; revision=34016
2008-06-18 19:10:39 +00:00
Dmitry Chapyshev
d73e9e4231 - Add rasacd driver (not implemented)
svn path=/trunk/; revision=34015
2008-06-18 19:00:50 +00:00
Dmitry Chapyshev
23b40d082d - Add "Alternate Sorts" keys (used by kernel32)
- Delete static codepages values (they are added in usetup)
- Add keys for powrprof/powercfg

svn path=/trunk/; revision=34014
2008-06-18 18:58:16 +00:00
Aleksey Bragin
297baed6c0 - Add a bit more DPFLTR items.
svn path=/trunk/; revision=34013
2008-06-18 17:56:07 +00:00
Dmitry Chapyshev
e612eaf998 - Small update icon
svn path=/trunk/; revision=34012
2008-06-18 16:48:25 +00:00
Dmitry Chapyshev
4cf0f9906b - Implement ReplaceFileA/W (not fully)
- Implement DnsHostnameToComputerNameA/W (not fully)
- Implement FoldStringA/W
- Implement SetCPGlobal (not tested)
- Implement TzSpecificLocalTimeToSystemTime
- Implement ReadFileScatter
- Implement WriteFileGather
- Other small changes
All based on Wine 1.0 implementation

svn path=/trunk/; revision=34010
2008-06-18 15:37:44 +00:00
Aleksey Bragin
f550691222 - Rename made-up Ob functions names to match publicly available NT names, as most of other Ob names do.
svn path=/trunk/; revision=34009
2008-06-18 12:28:29 +00:00
Aleksey Bragin
ab2b63b87b - More fixes to pushlock implementation:
* In ExTimedWaitForUnblockPushLock, check only for STATUS_SUCCESS (which is the only status return when the wait was satisfied, while other like STATUS_TIMEOUT would still be considered a success).
* In ExBlockPushlock, fix a typo when trying out an interlocked exchange with a new value - wrong value was assigned.
* In ExfAcquirePushLockShared, assign PushLock value passed to this function, not the NewValue, like it's done in ExfAcquirePushLockExclusive.
* In ExfReleaseReleasePushLockExclusive, fix a typo which led to incorrect behavior and not waking up the pushlock when it should be.

svn path=/trunk/; revision=34008
2008-06-18 11:34:10 +00:00
Matthias Kupfer
67572c740e - several german translation fixes
- missing file of issue #3365 added (see rev. 35004)

svn path=/trunk/; revision=34007
2008-06-18 11:19:07 +00:00
Aleksey Bragin
da950aee49 - Wake up a pushlock only if it wasn't waking already, not vice versa (was a typo in ExfAcquirePushLockExclusive, but was done correctly in ExfAcquirePushLockShared).
svn path=/trunk/; revision=34006
2008-06-18 09:53:38 +00:00
Matthias Kupfer
cd5d1959f0 Vytis Girdzijauskas <cman AT cman DOT us>
- Lithuanian translation of explorer-new and shimgvw
- See issue #3365 for more details.


svn path=/trunk/; revision=34005
2008-06-18 09:39:10 +00:00
James Tabor
7f2b7d7436 Implement Get/SetMiterLimit, with proper float containment.
svn path=/trunk/; revision=34004
2008-06-17 20:19:30 +00:00
Dmitry Chapyshev
9e2224d220 - Comment some languages
svn path=/trunk/; revision=34003
2008-06-17 20:11:22 +00:00
Dmitry Chapyshev
10ea44c612 - Add correct scrolling by keypress
svn path=/trunk/; revision=34002
2008-06-17 20:10:07 +00:00
Aleksey Bragin
9e8038303f Mikhail Zvyozdochkink <mzvyozd@narod.ru>
- Limit inputable max partition size to 999999 Mbs.
See issue #3356 for more details.

svn path=/trunk/; revision=34001
2008-06-17 18:42:20 +00:00
Aleksey Bragin
85dbdefb9f Daniel Zimmerman <netzimme@aim.com>
- Cosmetic fix: initialize pushlocks using a special macro, not by assigning 0 to its value.
See issue #3352 for more details.

svn path=/trunk/; revision=34000
2008-06-17 18:21:41 +00:00
James Tabor
9127f8cb64 Fix build
svn path=/trunk/; revision=33999
2008-06-17 05:33:46 +00:00
James Tabor
b5b4c9ab4b Update changes to Clip regions andregions. New support for Rao and Vis.
svn path=/trunk/; revision=33998
2008-06-17 05:19:08 +00:00
James Tabor
9dbc5faab4 Update NtUserSetSysColors.
svn path=/trunk/; revision=33997
2008-06-17 02:42:40 +00:00
Timo Kreuzer
8594831504 IntEngGradientFill: fix cleanup when calling the driver
svn path=/trunk/; revision=33996
2008-06-16 18:56:52 +00:00
Timo Kreuzer
2e105930d6 - print out when process takes too much gdi handles
- GDIOBJ_FreeObjByHandly: unlock handle table entry when object to delete was locked
- REGION_AllocRgnWithHandle: unlock region before trying to delete it on failure
Now gdi32_winetest clipping doesn't freeze ros anymore

svn path=/trunk/; revision=33995
2008-06-16 18:27:18 +00:00
Timo Kreuzer
66397a3a3f - add test for GdiGetCharDimension
- fix a test name
- comment out more tests for EngReleaseSemaphore, they cause heap corruption on ros
- convert more TEST -> RTEST

svn path=/trunk/; revision=33994
2008-06-16 15:24:05 +00:00
Timo Kreuzer
aa36da89c9 TEST -> RTEST as these succeed on ros now
svn path=/trunk/; revision=33993
2008-06-16 13:27:39 +00:00
Timo Kreuzer
e49f53ea51 comment out some tests that fail on win XP, until someone fixes them
svn path=/trunk/; revision=33992
2008-06-16 13:20:06 +00:00
Aleksey Bragin
999e377e55 - Revert .spec -> .def conversion (incorrect one also, which broke rostests compile).
svn path=/trunk/; revision=33991
2008-06-16 12:22:13 +00:00
Aleksey Bragin
89d35e62dd - More NDK fixes.
- Hackmove: Define NTDDI_VERSION in kernel32, otherwise it gets derived from WINVER version (and thus kernel32 becomes Vista). This allows to remove #undef NTDDI_VERSION from ndk/obtypes.h.

svn path=/trunk/; revision=33990
2008-06-16 09:20:47 +00:00
Aleksey Bragin
6c45a42f53 - NDK fixes (structure rename only).
svn path=/trunk/; revision=33989
2008-06-16 08:54:21 +00:00
Dmitry Chapyshev
1a6bae63ba - Small fix DeletePwrScheme
- Implement ReadGlobalPwrPolicy
- Implement ReadPwrScheme
- Implement ValidatePowerPolicies (not fully implemented)

svn path=/trunk/; revision=33988
2008-06-16 08:20:21 +00:00
Dmitry Chapyshev
31619ecee5 - Update information about powrprof
svn path=/trunk/; revision=33987
2008-06-16 06:06:38 +00:00
Dmitry Chapyshev
3b3c516d31 - Fork powrprof.dll
- Replace .spec with .def
- Implement EnumPwrSchemes
- Implement GetActivePwrScheme
- Implement DeletePwrScheme

svn path=/trunk/; revision=33986
2008-06-16 06:00:22 +00:00
Colin Finck
abae3b6913 Use a ClipRegion when collapsing, so that the TreeView works correctly.
This patch has already been submitted to Wine, but as they don't care currently, I applied it manually here and updated "comctl32_ros.diff" accordingly.

Patch by Timo Kreuzer

svn path=/trunk/; revision=33985
2008-06-15 16:05:39 +00:00
Colin Finck
6846255313 Fix yet another invalid use of WriteFile.
This patch has already been submitted to Wine, but as they don't care currently, I applied it manually here and updated "wininet_ros.diff" accordingly.

svn path=/trunk/; revision=33984
2008-06-15 16:04:03 +00:00
Daniel Reimer
5ffe9e945e Bug 3320: Czech translation update by Radek Liska (radekliska@gmail.com)
Small Update for the German USETUP by me.

svn path=/trunk/; revision=33982
2008-06-15 08:14:43 +00:00
ReactOS Portable Systems Group
69bc0881f9 - Continue cleanup, use new peripheral headers (And fix them)
- Fix ARM HAL headers and use them


svn path=/trunk/; revision=33981
2008-06-15 07:54:18 +00:00
ReactOS Portable Systems Group
480243927a - These are peripherals, not targets
svn path=/trunk/; revision=33980
2008-06-15 06:15:13 +00:00
ReactOS Portable Systems Group
b300ac4364 - Start major ARM port cleanup:
- Make use of the SARCH rbuild parameter to define the target board (default to ARM VersatilePB for now)
  - Make official ARM include directory (include/reactos/arm) and move the ARM DDK there
  - Start creating header files for different target board components.
- Update halfuncs in NDK with one missing function, and temporarily, one ARM function.

svn path=/trunk/; revision=33979
2008-06-15 06:14:02 +00:00
Dmitry Chapyshev
a52eaf94d5 - Update Russian translation
svn path=/trunk/; revision=33978
2008-06-15 06:01:53 +00:00
ReactOS Portable Systems Group
def9fa66b4 - Create cmhardwr.c for ARM, stub it out.
- Implement KiInitMachineDependent -- this is only useful for x86 and has nothing relevant to ARM, so we just return.
- Implement HalAllProcessorsStarted (again, a no-op) and HalQueryRealTimeClock (uses the RTC on the board -- uboot must set it up first).
- Make sure we get the right Sp during a system call (this is still broken though).
- We need to fix our system call handler next.


svn path=/trunk/; revision=33977
2008-06-15 05:40:27 +00:00
ReactOS Portable Systems Group
531a8ad588 - Copy/pasted a bunch of code from the i386 bootvid for text output.
- Don't implement BitBlt for now.
- Add the bootdata font file to the arm bootvid as well.
- Not sure how it's possible, but we are seeing text output on the console with this hacked-up code! The ReactOS version string appears...
- We are now getting much further in the boot cycle.


svn path=/trunk/; revision=33976
2008-06-15 04:43:22 +00:00
ReactOS Portable Systems Group
133e63adea - Implement VidSolidColorFill, VidSetScrollRegion and VidSetTextColor
- Fix a bug in VidpBuildColor


svn path=/trunk/; revision=33975
2008-06-15 04:11:21 +00:00
ReactOS Portable Systems Group
bfd0d8594d - Fix a bug in MmGetPhysicalAddress.
- Don't hang in the clock interrupt anymore, for now we'll just ignore it (but it works! :D)
- Make all unimplemented bootvid functions hang the system, so we can better stop at progress-points.
- Implement VidInitialize:
  - We allocate a 640x480@16bpp framebuffer using contiguous physical memory (our MMU code survives!).
  - We setup the LCD controller timings and framebuffer address.
  - We enable the LCD
- For debugging, we're also drawing a nice little test pattern... and it works! We have GUI Code :)


svn path=/trunk/; revision=33974
2008-06-15 03:32:52 +00:00
ReactOS Portable Systems Group
0ea44bde8f - Separate bootvid into bootvid/i386 and bootvid/arm (no code change to i386 version).
- Stub out all the bootvid functions for ARM, and add an infinite loop so we stop there.
- Remove the infinite loop from the HAL -- Hal Initialization is complete.
- We must now implement the LCD graphics functions.


svn path=/trunk/; revision=33973
2008-06-14 23:43:45 +00:00
Timo Kreuzer
86909f313f revert r26384 - this is an old hack to make console output work. We don't need this any longer since freetype / text output is fixed.
svn path=/trunk/; revision=33972
2008-06-14 23:20:22 +00:00
ReactOS Portable Systems Group
35656fd354 - Dude, we don't need to calibrate anything... we've got a 1MHz timer, which means 1us-precision. KeStallExecutionProcessor needs 1us-precision!
- Since we have two timers (ha x86!!!), set the second one as the stall timer. It's a one-shot periodic timer, set to the exact number of microseconds being waited on.
- To fully emulate stalling, we don't use a clock interrupt for it (it supports not sending one!) and just busy-loop until the value reaches 0.
- Tried it with a 10 second (10000000 us) wait and it worked -perfectly-.
- Re-implemented KeStallExecutionProcessor and got rid of the other code. Back in HalInitSystem(phase1) now...
- Also killed some DPRINT1s getting on my nerves.


svn path=/trunk/; revision=33971
2008-06-14 23:19:03 +00:00
ReactOS Portable Systems Group
fe22db7c05 - We now implement the idle loop (thanks for fixing the interrupt code...).
- We are now back to HalInitSystem just like before the previous fixes.
- Now we'll implement stall calibration and switch to the clock interrupt.


svn path=/trunk/; revision=33970
2008-06-14 22:48:30 +00:00
ReactOS Portable Systems Group
949bda1cee - Implement the basic stall interrupt to be used to calculate the factors for KeStallExecution (using NT MIPS algorithm, hope this will work)
- Also written KeStallExecution.
- Now, we are back to where we hang before Phase 1 (so Phase 1 doesn't occur anymore).
- This hang is because we used to do a DPC here, which isn't good, since IRQL is already at dispatch.
- Instead, the correct course of action is to enter the idle loop, which will schedule the phase 1 thread.
- But, we don't have an idle loop yet ;-)


svn path=/trunk/; revision=33969
2008-06-14 22:28:40 +00:00
Matthias Kupfer
8b9fa093a3 - Give listbox in explorer searchprograms dialog i18n column heads (only done for German and English, other language need to be done)
svn path=/trunk/; revision=33968
2008-06-14 22:21:44 +00:00
ReactOS Portable Systems Group
e66a86c8b9 - Fix stupid IRQL/Interrupt handling code that someone wrote ;):
- Get rid of KeSwapIrql -- both lower and higher IRQL handling was treated the same!
  - We can now re-activate the assert in the IRQL code
  - Disable interrupts before changing the interrupt mask!!!
  - And re-enable them solely if they were enabled.
  - Clear interrupts mask before setting a new one -- raising isn't always additive!
  - Fix KiInterruptHandler to perform operations in the right order.
  - Finish implementing interrupt exit code.
- Code KeArmStatusRegisterGet to read CPSR and interrupt status.
- Make debug prints a lot more readable and dont trying to acquire the stack during pool allocations.
- Setup the clock interval timer!!!
- This code regresses progress but makes stuf fwork right. We'll get better after implementing the stall interrupt.


svn path=/trunk/; revision=33967
2008-06-14 22:02:50 +00:00
Colin Finck
ff164b383d - Implement the code for the "Run" and "Shutdown" menu items, create stubs for the other custom commands
- Replace the ROS-specific STDCALL by APIENTRY for the function prototypes

svn path=/trunk/; revision=33966
2008-06-14 21:18:08 +00:00
James Tabor
e264b0b3c9 Patch by carlo bramix at libero dot it: Bug 3336 statusbar in the wrong place.
svn path=/trunk/; revision=33965
2008-06-14 17:10:55 +00:00
Matthias Kupfer
11e8d42306 Vytis Girdzijauskas <cman AT cman DOT us>
- time zone update to sync with Windows tz data
- See issue #3084 for more details.

svn path=/trunk/; revision=33964
2008-06-14 11:49:55 +00:00
Matthias Kupfer
9439a307c3 niski_ (bjauy AT go2 DOT pl)
- polish language patch for shell32.
- See issue #3338 for more details.

svn path=/trunk/; revision=33963
2008-06-14 10:23:05 +00:00
Matthias Kupfer
15ce5e598a fix/add some german translations
svn path=/trunk/; revision=33962
2008-06-14 08:51:42 +00:00
Aleksey Bragin
17f5df55c4 - Release the acquired spinlock in IoUnregisterShutdownNotification(), spotted by Cameron Gutman.
svn path=/trunk/; revision=33961
2008-06-14 08:16:22 +00:00
James Tabor
ddd1764f85 Patch by Jeffrey Morlan (mrnobo1024 at yahoo dot com, irc: Goplat), Registers ansi scroll bar proc.
svn path=/trunk/; revision=33960
2008-06-14 05:34:02 +00:00
Colin Finck
427bda68a5 Don't use MenuCleanupRosMenuItemInfo for an array of Items allocated on the heap!
This function is meant to be used for a single menu item info and just frees the memory allocated for dwTypeInfo.

Replaced this with a simple HeapFree call to free the memory for the whole array allocated in MenuGetAllRosMenuItemInfo.
Fixes a heap corruption discovered by encoded.

See issue #3349 for more details.

svn path=/trunk/; revision=33959
2008-06-14 00:00:20 +00:00
Colin Finck
aa42a19f40 Revert parts of r33578:
- First of all, MenuSetItemData is only called from InsertMenuA/W and ModifyMenuA/W.
  Therefore the passed MENUITEMINFO structure will always be empty, so it makes no sense to check for flags in this structure.
  This way, I could simplify the code block for MF_BITMAP.
- Also fType = MFT_BITMAP and fMask = MIIM_BITMAP at the same time passed to win32k don't work.
  Changing this back to only set fMask fixes bitmap menus.
- Furthermore the data for MF_OWNERDRAW is really stored in dwItemData and not in dwTypeData.
  The MSDN documentation for InsertMenu applies here, not the one for the MENUITEMINFO structure.
  This fixes owner-drawn menus like the one in Abiword.

See issue #3272 for more details.

svn path=/trunk/; revision=33958
2008-06-13 23:14:27 +00:00
Matthias Kupfer
7a0f6cc635 - german translation of explorer completed
- minor fix for label text size in german version of desk.cpl

svn path=/trunk/; revision=33957
2008-06-13 20:33:42 +00:00
James Tabor
f7a11147ec Add notes, no code change.
svn path=/trunk/; revision=33956
2008-06-13 18:19:28 +00:00
Timo Kreuzer
86853e2cea MSDB KB 145994 (http://support.microsoft.com/?scid=kb%3Ben-us%3B145994): yBaseUnit is textmetric->tmHeight not average text extent. Testing confirms that GdiGetCharDimension returns this as height. This makes dialog boxes less stretched in height. Still not identical to XP. calx.exe: On XP yBaseUnit == 13, on ROS == 14 (was 16 before)
svn path=/trunk/; revision=33955
2008-06-13 13:33:53 +00:00
Thomas Bluemel
451c7e1c69 Revert 33953. This is completely wrong! WINE doesn't quite get the ordinals right. Ordinal 200 really should be SHCreateDesktop and ordinal 201 really should be SHDesktopMessageLoop. I am currently working on a patch for this. The fact that explorer-new was able to start with these changes is just pure coincidence.
svn path=/trunk/; revision=33954
2008-06-13 13:14:08 +00:00
Dmitry Chapyshev
756f63990f - Implement AddCommasW
- Implement SHLocalAlloc
- Implement SHLocalFree
- Implement SHLocalReAlloc
explorer-new starts in reactos now!

svn path=/trunk/; revision=33953
2008-06-13 07:58:34 +00:00
Thomas Bluemel
a21b191fdf Add missing definitions
svn path=/trunk/; revision=33952
2008-06-12 23:38:09 +00:00
Timo Kreuzer
ee9c5d0a88 Patch by Jeffrey Morlan (mrnobo1024 at yahoo dot com, irc: Goplat), modified by me:
The freetype asm function FT_MulFix clobbers the edx register, but doesn't tell it to gcc explicitly, so when inlined versions were resulting in wrong results. Fix it by also marking edx as output register.
Also enable commented out code in win32k again that works correctly now.
By me:
I modified the patch to not alter any 3rd party code, but instead I copied the fuction to _ftmulfix_ros.c and also coplied the container file ftbase.c which now uses the fixed function from our private file.
This fixes a bunch of text output issues (underscore, text marking)
See issue #3346 for more details.

svn path=/trunk/; revision=33951
2008-06-12 20:50:12 +00:00
Thomas Bluemel
cdbc0773a5 Lookup DrawCaptionTemp () only once during startup
svn path=/trunk/; revision=33950
2008-06-12 16:50:57 +00:00
Thomas Bluemel
5d074bd015 Fix call to DrawCaptionTemp ()
svn path=/trunk/; revision=33949
2008-06-12 15:45:09 +00:00
Aleksey Bragin
cb467b55e9 - Fix a bug in timedate.cpl, where an incorrect color was passed.
- Add bounds checking for GetSystemMetrics both in user32 and in kernel counterpart.
- Based on a patch from bug 3316.
See issue #3316 for more details.

svn path=/trunk/; revision=33947
2008-06-12 09:50:12 +00:00
Aleksey Bragin
57da8d9f18 - Formatting cleanup for the previously patched functions.
svn path=/trunk/; revision=33946
2008-06-12 09:40:33 +00:00
Aleksey Bragin
3da8a2640d Oriol Pique <oripipa@yahoo.es>
- Minor patch to HEAP_GetPtr to include magic value in debug output.
- Fixing the parameters checking in HEAP_InitSubHeap (it is currently not used - put between #if 0 / #endif ).
- Correcting HEAP_FindFreeBlock which was logging error message as warning (while still returning NULL to caller) by changing severity of logged message.
- Implementing RtlEnumProcessHeaps (previously stubbed out).
- Fixing sanity checks in and implementation of RtlGetProcessHeaps (previously
the function was not checking for the counter value, and also was not assigning anything to the returned value; now this seems to be corrected.
- Fixing RtlValidateProcessHeaps implementation (the function was stubbed out because (most probably, I wasn't able to find a bug mentioning this) it was previously using a global lock for all heaps (which probably could cause some problems in the kernel), now it only locks heaps belonging to the given process - and this is the correct behaviour.

Aleksey Bragin <aleksey@reactos.org>
- Fix typo in ntuser.c, and low severity of debug message.
See issue #2964 for more details.

svn path=/trunk/; revision=33945
2008-06-12 09:35:24 +00:00
Aleksey Bragin
fd13a6484a - Fix two bugs in MiDoMappedCopy: MI_MAPPED_PAGES is pages, not bytes; and a misuse of TotalSize / BufferSize.
- Fix similar mistake in MiDoPoolCopy.
- Patch from bug 3341.
See issue #3341 for more details.

svn path=/trunk/; revision=33944
2008-06-12 09:18:11 +00:00
Aleksey Bragin
b21dc84f01 - Prevent a misunderstanding: kdHandleException means the debugger did NOT handle the exception. Fix the logic, and thus fix vectored exception handling which led to 2nd stage hang in qemu.
- TODO: This ContinueType thing should be reworked into a better logic.
See issue #3344 for more details.

svn path=/trunk/; revision=33943
2008-06-12 08:56:13 +00:00
Daniel Reimer
31bec7ebbf Updated Wordpad, XCopy, WInhlp32 to WIne 1.0rc4
I skipped Collibri's Typo-Fix in the German Wordpad RC File. Collibri, plz send this to Wine.

svn path=/trunk/; revision=33942
2008-06-12 06:23:44 +00:00
Daniel Reimer
6a6c9c1c6c Updated Winefile to Wine 1.0rc4.
Renamed it to Winfile, because this is the name it has under windows.

svn path=/trunk/; revision=33941
2008-06-12 06:22:23 +00:00
ReactOS Portable Systems Group
bf502620c3 - We now implement more proper context switching.
- This fixes an issue where code was using PCR->CurrentThread but x86/shared routines use PRCB->CurrentThread.
- Added a note to explain the difference, and we now set both.
- We currently stop at Phase 1 HAL Initialization.

svn path=/trunk/; revision=33940
2008-06-12 04:32:45 +00:00
Thomas Bluemel
20ebf8a9c5 Use band styles provided by the IDeskBand interface
svn path=/trunk/; revision=33939
2008-06-12 03:12:02 +00:00
Thomas Bluemel
1777cc3a03 More IBandSite support code
svn path=/trunk/; revision=33938
2008-06-12 01:14:18 +00:00
ReactOS Portable Systems Group
0bcdd3cdcc - We now implement a super-basic (and probably broken) context switching mechanism.
- We completely ignore setting the thread to the right scheduler state, and don't do any APC delivery checking, or any other work.
- We now implement a basic KiThreadStartup, which behaves properly (we believe). Doesn't handle user-mode threads yet, though.
- This gets us through PspSystemThreadStartup, and..
- We now reach Phase1InitializationDiscard! A major step has been reached, now it's time to cleanup what has been done until now and verify it to be correct.
- Then we move on... the next two things will be 1) Hal Initialization (setting up the timer) and 2) Displaying the boot logo.
- Graphics will require using the PL-110 LCD Controller.

svn path=/trunk/; revision=33937
2008-06-12 00:40:53 +00:00
ReactOS Portable Systems Group
c84fd405bf - We now implement a skeleton framework for context switching
- The only things we do are swap the stack and then display the old/new thread/stack.
- More work to be done to actually save the non-volatiles, prepare the thread state, and restore the volatiles for the new thread.
- Then we will return to the saved return address, and we should be in Phase 1 with working thread switching/scheduling.

svn path=/trunk/; revision=33935
2008-06-11 19:13:25 +00:00
ReactOS Portable Systems Group
0eec889557 - We now make appropriate space on the stack to save the old IRQL in the trap frame.
- Save the old IRQL and assert it in the interrupt handler.
- Fix KTRAP_FRAME structure.


svn path=/trunk/; revision=33934
2008-06-11 18:39:44 +00:00
ReactOS Portable Systems Group
e6d9765059 - Fix build on ARM:
- _iob is already defined as a dll_import
  - _rotl intrinsic is now implemented (should use rol instruction, but not sure on the syntax!)
  - Add a stub psctx.h for ARM
  - Added InterlockedEXchangePointers
  - Fix uninitialized variable warning in ex/resource.c
- Start to implement interrupt handling:
  - We now have a rudimentary interrupt handler that takes care of software interrupts
  - We now have a rudimentary DPC handler which takes care of switching to the next thread, if any
  - We now setup the HAL Interrupt Source -> IRQL Table (The IRQLMask Table).
  - Implemented HalGetInterruptSource, which allows us to get the interrupt # that cause the IRQ.
    Note: this wasn't needed on Alpha/PPC/MIPS NT ports, because that information is stored on the CPU,
    and the kernel could read it -- we must abstract it through the HAL.
  - Add the OldIrql to the TRAP_FRAME, we don't use it yet.
- We are now ready to context switch to the Phase 1 thread.

svn path=/trunk/; revision=33933
2008-06-11 16:48:07 +00:00
Matthias Kupfer
1f2f57762a - minor fix of german wordpad menu entry
- german translation of dialog resource of keyboard layout switcher completed including start menu entry

svn path=/trunk/; revision=33932
2008-06-11 12:31:23 +00:00
Aleksey Bragin
f80fd06171 - Fix build.
svn path=/trunk/; revision=33931
2008-06-11 12:00:09 +00:00
Aleksey Bragin
7d5306e11b - Fix typos in NDK structures.
svn path=/trunk/; revision=33930
2008-06-11 11:48:59 +00:00
Aleksey Bragin
87f175a68a - Unregress KDBG: It has to increment EIP in case of STATUS_BREAKPOINT to skip over the current instruction, but now do it inside KDBG's exception handler.
- In Kd and GDB exception handler wrappers, return FALSE if kdDoNotHandleException, and return TRUE otherwise (kdHandled / kdContinue). After my previous commit these functions were always returning FALSE / exception not handled.

svn path=/trunk/; revision=33929
2008-06-11 11:34:04 +00:00
Aleksey Bragin
8a2b9285a7 - Revert 33689 as breaking mIRC installation.
See issue #3328 for more details.

svn path=/trunk/; revision=33928
2008-06-11 09:05:39 +00:00
Aleksey Bragin
7b57917c46 - Completely rewrite most of stdio functions by merging Wine's msvcrt code adapted for ReactOS.
- Leave and refactor existing underlying linux-code based sprintf implementation into lnx_ prefixed functions.
- Misc source code and headers cleanup.
- Fixes bugs 2910, 2803.
See issue #2803 for more details.

svn path=/trunk/; revision=33927
2008-06-11 08:54:46 +00:00
James Tabor
553e9f4821 Fix warnings.
svn path=/trunk/; revision=33926
2008-06-11 04:45:42 +00:00
Thomas Bluemel
ab5a70b128 More IDeskBar support
svn path=/trunk/; revision=33925
2008-06-11 03:52:45 +00:00
Thomas Bluemel
4a314da798 Improve IBandSite support a bit
svn path=/trunk/; revision=33924
2008-06-11 03:37:56 +00:00
Thomas Bluemel
46ccbc43af Fix a small bug
svn path=/trunk/; revision=33923
2008-06-11 03:36:21 +00:00
James Tabor
93c1e5a013 Retool SetSysColors and use SEH.
svn path=/trunk/; revision=33922
2008-06-10 21:57:16 +00:00
Eric Kohl
78c0b7a1df Enable the user to modify the profile information of a user account.
svn path=/trunk/; revision=33921
2008-06-10 21:56:19 +00:00
James Tabor
07bd1ef0d2 Use server information for GetSystemMetrics.
svn path=/trunk/; revision=33920
2008-06-10 21:09:31 +00:00
Colin Finck
e851af141d Matthias Kupfer (matthias DOT kupfer AT informatik DOT tu-chemnitz DOT de)
- Give the Run Dialog resources a default title (only done in German and English resources so far, others still need to be done)
- Add support for passing no title to RunFileDlg, so that it uses the default title
- Pass no hardcoded english title in Explorer and Task-Manager.
  I slightly modified the patch to also remove the other hardcoded text passed in Explorer.

See issue #3340 for more details.

svn path=/trunk/; revision=33919
2008-06-10 19:19:59 +00:00
James Tabor
baa980036b Fix build, add float to long union for dword transfer.
svn path=/trunk/; revision=33918
2008-06-10 05:48:18 +00:00
James Tabor
f79680eb17 Move NtGdiAngleArc to arc.c.
svn path=/trunk/; revision=33917
2008-06-10 05:25:37 +00:00
James Tabor
4feb37f50f Move AngleArc out of stubs.
svn path=/trunk/; revision=33916
2008-06-10 05:14:35 +00:00
Thomas Bluemel
2edcc21ee5 shlwapi.dll is already loaded, no need to use LoadLibrary
svn path=/trunk/; revision=33915
2008-06-10 03:13:12 +00:00
Thomas Bluemel
561efe278f - Don't lookup DrawCaptionTempA/W by ordinal but rather by name
- Various minor fixes

svn path=/trunk/; revision=33914
2008-06-10 02:58:13 +00:00
Thomas Bluemel
f1d9b70f81 Do a more correct check in EDIT_IsInsideDialog ()
svn path=/trunk/; revision=33913
2008-06-10 00:31:10 +00:00
Timo Kreuzer
9fe71b1a02 fix an endless loop bug
See issue #2142 for more details.

svn path=/trunk/; revision=33912
2008-06-09 20:57:30 +00:00
Gregor Brunmar
eaff1fdfa2 Fixed four more winetests, code taken from wine again
svn path=/trunk/; revision=33910
2008-06-09 19:14:36 +00:00
Gregor Brunmar
2692c60678 Fixed 11 winetests for edit boxes based on code from wine but tweaked for ReactOS
svn path=/trunk/; revision=33909
2008-06-09 19:07:54 +00:00
Timo Kreuzer
f5a1426f4c add simple TTF icon to fontview
svn path=/trunk/; revision=33908
2008-06-09 18:10:02 +00:00
James Tabor
1662719886 - Fix Ellipes, for Filip Navara, nice work!
- Ref: http://www.reactos.org/archives/public/ros-dev/2007-January/009090.html
- Test: http://www.reactos.org/pipermail/ros-dev/attachments/20070118/46ace072/attachment-0001.exe

svn path=/trunk/; revision=33907
2008-06-09 16:46:52 +00:00
James Tabor
ada39af182 Move old pie code into arc.
svn path=/trunk/; revision=33906
2008-06-08 19:00:50 +00:00
Aleksey Bragin
730d8e4ee5 - Update dciddi.h header based on Magnus's patch.
- Fix dciman32.dll compilation.

svn path=/trunk/; revision=33905
2008-06-08 18:26:22 +00:00
Pierre Schweitzer
cbf728b477 Synced shlwapi_winetest.exe with Wine HEAD
svn path=/trunk/; revision=33904
2008-06-08 17:14:50 +00:00
Pierre Schweitzer
8a7513a6c7 SySynced shlwapi.dll with Wine HEAD
svn path=/trunk/; revision=33903
2008-06-08 17:13:54 +00:00
Dmitry Chapyshev
939c49a493 - Remove duplicate code
- Fix formatting
- Add checking parameters for more functions

svn path=/trunk/; revision=33902
2008-06-08 15:04:00 +00:00
Eric Kohl
5736c65128 - User properties:
Fix a memory leak.
  Enable the Apply button when the users full name or description is changed.
- Group properties:
  The group description can be changed.
  Update the group list when the group description changes.
  

svn path=/trunk/; revision=33901
2008-06-08 13:34:42 +00:00
Hervé Poussineau
8db6f07370 Fix debug message
svn path=/trunk/; revision=33899
2008-06-08 09:52:56 +00:00
Dmitry Chapyshev
9364f96a85 - Add gdiplus test to bootcd
svn path=/trunk/; revision=33898
2008-06-08 09:49:48 +00:00
Dmitry Chapyshev
077d269069 - Add wine test for gdiplus
svn path=/trunk/; revision=33897
2008-06-08 09:47:47 +00:00
Magnus Olsen
cfd749136a add dummy test for dciman32 for now, real test will come later
svn path=/trunk/; revision=33896
2008-06-08 08:29:04 +00:00
Aleksey Bragin
7245944072 - Magnus: Reformat clip.c source code to better match overall coding style. No code logic change.
svn path=/trunk/; revision=33895
2008-06-08 07:31:10 +00:00
James Tabor
b557c10181 Update NtUserInitializeClientPfnArrays add additional structures and types for future support.
svn path=/trunk/; revision=33894
2008-06-08 03:34:25 +00:00
Timo Kreuzer
b8ceca0d0d Fix some region leaks: GdiSelectVisRgn copies the region, so the given one it must be deleted afterwards. This code is not perfect ~ as Jim already said, not completed. But it's at least working correctly now. Say welcome to a stable running Firefox 1.5.
Also added some DPRINTs on failures.

svn path=/trunk/; revision=33893
2008-06-08 00:43:07 +00:00
Eric Kohl
58c925232a Real fix for the broken netapi32.dll.
svn path=/trunk/; revision=33892
2008-06-07 22:50:55 +00:00
Eric Kohl
f3091aac50 Fix for broken netapi32.dll.
svn path=/trunk/; revision=33891
2008-06-07 22:44:15 +00:00
Eric Kohl
57efc6d296 - Group properties: Display the SID of well-known members.
- User properties: Store changes to the general settings.

svn path=/trunk/; revision=33890
2008-06-07 22:31:24 +00:00
Hervé Poussineau
c844e808fd Write the complete error message to debug log, instead of partial information
svn path=/trunk/; revision=33889
2008-06-07 20:44:57 +00:00
Aleksey Bragin
3f4244aafc - Cleanup leftovers and bugs from GreatLord's fix. I think this is my last "postfix" of GreatLord's commits to trunk.
svn path=/trunk/; revision=33886
2008-06-07 12:58:48 +00:00
Magnus Olsen
f984375fa8 BugFix : NtGdiStretchDIBitsInternal
it did not check after some NULL pointer and did crash in firefox. 
and some reason  NtGdiCreateCompatibleBitmap fail in some case, that what happen in firefox 1.5.

svn path=/trunk/; revision=33885
2008-06-07 11:35:53 +00:00
Magnus Olsen
d1fd748e27 fix one winetest for Bitmap and add note why some alpha blend test fails.
svn path=/trunk/; revision=33884
2008-06-07 10:15:38 +00:00
Magnus Olsen
8f663e980b Fixed Alphablend crash in win32k
svn path=/trunk/; revision=33883
2008-06-07 09:43:35 +00:00
Aleksey Bragin
96bd76c450 - Revert 33881, PatBlt may be buggy, but what was introduced in 33881 was a non-working hack. Unregresses FF2.0 installer having a black rectangle in the bottom of its window.
svn path=/trunk/; revision=33882
2008-06-07 09:20:05 +00:00
Magnus Olsen
66efb44d68 disable NtGdiPatBlt code, in some case it can cause random crash and have some graphic glichters it need be rewrite.
svn path=/trunk/; revision=33881
2008-06-07 07:58:39 +00:00
Magnus Olsen
9199d4af30 revert some change I did in r33877 for buch.c object it cause to many regress
svn path=/trunk/; revision=33880
2008-06-07 07:22:09 +00:00
James Tabor
099735586d This does fix bug 3237. I've run this patch for two months now, it is still in the rough and needs cleaning up. Separates Owned and Class styles and gives them their own DCes.
svn path=/trunk/; revision=33879
2008-06-07 02:58:15 +00:00
Magnus Olsen
888f12a297 small cleanup thx irc: aicom for notice this.
svn path=/trunk/; revision=33878
2008-06-07 01:18:55 +00:00
Magnus Olsen
12528a2fc8 add a NULL check in IntGdiInitBrushInstance if XlateObj is NULL fall back to use white as default color when GDIBRUSH_IS_SOLID are set.
svn path=/trunk/; revision=33877
2008-06-07 01:14:12 +00:00
Magnus Olsen
48150abcea BitBlt
Make it act bit more like windows, use PatBlt instead for BitBlt for no ROP source for it bit faster
Thx irc Goplat found my bug in the macro. 

svn path=/trunk/; revision=33876
2008-06-07 00:51:38 +00:00
Magnus Olsen
b879687075 BugFix : NtGdiPatBlt did not call on NtGdiMaskBlt when source have been set in ROP
svn path=/trunk/; revision=33873
2008-06-06 23:37:41 +00:00
Magnus Olsen
72e6fde566 BugFix : NtGdiBitblt follow member BitmapDest and BitmapSrc one of them can be NULL in NtGdiBitBlt logic so do not try access members in null pointer
svn path=/trunk/; revision=33872
2008-06-06 23:09:42 +00:00
Aleksey Bragin
00d190a404 - Fix KDBG's EIP munging.
- Don't make single-step break into KDBG if it comes from user-mode.
- Don't make KDBG return "continue" for breakpoint/singlestep, it should return "do not handle exception".
- Add 20 new invalid instructions detected instead of crashing/"UNHANDLED CODE".
- Fix DR registry handling (set DebugActive = TRUE when needed, and set Context->Dr7).
- Fix set/get context: These two functions didn't work at all. Get actually performed a Set, and Vice-versa. Also, Set would incorrectly set the frame of the caller, not the target thread. Also, the trap frame pointer wasn't being grabbed correctly for kernel-mode callers.
- Move the code to a non-portable i386 directory, since the code is architecture-specific.
- Move GET_SET_CTX_CONTENT out to ps.h.

svn path=/trunk/; revision=33871
2008-06-06 21:51:21 +00:00
Aleksey Bragin
3eb4e85097 - Fix a major bug while closing a process that was debugging another process, which would cause a bugcheck because it tried to kill itself while it was being killed -- instead, it should try killing the debuggee! fixes the bug that arty and I fought about when he said "process killing seems broken" and tried to add delayed-object-closing. Patch by Alex Ionescu.
- Remove a leftover from kernel32 which assumed that if "BeingDebugged" was TRUE, the library was being tested on an XP machine.

svn path=/trunk/; revision=33870
2008-06-06 21:43:37 +00:00
Aleksey Bragin
edc9924731 - Change the registry name from Registry to REGISTRY, which fixes almost all Wine registry tests and any other application using the registry in case-sensitive mode, because the real name is REGISTRY.
- Add SEH to NtCreate/OpenKey, which fixes the rest of the wine registry tests.
- Fix PnP Manager code that was doing case sensitive registry access with "Registry".

svn path=/trunk/; revision=33869
2008-06-06 21:40:37 +00:00
Aleksey Bragin
d409591250 - Update RtlIsTextUnicode (fixes some ntdll rtlstr winetests).
svn path=/trunk/; revision=33868
2008-06-06 21:33:43 +00:00
Dmitry Chapyshev
036789044b - Sync tahoma fonts with wine head
svn path=/trunk/; revision=33867
2008-06-06 19:40:27 +00:00
Aleksey Bragin
45ebe0ccc2 - Update many parts of CRT, and misc cleanup.
- Largely based on the patch by Samuel Serapion.
- Include file.c from Wine's msvcrt, but exclude its contents from the build process for now.

svn path=/trunk/; revision=33866
2008-06-06 17:49:24 +00:00
Aleksey Bragin
3f2bc58da5 - Move scanf.c into strings, it belongs there.
- Move thread.c to process, and remove outdated/duplicated copy.
- Sync threadx with Wine.
- Update README.WINE accordingly.

svn path=/trunk/; revision=33865
2008-06-06 12:20:28 +00:00
Aleksey Bragin
c129f7fcd3 - Fix a typo.
svn path=/trunk/; revision=33864
2008-06-06 11:26:14 +00:00
James Tabor
4d4d130154 Attempt to fix bug 3259. Use IntGdiCleanDC for error checking.
svn path=/trunk/; revision=33863
2008-06-06 02:59:12 +00:00
Magnus Olsen
af03c08689 commit 33747 did remove almost all redirect to ntdll and to some internal functions, I re add thuse redirect
also by mistake   _seh_longjmp_unwind was not longer redirected to  seh_longjmp_unwind it is now again 
thx irc nick : Goplat to notice this. 

svn path=/trunk/; revision=33862
2008-06-05 23:51:27 +00:00
Timo Kreuzer
d448c26dba patch by Jeffrey Morlan (mrnobo1024 at yahoo dot com, irc: Goplat):
fix coordinate transformation for NtGdiSetDIBitsToDevice,
fixes bug 3200
See issue #3294 for more details.

svn path=/trunk/; revision=33861
2008-06-05 22:23:19 +00:00
Timo Kreuzer
56d318331b co_MsqTranslateMouseMessage:
- add a comment about who removes a message from a queue
- fix filter handling (typo)
- correct the callers next list entry, if it might have been deleted. Yes, it's ugly, but the only way I could currently think of without rewriting everything and it was already ugly before. This fixes bug 2317 and some random crashes with FF.
See issue #2317 for more details.

svn path=/trunk/; revision=33860
2008-06-05 16:57:27 +00:00
Timo Kreuzer
fbf0cbd302 IntEngGradientFill: don't assert, if no CLIPOBJ is given, instead handle this case in EngGradientFill, creating a CLIPOBJ from bounds rect.
svn path=/trunk/; revision=33859
2008-06-05 00:23:27 +00:00
James Tabor
6378983897 This should do it for pen. Tested the same with wine tests.
svn path=/trunk/; revision=33858
2008-06-04 21:05:18 +00:00
James Tabor
e61ef65c4a Sorry, I should have spotted this when I was in here.. I think this takes care of the leak and crash. Wine testing is back with the same errors. So we are good to go.
svn path=/trunk/; revision=33857
2008-06-04 17:45:18 +00:00
Timo Kreuzer
a1aca981cf - fix mem leak when failing to create an extpen with penstyles
- rename a tag, change a tag, remove unused tag

svn path=/trunk/; revision=33856
2008-06-04 16:15:24 +00:00
James Tabor
63428932b8 Prevent a crash if the list is empty and check for zero. If (List is Empty! DCE!) is called before the crash, this means we have a thread that is not finished running before shutdown. There is a proper way for handling this
svn path=/trunk/; revision=33855
2008-06-04 16:07:47 +00:00
Aleksey Bragin
bcd6451e5b - libcntpr does not need console/file versions of scanf.
svn path=/trunk/; revision=33854
2008-06-04 10:52:54 +00:00
Aleksey Bragin
7b68ed11e0 - Fix crtdll build.
svn path=/trunk/; revision=33853
2008-06-04 10:41:17 +00:00
Aleksey Bragin
97e7725dc9 - Misc cleanup of kmtest.
- Add paged/nonpaged pools test routines.
- Comment out invocations of other tests temporary.

svn path=/trunk/; revision=33852
2008-06-04 09:50:19 +00:00
Aleksey Bragin
170743424f - Misc ctype wine sync.
svn path=/trunk/; revision=33851
2008-06-04 09:45:12 +00:00
Aleksey Bragin
683a6c4181 - Remove duplicated sscanf wrapper.
- Sync scanf.c / scanf.h with Wine.

svn path=/trunk/; revision=33850
2008-06-04 09:10:40 +00:00
James Tabor
6857246d17 No need to do it twice.
svn path=/trunk/; revision=33849
2008-06-04 06:10:49 +00:00
Gregor Brunmar
f91ca27dd7 * Fixes 14 wine tests for the edit control
* Indentation fixes

svn path=/trunk/; revision=33848
2008-06-04 06:08:37 +00:00
James Tabor
01c9364e27 Implement IntGdiSetBrushOwner and IntGdiAllocObjAttr.
svn path=/trunk/; revision=33847
2008-06-04 05:43:11 +00:00
James Tabor
833d68c273 Separate SelectPalette function from User and move it to GDI.
svn path=/trunk/; revision=33846
2008-06-04 05:08:46 +00:00
James Tabor
528fc30198 Check to see if the list is empty.
svn path=/trunk/; revision=33845
2008-06-04 01:52:13 +00:00
Timo Kreuzer
fa7b96c770 fix indentation
svn path=/trunk/; revision=33844
2008-06-03 23:59:26 +00:00
Timo Kreuzer
7bc03a5188 fix checks for deleted gdi objects and add GDI_DEBUG function to trace the deleter of an object.
svn path=/trunk/; revision=33843
2008-06-03 23:56:09 +00:00
James Tabor
7c21c02f9b Attempt to fix bugs 3050 and 3209. DCE list becomes corrupted during shutdown.
svn path=/trunk/; revision=33841
2008-06-03 21:13:10 +00:00
Dmitry Chapyshev
37a3eaf812 - Update English translation
svn path=/trunk/; revision=33840
2008-06-03 17:05:24 +00:00
Dmitry Chapyshev
a7d6984117 - Update all translations
svn path=/trunk/; revision=33839
2008-06-03 16:56:23 +00:00
Colin Finck
81d738e77c Slovak keyboard layout update by Milan Margus (malin23 AT atlas DOT sk)
See issue #1251 for more details.

svn path=/trunk/; revision=33838
2008-06-03 13:47:19 +00:00
Dmitry Chapyshev
6ed534a3b0 - Implement EnumSystemLanguageGroupsA/W
- Implement EnumSystemLocalesA
- Reimplement EnumSystemLocalesW

svn path=/trunk/; revision=33837
2008-06-03 13:20:41 +00:00
Dmitry Chapyshev
1f7ff705dd - Add Language Groups values
svn path=/trunk/; revision=33836
2008-06-03 13:17:02 +00:00
Dmitry Chapyshev
348822f367 - More implement "Regional Options" dialog
- Small fix "Advanced" dialog

svn path=/trunk/; revision=33835
2008-06-03 11:55:02 +00:00
Dmitry Chapyshev
5249beecfa - Implement EnumSystemGeoID
- Implement GetGeoInfoA/W (partially)
- Small fix EnumSystemCodePagesA/W

svn path=/trunk/; revision=33834
2008-06-03 11:51:21 +00:00
Dmitry Chapyshev
0b5dd6ddfe - Add geographic locations
svn path=/trunk/; revision=33833
2008-06-03 11:48:16 +00:00
James Tabor
e8eda04c27 Move from fixed PrimarySurface to pointer based pPrimarySurface. Misc changes..
svn path=/trunk/; revision=33832
2008-06-03 03:41:54 +00:00
James Tabor
bcefe305f1 Update Dc level structure.
svn path=/trunk/; revision=33831
2008-06-02 21:10:31 +00:00
James Tabor
b0c65c30fe Move xform data from W structure into DcLevel within unions. Why: Sticking with systems floating point and reducing the size of DC.
svn path=/trunk/; revision=33830
2008-06-02 19:51:04 +00:00
Gregor Brunmar
720d38711f Added dialog FNID
svn path=/trunk/; revision=33829
2008-06-02 19:15:33 +00:00
James Tabor
114a366a38 Stefan Ginsberg <stefan__100__ at hotmail.com>
- Remove old DCOrg and replace it with ptlDCOrig.

svn path=/trunk/; revision=33828
2008-06-02 17:53:53 +00:00
Dmitry Chapyshev
ae9a18969f - Update txtsetup languages list
svn path=/trunk/; revision=33827
2008-06-02 15:35:34 +00:00
Dmitry Chapyshev
d35aa6d4ce - Add more languages
- Add scrolling to position in languages list

svn path=/trunk/; revision=33826
2008-06-02 15:34:57 +00:00
Aleksey Bragin
204acf76b0 Stefan Ginsberg <stefan__100__@hotmail.com>
- Remove ExTryToAcquireResourceExclusiveLite from NDK since it's not exported by NT kernel.
- Add ObSetSecurityObjectByPointer, RtlInitAnsiStringEx (and implement it, rather straightforward) to NDK.
- Uncomment exports in ntoskrnl_i386.def which are already implemented.
- Add KeInvalidateAllCaches to ARM's stubs.

svn path=/trunk/; revision=33825
2008-06-02 10:21:49 +00:00
Colin Finck
c91fecf968 - Add a test suite for ws2_32.dll
It currently tests the features I needed to adjust/implement when fixing the wininet problem.
  ReactOS currently passes all tests, but fails one if you launch the test app for the second time quickly after the first time (timing problem in the network code?).
- Fix the behaviour on an ioctlsocket FIONREAD call: The output buffer is not touched, when we have no socket, but when we have no connection, it is set to 0.
- Forward the socket call to WSASocketW instead of WSASocketA, minimal performance improvement

svn path=/trunk/; revision=33824
2008-06-01 22:08:45 +00:00
Colin Finck
ce52fa83e3 Use the Windows CreateFile/WriteFile functions instead of open/write.
Fixes compilation with MSVC. (note that you also have to change the calling convention from __stdcall to __cdecl in the auto-created project file for the lib)

svn path=/trunk/; revision=33823
2008-06-01 20:34:12 +00:00
Hervé Poussineau
78faaa3063 Fix debug message
svn path=/trunk/; revision=33822
2008-06-01 19:56:21 +00:00
Hervé Poussineau
6a7b9457dc Add a "ReactOS (WinLdr)" entry when using a debug build
svn path=/trunk/; revision=33821
2008-06-01 19:15:15 +00:00
Colin Finck
0f76b280cc - Add a parameter for listing all valid test names
- Generate valid XHTML 1.0 Strict

svn path=/trunk/; revision=33820
2008-06-01 18:37:55 +00:00
Hervé Poussineau
879d178c13 Remove dead code (GetActualSourceFilename, GetSourceFilenames, GetSourceFilenamesWithoutGeneratedFiles)
In rules, put generated file name at the end of the line

svn path=/trunk/; revision=33819
2008-06-01 18:20:30 +00:00
Colin Finck
d55028d26f Set svn:eol-style "native" for all apitest stuff
svn path=/trunk/; revision=33818
2008-06-01 18:06:22 +00:00
James Tabor
5367e27e3a Stefan Ginsberg <stefan__100__ at hotmail.com> - Move MetaFile stubs into Metafile.c.
svn path=/trunk/; revision=33817
2008-06-01 17:47:46 +00:00
Magnus Olsen
ba14ded010 Adding complete test kit for EngCreateSemaphore, EngAcquireSemaphore, EngDeleteSemaphore, EngReleaseSemaphore
I think it testing all case it can now, and also split up some test to EngDeleteSemaphore and EngReleaseSemaphore and EngAcquireSemaphore, that was in EngCreateSemaphore


svn path=/trunk/; revision=33816
2008-06-01 17:33:51 +00:00
Dmitry Chapyshev
c3f50e79c8 - Update txtsetup.sif
svn path=/trunk/; revision=33815
2008-06-01 17:18:35 +00:00
Dmitry Chapyshev
5fd3663edf - Add more languages
- Update languages

svn path=/trunk/; revision=33814
2008-06-01 17:17:56 +00:00
James Tabor
8a24ff76e0 Use SetDCOwnerEx, this will allow for gracefull errors when changing ownership of the DCs.
svn path=/trunk/; revision=33812
2008-06-01 16:21:38 +00:00
Magnus Olsen
457aee023d add all test we can do for EngCreateSemaphore, it checking some info in the internal HANDLE hsem is same as PRTL_CRITICAL_SECTION struct
svn path=/trunk/; revision=33811
2008-06-01 15:48:51 +00:00
James Tabor
5047d04ffc Imp NtGdiUnmapMemFont and fix NtGdiGetDhpdev.
svn path=/trunk/; revision=33810
2008-06-01 15:22:25 +00:00
Magnus Olsen
0b090eef6a add more test for EngCreateSemaphore, it checking some info in the internal HANDLE hsem is same as PRTL_CRITICAL_SECTION struct
svn path=/trunk/; revision=33809
2008-06-01 15:06:40 +00:00
Eric Kohl
828f4f1216 Add the Membership and Profile pages to the users property sheet. Changing the settings is not implemented yet.
svn path=/trunk/; revision=33808
2008-06-01 15:05:22 +00:00
Magnus Olsen
f54e38e9ac add Test for EngDeleteSemaphore, it only test if it been create or not
svn path=/trunk/; revision=33807
2008-06-01 14:38:02 +00:00
Marc Piulachs
ed39c925a0 set 'installname' attribute for halup to 'hal.dll'
svn path=/trunk/; revision=33806
2008-06-01 13:24:25 +00:00
Marc Piulachs
2c0aa23f29 'base' is not a valid attribute of element 'installfile'
svn path=/trunk/; revision=33805
2008-06-01 13:21:12 +00:00
Dmitry Chapyshev
150abb0844 - Sync with Wine HEAD
svn path=/trunk/; revision=33804
2008-06-01 13:14:02 +00:00
Dmitry Chapyshev
fa6f8006d0 - Update headers
svn path=/trunk/; revision=33803
2008-06-01 13:13:10 +00:00
Dmitry Chapyshev
cfb95de0f7 - Add language groups
svn path=/trunk/; revision=33802
2008-06-01 13:07:38 +00:00
Dmitry Chapyshev
1ddfc357da - Remove SysFontSubstitutes values
svn path=/trunk/; revision=33801
2008-06-01 13:05:55 +00:00
Dmitry Chapyshev
9b6d791e60 - Move layouts to lang headers
- Other small changes

svn path=/trunk/; revision=33800
2008-06-01 12:52:18 +00:00
Hervé Poussineau
b3b07836ef Start Rpc server listener thread before device installer thread
See issue #3068 for more details.

svn path=/trunk/; revision=33799
2008-06-01 10:49:28 +00:00
Daniel Reimer
fcd2a4e62c Bug 3299: czech translation from forum and some slovak translation by Stepan Gabriel - SGABA (sgaba@centrum.cz)
svn path=/trunk/; revision=33798
2008-06-01 10:26:42 +00:00
Magnus Olsen
61f33dad43 merge down changes from win32k-gdi-dx
1. Cleanup the layout it was mix of space and tab for whitespace
2. dllmain add same behoirs as xp/vista

svn path=/trunk/; revision=33797
2008-06-01 07:54:17 +00:00
James Tabor
1177ff923f Sorry again... NtGdiCreateEnhMetaFile will be converted to NtGdiCreateMetafileDC. Keeping the original code for now.
svn path=/trunk/; revision=33796
2008-06-01 05:40:53 +00:00
James Tabor
9adac31641 Sorry,,, NtGdiCreateEnhMetaFile will be converted to
svn path=/trunk/; revision=33795
2008-06-01 05:22:42 +00:00
Timo Kreuzer
2e3c186197 IntGdiLineTo: the dc pen might be deleted, don't assert, instead fall back to BLACK_PEN, fixes a crash when using FF
svn path=/trunk/; revision=33793
2008-06-01 00:54:08 +00:00
Timo Kreuzer
91b1e254fd preserve code for NtGdiCreateEnhMetaFile from win32k (where it's going to be removed later) in gdi32 (where it's going to be implemented later)
svn path=/trunk/; revision=33792
2008-05-31 23:15:34 +00:00
Eric Kohl
4e9ffdff7e User the user-specific date format instead of a hard-coded one.
svn path=/trunk/; revision=33791
2008-05-31 20:09:17 +00:00
Eric Kohl
fbcc10c57e - Add a property sheet for user groups. Settings are visible but cannot be changed yet.
- Add missing SVN properties.

svn path=/trunk/; revision=33790
2008-05-31 19:48:44 +00:00
Dmitry Chapyshev
b82096c544 - Move languages structures to header
- Add structures for adding fonts settings

svn path=/trunk/; revision=33789
2008-05-31 13:29:45 +00:00
Colin Finck
bdec9df44c Sync wininet with Wine. This fixes the Download! issue.
As we implement some more functions in the network stack now, I could remove some hacks from the "wininet_ros.diff" file.
Anyways, the following things still needed to be changed:
- Pass a variable to WriteFile for receiving the number of bytes written. This parameter is not checked for NULL in ReactOS and Windows, when lpOverlapped is also NULL.
  I'll submit a patch about this to Wine as well.
- Replace Unix poll() calls by equivalent select() calls
- Bypass sock_get_error(), directly call WSAGetLastError() as we don't have to translate Unix socket errors.

See issue #3197 for more details.

svn path=/trunk/; revision=33788
2008-05-31 13:02:59 +00:00
Colin Finck
c446f5ff58 Implement support for FIONREAD in WSPIoctl. (hope I did it properly)
It works correctly with the wininet I'll commit later and a test app I wrote myself.

svn path=/trunk/; revision=33787
2008-05-31 12:53:55 +00:00
Colin Finck
923017639c Implement support for MSG_PEEK.
Patch by Art Yerkes with small fix by me to make it working correctly. (verified with a test app)

svn path=/trunk/; revision=33786
2008-05-31 12:51:22 +00:00
Colin Finck
cb57056f4b Stub QuerySecurityPackageInfoA and QuerySecurityPackageInfoW, needed for the wininet Wine sync
svn path=/trunk/; revision=33785
2008-05-31 12:49:25 +00:00
Colin Finck
33369deba9 Use FILE_SHARE_READ | FILE_SHARE_WRITE in CopyFileExW to also copy opened files. Thanks to Christoph for the hint.
Behaviour was verified under WinXP SP2.

svn path=/trunk/; revision=33784
2008-05-31 12:48:51 +00:00
Magnus Olsen
de95e30718 revert my last change
1. it break vmware drv, for it align each bitmap row it create
2. diffent behoirs in diffent vm
this did show we have more serius bug to fix before we can apply correct fix.

svn path=/trunk/; revision=33783
2008-05-31 12:17:25 +00:00
Magnus Olsen
9ae5fa0777 Fixed bug in DIB_GetDIBWidthBytes
accdoing OSR it is number of bytes to next scanline in the bitmap, wine version did align it, that why wrong number of bytes was reported also fixed overflow bug in the math, and make sure if some part of win32k send in negtive width, it will not calc it wrong, Remove one hack in win32k, thx of this, Thx fireball that suggest this functions mabey was wrong 

svn path=/trunk/; revision=33782
2008-05-31 11:01:51 +00:00
Timo Kreuzer
2027d8d907 patch by Jeffrey Morlan (mrnobo1024 at yahoo dot com)
Testcase for NtGdiSetDIBitsToDeviceInternal
See issue #3294 for more details.

svn path=/trunk/; revision=33781
2008-05-31 00:04:16 +00:00
Pierre Schweitzer
58871282fd Added more cluster size values.
Spotted by GreatLord
For more informations: http://support.microsoft.com/kb/140365/en-us

svn path=/trunk/; revision=33780
2008-05-30 20:59:56 +00:00
Pierre Schweitzer
4db827d152 Check cluster size when mounting a volume
svn path=/trunk/; revision=33779
2008-05-30 18:55:05 +00:00
Dmitry Chapyshev
18eca01b10 - Implement parsing font.inf (Now it's possible to specify custom fonts for a language/locale!)
svn path=/trunk/; revision=33778
2008-05-30 18:18:36 +00:00
Dmitry Chapyshev
94ae0fcf03 - Change in WindowMetrics font to Tahoma
- Add Tahome font to bootcd
- Add some file association

svn path=/trunk/; revision=33777
2008-05-30 18:12:59 +00:00
Dmitry Chapyshev
2f15b4e95a - Small update inf file
svn path=/trunk/; revision=33776
2008-05-30 18:09:55 +00:00
Dmitry Chapyshev
3b36a9d68f - Add Tahoma fonts from Wine
svn path=/trunk/; revision=33775
2008-05-30 18:09:14 +00:00
Magnus Olsen
0feff0d802 fixed last part for the def file.
now it is 100% completed and update to windows 2003 sp1
sorry I did not do it one commit. 

svn path=/trunk/; revision=33774
2008-05-30 16:00:16 +00:00
James Tabor
7be3065c79 Thanks aicom, remove unimplemented tag.
svn path=/trunk/; revision=33773
2008-05-30 15:42:06 +00:00
James Tabor
326b3a11f8 Use System Bitmap DC, like a stock object but a hDC one.
svn path=/trunk/; revision=33772
2008-05-30 15:18:51 +00:00
Dmitry Chapyshev
ce3527ab5a - Add intl.inf and font.inf to bootcd
- Add shimgvw.dll to bootcd

svn path=/trunk/; revision=33771
2008-05-30 14:06:07 +00:00
Dmitry Chapyshev
00b0111c6c - Add font.inf and intl.inf
svn path=/trunk/; revision=33770
2008-05-30 14:03:19 +00:00
Dmitry Chapyshev
806eed0a98 - Implement EnumSystemCodePagesA/W
svn path=/trunk/; revision=33769
2008-05-30 13:59:20 +00:00
Aleksey Bragin
944d8b65c4 - Really fix _rotl. Thanks KJK::Hyperion!
svn path=/trunk/; revision=33768
2008-05-30 12:16:05 +00:00
Aleksey Bragin
c5d4f0f35a - Fix a warning in 1st of April's implementation of _rotl function.
svn path=/trunk/; revision=33767
2008-05-30 12:10:28 +00:00
James Tabor
c4f0f3c668 Move the init of server info after heap is init.
svn path=/trunk/; revision=33766
2008-05-30 06:13:52 +00:00
James Tabor
87b264fba8 Modified GDIOBJ_Copy and Set owner to return bool. Start the use of server info for metrics data. Tested with Qemu on Linux.
svn path=/trunk/; revision=33765
2008-05-30 04:56:10 +00:00
Magnus Olsen
a8585cf880 1. do not use wine def for reactos
2. this is almost 100% correct list of windows 2003 export list of msvcrt.def and it will make abiword working again for it was missing api wfreopen and allot more api from msvcrt
3. this add back api that was remove api they exists in windows 2003 export list
4. List was provide from colin f

See issue #3293 for more details.

svn path=/trunk/; revision=33764
2008-05-30 01:27:29 +00:00
Magnus Olsen
e141a01feb patch by Jeffrey Morlan ( email : mrnobo1024 at yahoo dot com )
the comment above is my. 
See issue #3295 for more details.

svn path=/trunk/; revision=33763
2008-05-29 22:39:39 +00:00
Timo Kreuzer
22942d0ae4 remove hFirstBitmap from the WIN_DC_INFO struct, wasn't used anyway and use StockObject(DEFAULT_BITMAP) for the default bitmap when creating a mem dc as on windows.
svn path=/trunk/; revision=33762
2008-05-29 19:44:23 +00:00
James Tabor
b61def0c68 Fix build.
svn path=/trunk/; revision=33761
2008-05-29 18:58:03 +00:00
James Tabor
c03961764a Use server information structure for system colors.
svn path=/trunk/; revision=33760
2008-05-29 18:51:17 +00:00
Aleksey Bragin
616f5e97e0 Stefan Ginsberg <stefan__100__@hotmail.com>
- Remove NT3/4 specific unimplemented function and change STDCALL -> NTAPI in mm.c
- Make ReactOS i386 kernel exports almost fully correspond to W2003SP1 ntoskrnl.exe's exports.

svn path=/trunk/; revision=33759
2008-05-29 16:09:47 +00:00
Aleksey Bragin
c5fa27e2d7 Stefan Ginsberg <stefan__100__@hotmail.com>
- Remove usage of unexported RtlDuplicateUnicodeString in green.sys driver (this is basically the same fix which Herve applied to blue.sys).

svn path=/trunk/; revision=33758
2008-05-29 16:00:20 +00:00
James Tabor
802eba95c5 Update NtUserBitBltSysBmp.
svn path=/trunk/; revision=33757
2008-05-29 15:32:05 +00:00
Dmitry Chapyshev
fa06cb862b - Add Russian translation
- Fixed parameters functions
- Add debug functions
- Add stubs for some functions

svn path=/trunk/; revision=33756
2008-05-29 14:30:26 +00:00
Daniel Reimer
e5ec2becfb Bug 3282: Spanish and Basque translation by Javier Remacha (remialdo@gmail.com)
Bug 3284: small slovak translation update by Mario Kacmar (kario@szm.sk)
Part 2 of 2

svn path=/trunk/; revision=33755
2008-05-29 11:40:11 +00:00
Daniel Reimer
b3091b7bf3 Bug 3282: Spanish and Basque translation by Javier Remacha (remialdo@gmail.com)
Bug 3284: small slovak translation update by Mario Kacmar (kario@szm.sk)
Part 1 of 2

svn path=/trunk/; revision=33754
2008-05-29 11:36:08 +00:00
Timo Kreuzer
3c6e5e169c sorry forgot this one
svn path=/trunk/; revision=33753
2008-05-29 01:30:33 +00:00
Timo Kreuzer
d60ea94881 fix palette implementation: use the surface's palette to crate the xlate objects, default to the device default palette. The dc palette defaults to stock object default palette. Implement IntCreateXlateForBlt, used in BitBlt etc functions to perform the needed operations to create the xlate object instead of duplicating the code. This allows for global thermonuclear solitaire again and hopefully doesn't break everything else ;-)
svn path=/trunk/; revision=33752
2008-05-29 01:17:50 +00:00
Timo Kreuzer
8d17551ae9 reapply Magnus Change to fix build.
note to Colin: THAT is the reason why ;-)

svn path=/trunk/; revision=33751
2008-05-28 23:02:26 +00:00
Timo Kreuzer
363e65143d (Nt)GdiFlushUserBatch:
- optmize by moving the locking of the dc to NtGdiFlushUserBatch instead of doing it for every object
- fix wrong pointer calculation (GdiFlushUserBatch returns the size of the objects in bytes not in ULONG)
- simplify a check
- add a comment: on XP NtGdiFlushUserBatch doesn't return NTSTATUS, but a pointer to inside the Teb, maybe random/VOID

svn path=/trunk/; revision=33750
2008-05-28 22:25:08 +00:00
Colin Finck
5a47d0b0ad Sync usp10 with Wine again, fixes the corrupted text display in AbiWord.
Thanks to CMan for regression-testing!

Also I removed Magnus' change in r33700.
If this is really required, please name the reason and add the change to a usp10_ros.diff file as this is a Wine-synched component. Also don't forget to include a header file for the DbgPrint prototype.

See issue #3280 for more details.

svn path=/trunk/; revision=33749
2008-05-28 21:41:41 +00:00
Colin Finck
d7e28db400 Sorry, forgot this file
svn path=/trunk/; revision=33748
2008-05-28 21:37:05 +00:00
Colin Finck
1e95911991 Samuel Serapión (samdwise51 AT gmail DOT com):
- Sync parts of msvcrt with Wine (more will follow)
  This makes us passing a lot more msvcrt Wine tests (like all heap tests)

svn path=/trunk/; revision=33747
2008-05-28 21:08:23 +00:00
Daniel Reimer
c6aa541df2 Add winhlp32 to bootcd.
svn path=/trunk/; revision=33746
2008-05-28 20:10:50 +00:00
Timo Kreuzer
d1dfa7c318 DCOrg is in device coordinates, fix a comment accordingly
svn path=/trunk/; revision=33745
2008-05-28 20:03:36 +00:00
Magnus Olsen
fe93333f0e This file will be share between dxg and win32k explain why will follow in documentations that Z98 helping me writing at moment. they will be release to public
fast explain windows xp and higher have two gdi table, it is better reuse same macro for both, that rewrite it one more time. 

svn path=/trunk/; revision=33744
2008-05-28 20:03:10 +00:00
Timo Kreuzer
ed5eae8cb6 EngLineTo: if pco == NULL use a private clip object, initialized with bounds rect
svn path=/trunk/; revision=33743
2008-05-28 20:00:03 +00:00
Dmitry Chapyshev
7c07a3d2c3 - Add baseaddress for shimgvw.dll
svn path=/trunk/; revision=33742
2008-05-28 19:53:41 +00:00
Dmitry Chapyshev
399371ec09 - Start implementing shimgvw.dll
svn path=/trunk/; revision=33741
2008-05-28 19:52:46 +00:00
Dmitry Chapyshev
862d7688c6 - Update Russian translation
svn path=/trunk/; revision=33740
2008-05-28 19:47:11 +00:00
Timo Kreuzer
cf00bb3cc7 EngCreateClip must allocate CLIPGDI, not only CLIPOBJ
svn path=/trunk/; revision=33739
2008-05-28 17:22:49 +00:00
Timo Kreuzer
492a434c2b [FORMATTING]
Apply consistent indentation (4 spaces)

svn path=/trunk/; revision=33738
2008-05-28 15:20:56 +00:00
Timo Kreuzer
219ad25324 [FORMATTING]
Fix indentation: 4 spaces, no code change

svn path=/trunk/; revision=33737
2008-05-28 14:32:06 +00:00
Daniel Reimer
896c4d6934 Updated winhelp from wine and renamed accordingly from winhelp to winhlp32.
svn path=/trunk/; revision=33736
2008-05-28 07:43:38 +00:00
James Tabor
85baf3767e Add Gdi entry flag.
svn path=/trunk/; revision=33735
2008-05-28 05:01:17 +00:00
James Tabor
56eae74260 NtUserRegisterClassExWOW also given FNID. Added one more fnid type.
svn path=/trunk/; revision=33734
2008-05-28 04:04:35 +00:00
James Tabor
5cccc4e338 NtUserSetWindowFNID is needed for supporting NtUserGetClassName bGetRealClass.
svn path=/trunk/; revision=33733
2008-05-28 02:36:25 +00:00
Timo Kreuzer
31335eaca5 exception.h: merge changes from wine.
Revision 1.37 fixes the exception in ole32 when opening a file with FoxitReader. Also fixes some warnings and hopefully some usermode crashes.

1.28: Jonathan Ernst <jonathan@ernstfamily.ch>
Update the address of the Free Software Foundation.

1.29: Alexandre Julliard <julliard@winehq.org>
include: Exception filters should return LONG, not DWORD.
Also move UnhandledExceptionFilter definitions to winbase.h since they
are there in the latest SDK.

1.30: Rob Shearman <rob@codeweavers.com>
include: Move Wine-specific EH_* defines from winnt.h to include/wine/exception.h.

1.33: Rob Shearman <rob@codeweavers.com>
Add a new convenience macro for an exception handler that handles all exceptions.
When using native compiler exceptions, the previous method of doing
this, __EXCEPT(NULL), would expand to __except(
(NULL)(GetExceptionInformation())) which doesn't compile as NULL isn't a
function.
So add a new macro, __EXCEPT_ALL, which works correctly both when using
native compiler exceptions and without and which makes the meaning of
code in which it is used clearer.

1.35: Alexandre Julliard <julliard@winehq.org>
ntdll: Make the exception handling functions inline.

1.36: Alexandre Julliard <julliard@winehq.org>
exception.h: Only push the exception frame after sigsetjmp.
Otherwise on Windows longjmp may want to mess with the exception frame.

1.37: Alexandre Julliard <julliard@winehq.org>
exception.h: Preserve registers when calling RtlUnwind.

See issue #812 for more details.

svn path=/trunk/; revision=33732
2008-05-28 00:41:13 +00:00
Aleksey Bragin
fb517419d2 - More header fixes.
svn path=/trunk/; revision=33731
2008-05-27 18:59:59 +00:00
Daniel Reimer
17e1cf3127 Polish language Update by Olaf Siejka
svn path=/trunk/; revision=33730
2008-05-27 18:54:23 +00:00
Johannes Anderwald
134baad36b - access parameter after they have been verified as valid
- fixes a kernel32_winetest crash
- fixes bug 3264

svn path=/trunk/; revision=33729
2008-05-27 10:53:23 +00:00
Johannes Anderwald
502222bd4c - fix typo in CreateServiceA
- bug found by Michael martinmnet at hotmail dot com (IRC: bugboy)

svn path=/trunk/; revision=33728
2008-05-27 08:54:07 +00:00
Ged Murphy
29ca8d764e Another typo. Yep, I'm officially today's jester...
svn path=/trunk/; revision=33727
2008-05-27 08:34:28 +00:00
Ged Murphy
7cb9f6e369 fix typo
svn path=/trunk/; revision=33726
2008-05-27 08:32:19 +00:00
Ged Murphy
d0a0a529f1 fix potential buffer overflow
svn path=/trunk/; revision=33725
2008-05-27 08:28:52 +00:00
Aleksey Bragin
6fdb1140a3 Daniel Zimmermann <netzimme@aim.com>
- Sync setlocale from Wine.
See issue #3254 for more details.

svn path=/trunk/; revision=33724
2008-05-27 08:11:06 +00:00
James Tabor
2ac4cc37b5 Rename and add new internal functions.
svn path=/trunk/; revision=33723
2008-05-27 01:38:01 +00:00
James Tabor
950f7264b3 Removed NtGdi rect calls.
svn path=/trunk/; revision=33722
2008-05-26 23:57:30 +00:00
James Tabor
d8b3f39eef Fix the rest too....
svn path=/trunk/; revision=33721
2008-05-26 21:12:17 +00:00
Johannes Anderwald
92d954c542 - check if MDICLIENTINFO is available before retrieving information
- fixes a user32_winetest crash

svn path=/trunk/; revision=33720
2008-05-26 20:52:28 +00:00
James Tabor
4204cdca6e Why are we deleting prgnVis after setting it up? Wine code shows that it is deleted after an error if it was setup prior the error. This fixes a bug introduced in revision 5118.
svn path=/trunk/; revision=33719
2008-05-26 20:36:38 +00:00
Filip Navara
2cb33838e4 Change the code a bit, as Hervé Poussineau points out, the interrupt vector could in some cases be zero.
svn path=/trunk/; revision=33718
2008-05-26 18:51:15 +00:00
Filip Navara
e5b4190710 Fix incorrect logic in IntVideoPortSetupInterrupt and add comment.
svn path=/trunk/; revision=33717
2008-05-26 18:32:40 +00:00
Johannes Anderwald
d543aa9e03 - only convert the devmode if the caller passed one
- fixes a user32_winetest crash failure

svn path=/trunk/; revision=33716
2008-05-26 18:13:17 +00:00
Aleksey Bragin
32a9a804de - Fix misc structures definitions.
svn path=/trunk/; revision=33715
2008-05-26 18:08:50 +00:00
Gregor Brunmar
53baa88e72 Removed legacy code from r33695, trying to free a NULL pointer
svn path=/trunk/; revision=33714
2008-05-26 16:13:19 +00:00
Aleksey Bragin
3c352d6375 - Erase countdown timer when needed. Based on a patch from bug 3279.
See issue #3046 for more details.

svn path=/trunk/; revision=33713
2008-05-26 15:27:09 +00:00
Johannes Anderwald
2dab0a3d0f - add support for a future timeout callback mechanism
svn path=/trunk/; revision=33712
2008-05-26 15:23:24 +00:00
Aleksey Bragin
b0bbb622d9 - Remove $Id tags.
svn path=/trunk/; revision=33711
2008-05-26 14:42:27 +00:00
Johannes Anderwald
d827979288 - check if its a primary monitor before calculating monitor intersection rectangle
- should fix bug 3281

svn path=/trunk/; revision=33709
2008-05-26 13:50:36 +00:00
Aleksey Bragin
76df1b3538 - Add more functions to the lookup table (used by the newest VMWare 6.5 Video driver).
svn path=/trunk/; revision=33708
2008-05-26 11:47:47 +00:00
Daniel Reimer
2b7e19ea24 Bug 3275: Italian resource translation update by Paolo Devoti (devotip@tiscali.it)
Bug 3277: Lithuanian translation by Vytis Girdzijauskas (cman@cman.us)

svn path=/trunk/; revision=33707
2008-05-25 22:44:32 +00:00
Daniel Reimer
2a4639ca5d Bug 3275: Italian resource translation update by Paolo Devoti (devotip@tiscali.it)
Bug 3277: Lithuanian translation by Vytis Girdzijauskas (cman@cman.us)

svn path=/trunk/; revision=33705
2008-05-25 22:15:26 +00:00
KJK::Hyperion
b8ff60afe1 modified include/psdk/winnls.h
Added definitions for NormalizeString and IsNormalizedString (Vista and later)
   Correct an embarassing bug (some macros were terminated with ";", shame shame)

added      nls
added      nls/3rdparty
added      nls/3rdparty/icu
   We officially welcome IBM's excellent ICU4C library for Unicode support to our humble source tree. May our marriage be long, happy and fertile.

added      nls/3rdparty/icu4ros.rbuild
added      nls/dll
added      nls/dll/normaliz_redist
added      nls/dll/normaliz_redist/normaliz.cpp
added      nls/dll/normaliz_redist/normaliz.def
added      nls/dll/normaliz_redist/normaliz_redist.rbuild
added      nls/lib
added      nls/lib/normalize
added      nls/lib/normalize/normalize.cpp
added      nls/lib/normalize/normalize.rbuild
added      nls/nls.rbuild
modified   ReactOS-generic.rbuild
   Incomplete implementation of the redistributable normaliz.dll DLL for Unicode normalization, as a technical preview of what's to come from the use of ICU4C - namely, straightforward, painless implementation of complex algorithms and several megabytes worth of data, with a Win32-compatible interface on top. Currently disabled in the build until basic testing is over.

Watch this space for more of the same.

svn path=/trunk/; revision=33703
2008-05-25 21:00:08 +00:00
Magnus Olsen
b5ab26f7a3 implement LpkDllInitialize for lpk
svn path=/trunk/; revision=33701
2008-05-25 17:52:28 +00:00
Magnus Olsen
b2744bf34b fix right export prefix for LpkPresent.
svn path=/trunk/; revision=33700
2008-05-25 17:51:15 +00:00
Magnus Olsen
ed494cbfbc add dll lpk it is stub for now.
it will be use of gdi32 and user32 later 

svn path=/trunk/; revision=33699
2008-05-25 15:22:09 +00:00
Colin Finck
b1f83f040a Update README.WINE about the crypt32 sync
svn path=/trunk/; revision=33698
2008-05-25 14:16:14 +00:00
Magnus Olsen
b86be5acd2 started added test for InitializeLpkHooks
this tests are not completed more will follow.
this is the frame work for testing InitializeLpkHooks


svn path=/trunk/; revision=33697
2008-05-25 12:04:06 +00:00
Eric Kohl
d53c67dc50 Add the general user properties page. Settings are visible but cannot be changed yet.
svn path=/trunk/; revision=33696
2008-05-25 11:50:56 +00:00
Gregor Brunmar
e1ae479d5a Reinstated DIALOG_get_info() based of Wine's implementation, but with some modifications. This makes us pass the last 6 failed dialog wine tests.
svn path=/trunk/; revision=33695
2008-05-25 11:12:42 +00:00
Dmitry Chapyshev
eaaa829ad8 - Start implementing WDM Audio driver mapper
svn path=/trunk/; revision=33694
2008-05-25 10:41:08 +00:00
Dmitry Chapyshev
8ad6c02608 - Add baseaddress for wdmaud.drv
svn path=/trunk/; revision=33693
2008-05-25 10:39:34 +00:00
Dmitry Chapyshev
bb3f867eee - Add stubs WDM Audio driver mapper
svn path=/trunk/; revision=33691
2008-05-25 09:34:14 +00:00
Gregor Brunmar
21f3bde4eb * Changed to correct signature of NtUserGetClassName()
* Implemented correct behaviour in GetRealWindowClass(), but in reality just shifted the todo parts to NtUserGetClassName() instead.

svn path=/trunk/; revision=33689
2008-05-25 08:36:30 +00:00
Pierre Schweitzer
61350d2a48 Fixed a bug in GetClipboardFormatNameA
svn path=/trunk/; revision=33688
2008-05-25 08:30:33 +00:00
Johannes Anderwald
cdc5cb8cf5 - fix wait functions for console handles
- bug 3273

svn path=/trunk/; revision=33687
2008-05-25 07:05:34 +00:00
Magnus Olsen
73e46408e9 implemeted test for GdiDeleteLocalDC, GdiReleaseLocalDC, GdiSetAttrs
tested in xp/vista/reactos and works no fault report.

svn path=/trunk/; revision=33681
2008-05-24 22:42:46 +00:00
Magnus Olsen
287182ff5f implemeted test for GdiConvertBitmap, GdiConvertBrush, GdiConvertDC, GdiConvertFont, GdiConvertPalette, GdiConvertRegion, GdiGetLocalBrush, GdiGetLocalDC
tested in xp/vista/reactos and works no fault report.

svn path=/trunk/; revision=33680
2008-05-24 22:20:31 +00:00
Colin Finck
1528124748 Samuel Serapión (samdwise51 AT gmail DOT com):
- Sync the advapi32 crypt functions to Wine 1.0-rc2, this way we pass some more winetests.

Changes by myself:
- Implement SystemFunction036 (RtlGenRandom) as the Wine equivalent is based on /dev/urandom, so that it cannot be used.
  Warning: This function uses the pseudo random number generator RtlRandom. It should better be implemented using a crypto-safe random number generator!

svn path=/trunk/; revision=33679
2008-05-24 22:16:15 +00:00
Ged Murphy
e96c16aa1e Add functionality to allow dll injection for all apps which link to user32.
svn path=/trunk/; revision=33678
2008-05-24 21:21:58 +00:00
Marc Piulachs
22ab89339c - Move every x86 HAL to it's own .rbuild file
- Take advantage of r33676

svn path=/trunk/; revision=33677
2008-05-24 20:32:44 +00:00
Marc Piulachs
1915f51cbc - Add "base" and "root" support to ImportLibrary. <importlibrary definition="../hal/hal_i386.def" /> -> <importlibrary base="hal" definition="hal_i386.def" />
svn path=/trunk/; revision=33676
2008-05-24 20:31:23 +00:00
Magnus Olsen
ff1a74c0da merge from win32k-gdi-dx r33674 Implement GdiAddGlsBounds
svn path=/trunk/; revision=33675
2008-05-24 19:02:23 +00:00
Marc Piulachs
9ea0a62432 - remove 'basename' , no such attribute exists for <importlibrary>
svn path=/trunk/; revision=33672
2008-05-24 15:33:49 +00:00
Pierre Schweitzer
0d8cccef41 Set default return of IRP_MJ_QUERY_INFORMATION to STATUS_INVALID_PARAMETER
svn path=/trunk/; revision=33671
2008-05-24 09:06:53 +00:00
Pierre Schweitzer
e2d4593c45 - Imported dciman32.dll from Wine HEAD
- Added it to bootcd
- Update README.WINE

svn path=/trunk/; revision=33670
2008-05-24 08:42:53 +00:00
Magnus Olsen
c11d2b1e4f Fixed at typo from me thx Daniel Zimmermann (netzimme at aim dot com) that notes it.
svn path=/trunk/; revision=33666
2008-05-23 19:12:07 +00:00
Magnus Olsen
389b7a34fb add test for NtUserGetTitleBarInfo patch by Daniel Zimmermann (netzimme at aim dot com)
tested on xp sp3 by me

See issue #3266 for more details.

svn path=/trunk/; revision=33665
2008-05-23 18:22:39 +00:00
Magnus Olsen
3797dab429 Fixed memory leak in w32knapi if it fail found gdihandle table patch by Daniel Zimmermann (netzimme at aim dot com)
See issue #3266 for more details.

svn path=/trunk/; revision=33664
2008-05-23 18:14:15 +00:00
Pierre Schweitzer
7625429990 No need to keep linux-ntfs:
- it's outdated
- more docs are available

svn path=/trunk/; revision=33663
2008-05-23 18:01:42 +00:00
Aleksey Bragin
494bf7baae - msiexec is GUI app, not CUI.
svn path=/trunk/; revision=33662
2008-05-23 17:55:30 +00:00
Johannes Anderwald
1f9058bdaf - add stubs for GetTraceEnableFlags, GetTraceEnableLevel, RegisterTraceGuidsA, RegisterTraceGuidsW and UnregisterTraceGuids
svn path=/trunk/; revision=33661
2008-05-23 16:31:22 +00:00
Johannes Anderwald
3dd48684d5 - add prototypes for GetTraceEnableLevel, RegisterTraceGuidsA, RegisterTraceGuidsW, UnregisterTraceGuids
- add WMIPREQUEST, TRACE_GUID_REGISTRATION definition
- add wmistr.h header

svn path=/trunk/; revision=33660
2008-05-23 16:29:05 +00:00
Aleksey Bragin
20263a1377 - Revert 32675 (enabling usage of the cache bitmap). It was just hiding the real bug fixed in r33633, and the bitmap code seems to not be finished (e.g. "out of CacheSeg space" bug).
svn path=/trunk/; revision=33659
2008-05-23 14:40:50 +00:00
James Tabor
d05a01709b Add more data for extended clip object.
svn path=/trunk/; revision=33658
2008-05-23 12:50:46 +00:00
Magnus Olsen
3b4c9ded42 Implemtened : NtUserGetTitleBarInfo
This code was writen by me and Daniel Zimmermann (netzimme at aim dot com) and it is base on wine version, 


See issue #3266 for more details.

svn path=/trunk/; revision=33657
2008-05-23 05:46:22 +00:00
James Tabor
540035b99a Removed w.flags from dc.h update all related.
svn path=/trunk/; revision=33656
2008-05-23 01:46:55 +00:00
James Tabor
f5aa4b5c0c Move W structure back into dc.h and added the clip object for dcobj.
svn path=/trunk/; revision=33655
2008-05-23 01:11:25 +00:00
Marc Piulachs
62413f7a09 - Remove crtdll reference. All Win32* modules implicitly link msvcrt.
svn path=/trunk/; revision=33654
2008-05-23 00:57:32 +00:00
James Tabor
6f3798d0cf Removed unused code from Arc. Removed old saveLevel and hSelf, use DcLevel. Other changes to region and clipping.
svn path=/trunk/; revision=33653
2008-05-23 00:29:08 +00:00
Colin Finck
6eb7885be4 Apply the fix from r32705 to C and C++ files as well.
This fixes the "rebuild-everything-on-every-change" bug (at least for me)
For the record, this is broken since r32595.

Note: If you have building problems after this commit when building a single module, please try to revert only my changes from lines 1847 to 1850.

svn path=/trunk/; revision=33652
2008-05-23 00:11:52 +00:00
Timo Kreuzer
89deeaf7c4 fix a cast and indentation
svn path=/trunk/; revision=33651
2008-05-22 23:16:35 +00:00
Steven Edwards
5c30086951 Sync GetTempPathW with current Wine. This should help with some
installers the depend on the USERPROFILE variable being present. Does
not fix the Word 2003 viewer install but changes the behavior slightly
and is more correct.


svn path=/trunk/; revision=33650
2008-05-22 21:07:41 +00:00
Marc Piulachs
09a85aaedd - express PCH location in a more correct way
svn path=/trunk/; revision=33649
2008-05-22 20:45:58 +00:00
Johannes Anderwald
3460e9ab3c - add GetTraceEnableFlags prototype
svn path=/trunk/; revision=33648
2008-05-22 20:26:53 +00:00
Aleksey Bragin
e5196d85e3 - Actually remove the exports.
svn path=/trunk/; revision=33647
2008-05-22 19:44:43 +00:00
Aleksey Bragin
8522c6766e Stefan Ginsberg <stefan__100__@hotmail.com>
- Remove KiRosPrintAddress export from ntoskrnl_i386.def, and CcRos* apis too.
- Make win32k use KeRosDumpStackFrames instead of KiRosPrintAddress.

svn path=/trunk/; revision=33646
2008-05-22 19:31:49 +00:00
Johannes Anderwald
1e5dd70adb - fix integer to string representation
- patch by Carlo Bramini
- bug 2437

svn path=/trunk/; revision=33645
2008-05-22 17:40:01 +00:00
Johannes Anderwald
27ee5b62b8 - define _WMI_SOURCE_ macro
- include evntrace header
- implement stubs for GetTraceLoggerHandle and TraceEvent and also export them

svn path=/trunk/; revision=33644
2008-05-22 17:23:47 +00:00
Johannes Anderwald
63477f9dd4 - check if PEVENT_TRACE_HEADER is already defined
- define WMIAPI macro
- add TraceEvent, GetTraceLoogerHandler prototypes
- PEVENT_TRACE_HEADER should not be defined in the NDK

svn path=/trunk/; revision=33643
2008-05-22 17:12:42 +00:00
Timo Kreuzer
5db224e2b9 implement SPI_GET/SETSTICKYKEYS, SPI_GET/SETFILTERKEYS, SPI_GET/SETTOGGLEKEYS, SPI_GET/SETSERIALKEYS, SPI_GET/SETMOUSEKEYS, SPI_GET/SETKEYBOARDPREF, SPI_GET/SETSHOWSOUNDS, SPI_GET/SETACCESSTIMEOUT
makes access.cpl start again.
See issue #3133 for more details.

svn path=/trunk/; revision=33640
2008-05-22 14:51:01 +00:00
Timo Kreuzer
41b38a2ea1 fix a typo
svn path=/trunk/; revision=33639
2008-05-22 14:36:25 +00:00
KJK::Hyperion
dc75130891 Patch by Alex Ionescu <alex.ionescu@reactos.org>
See issue #3054 for more details.

svn path=/trunk/; revision=33637
2008-05-22 13:40:42 +00:00
KJK::Hyperion
1fe8b5d775 Reverting r33635
svn path=/trunk/; revision=33636
2008-05-22 13:37:27 +00:00
KJK::Hyperion
7184323272 Patch by Alex Ionescu <alex.ionescu@reactos.org>
See issue #3116 for more details.

svn path=/trunk/; revision=33635
2008-05-22 13:19:32 +00:00
James Tabor
c379e6ad12 Add NtGdiGetRandomRgn iCode values.
svn path=/trunk/; revision=33634
2008-05-22 12:51:53 +00:00
KJK::Hyperion
b16ac9683a - Remove WINE-isms from KeDeviceQueue code
- Fix memory corruption that happened pretty much everytime you pressed a key or moved the mouse -- reponsible for countless crashes, including the famous ASSERT during 1-stage setup.
 - Remove anti-memory-corruption-workaround from VFAT
 - Note: If you're going to do use device queues in your driver, please learn how. Kthxbye.
Patch by Alex Ionescu <alex.ionescu@reactos.org>
_____

Alex,
 Marry me,
KJK::Hyperion
XOXOXO

See issue #3116 for more details.

svn path=/trunk/; revision=33633
2008-05-22 11:46:46 +00:00
Magnus Olsen
af1376546d implemented GetTitleBarInfo in user32 it works now same as xp/vista left todo implemented it proper in win32k on the syscall NtUserGetTitleBarInfo that is stub at moment.
svn path=/trunk/; revision=33632
2008-05-22 08:39:24 +00:00
Aleksey Bragin
483ac0fe6c - Fix a typo in this header's guard, prevents multiple inclusion.
svn path=/trunk/; revision=33631
2008-05-22 07:17:16 +00:00
James Tabor
f9814c9de4 Fix behavior if bmi null in NtGdiCreateDIBSection. Start internal functions for regions, includes a wine port get_region_type.
svn path=/trunk/; revision=33629
2008-05-21 22:32:13 +00:00
Hervé Poussineau
1136b9642b Fix precompiled header name.
According to http://gcc.gnu.org/onlinedocs/gcc/Precompiled-Headers.html , precompiled header name *must be* the name of the header followed by .gch
See issue #3263 for more details.

svn path=/trunk/; revision=33627
2008-05-21 18:00:40 +00:00
Hervé Poussineau
b18f57e3fc Disable precompiled headers for files which are in more than one module
(Precompiled header name have a fixed name, but modules may have different compile options)

svn path=/trunk/; revision=33626
2008-05-21 17:57:24 +00:00
Aleksey Bragin
3c2ec47c4a - Fix build.
svn path=/trunk/; revision=33624
2008-05-21 16:19:41 +00:00
Aleksey Bragin
04d1f6f145 Stefan Ginsberg <stefan__100__@hotmail.com>
- Fix NtFlushVirtualMemory definition in PSDK.
- Fix NtFlushVirtualMemory's usage in kernel32.
- Fix FlushViewOfFile's prototype (DWORD -> SIZE_T, as it is in PlatformSDK).
- Add a C_ASSERT definition to winnt.h.
- Change a meaningless ASSERT to a C_ASSERT.

svn path=/trunk/; revision=33623
2008-05-21 16:10:00 +00:00
Johannes Anderwald
fad6923fb5 - check input parameters in LoadString[A|W]
- fixes a winetest issue
- patch by Kamil Hornicek (Pigglesworth)

svn path=/trunk/; revision=33622
2008-05-21 15:33:38 +00:00
Aleksey Bragin
dbc9964533 - Fix a few typos in SHARED_CACHE_MAP definition in NDK.
- Minor fix to BITMAP_RANGE structure in ntifs.h.

svn path=/trunk/; revision=33621
2008-05-21 15:28:43 +00:00
Aleksey Bragin
90c42a08eb - Convert imagehlp's .def file to .spec format (keeping same ordinals, etc), since ---enable-stdcall-fuxup does not really work for linking.
- Uncomment function declarations in psdk/imagehlp.h and thus make crypt32 use them to prevent stack corruption (it was generating implicit declarations warnings).

svn path=/trunk/; revision=33620
2008-05-21 14:43:29 +00:00
Magnus Olsen
23722e0cb4 filter the higher part of DWORD for return value of VBE return value from the BIOS
this will make allot ATI card working proper. thx again bear windows for the info and mail response which card need it, more info for this issue at http://www.bearwindows.boot-land.net/vbemp.htm#10

svn path=/trunk/; revision=33619
2008-05-21 13:47:22 +00:00
Timo Kreuzer
788d425ef1 - Fix wrong debug output when a process is terminated, by deleting the it's objects in a proper order, fixes bug 2954
- remove Fireball's, ugly nasty hack.
- Fix debug output to show the right problem
- For all people who think the handle table might be messed up: add a function that validates the handle table integrity after a process is closed, when GDI_DEBUG is defined.
- fix the BaseObjects hHmgr field when converting an object to a stock object.
- move all GDI_DEBUG stuff into it's own file

See issue #2954 for more details.

svn path=/trunk/; revision=33618
2008-05-20 20:39:32 +00:00
20157 changed files with 1206870 additions and 5224692 deletions

24
README.txt Normal file
View File

@@ -0,0 +1,24 @@
$Id: README.txt 15922 2006-03-05 17:42:12Z frik85 $
===============
ReactOS Website
===============
If you run into problems or have suggestions for making the ReactOS Website better, please
visit the address below. Mailing lists are available for a variety of topics,
bugs should be submitted to bugzilla and general chat takes place in the forums,
or #reactos-web on freenode
More Information about the ReactOS Website:
http://www.reactos.org/?page=about_homepage
Previous versions of the ReactOS Website:
http://web.archive.org/web/*/http://www.reactos.com
ReactOS Website Team
http://www.reactos.org

View File

@@ -1,608 +0,0 @@
// irc_test.cpp
#ifdef _MSC_VER
#pragma warning ( disable : 4786 )
#endif//_MSC_VER
#include <time.h>
#include <stdio.h>
#include "File.h"
#include "ssprintf.h"
#include "trim.h"
#include "IRCClient.h"
#include "config.h"
using std::string;
using std::vector;
//vector<string> tech, module, dev, stru, period, status, type, func, irql, curse, cursecop;
class List
{
public:
string name;
bool macro;
std::vector<std::string> list;
string tag;
int last;
List() { last = -1; }
List ( const char* _name, bool _macro ) : name(_name), macro(_macro)
{
tag = ssprintf("%%%s%%",_name);
last = -1;
}
};
vector<List> lists;
vector<string> ops;
void ImportList ( const char* listname, bool macro )
{
lists.push_back ( List ( listname, macro ) );
List& list = lists.back();
File f ( ssprintf("%s.txt",listname).c_str(), "r" );
string line;
while ( f.next_line ( line, true ) )
list.list.push_back ( line );
}
const char* ListRand ( List& list )
{
vector<string>& l = list.list;
if ( !l.size() )
{
static string nothing;
nothing = ssprintf ( "<list '%s' empty>", list.name.c_str() );
return nothing.c_str();
}
else if ( l.size() == 1 )
return l[0].c_str();
int sel = list.last;
while ( sel == list.last )
sel = rand()%l.size();
list.last = sel;
return l[sel].c_str();
}
const char* ListRand ( int i )
{
return ListRand ( lists[i] );
}
int GetListIndex ( const char* listname )
{
for ( int i = 0; i < lists.size(); i++ )
{
if ( !stricmp ( lists[i].name.c_str(), listname ) )
return i;
}
return -1;
}
List& GetList ( const char* listname )
{
return lists[GetListIndex(listname)];
}
const char* ListRand ( const char* list )
{
int i = GetListIndex ( list );
if ( i < 0 )
return NULL;
return ListRand(i);
}
string TaggedReply ( const char* listname )
{
string t = ListRand(listname);
string out;
const char* p = t.c_str();
while ( *p )
{
if ( *p == '%' )
{
bool found = false;
for ( int i = 0; i < lists.size() && !found; i++ )
{
if ( lists[i].macro && !strnicmp ( p, lists[i].tag.c_str(), lists[i].tag.size() ) )
{
out += ListRand(i);
p += lists[i].tag.size();
found = true;
}
}
if ( !found )
out += *p++;
}
const char* p2 = strchr ( p, '%' );
if ( !p2 )
p2 = p + strlen(p);
if ( p2 > p )
{
out += string ( p, p2-p );
p = p2;
}
}
return out;
}
string gobble ( string& s, const char* delim )
{
const char* p = s.c_str();
p += strspn ( p, delim );
const char* p2 = strpbrk ( p, delim );
if ( !p2 ) p2 = p + strlen(p);
string out ( p, p2-p );
p2 += strspn ( p2, delim );
s = string ( p2 );
return out;
}
bool isop ( const string& who )
{
for ( int i = 0; i < ops.size(); i++ )
{
if ( ops[i] == who )
return true;
}
return false;
}
// do custom stuff with the IRCClient from your subclass via the provided callbacks...
class MyIRCClient : public IRCClient
{
File flog;
clock_t brake_silence;
// wait another 30 mins to brake the silence
#define NOIDLE brake_silence = clock () + 30 * CLK_TCK * 60
void CheckIdle ( void )
{
while (true) // _inRun
{
while (clock() < brake_silence)
Sleep(10000);
string out = TaggedReply("idle");
if ( !strnicmp ( out.c_str(), "/me ", 4 ) )
Action ( CHANNEL, &out[4] );
else
PrivMsg ( CHANNEL, out );
NOIDLE;
}
}
static void THREADAPI CallMe ( MyIRCClient* irc )
{
irc->CheckIdle();
}
public:
MyIRCClient()
{
NOIDLE;
ThreadPool::Instance().Launch ( (ThreadPoolFunc*)MyIRCClient::CallMe, this );
flog.open ( "arch.log", "r+" );
}
// see IRCClient.h for documentation on these callbacks...
bool OnConnected()
{
return true;
}
bool OnJoin ( const string& user, const string& channel )
{
//printf ( "user '%s' joined channel '%s'\n", user.c_str(), channel.c_str() );
return true;
}
bool OnPart ( const std::string& user, const std::string& channel )
{
std::vector<std::string>::iterator it = ops.begin();
for ( ; it != ops.end(); it++ )
{
if ( *it == user )
{
printf ( "remove '%s' to ops list\n", user.c_str() );
ops.erase ( it );
}
}
return true;
}
bool OnNick ( const std::string& oldNick, const std::string& newNick )
{
for ( int i = 0; i < ops.size(); i++ )
{
if ( ops[i] == oldNick )
{
printf ( "op '%s' changed nick to '%s'\n", oldNick.c_str(), newNick.c_str() );
ops[i] = newNick;
return true;
}
}
return true;
}
bool OnEndChannelUsers ( const string& channel )
{
return true;
}
bool OnPrivMsg ( const string& from, const string& text )
{
//flog.flush();
printf ( "<%s> %s\n", from.c_str(), text.c_str() );
flog.printf ( "<%s> %s\n", from.c_str(), text.c_str() );
if ( !isop(from) )
return PrivMsg ( from, "hey, your tongue doesn't belong there!" );
else if ( strnicmp ( text.c_str(), "!say ", 5 ) )
return PrivMsg ( from, "Talk to me on normal Chanel" );
string say = trim(&text[5]);
if ( !strnicmp ( say.c_str(), "/me ", 4 ) )
return Action ( CHANNEL, trim(&say[4]) );
else
return PrivMsg ( CHANNEL, trim(say) );
}
bool OnChannelMsg ( const string& channel, const string& from, const string& text )
{
fflush ( flog );
printf ( "%s <%s> %s\n", channel.c_str(), from.c_str(), text.c_str() );
flog.printf ( "%s <%s> %s\n", channel.c_str(), from.c_str(), text.c_str() );
NOIDLE; // add 30 mins till idle
bool found_name = false;
string text2 ( text );
strlwr ( &text2[0] );
if ( !strnicmp ( text.c_str(), BOTNAME, strlen(BOTNAME) ) )
found_name = true;
string s ( text );
if ( found_name )
gobble ( s, " \t" ); // remove bot name
// command
if ( s[0] == '!' )
{
bool from_op = isop(from);
string cmd = gobble ( s, " \t" );
// from all
if ( false && cmd == "!svn" && from == "TechBot" ) // || cmd == "!help" && !TechBotOnline
{
PrivMsg ( channel, "For my help try !what." );
}
// from normel user
else if ( !from_op )
{
if ( cmd == "!grovel" )
{
string out = ssprintf(TaggedReply("nogrovel").c_str(),from.c_str());
if ( !strnicmp ( out.c_str(), "/me ", 4 ) )
return Action ( channel, &out[4] );
else
return PrivMsg ( channel, out );
}
else if ( cmd == "!what" )
{
return PrivMsg ( channel, ssprintf("For you, %s, I only support the \"!grovel\" command.", from.c_str()).c_str() );
}
else if ( cmd == "!grovel" || cmd == "!kiss" || cmd == "!hug"
|| cmd == "!give" || cmd == "!what" || cmd == "!add" || cmd == "!remove" )
{
PrivMsg ( channel, ssprintf("%s: I only take commands from ops",from.c_str()) );
}
}
// from op
else if ( cmd == "!grovel" )
{
string out = ssprintf(TaggedReply("grovel").c_str(),from.c_str());
if ( !strnicmp ( out.c_str(), "/me ", 4 ) )
return Action ( channel, &out[4] );
else
return PrivMsg ( channel, out );
}
else if ( cmd == "!kiss" )
{
if ( s.size() )
return Action ( channel, ssprintf("kisses %s",s.c_str()) );
else
return PrivMsg ( channel, ssprintf("%s: huh?",from.c_str()) );
}
else if ( cmd == "!hug" )
{
if ( s.size() )
return Action ( channel, ssprintf("hugs %s",s.c_str()) );
else
return PrivMsg ( channel, ssprintf("%s: huh?",from.c_str()) );
}
else if ( cmd == "!give" )
{
string who = gobble(s," \t");
if ( who.size() && s.size() )
return Action ( channel, ssprintf("gives %s a %s",who.c_str(),s.c_str()) );
else
return PrivMsg ( channel, ssprintf("%s: huh?",from.c_str()) );
}
else if ( cmd == "!what" )
{
PrivMsg ( channel, "For ops I support the following commands:" );
PrivMsg ( channel, "!grovel" );
PrivMsg ( channel, "!kiss" );
PrivMsg ( channel, "!hug" );
PrivMsg ( channel, "!give" );
PrivMsg ( channel, "!say (the input is a private message)" );
PrivMsg ( channel, "!add" );
PrivMsg ( channel, "!remove" );
PrivMsg ( channel, " - for more info see wiki" );
}
else if ( cmd == "!add" )
{
string listname = gobble ( s, " \t" );
int i = GetListIndex ( listname.c_str() );
if ( i == -1 )
return PrivMsg ( channel, ssprintf("%s: I don't have a list named '%s'",from.c_str(),listname.c_str()) );
List& list = lists[i];
if ( s[0] == '\"' || s[0] == '\'' )
{
char delim = s[0];
const char* p = &s[1];
const char* p2 = strchr ( p, delim );
if ( !p2 )
return PrivMsg ( channel, ssprintf("%s: Couldn't add, unmatched quotes",from.c_str()) );
s = string ( p, p2-p );
}
for ( i = 0; i < list.list.size(); i++ )
{
if ( list.list[i] == s )
return PrivMsg ( channel, ssprintf("%s: entry already exists in list '%s'",from.c_str(),listname.c_str()) );
}
if ( !stricmp ( listname.c_str(), "curse" ) )
strlwr ( &s[0] );
list.list.push_back ( s );
{
File f ( ssprintf("%s.txt",list.name.c_str()), "w" );
for ( i = 0; i < list.list.size(); i++ )
f.printf ( "%s\n", list.list[i].c_str() );
}
return PrivMsg ( channel, ssprintf("%s: entry added to list '%s'",from.c_str(),listname.c_str()) );
}
else if ( cmd == "!remove" )
{
string listname = gobble ( s, " \t" );
int i = GetListIndex ( listname.c_str() );
if ( i == -1 )
return PrivMsg ( channel, ssprintf("%s: I don't have a list named '%s'",from.c_str(),listname.c_str()) );
List& list = lists[i];
if ( s[0] == '\"' || s[0] == '\'' )
{
char delim = s[0];
const char* p = &s[1];
const char* p2 = strchr ( p, delim );
if ( !p2 )
return PrivMsg ( channel, ssprintf("%s: Couldn't add, unmatched quotes",from.c_str()) );
s = string ( p, p2-p );
}
std::vector<std::string>::iterator it = list.list.begin();
for ( ; it != list.list.end(); it++ )
{
if ( *it == s )
{
list.list.erase ( it );
{
File f ( ssprintf("%s.txt",list.name.c_str()), "w" );
it = list.list.begin();
for ( ; it < list.list.end(); it++ )
f.printf ( "%s\n", it->c_str() );
}
return PrivMsg ( channel, ssprintf("%s: entry removed from list '%s'",from.c_str(),listname.c_str()) );
}
}
return PrivMsg ( channel, ssprintf("%s: entry doesn't exist in list '%s'",from.c_str(),listname.c_str()) );
}
else
{
if (found_name)
return PrivMsg ( channel, ssprintf("%s: huh?",from.c_str()) );
}
} // if (command)
bool found_curse = false;
static vector<string>& curse = GetList("curse").list;
text2 = " " + text2 + " ";
for ( int i = 0; i < curse.size() && !found_curse; i++ )
{
if ( strstr ( text2.c_str(), curse[i].c_str() ) )
found_curse = true;
}
if ( found_curse )
{
static List& cursecop = GetList("cursecop");
return PrivMsg ( channel, ssprintf("%s: %s", from.c_str(), ListRand(cursecop)) );
}
string botname (BOTNAME);
strlwr ( &botname[0] );
//botname = " " + botname + " ";
if ( strstr(text2.c_str(), botname.c_str()) || strstr(text2.c_str(), " arch ") || found_name )
{
string out = ssprintf("%s: %s", from.c_str(), TaggedReply("tech").c_str());
flog.printf ( "TECH-REPLY: %s\n", out.c_str() );
if ( !strnicmp ( out.c_str(), "/me ", 4 ) )
return Action ( channel, &out[4] );
else
return PrivMsg ( channel, out );
}
return true;
} // On Chanel Message
bool OnChannelMode ( const string& channel, const string& mode )
{
//printf ( "OnChannelMode(%s,%s)\n", channel.c_str(), mode.c_str() );
return true;
}
bool OnUserModeInChannel ( const string& src, const string& channel, const string& mode, const string& target )
{
printf ( "OnUserModeInChannel(%s,%s,%s,%s)\n", src.c_str(), channel.c_str(), mode.c_str(), target.c_str() );
const char* p = mode.c_str();
if ( !p )
return true;
while ( *p )
{
switch ( *p++ )
{
case '+':
while ( *p != 0 && *p != ' ' )
{
if ( *p == 'o' )
{
printf ( "adding '%s' to ops list\n", target.c_str() );
ops.push_back ( target );
}
break;
}
break;
case '-':
while ( *p != 0 && *p != ' ' )
{
if ( *p == 'o' )
{
std::vector<std::string>::iterator it = ops.begin();
for ( ; it != ops.end(); it++ )
{
if ( *it == target )
{
printf ( "remove '%s' to ops list\n", target.c_str() );
ops.erase ( it );
}
}
break;
}
}
}
}
return true;
}
bool OnMode ( const string& user, const string& mode )
{
//printf ( "OnMode(%s,%s)\n", user.c_str(), mode.c_str() );
return true;
}
bool OnChannelUsers ( const string& channel, const vector<string>& users )
{
//printf ( "[%s has %i users]: ", channel.c_str(), users.size() );
for ( int i = 0; i < users.size(); i++ )
{
if ( users[i][0] == '@' )
ops.push_back ( &users[i][1] );
/*if ( i )
printf ( ", " );
printf ( "%s", users[i].c_str() );*/
}
//printf ( "\n" );
return true;
}
bool OnKick ( void )
{
Join(CHANNEL);
return true;
}
bool OnBanned ( const std::string& channel )
{
Sleep(10000);
return Join(CHANNEL);
}
};
int main ( int argc, char** argv )
{
srand ( time(NULL) );
ImportList ( "dev", true );
ImportList ( "func", true );
ImportList ( "dev", true );
ImportList ( "func", true );
ImportList ( "irql", true );
ImportList ( "module", true );
ImportList ( "period", true );
ImportList ( "status", true );
ImportList ( "stru", true );
ImportList ( "type", true );
ImportList ( "tech", false );
ImportList ( "curse", false );
ImportList ( "cursecop", false );
ImportList ( "grovel", false );
ImportList ( "nogrovel", false );
ImportList ( "idle", false );
#ifdef _DEBUG
printf ( "initializing IRCClient debugging\n" );
IRCClient::SetDebug ( true );
#endif//_DEBUG
while (true)
{
printf ( "calling suStartup()\n" );
suStartup();
printf ( "creating IRCClient object\n" );
MyIRCClient irc;
printf ( "connecting to freenode\n" );
if ( !irc.Connect ( SERVER ) ) // irc.freenode.net
{
printf ( "couldn't connect to server\n" );
Sleep(10000);
continue;
}
printf ( "sending user command\n" );
if ( !irc.User ( BOTNAME, "reactos.com", SERVER, "ArchBlackmann" ) )
{
printf ( "USER command failed, retying ...\n" );
Sleep(10000);
continue;
}
printf ( "sending nick\n" );
if ( !irc.Nick ( BOTNAME ) )
{
printf ( "NICK command failed, retying ...\n" );
Sleep(10000);
continue;
}
printf ( "setting mode\n" );
if ( !irc.Mode ( MODE ) )
{
printf ( "MODE command failed, retying ...\n" );
Sleep(10000);
continue;
}
printf ( "joining channel\n" );
if ( !irc.Join ( CHANNEL ) )
{
printf ( "JOIN command failed, retying ...\n" );
Sleep(10000);
continue;
}
printf ( "entering irc client processor\n" );
irc.Run ( false ); // do the processing in this thread...
}
return 0;
}

View File

@@ -1,216 +0,0 @@
# Microsoft Developer Studio Project File - Name="ArchBlackmann" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=ArchBlackmann - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "ArchBlackmann.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "ArchBlackmann.mak" CFG="ArchBlackmann - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "ArchBlackmann - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "ArchBlackmann - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "ArchBlackmann - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
!ELSEIF "$(CFG)" == "ArchBlackmann - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
!ENDIF
# Begin Target
# Name "ArchBlackmann - Win32 Release"
# Name "ArchBlackmann - Win32 Debug"
# Begin Source File
SOURCE=.\ArchBlackmann.cpp
# End Source File
# Begin Source File
SOURCE=.\auto_ptr.h
# End Source File
# Begin Source File
SOURCE=.\auto_vector.h
# End Source File
# Begin Source File
SOURCE=.\base64.cpp
# End Source File
# Begin Source File
SOURCE=.\base64.h
# End Source File
# Begin Source File
SOURCE=.\chomp.cpp
# End Source File
# Begin Source File
SOURCE=.\chomp.h
# End Source File
# Begin Source File
SOURCE=.\config.h
# End Source File
# Begin Source File
SOURCE=.\cram_md5.cpp
# End Source File
# Begin Source File
SOURCE=.\cram_md5.h
# End Source File
# Begin Source File
SOURCE=.\File.cpp
# End Source File
# Begin Source File
SOURCE=.\File.h
# End Source File
# Begin Source File
SOURCE=.\IRCClient.cpp
# End Source File
# Begin Source File
SOURCE=.\IRCClient.h
# End Source File
# Begin Source File
SOURCE=.\MD5.cpp
# End Source File
# Begin Source File
SOURCE=.\MD5.h
# End Source File
# Begin Source File
SOURCE=.\panic.cpp
# End Source File
# Begin Source File
SOURCE=.\panic.h
# End Source File
# Begin Source File
SOURCE=.\QueueT.h
# End Source File
# Begin Source File
SOURCE=.\Reli.h
# End Source File
# Begin Source File
SOURCE=.\ReliMT.cpp
# End Source File
# Begin Source File
SOURCE=.\ReliMT.h
# End Source File
# Begin Source File
SOURCE=.\SockUtils.cpp
# End Source File
# Begin Source File
SOURCE=.\SockUtils.h
# End Source File
# Begin Source File
SOURCE=.\SplitJoin.cpp
# End Source File
# Begin Source File
SOURCE=.\SplitJoin.h
# End Source File
# Begin Source File
SOURCE=.\ssprintf.cpp
# End Source File
# Begin Source File
SOURCE=.\ssprintf.h
# End Source File
# Begin Source File
SOURCE=.\ThreadPool.cpp
# End Source File
# Begin Source File
SOURCE=.\ThreadPool.h
# End Source File
# Begin Source File
SOURCE=.\trim.cpp
# End Source File
# Begin Source File
SOURCE=.\trim.h
# End Source File
# Begin Source File
SOURCE=.\verify.h
# End Source File
# End Target
# End Project

View File

@@ -1,29 +0,0 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "ArchBlackmann"=.\ArchBlackmann.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@@ -1,265 +0,0 @@
// File.cpp
// (C) 2002-2004 Royce Mitchell III
// Dually licensed under BSD & LGPL
#ifdef _MSC_VER
#pragma warning ( disable : 4786 )
#endif//_MSC_VER
#include <stdio.h>
#include <stdarg.h>
#include "File.h"
#ifndef nelem
#define nelem(x) ( sizeof(x) / sizeof(x[0]) )
#endif//nelem
typedef File::filesize_t filesize_t;
typedef File::fileoff_t fileoff_t;
fileoff_t File::seek ( fileoff_t offset )
{
#ifdef WIN32
if ( _f->_flag & _IOWRT ) // is there pending output?
fflush ( _f );
// reset "buffered input" variables
_f->_cnt = 0;
_f->_ptr = _f->_base;
// make sure we're going forward
if ( _f->_flag & _IORW )
_f->_flag &= ~(_IOREAD|_IOWRT);
return _lseeki64 ( _fileno(_f), offset, SEEK_SET );
#else//UNIX
return lseek64 ( fileno(_f), offset, SEEK_SET );
#endif
}
std::string File::getline ( bool strip_crlf /*= false*/ )
{
std::string s = "";
char buf[256];
for ( ;; )
{
*buf = 0;
fgets ( buf, nelem(buf)-1, _f );
if ( !*buf )
break;
s += buf;
if ( strchr ( "\r\n", buf[strlen(buf)-1] ) )
break;
}
if ( strip_crlf && s.size() )
{
char* p = strpbrk ( &s[0], "\r\n" );
if ( p )
{
*p = '\0';
s.resize ( p-&s[0] );
}
}
return s;
}
std::wstring File::wgetline ( bool strip_crlf /*= false*/ )
{
std::wstring s = L"";
wchar_t buf[256];
for ( ;; )
{
*buf = 0;
fgetws ( buf, nelem(buf)-1, _f );
if ( !*buf )
break;
s += buf;
if ( wcschr ( L"\r\n", buf[wcslen(buf)-1] ) )
break;
}
if ( strip_crlf && s.size() )
{
wchar_t* p = wcspbrk ( &s[0], L"\r\n" );
if ( p )
{
*p = L'\0';
s.resize ( (p-&s[0])/sizeof(wchar_t) );
}
}
return s;
}
// this function searches for the next end-of-line and puts all data it
// finds until then in the 'line' parameter.
//
// call continuously until the function returns false ( no more data )
bool File::next_line ( std::string& line, bool strip_crlf )
{
line = getline(strip_crlf);
// indicate that we're done *if*:
// 1) there's no more data, *and*
// 2) we're at the end of the file
return line.size()>0 || !eof();
}
bool File::next_line ( std::wstring& line, bool strip_crlf )
{
line = wgetline ( strip_crlf );
return line.size()>0 || !eof();
}
/*
example usage:
bool mycallback ( const std::string& line, int line_number, long lparam )
{
std::cout << line << std::endl;
return true; // continue enumeration
}
File f ( "file.txt", "rb" ); // open file for binary read-only ( i.e. "rb" )
f.enum_lines ( mycallback, 0, true );
*/
/*bool File::enum_lines ( bool (*callback)(const std::string& line, int line_number, long lparam), long lparam, bool strip_crlf )
{
int line_number = 0;
for ( ;; )
{
std::string s = getline(strip_crlf);
line_number++;
if ( !s.size() )
{
if ( eof() )
return true;
else
continue;
}
if ( !(*callback) ( s, line_number, lparam ) )
return false;
}
}*/
filesize_t File::length() const
{
#ifdef WIN32
return _filelengthi64 ( _fileno(_f) );
#elif defined(UNIX)
struct stat64 file_stat;
verify(fstat64(fileno(_f), &file_stat) == 0);
return file_stat.st_size;
#endif
}
void File::close()
{
if ( _f )
{
fclose(_f);
_f = 0;
}
}
void File::printf ( const char* fmt, ... )
{
va_list arg;
int done;
va_start(arg, fmt);
assert(_f);
done = vfprintf ( _f, fmt, arg );
va_end(arg);
}
/*static*/ bool File::LoadIntoString ( std::string& s, const std::string& filename )
{
File in ( filename, "rb" );
if ( !in.isopened() )
return false;
filesize_t flen = in.length();
size_t len = size_t(flen);
if ( len != flen )
return false; // file too big...
s.resize ( len + 1 );
if ( !in.read ( &s[0], len ) )
return false;
s[len] = '\0';
s.resize ( len );
return true;
}
/*static*/ bool File::LoadIntoString ( std::string& s, const std::wstring& filename )
{
File in ( filename, L"rb" );
if ( !in.isopened() )
return false;
filesize_t flen = in.length();
size_t len = size_t(flen);
if ( len != flen )
return false; // file too big...
s.resize ( len + 1 );
if ( !in.read ( &s[0], len ) )
return false;
s[len] = '\0';
s.resize ( len );
return true;
}
/*static*/ bool File::SaveFromString ( const std::string& filename, const std::string& s, bool binary )
{
File out ( filename, binary ? "wb" : "w" );
if ( !out.isopened() )
return false;
out.write ( s.c_str(), s.size() );
return true;
}
/*static*/ bool File::SaveFromString ( const std::wstring& filename, const std::string& s, bool binary )
{
File out ( filename, binary ? L"wb" : L"w" );
if ( !out.isopened() )
return false;
out.write ( s.c_str(), s.size() );
return true;
}
/*static*/ bool File::SaveFromBuffer ( const std::string& filename, const char* buf, size_t buflen, bool binary )
{
File out ( filename, binary ? "wb" : "w" );
if ( !out.isopened() )
return false;
out.write ( buf, buflen );
return true;
}
/*static*/ bool File::SaveFromBuffer ( const std::wstring& filename, const char* buf, size_t buflen, bool binary )
{
File out ( filename, binary ? L"wb" : L"w" );
if ( !out.isopened() )
return false;
out.write ( buf, buflen );
return true;
}
/*static*/ std::string File::TempFileName ( const std::string& prefix )
{
#ifdef WIN32
std::string s ( _tempnam ( ".", prefix.c_str() ) );
return s;
#else
// FIXME
return string("");
#endif
}
/*static*/ std::wstring File::TempFileName ( const std::wstring& prefix )
{
#ifdef WIN32
std::wstring s ( _wtempnam ( L".", prefix.c_str() ) );
return s;
#else
// FIXME
return std::wstring(L"");
#endif
}

View File

@@ -1,173 +0,0 @@
// File.h
// (C) 2002-2004 Royce Mitchell III
// Dually licensed under BSD & LGPL
#ifndef FILE_H
#define FILE_H
#ifdef WIN32
# include <stdio.h> // fgetc
# include <io.h>
#elif defined(UNIX)
# include <sys/stat.h>
# include <unistd.h>
#endif
#include <assert.h>
#include <string>
class File
{
public:
#ifdef WIN32
typedef __int64 fileoff_t;
typedef unsigned __int64 filesize_t;
#else//_MSC_VER
typedef __off64_t fileoff_t;
typedef __size64_t filesize_t;
#endif//_MSC_VER
File() : _f(0)
{
}
File ( const std::string& filename, const char* mode ) : _f(0)
{
open ( filename, mode );
}
File ( const std::wstring& filename, const wchar_t* mode ) : _f(0)
{
open ( filename, mode );
}
File ( const char* filename, const char* mode ) : _f(0)
{
open ( filename, mode );
}
File ( const wchar_t* filename, const wchar_t* mode ) : _f(0)
{
open ( filename, mode );
}
~File()
{
close();
}
bool open ( const std::string& filename, const char* mode )
{
assert ( !_f );
return ( _f = fopen ( filename.c_str(), mode ) ) != 0;
}
bool open ( const std::wstring& filename, const wchar_t* mode )
{
assert ( !_f );
return ( _f = _wfopen ( filename.c_str(), mode ) ) != 0;
}
bool open ( const char* filename, const char* mode )
{
assert ( !_f );
return ( _f = fopen ( filename, mode ) ) != 0;
}
bool open ( const wchar_t* filename, const wchar_t* mode )
{
assert ( !_f );
return ( _f = _wfopen ( filename, mode ) ) != 0;
}
fileoff_t seek ( fileoff_t offset );
int get()
{
return fgetc ( _f );
}
bool put ( int c )
{
return fputc ( c, _f ) != EOF;
}
std::string getline ( bool strip_crlf = false );
std::wstring wgetline ( bool strip_crlf = false );
// this function searches for the next end-of-line and puts all data it
// finds until then in the 'line' parameter.
//
// call continuously until the function returns false ( no more data )
bool next_line ( std::string& line, bool strip_crlf );
bool next_line ( std::wstring& line, bool strip_crlf );
bool read ( void* data, unsigned len )
{
return len == fread ( data, 1, len, _f );
}
bool write ( const void* data, unsigned len )
{
return len == fwrite ( data, 1, len, _f );
}
bool write ( const std::string& data )
{
return data.length() == fwrite ( data.c_str(), 1, data.length(), _f );
}
bool write ( const std::wstring& data )
{
return data.length() == fwrite ( data.c_str(), sizeof(data[0]), data.length(), _f );
}
filesize_t length() const;
void close();
bool isopened() const
{
return _f != 0;
}
bool is_open() const
{
return _f != 0;
}
bool eof() const
{
return feof(_f) ? true : false;
}
FILE* operator * ()
{
return _f;
}
operator FILE*()
{
return _f;
}
void printf ( const char* fmt, ... );
void printf ( const wchar_t* fmt, ... );
static bool LoadIntoString ( std::string& s, const std::string& filename );
static bool LoadIntoString ( std::string& s, const std::wstring& filename );
static bool SaveFromString ( const std::string& filename, const std::string& s, bool binary );
static bool SaveFromString ( const std::wstring& filename, const std::string& s, bool binary );
static bool SaveFromBuffer ( const std::string& filename, const char* buf, size_t buflen, bool binary );
static bool SaveFromBuffer ( const std::wstring& filename, const char* buf, size_t buflen, bool binary );
static std::string TempFileName ( const std::string& prefix );
static std::wstring TempFileName ( const std::wstring& prefix );
private:
File(const File&) {}
const File& operator = ( const File& ) { return *this; }
FILE * _f;
};
#endif//FILE_H

View File

@@ -1,418 +0,0 @@
// IRCClient.cpp
// This file is (C) 2004 Royce Mitchell III
// and released under the BSD & LGPL licenses
#ifdef _MSC_VER
#pragma warning ( disable : 4786 )
#endif//_MSC_VER
#include <vector>
#include <sstream>
#include "IRCClient.h"
#include "MD5.h"
#include "cram_md5.h"
#include "trim.h"
#include "chomp.h"
#include "SplitJoin.h"
#include "base64.h"
#include "config.h"
using std::string;
using std::stringstream;
using std::vector;
bool IRCClient::_debug = true;
// see rfc1459 for IRC-Protocoll Reference
IRCClient::IRCClient()
: _timeout(10*60*1000), _inRun(false)
{
}
bool IRCClient::Connect ( const string& server, short port )
{
string buf;
Close();
Attach ( suTcpSocket() );
if ( !suConnect ( *this, server.c_str(), port ) )
return false;
return true;
}
bool
IRCClient::User ( const string& user, const string& mode,
const string& network, const string& realname )
{
string buf;
buf = "USER " + user + " \"" + mode + "\" \"" + network + "\" :" + realname + "\n";
return Send ( buf );
}
bool
IRCClient::Nick ( const string& nick )
{
_nick = nick;
Send ( "NICK " + _nick + "\n" );
PrivMsg ("NickServ", "IDENTIFY " + (string)PASS);
return true;
}
bool
IRCClient::Mode ( const string& mode )
{
return Send ( "MODE " + _nick + " " + mode + "\n" );
}
bool
IRCClient::Names ( const string& channel )
{
return Send ( "NAMES " + channel + "\n" );
}
bool
IRCClient::Mode ( const string& channel, const string& mode, const string& target )
{
return Send ( "MODE " + channel + " " + mode + " " + target + "\n" );
}
bool
IRCClient::Join ( const string& channel )
{
return Send("JOIN " + channel + "\n");
}
bool
IRCClient::PrivMsg ( const string& to, const string& text )
{
return Send ( "PRIVMSG " + to + " :" + text + '\n' );
}
bool
IRCClient::Action ( const string& to, const string& text )
{
return Send ( "PRIVMSG " + to + " :" + (char)1 + "ACTION " + text + (char)1 + '\n' );
}
bool
IRCClient::Part ( const string& channel, const string& text )
{
return Send ( "PART " + channel + " :" + text + "\n" );
}
bool
IRCClient::Quit ( const string& text )
{
return Send( "QUIT :" + text + "\n");
}
bool IRCClient::_Recv ( string& buf )
{
bool b = (recvUntil ( buf, '\n', _timeout ) > 0);
if ( b && _debug )
{
printf ( ">> %s", buf.c_str() );
if ( buf[buf.length()-1] != '\n' )
printf ( "\n" );
}
return b;
}
bool IRCClient::Send ( const string& buf )
{
if ( _debug )
{
printf ( "<< %s", buf.c_str() );
if ( buf[buf.length()-1] != '\n' )
printf ( "\n" );
}
return ( buf.length() == (size_t)send ( *this, buf.c_str(), buf.length(), 0 ) );
}
bool IRCClient::OnPing( const string& text )
{
return Send( "PONG " + text + "\n" );
}
int THREADAPI IRCClient::Callback ( IRCClient* irc )
{
return irc->Run ( false );
}
int IRCClient::Run ( bool launch_thread )
{
if ( (SOCKET)*this == INVALID_SOCKET )
return 0;
if ( _inRun ) return 1;
if ( launch_thread )
{
ThreadPool::Instance().Launch ( (ThreadPoolFunc*)IRCClient::Callback, this );
return 1;
}
_inRun = true;
if ( _debug ) printf ( "IRCClient::Run() - waiting for responses\n" );
string buf;
while ( _Recv(buf) )
{
if ( !strnicmp ( buf.c_str(), "NOTICE ", 7 ) )
{
//printf ( "recv'd NOTICE msg...\n" );
// TODO...
//OnAuth (
}
else if ( !strnicmp ( buf.c_str(), "PING ", 5 ) )
{
const char* p = &buf[5]; // point to first char after "PING "
while ( *p == ':' ) // then read past the colons
p++;
const char* p2 = strpbrk ( p, "\r\n" ); // find the end of line
string text ( p, p2-p ); // and set the text
OnPing( text );
}
else if ( buf[0] == ':' )
{
const char* p = &buf[1]; // skip first colon...
const char* p2 = strpbrk ( p, " !" );
if ( !p2 )
{
printf ( "!!!:OnRecv failure 0: ", buf.c_str() );
continue;
}
string src ( p, p2-p );
if ( !src.length() )
{
printf ( "!!!:OnRecv failure 0.5: %s", buf.c_str() );
continue;
}
p = p2 + 1;
if ( *p2 == '!' )
{
p2 = strchr ( p, ' ' );
if ( !p2 )
{
printf ( "!!!:OnRecv failure 1: %s", buf.c_str() );
continue;
}
//string srchost ( p, p2-p );
p = p2 + 1;
}
p2 = strchr ( p, ' ' );
if ( !p2 )
{
printf ( "!!!:OnRecv failure 2: %s", buf.c_str() );
continue;
}
string cmd ( p, p2-p );
p = p2 + 1;
p2 = strpbrk ( p, " :" );
if ( !p2 )
{
printf ( "!!!:OnRecv failure 3: %s", buf.c_str() );
continue;
}
string tgt ( p, p2-p );
p = p2 + 1;
p += strspn ( p, " " );
if ( *p == '=' )
{
p++;
p += strspn ( p, " " );
}
if ( *p == ':' )
p++;
p2 = strpbrk ( p, "\r\n" );
if ( !p2 )
{
printf ( "!!!:OnRecv failure 4: %s", buf.c_str() );
continue;
}
string text ( p, p2-p );
strlwr ( &cmd[0] );
if ( cmd == "privmsg" )
{
if ( !tgt.length() )
{
printf ( "!!!:OnRecv failure 5 (PRIVMSG w/o target): %s", buf.c_str() );
continue;
}
if ( *p == 1 )
{
p++;
p2 = strchr ( p, ' ' );
if ( !p2 ) p2 = p + strlen(p);
cmd = string ( p, p2-p );
strlwr ( &cmd[0] );
p = p2 + 1;
p2 = strchr ( p, 1 );
if ( !p2 )
{
printf ( "!!!:OnRecv failure 6 (no terminating \x01 for initial \x01 found: %s", buf.c_str() );
continue;
}
text = string ( p, p2-p );
if ( cmd == "action" )
{
if ( tgt[0] == '#' )
OnChannelAction ( tgt, src, text );
else
OnPrivAction ( src, text );
}
else
{
printf ( "!!!:OnRecv failure 7 (unrecognized \x01 command '%s': %s", cmd.c_str(), buf.c_str() );
continue;
}
}
else
{
if ( tgt[0] == '#' )
OnChannelMsg ( tgt, src, text );
else
OnPrivMsg ( src, text );
}
}
else if ( cmd == "mode" )
{
// two diff. kinds of mode notifications...
//printf ( "[MODE] src='%s' cmd='%s' tgt='%s' text='%s'", src.c_str(), cmd.c_str(), tgt.c_str(), text.c_str() );
//OnMode (
// self mode change:
// [MODE] src=Nick cmd=mode tgt=Nick text=+i
// channel mode change:
// [MODE] src=Nick cmd=mode tgt=#Channel text=+o Nick
if ( tgt[0] == '#' )
{
p = text.c_str();
p2 = strchr ( p, ' ' );
if ( p2 && *p2 )
{
string mode ( p, p2-p );
p = p2 + 1;
p += strspn ( p, " " );
OnUserModeInChannel ( src, tgt, mode, trim(p) );
}
else
OnChannelMode ( tgt, text );
}
else
OnMode ( tgt, text );
}
else if ( cmd == "join" )
{
mychannel = text;
OnJoin ( src, text );
}
else if ( cmd == "part" )
{
OnPart ( src, text );
}
else if ( cmd == "nick" )
{
OnNick ( src, text );
}
else if ( cmd == "kick" )
{
OnKick ();
}
else if ( isdigit(cmd[0]) )
{
int i = atoi(cmd.c_str());
switch ( i )
{
case 1: // "Welcome!" - i.e. it's okay to issue commands now...
OnConnected();
break;
case 353: // user list for channel....
{
p = text.c_str();
p2 = strpbrk ( p, " :" );
if ( !p2 ) continue;
string channel ( p, p2-p );
p = strchr ( p2, ':' );
if ( !p ) continue;
p++;
vector<string> users;
while ( *p )
{
p2 = strchr ( p, ' ' );
if ( !p2 )
p2 = p + strlen(p);
users.push_back ( string ( p, p2-p ) );
p = p2+1;
p += strspn ( p, " " );
}
OnChannelUsers ( channel, users );
}
break;
case 366: // END of user list for channel
{
p = text.c_str();
p2 = strpbrk ( p, " :" );
if ( !p2 ) continue;
string channel ( p, p2-p );
OnEndChannelUsers ( channel );
}
break;
case 474: // You are banned
{
p = text.c_str();
p2 = strpbrk ( p, " :" );
if ( !p2 ) continue;
string channel ( p, p2-p );
OnBanned ( channel );
}
break;
case 433: // Nick in Use
{
string nick = _nick;
Nick (nick + "_");
PrivMsg ("NickServ", "GHOST " + nick + " " + PASS);
// HACK HACK HACK
Mode ( "+i" );
Join ( CHANNEL ); // this is because IRC client does not review if his commands were sucessfull
Sleep ( 1000 );
Nick ( nick );
}
break;
case 2: //MOTD
case 376: //MOTD
case 372:
break;
default:
if ( _debug ) printf ( "unknown command %i: %s", i, buf.c_str() );
break;
}
}
else
{
if ( strstr ( buf.c_str(), "ACTION" ) )
{
printf ( "ACTION: " );
for ( int i = 0; i < buf.size(); i++ )
printf ( "%c(%xh)", buf[i], (unsigned)(unsigned char)buf[i] );
}
else if ( _debug ) printf ( "unrecognized ':' response: %s", buf.c_str() );
}
}
else
{
if ( _debug ) printf ( "unrecognized irc msg: %s", buf.c_str() );
}
//OnRecv ( buf );
}
if ( _debug ) printf ( "IRCClient::Run() - exiting\n" );
_inRun = false;
return 0;
}

View File

@@ -1,148 +0,0 @@
// IRCClient.h
// This file is (C) 2004 Royce Mitchell III
// and released under the BSD & LGPL licenses
#ifndef IRCCLIENT_H
#define IRCCLIENT_H
#include <string>
#include <vector>
#include "SockUtils.h"
#include "ThreadPool.h"
class IRCClient : public suBufferedRecvSocket
{
public:
IRCClient();
std::string mychannel;
static bool GetDebug() { return _debug; }
static bool SetDebug ( bool debug ) { bool old = _debug; _debug = debug; return old; }
// connect to server ( record greeting for apop if it exists )
bool Connect ( const std::string& server, short port = 6667 );
bool Running() { return _inRun; }
////////////////////////// IRC Client Protocol commands ///////////////////////
// first thing you must call... mode can be ""
// network can be same as name of server used in Connect() above
bool User ( const std::string& user, const std::string& mode,
const std::string& network, const std::string& realname );
// change nick...
bool Nick ( const std::string& nick );
// change mode for self...
bool Mode ( const std::string& mode );
// set someone's mode in channel ( like oping someone )
bool Mode ( const std::string& channel, const std::string& mode, const std::string& target );
// request a list of names of clients in a channel
bool Names ( const std::string& channel );
// join a channel...
bool Join ( const std::string& channel );
// send message to someone or some channel
bool PrivMsg ( const std::string& to, const std::string& text );
// send /me to someone or some channel
bool Action ( const std::string& to, const std::string& text );
// leave a channel
bool Part ( const std::string& channel, const std::string& text );
// log off
bool Quit ( const std::string& text );
////////////////////// callback functions ////////////////////////////
// OnConnected: you just successfully logged into irc server
virtual bool OnConnected() = 0;
virtual bool OnNick ( const std::string& oldNick, const std::string& newNick ) { return true; }
// OnJoin: someone just successfully joined a channel you are in ( also sent when you successfully join a channel )
virtual bool OnJoin ( const std::string& user, const std::string& channel ) { return true; }
// OnPart: someone just left a channel you are in
virtual bool OnPart ( const std::string& user, const std::string& channel ) { return true; }
// OnPrivMsg: you just received a private message from a user
virtual bool OnPrivMsg ( const std::string& from, const std::string& text ) { return true; }
virtual bool OnPrivAction ( const std::string& from, const std::string& text ) { return true; }
// OnChannelMsg: you just received a chat line in a channel
virtual bool OnChannelMsg ( const std::string& channel, const std::string& from,
const std::string& text ) { return true; }
// OnChannelAction: you just received a "/me" line in a channel
virtual bool OnChannelAction ( const std::string& channel, const std::string& from,
const std::string& text ) { return true; }
// OnChannelMode: notification of a change of a channel's mode
virtual bool OnChannelMode ( const std::string& channel, const std::string& mode )
{ return true; }
// OnUserModeInChannel: notification of a mode change of a user with respect to a channel.
// f.ex.: this will be called when someone is oped in a channel.
virtual bool OnUserModeInChannel ( const std::string& src, const std::string& channel,
const std::string& mode, const std::string& target ) { return true; }
// OnMode: you will receive this when you change your own mode, at least...
virtual bool OnMode ( const std::string& user, const std::string& mode ) { return true; }
// notification of what users are in a channel ( you may get multiple of these... )
virtual bool OnChannelUsers ( const std::string& channel, const std::vector<std::string>& users )
{ return true; }
// OnKick: if the client has been kicked
virtual bool OnKick ( void ) { return true; }
// OnKick: if the client has been kicked
virtual bool OnBanned ( const std::string& channel ) { return true; }
// notification that you have received the entire list of users for a channel
virtual bool OnEndChannelUsers ( const std::string& channel ) { return true; }
// OnPing - default implementation replies to PING with a valid PONG. required on some systems to
// log in. Most systems require a response in order to stay connected, used to verify a client hasn't
// dropped.
virtual bool OnPing ( const std::string& text );
////////////////////// other functions ////////////////////////////
// this is for sending data to irc server. it's public in case you need to send some
// command not supported by this base class...
bool Send ( const std::string& buf );
// if launch_thread is true, this function will spawn a thread that will process
// incoming packets until the socket dies.
// otherwise ( launch_thread is false ) this function will do that processing
// in *this* thread, and not return until the socket dies.
int Run ( bool launch_thread );
////////////////////// private stuff ////////////////////////////
private:
bool _Recv ( std::string& buf );
static int THREADAPI Callback ( IRCClient* irc );
static bool _debug;
std::string _nick;
int _timeout;
std::string _apop_challenge;
volatile bool _inRun;
// disable copy semantics
IRCClient ( const IRCClient& );
IRCClient& operator = ( const IRCClient& );
};
#endif//IRCCLIENT_H

View File

@@ -1,418 +0,0 @@
// MD5.CPP - RSA Data Security, Inc., MD5 message-digest algorithm
/*
Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
rights reserved.
License to copy and use this software is granted provided that it
is identified as the "RSA Data Security, Inc. MD5 Message-Digest
Algorithm" in all material mentioning or referencing this software
or this function.
License is also granted to make and use derivative works provided
that such works are identified as "derived from the RSA Data
Security, Inc. MD5 Message-Digest Algorithm" in all material
mentioning or referencing the derived work.
RSA Data Security, Inc. makes no representations concerning either
the merchantability of this software or the suitability of this
software for any particular purpose. It is provided "as is"
without express or implied warranty of any kind.
These notices must be retained in any copies of any part of this
documentation and/or software.
*/
//#include <assert.h>
#include <memory.h>
#include <ctype.h>
#include <vector>
#include "MD5.h"
using std::string;
using std::vector;
// Constants for MD5Transform routine.
#define S11 7
#define S12 12
#define S13 17
#define S14 22
#define S21 5
#define S22 9
#define S23 14
#define S24 20
#define S31 4
#define S32 11
#define S33 16
#define S34 23
#define S41 6
#define S42 10
#define S43 15
#define S44 21
static void MD5Transform ( UINT4 [4], const uchar [64] );
static void Encode ( unsigned char *, UINT4 *, unsigned int );
static void Decode ( UINT4 *, const uchar *, unsigned int );
static unsigned char PADDING[64] =
{
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
// F, G, H and I are basic MD5 functions.
#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
#define G(x, y, z) (((x) & (z)) | ((y) & (~z)))
#define H(x, y, z) ((x) ^ (y) ^ (z))
#define I(x, y, z) ((y) ^ ((x) | (~z)))
// ROTATE_LEFT rotates x left n bits.
#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
// FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.
// Rotation is separate from addition to prevent recomputation.
#define FF(a, b, c, d, x, s, ac) { \
(a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \
(a) = ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
#define GG(a, b, c, d, x, s, ac) { \
(a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \
(a) = ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
#define HH(a, b, c, d, x, s, ac) { \
(a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \
(a) = ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
#define II(a, b, c, d, x, s, ac) { \
(a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \
(a) = ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
// MD5 initialization. Begins an MD5 operation, writing a new context.
void MD5Init (
MD5_CTX *context ) // context
{
context->count[0] = context->count[1] = 0;
// Load magic initialization constants.
context->state[0] = 0x67452301;
context->state[1] = 0xefcdab89;
context->state[2] = 0x98badcfe;
context->state[3] = 0x10325476;
}
// MD5 block update operation. Continues an MD5 message-digest
// operation, processing another message block, and updating the
// context.
void MD5Update (
MD5_CTX *context, // context
const char *input_, // input block
unsigned int inputLen ) // length of input block
{
unsigned int i, index, partLen;
const uchar* input = (const uchar*)input_;
// Compute number of bytes mod 64
index = (unsigned int)((context->count[0] >> 3) & 0x3F);
// Update number of bits
if ((context->count[0] += ((UINT4)inputLen << 3))
< ((UINT4)inputLen << 3))
context->count[1]++;
context->count[1] += ((UINT4)inputLen >> 29);
partLen = 64 - index;
// Transform as many times as possible.
if (inputLen >= partLen)
{
memcpy
((POINTER)&context->buffer[index], (POINTER)input, partLen);
MD5Transform (context->state, context->buffer);
for (i = partLen; i + 63 < inputLen; i += 64)
MD5Transform (context->state, &input[i]);
index = 0;
}
else
i = 0;
// Buffer remaining input
memcpy
((POINTER)&context->buffer[index], (POINTER)&input[i],
inputLen-i);
}
// MD5 finalization. Ends an MD5 message-digest operation, writing the
// the message digest and zeroizing the context.
void MD5Final (
unsigned char digest[16], // message digest
MD5_CTX *context ) // context
{
uchar bits[8];
unsigned int index, padLen;
// Save number of bits
Encode (bits, context->count, 8);
// Pad out to 56 mod 64.
index = (unsigned int)((context->count[0] >> 3) & 0x3f);
padLen = (index < 56) ? (56 - index) : (120 - index);
MD5Update (context, (const char*)PADDING, padLen);
// Append length (before padding)
MD5Update (context, (const char*)bits, 8);
// Store state in digest
Encode (digest, context->state, 16);
// Zeroize sensitive information.
memset ((POINTER)context, 0, sizeof (*context));
}
// MD5 basic transformation. Transforms state based on block.
static void MD5Transform (
UINT4 state[4],
const uchar block[64] )
{
UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
Decode (x, block, 64);
// Round 1
FF (a, b, c, d, x[ 0], S11, 0xd76aa478); // 1
FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); // 2
FF (c, d, a, b, x[ 2], S13, 0x242070db); // 3
FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); // 4
FF (a, b, c, d, x[ 4], S11, 0xf57c0faf); // 5
FF (d, a, b, c, x[ 5], S12, 0x4787c62a); // 6
FF (c, d, a, b, x[ 6], S13, 0xa8304613); // 7
FF (b, c, d, a, x[ 7], S14, 0xfd469501); // 8
FF (a, b, c, d, x[ 8], S11, 0x698098d8); // 9
FF (d, a, b, c, x[ 9], S12, 0x8b44f7af); // 10
FF (c, d, a, b, x[10], S13, 0xffff5bb1); // 11
FF (b, c, d, a, x[11], S14, 0x895cd7be); // 12
FF (a, b, c, d, x[12], S11, 0x6b901122); // 13
FF (d, a, b, c, x[13], S12, 0xfd987193); // 14
FF (c, d, a, b, x[14], S13, 0xa679438e); // 15
FF (b, c, d, a, x[15], S14, 0x49b40821); // 16
// Round 2
GG (a, b, c, d, x[ 1], S21, 0xf61e2562); // 17
GG (d, a, b, c, x[ 6], S22, 0xc040b340); // 18
GG (c, d, a, b, x[11], S23, 0x265e5a51); // 19
GG (b, c, d, a, x[ 0], S24, 0xe9b6c7aa); // 20
GG (a, b, c, d, x[ 5], S21, 0xd62f105d); // 21
GG (d, a, b, c, x[10], S22, 0x2441453); // 22
GG (c, d, a, b, x[15], S23, 0xd8a1e681); // 23
GG (b, c, d, a, x[ 4], S24, 0xe7d3fbc8); // 24
GG (a, b, c, d, x[ 9], S21, 0x21e1cde6); // 25
GG (d, a, b, c, x[14], S22, 0xc33707d6); // 26
GG (c, d, a, b, x[ 3], S23, 0xf4d50d87); // 27
GG (b, c, d, a, x[ 8], S24, 0x455a14ed); // 28
GG (a, b, c, d, x[13], S21, 0xa9e3e905); // 29
GG (d, a, b, c, x[ 2], S22, 0xfcefa3f8); // 30
GG (c, d, a, b, x[ 7], S23, 0x676f02d9); // 31
GG (b, c, d, a, x[12], S24, 0x8d2a4c8a); // 32
// Round 3
HH (a, b, c, d, x[ 5], S31, 0xfffa3942); // 33
HH (d, a, b, c, x[ 8], S32, 0x8771f681); // 34
HH (c, d, a, b, x[11], S33, 0x6d9d6122); // 35
HH (b, c, d, a, x[14], S34, 0xfde5380c); // 36
HH (a, b, c, d, x[ 1], S31, 0xa4beea44); // 37
HH (d, a, b, c, x[ 4], S32, 0x4bdecfa9); // 38
HH (c, d, a, b, x[ 7], S33, 0xf6bb4b60); // 39
HH (b, c, d, a, x[10], S34, 0xbebfbc70); // 40
HH (a, b, c, d, x[13], S31, 0x289b7ec6); // 41
HH (d, a, b, c, x[ 0], S32, 0xeaa127fa); // 42
HH (c, d, a, b, x[ 3], S33, 0xd4ef3085); // 43
HH (b, c, d, a, x[ 6], S34, 0x4881d05); // 44
HH (a, b, c, d, x[ 9], S31, 0xd9d4d039); // 45
HH (d, a, b, c, x[12], S32, 0xe6db99e5); // 46
HH (c, d, a, b, x[15], S33, 0x1fa27cf8); // 47
HH (b, c, d, a, x[ 2], S34, 0xc4ac5665); // 48
// Round 4
II (a, b, c, d, x[ 0], S41, 0xf4292244); // 49
II (d, a, b, c, x[ 7], S42, 0x432aff97); // 50
II (c, d, a, b, x[14], S43, 0xab9423a7); // 51
II (b, c, d, a, x[ 5], S44, 0xfc93a039); // 52
II (a, b, c, d, x[12], S41, 0x655b59c3); // 53
II (d, a, b, c, x[ 3], S42, 0x8f0ccc92); // 54
II (c, d, a, b, x[10], S43, 0xffeff47d); // 55
II (b, c, d, a, x[ 1], S44, 0x85845dd1); // 56
II (a, b, c, d, x[ 8], S41, 0x6fa87e4f); // 57
II (d, a, b, c, x[15], S42, 0xfe2ce6e0); // 58
II (c, d, a, b, x[ 6], S43, 0xa3014314); // 59
II (b, c, d, a, x[13], S44, 0x4e0811a1); // 60
II (a, b, c, d, x[ 4], S41, 0xf7537e82); // 61
II (d, a, b, c, x[11], S42, 0xbd3af235); // 62
II (c, d, a, b, x[ 2], S43, 0x2ad7d2bb); // 63
II (b, c, d, a, x[ 9], S44, 0xeb86d391); // 64
state[0] += a;
state[1] += b;
state[2] += c;
state[3] += d;
// Zeroize sensitive information.
memset ((POINTER)x, 0, sizeof (x));
}
// Encodes input (UINT4) into output (unsigned char). Assumes len is
// a multiple of 4.
static void Encode (
unsigned char *output,
UINT4 *input,
unsigned int len )
{
unsigned int i, j;
for (i = 0, j = 0; j < len; i++, j += 4) {
output[j] = (unsigned char)(input[i] & 0xff);
output[j+1] = (unsigned char)((input[i] >> 8) & 0xff);
output[j+2] = (unsigned char)((input[i] >> 16) & 0xff);
output[j+3] = (unsigned char)((input[i] >> 24) & 0xff);
}
}
// Decodes input (unsigned char) into output (UINT4). Assumes len is
// a multiple of 4.
static void Decode (
UINT4 *output,
const uchar *input,
unsigned int len )
{
unsigned int i, j;
for (i = 0, j = 0; j < len; i++, j += 4)
output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) |
(((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24);
}
void digest2ascii ( char *ascii, const unsigned char *digest )
{
int i;
static char* table = "0123456789abcdef";
for ( i = 0; i < 16; i++ )
{
*ascii++ = table[(*digest)>>4];
*ascii++ = table[(*digest++)%16];
}
*ascii++ = 0;
}
void ascii2digest ( unsigned char *digest, const char *ascii )
{
int i;
#define CONV(c) (unsigned char)( (toupper(c)>='A') ? (toupper(c)+10-'A') : ((c)-'0') )
#define MAKECHAR(a,b) ((CONV(a)%16)<<4)|(CONV(b)%16)
for ( i = 0; i < 16; i++ )
{
*digest++ = MAKECHAR(ascii[0],ascii[1]);
ascii += 2;
}
}
#ifdef __cplusplus
MD5::MD5()
{
Init();
}
void MD5::Init()
{
MD5Init(&_ctx);
}
void MD5::Update ( const string& s )
{
MD5Update ( &_ctx, s.c_str(), s.size() );
}
string MD5::Final ( char* digest )
{
vector<uchar> v;
v.resize(16);
MD5Final ( &v[0], &_ctx );
if ( digest )
memmove ( digest, &v[0], 16 );
string s;
static char* tohex = "0123456789abcdef";
for ( int i = 0; i < 16; i++ )
{
uchar c = v[i];
s += tohex[ (c>>4) & 0xF ];
s += tohex[ c & 0xF ];
}
return s;
}
string MD5Hex ( const string& s )
{
MD5 md5;
md5.Update ( s );
return md5.Final();
}
string MD5Bin ( const string& s )
{
MD5 md5;
md5.Update ( s );
char digest[16];
md5.Final ( digest );
return string ( digest, 16 );
}
string HMAC_MD5 ( const string& key, const string& text, char* out_bin )
{
MD5 md5;
char k_ipad[65]; // inner padding - key XORd with ipad
char k_opad[65]; // outer padding - key XORd with opad
string tmp;
char digest[16];
int i;
// if key is longer than 64 bytes reset it to key=MD5(key)
if ( key.length() > 64 )
{
md5.Init();
md5.Update ( key );
md5.Final ( digest );
tmp = string ( digest, 16 );
}
else
tmp = key;
// start out by storing key in pads
memset ( k_ipad, 0, sizeof(k_ipad) );
memset ( k_opad, 0, sizeof(k_opad) );
memcpy ( k_ipad, tmp.c_str(), tmp.length() );
memcpy ( k_opad, tmp.c_str(), tmp.length() );
// XOR key with ipad and opad values
for ( i=0; i<64; i++ )
{
k_ipad[i] ^= 0x36;
k_opad[i] ^= 0x5c;
}
// "inner" MD5
md5.Init();
md5.Update(k_ipad);
md5.Update(text);
md5.Final ( digest );
// "outer" MD5
md5.Init();
md5.Update(k_opad);
md5.Update(string(digest,16));
return md5.Final(out_bin);
}
#endif//__cplusplus

View File

@@ -1,95 +0,0 @@
// MD5.H - header file for MD5.CPP
/*
Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
rights reserved.
License to copy and use this software is granted provided that it
is identified as the "RSA Data Security, Inc. MD5 Message-Digest
Algorithm" in all material mentioning or referencing this software
or this function.
License is also granted to make and use derivative works provided
that such works are identified as "derived from the RSA Data
Security, Inc. MD5 Message-Digest Algorithm" in all material
mentioning or referencing the derived work.
RSA Data Security, Inc. makes no representations concerning either
the merchantability of this software or the suitability of this
software for any particular purpose. It is provided "as is"
without express or implied warranty of any kind.
These notices must be retained in any copies of any part of this
documentation and/or software.
*/
#ifndef __MD5_H
#define __MD5_H
#ifdef __cplusplus
#include <string>
#endif//__cplusplus
#ifndef uchar
#define uchar unsigned char
#endif//uchar
#ifndef ushort
#define ushort unsigned short
#endif//ushort
#ifndef ulong
#define ulong unsigned long
#endif//ulong
#ifdef __cplusplus
extern "C" {
#endif//__cplusplus
typedef uchar *POINTER; // POINTER defines a generic pointer type
typedef ushort UINT2; // UINT2 defines a two byte word
typedef ulong UINT4; // UINT4 defines a four byte word
// MD5 context.
typedef struct
{
UINT4 state[4]; // state (ABCD)
UINT4 count[2]; // number of bits, modulo 2^64 (lsb first)
unsigned char buffer[64]; // input buffer
} MD5_CTX;
void MD5Init ( MD5_CTX * );
void MD5Update ( MD5_CTX *, const char *, unsigned int );
void MD5Final ( uchar [16], MD5_CTX * );
void digest2ascii ( char *ascii, const uchar *digest );
void ascii2digest ( uchar *digest, const char *ascii );
#ifdef __cplusplus
} // extern "C"
class MD5
{
public:
MD5();
void Init();
void Update ( const std::string& s );
std::string Final ( char* digest = 0 );
private:
MD5_CTX _ctx;
};
std::string MD5Hex ( const std::string& s );
std::string MD5Bin ( const std::string& s );
std::string HMAC_MD5 (
const std::string& key,
const std::string& text,
char* out_bin = NULL );
#endif//__cplusplus
#endif//__MD5_H

View File

@@ -1,315 +0,0 @@
/*
** Author: Samuel R. Blackburn
** Internet: wfc@pobox.com
**
** You can use it any way you like as long as you don't try to sell it.
**
** Any attempt to sell WFC in source code form must have the permission
** of the original author. You can produce commercial executables with
** WFC but you can't sell WFC.
**
** Copyright, 2000, Samuel R. Blackburn
**
** NOTE: I modified the info block below so it hopefully wouldn't conflict
** with the original file. Royce Mitchell III
*/
#ifndef QUEUET_CLASS_HEADER
#define QUEUET_CLASS_HEADER
#include "ReliMT.h"
#ifdef WIN32
#include <sys/types.h> // off_t
#define HEAPCREATE(size) m_Heap = ::HeapCreate ( HEAP_NO_SERIALIZE, size, 0 )
#define HEAPALLOC(size) ::HeapAlloc ( m_Heap, HEAP_NO_SERIALIZE, size )
#define HEAPREALLOC(p,size) ::HeapReAlloc( m_Heap, HEAP_NO_SERIALIZE, p, size )
#define HEAPFREE(p) ::HeapFree ( m_Heap, HEAP_NO_SERIALIZE, p )
#define HEAPDESTROY() ::HeapDestroy ( m_Heap ); m_Heap = 0;
#else
#define HEAPCREATE(size)
#define HEAPALLOC(size) malloc(size)
#define HEAPREALLOC(p,size) realloc(p,size);
#define HEAPFREE(p) free(p)
#define HEAPDESTROY()
#endif
template <class T>
class CQueueT : public Uncopyable
{
protected:
// What we want to protect
Mutex m_AddMutex;
Mutex m_GetMutex;
T* m_Items;
off_t m_AddIndex;
off_t m_GetIndex;
size_t m_Size;
#ifdef WIN32
HANDLE m_Heap;
#endif//WIN32
inline void m_GrowBy ( size_t number_of_new_items );
public:
inline CQueueT ( size_t initial_size = 1024 );
inline ~CQueueT();
inline bool Add( const T& new_item );
inline void Empty() { m_AddIndex = 0; m_GetIndex = 0; };
inline bool Get( T& item );
inline size_t GetLength() const;
inline size_t GetMaximumLength() const { return( m_Size ); };
inline bool AddArray ( const T* new_items, int item_count );
inline int GetArray ( T* items, const int maxget, const T& tEnd );
inline bool Contains ( const T& t );
};
template <class T>
inline CQueueT<T>::CQueueT ( size_t initial_size )
{
m_AddIndex = 0;
m_GetIndex = 0;
m_Items = NULL;
if ( initial_size == 0 )
initial_size = 1;
/*
** 1999-11-05
** We create our own heap because all of the pointers used are allocated
** and freed be us. We don't have to worry about a non-serialized thread
** accessing something we allocated. Because of this, we can perform our
** memory allocations in a heap dedicated to queueing. This means when we
** have to allocate more memory, we don't have to wait for all other threads
** to pause while we allocate from the shared heap (like the C Runtime heap)
*/
HEAPCREATE( ( ( ( 2 * initial_size * sizeof(T) ) < 65536 ) ? 65536 : (2 * initial_size * sizeof(T) ) ) );
m_Items = (T*)HEAPALLOC ( initial_size * sizeof(T) );
m_Size = ( m_Items == NULL ) ? 0 : initial_size;
}
template <class T>
inline CQueueT<T>::~CQueueT()
{
m_AddIndex = 0;
m_GetIndex = 0;
m_Size = 0;
if ( m_Items != NULL )
{
HEAPFREE(m_Items);
m_Items = NULL;
}
HEAPDESTROY();
}
template <class T>
inline bool CQueueT<T>::Add ( const T& item )
{
// Block other threads from entering Add();
Mutex::Lock addlock ( m_AddMutex );
// Add the item
m_Items[ m_AddIndex ] = item;
// 1999-12-08
// Many many thanks go to Lou Franco (lfranco@spheresoft.com)
// for finding an bug here. It rare but recreatable situations,
// m_AddIndex could be in an invalid state.
// Make sure m_AddIndex is never invalid
off_t new_add_index = ( ( m_AddIndex + 1 ) >= (off_t)m_Size ) ? 0 : m_AddIndex + 1;
if ( new_add_index == m_GetIndex )
{
// The queue is full. We need to grow.
// Stop anyone from getting from the queue
Mutex::Lock getlock ( m_GetMutex );
m_AddIndex = new_add_index;
// One last double-check.
if ( m_AddIndex == m_GetIndex )
{
m_GrowBy ( m_Size );
}
}
else
{
m_AddIndex = new_add_index;
}
return true;
}
template <class T>
inline bool CQueueT<T>::Get( T& item )
{
// Prevent other threads from entering Get()
Mutex::Lock getlock ( m_GetMutex );
if ( m_GetIndex == m_AddIndex )
{
// Let's check to see if our queue has grown too big
// If it has, then shrink it
if ( m_Size > 1024 )
{
// Yup, we're too big for our britches
Mutex::TryLock addlock ( m_AddMutex );
if ( addlock )
{
// Now, no one can add to the queue
if ( m_GetIndex == m_AddIndex ) // is queue empty?
{
// See if we can just shrink it...
T* return_value = (T*)HEAPREALLOC(m_Items,1024 * sizeof(T));
if ( return_value != NULL )
{
m_Items = (T*) return_value;
}
else
{
// Looks like we'll have to do it the hard way
HEAPFREE ( m_Items );
m_Items = (T*) HEAPALLOC ( 1024 * sizeof(T) );
}
m_Size = ( m_Items == NULL ) ? 0 : 1024;
m_AddIndex = 0;
m_GetIndex = 0;
}
else
{
// m_GetIndex != m_AddIndex, this means that someone added
// to the queue between the time we checked m_Size for being
// too big and the time we entered the add critical section.
// If this happened then we are too busy to shrink
}
}
}
return false;
}
item = m_Items[ m_GetIndex ];
// Make sure m_GetIndex is never invalid
m_GetIndex = ( ( m_GetIndex + 1 ) >= (off_t)m_Size ) ? 0 : m_GetIndex + 1;
return true;
}
template <class T>
inline int CQueueT<T>::GetArray ( T* items, const int maxget, const T& tEnd )
{
// TODO - oooh baby does this need to be optimized
// Prevent other threads from entering Get()
Mutex::Lock getlock ( m_GetMutex ); //::EnterCriticalSection( &m_GetCriticalSection );
int iResult = 0;
for ( int i = 0; i < maxget; i++ )
{
if ( !Get(items[i]) )
break;
iResult++;
if ( items[i] == tEnd )
break;
}
// Let other threads call Get() now
//::LeaveCriticalSection( &m_GetCriticalSection );
return iResult;
}
template <class T>
inline size_t CQueueT<T>::GetLength() const
{
// This is a very expensive process!
// No one can call Add() or Get() while we're computing this
size_t number_of_items_in_the_queue = 0;
Mutex::Lock addlock ( m_AddMutex );
Mutex::Lock getlock ( m_GetMutex );
number_of_items_in_the_queue = ( m_AddIndex >= m_GetIndex ) ?
( m_AddIndex - m_GetIndex ) :
( ( m_AddIndex + m_Size ) - m_GetIndex );
return number_of_items_in_the_queue;
}
template <class T>
inline void CQueueT<T>::m_GrowBy ( size_t number_of_new_items )
{
// Prevent other threads from calling Get().
// We don't need to enter the AddCriticalSection because
// m_GrowBy() is only called from Add();
T* new_array = NULL;
T* pointer_to_free = NULL;
size_t new_size = m_Size + number_of_new_items;
{ // Prevent other threads from getting
Mutex::Lock getlock ( m_GetMutex );
// 2000-05-16
// Thanks go to Royce Mitchell III (royce3@aim-controls.com) for finding
// a HUGE bug here. I was using HeapReAlloc as a short cut but my logic
// was flawed. In certain circumstances, queue items were being dropped.
new_array = (T*)HEAPALLOC ( new_size * sizeof(T) );
// Now copy all of the old items from the old queue to the new one.
// Get the entries from the get-index to the end of the array
memcpy ( new_array, &m_Items[m_GetIndex], ( m_Size - m_GetIndex ) * sizeof(T) );
// Get the entries from the beginning of the array to the add-index
memcpy ( &new_array[m_Size-m_GetIndex], m_Items, m_AddIndex * sizeof(T) );
m_AddIndex = (off_t)m_Size;
m_GetIndex = 0;
m_Size = new_size;
pointer_to_free = m_Items;
m_Items = new_array;
} // Mutex::Lock
HEAPFREE ( pointer_to_free );
}
template <class T>
inline bool CQueueT<T>::Contains ( const T& t )
{
Mutex::Lock addlock ( m_AddMutex );
Mutex::Lock getlock ( m_GetMutex );
for ( int i = m_GetIndex; i != m_AddIndex; i++ )
{
if ( i == m_Size )
i = 0;
if ( m_Items[i] == t )
return true;
}
return m_Items[m_AddIndex] == t;
}
typedef CQueueT<char> CCharQueue;
#endif // QUEUE_CLASS_HEADER

View File

@@ -1,143 +0,0 @@
// Reli.h
// lots of code here is (c) Bartosz Milewski, 1996, www.relisoft.com
// The rest is (C) 2002-2004 Royce Mitchell III
// and released under the LGPL & BSD licenses
#ifndef __RELI_H
#define __RELI_H
////////////////////////////////////////////////////////////////////////////////
// Assert
#undef Assert
#ifdef NDEBUG
#define Assert(exp) ((void)0)
#else
void _wassert (char* szExpr, char* szFile, int line);
#define Assert(exp) (void)( (exp) || (_wassert(#exp, __FILE__, __LINE__), 0) )
#endif /* NDEBUG */
////////////////////////////////////////////////////////////////////////////////
// Swap
template <class T>
void Swap(T a,T b)
{
T t = a;
a = b;
b = t;
}
////////////////////////////////////////////////////////////////////////////////
// Uncopyable - base class disabling copy ctors
class Uncopyable
{
public:
Uncopyable(){} // need a default ctor
private:
Uncopyable ( const Uncopyable& );
const Uncopyable& operator = ( const Uncopyable& );
};
////////////////////////////////////////////////////////////////////////////////
// SPtr - Smart Pointer's must be passed by reference or const reference
template <class T>
class SPtr : public Uncopyable
{
public:
virtual ~SPtr () { Destroy(); }
T * operator->() { return _p; }
T const * operator->() const { return _p; }
operator T&() { Assert(_p); return *_p; }
operator const T&() const { Assert(_p); return *_p; }
void Acquire ( SPtr<T>& t ) { Destroy(); Swap(_p,t._p); }
void Destroy() { if ( _p ) { delete _p; _p = 0; } }
protected:
SPtr (): _p (0) {}
explicit SPtr (T* p): _p (p) {}
T * _p;
private:
operator T* () { return _p; }
};
#define DECLARE_SPTR(cls,init,init2) \
class S##cls : public SPtr<cls> \
{ \
public: \
S##cls ( cls* p ) : SPtr<cls>(p) {} \
explicit S##cls init : SPtr<cls> (new cls init2) {} \
};
/* Example Usage of DECLARE_SPTR:
class MyClass
{
public: // can be protected
MyClass ( int i )
{
...
}
...
}; DECLARE_SPTR(MyClass,(int i),(i))
SMyClass ptr(i);
*/
#define DECLARE_SPTRV(cls) typedef SPtr<cls> S##cls;
/* Example Usage of DECLARE_SPTRV:
class MyAbstractClass
{
public: // can be protected
MyAbstractClass ( int i )
{
...
}
void MyPureVirtFunc() = 0;
...
}; DECLARE_SPTRV(MyAbstractClass)
SMyAbstractClass ptr ( new MySubClass(i) );
*/
#define DECLARE_PTR(cls,init,init2) \
class Ptr : public SPtr<cls> \
{ \
Ptr(cls* p) : SPtr<cls> ( p ) \
{ \
} \
Ptr init : SPtr<cls> ( new cls init2 ) {} \
};
/* Example Usage of DECLARE_PTR:
class MyClass
{
DECLARE_PTR(MyClass,(int i),(i))
public: // can be protected
MyClass ( int i )
{
...
}
void MyPureVirtFunc() = 0;
...
};
MyClass::Ptr ptr ( i );
*/
#define DECLARE_PTRV(cls) \
class Ptr : public SPtr<cls> \
{ \
Ptr(cls* p) : SPtr<cls> ( p ) \
{ \
} \
};
/* Example Usage of DECLARE_PTRV:
class MyAbstractClass
{
DECLARE_PTRV(MyAbstractClass)
public: // can be protected
MyAbstractClass ( int i )
{
...
}
void MyPureVirtFunc() = 0;
...
};
MyAbstractClass::Ptr ptr ( new MySubClass(i) );
*/
#endif//__RELI_H

View File

@@ -1,331 +0,0 @@
// ReliMT.cpp
// lots of code here is (c) Bartosz Milewski, 1996, www.relisoft.com
// The rest is (C) 2002-2004 Royce Mitchell III
// and released under the LGPL & BSD licenses
#include <stdlib.h>
#include <stdio.h>
#ifdef WIN32
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# define snprintf _snprintf
#elif defined(UNIX)
# include <errno.h>
# include <sys/sem.h>
#else
# error unrecognized target
#endif//WIN32|UNIX
#include "verify.h"
#include "ReliMT.h"
////////////////////////////////////////////////////////////////////////////////
// Assert
void _wassert ( char* szExpr, char* szFile, int line )
{
fprintf ( stderr, "Assertion Failure: \"%s\" in file %s, line %d", szExpr, szFile, line );
exit (-1);
}
////////////////////////////////////////////////////////////////////////////////
// Thread
Thread::Thread ( long (THREADAPI * pFun) (void* arg), void* pArg )
{
#ifdef WIN32
verify ( _handle = CreateThread (
0, // Security attributes
0, // Stack size
(DWORD (WINAPI*)(void*))pFun,
pArg,
0, // don't create suspended.
&_tid ));
#elif defined(UNIX)
// set up the thread attribute: right now, we do nothing with it.
pthread_attr_t attr;
pthread_attr_init(&attr);
// this will make the threads created by this process really concurrent
verify ( !pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM) );
// create the new OS thread object
verify ( !pthread_create ( &_threadId, &attr, (void* (*) (void*))pFun, pArg ) );
verify ( !pthread_attr_destroy(&attr) );
#else
# error unrecognized target
#endif//WIN32|UNIX
}
Thread::~Thread()
{
#ifdef WIN32
verify ( CloseHandle ( _handle ) );
#elif defined(UNIX)
verify ( !pthread_cancel ( _threadId ) );
#else
# error unrecognized target
#endif//WIN32|UNIX
}
/*void Thread::Resume()
{
#ifdef WIN32
ResumeThread (_handle);
#elif defined(UNIX)
# error how to resume thread in unix?
#else
# error unrecognized target
#endif//WIN32|UNIX
}*/
void Thread::WaitForDeath()
{
#ifdef WIN32
DWORD dw = WaitForSingleObject ( _handle, 2000 );
ASSERT ( dw != WAIT_FAILED );
#elif defined(UNIX)
verify ( !pthread_join ( _threadId, (void**)NULL ) );
#else
# error unrecognized target
#endif//WIN32|UNIX
}
////////////////////////////////////////////////////////////////////////////////
// ActiveObject
// The constructor of the derived class
// should call
// _thread.Resume();
// at the end of construction
ActiveObject::ActiveObject() : _isDying (0), _thread (0)
{
}
ActiveObject::~ActiveObject()
{
ASSERT ( !_thread ); // call Kill() from subclass's dtor
// Kill() - // You can't call a virtual function from a dtor, EVEN INDIRECTLY
// so, you must call Kill() in the subclass's dtor
}
// FlushThread must reset all the events on which the thread might be waiting.
void ActiveObject::Kill()
{
if ( _thread )
{
_isDying++;
FlushThread();
// Let's make sure it's gone
_thread->WaitForDeath();
delete _thread;
_thread = 0;
}
}
void ActiveObject::Start()
{
ASSERT ( !_thread );
_thread = new Thread ( ThreadEntry, this );
}
long THREADAPI ActiveObject::ThreadEntry ( void* pArg )
{
ActiveObject * pActive = (ActiveObject*)pArg;
pActive->InitThread();
pActive->Run();
pActive->Kill();
return 0;
}
///////////////////////////////////////////////////////////////////////////////
// Mutex
Mutex::Mutex()
{
#ifdef WIN32
verify ( _h = CreateMutex ( NULL, FALSE, NULL ) );
#elif defined(UNIX)
pthread_mutexattr_t attrib;
verify ( !pthread_mutexattr_init( &attrib ) );
// allow recursive locks
verify ( !pthread_mutexattr_settype( &attrib, PTHREAD_MUTEX_RECURSIVE ) );
verify ( !pthread_mutex_init ( &_mutex, &attrib ) );
#else
# error unrecognized target
#endif
}
Mutex::~Mutex()
{
#ifdef WIN32
verify ( CloseHandle ( _h ) );
#elif defined(UNIX)
verify ( !pthread_mutex_destroy(&_mutex) );
#else
# error unrecognized target
#endif
}
void Mutex::Acquire()
{
#ifdef WIN32
DWORD dw = WaitForSingleObject ( _h, INFINITE );
ASSERT ( dw == WAIT_OBJECT_0 || dw == WAIT_ABANDONED );
#elif defined(UNIX)
verify ( !pthread_mutex_lock(&_mutex) );
#else
# error unrecognized target
#endif
}
bool Mutex::TryAcquire()
{
#ifdef WIN32
DWORD dw = WaitForSingleObject ( _h, 1 );
ASSERT ( dw == WAIT_OBJECT_0 || dw == WAIT_TIMEOUT || dw == WAIT_ABANDONED );
return (dw != WAIT_TIMEOUT);
#elif defined(UNIX)
int err = pthread_mutex_trylock(&_mutex);
ASSERT ( err == EBUSY || err == 0 );
return (err == 0);
#else
# error unrecognized target
#endif
}
void Mutex::Release()
{
#ifdef WIN32
verify ( ReleaseMutex ( _h ) );
#elif defined(UNIX)
verify ( !pthread_mutex_unlock(&_mutex) );
// we could allow EPERM return value too, but we are forcing user into RIIA
#else
# error unrecognized target
#endif
}
Mutex::Lock::Lock ( Mutex& m ) : _m(m)
{
_m.Acquire();
}
Mutex::Lock::~Lock()
{
_m.Release();
}
Mutex::TryLock::TryLock ( Mutex& m ) : _m(m)
{
_bLocked = _m.TryAcquire();
}
Mutex::TryLock::~TryLock()
{
if ( _bLocked )
_m.Release();
}
///////////////////////////////////////////////////////////////////////////////
// Event
Event::Event()
{
#ifdef WIN32
// start in non-signaled state (red light)
// auto reset after every Wait
verify ( _handle = CreateEvent ( 0, FALSE, FALSE, 0 ) );
#elif defined(UNIX)
//verify ( !pthread_cond_init ( &_cond, NULL /* default attributes */) );
sem_init();
//verify(sem_init());
#else
# error unrecognized target
#endif
}
Event::~Event()
{
#ifdef WIN32
verify ( CloseHandle ( _handle ) );
#elif defined(UNIX)
//verify ( !pthread_cond_destroy ( &_cond ) );
sem_destroy();
#else
# error unrecognized target
#endif
}
void Event::Release() // put into signaled state
{
#ifdef WIN32
verify ( SetEvent ( _handle ) );
#elif defined(UNIX)
//verify ( !pthread_cond_signal ( &_cond ) );
verify(!sem_V());
#else
# error unrecognized target
#endif
}
void Event::Wait()
{
#ifdef WIN32
// Wait until event is in signaled (green) state
DWORD dw = WaitForSingleObject ( _handle, INFINITE );
ASSERT ( dw == WAIT_OBJECT_0 || dw == WAIT_ABANDONED );
#elif defined(UNIX)
// According to docs: The pthread_cond_wait() and pthread_cond_timedwait()
// functions are used to block on a condition variable. They are called
// with mutex locked by the calling thread or undefined behaviour will
// result.
//Mutex::Lock lock ( _mutex );
//verify ( !pthread_cond_wait ( &_cond, _mutex ) );
verify(!sem_P());
#else
# error unrecognized target
#endif
}
#ifdef UNIX
void Event::sem_init()
{
sem_id = semget(IPC_PRIVATE, 1, 0666 | IPC_CREAT);
ASSERT(sem_id != -1);
}
int Event::sem_P()
{
struct sembuf sb;
sb.sem_num = 0;
sb.sem_op = -1;
sb.sem_flg = 0;
return semop(sem_id, &sb, 1);
}
int Event::sem_V()
{
struct sembuf sb;
sb.sem_num = 0;
sb.sem_op = 1;
sb.sem_flg = 0;
return semop(sem_id, &sb, 1);
}
void Event::sem_destroy()
{
#ifdef MACOSX
semun mactmp;
mactmp.val = 0;
semctl(sem_id, 0, IPC_RMID, mactmp);
#else
semctl(sem_id, 0, IPC_RMID, 0);
#endif
}
#endif

View File

@@ -1,229 +0,0 @@
// ReliMT.h
// lots of code here is (c) Bartosz Milewski, 1996, www.relisoft.com
// The rest is (C) 2003-2004 Royce Mitchell III
// and released under the LGPL & BSD licenses
#ifndef __RELIMT_H
#define __RELIMT_H
#include "Reli.h"
#ifdef WIN32
# ifndef _WINDOWS_
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# endif
# define THREADAPI WINAPI
#elif defined(UNIX)
# include <pthread.h>
# include <stdlib.h>
# include "string.h"
# include <sys/types.h> //Semaphore
# include <sys/ipc.h> //Semaphore
# include <sys/sem.h> //Semaphore
# define THREADAPI
#else
# error unrecognized target
#endif
////////////////////////////////////////////////////////////////////////////////
// Thread
class Thread : public Uncopyable
{
public:
Thread ( long (THREADAPI * pFun) (void* arg), void* pArg );
~Thread();
//void Resume();
void WaitForDeath();
// platform-specific stuff:
private:
#ifdef WIN32
HANDLE _handle;
DWORD _tid; // thread id
#elif defined(UNIX)
pthread_t _threadId; // id of the thread
#else
# error unrecognized target
#endif
//DECLARE_PTR(Thread,(long (THREADAPI * pFun) (void* arg), void* pArg),(pFun,pArg));
}; //DECLARE_SPTR(Thread,(long (THREADAPI * pFun) (void* arg), void* pArg),(pFun,pArg));
////////////////////////////////////////////////////////////////////////////////
// ActiveObject
class ActiveObject : public Uncopyable
{
public:
ActiveObject();
virtual ~ActiveObject();
void Kill();
void Start();
protected:
virtual void InitThread() = 0;
virtual void Run() = 0;
virtual void FlushThread() = 0;
int _isDying;
static long THREADAPI ThreadEntry ( void *pArg );
Thread *_thread;
//DECLARE_PTRV(ActiveObject);
}; //DECLARE_SPTRV(ActiveObject);
// Last thing in the constructor of a class derived from
// ActiveObject you must call
// Start();
// Inside the loop the Run method you must keep checking _isDying
// if (_isDying)
// return;
// FlushThread must reset all the events on which the thread might be waiting.
// Example:
#if 0
// MyAsyncOutputter - class that outputs strings to a file asynchronously
class MyAsyncOutputter : public ActiveObject
{
public:
MyAsyncOutputter ( const string& filename ) : _filename(filename), _currentBuf(0)
{
Start(); // start thread
}
void InitThread()
{
_f.open ( _filename, "wb" );
}
void Output ( const string& s )
{
{
// acquire lock long enough to add the string to the active buffer
Mutex::Lock lock ( _mutex );
_buf[_currentBuf].push_back ( s );
}
_event.Release(); // don't need the lock fire the event
}
void Run()
{
while ( !_isDying )
{
// wait for signal from Output() or FlushThread()
_event.Wait();
{
// acquire lock long enough to switch active buffers
Mutex::Lock lock ( _mutex );
_currentBuf = 1-_currentBuf;
ASSERT ( !_buf[_currentBuf].size() );
}
// get a reference to the old buffer
vector<string>& buf = _buf[1-_currentBuf];
// write each string out to file and then empty the buffer
for ( int i = 0; i < buf.size(); i++ )
_f.write ( buf[i].c_str(), buf[i].size() );
buf.resize(0);
}
}
void FlushThread()
{
// _isDying is already set: signal thread so it can see that too
_event.Release();
}
private:
string _filename;
File _f;
int _currentBuf;
vector<string> _buf[2];
Event _event;
Mutex _mutex;
};
#endif
////////////////////////////////////////////////////////////////////////////////
// Mutex
class Mutex : public Uncopyable
{
public:
Mutex();
~Mutex();
private:
void Acquire();
bool TryAcquire();
void Release();
public:
// sub-class used to lock the Mutex
class Lock : public Uncopyable
{
public:
Lock ( Mutex& m );
~Lock();
private:
// private data
Mutex& _m;
};
friend class Mutex::Lock;
// sub-class used to attempt to lock the mutex. Use operator bool()
// to test if the lock was successful
class TryLock : public Uncopyable
{
public:
TryLock ( Mutex& m );
~TryLock();
operator bool () { return _bLocked; }
private:
// private data
bool _bLocked;
Mutex& _m;
};
friend class Mutex::TryLock;
private:
// platform-specific stuff:
#ifdef WIN32
HANDLE _h;
#elif defined(UNIX)
pthread_mutex_t _mutex;
public: operator pthread_mutex_t* () { return &_mutex; }
#else
# error unrecognized target
#endif
};
////////////////////////////////////////////////////////////////////////////////
// Event
class Event : public Uncopyable
{
public:
Event();
~Event();
void Release(); // put into signaled state
void Wait();
private:
#ifdef WIN32
HANDLE _handle;
#elif defined(UNIX)
//Sem util functions
void sem_init();
int sem_P();
int sem_V();
void sem_destroy();
int sem_id;
//pthread_cond_t _cond;
//Mutex _mutex;
#else
# error unrecognized target
#endif
//DECLARE_PTR(Event,(),());
}; //DECLARE_SPTR(Event,(),());
#endif//__RELIWIN32_H

View File

@@ -1,504 +0,0 @@
// SockUtils.cpp - Some basic socket utility functions.
// (C) 2002-2004 Royce Mitchell III
// This file is under the BSD & LGPL licenses
#include <stdio.h>
#include "SockUtils.h"
#ifdef WIN32
# ifndef SD_SEND // defined in winsock2.h, but not winsock.h
# define SD_SEND 1
# endif
# define snprintf _snprintf
# ifdef _MSC_VER
# pragma comment ( lib, "ws2_32.lib" )
# endif//_MSC_VER
#elif defined(UNIX)
# include <errno.h>
# include "string.h" // memset
# include <netdb.h> // hostent
# include <arpa/inet.h> //inet_addr
# include <sys/time.h>
# define SD_SEND SHUT_WR //bah thou shalt name thy defines the same
#else
# error unrecognized target
#endif
//// Constants /////////////////////////////////////////////////////////
const int kBufferSize = 1024;
// creates broadcast address
SockAddrIn::SockAddrIn()
{
memset ( this, 0, sizeof(sockaddr_in) );
sin_family = AF_INET;
}
SockAddrIn::SockAddrIn ( const char* szAddr, u_short iPort )
{
memset ( this, 0, sizeof(sockaddr_in) );
sin_family = AF_INET;
sin_addr.s_addr = suLookupAddress(szAddr);
sin_port = htons(iPort);
}
SockAddrIn::SockAddrIn ( in_addr_t iAddr, u_short iPort )
{
memset ( this, 0, sizeof(sockaddr_in) );
sin_family = AF_INET;
sin_addr.s_addr = iAddr;
sin_port = htons(iPort);
}
bool suStartup()
{
#ifdef WIN32
WSADATA wsaData;
if ( WSAStartup ( MAKEWORD(2,0), &wsaData ) )
return false;
if ( wsaData.wVersion != MAKEWORD(2,0) )
{
WSACleanup();
return false;
}
return true;
#elif defined(UNIX)
// nothing special required here
return true;
#else
# error unrecognized target
#endif
}
//// suTcpSocket ////////////////////////////////////////////////
// Creates a TCP socket.
SOCKET suTcpSocket()
{
SOCKET so = socket ( AF_INET, SOCK_STREAM, 0 );
#if defined(_DEBUG) && defined(WIN32)
if ( so == INVALID_SOCKET && WSANOTINITIALISED == WSAGetLastError() )
MessageBox ( NULL, "You forgot to call suStartup()!", "SockUtils", MB_OK|MB_ICONEXCLAMATION );
#endif
return so;
}
//// suUdpSocket ////////////////////////////////////////////////
// Creates a UDP socket. Compensates for new "functionality" introduced
// in Win2K with regards to select() calls
// MS Transport Provider IOCTL to control
// reporting PORT_UNREACHABLE messages
// on UDP sockets via recv/WSARecv/etc.
// Path TRUE in input buffer to enable (default if supported),
// FALSE to disable.
#ifndef SIO_UDP_CONNRESET
#define SIO_UDP_CONNRESET _WSAIOW(IOC_VENDOR,12)
#endif//SIO_UDP_CONNRESET
SOCKET suUdpSocket()
{
SOCKET so = socket ( AF_INET, SOCK_DGRAM, 0 );
#if defined(_DEBUG) && defined(WIN32)
if ( so == INVALID_SOCKET && WSANOTINITIALISED == WSAGetLastError() )
MessageBox ( NULL, "You forgot to call suStartup()!", "SockUtils", MB_OK|MB_ICONEXCLAMATION );
#endif
#ifdef WIN32
// for Windows 2000, disable new behavior...
// see: http://www-pc.uni-regensburg.de/systemsw/W2KPRO/UPDATE/POSTSP1/Q263823.htm
// this code is innocuous on other win32 platforms
DWORD dwBytesReturned = 0;
BOOL bNewBehavior = FALSE;
// disable new Win2K behavior using
// IOCTL: SIO_UDP_CONNRESET
// we don't care about return value :)
WSAIoctl(so, SIO_UDP_CONNRESET,
&bNewBehavior, sizeof(bNewBehavior),
NULL, 0, &dwBytesReturned,
NULL, NULL);
#endif
return so;
}
//// suShutdownConnection ////////////////////////////////////////////////
// Gracefully shuts the connection sd down. Returns true if it was able
// to shut it down nicely, false if we had to "slam" it shut.
// (either way, the socket does get closed)
bool suShutdownConnection(SOCKET sd)
{
if ( sd == INVALID_SOCKET )
return true;
// Disallow any further data sends. This will tell the other side
// that we want to go away now. If we skip this step, we don't
// shut the connection down nicely.
if (shutdown(sd, SD_SEND) == SOCKET_ERROR)
{
closesocket(sd);
return false;
}
// Receive any extra data still sitting on the socket. After all
// data is received, this call will block until the remote host
// acknowledges the TCP control packet sent by the shutdown above.
// Then we'll get a 0 back from recv, signalling that the remote
// host has closed its side of the connection.
char acReadBuffer[kBufferSize];
for ( ;; )
{
int nNewBytes = recv(sd, acReadBuffer, kBufferSize, 0);
if (nNewBytes == SOCKET_ERROR)
{
closesocket(sd);
return false;
}
else if (nNewBytes != 0)
{
// FYI, received (nNewBytes) unexpected bytes during shutdown.
}
else
{
// Okay, we're done!
break;
}
}
// Close the socket.
if (closesocket(sd) == SOCKET_ERROR)
{
return false;
}
return true;
}
//// suLookupAddress ////////////////////////////////////////////////
// Basically converts a name address to an ip address
in_addr_t suLookupAddress ( const char* pcHost )
{
in_addr_t nRemoteAddr = inet_addr(pcHost);
if ( nRemoteAddr == INADDR_NONE )
{
// pcHost isn't a dotted IP, so resolve it through DNS
hostent* pHE = gethostbyname(pcHost);
if ( pHE == 0 )
{
#if defined(_DEBUG) && defined(WIN32)
if ( WSANOTINITIALISED == WSAGetLastError() )
MessageBox ( NULL, "You forgot to call suStartup()!", "SockUtils", MB_OK|MB_ICONEXCLAMATION );
#endif
return INADDR_NONE;
}
nRemoteAddr = *((in_addr_t*)pHE->h_addr_list[0]);
}
return nRemoteAddr;
}
bool suConnect ( SOCKET so, in_addr_t iAddress, u_short iPort )
{
SockAddrIn sinRemote ( iAddress, iPort );
if ( SOCKET_ERROR == connect(so,sinRemote,sizeof(sinRemote)) )
{
#if defined(_DEBUG) && defined(WIN32)
if ( WSANOTINITIALISED == WSAGetLastError() )
MessageBox ( NULL, "You forgot to call suStartup()!", "SockUtils", MB_OK|MB_ICONEXCLAMATION );
#endif
return false;
}
return true;
}
bool suConnect ( SOCKET so, const char* szAddress, u_short iPort )
{
return suConnect ( so, suLookupAddress(szAddress), iPort );
}
//// suEstablishConnection ////////////////////////////////////////////////
// creates a socket of the specified type, connects to the ip address/port
// requested, and returns the SOCKET created
SOCKET suEstablishConnection ( in_addr_t iAddress, u_short iPort, int type )
{
// Create a socket
if ( type != SOCK_STREAM && type != SOCK_DGRAM )
return INVALID_SOCKET;
SOCKET so = socket(AF_INET, type, 0);
if ( so == INVALID_SOCKET )
return so;
if ( !suConnect(so, iAddress, iPort) )
{
closesocket(so);
return INVALID_SOCKET;
}
return so;
}
//// suEstablishConnection ////////////////////////////////////////////////
// creates a socket of the specified type, connects to the address/port
// requested, and returns the SOCKET created
SOCKET suEstablishConnection ( const char* szAddress, u_short iPort, int type )
{
return suEstablishConnection ( suLookupAddress ( szAddress ), iPort, type );
}
//// suBroadcast ////////////////////////////////////////////////
// takes a previously created broadcast-enabled UDP socket, and broadcasts
// a message on the local network
bool suBroadcast ( SOCKET so, u_short port, const char* buf, int len /* = -1 */ )
{
if ( len == -1 )
len = (int)strlen(buf);
#if 1
SockAddrIn to ( INADDR_BROADCAST, port );
#else // some strange MS OS's don't broadcast to localhost...
SockAddrIn to ( "127.0.0.1", port );
if ( SOCKET_ERROR == sendto ( so, buf, len, 0, to, sizeof(to) ) )
return false;
to.sin_addr.s_addr = INADDR_BROADCAST;
#endif
if ( SOCKET_ERROR == sendto ( so, buf, len, 0, to, sizeof(to) ) )
return false;
return true;
}
//// suRecv ////////////////////////////////////////////////
// retrieves data sent to our TCP socket. If no data, waits for
// a period of timeout ms.
// returns bytes received
// -1 == SOCKET_ERROR
// -2 == timed out waiting for data
int suRecv ( SOCKET so, char* buf, int buflen, int timeout )
{
struct timeval to;
fd_set rread;
int res;
FD_ZERO(&rread); // clear the fd_set
FD_SET(so,&rread); // indicate which socket(s) we want to check
memset((char *)&to,0,sizeof(to)); // clear the timeval struct
to.tv_sec = timeout; // timeout select after (timeout) seconds
// select returns > 0 if there is an event on the socket
res = select((int)so+1, &rread, (fd_set *)0, (fd_set *)0, &to );
if (res < 0)
return -1; // socket error
// there was an event on the socket
if ( (res>0) && (FD_ISSET(so,&rread)) )
return recv ( so, buf, buflen, 0 );
return -2;
}
//// suRecvFrom ////////////////////////////////////////////////
// retrieves data sent to our UDP socket. If no data, waits for
// a period of timeout ms.
// returns bytes received
// returns bytes received
// -1 == SOCKET_ERROR
// -2 == timed out waiting for data
int suRecvFrom ( SOCKET so, char* buf, int buflen, int timeout, sockaddr_in* from, socklen_t* fromlen )
{
struct timeval to;
fd_set rread;
int res;
FD_ZERO(&rread); // clear the fd_set
FD_SET(so,&rread); // indicate which socket(s) we want to check
memset((char *)&to,0,sizeof(to)); // clear the timeval struct
to.tv_sec = timeout; // timeout select after (timeout) seconds
// select returns > 0 if there is an event on the socket
res = select((int)so+1, &rread, (fd_set *)0, (fd_set *)0, &to );
if (res < 0)
return -1; // socket error
// there was an event on the socket
if ( (res>0) && (FD_ISSET(so,&rread)) )
return recvfrom ( so, buf, buflen, 0, (sockaddr*)from, fromlen );
return -2; // timeout
}
//// suBind ////////////////////////////////////////////////
// binds a UDP socket to an interface & port to receive
// data on that port
bool suBind ( SOCKET so, in_addr_t iInterfaceAddress, u_short iListenPort, bool bReuseAddr /* = false */ )
{
SockAddrIn sinInterface ( iInterfaceAddress, iListenPort );
if ( bReuseAddr )
{
int optval = -1; // true
if ( SOCKET_ERROR == setsockopt ( so, SOL_SOCKET, SO_REUSEADDR, (const char*)&optval, sizeof(optval) ) )
{
#if defined(_DEBUG) && defined(WIN32)
if ( WSANOTINITIALISED == WSAGetLastError() )
MessageBox ( NULL, "You forgot to call suStartup()!", "SockUtils", MB_OK|MB_ICONEXCLAMATION );
#endif
return false;
}
}
if ( SOCKET_ERROR == bind(so, sinInterface, sizeof(sinInterface)) )
{
int err = SUERRNO;
if ( err != EADDRINUSE )
return false;
#if defined(_DEBUG) && defined(WIN32)
if ( WSANOTINITIALISED == WSAGetLastError() )
MessageBox ( NULL, "You forgot to call suStartup()!", "SockUtils", MB_OK|MB_ICONEXCLAMATION );
#endif
}
return true;
}
//// suBind ////////////////////////////////////////////////
// binds a UDP socket to an interface & port to receive
// data on that port
bool suBind ( SOCKET so, const char* szInterfaceAddress, u_short iListenPort, bool bReuseAddr /* = false */ )
{
in_addr_t iInterfaceAddr = inet_addr(szInterfaceAddress);
if ( iInterfaceAddr == INADDR_NONE )
return false;
return suBind ( so, iInterfaceAddr, iListenPort, bReuseAddr );
}
//// suEnableBroadcast ////////////////////////////////////////////////
// in order to send broadcast messages on a UDP socket, this function
// must be called first
bool suEnableBroadcast ( SOCKET so, bool bEnable /* = true */ )
{
int optval = bEnable ? -1 : 0;
if ( SOCKET_ERROR == setsockopt ( so, SOL_SOCKET, SO_BROADCAST, (const char*)&optval, sizeof(optval) ) )
return false;
return true;
}
//// suErrDesc ////////////////////////////////////////////////
// returns text description of error code
const char* suErrDesc ( int err )
{
static char errbuf[256];
#ifdef WIN32
switch ( err )
{
#define X(E) case E: return #E;
X(WSAEINTR) X(WSAEBADF)
X(WSAEACCES) X(WSAEFAULT)
X(WSAEINVAL) X(WSAEMFILE)
X(WSAEWOULDBLOCK) X(WSAEINPROGRESS)
X(WSAEALREADY) X(WSAENOTSOCK)
X(WSAEDESTADDRREQ) X(WSAEMSGSIZE)
X(WSAEPROTOTYPE) X(WSAENOPROTOOPT)
X(WSAEPROTONOSUPPORT) X(WSAESOCKTNOSUPPORT)
X(WSAEOPNOTSUPP) X(WSAEPFNOSUPPORT)
X(WSAEAFNOSUPPORT) X(WSAEADDRINUSE)
X(WSAEADDRNOTAVAIL) X(WSAENETDOWN)
X(WSAENETUNREACH) X(WSAENETRESET)
X(WSAECONNABORTED) X(WSAECONNRESET)
X(WSAENOBUFS) X(WSAEISCONN)
X(WSAENOTCONN) X(WSAESHUTDOWN)
X(WSAETOOMANYREFS) X(WSAETIMEDOUT)
X(WSAECONNREFUSED) X(WSAELOOP)
X(WSAENAMETOOLONG) X(WSAEHOSTDOWN)
X(WSAEHOSTUNREACH) X(WSAENOTEMPTY)
X(WSAEPROCLIM) X(WSAEUSERS)
X(WSAEDQUOT) X(WSAESTALE)
X(WSAEREMOTE) X(WSASYSNOTREADY)
X(WSAVERNOTSUPPORTED) X(WSANOTINITIALISED)
X(WSAEDISCON) X(WSAENOMORE)
X(WSAECANCELLED) X(WSAEINVALIDPROCTABLE)
X(WSAEINVALIDPROVIDER) X(WSAEPROVIDERFAILEDINIT)
X(WSASYSCALLFAILURE) X(WSASERVICE_NOT_FOUND)
X(WSATYPE_NOT_FOUND) X(WSA_E_NO_MORE)
X(WSA_E_CANCELLED) X(WSAEREFUSED)
#undef X
}
snprintf ( errbuf, sizeof(errbuf), "Unknown socket error (%lu)", err );
errbuf[sizeof(errbuf)-1] = '\0';
return errbuf;
#elif defined(UNIX)
perror(errbuf);
return errbuf;
#else
# error unrecognized target
#endif
}
#if defined(UNICODE) || defined(_UNICODE)
in_addr_t suLookupAddress ( const wchar_t* pcHost )
{
int len = wcslen(pcHost);
char* p = new char[len+1];
wcstombs ( p, pcHost, len );
p[len] = 0;
in_addr_t rc = suLookupAddress ( p );
delete[] p;
return rc;
}
bool suBroadcast ( SOCKET so, u_short port, const wchar_t* buf, int len /* = -1 */ )
{
char* p = new char[len+1];
wcstombs ( p, buf, len );
p[len] = 0;
bool rc = suBroadcast ( so, port, p, len );
delete[] p;
return rc;
}
int suRecv ( SOCKET so, wchar_t* buf, int buflen, int timeout )
{
char* p = new char[buflen+1];
int rc = suRecv ( so, p, buflen, timeout );
p[buflen] = 0;
mbstowcs ( buf, p, buflen );
delete[] p;
return rc;
}
int suRecvFrom ( SOCKET so, wchar_t* buf, int buflen, int timeout, sockaddr_in* from, int* fromlen )
{
char* p = new char[buflen+1];
int rc = suRecvFrom ( so, p, buflen, timeout, from, fromlen );
p[buflen] = 0;
mbs2wcs ( buf, p, buflen );
delete[] p;
return rc;
}
bool suBind ( SOCKET so, const wchar_t* szInterfaceAddress, u_short iListenPort, bool bReuseAddr /* = false */ )
{
int len = wcslen(szInterfaceAddress);
char* p = new char[len+1];
wcstombs ( p, szInterfaceAddress, len );
p[len] = 0;
bool rc = suBind ( so, p, iListenPort, bReuseAddr );
delete[] p;
return rc;
}
#endif//UNICODE
suBufferedRecvSocket::suBufferedRecvSocket ( SOCKET so )
: suSocket ( so ), _off(0), _len(0)
{
}
int suBufferedRecvSocket::recvUntil ( std::string& buf, char until, int timeout )
{
if ( !_len )
_off = 0;
else if ( _off > (sizeof(_buf)>>1) )
{
memmove ( _buf, &_buf[_off], _len );
_off = 0;
}
char* poff = &_buf[_off];
for ( ;; )
{
char* p = (char*)memchr ( poff, until, _len );
if ( p /*&& p < &poff[_len]*/ )
{
int ret_len = p-poff+1;
buf.resize ( ret_len );
memmove ( &buf[0], poff, ret_len );
_off += ret_len;
_len -= ret_len;
return ret_len;
}
int rc = suRecv ( *this, &poff[_len], sizeof(_buf)-_len-_off, timeout );
if ( rc < 0 )
{
if ( _len )
{
rc = _len;
buf.resize ( rc );
memmove ( &buf[0], &_buf[_off], rc );
_len = 0;
}
return rc;
}
_len += rc;
}
}
void suBufferedRecvSocket::recvPending()
{
if ( !_len )
_off = 0;
else if ( _off > (sizeof(_buf)>>1) )
{
memmove ( _buf, &_buf[_off], _len );
_off = 0;
}
char* poff = &_buf[_off];
while ( sizeof(_buf)-_len-_off )
{
int rc = suRecv ( *this, &poff[_len], sizeof(_buf)-_len-_off, 1 );
if ( rc <= 0 )
break;
_len += rc;
}
}
bool suBufferedRecvSocket::recvInStr ( char c )
{
return NULL != memchr ( &_buf[_off], c, _len );
}

View File

@@ -1,132 +0,0 @@
// SockUtils.h - Declarations for the Winsock utility functions module.
// (C) 2002-2004 Royce Mitchell III
// This file is under the BSD & LGPL licenses
#ifndef __SOCKUTILS_H
#define __SOCKUTILS_H
#include <string>
#ifdef WIN32
# include <winsock2.h>
# define in_addr_t u_long
# define SUERRNO WSAGetLastError()
# define EADDRINUSE WSAEADDRINUSE
# define ENOTSOCK WSAENOTSOCK
# define socklen_t int
#elif defined(UNIX)
# include <sys/types.h>
# include <sys/socket.h>
# include <netinet/in.h>
# include <unistd.h>
# include <errno.h>
# define closesocket(so) close(so)
# define SOCKET int
# define INVALID_SOCKET -1
# define SOCKET_ERROR -1
# define SUERRNO errno
# ifdef MACOSX
# define socklen_t int //Stupid mac
# endif
#else
# error unrecognized target
#endif
#include <assert.h>
extern bool suStartup();
extern SOCKET suTcpSocket();
extern SOCKET suUdpSocket();
extern bool suShutdownConnection(SOCKET sd);
extern in_addr_t suLookupAddress ( const char* pcHost );
extern bool suConnect ( SOCKET so, in_addr_t iAddress, u_short iPort );
extern bool suConnect ( SOCKET so, const char* szAddress, u_short iPort );
extern SOCKET suEstablishConnection ( in_addr_t iAddress, u_short iPort, int type );
extern SOCKET suEstablishConnection ( const char* szAddress, u_short iPort, int type );
extern bool suBroadcast ( SOCKET so, u_short port, const char* buf, int len = -1 );
extern int suRecv ( SOCKET so, char* buf, int buflen, int timeout );
extern int suRecvFrom ( SOCKET so, char* buf, int buflen, int timeout, sockaddr_in* from, socklen_t* fromlen );
extern bool suBind ( SOCKET so, in_addr_t iInterfaceAddress, u_short iListenPort, bool bReuseAddr = false );
extern bool suBind ( SOCKET so, const char* szInterfaceAddress, u_short iListenPort, bool bReuseAddr = false );
extern bool suEnableBroadcast ( SOCKET so, bool bEnable = true );
extern const char* suErrDesc ( int err );
#if defined(UNICODE) || defined(_UNICODE)
extern in_addr_t suLookupAddress ( const wchar_t* pcHost );
extern bool suBroadcast ( SOCKET so, u_short port, const wchar_t* buf, int len = -1 );
extern int suRecv ( SOCKET so, wchar_t* buf, int buflen, int timeout );
extern int suRecvFrom ( SOCKET so, wchar_t* buf, int buflen, int timeout, sockaddr_in* from, int* fromlen );
extern bool suBind ( SOCKET so, const wchar_t* szInterfaceAddress, u_short iListenPort, bool bReuseAddr = false );
#endif//UNICODE
class suSocket
{
SOCKET _so;
public:
suSocket ( SOCKET so = INVALID_SOCKET ) : _so(so)
{
}
const suSocket& operator = ( SOCKET so )
{
assert ( _so == INVALID_SOCKET ); // must Detach() or Close() existing socket first
_so = so;
return *this;
}
virtual ~suSocket()
{
Close();
}
void Close()
{
if ( _so != INVALID_SOCKET )
{
//suShutdownConnection ( _so ); // TODO - only valid on TCP sockets
closesocket ( _so );
_so = INVALID_SOCKET;
}
}
operator SOCKET() const
{
return _so;
}
SOCKET Attach ( SOCKET so )
{
SOCKET old = Detach();
_so = so;
return old;
}
SOCKET Detach()
{
SOCKET so = _so;
_so = INVALID_SOCKET;
return so;
}
private:
// disable copy semantics
suSocket ( const suSocket& );
const suSocket& operator = ( const suSocket& );
};
class suBufferedRecvSocket : public suSocket
{
char _buf[2048];
int _off;
int _len;
public:
suBufferedRecvSocket ( SOCKET so = INVALID_SOCKET );
int recvUntil ( std::string& buf, char until, int timeout );
void recvPending();
bool recvInStr ( char c );
};
class SockAddrIn : public sockaddr_in
{
public:
SockAddrIn(); // creates broadcast address
SockAddrIn ( const char* szAddr, u_short iPort );
SockAddrIn ( in_addr_t iAddr, u_short iPort );
operator sockaddr* () { return (sockaddr*)this; }
operator sockaddr_in* () { return (sockaddr_in*)this; }
};
#endif//__SOCKUTILS_H

View File

@@ -1,96 +0,0 @@
// SplitJoin.cpp
//
// This code is copyright 2003-2004 Royce Mitchell III
// and released under the BSD & LGPL licenses
#ifdef _MSC_VER
#pragma warning ( disable : 4786 ) // MSVC6 can't handle too-long template names
#endif//_MSC_VER
//#include <sstream>
#include "SplitJoin.h"
#include <string.h>
using std::string;
using std::vector;
//using std::stringstream;
static const char* quotes = "\"\'";
bool Split ( vector<string>& vec, const char* csv, char sep, bool merge )
{
string scsv ( csv );
char* col = &scsv[0];
vec.resize ( 0 );
for ( ;; )
{
char* p = col;
while ( isspace(*p) && *p != sep )
p++;
char quote = 0;
if ( strchr ( quotes, *p ) )
quote = *p++;
while ( *p && (*p != sep || quote) )
{
if ( *p++ == quote )
break;
}
while ( isspace(*p) && *p != sep )
p++;
if ( *p && *p != sep )
return false;
string scol ( col, p-col );
//quote = scol[0];
if ( quote )
{
if ( scol[scol.size()-1] == quote )
scol = string ( &scol[1], scol.size()-2 );
}
if ( scol.length() || !merge )
vec.push_back ( scol );
if ( !*p )
break;
col = p + 1;
}
return true;
}
bool Join ( string& csv, vector<string>& vec, char sep )
{
csv.resize(0);
for ( int i = 0; i < vec.size(); i++ )
{
if ( i )
csv += sep;
string& s = vec[i];
if ( strchr ( s.c_str(), sep ) )
{
if ( strchr ( s.c_str(), '\"' ) )
{
if ( strchr ( s.c_str(), '\'' ) )
return false; // the sep, " and ' are all in the string, can't build valid output
csv += '\'';
csv += s;
csv += '\'';
}
else
{
csv += '\"';
csv += s;
csv += '\"';
}
}
else
csv += s;
}
return true;
}

View File

@@ -1,32 +0,0 @@
// SplitJoin.h
//
// This code is copyright 2003-2004 Royce Mitchell III
// and released under the BSD & LGPL licenses
#ifndef SPLITJOIN_H
#define SPLITJOIN_H
#include <vector>
#include <string>
bool Split (
std::vector<std::string>& vec,
const char* csv,
char sep=',',
bool merge=false );
bool Join (
std::string& csv,
std::vector<std::string>& vec,
char sep=',' );
inline bool Split (
std::vector<std::string>& vec,
const std::string& csv,
char sep=',',
bool merge=false )
{
return Split ( vec, csv.c_str(), sep, merge );
}
#endif//SPLIT_H

View File

@@ -1,240 +0,0 @@
// ThreadPool.cpp
// This file is (C) 2003-2004 Royce Mitchell III
// and released under the LGPL & BSD licenses
#include <vector>
using std::vector;
#include "ThreadPool.h"
#include "QueueT.h"
#include "auto_vector.h"
#include "verify.h"
#include "ReliMT.h"
class PoolableThread : public ActiveObject
{
public:
PoolableThread ( ThreadPoolImpl& );
~PoolableThread()
{
Kill();
}
void InitThread();
void Run();
void FlushThread();
ThreadPoolImpl& _pool;
};
class ThreadPoolLaunchData
{
public:
ThreadPoolFunc* pFun;
void* pArg;
};
template <class T>
class AtomicCounter : public Uncopyable
{
Mutex _m;
T _t;
public:
AtomicCounter ( T init = 0 ) : _t(init)
{
}
AtomicCounter ( const AtomicCounter<T>& t )
{
//Mutex::Lock l ( _m ); // don't need to lock since this is a ctor
Mutex::Lock l2 ( t._m );
_t = t._t;
}
const AtomicCounter<T>& operator = ( const AtomicCounter<T>& t )
{
Mutex::Lock l ( _m );
Mutex::Lock l2 ( t._m );
_t = t._t;
return *this;
}
T operator ++ ()
{
Mutex::Lock l ( _m );
T t = _t++;
return t;
}
const AtomicCounter<T>& operator ++ ( int )
{
Mutex::Lock l ( _m );
++_t;
return *this;
}
T operator -- ()
{
Mutex::Lock l ( _m );
T t = _t--;
return t;
}
const AtomicCounter<T>& operator -- ( int )
{
Mutex::Lock l ( _m );
--_t;
return *this;
}
const AtomicCounter<T>& operator += ( T t )
{
Mutex::Lock l ( _m );
return _t += t;
return *this;
}
const AtomicCounter<T>& operator -= ( T t )
{
Mutex::Lock l ( _m );
return _t -= t;
return *this;
}
operator const T& () const
{
//Mutex::Lock l ( _m );
return _t;
}
T operator !() const
{
//Mutex::Lock l ( _m );
return !_t;
}
};
class ThreadPoolImpl : public Uncopyable
{
public:
ThreadPoolImpl() : _isDying(false), _idleThreads(0)
{
}
~ThreadPoolImpl()
{
}
void Shutdown()
{
_isDying = true;
while ( _idleThreads )
{
_threadWaitEvent.Release();
_threadStartEvent.Wait(); // let thread actually get a grip
}
}
void Launch ( ThreadPoolFunc* pFun, void* pArg )
{
// this mutex is necessary to make sure we never have a conflict
// between checking !_idleThreads and the call to _threadStartEvent.Wait()
// basically if 2 threads call Launch() simultaneously, and there is only
// 1 idle thread, it's possible that a new thread won't be created to
// satisfy the 2nd request until an existing thread finishes.
Mutex::Lock launchlock ( _launchMutex );
ASSERT ( pFun );
ThreadPoolLaunchData* data;
{
Mutex::Lock lock ( _vectorMutex );
if ( !_spareData.size() )
_spareData.push_back ( new ThreadPoolLaunchData() );
data = _spareData.pop_back().release();
if ( !_idleThreads )
_threads.push_back ( new PoolableThread(*this) );
}
data->pFun = pFun;
data->pArg = pArg;
verify ( _pendingData.Add ( data ) );
_threadWaitEvent.Release(); // tell a thread to do it's thing...
_threadStartEvent.Wait(); // wait on a thread to pick up the request
}
// functions for threads to call...
ThreadPoolLaunchData* GetPendingData()
{
ThreadPoolLaunchData* data = NULL;
++_idleThreads;
_threadWaitEvent.Wait(); // waits until there's a request
--_idleThreads;
_threadStartEvent.Release(); // tell requester we got it
if ( _isDying )
return NULL;
_pendingData.Get ( data );
ASSERT ( data );
return data;
}
void RecycleData ( ThreadPoolLaunchData* data )
{
Mutex::Lock lock ( _vectorMutex );
_spareData.push_back ( data );
}
bool _isDying;
Mutex _vectorMutex, _launchMutex;
auto_vector<PoolableThread> _threads;
auto_vector<ThreadPoolLaunchData> _spareData;
CQueueT<ThreadPoolLaunchData*> _pendingData;
Event _threadWaitEvent, _threadStartEvent;
AtomicCounter<int> _idleThreads;
};
///////////////////////////////////////////////////////////////////////////////
// ThreadPool
/*static*/ ThreadPool& ThreadPool::Instance()
{
static ThreadPool tp;
return tp;
}
ThreadPool::ThreadPool() : _pimpl ( new ThreadPoolImpl )
{
};
ThreadPool::~ThreadPool()
{
_pimpl->Shutdown();
delete _pimpl;
_pimpl = 0;
}
void ThreadPool::Launch ( ThreadPoolFunc* pFun, void* pArg )
{
_pimpl->Launch ( pFun, pArg );
}
int ThreadPool::IdleThreads()
{
return _pimpl->_idleThreads;
}
///////////////////////////////////////////////////////////////////////////////
// PoolableThread
PoolableThread::PoolableThread ( ThreadPoolImpl& pool ) : _pool(pool)
{
Start();
}
void PoolableThread::InitThread()
{
}
void PoolableThread::Run()
{
ThreadPoolLaunchData* data;
while ( !_isDying )
{
data = _pool.GetPendingData(); // enter wait state if none...
if ( !data ) // NULL data means kill thread
break;
(*data->pFun) ( data->pArg ); // call the function
_pool.RecycleData ( data );
}
}
void PoolableThread::FlushThread()
{
}

View File

@@ -1,28 +0,0 @@
// ThreadPool.h
// This file is (C) 2003-2004 Royce Mitchell III
// and released under the LGPL & BSD licenses
#ifndef THREADPOOL_H
#define THREADPOOL_H
#include "ReliMT.h"
typedef void THREADAPI ThreadPoolFunc ( void* );
class ThreadPoolImpl;
class ThreadPool : public Uncopyable
{
public:
static ThreadPool& Instance();
~ThreadPool();
void Launch ( ThreadPoolFunc* pFun, void* pArg );
int IdleThreads();
private:
ThreadPool();
ThreadPoolImpl *_pimpl;
};
#endif// THREADPOOL_H

View File

@@ -1,87 +0,0 @@
// auto_ptr.h
// This file is (C) 2002-2003 Royce Mitchell III
// and released under the LGPL & BSD licenses
#ifndef AUTO_PTR_H
#define AUTO_PTR_H
template<class T>
class auto_ptr
{
public:
typedef T element_type;
explicit auto_ptr(T *p = 0) : _p(p)
{
}
auto_ptr(auto_ptr<T>& rhs) : _p(rhs.release())
{
}
auto_ptr<T>& operator=(auto_ptr<T>& rhs)
{
if ( &rhs != this )
{
dispose();
_p = rhs.release();
}
return *this;
}
auto_ptr<T>& set ( auto_ptr<T>& rhs )
{
if ( &rhs != this )
{
dispose();
_p = rhs.release();
}
return *this;
}
~auto_ptr()
{
dispose();
}
void dispose()
{
if ( _p )
{
delete _p;
_p = 0;
}
}
T& operator[] ( int i )
{
return _p[i];
}
T& operator*() const
{
return *_p;
}
T* operator->() const
{
return _p;
}
T* get() const
{
return _p;
}
T* release()
{
T* p = _p;
_p = 0;
return p;
}
private:
T* _p;
};
#endif//AUTO_PTR_H

View File

@@ -1,141 +0,0 @@
// auto_vector.h
// This file is (C) 2002-2004 Royce Mitchell III
// and released under the LGPL & BSD licenses
#ifndef AUTO_VECTOR_H
#define AUTO_VECTOR_H
#include <sys/types.h>
#include "verify.h"
#include "auto_ptr.h"
template<class T>
class auto_vector
{
public:
explicit auto_vector ( size_t capacity = 0 )
: _arr(0), _capacity(0), _end(0)
{
if ( capacity != 0 )
_arr = new auto_ptr<T>[capacity];
_capacity = capacity;
}
~auto_vector()
{
delete []_arr;
}
size_t size() const
{
return _end;
}
const auto_ptr<T>& operator [] ( size_t i ) const
{
ASSERT ( i < _end );
return _arr[i];
}
auto_ptr<T>& operator [] ( size_t i )
{
ASSERT ( i < _end );
return _arr[i];
}
void assign ( size_t i, auto_ptr<T>& p )
{
ASSERT ( i < _end );
_arr[i] = p;
}
void assign_direct ( size_t i, T * p )
{
ASSERT ( i < _end );
reserve ( i + 1 );
_arr[i].reset ( p );
}
void push_back ( auto_ptr<T>& p )
{
reserve ( _end + 1 );
_arr[_end++] = p;
}
auto_ptr<T>& back()
{
ASSERT ( _end != 0 );
return _arr[_end-1];
}
void push_back ( T * p )
{
reserve ( _end + 1 );
auto_ptr<T> tmp(p);
_arr[_end++] = tmp;
//GCC is pedantic, this is an error.
//_arr[_end++] = auto_ptr<T>(p);
}
auto_ptr<T> pop_back()
{
ASSERT ( _end != 0 );
if ( !_end )
{
auto_ptr<T> tmp((T*)0);
return tmp;
//GCC, this is an error.
//return auto_ptr<T>(NULL);
}
return _arr[--_end];
}
void resize ( size_t newSize )
{
ASSERT ( newSize >= 0 );
reserve ( newSize ); // make sure we have at least this much room
_end = newSize;
}
void reserve ( size_t reqCapacity )
{
if ( reqCapacity <= _capacity )
return;
size_t newCapacity = 2 * _capacity;
if ( reqCapacity > newCapacity )
newCapacity = reqCapacity;
// allocate new array
auto_ptr<T> * arrNew = new auto_ptr<T> [newCapacity];
// transfer all entries
for ( size_t i = 0; i < _capacity; ++i )
arrNew[i] = _arr[i];
_capacity = newCapacity;
// free old memory
delete[] _arr;
// substitute new array for old array
_arr = arrNew;
}
void remove ( size_t off )
{
size_t last = _end-1;
if ( off == last )
resize ( last );
else if ( off < last )
{
auto_ptr<T> tmp ( pop_back().release() );
_arr[off] = tmp;
}
}
//typedef const_auto_iterator<T> const_iterator;
//const_iterator begin () const { return _arr; }
//const_iterator end () const { return _arr + _end; }
private:
auto_ptr<T> *_arr;
size_t _capacity;
size_t _end;
};
#endif//AUTO_VECTOR_H

View File

@@ -1,58 +0,0 @@
// base64.cpp
#include "base64.h"
using std::string;
static const char* alfabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
string base64_encode ( const string& sInput )
{
unsigned char x=0, topbit=0;
int v=0;
string sOutput;
do
{
if ( topbit < 6 )
{
x++;
v <<= 8;
if ( x <= sInput.length() ) v += sInput[x-1];
topbit += 8;
}
topbit -= 6;
if ( x > sInput.length() && !v )
break;
sOutput += alfabet[(v >> topbit) & 63];
v &= (1 << topbit) - 1;
} while ( x < sInput.length() || v );
int eq = (8 - (sOutput.length() % 4)) % 4;
while ( eq-- )
sOutput += '=';
return sOutput;
}
string base64_decode ( const string& sInput )
{
unsigned char x=0, topbit=0;
int v=0, inlen = sInput.length();
string sOutput;
while ( inlen && sInput[inlen-1] == '=' )
inlen--;
do
{
while ( topbit < 8 )
{
x++;
v <<= 6;
if ( x <= inlen ) v += (strchr(alfabet, sInput[x-1]) - alfabet);
topbit += 6;
}
topbit -= 8;
if ( x > inlen && !v )
break;
sOutput += (char)((v >> topbit) & 255);
v &= ((1 << topbit) - 1);
} while ( x <= inlen || v );
return sOutput;
}

View File

@@ -1,12 +0,0 @@
// base64.h
#ifndef BASE64_H
#define BASE64_H
#include <string>
std::string base64_encode ( const std::string& s );
std::string base64_decode ( const std::string& s );
#endif//BASE64_H

View File

@@ -1,15 +0,0 @@
// chomp.cpp
// This file is (C) 2004 Royce Mitchell III
// and released under the BSD & LGPL licenses
#include "chomp.h"
std::string chomp ( const std::string& s )
{
const char* p = &s[0];
const char* p2 = &s[0] + s.size();
while ( p2 > p && strchr("\r\n", p2[-1]) )
p2--;
return std::string ( p, p2-p );
}

View File

@@ -1,13 +0,0 @@
// chomp.h
// This file is (C) 2004 Royce Mitchell III
// and released under the BSD & LGPL licenses
#ifndef CHOMP_H
#define CHOMP_H
#include <string>
std::string chomp ( const std::string& s );
#endif//TRIM_H

View File

@@ -1,7 +0,0 @@
#define SERVER "irc.freenode.net"
#define BOTNAME "ArchBlackmann"
#define CHANNEL "#ReactOS"
#define MODE "+i"
#define PASS "ilovebunnies"

View File

@@ -1,23 +0,0 @@
// cram_md5.cpp
// This file is (C) 2004 Royce Mitchell III
// and released under the BSD & LGPL licenses
#include "MD5.h"
#include "cram_md5.h"
#include "base64.h"
using std::string;
string cram_md5 ( const string& username, const string& password, const string& greeting )
{
string challenge = base64_decode ( greeting );
string hmac = HMAC_MD5 ( password, challenge );
//printf ( "(cram_md5): hmac = %s\n", hmac.c_str() );
string raw_response = username;
raw_response += " ";
raw_response += hmac;
//printf ( "(cram_md5): raw_response = %s\n", raw_response.c_str() );
return base64_encode ( raw_response );
}

View File

@@ -1,15 +0,0 @@
// cram_md5.h
// This file is (C) 2004 Royce Mitchell III
// and released under the BSD & LGPL licenses
#ifndef CRAM_MD5_H
#define CRAM_MD5_H
#include <string>
std::string cram_md5 (
const std::string& username,
const std::string& password,
const std::string& greeting );
#endif//CRAM_MD5_H

View File

@@ -1 +0,0 @@
semprini

View File

@@ -1,10 +0,0 @@
You should have your mouth washed out with soap!
This is a clean channel... please watch your language
Please try to keep it clean
Hey, there's children present ( I'm not even a year old yet! )
Could you find a less-offensive way to express yourself, please?
Such language :(
Those aren't nice words to use
Oh, my poor innocent ears :(
Help! My mind is being corrupted!
filthy mouths are not appreciated here

View File

@@ -1,15 +0,0 @@
Royce3
kjk_hyperion
tamlin
GvG
filip2307
hardon
w3seek
arty
sedwards
Exception
blight_
jimtabor
mtempel
Gge
Alex_Ionescu

View File

@@ -1,580 +0,0 @@
CcCanIWrite
CcCopyRead
CcCopyWrite
CcDeferWrite
CcFastCopyRead
CcFastCopyWrite
CcFlushCache
CcGetDirtyPages
CcGetFileObjectFromBcb
CcGetFileObjectFromSectionPtrs
CcGetFlushedValidData
CcGetLsnForFileObject
CcInitializeCacheMap
CcIsThereDirtyData
CcMapData
CcMdlRead
CcMdlReadComplete
CcMdlWriteAbort
CcMdlWriteComplete
CcPinMappedData
CcPinRead
CcPrepareMdlWrite
CcPreparePinWrite
CcPurgeCacheSection
CcRemapBcb
CcRepinBcb
CcScheduleReadAhead
CcSetAdditionalCacheAttributes
CcSetBcbOwnerPointer
CcSetDirtyPageThreshold
CcSetDirtyPinnedData
CcSetFileSizes
CcSetLogHandleForFile
CcSetReadAheadGranularity
CcUninitializeCacheMap
CcUnpinData
CcUnpinDataForThread
CcUnpinRepinnedBcb
CcWaitForCurrentLazyWriterActivity
CcZeroData
DbgLoadImageSymbols
DbgQueryDebugFilterState
DbgSetDebugFilterState
EVENT_TYPE
ExAcquireResourceExclusive
ExAcquireResourceExclusiveLite
ExAcquireResourceSharedLite
ExAcquireSharedStarveExclusive
ExAcquireSharedWaitForExclusive
ExAllocateFromZone
ExAllocatePool
ExAllocatePoolWithQuota
ExAllocatePoolWithQuotaTag
ExAllocatePoolWithTag
ExConvertExclusiveToSharedLite
ExCreateCallback
ExDeleteNPagedLookasideList
ExDeletePagedLookasideList
ExDeleteResource
ExDeleteResourceLite
ExDisableResourceBoostLite
ExEnumHandleTable
ExExtendZone
ExFreePool
ExGetCurrentProcessorCounts
ExGetCurrentProcessorCpuUsage
ExGetExclusiveWaiterCount
ExGetPreviousMode
ExGetSharedWaiterCount
ExInitializeNPagedLookasideList
ExInitializePagedLookasideList
ExInitializeResource
ExInitializeResourceLite
ExInitializeZone
ExInterlockedAddLargeInteger
ExInterlockedAddUlong
ExInterlockedDecrementLong
ExInterlockedExchangeUlong
ExInterlockedExtendZone
ExInterlockedIncrementLong
ExInterlockedInsertHeadList
ExInterlockedInsertTailList
ExInterlockedPopEntryList
ExInterlockedPushEntryList
ExInterlockedRemoveHeadList
ExIsProcessorFeaturePresent
ExIsResourceAcquiredExclusiveLite
ExIsResourceAcquiredSharedLite
ExLocalTimeToSystemTime
ExNotifyCallback
ExPostSystemEvent
ExQueryPoolBlockSize
ExQueueWorkItem
ExRaiseAccessViolation
ExRaiseDatatypeMisalignment
ExRaiseException
ExRaiseHardError
ExRaiseStatus
ExRegisterCallback
ExReinitializeResourceLite
ExReleaseResource
ExReleaseResourceForThread
ExReleaseResourceForThreadLite
ExRosDumpPagedPoolByTag
ExRosQueryPoolTag
ExSetResourceOwnerPointer
ExSetTimerResolution
ExSystemExceptionFilter
ExSystemTimeToLocalTime
ExTryToAcquireResourceExclusiveLite
ExUnregisterCallback
ExUuidCreate
ExVerifySuite
FsRtlAcquireFileExclusive
FsRtlAddMcbEntry
FsRtlAddToTunnelCache
FsRtlAllocateFileLock
FsRtlAllocatePool
FsRtlAllocatePoolWithQuota
FsRtlAllocatePoolWithQuotaTag
FsRtlAllocatePoolWithTag
FsRtlAllocateResource
FsRtlAreNamesEqual
FsRtlBalanceReads
FsRtlCheckLockForReadAccess
FsRtlCheckLockForWriteAccess
FsRtlCopyRead
FsRtlCopyWrite
FsRtlFastCheckLockForRead
FsRtlFastCheckLockForWrite
FsRtlFastUnlockAll
FsRtlFastUnlockAllByKey
FsRtlFastUnlockSingle
FsRtlFindInTunnelCache
FsRtlFreeFileLock
FsRtlGetFileSize
FsRtlGetNextFileLock
FsRtlGetNextMcbEntry
FsRtlIncrementCcFastReadNoWait
FsRtlIncrementCcFastReadNotPossible
FsRtlIncrementCcFastReadResourceMiss
FsRtlIncrementCcFastReadWait
FsRtlInitializeFileLock
FsRtlInitializeMcb
FsRtlInitializeTunnelCache
FsRtlInsertPerFileObjectContext
FsRtlInsertPerStreamContext
FsRtlIsDbcsInExpression
FsRtlIsFatDbcsLegal
FsRtlIsHpfsDbcsLegal
FsRtlIsNameInExpression
FsRtlLookupLastLargeMcbEntryAndIndex
FsRtlLookupLastMcbEntry
FsRtlLookupMcbEntry
FsRtlLookupPerFileObjectContext
FsRtlLookupPerStreamContextInternal
FsRtlMdlRead
FsRtlMdlReadComplete
FsRtlMdlReadCompleteDev
FsRtlMdlReadDev
FsRtlMdlWriteComplete
FsRtlMdlWriteCompleteDev
FsRtlNotifyChangeDirectory
FsRtlNotifyCleanup
FsRtlNotifyFilterChangeDirectory
FsRtlNotifyFilterReportChange
FsRtlNotifyFullChangeDirectory
FsRtlNotifyFullReportChange
FsRtlNotifyReportChange
FsRtlNotifyUninitializeSync
FsRtlNumberOfRunsInMcb
FsRtlPostPagingFileStackOverflow
FsRtlPostStackOverflow
FsRtlPrepareMdlWrite
FsRtlPrepareMdlWriteDev
FsRtlPrivateLock
FsRtlProcessFileLock
FsRtlRegisterFileSystemFilterCallbacks
FsRtlReleaseFile
FsRtlRemoveMcbEntry
FsRtlRemovePerFileObjectContext
FsRtlRemovePerStreamContext
FsRtlResetLargeMcb
FsRtlSyncVolumes
FsRtlTeardownPerStreamContexts
FsRtlTruncateMcb
FsRtlUninitializeFileLock
FsRtlUninitializeMcb
HalAdjustResourceList
HalAllocateCommonBuffer
HalAssignSlotResources
HalCalibratePerformanceCounter
HalFlushCommonBuffer
HalFreeCommonBuffer
HalGetAdapter
HalGetBusData
HalGetBusDataByOffset
HalGetDmaAlignmentRequirement
HalMakeBeep
HalQueryDisplayParameters
HalQueryRealTimeClock
HalReadDmaCounter
HalRequestIpi
HalSetBusData
HalSetBusDataByOffset
HalSetDisplayParameters
HalSetRealTimeClock
HalStartNextProcessor
IoAcquireCancelSpinLock
IoAcquireRemoveLockEx
IoAcquireVpbSpinLock
IoAllocateAdapterChannel
IoAllocateController
IoAllocateDriverObjectExtension
IoAllocateErrorLogEntry
IoAllocateIrp
IoAllocateMdl
IoAllocateWorkItem
IoAssignResources
IoAttachDevice
IoAttachDeviceByPointer
IoAttachDeviceToDeviceStack
IoAttachDeviceToDeviceStackSafe
IoBuildAsynchronousFsdRequest
IoBuildDeviceIoControlRequest
IoBuildPartialMdl
IoBuildSynchronousFsdRequest
IoCallDriver
IoCancelFileOpen
IoCancelIrp
IoCheckQuerySetFileInformation
IoCheckQuerySetVolumeInformation
IoCheckQuotaBufferValidity
IoCheckShareAccess
IoCompleteRequest
IoConnectInterrupt
IoCreateController
IoCreateDevice
IoCreateDisk
IoCreateDriver
IoCreateFile
IoCreateFileSpecifyDeviceObjectHint
IoCreateNotificationEvent
IoCreateStreamFileObject
IoCreateStreamFileObjectEx
IoCreateStreamFileObjectLite
IoCreateSymbolicLink
IoCreateSynchronizationEvent
IoCreateUnprotectedSymbolicLink
IoDeleteController
IoDeleteDevice
IoDeleteDriver
IoDeleteSymbolicLink
IoDetachDevice
IoDisconnectInterrupt
IoEnqueueIrp
IoEnumerateDeviceObjectList
IoFlushAdapterBuffers
IoForwardIrpSynchronously
IoFreeAdapterChannel
IoFreeController
IoFreeErrorLogEntry
IoFreeIrp
IoFreeMapRegisters
IoFreeMdl
IoFreeWorkItem
IoGetAttachedDevice
IoGetAttachedDeviceReference
IoGetBaseFileSystemDeviceObject
IoGetBootDiskInformation
IoGetConfigurationInformation
IoGetCurrentProcess
IoGetDeviceAttachmentBaseRef
IoGetDeviceInterfaceAlias
IoGetDeviceInterfaces
IoGetDeviceObjectPointer
IoGetDeviceProperty
IoGetDeviceToVerify
IoGetDiskDeviceObject
IoGetDriverObjectExtension
IoGetFileObjectGenericMapping
IoGetInitialStack
IoGetLowerDeviceObject
IoGetRelatedDeviceObject
IoGetRequestorProcess
IoGetRequestorProcessId
IoGetRequestorSessionId
IoGetStackLimits
IoGetTopLevelIrp
IoInitializeIrp
IoInitializeRemoveLockEx
IoInitializeTimer
IoInvalidateDeviceRelations
IoInvalidateDeviceState
IoIsFileOriginRemote
IoIsOperationSynchronous
IoIsSystemThread
IoIsValidNameGraftingBuffer
IoMakeAssociatedIrp
IoMapTransfer
IoOpenDeviceInstanceKey
IoOpenDeviceInterfaceRegistryKey
IoOpenDeviceRegistryKey
IoPageRead
IoPnPDeliverServicePowerNotification
IoQueryDeviceDescription
IoQueryDeviceEnumInfo
IoQueryFileDosDeviceName
IoQueryFileInformation
IoQueryVolumeInformation
IoQueueThreadIrp
IoQueueWorkItem
IoRaiseHardError
IoRaiseInformationalHardError
IoReadDiskSignature
IoReadPartitionTableEx
IoRegisterBootDriverReinitialization
IoRegisterDeviceInterface
IoRegisterDriverReinitialization
IoRegisterFileSystem
IoRegisterFsRegistrationChange
IoRegisterLastChanceShutdownNotification
IoRegisterPlugPlayNotification
IoRegisterShutdownNotification
IoReleaseCancelSpinLock
IoReleaseRemoveLockAndWaitEx
IoReleaseRemoveLockEx
IoReleaseVpbSpinLock
IoRemoveShareAccess
IoReportDetectedDevice
IoReportHalResourceUsage
IoReportResourceForDetection
IoReportResourceUsage
IoReportTargetDeviceChange
IoReportTargetDeviceChangeAsynchronous
IoRequestDeviceEject
IoReuseIrp
IoSetCompletionRoutineEx
IoSetDeviceInterfaceState
IoSetDeviceToVerify
IoSetFileOrigin
IoSetHardErrorOrVerifyDevice
IoSetInformation
IoSetIoCompletion
IoSetPartitionInformationEx
IoSetShareAccess
IoSetStartIoAttributes
IoSetSystemPartition
IoSetThreadHardErrorMode
IoSetTopLevelIrp
IoStartNextPacket
IoStartNextPacketByKey
IoStartPacket
IoStartTimer
IoStopTimer
IoSynchronousInvalidateDeviceRelations
IoSynchronousPageWrite
IoUnregisterFileSystem
IoUnregisterFsRegistrationChange
IoUnregisterPlugPlayNotification
IoUnregisterShutdownNotification
IoUpdateShareAccess
IoValidateDeviceIoControlAccess
IoVerifyPartitionTable
IoVerifyVolume
IoVolumeDeviceToDosName
IoWMIAllocateInstanceIds
IoWMIDeviceObjectToInstanceName
IoWMIExecuteMethod
IoWMIHandleToInstanceName
IoWMIOpenBlock
IoWMIQueryAllData
IoWMIQueryAllDataMultiple
IoWMIQuerySingleInstance
IoWMIQuerySingleInstanceMultiple
IoWMIRegistrationControl
IoWMISetNotificationCallback
IoWMISetSingleInstance
IoWMISetSingleItem
IoWMISuggestInstanceName
IoWMIWriteEvent
IoWriteErrorLogEntry
IoWritePartitionTableEx
KPRIORITY
KdPortGetByte
KdPortPollByte
KdPortPutByte
Ke386QueryIoAccessMap
Ke386SetIoAccessMap
KeAcquireInterruptSpinLock
KeAreApcsDisabled
KeCapturePersistentThreadState
KeDeregisterBugCheckReasonCallback
KeFindConfigurationEntry
KeFindConfigurationNextEntry
KeFlushEntireTb
KeFlushQueuedDpcs
KeGetRecommendedSharedDataAlignment
KeIsExecutingDpc
KeQueryActiveProcessors
KeQueryPerformanceCounter
KeQueryPriorityThread
KeQueryRuntimeThread
KeQuerySystemTime
KeQueryTickCount
KeQueryTimeIncrement
KeRaiseIrql
KeRaiseIrqlToDpcLevel
KeRaiseUserException
KeReadStateEvent
KeRegisterBugCheckCallback
KeRegisterBugCheckReasonCallback
KeReleaseInterruptSpinLock
KeReleaseMutant
KeReleaseMutex
KeReleaseSemaphore
KeReleaseSpinLock
KeReleaseSpinLockFromDpcLevel
KeReleaseSpinLockFromDpcLevel
KeRemoveByKeyDeviceQueue
KeRemoveByKeyDeviceQueueIfBusy
KeRemoveDeviceQueue
KeRemoveEntryDeviceQueue
KeRemoveSystemServiceTable
KeRestoreFloatingPointState
KeRevertToUserAffinityThread
KeRosDumpStackFrames
KeRosGetStackFrames
KeRosPrintAddress
KeSaveFloatingPointState
KeSetDmaIoCoherency
KeSetEvent
KeSetEventBoostPriority
KeSetIdealProcessorThread
KeSetKernelStackSwapEnable
KeSetProfileIrql
KeSetSystemAffinityThread
KeSetTimeIncrement
KeTerminateThread
KeUserModeCallback
KeWaitForMutexObject
KeWaitForSingleObject
KiCoprocessorError
KiUnexpectedInterrupt
LONG
LdrFindResourceDirectory_U
MmAddPhysicalMemory
MmAddVerifierThunks
MmAdjustWorkingSetSize
MmAdvanceMdl
MmAllocateContiguousMemory
MmAllocateContiguousMemorySpecifyCache
MmAllocateMappingAddress
MmAllocateNonCachedMemory
MmBuildMdlForNonPagedPool
MmCanFileBeTruncated
MmCreateMdl
MmCreateSection
MmDbgTranslatePhysicalAddress
MmDisableModifiedWriteOfSection
MmFlushImageSection
MmForceSectionClosed
MmFreeContiguousMemory
MmFreeMappingAddress
MmFreeNonCachedMemory
MmGetPhysicalAddress
MmGetPhysicalMemoryRanges
MmGetSystemRoutineAddress
MmGetVirtualForPhysical
MmGrowKernelStack
MmIsAddressValid
MmIsDriverVerifying
MmIsNonPagedSystemAddressValid
MmIsRecursiveIoFault
MmIsThisAnNtAsSystem
MmIsVerifierEnabled
MmLockPagableDataSection
MmLockPagableImageSection
MmLockPagableSectionByHandle
MmMapIoSpace
MmMapLockedPages
MmMapLockedPagesWithReservedMapping
MmMapMemoryDumpMdl
MmMapUserAddressesToPage
MmMapVideoDisplay
MmMapViewInSessionSpace
MmMapViewInSystemSpace
MmMapViewOfSection
MmMarkPhysicalMemoryAsBad
MmMarkPhysicalMemoryAsGood
MmPageEntireDriver
MmPrefetchPages
MmProbeAndLockPages
MmProbeAndLockProcessPages
MmProbeAndLockSelectedPages
MmProtectMdlSystemAddress
MmQuerySystemSize
MmRemovePhysicalMemory
MmResetDriverPaging
MmSecureVirtualMemory
MmSetAddressRangeModified
MmSetBankedSection
MmSizeOfMdl
MmTrimAllSystemPagableMemory
MmUnlockPagableImageSection
MmUnlockPages
MmUnmapIoSpace
MmUnmapLockedPages
MmUnmapReservedMapping
MmUnmapVideoDisplay
MmUnmapViewInSessionSpace
MmUnmapViewInSystemSpace
MmUnmapViewOfSection
MmUnsecureVirtualMemory
OUT
ObCreateObject
PEJOB
PEPROCESS
PKBUGCHECK_CALLBACK_RECORD
PKDEVICE_QUEUE_ENTRY
PKIRQL
PULONG
PVOID
PW32_THREAD_CALLBACK
PoCallDriver
PoRegisterDeviceForIdleDetection
PoRegisterSystemState
PoRequestPowerIrp
PoSetDeviceBusy
PoSetPowerState
PoSetSystemState
PoStartNextPowerIrp
PoUnregisterSystemState
ProbeForRead
ProbeForWrite
PsAssignImpersonationToken
PsCreateSystemProcess
PsCreateSystemThread
PsGetCurrentProcessId
PsGetCurrentThreadId
PsImpersonateClient
PsReferenceImpersonationToken
PsReferencePrimaryToken
PsRevertThreadToSelf
PsRevertToSelf
PsTerminateSystemThread
READ_PORT_BUFFER_UCHAR
READ_PORT_BUFFER_ULONG
READ_PORT_BUFFER_USHORT
READ_PORT_UCHAR
READ_PORT_ULONG
READ_PORT_USHORT
SeAssignSecurityEx
SeAuditHardLinkCreation
SeAuditingFileEvents
SeAuditingFileEventsWithContext
SeAuditingFileOrGlobalEvents
SeAuditingHardLinkEvents
SeAuditingHardLinkEventsWithContext
SeCaptureSecurityDescriptor
SeCaptureSubjectContext
SeCloseObjectAuditAlarm
SeCreateAccessState
SeCreateClientSecurityFromSubjectContext
SeFilterToken
SeImpersonateClientEx
SePrivilegeObjectAuditAlarm
SeQueryInformationToken
SeQuerySessionIdToken
SeReleaseSecurityDescriptor
SeSetSecurityDescriptorInfoEx
SeTokenIsAdmin
SeTokenIsRestricted
SeTokenIsWriteRestricted
WRITE_PORT_BUFFER_UCHAR
WRITE_PORT_BUFFER_ULONG
WRITE_PORT_BUFFER_USHORT
WRITE_PORT_UCHAR
WRITE_PORT_ULONG
WRITE_PORT_USHORT

View File

@@ -1,10 +0,0 @@
/me bows humbly and begs %s's forgiveness
%s is soo cool... I hope to be like him some day
/me hides in a corner and hopes %s doesn't beat him with the whipping noodle again
/me prostrates at %s's feet and begs his majesty's forgiveness
%s: please don't hurt me!
I'm not worthy... I'm not worthy...
/me sings %s's praises to the world!
/me thinks %s is smarter than %dev%
%s: oh please may I defrag your sock drawer?
/me gives %s a cookie, hoping it will make up for breaking %func% the other day...

View File

@@ -1 +0,0 @@
/me is bored

View File

@@ -1,9 +0,0 @@
PASSIVE_LEVEL
APC_LEVEL
DISPATCH_LEVEL
PROFILE_LEVEL
CLOCK1_LEVEL
IPI_LEVEL
POWER_LEVEL
HIGH_LEVEL
SYNCH_LEVEL

View File

@@ -1,38 +0,0 @@
TARGET := ArchBlackmann.exe
.PHONY: all
all: $(TARGET)
CPP=mingw32-g++
CFLAGS := -DWIN32 -D_DEBUG -D_CONSOLE -D_MBCS
LFLAGS :=
LIBS := -lstdc++ -lws2_32
SRCS := ArchBlackmann.cpp \
base64.cpp \
chomp.cpp \
cram_md5.cpp \
File.cpp \
IRCClient.cpp \
MD5.cpp \
panic.cpp \
ReliMT.cpp \
SockUtils.cpp \
SplitJoin.cpp \
ssprintf.cpp \
ThreadPool.cpp \
trim.cpp
OBJS := $(SRCS:.cpp=.o)
$(TARGET): $(OBJS)
$(CPP) $(LFLAGS) -o $@ $(OBJS) $(LIBS)
.cpp.o: $<
$(CPP) $(CFLAGS) -c $< -o $@
.PHONY: clean
clean:
-@del $(TARGET)
-@del $(OBJS)

View File

@@ -1,13 +0,0 @@
the kernel
ntoskrnl
win32k
msafd
ws2_32
user32
shell32
the cache manager
tdi
the scheduler
the thread queue
the message queue
atapi

View File

@@ -1,5 +0,0 @@
/me slaps %s with a large trout
recycle(%s)
Did I hear something? Musta been a %s-fly... Where's that fly-swatter?
%s: go away son, you bother me....
/me beats %s with the whipping noodle

View File

@@ -1,34 +0,0 @@
// panic.cpp
// This file is (C) 2003-2004 Royce Mitchell III
// and released under the BSD & LGPL licenses
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#ifdef WIN32
#include <conio.h>
#include <windows.h>
#endif//WIN32
#include "panic.h"
void panic ( const char* format, ... )
{
va_list arg;
int done;
va_start(arg, format);
#if defined(WIN32) && !defined(_CONSOLE)
char buf[4096];
_vsnprintf ( buf, sizeof(buf)-1, format, arg );
MessageBox ( NULL, buf, "Panic!", MB_OK|MB_ICONEXCLAMATION );
#else
done = vprintf(format, arg);
printf ( "\n" );
#endif
va_end(arg);
#if defined(WIN32) && defined(_CONSOLE)
printf ( "Press any key to exit\n" );
(void)getch();
#endif//WIN32 && _CONSOLE
exit ( -1 );
}

View File

@@ -1,18 +0,0 @@
// panic.h
// This file is (C) 2003-2004 Royce Mitchell III
// and released under the BSD & LGPL licenses
#ifndef PANIC_H
#define PANIC_H
void panic ( const char* format, ... );
#define suAssert(expr) if ( !(expr) ) panic ( "%s(%lu): SOCKET ERROR %s\nExpression: %s\n", __FILE__, __LINE__, suErrDesc(SUERRNO), #expr )
#if defined(DEBUG) || defined(_DEBUG)
# define suVerify(expr) suAssert(expr)
#else
# define suVerify(expr) expr
#endif
#endif//PANIC_H

View File

@@ -1,11 +0,0 @@
minute
hour
day
week
fortnight
month
year
decade
century
millenium
eon

View File

@@ -1,44 +0,0 @@
This doc can be also found on the wiki.
ArchBlackman is a IRC-Chat bot of the #reactos irc channel. He has been coded by Royce3 and DrFred (mbosma) currently runs him.
If some one use a swear word he'll tell him not to do so and you can also ask him something technical about reactos. :)
Besides this he also knows some commands. The systax for giving him commands "ArchBlackmann: !grovel". (don't forget to address him)
- !grovel - This is the only command that non ops can do (No Parameter)
- !kiss <person>
- !hug <person>
- !give <someone> <something>
- !say <something> - You can tell him to say something on the channel via PrivateMessage
ArchBlackmann know what he should say from some text files. They can be found on the svn-dir. But can also edit them online if you are op using:
- !add <list> <item>
- !remove <list> <item>
List that are used directly to create responses are:
- tech - here are the sentences ArchBlackmann says when he finds his name
- curse - this are the curses he looks for
- cursecop - this the responces to them
- grovel - this is said when an op does the grovel command
- nogrovel - this when someone else does it
The remaining lists are not used directly, but by the other lists.
They are:
- dev
- func
- irql
- module
- period
- status
- stru
- type
And they are used like this:
/me thinks %s is smarter than %dev%

View File

@@ -1,998 +0,0 @@
// ssprintf.cpp
#include <malloc.h>
#include <math.h>
#include <float.h>
#include <assert.h>
#include "ssprintf.h"
#ifdef _MSC_VER
#define alloca _alloca
#endif//_MSC_VER
typedef __int64 LONGLONG;
typedef unsigned __int64 ULONGLONG;
typedef struct {
unsigned int mantissa:23;
unsigned int exponent:8;
unsigned int sign:1;
} ieee_float_t;
typedef struct {
unsigned int mantissal:32;
unsigned int mantissah:20;
unsigned int exponent:11;
unsigned int sign:1;
} ieee_double_t;
typedef struct {
unsigned int mantissal:32;
unsigned int mantissah:32;
unsigned int exponent:15;
unsigned int sign:1;
unsigned int empty:16;
} ieee_long_double_t;
std::string ssprintf ( const char* fmt, ... )
{
va_list arg;
va_start(arg, fmt);
std::string f = ssvprintf ( fmt, arg );
va_end(arg);
return f;
}
#define ZEROPAD 1 /* pad with zero */
#define SIGN 2 /* unsigned/signed long */
#define PLUS 4 /* show plus */
#define SPACE 8 /* space if plus */
#define LEFT 16 /* left justified */
#define SPECIAL 32 /* 0x */
#define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */
#define ZEROTRUNC 128 /* truncate zero 's */
static int skip_atoi(const char **s)
{
int i=0;
while (isdigit(**s))
i = i*10 + *((*s)++) - '0';
return i;
}
static int do_div(LONGLONG *n,int base)
{
int __res = ((ULONGLONG) *n) % (unsigned) base;
*n = ((ULONGLONG) *n) / (unsigned) base;
return __res;
}
static bool number(std::string& f, LONGLONG num, int base, int size, int precision ,int type)
{
char c,sign,tmp[66];
const char *digits="0123456789abcdefghijklmnopqrstuvwxyz";
int i;
if (type & LARGE)
digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
if (type & LEFT)
type &= ~ZEROPAD;
if (base < 2 || base > 36)
return 0;
c = (type & ZEROPAD) ? '0' : ' ';
sign = 0;
if (type & SIGN) {
if (num < 0) {
sign = '-';
num = -num;
size--;
} else if (type & PLUS) {
sign = '+';
size--;
} else if (type & SPACE) {
sign = ' ';
size--;
}
}
if (type & SPECIAL) {
if (base == 16)
size -= 2;
else if (base == 8)
size--;
}
i = 0;
if (num == 0)
tmp[i++]='0';
else while (num != 0)
tmp[i++] = digits[do_div(&num,base)];
if (i > precision)
precision = i;
size -= precision;
if (!(type&(ZEROPAD+LEFT)))
while(size-->0)
f += ' ';
if (sign)
f += sign;
if (type & SPECIAL)
{
if (base==8)
f += '0';
else if (base==16)
{
f += '0';
f += digits[33];
}
}
if (!(type & LEFT))
{
while (size-- > 0)
f += c;
}
while (i < precision--)
{
f += '0';
}
while (i-- > 0)
{
f += tmp[i];
}
while (size-- > 0)
{
f += ' ';
}
return true;
}
static bool numberf(std::string& f, double __n, char exp_sign, int size, int precision, int type)
{
double exponent = 0.0;
double e;
long ie;
//int x;
char *buf, *tmp;
int i = 0;
int j = 0;
//int k = 0;
double frac, intr;
double p;
char sign;
char c;
char ro = 0;
int result;
union
{
double* __n;
ieee_double_t* n;
} n;
n.__n = &__n;
if ( exp_sign == 'g' || exp_sign == 'G' || exp_sign == 'e' || exp_sign == 'E' ) {
ie = ((unsigned int)n.n->exponent - (unsigned int)0x3ff);
exponent = ie/3.321928;
}
if ( exp_sign == 'g' || exp_sign == 'G' ) {
type |= ZEROTRUNC;
if ( exponent < -4 || fabs(exponent) >= precision )
exp_sign -= 2; // g -> e and G -> E
}
if ( exp_sign == 'e' || exp_sign == 'E' ) {
frac = modf(exponent,&e);
if ( frac > 0.5 )
e++;
else if ( frac < -0.5 )
e--;
result = numberf(f,__n/pow(10.0L,e),'f',size-4, precision, type);
if (result < 0)
return false;
f += exp_sign;
size--;
ie = (long)e;
type = LEFT | PLUS;
if ( ie < 0 )
type |= SIGN;
result = number(f,ie, 10,2, 2,type );
if (result < 0)
return false;
return true;
}
if ( exp_sign == 'f' ) {
buf = (char*)alloca(4096);
if (type & LEFT) {
type &= ~ZEROPAD;
}
c = (type & ZEROPAD) ? '0' : ' ';
sign = 0;
if (type & SIGN) {
if (__n < 0) {
sign = '-';
__n = fabs(__n);
size--;
} else if (type & PLUS) {
sign = '+';
size--;
} else if (type & SPACE) {
sign = ' ';
size--;
}
}
frac = modf(__n,&intr);
// # flags forces a . and prevents trucation of trailing zero's
if ( precision > 0 ) {
//frac = modfl(__n,&intr);
i = precision-1;
while ( i >= 0 ) {
frac*=10.0L;
frac = modf(frac, &p);
buf[i] = (int)p + '0';
i--;
}
i = precision;
size -= precision;
ro = 0;
if ( frac > 0.5 ) {
ro = 1;
}
if ( precision >= 1 || type & SPECIAL) {
buf[i++] = '.';
size--;
}
}
if ( intr == 0.0 ) {
buf[i++] = '0';
size--;
}
else {
while ( intr > 0.0 ) {
p = intr;
intr/=10.0L;
modf(intr, &intr);
p -= 10.0*intr;
buf[i++] = (int)p + '0';
size--;
}
}
j = 0;
while ( j < i && ro == 1) {
if ( buf[j] >= '0' && buf[j] <= '8' ) {
buf[j]++;
ro = 0;
}
else if ( buf[j] == '9' ) {
buf[j] = '0';
}
j++;
}
if ( ro == 1 )
buf[i++] = '1';
buf[i] = 0;
size -= precision;
if (!(type&(ZEROPAD+LEFT)))
{
while(size-->0)
f += ' ';
}
if (sign)
{
f += sign;
}
if (!(type&(ZEROPAD+LEFT)))
while(size-->0)
{
f += ' ';
}
if (type & SPECIAL) {
}
if (!(type & LEFT))
while (size-- > 0)
{
f += c;
}
tmp = buf;
if ( type & ZEROTRUNC && ((type & SPECIAL) != SPECIAL) )
{
j = 0;
while ( j < i && ( *tmp == '0' || *tmp == '.' ))
{
tmp++;
i--;
}
}
// else
// while (i < precision--)
// putc('0', f);
while (i-- > 0)
{
f += tmp[i];
}
while (size-- > 0)
{
f += ' ';
}
}
return true;
}
static bool numberfl(std::string& f, long double __n, char exp_sign, int size, int precision, int type)
{
long double exponent = 0.0;
long double e;
long ie;
//int x;
char *buf, *tmp;
int i = 0;
int j = 0;
//int k = 0;
long double frac, intr;
long double p;
char sign;
char c;
char ro = 0;
int result;
union
{
long double* __n;
ieee_long_double_t* n;
} n;
n.__n = &__n;
if ( exp_sign == 'g' || exp_sign == 'G' || exp_sign == 'e' || exp_sign == 'E' ) {
ie = ((unsigned int)n.n->exponent - (unsigned int)0x3fff);
exponent = ie/3.321928;
}
if ( exp_sign == 'g' || exp_sign == 'G' ) {
type |= ZEROTRUNC;
if ( exponent < -4 || fabs(exponent) >= precision )
exp_sign -= 2; // g -> e and G -> E
}
if ( exp_sign == 'e' || exp_sign == 'E' ) {
frac = modfl(exponent,&e);
if ( frac > 0.5 )
e++;
else if ( frac < -0.5 )
e--;
result = numberf(f,__n/powl(10.0L,e),'f',size-4, precision, type);
if (result < 0)
return false;
f += exp_sign;
size--;
ie = (long)e;
type = LEFT | PLUS;
if ( ie < 0 )
type |= SIGN;
result = number(f,ie, 10,2, 2,type );
if (result < 0)
return false;
return true;
}
if ( exp_sign == 'f' )
{
buf = (char*)alloca(4096);
if (type & LEFT)
{
type &= ~ZEROPAD;
}
c = (type & ZEROPAD) ? '0' : ' ';
sign = 0;
if (type & SIGN)
{
if (__n < 0)
{
sign = '-';
__n = fabs(__n);
size--;
} else if (type & PLUS)
{
sign = '+';
size--;
} else if (type & SPACE)
{
sign = ' ';
size--;
}
}
frac = modfl(__n,&intr);
// # flags forces a . and prevents trucation of trailing zero's
if ( precision > 0 )
{
//frac = modfl(__n,&intr);
i = precision-1;
while ( i >= 0 )
{
frac*=10.0L;
frac = modfl((long double)frac, &p);
buf[i] = (int)p + '0';
i--;
}
i = precision;
size -= precision;
ro = 0;
if ( frac > 0.5 )
{
ro = 1;
}
if ( precision >= 1 || type & SPECIAL)
{
buf[i++] = '.';
size--;
}
}
if ( intr == 0.0 )
{
buf[i++] = '0';
size--;
}
else
{
while ( intr > 0.0 )
{
p=intr;
intr/=10.0L;
modfl(intr, &intr);
p -= 10.0L*intr;
buf[i++] = (int)p + '0';
size--;
}
}
j = 0;
while ( j < i && ro == 1) {
if ( buf[j] >= '0' && buf[j] <= '8' )
{
buf[j]++;
ro = 0;
}
else if ( buf[j] == '9' )
{
buf[j] = '0';
}
j++;
}
if ( ro == 1 )
buf[i++] = '1';
buf[i] = 0;
size -= precision;
if (!(type&(ZEROPAD+LEFT)))
{
while(size-->0)
f += ' ';
}
if (sign)
{
f += sign;
}
if (!(type&(ZEROPAD+LEFT)))
{
while(size-->0)
f += ' ';
}
if (type & SPECIAL) {
}
if (!(type & LEFT))
while (size-- > 0)
{
f += c;
}
tmp = buf;
if ( type & ZEROTRUNC && ((type & SPECIAL) != SPECIAL) )
{
j = 0;
while ( j < i && ( *tmp == '0' || *tmp == '.' ))
{
tmp++;
i--;
}
}
// else
// while (i < precision--)
// putc( '0', f);
while (i-- > 0)
{
f += tmp[i];
}
while (size-- > 0)
{
f += ' ';
}
}
return true;
}
static int stringa(std::string& f, const char* s, int len, int field_width, int precision, int flags)
{
int i, done = 0;
if (s == NULL)
{
s = "<NULL>";
len = 6;
}
else
{
if (len == -1)
{
len = 0;
while ((unsigned int)len < (unsigned int)precision && s[len])
len++;
}
else
{
if ((unsigned int)len > (unsigned int)precision)
len = precision;
}
}
if (!(flags & LEFT))
while (len < field_width--)
{
f += ' ';
done++;
}
for (i = 0; i < len; ++i)
{
f += *s++;
done++;
}
while (len < field_width--)
{
f += ' ';
done++;
}
return done;
}
static int stringw(std::string& f, const wchar_t* sw, int len, int field_width, int precision, int flags)
{
int i, done = 0;
if (sw == NULL)
{
sw = L"<NULL>";
len = 6;
}
else
{
if (len == -1)
{
len = 0;
while ((unsigned int)len < (unsigned int)precision && sw[len])
len++;
}
else
{
if ((unsigned int)len > (unsigned int)precision)
len = precision;
}
}
if (!(flags & LEFT))
while (len < field_width--)
{
f += ' ';
done++;
}
for (i = 0; i < len; ++i)
{
#define MY_MB_CUR_MAX 1
char mb[MY_MB_CUR_MAX];
int mbcount, j;
mbcount = wctomb(mb, *sw++);
if (mbcount <= 0)
{
break;
}
for (j = 0; j < mbcount; j++)
{
f += mb[j];
done++;
}
}
while (len < field_width--)
{
f += ' ';
done++;
}
return done;
}
#define _isnanl _isnan
#define _finitel _finite
std::string ssvprintf ( const char *fmt, va_list args )
{
ULONGLONG num;
int base;
long double _ldouble;
double _double;
const char *s;
const wchar_t* sw;
int result;
std::string f;
int flags; /* flags to number() */
int field_width; /* width of output field */
int precision; /* min. # of digits for integers; max
number of chars for from string */
int qualifier = 0; /* 'h', 'l', 'L' or 'I64' for integer fields */
for (; *fmt ; ++fmt)
{
if (*fmt != '%')
{
f += *fmt;
continue;
}
/* process flags */
flags = 0;
repeat:
++fmt; /* this also skips first '%' */
switch (*fmt) {
case '-': flags |= LEFT; goto repeat;
case '+': flags |= PLUS; goto repeat;
case ' ': flags |= SPACE; goto repeat;
case '#': flags |= SPECIAL; goto repeat;
case '0': flags |= ZEROPAD; goto repeat;
}
/* get field width */
field_width = -1;
if (isdigit(*fmt))
field_width = skip_atoi(&fmt);
else if (*fmt == '*') {
++fmt;
/* it's the next argument */
field_width = va_arg(args, int);
if (field_width < 0) {
field_width = -field_width;
flags |= LEFT;
}
}
/* get the precision */
precision = -1;
if (*fmt == '.') {
++fmt;
if (isdigit(*fmt))
precision = skip_atoi(&fmt);
else if (*fmt == '*') {
++fmt;
/* it's the next argument */
precision = va_arg(args, int);
}
if (precision < 0)
precision = 0;
}
/* get the conversion qualifier */
qualifier = 0;
// %Z can be just stand alone or as size_t qualifier
if ( *fmt == 'Z' ) {
qualifier = *fmt;
switch ( *(fmt+1)) {
case 'o':
case 'b':
case 'X':
case 'x':
case 'd':
case 'i':
case 'u':
++fmt;
break;
default:
break;
}
} else if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' || *fmt == 'w') {
qualifier = *fmt;
++fmt;
} else if (*fmt == 'I' && *(fmt+1) == '6' && *(fmt+2) == '4') {
qualifier = *fmt;
fmt += 3;
}
// go fine with ll instead of L
if ( *fmt == 'l' ) {
++fmt;
qualifier = 'L';
}
/* default base */
base = 10;
switch (*fmt) {
case 'c':
if (!(flags & LEFT))
while (--field_width > 0)
{
f += ' ';
}
if (qualifier == 'l' || qualifier == 'w')
{
f += (char)(unsigned char)(wchar_t) va_arg(args,int);
}
else
{
f += (char)(unsigned char) va_arg(args,int);
}
while (--field_width > 0)
{
f += ' ';
}
continue;
case 'C':
if (!(flags & LEFT))
while (--field_width > 0)
{
f += ' ';
}
if (qualifier == 'h')
{
f += (char)(unsigned char) va_arg(args,int);
}
else
{
f += (char)(unsigned char)(wchar_t) va_arg(args,int);
}
while (--field_width > 0)
{
f += ' ';
}
continue;
case 's':
if (qualifier == 'l' || qualifier == 'w') {
/* print unicode string */
sw = (const wchar_t*)va_arg(args, wchar_t *);
result = stringw(f, sw, -1, field_width, precision, flags);
} else {
/* print ascii string */
s = va_arg(args, char *);
result = stringa(f, s, -1, field_width, precision, flags);
}
if (result < 0)
{
assert(!"TODO FIXME handle error better");
return f;
}
continue;
case 'S':
if (qualifier == 'h') {
/* print ascii string */
s = va_arg(args, char *);
result = stringa(f, s, -1, field_width, precision, flags);
} else {
/* print unicode string */
sw = (const wchar_t*)va_arg(args, wchar_t *);
result = stringw(f, sw, -1, field_width, precision, flags);
}
if (result < 0)
{
assert(!"TODO FIXME handle error better");
return f;
}
continue;
/*case 'Z':
if (qualifier == 'w') {
// print counted unicode string
PUNICODE_STRING pus = va_arg(args, PUNICODE_STRING);
if ((pus == NULL) || (pus->Buffer == NULL)) {
sw = NULL;
len = -1;
} else {
sw = pus->Buffer;
len = pus->Length / sizeof(WCHAR);
}
result = stringw(f, sw, len, field_width, precision, flags);
} else {
// print counted ascii string
PANSI_STRING pas = va_arg(args, PANSI_STRING);
if ((pas == NULL) || (pas->Buffer == NULL)) {
s = NULL;
len = -1;
} else {
s = pas->Buffer;
len = pas->Length;
}
result = stringa(f, s, -1, field_width, precision, flags);
}
if (result < 0)
return -1;
continue;*/
case 'e':
case 'E':
case 'f':
case 'g':
case 'G':
if (qualifier == 'l' || qualifier == 'L' ) {
_ldouble = va_arg(args, long double);
if ( _isnanl(_ldouble) )
{
f += "Nan";
}
else if ( !_finitel(_ldouble) )
{
if ( _ldouble < 0 )
f += "-Inf";
else
f += "+Inf";
} else {
if ( precision == -1 )
precision = 6;
result = numberfl(f,_ldouble,*fmt,field_width,precision,flags);
if (result < 0)
{
assert(!"TODO FIXME handle error better");
return f;
}
}
} else {
_double = (double)va_arg(args, double);
if ( _isnan(_double) )
{
f += "Nan";
}
else if ( !_finite(_double) )
{
if ( _double < 0 )
f += "-Inf";
else
f += "+Inf";
}
else
{
if ( precision == -1 )
precision = 6;
result = numberf(f,_double,*fmt,field_width,precision,flags);
if (result < 0)
{
assert(!"TODO FIXME handle error better");
return f;
}
}
}
continue;
case 'p':
if (field_width == -1) {
field_width = 2*sizeof(void *);
flags |= ZEROPAD;
}
result = number(f,
(unsigned long) va_arg(args, void *), 16,
field_width, precision, flags);
if (result < 0)
{
assert(!"TODO FIXME handle error better");
return f;
}
continue;
case 'n':
if (qualifier == 'l') {
long * ip = va_arg(args, long *);
*ip = 0;
} else {
int * ip = va_arg(args, int *);
*ip = 0;
}
continue;
/* integer number formats - set up the flags and "break" */
case 'o':
base = 8;
break;
case 'b':
base = 2;
break;
case 'X':
flags |= LARGE;
case 'x':
base = 16;
break;
case 'd':
case 'i':
flags |= SIGN;
case 'u':
break;
default:
if (*fmt != '%')
{
f += '%';
}
if (*fmt)
{
f += *fmt;
}
else
--fmt;
continue;
}
if (qualifier == 'I')
num = va_arg(args, ULONGLONG);
else if (qualifier == 'l') {
if (flags & SIGN)
num = va_arg(args, long);
else
num = va_arg(args, unsigned long);
}
else if (qualifier == 'h') {
if (flags & SIGN)
num = va_arg(args, int);
else
num = va_arg(args, unsigned int);
}
else if (flags & SIGN)
num = va_arg(args, int);
else
num = va_arg(args, unsigned int);
result = number(f, num, base, field_width, precision, flags);
if (result < 0)
{
assert(!"TODO FIXME handle error better");
return f;
}
}
//putc('\0',f);
return f;
}

View File

@@ -1,12 +0,0 @@
// ssprintf.h
#ifndef SSPRINTF_H
#define SSPRINTF_H
#include <string>
#include <stdarg.h>
std::string ssprintf ( const char* fmt, ... );
std::string ssvprintf ( const char* fmt, va_list args );
#endif//SSPRINTF_H

View File

@@ -1,654 +0,0 @@
RPC_NT_ALREADY_LISTENING
RPC_NT_ALREADY_REGISTERED
RPC_NT_CALL_FAILED
RPC_NT_CALL_FAILED_DNE
RPC_NT_CANT_CREATE_ENDPOINT
RPC_NT_INVALID_BINDING
RPC_NT_INVALID_ENDPOINT_FORMAT
RPC_NT_INVALID_NETWORK_OPTIONS
RPC_NT_INVALID_NET_ADDR
RPC_NT_INVALID_RPC_PROTSEQ
RPC_NT_INVALID_STRING_BINDING
RPC_NT_INVALID_STRING_UUID
RPC_NT_INVALID_TIMEOUT
RPC_NT_NOT_LISTENING
RPC_NT_NO_BINDINGS
RPC_NT_NO_CALL_ACTIVE
RPC_NT_NO_ENDPOINT_FOUND
RPC_NT_NO_PROTSEQS
RPC_NT_NO_PROTSEQS_REGISTERED
RPC_NT_OBJECT_NOT_FOUND
RPC_NT_OUT_OF_RESOURCES
RPC_NT_PROTOCOL_ERROR
RPC_NT_PROTSEQ_NOT_SUPPORTED
RPC_NT_SERVER_TOO_BUSY
RPC_NT_SERVER_UNAVAILABLE
RPC_NT_SS_IN_NULL_CONTEXT
RPC_NT_TYPE_ALREADY_REGISTERED
RPC_NT_UNKNOWN_IF
RPC_NT_UNKNOWN_MGR_TYPE
RPC_NT_WRONG_KIND_OF_BINDING
STATUS_ABANDONED
STATUS_ABANDONED_WAIT_0
STATUS_ABANDONED_WAIT_63
STATUS_ABIOS_INVALID_COMMAND
STATUS_ABIOS_INVALID_LID
STATUS_ABIOS_INVALID_SELECTOR
STATUS_ABIOS_LID_ALREADY_OWNED
STATUS_ABIOS_LID_NOT_EXIST
STATUS_ABIOS_NOT_LID_OWNER
STATUS_ABIOS_NOT_PRESENT
STATUS_ABIOS_SELECTOR_NOT_AVAILABLE
STATUS_ACCESS_DENIED
STATUS_ACCESS_VIOLATION
STATUS_ACCOUNT_DISABLED
STATUS_ACCOUNT_EXPIRED
STATUS_ACCOUNT_LOCKED_OUT
STATUS_ACCOUNT_RESTRICTION
STATUS_ADAPTER_HARDWARE_ERROR
STATUS_ADDRESS_ALREADY_ASSOCIATED
STATUS_ADDRESS_ALREADY_EXISTS
STATUS_ADDRESS_CLOSED
STATUS_ADDRESS_NOT_ASSOCIATED
STATUS_AGENTS_EXHAUSTED
STATUS_ALERTED
STATUS_ALIAS_EXISTS
STATUS_ALLOCATE_BUCKET
STATUS_ALLOTTED_SPACE_EXCEEDED
STATUS_ALREADY_COMMITTED
STATUS_ALREADY_DISCONNECTED
STATUS_ALREADY_WIN32
STATUS_APP_INIT_FAILURE
STATUS_ARBITRATION_UNHANDLED
STATUS_ARRAY_BOUNDS_EXCEEDED
STATUS_AUDIT_FAILED
STATUS_BACKUP_CONTROLLER
STATUS_BAD_COMPRESSION_BUFFER
STATUS_BAD_CURRENT_DIRECTORY
STATUS_BAD_DESCRIPTOR_FORMAT
STATUS_BAD_DEVICE_TYPE
STATUS_BAD_DLL_ENTRYPOINT
STATUS_BAD_FUNCTION_TABLE
STATUS_BAD_IMPERSONATION_LEVEL
STATUS_BAD_INHERITANCE_ACL
STATUS_BAD_INITIAL_PC
STATUS_BAD_INITIAL_STACK
STATUS_BAD_LOGON_SESSION_STATE
STATUS_BAD_MASTER_BOOT_RECORD
STATUS_BAD_NETWORK_NAME
STATUS_BAD_NETWORK_PATH
STATUS_BAD_REMOTE_ADAPTER
STATUS_BAD_SERVICE_ENTRYPOINT
STATUS_BAD_STACK
STATUS_BAD_TOKEN_TYPE
STATUS_BAD_VALIDATION_CLASS
STATUS_BAD_WORKING_SET_LIMIT
STATUS_BEGINNING_OF_MEDIA
STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT
STATUS_BREAKPOINT
STATUS_BUFFER_OVERFLOW
STATUS_BUFFER_TOO_SMALL
STATUS_BUS_RESET
STATUS_CANCELLED
STATUS_CANNOT_DELETE
STATUS_CANNOT_IMPERSONATE
STATUS_CANNOT_LOAD_REGISTRY_FILE
STATUS_CANT_ACCESS_DOMAIN_INFO
STATUS_CANT_DISABLE_MANDATORY
STATUS_CANT_OPEN_ANONYMOUS
STATUS_CANT_TERMINATE_SELF
STATUS_CANT_WAIT
STATUS_CARDBUS_NOT_SUPPORTED
STATUS_CHECKING_FILE_SYSTEM
STATUS_CHILD_MUST_BE_VOLATILE
STATUS_CLIENT_SERVER_PARAMETERS_INVALID
STATUS_COMMITMENT_LIMIT
STATUS_CONFLICTING_ADDRESSES
STATUS_CONNECTION_ABORTED
STATUS_CONNECTION_ACTIVE
STATUS_CONNECTION_COUNT_LIMIT
STATUS_CONNECTION_DISCONNECTED
STATUS_CONNECTION_INVALID
STATUS_CONNECTION_IN_USE
STATUS_CONNECTION_REFUSED
STATUS_CONNECTION_RESET
STATUS_CONTROL_C_EXIT
STATUS_CONVERT_TO_LARGE
STATUS_COULD_NOT_INTERPRET
STATUS_CRC_ERROR
STATUS_CTL_FILE_NOT_SUPPORTED
STATUS_DATATYPE_MISALIGNMENT
STATUS_DATA_ERROR
STATUS_DATA_LATE_ERROR
STATUS_DATA_NOT_ACCEPTED
STATUS_DATA_OVERRUN
STATUS_DEBUG_ATTACH_FAILED
STATUS_DELETE_PENDING
STATUS_DEVICE_ALREADY_ATTACHED
STATUS_DEVICE_BUSY
STATUS_DEVICE_CONFIGURATION_ERROR
STATUS_DEVICE_DATA_ERROR
STATUS_DEVICE_DOES_NOT_EXIST
STATUS_DEVICE_NOT_CONNECTED
STATUS_DEVICE_NOT_PARTITIONED
STATUS_DEVICE_NOT_READY
STATUS_DEVICE_OFF_LINE
STATUS_DEVICE_PAPER_EMPTY
STATUS_DEVICE_POWERED_OFF
STATUS_DEVICE_POWER_FAILURE
STATUS_DEVICE_PROTOCOL_ERROR
STATUS_DFS_EXIT_PATH_FOUND
STATUS_DFS_UNAVAILABLE
STATUS_DIRECTORY_NOT_EMPTY
STATUS_DISK_CORRUPT_ERROR
STATUS_DISK_FULL
STATUS_DISK_OPERATION_FAILED
STATUS_DISK_RECALIBRATE_FAILED
STATUS_DISK_RESET_FAILED
STATUS_DLL_INIT_FAILED
STATUS_DLL_INIT_FAILED_LOGOFF
STATUS_DLL_NOT_FOUND
STATUS_DOMAIN_CONTROLLER_NOT_FOUND
STATUS_DOMAIN_CTRLR_CONFIG_ERROR
STATUS_DOMAIN_EXISTS
STATUS_DOMAIN_LIMIT_EXCEEDED
STATUS_DOMAIN_TRUST_INCONSISTENT
STATUS_DRIVER_CANCEL_TIMEOUT
STATUS_DRIVER_ENTRYPOINT_NOT_FOUND
STATUS_DRIVER_INTERNAL_ERROR
STATUS_DRIVER_ORDINAL_NOT_FOUND
STATUS_DRIVER_UNABLE_TO_LOAD
STATUS_DUPLICATE_NAME
STATUS_DUPLICATE_OBJECTID
STATUS_EAS_NOT_SUPPORTED
STATUS_EA_CORRUPT_ERROR
STATUS_EA_LIST_INCONSISTENT
STATUS_EA_TOO_LARGE
STATUS_END_OF_FILE
STATUS_END_OF_MEDIA
STATUS_ENTRYPOINT_NOT_FOUND
STATUS_EOM_OVERFLOW
STATUS_EVALUATION_EXPIRATION
STATUS_EVENTLOG_CANT_START
STATUS_EVENTLOG_FILE_CHANGED
STATUS_EVENTLOG_FILE_CORRUPT
STATUS_EVENT_DONE
STATUS_EVENT_PENDING
STATUS_EXTRANEOUS_INFORMATION
STATUS_FAIL_CHECK
STATUS_FATAL_APP_EXIT
STATUS_FILEMARK_DETECTED
STATUS_FILES_OPEN
STATUS_FILE_CLOSED
STATUS_FILE_CORRUPT_ERROR
STATUS_FILE_DELETED
STATUS_FILE_FORCED_CLOSED
STATUS_FILE_INVALID
STATUS_FILE_IS_A_DIRECTORY
STATUS_FILE_IS_OFFLINE
STATUS_FILE_LOCK_CONFLICT
STATUS_FILE_RENAMED
STATUS_FLOAT_DENORMAL_OPERAND
STATUS_FLOAT_DIVIDE_BY_ZERO
STATUS_FLOAT_INEXACT_RESULT
STATUS_FLOAT_INVALID_OPERATION
STATUS_FLOAT_OVERFLOW
STATUS_FLOAT_STACK_CHECK
STATUS_FLOAT_UNDERFLOW
STATUS_FLOPPY_BAD_REGISTERS
STATUS_FLOPPY_ID_MARK_NOT_FOUND
STATUS_FLOPPY_UNKNOWN_ERROR
STATUS_FLOPPY_VOLUME
STATUS_FLOPPY_WRONG_CYLINDER
STATUS_FOUND_OUT_OF_SCOPE
STATUS_FREE_VM_NOT_AT_BASE
STATUS_FS_DRIVER_REQUIRED
STATUS_FT_MISSING_MEMBER
STATUS_FT_ORPHANING
STATUS_FT_READ_RECOVERING_FROM_BACKUP
STATUS_FT_WRITE_RECOVERY
STATUS_FULLSCREEN_MODE
STATUS_GENERIC_NOT_MAPPED
STATUS_GRACEFUL_DISCONNECT
STATUS_GROUP_EXISTS
STATUS_GUARD_PAGE_VIOLATION
STATUS_GUIDS_EXHAUSTED
STATUS_GUID_SUBSTITUTION_MADE
STATUS_HANDLES_CLOSED
STATUS_HANDLE_NOT_CLOSABLE
STATUS_HOST_UNREACHABLE
STATUS_ILLEGAL_CHARACTER
STATUS_ILLEGAL_DLL_RELOCATION
STATUS_ILLEGAL_FLOAT_CONTEXT
STATUS_ILLEGAL_FUNCTION
STATUS_ILLEGAL_INSTRUCTION
STATUS_ILL_FORMED_PASSWORD
STATUS_ILL_FORMED_SERVICE_ENTRY
STATUS_IMAGE_ALREADY_LOADED
STATUS_IMAGE_CHECKSUM_MISMATCH
STATUS_IMAGE_MACHINE_TYPE_MISMATCH
STATUS_IMAGE_MACHINE_TYPE_MISMATCH_EXE
STATUS_IMAGE_MP_UP_MISMATCH
STATUS_IMAGE_NOT_AT_BASE
STATUS_INCOMPATIBLE_FILE_MAP
STATUS_INFO_LENGTH_MISMATCH
STATUS_INSTANCE_NOT_AVAILABLE
STATUS_INSTRUCTION_MISALIGNMENT
STATUS_INSUFFICIENT_LOGON_INFO
STATUS_INSUFFICIENT_RESOURCES
STATUS_INSUFF_SERVER_RESOURCES
STATUS_INTEGER_DIVIDE_BY_ZERO
STATUS_INTEGER_OVERFLOW
STATUS_INTERNAL_DB_CORRUPTION
STATUS_INTERNAL_DB_ERROR
STATUS_INTERNAL_ERROR
STATUS_INVALID_ACCOUNT_NAME
STATUS_INVALID_ACL
STATUS_INVALID_ADDRESS
STATUS_INVALID_ADDRESS_COMPONENT
STATUS_INVALID_ADDRESS_WILDCARD
STATUS_INVALID_BLOCK_LENGTH
STATUS_INVALID_BUFFER_SIZE
STATUS_INVALID_CID
STATUS_INVALID_COMPUTER_NAME
STATUS_INVALID_CONNECTION
STATUS_INVALID_DEVICE_REQUEST
STATUS_INVALID_DEVICE_STATE
STATUS_INVALID_DISPOSITION
STATUS_INVALID_DOMAIN_ROLE
STATUS_INVALID_DOMAIN_STATE
STATUS_INVALID_EA_FLAG
STATUS_INVALID_EA_NAME
STATUS_INVALID_FILE_FOR_SECTION
STATUS_INVALID_GROUP_ATTRIBUTES
STATUS_INVALID_HANDLE
STATUS_INVALID_HW_PROFILE
STATUS_INVALID_ID_AUTHORITY
STATUS_INVALID_IMAGE_FORMAT
STATUS_INVALID_IMAGE_LE_FORMAT
STATUS_INVALID_IMAGE_NE_FORMAT
STATUS_INVALID_IMAGE_NOT_MZ
STATUS_INVALID_IMAGE_PROTECT
STATUS_INVALID_IMAGE_WIN_16
STATUS_INVALID_INFO_CLASS
STATUS_INVALID_LDT_DESCRIPTOR
STATUS_INVALID_LDT_OFFSET
STATUS_INVALID_LDT_SIZE
STATUS_INVALID_LEVEL
STATUS_INVALID_LOCK_SEQUENCE
STATUS_INVALID_LOGON_HOURS
STATUS_INVALID_LOGON_TYPE
STATUS_INVALID_MEMBER
STATUS_INVALID_NETWORK_RESPONSE
STATUS_INVALID_OPLOCK_PROTOCOL
STATUS_INVALID_OWNER
STATUS_INVALID_PAGE_PROTECTION
STATUS_INVALID_PARAMETER
STATUS_INVALID_PARAMETER_1
STATUS_INVALID_PARAMETER_10
STATUS_INVALID_PARAMETER_11
STATUS_INVALID_PARAMETER_12
STATUS_INVALID_PARAMETER_2
STATUS_INVALID_PARAMETER_3
STATUS_INVALID_PARAMETER_4
STATUS_INVALID_PARAMETER_5
STATUS_INVALID_PARAMETER_6
STATUS_INVALID_PARAMETER_7
STATUS_INVALID_PARAMETER_8
STATUS_INVALID_PARAMETER_9
STATUS_INVALID_PARAMETER_MIX
STATUS_INVALID_PIPE_STATE
STATUS_INVALID_PLUGPLAY_DEVICE_PATH
STATUS_INVALID_PORT_ATTRIBUTES
STATUS_INVALID_PORT_HANDLE
STATUS_INVALID_PRIMARY_GROUP
STATUS_INVALID_QUOTA_LOWER
STATUS_INVALID_READ_MODE
STATUS_INVALID_SECURITY_DESCR
STATUS_INVALID_SERVER_STATE
STATUS_INVALID_SID
STATUS_INVALID_SUB_AUTHORITY
STATUS_INVALID_SYSTEM_SERVICE
STATUS_INVALID_UNWIND_TARGET
STATUS_INVALID_USER_BUFFER
STATUS_INVALID_VARIANT
STATUS_INVALID_VIEW_SIZE
STATUS_INVALID_VLM_OPERATION
STATUS_INVALID_VOLUME_LABEL
STATUS_INVALID_WORKSTATION
STATUS_IN_PAGE_ERROR
STATUS_IO_DEVICE_ERROR
STATUS_IO_PRIVILEGE_FAILED
STATUS_IO_REPARSE_DATA_INVALID
STATUS_IO_REPARSE_TAG_INVALID
STATUS_IO_REPARSE_TAG_MISMATCH
STATUS_IO_REPARSE_TAG_NOT_HANDLED
STATUS_IO_TIMEOUT
STATUS_IP_ADDRESS_CONFLICT1
STATUS_IP_ADDRESS_CONFLICT2
STATUS_KERNEL_APC
STATUS_KEY_DELETED
STATUS_KEY_HAS_CHILDREN
STATUS_LAST_ADMIN
STATUS_LICENSE_QUOTA_EXCEEDED
STATUS_LICENSE_VIOLATION
STATUS_LINK_FAILED
STATUS_LINK_TIMEOUT
STATUS_LM_CROSS_ENCRYPTION_REQUIRED
STATUS_LOCAL_DISCONNECT
STATUS_LOCAL_USER_SESSION_KEY
STATUS_LOCK_NOT_GRANTED
STATUS_LOGIN_TIME_RESTRICTION
STATUS_LOGIN_WKSTA_RESTRICTION
STATUS_LOGON_FAILURE
STATUS_LOGON_NOT_GRANTED
STATUS_LOGON_SERVER_CONFLICT
STATUS_LOGON_SESSION_COLLISION
STATUS_LOGON_SESSION_EXISTS
STATUS_LOGON_TYPE_NOT_GRANTED
STATUS_LOG_FILE_FULL
STATUS_LOG_HARD_ERROR
STATUS_LONGJUMP
STATUS_LOST_WRITEBEHIND_DATA
STATUS_LPC_REPLY_LOST
STATUS_LUIDS_EXHAUSTED
STATUS_MAPPED_ALIGNMENT
STATUS_MAPPED_FILE_SIZE_ZERO
STATUS_MARSHALL_OVERFLOW
STATUS_MEDIA_CHANGED
STATUS_MEDIA_CHECK
STATUS_MEDIA_WRITE_PROTECTED
STATUS_MEMBERS_PRIMARY_GROUP
STATUS_MEMBER_IN_ALIAS
STATUS_MEMBER_IN_GROUP
STATUS_MEMBER_NOT_IN_ALIAS
STATUS_MEMBER_NOT_IN_GROUP
STATUS_MEMORY_NOT_ALLOCATED
STATUS_MESSAGE_NOT_FOUND
STATUS_MISSING_SYSTEMFILE
STATUS_MORE_ENTRIES
STATUS_MORE_PROCESSING_REQUIRED
STATUS_MUTANT_LIMIT_EXCEEDED
STATUS_MUTANT_NOT_OWNED
STATUS_NAME_TOO_LONG
STATUS_NETLOGON_NOT_STARTED
STATUS_NETWORK_ACCESS_DENIED
STATUS_NETWORK_BUSY
STATUS_NETWORK_CREDENTIAL_CONFLICT
STATUS_NETWORK_NAME_DELETED
STATUS_NETWORK_UNREACHABLE
STATUS_NET_WRITE_FAULT
STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT
STATUS_NOLOGON_SERVER_TRUST_ACCOUNT
STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT
STATUS_NONCONTINUABLE_EXCEPTION
STATUS_NONEXISTENT_EA_ENTRY
STATUS_NONEXISTENT_SECTOR
STATUS_NONE_MAPPED
STATUS_NOTIFY_CLEANUP
STATUS_NOTIFY_ENUM_DIR
STATUS_NOT_ALL_ASSIGNED
STATUS_NOT_A_DIRECTORY
STATUS_NOT_A_REPARSE_POINT
STATUS_NOT_CLIENT_SESSION
STATUS_NOT_COMMITTED
STATUS_NOT_FOUND
STATUS_NOT_IMPLEMENTED
STATUS_NOT_LOCKED
STATUS_NOT_LOGON_PROCESS
STATUS_NOT_MAPPED_DATA
STATUS_NOT_MAPPED_VIEW
STATUS_NOT_REGISTRY_FILE
STATUS_NOT_SAME_DEVICE
STATUS_NOT_SERVER_SESSION
STATUS_NOT_SUPPORTED
STATUS_NOT_TINY_STREAM
STATUS_NO_BROWSER_SERVERS_FOUND
STATUS_NO_CALLBACK_ACTIVE
STATUS_NO_DATA_DETECTED
STATUS_NO_EAS_ON_FILE
STATUS_NO_EVENT_PAIR
STATUS_NO_GUID_TRANSLATION
STATUS_NO_IMPERSONATION_TOKEN
STATUS_NO_INHERITANCE
STATUS_NO_LDT
STATUS_NO_LOGON_SERVERS
STATUS_NO_LOG_SPACE
STATUS_NO_MATCH
STATUS_NO_MEDIA
STATUS_NO_MEDIA_IN_DEVICE
STATUS_NO_MEMORY
STATUS_NO_MORE_EAS
STATUS_NO_MORE_ENTRIES
STATUS_NO_MORE_FILES
STATUS_NO_MORE_MATCHES
STATUS_NO_PAGEFILE
STATUS_NO_QUOTAS_NO_ACCOUNT
STATUS_NO_SECURITY_ON_OBJECT
STATUS_NO_SPOOL_SPACE
STATUS_NO_SUCH_ALIAS
STATUS_NO_SUCH_DEVICE
STATUS_NO_SUCH_DOMAIN
STATUS_NO_SUCH_FILE
STATUS_NO_SUCH_GROUP
STATUS_NO_SUCH_LOGON_SESSION
STATUS_NO_SUCH_MEMBER
STATUS_NO_SUCH_PACKAGE
STATUS_NO_SUCH_PRIVILEGE
STATUS_NO_SUCH_USER
STATUS_NO_TOKEN
STATUS_NO_TRUST_LSA_SECRET
STATUS_NO_TRUST_SAM_ACCOUNT
STATUS_NO_USER_SESSION_KEY
STATUS_NO_YIELD_PERFORMED
STATUS_NT_CROSS_ENCRYPTION_REQUIRED
STATUS_NULL_LM_PASSWORD
STATUS_OBJECTID_EXISTS
STATUS_OBJECT_EXISTS
STATUS_OBJECT_NAME_COLLISION
STATUS_OBJECT_NAME_EXISTS
STATUS_OBJECT_NAME_INVALID
STATUS_OBJECT_NAME_NOT_FOUND
STATUS_OBJECT_PATH_INVALID
STATUS_OBJECT_PATH_NOT_FOUND
STATUS_OBJECT_PATH_SYNTAX_BAD
STATUS_OBJECT_TYPE_MISMATCH
STATUS_OPEN_FAILED
STATUS_OPLOCK_BREAK_IN_PROCESS
STATUS_OPLOCK_NOT_GRANTED
STATUS_ORDINAL_NOT_FOUND
STATUS_PAGEFILE_CREATE_FAILED
STATUS_PAGEFILE_QUOTA
STATUS_PAGEFILE_QUOTA_EXCEEDED
STATUS_PARITY_ERROR
STATUS_PARTIAL_COPY
STATUS_PARTITION_FAILURE
STATUS_PASSWORD_EXPIRED
STATUS_PASSWORD_MUST_CHANGE
STATUS_PASSWORD_RESTRICTION
STATUS_PATH_NOT_COVERED
STATUS_PENDING
STATUS_PIPE_BROKEN
STATUS_PIPE_BUSY
STATUS_PIPE_CLOSING
STATUS_PIPE_CONNECTED
STATUS_PIPE_DISCONNECTED
STATUS_PIPE_EMPTY
STATUS_PIPE_LISTENING
STATUS_PIPE_NOT_AVAILABLE
STATUS_PLUGPLAY_NO_DEVICE
STATUS_PORT_ALREADY_SET
STATUS_PORT_CONNECTION_REFUSED
STATUS_PORT_DISCONNECTED
STATUS_PORT_MESSAGE_TOO_LONG
STATUS_PORT_UNREACHABLE
STATUS_POSSIBLE_DEADLOCK
STATUS_PREDEFINED_HANDLE
STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED
STATUS_PRINT_CANCELLED
STATUS_PRINT_QUEUE_FULL
STATUS_PRIVILEGED_INSTRUCTION
STATUS_PRIVILEGE_NOT_HELD
STATUS_PROCEDURE_NOT_FOUND
STATUS_PROCESS_IN_JOB
STATUS_PROCESS_IS_TERMINATING
STATUS_PROCESS_NOT_IN_JOB
STATUS_PROFILING_AT_LIMIT
STATUS_PROFILING_NOT_STARTED
STATUS_PROFILING_NOT_STOPPED
STATUS_PROPSET_NOT_FOUND
STATUS_PROTOCOL_UNREACHABLE
STATUS_PWD_HISTORY_CONFLICT
STATUS_PWD_TOO_RECENT
STATUS_PWD_TOO_SHORT
STATUS_QUOTA_EXCEEDED
STATUS_QUOTA_LIST_INCONSISTENT
STATUS_RANGE_LIST_CONFLICT
STATUS_RANGE_NOT_FOUND
STATUS_RANGE_NOT_LOCKED
STATUS_RECEIVE_EXPEDITED
STATUS_RECEIVE_PARTIAL
STATUS_RECEIVE_PARTIAL_EXPEDITED
STATUS_RECOVERY_FAILURE
STATUS_REDIRECTOR_HAS_OPEN_HANDLES
STATUS_REDIRECTOR_NOT_STARTED
STATUS_REDIRECTOR_PAUSED
STATUS_REDIRECTOR_STARTED
STATUS_REGISTRY_CORRUPT
STATUS_REGISTRY_IO_FAILED
STATUS_REGISTRY_QUOTA_LIMIT
STATUS_REGISTRY_RECOVERED
STATUS_REMOTE_DISCONNECT
STATUS_REMOTE_NOT_LISTENING
STATUS_REMOTE_RESOURCES
STATUS_REMOTE_SESSION_LIMIT
STATUS_REPARSE
STATUS_REPLY_MESSAGE_MISMATCH
STATUS_REQUEST_ABORTED
STATUS_REQUEST_NOT_ACCEPTED
STATUS_RESOURCE_DATA_NOT_FOUND
STATUS_RESOURCE_LANG_NOT_FOUND
STATUS_RESOURCE_NAME_NOT_FOUND
STATUS_RESOURCE_NOT_OWNED
STATUS_RESOURCE_TYPE_NOT_FOUND
STATUS_RETRY
STATUS_REVISION_MISMATCH
STATUS_RXACT_COMMITTED
STATUS_RXACT_COMMIT_FAILURE
STATUS_RXACT_COMMIT_NECESSARY
STATUS_RXACT_INVALID_STATE
STATUS_RXACT_STATE_CREATED
STATUS_SAM_INIT_FAILURE
STATUS_SECRET_TOO_LONG
STATUS_SECTION_NOT_EXTENDED
STATUS_SECTION_NOT_IMAGE
STATUS_SECTION_PROTECTION
STATUS_SECTION_TOO_BIG
STATUS_SEGMENT_NOTIFICATION
STATUS_SEMAPHORE_LIMIT_EXCEEDED
STATUS_SERIAL_COUNTER_TIMEOUT
STATUS_SERIAL_MORE_WRITES
STATUS_SERIAL_NO_DEVICE_INITED
STATUS_SERVER_DISABLED
STATUS_SERVER_HAS_OPEN_HANDLES
STATUS_SERVER_NOT_DISABLED
STATUS_SERVICE_NOTIFICATION
STATUS_SETMARK_DETECTED
STATUS_SHARED_IRQ_BUSY
STATUS_SHARING_PAUSED
STATUS_SHARING_VIOLATION
STATUS_SINGLE_STEP
STATUS_SOME_NOT_MAPPED
STATUS_SPECIAL_ACCOUNT
STATUS_SPECIAL_GROUP
STATUS_SPECIAL_USER
STATUS_STACK_OVERFLOW
STATUS_STACK_OVERFLOW_READ
STATUS_SUCCESS
STATUS_SUSPEND_COUNT_EXCEEDED
STATUS_SYNCHRONIZATION_REQUIRED
STATUS_SYSTEM_PROCESS_TERMINATED
STATUS_THREAD_IS_TERMINATING
STATUS_THREAD_NOT_IN_PROCESS
STATUS_THREAD_WAS_SUSPENDED
STATUS_TIMEOUT
STATUS_TIMER_NOT_CANCELED
STATUS_TIMER_RESOLUTION_NOT_SET
STATUS_TIMER_RESUME_IGNORED
STATUS_TIME_DIFFERENCE_AT_DC
STATUS_TOKEN_ALREADY_IN_USE
STATUS_TOO_LATE
STATUS_TOO_MANY_ADDRESSES
STATUS_TOO_MANY_COMMANDS
STATUS_TOO_MANY_CONTEXT_IDS
STATUS_TOO_MANY_GUIDS_REQUESTED
STATUS_TOO_MANY_LINKS
STATUS_TOO_MANY_LUIDS_REQUESTED
STATUS_TOO_MANY_NAMES
STATUS_TOO_MANY_NODES
STATUS_TOO_MANY_OPENED_FILES
STATUS_TOO_MANY_PAGING_FILES
STATUS_TOO_MANY_SECRETS
STATUS_TOO_MANY_SESSIONS
STATUS_TOO_MANY_SIDS
STATUS_TOO_MANY_THREADS
STATUS_TRANSACTION_ABORTED
STATUS_TRANSACTION_INVALID_ID
STATUS_TRANSACTION_INVALID_TYPE
STATUS_TRANSACTION_NO_MATCH
STATUS_TRANSACTION_NO_RELEASE
STATUS_TRANSACTION_RESPONDED
STATUS_TRANSACTION_TIMED_OUT
STATUS_TRUSTED_DOMAIN_FAILURE
STATUS_TRUSTED_RELATIONSHIP_FAILURE
STATUS_TRUST_FAILURE
STATUS_UNABLE_TO_DECOMMIT_VM
STATUS_UNABLE_TO_DELETE_SECTION
STATUS_UNABLE_TO_FREE_VM
STATUS_UNABLE_TO_LOCK_MEDIA
STATUS_UNABLE_TO_UNLOAD_MEDIA
STATUS_UNDEFINED_CHARACTER
STATUS_UNEXPECTED_IO_ERROR
STATUS_UNEXPECTED_MM_CREATE_ERR
STATUS_UNEXPECTED_MM_EXTEND_ERR
STATUS_UNEXPECTED_MM_MAP_ERROR
STATUS_UNEXPECTED_NETWORK_ERROR
STATUS_UNHANDLED_EXCEPTION
STATUS_UNKNOWN_REVISION
STATUS_UNMAPPABLE_CHARACTER
STATUS_UNRECOGNIZED_MEDIA
STATUS_UNRECOGNIZED_VOLUME
STATUS_UNSUCCESSFUL
STATUS_UNSUPPORTED_COMPRESSION
STATUS_UNWIND
STATUS_USER_APC
STATUS_USER_EXISTS
STATUS_USER_MAPPED_FILE
STATUS_USER_SESSION_DELETED
STATUS_VALIDATE_CONTINUE
STATUS_VARIABLE_NOT_FOUND
STATUS_VDM_HARD_ERROR
STATUS_VERIFY_REQUIRED
STATUS_VIRTUAL_CIRCUIT_CLOSED
STATUS_VOLUME_DISMOUNTED
STATUS_VOLUME_MOUNTED
STATUS_WAIT_0
STATUS_WAIT_63
STATUS_WAKE_SYSTEM_DEBUGGER
STATUS_WAS_LOCKED
STATUS_WAS_UNLOCKED
STATUS_WORKING_SET_LIMIT_RANGE
STATUS_WORKING_SET_QUOTA
STATUS_WRONG_PASSWORD
STATUS_WRONG_PASSWORD_CORE
STATUS_WRONG_VOLUME
STATUS_WX86_BREAKPOINT
STATUS_WX86_CONTINUE
STATUS_WX86_CREATEWX86TIB
STATUS_WX86_EXCEPTION_CHAIN
STATUS_WX86_EXCEPTION_CONTINUE
STATUS_WX86_EXCEPTION_LASTCHANCE
STATUS_WX86_FLOAT_STACK_CHECK
STATUS_WX86_INTERNAL_ERROR
STATUS_WX86_SINGLE_STEP
STATUS_WX86_UNSIMULATE

View File

@@ -1,7 +0,0 @@
FAST_MUTEX
KPCR
PEB
TEB
SPINLOCK
APC
DPC

View File

@@ -1,73 +0,0 @@
What do you think I am, your personal tech support?
You *know* a %stru% is non-re-entrant, right?
The answer to that is so simple, I'm not going to waste my time telling you.
Well, of course... if you're not below DISPATCH_LEVEL, ros is gonna explode on ya when you try to do that ( duh! ).
I don't think that functionality has been implemented, yet.
What do you mean it crashed? It can't crash there!
Wow. That's a new one.
Ask %dev%, I bet he knows.. he knows everything...
When's the last time you rebuilt?
Have you tried a make clean?
Is it plugged in?
Well it works on *my* system :P
Well don't do that, and you won't have that problem.
Didn't we already fix that?
Well... I don't know.. I just have that code disabled in my tree.
Try surrounding it with parenthesis.
Don't you know going around dereferncing null pointers all day can be hazardous to your health?
Well, duh!
There's a bit in cr3 for problems like that.
Just add a field to the %stru% to keep track of it!
Don't worry about it... the garbage collector in %module% will clean it up for you.
Did I do that?
Didn't %dev% fix that already?
Yes, I think I've seen that bug before... no... that was another program.
I could tell you, but then I'd have to unlink() you.
Well if you'd get some sleep, maybe you'd figure it out... not all of us can keep the hours %dev% can...
You did what? Uh oh... that can't be good.
Well... I could tell you, but the answer's pretty complicated. Why don't you wait to read about it in the book I'm writing.
Yeah, that's happened to me, before, too. All you have to do is wrap it in an SEH block and forget about it.
Just put a NULL dereference in there and commit it. It helps get bugs fixed fast! (Not that I would know)
ASSERT is your friend!
I dunno.. but I bet %dev% could find it for you.
I hereby declare that code is perfect. Your problem must be elsewhere.
I wrote that code... it must be perfect.
$#@!$ One of these days I'm gonna throw %module% out the window!!! Sorry, what were you saying?
maybe I broke it in my last commit. Maybe I did it on purpose...
Have you tried debugging it? I got a can of Raid...
Just delete it, it can't be that important ( You should see all the useless cruft I got rid of in %module% )
Try queueing a work item...
My %stru% fell in love with some %stru% in %module%, and %module% has been hell since...
Maybe the PEB is getting corrupted. Try allocating a new PEB and overwriting the old one. That's what I did last time I had a bug like that.
Hmm.. that seems to have been introduced by my last commit... I bet CVS mixed up the bits during the commit.
It can't possibly be my fault, so I don't care.
I'm not experiencing that problem, perhaps it's all in your mind.
Well... like a good friend of mine said... "Don't Panic!"
It just shows you how far ReactOS has come along! A %period% ago a bug like that wouldn't have even been possible!
Just surround the code with an #if 0/#endif block, it solves all my problems!
You know.. if %dev% would just finish %module% for us, we wouldn't be having this problem.
I say we move on to the next function, since we can't seem to figure this one out.
Well, sure, that would have been my first guess, too.... TEN YEARS AGO :p
yup, that sounds like a problem.
If I wanted to talk about VB, I'd go bug Alex...
ask %dev%
Thank you for that amazingly keen insight, Commander Obvious.
Sorry, can't help you right now, trying to track down this bug %dev% caused in %module%
I dont know about that, but I just fixed a problem in %module% for %dev%
How should I know? I'm still trying to figure out this main() thing... ooh! wanna see what I did in %module%?
lol!
*wink*
;)
42
It's gonna take me over %period% to fix all %dev%'s bugs in %module% :(
How could %func% return %status%!? It bet %dev% broke it! I didn't touch it... honest! no.. really! (me hides)
It's fine if you get %status% there ... just ignore the destruction, and call %func% instead.
%dev% said %status% isn't really an error in this context because we expect %module% to be toast by now
heh, I'm still trying to figure out why %func% is returning %status% when I call it from %module%...
%dev% said it's okay to ignore that as long as you're below %irql%
erm, what do you mean?
damn, I do that all the time
if you want a reply that sounds right, I'd say that %func% support for that is vital to the future of %module%
Sounds like you're having a problem with %func%. I hate that thing... don't talk to me about it.
Just return %status% and forget about it. Someone else will fix it, later.
Blah blah blah... sheesh... can't you figure out *anything*?

View File

@@ -1,17 +0,0 @@
// trim.cpp
// This file is (C) 2004 Royce Mitchell III
// and released under the BSD & LGPL licenses
#include "trim.h"
std::string trim ( const std::string& s )
{
const char* p = &s[0];
const char* p2 = p + s.size();
while ( *p == ' ' )
p++;
while ( p2 > p && p2[-1] == ' ' )
p2--;
return std::string ( p, p2-p );
}

View File

@@ -1,13 +0,0 @@
// trim.h
// This file is (C) 2004 Royce Mitchell III
// and released under the BSD & LGPL licenses
#ifndef TRIM_H
#define TRIM_H
#include <string>
std::string trim ( const std::string& s );
#endif//TRIM_H

File diff suppressed because it is too large Load Diff

View File

@@ -1,37 +0,0 @@
// verify.h
// This code is (C) 2003-2004 Royce Mitchell III
// and released under the LGPL & BSD licenses
#ifndef VERIFY_H
#define VERIFY_H
//#include <assert.h>
#ifdef ASSERT
#undef ASSERT
#endif//ASSERT
#include "panic.h"
#if defined(DEBUG) || defined(_DEBUG)
inline void AssertHandler ( bool b, const char* str )
{
if ( !b )
panic ( str );
}
# define ASSERT(x) AssertHandler((x) ? true : false, #x )
#else
# define ASSERT(x)
#endif
#ifdef verify
#undef verify
#endif//verify
#if defined(DEBUG) || defined(_DEBUG)
# define verify(x) ASSERT(x)
#else
# define verify(x) x
#endif
#endif//VERIFY_H

View File

@@ -1,32 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following
// attributes.
//
// change them to the information which is associated with the assembly
// you compile.
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// The assembly version has following format :
//
// Major.Minor.Build.Revision
//
// You can specify all values by your own or you can build default build and revision
// numbers with the '*' character (the default):
[assembly: AssemblyVersion("1.0.*")]
// The following attributes specify the key for the sign of your assembly. See the
// .NET Framework documentation for more information about signing.
// This is not required, if you don't want signing let these attributes like they're.
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]

View File

@@ -1,274 +0,0 @@
using System;
using System.Collections;
using System.IO;
using System.Text;
using System.Globalization;
namespace HtmlHelp.ChmDecoding
{
/// <summary>
/// The class <c>BinaryReaderHelp</c> implements static helper methods for extracting binary data
/// from a binary reader object.
/// </summary>
internal class BinaryReaderHelp
{
/// <summary>
/// Internal helper method to extract null-terminated strings from a binary reader
/// </summary>
/// <param name="binReader">reference to the binary reader</param>
/// <param name="offset">offset in the stream</param>
/// <param name="noOffset">true if the offset value should be used</param>
/// <param name="encoder">encoder used for text encoding</param>
/// <returns>An extracted string value</returns>
internal static string ExtractString(ref BinaryReader binReader, int offset, bool noOffset, Encoding encoder)
{
string strReturn = "";
if(encoder == null)
encoder = Encoding.ASCII;
ArrayList nameBytes = new ArrayList();
byte curByte;
if(!noOffset)
binReader.BaseStream.Seek(offset, SeekOrigin.Begin);
if(binReader.BaseStream.Position >= binReader.BaseStream.Length)
return "";
curByte = binReader.ReadByte();
while( (curByte != (byte)0) && (binReader.BaseStream.Position < binReader.BaseStream.Length) )
{
nameBytes.Add( curByte );
curByte = binReader.ReadByte();
}
byte[] name = (byte[]) (nameBytes.ToArray(System.Type.GetType("System.Byte")));
strReturn = encoder.GetString(name,0,name.Length);
return strReturn;
}
/// <summary>
/// Internal helper method to extract a string with a specific length from the binary reader
/// </summary>
/// <param name="binReader">reference to the binary reader</param>
/// <param name="length">length of the string (number of bytes)</param>
/// <param name="offset">offset in the stream</param>
/// <param name="noOffset">true if the offset value should be used</param>
/// <param name="encoder">encoder used for text encoding</param>
/// <returns>An extracted string value</returns>
internal static string ExtractString(ref BinaryReader binReader, int length, int offset, bool noOffset, Encoding encoder)
{
string strReturn = "";
if(length == 0)
return "";
if(encoder == null)
encoder = Encoding.ASCII;
ArrayList nameBytes = new ArrayList();
byte curByte;
if(!noOffset)
binReader.BaseStream.Seek(offset, SeekOrigin.Begin);
if(binReader.BaseStream.Position >= binReader.BaseStream.Length)
return "";
curByte = binReader.ReadByte();
while( (curByte != (byte)0) && (nameBytes.Count < length) && (binReader.BaseStream.Position < binReader.BaseStream.Length) )
{
nameBytes.Add( curByte );
if(nameBytes.Count < length)
curByte = binReader.ReadByte();
}
byte[] name = (byte[]) (nameBytes.ToArray(System.Type.GetType("System.Byte")));
strReturn = encoder.GetString(name,0,name.Length);
return strReturn;
}
/// <summary>
/// Internal helper method to extract a string with a specific length from the binary reader
/// </summary>
/// <param name="binReader">reference to the binary reader</param>
/// <param name="bFoundTerminator">reference to a bool vairable which will receive true if the
/// string terminator \0 was found. false indicates that the end of the stream was reached.</param>
/// <param name="offset">offset in the stream</param>
/// <param name="noOffset">true if the offset value should be used</param>
/// <param name="encoder">encoder used for text encoding</param>
/// <returns>An extracted string value</returns>
internal static string ExtractString(ref BinaryReader binReader, ref bool bFoundTerminator, int offset, bool noOffset, Encoding encoder)
{
string strReturn = "";
ArrayList nameBytes = new ArrayList();
byte curByte;
if(encoder == null)
encoder = Encoding.ASCII;
if(!noOffset)
binReader.BaseStream.Seek(offset, SeekOrigin.Begin);
if(binReader.BaseStream.Position >= binReader.BaseStream.Length)
return "";
curByte = binReader.ReadByte();
while( (curByte != (byte)0) && (binReader.BaseStream.Position < binReader.BaseStream.Length) )
{
nameBytes.Add( curByte );
curByte = binReader.ReadByte();
if( curByte == (byte)0 )
{
bFoundTerminator = true;
}
}
byte[] name = (byte[]) (nameBytes.ToArray(System.Type.GetType("System.Byte")));
strReturn = encoder.GetString(name,0,name.Length);
return strReturn;
}
/// <summary>
/// Internal helper method to extract a null-terminated UTF-16/UCS-2 strings from a binary reader
/// </summary>
/// <param name="binReader">reference to the binary reader</param>
/// <param name="offset">offset in the stream</param>
/// <param name="noOffset">true if the offset value should be used</param>
/// <param name="encoder">encoder used for text encoding</param>
/// <returns>An extracted string value</returns>
internal static string ExtractUTF16String(ref BinaryReader binReader, int offset, bool noOffset, Encoding encoder)
{
string strReturn = "";
ArrayList nameBytes = new ArrayList();
byte curByte;
int lastByte=-1;
if(!noOffset)
binReader.BaseStream.Seek(offset, SeekOrigin.Begin);
if(binReader.BaseStream.Position >= binReader.BaseStream.Length)
return "";
if(encoder == null)
encoder = Encoding.Unicode;
curByte = binReader.ReadByte();
int nCnt = 0;
while( ((curByte != (byte)0) || (lastByte != 0) ) && (binReader.BaseStream.Position < binReader.BaseStream.Length) )
{
nameBytes.Add( curByte );
if(nCnt%2 == 0)
lastByte = (int)curByte;
curByte = binReader.ReadByte();
nCnt++;
}
byte[] name = (byte[]) (nameBytes.ToArray(System.Type.GetType("System.Byte")));
strReturn = Encoding.Unicode.GetString(name,0,name.Length);
// apply text encoding
name = Encoding.Default.GetBytes(strReturn);
strReturn = encoder.GetString(name,0,name.Length);
return strReturn;
}
/// <summary>
/// Internal helper for reading ENCINT encoded integer values
/// </summary>
/// <param name="binReader">reference to the reader</param>
/// <returns>a long value</returns>
internal static long ReadENCINT(ref BinaryReader binReader)
{
long nRet = 0;
byte buffer = 0;
int shift = 0;
if(binReader.BaseStream.Position >= binReader.BaseStream.Length)
return nRet;
do
{
buffer = binReader.ReadByte();
nRet |= ((long)((buffer & (byte)0x7F))) << shift;
shift += 7;
}while ( (buffer & (byte)0x80) != 0);
return nRet;
}
/// <summary>
/// Reads an s/r encoded value from the byte array and decodes it into an integer
/// </summary>
/// <param name="wclBits">a byte array containing all bits (contains only 0 or 1 elements)</param>
/// <param name="s">scale param for encoding</param>
/// <param name="r">root param for encoding</param>
/// <param name="nBitIndex">current index in the wclBits array</param>
/// <returns>Returns an decoded integer value.</returns>
internal static int ReadSRItem(byte[] wclBits, int s, int r, ref int nBitIndex)
{
int nRet = 0;
int q = r;
int nPref1Cnt = 0;
while( wclBits[nBitIndex++] == 1)
{
nPref1Cnt++;
}
if(nPref1Cnt == 0)
{
int nMask = 0;
for(int nbits=0; nbits<q;nbits++)
{
nMask |= ( 0x01 & (int)wclBits[nBitIndex]) << (q-nbits-1);
nBitIndex++;
}
nRet = nMask;
}
else
{
q += (nPref1Cnt-1);
int nMask = 0;
int nRMaxValue = 0;
for(int nbits=0; nbits<q;nbits++)
{
nMask |= ( 0x01 & (int)wclBits[nBitIndex]) << (q-nbits-1);
nBitIndex++;
}
for(int nsv=0; nsv<r; nsv++)
{
nRMaxValue = nRMaxValue << 1;
nRMaxValue |= 0x1;
}
nRMaxValue++; // startvalue of s/r encoding with 1 prefixing '1'
nRMaxValue *= (int) Math.Pow((double)2, (double)(nPref1Cnt-1));
nRet = nRMaxValue + nMask;
}
return nRet;
}
}
}

View File

@@ -1,325 +0,0 @@
using System;
using System.IO;
using System.Collections;
using System.Collections.Specialized;
namespace HtmlHelp.ChmDecoding
{
/// <summary>
/// The class <c>CHMBtree</c> implements methods/properties to decode the binary help index.
/// This class automatically creates an index arraylist for the current CHMFile instance.
/// It does not store the index internally !
/// </summary>
/// <remarks>The binary index can be found in the storage file $WWKeywordLinks/BTree</remarks>
internal sealed class CHMBtree : IDisposable
{
/// <summary>
/// Constant specifying the size of the string blocks
/// </summary>
private const int BLOCK_SIZE = 2048;
/// <summary>
/// Internal flag specifying if the object is going to be disposed
/// </summary>
private bool disposed = false;
/// <summary>
/// Internal member storing the binary file data
/// </summary>
private byte[] _binaryFileData = null;
/// <summary>
/// Internal member storing flags
/// </summary>
private int _flags = 0;
/// <summary>
/// Internal member storing the data format
/// </summary>
private byte[] _dataFormat = new byte[16];
/// <summary>
/// Internal member storing the index of the last listing block
/// </summary>
private int _indexOfLastListingBlock = 0;
/// <summary>
/// Internal member storing the index of the root block
/// </summary>
private int _indexOfRootBlock = 0;
/// <summary>
/// Internal member storing the number of blocks
/// </summary>
private int _numberOfBlocks = 0;
/// <summary>
/// Internal member storing the tree depth.
/// (1 if no index blocks, 2 one level of index blocks, ...)
/// </summary>
private int _treeDepth = 0;
/// <summary>
/// Internal member storing the number of keywords in the file
/// </summary>
private int _numberOfKeywords = 0;
/// <summary>
/// Internal member storing the codepage
/// </summary>
private int _codePage = 0;
/// <summary>
/// true if the index is from a CHI or CHM file, else CHW
/// </summary>
private bool _isCHI_CHM = true;
/// <summary>
/// Internal member storing the associated chmfile object
/// </summary>
private CHMFile _associatedFile = null;
/// <summary>
/// Internal flag specifying if we have to read listing or index blocks
/// </summary>
private bool _readListingBlocks = true;
/// <summary>
/// Internal member storing an indexlist of the current file.
/// </summary>
private ArrayList _indexList = new ArrayList();
/// <summary>
/// Constructor of the class
/// </summary>
/// <param name="binaryFileData">binary file data of the $WWKeywordLinks/BTree file</param>
/// <param name="associatedFile">associated chm file</param>
public CHMBtree(byte[] binaryFileData, CHMFile associatedFile)
{
if( associatedFile == null)
{
throw new ArgumentException("CHMBtree.ctor() - Associated CHMFile must not be null !", "associatedFile");
}
_binaryFileData = binaryFileData;
_associatedFile = associatedFile;
DecodeData();
// clear internal binary data after extraction
_binaryFileData = null;
}
/// <summary>
/// Decodes the binary file data and fills the internal properties
/// </summary>
/// <returns>true if succeeded</returns>
private bool DecodeData()
{
bool bRet = true;
MemoryStream memStream = new MemoryStream(_binaryFileData);
BinaryReader binReader = new BinaryReader(memStream);
int nCurOffset = 0;
int nTemp = 0;
// decode header
binReader.ReadChars(2); // 2chars signature (not important)
_flags = (int)binReader.ReadInt16(); // WORD flags
binReader.ReadInt16(); // size of blocks (always 2048)
_dataFormat = binReader.ReadBytes(16);
binReader.ReadInt32(); // unknown DWORD
_indexOfLastListingBlock = binReader.ReadInt32();
_indexOfRootBlock = binReader.ReadInt32();
binReader.ReadInt32(); // unknown DWORD
_numberOfBlocks = binReader.ReadInt32();
_treeDepth = binReader.ReadInt16();
_numberOfKeywords = binReader.ReadInt32();
_codePage = binReader.ReadInt32();
binReader.ReadInt32(); // lcid DWORD
nTemp = binReader.ReadInt32();
_isCHI_CHM = (nTemp==1);
binReader.ReadInt32(); // unknown DWORD
binReader.ReadInt32(); // unknown DWORD
binReader.ReadInt32(); // unknown DWORD
binReader.ReadInt32(); // unknown DWORD
// end of header decode
while( (memStream.Position < memStream.Length) && (bRet) )
{
nCurOffset = (int)memStream.Position;
byte [] dataBlock = binReader.ReadBytes(BLOCK_SIZE);
bRet &= DecodeBlock(dataBlock, ref nCurOffset, _treeDepth-1);
}
return bRet;
}
/// <summary>
/// Decodes a block of url-string data
/// </summary>
/// <param name="dataBlock">block of data</param>
/// <param name="nOffset">current file offset</param>
/// <param name="indexBlocks">number of index blocks</param>
/// <returns>true if succeeded</returns>
private bool DecodeBlock( byte[] dataBlock, ref int nOffset, int indexBlocks )
{
bool bRet = true;
int nblockOffset = nOffset;
MemoryStream memStream = new MemoryStream(dataBlock);
BinaryReader binReader = new BinaryReader(memStream);
int freeSpace = binReader.ReadInt16(); // length of freespace
int nrOfEntries = binReader.ReadInt16(); // number of entries
bool bListingEndReached = false;
//while( (memStream.Position < (memStream.Length-freeSpace)) && (bRet) )
//{
int nIndexOfPrevBlock = -1;
int nIndexOfNextBlock = -1;
int nIndexOfChildBlock = 0;
if(_readListingBlocks)
{
nIndexOfPrevBlock = binReader.ReadInt32(); // -1 if this is the header
nIndexOfNextBlock = binReader.ReadInt32(); // -1 if this is the last block
}
else
{
nIndexOfChildBlock = binReader.ReadInt32();
}
for(int nE = 0; nE < nrOfEntries; nE++)
{
if(_readListingBlocks)
{
bListingEndReached = (nIndexOfNextBlock==-1);
string keyWord = BinaryReaderHelp.ExtractUTF16String(ref binReader, 0, true, _associatedFile.TextEncoding);
bool isSeeAlsoKeyword = (binReader.ReadInt16()!=0);
int indent = binReader.ReadInt16(); // indent of entry
int nCharIndex = binReader.ReadInt32();
binReader.ReadInt32();
int numberOfPairs = binReader.ReadInt32();
int[] nTopics = new int[numberOfPairs];
string[] seeAlso = new string[numberOfPairs];
for(int i=0; i < numberOfPairs; i++)
{
if(isSeeAlsoKeyword)
{
seeAlso[i] = BinaryReaderHelp.ExtractUTF16String(ref binReader, 0, true, _associatedFile.TextEncoding);
}
else
{
nTopics[i] = binReader.ReadInt32();
}
}
binReader.ReadInt32(); // unknown
int nIndexOfThisEntry = binReader.ReadInt32();
IndexItem newItem = new IndexItem(_associatedFile, keyWord, isSeeAlsoKeyword, indent, nCharIndex, nIndexOfThisEntry, seeAlso, nTopics);
_indexList.Add(newItem);
}
else
{
string keyWord = BinaryReaderHelp.ExtractUTF16String(ref binReader, 0, true, _associatedFile.TextEncoding);
bool isSeeAlsoKeyword = (binReader.ReadInt16()!=0);
int indent = binReader.ReadInt16(); // indent of entry
int nCharIndex = binReader.ReadInt32();
binReader.ReadInt32();
int numberOfPairs = binReader.ReadInt32();
int[] nTopics = new int[numberOfPairs];
string[] seeAlso = new string[numberOfPairs];
for(int i=0; i < numberOfPairs; i++)
{
if(isSeeAlsoKeyword)
{
seeAlso[i] = BinaryReaderHelp.ExtractUTF16String(ref binReader, 0, true, _associatedFile.TextEncoding);
}
else
{
nTopics[i] = binReader.ReadInt32();
}
}
int nIndexChild = binReader.ReadInt32();
int nIndexOfThisEntry=-1;
IndexItem newItem = new IndexItem(_associatedFile, keyWord, isSeeAlsoKeyword, indent, nCharIndex, nIndexOfThisEntry, seeAlso, nTopics);
_indexList.Add(newItem);
}
}
//}
binReader.ReadBytes(freeSpace);
if( bListingEndReached )
_readListingBlocks = false;
return bRet;
}
/// <summary>
/// Gets the internal generated index list
/// </summary>
internal ArrayList IndexList
{
get { return _indexList; }
}
/// <summary>
/// Implement IDisposable.
/// </summary>
public void Dispose()
{
Dispose(true);
// This object will be cleaned up by the Dispose method.
// Therefore, you should call GC.SupressFinalize to
// take this object off the finalization queue
// and prevent finalization code for this object
// from executing a second time.
GC.SuppressFinalize(this);
}
/// <summary>
/// Dispose(bool disposing) executes in two distinct scenarios.
/// If disposing equals true, the method has been called directly
/// or indirectly by a user's code. Managed and unmanaged resources
/// can be disposed.
/// If disposing equals false, the method has been called by the
/// runtime from inside the finalizer and you should not reference
/// other objects. Only unmanaged resources can be disposed.
/// </summary>
/// <param name="disposing">disposing flag</param>
private void Dispose(bool disposing)
{
// Check to see if Dispose has already been called.
if(!this.disposed)
{
// If disposing equals true, dispose all managed
// and unmanaged resources.
if(disposing)
{
// Dispose managed resources.
_binaryFileData = null;
}
}
disposed = true;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,286 +0,0 @@
using System;
using System.Collections;
using System.IO;
namespace HtmlHelp.ChmDecoding
{
/// <summary>
/// The class <c>CHMIdxhdr</c> implements t properties which have been read from the #IDXHDR file.
/// </summary>
internal sealed class CHMIdxhdr : IDisposable
{
/// <summary>
/// Internal flag specifying if the object is going to be disposed
/// </summary>
private bool disposed = false;
/// <summary>
/// Internal member storing the binary file data
/// </summary>
private byte[] _binaryFileData = null;
/// <summary>
/// Internal member storing the number of topic nodes including the contents and index files
/// </summary>
private int _numberOfTopicNodes = 0;
/// <summary>
/// Internal member storing the offset in the #STRINGS file of the ImageList param of the "text/site properties" object of the sitemap contents
/// </summary>
private int _imageListOffset = 0;
/// <summary>
/// True if the value of the ImageType param of the "text/site properties" object of the sitemap contents is "Folder".
/// </summary>
private bool _imageTypeFolder = false;
/// <summary>
/// Internal member storing the background value
/// </summary>
private int _background = 0;
/// <summary>
/// Internal member storing the foreground value
/// </summary>
private int _foreground = 0;
/// <summary>
/// Internal member storing the offset in the #STRINGS file of the Font param of the "text/site properties" object of the sitemap contents
/// </summary>
private int _fontOffset = 0;
/// <summary>
/// Internal member storing the offset in the #STRINGS file of the FrameName param of the "text/site properties" object of the sitemap contents
/// </summary>
private int _frameNameOffset = 0;
/// <summary>
/// Internal member storing the offset in the #STRINGS file of the WindowName param of the "text/site properties" object of the sitemap contents
/// </summary>
private int _windowNameOffset = 0;
/// <summary>
/// Internal member storing the number of merged files
/// </summary>
private int _numberOfMergedFiles = 0;
/// <summary>
/// Internal member storing the offset in the #STRINGS file of the merged file names
/// </summary>
private ArrayList _mergedFileOffsets = new ArrayList();
/// <summary>
/// Internal member storing the associated chmfile object
/// </summary>
private CHMFile _associatedFile = null;
/// <summary>
/// Constructor of the class
/// </summary>
/// <param name="binaryFileData">binary file data of the #IDXHDR file</param>
/// <param name="associatedFile">associated CHMFile instance</param>
public CHMIdxhdr(byte[] binaryFileData, CHMFile associatedFile)
{
_binaryFileData = binaryFileData;
_associatedFile = associatedFile;
DecodeData();
}
/// <summary>
/// Decodes the binary file data and fills the internal properties
/// </summary>
/// <returns>true if succeeded</returns>
private bool DecodeData()
{
bool bRet = true;
MemoryStream memStream = new MemoryStream(_binaryFileData);
BinaryReader binReader = new BinaryReader(memStream);
int nTemp = 0;
// 4 character T#SM
binReader.ReadBytes(4);
// unknown timestamp DWORD
nTemp = binReader.ReadInt32();
// unknown 1
nTemp = binReader.ReadInt32();
// number of topic nodes including the contents & index files
_numberOfTopicNodes = binReader.ReadInt32();
// unknown DWORD
nTemp = binReader.ReadInt32();
// offset in the strings file
_imageListOffset = binReader.ReadInt32();
if( _imageListOffset == 0)
_imageListOffset = -1; // 0/-1 = none
// unknown DWORD
nTemp = binReader.ReadInt32();
// 1 if the value of the ImageType param of the "text/site properties" object of the sitemap contents is "Folder".
nTemp = binReader.ReadInt32();
_imageTypeFolder = (nTemp == 1);
// offset in the strings file
_background = binReader.ReadInt32();
// offset in the strings file
_foreground = binReader.ReadInt32();
// offset in the strings file
_fontOffset = binReader.ReadInt32();
// window styles DWORD
nTemp = binReader.ReadInt32();
// window styles DWORD
nTemp = binReader.ReadInt32();
// unknown DWORD
nTemp = binReader.ReadInt32();
// offset in the strings file
_frameNameOffset = binReader.ReadInt32();
if( _frameNameOffset == 0)
_frameNameOffset = -1; // 0/-1 = none
// offset in the strings file
_windowNameOffset = binReader.ReadInt32();
if( _windowNameOffset == 0)
_windowNameOffset = -1; // 0/-1 = none
// informations types DWORD
nTemp = binReader.ReadInt32();
// unknown DWORD
nTemp = binReader.ReadInt32();
// number of merged files in the merged file list DWORD
_numberOfMergedFiles = binReader.ReadInt32();
nTemp = binReader.ReadInt32();
for(int i = 0; i < _numberOfMergedFiles; i++)
{
// DWORD offset value of merged file
nTemp = binReader.ReadInt32();
if(nTemp > 0)
_mergedFileOffsets.Add(nTemp);
}
return bRet;
}
/// <summary>
/// Gets the number of topic nodes including the contents and index files
/// </summary>
public int NumberOfTopicNodes
{
get { return _numberOfTopicNodes; }
}
/// <summary>
/// Gets the offset in the #STRINGS file of the ImageList
/// param of the "text/site properties" object of the sitemap contents
/// </summary>
public int ImageListOffset
{
get { return _imageListOffset; }
}
/// <summary>
/// True if the value of the ImageType param of the
/// "text/site properties" object of the sitemap contents is "Folder".
/// </summary>
/// <remarks>If this is set to true, the help will display folders instead of books</remarks>
public bool ImageTypeFolder
{
get { return _imageTypeFolder; }
}
/// <summary>
/// Gets the background setting
/// </summary>
public int Background
{
get { return _background; }
}
/// <summary>
/// Gets the foreground setting
/// </summary>
public int Foreground
{
get { return _foreground; }
}
/// <summary>
/// Gets the offset in the #STRINGS file of the Font
/// param of the "text/site properties" object of the sitemap contents
/// </summary>
public int WindowNameOffset
{
get { return _fontOffset; }
}
/// <summary>
/// Gets the offset in the #STRINGS file of the FrameName
/// param of the "text/site properties" object of the sitemap contents
/// </summary>
public int FrameNameOffset
{
get { return _frameNameOffset; }
}
/// <summary>
/// Gets the offset in the #STRINGS file of the WindowName
/// param of the "text/site properties" object of the sitemap contents
/// </summary>
public int FontOffset
{
get { return _windowNameOffset; }
}
/// <summary>
/// Gets an array list of offset numbers in the #STRINGS file of the
/// merged file names.
/// </summary>
public ArrayList MergedFileOffsets
{
get { return _mergedFileOffsets; }
}
/// <summary>
/// Implement IDisposable.
/// </summary>
public void Dispose()
{
Dispose(true);
// This object will be cleaned up by the Dispose method.
// Therefore, you should call GC.SupressFinalize to
// take this object off the finalization queue
// and prevent finalization code for this object
// from executing a second time.
GC.SuppressFinalize(this);
}
/// <summary>
/// Dispose(bool disposing) executes in two distinct scenarios.
/// If disposing equals true, the method has been called directly
/// or indirectly by a user's code. Managed and unmanaged resources
/// can be disposed.
/// If disposing equals false, the method has been called by the
/// runtime from inside the finalizer and you should not reference
/// other objects. Only unmanaged resources can be disposed.
/// </summary>
/// <param name="disposing">disposing flag</param>
private void Dispose(bool disposing)
{
// Check to see if Dispose has already been called.
if(!this.disposed)
{
// If disposing equals true, dispose all managed
// and unmanaged resources.
if(disposing)
{
// Dispose managed resources.
_binaryFileData = null;
_mergedFileOffsets = null;
}
}
disposed = true;
}
}
}

View File

@@ -1,256 +0,0 @@
using System;
using System.IO;
using System.Collections;
using System.Collections.Specialized;
namespace HtmlHelp.ChmDecoding
{
/// <summary>
/// The class <c>CHMStrings</c> implements a string collection read from the #STRINGS file
/// </summary>
internal sealed class CHMStrings : IDisposable
{
/// <summary>
/// Constant specifying the size of the string blocks
/// </summary>
private const int STRING_BLOCK_SIZE = 4096;
/// <summary>
/// Internal flag specifying if the object is going to be disposed
/// </summary>
private bool disposed = false;
/// <summary>
/// Internal member storing the binary file data
/// </summary>
private byte[] _binaryFileData = null;
/// <summary>
/// Internal member storing the string dictionary
/// </summary>
private Hashtable _stringDictionary = new Hashtable();
/// <summary>
/// Internal member storing the associated chmfile object
/// </summary>
private CHMFile _associatedFile = null;
/// <summary>
/// Constructor of the class
/// </summary>
/// <param name="binaryFileData">binary file data of the #STRINGS file</param>
/// <param name="associatedFile">associated chm file</param>
public CHMStrings(byte[] binaryFileData, CHMFile associatedFile)
{
_binaryFileData = binaryFileData;
_associatedFile = associatedFile;
DecodeData();
}
/// <summary>
/// Standard constructor
/// </summary>
internal CHMStrings()
{
}
#region Data dumping
/// <summary>
/// Dump the class data to a binary writer
/// </summary>
/// <param name="writer">writer to write the data</param>
internal void Dump(ref BinaryWriter writer)
{
writer.Write( _stringDictionary.Count );
if (_stringDictionary.Count != 0)
{
IDictionaryEnumerator iDictionaryEnumerator = _stringDictionary.GetEnumerator();
while (iDictionaryEnumerator.MoveNext())
{
DictionaryEntry dictionaryEntry = (DictionaryEntry)iDictionaryEnumerator.Current;
writer.Write( Int32.Parse(dictionaryEntry.Key.ToString()) );
writer.Write( dictionaryEntry.Value.ToString() );
}
}
}
/// <summary>
/// Reads the object data from a dump store
/// </summary>
/// <param name="reader">reader to read the data</param>
internal void ReadDump(ref BinaryReader reader)
{
int nCnt = reader.ReadInt32();
for(int i=0; i<nCnt;i++)
{
int nKey = reader.ReadInt32();
string sValue = reader.ReadString();
_stringDictionary[nKey.ToString()] = sValue;
}
}
/// <summary>
/// Sets the associated CHMFile instance
/// </summary>
/// <param name="associatedFile">instance to set</param>
internal void SetCHMFile(CHMFile associatedFile)
{
_associatedFile = associatedFile;
}
#endregion
/// <summary>
/// Decodes the binary file data and fills the internal properties
/// </summary>
/// <returns>true if succeeded</returns>
private bool DecodeData()
{
bool bRet = true;
MemoryStream memStream = new MemoryStream(_binaryFileData);
BinaryReader binReader = new BinaryReader(memStream);
//binReader.ReadByte(); // file starts with a NULL character for 0-based offset indexing
int nStringOffset = 0;
int nSubsetOffset = 0;
while( (memStream.Position < memStream.Length) && (bRet) )
{
nStringOffset = (int)memStream.Position;
byte [] stringBlock = binReader.ReadBytes(STRING_BLOCK_SIZE);
bRet &= DecodeBlock(stringBlock, ref nStringOffset, ref nSubsetOffset);
}
return bRet;
}
/// <summary>
/// Decodes a string block
/// </summary>
/// <param name="stringBlock">byte array which represents the string block</param>
/// <param name="nStringOffset">current string offset number</param>
/// <param name="nSubsetOffset">reference to a subset variable</param>
/// <returns>true if succeeded</returns>
/// <remarks>If a string crosses the end of a block then it will be cut off
/// without a NT and repeated in full, with a NT, at the start of the next block.
/// For eg "To customize the appearance of a contents file" might become
/// "To customize the (block ending)To customize the appearance of a contents file"
/// when there are 17 bytes left at the end of the block. </remarks>
private bool DecodeBlock( byte[] stringBlock, ref int nStringOffset, ref int nSubsetOffset)
{
bool bRet = true;
MemoryStream memStream = new MemoryStream(stringBlock);
BinaryReader binReader = new BinaryReader(memStream);
while( (memStream.Position < memStream.Length) && (bRet) )
{
bool bFoundTerminator = false;
int nCurOffset = nStringOffset + (int)memStream.Position;
string sTemp = BinaryReaderHelp.ExtractString(ref binReader, ref bFoundTerminator, 0, true, _associatedFile.TextEncoding);
if(nSubsetOffset != 0)
{
_stringDictionary[nSubsetOffset.ToString()] = sTemp.ToString();
}
else
{
_stringDictionary[nCurOffset.ToString()] = sTemp.ToString();
}
if( bFoundTerminator )
{
nSubsetOffset = 0;
}
else
{
nSubsetOffset = nCurOffset;
}
}
return bRet;
}
/// <summary>
/// Indexer which returns the string at a given offset
/// </summary>
public string this[int offset]
{
get
{
if(offset == -1)
return String.Empty;
string sTemp = (string)_stringDictionary[ offset.ToString() ];
if(sTemp == null)
return String.Empty;
return sTemp;
}
}
/// <summary>
/// Indexer which returns the string at a given offset
/// </summary>
public string this[string offset]
{
get
{
if(offset == "-1")
return String.Empty;
string sTemp = (string)_stringDictionary[ offset ];
if(sTemp == null)
return String.Empty;
return sTemp;
}
}
/// <summary>
/// Implement IDisposable.
/// </summary>
public void Dispose()
{
Dispose(true);
// This object will be cleaned up by the Dispose method.
// Therefore, you should call GC.SupressFinalize to
// take this object off the finalization queue
// and prevent finalization code for this object
// from executing a second time.
GC.SuppressFinalize(this);
}
/// <summary>
/// Dispose(bool disposing) executes in two distinct scenarios.
/// If disposing equals true, the method has been called directly
/// or indirectly by a user's code. Managed and unmanaged resources
/// can be disposed.
/// If disposing equals false, the method has been called by the
/// runtime from inside the finalizer and you should not reference
/// other objects. Only unmanaged resources can be disposed.
/// </summary>
/// <param name="disposing">disposing flag</param>
private void Dispose(bool disposing)
{
// Check to see if Dispose has already been called.
if(!this.disposed)
{
// If disposing equals true, dispose all managed
// and unmanaged resources.
if(disposing)
{
// Dispose managed resources.
_binaryFileData = null;
_stringDictionary = null;
}
}
disposed = true;
}
}
}

View File

@@ -1,821 +0,0 @@
using System;
using System.Collections;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Globalization;
namespace HtmlHelp.ChmDecoding
{
/// <summary>
/// The class <c>CHMSystem</c> reads the #SYSTEM file of the chm and stores its settings
/// </summary>
internal sealed class CHMSystem : IDisposable
{
/// <summary>
/// Internal flag specifying if the object is going to be disposed
/// </summary>
private bool disposed = false;
/// <summary>
/// Internal member storing the binary file data
/// </summary>
private byte[] _binaryFileData = null;
/// <summary>
/// Internal member storing the file version
/// </summary>
private int _fileVersion = 0;
/// <summary>
/// Internal member storing the contents file path
/// </summary>
private string _contentsFile = "";
/// <summary>
/// Internal member storing the index file path
/// </summary>
private string _indexFile = "";
/// <summary>
/// Internal member storing the default help topic
/// </summary>
private string _defaultTopic = "";
/// <summary>
/// Internal member storing the help-window title
/// </summary>
private string _title = "";
/// <summary>
/// Internal flag if dbcs is on
/// </summary>
private bool _dbcs = false;
/// <summary>
/// Internal flag if fulltext search is enabled
/// </summary>
private bool _fullTextSearch = false;
/// <summary>
/// Internal flag if KLinks are in the file
/// </summary>
private bool _hasKLinks = false;
/// <summary>
/// Internal flag if ALinks are in the file
/// </summary>
private bool _hasALinks = false;
/// <summary>
/// Internal member storing the name of the default window
/// </summary>
private string _defaultWindow = "";
/// <summary>
/// Internal member storing the filename of the compiled file
/// </summary>
private string _compileFile = "";
/// <summary>
/// Internal flag storing the offset value of the binary index
/// </summary>
private uint _binaryIndexURLTableID = 0;
/// <summary>
/// Inernal member storing the compiler version this file was compiled
/// </summary>
private string _compilerVersion = "";
/// <summary>
/// Internal flag storing the offset value of the binary TOC
/// </summary>
private uint _binaryTOCURLTableID = 0;
/// <summary>
/// Internal member storing the associated chmfile object
/// </summary>
private CHMFile _associatedFile = null;
/// <summary>
/// Internal member storing the default fontface, size, charset
/// </summary>
private string _defaultFont = "";
/// <summary>
/// Internal member storing the culture info of the file
/// </summary>
private CultureInfo _culture;
/// <summary>
/// Constructor of the class
/// </summary>
/// <param name="binaryFileData">binary file data of the #SYSTEM file</param>
/// <param name="associatedFile">associated chm file</param>
public CHMSystem(byte[] binaryFileData, CHMFile associatedFile)
{
_binaryFileData = binaryFileData;
_associatedFile = associatedFile;
DecodeData();
if(_culture == null)
{
// Set the text encoder of the chm file to the read charset/codepage
_associatedFile.TextEncoding = Encoding.GetEncoding( this.CodePage );
}
}
/// <summary>
/// Decodes the binary file data and fills the internal properties
/// </summary>
/// <returns>true if succeeded</returns>
private bool DecodeData()
{
bool bRet = true;
MemoryStream memStream = new MemoryStream(_binaryFileData);
BinaryReader binReader = new BinaryReader(memStream);
// First entry = DWORD for version number
_fileVersion = (int) binReader.ReadInt32();
while( (memStream.Position < memStream.Length) && (bRet) )
{
bRet &= DecodeEntry(ref binReader);
}
return bRet;
}
/// <summary>
/// Decodes an #system file entry
/// </summary>
/// <param name="binReader">binary reader reference</param>
/// <returns>true if succeeded</returns>
private bool DecodeEntry(ref BinaryReader binReader)
{
bool bRet = true;
int code = (int) binReader.ReadInt16(); // entry code, WORD
int length = (int) binReader.ReadInt16(); // length of entry
switch(code)
{
case 0:
{
_contentsFile = BinaryReaderHelp.ExtractString(ref binReader,length, 0, true, _associatedFile.TextEncoding);
};break;
case 1:
{
_indexFile = BinaryReaderHelp.ExtractString(ref binReader,length, 0, true, _associatedFile.TextEncoding);
};break;
case 2:
{
_defaultTopic = BinaryReaderHelp.ExtractString(ref binReader,length, 0, true, _associatedFile.TextEncoding);
};break;
case 3:
{
_title = BinaryReaderHelp.ExtractString(ref binReader,length, 0, true, _associatedFile.TextEncoding);
};break;
case 4:
{
int nTemp = 0;
nTemp = binReader.ReadInt32(); // read DWORD LCID
_culture = new CultureInfo(nTemp);
if(_culture != null)
_associatedFile.TextEncoding = Encoding.GetEncoding(_culture.TextInfo.ANSICodePage);
nTemp = binReader.ReadInt32(); // read DWORD DBCS
_dbcs = (nTemp == 1);
nTemp = binReader.ReadInt32(); // read DWORD Fulltext search
_fullTextSearch = (nTemp == 1);
nTemp = binReader.ReadInt32(); // read DWORD has klinks
_hasKLinks = (nTemp != 0);
nTemp = binReader.ReadInt32(); // read DWORD has alinks
_hasALinks = (nTemp != 0);
// read the rest of code 4 (not important for us)
byte[] temp = new byte[length-(5*4)];
temp = binReader.ReadBytes(length-(5*4));
};break;
case 5:
{
_defaultWindow = BinaryReaderHelp.ExtractString(ref binReader,length, 0, true, _associatedFile.TextEncoding);
};break;
case 6:
{
_compileFile = BinaryReaderHelp.ExtractString(ref binReader,length, 0, true, _associatedFile.TextEncoding);
};break;
case 7:
{
if(_fileVersion > 2)
{
_binaryIndexURLTableID = (uint) binReader.ReadInt32();
}
else
{
byte[] read = binReader.ReadBytes(length);
int i=read.Length;
}
};break;
case 8:
{
// abbreviation (not interresting for us)
byte[] read = binReader.ReadBytes(length);
int i=read.Length;
};break;
case 9:
{
_compilerVersion = BinaryReaderHelp.ExtractString(ref binReader,length, 0, true, _associatedFile.TextEncoding);
};break;
case 10:
{
// timestamp of the file (not interresting for us)
byte[] read = binReader.ReadBytes(length);
int i=read.Length;
};break;
case 11:
{
if(_fileVersion > 2)
{
_binaryTOCURLTableID = (uint) binReader.ReadInt32();
}
else
{
byte[] read = binReader.ReadBytes(length);
int i=read.Length;
}
};break;
case 12:
{
// number of information bytes
byte[] read = binReader.ReadBytes(length);
int i=read.Length;
};break;
case 13:
{
// copy of file #idxhdr
byte[] read = binReader.ReadBytes(length);
int i=read.Length;
};break;
case 14:
{
// custom tabs for HH viewer
byte[] read = binReader.ReadBytes(length);
int i=read.Length;
};break;
case 15:
{
// a checksum
byte[] read = binReader.ReadBytes(length);
int i=read.Length;
};break;
case 16:
{
// Default Font=string,number,number
// The string is the name of the font, the first number is the
// point size & the last number is the character set used by the font.
// For acceptable values see *_CHARSET defines in wingdi.h from the
// Windows SDK or the same file in MinGW or Wine.
// Most of the time you will only want to use 0, which is the value for ANSI,
// which is the subset of ASCII used by Windows.
_defaultFont = BinaryReaderHelp.ExtractString(ref binReader,length, 0, true, _associatedFile.TextEncoding);
};break;
default:
{
byte[] temp = new byte[length];
temp = binReader.ReadBytes(length);
//bRet = false;
int i=temp.Length;
};break;
}
return bRet;
}
/// <summary>
/// Reads all HHC files and checks which one has the global object tag.
/// This hhc file will be returned as master hhc
/// </summary>
/// <param name="hhcTopics">list of topics containing the extension hhc</param>
/// <param name="TopicItemArrayList">true if the arraylist contains topic items</param>
/// <returns>the filename of the found master toc</returns>
private string GetMasterHHC(ArrayList hhcTopics, bool TopicItemArrayList)
{
string sRet = "";
if( (hhcTopics!=null) && (hhcTopics.Count > 0) )
{
if( TopicItemArrayList )
{
if(hhcTopics.Count == 1)
{
sRet = ((TopicEntry)hhcTopics[0]).Locale;
}
else
{
foreach(TopicEntry curEntry in hhcTopics)
{
CHMStream.CHMStream iw=null;
MemoryStream fileObject=null;
if( _associatedFile.CurrentStorageWrapper == null)
{
iw=new CHMStream.CHMStream();
iw.OpenCHM(_associatedFile.ChmFilePath);
}
else
{
iw = _associatedFile.CurrentStorageWrapper;
}
fileObject = iw.OpenStream(curEntry.Locale);
if( fileObject != null)
{
string fileString =_associatedFile.TextEncoding.GetString(fileObject.ToArray(),0,(int)fileObject.Length);
fileObject.Close();
if( HHCParser.HasGlobalObjectTag(fileString, _associatedFile) )
{
sRet = curEntry.Locale;
break;
}
}
}
}
}
else
{
if(hhcTopics.Count == 1)
{
sRet = ((string)hhcTopics[0]);
}
else
{
foreach(string curEntry in hhcTopics)
{
CHMStream.CHMStream iw=null;
MemoryStream fileObject=null;
if( _associatedFile.CurrentStorageWrapper == null)
{
iw=new CHMStream.CHMStream();
iw.OpenCHM(_associatedFile.ChmFilePath);
}
else
{
iw = _associatedFile.CurrentStorageWrapper;
}
fileObject = iw.OpenStream(curEntry);
if( fileObject != null)
{
string fileString =_associatedFile.TextEncoding.GetString(fileObject.ToArray(),0,(int)fileObject.Length);
fileObject.Close();
if( HHCParser.HasGlobalObjectTag(fileString, _associatedFile) )
{
sRet = curEntry;
break;
}
}
}
}
}
}
return sRet;
}
/// <summary>
/// Gets the file version of the chm file.
/// 2 for Compatibility=1.0, 3 for Compatibility=1.1
/// </summary>
public int FileVersion
{
get { return _fileVersion; }
}
/// <summary>
/// Gets the contents file name
/// </summary>
public string ContentsFile
{
get
{
if( BinaryTOC ) // if the file contains a binary TOC
{
// make sure the CHMFile instance exists and has loaded the file #URLTBL
if( (_associatedFile != null) && (_associatedFile.UrltblFile != null ) )
{
// Get an url-table entry by its unique id
UrlTableEntry entry = _associatedFile.UrltblFile.GetByUniqueID( this.BinaryTOCURLTableID );
if(entry != null)
{
// entry found, return the url ( = filename )
return entry.URL;
}
}
}
else
{
if(_contentsFile.Length <= 0)
{
string sCheck = "Table of Contents.hhc"; // default HHP contents filename
if( (_associatedFile != null) && (_associatedFile.TopicsFile != null ) )
{
TopicEntry te = _associatedFile.TopicsFile.GetByLocale( sCheck );
if( te == null)
{
sCheck = "toc.hhc"; // default HHP contents filename
te = _associatedFile.TopicsFile.GetByLocale( sCheck );
if( te == null)
{
sCheck = CompileFile + ".hhc";
te = _associatedFile.TopicsFile.GetByLocale( sCheck );
if( te == null)
{
ArrayList arrExt = _associatedFile.TopicsFile.GetByExtension("hhc");
if( arrExt == null )
{
arrExt = _associatedFile.EnumFilesByExtension("hhc");
if( arrExt == null )
{
Debug.WriteLine("CHMSystem.ContentsFile - Failed, contents file not found !");
}
else
{
if(arrExt.Count > 1)
{
sCheck = GetMasterHHC(arrExt, false);
_contentsFile = sCheck;
}
else
{
_contentsFile = ((string)arrExt[0]);
sCheck = _contentsFile;
}
}
}
else
{
if(arrExt.Count > 1)
{
sCheck = GetMasterHHC(arrExt, true);
_contentsFile = sCheck;
}
else
{
_contentsFile = ((TopicEntry)arrExt[0]).Locale;
sCheck = _contentsFile;
}
}
}
else
{
_contentsFile = sCheck;
}
}
else
{
_contentsFile = sCheck;
}
}
else
{
_contentsFile = sCheck;
}
}
return sCheck;
}
}
return _contentsFile;
}
}
/// <summary>
/// Gets the index file name
/// </summary>
public string IndexFile
{
get
{
if( BinaryIndex ) // if the file contains a binary index
{
// make sure the CHMFile instance exists and has loaded the file #URLTBL
if( (_associatedFile != null) && (_associatedFile.UrltblFile != null ) )
{
// Get an url-table entry by its unique id
UrlTableEntry entry = _associatedFile.UrltblFile.GetByUniqueID( this.BinaryIndexURLTableID );
if(entry != null)
{
// entry found, return the url ( = filename )
return entry.URL;
}
}
}
else
{
if(_indexFile.Length <= 0)
{
string sCheck = "Index.hhk"; // default HHP index filename
if( (_associatedFile != null) && (_associatedFile.TopicsFile != null ) )
{
TopicEntry te = _associatedFile.TopicsFile.GetByLocale( sCheck );
if( te == null)
{
sCheck = CompileFile + ".hhk";
te = _associatedFile.TopicsFile.GetByLocale( sCheck );
if( te == null)
{
ArrayList arrExt = _associatedFile.TopicsFile.GetByExtension("hhk");
if( arrExt == null )
{
Debug.WriteLine("CHMSystem.IndexFile - Failed, index file not found !");
}
else
{
_indexFile = ((TopicEntry)arrExt[0]).Locale;
sCheck = _indexFile;
}
}
else
{
_indexFile = sCheck;
}
}
else
{
_indexFile = sCheck;
}
}
return sCheck;
}
}
return _indexFile;
}
}
/// <summary>
/// Sets the default topic of this file
/// </summary>
/// <param name="local">new local value of the topic</param>
internal void SetDefaultTopic(string local)
{
_defaultTopic = local;
}
/// <summary>
/// Gets the default help topic
/// </summary>
public string DefaultTopic
{
get { return _defaultTopic; }
}
/// <summary>
/// Gets the title of the help window
/// </summary>
public string Title
{
get { return _title; }
}
/// <summary>
/// Gets the flag if DBCS is in use
/// </summary>
public bool DBCS
{
get { return _dbcs; }
}
/// <summary>
/// Gets the flag if full-text-search is available
/// </summary>
public bool FullTextSearch
{
get { return _fullTextSearch; }
}
/// <summary>
/// Gets the flag if the file has ALinks
/// </summary>
public bool HasALinks
{
get { return _hasALinks; }
}
/// <summary>
/// Gets the flag if the file has KLinks
/// </summary>
public bool HasKLinks
{
get { return _hasKLinks; }
}
/// <summary>
/// Gets the default window name
/// </summary>
public string DefaultWindow
{
get { return _defaultWindow; }
}
/// <summary>
/// Gets the file name of the compile file
/// </summary>
public string CompileFile
{
get { return _compileFile; }
}
/// <summary>
/// Gets the id of the binary index in the url table
/// </summary>
public uint BinaryIndexURLTableID
{
get { return _binaryIndexURLTableID; }
}
/// <summary>
/// Gets the flag if the chm has a binary index file
/// </summary>
public bool BinaryIndex
{
get { return (_binaryIndexURLTableID>0); }
}
/// <summary>
/// Gets the flag if the chm has a binary index file
/// </summary>
public string CompilerVersion
{
get { return _compilerVersion; }
}
/// <summary>
/// Gets the id of the binary toc in the url table
/// </summary>
public uint BinaryTOCURLTableID
{
get { return _binaryTOCURLTableID; }
}
/// <summary>
/// Gets the flag if the chm has a binary toc file
/// </summary>
public bool BinaryTOC
{
get { return (_binaryTOCURLTableID>0); }
}
/// <summary>
/// Gets the font face of the read font property.
/// Empty string for default font.
/// </summary>
public string FontFace
{
get
{
if( _defaultFont.Length > 0)
{
string [] fontSplit = _defaultFont.Split( new char[]{','});
if(fontSplit.Length > 0)
return fontSplit[0].Trim();
}
return "";
}
}
/// <summary>
/// Gets the font size of the read font property.
/// 0 for default font size
/// </summary>
public double FontSize
{
get
{
if( _defaultFont.Length > 0)
{
string [] fontSplit = _defaultFont.Split( new char[]{','});
if(fontSplit.Length > 1)
return double.Parse(fontSplit[1].Trim());
}
return 0.0;
}
}
/// <summary>
/// Gets the character set of the read font property
/// 1 for default
/// </summary>
public int CharacterSet
{
get
{
if( _defaultFont.Length > 0)
{
string [] fontSplit = _defaultFont.Split( new char[]{','});
if(fontSplit.Length > 2)
return Int32.Parse(fontSplit[2].Trim());
}
return 0;
}
}
/// <summary>
/// Gets the codepage depending on the read font property
/// </summary>
public int CodePage
{
get
{
// if we've read a LCID from the system file
// ignore the font-property settings and return
// the codepage generated from the culture info
if(_culture != null)
{
return _culture.TextInfo.ANSICodePage;
}
int nRet = 1252; // default codepage windows-1252
int nCSet = CharacterSet;
switch(nCSet)
{
case 0x00: nRet = 1252;break; // ANSI_CHARSET
case 0xCC: nRet = 1251;break; // RUSSIAN_CHARSET
case 0xEE: nRet = 1250;break; // EE_CHARSET
case 0xA1: nRet = 1253;break; // GREEK_CHARSET
case 0xA2: nRet = 1254;break; // TURKISH_CHARSET
case 0xBA: nRet = 1257;break; // BALTIC_CHARSET
case 0xB1: nRet = 1255;break; // HEBREW_CHARSET
case 0xB2: nRet = 1256;break; // ARABIC_CHARSET
case 0x80: nRet = 932;break; // SHIFTJIS_CHARSET
case 0x81: nRet = 949;break; // HANGEUL_CHARSET
case 0x86: nRet = 936;break; // GB2313_CHARSET
case 0x88: nRet = 950;break; // CHINESEBIG5_CHARSET
}
return nRet;
}
}
/// <summary>
/// Gets the assiciated culture info
/// </summary>
public CultureInfo Culture
{
get { return _culture; }
}
/// <summary>
/// Implement IDisposable.
/// </summary>
public void Dispose()
{
Dispose(true);
// This object will be cleaned up by the Dispose method.
// Therefore, you should call GC.SupressFinalize to
// take this object off the finalization queue
// and prevent finalization code for this object
// from executing a second time.
GC.SuppressFinalize(this);
}
/// <summary>
/// Dispose(bool disposing) executes in two distinct scenarios.
/// If disposing equals true, the method has been called directly
/// or indirectly by a user's code. Managed and unmanaged resources
/// can be disposed.
/// If disposing equals false, the method has been called by the
/// runtime from inside the finalizer and you should not reference
/// other objects. Only unmanaged resources can be disposed.
/// </summary>
/// <param name="disposing">disposing flag</param>
private void Dispose(bool disposing)
{
// Check to see if Dispose has already been called.
if(!this.disposed)
{
// If disposing equals true, dispose all managed
// and unmanaged resources.
if(disposing)
{
// Dispose managed resources.
_binaryFileData = null;
}
}
disposed = true;
}
}
}

View File

@@ -1,288 +0,0 @@
using System;
using System.IO;
using System.Collections;
namespace HtmlHelp.ChmDecoding
{
/// <summary>
/// The class <c>CHMTocidx</c> implements functions to decode the #TOCIDX internal file.
/// </summary>
internal sealed class CHMTocidx : IDisposable
{
/// <summary>
/// Constant specifying the size of the data blocks
/// </summary>
private const int BLOCK_SIZE = 0x1000;
/// <summary>
/// Internal flag specifying if the object is going to be disposed
/// </summary>
private bool disposed = false;
/// <summary>
/// Internal member storing the binary file data
/// </summary>
private byte[] _binaryFileData = null;
/// <summary>
/// Internal memebr storing the offset to the 20/28 byte structs
/// </summary>
private int _offset2028 = 0;
/// <summary>
/// Internal member storing the offset to the 16 byte structs
/// </summary>
private int _offset16structs = 0;
/// <summary>
/// Internal member storing the number of 16 byte structs
/// </summary>
private int _numberOf16structs = 0;
/// <summary>
/// Internal member storing the offset to the topic list
/// </summary>
private int _offsetOftopics = 0;
/// <summary>
/// Internal member storing the toc
/// </summary>
private ArrayList _toc = new ArrayList();
/// <summary>
/// Internal member for offset seeking
/// </summary>
private Hashtable _offsetTable = new Hashtable();
/// <summary>
/// Internal member storing the associated chmfile object
/// </summary>
private CHMFile _associatedFile = null;
/// <summary>
/// Constructor of the class
/// </summary>
/// <param name="binaryFileData">binary file data of the #TOCIDX file</param>
/// <param name="associatedFile">associated chm file</param>
public CHMTocidx(byte[] binaryFileData, CHMFile associatedFile)
{
_binaryFileData = binaryFileData;
_associatedFile = associatedFile;
DecodeData();
// clear internal binary data after extraction
_binaryFileData = null;
}
/// <summary>
/// Decodes the binary file data and fills the internal properties
/// </summary>
/// <returns>true if succeeded</returns>
private bool DecodeData()
{
_toc = new ArrayList();
_offsetTable = new Hashtable();
bool bRet = true;
MemoryStream memStream = new MemoryStream(_binaryFileData);
BinaryReader binReader = new BinaryReader(memStream);
int nCurOffset = 0;
_offset2028 = binReader.ReadInt32();
_offset16structs = binReader.ReadInt32();
_numberOf16structs = binReader.ReadInt32();
_offsetOftopics = binReader.ReadInt32();
binReader.BaseStream.Seek( _offset2028, SeekOrigin.Begin );
if( RecursivelyBuildTree(ref binReader, _offset2028, _toc, null) )
{
binReader.BaseStream.Seek( _offset16structs, SeekOrigin.Begin );
nCurOffset = (int)binReader.BaseStream.Position;
for(int i=0; i < _numberOf16structs; i++)
{
int tocOffset = binReader.ReadInt32();
int sqNr = binReader.ReadInt32();
int topOffset = binReader.ReadInt32();
int hhctopicIdx = binReader.ReadInt32();
nCurOffset = (int)binReader.BaseStream.Position;
int topicIdx = -1;
// if the topic offset is within the range of the stream
// and is >= the offset of the first topic dword
if((topOffset < (binReader.BaseStream.Length - 4)) && (topOffset >= _offsetOftopics))
{
// read the index of the topic for this item
binReader.BaseStream.Seek( topOffset, SeekOrigin.Begin);
topicIdx = binReader.ReadInt32();
binReader.BaseStream.Seek( nCurOffset, SeekOrigin.Begin);
TOCItem item = (TOCItem)_offsetTable[tocOffset.ToString()];
if( item != null)
{
if(( topicIdx < _associatedFile.TopicsFile.TopicTable.Count)&&(topicIdx>=0))
{
TopicEntry te = (TopicEntry) (_associatedFile.TopicsFile.TopicTable[topicIdx]);
if( (te != null) && (item.TopicOffset < 0) )
{
item.TopicOffset = te.EntryOffset;
}
}
}
}
}
}
return bRet;
}
/// <summary>
/// Recursively reads the binary toc tree from the file
/// </summary>
/// <param name="binReader">reference to binary reader</param>
/// <param name="NodeOffset">offset of the first node in the current level</param>
/// <param name="level">arraylist of TOCItems for the current level</param>
/// <param name="parentItem">parent item for the item</param>
/// <returns>Returns true if succeeded</returns>
private bool RecursivelyBuildTree(ref BinaryReader binReader, int NodeOffset, ArrayList level, TOCItem parentItem)
{
bool bRet = true;
int nextOffset=0;
int nReadOffset = (int)binReader.BaseStream.Position;
binReader.BaseStream.Seek(NodeOffset, SeekOrigin.Begin);
do
{
int nCurOffset = (int)binReader.BaseStream.Position;
int unkn1 = binReader.ReadInt16(); // unknown
int unkn2 = binReader.ReadInt16(); // unknown
int flag = binReader.ReadInt32();
int nFolderAdd = 0;
if((_associatedFile != null) && (_associatedFile.ImageTypeFolder))
{
// get the value which should be added, to display folders instead of books
if(HtmlHelpSystem.UseHH2TreePics)
nFolderAdd = 8;
else
nFolderAdd = 4;
}
int nFolderImgIdx = (HtmlHelpSystem.UseHH2TreePics ? (TOCItem.STD_FOLDER_HH2+nFolderAdd) : (TOCItem.STD_FOLDER_HH1+nFolderAdd));
int nFileImgIdx = (HtmlHelpSystem.UseHH2TreePics ? TOCItem.STD_FILE_HH2 : TOCItem.STD_FILE_HH1);
int stdImage = ((flag & 0x4)!=0) ? nFolderImgIdx : nFileImgIdx;
int stringOffset = binReader.ReadInt32();
int ParentOffset = binReader.ReadInt32();
nextOffset = binReader.ReadInt32();
int firstChildOffset = 0;
int unkn3=0;
if( (flag&0x4)!=0 )
{
firstChildOffset = binReader.ReadInt32();
unkn3 = binReader.ReadInt32(); // unknown
}
TOCItem newItem = new TOCItem();
newItem.ImageIndex = stdImage;
newItem.Offset = nCurOffset;
newItem.OffsetNext = nextOffset;
newItem.AssociatedFile = _associatedFile;
newItem.TocMode = DataMode.Binary;
newItem.Parent = parentItem;
if( (flag&0x08) == 0)
{
// toc item doesn't have a local value (=> stringOffset = offset of strings file)
newItem.Name = _associatedFile.StringsFile[stringOffset];
}
else
{
// this item has a topic entry (=> stringOffset = index of topic entry)
if((stringOffset < _associatedFile.TopicsFile.TopicTable.Count) && (stringOffset >= 0))
{
TopicEntry te = (TopicEntry) (_associatedFile.TopicsFile.TopicTable[stringOffset]);
if(te != null)
{
newItem.TopicOffset = te.EntryOffset;
}
}
}
_offsetTable[nCurOffset.ToString()] = newItem;
// if this item has children (firstChildOffset > 0)
if( firstChildOffset > 0)
{
bRet &= RecursivelyBuildTree(ref binReader, firstChildOffset, newItem.Children, newItem);
}
level.Add( newItem );
if(nCurOffset != nextOffset)
binReader.BaseStream.Seek(nextOffset, SeekOrigin.Begin);
}while(nextOffset != 0);
binReader.BaseStream.Seek(nReadOffset, SeekOrigin.Begin);
return bRet;
}
/// <summary>
/// Gets the internal read toc
/// </summary>
internal ArrayList TOC
{
get { return _toc; }
}
/// <summary>
/// Implement IDisposable.
/// </summary>
public void Dispose()
{
Dispose(true);
// This object will be cleaned up by the Dispose method.
// Therefore, you should call GC.SupressFinalize to
// take this object off the finalization queue
// and prevent finalization code for this object
// from executing a second time.
GC.SuppressFinalize(this);
}
/// <summary>
/// Dispose(bool disposing) executes in two distinct scenarios.
/// If disposing equals true, the method has been called directly
/// or indirectly by a user's code. Managed and unmanaged resources
/// can be disposed.
/// If disposing equals false, the method has been called by the
/// runtime from inside the finalizer and you should not reference
/// other objects. Only unmanaged resources can be disposed.
/// </summary>
/// <param name="disposing">disposing flag</param>
private void Dispose(bool disposing)
{
// Check to see if Dispose has already been called.
if(!this.disposed)
{
// If disposing equals true, dispose all managed
// and unmanaged resources.
if(disposing)
{
// Dispose managed resources.
_binaryFileData = null;
_toc = null;
_offsetTable = null;
}
}
disposed = true;
}
}
}

View File

@@ -1,235 +0,0 @@
using System;
using System.IO;
using System.Collections;
using System.Collections.Specialized;
namespace HtmlHelp.ChmDecoding
{
/// <summary>
/// The class <c>CHMTopics</c> implements functionality to decode the #TOPICS internal file
/// </summary>
internal sealed class CHMTopics : IDisposable
{
/// <summary>
/// Internal flag specifying if the object is going to be disposed
/// </summary>
private bool disposed = false;
/// <summary>
/// Internal member storing the binary file data
/// </summary>
private byte[] _binaryFileData = null;
/// <summary>
/// Internal member storing the associated chmfile object
/// </summary>
private CHMFile _associatedFile = null;
/// <summary>
/// Internal member storing the topic list
/// </summary>
private ArrayList _topicTable = new ArrayList();
/// <summary>
/// Constructor of the class
/// </summary>
/// <param name="binaryFileData">binary file data of the #TOPICS file</param>
/// <param name="associatedFile">associated chm file</param>
public CHMTopics(byte[] binaryFileData, CHMFile associatedFile)
{
_binaryFileData = binaryFileData;
_associatedFile = associatedFile;
DecodeData();
// clear internal binary data after extraction
_binaryFileData = null;
}
/// <summary>
/// Standard constructor
/// </summary>
internal CHMTopics()
{
}
#region Data dumping
/// <summary>
/// Dump the class data to a binary writer
/// </summary>
/// <param name="writer">writer to write the data</param>
internal void Dump(ref BinaryWriter writer)
{
writer.Write( _topicTable.Count );
foreach(TopicEntry curItem in _topicTable)
{
curItem.Dump(ref writer);
}
}
/// <summary>
/// Reads the object data from a dump store
/// </summary>
/// <param name="reader">reader to read the data</param>
internal void ReadDump(ref BinaryReader reader)
{
int i=0;
int nCnt = reader.ReadInt32();
for(i=0; i<nCnt;i++)
{
TopicEntry newItem = new TopicEntry();
newItem.SetCHMFile(_associatedFile);
newItem.ReadDump(ref reader);
_topicTable.Add(newItem);
}
}
/// <summary>
/// Sets the associated CHMFile instance
/// </summary>
/// <param name="associatedFile">instance to set</param>
internal void SetCHMFile(CHMFile associatedFile)
{
_associatedFile = associatedFile;
foreach(TopicEntry curEntry in _topicTable)
{
curEntry.SetCHMFile(associatedFile);
}
}
#endregion
/// <summary>
/// Decodes the binary file data and fills the internal properties
/// </summary>
/// <returns>true if succeeded</returns>
private bool DecodeData()
{
bool bRet = true;
MemoryStream memStream = new MemoryStream(_binaryFileData);
BinaryReader binReader = new BinaryReader(memStream);
int nCurOffset = 0;
while( (memStream.Position < memStream.Length) && (bRet) )
{
int entryOffset = nCurOffset;
int tocIdx = binReader.ReadInt32();
int titleOffset = binReader.ReadInt32();
int urltablOffset = binReader.ReadInt32();
int visibilityMode = binReader.ReadInt16();
int unknownMode = binReader.ReadInt16();
TopicEntry newEntry = new TopicEntry(entryOffset, tocIdx, titleOffset, urltablOffset, visibilityMode, unknownMode, _associatedFile);
_topicTable.Add( newEntry );
nCurOffset = (int)memStream.Position;
}
return bRet;
}
/// <summary>
/// Gets the arraylist containing all topic entries.
/// </summary>
public ArrayList TopicTable
{
get
{
return _topicTable;
}
}
/// <summary>
/// Gets the topic entry of a given offset
/// </summary>
public TopicEntry this[int offset]
{
get
{
foreach(TopicEntry curEntry in _topicTable)
if(curEntry.EntryOffset == offset)
return curEntry;
return null;
}
}
/// <summary>
/// Searches a topic by the locale name
/// </summary>
/// <param name="locale">locale name to search</param>
/// <returns>The topicentry instance if found, otherwise null</returns>
public TopicEntry GetByLocale(string locale)
{
foreach(TopicEntry curEntry in TopicTable)
{
if(curEntry.Locale.ToLower() == locale.ToLower())
return curEntry;
}
return null;
}
/// <summary>
/// Searches the topics for all files with a given file extension
/// </summary>
/// <param name="fileExtension">extension to search</param>
/// <returns>An arraylist of TopicEntry instances or null if no topic was found</returns>
public ArrayList GetByExtension(string fileExtension)
{
ArrayList arrRet = new ArrayList();
foreach(TopicEntry curEntry in TopicTable)
{
if(curEntry.Locale.ToLower().EndsWith(fileExtension.ToLower()))
arrRet.Add(curEntry);
}
if(arrRet.Count > 0)
return arrRet;
return null;
}
/// <summary>
/// Implement IDisposable.
/// </summary>
public void Dispose()
{
Dispose(true);
// This object will be cleaned up by the Dispose method.
// Therefore, you should call GC.SupressFinalize to
// take this object off the finalization queue
// and prevent finalization code for this object
// from executing a second time.
GC.SuppressFinalize(this);
}
/// <summary>
/// Dispose(bool disposing) executes in two distinct scenarios.
/// If disposing equals true, the method has been called directly
/// or indirectly by a user's code. Managed and unmanaged resources
/// can be disposed.
/// If disposing equals false, the method has been called by the
/// runtime from inside the finalizer and you should not reference
/// other objects. Only unmanaged resources can be disposed.
/// </summary>
/// <param name="disposing">disposing flag</param>
private void Dispose(bool disposing)
{
// Check to see if Dispose has already been called.
if(!this.disposed)
{
// If disposing equals true, dispose all managed
// and unmanaged resources.
if(disposing)
{
// Dispose managed resources.
_binaryFileData = null;
_topicTable=null;
}
}
disposed = true;
}
}
}

View File

@@ -1,308 +0,0 @@
using System;
using System.IO;
using System.Collections;
using System.Collections.Specialized;
namespace HtmlHelp.ChmDecoding
{
/// <summary>
/// The class <c>CHMUrlstr</c> implements a string collection storing the URL strings of the help file
/// </summary>
internal sealed class CHMUrlstr : IDisposable
{
/// <summary>
/// Constant specifying the size of the string blocks
/// </summary>
private const int BLOCK_SIZE = 0x1000;
/// <summary>
/// Internal flag specifying if the object is going to be disposed
/// </summary>
private bool disposed = false;
/// <summary>
/// Internal member storing the binary file data
/// </summary>
private byte[] _binaryFileData = null;
/// <summary>
/// Internal member storing the url dictionary
/// </summary>
private Hashtable _urlDictionary = new Hashtable();
/// <summary>
/// Internal member storing the framename dictionary
/// </summary>
private Hashtable _framenameDictionary = new Hashtable();
/// <summary>
/// Internal member storing the associated chmfile object
/// </summary>
private CHMFile _associatedFile = null;
/// <summary>
/// Constructor of the class
/// </summary>
/// <param name="binaryFileData">binary file data of the #URLSTR file</param>
/// <param name="associatedFile">associated chm file</param>
public CHMUrlstr(byte[] binaryFileData, CHMFile associatedFile)
{
_binaryFileData = binaryFileData;
_associatedFile = associatedFile;
DecodeData();
// clear internal binary data after extraction
_binaryFileData = null;
}
/// <summary>
/// Standard constructor
/// </summary>
internal CHMUrlstr()
{
}
#region Data dumping
/// <summary>
/// Dump the class data to a binary writer
/// </summary>
/// <param name="writer">writer to write the data</param>
internal void Dump(ref BinaryWriter writer)
{
writer.Write( _urlDictionary.Count );
if (_urlDictionary.Count != 0)
{
IDictionaryEnumerator iDictionaryEnumerator = _urlDictionary.GetEnumerator();
while (iDictionaryEnumerator.MoveNext())
{
DictionaryEntry dictionaryEntry = (DictionaryEntry)iDictionaryEnumerator.Current;
writer.Write( Int32.Parse(dictionaryEntry.Key.ToString()) );
writer.Write( dictionaryEntry.Value.ToString() );
}
}
writer.Write( _framenameDictionary.Count );
if (_framenameDictionary.Count != 0)
{
IDictionaryEnumerator iDictionaryEnumerator = _framenameDictionary.GetEnumerator();
while (iDictionaryEnumerator.MoveNext())
{
DictionaryEntry dictionaryEntry = (DictionaryEntry)iDictionaryEnumerator.Current;
writer.Write( Int32.Parse(dictionaryEntry.Key.ToString()) );
writer.Write( dictionaryEntry.Value.ToString() );
}
}
}
/// <summary>
/// Reads the object data from a dump store
/// </summary>
/// <param name="reader">reader to read the data</param>
internal void ReadDump(ref BinaryReader reader)
{
int i=0;
int nCnt = reader.ReadInt32();
for(i=0; i<nCnt;i++)
{
int nKey = reader.ReadInt32();
string sValue = reader.ReadString();
_urlDictionary[nKey.ToString()] = sValue;
}
nCnt = reader.ReadInt32();
for(i=0; i<nCnt;i++)
{
int nKey = reader.ReadInt32();
string sValue = reader.ReadString();
_framenameDictionary[nKey.ToString()] = sValue;
}
}
/// <summary>
/// Sets the associated CHMFile instance
/// </summary>
/// <param name="associatedFile">instance to set</param>
internal void SetCHMFile(CHMFile associatedFile)
{
_associatedFile = associatedFile;
}
#endregion
/// <summary>
/// Decodes the binary file data and fills the internal properties
/// </summary>
/// <returns>true if succeeded</returns>
private bool DecodeData()
{
bool bRet = true;
MemoryStream memStream = new MemoryStream(_binaryFileData);
BinaryReader binReader = new BinaryReader(memStream);
int nCurOffset = 0;
while( (memStream.Position < memStream.Length) && (bRet) )
{
nCurOffset = (int)memStream.Position;
byte [] dataBlock = binReader.ReadBytes(BLOCK_SIZE);
bRet &= DecodeBlock(dataBlock, ref nCurOffset);
}
return bRet;
}
/// <summary>
/// Decodes a block of url-string data
/// </summary>
/// <param name="dataBlock">block of data</param>
/// <param name="nOffset">current file offset</param>
/// <returns>true if succeeded</returns>
private bool DecodeBlock( byte[] dataBlock, ref int nOffset )
{
bool bRet = true;
int blockOffset = nOffset;
MemoryStream memStream = new MemoryStream(dataBlock);
BinaryReader binReader = new BinaryReader(memStream);
if(nOffset==0)
binReader.ReadByte(); // first block starts with an unknown byte
while( (memStream.Position < (memStream.Length-8)) && (bRet) )
{
int entryOffset = blockOffset + (int)memStream.Position;
int urlOffset = binReader.ReadInt32();
int frameOffset = binReader.ReadInt32();
// There is one way to tell where the end of the URL/FrameName
// pairs occurs: Repeat the following: read 2 DWORDs and if both
// are less than the current offset then this is the start of the Local
// strings else skip two NT strings.
// if(( (urlOffset < (entryOffset+8)) && (frameOffset < (entryOffset+8)) ))
// {
// //TODO: add correct string reading if an offset has been found
// /*
// int curOffset = (int)memStream.Position;
//
// memStream.Seek( (long)(blockOffset-urlOffset), SeekOrigin.Begin);
// string sTemp = CHMReader.ExtractString(ref binReader, 0, true);
//
// memStream.Seek( (long)(blockOffset-frameOffset), SeekOrigin.Begin);
// sTemp = CHMReader.ExtractString(ref binReader, 0, true);
//
// memStream.Seek((long)curOffset, SeekOrigin.Begin);
// */
//
//
// int curOffs = (int)memStream.Position;
// BinaryReaderHelp.ExtractString(ref binReader, 0, true, _associatedFile.TextEncoding);
// nOffset += (int)memStream.Position - curOffs;
//
// curOffs = (int)memStream.Position;
// BinaryReaderHelp.ExtractString(ref binReader, 0, true, _associatedFile.TextEncoding);
// nOffset += (int)memStream.Position - curOffs;
// }
// else
{
bool bFoundTerminator = false;
string sTemp = BinaryReaderHelp.ExtractString(ref binReader, ref bFoundTerminator, 0, true, _associatedFile.TextEncoding);
if(sTemp == "")
{
//nOffset = nOffset + 1 + (int)memStream.Length - (int)memStream.Position;
memStream.Seek(memStream.Length-1, SeekOrigin.Begin);
}
else
{
_urlDictionary[entryOffset.ToString()] = sTemp.ToString();
_framenameDictionary[ entryOffset.ToString() ] = sTemp.ToString() ;
}
}
}
return bRet;
}
/// <summary>
/// Gets the url at a given offset
/// </summary>
/// <param name="offset">offset of url</param>
/// <returns>the url at the given offset</returns>
public string GetURLatOffset(int offset)
{
if(offset == -1)
return String.Empty;
string sTemp = (string)_urlDictionary[ offset.ToString() ];
if(sTemp == null)
return String.Empty;
return sTemp;
}
/// <summary>
/// Gets the framename at a given offset
/// </summary>
/// <param name="offset">offset of the framename</param>
/// <returns>the frame name at the given offset</returns>
public string GetFrameNameatOffset(int offset)
{
if(offset == -1)
return String.Empty;
string sTemp = (string)_framenameDictionary[ offset.ToString() ];
if(sTemp == null)
return String.Empty;
return sTemp;
}
/// <summary>
/// Implement IDisposable.
/// </summary>
public void Dispose()
{
Dispose(true);
// This object will be cleaned up by the Dispose method.
// Therefore, you should call GC.SupressFinalize to
// take this object off the finalization queue
// and prevent finalization code for this object
// from executing a second time.
GC.SuppressFinalize(this);
}
/// <summary>
/// Dispose(bool disposing) executes in two distinct scenarios.
/// If disposing equals true, the method has been called directly
/// or indirectly by a user's code. Managed and unmanaged resources
/// can be disposed.
/// If disposing equals false, the method has been called by the
/// runtime from inside the finalizer and you should not reference
/// other objects. Only unmanaged resources can be disposed.
/// </summary>
/// <param name="disposing">disposing flag</param>
private void Dispose(bool disposing)
{
// Check to see if Dispose has already been called.
if(!this.disposed)
{
// If disposing equals true, dispose all managed
// and unmanaged resources.
if(disposing)
{
// Dispose managed resources.
_binaryFileData = null;
_urlDictionary = null;
_framenameDictionary = null;
}
}
disposed = true;
}
}
}

View File

@@ -1,245 +0,0 @@
using System;
using System.IO;
using System.Collections;
namespace HtmlHelp.ChmDecoding
{
/// <summary>
/// The class <c>CHMUrltable</c> implements methods to decode the #URLTBL internal file.
/// </summary>
internal sealed class CHMUrltable : IDisposable
{
/// <summary>
/// Constant specifying the size of the data blocks
/// </summary>
private const int BLOCK_SIZE = 0x1000;
/// <summary>
/// Constant specifying the number of records per block
/// </summary>
private const int RECORDS_PER_BLOCK = 341;
/// <summary>
/// Internal flag specifying if the object is going to be disposed
/// </summary>
private bool disposed = false;
/// <summary>
/// Internal member storing the binary file data
/// </summary>
private byte[] _binaryFileData = null;
/// <summary>
/// Internal member storing the url table
/// </summary>
private ArrayList _urlTable = new ArrayList();
/// <summary>
/// Internal member storing the associated chmfile object
/// </summary>
private CHMFile _associatedFile = null;
/// <summary>
/// Constructor of the class
/// </summary>
/// <param name="binaryFileData">binary file data of the #URLTBL file</param>
/// <param name="associatedFile">associated chm file</param>
public CHMUrltable(byte[] binaryFileData, CHMFile associatedFile)
{
_binaryFileData = binaryFileData;
_associatedFile = associatedFile;
DecodeData();
// clear internal binary data after extraction
_binaryFileData = null;
}
/// <summary>
/// Standard constructor
/// </summary>
internal CHMUrltable()
{
}
#region Data dumping
/// <summary>
/// Dump the class data to a binary writer
/// </summary>
/// <param name="writer">writer to write the data</param>
internal void Dump(ref BinaryWriter writer)
{
writer.Write( _urlTable.Count );
foreach(UrlTableEntry curItem in _urlTable)
{
curItem.Dump(ref writer);
}
}
/// <summary>
/// Reads the object data from a dump store
/// </summary>
/// <param name="reader">reader to read the data</param>
internal void ReadDump(ref BinaryReader reader)
{
int i=0;
int nCnt = reader.ReadInt32();
for(i=0; i<nCnt;i++)
{
UrlTableEntry newItem = new UrlTableEntry();
newItem.SetCHMFile(_associatedFile);
newItem.ReadDump(ref reader);
_urlTable.Add(newItem);
}
}
/// <summary>
/// Sets the associated CHMFile instance
/// </summary>
/// <param name="associatedFile">instance to set</param>
internal void SetCHMFile(CHMFile associatedFile)
{
_associatedFile = associatedFile;
foreach(UrlTableEntry curEntry in _urlTable)
{
curEntry.SetCHMFile(associatedFile);
}
}
#endregion
/// <summary>
/// Decodes the binary file data and fills the internal properties
/// </summary>
/// <returns>true if succeeded</returns>
private bool DecodeData()
{
bool bRet = true;
MemoryStream memStream = new MemoryStream(_binaryFileData);
BinaryReader binReader = new BinaryReader(memStream);
int nCurOffset = 0;
while( (memStream.Position < memStream.Length) && (bRet) )
{
nCurOffset = (int)memStream.Position;
byte [] dataBlock = binReader.ReadBytes(BLOCK_SIZE);
bRet &= DecodeBlock(dataBlock, ref nCurOffset);
}
return bRet;
}
/// <summary>
/// Decodes a block of url-string data
/// </summary>
/// <param name="dataBlock">block of data</param>
/// <param name="nOffset">current file offset</param>
/// <returns>true if succeeded</returns>
private bool DecodeBlock( byte[] dataBlock, ref int nOffset )
{
bool bRet = true;
int blockOffset = nOffset;
MemoryStream memStream = new MemoryStream(dataBlock);
BinaryReader binReader = new BinaryReader(memStream);
for(int i=0; i < RECORDS_PER_BLOCK; i++)
{
int recordOffset = blockOffset + (int)memStream.Position;
uint nuniqueID = (uint) binReader.ReadInt32(); // unknown dword
int ntopicsIdx = binReader.ReadInt32();
int urlstrOffset = binReader.ReadInt32();
UrlTableEntry newEntry = new UrlTableEntry(nuniqueID, recordOffset, ntopicsIdx, urlstrOffset, _associatedFile);
_urlTable.Add(newEntry);
if( memStream.Position >= memStream.Length)
break;
}
if(dataBlock.Length == BLOCK_SIZE)
binReader.ReadInt32();
return bRet;
}
/// <summary>
/// Gets the arraylist containing all urltable entries.
/// </summary>
public ArrayList UrlTable
{
get
{
return _urlTable;
}
}
/// <summary>
/// Gets the urltable entry of a given offset
/// </summary>
public UrlTableEntry this[int offset]
{
get
{
foreach(UrlTableEntry curEntry in _urlTable)
if(curEntry.EntryOffset == offset)
return curEntry;
return null;
}
}
/// <summary>
/// Gets the urltable entry of a given uniqueID
/// </summary>
public UrlTableEntry GetByUniqueID(uint uniqueID)
{
foreach(UrlTableEntry curEntry in UrlTable)
{
if(curEntry.UniqueID == uniqueID)
return curEntry;
}
return null;
}
/// <summary>
/// Implement IDisposable.
/// </summary>
public void Dispose()
{
Dispose(true);
// This object will be cleaned up by the Dispose method.
// Therefore, you should call GC.SupressFinalize to
// take this object off the finalization queue
// and prevent finalization code for this object
// from executing a second time.
GC.SuppressFinalize(this);
}
/// <summary>
/// Dispose(bool disposing) executes in two distinct scenarios.
/// If disposing equals true, the method has been called directly
/// or indirectly by a user's code. Managed and unmanaged resources
/// can be disposed.
/// If disposing equals false, the method has been called by the
/// runtime from inside the finalizer and you should not reference
/// other objects. Only unmanaged resources can be disposed.
/// </summary>
/// <param name="disposing">disposing flag</param>
private void Dispose(bool disposing)
{
// Check to see if Dispose has already been called.
if(!this.disposed)
{
// If disposing equals true, dispose all managed
// and unmanaged resources.
if(disposing)
{
// Dispose managed resources.
_binaryFileData = null;
_urlTable = null;
}
}
disposed = true;
}
}
}

View File

@@ -1,395 +0,0 @@
using System;
using System.IO;
using System.Text;
using System.Diagnostics;
using System.Collections.Specialized;
using ICSharpCode.SharpZipLib;
using ICSharpCode.SharpZipLib.Zip;
using ICSharpCode.SharpZipLib.Zip.Compression;
using ICSharpCode.SharpZipLib.Zip.Compression.Streams;
using HtmlHelp;
// using HtmlHelp.Storage;
namespace HtmlHelp.ChmDecoding
{
/// <summary>
/// Enumeration for specifying the dumping compression
/// </summary>
public enum DumpCompression
{
/// <summary>
/// None - no data compression will be used.
/// Fastest but most memory intensive
/// </summary>
None = 0,
/// <summary>
/// Minimum - a minimum data compression will be used.
/// Fast but not much data reduction
/// </summary>
Minimum = 1,
/// <summary>
/// Medium - a medium data compression will be used.
/// Slower but medium data reduction
/// </summary>
Medium = 2,
/// <summary>
/// Maximum - a maximum data compression will be used.
/// Slowest but maximum data reduction
/// </summary>
Maximum = 3
}
/// <summary>
/// Flags which specify which data should be dumped
/// </summary>
[FlagsAttribute()]
public enum DumpingFlags
{
/// <summary>
/// DumpTextTOC - if this flag is set, text-based TOCs (sitemap format) will be dumped
/// </summary>
DumpTextTOC = 1,
/// <summary>
/// DumpBinaryTOC - if this flag is set, binary TOCs will be dumped
/// </summary>
DumpBinaryTOC = 2,
/// <summary>
/// DumpTextIndex - if this flag is set, the text-based index (sitemap format) will be dumped
/// </summary>
DumpTextIndex = 4,
/// <summary>
/// DumpBinaryIndex - if this flag is set, the binary index will be dumped
/// </summary>
DumpBinaryIndex = 8,
/// <summary>
/// DumpStrings - if this flag is set, the internal #STRINGS file will be dumped
/// </summary>
DumpStrings = 16,
/// <summary>
/// DumpUrlStr - if this flag is set, the internal #URLSTR file will be dumped
/// </summary>
DumpUrlStr = 32,
/// <summary>
/// DumpUrlTbl - if this flag is set, the internal #URLTBL file will be dumped
/// </summary>
DumpUrlTbl = 64,
/// <summary>
/// DumpTopics - if this flag is set, the internal #TOPICS file will be dumped
/// </summary>
DumpTopics = 128,
/// <summary>
/// DumpFullText - if this flag is set, the internal $FIftiMain file will be dumped
/// </summary>
DumpFullText = 256
}
/// <summary>
/// The class <c>DumpingInfo</c> implements information properties for the CHMFile class
/// if and how data dumping should be used.
/// </summary>
public sealed class DumpingInfo
{
public bool m_bAllowSaveDump=true;
private readonly static BitVector32.Section DumpFlags = BitVector32.CreateSection(512);
private const string _dumpHeader = "HtmlHelpSystem dump file 1.0";
private string _outputDir = ""; // emtpy string means, same directory as chm file
private DumpCompression _compressionLevel = DumpCompression.Maximum;
private CHMFile _chmFile = null;
private DeflaterOutputStream _outputStream = null;
private InflaterInputStream _inputStream = null;
private BinaryWriter _writer = null;
private BinaryReader _reader = null;
private BitVector32 _flags;
/// <summary>
/// Constructor of the class
/// </summary>
/// <param name="flags">Combine flag values to specify which data should be dumped.</param>
/// <param name="outputDir">output directory. emtpy string means,
/// same directory as chm file (only if destination = ExternalFile)</param>
/// <param name="compressionLevel">compression which should be used</param>
public DumpingInfo(DumpingFlags flags, string outputDir, DumpCompression compressionLevel)
{
_flags = new BitVector32(0);
int i = _flags[DumpFlags];
_flags[DumpFlags] = i | (int)flags;
_outputDir = outputDir;
_compressionLevel = compressionLevel;
}
/// <summary>
/// Gets the flag if text-based TOCs will be written to the dumping file
/// </summary>
public bool DumpTextTOC
{
get { return ((_flags[DumpFlags] & (int)DumpingFlags.DumpTextTOC) != 0); }
}
/// <summary>
/// Gets the flag if binary TOCs will be written to the dumping file
/// </summary>
public bool DumpBinaryTOC
{
get { return ((_flags[DumpFlags] & (int)DumpingFlags.DumpBinaryTOC) != 0); }
}
/// <summary>
/// Gets the flag if the text-based index will be written to the dumping file
/// </summary>
public bool DumpTextIndex
{
get { return ((_flags[DumpFlags] & (int)DumpingFlags.DumpTextIndex) != 0); }
}
/// <summary>
/// Gets the flag if the binary index will be written to the dumping file
/// </summary>
public bool DumpBinaryIndex
{
get { return ((_flags[DumpFlags] & (int)DumpingFlags.DumpBinaryIndex) != 0); }
}
/// <summary>
/// Gets the flag if the #STRINGS file will be written to the dumping file
/// </summary>
public bool DumpStrings
{
get { return ((_flags[DumpFlags] & (int)DumpingFlags.DumpStrings) != 0); }
}
/// <summary>
/// Gets the flag if the #URLSTR file will be written to the dumping file
/// </summary>
public bool DumpUrlStr
{
get { return ((_flags[DumpFlags] & (int)DumpingFlags.DumpUrlStr) != 0); }
}
/// <summary>
/// Gets the flag if the #URLTBL file will be written to the dumping file
/// </summary>
public bool DumpUrlTbl
{
get { return ((_flags[DumpFlags] & (int)DumpingFlags.DumpUrlTbl) != 0); }
}
/// <summary>
/// Gets the flag if the #TOPICS file will be written to the dumping file
/// </summary>
public bool DumpTopics
{
get { return ((_flags[DumpFlags] & (int)DumpingFlags.DumpTopics) != 0); }
}
/// <summary>
/// Gets the flag if the $FIftiMain file will be written to the dumping file
/// </summary>
public bool DumpFullText
{
get { return ((_flags[DumpFlags] & (int)DumpingFlags.DumpFullText) != 0); }
}
/// <summary>
/// Gets the dump output directory.
/// </summary>
/// <value>emtpy string means, same directory as chm file</value>
/// <remarks>If Destination is set to DumpingOutput.InternalFile this property will be ignored</remarks>
public string OutputDir
{
get { return _outputDir; }
}
/// <summary>
/// The compression level used.
/// </summary>
public DumpCompression CompressionLevel
{
get { return _compressionLevel; }
}
/// <summary>
/// Gets/Sets the CHMFile instance associated with this object
/// </summary>
internal CHMFile ChmFile
{
get { return _chmFile; }
set { _chmFile = value; }
}
/// <summary>
/// Translates the compression level to the deflater constants
/// </summary>
private int CompLvl
{
get
{
switch(CompressionLevel)
{
case DumpCompression.None: return Deflater.NO_COMPRESSION;
case DumpCompression.Minimum: return Deflater.BEST_SPEED;
case DumpCompression.Medium: return Deflater.DEFAULT_COMPRESSION;
case DumpCompression.Maximum: return Deflater.BEST_COMPRESSION;
}
return Deflater.BEST_COMPRESSION;
}
}
/// <summary>
/// Checks if a dump exists
/// </summary>
internal bool DumpExists
{
get
{
if(_flags[DumpFlags] == 0)
return false;
// we have a reader or writer to the dump so it must exist
if( (_reader != null) || (_writer != null) )
return true;
string sDmpFile = _chmFile.ChmFilePath;
sDmpFile=sDmpFile.ToLower().Replace(".chm",".CHB");
return File.Exists(sDmpFile);
}
}
/// <summary>
/// Gets a binary writer instance which allows you to write to the dump
/// </summary>
internal BinaryWriter Writer
{
get
{
if (m_bAllowSaveDump==false)
return null;
if(_flags[DumpFlags] == 0)
throw new InvalidOperationException("Nothing to dump. No flags have been set !");
if(_reader != null)
throw new InvalidOperationException("Can't write and read at the same time !");
if(_chmFile == null)
throw new InvalidOperationException("Only usable with an associated CHMFile instance !");
if(_writer==null)
{
string sDmpFile = _chmFile.ChmFilePath;
sDmpFile=sDmpFile.ToLower().Replace(".chm",".CHB");
StreamWriter stream = new StreamWriter(sDmpFile, false, _chmFile.TextEncoding);
// write header info uncompressed
BinaryWriter _hwriter = new BinaryWriter(stream.BaseStream);
_hwriter.Write(_dumpHeader);
_hwriter.Write((int)CompressionLevel);
if(_compressionLevel == DumpCompression.None)
{
_writer = new BinaryWriter(stream.BaseStream);
}
else
{
_outputStream = new DeflaterOutputStream(stream.BaseStream, new Deflater(CompLvl));
_writer = new BinaryWriter(_outputStream);
}
}
return _writer;
}
}
/// <summary>
/// Gets a binary reader which allows you to read from the dump
/// </summary>
internal BinaryReader Reader
{
get
{
if(_writer != null)
throw new InvalidOperationException("Can't write and read at the same time !");
if(_chmFile == null)
throw new InvalidOperationException("Only usable with an associated CHMFile instance !");
if(_reader==null)
{
string sDmpFile = _chmFile.ChmFilePath;
sDmpFile=sDmpFile.ToLower().Replace(".chm",".CHB");
StreamReader stream = new StreamReader(sDmpFile, _chmFile.TextEncoding);
BinaryReader _hReader = new BinaryReader(stream.BaseStream);
string sH = _hReader.ReadString();
if(sH != _dumpHeader)
{
_hReader.Close();
Debug.WriteLine("Unexpected dump-file header !");
throw new FormatException("DumpingInfo.Reader - Unexpected dump-file header !");
}
_compressionLevel = (DumpCompression)_hReader.ReadInt32();
// if(_compressionLevel != (DumpCompression)_hReader.ReadInt32())
// {
// _hReader.Close();
// return null;
// }
if(_compressionLevel == DumpCompression.None)
{
_reader = new BinaryReader(stream.BaseStream);
}
else
{
_inputStream = new InflaterInputStream(stream.BaseStream, new Inflater());
_reader = new BinaryReader(_inputStream);
}
}
return _reader;
}
}
/// <summary>
/// Saves data and closes the dump
/// </summary>
/// <returns>true if succeed</returns>
internal bool SaveData()
{
if (m_bAllowSaveDump==false)
return true;
if(_writer != null)
{
if(_writer!=null)
_writer.Close();
_outputStream = null;
_writer = null;
}
if(_reader != null)
{
if(_reader!=null)
_reader.Close();
_inputStream = null;
_reader = null;
}
return true;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,593 +0,0 @@
using System;
using System.Collections;
using System.Text;
using System.Text.RegularExpressions;
namespace HtmlHelp.ChmDecoding
{
/// <summary>
/// The class <c>HHCParser</c> implements a parser for HHC contents files.
/// </summary>
internal sealed class HHCParser
{
/// <summary>
/// regular expressions for replacing the sitemap boundary tags
/// </summary>
private static string RE_ULOpening = @"\<ul\>"; // will be replaced by a '(' for nested parsing
private static string RE_ULClosing = @"\</ul\>"; // will be replaced by a ')' for nested parsing
/// <summary>
/// Matching ul-tags
/// </summary>
private static string RE_ULBoundaries = @"\<ul\>(?<innerText>.*)\</ul\>";
/// <summary>
/// Matching the nested tree structure.
/// </summary>
private static string RE_NestedBoundaries = @"\( (?> [^()]+ | \( (?<DEPTH>) | \) (?<-DEPTH>) )* (?(DEPTH)(?!)) \)";
/// <summary>
/// Matching object-tags
/// </summary>
private static string RE_ObjectBoundaries = @"\<object(?<innerText>.*?)\</object\>";
/// <summary>
/// Matching param tags
/// </summary>
private static string RE_ParamBoundaries = @"\<param(?<innerText>.*?)\>";
/// <summary>
/// Extracting tag attributes
/// </summary>
private const string RE_QuoteAttributes = @"( |\t)*(?<attributeName>[\-a-zA-Z0-9]*)( |\t)*=( |\t)*(?<attributeTD>[\""\'])?(?<attributeValue>.*?(?(attributeTD)\k<attributeTD>|([\s>]|.$)))";
/// <summary>
/// private regular expressionobjects
/// </summary>
private static Regex ulRE;
private static Regex NestedRE;
private static Regex ObjectRE;
private static Regex ParamRE;
private static Regex AttributesRE;
/// <summary>
/// Internal member storing the list of TOCItems which are holding merge links
/// </summary>
private static ArrayList _mergeItems = null;
/// <summary>
/// Internal member storing the last read regular topic item.
/// This is used to handle "Merge" entries and add them as child to this instance.
/// </summary>
private static TOCItem _lastTopicItem = null;
/// <summary>
/// Parses a HHC file and returns an ArrayList with the table of contents (TOC) tree
/// </summary>
/// <param name="hhcFile">string content of the hhc file</param>
/// <param name="chmFile">CHMFile instance</param>
/// <returns>Returns an ArrayList with the table of contents (TOC) tree</returns>
public static ArrayList ParseHHC(string hhcFile, CHMFile chmFile)
{
_lastTopicItem = null;
_mergeItems = null; // clear merged item list
ArrayList tocList = new ArrayList();
ulRE = new Regex(RE_ULBoundaries, RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
NestedRE = new Regex(RE_NestedBoundaries, RegexOptions.IgnorePatternWhitespace | RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
ObjectRE = new Regex(RE_ObjectBoundaries, RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
ParamRE = new Regex(RE_ParamBoundaries, RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
AttributesRE = new Regex(RE_QuoteAttributes, RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
int innerTextIdx = ulRE.GroupNumberFromName("innerText");
if( ulRE.IsMatch(hhcFile, 0) )
{
Match m = ulRE.Match(hhcFile, 0);
int nFirstUL = 0;
nFirstUL = hhcFile.ToLower().IndexOf("<ul>");
if(nFirstUL == -1)
nFirstUL = hhcFile.ToLower().IndexOf("<il>");
if( ObjectRE.IsMatch(hhcFile, 0) ) // first object block contains information types and categories
{
Match mO = ObjectRE.Match(hhcFile, 0);
int iOTxt = ObjectRE.GroupNumberFromName("innerText");
string globalText = mO.Groups[iOTxt].Value;
if( mO.Groups[iOTxt].Index <= nFirstUL)
ParseGlobalSettings( globalText, chmFile );
}
// parse toc tree
string innerText = m.Groups["innerText"].Value;
innerText = innerText.Replace("(", "&#040;");
innerText = innerText.Replace(")", "&#041;");
innerText = Regex.Replace(innerText, RE_ULOpening, "(", RegexOptions.IgnoreCase);
innerText = Regex.Replace(innerText, RE_ULClosing, ")", RegexOptions.IgnoreCase);
ParseTree( innerText, null, tocList, chmFile );
}
return tocList;
}
/// <summary>
/// Checks if the hhc file contains a global object tag.
/// </summary>
/// <param name="hhcFile">string content of the hhc file</param>
/// <param name="chmFile">chm file</param>
/// <returns>true if the hhc content contains a global object tag</returns>
public static bool HasGlobalObjectTag(string hhcFile, CHMFile chmFile)
{
bool bRet = false;
ulRE = new Regex(RE_ULBoundaries, RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
ObjectRE = new Regex(RE_ObjectBoundaries, RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
int innerTextIdx = ulRE.GroupNumberFromName("innerText");
if( ulRE.IsMatch(hhcFile, 0) )
{
Match m = ulRE.Match(hhcFile, 0);
int nFirstUL = 0;
nFirstUL = hhcFile.ToLower().IndexOf("<ul>");
if(nFirstUL == -1)
nFirstUL = hhcFile.ToLower().IndexOf("<il>");
if( ObjectRE.IsMatch(hhcFile, 0) ) // first object block contains information types and categories
{
Match mO = ObjectRE.Match(hhcFile, 0);
int iOTxt = ObjectRE.GroupNumberFromName("innerText");
string globalText = mO.Groups[iOTxt].Value;
if( mO.Groups[iOTxt].Index <= nFirstUL)
bRet = true;
}
}
return bRet;
}
/// <summary>
/// Gets true if the previously done parsing found merge-links
/// </summary>
public static bool HasMergeLinks
{
get
{
if(_mergeItems==null)
return false;
return _mergeItems.Count > 0;
}
}
/// <summary>
/// Gets all TOCItem references which are holding merge-links
/// </summary>
public static ArrayList MergeItems
{
get { return _mergeItems; }
}
/// <summary>
/// Recursively parses a sitemap tree
/// </summary>
/// <param name="text">content text</param>
/// <param name="parent">Parent for all read items</param>
/// <param name="arrNodes">arraylist which receives the extracted nodes</param>
/// <param name="chmFile">CHMFile instance</param>
private static void ParseTree( string text, TOCItem parent, ArrayList arrNodes, CHMFile chmFile )
{
string strPreItems="", strPostItems="";
string innerText = "";
int nIndex = 0;
while( NestedRE.IsMatch(text, nIndex) )
{
Match m = NestedRE.Match(text, nIndex);
innerText = m.Value.Substring( 1, m.Length-2);
strPreItems = text.Substring(nIndex,m.Index-nIndex);
ParseItems(strPreItems, parent, arrNodes, chmFile);
if((arrNodes.Count>0) && (innerText.Length > 0) )
{
TOCItem p = ((TOCItem)(arrNodes[arrNodes.Count-1]));
ParseTree( innerText, p, p.Children, chmFile );
}
nIndex = m.Index+m.Length;
}
if( nIndex == 0)
{
strPostItems = text.Substring(nIndex, text.Length-nIndex);
ParseItems(strPostItems, parent, arrNodes, chmFile);
}
else if( nIndex < text.Length-1)
{
strPostItems = text.Substring(nIndex, text.Length-nIndex);
ParseTree(strPostItems, parent, arrNodes, chmFile);
}
}
/// <summary>
/// Parses tree nodes from the text
/// </summary>
/// <param name="itemstext">text containing the items</param>
/// <param name="parent">Parent for all read items</param>
/// <param name="arrNodes">arraylist where the nodes should be added</param>
/// <param name="chmFile">CHMFile instance</param>
private static void ParseItems( string itemstext, TOCItem parent, ArrayList arrNodes, CHMFile chmFile)
{
int innerTextIdx = ObjectRE.GroupNumberFromName("innerText");
int innerPTextIdx = ParamRE.GroupNumberFromName("innerText");
// get group-name indexes
int nameIndex = AttributesRE.GroupNumberFromName("attributeName");
int valueIndex = AttributesRE.GroupNumberFromName("attributeValue");
int tdIndex = AttributesRE.GroupNumberFromName("attributeTD");
int nObjStartIndex = 0;
while( ObjectRE.IsMatch(itemstext, nObjStartIndex) )
{
Match m = ObjectRE.Match(itemstext, nObjStartIndex);
string innerText = m.Groups[innerTextIdx].Value;
TOCItem tocItem = new TOCItem();
tocItem.TocMode = DataMode.TextBased;
tocItem.AssociatedFile = chmFile;
tocItem.Parent = parent;
// read parameters
int nParamIndex = 0;
while( ParamRE.IsMatch(innerText, nParamIndex) )
{
Match mP = ParamRE.Match(innerText, nParamIndex);
string innerP = mP.Groups[innerPTextIdx].Value;
string paramName = "";
string paramValue = "";
int nAttrIdx = 0;
while( AttributesRE.IsMatch( innerP, nAttrIdx ) )
{
Match mA = AttributesRE.Match(innerP, nAttrIdx);
string attributeName = mA.Groups[nameIndex].Value;
string attributeValue = mA.Groups[valueIndex].Value;
string attributeTD = mA.Groups[tdIndex].Value;
if(attributeTD.Length > 0)
{
// delete the trailing textqualifier
if( attributeValue.Length > 0)
{
int ltqi = attributeValue.LastIndexOf( attributeTD );
if(ltqi >= 0)
{
attributeValue = attributeValue.Substring(0,ltqi);
}
}
}
if( attributeName.ToLower() == "name")
{
paramName = HttpUtility.HtmlDecode(attributeValue); // for unicode encoded values
}
if( attributeName.ToLower() == "value")
{
paramValue = HttpUtility.HtmlDecode(attributeValue); // for unicode encoded values
// delete trailing /
while((paramValue.Length>0)&&(paramValue[paramValue.Length-1] == '/'))
paramValue = paramValue.Substring(0,paramValue.Length-1);
}
nAttrIdx = mA.Index+mA.Length;
}
tocItem.Params[paramName] = paramValue;
switch(paramName.ToLower())
{
case "name":
{
tocItem.Name = paramValue;
};break;
case "local":
{
tocItem.Local = paramValue.Replace("../", "").Replace("./", "");
};break;
case "imagenumber":
{
tocItem.ImageIndex = Int32.Parse(paramValue);
tocItem.ImageIndex-=1;
int nFolderAdd = 0;
if((chmFile != null) && (chmFile.ImageTypeFolder))
{
// get the value which should be added, to display folders instead of books
if(HtmlHelpSystem.UseHH2TreePics)
nFolderAdd = 8;
else
nFolderAdd = 4;
}
if(tocItem.ImageIndex%2 != 0)
{
if(tocItem.ImageIndex==1)
tocItem.ImageIndex=0;
}
if(HtmlHelpSystem.UseHH2TreePics)
if( tocItem.ImageIndex == 0)
tocItem.ImageIndex = TOCItem.STD_FOLDER_HH2+nFolderAdd;
};break;
case "merge": // this item contains topics or a full TOC from a merged CHM
{
tocItem.MergeLink = paramValue;
// "register" this item as merge-link
if(_mergeItems==null)
_mergeItems=new ArrayList();
_mergeItems.Add(tocItem);
};break;
case "type": // information type assignment for item
{
tocItem.InfoTypeStrings.Add( paramValue );
};break;
}
nParamIndex = mP.Index+mP.Length;
}
tocItem.ChmFile = chmFile.ChmFilePath;
if(tocItem.MergeLink.Length > 0)
{
if(_lastTopicItem != null)
{
tocItem.Parent = _lastTopicItem;
_lastTopicItem.Children.Add(tocItem);
}
else
arrNodes.Add( tocItem );
}
else
{
_lastTopicItem = tocItem;
arrNodes.Add( tocItem );
}
nObjStartIndex = m.Index+m.Length;
}
}
/// <summary>
/// Parses the very first &lt;OBJECT&gt; tag in the sitemap file and extracts
/// information types and categories.
/// </summary>
/// <param name="sText">text of the object tag</param>
/// <param name="chmFile">CHMFile instance</param>
private static void ParseGlobalSettings(string sText, CHMFile chmFile)
{
int innerPTextIdx = ParamRE.GroupNumberFromName("innerText");
// get group-name indexes
int nameIndex = AttributesRE.GroupNumberFromName("attributeName");
int valueIndex = AttributesRE.GroupNumberFromName("attributeValue");
int tdIndex = AttributesRE.GroupNumberFromName("attributeTD");
// read parameters
int nParamIndex = 0;
// 0... unknown
// 1... inclusinve info type name
// 2... exclusive info type name
// 3... hidden info type name
// 4... category name
// 5... incl infotype name for category
// 6... excl infotype name for category
// 7... hidden infotype name for category
int prevItem = 0;
string sName = "";
string sDescription = "";
string curCategory = "";
while( ParamRE.IsMatch(sText, nParamIndex) )
{
Match mP = ParamRE.Match(sText, nParamIndex);
string innerP = mP.Groups[innerPTextIdx].Value;
string paramName = "";
string paramValue = "";
int nAttrIdx = 0;
while( AttributesRE.IsMatch( innerP, nAttrIdx ) )
{
Match mA = AttributesRE.Match(innerP, nAttrIdx);
string attributeName = mA.Groups[nameIndex].Value;
string attributeValue = mA.Groups[valueIndex].Value;
string attributeTD = mA.Groups[tdIndex].Value;
if(attributeTD.Length > 0)
{
// delete the trailing textqualifier
if( attributeValue.Length > 0)
{
int ltqi = attributeValue.LastIndexOf( attributeTD );
if(ltqi >= 0)
{
attributeValue = attributeValue.Substring(0,ltqi);
}
}
}
if( attributeName.ToLower() == "name")
{
paramName = HttpUtility.HtmlDecode(attributeValue); // for unicode encoded values
}
if( attributeName.ToLower() == "value")
{
paramValue = HttpUtility.HtmlDecode(attributeValue); // for unicode encoded values
// delete trailing /
while((paramValue.Length>0)&&(paramValue[paramValue.Length-1] == '/'))
paramValue = paramValue.Substring(0,paramValue.Length-1);
}
nAttrIdx = mA.Index+mA.Length;
}
switch(paramName.ToLower())
{
case "savetype": // inclusive information type name
{
prevItem = 1;
sName = paramValue;
};break;
case "savetypedesc": // description of information type
{
InformationTypeMode mode = InformationTypeMode.Inclusive;
sDescription = paramValue;
if( prevItem == 1)
mode = InformationTypeMode.Inclusive;
if( prevItem == 2)
mode = InformationTypeMode.Exclusive;
if( prevItem == 3)
mode = InformationTypeMode.Hidden;
if( chmFile.GetInformationType( sName ) == null)
{
// check if the HtmlHelpSystem already holds such an information type
if( chmFile.SystemInstance.GetInformationType( sName ) == null)
{
// info type not found yet
InformationType newType = new InformationType(sName, sDescription, mode);
chmFile.InformationTypes.Add(newType);
}
else
{
InformationType sysType = chmFile.SystemInstance.GetInformationType( sName );
chmFile.InformationTypes.Add( sysType );
}
}
prevItem = 0;
};break;
case "saveexclusive": // exclusive information type name
{
prevItem = 2;
sName = paramValue;
};break;
case "savehidden": // hidden information type name
{
prevItem = 3;
sName = paramValue;
};break;
case "category": // category name
{
prevItem = 4;
sName = paramValue;
curCategory = sName;
};break;
case "categorydesc": // category description
{
sDescription = paramValue;
if( chmFile.GetCategory( sName ) == null)
{
// check if the HtmlHelpSystem already holds such a category
if( chmFile.SystemInstance.GetCategory( sName ) == null)
{
// add category
Category newCat = new Category(sName, sDescription);
chmFile.Categories.Add(newCat);
}
else
{
Category sysCat = chmFile.SystemInstance.GetCategory( sName );
chmFile.Categories.Add( sysCat );
}
}
prevItem = 0;
};break;
case "type": // inclusive information type which is member of the previously read category
{
prevItem = 5;
sName = paramValue;
};break;
case "typedesc": // description of type for category
{
sDescription = paramValue;
Category cat = chmFile.GetCategory( curCategory );
if( cat != null)
{
// category found
InformationType infoType = chmFile.GetInformationType( sName );
if( infoType != null)
{
if( !cat.ContainsInformationType(infoType))
{
infoType.SetCategoryFlag(true);
cat.AddInformationType(infoType);
}
}
}
prevItem = 0;
};break;
case "typeexclusive": // exclusive information type which is member of the previously read category
{
prevItem = 6;
sName = paramValue;
};break;
case "typehidden": // hidden information type which is member of the previously read category
{
prevItem = 7;
sName = paramValue;
};break;
default:
{
prevItem = 0;
sName = "";
sDescription = "";
};break;
}
nParamIndex = mP.Index+mP.Length;
}
}
}
}

View File

@@ -1,220 +0,0 @@
using System;
using System.Collections;
using System.Text;
using System.Text.RegularExpressions;
namespace HtmlHelp.ChmDecoding
{
/// <summary>
/// The class <c>HHCParser</c> implements a parser for HHC contents files.
/// </summary>
// internal sealed class HHCParser : IHHCParser
public class HHCParser2
{
static private string m_text1="";
static private string m_text2="";
static private int m_CurrentPos=0;
/// <summary>
/// Parses a HHC file and returns an ArrayList with the table of contents (TOC) tree
/// </summary>
/// <param name="hhcFile">string content of the hhc file</param>
/// <param name="chmFile">CHMFile instance</param>
/// <returns>Returns an ArrayList with the table of contents (TOC) tree</returns>
public static ArrayList ParseHHC(string hhcFile, CHMFile chmFile)
{
DateTime StartTime=DateTime.Now;
ArrayList tocList = new ArrayList();
m_text2=hhcFile;
m_text1=hhcFile.ToLower();
int idx=m_text1.IndexOf("<ul>");
if (idx==-1)
return null;
m_CurrentPos=idx+4;
ParamRE = new Regex(RE_ParamBoundaries, RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
AttributesRE = new Regex(RE_QuoteAttributes, RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
ParseTree(tocList,chmFile);
DateTime EndTime=DateTime.Now;
TimeSpan Diff=EndTime-StartTime;
string x=Diff.ToString();
return tocList;
}
/// <summary>
/// Recursively parses a sitemap tree
/// </summary>
/// <param name="text">content text</param>
/// <param name="arrNodes">arraylist which receives the extracted nodes</param>
/// <param name="chmFile">CHMFile instance</param>
static private void ParseTree( ArrayList arrNodes, CHMFile chmFile )
{
bool bProcessing=true;
do
{
bProcessing=false;
// Indent
int idxa=m_text1.IndexOf("<ul>",m_CurrentPos);
int idxb=m_text1.IndexOf("<li>",m_CurrentPos);
int idxc=m_text1.IndexOf("</ul>",m_CurrentPos);
if ((idxa<idxb) && (idxa<idxc) && (idxa>-1))
{
bProcessing=true;
m_CurrentPos=idxa+4;
if (arrNodes.Count<1)
{
ParseTree(arrNodes,chmFile);
}
else
{
ParseTree(((TOCItem)(arrNodes[arrNodes.Count-1])).Children,chmFile);
}
continue;
}
// new item
if ((idxb<idxa) && (idxb<idxc) && (idxb>-1))
{
bProcessing=true;
m_CurrentPos=idxb+4;
int idx2=m_text1.IndexOf("<object",m_CurrentPos);
if (idx2!=-1)
{
int idx3=m_text1.IndexOf("</object>",idx2+7);
if (idx3!=-1)
{
string text=m_text2.Substring(idx2,idx3-idx2);
m_CurrentPos=idx3+9;
// Parse items in text.
TOCItem tocItem=ParseItems(text, chmFile);
if (tocItem!=null)
{
arrNodes.Add(tocItem);
}
}
}
}
// Undent
if ((idxc<idxa) && (idxc<idxb) && (idxc>-1))
{
m_CurrentPos=idxc+5;
bProcessing=true;
return;
}
}
while (bProcessing);
}
private static string RE_ParamBoundaries = @"\<param(?<innerText>.*?)\>";
private const string RE_QuoteAttributes = @"( |\t)*(?<attributeName>[\-a-zA-Z0-9]*)( |\t)*=( |\t)*(?<attributeTD>[\""\'])?(?<attributeValue>.*?(?(attributeTD)\k<attributeTD>|([\s>]|.$)))";
private static Regex ParamRE;
private static Regex AttributesRE;
/// <summary>
/// Parses tree nodes from the text
/// </summary>
/// <param name="itemstext">text containing the items</param>
/// <param name="arrNodes">arraylist where the nodes should be added</param>
/// <param name="chmFile">CHMFile instance</param>
private static TOCItem ParseItems( string itemstext, CHMFile chmFile)
{
int innerPTextIdx = ParamRE.GroupNumberFromName("innerText");
// get group-name indexes
int nameIndex = AttributesRE.GroupNumberFromName("attributeName");
int valueIndex = AttributesRE.GroupNumberFromName("attributeValue");
int tdIndex = AttributesRE.GroupNumberFromName("attributeTD");
TOCItem tocItem = new TOCItem();
// read parameters
int nParamIndex = 0;
while( ParamRE.IsMatch(itemstext, nParamIndex) )
{
Match mP = ParamRE.Match(itemstext, nParamIndex);
string innerP = mP.Groups[innerPTextIdx].Value;
string paramName = "";
string paramValue = "";
int nAttrIdx = 0;
while( AttributesRE.IsMatch( innerP, nAttrIdx ) )
{
Match mA = AttributesRE.Match(innerP, nAttrIdx);
string attributeName = mA.Groups[nameIndex].Value;
string attributeValue = mA.Groups[valueIndex].Value;
string attributeTD = mA.Groups[tdIndex].Value;
if(attributeTD.Length > 0)
{
// delete the trailing textqualifier
if( attributeValue.Length > 0)
{
int ltqi = attributeValue.LastIndexOf( attributeTD );
if(ltqi >= 0)
{
attributeValue = attributeValue.Substring(0,ltqi);
}
}
}
if( attributeName.ToLower() == "name")
{
paramName = attributeValue;
}
if( attributeName.ToLower() == "value")
{
paramValue = attributeValue;
}
nAttrIdx = mA.Index+mA.Length;
}
tocItem.Params[paramName] = paramValue;
switch(paramName.ToLower())
{
case "name":
{
tocItem.Name = paramValue;
};break;
case "local":
{
tocItem.Local = paramValue;
};break;
case "imagenumber":
{
tocItem.ImageIndex = Int32.Parse(paramValue);
if( tocItem.ImageIndex == 2)
tocItem.ImageIndex = TOCItem.STD_FOLDER_HH1;
};break;
}
nParamIndex = mP.Index+mP.Length;
}
tocItem.ChmFile = chmFile.ChmFilePath;
return tocItem;
}
}
}

View File

@@ -1,550 +0,0 @@
using System;
using System.IO;
using System.Collections;
using System.Text;
using System.Text.RegularExpressions;
namespace HtmlHelp.ChmDecoding
{
/// <summary>
/// The class <c>HHKParser</c> implements a parser for HHK contents files.
/// </summary>
internal sealed class HHKParser
{
/// <summary>
/// regular expressions for replacing the sitemap boundary tags
/// </summary>
private static string RE_ULOpening = @"\<ul\>"; // will be replaced by a '(' for nested parsing
private static string RE_ULClosing = @"\</ul\>"; // will be replaced by a ')' for nested parsing
/// <summary>
/// Matching ul-tags
/// </summary>
private static string RE_ULBoundaries = @"\<ul\>(?<innerText>.*)\</ul\>";
/// <summary>
/// Matching the nested tree structure.
/// </summary>
private static string RE_NestedBoundaries = @"\( (?> [^()]+ | \( (?<DEPTH>) | \) (?<-DEPTH>) )* (?(DEPTH)(?!)) \)";
/// <summary>
/// Matching object-tags
/// </summary>
private static string RE_ObjectBoundaries = @"\<object(?<innerText>.*?)\</object\>";
/// <summary>
/// Matching param tags
/// </summary>
private static string RE_ParamBoundaries = @"\<param(?<innerText>.*?)\>";
/// <summary>
/// Extracting tag attributes
/// </summary>
private const string RE_QuoteAttributes = @"( |\t)*(?<attributeName>[\-a-zA-Z0-9]*)( |\t)*=( |\t)*(?<attributeTD>[\""\'])?(?<attributeValue>.*?(?(attributeTD)\k<attributeTD>|([\s>]|.$)))";
/// <summary>
/// private regular expressionobjects
/// </summary>
private static Regex ulRE;
private static Regex NestedRE;
private static Regex ObjectRE;
private static Regex ParamRE;
private static Regex AttributesRE;
/// <summary>
/// Parses a HHK file and returns an ArrayList with the index tree
/// </summary>
/// <param name="hhkFile">string content of the hhk file</param>
/// <param name="chmFile">CHMFile instance</param>
/// <returns>Returns an ArrayList with the index tree</returns>
public static ArrayList ParseHHK(string hhkFile, CHMFile chmFile)
{
ArrayList indexList = new ArrayList();
ulRE = new Regex(RE_ULBoundaries, RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
NestedRE = new Regex(RE_NestedBoundaries, RegexOptions.IgnorePatternWhitespace | RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
ObjectRE = new Regex(RE_ObjectBoundaries, RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
ParamRE = new Regex(RE_ParamBoundaries, RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
AttributesRE = new Regex(RE_QuoteAttributes, RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
int innerTextIdx = ulRE.GroupNumberFromName("innerText");
if( ulRE.IsMatch(hhkFile, 0) )
{
Match m = ulRE.Match(hhkFile, 0);
if( ObjectRE.IsMatch(hhkFile, 0) ) // first object block contains information types and categories
{
Match mO = ObjectRE.Match(hhkFile, 0);
int iOTxt = ObjectRE.GroupNumberFromName("innerText");
string globalText = mO.Groups[iOTxt].Value;
ParseGlobalSettings( globalText, chmFile );
}
string innerText = m.Groups["innerText"].Value;
innerText = innerText.Replace("(", "&#040;");
innerText = innerText.Replace(")", "&#041;");
innerText = Regex.Replace(innerText, RE_ULOpening, "(", RegexOptions.IgnoreCase);
innerText = Regex.Replace(innerText, RE_ULClosing, ")", RegexOptions.IgnoreCase);
ParseTree( innerText, null, indexList, chmFile );
}
return indexList;
}
/// <summary>
/// Recursively parses a sitemap tree
/// </summary>
/// <param name="text">content text</param>
/// <param name="parent">Parent for all read items</param>
/// <param name="arrNodes">arraylist which receives the extracted nodes</param>
/// <param name="chmFile">CHMFile instance</param>
private static void ParseTree( string text, IndexItem parent, ArrayList arrNodes, CHMFile chmFile )
{
string strPreItems="", strPostItems="";
string innerText = "";
int nIndex = 0;
while( NestedRE.IsMatch(text, nIndex) )
{
Match m = NestedRE.Match(text, nIndex);
innerText = m.Value.Substring( 1, m.Length-2);
strPreItems = text.Substring(nIndex,m.Index-nIndex);
ParseItems(strPreItems, parent, arrNodes, chmFile);
if((arrNodes.Count>0) && (innerText.Length > 0) )
{
IndexItem p = ((IndexItem)(arrNodes[arrNodes.Count-1]));
ParseTree( innerText, p, arrNodes, chmFile );
}
nIndex = m.Index+m.Length;
}
if( nIndex == 0)
{
strPostItems = text.Substring(nIndex, text.Length-nIndex);
ParseItems(strPostItems, parent, arrNodes, chmFile);
}
else if( nIndex < text.Length-1)
{
strPostItems = text.Substring(nIndex, text.Length-nIndex);
ParseTree(strPostItems, parent, arrNodes, chmFile);
}
}
/// <summary>
/// Parses nodes from the text
/// </summary>
/// <param name="itemstext">text containing the items</param>
/// <param name="parentItem">parent index item</param>
/// <param name="arrNodes">arraylist where the nodes should be added</param>
/// <param name="chmFile">CHMFile instance</param>
private static void ParseItems( string itemstext, IndexItem parentItem, ArrayList arrNodes, CHMFile chmFile)
{
int innerTextIdx = ObjectRE.GroupNumberFromName("innerText");
int innerPTextIdx = ParamRE.GroupNumberFromName("innerText");
// get group-name indexes
int nameIndex = AttributesRE.GroupNumberFromName("attributeName");
int valueIndex = AttributesRE.GroupNumberFromName("attributeValue");
int tdIndex = AttributesRE.GroupNumberFromName("attributeTD");
int nObjStartIndex = 0;
int nLastObjStartIndex = 0;
string sKeyword = "";
while( ObjectRE.IsMatch(itemstext, nObjStartIndex) )
{
Match m = ObjectRE.Match(itemstext, nObjStartIndex);
string innerText = m.Groups[innerTextIdx].Value;
IndexItem idxItem = new IndexItem();
// read parameters
int nParamIndex = 0;
int nNameCnt = 0;
string paramTitle = "";
string paramLocal = "";
bool bAdded = false;
while( ParamRE.IsMatch(innerText, nParamIndex) )
{
Match mP = ParamRE.Match(innerText, nParamIndex);
string innerP = mP.Groups[innerPTextIdx].Value;
string paramName = "";
string paramValue = "";
int nAttrIdx = 0;
//sKeyword = "";
while( AttributesRE.IsMatch( innerP, nAttrIdx ) )
{
Match mA = AttributesRE.Match(innerP, nAttrIdx);
string attributeName = mA.Groups[nameIndex].Value;
string attributeValue = mA.Groups[valueIndex].Value;
string attributeTD = mA.Groups[tdIndex].Value;
if(attributeTD.Length > 0)
{
// delete the trailing textqualifier
if( attributeValue.Length > 0)
{
int ltqi = attributeValue.LastIndexOf( attributeTD );
if(ltqi >= 0)
{
attributeValue = attributeValue.Substring(0,ltqi);
}
}
}
if( attributeName.ToLower() == "name")
{
paramName = HttpUtility.HtmlDecode(attributeValue); // for unicode encoded values
nNameCnt++;
}
if( attributeName.ToLower() == "value")
{
paramValue = HttpUtility.HtmlDecode(attributeValue); // for unicode encoded values
// delete trailing /
while((paramValue.Length>0)&&(paramValue[paramValue.Length-1] == '/'))
paramValue = paramValue.Substring(0,paramValue.Length-1);
}
nAttrIdx = mA.Index+mA.Length;
}
if( nNameCnt == 1) // first "Name" param = keyword
{
sKeyword = "";
if(parentItem != null)
sKeyword = parentItem.KeyWordPath + ",";
string sOldKW = sKeyword;
sKeyword += paramValue;
IndexItem idxFind = FindByKeyword(arrNodes, sKeyword);
if(idxFind != null)
{
idxItem = idxFind;
}
else
{
if( sKeyword.Split(new char[] {','}).Length > 1 )
{
idxItem.CharIndex = sKeyword.Length - paramValue.Length;
}
else
{
sKeyword = paramValue;
sOldKW = sKeyword;
idxItem.CharIndex = 0;
}
idxItem.KeyWordPath = sKeyword;
idxItem.Indent = sKeyword.Split(new char[] {','}).Length - 1;
idxItem.IsSeeAlso = false;
sKeyword = sOldKW;
}
}
else
{
if( (nNameCnt > 2) && (paramName.ToLower()=="name") )
{
bAdded = true;
IndexTopic idxTopic = new IndexTopic(paramTitle, paramLocal, chmFile.CompileFile, chmFile.ChmFilePath);
idxItem.Topics.Add( idxTopic );
paramTitle = "";
paramLocal = "";
}
switch(paramName.ToLower())
{
case "name":
//case "keyword":
{
paramTitle = paramValue;
};break;
case "local":
{
paramLocal = paramValue.Replace("../", "").Replace("./", "");
};break;
case "type": // information type assignment for item
{
idxItem.InfoTypeStrings.Add( paramValue );
};break;
case "see also":
{
idxItem.AddSeeAlso(paramValue);
idxItem.IsSeeAlso = true;
bAdded = true;
};break;
}
}
nParamIndex = mP.Index+mP.Length;
}
if(!bAdded)
{
bAdded=false;
IndexTopic idxTopic = new IndexTopic(paramTitle, paramLocal, chmFile.CompileFile, chmFile.ChmFilePath);
idxItem.Topics.Add( idxTopic );
paramTitle = "";
paramLocal = "";
}
idxItem.ChmFile = chmFile;
arrNodes.Add( idxItem );
nLastObjStartIndex = nObjStartIndex;
nObjStartIndex = m.Index+m.Length;
}
}
/// <summary>
/// Searches an index-keyword in the index list
/// </summary>
/// <param name="indexList">index list to search</param>
/// <param name="Keyword">keyword to find</param>
/// <returns>Returns an <see cref="IndexItem">IndexItem</see> instance if found, otherwise null.</returns>
private static IndexItem FindByKeyword(ArrayList indexList, string Keyword)
{
foreach(IndexItem curItem in indexList)
{
if( curItem.KeyWordPath == Keyword)
return curItem;
}
return null;
}
/// <summary>
/// Parses the very first &lt;OBJECT&gt; tag in the sitemap file and extracts
/// information types and categories.
/// </summary>
/// <param name="sText">text of the object tag</param>
/// <param name="chmFile">CHMFile instance</param>
private static void ParseGlobalSettings(string sText, CHMFile chmFile)
{
int innerPTextIdx = ParamRE.GroupNumberFromName("innerText");
// get group-name indexes
int nameIndex = AttributesRE.GroupNumberFromName("attributeName");
int valueIndex = AttributesRE.GroupNumberFromName("attributeValue");
int tdIndex = AttributesRE.GroupNumberFromName("attributeTD");
// read parameters
int nParamIndex = 0;
// 0... unknown
// 1... inclusinve info type name
// 2... exclusive info type name
// 3... hidden info type name
// 4... category name
// 5... incl infotype name for category
// 6... excl infotype name for category
// 7... hidden infotype name for category
int prevItem = 0;
string sName = "";
string sDescription = "";
string curCategory = "";
while( ParamRE.IsMatch(sText, nParamIndex) )
{
Match mP = ParamRE.Match(sText, nParamIndex);
string innerP = mP.Groups[innerPTextIdx].Value;
string paramName = "";
string paramValue = "";
int nAttrIdx = 0;
while( AttributesRE.IsMatch( innerP, nAttrIdx ) )
{
Match mA = AttributesRE.Match(innerP, nAttrIdx);
string attributeName = mA.Groups[nameIndex].Value;
string attributeValue = mA.Groups[valueIndex].Value;
string attributeTD = mA.Groups[tdIndex].Value;
if(attributeTD.Length > 0)
{
// delete the trailing textqualifier
if( attributeValue.Length > 0)
{
int ltqi = attributeValue.LastIndexOf( attributeTD );
if(ltqi >= 0)
{
attributeValue = attributeValue.Substring(0,ltqi);
}
}
}
if( attributeName.ToLower() == "name")
{
paramName = HttpUtility.HtmlDecode(attributeValue); // for unicode encoded values
}
if( attributeName.ToLower() == "value")
{
paramValue = HttpUtility.HtmlDecode(attributeValue); // for unicode encoded values
// delete trailing /
while((paramValue.Length>0)&&(paramValue[paramValue.Length-1] == '/'))
paramValue = paramValue.Substring(0,paramValue.Length-1);
}
nAttrIdx = mA.Index+mA.Length;
}
switch(paramName.ToLower())
{
case "savetype": // inclusive information type name
{
prevItem = 1;
sName = paramValue;
};break;
case "savetypedesc": // description of information type
{
InformationTypeMode mode = InformationTypeMode.Inclusive;
sDescription = paramValue;
if( prevItem == 1)
mode = InformationTypeMode.Inclusive;
if( prevItem == 2)
mode = InformationTypeMode.Exclusive;
if( prevItem == 3)
mode = InformationTypeMode.Hidden;
if( chmFile.GetInformationType( sName ) == null)
{
// check if the HtmlHelpSystem already holds such an information type
if( chmFile.SystemInstance.GetInformationType( sName ) == null)
{
// info type not found yet
InformationType newType = new InformationType(sName, sDescription, mode);
chmFile.InformationTypes.Add(newType);
}
else
{
InformationType sysType = chmFile.SystemInstance.GetInformationType( sName );
chmFile.InformationTypes.Add( sysType );
}
}
prevItem = 0;
};break;
case "saveexclusive": // exclusive information type name
{
prevItem = 2;
sName = paramValue;
};break;
case "savehidden": // hidden information type name
{
prevItem = 3;
sName = paramValue;
};break;
case "category": // category name
{
prevItem = 4;
sName = paramValue;
curCategory = sName;
};break;
case "categorydesc": // category description
{
sDescription = paramValue;
if( chmFile.GetCategory( sName ) == null)
{
// check if the HtmlHelpSystem already holds such a category
if( chmFile.SystemInstance.GetCategory( sName ) == null)
{
// add category
Category newCat = new Category(sName, sDescription);
chmFile.Categories.Add(newCat);
}
else
{
Category sysCat = chmFile.SystemInstance.GetCategory( sName );
chmFile.Categories.Add( sysCat );
}
}
prevItem = 0;
};break;
case "type": // inclusive information type which is member of the previously read category
{
prevItem = 5;
sName = paramValue;
};break;
case "typedesc": // description of type for category
{
sDescription = paramValue;
Category cat = chmFile.GetCategory( curCategory );
if( cat != null)
{
// category found
InformationType infoType = chmFile.GetInformationType( sName );
if( infoType != null)
{
if( !cat.ContainsInformationType(infoType))
{
infoType.SetCategoryFlag(true);
cat.AddInformationType(infoType);
}
}
}
prevItem = 0;
};break;
case "typeexclusive": // exclusive information type which is member of the previously read category
{
prevItem = 6;
sName = paramValue;
};break;
case "typehidden": // hidden information type which is member of the previously read category
{
prevItem = 7;
sName = paramValue;
};break;
default:
{
prevItem = 0;
sName = "";
sDescription = "";
};break;
}
nParamIndex = mP.Index+mP.Length;
}
}
}
}

View File

@@ -1,245 +0,0 @@
using System;
using System.IO;
namespace HtmlHelp.ChmDecoding
{
/// <summary>
/// The class <c>TopicEntry</c> stores the data for one topic entry
/// </summary>
internal sealed class TopicEntry
{
/// <summary>
/// Internal member storing the offset of this topic entry
/// </summary>
private int _entryOffset = 0;
/// <summary>
/// Internal member storing the index of the binary toc
/// </summary>
private int _tocidxOffset = 0;
/// <summary>
/// Internal member storing the string offset of the title
/// </summary>
private int _titleOffset = 0;
/// <summary>
/// Internal member storuing the urltable offset
/// </summary>
private int _urltableOffset = 0;
/// <summary>
/// Internal member storing the visibility mode
/// </summary>
private int _visibilityMode = 0;
/// <summary>
/// Internal member storing an unknown mode
/// </summary>
private int _unknownMode = 0;
/// <summary>
/// Internal member storing the associated chmfile object
/// </summary>
private CHMFile _associatedFile = null;
/// <summary>
/// Constructor of the class
/// </summary>
/// <param name="entryOffset">offset of this entry</param>
/// <param name="tocidxOffset">offset in the binary toc index</param>
/// <param name="titleOffset">offset of the title (in the #STRINGS file)</param>
/// <param name="urltableOffset">offset in the urltable containing the urlstr offset for the url</param>
/// <param name="visibilityMode">visibility mode 2 indicates not in contents, 6 indicates that it is in the contents, 0/4 something else (unknown)</param>
/// <param name="unknownMode">0, 2, 4, 8, 10, 12, 16, 32 (unknown)</param>
public TopicEntry(int entryOffset, int tocidxOffset, int titleOffset, int urltableOffset, int visibilityMode, int unknownMode) :this(entryOffset, tocidxOffset, titleOffset, urltableOffset, visibilityMode, unknownMode, null)
{
}
/// <summary>
/// Constructor of the class
/// </summary>
/// <param name="entryOffset">offset of this entry</param>
/// <param name="tocidxOffset">offset in the binary toc index</param>
/// <param name="titleOffset">offset of the title (in the #STRINGS file)</param>
/// <param name="urltableOffset">offset in the urltable containing the urlstr offset for the url</param>
/// <param name="visibilityMode">visibility mode 2 indicates not in contents, 6 indicates that it is in the contents, 0/4 something else (unknown)</param>
/// <param name="unknownMode">0, 2, 4, 8, 10, 12, 16, 32 (unknown)</param>
/// <param name="associatedFile">associated chmfile object</param>
internal TopicEntry(int entryOffset, int tocidxOffset, int titleOffset, int urltableOffset, int visibilityMode, int unknownMode, CHMFile associatedFile)
{
_entryOffset = entryOffset;
_tocidxOffset = tocidxOffset;
_titleOffset = titleOffset;
_urltableOffset = urltableOffset;
_visibilityMode = visibilityMode;
_unknownMode = unknownMode;
_associatedFile = associatedFile;
}
/// <summary>
/// Standard constructor
/// </summary>
internal TopicEntry()
{
}
#region Data dumping
/// <summary>
/// Dump the class data to a binary writer
/// </summary>
/// <param name="writer">writer to write the data</param>
internal void Dump(ref BinaryWriter writer)
{
writer.Write( _entryOffset );
writer.Write( _tocidxOffset );
writer.Write( _titleOffset );
writer.Write( _urltableOffset );
writer.Write( _visibilityMode );
writer.Write( _unknownMode );
}
/// <summary>
/// Reads the object data from a dump store
/// </summary>
/// <param name="reader">reader to read the data</param>
internal void ReadDump(ref BinaryReader reader)
{
_entryOffset = reader.ReadInt32();
_tocidxOffset = reader.ReadInt32();
_titleOffset = reader.ReadInt32();
_urltableOffset = reader.ReadInt32();
_visibilityMode = reader.ReadInt32();
_unknownMode = reader.ReadInt32();
}
/// <summary>
/// Sets the associated CHMFile instance
/// </summary>
/// <param name="associatedFile">instance to set</param>
internal void SetCHMFile(CHMFile associatedFile)
{
_associatedFile = associatedFile;
}
#endregion
/// <summary>
/// Gets the associated chm file
/// </summary>
internal CHMFile ChmFile
{
get { return _associatedFile; }
}
/// <summary>
/// Gets the offset of this entry
/// </summary>
internal int EntryOffset
{
get { return _entryOffset; }
}
/// <summary>
/// Gets the tocidx offset
/// </summary>
internal int TOCIdxOffset
{
get { return _tocidxOffset; }
}
/// <summary>
/// Gets the title offset of the #STRINGS file
/// </summary>
internal int TitleOffset
{
get { return _titleOffset; }
}
/// <summary>
/// Gets the urltable offset
/// </summary>
internal int UrlTableOffset
{
get { return _urltableOffset; }
}
/// <summary>
/// Gets the title of the topic entry
/// </summary>
public string Title
{
get
{
if( _associatedFile == null)
return String.Empty;
if( _associatedFile.StringsFile == null)
return String.Empty;
string sTemp = (string)_associatedFile.StringsFile[ _titleOffset ];
if(sTemp == null)
return String.Empty;
return sTemp;
}
}
/// <summary>
/// Gets the url of the topic
/// </summary>
public string Locale
{
get
{
if( _associatedFile == null)
return String.Empty;
if( _associatedFile.UrltblFile == null)
return String.Empty;
UrlTableEntry utEntry = (UrlTableEntry)_associatedFile.UrltblFile[ _urltableOffset ];
if(utEntry == null)
return String.Empty;
if(utEntry.URL == "")
return String.Empty;
return utEntry.URL;
}
}
/// <summary>
/// Gets the URL of this topic
/// </summary>
public string URL
{
get
{
if(Locale.Length <= 0)
return "about:blank";
if( (Locale.ToLower().IndexOf("http://") >= 0) ||
(Locale.ToLower().IndexOf("https://") >= 0) ||
(Locale.ToLower().IndexOf("mailto:") >= 0) ||
(Locale.ToLower().IndexOf("ftp://") >= 0) ||
(Locale.ToLower().IndexOf("ms-its:") >= 0))
return Locale;
return HtmlHelpSystem.UrlPrefix + _associatedFile.ChmFilePath + "::/" + Locale;
}
}
/// <summary>
/// Gets the visibility mode
/// </summary>
public int VisibilityMode
{
get { return _visibilityMode; }
}
/// <summary>
/// Gets the unknown mode
/// </summary>
public int UknownMode
{
get { return _unknownMode; }
}
}
}

View File

@@ -1,175 +0,0 @@
using System;
using System.IO;
namespace HtmlHelp.ChmDecoding
{
/// <summary>
/// The class <c>UrlTableEntry</c> stores data for an URL-Table entry
/// </summary>
internal sealed class UrlTableEntry
{
/// <summary>
/// Internal member storing the offset of this entry
/// </summary>
private int _entryOffset = 0;
/// <summary>
/// Internal member storing a unique id
/// </summary>
private uint _uniqueID = 0;
/// <summary>
/// Internal member storing the topics index
/// </summary>
private int _topicsIndex = 0;
/// <summary>
/// Internal member storing the offset in the urlstr table
/// </summary>
private int _urlStrOffset = 0;
/// <summary>
/// Internal member storing the associated chmfile object
/// </summary>
private CHMFile _associatedFile = null;
/// <summary>
/// Constructor of the class
/// </summary>
/// <param name="uniqueID">unique id</param>
/// <param name="entryOffset">offset of the entry</param>
/// <param name="topicIndex">topic index</param>
/// <param name="urlstrOffset">urlstr offset for filename</param>
public UrlTableEntry(uint uniqueID, int entryOffset, int topicIndex, int urlstrOffset) : this(uniqueID, entryOffset, topicIndex, urlstrOffset, null)
{
}
/// <summary>
/// Constructor of the class
/// </summary>
/// <param name="uniqueID">unique id</param>
/// <param name="entryOffset">offset of the entry</param>
/// <param name="topicIndex">topic index</param>
/// <param name="urlstrOffset">urlstr offset for filename</param>
/// <param name="associatedFile">associated chm file</param>
internal UrlTableEntry(uint uniqueID, int entryOffset, int topicIndex, int urlstrOffset, CHMFile associatedFile)
{
_uniqueID = uniqueID;
_entryOffset = entryOffset;
_topicsIndex = topicIndex;
_urlStrOffset = urlstrOffset;
_associatedFile = associatedFile;
}
/// <summary>
/// Standard constructor
/// </summary>
internal UrlTableEntry()
{
}
#region Data dumping
/// <summary>
/// Dump the class data to a binary writer
/// </summary>
/// <param name="writer">writer to write the data</param>
internal void Dump(ref BinaryWriter writer)
{
writer.Write( _urlStrOffset );
writer.Write( _entryOffset );
writer.Write( _topicsIndex );
writer.Write( _urlStrOffset );
}
/// <summary>
/// Reads the object data from a dump store
/// </summary>
/// <param name="reader">reader to read the data</param>
internal void ReadDump(ref BinaryReader reader)
{
_urlStrOffset = reader.ReadInt32();
_entryOffset = reader.ReadInt32();
_topicsIndex = reader.ReadInt32();
_urlStrOffset = reader.ReadInt32();
}
/// <summary>
/// Sets the associated CHMFile instance
/// </summary>
/// <param name="associatedFile">instance to set</param>
internal void SetCHMFile(CHMFile associatedFile)
{
_associatedFile = associatedFile;
}
#endregion
/// <summary>
/// Gets the unique id of the entry
/// </summary>
internal uint UniqueID
{
get {return _uniqueID; }
}
/// <summary>
/// Gets the offset of the entry
/// </summary>
internal int EntryOffset
{
get {return _entryOffset; }
}
/// <summary>
/// Gets the topics index
/// </summary>
internal int TopicIndex
{
get {return _topicsIndex; }
}
/// <summary>
/// Gets the urlstr offset
/// </summary>
internal int UrlstrOffset
{
get { return _urlStrOffset; }
}
/// <summary>
/// Gets the url of the entry
/// </summary>
public string URL
{
get
{
if(_associatedFile == null)
return String.Empty;
if(_associatedFile.UrlstrFile == null)
return String.Empty;
string sTemp = (string)_associatedFile.UrlstrFile.GetURLatOffset( _urlStrOffset );
if( sTemp == null)
return String.Empty;
return sTemp;
}
}
/// <summary>
/// Gets the associated topic for this url entry
/// </summary>
internal TopicEntry Topic
{
get
{
if(_associatedFile == null)
return null;
if(_associatedFile.TopicsFile == null)
return null;
TopicEntry tentry = _associatedFile.TopicsFile[ _topicsIndex*16 ];
return tentry;
}
}
}
}

View File

@@ -1,19 +0,0 @@
using System;
namespace HtmlHelp.ChmDecoding
{
/// <summary>
/// Enumeration for specifying the extraction mode of an toc or index item.
/// </summary>
public enum DataMode
{
/// <summary>
/// TextBased - this item comes from a text-based sitemap file
/// </summary>
TextBased = 0,
/// <summary>
/// Binary - this item was extracted out of a binary stream
/// </summary>
Binary = 1
}
}

View File

@@ -1,16 +0,0 @@
<Combine fileversion="1.0" name="CHMLibrary" description="">
<StartMode startupentry="CHMLibrary" single="True">
<Execute entry="CHMLibrary" type="None" />
</StartMode>
<Entries>
<Entry filename=".\.\CHMLibrary.prjx" />
</Entries>
<Configurations active="Debug">
<Configuration name="Release">
<Entry name="CHMLibrary" configurationname="Debug" build="False" />
</Configuration>
<Configuration name="Debug">
<Entry name="CHMLibrary" configurationname="Debug" build="False" />
</Configuration>
</Configurations>
</Combine>

View File

@@ -1,85 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{72E5CCA1-6318-4D62-964D-CB23A5C743B5}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CHMLibrary</RootNamespace>
<AssemblyName>CHMLibrary</AssemblyName>
<StartupObject>
</StartupObject>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="Category.cs" />
<Compile Include="CHMDecoding\BinaryReaderHelp.cs" />
<Compile Include="CHMDecoding\CHMBtree.cs" />
<Compile Include="CHMDecoding\CHMFile.cs" />
<Compile Include="CHMDecoding\CHMIdxhdr.cs" />
<Compile Include="CHMDecoding\CHMStrings.cs" />
<Compile Include="CHMDecoding\CHMSystem.cs" />
<Compile Include="CHMDecoding\CHMTocidx.cs" />
<Compile Include="CHMDecoding\CHMTopics.cs" />
<Compile Include="CHMDecoding\CHMUrlstr.cs" />
<Compile Include="CHMDecoding\CHMUrltable.cs" />
<Compile Include="CHMDecoding\DumpingInfo.cs" />
<Compile Include="CHMDecoding\enumerations.cs" />
<Compile Include="CHMDecoding\FullTextEngine.cs" />
<Compile Include="CHMDecoding\HHCParser.cs" />
<Compile Include="CHMDecoding\HHCParser2.cs" />
<Compile Include="CHMDecoding\HHKParser.cs" />
<Compile Include="CHMDecoding\TopicEntry.cs" />
<Compile Include="CHMDecoding\UrlTableEntry.cs" />
<Compile Include="ChmFileInfo.cs" />
<Compile Include="HtmlHelpSystem.cs" />
<Compile Include="HttpUtility.cs" />
<Compile Include="Index.cs" />
<Compile Include="IndexItem.cs" />
<Compile Include="IndexTopic.cs" />
<Compile Include="InformationType.cs" />
<Compile Include="Storage\CHMStream.cs" />
<Compile Include="TableOfContents.cs" />
<Compile Include="TOCItem.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.XML" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Compression\Compression.csproj">
<Project>{E32307F1-623A-4E62-826F-56CDD4B23A54}</Project>
<Name>Compression</Name>
</ProjectReference>
</ItemGroup>
</Project>

View File

@@ -1,58 +0,0 @@
<Project name="CHMLibrary" standardNamespace="CHMLibrary" description="" newfilesearch="None" enableviewstate="True" version="1.1" projecttype="C#">
<Contents>
<File name=".\AssemblyInfo.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\Category.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\ChmFileInfo.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\Default.build" subtype="Code" buildaction="Nothing" dependson="" data="" />
<File name=".\HtmlHelpSystem.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\HttpUtility.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\Index.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\IndexItem.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\IndexTopic.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\InformationType.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\TableOfContents.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\TOCItem.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\Storage" subtype="Directory" buildaction="Compile" dependson="" data="" />
<File name=".\Storage\CHMStream.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding" subtype="Directory" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\BinaryReaderHelp.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\CHMBtree.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\CHMFile.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\CHMIdxhdr.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\CHMStrings.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\CHMSystem.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\CHMTocidx.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\CHMTopics.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\CHMUrlstr.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\CHMUrltable.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\DumpingInfo.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\enumerations.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\FullTextEngine.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\HHCParser2.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\HHCParser.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\HHKParser.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\TopicEntry.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\CHMDecoding\UrlTableEntry.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
</Contents>
<References>
<Reference type="Project" refto="Compression" localcopy="True" />
</References>
<DeploymentInformation target="" script="" strategy="File" />
<Configuration runwithwarnings="True" name="Debug">
<CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="True" optimize="False" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="Library" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
<Execution commandlineparameters="" consolepause="False" />
<Output directory="..\bin\Debug" assembly="CHMLibrary" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
</Configuration>
<Configurations active="Debug">
<Configuration runwithwarnings="True" name="Debug">
<CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="True" optimize="False" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="Library" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
<Execution commandlineparameters="" consolepause="False" />
<Output directory="..\bin\Debug" assembly="CHMLibrary" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
</Configuration>
<Configuration runwithwarnings="True" name="Release">
<CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="False" optimize="True" unsafecodeallowed="False" generateoverflowchecks="False" mainclass="" target="Library" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
<Execution commandlineparameters="" consolepause="False" />
<Output directory="..\bin\Release" assembly="CHMLibrary" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
</Configuration>
</Configurations>
</Project>

View File

@@ -1,201 +0,0 @@
using System;
using System.Collections;
using System.IO;
using HtmlHelp.ChmDecoding;
namespace HtmlHelp
{
/// <summary>
/// The class <c>Category</c> implements methods/properties for handling an information category
/// </summary>
/// <remarks>Note: Information types and categories allow users to filter help contents.
/// They are only supported if using sitemap TOC and/or sitemap Index.</remarks>
public class Category
{
private string _name = "";
private string _description = "";
private ArrayList _infoTypes = null;
private int _referenceCount = 1;
/// <summary>
/// Standard constructor
/// </summary>
public Category() : this("","")
{
}
/// <summary>
/// Standard constructor
/// </summary>
/// <param name="name">name of the category</param>
/// <param name="description">description</param>
public Category(string name, string description) : this(name, description, new ArrayList())
{
}
/// <summary>
/// Standard constructor
/// </summary>
/// <param name="name">name of the category</param>
/// <param name="description">description</param>
/// <param name="linkedInformationTypes">Arraylist of InformationType instances which applies to this category</param>
public Category(string name, string description, ArrayList linkedInformationTypes)
{
_name = name;
_description = description;
_infoTypes = linkedInformationTypes;
}
#region Data dumping
/// <summary>
/// Dump the class data to a binary writer
/// </summary>
/// <param name="writer">writer to write the data</param>
internal void Dump(ref BinaryWriter writer)
{
writer.Write( _name );
writer.Write( _description );
writer.Write( _infoTypes.Count );
for(int i=0; i<_infoTypes.Count;i++)
{
InformationType curType = _infoTypes[i] as InformationType;
writer.Write( curType.Name );
}
}
/// <summary>
/// Reads the object data from a dump store
/// </summary>
/// <param name="reader">reader to read the data</param>
/// <param name="chmFile">current CHMFile instance which reads from dump</param>
internal void ReadDump(ref BinaryReader reader, CHMFile chmFile)
{
_name = reader.ReadString();
_description = reader.ReadString();
int nCnt = reader.ReadInt32();
for(int i=0; i<nCnt; i++)
{
string sITName = reader.ReadString();
InformationType linkedType = chmFile.GetInformationType( sITName );
if(linkedType != null)
{
linkedType.SetCategoryFlag(true);
_infoTypes.Add(linkedType);
}
}
}
#endregion
/// <summary>
/// Merges the lineked information types from cat into this instance
/// </summary>
/// <param name="cat">category instance</param>
internal void MergeInfoTypes(Category cat)
{
if(cat!=null)
{
if(cat.InformationTypes.Count > 0)
{
for(int i=0;i<cat.InformationTypes.Count;i++)
{
InformationType curType = cat.InformationTypes[i] as InformationType;
if(!ContainsInformationType(curType.Name))
{
curType.SetCategoryFlag(true);
_infoTypes.Add(curType);
}
}
}
}
}
/// <summary>
/// Gets/Sets the reference count of this information type instance
/// </summary>
internal int ReferenceCount
{
get { return _referenceCount; }
set { _referenceCount = value; }
}
/// <summary>
/// Gets/Sets the name of the information type
/// </summary>
public string Name
{
get { return _name; }
set { _name = value; }
}
/// <summary>
/// Gets/Sets the description of the information type
/// </summary>
public string Description
{
get { return _description; }
set { _name = value; }
}
/// <summary>
/// Gets an ArrayList with the linked Information types
/// </summary>
public ArrayList InformationTypes
{
get { return _infoTypes; }
}
/// <summary>
/// Adds a new information type to the category
/// </summary>
/// <param name="type"></param>
public void AddInformationType(InformationType type)
{
_infoTypes.Add(type);
}
/// <summary>
/// Removes an information type from the category
/// </summary>
/// <param name="type"></param>
public void RemoveInformationType(InformationType type)
{
_infoTypes.Remove(type);
}
/// <summary>
/// Checks if the category contains an information type
/// </summary>
/// <param name="type">information type instance to check</param>
/// <returns>Return true if the information type is part of this category</returns>
public bool ContainsInformationType(InformationType type)
{
return _infoTypes.Contains(type);
}
/// <summary>
/// Checks if the category contains an information type
/// </summary>
/// <param name="name">name of the information type</param>
/// <returns>Return true if the information type is part of this category</returns>
public bool ContainsInformationType(string name)
{
for(int i=0;i<_infoTypes.Count;i++)
{
InformationType curType = _infoTypes[i] as InformationType;
if(curType.Name == name)
return true;
}
return false;
}
}
}

View File

@@ -1,478 +0,0 @@
using System;
using System.Collections;
using System.Text;
using System.IO;
using System.Globalization;
using System.Diagnostics;
using System.ComponentModel;
using HtmlHelp.ChmDecoding;
// using HtmlHelp.Storage;
namespace HtmlHelp
{
/// <summary>
/// The class <c>ChmFileInfo</c> only extracts system information from a CHM file.
/// It doesn't build the index and table of contents.
/// </summary>
public class ChmFileInfo
{
/// <summary>
/// Internal member storing the full filename
/// </summary>
private string _chmFileName = "";
/// <summary>
/// Internal member storing the associated chmfile object
/// </summary>
private CHMFile _associatedFile = null;
/// <summary>
/// Constructor for extrating the file information of the provided file.
/// The constructor opens the chm-file and reads its system data.
/// </summary>
/// <param name="chmFile">full file name which information should be extracted</param>
public ChmFileInfo(string chmFile)
{
if(!File.Exists(chmFile))
throw new ArgumentException("Chm file must exist on disk !", "chmFileName");
if( ! chmFile.ToLower().EndsWith(".chm") )
throw new ArgumentException("HtmlHelp file must have the extension .chm !", "chmFile");
_chmFileName = chmFile;
_associatedFile = new CHMFile(null, chmFile, true); // only load system data of chm
}
/// <summary>
/// Internal constructor used in the class <see cref="HtmlHelp.ChmDecoding.CHMFile">CHMFile</see>.
/// </summary>
/// <param name="associatedFile">associated chm file</param>
internal ChmFileInfo(CHMFile associatedFile)
{
_associatedFile = associatedFile;
if( _associatedFile == null)
throw new ArgumentException("Associated CHMFile instance must not be null !", "associatedFile");
}
#region default info properties
/// <summary>
/// Gets the full filename of the chm file
/// </summary>
public string ChmFileName
{
get
{
return _associatedFile.ChmFilePath;
}
}
/// <summary>
/// Gets a <see cref="System.IO.FileInfo">FileInfo</see> instance for the chm file.
/// </summary>
public FileInfo FileInfo
{
get { return new FileInfo(_associatedFile.ChmFilePath); }
}
#endregion
#region #SYSTEM properties
/// <summary>
/// Gets the file version of the chm file.
/// 2 for Compatibility=1.0, 3 for Compatibility=1.1
/// </summary>
public int FileVersion
{
get
{
if(_associatedFile != null)
return _associatedFile.FileVersion;
return 0;
}
}
/// <summary>
/// Gets the contents file name
/// </summary>
public string ContentsFile
{
get
{
if(_associatedFile != null)
return _associatedFile.ContentsFile;
return "";
}
}
/// <summary>
/// Gets the index file name
/// </summary>
public string IndexFile
{
get
{
if(_associatedFile != null)
return _associatedFile.IndexFile;
return "";
}
}
/// <summary>
/// Gets the default help topic
/// </summary>
public string DefaultTopic
{
get
{
if(_associatedFile != null)
return _associatedFile.DefaultTopic;
return "";
}
}
/// <summary>
/// Gets the title of the help window
/// </summary>
public string HelpWindowTitle
{
get
{
if(_associatedFile != null)
return _associatedFile.HelpWindowTitle;
return "";
}
}
/// <summary>
/// Gets the flag if DBCS is in use
/// </summary>
public bool DBCS
{
get
{
if(_associatedFile != null)
return _associatedFile.DBCS;
return false;
}
}
/// <summary>
/// Gets the flag if full-text-search is available
/// </summary>
public bool FullTextSearch
{
get
{
if(_associatedFile != null)
return _associatedFile.FullTextSearch;
return false;
}
}
/// <summary>
/// Gets the flag if the file has ALinks
/// </summary>
public bool HasALinks
{
get
{
if(_associatedFile != null)
return _associatedFile.HasALinks;
return false;
}
}
/// <summary>
/// Gets the flag if the file has KLinks
/// </summary>
public bool HasKLinks
{
get
{
if(_associatedFile != null)
return _associatedFile.HasKLinks;
return false;
}
}
/// <summary>
/// Gets the default window name
/// </summary>
public string DefaultWindow
{
get
{
if(_associatedFile != null)
return _associatedFile.DefaultWindow;
return "";
}
}
/// <summary>
/// Gets the file name of the compile file
/// </summary>
public string CompileFile
{
get
{
if(_associatedFile != null)
return _associatedFile.CompileFile;
return "";
}
}
/// <summary>
/// Gets the flag if the chm has a binary index file
/// </summary>
public bool BinaryIndex
{
get
{
if(_associatedFile != null)
return _associatedFile.BinaryIndex;
return false;
}
}
/// <summary>
/// Gets the flag if the chm has a binary index file
/// </summary>
public string CompilerVersion
{
get
{
if(_associatedFile != null)
return _associatedFile.CompilerVersion;
return "";
}
}
/// <summary>
/// Gets the flag if the chm has a binary toc file
/// </summary>
public bool BinaryTOC
{
get
{
if(_associatedFile != null)
return _associatedFile.BinaryTOC;
return false;
}
}
/// <summary>
/// Gets the font face of the read font property.
/// Empty string for default font.
/// </summary>
public string FontFace
{
get
{
if(_associatedFile != null)
return _associatedFile.FontFace;
return "";
}
}
/// <summary>
/// Gets the font size of the read font property.
/// 0 for default font size
/// </summary>
public double FontSize
{
get
{
if(_associatedFile != null)
return _associatedFile.FontSize;
return 0.0;
}
}
/// <summary>
/// Gets the character set of the read font property
/// 1 for default
/// </summary>
public int CharacterSet
{
get
{
if(_associatedFile != null)
return _associatedFile.CharacterSet;
return 1;
}
}
/// <summary>
/// Gets the codepage depending on the read font property
/// </summary>
public int CodePage
{
get
{
if(_associatedFile != null)
return _associatedFile.CodePage;
return 0;
}
}
/// <summary>
/// Gets the assiciated culture info
/// </summary>
public CultureInfo Culture
{
get
{
if(_associatedFile != null)
return _associatedFile.Culture;
return CultureInfo.CurrentCulture;
}
}
#endregion
#region #IDXHDR properties
/// <summary>
/// Gets the number of topic nodes including the contents and index files
/// </summary>
public int NumberOfTopicNodes
{
get
{
if(_associatedFile != null)
return _associatedFile.NumberOfTopicNodes;
return 0;
}
}
/// <summary>
/// Gets the ImageList string specyfied in the #IDXHDR file.
/// </summary>
/// <remarks>This property uses the #STRINGS file to extract the string at a given offset.</remarks>
public string ImageList
{
get
{
if(_associatedFile != null)
return _associatedFile.ImageList;
return "";
}
}
/// <summary>
/// Gets the background setting
/// </summary>
public int Background
{
get
{
if(_associatedFile != null)
return _associatedFile.Background;
return 0;
}
}
/// <summary>
/// Gets the foreground setting
/// </summary>
public int Foreground
{
get
{
if(_associatedFile != null)
return _associatedFile.Foreground;
return 0;
}
}
/// <summary>
/// Gets the FrameName string specyfied in the #IDXHDR file.
/// </summary>
/// <remarks>This property uses the #STRINGS file to extract the string at a given offset.</remarks>
public string FrameName
{
get
{
if(_associatedFile != null)
return _associatedFile.FrameName;
return "";
}
}
/// <summary>
/// Gets the WindowName string specyfied in the #IDXHDR file.
/// </summary>
/// <remarks>This property uses the #STRINGS file to extract the string at a given offset.</remarks>
public string WindowName
{
get
{
if(_associatedFile != null)
return _associatedFile.WindowName;
return "";
}
}
/// <summary>
/// Gets a string array containing the merged file names
/// </summary>
public string[] MergedFiles
{
get
{
if(_associatedFile != null)
return _associatedFile.MergedFiles;
return new string[0];
}
}
#endregion
}
}

View File

@@ -1,23 +0,0 @@
<?xml version="1.0"?>
<project name="CHMLibrary" default="build">
<property name="output.dir" value="..\bin" />
<target name="build" description="Build component">
<mkdir dir="${output.dir}" />
<csc target="library"
output="${output.dir}\CHMLibrary.dll"
optimize="true"
debug="true"
doc="${output.dir}\CHMLibrary.xml"
warninglevel="0">
<sources>
<include name="**/*.cs" />
</sources>
<references>
<include name="${output.dir}\Compression.dll" />
</references>
</csc>
</target>
</project>

View File

@@ -1,894 +0,0 @@
using System;
using System.IO;
using System.Collections;
using System.Data;
using HtmlHelp.ChmDecoding;
namespace HtmlHelp
{
/// <summary>
/// The class <c>HtmlHelpSystem</c> implements the main object for reading chm files
/// </summary>
public sealed class HtmlHelpSystem
{
/// <summary>
/// Private shared instance of current HtmlHelpSystem class
/// </summary>
private static HtmlHelpSystem _current=null;
/// <summary>
/// Internal member storing the attached files
/// </summary>
private ArrayList _chmFiles = new ArrayList();
/// <summary>
/// Internal member storing a merged table of contents
/// </summary>
private TableOfContents _toc = new TableOfContents();
/// <summary>
/// Internal member storing a merged index
/// </summary>
private Index _index = new Index();
/// <summary>
/// URL prefix for specifying a chm destination
/// </summary>
private static string _urlPrefix = "ms-its:";
/// <summary>
/// Internal flag specifying if the system should use the tree-images list
/// from HtmlHelp2. If false the standard CHM-Viewer pics will be used.
/// </summary>
private static bool _useHH2TreePics = false;
/// <summary>
/// Internal member storing the read information types
/// </summary>
private ArrayList _informationTypes = new ArrayList();
/// <summary>
/// Internal member storing the read categories
/// </summary>
private ArrayList _categories = new ArrayList();
/// <summary>
/// Gets/Sets the url prefix for specifying a chm destination
/// </summary>
public static string UrlPrefix
{
get { return _urlPrefix; }
set { _urlPrefix = value; }
}
public CHMStream.CHMStream BaseStream
{
get
{
CHMFile chm=(CHMFile)_chmFiles[0];
return chm.BaseStream;
}
}
/// <summary>
/// Gets/Sets the flag specifying if the system should use the tree-images list
/// from HtmlHelp2. If false the standard CHM-Viewer pics will be used.
/// </summary>
public static bool UseHH2TreePics
{
get { return _useHH2TreePics; }
set { _useHH2TreePics = value; }
}
/// <summary>
/// Gets the current HtmlHelpSystem instance
/// </summary>
public static HtmlHelpSystem Current
{
get
{
return _current;
}
}
/// <summary>
/// Standard constructor
/// </summary>
public HtmlHelpSystem() : this("")
{
}
/// <summary>
/// Constructor of the reader class
/// </summary>
/// <param name="chmFile">chm file to attach with the reader</param>
public HtmlHelpSystem(string chmFile)
{
_current = this;
OpenFile(chmFile);
}
/// <summary>
/// Opens a chm file and creates
/// </summary>
/// <param name="chmFile">full file path of the chm file to open</param>
/// <remarks>If you call this method, all existing merged files will be cleared.</remarks>
public void OpenFile(string chmFile)
{
OpenFile(chmFile, null);
}
/// <summary>
/// Opens a chm file and creates
/// </summary>
/// <param name="chmFile">full file path of the chm file to open</param>
/// <param name="dmpInfo">dumping info</param>
/// <remarks>If you call this method, all existing merged files will be cleared.</remarks>
public void OpenFile(string chmFile, DumpingInfo dmpInfo)
{
if( File.Exists(chmFile ) )
{
_chmFiles.Clear();
_toc.Clear();
_index.Clear();
_informationTypes.Clear();
_categories.Clear();
CHMFile newFile = new CHMFile(this, chmFile, dmpInfo);
_toc = new TableOfContents( newFile.TOC );
_index = new Index( newFile.IndexKLinks, newFile.IndexALinks );
_chmFiles.Add(newFile);
// add all infotypes and categories of the read file to this system instance
MergeFileInfoTypesCategories(newFile);
// check if the file has a merged files list
if( newFile.MergedFiles.Length > 0 )
{
// extract the path of the chm file (usually merged files are in the same path)
FileInfo fi = new FileInfo(chmFile);
string sPath = fi.DirectoryName;
for(int i=0; i<newFile.MergedFiles.Length; i++)
{
string sFile = newFile.MergedFiles[i];
if(sFile.Length > 0)
{
if(sFile[1] != ':') // no full path setting
{
sFile = Path.Combine(sPath, sFile);
}
MergeFile(sFile, dmpInfo, true);
}
}
// if (newFile.MergLinks.Count>0)
// RecalculateMergeLinks(newFile);
RemoveMergeLinks(); // clear all merge-links which have no target !
}
}
}
/// <summary>
/// Merges a chm file to the current help contents
/// </summary>
/// <param name="chmFile">full file path of the chm file to merge</param>
public void MergeFile(string chmFile)
{
MergeFile(chmFile, null);
}
/// <summary>
/// Merges a chm file to the current help contents
/// </summary>
/// <param name="chmFile">full file path of the chm file to merge</param>
/// <param name="dmpInfo">dumping info</param>
public void MergeFile(string chmFile, DumpingInfo dmpInfo)
{
MergeFile(chmFile, dmpInfo, false);
}
/// <summary>
/// Merges a chm file to the current help contents
/// </summary>
/// <param name="chmFile">full file path of the chm file to merge</param>
/// <param name="dmpInfo">dumping info</param>
/// <param name="mergedFileList">true if the merge is done because a merged file list
/// was found in the previously loaded CHM.</param>
internal void MergeFile(string chmFile, DumpingInfo dmpInfo, bool mergedFileList)
{
if( File.Exists(chmFile ) )
{
if( _chmFiles.Count == 1)
{
// if we open the first file, we directly point into the toc and index of this file.
// So that we don't merge the new toc's indexe's into the first file, we have to
// clone the internal arraylists first to a new instance of the toc/index holder classes.
ArrayList atoc = _toc.TOC;
ArrayList alinks = _index.ALinks;
ArrayList klinks = _index.KLinks;
_toc = new TableOfContents();
_index = new Index();
_toc.MergeToC( atoc );
_index.MergeIndex( alinks, IndexType.AssiciativeLinks );
_index.MergeIndex( klinks, IndexType.KeywordLinks );
}
CHMFile newFile = new CHMFile(this, chmFile, dmpInfo);
if(mergedFileList) // if we've called this method due to a merged file list merge
{
RecalculateMergeLinks(newFile);
_toc.MergeToC( newFile.TOC, _chmFiles );
_index.MergeIndex( newFile.IndexALinks, IndexType.AssiciativeLinks );
_index.MergeIndex( newFile.IndexKLinks, IndexType.KeywordLinks );
_chmFiles.Add(newFile);
// add all infotypes and categories of the read file to this system instance
MergeFileInfoTypesCategories(newFile);
}
else
{
_toc.MergeToC( newFile.TOC, _chmFiles );
_index.MergeIndex( newFile.IndexALinks, IndexType.AssiciativeLinks );
_index.MergeIndex( newFile.IndexKLinks, IndexType.KeywordLinks );
_chmFiles.Add(newFile);
// add all infotypes and categories of the read file to this system instance
MergeFileInfoTypesCategories(newFile);
// check if the file has a merged files list
if( newFile.MergedFiles.Length > 0 )
{
// extract the path of the chm file (usually merged files are in the same path)
FileInfo fi = new FileInfo(chmFile);
string sPath = fi.DirectoryName;
for(int i=0; i<newFile.MergedFiles.Length; i++)
{
string sFile = newFile.MergedFiles[i];
if(sFile.Length > 0)
{
if(sFile[1] != ':') // no full path setting
{
sFile = Path.Combine(sPath, sFile);
}
MergeFile(sFile, dmpInfo, true);
}
}
RemoveMergeLinks(); // clear all merge-links which have no target !
}
}
}
}
/// <summary>
/// Checks all Merg-links read till now. Checks if the merg-link points to the
/// file <c>currentFile</c>. If yes the link will be replaced by the contents of the
/// merged file.
/// </summary>
/// <param name="currentFile">Current CHMFile instance</param>
internal void RecalculateMergeLinks(CHMFile currentFile)
{
foreach(CHMFile curFile in _chmFiles)
{
if( curFile.MergLinks.Count > 0)
{
for(int i=0; i<curFile.MergLinks.Count; i++)
{
TOCItem curItem = curFile.MergLinks[i] as TOCItem;
string sMerge = curItem.MergeLink;
string [] sSplit = sMerge.Split( new char[]{':'} );
string sFName = "";
string sTarget = "";
if( sSplit.Length > 3) // merge info contains path name
{
sFName = sSplit[0] + ":" + sSplit[1];
sTarget = sSplit[3];
}
else if( sSplit.Length == 3)// merge info contains only file name
{
FileInfo fi = new FileInfo(currentFile.ChmFilePath);
string sPath = fi.DirectoryName;
string sFile = sSplit[0];
if(sFile.Length > 0)
{
if(sFile[1] != ':') // no full path setting
{
sFile = Path.Combine(sPath, sFile);
}
}
sFName = sFile;
sTarget = sSplit[2];
}
ArrayList arrToc = null;
if( (sFName.Length>0) && (sTarget.Length>0) )
{
// if this link points into the current file
if( sFName.ToLower() == currentFile.ChmFilePath.ToLower() )
{
if(sTarget.ToLower().IndexOf(".hhc") >= 0)
{
string sfCheck = sTarget;
// remove prefixing ./
while( (sfCheck[0]=='.') || (sfCheck[0]=='/') )
{
sfCheck = sfCheck.Substring(1);
}
if( currentFile.ContentsFile.ToLower() != sfCheck )
{
arrToc = currentFile.ParseHHC( sTarget );
if( arrToc.Count > 0)
{
}
}
else
{
arrToc = currentFile.TOC;
}
// target points to a complete TOC
int nCnt = 0;
foreach(TOCItem chkItem in arrToc)
{
if(nCnt == 0)
{
curItem.AssociatedFile = currentFile;
curItem.Children = chkItem.Children;
curItem.ChmFile = currentFile.ChmFilePath;
curItem.ImageIndex = chkItem.ImageIndex;
curItem.Local = chkItem.Local;
curItem.MergeLink = chkItem.MergeLink;
curItem.Name = chkItem.Name;
curItem.TocMode = chkItem.TocMode;
curItem.TopicOffset = chkItem.TopicOffset;
MarkChildrenAdded(chkItem.Children, curFile.MergLinks);
}
else
{
ArrayList checkList = null;
if(curItem.Parent != null)
checkList = curItem.Parent.Children;
else
checkList = curFile.TOC;
int nIdx = checkList.IndexOf(curItem);
if((nIdx+nCnt)>checkList.Count)
checkList.Add(chkItem);
else
checkList.Insert(nIdx+nCnt, chkItem);
curFile.MergLinks.Add(chkItem);
MarkChildrenAdded(chkItem.Children, curFile.MergLinks);
}
nCnt++;
}
}
else
{
// target points to a single topic
TOCItem chkItem = currentFile.GetTOCItemByLocal(sTarget);
if(chkItem != null)
{
curItem.AssociatedFile = currentFile;
curItem.Children = chkItem.Children;
curItem.ChmFile = currentFile.ChmFilePath;
curItem.ImageIndex = chkItem.ImageIndex;
curItem.Local = chkItem.Local;
curItem.MergeLink = chkItem.MergeLink;
curItem.Name = chkItem.Name;
curItem.TocMode = chkItem.TocMode;
curItem.TopicOffset = chkItem.TopicOffset;
curFile.MergLinks.Add(chkItem);
MarkChildrenAdded(chkItem.Children, curFile.MergLinks);
}
}
}
}
}
}
}
}
/// <summary>
/// Adds sub-items of an TOC-entry to the merg-linked list.
/// This will mark this item as "added" during the extra merge run
/// of the HtmlHelpSystem class.
/// </summary>
/// <param name="tocs">TOCItem list</param>
/// <param name="merged">Arraylist which holds the merged-items</param>
internal void MarkChildrenAdded(ArrayList tocs, ArrayList merged)
{
foreach(TOCItem curItem in tocs)
{
if(!merged.Contains(curItem))
{
merged.Add(curItem);
MarkChildrenAdded(curItem.Children, merged);
}
}
}
/// <summary>
/// Removes merge-links from the toc of files which were not loaded
/// </summary>
internal void RemoveMergeLinks()
{
foreach(CHMFile curFile in _chmFiles)
{
if( curFile.MergLinks.Count > 0)
{
while(curFile.MergLinks.Count > 0)
{
TOCItem curItem = curFile.MergLinks[0] as TOCItem;
if(curItem.MergeLink.Length > 0)
curFile.RemoveTOCItem(curItem);
curFile.MergLinks.RemoveAt(0);
}
}
}
}
/// <summary>
/// Merges the information types and categories read by the CHMFile instance
/// into the system instance
/// </summary>
/// <param name="chmFile">file instance</param>
private void MergeFileInfoTypesCategories(CHMFile chmFile)
{
if(chmFile.HasInformationTypes)
{
for(int i=0; i<chmFile.InformationTypes.Count;i++)
{
InformationType curType = chmFile.InformationTypes[i] as InformationType;
InformationType sysType = GetInformationType( curType.Name );
if( sysType == null)
_informationTypes.Add(curType);
else
curType.ReferenceCount++;
}
}
if(chmFile.HasCategories)
{
for(int i=0; i<chmFile.Categories.Count;i++)
{
Category curCat = chmFile.Categories[i] as Category;
Category sysCat = GetCategory( curCat.Name );
if(sysCat == null)
_categories.Add(curCat);
else
curCat.ReferenceCount++;
}
}
}
/// <summary>
/// Removes the information types and categories read by the CHMFile instance
/// </summary>
/// <param name="chmFile">file instance</param>
private void RemoveFileInfoTypesCategories(CHMFile chmFile)
{
if(chmFile.HasInformationTypes)
{
for(int i=0; i<chmFile.InformationTypes.Count;i++)
{
InformationType curType = chmFile.InformationTypes[i] as InformationType;
InformationType sysType = GetInformationType( curType.Name );
if(sysType != null)
{
sysType.ReferenceCount--;
if(sysType.ReferenceCount<=0)
_informationTypes.Remove(sysType);
}
}
}
if(chmFile.HasCategories)
{
for(int i=0; i<chmFile.Categories.Count;i++)
{
Category curCat = chmFile.Categories[i] as Category;
Category sysCat = GetCategory( curCat.Name );
if(sysCat != null)
{
sysCat.ReferenceCount--;
if(sysCat.ReferenceCount<=0)
_categories.Remove(sysCat);
}
}
}
}
/// <summary>
/// Removes a chm file from the internal file collection
/// </summary>
/// <param name="chmFile">full file path of the chm file to remove</param>
public void RemoveFile(string chmFile)
{
int nIdx = -1;
CHMFile removeInstance=null;
foreach(CHMFile curFile in _chmFiles)
{
nIdx++;
if( curFile.ChmFilePath.ToLower() == chmFile.ToLower() )
{
removeInstance = curFile;
break;
}
}
if(nIdx >= 0)
{
_toc.Clear(); // forces a rebuild of the merged toc
_index.Clear(); // force a rebuild of the merged index
RemoveFileInfoTypesCategories(removeInstance);
_chmFiles.RemoveAt(nIdx);
}
}
/// <summary>
/// Closes all files and destroys TOC/index
/// </summary>
public void CloseAllFiles()
{
for(int i=0; i < _chmFiles.Count; i++)
{
CHMFile curFile = _chmFiles[i] as CHMFile;
_chmFiles.RemoveAt(i);
curFile.Dispose();
i--;
}
_chmFiles.Clear();
_toc.Clear();
_index.Clear();
_informationTypes.Clear();
_categories.Clear();
}
/// <summary>
/// Gets an array of loaded chm files.
/// </summary>
public CHMFile[] FileList
{
get
{
CHMFile[] ret = new CHMFile[ _chmFiles.Count ];
for(int i=0;i<_chmFiles.Count;i++)
ret[i] = (CHMFile)_chmFiles[i];
return ret;
}
}
/// <summary>
/// Returns true if the HtmlHelpSystem instance contains 1 or more information types
/// </summary>
public bool HasInformationTypes
{
get { return (_informationTypes.Count>0); }
}
/// <summary>
/// Returns true if the HtmlHelpSystem instance contains 1 or more categories
/// </summary>
public bool HasCategories
{
get { return (_categories.Count>0); }
}
/// <summary>
/// Gets an ArrayList of <see cref="InformationType">InformationType</see> items
/// </summary>
public ArrayList InformationTypes
{
get { return _informationTypes; }
}
/// <summary>
/// Gets an ArrayList of <see cref="Category">Category</see> items
/// </summary>
public ArrayList Categories
{
get { return _categories; }
}
/// <summary>
/// Gets the information type specified by its name
/// </summary>
/// <param name="name">name of the information type to receive</param>
/// <returns>Returns the Instance for the name or null if not found</returns>
public InformationType GetInformationType(string name)
{
if(HasInformationTypes)
{
for(int i=0; i<_informationTypes.Count;i++)
{
InformationType iT = _informationTypes[i] as InformationType;
if(iT.Name == name)
return iT;
}
}
return null;
}
/// <summary>
/// Gets the category specifiyd by its name
/// </summary>
/// <param name="name">name of the category</param>
/// <returns>Returns the Instance for the name or null if not found</returns>
public Category GetCategory(string name)
{
if(HasCategories)
{
for(int i=0; i<_categories.Count;i++)
{
Category cat = _categories[i] as Category;
if(cat.Name == name)
return cat;
}
}
return null;
}
/// <summary>
/// Gets the default topic
/// </summary>
public string DefaultTopic
{
get
{
if( _chmFiles.Count > 0 )
{
foreach(CHMFile curFile in _chmFiles)
{
if( curFile.DefaultTopic.Length > 0)
{
return curFile.FormURL( curFile.DefaultTopic );
}
}
}
return "about:blank";
}
}
/// <summary>
/// Gets a merged table of contents of all opened chm files
/// </summary>
public TableOfContents TableOfContents
{
get
{
if( _chmFiles.Count > 0 )
{
if( _toc.Count() <= 0)
{
// merge toc of files
foreach(CHMFile curFile in _chmFiles)
{
_toc.MergeToC( curFile.TOC );
}
}
}
return _toc;
}
}
/// <summary>
/// Gets a merged index of all opened chm files
/// </summary>
public Index Index
{
get
{
if( _chmFiles.Count > 0 )
{
if( (_index.Count(IndexType.KeywordLinks)+_index.Count(IndexType.AssiciativeLinks)) <= 0)
{
// merge index files
foreach(CHMFile curFile in _chmFiles)
{
_index.MergeIndex( curFile.IndexKLinks, IndexType.KeywordLinks);
_index.MergeIndex( curFile.IndexALinks, IndexType.AssiciativeLinks);
}
}
}
return _index;
}
}
/// <summary>
/// Gets a flag if the current instance offers a table of contents
/// </summary>
public bool HasTableOfContents
{
get
{
return (TableOfContents.Count() > 0);
}
}
/// <summary>
/// Gets a flag if the current instance offers an index
/// </summary>
public bool HasIndex
{
get
{
return (HasALinks || HasKLinks);
}
}
/// <summary>
/// Gets a flag if the index holds klinks
/// </summary>
public bool HasKLinks
{
get
{
return (_index.Count(IndexType.KeywordLinks) > 0);
}
}
/// <summary>
/// Gets a flag if the index holds alinks
/// </summary>
public bool HasALinks
{
get
{
return (_index.Count(IndexType.AssiciativeLinks) > 0);
}
}
/// <summary>
/// Gets a flag if the current instance supports fulltext searching
/// </summary>
public bool FullTextSearch
{
get
{
bool bRet = false;
foreach(CHMFile curFile in _chmFiles)
{
bRet |= curFile.FullTextSearch;
}
return bRet;
}
}
/// <summary>
/// Performs a full-text search over the chm files
/// </summary>
/// <param name="words">words to search</param>
/// <param name="partialMatches">true if partial word should be matched also
/// ( if this is true a search of 'support' will match 'supports', otherwise not )</param>
/// <param name="titleOnly">true if titles only</param>
/// <returns>A DataTable containing the search hits</returns>
public DataTable PerformSearch(string words, bool partialMatches, bool titleOnly)
{
return PerformSearch(words, -1, partialMatches, titleOnly);
}
/// <summary>
/// Performs a full-text search over the chm files
/// </summary>
/// <param name="words">words to search</param>
/// <param name="MaxResults">maximal number of hits to return</param>
/// <param name="partialMatches">true if partial word should be matched also
/// ( if this is true a search of 'support' will match 'supports', otherwise not )</param>
/// <param name="titleOnly">true if titles only</param>
/// <returns>A DataTable containing the search hits</returns>
public DataTable PerformSearch(string words, int MaxResults, bool partialMatches, bool titleOnly)
{
if( ! FullTextSearch )
return null;
DataTable dtResult = null;
int nCnt = 0;
foreach(CHMFile curFile in _chmFiles)
{
if(nCnt == 0)
{
if(curFile.FullTextSearchEngine.CanSearch)
{
if(curFile.FullTextSearchEngine.Search(words, MaxResults, partialMatches, titleOnly))
{
dtResult = curFile.FullTextSearchEngine.Hits;
dtResult.DefaultView.Sort = "Rating DESC";
}
}
}
else
{
if(curFile.FullTextSearchEngine.CanSearch)
{
if(curFile.FullTextSearchEngine.Search(words, MaxResults, partialMatches, titleOnly))
{
DataTable table = curFile.FullTextSearchEngine.Hits;
// append rows from 2nd file
foreach(DataRow curRow in table.Rows)
{
dtResult.ImportRow( curRow );
}
dtResult.DefaultView.Sort = "Rating DESC";
// adjust max hits
if(MaxResults >= 0)
{
if(dtResult.DefaultView.Count > MaxResults)
{
for(int i=MaxResults-1; i<dtResult.DefaultView.Count-1;i++)
{
if(dtResult.DefaultView[i].Row.RowState != DataRowState.Deleted)
{
dtResult.DefaultView[i].Row.Delete();
dtResult.DefaultView[i].Row.AcceptChanges();
i--;
}
}
dtResult.AcceptChanges();
dtResult.DefaultView.Sort = "Rating DESC";
}
}
}
}
}
nCnt++;
}
return dtResult;
}
}
}

View File

@@ -1,855 +0,0 @@
//
// System.Web.HttpUtility
//
// Authors:
// Patrik Torstensson (Patrik.Torstensson@labs2.com)
// Wictor Wil<69>n (decode/encode functions) (wictor@ibizkit.se)
// Tim Coleman (tim@timcoleman.com)
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
//
//
// 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.
//
using System;
using System.Collections;
using System.Globalization;
using System.IO;
using System.Text;
// using System.Web.Util;
namespace HtmlHelp.ChmDecoding
{
public sealed class HttpUtility {
#region Fields
const string _hex = "0123456789ABCDEF";
const string _chars = "<>;:.?=&@*+%/\\";
static Hashtable entities;
static object lock_ = new object ();
#endregion // Fields
static Hashtable Entities {
get {
lock (lock_) {
if (entities == null)
InitEntities ();
return entities;
}
}
}
#region Constructors
static void InitEntities ()
{
// Build the hash table of HTML entity references. This list comes
// from the HTML 4.01 W3C recommendation.
entities = new Hashtable ();
entities.Add ("nbsp", '\u00A0');
entities.Add ("iexcl", '\u00A1');
entities.Add ("cent", '\u00A2');
entities.Add ("pound", '\u00A3');
entities.Add ("curren", '\u00A4');
entities.Add ("yen", '\u00A5');
entities.Add ("brvbar", '\u00A6');
entities.Add ("sect", '\u00A7');
entities.Add ("uml", '\u00A8');
entities.Add ("copy", '\u00A9');
entities.Add ("ordf", '\u00AA');
entities.Add ("laquo", '\u00AB');
entities.Add ("not", '\u00AC');
entities.Add ("shy", '\u00AD');
entities.Add ("reg", '\u00AE');
entities.Add ("macr", '\u00AF');
entities.Add ("deg", '\u00B0');
entities.Add ("plusmn", '\u00B1');
entities.Add ("sup2", '\u00B2');
entities.Add ("sup3", '\u00B3');
entities.Add ("acute", '\u00B4');
entities.Add ("micro", '\u00B5');
entities.Add ("para", '\u00B6');
entities.Add ("middot", '\u00B7');
entities.Add ("cedil", '\u00B8');
entities.Add ("sup1", '\u00B9');
entities.Add ("ordm", '\u00BA');
entities.Add ("raquo", '\u00BB');
entities.Add ("frac14", '\u00BC');
entities.Add ("frac12", '\u00BD');
entities.Add ("frac34", '\u00BE');
entities.Add ("iquest", '\u00BF');
entities.Add ("Agrave", '\u00C0');
entities.Add ("Aacute", '\u00C1');
entities.Add ("Acirc", '\u00C2');
entities.Add ("Atilde", '\u00C3');
entities.Add ("Auml", '\u00C4');
entities.Add ("Aring", '\u00C5');
entities.Add ("AElig", '\u00C6');
entities.Add ("Ccedil", '\u00C7');
entities.Add ("Egrave", '\u00C8');
entities.Add ("Eacute", '\u00C9');
entities.Add ("Ecirc", '\u00CA');
entities.Add ("Euml", '\u00CB');
entities.Add ("Igrave", '\u00CC');
entities.Add ("Iacute", '\u00CD');
entities.Add ("Icirc", '\u00CE');
entities.Add ("Iuml", '\u00CF');
entities.Add ("ETH", '\u00D0');
entities.Add ("Ntilde", '\u00D1');
entities.Add ("Ograve", '\u00D2');
entities.Add ("Oacute", '\u00D3');
entities.Add ("Ocirc", '\u00D4');
entities.Add ("Otilde", '\u00D5');
entities.Add ("Ouml", '\u00D6');
entities.Add ("times", '\u00D7');
entities.Add ("Oslash", '\u00D8');
entities.Add ("Ugrave", '\u00D9');
entities.Add ("Uacute", '\u00DA');
entities.Add ("Ucirc", '\u00DB');
entities.Add ("Uuml", '\u00DC');
entities.Add ("Yacute", '\u00DD');
entities.Add ("THORN", '\u00DE');
entities.Add ("szlig", '\u00DF');
entities.Add ("agrave", '\u00E0');
entities.Add ("aacute", '\u00E1');
entities.Add ("acirc", '\u00E2');
entities.Add ("atilde", '\u00E3');
entities.Add ("auml", '\u00E4');
entities.Add ("aring", '\u00E5');
entities.Add ("aelig", '\u00E6');
entities.Add ("ccedil", '\u00E7');
entities.Add ("egrave", '\u00E8');
entities.Add ("eacute", '\u00E9');
entities.Add ("ecirc", '\u00EA');
entities.Add ("euml", '\u00EB');
entities.Add ("igrave", '\u00EC');
entities.Add ("iacute", '\u00ED');
entities.Add ("icirc", '\u00EE');
entities.Add ("iuml", '\u00EF');
entities.Add ("eth", '\u00F0');
entities.Add ("ntilde", '\u00F1');
entities.Add ("ograve", '\u00F2');
entities.Add ("oacute", '\u00F3');
entities.Add ("ocirc", '\u00F4');
entities.Add ("otilde", '\u00F5');
entities.Add ("ouml", '\u00F6');
entities.Add ("divide", '\u00F7');
entities.Add ("oslash", '\u00F8');
entities.Add ("ugrave", '\u00F9');
entities.Add ("uacute", '\u00FA');
entities.Add ("ucirc", '\u00FB');
entities.Add ("uuml", '\u00FC');
entities.Add ("yacute", '\u00FD');
entities.Add ("thorn", '\u00FE');
entities.Add ("yuml", '\u00FF');
entities.Add ("fnof", '\u0192');
entities.Add ("Alpha", '\u0391');
entities.Add ("Beta", '\u0392');
entities.Add ("Gamma", '\u0393');
entities.Add ("Delta", '\u0394');
entities.Add ("Epsilon", '\u0395');
entities.Add ("Zeta", '\u0396');
entities.Add ("Eta", '\u0397');
entities.Add ("Theta", '\u0398');
entities.Add ("Iota", '\u0399');
entities.Add ("Kappa", '\u039A');
entities.Add ("Lambda", '\u039B');
entities.Add ("Mu", '\u039C');
entities.Add ("Nu", '\u039D');
entities.Add ("Xi", '\u039E');
entities.Add ("Omicron", '\u039F');
entities.Add ("Pi", '\u03A0');
entities.Add ("Rho", '\u03A1');
entities.Add ("Sigma", '\u03A3');
entities.Add ("Tau", '\u03A4');
entities.Add ("Upsilon", '\u03A5');
entities.Add ("Phi", '\u03A6');
entities.Add ("Chi", '\u03A7');
entities.Add ("Psi", '\u03A8');
entities.Add ("Omega", '\u03A9');
entities.Add ("alpha", '\u03B1');
entities.Add ("beta", '\u03B2');
entities.Add ("gamma", '\u03B3');
entities.Add ("delta", '\u03B4');
entities.Add ("epsilon", '\u03B5');
entities.Add ("zeta", '\u03B6');
entities.Add ("eta", '\u03B7');
entities.Add ("theta", '\u03B8');
entities.Add ("iota", '\u03B9');
entities.Add ("kappa", '\u03BA');
entities.Add ("lambda", '\u03BB');
entities.Add ("mu", '\u03BC');
entities.Add ("nu", '\u03BD');
entities.Add ("xi", '\u03BE');
entities.Add ("omicron", '\u03BF');
entities.Add ("pi", '\u03C0');
entities.Add ("rho", '\u03C1');
entities.Add ("sigmaf", '\u03C2');
entities.Add ("sigma", '\u03C3');
entities.Add ("tau", '\u03C4');
entities.Add ("upsilon", '\u03C5');
entities.Add ("phi", '\u03C6');
entities.Add ("chi", '\u03C7');
entities.Add ("psi", '\u03C8');
entities.Add ("omega", '\u03C9');
entities.Add ("thetasym", '\u03D1');
entities.Add ("upsih", '\u03D2');
entities.Add ("piv", '\u03D6');
entities.Add ("bull", '\u2022');
entities.Add ("hellip", '\u2026');
entities.Add ("prime", '\u2032');
entities.Add ("Prime", '\u2033');
entities.Add ("oline", '\u203E');
entities.Add ("frasl", '\u2044');
entities.Add ("weierp", '\u2118');
entities.Add ("image", '\u2111');
entities.Add ("real", '\u211C');
entities.Add ("trade", '\u2122');
entities.Add ("alefsym", '\u2135');
entities.Add ("larr", '\u2190');
entities.Add ("uarr", '\u2191');
entities.Add ("rarr", '\u2192');
entities.Add ("darr", '\u2193');
entities.Add ("harr", '\u2194');
entities.Add ("crarr", '\u21B5');
entities.Add ("lArr", '\u21D0');
entities.Add ("uArr", '\u21D1');
entities.Add ("rArr", '\u21D2');
entities.Add ("dArr", '\u21D3');
entities.Add ("hArr", '\u21D4');
entities.Add ("forall", '\u2200');
entities.Add ("part", '\u2202');
entities.Add ("exist", '\u2203');
entities.Add ("empty", '\u2205');
entities.Add ("nabla", '\u2207');
entities.Add ("isin", '\u2208');
entities.Add ("notin", '\u2209');
entities.Add ("ni", '\u220B');
entities.Add ("prod", '\u220F');
entities.Add ("sum", '\u2211');
entities.Add ("minus", '\u2212');
entities.Add ("lowast", '\u2217');
entities.Add ("radic", '\u221A');
entities.Add ("prop", '\u221D');
entities.Add ("infin", '\u221E');
entities.Add ("ang", '\u2220');
entities.Add ("and", '\u2227');
entities.Add ("or", '\u2228');
entities.Add ("cap", '\u2229');
entities.Add ("cup", '\u222A');
entities.Add ("int", '\u222B');
entities.Add ("there4", '\u2234');
entities.Add ("sim", '\u223C');
entities.Add ("cong", '\u2245');
entities.Add ("asymp", '\u2248');
entities.Add ("ne", '\u2260');
entities.Add ("equiv", '\u2261');
entities.Add ("le", '\u2264');
entities.Add ("ge", '\u2265');
entities.Add ("sub", '\u2282');
entities.Add ("sup", '\u2283');
entities.Add ("nsub", '\u2284');
entities.Add ("sube", '\u2286');
entities.Add ("supe", '\u2287');
entities.Add ("oplus", '\u2295');
entities.Add ("otimes", '\u2297');
entities.Add ("perp", '\u22A5');
entities.Add ("sdot", '\u22C5');
entities.Add ("lceil", '\u2308');
entities.Add ("rceil", '\u2309');
entities.Add ("lfloor", '\u230A');
entities.Add ("rfloor", '\u230B');
entities.Add ("lang", '\u2329');
entities.Add ("rang", '\u232A');
entities.Add ("loz", '\u25CA');
entities.Add ("spades", '\u2660');
entities.Add ("clubs", '\u2663');
entities.Add ("hearts", '\u2665');
entities.Add ("diams", '\u2666');
entities.Add ("quot", '\u0022');
entities.Add ("amp", '\u0026');
entities.Add ("lt", '\u003C');
entities.Add ("gt", '\u003E');
entities.Add ("OElig", '\u0152');
entities.Add ("oelig", '\u0153');
entities.Add ("Scaron", '\u0160');
entities.Add ("scaron", '\u0161');
entities.Add ("Yuml", '\u0178');
entities.Add ("circ", '\u02C6');
entities.Add ("tilde", '\u02DC');
entities.Add ("ensp", '\u2002');
entities.Add ("emsp", '\u2003');
entities.Add ("thinsp", '\u2009');
entities.Add ("zwnj", '\u200C');
entities.Add ("zwj", '\u200D');
entities.Add ("lrm", '\u200E');
entities.Add ("rlm", '\u200F');
entities.Add ("ndash", '\u2013');
entities.Add ("mdash", '\u2014');
entities.Add ("lsquo", '\u2018');
entities.Add ("rsquo", '\u2019');
entities.Add ("sbquo", '\u201A');
entities.Add ("ldquo", '\u201C');
entities.Add ("rdquo", '\u201D');
entities.Add ("bdquo", '\u201E');
entities.Add ("dagger", '\u2020');
entities.Add ("Dagger", '\u2021');
entities.Add ("permil", '\u2030');
entities.Add ("lsaquo", '\u2039');
entities.Add ("rsaquo", '\u203A');
entities.Add ("euro", '\u20AC');
}
public HttpUtility ()
{
}
#endregion // Constructors
#region Methods
public static void HtmlAttributeEncode (string s, TextWriter output)
{
output.Write(HtmlAttributeEncode(s));
}
public static string HtmlAttributeEncode (string s)
{
if (null == s)
return null;
if (s.IndexOf ('&') == -1 && s.IndexOf ('"') == -1)
return s;
StringBuilder output = new StringBuilder ();
foreach (char c in s)
switch (c) {
case '&' :
output.Append ("&amp;");
break;
case '"' :
output.Append ("&quot;");
break;
default:
output.Append (c);
break;
}
return output.ToString();
}
public static string UrlDecode (string str)
{
return UrlDecode(str, Encoding.UTF8);
}
private static char [] GetChars (MemoryStream b, Encoding e)
{
return e.GetChars (b.GetBuffer (), 0, (int) b.Length);
}
public static string UrlDecode (string s, Encoding e)
{
if (null == s)
return null;
if (s.IndexOf ('%') == -1 && s.IndexOf ('+') == -1)
return s;
if (e == null)
e = Encoding.UTF8;
StringBuilder output = new StringBuilder ();
long len = s.Length;
NumberStyles hexa = NumberStyles.HexNumber;
MemoryStream bytes = new MemoryStream ();
for (int i = 0; i < len; i++) {
if (s [i] == '%' && i + 2 < len) {
if (s [i + 1] == 'u' && i + 5 < len) {
if (bytes.Length > 0) {
output.Append (GetChars (bytes, e));
bytes.SetLength (0);
}
output.Append ((char) Int32.Parse (s.Substring (i + 2, 4), hexa));
i += 5;
} else {
bytes.WriteByte ((byte) Int32.Parse (s.Substring (i + 1, 2), hexa));
i += 2;
}
continue;
}
if (bytes.Length > 0) {
output.Append (GetChars (bytes, e));
bytes.SetLength (0);
}
if (s [i] == '+') {
output.Append (' ');
} else {
output.Append (s [i]);
}
}
if (bytes.Length > 0) {
output.Append (GetChars (bytes, e));
}
bytes = null;
return output.ToString ();
}
public static string UrlDecode (byte [] bytes, Encoding e)
{
if (bytes == null)
return null;
return UrlDecode (bytes, 0, bytes.Length, e);
}
private static int GetInt (byte b)
{
char c = Char.ToUpper ((char) b);
if (c >= '0' && c <= '9')
return c - '0';
if (c < 'A' || c > 'F')
return 0;
return (c - 'A' + 10);
}
private static char GetChar (byte [] bytes, int offset, int length)
{
int value = 0;
int end = length + offset;
for (int i = offset; i < end; i++)
value = (value << 4) + GetInt (bytes [offset]);
return (char) value;
}
public static string UrlDecode (byte [] bytes, int offset, int count, Encoding e)
{
if (bytes == null || count == 0)
return null;
if (bytes == null)
throw new ArgumentNullException ("bytes");
if (offset < 0 || offset > bytes.Length)
throw new ArgumentOutOfRangeException ("offset");
if (count < 0 || offset + count > bytes.Length)
throw new ArgumentOutOfRangeException ("count");
StringBuilder output = new StringBuilder ();
MemoryStream acc = new MemoryStream ();
int end = count + offset;
for (int i = offset; i < end; i++) {
if (bytes [i] == '%' && i + 2 < count) {
if (bytes [i + 1] == (byte) 'u' && i + 5 < end) {
if (acc.Length > 0) {
output.Append (GetChars (acc, e));
acc.SetLength (0);
}
output.Append (GetChar (bytes, offset + 2, 4));
i += 5;
} else {
acc.WriteByte ((byte) GetChar (bytes, offset + 1, 2));
i += 2;
}
continue;
}
if (acc.Length > 0) {
output.Append (GetChars (acc, e));
acc.SetLength (0);
}
if (bytes [i] == '+') {
output.Append (' ');
} else {
output.Append ((char) bytes [i]);
}
}
if (acc.Length > 0) {
output.Append (GetChars (acc, e));
}
acc = null;
return output.ToString ();
}
public static byte [] UrlDecodeToBytes (byte [] bytes)
{
if (bytes == null)
return null;
return UrlDecodeToBytes (bytes, 0, bytes.Length);
}
public static byte [] UrlDecodeToBytes (string str)
{
return UrlDecodeToBytes (str, Encoding.UTF8);
}
public static byte [] UrlDecodeToBytes (string str, Encoding e)
{
if (str == null)
return null;
if (e == null)
throw new ArgumentNullException ("e");
return UrlDecodeToBytes (e.GetBytes (str));
}
public static byte [] UrlDecodeToBytes (byte [] bytes, int offset, int count)
{
if (bytes == null)
return null;
int len = bytes.Length;
if (offset < 0 || offset >= len)
throw new ArgumentOutOfRangeException("offset");
if (count < 0 || offset > len - count)
throw new ArgumentOutOfRangeException("count");
MemoryStream result = new MemoryStream ();
int end = offset + count;
for (int i = offset; i < end; i++){
char c = (char) bytes [i];
if (c == '+')
c = ' ';
else if (c == '%' && i < end - 2) {
c = GetChar (bytes, i, 2);
i += 2;
}
result.WriteByte ((byte) c);
}
return result.ToArray ();
}
public static string UrlEncode(string str)
{
return UrlEncode(str, Encoding.UTF8);
}
public static string UrlEncode (string s, Encoding Enc)
{
if (s == null)
return null;
if (s == "")
return "";
byte [] bytes = Enc.GetBytes (s);
byte [] b =UrlEncodeToBytes (bytes, 0, bytes.Length);
return Encoding.ASCII.GetString (b,0,b.Length);
}
public static string UrlEncode (byte [] bytes)
{
if (bytes == null)
return null;
if (bytes.Length == 0)
return "";
byte []b=UrlEncodeToBytes(bytes, 0, bytes.Length);
return Encoding.ASCII.GetString (b,0,b.Length);
}
public static string UrlEncode (byte [] bytes, int offset, int count)
{
if (bytes == null)
return null;
if (bytes.Length == 0)
return "";
byte []b=UrlEncodeToBytes(bytes, offset, count);
return Encoding.ASCII.GetString (b,0,b.Length);
}
public static byte [] UrlEncodeToBytes (string str)
{
return UrlEncodeToBytes (str, Encoding.UTF8);
}
public static byte [] UrlEncodeToBytes (string str, Encoding e)
{
if (str == null)
return null;
if (str == "")
return new byte [0];
byte [] bytes = e.GetBytes (str);
return UrlEncodeToBytes (bytes, 0, bytes.Length);
}
public static byte [] UrlEncodeToBytes (byte [] bytes)
{
if (bytes == null)
return null;
if (bytes.Length == 0)
return new byte [0];
return UrlEncodeToBytes (bytes, 0, bytes.Length);
}
static char [] hexChars = "0123456789abcdef".ToCharArray ();
public static byte [] UrlEncodeToBytes (byte [] bytes, int offset, int count)
{
if (bytes == null)
return null;
int len = bytes.Length;
if (len == 0)
return new byte [0];
if (offset < 0 || offset >= len)
throw new ArgumentOutOfRangeException("offset");
if (count < 0 || count > len - offset)
throw new ArgumentOutOfRangeException("count");
MemoryStream result = new MemoryStream ();
int end = offset + count;
for (int i = offset; i < end; i++) {
char c = (char) bytes [i];
if ((c == ' ') || (c < '0' && c != '-' && c != '.') ||
(c < 'A' && c > '9') ||
(c > 'Z' && c < 'a' && c != '_') ||
(c > 'z')) {
result.WriteByte ((byte) '%');
int idx = ((int) c) >> 4;
result.WriteByte ((byte) hexChars [idx]);
idx = ((int) c) & 0x0F;
result.WriteByte ((byte) hexChars [idx]);
} else {
result.WriteByte ((byte) c);
}
}
return result.ToArray ();
}
public static string UrlEncodeUnicode (string str)
{
if (str == null)
return null;
StringBuilder result = new StringBuilder ();
int end = str.Length;
for (int i = 0; i < end; i++) {
int idx;
char c = str [i];
if (c > 255) {
result.Append ("%u");
idx = ((int) c) >> 24;
result.Append (hexChars [idx]);
idx = (((int) c) >> 16) & 0x0F;
result.Append (hexChars [idx]);
idx = (((int) c) >> 8) & 0x0F;
result.Append (hexChars [idx]);
idx = ((int) c) & 0x0F;
result.Append (hexChars [idx]);
continue;
}
if ((c == ' ') || (c < '0' && c != '-' && c != '.') ||
(c < 'A' && c > '9') ||
(c > 'Z' && c < 'a' && c != '_') ||
(c > 'z')) {
result.Append ('%');
idx = ((int) c) >> 4;
result.Append (hexChars [idx]);
idx = ((int) c) & 0x0F;
result.Append (hexChars [idx]);
continue;
}
result.Append (c);
}
return result.ToString ();
}
public static byte [] UrlEncodeUnicodeToBytes (string str)
{
if (str == null)
return null;
if (str == "")
return new byte [0];
return Encoding.ASCII.GetBytes (UrlEncodeUnicode (str));
}
/// <summary>
/// Decodes an HTML-encoded string and returns the decoded string.
/// </summary>
/// <param name="s">The HTML string to decode. </param>
/// <returns>The decoded text.</returns>
public static string HtmlDecode (string s)
{
if (s == null)
throw new ArgumentNullException ("s");
if (s.IndexOf ('&') == -1)
return s;
bool insideEntity = false; // used to indicate that we are in a potential entity
string entity = String.Empty;
StringBuilder output = new StringBuilder ();
int len = s.Length;
for (int i = 0; i < len; i++) {
char c = s [i];
switch (c) {
case '&' :
output.Append (entity);
entity = "&";
insideEntity = true;
break;
case ';' :
if (!insideEntity) {
output.Append (c);
break;
}
entity += c;
int length = entity.Length;
if (length >= 2 && entity[1] == '#' && entity[2] != ';')
entity = ((char) Int32.Parse (entity.Substring (2, entity.Length - 3))).ToString();
else if (length > 1 && Entities.ContainsKey (entity.Substring (1, entity.Length - 2)))
entity = Entities [entity.Substring (1, entity.Length - 2)].ToString ();
output.Append (entity);
entity = String.Empty;
insideEntity = false;
break;
default :
if (insideEntity)
entity += c;
else
output.Append (c);
break;
}
}
output.Append (entity);
return output.ToString ();
}
/// <summary>
/// Decodes an HTML-encoded string and sends the resulting output to a TextWriter output stream.
/// </summary>
/// <param name="s">The HTML string to decode</param>
/// <param name="output">The TextWriter output stream containing the decoded string. </param>
public static void HtmlDecode(string s, TextWriter output)
{
if (s != null)
output.Write (HtmlDecode (s));
}
/// <summary>
/// HTML-encodes a string and returns the encoded string.
/// </summary>
/// <param name="s">The text string to encode. </param>
/// <returns>The HTML-encoded text.</returns>
public static string HtmlEncode (string s)
{
if (s == null)
return null;
StringBuilder output = new StringBuilder ();
foreach (char c in s)
switch (c) {
case '&' :
output.Append ("&amp;");
break;
case '>' :
output.Append ("&gt;");
break;
case '<' :
output.Append ("&lt;");
break;
case '"' :
output.Append ("&quot;");
break;
default:
if ((int) c > 128) {
output.Append ("&#");
output.Append (((int) c).ToString ());
output.Append (";");
}
else
output.Append (c);
break;
}
return output.ToString ();
}
/// <summary>
/// HTML-encodes a string and sends the resulting output to a TextWriter output stream.
/// </summary>
/// <param name="s">The string to encode. </param>
/// <param name="output">The TextWriter output stream containing the encoded string. </param>
public static void HtmlEncode(string s, TextWriter output)
{
if (s != null)
output.Write (HtmlEncode (s));
}
#if NET_1_1
public string UrlPathEncode (string s)
{
if (s == null)
return null;
int idx = s.IndexOf ("?");
string s2 = null;
if (idx != -1) {
s2 = s.Substring (0, idx-1);
s2 = UrlEncode (s2) + s.Substring (idx);
} else {
s2 = UrlEncode (s);
}
return s2;
}
#endif
#endregion // Methods
}
}

View File

@@ -1,322 +0,0 @@
using System;
using System.Diagnostics;
using System.Collections;
using HtmlHelp.ChmDecoding;
namespace HtmlHelp
{
/// <summary>
/// Enumeration for specifying the index type
/// </summary>
public enum IndexType
{
/// <summary>
/// Keyword links should be used
/// </summary>
KeywordLinks = 0,
/// <summary>
/// Associative links should be used
/// </summary>
AssiciativeLinks = 1
}
/// <summary>
/// The class <c>Index</c> holds the (keyword links) KLinks and (associative links) ALinks of the htmlhelp
/// system. It implements methods for easy index-based searching.
/// </summary>
public class Index
{
private ArrayList _kLinks = new ArrayList();
private ArrayList _aLinks = new ArrayList();
/// <summary>
/// Standard constructor
/// </summary>
public Index()
{
}
/// <summary>
/// Constructor of the class
/// </summary>
/// <param name="kLinks">arraylist with keyword links</param>
/// <param name="aLinks">arraylist with associative links</param>
public Index(ArrayList kLinks, ArrayList aLinks)
{
_kLinks= kLinks;
_aLinks = aLinks;
}
/// <summary>
/// Clears the current toc
/// </summary>
public void Clear()
{
if(_aLinks != null)
_aLinks.Clear();
if(_kLinks != null)
_kLinks.Clear();
}
/// <summary>
/// Gets the number of index items for a specific type
/// </summary>
/// <param name="typeOfIndex">type of index</param>
/// <returns>Returns the number of index items for a specific type</returns>
public int Count(IndexType typeOfIndex)
{
ArrayList _index = null;
switch( typeOfIndex )
{
case IndexType.AssiciativeLinks: _index = _aLinks; break;
case IndexType.KeywordLinks: _index = _kLinks; break;
}
if(_index != null)
return _index.Count;
return 0;
}
/// <summary>
/// Gets the internal index list of keyword links
/// </summary>
public ArrayList KLinks
{
get
{
if(_kLinks==null)
_kLinks = new ArrayList();
return _kLinks;
}
}
/// <summary>
/// Gets the internal index list of associative links
/// </summary>
public ArrayList ALinks
{
get
{
if(_aLinks==null)
_aLinks = new ArrayList();
return _aLinks;
}
}
/// <summary>
/// Merges the the index list <c>arrIndex</c> into the current one
/// </summary>
/// <param name="arrIndex">indexlist which should be merged with the current one</param>
/// <param name="typeOfIndex">type of index to merge</param>
public void MergeIndex( ArrayList arrIndex, IndexType typeOfIndex )
{
ArrayList _index = null;
switch(typeOfIndex)
{
case IndexType.AssiciativeLinks: _index = _aLinks;break;
case IndexType.KeywordLinks: _index = _kLinks;break;
}
foreach(IndexItem curItem in arrIndex)
{
//IndexItem searchItem = ContainsIndex(_index, curItem.KeyWordPath);
int insertIndex=0;
IndexItem searchItem = BinSearch(0, _index.Count-1, _index, curItem.KeyWordPath, false, false, ref insertIndex);
if(searchItem != null)
{
// extend the keywords topics
foreach(IndexTopic curEntry in curItem.Topics)
{
searchItem.Topics.Add( curEntry );
}
}
else
{
// add the item to the global collection
//_index.Add( curItem );
if(insertIndex > _index.Count)
_index.Add(curItem);
else
_index.Insert(insertIndex, curItem);
}
}
}
/// <summary>
/// Searches an index entry using recursive binary search algo (divide and conquer).
/// </summary>
/// <param name="nStart">start index for searching</param>
/// <param name="nEnd">end index for searching</param>
/// <param name="arrIndex">arraylist containing sorted IndexItem entries</param>
/// <param name="keywordPath">keyword path to search</param>
/// <param name="searchKeyword">true if the keywordPath will only contain the keyword not the complete path</param>
/// <param name="caseInsensitive">True if case should be ignored</param>
/// <param name="insertIndex">out reference. will receive the index where the item with the
/// keywordPath should be inserted if not found (receives -1 if the item was found)</param>
/// <returns>Returns an IndexItem instance if found, otherwise null
/// (use insertIndex for inserting the new item in a sorted order)</returns>
private IndexItem BinSearch(int nStart, int nEnd, ArrayList arrIndex, string keywordPath,
bool searchKeyword, bool caseInsensitive, ref int insertIndex)
{
if( arrIndex.Count <= 0 )
{
insertIndex=0;
return null;
}
if(caseInsensitive)
keywordPath = keywordPath.ToLower();
if( (nEnd - nStart) > 1)
{
int nCheck = nStart + (nEnd-nStart)/2;
IndexItem iC = arrIndex[nCheck] as IndexItem;
string sCompare = iC.KeyWordPath;
if(searchKeyword)
sCompare = iC.KeyWord;
if(caseInsensitive)
sCompare = sCompare.ToLower();
if( sCompare == keywordPath )
{
insertIndex=-1;
return iC;
}
if( keywordPath.CompareTo(sCompare) < 0 )
{
return BinSearch(nStart, nCheck-1, arrIndex, keywordPath, searchKeyword, caseInsensitive, ref insertIndex);
}
if( keywordPath.CompareTo(sCompare) > 0 )
{
return BinSearch(nCheck+1, nEnd, arrIndex, keywordPath, searchKeyword, caseInsensitive, ref insertIndex);
}
}
else if(nEnd-nStart == 1)
{
IndexItem i1 = arrIndex[nStart] as IndexItem;
IndexItem i2 = arrIndex[nEnd] as IndexItem;
string sCompare1 = i1.KeyWordPath;
if(searchKeyword)
sCompare1 = i1.KeyWord;
if(caseInsensitive)
sCompare1 = sCompare1.ToLower();
string sCompare2 = i2.KeyWordPath;
if(searchKeyword)
sCompare2 = i2.KeyWord;
if(caseInsensitive)
sCompare2 = sCompare2.ToLower();
if( sCompare1 == keywordPath)
{
insertIndex = -1;
return i1;
}
if( sCompare2 == keywordPath)
{
insertIndex = -1;
return i2;
}
if( sCompare1.CompareTo(keywordPath) > 0)
{
insertIndex = nStart;
return null;
}
else if( sCompare2.CompareTo(keywordPath) > 0)
{
insertIndex = nEnd;
return null;
}
else
{
insertIndex = nEnd+1;
}
}
IndexItem itm = arrIndex[nEnd] as IndexItem;
string sCompareI = itm.KeyWordPath;
if(searchKeyword)
sCompareI = itm.KeyWord;
if(caseInsensitive)
sCompareI = sCompareI.ToLower();
if( sCompareI.CompareTo(keywordPath) > 0)
{
insertIndex = nStart;
return null;
}
else if( sCompareI.CompareTo(keywordPath) < 0)
{
insertIndex = nEnd+1;
return null;
}
else
{
insertIndex = -1;
return arrIndex[nEnd] as IndexItem;
}
}
/// <summary>
/// Checks if a keyword exists in a index collection
/// </summary>
/// <param name="arrIndex">index to search (arraylist of IndexItems)</param>
/// <param name="keywordPath">keywordpath to search</param>
/// <returns>Returns the found IndexItem, otherwise null</returns>
private IndexItem ContainsIndex(ArrayList arrIndex, string keywordPath)
{
foreach(IndexItem curItem in arrIndex)
{
if(curItem.KeyWordPath == keywordPath)
return curItem;
}
return null;
}
/// <summary>
/// Searches the alinks- or klinks-index for a specific keyword/associative
/// </summary>
/// <param name="search">keyword/associative to search</param>
/// <param name="typeOfIndex">type of index to search</param>
/// <returns>Returns an ArrayList which contains IndexTopic items or null if nothing was found</returns>
public IndexItem SearchIndex(string search, IndexType typeOfIndex)
{
ArrayList _index = null;
switch( typeOfIndex )
{
case IndexType.AssiciativeLinks: _index = _aLinks;break;
case IndexType.KeywordLinks: _index = _kLinks;break;
}
int insertIdx=0;
IndexItem foundItem = BinSearch(0, _index.Count, _index, search, true, true, ref insertIdx);
return foundItem;
}
}
}

View File

@@ -1,396 +0,0 @@
using System;
using System.IO;
using System.Text;
using System.Collections;
using HtmlHelp.ChmDecoding;
namespace HtmlHelp
{
/// <summary>
/// The class <c>IndexItem</c> implements an help-index item
/// </summary>
public sealed class IndexItem : IComparable
{
/// <summary>
/// Internal member storing the keyword
/// </summary>
private string _keyWord = "";
/// <summary>
/// Internal member storing all associated information type strings
/// </summary>
private ArrayList _infoTypeStrings = new ArrayList();
/// <summary>
/// Internal member storing the flag if this is a see-also keyword
/// </summary>
private bool _isSeeAlso = false;
/// <summary>
/// Internal member storing the indent of the keyword
/// </summary>
private int _indent = 0;
/// <summary>
/// Internal member storing the last index of the keyword in the seperated list
/// </summary>
private int _charIndex = 0;
/// <summary>
/// Internal member storing the entry index
/// </summary>
private int _entryIndex = 0;
/// <summary>
/// Internal member storing an array of see-also values
/// </summary>
private string[] _seeAlso = new string[0];
/// <summary>
/// Internal member storing an array of topic offsets
/// </summary>
private int[] _nTopics = new int[0];
/// <summary>
/// Internal member storing the topics
/// </summary>
private ArrayList _Topics = null;
/// <summary>
/// Associated CHMFile instance
/// </summary>
private CHMFile _chmFile = null;
/// <summary>
/// Internal flag specifying the chm file path
/// </summary>
private string _chmFileName = "";
/// <summary>
/// Constructor of the class
/// </summary>
/// <param name="chmFile">associated CHMFile instance</param>
/// <param name="keyWord">keyword</param>
/// <param name="isSeeAlso">true if it is a see-also keyword</param>
/// <param name="indent">indent of the entry</param>
/// <param name="charIndex">char index of the last keyword in the separated list</param>
/// <param name="entryIndex">index of the entry</param>
/// <param name="seeAlsoValues">string array with see-also values</param>
/// <param name="topicOffsets">integer array with topic offsets</param>
internal IndexItem(CHMFile chmFile, string keyWord, bool isSeeAlso, int indent, int charIndex, int entryIndex, string[] seeAlsoValues, int[] topicOffsets)
{
_chmFile = chmFile;
_chmFileName = _chmFile.ChmFilePath;
_keyWord = keyWord;
_isSeeAlso = isSeeAlso;
_indent = indent;
_charIndex = charIndex;
_entryIndex = entryIndex;
_seeAlso = seeAlsoValues;
_nTopics = topicOffsets;
}
/// <summary>
/// Standard constructor
/// </summary>
public IndexItem()
{
}
#region Data dumping
/// <summary>
/// Dump the class data to a binary writer
/// </summary>
/// <param name="writer">writer to write the data</param>
/// <param name="writeFileName">true if the chm filename should be written</param>
internal void Dump(ref BinaryWriter writer, bool writeFileName)
{
int i=0;
writer.Write(_keyWord);
writer.Write(_isSeeAlso);
writer.Write(_indent);
if(writeFileName)
writer.Write(_chmFileName);
writer.Write(_infoTypeStrings.Count);
for(i=0; i<_infoTypeStrings.Count; i++)
writer.Write( (_infoTypeStrings[i]).ToString() );
writer.Write(_seeAlso.Length);
for(i=0; i<_seeAlso.Length; i++)
{
if(_seeAlso[i] == null)
writer.Write("");
else
writer.Write( _seeAlso[i] );
}
writer.Write(Topics.Count);
for(i=0; i<Topics.Count; i++)
{
IndexTopic topic = ((IndexTopic)(Topics[i]));
topic.Dump(ref writer);
}
}
/// <summary>
/// Dump the class data to a binary writer
/// </summary>
/// <param name="writer">writer to write the data</param>
internal void Dump(ref BinaryWriter writer)
{
Dump(ref writer, false);
}
/// <summary>
/// Reads the object data from a dump store
/// </summary>
/// <param name="reader">reader to read the data</param>
/// <param name="filesList">filelist from helpsystem</param>
internal bool ReadDump(ref BinaryReader reader, ArrayList filesList)
{
int i=0;
_keyWord = reader.ReadString();
_isSeeAlso = reader.ReadBoolean();
_indent = reader.ReadInt32();
_chmFileName = reader.ReadString();
foreach(CHMFile curFile in filesList)
{
if(curFile.ChmFilePath == _chmFileName)
{
_chmFile = curFile;
break;
}
}
if(_chmFile==null)
return false;
int nCnt = reader.ReadInt32();
for(i=0; i<nCnt; i++)
{
string sIT = reader.ReadString();
_infoTypeStrings.Add(sIT);
}
nCnt = reader.ReadInt32();
_seeAlso = new string[nCnt];
for(i=0; i<nCnt; i++)
{
_seeAlso[i] = reader.ReadString();
}
nCnt = reader.ReadInt32();
for(i=0; i<nCnt; i++)
{
IndexTopic topic = new IndexTopic("","","","");
topic.SetChmInfo( _chmFile.CompileFile, _chmFile.ChmFilePath);
topic.AssociatedFile = _chmFile;
topic.ReadDump(ref reader);
Topics.Add(topic);
}
return true;
}
/// <summary>
/// Reads the object data from a dump store
/// </summary>
/// <param name="reader">reader to read the data</param>
internal void ReadDump(ref BinaryReader reader)
{
int i=0;
_keyWord = reader.ReadString();
_isSeeAlso = reader.ReadBoolean();
_indent = reader.ReadInt32();
int nCnt = reader.ReadInt32();
for(i=0; i<nCnt; i++)
{
string sIT = reader.ReadString();
_infoTypeStrings.Add(sIT);
}
nCnt = reader.ReadInt32();
_seeAlso = new string[nCnt];
for(i=0; i<nCnt; i++)
{
_seeAlso[i] = reader.ReadString();
}
nCnt = reader.ReadInt32();
for(i=0; i<nCnt; i++)
{
IndexTopic topic = new IndexTopic("","","","");
topic.AssociatedFile = _chmFile;
topic.SetChmInfo( _chmFile.CompileFile, _chmFile.ChmFilePath);
topic.ReadDump(ref reader);
Topics.Add(topic);
}
}
#endregion
/// <summary>
/// Implements the compareto method which allows sorting.
/// </summary>
/// <param name="obj">object to compare to</param>
/// <returns>See <see cref="System.IComparable">IComparable.CompareTo()</see></returns>
public int CompareTo(object obj)
{
if( obj.GetType() == this.GetType() )
{
IndexItem cmp = (IndexItem)obj;
return this.KeyWordPath.CompareTo( cmp.KeyWordPath );
}
return 0;
}
/// <summary>
/// Gets/Sets the associated CHMFile instance
/// </summary>
internal CHMFile ChmFile
{
get { return _chmFile; }
set { _chmFile = value; }
}
/// <summary>
/// Gets the ArrayList which holds all information types/categories this item is associated
/// </summary>
internal ArrayList InfoTypeStrings
{
get { return _infoTypeStrings; }
}
/// <summary>
/// Adds a see-also string to the index item and marks it as see also item
/// </summary>
/// <param name="seeAlsoString">see also string to add</param>
internal void AddSeeAlso(string seeAlsoString)
{
string[] seeAlso = new string[ _seeAlso.Length +1 ];
for(int i=0; i<_seeAlso.Length; i++)
seeAlso[i] = _seeAlso[i];
seeAlso[_seeAlso.Length] = seeAlsoString;
_seeAlso = seeAlso;
_isSeeAlso = true;
}
/// <summary>
/// Gets/Sets the full keyword-path of this item ( ", " separated list)
/// </summary>
public string KeyWordPath
{
get { return _keyWord; }
set { _keyWord = value; }
}
/// <summary>
/// Gets the keyword of this item
/// </summary>
public string KeyWord
{
get
{
return _keyWord.Substring(_charIndex, _keyWord.Length-_charIndex);
}
}
/// <summary>
/// Gets the keyword of this item with prefixing indent spaces
/// </summary>
public string IndentKeyWord
{
get
{
string sKW = this.KeyWord;
StringBuilder sb = new StringBuilder("",this.Indent*3 + sKW.Length);
for(int i=0; i<this.Indent; i++)
sb.Append(" ");
sb.Append(sKW);
return sb.ToString();
}
}
/// <summary>
/// Gets/Sets the see-also flag of this item
/// </summary>
public bool IsSeeAlso
{
get { return _isSeeAlso; }
set { _isSeeAlso = value; }
}
/// <summary>
/// Gets/Sets the listbox indent for this item
/// </summary>
public int Indent
{
get { return _indent; }
set { _indent = value; }
}
/// <summary>
/// Gets/Sets the character index of an indent keyword
/// </summary>
public int CharIndex
{
get { return _charIndex; }
set { _charIndex = value; }
}
/// <summary>
/// Gets the see-also values of this item
/// </summary>
public string[] SeeAlso
{
get { return _seeAlso; }
}
/// <summary>
/// Gets an array with the associated topics
/// </summary>
public ArrayList Topics
{
get
{
if( _Topics == null )
{
if(IsSeeAlso)
{
_Topics = new ArrayList();
}
else
{
if( (_chmFile != null) && (_chmFile.TopicsFile != null) )
{
_Topics = new ArrayList();
for(int i=0; i<_nTopics.Length; i++)
{
IndexTopic newTopic = IndexTopic.FromTopicEntry((TopicEntry)_chmFile.TopicsFile.TopicTable[ _nTopics[i] ]);
newTopic.AssociatedFile = _chmFile;
_Topics.Add( newTopic );
}
}
else
{
_Topics = new ArrayList();
}
}
}
return _Topics;
}
}
}
}

View File

@@ -1,216 +0,0 @@
using System;
using System.IO;
using HtmlHelp.ChmDecoding;
namespace HtmlHelp
{
/// <summary>
/// The class <c>IndexTopic</c> implements an entry for the <see cref="IndexItem">IndexItem</see> topics list.
/// </summary>
public sealed class IndexTopic
{
private DataMode _topicMode = DataMode.TextBased;
private string _title="";
private string _local="";
private string _compileFile = "";
private string _chmPath = "";
private int _topicOffset = -1;
private CHMFile _associatedFile = null;
/// <summary>
/// Creates a new instance of the class based on an existing TopicEntry
/// </summary>
/// <param name="entry"></param>
internal static IndexTopic FromTopicEntry(TopicEntry entry)
{
return new IndexTopic(entry.EntryOffset, entry.ChmFile);
//return new IndexTopic( entry.Title, entry.Locale, entry.ChmFile.CompileFile, entry.ChmFile.ChmFilePath);
}
/// <summary>
/// Creates a new instance of the class (binary extraction mode)
/// </summary>
/// <param name="topicOffset">offset of the topic entry</param>
/// <param name="associatedFile">associated CHMFile instance</param>
internal IndexTopic(int topicOffset, CHMFile associatedFile)
{
_topicMode = DataMode.Binary;
_topicOffset = topicOffset;
_associatedFile = associatedFile;
}
/// <summary>
/// Constructor of the class
/// </summary>
/// <param name="Title">topic title</param>
/// <param name="local">topic local (content filename)</param>
/// <param name="compilefile">name of the chm file (location of topic)</param>
/// <param name="chmpath">path of the chm file</param>
public IndexTopic(string Title, string local, string compilefile, string chmpath)
{
_topicMode = DataMode.TextBased;
_title = Title;
_local = local;
_compileFile = compilefile;
_chmPath = chmpath;
}
#region Data dumping
/// <summary>
/// Dump the class data to a binary writer
/// </summary>
/// <param name="writer">writer to write the data</param>
internal void Dump(ref BinaryWriter writer)
{
writer.Write((int)_topicMode);
if(_topicMode==DataMode.TextBased)
{
writer.Write(_title);
writer.Write(_local);
}
else
{
writer.Write(_topicOffset);
}
}
/// <summary>
/// Reads the object data from a dump store
/// </summary>
/// <param name="reader">reader to read the data</param>
internal void ReadDump(ref BinaryReader reader)
{
_topicMode = (DataMode)reader.ReadInt32();
if(_topicMode==DataMode.TextBased)
{
_title = reader.ReadString();
_local = reader.ReadString();
}
else
{
_topicOffset = reader.ReadInt32();
}
}
#endregion
/// <summary>
/// Internally used to set the chm-finos when reading from dump store
/// </summary>
/// <param name="compilefile"></param>
/// <param name="chmpath"></param>
internal void SetChmInfo(string compilefile, string chmpath)
{
_compileFile = compilefile;
_chmPath = chmpath;
}
/// <summary>
/// Gets/Sets the associated CHMFile instance
/// </summary>
internal CHMFile AssociatedFile
{
get { return _associatedFile; }
set { _associatedFile = value; }
}
/// <summary>
/// Gets the topic title
/// </summary>
public string Title
{
get
{
if((_topicMode == DataMode.Binary )&&(_associatedFile!=null))
{
if( _topicOffset >= 0)
{
TopicEntry te = (TopicEntry) (_associatedFile.TopicsFile[_topicOffset]);
if(te != null)
{
return te.Title;
}
}
}
return _title;
}
}
/// <summary>
/// Gets the local (content filename)
/// </summary>
public string Local
{
get
{
if((_topicMode == DataMode.Binary )&&(_associatedFile!=null))
{
if( _topicOffset >= 0)
{
TopicEntry te = (TopicEntry) (_associatedFile.TopicsFile[_topicOffset]);
if(te != null)
{
return te.Locale;
}
}
}
return _local;
}
}
/// <summary>
/// Gets the compile file (location)
/// </summary>
public string CompileFile
{
get
{
if(_associatedFile != null)
return _associatedFile.CompileFile;
return _compileFile;
}
}
/// <summary>
/// Gets the chm file path
/// </summary>
public string ChmFilePath
{
get
{
if(_associatedFile != null)
return _associatedFile.ChmFilePath;
return _chmPath;
}
}
/// <summary>
/// Gets the url
/// </summary>
public string URL
{
get
{
string sL = Local;
if(sL.Length<=0)
return "";//"about:blank";
if( (sL.ToLower().IndexOf("http://") >= 0) ||
(sL.ToLower().IndexOf("https://") >= 0) ||
(sL.ToLower().IndexOf("mailto:") >= 0) ||
(sL.ToLower().IndexOf("ftp://") >= 0) ||
(sL.ToLower().IndexOf("ms-its:") >= 0))
return sL;
return HtmlHelpSystem.UrlPrefix + ChmFilePath + "::/" + sL;
}
}
}
}

View File

@@ -1,146 +0,0 @@
using System;
using System.IO;
namespace HtmlHelp
{
/// <summary>
/// Enumeration for specifying the mode of the information type
/// </summary>
public enum InformationTypeMode
{
/// <summary>
/// Inclusive information type. The user will be allowed to select from one or more information types.
/// </summary>
Inclusive = 0,
/// <summary>
/// Exclusive information type. The user will be allowed to choose only one information type within each category
/// </summary>
Exclusive = 1,
/// <summary>
/// Hidden information type. The user cannot see this information types (only for API calls).
/// </summary>
Hidden = 2
}
/// <summary>
/// The class <c>InformationType</c> implements a methods/properties for an information type.
/// </summary>
/// <remarks>Note: Information types and categories allow users to filter help contents.
/// They are only supported if using sitemap TOC and/or sitemap Index.</remarks>
public class InformationType
{
private string _name = "";
private string _description = "";
private InformationTypeMode _typeMode = InformationTypeMode.Inclusive;
private bool _isInCategory = false;
private int _referenceCount = 1;
/// <summary>
/// Standard constructor
/// </summary>
/// <remarks>the mode is set to InformationTypeMode.Inclusive by default</remarks>
public InformationType() : this("","")
{
}
/// <summary>
/// Standard constructor
/// </summary>
/// <param name="name">name of the information type</param>
/// <param name="description">description</param>
/// <remarks>the mode is set to InformationTypeMode.Inclusive by default</remarks>
public InformationType(string name, string description) : this(name, description, InformationTypeMode.Inclusive)
{
}
/// <summary>
/// Standard constructor
/// </summary>
/// <param name="name">name of the information type</param>
/// <param name="description">description</param>
/// <param name="mode">mode of the information type</param>
public InformationType(string name, string description, InformationTypeMode mode)
{
_name = name;
_description = description;
_typeMode = mode;
}
#region Data dumping
/// <summary>
/// Dump the class data to a binary writer
/// </summary>
/// <param name="writer">writer to write the data</param>
internal void Dump(ref BinaryWriter writer)
{
writer.Write( (int)_typeMode );
writer.Write( _name );
writer.Write( _description );
}
/// <summary>
/// Reads the object data from a dump store
/// </summary>
/// <param name="reader">reader to read the data</param>
internal void ReadDump(ref BinaryReader reader)
{
_typeMode = (InformationTypeMode)reader.ReadInt32();
_name = reader.ReadString();
_description = reader.ReadString();
}
#endregion
/// <summary>
/// Sets the flag if this information type is nested in at least one category
/// </summary>
/// <param name="newValue">true or false</param>
internal void SetCategoryFlag(bool newValue)
{
_isInCategory = newValue;
}
/// <summary>
/// Gets/Sets the reference count of this information type instance
/// </summary>
internal int ReferenceCount
{
get { return _referenceCount; }
set { _referenceCount = value; }
}
/// <summary>
/// Gets true if this information type is nested in at least one category
/// </summary>
public bool IsInCategory
{
get { return _isInCategory; }
}
/// <summary>
/// Gets/Sets the name of the information type
/// </summary>
public string Name
{
get { return _name; }
set { _name = value; }
}
/// <summary>
/// Gets/Sets the description of the information type
/// </summary>
public string Description
{
get { return _description; }
set { _name = value; }
}
/// <summary>
/// Gets/Sets the mode of the information type
/// </summary>
public InformationTypeMode Mode
{
get { return _typeMode; }
set { _typeMode = value; }
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,494 +0,0 @@
using System;
using System.IO;
using System.Collections;
using System.Windows.Forms;
using HtmlHelp.ChmDecoding;
namespace HtmlHelp
{
/// <summary>
/// The class <c>TOCItem</c> implements a toc-entry item
/// </summary>
public sealed class TOCItem
{
/// <summary>
/// Constant for standard folder (closed) image index (HH2 image list)
/// </summary>
public const int STD_FOLDER_HH2 = 4;
/// <summary>
/// Constant for standard folder (opened) image index (HH2 image list)
/// </summary>
public const int STD_FOLDER_OPEN_HH2 = 6;
/// <summary>
/// Constant for standard file image index (HH2 image list)
/// </summary>
public const int STD_FILE_HH2 = 16;
/// <summary>
/// Constant for standard folder (closed) image index (HH1 image list)
/// </summary>
public const int STD_FOLDER_HH1 = 0;
/// <summary>
/// Constant for standard folder (opened) image index (HH1 image list)
/// </summary>
public const int STD_FOLDER_OPEN_HH1 = 1;
/// <summary>
/// Constant for standard file image index (HH1 image list)
/// </summary>
public const int STD_FILE_HH1 = 10;
/// <summary>
/// Internal flag specifying the data extraction mode used for this item
/// </summary>
private DataMode _tocMode = DataMode.TextBased;
/// <summary>
/// Internal member storing the offset (only used in binary tocs)
/// </summary>
private int _offset = 0;
/// <summary>
/// Internal member storing the offset of the next item(only used in binary tocs)
/// </summary>
private int _offsetNext = 0;
/// <summary>
/// Internal member storing a merge link.
/// If the target file is in the merged files list of the CHM,
/// this item will be replaced with the target TOC or Topic, if not it will
/// be removed from TOC.
/// </summary>
private string _mergeLink = "";
/// <summary>
/// Internal member storing the toc name
/// </summary>
private string _name = "";
/// <summary>
/// Internal member storing the toc loca (content file)
/// </summary>
private string _local = "";
/// <summary>
/// Internal member storing all associated information type strings
/// </summary>
private ArrayList _infoTypeStrings = new ArrayList();
/// <summary>
/// Internal member storing the associated chm file
/// </summary>
private string _chmFile = "";
/// <summary>
/// Internal member storing the image index
/// </summary>
private int _imageIndex = -1;
/// <summary>
/// Internal member storing the offset of the associated topic entry (for binary tocs)
/// </summary>
private int _topicOffset = -1;
/// <summary>
/// Internal member storing the toc children
/// </summary>
private ArrayList _children = new ArrayList();
/// <summary>
/// Internal member storing the parameter collection
/// </summary>
private Hashtable _otherParams = new Hashtable();
/// <summary>
/// Internal member storing the associated chmfile object
/// </summary>
private CHMFile _associatedFile = null;
/// <summary>
/// Parent item
/// </summary>
private TOCItem _parent=null;
/// <summary>
/// Holds a pointer to the next item in the TOC
/// </summary>
public TOCItem Next=null;
/// <summary>
/// Holds a pointer to the previous item in the TOC
/// </summary>
public TOCItem Prev=null;
/// <summary>
/// Holds a pointer to the TreeNode where this TOC Item is used
/// </summary>
public System.Windows.Forms.TreeNode treeNode=null;
/// <summary>
/// Constructor of the class used during text-based data extraction
/// </summary>
/// <param name="name">name of the item</param>
/// <param name="local">local content file</param>
/// <param name="ImageIndex">image index</param>
/// <param name="chmFile">associated chm file</param>
public TOCItem(string name, string local, int ImageIndex, string chmFile)
{
_tocMode = DataMode.TextBased;
_name = name;
_local = local;
_imageIndex = ImageIndex;
_chmFile = chmFile;
}
/// <summary>
/// Constructor of the class used during binary data extraction
/// </summary>
/// <param name="topicOffset">offset of the associated topic entry</param>
/// <param name="ImageIndex">image index to use</param>
/// <param name="associatedFile">associated chm file</param>
public TOCItem(int topicOffset, int ImageIndex, CHMFile associatedFile)
{
_tocMode = DataMode.Binary;
_associatedFile = associatedFile;
_chmFile = associatedFile.ChmFilePath;
_topicOffset = topicOffset;
_imageIndex = ImageIndex;
}
/// <summary>
/// Standard constructor
/// </summary>
public TOCItem()
{
}
#region Data dumping
/// <summary>
/// Dump the class data to a binary writer
/// </summary>
/// <param name="writer">writer to write the data</param>
/// <param name="writeFilename">true if the chmfile name should be written</param>
internal void Dump(ref BinaryWriter writer, bool writeFilename)
{
writer.Write((int)_tocMode);
writer.Write(_topicOffset);
writer.Write(_name);
if((_tocMode == DataMode.TextBased)||(_topicOffset<0))
{
writer.Write(_local);
}
writer.Write(_imageIndex);
writer.Write(_mergeLink);
if(writeFilename)
writer.Write(_chmFile);
writer.Write(_infoTypeStrings.Count);
for(int i=0; i<_infoTypeStrings.Count; i++)
writer.Write( (_infoTypeStrings[i]).ToString() );
writer.Write(_children.Count);
for(int i=0; i<_children.Count; i++)
{
TOCItem child = ((TOCItem)(_children[i]));
child.Dump(ref writer, writeFilename);
}
}
/// <summary>
/// Dump the class data to a binary writer
/// </summary>
/// <param name="writer">writer to write the data</param>
internal void Dump(ref BinaryWriter writer)
{
Dump(ref writer, false);
}
/// <summary>
/// Reads the object data from a dump store
/// </summary>
/// <param name="reader">reader to read the data</param>
/// <param name="readFilename">true if the chmfile name should be read</param>
internal void ReadDump(ref BinaryReader reader, bool readFilename)
{
int i=0;
_tocMode = (DataMode)reader.ReadInt32();
_topicOffset = reader.ReadInt32();
_name = reader.ReadString();
if((_tocMode == DataMode.TextBased)||(_topicOffset<0))
{
_local = reader.ReadString();
}
_imageIndex = reader.ReadInt32();
_mergeLink = reader.ReadString();
if(readFilename)
_chmFile = reader.ReadString();
int nCnt = reader.ReadInt32();
for(i=0; i<nCnt; i++)
{
string sIT = reader.ReadString();
_infoTypeStrings.Add(sIT);
}
nCnt = reader.ReadInt32();
if(_associatedFile != null)
_chmFile = _associatedFile.ChmFilePath;
for(i=0; i<nCnt; i++)
{
TOCItem child = new TOCItem();
child.AssociatedFile = _associatedFile;
child.ReadDump(ref reader, readFilename);
if(_associatedFile != null)
child.ChmFile = _associatedFile.ChmFilePath;
else if(!readFilename)
child.ChmFile = _chmFile;
child.Parent = this;
_children.Add(child);
if(child.MergeLink.Length > 0)
_associatedFile.MergLinks.Add(child);
}
}
/// <summary>
/// Reads the object data from a dump store
/// </summary>
/// <param name="reader">reader to read the data</param>
internal void ReadDump(ref BinaryReader reader)
{
ReadDump(ref reader, false);
}
#endregion
/// <summary>
/// Gets/Sets the data extraction mode with which this item was created.
/// </summary>
internal DataMode TocMode
{
get { return _tocMode; }
set { _tocMode = value; }
}
/// <summary>
/// Gets/Sets the offset of the associated topic entry
/// </summary>
internal int TopicOffset
{
get { return _topicOffset; }
set { _topicOffset = value; }
}
/// <summary>
/// Gets/Sets the associated CHMFile instance
/// </summary>
internal CHMFile AssociatedFile
{
get { return _associatedFile; }
set
{
_associatedFile = value;
}
}
/// <summary>
/// Gets/Sets the offset of the item.
/// </summary>
/// <remarks>Only used in binary tocs</remarks>
internal int Offset
{
get { return _offset; }
set { _offset = value; }
}
/// <summary>
/// Gets/Sets the offset of the next item.
/// </summary>
/// <remarks>Only used in binary tocs</remarks>
internal int OffsetNext
{
get { return _offsetNext; }
set { _offsetNext = value; }
}
/// <summary>
/// Gets the ArrayList which holds all information types/categories this item is associated
/// </summary>
internal ArrayList InfoTypeStrings
{
get { return _infoTypeStrings; }
}
/// <summary>
/// Gets/Sets the parent of this item
/// </summary>
public TOCItem Parent
{
get { return _parent; }
set { _parent = value; }
}
/// <summary>
/// Gets/Sets the mergelink for this item.
/// <b>You should not set the mergedlink by your own !</b>
/// This is only for loading merged CHMs.
/// </summary>
public string MergeLink
{
get { return _mergeLink; }
set { _mergeLink = value; }
}
/// <summary>
/// Gets/Sets the name of the item
/// </summary>
public string Name
{
get
{
if(_mergeLink.Length > 0)
return "";
if(_name.Length <= 0)
{
if((_tocMode == DataMode.Binary )&&(_associatedFile!=null))
{
if( _topicOffset >= 0)
{
TopicEntry te = (TopicEntry) (_associatedFile.TopicsFile[_topicOffset]);
if(te != null)
{
return te.Title;
}
}
}
}
return _name;
}
set
{
_name = value;
}
}
/// <summary>
/// Gets/Sets the local of the item
/// </summary>
public string Local
{
get
{
if(_mergeLink.Length > 0)
return "";
if(_local.Length <= 0)
{
if((_tocMode == DataMode.Binary )&&(_associatedFile!=null))
{
if( _topicOffset >= 0)
{
TopicEntry te = (TopicEntry) (_associatedFile.TopicsFile[_topicOffset]);
if(te != null)
{
return te.Locale;
}
}
}
}
return _local;
}
set { _local = value; }
}
/// <summary>
/// Gets/Sets the chm file
/// </summary>
public string ChmFile
{
get
{
if(_associatedFile!=null)
return _associatedFile.ChmFilePath;
return _chmFile;
}
set { _chmFile = value; }
}
/// <summary>
/// Gets the url for the webbrowser for this file
/// </summary>
public string Url
{
get
{
string sL = Local;
if( (sL.ToLower().IndexOf("http://") >= 0) ||
(sL.ToLower().IndexOf("https://") >= 0) ||
(sL.ToLower().IndexOf("mailto:") >= 0) ||
(sL.ToLower().IndexOf("ftp://") >= 0) ||
(sL.ToLower().IndexOf("ms-its:") >= 0))
return sL;
return HtmlHelpSystem.UrlPrefix + ChmFile + "::/" + sL;
}
}
/// <summary>
/// Gets/Sets the image index of the item
/// </summary>
/// <remarks>Set this to -1 for a default icon</remarks>
public int ImageIndex
{
get
{
if( _imageIndex == -1)
{
int nFolderAdd = 0;
if((_associatedFile != null) && (_associatedFile.ImageTypeFolder))
{
// get the value which should be added, to display folders instead of books
if(HtmlHelpSystem.UseHH2TreePics)
nFolderAdd = 8;
else
nFolderAdd = 4;
}
if( _children.Count > 0)
return (HtmlHelpSystem.UseHH2TreePics ? (STD_FOLDER_HH2+nFolderAdd) : (STD_FOLDER_HH1+nFolderAdd));
return (HtmlHelpSystem.UseHH2TreePics ? STD_FILE_HH2 : STD_FILE_HH1);
}
return _imageIndex;
}
set { _imageIndex = value; }
}
/// <summary>
/// Gets/Sets the children of this item.
/// </summary>
/// <remarks>Each entry in the ArrayList is of type TOCItem</remarks>
public ArrayList Children
{
get { return _children; }
set { _children = value; }
}
/// <summary>
/// Gets the internal hashtable storing all params
/// </summary>
public Hashtable Params
{
get { return _otherParams; }
}
}
}

View File

@@ -1,198 +0,0 @@
using System;
using System.Diagnostics;
using System.Collections;
using HtmlHelp.ChmDecoding;
namespace HtmlHelp
{
/// <summary>
/// The class <c>TableOfContents</c> holds the TOC of the htmlhelp system class.
/// </summary>
public class TableOfContents
{
private ArrayList _toc = new ArrayList();
/// <summary>
/// Standard constructor
/// </summary>
public TableOfContents()
{
}
/// <summary>
/// Constructor of the class
/// </summary>
/// <param name="toc"></param>
public TableOfContents(ArrayList toc)
{
_toc = toc;
}
/// <summary>
/// Gets the internal stored table of contents
/// </summary>
public ArrayList TOC
{
get { return _toc; }
}
/// <summary>
/// Clears the current toc
/// </summary>
public void Clear()
{
if(_toc!=null)
_toc.Clear();
}
/// <summary>
/// Gets the number of topics in the toc
/// </summary>
/// <returns>Returns the number of topics in the toc</returns>
public int Count()
{
if(_toc!=null)
return _toc.Count;
else
return 0;
}
/// <summary>
/// Merges the <c>arrToC</c> list to the one in this instance
/// </summary>
/// <param name="arrToC">the toc list which should be merged with the current one</param>
internal void MergeToC( ArrayList arrToC )
{
if(_toc==null)
_toc = new ArrayList();
MergeToC(_toc, arrToC, null);
}
/// <summary>
/// Merges the <c>arrToC</c> list to the one in this instance (called if merged files
/// were found in a CHM)
/// </summary>
/// <param name="arrToC">the toc list which should be merged with the current one</param>
/// <param name="openFiles">An arraylist of CHMFile instances.</param>
internal void MergeToC( ArrayList arrToC, ArrayList openFiles )
{
if(_toc==null)
_toc = new ArrayList();
MergeToC(_toc, arrToC, openFiles);
}
/// <summary>
/// Internal method for recursive toc merging
/// </summary>
/// <param name="globalLevel">level of global toc</param>
/// <param name="localLevel">level of local toc</param>
/// <param name="openFiles">An arraylist of CHMFile instances.</param>
private void MergeToC( ArrayList globalLevel, ArrayList localLevel, ArrayList openFiles )
{
foreach( TOCItem curItem in localLevel)
{
// if it is a part of the merged-links, we have to do nothing,
// because the method HtmlHelpSystem.RecalculateMergeLinks() has already
// placed this item at its correct position.
if(!IsMergedItem(curItem.Name, curItem.Local, openFiles))
{
TOCItem globalItem = ContainsToC(globalLevel, curItem.Name);
if(globalItem == null)
{
// the global toc doesn't have a topic with this name
// so we need to add the complete toc node to the global toc
globalLevel.Add( curItem );
}
else
{
// the global toc contains the current topic
// advance to the next level
if( (globalItem.Local.Length <= 0) && (curItem.Local.Length > 0) )
{
// set the associated url
globalItem.Local = curItem.Local;
globalItem.ChmFile = curItem.ChmFile;
}
MergeToC(globalItem.Children, curItem.Children);
}
}
}
}
/// <summary>
/// Checks if the item is part of the merged-links
/// </summary>
/// <param name="name">name of the topic</param>
/// <param name="local">local of the topic</param>
/// <param name="openFiles">An arraylist of CHMFile instances.</param>
/// <returns>Returns true if this item is part of the merged-links</returns>
private bool IsMergedItem(string name, string local, ArrayList openFiles)
{
if(openFiles==null)
return false;
foreach(CHMFile curFile in openFiles)
{
foreach(TOCItem curItem in curFile.MergLinks)
if( (curItem.Name == name) && (curItem.Local == local) )
return true;
}
return false;
}
/// <summary>
/// Checks if a topicname exists in a SINGLE toc level
/// </summary>
/// <param name="arrToC">toc list</param>
/// <param name="Topic">topic to search</param>
/// <returns>Returns the topic item if found, otherwise null</returns>
private TOCItem ContainsToC(ArrayList arrToC, string Topic)
{
foreach(TOCItem curItem in arrToC)
{
if(curItem.Name == Topic)
return curItem;
}
return null;
}
/// <summary>
/// Searches the table of contents for a special topic
/// </summary>
/// <param name="topic">topic to search</param>
/// <returns>Returns an instance of TOCItem if found, otherwise null</returns>
public TOCItem SearchTopic(string topic)
{
return SearchTopic(topic, _toc);
}
/// <summary>
/// Internal recursive tree search
/// </summary>
/// <param name="topic">topic to search</param>
/// <param name="searchIn">tree level list to look in</param>
/// <returns>Returns an instance of TOCItem if found, otherwise null</returns>
private TOCItem SearchTopic(string topic, ArrayList searchIn)
{
foreach(TOCItem curItem in searchIn)
{
if(curItem.Name.ToLower() == topic.ToLower() )
return curItem;
if(curItem.Children.Count>0)
{
TOCItem nf = SearchTopic(topic, curItem.Children);
if(nf != null)
return nf;
}
}
return null;
}
}
}

View File

@@ -1,32 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following
// attributes.
//
// change them to the information which is associated with the assembly
// you compile.
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// The assembly version has following format :
//
// Major.Minor.Build.Revision
//
// You can specify all values by your own or you can build default build and revision
// numbers with the '*' character (the default):
[assembly: AssemblyVersion("1.0.*")]
// The following attributes specify the key for the sign of your assembly. See the
// .NET Framework documentation for more information about signing.
// This is not required, if you don't want signing let these attributes like they're.
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]

View File

@@ -1,200 +0,0 @@
// Adler32.cs - Computes Adler32 data checksum of a data stream
// Copyright (C) 2001 Mike Krueger
//
// This file was translated from java, it was part of the GNU Classpath
// Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
//
// 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.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
using System;
namespace ICSharpCode.SharpZipLib.Checksums
{
/// <summary>
/// Computes Adler32 checksum for a stream of data. An Adler32
/// checksum is not as reliable as a CRC32 checksum, but a lot faster to
/// compute.
///
/// The specification for Adler32 may be found in RFC 1950.
/// ZLIB Compressed Data Format Specification version 3.3)
///
///
/// From that document:
///
/// "ADLER32 (Adler-32 checksum)
/// This contains a checksum value of the uncompressed data
/// (excluding any dictionary data) computed according to Adler-32
/// algorithm. This algorithm is a 32-bit extension and improvement
/// of the Fletcher algorithm, used in the ITU-T X.224 / ISO 8073
/// standard.
///
/// Adler-32 is composed of two sums accumulated per byte: s1 is
/// the sum of all bytes, s2 is the sum of all s1 values. Both sums
/// are done modulo 65521. s1 is initialized to 1, s2 to zero. The
/// Adler-32 checksum is stored as s2*65536 + s1 in most-
/// significant-byte first (network) order."
///
/// "8.2. The Adler-32 algorithm
///
/// The Adler-32 algorithm is much faster than the CRC32 algorithm yet
/// still provides an extremely low probability of undetected errors.
///
/// The modulo on unsigned long accumulators can be delayed for 5552
/// bytes, so the modulo operation time is negligible. If the bytes
/// are a, b, c, the second sum is 3a + 2b + c + 3, and so is position
/// and order sensitive, unlike the first sum, which is just a
/// checksum. That 65521 is prime is important to avoid a possible
/// large class of two-byte errors that leave the check unchanged.
/// (The Fletcher checksum uses 255, which is not prime and which also
/// makes the Fletcher check insensitive to single byte changes 0 -
/// 255.)
///
/// The sum s1 is initialized to 1 instead of zero to make the length
/// of the sequence part of s2, so that the length does not have to be
/// checked separately. (Any sequence of zeroes has a Fletcher
/// checksum of zero.)"
/// </summary>
/// <see cref="ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream"/>
/// <see cref="ICSharpCode.SharpZipLib.Zip.Compression.Streams.DeflaterOutputStream"/>
public sealed class Adler32 : IChecksum
{
/// <summary>
/// largest prime smaller than 65536
/// </summary>
readonly static uint BASE = 65521;
uint checksum;
/// <summary>
/// Returns the Adler32 data checksum computed so far.
/// </summary>
public long Value {
get {
return checksum;
}
}
/// <summary>
/// Creates a new instance of the <code>Adler32</code> class.
/// The checksum starts off with a value of 1.
/// </summary>
public Adler32()
{
Reset();
}
/// <summary>
/// Resets the Adler32 checksum to the initial value.
/// </summary>
public void Reset()
{
checksum = 1; //Initialize to 1
}
/// <summary>
/// Updates the checksum with the byte b.
/// </summary>
/// <param name="bval">
/// the data value to add. The high byte of the int is ignored.
/// </param>
public void Update(int bval)
{
//We could make a length 1 byte array and call update again, but I
//would rather not have that overhead
uint s1 = checksum & 0xFFFF;
uint s2 = checksum >> 16;
s1 = (s1 + ((uint)bval & 0xFF)) % BASE;
s2 = (s1 + s2) % BASE;
checksum = (s2 << 16) + s1;
}
/// <summary>
/// Updates the checksum with the bytes taken from the array.
/// </summary>
/// <param name="buffer">
/// buffer an array of bytes
/// </param>
public void Update(byte[] buffer)
{
Update(buffer, 0, buffer.Length);
}
/// <summary>
/// Updates the checksum with the bytes taken from the array.
/// </summary>
/// <param name="buf">
/// an array of bytes
/// </param>
/// <param name="off">
/// the start of the data used for this update
/// </param>
/// <param name="len">
/// the number of bytes to use for this update
/// </param>
public void Update(byte[] buf, int off, int len)
{
if (buf == null) {
throw new ArgumentNullException("buf");
}
if (off < 0 || len < 0 || off + len > buf.Length) {
throw new ArgumentOutOfRangeException();
}
//(By Per Bothner)
uint s1 = checksum & 0xFFFF;
uint s2 = checksum >> 16;
while (len > 0) {
// We can defer the modulo operation:
// s1 maximally grows from 65521 to 65521 + 255 * 3800
// s2 maximally grows by 3800 * median(s1) = 2090079800 < 2^31
int n = 3800;
if (n > len) {
n = len;
}
len -= n;
while (--n >= 0) {
s1 = s1 + (uint)(buf[off++] & 0xFF);
s2 = s2 + s1;
}
s1 %= BASE;
s2 %= BASE;
}
checksum = (s2 << 16) | s1;
}
}
}

View File

@@ -1,211 +0,0 @@
// CRC32.cs - Computes CRC32 data checksum of a data stream
// Copyright (C) 2001 Mike Krueger
//
// This file was translated from java, it was part of the GNU Classpath
// Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
//
// 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.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
using System;
namespace ICSharpCode.SharpZipLib.Checksums
{
/// <summary>
/// Generate a table for a byte-wise 32-bit CRC calculation on the polynomial:
/// x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1.
///
/// Polynomials over GF(2) are represented in binary, one bit per coefficient,
/// with the lowest powers in the most significant bit. Then adding polynomials
/// is just exclusive-or, and multiplying a polynomial by x is a right shift by
/// one. If we call the above polynomial p, and represent a byte as the
/// polynomial q, also with the lowest power in the most significant bit (so the
/// byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p,
/// where a mod b means the remainder after dividing a by b.
///
/// This calculation is done using the shift-register method of multiplying and
/// taking the remainder. The register is initialized to zero, and for each
/// incoming bit, x^32 is added mod p to the register if the bit is a one (where
/// x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by
/// x (which is shifting right by one and adding x^32 mod p if the bit shifted
/// out is a one). We start with the highest power (least significant bit) of
/// q and repeat for all eight bits of q.
///
/// The table is simply the CRC of all possible eight bit values. This is all
/// the information needed to generate CRC's on data a byte at a time for all
/// combinations of CRC register values and incoming bytes.
/// </summary>
public sealed class Crc32 : IChecksum
{
readonly static uint CrcSeed = 0xFFFFFFFF;
readonly static uint[] CrcTable = new uint[] {
0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419,
0x706AF48F, 0xE963A535, 0x9E6495A3, 0x0EDB8832, 0x79DCB8A4,
0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07,
0x90BF1D91, 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,
0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, 0x136C9856,
0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9,
0xFA0F3D63, 0x8D080DF5, 0x3B6E20C8, 0x4C69105E, 0xD56041E4,
0xA2677172, 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,
0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3,
0x45DF5C75, 0xDCD60DCF, 0xABD13D59, 0x26D930AC, 0x51DE003A,
0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423, 0xCFBA9599,
0xB8BDA50F, 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,
0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, 0x76DC4190,
0x01DB7106, 0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F,
0x9FBFE4A5, 0xE8B8D433, 0x7807C9A2, 0x0F00F934, 0x9609A88E,
0xE10E9818, 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,
0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, 0x6C0695ED,
0x1B01A57B, 0x8208F4C1, 0xF50FC457, 0x65B0D9C6, 0x12B7E950,
0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3,
0xFBD44C65, 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,
0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, 0x4369E96A,
0x346ED9FC, 0xAD678846, 0xDA60B8D0, 0x44042D73, 0x33031DE5,
0xAA0A4C5F, 0xDD0D7CC9, 0x5005713C, 0x270241AA, 0xBE0B1010,
0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,
0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17,
0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, 0xEDB88320, 0x9ABFB3B6,
0x03B6E20C, 0x74B1D29A, 0xEAD54739, 0x9DD277AF, 0x04DB2615,
0x73DC1683, 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,
0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, 0xF00F9344,
0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB,
0x196C3671, 0x6E6B06E7, 0xFED41B76, 0x89D32BE0, 0x10DA7A5A,
0x67DD4ACC, 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,
0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1,
0xA6BC5767, 0x3FB506DD, 0x48B2364B, 0xD80D2BDA, 0xAF0A1B4C,
0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55, 0x316E8EEF,
0x4669BE79, 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,
0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, 0xC5BA3BBE,
0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31,
0x2CD99E8B, 0x5BDEAE1D, 0x9B64C2B0, 0xEC63F226, 0x756AA39C,
0x026D930A, 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,
0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, 0x92D28E9B,
0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, 0x86D3D2D4, 0xF1D4E242,
0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1,
0x18B74777, 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,
0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, 0xA00AE278,
0xD70DD2EE, 0x4E048354, 0x3903B3C2, 0xA7672661, 0xD06016F7,
0x4969474D, 0x3E6E77DB, 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66,
0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605,
0xCDD70693, 0x54DE5729, 0x23D967BF, 0xB3667A2E, 0xC4614AB8,
0x5D681B02, 0x2A6F2B94, 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B,
0x2D02EF8D
};
internal static uint ComputeCrc32(uint oldCrc, byte bval)
{
return (uint)(Crc32.CrcTable[(oldCrc ^ bval) & 0xFF] ^ (oldCrc >> 8));
}
/// <summary>
/// The crc data checksum so far.
/// </summary>
uint crc = 0;
/// <summary>
/// Returns the CRC32 data checksum computed so far.
/// </summary>
public long Value {
get {
return (long)crc;
}
set {
crc = (uint)value;
}
}
/// <summary>
/// Resets the CRC32 data checksum as if no update was ever called.
/// </summary>
public void Reset()
{
crc = 0;
}
/// <summary>
/// Updates the checksum with the int bval.
/// </summary>
/// <param name = "bval">
/// the byte is taken as the lower 8 bits of bval
/// </param>
public void Update(int bval)
{
crc ^= CrcSeed;
crc = CrcTable[(crc ^ bval) & 0xFF] ^ (crc >> 8);
crc ^= CrcSeed;
}
/// <summary>
/// Updates the checksum with the bytes taken from the array.
/// </summary>
/// <param name="buffer">
/// buffer an array of bytes
/// </param>
public void Update(byte[] buffer)
{
Update(buffer, 0, buffer.Length);
}
/// <summary>
/// Adds the byte array to the data checksum.
/// </summary>
/// <param name = "buf">
/// the buffer which contains the data
/// </param>
/// <param name = "off">
/// the offset in the buffer where the data starts
/// </param>
/// <param name = "len">
/// the length of the data
/// </param>
public void Update(byte[] buf, int off, int len)
{
if (buf == null) {
throw new ArgumentNullException("buf");
}
if (off < 0 || len < 0 || off + len > buf.Length) {
throw new ArgumentOutOfRangeException();
}
crc ^= CrcSeed;
while (--len >= 0) {
crc = CrcTable[(crc ^ buf[off++]) & 0xFF] ^ (crc >> 8);
}
crc ^= CrcSeed;
}
}
}

View File

@@ -1,93 +0,0 @@
// IChecksum.cs - Interface to compute a data checksum
// Copyright (C) 2001 Mike Krueger
//
// This file was translated from java, it was part of the GNU Classpath
// Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
//
// 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.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
namespace ICSharpCode.SharpZipLib.Checksums
{
/// <summary>
/// Interface to compute a data checksum used by checked input/output streams.
/// A data checksum can be updated by one byte or with a byte array. After each
/// update the value of the current checksum can be returned by calling
/// <code>getValue</code>. The complete checksum object can also be reset
/// so it can be used again with new data.
/// </summary>
public interface IChecksum
{
/// <summary>
/// Returns the data checksum computed so far.
/// </summary>
long Value
{
get;
}
/// <summary>
/// Resets the data checksum as if no update was ever called.
/// </summary>
void Reset();
/// <summary>
/// Adds one byte to the data checksum.
/// </summary>
/// <param name = "bval">
/// the data value to add. The high byte of the int is ignored.
/// </param>
void Update(int bval);
/// <summary>
/// Updates the data checksum with the bytes taken from the array.
/// </summary>
/// <param name="buffer">
/// buffer an array of bytes
/// </param>
void Update(byte[] buffer);
/// <summary>
/// Adds the byte array to the data checksum.
/// </summary>
/// <param name = "buf">
/// the buffer which contains the data
/// </param>
/// <param name = "off">
/// the offset in the buffer where the data starts
/// </param>
/// <param name = "len">
/// the length of the data
/// </param>
void Update(byte[] buf, int off, int len);
}
}

View File

@@ -1,159 +0,0 @@
// StrangeCRC.cs - computes a crc used in the bziplib ... I don't think that
// this is the 'standard' crc, please correct me, if I'm wrong
// Copyright (C) 2001 Mike Krueger
//
// This file was translated from java, it was part of the GNU Classpath
// Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
//
// 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.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
using System;
namespace ICSharpCode.SharpZipLib.Checksums
{
public class StrangeCRC : IChecksum
{
readonly static uint[] crc32Table = {
0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9,
0x130476dc, 0x17c56b6b, 0x1a864db2, 0x1e475005,
0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61,
0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd,
0x4c11db70, 0x48d0c6c7, 0x4593e01e, 0x4152fda9,
0x5f15adac, 0x5bd4b01b, 0x569796c2, 0x52568b75,
0x6a1936c8, 0x6ed82b7f, 0x639b0da6, 0x675a1011,
0x791d4014, 0x7ddc5da3, 0x709f7b7a, 0x745e66cd,
0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039,
0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5,
0xbe2b5b58, 0xbaea46ef, 0xb7a96036, 0xb3687d81,
0xad2f2d84, 0xa9ee3033, 0xa4ad16ea, 0xa06c0b5d,
0xd4326d90, 0xd0f37027, 0xddb056fe, 0xd9714b49,
0xc7361b4c, 0xc3f706fb, 0xceb42022, 0xca753d95,
0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1,
0xe13ef6f4, 0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d,
0x34867077, 0x30476dc0, 0x3d044b19, 0x39c556ae,
0x278206ab, 0x23431b1c, 0x2e003dc5, 0x2ac12072,
0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16,
0x018aeb13, 0x054bf6a4, 0x0808d07d, 0x0cc9cdca,
0x7897ab07, 0x7c56b6b0, 0x71159069, 0x75d48dde,
0x6b93dddb, 0x6f52c06c, 0x6211e6b5, 0x66d0fb02,
0x5e9f46bf, 0x5a5e5b08, 0x571d7dd1, 0x53dc6066,
0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba,
0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e,
0xbfa1b04b, 0xbb60adfc, 0xb6238b25, 0xb2e29692,
0x8aad2b2f, 0x8e6c3698, 0x832f1041, 0x87ee0df6,
0x99a95df3, 0x9d684044, 0x902b669d, 0x94ea7b2a,
0xe0b41de7, 0xe4750050, 0xe9362689, 0xedf73b3e,
0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2,
0xc6bcf05f, 0xc27dede8, 0xcf3ecb31, 0xcbffd686,
0xd5b88683, 0xd1799b34, 0xdc3abded, 0xd8fba05a,
0x690ce0ee, 0x6dcdfd59, 0x608edb80, 0x644fc637,
0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb,
0x4f040d56, 0x4bc510e1, 0x46863638, 0x42472b8f,
0x5c007b8a, 0x58c1663d, 0x558240e4, 0x51435d53,
0x251d3b9e, 0x21dc2629, 0x2c9f00f0, 0x285e1d47,
0x36194d42, 0x32d850f5, 0x3f9b762c, 0x3b5a6b9b,
0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff,
0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623,
0xf12f560e, 0xf5ee4bb9, 0xf8ad6d60, 0xfc6c70d7,
0xe22b20d2, 0xe6ea3d65, 0xeba91bbc, 0xef68060b,
0xd727bbb6, 0xd3e6a601, 0xdea580d8, 0xda649d6f,
0xc423cd6a, 0xc0e2d0dd, 0xcda1f604, 0xc960ebb3,
0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7,
0xae3afba2, 0xaafbe615, 0xa7b8c0cc, 0xa379dd7b,
0x9b3660c6, 0x9ff77d71, 0x92b45ba8, 0x9675461f,
0x8832161a, 0x8cf30bad, 0x81b02d74, 0x857130c3,
0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640,
0x4e8ee645, 0x4a4ffbf2, 0x470cdd2b, 0x43cdc09c,
0x7b827d21, 0x7f436096, 0x7200464f, 0x76c15bf8,
0x68860bfd, 0x6c47164a, 0x61043093, 0x65c52d24,
0x119b4be9, 0x155a565e, 0x18197087, 0x1cd86d30,
0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec,
0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088,
0x2497d08d, 0x2056cd3a, 0x2d15ebe3, 0x29d4f654,
0xc5a92679, 0xc1683bce, 0xcc2b1d17, 0xc8ea00a0,
0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb, 0xdbee767c,
0xe3a1cbc1, 0xe760d676, 0xea23f0af, 0xeee2ed18,
0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4,
0x89b8fd09, 0x8d79e0be, 0x803ac667, 0x84fbdbd0,
0x9abc8bd5, 0x9e7d9662, 0x933eb0bb, 0x97ffad0c,
0xafb010b1, 0xab710d06, 0xa6322bdf, 0xa2f33668,
0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4
};
int globalCrc;
public StrangeCRC()
{
Reset();
}
public void Reset()
{
globalCrc = -1;
}
public long Value {
get {
return ~globalCrc;
}
}
public void Update(int inCh)
{
int temp = (globalCrc >> 24) ^ inCh;
if (temp < 0) {
temp = 256 + temp;
}
globalCrc = (int)((globalCrc << 8) ^ crc32Table[temp]);
}
public void Update(byte[] buf)
{
Update(buf, 0, buf.Length);
}
public void Update(byte[] buf, int off, int len)
{
if (buf == null) {
throw new ArgumentNullException("buf");
}
if (off < 0 || len < 0 || off + len > buf.Length) {
throw new ArgumentOutOfRangeException();
}
for (int i = 0; i < len; ++i) {
Update(buf[off++]);
}
}
}
}

View File

@@ -1,16 +0,0 @@
<Combine fileversion="1.0" name="Compression" description="">
<StartMode startupentry="Compression" single="True">
<Execute entry="Compression" type="None" />
</StartMode>
<Entries>
<Entry filename=".\.\Compression.prjx" />
</Entries>
<Configurations active="Debug">
<Configuration name="Release">
<Entry name="Compression" configurationname="Debug" build="False" />
</Configuration>
<Configuration name="Debug">
<Entry name="Compression" configurationname="Debug" build="False" />
</Configuration>
</Configurations>
</Combine>

View File

@@ -1,65 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{E32307F1-623A-4E62-826F-56CDD4B23A54}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Compression</RootNamespace>
<AssemblyName>Compression</AssemblyName>
<StartupObject>
</StartupObject>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="Checksums\Adler32.cs" />
<Compile Include="Checksums\CRC32.cs" />
<Compile Include="Checksums\IChecksum.cs" />
<Compile Include="Checksums\StrangeCRC.cs" />
<Compile Include="Deflater.cs" />
<Compile Include="DeflaterConstants.cs" />
<Compile Include="DeflaterEngine.cs" />
<Compile Include="DeflaterHuffman.cs" />
<Compile Include="DeflaterPending.cs" />
<Compile Include="Inflater.cs" />
<Compile Include="InflaterDynHeader.cs" />
<Compile Include="InflaterHuffmanTree.cs" />
<Compile Include="PendingBuffer.cs" />
<Compile Include="Streams\DeflaterOutputStream.cs" />
<Compile Include="Streams\InflaterInputStream.cs" />
<Compile Include="Streams\OutputWindow.cs" />
<Compile Include="Streams\StreamManipulator.cs" />
<Compile Include="ZipException.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
</ItemGroup>
</Project>

View File

@@ -1,45 +0,0 @@
<Project name="Compression" standardNamespace="Compression" description="" newfilesearch="None" enableviewstate="True" version="1.1" projecttype="C#">
<Contents>
<File name=".\AssemblyInfo.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\ZipException.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\Deflater.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\DeflaterConstants.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\DeflaterEngine.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\DeflaterHuffman.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\DeflaterPending.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\Inflater.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\InflaterDynHeader.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\InflaterHuffmanTree.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\PendingBuffer.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\Checksums" subtype="Directory" buildaction="Compile" dependson="" data="" />
<File name=".\Checksums\StrangeCRC.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\Checksums\Adler32.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\Checksums\CRC32.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\Checksums\IChecksum.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\Streams" subtype="Directory" buildaction="Compile" dependson="" data="" />
<File name=".\Streams\StreamManipulator.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\Streams\DeflaterOutputStream.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\Streams\InflaterInputStream.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\Streams\OutputWindow.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
<File name=".\Default.build" subtype="Code" buildaction="Nothing" dependson="" data="" />
</Contents>
<References />
<DeploymentInformation target="" script="" strategy="File" />
<Configuration runwithwarnings="True" name="Debug">
<CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="True" optimize="False" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="Library" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
<Execution commandlineparameters="" consolepause="False" />
<Output directory="..\bin\Debug" assembly="Compression" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
</Configuration>
<Configurations active="Debug">
<Configuration runwithwarnings="True" name="Debug">
<CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="True" optimize="False" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="Library" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
<Execution commandlineparameters="" consolepause="False" />
<Output directory="..\bin\Debug" assembly="Compression" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
</Configuration>
<Configuration runwithwarnings="True" name="Release">
<CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="False" optimize="True" unsafecodeallowed="False" generateoverflowchecks="False" mainclass="" target="Library" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
<Execution commandlineparameters="" consolepause="False" />
<Output directory="..\bin\Release" assembly="Compression" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
</Configuration>
</Configurations>
</Project>

View File

@@ -1,20 +0,0 @@
<?xml version="1.0"?>
<project name="Compression" default="build">
<property name="output.dir" value="..\bin" />
<target name="build" description="Build component">
<mkdir dir="${output.dir}" />
<csc target="library"
output="${output.dir}\Compression.dll"
optimize="true"
debug="true"
doc="${output.dir}\Compression.xml"
warninglevel="0">
<sources>
<include name="**/*.cs" />
</sources>
</csc>
</target>
</project>

View File

@@ -1,542 +0,0 @@
// Deflater.cs
// Copyright (C) 2001 Mike Krueger
//
// This file was translated from java, it was part of the GNU Classpath
// Copyright (C) 2001 Free Software Foundation, Inc.
//
// 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.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
using System;
namespace ICSharpCode.SharpZipLib.Zip.Compression
{
/// <summary>
/// This is the Deflater class. The deflater class compresses input
/// with the deflate algorithm described in RFC 1951. It has several
/// compression levels and three different strategies described below.
///
/// This class is <i>not</i> thread safe. This is inherent in the API, due
/// to the split of deflate and setInput.
///
/// author of the original java version : Jochen Hoenicke
/// </summary>
public class Deflater
{
/// <summary>
/// The best and slowest compression level. This tries to find very
/// long and distant string repetitions.
/// </summary>
public static int BEST_COMPRESSION = 9;
/// <summary>
/// The worst but fastest compression level.
/// </summary>
public static int BEST_SPEED = 1;
/// <summary>
/// The default compression level.
/// </summary>
public static int DEFAULT_COMPRESSION = -1;
/// <summary>
/// This level won't compress at all but output uncompressed blocks.
/// </summary>
public static int NO_COMPRESSION = 0;
/// <summary>
/// The compression method. This is the only method supported so far.
/// There is no need to use this constant at all.
/// </summary>
public static int DEFLATED = 8;
/*
* The Deflater can do the following state transitions:
*
* (1) -> INIT_STATE ----> INIT_FINISHING_STATE ---.
* / | (2) (5) |
* / v (5) |
* (3)| SETDICT_STATE ---> SETDICT_FINISHING_STATE |(3)
* \ | (3) | ,-------'
* | | | (3) /
* v v (5) v v
* (1) -> BUSY_STATE ----> FINISHING_STATE
* | (6)
* v
* FINISHED_STATE
* \_____________________________________/
* | (7)
* v
* CLOSED_STATE
*
* (1) If we should produce a header we start in INIT_STATE, otherwise
* we start in BUSY_STATE.
* (2) A dictionary may be set only when we are in INIT_STATE, then
* we change the state as indicated.
* (3) Whether a dictionary is set or not, on the first call of deflate
* we change to BUSY_STATE.
* (4) -- intentionally left blank -- :)
* (5) FINISHING_STATE is entered, when flush() is called to indicate that
* there is no more INPUT. There are also states indicating, that
* the header wasn't written yet.
* (6) FINISHED_STATE is entered, when everything has been flushed to the
* internal pending output buffer.
* (7) At any time (7)
*
*/
private static int IS_SETDICT = 0x01;
private static int IS_FLUSHING = 0x04;
private static int IS_FINISHING = 0x08;
private static int INIT_STATE = 0x00;
private static int SETDICT_STATE = 0x01;
// private static int INIT_FINISHING_STATE = 0x08;
// private static int SETDICT_FINISHING_STATE = 0x09;
private static int BUSY_STATE = 0x10;
private static int FLUSHING_STATE = 0x14;
private static int FINISHING_STATE = 0x1c;
private static int FINISHED_STATE = 0x1e;
private static int CLOSED_STATE = 0x7f;
/// <summary>
/// Compression level.
/// </summary>
private int level;
/// <summary>
/// should we include a header.
/// </summary>
private bool noHeader;
// /// <summary>
// /// Compression strategy.
// /// </summary>
// private int strategy;
/// <summary>
/// The current state.
/// </summary>
private int state;
/// <summary>
/// The total bytes of output written.
/// </summary>
private int totalOut;
/// <summary>
/// The pending output.
/// </summary>
private DeflaterPending pending;
/// <summary>
/// The deflater engine.
/// </summary>
private DeflaterEngine engine;
/// <summary>
/// Creates a new deflater with default compression level.
/// </summary>
public Deflater() : this(DEFAULT_COMPRESSION, false)
{
}
/// <summary>
/// Creates a new deflater with given compression level.
/// </summary>
/// <param name="lvl">
/// the compression level, a value between NO_COMPRESSION
/// and BEST_COMPRESSION, or DEFAULT_COMPRESSION.
/// </param>
/// <exception cref="System.ArgumentOutOfRangeException">if lvl is out of range.</exception>
public Deflater(int lvl) : this(lvl, false)
{
}
/// <summary>
/// Creates a new deflater with given compression level.
/// </summary>
/// <param name="lvl">
/// the compression level, a value between NO_COMPRESSION
/// and BEST_COMPRESSION.
/// </param>
/// <param name="nowrap">
/// true, if we should suppress the deflate header at the
/// beginning and the adler checksum at the end of the output. This is
/// useful for the GZIP format.
/// </param>
/// <exception cref="System.ArgumentOutOfRangeException">if lvl is out of range.</exception>
public Deflater(int lvl, bool nowrap)
{
if (lvl == DEFAULT_COMPRESSION) {
lvl = 6;
} else if (lvl < NO_COMPRESSION || lvl > BEST_COMPRESSION) {
throw new ArgumentOutOfRangeException("lvl");
}
pending = new DeflaterPending();
engine = new DeflaterEngine(pending);
this.noHeader = nowrap;
SetStrategy(DeflateStrategy.Default);
SetLevel(lvl);
Reset();
}
/// <summary>
/// Resets the deflater. The deflater acts afterwards as if it was
/// just created with the same compression level and strategy as it
/// had before.
/// </summary>
public void Reset()
{
state = (noHeader ? BUSY_STATE : INIT_STATE);
totalOut = 0;
pending.Reset();
engine.Reset();
}
/// <summary>
/// Gets the current adler checksum of the data that was processed so far.
/// </summary>
public int Adler {
get {
return engine.Adler;
}
}
/// <summary>
/// Gets the number of input bytes processed so far.
/// </summary>
public int TotalIn {
get {
return engine.TotalIn;
}
}
/// <summary>
/// Gets the number of output bytes so far.
/// </summary>
public int TotalOut {
get {
return totalOut;
}
}
/// <summary>
/// Flushes the current input block. Further calls to deflate() will
/// produce enough output to inflate everything in the current input
/// block. This is not part of Sun's JDK so I have made it package
/// private. It is used by DeflaterOutputStream to implement
/// flush().
/// </summary>
public void Flush()
{
state |= IS_FLUSHING;
}
/// <summary>
/// Finishes the deflater with the current input block. It is an error
/// to give more input after this method was called. This method must
/// be called to force all bytes to be flushed.
/// </summary>
public void Finish()
{
state |= IS_FLUSHING | IS_FINISHING;
}
/// <summary>
/// Returns true if the stream was finished and no more output bytes
/// are available.
/// </summary>
public bool IsFinished {
get {
return state == FINISHED_STATE && pending.IsFlushed;
}
}
/// <summary>
/// Returns true, if the input buffer is empty.
/// You should then call setInput().
/// NOTE: This method can also return true when the stream
/// was finished.
/// </summary>
public bool IsNeedingInput {
get {
return engine.NeedsInput();
}
}
/// <summary>
/// Sets the data which should be compressed next. This should be only
/// called when needsInput indicates that more input is needed.
/// If you call setInput when needsInput() returns false, the
/// previous input that is still pending will be thrown away.
/// The given byte array should not be changed, before needsInput() returns
/// true again.
/// This call is equivalent to <code>setInput(input, 0, input.length)</code>.
/// </summary>
/// <param name="input">
/// the buffer containing the input data.
/// </param>
/// <exception cref="System.InvalidOperationException">
/// if the buffer was finished() or ended().
/// </exception>
public void SetInput(byte[] input)
{
SetInput(input, 0, input.Length);
}
/// <summary>
/// Sets the data which should be compressed next. This should be
/// only called when needsInput indicates that more input is needed.
/// The given byte array should not be changed, before needsInput() returns
/// true again.
/// </summary>
/// <param name="input">
/// the buffer containing the input data.
/// </param>
/// <param name="off">
/// the start of the data.
/// </param>
/// <param name="len">
/// the length of the data.
/// </param>
/// <exception cref="System.InvalidOperationException">
/// if the buffer was finished() or ended() or if previous input is still pending.
/// </exception>
public void SetInput(byte[] input, int off, int len)
{
if ((state & IS_FINISHING) != 0) {
throw new InvalidOperationException("finish()/end() already called");
}
engine.SetInput(input, off, len);
}
/// <summary>
/// Sets the compression level. There is no guarantee of the exact
/// position of the change, but if you call this when needsInput is
/// true the change of compression level will occur somewhere near
/// before the end of the so far given input.
/// </summary>
/// <param name="lvl">
/// the new compression level.
/// </param>
public void SetLevel(int lvl)
{
if (lvl == DEFAULT_COMPRESSION) {
lvl = 6;
} else if (lvl < NO_COMPRESSION || lvl > BEST_COMPRESSION) {
throw new ArgumentOutOfRangeException("lvl");
}
if (level != lvl) {
level = lvl;
engine.SetLevel(lvl);
}
}
/// <summary>
/// Sets the compression strategy. Strategy is one of
/// DEFAULT_STRATEGY, HUFFMAN_ONLY and FILTERED. For the exact
/// position where the strategy is changed, the same as for
/// setLevel() applies.
/// </summary>
/// <param name="stgy">
/// the new compression strategy.
/// </param>
public void SetStrategy(DeflateStrategy stgy)
{
engine.Strategy = stgy;
}
/// <summary>
/// Deflates the current input block to the given array. It returns
/// the number of bytes compressed, or 0 if either
/// needsInput() or finished() returns true or length is zero.
/// </summary>
/// <param name="output">
/// the buffer where to write the compressed data.
/// </param>
public int Deflate(byte[] output)
{
return Deflate(output, 0, output.Length);
}
/// <summary>
/// Deflates the current input block to the given array. It returns
/// the number of bytes compressed, or 0 if either
/// needsInput() or finished() returns true or length is zero.
/// </summary>
/// <param name="output">
/// the buffer where to write the compressed data.
/// </param>
/// <param name="offset">
/// the offset into the output array.
/// </param>
/// <param name="length">
/// the maximum number of bytes that may be written.
/// </param>
/// <exception cref="System.InvalidOperationException">
/// if end() was called.
/// </exception>
/// <exception cref="System.ArgumentOutOfRangeException">
/// if offset and/or length don't match the array length.
/// </exception>
public int Deflate(byte[] output, int offset, int length)
{
int origLength = length;
if (state == CLOSED_STATE) {
throw new InvalidOperationException("Deflater closed");
}
if (state < BUSY_STATE) {
/* output header */
int header = (DEFLATED +
((DeflaterConstants.MAX_WBITS - 8) << 4)) << 8;
int level_flags = (level - 1) >> 1;
if (level_flags < 0 || level_flags > 3) {
level_flags = 3;
}
header |= level_flags << 6;
if ((state & IS_SETDICT) != 0) {
/* Dictionary was set */
header |= DeflaterConstants.PRESET_DICT;
}
header += 31 - (header % 31);
pending.WriteShortMSB(header);
if ((state & IS_SETDICT) != 0) {
int chksum = engine.Adler;
engine.ResetAdler();
pending.WriteShortMSB(chksum >> 16);
pending.WriteShortMSB(chksum & 0xffff);
}
state = BUSY_STATE | (state & (IS_FLUSHING | IS_FINISHING));
}
for (;;) {
int count = pending.Flush(output, offset, length);
offset += count;
totalOut += count;
length -= count;
if (length == 0 || state == FINISHED_STATE) {
break;
}
if (!engine.Deflate((state & IS_FLUSHING) != 0, (state & IS_FINISHING) != 0)) {
if (state == BUSY_STATE) {
/* We need more input now */
return origLength - length;
} else if (state == FLUSHING_STATE) {
if (level != NO_COMPRESSION) {
/* We have to supply some lookahead. 8 bit lookahead
* are needed by the zlib inflater, and we must fill
* the next byte, so that all bits are flushed.
*/
int neededbits = 8 + ((-pending.BitCount) & 7);
while (neededbits > 0) {
/* write a static tree block consisting solely of
* an EOF:
*/
pending.WriteBits(2, 10);
neededbits -= 10;
}
}
state = BUSY_STATE;
} else if (state == FINISHING_STATE) {
pending.AlignToByte();
/* We have completed the stream */
if (!noHeader) {
int adler = engine.Adler;
pending.WriteShortMSB(adler >> 16);
pending.WriteShortMSB(adler & 0xffff);
}
state = FINISHED_STATE;
}
}
}
return origLength - length;
}
/// <summary>
/// Sets the dictionary which should be used in the deflate process.
/// This call is equivalent to <code>setDictionary(dict, 0, dict.Length)</code>.
/// </summary>
/// <param name="dict">
/// the dictionary.
/// </param>
/// <exception cref="System.InvalidOperationException">
/// if setInput () or deflate () were already called or another dictionary was already set.
/// </exception>
public void SetDictionary(byte[] dict)
{
SetDictionary(dict, 0, dict.Length);
}
/// <summary>
/// Sets the dictionary which should be used in the deflate process.
/// The dictionary should be a byte array containing strings that are
/// likely to occur in the data which should be compressed. The
/// dictionary is not stored in the compressed output, only a
/// checksum. To decompress the output you need to supply the same
/// dictionary again.
/// </summary>
/// <param name="dict">
/// the dictionary.
/// </param>
/// <param name="offset">
/// an offset into the dictionary.
/// </param>
/// <param name="length">
/// the length of the dictionary.
/// </param>
/// <exception cref="System.InvalidOperationException">
/// if setInput () or deflate () were already called or another dictionary was already set.
/// </exception>
public void SetDictionary(byte[] dict, int offset, int length)
{
if (state != INIT_STATE) {
throw new InvalidOperationException();
}
state = SETDICT_STATE;
engine.SetDictionary(dict, offset, length);
}
}
}

View File

@@ -1,85 +0,0 @@
// DeflaterConstants.cs
// Copyright (C) 2001 Mike Krueger
//
// This file was translated from java, it was part of the GNU Classpath
// Copyright (C) 2001 Free Software Foundation, Inc.
//
// 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.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
using System;
namespace ICSharpCode.SharpZipLib.Zip.Compression
{
/// <summary>
/// This class contains constants used for the deflater.
/// </summary>
public class DeflaterConstants
{
public const bool DEBUGGING = false;
public const int STORED_BLOCK = 0;
public const int STATIC_TREES = 1;
public const int DYN_TREES = 2;
public const int PRESET_DICT = 0x20;
public const int DEFAULT_MEM_LEVEL = 8;
public const int MAX_MATCH = 258;
public const int MIN_MATCH = 3;
public const int MAX_WBITS = 15;
public const int WSIZE = 1 << MAX_WBITS;
public const int WMASK = WSIZE - 1;
public const int HASH_BITS = DEFAULT_MEM_LEVEL + 7;
public const int HASH_SIZE = 1 << HASH_BITS;
public const int HASH_MASK = HASH_SIZE - 1;
public const int HASH_SHIFT = (HASH_BITS + MIN_MATCH - 1) / MIN_MATCH;
public const int MIN_LOOKAHEAD = MAX_MATCH + MIN_MATCH + 1;
public const int MAX_DIST = WSIZE - MIN_LOOKAHEAD;
public const int PENDING_BUF_SIZE = 1 << (DEFAULT_MEM_LEVEL + 8);
public static int MAX_BLOCK_SIZE = Math.Min(65535, PENDING_BUF_SIZE-5);
public const int DEFLATE_STORED = 0;
public const int DEFLATE_FAST = 1;
public const int DEFLATE_SLOW = 2;
public static int[] GOOD_LENGTH = { 0, 4, 4, 4, 4, 8, 8, 8, 32, 32 };
public static int[] MAX_LAZY = { 0, 4, 5, 6, 4,16, 16, 32, 128, 258 };
public static int[] NICE_LENGTH = { 0, 8,16,32,16,32,128,128, 258, 258 };
public static int[] MAX_CHAIN = { 0, 4, 8,32,16,32,128,256,1024,4096 };
public static int[] COMPR_FUNC = { 0, 1, 1, 1, 1, 2, 2, 2, 2, 2 };
}
}

View File

@@ -1,653 +0,0 @@
// DeflaterEngine.cs
// Copyright (C) 2001 Mike Krueger
//
// This file was translated from java, it was part of the GNU Classpath
// Copyright (C) 2001 Free Software Foundation, Inc.
//
// 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.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
using System;
using ICSharpCode.SharpZipLib.Checksums;
namespace ICSharpCode.SharpZipLib.Zip.Compression
{
public enum DeflateStrategy
{
// The default strategy.
Default = 0,
// This strategy will only allow longer string repetitions. It is
// useful for random data with a small character set.
Filtered = 1,
// This strategy will not look for string repetitions at all. It
// only encodes with Huffman trees (which means, that more common
// characters get a smaller encoding.
HuffmanOnly = 2
}
public class DeflaterEngine : DeflaterConstants
{
static int TOO_FAR = 4096;
int ins_h;
// private byte[] buffer;
short[] head;
short[] prev;
int matchStart, matchLen;
bool prevAvailable;
int blockStart;
int strstart, lookahead;
byte[] window;
DeflateStrategy strategy;
int max_chain, max_lazy, niceLength, goodLength;
/// <summary>
/// The current compression function.
/// </summary>
int comprFunc;
/// <summary>
/// The input data for compression.
/// </summary>
byte[] inputBuf;
/// <summary>
/// The total bytes of input read.
/// </summary>
int totalIn;
/// <summary>
/// The offset into inputBuf, where input data starts.
/// </summary>
int inputOff;
/// <summary>
/// The end offset of the input data.
/// </summary>
int inputEnd;
DeflaterPending pending;
DeflaterHuffman huffman;
/// <summary>
/// The adler checksum
/// </summary>
Adler32 adler;
public DeflaterEngine(DeflaterPending pending)
{
this.pending = pending;
huffman = new DeflaterHuffman(pending);
adler = new Adler32();
window = new byte[2 * WSIZE];
head = new short[HASH_SIZE];
prev = new short[WSIZE];
/* We start at index 1, to avoid a implementation deficiency, that
* we cannot build a repeat pattern at index 0.
*/
blockStart = strstart = 1;
}
public void Reset()
{
huffman.Reset();
adler.Reset();
blockStart = strstart = 1;
lookahead = 0;
totalIn = 0;
prevAvailable = false;
matchLen = MIN_MATCH - 1;
for (int i = 0; i < HASH_SIZE; i++) {
head[i] = 0;
}
for (int i = 0; i < WSIZE; i++) {
prev[i] = 0;
}
}
public void ResetAdler()
{
adler.Reset();
}
public int Adler {
get {
return (int)adler.Value;
}
}
public int TotalIn {
get {
return totalIn;
}
}
public DeflateStrategy Strategy {
get {
return strategy;
}
set {
strategy = value;
}
}
public void SetLevel(int lvl)
{
goodLength = DeflaterConstants.GOOD_LENGTH[lvl];
max_lazy = DeflaterConstants.MAX_LAZY[lvl];
niceLength = DeflaterConstants.NICE_LENGTH[lvl];
max_chain = DeflaterConstants.MAX_CHAIN[lvl];
if (DeflaterConstants.COMPR_FUNC[lvl] != comprFunc) {
// if (DeflaterConstants.DEBUGGING) {
// //Console.WriteLine("Change from "+comprFunc +" to "
// + DeflaterConstants.COMPR_FUNC[lvl]);
// }
switch (comprFunc) {
case DEFLATE_STORED:
if (strstart > blockStart) {
huffman.FlushStoredBlock(window, blockStart,
strstart - blockStart, false);
blockStart = strstart;
}
UpdateHash();
break;
case DEFLATE_FAST:
if (strstart > blockStart) {
huffman.FlushBlock(window, blockStart, strstart - blockStart,
false);
blockStart = strstart;
}
break;
case DEFLATE_SLOW:
if (prevAvailable) {
huffman.TallyLit(window[strstart-1] & 0xff);
}
if (strstart > blockStart) {
huffman.FlushBlock(window, blockStart, strstart - blockStart, false);
blockStart = strstart;
}
prevAvailable = false;
matchLen = MIN_MATCH - 1;
break;
}
comprFunc = COMPR_FUNC[lvl];
}
}
void UpdateHash()
{
// if (DEBUGGING) {
// //Console.WriteLine("updateHash: "+strstart);
// }
ins_h = (window[strstart] << HASH_SHIFT) ^ window[strstart + 1];
}
int InsertString()
{
short match;
int hash = ((ins_h << HASH_SHIFT) ^ window[strstart + (MIN_MATCH -1)]) & HASH_MASK;
// if (DEBUGGING) {
// if (hash != (((window[strstart] << (2*HASH_SHIFT)) ^
// (window[strstart + 1] << HASH_SHIFT) ^
// (window[strstart + 2])) & HASH_MASK)) {
// throw new Exception("hash inconsistent: "+hash+"/"
// +window[strstart]+","
// +window[strstart+1]+","
// +window[strstart+2]+","+HASH_SHIFT);
// }
// }
prev[strstart & WMASK] = match = head[hash];
head[hash] = (short)strstart;
ins_h = hash;
return match & 0xffff;
}
void SlideWindow()
{
Array.Copy(window, WSIZE, window, 0, WSIZE);
matchStart -= WSIZE;
strstart -= WSIZE;
blockStart -= WSIZE;
/* Slide the hash table (could be avoided with 32 bit values
* at the expense of memory usage).
*/
for (int i = 0; i < HASH_SIZE; ++i) {
int m = head[i] & 0xffff;
head[i] = (short)(m >= WSIZE ? (m - WSIZE) : 0);
}
/* Slide the prev table. */
for (int i = 0; i < WSIZE; i++) {
int m = prev[i] & 0xffff;
prev[i] = (short)(m >= WSIZE ? (m - WSIZE) : 0);
}
}
public void FillWindow()
{
/* If the window is almost full and there is insufficient lookahead,
* move the upper half to the lower one to make room in the upper half.
*/
if (strstart >= WSIZE + MAX_DIST) {
SlideWindow();
}
/* If there is not enough lookahead, but still some input left,
* read in the input
*/
while (lookahead < DeflaterConstants.MIN_LOOKAHEAD && inputOff < inputEnd) {
int more = 2 * WSIZE - lookahead - strstart;
if (more > inputEnd - inputOff) {
more = inputEnd - inputOff;
}
System.Array.Copy(inputBuf, inputOff, window, strstart + lookahead, more);
adler.Update(inputBuf, inputOff, more);
inputOff += more;
totalIn += more;
lookahead += more;
}
if (lookahead >= MIN_MATCH) {
UpdateHash();
}
}
bool FindLongestMatch(int curMatch)
{
int chainLength = this.max_chain;
int niceLength = this.niceLength;
short[] prev = this.prev;
int scan = this.strstart;
int match;
int best_end = this.strstart + matchLen;
int best_len = Math.Max(matchLen, MIN_MATCH - 1);
int limit = Math.Max(strstart - MAX_DIST, 0);
int strend = strstart + MAX_MATCH - 1;
byte scan_end1 = window[best_end - 1];
byte scan_end = window[best_end];
/* Do not waste too much time if we already have a good match: */
if (best_len >= this.goodLength) {
chainLength >>= 2;
}
/* Do not look for matches beyond the end of the input. This is necessary
* to make deflate deterministic.
*/
if (niceLength > lookahead) {
niceLength = lookahead;
}
if (DeflaterConstants.DEBUGGING && strstart > 2 * WSIZE - MIN_LOOKAHEAD) {
throw new InvalidOperationException("need lookahead");
}
do {
if (DeflaterConstants.DEBUGGING && curMatch >= strstart) {
throw new InvalidOperationException("future match");
}
if (window[curMatch + best_len] != scan_end ||
window[curMatch + best_len - 1] != scan_end1 ||
window[curMatch] != window[scan] ||
window[curMatch + 1] != window[scan + 1]) {
continue;
}
match = curMatch + 2;
scan += 2;
/* We check for insufficient lookahead only every 8th comparison;
* the 256th check will be made at strstart+258.
*/
while (window[++scan] == window[++match] &&
window[++scan] == window[++match] &&
window[++scan] == window[++match] &&
window[++scan] == window[++match] &&
window[++scan] == window[++match] &&
window[++scan] == window[++match] &&
window[++scan] == window[++match] &&
window[++scan] == window[++match] && scan < strend) ;
if (scan > best_end) {
// if (DeflaterConstants.DEBUGGING && ins_h == 0)
// System.err.println("Found match: "+curMatch+"-"+(scan-strstart));
matchStart = curMatch;
best_end = scan;
best_len = scan - strstart;
if (best_len >= niceLength) {
break;
}
scan_end1 = window[best_end - 1];
scan_end = window[best_end];
}
scan = strstart;
} while ((curMatch = (prev[curMatch & WMASK] & 0xffff)) > limit && --chainLength != 0);
matchLen = Math.Min(best_len, lookahead);
return matchLen >= MIN_MATCH;
}
public void SetDictionary(byte[] buffer, int offset, int length)
{
if (DeflaterConstants.DEBUGGING && strstart != 1) {
throw new InvalidOperationException("strstart not 1");
}
adler.Update(buffer, offset, length);
if (length < MIN_MATCH) {
return;
}
if (length > MAX_DIST) {
offset += length - MAX_DIST;
length = MAX_DIST;
}
System.Array.Copy(buffer, offset, window, strstart, length);
UpdateHash();
--length;
while (--length > 0) {
InsertString();
strstart++;
}
strstart += 2;
blockStart = strstart;
}
bool DeflateStored(bool flush, bool finish)
{
if (!flush && lookahead == 0) {
return false;
}
strstart += lookahead;
lookahead = 0;
int storedLen = strstart - blockStart;
if ((storedLen >= DeflaterConstants.MAX_BLOCK_SIZE) || /* Block is full */
(blockStart < WSIZE && storedLen >= MAX_DIST) || /* Block may move out of window */
flush) {
bool lastBlock = finish;
if (storedLen > DeflaterConstants.MAX_BLOCK_SIZE) {
storedLen = DeflaterConstants.MAX_BLOCK_SIZE;
lastBlock = false;
}
// if (DeflaterConstants.DEBUGGING) {
// //Console.WriteLine("storedBlock["+storedLen+","+lastBlock+"]");
// }
huffman.FlushStoredBlock(window, blockStart, storedLen, lastBlock);
blockStart += storedLen;
return !lastBlock;
}
return true;
}
private bool DeflateFast(bool flush, bool finish)
{
if (lookahead < MIN_LOOKAHEAD && !flush) {
return false;
}
while (lookahead >= MIN_LOOKAHEAD || flush) {
if (lookahead == 0) {
/* We are flushing everything */
huffman.FlushBlock(window, blockStart, strstart - blockStart, finish);
blockStart = strstart;
return false;
}
if (strstart > 2 * WSIZE - MIN_LOOKAHEAD) {
/* slide window, as findLongestMatch need this.
* This should only happen when flushing and the window
* is almost full.
*/
SlideWindow();
}
int hashHead;
if (lookahead >= MIN_MATCH &&
(hashHead = InsertString()) != 0 &&
strategy != DeflateStrategy.HuffmanOnly &&
strstart - hashHead <= MAX_DIST &&
FindLongestMatch(hashHead)) {
/* longestMatch sets matchStart and matchLen */
// if (DeflaterConstants.DEBUGGING) {
// for (int i = 0 ; i < matchLen; i++) {
// if (window[strstart+i] != window[matchStart + i]) {
// throw new Exception();
// }
// }
// }
// -jr- Hak hak hak this stops problems with fast/low compression and index out of range
if (huffman.TallyDist(strstart - matchStart, matchLen)) {
bool lastBlock = finish && lookahead == 0;
huffman.FlushBlock(window, blockStart, strstart - blockStart, lastBlock);
blockStart = strstart;
}
lookahead -= matchLen;
if (matchLen <= max_lazy && lookahead >= MIN_MATCH) {
while (--matchLen > 0) {
++strstart;
InsertString();
}
++strstart;
} else {
strstart += matchLen;
if (lookahead >= MIN_MATCH - 1) {
UpdateHash();
}
}
matchLen = MIN_MATCH - 1;
continue;
} else {
/* No match found */
huffman.TallyLit(window[strstart] & 0xff);
++strstart;
--lookahead;
}
if (huffman.IsFull()) {
bool lastBlock = finish && lookahead == 0;
huffman.FlushBlock(window, blockStart, strstart - blockStart, lastBlock);
blockStart = strstart;
return !lastBlock;
}
}
return true;
}
bool DeflateSlow(bool flush, bool finish)
{
if (lookahead < MIN_LOOKAHEAD && !flush) {
return false;
}
while (lookahead >= MIN_LOOKAHEAD || flush) {
if (lookahead == 0) {
if (prevAvailable) {
huffman.TallyLit(window[strstart-1] & 0xff);
}
prevAvailable = false;
/* We are flushing everything */
if (DeflaterConstants.DEBUGGING && !flush) {
throw new Exception("Not flushing, but no lookahead");
}
huffman.FlushBlock(window, blockStart, strstart - blockStart,
finish);
blockStart = strstart;
return false;
}
if (strstart >= 2 * WSIZE - MIN_LOOKAHEAD) {
/* slide window, as findLongestMatch need this.
* This should only happen when flushing and the window
* is almost full.
*/
SlideWindow();
}
int prevMatch = matchStart;
int prevLen = matchLen;
if (lookahead >= MIN_MATCH) {
int hashHead = InsertString();
if (strategy != DeflateStrategy.HuffmanOnly && hashHead != 0 && strstart - hashHead <= MAX_DIST && FindLongestMatch(hashHead)) {
/* longestMatch sets matchStart and matchLen */
/* Discard match if too small and too far away */
if (matchLen <= 5 && (strategy == DeflateStrategy.Filtered || (matchLen == MIN_MATCH && strstart - matchStart > TOO_FAR))) {
matchLen = MIN_MATCH - 1;
}
}
}
/* previous match was better */
if (prevLen >= MIN_MATCH && matchLen <= prevLen) {
// if (DeflaterConstants.DEBUGGING) {
// for (int i = 0 ; i < matchLen; i++) {
// if (window[strstart-1+i] != window[prevMatch + i])
// throw new Exception();
// }
// }
huffman.TallyDist(strstart - 1 - prevMatch, prevLen);
prevLen -= 2;
do {
strstart++;
lookahead--;
if (lookahead >= MIN_MATCH) {
InsertString();
}
} while (--prevLen > 0);
strstart ++;
lookahead--;
prevAvailable = false;
matchLen = MIN_MATCH - 1;
} else {
if (prevAvailable) {
huffman.TallyLit(window[strstart-1] & 0xff);
}
prevAvailable = true;
strstart++;
lookahead--;
}
if (huffman.IsFull()) {
int len = strstart - blockStart;
if (prevAvailable) {
len--;
}
bool lastBlock = (finish && lookahead == 0 && !prevAvailable);
huffman.FlushBlock(window, blockStart, len, lastBlock);
blockStart += len;
return !lastBlock;
}
}
return true;
}
public bool Deflate(bool flush, bool finish)
{
bool progress;
do {
FillWindow();
bool canFlush = flush && inputOff == inputEnd;
// if (DeflaterConstants.DEBUGGING) {
// //Console.WriteLine("window: ["+blockStart+","+strstart+","
// +lookahead+"], "+comprFunc+","+canFlush);
// }
switch (comprFunc) {
case DEFLATE_STORED:
progress = DeflateStored(canFlush, finish);
break;
case DEFLATE_FAST:
progress = DeflateFast(canFlush, finish);
break;
case DEFLATE_SLOW:
progress = DeflateSlow(canFlush, finish);
break;
default:
throw new InvalidOperationException("unknown comprFunc");
}
} while (pending.IsFlushed && progress); /* repeat while we have no pending output and progress was made */
return progress;
}
public void SetInput(byte[] buf, int off, int len)
{
if (inputOff < inputEnd) {
throw new InvalidOperationException("Old input was not completely processed");
}
int end = off + len;
/* We want to throw an ArrayIndexOutOfBoundsException early. The
* check is very tricky: it also handles integer wrap around.
*/
if (0 > off || off > end || end > buf.Length) {
throw new ArgumentOutOfRangeException();
}
inputBuf = buf;
inputOff = off;
inputEnd = end;
}
public bool NeedsInput()
{
return inputEnd == inputOff;
}
}
}

View File

@@ -1,780 +0,0 @@
// DeflaterHuffman.cs
// Copyright (C) 2001 Mike Krueger
//
// This file was translated from java, it was part of the GNU Classpath
// Copyright (C) 2001 Free Software Foundation, Inc.
//
// 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.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
using System;
namespace ICSharpCode.SharpZipLib.Zip.Compression
{
/// <summary>
/// This is the DeflaterHuffman class.
///
/// This class is <i>not</i> thread safe. This is inherent in the API, due
/// to the split of deflate and setInput.
///
/// author of the original java version : Jochen Hoenicke
/// </summary>
public class DeflaterHuffman
{
private static int BUFSIZE = 1 << (DeflaterConstants.DEFAULT_MEM_LEVEL + 6);
private static int LITERAL_NUM = 286;
private static int DIST_NUM = 30;
private static int BITLEN_NUM = 19;
private static int REP_3_6 = 16;
private static int REP_3_10 = 17;
private static int REP_11_138 = 18;
private static int EOF_SYMBOL = 256;
private static int[] BL_ORDER = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 };
private static byte[] bit4Reverse = {
0,
8,
4,
12,
2,
10,
6,
14,
1,
9,
5,
13,
3,
11,
7,
15
};
public class Tree
{
public short[] freqs;
public byte[] length;
public int minNumCodes, numCodes;
short[] codes;
int[] bl_counts;
int maxLength;
DeflaterHuffman dh;
public Tree(DeflaterHuffman dh, int elems, int minCodes, int maxLength)
{
this.dh = dh;
this.minNumCodes = minCodes;
this.maxLength = maxLength;
freqs = new short[elems];
bl_counts = new int[maxLength];
}
public void Reset()
{
for (int i = 0; i < freqs.Length; i++) {
freqs[i] = 0;
}
codes = null;
length = null;
}
public void WriteSymbol(int code)
{
// if (DeflaterConstants.DEBUGGING) {
// freqs[code]--;
// // Console.Write("writeSymbol("+freqs.length+","+code+"): ");
// }
dh.pending.WriteBits(codes[code] & 0xffff, length[code]);
}
public void CheckEmpty()
{
bool empty = true;
for (int i = 0; i < freqs.Length; i++) {
if (freqs[i] != 0) {
//Console.WriteLine("freqs["+i+"] == "+freqs[i]);
empty = false;
}
}
if (!empty) {
throw new Exception();
}
//Console.WriteLine("checkEmpty suceeded!");
}
public void SetStaticCodes(short[] stCodes, byte[] stLength)
{
codes = stCodes;
length = stLength;
}
public void BuildCodes()
{
int numSymbols = freqs.Length;
int[] nextCode = new int[maxLength];
int code = 0;
codes = new short[freqs.Length];
// if (DeflaterConstants.DEBUGGING) {
// //Console.WriteLine("buildCodes: "+freqs.Length);
// }
for (int bits = 0; bits < maxLength; bits++) {
nextCode[bits] = code;
code += bl_counts[bits] << (15 - bits);
// if (DeflaterConstants.DEBUGGING) {
// //Console.WriteLine("bits: "+(bits+1)+" count: "+bl_counts[bits]
// +" nextCode: "+code); // HACK : Integer.toHexString(
// }
}
if (DeflaterConstants.DEBUGGING && code != 65536) {
throw new Exception("Inconsistent bl_counts!");
}
for (int i=0; i < numCodes; i++) {
int bits = length[i];
if (bits > 0) {
// if (DeflaterConstants.DEBUGGING) {
// //Console.WriteLine("codes["+i+"] = rev(" + nextCode[bits-1]+")," // HACK : Integer.toHexString(
// +bits);
// }
codes[i] = BitReverse(nextCode[bits-1]);
nextCode[bits-1] += 1 << (16 - bits);
}
}
}
void BuildLength(int[] childs)
{
this.length = new byte [freqs.Length];
int numNodes = childs.Length / 2;
int numLeafs = (numNodes + 1) / 2;
int overflow = 0;
for (int i = 0; i < maxLength; i++) {
bl_counts[i] = 0;
}
/* First calculate optimal bit lengths */
int[] lengths = new int[numNodes];
lengths[numNodes-1] = 0;
for (int i = numNodes - 1; i >= 0; i--) {
if (childs[2*i+1] != -1) {
int bitLength = lengths[i] + 1;
if (bitLength > maxLength) {
bitLength = maxLength;
overflow++;
}
lengths[childs[2*i]] = lengths[childs[2*i+1]] = bitLength;
} else {
/* A leaf node */
int bitLength = lengths[i];
bl_counts[bitLength - 1]++;
this.length[childs[2*i]] = (byte) lengths[i];
}
}
// if (DeflaterConstants.DEBUGGING) {
// //Console.WriteLine("Tree "+freqs.Length+" lengths:");
// for (int i=0; i < numLeafs; i++) {
// //Console.WriteLine("Node "+childs[2*i]+" freq: "+freqs[childs[2*i]]
// + " len: "+length[childs[2*i]]);
// }
// }
if (overflow == 0) {
return;
}
int incrBitLen = maxLength - 1;
do {
/* Find the first bit length which could increase: */
while (bl_counts[--incrBitLen] == 0)
;
/* Move this node one down and remove a corresponding
* amount of overflow nodes.
*/
do {
bl_counts[incrBitLen]--;
bl_counts[++incrBitLen]++;
overflow -= 1 << (maxLength - 1 - incrBitLen);
} while (overflow > 0 && incrBitLen < maxLength - 1);
} while (overflow > 0);
/* We may have overshot above. Move some nodes from maxLength to
* maxLength-1 in that case.
*/
bl_counts[maxLength-1] += overflow;
bl_counts[maxLength-2] -= overflow;
/* Now recompute all bit lengths, scanning in increasing
* frequency. It is simpler to reconstruct all lengths instead of
* fixing only the wrong ones. This idea is taken from 'ar'
* written by Haruhiko Okumura.
*
* The nodes were inserted with decreasing frequency into the childs
* array.
*/
int nodePtr = 2 * numLeafs;
for (int bits = maxLength; bits != 0; bits--) {
int n = bl_counts[bits-1];
while (n > 0) {
int childPtr = 2*childs[nodePtr++];
if (childs[childPtr + 1] == -1) {
/* We found another leaf */
length[childs[childPtr]] = (byte) bits;
n--;
}
}
}
// if (DeflaterConstants.DEBUGGING) {
// //Console.WriteLine("*** After overflow elimination. ***");
// for (int i=0; i < numLeafs; i++) {
// //Console.WriteLine("Node "+childs[2*i]+" freq: "+freqs[childs[2*i]]
// + " len: "+length[childs[2*i]]);
// }
// }
}
public void BuildTree()
{
int numSymbols = freqs.Length;
/* heap is a priority queue, sorted by frequency, least frequent
* nodes first. The heap is a binary tree, with the property, that
* the parent node is smaller than both child nodes. This assures
* that the smallest node is the first parent.
*
* The binary tree is encoded in an array: 0 is root node and
* the nodes 2*n+1, 2*n+2 are the child nodes of node n.
*/
int[] heap = new int[numSymbols];
int heapLen = 0;
int maxCode = 0;
for (int n = 0; n < numSymbols; n++) {
int freq = freqs[n];
if (freq != 0) {
/* Insert n into heap */
int pos = heapLen++;
int ppos;
while (pos > 0 && freqs[heap[ppos = (pos - 1) / 2]] > freq) {
heap[pos] = heap[ppos];
pos = ppos;
}
heap[pos] = n;
maxCode = n;
}
}
/* We could encode a single literal with 0 bits but then we
* don't see the literals. Therefore we force at least two
* literals to avoid this case. We don't care about order in
* this case, both literals get a 1 bit code.
*/
while (heapLen < 2) {
int node = maxCode < 2 ? ++maxCode : 0;
heap[heapLen++] = node;
}
numCodes = Math.Max(maxCode + 1, minNumCodes);
int numLeafs = heapLen;
int[] childs = new int[4*heapLen - 2];
int[] values = new int[2*heapLen - 1];
int numNodes = numLeafs;
for (int i = 0; i < heapLen; i++) {
int node = heap[i];
childs[2*i] = node;
childs[2*i+1] = -1;
values[i] = freqs[node] << 8;
heap[i] = i;
}
/* Construct the Huffman tree by repeatedly combining the least two
* frequent nodes.
*/
do {
int first = heap[0];
int last = heap[--heapLen];
/* Propagate the hole to the leafs of the heap */
int ppos = 0;
int path = 1;
while (path < heapLen) {
if (path + 1 < heapLen && values[heap[path]] > values[heap[path+1]]) {
path++;
}
heap[ppos] = heap[path];
ppos = path;
path = path * 2 + 1;
}
/* Now propagate the last element down along path. Normally
* it shouldn't go too deep.
*/
int lastVal = values[last];
while ((path = ppos) > 0 && values[heap[ppos = (path - 1)/2]] > lastVal) {
heap[path] = heap[ppos];
}
heap[path] = last;
int second = heap[0];
/* Create a new node father of first and second */
last = numNodes++;
childs[2*last] = first;
childs[2*last+1] = second;
int mindepth = Math.Min(values[first] & 0xff, values[second] & 0xff);
values[last] = lastVal = values[first] + values[second] - mindepth + 1;
/* Again, propagate the hole to the leafs */
ppos = 0;
path = 1;
while (path < heapLen) {
if (path + 1 < heapLen && values[heap[path]] > values[heap[path+1]]) {
path++;
}
heap[ppos] = heap[path];
ppos = path;
path = ppos * 2 + 1;
}
/* Now propagate the new element down along path */
while ((path = ppos) > 0 && values[heap[ppos = (path - 1)/2]] > lastVal) {
heap[path] = heap[ppos];
}
heap[path] = last;
} while (heapLen > 1);
if (heap[0] != childs.Length / 2 - 1) {
throw new Exception("Weird!");
}
BuildLength(childs);
}
public int GetEncodedLength()
{
int len = 0;
for (int i = 0; i < freqs.Length; i++) {
len += freqs[i] * length[i];
}
return len;
}
public void CalcBLFreq(Tree blTree)
{
int max_count; /* max repeat count */
int min_count; /* min repeat count */
int count; /* repeat count of the current code */
int curlen = -1; /* length of current code */
int i = 0;
while (i < numCodes) {
count = 1;
int nextlen = length[i];
if (nextlen == 0) {
max_count = 138;
min_count = 3;
} else {
max_count = 6;
min_count = 3;
if (curlen != nextlen) {
blTree.freqs[nextlen]++;
count = 0;
}
}
curlen = nextlen;
i++;
while (i < numCodes && curlen == length[i]) {
i++;
if (++count >= max_count) {
break;
}
}
if (count < min_count) {
blTree.freqs[curlen] += (short)count;
} else if (curlen != 0) {
blTree.freqs[REP_3_6]++;
} else if (count <= 10) {
blTree.freqs[REP_3_10]++;
} else {
blTree.freqs[REP_11_138]++;
}
}
}
public void WriteTree(Tree blTree)
{
int max_count; /* max repeat count */
int min_count; /* min repeat count */
int count; /* repeat count of the current code */
int curlen = -1; /* length of current code */
int i = 0;
while (i < numCodes) {
count = 1;
int nextlen = length[i];
if (nextlen == 0) {
max_count = 138;
min_count = 3;
} else {
max_count = 6;
min_count = 3;
if (curlen != nextlen) {
blTree.WriteSymbol(nextlen);
count = 0;
}
}
curlen = nextlen;
i++;
while (i < numCodes && curlen == length[i]) {
i++;
if (++count >= max_count) {
break;
}
}
if (count < min_count) {
while (count-- > 0) {
blTree.WriteSymbol(curlen);
}
} else if (curlen != 0) {
blTree.WriteSymbol(REP_3_6);
dh.pending.WriteBits(count - 3, 2);
} else if (count <= 10) {
blTree.WriteSymbol(REP_3_10);
dh.pending.WriteBits(count - 3, 3);
} else {
blTree.WriteSymbol(REP_11_138);
dh.pending.WriteBits(count - 11, 7);
}
}
}
}
public DeflaterPending pending;
private Tree literalTree, distTree, blTree;
private short[] d_buf;
private byte[] l_buf;
private int last_lit;
private int extra_bits;
private static short[] staticLCodes;
private static byte[] staticLLength;
private static short[] staticDCodes;
private static byte[] staticDLength;
/// <summary>
/// Reverse the bits of a 16 bit value.
/// </summary>
public static short BitReverse(int value)
{
return (short) (bit4Reverse[value & 0xF] << 12 |
bit4Reverse[(value >> 4) & 0xF] << 8 |
bit4Reverse[(value >> 8) & 0xF] << 4 |
bit4Reverse[value >> 12]);
}
static DeflaterHuffman()
{
/* See RFC 1951 3.2.6 */
/* Literal codes */
staticLCodes = new short[LITERAL_NUM];
staticLLength = new byte[LITERAL_NUM];
int i = 0;
while (i < 144) {
staticLCodes[i] = BitReverse((0x030 + i) << 8);
staticLLength[i++] = 8;
}
while (i < 256) {
staticLCodes[i] = BitReverse((0x190 - 144 + i) << 7);
staticLLength[i++] = 9;
}
while (i < 280) {
staticLCodes[i] = BitReverse((0x000 - 256 + i) << 9);
staticLLength[i++] = 7;
}
while (i < LITERAL_NUM) {
staticLCodes[i] = BitReverse((0x0c0 - 280 + i) << 8);
staticLLength[i++] = 8;
}
/* Distant codes */
staticDCodes = new short[DIST_NUM];
staticDLength = new byte[DIST_NUM];
for (i = 0; i < DIST_NUM; i++) {
staticDCodes[i] = BitReverse(i << 11);
staticDLength[i] = 5;
}
}
public DeflaterHuffman(DeflaterPending pending)
{
this.pending = pending;
literalTree = new Tree(this, LITERAL_NUM, 257, 15);
distTree = new Tree(this, DIST_NUM, 1, 15);
blTree = new Tree(this, BITLEN_NUM, 4, 7);
d_buf = new short[BUFSIZE];
l_buf = new byte [BUFSIZE];
}
public void Reset()
{
last_lit = 0;
extra_bits = 0;
literalTree.Reset();
distTree.Reset();
blTree.Reset();
}
int Lcode(int len)
{
if (len == 255) {
return 285;
}
int code = 257;
while (len >= 8) {
code += 4;
len >>= 1;
}
return code + len;
}
int Dcode(int distance)
{
int code = 0;
while (distance >= 4) {
code += 2;
distance >>= 1;
}
return code + distance;
}
public void SendAllTrees(int blTreeCodes)
{
blTree.BuildCodes();
literalTree.BuildCodes();
distTree.BuildCodes();
pending.WriteBits(literalTree.numCodes - 257, 5);
pending.WriteBits(distTree.numCodes - 1, 5);
pending.WriteBits(blTreeCodes - 4, 4);
for (int rank = 0; rank < blTreeCodes; rank++) {
pending.WriteBits(blTree.length[BL_ORDER[rank]], 3);
}
literalTree.WriteTree(blTree);
distTree.WriteTree(blTree);
// if (DeflaterConstants.DEBUGGING) {
// blTree.CheckEmpty();
// }
}
public void CompressBlock()
{
for (int i = 0; i < last_lit; i++) {
int litlen = l_buf[i] & 0xff;
int dist = d_buf[i];
if (dist-- != 0) {
// if (DeflaterConstants.DEBUGGING) {
// Console.Write("["+(dist+1)+","+(litlen+3)+"]: ");
// }
int lc = Lcode(litlen);
literalTree.WriteSymbol(lc);
int bits = (lc - 261) / 4;
if (bits > 0 && bits <= 5) {
pending.WriteBits(litlen & ((1 << bits) - 1), bits);
}
int dc = Dcode(dist);
distTree.WriteSymbol(dc);
bits = dc / 2 - 1;
if (bits > 0) {
pending.WriteBits(dist & ((1 << bits) - 1), bits);
}
} else {
// if (DeflaterConstants.DEBUGGING) {
// if (litlen > 32 && litlen < 127) {
// Console.Write("("+(char)litlen+"): ");
// } else {
// Console.Write("{"+litlen+"}: ");
// }
// }
literalTree.WriteSymbol(litlen);
}
}
// if (DeflaterConstants.DEBUGGING) {
// Console.Write("EOF: ");
// }
literalTree.WriteSymbol(EOF_SYMBOL);
// if (DeflaterConstants.DEBUGGING) {
// literalTree.CheckEmpty();
// distTree.CheckEmpty();
// }
}
public void FlushStoredBlock(byte[] stored, int storedOffset, int storedLength, bool lastBlock)
{
// if (DeflaterConstants.DEBUGGING) {
// //Console.WriteLine("Flushing stored block "+ storedLength);
// }
pending.WriteBits((DeflaterConstants.STORED_BLOCK << 1) + (lastBlock ? 1 : 0), 3);
pending.AlignToByte();
pending.WriteShort(storedLength);
pending.WriteShort(~storedLength);
pending.WriteBlock(stored, storedOffset, storedLength);
Reset();
}
public void FlushBlock(byte[] stored, int storedOffset, int storedLength, bool lastBlock)
{
literalTree.freqs[EOF_SYMBOL]++;
/* Build trees */
literalTree.BuildTree();
distTree.BuildTree();
/* Calculate bitlen frequency */
literalTree.CalcBLFreq(blTree);
distTree.CalcBLFreq(blTree);
/* Build bitlen tree */
blTree.BuildTree();
int blTreeCodes = 4;
for (int i = 18; i > blTreeCodes; i--) {
if (blTree.length[BL_ORDER[i]] > 0) {
blTreeCodes = i+1;
}
}
int opt_len = 14 + blTreeCodes * 3 + blTree.GetEncodedLength() +
literalTree.GetEncodedLength() + distTree.GetEncodedLength() +
extra_bits;
int static_len = extra_bits;
for (int i = 0; i < LITERAL_NUM; i++) {
static_len += literalTree.freqs[i] * staticLLength[i];
}
for (int i = 0; i < DIST_NUM; i++) {
static_len += distTree.freqs[i] * staticDLength[i];
}
if (opt_len >= static_len) {
/* Force static trees */
opt_len = static_len;
}
if (storedOffset >= 0 && storedLength+4 < opt_len >> 3) {
/* Store Block */
// if (DeflaterConstants.DEBUGGING) {
// //Console.WriteLine("Storing, since " + storedLength + " < " + opt_len
// + " <= " + static_len);
// }
FlushStoredBlock(stored, storedOffset, storedLength, lastBlock);
} else if (opt_len == static_len) {
/* Encode with static tree */
pending.WriteBits((DeflaterConstants.STATIC_TREES << 1) + (lastBlock ? 1 : 0), 3);
literalTree.SetStaticCodes(staticLCodes, staticLLength);
distTree.SetStaticCodes(staticDCodes, staticDLength);
CompressBlock();
Reset();
} else {
/* Encode with dynamic tree */
pending.WriteBits((DeflaterConstants.DYN_TREES << 1) + (lastBlock ? 1 : 0), 3);
SendAllTrees(blTreeCodes);
CompressBlock();
Reset();
}
}
public bool IsFull()
{
// return last_lit + 16 >= BUFSIZE; // HACK: This was == 'last_lit == BUFSIZE', but errors occured with DeflateFast
return last_lit >= BUFSIZE; // -jr- This is the correct form!
}
public bool TallyLit(int lit)
{
// if (DeflaterConstants.DEBUGGING) {
// if (lit > 32 && lit < 127) {
// //Console.WriteLine("("+(char)lit+")");
// } else {
// //Console.WriteLine("{"+lit+"}");
// }
// }
d_buf[last_lit] = 0;
l_buf[last_lit++] = (byte)lit;
literalTree.freqs[lit]++;
return IsFull();
}
public bool TallyDist(int dist, int len)
{
// if (DeflaterConstants.DEBUGGING) {
// //Console.WriteLine("["+dist+","+len+"]");
// }
d_buf[last_lit] = (short)dist;
l_buf[last_lit++] = (byte)(len - 3);
int lc = Lcode(len - 3);
literalTree.freqs[lc]++;
if (lc >= 265 && lc < 285) {
extra_bits += (lc - 261) / 4;
}
int dc = Dcode(dist - 1);
distTree.freqs[dc]++;
if (dc >= 4) {
extra_bits += dc / 2 - 1;
}
return IsFull();
}
}
}

View File

@@ -1,52 +0,0 @@
// DeflaterPending.cs
// Copyright (C) 2001 Mike Krueger
//
// This file was translated from java, it was part of the GNU Classpath
// Copyright (C) 2001 Free Software Foundation, Inc.
//
// 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.
//
// Linking this library statically or dynamically with other modules is
// making a combined work based on this library. Thus, the terms and
// conditions of the GNU General Public License cover the whole
// combination.
//
// As a special exception, the copyright holders of this library give you
// permission to link this library with independent modules to produce an
// executable, regardless of the license terms of these independent
// modules, and to copy and distribute the resulting executable under
// terms of your choice, provided that you also meet, for each linked
// independent module, the terms and conditions of the license of that
// module. An independent module is a module which is not derived from
// or based on this library. If you modify this library, you may extend
// this exception to your version of the library, but you are not
// obligated to do so. If you do not wish to do so, delete this
// exception statement from your version.
namespace ICSharpCode.SharpZipLib.Zip.Compression
{
/// <summary>
/// This class stores the pending output of the Deflater.
///
/// author of the original java version : Jochen Hoenicke
/// </summary>
public class DeflaterPending : PendingBuffer
{
public DeflaterPending() : base(DeflaterConstants.PENDING_BUF_SIZE)
{
}
}
}

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