Thoughts from Dan Miser RSS 2.0
 Wednesday, October 13, 2004
In SysUtils, there is a handy function (CheckWin32Version) to check that you are running at least a certain version of Windows. Unfortunately, it is wrong. For example, let's say you want to make sure you are running Win2000 or greater. The following code should do just that:

  if CheckWin32Version(5) then
    CallMyWin2000OrGreaterFunctionHere;
When running on XP, the major version will be 5, and the minor version will be 1. These are stored in writable constants in SysUtils. Inside CheckWin32Version, the check for AMinor is backwards, so your results will be wrong.

I am now using this function instead and everything works fine:


function FixedCheckWin32Version(AMajor: Integer; AMinor: Integer = 0): Boolean;
begin
  Result := (AMajor < Win32MajorVersion) or
            ((AMajor = Win32MajorVersion) and
             (AMinor <= Win32MinorVersion));
end;

Just a side-note: This was fixed in Delphi 7 and above. Of course, if you're using D6, you'll need to use this.

Wednesday, October 13, 2004 10:38:00 AM (Central Standard Time, UTC-06:00)  #    Comments [4] -
Delphi
Tracked by:
http://www.google.com/search?q=kcxojlif [Pingback]
http://www.google.com/search?q=vfwhfnwr [Pingback]
http://www.google.com/search?q=pcmnbrqg [Pingback]
http://www.google.com/search?q=ndfvljxr [Pingback]
http://www.google.com/search?q=ingitvbd [Pingback]
http://9nt-information.info/56905369/index.html [Pingback]
http://9nc-information.info/09949478/ladies-navy-work-trousers.html [Pingback]
http://9nl-information.info/58568428/index.html [Pingback]
http://9nd-information.info/12850415/water-balloon-games-for-children.html [Pingback]
http://9nq-information.info/62600508/index.html [Pingback]
http://9nl-information.info/60579676/index.html [Pingback]
http://9nc-information.info/44064713/index.html [Pingback]
http://9np-information.info/98800379/index.html [Pingback]
http://9no-information.info/95032636/ground-turkey-burger-recipes.html [Pingback]
http://9ny-information.info/43994078/index.html [Pingback]
http://9nh-information.info/46134155/chk-centre-hotel-mainfranken.html [Pingback]
http://9nc-information.info/17645113/design-ideas-for-home-gamerooms.html [Pingback]
http://9oj-information.info/69166038/index.html [Pingback]
http://9oj-information.info/37355236/index.html [Pingback]
http://9ot-information.info/75400275/index.html [Pingback]
http://9ok-information.info/03804320/vashti-bunyan-diamond-day-mp3.html [Pingback]
http://9oe-information.info/37424125/index.html [Pingback]
http://9ox-information.info/95758362/compare-computer-processor.html [Pingback]
http://9qg-information.info/60878252/profilo-lamiera-ondulate.html [Pingback]
http://9on-information.info/99940150/index.html [Pingback]
http://9ol-information.info/03753036/index.html [Pingback]
http://9oa-information.info/59412055/morse-medical-inc.html [Pingback]
http://9si-information.info/56299467/index.html [Pingback]
http://9rv-information.info/93856768/index.html [Pingback]
http://9rf-information.info/64573933/index.html [Pingback]
http://9sp-information.info/88685200/index.html [Pingback]
http://9sl-information.info/00311416/chet-baker-jazz-club-bologna.html [Pingback]
http://9ry-information.info/44931405/was-the-four-elms-pub-origilly-a-farm-house... [Pingback]
http://9sh-information.info/77812420/graduatorie-2006-2007.html [Pingback]
http://9sa-information.info/37358048/maurizio-franco.html [Pingback]
http://9uafr-le-informazioni.info/96122020/index.html [Pingback]
http://9uaeb-le-informazioni.info/39533928/index.html [Pingback]
http://9uafh-le-informazioni.info/86366939/index.html [Pingback]
http://9uafh-le-informazioni.info/10788423/index.html [Pingback]
http://9uaes-le-informazioni.info/92525321/index.html [Pingback]
http://9uafe-le-informazioni.info/77168965/officina-farmaceutica-santa-maria-nov... [Pingback]
http://9uaei-le-informazioni.info/34424594/index.html [Pingback]
http://9uaff-le-informazioni.info/08770219/index.html [Pingback]
http://9uafr-le-informazioni.info/34748971/index.html [Pingback]
http://9uahl-le-informazioni.info/47623120/fondo-di-assistenza-sanitaria-turismo... [Pingback]
http://9uags-le-informazioni.info/13181182/index.html [Pingback]
http://9uahh-le-informazioni.info/88526627/klingon-educational-virtual-environme... [Pingback]
http://9uagm-le-informazioni.info/44314524/index.html [Pingback]
http://9uagh-le-informazioni.info/67881459/repubblica-milano.html [Pingback]
http://9uahd-le-informazioni.info/44265233/index.html [Pingback]
http://9uagj-le-informazioni.info/98904736/trucco-segreto-gioco-xbox-360.html [Pingback]
http://9uahl-le-informazioni.info/83958093/wikie.html [Pingback]
Thursday, October 14, 2004 4:23:00 PM (Central Standard Time, UTC-06:00)
Dan,



Are you sure?

If you passed in 6, this would pass.



Perhaps should be

(aMajor < Win32MajorVersion)...
Brad White
Friday, October 15, 2004 1:13:00 PM (Central Standard Time, UTC-06:00)
Brad, yes you are right. I messed up on my ampersand substitution when posting the article. My code has it right. :-( Thanks for pointing it out. The article is updated.
Friday, July 08, 2005 8:43:00 PM (Central Standard Time, UTC-06:00)
linguajem delph para refletir.
Friday, December 16, 2005 3:57:00 PM (Central Standard Time, UTC-06:00)
Hi,



On trying to run Delphi 6 (which has worked great for several years) I get an error message



Caption says 'delphi32.exe - Entry Point Not Found'

Message says 'the procedure entry point @Sysutils@CheckWin32Version$qqrii could not be located in the dynamic link library rtl60.bpl.'



The problem appeared after installing a new version of MS AntiSpyware.

I have been thrashing around in my unskilled way, but have had no success.

Borland no longer support Delphi 6

I have

uninstalled Delphi6,

deleted \Borland and \Common Files\Borland Shared from C:\Program files

deleted rtl60.bpl (and all lookalike rtl60 files) from \windows\system32

reinstalled Delphi 6

Replaced rtl60.bpl with a copy from a machine on which Delphi6 still works

Delphi 6 still doesn't run.



How can I get my Delphi 6 to work again?



Mike Jensen

Phone Australia 03 5952 3960

mikejensen@optusnet.com.au
Comments are closed.
Navigation
Archive
<November 2008>
SunMonTueWedThuFriSat
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2008
Dan Miser
Sign In
Statistics
Total Posts: 310
This Year: 25
This Month: 0
This Week: 0
Comments: 605
All Content © 2008, Dan Miser
DasBlog theme 'Business' created by Christoph De Baene (delarou)