Compare commits

...

261 Commits

Author SHA1 Message Date
Alex Ionescu
b549f29b90 Winsock, Ws2Help, MsAfd, MsWinSck, WshTcpIp re-write branch.
svn path=/branches/reactos/; revision=14240
2005-03-20 21:57:01 +00:00
Filip Navara
8b0ad6b22f Minor correction to my r14237 commit. Forgot to delete "++".
svn path=/trunk/; revision=14239
2005-03-20 21:44:58 +00:00
Filip Navara
a9c2167a20 Reorder the source file lists so we, lousy people, building with DEPENDENCIES=no can also enjoy the blessing of the PnP gods.
svn path=/trunk/; revision=14238
2005-03-20 21:40:00 +00:00
Filip Navara
17a549a975 Generate code without L-value casts.
svn path=/trunk/; revision=14237
2005-03-20 21:35:12 +00:00
Thomas Bluemel
86a52339fb revert changes from CreateFileA
svn path=/trunk/; revision=14236
2005-03-20 20:46:16 +00:00
Eric Kohl
b718e3cc4e - Add stubs: CM_GetChild, CM_GetChild_Ex, CM_GetParent, CM_GetPaarent_Ex, CM_GetSibling, CM_GetSibling_Ex, CM_Locate_DevNodeA, CM_Locate_DevNodeW, CM_Locate_DevNode_ExA, CM_Locate_DevNode_ExW
- Implement:  CM_GetVersion, CM_GetVersion_Ex, CM_Connect_MachineA, CM_Connect_MachineW, CM_Disconnect_Machine.
- Implement RPC server in umpnpmgr.dll to reply to calls to CM_GetVersion/CM_GetVersion_Ex.

svn path=/trunk/; revision=14235
2005-03-20 20:43:46 +00:00
Filip Navara
a0da8855ea There's no need to call PropertySheet twice.
svn path=/trunk/; revision=14234
2005-03-20 20:28:19 +00:00
Thomas Bluemel
b407470ef1 added support for template directories (copy ntfs extended attributes) to CreateDirectoryEx()
svn path=/trunk/; revision=14233
2005-03-20 20:27:56 +00:00
Filip Navara
34484a48d9 Initialize the "toc" field in the pdb_lookup structure in order
to prevent pdb_free_lookup from trying to delete invalid pointers.

svn path=/trunk/; revision=14232
2005-03-20 19:11:52 +00:00
Thomas Bluemel
0f4cfdb301 - added support for template files (copy ntfs extended attributes) to CreateFile()
- mask out file flags from dwFlagsAndAttributes before passing them to NtCreateFile as file attributes

svn path=/trunk/; revision=14231
2005-03-20 18:55:54 +00:00
Filip Navara
b4d371d7d2 Don't use uninitialized variable in _SHExpandEnvironmentStrings.
svn path=/trunk/; revision=14230
2005-03-20 18:40:57 +00:00
Hervé Poussineau
e8ecbebd7d Based on work by Mark Junker <mjscod@gmx.de>
- Detect UART type
- Clear transmit/receive FIFO if applicable

svn path=/trunk/; revision=14229
2005-03-20 18:30:09 +00:00
Magnus Olsen
0936234d7d LPUNKNOWN pUnkOuter did check it was NULL and return
forget it should be not equal with NULL it return 
thx to mifritscher did the first test to find my mistake

svn path=/trunk/; revision=14228
2005-03-20 18:20:59 +00:00
Gunnar Dalsnes
124f38a790 GetBinaryTypeA, CopyFileExA, CreateFileA, DeleteFileA, MoveFileWithProgressA: Use common A2W conv. routines
svn path=/trunk/; revision=14227
2005-03-20 17:39:11 +00:00
Gunnar Dalsnes
de75c774c3 removed faulty FilenameA2U (returned ptr to stack var)
remove faulty init of StaticUnicodeString (now done in ntdll)

svn path=/trunk/; revision=14226
2005-03-20 17:26:58 +00:00
Magnus Olsen
08482c30b1 start add hardware interface to hal
we now map the hal to directdraw 

follow api are implement in the ddraw for hal
but all hal api are not implement in the kernel
if you got louky it maby working with nvida driver now. 

untested yet. 

svn path=/trunk/; revision=14225
2005-03-20 17:24:11 +00:00
Gunnar Dalsnes
bab510233f init StaticUnicodeString
svn path=/trunk/; revision=14224
2005-03-20 17:22:24 +00:00
Thomas Bluemel
de138c3bb4 - fixed access rights and shared access checks in IoSetShareAccess()
- remove obsolete checks in IoCheckShareAccess() and IoUpdateShareAccess() to simplify them

svn path=/trunk/; revision=14223
2005-03-20 15:54:22 +00:00
Thomas Bluemel
8b9646ca2a - only mask out the generic rights flags in RtlMapGenericMask()
- only deny access when requested rights can't be granted in IoCheckDesiredAccess()

svn path=/trunk/; revision=14222
2005-03-20 13:53:54 +00:00
Magnus Olsen
fb157f301a this waring break the head for me
pnp.c:141: warning: 'Affinity' might be used uninitialized in this function
{standard input}: Assembler messages:

initialized it with Affinity = 0;

svn path=/trunk/; revision=14221
2005-03-20 13:32:27 +00:00
Filip Navara
d73103f0f2 Fix a cut & paste error.
svn path=/trunk/; revision=14220
2005-03-20 13:10:57 +00:00
Filip Navara
2d8afa8978 Allow the lpTemplateDirectory parameter to be NULL in CreateDirectoryExA.
svn path=/trunk/; revision=14219
2005-03-20 13:10:11 +00:00
Eric Kohl
439e6fd789 Improve error messages.
Don't start counting the type_offset for each new fuction. It is a global offset.
Use only basic types in type- and proc-strings (e.g. unsigned long -> long).


svn path=/trunk/; revision=14218
2005-03-20 13:06:11 +00:00
Filip Navara
05bc884b35 - Rename bitblt.c to more generic bitmap.c.
- Normalize BITMAPINFO structure in CreateDIBSection before sending it to win32k.

svn path=/trunk/; revision=14217
2005-03-20 12:30:06 +00:00
Hervé Poussineau
abb9dfec3b Add legacy detection of COM3 and COM4
Be ready for PnP serial ports
Don't hardcode base addresses and irq twice

svn path=/trunk/; revision=14216
2005-03-20 12:15:51 +00:00
Hervé Poussineau
fcc7d2acc7 Implement IoReportDetectedDevice
svn path=/trunk/; revision=14215
2005-03-20 12:15:33 +00:00
Filip Navara
4cae592ec2 Fix nasty condition when we were subtracting AlignedAddress (which happened to be aligned to 0x80000000) from HighestAddress (which is MmSystemRangeStart - 1 == 0x7fffffff) and then using it for length comparsion.
svn path=/trunk/; revision=14214
2005-03-20 12:04:30 +00:00
Filip Navara
b0fb19733c Fix the AdjustTokenPrivileges call once more.
svn path=/trunk/; revision=14213
2005-03-20 11:35:39 +00:00
Thomas Bluemel
0e847f36a6 fixed AdjustTokenPrivileges() call
svn path=/trunk/; revision=14212
2005-03-20 11:22:50 +00:00
Magnus Olsen
a98111e50f Complete the dummy of HAL.
CreateDirectDraw and CreateDirectDrawEx
will return a pointer of ddraw object.
only hardware acclration support are being add.
noting real working yet. 

svn path=/trunk/; revision=14211
2005-03-20 09:58:10 +00:00
Hartmut Birr
f0e4451f31 Fixed the required access rights for formating a disk.
svn path=/trunk/; revision=14210
2005-03-20 09:46:13 +00:00
Filip Navara
572aa1faf4 Minor correction to NtAdjustPrivilegesToken to keep it from returning total junk.
svn path=/trunk/; revision=14209
2005-03-20 01:58:54 +00:00
Filip Navara
c29c8b9124 Revert the last change to device stack attaching.
svn path=/trunk/; revision=14208
2005-03-20 00:53:24 +00:00
Filip Navara
621ded7636 Attach the PDOs to device stack and report device unique IDs if available.
svn path=/trunk/; revision=14207
2005-03-20 00:33:36 +00:00
Magnus Olsen
e7f2044681 did forget these two file
svn path=/trunk/; revision=14206
2005-03-19 23:52:04 +00:00
Magnus Olsen
8b29e58251 update directx d3d and draw header to Wine-20050310
so the work on ddraw dll can continue. 



svn path=/trunk/; revision=14205
2005-03-19 23:47:52 +00:00
Filip Navara
edda3944bc Forgot to add this file in revision 14203.
svn path=/trunk/; revision=14204
2005-03-19 22:50:11 +00:00
Filip Navara
1e7a5224aa - Replace the ColorMap pointer in BITMAPOBJ with palette handle and
correctly free it when the bitmap is about to be destroyed. Also
  get rid of some palette leaks when DIBs were selected into device
  context.
- Refine GDI32 -> Win32k interface for creating and managing brushes.
  Remove NtGdiCreateBrushIndirect, NtGdiCreateDIBPatternBrush,
  NtGdiCreateDIBPatternBrushPt and NtGdiFixBrushOrgEx syscalls and
  add NtGdiCreateDIBBrush.
- Implement basic support for DIB pattern brushes.
- Add user mode helper routine for "normalizing" BITMAPINFO structure.
- Add definition for BITMAPV5HEADER.

svn path=/trunk/; revision=14203
2005-03-19 22:15:02 +00:00
Filip Navara
db3d786f03 Specify correct buffer size in GetPrivateProfileStringW calls.
svn path=/trunk/; revision=14202
2005-03-19 21:48:33 +00:00
Magnus Olsen
8da44c3750 add more code.
start create a protype of hal, that can be use also for
software emulation mode. 

svn path=/trunk/; revision=14201
2005-03-19 20:39:25 +00:00
Alex Ionescu
a04bad112d Oops
svn path=/trunk/; revision=14200
2005-03-19 20:29:19 +00:00
Alex Ionescu
396ff5690c Correct NtW32call to call correct kernel function, add placeholder for SEH, implement KeUserModeCallback (right now a copy of the old code). Part I of an incomplete W32Callback rewrite, just to set up the groundwork to make testing easier. Might look ugly/messy now but it'll be clean soon
svn path=/trunk/; revision=14199
2005-03-19 20:26:46 +00:00
Filip Navara
52a70e745d Fix indentation.
svn path=/trunk/; revision=14198
2005-03-19 19:52:36 +00:00
Thomas Bluemel
6c8fad94ac - correctly deny access to handles when rights requested can't be granted
- map generic rights correctly
- various fixes where handles with inappropriate access rights were created

svn path=/trunk/; revision=14197
2005-03-19 19:13:01 +00:00
Emanuele Aliberti
6f3c732b92 winsta.dll raw stubs
svn path=/trunk/; revision=14196
2005-03-19 18:31:14 +00:00
Magnus Olsen
9cb33ba90d geting update version of ddraw.h working with gdi32.h
thanks filip. 

svn path=/trunk/; revision=14195
2005-03-19 18:28:01 +00:00
Magnus Olsen
dd212d63c9 update the ddraw.h header ageinst Wine-20050310
so the work on ddraw dll can continue. 

this header file have been modify to geting reactos compile and add one struct and fix some protypes that was wrong.

svn path=/trunk/; revision=14194
2005-03-19 18:26:45 +00:00
Filip Navara
ee054cd0f4 Export the HOST variable even on Windows.
svn path=/trunk/; revision=14193
2005-03-19 17:22:02 +00:00
Aleksey Bragin
1ca3f8ce13 Fix a very small typo - "VfatFormat() done" to "VfatxFormat() done"
svn path=/trunk/; revision=14192
2005-03-19 17:11:15 +00:00
Magnus Olsen
229fed0315 lite more code.
nothing works yet. 
add some check see if the parama are right. 

svn path=/trunk/; revision=14191
2005-03-19 10:22:52 +00:00
Martin Fuchs
e24c42bb6b - unregister task manager window at termination
svn path=/trunk/; revision=14190
2005-03-19 09:37:46 +00:00
Martin Fuchs
cf95dc8b1b - remove old experimental shell hook code
svn path=/trunk/; revision=14189
2005-03-19 09:37:24 +00:00
Hartmut Birr
0692378689 Added two missing dereferencing calls in ObReferenceObjectByHandle.
Checked also for NtCurrentThread in NtDuplicateObject.  
Used the return value from InterlockedIncrement to check for a correct handle count.

svn path=/trunk/; revision=14188
2005-03-19 09:18:58 +00:00
Hartmut Birr
c2a04f5107 Added two missing dereferencing calls in NtTerminateThread.
svn path=/trunk/; revision=14187
2005-03-19 09:14:21 +00:00
Filip Navara
e54de54618 - Fix acpi_os_get_thread_id to return 1-based thread ids (instead of zero-based ones).
- Zero the owner_id field while initializing acpi_gbl_acpi_mutex_info.

svn path=/trunk/; revision=14186
2005-03-19 02:18:49 +00:00
Royce Mitchell III
8b3af26269 fix warning that is really a bug - from looking at the code, wDevID, is a UINT, not a UINT_16
svn path=/trunk/; revision=14185
2005-03-19 01:37:47 +00:00
Alex Ionescu
e389f0c999 Implement timer expiring too fast for KeDelayExecutionThread. Dedicated to filip
svn path=/trunk/; revision=14184
2005-03-18 23:26:44 +00:00
Martin Fuchs
0412c84cea register ourselved as task manager window to make the RegisterShellHookWindow() call working [thanks to Filip :)]
svn path=/trunk/; revision=14183
2005-03-18 23:00:54 +00:00
Martin Fuchs
a5b6da0234 cleanup of latest RegisterShellHookWindow() changes
svn path=/trunk/; revision=14182
2005-03-18 20:34:01 +00:00
Gunnar Dalsnes
846dc1aebe -remove incorrect handle count check when deleting files
-reformat code

svn path=/trunk/; revision=14181
2005-03-18 19:36:36 +00:00
Hervé Poussineau
f0bec76acd Fix a warning with some compilers about non-initialized variable.
This can't really happen in real execution, but let's be the compiler happy ;)

svn path=/trunk/; revision=14180
2005-03-18 19:00:48 +00:00
Hervé Poussineau
64944b49f7 Don't double-define STATUS_ARRAY_BOUNDS_EXCEEDED
svn path=/trunk/; revision=14179
2005-03-18 17:45:59 +00:00
Hervé Poussineau
301637bbde Implement partly IoReportResourceForDetection() and IoReportDetectedDevice(), just enough to support serial driver
svn path=/trunk/; revision=14178
2005-03-18 16:51:39 +00:00
Hervé Poussineau
08da4a07b0 Implement legacy detection (it should be able to detect the first two serial ports)
Implement reading by polling (expect lots of bugs!)
Use receive and send queues
Better handling of some IRPs
Lots of small bugs fixes

svn path=/trunk/; revision=14177
2005-03-18 16:01:35 +00:00
Thomas Bluemel
343e3f7bdc can't receive the cid from a KTHREAD structure, fixes compiling with debugging enabled
svn path=/trunk/; revision=14176
2005-03-18 13:52:21 +00:00
Alex Ionescu
c2c6049107 Update ETHREAD fields and termination port stucture to XP, and do necessary code changes. This makes reaping even faster. It's 2:30am, i hope there's no bugs ;-)
svn path=/trunk/; revision=14175
2005-03-18 07:19:30 +00:00
Alex Ionescu
eb54434d27 Thread/Process Termination/Repeaing Rewrite + Fixes
---------------------------------------------------

    - ps/cid.c: 
            * Moved CID Lookup functions here
            
    - ps/security.c: 
            * Moved all security related functions here. Makes other files neater and security functions
              easier to locate.
              
    - ps/thread.c: 
            * Moved most of the Thread Scheduling/Dispatching code that belongs in the Kernel to /ke and
              renamed functions from Ps to Ki.
            * Implemented PsIsSystemThread.
            * Removed Reaper Thread Init (now obsolete).
            * Renamed PiDeleteThread to PspDeleteThread.
            * Moved Thread State functions from tinfo.c to here.
            
    - ps/process.c:
            * Removed Query/Set Process functions and moved to ps/query.c
            * Renamed PiDeletePRocess to PspDeleteProcess
            * Removed obsoleted Process Termination functions, moved persistent one to kill.c
    
    - ps/create.c:
            * Moved the security APIs to security.c
            * Correctly implemented PsCreateSystemThread to actually create system threads.
        
            
    - ps/suspend.c
            * Rewrote Nt Executive functions to use Kernel functions.
            * Moved Ps* Routines into ke/kthread.c and fixed them. The implementation was wrong in
              some aspects, especially the issue of the APC looping around the KeWaitXxx call and the
              fact that the routines excluded/ignored the FreezeCount.
            
    - ps/debug.c
            * Fixed completely broken implementation of Get/SetThreadContext. The old version crashed
              when called and did not work at all. Suspend Regression test now works.
            * Moved Context<->TrapFrame functions to ke/i386/
            * Combined Set/GetThreadContext APCs into a single one, and used special context structure.
            
    - ps/query.c:
            * Moved Thread/Process Query/Set Routines here.
            
    - ps/tinfo.c:
            * Removed.
            
    - ps/kill.c
            * Removed complicated Process Termination semantics and useless Attach/Detach in favor for
              a much more lightweight function which performs the same tasks as before and actually works.
              TaskManager can now terminate foreign processes.
            * Rewrote Thread Reaping to use the HyperCritical Work Queue instead of manually controlled
              thread. This results in much less code as well as an increase in speed and less micro
              management. The reaper is PspReapRoutine. Closing CMD.EXE now works properly without
              requiring masks that were added as hacks to allow it.
            * Renamed PiTerminateProcessThreads to PspTerminateProcessThreads. Fixed it to work with new
              termination code.
            * Added PspDeleteProcess to handle Process Object deletion. Kills the CID Handle here as done
              by Hartmut.
            * Added PspDeletethread here.
            * Renamed and rewrote PsTerminateCurrentThread to PspExitThread. Used NT Implementation out-
              lined in Windows Internals, Chapter 13. Uses less locks, a more concise order of actions,
              actually parses the Termination Ports, handles Dbgk notification. Timers are now rundown,
              and Mutex rundown is in a dedicated Kernel function. Final termination handled by KeTerminate
              Thread as documented.
            * Renamed PsTerminateOtherThread to PspTerminateThreadByPointer and modified implementation to
              be compatible with the changes above.
            * Renamed and regrouped Process Termination into PspExitProcess. Also implemented as described
              above, and moved each subsystem specific termination helper into its own subsytem.
            * Improved NtTerminateProcess and added more debugging messages.
            * Improved NtTerminateThread and added check against System Thread and made it compatible with
              new implementation.
            * Corrected PsTerminateSystemThread now that we support System Threads.
            * Corrected NtRegisterThreadTerminatePort to use same structure name as on windows for the 
              port, and added tag to pool allocation (documented in pooltag.txt)
    
    include/internal/*.h:
    
            * Defined Scheduler Functions and misc new functions or renamed functions.
            
    ke/apc.c:
    
            * Fixed critical bug where APCs were not delivered at all if the thread wastion and cancels any timers that are associated
              to a thread, as well as their APCs and DPCs.
      
    REGRESSIONS FOUND: NONE
    
    BUGS/REGRESSIOSN FIXED:
                * Thread/Get Set Context now works.
                * Suspend Regression test now works.
                * Task manager can now kill foreign processes, even hung ones (like it should).
                * ExitProcess/closing cmd.exe with the 'x' button now works correctly without hacks.
      KNOWN ISSUES: I left a bit of a mess in the headers and some stuff still needs to be moved into the right 
                  places. I just wanted to have this first part ready first, so that it won't get too big.

svn path=/trunk/; revision=14174
2005-03-18 05:53:04 +00:00
Art Yerkes
604f4f13c1 Added simple dword OID query to lan.
Correct oper status, admin status and type settings in iinfo.
Small fixes in lan.c for adapter name.

svn path=/trunk/; revision=14173
2005-03-18 03:26:12 +00:00
Art Yerkes
59c145b801 Don't let sign extension mess us up here.
svn path=/trunk/; revision=14172
2005-03-18 02:56:29 +00:00
Filip Navara
e52a450d86 - Correctly initialize the standard handles for console-less applications.
- Simplify _isatty and fix it to not set the errno for "invalid" handles.

svn path=/trunk/; revision=14171
2005-03-18 02:10:50 +00:00
Steven Edwards
b4e1db6c92 Lined up Buttons.
Removed my broken attempt at understaind comboboxes.
Cleaned up WM_INITDIALOG.

svn path=/trunk/; revision=14170
2005-03-18 00:56:34 +00:00
Filip Navara
e995509c26 It's not exactly wise to call GetFileTime and CloseHandle with invalid handle, so don't do it.
svn path=/trunk/; revision=14169
2005-03-17 23:52:28 +00:00
Filip Navara
b8419654bd Don't try to release mutex with NULL handle. Also prevent releasing the same mutex twice.
svn path=/trunk/; revision=14168
2005-03-17 23:16:12 +00:00
Filip Navara
310a5bcfb7 Don't try to duplicate NULL handles.
svn path=/trunk/; revision=14167
2005-03-17 22:40:19 +00:00
Filip Navara
a384c6e670 (GDIOBJ_SetOwnership): Don't try to decrease the GDI object counter for global handles since they're not associated with process.
svn path=/trunk/; revision=14166
2005-03-17 22:00:19 +00:00
Magnus Olsen
02755a61f0 more stuff for ddraw.dll not tested yet.
svn path=/trunk/; revision=14165
2005-03-17 20:15:44 +00:00
Hartmut Birr
eabbaacd53 Don't close the handle if the write back does fail (in NtOpenProcessTokenEx).
svn path=/trunk/; revision=14164
2005-03-17 19:35:16 +00:00
Steven Edwards
fc4c441263 Dedicated to Alex.
I give to you "The ReactOS License Manager"

No its just a dummy dialog I wrote to learn how to make
Control Panel Applets. Please don't implement this.

svn path=/trunk/; revision=14163
2005-03-17 19:03:55 +00:00
Hartmut Birr
100f53e3ab - Moved the deleting of the process id from PiTerminateProcess to PiDeleteProcessWorker.
- Checked the status at the end of NtOpenProcessTokenEx.

svn path=/trunk/; revision=14162
2005-03-17 18:51:20 +00:00
Aleksey Bragin
a392c38668 One more assert added, but unfortunately it isn't triggered currently...
svn path=/trunk/; revision=14161
2005-03-17 16:09:12 +00:00
Filip Navara
f60f345d30 - Don't try to kill non-existing timers.
- Close dialog using EndDialog instead of DestroyWindow.

svn path=/trunk/; revision=14160
2005-03-17 13:17:05 +00:00
Filip Navara
643a182dd0 Now that CSRSS is getting unloaded we must unregister the primitive message queue when it's about to be destroyed.
svn path=/trunk/; revision=14159
2005-03-17 13:07:28 +00:00
Gunnar Dalsnes
cd4a8585a8 scanf: fix handling of %n token
svn path=/trunk/; revision=14157
2005-03-17 00:31:40 +00:00
Gunnar Dalsnes
9019d252be scanf: fix handling of %n token
svn path=/trunk/; revision=14154
2005-03-16 23:59:41 +00:00
Robert Kopferl
847aa89893 To do once more a little piece os2ss
svn path=/trunk/; revision=14153
2005-03-16 23:51:26 +00:00
Magnus Olsen
1020ee4805 add regsvr.c from wine as frist implement of ddraw.
so it can registrate it selv into the register. 

svn path=/trunk/; revision=14152
2005-03-16 23:23:44 +00:00
Magnus Olsen
c72257a26f small change to start to implement ddraw.dll
svn path=/trunk/; revision=14151
2005-03-16 23:21:00 +00:00
Magnus Olsen
d1274928bb small change to start to implement ddraw.dll
svn path=/trunk/; revision=14150
2005-03-16 23:17:33 +00:00
Gé van Geldorp
8753158ddb Add riched20.dll, msi.dll and msiexec.exe to bootcd
svn path=/trunk/; revision=14149
2005-03-16 22:52:55 +00:00
Hervé Poussineau
b6ef4c6ee6 Better NtUserEnumDisplayDevices stub
svn path=/trunk/; revision=14148
2005-03-16 22:27:47 +00:00
Hervé Poussineau
96b374677d Implement resolution and color depth selection.
Applying new settings doesn't work due to unimplemented NtUserChangeDisplaySettings

svn path=/trunk/; revision=14147
2005-03-16 22:19:12 +00:00
Gé van Geldorp
4dde3a1c21 Fix eol-style
svn path=/trunk/; revision=14146
2005-03-16 22:18:42 +00:00
Filip Navara
37c4d8279f Initialize the pGdiInfo->flRaster field to zero.
svn path=/trunk/; revision=14145
2005-03-16 21:28:21 +00:00
Klemens Friedl
c79360a933 Mindflyer, a.k.a. mf <mf@mufunyo.net>
alternative icon files
* mycomputer icon
* terminal icon

svn path=/trunk/; revision=14144
2005-03-16 21:18:33 +00:00
Filip Navara
baefc0115b Fix some logic in port management code.
svn path=/trunk/; revision=14143
2005-03-16 21:03:51 +00:00
Thomas Bluemel
d86736989a Rouven Wessling <rouven@rouvenwessling.de>:
calc:
- fixed spelling mistakes
ncpa, aclui:
- German translation

svn path=/trunk/; revision=14142
2005-03-16 20:36:02 +00:00
Filip Navara
11c6007bb9 Ulrich Czekalla <ulrich@codeweavers.com>
Set WS_EX_CONTROLPARENT when dialog has DS_CONTROL.
Mike McCormack <mike@codeweavers.com>
Strip WS_CAPTION and WS_SYSMENU for child dialogs.

svn path=/trunk/; revision=14141
2005-03-16 20:13:55 +00:00
Aleksey Bragin
31046fef6e Ivan Semenoff <ivans77@mail.ru>
Fixed a bug in RtlClearBits (asserting if startingindex+count is more than size, instead of silently continuing processing).

svn path=/trunk/; revision=14140
2005-03-16 19:27:45 +00:00
Hervé Poussineau
4d47498931 Saveliy Tretiakov <saveliyt@mail.ru>
- Only one file may be open on a port at any given time
- Implemented IOCTL_SERIAL_GET_STATS and IOCTL_SERIAL_CLEAR_STATS

svn path=/trunk/; revision=14139
2005-03-16 19:24:41 +00:00
Gé van Geldorp
ba0f1263e4 Reapply Wine-20050310 changes, this time with the changes
to the include files. Where's CIS when you need it :P

svn path=/trunk/; revision=14138
2005-03-16 17:30:11 +00:00
Gregor Anich
9577665661 Rename patch to binpatch in apps/utils
svn path=/trunk/; revision=14137
2005-03-16 16:25:54 +00:00
Gregor Anich
c165636757 Rename patch to binpatch.
svn path=/trunk/; revision=14136
2005-03-16 16:24:20 +00:00
Gregor Anich
a00d9b33dc Simple patch-creation tool (not much tested, but should work)
svn path=/trunk/; revision=14135
2005-03-16 14:01:52 +00:00
Hervé Poussineau
534636f9ce Revert revision 14118 changes
svn path=/trunk/; revision=14134
2005-03-16 12:33:26 +00:00
Magnus Olsen
9189284a9d implemnet NtGdiDdGetDriverInfo and NtGdiDdWaitForVerticalBlank
it is untested. 

svn path=/trunk/; revision=14133
2005-03-16 11:50:24 +00:00
Hervé Poussineau
89cc6c3c47 Christoph von Wittich <Christoph@ApiViewer.de>
Added Unicode support and fixes cannot compile problem

svn path=/trunk/; revision=14132
2005-03-16 11:26:14 +00:00
Gé van Geldorp
080bf05b6d Thomas Larsen <sikker2004@yahoo.com>
- Danish Translation

svn path=/trunk/; revision=14131
2005-03-16 09:45:26 +00:00
Gé van Geldorp
f07f87eb09 Thomas Larsen <sikker2004@yahoo.com>
- Danish translation

svn path=/trunk/; revision=14130
2005-03-16 09:42:40 +00:00
Gé van Geldorp
bb2b8992b4 Thomas Larsen <sikker2004@yahoo.com>
- updated danish language

svn path=/trunk/; revision=14129
2005-03-16 09:22:30 +00:00
Gé van Geldorp
53ac0de2ad Thomas Larsen <sikker2004@yahoo.com>
- added danish language

svn path=/trunk/; revision=14128
2005-03-16 09:19:12 +00:00
Gé van Geldorp
03cf4fc8db Thomas Larsen <sikker2004@yahoo.com>
- added danish language

svn path=/trunk/; revision=14127
2005-03-16 09:16:13 +00:00
Gé van Geldorp
6b116da4a1 Thomas Larsen <sikker2004@yahoo.com>
- added danish language

svn path=/trunk/; revision=14126
2005-03-16 09:13:28 +00:00
Gé van Geldorp
206cbe2545 Thomas Larsen <sikker2004@yahoo.com>
- added danish language

svn path=/trunk/; revision=14125
2005-03-16 09:10:23 +00:00
Art Yerkes
ff056457a2 consw has not been needed for a long time.
svn path=/trunk/; revision=14124
2005-03-16 09:02:07 +00:00
Gé van Geldorp
e95a8de179 Update status
svn path=/trunk/; revision=14120
2005-03-16 08:34:44 +00:00
Gé van Geldorp
23265de0b9 Sync to Wine-20050310:
Michael Jung <mjung@iss.tu-darmstadt.de>
- Beginning of a shell namespace extension to browse the unix
  filesystem.
- Fixed parsing of ITEMIDLIST in InitializeTreeView.
- Added some documentation.
- Fixed a crash occuring when the user double-clicks a leaf item.
Dimitrie O. Paun <dpaun@rogers.com>
- Add support for .exe's with exported functions.
Francois Gouget <fgouget@free.fr>
- Assorted spelling fixes.
- Add the -noname flag to match the Platform SDK.
- Don't hardcode ordinals if which are not hardcoded on Windows.
Juan Lang <juan_lang@yahoo.com>
- Convert more API calls to Unicode.
- Convert tabs to space, wrap long lines, make indenting consistent.
- Convert a few calls to Unicode.
Mike McCormack <mike@codeweavers.com>
- handle IFileSystemBindData in ISF_Desktop_fnParseDisplayName
- more Unicode conversion
- handle IFileSystemBindData in IShellFolder::ParseDisplayName
- convert IShellFolder::ParseDisplayName to use Unicode
- Remove tabs and make formatting consistent.
- Reindent some code to improve readability.
- Define some extra SHFGI values.
- Remove tabs and reformat.
- Use lstrcmpiA in preference to strcasecmp.
- Make lstr* functions inline inside Wine.
- implement loading and saving of MSI advertised shortcut info
- make more test cases pass
- read and write the location block
- improve the binary compatibility of lnk files
- Cleanup, create unicode versions of _ILCreateFromPath,
  _ILCreateGuidFromStr, and _ILCreateFromFindData.
Jon Griffiths <jon_p_griffiths@yahoo.com>
- Documentation spelling fixes.
Hans Leidekker <hans@it.vu.nl>
- Revert wrong -noname markup for Drag*, DoEnvironmentSubst and
  SHGetNewLinkInfo{A,W}.
- Also mark stub exports -noname when they are exported by ordinal
  only on win98/2k.
- Implementation level stubs for SheChangeDirA, SheGetDirA,
  SHHelpShortcuts_RunDLL{A,W}.
- New spec file stubs for Control_RunDLLAsUserW,
  FixupOptionalComponents, OCInstall, SHChangeNotifySuspendResume,
  SHCreateProcessAsUserW, SHExtractIconsW,
  SHInvokePrinterCommand{A,W}, SHIsFileAvailableOffline,
  SHLoadNonloadedIconOverlayIdentifiers, SHPathPrepareForWrite{A,W},
  ShellExec_RunDLL{,A,W}, SHGetIconOverlayIndex{A,W}.
- Mark exports -noname when they are exported by ordinal only on
  win98/2k.
Marcelo Duarte <wine-devel@bol.com.br>
- Update the resources for Portuguese.
Filip Navara <xnavara@volny.cz>
- Don't crash if ShellFolder doesn't implement the IID_ISFHelper
  interface.
Dmitry Timoshkov <dmitry@codeweavers.com>
- Fix prototypes of GetClassLongA/W, GetClassLongPtrA/W and
  SetClassLongA/W according to SDK definitions.
- Add prototypes for SetClassLongPtrA/W, protect some GWL_ and GCL_
  constants from using in Wine or in _WIN64 mode.
- Fix all places in Wine affected by the above changes.
- Convert winemenubuilder to unicode.
Alex Villacis Lasso <a_villacis@palosanto.com>
- Change SUBLANG_DEFAULT to SUBLANG_NEUTRAL for LANG_SPANISH in all
  resources, so that Spanish locales other than Spain also use Spanish
  resources.
Marcus Meissner <marcus@jet.franken.de>
- Output some more informations.
- Mark one global variable static.
Huw Davies <huw@codeweavers.com>
- SetPath("") should return S_OK.
  SetPath("nonexistent_path") should return S_FALSE.
- Don't prepend '\\' to the subkey name.
Joris Huizer <jorishuizer@planet.nl>
- renamed file_operation_delete and to shfileops_delete
- renamed file_operation_checkFlags to shfileops_check_flags
- added helper function shfileops_do_operation()
- added helper function shfileops_get_parent_attr()
- added helper function shfileops_get_parent_attr2()
- various cleanups in SHFileOperationW using these functions
Ge van Geldorp <gvg@reactos.com>
- Error numbers >= 32 are to be expected.

svn path=/trunk/; revision=14118
2005-03-16 07:51:01 +00:00
Alex Ionescu
4bf67aaf0f Fix dillo/vncviewer regressions (semaphore bug). thanks to art and waxdragon for notifying me of the regressions.
svn path=/trunk/; revision=14117
2005-03-16 03:12:32 +00:00
Gé van Geldorp
fbfe053b9b Don't crash when debugger asks for invalid memory location
svn path=/trunk/; revision=14116
2005-03-15 23:47:13 +00:00
Filip Navara
82c445e96b Accidently forgot to disable the debug messages.
svn path=/trunk/; revision=14115
2005-03-15 23:33:54 +00:00
Filip Navara
1fa5efe3d7 Don't use uninitialized variable in FdoQueryBusRelations.
svn path=/trunk/; revision=14114
2005-03-15 23:27:36 +00:00
Filip Navara
40b71ac19d Fix broken logic in PoInit.
svn path=/trunk/; revision=14113
2005-03-15 23:02:51 +00:00
Filip Navara
3f249a0a67 Set the ACPI flag in loader block *after* performing the ACPI detection.
svn path=/trunk/; revision=14112
2005-03-15 23:02:12 +00:00
Gregor Anich
d001f75197 Improve the WNDOBJ implementation a bit... There are still some problems with the visible area when a window is overlapped by another one...
svn path=/trunk/; revision=14111
2005-03-15 22:26:12 +00:00
Gé van Geldorp
d24e173122 Don't disable debugging just because we want the debug
prints to go to the screen or serial port

svn path=/trunk/; revision=14110
2005-03-15 22:14:22 +00:00
Gregor Anich
43bfb5dd4e Allow mapping of MDLs which describe I/O memory (device memory) into usermode. I hope the changes are correct :-/
svn path=/trunk/; revision=14109
2005-03-15 22:07:05 +00:00
Filip Navara
23475fc1f9 Don't access the Irp->User* fields in NpfsSignalAndRemoveListeningServerInstance. The I/O manager will safely do that for us.
svn path=/trunk/; revision=14108
2005-03-15 22:06:41 +00:00
Gé van Geldorp
cea2f0f1d2 Aric Stewart <aric@codeweavers.com>
- The values are quoted and spaces added, so having spaces in the
  properties results in spaces in the values which is incorrect.

svn path=/trunk/; revision=14107
2005-03-15 21:46:14 +00:00
Gé van Geldorp
67b97bc9ef Sync to Wine-20050310:
Jeremy White <jwhite@codeweavers.com>
- Aggressively round up to the proper alignment when reporting position
  on streams where we are converting up.
- When we are converting from one sample rate to another, we do have to
  adjust when calculating TIME_SAMPLES.
Alex Villacis Lasso <a_villacis@palosanto.com>
- Change SUBLANG_DEFAULT to SUBLANG_NEUTRAL for LANG_SPANISH in all
  resources, so that Spanish locales other than Spain also use Spanish
  resources.
Robert Reif <reif@earthlink.net>
- Added parameter checking to timeGetDevCaps.
- Added timer tests.
Christian Costa <titan.costa@wanadoo.fr>
- Added some more cases to MCI_MapMsgAtoW.
- Fixed offsets calculations.

svn path=/trunk/; revision=14106
2005-03-15 21:44:42 +00:00
Steven Edwards
f4ccfedf3e Use the new ReactOS icon for the boot cd.
svn path=/trunk/; revision=14105
2005-03-15 21:39:07 +00:00
Gé van Geldorp
aafd813531 Francois Gouget <fgouget@free.fr>
- Add a comment explaining why CDLGetLongPathName[AW] and
  IsJITInProgress have hardcoded ordinals.

svn path=/trunk/; revision=14104
2005-03-15 21:38:57 +00:00
Gé van Geldorp
33d7cd5d53 Sync to Wine-20050310:
Dmitry Timoshkov <dmitry@codeweavers.com>
- Fix prototypes of GetClassLongA/W, GetClassLongPtrA/W and
  SetClassLongA/W according to SDK definitions.
- Add prototypes for SetClassLongPtrA/W, protect some GWL_ and GCL_
  constants from using in Wine or in _WIN64 mode.
- Fix all places in Wine affected by the above changes.
Jon Griffiths <jon_p_griffiths@yahoo.com>
- Documentation spelling fixes.
Thomas Weidenmueller <wine-patches@reactsoft.com>
- Forward to user32 when appropriate.
Alex Villacis Lasso <a_villacis@palosanto.com>
- Change SUBLANG_DEFAULT to SUBLANG_NEUTRAL for LANG_SPANISH in all
  resources, so that Spanish locales other than Spain also use Spanish
  resources.

svn path=/trunk/; revision=14103
2005-03-15 21:36:47 +00:00
Gé van Geldorp
ef5b410045 Sync to Wine-20050310:
Jonathan Ernst <Jonathan@ErnstFamily.ch>
- Add French resources.
Henning Gerhardt <henning.gerhardt@web.de>
- Add/updated German resources.
Marcelo Duarte <wine-devel@bol.com.br>
- Update the resources for Portuguese.
- Use "MS Shell Dlg" everywhere except for Japanese.
Juan Lang <juan_lang@yahoo.com>
- Fix a crash if the Mozilla ActiveX control doesn't implement
  DllCanUnloadNow.

svn path=/trunk/; revision=14102
2005-03-15 21:30:32 +00:00
Gunnar Dalsnes
cb05e516a2 fixed GetTempFileNameA/W by ripping from wine
impl. GetLongPathNameA/W by ripping from wine
impl. EnumResourceNamesA/W by ripping from wine
Use common routines for filename A2W/W2A conversion (wine inspired)
impl. ReadDirectoryChangesW (kmode part is not workin yet)
fixed RtlSetCurrentDirectory_U (dont convert to long path)

svn path=/trunk/; revision=14101
2005-03-15 19:40:22 +00:00
Hartmut Birr
e035ce116b On smp machines, unmap all low memory pages (except page 2 and 3).
svn path=/trunk/; revision=14100
2005-03-15 17:38:54 +00:00
Hartmut Birr
2423a80b6b Prevent from accessing DpcEvent in the KPCR structure, because it is currently a NULL pointer.
svn path=/trunk/; revision=14099
2005-03-15 17:35:27 +00:00
Filip Navara
37ac253ad6 Fix debug messages.
svn path=/trunk/; revision=14098
2005-03-15 15:58:36 +00:00
Filip Navara
68ed284f6e Cleanup misleading code.
svn path=/trunk/; revision=14097
2005-03-15 15:57:45 +00:00
Hervé Poussineau
9b56503fc8 Disable serial driver as it is in conflit with sermouse and debug output
svn path=/trunk/; revision=14096
2005-03-15 14:47:41 +00:00
Gé van Geldorp
2850638aad Sync to Wine-20050310:
Americo Jose Melo <mmodem00@netvisao.pt>
Francois Gouget <fgouget@codeweavers.com>
- Translate the Wine resources to Portuguese.
Alex Villacfs Lasso <a_villacis@palosanto.com>
- Change SUBLANG_DEFAULT to SUBLANG_NEUTRAL for LANG_SPANISH in all
  resources, so that Spanish locales other than Spain also use Spanish
  resources.
Juan Lang <juan_lang@yahoo.com>
- Implement SetupDiGetClassDevsA/W, SetupDiEnumDeviceInterfaces,
  SetupDiDestroyDeviceInfoList, and SetupDiGetDeviceInterfaceDetailA for
  serial ports.
Hans Leidekker <hans@it.vu.nl>
- Don't use utf8 in rc files.
Ge van Geldorp <gvg@reactos.com>
- eol-style fixes

svn path=/trunk/; revision=14094
2005-03-15 11:38:15 +00:00
Gé van Geldorp
d4a5e08d97 Sync to Wine-20050310:
Alexandre Julliard <julliard@winehq.org>
- Avoid spaces before preprocessor directives, that's not portable.
Robert Shearman <rob@codeweavers.com>
- Add a stub implementation of RpcImpersonateClient.
- More tracing, particularly on error paths.
- ERROR_IO_PENDING is expected, so don't return an error.
Mike Hearn <mh@codeweavers.com>
- Suppress some useless warnings in the RPC runtime, and make a few
  TRACEs that were reporting problems into WARNs.

svn path=/trunk/; revision=14093
2005-03-15 09:22:34 +00:00
Gé van Geldorp
402686e69a Sync to Wine-20050310:
Mike McCormack <mike@codeweavers.com>
- Forward the RichEdit 1.0 control to the RichEdit 2.0 control.
- Don't clear ES_AUTO[HV]SCROLL in the edit control created by
  richedit.
- Remove unused declaration.
Francois Gouget <fgouget@free.fr>
- Assorted spelling fixes.
Jason Edmeades <us@the-edmeades.demon.co.uk>
- Make the edit field created from a richedit control which was created
  with ES_DISABLENOSCROLL, not have the ES_NUMBER style and hence accept
  alphanumeric input.

svn path=/trunk/; revision=14092
2005-03-15 09:08:16 +00:00
Gé van Geldorp
67347846ec Sync to Wine-20050310:
import

svn path=/trunk/; revision=14091
2005-03-15 09:04:29 +00:00
Gé van Geldorp
0eb4051a93 Make room for vendor import
svn path=/trunk/; revision=14090
2005-03-15 09:01:28 +00:00
Gé van Geldorp
f20f399309 Sync to Wine-20050310:
Alex Villacis Lasso <a_villacis@palosanto.com>
- Change SUBLANG_DEFAULT to SUBLANG_NEUTRAL for LANG_SPANISH in all
  resources, so that Spanish locales other than Spain also use Spanish
  resources.
- eol-style stuff

svn path=/trunk/; revision=14088
2005-03-15 08:10:52 +00:00
James Tabor
e7005a9352 eol-style native
svn path=/trunk/; revision=14086
2005-03-15 00:23:19 +00:00
Gé van Geldorp
f9279fd739 Sync to Wine-20050310:
Jacek Caban <jack@itma.pwr.wroc.pl>
- Implemented GetRecordInfoFromTypeInfo and GetRecordInfoFromGuid.
- Beginnig implementation of IRecordInfo.
- More implementation of IRecordInfo.
Maxime Bellenge <maxime.bellenge@laposte.net>
- Implements OleLoadPicturePath.
Jon Griffiths <jon_p_griffiths@yahoo.com>
- Use variant macros instead of accessing the union directly.
- Documentation spelling fixes.
Alex Villacis Lasso <a_villacis@palosanto.com>
- Implement OleFontImpl_QueryTextMetrics.
- Change SUBLANG_DEFAULT to SUBLANG_NEUTRAL for LANG_SPANISH in all
  resources, so that Spanish locales other than Spain also use Spanish
  resources.
Marcelo Duarte <wine-devel@bol.com.br>
- Update the resources for Portuguese.
Francois Gouget <fgouget@free.fr>
- Assorted spelling fixes.
Vincent Beron <vberon@mecano.gme.usherb.ca>
- Add a stub for OleLoadPicturePath().
Huw Davies <huw@codeweavers.com>
- The typelib cache should take the typelib resource index into
  account.
Mike Hearn <mh@codeweavers.com>
- Allow loading of builtin typelibs.
Marcus Meissner <marcus@jet.franken.de>
- Check for overflows with ClrUsed.

svn path=/trunk/; revision=14085
2005-03-14 23:44:13 +00:00
Gé van Geldorp
9bc71c43a2 Sync to Wine-20050310
svn path=/trunk/; revision=14084
2005-03-14 23:25:39 +00:00
Gé van Geldorp
9a10a39940 Sync to Wine-20050310:
Jon Griffiths <jon_p_griffiths@yahoo.com>
- Documentation spelling fixes.
Mike McCormack <mike@codeweavers.com>
- Implement and test IPropertySetStorage.
- Fix more incorrect uses of STGM_ enumerations.
- Add struct StorageBaseImpl at the start of derived structures instead
  of trying to keep the first members the same.
- StgOpenStorage shouldn't open zero length storage files.
- Shared reading of storage files requires STGM_TRANSACTED.
- Test and fix grfMode handling in StgOpenDocfile.
- Implement StgSetTimes.
Robert Shearman <rob@codeweavers.com>
- Better tracing.
- Small cleanup of creation functions.
- Rename apartment functions to become more object-oriented.
- Rename register_ifstub to marshal_object to more accurately describe
  what it does.
- Add new function, apartment_getoxid, to prepare for a possible
  future patch where remoting is started on demand.
- Move marshaling state machine into stub manager from ifstub.
- Add additional needed states for table-weak marshaling, as shown by
  tests.
- Protect external reference count from underflows/overflows.
- Make COM use the RPC runtime as the backend for RPC calls. Based on a
  patch by Ove Ksven.
- Invoke objects in STA's in the correct thread by sending messages to
  the hidden apartment window.
- Use I_RpcGetBuffer, instead of our own buffer routines to fix an
  occasional test crash caused by heap corruption.
- Zero the memory block passed to RpcServerRegisterIfEx so we don't
  pass garbage in some of the fields we don't fill in.
- Return the correct error code from create_server and fix two handle
  leaks.
- TODO update.
- Remove cruft left over from previous RPC backend implementation in
  the apartment structure.
- Don't pass an IPID by value for proxy_manager_create_ifproxy.
- Disable more of RPC_UnregisterInterface to prevent the RPC runtime
  using freed memory.
- Rename various external RPC backend functions so that they all have
  the same "RPC_" prefix.
- Reduce the timeout of the function that connects to a local server
  to 30s, like native.
- Make each ifproxy have its own channel buffer to fix a bug where a
  proxy with multiple interfaces could invoke the wrong stub buffer on
  the server.
- The Global Interface Table should do table-strong marshaling instead
  of normal marshaling so that an interface can be retrieved more than
  one time.
Mike Hearn <mh@codeweavers.com>
- Avoid infinite loop when doing a typelib marshalled
  IUnknown::QueryInterface by only doing an extra QI if requested IID is
  not equal to marshalled IID.
Rob Shearman <rob@codeweavers.com>
Mike Hearn <mh@codeweavers.com>
- Add re-entrancy tests to the test suite.
- Run RPCs on a new thread client side so we can pump the message
  loop.
Juan Lang <juan_lang@yahoo.com>
- Fix the calling convention of DllCanUnloadNow.
- Move vtbl to end of file and get rid of unnecessary prototypes.
- Implement StgCreatePropSetStg.
Joris Huizer <jorishuizer@planet.nl>
- A few memory checks avoiding memory leaks.
Francois Gouget <fgouget@free.fr>
- Assorted spelling fixes.
Paul Vriens <Paul.Vriens@xs4all.nl>
- Added some TRACE statements.

svn path=/trunk/; revision=14083
2005-03-14 23:17:44 +00:00
Gé van Geldorp
8c43665c8d Sync to Wine-20050310
svn path=/trunk/; revision=14082
2005-03-14 22:56:02 +00:00
Gé van Geldorp
5df62c8577 Sync to Wine-20050310:
Ulrich Czekalla <ulrich@codeweavers.com>
- Add support for radio buttons.
- Allocate space for terminating null.
- Fix a memory leak.
- Prevent accessing freed memory in failure case.
Mike McCormack <mike@codeweavers.com>
- Add a border to the edit control, add some more controls.
- Implement SQL delete query.
- Move product, feature and component enumeration functions to
  registry.c.
- Make sure strings are null terminated.
- Fix up the summary information code a little.
- Allow MsiViewExecute to be called twice on the same query.
- Implement MsiDatabaseGetPrimaryKeys.
- MsiGetComponentPath should allow null pointers for pcchBuf and
  lpPathBuf.
- Remove const declaration from non-const function.
Jose Manuel Ferrer Ortiz <jmfo1982@yahoo.es>
- Added MSI Spanish resources.
Juan Lang <juan_lang@yahoo.com>
- Implement MsiEnumRelatedProducts.
- make sure msihandle2msiinfo is correctly matched with msiobj_release
- don't do redundant NULL checks
- Don't hardcode windows or system directories, correct a typo.
- Fix a regression in AppSearch.
Jonathan Ernst <Jonathan@ErnstFamily.ch>
- Add French resources.
Henning Gerhardt <henning.gerhardt@web.de>
- Add/updated German resources.
Marcelo Duarte <wine-devel@bol.com.br>
- Update the resources for Portuguese.
Francois Gouget <fgouget@free.fr>
- Assorted spelling fixes.
Alexandre Julliard <julliard@winehq.org>
- Avoid spaces before preprocessor directives, that's not portable.
Aric Stewart <aric@codeweavers.com>
- Text reformatting patch to clean up all the static strings.
- Implement the action RegisterFonts.
- Add the ExecuteAction handler.
- Store the keypath, and do refcounting and registration of SharedDLLs.
- Fix a bug with handing dword values in the registry.
- Fix bugs with writing registry keys where value == NULL.
- Make use of msidefs.h.
- Lay some groundwork for uninstalls.
- Update the installed state for components during CostFinalize. Laying
  groundwork to be able to start processing uninstall logic as well.
- Fixed problems with my code for finding the PackageCode.
- Stubs for MsiUseFeature.
- Do some basic work with registry component paths.
- Make sure formats like [\\]] and [\\[] work properly.
Steven Edwards <steven@codeweavers.com>
- Correct typo.
Marcus Meissner <marcus@jet.franken.de>
- Output some more informations.
- Mark one global variable static.

svn path=/trunk/; revision=14081
2005-03-14 22:54:57 +00:00
Emanuele Aliberti
9cc503a1b2 SMDLL + SMLIB (static code in SMSS.EXE)
SM now self registers for IMAGE_SUBSYSTEM_NATIVE.

svn path=/trunk/; revision=14080
2005-03-14 22:38:12 +00:00
Gé van Geldorp
f689818f82 Sync to Wine-20050310:
Marcelo Duarte <wine-devel@bol.com.br>
- Use "MS Shell Dlg" everywhere except for Japanese.
Alex Villacis Lasso <a_villacis@palosanto.com>
- Change SUBLANG_DEFAULT to SUBLANG_NEUTRAL for LANG_SPANISH in all
  resources, so that Spanish locales other than Spain also use Spanish
  resources.

svn path=/trunk/; revision=14079
2005-03-14 22:28:58 +00:00
Gé van Geldorp
cb8820f660 Sync to Wine-20050310:
Alexandre Julliard <julliard@winehq.org>
- Make sure to always pass valid QS_* flags to
  MsgWaitForMultipleObjects.
Christian Costa <titan.costa@wanadoo.fr>
- Implemented GetProperty method for keyboard device.

svn path=/trunk/; revision=14078
2005-03-14 22:24:35 +00:00
Gé van Geldorp
86f13a4752 Sync to Wine-20050310:
Marcelo Duarte <wine-devel@bol.com.br>
- Update the resources for Portuguese.
Dmitry Timoshkov <dmitry@codeweavers.com>
- Fix prototypes of GetClassLongA/W, GetClassLongPtrA/W and
  SetClassLongA/W according to SDK definitions.
- Add prototypes for SetClassLongPtrA/W, protect some GWL_ and GCL_
  constants from using in Wine or in _WIN64 mode.
- Fix all places in Wine affected by the above changes.
Jon Griffiths <jon_p_griffiths@yahoo.com>
- Documentation spelling fixes.
Alex Villacis Lasso <a_villacis@palosanto.com>
- Change SUBLANG_DEFAULT to SUBLANG_NEUTRAL for LANG_SPANISH in all
  resources, so that Spanish locales other than Spain also use Spanish
  resources.
Troy Rollo <wine@troy.rollo.name>
- Fix stack object overrun when an application calls ChooseFontA.
Mike Hearn <mh@codeweavers.com>
- Respect the flags member of the CHOOSEFONT structure, and don't
  attempt to process bogus strings.

svn path=/trunk/; revision=14077
2005-03-14 22:21:18 +00:00
Hervé Poussineau
78237daf70 Add registry entries for serial driver
svn path=/trunk/; revision=14075
2005-03-14 21:30:25 +00:00
Hervé Poussineau
df94eae35b Start of the serial driver:
Handle write support and some IOCTL codes
First serial port is mapped to COM3 and second serial port is mapped to COM4. This prevents conflicts with existing code.

svn path=/trunk/; revision=14074
2005-03-14 20:59:50 +00:00
Thomas Bluemel
42819f010e revert the changes i accidently made, sorry
svn path=/trunk/; revision=14065
2005-03-14 16:10:21 +00:00
Thomas Bluemel
9309c80c1b implemented the SystemInterruptInformation information class to fill the structure with empty data to make process explorer shut up
svn path=/trunk/; revision=14064
2005-03-14 16:04:12 +00:00
Thomas Bluemel
3f89e7fa88 ignore alignment checks for unimplemented information classes in NtQuery/SetInformationProcess(). This gets sysinternals' ProcessExplorer to run
svn path=/trunk/; revision=14063
2005-03-14 15:23:44 +00:00
Thomas Bluemel
5672781aa4 safely access buffers in NtReadVirtualMemory()
svn path=/trunk/; revision=14062
2005-03-14 15:22:46 +00:00
Thomas Bluemel
2f460387c0 fixed copy+paste mistake
svn path=/trunk/; revision=14061
2005-03-14 14:30:43 +00:00
Thomas Bluemel
666973de7f dereference processes when enumerating them was cancelled. Accidently removed that.
svn path=/trunk/; revision=14060
2005-03-14 13:42:38 +00:00
Thomas Bluemel
437f357dd1 report idling statistics from the idle process, not from the system process
svn path=/trunk/; revision=14059
2005-03-14 13:24:46 +00:00
Thomas Bluemel
009fddf0b2 group idle threads into the idle process
svn path=/trunk/; revision=14058
2005-03-14 13:18:29 +00:00
Gé van Geldorp
61c807a7ec Sync to Wine-20050310:
Martijn Vernooij <yuxdwa702@sneakemail.com>
- Scroll instead of repainting when expanding/collapsing trees.
- Don't repaint on hover if 'hot tracking' isn't on.
Francois Gouget <fgouget@free.fr>
- Add the -noname flag to match the Platform SDK.
- Assorted spelling fixes.
Maxime Bellenge <maxime.bellenge@laposte.net>
- Take into account the new size of a column when the header size
  change.
- Correctly displays the text with ellipsis when there is not enough
  room in a header item and an image from an imagelist is displayed on
  the right of the text.
- Fix SetItem so that items don't get wrongly re-ordered.
Dmitry Timoshkov <dmitry@codeweavers.com>
- Fix prototypes of GetClassLongA/W, GetClassLongPtrA/W and
  SetClassLongA/W according to SDK definitions.
- Add prototypes for SetClassLongPtrA/W, protect some GWL_ and GCL_
  constants from using in Wine or in _WIN64 mode.
- Fix all places in Wine affected by the above changes.
Jon Griffiths <jon_p_griffiths@yahoo.com>
- Documentation spelling fixes.
- Remove unneeded calls to TAB_GetInfoPtr(), const fixes, inline small
  funcs & remove unused parameters.
Dimitrie O. Paun <dpaun@rogers.com>
- Fix indentation for consistency with the rest of the file.
- Unicodification. Small cleanups.
Filip Navara <navaraf@reactos.com>
- Implement SB_SETBORDERS.
Alex Villacis Lasso <a_villacis@palosanto.com>
- Change SUBLANG_DEFAULT to SUBLANG_NEUTRAL for LANG_SPANISH in all
  resources, so that Spanish locales other than Spain also use Spanish
  resources.
Robert Shearman <rob@codeweavers.com>
- Fix one more place where the code assumes row indices are
  zero-based.
- Document a known bug in the layout code.
- Make row number be zero-based.
- Improvements to dumping functions to not dump out fields that may
  not have been filled in.
Michael Stefaniuc <mstefani@redhat.de>
- ImageList_LoadImage{A,W} were basicaly a cut'n'paste of each
  other. Removed the A variant and did a A->W translation.
- ImageList_LoadImageW: get the bitmap size from the image itself and
  not from the mask (ImageList_LoadImageA did that).

svn path=/trunk/; revision=14057
2005-03-14 11:34:02 +00:00
Gé van Geldorp
11039e6faf Sync to Wine-20050310:
Jon Griffiths <jon_p_griffiths@yahoo.com>
- Documentation spelling fixes.
Alexandre Julliard <julliard@winehq.org>
- Allow specifying extended control styles also in standard dialogs
  (reported by Michael Lin).
- Avoid spaces before preprocessor directives, that's not portable.
Francois Gouget <fgouget@free.fr>
- Assorted spelling fixes.

svn path=/trunk/; revision=14056
2005-03-14 11:01:02 +00:00
Gé van Geldorp
61dcda8178 Sync to Wine-20050310:
Merge back WineHQ commits

svn path=/trunk/; revision=14055
2005-03-14 10:44:46 +00:00
Gé van Geldorp
e51a2aab8f Re-import because of SVN problems
svn path=/trunk/; revision=14053
2005-03-14 10:36:02 +00:00
Gé van Geldorp
97445cc205 Sync to Wine-20050310:
Dimitrie O. Paun <dpaun@rogers.com>
- Add support for .exe's with exported functions.

svn path=/trunk/; revision=14052
2005-03-14 10:32:28 +00:00
James Tabor
4b9a323664 Fixed up rc file names.
svn path=/trunk/; revision=14050
2005-03-14 07:21:20 +00:00
Alex Ionescu
8b97b835f2 Support Priority Boosting during Wait Satisfaction and Thread Abortion, and use it where necessary. Should provide a bit more responsiveness.
svn path=/trunk/; revision=14049
2005-03-14 06:44:31 +00:00
Alex Ionescu
3d801bebec Forgot this file.
svn path=/trunk/; revision=14048
2005-03-14 05:54:58 +00:00
Alex Ionescu
6a7ba78c91 Dispatching & Queue Rewrite II:
- Rewrote wait code. It is now cleaner, more optimized and faster. All waiting
      functions are now clearly differentiated instead of sharing code. These functions
      are called up to a dozen times a second, so having dedicated code for each of
      them is a real boost in speed.
    - Fixed several queue issues, made a dedicated queue wait/wake function (you are not
      supposed to use KeWaitFor on a queue, and this is also a speed boost), and make it
      compatible with new wait code.
    - Optimized Work Queue code to be much smaller and better organized, by using an 
      array instead of hard-coded multiple static variables. Also, add support for the
      real NT structures and implementation, paving the road for Dynamic Work Items, which
      also have timeouts, and deadlock dection + debug info.
    - Simplified PsBlockThread and made it compatible with wait code.
    - Added support for priority boosting when unwaiting a thread; will use later, as well
      as put proper boosting for dispatch objects.
    - Inlined all dispatcher lock functions and header initialization for speed.
    - Moved executive wait code into ob.

svn path=/trunk/; revision=14047
2005-03-14 05:54:32 +00:00
Alex Ionescu
e33a78f93b Do not assume that a debugger is present only because we are debugging to a file or to the screen. This corrects bugchecks not to launch an INT3 where no debugger is actually there to catch it.
svn path=/trunk/; revision=14046
2005-03-14 04:51:51 +00:00
Thomas Bluemel
cfdb595cc6 Alex Ionescu <ionucu@videotron.ca>
Dispatcher Objects Rewrite (minus Queues, coming in next patch).
	Global Changes:
 
		- Use KOBJECT enumerations for all objects, remove obsoleted ros-internal enumeration.
		- Reformatting, commenting, and addition of Debug Prints for easier debugging
		- Properly create Executive Objects. They don't need a creation routine.
		- Make sure to properly lock and release the Dispatcher Database.
 
	Mutex/Mutant:
 
		- Correct MUTANT_BASIC_INFORMATION
		- Return previous state in Kernel Functions, intead of 1 or 0 all the time.
		- Initialize listhead properly
		- Removed code duplication between mutant and mutex release.
		- Fix bugs in release
		- Add proper exeption if the mutex is not owned.
 
	Kernel Queues:
 
		- Optimize the code
		- Use Inserted Flag
 
	Timers:
 
		- Some changes in setting the default data to allow KiInsertTimer to be called internally 
		  by the wait code in the next patch.
 
	Events:
 
		- Optimize and simplify KeInitializeEvent
		- Implement KeInitializeEventPair
		- Fix KePulseEvent. It was completely messed up and also used unneeded Interlocked function.
		- Fix KeResetEvent. It was not locking the dispatcher lock but using Interlocked.
		- Fix KeSetEvent. It was not differentiating between Notification and Sycronization events 
		  and also signaling the Event even if nobody was waiting on it.
 
	Semaphores:
 
		- Fix KeReleaseSemaphore. It was not checking if nobody was waiting on it before unwaiting the thread.
		- Fix not releasing dispatcher database before raising an exception.
		- Add check to NtCreateSemaphore to make sure the counts make sense.
 
	Event Pairs:
 
		- Remove Thread Event Pair. They are only used for NT4 QuickLPC which is obsoleted.
		- Use KeInitializeEventPair

svn path=/trunk/; revision=14045
2005-03-14 02:08:17 +00:00
Thomas Bluemel
865a496525 don't receive the previous mode before the current thread was created, this should finally fix the boot.
svn path=/trunk/; revision=14044
2005-03-14 01:47:18 +00:00
Magnus Olsen
78dbb934c2 GetDeviceData
fix the choppy mouse in UT and fix some other small bugs.
I can now use the mouse with out any problem in UT


svn path=/trunk/; revision=14043
2005-03-14 00:36:02 +00:00
Gé van Geldorp
05df4eff43 tinus <o112w8r02@sneakemail.com>:
Use RegisterShellHookWindow

svn path=/trunk/; revision=14042
2005-03-13 23:10:25 +00:00
Gé van Geldorp
fa4bd57bed tinus <o112w8r02@sneakemail.com>:
Implement RegisterShellHookWindow

svn path=/trunk/; revision=14041
2005-03-13 23:08:51 +00:00
Thomas Bluemel
f1fa92f6fc initialize the handle tables before creating them
svn path=/trunk/; revision=14040
2005-03-13 23:03:31 +00:00
Gé van Geldorp
c367070483 Allow cancelling of listen IRPs
svn path=/trunk/; revision=14037
2005-03-13 21:47:04 +00:00
Gé van Geldorp
6f699ce531 arty:
Always keep port numbers in network byte order

svn path=/trunk/; revision=14036
2005-03-13 21:41:44 +00:00
Thomas Bluemel
a8ea6a6ab4 don't use the current process' pid if no process specified.
svn path=/trunk/; revision=14035
2005-03-13 21:37:54 +00:00
Eric Kohl
a3e183bd64 Remove debug printf().
svn path=/trunk/; revision=14033
2005-03-13 21:34:15 +00:00
Eric Kohl
7019953f42 Remove debug printf().
svn path=/trunk/; revision=14031
2005-03-13 21:29:49 +00:00
Emanuele Aliberti
fd01d2046a LsaQueryInfoTrustedDomain stub added
svn path=/trunk/; revision=14028
2005-03-13 20:42:48 +00:00
Thomas Bluemel
57946d8a9a Alex Ionescu <ionucu@videotron.ca>
- Use optimized semantics as previously decided (OPTIMIZED = 1 if DBG = 0)

svn path=/trunk/; revision=14027
2005-03-13 18:55:01 +00:00
Royce Mitchell III
785ffdc0da set eol-style=native
svn path=/trunk/; revision=14026
2005-03-13 18:54:37 +00:00
James Tabor
e19f4b7bd9 Fix paste error.
svn path=/trunk/; revision=14025
2005-03-13 18:51:46 +00:00
James Tabor
7ac15d3bbf Fixup for *nix port
svn path=/trunk/; revision=14024
2005-03-13 18:47:13 +00:00
James Tabor
1bb6977546 Fixup for *nix port
svn path=/trunk/; revision=14023
2005-03-13 18:43:44 +00:00
Thomas Bluemel
b1ce653a14 Alex Ionescu <ionucu@videotron.ca>
- Fix implementation of NT Profile Objects. Structures are guesses, but seem pretty close to the NT ones... a lot of stuff based on David Welch's old implementation, but simplified the way profiles are managed extensively, and also using the same buckethash mechanism as NT, this is required for compatibility with Nt Native APIs that use Profile Objects.
- Removed KDBG internal profile management and associated files. I will re-write the Profiler to use NT Profile Objects, which will allow us more extensibilty while profiling and also greater compatibility with NT.

svn path=/trunk/; revision=14022
2005-03-13 18:41:59 +00:00
Thomas Bluemel
b607cb6445 fixed HANDLE_TABLE structure
svn path=/trunk/; revision=14021
2005-03-13 18:39:38 +00:00
Royce Mitchell III
3d00595df2 c version of wine's 'make_ctests' script
svn path=/trunk/; revision=14020
2005-03-13 18:08:10 +00:00
Royce Mitchell III
539c296fa7 -Wall -Werror and fix warnings
svn path=/trunk/; revision=14019
2005-03-13 17:24:17 +00:00
Royce Mitchell III
5751b32540 -Wall -Werror and fix warnings
svn path=/trunk/; revision=14018
2005-03-13 17:18:33 +00:00
Hartmut Birr
e9ae9105f5 Added a keep-alive reference to each key object.
Lock the registry while accessing sub keys of a key object.  
Implemented a worker thread which removes all unused key objects.  
Fixed a bug which shows keys twice if a key is already opened.

svn path=/trunk/; revision=14017
2005-03-13 17:03:42 +00:00
Emanuele Aliberti
2d250ad2a7 ea@reactos.com
- make SmExecuteProgram work
- implement SmCompleteSession (untested)

svn path=/trunk/; revision=14016
2005-03-13 17:01:59 +00:00
Emanuele Aliberti
12da975bfd ea@reactos.com
Make SmConnectApiPort more safe.

svn path=/trunk/; revision=14015
2005-03-13 17:00:19 +00:00
Hartmut Birr
779a7eeb41 Removed CloseInProcess from object header structure.
svn path=/trunk/; revision=14014
2005-03-13 16:44:15 +00:00
Hartmut Birr
aed77689d2 Added two missing calls to KeLeaveCriticalRegion.
svn path=/trunk/; revision=14013
2005-03-13 16:41:05 +00:00
Martin Fuchs
85fdc76fb2 launch display properties dialog via desktop context menu
svn path=/trunk/; revision=14012
2005-03-13 15:43:02 +00:00
Martin Fuchs
c9f8b0e7e0 remove temporary desktop context menu code from explorer
svn path=/trunk/; revision=14011
2005-03-13 15:30:29 +00:00
Martin Fuchs
0418e694e6 a little context menu code cleanup
svn path=/trunk/; revision=14010
2005-03-13 15:29:53 +00:00
Eric Kohl
28eb04c4db Fix gcc warnings in generated client stub.
svn path=/trunk/; revision=14009
2005-03-13 14:49:59 +00:00
Thomas Bluemel
29bd3ad1f9 revert changes to the config file. I accidently committed it, sorry.
svn path=/trunk/; revision=14008
2005-03-13 14:29:09 +00:00
Thomas Bluemel
d288e05d38 - fixed handle table structures
- implement generic executive handle tables (since there don't exist documents that describe the parameters of most of these functions (which are kernel internal only), i made them up as required)
- adjusted OB's handle manager to use ex handle tables
- adjusted the client id manager to use ex handle tables

svn path=/trunk/; revision=14007
2005-03-13 14:21:47 +00:00
Aleksey Bragin
a3c3364289 Removed excess copy of accidently inserted twice russian language resources.
svn path=/trunk/; revision=14006
2005-03-13 13:59:06 +00:00
Aleksey Bragin
27f383b70d Fixed typos, removed excess copy of accidently inserted twice russian language resources, also fixed "To add new program, click Install" (was cut, so now height increased to 16).
svn path=/trunk/; revision=14005
2005-03-13 13:47:45 +00:00
Magnus Olsen
84a36613f5 getdevicedata
Make the mouse less choopy. 
But it still choopy. It need implement real buffer.
instead it being fild when it is call.

Fix the buffer seq are in right order.


 

svn path=/trunk/; revision=14004
2005-03-13 10:45:23 +00:00
Eric Kohl
53170a9c19 Implement [string] attribute for pointers to char and wchar_t.
svn path=/trunk/; revision=14002
2005-03-13 10:24:34 +00:00
Hartmut Birr
d6c9cf0a41 Use KeGetCurrentPrcb instead of KeGetCurrentKPCR.
svn path=/trunk/; revision=14001
2005-03-13 09:19:33 +00:00
Hartmut Birr
e6bf69e0ae Use only one access to the spinlock in the assertion, because the value may change between two access' on smp machines.
svn path=/trunk/; revision=14000
2005-03-13 09:14:59 +00:00
Hartmut Birr
0d216dc91a Ignore exception 15 in KiTrapHandler.
svn path=/trunk/; revision=13999
2005-03-13 09:10:36 +00:00
Hartmut Birr
0618186aa6 Initialized the key name before each call to ZwCreateKey in IopCreateDeviceKeyPath.
svn path=/trunk/; revision=13998
2005-03-13 09:08:26 +00:00
Hartmut Birr
154d6c64f8 Define IPI_REQUEST_FREEZE.
svn path=/trunk/; revision=13997
2005-03-13 09:06:14 +00:00
Royce Mitchell III
fbff6fe0f0 don't end a string if the last character outputted was an escape, will cause output file to be invalid
svn path=/trunk/; revision=13996
2005-03-13 07:38:40 +00:00
James Tabor
b2f5efa2cf Fix up opps.
svn path=/trunk/; revision=13992
2005-03-13 04:25:09 +00:00
James Tabor
29f3606a01 Fix up Linux port.
svn path=/trunk/; revision=13991
2005-03-13 04:23:35 +00:00
Steven Edwards
bf89d5df7d added winetest gui program. Does not interact with server yet and requires advapi32 and comctl32 tests to be built.
svn path=/trunk/; revision=13989
2005-03-13 01:54:53 +00:00
Magnus Olsen
0bf2971d1a getmousedevice buffer
UT2004 the mouse are less choopy on my computer now.
and small bug fix. it maby still exists some bug left.

svn path=/trunk/; revision=13988
2005-03-13 01:10:46 +00:00
Magnus Olsen
bc1cb8bf6e Fix the mouse for Unreal tormnet 2004, it is working now
have not test it to 100%. But hoppfull it is last fix, geting games that need dinput working now with opengl.

svn path=/trunk/; revision=13987
2005-03-13 00:13:07 +00:00
Gé van Geldorp
108b495229 Allow inter-thread timer setting but not inter-process
svn path=/trunk/; revision=13986
2005-03-12 22:42:38 +00:00
Thomas Bluemel
2a13486746 Alex Ionescu <ionucu@videotron.ca>
- Remove ke/critical.c and move its functions into ke/apc.c
- Reformat ke/apc.c code which I had written messed up (due to MSVC)
- Add a bit more commenting.

svn path=/trunk/; revision=13985
2005-03-12 22:31:22 +00:00
Thomas Bluemel
322dbd6fba Thomas Weidenmueller <w3seek@reactos.com>
- Fix various security structures and constants
- Add code to capture quality of service structures and ACLs
- Secure buffer access in NtQueryInformationToken, NtSetInformationToken, NtNotifyChangeDirectoryFile and NtQueryDirectoryFile

svn path=/trunk/; revision=13984
2005-03-12 22:16:02 +00:00
Magnus Olsen
6830474b06 Now UT2004 start, but the mouse does not work or ?
Still some problem with the mouse buffer on getdevicedata.But it does not freze any longer.

svn path=/trunk/; revision=13983
2005-03-12 22:10:11 +00:00
Thomas Bluemel
7bc94f8976 Alex Ionescu <ionucu@videotron.ca>
- Remove ke/error.c and add its functions into ke/catch.c where they belong.
- Create ex/error.c and move Executive functions present in ke/error.c to it.
- Implement NtRaiseHardError and move it from ke/error.c to ex/error.c.
- Increase Exceptions Dispatched count in dispatch code and comment code more throughly.

svn path=/trunk/; revision=13982
2005-03-12 21:26:29 +00:00
Thomas Bluemel
566c2840b9 Alex Ionescu <ionucu@videotron.ca>
- Reorganized Bootup code. Most of the Executive initialization is now in ex/init.c
- Remove ExPostSystemEvent.
- Sped up Command-line parasing and wrote a function specificalyl for it, to ease extensibility
- Sped up and optimized loading modules from FreeLoader. The data is only looked up once and then the pointers are cached for easy re-use.
- Moved KeGetRecommendedSharedDataAlignmented to ke/main.c and implemented it.
- Moved subsystem-specific intialization to their own subsystem, like Io in ioinit and Cm in CmInit.

svn path=/trunk/; revision=13981
2005-03-12 21:08:29 +00:00
Klemens Friedl
523d77cc92 resource icon added
svn path=/trunk/; revision=13980
2005-03-12 20:59:36 +00:00
Klemens Friedl
0c969fe931 add icon (flags)
svn path=/trunk/; revision=13979
2005-03-12 20:36:23 +00:00
Magnus Olsen
0aa810f5e1 Small bug fix
do not crash UT2004 any longer, but it freze ut2004 
screen. still some problem with getdevicedata for
the mouse. it is the mouse buffer problem. more
apps will work better now. 

svn path=/trunk/; revision=13978
2005-03-12 20:29:51 +00:00
Thomas Bluemel
7fd17a9a85 Alex Ionescu <ionucu@videotron.ca>
- Clean up IO Completion Code
- Properly delete an IO Completion. The IRPs were not freed, resulting in memory leaks

Thomas Weidenmueller <w3seek@reactos.com>
- Add SEH to IO Completion Code

svn path=/trunk/; revision=13977
2005-03-12 19:58:53 +00:00
Klemens Friedl
b21f552e3b * add combobox (select language/region)
* german & english resource files

svn path=/trunk/; revision=13976
2005-03-12 19:46:27 +00:00
Thomas Bluemel
fd962e2f04 Alex Ionescu <ionucu@videotron.ca>
- Fixed formatting mess in ke/dpc.c (which I had made when I wrote it due to MSVC).
- Add more comments where needed.
- Properly Initialize a Threaded DPC.

Thomas Weidenmueller <w3seek@reactos.com>
- Use Prcb directly in KeInitDpc.

svn path=/trunk/; revision=13975
2005-03-12 19:45:37 +00:00
Thomas Bluemel
b2a42182ef Alex Ionescu <ionucu@videotron.ca>
- Removed ke/alert.c and moved its functions where they belong.
- Commented and organized KeInitializeThread.
- Began switch to true KOBJECT enumeration used in NT.
- Implemented KeAlertResumeThread and NtAlertResumeThread.
- Harmonized Formatting in ke/kthread.c

svn path=/trunk/; revision=13974
2005-03-12 19:23:04 +00:00
Klemens Friedl
a8f6850b9f Add registry keys for language support
svn path=/trunk/; revision=13973
2005-03-12 19:22:30 +00:00
Thomas Bluemel
64c70941d3 Alex Ionescu <ionucu@videotron.ca>
- Remove branch leftover in debug message.
- Uncondtionally enable setting the Window Station Atom Table.

svn path=/trunk/; revision=13972
2005-03-12 18:15:54 +00:00
Thomas Bluemel
052a86b641 Alex Ionescu <ionucu@videotron.ca>
- Clean up formatting of ke/process.c (which I had messed up at the time due to MSVC)
- Acknowledge Blight's work
- Implement KeRemoveServiceDescriptorTable
- Remove ex/napi.c and move the Tables into ke/process.c

svn path=/trunk/; revision=13971
2005-03-12 18:10:03 +00:00
Thomas Bluemel
62fe406292 Alex Ionescu <ionucu@videotron.ca>
Fix wrong assertion.

svn path=/trunk/; revision=13970
2005-03-12 17:02:43 +00:00
Filip Navara
f954a88f34 Alex Ionescu <ionucu@videotron.ca>
Various bugcheck code improvements:
- Fix bugcheck code and make debugging easier for unhandled exceptions/spinlocks.
- Fix a race condition with TAB+B,
- Fix irql to be high_level.
- Fix calling unsafe function by caching bugcode data.
- Fix support for smp by using IPI.
- Fix not-breakpointing when no debugger is there.
- Implement KeBugCheck callbacks with reason.
- Fix callbacks not being called.
- Fix proper breakpoint during bugcheck.
Filip Navara <xnavara@volny.cz>
- Move the bugcheck initialization code into Ke (was in Ex on Alex's branch).

svn path=/trunk/; revision=13969
2005-03-12 16:01:30 +00:00
Filip Navara
5307ffb9c6 Alex Ionescu <ionucu@videotron.ca>
Move win32k callbacks to win32k where they belong. Registration is done with Ps function just like on XP+. Also allows non-win32k stuff to manage their own desktops and window stations.

svn path=/trunk/; revision=13968
2005-03-12 14:15:49 +00:00
Thomas Bluemel
510dc740a5 include ctype.h for isalpha()
svn path=/trunk/; revision=13967
2005-03-12 13:50:48 +00:00
Eric Kohl
8871c0355a Implement [in], [out] and [in, out] support for pointers to basic types.
svn path=/trunk/; revision=13966
2005-03-12 13:23:09 +00:00
Filip Navara
466b206539 Alex Ionescu <ionucu@videotron.ca>
- Add KeGetCurrentPrcb function and use it where appropriate.
- Fix returning of values in ExGetCurrentProcessorCpuUsage and ExGetCurrentProcessorCounts.
- Move ExIsProcessorFeaturePresent from ex/init.c to ex/sysinfo.c.

svn path=/trunk/; revision=13965
2005-03-12 09:40:07 +00:00
Gé van Geldorp
17f773cb7d Fix htons
svn path=/trunk/; revision=13964
2005-03-12 09:21:59 +00:00
Hartmut Birr
653d79d129 Lock the kernel address space instead the process' one, if the pages are located in kernel space.
Unlock the address space on error.


svn path=/trunk/; revision=13963
2005-03-12 09:14:38 +00:00
Filip Navara
57787bb881 Thomas Weidenmueller <w3seek@reactos.com>
- Implement support for vectored exception handlers.
- Add code for querying process cookie.

svn path=/trunk/; revision=13962
2005-03-12 08:54:41 +00:00
Art Yerkes
724d399a3f Some improvements I've been sitting on.
Set SEL_FIN if we need to in TCPReceiveData.
Clear out pending IRP queues properly when shutting down.
Lock the tcp when getting or setting the address.

svn path=/trunk/; revision=13961
2005-03-12 07:52:16 +00:00
Art Yerkes
e58c615243 Changed bare words to strings so we don't get complaints about unterminated
char constants.

svn path=/trunk/; revision=13957
2005-03-12 05:46:45 +00:00
Steven Edwards
3db0384e86 added Wine tests for advapi32. (untested)
svn path=/trunk/; revision=13954
2005-03-12 04:32:00 +00:00
Royce Mitchell III
0e37d806a5 detect windows instead of assuming it
svn path=/trunk/; revision=13953
2005-03-12 04:20:35 +00:00
Steven Edwards
3ed09e40d9 Should be winetests not winetest.
svn path=/trunk/; revision=13951
2005-03-12 04:11:24 +00:00
Steven Edwards
e8451b25d5 Added Wine regression tests for comctl32. (Untested)
svn path=/trunk/; revision=13950
2005-03-12 04:09:57 +00:00
Filip Navara
eab893a17c Minor touch ups to the tools version check to get it working on Linux.
svn path=/trunk/; revision=13949
2005-03-12 02:04:08 +00:00
Filip Navara
7c7a235e5f Steven Edwards <steven_ed4153@yahoo.com>
Revert incorrect change - KD_DEBUG_BOOTLOG => KD_DEBUG_FILELOG, /DEBUGPORT=BOOTLOG => /DEBUGPORT=FILE.

svn path=/trunk/; revision=13948
2005-03-12 01:11:06 +00:00
Filip Navara
5bbfa0aa1d Don't use intermediate objects linked with "ld -r". There's a bug in binutils that causes the data section relocations to be stripped.
svn path=/trunk/; revision=13947
2005-03-12 00:54:06 +00:00
Filip Navara
fe2a7b4489 Alex Ionescu <ionucu@videotron.ca>
Add definitions for WORKER_THREAD_RETURNED_AT_BAD_IRQL, MANUALLY_INITIATED_CRASH and IMPERSONATING_WORKER_THREAD bug check codes.

svn path=/trunk/; revision=13946
2005-03-12 00:51:55 +00:00
Filip Navara
94066e01ef Alex Ionescu <ionucu@videotron.ca>
Pass an ACPI flag from FreeLdr to the kernel and replace the usage of ACPI compile time option with it.

svn path=/trunk/; revision=13945
2005-03-12 00:49:18 +00:00
Art Yerkes
b89e71762d Changed sizeof(RemoteAddress) to sizeof(*RemoteAddress). Now address
returns work in accept.

svn path=/trunk/; revision=13943
2005-03-12 00:02:24 +00:00
Filip Navara
b6926c02fc Alex Ionescu <ionucu@videotron.ca>
Relocate kernel if the /3GB switch is supplied in kernel parameters.

svn path=/trunk/; revision=13941
2005-03-11 23:38:59 +00:00
Art Yerkes
6cc6c8571b Swap the port part of the address so it's reported correctly.
svn path=/trunk/; revision=13937
2005-03-11 21:13:11 +00:00
9571 changed files with 98894 additions and 579273 deletions

View File

@@ -61,8 +61,8 @@ DLLS_SHELLEXT = shellext
DLLS = acledit aclui advapi32 advpack cabinet cards comctl32 crtdll comdlg32 d3d8thk dbghelp expat fmifs freetype \
gdi32 gdiplus glu32 hid imagehlp imm32 iphlpapi kernel32 lzexpand mesa32 midimap mmdrv mpr msacm msafd \
msgina msi msimg32 msvcrt20 msvideo mswsock netapi32 ntdll ole32 oleaut32 oledlg olepro32 opengl32 \
packet psapi riched20 richedit rpcrt4 samlib secur32 setupapi shell32 shlwapi smdll snmpapi syssetup \
twain user32 userenv version wininet winmm winspool ws2help ws2_32 wsock32 wshirda dnsapi \
packet psapi riched20 richedit rpcrt4 samlib secur32 setupapi shell32 shlwapi smlib smdll snmpapi \
syssetup twain user32 userenv version wininet winmm winspool ws2help ws2_32 wsock32 wshirda dnsapi \
urlmon shdocvw dinput dinput8 dxdiagn devenum dsound lsasrv $(DLLS_KBD) $(DLLS_CPL) $(DLLS_SHELLEXT)
SUBSYS = smss win32k csrss ntvdm

View File

@@ -9,7 +9,7 @@ include $(PATH_TO_TOP)/rules.mak
# Console system utilities
# cabman cat net objdir partinfo pice ps sc stats
UTIL_APPS = cat objdir partinfo pnpdump sc shutdown stats tickcount consw ps
UTIL_APPS = cat objdir partinfo pnpdump sc shutdown stats tickcount ps
UTIL_NET_APPS = arp finger ftp ipconfig netstat ping route telnet whois

View File

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

615
apps/utils/binpatch/patch.c Normal file
View File

@@ -0,0 +1,615 @@
#include <conio.h>
#include <io.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
/** DEFINES *******************************************************************/
#define PATCH_BUFFER_SIZE 4096 /* Maximum size of a patch */
#define PATCH_BUFFER_MAGIC "\xde\xad\xbe\xef MaGiC MaRk "
#define SIZEOF_PATCH_BUFFER_MAGIC (sizeof (PATCH_BUFFER_MAGIC) - 1)
/** TYPES *********************************************************************/
typedef struct _PatchedByte
{
int offset; /*!< File offset of the patched byte. */
unsigned char expected; /*!< Expected (original) value of the byte. */
unsigned char patched; /*!< Patched (new) value for the byte. */
} PatchedByte;
typedef struct _PatchedFile
{
const char *name; /*!< Name of the file to be patched. */
int fileSize; /*!< Size of the file in bytes. */
int patchCount; /*!< Number of patches for the file. */
PatchedByte *patches; /*!< Patches for the file. */
} PatchedFile;
typedef struct _Patch
{
const char *name; /*!< Name of the patch. */
int fileCount; /*!< Number of files in the patch. */
PatchedFile *files; /*!< Files for the patch. */
} Patch;
/** FUNCTION PROTOTYPES *******************************************************/
static void printUsage();
/** GLOBALS *******************************************************************/
static Patch m_patch = { NULL, 0, NULL };
static int m_argc = 0;
static char **m_argv = NULL;
/* patch buffer where we put the patch info into */
static unsigned char m_patchBuffer[SIZEOF_PATCH_BUFFER_MAGIC + PATCH_BUFFER_SIZE] =
PATCH_BUFFER_MAGIC;
/** HELPER FUNCTIONS **********************************************************/
static void *
loadFile(const char *fileName, int *fileSize_)
{
FILE *f;
struct stat sb;
int fileSize;
void *p;
/* Open the file */
f = fopen(fileName, "rb");
if (f == NULL)
{
printf("Couldn't open file %s for reading!\n", fileName);
return NULL;
}
/* Get file size */
if (fstat(fileno(f), &sb) < 0)
{
fclose(f);
printf("Couldn't get size of file %s!\n", fileName);
return NULL;
}
fileSize = sb.st_size;
/* Load file */
p = malloc(fileSize);
if (p == NULL)
{
fclose(f);
printf("Couldn't allocate %d bytes for file %s!\n", fileSize, fileName);
return NULL;
}
if (fread(p, fileSize, 1, f) != 1)
{
fclose(f);
free(p);
printf("Couldn't read file %s into memory!\n", fileName);
return NULL;
}
/* Close file */
fclose(f);
*fileSize_ = fileSize;
return p;
}
static int
saveFile(const char *fileName, void *file, int fileSize)
{
FILE *f;
/* Open the file */
f = fopen(fileName, "wb");
if (f == NULL)
{
printf("Couldn't open file %s for writing!\n", fileName);
return -1;
}
/* Write file */
if (fwrite(file, fileSize, 1, f) != 1)
{
fclose(f);
printf("Couldn't write file %s!\n", fileName);
return -1;
}
/* Close file */
fclose(f);
return 0;
}
static int
compareFiles(
PatchedFile *patchedFile,
const char *originalFileName)
{
const char *patchedFileName = patchedFile->name;
unsigned char *origChunk, *patchedChunk;
int origSize, patchedSize, i, patchCount;
PatchedByte *patches = NULL;
int patchesArrayCount = 0;
/* Load both files */
origChunk = loadFile(originalFileName, &origSize);
if (origChunk == NULL)
return -1;
patchedChunk = loadFile(patchedFileName, &patchedSize);
if (patchedChunk == NULL)
{
free(origChunk);
return -1;
}
if (origSize != patchedSize)
{
free(origChunk);
free(patchedChunk);
printf("File size of %s and %s differs (%d != %d)\n",
originalFileName, patchedFileName,
origSize, patchedSize);
return -1;
}
/* Compare the files and record any differences */
printf("Comparing %s to %s", originalFileName, patchedFileName);
for (i = 0, patchCount = 0; i < origSize; i++)
{
if (origChunk[i] != patchedChunk[i])
{
patchCount++;
/* Resize patches array if needed */
if (patchesArrayCount < patchCount)
{
PatchedByte *newPatches;
newPatches = realloc(patches, patchCount * sizeof (PatchedByte));
if (newPatches == NULL)
{
if (patches != NULL)
free(patches);
free(origChunk);
free(patchedChunk);
printf("\nOut of memory (tried to allocated %d bytes)\n",
patchCount * sizeof (PatchedByte));
return -1;
}
patches = newPatches;
}
/* Fill in patch info */
patches[patchCount - 1].offset = i;
patches[patchCount - 1].expected = origChunk[i];
patches[patchCount - 1].patched = patchedChunk[i];
}
if ((i % (origSize / 40)) == 0)
printf(".");
}
printf(" %d changed bytes found.\n", patchCount);
/* Unload the files */
free(origChunk);
free(patchedChunk);
/* Save patch info */
patchedFile->fileSize = patchedSize;
patchedFile->patchCount = patchCount;
patchedFile->patches = patches;
return 0;
}
static int
outputPatch(const char *outputFileName)
{
unsigned char *patchExe, *patchBuffer;
int i, size, patchExeSize, patchSize, stringSize, stringOffset, patchOffset;
Patch *patch;
PatchedFile *files;
printf("Putting patch into %s...\n", outputFileName);
/* Calculate size of the patch */
patchSize = sizeof (Patch) + sizeof (PatchedFile) * m_patch.fileCount;
stringSize = strlen(m_patch.name) + 1;
for (i = 0; i < m_patch.fileCount; i++)
{
stringSize += strlen(m_patch.files[i].name) + 1;
patchSize += sizeof (PatchedByte) * m_patch.files[i].patchCount;
}
if ((stringSize + patchSize) > PATCH_BUFFER_SIZE)
{
printf("Patch is too big - %d bytes maximum, %d bytes needed\n",
PATCH_BUFFER_SIZE, stringSize + patchSize);
return -1;
}
/* Load patch.exe file into memory... */
patchExe = loadFile(m_argv[0], &patchExeSize);
if (patchExe == NULL)
{
return -1;
}
/* Try to find the magic mark for the patch buffer */
for (i = 0; i < (patchExeSize - SIZEOF_PATCH_BUFFER_MAGIC); i++)
{
if (memcmp(patchExe + i, m_patchBuffer, SIZEOF_PATCH_BUFFER_MAGIC) == 0)
{
patchBuffer = patchExe + i + SIZEOF_PATCH_BUFFER_MAGIC;
break;
}
}
if (!(i < (patchExeSize - SIZEOF_PATCH_BUFFER_MAGIC)))
{
free(patchExe);
printf("Couldn't find patch buffer magic in file %s - this shouldn't happen!!!\n", m_argv[0]);
return -1;
}
/* Pack patch together and replace string pointers by offsets */
patch = (Patch *)patchBuffer;
files = (PatchedFile *)(patchBuffer + sizeof (Patch));
patchOffset = sizeof (Patch) + sizeof (PatchedFile) * m_patch.fileCount;
stringOffset = patchSize;
patch->fileCount = m_patch.fileCount;
patch->files = (PatchedFile *)sizeof (Patch);
patch->name = (const char *)stringOffset;
strcpy(patchBuffer + stringOffset, m_patch.name);
stringOffset += strlen(m_patch.name) + 1;
for (i = 0; i < m_patch.fileCount; i++)
{
files[i].fileSize = m_patch.files[i].fileSize;
files[i].patchCount = m_patch.files[i].patchCount;
files[i].name = (const char *)stringOffset;
strcpy(patchBuffer + stringOffset, m_patch.files[i].name);
stringOffset += strlen(m_patch.files[i].name) + 1;
size = files[i].patchCount * sizeof (PatchedByte);
files[i].patches = (PatchedByte *)patchOffset;
memcpy(patchBuffer + patchOffset, m_patch.files[i].patches, size);
patchOffset += size;
}
size = patchSize + stringSize;
memset(patchBuffer + size, 0, PATCH_BUFFER_SIZE - size);
/* Save file */
if (saveFile(outputFileName, patchExe, patchExeSize) < 0)
{
free(patchExe);
return -1;
}
free(patchExe);
printf("Patch saved!\n");
return 0;
}
static int
loadPatch()
{
char *p;
Patch *patch;
int i;
p = m_patchBuffer + SIZEOF_PATCH_BUFFER_MAGIC;
patch = (Patch *)p;
if (patch->name == NULL)
{
return -1;
}
m_patch.name = p + (int)patch->name;
m_patch.fileCount = patch->fileCount;
m_patch.files = (PatchedFile *)(p + (int)patch->files);
for (i = 0; i < m_patch.fileCount; i++)
{
m_patch.files[i].name = p + (int)m_patch.files[i].name;
m_patch.files[i].patches = (PatchedByte *)(p + (int)m_patch.files[i].patches);
}
printf("Patch %s loaded...\n", m_patch.name);
return 0;
}
/** MAIN FUNCTIONS ************************************************************/
static int
createPatch()
{
int i, status;
const char *outputFileName;
/* Check argument count */
if (m_argc < 6 || (m_argc % 2) != 0)
{
printUsage();
return -1;
}
outputFileName = m_argv[3];
m_patch.name = m_argv[2];
/* Allocate PatchedFiles array */
m_patch.fileCount = (m_argc - 4) / 2;
m_patch.files = malloc(m_patch.fileCount * sizeof (PatchedFile));
if (m_patch.files == NULL)
{
printf("Out of memory!\n");
return -1;
}
memset(m_patch.files, 0, m_patch.fileCount * sizeof (PatchedFile));
/* Compare original to patched files and fill m_patch.files array */
for (i = 0; i < m_patch.fileCount; i++)
{
m_patch.files[i].name = m_argv[4 + (i * 2) + 1];
status = compareFiles(m_patch.files + i, m_argv[4 + (i * 2) + 0]);
if (status < 0)
{
for (i = 0; i < m_patch.fileCount; i++)
{
if (m_patch.files[i].patches != NULL)
free(m_patch.files[i].patches);
}
free(m_patch.files);
m_patch.files = NULL;
m_patch.fileCount = 0;
return status;
}
}
/* Output patch */
return outputPatch(outputFileName);
}
static int
applyPatch()
{
int c, i, j, fileSize, makeBackup;
unsigned char *file;
char *p;
const char *fileName;
char buffer[MAX_PATH];
if (m_argc > 1 && strcmp(m_argv[1], "-d") != 0)
{
printUsage();
return -1;
}
/* Load patch */
if (loadPatch() < 0)
{
printf("This executable doesn't contain a patch, use -c to create one.\n");
return -1;
}
if (m_argc > 1)
{
/* Dump patch */
printf("Patch name: %s\n", m_patch.name);
printf("File count: %d\n", m_patch.fileCount);
for (i = 0; i < m_patch.fileCount; i++)
{
printf("----------------------\n"
"File name: %s\n"
"File size: %d bytes\n",
m_patch.files[i].name, m_patch.files[i].fileSize);
printf("Patch count: %d\n", m_patch.files[i].patchCount);
for (j = 0; j < m_patch.files[i].patchCount; j++)
{
printf(" Offset 0x%x 0x%02x -> 0x%02x\n",
m_patch.files[i].patches[j].offset,
m_patch.files[i].patches[j].expected,
m_patch.files[i].patches[j].patched);
}
}
}
else
{
/* Apply patch */
printf("Applying patch...\n");
for (i = 0; i < m_patch.fileCount; i++)
{
/* Load original file */
fileName = m_patch.files[i].name;
applyPatch_retry_file:
file = loadFile(fileName, &fileSize);
if (file == NULL)
{
printf("File %s not found! ", fileName);
applyPatch_file_open_error:
printf("(S)kip, (R)etry, (A)bort, (M)anually enter filename");
do
{
c = getch();
}
while (c != 's' && c != 'r' && c != 'a' && c != 'm');
printf("\n");
if (c == 's')
{
continue;
}
else if (c == 'r')
{
goto applyPatch_retry_file;
}
else if (c == 'a')
{
return 0;
}
else if (c == 'm')
{
if (fgets(buffer, sizeof (buffer), stdin) == NULL)
{
printf("fgets() failed!\n");
return -1;
}
p = strchr(buffer, '\r');
if (p != NULL)
*p = '\0';
p = strchr(buffer, '\n');
if (p != NULL)
*p = '\0';
fileName = buffer;
goto applyPatch_retry_file;
}
}
/* Check file size */
if (fileSize != m_patch.files[i].fileSize)
{
free(file);
printf("File %s has unexpected filesize of %d bytes (%d bytes expected)\n",
fileName, fileSize, m_patch.files[i].fileSize);
if (fileName != m_patch.files[i].name) /* manually entered filename */
{
goto applyPatch_file_open_error;
}
return -1;
}
/* Ask for backup */
printf("Do you want to make a backup of %s? (Y)es, (N)o, (A)bort", fileName);
do
{
c = getch();
}
while (c != 'y' && c != 'n' && c != 'a');
printf("\n");
if (c == 'y')
{
char buffer[MAX_PATH];
snprintf(buffer, MAX_PATH, "%s.bak", fileName);
buffer[MAX_PATH-1] = '\0';
makeBackup = 1;
if (access(buffer, 0) >= 0) /* file exists */
{
printf("File %s already exists, overwrite? (Y)es, (N)o, (A)bort", buffer);
do
{
c = getch();
}
while (c != 'y' && c != 'n' && c != 'a');
printf("\n");
if (c == 'n')
makeBackup = 0;
else if (c == 'a')
{
free(file);
return 0;
}
}
if (makeBackup && saveFile(buffer, file, fileSize) < 0)
{
free(file);
return -1;
}
}
else if (c == 'a')
{
free(file);
return 0;
}
/* Patch file */
for (j = 0; j < m_patch.files[i].patchCount; j++)
{
int offset = m_patch.files[i].patches[j].offset;
if (file[offset] != m_patch.files[i].patches[j].expected)
{
printf("Unexpected value in file %s at offset 0x%x: expected = 0x%02x, found = 0x%02x\n",
fileName, offset, m_patch.files[i].patches[j].expected, file[offset]);
free(file);
return -1;
}
file[offset] = m_patch.files[i].patches[j].patched;
}
/* Save file */
if (saveFile(fileName, file, fileSize) < 0)
{
free(file);
return -1;
}
free(file);
}
printf("Patch applied sucessfully!\n");
}
return 0;
}
static void
printUsage()
{
printf("Usage:\n"
"%s -c - Create patch\n"
"%s -d - Dump patch\n"
"%s - Apply patch\n"
"\n"
"A patch can be created like this:\n"
"%s -c \"patch name\" output.exe file1.orig file1.patched[ file2.orig file2.patched[ ...]]\n",
m_argv[0], m_argv[0], m_argv[0], m_argv[0]);
}
int
main(
int argc,
char *argv[])
{
m_argc = argc;
m_argv = argv;
if (argc >= 2 && (strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help") == 0))
{
printUsage();
return 0;
}
else if (argc >= 2 && argv[1][0] == '-')
{
if (strcmp(argv[1], "-c") == 0)
{
return createPatch();
}
else if (strcmp(argv[1], "-d") == 0)
{
return applyPatch();
}
else
{
printf("Unknown option: %s\n"
"Use -h for help.\n",
argv[1]);
return -1;
}
}
return applyPatch();
}

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