Board index » cppbuilder » Re: Porting W98 BCB4 to XP

Re: Porting W98 BCB4 to XP


2005-04-27 06:21:36 PM
cppbuilder59
Leigh Milne < XXXX@XXXXX.COM >wrote:
[code works under Win95, crashes under XP]
Quote
I am not asking with help on my specific code (unless that seems the
only way to progress), rather I am asking if there is information
somewhere that documents problems likely to arise in situations like this.

Is there??
Not that I'm aware of. The problem you probably have is that the Windows
NT operating system family (NT 3.51, NT 4, NT 5 (aka 2000), NT 5.1 (aka
XP)) have true inter-process barriers, true memory protection, etc. etc.
The 16-bit Windows family, including Windows 3.0, Windows 95, Windows 98
and Windows ME, don't. You can write to memory that a different program
owns. You can read from it. You can accidentally have a pointer pointing
off into the middle of nowhere, and yet you can store data there (as
long as that memory physically exists).
Basically, the problem you (almost certainly) have is that your code has
always had a bug in it, it's only that the strict rules brought in with
the 32-bit OS now mean that it's your program that crashes, not some
other program some time later.
Alan Bellingham
--
ACCU Conference 2006 - 19-22 April, Randolph Hotel, Oxford, UK
 
 

Re:Re: Porting W98 BCB4 to XP

I have an application which runs fine on every W98 / 95 system I have
tried. It crashes on XP. I have installed my BCB4 on an XP system, and
am debugging my application. I have found places in my code which
crash, but the reasons are not obvious. The code works in W98 etc, and
still looks OK.
I am not asking with help on my specific code (unless that seems the
only way to progress), rather I am asking if there is information
somewhere that documents problems likely to arise in situations like this.
Is there??
Thanks, Leigh
 

Re:Re: Porting W98 BCB4 to XP

Thanks Allan,
I'll keep hunting. I might have to see if I can replicate the problem
with minimum code. That should help me, and it would help you if I
needed to bring the problem back here.
Leigh
 

{smallsort}

Re:Re: Porting W98 BCB4 to XP

1. IN XP, if you have NTFS you may be trying to write to a path that is
readonly. Check your permissions before writing.
Also the Program Files path in XP is readonly. Microsoft recommends
using the Documents and Settings\All Usres\Application Data path for
data files. This is readonly by default - so you want to change the
permisions of any path you create in there, when creating your
datafiles. Do not place your data in the same place as your programs.
2. In XP, certain parts of the registry - HKLM is readonly but you can
write to if you are an administrator. Check this. Maybe you are writing
to HKLM as a non-administrator.
hope this helps.
Leigh Milne wrote:
Quote
I have an application which runs fine on every W98 / 95 system I have
tried. It crashes on XP. I have installed my BCB4 on an XP system, and
am debugging my application. I have found places in my code which
crash, but the reasons are not obvious. The code works in W98 etc, and
still looks OK.

I am not asking with help on my specific code (unless that seems the
only way to progress), rather I am asking if there is information
somewhere that documents problems likely to arise in situations like this.

Is there??

Thanks, Leigh
 

Re:Re: Porting W98 BCB4 to XP

Thank you Colin,
These are interesting points which I shall record. I haven't written a
small bit of code to replicate my problem yet, so I can't ask for
specific help yet.
Leigh
 

Re:Re: Porting W98 BCB4 to XP

Hi Leigh,
As you know, with all the security hoopla and viruses, administrators
are getting weary of applications that work OK in 98 but has to run as
administrator in XP Pro or 2000/2003. With proper design, it can be
possible to write you stuff such that it does not have to run as an
administrator.
Try to get the book writing secure code Second Edition - this has what I
spoke about among other things.
On the cover of the book, there is this quote....
"Required reading at Microsoft..." - Bill Gates
Leigh Milne wrote:
Quote
Thank you Colin,

These are interesting points which I shall record. I haven't written a
small bit of code to replicate my problem yet, so I can't ask for
specific help yet.

Leigh