Click here to Skip to main content
15,885,032 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is it the Problem of API's and drivers used in code or some other thing is raising problem specifically, to make the code of windows XP not running on windows 7?
Posted
Updated 28-Jul-14 20:27pm
v2
Comments
vikas m d 29-Jul-14 2:08am    
if u r not getting me please , comment. I dont think so it is soo easy.
vikas m d 29-Jul-14 2:09am    
if we get to know why it wont work , then we can migrte Application easily.
Member 10641779 29-Jul-14 2:43am    
It may be windows Platform problem. windows XP is 32 bit OS where as windows 7 is 64 bit.
jiye_king 30-Jul-14 0:36am    
win7 also have 32 bit...
Member 10641779 30-Jul-14 1:11am    
But may be he is working on 64 bit OS.

Okay, you got Solutions 1 and 2, first makes limited applicability at best and presents a pretty bad advice for all cases except the worse, and the second one it totally wrong. I'll explain.

To begin with: Believe or not, all my applications built in NT technology, which includes Windows NT, W2000 and XP, works on Windows 7. This is because I simply wrote them accurately enough. This is because backward compatibility takes place. Moreover with forward compatibility (which is, strictly speaking, not supported), the situation is not that bad. Recently, I assumed that we should support only Window 7 and later, and, when I was asked to support XP, found an incompatibility, and only because I explicitly checked up the privilege elevation, the notion absent in XP. So, permission…

From all my experience of helping other developers, all the set of reasons of incompatibilities with Windows 7 and later people face is majorly reduced to permission issues. In a nutshell: people write applications which are not quite legitimate even for XP, but standard out-of-the box XP settings are too forgiving. If one tightens up file system permissions even with XP, the similar problems appear.

In most cases, this is the case of using some non-legitimate directories or even hard-coded paths. There are no situation when hard-coded paths could be useful. In all cases, all paths should be calculated during runtime using user input, some configuration files, user profile data and other paths defined by the environment. This is explained in my past answers:
How to find my programs directory (executable directory),
How to find my programs directory (current directory, "special folders").

Of course, there can be a number of other problems, but they are all quite rare, in practice. (Too bad you did not present any information on your problems in your question.)

As to Solution 1, using "XP" mode, this is the tool for extreme use in a case of extreme urgent need. It compromises system safety. Fixing your application is much better.

—SA
 
Share this answer
 
v2
Comments
Albert Holguin 29-Jul-14 23:45pm    
+4, most issues I've seen do have to do with permissions, but there are other possibilities... hard to tell without more info from OP.
Sergey Alexandrovich Kryukov 30-Jul-14 0:25am    
Thank you, Albert.
I agree; but I put some note that "there can be a number of other problems"...
—SA
Albert Holguin 30-Jul-14 1:09am    
Did see that, think the only thing that may have made this answer better would be an example of some of the discrepancies. I tried to think of some, but I may confuse them with other windows library implementations (since I've been working a lot with alternative implementations recently).
Albert Holguin 30-Jul-14 1:15am    
...but I would agree that some 90% of issues are file permission based...
vikas m d 14-Aug-14 2:23am    
dear,
Sergey Alexandrovich Kryukov

i understood this , now what exactly i need is i have, N number of applications made on XP platform , iwant an application in such a manner if i give source code of my XP application it should change the code and give me the code compatible for win 7 , dont bouther about UI part,.. So How can i approach for this ?? thanks for ur answer and thanks in advance for the furthe information from u..
Its Because Windows Compatability issue.

Here you can find a solution.

http://windows.microsoft.com/en-us/windows7/install-and-use-windows-xp-mode-in-windows-7[^]

Please Mark as answered if you got a help from the answer
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 29-Jul-14 19:50pm    
I'm sorry to say: even though this information can itself be useful, in practice, this is a pretty bad advice. XP mode can be considered as the last resort, at best.
Please see my answer to understand it.
—SA
Albert Holguin 29-Jul-14 23:47pm    
This may get you what you need, certainly not the best option if you're the developer.
Yes, because the libraries that applications depend on may be changed or removed. To solve the compatibility issue, you have to rebuild your project with the specific SDK for different platforms, not just Windows 7, but also Windows 8. In addition, some APIs may be deprecated. So to make the app work, you also need to use the latest APIs in your application.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 29-Jul-14 10:58am    
You statements means the lack of backward compatibility. This is not true. Besides, you totally misunderstand the mechanism of deprecation. Deprecation prevents the developer using newer API to use obsolete types/methods (sometimes merely discourages it), but supports the code created with older API.

This is a wrong answer. I'll try to answer the question.

—SA
vikas m d 14-Aug-14 4:27am    
thanx alot dear Sergey Alexandrovich Kryukov ,
I got it . by ("First, run all those problematic application "As Administrator" (not just using administrative account, but using elevated privilege). It will reveal if the problem is permission. The run it in a user mode under the debugger, it will give you the exception. Using my advice described in my answer, review the code."). The problem was in some CPP files which i used in vs 2005 in XP i should include other libraries for that in VS 2012.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900