VC++ 2003 and Windows98

  • Thread starter PawelSokolowski
  • Start date
P

PawelSokolowski

Hi all,

I have a project originaly created in VC++ 6.0 then migrated to VC++ 2003.
Unfortunatelly after compiling in the 2003 version it does not work in
Windows 98.
I am using only MFC, so .NET Framework shoudn't be necessary.

I added in stdafx.h lines:
#define WINVER 0x400
#define _WIN32_WINNT 0x400

but still it crashes on Win98
How to successfuly set target system ???
Without WINVER it is defaulting to XP, but how to set it to Win98 ?

Regards
PawelS
 
D

David Lowndes

I have a project originaly created in VC++ 6.0 then migrated to VC++ 2003.
Unfortunatelly after compiling in the 2003 version it does not work in
Windows 98.
I am using only MFC, so .NET Framework shoudn't be necessary.

I added in stdafx.h lines:
#define WINVER 0x400
#define _WIN32_WINNT 0x400

but still it crashes on Win98

So why is it crashing?

Have you tried debugged it to find where the problem is?

Dave
 
D

David Wilkinson

PawelSokolowski said:
Hi all,

I have a project originaly created in VC++ 6.0 then migrated to VC++ 2003.
Unfortunatelly after compiling in the 2003 version it does not work in
Windows 98.
I am using only MFC, so .NET Framework shoudn't be necessary.

I added in stdafx.h lines:
#define WINVER 0x400
#define _WIN32_WINNT 0x400

PawelS:

If you want to run on Windows 9x/Me you should not define _WIN32_WINNT
at all.

Also, it is 0x0400, not 0x400.

Also, Windows 98 is Ox0410

But if your code ran when compiled with VC6 and you have not added
anything, then these flags are unlikely to be the problem. They just
prevent you from including code that will not run on all the platforms
you wish to target.

David Wilkinson
 
P

PawelSokolowski

but still it crashes on Win98
So why is it crashing?

Have you tried debugged it to find where the problem is?

Application was working perfectly on Win98 compiled with VC6.0 and it's
working on XP when compiled with 2003.
I don't think it's debugging case, most probable is that API calls are not
compatible with old Windows.
Question is how to setup compiler for correct target system.

Regards
PawelS
 
G

Guest

PawelSokolowski said:
Application was working perfectly on Win98 compiled with VC6.0 and it's
working on XP when compiled with 2003.
I don't think it's debugging case, most probable is that API calls are not
compatible with old Windows.

Not just API. The runtime libraries have been changed too
(memory allocation and so on)
Question is how to setup compiler for correct target system.

Since win98 is obsolete and unsupported... maybe it is better to stay with
VC6 ?

--PA
 
D

David Lowndes

but still it crashes on Win98
Application was working perfectly on Win98 compiled with VC6.0 and it's
working on XP when compiled with 2003.
I don't think it's debugging case, most probable is that API calls are not
compatible with old Windows.

You won't know for sure unless you debug it and find out.

Dave
 
B

Ben Voigt

David Wilkinson said:
PawelS:

If you want to run on Windows 9x/Me you should not define _WIN32_WINNT at
all.

Also, it is 0x0400, not 0x400.

Same thing.
Also, Windows 98 is Ox0410

Capital letter O should cause a compile error.
But if your code ran when compiled with VC6 and you have not added
anything, then these flags are unlikely to be the problem. They just
prevent you from including code that will not run on all the platforms you
wish to target.

That I agree with.... partially. But they will make your Win32 API
structures longer, then when you initialize the cbSize member using
"sizeof", the older OS won't know the new layout and will fail.
 
D

David Wilkinson

Ben said:
Same thing.


Capital letter O should cause a compile error.


That I agree with.... partially. But they will make your Win32 API
structures longer, then when you initialize the cbSize member using
"sizeof", the older OS won't know the new layout and will fail.

Ben:

Points taken.

I would suggest to the OP that he recompile with only WINVER set (to
0x0410, aka 0x410).

David Wilkinson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top