XP Problems
-
Hi CPians, Does a program running on Win 9x/ME/NT/2000 supposed to be run on WinXP too? If not, what are the incompatibilities? I have a problem with one of my programs. I dont see any reason for the failure, but it always crashes in XP. thank you for any helps in advance Mustafa Demirhan http://www.macroangel.com Sonork ID 100.9935:zoltrix
Actually, its the reverse with some .NET code!! In other words, some .NET code will run on XP and not other operating systems. Cheers, Tom Archer Author, Inside C#
-
Actually, its the reverse with some .NET code!! In other words, some .NET code will run on XP and not other operating systems. Cheers, Tom Archer Author, Inside C#
Tom Archer wrote: Actually, its the reverse with some .NET code!! In other words, some .NET code will run on XP and not other operating systems. Oh! That's bad. .NET code is supposed to be portable across windows platforms. This sucks!!!! Nish It's seven o'clock On the dot I'm in my drop top Cruisin' the streets - Oh yeah I got a real pretty, pretty little thing that's waiting for me
-
Actually, its the reverse with some .NET code!! In other words, some .NET code will run on XP and not other operating systems. Cheers, Tom Archer Author, Inside C#
Do you have any examples ?
-
Hi CPians, Does a program running on Win 9x/ME/NT/2000 supposed to be run on WinXP too? If not, what are the incompatibilities? I have a problem with one of my programs. I dont see any reason for the failure, but it always crashes in XP. thank you for any helps in advance Mustafa Demirhan http://www.macroangel.com Sonork ID 100.9935:zoltrix
Mustafa Demirhan wrote: I have a problem with one of my programs. I dont see any reason for the failure, but it always crashes in XP. Mustafa The best thing to do would be to take an XP machine and install VC++ and debug the program on thatr machine. Nish It's seven o'clock On the dot I'm in my drop top Cruisin' the streets - Oh yeah I got a real pretty, pretty little thing that's waiting for me
-
Mustafa Demirhan wrote: I have a problem with one of my programs. I dont see any reason for the failure, but it always crashes in XP. Mustafa The best thing to do would be to take an XP machine and install VC++ and debug the program on thatr machine. Nish It's seven o'clock On the dot I'm in my drop top Cruisin' the streets - Oh yeah I got a real pretty, pretty little thing that's waiting for me
-
Hi CPians, Does a program running on Win 9x/ME/NT/2000 supposed to be run on WinXP too? If not, what are the incompatibilities? I have a problem with one of my programs. I dont see any reason for the failure, but it always crashes in XP. thank you for any helps in advance Mustafa Demirhan http://www.macroangel.com Sonork ID 100.9935:zoltrix
Well if your program has to establish or monitor an internet connection using RAS/Dialup networking then that is a good place to start, if you use any third party code for this then check for an update. The code I used just didn't work with the final release of XP, but it was fine in the pre-release versions (thanks Microsoft:mad: ) & it caused me a great deal of grief X| Apart from that,I'd suggest you install a copy of Visual C++ on an XP machine & run your app in debug mode, that way you should rapidly find the cause. Have fun! JohnJ http://www.rainbow-innov.co.uk
-
Do you have any examples ?
One example of the top of my head is the Process.GetCurrentProcess method. This method truncates the process name to 15 characters. Here's an example where I've created a simple shared assembly and an app to use it:
STEP #1
Run the strong name utility:
sn –k InsideCSharp.key
STEP #2
Code the server as follows:
// SharedAssemblyServer.cs
// build with the following command line switches
// csc /t:module SharedAssemblyServer.cs
internal class SharedAssemblyServer
{
public static void Test()
{
System.Console.WriteLine("SharedAssemblyServer.Foo (SharedAssemblyServer.netmodule)");
}
}Step #3
Now code the client as follows:
// SharedAssemblyClient.cs
// build with the following command line switches
// csc /addmodule:SharedAssemblyServer.netmodule SharedAssemblyClient.cs
using System;
using System.Diagnostics;
using System.Reflection;[assembly:AssemblyKeyFile("InsideCSharp.key")]
class SharedAssemblyClientApp
{
public static void Main()
{
Assembly DLLAssembly =
Assembly.GetAssembly(typeof(SharedAssemblyServer));
Console.WriteLine("Module1Server.dll Assembly Information");
Console.WriteLine("\t" + DLLAssembly);Process p = Process.GetCurrentProcess(); string AssemblyName = p.ProcessName + ".exe"; Assembly ThisAssembly = Assembly.LoadFrom(AssemblyName); Console.WriteLine("Module1Client.dll Assembly Information"); Console.WriteLine("\\t" + ThisAssembly); Console.WriteLine("Calling SharedAssemblyClient.Test..."); SharedAssemblyServer.Test(); }
}
Run the App
If you run this application, you'll see that a System.IO.FileNotFoundException will be raised because under Windows 2000 the process name is being truncated to 15 characters (from SharedAssemblyClient to SharedAssemblyC).
You can test this compiling the application as SharedAssemblyC and you will find that it works. Additionally, if you try this same code on XP, it also works with the orginal name. Cheers, Tom Archer Author, Inside C#
-
One example of the top of my head is the Process.GetCurrentProcess method. This method truncates the process name to 15 characters. Here's an example where I've created a simple shared assembly and an app to use it:
STEP #1
Run the strong name utility:
sn –k InsideCSharp.key
STEP #2
Code the server as follows:
// SharedAssemblyServer.cs
// build with the following command line switches
// csc /t:module SharedAssemblyServer.cs
internal class SharedAssemblyServer
{
public static void Test()
{
System.Console.WriteLine("SharedAssemblyServer.Foo (SharedAssemblyServer.netmodule)");
}
}Step #3
Now code the client as follows:
// SharedAssemblyClient.cs
// build with the following command line switches
// csc /addmodule:SharedAssemblyServer.netmodule SharedAssemblyClient.cs
using System;
using System.Diagnostics;
using System.Reflection;[assembly:AssemblyKeyFile("InsideCSharp.key")]
class SharedAssemblyClientApp
{
public static void Main()
{
Assembly DLLAssembly =
Assembly.GetAssembly(typeof(SharedAssemblyServer));
Console.WriteLine("Module1Server.dll Assembly Information");
Console.WriteLine("\t" + DLLAssembly);Process p = Process.GetCurrentProcess(); string AssemblyName = p.ProcessName + ".exe"; Assembly ThisAssembly = Assembly.LoadFrom(AssemblyName); Console.WriteLine("Module1Client.dll Assembly Information"); Console.WriteLine("\\t" + ThisAssembly); Console.WriteLine("Calling SharedAssemblyClient.Test..."); SharedAssemblyServer.Test(); }
}
Run the App
If you run this application, you'll see that a System.IO.FileNotFoundException will be raised because under Windows 2000 the process name is being truncated to 15 characters (from SharedAssemblyClient to SharedAssemblyC).
You can test this compiling the application as SharedAssemblyC and you will find that it works. Additionally, if you try this same code on XP, it also works with the orginal name. Cheers, Tom Archer Author, Inside C#
This seems okay to me. It was obviously a win2K bug that was fixed in XP. But generally I expect a .NET app to run on any windows OS without problems. And if it does not, this is all partially meaningless. Nish It's seven o'clock On the dot I'm in my drop top Cruisin' the streets - Oh yeah I got a real pretty, pretty little thing that's waiting for me
-
Mustafa Demirhan wrote: I have a problem with one of my programs. I dont see any reason for the failure, but it always crashes in XP. Mustafa The best thing to do would be to take an XP machine and install VC++ and debug the program on thatr machine. Nish It's seven o'clock On the dot I'm in my drop top Cruisin' the streets - Oh yeah I got a real pretty, pretty little thing that's waiting for me
This is exactly what I will do. I hate this. XP is supposed to be backward compatible, but it is noooot :(( Mustafa Demirhan http://www.macroangel.com Sonork ID 100.9935:zoltrix
-
Well if your program has to establish or monitor an internet connection using RAS/Dialup networking then that is a good place to start, if you use any third party code for this then check for an update. The code I used just didn't work with the final release of XP, but it was fine in the pre-release versions (thanks Microsoft:mad: ) & it caused me a great deal of grief X| Apart from that,I'd suggest you install a copy of Visual C++ on an XP machine & run your app in debug mode, that way you should rapidly find the cause. Have fun! JohnJ http://www.rainbow-innov.co.uk
JohnJ wrote: Well if your program has to establish or monitor an internet connection using RAS/Dialup networking then that is a good place to start, Yes it uses RAS. Thanks for your helps. I hope this solves the problem... Mustafa Demirhan http://www.macroangel.com Sonork ID 100.9935:zoltrix