Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Help Me to port to Win98

Help Me to port to Win98

Scheduled Pinned Locked Moved .NET (Core and Framework)
helpcsharpc++dotnetquestion
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Saksida Bojan
    wrote on last edited by
    #1

    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

    D 1 Reply Last reply
    0
    • S Saksida Bojan

      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

      D Offline
      D Offline
      Dan_P
      wrote on last edited by
      #2

      What exactly are you doing? It's not really clear if your using managed c++ or where the exception is being thrown. Anyway some things like EventLogs don't exist on windows 98. Have a look at this list[^] of supported features.

      S 1 Reply Last reply
      0
      • D Dan_P

        What exactly are you doing? It's not really clear if your using managed c++ or where the exception is being thrown. Anyway some things like EventLogs don't exist on windows 98. Have a look at this list[^] of supported features.

        S Offline
        S Offline
        Saksida Bojan
        wrote on last edited by
        #3

        I Don't Use eventLogs I use RegistryKey Does this support. I din't find anything at that link

        D 1 Reply Last reply
        0
        • S Saksida Bojan

          I Don't Use eventLogs I use RegistryKey Does this support. I din't find anything at that link

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          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

          S 1 Reply Last reply
          0
          • D Dave Kreskowiak

            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

            S Offline
            S Offline
            Saksida Bojan
            wrote on last edited by
            #5

            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 *

            D 1 Reply Last reply
            0
            • S Saksida Bojan

              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 *

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #6

              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 it null? 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 its GetValue method. If OpenSubKey returned null, 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

              S 1 Reply Last reply
              0
              • D Dave Kreskowiak

                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 it null? 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 its GetValue method. If OpenSubKey returned null, 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

                S Offline
                S Offline
                Saksida Bojan
                wrote on last edited by
                #7

                Thanks It Worked. I am sory for the trouble, and i am only a begginer.

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups