Help Me to port to Win98
-
How can i use application in win98. I used .NET Framework 1.1. I have instaled in win98. When i use that program, i got System.NullReferenceExpliction. Under xp, i don't have a problem. I have programd in C++ 2003
-
How can i use application in win98. I used .NET Framework 1.1. I have instaled in win98. When i use that program, i got System.NullReferenceExpliction. Under xp, i don't have a problem. I have programd in C++ 2003
-
I Don't Use eventLogs I use RegistryKey Does this support. I din't find anything at that link
-
I Don't Use eventLogs I use RegistryKey Does this support. I din't find anything at that link
Some registry keys that exist under an NT Kernel (NT/2000/XP/2003) don't exist under 98. Your code should have been written to check return values before trying to use them. You'r going to have to go back and write some tracing code into your code so you can see where this error is taking place. Without knowing anything about your code, what you're doing, where the error in your code is occuring, ..., it's impossible to tell you what's wrong. I mean, all your told us is, literally, "My program works on XP, but breaks on 98". There's absolutely nothing we can do with a description like this. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
Some registry keys that exist under an NT Kernel (NT/2000/XP/2003) don't exist under 98. Your code should have been written to check return values before trying to use them. You'r going to have to go back and write some tracing code into your code so you can see where this error is taking place. Without knowing anything about your code, what you're doing, where the error in your code is occuring, ..., it's impossible to tell you what's wrong. I mean, all your told us is, literally, "My program works on XP, but breaks on 98". There's absolutely nothing we can do with a description like this. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
I Will yust put out my code. These keys i am looking egsist in both XP and 98 I hope it will help you #pragma once #include #define MAX_LINE 10000 namespace ArtMoneyLanguageTranslator { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; using namespace std; using namespace Microsoft::Win32; using namespace System::IO; // Global Variable bool bPathExist = true; int LinLNG = 0; __forceinline String *GetArtMoneyPath(void) { RegistryKey *pKey = Registry::ClassesRoot; pKey = pKey->OpenSubKey(S"ArtMoneyTable\\Shell\\Open\\Command"); Object *pValue = pKey->GetValue(S""); String *temp1 = pValue->ToString(); Char temp2[] = temp1->ToCharArray(1, (temp1->Length - 1)); for (int temp3 = 0; temp3 <= (temp1->Length - 1); temp3 ++) { if (temp2[temp3] == '.' && temp2[temp3+1] == 'e' && temp2[temp3+2] == 'x' && temp2[temp3+3] == 'e') { Char path[] = temp1->ToCharArray(1, (temp3 - 8)); String *ArtMoneyPath = new String(path); ArtMoneyPath = ArtMoneyPath->Concat(ArtMoneyPath, "Plugin"); return ArtMoneyPath; } } return NULL; } /// /// Summary for Form1 /// /// WARNING: If you change the name of this class, you will need to change the /// 'Resource File Name' property for the managed resource compiler tool /// associated with all .resx files this class depends on. Otherwise, /// the designers will not be able to interact properly with localized /// resources associated with this form. /// public __gc class Form1 : public System::Windows::Forms::Form { public: Form1(void) { InitializeComponent(); } static String *SourceLNG = ""; static String *TranslatedLNG = ""; static bool bSourceLNG = false; static bool bTranslatedLNG = false; static int Lines; static int index; static Array *SrcLNG = Array::CreateInstance(__typeof(String), MAX_LINE); static Array *TrsLNG = Array::CreateInstance(__typeof(String), MAX_LINE); protected: System::Windows::Forms::ListView * SourceLNGView; private: System::Windows::Forms::TextBox * SourceText; private: System::Windows::Forms::TextBox * TranslatedText; private: System::Windows::Forms::Button * btnExit; private: System::Windows::Forms::Button *
-
I Will yust put out my code. These keys i am looking egsist in both XP and 98 I hope it will help you #pragma once #include #define MAX_LINE 10000 namespace ArtMoneyLanguageTranslator { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; using namespace std; using namespace Microsoft::Win32; using namespace System::IO; // Global Variable bool bPathExist = true; int LinLNG = 0; __forceinline String *GetArtMoneyPath(void) { RegistryKey *pKey = Registry::ClassesRoot; pKey = pKey->OpenSubKey(S"ArtMoneyTable\\Shell\\Open\\Command"); Object *pValue = pKey->GetValue(S""); String *temp1 = pValue->ToString(); Char temp2[] = temp1->ToCharArray(1, (temp1->Length - 1)); for (int temp3 = 0; temp3 <= (temp1->Length - 1); temp3 ++) { if (temp2[temp3] == '.' && temp2[temp3+1] == 'e' && temp2[temp3+2] == 'x' && temp2[temp3+3] == 'e') { Char path[] = temp1->ToCharArray(1, (temp3 - 8)); String *ArtMoneyPath = new String(path); ArtMoneyPath = ArtMoneyPath->Concat(ArtMoneyPath, "Plugin"); return ArtMoneyPath; } } return NULL; } /// /// Summary for Form1 /// /// WARNING: If you change the name of this class, you will need to change the /// 'Resource File Name' property for the managed resource compiler tool /// associated with all .resx files this class depends on. Otherwise, /// the designers will not be able to interact properly with localized /// resources associated with this form. /// public __gc class Form1 : public System::Windows::Forms::Form { public: Form1(void) { InitializeComponent(); } static String *SourceLNG = ""; static String *TranslatedLNG = ""; static bool bSourceLNG = false; static bool bTranslatedLNG = false; static int Lines; static int index; static Array *SrcLNG = Array::CreateInstance(__typeof(String), MAX_LINE); static Array *TrsLNG = Array::CreateInstance(__typeof(String), MAX_LINE); protected: System::Windows::Forms::ListView * SourceLNGView; private: System::Windows::Forms::TextBox * SourceText; private: System::Windows::Forms::TextBox * TranslatedText; private: System::Windows::Forms::Button * btnExit; private: System::Windows::Forms::Button *
You're kidding, right? You don't pay me enough to debug your code for you, especially a chunk of code this long. I'm telling you how to find it yourself. You hope it helps me?!? No. Help yourself... Let me show your what your NOT doing. I told you to check your return values before you try to use them. You're not doing that. For example:
RegistryKey *pKey = Registry::ClassesRoot;
pKey = pKey->OpenSubKey(S"ArtMoneyTable\\Shell\\Open\\Command");
Object *pValue = pKey->GetValue(S"");Did
OpenSubKey
actually return a Registry object or is itnull
? You're not checking this. You're just assuming that it worked and returned the object you expected. Now, your next line immediately tries to use the returned object, calling itsGetValue
method. IfOpenSubKey
returnednull
, which exception do you think will be throw when you try and execute?Object *pValue = null->GetValue(S"");
I'm not saying this is your codes' problem, but this is a glaring example of why your code is failing and you can't find where the problem is. Always check your return values before you try to use them! RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
You're kidding, right? You don't pay me enough to debug your code for you, especially a chunk of code this long. I'm telling you how to find it yourself. You hope it helps me?!? No. Help yourself... Let me show your what your NOT doing. I told you to check your return values before you try to use them. You're not doing that. For example:
RegistryKey *pKey = Registry::ClassesRoot;
pKey = pKey->OpenSubKey(S"ArtMoneyTable\\Shell\\Open\\Command");
Object *pValue = pKey->GetValue(S"");Did
OpenSubKey
actually return a Registry object or is itnull
? You're not checking this. You're just assuming that it worked and returned the object you expected. Now, your next line immediately tries to use the returned object, calling itsGetValue
method. IfOpenSubKey
returnednull
, which exception do you think will be throw when you try and execute?Object *pValue = null->GetValue(S"");
I'm not saying this is your codes' problem, but this is a glaring example of why your code is failing and you can't find where the problem is. Always check your return values before you try to use them! RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
Thanks It Worked. I am sory for the trouble, and i am only a begginer.