Author: frik85
Date: Wed Sep 24 13:04:03 2008
New Revision: 36492
URL: http://svn.reactos.org/svn/reactos?rev=36492&view=rev
Log:
RosCMS update:
* several forms improved
* simplified captcha: bigger font size, simpler fonts, less chars (4-6), case insensitive
* include some 'vera' fonts for captcha
Added:
trunk/web/reactos.org/htdocs/roscms/logon/captcha/fonts.txt (with props)
trunk/web/reactos.org/htdocs/roscms/logon/captcha/vera.ttf (with props)
trunk/web/reactos.org/htdocs/roscms/logon/captcha/vera_copyright.txt (with props)
trunk/web/reactos.org/htdocs/roscms/logon/captcha/verabd.ttf (with props)
trunk/web/reactos.org/htdocs/roscms/logon/captcha/verabi.ttf (with props)
trunk/web/reactos.org/htdocs/roscms/logon/captcha/verait.ttf (with props)
trunk/web/reactos.org/htdocs/roscms/logon/captcha/veramono.ttf (with props)
trunk/web/reactos.org/htdocs/roscms/logon/captcha/verase.ttf (with props)
trunk/web/reactos.org/htdocs/roscms/logon/captcha/verasebd.ttf (with props)
Modified:
trunk/web/reactos.org/htdocs/roscms/logon/captcha/captcha_image.phptrunk/web/reactos.org/htdocs/roscms/logon/captcha/fonts.phptrunk/web/reactos.org/htdocs/roscms/logon/user_login_lost.phptrunk/web/reactos.org/htdocs/roscms/logon/user_profil_edit.phptrunk/web/reactos.org/htdocs/roscms/logon/user_register.php
Modified: trunk/web/reactos.org/htdocs/roscms/logon/captcha/captcha_image.php
URL: http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/roscms/logo…
==============================================================================
--- trunk/web/reactos.org/htdocs/roscms/logon/captcha/captcha_image.php [iso-8859-1] (original)
+++ trunk/web/reactos.org/htdocs/roscms/logon/captcha/captcha_image.php [iso-8859-1] Wed Sep 24 13:04:03 2008
@@ -22,7 +22,7 @@
$s = base64_encode($s); // base64-set, but filter out unwanted chars
$s = preg_replace("/[+\/=IG0ODQRtl]/i", "", $s); // strips hard to discern letters, depends on used font type
//$s = substr($s, 0, $characters);
- $s = substr($s, 0, rand(6, $characters));
+ $s = substr($s, 0, rand(4, $characters));
return $s;
}
@@ -33,7 +33,7 @@
$width = 240;
$height = 80;
- $cur_random = mt_rand(0,10);
+ $cur_random = mt_rand(0, count($font_data));
$font = $font_data[$cur_random][0];
$font_size_mult = $font_data[$cur_random][1];
Modified: trunk/web/reactos.org/htdocs/roscms/logon/captcha/fonts.php
URL: http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/roscms/logo…
==============================================================================
--- trunk/web/reactos.org/htdocs/roscms/logon/captcha/fonts.php [iso-8859-1] (original)
+++ trunk/web/reactos.org/htdocs/roscms/logon/captcha/fonts.php [iso-8859-1] Wed Sep 24 13:04:03 2008
@@ -2,19 +2,33 @@
$font_data = array();
- $font_data[0][0] = "<fontname>.ttf";
- $font_data[0][1] = 0.60;
- $font_data[0][2] = 9;
+ $font_data[0][0] = "vera.ttf";
+ $font_data[0][1] = 0.50;
+ $font_data[0][2] = 5;
- $font_data[1][0] = "<fontname>.ttf";
- $font_data[1][1] = 0.40;
- $font_data[1][2] = 7;
+ $font_data[1][0] = "verasebd.ttf";
+ $font_data[1][1] = 0.50;
+ $font_data[1][2] = 5;
+
+ $font_data[2][0] = "verabd.ttf";
+ $font_data[2][1] = 0.45;
+ $font_data[2][2] = 5;
- $font_data[2][0] = "<fontname>.ttf";
- $font_data[2][1] = 0.40;
- $font_data[2][2] = 7;
+ $font_data[3][0] = "verabi.ttf";
+ $font_data[3][1] = 0.48;
+ $font_data[3][2] = 5;
- // ...
+ $font_data[4][0] = "verait.ttf";
+ $font_data[4][1] = 0.55;
+ $font_data[4][2] = 4;
+
+ $font_data[5][0] = "veramono.ttf";
+ $font_data[5][1] = 0.50;
+ $font_data[5][2] = 6;
+
+ $font_data[6][0] = "verase.ttf";
+ $font_data[6][1] = 0.60;
+ $font_data[6][2] = 4;
?>
Added: trunk/web/reactos.org/htdocs/roscms/logon/captcha/fonts.txt
URL: http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/roscms/logo…
==============================================================================
--- trunk/web/reactos.org/htdocs/roscms/logon/captcha/fonts.txt (added)
+++ trunk/web/reactos.org/htdocs/roscms/logon/captcha/fonts.txt [iso-8859-1] Wed Sep 24 13:04:03 2008
@@ -1,0 +1,5 @@
+More GPL compatible fonts:
+
+* http://www.gnome.org/fonts/
+* https://fedorahosted.org/liberation-fonts
+* http://olegueret.googlepages.com/stixfonts-ttf
Propchange: trunk/web/reactos.org/htdocs/roscms/logon/captcha/fonts.txt
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/web/reactos.org/htdocs/roscms/logon/captcha/vera.ttf
URL: http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/roscms/logo…
==============================================================================
Binary file - no diff available.
Propchange: trunk/web/reactos.org/htdocs/roscms/logon/captcha/vera.ttf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: trunk/web/reactos.org/htdocs/roscms/logon/captcha/vera_copyright.txt
URL: http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/roscms/logo…
==============================================================================
--- trunk/web/reactos.org/htdocs/roscms/logon/captcha/vera_copyright.txt (added)
+++ trunk/web/reactos.org/htdocs/roscms/logon/captcha/vera_copyright.txt [iso-8859-1] Wed Sep 24 13:04:03 2008
@@ -1,0 +1,124 @@
+Bitstream Vera Fonts Copyright
+
+The fonts have a generous copyright, allowing derivative works (as
+long as "Bitstream" or "Vera" are not in the names), and full
+redistribution (so long as they are not *sold* by themselves). They
+can be be bundled, redistributed and sold with any software.
+
+The fonts are distributed under the following copyright:
+
+Copyright
+=========
+
+Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream
+Vera is a trademark of Bitstream, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the fonts accompanying this license ("Fonts") and associated
+documentation files (the "Font Software"), to reproduce and distribute
+the Font Software, including without limitation the rights to use,
+copy, merge, publish, distribute, and/or sell copies of the Font
+Software, and to permit persons to whom the Font Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright and trademark notices and this permission notice
+shall be included in all copies of one or more of the Font Software
+typefaces.
+
+The Font Software may be modified, altered, or added to, and in
+particular the designs of glyphs or characters in the Fonts may be
+modified and additional glyphs or characters may be added to the
+Fonts, only if the fonts are renamed to names not containing either
+the words "Bitstream" or the word "Vera".
+
+This License becomes null and void to the extent applicable to Fonts
+or Font Software that has been modified and is distributed under the
+"Bitstream Vera" names.
+
+The Font Software may be sold as part of a larger software package but
+no copy of one or more of the Font Software typefaces may be sold by
+itself.
+
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL
+BITSTREAM OR THE GNOME FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL,
+OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT
+SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
+
+Except as contained in this notice, the names of Gnome, the Gnome
+Foundation, and Bitstream Inc., shall not be used in advertising or
+otherwise to promote the sale, use or other dealings in this Font
+Software without prior written authorization from the Gnome Foundation
+or Bitstream Inc., respectively. For further information, contact:
+fonts at gnome dot org.
+
+Copyright FAQ
+=============
+
+ 1. I don't understand the resale restriction... What gives?
+
+ Bitstream is giving away these fonts, but wishes to ensure its
+ competitors can't just drop the fonts as is into a font sale system
+ and sell them as is. It seems fair that if Bitstream can't make money
+ from the Bitstream Vera fonts, their competitors should not be able to
+ do so either. You can sell the fonts as part of any software package,
+ however.
+
+ 2. I want to package these fonts separately for distribution and
+ sale as part of a larger software package or system. Can I do so?
+
+ Yes. A RPM or Debian package is a "larger software package" to begin
+ with, and you aren't selling them independently by themselves.
+ See 1. above.
+
+ 3. Are derivative works allowed?
+ Yes!
+
+ 4. Can I change or add to the font(s)?
+ Yes, but you must change the name(s) of the font(s).
+
+ 5. Under what terms are derivative works allowed?
+
+ You must change the name(s) of the fonts. This is to ensure the
+ quality of the fonts, both to protect Bitstream and Gnome. We want to
+ ensure that if an application has opened a font specifically of these
+ names, it gets what it expects (though of course, using fontconfig,
+ substitutions could still could have occurred during font
+ opening). You must include the Bitstream copyright. Additional
+ copyrights can be added, as per copyright law. Happy Font Hacking!
+
+ 6. If I have improvements for Bitstream Vera, is it possible they might get
+ adopted in future versions?
+
+ Yes. The contract between the Gnome Foundation and Bitstream has
+ provisions for working with Bitstream to ensure quality additions to
+ the Bitstream Vera font family. Please contact us if you have such
+ additions. Note, that in general, we will want such additions for the
+ entire family, not just a single font, and that you'll have to keep
+ both Gnome and Jim Lyles, Vera's designer, happy! To make sense to add
+ glyphs to the font, they must be stylistically in keeping with Vera's
+ design. Vera cannot become a "ransom note" font. Jim Lyles will be
+ providing a document describing the design elements used in Vera, as a
+ guide and aid for people interested in contributing to Vera.
+
+ 7. I want to sell a software package that uses these fonts: Can I do so?
+
+ Sure. Bundle the fonts with your software and sell your software
+ with the fonts. That is the intent of the copyright.
+
+ 8. If applications have built the names "Bitstream Vera" into them,
+ can I override this somehow to use fonts of my choosing?
+
+ This depends on exact details of the software. Most open source
+ systems and software (e.g., Gnome, KDE, etc.) are now converting to
+ use fontconfig (see www.fontconfig.org) to handle font configuration,
+ selection and substitution; it has provisions for overriding font
+ names and subsituting alternatives. An example is provided by the
+ supplied local.conf file, which chooses the family Bitstream Vera for
+ "sans", "serif" and "monospace". Other software (e.g., the XFree86
+ core server) has other mechanisms for font substitution.
+
Propchange: trunk/web/reactos.org/htdocs/roscms/logon/captcha/vera_copyright.txt
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/web/reactos.org/htdocs/roscms/logon/captcha/verabd.ttf
URL: http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/roscms/logo…
==============================================================================
Binary file - no diff available.
Propchange: trunk/web/reactos.org/htdocs/roscms/logon/captcha/verabd.ttf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: trunk/web/reactos.org/htdocs/roscms/logon/captcha/verabi.ttf
URL: http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/roscms/logo…
==============================================================================
Binary file - no diff available.
Propchange: trunk/web/reactos.org/htdocs/roscms/logon/captcha/verabi.ttf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: trunk/web/reactos.org/htdocs/roscms/logon/captcha/verait.ttf
URL: http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/roscms/logo…
==============================================================================
Binary file - no diff available.
Propchange: trunk/web/reactos.org/htdocs/roscms/logon/captcha/verait.ttf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: trunk/web/reactos.org/htdocs/roscms/logon/captcha/veramono.ttf
URL: http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/roscms/logo…
==============================================================================
Binary file - no diff available.
Propchange: trunk/web/reactos.org/htdocs/roscms/logon/captcha/veramono.ttf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: trunk/web/reactos.org/htdocs/roscms/logon/captcha/verase.ttf
URL: http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/roscms/logo…
==============================================================================
Binary file - no diff available.
Propchange: trunk/web/reactos.org/htdocs/roscms/logon/captcha/verase.ttf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: trunk/web/reactos.org/htdocs/roscms/logon/captcha/verasebd.ttf
URL: http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/roscms/logo…
==============================================================================
Binary file - no diff available.
Propchange: trunk/web/reactos.org/htdocs/roscms/logon/captcha/verasebd.ttf
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified: trunk/web/reactos.org/htdocs/roscms/logon/user_login_lost.php
URL: http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/roscms/logo…
==============================================================================
--- trunk/web/reactos.org/htdocs/roscms/logon/user_login_lost.php [iso-8859-1] (original)
+++ trunk/web/reactos.org/htdocs/roscms/logon/user_login_lost.php [iso-8859-1] Wed Sep 24 13:04:03 2008
@@ -108,7 +108,7 @@
strlen($_POST['userpwd1']) >= $rdf_register_user_pwd_min && strlen($_POST['userpwd1']) < $rdf_register_user_pwd_max &&
$_POST['userpwd1'] == $_POST['userpwd2'] &&
isset($_POST['usercaptcha']) && $_POST['usercaptcha'] != "" &&
- !empty($_SESSION['rdf_security_code']) && $_SESSION['rdf_security_code'] == $_POST['usercaptcha'] &&
+ !empty($_SESSION['rdf_security_code']) && strtolower($_SESSION['rdf_security_code']) == strtolower($_POST['usercaptcha']) &&
$existpwdid == "true")
{
$sql_exist_pwdid2 = "SELECT user_id
@@ -135,7 +135,7 @@
isset($_POST['useremail']) && $_POST['useremail'] != "" &&
preg_match($rdf_register_valid_email_regex, $_POST['useremail']) && /* check if it's a valid email address */
isset($_POST['usercaptcha']) && $_POST['usercaptcha'] != "" &&
- !empty($_SESSION['rdf_security_code']) && $_SESSION['rdf_security_code'] == $_POST['usercaptcha'] &&
+ !empty($_SESSION['rdf_security_code']) && strtolower($_SESSION['rdf_security_code']) == strtolower($_POST['usercaptcha']) &&
$existemail)
{
// password activation code
@@ -271,7 +271,7 @@
<img src="<?php echo $roscms_SET_path_ex."register/captcha/"; ?>" style="padding-top:10px;" alt="If you can't read this, try another one or email <?php echo $rdf_support_email_str; ?> for help." title="Are you human?" /><br />
<?php
if (isset($_POST['registerpost'])) {
- echo "<br /><i>Captcha code is case sensitive. <br />If you can't read it, try another one.</i>";
+ echo "<br /><i>Captcha code is case insensitive. <br />If you can't read it, try another one.</i>";
}
?>
</div>
Modified: trunk/web/reactos.org/htdocs/roscms/logon/user_profil_edit.php
URL: http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/roscms/logo…
==============================================================================
--- trunk/web/reactos.org/htdocs/roscms/logon/user_profil_edit.php [iso-8859-1] (original)
+++ trunk/web/reactos.org/htdocs/roscms/logon/user_profil_edit.php [iso-8859-1] Wed Sep 24 13:04:03 2008
@@ -77,7 +77,7 @@
preg_match($rdf_register_valid_email_regex, $_POST['useremail']) && /* check if it's a valid email address */
$result_user_profil['user_email_activation'] == ($_POST['useremail'].$rdf_uri_3) &&
isset($_POST['usercaptcha']) && $_POST['usercaptcha'] != "" &&
- !empty($_SESSION['rdf_security_code']) && $_SESSION['rdf_security_code'] == $_POST['usercaptcha'])
+ !empty($_SESSION['rdf_security_code']) && strtolower($_SESSION['rdf_security_code']) == strtolower($_POST['usercaptcha']))
{
$sql_change_email = "UPDATE users
SET user_timestamp_touch2 = NOW( ) ,
@@ -151,7 +151,7 @@
isset($_POST['country']) && $_POST['country'] != "" &&
isset($_POST['tzone']) && $_POST['tzone'] != "" &&
isset($_POST['usercaptcha']) && $_POST['usercaptcha'] != "" &&
- !empty($_SESSION['rdf_security_code']) && $_SESSION['rdf_security_code'] == $_POST['usercaptcha'] &&
+ !empty($_SESSION['rdf_security_code']) && strtolower($_SESSION['rdf_security_code']) == strtolower($_POST['usercaptcha']) &&
!$existemail)
{
// user language (browser settings)
@@ -503,7 +503,7 @@
<img src="<?php echo $roscms_SET_path_ex."register/captcha/"; ?>" style="padding-top:10px;" alt="If you can't read this, try another one or email <?php echo $rdf_support_email_str; ?> for help." title="Are you human?" /><br />
<?php
if (isset($_POST['registerpost'])) {
- echo "<br /><i>Captcha code is case sensitive. <br />If you can't read it, try another one.</i>";
+ echo "<br /><i>Captcha code is case insensitive. <br />If you can't read it, try another one.</i>";
}
?>
</div>
Modified: trunk/web/reactos.org/htdocs/roscms/logon/user_register.php
URL: http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/roscms/logo…
==============================================================================
--- trunk/web/reactos.org/htdocs/roscms/logon/user_register.php [iso-8859-1] (original)
+++ trunk/web/reactos.org/htdocs/roscms/logon/user_register.php [iso-8859-1] Wed Sep 24 13:04:03 2008
@@ -162,7 +162,7 @@
isset($_POST['country']) && $_POST['country'] != "" &&
isset($_POST['tzone']) && $_POST['tzone'] != "" &&
isset($_POST['usercaptcha']) && $_POST['usercaptcha'] != "" &&
- !empty($_SESSION['rdf_security_code']) && $_SESSION['rdf_security_code'] == $_POST['usercaptcha'] &&
+ !empty($_SESSION['rdf_security_code']) && strtolower($_SESSION['rdf_security_code']) == strtolower($_POST['usercaptcha']) &&
$safename == "true" && $safepwd == "true" && !$existname && !$existemail)
{
// user language (browser settings)
@@ -170,10 +170,10 @@
$userlang2 = "en";
if (strlen($userlang[0][0]) > 0 && strlen($userlang[0][0]) <= 5) {
$userlang2 = $userlang[0][0];
- echo "<h3>!!! ".$userlang[0][0]."</h3>";
+ //echo "<h3>!!! ".$userlang[0][0]."</h3>";
}
else {
- echo "<h3>??? ".$userlang[0][0]."</h3>";
+ //echo "<h3>??? ".$userlang[0][0]."</h3>";
}
@@ -388,7 +388,7 @@
<img src="<?php echo $roscms_SET_path_ex."register/captcha/"; ?>" style="padding-top:10px;" alt="If you can't read this, try another one or email <?php echo $rdf_support_email_str; ?> for help." title="Are you human?" /><br />
<?php
if (isset($_POST['registerpost'])) {
- echo "<br /><i>Captcha code is case sensitive. <br />If you can't read it, try another one.</i>";
+ echo "<br /><i>Captcha code is case insensitive. <br />If you can't read it, try another one.</i>";
}
?>
</div>
Author: sginsberg
Date: Wed Sep 24 10:27:54 2008
New Revision: 36484
URL: http://svn.reactos.org/svn/reactos?rev=36484&view=rev
Log:
- 64 bit fixes for Mm routines: Use SIZE_T and ULONG_PTR where appropriate
- Note: MSDN is wrong about Nt/ZwAllocateVirtualMemory's ZeroBits. It really is a ULONG_PTR.
Modified:
trunk/reactos/include/ddk/ntifs.h
trunk/reactos/include/ndk/mmfuncs.h
trunk/reactos/ntoskrnl/mm/anonmem.c
trunk/reactos/ntoskrnl/mm/section.c
trunk/reactos/ntoskrnl/mm/virtual.c
Modified: trunk/reactos/include/ddk/ntifs.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntifs.h?rev=36…
==============================================================================
--- trunk/reactos/include/ddk/ntifs.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/ntifs.h [iso-8859-1] Wed Sep 24 10:27:54 2008
@@ -4870,7 +4870,7 @@
ZwAllocateVirtualMemory (
IN HANDLE ProcessHandle,
IN OUT PVOID *BaseAddress,
- IN ULONG ZeroBits,
+ IN ULONG_PTR ZeroBits,
IN OUT PSIZE_T RegionSize,
IN ULONG AllocationType,
IN ULONG Protect
Modified: trunk/reactos/include/ndk/mmfuncs.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/mmfuncs.h?rev=…
==============================================================================
--- trunk/reactos/include/ndk/mmfuncs.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/mmfuncs.h [iso-8859-1] Wed Sep 24 10:27:54 2008
@@ -48,8 +48,8 @@
IN PVOID SectionObject,
IN PEPROCESS Process,
IN OUT PVOID *BaseAddress,
- IN ULONG ZeroBits,
- IN ULONG CommitSize,
+ IN ULONG_PTR ZeroBits,
+ IN SIZE_T CommitSize,
IN OUT PLARGE_INTEGER SectionOffset OPTIONAL,
IN OUT PSIZE_T ViewSize,
IN SECTION_INHERIT InheritDisposition,
@@ -81,8 +81,8 @@
NTAPI
NtAllocateUserPhysicalPages(
IN HANDLE ProcessHandle,
- IN OUT PULONG NumberOfPages,
- IN OUT PULONG UserPfnArray
+ IN OUT PULONG_PTR NumberOfPages,
+ IN OUT PULONG_PTR UserPfnArray
);
NTSYSCALLAPI
@@ -91,7 +91,7 @@
NtAllocateVirtualMemory(
IN HANDLE ProcessHandle,
IN OUT PVOID *BaseAddress,
- IN ULONG ZeroBits,
+ IN ULONG_PTR ZeroBits,
IN OUT PSIZE_T RegionSize,
IN ULONG AllocationType,
IN ULONG Protect
@@ -142,8 +142,8 @@
NTAPI
NtFreeUserPhysicalPages(
IN HANDLE ProcessHandle,
- IN OUT PULONG NumberOfPages,
- IN OUT PULONG UserPfnArray
+ IN OUT PULONG_PTR NumberOfPages,
+ IN OUT PULONG_PTR UserPfnArray
);
NTSYSCALLAPI
@@ -163,9 +163,9 @@
IN HANDLE ProcessHandle,
IN ULONG Flags,
IN PVOID BaseAddress,
- IN ULONG RegionSize,
+ IN SIZE_T RegionSize,
IN PVOID *UserAddressArray,
- OUT PULONG EntriesInUserAddressArray,
+ OUT PULONG_PTR EntriesInUserAddressArray,
OUT PULONG Granularity
);
@@ -175,24 +175,24 @@
NtLockVirtualMemory(
HANDLE ProcessHandle,
PVOID BaseAddress,
- ULONG NumberOfBytesToLock,
- PULONG NumberOfBytesLocked
+ SIZE_T NumberOfBytesToLock,
+ PSIZE_T NumberOfBytesLocked
);
NTSTATUS
NTAPI
NtMapUserPhysicalPages(
IN PVOID VirtualAddresses,
- IN ULONG NumberOfPages,
- IN OUT PULONG UserPfnArray
+ IN ULONG_PTR NumberOfPages,
+ IN OUT PULONG_PTR UserPfnArray
);
NTSTATUS
NTAPI
NtMapUserPhysicalPagesScatter(
IN PVOID *VirtualAddresses,
- IN ULONG NumberOfPages,
- IN OUT PULONG UserPfnArray
+ IN ULONG_PTR NumberOfPages,
+ IN OUT PULONG_PTR UserPfnArray
);
NTSYSCALLAPI
@@ -202,8 +202,8 @@
IN HANDLE SectionHandle,
IN HANDLE ProcessHandle,
IN OUT PVOID *BaseAddress,
- IN ULONG ZeroBits,
- IN ULONG CommitSize,
+ IN ULONG_PTR ZeroBits,
+ IN SIZE_T CommitSize,
IN OUT PLARGE_INTEGER SectionOffset OPTIONAL,
IN OUT PSIZE_T ViewSize,
IN SECTION_INHERIT InheritDisposition,
@@ -226,7 +226,7 @@
NtProtectVirtualMemory(
IN HANDLE ProcessHandle,
IN PVOID *BaseAddress,
- IN ULONG *NumberOfBytesToProtect,
+ IN SIZE_T *NumberOfBytesToProtect,
IN ULONG NewAccessProtection,
OUT PULONG OldAccessProtection
);
@@ -316,7 +316,7 @@
ZwAllocateVirtualMemory(
IN HANDLE ProcessHandle,
IN OUT PVOID *BaseAddress,
- IN ULONG ZeroBits,
+ IN ULONG_PTR ZeroBits,
IN OUT PSIZE_T RegionSize,
IN ULONG AllocationType,
IN ULONG Protect
@@ -380,8 +380,8 @@
IN HANDLE SectionHandle,
IN HANDLE ProcessHandle,
IN OUT PVOID *BaseAddress,
- IN ULONG ZeroBits,
- IN ULONG CommitSize,
+ IN ULONG_PTR ZeroBits,
+ IN SIZE_T CommitSize,
IN OUT PLARGE_INTEGER SectionOffset OPTIONAL,
IN OUT PSIZE_T ViewSize,
IN SECTION_INHERIT InheritDisposition,
@@ -404,7 +404,7 @@
ZwProtectVirtualMemory(
IN HANDLE ProcessHandle,
IN PVOID *BaseAddress,
- IN ULONG *NumberOfBytesToProtect,
+ IN SIZE_T *NumberOfBytesToProtect,
IN ULONG NewAccessProtection,
OUT PULONG OldAccessProtection
);
@@ -468,8 +468,8 @@
IN HANDLE ProcessHandle,
IN PVOID BaseAddress,
IN PVOID Buffer,
- IN ULONG NumberOfBytesToWrite,
- OUT PULONG NumberOfBytesWritten
+ IN SIZE_T NumberOfBytesToWrite,
+ OUT PSIZE_T NumberOfBytesWritten
);
#endif
Modified: trunk/reactos/ntoskrnl/mm/anonmem.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/anonmem.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/anonmem.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/anonmem.c [iso-8859-1] Wed Sep 24 10:27:54 2008
@@ -522,7 +522,7 @@
NTSTATUS STDCALL
NtAllocateVirtualMemory(IN HANDLE ProcessHandle,
IN OUT PVOID* UBaseAddress,
- IN ULONG ZeroBits,
+ IN ULONG_PTR ZeroBits,
IN OUT PSIZE_T URegionSize,
IN ULONG AllocationType,
IN ULONG Protect)
Modified: trunk/reactos/ntoskrnl/mm/section.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/section.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] Wed Sep 24 10:27:54 2008
@@ -3662,8 +3662,8 @@
NtMapViewOfSection(IN HANDLE SectionHandle,
IN HANDLE ProcessHandle,
IN OUT PVOID* BaseAddress OPTIONAL,
- IN ULONG ZeroBits OPTIONAL,
- IN ULONG CommitSize,
+ IN ULONG_PTR ZeroBits OPTIONAL,
+ IN SIZE_T CommitSize,
IN OUT PLARGE_INTEGER SectionOffset OPTIONAL,
IN OUT PSIZE_T ViewSize,
IN SECTION_INHERIT InheritDisposition,
@@ -4482,8 +4482,8 @@
MmMapViewOfSection(IN PVOID SectionObject,
IN PEPROCESS Process,
IN OUT PVOID *BaseAddress,
- IN ULONG ZeroBits,
- IN ULONG CommitSize,
+ IN ULONG_PTR ZeroBits,
+ IN SIZE_T CommitSize,
IN OUT PLARGE_INTEGER SectionOffset OPTIONAL,
IN OUT PSIZE_T ViewSize,
IN SECTION_INHERIT InheritDisposition,
@@ -4954,8 +4954,8 @@
NTSTATUS
NTAPI
NtAllocateUserPhysicalPages(IN HANDLE ProcessHandle,
- IN OUT PULONG NumberOfPages,
- IN OUT PULONG UserPfnArray)
+ IN OUT PULONG_PTR NumberOfPages,
+ IN OUT PULONG_PTR UserPfnArray)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
@@ -4964,8 +4964,8 @@
NTSTATUS
NTAPI
NtMapUserPhysicalPages(IN PVOID VirtualAddresses,
- IN ULONG NumberOfPages,
- IN OUT PULONG UserPfnArray)
+ IN ULONG_PTR NumberOfPages,
+ IN OUT PULONG_PTR UserPfnArray)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
@@ -4974,8 +4974,8 @@
NTSTATUS
NTAPI
NtMapUserPhysicalPagesScatter(IN PVOID *VirtualAddresses,
- IN ULONG NumberOfPages,
- IN OUT PULONG UserPfnArray)
+ IN ULONG_PTR NumberOfPages,
+ IN OUT PULONG_PTR UserPfnArray)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
@@ -4984,8 +4984,8 @@
NTSTATUS
NTAPI
NtFreeUserPhysicalPages(IN HANDLE ProcessHandle,
- IN OUT PULONG NumberOfPages,
- IN OUT PULONG UserPfnArray)
+ IN OUT PULONG_PTR NumberOfPages,
+ IN OUT PULONG_PTR UserPfnArray)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
Modified: trunk/reactos/ntoskrnl/mm/virtual.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/virtual.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/virtual.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/virtual.c [iso-8859-1] Wed Sep 24 10:27:54 2008
@@ -63,13 +63,13 @@
IN PVOID SourceAddress,
IN PEPROCESS TargetProcess,
OUT PVOID TargetAddress,
- IN ULONG BufferSize,
+ IN SIZE_T BufferSize,
IN KPROCESSOR_MODE PreviousMode,
- OUT PULONG ReturnSize)
+ OUT PSIZE_T ReturnSize)
{
PFN_NUMBER MdlBuffer[(sizeof(MDL) / sizeof(PFN_NUMBER)) + MI_MAPPED_COPY_PAGES + 1];
PMDL Mdl = (PMDL)MdlBuffer;
- ULONG TotalSize, CurrentSize, RemainingSize;
+ SIZE_T TotalSize, CurrentSize, RemainingSize;
volatile BOOLEAN FailedInProbe = FALSE, FailedInMapping = FALSE, FailedInMoving;
BOOLEAN PagesLocked;
PVOID CurrentAddress = SourceAddress, CurrentTargetAddress = TargetAddress;
@@ -219,12 +219,12 @@
IN PVOID SourceAddress,
IN PEPROCESS TargetProcess,
OUT PVOID TargetAddress,
- IN ULONG BufferSize,
+ IN SIZE_T BufferSize,
IN KPROCESSOR_MODE PreviousMode,
- OUT PULONG ReturnSize)
+ OUT PSIZE_T ReturnSize)
{
UCHAR StackBuffer[MI_POOL_COPY_BYTES];
- ULONG TotalSize, CurrentSize, RemainingSize;
+ SIZE_T TotalSize, CurrentSize, RemainingSize;
volatile BOOLEAN FailedInProbe = FALSE, FailedInMoving, HavePoolAddress = FALSE;
PVOID CurrentAddress = SourceAddress, CurrentTargetAddress = TargetAddress;
PVOID PoolAddress;
@@ -365,9 +365,9 @@
IN PVOID SourceAddress,
IN PEPROCESS TargetProcess,
OUT PVOID TargetAddress,
- IN ULONG BufferSize,
+ IN SIZE_T BufferSize,
IN KPROCESSOR_MODE PreviousMode,
- OUT PULONG ReturnSize)
+ OUT PSIZE_T ReturnSize)
{
NTSTATUS Status;
PEPROCESS Process = SourceProcess;
@@ -419,8 +419,8 @@
IN PVOID Address,
IN MEMORY_INFORMATION_CLASS VirtualMemoryInformationClass,
OUT PVOID VirtualMemoryInformation,
- IN ULONG Length,
- OUT PULONG ResultLength)
+ IN SIZE_T Length,
+ OUT PSIZE_T ResultLength)
{
NTSTATUS Status;
PEPROCESS Process;
@@ -584,7 +584,7 @@
NTSTATUS STDCALL
MiProtectVirtualMemory(IN PEPROCESS Process,
IN OUT PVOID *BaseAddress,
- IN OUT PULONG NumberOfBytesToProtect,
+ IN OUT PSIZE_T NumberOfBytesToProtect,
IN ULONG NewAccessProtection,
OUT PULONG OldAccessProtection OPTIONAL)
{
@@ -678,13 +678,13 @@
NtReadVirtualMemory(IN HANDLE ProcessHandle,
IN PVOID BaseAddress,
OUT PVOID Buffer,
- IN ULONG NumberOfBytesToRead,
- OUT PULONG NumberOfBytesRead OPTIONAL)
+ IN SIZE_T NumberOfBytesToRead,
+ OUT PSIZE_T NumberOfBytesRead OPTIONAL)
{
KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
PEPROCESS Process;
NTSTATUS Status = STATUS_SUCCESS;
- ULONG BytesRead = 0;
+ SIZE_T BytesRead = 0;
PAGED_CODE();
/* Check if we came from user mode */
@@ -704,7 +704,7 @@
_SEH_TRY
{
/* Probe the output value */
- if (NumberOfBytesRead) ProbeForWriteUlong(NumberOfBytesRead);
+ if (NumberOfBytesRead) ProbeForWriteSize_t(NumberOfBytesRead);
}
_SEH_HANDLE
{
@@ -765,8 +765,8 @@
NtWriteVirtualMemory(IN HANDLE ProcessHandle,
IN PVOID BaseAddress,
IN PVOID Buffer,
- IN ULONG NumberOfBytesToWrite,
- OUT PULONG NumberOfBytesWritten OPTIONAL)
+ IN SIZE_T NumberOfBytesToWrite,
+ OUT PSIZE_T NumberOfBytesWritten OPTIONAL)
{
KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
PEPROCESS Process;
@@ -791,7 +791,7 @@
_SEH_TRY
{
/* Probe the output value */
- if (NumberOfBytesWritten) ProbeForWriteUlong(NumberOfBytesWritten);
+ if (NumberOfBytesWritten) ProbeForWriteSize_t(NumberOfBytesWritten);
}
_SEH_HANDLE
{
@@ -851,14 +851,14 @@
NTAPI
NtProtectVirtualMemory(IN HANDLE ProcessHandle,
IN OUT PVOID *UnsafeBaseAddress,
- IN OUT ULONG *UnsafeNumberOfBytesToProtect,
+ IN OUT SIZE_T *UnsafeNumberOfBytesToProtect,
IN ULONG NewAccessProtection,
OUT PULONG UnsafeOldAccessProtection)
{
PEPROCESS Process;
ULONG OldAccessProtection;
PVOID BaseAddress = NULL;
- ULONG NumberOfBytesToProtect = 0;
+ SIZE_T NumberOfBytesToProtect = 0;
KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
NTSTATUS Status = STATUS_SUCCESS;
@@ -870,7 +870,7 @@
{
/* Validate all outputs */
ProbeForWritePointer(UnsafeBaseAddress);
- ProbeForWriteUlong(UnsafeNumberOfBytesToProtect);
+ ProbeForWriteSize_t(UnsafeNumberOfBytesToProtect);
ProbeForWriteUlong(UnsafeOldAccessProtection);
/* Capture them */
@@ -950,11 +950,11 @@
IN PVOID Address,
IN MEMORY_INFORMATION_CLASS VirtualMemoryInformationClass,
OUT PVOID VirtualMemoryInformation,
- IN ULONG Length,
- OUT PULONG UnsafeResultLength)
+ IN SIZE_T Length,
+ OUT PSIZE_T UnsafeResultLength)
{
NTSTATUS Status = STATUS_SUCCESS;
- ULONG ResultLength = 0;
+ SIZE_T ResultLength = 0;
KPROCESSOR_MODE PreviousMode;
union
{
@@ -974,7 +974,7 @@
{
_SEH_TRY
{
- ProbeForWriteUlong(UnsafeResultLength);
+ ProbeForWriteSize_t(UnsafeResultLength);
}
_SEH_HANDLE
{
@@ -1050,8 +1050,8 @@
NTAPI
NtLockVirtualMemory(IN HANDLE ProcessHandle,
IN PVOID BaseAddress,
- IN ULONG NumberOfBytesToLock,
- OUT PULONG NumberOfBytesLocked OPTIONAL)
+ IN SIZE_T NumberOfBytesToLock,
+ OUT PSIZE_T NumberOfBytesLocked OPTIONAL)
{
UNIMPLEMENTED;
if (NumberOfBytesLocked) *NumberOfBytesLocked = 0;
@@ -1062,8 +1062,8 @@
NTAPI
NtUnlockVirtualMemory(IN HANDLE ProcessHandle,
IN PVOID BaseAddress,
- IN ULONG NumberOfBytesToUnlock,
- OUT PULONG NumberOfBytesUnlocked OPTIONAL)
+ IN SIZE_T NumberOfBytesToUnlock,
+ OUT PSIZE_T NumberOfBytesUnlocked OPTIONAL)
{
UNIMPLEMENTED;
if (NumberOfBytesUnlocked) *NumberOfBytesUnlocked = 0;