sergei
e3816d0db2
* Unit windirs does not need to depend on unit strings.
...
git-svn-id: trunk@17725 -
2011-06-12 02:56:40 +00:00
florian
0c10a5efff
* line > 255 chars wrapped
...
git-svn-id: trunk@17650 -
2011-06-03 13:02:30 +00:00
marco
2dbdaa4b81
* fixed highbound xmmregisters. Mantis #19426
...
git-svn-id: trunk@17562 -
2011-05-26 18:13:07 +00:00
michael
9d580533d9
* Fixed compile error in FileCreate
...
git-svn-id: trunk@17549 -
2011-05-24 07:10:33 +00:00
michael
a201f07420
* Added share mode argument to FileCreate call
...
git-svn-id: trunk@17548 -
2011-05-23 21:11:07 +00:00
marco
5c08dd06a3
* patch from Cobines, Mantis 19227 fixing return type of shgetfileinfo*
...
git-svn-id: trunk@17369 -
2011-04-25 15:43:07 +00:00
sergei
62e11742bf
* Reverted STD_xxx_HANDLE constants back to DWORD type (issue introduced in r15824). These are not handles, and are 32-bit even in Win64. See http://msdn.microsoft.com/en-us/library/ms683231.aspx
...
+ added a test to help detecting this happening again.
git-svn-id: trunk@17333 -
2011-04-17 22:27:56 +00:00
florian
6b4f13c1d7
* workaround for bug in GetThreadLocale on some W7, resolves #18574
...
git-svn-id: trunk@17331 -
2011-04-16 20:38:04 +00:00
paul
872d9e98ea
rtl: fix return type of 2 callback procedures (UINT -> UINT_PTR)
...
git-svn-id: trunk@17324 -
2011-04-15 13:02:46 +00:00
paul
32ec75216c
rtl: fix printer hook procedures - they return PTR_UINT instead of UINT
...
git-svn-id: trunk@17311 -
2011-04-13 08:47:05 +00:00
sergei
30a02b8d65
* CreateIoCompletionPort and GetCompletionPortStarus: changed type of 'completionKey' parameter to ULONG_PTR, patch from cobines, resolves #19104 .
...
git-svn-id: trunk@17258 -
2011-04-06 03:33:45 +00:00
sergei
3a7ac49cc2
- Removed Win32Wide2AnsiMove, using Win32Unicode2AnsiMove for both Unicode-to-ansi and Wide-to-ansi conversions. In general, we don't need two different conversion routines in wideStringManager, as long as they differ only in PWideChar vs PUnicodeChar (these types are identical).
...
git-svn-id: trunk@17202 -
2011-03-29 05:25:05 +00:00
paul
e0671060db
rtl: add missing TWMWindowPosChanged, TWMWindowPosChanging from messages interface
...
git-svn-id: trunk@17198 -
2011-03-28 06:28:25 +00:00
sergei
2a303c88f5
* On thread creation error, use a resourcestring message and textual representation of system error code.
...
- Removed an unused type declaration.
git-svn-id: trunk@17164 -
2011-03-22 15:26:28 +00:00
joost
2937190516
* Moved and renamed GetSpecialDir from sysutils to new windirs unit, so it can be used in the compiler
...
git-svn-id: trunk@17134 -
2011-03-14 20:43:03 +00:00
marco
1932f04719
* fix (outline)testmetric. A+W 32+64. Mantis 17727 and mantis 18835
...
git-svn-id: trunk@17074 -
2011-03-04 21:23:02 +00:00
sergei
7b948b1e38
* Type of lParam argument of EnumResourceNames, EnumResourceTypes, EnumResourceLanguages and corresponding callbacks must be LONG_PTR. Mantis #18816 .
...
* Also assigned meaningful names to callback arguments.
git-svn-id: trunk@16993 -
2011-02-24 06:08:33 +00:00
sergei
5fb58e1458
+ Windows unit: add GetCPInfoEx function and related definitions, patch from G.Fink, Mantis #18654
...
git-svn-id: trunk@16862 -
2011-02-01 13:10:15 +00:00
marco
a318f1c91e
* Also changed the redef version of getprocessaffinity.. to dword_ptr.
...
Mants 18434
git-svn-id: trunk@16735 -
2011-01-08 12:35:10 +00:00
sergei
15e1abddf7
* Windows RTL: Simplify SysUtils.GetLocalTime(). TSystemTime type for these targets matches one defined in Windows unit, so WinAPI function result can be used directly. Resolves #18346 .
...
git-svn-id: trunk@16665 -
2010-12-30 20:40:47 +00:00
pierre
0fabda01a8
* Added code to support Windows 95 again
...
This code is disabled by default, you need to complie the RTL
with option -dSUPPORT_WIN95.
2.4.2 release is already not usable on Windows 95 because
the kernel32 DLL function TryEnterCriticalSection is loaded
into system unit unconditionnally, while this function does
not exist in Winddows 95 kernel32.
This patch uses LoadLibrary/GetProcAddress coupple to check if
TryEnterCriticalSection exists and provides an alternate implementation
that will be used on Windows 95 systems only (Windows 98 kernel32
DLL does export TryEnterCriticalSection).
git-svn-id: trunk@16579 -
2010-12-17 14:12:43 +00:00
sergei
13bea29253
* win/sysutils.pp, FileOpen and FileCreate, removed manual zero-termination of strings. This unit compiles in {$h+} state, and AnsiString zero-termination is handled automatically these days.
...
git-svn-id: trunk@16558 -
2010-12-12 15:07:38 +00:00
sergei
179229007e
* win/sysutils.pp: fix/clean up loading dll for SHGetFolderPath.
...
* Don't attempt to load shell32.dll, since every system with shell32.dll that exports SHGetFolderPath also has shfolder.dll present.
* Load shfolder.dll using a full path in order to prevent loading of malicious code by placing a same-named dll into program directory (Mantis #18185 ).
git-svn-id: trunk@16549 -
2010-12-11 10:05:10 +00:00
sergei
c5162a7816
* win/sysutils.pp: Use GetModuleHandle for dynamic loading of kernel32.dll instead of LoadLibrary, this is possible because kernel32 is statically linked by RTL and is therefore always loaded with application. Also makes FreeLibrary at finalization unnecessary.
...
- Removed checks for Windows version, they are redundant. GetProcAddress simply returns nil if the function is not present.
git-svn-id: trunk@16540 -
2010-12-11 04:47:33 +00:00
Jonas Maebe
f4c31ecf3c
+ widestringmanager.codepointlengthproc added, which can be used to
...
determine the length of a multi-byte character. The return values
are defined to be the same as those of POSIX' mblen: -1 =
invalid/incomplete sequence, 0 = #0 , > 0 = length of sequence in
bytes.
+ default implementation for widestringmanager.codepointlengthproc
(assumes all code points have length 1) and Unix implementation
(based on mb(r)len); Windows implementation is still required
* replaced default implementation of
widestringmanager.CharLengthPCharProc with strlen() of the input
instead of an error (correct if all code points have length 1,
still needs Windows implementation)
+ implemented fpc_text_read_{wide,unicode}str() and
fpc_text_read_widechar() (mantis #18163 ); fpc_text_read_widechar()
uses the new widestringmanager.codepointlengthproc()
+ unicodestring support for readstr/writestr
* fixed declaration of fpc_Write_Text_UnicodeStr (unicodestring
instead of widestring parameter)
* extended test/twide*.pp tests to test the new/fixed functionality
git-svn-id: trunk@16533 -
2010-12-10 14:10:01 +00:00
sergei
4e3cedb492
* VariantInit is a procedure, not a function (according to both MSDN and Delphi docs).
...
git-svn-id: trunk@16525 -
2010-12-09 01:27:09 +00:00
florian
a0c25dc0f9
- removes Thread_count from the system unit of several OSes: the value of this variable was unpredictable and the hebaviour was not fixable, resolves #18089
...
git-svn-id: trunk@16472 -
2010-11-28 20:46:50 +00:00
michael
cc0be1be4d
* Completely initialize threadvars when an external thread is detected. Needs still cleanup code (or a better thread initialization/finalization).
...
git-svn-id: trunk@16432 -
2010-11-25 15:50:49 +00:00
sergei
cbdc08b641
* dynlibs.pas: added 'const' modifiers to eliminate unnecessary local string copies
...
git-svn-id: trunk@16366 -
2010-11-18 22:09:48 +00:00
paul
4036be1221
rtl: add IO_REPARSE_TAG constants
...
git-svn-id: trunk@16358 -
2010-11-18 04:06:49 +00:00
michael
5cdc3c3a29
* Correction of PAFProtocols (Ivan Shikhalev, bug ID #17924
...
git-svn-id: trunk@16335 -
2010-11-13 15:51:43 +00:00
sergei
80d69c8a22
* win/sysutils.pp, implement CompareUnicodeString and CompareTextUnicodeString, resolves #17591 .
...
git-svn-id: trunk@16293 -
2010-11-02 07:34:23 +00:00
sergei
a4dd7701d9
* win/sysutils.pp: removed private WinAPI function declarations. Since this unit uses Windows unit, there's no point in re-declaring stuff.
...
git-svn-id: trunk@16292 -
2010-11-02 07:11:17 +00:00
sergei
ffc357a528
* TThread, Windows implementation: prevent resource leak when destroying an initially suspended and never resumed thread. The thread must be always resumed so that ThreadProc can complete and cleanup. Fixes Mantis #17560 .
...
git-svn-id: trunk@16290 -
2010-11-01 22:37:33 +00:00
sergei
0933bdc045
* win/sysutils.pp, removed an unused variable (forgotten part of r13838)
...
git-svn-id: trunk@16282 -
2010-11-01 00:38:51 +00:00
florian
27ff441975
o patch from Sven Barth:
...
- remove critical section from dll initialization, windows allows only one thread at one to run dllmain, resolves #17858
git-svn-id: trunk@16263 -
2010-10-30 14:37:55 +00:00
marco
8304d2c1c5
* adds gwlp and gclp constants, mantis 17656 and 17655
...
git-svn-id: trunk@16179 -
2010-10-17 19:58:49 +00:00
mazen
b127fc154a
* Fixed spell error revealed by lintian.
...
git-svn-id: trunk@16094 -
2010-10-06 20:33:57 +00:00
sergei
a66876704b
* Windows platforms: always start a thread in suspended state and resume it later in AfterConstruction if necessary, prevents race conditions in constructor. Fixes Mantis #16884 on Windows.
...
git-svn-id: trunk@16091 -
2010-10-06 16:57:15 +00:00
pierre
bdefb849fc
* Fix for Bug report 17550
...
git-svn-id: trunk@16089 -
2010-10-06 16:04:46 +00:00
florian
e9550c62bf
* inline original windows macros
...
git-svn-id: trunk@16054 -
2010-09-27 18:51:10 +00:00
marco
4e06fbf4f0
* corrected wrong register in x86_64 asm
...
git-svn-id: trunk@15851 -
2010-08-19 08:52:37 +00:00
florian
59702147ff
* patch by "Vasil" to fix various WinCE and Win32 API conversion issues
...
git-svn-id: trunk@15824 -
2010-08-15 19:39:31 +00:00
marco
df19960f41
* simple fix for 16158, avoid crash on duplicate calling of DLL_PROCESS_DETACH
...
git-svn-id: trunk@15787 -
2010-08-12 15:34:43 +00:00
marco
ecd4b3dc23
* textmetricA variants, delphi compat.
...
git-svn-id: trunk@15779 -
2010-08-11 11:05:59 +00:00
marco
8caa62618f
* support for east asia locale in formatdatetime. Patch from Taka_JP, mantis 14955 modified for recent sysutils rework, and to init eastasia support only once.
...
git-svn-id: trunk@15776 -
2010-08-11 09:03:13 +00:00
marco
2d8ac256cf
* First era patch of Taka_JP.
...
git-svn-id: trunk@15775 -
2010-08-11 08:29:47 +00:00
marco
1181115baa
* getlocalformatsettings, Mantis 10389
...
git-svn-id: trunk@15691 -
2010-08-02 20:32:50 +00:00
marco
79678bfbe2
* fix for 17008, changed bytes component of mapviewoffile(ex) to size_t
...
git-svn-id: trunk@15630 -
2010-07-24 19:03:59 +00:00
marco
5564ab3582
* added cdecl to some overloaded wsprintfa/w variants. Mantis 16915
...
git-svn-id: trunk@15561 -
2010-07-13 03:44:04 +00:00
marco
deb78080ed
* fix for Mantis 16564. Raise buffersize of getlocalechar to MSDN limit 4,
...
so that locales with long dateseparators (time,thousand,decimal) now
succeed, even if limited only to first char. (Delphi limit)
git-svn-id: trunk@15328 -
2010-05-26 20:14:08 +00:00
marco
462cb65726
* Several dword_ptr fixes triggered by mantis 16524
...
git-svn-id: trunk@15299 -
2010-05-20 19:39:54 +00:00
paul
714a7e82d7
rtl: add UDS_HOTTRACK style
...
git-svn-id: trunk@15234 -
2010-05-06 01:16:44 +00:00
florian
fecd661bcb
* fixed COPYDATASTRUCT as suggested by Dmitry Boyarintsev, resolves #16321
...
git-svn-id: trunk@15166 -
2010-04-24 17:21:55 +00:00
marco
6a7bc76ca0
* later SM_ constants for getmetrics mantis 16138
...
git-svn-id: trunk@15089 -
2010-03-29 11:25:26 +00:00
marco
8cce3d3f91
* closethread thread manager field/function. Mantis 13160
...
git-svn-id: trunk@15072 -
2010-03-26 23:31:52 +00:00
marco
c477df5046
* TCriticalSection.Tryenter support (Mantis 15928) + short test/demo
...
tested on FreeBSD (general Unix) and Windows. Note that Haiku seems
to have a native threadmgr rather than the Unix one. Will notify
maintainer (Olivier)
git-svn-id: trunk@15026 -
2010-03-21 11:34:05 +00:00
marco
be98b13554
* fix for 11263, changed fileread and fd_zero to out using $modeswitch.
...
git-svn-id: trunk@14965 -
2010-03-01 22:35:14 +00:00
marco
4ee7f3adee
* fix for mantis 15865 add hmonitor
...
git-svn-id: trunk@14953 -
2010-02-28 12:38:17 +00:00
Tomas Hajny
5c31042f6a
* SharedSuffix moved to include files to reduce number of ifdefs
...
git-svn-id: trunk@14902 -
2010-02-13 15:44:12 +00:00
marco
ef4954f8d9
* Pascal version for asm code in video (Mantis 15700)
...
git-svn-id: trunk@14901 -
2010-02-13 15:37:07 +00:00
marco
da19c48e05
* initial x86_64 code for compare videobuffer. To be tested later. Mantis 15700
...
git-svn-id: trunk@14900 -
2010-02-13 14:30:07 +00:00
marco
54b15ba318
* tcursorinfo incorrectly was aliassed to console_cursor_info, which is incorrect for
...
getcursorinfo in redef.inc. Added cursor_info structs as per MSDN. Mantis 15745
git-svn-id: trunk@14898 -
2010-02-13 14:06:08 +00:00
marco
689094646e
* image_file_machine constants
...
git-svn-id: trunk@14646 -
2010-01-14 20:28:58 +00:00
marco
8e9a7e14ad
* Revised yesterday solution to a more general one. Executeprocess gets
...
another parameter, a set type with flags, default = []
git-svn-id: trunk@14572 -
2010-01-07 20:49:28 +00:00
florian
3f17af3437
* patch by taka_jp to set SysLocale.PriLangID on windows properly, resolves #14872
...
git-svn-id: trunk@14570 -
2010-01-07 20:06:24 +00:00
florian
e6648da567
* make heaptrc aware of the fact that multi threading could be initialized before heaptrc itself is initialized, this is currently the case for windows dlls
...
git-svn-id: trunk@14560 -
2010-01-07 13:41:43 +00:00
florian
fb07fe5856
* always assume a multithreaded application when using threadvars in dlls, resolves #14992
...
git-svn-id: trunk@14557 -
2010-01-06 21:26:49 +00:00
marco
0b4b9b5220
* Windows specific overloads for ExecuteProcess that implements a hack for redir that exists for dos.exec too.
...
.. but then not using a global variable
git-svn-id: trunk@14556 -
2010-01-06 19:50:09 +00:00
florian
737514c434
* win crt unit returns #13 for numeric enter as well, resolves #13203
...
git-svn-id: trunk@14459 -
2009-12-21 09:59:04 +00:00
florian
cc0d946f16
* fixes bootstrapping with 2.2.4
...
git-svn-id: trunk@14442 -
2009-12-14 18:51:57 +00:00
florian
7a82669942
* forgotten part of r14432
...
git-svn-id: trunk@14433 -
2009-12-13 11:18:49 +00:00
marco
d72c2991e5
* group type to u_long as per mantis 15241
...
git-svn-id: trunk@14320 -
2009-12-04 08:37:18 +00:00
michael
01ed4a6745
* Implemented OnBeep to install custom beep handler
...
git-svn-id: trunk@14254 -
2009-11-22 17:33:56 +00:00
marco
c83ee377c1
* some defines from winioctl updated, mantis 15137
...
git-svn-id: trunk@14216 -
2009-11-19 11:51:03 +00:00
marco
17062d667c
* ansistring versions of mk/rm/chdir in objpas, Mantis 15010. The os-dependant routines of *nix/os2/win/dos have been converted
...
git-svn-id: trunk@14211 -
2009-11-18 18:04:51 +00:00
florian
c288e6c105
* deallocate thread variables for the main thread as well, as described in #15002
...
git-svn-id: trunk@14201 -
2009-11-16 19:36:32 +00:00
pierre
19cc28d974
* STD_XXX_HANDLE constants are DWORD type
...
git-svn-id: trunk@14124 -
2009-11-09 15:41:40 +00:00
michael
1cf64c032f
* Patch to remove useless process_entry_hook from sven barth
...
git-svn-id: trunk@14094 -
2009-11-07 10:10:47 +00:00
marco
59811e1012
* Findfirstex and findfirsttransacted as per #14924
...
git-svn-id: trunk@14080 -
2009-11-06 11:46:25 +00:00
marco
a91e106cde
* PWSADAta was missing ^ to make it a pointer.
...
git-svn-id: trunk@13936 -
2009-10-23 19:01:35 +00:00
florian
cba72c423d
* patch by Sergei Gorelkin to use always SetFilePointer, also for files with >2GB, this saves some lines of code, resolves #14630
...
git-svn-id: trunk@13838 -
2009-10-10 18:52:50 +00:00
michael
12fcb19bf4
* Added comment in SysRelocateThreadVar, not working in Windows Vista
...
git-svn-id: trunk@13753 -
2009-09-21 09:34:53 +00:00
marco
47e90bbdf3
* typo corrected as per #14578
...
git-svn-id: trunk@13707 -
2009-09-13 20:20:02 +00:00
florian
2f8e263560
* allow only one thread at a time to attach on a dll so the tls slot is allocated properly, resolves #12987
...
git-svn-id: trunk@13648 -
2009-09-05 13:41:09 +00:00
florian
a8c6d9ec3a
* partially reverted 13571, I didn't get it work on W7 x64 in win32 mode
...
* use $ffffffff to signal an unsed TLSKey, 0 is a valid TLSKey and could be returned by Windows in theory
git-svn-id: trunk@13608 -
2009-08-29 20:46:06 +00:00
florian
d3d3596cd6
* accelerated/fixed TLS access on win32 by Pierre Muller
...
git-svn-id: trunk@13571 -
2009-08-21 09:15:11 +00:00
florian
512d66988c
* put linebuffer on the stack instead on the heap on windows makes SysUpdateScreen slightly faster
...
git-svn-id: trunk@13540 -
2009-08-16 10:25:35 +00:00
florian
965828b6de
* fix building on wince, resolves #14345
...
git-svn-id: trunk@13537 -
2009-08-15 20:58:31 +00:00
florian
a2862ce347
* cleaned up mess of r13516
...
git-svn-id: trunk@13524 -
2009-08-12 19:34:46 +00:00
florian
65690b9eee
* forgotten part of r13514
...
git-svn-id: trunk@13522 -
2009-08-12 18:42:09 +00:00
florian
d34061d7e4
* introduced fmShareDenyNoneFlags on windows because the meaning of fmShareDenyNone is unclear, see also #8898
...
git-svn-id: trunk@13514 -
2009-08-10 20:33:20 +00:00
florian
380f3ac78f
* fix from Nikolay Samofatov for #12987 : initialize thread vars in libraries on windows correctly
...
* unified dll entry code between win32 and win64
git-svn-id: trunk@13445 -
2009-07-25 21:08:36 +00:00
florian
05ff453182
* patch by Dmitry Boyarintsev to fix some parameter names, resolves #14043
...
git-svn-id: trunk@13442 -
2009-07-25 15:14:14 +00:00
florian
e4e2b5be18
* added overloeaded InterlockedExchangeAdd with first parameter being a pointer, resolves #13282
...
git-svn-id: trunk@13363 -
2009-07-05 18:57:48 +00:00
marco
0212aa9311
* dss constants from Paul
...
git-svn-id: trunk@13303 -
2009-06-20 11:17:41 +00:00
florian
b47650960e
* patch by Sergei Gorelkin: makes WideCompareText and WideCompareStr work in Windows 9x , resolves #13955
...
git-svn-id: trunk@13265 -
2009-06-12 18:21:06 +00:00
yury
3b32571557
* Fixed compilation for win64. ThreadID is DWORD on both win32 and win64.
...
git-svn-id: trunk@13235 -
2009-06-05 14:59:42 +00:00
florian
88f6b8854e
* proper error handling in case of thread creation failure on windows, resolves #13768 , no test case due because such a test is too sensitive regarding race conditions etc. and might cause false failures
...
git-svn-id: trunk@13222 -
2009-06-01 14:17:01 +00:00
Jonas Maebe
78c29a33ba
* changed the parameters of gotoxy() and the return values of wherex/wherey
...
from byte into tcrtcoord=1..255, since all crt unit coordinates are
1-based (not for Window() procedure, see comments in crth.inc;
mantis #13788 )
git-svn-id: trunk@13191 -
2009-05-24 11:48:49 +00:00